<?xml version="1.0" encoding="utf-8"?>
<posthistory>
  <row Id="7" PostHistoryTypeId="2" PostId="3" RevisionGUID="6a8715ce-0e88-4552-ac23-2671c37a062e" CreationDate="2022-02-08T18:03:16.560" UserId="21" Text="TEST QUESTION: What is the best tutorial to convert a substrate-based standalone chain to a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9" PostHistoryTypeId="1" PostId="3" RevisionGUID="6a8715ce-0e88-4552-ac23-2671c37a062e" CreationDate="2022-02-08T18:03:16.560" UserId="21" Text="TEST QUESTION: What is the best tutorial to convert a substrate-based standalone chain to a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10" PostHistoryTypeId="3" PostId="3" RevisionGUID="6a8715ce-0e88-4552-ac23-2671c37a062e" CreationDate="2022-02-08T18:03:16.560" UserId="21" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11" PostHistoryTypeId="5" PostId="3" RevisionGUID="939eacf9-e012-46c7-8b00-fec2f94c6578" CreationDate="2022-02-08T18:14:32.253" UserId="2" Comment="fluff removed as per https://meta.stackexchange.com/q/2950/295232" Text="What is the best tutorial to convert a substrate-based standalone chain to a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12" PostHistoryTypeId="4" PostId="3" RevisionGUID="939eacf9-e012-46c7-8b00-fec2f94c6578" CreationDate="2022-02-08T18:14:32.253" UserId="2" Comment="fluff removed as per https://meta.stackexchange.com/q/2950/295232" Text="What is the best tutorial to convert a substrate-based standalone chain to a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13" PostHistoryTypeId="24" PostId="3" RevisionGUID="939eacf9-e012-46c7-8b00-fec2f94c6578" CreationDate="2022-02-08T18:14:32.253" Comment="Proposed by 2 approved by 10 edit id of 1" ContentLicense="CC BY-SA 4.0" />
  <row Id="14" PostHistoryTypeId="2" PostId="4" RevisionGUID="90e77ca8-ff83-4d18-89bb-87e9634aa9de" CreationDate="2022-02-08T18:21:33.007" UserId="28" Text="What are the differences between developing a Substrate Pallet and a Substrate Smart Contract (for example with the ink! language)?&#xD;&#xA;&#xD;&#xA;What are some examples of applications which are best written in one form or the other?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Original: https://stackoverflow.com/questions/56040779/when-should-i-build-a-substrate-runtime-module-versus-a-substrate-smart-contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="16" PostHistoryTypeId="1" PostId="4" RevisionGUID="90e77ca8-ff83-4d18-89bb-87e9634aa9de" CreationDate="2022-02-08T18:21:33.007" UserId="28" Text="When should I build a Substrate Pallet versus a Smart Contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17" PostHistoryTypeId="3" PostId="4" RevisionGUID="90e77ca8-ff83-4d18-89bb-87e9634aa9de" CreationDate="2022-02-08T18:21:33.007" UserId="28" Text="|pallet|smart-contract|ink|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18" PostHistoryTypeId="2" PostId="5" RevisionGUID="44268ba3-5388-4f4f-93db-755aa4378667" CreationDate="2022-02-08T18:21:33.007" UserId="28" Text="Substrate Pallets  and Substrate Smart Contracts are two different approaches to building &quot;decentralized applications&quot; using the Substrate framework.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;# Smart Contracts&#xD;&#xA;&#xD;&#xA;A traditional smart contract platform allows users to publish additional logic on top of some core blockchain logic. Since smart contract logic can be published by anyone, including malicious actors and inexperienced developers, there are a number of intentional safe guards built around the smart contract platform. Some examples are:&#xD;&#xA;&#xD;&#xA;* Fees: Ensuring that contract developers are charged for the computation and storage they force on the computers running their contract, and not allowed to abuse the block creators.&#xD;&#xA;* Sandbox: A contract is not able to modify core blockchain storage or the storage of other contracts directly. It's power is limited to only modifying it's own state, and the ability to make outside calls to other contracts or runtime functions.&#xD;&#xA;* State Rent: A contract takes up space on the blockchain, and thus should be charged for simply existing. This ensures that people don't take advantage of &quot;free, unlimited storage&quot;.&#xD;&#xA;* Revert: A contract can be prone to have situations which lead to logical errors. The expectations of a contract developer are low, so extra overhead is added to support reverting transactions when they fail so no state is updated when things go wrong.&#xD;&#xA;&#xD;&#xA;These different overheads makes running contracts slower and more costly, but again, the &quot;target audience&quot; for contract development is different than runtime developers.&#xD;&#xA;&#xD;&#xA;Contracts can allow your community to extend and develop on top of your runtime logic without needing to go through all the craziness of proposals, runtime upgrades, etc... It may even be used as a testing grounds for future runtime changes, but done in a way that isolates your network from any of the growing pains or errors which may occur.&#xD;&#xA;&#xD;&#xA;**In summary**, Substrate Smart Contracts:&#xD;&#xA;&#xD;&#xA;* Are inherently safer to the network.&#xD;&#xA;* Have built in economic incentives against abuse.&#xD;&#xA;* Have computational overhead to support graceful failures in logic.&#xD;&#xA;* Have a lower bar to entry for development.&#xD;&#xA;* Enable fast pace community interaction through a playground to write new logic.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;# Pallets&#xD;&#xA;&#xD;&#xA;&gt; NOTE: Pallets use to be called Runtime Modules.&#xD;&#xA;&#xD;&#xA;Pallets on the other hand afford none of these protections or safe guards that Smart Contracts give you. As a runtime developer, the bar to entry on the code you produce jumps way up.&#xD;&#xA;&#xD;&#xA;You have full control of the underlying logic that each node on your network will run. You have full access to each and every storage item across all of your modules, which you can modify and control. You can even brick your chain with incorrect logic or poor error handling.&#xD;&#xA;&#xD;&#xA;Pallet development has the intention of producing lean, performant, and fast nodes. It affords none of the protections or overhead of transaction reverting, and does not implicitly introduce any fee system to the computation which nodes on your chain run. This means while you are developing runtime functions, it is up to _you_ to correctly asses and apply fees to the different parts of your runtime logic such that it will not be abused by bad actors and hurt your network.&#xD;&#xA;&#xD;&#xA;**In summary**, Pallets:&#xD;&#xA;&#xD;&#xA;* Provide low level access to your entire blockchain.&#xD;&#xA;* Have removed the overhead of built-in safety for performance.&#xD;&#xA;* Have a high bar to entry for developers.&#xD;&#xA;  * Not necessarily to write working code, but to avoid writing broken code.&#xD;&#xA;* Has no inherent economic incentives to repel bad actors.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;# The Right Tool For You&#xD;&#xA;&#xD;&#xA;Substrate Pallets and Substrate Smart Contracts are tools made available to you to solve problems.&#xD;&#xA;&#xD;&#xA;There is likely some amount of overlap in the kinds of problems each one can solve, but there is also a clear set of problems suited for only one of the two. Two give just one example in each category:&#xD;&#xA;&#xD;&#xA;* Pallets: Building a privacy layer on top of transactions in your blockchain.&#xD;&#xA;* Shared: Building a DApp like Cryptokitties which may need to build up a community of users (leaning toward Smart Contract), or may need to scale to millions of transactions a day (leaning toward Pallets).&#xD;&#xA;* Smart Contract: Introducing 2nd layer tokens and custom assets to your network.&#xD;&#xA;&#xD;&#xA;In addition to everything written above, you also need to take into account the costs to set up a DApp using a certain tool. Deploying a contract is a relatively simple and easy process since you take advantage of the existing network. The only costs to you are those fees which you pay to deploy and maintain your contract.&#xD;&#xA;&#xD;&#xA;Setting up your own blockchain on the other hand has the cost of building a community who find value in your service or establishing a private network with the overhead of cloud computing system and general network maintenance.&#xD;&#xA;&#xD;&#xA;I think that now is really the first time it has been so easy and approachable to build runtime logic. In the past, everyone built their &quot;decentralized application idea&quot; using the tool available to them, Smart Contracts, even when that wasn't the best tool for the job.&#xD;&#xA;&#xD;&#xA;With the introduction of Substrate, there is a new tool available for building your decentralized applications; but again, it would be wrong to think that all of your ideas should be a Substrate Pallet.&#xD;&#xA;&#xD;&#xA;Instead, for the first time as a community, we have two tools, and we need to figure out together which one is best to use for each scenario. I don't think all the answers to this exist today, but we can learn and make some educated guesses along the way." ContentLicense="CC BY-SA 4.0" />
  <row Id="20" PostHistoryTypeId="2" PostId="6" RevisionGUID="11d38123-3309-4b18-96b4-90de114578e8" CreationDate="2022-02-08T18:22:28.713" UserId="18" Text="There are alot of tutorials on https://substrate.dev&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is one to convert &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/how-to-guides/v3/parachains/convert/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22" PostHistoryTypeId="16" PostId="6" RevisionGUID="5efff373-6b49-485c-b8fa-184643df08a2" CreationDate="2022-02-08T18:22:28.713" UserId="18" />
  <row Id="23" PostHistoryTypeId="2" PostId="7" RevisionGUID="f994f621-e7dd-421b-ace3-78d97513082c" CreationDate="2022-02-08T18:23:49.130" UserId="41" Text="A little confused on the relationship/hierarchy between Substrate/Polkadot.&#xD;&#xA;&#xD;&#xA;For instance, is the use case for Substrate to build decentralized apps for Polkadot or is it for something else?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25" PostHistoryTypeId="1" PostId="7" RevisionGUID="f994f621-e7dd-421b-ace3-78d97513082c" CreationDate="2022-02-08T18:23:49.130" UserId="41" Text="What's the difference between Substrate and Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26" PostHistoryTypeId="3" PostId="7" RevisionGUID="f994f621-e7dd-421b-ace3-78d97513082c" CreationDate="2022-02-08T18:23:49.130" UserId="41" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27" PostHistoryTypeId="2" PostId="8" RevisionGUID="4624109a-725d-46a3-8e76-d8318f59779d" CreationDate="2022-02-08T18:35:44.173" UserId="28" Text="Substrate is a generalized blockchain development SDK.&#xD;&#xA;&#xD;&#xA;It is written in [Rust](https://www.rust-lang.org/), and has a bunch of different modular and extensible components which make it one of the easiest ways to develop a blockchain.&#xD;&#xA;&#xD;&#xA;Polkadot is just one of the blockchains built using Substrate.&#xD;&#xA;&#xD;&#xA;Polkadot uses the [Polkadot Protocol](https://polkadot.network/technology/) to connect multiple independent blockchains, providing for them scalability, shared security, and interoperability.&#xD;&#xA;&#xD;&#xA;Many of the blockchains which connect to Polkadot are also built using Substrate since the Substrate SDK makes it very simple to both develop your custom blockchain and provides [Cumulus](https://github.com/paritytech/cumulus), a set of tools making it easy to convert your Substrate blockchain to a Parachain.&#xD;&#xA;&#xD;&#xA;However, Substrate can be, and has been used to create completely independent blockchains which are not related to Polkadot. For example a Proof of Work blockchain called [Kulupu](https://kulupu.network/).&#xD;&#xA;&#xD;&#xA;While Substrate will always be connected to the Polkadot ecosystem since it shares history with one another, Substrate is designed to be the best blockchain development SDK for any purpose." ContentLicense="CC BY-SA 4.0" />
  <row Id="32" PostHistoryTypeId="2" PostId="10" RevisionGUID="f74aa38b-e4ce-4daf-a049-6394482de515" CreationDate="2022-02-08T18:36:54.313" UserId="46" Text="I would like to service users on both Substrate and EVM (Ethereum Virtual Machine) blockchains. But the two systems do some things differently. What would be the best way to deploy a blockchain that supports both Substrate and EVM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34" PostHistoryTypeId="1" PostId="10" RevisionGUID="f74aa38b-e4ce-4daf-a049-6394482de515" CreationDate="2022-02-08T18:36:54.313" UserId="46" Text="What is the best way to deploy Substrate and EVM based blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35" PostHistoryTypeId="3" PostId="10" RevisionGUID="f74aa38b-e4ce-4daf-a049-6394482de515" CreationDate="2022-02-08T18:36:54.313" UserId="46" Text="|evm|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36" PostHistoryTypeId="2" PostId="11" RevisionGUID="50b3015c-55ee-4d50-9627-db64974c7daf" CreationDate="2022-02-08T18:38:36.630" UserId="18" Text="Substrate is the underlying framework that Polkadot (a layer 0 blockchain) uses. The same goes for the Parachains (which are layer 1 blockchains&#xD;&#xA;Here is a good article By Gav going into the [details][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.io/vision/substrate-and-polkadot/#substrate-specifics" ContentLicense="CC BY-SA 4.0" />
  <row Id="38" PostHistoryTypeId="2" PostId="12" RevisionGUID="d2cb008d-5911-4a4d-bab5-e2607805eff4" CreationDate="2022-02-08T18:43:41.100" UserId="18" Text="How does Cumulus relate to Polkadot? What is the difference between the two? &#xD;&#xA;&#xD;&#xA;Can I launch a chain without Cumulus? Are there any good documentation around the interactions between the two? " ContentLicense="CC BY-SA 4.0" />
  <row Id="40" PostHistoryTypeId="1" PostId="12" RevisionGUID="d2cb008d-5911-4a4d-bab5-e2607805eff4" CreationDate="2022-02-08T18:43:41.100" UserId="18" Text="What is Cumulus?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41" PostHistoryTypeId="3" PostId="12" RevisionGUID="d2cb008d-5911-4a4d-bab5-e2607805eff4" CreationDate="2022-02-08T18:43:41.100" UserId="18" Text="|polkadot|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42" PostHistoryTypeId="2" PostId="13" RevisionGUID="c0e3028f-a6c5-42fc-810d-1114ab49f631" CreationDate="2022-02-08T18:45:06.617" UserId="28" Text="Using the Substrate blockchain framework, how can I convert between Substrate specific types and Rust primitive types and vice versa?&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;* Convert a time (`T::Moment`) to a `u64`&#xD;&#xA;* Convert a u64 to a `T::Balance`&#xD;&#xA;&#xD;&#xA;etc...&#xD;&#xA;&#xD;&#xA;Original: https://stackoverflow.com/questions/56081117/how-do-you-convert-between-substrate-specific-types-and-rust-primitive-types" ContentLicense="CC BY-SA 4.0" />
  <row Id="44" PostHistoryTypeId="1" PostId="13" RevisionGUID="c0e3028f-a6c5-42fc-810d-1114ab49f631" CreationDate="2022-02-08T18:45:06.617" UserId="28" Text="How do you convert between Substrate specific types and Rust primitive types?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45" PostHistoryTypeId="3" PostId="13" RevisionGUID="c0e3028f-a6c5-42fc-810d-1114ab49f631" CreationDate="2022-02-08T18:45:06.617" UserId="28" Text="|safe-math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="46" PostHistoryTypeId="2" PostId="14" RevisionGUID="9e0a4c12-fa1f-4775-bc98-935c9585f4fc" CreationDate="2022-02-08T18:45:06.617" UserId="28" Text="For most Substrate specific types like `BlockNumber`, `Balance`, `Nonce`, etc... we guarentee that these types use a `u32` with the [`AtLeast32Bit`](https://crates.parity.io/sp_arithmetic/traits/trait.AtLeast32Bit.html) trait.&#xD;&#xA;&#xD;&#xA;From the trait [`BaseArithmetic`](https://crates.parity.io/sp_arithmetic/traits/trait.BaseArithmetic.html), the following are implemented:&#xD;&#xA;&#xD;&#xA;* `From`: `u8`, `u16`, `u32`&#xD;&#xA;* `TryFrom`: `u64`, `u128`, `usize`&#xD;&#xA;* `TryInto`: `u8`, `u16`, `u32`, `u64`, `u128`, `usize`&#xD;&#xA;&#xD;&#xA;Another trait is also provided to provide ergonomic&#xD;&#xA;infallible conversion when you don't care if the value saturates.&#xD;&#xA;&#xD;&#xA;* `UniqueSaturatedInto`: `u8`, `u16`, `u32`, `u64`, `u128`&#xD;&#xA;* `UniqueSaturatedFrom`: `u64`, `u128`&#xD;&#xA;&#xD;&#xA;&gt; **NOTE on `SaturatedConversion`**&#xD;&#xA;&gt;&#xD;&#xA;&gt; `SaturatedConversion` (`saturated_into` and `saturated_from`) should not be used unless you know what you're doing, you've thought and considered all options and your use-case implies that saturation is fundamentally correct. The only time I imagine this is the case is deep in runtime arithmetic where you are logically certain it will not overflow, but can't provide a proof because it would depend on consistent pre-existing state.&#xD;&#xA;&#xD;&#xA;This means that working from `u32` to Substrate specific types should be easy:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn u32_to_balance(input: u32) -&gt; T::Balance {&#xD;&#xA;    input.into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For larger types, you need to handle the case where the `Balance` type for a runtime is smaller than what is available:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn u64_to_balance_option(input: u64) -&gt; Option&lt;T::Balance&gt; {&#xD;&#xA;	input.try_into().ok()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Note the warning above about saturated conversions&#xD;&#xA;pub fn u64_to_balance_saturated(input: u64) -&gt; T::Balance {&#xD;&#xA;	input.saturated_into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When converting from `T::Balance` to a rust primitive, you need to also handle conversion between incompatible types:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn balance_to_u64(input: T::Balance) -&gt; Option&lt;u64&gt; {&#xD;&#xA;	TryInto::&lt;u64&gt;::try_into(input).ok()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Note the warning above about saturated conversions&#xD;&#xA;pub fn balance_to_u64_saturated(input: T::Balance) -&gt; u64 {&#xD;&#xA;	input.saturated_into::&lt;u64&gt;()&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="48" PostHistoryTypeId="2" PostId="15" RevisionGUID="1793f32f-5a14-442a-abb7-28532fb5dbc3" CreationDate="2022-02-08T18:49:20.827" UserId="49" Text="[Substrate](https://docs.substrate.io/v3/getting-started/overview/) is a blockchain development framework that offers all the required functionality that a blockchain needs out of the box. For example, networking, database abstraction, client code, etc. are already included. Substrate offers developers to focus on developing the &quot;state-transition&quot; or &quot;business&quot; logic, for example a multi-signature value transfer or identity management, without needing to implement the low-level functionality of the blockchain first. This state-transition logic is encapsulated in modules that are called [FRAME-pallets](https://docs.substrate.io/v3/runtime/frame/), which are in turn configured within the [runtime](https://docs.substrate.io/v3/concepts/runtime/). Substrate comes with a big library of FRAME-pallets, that can be included and are ready to use in minutes.&#xD;&#xA;Substrate has a unique mechanism called runtime-upgrades. Whenever runtime logic is upgraded, a wasm-blob is stored on the chain, that nodes can fetch. This enables forkless upgrades. The libraries that are available for Substrate even allow multiple ways of realizing inter-chain communication, which can be used to connect blockchains, as it is the case with Polkadot.&#xD;&#xA;&#xD;&#xA;Polkadot is a project that is built on Substrate. It extended the client and runtime code of the Substrate template in a way, that makes Polkadot to a community governed hub of chains: Substrate-based chains can participate in an auction to register as so called Parachain or lease a slot on-demand as a so called Parathread to secure their chain state on the Polkadot chain (and consequently inherit the security that Polkadot offers). Parachains that are connected to Polkadot (the Relaychain) can also potentially communicate with each other and transfer assets or use any functionality that is offered by them through this means." ContentLicense="CC BY-SA 4.0" />
  <row Id="50" PostHistoryTypeId="2" PostId="16" RevisionGUID="4530b1fd-9308-4036-8b94-4bcb7880d51e" CreationDate="2022-02-08T18:51:24.957" UserId="18" Text="You can deploy to Moonbeam/Astar or if you fancy having a go yourself you can check out the EVM Pallet&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/frontier/frame/evm.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="52" PostHistoryTypeId="2" PostId="17" RevisionGUID="2def43f9-b736-4163-bcf4-048ee406f2b3" CreationDate="2022-02-08T18:59:48.853" UserId="50" Text="I need to call extrinsic function, for example ```utility -&gt; batch(calls)``` or ```utility -&gt; batchAll(calls)```. Also, which library I need to use for this?&#xD;&#xA;&#xD;&#xA;Can't find those examples in the web." ContentLicense="CC BY-SA 4.0" />
  <row Id="54" PostHistoryTypeId="1" PostId="17" RevisionGUID="2def43f9-b736-4163-bcf4-048ee406f2b3" CreationDate="2022-02-08T18:59:48.853" UserId="50" Text="How to call extrinsic function" ContentLicense="CC BY-SA 4.0" />
  <row Id="55" PostHistoryTypeId="3" PostId="17" RevisionGUID="2def43f9-b736-4163-bcf4-048ee406f2b3" CreationDate="2022-02-08T18:59:48.853" UserId="50" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="56" PostHistoryTypeId="5" PostId="17" RevisionGUID="26b60869-1ee9-4700-9a38-c73451cc2a1f" CreationDate="2022-02-08T19:04:03.797" UserId="2" Comment="typos corrected" Text="I need to call extrinsic functions, for example ```utility -&gt; batch(calls)``` or ```utility -&gt; batchAll(calls)```. Which library do I need to use for this?&#xD;&#xA;&#xD;&#xA;I can't find those examples in the web." ContentLicense="CC BY-SA 4.0" />
  <row Id="57" PostHistoryTypeId="4" PostId="17" RevisionGUID="26b60869-1ee9-4700-9a38-c73451cc2a1f" CreationDate="2022-02-08T19:04:03.797" UserId="2" Comment="typos corrected" Text="How to call extrinsic functions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="58" PostHistoryTypeId="24" PostId="17" RevisionGUID="26b60869-1ee9-4700-9a38-c73451cc2a1f" CreationDate="2022-02-08T19:04:03.797" Comment="Proposed by 2 approved by 50 edit id of 2" ContentLicense="CC BY-SA 4.0" />
  <row Id="59" PostHistoryTypeId="2" PostId="18" RevisionGUID="dbebb4aa-6689-4445-840d-cbd3b8b69d89" CreationDate="2022-02-08T19:13:44.713" UserId="28" Text="Probably an oversimplification, but you can think of [Cumulus](https://github.com/paritytech/cumulus) as a set of tools which allows you to convert a solo-chain Substrate blockchain into a Polkadot compatible Parachain.&#xD;&#xA;&#xD;&#xA;More specifically, it provides libraries for all of the necessary parts of the Polkadot protocol necessary for Parachains to work, for example:&#xD;&#xA;&#xD;&#xA;* Creating new parachain blocks via Collators&#xD;&#xA;* Listening to the relay chain for updates&#xD;&#xA;* Synchronizing upgrades between the parachain and relay chain&#xD;&#xA;* etc...&#xD;&#xA;&#xD;&#xA;These are all parts that are specific to being a parachain, so all of those things exist in the separate Cumulus repository, while Substrate focuses on just the general development of blockchains, independent of the [Polkadot Protocol](polkadot.network/technology/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="61" PostHistoryTypeId="2" PostId="19" RevisionGUID="57ff6780-f375-40d5-b00b-e2a5e2364005" CreationDate="2022-02-08T19:27:38.783" UserId="31" Text="&#xD;&#xA;&#xD;&#xA;Why is the substrate so important and what is the biggest difference between evm-enabled blockchains built on top of the substrate&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="63" PostHistoryTypeId="1" PostId="19" RevisionGUID="57ff6780-f375-40d5-b00b-e2a5e2364005" CreationDate="2022-02-08T19:27:38.783" UserId="31" Text="Why is the substrate so important and what is the biggest difference between evm-enabled blockchains built on top of the substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="64" PostHistoryTypeId="3" PostId="19" RevisionGUID="57ff6780-f375-40d5-b00b-e2a5e2364005" CreationDate="2022-02-08T19:27:38.783" UserId="31" Text="|polkadot|kusama|pallet|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="65" PostHistoryTypeId="2" PostId="20" RevisionGUID="09b20f05-40f8-437a-88ef-a6d12fa22627" CreationDate="2022-02-08T19:27:38.783" UserId="31" Text="**Substrate** (Substrate) is a modular framework that allows building various blockchains based on libraries with custom or pre-made components.&#xD;&#xA;&#xD;&#xA;And Substrate is used for Polkadot's blockchain building framework. It provides developers with a variety of tools to design their custom blockchains for a variety of possible applications. The blockchains can then be launched independently or integrated in Polkadot's network of shards, or &quot;Parachains&quot;. Substrate is one of the three core technologies that make up the future Web3 vision including Parity Ethereum (Eth 1.0 as well as Serenity), Parity Substrate, and Polkadot.&#xD;&#xA;&#xD;&#xA;Differences and outstanding features:&#xD;&#xA;Fast and efficient database&#xD;&#xA;Modular P2P Stack&#xD;&#xA;The consensus layer is subject to change&#xD;&#xA;Queue transaction confirmation&#xD;&#xA;Flexible runtime library&#xD;&#xA;Optimized for lightweight applications.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Outstanding Features&#xD;&#xA;Fast and efficient database&#xD;&#xA;Modular P2P Stack&#xD;&#xA;The consensus layer is subject to change&#xD;&#xA;Queue transaction confirmation&#xD;&#xA;Flexible runtime library&#xD;&#xA;Optimized for lightweight applications.&#xD;&#xA;Outstanding Features&#xD;&#xA;Outstanding Substrate Structure and Compatibility&#xD;&#xA;&#xD;&#xA;Notable structure:&#xD;&#xA;Architected on WebAssembly;&#xD;&#xA;Industry Standard Networking Libp2p;&#xD;&#xA;Highly scalable;&#xD;&#xA;Rust-based primary implementation for speed and reliability Javascript secondary implementation for development&#xD;&#xA;Wasm WebAssembly interpreter, written in Rust.&#xD;&#xA;&#xD;&#xA;Compatibility:&#xD;&#xA;Not every blockchain is suitable for every network. With Substrate, you can mix and match features to fit your project's needs.&#xD;&#xA;&#xD;&#xA;Smart Contract WebAssembly&#xD;&#xA;Allow multi-chain level&#xD;&#xA;State and transactions are encrypted.&#xD;&#xA;Limited asynchronous call options.&#xD;&#xA;Locked account level.&#xD;&#xA;Governance tools and methods such as stakeholder referendums, approval voting, and qualified abstentions.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="67" PostHistoryTypeId="2" PostId="21" RevisionGUID="1c0099f2-3dae-4112-9e14-08477a459b41" CreationDate="2022-02-08T19:39:51.947" UserId="28" Text="Is there a way for one custom pallet to access the storage or functions from another custom pallet? &#xD;&#xA;&#xD;&#xA;For Example:&#xD;&#xA;&#xD;&#xA;## Pallet 1&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type MyValue&lt;T: Config&gt; = StorageValue&lt;_, u64, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Pallet 2&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn do_something(origin: OriginFor&lt;T&gt;, new_value: u64) -&gt; DispatchResult {&#xD;&#xA;    let _sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;    let value: u64 = how_to_read_my_value();&#xD;&#xA;&#xD;&#xA;    if value &lt; new_value {&#xD;&#xA;        how_to_set_my_value(new_value);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How could I implement `how_to_read_my_value` and `how_to_set_my_value`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="69" PostHistoryTypeId="1" PostId="21" RevisionGUID="1c0099f2-3dae-4112-9e14-08477a459b41" CreationDate="2022-02-08T19:39:51.947" UserId="28" Text="How do I use storage and functions from one custom pallet in another?" ContentLicense="CC BY-SA 4.0" />
  <row Id="70" PostHistoryTypeId="3" PostId="21" RevisionGUID="1c0099f2-3dae-4112-9e14-08477a459b41" CreationDate="2022-02-08T19:39:51.947" UserId="28" Text="|pallet|frame|tight-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="71" PostHistoryTypeId="2" PostId="22" RevisionGUID="68bfd0f9-14bb-4800-af55-37dea928eed9" CreationDate="2022-02-08T19:39:51.947" UserId="28" Text="If you are building a pallet (pallet2) which has a direct dependency on another pallet (pallet1), you can you &quot;tight coupling&quot; inherit pallet1's `Config` in pallet2's `Config` definition:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub trait Config: pallet1::Config {&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To access **public** storage items from pallet1 in pallet2, you then just need to call the appropriate function on that storage item:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let value: u64 = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;if value &lt; new_value {&#xD;&#xA;    pallet1::MyValue::&lt;T&gt;set(new_value);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To access other **public** functions from pallet1 in pallet2, you need to use the `Pallet` type where these functions are implmented:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet1::Pallet::&lt;T&gt;::public_function();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is a simple example of two pallets interacting in this way:&#xD;&#xA;&#xD;&#xA;**pallet1.rs**&#xD;&#xA;&#xD;&#xA;&gt; Note that all the things in this pallet are marked public (`pub`)&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;mod pallet {&#xD;&#xA;    pub trait Config: system::Config {}&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    pub(super) type MyValue&lt;T: Config&gt; = StorageValue&lt;_, u64, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;    // -- snip --&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Trait&gt; Pallet&lt;T&gt; {&#xD;&#xA;	pub fn get_value() -&gt; u32 {&#xD;&#xA;		&lt;Something&lt;T&gt;&gt;::get()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet2.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_support::pallet_prelude::*;&#xD;&#xA;use crate::pallet1;&#xD;&#xA;&#xD;&#xA;mod pallet {&#xD;&#xA;    pub trait Trait: pallet1::Trait {&#xD;&#xA;        // -- snip --&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		pub fn get_value_directly(_origin: OriginFor&lt;T&gt;) -&gt; Result {&#xD;&#xA;            let value = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;        pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; Result {&#xD;&#xA;            pallet1::MyValue::&lt;T&gt;::put(value);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        pub fn get_value_public_function(_origin: OriginFor&lt;T&gt;) -&gt; Result {&#xD;&#xA;            let value = pallet1::Pallet::&lt;T&gt;::get_value();&#xD;&#xA;			Ok(())&#xD;&#xA;        }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="73" PostHistoryTypeId="2" PostId="23" RevisionGUID="323cd8f0-7bc7-400f-b2e2-493c921065d9" CreationDate="2022-02-08T19:45:33.063" UserId="28" Text="The easiest way to do this is with JavaScript and using the [Polkadot JS APIs](https://polkadot.js.org/docs/).&#xD;&#xA;&#xD;&#xA;An example for batching transactions can be found [here](https://polkadot.js.org/docs/api/cookbook/tx#how-can-i-batch-transactions):&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// construct a list of transactions we want to batch&#xD;&#xA;const txs = [&#xD;&#xA;  api.tx.balances.transfer(addrBob, 12345),&#xD;&#xA;  api.tx.balances.transfer(addrEve, 12345),&#xD;&#xA;  api.tx.staking.unbond(12345)&#xD;&#xA;];&#xD;&#xA;&#xD;&#xA;// construct the batch and send the transactions&#xD;&#xA;api.tx.utility&#xD;&#xA;  .batch(txs)&#xD;&#xA;  .signAndSend(sender, ({ status }) =&gt; {&#xD;&#xA;    if (status.isInBlock) {&#xD;&#xA;      console.log(`included in ${status.asInBlock}`);&#xD;&#xA;    }&#xD;&#xA;  });&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="75" PostHistoryTypeId="2" PostId="24" RevisionGUID="eb427782-f883-48f2-8950-69a221ba0ff8" CreationDate="2022-02-08T19:54:58.790" UserId="28" Text="In the Substrate blockchain development framework, the FRAME Balances pallet references 4 different kinds of balance:&#xD;&#xA;&#xD;&#xA; - Free Balance&#xD;&#xA; - Reserved Balance&#xD;&#xA; - Locked Balance&#xD;&#xA; - Vesting Balance&#xD;&#xA;&#xD;&#xA;What are the differences between these different types of balances, when do they get used within Substrate, and how should I use them in my own pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="77" PostHistoryTypeId="1" PostId="24" RevisionGUID="eb427782-f883-48f2-8950-69a221ba0ff8" CreationDate="2022-02-08T19:54:58.790" UserId="28" Text="What is the difference between Free Balance, Reserved Balance, Locked Balance, Vesting Balance, etc...?" ContentLicense="CC BY-SA 4.0" />
  <row Id="78" PostHistoryTypeId="3" PostId="24" RevisionGUID="eb427782-f883-48f2-8950-69a221ba0ff8" CreationDate="2022-02-08T19:54:58.790" UserId="28" Text="|balances|free-balance|reserved-balance|locked-balance|vesting-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="79" PostHistoryTypeId="2" PostId="25" RevisionGUID="2d6b888b-4d3a-4b81-b243-f74736a7474d" CreationDate="2022-02-08T19:54:58.790" UserId="28" Text="The Balances Pallet is a comprehensive on chain currency which has the flexibility to provide a number of different features.&#xD;&#xA;&#xD;&#xA;Within the storage of the Balances Pallet, there are only two balances which are directly stored:&#xD;&#xA;&#xD;&#xA;1. Free Balance&#xD;&#xA;2. Reserved Balance&#xD;&#xA;&#xD;&#xA;The sum of these two balances is used to calculate the [**total balance**](https://crates.parity.io/srml_support/traits/trait.Currency.html#tymethod.total_balance) of an account.&#xD;&#xA;&#xD;&#xA;Additional layers of logic are put on top of free balance in order to create abstractions like:&#xD;&#xA;&#xD;&#xA;- Locked Balance&#xD;&#xA;- Vesting Balance&#xD;&#xA;&#xD;&#xA;So let's walk through the different types of balances managed by the Balances Pallet.&#xD;&#xA;&#xD;&#xA;# Free Balance&#xD;&#xA;&#xD;&#xA;From the [terminology](https://crates.parity.io/srml_balances/index.html#terminology) section of the reference docs:&#xD;&#xA;&#xD;&#xA;&gt; **Free Balance:** The portion of a balance that is not reserved. The free balance is the only balance that matters for most operations. When this balance falls below the existential deposit, most functionality of the account is removed. When both it and the reserved balance are deleted, then the account is said to be dead.&#xD;&#xA;&#xD;&#xA;The free balance of an account is used whenever a `transfer`, `withdraw`, or `reserve` is initiated. Before these operations can complete successfully, [`ensure_can_withdraw`](https://crates.parity.io/srml_support/traits/trait.Currency.html#tymethod.ensure_can_withdraw) is called with some `WithdrawReason` and checks that a withdrawal does not interfere with some **vesting balance** or **locked balance**.&#xD;&#xA;&#xD;&#xA;This does not prevent other operations like `slash` from occurring, which does not care about any abstractions over free balance.&#xD;&#xA;&#xD;&#xA;## Vesting Balance&#xD;&#xA;&#xD;&#xA;An account's vesting balance is an abstraction over it's free balance. More specifically, an account which has a vesting balance cannot spend from their free balance lower than that amount. Vesting balance does not care about the `WithdrawReason`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;amount_spendable = free_balance - vesting_balance&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So even though an account may seem like it has a lot of liquid funds to spend when querying the free balance, an accounts vesting balance can prevent those funds from being withdrawn.&#xD;&#xA;&#xD;&#xA;Vesting balance can only be set at the genesis of a Substrate chain, and decreases at a linear rate per block starting at some `starting_block` for a `length` of blocks, at which point vesting balance is zero. The vesting balance can be larger than the free balance in situations when the free balance is reduced by slashing. In these cases `amount_spendable` is saturated to zero.&#xD;&#xA;&#xD;&#xA;## Locked Balance&#xD;&#xA;&#xD;&#xA;An account's locked balance is another abstraction over it's free balance. In this case, it is a certain amount that is locked from withdrawing for a certain reason.&#xD;&#xA;&#xD;&#xA;The different withdraw reasons are:&#xD;&#xA;&#xD;&#xA;* Transaction Payment: In order to pay for (system) transaction costs.&#xD;&#xA;* Transfer: In order to transfer ownership.&#xD;&#xA;* Reserve: In order to reserve some funds for a later return or repatriation.&#xD;&#xA;* Fee: In order to pay some other (higher-level) fees.&#xD;&#xA;&#xD;&#xA;So if an account has a lock for 100 units with `WithdrawReasons::Transfer`, it **cannot** make a transfer which brings its free balance lower than 100 units. However, this account _will_ be able to perform another operation like `reserve` taking its free balance below 100 units. A lock can have multiple reasons associated with it, in which case, those funds can only be spent for the other reasons.&#xD;&#xA;&#xD;&#xA;Multiple different locks can be placed on an account, but these locks overlay one another rather than stack. This means that if an account has 3 locks for 100 units, the account can spend it's funds for any reason down to 100 units, at which point the locks will start to come into play.&#xD;&#xA;&#xD;&#xA;Locked balance also overlays with vesting balance as these two are checked independently, but both checks must pass for `ensure_can_withdraw` to be successful.&#xD;&#xA;&#xD;&#xA;# Reserved Balance&#xD;&#xA;&#xD;&#xA;From the [terminology](https://crates.parity.io/srml_balances/index.html#terminology) section:&#xD;&#xA;&#xD;&#xA;&gt; **Reserved Balance:** Reserved balance still belongs to the account holder, but is suspended. Reserved balance can still be slashed, but only after all the free balance has been slashed. If the reserved balance falls below the existential deposit then it and any related functionality will be deleted. When both it and the free balance are deleted, then the account is said to be dead.&#xD;&#xA;&#xD;&#xA;Relatively speaking, reserved balance is more simple than free balance because there are no abstractions over it. Funds which are reserved from a user are not meant to be directly touched by any other logic outside of the Balances pallet. Instead, funds should first be `unreserved` and then modified in the `free_balance`.&#xD;&#xA;&#xD;&#xA;## Reserved Balance vs Locked Balance&#xD;&#xA;&#xD;&#xA;Reserved balance and locked balance appear similar but are fundamentally different. Locked balance has an identity in terms of a lock identifier, what reasons funds are locked for, and how long they are locked for. A reserved balance has none of these traits, and are untouchable without explicit action from the runtime to unreserve those funds.&#xD;&#xA;&#xD;&#xA;Furthermore, there could be implications about having a free balance to versus not having one. For example, if you set a lock on the full free balance of an account, it will still have a free balance, and `OnFreeBalanceZero` will not be called. However, if you `reserve` all the funds, the free balance will drop below the existential deposit and `OnFreeBalanceZero` will be triggered for pallets who have implemented this feature." ContentLicense="CC BY-SA 4.0" />
  <row Id="81" PostHistoryTypeId="2" PostId="26" RevisionGUID="bf33bdd2-f938-4336-88c5-12c4c6c237e0" CreationDate="2022-02-08T20:03:34.497" UserId="69" Text="Why should you start with Substrate? " ContentLicense="CC BY-SA 4.0" />
  <row Id="83" PostHistoryTypeId="1" PostId="26" RevisionGUID="bf33bdd2-f938-4336-88c5-12c4c6c237e0" CreationDate="2022-02-08T20:03:34.497" UserId="69" Text="Why should you start with Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="84" PostHistoryTypeId="3" PostId="26" RevisionGUID="bf33bdd2-f938-4336-88c5-12c4c6c237e0" CreationDate="2022-02-08T20:03:34.497" UserId="69" Text="|polkadot|pallet|evm|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="85" PostHistoryTypeId="2" PostId="27" RevisionGUID="72502513-b271-4d8d-ba7e-95c53da2e391" CreationDate="2022-02-08T20:03:34.497" UserId="69" Text="Substrate allows you to handle the complex processes of Blockchain development without the limitations imposed by other frameworks. Since its launch, Substrate has been shaped to be a flexible and highly customizable modular framework.&#xD;&#xA;&#xD;&#xA;This platform helps developers quickly build Blockchain with well-researched codes. After much experimentation, Substrate's codes have proven their worth on billions of dollars worth of live networks.&#xD;&#xA;&#xD;&#xA;If you're a beginner developer, you won't have to start from scratch with the Substrate system. You can take advantage of the open source software built by Substrate's large ecosystem to get off to a great start.&#xD;&#xA;This ecosystem includes the world's leading Blockchain development projects. And of course, they're completely free. Like the beginner apps, the Blockchains from Substrate are also&#xD;&#xA;Some outstanding functions of Substrate:&#xD;&#xA;Persistent storage, support functions, Unlimited upgrades, safety and speed, custom messages...&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/KL5es.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="87" PostHistoryTypeId="2" PostId="28" RevisionGUID="e48efd7c-8ff2-4012-b743-72f766eb8755" CreationDate="2022-02-08T20:35:02.510" UserId="74" Text="In the latest master of Ink! examples there is only one main contract, `delegator`, for understanding cross-contract calls. Unfortunately, there are no tests either for this system.&#xD;&#xA;&#xD;&#xA;- https://github.com/paritytech/ink/blob/927251c0d70ba9ac646add00acca082f8434b96a/examples/delegator/lib.rs&#xD;&#xA;&#xD;&#xA;Cross-contract calling seems to rest on the `ContractRef` pattern where the `ContractRef`s are instantiated in the base contract's constructor.&#xD;&#xA;```&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Delegator {&#xD;&#xA;        /// Says which of `adder` or `subber` is currently in use.&#xD;&#xA;        which: Which,&#xD;&#xA;        /// The `accumulator` smart contract.&#xD;&#xA;        accumulator: AccumulatorRef,&#xD;&#xA;        /// The `adder` smart contract.&#xD;&#xA;        adder: AdderRef,&#xD;&#xA;        /// The `subber` smart contract.&#xD;&#xA;        subber: SubberRef,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;    impl Delegator {&#xD;&#xA;        /// Instantiate a `delegator` contract with the given sub-contract codes.&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(&#xD;&#xA;            init_value: i32,&#xD;&#xA;            version: u32,&#xD;&#xA;            accumulator_code_hash: Hash,&#xD;&#xA;            adder_code_hash: Hash,&#xD;&#xA;            subber_code_hash: Hash,&#xD;&#xA;        ) -&gt; Self {&#xD;&#xA;            let total_balance = Self::env().balance();&#xD;&#xA;            let salt = version.to_le_bytes();&#xD;&#xA;            let accumulator = AccumulatorRef::new(init_value)&#xD;&#xA;                .endowment(total_balance / 4)&#xD;&#xA;                .code_hash(accumulator_code_hash)&#xD;&#xA;                .salt_bytes(salt)&#xD;&#xA;                .instantiate()&#xD;&#xA;                .unwrap_or_else(|error| {&#xD;&#xA;                    panic!(&#xD;&#xA;                        &quot;failed at instantiating the Accumulator contract: {:?}&quot;,&#xD;&#xA;                        error&#xD;&#xA;                    )&#xD;&#xA;                });&#xD;&#xA;            let adder = AdderRef::new(accumulator.clone())&#xD;&#xA;                .endowment(total_balance / 4)&#xD;&#xA;                .code_hash(adder_code_hash)&#xD;&#xA;                .salt_bytes(salt)&#xD;&#xA;                .instantiate()&#xD;&#xA;                .unwrap_or_else(|error| {&#xD;&#xA;                    panic!(&quot;failed at instantiating the Adder contract: {:?}&quot;, error)&#xD;&#xA;                });&#xD;&#xA;            let subber = SubberRef::new(accumulator.clone())&#xD;&#xA;                .endowment(total_balance / 4)&#xD;&#xA;                .code_hash(subber_code_hash)&#xD;&#xA;                .salt_bytes(salt)&#xD;&#xA;                .instantiate()&#xD;&#xA;                .unwrap_or_else(|error| {&#xD;&#xA;                    panic!(&quot;failed at instantiating the Subber contract: {:?}&quot;, error)&#xD;&#xA;                });&#xD;&#xA;            Self {&#xD;&#xA;                which: Which::Adder,&#xD;&#xA;                accumulator,&#xD;&#xA;                adder,&#xD;&#xA;                subber,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For testing, how does one create code hashes to instantiate the main contract that will delegate calls downstream?" ContentLicense="CC BY-SA 4.0" />
  <row Id="89" PostHistoryTypeId="1" PostId="28" RevisionGUID="e48efd7c-8ff2-4012-b743-72f766eb8755" CreationDate="2022-02-08T20:35:02.510" UserId="74" Text="How to test cross-contract Ink! contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="90" PostHistoryTypeId="3" PostId="28" RevisionGUID="e48efd7c-8ff2-4012-b743-72f766eb8755" CreationDate="2022-02-08T20:35:02.510" UserId="74" Text="|ink|blockchaincross-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="91" PostHistoryTypeId="2" PostId="29" RevisionGUID="18748efc-2f6b-4a14-9eb1-91886616e594" CreationDate="2022-02-08T21:29:26.063" UserId="85" Text="A runtime release might say the following:&#xD;&#xA;```&#xD;&#xA;️ system.setCode hash:		0xa6b93db1b6abbe5c94e4fe0969f86eed61d78fda7e0405bfe7b1a2b4d87d4a4f&#xD;&#xA;️ authorizeUpgrade hash:	0x055361413e61894180c2b331b27ecfb34711aa188ae46a8d729001a1dd089d6e&#xD;&#xA;#️⃣ Blake2-256 hash:		0x85cbef6d0e24bf3081fdd1e484fbf0ad510292aeb7d01fa27ae59d705466fd86&#xD;&#xA; IPFS:			QmVqUxwE8zoCZrxVM4nHEQPuQKfZyCMPS65hfojEY3EdME&#xD;&#xA;```&#xD;&#xA;(this one happens to be as statemine release but they all follow a pattern)&#xD;&#xA;&#xD;&#xA;The IPFS is the content addressable hash for IPFS, but what are the other hashes used for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="93" PostHistoryTypeId="1" PostId="29" RevisionGUID="18748efc-2f6b-4a14-9eb1-91886616e594" CreationDate="2022-02-08T21:29:26.063" UserId="85" Text="What are the different types of hashes given in the release notes of each runtime used for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="94" PostHistoryTypeId="3" PostId="29" RevisionGUID="18748efc-2f6b-4a14-9eb1-91886616e594" CreationDate="2022-02-08T21:29:26.063" UserId="85" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="96" PostHistoryTypeId="5" PostId="22" RevisionGUID="f2a31acd-7718-49d5-addc-37436254e730" CreationDate="2022-02-08T22:08:58.000" UserId="28" Comment="added 3 characters in body" Text="If you are building a pallet (pallet2) which has a direct dependency on another pallet (pallet1), you can you &quot;tight coupling&quot; inherit pallet1's `Config` in pallet2's `Config` definition:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub trait Config: pallet1::Config {&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To access **public** storage items from pallet1 in pallet2, you then just need to call the appropriate function on that storage item:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let value: u64 = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;if value &lt; new_value {&#xD;&#xA;    pallet1::MyValue::&lt;T&gt;set(new_value);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To access other **public** functions from pallet1 in pallet2, you need to use the `Pallet` type where these functions are implmented:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet1::Pallet::&lt;T&gt;::public_function();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is a simple example of two pallets interacting in this way:&#xD;&#xA;&#xD;&#xA;**pallet1.rs**&#xD;&#xA;&#xD;&#xA;&gt; Note that all the things in this pallet are marked public (`pub`)&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;mod pallet {&#xD;&#xA;    pub trait Config: system::Config {}&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    pub(super) type MyValue&lt;T: Config&gt; = StorageValue&lt;_, u64, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;    // -- snip --&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	pub fn get_value() -&gt; u32 {&#xD;&#xA;		&lt;Something&lt;T&gt;&gt;::get()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet2.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_support::pallet_prelude::*;&#xD;&#xA;use crate::pallet1;&#xD;&#xA;&#xD;&#xA;mod pallet {&#xD;&#xA;    pub trait Config: pallet1::Config {&#xD;&#xA;        // -- snip --&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		pub fn get_value_directly(_origin: OriginFor&lt;T&gt;) -&gt; Result {&#xD;&#xA;            let value = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;        pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; Result {&#xD;&#xA;            pallet1::MyValue::&lt;T&gt;::put(value);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        pub fn get_value_public_function(_origin: OriginFor&lt;T&gt;) -&gt; Result {&#xD;&#xA;            let value = pallet1::Pallet::&lt;T&gt;::get_value();&#xD;&#xA;			Ok(())&#xD;&#xA;        }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="97" PostHistoryTypeId="2" PostId="30" RevisionGUID="02ab167e-8134-4c23-8b53-dfab2b1b9208" CreationDate="2022-02-08T22:10:25.547" UserId="85" Text="If your making a rust program then using subtx crate might be your best bet:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/subxt&#xD;&#xA;&#xD;&#xA;For example here is how to call the api:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    let api = ClientBuilder::new()&#xD;&#xA;        .build()&#xD;&#xA;        .await?&#xD;&#xA;        .to_runtime_api::&lt;polkadot::RuntimeApi&lt;DefaultConfig, DefaultExtra&lt;DefaultConfig&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;    let mut iter = api.storage().system().account_iter(None).await?;&#xD;&#xA;&#xD;&#xA;    while let Some((key, account)) = iter.next().await? {&#xD;&#xA;        println!(&quot;{}: {}&quot;, hex::encode(key), account.data.free);&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;https://github.com/paritytech/subxt/blob/master/examples/examples/fetch_all_accounts.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="99" PostHistoryTypeId="2" PostId="31" RevisionGUID="c4423a84-c129-468d-96d8-1d13c18074ee" CreationDate="2022-02-08T22:26:43.010" UserId="85" Text="You can turn your substrate into being as close as possible to ethereum by adopting ethereum conventions for example changing address types to match. But if you do that, those addresses need a translation step when talking to other parachains (not a problem if you have a solo chain). It's a question of trade offs and finding a happy medium.&#xD;&#xA;&#xD;&#xA;There was a fantastic walk-though of how to create a compatible chain at sub0:&#xD;&#xA;&#xD;&#xA;https://www.youtube.com/watch?v=V9KfvhoqLJ4&#xD;&#xA;&#xD;&#xA;(It's intense but an amazing demonstration of the flexibility that the generics gives you)&#xD;&#xA;&#xD;&#xA;Remember the other option which may be more appropriate to your use case is rather than doing all the work to build an EVM compatible chain, you could build on one of the existing EVM compatible chain platforms like Moonbeam, Acala or Astar for example that each have chosen different tradeoffs on EVM compatibility." ContentLicense="CC BY-SA 4.0" />
  <row Id="101" PostHistoryTypeId="2" PostId="32" RevisionGUID="50de143f-f9f9-4bae-ba41-dcc3ed378707" CreationDate="2022-02-08T22:38:01.697" UserId="14" Text="Besides the `Polkadot JS APIs`, I would also recommend to use [py-substrate-interface](https://github.com/polkascan/py-substrate-interface).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pip install substrate-interface&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;from substrateinterface import SubstrateInterface, Keypair&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;substrate = SubstrateInterface(url='ws://127.0.0.1:9944')&#xD;&#xA;# or&#xD;&#xA;# substrate = SubstrateInterface(url='wss://rpc.polkadot.io')&#xD;&#xA;# substrate = SubstrateInterface(url='wss://kusama-rpc.polkadot.io')&#xD;&#xA;&#xD;&#xA;alice = Keypair.create_from_uri('//Alice')&#xD;&#xA;bob = Keypair.create_from_uri('//Bob')&#xD;&#xA;&#xD;&#xA;# Transfer funds to Bob&#xD;&#xA;call = substrate.compose_call(&#xD;&#xA;	call_module='Balances',&#xD;&#xA;	call_function='transfer',&#xD;&#xA;	call_params={&#xD;&#xA;		'dest': bob.ss58_address,&#xD;&#xA;		'value': 1 * 10**12&#xD;&#xA;	}&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;# Sign with Alice&#xD;&#xA;extrinsic = substrate.create_signed_extrinsic(call=call, keypair=alice)&#xD;&#xA;&#xD;&#xA;# Submit the txn&#xD;&#xA;receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)&#xD;&#xA;&#xD;&#xA;print(f'Extrinsic: {extrinsic}')&#xD;&#xA;print(f'Status   : {receipt.is_success}')&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="103" PostHistoryTypeId="2" PostId="33" RevisionGUID="16d30f5f-27a2-4292-a734-ecfe4c09993e" CreationDate="2022-02-08T22:58:50.537" UserId="85" Text="If I want to play about with cross-chain messaging (xcm) what's the best way to get an environment up and running?" ContentLicense="CC BY-SA 4.0" />
  <row Id="105" PostHistoryTypeId="1" PostId="33" RevisionGUID="16d30f5f-27a2-4292-a734-ecfe4c09993e" CreationDate="2022-02-08T22:58:50.537" UserId="85" Text="What's the easiest way to set up a relay chain locally with a couple of parachains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="106" PostHistoryTypeId="3" PostId="33" RevisionGUID="16d30f5f-27a2-4292-a734-ecfe4c09993e" CreationDate="2022-02-08T22:58:50.537" UserId="85" Text="|polkadot|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="107" PostHistoryTypeId="2" PostId="34" RevisionGUID="d4c91a6c-0b1c-4bd6-a5f8-cf514a2b5c6b" CreationDate="2022-02-08T22:58:50.537" UserId="85" Text="One option is polkadot-launch ( https://github.com/paritytech/polkadot-launch ), which will mount parachains for you into the relay chain.&#xD;&#xA;&#xD;&#xA;For building the relay chain using the `cargo build --release --fast-runtime` (there is a `--profile production` rather than `--release` but the `lto` means that takes a lot longer to compile)&#xD;&#xA;&#xD;&#xA;The mounting process that polka-launch uses assumes that the sudo pallet is included in the relay chain. At the moment there is no flag to achieve this - you will have to add it into the runtime lib.rs manually.&#xD;&#xA;&#xD;&#xA;The relay-chain and the parachains have embedded in them the runtime wasm blob, but you can provide an alternative in raw json format if you want to start from an earlier version of the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="109" PostHistoryTypeId="2" PostId="35" RevisionGUID="0b7df7ce-c5fb-4fe3-a9d3-c1f5ff7baea2" CreationDate="2022-02-08T23:23:51.980" UserId="85" Text="If we want to ask lots of queries about chain state (for example users activity over time etc.) is there a recommended or de-facto way of doing it? Ethereum has 'the graph' for example as a high performance way to interrogate the state.&#xD;&#xA;&#xD;&#xA;(Bonus points awarded for services that provide predictable performance under heavy load)" ContentLicense="CC BY-SA 4.0" />
  <row Id="111" PostHistoryTypeId="1" PostId="35" RevisionGUID="0b7df7ce-c5fb-4fe3-a9d3-c1f5ff7baea2" CreationDate="2022-02-08T23:23:51.980" UserId="85" Text="Is there a good indexer for substrate chains (like the graph)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="112" PostHistoryTypeId="3" PostId="35" RevisionGUID="0b7df7ce-c5fb-4fe3-a9d3-c1f5ff7baea2" CreationDate="2022-02-08T23:23:51.980" UserId="85" Text="|indexers|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="114" PostHistoryTypeId="4" PostId="17" RevisionGUID="421f16ba-7ed9-4f65-8828-8b35b1cb18d9" CreationDate="2022-02-09T01:55:32.033" UserId="85" Comment="make it clear it is about from rust cilent code" Text="How to call extrinsic functions externally from rust?" ContentLicense="CC BY-SA 4.0" />
  <row Id="115" PostHistoryTypeId="6" PostId="17" RevisionGUID="421f16ba-7ed9-4f65-8828-8b35b1cb18d9" CreationDate="2022-02-09T01:55:32.033" UserId="85" Comment="make it clear it is about from rust cilent code" Text="|extrinsic|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="116" PostHistoryTypeId="24" PostId="17" RevisionGUID="421f16ba-7ed9-4f65-8828-8b35b1cb18d9" CreationDate="2022-02-09T01:55:32.033" Comment="Proposed by 85 approved by 10 edit id of 5" ContentLicense="CC BY-SA 4.0" />
  <row Id="118" PostHistoryTypeId="2" PostId="36" RevisionGUID="55dedfa9-e869-4e6e-9da3-e4f15cced69e" CreationDate="2022-02-09T03:42:38.767" UserId="17" Text="The [Substrate Node Template](https://github.com/substrate-developer-hub/substrate-node-template) says in the &quot;Run&quot; section of the README, that the single-node development chain will start with &quot;non-persistent state&quot; if run with the following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo run --release --dev --tmp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The Substrate Node's `--help` file says `--dev` specifies the development chain and sets, among other things, the `--tmp` flag.&#xD;&#xA;&#xD;&#xA;But, what is `--tmp` is supposed to do? The node seems to run fine with only `--dev`. I can't find `--tmp` in `--help` either.&#xD;&#xA;&#xD;&#xA;Also, if `--help` is accurate, then the `--tmp` doesn't need to be specified alongside `--dev`, and that may just be a mistake in the README?" ContentLicense="CC BY-SA 4.0" />
  <row Id="120" PostHistoryTypeId="1" PostId="36" RevisionGUID="55dedfa9-e869-4e6e-9da3-e4f15cced69e" CreationDate="2022-02-09T03:42:38.767" UserId="17" Text="What does the `--tmp` flag do when running the Substrate Node Template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="121" PostHistoryTypeId="3" PostId="36" RevisionGUID="55dedfa9-e869-4e6e-9da3-e4f15cced69e" CreationDate="2022-02-09T03:42:38.767" UserId="17" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="122" PostHistoryTypeId="2" PostId="37" RevisionGUID="49d43e4d-31d4-47b9-a02f-0763707f281a" CreationDate="2022-02-09T04:03:18.350" UserId="104" Text="XCM, being the cross-chain (or more appropriately, cross-consensus) protocol designed to pass messages between disparate blockchains or consensus systems, has the ability to transfer crypto-assets, how exactly can I utilize XCM to do so?" ContentLicense="CC BY-SA 4.0" />
  <row Id="124" PostHistoryTypeId="1" PostId="37" RevisionGUID="49d43e4d-31d4-47b9-a02f-0763707f281a" CreationDate="2022-02-09T04:03:18.350" UserId="104" Text="How can I transfer assets using XCM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="125" PostHistoryTypeId="3" PostId="37" RevisionGUID="49d43e4d-31d4-47b9-a02f-0763707f281a" CreationDate="2022-02-09T04:03:18.350" UserId="104" Text="|xcm|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="126" PostHistoryTypeId="2" PostId="38" RevisionGUID="17a1a6f0-f237-42a4-afee-305e9274c248" CreationDate="2022-02-09T04:03:18.350" UserId="104" Text="There are two main ways in which assets are transferred between consensus systems in XCM. They are namely via **Asset Teleportation** or via **Reserve Asset Transfers**.&#xD;&#xA;&#xD;&#xA;First of all, a preamble -- XCM instructions are always going to be interpreted according to the consensus system that executes them, and so for all of the instructions that I am going to explain below, *always* remember that the exact behaviour may change depending on which consensus system processes them. What I would hence be describing are the basic behaviours that you can expect each consensus system to possess, regardless of their peculiarities.&#xD;&#xA;&#xD;&#xA;With that said, I am going to describe the intricacies with the two asset transfer models below.&#xD;&#xA;&#xD;&#xA;# Asset Teleportation #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Asset Teleportation][1]][1]&#xD;&#xA;&#xD;&#xA;We start with the easier and more straightforward of the two -- Asset Teleportation. As you can see from the diagram above, there are only 2 actors within this model: the source and the destination. The way in which we transfer assets between the source and the destination are briefly summarized in the numbered labels on the diagram, and are explained in more detail below:&#xD;&#xA;&#xD;&#xA;### 1. InitiateTeleport ###&#xD;&#xA;The source gathers the assets to be teleported from the sending account and **burns** them, taking note of the total amount of assets burned.&#xD;&#xA;&#xD;&#xA;### 2. ReceiveTeleportedAssets ###&#xD;&#xA;The source then creates an XCM instruction called &quot;ReceiveTeleportedAssets&quot; and puts the amount of burned assets and the receiving account as parameters to this instruction. It then sends this instruction over to the destination, where it gets processed and new assets gets **minted** accordingly to the amount burned.&#xD;&#xA;&#xD;&#xA;### 3. DepositAsset ###&#xD;&#xA;The destination then deposits the newly minted assets to the receiving account of the asset.&#xD;&#xA;&#xD;&#xA;The words **burns** and **minted** are highlighted above to give a hint on the disadvantages of this model -- it requires both the source and destination of have a high level of mutual trust. The destination must trust that the source has appropriately burned the assets that was sent over, and the source must also trust the destination to mint the assets that was burned. **Failing to uphold either of these two conditions will result in a change in the asset's total issuance (in the case of fungible tokens) or a complete loss/duplication of an NFT.**&#xD;&#xA;&#xD;&#xA;# Reserve Asset Transfer #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Reserve Asset Transfer][2]][2]&#xD;&#xA;&#xD;&#xA;For consensus systems that don't have the level of trust required for asset teleportation, they can instead opt for trusting a 3rd entity called the reserve to store the real assets (think Statemine on Kusama or Statemint on Polkadot). What this entails is that the source and destination will have to create some sort of mechanism to keep track of the assets that they own on the reserve, and this is usually done by minting a new derivative token. As a corollary, both the source and destination must have accounts on the reserve -- we'll refer to such accounts owned by the source/destination as Sovereign Accounts.&#xD;&#xA;&#xD;&#xA;Below are the steps in which a reserve asset transfer undergoes in order to transfer assets from the source to the destination:&#xD;&#xA;&#xD;&#xA;### 1. InitiateReserveWithdraw ###&#xD;&#xA;The source gathers the derivative assets to be transferred from the sending account and burns them, taking note of the amount of derivatives that were burned.&#xD;&#xA;&#xD;&#xA;### 2. WithdrawAsset ###&#xD;&#xA;The source sends a WithdrawAsset instruction to the reserve, instructing the reserve to withdraw assets equivalent to the amount of derivatives burned from the source's sovereign account.&#xD;&#xA;&#xD;&#xA;### 3. DepositReserveAsset ###&#xD;&#xA;The reserve deposits the assets withdrawn from the previous step to the destination's sovereign account, taking note of the amount of assets deposited.&#xD;&#xA;&#xD;&#xA;### 4. ReserveAssetDeposited ###&#xD;&#xA;The reserve creates a ReserveAssetDeposited instruction with the amount of assets deposited to the destination's sovereign account, and sends this instruction onwards to the destination. The destination receives the instruction and processes it, minting the derivative assets as a result of the process.&#xD;&#xA;&#xD;&#xA;### 5. DepositAsset ###&#xD;&#xA;The destination deposits the derivative assets minted to the receiving account.&#xD;&#xA;&#xD;&#xA;The addition of a 3rd consensus system is already a hint of the disadvantages of a reserve asset transfer model -- firstly, the reserve could easily become a point of centralization when too many consensus systems rely on it to be the reserve of choice for their assets; secondly, the sheer amount of steps required necessarily makes it more prone to errors, and as such, implementors will have to consider more possible pitfalls and provide technical support accordingly when an end user encounters issues arising from these steps. Last but not least, either of the source or destination can opt to designate multiple consensus systems to be their reserves, and in such a situation, care must be taken in order to ensure that the sovereign account on the reserves are balanced, so that one doesn't get all drained while the others still contain a healthy balance.&#xD;&#xA;&#xD;&#xA;# Summary&#xD;&#xA;&#xD;&#xA;Despite being more complex, consensus systems often will first pick the reserve asset transfer model over asset teleportation, due to the trust issues discussed. However, we could imagine that as the source and destination continue to prove themselves to be trustworthy and cooperative on the reserve, they could then negotiate for an asset teleportation agreement and switch over to that entirely. As such, we could in fact think of the reserve asset model as a way to establish a baseline of trust between the source and destination. Whether or not the source and destination will move beyond it is up to them to decide.&#xD;&#xA;&#xD;&#xA;For further reading of XCMs in general, Gavin [has][3] [plenty of][4] [blogposts][5] that describe each component of the XCM in detail. Shawn also [has an excellent video][6] describing how you can craft your first cross-chain messages. Finally, there is also [the XCM specification][7] that is the definitive source of truth on any matters related to XCM.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JLfQp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/PC6Lm.png&#xD;&#xA;  [3]: https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392#cb6d&#xD;&#xA;  [4]: https://medium.com/polkadot-network/xcm-part-ii-versioning-and-compatibility-b313fc257b83&#xD;&#xA;  [5]: https://medium.com/polkadot-network/xcm-part-iii-execution-and-error-management-ceb8155dd166&#xD;&#xA;  [6]: https://www.youtube.com/watch?v=5cgq5jOZx9g&#xD;&#xA;  [7]: https://github.com/paritytech/xcm-format" ContentLicense="CC BY-SA 4.0" />
  <row Id="130" PostHistoryTypeId="2" PostId="40" RevisionGUID="50c8c5c8-b0e1-4948-8ee3-79d2b8d4697c" CreationDate="2022-02-09T04:20:12.047" UserId="135" Text="--tmp means it runs a temporary node. And it stop when you close the terminal. This way you could run your development mode without purging the data. " ContentLicense="CC BY-SA 4.0" />
  <row Id="133" PostHistoryTypeId="2" PostId="41" RevisionGUID="3ac1ee89-30ba-49c9-b02f-90ab3f2b884b" CreationDate="2022-02-09T04:22:34.750" UserId="129" Text="When creating a blockchain node, I noticed that there are predefined accounts with a bunch of balances. Does everyone on my blockchain have access to these accounts? And how do I remove them?" ContentLicense="CC BY-SA 4.0" />
  <row Id="135" PostHistoryTypeId="1" PostId="41" RevisionGUID="3ac1ee89-30ba-49c9-b02f-90ab3f2b884b" CreationDate="2022-02-09T04:22:34.750" UserId="129" Text="What are the predefined accounts (ALICE, BOB, etc)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="136" PostHistoryTypeId="3" PostId="41" RevisionGUID="3ac1ee89-30ba-49c9-b02f-90ab3f2b884b" CreationDate="2022-02-09T04:22:34.750" UserId="129" Text="|blockchain|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="138" PostHistoryTypeId="2" PostId="42" RevisionGUID="a2982c61-6710-43c8-a199-3164b5804402" CreationDate="2022-02-09T04:58:52.073" UserId="139" Text="In the pallet_babe config one can see the type KeyOwnerProofSystem as being set to Historical which is a reference to pallet_session::historical.&#xD;&#xA;&#xD;&#xA;What functions does a KeyProofSystem serve? What is it &quot;proving&quot; and for whom? " ContentLicense="CC BY-SA 4.0" />
  <row Id="140" PostHistoryTypeId="1" PostId="42" RevisionGUID="a2982c61-6710-43c8-a199-3164b5804402" CreationDate="2022-02-09T04:58:52.073" UserId="139" Text="What is the KeyOwnerProofSystem in babe config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="141" PostHistoryTypeId="3" PostId="42" RevisionGUID="a2982c61-6710-43c8-a199-3164b5804402" CreationDate="2022-02-09T04:58:52.073" UserId="139" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="142" PostHistoryTypeId="2" PostId="43" RevisionGUID="5b4ae3e0-a6d7-4f38-8fd8-1c451ab4a7b6" CreationDate="2022-02-09T05:35:31.170" UserId="143" Text="i need to store the chain state after some interval and start it with new genesis how i can do that,please read this [issue][1] for reference  &#xD;&#xA;also is there any other way to achieve this expect re-genesis.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/7458" ContentLicense="CC BY-SA 4.0" />
  <row Id="144" PostHistoryTypeId="1" PostId="43" RevisionGUID="5b4ae3e0-a6d7-4f38-8fd8-1c451ab4a7b6" CreationDate="2022-02-09T05:35:31.170" UserId="143" Text="How to do regenesis in a running substrate chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="145" PostHistoryTypeId="3" PostId="43" RevisionGUID="5b4ae3e0-a6d7-4f38-8fd8-1c451ab4a7b6" CreationDate="2022-02-09T05:35:31.170" UserId="143" Text="|untagged|" ContentLicense="CC BY-SA 4.0" />
  <row Id="146" PostHistoryTypeId="2" PostId="44" RevisionGUID="d8e40a92-3713-4b04-9423-4ec5f2d50961" CreationDate="2022-02-09T05:38:53.107" UserId="140" Text="Which pallet would be good to manage native token? Is it Asset Pallet or Balance Pallet?&#xD;&#xA;&#xD;&#xA;We can transfer fund against any token using Asset Pallet. But would it make sense to use Asset pallet for transferring fund against native token? Is there any example?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="148" PostHistoryTypeId="1" PostId="44" RevisionGUID="d8e40a92-3713-4b04-9423-4ec5f2d50961" CreationDate="2022-02-09T05:38:53.107" UserId="140" Text="How to manage native token in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="149" PostHistoryTypeId="3" PostId="44" RevisionGUID="d8e40a92-3713-4b04-9423-4ec5f2d50961" CreationDate="2022-02-09T05:38:53.107" UserId="140" Text="|substrate-node-template|substarte|" ContentLicense="CC BY-SA 4.0" />
  <row Id="150" PostHistoryTypeId="2" PostId="45" RevisionGUID="df0e2fc0-acbd-4235-b261-2c1f90161342" CreationDate="2022-02-09T05:41:18.697" UserId="139" Text="According to [substrate rpc docs][1] we shouldn't be exposing some RPCs as they are deemed dangerous. How does one go about turning them off? &#xD;&#xA;&#xD;&#xA;Currently if I query my node, I have all those RPCs running which substrate warns against. &#xD;&#xA;[![dangerous rpcs][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/custom-rpcs/&#xD;&#xA;  [2]: https://i.stack.imgur.com/zSfTt.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="152" PostHistoryTypeId="1" PostId="45" RevisionGUID="df0e2fc0-acbd-4235-b261-2c1f90161342" CreationDate="2022-02-09T05:41:18.697" UserId="139" Text="How to turn off certain RPCs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="153" PostHistoryTypeId="3" PostId="45" RevisionGUID="df0e2fc0-acbd-4235-b261-2c1f90161342" CreationDate="2022-02-09T05:41:18.697" UserId="139" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="154" PostHistoryTypeId="2" PostId="46" RevisionGUID="752463ef-1e83-42c6-adfa-bd5945139e95" CreationDate="2022-02-09T05:53:07.777" UserId="116" Text="Using [this guide][1] to integrate `try-runtime` on my node i get the error about get random not building for wasm.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /home/simson/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.3/src/lib.rs:219:9&#xD;&#xA;      |&#xD;&#xA;  219 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  220 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  221 | |                         For more information see: \&#xD;&#xA;  222 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /home/simson/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.3/src/lib.rs:246:5&#xD;&#xA;      |&#xD;&#xA;  246 |     imp::getrandom_inner(dest)&#xD;&#xA;      |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get this error when I enable `frame-try-runtime` on the second line below (In `[features]` section of `runtime/Cargo.toml`) &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;try-runtime = [&#xD;&#xA;    &quot;frame-executive/try-runtime&quot;,&#xD;&#xA;    &quot;frame-try-runtime&quot;,&#xD;&#xA;    &quot;frame-system/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I suspect the root cause of this is not related to wasm but rather that some dependency is leaking std code into the wasm build. What kind of miss-configuration should I be looking for to find this problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/how-to-guides/v3/tools/try-runtime/" ContentLicense="CC BY-SA 4.0" />
  <row Id="156" PostHistoryTypeId="1" PostId="46" RevisionGUID="752463ef-1e83-42c6-adfa-bd5945139e95" CreationDate="2022-02-09T05:53:07.777" UserId="116" Text="&quot;wasm32-unknown-unknown target is not supported&quot;-error while integrating try-runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="157" PostHistoryTypeId="3" PostId="46" RevisionGUID="752463ef-1e83-42c6-adfa-bd5945139e95" CreationDate="2022-02-09T05:53:07.777" UserId="116" Text="|try-runtime|substate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="158" PostHistoryTypeId="2" PostId="47" RevisionGUID="ffba3d85-21b6-4213-b29a-dd34bb17984c" CreationDate="2022-02-09T06:02:56.303" UserId="116" Text="In `node/src/chain_spec.rs` you will find the functions `local_testnet_config`&#xD;&#xA; and `development_config` which contains lines like these&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				wasm_binary,&#xD;&#xA;				// Initial PoA authorities&#xD;&#xA;				vec![authority_keys_from_seed(&quot;Alice&quot;), authority_keys_from_seed(&quot;Bob&quot;)],&#xD;&#xA;				// Sudo account&#xD;&#xA;				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;				// Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;				],&#xD;&#xA;				true,&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;&#xD;&#xA;Modify this file to create the preseeded and sudo keys you want to use" ContentLicense="CC BY-SA 4.0" />
  <row Id="160" PostHistoryTypeId="2" PostId="48" RevisionGUID="16e239cf-92fe-487b-bbb0-f780b3b053f7" CreationDate="2022-02-09T06:49:02.603" UserId="85" Text="`--tmp` will clear down the state before it starts, so rather than carrying on from the last agreed block it will start from the first block again.&#xD;&#xA;&#xD;&#xA;But in this case it seemingly has no effect, because as of a few months ago `--dev` now implies `--tmp` by default." ContentLicense="CC BY-SA 4.0" />
  <row Id="162" PostHistoryTypeId="2" PostId="49" RevisionGUID="e7c21ba7-8675-4be9-8285-426f97c6e44a" CreationDate="2022-02-09T07:19:51.727" UserId="85" Text="The [Balance pallet][1] is designed to handle a native token of a chain and would count towards [existential deposit][3] (if you choose to have that concept in your chain). &#xD;&#xA;&#xD;&#xA;The [asset pallet][2] is designed to handle a multitude of tokens (these may be configured to not be `sufficient` and thus not count towards existential deposits).&#xD;&#xA;&#xD;&#xA;(It is pretty common to use both in the same runtime. I'm not sure I have seen a chain that uses the asset pallet without also including the balance pallet.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/pallet_balances/index.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/pallet_assets/index.html&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=ZjKpTgxDp_4" ContentLicense="CC BY-SA 4.0" />
  <row Id="164" PostHistoryTypeId="2" PostId="50" RevisionGUID="1cd4a07b-4cce-4dbb-a07c-3dca30c80a2f" CreationDate="2022-02-09T07:29:10.863" UserId="28" Text="For a native token on a Substrate chain you should use the Balances Pallet, not the Assets Pallet.&#xD;&#xA;&#xD;&#xA;The balances pallet is specially optimized to minimize its computational and storage footprint. This means that when using the balances pallet, users will be paying the lowest possible fees and your chain will be using the least amount of weight per transaction.&#xD;&#xA;&#xD;&#xA;Additionally, the Balances Pallet implements a number of core traits needed for a native token like `ReservableCurrency`, `LockableCurrency`, and supports things like vesting via the Vesting Pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="166" PostHistoryTypeId="2" PostId="51" RevisionGUID="91ff5e9b-3488-41a7-80f2-c82ff9a09ddd" CreationDate="2022-02-09T07:34:13.460" UserId="28" Text="Every blockchain maintains some amount of state on the computer which it runs. For example to store information about the history of the blockchain, the current block, the current state, etc...&#xD;&#xA;&#xD;&#xA;When starting a Substrate blockchain with the `--tmp` flag, it will place all of these files into a temporary system folder which will be cleaned up once the program terminates. It would be equivalent to use the `--purge-chain` flag at the end of running your blockchain to delete all of the local files.&#xD;&#xA;&#xD;&#xA;Indeed, if you have the `--dev` flag, you do not need the `--tmp` flag, since developer chains by default are now configured to be temporary by default." ContentLicense="CC BY-SA 4.0" />
  <row Id="168" PostHistoryTypeId="5" PostId="8" RevisionGUID="8908e0c0-99c9-45a5-be6f-11573e87d871" CreationDate="2022-02-09T07:38:59.017" UserId="28" Comment="added 51 characters in body" Text="Substrate is a generalized blockchain development SDK.&#xD;&#xA;&#xD;&#xA;It is written in [Rust](https://www.rust-lang.org/), and has a bunch of different modular and extensible components which make it one of the easiest ways to develop a blockchain.&#xD;&#xA;&#xD;&#xA;Polkadot is just one of the blockchains built using Substrate.&#xD;&#xA;&#xD;&#xA;Polkadot uses the [Polkadot Protocol](https://polkadot.network/technology/) to connect multiple independent blockchains, providing for them scalability, shared security, and interoperability. These connected blockchains are called Parachains.&#xD;&#xA;&#xD;&#xA;Many of the blockchains which connect to Polkadot are also built using Substrate since the Substrate SDK makes it very simple to both develop your custom blockchain and provides [Cumulus](https://github.com/paritytech/cumulus), a set of tools making it easy to convert your Substrate blockchain to a Parachain.&#xD;&#xA;&#xD;&#xA;However, Substrate can be, and has been used to create completely independent blockchains which are not related to Polkadot. For example a Proof of Work blockchain called [Kulupu](https://kulupu.network/).&#xD;&#xA;&#xD;&#xA;While Substrate will always be connected to the Polkadot ecosystem since it shares history with one another, Substrate is designed to be the best blockchain development SDK for any purpose." ContentLicense="CC BY-SA 4.0" />
  <row Id="169" PostHistoryTypeId="2" PostId="52" RevisionGUID="e15b1ea3-9b2f-4c0b-9439-0b52f02f37f2" CreationDate="2022-02-09T07:47:54.717" UserId="28" Text="The Balances pallet supports a Genesis Configuration which allows you to specify a set of accounts and balances that should exist at the genesis of your chain.&#xD;&#xA;&#xD;&#xA;For a developer chain (using `--dev`), most nodes are configured to give genesis balances to a set of default accounts like `Alice`, `Bob`, `Charlie`, `Dave`, `Eve`, and `Ferdie`.&#xD;&#xA;&#xD;&#xA;These accounts are all &quot;well known&quot; and has a documented private key:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;bottom drive obey lake curtain smoke basket hold race lonely fit walk&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So if you want to generate the private key pair for `Alice`, you would would add `//Alice` as a hard derivation key to the seed above:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;bottom drive obey lake curtain smoke basket hold race lonely fit walk//Alice&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To remove these genesis balances from your developer chain, you can modify the `testnet_genesis` in your project, however note that without genesis balances to any of your users, your chain may become locked out, since no one will be able to submit transactions without paying fees.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="171" PostHistoryTypeId="2" PostId="53" RevisionGUID="abd20728-2a43-43c0-90ba-9d3ef44d5d37" CreationDate="2022-02-09T07:55:21.803" UserId="151" Text="There is a bunch of different Substrate client libraries in the [Substrate documentation][1]&#xD;&#xA;&#xD;&#xA;Besides those referenced in the above link, there the [Polkadot Java Client][2].&#xD;&#xA;&#xD;&#xA;There are other ways to interact with a Substrate blockchain, depending on your needs, such as the [Substrate Sidecar API][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/integration/client-libraries/&#xD;&#xA;  [2]: https://github.com/emeraldpay/polkaj&#xD;&#xA;  [3]: https://github.com/paritytech/substrate-api-sidecar" ContentLicense="CC BY-SA 4.0" />
  <row Id="173" PostHistoryTypeId="2" PostId="54" RevisionGUID="9d626071-a5a2-4eb0-af99-1533f80af93d" CreationDate="2022-02-09T08:00:35.983" UserId="28" Text="There are a lot of ways you can dump the existing state of your chain, and use that as the genesis state for a new chain.&#xD;&#xA;&#xD;&#xA;Note that all state for a Substrate chain is simply a key-value pair, so by copying the keys and values into your new chain, you will basically copy the state. You should be a bit careful, things like the current block number, block hash, consensus information, and other things which you DO intend to reset should not be copied over to your new chain.&#xD;&#xA;&#xD;&#xA;Probably the easiest tool to do this for you automatically is: https://github.com/maxsam4/fork-off-substrate&#xD;&#xA;&#xD;&#xA;Which automates the steps of:&#xD;&#xA;&#xD;&#xA;1. grabbing all keys and values from an existing chain&#xD;&#xA;2. cleaning up any keys which you do not want to migrate&#xD;&#xA;3. placing the final key and values into a genesis json that can be used to start your new chain&#xD;&#xA;&#xD;&#xA;You can of course write your own tool to do this quite easily." ContentLicense="CC BY-SA 4.0" />
  <row Id="175" PostHistoryTypeId="2" PostId="55" RevisionGUID="48e976b9-5022-4683-aceb-65a5fe46de3b" CreationDate="2022-02-09T08:11:46.337" UserId="73" Text="Let's say you have found an equivocation for Babe. Aka you are saying that Alice build two blocks on the same height in session 100. You will now need to prove to the runtime that there is an equivocation. You send the [proof][1] to the runtime. While the runtime checks the proof, it needs to ensure that Alice is really part of the validator set in session 100. This check is done using the `KeyProofSystem`. In case of `pallet_session::historical`, it records all the validator sets for the last X sessions (can be configured) to prove these kind of requests.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-consensus-slots/latest/sp_consensus_slots/struct.EquivocationProof.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="177" PostHistoryTypeId="2" PostId="56" RevisionGUID="05c2f335-dff5-4b4c-a7d5-5f438b7c711b" CreationDate="2022-02-09T08:13:35.887" UserId="28" Text="I personally run an Archive node on my computer which has been sufficient for the queries I do, but there are some tools available within the Substrate ecosystem built more specifically for deep queries like you suggest.&#xD;&#xA;&#xD;&#xA; * https://www.joystream.org/hydra/&#xD;&#xA;&#xD;&#xA;&gt; Inspired by The Graph, it gives a smooth way to provide powerful GraphQL queries to app developers over your Substrate blockchain state and history.&#xD;&#xA;&#xD;&#xA; * https://github.com/paritytech/substrate-archive&#xD;&#xA;&#xD;&#xA;&gt; Run alongside a substrate-backed chain to index all Blocks, State, and Extrinsic data into PostgreSQL.&#xD;&#xA;&#xD;&#xA; * https://github.com/playzero/substrate-graph&#xD;&#xA;&#xD;&#xA;&gt; A compact indexer for @paritytech substrate based nodes providing a graphql interface.&#xD;&#xA;&#xD;&#xA; * https://subquery.network/&#xD;&#xA;&#xD;&#xA;&gt; SubQuery is an open source project that allows developers to index, transform, and query Substrate chain data to power their applications.&#xD;&#xA;&#xD;&#xA;And probably more to come!" ContentLicense="CC BY-SA 4.0" />
  <row Id="179" PostHistoryTypeId="2" PostId="57" RevisionGUID="31242996-dfa4-4bbc-a4fa-3faf3ba6e0d1" CreationDate="2022-02-09T08:18:50.567" UserId="73" Text="While these RPCs are available, they are not callable if you &quot;disable&quot; them. If you run with `--rpc-methods Safe` all the rpc methods that are seen as &quot;unsafe&quot; will return an error when being called. For validators it is advised to disable external RPCs anyway, which is the default if you are not running with `--rpc-external`." ContentLicense="CC BY-SA 4.0" />
  <row Id="181" PostHistoryTypeId="6" PostId="42" RevisionGUID="657ca4cf-87a6-4315-9ec5-abf9af9e4127" CreationDate="2022-02-09T08:22:12.667" UserId="28" Comment="editing the tags" Text="|babe|historial|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="182" PostHistoryTypeId="6" PostId="36" RevisionGUID="dd904809-2cc4-45ba-bae7-6508b0aae791" CreationDate="2022-02-09T08:24:11.147" UserId="28" Comment="edited tags" Text="|cli|dev|" ContentLicense="CC BY-SA 4.0" />
  <row Id="183" PostHistoryTypeId="6" PostId="44" RevisionGUID="66e415c4-ae59-4fb1-92c4-c10157959d8a" CreationDate="2022-02-09T08:24:44.230" UserId="28" Comment="editing the tags for real" Text="|balances|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="184" PostHistoryTypeId="6" PostId="3" RevisionGUID="d4d94376-13c0-4570-88ff-93ac9a59f2e5" CreationDate="2022-02-09T08:25:11.217" UserId="28" Comment="edited tags" Text="|polkadot|kusama|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="185" PostHistoryTypeId="2" PostId="58" RevisionGUID="d6b9db79-b7dd-423e-9edd-0d74e97e7c7c" CreationDate="2022-02-09T08:45:46.390" UserId="156" Text="how can the bit country economy interact with other para chains, dot ecosystems and other ecosystem?&#xD;&#xA;&#xD;&#xA;**Blockquote**" ContentLicense="CC BY-SA 4.0" />
  <row Id="187" PostHistoryTypeId="1" PostId="58" RevisionGUID="d6b9db79-b7dd-423e-9edd-0d74e97e7c7c" CreationDate="2022-02-09T08:45:46.390" UserId="156" Text="how can the bitcountry economy interact with other parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="188" PostHistoryTypeId="3" PostId="58" RevisionGUID="d6b9db79-b7dd-423e-9edd-0d74e97e7c7c" CreationDate="2022-02-09T08:45:46.390" UserId="156" Text="|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="189" PostHistoryTypeId="2" PostId="59" RevisionGUID="122520c5-8d8e-4f6a-8ab5-a67fd3fe6d10" CreationDate="2022-02-09T08:59:11.560" UserId="160" Text="All the existing answers outline the differences between Polkadot and Substrate very well: Substrate is a developer kit, a framework to build blockchains, whereas Polkadot is a specific protocol implementation.&#xD;&#xA;&#xD;&#xA;Notably, Polkadot uses Substrate; however, the Polkadot Rust client existed technically _before_ Substrate was released.&#xD;&#xA;&#xD;&#xA;While the Parity team was working on Polkadot, they realized many components they implemented would have to be abstracted and implemented by many other teams building on Polkadot in the future. Thus, they went the extra mile to spin out early abstracted versions of the Polkadot client that they called Substrate and was made available to other teams and Polakdot-curious developers.&#xD;&#xA;&#xD;&#xA;Apparently, one of the first teams to build on Substrate early on was Edgeware." ContentLicense="CC BY-SA 4.0" />
  <row Id="194" PostHistoryTypeId="2" PostId="60" RevisionGUID="b7ea866b-5d9a-4f3e-ae8b-4e70fe79890b" CreationDate="2022-02-09T09:25:21.807" UserId="160" Text="[Gossamer](https://github.com/ChainSafe/gossamer) is a Go-lang implementation of the Polkadot host. What does this mean, and how does this compare to Substrate?&#xD;&#xA;&#xD;&#xA;Could Gossamer be the Go-variant of Substrate for developers exploring ecosystems that do not primarily target Rust?" ContentLicense="CC BY-SA 4.0" />
  <row Id="196" PostHistoryTypeId="1" PostId="60" RevisionGUID="b7ea866b-5d9a-4f3e-ae8b-4e70fe79890b" CreationDate="2022-02-09T09:25:21.807" UserId="160" Text="What is Gossamer and how does it compare to Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="197" PostHistoryTypeId="3" PostId="60" RevisionGUID="b7ea866b-5d9a-4f3e-ae8b-4e70fe79890b" CreationDate="2022-02-09T09:25:21.807" UserId="160" Text="|polkadot|kusama|rust|gossamer|go|" ContentLicense="CC BY-SA 4.0" />
  <row Id="198" PostHistoryTypeId="2" PostId="61" RevisionGUID="7b3f6dba-f529-4485-9846-aefa75cafe95" CreationDate="2022-02-09T09:27:25.490" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="200" PostHistoryTypeId="1" PostId="61" RevisionGUID="7b3f6dba-f529-4485-9846-aefa75cafe95" CreationDate="2022-02-09T09:27:25.490" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="201" PostHistoryTypeId="2" PostId="62" RevisionGUID="82dfaf29-872b-4788-9953-d353e083bf48" CreationDate="2022-02-09T09:27:25.490" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="203" PostHistoryTypeId="1" PostId="62" RevisionGUID="82dfaf29-872b-4788-9953-d353e083bf48" CreationDate="2022-02-09T09:27:25.490" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="204" PostHistoryTypeId="2" PostId="63" RevisionGUID="25f5129b-e159-4b30-ac1c-234f2c1459b0" CreationDate="2022-02-09T09:28:39.133" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="206" PostHistoryTypeId="1" PostId="63" RevisionGUID="25f5129b-e159-4b30-ac1c-234f2c1459b0" CreationDate="2022-02-09T09:28:39.133" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="207" PostHistoryTypeId="2" PostId="64" RevisionGUID="1d28bbaf-48f7-4501-be6c-e31a98007585" CreationDate="2022-02-09T09:28:39.133" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="209" PostHistoryTypeId="1" PostId="64" RevisionGUID="1d28bbaf-48f7-4501-be6c-e31a98007585" CreationDate="2022-02-09T09:28:39.133" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="210" PostHistoryTypeId="2" PostId="65" RevisionGUID="d9ef0384-c4ef-4adf-9a1a-79471179d740" CreationDate="2022-02-09T09:30:07.530" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="212" PostHistoryTypeId="1" PostId="65" RevisionGUID="d9ef0384-c4ef-4adf-9a1a-79471179d740" CreationDate="2022-02-09T09:30:07.530" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="213" PostHistoryTypeId="2" PostId="66" RevisionGUID="0bec9173-be58-4088-9d1c-6af02afa0d14" CreationDate="2022-02-09T09:30:07.530" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="215" PostHistoryTypeId="1" PostId="66" RevisionGUID="0bec9173-be58-4088-9d1c-6af02afa0d14" CreationDate="2022-02-09T09:30:07.530" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="216" PostHistoryTypeId="2" PostId="67" RevisionGUID="076bfb0c-506b-4028-809c-038cd6bcaa2a" CreationDate="2022-02-09T09:31:47.207" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="218" PostHistoryTypeId="1" PostId="67" RevisionGUID="076bfb0c-506b-4028-809c-038cd6bcaa2a" CreationDate="2022-02-09T09:31:47.207" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="219" PostHistoryTypeId="2" PostId="68" RevisionGUID="246d37ff-87f5-4f38-a68c-2ba310f2ff26" CreationDate="2022-02-09T09:31:47.207" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="221" PostHistoryTypeId="1" PostId="68" RevisionGUID="246d37ff-87f5-4f38-a68c-2ba310f2ff26" CreationDate="2022-02-09T09:31:47.207" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="222" PostHistoryTypeId="2" PostId="69" RevisionGUID="67142f30-0313-4b21-81f4-db85f2afe1d5" CreationDate="2022-02-09T09:35:53.527" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="224" PostHistoryTypeId="1" PostId="69" RevisionGUID="67142f30-0313-4b21-81f4-db85f2afe1d5" CreationDate="2022-02-09T09:35:53.527" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="225" PostHistoryTypeId="2" PostId="70" RevisionGUID="da5ea3f1-c05c-4b93-96ee-0f8fac75a377" CreationDate="2022-02-09T09:35:53.527" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="227" PostHistoryTypeId="1" PostId="70" RevisionGUID="da5ea3f1-c05c-4b93-96ee-0f8fac75a377" CreationDate="2022-02-09T09:35:53.527" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="228" PostHistoryTypeId="2" PostId="71" RevisionGUID="3079302a-6676-4f0a-a5bc-56d27e1f8783" CreationDate="2022-02-09T11:06:14.723" UserId="183" Text="For example, when connecting to polkadot/kusama, can we use some sort of DB snapshot like [polkashots][1] to bypass the long waiting time?&#xD;&#xA;&#xD;&#xA;However, it requires the non-archive mode in the relaychain command line, e.g. `--unsafe-pruning --pruning=1000`, is it safe to use it? Or can it bring about any negative effect given that the states that are older than 1000 blocks were pruned?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkashots.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="230" PostHistoryTypeId="1" PostId="71" RevisionGUID="3079302a-6676-4f0a-a5bc-56d27e1f8783" CreationDate="2022-02-09T11:06:14.723" UserId="183" Text="Is it safe to use non-archive mode when starting a parachain collator?" ContentLicense="CC BY-SA 4.0" />
  <row Id="231" PostHistoryTypeId="3" PostId="71" RevisionGUID="3079302a-6676-4f0a-a5bc-56d27e1f8783" CreationDate="2022-02-09T11:06:14.723" UserId="183" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="232" PostHistoryTypeId="10" PostId="26" RevisionGUID="6941785a-1c00-4ce1-a27a-2ab8bf6fd6a2" CreationDate="2022-02-09T11:07:22.883" UserId="178" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:178,&quot;DisplayName&quot;:&quot;JNat&quot;}]}" />
  <row Id="233" PostHistoryTypeId="5" PostId="67" RevisionGUID="5236379c-ae67-4eae-b44f-d6e36c1b606f" CreationDate="2022-02-09T11:07:55.807" UserId="160" Comment="added 201 characters in body" Text="The Kusama network is a sister network to Polkadot. It's not a testnet but considered less stable than the parent network and therefore often referred to as _canary network_.&#xD;&#xA;&#xD;&#xA;https://kusama.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="234" PostHistoryTypeId="24" PostId="67" RevisionGUID="5236379c-ae67-4eae-b44f-d6e36c1b606f" CreationDate="2022-02-09T11:07:55.807" Comment="Proposed by 160 approved by 178 edit id of 19" ContentLicense="CC BY-SA 4.0" />
  <row Id="235" PostHistoryTypeId="5" PostId="44" RevisionGUID="f20c9563-f940-403d-9ee4-1403d15774e5" CreationDate="2022-02-09T11:08:21.597" UserId="2" Comment="typos corrected" Text="Which pallet would be good to manage native tokens? Is it Asset Pallet or Balance Pallet?&#xD;&#xA;&#xD;&#xA;We can transfer funds against any token using Asset Pallet. But would it make sense to use Asset Pallet for transferring funds against native tokens? Is there any example?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="236" PostHistoryTypeId="4" PostId="44" RevisionGUID="f20c9563-f940-403d-9ee4-1403d15774e5" CreationDate="2022-02-09T11:08:21.597" UserId="2" Comment="typos corrected" Text="How to manage native tokens in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="237" PostHistoryTypeId="24" PostId="44" RevisionGUID="f20c9563-f940-403d-9ee4-1403d15774e5" CreationDate="2022-02-09T11:08:21.597" Comment="Proposed by 2 approved by 178 edit id of 12" ContentLicense="CC BY-SA 4.0" />
  <row Id="238" PostHistoryTypeId="4" PostId="42" RevisionGUID="56b2db1b-4b83-4282-b122-69afad4347a3" CreationDate="2022-02-09T11:08:28.923" UserId="151" Comment="BABE is an acronym" Text="What is the KeyOwnerProofSystem in BABE config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="239" PostHistoryTypeId="24" PostId="42" RevisionGUID="56b2db1b-4b83-4282-b122-69afad4347a3" CreationDate="2022-02-09T11:08:28.923" Comment="Proposed by 151 approved by 178 edit id of 10" ContentLicense="CC BY-SA 4.0" />
  <row Id="240" PostHistoryTypeId="5" PostId="69" RevisionGUID="66e03bc5-d761-428f-99dc-5a6fca7b0f7d" CreationDate="2022-02-09T11:08:39.140" UserId="160" Comment="added 164 characters in body" Text="Polkadot is an open-source, multi-blockchain platform. The Polkadot network allows arbitrary data to be transferred across blockchains.&#xD;&#xA;&#xD;&#xA;https://polkadot.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="241" PostHistoryTypeId="24" PostId="69" RevisionGUID="66e03bc5-d761-428f-99dc-5a6fca7b0f7d" CreationDate="2022-02-09T11:08:39.140" Comment="Proposed by 160 approved by 178 edit id of 21" ContentLicense="CC BY-SA 4.0" />
  <row Id="242" PostHistoryTypeId="5" PostId="58" RevisionGUID="018fb98d-92c0-40ad-8b48-477b74428b0a" CreationDate="2022-02-09T11:08:50.540" UserId="151" Comment="Formatting and clearer text" Text="how can the Bit Country economy interact with other para chains, dot ecosystems and other ecosystem?" ContentLicense="CC BY-SA 4.0" />
  <row Id="243" PostHistoryTypeId="4" PostId="58" RevisionGUID="018fb98d-92c0-40ad-8b48-477b74428b0a" CreationDate="2022-02-09T11:08:50.540" UserId="151" Comment="Formatting and clearer text" Text="How can the BitCountry economy interact with other parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="244" PostHistoryTypeId="24" PostId="58" RevisionGUID="018fb98d-92c0-40ad-8b48-477b74428b0a" CreationDate="2022-02-09T11:08:50.540" Comment="Proposed by 151 approved by 178 edit id of 9" ContentLicense="CC BY-SA 4.0" />
  <row Id="245" PostHistoryTypeId="5" PostId="63" RevisionGUID="4c8c364a-c7d6-4c11-ad69-965131d35516" CreationDate="2022-02-09T11:10:16.643" UserId="160" Comment="added 105 characters in body" Text="Go is an open-source programming language initially developed and supported by Google.&#xD;&#xA;&#xD;&#xA;https://go.dev/" ContentLicense="CC BY-SA 4.0" />
  <row Id="246" PostHistoryTypeId="24" PostId="63" RevisionGUID="4c8c364a-c7d6-4c11-ad69-965131d35516" CreationDate="2022-02-09T11:10:16.643" Comment="Proposed by 160 approved by 178 edit id of 15" ContentLicense="CC BY-SA 4.0" />
  <row Id="247" PostHistoryTypeId="5" PostId="61" RevisionGUID="e2427660-e75e-4865-9a61-a15454142ff5" CreationDate="2022-02-09T11:10:45.913" UserId="160" Comment="added 126 characters in body" Text="A Go implementation of the Polkadot Host developed and released by ChainSafe Systems.&#xD;&#xA;&#xD;&#xA;https://github.com/ChainSafe/gossamer" ContentLicense="CC BY-SA 4.0" />
  <row Id="248" PostHistoryTypeId="24" PostId="61" RevisionGUID="e2427660-e75e-4865-9a61-a15454142ff5" CreationDate="2022-02-09T11:10:45.913" Comment="Proposed by 160 approved by 178 edit id of 13" ContentLicense="CC BY-SA 4.0" />
  <row Id="249" PostHistoryTypeId="5" PostId="65" RevisionGUID="33d8894d-766d-4880-9ead-9186b44f7f05" CreationDate="2022-02-09T11:11:15.413" UserId="160" Comment="added 264 characters in body" Text="Rust is a general-purpose programming language designed for performance and safety, especially safe concurrency. Rust is syntactically similar to C++ but can guarantee memory safety by using a borrow checker for validating references.&#xD;&#xA;&#xD;&#xA;https://www.rust-lang.org/" ContentLicense="CC BY-SA 4.0" />
  <row Id="250" PostHistoryTypeId="24" PostId="65" RevisionGUID="33d8894d-766d-4880-9ead-9186b44f7f05" CreationDate="2022-02-09T11:11:15.413" Comment="Proposed by 160 approved by 178 edit id of 17" ContentLicense="CC BY-SA 4.0" />
  <row Id="251" PostHistoryTypeId="5" PostId="34" RevisionGUID="f3ae43de-605d-4a77-97fa-85e0460d1466" CreationDate="2022-02-09T11:11:44.113" UserId="160" Comment="fix the link" Text="One option is [polkadot-launch]( https://github.com/paritytech/polkadot-launch), which will mount parachains for you into the relay chain.&#xD;&#xA;&#xD;&#xA;For building the relay chain using the `cargo build --release --fast-runtime` (there is a `--profile production` rather than `--release` but the `lto` means that takes a lot longer to compile)&#xD;&#xA;&#xD;&#xA;The mounting process that `polka-launch` uses assumes that the `sudo` pallet is included in the relay chain. At the moment there is no flag to achieve this - you will have to add it into the runtime `lib.rs` manually.&#xD;&#xA;&#xD;&#xA;The relay-chain and the parachains have embedded the runtime wasm blob in them, but you can provide an alternative in raw JSON format if you want to start from an earlier version of the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="252" PostHistoryTypeId="24" PostId="34" RevisionGUID="f3ae43de-605d-4a77-97fa-85e0460d1466" CreationDate="2022-02-09T11:11:44.113" Comment="Proposed by 160 approved by 178 edit id of 11" ContentLicense="CC BY-SA 4.0" />
  <row Id="253" PostHistoryTypeId="5" PostId="27" RevisionGUID="9a918a1a-cd0b-4da6-bb6d-54fcefe90831" CreationDate="2022-02-09T11:20:29.700" UserId="85" Comment="tidying grammar" Text="Substrate allows you to handle the complex processes of Blockchain development without the limitations imposed by other frameworks. Since its launch, Substrate has been shaped to be a flexible and highly customizable modular framework.&#xD;&#xA;&#xD;&#xA;This platform helps developers quickly build Blockchain with well-researched code. After much experimentation, Substrate's modules have proven their worth on billions of dollars worth of live networks.&#xD;&#xA;&#xD;&#xA;If you're a beginner developer, you won't have to start from scratch with the Substrate system. You can take advantage of the open source software built by Substrate's large ecosystem to get off to a great start.&#xD;&#xA;This ecosystem includes the world's leading Blockchain development projects. And of course, they're completely free. Like the beginner apps, the Blockchains from Substrate are also&#xD;&#xA;some outstanding functions of Substrate:&#xD;&#xA;Persistent storage, support functions, Unlimited upgrades, safety and speed, custom messages...&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/KL5es.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="254" PostHistoryTypeId="24" PostId="27" RevisionGUID="9a918a1a-cd0b-4da6-bb6d-54fcefe90831" CreationDate="2022-02-09T11:20:29.700" Comment="Proposed by 85 approved by 28, 178 edit id of 3" ContentLicense="CC BY-SA 4.0" />
  <row Id="255" PostHistoryTypeId="12" PostId="24" RevisionGUID="7c298421-1f12-4867-ac22-12877c3b705a" CreationDate="2022-02-09T11:24:53.637" UserId="178" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:178,&quot;DisplayName&quot;:&quot;JNat&quot;}]}" />
  <row Id="256" PostHistoryTypeId="2" PostId="72" RevisionGUID="ab938343-6125-4118-bc9b-f21e4e7200b1" CreationDate="2022-02-09T11:30:38.057" UserId="85" Text="(This is a polkadot, not a substrate question)&#xD;&#xA;&#xD;&#xA;There's two distinct parts: The node which runs the chain which confusingly is called the 'client' and the on-chain wasm called the 'runtime'.&#xD;&#xA;&#xD;&#xA;My understanding is that there are currently 3 different language implementations of the client and all follow the polkadot protocol.&#xD;&#xA;&#xD;&#xA;As for on-chain wasm one could argue that it is more centralised in that it only really makes sense to have one codebase compiling to a particular wasm runtime (but that could in theory be done from any language that compiles to wasm).&#xD;&#xA;&#xD;&#xA;That said, there are many different parachains with their own runtimes and each runtime upgrade is typically elected via some form of governance - it could come from any fork potentially of the code as long as governance agrees. &#xD;&#xA;&#xD;&#xA;The same is true of the relay chain but in order to improve scalability the relay chain code is gradually focusing on doing less and less (delegating functionality to system parachains and thus decentralising further)." ContentLicense="CC BY-SA 4.0" />
  <row Id="258" PostHistoryTypeId="5" PostId="72" RevisionGUID="eec14c14-74b7-4451-94f2-a9f61b1f7510" CreationDate="2022-02-09T11:38:47.377" UserId="85" Comment="added 103 characters in body" Text="(This is a polkadot, not a substrate question)&#xD;&#xA;&#xD;&#xA;There's two distinct parts: The node which runs the chain which confusingly is called the 'client' and the on-chain wasm called the 'runtime'.&#xD;&#xA;&#xD;&#xA;My understanding is that there are currently 3 different language implementations of the client and all follow the polkadot protocol.&#xD;&#xA;&#xD;&#xA;As for on-chain wasm one could argue that it is more centralised in that it only really makes sense to have one codebase compiling to a particular wasm runtime (but that could in theory be done from any language that compiles to wasm. If the well known functions collectively called the 'runtime api' are in the wasm then it should work).&#xD;&#xA;&#xD;&#xA;That said, there are many different parachains with their own runtimes and each runtime upgrade is typically elected via some form of governance - it could come from any fork potentially of the code as long as governance agrees. &#xD;&#xA;&#xD;&#xA;The same is true of the relay chain but in order to improve scalability the relay chain code is gradually focusing on doing less and less (delegating functionality to system parachains and thus decentralising further)." ContentLicense="CC BY-SA 4.0" />
  <row Id="259" PostHistoryTypeId="2" PostId="73" RevisionGUID="a487f785-d846-4ba3-b8e1-7a928863751f" CreationDate="2022-02-09T11:42:23.787" UserId="73" Text="&gt; For example, when connecting to polkadot/kusama, can we use some sort of DB snapshot like polkashots to bypass the long waiting time?&#xD;&#xA;&#xD;&#xA;Yes you can use snapshots. &#xD;&#xA;&#xD;&#xA;&gt; However, it requires the non-archive mode in the relaychain command line, e.g. --unsafe-pruning --pruning=1000, is it safe to use it? Or can it bring about any negative effect given that the states that are older than 1000 blocks were pruned?&#xD;&#xA;&#xD;&#xA;The relay chain full node is running in non-archive node by default. Only the collator, aka the parachain db, is running in archive mode, but you are also allowed to run this in non-archive mode. We will revert the requirement of &quot;validators == archive nodes&quot; in the near future." ContentLicense="CC BY-SA 4.0" />
  <row Id="261" PostHistoryTypeId="2" PostId="74" RevisionGUID="7be1b7fd-13d5-4bb7-84a8-10e9d4673cf2" CreationDate="2022-02-09T11:44:42.753" UserId="151" Text="For a given lease period, how can we know when the lease period starts and ends (as date time)? " ContentLicense="CC BY-SA 4.0" />
  <row Id="263" PostHistoryTypeId="1" PostId="74" RevisionGUID="7be1b7fd-13d5-4bb7-84a8-10e9d4673cf2" CreationDate="2022-02-09T11:44:42.753" UserId="151" Text="How to compute the starting and ending of a lease period?" ContentLicense="CC BY-SA 4.0" />
  <row Id="264" PostHistoryTypeId="3" PostId="74" RevisionGUID="7be1b7fd-13d5-4bb7-84a8-10e9d4673cf2" CreationDate="2022-02-09T11:44:42.753" UserId="151" Text="|polkadot|kusama|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="265" PostHistoryTypeId="2" PostId="75" RevisionGUID="1565ef1f-ef7f-4ed9-9aad-ec89cf3dd73b" CreationDate="2022-02-09T11:44:42.753" UserId="151" Text="On Kusama and Polkadot - Given a lease period &quot;x&quot;, you will need to retrieve the storage constants slots.leasePeriod and slots.leaseOffset. Then compute the height at which the lease period start this way :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;x*leasePeriod + leaseOffset&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And its end &#xD;&#xA;```&#xD;&#xA;(x+1)*leasePeriod + leaseOffset -1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Once you have the ```heightStart``` and ```heightEnd``` of your lease period &quot;x&quot;, retrieve the head block (for example with ```api.rpc.chain.getBlock();```). &#xD;&#xA;&#xD;&#xA;If ```heightStart``` is lower or equal than the head block height, then retrieve the block which number is equal to heightStart (first by getting its hash ```blockStartHash = this.api.rpc.chain.getBlockHash(heightStart);```, then by getting the block using the hash : ```startBlock = api.rpc.chain.getBlock(blockStartHash);```. Now you have the timestamp (from startBlock properties) of the of the start of the lease period. You can do the same for the ```heightEnd```. &#xD;&#xA;&#xD;&#xA;If the ```heightStart``` or ```heightEnd``` is greater than the headBlock's number (height), then it is possible to *estimate* the timestamp of the lease period start (and/or end). To do so, you get the difference between the height and the head block's height. For example ```diffBlock = heightStart - headBlockHeight``` then multiple that value with the ```MILLISECS_PER_BLOCK``` constant value of the chain (for both Polkadot and Kusama it is 6000) and finally add it to the head block's timestamp to have a your estimatedLeasePeriodStartTimestamp (or ...End...).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="267" PostHistoryTypeId="2" PostId="76" RevisionGUID="5b9a572a-6c59-4097-8d92-6b5e0bbd7447" CreationDate="2022-02-09T11:52:34.140" UserId="18" Text="What is the difference between the different types of nodes? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="269" PostHistoryTypeId="1" PostId="76" RevisionGUID="5b9a572a-6c59-4097-8d92-6b5e0bbd7447" CreationDate="2022-02-09T11:52:34.140" UserId="18" Text="What is the difference between full nodes, authoring nodes, and/or collator nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="270" PostHistoryTypeId="3" PostId="76" RevisionGUID="5b9a572a-6c59-4097-8d92-6b5e0bbd7447" CreationDate="2022-02-09T11:52:34.140" UserId="18" Text="|parachain|collator|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="271" PostHistoryTypeId="2" PostId="77" RevisionGUID="8f43e0fe-7724-47df-8bf0-0affdbc72abd" CreationDate="2022-02-09T11:54:00.987" UserId="18" Text="What is the value of a collator connected to the parachain network that is not producing blocks? &#xD;&#xA;&#xD;&#xA;If there is one, are there any best practices to incentivise more nodes on the network? " ContentLicense="CC BY-SA 4.0" />
  <row Id="273" PostHistoryTypeId="1" PostId="77" RevisionGUID="8f43e0fe-7724-47df-8bf0-0affdbc72abd" CreationDate="2022-02-09T11:54:00.987" UserId="18" Text="Is there any added value to running collators that are not authoring blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="274" PostHistoryTypeId="3" PostId="77" RevisionGUID="8f43e0fe-7724-47df-8bf0-0affdbc72abd" CreationDate="2022-02-09T11:54:00.987" UserId="18" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="275" PostHistoryTypeId="2" PostId="78" RevisionGUID="f700a366-5e58-478d-a2a1-6bb0180e67ec" CreationDate="2022-02-09T11:59:43.333" UserId="18" Text="There is also Subsquid, which you can check out&#xD;&#xA;&#xD;&#xA;https://docs.subsquid.io/#hydra-quickstart" ContentLicense="CC BY-SA 4.0" />
  <row Id="277" PostHistoryTypeId="2" PostId="79" RevisionGUID="dd931eef-ab33-4b44-a3a6-277ba5d12f26" CreationDate="2022-02-09T12:02:43.863" UserId="73" Text="No there is no value in running collators that are not authoring blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="279" PostHistoryTypeId="2" PostId="80" RevisionGUID="7f502158-b738-4acd-b233-ceca21ab58e4" CreationDate="2022-02-09T12:06:44.107" UserId="73" Text="Full nodes are nodes that just follow the chain. This means they are connected to the network and import all the blocks that are being produced.&#xD;&#xA;&#xD;&#xA;Authoring nodes and collators are the same. Collators is just a different name to distinct authoring nodes from relay chain and the Parachain. These nodes are doing the same as full nodes plus they have block authoring running (and may a Grandpa voter). " ContentLicense="CC BY-SA 4.0" />
  <row Id="281" PostHistoryTypeId="2" PostId="81" RevisionGUID="075a29ea-ee72-488c-9c42-4053a2bc67ab" CreationDate="2022-02-09T12:12:40.220" UserId="18" Text="Getting qemu errors when trying to build cumulus/polkadot on the container with the official image `FROM docker.io/paritytech/ci-linux:production as builder`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;qemu-x86_64: could not open '/lib64/ld-linux-x86-64.so.2': no such file or directory&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="283" PostHistoryTypeId="1" PostId="81" RevisionGUID="075a29ea-ee72-488c-9c42-4053a2bc67ab" CreationDate="2022-02-09T12:12:40.220" UserId="18" Text="Docker and Substrate with Apple Silicon/M1 Chips" ContentLicense="CC BY-SA 4.0" />
  <row Id="284" PostHistoryTypeId="3" PostId="81" RevisionGUID="075a29ea-ee72-488c-9c42-4053a2bc67ab" CreationDate="2022-02-09T12:12:40.220" UserId="18" Text="|polkadot|cumulus|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="285" PostHistoryTypeId="2" PostId="82" RevisionGUID="41a28556-92a0-499b-8d54-c3980b87297f" CreationDate="2022-02-09T12:12:40.220" UserId="18" Text="The Rust binary you have was compiled for an amd64 (x86_64) architecture and needs the linked library. The image you are running on the Mac M1 ARM is likely the arm64v8 image and so doesn't have libraries for amd64. Since Docker for Mac sets up qemu emulation, you can likely use the amd64 image by adding the --platform flag on docker pull and docker run.&#xD;&#xA;&#xD;&#xA;That said, emulation over adm64 will be very slow and less than ideal. You are best using an arm64 image. I have personally used an ubuntu [image][1] successfully&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://hub.docker.com/r/arm64v8/ubuntu/" ContentLicense="CC BY-SA 4.0" />
  <row Id="287" PostHistoryTypeId="2" PostId="83" RevisionGUID="ce84e09a-92f7-48e3-ad82-19de6896b9bc" CreationDate="2022-02-09T12:19:41.590" UserId="18" Text="How can I call external APIs from the chain then use that data to implement further logic" ContentLicense="CC BY-SA 4.0" />
  <row Id="289" PostHistoryTypeId="1" PostId="83" RevisionGUID="ce84e09a-92f7-48e3-ad82-19de6896b9bc" CreationDate="2022-02-09T12:19:41.590" UserId="18" Text="Can I call external APIs inside my pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="290" PostHistoryTypeId="3" PostId="83" RevisionGUID="ce84e09a-92f7-48e3-ad82-19de6896b9bc" CreationDate="2022-02-09T12:19:41.590" UserId="18" Text="|parachain|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="291" PostHistoryTypeId="2" PostId="84" RevisionGUID="0028b613-6010-48ae-ba25-8cced4cd83f9" CreationDate="2022-02-09T12:19:41.590" UserId="18" Text="The Off-chain [worker][1] was introduced directly to solve this problem. You can see a full guide on how to do GET/POST requests [here][2]&#xD;&#xA;&#xD;&#xA;Some sample code &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// We want to keep the offchain worker execution time reasonable, so we set a hard-coded&#xD;&#xA;// deadline to 2s to complete the external call.&#xD;&#xA;// You can also wait indefinitely for the response, however you may still get a timeout&#xD;&#xA;// coming from the host machine.&#xD;&#xA;let deadline = sp_io::offchain::timestamp().add(Duration::from_millis(2_000));&#xD;&#xA;&#xD;&#xA;// Initiate an external HTTP GET request.&#xD;&#xA;let request = http::Request::get(&quot;https://min-api.cryptocompare.com/data/price?fsym=BTC&amp;tsyms=USD&quot;);&#xD;&#xA;let pending = request.deadline(deadline).send().map_err(|_| http::Error::IoError)?;&#xD;&#xA;let response = pending.try_wait(deadline).map_err(|_| http::Error::DeadlineReached)??;&#xD;&#xA;&#xD;&#xA;// Let's check the status code before we proceed to reading the response.&#xD;&#xA;if response.code != 200 {&#xD;&#xA;  log::warn!(&quot;Unexpected status code: {}&quot;, response.code);&#xD;&#xA;  return Err(http::Error::Unknown)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/off-chain-features/&#xD;&#xA;  [2]: https://docs.substrate.io/how-to-guides/v3/ocw/http-requests/" ContentLicense="CC BY-SA 4.0" />
  <row Id="293" PostHistoryTypeId="6" PostId="83" RevisionGUID="602c55fe-aab4-4320-9b49-235c1084870c" CreationDate="2022-02-09T12:38:40.630" UserId="28" Comment="edit tags" Text="|api|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="294" PostHistoryTypeId="2" PostId="85" RevisionGUID="0cee50eb-2199-4565-b946-b9f8d7ec13bb" CreationDate="2022-02-09T12:42:25.977" UserId="28" Text="There are also Archive Nodes which are specifically full nodes but do not prune any historical state. This means they keep in storage all of the blockchain state for all blocks since genesis." ContentLicense="CC BY-SA 4.0" />
  <row Id="296" PostHistoryTypeId="2" PostId="86" RevisionGUID="873178e8-93e0-432c-a7f6-3d92070c7509" CreationDate="2022-02-09T13:52:51.863" UserId="198" Text="The output that is mentioned here and in the release notes actually comes from  [subwasm](https://github.com/chevdor/subwasm) and is internally called by [srtool](https://github.com/paritytech/srtool).&#xD;&#xA;&#xD;&#xA;Historically, **srtool** used a sha256 to compare WASM runtimes. While it worked for the comparison, sha256 in that context was rather useless and has been removed. It has been replaced by the `system.setCode` hash which is the scale encoding of `&lt;module&gt; / &lt;call&gt; / &lt;data&gt;` so in our case `system / setCode / runtime`.&#xD;&#xA;&#xD;&#xA;While also usable to compare runtimes, `system.setCode` is much more useful and has a direct use since it is also the one required to propose a runtime upgrade on a relay chain directly. It became the de-facto hash that represents a runtime. &#xD;&#xA;&#xD;&#xA;The IPFS hash is rather unrelated but convenient as it allows fetching the runtime from IPFS **if this runtime is seeded**. **srtool** and **subwasm** do not seed the runtime on IPFS but compute the hash of the data. So if one or more users seeded this runtime, you can easily fetch it using https://ipfs.io/ipfs/QmVqUxwE8zoCZrxVM4nHEQPuQKfZyCMPS65hfojEY3EdME for the hash mentioned in the OP.&#xD;&#xA;&#xD;&#xA;The 2 other hashes (`authorizeUpgrade hash` and `Blake2-256 hash`) are utilities that ease the creation of more complex proposals mainly related to sending parachain upgrade messages from the relay chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="303" PostHistoryTypeId="5" PostId="38" RevisionGUID="8bea009b-3be4-412f-8b88-ed11de72f6df" CreationDate="2022-02-09T15:13:54.490" UserId="104" Comment="added 256 characters in body" Text="There are two main ways in which assets are transferred between consensus systems in XCM. They are namely via **Asset Teleportation** or via **Reserve Asset Transfers**.&#xD;&#xA;&#xD;&#xA;First of all, a preamble -- XCM instructions are always going to be interpreted according to the consensus system that executes them, and so for all of the instructions that I am going to explain below, *always* remember that the exact behaviour may change depending on which consensus system processes them. What I would hence be describing are the basic behaviours that you can expect each consensus system to possess, regardless of their peculiarities.&#xD;&#xA;&#xD;&#xA;With that said, I am going to describe the intricacies with the two asset transfer models below.&#xD;&#xA;&#xD;&#xA;# Asset Teleportation #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Asset Teleportation][1]][1]&#xD;&#xA;&#xD;&#xA;We start with the easier and more straightforward of the two -- Asset Teleportation. As you can see from the diagram above, there are only 2 actors within this model: the source and the destination. The way in which we transfer assets between the source and the destination are briefly summarized in the numbered labels on the diagram, and are explained in more detail below:&#xD;&#xA;&#xD;&#xA;### 1. InitiateTeleport ###&#xD;&#xA;The source gathers the assets to be teleported from the sending account and **burns** them, taking note of the total amount of assets burned.&#xD;&#xA;&#xD;&#xA;### 2. ReceiveTeleportedAssets ###&#xD;&#xA;The source then creates an XCM instruction called &quot;ReceiveTeleportedAssets&quot; and puts the amount of burned assets and the receiving account as parameters to this instruction. It then sends this instruction over to the destination, where it gets processed and new assets gets **minted** accordingly to the amount burned.&#xD;&#xA;&#xD;&#xA;### 3. DepositAsset ###&#xD;&#xA;The destination then deposits the newly minted assets to the receiving account of the asset.&#xD;&#xA;&#xD;&#xA;The words **burns** and **minted** are highlighted above to give a hint on the disadvantages of this model -- it requires both the source and destination of have a high level of mutual trust. The destination must trust that the source has appropriately burned the assets that was sent over, and the source must also trust the destination to mint the assets that was burned. **Failing to uphold either of these two conditions will result in a change in the asset's total issuance (in the case of fungible tokens) or a complete loss/duplication of an NFT.**&#xD;&#xA;&#xD;&#xA;# Reserve Asset Transfer #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Reserve Asset Transfer][2]][2]&#xD;&#xA;&#xD;&#xA;For consensus systems that don't have the level of trust required for asset teleportation, they can instead opt for trusting a 3rd entity called the reserve to store the real assets (think Statemine on Kusama or Statemint on Polkadot). What this entails is that the source and destination will have to create some sort of mechanism to keep track of the assets that they own on the reserve, and this is usually done by minting a new derivative token. As a corollary, both the source and destination must have accounts on the reserve -- we'll refer to such accounts owned by the source/destination as Sovereign Accounts.&#xD;&#xA;&#xD;&#xA;Below are the steps in which a reserve asset transfer undergoes in order to transfer assets from the source to the destination:&#xD;&#xA;&#xD;&#xA;### 1. InitiateReserveWithdraw ###&#xD;&#xA;The source gathers the derivative assets to be transferred from the sending account and burns them, taking note of the amount of derivatives that were burned.&#xD;&#xA;&#xD;&#xA;### 2. WithdrawAsset ###&#xD;&#xA;The source sends a WithdrawAsset instruction to the reserve, instructing the reserve to withdraw assets equivalent to the amount of derivatives burned from the source's sovereign account.&#xD;&#xA;&#xD;&#xA;### 3. DepositReserveAsset ###&#xD;&#xA;The reserve deposits the assets withdrawn from the previous step to the destination's sovereign account, taking note of the amount of assets deposited.&#xD;&#xA;&#xD;&#xA;### 4. ReserveAssetDeposited ###&#xD;&#xA;The reserve creates a ReserveAssetDeposited instruction with the amount of assets deposited to the destination's sovereign account, and sends this instruction onwards to the destination. The destination receives the instruction and processes it, minting the derivative assets as a result of the process.&#xD;&#xA;&#xD;&#xA;### 5. DepositAsset ###&#xD;&#xA;The destination deposits the derivative assets minted to the receiving account.&#xD;&#xA;&#xD;&#xA;The addition of a 3rd consensus system is already a hint of the disadvantages of a reserve asset transfer model -- firstly, the reserve could easily become a point of centralization when too many consensus systems rely on it to be the reserve of choice for their assets; secondly, the sheer amount of steps required necessarily makes it more prone to errors, and as such, implementors will have to consider more possible pitfalls and provide technical support accordingly when an end user encounters issues arising from these steps. Last but not least, either of the source or destination can opt to designate multiple consensus systems to be their reserves, and in such a situation, care must be taken in order to ensure that the sovereign account on the reserves are balanced, so that one doesn't get all drained while the others still contain a healthy balance.&#xD;&#xA;&#xD;&#xA;# Summary&#xD;&#xA;&#xD;&#xA;Despite being more complex, consensus systems often will first pick the reserve asset transfer model over asset teleportation, due to the trust issues discussed. However, we could imagine that as the source and destination continue to prove themselves to be trustworthy and cooperative on the reserve, they could then negotiate for an asset teleportation agreement and switch over to that entirely.&#xD;&#xA;&#xD;&#xA;As such, we could in fact think of the reserve asset model as a way to establish a baseline of trust between the source and destination. They could even move into various intermediate arrangements, such as unifying the derivative tokens so that they all get issued by either the source or the destination, instead of having each minting their own derivatives. Whether or not the source and destination will move beyond the reserve asset transfer model is up to them to decide.&#xD;&#xA;&#xD;&#xA;For further reading of XCMs in general, Gavin [has][3] [plenty of][4] [blogposts][5] that describe each component of the XCM in detail. Shawn also [has an excellent video][6] describing how you can craft your first cross-chain messages. Finally, there is also [the XCM specification][7] that is the definitive source of truth on any matters related to XCM.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JLfQp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/PC6Lm.png&#xD;&#xA;  [3]: https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392#cb6d&#xD;&#xA;  [4]: https://medium.com/polkadot-network/xcm-part-ii-versioning-and-compatibility-b313fc257b83&#xD;&#xA;  [5]: https://medium.com/polkadot-network/xcm-part-iii-execution-and-error-management-ceb8155dd166&#xD;&#xA;  [6]: https://www.youtube.com/watch?v=5cgq5jOZx9g&#xD;&#xA;  [7]: https://github.com/paritytech/xcm-format" ContentLicense="CC BY-SA 4.0" />
  <row Id="304" PostHistoryTypeId="2" PostId="88" RevisionGUID="10d3fcc1-c26e-4c65-baba-1c398174fe54" CreationDate="2022-02-09T16:10:46.623" UserId="215" Text="If we are using a single or double maps in our pallets to store data on-chain, is there a limit to the number of records or size of one individual map? &#xD;&#xA;&#xD;&#xA;I understand we should be storing the minimal amount of data on-chain but say 10 years has passed and millions of records have been created in this map, is that possible? will there be any issues in terms of performance?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="306" PostHistoryTypeId="1" PostId="88" RevisionGUID="10d3fcc1-c26e-4c65-baba-1c398174fe54" CreationDate="2022-02-09T16:10:46.623" UserId="215" Text="Is there a limit to the size of a map in Pallet storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="307" PostHistoryTypeId="3" PostId="88" RevisionGUID="10d3fcc1-c26e-4c65-baba-1c398174fe54" CreationDate="2022-02-09T16:10:46.623" UserId="215" Text="|pallet|storage|map|" ContentLicense="CC BY-SA 4.0" />
  <row Id="308" PostHistoryTypeId="2" PostId="89" RevisionGUID="0ccd1070-f8ff-4081-9a2c-ebedb6d50100" CreationDate="2022-02-09T16:21:06.383" UserId="12" Text="@Squirrel is correct that this is not _strictly_ a Substrate question, but I still think it's a great question nonetheless ;-) As you said, @Afr, [Gossamer][1] is a Golang implementation of the Polkadot Host, but I'm happy to expand on this a bit.&#xD;&#xA;&#xD;&#xA;In short, the concept of a &quot;[Polkadot Host][2]&quot; is very similar to the concept of a &quot;client&quot; in other blockchain ecosystems, with one important distinction - as @Squirrel points out, implementers of a Polkadot Host do not need to implement the Polkadout runtime. This is because of the way in which Polkadot's architecture cleanly separates runtime logic, which is supplied by platform-agnostic [Wasm][3], and the other concerns of a blockchain client, such as its consensus engines, network layers, transaction pool, and more.&#xD;&#xA;&#xD;&#xA;Parity Technologies maintains the reference implementation of the Polkadot Host, which is, of course, written using [Substrate][4] - a Rust-based framework for blockchain development. Substrate is arguably the most configurable and fully-feature blockchain framework out there, and, in addition to being used to build Parity's implementation of the Polkadot Host, it can also be used to build [Polkadot parachains][5] and even [bespoke standalone chains][6]. One of the things that makes Substrate so powerful is its [FRAME system for runtime development][7], which is what is used to implement [the Polkadot runtime][8].&#xD;&#xA;&#xD;&#xA;As of this time, Gossamer development has primarily been focused on implementing the Polkadot Host, which means implementing [various specifications][9], [interfaces][10], and more. Although this has all been done with an eye towards building out a fully featured blockchain development framework in the future, I don't think it's fair to compare Gossamer to Substrate in that respect. For one thing, Gossamer cannot be used to implement Wasm runtimes at this time, due in part to the fact the reference implementation of Golang does not yet support compilation to Wasm.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ChainSafe/gossamer&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-polkadot-host&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/learn-wasm&#xD;&#xA;  [4]: https://docs.substrate.io/&#xD;&#xA;  [5]: https://wiki.polkadot.network/docs/learn-parachains&#xD;&#xA;  [6]: https://docs.substrate.io/tutorials/v3/proof-of-existence/&#xD;&#xA;  [7]: https://docs.substrate.io/v3/runtime/frame/&#xD;&#xA;  [8]: https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/lib.rs&#xD;&#xA;  [9]: https://w3f.github.io/polkadot-spec/develop/index.html&#xD;&#xA;  [10]: https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-6.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="310" PostHistoryTypeId="2" PostId="90" RevisionGUID="902d6cc3-2ee3-4774-8af1-712a4b78d988" CreationDate="2022-02-09T17:11:48.170" UserId="139" Text="[Repost from stackoverflow:][1] &#xD;&#xA;&#xD;&#xA;So I've been at my wits' end for quite some time regarding `#[pallet::error]` showing up on Polkadot JS apps interface when calling a fallible function from sudo. So as I've come to understand following substrate kitties tutorial that we require to return a `DispatchResult` out of our dispatchable calls and after doing so, I have a case where I am not seeing any errors on my apps interface, although the operation does fail successfully as I don't see any mistakes on the balancesToAccount hashmap. &#xD;&#xA;&#xD;&#xA;This code compiles fine.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;		/// Allow only Root to mint new tokens &amp; transfer it to some benefactor account&#xD;&#xA;		/// Set a hard uppper limit on the total number of tokens in supply&#xD;&#xA;		pub fn mint(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			#[pallet::compact] amount: &lt;T as Config&gt;::Balance,&#xD;&#xA;			benefactor: T::AccountId,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// Check if sudo call&#xD;&#xA;			ensure_root(origin.clone())?;&#xD;&#xA;&#xD;&#xA;			// Check if existing amount doesn't overflow MaxTokenSupply&#xD;&#xA;Error	|----&gt;	Self::does_adding_overflow_maxtokensupply(amount)?;&#xD;&#xA;			&#xD;&#xA;			// Check if Benefactor already has funds&#xD;&#xA;			let previous_balance = &lt;BalanceToAccount&lt;T&gt;&gt;::try_get(&amp;benefactor).unwrap_or_default();&#xD;&#xA;			let final_balance = previous_balance.saturating_add(amount);&#xD;&#xA;			&lt;BalanceToAccount&lt;T&gt;&gt;::insert(&amp;benefactor, final_balance);&#xD;&#xA;			Self::deposit_event(Event::MintedNewSupply(amount));&#xD;&#xA;			Ok(().into())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;As you can see I have a helper function that will check if minting `amount` causes a overflow to the total token supply. And that function is defined here: &#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		fn does_adding_overflow_maxtokensupply(amount: T::Balance) -&gt; Result&lt;(), Error&lt;T&gt;&gt; {&#xD;&#xA;			let total_already_minted: T::Balance = BalanceToAccount::&lt;T&gt;::iter_values().sum();&#xD;&#xA;			let new_supply =&#xD;&#xA;				total_already_minted.checked_add(&amp;amount).ok_or(Error::&lt;T&gt;::MintTypeOverflow)?;&#xD;&#xA;			if new_supply &lt;= T::MaxTokenSupply::get() {&#xD;&#xA;				Ok(())&#xD;&#xA;			} else {&#xD;&#xA;				Err(Error::&lt;T&gt;::MintCausingTotalSupplyOverflow)&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;I was expected `?` to automagically cast the Error into something `DispatchResult` can work with, but I'm not sure if that's happening on this line: &#xD;&#xA;```rust&#xD;&#xA;Self::does_adding_overflow_maxtokensupply(amount)?;&#xD;&#xA;```&#xD;&#xA;Here's what Polkadot JS apps shows when I give it a number greater than max supply :&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;Next I check whether that balance went through (It shouldn't), and indeed it didn't go through.&#xD;&#xA;[![Alice's Balance not updated ][3]][3]&#xD;&#xA;&#xD;&#xA;What I would like the apps interface is to show an error rejecting such requests as it does in case of `BadOrigin`. How can I achieve this? &#xD;&#xA;&#xD;&#xA;Edit #1: **I should mention that this function is only callable by `sudo`,** if that makes a difference. I can see extrinsic Errors on other functions, except this one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/70766123/how-to-create-pallet-errors-that-show-up-on-the-polkadot-js-apps-interface&#xD;&#xA;  [2]: https://i.stack.imgur.com/trb8I.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/mwaF2.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="312" PostHistoryTypeId="1" PostId="90" RevisionGUID="902d6cc3-2ee3-4774-8af1-712a4b78d988" CreationDate="2022-02-09T17:11:48.170" UserId="139" Text="How to create pallet errors for sudo that show up on the Polkadot JS apps interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="313" PostHistoryTypeId="3" PostId="90" RevisionGUID="902d6cc3-2ee3-4774-8af1-712a4b78d988" CreationDate="2022-02-09T17:11:48.170" UserId="139" Text="|sudo|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="314" PostHistoryTypeId="2" PostId="91" RevisionGUID="6911011f-664f-4165-9f06-dde4097c4fcd" CreationDate="2022-02-09T18:17:46.740" UserId="85" Text="I'm afraid at the moment the UI does not show these errors. This seems to be a UX fail but I am hopeful that we can fix it. This is the issue to watch:&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-js/apps/issues/3072&#xD;&#xA;&#xD;&#xA;(The sudo call is successfully invoking the parameter so it is a successful extrinsic even if there are inner errors - same woes with utils.batch, incomplete xcm messages etc.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="316" PostHistoryTypeId="2" PostId="92" RevisionGUID="5ef739dc-5595-461d-92f7-589d7c4c75ff" CreationDate="2022-02-09T19:00:39.457" UserId="53" Text="There isn't a strict limit, however the more entries a map has, the more trie nodes need to be read/altered when accessing it, so overall the slower the I/O. It's logarithmic in complexity, so you can expand the map quite far before performance degrades substantiallya.&#xD;&#xA;&#xD;&#xA;Regardless, you should always be thinking about economic incentives to ensure that data is not left to bloat the map needlessly. A simple one is the deposit scheme, whereby value must be taken out of circulation/usage as long as data is stored in the map. This helps ensure that (even after 10 years) the state is storing a manageable amount of data and only that which is the most economically valuable. Polkadot employs this technique ubiquitously." ContentLicense="CC BY-SA 4.0" />
  <row Id="318" PostHistoryTypeId="2" PostId="93" RevisionGUID="f10bc77b-c657-4024-9fad-b8ece17b7598" CreationDate="2022-02-09T19:09:56.423" UserId="28" Text="Storage size and density are both relevant concerns when it comes to the performance of your chain. There are limits and performance implications at many levels so I will break them down:&#xD;&#xA;&#xD;&#xA;## Physical Limits&#xD;&#xA;&#xD;&#xA;The Substrate runtime executes within a `wasm32` environment, which means we have the same general limitations as any 32-bit environment, for example the maximum number of items in a `Vec` is `u32::MAX`.&#xD;&#xA;&#xD;&#xA;## Wasm Limits&#xD;&#xA;&#xD;&#xA;Our wasm environment itself is configured with a maximum allocation size which is currently set to 16 MB. That means trying to access any item in storage which requires more than 16 MB allocated memory will cause a panic in the runtime.&#xD;&#xA;&#xD;&#xA;## Merkle Trie Limits&#xD;&#xA;&#xD;&#xA;Substrate's generic key-value database can support arbitrary size keys and values.&#xD;&#xA;&#xD;&#xA;## Merkle Trie Complexity&#xD;&#xA;&#xD;&#xA;Substrate uses a base-16 merkle trie as default, and thus we can expect the complexity of accessing item in the trie to grow at log16 of the number of items in the overall state.&#xD;&#xA;&#xD;&#xA;## Size / Decoding Performance&#xD;&#xA;&#xD;&#xA;When reading a raw value from the database, we should expect that larger files are more complex for the database to handle than smaller files.&#xD;&#xA;&#xD;&#xA;Additionally, to convert the raw encoded bytes into a Rust type-safe object, Parity SCALE Codec needs to decode those bytes, which increases in complexity based on the number of bytes encoded.&#xD;&#xA;&#xD;&#xA;## Database Optimizations&#xD;&#xA;&#xD;&#xA;While I cannot speak towards optimization of RocksDB with various filesizes, [Parity DB](https://github.com/paritytech/parity-db) is optimized for certain kinds of key/values. Those optimizations are noted in the project." ContentLicense="CC BY-SA 4.0" />
  <row Id="320" PostHistoryTypeId="2" PostId="94" RevisionGUID="6bd28df6-4dd4-4862-8450-ec7bd4a0afb7" CreationDate="2022-02-09T19:15:05.777" UserId="238" Text="I have a `Call` which looks like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Call::TokenWrapperHandler(Call::execute_wrapping_fee_proposal { r_id: [101, 120, 101, 99, 117, 116, 101, 95, 119, 114, 97, 112, 112, 105, 110, 103, 95, 102, 101, 101, 95, 112, 114, 111, 112, 111, 2, 0, 0, 0, 0, 5], wrapping_fee_percent: 5, into_pool_share_id: 1 })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am wondering if there is an easy way to parse out the method name, namely `execute_wrapping_fee_proposal`, from it?&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="322" PostHistoryTypeId="1" PostId="94" RevisionGUID="6bd28df6-4dd4-4862-8450-ec7bd4a0afb7" CreationDate="2022-02-09T19:15:05.777" UserId="238" Text="Parse method name from call" ContentLicense="CC BY-SA 4.0" />
  <row Id="323" PostHistoryTypeId="3" PostId="94" RevisionGUID="6bd28df6-4dd4-4862-8450-ec7bd4a0afb7" CreationDate="2022-02-09T19:15:05.777" UserId="238" Text="|substate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="324" PostHistoryTypeId="2" PostId="95" RevisionGUID="8f410a1c-75d5-4b33-83ec-e3b22aa543ff" CreationDate="2022-02-09T19:26:37.023" UserId="85" Text="Why does the moonbeam/moonriver polkadot-js websites not have an extrinsics developer menu? The chain state can be queried, and RPC seems there.&#xD;&#xA;&#xD;&#xA;I'm just curious." ContentLicense="CC BY-SA 4.0" />
  <row Id="326" PostHistoryTypeId="1" PostId="95" RevisionGUID="8f410a1c-75d5-4b33-83ec-e3b22aa543ff" CreationDate="2022-02-09T19:26:37.023" UserId="85" Text="Why does the moonbeam/moonriver polkadot-js website not have an extrinsics developer menu?" ContentLicense="CC BY-SA 4.0" />
  <row Id="327" PostHistoryTypeId="3" PostId="95" RevisionGUID="8f410a1c-75d5-4b33-83ec-e3b22aa543ff" CreationDate="2022-02-09T19:26:37.023" UserId="85" Text="|moonbeam|moonriver|curiosity-killed-the-cat|" ContentLicense="CC BY-SA 4.0" />
  <row Id="328" PostHistoryTypeId="2" PostId="96" RevisionGUID="b7640665-b3bd-4492-ae27-9160a9443507" CreationDate="2022-02-09T19:50:07.827" UserId="104" Text="Here's a trick that I learned: even when a particular parachain does not explicitly show the extrinsics menu item on [polkadot.js.org/apps][1], the webpage is still accessible if you simply add `#/extrinsics` to the end of the URL, and it is fully functional as well! See the screecap below:&#xD;&#xA;&#xD;&#xA;[![Screencap of PolkadotJS on the extrinsics page][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps&#xD;&#xA;  [2]: https://i.stack.imgur.com/Q8hKq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="330" PostHistoryTypeId="2" PostId="97" RevisionGUID="c4defcf3-08d2-4d3d-8efb-66df04dd230e" CreationDate="2022-02-09T20:15:33.003" UserId="239" Text="The apps only show certain functions, including the extrinsics tab, when you have at least one account.&#xD;&#xA;&#xD;&#xA;Because Moonbeam uses Ethereum-style accounts instead of Polkadot accounts, your existing Polkadot account set to be used on all chains doesn't count as a Moonbeam account.&#xD;&#xA;&#xD;&#xA;Instead, you will need to create a new account in the polkadot.js apps for Moonbeam. Once this is done, the extrinsics tab appears just as it does for other chains." ContentLicense="CC BY-SA 4.0" />
  <row Id="332" PostHistoryTypeId="2" PostId="98" RevisionGUID="1498e5ad-3805-4dce-bf68-3bc38fa4b332" CreationDate="2022-02-09T20:27:56.137" UserId="28" Text="If I understand your question correctly, the call name you are looking for is NOT encoded in the call data.&#xD;&#xA;&#xD;&#xA;Call encoding in Substrate is composed of two bytes:&#xD;&#xA;&#xD;&#xA;1. First byte will represent the Pallet index where the call is.&#xD;&#xA;2. Second byte will represent the Call index of the call.&#xD;&#xA;&#xD;&#xA;So let's assume you are looking for the encoded call of the Balances `transfer` call:&#xD;&#xA;&#xD;&#xA;First you look at your `construct_runtime!` to see how the pallets are indexed for your runtime:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Create the runtime by composing the FRAME pallets that were previously configured.&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		RandomnessCollectiveFlip: pallet_randomness_collective_flip,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		// Include the custom logic from the pallet-template in the runtime.&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here we can see that the `Balances` pallet has index 5 (starting from 0).&#xD;&#xA;&#xD;&#xA;Then we look at the `Balances` pallet to see which call index the `transfer` call is, and as of writing this post, it is the very first call: index 0;&#xD;&#xA;&#xD;&#xA;So the encoded version of `pallet_balances::Call::transfer` will be `0x0500`.&#xD;&#xA;&#xD;&#xA;So yeah, without the metadata of the chain, you will not be able to work backwards here to find the actual method name. However, this is exactly what the runtime metadata is used for, so you should use it." ContentLicense="CC BY-SA 4.0" />
  <row Id="334" PostHistoryTypeId="2" PostId="99" RevisionGUID="0162d19a-c822-4818-8955-9f7b690231d8" CreationDate="2022-02-09T20:58:17.733" UserId="70" Text="Bit.Country uses XCM to communicate with other parachains in the ecosystem. There are quite a few use cases that have been implementing&#xD;&#xA;&#xD;&#xA; - Transfer parachain native token from/to other parachains.&#xD;&#xA; - Transfer non-fungible token from/to other parachains. &#xD;&#xA;&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="336" PostHistoryTypeId="10" PostId="58" RevisionGUID="82a5b756-16cb-4c15-ae3c-bfae0e9d1cbd" CreationDate="2022-02-09T21:06:39.107" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:160,&quot;DisplayName&quot;:&quot;Afr&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:151,&quot;DisplayName&quot;:&quot;Cromm&quot;},{&quot;Id&quot;:2,&quot;DisplayName&quot;:&quot;Glorfindel&quot;},{&quot;Id&quot;:103,&quot;DisplayName&quot;:&quot;user1271772&quot;}]}" />
  <row Id="337" PostHistoryTypeId="5" PostId="89" RevisionGUID="50ecef86-7343-43bc-b79f-44d5a7ed2476" CreationDate="2022-02-09T22:08:08.377" UserId="12" Comment="deleted 1 character in body" Text="@Squirrel is correct that this is not _strictly_ a Substrate question, but I still think it's a great question nonetheless ;-) As you said, @Afr, [Gossamer][1] is a Golang implementation of the Polkadot Host, but I'm happy to expand on this a bit.&#xD;&#xA;&#xD;&#xA;In short, the concept of a &quot;[Polkadot Host][2]&quot; is very similar to the concept of a &quot;client&quot; in other blockchain ecosystems, with one important distinction - as @Squirrel points out, implementers of a Polkadot Host do not need to implement the Polkadot runtime. This is because of the way in which Polkadot's architecture cleanly separates runtime logic, which is supplied by platform-agnostic [Wasm][3], and the other concerns of a blockchain client, such as its consensus engines, network layers, transaction pool, and more.&#xD;&#xA;&#xD;&#xA;Parity Technologies maintains the reference implementation of the Polkadot Host, which is, of course, written using [Substrate][4] - a Rust-based framework for blockchain development. Substrate is arguably the most configurable and fully-feature blockchain framework out there, and, in addition to being used to build Parity's implementation of the Polkadot Host, it can also be used to build [Polkadot parachains][5] and even [bespoke standalone chains][6]. One of the things that makes Substrate so powerful is its [FRAME system for runtime development][7], which is what is used to implement [the Polkadot runtime][8].&#xD;&#xA;&#xD;&#xA;As of this time, Gossamer development has primarily been focused on implementing the Polkadot Host, which means implementing [various specifications][9], [interfaces][10], and more. Although this has all been done with an eye towards building out a fully featured blockchain development framework in the future, I don't think it's fair to compare Gossamer to Substrate in that respect. For one thing, Gossamer cannot be used to implement Wasm runtimes at this time, due in part to the fact the reference implementation of Golang does not yet support compilation to Wasm.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ChainSafe/gossamer&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-polkadot-host&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/learn-wasm&#xD;&#xA;  [4]: https://docs.substrate.io/&#xD;&#xA;  [5]: https://wiki.polkadot.network/docs/learn-parachains&#xD;&#xA;  [6]: https://docs.substrate.io/tutorials/v3/proof-of-existence/&#xD;&#xA;  [7]: https://docs.substrate.io/v3/runtime/frame/&#xD;&#xA;  [8]: https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/lib.rs&#xD;&#xA;  [9]: https://w3f.github.io/polkadot-spec/develop/index.html&#xD;&#xA;  [10]: https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-6.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="340" PostHistoryTypeId="2" PostId="100" RevisionGUID="e924a9d9-751f-4e30-b4ea-0f5e09d099cc" CreationDate="2022-02-09T22:17:43.030" UserId="12" Text="Anecdotally, I know that one of Substrate's most important points of differentiation is its support for modular &amp; hot-swappable consensus. What does this mean and how does Substrate enable this capability?" ContentLicense="CC BY-SA 4.0" />
  <row Id="342" PostHistoryTypeId="1" PostId="100" RevisionGUID="e924a9d9-751f-4e30-b4ea-0f5e09d099cc" CreationDate="2022-02-09T22:17:43.030" UserId="12" Text="How Does Substrate Implement Modular &amp; Hot-Swappable Consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="343" PostHistoryTypeId="3" PostId="100" RevisionGUID="e924a9d9-751f-4e30-b4ea-0f5e09d099cc" CreationDate="2022-02-09T22:17:43.030" UserId="12" Text="|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="344" PostHistoryTypeId="2" PostId="101" RevisionGUID="a85c8959-21e2-4c8e-bed7-12bfbe138c3b" CreationDate="2022-02-09T22:31:41.963" UserId="3" Text="Is it possible to reliably monitor an account and receive information about a transaction of that account _before_ the transaction is `InBlock` and then front-run that transaction by issuing a sufficiently larger tip? If so, how would one do this using polkadot-js?&#xD;&#xA;&#xD;&#xA;Note: This is a problem on EVM-style networks due to the way that transactions are handled there." ContentLicense="CC BY-SA 4.0" />
  <row Id="346" PostHistoryTypeId="1" PostId="101" RevisionGUID="a85c8959-21e2-4c8e-bed7-12bfbe138c3b" CreationDate="2022-02-09T22:31:41.963" UserId="3" Text="Can an accounts transactions be front-run on Polkadot? If so, how?" ContentLicense="CC BY-SA 4.0" />
  <row Id="347" PostHistoryTypeId="3" PostId="101" RevisionGUID="a85c8959-21e2-4c8e-bed7-12bfbe138c3b" CreationDate="2022-02-09T22:31:41.963" UserId="3" Text="|transactions|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="348" PostHistoryTypeId="2" PostId="102" RevisionGUID="52fc2a38-5e5d-4b16-a1c2-ceade73ed46c" CreationDate="2022-02-09T22:37:50.707" UserId="12" Text="The [FRAME system for runtime development][1] defines an [`AccountData` type][2], which is coupled with [data from the Balances Pallet][3] in [the Polkadot runtime][4]. What other types of data could be tracked using this type? Why doesn't the Balances Pallet track its metadata &quot;natively&quot; as opposed to coupling with the FRAME System `AccountData` type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/frame/&#xD;&#xA;  [2]: https://crates.parity.io/frame_system/pallet/trait.Config.html#associatedtype.AccountData&#xD;&#xA;  [3]: https://crates.parity.io/pallet_balances/struct.AccountData.html&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/v0.9.16/runtime/polkadot/src/lib.rs#L221" ContentLicense="CC BY-SA 4.0" />
  <row Id="350" PostHistoryTypeId="1" PostId="102" RevisionGUID="52fc2a38-5e5d-4b16-a1c2-ceade73ed46c" CreationDate="2022-02-09T22:37:50.707" UserId="12" Text="How Does FRAME Account Data Work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="351" PostHistoryTypeId="3" PostId="102" RevisionGUID="52fc2a38-5e5d-4b16-a1c2-ceade73ed46c" CreationDate="2022-02-09T22:37:50.707" UserId="12" Text="|frame|balances|accountdata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="352" PostHistoryTypeId="4" PostId="101" RevisionGUID="9d2d700c-93c4-44c4-94fc-39980f105d87" CreationDate="2022-02-09T22:37:58.827" UserId="3" Comment="edited title" Text="Can an account's transactions be front-run on Polkadot? If so, how?" ContentLicense="CC BY-SA 4.0" />
  <row Id="353" PostHistoryTypeId="2" PostId="103" RevisionGUID="2f0f6fd0-41f0-41d8-a3bd-8822bc06d6af" CreationDate="2022-02-09T22:52:42.677" UserId="245" Text="Say you have two account ids Aid(A) and Aid(B) and you want to combine them.e.g. XOR( Aid(A), Aid(B) ).&#xD;&#xA;&#xD;&#xA;Basically, I want to achieve this;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;T::Hashing::hash_of(&amp;(idA, idB)) == T::Hashing::hash_of(&amp;(idB, idA))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="355" PostHistoryTypeId="1" PostId="103" RevisionGUID="2f0f6fd0-41f0-41d8-a3bd-8822bc06d6af" CreationDate="2022-02-09T22:52:42.677" UserId="245" Text="How to create XOR Hashes in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="356" PostHistoryTypeId="3" PostId="103" RevisionGUID="2f0f6fd0-41f0-41d8-a3bd-8822bc06d6af" CreationDate="2022-02-09T22:52:42.677" UserId="245" Text="|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="357" PostHistoryTypeId="2" PostId="104" RevisionGUID="1123b5c5-f478-408e-8f64-8b0ec7985137" CreationDate="2022-02-09T23:11:19.960" UserId="246" Text="I can see how to do so from the [subscan api](https://docs.api.subscan.io/#blocks) but I am interested in understanding how to query this data from the chain itself. Ie via a storage function or by another means" ContentLicense="CC BY-SA 4.0" />
  <row Id="359" PostHistoryTypeId="1" PostId="104" RevisionGUID="1123b5c5-f478-408e-8f64-8b0ec7985137" CreationDate="2022-02-09T23:11:19.960" UserId="246" Text="How do you query a list of all previous block hashes from a substrate based chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="360" PostHistoryTypeId="3" PostId="104" RevisionGUID="1123b5c5-f478-408e-8f64-8b0ec7985137" CreationDate="2022-02-09T23:11:19.960" UserId="246" Text="|polkadot|parachain|frame|storage-function|" ContentLicense="CC BY-SA 4.0" />
  <row Id="361" PostHistoryTypeId="5" PostId="4" RevisionGUID="a58a26ff-1de8-46c3-88d2-ee518e16b235" CreationDate="2022-02-09T23:11:53.003" UserId="12" Comment="clarify that pallets conceptually belong to FRAME, add link for ink!" Text="What are the differences between developing a Substrate [FRAME][1] Pallet and a Substrate Smart Contract (for example with [the ink! language][2])?&#xD;&#xA;&#xD;&#xA;What are some examples of applications which are best written in one form or the other?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Original: https://stackoverflow.com/questions/56040779/when-should-i-build-a-substrate-runtime-module-versus-a-substrate-smart-contract&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/frame/&#xD;&#xA;  [2]: https://paritytech.github.io/ink-docs/" ContentLicense="CC BY-SA 4.0" />
  <row Id="362" PostHistoryTypeId="4" PostId="4" RevisionGUID="a58a26ff-1de8-46c3-88d2-ee518e16b235" CreationDate="2022-02-09T23:11:53.003" UserId="12" Comment="clarify that pallets conceptually belong to FRAME, add link for ink!" Text="When should I build a Substrate FRAME Pallet versus a Smart Contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="363" PostHistoryTypeId="24" PostId="4" RevisionGUID="a58a26ff-1de8-46c3-88d2-ee518e16b235" CreationDate="2022-02-09T23:11:53.003" Comment="Proposed by 12 approved by 28 edit id of 24" ContentLicense="CC BY-SA 4.0" />
  <row Id="364" PostHistoryTypeId="2" PostId="105" RevisionGUID="de8a68e1-9383-4b20-b40e-6639c94db3cf" CreationDate="2022-02-09T23:17:15.377" UserId="28" Text="Substrate exposes an RPC endpoint which provide the blockhash for any block: https://polkadot.js.org/docs/substrate/rpc#getblockhashblocknumber-blocknumber-blockhash&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;chain_getBlockHash&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&gt; curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;chain_getBlockHash&quot;}' http://localhost:9933/&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0xec69c048cbfca1c9e50bec88c5f47fd00ea2bcfc1f651fdd995eeb283ea0baf5&quot;,&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This information can also be found inside of the System Pallet in runtime storage:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Map of block numbers to block hashes.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn block_hash)]&#xD;&#xA;pub type BlockHash&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Twox64Concat, T::BlockNumber, T::Hash, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But note, this data is pruned, so only `BlockHashCount` number of items will exist at any time. To get all of the data in this way, you will need an archive node with the state of all the previous blocks.&#xD;&#xA;&#xD;&#xA;So the RPC endpoint is probably your best bet!" ContentLicense="CC BY-SA 4.0" />
  <row Id="366" PostHistoryTypeId="6" PostId="104" RevisionGUID="886be771-3a3c-4a66-a61a-8d8089e02c55" CreationDate="2022-02-09T23:18:07.747" UserId="28" Comment="edited tags" Text="|rpc|block-hash|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="367" PostHistoryTypeId="2" PostId="106" RevisionGUID="d8e29295-9cbe-4fd3-916c-a9aa63df6c53" CreationDate="2022-02-09T23:25:50.470" UserId="28" Text="We can always represent types inside of the runtime as their encoded blobs (`Vec&lt;u8&gt;`), so this question breaks down to &quot;How do you XOR two `Vec&lt;u8&gt;`&quot;?&#xD;&#xA;&#xD;&#xA;For that, I see this thread:&#xD;&#xA;&#xD;&#xA;https://users.rust-lang.org/t/how-to-xor-two-vec-u8/31071&#xD;&#xA;&#xD;&#xA;So a full solution would look like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let idA: T::AccountId = account_a;&#xD;&#xA;let idB: T::AccountId = account_b;&#xD;&#xA;&#xD;&#xA;let mut bytesA: Vec&lt;u8&gt; = idA.encode();&#xD;&#xA;let bytesB: Vec&lt;u8&gt; = idB.encode();&#xD;&#xA;&#xD;&#xA;// `bytesA` is being modified in place.&#xD;&#xA;// You could also allocate a new vector if you want.&#xD;&#xA;bytesA.iter_mut()&#xD;&#xA;    .zip(bytesB.iter())&#xD;&#xA;    .for_each(|(x1, x2)| *x1 ^= *x2);&#xD;&#xA;&#xD;&#xA;let new_account = T::AccountId::decode(bytesA)&#xD;&#xA;    .expect(&#xD;&#xA;        &quot;all bytes are valid accounts, and the source of&#xD;&#xA;        these bytes is the xor of two other accounts, thus&#xD;&#xA;        this must also be a valid account. qed&quot;&#xD;&#xA;    );&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="369" PostHistoryTypeId="6" PostId="103" RevisionGUID="4c699bb4-6de4-4669-b37c-1a4fe680abb2" CreationDate="2022-02-09T23:26:37.300" UserId="28" Comment="edited tags" Text="|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="370" PostHistoryTypeId="2" PostId="107" RevisionGUID="f70ad471-2850-48bb-a842-0555bd38bf7d" CreationDate="2022-02-10T00:05:36.587" UserId="246" Text="When querying storage functions using [Polkascan's py-substrate-interface](https://github.com/polkascan/py-substrate-interface#storage-queries) how do you figure out which parameters are required? &#xD;&#xA;&#xD;&#xA;For example, I am trying to discern how much KSM is on Karura via storage functions in the tokens (ORML) pallet. &#xD;&#xA;&#xD;&#xA;See below code for example. I tried to `substrate.query()` [Tokens.TotalIssuance storage_function](https://karura.subscan.io/runtime/Tokens?version=2023#:~:text=Type-,TotalIssuance,-%7B%20%22origin%22%3A%20%22Map%22%2C%20%22n_map_type) but it requires 6 parameters:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    from substrateinterface import SubstrateInterface&#xD;&#xA; &#xD;&#xA;    substrate = SubstrateInterface(url=&quot;wss://karura-rpc-0.aca-api.network/&quot;) &#xD;&#xA;    &#xD;&#xA;    result = substrate.query(module='Tokens',storage_function='TotalIssuance')&#xD;&#xA;            &#xD;&#xA;    **ValueError**: Storage function requires 6 parameters, 0 given&#xD;&#xA;&#xD;&#xA;**Note**, I also tried to to use [`substrate.query_map()`](https://github.com/polkascan/py-substrate-interface#query-a-mapped-storage-function) for [Token.Accounts](https://karura.subscan.io/runtime/Tokens?version=2023#:~:text=352%2C%20%22value_id%22%3A%200%20%7D%20%7D-,Accounts,-%7B%20%22origin%22%3A%20%22Map%22%2C%20%22n_map_type) storage function but that requires 1 parameter which I can't discern.&#xD;&#xA;&#xD;&#xA;    result = substrate.query_map(&#xD;&#xA;    module='Tokens',&#xD;&#xA;    storage_function='Accounts',&#xD;&#xA;    page_size=10,&#xD;&#xA;    max_results = 100)&#xD;&#xA;    &#xD;&#xA;    **ValueError**: Storage function map requires 1 parameters, 0 given&#xD;&#xA;&#xD;&#xA;Does anyone have any advice on how to find out which parameters are required for `substrate.query()` &amp; `substrate.query_map()`? I have been digging around in the [library docs](https://polkascan.github.io/py-substrate-interface/#substrateinterface.SubstrateInterface.query) along with [substrate storage documentation](https://docs.substrate.io/v3/runtime/storage/) but I can't figure it out. &#xD;&#xA;&#xD;&#xA;**Other Note**: Through trial and error and comparing with Polkadot.JS queries (see screenshot) I managed to figure out that `substrate.query()` Tokens.Accounts for a KSM balance of a single Karura account requires two paramaters: `params = ['karura_address',{'Token':'KSM'}]`. &#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hCJEJ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/84LxH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="372" PostHistoryTypeId="1" PostId="107" RevisionGUID="f70ad471-2850-48bb-a842-0555bd38bf7d" CreationDate="2022-02-10T00:05:36.587" UserId="246" Text="How to determine which parameters are required when using substrate.query() to query a storage_function from polkascan's py-substrate-interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="373" PostHistoryTypeId="3" PostId="107" RevisionGUID="f70ad471-2850-48bb-a842-0555bd38bf7d" CreationDate="2022-02-10T00:05:36.587" UserId="246" Text="|query|python|polkascan|karura|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="374" PostHistoryTypeId="2" PostId="108" RevisionGUID="f1405fe1-da4e-404d-99bc-b1fedf002804" CreationDate="2022-02-10T00:13:04.133" UserId="28" Text="The answer in general is yes, Substrate and Polkadot use a transaction queue just like most other blockchains, and because of this it is possible to increase the transaction fees included with some transaction to give it a higher priority in the queue than another transaction.&#xD;&#xA;&#xD;&#xA;The order of transaction in the transaction queue is managed by a transaction's &quot;priority&quot;, and each chain may have some custom logic which is used to calculate that priority.&#xD;&#xA;&#xD;&#xA;In Polkadot, the easiest way to manipulate the transaction priority is to include a block author `tip`: https://wiki.polkadot.network/docs/learn-transaction-fees&#xD;&#xA;&#xD;&#xA;Your second question &quot;If so, how would one do this using polkadot-js?&quot;...&#xD;&#xA;&#xD;&#xA;Well probably I would not be making such a bot in Polkadot JS, since you would be unlikely to actually front-run any transactions with such a program. Instead, you probably need to build this logic into a custom Substrate / Polkadot client which itself is a block producer, and manipulates the transactions you are including in a block.&#xD;&#xA;&#xD;&#xA;However, if you want to learn how to increase the priority of your transaction using a tip in Polkadot JS, here is a [snippet](https://polkadot.js.org/docs/api/examples/promise/make-transfer):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const hash = await extrinsic.signAndSend(alice, { tip: amount });&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="376" PostHistoryTypeId="2" PostId="109" RevisionGUID="74fbc3da-949b-4ded-9039-a31cb63b7533" CreationDate="2022-02-10T01:21:21.297" UserId="104" Text="Each parachain has a crowdloan account when they conduct crowdloans for the purpose of winning a slot auction. How are these crowdloan accounts generated, and does the parachain have the private keys to access the accounts on their crowdloan accounts? Can they then submit extrinsics via the crowdloan account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="378" PostHistoryTypeId="1" PostId="109" RevisionGUID="74fbc3da-949b-4ded-9039-a31cb63b7533" CreationDate="2022-02-10T01:21:21.297" UserId="104" Text="How do parachain crowdloan accounts work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="379" PostHistoryTypeId="3" PostId="109" RevisionGUID="74fbc3da-949b-4ded-9039-a31cb63b7533" CreationDate="2022-02-10T01:21:21.297" UserId="104" Text="|parachain|account|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="380" PostHistoryTypeId="6" PostId="46" RevisionGUID="a434b2bf-daba-446d-876b-6d2f44cbe343" CreationDate="2022-02-10T01:45:29.653" UserId="104" Comment="Fix typo on tag" Text="|try-runtime|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="381" PostHistoryTypeId="24" PostId="46" RevisionGUID="a434b2bf-daba-446d-876b-6d2f44cbe343" CreationDate="2022-02-10T01:45:29.653" Comment="Proposed by 104 approved by 116 edit id of 25" ContentLicense="CC BY-SA 4.0" />
  <row Id="386" PostHistoryTypeId="2" PostId="111" RevisionGUID="67086360-7a47-4d68-ac49-c165d3b96912" CreationDate="2022-02-10T02:56:11.727" UserId="252" Text="From the [link][1], It seems format! can work in [Substrate][2] runtime.&#xD;&#xA;&#xD;&#xA;    let hello_world = sp_std::fmt::format!(&quot;Hello,{}&quot;,&quot;world&quot;);&#xD;&#xA;&#xD;&#xA;I want to have a variable `hello_world` and use it for latter。&#xD;&#xA;&#xD;&#xA;But I always get an error : could not find `format` in `fmt`&#xD;&#xA;&#xD;&#xA;I have searched for a long time, I also refs: [how to use format! in no_std][3]&#xD;&#xA;&#xD;&#xA;I have been confused for several days.&#xD;&#xA;&#xD;&#xA;The [link][1] is not correct? Are there some stories behind this?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-std/2.0.0-rc3/sp_std/fmt/index.html&#xD;&#xA;  [2]: https://substrate.io/&#xD;&#xA;  [3]: https://stackoverflow.com/questions/50200268/how-can-i-use-the-format-macro-in-a-no-std-environment" ContentLicense="CC BY-SA 4.0" />
  <row Id="388" PostHistoryTypeId="1" PostId="111" RevisionGUID="67086360-7a47-4d68-ac49-c165d3b96912" CreationDate="2022-02-10T02:56:11.727" UserId="252" Text="Is it possible to use format! in Substrate runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="389" PostHistoryTypeId="3" PostId="111" RevisionGUID="67086360-7a47-4d68-ac49-c165d3b96912" CreationDate="2022-02-10T02:56:11.727" UserId="252" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="390" PostHistoryTypeId="2" PostId="112" RevisionGUID="44f58d34-0014-4ab2-8a54-9cd74083a077" CreationDate="2022-02-10T03:11:34.827" UserId="104" Text="The item referred by the path `sp_std::fmt::format` is actually a function, rather than a macro. See [documentation][1].&#xD;&#xA;&#xD;&#xA;The fundamental problem though is that under a `no_std` environment, the `format!` macro doesn't exist, as it requires allocating a `String`, which is a struct that only exists in `std`.&#xD;&#xA;&#xD;&#xA;Thus, you won't be able to use the `format!` macro in the Substrate runtime. The documentation that you see on that page is simply showing you the docs from the standard library, as you can see [here][2]; there's no difference between what you're reading and the stdlib's documentation page on the `fmt` module.&#xD;&#xA;&#xD;&#xA;In addition, Rust macros are always hoisted up to the crate-level, rather than stay in the module in which they are defined. This means that if the `format!` macro existed, then the proper way to reference it would be `sp_std::format!` instead of `sp_std::fmt::format!`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_std/fmt/fn.format.html&#xD;&#xA;  [2]: https://doc.rust-lang.org/stable/std/fmt/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="392" PostHistoryTypeId="2" PostId="113" RevisionGUID="4d158b58-05c2-4e68-a817-7be1903660ac" CreationDate="2022-02-10T04:39:51.210" UserId="1789" Text="I was following this tutorial https://docs.substrate.io/tutorials/v3/kitties/pt1/&#xD;&#xA;&#xD;&#xA;after pulling from the https://github.com/substrate-developer-hub/substrate-node-template  and its tutorials/solutions/kitties branch, VS Code rust-analyzer indicates errors below...&#xD;&#xA;I have made no change at all.&#xD;&#xA;&#xD;&#xA;in runtime/src/lib.rs&#xD;&#xA;&#xD;&#xA; - error1: OUT_DIR not set, enable &quot;run build scripts&quot; to fix &#xD;&#xA; - error2:&#xD;&#xA;   unresolved import&#xD;&#xA; - error3: unresolved import&#xD;&#xA; - error4: unresolved import&#xD;&#xA; - rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.toml file ../substrate-node-template-tutoSolnKitties/Cargo.toml, cargo 1.58.0 (f01b232bc 2022-01-19): Failed to run &quot;cargo&quot; &quot;metadata&quot; &quot;--format-version&quot; &quot;1&quot; &quot;--manifest-path&quot; &quot;../substrate-node-template-tutoSolnKitties/Cargo.toml&quot; &quot;--filter-platform&quot; &quot;x86_64-unknown-linux-gnu&quot;: cargo metadata exited with an error: Updating git repository https://github.com/paritytech/substrate.git error: failed to get frame-benchmarking as a dependency of package node-template v4.0.0-dev (../substrate-node-template-tutoSolnKitties/node) Caused by: failed to load source for dependency frame-benchmarking Caused by: Unable to update https://github.com/paritytech/substrate.git?tag=devhub/latest#352c46a6 Caused by: object not found - no match for id (352c46a648a5f2d4526e790a184daa4a1ffdb3bf); class=Odb (9); code=N...&#xD;&#xA;&#xD;&#xA;and many &quot;unresolved import&quot; errors in node/src/chain_spec.rs, node/src/rpc.rs, node/src/service.rs files&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then the build failed, too&#xD;&#xA;&#xD;&#xA;    cargo build -p pallet-kitties&#xD;&#xA;&#xD;&#xA;substrate-node-template-tutoSolnKitties git:(tutorials/solutions/kitties) cargo build -p pallet-kitties&#xD;&#xA;&#xD;&#xA;Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;error: failed to get `frame-benchmarking` as a dependency of package `node-template v4.0.0-dev (../substrate-node-template-tutoSolnKitties/node)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load source for dependency `frame-benchmarking`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech/substrate.git?tag=devhub/latest#352c46a6&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  object not found - no match for id (352c46a648a5f2d4526e790a184daa4a1ffdb3bf); class=Odb (9); code=NotFound (-3)&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Environment&#xD;&#xA;- VS Code the latest&#xD;&#xA;- rust-analyzer v0.3.933&#xD;&#xA;- Linux Mint 20.3 Una with base: Ubuntu 20.04 focal&#xD;&#xA;- Rust 1.58.1&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GHQN0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="394" PostHistoryTypeId="1" PostId="113" RevisionGUID="4d158b58-05c2-4e68-a817-7be1903660ac" CreationDate="2022-02-10T04:39:51.210" UserId="1789" Text="substrate-node-template kitties tutorial build fails" ContentLicense="CC BY-SA 4.0" />
  <row Id="395" PostHistoryTypeId="3" PostId="113" RevisionGUID="4d158b58-05c2-4e68-a817-7be1903660ac" CreationDate="2022-02-10T04:39:51.210" UserId="1789" Text="|substrate-node|kitties|" ContentLicense="CC BY-SA 4.0" />
  <row Id="396" PostHistoryTypeId="5" PostId="112" RevisionGUID="df7093b9-83e4-4352-91c6-5309aabee241" CreationDate="2022-02-10T05:57:20.650" UserId="104" Comment="added 3 characters in body" Text="The item referred by the path `sp_std::fmt::format` is actually a function, rather than a macro. See [documentation][1].&#xD;&#xA;&#xD;&#xA;The fundamental problem though is that under a `no_std` environment, the `format!` macro doesn't exist, as it requires allocating a `String`, which is a struct that only exists in `std`.&#xD;&#xA;&#xD;&#xA;Thus, you won't be able to use the `format!` macro in the Substrate runtime. The documentation that you see on that page is simply showing you the docs from the standard library, as you can see [here][2]; there's no difference between what you're reading and the stdlib's documentation page on the `fmt` module.&#xD;&#xA;&#xD;&#xA;In addition, Rust macros are always hoisted up to the crate-level, rather than staying in the module in which they are defined. This means that if the `format!` macro existed, then the proper way to reference it would be `sp_std::format!` instead of `sp_std::fmt::format!`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_std/fmt/fn.format.html&#xD;&#xA;  [2]: https://doc.rust-lang.org/stable/std/fmt/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="397" PostHistoryTypeId="2" PostId="114" RevisionGUID="c23d819d-5026-4c36-b3d3-93ea94131429" CreationDate="2022-02-10T06:27:43.690" UserId="139" Text="I believe I'd asked a similar question on stackoverflow a while ago and it may answer your question: https://stackoverflow.com/questions/70845959/balances-accountstore-definition-in-substrate-runtime&#xD;&#xA;&#xD;&#xA;Specifically this paragraph: &#xD;&#xA;&#xD;&#xA;&gt; Storing account balances in the system pallet also maintains some other frame_system information that may be important to keep around for a certain runtime configuration. But having consumers, providers and sufficients inside a runtime with multiple pallets and potentially interacting with other runtimes becomes quite crucial." ContentLicense="CC BY-SA 4.0" />
  <row Id="400" PostHistoryTypeId="2" PostId="115" RevisionGUID="1de2c394-287c-4183-9c8b-b84c80ef39a3" CreationDate="2022-02-10T06:33:09.433" UserId="73" Text="Using `String` in the runtime is discouraged by Substrate, because it most often means that you are doing something &quot;wrong&quot;. Aka user data should not be stored on chain, you should instead store a hash of the data. &#xD;&#xA;&#xD;&#xA;Nevertheless, it is still possible to access a `String` or even `format!`. Format is for example available using `sp_std::alloc::format!()`. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="402" PostHistoryTypeId="2" PostId="116" RevisionGUID="15973903-aa3f-479a-b383-d65b7b8e2f7f" CreationDate="2022-02-10T06:58:28.813" UserId="73" Text="If you have the `Call` in your Runtime, you can use [`GetCallMetadata::get_call_metadata()`][1] and then use the [`CallMetadata::function_name`][2] to get the name you are searching for.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/frame-support/latest/frame_support/traits/trait.GetCallMetadata.html#tymethod.get_call_metadata&#xD;&#xA;  [2]: https://docs.rs/frame-support/latest/frame_support/traits/struct.CallMetadata.html#structfield.function_name" ContentLicense="CC BY-SA 4.0" />
  <row Id="404" PostHistoryTypeId="5" PostId="53" RevisionGUID="ffcc1684-36e2-4e13-8d62-54701dc4b2ff" CreationDate="2022-02-10T07:36:21.043" UserId="151" Comment="added 8 characters in body" Text="There is a bunch of different Substrate client libraries in the [Substrate documentation][1]&#xD;&#xA;&#xD;&#xA;Besides those referenced in the above link, there is also the [Polkadot Java Client][2].&#xD;&#xA;&#xD;&#xA;There are other ways to interact with a Substrate blockchain, depending on your needs, such as the [Substrate Sidecar API][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/integration/client-libraries/&#xD;&#xA;  [2]: https://github.com/emeraldpay/polkaj&#xD;&#xA;  [3]: https://github.com/paritytech/substrate-api-sidecar" ContentLicense="CC BY-SA 4.0" />
  <row Id="409" PostHistoryTypeId="2" PostId="118" RevisionGUID="6e46dba4-e12a-4f15-8af0-3c919216d249" CreationDate="2022-02-10T08:49:46.573" UserId="221" Text="When uploading the wasm binary, as a compiled smart contract on the 'ink-workshop' - the `canvas-ui` that I am running just errors. &#xD;&#xA;&#xD;&#xA;Canvas-ui error:&#xD;&#xA;&#xD;&#xA;    Uncaught error. Something went wrong with the query and rendering of this component. &#xD;&#xA;    Cannot read properties of undefined (reading 'args')&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/d3gVF.png&#xD;&#xA;&#xD;&#xA;Step: 'Drag the flipper.contract file that contains the bundled wasm blob....'&#xD;&#xA;&#xD;&#xA;The Github issues section associated is read-only, hence why I am posting here. Anyone know what might be the problem here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="411" PostHistoryTypeId="1" PostId="118" RevisionGUID="6e46dba4-e12a-4f15-8af0-3c919216d249" CreationDate="2022-02-10T08:49:46.573" UserId="221" Text="canvas-ui error on flipper.contract upload during substrate ink-workshop" ContentLicense="CC BY-SA 4.0" />
  <row Id="412" PostHistoryTypeId="3" PostId="118" RevisionGUID="6e46dba4-e12a-4f15-8af0-3c919216d249" CreationDate="2022-02-10T08:49:46.573" UserId="221" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="413" PostHistoryTypeId="2" PostId="119" RevisionGUID="3892b5fa-6b50-439e-822f-9dd2b8362b24" CreationDate="2022-02-10T09:47:01.030" UserId="16" Text="There was an update to the metadata format of a contract (part of the `.contract` file). The Canvas UI referenced in the tutorial wasn't updated to handle this. Reason for that is that it is soon to be replaced by [Contracts UI](https://github.com/paritytech/contracts-ui).&#xD;&#xA;&#xD;&#xA;In the meantime you should use the `Developer -&gt; Contracts` tab of [Polkadot.js Apps](https://polkadot.js.org/apps) to interact with your contracts. You can use the sidebar on the top left to connect to a local node [1].&#xD;&#xA;&#xD;&#xA;[![Screenshot of Polkadot.js Apps][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/PIxAz.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="415" PostHistoryTypeId="2" PostId="120" RevisionGUID="4a3f78d2-a954-43cc-a44d-e1a3802dc557" CreationDate="2022-02-10T10:13:45.277" UserId="264" Text="I'm trying to deploy basic erc20 example contract on rococo canvas but &quot;contracts.ContractTrapped&quot; error popped on deployment? most probably its a problem in INK release version I'm using rs7. &#xD;&#xA;Any hint will be much appreciated, Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="417" PostHistoryTypeId="1" PostId="120" RevisionGUID="4a3f78d2-a954-43cc-a44d-e1a3802dc557" CreationDate="2022-02-10T10:13:45.277" UserId="264" Text="polkadot canvas testnet contract deploy error &quot;contracts.contractTrapped&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="418" PostHistoryTypeId="3" PostId="120" RevisionGUID="4a3f78d2-a954-43cc-a44d-e1a3802dc557" CreationDate="2022-02-10T10:13:45.277" UserId="264" Text="|ink|blockchain|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="419" PostHistoryTypeId="2" PostId="121" RevisionGUID="90771426-d907-485e-b12a-565f4b6ed9d9" CreationDate="2022-02-10T10:18:54.683" UserId="260" Text="I've been watching Substrate_ tutorials for a while now, with the goal of learning a little more about their technology. &#xD;&#xA;&#xD;&#xA;My question is: &#xD;&#xA;&#xD;&#xA;**Would random number generation using [Randomness][1] be feasible in a production system?**&#xD;&#xA;&#xD;&#xA;Specifically using the [BABE palette][2].&#xD;&#xA;&#xD;&#xA;Let's take for example the case of a Lottery (a lottery where a lot of money would be at stake) and where we would use this random library for the generation of the winning numbers.&#xD;&#xA;&#xD;&#xA;Thank you very much&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/randomness/&#xD;&#xA;  [2]: https://docs.substrate.io/rustdocs/latest/pallet_babe/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="421" PostHistoryTypeId="1" PostId="121" RevisionGUID="90771426-d907-485e-b12a-565f4b6ed9d9" CreationDate="2022-02-10T10:18:54.683" UserId="260" Text="Secure random number generation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="422" PostHistoryTypeId="3" PostId="121" RevisionGUID="90771426-d907-485e-b12a-565f4b6ed9d9" CreationDate="2022-02-10T10:18:54.683" UserId="260" Text="|babe|random|" ContentLicense="CC BY-SA 4.0" />
  <row Id="424" PostHistoryTypeId="2" PostId="122" RevisionGUID="cddd7227-4617-42ae-b6f2-a2075c7532bd" CreationDate="2022-02-10T10:32:53.910" UserId="227" Text="I'm posting a link to the discussion on GitHub: https://github.com/paritytech/ink/issues/1125.&#xD;&#xA;&#xD;&#xA;AFAIK there is currently only the the possibility to do this with the redspot tool mentioned in the issue. I haven't tried it out myself though. Would be great if you could post in the issue if you managed to get it done." ContentLicense="CC BY-SA 4.0" />
  <row Id="426" PostHistoryTypeId="2" PostId="123" RevisionGUID="71c7eca7-9d8c-4983-ac00-3783693d54d0" CreationDate="2022-02-10T10:59:48.053" UserId="271" Text="I have a live network working on Substrate V3 and MetadataV12. How can I migrate to the MetadataV14?&#xD;&#xA;&#xD;&#xA;The MetadataV14 is a part of the Substrate V4. Unfortunately Substrate V4 isn't released. " ContentLicense="CC BY-SA 4.0" />
  <row Id="428" PostHistoryTypeId="1" PostId="123" RevisionGUID="71c7eca7-9d8c-4983-ac00-3783693d54d0" CreationDate="2022-02-10T10:59:48.053" UserId="271" Text="How to migrate to metadataV14" ContentLicense="CC BY-SA 4.0" />
  <row Id="429" PostHistoryTypeId="3" PostId="123" RevisionGUID="71c7eca7-9d8c-4983-ac00-3783693d54d0" CreationDate="2022-02-10T10:59:48.053" UserId="271" Text="|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="430" PostHistoryTypeId="2" PostId="124" RevisionGUID="3e452806-a997-4026-be0b-bbff5179e7a9" CreationDate="2022-02-10T11:03:37.803" UserId="270" Text="Not a full answer but some context that might help:&#xD;&#xA;&#xD;&#xA;Babe pallet provides 3 implementation of randomness:&#xD;&#xA;&#xD;&#xA; * [CurrentBlockRandomness][1]&#xD;&#xA; * [RandomnessFromOneEpochAgo][2]&#xD;&#xA; * [RandomnessFromTwoEpochAgo][3]&#xD;&#xA;&#xD;&#xA;In the documentation you can see the constraints and adversaries for each implementation.&#xD;&#xA;&#xD;&#xA;&gt; Would random number generation using Randomness be feasible in a production system?&#xD;&#xA;&#xD;&#xA;AFAIK it is already used to determine parachain auctions ending times in Kusama.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/monthly-2021-09+1/pallet_babe/struct.CurrentBlockRandomness.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/monthly-2021-09+1/pallet_babe/struct.RandomnessFromOneEpochAgo.html&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/monthly-2021-09+1/pallet_babe/struct.RandomnessFromTwoEpochsAgo.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="432" PostHistoryTypeId="2" PostId="125" RevisionGUID="da75826a-6bbc-4ff4-bf67-9f88755e9336" CreationDate="2022-02-10T11:40:08.397" UserId="139" Text="Currently this is how I am making a `transaction_pool` for a Light service&#xD;&#xA;```rust&#xD;&#xA;let transaction_pool = Arc::new(sc_transaction_pool::LightPool::new_light(&#xD;&#xA;		config.transaction_pool.clone(),&#xD;&#xA;		config.prometheus_registry(),&#xD;&#xA;		task_manager.spawn_handle(),&#xD;&#xA;		client.clone(),&#xD;&#xA;		on_demand.clone(),&#xD;&#xA;	));&#xD;&#xA;```&#xD;&#xA;and the compiler is unhappy about `task_manager.spawn_handle()` not implementing. So I look at the docs and find a `spawn_essential_handle()` which fixes the error. &#xD;&#xA;&#xD;&#xA;My question out of curiousity is why are there two versions of `spawn_handles`? I can read and make out that `spawn_essential_handle` is supposed to take the node down with it if the task it spawned failed. Any other differences we should know about? " ContentLicense="CC BY-SA 4.0" />
  <row Id="434" PostHistoryTypeId="1" PostId="125" RevisionGUID="da75826a-6bbc-4ff4-bf67-9f88755e9336" CreationDate="2022-02-10T11:40:08.397" UserId="139" Text="Difference between spawn_handle() and spawn_essential_handle()" ContentLicense="CC BY-SA 4.0" />
  <row Id="435" PostHistoryTypeId="3" PostId="125" RevisionGUID="da75826a-6bbc-4ff4-bf67-9f88755e9336" CreationDate="2022-02-10T11:40:08.397" UserId="139" Text="|service|" ContentLicense="CC BY-SA 4.0" />
  <row Id="436" PostHistoryTypeId="2" PostId="126" RevisionGUID="3c1f8bee-6d5a-4b8f-8ffa-4f07f60af2d9" CreationDate="2022-02-10T11:45:29.657" UserId="172" Text="To migrate your chain to the V14 metadata system, follow these steps (from this [upgrade guide][1]):&#xD;&#xA; 1. Remove any `#[pallet::metadata(..)]` attributes from your pallet's Event definition.&#xD;&#xA; 2. Add `scale-info` as a dependency to your pallet and runtime crates:&#xD;&#xA;* `scale-info = { version = &quot;1.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }`&#xD;&#xA;* `std = [ &quot;scale-info/std&quot; ]`&#xD;&#xA; 3. Derive `scale_info::TypeInfo` for any types which derive `Decode`, `Encode`(*). For example: &#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)]&#xD;&#xA;struct HeartbeatStatus&lt;BlockNumber&gt; {&#xD;&#xA;	pub session_index: SessionIndex,&#xD;&#xA;	pub sent_at: BlockNumber,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;4. Update any pallet Call variant constructors to use named structs (previously unnamed tuple structs). &#xD;&#xA;5. Update the metadata runtime API call:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl sp_api::Metadata&lt;Block&gt; for Runtime {&#xD;&#xA;    fn metadata() -&gt; OpaqueMetadata {&#xD;&#xA;        OpaqueMetadata::new(Runtime::metadata().into())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(*) If the type is in a separate crate to the pallet, add the scale-info dependency as above.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://gist.github.com/ascjones/0d81a4c44e84cacd9f714cd34a6de823" ContentLicense="CC BY-SA 4.0" />
  <row Id="438" PostHistoryTypeId="2" PostId="127" RevisionGUID="405189d4-ab20-41e5-bf0f-048514a7c000" CreationDate="2022-02-10T11:53:49.097" UserId="73" Text="No, that is the difference.&#xD;&#xA;&#xD;&#xA;The idea is that you can spawn these essential tasks and if the future resolves it means the node needs to stop. For example because the import pipeline stopped working. Otherwise there is no difference." ContentLicense="CC BY-SA 4.0" />
  <row Id="441" PostHistoryTypeId="2" PostId="128" RevisionGUID="2a214c15-0283-4c52-a80f-aa734111a51e" CreationDate="2022-02-10T12:17:05.990" UserId="28" Text="On-chain randomness on any public, decentralized, and deterministic system like a blockchain is difficult.&#xD;&#xA;&#xD;&#xA;BABE pallet does provide a source of on-chain randomness, but it has its own limits for security, especially when it comes to being used to win money on chain.&#xD;&#xA;&#xD;&#xA;Here is the security note included in the BABE pallet about it's randomness:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	/// # Security&#xD;&#xA;	///&#xD;&#xA;	/// This MUST NOT be used for gambling, as it can be influenced by a&#xD;&#xA;	/// malicious validator in the short term. It MAY be used in many&#xD;&#xA;	/// cryptographic protocols, however, so long as one remembers that this&#xD;&#xA;	/// (like everything else on-chain) it is public. For example, it can be&#xD;&#xA;	/// used where a number is needed that cannot have been chosen by an&#xD;&#xA;	/// adversary, for purposes such as public-coin zero-knowledge proofs.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The way BABE randomness works is that each block producer includes some additional randomness which they can verifiably generate which modifies the current randomness.&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-randomness&#xD;&#xA;&#xD;&#xA;This means, to fully control the random value generated, you would need the collusion of all block producers before you, which is extremely unlikely.&#xD;&#xA;&#xD;&#xA;However, for the purposes of lottery systems, you don't necessarily need to have every block producer collude to gain an advantage. If the value earned by the lottery is worth more than the value earned by building a block, then you can imagine it would be in the interest of a block producer participating in the lottery to not produce a block where they are not the winner.&#xD;&#xA;&#xD;&#xA;And this is where ultimately the security of this randomness value breaks down, and where you need to make your own analysis of attack scenarios to using this randomness.&#xD;&#xA;&#xD;&#xA;What we have in Polkadot is good enough for things like candle auctions for choose parachains, but probably not good enough for the mega-millions lottery system. There is no hard science on exactly where things break down since it is all game-theoretical, but understanding how randomness is generated and can be influenced should give you an impression on where it can and cannot be used." ContentLicense="CC BY-SA 4.0" />
  <row Id="443" PostHistoryTypeId="5" PostId="125" RevisionGUID="51190d9e-6fb7-4924-91da-3b9d96e2f813" CreationDate="2022-02-10T12:25:33.683" UserId="139" Comment="added 20 characters in body" Text="Currently this is how I am making a `transaction_pool` for a Light service&#xD;&#xA;```rust&#xD;&#xA;let transaction_pool = Arc::new(sc_transaction_pool::LightPool::new_light(&#xD;&#xA;		config.transaction_pool.clone(),&#xD;&#xA;		config.prometheus_registry(),&#xD;&#xA;		task_manager.spawn_handle(),&#xD;&#xA;		client.clone(),&#xD;&#xA;		on_demand.clone(),&#xD;&#xA;	));&#xD;&#xA;```&#xD;&#xA;and the compiler is unhappy about `task_manager.spawn_handle()` not implementing SpawnEssentialNamed. So I look at the docs and find a `spawn_essential_handle()` which fixes the error. &#xD;&#xA;&#xD;&#xA;My question out of curiousity is why are there two versions of `spawn_handles`? I can read and make out that `spawn_essential_handle` is supposed to take the node down with it if the task it spawned failed. Any other differences we should know about? " ContentLicense="CC BY-SA 4.0" />
  <row Id="444" PostHistoryTypeId="2" PostId="129" RevisionGUID="d108bb1f-a50e-45b6-8e6a-cf6e0327f458" CreationDate="2022-02-10T13:59:13.080" UserId="139" Text="Often times you'll see `Perbill` used throughout substrate. It stands for Parts per billion, and here's an example of it being used: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How should one interpret this though? " ContentLicense="CC BY-SA 4.0" />
  <row Id="446" PostHistoryTypeId="1" PostId="129" RevisionGUID="d108bb1f-a50e-45b6-8e6a-cf6e0327f458" CreationDate="2022-02-10T13:59:13.080" UserId="139" Text="What is Perbill and where should it be used?" ContentLicense="CC BY-SA 4.0" />
  <row Id="447" PostHistoryTypeId="3" PostId="129" RevisionGUID="d108bb1f-a50e-45b6-8e6a-cf6e0327f458" CreationDate="2022-02-10T13:59:13.080" UserId="139" Text="|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="448" PostHistoryTypeId="2" PostId="130" RevisionGUID="5d49ffdc-f652-4a37-b6c9-d050a6e36f4a" CreationDate="2022-02-10T13:59:21.487" UserId="85" Text="Most projects rarely actually want to write their own consensus, and prefer to use one of the prebuilt consensus pallets. Writing your own consensus is obviously non-trivial but if that's the thing that your set on, take a look at [Aleph Zero][1]'s codebase. They have implemented their own (DAG) consensus while using a lot of the other standard substrate modules. Their blog post explains why for them, substrate made a lot of sense: https://alephzero.org/blog/substrate-aleph-zero-consensus/ &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/aleph-zero-foundation/aleph-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="452" PostHistoryTypeId="2" PostId="131" RevisionGUID="04158fea-9300-4701-bc47-a1a88acabf98" CreationDate="2022-02-10T14:44:07.773" UserId="276" Text="It is indeed a bit cumbersome to figure out a) what are the parameters for a storage function when this is not a primitive but a complex type and b) how to specify this that is correctly encoded.&#xD;&#xA;&#xD;&#xA;I tried to figured this out purely using the library and this resulted in the following example:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;# Retrieve storage function to get information about value and param types&#xD;&#xA;storage_function = substrate.get_metadata_storage_function(&quot;Tokens&quot;, &quot;TotalIssuance&quot;)&#xD;&#xA;&#xD;&#xA;# Amount of params&#xD;&#xA;print(len(storage_function.get_params_type_string())) # 1&#xD;&#xA;&#xD;&#xA;# Retrieve a SCALE object of the param type&#xD;&#xA;param_type = substrate.create_scale_object(storage_function.get_params_type_string()[0])&#xD;&#xA;&#xD;&#xA;# Possible options of Enum type&#xD;&#xA;print(param_type.type_mapping)&#xD;&#xA;# [('Token', 'scale_info::42'), ('DexShare', '(scale_info::43, scale_info::43)'), ('Erc20', 'scale_info::44'), ('StableAssetPoolToken', 'scale_info::4'), ('LiquidCrowdloan', 'scale_info::4'), ('ForeignAsset', 'scale_info::35')]&#xD;&#xA;&#xD;&#xA;# So if I want to use the 'Token' option: SCALE type is 'scale_info::42'&#xD;&#xA;token_param = substrate.create_scale_object(param_type.type_mapping[0][1])&#xD;&#xA;&#xD;&#xA;# Show possible options of Tokens&#xD;&#xA;print(token_param.type_mapping)&#xD;&#xA;# [('ACA', 'Null'), ('AUSD', 'Null'), ('DOT', 'Null'), ('LDOT', 'Null'), (None, 'Null'), (None, 'Null') ....&#xD;&#xA;&#xD;&#xA;# So now if I want to show the TotalIssuance of the `Token` `KSM`:&#xD;&#xA;result = substrate.query(&#xD;&#xA;    module='Tokens',&#xD;&#xA;    storage_function='TotalIssuance',&#xD;&#xA;    params=[{'Token': 'KSM'}]&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;# Result is U128 object with value 81190424615873229&#xD;&#xA;print(result.value)&#xD;&#xA;# 81190424615873229&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As said, this is not very intuitive.. &#xD;&#xA;&#xD;&#xA;It becomes more clear when using the `query_map()` function (get all results, omitting the param)&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;# Query the Mapped storage function&#xD;&#xA;result_map = substrate.query_map(module='Tokens', storage_function='TotalIssuance')&#xD;&#xA;&#xD;&#xA;print(list(result_map))&#xD;&#xA;# [[&lt;scale_info::41(value={'DexShare': ({'Token': 'KSM'}, {'Token': 'LKSM'})})&gt;, &lt;U128(value=19811150500020714)&gt;], [&lt;scale_info::41(value={'DexShare': ({'Token': 'KUSD'}, {'Token': 'BNC'})})&gt;, &lt;U128(value=2953340214648797607)&gt;], [&lt;scale_info::41(value={'DexShare': ({'Token': 'KSM'}, {'ForeignAsset': 0})})&gt;, &lt;U128(value=5454135724694137)&gt;], ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here you will see the key to use immediately. There is clearly a need for an easier way to retrieve this information from the storage function, I will submit an issue for this feature request" ContentLicense="CC BY-SA 4.0" />
  <row Id="455" PostHistoryTypeId="6" PostId="94" RevisionGUID="d1b636d3-3eb3-47b4-a6ae-37b68cd5e4f6" CreationDate="2022-02-10T15:54:58.720" UserId="104" Comment="Fix typo on tag" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="456" PostHistoryTypeId="24" PostId="94" RevisionGUID="d1b636d3-3eb3-47b4-a6ae-37b68cd5e4f6" CreationDate="2022-02-10T15:54:58.720" Comment="Proposed by 104 approved by 28, 178 edit id of 23" ContentLicense="CC BY-SA 4.0" />
  <row Id="457" PostHistoryTypeId="5" PostId="43" RevisionGUID="986821b3-36a3-49c2-a597-e047cd5e9a01" CreationDate="2022-02-10T15:55:05.473" UserId="116" Comment="Spelling in header" Text="I need to store the chain state after some interval and start it with new genesis how i can do that,please read this [issue][1] for reference  &#xD;&#xA;also is there any other way to achieve this expect re-genesis.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/7458" ContentLicense="CC BY-SA 4.0" />
  <row Id="458" PostHistoryTypeId="4" PostId="43" RevisionGUID="986821b3-36a3-49c2-a597-e047cd5e9a01" CreationDate="2022-02-10T15:55:05.473" UserId="116" Comment="Spelling in header" Text="How to do re-genesis in a running substrate chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="459" PostHistoryTypeId="24" PostId="43" RevisionGUID="986821b3-36a3-49c2-a597-e047cd5e9a01" CreationDate="2022-02-10T15:55:05.473" Comment="Proposed by 116 approved by 178 edit id of 6" ContentLicense="CC BY-SA 4.0" />
  <row Id="460" PostHistoryTypeId="2" PostId="132" RevisionGUID="72085547-e401-4849-9cc6-ba070b032809" CreationDate="2022-02-10T16:07:16.660" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="462" PostHistoryTypeId="1" PostId="132" RevisionGUID="72085547-e401-4849-9cc6-ba070b032809" CreationDate="2022-02-10T16:07:16.660" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="463" PostHistoryTypeId="2" PostId="133" RevisionGUID="14bc8d4c-25a0-4b2f-931e-4fbdc089316e" CreationDate="2022-02-10T16:07:16.660" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="465" PostHistoryTypeId="1" PostId="133" RevisionGUID="14bc8d4c-25a0-4b2f-931e-4fbdc089316e" CreationDate="2022-02-10T16:07:16.660" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="467" PostHistoryTypeId="2" PostId="134" RevisionGUID="1d5bc848-f0da-4a26-b95f-f187fe5ab272" CreationDate="2022-02-10T16:51:23.993" UserId="34" Text="Blockchains require deterministic results. With arithmetic, we use [fixed point numbers](https://en.wikipedia.org/wiki/Fixed-point_arithmetic) (integers typically) to ensure this. It is very convenient to use things like [`.from_percent()`](https://docs.substrate.io/rustdocs/latest/sp_arithmetic/per_things/struct.Perbill.html#method.from_percent) more commonly used in association with floating point numbers, so this is just a handy tool with many others in [`sp_arithmetic::per_things`](https://docs.substrate.io/rustdocs/latest/sp_arithmetic/per_things/index.html) to help you use _correct_ implementations for Substrate, with various levels of overall precision (if your primitive type using `Perthing` can support this accuracy, typically accommodated by larger types like `u128` or more).&#xD;&#xA;&#xD;&#xA;Here is the [constants.rs](https://github.com/paritytech/polkadot/blob/master/runtime/kusama/constants/src/lib.rs) file for Kusama for reference and an example of such use:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Fee-related.&#xD;&#xA;pub mod fee { ... };&#xD;&#xA;    // -- SNIP --&#xD;&#xA;	/// The block saturation level. Fees will be updates based on this value.&#xD;&#xA;	pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);&#xD;&#xA;    // -- SNIP --&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Our goal is to fill 25% of the block, without needing to reason about the correct implementation of arithmetic. Using some `std` typical math that may lead to non-determinism in your runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="469" PostHistoryTypeId="2" PostId="135" RevisionGUID="18b0ef43-7ee7-486c-84cd-cea139f4bf91" CreationDate="2022-02-10T17:02:17.857" UserId="34" Text="I have completed the [Cumulus tutorial](https://docs.substrate.io/tutorials/v3/cumulus/start-relay/) and tested my parachain on `rococo-local` to work as expected. I would like to connect to the public testnet, but I don't have `sudo` capabilities to add my parachain. &#xD;&#xA;&#xD;&#xA;**How do I register my parathread and start producing para-blocks connected to Rococo?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="471" PostHistoryTypeId="1" PostId="135" RevisionGUID="18b0ef43-7ee7-486c-84cd-cea139f4bf91" CreationDate="2022-02-10T17:02:17.857" UserId="34" Text="How do I connect my parachain to Rococo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="472" PostHistoryTypeId="3" PostId="135" RevisionGUID="18b0ef43-7ee7-486c-84cd-cea139f4bf91" CreationDate="2022-02-10T17:02:17.857" UserId="34" Text="|parachain|cumulus|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="473" PostHistoryTypeId="5" PostId="19" RevisionGUID="624ebb53-ec58-45eb-b3b8-2a421ae5000e" CreationDate="2022-02-10T17:20:30.910" UserId="104" Comment="Remove question for an opinionated answer" Text="What is the biggest difference between evm-enabled blockchains built on top of the substrate&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="474" PostHistoryTypeId="4" PostId="19" RevisionGUID="624ebb53-ec58-45eb-b3b8-2a421ae5000e" CreationDate="2022-02-10T17:20:30.910" UserId="104" Comment="Remove question for an opinionated answer" Text="What is the biggest difference between evm-enabled blockchains built on top of the substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="475" PostHistoryTypeId="24" PostId="19" RevisionGUID="624ebb53-ec58-45eb-b3b8-2a421ae5000e" CreationDate="2022-02-10T17:20:30.910" Comment="Proposed by 104 approved by 178 edit id of 28" ContentLicense="CC BY-SA 4.0" />
  <row Id="476" PostHistoryTypeId="5" PostId="133" RevisionGUID="0fe63317-8de3-4b3b-a462-9ed04fe8c2e5" CreationDate="2022-02-10T17:20:36.887" UserId="151" Comment="added 86 characters in body" Text="eDSL to write smart contracts in Rust for blockchains built on the Substrate framework" ContentLicense="CC BY-SA 4.0" />
  <row Id="477" PostHistoryTypeId="24" PostId="133" RevisionGUID="0fe63317-8de3-4b3b-a462-9ed04fe8c2e5" CreationDate="2022-02-10T17:20:36.887" Comment="Proposed by 151 approved by 178 edit id of 27" ContentLicense="CC BY-SA 4.0" />
  <row Id="478" PostHistoryTypeId="5" PostId="68" RevisionGUID="13fc254a-795b-43e6-a565-4284ce25bea5" CreationDate="2022-02-10T17:20:44.537" UserId="151" Comment="added 269 characters in body" Text="Kusama is a scalable network of specialized blockchains built using Substrate and nearly the same codebase as Polkadot. The network is an experimental development environment for teams who want to move fast and innovate on Kusama, or prepare for deployment on Polkadot." ContentLicense="CC BY-SA 4.0" />
  <row Id="479" PostHistoryTypeId="24" PostId="68" RevisionGUID="13fc254a-795b-43e6-a565-4284ce25bea5" CreationDate="2022-02-10T17:20:44.537" Comment="Proposed by 151 approved by 178 edit id of 29" ContentLicense="CC BY-SA 4.0" />
  <row Id="480" PostHistoryTypeId="2" PostId="136" RevisionGUID="86e121fe-c5a8-444f-9568-de9f83f0c42c" CreationDate="2022-02-10T17:24:57.990" UserId="221" Text="The link on the `jupiter` [github](https://github.com/patractlabs/jupiter/) repo, the link for their faucet is broken. I was hoping to get some test DOT.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uaGje.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyone know which testnet could one use for WASM contract deploy and if they have a working link for their faucet? " ContentLicense="CC BY-SA 4.0" />
  <row Id="482" PostHistoryTypeId="1" PostId="136" RevisionGUID="86e121fe-c5a8-444f-9568-de9f83f0c42c" CreationDate="2022-02-10T17:24:57.990" UserId="221" Text="Jupiter testnet faucet link broken" ContentLicense="CC BY-SA 4.0" />
  <row Id="483" PostHistoryTypeId="3" PostId="136" RevisionGUID="86e121fe-c5a8-444f-9568-de9f83f0c42c" CreationDate="2022-02-10T17:24:57.990" UserId="221" Text="|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="484" PostHistoryTypeId="10" PostId="19" RevisionGUID="7d0996c7-3e4e-44c1-a6cc-1138b337a87e" CreationDate="2022-02-10T17:44:56.310" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:160,&quot;DisplayName&quot;:&quot;Afr&quot;},{&quot;Id&quot;:2,&quot;DisplayName&quot;:&quot;Glorfindel&quot;},{&quot;Id&quot;:103,&quot;DisplayName&quot;:&quot;user1271772&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="486" PostHistoryTypeId="2" PostId="137" RevisionGUID="d7450af8-8362-4b36-a232-d6740b6bc111" CreationDate="2022-02-10T18:37:23.333" UserId="165" Text="It's a concrete way of representing a part of a whole with precision.&#xD;&#xA;&#xD;&#xA;As you point out when you use any of the [per_things](https://docs.substrate.io/rustdocs/latest/sp_arithmetic/per_things/index.html) structs, what you are expressing a part of a whole.&#xD;&#xA;&#xD;&#xA;In case of percent ( as you might be more used to) when you refer to 100%, that's the unit, the total of the whole. So 100 out of 100 parts, that is the whole amount of units, which is the 100%. This way you can do a division of something in 100 parts and you can express a subset of it, being the half (50 parts out of 100 parts in this case) 50% and so on.&#xD;&#xA;&#xD;&#xA;*Example time!* - Imagine you have cake:&#xD;&#xA;&#xD;&#xA;If you want to divide the cake (the whole/ the unit) in 25 parts and you want to express it in percent terms, having 10 parts would be the 40% of the cake.&#xD;&#xA;&#xD;&#xA;Then, if for your use case happens to need higher precision for expressing a subset out of the whole you might go with something different than percent, that being perthousand, permill or perbill.&#xD;&#xA;&#xD;&#xA;Then, going back to the cake example, if you divide it in 1 billion parts, the precision goes up, but you can still express a sub set of all the parts of the cake by saying, I have the `Perbill::from_percent(40);` of the total of the cake. The amount of cake you have is the same than in the previous example, but is expressed with a crazy big precision for a cake (?) &#xD;&#xA;&#xD;&#xA;If you check the documentation, you will see that [Perbill::one()](https://paritytech.github.io/substrate/master/sp_runtime/struct.Perbill.html#method.one) and [Perbill::zero()](https://paritytech.github.io/substrate/master/sp_runtime/struct.Perbill.html#method.one) exist.&#xD;&#xA;And as stated&#xD;&#xA;&#xD;&#xA;&gt; Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1]&#xD;&#xA;&#xD;&#xA;- `Perbill::one()` will reference the total of the unit, all the parts of the cake.&#xD;&#xA;- `Perbill::zero()` will reference an empty set containing no parts at all from the total of parts." ContentLicense="CC BY-SA 4.0" />
  <row Id="488" PostHistoryTypeId="2" PostId="138" RevisionGUID="75320f15-7b8c-42a1-9ad4-cff1a5716989" CreationDate="2022-02-10T18:47:36.137" UserId="165" Text="You will need to reach out someone with access to Rococo's SUDO account and this person will help you onboard your parathread to a parachain.&#xD;&#xA;&#xD;&#xA;_At the moment of writing this answer that can be done joining [parachain technical element channel](https://matrix.to/#/#parachain-technical:matrix.parity.io)_&#xD;&#xA;&#xD;&#xA;If you are interested in knowing what is the purpose of Rococo network, please read this blog post https://polkadot.network/blog/rococo-revamp-becoming-a-community-parachain-testbed/" ContentLicense="CC BY-SA 4.0" />
  <row Id="490" PostHistoryTypeId="2" PostId="139" RevisionGUID="71416fff-38d1-4cf7-8bd8-f322cf89c196" CreationDate="2022-02-10T18:53:34.753" UserId="67" Text="After reading the [substrate documentation][1]:&#xD;&#xA;&gt; Child tries are useful when you want your own independent trie with a&#xD;&#xA;&gt; separate root hash that you can use to verify the specific content in&#xD;&#xA;&gt; that trie. Subsections of a trie do not have a root-hash-like&#xD;&#xA;&gt; representation that satisfy these needs automatically; thus a child&#xD;&#xA;&gt; trie is used instead.&#xD;&#xA;&#xD;&#xA;It's still not very clear when would I want to choose a child trie to solve a given problem. It would be useful to know with more down to earth examples and use cases(e.g. from existing chains) when someone should consider using this API.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/advanced/storage/#child-trie" ContentLicense="CC BY-SA 4.0" />
  <row Id="492" PostHistoryTypeId="1" PostId="139" RevisionGUID="71416fff-38d1-4cf7-8bd8-f322cf89c196" CreationDate="2022-02-10T18:53:34.753" UserId="67" Text="What are good use cases for child tries" ContentLicense="CC BY-SA 4.0" />
  <row Id="493" PostHistoryTypeId="3" PostId="139" RevisionGUID="71416fff-38d1-4cf7-8bd8-f322cf89c196" CreationDate="2022-02-10T18:53:34.753" UserId="67" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="494" PostHistoryTypeId="2" PostId="140" RevisionGUID="25cd6206-2e53-4807-a254-e28929ee766d" CreationDate="2022-02-10T18:59:33.143" UserId="285" Text="I am experimenting with the staking pallet on substrate V3.0 and I was trying to disable the functionality that allows new validators from joining. &#xD;&#xA;&#xD;&#xA;I would like to keep the staking functionality but just disable new validators from joining if possible.&#xD;&#xA;&#xD;&#xA;Looking at the `validate` extrinsic in the staking pallet, I can't see any obvious ways to disable it without changing the source code.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="496" PostHistoryTypeId="1" PostId="140" RevisionGUID="25cd6206-2e53-4807-a254-e28929ee766d" CreationDate="2022-02-10T18:59:33.143" UserId="285" Text="Is it possible to disable new validators from joining?" ContentLicense="CC BY-SA 4.0" />
  <row Id="497" PostHistoryTypeId="3" PostId="140" RevisionGUID="25cd6206-2e53-4807-a254-e28929ee766d" CreationDate="2022-02-10T18:59:33.143" UserId="285" Text="|pallet|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="498" PostHistoryTypeId="2" PostId="141" RevisionGUID="76611a3d-9619-449b-8829-02af05ae07f1" CreationDate="2022-02-10T19:09:00.437" UserId="28" Text="You could apply a filter to your runtime which would block users from making a call to the `validate` function.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Use this filter to block users from calling `validate` in the Staking pallet.&#xD;&#xA;pub struct DontAllowValidate;&#xD;&#xA;impl Contains&lt;Call&gt; for DontAllowValidate {&#xD;&#xA;	fn contains(c: &amp;Call) -&gt; bool {&#xD;&#xA;		!matches!(c, Call::Staking(pallet_staking::Call::register { .. }))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you configure your System pallet to use this filter:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;	type BaseCallFilter = DontAllowValidate;&#xD;&#xA;    // -- snip --&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This works for any call, and is how Polkadot and other chains disabled transfers or other kinds of calls in the bootstrapping stages of the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="504" PostHistoryTypeId="2" PostId="143" RevisionGUID="96e3ecd4-3506-4ed3-9c34-0b717db72b98" CreationDate="2022-02-10T19:13:16.093" UserId="283" Text="Hot-swappable consensus was an item on the roadmap for a while but has been indefinitely postponed because it's very involved and doesn't provide much real-world utility.&#xD;&#xA;&#xD;&#xA;Substrate enables modular consensus mostly through the `BlockImport` trait: this allows composable, custom, and atomic block import logic to be defined by code outside of the client. `BlockImport` can do custom checks on the block or even manipulate the block and provides input about the fork-choice rule to the `Client`. The `BlockImport` implementation that's used blocks the import pipeline and is guaranteed to be called for every single block imported by the node, whether it comes from authorship or the network or a file.&#xD;&#xA;&#xD;&#xA;The `Client` also exposes APIs to finalize blocks that are already present. &#xD;&#xA;&#xD;&#xA;Authoring and other consensus tasks are just normal futures that are executed in the background to implement things like finality gadgets or to create blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="506" PostHistoryTypeId="2" PostId="144" RevisionGUID="eee61dc5-550a-403d-83aa-1c0b4667d88a" CreationDate="2022-02-10T19:15:24.420" UserId="28" Text="From my perspective, there are two major features of a child-trie which would make it a good choice over the standard storage options:&#xD;&#xA;&#xD;&#xA;1. You get a dedicated merkle root for the contents of just the child trie.&#xD;&#xA;2. You want to use an alternative trie format than the standard base-16 patricia merkle trie that Substrate uses. For example, a binary trie.&#xD;&#xA;&#xD;&#xA;There are two main places that child tries are used in Substrate pallets today:&#xD;&#xA;&#xD;&#xA;1. Smart Contracts&#xD;&#xA;2. Parachain Crowdloans&#xD;&#xA;&#xD;&#xA;In both of these cases, these applications take advantage of the dedicated merkle root to provide small and concise proofs of the data inside the trie.&#xD;&#xA;&#xD;&#xA;For Parachain Crowdloans, you can use the merkle root of all the crowdloan contributions to easily upload potentially millions of user contributions via a single hash, and users can then provide proofs of their contributions against the merkle root.&#xD;&#xA;&#xD;&#xA;For Contracts, the merkle root is used to be able to kill a contracts data (forming a tombstone), and at a later point re-instate the data if the contract were to become active again.&#xD;&#xA;&#xD;&#xA;We have not really played with using alternative trie formats, but I believe that binary tries and other formats may provide major benefits to certain kinds of blockchain applications." ContentLicense="CC BY-SA 4.0" />
  <row Id="508" PostHistoryTypeId="6" PostId="139" RevisionGUID="0c92e17e-afc0-47c3-a5fc-774ae95d7ee3" CreationDate="2022-02-10T19:16:23.400" UserId="28" Comment="edited tags" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="509" PostHistoryTypeId="2" PostId="145" RevisionGUID="79ddd23d-f602-496a-947d-8cda06481d8d" CreationDate="2022-02-10T19:27:35.767" UserId="28" Text="To add to the other answers here, the simple fact is that all of the `per_things` are the same: some representation of a percentage, but at different resolutions.&#xD;&#xA;&#xD;&#xA;You have:&#xD;&#xA;&#xD;&#xA;* `Percent`: Parts per hundred - represents [0, 1] from [0, 100], and thus you have a resolution of up to 1%.&#xD;&#xA;* `Permill`: Parts per million - represents [0, 1] from [0, 1_000_000], and thus you have a resolution of up to .00001%.&#xD;&#xA;* `Perbill`: Parts per billion - represents [0, 1] from [0, 1_000_000_000], and thus you have a resolution of up to .00000001%.&#xD;&#xA;&#xD;&#xA;So, why use `Perbill` instead of `Permill` or `Percent`?&#xD;&#xA;&#xD;&#xA;Because your scenario may need a higher resolution percentage. However, using a `Perbill` will end up being a 64-bit value, where as a `Permill` is just a 32-bit value, and a `Percent` is an 8-bit value... so precision comes at a cost.&#xD;&#xA;&#xD;&#xA;Also note that all of these types use fixed point arithmetic, which is critical for determinism in the runtime, versus using a normal [floating point values](https://www.youtube.com/watch?v=PZRI1IfStY0)." ContentLicense="CC BY-SA 4.0" />
  <row Id="511" PostHistoryTypeId="6" PostId="129" RevisionGUID="c63867e2-e7d2-4f89-828a-62e3fd69d20b" CreationDate="2022-02-10T19:31:29.130" UserId="28" Comment="edited tags" Text="|percent|fixed-point-math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="512" PostHistoryTypeId="2" PostId="146" RevisionGUID="8cba8759-42c8-462c-8793-ea1cfc871b50" CreationDate="2022-02-10T19:48:32.213" UserId="28" Text="I would like to do some basic operations in the runtime like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let new_balance = .5 * old_balance;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or save a percentage value in the runtime storage.&#xD;&#xA;&#xD;&#xA;Or represent the balance of a user like: `3.141592 TOKENS`&#xD;&#xA;&#xD;&#xA;How can I do these kinds of things? Am I allowed to use floating point numbers in the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="514" PostHistoryTypeId="1" PostId="146" RevisionGUID="8cba8759-42c8-462c-8793-ea1cfc871b50" CreationDate="2022-02-10T19:48:32.213" UserId="28" Text="Can you use floating point numbers or math in the Runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="515" PostHistoryTypeId="3" PostId="146" RevisionGUID="8cba8759-42c8-462c-8793-ea1cfc871b50" CreationDate="2022-02-10T19:48:32.213" UserId="28" Text="|balances|percent|fixed-point-math|float|floating-point-math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="516" PostHistoryTypeId="2" PostId="147" RevisionGUID="e3ea9836-cffd-496a-9cff-1729827402fd" CreationDate="2022-02-10T19:48:32.213" UserId="28" Text="You cannot use floating point math inside of the runtime.&#xD;&#xA;&#xD;&#xA;[Floating point numbers](https://www.youtube.com/watch?v=PZRI1IfStY0) can lead to non-determinism in computer systems, and that would be exceptionally bad for blockchains since all of them must come to consensus.&#xD;&#xA;&#xD;&#xA;Instead, you must make sure to use [fixed-point arithmetic](https://en.wikipedia.org/wiki/Fixed-point_arithmetic) within the entire runtime environment, and Substrate even provides tools to help you with this in the crate [`sp_arithmetic`](https://crates.parity.io/sp_arithmetic/index.html).&#xD;&#xA;&#xD;&#xA;So to answer these specific scenarios:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;* Consider dividing by 2 rather than multiplying by .5.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let new_balance = old_balance / 2;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; * Use the [`Percent`](https://crates.parity.io/sp_arithmetic/per_things/struct.Percent.html) type or some of the other [`per_thing` types](https://substrate.stackexchange.com/questions/129/what-is-perbill-and-where-should-it-be-used) which behave like a standard percentage, but use fixed point math under the covers.&#xD;&#xA;&#xD;&#xA;* Use a fixed point number.&#xD;&#xA;&#xD;&#xA;In Substrate, user balances are normally represented with a `u128`. However, to express these balances in &quot;human form&quot; a fixed point decimal is used. So while a user's real balance as a `u128` would be something like `3_141_592_000_000 UNITS`, we would represent it in the UI by first dividing by `10^12`, and displaying it as `3.141592 TOKENS`. Assuming your fixed point decimal is 12. However different networks may make different choices how many decimal places to use.&#xD;&#xA;&#xD;&#xA;This decision is arbitrary." ContentLicense="CC BY-SA 4.0" />
  <row Id="518" PostHistoryTypeId="5" PostId="128" RevisionGUID="9dfa1d5d-e98a-482f-a91e-62b9e83863b6" CreationDate="2022-02-10T19:51:47.557" UserId="28" Comment="added 2 characters in body" Text="On-chain randomness on any public, decentralized, and deterministic system like a blockchain is difficult.&#xD;&#xA;&#xD;&#xA;BABE pallet does provide a source of on-chain randomness, but it has its own limits for security, especially when it comes to being used to win money on chain.&#xD;&#xA;&#xD;&#xA;Here is the security note included in the BABE pallet about it's randomness:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	/// # Security&#xD;&#xA;	///&#xD;&#xA;	/// This MUST NOT be used for gambling, as it can be influenced by a&#xD;&#xA;	/// malicious validator in the short term. It MAY be used in many&#xD;&#xA;	/// cryptographic protocols, however, so long as one remembers that this&#xD;&#xA;	/// (like everything else on-chain) it is public. For example, it can be&#xD;&#xA;	/// used where a number is needed that cannot have been chosen by an&#xD;&#xA;	/// adversary, for purposes such as public-coin zero-knowledge proofs.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The way BABE randomness works is that each block producer includes some additional randomness which they can verifiably generate which modifies the current randomness.&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-randomness&#xD;&#xA;&#xD;&#xA;This means, to fully control the random value generated, you would need the collusion of all block producers before you, which is extremely unlikely.&#xD;&#xA;&#xD;&#xA;However, for the purposes of lottery systems, you don't necessarily need to have every block producer collude to gain an advantage. If the value earned by the lottery is worth more than the value earned by building a block, then you can imagine it would be in the interest of a block producer participating in the lottery to not produce a block where they are not the winner.&#xD;&#xA;&#xD;&#xA;And this is where ultimately the security of this randomness value breaks down, and where you need to make your own analysis of attack scenarios to using this randomness.&#xD;&#xA;&#xD;&#xA;What we have in Polkadot is good enough for things like candle auctions for choosing parachains, but probably not good enough for the mega-millions lottery system. There is no hard science on exactly where things break down since it is all game-theoretical, but understanding how randomness is generated and can be influenced should give you an impression on where it can and cannot be used." ContentLicense="CC BY-SA 4.0" />
  <row Id="520" PostHistoryTypeId="5" PostId="101" RevisionGUID="1366a2ae-fbf9-4e6f-abbd-31d6a9884802" CreationDate="2022-02-10T21:28:23.673" UserId="3" Comment="added 480 characters in body" Text="Is it possible to reliably monitor an account and receive information about a transaction of that account _before_ the transaction is `InBlock` and then front-run that transaction by issuing a sufficiently larger tip? If so, how would one do this using polkadot-js?&#xD;&#xA;&#xD;&#xA;Expanding this, the interesting problem is how to obtain the information about transactions considered for inclusion in a block. When this information is available, the transaction can be front-run by making sure that your transaction has higher priority using a sufficiently large tip (see [this question](https://stackoverflow.com/questions/70734079/is-polkadot-transaction-priority-only-based-on-fees/70740762#70740762)). Can this information be obtained using polkadot-js?&#xD;&#xA;&#xD;&#xA;Note: This is a problem on EVM-style networks due to the way that transactions are handled there." ContentLicense="CC BY-SA 4.0" />
  <row Id="521" PostHistoryTypeId="2" PostId="148" RevisionGUID="6207d3cf-ff1f-465b-91f4-52efb72b4975" CreationDate="2022-02-11T00:54:29.477" UserId="28" Text="It looks like the latest Rust nightly has broken our Wasm builds.&#xD;&#xA;&#xD;&#xA;There have been other reports of this issue here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/issues/10767&#xD;&#xA;&#xD;&#xA;And the fix is coming in here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/10837" ContentLicense="CC BY-SA 4.0" />
  <row Id="534" PostHistoryTypeId="6" PostId="42" RevisionGUID="721e358f-5b88-44c4-af13-4e62af13d91a" CreationDate="2022-02-11T07:57:27.440" UserId="139" Comment="spell checked `historial` to `historical`" Text="|babe|session|historical|" ContentLicense="CC BY-SA 4.0" />
  <row Id="536" PostHistoryTypeId="2" PostId="151" RevisionGUID="5514bd5e-5c12-4fde-b057-a6fd459a9e6e" CreationDate="2022-02-11T08:25:03.717" UserId="295" Text="What is the XCM protocol on Polkadot? Could anyone please explain? &#xD;&#xA;Thank you so much! " ContentLicense="CC BY-SA 4.0" />
  <row Id="538" PostHistoryTypeId="1" PostId="151" RevisionGUID="5514bd5e-5c12-4fde-b057-a6fd459a9e6e" CreationDate="2022-02-11T08:25:03.717" UserId="295" Text="What is the XCM protocol on Polkadot? Could anyone please explain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="539" PostHistoryTypeId="3" PostId="151" RevisionGUID="5514bd5e-5c12-4fde-b057-a6fd459a9e6e" CreationDate="2022-02-11T08:25:03.717" UserId="295" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="540" PostHistoryTypeId="2" PostId="152" RevisionGUID="699a2420-bce6-426f-acd4-7046501ce062" CreationDate="2022-02-11T08:32:49.323" UserId="125" Text="I want to know the design relationship between them.&#xD;&#xA;&#xD;&#xA;From the node binary help:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;--execution &lt;STRATEGY&gt;&#xD;&#xA;            The execution strategy that should be used by all execution contexts [possible values: Native,&#xD;&#xA;            Wasm, Both, NativeElseWasm]&#xD;&#xA;&#xD;&#xA;--wasm-execution &lt;METHOD&gt;&#xD;&#xA;            Method for executing Wasm runtime code [default: Compiled]  [possible values: interpreted-i-know-&#xD;&#xA;            what-i-do, compiled]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;1. If both of them not config, the default `execution` is `NativeElseWasm` and the default `--wasm-execution` is `compiled`?&#xD;&#xA;2. If add `--execution=native`, which means the `wasm-execution` is also set to `Compiled`, so no need to config explicitly?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="542" PostHistoryTypeId="1" PostId="152" RevisionGUID="699a2420-bce6-426f-acd4-7046501ce062" CreationDate="2022-02-11T08:32:49.323" UserId="125" Text="How to config `--execution` and `--wasm-execution` when set up a node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="543" PostHistoryTypeId="3" PostId="152" RevisionGUID="699a2420-bce6-426f-acd4-7046501ce062" CreationDate="2022-02-11T08:32:49.323" UserId="125" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="544" PostHistoryTypeId="2" PostId="153" RevisionGUID="2e6e9dcd-b254-4f97-8991-3e14f637138a" CreationDate="2022-02-11T09:07:35.797" UserId="73" Text="With `--execution` you configure what kind of execution will be used. As you already have seen you can configure stuff like `NativeElseWasm` or `Wasm` or `NativeThenWasm` etc. This just configures which kind of runtime you will execute. There is the native runtime and the wasm runtime. The native runtime is compiled natively into the node and brings some better performance than the wasm runtime. However, when you upgrade the runtime on chain you always send the wasm runtime. The wasm runtime is the canonical one. If there is a new runtime enacted on chain, your node is running with `NativeElseWasm` and it doesn't support this new runtime yet, your node will fallback to use the wasm runtime.&#xD;&#xA;&#xD;&#xA;Regarding `--wasm-execution`, this controls how the wasm runtime is executed. `Compiled` means you will use a wasm compiler that brings better performance than using an interpreter (the other option). However, the interpreter is also discouraged to use, because it is too slow.&#xD;&#xA;&#xD;&#xA;&gt; If both of them not config, the default execution is `NativeElseWasm` and the default `--wasm-execution` is compiled?&#xD;&#xA;&#xD;&#xA;Yes.&#xD;&#xA;&#xD;&#xA;&gt; If add --execution=native, which means the wasm-execution is also set to Compiled, so no need to config explicitly?&#xD;&#xA;&#xD;&#xA;`wasm-execution` is by default `Compiled` when the wasm compiler is enabled at compile time." ContentLicense="CC BY-SA 4.0" />
  <row Id="546" PostHistoryTypeId="2" PostId="154" RevisionGUID="59124d0a-04b1-4e48-bfe4-b4f08c3cf739" CreationDate="2022-02-11T09:08:53.097" UserId="28" Text="There is a lot of good information about these flags and the underlying executor in the documentation here: https://docs.substrate.io/v3/advanced/executor/&#xD;&#xA;&#xD;&#xA;To answer your questions:&#xD;&#xA;&#xD;&#xA; 1. The default execution strategy for different contexts are different:&#xD;&#xA;&#xD;&#xA;    - Syncing: `NativeElseWasm`&#xD;&#xA;    - Block Import (for non-validator): `NativeElseWasm`&#xD;&#xA;    - Block Import (for validator): `AlwaysWasm`&#xD;&#xA;    - Block Construction: `AlwaysWasm`&#xD;&#xA;    - Off-Chain Worker: `NativeWhenPossible`&#xD;&#xA;    - Other: `NativeWhenPossible`&#xD;&#xA;&#xD;&#xA; 2. If you set `--execution=native` then I don't think it really matters what `--wasm-execution` is set to since you will be using a native executor rather than a Wasm executor, but yes, will set to `compiled` by default." ContentLicense="CC BY-SA 4.0" />
  <row Id="548" PostHistoryTypeId="5" PostId="151" RevisionGUID="2b4b48d1-27fd-4e8d-a6b3-4e74bf0fa636" CreationDate="2022-02-11T09:13:08.273" UserId="28" Comment="deleted 2 characters in body; edited title" Text="What is the XCM format on Polkadot? Could anyone please explain? &#xD;&#xA;Thank you so much! " ContentLicense="CC BY-SA 4.0" />
  <row Id="549" PostHistoryTypeId="4" PostId="151" RevisionGUID="2b4b48d1-27fd-4e8d-a6b3-4e74bf0fa636" CreationDate="2022-02-11T09:13:08.273" UserId="28" Comment="deleted 2 characters in body; edited title" Text="What is the XCM format on Polkadot? Could anyone please explain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="550" PostHistoryTypeId="6" PostId="151" RevisionGUID="2b4b48d1-27fd-4e8d-a6b3-4e74bf0fa636" CreationDate="2022-02-11T09:13:08.273" UserId="28" Comment="deleted 2 characters in body; edited title" Text="|polkadot|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="551" PostHistoryTypeId="2" PostId="155" RevisionGUID="d0b8adbd-ee1d-415b-b3ee-59b73cd29237" CreationDate="2022-02-11T09:21:07.807" UserId="28" Text="XCM stands for cross-consensus message, and is a message format designed to let multiple different consensus engines communicate with one another.&#xD;&#xA;&#xD;&#xA;XCM is not specific to Polkadot, however is particularly useful for Polkadot in combination with XCMP, which is the cross-chain messaging protocol. But note that the &quot;C&quot; in the acronym has changed, and that is to emphasize that XCM really could be used for scenarios beyond just cross chain communication, for example having two smart contracts talk to one another.&#xD;&#xA;&#xD;&#xA;The best way to learn about XCM is by reading the specification: https://github.com/paritytech/xcm-format&#xD;&#xA;&#xD;&#xA;As a high level simplification, you can think of XCM as standardizing all the most common calls you might expect between two consensus engines. For example, transferring balances from one another (which itself may be composed of multiple steps like querying a balance, withdrawing a balance, depositing a balance, etc...).&#xD;&#xA;&#xD;&#xA;Imagine you have two different blockchains trying to communicate, and each of them are constantly upgrading, adding new features, changing their runtime, etc... all of course possible because Substrate makes it so easy to upgrade a blockchain. In the situation a unified language like XCM did not exist, these two chains would struggle to keep up with one another and establish a consistent communication method. One chain could change the Pallet they use for managing balances, and without coordination, this could lead to lots of errors and funds lost.&#xD;&#xA;&#xD;&#xA;With XCM, chains can simply wrap all of their chain specific logic around a standard message format, and ensure that intentionality is not lost over the wire.&#xD;&#xA;&#xD;&#xA;The XCM format is designed to be upgradable and (mostly) backwards compatible, and uses a versioning system to note changes to the format." ContentLicense="CC BY-SA 4.0" />
  <row Id="553" PostHistoryTypeId="4" PostId="151" RevisionGUID="ac7432a4-f313-4bb3-a121-6fd812c38da2" CreationDate="2022-02-11T09:23:53.487" UserId="28" Comment="edited title" Text="What is the XCM format on Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="554" PostHistoryTypeId="6" PostId="136" RevisionGUID="90a8b082-a0a9-4483-a94f-68ac2851a535" CreationDate="2022-02-11T11:11:35.257" UserId="85" Comment="added the addition of a tag." Text="|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="555" PostHistoryTypeId="24" PostId="136" RevisionGUID="90a8b082-a0a9-4483-a94f-68ac2851a535" CreationDate="2022-02-11T11:11:35.257" Comment="Proposed by 85 approved by 221 edit id of 30" ContentLicense="CC BY-SA 4.0" />
  <row Id="556" PostHistoryTypeId="2" PostId="156" RevisionGUID="8021c223-9c7f-47be-837a-07558dc69f15" CreationDate="2022-02-11T11:37:58.713" UserId="83" Text="My goal is to allocate a balance in the genesis block to both:&#xD;&#xA;* A list of endowed accounts already included in the chain specification&#xD;&#xA; chain_spec.rs&#xD;&#xA;* A list of further accounts and balances included in a JSON file called genesis.json  genesis block (overwrite the balance value of any duplicate accounts that are also in the list of endowed accounts).&#xD;&#xA;&#xD;&#xA;However, I have encountered the following problems:&#xD;&#xA;* None of the endowed accounts or the accounts in the JSON file are being credited&#xD;&#xA;* polkadot-launch generates invalid values for &quot;genesis_head&quot; and &quot;validation_code&quot; in the parachain chain specification rococo-local.json that it generates (see below for details).  &#xD;&#xA;&#xD;&#xA;I've tried creating this Pull Request https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/5 which is based on Substrate v0.9.16 and it compiles successfully with `./scripts/init.sh &amp;&amp;&#xD;&#xA;cargo build --release`.&#xD;&#xA;&#xD;&#xA;I have forked the polkadot-launch repository in this Pull Request https://github.com/DataHighway-DHX/polkadot-launch/pull/2, which includes instructions and shell scripts that I follow to configure it on a macOS M1, but when I follow the default polkadot-launch steps, for example copying the DataHighway-Parachain binary `cp ./target/release/datahighway-collator ~/code/DataHighway-DHX/polkadot-launch/bin/datahighway-collator` to the relevant polkadot-launch folder and after cloning and building the v0.9.16 branch of the polkadot repository and also copying the polkadot binary to the same polkadot-launch folder, and then running polkadot-launch `yarn start config.json` using a relevant version of Node.js (i.e. v16.3.0), the polkadot-launch logs give an error message when it generates the rococo-local.json chain specification file `Error:  0: Other: Error parsing spec file: 0x prefix is missing at line 208 column 1756`, as shown below:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Resolving parachain id...&#xD;&#xA;2022-02-10 14:05:34 Building chain spec    &#xD;&#xA;&#xD;&#xA; Starting with a fresh authority set...&#xD;&#xA;   Added Genesis Authority alice&#xD;&#xA;   Added Genesis Authority bob&#xD;&#xA;   Added Genesis Authority charlie&#xD;&#xA;   Added Genesis Authority dave&#xD;&#xA;&#xD;&#xA;⚙ Updating Relay Chain Genesis Configuration&#xD;&#xA;  ✓ Updated Genesis Configuration [ validation_upgrade_frequency: 10 ]&#xD;&#xA;  ✓ Updated Genesis Configuration [ validation_upgrade_delay: 10 ]&#xD;&#xA;&#xD;&#xA;⛓ Adding Genesis Parachains&#xD;&#xA;  ✓ Added Genesis Parachain 2000&#xD;&#xA;  ✓ Added Genesis Parachain 3000&#xD;&#xA;⛓ Adding Genesis HRMP Channels&#xD;&#xA;  ✓ Added HRMP channel 2000 -&gt; 3000&#xD;&#xA;Added Boot Nodes: /ip4/127.0.0.1/tcp/30336/p2p/12D3KooWF66thRTDXG2ksKm3nMCHeoMneuohs71Q4anPLVnBSsSp,/ip4/127.0.0.1/tcp/30337/p2p/12D3KooWAZ1VKfix84y8rrrLekd6xVksDgjiYooTNTBi32GSXCWN,/ip4/127.0.0.1/tcp/30338/p2p/12D3KooWEpmRWnuEga2oFPZ7P8BfcJBZj928XT46hhj6zyieA72R,/ip4/127.0.0.1/tcp/30339/p2p/12D3KooWFUiU4LrYD1MVwbvkE4wqvCTy2feU9LijMKPoEXBJhArG&#xD;&#xA;&#xD;&#xA;2022-02-10 14:05:36 Building chain spec    &#xD;&#xA;Error: &#xD;&#xA;   0: Other: Error parsing spec file: 0x prefix is missing at line 208 column 1756&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found that the error is caused because the rococo-local.json file that it generates isn't being generated correctly, and its including snippets of the actual codebase and newline characters in front of the hex values of the &quot;genesis_head&quot; value and &quot;validation_code&quot; properties as shown below:&#xD;&#xA;&#xD;&#xA;rococo-local.json&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;&quot;paras&quot;: {&#xD;&#xA;  &quot;paras&quot;: [&#xD;&#xA;    [&#xD;&#xA;      2000,&#xD;&#xA;      {&#xD;&#xA;        &quot;genesis_head&quot;: &quot;account_public_key_json &quot;a42b7518d62a942344fec55d414f1654bf3fd325dbfa32a3c30534d5976acb21&quot;\naccount_balance_json 60000000000000000000000\naccount_ss58_address_json a42b7518d62a942344fec55d414f1654bf3fd325dbfa32a3c30534d5976acb21 (5FmxcuFw...)\nno match b/w endowed and json for &quot;a42b7518d62a942344fec55d414f1654bf3fd325dbfa32a3c30534d5976acb21&quot; so adding it to the list\n0x0000000000000000000000000000000000000000000000000000000000000000005c76496ba72...&quot;,&#xD;&#xA;        &quot;validation_code&quot;: &quot;account_public_key_json &quot;a42b7518d62a942344fec55d414f1654bf3fd325dbfa32a3c30534d5976acb21&quot;\naccount_balance_json 60000000000000000000000\naccount_ss58_address_json a42b7518d62a942344fec55d414f1654bf3fd325dbfa32a3c30534d5976acb21 (5FmxcuFw...)\nno match b/w endowed and json for &quot;a42b7518d62a942344fec55d414f1654bf3fd325dbfa32a3c30534d5976acb21&quot; so adding it to the list\n0x52bc5376&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Since I can't figure out how to debug (i.e. using println! or log::trace, etc), in the chain_spec.rs file of DataHighway-Parachain codebase, I instead replicated the relevant parts of the code in a separate Rust project https://github.com/ltfschoen/RustTest/tree/master/projects/endow to see what was going on, &#xD;&#xA;but it appeared to be combining and returning the accounts and balances correctly:&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  (&#xD;&#xA;    a42b7518d62a942344fec55d414f1654bf3fd325dbfa32a3c30534d5976acb21 (5FmxcuFw...),&#xD;&#xA;    30000000000000000000000,&#xD;&#xA;  ),&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in the DataHighway-Parachain codebase, I tried to isolate the issue as follows:&#xD;&#xA;&#xD;&#xA;I found that if I only use the `for` loop https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/5/files#diff-f2256017c4e606a30f53708578da46675512cc1300be6542ed5f77e58af0d6dcR961 and remove the line that calls `get_allocation` so it doesn't try to load and included the accounts and balances in the genesis.json file into the genesis, then it generates an error `Error parsing spec file: 0x prefix is missing at line` when i use polkadot-launch.&#xD;&#xA;&#xD;&#xA;Whereas if comment out that `for` loop (so it doesn't credit the endowed accounts), and I uncomment the `get_allocation` function again (so it only credits the accounts loaded from the genesis.json file), then it compiles successfully, and after I copy the latest datahighway-collator binary file to polkadot-launch and run polkadot-launch, it launches the relay chain and collator nodes successfully, but it doesn't credit the accounts loaded from the genesis.json file as expected, because I checked the balance of the accounts included in genesis.json by adding them to the Polkadot.js Apps address book https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1:9988#/addresses but they didn't have a balance.&#xD;&#xA;&#xD;&#xA;I also suspect it may be because I am not sure when you use `AccountId` (of type `type AccountId = &lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;` that is included in DataHighway-Parachain/runtime/src/types.rs) instead of `AccountId32` (which I understand is a struct that creates an instance of inner type `[u8; 32]`).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="558" PostHistoryTypeId="1" PostId="156" RevisionGUID="8021c223-9c7f-47be-837a-07558dc69f15" CreationDate="2022-02-11T11:37:58.713" UserId="83" Text="How to overwrite endowed account balances using additional accounts and balances from a JSON file for genesis block inclusion?" ContentLicense="CC BY-SA 4.0" />
  <row Id="559" PostHistoryTypeId="3" PostId="156" RevisionGUID="8021c223-9c7f-47be-837a-07558dc69f15" CreationDate="2022-02-11T11:37:58.713" UserId="83" Text="|balances|chainspec|polkadot-launch|json|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="560" PostHistoryTypeId="2" PostId="157" RevisionGUID="c95aff77-e756-494b-acc1-13cc73448c42" CreationDate="2022-02-11T12:51:42.203" UserId="100" Text="There is a fix for the `ContractTrapped` error that just came in.&#xD;&#xA;https://github.com/polkadot-js/apps/pull/6973&#xD;&#xA;&#xD;&#xA;Deployment will work on Rococo Canvas soon, after an update which is in progress.&#xD;&#xA;&#xD;&#xA;Until then, you can test your contracts on a local node https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;Make sure you have the latest versions, which at this time are:&#xD;&#xA;- ink 3.0.0 RC8&#xD;&#xA;- substrate-contracts-node v0.6.0&#xD;&#xA;- cargo-contract v0.17.0&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="562" PostHistoryTypeId="2" PostId="158" RevisionGUID="41b8afbe-de65-4feb-974d-80e79b73206c" CreationDate="2022-02-11T13:02:28.233" UserId="297" Text="patrastore.io is stopped, you can paste your address here or https://app.element.io/#/room/#PatractLabsDev:matrix.org" ContentLicense="CC BY-SA 4.0" />
  <row Id="564" PostHistoryTypeId="2" PostId="159" RevisionGUID="5c3d10db-4b7f-4dd9-b9a7-ef13a5f1eef6" CreationDate="2022-02-11T14:10:43.343" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="566" PostHistoryTypeId="1" PostId="159" RevisionGUID="5c3d10db-4b7f-4dd9-b9a7-ef13a5f1eef6" CreationDate="2022-02-11T14:10:43.343" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="567" PostHistoryTypeId="2" PostId="160" RevisionGUID="80bdd844-4e93-4cd5-8312-9618038539e0" CreationDate="2022-02-11T14:10:43.343" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="569" PostHistoryTypeId="1" PostId="160" RevisionGUID="80bdd844-4e93-4cd5-8312-9618038539e0" CreationDate="2022-02-11T14:10:43.343" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="570" PostHistoryTypeId="2" PostId="161" RevisionGUID="0d56db9e-b735-4d15-a0af-ce62045af5f9" CreationDate="2022-02-11T14:13:34.673" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="572" PostHistoryTypeId="1" PostId="161" RevisionGUID="0d56db9e-b735-4d15-a0af-ce62045af5f9" CreationDate="2022-02-11T14:13:34.673" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="573" PostHistoryTypeId="2" PostId="162" RevisionGUID="1af722e6-033e-429a-8c47-dcb03afa51e5" CreationDate="2022-02-11T14:13:34.673" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="575" PostHistoryTypeId="1" PostId="162" RevisionGUID="1af722e6-033e-429a-8c47-dcb03afa51e5" CreationDate="2022-02-11T14:13:34.673" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="576" PostHistoryTypeId="5" PostId="160" RevisionGUID="84da43ab-1e5c-4b55-a81d-4200fe280f20" CreationDate="2022-02-11T15:15:56.153" UserId="151" Comment="added 88 characters in body" Text="XCM (Cross-Consensus Message Format) is a communication format between consensus systems" ContentLicense="CC BY-SA 4.0" />
  <row Id="577" PostHistoryTypeId="24" PostId="160" RevisionGUID="84da43ab-1e5c-4b55-a81d-4200fe280f20" CreationDate="2022-02-11T15:15:56.153" Comment="Proposed by 151 approved by 178 edit id of 31" ContentLicense="CC BY-SA 4.0" />
  <row Id="578" PostHistoryTypeId="5" PostId="162" RevisionGUID="c50b1f75-fd73-461c-a633-be8bc22b6f98" CreationDate="2022-02-11T15:16:00.300" UserId="151" Comment="added 155 characters in body" Text="XCMP (Cross-Chain Message Passing) is a communication format that allows the parachains to exchange messages with other parachains on the same Relay Chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="579" PostHistoryTypeId="24" PostId="162" RevisionGUID="c50b1f75-fd73-461c-a633-be8bc22b6f98" CreationDate="2022-02-11T15:16:00.300" Comment="Proposed by 151 approved by 178 edit id of 32" ContentLicense="CC BY-SA 4.0" />
  <row Id="580" PostHistoryTypeId="2" PostId="163" RevisionGUID="fe80ebc2-662d-4aa5-b874-a11b393432e2" CreationDate="2022-02-11T15:23:33.003" UserId="85" Text="What's a great way to see what parachain auctions are happening at the moment for kusama and polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="582" PostHistoryTypeId="1" PostId="163" RevisionGUID="fe80ebc2-662d-4aa5-b874-a11b393432e2" CreationDate="2022-02-11T15:23:33.003" UserId="85" Text="What's a great way to see what parachain auctions are happening right now?" ContentLicense="CC BY-SA 4.0" />
  <row Id="583" PostHistoryTypeId="3" PostId="163" RevisionGUID="fe80ebc2-662d-4aa5-b874-a11b393432e2" CreationDate="2022-02-11T15:23:33.003" UserId="85" Text="|polkadot|kusama|crowdloan|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="585" PostHistoryTypeId="2" PostId="164" RevisionGUID="2c12bbcf-c62e-4c8c-a653-12ac125024dc" CreationDate="2022-02-11T15:43:22.180" UserId="235" Text="I've been trying to update the [Litentry NFT pallet][1] to the latest polkadot branch (v0.9.16). We want to incorporate the pallet in our own project for [Fair Squares][2] &#xD;&#xA;&#xD;&#xA;Besides the substrate dependencies, the pallet also relies on 2 [orml][3] pallets and has an implementation file with `impl_nonfungibles.rs` for the nonfungibles traits that is giving me a hard time to get a successful `cargo check`&#xD;&#xA;&#xD;&#xA;The error mentions that there is a `conflicting implementation for 'pallet::Pallet&lt;_&gt;'` The code implementation doesn't look conflicting to me as the implementation in the `lib.rs` and `impl_nonfungibles.rs` look very similar and should work in relation with each other. &#xD;&#xA;&#xD;&#xA;The output of one of the two errors is as following: &#xD;&#xA;```&#xD;&#xA;error[E0119]: conflicting implementations of trait `frame_support::traits::tokens::nonfungibles::Inspect&lt;_&gt;` for type `pallet::Pallet&lt;_&gt;`&#xD;&#xA;   --&gt; pallets/nft/src/lib.rs:609:1&#xD;&#xA;    |&#xD;&#xA;609 | impl&lt;T: Config&gt; Inspect&lt;T::AccountId&gt; for Pallet&lt;T&gt; {&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `pallet::Pallet&lt;_&gt;`&#xD;&#xA;    |&#xD;&#xA;   ::: pallets/nft/src/impl_nonfungibles.rs:7:1&#xD;&#xA;    |&#xD;&#xA;7   | impl&lt;T: Config&gt; Inspect&lt;&lt;T as frame_system::Config&gt;::AccountId&gt; for Pallet&lt;T&gt; {&#xD;&#xA;    | ----------------------------------------------------------------------------- first implementation here &#xD;&#xA;```&#xD;&#xA;These are the code blocks-blocks for lines of the conflicts:&#xD;&#xA;&#xD;&#xA;**lib.rs**&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; Inspect&lt;T::AccountId&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	type InstanceId = T::TokenId;&#xD;&#xA;	type ClassId = ClassIdOf&lt;T&gt;;&#xD;&#xA;	&#xD;&#xA;	fn owner(class: &amp;Self::ClassId, instance: &amp;Self::InstanceId) -&gt; Option&lt;T::AccountId&gt; {&#xD;&#xA;		orml_nft::Pallet::&lt;T&gt;::tokens(class, instance).map(|t| t.owner)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**impl_nonfungibles.rs**&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; Inspect&lt;&lt;T as frame_system::Config&gt;::AccountId&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	type InstanceId = T::TokenId;&#xD;&#xA;	type ClassId = T::ClassId;&#xD;&#xA;&#xD;&#xA;	fn owner(&#xD;&#xA;		class: &amp;Self::ClassId,&#xD;&#xA;		instance: &amp;Self::InstanceId,&#xD;&#xA;	) -&gt; Option&lt;&lt;T as frame_system::Config&gt;::AccountId&gt; {&#xD;&#xA;		orml_nft::Pallet::&lt;T&gt;::tokens(class, instance).map(|a| a.owner)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn class_owner(class: &amp;Self::ClassId) -&gt; Option&lt;&lt;T as frame_system::Config&gt;::AccountId&gt; {&#xD;&#xA;		orml_nft::Pallet::&lt;T&gt;::classes(class).map(|a| a.owner)&#xD;&#xA;	}&#xD;&#xA;//snip&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The traits that are being use for `frame_support` can be found [here][4] and the current forked code-base this issue is created for can be found [here][5]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/litentry/litentry-pallets&#xD;&#xA;  [2]: https://github.com/Fair-Squares/fair-squares&#xD;&#xA;  [3]: https://github.com/open-web3-stack/open-runtime-module-library&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/support/src/traits/tokens/nonfungibles.rs&#xD;&#xA;  [5]: https://github.com/Fair-Squares/litentry-pallets/tree/fs-nft-v0.9.16" ContentLicense="CC BY-SA 4.0" />
  <row Id="587" PostHistoryTypeId="1" PostId="164" RevisionGUID="2c12bbcf-c62e-4c8c-a653-12ac125024dc" CreationDate="2022-02-11T15:43:22.180" UserId="235" Text="NFT-pallet with conflicting implementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="588" PostHistoryTypeId="3" PostId="164" RevisionGUID="2c12bbcf-c62e-4c8c-a653-12ac125024dc" CreationDate="2022-02-11T15:43:22.180" UserId="235" Text="|polkadot|pallet|orml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="589" PostHistoryTypeId="2" PostId="165" RevisionGUID="64425c06-4fb1-4aef-81f2-8e1020dc1da1" CreationDate="2022-02-11T16:33:58.500" UserId="14" Text="Your code is implementing `Inspect` two times, so the compiler is complaining about conflicting implementation.&#xD;&#xA;&#xD;&#xA;I recommend removing the `lib.rs` implementation and keep things only in the `impl_nonfungibles.rs`." ContentLicense="CC BY-SA 4.0" />
  <row Id="591" PostHistoryTypeId="2" PostId="166" RevisionGUID="b23c33b4-f7ff-4eed-bc6a-cb5ac75fed93" CreationDate="2022-02-11T16:34:52.217" UserId="83" Text="* Kusama&#xD;&#xA;  * Crowdloans&#xD;&#xA;    * [Polkadot.js Apps - Kusama][1]&#xD;&#xA;    * [Subscan - Kusama][2]&#xD;&#xA;    * [CoinMarketCap - Kusama][3]&#xD;&#xA;&#xD;&#xA;  * Auctions&#xD;&#xA;    * [Polkadot.js Apps - Kusama][4]&#xD;&#xA;    * [Subscan - Kusama][5]&#xD;&#xA;    * [CoinMarketCap - Kusama][6]&#xD;&#xA;&#xD;&#xA;  * Both Crowdloans &amp; Auctions&#xD;&#xA;    * [DotMarketCap - Kusama][7]&#xD;&#xA;    * [Parallel Finance - Kusama][8]&#xD;&#xA;    * [Parachains.info - Kusama][9]&#xD;&#xA;&#xD;&#xA;* Polkadot&#xD;&#xA;  * Crowdloans&#xD;&#xA;    * [Polkadot.js Apps - Polkadot][10]&#xD;&#xA;    * [Subscan - Polkadot][11]&#xD;&#xA;    * [CoinMarketCap - Polkadot][12]&#xD;&#xA;&#xD;&#xA;  * Auctions&#xD;&#xA;    * [Polkadot.js Apps - Polkadot][13]&#xD;&#xA;    * [Subscan - Polkadot][14]&#xD;&#xA;    * [CoinMarketCap - Polkadot][15]&#xD;&#xA;&#xD;&#xA;  * Both Crowdloans &amp; Auctions&#xD;&#xA;    * [DotMarketCap - Polkadot][16]&#xD;&#xA;    * [Parallel Finance - Polkadot][17]&#xD;&#xA;    * [Parachains.info - Polkadot][18]&#xD;&#xA;&#xD;&#xA;* Both Kusama &amp; Polkadot&#xD;&#xA;  * Crowdloans&#xD;&#xA;    * [Fearless Wallet][19]&#xD;&#xA;    * [Nova Wallet][20]&#xD;&#xA;    * [Subsocial Sub.ID][21]&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains/crowdloan&#xD;&#xA;  [2]: https://kusama.subscan.io/crowdloan&#xD;&#xA;  [3]: https://coinmarketcap.com/polkadot-parachains/kusama/crowdload/&#xD;&#xA;  [4]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains/auctions&#xD;&#xA;  [5]: https://kusama.subscan.io/auction&#xD;&#xA;  [6]: https://coinmarketcap.com/polkadot-parachains/kusama/auction/&#xD;&#xA;  [7]: https://dotmarketcap.com/auction&#xD;&#xA;  [8]: https://crowdloan.parallel.fi/#/auction/kusama&#xD;&#xA;  [9]: https://parachains.info/auctions/kusama&#xD;&#xA;  [10]: https://polkadot.js.org/apps/#/parachains/crowdloan&#xD;&#xA;  [11]: https://polkadot.subscan.io/crowdloan&#xD;&#xA;  [12]: https://coinmarketcap.com/polkadot-parachains/polkadot/crowdload/&#xD;&#xA;  [13]: https://polkadot.js.org/apps/#/parachains/auctions&#xD;&#xA;  [14]: https://polkadot.subscan.io/auction&#xD;&#xA;  [15]: https://coinmarketcap.com/polkadot-parachains/polkadot/auction/&#xD;&#xA;  [16]: https://dotmarketcap.com/auction/polkadot&#xD;&#xA;  [17]: https://crowdloan.parallel.fi/#/auction/polkadot&#xD;&#xA;  [18]: https://parachains.info/auctions/polkadot&#xD;&#xA;  [19]: https://fearlesswallet.io&#xD;&#xA;  [20]: https://novawallet.io/&#xD;&#xA;  [21]: https://sub.id" ContentLicense="CC BY-SA 4.0" />
  <row Id="593" PostHistoryTypeId="2" PostId="167" RevisionGUID="2f2177d8-fe12-4e56-b4ac-c27d316782e1" CreationDate="2022-02-11T16:46:05.337" UserId="304" Text="Aside from looking directly on the polkadot.js site, I like to use&#xD;&#xA;- parachains.info&#xD;&#xA;- https://dotmarketcap.com/" ContentLicense="CC BY-SA 4.0" />
  <row Id="595" PostHistoryTypeId="2" PostId="168" RevisionGUID="28a2b81c-a0d7-43aa-a74a-93b08f7946d5" CreationDate="2022-02-11T17:32:12.073" UserId="179" Text="I've been running a local relay chain with two validators, and tried doing a runtime upgrade that failed showing the following errors on the validators:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-02-11 18:11:48 Running migration to v1 for session_historical with storage version StorageVersion(1)&#xD;&#xA;2022-02-11 18:11:48 Attempted to apply migration to v1 but failed because storage version is StorageVersion(1)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;panicked at 'Timestamp slot must match `CurrentSlot`', /Users/santibalaguer/.cargo/git/checkouts/substrate-7e08433d4c370a21/4aeb95f/frame/babe/src/lib.rs:845:9&#xD;&#xA;2022-02-11 18:11:54 ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Other(&quot;Wasm execution trapped: wasm trap: wasm `unreachable` instruction executed\nwasm backtrace:\n    0: 0x693c - &lt;unknown&gt;!rust_begin_unwind\n&quot;). Dropping.&#xD;&#xA;2022-02-11 18:11:54 panicked at 'Timestamp must be updated once in the block', /Users/santibalaguer/.cargo/git/checkouts/substrate-7e08433d4c370a21/4aeb95f/frame/timestamp/src/lib.rs:175:13&#xD;&#xA;2022-02-11 18:11:54 Proposing failed: ClientImport(&quot;RuntimeApiError(Application(Execution(Other(\&quot;Wasm execution trapped: wasm trap: wasm `unreachable` instruction executed\\nwasm backtrace:\\n    0: 0x693c - &lt;unknown&gt;!rust_begin_unwind\\n\&quot;))))&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Given that this is a local setup and that I was just testing things out, I'd be curious of what's the best way to recover this chain. I tried looking for how to use the `--revert` flag but could not find much (don't know either if it's the right way)." ContentLicense="CC BY-SA 4.0" />
  <row Id="597" PostHistoryTypeId="1" PostId="168" RevisionGUID="28a2b81c-a0d7-43aa-a74a-93b08f7946d5" CreationDate="2022-02-11T17:32:12.073" UserId="179" Text="How to unbrick a Substrate Chain? --revert?" ContentLicense="CC BY-SA 4.0" />
  <row Id="598" PostHistoryTypeId="3" PostId="168" RevisionGUID="28a2b81c-a0d7-43aa-a74a-93b08f7946d5" CreationDate="2022-02-11T17:32:12.073" UserId="179" Text="|polkadot|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="601" PostHistoryTypeId="2" PostId="170" RevisionGUID="38728769-a44a-4a28-a54d-1d92a49dbba4" CreationDate="2022-02-11T21:24:58.397" UserId="29" Text="I am running the `substrate-node-template` and I notice that the token symbol is `UNIT` and under the accounts tab in polkadot{.js} it shows up as MUNIT. How can I change my token symbol?" ContentLicense="CC BY-SA 4.0" />
  <row Id="603" PostHistoryTypeId="1" PostId="170" RevisionGUID="38728769-a44a-4a28-a54d-1d92a49dbba4" CreationDate="2022-02-11T21:24:58.397" UserId="29" Text="How do I change my token symbol on substrate-node-template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="604" PostHistoryTypeId="3" PostId="170" RevisionGUID="38728769-a44a-4a28-a54d-1d92a49dbba4" CreationDate="2022-02-11T21:24:58.397" UserId="29" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="605" PostHistoryTypeId="2" PostId="171" RevisionGUID="f636801d-18bf-4749-b5d1-10e955fa391d" CreationDate="2022-02-11T21:24:58.397" UserId="29" Text="One way you can change your token symbol is in the `chain_spec.rs` file, you can add something like this:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;let mut properties = Properties::new();&#xD;&#xA;properties.insert(&quot;tokenSymbol&quot;.into(), &quot;DOT&quot;.into());&#xD;&#xA;properties.insert(&quot;tokenDecimals&quot;.into(), 12.into());&#xD;&#xA;properties.insert(&quot;ss58Format&quot;.into(), 42.into());&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;For example you can edit your chain_spec's development config like this:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;pub fn development_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;	let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;	&#xD;&#xA;	// Give your base currency a unit name and decimal places&#xD;&#xA;	let mut properties = Properties::new();&#xD;&#xA;	properties.insert(&quot;tokenSymbol&quot;.into(), &quot;DOT&quot;.into());&#xD;&#xA;	properties.insert(&quot;tokenDecimals&quot;.into(), 12.into());&#xD;&#xA;	properties.insert(&quot;ss58Format&quot;.into(), 42.into());&#xD;&#xA;&#xD;&#xA;	Ok(ChainSpec::from_genesis(&#xD;&#xA;		// Name&#xD;&#xA;		&quot;Development&quot;,&#xD;&#xA;		// ID&#xD;&#xA;		&quot;dev&quot;,&#xD;&#xA;		ChainType::Development,&#xD;&#xA;		move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				wasm_binary,&#xD;&#xA;				// Initial PoA authorities&#xD;&#xA;				vec![authority_keys_from_seed(&quot;Alice&quot;)],&#xD;&#xA;				// Sudo account&#xD;&#xA;				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;				// Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;				],&#xD;&#xA;				true,&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;		// Bootnodes&#xD;&#xA;		vec![],&#xD;&#xA;		// Telemetry&#xD;&#xA;		None,&#xD;&#xA;		// Protocol ID&#xD;&#xA;		None,&#xD;&#xA;		// Properties&#xD;&#xA;		Some(properties),&#xD;&#xA;		// Extensions&#xD;&#xA;		None,&#xD;&#xA;	))&#xD;&#xA;}&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;Alternatively you can also make this change in the plain chain spec file. &#xD;&#xA;Take a look here: https://raw.githubusercontent.com/paritytech/polkadot/master/node/service/res/rococo.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="607" PostHistoryTypeId="2" PostId="172" RevisionGUID="a3bd9767-e5f3-49cd-b2f5-2e384bf85fa6" CreationDate="2022-02-12T04:04:56.230" UserId="129" Text="This is what I read from the substrate storage docs: https://docs.substrate.io/v3/runtime/storage/&#xD;&#xA;&#xD;&#xA;&gt; Runtime storage allows you to store data in your blockchain that is&#xD;&#xA;&gt; persisted between blocks and can be accessed from within your runtime&#xD;&#xA;&gt; logic.&#xD;&#xA;&#xD;&#xA;Does this mean every single block saves a copy of this data? If true, isn't it a waste of resources?&#xD;&#xA;I'm trying to implement a public note system where everyone's note is saved on the blockchain. Should I use this Storage Runtime? If not, what should I use?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="609" PostHistoryTypeId="1" PostId="172" RevisionGUID="a3bd9767-e5f3-49cd-b2f5-2e384bf85fa6" CreationDate="2022-02-12T04:04:56.230" UserId="129" Text="Does each block save a copy of a Storage item?" ContentLicense="CC BY-SA 4.0" />
  <row Id="610" PostHistoryTypeId="3" PostId="172" RevisionGUID="a3bd9767-e5f3-49cd-b2f5-2e384bf85fa6" CreationDate="2022-02-12T04:04:56.230" UserId="129" Text="|storage|database|" ContentLicense="CC BY-SA 4.0" />
  <row Id="611" PostHistoryTypeId="2" PostId="173" RevisionGUID="e9c86c32-317c-40b6-b9eb-5240eec432f6" CreationDate="2022-02-12T07:56:33.613" UserId="318" Text="The underlying mechanism is not copying. At any given block, non-archive nodes need to know only one value for one storage item. Even when the node keeps the trace of the historical values, it does it super efficiently by using a kind of a Merkle Trie structure. In designing dApps, you store those sensitive data on the blockchain that could be disputed in the absence of a consensus mechanism. The very obvious example is people's account balances. You can however use that storage for anything but it wouldn't then be a good use of that expensive resource.In your example, if that public note would be an assertion of something that people shouldn't be able to change in a backward way, meaning claiming that their note at that time was a different thing, then it should go to the runtime storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="613" PostHistoryTypeId="2" PostId="174" RevisionGUID="66355daa-35eb-406c-86e5-0285d78e5649" CreationDate="2022-02-12T08:14:41.287" UserId="321" Text="In Polkadot and Kusama emitted module events has the phase property so we can correlate them with the extrinsic that triggered that event but I can not do the same when the extrinsic is included in a `utility.batch` (https://polkadot.js.org/docs/substrate/extrinsics#batchcalls-veccall) extrinsic (as far as I know all the events are related to the utility.batch call so you can not correlate them individually).&#xD;&#xA;&#xD;&#xA;Is there a way to correlate an event with the related extrinsic included in a `utility.batch` call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="615" PostHistoryTypeId="1" PostId="174" RevisionGUID="66355daa-35eb-406c-86e5-0285d78e5649" CreationDate="2022-02-12T08:14:41.287" UserId="321" Text="Correlate events with extrinsics in a utility.batch call in Polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="616" PostHistoryTypeId="3" PostId="174" RevisionGUID="66355daa-35eb-406c-86e5-0285d78e5649" CreationDate="2022-02-12T08:14:41.287" UserId="321" Text="|query|extrinsic|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="617" PostHistoryTypeId="2" PostId="175" RevisionGUID="209c3fe0-a584-4552-874b-db02c81d8f9e" CreationDate="2022-02-12T10:04:22.033" UserId="83" Text="Recovering from bricked blockchain:&#xD;&#xA;* Time warp - try reversing the system clocks on all the validators to when it was previously able to produce and finalize blocks. See [Kusama's First Adventure][1]&#xD;&#xA;* Hard spoon - to avoid purging any state you could try using the `export-state` command to extract raw storage state from your old chain for use in a new blockchain, or use tools like [fork-off-substrate][3] or [chainSpecUtils.js][2]&#xD;&#xA;* Purge chain - try purging the blockchain database using the `purge-chain` command or removing it manually if there isn't any important information you want to try to backup first&#xD;&#xA;&#xD;&#xA;Prevent bricking your blockchain:&#xD;&#xA;* Swap from Babe to Aura consensus - try using Aura consensus instead, since if you are using Babe you might brick your blockchain if you stop your validators for more than one epoch and you may also experience an intermittent block delay issue when you're using Babe and aren't running enough validators &#xD;&#xA;&#xD;&#xA;Are you using [polkadot-launch][4] to run your local relay chain with two validators?&#xD;&#xA;&#xD;&#xA;  [1]: https://medium.com/polkadot-network/kusamas-first-adventure-2cd4f439a7a4&#xD;&#xA;  [2]: https://github.com/Phala-Network/phala-blockchain/blob/master/scripts/js/src/bin/chainSpecUtils.js&#xD;&#xA;  [3]: https://github.com/maxsam4/fork-off-substrate&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-launch" ContentLicense="CC BY-SA 4.0" />
  <row Id="620" PostHistoryTypeId="2" PostId="176" RevisionGUID="52f6fc96-8d09-49d1-a6e3-e2e1d91422bd" CreationDate="2022-02-12T11:55:17.480" UserId="3" Text="Currently, polkadot-js doesn't allow me to select a unit when specifying balances in the **Developer** &gt; **Extrinsics** section, which means that all balances must be specified in the smallest unit (10^12 is one KSM, etc.). This is very inconvenient, and it used to be different.&#xD;&#xA;&#xD;&#xA;Is this a metadata problem? Is it node-side or client-side? Is it possible to configure polkadot-js to at least use the standard unit (KSM, DOT, etc.)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="622" PostHistoryTypeId="1" PostId="176" RevisionGUID="52f6fc96-8d09-49d1-a6e3-e2e1d91422bd" CreationDate="2022-02-12T11:55:17.480" UserId="3" Text="How to enable unit for currencies in polkadot-js" ContentLicense="CC BY-SA 4.0" />
  <row Id="623" PostHistoryTypeId="3" PostId="176" RevisionGUID="52f6fc96-8d09-49d1-a6e3-e2e1d91422bd" CreationDate="2022-02-12T11:55:17.480" UserId="3" Text="|balances|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="624" PostHistoryTypeId="5" PostId="176" RevisionGUID="77753700-1b42-481d-b5de-1dd73fa1e443" CreationDate="2022-02-12T12:03:45.690" UserId="3" Comment="added 80 characters in body" Text="Currently, polkadot-js doesn't allow me to select a unit when specifying balances in the **Developer** &gt; **Extrinsics** section, which means that all balances must be specified in the smallest unit (10^12 is one KSM, etc.). So instead of just transfering 1 KSM, I'm now sending 1,000,000,000,000 Planck. This is very inconvenient, and it used to be different.&#xD;&#xA;&#xD;&#xA;Is this a metadata problem? Is it node-side or client-side? Is it possible to configure polkadot-js to at least use the standard unit (KSM, DOT, etc.)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="625" PostHistoryTypeId="2" PostId="177" RevisionGUID="1bb65d53-5a84-43bc-8ea2-8ddd3865a2cb" CreationDate="2022-02-12T12:10:52.197" UserId="83" Text="Each parachain project has a fund. It uses a storage item to track its fund information, and a child-trie to store account IDs and the amount they contributed" ContentLicense="CC BY-SA 4.0" />
  <row Id="627" PostHistoryTypeId="2" PostId="178" RevisionGUID="0392249b-4705-4e13-9419-93c4b608aeac" CreationDate="2022-02-12T12:24:18.563" UserId="298" Text="On launch of a parachain it can be a challenge to debug why a parachain cannot produce blocks.&#xD;&#xA;&#xD;&#xA;List answers as to what to look for and sanity checks for debugging a parachain that cannot produce blocks on launch." ContentLicense="CC BY-SA 4.0" />
  <row Id="629" PostHistoryTypeId="1" PostId="178" RevisionGUID="0392249b-4705-4e13-9419-93c4b608aeac" CreationDate="2022-02-12T12:24:18.563" UserId="298" Text="How can I get my parachain to produce blocks? (sanity checklist)" ContentLicense="CC BY-SA 4.0" />
  <row Id="630" PostHistoryTypeId="3" PostId="178" RevisionGUID="0392249b-4705-4e13-9419-93c4b608aeac" CreationDate="2022-02-12T12:24:18.563" UserId="298" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="631" PostHistoryTypeId="2" PostId="179" RevisionGUID="7b62ed3a-9a34-4f5d-86bc-4db18cf6183d" CreationDate="2022-02-12T12:24:18.563" UserId="298" Text="The common sanity checks are:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. Check that the `genesis-head-state` which you submitted in your parathread and the `parachain-genesis-state` that shows on your parachain logs are **the same**. If they aren't the same then you may have create your genesis-head with the incorrect para-id. To fix that you need to check the chain spec and make sure you change `para-id` and `parachain-id` to the correct number that you registered on the relay chain. &#xD;&#xA;&#xD;&#xA;The `parachain-genesis-state` is shared below:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-02-11 12:56:16 Parachain Collator Template    &#xD;&#xA;2022-02-11 12:56:16 ✌️  version 0.1.0-a1e5a62-x86_64-linux-gnu    &#xD;&#xA;2022-02-11 12:56:16 ❤️  by Anonymous, 2020-2022    &#xD;&#xA;2022-02-11 12:56:16  Chain specification: Local Testnet    &#xD;&#xA;2022-02-11 12:56:16   Node name: Alice    &#xD;&#xA;2022-02-11 12:56:16  Role: AUTHORITY    &#xD;&#xA;2022-02-11 12:56:16  Database: RocksDb at /tmp/parachain/alice/chains/local_testnet/db/full    &#xD;&#xA;2022-02-11 12:56:16 ⛓  Native runtime: template-parachain-1 (template-parachain-0.tx0.au1)    &#xD;&#xA;2022-02-11 12:56:16 Parachain id: Id(2001)    &#xD;&#xA;2022-02-11 12:56:16 Parachain Account: 5Ec4AhPV91i9yNuiWuNunPf6AQCYDhFTTA4G5QCbtqYApH9E    &#xD;&#xA;2022-02-11 12:56:16 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000621973be15d1cb405a885c5fd46c89f10d8d95832023efc847e6d7df8c1b18a403170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2022-02-11 12:56:16 Is collating: yes   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. If you are connecting to a public testnet or live chain, make sure that the chain type is set to `Live`. &#xD;&#xA;&#xD;&#xA;3. Make sure that if you added more than one collator to your chain spec that you launch all the expected collators. &#xD;&#xA;&#xD;&#xA;4. Check that your ports are open. &#xD;&#xA;&#xD;&#xA;5. Make sure that when you re-launch a collator you also clear the tmp db which you created with your `--base-path` tag. &#xD;&#xA;&#xD;&#xA;6. Make sure the collator keys are registered and are the same as in the chain-spec. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="633" PostHistoryTypeId="6" PostId="178" RevisionGUID="fa744ac3-628d-4ebe-a4b7-2ea855d53c16" CreationDate="2022-02-12T12:30:16.200" UserId="298" Comment="edited tags" Text="|parachain|substrate-node|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="634" PostHistoryTypeId="4" PostId="176" RevisionGUID="bc79cfb5-1e84-454d-9b44-344e1d1fc8ec" CreationDate="2022-02-12T12:54:39.240" UserId="3" Comment="edited title" Text="How to enable units for currencies in polkadot-js" ContentLicense="CC BY-SA 4.0" />
  <row Id="635" PostHistoryTypeId="2" PostId="180" RevisionGUID="ccd7ee62-f5f0-4882-9871-569722240da4" CreationDate="2022-02-12T13:03:26.653" UserId="298" Text="Which api/rpc call and method do I need to use to extract the state of all balances at a certain block?&#xD;&#xA;&#xD;&#xA;Let's use Polkadot and recent block as an example:&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.api.onfinality.io%2Fpublic-ws#/rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="637" PostHistoryTypeId="1" PostId="180" RevisionGUID="ccd7ee62-f5f0-4882-9871-569722240da4" CreationDate="2022-02-12T13:03:26.653" UserId="298" Text="How can get a snapshot of all balances at a certain block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="638" PostHistoryTypeId="3" PostId="180" RevisionGUID="ccd7ee62-f5f0-4882-9871-569722240da4" CreationDate="2022-02-12T13:03:26.653" UserId="298" Text="|polkadot|substrate-node|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="639" PostHistoryTypeId="5" PostId="177" RevisionGUID="e95b760a-8e5c-4abe-b01a-afc792400e56" CreationDate="2022-02-12T14:06:34.330" UserId="83" Comment="extrinsic function" Text="Each parachain project has a crowdloan account id for its funds pot that is created using the `fund_account_id` [function][1] of the Crowdloan pallet where its account id is generated using the parachain id using the `into_sub_account` [function][2]. When a crowdloan campaign is created for a parachain slot a `Funds` storage item is created to track the fund configuration, and a child-trie is used to store account IDs and the amount they contributed to the fund pot.&#xD;&#xA;&#xD;&#xA;The parachain project does not have access to the private key of their crowdloan account id.&#xD;&#xA;&#xD;&#xA;If the parachain project contributed to its own crowdloan using an account that it created then it would likely have the private key or password encrypted wallet to access the funds of that account.&#xD;&#xA;&#xD;&#xA;If the crowdloan wasn't run on a decentralised network where the Sudo pallet functionality was not removed and the parachain project had the private key to the root Sudo account then they could use the Balances pallet to access contributor account funds using the `force_transfer` [extrinsic function][3] or `setBalance`.&#xD;&#xA;&#xD;&#xA;Since they don't have the private key or password encrypted wallet associated with the crowdloan account id of its funds pot they wouldn't be able to submit extrinsics using that account.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/crowdloan.rs#L661&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1276&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L353" ContentLicense="CC BY-SA 4.0" />
  <row Id="640" PostHistoryTypeId="2" PostId="181" RevisionGUID="f735ef20-aa44-4025-b232-bcf905e29cc1" CreationDate="2022-02-12T14:30:45.193" UserId="139" Text="According to sessions pallet docs: &#xD;&#xA;&#xD;&#xA;&gt; Session: A session is a period of time that has a constant set of validators. Validators can only join or exit the validator set at a session change. It is measured in block numbers. The block where a session is ended is determined by the ShouldEndSession trait. When the session is ending, a new validator set can be chosen by OnSessionEnding implementations.&#xD;&#xA;&#xD;&#xA;[And on this site][1]:&#xD;&#xA;&gt; An era is a period of time during which there is a specific set of active validators. Each era has 6 epochs (or sessions). Before the last epoch the active set of the next era is elected. And after the end of each era the rewards are calculated and are ready to be distributed to the validators and nominators. An era is 24 hours on Polkadot and 6 hours on Kusama (give or take a few seconds).&#xD;&#xA;&#xD;&#xA;So as I  understand either the set of active validators in an `Era` is a superset  of that which is used in one `Session` of which still smaller subsets may be rotated in an `Epoch` if defined to be smaller than a `Session`. On Kusama `Epoch` and `Sessions` are of equal length.&#xD;&#xA;&#xD;&#xA;Will I be correct in understanding that each `session` rotates based on BABE VRF from a set of active validators for the current `Era`? Or is it the same set for all `sessions` of one `Era`? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000168050-what-is-an-era-" ContentLicense="CC BY-SA 4.0" />
  <row Id="642" PostHistoryTypeId="1" PostId="181" RevisionGUID="f735ef20-aa44-4025-b232-bcf905e29cc1" CreationDate="2022-02-12T14:30:45.193" UserId="139" Text="What is the difference in validator sets between an Era and a Session?" ContentLicense="CC BY-SA 4.0" />
  <row Id="643" PostHistoryTypeId="3" PostId="181" RevisionGUID="f735ef20-aa44-4025-b232-bcf905e29cc1" CreationDate="2022-02-12T14:30:45.193" UserId="139" Text="|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="644" PostHistoryTypeId="2" PostId="182" RevisionGUID="0de06a85-799b-497b-bca4-13686009c512" CreationDate="2022-02-12T14:48:37.327" UserId="83" Text="If you want to use the Subscan API you may query their [accounts list request url][1] to extract the state of all balances at the latest block.&#xD;&#xA;&#xD;&#xA;I created [this script][2] to query all the accounts at the latest block using the Subscan API and store them in a file. If you wanted all the Polkadot accounts on its latest block you would get a [Subscan API Key][3], switch to a recent version of Node.js, and run the following, and then wait for it to fetch all the data and store it in a file that is generated in the data/ subfolder:&#xD;&#xA;```&#xD;&#xA;git clone https://github.com/DataHighway-DHX/open-polkadot-js-library&#xD;&#xA;cd subscan&#xD;&#xA;yarn&#xD;&#xA;SUBSCAN_API_KEY=&lt;INSERT_SUBSCAN_API_KEY&gt; ENDPOINT=polkadot.api.subscan.io node index.js &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.api.subscan.io/#accounts&#xD;&#xA;  [2]: https://github.com/DataHighway-DHX/open-polkadot-js-library/tree/main/subscan&#xD;&#xA;  [3]: https://docs.api.subscan.io/#api-keys" ContentLicense="CC BY-SA 4.0" />
  <row Id="646" PostHistoryTypeId="2" PostId="183" RevisionGUID="bbd11e9a-0025-4dbd-8fec-1346b657f721" CreationDate="2022-02-12T17:56:17.083" UserId="28" Text="I made a small JavaScript application using Polkadot JS API just for this:&#xD;&#xA;&#xD;&#xA;https://github.com/shawntabrizi/substrate-balance-snapshot&#xD;&#xA;&#xD;&#xA;Basically, you should get a paged list of all the account entries, and then loop over that list to query each account.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let all_accounts = [];&#xD;&#xA;if (global.pageSize == 0) {&#xD;&#xA;	// This will be a long query... recommend setting a page size.&#xD;&#xA;	all_accounts = await substrate.query.system.account.entries();&#xD;&#xA;} else {&#xD;&#xA;	all_accounts = await substrate.query.system.account.entriesPaged({ args: [], pageSize: global.pageSize, startKey: global.lastKey });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;for (account of all_accounts) {&#xD;&#xA;    // We know that the last 32 bytes of the storage key is the address of the account.&#xD;&#xA;	let address = encodeAddress(account[0].slice(-32));&#xD;&#xA;	let free = account[1].data.free;&#xD;&#xA;	let reserved = account[1].data.reserved;&#xD;&#xA;	global.balances[address] = {&#xD;&#xA;		&quot;AccountId&quot;: address,&#xD;&#xA;		&quot;Free&quot;: toUnit(free, global.chainDecimals),&#xD;&#xA;		&quot;Reserved&quot;: toUnit(reserved, global.chainDecimals),&#xD;&#xA;		&quot;Total&quot;: toUnit(free.add(reserved), global.chainDecimals),&#xD;&#xA;	};&#xD;&#xA;	global.lastKey = account[0].toString();&#xD;&#xA;}" ContentLicense="CC BY-SA 4.0" />
  <row Id="648" PostHistoryTypeId="5" PostId="183" RevisionGUID="4ff12e71-fabd-48de-953f-49d09e789cf6" CreationDate="2022-02-12T18:06:37.913" UserId="28" Comment="added 231 characters in body" Text="First, set up a Polkadot JS API connection for the block you want:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const provider = new WsProvider(endpoint);&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;const blockHash = await api.rpc.chain.getBlockHash(blockNumber);&#xD;&#xA;const api_at = await api.at(blockHash);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then, you can easily get a list of all the account entries. I recommend using `entriesPaged`, else the query may be too overwhelming for the RPC endpoint:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let lastKey = &quot;&quot;;&#xD;&#xA;let pageSize = 100;&#xD;&#xA;let all_accounts = await api_at.query.system.account.entriesPaged(&#xD;&#xA;    {&#xD;&#xA;        args: [],&#xD;&#xA;        pageSize: pageSize,&#xD;&#xA;        startKey: lastKey,&#xD;&#xA;    }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can query those accounts for their balance information:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;for (account of all_accounts) {&#xD;&#xA;    // `account` will be an array of two items: key and value.&#xD;&#xA;    // We know that the last 32 bytes of the storage key is the address of the account.&#xD;&#xA;	let address = encodeAddress(account[0].slice(-32));&#xD;&#xA;&#xD;&#xA;    // We can then extract the user's balance information.&#xD;&#xA;	let free = account[1].data.free;&#xD;&#xA;	let reserved = account[1].data.reserved;&#xD;&#xA;&#xD;&#xA;    // Update the last key.&#xD;&#xA;	lastKey = account[0].toString();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then repeat this process until you have queried all the accounts.&#xD;&#xA;&#xD;&#xA;You can find an example of this here: https://github.com/shawntabrizi/substrate-balance-snapshot" ContentLicense="CC BY-SA 4.0" />
  <row Id="649" PostHistoryTypeId="2" PostId="184" RevisionGUID="f87dcbda-8bf1-4ef3-b038-a9092899ff3a" CreationDate="2022-02-12T18:34:51.863" UserId="28" Text="The `Developer &gt; Extrinsics` section is just a raw generation of the extrinsics available by a runtime.&#xD;&#xA;&#xD;&#xA;It even exposes the raw type to the end user, which it expects the user to use:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Note that the type name `Balance` could really mean anything. I could create an extrinsic with a type `Balance` which is a `bool` and means if a scale is balanced or not, or a percentage describing the &quot;balance of the Force&quot;.&#xD;&#xA;&#xD;&#xA;So your assumption that the `Developer &gt; Extrinsics` section should be &quot;smart enough&quot; to present different units of balances is misguided I think. In every spot that an intentional UI was designed with the concept of user token balances, this UNIT selector is present:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;The Polkadot JS Apps developer section is meant to be a developer toolkit, and thus has not introduced any &quot;user friendly&quot; assumptions, since those assumptions **could be fundamentally wrong**.&#xD;&#xA;&#xD;&#xA;Instead it presents only the raw data and inputs, which are guaranteed to always be correct in the context of this section.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/4sAJ8.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/5BUT4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="651" PostHistoryTypeId="2" PostId="185" RevisionGUID="fbd14084-3c27-436f-b5b9-95c734aeb8b9" CreationDate="2022-02-12T18:48:07.470" UserId="28" Text="The `utility.batch` call emits events which allow you to organize which extrinsic events are coming from each extrinsic.&#xD;&#xA;&#xD;&#xA;Between each call, you should see an `Event::ItemCompleted` after an extrinsic as successfully completed, or a `Event::BatchInterrupted` if one of the items in the batch caused the whole batch to stop. After the whole batch is done, you will see `Event::BatchCompleted`.&#xD;&#xA;&#xD;&#xA;You can see an example of that here: https://polkadot.subscan.io/extrinsic/8997424-2&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Here you can see `ItemCompleted` between the crowdloan contribution (the first extrinsic), the memo being updated (the second extrinsic).&#xD;&#xA;&#xD;&#xA;So it is just a matter of using these as delimiters, and organizing the events to the appropriate sub-batch call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sRpTa.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="653" PostHistoryTypeId="2" PostId="186" RevisionGUID="fba17bf6-31a0-4cb2-aa5c-3154c366f5ba" CreationDate="2022-02-12T19:10:33.187" UserId="332" Text="I am using the Substrate Identity pallet, and I would like to change the profile fields that are included as default (twitter, riot, email, legal, etc). I understand that there are additional fields, but these are ones that are known at compile time. &#xD;&#xA;&#xD;&#xA;If I want to replace those fields with my own, do I need to implement my own pallet? Can I use coupling in a way so that I don't need to override that one Struct?&#xD;&#xA;&#xD;&#xA;thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="655" PostHistoryTypeId="1" PostId="186" RevisionGUID="fba17bf6-31a0-4cb2-aa5c-3154c366f5ba" CreationDate="2022-02-12T19:10:33.187" UserId="332" Text="Override pallet struct fields without implementing a new pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="656" PostHistoryTypeId="3" PostId="186" RevisionGUID="fba17bf6-31a0-4cb2-aa5c-3154c366f5ba" CreationDate="2022-02-12T19:10:33.187" UserId="332" Text="|pallet|identity|coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="657" PostHistoryTypeId="5" PostId="176" RevisionGUID="e8cff7ab-3c36-4a9b-8332-5b44b505c45c" CreationDate="2022-02-12T19:39:03.077" UserId="3" Comment="added 119 characters in body" Text="Currently, polkadot-js doesn't allow me to select a unit when specifying balances in the **Developer** &gt; **Extrinsics** section, which means that all balances must be specified in the smallest unit (10^12 is one KSM, etc.). So instead of just transfering 1 KSM, I'm now sending 1,000,000,000,000 Planck. This is very inconvenient, and it used to be different, as seen in this screenshot:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Is this a metadata problem? Is it possible to configure polkadot-js to at least use the standard unit (KSM, DOT, etc.)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YsVVK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="658" PostHistoryTypeId="2" PostId="187" RevisionGUID="65c3de1b-10f1-4db8-ba68-d012285ced69" CreationDate="2022-02-13T00:02:57.173" UserId="28" Text="Unfortunately, the Identity pallet is not designed to accept an alternative identity info struct, so your best bet in this case is to implement your own pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="660" PostHistoryTypeId="2" PostId="188" RevisionGUID="424ad67d-59da-4217-8fe7-747ded069b84" CreationDate="2022-02-13T02:13:33.560" UserId="17" Text="Upgrading from: &#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// package.json&#xD;&#xA;&quot;@polkadot/api&quot;: &quot;^6.7.2&quot;,&#xD;&#xA;&quot;@polkadot/types&quot;: &quot;^6.7.2&quot;,&#xD;&#xA;```&#xD;&#xA;to:&#xD;&#xA;```js&#xD;&#xA;// package.json&#xD;&#xA;&quot;@polkadot/api&quot;: &quot;^7.7.1&quot;,&#xD;&#xA;&quot;@polkadot/types&quot;: &quot;^7.7.1&quot;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;causes major compilation problems when using TypeScript on the front-end. There are a lot of missing types from the `@polkadot/types/lookup` folder (for example: `Error: node_modules/@polkadot/api-derive/balances/types.d.ts:3:15 - error TS2305: Module '&quot;@polkadot/types/lookup&quot;' has no exported member 'PalletBalancesBalanceLock'`).&#xD;&#xA;&#xD;&#xA;Is there a problem with the packages or is there some way to fix these errors? (Note, I'm currently only hitting the Substrate node template. I don't personally have any custom runtime logic in there)." ContentLicense="CC BY-SA 4.0" />
  <row Id="662" PostHistoryTypeId="1" PostId="188" RevisionGUID="424ad67d-59da-4217-8fe7-747ded069b84" CreationDate="2022-02-13T02:13:33.560" UserId="17" Text="How do you resolve missing type errors in the @polkadot/api v7.x.x packages?" ContentLicense="CC BY-SA 4.0" />
  <row Id="663" PostHistoryTypeId="3" PostId="188" RevisionGUID="424ad67d-59da-4217-8fe7-747ded069b84" CreationDate="2022-02-13T02:13:33.560" UserId="17" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="664" PostHistoryTypeId="4" PostId="180" RevisionGUID="fcdae224-9bbd-4622-986b-5a845653d011" CreationDate="2022-02-13T12:26:09.000" UserId="298" Comment="edited title" Text="How can we get a snapshot of all balances at a certain block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="665" PostHistoryTypeId="5" PostId="176" RevisionGUID="9afd2b55-60cd-4d9b-bca2-1c3a4955eed3" CreationDate="2022-02-13T13:16:26.173" UserId="3" Comment="added 360 characters in body" Text="Currently, polkadot-js doesn't allow me to select a unit when specifying balances in the **Developer** &gt; **Extrinsics** section, which means that all balances must be specified in the smallest unit (10^12 is one KSM, etc.). So instead of just transfering 1 KSM, I'm now sending 1,000,000,000,000 Planck. This is very inconvenient, and it used to be different, as seen in this screenshot:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Is this a metadata problem? Is it possible to configure polkadot-js to at least use the standard unit (KSM, DOT, etc.)?&#xD;&#xA;&#xD;&#xA;**Edit.** So running `polkadot --chain=kusama --tmp` on the master branch of the Polkadot repository _still_ has units for extrinsics like `transfer` (also works with mainnet, westend, etc.), but when using `polkadot --dev --tmp`, units are disabled. When connecting with Kusama via the polkadot-js browser plugin, units are disabled. What's going on here?&#xD;&#xA;&#xD;&#xA;It seems very much like this behavior is still available and can be activated using some kind of chain configuration.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YsVVK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="666" PostHistoryTypeId="2" PostId="189" RevisionGUID="4d5d4643-1293-47be-9ecd-d876804f77ff" CreationDate="2022-02-13T21:32:52.657" UserId="85" Text="For me building up from the basics:&#xD;&#xA;&#xD;&#xA; 1. Is there network traffic or does it say 0 up 0 down?&#xD;&#xA; 2. Can it see peers?&#xD;&#xA;&#xD;&#xA;(This answer is work in progress)" ContentLicense="CC BY-SA 4.0" />
  <row Id="668" PostHistoryTypeId="5" PostId="152" RevisionGUID="5bfb8a0b-770c-439a-902e-c3b4a08f2d33" CreationDate="2022-02-14T00:55:47.427" UserId="2" Comment="grammar corrections" Text="I want to know the design relationship between them.&#xD;&#xA;&#xD;&#xA;From the node binary help:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;--execution &lt;STRATEGY&gt;&#xD;&#xA;            The execution strategy that should be used by all execution contexts [possible values: Native,&#xD;&#xA;            Wasm, Both, NativeElseWasm]&#xD;&#xA;&#xD;&#xA;--wasm-execution &lt;METHOD&gt;&#xD;&#xA;            Method for executing Wasm runtime code [default: Compiled]  [possible values: interpreted-i-know-&#xD;&#xA;            what-i-do, compiled]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;1. If both of them are not configured, the default `execution` is `NativeElseWasm` and the default `--wasm-execution` is `compiled`?&#xD;&#xA;2. If I add `--execution=native`, which means the `wasm-execution` is also set to `Compiled`, is there no need to configure it explicitly?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="669" PostHistoryTypeId="4" PostId="152" RevisionGUID="5bfb8a0b-770c-439a-902e-c3b4a08f2d33" CreationDate="2022-02-14T00:55:47.427" UserId="2" Comment="grammar corrections" Text="How to use `--execution` and `--wasm-execution` when setting up a node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="670" PostHistoryTypeId="24" PostId="152" RevisionGUID="5bfb8a0b-770c-439a-902e-c3b4a08f2d33" CreationDate="2022-02-14T00:55:47.427" Comment="Proposed by 2 approved by 125 edit id of 35" ContentLicense="CC BY-SA 4.0" />
  <row Id="671" PostHistoryTypeId="2" PostId="190" RevisionGUID="715df39a-ad91-4119-a5f6-00f2bbf02f4c" CreationDate="2022-02-14T05:30:09.493" UserId="352" Text="links below have stopped supporting&#xD;&#xA;&#xD;&#xA;- https://github.com/polkadot-java/api&#xD;&#xA;- https://github.com/emeraldpay/polkaj&#xD;&#xA;&#xD;&#xA;Is there a supporting library that I can use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="673" PostHistoryTypeId="1" PostId="190" RevisionGUID="715df39a-ad91-4119-a5f6-00f2bbf02f4c" CreationDate="2022-02-14T05:30:09.493" UserId="352" Text="Is there any java sdk or library?" ContentLicense="CC BY-SA 4.0" />
  <row Id="674" PostHistoryTypeId="3" PostId="190" RevisionGUID="715df39a-ad91-4119-a5f6-00f2bbf02f4c" CreationDate="2022-02-14T05:30:09.493" UserId="352" Text="|substrate-node|java|sdk|library|" ContentLicense="CC BY-SA 4.0" />
  <row Id="676" PostHistoryTypeId="2" PostId="191" RevisionGUID="fbd57494-7c51-4f73-93d7-28f2d17f1c31" CreationDate="2022-02-14T08:04:38.450" UserId="85" Text="Some companies want to interact with prebuilt c# code. Is there a more high level interface than writing lots of p-invokes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="678" PostHistoryTypeId="1" PostId="191" RevisionGUID="fbd57494-7c51-4f73-93d7-28f2d17f1c31" CreationDate="2022-02-14T08:04:38.450" UserId="85" Text="Is there an up to date .net sdk or library?" ContentLicense="CC BY-SA 4.0" />
  <row Id="679" PostHistoryTypeId="3" PostId="191" RevisionGUID="fbd57494-7c51-4f73-93d7-28f2d17f1c31" CreationDate="2022-02-14T08:04:38.450" UserId="85" Text="|sdk|library|c-sharp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="680" PostHistoryTypeId="2" PostId="192" RevisionGUID="b0c84e63-77e2-4e20-9338-1eec56a90aa2" CreationDate="2022-02-14T08:24:04.267" UserId="85" Text="I met a guy down the pub and he said it was better to code up everything yourself when you want to make a new L1 with millions of TPS as you could then have everything just the way you wanted it rather than using substrate.&#xD;&#xA;&#xD;&#xA;What are the advantages of using a framework like substrate rather than coding all of a Layer 1 blockchain from scratch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="682" PostHistoryTypeId="1" PostId="192" RevisionGUID="b0c84e63-77e2-4e20-9338-1eec56a90aa2" CreationDate="2022-02-14T08:24:04.267" UserId="85" Text="What are the pros / cons of using substrate rather coding all of a Layer 1 blockchain from scratch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="683" PostHistoryTypeId="3" PostId="192" RevisionGUID="b0c84e63-77e2-4e20-9338-1eec56a90aa2" CreationDate="2022-02-14T08:24:04.267" UserId="85" Text="|blockchain-frameworks|" ContentLicense="CC BY-SA 4.0" />
  <row Id="684" PostHistoryTypeId="2" PostId="193" RevisionGUID="0b895eda-415e-43ad-9823-a0097cd10a0f" CreationDate="2022-02-14T08:45:57.387" UserId="129" Text="I'm making a pallet that takes a string as the input. I tested it and it works well with English words, but when I try Vietnamese, the input box turned red and I couldn't submit the extrinsic. How can I solve this?&#xD;&#xA;In my code, the data type I used to save the text is `Vec&lt;u8&gt;`&#xD;&#xA;&#xD;&#xA;I[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/g8LHi.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="686" PostHistoryTypeId="1" PostId="193" RevisionGUID="0b895eda-415e-43ad-9823-a0097cd10a0f" CreationDate="2022-02-14T08:45:57.387" UserId="129" Text="How to I submit UTF-8 text to an extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="687" PostHistoryTypeId="3" PostId="193" RevisionGUID="0b895eda-415e-43ad-9823-a0097cd10a0f" CreationDate="2022-02-14T08:45:57.387" UserId="129" Text="|pallet|rust|data-type|" ContentLicense="CC BY-SA 4.0" />
  <row Id="688" PostHistoryTypeId="2" PostId="194" RevisionGUID="5924a822-b5f7-40b4-bd7d-f83dc82bfc65" CreationDate="2022-02-14T11:22:24.083" UserId="298" Text="During the sudo phase of a parachain integration, when uploading balances and vested balances for crowdloan participants, we need to make sure that those balances cannot be transferred until the next phase. We need a runtime filter so that account holders cannot transfer balances. &#xD;&#xA;&#xD;&#xA;What extrinsics can we use to enable this functionality?" ContentLicense="CC BY-SA 4.0" />
  <row Id="690" PostHistoryTypeId="1" PostId="194" RevisionGUID="5924a822-b5f7-40b4-bd7d-f83dc82bfc65" CreationDate="2022-02-14T11:22:24.083" UserId="298" Text="What extrinsics filters balances to block transfers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="691" PostHistoryTypeId="3" PostId="194" RevisionGUID="5924a822-b5f7-40b4-bd7d-f83dc82bfc65" CreationDate="2022-02-14T11:22:24.083" UserId="298" Text="|polkadot|parachain|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="692" PostHistoryTypeId="2" PostId="195" RevisionGUID="b3674d81-eafa-432d-84c1-c9109d4d752f" CreationDate="2022-02-14T11:22:38.450" UserId="14" Text="You can use hex decimals (`0x...`) there too.&#xD;&#xA;&#xD;&#xA;As you can see in its placeholder, when the `Bytes` field is empty:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DXfPj.png&#xD;&#xA;&#xD;&#xA;So you will need a tool to convert your UTF8 string into bytes, like:&#xD;&#xA;```&#xD;&#xA;fn main() {&#xD;&#xA;    println!(&quot;0x{}&quot;, hex::encode(&quot;Viêt&quot;));&#xD;&#xA;}&#xD;&#xA;// Outputs: 0x5669c3aa74&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now you can fill the field with `0x5669c3aa74` and submit the extrinsic." ContentLicense="CC BY-SA 4.0" />
  <row Id="696" PostHistoryTypeId="6" PostId="170" RevisionGUID="2357edb4-42b2-4138-8dde-68af7aeed44e" CreationDate="2022-02-14T11:40:36.693" UserId="104" Comment="Add the balances tag" Text="|balances|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="697" PostHistoryTypeId="24" PostId="170" RevisionGUID="2357edb4-42b2-4138-8dde-68af7aeed44e" CreationDate="2022-02-14T11:40:36.693" Comment="Proposed by 104 approved by 178 edit id of 33" ContentLicense="CC BY-SA 4.0" />
  <row Id="700" PostHistoryTypeId="5" PostId="43" RevisionGUID="15f6a419-e018-4af5-9335-4be94958fab4" CreationDate="2022-02-14T11:41:04.667" UserId="2" Comment="typos corrected" Text="I need to store the chain state after some interval and start it with new genesis. How I can do that? Please read this [issue][1] for reference.&#xD;&#xA;Also, is there any other way to achieve this except re-genesis?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/7458" ContentLicense="CC BY-SA 4.0" />
  <row Id="701" PostHistoryTypeId="4" PostId="43" RevisionGUID="15f6a419-e018-4af5-9335-4be94958fab4" CreationDate="2022-02-14T11:41:04.667" UserId="2" Comment="typos corrected" Text="How to do re-genesis in a running Substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="702" PostHistoryTypeId="24" PostId="43" RevisionGUID="15f6a419-e018-4af5-9335-4be94958fab4" CreationDate="2022-02-14T11:41:04.667" Comment="Proposed by 2 approved by 178 edit id of 34" ContentLicense="CC BY-SA 4.0" />
  <row Id="703" PostHistoryTypeId="2" PostId="196" RevisionGUID="2f14dfce-8946-4d7e-866c-bad5dd582560" CreationDate="2022-02-14T11:46:32.120" UserId="362" Text="&gt; What are the advantages of using a framework like substrate rather&#xD;&#xA;&gt; than coding all of a Layer 1 blockchain from scratch?&#xD;&#xA;&#xD;&#xA;You don't need to write and test your own &#xD;&#xA; - P2p layer.&#xD;&#xA; - State and history databases.&#xD;&#xA; - Transaction fee accounting system.&#xD;&#xA; - Consensus algorithm: plugin anything you like, including PoW/Nakamoto consensus, or just use an existing state of the art PoS/pBFT variant that comes in Substrate, or use the Relay chain shared security model with Polkadot/Kusama or other relay chain, which also gives you interoperability.&#xD;&#xA; - Node API.&#xD;&#xA; - Smart contracting environment &amp; languages, including EVM support if needed.&#xD;&#xA; - Validator tooling &amp; telemetry.&#xD;&#xA; - Client libraries.&#xD;&#xA; - Block explorer.&#xD;&#xA; - Wallet implementations.&#xD;&#xA; - Caching layer (see Subsquid/Hydra/Subquery).&#xD;&#xA;&#xD;&#xA;and to be honest, this is only the start of it when it comes to what you'll have to implement. Then there is the social side of it, which involves having to train developers from scratch to build with your whole new stack, compared to tapping into an existing and rapidly growing developer pool." ContentLicense="CC BY-SA 4.0" />
  <row Id="705" PostHistoryTypeId="2" PostId="197" RevisionGUID="13948d69-8824-4473-aa73-a19a6c77606c" CreationDate="2022-02-14T11:54:53.417" UserId="234" Text="This is a very good question which I think requires a very long and extended answer.  &#xD;&#xA;&#xD;&#xA;Here are some really good reasons to use Substrate over building everything from scratch :&#xD;&#xA;&#xD;&#xA;1. It provides all the core components of a blockchain (Database Layer, Networking Layer, Transaction Queue, Consensus Engine, etc) which have been thoroughly tested since a very big amount of blockchains have been built based on that (Polkadot, Kusama, different parachains, etc). &#xD;&#xA;2. It is modular so you can add or remove functionality as you wish by choosing only the modules you need in your blockchain.&#xD;&#xA;3. It is extensible so if the existing modules do not cover your needs then you can write your own code and extend them.&#xD;&#xA;4. You can upgrade without hard forks (forkless runtime upgrades).&#xD;&#xA;5. The runtime can run in any platform since it is compiled into WASM/WebAssembly.&#xD;&#xA;6. It is open source.&#xD;&#xA;7. It is written in Rust so if your developers team are Rust developers that makes it easy to customise it.&#xD;&#xA;8. It has a lot of resources online that you can check and learn how to build what you need, docs, videos, wikis or tutorials like https://docs.substrate.io/tutorials/v3/&#xD;&#xA;9. You can easily convert your Substrate standalone chain into a Polkadot/Kusama parachain (with cumulus).&#xD;&#xA;10. It offers an Ethereum-compatible execution environment so in your Substrate chain you can host the vast majority of the Ethereum state transition function.&#xD;&#xA;&#xD;&#xA;Here are some resources in case you would like to check all of the above points into more detail :&#xD;&#xA;&#xD;&#xA;https://youtu.be/-6BBIr-DmI4&#xD;&#xA;&#xD;&#xA;https://youtu.be/V9KfvhoqLJ4&#xD;&#xA;&#xD;&#xA;https://medium.com/polkadot-network/polkadot-substrate-and-ethereum-f0bf1ccbfd13" ContentLicense="CC BY-SA 4.0" />
  <row Id="707" PostHistoryTypeId="2" PostId="198" RevisionGUID="22c6245e-165e-4cbd-bda6-b1076a683310" CreationDate="2022-02-14T12:05:36.187" UserId="298" Text="I have a launched a Rococo staging style relay chain testnet.&#xD;&#xA;&#xD;&#xA;I am currently the sudo and I would like to go through the process of inviting other people to become validators.&#xD;&#xA;&#xD;&#xA;What steps do I need to take to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="709" PostHistoryTypeId="1" PostId="198" RevisionGUID="22c6245e-165e-4cbd-bda6-b1076a683310" CreationDate="2022-02-14T12:05:36.187" UserId="298" Text="How do you add new validators for your blockchain testnet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="710" PostHistoryTypeId="3" PostId="198" RevisionGUID="22c6245e-165e-4cbd-bda6-b1076a683310" CreationDate="2022-02-14T12:05:36.187" UserId="298" Text="|polkadot|substrate-node|blockchain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="711" PostHistoryTypeId="2" PostId="199" RevisionGUID="9218c25e-6a63-43f7-94e7-0bb0dd0bc4d2" CreationDate="2022-02-14T12:05:36.187" UserId="298" Text="# Add new public relay validators to your set&#xD;&#xA;&#xD;&#xA;This post will guide you through the stage where you have a rococo style relay chain and you want other validators to connect with you. Here we will show you how you can add new validators to your set. We will be using a substrate relay rococo style relay chain with a partner (which uses babe), but this will still be useful for aura. &#xD;&#xA;&#xD;&#xA;*This post assumes you understand how to [create your chain-spec.json][1] correctly, and can [launch a chain][2] (in our case a “Live” staging relay chain) that can produce and finalize blocks.*&#xD;&#xA;&#xD;&#xA;This guide will take you through 3 steps: **Launch validators**; **Register new validators**; then **Rotate Keys**.&#xD;&#xA;&#xD;&#xA;The todo list:&#xD;&#xA;&#xD;&#xA;- **Launch Validators**&#xD;&#xA;  - submit keys&#xD;&#xA;  - check nodes are peering &#xD;&#xA;  - Make sure validators are working&#xD;&#xA;- **Register new validators**&#xD;&#xA;  - send funds &#xD;&#xA;  - Get list of the new validator AccountIds&#xD;&#xA;- **Rotate Keys**&#xD;&#xA;  &#xD;&#xA;*Let's begin…*&#xD;&#xA;&#xD;&#xA;# Launch your validators&#xD;&#xA;&#xD;&#xA;### Submit keys&#xD;&#xA;Assuming you have the sudo account, launch your validators and submit your babe and grandpa keys.&#xD;&#xA;&#xD;&#xA;### Check nodes are peering&#xD;&#xA;Make sure nodes are peering, and do that through `- bootnodes` tag.&#xD;&#xA;Example of a validator command:&#xD;&#xA;&#xD;&#xA;```cli&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;-- validator \&#xD;&#xA;-- base-path /tmp/relay/MyVal1 \ specify your db path&#xD;&#xA;-- chain ./specs/&lt;INSERT-CHAIN-SPEC.JSON&gt; \&#xD;&#xA;-- port 30333 \&#xD;&#xA;-- ws-port 9944 \&#xD;&#xA;-- rpc-port 9933 \&#xD;&#xA;-- rpc-methods=Unsafe \&#xD;&#xA;-- name MyVal01 \&#xD;&#xA;-- bootnodes /ip4/&lt;INSERT A BOOTNODE TO LAUNCH VALIDATOR&gt; \&#xD;&#xA;-- telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \&#xD;&#xA;-- node-key &lt;INSERT-KEY&gt; optional&#xD;&#xA;```&#xD;&#xA;### Make sure validators are working&#xD;&#xA;Make sure your nodes are producing blocks and finalizing, if they are not, restart nodes, and add keys again, (or use the author_hasKey RPC method to check they have the correct keys).&#xD;&#xA;# Register new validators&#xD;&#xA;### Send funds&#xD;&#xA;&#xD;&#xA;Send the validator owner some funds to their account so they can add existential deposits to the (stash) AccountIds of their validators.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;##Get list of the new validator AccountIds&#xD;&#xA;Ask the new validator owner to send you the validator AccountId’s, so you can make a sudo call to register validators.&#xD;&#xA;&#xD;&#xA;[![chain-spec.json session keys][3]][3]&#xD;&#xA;&#xD;&#xA;AccountId’s are the first two address above grandpa&#xD;&#xA;You can can connect to the UI (if you have a RPC node running) to make this extrinsic call.&#xD;&#xA;&#xD;&#xA;`sudo &gt; validatorManager &gt; registerValidators(validators)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Screenshot of registering new validators to the mix][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can do more than one at a time (as shown below)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![list of new validators][5]][5]&#xD;&#xA;# Rotate Keys&#xD;&#xA;Now they are registered you (and your partner) can “rotate keys”, so that new keys are generated and populated in all the session key fields for your validators.&#xD;&#xA;Submitting calls via RPC can be long winded, so a neat trick is to submit the BABE and GRANDPA so the chain produces and finalizes blocks, then you can run author_rotateKeys for each of your validators, which will then generate all your other keys automatically.&#xD;&#xA;&#xD;&#xA;`curl -H ‘Content-Type: application/json’ — data ‘{ “jsonrpc”:”2.0&quot;, “method”:”author_rotateKeys”, “id”:1 }’ http://127.0.0.1:9933`&#xD;&#xA;&#xD;&#xA;Make the RPC call in the terminal of your where your validator’s node is located, which should look like this:&#xD;&#xA;&#xD;&#xA;[![example of the output of rotating keys][6]][6]&#xD;&#xA;*The screenshot shows the returned result of 3 author_rotateKeys calls for my 3 validators. If you have one validator you only need to make the call once.*&#xD;&#xA;&#xD;&#xA;### Set Keys &#xD;&#xA;Once you have generated the returned hex result, you need to submit them as an extrinsic for all the validators you’ve done that for. You can use the extrinsics section of the UI for this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][7]][7]&#xD;&#xA;&#xD;&#xA;`session &gt; setKeys(keys, proof)`&#xD;&#xA;&#xD;&#xA;- Be conscious of the account you are using to set the keys.&#xD;&#xA;- In “proof” just add 0x00.&#xD;&#xA;- Submit transaction&#xD;&#xA;&#xD;&#xA;Wait for an epoch to see the changes, and other validators.&#xD;&#xA;&#xD;&#xA;this workflow is complete. You can view it as medium post [here][8].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/how-to-guides/v3/basics/custom-chain-spec/&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/v3/cumulus/start-relay/&#xD;&#xA;  [3]: https://i.stack.imgur.com/ICpz1.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/CtNzF.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/3wzkC.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/pWr3t.png&#xD;&#xA;  [7]: https://i.stack.imgur.com/nnw0l.png&#xD;&#xA;  [8]: https://decentration.medium.com/set-up-public-relay-validators-with-a-partner-3ef409c675c7" ContentLicense="CC BY-SA 4.0" />
  <row Id="713" PostHistoryTypeId="2" PostId="200" RevisionGUID="2b86785a-a2d9-4656-90cf-a434325f223d" CreationDate="2022-02-14T13:12:54.780" UserId="363" Text="I would like to know if there is a way for understanding why a rpc call via python substrate-interface is failing.&#xD;&#xA;&#xD;&#xA;On my case, I'm using python `substrateinterface` lib. And in function &quot;submit_extrinsic&quot; I failed on rpc call: `author_submitExtrinsic`.&#xD;&#xA;&#xD;&#xA;I got `backend.onchain.onchain.ChainSubmissionException: {'code': 1010, 'message': 'Invalid Transaction', 'data': 'Inability to pay some fees (e.g. account balance too low)'}` exception. But because I know the transaction should have been composed from valid fee and amount that shouldn't overflow the user account (exactly amount if to be accurate).&#xD;&#xA;&#xD;&#xA;I would like to know if there is a way know exactly what was the parameters that reached to blockchain (or the before at the substrate server), to understand what went wrong when building the transaction.&#xD;&#xA;Or if maybe the transaction should not be fail.&#xD;&#xA;&#xD;&#xA;thanks :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="715" PostHistoryTypeId="1" PostId="200" RevisionGUID="2b86785a-a2d9-4656-90cf-a434325f223d" CreationDate="2022-02-14T13:12:54.780" UserId="363" Text="Retrieve reason of fail substrate rpc call" ContentLicense="CC BY-SA 4.0" />
  <row Id="716" PostHistoryTypeId="3" PostId="200" RevisionGUID="2b86785a-a2d9-4656-90cf-a434325f223d" CreationDate="2022-02-14T13:12:54.780" UserId="363" Text="|polkadot|substrate-node|rpc|python|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="717" PostHistoryTypeId="2" PostId="201" RevisionGUID="1d379ac8-6e1f-4436-98e4-645212eae79d" CreationDate="2022-02-14T13:18:37.083" UserId="352" Text="I call json-RPC through the terminal and get the data as below.&#xD;&#xA;&#xD;&#xA;extrinsics is raw byte, but I'm using polkadot-js(SCALE codec?) to decode it.&#xD;&#xA;&#xD;&#xA;But I don't know which method to call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;&quot;block&quot;: {&lt;br&gt;&#xD;&#xA;&quot;extrinsics&quot;: [&lt;br&gt;&#xD;&#xA;      **&quot;0x280402000be1da78d37e01&quot;,&quot;0xd91f..(too long haha)..580&quot;**&lt;br&gt;&#xD;&#xA;    ],&lt;br&gt;&#xD;&#xA;    &quot;header&quot;: {&#xD;&#xA;      &quot;digest&quot;: {&#xD;&#xA;        ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;@polkadot/crypto-util? @polkadot/util? Which module and which method should I use?&#xD;&#xA;I want input string(raw data) and get string(json or human data)&#xD;&#xA;&#xD;&#xA;please help.." ContentLicense="CC BY-SA 4.0" />
  <row Id="719" PostHistoryTypeId="1" PostId="201" RevisionGUID="1d379ac8-6e1f-4436-98e4-645212eae79d" CreationDate="2022-02-14T13:18:37.083" UserId="352" Text="How to decode extrinsic at json-RPC call's data(byte code)" ContentLicense="CC BY-SA 4.0" />
  <row Id="720" PostHistoryTypeId="3" PostId="201" RevisionGUID="1d379ac8-6e1f-4436-98e4-645212eae79d" CreationDate="2022-02-14T13:18:37.083" UserId="352" Text="|polkadot|polkadot-js|extrinsic|json-rpc|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="721" PostHistoryTypeId="5" PostId="200" RevisionGUID="5d860cfa-dc03-453a-9cb0-eb795ea1d048" CreationDate="2022-02-14T14:25:54.100" UserId="363" Comment="deleted 28 characters in body" Text="I would like to know if there is a way for understanding why a rpc call via python substrate-interface is failing.&#xD;&#xA;&#xD;&#xA;On my case, I'm using python `substrateinterface` lib. And in function &quot;submit_extrinsic&quot; I failed on rpc call: `author_submitExtrinsic`.&#xD;&#xA;&#xD;&#xA;I got an exception contain: `{'code': 1010, 'message': 'Invalid Transaction', 'data': 'Inability to pay some fees (e.g. account balance too low)'}` exception. But because I know the transaction should have been composed from valid fee and amount that shouldn't overflow the user account (exactly amount if to be accurate).&#xD;&#xA;&#xD;&#xA;I would like to know if there is a way know exactly what was the parameters that reached to blockchain (or the before at the substrate server), to understand what went wrong when building the transaction.&#xD;&#xA;Or if maybe the transaction should not be fail.&#xD;&#xA;&#xD;&#xA;thanks :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="722" PostHistoryTypeId="2" PostId="202" RevisionGUID="d26966c6-7cf5-48dc-830b-9e6b98e26e1b" CreationDate="2022-02-14T15:09:42.083" UserId="176" Text="Do you know if is it possible to call the function of an other contract in Solidity used in Substrate based chain and compiled with solang ? At first glance it seems impossible but I doubt it.&#xD;&#xA;&#xD;&#xA;As a basic example I'm trying to get a &quot;incrementor&quot; working only if a &quot;flipper&quot; is on:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;contract Flipper {&#xD;&#xA;  bool private value;&#xD;&#xA;&#xD;&#xA;  constructor (bool initValue) {&#xD;&#xA;    value = initValue;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  function flip () public {&#xD;&#xA;    value = !value;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  function get () public view returns (bool) {&#xD;&#xA;    return value;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to use a Flipper instance in my Incrementor contract to allow / disallow incrementing.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import &quot;flipper.sol&quot;;&#xD;&#xA;&#xD;&#xA;contract Incrementor {&#xD;&#xA;&#xD;&#xA;	uint256 _count;&#xD;&#xA;	Flipper _flipper;&#xD;&#xA;&#xD;&#xA;	constructor (uint256 _initialValue, Flipper _flipperContract) {&#xD;&#xA;		_count = _initialValue;&#xD;&#xA;		_flipper = _flipperContract;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// --&#xD;&#xA;	// Mutators&#xD;&#xA;	// --&#xD;&#xA;&#xD;&#xA;	function increment () public {&#xD;&#xA;      require(_flipper.get(), &quot;Flipper must be ON&quot;);&#xD;&#xA;	  _count += 1;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	function superFlip () public {&#xD;&#xA;	  _flipper.flip();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	function setValue (uint256 v) public {&#xD;&#xA;		_count = v;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// --&#xD;&#xA;	// Accessors&#xD;&#xA;	// --&#xD;&#xA;&#xD;&#xA;	function count () public view returns (uint256) {&#xD;&#xA;		return _count;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When testing all of this on polkadotjs; I have a negative answer saying contract trapped ALONG with a success message (but the totality doesn't work).&#xD;&#xA;&#xD;&#xA;(Failure on the &quot;increment&quot; message):&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vG7er.png&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I'm not sure but I suspect this problem to arise from the difference in addressing in the EVM vs WASM.&#xD;&#xA;&#xD;&#xA;In the article linked bellow, we can see how an external contract function is &quot;manually&quot; invoked with an &quot;address.call(bytes4(keccack25('...')), args)&quot;.&#xD;&#xA;&#xD;&#xA;https://medium.com/@blockchain101/calling-the-function-of-another-contract-in-solidity-f9edfa921f4c&#xD;&#xA;&#xD;&#xA;Except this is working in a EVM environment; not a WASM substrate environment.&#xD;&#xA;&#xD;&#xA;Can someone help ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="724" PostHistoryTypeId="1" PostId="202" RevisionGUID="d26966c6-7cf5-48dc-830b-9e6b98e26e1b" CreationDate="2022-02-14T15:09:42.083" UserId="176" Text="Calling the function of an other contract in Solidity" ContentLicense="CC BY-SA 4.0" />
  <row Id="725" PostHistoryTypeId="3" PostId="202" RevisionGUID="d26966c6-7cf5-48dc-830b-9e6b98e26e1b" CreationDate="2022-02-14T15:09:42.083" UserId="176" Text="|ink|smart-contract|blockchaincross-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="726" PostHistoryTypeId="5" PostId="202" RevisionGUID="35d10b24-a968-459b-93d6-8d4e8b0dfe6e" CreationDate="2022-02-14T15:43:05.873" UserId="176" Comment="added 249 characters in body" Text="Do you know if is it possible to call the function of an other contract in Solidity used in Substrate based chain and compiled with solang ? At first glance it seems impossible but I doubt it.&#xD;&#xA;&#xD;&#xA;As a basic example I'm trying to get a &quot;incrementor&quot; working only if a &quot;flipper&quot; is on:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;contract Flipper {&#xD;&#xA;  bool private value;&#xD;&#xA;&#xD;&#xA;  constructor (bool initValue) {&#xD;&#xA;    value = initValue;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  function flip () public {&#xD;&#xA;    value = !value;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  function get () public view returns (bool) {&#xD;&#xA;    return value;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to use a Flipper instance in my Incrementor contract to allow / disallow incrementing.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import &quot;flipper.sol&quot;;&#xD;&#xA;&#xD;&#xA;contract Incrementor {&#xD;&#xA;&#xD;&#xA;	uint256 _count;&#xD;&#xA;	Flipper _flipper;&#xD;&#xA;&#xD;&#xA;	constructor (uint256 _initialValue, Flipper _flipperContract) {&#xD;&#xA;		_count = _initialValue;&#xD;&#xA;		_flipper = _flipperContract;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// --&#xD;&#xA;	// Mutators&#xD;&#xA;	// --&#xD;&#xA;&#xD;&#xA;	function increment () public {&#xD;&#xA;      require(_flipper.get(), &quot;Flipper must be ON&quot;);&#xD;&#xA;	  _count += 1;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	function superFlip () public {&#xD;&#xA;	  _flipper.flip();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	function setValue (uint256 v) public {&#xD;&#xA;		_count = v;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// --&#xD;&#xA;	// Accessors&#xD;&#xA;	// --&#xD;&#xA;&#xD;&#xA;	function count () public view returns (uint256) {&#xD;&#xA;		return _count;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When testing all of this on polkadotjs; I have a negative answer saying contract trapped ALONG with a success message (but the totality doesn't work).&#xD;&#xA;&#xD;&#xA;(Failure on the &quot;increment&quot; message):&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vG7er.png&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I'm not sure but I suspect this problem to arise from the difference in addressing in the EVM vs WASM.&#xD;&#xA;&#xD;&#xA;In the article linked bellow, we can see how an external contract function is &quot;manually&quot; invoked with an &quot;address.call(bytes4(keccack25('...')), args)&quot;.&#xD;&#xA;&#xD;&#xA;https://medium.com/@blockchain101/calling-the-function-of-another-contract-in-solidity-f9edfa921f4c&#xD;&#xA;&#xD;&#xA;Except this is working in a EVM environment; not a WASM substrate environment.&#xD;&#xA;&#xD;&#xA;Solang Version : v0.1.9&#xD;&#xA;https://github.com/hyperledger-labs/solang/releases/tag/v0.1.9&#xD;&#xA;&#xD;&#xA;Substrate Version: 4.0.0-dev &#xD;&#xA;https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;&#xD;&#xA;Contracts deployed from PolkadotJS &#xD;&#xA;api v7.8.1&#xD;&#xA;apps v0.105.2-27&#xD;&#xA;&#xD;&#xA;Can someone help ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="727" PostHistoryTypeId="2" PostId="203" RevisionGUID="7152eee7-0a56-412c-9da5-12c863a47757" CreationDate="2022-02-14T15:43:12.357" UserId="234" Text="As mentioned in the wiki page https://wiki.polkadot.network/docs/build-node-interaction, some return values (like extrinsics) are SCALE encoded and you need to decode them by using the `metadata`. You can retrieve the metadata :&#xD;&#xA;&#xD;&#xA;- Through polkadot-js apps (https://polkadot.js.org/apps/#/explorer) under menu `Developer` &gt; submenu `RPC Calls` &gt; and there you choose the endpoint  `state` and `getMetadata(at)`.&#xD;&#xA;&#xD;&#xA;- Through code you can check this link https://docs.substrate.io/v3/runtime/metadata/#get-the-metadata which shows in Rust and Javascript the corresponding functions to use, `state_getMetadata` and `getMetadata` respectively.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can also use `sidecar` (as mentioned in the same wiki page) to get the information already decoded. The corresponding github page is https://github.com/paritytech/substrate-api-sidecar." ContentLicense="CC BY-SA 4.0" />
  <row Id="729" PostHistoryTypeId="5" PostId="202" RevisionGUID="2c9f3618-a8cc-4aa7-b188-10084db18018" CreationDate="2022-02-14T15:54:05.837" UserId="176" Comment="added 254 characters in body" Text="Do you know if is it possible to call the function of an other contract in Solidity used in Substrate based chain and compiled with solang ? At first glance it seems impossible but I doubt it.&#xD;&#xA;&#xD;&#xA;As a basic example I'm trying to get a &quot;incrementor&quot; working only if a &quot;flipper&quot; is on:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;contract Flipper {&#xD;&#xA;  bool private value;&#xD;&#xA;&#xD;&#xA;  constructor (bool initValue) {&#xD;&#xA;    value = initValue;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  function flip () public {&#xD;&#xA;    value = !value;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  function get () public view returns (bool) {&#xD;&#xA;    return value;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to use a Flipper instance in my Incrementor contract to allow / disallow incrementing.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import &quot;flipper.sol&quot;;&#xD;&#xA;&#xD;&#xA;contract Incrementor {&#xD;&#xA;&#xD;&#xA;	uint256 _count;&#xD;&#xA;	Flipper _flipper;&#xD;&#xA;&#xD;&#xA;	constructor (uint256 _initialValue, Flipper _flipperContract) {&#xD;&#xA;		_count = _initialValue;&#xD;&#xA;		_flipper = _flipperContract;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// --&#xD;&#xA;	// Mutators&#xD;&#xA;	// --&#xD;&#xA;&#xD;&#xA;	function increment () public {&#xD;&#xA;      require(_flipper.get(), &quot;Flipper must be ON&quot;);&#xD;&#xA;	  _count += 1;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	function superFlip () public {&#xD;&#xA;	  _flipper.flip();&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	function setValue (uint256 v) public {&#xD;&#xA;		_count = v;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// --&#xD;&#xA;	// Accessors&#xD;&#xA;	// --&#xD;&#xA;&#xD;&#xA;	function count () public view returns (uint256) {&#xD;&#xA;		return _count;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When testing all of this on polkadotjs; I have a negative answer saying contract trapped ALONG with a success message (but the totality doesn't work).&#xD;&#xA;&#xD;&#xA;(Failure on the &quot;increment&quot; message):&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I'm not sure but I suspect this problem to arise from the difference in addressing in the EVM vs WASM.&#xD;&#xA;&#xD;&#xA;In the article linked bellow, we can see how an external contract function is &quot;manually&quot; invoked with an &quot;address.call(bytes4(keccack25('...')), args)&quot;.&#xD;&#xA;&#xD;&#xA;https://medium.com/@blockchain101/calling-the-function-of-another-contract-in-solidity-f9edfa921f4c&#xD;&#xA;&#xD;&#xA;Except this is working in a EVM environment; not a WASM substrate environment.&#xD;&#xA;&#xD;&#xA;Solang Version : v0.1.9&#xD;&#xA;https://github.com/hyperledger-labs/solang/releases/tag/v0.1.9&#xD;&#xA;&#xD;&#xA;Substrate Version: v4.0.0-dev &#xD;&#xA;&#xD;&#xA;Contract Node version: 0.6.0&#xD;&#xA;https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Contracts deployed from PolkadotJS &#xD;&#xA;api v7.8.1&#xD;&#xA;apps v0.105.2-27&#xD;&#xA;&#xD;&#xA;Incrementor Contract: &#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Flipper Contract:&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Can someone help ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vG7er.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/a5VRQ.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/Y8Z2r.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="730" PostHistoryTypeId="2" PostId="204" RevisionGUID="032628c5-793c-45bf-acc5-d35093bf2f78" CreationDate="2022-02-14T17:28:28.413" UserId="372" Text="Substrate supports &quot;pluggable consensus&quot; so a developer can choose from among several consensus algorithms. The main Substrate repository contains four algorithms:&#xD;&#xA;&#xD;&#xA;* [Aura](https://crates.parity.io/substrate_consensus_aura/index.html)&#xD;&#xA;* [Babe](https://crates.parity.io/substrate_consensus_babe/index.html)&#xD;&#xA;* [Proof of Work](https://crates.parity.io/substrate_consensus_pow/index.html)&#xD;&#xA;* [Grandpa](https://crates.parity.io/substrate_finality_grandpa/index.html)&#xD;&#xA;&#xD;&#xA;Some of these (eg [babe and grandpa](https://github.com/paritytech/substrate/blob/2d8b02af1852d51b7d6a15d6d98b41b76bac614a/bin/node/cli/src/service.rs#L190-L202)) can even be used together in a single node. What are the differences between each consensus algorithm, and which ones can, or should, be used together?" ContentLicense="CC BY-SA 4.0" />
  <row Id="732" PostHistoryTypeId="1" PostId="204" RevisionGUID="032628c5-793c-45bf-acc5-d35093bf2f78" CreationDate="2022-02-14T17:28:28.413" UserId="372" Text="What is the difference between Babe, Aura, and Grandpa?" ContentLicense="CC BY-SA 4.0" />
  <row Id="733" PostHistoryTypeId="3" PostId="204" RevisionGUID="032628c5-793c-45bf-acc5-d35093bf2f78" CreationDate="2022-02-14T17:28:28.413" UserId="372" Text="|babe|consensus|aura|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="734" PostHistoryTypeId="2" PostId="205" RevisionGUID="ed3fbff7-9a4c-4aae-82cd-b8f7106ea4a7" CreationDate="2022-02-14T17:28:28.413" UserId="372" Text="For a blockchain to continue growing and adding new transactions in a meaningful way, two things must happen to solve the problem of [distributed consensus](https://en.wikipedia.org/wiki/Consensus_(computer_science)). Typically, these jobs are performed by full nodes as is the case with the default Substrate node.&#xD;&#xA;&#xD;&#xA;1. **Block Authoring**. Nodes create new blocks. Each new block contains a reference to a parent block.&#xD;&#xA;&#xD;&#xA;2. **Block Finalization**. When forks appear in the chain, Nodes must choose which side of the fork to consider the real or &quot;canonical&quot; one. Once a block is Finalized, the canonical chain will _always_ contain it.&#xD;&#xA;&#xD;&#xA;In addition to the four consensus engines mentioned in the question, there are also some community-contributed consensus engines in the Substrate ecosystem. Let's look at each of the algorithms individually, and see how they accomplish these two tasks tasks.&#xD;&#xA;&#xD;&#xA;# Block Authoring&#xD;&#xA;## Aura&#xD;&#xA;Aura provides block authoring. In aura a known set of authorities are allowed to produce blocks. The authorities must be chosen before block production begins and all authorities must know the entire authority set. Time is divided up into &quot;slots&quot; of a fixed length. During each slot one block is produced, and the authorities take turns producing blocks in order forever.&#xD;&#xA;&#xD;&#xA;In Aura, forks only happen when it takes longer than the slot duration for a block to traverse the network. Thus forks are uncommon in good network conditions.&#xD;&#xA;&#xD;&#xA;## Babe&#xD;&#xA;Babe also provides block authoring. Like, Aura, it is a slot-based consensus algorithm with a known set of validators. In addition, each validator is assigned a weight which must be assigned before block production begins. Unlike Aura, the authorities don't take turns in order. Instead, during each round, each authority generates a pseudorandom number using a [VRF](https://en.wikipedia.org/wiki/Verifiable_random_function). If the random number is lower than their weight, they are allowed to produce a block.&#xD;&#xA;&#xD;&#xA;Because multiple validators may be able to produce a block during the same slot, forks are more common in Babe than they are in Aura, and are common even in good network conditions.&#xD;&#xA;&#xD;&#xA;Substrate's implementation of Babe also has a fallback mechanism for when no authorities are chosen in a given slot.&#xD;&#xA;&#xD;&#xA;## Proof of Work&#xD;&#xA;Proof of Work also provides block authoring. Unlike Babe and Aura, it is not slot-based, and does not have a known authority set. In proof of Work, anyone can produce a block at any time, so long as they can solve a computationally challenging problem (typically a hash [preimage search](https://en.wikipedia.org/wiki/Preimage_attack)). The difficulty of this problem can be tuned to provide a statistical _target_ block time.&#xD;&#xA;&#xD;&#xA;## Nimbus&#xD;&#xA;[Nimbus](https://github.com/PureStake/nimbus/) is a community-contributed block authoring _framework_ for writing identity-based consensus engines rather than a specific individual engine. Both Aura and Babe can be expressed in the nimbus framework. Nimbus doubles down on Substrate's use of web assembly by moving even the core of the consensus logic into wasm. By doing this, Nimbus enables consensus hotswaps, and transforms the problem of writing a consensus engine into one of writing a pallet.&#xD;&#xA;&#xD;&#xA;## Manual Seal&#xD;&#xA;Manual Seal is not for production use, but rather for education use and integration tests. When using manual seal, any node may author a block at any time and it is considered valid. In production this would lead to unmanageable spam.&#xD;&#xA;&#xD;&#xA;# Block Finalization&#xD;&#xA;## Probabilistic methods&#xD;&#xA;Each of the block authoring mechanisms we've discussed previously needs to know _where_ on the chain is should build the next block. Methods such as the &quot;longest chain rule&quot; or the &quot;heaviest observed subtree&quot; can serve as a rule of thumb. When coupled with a PoW consensus algorithm, these methods provide a genuine probabilistic finality. That is, with each new block that is added to a chain, the probability that it will be reverted decreases, approaching zero. However, if true certainty that a block is final is desired, a more sophisticated game can be used.&#xD;&#xA;&#xD;&#xA;## Grandpa&#xD;&#xA;Grandpa provides deterministic finalization. It has a known weighted authority set like Babe. However, Grandpa does not author blocks; it just listens to gossip about blocks that have been produced by some authoring engine like the ones discussed above. Each authority participates in two rounds of voting on blocks. The [details of the voting](https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf) are beyond the scope of this post. Once 2/3 of the grandpa authorities have voted for a particular block, it is considered finalized.&#xD;&#xA;&#xD;&#xA;## AlephBFT&#xD;&#xA;[Aleph BFT](https://github.com/aleph-zero-foundation/AlephBFT) is a community-contributed deterministic finality engine using a known authority set. Like Grandpa, it is not responsible for authoring blocks, and depends on an external block authoring mechanism. AlephBFT is similar to [HashGraph](https://en.wikipedia.org/wiki/Hashgraph) but is unencumbered by patents, and provides finality over a traditional blockchain rather than replacing the blockchain with the graph entirely.&#xD;&#xA;&#xD;&#xA;## Manual Finality&#xD;&#xA;Manual Finality is the counterpart to manual seal. It is not for production use, but for learning and integration tests. In manual finality, any node can mark a block final at any time. In production, this would lead to nodes having inconsistent views of the chain.&#xD;&#xA;&#xD;&#xA;# Hybrid Consensus&#xD;&#xA;In general a block authoring engine and a finality gadget can be used together in a single chain, as Babe and Grandpa are in the code linked in the question. When such a system is used, block authoring engines must be made aware of blocks that are finalized so that they don't waste time building on top of blocks that will never be in the canonical chain.&#xD;&#xA;&#xD;&#xA;**Note on weights**: Babe, Grandpa, and many other algorithms that do not come bundled with Substrate rely on weights. Consensus algorithms themselves typically do not dictate how the weights are assigned, but rather assume that they are assigned somehow leaving the assignment to an external mechanism. In public networks, it is common to assign weights based on how many tokens are staked. In the default Substrate node, all weights are set to `1` because the [phragmen algorithm](https://wiki.polkadot.network/docs/en/learn-phragmen) keeps all validators close to equally staked.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="736" PostHistoryTypeId="2" PostId="206" RevisionGUID="f5409a86-ccd4-4807-ba21-7804cb6f9718" CreationDate="2022-02-14T18:40:01.340" UserId="172" Text="Beyond the engineering tradeoffs correctly outlined above (tradeoffs of economic costs, responsibility and margin for error), there's a high level and fundamental difference between smart contracts and pallets this answer could benefit from outlining:&#xD;&#xA;* The runtime of a Substrate chain is composed of pallets, some of which _can also_ be pallets that enable smart contract execution. In this way, comparing the two is like comparing apples and oranges: a runtime engineer can extend the underlying execution logic and capabilities of a chain using pallets, whereas a smart contract engineer develops applications _on-top_ of some existing execution model (for example, `pallet-contract` or `pallet-evm`).&#xD;&#xA;* What a smart contract can provide in terms of user facing interactions is a subset of what a pallet can provide. Pallets can be used to write more complex functionality, for example modifying the fee system of the chain, adding a multi-asset payment system or giving a reward to certain users every _n_ blocks. &#xD;&#xA;* Smart contracts can be written by anyone, added and removed at any time, while pallets are part of the runtime and can only be added or modified using on-chain governance via a runtime upgrade.&#xD;&#xA;&#xD;&#xA;All in all, pallets are suited for developers building application-specific blockchains, whereas smart contracts are suited for developers building applications on-top of a blockchain specialized for executing smart contracts." ContentLicense="CC BY-SA 4.0" />
  <row Id="738" PostHistoryTypeId="2" PostId="207" RevisionGUID="c9db290b-650a-4d0e-b61a-fc9525a286f8" CreationDate="2022-02-14T19:10:02.150" UserId="29" Text="Have you tried the [`.toHuman()`](https://polkadot.js.org/docs/api/start/types.basics) method in [@polkadotjs](https://github.com/polkadot-js/api)? You can see an example [here](https://github.com/polkadot-js/api/blob/8ba4ed53776a7a71478e229547c7af3d4dc57d63/packages/types/src/extrinsic/Extrinsic.spec.ts#L40).&#xD;&#xA;&#xD;&#xA;&gt; `.toHuman()` - returns Human-parsable JSON structure with values formatted as per the settings&#xD;&#xA;&#xD;&#xA;Depending on your use-case, you could use [txwrappercore](https://github.com/paritytech/txwrapper-core/) to convert your extrinsic by using the `decodeSignedTx()` method or the `DecodedUnsignedTx()` method.&#xD;&#xA;&#xD;&#xA;````javascript&#xD;&#xA;const decoded = decodeSignedTx(signedTx, POLKADOT_25_TEST_OPTIONS);&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;You can see the full code [here](https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/core/decode/decodeSignedTx.spec.ts#L39) and the associated test [here](https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/core/decode/test-helpers/itDecodesBalancesTransferCommon.ts#L13).&#xD;&#xA;&#xD;&#xA;Under the hood, txwrappercore's  [decodeSignedTx](https://github.com/paritytech/txwrapper-core/blob/b3d7fc1ea49244cbda18d08f14a5d2cdd0b2e78c/packages/txwrapper-core/src/core/decode/decodeSignedTx.ts#L16) method is essentially using [hexToU8a](https://github.com/paritytech/txwrapper-core/blob/b3d7fc1ea49244cbda18d08f14a5d2cdd0b2e78c/packages/txwrapper-core/src/core/decode/decodeSignedTx.ts#L5) which comes from [@polkadot/util](https://github.com/polkadot-js/common/tree/master/packages/util)." ContentLicense="CC BY-SA 4.0" />
  <row Id="740" PostHistoryTypeId="5" PostId="207" RevisionGUID="afdf58d3-e165-4723-8e8c-c4a152179228" CreationDate="2022-02-14T20:50:16.853" UserId="29" Comment="edited body" Text="Have you tried the [`.toHuman()`](https://polkadot.js.org/docs/api/start/types.basics) method in [@polkadotjs](https://github.com/polkadot-js/api)? You can see an example [here](https://github.com/polkadot-js/api/blob/8ba4ed53776a7a71478e229547c7af3d4dc57d63/packages/types/src/extrinsic/Extrinsic.spec.ts#L40).&#xD;&#xA;&#xD;&#xA;&gt; `.toHuman()` - returns Human-parsable JSON structure with values formatted as per the settings&#xD;&#xA;&#xD;&#xA;Depending on your use-case, you could use [txwrappercore](https://github.com/paritytech/txwrapper-core/) to convert your extrinsic by using the `decodeSignedTx()` or the `decodeUnsignedTx()` method.&#xD;&#xA;&#xD;&#xA;````javascript&#xD;&#xA;const decoded = decodeSignedTx(signedTx, POLKADOT_25_TEST_OPTIONS);&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;You can see the full code [here](https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/core/decode/decodeSignedTx.spec.ts#L39) and the associated test [here](https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/core/decode/test-helpers/itDecodesBalancesTransferCommon.ts#L13).&#xD;&#xA;&#xD;&#xA;Under the hood, txwrappercore's  [decodeSignedTx](https://github.com/paritytech/txwrapper-core/blob/b3d7fc1ea49244cbda18d08f14a5d2cdd0b2e78c/packages/txwrapper-core/src/core/decode/decodeSignedTx.ts#L16) method is essentially using the registry with the metadata + [hexToU8a](https://github.com/paritytech/txwrapper-core/blob/b3d7fc1ea49244cbda18d08f14a5d2cdd0b2e78c/packages/txwrapper-core/src/core/decode/decodeSignedTx.ts#L5) which comes from [@polkadot/util](https://github.com/polkadot-js/common/tree/master/packages/util)." ContentLicense="CC BY-SA 4.0" />
  <row Id="741" PostHistoryTypeId="5" PostId="207" RevisionGUID="6b33ef1a-eb4c-4cc9-b79b-a7aadc354536" CreationDate="2022-02-14T20:55:42.057" UserId="29" Comment="added 156 characters in body" Text="Have you tried the [`.toHuman()`](https://polkadot.js.org/docs/api/start/types.basics) method in [@polkadotjs](https://github.com/polkadot-js/api)? You can see an example [here](https://github.com/polkadot-js/api/blob/8ba4ed53776a7a71478e229547c7af3d4dc57d63/packages/types/src/extrinsic/Extrinsic.spec.ts#L40).&#xD;&#xA;&#xD;&#xA;&gt; `.toHuman()` - returns Human-parsable JSON structure with values formatted as per the settings&#xD;&#xA;&#xD;&#xA;Depending on your use-case, you could use [txwrappercore](https://github.com/paritytech/txwrapper-core/) to convert your extrinsic by using the `decodeSignedTx()` or the `decodeUnsignedTx()` method.&#xD;&#xA;&#xD;&#xA;````javascript&#xD;&#xA;const decoded = decodeSignedTx(signedTx, POLKADOT_25_TEST_OPTIONS);&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;You can see the full code [here](https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/core/decode/decodeSignedTx.spec.ts#L39) and the associated test [here](https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/core/decode/test-helpers/itDecodesBalancesTransferCommon.ts#L13).&#xD;&#xA;&#xD;&#xA;Under the hood, txwrappercore's  [decodeSignedTx](https://github.com/paritytech/txwrapper-core/blob/b3d7fc1ea49244cbda18d08f14a5d2cdd0b2e78c/packages/txwrapper-core/src/core/decode/decodeSignedTx.ts#L16) method is essentially using the [registry with the metadata](https://github.com/paritytech/txwrapper-core/blob/b3d7fc1ea49244cbda18d08f14a5d2cdd0b2e78c/packages/txwrapper-core/src/core/decode/decodeSignedTx.ts#L22) + [hexToU8a](https://github.com/paritytech/txwrapper-core/blob/b3d7fc1ea49244cbda18d08f14a5d2cdd0b2e78c/packages/txwrapper-core/src/core/decode/decodeSignedTx.ts#L5) which comes from [@polkadot/util](https://github.com/polkadot-js/common/tree/master/packages/util)." ContentLicense="CC BY-SA 4.0" />
  <row Id="742" PostHistoryTypeId="2" PostId="208" RevisionGUID="075d70cc-989f-46b5-b9a4-8e7641515faa" CreationDate="2022-02-14T20:58:12.277" UserId="73" Text="A runtime `BaseCallFilter` can not be set with an extrinsic. You need to set the filter in your runtime &quot;statically&quot;. It is also best advised to write the filter in such a way that you allow calls explicitly instead of having wildcards. Be aware that Sudo ignores `BaseCallFilter`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="744" PostHistoryTypeId="5" PostId="207" RevisionGUID="8cbcf502-deec-4cf0-803a-9124e9f07dee" CreationDate="2022-02-14T21:19:55.517" UserId="29" Comment="deleted 251 characters in body" Text="Have you tried the [`.toHuman()`](https://polkadot.js.org/docs/api/start/types.basics) method in [@polkadotjs](https://github.com/polkadot-js/api)? &#xD;&#xA;&#xD;&#xA;&gt; `.toHuman()` - returns Human-parsable JSON structure with values formatted as per the settings&#xD;&#xA;&#xD;&#xA;You can see an example [here](https://github.com/polkadot-js/api/blob/8ba4ed53776a7a71478e229547c7af3d4dc57d63/packages/types/src/extrinsic/Extrinsic.spec.ts#L40).&#xD;&#xA;&#xD;&#xA;You need to set the metadata in the registry and use polkadot-js to handle the SCALE decoding for you.&#xD;&#xA;&#xD;&#xA;Another implementation you can take a look at is how the [txwrappercore](https://github.com/paritytech/txwrapper-core/) library decodes:&#xD;&#xA;&#xD;&#xA;````javascript&#xD;&#xA;const decoded = decode(Tx);&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;You can see it being called [here](https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/core/decode/decode.spec.ts#L34).&#xD;&#xA;&#xD;&#xA;Under the hood, txwrappercore's  [decodeSignedTx](https://github.com/paritytech/txwrapper-core/blob/b3d7fc1ea49244cbda18d08f14a5d2cdd0b2e78c/packages/txwrapper-core/src/core/decode/decodeSignedTx.ts#L16) method is essentially using the [registry with the metadata](https://github.com/paritytech/txwrapper-core/blob/b3d7fc1ea49244cbda18d08f14a5d2cdd0b2e78c/packages/txwrapper-core/src/core/decode/decodeSignedTx.ts#L22) + [hexToU8a](https://github.com/paritytech/txwrapper-core/blob/b3d7fc1ea49244cbda18d08f14a5d2cdd0b2e78c/packages/txwrapper-core/src/core/decode/decodeSignedTx.ts#L5) which comes from [@polkadot](https://github.com/polkadot-js)." ContentLicense="CC BY-SA 4.0" />
  <row Id="745" PostHistoryTypeId="2" PostId="209" RevisionGUID="a525f5f7-0dc4-4969-95e0-c6a2b869c035" CreationDate="2022-02-14T23:35:34.033" UserId="85" Text="Substrate-archive also seems to be a way to index:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate-archive" ContentLicense="CC BY-SA 4.0" />
  <row Id="747" PostHistoryTypeId="2" PostId="210" RevisionGUID="61ffa2ac-a7ff-4f7d-a2cb-44ff1f3d06b4" CreationDate="2022-02-14T23:55:04.640" UserId="373" Text="AFAIK, we can't use std in Substrate WASM runtime, what is the most effective way to convert a string to a number in runtime. &#xD;&#xA;&#xD;&#xA;For example: string &quot;48&quot; in Vec&lt;u8&gt; to 48 in u32. " ContentLicense="CC BY-SA 4.0" />
  <row Id="749" PostHistoryTypeId="1" PostId="210" RevisionGUID="61ffa2ac-a7ff-4f7d-a2cb-44ff1f3d06b4" CreationDate="2022-02-14T23:55:04.640" UserId="373" Text="How to convert Vec&lt;u8&gt; to u32 in Substrate runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="750" PostHistoryTypeId="3" PostId="210" RevisionGUID="61ffa2ac-a7ff-4f7d-a2cb-44ff1f3d06b4" CreationDate="2022-02-14T23:55:04.640" UserId="373" Text="|rust|substrate-node-template|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="751" PostHistoryTypeId="2" PostId="211" RevisionGUID="ee883bef-24a8-4242-a9c3-a65c1982dc29" CreationDate="2022-02-15T00:24:52.670" UserId="104" Text="To add onto Shawn's detailed answer, the XCM format is comprised of a set of instructions that convey semantics and optionally contain operands that is defined by the spec for the chain that processes the instructions.&#xD;&#xA;&#xD;&#xA;For example, one of the basic XCM instructions is `WithdrawAsset`, and if we take a look at the spec, it says the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Remove the on-chain asset(s) (assets) and accrue them into Holding.&#xD;&#xA;&#xD;&#xA;Operands:&#xD;&#xA;&#xD;&#xA; * assets: MultiAssets: The asset(s) to be removed; must be owned by Origin.&#xD;&#xA;&#xD;&#xA;Kind: Instruction.&#xD;&#xA;&#xD;&#xA;Errors: Fallible.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The first paragraph in the spec denotes _what_ the `WithdrawAsset` instruction is aimed to do -- remove on-chain assets owned by the origin (i.e. the account that submitted the XCM instruction) and put it into the holding [register].&#xD;&#xA;&#xD;&#xA;The next item there lists out the operands that `WithdrawAsset` is expected to contain. We see that there's only one operand called `assets`, and it is used to indicate the assets -- both the class and amount of assets -- that we want to remove from the origin.&#xD;&#xA;&#xD;&#xA;After that, we see the kind of XCM instruction that `WithdrawAsset` belongs to. Despite it being called &quot;XCM instructions&quot;, some of them are not strictly &quot;instructions&quot; in the sense that they are used to orchestrate actions or behavioural changes; `ReserveAssetDeposited` would be one such XCM &quot;instruction&quot; that is not a kind of instruction, but a kind of &quot;trusted indication&quot;, as it is used to truthfully inform its destination that some assets have been put into its account on the reserve chain. Needless to say though, `WithdrawAsset` is a kind of instruction.&#xD;&#xA;&#xD;&#xA;Finally, we are informed about whether or not the instruction is fallible or not. Later versions of the spec may eventually add the kinds of errors that we would expect to see when errors are thrown whilst processing an XCM instruction.&#xD;&#xA;&#xD;&#xA;What you won't see in the spec here is _how_ exactly the consensus system that executes the XCM instructions is supposed to process them; that is left for the implementors of the consensus system to decide. To give a concrete example with `WithdrawAsset`, the spec only defines the format of the instruction and the purpose of it. The exact functions to call or modules to include is not mentioned at all within the spec, meaning that it really doesn't matter if the implementor has used the balances pallet, the assets pallet or even some other mechanism to withdraw assets from the origin account, as long as the methods used fulfills the objective of &quot;removing the on-chain assets and accrue them into the holding register&quot;.&#xD;&#xA;&#xD;&#xA;A corollary to what I have mentioned above is that implementors may even introduce side effects while processing a particular XCM instruction, such as making logs of the instructions that it has processed, or firing off events based on conditions, etc. In XCM, we simply don't quite care about these side effects, as long as the consensus system can produce the desired semantics." ContentLicense="CC BY-SA 4.0" />
  <row Id="753" PostHistoryTypeId="5" PostId="207" RevisionGUID="16f1f099-cc5b-4e6c-a78f-60550e221968" CreationDate="2022-02-15T01:17:44.763" UserId="29" Comment="i think this is what they are looking for.." Text="You can use @polkadot-js and do something like this:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;const exampleBlockNumber = 7200920&#xD;&#xA;const blockHash = await api.rpc.chain.getBlockHash(exampleBlockNumber);&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;&#xD;&#xA;signedBlock.block.extrinsics.forEach((ex, index) =&gt; {&#xD;&#xA;  console.log(index, ex.toHuman());&#xD;&#xA;  const { method: { args, method, section } } = ex;&#xD;&#xA;  console.log(`${section}.${method}(${args.map((a) =&gt; a.toString()).join(', ')})`);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which will give you output like this:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{isSigned: false, method: {…}}&#xD;&#xA;timestamp.set(1633886766001)&#xD;&#xA;{isSigned: true, method: {…}, era: {…}, nonce: '0', signature: '0x56344710ae648a1da40e2c1a1159c73fdbd7d522af01f1fd…7376ab59fd4c492a711cc64bba48d6ae23762d95176071a0c', …}&#xD;&#xA;balances.transfer(13Hwdzi6jkXtBWTSU5de5gC93hDog23pdqd59SPZ7s9zXVNL, 395536044985)&#xD;&#xA;{isSigned: true, method: {…}, era: {…}, nonce: '0', signature: '0x402484bf077d64a8018463a6ccb824f9487fdad8a186d50b…5ca230746fa10e793f5e42f027b53c065f9beb0472d1ca588', …}&#xD;&#xA;balances.transfer(15YHa58TQ624RNd5agRP1uuaqf6fqjUY5n5wrd6V2Ziu3Qsg, 31835000000)&#xD;&#xA;{isSigned: true, method: {…}, era: {…}, nonce: '6', signature: '0x158457697711485bc9b2b34fb1fbc0d4d2b0d91cf0de9502…eb85f4e03efef3fe58ccf174b827a3da05975af36d7687e07', …}&#xD;&#xA;balances.transfer(15BFDbm97npEgs9g7Cfrn7qLeL1g212qRmB58qA7N5F32Ti9, 28665000000)&#xD;&#xA;{isSigned: true, method: {…}, era: {…}, nonce: '1,697,264', signature: '0x928814bc12625c401f31df31cf3753c0045a770aac7e4d7f…5643cd9346bc07dd921f7c71605f311c783ba3d940d47a68d', …}&#xD;&#xA;utility.batch([{&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;16AhBPuZkS2Ugdx4G2VEBu6fJ734hr1Na3Qtn1PwiYrUdq6o&quot;},&quot;value&quot;:198803000000}}, {&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;13QLYLKmVfJBkWVWMhJtnFtZBYFK6KEiGHEwrGVsSJyVRpjd&quot;},&quot;value&quot;:749000000000}}, {&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;15aeeDCQrBnh5NhWxvkhQkZGQ6JH3HM3J8kTZBG8Pbmvj8mX&quot;},&quot;value&quot;:16600000000}}])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can find more info here: https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-view-extrinsic-information" ContentLicense="CC BY-SA 4.0" />
  <row Id="754" PostHistoryTypeId="2" PostId="212" RevisionGUID="70336b75-3690-46e3-a463-6b02dd6ee9c1" CreationDate="2022-02-15T01:37:33.547" UserId="28" Text="While you don't have access to `std`, you do have access to `core`, and that should have all the tools you need.&#xD;&#xA;&#xD;&#xA;For example, this should work fine inside of the runtime environment:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn string_to_number(text: Vec&lt;u8&gt;) -&gt; Result&lt;u32, DispatchError&gt; {&#xD;&#xA;	let text_as_string = core::str::from_utf8(&amp;text).map_err(|_| &quot;not a string&quot;)?;&#xD;&#xA;	let number: u32 = text_as_string.parse().map_err(|_| &quot;not a number&quot;)?;&#xD;&#xA;	Ok(number)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn string_to_number_works() {&#xD;&#xA;	let text = &quot;48&quot;.as_bytes().to_vec();&#xD;&#xA;	assert_eq!(crate::string_to_number(text).unwrap(), 48);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am not sure why you would do this though, as parsing text into a number is absolutely not something the runtime is meant to do, and will lead to a bunch of wasted computation and potential user errors.&#xD;&#xA;&#xD;&#xA;You should instead do any kind of text parsing in the front-end and only send expected types over to your runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="756" PostHistoryTypeId="6" PostId="210" RevisionGUID="e7673b35-ef7c-4962-899b-bef34ce4acbc" CreationDate="2022-02-15T01:38:52.297" UserId="28" Comment="edited tags" Text="|rust|string|parse|" ContentLicense="CC BY-SA 4.0" />
  <row Id="757" PostHistoryTypeId="2" PostId="213" RevisionGUID="22938c76-4e08-4eb5-b5b6-31582eaa2a20" CreationDate="2022-02-15T01:45:20.983" UserId="28" Text="As @bkchr pointed out, you want to use a `BaseCallFilter` which is configured inside of your runtime for the `frame_system` Pallet.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Use this filter to block users from calling any functions in the Balances pallet.&#xD;&#xA;pub struct DontAllowBalances;&#xD;&#xA;impl Contains&lt;Call&gt; for DontAllowBalances {&#xD;&#xA;	fn contains(c: &amp;Call) -&gt; bool {&#xD;&#xA;        // This will match against any call from the Balances pallet.&#xD;&#xA;		!matches!(c, Call::Balances(..)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you configure your System pallet to use this filter:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;	type BaseCallFilter = DontAllowBalances;&#xD;&#xA;    // -- snip --&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This works for any pallet or call, and is how Polkadot and other chains disabled transfers or other kinds of calls in the bootstrapping stages of the network.&#xD;&#xA;&#xD;&#xA;See this PR which is the one which enabled balance transfers on Polkadot and uses this same feature: https://github.com/paritytech/polkadot/pull/1443" ContentLicense="CC BY-SA 4.0" />
  <row Id="759" PostHistoryTypeId="2" PostId="214" RevisionGUID="6144e383-b07b-4483-ac3b-665b11ddb274" CreationDate="2022-02-15T05:44:52.533" UserId="286" Text="While experimenting with relay chain testnet, [Decentration](https://substrate.stackexchange.com/users/298/decentration) and I ran into [this issue with multiple validators on the same node](https://github.com/paritytech/substrate/issues/3324), stalled finality and got the chain into slow block-making mode.&#xD;&#xA;&#xD;&#xA;We tried to restart finality with [api.tx.grandpa.noteStalled](https://polkadot.js.org/docs/substrate/extrinsics/#notestalleddelay-u32-best_finalized_block_number-u32) and then managed to stall block production completely with this error, trying and failing to build the next block once a minute or so:&#xD;&#xA;&#xD;&#xA;``` Idle (12 peers), best: #24409 (0xdf1c…5410), finalized #23324 (0x4169…831c), ⬇ 0.6kiB/s ⬆ 0.6kiB/s&#xD;&#xA; Starting consensus session on top of parent 0xdf1c27f8e8c9210f224b6849cead0e9ab257f73b78444007c746ae8c42cf5410&#xD;&#xA; Prepared block for proposing at 24410 (6 ms) [hash: 0xcddfad6034e4e777627004e33da3fdb98ef3c0787182f1aefe6677f83be8726c; parent_hash: 0xdf1c…5410; extrinsics (2): [0xca0f…d245, 0x15a4…b00e]]&#xD;&#xA; Pre-sealed block for proposal at 24410. Hash now 0x9dd9e87a0d6e77516f656eee094897f0ad64ef1cf4d0a62269ba617f0340d99b, previously 0xcddfad6034e4e777627004e33da3fdb98ef3c0787182f1aefe6677f83be8726c.&#xD;&#xA; New epoch 72 launching at block 0x9dd9…d99b (block slot 274112089 &gt;= start slot 274112018).&#xD;&#xA; Next epoch starts at slot 274112618&#xD;&#xA;Not applying authority set change forced at block #24405, due to pending standard change at block #23434&#xD;&#xA;Error with block built on 0xdf1c27f8e8c9210f224b6849cead0e9ab257f73b78444007c746ae8c42cf5410: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #23434&quot;)&#xD;&#xA; Idle (11 peers), best: #24409 (0xdf1c…5410), finalized #23324 (0x4169…831c), ⬇ 0.9kiB/s ⬆ 1.4kiB/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Was this the right method but we got the parameters wrong, or should we have used something else?" ContentLicense="CC BY-SA 4.0" />
  <row Id="761" PostHistoryTypeId="1" PostId="214" RevisionGUID="6144e383-b07b-4483-ac3b-665b11ddb274" CreationDate="2022-02-15T05:44:52.533" UserId="286" Text="Recovering from stalled finality (babe/grandpa)" ContentLicense="CC BY-SA 4.0" />
  <row Id="762" PostHistoryTypeId="3" PostId="214" RevisionGUID="6144e383-b07b-4483-ac3b-665b11ddb274" CreationDate="2022-02-15T05:44:52.533" UserId="286" Text="|consensus|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="763" PostHistoryTypeId="5" PostId="214" RevisionGUID="b73e48a7-869a-4783-8ee1-e2936592c253" CreationDate="2022-02-15T06:56:25.600" UserId="286" Comment="added 2 characters in body" Text="While experimenting with a relay chain testnet, [Decentration](https://substrate.stackexchange.com/users/298/decentration) and I ran into [this issue with multiple validators on the same node](https://github.com/paritytech/substrate/issues/3324), stalled finality and got the chain into slow block-making mode.&#xD;&#xA;&#xD;&#xA;We tried to restart finality with [api.tx.grandpa.noteStalled](https://polkadot.js.org/docs/substrate/extrinsics/#notestalleddelay-u32-best_finalized_block_number-u32) and then managed to stall block production completely with this error, trying and failing to build the next block once a minute or so:&#xD;&#xA;&#xD;&#xA;``` Idle (12 peers), best: #24409 (0xdf1c…5410), finalized #23324 (0x4169…831c), ⬇ 0.6kiB/s ⬆ 0.6kiB/s&#xD;&#xA; Starting consensus session on top of parent 0xdf1c27f8e8c9210f224b6849cead0e9ab257f73b78444007c746ae8c42cf5410&#xD;&#xA; Prepared block for proposing at 24410 (6 ms) [hash: 0xcddfad6034e4e777627004e33da3fdb98ef3c0787182f1aefe6677f83be8726c; parent_hash: 0xdf1c…5410; extrinsics (2): [0xca0f…d245, 0x15a4…b00e]]&#xD;&#xA; Pre-sealed block for proposal at 24410. Hash now 0x9dd9e87a0d6e77516f656eee094897f0ad64ef1cf4d0a62269ba617f0340d99b, previously 0xcddfad6034e4e777627004e33da3fdb98ef3c0787182f1aefe6677f83be8726c.&#xD;&#xA; New epoch 72 launching at block 0x9dd9…d99b (block slot 274112089 &gt;= start slot 274112018).&#xD;&#xA; Next epoch starts at slot 274112618&#xD;&#xA;Not applying authority set change forced at block #24405, due to pending standard change at block #23434&#xD;&#xA;Error with block built on 0xdf1c27f8e8c9210f224b6849cead0e9ab257f73b78444007c746ae8c42cf5410: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #23434&quot;)&#xD;&#xA; Idle (11 peers), best: #24409 (0xdf1c…5410), finalized #23324 (0x4169…831c), ⬇ 0.9kiB/s ⬆ 1.4kiB/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Was this the right method but we got the parameters wrong, or should we have used something else?" ContentLicense="CC BY-SA 4.0" />
  <row Id="764" PostHistoryTypeId="2" PostId="215" RevisionGUID="6a5cea5c-6d5d-4f50-9db8-940fce1be029" CreationDate="2022-02-15T08:03:06.653" UserId="376" Text=" I am trying to create my own derives using DeriveCustom like this:&#xD;&#xA;```js&#xD;&#xA;import { DeriveCustom } from '@polkadot/api-derive';&#xD;&#xA;import * as staking from './staking';&#xD;&#xA;&#xD;&#xA;export const derive: DeriveCustom = {&#xD;&#xA;  customStaking: staking as unknown as DeriveCustom[string]&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;```js&#xD;&#xA;import { derive as customDerive } from '@my-network/api-derive';&#xD;&#xA;// ...&#xD;&#xA;export const options = ({&#xD;&#xA;// ..&#xD;&#xA;derives: {&#xD;&#xA;    ...customDerive,&#xD;&#xA;  }&#xD;&#xA;// ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;but when I try to use `api.derive.customStaking`, it is not recognized by typescript." ContentLicense="CC BY-SA 4.0" />
  <row Id="766" PostHistoryTypeId="1" PostId="215" RevisionGUID="6a5cea5c-6d5d-4f50-9db8-940fce1be029" CreationDate="2022-02-15T08:03:06.653" UserId="376" Text="How do I write custom a custom api-derive?" ContentLicense="CC BY-SA 4.0" />
  <row Id="767" PostHistoryTypeId="3" PostId="215" RevisionGUID="6a5cea5c-6d5d-4f50-9db8-940fce1be029" CreationDate="2022-02-15T08:03:06.653" UserId="376" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="768" PostHistoryTypeId="2" PostId="216" RevisionGUID="6cb1d506-96c8-4029-ab51-3ac750143bce" CreationDate="2022-02-15T08:14:49.623" UserId="376" Text="As a workaround I cast to any:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;await (api.derive as any).customDerive.method()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But this loses intellisense and type checking." ContentLicense="CC BY-SA 4.0" />
  <row Id="770" PostHistoryTypeId="2" PostId="217" RevisionGUID="5aead35e-b36c-460a-8795-280e5e32b308" CreationDate="2022-02-15T08:19:18.363" UserId="85" Text="As the first batch of leases come to a close in the next few months for the first batch of parachains on Kusama ( https://parachains.info/auctions/kusama-1-5 ),&#xD;&#xA;&#xD;&#xA; - what can we expect in terms of timings as to when they might have to take actions if they want to re-lease?&#xD;&#xA; - what actions would they likely have to take&#xD;&#xA; - and should we anticipate any interruption of service from those parachains?&#xD;&#xA;&#xD;&#xA;(It would be great if answers can include concrete dates concerning this first batch.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="772" PostHistoryTypeId="1" PostId="217" RevisionGUID="5aead35e-b36c-460a-8795-280e5e32b308" CreationDate="2022-02-15T08:19:18.363" UserId="85" Text="What happens when a parachain's lease runs out? (we're about to find out)" ContentLicense="CC BY-SA 4.0" />
  <row Id="773" PostHistoryTypeId="3" PostId="217" RevisionGUID="5aead35e-b36c-460a-8795-280e5e32b308" CreationDate="2022-02-15T08:19:18.363" UserId="85" Text="|parachain|crowdloan|curiosity-killed-the-cat|" ContentLicense="CC BY-SA 4.0" />
  <row Id="774" PostHistoryTypeId="2" PostId="218" RevisionGUID="f59eda97-d9ec-4026-ac0c-04f0f0effc5a" CreationDate="2022-02-15T09:10:22.150" UserId="129" Text="So I'm trying to make a faucet for my blockchain. What I'm doing is creating a faucet account with a lot of balances (with the set_balance method from the sudo pallet). When there's a drip request, I transfer some balance from this faucet account to the requested account. Am I doing it right? If not, how should I do it? " ContentLicense="CC BY-SA 4.0" />
  <row Id="776" PostHistoryTypeId="1" PostId="218" RevisionGUID="f59eda97-d9ec-4026-ac0c-04f0f0effc5a" CreationDate="2022-02-15T09:10:22.150" UserId="129" Text="What is the best practices to add new token to an account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="777" PostHistoryTypeId="3" PostId="218" RevisionGUID="f59eda97-d9ec-4026-ac0c-04f0f0effc5a" CreationDate="2022-02-15T09:10:22.150" UserId="129" Text="|balances|transfer|faucet|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="778" PostHistoryTypeId="2" PostId="219" RevisionGUID="2fbaeecd-b3ab-4b12-b1b4-33eaac074d65" CreationDate="2022-02-15T09:17:33.250" UserId="167" Text="As described in the [CHANGELOG of the 7.x release](https://github.com/polkadot-js/api/releases/tag/v7.0.1), you must add the line: &#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import '@polkadot/api-augment';&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the types should work again. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="780" PostHistoryTypeId="2" PostId="220" RevisionGUID="8ba5f45d-bce6-4b6a-b61d-513bb6f92561" CreationDate="2022-02-15T10:49:10.370" UserId="379" Text="I get the following stacktrace while trying to build my node binary with benchmarking features.&#xD;&#xA;&#xD;&#xA;Build command: `cargo build --release --features runtime-benchmarks`&#xD;&#xA;```&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `successful_origin`&#xD;&#xA;   --&gt; /home/dylan/.cargo/registry/src/github.com-1ecc6299db9ec823/pallet-collective-3.0.0/src/lib.rs:872:1&#xD;&#xA;    |&#xD;&#xA;872 | / impl&lt;&#xD;&#xA;873 | |     O: Into&lt;Result&lt;RawOrigin&lt;AccountId, I&gt;, O&gt;&gt; + From&lt;RawOrigin&lt;AccountId, I&gt;&gt;,&#xD;&#xA;874 | |     AccountId: Default,&#xD;&#xA;875 | |     I,&#xD;&#xA;...   |&#xD;&#xA;888 | |     }&#xD;&#xA;889 | | }&#xD;&#xA;    | |_^ missing `successful_origin` in implementation&#xD;&#xA;    |&#xD;&#xA;    = help: implement the missing item: `fn successful_origin() -&gt; OuterOrigin { todo!() }`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="782" PostHistoryTypeId="1" PostId="220" RevisionGUID="8ba5f45d-bce6-4b6a-b61d-513bb6f92561" CreationDate="2022-02-15T10:49:10.370" UserId="379" Text="Error building node with benchmarking features" ContentLicense="CC BY-SA 4.0" />
  <row Id="783" PostHistoryTypeId="3" PostId="220" RevisionGUID="8ba5f45d-bce6-4b6a-b61d-513bb6f92561" CreationDate="2022-02-15T10:49:10.370" UserId="379" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="784" PostHistoryTypeId="2" PostId="221" RevisionGUID="80411a8c-8c1d-4241-97d0-617c3d28d04b" CreationDate="2022-02-15T10:54:14.487" UserId="46" Text="PolkaDotJS API [docs][1] show to get extrinsic, events, etc data for a particular block. Is there a way to get all the extrinsic, events, etc data for the substrate network without having to get for each block?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="786" PostHistoryTypeId="1" PostId="221" RevisionGUID="80411a8c-8c1d-4241-97d0-617c3d28d04b" CreationDate="2022-02-15T10:54:14.487" UserId="46" Text="How to get historical substrate (extrinsic, events, etc) data using polkaDotJS API" ContentLicense="CC BY-SA 4.0" />
  <row Id="787" PostHistoryTypeId="3" PostId="221" RevisionGUID="80411a8c-8c1d-4241-97d0-617c3d28d04b" CreationDate="2022-02-15T10:54:14.487" UserId="46" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="790" PostHistoryTypeId="6" PostId="220" RevisionGUID="3cc09d35-dc85-417d-9bab-d90746ff5cf6" CreationDate="2022-02-15T12:31:40.237" UserId="85" Comment="more tags to tag it more." Text="|substrate-node|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="791" PostHistoryTypeId="24" PostId="220" RevisionGUID="3cc09d35-dc85-417d-9bab-d90746ff5cf6" CreationDate="2022-02-15T12:31:40.237" Comment="Proposed by 85 approved by 178 edit id of 38" ContentLicense="CC BY-SA 4.0" />
  <row Id="792" PostHistoryTypeId="2" PostId="223" RevisionGUID="07a41929-0764-4d56-a3b0-4ed28967f495" CreationDate="2022-02-15T12:32:28.537" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="794" PostHistoryTypeId="1" PostId="223" RevisionGUID="07a41929-0764-4d56-a3b0-4ed28967f495" CreationDate="2022-02-15T12:32:28.537" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="795" PostHistoryTypeId="2" PostId="224" RevisionGUID="81cbe153-7edb-440d-bf27-c68e8eb62643" CreationDate="2022-02-15T12:32:28.537" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="797" PostHistoryTypeId="1" PostId="224" RevisionGUID="81cbe153-7edb-440d-bf27-c68e8eb62643" CreationDate="2022-02-15T12:32:28.537" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="798" PostHistoryTypeId="2" PostId="225" RevisionGUID="396b5152-b94f-4ae4-8666-b2c995c176c5" CreationDate="2022-02-15T12:33:45.293" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="800" PostHistoryTypeId="1" PostId="225" RevisionGUID="396b5152-b94f-4ae4-8666-b2c995c176c5" CreationDate="2022-02-15T12:33:45.293" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="801" PostHistoryTypeId="2" PostId="226" RevisionGUID="66c4e945-1dd8-4eed-ab94-b966b5d71c7a" CreationDate="2022-02-15T12:33:45.293" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="803" PostHistoryTypeId="1" PostId="226" RevisionGUID="66c4e945-1dd8-4eed-ab94-b966b5d71c7a" CreationDate="2022-02-15T12:33:45.293" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="804" PostHistoryTypeId="2" PostId="227" RevisionGUID="52e40682-4c73-456e-a203-c66a05607d21" CreationDate="2022-02-15T12:35:06.383" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="806" PostHistoryTypeId="1" PostId="227" RevisionGUID="52e40682-4c73-456e-a203-c66a05607d21" CreationDate="2022-02-15T12:35:06.383" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="807" PostHistoryTypeId="2" PostId="228" RevisionGUID="53fd2596-5d14-4c9b-acdc-6c25f1f66bcb" CreationDate="2022-02-15T12:35:06.383" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="809" PostHistoryTypeId="1" PostId="228" RevisionGUID="53fd2596-5d14-4c9b-acdc-6c25f1f66bcb" CreationDate="2022-02-15T12:35:06.383" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="810" PostHistoryTypeId="2" PostId="229" RevisionGUID="01fd8b3d-af12-40d9-b1a0-ddc8deaadfb2" CreationDate="2022-02-15T12:39:55.503" UserId="200" Text="[StateBackend::storage][1] calls return `None` when the `StorageKey` is empty.&#xD;&#xA;&#xD;&#xA;If `OnEmpty` was set, one can decode and parse the `RuntimeMetadata` to access the default value and fall back to it.&#xD;&#xA;&#xD;&#xA;- Is there any alternative method to get a storage *default* value from the client?&#xD;&#xA;- In other words, are `OnEmpty` values persisted exclusively on the `RuntimeMetadata`?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/sc_rpc/state/trait.StateBackend.html#tymethod.storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="812" PostHistoryTypeId="1" PostId="229" RevisionGUID="01fd8b3d-af12-40d9-b1a0-ddc8deaadfb2" CreationDate="2022-02-15T12:39:55.503" UserId="200" Text="Access runtime storage `OnEmpty` values from the client" ContentLicense="CC BY-SA 4.0" />
  <row Id="813" PostHistoryTypeId="3" PostId="229" RevisionGUID="01fd8b3d-af12-40d9-b1a0-ddc8deaadfb2" CreationDate="2022-02-15T12:39:55.503" UserId="200" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="814" PostHistoryTypeId="2" PostId="230" RevisionGUID="e84d84bd-46c4-4533-982f-82c8ab76c0fc" CreationDate="2022-02-15T13:39:07.767" UserId="139" Text="Reading the description I feel like Identity just allows you to reserve a &quot;name&quot; on chain, in exchange for bonding some tokens. Is this just a better version of the nicks pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="816" PostHistoryTypeId="1" PostId="230" RevisionGUID="e84d84bd-46c4-4533-982f-82c8ab76c0fc" CreationDate="2022-02-15T13:39:07.767" UserId="139" Text="Is pallet Identity just an improved version of Nicks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="817" PostHistoryTypeId="3" PostId="230" RevisionGUID="e84d84bd-46c4-4533-982f-82c8ab76c0fc" CreationDate="2022-02-15T13:39:07.767" UserId="139" Text="|pallet-identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="818" PostHistoryTypeId="2" PostId="231" RevisionGUID="ea60335b-bdb6-474d-aec6-e551d8688b38" CreationDate="2022-02-15T13:54:38.797" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="820" PostHistoryTypeId="1" PostId="231" RevisionGUID="ea60335b-bdb6-474d-aec6-e551d8688b38" CreationDate="2022-02-15T13:54:38.797" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="821" PostHistoryTypeId="2" PostId="232" RevisionGUID="091c433d-e86e-4b6a-8ef0-9c9bddb6c297" CreationDate="2022-02-15T13:54:38.797" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="823" PostHistoryTypeId="1" PostId="232" RevisionGUID="091c433d-e86e-4b6a-8ef0-9c9bddb6c297" CreationDate="2022-02-15T13:54:38.797" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="824" PostHistoryTypeId="2" PostId="233" RevisionGUID="69d30ad8-9dcf-4de7-9495-8c2094cd813c" CreationDate="2022-02-15T13:56:09.157" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="826" PostHistoryTypeId="1" PostId="233" RevisionGUID="69d30ad8-9dcf-4de7-9495-8c2094cd813c" CreationDate="2022-02-15T13:56:09.157" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="827" PostHistoryTypeId="2" PostId="234" RevisionGUID="6d33e979-a30a-4d2b-b063-fd6390f908a4" CreationDate="2022-02-15T13:56:09.157" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="829" PostHistoryTypeId="1" PostId="234" RevisionGUID="6d33e979-a30a-4d2b-b063-fd6390f908a4" CreationDate="2022-02-15T13:56:09.157" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="831" PostHistoryTypeId="2" PostId="235" RevisionGUID="6b1398b1-10c0-4428-bc1a-36880d36818b" CreationDate="2022-02-15T14:31:50.877" UserId="139" Text="Coming across a few pallets like Authorship, one finds a frequent mention of `Uncles` or `UncleGenerations`. What are uncles?" ContentLicense="CC BY-SA 4.0" />
  <row Id="833" PostHistoryTypeId="1" PostId="235" RevisionGUID="6b1398b1-10c0-4428-bc1a-36880d36818b" CreationDate="2022-02-15T14:31:50.877" UserId="139" Text="What are uncles?" ContentLicense="CC BY-SA 4.0" />
  <row Id="834" PostHistoryTypeId="3" PostId="235" RevisionGUID="6b1398b1-10c0-4428-bc1a-36880d36818b" CreationDate="2022-02-15T14:31:50.877" UserId="139" Text="|historical|terminology|authorship|" ContentLicense="CC BY-SA 4.0" />
  <row Id="835" PostHistoryTypeId="2" PostId="236" RevisionGUID="b45087bc-d93f-4f3e-ac07-57bbaa070427" CreationDate="2022-02-15T14:36:10.757" UserId="139" Text="What is meant by terms like Sealing, InstantSeal, etc. (please add them here if you know more kinds of seals). " ContentLicense="CC BY-SA 4.0" />
  <row Id="837" PostHistoryTypeId="1" PostId="236" RevisionGUID="b45087bc-d93f-4f3e-ac07-57bbaa070427" CreationDate="2022-02-15T14:36:10.757" UserId="139" Text="What is sealing in a blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="838" PostHistoryTypeId="3" PostId="236" RevisionGUID="b45087bc-d93f-4f3e-ac07-57bbaa070427" CreationDate="2022-02-15T14:36:10.757" UserId="139" Text="|blockchain|terminology|" ContentLicense="CC BY-SA 4.0" />
  <row Id="839" PostHistoryTypeId="2" PostId="237" RevisionGUID="f0d752ad-7c5d-45d1-86d6-fb9e29df4d52" CreationDate="2022-02-15T14:51:16.053" UserId="200" Text="&gt; exactly amount if to be accurate&#xD;&#xA;&#xD;&#xA;If by this you mean you are trying to drain your account to Zero, check [ExistenceRequirement][1] and how is the fee withdrawal handled in Substrate using [the KeepAlive variant][2].&#xD;&#xA;&#xD;&#xA;Your extrinsic will fail if you attempt to withdraw funds from your account going below the existential deposit.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/frame_support/traits/enum.ExistenceRequirement.html&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/payment.rs#L111-L114" ContentLicense="CC BY-SA 4.0" />
  <row Id="841" PostHistoryTypeId="5" PostId="207" RevisionGUID="f3eddd63-a13d-4d90-983f-942901b9c4d6" CreationDate="2022-02-15T15:07:29.577" UserId="29" Comment="added 180 characters in body" Text="You can use @polkadot-js and do something like this:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;const exampleBlockNumber = 7200920&#xD;&#xA;const blockHash = await api.rpc.chain.getBlockHash(exampleBlockNumber);&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;&#xD;&#xA;signedBlock.block.extrinsics.forEach((ex, index) =&gt; {&#xD;&#xA;  console.log(index, ex.toHuman());&#xD;&#xA;  const { method: { args, method, section } } = ex;&#xD;&#xA;  console.log(`${section}.${method}(${args.map((a) =&gt; a.toString()).join(', ')})`);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which will give you output like this:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{isSigned: false, method: {…}}&#xD;&#xA;timestamp.set(1633886766001)&#xD;&#xA;{isSigned: true, method: {…}, era: {…}, nonce: '0', signature: '0x56344710ae648a1da40e2c1a1159c73fdbd7d522af01f1fd…7376ab59fd4c492a711cc64bba48d6ae23762d95176071a0c', …}&#xD;&#xA;balances.transfer(13Hwdzi6jkXtBWTSU5de5gC93hDog23pdqd59SPZ7s9zXVNL, 395536044985)&#xD;&#xA;{isSigned: true, method: {…}, era: {…}, nonce: '0', signature: '0x402484bf077d64a8018463a6ccb824f9487fdad8a186d50b…5ca230746fa10e793f5e42f027b53c065f9beb0472d1ca588', …}&#xD;&#xA;balances.transfer(15YHa58TQ624RNd5agRP1uuaqf6fqjUY5n5wrd6V2Ziu3Qsg, 31835000000)&#xD;&#xA;{isSigned: true, method: {…}, era: {…}, nonce: '6', signature: '0x158457697711485bc9b2b34fb1fbc0d4d2b0d91cf0de9502…eb85f4e03efef3fe58ccf174b827a3da05975af36d7687e07', …}&#xD;&#xA;balances.transfer(15BFDbm97npEgs9g7Cfrn7qLeL1g212qRmB58qA7N5F32Ti9, 28665000000)&#xD;&#xA;{isSigned: true, method: {…}, era: {…}, nonce: '1,697,264', signature: '0x928814bc12625c401f31df31cf3753c0045a770aac7e4d7f…5643cd9346bc07dd921f7c71605f311c783ba3d940d47a68d', …}&#xD;&#xA;utility.batch([{&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;16AhBPuZkS2Ugdx4G2VEBu6fJ734hr1Na3Qtn1PwiYrUdq6o&quot;},&quot;value&quot;:198803000000}}, {&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;13QLYLKmVfJBkWVWMhJtnFtZBYFK6KEiGHEwrGVsSJyVRpjd&quot;},&quot;value&quot;:749000000000}}, {&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;15aeeDCQrBnh5NhWxvkhQkZGQ6JH3HM3J8kTZBG8Pbmvj8mX&quot;},&quot;value&quot;:16600000000}}])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can find more info here: https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-view-extrinsic-information&#xD;&#xA;&#xD;&#xA;This code will work on the frontend or backend. You can see an example of running this code on node (backend) here: https://github.com/brunopgalvao/node-dot/blob/main/server.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="842" PostHistoryTypeId="2" PostId="238" RevisionGUID="0689fb97-13e3-4b70-b53d-72cee3cc7a93" CreationDate="2022-02-15T15:09:39.660" UserId="73" Text="No, there is no way to get the storage default value. If you want something like this, you will need to make the default value &quot;shareable&quot; between the node and runtime. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;struct MyType(u32);&#xD;&#xA;&#xD;&#xA;const MY_TYPE_DEFAULT: u32 = 10;&#xD;&#xA;&#xD;&#xA;impl Default for MyType {&#xD;&#xA;    fn default() -&gt; Self { Self(MY_TYPE_DEFAULT) }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Something like this. Then you can also just use `MY_TYPE_DEFAULT` in the node for example." ContentLicense="CC BY-SA 4.0" />
  <row Id="844" PostHistoryTypeId="2" PostId="239" RevisionGUID="f50a9be7-1d4f-4817-a74c-29d74898c78a" CreationDate="2022-02-15T15:18:34.843" UserId="73" Text="Each block, besides the genesis has a parent block. Let's assume you are building block X, the parent is X - 1. This means that all forks (blocks on with the same block number as X - 1) of X - 1 are the uncles of X. " ContentLicense="CC BY-SA 4.0" />
  <row Id="846" PostHistoryTypeId="2" PostId="240" RevisionGUID="c65d7443-c2f6-4605-8c2f-c1e5827549db" CreationDate="2022-02-15T15:19:41.980" UserId="298" Text="With a fresh [substrate-parachain-template][1]&#xD;&#xA;&#xD;&#xA;I ran `cargo build --features runtime-benchmarks`&#xD;&#xA;&#xD;&#xA;I get error from a deep dependency in `pallet_society`, which doesnt seem relevant to the parachain-template's pallets:&#xD;&#xA;&#xD;&#xA;```cli&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `successful_origin`&#xD;&#xA;    --&gt; /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/4aeb95f/frame/society/src/lib.rs:1268:1&#xD;&#xA;     |&#xD;&#xA;1268 | impl&lt;T: Config&gt; EnsureOrigin&lt;T::Origin&gt; for EnsureFounder&lt;T&gt; {&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `successful_origin` in implementation&#xD;&#xA;     |&#xD;&#xA;     = help: implement the missing item: `fn successful_origin() -&gt; OuterOrigin { todo!() }`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it looks like `fn successful_origin()...` is already [there][2]:&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;/// Simple ensure origin struct to filter for the founder account.&#xD;&#xA;pub struct EnsureFounder&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;impl&lt;T: Config&gt; EnsureOrigin&lt;T::Origin&gt; for EnsureFounder&lt;T&gt; {&#xD;&#xA;	type Success = T::AccountId;&#xD;&#xA;	fn try_origin(o: T::Origin) -&gt; Result&lt;Self::Success, T::Origin&gt; {&#xD;&#xA;		o.into().and_then(|o| match (o, Founder::&lt;T&gt;::get()) {&#xD;&#xA;			(frame_system::RawOrigin::Signed(ref who), Some(ref f)) if who == f =&gt; Ok(who.clone()),&#xD;&#xA;			(r, _) =&gt; Err(T::Origin::from(r)),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	fn successful_origin() -&gt; T::Origin {&#xD;&#xA;		let founder = Founder::&lt;T&gt;::get().expect(&quot;society founder should exist&quot;);&#xD;&#xA;		T::Origin::from(frame_system::RawOrigin::Signed(founder))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I resolve this?&#xD;&#xA;&#xD;&#xA;Origin issue [here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/4aeb95f7f38fcd519e2628f32f79044a8fef99d5/frame/society/src/lib.rs#L1278&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-parachain-template/issues/98" ContentLicense="CC BY-SA 4.0" />
  <row Id="848" PostHistoryTypeId="1" PostId="240" RevisionGUID="c65d7443-c2f6-4605-8c2f-c1e5827549db" CreationDate="2022-02-15T15:19:41.980" UserId="298" Text="Missing `successful_origin` in implementation when running runtime-benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="849" PostHistoryTypeId="3" PostId="240" RevisionGUID="c65d7443-c2f6-4605-8c2f-c1e5827549db" CreationDate="2022-02-15T15:19:41.980" UserId="298" Text="|polkadot|parachain|substrate-node-template|runtime-benchmarks|" ContentLicense="CC BY-SA 4.0" />
  <row Id="850" PostHistoryTypeId="2" PostId="241" RevisionGUID="f5b7fa67-bf1a-4108-9f2a-23c6c4872606" CreationDate="2022-02-15T15:45:07.727" UserId="73" Text="Sealing means signing a block. You put a &quot;seal&quot; on a block to say that this its content that doesn't get modified. If someone would try to modify it, they would invalidate the seal." ContentLicense="CC BY-SA 4.0" />
  <row Id="852" PostHistoryTypeId="2" PostId="242" RevisionGUID="54634333-7a36-427a-bc26-27e1dfc37f9d" CreationDate="2022-02-15T15:49:17.373" UserId="28" Text="The Nicks pallet is really not much more than a sample pallet. All it does is allow a user to set some string to their account, but there is no checking for uniqueness, accuracy, or anything that would resemble something useful on a public blockchain.&#xD;&#xA;&#xD;&#xA;The Identity pallet on the other hand is a relatively simple, but fully functioning production pallet which allows users to associate data with their account (like a legal name, twitter account, email address, etc) and have an attestation provider verify these pieces of information.&#xD;&#xA;&#xD;&#xA;I wouldn't go as far as to call the Identity pallet a &quot;decentralized identity&quot;, but it is a reasonable attempt at providing users with attestation based identity information, which can be super useful for things like helping select which Validators or council members to nominate.&#xD;&#xA;&#xD;&#xA;The Identity pallet has built in economics which pays attesters for their time, and multiple automated services have been set up to allow users to verify all the different points of their credentials." ContentLicense="CC BY-SA 4.0" />
  <row Id="854" PostHistoryTypeId="6" PostId="236" RevisionGUID="f3d7acd4-a3e4-44cd-80eb-811fa5d6a215" CreationDate="2022-02-15T15:50:35.377" UserId="28" Comment="edited tags" Text="|blockchain|terminology|" ContentLicense="CC BY-SA 4.0" />
  <row Id="855" PostHistoryTypeId="2" PostId="243" RevisionGUID="868149ea-8729-4bc2-acc0-ba573acd63e9" CreationDate="2022-02-15T17:33:17.033" UserId="29" Text="Extrinsics are part of a block and events are fired off based on the extrinsic and stored in system storage. You can query events based on block hash using the system state. With RPC, you would have to iterate per block and query the events based on the block. Here is example code:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const getAllData = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;    let blockNumber = lastHeader.number;&#xD;&#xA;&#xD;&#xA;    while (blockNumber &gt; 0) {&#xD;&#xA;        blockNumber = blockNumber - 1&#xD;&#xA;        const blockHash = await api.rpc.chain.getBlockHash(blockNumber);&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;            console.log(index, ex.toHuman());&#xD;&#xA;            const { method: { args, method, section } } = ex;&#xD;&#xA;            console.log(&quot;******EXTRINSIC--BEGIN***&quot;);&#xD;&#xA;            console.log(`${section}.${method}(${args.map((a) =&gt; a.toString()).join(', ')})`);&#xD;&#xA;            console.log(&quot;******EXTRINSIC--END*****&quot;);&#xD;&#xA;            &#xD;&#xA;            const allRecords = await api.query.system.events.at(blockHash);&#xD;&#xA;            // filter the specific events based on the phase and then the&#xD;&#xA;            // index of our extrinsic in the block&#xD;&#xA;            const events = allRecords&#xD;&#xA;                .filter(({ phase }) =&gt;&#xD;&#xA;                    phase.isApplyExtrinsic &amp;&amp;&#xD;&#xA;                    phase.asApplyExtrinsic.eq(index)&#xD;&#xA;                )&#xD;&#xA;                .map(({ event }) =&gt; `${event.section}.${event.method}`);&#xD;&#xA;&#xD;&#xA;            console.log(&quot;******EVENT--BEGIN*****&quot;);&#xD;&#xA;            console.log(`${section}.${method}:: ${events.join(', ') || 'no events'}`);&#xD;&#xA;            console.log(&quot;******EVENT--END*******&quot;);&#xD;&#xA;        });&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-map-extrinsics-to-their-events" ContentLicense="CC BY-SA 4.0" />
  <row Id="857" PostHistoryTypeId="2" PostId="244" RevisionGUID="3f07cd71-633e-4217-acb3-8e5587c75357" CreationDate="2022-02-15T17:54:20.073" UserId="16" Text="I was able to reproduce your problem. I even stripped down your contracts even more and was able to isolate the cross contract call as root of the problem. I also compiled with the latest `solang` commit (`95f2969`) and the bug is still there.&#xD;&#xA;&#xD;&#xA;I added some debug output to the substrate node in order to find out what is going on. It turns out that the error which makes the cross contract call fail is `ContractNotFound`. The reason why you see `ContractTrapped` is because the caller contract traps (revert without output data) when the call fails.&#xD;&#xA;&#xD;&#xA;I inspected the storage of the deployed `Incrementer` contract to see whether it stored the wrong value for `_flipper`. It turns out that is stores the **correct** value. I added further debugging to the node which revealed that the wrong `address` is passed when `Flipper` is called by `Incrementer`. The reason must therefore lie within the code in `solang` which generates the contract call because the solidity code is correct as far as I can tell.&#xD;&#xA;&#xD;&#xA;The minimal reproducer I used:&#xD;&#xA;&#xD;&#xA;```solidity&#xD;&#xA;contract Flipper {&#xD;&#xA;  function flip () pure public {}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;contract Inc {&#xD;&#xA;  Flipper _flipper;&#xD;&#xA;&#xD;&#xA;  constructor (Flipper _flipperContract) {&#xD;&#xA;      _flipper = _flipperContract;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  function superFlip () pure public {&#xD;&#xA;    _flipper.flip();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I opened a bug report here: https://github.com/hyperledger-labs/solang/issues/666" ContentLicense="CC BY-SA 4.0" />
  <row Id="859" PostHistoryTypeId="2" PostId="245" RevisionGUID="40e5ab62-d91b-4525-8e30-70c7f345731b" CreationDate="2022-02-15T17:54:46.440" UserId="28" Text="Thanks for reporting the issue. The problem here was a missing feature flag which enabled the `runtime-benchmarks` features in downstream dependencies.&#xD;&#xA;&#xD;&#xA;The solution for you should simply be to simply enable the `runtime-benchmarks` feature flag on `polkadot-cli` in `./node/Cargo.toml`:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[features]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;parachain-template-runtime/runtime-benchmarks&quot;,&#xD;&#xA;    # Add the line below&#xD;&#xA;	&quot;polkadot-cli/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We have made an upstream PR to fix this in the future!&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/cumulus/pull/991&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="861" PostHistoryTypeId="5" PostId="243" RevisionGUID="54fbb855-8b0a-4d64-bc5f-c51ca9ad4eda" CreationDate="2022-02-15T18:16:01.640" UserId="29" Comment="added 89 characters in body" Text="Extrinsics are stored as part of a block and events are &quot;intrinsic&quot; to the chain's state so they are stored separately in the chain's system storage. You can query events based on block hash using the system state. With RPC, you would have to iterate per block and query the events based on the block. Here is example code:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const getAllData = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;    let blockNumber = lastHeader.number;&#xD;&#xA;&#xD;&#xA;    while (blockNumber &gt; 0) {&#xD;&#xA;        blockNumber = blockNumber - 1&#xD;&#xA;        const blockHash = await api.rpc.chain.getBlockHash(blockNumber);&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;            console.log(index, ex.toHuman());&#xD;&#xA;            const { method: { args, method, section } } = ex;&#xD;&#xA;            console.log(&quot;******EXTRINSIC--BEGIN***&quot;);&#xD;&#xA;            console.log(`${section}.${method}(${args.map((a) =&gt; a.toString()).join(', ')})`);&#xD;&#xA;            console.log(&quot;******EXTRINSIC--END*****&quot;);&#xD;&#xA;            &#xD;&#xA;            const allRecords = await api.query.system.events.at(blockHash);&#xD;&#xA;            // filter the specific events based on the phase and then the&#xD;&#xA;            // index of our extrinsic in the block&#xD;&#xA;            const events = allRecords&#xD;&#xA;                .filter(({ phase }) =&gt;&#xD;&#xA;                    phase.isApplyExtrinsic &amp;&amp;&#xD;&#xA;                    phase.asApplyExtrinsic.eq(index)&#xD;&#xA;                )&#xD;&#xA;                .map(({ event }) =&gt; `${event.section}.${event.method}`);&#xD;&#xA;&#xD;&#xA;            console.log(&quot;******EVENT--BEGIN*****&quot;);&#xD;&#xA;            console.log(`${section}.${method}:: ${events.join(', ') || 'no events'}`);&#xD;&#xA;            console.log(&quot;******EVENT--END*******&quot;);&#xD;&#xA;        });&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-map-extrinsics-to-their-events" ContentLicense="CC BY-SA 4.0" />
  <row Id="862" PostHistoryTypeId="5" PostId="243" RevisionGUID="1da575c7-b4cb-4ea8-99cf-48cf1ed87ad9" CreationDate="2022-02-15T18:30:06.673" UserId="29" Comment="add indexer" Text="Extrinsics are stored as part of a block and events are &quot;intrinsic&quot; to the chain's state so they are stored separately in the chain's system storage. You can query events based on block hash using the system state. With RPC, you would have to iterate per block and query the events based on the block. Here is example code:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const getAllData = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;    let blockNumber = lastHeader.number;&#xD;&#xA;&#xD;&#xA;    while (blockNumber &gt; 0) {&#xD;&#xA;        blockNumber = blockNumber - 1&#xD;&#xA;        const blockHash = await api.rpc.chain.getBlockHash(blockNumber);&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;            console.log(index, ex.toHuman());&#xD;&#xA;            const { method: { args, method, section } } = ex;&#xD;&#xA;            console.log(&quot;******EXTRINSIC--BEGIN***&quot;);&#xD;&#xA;            console.log(`${section}.${method}(${args.map((a) =&gt; a.toString()).join(', ')})`);&#xD;&#xA;            console.log(&quot;******EXTRINSIC--END*****&quot;);&#xD;&#xA;            &#xD;&#xA;            const allRecords = await api.query.system.events.at(blockHash);&#xD;&#xA;            // filter the specific events based on the phase and then the&#xD;&#xA;            // index of our extrinsic in the block&#xD;&#xA;            const events = allRecords&#xD;&#xA;                .filter(({ phase }) =&gt;&#xD;&#xA;                    phase.isApplyExtrinsic &amp;&amp;&#xD;&#xA;                    phase.asApplyExtrinsic.eq(index)&#xD;&#xA;                )&#xD;&#xA;                .map(({ event }) =&gt; `${event.section}.${event.method}`);&#xD;&#xA;&#xD;&#xA;            console.log(&quot;******EVENT--BEGIN*****&quot;);&#xD;&#xA;            console.log(`${section}.${method}:: ${events.join(', ') || 'no events'}`);&#xD;&#xA;            console.log(&quot;******EVENT--END*******&quot;);&#xD;&#xA;        });&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-map-extrinsics-to-their-events&#xD;&#xA;&#xD;&#xA;If you're not interested in iterating per block than you may want to consider an [indexer](https://substrate.stackexchange.com/a/56/29)." ContentLicense="CC BY-SA 4.0" />
  <row Id="863" PostHistoryTypeId="2" PostId="246" RevisionGUID="a95abee2-0115-40c3-a203-fd50c778eb44" CreationDate="2022-02-15T19:06:50.000" UserId="388" Text="The documentation for upgrades states (in reference to the transaction version):&#xD;&#xA;&#xD;&#xA;&gt; This number must be bumped when there is a change in the index of the pallets in the construct_runtime! macro or when any dispatchable changes, such as the number of parameters or any parameter type changes. This includes any change in pallet and dispatchable runtime parameter types&#xD;&#xA;&#xD;&#xA;Does renaming an extrinsic, but leaving it otherwise unchanged, count as a dispatchable change that requires a transaction version bump?" ContentLicense="CC BY-SA 4.0" />
  <row Id="865" PostHistoryTypeId="1" PostId="246" RevisionGUID="a95abee2-0115-40c3-a203-fd50c778eb44" CreationDate="2022-02-15T19:06:50.000" UserId="388" Text="Does renaming an extrinsic require a transaction version bump?" ContentLicense="CC BY-SA 4.0" />
  <row Id="866" PostHistoryTypeId="3" PostId="246" RevisionGUID="a95abee2-0115-40c3-a203-fd50c778eb44" CreationDate="2022-02-15T19:06:50.000" UserId="388" Text="|substrate-node|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="867" PostHistoryTypeId="2" PostId="247" RevisionGUID="19c54013-147d-4f53-a5aa-41bd87e04376" CreationDate="2022-02-15T19:16:33.680" UserId="28" Text="There is no single endpoint where you can get &quot;all the extrinsic, events, etc data for the substrate network&quot;. This doesn't even really make sense, since data is inherently organized by blocks.&#xD;&#xA;&#xD;&#xA;The way to get &quot;all&quot; of the data, is to iterate over all the blocks, and for each block, get the data you are interested in.&#xD;&#xA;&#xD;&#xA;There may be [indexing services](https://substrate.stackexchange.com/questions/35/is-there-a-good-indexer-for-substrate-chains-like-the-graph/56#56) which you can run that may provide you with easier ways to query all of this at once, but these are tools built on top of the Substrate chain, and are not provided by Substrate nodes to begin with." ContentLicense="CC BY-SA 4.0" />
  <row Id="869" PostHistoryTypeId="2" PostId="248" RevisionGUID="f0ec4f65-b491-4de5-afd6-09f44644a4f8" CreationDate="2022-02-15T19:20:42.910" UserId="28" Text="No it does not!&#xD;&#xA;&#xD;&#xA;Extrinsics are encoded as two bytes:&#xD;&#xA;&#xD;&#xA;1. First byte as an index into the pallet&#xD;&#xA;2. Second byte as an index into the extrinsic&#xD;&#xA;&#xD;&#xA;So the actual name of the extrinsic does not effect the final call encoding, and thus just changing it's name will not impact anything.&#xD;&#xA;&#xD;&#xA;For complete sanity, probably you should run a CI check to make sure your new commits are not breaking the transaction versioning. We do this automatically in the Polkadot CI pipeline:&#xD;&#xA;&#xD;&#xA;**.gitlab-ci.yml**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;check-transaction-versions:&#xD;&#xA;  stage:                           build&#xD;&#xA;  &lt;&lt;:                              *test-refs&#xD;&#xA;  &lt;&lt;:                              *docker-env&#xD;&#xA;  image:                           node:15&#xD;&#xA;  needs:&#xD;&#xA;    - job:                         test-build-linux-stable&#xD;&#xA;      artifacts:                   true&#xD;&#xA;  before_script:&#xD;&#xA;    - apt-get -y update; apt-get -y install jq lsof&#xD;&#xA;    - npm install --ignore-scripts -g @polkadot/metadata-cmp&#xD;&#xA;    # Set git config&#xD;&#xA;    - git config remote.origin.url &quot;https://github.com/paritytech/polkadot.git&quot;&#xD;&#xA;    - git fetch origin release&#xD;&#xA;  script:&#xD;&#xA;    - scripts/gitlab/check_extrinsics_ordering.sh&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**check_extrinsics_ordering.sh**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#!/usr/bin/env bash&#xD;&#xA;set -e&#xD;&#xA;&#xD;&#xA;# Include the common functions library&#xD;&#xA;#shellcheck source=../common/lib.sh&#xD;&#xA;. &quot;$(dirname &quot;${0}&quot;)/../common/lib.sh&quot;&#xD;&#xA;&#xD;&#xA;HEAD_BIN=./artifacts/polkadot&#xD;&#xA;HEAD_WS=ws://localhost:9944&#xD;&#xA;RELEASE_WS=ws://localhost:9945&#xD;&#xA;&#xD;&#xA;runtimes=(&#xD;&#xA;  &quot;westend&quot;&#xD;&#xA;  &quot;kusama&quot;&#xD;&#xA;  &quot;polkadot&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;# First we fetch the latest released binary&#xD;&#xA;latest_release=$(latest_release 'paritytech/polkadot')&#xD;&#xA;RELEASE_BIN=&quot;./polkadot-$latest_release&quot;&#xD;&#xA;echo &quot;[+] Fetching binary for Polkadot version $latest_release&quot;&#xD;&#xA;curl -L &quot;https://github.com/paritytech/polkadot/releases/download/$latest_release/polkadot&quot; &gt; &quot;$RELEASE_BIN&quot; || exit 1&#xD;&#xA;chmod +x &quot;$RELEASE_BIN&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;for RUNTIME in &quot;${runtimes[@]}&quot;; do&#xD;&#xA;  echo &quot;[+] Checking runtime: ${RUNTIME}&quot;&#xD;&#xA;&#xD;&#xA;  release_transaction_version=$(&#xD;&#xA;    git show &quot;origin/release:runtime/${RUNTIME}/src/lib.rs&quot; | \&#xD;&#xA;      grep 'transaction_version'&#xD;&#xA;  )&#xD;&#xA;&#xD;&#xA;  current_transaction_version=$(&#xD;&#xA;    grep 'transaction_version' &quot;./runtime/${RUNTIME}/src/lib.rs&quot;&#xD;&#xA;  )&#xD;&#xA;&#xD;&#xA;  echo &quot;[+] Release: ${release_transaction_version}&quot;&#xD;&#xA;  echo &quot;[+] Ours: ${current_transaction_version}&quot;&#xD;&#xA;&#xD;&#xA;  if [ ! &quot;$release_transaction_version&quot; = &quot;$current_transaction_version&quot; ]; then&#xD;&#xA;    echo &quot;[+] Transaction version for ${RUNTIME} has been bumped since last release.&quot;&#xD;&#xA;    exit 0&#xD;&#xA;  fi&#xD;&#xA;&#xD;&#xA;  # Start running the nodes in the background&#xD;&#xA;  $HEAD_BIN --chain=&quot;$RUNTIME-local&quot; --tmp &amp;&#xD;&#xA;  $RELEASE_BIN --chain=&quot;$RUNTIME-local&quot; --ws-port 9945 --tmp &amp;&#xD;&#xA;  jobs&#xD;&#xA;&#xD;&#xA;  # Sleep a little to allow the nodes to spin up and start listening&#xD;&#xA;  TIMEOUT=5&#xD;&#xA;  for i in $(seq $TIMEOUT); do&#xD;&#xA;    sleep 1&#xD;&#xA;      if [ &quot;$(lsof -nP -iTCP -sTCP:LISTEN | grep -c '994[45]')&quot; == 2 ]; then&#xD;&#xA;        echo &quot;[+] Both nodes listening&quot;&#xD;&#xA;        break&#xD;&#xA;      fi&#xD;&#xA;      if [ &quot;$i&quot; == $TIMEOUT ]; then&#xD;&#xA;        echo &quot;[!] Both nodes not listening after $i seconds. Exiting&quot;&#xD;&#xA;        exit 1&#xD;&#xA;      fi&#xD;&#xA;  done&#xD;&#xA;  sleep 5&#xD;&#xA;&#xD;&#xA;  changed_extrinsics=$(&#xD;&#xA;    polkadot-js-metadata-cmp &quot;$RELEASE_WS&quot; &quot;$HEAD_WS&quot; \&#xD;&#xA;      | sed 's/^ \+//g' | grep -e 'idx: [0-9]\+ -&gt; [0-9]\+' || true&#xD;&#xA;  )&#xD;&#xA;&#xD;&#xA;  if [ -n &quot;$changed_extrinsics&quot; ]; then&#xD;&#xA;    echo &quot;[!] Extrinsics indexing/ordering has changed in the ${RUNTIME} runtime! If this change is intentional, please bump transaction_version in lib.rs. Changed extrinsics:&quot;&#xD;&#xA;    echo &quot;$changed_extrinsics&quot;&#xD;&#xA;    exit 1&#xD;&#xA;  fi&#xD;&#xA;&#xD;&#xA;  echo &quot;[+] No change in extrinsics ordering for the ${RUNTIME} runtime&quot;&#xD;&#xA;  jobs -p | xargs kill; sleep 5&#xD;&#xA;done&#xD;&#xA;&#xD;&#xA;# Sleep a little to let the jobs die properly&#xD;&#xA;sleep 5&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="871" PostHistoryTypeId="2" PostId="249" RevisionGUID="1e02a5ef-148f-4997-be69-957662655462" CreationDate="2022-02-15T19:25:51.413" UserId="29" Text="I have read https://docs.substrate.io/v3/advanced/storage&#xD;&#xA;&#xD;&#xA;And I am curious what is actually stored in the State Trie.&#xD;&#xA;&#xD;&#xA;Are extrinsics and events stored in the State Trie?" ContentLicense="CC BY-SA 4.0" />
  <row Id="873" PostHistoryTypeId="1" PostId="249" RevisionGUID="1e02a5ef-148f-4997-be69-957662655462" CreationDate="2022-02-15T19:25:51.413" UserId="29" Text="What kind of information is stored in the State Trie?" ContentLicense="CC BY-SA 4.0" />
  <row Id="874" PostHistoryTypeId="3" PostId="249" RevisionGUID="1e02a5ef-148f-4997-be69-957662655462" CreationDate="2022-02-15T19:25:51.413" UserId="29" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="875" PostHistoryTypeId="2" PostId="250" RevisionGUID="026c59ae-33d9-4208-bd81-54038efc7724" CreationDate="2022-02-15T19:29:05.500" UserId="29" Text="On Substrate, is the fully constructed State Trie persisted to disk or only the State Trie root hash?" ContentLicense="CC BY-SA 4.0" />
  <row Id="877" PostHistoryTypeId="1" PostId="250" RevisionGUID="026c59ae-33d9-4208-bd81-54038efc7724" CreationDate="2022-02-15T19:29:05.500" UserId="29" Text="Is the fully constructed State Trie persisted to disk?" ContentLicense="CC BY-SA 4.0" />
  <row Id="878" PostHistoryTypeId="3" PostId="250" RevisionGUID="026c59ae-33d9-4208-bd81-54038efc7724" CreationDate="2022-02-15T19:29:05.500" UserId="29" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="879" PostHistoryTypeId="2" PostId="251" RevisionGUID="d2009f6b-8937-4630-aea7-296285e09ad6" CreationDate="2022-02-15T20:08:48.067" UserId="73" Text="The entire state trie is persisted to disk currently. Not just only the root hash." ContentLicense="CC BY-SA 4.0" />
  <row Id="881" PostHistoryTypeId="2" PostId="252" RevisionGUID="b0ba0067-b57f-41bf-aed8-b47630aecbf6" CreationDate="2022-02-15T20:11:41.013" UserId="73" Text="The state trie stores the state ;) Aka all the key value pairs that make up the state. This means that also runtime events are part of the state of each block. Extrinsics and headers are not part of the state trie. However, that depends on the runtime, if the runtime for whatever stores the data in the trie, then they would also be part of the state trie." ContentLicense="CC BY-SA 4.0" />
  <row Id="883" PostHistoryTypeId="2" PostId="253" RevisionGUID="68da4cda-9469-4093-9e3f-b0fd18355b3c" CreationDate="2022-02-15T20:33:49.347" UserId="368" Text="https://github.com/strategyobject/substrate-client-java is active, though incomplete." ContentLicense="CC BY-SA 4.0" />
  <row Id="885" PostHistoryTypeId="2" PostId="254" RevisionGUID="8e9c65a1-da1e-4767-a372-db15e356f029" CreationDate="2022-02-15T20:54:31.863" UserId="389" Text="I need to process Ethereum transactions in a substrate offchain worker. I already include EVM and Ethereum pallets, but I also need to do some communications with runtime code running as solidity smart contracts from the off-chain worker.&#xD;&#xA;&#xD;&#xA;Are there any libraries to parse / generate ethereum transactions, or data that I can use? Or should I build everything from scratch?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="887" PostHistoryTypeId="1" PostId="254" RevisionGUID="8e9c65a1-da1e-4767-a372-db15e356f029" CreationDate="2022-02-15T20:54:31.863" UserId="389" Text="Process ethereum transactions in an offchain worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="888" PostHistoryTypeId="3" PostId="254" RevisionGUID="8e9c65a1-da1e-4767-a372-db15e356f029" CreationDate="2022-02-15T20:54:31.863" UserId="389" Text="|evm|offchain-worker|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="889" PostHistoryTypeId="2" PostId="255" RevisionGUID="42285f1e-be36-4dca-89ea-02f5ea571517" CreationDate="2022-02-15T21:25:58.607" UserId="29" Text="As there are currently **no** supported Java client libraries listed here: &#xD;&#xA;- https://docs.substrate.io/v3/integration/client-libraries&#xD;&#xA;&#xD;&#xA;You can use Java with RPC.&#xD;&#xA;&#xD;&#xA;Substrate exposes a number of RPC methods.&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;}' https://rpc.polkadot.io&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getMetadata&quot;}' https://rpc.polkadot.io&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: &#xD;&#xA;- https://wiki.polkadot.network/docs/build-node-interaction&#xD;&#xA;- https://documenter.getpostman.com/view/9969999/SWT5iLXH#da25ea74-d8b6-4a1b-a873-3d750c7840e7" ContentLicense="CC BY-SA 4.0" />
  <row Id="891" PostHistoryTypeId="2" PostId="256" RevisionGUID="ced2f80c-aaff-4498-8b0d-eaab0eb1cef6" CreationDate="2022-02-15T21:50:00.640" UserId="74" Text="You can use some of the tools from: https://github.com/rust-ethereum/.&#xD;&#xA;&#xD;&#xA;Namely, if you're looking to create Ethereum transactions in an offchain worker then this should work:&#xD;&#xA;- https://github.com/rust-blockchain/ethereum&#xD;&#xA;- https://github.com/rust-blockchain/ethereum/blob/master/src/transaction.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="893" PostHistoryTypeId="2" PostId="257" RevisionGUID="b0757f22-99ab-4e68-8d74-75da16cefbd3" CreationDate="2022-02-15T23:36:46.173" UserId="14" Text="I'm currently studying/debugging the `Treasury` and the `Society` pallets. So I keep running the `cargo build --release` to get my changes on a new binary.&#xD;&#xA;&#xD;&#xA;But the build takes too long (minutes) just to reflect an addition/removal of a `log::info!(&quot;...&quot;)` line.&#xD;&#xA;&#xD;&#xA;Is there a better (quicker) way to debug the `runtime`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="895" PostHistoryTypeId="1" PostId="257" RevisionGUID="b0757f22-99ab-4e68-8d74-75da16cefbd3" CreationDate="2022-02-15T23:36:46.173" UserId="14" Text="What is the best way to debug substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="896" PostHistoryTypeId="3" PostId="257" RevisionGUID="b0757f22-99ab-4e68-8d74-75da16cefbd3" CreationDate="2022-02-15T23:36:46.173" UserId="14" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="897" PostHistoryTypeId="2" PostId="258" RevisionGUID="b7c6c8d9-104c-4b9c-9976-3a628cd024b0" CreationDate="2022-02-16T02:19:21.493" UserId="29" Text="Great question!&#xD;&#xA;&#xD;&#xA;You can always use the [Substrate Playground](https://docs.substrate.io/playground/).&#xD;&#xA;&#xD;&#xA;As far as builds, I typically work off of the [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template) repo which is &quot;lighter&quot; than the full [substrate](https://github.com/paritytech/substrate) repo (which includes all the pallets) when it comes to building the whole codebase.&#xD;&#xA;&#xD;&#xA;For development purposes I will run `cargo build` without the `--release` flag which according to rust will skip optimizations and therefore should be faster. `cargo check` is even faster but does not produce the final binary.&#xD;&#xA;&#xD;&#xA;If I am debugging a specific pallet, I will only compile that pallet (without the release flag): `cargo build -p super-pallet` instead of compiling the entire node. You can also run `cargo check -p super-pallet` which should be even faster.&#xD;&#xA;&#xD;&#xA;As a side note, for code-related debugging I recommend  the [rust analyzer extension](https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer) in [VS Code](https://code.visualstudio.com) in combination with [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) which is useful for debugging Substrate code.&#xD;&#xA;&#xD;&#xA;And there are also helpful Substrate debugging tips here:&#xD;&#xA;- https://docs.substrate.io/v3/runtime/debugging&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="899" PostHistoryTypeId="2" PostId="259" RevisionGUID="432ecbbf-75d7-4f5e-9d4f-f4e90a191891" CreationDate="2022-02-16T03:13:52.413" UserId="299" Text="This is a question about XCM.&#xD;&#xA;Do I just need to add orML_xtokens dependency to parallel chains to solve this problem?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="901" PostHistoryTypeId="1" PostId="259" RevisionGUID="432ecbbf-75d7-4f5e-9d4f-f4e90a191891" CreationDate="2022-02-16T03:13:52.413" UserId="299" Text="How to add cross-chain transfer function to parallel chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="902" PostHistoryTypeId="3" PostId="259" RevisionGUID="432ecbbf-75d7-4f5e-9d4f-f4e90a191891" CreationDate="2022-02-16T03:13:52.413" UserId="299" Text="|parachain|xcm|hrmp|orml-xtokens|" ContentLicense="CC BY-SA 4.0" />
  <row Id="903" PostHistoryTypeId="5" PostId="259" RevisionGUID="9b14f625-ff9d-40aa-be1e-07658c5be8f9" CreationDate="2022-02-16T03:19:50.253" UserId="299" Comment="added 2 characters in body" Text="This is a question about XCM.&#xD;&#xA;Do I just need to add `orml_xtokens` dependency to parallel chains to solve this problem?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="904" PostHistoryTypeId="6" PostId="259" RevisionGUID="9b14f625-ff9d-40aa-be1e-07658c5be8f9" CreationDate="2022-02-16T03:19:50.253" UserId="299" Comment="added 2 characters in body" Text="|parachain|xcm|xcmp|hrmp|orml-xtokens|" ContentLicense="CC BY-SA 4.0" />
  <row Id="905" PostHistoryTypeId="2" PostId="260" RevisionGUID="b72c85e9-7ef6-4be5-a3d7-513a120bb25c" CreationDate="2022-02-16T06:39:07.737" UserId="88" Text="Is there a method of quick approximation (possibly through benchmarking) - of the chain - that could give a good bound on the resources a substrate node would use?&#xD;&#xA;&#xD;&#xA;I'm considering running a network on a hosted service and I wanted to know how much space or memory is safe to allocate to 5-6 nodes as the compiled program takes about 6ish GB.&#xD;&#xA;&#xD;&#xA;The runtime is here: https://github.com/chocolatenetwork/chocolate-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="907" PostHistoryTypeId="1" PostId="260" RevisionGUID="b72c85e9-7ef6-4be5-a3d7-513a120bb25c" CreationDate="2022-02-16T06:39:07.737" UserId="88" Text="How to limit resource used by nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="908" PostHistoryTypeId="3" PostId="260" RevisionGUID="b72c85e9-7ef6-4be5-a3d7-513a120bb25c" CreationDate="2022-02-16T06:39:07.737" UserId="88" Text="|substrate-node|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="910" PostHistoryTypeId="10" PostId="113" RevisionGUID="dfedc636-f03f-4403-959c-292c628b0e9d" CreationDate="2022-02-16T06:39:43.993" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:2,&quot;DisplayName&quot;:&quot;Glorfindel&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:103,&quot;DisplayName&quot;:&quot;user1271772&quot;}]}" />
  <row Id="911" PostHistoryTypeId="4" PostId="217" RevisionGUID="c4ec5213-b2c7-4066-94cb-20d52db74c46" CreationDate="2022-02-16T07:37:57.937" UserId="85" Comment="title sounded a bit click batey" Text="What happens when a parachain's lease runs out?" ContentLicense="CC BY-SA 4.0" />
  <row Id="912" PostHistoryTypeId="2" PostId="261" RevisionGUID="3e8a1a14-297f-4170-82bb-7f206926f215" CreationDate="2022-02-16T08:00:54.743" UserId="393" Text="I do the same thing as you. And AFAIK it may be the right way to do the faucet.&#xD;&#xA;&#xD;&#xA;And also, you can improve your plan with a small balance in the faucet account at first, for example  1000 $XX, and set a low watermark warning threshold, when the balance arrives there, add more balance to the faucet account. In this way, you didn't lock too much token in the faucet account, and can act as a great faucet at the same time." ContentLicense="CC BY-SA 4.0" />
  <row Id="914" PostHistoryTypeId="2" PostId="262" RevisionGUID="4a34b0de-5ce4-420c-a1b7-b42063f54620" CreationDate="2022-02-16T08:41:11.263" UserId="198" Text="You can limit resources using Virtualization solutions such as [Kubernetes](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) or use [Systemd](https://unix.stackexchange.com/questions/345595/how-to-set-ulimits-on-service-with-systemd).&#xD;&#xA;&#xD;&#xA;Please note however that you should not consider a single limit. The load on your system will vary over time depending on what the node is currently doing.&#xD;&#xA;&#xD;&#xA;At first, your node will be syncing and you will see lots of networking and io. Once your node is &quot;cruising&quot;, you still will see spikes from time to time and you need to account for those as well. Those spikes can be due to regular and plannable events such as new Eras, etc... or sporadic events such as a runtime upgrade or having to process a big transaction.&#xD;&#xA;&#xD;&#xA;I personally like to set my limits tight at first to see what they really need to be, then add a 30% buffer to account for those spikes. For a non validator node, this is rather easy to do and you can easily &quot;take the risk&quot;, for a validator, I would suggest having a &quot;plan B&quot; (ie validator node ready to take over) if your limits happen to be to tight and your node gets killed.&#xD;&#xA;&#xD;&#xA;Also note that whatever limits you define today will change in the future based on:&#xD;&#xA;- new versions of the runtime&#xD;&#xA;- new version of the client&#xD;&#xA;- number and type of transactions to process " ContentLicense="CC BY-SA 4.0" />
  <row Id="916" PostHistoryTypeId="2" PostId="263" RevisionGUID="1cc47bdf-7da6-4ab3-8923-0a22362efe4e" CreationDate="2022-02-16T08:46:18.880" UserId="125" Text="[frame_system API docs](https://crates.parity.io/frame_system/pallet/struct.Pallet.html#) has several functions about the account reference. Can somebody give an analysis about the design here or how to choose between them?&#xD;&#xA;&#xD;&#xA;1. `inc_providers` and `dec_providers`&#xD;&#xA;2. `inc_sufficients` and `dec_sufficients`&#xD;&#xA;3. `inc_consumers` and `dec_consumers`" ContentLicense="CC BY-SA 4.0" />
  <row Id="918" PostHistoryTypeId="1" PostId="263" RevisionGUID="1cc47bdf-7da6-4ab3-8923-0a22362efe4e" CreationDate="2022-02-16T08:46:18.880" UserId="125" Text="What is the meaning of the accounts *provider*, *sufficients*, and `consumer`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="919" PostHistoryTypeId="3" PostId="263" RevisionGUID="1cc47bdf-7da6-4ab3-8923-0a22362efe4e" CreationDate="2022-02-16T08:46:18.880" UserId="125" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="924" PostHistoryTypeId="4" PostId="263" RevisionGUID="57358577-d8f8-45e2-a392-816e6fe2309f" CreationDate="2022-02-16T10:04:42.513" UserId="125" Comment="edited title" Text="What is the meaning of the account provider, sufficients and consumer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="925" PostHistoryTypeId="2" PostId="265" RevisionGUID="f2034134-0ef2-43bf-9fbc-1003af906558" CreationDate="2022-02-16T10:35:50.260" UserId="104" Text="The [ORML Xtokens pallet][1] is just the first step, as you try to configure it in your chain, you'll quickly see that it requires an `XcmExecutor` configuration item, which the [`xcm-executor`][2] module offers a default implementation of.&#xD;&#xA;&#xD;&#xA;The problem next is that the default `XcmExecutor` itself also requires configuration, and one of the items for the `XcmConfig` is to specify the `XcmSender`. This is where you'll need to include pallets that implement the XCMP protocol. Depending on who you want to send your XCM to, you'll either need to include the [XCMP queue pallet][3] if you're sending to a sibling parachain, or include the [parachain system pallet][4] if you're sending to the relay chain.&#xD;&#xA;&#xD;&#xA;You may also want to take a look at [my answer here][5] to decide which asset transfer model that you'd like to pick for your chain.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/8ef830db9a009fdf4cf5092ebaf14371d27a9a4c/xcm/xcm-executor/src/lib.rs#L44&#xD;&#xA;  [3]: https://github.com/paritytech/cumulus/tree/master/pallets/xcmp-queue&#xD;&#xA;  [4]: https://github.com/paritytech/cumulus/tree/master/pallets/parachain-system&#xD;&#xA;  [5]: https://substrate.stackexchange.com/a/38/104" ContentLicense="CC BY-SA 4.0" />
  <row Id="927" PostHistoryTypeId="5" PostId="224" RevisionGUID="1d13dc7a-5edc-4bd9-98d8-4ea393cb9ee9" CreationDate="2022-02-16T11:35:20.373" UserId="151" Comment="added 252 characters in body" Text="TypeScript is a typed superset of JavaScript that transpiles to plain JavaScript. It adds optional types, classes, interfaces, and modules to JavaScript. This tag is for questions specific to TypeScript. It is not used for general JavaScript questions." ContentLicense="CC BY-SA 4.0" />
  <row Id="928" PostHistoryTypeId="24" PostId="224" RevisionGUID="1d13dc7a-5edc-4bd9-98d8-4ea393cb9ee9" CreationDate="2022-02-16T11:35:20.373" Comment="Proposed by 151 approved by 178 edit id of 40" ContentLicense="CC BY-SA 4.0" />
  <row Id="929" PostHistoryTypeId="5" PostId="234" RevisionGUID="de8240e8-6f56-41e0-b4d3-fb829a120373" CreationDate="2022-02-16T11:35:26.850" UserId="85" Comment="added 44 characters in body" Text="The first block is called the genesis block." ContentLicense="CC BY-SA 4.0" />
  <row Id="930" PostHistoryTypeId="24" PostId="234" RevisionGUID="de8240e8-6f56-41e0-b4d3-fb829a120373" CreationDate="2022-02-16T11:35:26.850" Comment="Proposed by 85 approved by 178 edit id of 45" ContentLicense="CC BY-SA 4.0" />
  <row Id="931" PostHistoryTypeId="5" PostId="232" RevisionGUID="9ea5f918-1146-4ce4-a9bf-2e4f1c5c225c" CreationDate="2022-02-16T11:35:30.733" UserId="85" Comment="added 25 characters in body" Text="Block production protocol" ContentLicense="CC BY-SA 4.0" />
  <row Id="932" PostHistoryTypeId="24" PostId="232" RevisionGUID="9ea5f918-1146-4ce4-a9bf-2e4f1c5c225c" CreationDate="2022-02-16T11:35:30.733" Comment="Proposed by 85 approved by 178 edit id of 44" ContentLicense="CC BY-SA 4.0" />
  <row Id="933" PostHistoryTypeId="2" PostId="266" RevisionGUID="e2d9b635-4efd-4799-a050-0cf6488fa3b0" CreationDate="2022-02-16T11:37:03.603" UserId="351" Text="As when i try to to do api.query.templatemodule.get_something() it shows errors in the console" ContentLicense="CC BY-SA 4.0" />
  <row Id="935" PostHistoryTypeId="1" PostId="266" RevisionGUID="e2d9b635-4efd-4799-a050-0cf6488fa3b0" CreationDate="2022-02-16T11:37:03.603" UserId="351" Text="How to access storage items using polkadot js, javascript playground" ContentLicense="CC BY-SA 4.0" />
  <row Id="936" PostHistoryTypeId="3" PostId="266" RevisionGUID="e2d9b635-4efd-4799-a050-0cf6488fa3b0" CreationDate="2022-02-16T11:37:03.603" UserId="351" Text="|polkadot-js|storage|api|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="937" PostHistoryTypeId="5" PostId="223" RevisionGUID="418c9498-0e43-46ab-b26b-868d00d2c2e9" CreationDate="2022-02-16T11:37:05.417" UserId="151" Comment="added 4023 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[TypeScript][2] is a typed superset of [tag:JavaScript] that [transpiles](https://www.stevefenton.co.uk/2012/11/compiling-vs-transpiling/) to plain JavaScript. It adds optional types, classes, interfaces, and modules to JavaScript. It was developed by Microsoft and is [open source][3].&#xD;&#xA;&#xD;&#xA; * TypeScript offers classes, modules, and interfaces to help developers build robust components.&#xD;&#xA; * TypeScript types let developers define interfaces between software components and to gain insight into the behavior of existing JavaScript libraries.&#xD;&#xA; * TypeScript starts from the syntax and semantics that millions of JavaScript developers know today.&#xD;&#xA; * With TypeScript, developers can use existing JavaScript code, incorporate popular JavaScript libraries, and be called from other JavaScript code.&#xD;&#xA; * TypeScript transpiles to JavaScript code which runs on any browser, in [tag:Node.js], or in any other ES3-compatible environment. &#xD;&#xA; * TypeScript as a language extension adds (amongst others) the following features: &#xD;&#xA;   - Type annotations and compile-time type checking&#xD;&#xA;   - Namespaces&#xD;&#xA;   - Interfaces&#xD;&#xA;   - Enums (to define a set of named constants)&#xD;&#xA;   - Generics (classes, types, and functions that can work over a variety of types)&#xD;&#xA;   - Await (suspends the execution until an asynchronous function return promise is fulfilled)&#xD;&#xA;   - Abbreviated &quot;arrow&quot; syntax for anonymous functions&#xD;&#xA;   - Optional parameters and default parameters&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Useful Links&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA; - [TypeScript Home][7]: Main landing page for TypeScript Language.&#xD;&#xA; - [TypeScript-React-Starter][8]: Get started with TypeScript and React!&#xD;&#xA; - [TypeScript Playground][9]: An online TypeScript editor by Microsoft.&#xD;&#xA; - [TypeScript Samples][10]: Code samples and demos of complete applications written in TypeScript&#xD;&#xA; - [TypeScript GitHub Project][3]: Issue tracker and source code&#xD;&#xA; - [TypeScript Blog][11]: Official TypeScript Blog &#xD;&#xA; - [TypeScript Roadmap][12]: The planned future of TypeScript&#xD;&#xA; - [TypeScript Handbook][13]: User-oriented documentation for TypeScript&#xD;&#xA; - [TypeScript Deep Dive][14]: An open source book on TypeScript targeted at beginners - advanced developers.&#xD;&#xA; - [TypeScript Twitter][15]: Official TypeScript Twitter account &#xD;&#xA;&#xD;&#xA;Videos&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA; - [Anders Hejlsberg: Introducing TypeScript][16]&#xD;&#xA; - [Anders Hejlsberg, Steve Lucco, and Luke Hoban: Inside TypeScript][17]&#xD;&#xA; - [Anders Hejlsberg, Steve Lucco: TypeScript: Application-Scale JavaScript][18]&#xD;&#xA; - [Anders Hejlsberg: TypeScript Q&amp;A][19]&#xD;&#xA; - [Anders Hejlsberg, John Papa: Five Things About TypeScript][20]&#xD;&#xA; - [Anders Hejlsberg, John Papa: Why TypeScript is for You][21]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/I1ihI.png&#xD;&#xA;  [2]: http://typescriptlang.org/&#xD;&#xA;  [3]: https://www.github.com/Microsoft/TypeScript&#xD;&#xA;  [4]: https://github.com/Microsoft/TypeScript/raw/master/doc/TypeScript%20Language%20Specification.docx&#xD;&#xA;  [5]: https://github.com/Microsoft/TypeScript/raw/master/doc/TypeScript%20Language%20Specification.pdf&#xD;&#xA;  [6]: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md&#xD;&#xA;  [7]: http://www.typescriptlang.org/&#xD;&#xA;  [8]: https://github.com/Microsoft/TypeScript-React-Starter&#xD;&#xA;  [9]: http://www.typescriptlang.org/Playground/&#xD;&#xA;  [10]: http://www.typescriptlang.org/Samples/&#xD;&#xA;  [11]: https://blogs.msdn.microsoft.com/typescript/&#xD;&#xA;  [12]: https://github.com/Microsoft/TypeScript/wiki/Roadmap&#xD;&#xA;  [13]: http://www.typescriptlang.org/Handbook&#xD;&#xA;  [14]: https://basarat.gitbooks.io/typescript/&#xD;&#xA;  [15]: https://twitter.com/typescriptlang&#xD;&#xA;  [16]: https://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript&#xD;&#xA;  [17]: https://channel9.msdn.com/posts/Anders-Hejlsberg-Steve-Lucco-and-Luke-Hoban-Inside-TypeScript&#xD;&#xA;  [18]: https://channel9.msdn.com/Events/Build/2013/3-314&#xD;&#xA;  [19]: https://channel9.msdn.com/Events/Build/2013/9-006&#xD;&#xA;  [20]: https://channel9.msdn.com/Shows/5-Things/Episode-7-Five-Things-About-TypeScript&#xD;&#xA;  [21]: https://channel9.msdn.com/Shows/5-Things/Episode-10-Five-Things-Why-TypeScript-is-for-You" ContentLicense="CC BY-SA 4.0" />
  <row Id="938" PostHistoryTypeId="24" PostId="223" RevisionGUID="418c9498-0e43-46ab-b26b-868d00d2c2e9" CreationDate="2022-02-16T11:37:05.417" Comment="Proposed by 151 approved by 178 edit id of 39" ContentLicense="CC BY-SA 4.0" />
  <row Id="939" PostHistoryTypeId="5" PostId="231" RevisionGUID="322695d9-efc4-49e9-a2f4-129a5680c7b9" CreationDate="2022-02-16T11:37:48.700" UserId="85" Comment="added 248 characters in body" Text="Blind Assignment for Blockchain Extension protocol, abbreviated BABE. BABE assigns block production slots using roughly the randomness cycle from Ouroboros Praos.&#xD;&#xA;&#xD;&#xA;See https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="940" PostHistoryTypeId="24" PostId="231" RevisionGUID="322695d9-efc4-49e9-a2f4-129a5680c7b9" CreationDate="2022-02-16T11:37:48.700" Comment="Proposed by 85 approved by 178 edit id of 43" ContentLicense="CC BY-SA 4.0" />
  <row Id="941" PostHistoryTypeId="5" PostId="259" RevisionGUID="3c81c77c-e08e-4bd8-9bca-d2845376192b" CreationDate="2022-02-16T11:38:34.713" UserId="104" Comment="Clarified the question per comments" Text="This is a question about XCM.&#xD;&#xA;Do I just need to add `orml_xtokens` dependency to a parachain to allow transferring assets to another chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="942" PostHistoryTypeId="4" PostId="259" RevisionGUID="3c81c77c-e08e-4bd8-9bca-d2845376192b" CreationDate="2022-02-16T11:38:34.713" UserId="104" Comment="Clarified the question per comments" Text="How to enable cross-chain asset transfers to a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="943" PostHistoryTypeId="24" PostId="259" RevisionGUID="3c81c77c-e08e-4bd8-9bca-d2845376192b" CreationDate="2022-02-16T11:38:34.713" Comment="Proposed by 104 approved by 178 edit id of 46" ContentLicense="CC BY-SA 4.0" />
  <row Id="948" PostHistoryTypeId="2" PostId="268" RevisionGUID="7873e782-b4bf-4214-8d1e-95f5505e13e7" CreationDate="2022-02-16T12:21:17.963" UserId="395" Text="I've created some testcases in the solang repo here https://github.com/hyperledger-labs/solang/pull/671&#xD;&#xA;&#xD;&#xA;Everything works fine in both the mock substrate that solang uses, and also with Substrate 3.0 (see PR).&#xD;&#xA;&#xD;&#xA;Looks like something has changed between Substrate 3.0 and current substrate, which breaks solang compiled contracts. Any suggestions for where to look?&#xD;&#xA;&#xD;&#xA;Solang integration tests could really do with upgrading to the latest substrate and any issues fixing." ContentLicense="CC BY-SA 4.0" />
  <row Id="952" PostHistoryTypeId="2" PostId="269" RevisionGUID="1cdbf130-8ef0-4775-bb6b-c4160bcab013" CreationDate="2022-02-16T19:07:58.110" UserId="45" Text="How do I find the maximum weight available to extrinsics in a block for a substrate-, FRAME-based chain such as Polkadot?&#xD;&#xA;&#xD;&#xA;- I know that there is [`WEIGHT_PER_SECOND`](https://github.com/paritytech/substrate/blob/6ab64863c6e653da5cc468257650a970dbc8e9a1/frame/support/src/weights.rs#L158) value, but it doesn't answer my question since I don't know how many seconds are allowed within a block?&#xD;&#xA;- I tried googling and got [this](https://www.shawntabrizi.com/substrate/substrate-weight-and-fees/) article which mentions `MaximumBlockWeight` but that seems to be removed in previous versions of Substrate.&#xD;&#xA;&#xD;&#xA;Please help me!" ContentLicense="CC BY-SA 4.0" />
  <row Id="954" PostHistoryTypeId="1" PostId="269" RevisionGUID="1cdbf130-8ef0-4775-bb6b-c4160bcab013" CreationDate="2022-02-16T19:07:58.110" UserId="45" Text="Maximum weight in a block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="955" PostHistoryTypeId="3" PostId="269" RevisionGUID="1cdbf130-8ef0-4775-bb6b-c4160bcab013" CreationDate="2022-02-16T19:07:58.110" UserId="45" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="956" PostHistoryTypeId="2" PostId="270" RevisionGUID="8f1ae9ce-2f03-40fa-9bbf-725cad20a0c5" CreationDate="2022-02-16T19:40:49.993" UserId="28" Text="The various weight configurations on a Substrate chain are all collected in a `blockWeights` configuration constant which can be found in the System Pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can see in the image above the Kusama network has a `maxBlock` configured to `2_000_000_000_000` which is equivalent to &quot;2 seconds of weight&quot;.&#xD;&#xA;&#xD;&#xA;This is generated via a builder pattern defined here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/system/src/limits.rs&#xD;&#xA;&#xD;&#xA;In the Substrate node, you can find the builder definition inside the Runtime configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()&#xD;&#xA;	.base_block(BlockExecutionWeight::get())&#xD;&#xA;	.for_class(DispatchClass::all(), |weights| {&#xD;&#xA;		weights.base_extrinsic = ExtrinsicBaseWeight::get();&#xD;&#xA;	})&#xD;&#xA;	.for_class(DispatchClass::Normal, |weights| {&#xD;&#xA;		weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);&#xD;&#xA;	})&#xD;&#xA;	.for_class(DispatchClass::Operational, |weights| {&#xD;&#xA;		weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT);&#xD;&#xA;		// Operational transactions have some extra reserved space, so that they&#xD;&#xA;		// are included even if block reached `MAXIMUM_BLOCK_WEIGHT`.&#xD;&#xA;		weights.reserved = Some(&#xD;&#xA;			MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT&#xD;&#xA;		);&#xD;&#xA;	})&#xD;&#xA;	.avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)&#xD;&#xA;	.build_or_panic();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Obviously a lot of assumptions happening here in the background to calculate all these different weight values, but this is the source of that logic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eNZpr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="958" PostHistoryTypeId="2" PostId="271" RevisionGUID="399c9c07-b134-4da0-9e28-e6eb3dfeee29" CreationDate="2022-02-16T19:47:56.323" UserId="28" Text="Probably the error here is due to Rust doing things with `snake_case`/`UpperCase`, and JavaScript doing things with `camelCase`.&#xD;&#xA;&#xD;&#xA;I would never expect that the Polkadot JS API would expose a function which is not `camelCase`, so probably what you want is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.query.templatemodule.getSomething()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This should work fine assuming your storage is named the same thing:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type GetSomething&lt;T: Config&gt; = StorageValue&lt;_, u64, ValueQuery&gt;;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="960" PostHistoryTypeId="2" PostId="272" RevisionGUID="fc769cbc-b8ca-471a-922f-7cfef1d9edf8" CreationDate="2022-02-16T20:27:28.257" UserId="372" Text="Sealing a block means adding some final consensus-related information to a block to complete the block authoring process. Sealing happens on the client-side after all transactions have been executed and and other runtime logic has completed.&#xD;&#xA;&#xD;&#xA;When other nodes in the network import your block, they will check the seal before checking other more computationally-expensive parts of the block such as executing transactions.&#xD;&#xA;&#xD;&#xA;The exact information included in the seal depends on the consensus engine. In PoA and PoS consensus the seal is a signature. In PoW it is the mining output." ContentLicense="CC BY-SA 4.0" />
  <row Id="962" PostHistoryTypeId="2" PostId="273" RevisionGUID="847b7b01-34ab-4c23-86b4-0ac054571d37" CreationDate="2022-02-16T20:36:51.400" UserId="29" Text="How many seconds are available per block comes down to computation power aka the underlying hardware that is supporting the blockchain.&#xD;&#xA;&#xD;&#xA;So you are right:&#xD;&#xA;```rust&#xD;&#xA;pub const WEIGHT_PER_SECOND: Weight = 1_000_000_000_000;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; Substrate defines **one unit** of weight as one picosecond of execution time, that is **10^12 weight = 1 second**, or 1,000 weight = 1 nanosecond, on fixed reference hardware (Intel Core i7-7700K CPU with 64GB of RAM and an NVMe SSD).&#xD;&#xA;&#xD;&#xA;So a recap:&#xD;&#xA;&#xD;&#xA;- 1 unit of weight = 1_000_000_000_000 of execution time&#xD;&#xA;- 1_000_000_000_000 units of weight = 1 second&#xD;&#xA;- 1_000 units of weight = 1 nanosecond&#xD;&#xA;&#xD;&#xA;**Maximum Block Weight**&#xD;&#xA;&#xD;&#xA;&gt; The **maximum block weight** should be equivalent to one-third of the target block time, allocating one third for block construction, one third for network propagation, and one third for import and verification.&#xD;&#xA;&#xD;&#xA;So if the block time is 6 seconds then 1/3 would be 2 seconds of weight, which as Shawn mentioned is 2_000_000_000_000 units of weight.&#xD;&#xA;&#xD;&#xA;**Maximum weight can be tuned.**&#xD;&#xA;&#xD;&#xA;&gt; In order to tune a runtime for different validator hardware assumptions, you can set a different maximum block weight.&#xD;&#xA;&#xD;&#xA;&gt; These tuning options give runtime developers a way to make the optimal transaction per second vs. hardware requirement trade-offs for their use case. These trade-offs can be tuned with runtime updates to keep up with hardware and software improvements.&#xD;&#xA;&#xD;&#xA;Reference: https://docs.substrate.io/v3/concepts/weight" ContentLicense="CC BY-SA 4.0" />
  <row Id="964" PostHistoryTypeId="2" PostId="274" RevisionGUID="1063635c-9b55-439f-91ab-c95190510fa2" CreationDate="2022-02-16T22:10:26.327" UserId="94" Text="I developed a pallet with one extrinsic:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(0)]&#xD;&#xA;pub fn sum(_: OriginFor&lt;T&gt;, values: Vec&lt;u64&gt;) {&#xD;&#xA;	// Sum up `values`&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The Extrinsic accepts a vector and uses it. Currently it has `weight(0)`.  &#xD;&#xA;Can I still call my extrinsic or is it going to crash the node?  &#xD;&#xA;How do I get a real weight?" ContentLicense="CC BY-SA 4.0" />
  <row Id="966" PostHistoryTypeId="1" PostId="274" RevisionGUID="1063635c-9b55-439f-91ab-c95190510fa2" CreationDate="2022-02-16T22:10:26.327" UserId="94" Text="How do I get weight for my pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="967" PostHistoryTypeId="3" PostId="274" RevisionGUID="1063635c-9b55-439f-91ab-c95190510fa2" CreationDate="2022-02-16T22:10:26.327" UserId="94" Text="|pallet|benchmarking|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="968" PostHistoryTypeId="2" PostId="275" RevisionGUID="712d2de5-e52d-4e03-8db0-da7710f635c7" CreationDate="2022-02-16T22:13:18.443" UserId="94" Text="&#xD;&#xA;# Weight&#xD;&#xA;&#xD;&#xA;Weight is an absolute unit of execution time. &#xD;&#xA;The longer your extrinsic runs, the more Weight it has.  &#xD;&#xA;Substrate uses this to know in advance how many transactions fit in a block.  &#xD;&#xA;This is important to keep the block production at a constant pace.  &#xD;&#xA;&#xD;&#xA;An extrinsic in Substrate will not revert or error when it uses more Weight than specified.  &#xD;&#xA;For development you are safe to use `0` as your node is not doing anything else.  &#xD;&#xA;Later on for a real deployment you should properly benchmark it.&#xD;&#xA;&#xD;&#xA;# The Idea Of Benchmarking&#xD;&#xA;&#xD;&#xA;The idea is to call your extrinsic with different arguments and measure how they influence the execution time.  &#xD;&#xA;In your example this boils down to different lengths of the argument vector.  &#xD;&#xA;More generally speaking you must ensure that the worst-case execution time is covered.  &#xD;&#xA;&#xD;&#xA;# A Minimal Example&#xD;&#xA;&#xD;&#xA;A benchmark for your extrinsic could look like this:  &#xD;&#xA;```rust&#xD;&#xA;sum {&#xD;&#xA;	// Define a complexity component.&#xD;&#xA;	// This will be used as length for the vector.  &#xD;&#xA;	// The 256 is arbitrary and a hard limit should be added to your extrinsic,&#xD;&#xA;	// otherwise its weight is unbounded.&#xD;&#xA;	let l in 0 .. 256;&#xD;&#xA;	&#xD;&#xA;	// Create a vector with value `123` repeated `l` times.&#xD;&#xA;	let values = vec![123; l];&#xD;&#xA;&#xD;&#xA;	// The account that will sign the call.&#xD;&#xA;	let acc: T::AccountId = whitelisted_caller();&#xD;&#xA;}: _(RawOrigin::Signed(acc), values)	// Call the extrinsic.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Substrate will try to figure out how the `l` component influences the execution time of your extrinsic.  &#xD;&#xA;If you just loop over the vector and sum up the values, a linear growth is expected.  &#xD;&#xA;In fact; Substrate currently only supports linear growth.  &#xD;&#xA;&#xD;&#xA;Substrate then generates a rust file which makes it possible to use weight annotations in your pallet with:  &#xD;&#xA;`#[pallet::weight(T::WeightInfo::sum(values.len()))]`.&#xD;&#xA;&#xD;&#xA;The whole setup for this is rather involved and requires a node.  &#xD;&#xA;You are best of looking at the [pallet-template benchmark](https://github.com/substrate-developer-hub/substrate-node-template/blob/7ce49b86b32fe088a91a2dabfd4194ac63c1f8f0/pallets/template/src/benchmarking.rs) for a complete example and the [benchmarking tutorial](https://docs.substrate.io/v3/runtime/benchmarking/) for a walk-through.  &#xD;&#xA;&#xD;&#xA;... or ask here obviously &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="970" PostHistoryTypeId="5" PostId="273" RevisionGUID="c597d3c7-a9f7-429b-a152-73ecb7c0a33f" CreationDate="2022-02-16T23:49:16.607" UserId="29" Comment="fix" Text="How many seconds are available per block comes down to computation power aka the underlying hardware that is supporting the blockchain.&#xD;&#xA;&#xD;&#xA;So you are right:&#xD;&#xA;```rust&#xD;&#xA;pub const WEIGHT_PER_SECOND: Weight = 1_000_000_000_000;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; Substrate defines **one unit** of weight as one picosecond of execution time, that is **10^12 weight = 1 second**, or 1,000 weight = 1 nanosecond, on fixed reference hardware (Intel Core i7-7700K CPU with 64GB of RAM and an NVMe SSD).&#xD;&#xA;&#xD;&#xA;So a recap:&#xD;&#xA;&#xD;&#xA;- 1 unit of weight = 1/1_000_000_000_000 of a second of execution time&#xD;&#xA;- 1_000_000_000_000 units of weight = 1 second&#xD;&#xA;- 1_000 units of weight = 1 nanosecond&#xD;&#xA;&#xD;&#xA;**Maximum Block Weight**&#xD;&#xA;&#xD;&#xA;&gt; The **maximum block weight** should be equivalent to one-third of the target block time, allocating one third for block construction, one third for network propagation, and one third for import and verification.&#xD;&#xA;&#xD;&#xA;So if the block time is 6 seconds then 1/3 would be 2 seconds of weight, which as Shawn mentioned is 2_000_000_000_000 units of weight.&#xD;&#xA;&#xD;&#xA;**Maximum weight can be tuned.**&#xD;&#xA;&#xD;&#xA;&gt; In order to tune a runtime for different validator hardware assumptions, you can set a different maximum block weight.&#xD;&#xA;&#xD;&#xA;&gt; These tuning options give runtime developers a way to make the optimal transaction per second vs. hardware requirement trade-offs for their use case. These trade-offs can be tuned with runtime updates to keep up with hardware and software improvements.&#xD;&#xA;&#xD;&#xA;Reference: https://docs.substrate.io/v3/concepts/weight" ContentLicense="CC BY-SA 4.0" />
  <row Id="971" PostHistoryTypeId="2" PostId="276" RevisionGUID="a32b3f31-3a18-4ba4-bba1-df6cce3fec00" CreationDate="2022-02-16T23:56:45.360" UserId="285" Text="I am looking at customising how we pay rewards for stakers. Instead of the default &quot;minting&quot; behaviour I would like to pay rewards out of some pot I will setup.&#xD;&#xA;&#xD;&#xA;Looking at the staking pallet, I can see it has a `Reward` Config type that is meant to allow exactly what i need, but unfortunately its not called anywhere in the pallet.&#xD;&#xA;&#xD;&#xA;I was expecting to see something similar to this on the result returned by `make_payout()`: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;if let Some(imbalance) =&#xD;&#xA;			Self::make_payout(&amp;ledger.stash, validator_staking_payout + validator_commission_payout)&#xD;&#xA;	{&#xD;&#xA;        T::Reward::on_unbalanced(imbalance); // This to be added&#xD;&#xA;		Self::deposit_event(Event::&lt;T&gt;::Rewarded(ledger.stash, imbalance.peek()));&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there another way to achieve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="973" PostHistoryTypeId="1" PostId="276" RevisionGUID="a32b3f31-3a18-4ba4-bba1-df6cce3fec00" CreationDate="2022-02-16T23:56:45.360" UserId="285" Text="Customising staker reward payment" ContentLicense="CC BY-SA 4.0" />
  <row Id="974" PostHistoryTypeId="3" PostId="276" RevisionGUID="a32b3f31-3a18-4ba4-bba1-df6cce3fec00" CreationDate="2022-02-16T23:56:45.360" UserId="285" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="975" PostHistoryTypeId="2" PostId="277" RevisionGUID="63b3ea83-ae3c-4c8f-80f9-2eaaef0f944c" CreationDate="2022-02-17T00:53:12.760" UserId="172" Text="SCALE codec is used to encode and decode data for Substrate runtimes. Why is it the top choice in Substrate and can I implement my own SCALE library? " ContentLicense="CC BY-SA 4.0" />
  <row Id="977" PostHistoryTypeId="1" PostId="277" RevisionGUID="63b3ea83-ae3c-4c8f-80f9-2eaaef0f944c" CreationDate="2022-02-17T00:53:12.760" UserId="172" Text="Why do I need to use SCALE codec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="978" PostHistoryTypeId="3" PostId="277" RevisionGUID="63b3ea83-ae3c-4c8f-80f9-2eaaef0f944c" CreationDate="2022-02-17T00:53:12.760" UserId="172" Text="|scale-codec|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="979" PostHistoryTypeId="2" PostId="278" RevisionGUID="c9c9b022-ca1c-4d64-8131-5fb16916f7bd" CreationDate="2022-02-17T00:53:25.623" UserId="172" Text="SCALE codec is an efficient serializer and deserializer built for Substrate chains. It is lightweight, platform agnostic (suitable for Wasm execution environments) and enables compact encoding of Rust types and data structures.&#xD;&#xA;&#xD;&#xA;In order to understand why Substrate uses SCALE, it helps to think about the constrains we're working with in the runtime of the blockchains we're building. When the runtime gets compiled to Wasm, all of the types and custom data structures it exposes need to be in the most compact and light weight form. &#xD;&#xA;&#xD;&#xA;Thus, the SCALE specification is a critical piece enabling applications to interact with a runtime. For an application (such as a front-end, CLI or blockchain client) to send a transaction to a runtime, it will need to encode data for the runtime to process it. Similarly, when an application receives data from the runtime, it will need to decode it. &#xD;&#xA;&#xD;&#xA;Applications built for Substrate chains can implement a codec library in any language so long as it follows the SCALE specification. You can find some implementations of SCALE in different languages [here](https://docs.substrate.io/v3/advanced/scale-codec/#implementations).&#xD;&#xA;&#xD;&#xA;[This page](https://docs.substrate.io/v3/advanced/scale-codec/#scale-for-substrate) has some more details on the encoding of various types." ContentLicense="CC BY-SA 4.0" />
  <row Id="981" PostHistoryTypeId="2" PostId="279" RevisionGUID="e3372f81-8c72-4dde-89b6-e8289b513f9a" CreationDate="2022-02-17T01:00:12.427" UserId="172" Text="If I'm running a chain in production and I've upgraded some pallets in my runtime, what steps do I need to take to make sure my runtime will run without fail when it is included in my live chain? " ContentLicense="CC BY-SA 4.0" />
  <row Id="983" PostHistoryTypeId="1" PostId="279" RevisionGUID="e3372f81-8c72-4dde-89b6-e8289b513f9a" CreationDate="2022-02-17T01:00:12.427" UserId="172" Text="What test should I run before performing a runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="984" PostHistoryTypeId="3" PostId="279" RevisionGUID="e3372f81-8c72-4dde-89b6-e8289b513f9a" CreationDate="2022-02-17T01:00:12.427" UserId="172" Text="|runtime|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="985" PostHistoryTypeId="2" PostId="280" RevisionGUID="55e8d4cf-257f-43f6-81c5-5e2339916b26" CreationDate="2022-02-17T01:08:10.450" UserId="29" Text="Great question!&#xD;&#xA;&#xD;&#xA;Accounts in Substrate are stored in the FRAME System Pallet [here](https://github.com/paritytech/substrate/blob/7e643ceabf11858cd3c059579ab45794793f2a78/frame/system/src/lib.rs#L544).&#xD;&#xA;&#xD;&#xA;Other pallets may depend on an account (consumers) or other pallets may need the existence of this account for its own purposes (sufficients) - regardless of which, the account first must be deemed as existing (providers).&#xD;&#xA;&#xD;&#xA;**Consumers**&#xD;&#xA;&gt; The number of other modules that currently depend on this account's existence. The account cannot be reaped until this is zero.&#xD;&#xA;&#xD;&#xA;In order to increment the consumer reference for an account, first the provider reference for that account has to be greater than zero (this indicates that the account is active and can be depended upon).&#xD;&#xA;&#xD;&#xA;Incrementing the consumers reference is a way of letting other pallets know that the account is active and depended upon by other pallets therefore do not remove that account.&#xD;&#xA;&#xD;&#xA;**Providers**&#xD;&#xA;&gt; The number of other modules that allow this account to exist. The account may not be reaped until this and `sufficients` are both zero.&#xD;&#xA;&#xD;&#xA;Providers is a way to tell other pallets whether an account is active (&gt;0) or not.&#xD;&#xA;&#xD;&#xA;The idea/design/concept of these reference counters is to keep users accountable for data stored on chain:&#xD;&#xA;&#xD;&#xA;&gt; If users want to remove their accounts and get back the existential deposit, they need to remove the dependencies from those on-chain pallets, such as clearing data stored on-chain for those pallets, which decrement consumers counter. Pallets also have cleanup functions to decrement providers to mark the account as deactivated within the pallet-managed scope. When the account providers reaches 0, with the prerequisite that consumers has reached 0 by this point, this account is considered deactivated by all on-chain pallets.&#xD;&#xA;&#xD;&#xA;When it comes to incrementing/decrementing remember:&#xD;&#xA;&#xD;&#xA;&gt; Each increment call of a certain counter should be accompanied by a corresponding decrement call of the counter in an account life cycle, else it is a design bug.&#xD;&#xA;&#xD;&#xA;**Sufficients**&#xD;&#xA;&gt; The number of modules that allow this account to exist for their own purposes only. The account may not be reaped until this and `providers` are both zero.&#xD;&#xA;&#xD;&#xA;An example we normally give is the `Assets` pallet. In order to create an asset, you need an account. The `Assets` pallet depends on the account for its own purposes but the account itself does not depend on it necessarily, e.g. it has no balance of its own with that asset. Because of this the account is deemed as self-sufficient. It has enough purpose to exist.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Reference: https://docs.substrate.io/v3/advanced/account-info/#account-reference-counters" ContentLicense="CC BY-SA 4.0" />
  <row Id="989" PostHistoryTypeId="2" PostId="281" RevisionGUID="221285a6-0085-4c8b-953f-b250d7a537e9" CreationDate="2022-02-17T05:58:36.290" UserId="354" Text="I was trying to modify the transaction fee and for that i only want the congestion of the network, but in *FeeDetails* that is present in **transaction-payment** pallet, we have three feilds, i.e., **base_fee, len_fee, adjusted_weight_fee** , and congestion of network depends on adjusted_weight_fee, so for this purpose i only want that feild, but i don't know how to set the other two fields to zero, any suggestions would be helpful." ContentLicense="CC BY-SA 4.0" />
  <row Id="991" PostHistoryTypeId="1" PostId="281" RevisionGUID="221285a6-0085-4c8b-953f-b250d7a537e9" CreationDate="2022-02-17T05:58:36.290" UserId="354" Text="How to set base_fee and len_fee to zero" ContentLicense="CC BY-SA 4.0" />
  <row Id="992" PostHistoryTypeId="3" PostId="281" RevisionGUID="221285a6-0085-4c8b-953f-b250d7a537e9" CreationDate="2022-02-17T05:58:36.290" UserId="354" Text="|polkadot|substrate-node|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="995" PostHistoryTypeId="2" PostId="283" RevisionGUID="9e80755c-9358-4c6b-82e8-dbecd4d2d1e5" CreationDate="2022-02-17T07:22:28.607" UserId="404" Text="I upgraded a chain that uses Grandpa/Aura with code for instant seal by mistake. &#xD;&#xA;I believe it may be possible to revert some blocks:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/1479&#xD;&#xA;&#xD;&#xA;But cannot find any documentation on how to do this. It is also asked here:&#xD;&#xA;https://substrate.stackexchange.com/questions/168/how-to-unbrick-a-substrate-chain-revert&#xD;&#xA;&#xD;&#xA;But no answer for how to use --revert is given." ContentLicense="CC BY-SA 4.0" />
  <row Id="997" PostHistoryTypeId="1" PostId="283" RevisionGUID="9e80755c-9358-4c6b-82e8-dbecd4d2d1e5" CreationDate="2022-02-17T07:22:28.607" UserId="404" Text="How to revert a bricked chain due to bad setCode" ContentLicense="CC BY-SA 4.0" />
  <row Id="998" PostHistoryTypeId="3" PostId="283" RevisionGUID="9e80755c-9358-4c6b-82e8-dbecd4d2d1e5" CreationDate="2022-02-17T07:22:28.607" UserId="404" Text="|bricked|setcode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="999" PostHistoryTypeId="2" PostId="284" RevisionGUID="13736d6e-8b4f-4e37-b593-71f44881fc44" CreationDate="2022-02-17T07:55:48.077" UserId="139" Text="I was under the impression that in proof of stake, or as substrate uses it, nominated proof of stake, the block producers are chosen by stake, into a set known as validator set through phragmen election algorithm. Then this set further goes through slot based block production as assigned randomly by BABE. So I thought using Aura block production was only reserved for permissioned or private networks.&#xD;&#xA;&#xD;&#xA;Now I don't know much about Edgeware, but in their runtime I can see a mix of staking, election_provider_multi_phase, sessions and finally aura. This came to me as a surprise because I didn't understand the point of pairing aura with the staking's pallet. &#xD;&#xA;&#xD;&#xA;Why are they choosing staking with an aura block producer whereas most chains I've seen use babe? What difference does it make?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1001" PostHistoryTypeId="1" PostId="284" RevisionGUID="13736d6e-8b4f-4e37-b593-71f44881fc44" CreationDate="2022-02-17T07:55:48.077" UserId="139" Text="Proof of Stake algorithms, why use Aura as block producer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1002" PostHistoryTypeId="3" PostId="284" RevisionGUID="13736d6e-8b4f-4e37-b593-71f44881fc44" CreationDate="2022-02-17T07:55:48.077" UserId="139" Text="|consensus|babe|aura|proof-of-stake|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1003" PostHistoryTypeId="2" PostId="285" RevisionGUID="9ffe3c5f-63bb-4648-bdd3-172a2c25f64d" CreationDate="2022-02-17T08:41:27.727" UserId="73" Text="SCALE - Simple Concatenated Aggregate Little-Endian is a binary encoding. In contrast to encodings like JSON, it just stores the data without any information about the structure of the data. This has the advantage of saving a lot of space when it comes to storing the data. Storing data is expensive on blockchains (because every node needs to store the data), so the encoding should be as space efficient as possible. Besides that, SCALE also stores all data in little endian. As WASM is also using little endian, it makes the encoding and decoding more performant. &#xD;&#xA;&#xD;&#xA;And yes, you can implement your own SCALE implementation. There exists multiple of them besides the one from Parity." ContentLicense="CC BY-SA 4.0" />
  <row Id="1005" PostHistoryTypeId="2" PostId="286" RevisionGUID="cbe683f0-8eb8-482d-af51-67701c351c61" CreationDate="2022-02-17T08:50:47.057" UserId="73" Text="&gt; I was under the impression that in proof of stake, or as substrate uses it, nominated proof of stake, the block producers are chosen by stake, into a set known as validator set through phragmen election algorithm. Then this set further goes through slot based block production as assigned randomly by BABE. So I thought using Aura block production was only reserved for permissioned or private networks.&#xD;&#xA;&#xD;&#xA;BABE and Aura work fundamentally in the same way. The time is split into slots and each slot has one or more validators assigned to build a block for this slot. You can use both, BABE and Aura, for permissioned networks or for  POS networks.&#xD;&#xA;&#xD;&#xA;The main difference between BABE and Aura is that you don't know the block authors of each slot in BABE before they produced the block. A VRF (verifiable random function) is used by the BABE block producers to find out if they are eligible to build a block for a given slot. This has the advantage that you can not DOS the block producers to prevent them from building the block. However, Substrate also has the secondary slot &quot;extension&quot; of BABE, which makes these secondary slot authors predictable like in Aura. As the primary slot authors (chosen by the VRF) could also be no one, the secondary slot authors were introduced to ensure that there is a constant block rate.&#xD;&#xA;&#xD;&#xA;&gt; Now I don't know much about Edgeware, but in their runtime I can see a mix of staking, election_provider_multi_phase, sessions and finally aura. This came to me as a surprise because I didn't understand the point of pairing aura with the staking's pallet.&#xD;&#xA;&#xD;&#xA;The Staking pallet doesn't care about the block authoring algorithm it is paired with. The only thing it does is that it elects the authorities and tells the Session pallet in advance the new authorities. Aura and BABE are then informed by the Session pallet about the new authorities.&#xD;&#xA;&#xD;&#xA;&gt; Why are they choosing staking with an aura block producer whereas most chains I've seen use babe? What difference does it make?&#xD;&#xA;&#xD;&#xA;These are just historical reasons, as they launched the chain the BABE implementation wasn't ready." ContentLicense="CC BY-SA 4.0" />
  <row Id="1007" PostHistoryTypeId="2" PostId="287" RevisionGUID="10e79058-41b1-409c-b0e0-e1ef0fb4a0ce" CreationDate="2022-02-17T09:08:18.050" UserId="73" Text="`len_fee` is controlled by the `TransactionByteFee`. This `TransactionByteFee` is an associated type of the `transaction-payment` `Config` trait. If you set this to `0`, the `len_fee` is `0`.&#xD;&#xA;&#xD;&#xA;The `base_fee` depends on the `base_extrinsic` weight. This weight is then converted to the `base_fee`. You control the `base_extrinsic` weight by the `BlockWeights` associated type. You need to change this type to have a `base_extrinsic` weight for every transaction class and then you always have a `base_fee` of `0`. In the &quot;default&quot; Substrate runtime this type is for example constructed [here][1] and then assigned [here][2] as type `BlockWeights`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L174-L191&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/36b8970ef68b2f8d031f0aeadbe47d06a2679332/bin/node/runtime/src/lib.rs#L198" ContentLicense="CC BY-SA 4.0" />
  <row Id="1010" PostHistoryTypeId="2" PostId="288" RevisionGUID="a9c55f0c-81c4-4e5e-b2e1-9c6a162e4d3f" CreationDate="2022-02-17T09:32:45.417" UserId="85" Text="&quot;At the conclusion of the lease, the slot will go back up for auction and the team will need to bid for a slot again if they wish to retain one. Parachain slots are fungible, so teams do not need to always bid on the same slot. To avoid any downtime in connectivity and minimize the risk of losing a subsequent auction, teams can bid on and secure an adjacent slot before their current lease period ends.&quot;&#xD;&#xA;&#xD;&#xA;So concretely, another slot would be won via the standard auction system in the usual way and then at the point when the lease runs out the parachain would swap from one slot to the next. (The parachain's locked crowdloan would be made available such that people could choose to back the parachain's bid of a new slot)&#xD;&#xA;&#xD;&#xA;It is the pallet `paras_registrar.swap` function which carries out the action defined here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/64059a2fab9878ffde4971db0c3dc15bcb4282f4/runtime/common/src/paras_registrar.rs#L274&#xD;&#xA;&#xD;&#xA;Remember parachains are not forced to renew, - they could become a self sovereign solo chain or swap to be a parathread (once parathreads are enabled via on-chain governance)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1012" PostHistoryTypeId="33" PostId="156" RevisionGUID="e9178d15-82ee-4849-a1af-9836a77291ef" CreationDate="2022-02-17T09:37:54.017" UserId="83" Comment="1" />
  <row Id="1013" PostHistoryTypeId="2" PostId="289" RevisionGUID="21ea81ce-0654-47c2-87b2-341c05707663" CreationDate="2022-02-17T10:31:48.923" UserId="407" Text="Is it possible to create a transaction that calls an offchain worker to write data to the offchain worker&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1015" PostHistoryTypeId="1" PostId="289" RevisionGUID="21ea81ce-0654-47c2-87b2-341c05707663" CreationDate="2022-02-17T10:31:48.923" UserId="407" Text="How to create a transaction that calls an offchain worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="1016" PostHistoryTypeId="3" PostId="289" RevisionGUID="21ea81ce-0654-47c2-87b2-341c05707663" CreationDate="2022-02-17T10:31:48.923" UserId="407" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1017" PostHistoryTypeId="2" PostId="290" RevisionGUID="92d612cb-5b5e-44fe-b726-e42bf054d446" CreationDate="2022-02-17T10:39:28.150" UserId="406" Text="I was trying to automate peer discovery of my newly launched substrate network, and can't find any documentation related to that, it would be really helpful if someone can point to any available documentation or can tell how to achieve this.&#xD;&#xA;Automate means when I launch a new node, it will automatically connect to it's nearest node&#xD;&#xA;with it's IP and peer ID" ContentLicense="CC BY-SA 4.0" />
  <row Id="1019" PostHistoryTypeId="1" PostId="290" RevisionGUID="92d612cb-5b5e-44fe-b726-e42bf054d446" CreationDate="2022-02-17T10:39:28.150" UserId="406" Text="Automate discovery of new peer node" ContentLicense="CC BY-SA 4.0" />
  <row Id="1020" PostHistoryTypeId="3" PostId="290" RevisionGUID="92d612cb-5b5e-44fe-b726-e42bf054d446" CreationDate="2022-02-17T10:39:28.150" UserId="406" Text="|polkadot|substrate-node|blockchain|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1021" PostHistoryTypeId="2" PostId="291" RevisionGUID="90229b0f-442d-49b7-a2af-566c7752577a" CreationDate="2022-02-17T10:40:17.633" UserId="94" Text="I have an Extrinsic which modifies some storage variables and then returns either `Err` or `Ok`.  &#xD;&#xA;Will it revert the changes when I return `Err`?  &#xD;&#xA;How can I make sure that it only commits to changes when I return `Ok`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1023" PostHistoryTypeId="1" PostId="291" RevisionGUID="90229b0f-442d-49b7-a2af-566c7752577a" CreationDate="2022-02-17T10:40:17.633" UserId="94" Text="Do changes revert when an Extrinsic errors?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1024" PostHistoryTypeId="3" PostId="291" RevisionGUID="90229b0f-442d-49b7-a2af-566c7752577a" CreationDate="2022-02-17T10:40:17.633" UserId="94" Text="|pallet|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1025" PostHistoryTypeId="2" PostId="292" RevisionGUID="4b883494-296d-4c89-b92b-d9e928c4b953" CreationDate="2022-02-17T10:44:35.380" UserId="405" Text="In Ethereum, the contract address/account isn't formed trivially from a cryptographically-generated private-public key pair, but rather by using a separate method, as described [here][1].&#xD;&#xA;&#xD;&#xA;In Substrate, similar to this, a pallet-account is formed from inside the runtime by passing a PalletId (a unique identifier assigned to the pallet) to the [into_account()][2] function instead of passing a random seed as is done for normal account formation. &#xD;&#xA;For example: `T::PalletId::get().into_account()`&#xD;&#xA;&#xD;&#xA;My question now is, how can we be sure that the account address won't be replicated by anyone else/ other pallets in the chain? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://ethereum.org/en/developers/docs/accounts/#:~:text=The%20contract%20address%20is%20usually,(the%20%E2%80%9Cnonce%E2%80%9D).&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/latest/sp_runtime/traits/trait.AccountIdConversion.html#method.into_account" ContentLicense="CC BY-SA 4.0" />
  <row Id="1027" PostHistoryTypeId="1" PostId="292" RevisionGUID="4b883494-296d-4c89-b92b-d9e928c4b953" CreationDate="2022-02-17T10:44:35.380" UserId="405" Text="How can we be sure that a Pallet-account/address is unique in a chain and no one else in the chain can replicate the same address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1028" PostHistoryTypeId="3" PostId="292" RevisionGUID="4b883494-296d-4c89-b92b-d9e928c4b953" CreationDate="2022-02-17T10:44:35.380" UserId="405" Text="|pallet|palletid|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1029" PostHistoryTypeId="2" PostId="293" RevisionGUID="b0f8e56b-c81b-442a-bc14-8ca007aa8c3e" CreationDate="2022-02-17T10:46:02.367" UserId="94" Text="Currently you need to make sure to **never return an error after you modified storage**.  &#xD;&#xA;In your case you need to do all checks that can error before modifying something.  &#xD;&#xA;Returning `Err` after a modification will most likely put your pallet in an undefined state.  &#xD;&#xA;&#xD;&#xA;This is not the most ergonomic and will gladly change in the future.  &#xD;&#xA;An annotation à la `#[storage_layer]` or something similar will be added.  &#xD;&#xA;This would allow to write code more easily as it would revert all changes upon error.  &#xD;&#xA;&#xD;&#xA;Will update this post once its done." ContentLicense="CC BY-SA 4.0" />
  <row Id="1031" PostHistoryTypeId="6" PostId="292" RevisionGUID="d0ea7709-9c65-40f9-866d-8e91fa8180a8" CreationDate="2022-02-17T11:25:17.140" UserId="405" Comment="edited tags" Text="|substrate-node|pallet|palletid|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1036" PostHistoryTypeId="2" PostId="295" RevisionGUID="ecd29b90-b658-49d6-b6ce-2a40812f1562" CreationDate="2022-02-17T13:24:55.923" UserId="139" Text="Some pallets configure this field like so : `type WeightInfo = pallet_pallet_name::weights::SubstrateWeight&lt;Runtime&gt;;`&#xD;&#xA;&#xD;&#xA;However I've seen some runtimes in which they have an extra `WeightInfo` module from which they import weights, typically with a header like &quot;using weights that were auto generated by running benchmarks&quot;. How can I generate weights by running benchmarks? Or is it okay to use this  `type WeightInfo = pallet_pallet_name::weights::SubstrateWeight&lt;Runtime&gt;;` " ContentLicense="CC BY-SA 4.0" />
  <row Id="1038" PostHistoryTypeId="1" PostId="295" RevisionGUID="ecd29b90-b658-49d6-b6ce-2a40812f1562" CreationDate="2022-02-17T13:24:55.923" UserId="139" Text="How to generate `WeightInfo` for pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1039" PostHistoryTypeId="3" PostId="295" RevisionGUID="ecd29b90-b658-49d6-b6ce-2a40812f1562" CreationDate="2022-02-17T13:24:55.923" UserId="139" Text="|weight|benchmarks|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1040" PostHistoryTypeId="2" PostId="296" RevisionGUID="dc2c31c7-cf66-459a-b790-3ab4e523ae72" CreationDate="2022-02-17T14:06:14.807" UserId="139" Text="I want to implement a simple PoS consensus mechanism where validator sets are chosen proportional to their stake. Do I need to write my own pallet implementing ElectionProviders trait or is there a ready-made solution?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1042" PostHistoryTypeId="1" PostId="296" RevisionGUID="dc2c31c7-cf66-459a-b790-3ab4e523ae72" CreationDate="2022-02-17T14:06:14.807" UserId="139" Text="For staking pallet, what options do I have for ElectionProvider?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1043" PostHistoryTypeId="3" PostId="296" RevisionGUID="dc2c31c7-cf66-459a-b790-3ab4e523ae72" CreationDate="2022-02-17T14:06:14.807" UserId="139" Text="|consensus|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1044" PostHistoryTypeId="2" PostId="297" RevisionGUID="4ff2ac3f-cade-4baa-adc6-c967f564a96d" CreationDate="2022-02-17T14:23:58.417" UserId="404" Text="I figured out how to revert some blocks:&#xD;&#xA;&#xD;&#xA;    ./{chain executable} revert --base-path /home/ubuntu/chains --chain {chain name}--keep-blocks 351284 --pruning archive&#xD;&#xA;&#xD;&#xA;For options:&#xD;&#xA;&#xD;&#xA;    ./{chain executable} revert --help" ContentLicense="CC BY-SA 4.0" />
  <row Id="1051" PostHistoryTypeId="33" PostId="176" RevisionGUID="c0d2f999-3224-4316-8ce9-adbdf1b785fe" CreationDate="2022-02-17T15:44:12.853" UserId="3" Comment="2" />
  <row Id="1052" PostHistoryTypeId="2" PostId="299" RevisionGUID="d8117509-d678-4166-8e70-d54ead87b921" CreationDate="2022-02-17T16:23:32.997" UserId="28" Text="On a production chain, you should always re-calculate your weights by running benchmarks on the final runtime. The point of benchmarking is that your runtime can be configured in different ways, and your blockchain may have different assumptions than others. So running benchmarks gives you real results for exactly how you developed your runtime.&#xD;&#xA;&#xD;&#xA;The benchmarking tooling is enabled in Substrate based chains by compiling with the feature flag `--features=runtime-benchmarks`.&#xD;&#xA;&#xD;&#xA;And can be run like so:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/substrate benchmark \&#xD;&#xA;    --chain dev \                  # Configurable Chain Spec&#xD;&#xA;    --execution=wasm \             # Always test with Wasm&#xD;&#xA;    --wasm-execution=compiled \    # Always used `wasm-time`&#xD;&#xA;    --pallet pallet_balances \     # Select the pallet&#xD;&#xA;    --extrinsic transfer \         # Select the extrinsic&#xD;&#xA;    --steps 50 \                   # Number of samples across component ranges&#xD;&#xA;    --repeat 20 \                  # Number of times we repeat a benchmark&#xD;&#xA;    --output &lt;path&gt; \              # Output benchmark results into a folder or file&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;More information about benchmarking can be found here: https://github.com/paritytech/substrate/tree/master/frame/benchmarking&#xD;&#xA;&#xD;&#xA;And this video: https://www.youtube.com/watch?v=Qa6sTyUqgek" ContentLicense="CC BY-SA 4.0" />
  <row Id="1058" PostHistoryTypeId="2" PostId="300" RevisionGUID="d4fedf05-0098-42d6-aac1-6b2d5165fd05" CreationDate="2022-02-17T17:20:37.673" UserId="167" Text="As it stands now, you have two implementations in substrate: &#xD;&#xA;&#xD;&#xA;1. [`pallet-election-provider-multi-phase`](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/index.html): This is a generic, asynchronous election pallet that can provide a wide range of elections to the staking pallet. This pallet is suitable for *any* election algorithm that is too heavy to compute onchain. It being too heavy or not is something that you need to answer based on your chain configuration. This pallet [needs an underlying `Solver`](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/pallet/trait.Config.html#associatedtype.Solver). By default, substrate provides [multiple algorithms](https://paritytech.github.io/substrate/master/frame_election_provider_support/trait.NposSolver.html#implementors) here, but you can customize this to be anything you want.  &#xD;&#xA;2. [`SequentialPhragmen`](https://paritytech.github.io/substrate/master/frame_election_provider_support/struct.SequentialPhragmen.html) is simply a struct that implements `ElectionProvider` by choosing the best validators based on the [Phragmen's method](https://en.wikipedia.org/wiki/Phragmen%27s_voting_rules), and does the entire work on the fly. This type should only be used on networks that have small number of validators/nominators.   &#xD;&#xA;&#xD;&#xA;You can find a full list of implementations of `ElectionProvider` [here](https://paritytech.github.io/substrate/master/frame_election_provider_support/trait.ElectionProvider.html#implementors).&#xD;&#xA;&#xD;&#xA;Note that both of these approaches are slightly sub-optimal if your election is too simple, as-in, there is no *election algorithm* involved. This is because substrate assumes the existence of an election algorithm from the point of view of `pallet-staking`, so instead of `pallet-staking` trying to keep track of top `x` validators on the fly, the entire nomination graph is  passed down to an `ElectionProvider` at some point for an election algorithm to compute it. Nonetheless, you are able to implement any " ContentLicense="CC BY-SA 4.0" />
  <row Id="1060" PostHistoryTypeId="2" PostId="301" RevisionGUID="586d0bd1-1b9b-4bb6-9d51-d885dd28fb49" CreationDate="2022-02-17T17:32:00.537" UserId="361" Text="You cannot be sure that it won't be replicated. A different pallet could use the same seed (pallet id) to generate an account id and thus &quot;impersonate&quot; your pallet. This is not a problem, though, because the assumptions about pallets are different from smart contracts: Pallets are trusted modules included in the runtime deliberately by the people building the runtime (in contrast to smart contract that can be created in a permissionless way). Thus it is fine to assume that the pallets included in a runtime cooperate with each other.&#xD;&#xA;If you need to generate an account id that cannot be easily replicated, you will want to use hashing on unpredictable/uncontrollable inputs such as the account sending an extrinsic in combination with its nonce and the current block number." ContentLicense="CC BY-SA 4.0" />
  <row Id="1062" PostHistoryTypeId="2" PostId="302" RevisionGUID="97bb8271-a319-4b37-9647-ad6bb69b9ae1" CreationDate="2022-02-17T17:32:42.430" UserId="53" Text="There are a few reasons, some historical and others not. Main reasons:&#xD;&#xA;&#xD;&#xA;- Simple to define.&#xD;&#xA;- Not Rust-specific.&#xD;&#xA;- Consensus critical/bijective; one value will always encode to one blob and that blob will only decode to that value.&#xD;&#xA;- Supports a copy-free decode for basic types on LE architectures.&#xD;&#xA;- Viable for useful APIs like `MaxEncodedLen` and `TypeInfo`.&#xD;&#xA;&#xD;&#xA;It doesn't aim to be self-descriptive (e.g. encoding field names) or versioned and doesn't expend design bandwidth on those features. " ContentLicense="CC BY-SA 4.0" />
  <row Id="1064" PostHistoryTypeId="4" PostId="190" RevisionGUID="1dfffc1d-aefc-4c4e-8642-cfe457d40f9a" CreationDate="2022-02-17T17:40:19.163" UserId="104" Comment="Clarified question title based on question body" Text="Is there any java sdk or library for interacting with substrate nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1065" PostHistoryTypeId="24" PostId="190" RevisionGUID="1dfffc1d-aefc-4c4e-8642-cfe457d40f9a" CreationDate="2022-02-17T17:40:19.163" Comment="Proposed by 104 approved by 178 edit id of 50" ContentLicense="CC BY-SA 4.0" />
  <row Id="1066" PostHistoryTypeId="2" PostId="303" RevisionGUID="3d61b0b2-9f8a-4494-9659-62fd99c93c34" CreationDate="2022-02-17T18:45:18.720" UserId="29" Text="So you could create a function in you `chain_spec.rs` like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn get_endowed_accounts_with_balance() -&gt; Vec&lt;(AccountId, u128)&gt; {&#xD;&#xA;	let accounts: Vec&lt;AccountId&gt; =&#xD;&#xA;		vec![&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;		];&#xD;&#xA;	&#xD;&#xA;	let mut accounts_with_balance: Vec&lt;(AccountId, u128)&gt; = accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect();&#xD;&#xA;	let json_data = &amp;include_bytes!(&quot;../../seed/balances.json&quot;)[..];&#xD;&#xA;	let mut additional_accounts_with_balance: Vec&lt;(AccountId, u128)&gt; = serde_json::from_slice(json_data).unwrap();&#xD;&#xA;	accounts_with_balance.append(&amp;mut additional_accounts_with_balance);&#xD;&#xA;	accounts_with_balance&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Keep in mind I did not create the logic for overwriting balances of existing accounts, you would have to write rust code for that.&#xD;&#xA;&#xD;&#xA;I would also modify your JSON slightly like this: &#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;    [&#xD;&#xA;        &quot;5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw&quot;,&#xD;&#xA;        50000000000000&#xD;&#xA;    ],&#xD;&#xA;    [&#xD;&#xA;        &quot;5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL&quot;,&#xD;&#xA;        40000000000000&#xD;&#xA;    ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I created a simple working example on substate-node-template for you here:&#xD;&#xA;- https://github.com/brunopgalvao/substrate-node-template/blob/main/node/src/chain_spec.rs&#xD;&#xA;&#xD;&#xA;Hope that helps!" ContentLicense="CC BY-SA 4.0" />
  <row Id="1068" PostHistoryTypeId="2" PostId="304" RevisionGUID="30303080-e1f0-4a86-a959-bd0139c8a587" CreationDate="2022-02-17T18:55:59.603" UserId="94" Text="&gt; I'm trying to implement a public note system where everyone's note is saved on the blockchain. Should I use this Storage Runtime? If not, what should I use?&#xD;&#xA;&#xD;&#xA;Saving everything on-chain is indeed wasteful.  &#xD;&#xA;A simple trick is to only save the *hash* of your data on chain and out source the availability of the data itself.  &#xD;&#xA;&#xD;&#xA;Substrate recently introduced (not live yet) *Preimage* for that exact reason:  &#xD;&#xA;&gt;The Preimage pallet allows for the users and the runtime to store the preimage&#xD;&#xA;of a hash on chain. This can be used by other pallets for storing and managing&#xD;&#xA;large byte-blobs.  &#xD;&#xA;&#xD;&#xA;Until then your best bet is probably *IPFS* which addresses data via its hash as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="1070" PostHistoryTypeId="2" PostId="305" RevisionGUID="8d06fc93-70df-419f-82cc-7cbd6b76d595" CreationDate="2022-02-17T18:57:58.363" UserId="94" Text="I have a Pallet that should verify a signature for some input data and a specific `AccountId`.  &#xD;&#xA;It looks like this:  &#xD;&#xA;```rust&#xD;&#xA;fn verify(_: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: ???, from: T::AccountId)&#xD;&#xA;```  &#xD;&#xA;Is this possible? What kind of signature schemes can I use?  &#xD;&#xA;&#xD;&#xA;PS: I will post an answer tomorrow." ContentLicense="CC BY-SA 4.0" />
  <row Id="1072" PostHistoryTypeId="1" PostId="305" RevisionGUID="8d06fc93-70df-419f-82cc-7cbd6b76d595" CreationDate="2022-02-17T18:57:58.363" UserId="94" Text="How to verify a signature?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1073" PostHistoryTypeId="3" PostId="305" RevisionGUID="8d06fc93-70df-419f-82cc-7cbd6b76d595" CreationDate="2022-02-17T18:57:58.363" UserId="94" Text="|pallet|cryptography|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1074" PostHistoryTypeId="5" PostId="303" RevisionGUID="6f643221-8a1a-49c1-aeb9-81f8245a60f4" CreationDate="2022-02-17T18:58:27.457" UserId="29" Comment="added 53 characters in body" Text="So you could create a function in you `chain_spec.rs` like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn get_endowed_accounts_with_balance() -&gt; Vec&lt;(AccountId, u128)&gt; {&#xD;&#xA;	let accounts: Vec&lt;AccountId&gt; =&#xD;&#xA;		vec![&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;		];&#xD;&#xA;	&#xD;&#xA;	let mut accounts_with_balance: Vec&lt;(AccountId, u128)&gt; = accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect();&#xD;&#xA;	let json_data = &amp;include_bytes!(&quot;../../seed/balances.json&quot;)[..];&#xD;&#xA;	let mut additional_accounts_with_balance: Vec&lt;(AccountId, u128)&gt; = serde_json::from_slice(json_data).unwrap();&#xD;&#xA;	accounts_with_balance.append(&amp;mut additional_accounts_with_balance);&#xD;&#xA;	accounts_with_balance&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This implementation does not support duplicate accounts and I did not create the logic for overwriting balances of existing accounts. If I have time I will update this post with that.&#xD;&#xA;&#xD;&#xA;I would also modify your JSON slightly like this: &#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;    [&#xD;&#xA;        &quot;5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw&quot;,&#xD;&#xA;        50000000000000&#xD;&#xA;    ],&#xD;&#xA;    [&#xD;&#xA;        &quot;5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL&quot;,&#xD;&#xA;        40000000000000&#xD;&#xA;    ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I created a simple working example on substate-node-template for you here:&#xD;&#xA;- https://github.com/brunopgalvao/substrate-node-template/blob/main/node/src/chain_spec.rs&#xD;&#xA;&#xD;&#xA;Hope that helps!" ContentLicense="CC BY-SA 4.0" />
  <row Id="1075" PostHistoryTypeId="5" PostId="304" RevisionGUID="47ad1b53-f381-4c0d-8d58-793c4bf884cd" CreationDate="2022-02-17T20:02:35.740" UserId="94" Comment="added 83 characters in body" Text="&gt; I'm trying to implement a public note system where everyone's note is saved on the blockchain. Should I use this Storage Runtime? If not, what should I use?&#xD;&#xA;&#xD;&#xA;Saving everything on-chain is indeed wasteful.  &#xD;&#xA;A simple trick is to only save the *hash* of your data on chain and out source the availability of the data itself.  &#xD;&#xA;&#xD;&#xA;Substrate recently introduced (not live yet) *Preimage* for that exact reason:  &#xD;&#xA;&gt;The Preimage pallet allows for the users and the runtime to store the preimage&#xD;&#xA;of a hash on chain. This can be used by other pallets for storing and managing&#xD;&#xA;large byte-blobs.  &#xD;&#xA;&#xD;&#xA;Until then your best bet is probably *IPFS* which addresses data via its hash as well.  &#xD;&#xA;PS: NFTs in Ethereum also use that instead of storing the whole image on-chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="1076" PostHistoryTypeId="2" PostId="306" RevisionGUID="0335fb34-a9e6-4cd0-bf4e-2f8c0dbf1dd7" CreationDate="2022-02-17T21:19:54.507" UserId="418" Text="I need to check if an extrinsic matches &quot;default&quot; inside an extrinsic.  The following works:&#xD;&#xA;&#xD;&#xA;```let bv: BoundedVec&lt;u8, T::StringLimit&gt; = &quot;default&quot;.as_bytes().to_vec().try_into().unwrap();```&#xD;&#xA;&#xD;&#xA;However, this seems kind of ugly and hacky.  Is there not a better way to construct a BoundedVec?&#xD;&#xA;&#xD;&#xA;&gt; Blockquote" ContentLicense="CC BY-SA 4.0" />
  <row Id="1078" PostHistoryTypeId="1" PostId="306" RevisionGUID="0335fb34-a9e6-4cd0-bf4e-2f8c0dbf1dd7" CreationDate="2022-02-17T21:19:54.507" UserId="418" Text="How to implement BoundedVec inside an extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1079" PostHistoryTypeId="3" PostId="306" RevisionGUID="0335fb34-a9e6-4cd0-bf4e-2f8c0dbf1dd7" CreationDate="2022-02-17T21:19:54.507" UserId="418" Text="|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1080" PostHistoryTypeId="5" PostId="303" RevisionGUID="74bf5c7b-1f73-4e85-bd5d-463ab8c9c280" CreationDate="2022-02-17T21:22:59.310" UserId="29" Comment="add overwrite function" Text="So you could create a function in you `chain_spec.rs` like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn get_endowed_accounts_with_balance() -&gt; Vec&lt;(AccountId, u128)&gt; {&#xD;&#xA;	let accounts: Vec&lt;AccountId&gt; =&#xD;&#xA;		vec![&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;		];&#xD;&#xA;	&#xD;&#xA;	let accounts_with_balance: Vec&lt;(AccountId, u128)&gt; = accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect();&#xD;&#xA;	let json_data = &amp;include_bytes!(&quot;../../seed/balances.json&quot;)[..];&#xD;&#xA;	let additional_accounts_with_balance: Vec&lt;(AccountId, u128)&gt; = serde_json::from_slice(json_data).unwrap();&#xD;&#xA;	&#xD;&#xA;	let mut accounts = additional_accounts_with_balance.clone();&#xD;&#xA;	&#xD;&#xA;	accounts_with_balance.iter().for_each(|tup1| {&#xD;&#xA;		for tup2 in additional_accounts_with_balance.iter() {&#xD;&#xA;			if tup1.0 == tup2.0 {&#xD;&#xA;				return;&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;		accounts.push(tup1.to_owned());&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;	accounts&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would also modify your JSON slightly like this: &#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;    [&#xD;&#xA;        &quot;5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw&quot;,&#xD;&#xA;        50000000000000&#xD;&#xA;    ],&#xD;&#xA;    [&#xD;&#xA;        &quot;5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL&quot;,&#xD;&#xA;        40000000000000&#xD;&#xA;    ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I created a simple working example on substate-node-template for you here:&#xD;&#xA;- https://github.com/brunopgalvao/substrate-node-template/blob/main/node/src/chain_spec.rs&#xD;&#xA;&#xD;&#xA;Hope that helps!" ContentLicense="CC BY-SA 4.0" />
  <row Id="1081" PostHistoryTypeId="2" PostId="307" RevisionGUID="fc67d138-a1c1-445e-bef7-f9074a776ef6" CreationDate="2022-02-17T21:37:25.717" UserId="172" Text="A more elegant way:&#xD;&#xA;&#xD;&#xA;1. Make your max value part of your pallet's configuration trait so you can keep it generic in your pallet:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type StringLimit: Get&lt;u32&gt;;&#xD;&#xA;```&#xD;&#xA;2. Define some alias for your bounded vec (outside of `pub mod pallet{}`):&#xD;&#xA;```rust &#xD;&#xA;type MyBoundedVec&lt;T&gt; = BoundedVec&lt;u8, &lt;T as Config&gt;::StringLimit&gt;;&#xD;&#xA;```&#xD;&#xA;3. Then, use it inside your extrinsic:&#xD;&#xA;```rust&#xD;&#xA;let my_bounded_vec: MyBoundedVec&lt;T&gt; =&#xD;&#xA;    &quot;default&quot;.as_bytes().to_vec().try_into().unwrap();" ContentLicense="CC BY-SA 4.0" />
  <row Id="1083" PostHistoryTypeId="10" PostId="266" RevisionGUID="d84a5aaf-8794-47bc-ad97-551c379f3226" CreationDate="2022-02-17T23:00:23.100" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;}]}" />
  <row Id="1084" PostHistoryTypeId="5" PostId="278" RevisionGUID="5ab485b7-ad02-461b-bbc6-f030daa279a8" CreationDate="2022-02-18T00:02:47.870" UserId="172" Comment="Removed inaccurate information about Wasm execution." Text="SCALE codec is an efficient serializer and deserializer built for Substrate chains. It is lightweight, platform agnostic and enables compact encoding of Rust types and data structures.&#xD;&#xA;&#xD;&#xA;In order to understand why Substrate uses SCALE, it helps to think about the constrains we're working with in the runtime of the blockchains we're building. We have limited storage and decoding values needs to be fast and efficient. All types and custom data structures a runtime exposes need to be in the most compact and light weight form. So we use SCALE because it can give us those guarantees. What makes it suitable for this:&#xD;&#xA;- It's built for little endian architectures, making it suitable for Wasm.&#xD;&#xA;- It uses bijectiveness, making it efficient for checking equality between two functions.&#xD;&#xA;- It guarantees that data is as light as possible, supporting compact encoding of values.&#xD;&#xA;&#xD;&#xA;Thus, the SCALE specification is a critical piece enabling applications to interact with a runtime. For an application (such as a front-end, CLI or blockchain client) to send a transaction to a runtime, it will need to encode data for the runtime to process it. Similarly, when an application receives data from the runtime, it will need to decode it. &#xD;&#xA;&#xD;&#xA;Applications built for Substrate chains can implement a codec library in any language so long as it follows the SCALE specification. You can find some implementations of SCALE in different languages [here](https://docs.substrate.io/v3/advanced/scale-codec/#implementations).&#xD;&#xA;&#xD;&#xA;[This page](https://docs.substrate.io/v3/advanced/scale-codec/#scale-for-substrate) has some more details on the encoding of various types." ContentLicense="CC BY-SA 4.0" />
  <row Id="1085" PostHistoryTypeId="2" PostId="308" RevisionGUID="1649d1f8-0dc7-4c3d-b8c5-c4936e2b7ecc" CreationDate="2022-02-18T02:30:35.337" UserId="88" Text="The goal of the node would be to export its list of peers on an interval and publish it on IPNS to provide a dynamic bootstrap option for new peers. This helps if the static list published in a release gets deprecated.&#xD;&#xA;&#xD;&#xA;Publishing to ipns seems doable with the offchain-ipfs feature. Where things are blurry is getting the list of peers from the chain. &#xD;&#xA;&#xD;&#xA;I looked through the readme of sc_network and it mentions that the peerstore is being deprecated. If that is the case, how could one go about configuring a special node that can  export it's list of connected peers on an interval? I suppose the &quot;special&quot; here could mean that only a well-known list of peerIDs are allowed to run this code, or other applicable access control methods.&#xD;&#xA;&#xD;&#xA;From the little I know, substrate uses kademlia to manage connections. If that's the case, logic around filtering stale connections is already handled. In both cases though (is or is not kad), this list should be accessible in an environment where some comparison can be made with the current data on IPNS to perform some logic such as only publishing if the list changes." ContentLicense="CC BY-SA 4.0" />
  <row Id="1087" PostHistoryTypeId="1" PostId="308" RevisionGUID="1649d1f8-0dc7-4c3d-b8c5-c4936e2b7ecc" CreationDate="2022-02-18T02:30:35.337" UserId="88" Text="How to setup a special networking node" ContentLicense="CC BY-SA 4.0" />
  <row Id="1088" PostHistoryTypeId="3" PostId="308" RevisionGUID="1649d1f8-0dc7-4c3d-b8c5-c4936e2b7ecc" CreationDate="2022-02-18T02:30:35.337" UserId="88" Text="|substrate-node|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1089" PostHistoryTypeId="2" PostId="309" RevisionGUID="8016a564-f333-4a2a-bd36-baf16c585539" CreationDate="2022-02-18T03:57:09.397" UserId="420" Text="I'm using **@polkadot-js** to decode extrinsic data. The following method call returns a timestamp at a specific block, but I don't know how to parse this.&#xD;&#xA;&#xD;&#xA;I tried assuming that it's a unix timestamp in **seconds** and parsing it like so, but it doesn't fit. Is this in **nanoseconds**? **milliseconds**?&#xD;&#xA;&#xD;&#xA;How can I parse it into a date object in my favorite programming language?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const timestamp = await api.query.timestamp.now.at(blockHash);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The docs: https://polkadot.js.org/docs/substrate/storage#now-u64&#xD;&#xA;&#xD;&#xA;Example: `1590512778000`&#xD;&#xA;(*Could it be that my timestamps being incorrectly decoded?*)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1091" PostHistoryTypeId="1" PostId="309" RevisionGUID="8016a564-f333-4a2a-bd36-baf16c585539" CreationDate="2022-02-18T03:57:09.397" UserId="420" Text="What format is the block timestamp?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1092" PostHistoryTypeId="3" PostId="309" RevisionGUID="8016a564-f333-4a2a-bd36-baf16c585539" CreationDate="2022-02-18T03:57:09.397" UserId="420" Text="|polkadot|polkadot-js|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1093" PostHistoryTypeId="2" PostId="310" RevisionGUID="a7a7fc58-dd84-46da-ac26-528ca2c51535" CreationDate="2022-02-18T04:03:56.730" UserId="421" Text="I was doing last section of substrate private network tutorial.&#xD;&#xA;Before i stored key set, i could started network smoothly.&#xD;&#xA;But after i stored key set of aura and grandpa, i got this error.&#xD;&#xA;```&#xD;&#xA;yc6936@DESKTOP-P5M379O:~/substrate-node-template$ ./target/release/node-template --base-path /tmp/node01 --chain ./customSpecRaw.json --port 30333 --ws-port 9945 --rpc-port 9933 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator --rpc-methods Unsafe --name MyNode01&#xD;&#xA;2022-02-18 12:57:07 Low open file descriptor limit configured for the process. Current value: 4096, recommended value: 10000.&#xD;&#xA;2022-02-18 12:57:07 Substrate Node&#xD;&#xA;2022-02-18 12:57:07 ✌️  version 4.0.0-dev-b53da9f-x86_64-linux-gnu&#xD;&#xA;2022-02-18 12:57:07 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2022&#xD;&#xA;2022-02-18 12:57:07  Chain specification: Custom Testnet&#xD;&#xA;2022-02-18 12:57:07  Node name: MyNode01&#xD;&#xA;2022-02-18 12:57:07  Role: AUTHORITY&#xD;&#xA;2022-02-18 12:57:07  Database: RocksDb at /tmp/node01/chains/local_testnet/db/full&#xD;&#xA;2022-02-18 12:57:07 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)&#xD;&#xA;2022-02-18 12:57:07 could not parse an IP from hosts file&#xD;&#xA;2022-02-18 12:57:07 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs&#xD;&#xA;2022-02-18 12:57:07  Local node identity is: 12D3KooWPEhFE7KtZPrJu2qqFW5Lg71aYNYFTG36JmzTJrxL7JPm&#xD;&#xA;2022-02-18 12:57:07 could not parse an IP from hosts file&#xD;&#xA;2022-02-18 12:57:07  Highest known block at #0&#xD;&#xA;2022-02-18 12:57:07 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;2022-02-18 12:57:07 Listening for new connections on 127.0.0.1:9945.&#xD;&#xA;2022-02-18 12:57:08 GRANDPA voter error: Signing(&quot;Failed to sign GRANDPA vote for round 1 targetting 0x96b8d3a69d5dc2a2644964042185147b40b0159a7b8853bbcd12286096099fe4&quot;)&#xD;&#xA;2022-02-18 12:57:08 Essential task `grandpa-voter` failed. Shutting down service.&#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;))&#xD;&#xA;```&#xD;&#xA;What did i do wrong?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1095" PostHistoryTypeId="1" PostId="310" RevisionGUID="a7a7fc58-dd84-46da-ac26-528ca2c51535" CreationDate="2022-02-18T04:03:56.730" UserId="421" Text="What this 'grandpa-voter' error means?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1096" PostHistoryTypeId="3" PostId="310" RevisionGUID="a7a7fc58-dd84-46da-ac26-528ca2c51535" CreationDate="2022-02-18T04:03:56.730" UserId="421" Text="|consensus|substrate-node-template|grandpa|private-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1097" PostHistoryTypeId="2" PostId="311" RevisionGUID="e97cb748-1e75-417d-b09c-dfb7faf358f8" CreationDate="2022-02-18T04:33:04.890" UserId="352" Text="Hmm.. I guess it's an epoch mill&#xD;&#xA;&#xD;&#xA;use below site.&#xD;&#xA;&#xD;&#xA;https://www.epochconverter.com/" ContentLicense="CC BY-SA 4.0" />
  <row Id="1099" PostHistoryTypeId="2" PostId="312" RevisionGUID="fe101dd2-414a-4792-8af8-dd6425cea10e" CreationDate="2022-02-18T05:46:12.917" UserId="28" Text="The Timestamp pallet uses a [Unix Timestamp](https://en.wikipedia.org/wiki/Unix_time) which is pretty normal for computer software.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Lots of ways to convert this value, but here is a simple example in JS with the timestamp you provided:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let time = new Date(1590512778000)&#xD;&#xA;time.toString()&#xD;&#xA;&gt; &quot;Tue May 26 2020 11:06:18 GMT-0600 (Mountain Daylight Time)&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1101" PostHistoryTypeId="2" PostId="313" RevisionGUID="8b6fa81e-bf99-46b9-8b44-f514db695eb2" CreationDate="2022-02-18T06:52:41.730" UserId="377" Text="Do we have anything in the substrate to add the participation key/ Derived Key feature?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1103" PostHistoryTypeId="1" PostId="313" RevisionGUID="8b6fa81e-bf99-46b9-8b44-f514db695eb2" CreationDate="2022-02-18T06:52:41.730" UserId="377" Text="Do we have any pallet or concept for participation key/ Derived Key in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="1104" PostHistoryTypeId="3" PostId="313" RevisionGUID="8b6fa81e-bf99-46b9-8b44-f514db695eb2" CreationDate="2022-02-18T06:52:41.730" UserId="377" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1105" PostHistoryTypeId="2" PostId="314" RevisionGUID="28a50cc5-20d5-4b9b-a3d0-f7d3886814bd" CreationDate="2022-02-18T07:36:29.170" UserId="422" Text="I want to decode blocks and transactions from the Node. I want to use https://github.com/paritytech/substrate . But I can not find methods about it. Could you tell me where it is ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1107" PostHistoryTypeId="1" PostId="314" RevisionGUID="28a50cc5-20d5-4b9b-a3d0-f7d3886814bd" CreationDate="2022-02-18T07:36:29.170" UserId="422" Text="How to decode and encode transactions by using substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1108" PostHistoryTypeId="3" PostId="314" RevisionGUID="28a50cc5-20d5-4b9b-a3d0-f7d3886814bd" CreationDate="2022-02-18T07:36:29.170" UserId="422" Text="|sdk|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1110" PostHistoryTypeId="2" PostId="315" RevisionGUID="04ffd87c-579a-4cbd-bac7-c80d0d1edfe3" CreationDate="2022-02-18T09:00:01.663" UserId="352" Text="Because use metadata, I know that I can update without a fork.&#xD;&#xA;&#xD;&#xA;But if we have frame-metadata, don't we need to receive too long metadata files every time?&#xD;&#xA;&#xD;&#xA;Just get the version of the metadata and process the frame-metadata you saved?&#xD;&#xA;&#xD;&#xA;I don't understand that I get this long metadata every time.&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;state_getMetadata rpc call and&#xD;&#xA;&#xD;&#xA;- now response : `0x6d65..(too too too long)`&#xD;&#xA;- how about this response? : `v14 or magic number` and process with frame-metadata&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;-frame metadata github : https://github.com/paritytech/frame-metadata" ContentLicense="CC BY-SA 4.0" />
  <row Id="1112" PostHistoryTypeId="1" PostId="315" RevisionGUID="04ffd87c-579a-4cbd-bac7-c80d0d1edfe3" CreationDate="2022-02-18T09:00:01.663" UserId="352" Text="Why does substrate use metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1113" PostHistoryTypeId="3" PostId="315" RevisionGUID="04ffd87c-579a-4cbd-bac7-c80d0d1edfe3" CreationDate="2022-02-18T09:00:01.663" UserId="352" Text="|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1114" PostHistoryTypeId="6" PostId="315" RevisionGUID="5a8c4678-3924-4caa-805d-d98cce59dae7" CreationDate="2022-02-18T09:07:20.337" UserId="352" Comment="edited tags" Text="|json-rpc|scale-codec|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1115" PostHistoryTypeId="5" PostId="305" RevisionGUID="69213a3b-30cc-4ee1-8859-71d2eed00c89" CreationDate="2022-02-18T10:18:29.193" UserId="94" Comment="deleted 48 characters in body" Text="I have a Pallet that should verify a signature for some input data and a specific `AccountId`.  &#xD;&#xA;It looks like this:  &#xD;&#xA;```rust&#xD;&#xA;fn verify(_: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: ???, from: ???)&#xD;&#xA;```  &#xD;&#xA;Is this possible? What kind of signature schemes can I use?  " ContentLicense="CC BY-SA 4.0" />
  <row Id="1116" PostHistoryTypeId="2" PostId="316" RevisionGUID="d0833b6c-4e8f-404f-9d90-bf2a05d0d546" CreationDate="2022-02-18T10:55:45.383" UserId="94" Text="Substrate provides a [Verify](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.Verify.html) and an [IdentifyAccount](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.IdentifyAccount.html) trait.  &#xD;&#xA;They work with any signature scheme since they are just traits and can be implemented for different crypto schemata.  &#xD;&#xA;This is very helpful when implementing off-chain protocols like Channels, Plasmas, Rollups etc.&#xD;&#xA;&#xD;&#xA;The `Config` trait of your pallet needs to be extended to support it:  &#xD;&#xA;```rust&#xD;&#xA;/// A Signature can be verified with a specific `PublicKey`.&#xD;&#xA;/// The additional traits are boilerplate.&#xD;&#xA;type Signature: Verify&lt;Signer = Self::PublicKey&gt; + Encode + Decode + Member;&#xD;&#xA;&#xD;&#xA;/// A PublicKey can be converted into an `AccountId`. This is required by the&#xD;&#xA;/// `Signature` type.&#xD;&#xA;/// The additional traits are boilerplate.&#xD;&#xA;type PublicKey: IdentifyAccount&lt;AccountId = Self::PublicKey&gt; + Encode + Decode + Member;&#xD;&#xA;```&#xD;&#xA;This makes it possible to verify signatures within the pallet.  &#xD;&#xA;Using it in an Extrinsic looks like this:  &#xD;&#xA;```rust&#xD;&#xA;fn my_verify(_: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: T::Signature, from: T::PublicKey)&#xD;&#xA;{&#xD;&#xA;    let ok = sig.verify(&amp;data, &amp;from);&#xD;&#xA;    // `ok` is a bool. Use in an `if` or `ensure!`.&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On the runtime side you can then inject the *concrete* crypto implementation that you want:  &#xD;&#xA;```rust&#xD;&#xA;type Signature = sp_core::ecdsa::Signature;&#xD;&#xA;type PublicKey = sp_core::ecdsa::PublicKey;&#xD;&#xA;```&#xD;&#xA;Available are `ecdsa`, `sr25519` and `ed25519` all from [sp_core](https://docs.rs/sp-core/latest/sp_core/).  " ContentLicense="CC BY-SA 4.0" />
  <row Id="1118" PostHistoryTypeId="6" PostId="305" RevisionGUID="07d7481e-ab04-4daa-bb2e-fb9edba0743f" CreationDate="2022-02-18T10:56:14.630" UserId="94" Comment="edited tags" Text="|pallet|cryptography|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1119" PostHistoryTypeId="4" PostId="305" RevisionGUID="dca86f11-45c3-4ea2-9150-2d6e859162ba" CreationDate="2022-02-18T11:02:42.733" UserId="94" Comment="edited title" Text="How to verify a signature in a Pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1120" PostHistoryTypeId="2" PostId="317" RevisionGUID="bf6e474c-f3a5-4a6f-967a-096d8253201b" CreationDate="2022-02-18T11:05:34.690" UserId="94" Text="Thanks to @islami00 for the question (not verbatim):  &#xD;&#xA;&gt;I have done all error checking as instructed [here](https://substrate.stackexchange.com/questions/291/do-changes-revert-when-an-extrinsic-errors/).  &#xD;&#xA;Am I now save to `expect` all future `Result`s even after modifying storage?  &#xD;&#xA;&#xD;&#xA;When is it permissible to use `expect`?  &#xD;&#xA;What happens when it fails?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1122" PostHistoryTypeId="1" PostId="317" RevisionGUID="bf6e474c-f3a5-4a6f-967a-096d8253201b" CreationDate="2022-02-18T11:05:34.690" UserId="94" Text="When to use .expect()" ContentLicense="CC BY-SA 4.0" />
  <row Id="1123" PostHistoryTypeId="3" PostId="317" RevisionGUID="bf6e474c-f3a5-4a6f-967a-096d8253201b" CreationDate="2022-02-18T11:05:34.690" UserId="94" Text="|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1124" PostHistoryTypeId="2" PostId="318" RevisionGUID="da161c4a-0cb6-4ec9-94ad-c531044dd2ad" CreationDate="2022-02-18T11:12:31.773" UserId="272" Text="You use `expect` where you want to communicate that unwrapping this result should never fail. You can use unwrap or unwrap_or where you aren't sure, but for infallible calls, you should use `expect`." ContentLicense="CC BY-SA 4.0" />
  <row Id="1126" PostHistoryTypeId="2" PostId="319" RevisionGUID="5b4246ca-6b65-478f-9d1f-8f32a9f6f6c3" CreationDate="2022-02-18T11:13:00.227" UserId="73" Text="&gt; When is it permissible to use expect?&#xD;&#xA;&#xD;&#xA;When you can proof that it can not panic. Aka you have done all required checks, like that the data exists or that some kind of arithmetic operation will succeed.&#xD;&#xA;&#xD;&#xA;&gt; What happens when it fails?&#xD;&#xA;&#xD;&#xA;The block producer will throw away the transaction and any modifications to the state that have been done. The problem with this is that you can the dos block producers for free. You can just send the same tx over and over again, you will not need to pay (because we revert all the state, this includes fee deduction if a tx panics), but the block producer will try to include it." ContentLicense="CC BY-SA 4.0" />
  <row Id="1128" PostHistoryTypeId="2" PostId="320" RevisionGUID="0422bc32-ecdc-44b8-8862-419b4f0183de" CreationDate="2022-02-18T12:15:12.917" UserId="53" Text="Short answer: never use `expect`, `unwrap` or other panickers in runtime code.&#xD;&#xA;&#xD;&#xA;Long answer: only if you can prove that it will never panic, and you are confident that your code is so simple and maintainable that nobody could ever make a change which would result in that proof becoming broken and a panic possible.&#xD;&#xA;&#xD;&#xA;In general, it's better to just not include anything which can panic since it will open you up to DoS attacks, or, if the panic happens during one of the runtime hooks (`on_initialize` &amp;c.) then your chain will halt.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1130" PostHistoryTypeId="2" PostId="321" RevisionGUID="66af9c53-a758-42c0-bbbd-a376d360d8b6" CreationDate="2022-02-18T12:30:13.840" UserId="427" Text=" we are running 2 OCWs each in separate instances. and we have an extrinsic which mutates a storage in runtime which is done twice from the 2 OCWs but we want only one OCW to sign. how to do that?&#xD;&#xA;for example, if we want to increase a value in storage by +1 each hour, it is doing +2 since 2 OCWs are running. how to solve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1132" PostHistoryTypeId="1" PostId="321" RevisionGUID="66af9c53-a758-42c0-bbbd-a376d360d8b6" CreationDate="2022-02-18T12:30:13.840" UserId="427" Text="How to avoid multiple OCWs duplicating work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1133" PostHistoryTypeId="3" PostId="321" RevisionGUID="66af9c53-a758-42c0-bbbd-a376d360d8b6" CreationDate="2022-02-18T12:30:13.840" UserId="427" Text="|substrate-node|offchain-worker|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1134" PostHistoryTypeId="5" PostId="305" RevisionGUID="4761d915-b81c-4d8a-8e5d-6567dc14d603" CreationDate="2022-02-18T12:33:54.643" UserId="94" Comment="deleted 1 character in body" Text="I have a Pallet that should verify a signature for some input data and a specific public key.  &#xD;&#xA;It looks like this:  &#xD;&#xA;```rust&#xD;&#xA;fn verify(_: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: ???, from: ???)&#xD;&#xA;```  &#xD;&#xA;Is this possible? What kind of signature schemes can I use?  " ContentLicense="CC BY-SA 4.0" />
  <row Id="1135" PostHistoryTypeId="2" PostId="322" RevisionGUID="31c641b4-2749-41e1-8dda-f0fbcba2afca" CreationDate="2022-02-18T13:37:45.643" UserId="45" Text="I want to run an experiment to see how big are PoVs for my parachain blocks. &#xD;&#xA;&#xD;&#xA;I figured I can leverage the same API that is used during syncing `execute_block` for the blocks I am interested in and collect the key-value pairs along with the merkle-proof similar to what a collator does during parachain block creation.&#xD;&#xA;&#xD;&#xA;Is that possible to do in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1137" PostHistoryTypeId="1" PostId="322" RevisionGUID="31c641b4-2749-41e1-8dda-f0fbcba2afca" CreationDate="2022-02-18T13:37:45.643" UserId="45" Text="How do I obtain key-value storage proof for a runtime call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1138" PostHistoryTypeId="3" PostId="322" RevisionGUID="31c641b4-2749-41e1-8dda-f0fbcba2afca" CreationDate="2022-02-18T13:37:45.643" UserId="45" Text="|parachain|api|runtime|pov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1139" PostHistoryTypeId="2" PostId="323" RevisionGUID="691e9909-b40b-4248-af2c-68d9976d86c6" CreationDate="2022-02-18T13:37:45.643" UserId="45" Text="It is possible to collect a witness for having an runtime API handle at hand. The key methods are [`record_proof`] and [`extract_proof`].&#xD;&#xA;&#xD;&#xA;Assuming you have a [`Client`] instance at hand, you can do the following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let mut runtime_api = client.runtime_api();&#xD;&#xA;runtime_api.record_proof(); &#xD;&#xA;runtime_api.execute_block(at, block);&#xD;&#xA;let witness = runtime_api&#xD;&#xA;    .extract_proof()&#xD;&#xA;    .unwrap(&quot;proof is always present if called after `record_proof`&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Currently, Cumulus' PoV consists of the witness and the block part. The block part can be obtained by just SCALE encoding the block, i.e.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;block.encode()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[`Client`]: https://crates.parity.io/sc_service/client/struct.Client.html&#xD;&#xA;[`record_proof`]: https://crates.parity.io/sp_api/trait.ApiExt.html#tymethod.record_proof&#xD;&#xA;[`extract_proof`]: https://crates.parity.io/sp_api/trait.ApiExt.html#tymethod.extract_proof" ContentLicense="CC BY-SA 4.0" />
  <row Id="1141" PostHistoryTypeId="5" PostId="312" RevisionGUID="a06b20a8-3b31-4adb-b768-08646b82c2fe" CreationDate="2022-02-18T16:34:05.460" UserId="45" Comment="Some clarifications (it's not the pallet convention, but more Substrate wide) and it is not exactly UNIX timestamp" Text="Substrate are time stamped by a number of milliseconds since 1 January 1970 UTC.&#xD;&#xA;&#xD;&#xA;This convention is widely adopted by many modern programming environments. Here is a simple example in JS with the timestamp you provided:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let time = new Date(1590512778000)&#xD;&#xA;time.toString()&#xD;&#xA;&gt; &quot;Tue May 26 2020 11:06:18 GMT-0600 (Mountain Daylight Time)&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1142" PostHistoryTypeId="24" PostId="312" RevisionGUID="a06b20a8-3b31-4adb-b768-08646b82c2fe" CreationDate="2022-02-18T16:34:05.460" Comment="Proposed by 45 approved by 28 edit id of 53" ContentLicense="CC BY-SA 4.0" />
  <row Id="1143" PostHistoryTypeId="5" PostId="93" RevisionGUID="12cd21c7-9907-47ae-8487-17bc7fae0cb0" CreationDate="2022-02-18T16:35:03.447" UserId="45" Comment="expanded the physical limits section and updated the wasm allocation limit" Text="Storage size and density are both relevant concerns when it comes to the performance of your chain. There are limits and performance implications at many levels so I will break them down:&#xD;&#xA;&#xD;&#xA;## Physical Limits&#xD;&#xA;&#xD;&#xA;The Substrate runtime executes within a `wasm32` environment, which means we have the same general limitations as any 32-bit environment, for example the maximum theoretical number of items in a `Vec` is `u32::MAX` or 2&lt;sup&gt;32&lt;/sup&gt; or 4,294,967,296. In practice though it will much less because that assumes a vector of bytes and does not account for any other overheads.&#xD;&#xA;&#xD;&#xA;## Wasm Limits&#xD;&#xA;&#xD;&#xA;Our wasm environment itself is configured with a maximum allocation size which is currently set to 32 MiB. That means trying to access any item in storage which requires more than 32 MiB allocated memory will cause a panic in the runtime.&#xD;&#xA;&#xD;&#xA;## Merkle Trie Limits&#xD;&#xA;&#xD;&#xA;Substrate's generic key-value database can support arbitrary size keys and values.&#xD;&#xA;&#xD;&#xA;## Merkle Trie Complexity&#xD;&#xA;&#xD;&#xA;Substrate uses a base-16 merkle trie as default, and thus we can expect the complexity of accessing item in the trie to grow at log16 of the number of items in the overall state.&#xD;&#xA;&#xD;&#xA;## Size / Decoding Performance&#xD;&#xA;&#xD;&#xA;When reading a raw value from the database, we should expect that larger files are more complex for the database to handle than smaller files.&#xD;&#xA;&#xD;&#xA;Additionally, to convert the raw encoded bytes into a Rust type-safe object, Parity SCALE Codec needs to decode those bytes, which increases in complexity based on the number of bytes encoded.&#xD;&#xA;&#xD;&#xA;## Database Optimizations&#xD;&#xA;&#xD;&#xA;While I cannot speak towards optimization of RocksDB with various filesizes, [Parity DB](https://github.com/paritytech/parity-db) is optimized for certain kinds of key/values. Those optimizations are noted in the project." ContentLicense="CC BY-SA 4.0" />
  <row Id="1144" PostHistoryTypeId="24" PostId="93" RevisionGUID="12cd21c7-9907-47ae-8487-17bc7fae0cb0" CreationDate="2022-02-18T16:35:03.447" Comment="Proposed by 45 approved by 28 edit id of 52" ContentLicense="CC BY-SA 4.0" />
  <row Id="1145" PostHistoryTypeId="2" PostId="324" RevisionGUID="a42249bd-9a1a-49f9-8fea-dc2478897540" CreationDate="2022-02-18T16:47:14.440" UserId="29" Text="In the example given here:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/questions/172/does-each-block-save-a-copy-of-a-storage-item&#xD;&#xA;&#xD;&#xA;Is the Merkle Trie copied to every block or is it the &quot;diff&quot; of the Merkle Trie that is updated on the new block?&#xD;&#xA;&#xD;&#xA;Does each block have to hold **all** the storage or can one finalized block N reference it's ancestors e.g. N - 1" ContentLicense="CC BY-SA 4.0" />
  <row Id="1147" PostHistoryTypeId="1" PostId="324" RevisionGUID="a42249bd-9a1a-49f9-8fea-dc2478897540" CreationDate="2022-02-18T16:47:14.440" UserId="29" Text="Is the full Merkle Trie copied in every block along with updates?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1148" PostHistoryTypeId="3" PostId="324" RevisionGUID="a42249bd-9a1a-49f9-8fea-dc2478897540" CreationDate="2022-02-18T16:47:14.440" UserId="29" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1149" PostHistoryTypeId="2" PostId="325" RevisionGUID="620e33e9-1a28-4905-8c43-12a7a9e56c7c" CreationDate="2022-02-18T17:39:16.570" UserId="29" Text="Isn't that what essentially we are doing here:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/examples/offchain-worker/src/lib.rs#L236&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn submit_price(origin: OriginFor&lt;T&gt;, price: u32) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;	// Retrieve sender of the transaction.&#xD;&#xA;	let who = ensure_signed(origin)?;&#xD;&#xA;	// Add the price to the on-chain list.&#xD;&#xA;	Self::add_price(Some(who), price);&#xD;&#xA;	Ok(().into())&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1152" PostHistoryTypeId="5" PostId="325" RevisionGUID="a4312c10-ec99-40cb-809a-d09859aa31ff" CreationDate="2022-02-18T18:06:41.913" UserId="29" Comment="grammar" Text="Isn't that what we are essentially doing here:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/examples/offchain-worker/src/lib.rs#L236&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn submit_price(origin: OriginFor&lt;T&gt;, price: u32) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;	// Retrieve sender of the transaction.&#xD;&#xA;	let who = ensure_signed(origin)?;&#xD;&#xA;	// Add the price to the on-chain list.&#xD;&#xA;	Self::add_price(Some(who), price);&#xD;&#xA;	Ok(().into())&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1153" PostHistoryTypeId="2" PostId="326" RevisionGUID="b5010d0d-d492-4e8c-9795-2a5462859b74" CreationDate="2022-02-18T18:18:23.833" UserId="28" Text="The Merkle trie allows us to more efficiently hold the data of previous blocks. In summary, data which is shared between blocks is not copied, but simply shares a reference to how to access the data in the database.&#xD;&#xA;&#xD;&#xA;As data nodes are no longer present in any of the historical blocks, we prune them, removing them from the database.&#xD;&#xA;&#xD;&#xA;I touch on this in my storage deep dive: https://www.shawntabrizi.com/substrate/substrate-storage-deep-dive/&#xD;&#xA;&#xD;&#xA;You will see in the image below, only data which is new or changed is added to the database, where as most of the data remains untouched. Eventually, old data which is no longer referenced by a block is cleaned up. For an archive node, pruning never occurs since we store all historical blocks.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/B6ete.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/i2Azp.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/oDglY.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/gW1HU.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1155" PostHistoryTypeId="2" PostId="327" RevisionGUID="1f36ed57-08ee-4e2b-819d-4e116523b543" CreationDate="2022-02-18T18:37:44.270" UserId="28" Text="It sounds to me that you are using offchain workers incorrectly. They should not be thought of as trusted applications which can modify your runtime's state or behave in expected ways. In fact, you should expect that every malicious user in your network is running their own custom version of your offchain worker and abusing it in every way possible.&#xD;&#xA;&#xD;&#xA;Thus, the interface between your offchain worker and your runtime, usually an extrinsic, should have the appropriate checks to ensure that any offchain worker call is appropriate. In the case of updating a value every hour, probably you should keep track of the timestamp / block number where the last update happened, and check that the next update does not happen sooner than you expect." ContentLicense="CC BY-SA 4.0" />
  <row Id="1157" PostHistoryTypeId="2" PostId="328" RevisionGUID="cb892cae-91db-4201-8387-483ab5d4633e" CreationDate="2022-02-18T18:45:29.063" UserId="28" Text="You can also see fully integrated examples of signature verification in a Pallet with:&#xD;&#xA;&#xD;&#xA;1. The `claims` pallet, which verifies Ethereum Signatures&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	// Constructs the message that Ethereum RPC's `personal_sign` and `eth_sign` would sign.&#xD;&#xA;	fn ethereum_signable_message(what: &amp;[u8], extra: &amp;[u8]) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;		let prefix = T::Prefix::get();&#xD;&#xA;		let mut l = prefix.len() + what.len() + extra.len();&#xD;&#xA;		let mut rev = Vec::new();&#xD;&#xA;		while l &gt; 0 {&#xD;&#xA;			rev.push(b'0' + (l % 10) as u8);&#xD;&#xA;			l /= 10;&#xD;&#xA;		}&#xD;&#xA;		let mut v = b&quot;\x19Ethereum Signed Message:\n&quot;.to_vec();&#xD;&#xA;		v.extend(rev.into_iter().rev());&#xD;&#xA;		v.extend_from_slice(&amp;prefix[..]);&#xD;&#xA;		v.extend_from_slice(what);&#xD;&#xA;		v.extend_from_slice(extra);&#xD;&#xA;		v&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// Attempts to recover the Ethereum address from a message signature signed by using&#xD;&#xA;	// the Ethereum RPC's `personal_sign` and `eth_sign`.&#xD;&#xA;	fn eth_recover(s: &amp;EcdsaSignature, what: &amp;[u8], extra: &amp;[u8]) -&gt; Option&lt;EthereumAddress&gt; {&#xD;&#xA;		let msg = keccak_256(&amp;Self::ethereum_signable_message(what, extra));&#xD;&#xA;		let mut res = EthereumAddress::default();&#xD;&#xA;		res.0&#xD;&#xA;			.copy_from_slice(&amp;keccak_256(&amp;secp256k1_ecdsa_recover(&amp;s.0, &amp;msg).ok()?[..])[12..]);&#xD;&#xA;		Some(res)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. The `crowdloan` pallet which verifies multiple different kinds of signatures using the `Multisignature` type:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;if let Some(ref verifier) = fund.verifier {&#xD;&#xA;	let signature = signature.ok_or(Error::&lt;T&gt;::InvalidSignature)?;&#xD;&#xA;	let payload = (index, &amp;who, old_balance, value);&#xD;&#xA;	let valid = payload.using_encoded(|encoded| {&#xD;&#xA;		signature.verify(encoded, &amp;verifier.clone().into_account())&#xD;&#xA;	});&#xD;&#xA;	ensure!(valid, Error::&lt;T&gt;::InvalidSignature);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1159" PostHistoryTypeId="2" PostId="329" RevisionGUID="c1088e2e-e51a-4907-ac7f-1a94aa6f3d7a" CreationDate="2022-02-18T18:51:13.360" UserId="28" Text="I am assuming that [&quot;participation key&quot;](https://www.purestake.com/blog/participation-keys-in-algorand/) refers to what is available in Algorand to enable keys which can only vote.&#xD;&#xA;&#xD;&#xA;In this case, yes, Substrate provides a [Proxy Pallet](https://github.com/paritytech/substrate/tree/master/frame/proxy) which allows you to generate [Proxy Accounts](https://wiki.polkadot.network/docs/learn-proxies) with varying levels of permissions.&#xD;&#xA;&#xD;&#xA;This allows one account to act as a proxy to control another account, and submit transactions on their behalf.&#xD;&#xA;&#xD;&#xA;We have proxy levels which give the user full access to do everything, and reduced level proxies like for Governance only calls. As a Governance proxy, I would only be able to submit transactions which involve voting or participating in governance, and I would be blocked from doing things like transfers on behalf of the main account." ContentLicense="CC BY-SA 4.0" />
  <row Id="1161" PostHistoryTypeId="2" PostId="330" RevisionGUID="e88827dd-2a34-43e6-a584-9c2abb90d57e" CreationDate="2022-02-18T19:02:26.003" UserId="28" Text="The Staking pallet is not currently set up to be configured to behave in this way. Your best bet would be to design your own pallet with this functionality in mind.&#xD;&#xA;&#xD;&#xA;Furthermore, there is a lot of questions to be had about a design change like this. For example, what mechanisms will be made to ensure the payout pot never runs empty?&#xD;&#xA;&#xD;&#xA;Also, if these changes are intended for use in a Parachain, it should be noted that the Staking Pallet is not currently safe for Parachains to use due to its complexity and use of storage.&#xD;&#xA;&#xD;&#xA;The relay chain has much higher limits in terms of what can be executed and how storage is accessed than a parachain, and we take advantage of that in the Staking Pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="1163" PostHistoryTypeId="2" PostId="331" RevisionGUID="0a145a01-5daf-485c-b28e-b9103ee6437a" CreationDate="2022-02-18T19:10:46.417" UserId="29" Text="Something like this?&#xD;&#xA;- https://docs.substrate.io/rustdocs/master/pallet_utility/index.html#for-pseudonymal-dispatch&#xD;&#xA;&#xD;&#xA;If so, there is some discussion on this here:&#xD;&#xA;- https://www.parity.io/blog/building-a-hot-wallet-with-substrate-primitives/&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1165" PostHistoryTypeId="10" PostId="315" RevisionGUID="a38155e7-8b28-44b6-9076-b8b9b69aed00" CreationDate="2022-02-18T19:12:26.817" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;}]}" />
  <row Id="1166" PostHistoryTypeId="5" PostId="330" RevisionGUID="e5ea03b7-ceee-4583-b594-528392709308" CreationDate="2022-02-18T19:18:25.287" UserId="28" Comment="added 177 characters in body" Text="The Staking pallet is not currently set up to be configured to behave in this way. Your best bet would be to design your own pallet with this functionality in mind.&#xD;&#xA;&#xD;&#xA;Furthermore, there is a lot of questions to be had about a design change like this. For example, what mechanisms will be made to ensure the payout pot never runs empty? Will you adjust reward payments based on the available amount left? If so, that would also require a bunch more logic which is currently not integrated into our Staking Pallet.&#xD;&#xA;&#xD;&#xA;Also, if these changes are intended for use in a Parachain, it should be noted that the Staking Pallet is not currently safe for Parachains to use due to its complexity and use of storage.&#xD;&#xA;&#xD;&#xA;The relay chain has much higher limits in terms of what can be executed and how storage is accessed than a parachain, and we take advantage of that in the Staking Pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="1167" PostHistoryTypeId="5" PostId="301" RevisionGUID="74a956bc-64b7-4750-8579-8107a86cce56" CreationDate="2022-02-18T19:29:04.850" UserId="361" Comment="typo" Text="You cannot be sure that it won't be replicated. A different pallet could use the same seed (pallet id) to generate an account id and thus &quot;impersonate&quot; your pallet. This is not a problem, though, because the assumptions about pallets are different from smart contracts: Pallets are trusted modules included in the runtime deliberately by the people building the runtime (in contrast to smart contracts that can be created in a permissionless way). Thus it is fine to assume that the pallets included in a runtime cooperate with each other.&#xD;&#xA;If you need to generate an account id that cannot be easily replicated, you will want to use hashing on unpredictable/uncontrollable inputs such as the account sending an extrinsic in combination with its nonce and the current block number." ContentLicense="CC BY-SA 4.0" />
  <row Id="1168" PostHistoryTypeId="2" PostId="332" RevisionGUID="62b103a4-11b0-49f8-ac0f-af1a715b4471" CreationDate="2022-02-18T19:40:21.017" UserId="29" Text="Are you referring to something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let block = node_primitives::Block::decode(&amp;mut &amp;block_data[..]).unwrap();&#xD;&#xA;```&#xD;&#xA;https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/bin/node/executor/tests/basic.rs#L896&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1170" PostHistoryTypeId="2" PostId="333" RevisionGUID="6c83d2f6-9cd5-4541-9f8b-7b7ae806d362" CreationDate="2022-02-18T20:32:10.543" UserId="172" Text="There seems to be different approaches to declaring constants for a pallet's runtime implementation. &#xD;&#xA;&#xD;&#xA;1. A common approach for example is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// In pallet/example/src/lib.rs&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;        // --snip --&#xD;&#xA;		const SOME_CONSTANT: u32;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// In runtime/src/lib.rs&#xD;&#xA;impl pallet_example::Config for Runtime {&#xD;&#xA;        const SOME_CONSTANT: u32 = 42;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Another way is to use `ConstU32`. For example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// In pallet/example/src/lib.rs&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;        // --snip --&#xD;&#xA;        #[pallet::constant]&#xD;&#xA;		type SomeConstant: Get&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// In runtime/src/lib.rs&#xD;&#xA;impl pallet_example::Config for Runtime {&#xD;&#xA;	type SomeConstant = ConstU32&lt;42&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;3. A third approach would be to use the `parameter_types` types macro, which is most commonly used to declare constants of custom types, but can also be used for any other type.&#xD;&#xA;&#xD;&#xA;How do I know which approach to use? Why would I choose one over the other?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1172" PostHistoryTypeId="1" PostId="333" RevisionGUID="6c83d2f6-9cd5-4541-9f8b-7b7ae806d362" CreationDate="2022-02-18T20:32:10.543" UserId="172" Text="When should I use `ConstU32` to declare a constant value for my pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1173" PostHistoryTypeId="3" PostId="333" RevisionGUID="6c83d2f6-9cd5-4541-9f8b-7b7ae806d362" CreationDate="2022-02-18T20:32:10.543" UserId="172" Text="|pallet|frame|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1174" PostHistoryTypeId="2" PostId="334" RevisionGUID="93bb04e6-38c1-44dc-b5fd-070ca5fa62e9" CreationDate="2022-02-18T20:39:15.043" UserId="25" Text="There appears to be a few sync mechanisms in Substrate like full sync, fork sync, gap sync, warp sync, state sync, etc.&#xD;&#xA;&#xD;&#xA;What is the complete picture of sync mechanisms/stages in Substrate are and how they relate to each other?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1176" PostHistoryTypeId="1" PostId="334" RevisionGUID="93bb04e6-38c1-44dc-b5fd-070ca5fa62e9" CreationDate="2022-02-18T20:39:15.043" UserId="25" Text="What kinds of sync mechanisms does Substrate implement?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1177" PostHistoryTypeId="3" PostId="334" RevisionGUID="93bb04e6-38c1-44dc-b5fd-070ca5fa62e9" CreationDate="2022-02-18T20:39:15.043" UserId="25" Text="|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1179" PostHistoryTypeId="2" PostId="335" RevisionGUID="eff3710c-b668-4d7a-9bd9-6da0a276dfae" CreationDate="2022-02-18T22:58:04.440" UserId="73" Text="Associated constants are not used that much in FRAME. I mean you can use them, but it makes it harder to write tests. With the `Get` trait you have the possibility to &quot;cheat&quot; in tests by implementing it for a thread local type.&#xD;&#xA;&#xD;&#xA;For `ConstU32` vs `parameter_types!`. `ConstU32` just came later with the stabilization of const generics. Code wise there is no real difference. However, `ConstU32` for sure is &quot;shorter&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="1181" PostHistoryTypeId="5" PostId="325" RevisionGUID="73519408-3d23-4e93-9614-2502d4dd774e" CreationDate="2022-02-19T03:00:03.580" UserId="29" Comment="better answer" Text="If you take a look at this diagram:&#xD;&#xA;&#xD;&#xA;![](https://d33wubrfki0l68.cloudfront.net/04485e45edfb524bfbebdf0270455902ff5912af/56a28/static/505c4ec510929c01c0e608225c5c598a/6edca/off-chain-workers-v2.png)&#xD;&#xA; &#xD;&#xA;The dotted red lines indicate that the Off-Chain Worker (OCW), although existing in the Substrate Node in tandem with the Substrate Runtime, actually lives in its own separate WASM execution environment - denoted by the dotted red line. One of the main reasons the OCW lives in the Node with the Substrate Runtime is so that it can have access to on-chain state and also so that, if opted-in, the runtime can have access to Off-Chain Storage via Off-Chain Indexing.&#xD;&#xA;&#xD;&#xA;An OCW can be thought of as a second application that runs alongside the blockchain. That being said, your OCW can listen to events from the runtime and react in some manner to those events. Your Substrate Runtime should not have any idea that your OCW exists nor should it assume so.&#xD;&#xA;&#xD;&#xA;More info: https://docs.substrate.io/v3/concepts/off-chain-features/#off-chain-workers&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1182" PostHistoryTypeId="2" PostId="336" RevisionGUID="b075158f-a67a-40aa-bd21-7f86075ca99f" CreationDate="2022-02-19T04:02:14.553" UserId="28" Text="Also, for things like `BoundedVec`, it is not currently possible to use an associated constant because const generics are not fully supported: https://github.com/paritytech/substrate/pull/9865&#xD;&#xA;&#xD;&#xA;I think there are a lot of places we would actually use a const, but can't really do that yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="1184" PostHistoryTypeId="2" PostId="337" RevisionGUID="af972ae6-21ca-4c57-a608-412ae962fe79" CreationDate="2022-02-19T04:54:16.147" UserId="129" Text="Whenever I submit an extrinsic, there's a small transaction fee applied to the sender. Where does it go to?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1186" PostHistoryTypeId="1" PostId="337" RevisionGUID="af972ae6-21ca-4c57-a608-412ae962fe79" CreationDate="2022-02-19T04:54:16.147" UserId="129" Text="Where do the transaction fees go to?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1187" PostHistoryTypeId="3" PostId="337" RevisionGUID="af972ae6-21ca-4c57-a608-412ae962fe79" CreationDate="2022-02-19T04:54:16.147" UserId="129" Text="|balances|extrinsic|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1188" PostHistoryTypeId="2" PostId="338" RevisionGUID="855e1675-11b0-4318-84f8-83b2e41dcadd" CreationDate="2022-02-19T05:38:20.843" UserId="28" Text="The transaction-fee pallet handles calculating and transferring the transaction fees. It supports a configurable output by implementing the `OnUnbalanced` trait.&#xD;&#xA;&#xD;&#xA;For Polkadot and Kusama, 80% of the transaction fees go to the treasury, and 20% go to the block producer. This does not include tips, which are 100% sent to the block author.&#xD;&#xA;&#xD;&#xA;That logic can be found here: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/impls.rs#L38&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct DealWithFees&lt;R&gt;(sp_std::marker::PhantomData&lt;R&gt;);&#xD;&#xA;impl&lt;R&gt; OnUnbalanced&lt;NegativeImbalance&lt;R&gt;&gt; for DealWithFees&lt;R&gt;&#xD;&#xA;where&#xD;&#xA;	R: pallet_balances::Config + pallet_treasury::Config + pallet_authorship::Config,&#xD;&#xA;	pallet_treasury::Pallet&lt;R&gt;: OnUnbalanced&lt;NegativeImbalance&lt;R&gt;&gt;,&#xD;&#xA;	&lt;R as frame_system::Config&gt;::AccountId: From&lt;primitives::v1::AccountId&gt;,&#xD;&#xA;	&lt;R as frame_system::Config&gt;::AccountId: Into&lt;primitives::v1::AccountId&gt;,&#xD;&#xA;	&lt;R as frame_system::Config&gt;::Event: From&lt;pallet_balances::Event&lt;R&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	fn on_unbalanceds&lt;B&gt;(mut fees_then_tips: impl Iterator&lt;Item = NegativeImbalance&lt;R&gt;&gt;) {&#xD;&#xA;		if let Some(fees) = fees_then_tips.next() {&#xD;&#xA;			// for fees, 80% to treasury, 20% to author&#xD;&#xA;			let mut split = fees.ration(80, 20);&#xD;&#xA;			if let Some(tips) = fees_then_tips.next() {&#xD;&#xA;				// for tips, if any, 100% to author&#xD;&#xA;				tips.merge_into(&amp;mut split.1);&#xD;&#xA;			}&#xD;&#xA;			use pallet_treasury::Pallet as Treasury;&#xD;&#xA;			&lt;Treasury&lt;R&gt; as OnUnbalanced&lt;_&gt;&gt;::on_unbalanced(split.0);&#xD;&#xA;			&lt;ToAuthor&lt;R&gt; as OnUnbalanced&lt;_&gt;&gt;::on_unbalanced(split.1);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But, as with all things Substrate, you are welcome to configure this yourself to whatever behavior you want!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1190" PostHistoryTypeId="2" PostId="339" RevisionGUID="3eafc18c-a97b-4b5b-942b-5517247bb079" CreationDate="2022-02-19T09:59:03.310" UserId="431" Text="What is the reasonable value for the contract `code_len` limit on parachains? The default size limit is 128 KiB now, but do you think the value will be decreased or increased?&#xD;&#xA;&#xD;&#xA;I'm working on relatively large contracts, so the limit can affect the design of the contracts.&#xD;&#xA;&#xD;&#xA;Limit: https://github.com/paritytech/substrate/blob/monthly-2022-02/frame/contracts/src/schedule.rs#L504&#xD;&#xA;&#xD;&#xA;Possibly related: https://github.com/paritytech/substrate/issues/9354" ContentLicense="CC BY-SA 4.0" />
  <row Id="1192" PostHistoryTypeId="1" PostId="339" RevisionGUID="3eafc18c-a97b-4b5b-942b-5517247bb079" CreationDate="2022-02-19T09:59:03.310" UserId="431" Text="What is the reasonable value for the contract wasm size limit on parachains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1193" PostHistoryTypeId="3" PostId="339" RevisionGUID="3eafc18c-a97b-4b5b-942b-5517247bb079" CreationDate="2022-02-19T09:59:03.310" UserId="431" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1194" PostHistoryTypeId="2" PostId="340" RevisionGUID="6dafb276-ab41-4aeb-b3f8-64b9573608e0" CreationDate="2022-02-19T10:36:49.993" UserId="16" Text="The default limit of 128KiB is rather arbitrary and was chosen in a time before parachains were implemented. True sharding and contracts is something that is hard to bring together. The limit on a production chain will not be necessarily smaller than it is now. However, it will most likely be uneconomical to use contracts that are 128KiB in size once the a chain approaches its transaction limit. To answer your question: This limit most likely won't going up in the near future. Note that the so called [code merkelization](https://github.com/paritytech/substrate/issues/9431) will enable bigger contracts but as of now it is unclear when this will happen.&#xD;&#xA;&#xD;&#xA;A good limit to aim for would be 24KiB which is the original code size limit on Ethereum. That said, even many of the ink! example contracts are above this limit and this is mostly by overhead incurred by the ink! codegen itself. The ink! team is in the process of removing this overhead: [1](https://github.com/paritytech/ink/issues/1134) [2](https://github.com/paritytech/ink/issues/990) [3](https://github.com/paritytech/ink/pull/1111)&#xD;&#xA;&#xD;&#xA;If your contract is already hitting the 128KiB limit you should make an effort to keep the size down. While some of the size is caused by current limitations of ink! itself (as described above) there are some things you can do right now:&#xD;&#xA;&#xD;&#xA;* Make sure to pass `--release` to `cargo contract`. This will remove debug output which contributes a lot to size and should not be used for production contracts.&#xD;&#xA;* Make sure to not add any heavy dependencies to your contract. While cargo makes it easy to add new dependencies it will most likely bloat your contract because most crates are not optimized for size. For example, depending on a cryptographic crate is common trap that developers tap into. If you really must do crypto in your contract (often you think you do but in reality you don't) you should use [`self.env().ecdsa_recover()`](https://paritytech.github.io/ink/ink_lang/struct.EnvAccess.html#method.ecdsa_recover) instead.&#xD;&#xA;* Don't use strings in your contract. Anything human readable should live in the UI and not in a contract." ContentLicense="CC BY-SA 4.0" />
  <row Id="1196" PostHistoryTypeId="2" PostId="341" RevisionGUID="842c6cd3-10bc-4fb0-a307-8b8c47410f8f" CreationDate="2022-02-19T13:14:32.477" UserId="67" Text="What is the approach to weight calculation in a pallet with a user defined dependency that will do some work,  &#xD;&#xA;e.g.&#xD;&#xA;```rust&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;    type Handler: Handler;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;trait Handler {&#xD;&#xA;    fn do_thing(input: &amp;[u8]) -&gt; TheResult;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    #[pallet::weight(T::WeightInfo::my_ext())]&#xD;&#xA;	pub fn my_ext(origin: OriginFor&lt;T&gt;, input: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;        // T::Handler::do_thing(&amp;input)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;How to calculate the weight of the extrinsic calling the `Handler::do_thing` method that could be doing anything?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1198" PostHistoryTypeId="1" PostId="341" RevisionGUID="842c6cd3-10bc-4fb0-a307-8b8c47410f8f" CreationDate="2022-02-19T13:14:32.477" UserId="67" Text="Calculate weight of generic dependency" ContentLicense="CC BY-SA 4.0" />
  <row Id="1199" PostHistoryTypeId="3" PostId="341" RevisionGUID="842c6cd3-10bc-4fb0-a307-8b8c47410f8f" CreationDate="2022-02-19T13:14:32.477" UserId="67" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1200" PostHistoryTypeId="5" PostId="281" RevisionGUID="204b9d66-c079-4fdc-8548-a0b5225aac88" CreationDate="2022-02-19T13:34:38.023" UserId="85" Comment="typo" Text="I was trying to modify the transaction fee and for that i only want the congestion of the network, but in *FeeDetails* that is present in **transaction-payment** pallet, we have three fields, i.e., **base_fee, len_fee, adjusted_weight_fee** , and congestion of network depends on adjusted_weight_fee, so for this purpose i only want that field, but i don't know how to set the other two fields to zero, any suggestions would be helpful." ContentLicense="CC BY-SA 4.0" />
  <row Id="1201" PostHistoryTypeId="6" PostId="281" RevisionGUID="204b9d66-c079-4fdc-8548-a0b5225aac88" CreationDate="2022-02-19T13:34:38.023" UserId="85" Comment="typo" Text="|polkadot|substrate-node|rust|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1202" PostHistoryTypeId="5" PostId="276" RevisionGUID="09696eda-32ce-4a56-a22e-8ef9bdceab49" CreationDate="2022-02-19T13:39:31.067" UserId="85" Comment="unindent code" Text="I am looking at customising how we pay rewards for stakers. Instead of the default &quot;minting&quot; behaviour I would like to pay rewards out of some pot I will setup.&#xD;&#xA;&#xD;&#xA;Looking at the staking pallet, I can see it has a `Reward` Config type that is meant to allow exactly what i need, but unfortunately its not called anywhere in the pallet.&#xD;&#xA;&#xD;&#xA;I was expecting to see something similar to this on the result returned by `make_payout()`: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;if let Some(imbalance) =&#xD;&#xA;			Self::make_payout(&amp;ledger.stash, validator_staking_payout + validator_commission_payout)&#xD;&#xA;{&#xD;&#xA;    T::Reward::on_unbalanced(imbalance); // This to be added&#xD;&#xA;	Self::deposit_event(Event::&lt;T&gt;::Rewarded(ledger.stash, imbalance.peek()));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there another way to achieve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1206" PostHistoryTypeId="5" PostId="321" RevisionGUID="3a15a2a3-5baa-4524-a4fc-8b23322c0dbf" CreationDate="2022-02-19T13:52:13.480" UserId="29" Comment="Updating grammar." Text="We are running 2 OCWs each in separate instances and we have an extrinsic which mutates a storage in runtime which is done twice from the 2 OCWs but we want only one OCW to sign. How to do that?&#xD;&#xA;For example, if we want to increase a value in storage by +1 each hour, it is doing +2 since 2 OCWs are running. How to solve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1207" PostHistoryTypeId="24" PostId="321" RevisionGUID="3a15a2a3-5baa-4524-a4fc-8b23322c0dbf" CreationDate="2022-02-19T13:52:13.480" Comment="Proposed by 29 approved by 104, 85 edit id of 55" ContentLicense="CC BY-SA 4.0" />
  <row Id="1208" PostHistoryTypeId="5" PostId="315" RevisionGUID="e6f6513b-c44e-4b21-b4f4-f21fdb641655" CreationDate="2022-02-19T13:54:04.340" UserId="29" Comment="@PaperFrog is this more helpful?" Text="What is the difference between Metadata and [Metadata Type Definitions](https://github.com/paritytech/frame-metadata) in Substrate?&#xD;&#xA;&#xD;&#xA;Also, when I do the `state_getMetadata` RPC call I get the metadata. It is rather long. Is there a way to cache this locally and on subsequent `state_getMetadata` RPC calls, compare the hash of my local version with the hash of the latest metadata and if they're equal than use my locally cached metadata rather than have to pull the entire metadata again?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1209" PostHistoryTypeId="4" PostId="315" RevisionGUID="e6f6513b-c44e-4b21-b4f4-f21fdb641655" CreationDate="2022-02-19T13:54:04.340" UserId="29" Comment="@PaperFrog is this more helpful?" Text="What is the difference between Metadata and FRAME-Metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1211" PostHistoryTypeId="24" PostId="315" RevisionGUID="e6f6513b-c44e-4b21-b4f4-f21fdb641655" CreationDate="2022-02-19T13:54:04.340" Comment="Proposed by 29 approved by 104, 85 edit id of 54" ContentLicense="CC BY-SA 4.0" />
  <row Id="1213" PostHistoryTypeId="5" PostId="236" RevisionGUID="377a752a-c4d2-47f9-af8b-00ef5d85b668" CreationDate="2022-02-19T14:09:56.640" UserId="85" Comment="adding additional relevant seal type" Text="What is meant by terms like Sealing, InstantSeal, ManualSeal, etc. (please add them here if you know more kinds of seals). " ContentLicense="CC BY-SA 4.0" />
  <row Id="1214" PostHistoryTypeId="2" PostId="342" RevisionGUID="82e554c2-e2a5-4823-973f-1e3be4cc8bb8" CreationDate="2022-02-19T16:00:27.727" UserId="434" Text="Im looking into some of the procedural macros used, namely the ```#[pallet]``` attribute to declare a pallet that is recognised by ```construct_runtime!```. However, I cannot find the source code for the pallet module (```mod pallet;``` line 30) that implements the functionality in the pallet attribute.&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/rustdocs/latest/src/frame_support_procedural/lib.rs.html#402-404&#xD;&#xA;&#xD;&#xA;Can anyone direct me to the source?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1216" PostHistoryTypeId="1" PostId="342" RevisionGUID="82e554c2-e2a5-4823-973f-1e3be4cc8bb8" CreationDate="2022-02-19T16:00:27.727" UserId="434" Text="pallet module in frame_support_procedural crate" ContentLicense="CC BY-SA 4.0" />
  <row Id="1217" PostHistoryTypeId="3" PostId="342" RevisionGUID="82e554c2-e2a5-4823-973f-1e3be4cc8bb8" CreationDate="2022-02-19T16:00:27.727" UserId="434" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1222" PostHistoryTypeId="2" PostId="344" RevisionGUID="13c94d70-7dba-41f6-93ca-386948439cb0" CreationDate="2022-02-19T20:43:01.590" UserId="28" Text="A great question.&#xD;&#xA;&#xD;&#xA;In general, the nice thing about the benchmarking framework for Substrate is that we run our benchmarks against the precise configuration that you have set up for your actual chain. So as a user changes the configuration of this generic handler (sometimes called a runtime hook), the benchmarks will respond and actually run this code.&#xD;&#xA;&#xD;&#xA;However, the issue becomes how can the benchmark know what the worst case scenario for that hook would be? It is impossible to write a benchmark that would test the worst case scenario for some arbitrary user defined code, so you will need to solve this one of a few different ways.&#xD;&#xA;&#xD;&#xA;1. You can write clear expectations to the implementer on the complexity allowed in the hook. For example, the average expectation for hooks is that they should always be fixed time complexity, and thus it would not matter the other inputs into this function, the benchmark would always be accurate in benchmarking the worst case scenario since there is no variability in complexity.&#xD;&#xA;&#xD;&#xA;2. Otherwise, if this hook has some input and variability, and you could clarify that the user is allowed to have some linear complexity over this input, and that your benchmarking will try values over this complexity, and thus get an accurate output. But it is important not to introduce any super-linear complexity to any of the runtime logic.&#xD;&#xA;&#xD;&#xA;3. Ask the user to provide you with the worst case scenario to use in the benchmark. For example, your `T::Handler::do_thing(input)` could also have a function `let worst_input = T::Handler::worst_input_for_do_thing()`, and then your benchmarking will fetch the worst case input before running the benchmark and use that as the input into your handler. This is the strategy we used a lot in [XCM benchmarking](https://github.com/paritytech/polkadot/blob/master/xcm/pallet-xcm-benchmarks/src/generic/mod.rs#L20), which is extremely customizable.&#xD;&#xA;&#xD;&#xA;4. Have the implementer write their own custom benchmark which handles the complexity of their custom handler. Remember that benchmarks are not &quot;baked into the pallet&quot;. You can always write your own custom benchmarking library which tests all of your extrinsic functions in different ways. As you customize your runtime more and more, this is probably the only reasonable option available since there will always be fundamental assumptions related to writing benchmarks, and thus if you truly want to make a custom chain, you will need custom benchmarks." ContentLicense="CC BY-SA 4.0" />
  <row Id="1224" PostHistoryTypeId="2" PostId="345" RevisionGUID="e52b61d9-2e1d-4e3a-a9ba-ea814eb253aa" CreationDate="2022-02-19T20:47:08.517" UserId="28" Text="I believe the entry point you are looking for can be found here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/tree/master/frame/support/procedural/src/pallet&#xD;&#xA;&#xD;&#xA;You will find basically all of the FRAME macros in the `frame/support/procedural` folder.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;//! Implementation for pallet attribute macro.&#xD;&#xA;//!&#xD;&#xA;//! General workflow:&#xD;&#xA;//! 1 - parse all pallet attributes:&#xD;&#xA;//!   This step remove all attributes `#[pallet::*]` from the ItemMod and build the `Def` struct&#xD;&#xA;//!   which holds the ItemMod without `#[pallet::*]` and information given by those attributes&#xD;&#xA;//! 2 - expand from the parsed information&#xD;&#xA;//!   This step will modify the ItemMod by adding some derive attributes or phantom data variants&#xD;&#xA;//!   to user defined types. And also crate new types and implement block.&#xD;&#xA;&#xD;&#xA;mod expand;&#xD;&#xA;mod parse;&#xD;&#xA;&#xD;&#xA;pub use parse::Def;&#xD;&#xA;use syn::spanned::Spanned;&#xD;&#xA;&#xD;&#xA;pub fn pallet(&#xD;&#xA;	attr: proc_macro::TokenStream,&#xD;&#xA;	item: proc_macro::TokenStream,&#xD;&#xA;) -&gt; proc_macro::TokenStream {&#xD;&#xA;    // -- snip --&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1227" PostHistoryTypeId="2" PostId="346" RevisionGUID="d03f6011-716e-4502-acb6-81ea5a29037d" CreationDate="2022-02-20T09:53:44.310" UserId="286" Text="I'm looking for a source of random numbers - doesn't need to be cryptographically secure, just hard to predict in advance but agreed by and visible to all participants.  I'm thinking about using the block hash a few blocks up the chain (say 10).  Ideally I want something that would be hard to game values on as a validator.&#xD;&#xA;&#xD;&#xA;Is that a suitable source?  Are there other / better options?  Or existing examples in pallets already?&#xD;&#xA;&#xD;&#xA;I think I only need 16 bit (though 32 / 64 bit numbers might be more computationally efficient for the modulo arithmetic I'm planning to use it for - maybe)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1229" PostHistoryTypeId="1" PostId="346" RevisionGUID="d03f6011-716e-4502-acb6-81ea5a29037d" CreationDate="2022-02-20T09:53:44.310" UserId="286" Text="On-chain pseudo-random numbers - agreed by all" ContentLicense="CC BY-SA 4.0" />
  <row Id="1230" PostHistoryTypeId="3" PostId="346" RevisionGUID="d03f6011-716e-4502-acb6-81ea5a29037d" CreationDate="2022-02-20T09:53:44.310" UserId="286" Text="|ramdom|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1231" PostHistoryTypeId="2" PostId="347" RevisionGUID="40a8bd49-b0ae-433e-b99e-1c4cbd034ca1" CreationDate="2022-02-20T12:26:34.520" UserId="129" Text="I've done the [Start a private network tutorial][1]. However, in this tutorial, they run 2 nodes on the same computer with different ports. Now I want to run a private network with different computers but I'm not quite sure how to do that.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/private-network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="1233" PostHistoryTypeId="1" PostId="347" RevisionGUID="40a8bd49-b0ae-433e-b99e-1c4cbd034ca1" CreationDate="2022-02-20T12:26:34.520" UserId="129" Text="How to start a private network on 2 computers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1234" PostHistoryTypeId="3" PostId="347" RevisionGUID="40a8bd49-b0ae-433e-b99e-1c4cbd034ca1" CreationDate="2022-02-20T12:26:34.520" UserId="129" Text="|nodes|private-network|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1235" PostHistoryTypeId="2" PostId="348" RevisionGUID="52cf98df-9754-4266-a17d-020ffa108d6c" CreationDate="2022-02-20T13:18:06.463" UserId="286" Text="I've not tried it on a local network - my nodes are all either on a single machine or in the cloud - but there are a couple of options that suggest it'll probably just work on the same private IP address subnet, if you're using --dev.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        --allow-private-ipv4               &#xD;&#xA;            Always accept connecting to private IPv4 addresses (as specified in&#xD;&#xA;            [RFC1918](https://tools.ietf.org/html/rfc1918)). Enabled by default for chains marked as &quot;local&quot; in their&#xD;&#xA;            chain specifications, or when `--dev` is passed&#xD;&#xA;&#xD;&#xA;        --discover-local                   &#xD;&#xA;            Enable peer discovery on local networks.&#xD;&#xA;            &#xD;&#xA;            By default this option is `true` for `--dev` or when the chain type is `Local`/`Development` and false&#xD;&#xA;            otherwise.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If it doesn't work without encouragement, you could give the two nodes the other node as a bootnode (technically only one needs to be able to find the other for it to work).  Bootnodes either in the chainspec or on the command line.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        --bootnodes &lt;ADDR&gt;...                                        &#xD;&#xA;            Specify a list of bootnodes&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The format for bootnodes is:&#xD;&#xA;```&#xD;&#xA; --bootnodes /ip4/&lt;ip_address&gt;/tcp/&lt;p2p_port&gt;/p2p/12D3KooWC1RbgqfcM219TvGoNfU3ZRQcBxWDiy9TGZDH6AjmVhP&#xD;&#xA;(edit the node address too)&#xD;&#xA;```&#xD;&#xA;And don't forget to check that your p2p port isn't blocked by the firewall.&#xD;&#xA;&#xD;&#xA;Note, that's just one option for bootnode definition, there are ipv6 and DNS methods too, but this is the simplest option for your needs." ContentLicense="CC BY-SA 4.0" />
  <row Id="1237" PostHistoryTypeId="2" PostId="349" RevisionGUID="4f22ba67-5ff2-442b-a1e9-6ac62cbb2ff0" CreationDate="2022-02-20T14:34:36.737" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="1239" PostHistoryTypeId="1" PostId="349" RevisionGUID="4f22ba67-5ff2-442b-a1e9-6ac62cbb2ff0" CreationDate="2022-02-20T14:34:36.737" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="1240" PostHistoryTypeId="2" PostId="350" RevisionGUID="767a9720-f054-4aa2-8100-e43de124c436" CreationDate="2022-02-20T14:34:36.737" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="1242" PostHistoryTypeId="1" PostId="350" RevisionGUID="767a9720-f054-4aa2-8100-e43de124c436" CreationDate="2022-02-20T14:34:36.737" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="1243" PostHistoryTypeId="6" PostId="346" RevisionGUID="d0350354-4621-445b-ac85-e38aa1927547" CreationDate="2022-02-20T15:05:34.433" UserId="286" Comment="edited tags" Text="|random|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1244" PostHistoryTypeId="2" PostId="351" RevisionGUID="b1b68f19-dd63-4a99-af68-ca56e04d0993" CreationDate="2022-02-20T19:22:00.817" UserId="377" Text="I need to get the system time in my pallet for which I am able to get the epoch format like 1590512778000. Now I need to convert this time to the date-time.&#xD;&#xA;I tried many ways but not worked.&#xD;&#xA;Can you please suggest any way to do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1246" PostHistoryTypeId="1" PostId="351" RevisionGUID="b1b68f19-dd63-4a99-af68-ca56e04d0993" CreationDate="2022-02-20T19:22:00.817" UserId="377" Text="How can we convert the timestamp to the Data time in Substrate pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="1247" PostHistoryTypeId="3" PostId="351" RevisionGUID="b1b68f19-dd63-4a99-af68-ca56e04d0993" CreationDate="2022-02-20T19:22:00.817" UserId="377" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1248" PostHistoryTypeId="2" PostId="352" RevisionGUID="172812f4-8ddf-40fa-9453-d6a120bfe948" CreationDate="2022-02-20T20:03:35.133" UserId="28" Text="In JavaScript, this is extremely easy:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let date = new Date(1590512778000);&#xD;&#xA;date.toString()&#xD;&#xA;&#xD;&#xA;&gt; &quot;Tue May 26 2020 11:06:18 GMT-0600 (Mountain Daylight Time)&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Within the runtime itself, I would not really recommend doing any kind of date parsing, or really any use of dates within your runtime logic.&#xD;&#xA;&#xD;&#xA;Time is not a native concept inside the blockchain. Even the timestamp pallet in Substrate is data which is fed into the blockchain by the block producer, and only has a &quot;soft consensus&quot; around it.&#xD;&#xA;&#xD;&#xA;If you want to do something like schedule an event at a future time, the best thing to do is use the Block Number, which is totally a native part of the blockchain, and a concept that is very easy to use.&#xD;&#xA;&#xD;&#xA;Most Substrate blockchains have a fixed block time, for example 6 seconds, so you could program 1 hour as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let one_hour: T::BlockNumber = 600;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1250" PostHistoryTypeId="6" PostId="351" RevisionGUID="021da2d6-0cdb-41cb-a5fc-9990d16e6601" CreationDate="2022-02-20T20:03:49.970" UserId="28" Comment="edited tags" Text="|pallet|timestamp|time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1251" PostHistoryTypeId="2" PostId="353" RevisionGUID="873c3fc2-01bc-400c-a71d-86e2bc1b7447" CreationDate="2022-02-20T20:18:43.207" UserId="28" Text="There are a few pallets in FRAME which provide an implementation to the [`Randomness`](https://crates.parity.io/frame_support/traits/trait.Randomness.html) trait.&#xD;&#xA;&#xD;&#xA;The best of which is the [BABE Pallet](https://crates.parity.io/pallet_babe/index.html) which provides three different levels of randomness:&#xD;&#xA;&#xD;&#xA;1. `CurrentBlockRandomness`: Randomness produced semi-freshly with each block, but inherits limitations of RandomnessFromTwoEpochsAgo from which it derives.&#xD;&#xA;&#xD;&#xA;2. `RandomnessFromOneEpochAgo`: Randomness usable by on-chain code that does not depend upon finality and takes action based upon on-chain commitments made during the previous epoch.&#xD;&#xA;&#xD;&#xA;3. `RandomnessFromTwoEpochsAgo`: Randomness usable by consensus protocols that depend upon finality and take action based upon on-chain commitments made during the epoch before the previous epoch. &#xD;&#xA;&#xD;&#xA;If you use the BABE pallet, you can easily integrate randomness into your other pallets by implementing this trait in your Pallet config.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// The module's configuration trait.&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;	/// Something that provides randomness in the runtime.&#xD;&#xA;	type Randomness: Randomness&lt;Self::Hash, Self::BlockNumber&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then you can use this to fetch some randomness easily:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let (hash, block_number) = T::Randomness::random(&amp;b&quot;some_seed_phrase&quot;[..]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Another Pallet which provides this `Randomness` implementation is the [`randomness-colletive-flip` pallet](https://github.com/paritytech/substrate/tree/master/frame/randomness-collective-flip). However, the strength of this randomness is much weaker than the one provided by BABE." ContentLicense="CC BY-SA 4.0" />
  <row Id="1253" PostHistoryTypeId="6" PostId="346" RevisionGUID="6e03eadd-35b1-4ce4-813c-d13834372ca9" CreationDate="2022-02-20T20:18:52.713" UserId="28" Comment="edited tags" Text="|random|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1254" PostHistoryTypeId="2" PostId="354" RevisionGUID="c2cc984e-ce3a-4fe2-a6e0-6f6463a69973" CreationDate="2022-02-20T20:41:49.200" UserId="28" Text="There is a lot of great content here around the networking in Substrate: https://crates.parity.io/sc_network/index.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; ## Discovery mechanisms&#xD;&#xA;&gt;&#xD;&#xA;&gt; In order for our node to join a peer-to-peer network, it has to know a list of nodes that are part of said network. This includes nodes identities and their address (how to reach them). Building such a list is called the discovery mechanism. There are three mechanisms that Substrate uses:&#xD;&#xA;&gt;&#xD;&#xA;&gt;    1. Bootstrap nodes. These are hard-coded node identities and addresses passed alongside with the network configuration.&#xD;&#xA;&gt;    2. mDNS. We perform a UDP broadcast on the local network. Nodes that listen may respond with their identity. More info [here](https://github.com/libp2p/specs/blob/master/discovery/mdns.md). mDNS can be disabled in the network configuration.&#xD;&#xA;&gt;    3. Kademlia random walk. Once connected, we perform random Kademlia FIND_NODE requests on the configured Kademlia DHTs (one per configured chain protocol) in order for nodes to propagate to us their view of the network. More information about Kademlia can be found on [Wikipedia](https://en.wikipedia.org/wiki/Kademlia).&#xD;&#xA;&#xD;&#xA;So really you should start with a bootstrap node, and then the other discovery mechanisms can kick in to help connect you to and diversify your nodes.&#xD;&#xA;&#xD;&#xA;You can specify bootstrap nodes in your chain specification:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;Polkadot&quot;,&#xD;&#xA;  &quot;id&quot;: &quot;polkadot&quot;,&#xD;&#xA;  &quot;chainType&quot;: &quot;Live&quot;,&#xD;&#xA;  &quot;bootNodes&quot;: [&#xD;&#xA;    &quot;/dns/p2p.0.polkadot.network/tcp/30333/p2p/12D3KooWHsvEicXjWWraktbZ4MQBizuyADQtuEGr3NbDvtm5rFA5&quot;,&#xD;&#xA;    &quot;/dns/p2p.1.polkadot.network/tcp/30333/p2p/12D3KooWQz2q2UWVCiy9cFX1hHYEmhSKQB2hjEZCccScHLGUPjcc&quot;,&#xD;&#xA;    &quot;/dns/p2p.2.polkadot.network/tcp/30333/p2p/12D3KooWNHxjYbDLLbDNZ2tq1kXgif5MSiLTUWJKcDdedKu4KaG8&quot;,&#xD;&#xA;    &quot;/dns/p2p.3.polkadot.network/tcp/30333/p2p/12D3KooWGJQysxrQcSvUWWNw88RkqYvJhH3ZcDpWJ8zrXKhLP5Vr&quot;,&#xD;&#xA;    &quot;/dns/p2p.4.polkadot.network/tcp/30333/p2p/12D3KooWKer8bYqpYjwurVABu13mkELpX2X7mSpEicpjShLeg7D6&quot;,&#xD;&#xA;    &quot;/dns/p2p.5.polkadot.network/tcp/30333/p2p/12D3KooWSRjL9LcEQd5u2fQTbyLxTEHq1tUFgQ6amXSp8Eu7TfKP&quot;,&#xD;&#xA;    &quot;/dns/cc1-0.parity.tech/tcp/30333/p2p/12D3KooWSz8r2WyCdsfWHgPyvD8GKQdJ1UAiRmrcrs8sQB3fe2KU&quot;,&#xD;&#xA;    &quot;/dns/cc1-1.parity.tech/tcp/30333/p2p/12D3KooWFN2mhgpkJsDBuNuE5427AcDrsib8EoqGMZmkxWwx3Md4&quot;&#xD;&#xA;  ],&#xD;&#xA;  &quot;telemetryEndpoints&quot;: [&#xD;&#xA;    [&#xD;&#xA;      &quot;wss://telemetry.polkadot.io/submit/&quot;,&#xD;&#xA;      0&#xD;&#xA;    ]&#xD;&#xA;  ],&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or via the command line when starting a node. From `--help`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--bootnodes &lt;ADDR&gt;...                                        &#xD;&#xA;    Specify a list of bootnodes&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1257" PostHistoryTypeId="5" PostId="319" RevisionGUID="0ceecf45-f5cb-40fc-87ac-1c08c492f120" CreationDate="2022-02-20T21:41:58.570" UserId="2" Comment="typos corrected" Text="&gt; When is it permissible to use expect?&#xD;&#xA;&#xD;&#xA;When you can prove that it can not panic. Aka you have done all required checks, like that the data exists or that some kind of arithmetic operation will succeed.&#xD;&#xA;&#xD;&#xA;&gt; What happens when it fails?&#xD;&#xA;&#xD;&#xA;The block producer will throw away the transaction and any modifications to the state that have been done. The problem with this is that you can DoS the block producers for free. You can just send the same tx over and over again, you will not need to pay (because we revert all the state, this includes fee deduction if a tx panics), but the block producer will try to include it." ContentLicense="CC BY-SA 4.0" />
  <row Id="1258" PostHistoryTypeId="24" PostId="319" RevisionGUID="0ceecf45-f5cb-40fc-87ac-1c08c492f120" CreationDate="2022-02-20T21:41:58.570" Comment="Proposed by 2 approved by 104, 73 edit id of 60" ContentLicense="CC BY-SA 4.0" />
  <row Id="1259" PostHistoryTypeId="34" PostId="156" RevisionGUID="7166aba2-0046-4256-8f5e-9c404bcac698" CreationDate="2022-02-20T22:16:33.833" UserId="83" Comment="1" />
  <row Id="1260" PostHistoryTypeId="2" PostId="355" RevisionGUID="f6bcaf70-53e2-4a71-bf1c-549cfae94962" CreationDate="2022-02-20T23:11:17.530" UserId="83" Text="I modified my code in this commit [here][1] to incorporate the following parts from Bruno's answer [here][2]:&#xD;&#xA;&#xD;&#xA;* Initially I adopted Bruno's approach and got it to work in the DataHighway-Parachain codebase using branch &quot;luke/genesis-hardspoon-accounts-backup&quot; [here][3], and followed my [Polkadot-Launch steps here][4]. The only thing different in those steps to run DataHighway-Parachain instead of substrate-parachain-template with Polkadot-Launch is:&#xD;&#xA;* copy with `cp ./target/release/datahighway-collator ~/parachain/polkadot-launch/bin` instead of `cp ./target/release/parachain-collator ~/parachains/polkadot-launch/bin`&#xD;&#xA;* change name of each parachain binary from `&quot;bin&quot;: &quot;./bin/parachain-collator&quot;,` to `&quot;bin&quot;: &quot;./bin/datahighway-collator&quot;,` in the config.json file&#xD;&#xA;* Whilst trying to get it to work in the DataHighway-Parachain codebase I was able to get it to work using the substrate-parachain-template with the changes in this branch &quot;luke/polkadot-v0.9.16/endow&quot; [here][5]&#xD;&#xA;* I used Bruno's approach that used `&amp;include_bytes!` to parse the genesis.json file since I could figure out how to do it using my original approach with `serde_json::from_str`, as although it compiled the balances would not appear in the UI.&#xD;&#xA;* I removed use of decimal values for the balance in the genesis.json file, as I found that if you use a decimal value as the number value (i.e. 1000000000.1) in the genesis.json file, then you'd get an error `trailing characters` when running the collator node with Polkadot-Launch&#xD;&#xA;* I changed the genesis.json data structure so the vector of accounts and balances wasn't stored under the &quot;balances&quot; key. However, I used a string value for the balance instead of a number, because I am using [this script][6] that i created and updated, which generates the genesis.json file based on accounts and balances obtained from a request to the Subscan API, and since some of the balances obtained from the API are rounded and do not have the correct number of decimal places and have different amounts of decimal places, they don't match the chain's tokens decimals, so in that script I included convert.js that adds the necessary number of 0's at the end and removes the decimal point and stores it as a string. For example if an account balance obtained from the Subscan API was `18.400991637728733` (18.4 UNIT, which only has 15 decimal places instead of 18 decimal places that our chain uses) then we would to convert it to `&quot;18400991637728733000&quot;` for the DataHighway-Parachain.&#xD;&#xA;* If i used a number like 51112223330000 instead of a string like &quot;51112223330000&quot; in the JSON file, like Bruno suggested, then that value must include all the token decimal places in that integer value, but the trailing 0's may get accidently cropped from the end of a number like, so I preferred to use a string. In the DataHighway runtime we use a tokenDecimals value of 18, so 60000000000000000000000 in genesis.json appears as 60,000.0000 UNIT in the Polkadot.js Apps Addresses UI, but a value of 40000000000000 appears as 0.0000 UNIT (which could make you think it isn't working when it actually is). Anything less than 100000000000000 (i.e. 99999999999999 and below) does not appear in the UI for the DataHighway-Parachain. So if you have an address that only has the EXISTENTIAL_DEPOSIT of 100000000000 then that may appear as if you have no balance in the UI.&#xD;&#xA;* In addition to endowing the embedded accounts (i.e. `get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),`, etc), I am also endowing accounts using `hex![&quot;&lt;INSERT_PUBLIC_KEY_HEX_WITHOUT_0X_PREFIX&gt;&quot;].into(),` format.&#xD;&#xA;* Since I didn't want to deviate too much from the substrate-node-template or substrate-parachain-template, I used my original approach that didn't require changing the template code from `endowed_accounts: Vec&lt;(AccountId, u128)&gt;,` into `endowed_accounts: Vec&lt;(AccountId)&gt;,`.&#xD;&#xA;* I used `AccountId32` rather than just `AccountId`, although still don't quite understand why sometimes they maybe used interchangeably in some places and it still works.&#xD;&#xA;* I removed use of the `print!` function, since I discovered that if you add a line with the `print!` function https://docs.substrate.io/v3/runtime/debugging/ on the first line of the function `get_endowed_accounts_with_balance()` (or any other line in the function), i.e.&#xD;&#xA;```&#xD;&#xA;use sp_runtime::traits::Printable;&#xD;&#xA;use sp_runtime::print;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;pub fn get_endowed_accounts_with_balance() -&gt; Result&lt;Vec&lt;(AccountId, Balance)&gt;, Error&gt; {&#xD;&#xA;	print!(&quot;hi&quot;);&#xD;&#xA;	...&#xD;&#xA;```&#xD;&#xA;then when you run your collator node with Polkadot-Launch you get an error like `Other: Error parsing spec file: invalid hex character: h, at 0 at line 213 column 256`, which is because for some reason the `print!` function text gets added as the start of the value in the rococo-local.json file that gets generated by Polkadot-Launch:&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;	&quot;paras&quot;: {&#xD;&#xA;	  &quot;paras&quot;: [&#xD;&#xA;	    [&#xD;&#xA;	      2000,&#xD;&#xA;	      {&#xD;&#xA;	        &quot;genesis_head&quot;: &quot;hi0x0000000000000000000000000000000000000000000000000000000000000000002c965766f0bc338fda737ccd2a40934c16247deed5bf574bdd6f72e82dd0284603170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400&quot;,&#xD;&#xA;	        &quot;validation_code&quot;: &quot;hi0x52...&quot;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/5/commits/f4d274ef2b20cb62e43eede8f184d143cfa9f2cd&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/303/83&#xD;&#xA;  [3]: https://github.com/DataHighway-DHX/DataHighway-Parachain/compare/luke/genesis-hardspoon-accounts-backup?expand=1&#xD;&#xA;  [4]: https://gist.github.com/ltfschoen/44db460c02b23aa6562e3567cfac4659&#xD;&#xA;  [5]: https://github.com/substrate-developer-hub/substrate-parachain-template/compare/main...ltfschoen:luke/polkadot-v0.9.16/endow?expand=1&#xD;&#xA;  [6]: https://github.com/DataHighway-DHX/open-polkadot-js-library/pull/6" ContentLicense="CC BY-SA 4.0" />
  <row Id="1263" PostHistoryTypeId="2" PostId="356" RevisionGUID="cc89226e-8516-4b72-993a-e15966f98b9d" CreationDate="2022-02-21T03:33:29.100" UserId="352" Text="Does wasmi only function as an interpreter that changes the rust code to wasm?&#xD;&#xA;&#xD;&#xA;Wasmi is not related to the function of polkadot, such as scale codec(encode, decode extrinsics) or signing and signiture etc..?&#xD;&#xA;&#xD;&#xA;wasmi github : https://github.com/paritytech/wasmi" ContentLicense="CC BY-SA 4.0" />
  <row Id="1265" PostHistoryTypeId="1" PostId="356" RevisionGUID="cc89226e-8516-4b72-993a-e15966f98b9d" CreationDate="2022-02-21T03:33:29.100" UserId="352" Text="Wasmi is not related to the polkadot or substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1266" PostHistoryTypeId="3" PostId="356" RevisionGUID="cc89226e-8516-4b72-993a-e15966f98b9d" CreationDate="2022-02-21T03:33:29.100" UserId="352" Text="|polkadot|wasmi|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1267" PostHistoryTypeId="5" PostId="351" RevisionGUID="c636c757-52ba-4ff1-b3df-68ff5b764acf" CreationDate="2022-02-21T04:26:51.467" UserId="2" Comment="typos corrected" Text="I need to get the system time in my pallet for which I am able to get the epoch format like 1590512778000. Now I need to convert this time to the date-time.&#xD;&#xA;I tried many ways but none worked.&#xD;&#xA;Can you please suggest any way to do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1268" PostHistoryTypeId="4" PostId="351" RevisionGUID="c636c757-52ba-4ff1-b3df-68ff5b764acf" CreationDate="2022-02-21T04:26:51.467" UserId="2" Comment="typos corrected" Text="How can we convert the timestamp to the date/time in Substrate pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1269" PostHistoryTypeId="24" PostId="351" RevisionGUID="c636c757-52ba-4ff1-b3df-68ff5b764acf" CreationDate="2022-02-21T04:26:51.467" Comment="Proposed by 2 approved by 104, 377 edit id of 61" ContentLicense="CC BY-SA 4.0" />
  <row Id="1270" PostHistoryTypeId="2" PostId="357" RevisionGUID="f6d1ff46-37a8-4fcf-bd71-27b105638eba" CreationDate="2022-02-21T04:58:31.387" UserId="28" Text="`wasmi` is a Wasm executor that uses [interpretation](https://en.wikipedia.org/wiki/Interpreter_(computing)) rather than compilation.&#xD;&#xA;&#xD;&#xA;Whenever the node software needs to execute some Wasm binary, it needs to use a Wasm executor like `wasmi` or [`wasmtime`](https://github.com/bytecodealliance/wasmtime). This can be the Wasm runtime, Wasm smart contracts, or any other Wasm you can think of for your blockchain node (like an offchain worker or in the future [SPREE](https://wiki.polkadot.network/docs/learn-spree)).&#xD;&#xA;&#xD;&#xA;&gt; Does wasmi only function as an interpreter that changes the rust code to wasm?&#xD;&#xA;&#xD;&#xA;No. By the time you use `wasmi`, it you already have a compiled WebAssembly blob, so `wasmi` does not see Rust at all. It simply changes Wasm into actual machine code.&#xD;&#xA;&#xD;&#xA;&gt; Wasmi is not related to the function of Polkadot, such as scale codec (encode, decode extrinsics) or signing and signature etc..?&#xD;&#xA;&#xD;&#xA;The Wasm executor is obviously an important part of Substrate and Polkadot, but no, it is not directly related to things like SCALE codec, signing, or anything like that. The project is built independent of a specific blockchain purpose, and is simply a general Wasm executor. You could include this into other projects like a web browser if you wanted." ContentLicense="CC BY-SA 4.0" />
  <row Id="1272" PostHistoryTypeId="5" PostId="356" RevisionGUID="7f9b3054-74c2-4398-abcc-4755c60088bb" CreationDate="2022-02-21T04:58:55.113" UserId="28" Comment="edited body" Text="Does wasmi only function as an interpreter that changes the rust code to wasm?&#xD;&#xA;&#xD;&#xA;Wasmi is not related to the function of Polkadot, such as scale codec(encode, decode extrinsics) or signing and signature etc..?&#xD;&#xA;&#xD;&#xA;wasmi github : https://github.com/paritytech/wasmi" ContentLicense="CC BY-SA 4.0" />
  <row Id="1273" PostHistoryTypeId="2" PostId="358" RevisionGUID="a86c316e-c612-4693-a3cd-795cba7e26d6" CreationDate="2022-02-21T05:32:15.547" UserId="28" Text="This error usually occurs when you have forgotten to enable the `runtime-benchmarks` feature flag for dependent crates.&#xD;&#xA;&#xD;&#xA;Inside of `pallet-collective` this trait is implemented, but is hidden behind a feature flag:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;fn successful_origin() -&gt; O {&#xD;&#xA;	let zero_account_id =&#xD;&#xA;		AccountId::decode(&amp;mut sp_runtime::traits::TrailingZeroInput::zeroes())&#xD;&#xA;			.expect(&quot;infinite length input; no invalid inputs for type; qed&quot;);&#xD;&#xA;	O::from(RawOrigin::Member(zero_account_id))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To get this code active, this crate needs to enable the `runtime-benchmarks` feature flag.&#xD;&#xA;&#xD;&#xA;For example, if you are writing your runtime library, you will need to include your pallet like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pallet-collective = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For all of these dependencies, you need to make sure to enable the feature flags for the downstream crates. For example:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;frame-collective/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-collective/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1275" PostHistoryTypeId="2" PostId="359" RevisionGUID="b9fbe994-7e07-4221-b4b0-48e6d804b683" CreationDate="2022-02-21T06:53:49.360" UserId="129" Text="I followed the [Cumulus tutorials][1] and registered a parathread in Rococo chain but my chain doesn't produce any block. As far as I know, parathread functions the same as a parachain you have to bid for the right to write to a block for every block. Am I missing something?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/rococo/" ContentLicense="CC BY-SA 4.0" />
  <row Id="1277" PostHistoryTypeId="1" PostId="359" RevisionGUID="b9fbe994-7e07-4221-b4b0-48e6d804b683" CreationDate="2022-02-21T06:53:49.360" UserId="129" Text="Can parathread produce blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1278" PostHistoryTypeId="3" PostId="359" RevisionGUID="b9fbe994-7e07-4221-b4b0-48e6d804b683" CreationDate="2022-02-21T06:53:49.360" UserId="129" Text="|parachain|rococo|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1279" PostHistoryTypeId="2" PostId="360" RevisionGUID="bc1fc190-8fbc-4eac-9111-bab2a605851d" CreationDate="2022-02-21T07:06:16.580" UserId="83" Text="I use the approach shown below in the example function `convert_moment_to_u64_in_milliseconds` to perform conversions in a pallet from the system time of `Moment` type into its corresponding Unix epoch timestamp format like 1590512778000 of type `u64`.&#xD;&#xA;&#xD;&#xA;I then use the [Chrono][1] library as shown below in the example function `convert_u64_in_milliseconds_to_date` to convert this Unix epoch timestamp to a date-time format of type `Date`, which is an `i64`. Note that it may be more seamless to have a function `convert_moment_to_i64_in_milliseconds` that converts directly from `Moment` into `i64`.&#xD;&#xA;&#xD;&#xA;I do this in the off-chain workers (OCW) function `offchain_worker` where I throttle fetching data from an API endpoint that contains a Unix epoch timestamp values rather than their equivalent block number.&#xD;&#xA;In OCW you only have read-access to the block state but cannot perform any on-chain state changes since whilst alterations are not forbidden, they are not persisted after the worker has finished. So I use OCW to perform such long-running tasks like asynchronous API requests and computations, including converting the `u64` Unix epoch timestamp values that I receive from an API into the `Date` type, and then I send unsigned transactions from OCW so validators may generate transactions that feed my results on-chain. I then retrieve the results that they fed into the on-chain state using the `on_initialize` or `on_finalize` function and there I perform further on-chain state altering changes since those functions have both read-access and write-access to the block state.&#xD;&#xA;&#xD;&#xA;To add the Chrono dependency in Cargo.toml of a pallet where I want to use it:&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;chrono = { version = '0.4.19', default_features = false }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = ['std']&#xD;&#xA;std = [&#xD;&#xA;    'chrono/std',&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To import it into the lib.rs file of that pallet:&#xD;&#xA;```&#xD;&#xA;use chrono::{&#xD;&#xA;    NaiveDateTime,&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To store the date in storage I use:&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn my_date)]&#xD;&#xA;pub(super) type MyDate&lt;T: Config&gt; = StorageValue&lt;_, Date;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To get the `T::Moment` of the current timestamp:&#xD;&#xA;```&#xD;&#xA;let timestamp: &lt;T as pallet_timestamp::Config&gt;::Moment = &lt;pallet_timestamp::Pallet&lt;T&gt;&gt;::get();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To convert the `T::Moment` into a `u64` Unix epoch timestamp:&#xD;&#xA;```&#xD;&#xA;// Private functions&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    fn convert_moment_to_u64_in_milliseconds(date: T::Moment) -&gt; Result&lt;u64, DispatchError&gt; {&#xD;&#xA;        let date_as_u64_millis;&#xD;&#xA;        if let Some(_date_as_u64) = TryInto::&lt;u64&gt;::try_into(date).ok() {&#xD;&#xA;            date_as_u64_millis = _date_as_u64;&#xD;&#xA;        } else {&#xD;&#xA;            return Err(DispatchError::Other(&quot;Unable to convert Moment to i64 for date&quot;));&#xD;&#xA;        }&#xD;&#xA;        return Ok(date_as_u64_millis);&#xD;&#xA;    }&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To convert from `u64` Unix epoch timestamp in milliseconds into the `Date` type:&#xD;&#xA;```&#xD;&#xA;// Private functions&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    fn convert_u64_in_milliseconds_to_date(date_as_u64_millis: u64) -&gt; Result&lt;Date, DispatchError&gt; {&#xD;&#xA;        let date_as_u64_secs = date_as_u64_millis.clone() / 1000u64;&#xD;&#xA;        // https://docs.rs/chrono/0.4.6/chrono/naive/struct.NaiveDateTime.html#method.from_timestamp&#xD;&#xA;        let date = NaiveDateTime::from_timestamp(i64::try_from(date_as_u64_secs).unwrap(), 0).date();&#xD;&#xA;        // To get the start of the given date use `date.and_hms(0, 0, 0).timestamp() * 1000`&#xD;&#xA;        let date_millis = date.timestamp() * 1000;&#xD;&#xA;        return Ok(date_millis);&#xD;&#xA;    }&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;An additional function may be necessary to convert the Unix epoch timestamp from `i64` in milliseconds (rather than `u64`) into the `Date` type.&#xD;&#xA;&#xD;&#xA;The `on_initialize`, `on_finalize`, and `offchain_worker` functions have a `block_number` argument. When the value of `block_number` is 1 the corresponding timestamp value is still 0, which corresponds to 1970-01-01.&#xD;&#xA;In a pallet you may also obtain the current block with `let current_block = &lt;system::Pallet&lt;T&gt;&gt;::block_number();`.&#xD;&#xA;&#xD;&#xA;Note that I use [this resource][2] to convert between Unix epoch timestamp and a human-readable date.&#xD;&#xA;&#xD;&#xA;In your tests you may set the timestamp that you want with the following, where 1590512778000 is the Unix epoch timestamp in milliseconds `Timestamp::set_timestamp(1590512778000u64);` that corresponds to Tuesday, 26 May 2020 17:06:18 (GMT), and you may set the current block number with `MyTestModule::on_initialize(1);`.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/chrono/0.4.19/chrono/index.html&#xD;&#xA;  [2]: https://www.epochconverter.com/" ContentLicense="CC BY-SA 4.0" />
  <row Id="1281" PostHistoryTypeId="5" PostId="360" RevisionGUID="73a4c3d8-51e3-47da-ba22-92f3e67a8265" CreationDate="2022-02-21T07:13:50.533" UserId="83" Comment="fix spelling and grammar" Text="I use the approach shown below in the example function `convert_moment_to_u64_in_milliseconds`, where I perform conversions in a pallet from the system time of `Moment` type into its corresponding Unix epoch timestamp format like 1590512778000 of type `u64`.&#xD;&#xA;&#xD;&#xA;I then use the [Chrono][1] library as shown below in the example function `convert_u64_in_milliseconds_to_date` to convert this Unix epoch timestamp to a date-time format of type `Date`, which is an `i64`. Note that it may be more seamless to have a function `convert_moment_to_i64_in_milliseconds` that converts directly from `Moment` into `i64`.&#xD;&#xA;&#xD;&#xA;I do this in the off-chain workers (OCW) function `offchain_worker` where I throttle fetching data from an API endpoint that contains Unix epoch timestamp values rather than their equivalent block number.&#xD;&#xA;In OCW you only have read-access to the block state but cannot perform any on-chain state changes since whilst alterations are not forbidden, they are not persisted after the worker has finished.&#xD;&#xA;So I use OCW to perform such long-running tasks like asynchronous API requests and computations, including converting the `u64` Unix epoch timestamp values that I receive from an API into the `Date` type.&#xD;&#xA;I then send unsigned transactions from OCW so validators may generate transactions that feed my results on-chain.&#xD;&#xA;I then retrieve the results that they fed into the on-chain state using the `on_initialize` or `on_finalize` function and there I perform further on-chain state altering changes since those functions have both read-access and write-access to the block state.&#xD;&#xA;&#xD;&#xA;To add the Chrono dependency in Cargo.toml of a pallet where I want to use it:&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;chrono = { version = '0.4.19', default_features = false }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = ['std']&#xD;&#xA;std = [&#xD;&#xA;    'chrono/std',&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To import it into the lib.rs file of that pallet:&#xD;&#xA;```&#xD;&#xA;use chrono::{&#xD;&#xA;    NaiveDateTime,&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To store the date in storage I use:&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn my_date)]&#xD;&#xA;pub(super) type MyDate&lt;T: Config&gt; = StorageValue&lt;_, Date;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To get the `T::Moment` of the current timestamp:&#xD;&#xA;```&#xD;&#xA;let timestamp: &lt;T as pallet_timestamp::Config&gt;::Moment = &lt;pallet_timestamp::Pallet&lt;T&gt;&gt;::get();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To convert the `T::Moment` into a `u64` Unix epoch timestamp:&#xD;&#xA;```&#xD;&#xA;// Private functions&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    fn convert_moment_to_u64_in_milliseconds(date: T::Moment) -&gt; Result&lt;u64, DispatchError&gt; {&#xD;&#xA;        let date_as_u64_millis;&#xD;&#xA;        if let Some(_date_as_u64) = TryInto::&lt;u64&gt;::try_into(date).ok() {&#xD;&#xA;            date_as_u64_millis = _date_as_u64;&#xD;&#xA;        } else {&#xD;&#xA;            return Err(DispatchError::Other(&quot;Unable to convert Moment to i64 for date&quot;));&#xD;&#xA;        }&#xD;&#xA;        return Ok(date_as_u64_millis);&#xD;&#xA;    }&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To convert from `u64` Unix epoch timestamp in milliseconds into the `Date` type:&#xD;&#xA;```&#xD;&#xA;// Private functions&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    fn convert_u64_in_milliseconds_to_date(date_as_u64_millis: u64) -&gt; Result&lt;Date, DispatchError&gt; {&#xD;&#xA;        let date_as_u64_secs = date_as_u64_millis.clone() / 1000u64;&#xD;&#xA;        // https://docs.rs/chrono/0.4.6/chrono/naive/struct.NaiveDateTime.html#method.from_timestamp&#xD;&#xA;        let date = NaiveDateTime::from_timestamp(i64::try_from(date_as_u64_secs).unwrap(), 0).date();&#xD;&#xA;        // To get the 'start' of the given date use `date.and_hms(0, 0, 0).timestamp() * 1000`&#xD;&#xA;        let date_millis = date.timestamp() * 1000;&#xD;&#xA;        return Ok(date_millis);&#xD;&#xA;    }&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;An additional function may be necessary to convert the Unix epoch timestamp from `i64` in milliseconds (rather than `u64`) into the `Date` type.&#xD;&#xA;&#xD;&#xA;The `on_initialize`, `on_finalize`, and `offchain_worker` functions have a `block_number` argument. It is worth noting that when the value of `block_number` is 1 the corresponding timestamp value is still 0, which corresponds to 1970-01-01. &#xD;&#xA;In a pallet you may also obtain the current block with `let current_block = &lt;system::Pallet&lt;T&gt;&gt;::block_number();`.&#xD;&#xA;&#xD;&#xA;Note that I use [this resource][2] to convert between Unix epoch timestamp and a human-readable date.&#xD;&#xA;&#xD;&#xA;In your tests you may set the timestamp that you want with `Timestamp::set_timestamp(1590512778000u64);`, which corresponds to Tuesday, 26 May 2020 17:06:18 (GMT), where 1590512778000 is the Unix epoch timestamp in milliseconds, and you may set the current block number with `MyTestModule::on_initialize(1);`.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/chrono/0.4.19/chrono/index.html&#xD;&#xA;  [2]: https://www.epochconverter.com/" ContentLicense="CC BY-SA 4.0" />
  <row Id="1282" PostHistoryTypeId="5" PostId="360" RevisionGUID="e959912c-ee07-40a5-8eb7-509224c4e500" CreationDate="2022-02-21T07:44:30.963" UserId="83" Comment="fix typo" Text="I use the approach shown below in the example function `convert_moment_to_u64_in_milliseconds`, where I perform conversions in a pallet from the system time of `Moment` type into its corresponding Unix epoch timestamp format like 1590512778000 of type `u64`.&#xD;&#xA;&#xD;&#xA;I then use the [Chrono][1] library as shown below in the example function `convert_u64_in_milliseconds_to_date` to convert this Unix epoch timestamp to a date-time format of type `Date`, which is an `i64`. Note that it may be more seamless to have a function `convert_moment_to_i64_in_milliseconds` that converts directly from `Moment` into `i64`.&#xD;&#xA;&#xD;&#xA;I do this in the off-chain workers (OCW) function `offchain_worker` where I throttle fetching data from an API endpoint that contains Unix epoch timestamp values rather than their equivalent block number.&#xD;&#xA;In OCW you only have read-access to the block state but cannot perform any on-chain state changes since whilst alterations are not forbidden, they are not persisted after the worker has finished.&#xD;&#xA;So I use OCW to perform such long-running tasks like asynchronous API requests and computations, including converting the `u64` Unix epoch timestamp values that I receive from an API into the `Date` type.&#xD;&#xA;I then send unsigned transactions from OCW so validators may generate transactions that feed my results on-chain.&#xD;&#xA;I then retrieve the results that they fed into the on-chain state using the `on_initialize` or `on_finalize` function and there I perform further on-chain state altering changes (only where necessary so as not to bloat on-chain storage) since those functions have both read-access and write-access to the block state.&#xD;&#xA;&#xD;&#xA;To add the Chrono dependency in Cargo.toml of a pallet where I want to use it:&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;chrono = { version = '0.4.19', default_features = false }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = ['std']&#xD;&#xA;std = [&#xD;&#xA;    'chrono/std',&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To import it into the lib.rs file of that pallet:&#xD;&#xA;```&#xD;&#xA;use chrono::{&#xD;&#xA;    NaiveDateTime,&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To store the date in storage I use:&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn my_date)]&#xD;&#xA;pub(super) type MyDate&lt;T: Config&gt; = StorageValue&lt;_, Date;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To get the `T::Moment` of the current timestamp:&#xD;&#xA;```&#xD;&#xA;let timestamp: &lt;T as pallet_timestamp::Config&gt;::Moment = &lt;pallet_timestamp::Pallet&lt;T&gt;&gt;::get();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To convert the `T::Moment` into a `u64` Unix epoch timestamp:&#xD;&#xA;```&#xD;&#xA;// Private functions&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    fn convert_moment_to_u64_in_milliseconds(date: T::Moment) -&gt; Result&lt;u64, DispatchError&gt; {&#xD;&#xA;        let date_as_u64_millis;&#xD;&#xA;        if let Some(_date_as_u64) = TryInto::&lt;u64&gt;::try_into(date).ok() {&#xD;&#xA;            date_as_u64_millis = _date_as_u64;&#xD;&#xA;        } else {&#xD;&#xA;            return Err(DispatchError::Other(&quot;Unable to convert Moment to i64 for date&quot;));&#xD;&#xA;        }&#xD;&#xA;        return Ok(date_as_u64_millis);&#xD;&#xA;    }&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To convert from `u64` Unix epoch timestamp in milliseconds into the `Date` type:&#xD;&#xA;```&#xD;&#xA;// Private functions&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    fn convert_u64_in_milliseconds_to_date(date_as_u64_millis: u64) -&gt; Result&lt;Date, DispatchError&gt; {&#xD;&#xA;        let date_as_u64_secs = date_as_u64_millis.clone() / 1000u64;&#xD;&#xA;        // https://docs.rs/chrono/0.4.6/chrono/naive/struct.NaiveDateTime.html#method.from_timestamp&#xD;&#xA;        let date = NaiveDateTime::from_timestamp(i64::try_from(date_as_u64_secs).unwrap(), 0).date();&#xD;&#xA;        // To get the 'start' of the given date use `date.and_hms(0, 0, 0).timestamp() * 1000`&#xD;&#xA;        let date_millis = date.timestamp() * 1000;&#xD;&#xA;        return Ok(date_millis);&#xD;&#xA;    }&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To determine the amount of days between the two dates (such as between the date you made an API request and the current system time) you may just find the difference between the Unix epoch timestamp values:&#xD;&#xA;```&#xD;&#xA;if let Some(_period_millis) = current_date_millis.checked_sub(requested_date_millis) {&#xD;&#xA;   ...&#xD;&#xA;&#xD;&#xA;   let mut period_millis_u64 = 0u64; // initialize&#xD;&#xA;   if let Some(_period_millis_u64) = TryInto::&lt;u64&gt;::try_into(_period_millis).ok() {&#xD;&#xA;       period_millis_u64 = _period_millis_u64;&#xD;&#xA;   } else {&#xD;&#xA;       return Err(DispatchError::Other(&quot;Unable to convert i32 to u64 for period_millis&quot;));&#xD;&#xA;   }&#xD;&#xA;   ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And if you've stored a period measured in days on-chain as a `u64` in storage value `PeriodDays` and you want to convert that to its Unix epoch timestamp, you could try:&#xD;&#xA;```&#xD;&#xA;let millis_per_day = 86400000u64; // milliseconds per day&#xD;&#xA;let mut period_days = 0u64; // initialize&#xD;&#xA;if let Some(_period_days) = &lt;PeriodDays&lt;T&gt;&gt;::get() {&#xD;&#xA;    period_days = _period_days;&#xD;&#xA;} else {&#xD;&#xA;    return Err(DispatchError::Other(&quot;Unable to get period_days&quot;));;&#xD;&#xA;}&#xD;&#xA;let mut period_millis = 0u64; // initialize&#xD;&#xA;if let Some(_period_millis) = period_days.checked_mul(millis_per_day) {&#xD;&#xA;  period_millis = _period_millis;&#xD;&#xA;} else {&#xD;&#xA;    return Err(DispatchError::Other(&quot;Unable to multiply to determine period_millis&quot;));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;An additional function may be necessary to convert the Unix epoch timestamp from `i64` in milliseconds (rather than `u64`) into the `Date` type.&#xD;&#xA;&#xD;&#xA;The `on_initialize`, `on_finalize`, and `offchain_worker` functions have a `block_number` argument. It is worth noting that when the value of `block_number` is 1 the corresponding timestamp value is still 0, which corresponds to 1970-01-01. &#xD;&#xA;In a pallet you may also obtain the current block with `let current_block = &lt;system::Pallet&lt;T&gt;&gt;::block_number();`.&#xD;&#xA;&#xD;&#xA;Note that I use [this resource][2] to convert between Unix epoch timestamp and a human-readable date.&#xD;&#xA;&#xD;&#xA;In your tests you may set the timestamp that you want with `Timestamp::set_timestamp(1590512778000u64);`, which corresponds to Tuesday, 26 May 2020 17:06:18 (GMT), where 1590512778000 is the Unix epoch timestamp in milliseconds, and you may set the current block number with `MyTestModule::on_initialize(1);`.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/chrono/0.4.19/chrono/index.html&#xD;&#xA;  [2]: https://www.epochconverter.com/" ContentLicense="CC BY-SA 4.0" />
  <row Id="1283" PostHistoryTypeId="2" PostId="361" RevisionGUID="544186bd-2229-44d7-bd61-e4f4c148e501" CreationDate="2022-02-21T08:08:22.693" UserId="28" Text="The Parathreads protocol is still under development. So no, currently parathreads do not create blocks, but this is on the immediate roadmap, and when it happens, there will be some economics around when a parathread will be able to produce a block, for example, bidding higher than other parathreads using the DOT token to produce a block at a certain point in time." ContentLicense="CC BY-SA 4.0" />
  <row Id="1285" PostHistoryTypeId="2" PostId="362" RevisionGUID="1b424fac-549c-4af8-a7b1-a737cee77454" CreationDate="2022-02-21T08:26:56.753" UserId="442" Text="OCW cannot be triggered manually, but you can write Storage and Off-Chain Sotrage (via Off-Chain Indexing) in transactions, then read `Storage`s in `Hooks::offchain_worker`." ContentLicense="CC BY-SA 4.0" />
  <row Id="1287" PostHistoryTypeId="2" PostId="363" RevisionGUID="2afc74e2-53de-41e9-81b3-221db50cad15" CreationDate="2022-02-21T08:31:58.930" UserId="442" Text="Write benchmarks and do benchmarks, see https://docs.substrate.io/v3/runtime/benchmarking/ .&#xD;&#xA;&#xD;&#xA;The following commands will do benchmarks in specified pallet and generate `weights.rs`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node benchmark \&#xD;&#xA;--chain=dev \&#xD;&#xA;--execution=wasm \&#xD;&#xA;--wasm-execution=compiled \&#xD;&#xA;--pallet=&quot;pallet_${pallet}&quot; \&#xD;&#xA;--extrinsic='*' \&#xD;&#xA;--steps=$steps \&#xD;&#xA;--repeat=$repeat \&#xD;&#xA;--template=&quot;./.maintain/frame-weight-template.hbs&quot; \&#xD;&#xA;--output=&quot;./pallets/${pallet}/src/weights.rs&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1289" PostHistoryTypeId="2" PostId="364" RevisionGUID="4228da43-edb2-444f-9769-5586db3024fb" CreationDate="2022-02-21T08:37:16.037" UserId="442" Text="Extrinsic marked as `#[transactional]` will get discarded if it returns `Err`.&#xD;&#xA;&#xD;&#xA;But there's some issues about `transactional` annotation, see [paritytech/substrate#10806][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/10806" ContentLicense="CC BY-SA 4.0" />
  <row Id="1291" PostHistoryTypeId="2" PostId="365" RevisionGUID="210b8279-e90d-4cb8-9e88-9409ae309e28" CreationDate="2022-02-21T08:40:01.827" UserId="442" Text="With metadata V14, PolkadotJS does not support units. see [polkadot-js/apps#6347][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/issues/6347" ContentLicense="CC BY-SA 4.0" />
  <row Id="1293" PostHistoryTypeId="2" PostId="366" RevisionGUID="3ca67392-bb69-45f4-9df2-6ae5507e37fa" CreationDate="2022-02-21T09:48:18.827" UserId="443" Text="I'm facing some strange logs when doing a runtime upgrade a Polkadot `rococo-local` relay chain to `0.9.16` from `0.9.15`. Hoping someone can help me debug them.&#xD;&#xA;&#xD;&#xA;Using Polkadot's `release-v0.9.15` and `release-v0.9.16` branches to build the binary and wasm.&#xD;&#xA;&#xD;&#xA;My machine is: &#xD;&#xA;`Ubuntu 20.04 LTS`. &#xD;&#xA;&#xD;&#xA;My rustup version is:&#xD;&#xA;```&#xD;&#xA;1.57.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.57.0 (f1edd0429 2021-11-29)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The logs:&#xD;&#xA;```&#xD;&#xA;Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215]    &#xD;&#xA;2022-02-21 11:33:21  Idle (3 peers), best: #56 (0x2b75…08af), finalized #34 (0x6f38…7c18), ⬇ 177.6kiB/s ⬆ 0.9kiB/s    &#xD;&#xA;2022-02-21 11:33:24 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:24 Running migration to v1 for session_historical with storage version StorageVersion(1)    &#xD;&#xA;2022-02-21 11:33:24 Attempted to apply migration to v1 but failed because storage version is StorageVersion(1)    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for System    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Babe    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Timestamp    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Indices    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Balances    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for TransactionPayment    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Authorship    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Offences    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Historical    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Session    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Grandpa    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ImOnline    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for AuthorityDiscovery    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParachainsOrigin    &#xD;&#xA;2022-02-21 11:33:24 ⚠️ Configuration declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(2)`    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParasShared    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParaInclusion    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParaInherent    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParaScheduler    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Paras    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Initializer    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Dmp    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Ump    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Hrmp    &#xD;&#xA;2022-02-21 11:33:24 ⚠️ ParaSessionInfo declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(1)`    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParasDisputes    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Registrar    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Auctions    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Crowdloan    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Slots    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParasSudoWrapper    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for AssignedSlots    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Sudo    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Mmr    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Beefy    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for MmrLeaf    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ValidatorManager    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeRococoGrandpa    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeWococoGrandpa    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeRococoMessages    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeWococoMessages    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeRococoMessagesDispatch    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeWococoMessagesDispatch    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Collective    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Membership    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Utility    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Proxy    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Multisig    &#xD;&#xA;2022-02-21 11:33:24 ⚠️ XcmPallet declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My `polkadot-launch` setup is the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;	&quot;relaychain&quot;: {&#xD;&#xA;		&quot;bin&quot;: &quot;polkadot915&quot;,&#xD;&#xA;		&quot;chain&quot;: &quot;rococo-local&quot;,&#xD;&#xA;		&quot;nodes&quot;: [&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9944,&#xD;&#xA;				&quot;port&quot;: 30444,&#xD;&#xA;				&quot;basePath&quot;: &quot;validator1&quot;,&#xD;&#xA;				&quot;flags&quot;: [&#xD;&#xA;					&quot;--rpc-cors=all&quot;,&#xD;&#xA;					&quot;--execution=wasm&quot;,&#xD;&#xA;					&quot;--wasm-execution=compiled&quot;&#xD;&#xA;				]&#xD;&#xA;			},&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9955,&#xD;&#xA;				&quot;port&quot;: 30555,&#xD;&#xA;				&quot;basePath&quot;: &quot;validator2&quot;,&#xD;&#xA;				&quot;flags&quot;: [&#xD;&#xA;					&quot;--rpc-cors=all&quot;,&#xD;&#xA;					&quot;--execution=wasm&quot;,&#xD;&#xA;					&quot;--wasm-execution=compiled&quot;&#xD;&#xA;				]&#xD;&#xA;			},&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9966,&#xD;&#xA;				&quot;port&quot;: 30666,&#xD;&#xA;				&quot;basePath&quot;: &quot;validator3&quot;,&#xD;&#xA;				&quot;flags&quot;: [&#xD;&#xA;					&quot;--rpc-cors=all&quot;,&#xD;&#xA;					&quot;--execution=wasm&quot;,&#xD;&#xA;					&quot;--wasm-execution=compiled&quot;&#xD;&#xA;				]&#xD;&#xA;			}&#xD;&#xA;		],&#xD;&#xA;		&quot;genesis&quot;: {&#xD;&#xA;			&quot;runtime&quot;: {&#xD;&#xA;				&quot;runtime_genesis_config&quot;: {&#xD;&#xA;					&quot;configuration&quot;: {&#xD;&#xA;						&quot;config&quot;: {&#xD;&#xA;							&quot;validation_upgrade_frequency&quot;: 10,&#xD;&#xA;							&quot;validation_upgrade_delay&quot;: 10&#xD;&#xA;						}&#xD;&#xA;					}&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	},&#xD;&#xA;	&quot;parachains&quot;: [&#xD;&#xA;		{&#xD;&#xA;			&quot;bin&quot;: &quot;polkadot-collator915&quot;,&#xD;&#xA;			&quot;chain&quot;: &quot;statemine-dev&quot;,&#xD;&#xA;			&quot;nodes&quot;: [&#xD;&#xA;				{&#xD;&#xA;					&quot;wsPort&quot;: 9801,&#xD;&#xA;					&quot;port&quot;: 31201,&#xD;&#xA;					&quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;					&quot;flags&quot;: [&#xD;&#xA;						&quot;--rpc-cors=all&quot;,&#xD;&#xA;						&quot;--rpc-port=9971&quot;,&#xD;&#xA;						&quot;--execution=wasm&quot;,&#xD;&#xA;						&quot;-lcumulus-collator=trace,cumulus-network=trace,cumulus-consensus=trace&quot;,&#xD;&#xA;						&quot;--wasm-execution=compiled&quot;&#xD;&#xA;					]&#xD;&#xA;				}&#xD;&#xA;			]&#xD;&#xA;		}&#xD;&#xA;	],&#xD;&#xA;	&quot;hrmpChannels&quot;: [&#xD;&#xA;	],&#xD;&#xA;	&quot;types&quot;: {},&#xD;&#xA;	&quot;finalization&quot;: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;First I do the client update from `polkadot915` to `polkadot916` without a prbolem. &#xD;&#xA;Then the runtime upgrade produces the logs. It doesn't stall the network outright but degrades the performance significantly. What could be the reason for such `Corrupted state at...` ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1295" PostHistoryTypeId="1" PostId="366" RevisionGUID="3ca67392-bb69-45f4-9df2-6ae5507e37fa" CreationDate="2022-02-21T09:48:18.827" UserId="443" Text="`Corrupted state at` after runtime upgrade to `0.9.16` on `rococo-local` chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="1296" PostHistoryTypeId="3" PostId="366" RevisionGUID="3ca67392-bb69-45f4-9df2-6ae5507e37fa" CreationDate="2022-02-21T09:48:18.827" UserId="443" Text="|polkadot|runtime|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1297" PostHistoryTypeId="2" PostId="367" RevisionGUID="b3a92746-3fea-4cfa-a339-55665a9dbbc2" CreationDate="2022-02-21T09:54:06.280" UserId="352" Text="    use std::any::Any;&#xD;&#xA;    use std::io;&#xD;&#xA;    use subxt::*;&#xD;&#xA;    use subxt::{ClientBuilder,DefaultConfig, DefaultExtra};&#xD;&#xA;    use subxt::codec::Decode;&#xD;&#xA;    use crate::sp_runtime::OpaqueExtrinsic;&#xD;&#xA;    use sp_runtime::{&#xD;&#xA;        generic::{&#xD;&#xA;            UncheckedExtrinsic&#xD;&#xA;        },&#xD;&#xA;        MultiSignature,&#xD;&#xA;        AnySignature&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #[subxt::subxt(runtime_metadata_path = &quot;src/polkadot_metadata.scale&quot;)]&#xD;&#xA;    pub mod polkadot {}&#xD;&#xA;    &#xD;&#xA;    type Address = u64;&#xD;&#xA;    type Call = Vec&lt;u8&gt;;&#xD;&#xA;    type Signature = AnySignature;&#xD;&#xA;    type Extra = DefaultExtra&lt;DefaultConfig&gt;;&#xD;&#xA;    type UnEx = UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;;&#xD;&#xA;    &#xD;&#xA;    fn main(){&#xD;&#xA;            let mut input1 = &quot;0x280402000be1da78d37e01&quot;.as_bytes(); //get from json-rpc (polkadot node!)&#xD;&#xA;            let mut input2 = &quot;280402000be1da78d37e01&quot;.as_bytes();&#xD;&#xA;            println!(&quot;input1  = {:?}&quot;, input1);&#xD;&#xA;            println!(&quot;input2  = {:?}&quot;, input2);&#xD;&#xA;            let uncheck_extrinsic = UnEx::decode(&amp;mut input2);&#xD;&#xA;            println!(&quot;block extrinsics = {:?}&quot;, uncheck_extrinsic);  // Got  `Invalid transaction version` error&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The reason I get input manually is **because I use a separate polkadot node**.&#xD;&#xA;&#xD;&#xA;Now, if input1 or input2 is put as an input value, the following error occurs.&#xD;&#xA;&#xD;&#xA;    Err(Error { cause: None, desc: &quot;Invalid transaction version&quot; })&#xD;&#xA;&#xD;&#xA;What else should I do?&#xD;&#xA;&#xD;&#xA;Is this the right way to approach it?&#xD;&#xA;&#xD;&#xA;I'm not going to use polkadot-js :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1299" PostHistoryTypeId="1" PostId="367" RevisionGUID="b3a92746-3fea-4cfa-a339-55665a9dbbc2" CreationDate="2022-02-21T09:54:06.280" UserId="352" Text="I'm decoding extrinsics. Please check if my code is right" ContentLicense="CC BY-SA 4.0" />
  <row Id="1300" PostHistoryTypeId="3" PostId="367" RevisionGUID="b3a92746-3fea-4cfa-a339-55665a9dbbc2" CreationDate="2022-02-21T09:54:06.280" UserId="352" Text="|polkadot|extrinsic|json-rpc|scale-codec|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1301" PostHistoryTypeId="2" PostId="368" RevisionGUID="f399a6e2-395c-43d8-bed0-158b19f51877" CreationDate="2022-02-21T09:58:52.893" UserId="143" Text="substrate node template comes up with POA by default, i am trying to change this consensus engine to Proof of stake , so far i have just chnaged aura to babe, how i can achieve changing consensus to POS ??" ContentLicense="CC BY-SA 4.0" />
  <row Id="1303" PostHistoryTypeId="1" PostId="368" RevisionGUID="f399a6e2-395c-43d8-bed0-158b19f51877" CreationDate="2022-02-21T09:58:52.893" UserId="143" Text="how to change consensus engine from POA to POS" ContentLicense="CC BY-SA 4.0" />
  <row Id="1304" PostHistoryTypeId="3" PostId="368" RevisionGUID="f399a6e2-395c-43d8-bed0-158b19f51877" CreationDate="2022-02-21T09:58:52.893" UserId="143" Text="|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1305" PostHistoryTypeId="5" PostId="366" RevisionGUID="5c16fbf9-92ec-4539-96c3-32d71a170460" CreationDate="2022-02-21T10:06:50.847" UserId="443" Comment="deleted 28 characters in body" Text="I'm facing some strange logs when doing a runtime upgrade a Polkadot `rococo-local` relay chain to `0.9.16` from `0.9.15`. Hoping someone can help me debug them.&#xD;&#xA;&#xD;&#xA;Using Polkadot's `release-v0.9.15` and `release-v0.9.16` branches to build the binary and wasm.&#xD;&#xA;&#xD;&#xA;My machine is: &#xD;&#xA;`Ubuntu 20.04 LTS`. &#xD;&#xA;&#xD;&#xA;My rustup version is:&#xD;&#xA;```&#xD;&#xA;1.57.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.57.0 (f1edd0429 2021-11-29)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The logs:&#xD;&#xA;```&#xD;&#xA;Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215]    &#xD;&#xA;2022-02-21 11:33:21  Idle (3 peers), best: #56 (0x2b75…08af), finalized #34 (0x6f38…7c18), ⬇ 177.6kiB/s ⬆ 0.9kiB/s    &#xD;&#xA;2022-02-21 11:33:24 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:24 Running migration to v1 for session_historical with storage version StorageVersion(1)    &#xD;&#xA;2022-02-21 11:33:24 Attempted to apply migration to v1 but failed because storage version is StorageVersion(1)    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for System    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Babe    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Timestamp    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Indices    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Balances    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for TransactionPayment    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Authorship    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Offences    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Historical    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Session    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Grandpa    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ImOnline    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for AuthorityDiscovery    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParachainsOrigin    &#xD;&#xA;2022-02-21 11:33:24 ⚠️ Configuration declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(2)`    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParasShared    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParaInclusion    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParaInherent    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParaScheduler    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Paras    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Initializer    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Dmp    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Ump    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Hrmp    &#xD;&#xA;2022-02-21 11:33:24 ⚠️ ParaSessionInfo declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(1)`    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParasDisputes    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Registrar    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Auctions    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Crowdloan    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Slots    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParasSudoWrapper    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for AssignedSlots    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Sudo    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Mmr    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Beefy    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for MmrLeaf    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ValidatorManager    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeRococoGrandpa    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeWococoGrandpa    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeRococoMessages    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeWococoMessages    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeRococoMessagesDispatch    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeWococoMessagesDispatch    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Collective    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Membership    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Utility    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Proxy    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Multisig    &#xD;&#xA;2022-02-21 11:33:24 ⚠️ XcmPallet declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My `polkadot-launch` setup is the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;	&quot;relaychain&quot;: {&#xD;&#xA;		&quot;bin&quot;: &quot;polkadot915&quot;,&#xD;&#xA;		&quot;chain&quot;: &quot;rococo-local&quot;,&#xD;&#xA;		&quot;nodes&quot;: [&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9944,&#xD;&#xA;				&quot;port&quot;: 30444,&#xD;&#xA;				&quot;basePath&quot;: &quot;validator1&quot;,&#xD;&#xA;				&quot;flags&quot;: [&#xD;&#xA;					&quot;--rpc-cors=all&quot;,&#xD;&#xA;					&quot;--execution=wasm&quot;,&#xD;&#xA;					&quot;--wasm-execution=compiled&quot;&#xD;&#xA;				]&#xD;&#xA;			},&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9955,&#xD;&#xA;				&quot;port&quot;: 30555,&#xD;&#xA;				&quot;basePath&quot;: &quot;validator2&quot;,&#xD;&#xA;				&quot;flags&quot;: [&#xD;&#xA;					&quot;--rpc-cors=all&quot;,&#xD;&#xA;					&quot;--execution=wasm&quot;,&#xD;&#xA;					&quot;--wasm-execution=compiled&quot;&#xD;&#xA;				]&#xD;&#xA;			},&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9966,&#xD;&#xA;				&quot;port&quot;: 30666,&#xD;&#xA;				&quot;basePath&quot;: &quot;validator3&quot;,&#xD;&#xA;				&quot;flags&quot;: [&#xD;&#xA;					&quot;--rpc-cors=all&quot;,&#xD;&#xA;					&quot;--execution=wasm&quot;,&#xD;&#xA;					&quot;--wasm-execution=compiled&quot;&#xD;&#xA;				]&#xD;&#xA;			}&#xD;&#xA;		],&#xD;&#xA;		&quot;genesis&quot;: {&#xD;&#xA;			&quot;runtime&quot;: {&#xD;&#xA;				&quot;runtime_genesis_config&quot;: {&#xD;&#xA;					&quot;configuration&quot;: {&#xD;&#xA;						&quot;config&quot;: {&#xD;&#xA;							&quot;validation_upgrade_frequency&quot;: 10,&#xD;&#xA;							&quot;validation_upgrade_delay&quot;: 10&#xD;&#xA;						}&#xD;&#xA;					}&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	},&#xD;&#xA;	&quot;parachains&quot;: [&#xD;&#xA;		{&#xD;&#xA;			&quot;bin&quot;: &quot;polkadot-collator915&quot;,&#xD;&#xA;			&quot;chain&quot;: &quot;statemine-dev&quot;,&#xD;&#xA;			&quot;nodes&quot;: [&#xD;&#xA;				{&#xD;&#xA;					&quot;wsPort&quot;: 9801,&#xD;&#xA;					&quot;port&quot;: 31201,&#xD;&#xA;					&quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;					&quot;flags&quot;: [&#xD;&#xA;						&quot;--rpc-cors=all&quot;,&#xD;&#xA;						&quot;--rpc-port=9971&quot;,&#xD;&#xA;						&quot;--execution=wasm&quot;,&#xD;&#xA;						&quot;-lcumulus-collator=trace,cumulus-network=trace,cumulus-consensus=trace&quot;,&#xD;&#xA;						&quot;--wasm-execution=compiled&quot;&#xD;&#xA;					]&#xD;&#xA;				}&#xD;&#xA;			]&#xD;&#xA;		}&#xD;&#xA;	],&#xD;&#xA;	&quot;hrmpChannels&quot;: [&#xD;&#xA;	],&#xD;&#xA;	&quot;types&quot;: {},&#xD;&#xA;	&quot;finalization&quot;: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;First I do the client update from `polkadot915` to `polkadot916` without a problem. &#xD;&#xA;Then the runtime upgrade produces the logs, which bricks block production after several minutes.&#xD;&#xA;What could be the reason for such `Corrupted state at...` ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1306" PostHistoryTypeId="5" PostId="366" RevisionGUID="619686cb-374f-47b4-86ee-94d97a1a661b" CreationDate="2022-02-21T10:20:40.547" UserId="443" Comment="added 67 characters in body" Text="I'm facing some strange logs when doing a runtime upgrade a Polkadot `rococo-local` relay chain to `0.9.16` from `0.9.15`. Hoping someone can help me debug them.&#xD;&#xA;&#xD;&#xA;Using Polkadot's `release-v0.9.15` and `release-v0.9.16` branches to build the binary and wasm.&#xD;&#xA;&#xD;&#xA;My machine is: &#xD;&#xA;`Ubuntu 20.04 LTS`. &#xD;&#xA;&#xD;&#xA;My rustup version is:&#xD;&#xA;```&#xD;&#xA;1.57.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.57.0 (f1edd0429 2021-11-29)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The logs:&#xD;&#xA;```&#xD;&#xA;Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215]    &#xD;&#xA;2022-02-21 11:33:20 Corrupted state at [38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 128, 212, 30, 94, 22, 5, 103, 101, 188, 132, 97, 133, 16, 114, 201, 215]    &#xD;&#xA;2022-02-21 11:33:21  Idle (3 peers), best: #56 (0x2b75…08af), finalized #34 (0x6f38…7c18), ⬇ 177.6kiB/s ⬆ 0.9kiB/s    &#xD;&#xA;2022-02-21 11:33:24 Corrupted state at [6, 222, 61, 138, 84, 210, 126, 68, 169, 213, 206, 24, 150, 24, 242, 45, 180, 180, 157, 149, 50, 13, 144, 33, 153, 76, 133, 15, 37, 184, 227, 133]    &#xD;&#xA;2022-02-21 11:33:24 Running migration to v1 for session_historical with storage version StorageVersion(1)    &#xD;&#xA;2022-02-21 11:33:24 Attempted to apply migration to v1 but failed because storage version is StorageVersion(1)    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for System    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Babe    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Timestamp    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Indices    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Balances    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for TransactionPayment    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Authorship    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Offences    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Historical    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Session    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Grandpa    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ImOnline    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for AuthorityDiscovery    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParachainsOrigin    &#xD;&#xA;2022-02-21 11:33:24 ⚠️ Configuration declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(2)`    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParasShared    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParaInclusion    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParaInherent    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParaScheduler    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Paras    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Initializer    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Dmp    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Ump    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Hrmp    &#xD;&#xA;2022-02-21 11:33:24 ⚠️ ParaSessionInfo declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(1)`    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParasDisputes    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Registrar    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Auctions    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Crowdloan    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Slots    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ParasSudoWrapper    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for AssignedSlots    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Sudo    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Mmr    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Beefy    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for MmrLeaf    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for ValidatorManager    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeRococoGrandpa    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeWococoGrandpa    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeRococoMessages    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeWococoMessages    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeRococoMessagesDispatch    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for BridgeWococoMessagesDispatch    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Collective    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Membership    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Utility    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Proxy    &#xD;&#xA;2022-02-21 11:33:24 ✅ no migration for Multisig    &#xD;&#xA;2022-02-21 11:33:24 ⚠️ XcmPallet declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My `polkadot-launch` setup is the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;	&quot;relaychain&quot;: {&#xD;&#xA;		&quot;bin&quot;: &quot;polkadot915&quot;,&#xD;&#xA;		&quot;chain&quot;: &quot;rococo-local&quot;,&#xD;&#xA;		&quot;nodes&quot;: [&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9944,&#xD;&#xA;				&quot;port&quot;: 30444,&#xD;&#xA;				&quot;basePath&quot;: &quot;validator1&quot;,&#xD;&#xA;				&quot;flags&quot;: [&#xD;&#xA;					&quot;--rpc-cors=all&quot;,&#xD;&#xA;					&quot;--execution=wasm&quot;,&#xD;&#xA;					&quot;--wasm-execution=compiled&quot;&#xD;&#xA;				]&#xD;&#xA;			},&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9955,&#xD;&#xA;				&quot;port&quot;: 30555,&#xD;&#xA;				&quot;basePath&quot;: &quot;validator2&quot;,&#xD;&#xA;				&quot;flags&quot;: [&#xD;&#xA;					&quot;--rpc-cors=all&quot;,&#xD;&#xA;					&quot;--execution=wasm&quot;,&#xD;&#xA;					&quot;--wasm-execution=compiled&quot;&#xD;&#xA;				]&#xD;&#xA;			},&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9966,&#xD;&#xA;				&quot;port&quot;: 30666,&#xD;&#xA;				&quot;basePath&quot;: &quot;validator3&quot;,&#xD;&#xA;				&quot;flags&quot;: [&#xD;&#xA;					&quot;--rpc-cors=all&quot;,&#xD;&#xA;					&quot;--execution=wasm&quot;,&#xD;&#xA;					&quot;--wasm-execution=compiled&quot;&#xD;&#xA;				]&#xD;&#xA;			}&#xD;&#xA;		],&#xD;&#xA;		&quot;genesis&quot;: {&#xD;&#xA;			&quot;runtime&quot;: {&#xD;&#xA;				&quot;runtime_genesis_config&quot;: {&#xD;&#xA;					&quot;configuration&quot;: {&#xD;&#xA;						&quot;config&quot;: {&#xD;&#xA;							&quot;validation_upgrade_frequency&quot;: 10,&#xD;&#xA;							&quot;validation_upgrade_delay&quot;: 10&#xD;&#xA;						}&#xD;&#xA;					}&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	},&#xD;&#xA;	&quot;parachains&quot;: [&#xD;&#xA;		{&#xD;&#xA;			&quot;bin&quot;: &quot;polkadot-collator915&quot;,&#xD;&#xA;			&quot;chain&quot;: &quot;statemine-dev&quot;,&#xD;&#xA;			&quot;nodes&quot;: [&#xD;&#xA;				{&#xD;&#xA;					&quot;wsPort&quot;: 9801,&#xD;&#xA;					&quot;port&quot;: 31201,&#xD;&#xA;					&quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;					&quot;flags&quot;: [&#xD;&#xA;						&quot;--rpc-cors=all&quot;,&#xD;&#xA;						&quot;--rpc-port=9971&quot;,&#xD;&#xA;						&quot;--execution=wasm&quot;,&#xD;&#xA;						&quot;-lcumulus-collator=trace,cumulus-network=trace,cumulus-consensus=trace&quot;,&#xD;&#xA;						&quot;--wasm-execution=compiled&quot;&#xD;&#xA;					]&#xD;&#xA;				}&#xD;&#xA;			]&#xD;&#xA;		}&#xD;&#xA;	],&#xD;&#xA;	&quot;hrmpChannels&quot;: [&#xD;&#xA;	],&#xD;&#xA;	&quot;types&quot;: {},&#xD;&#xA;	&quot;finalization&quot;: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;First I do the client update from `polkadot915` to `polkadot916` without a problem. &#xD;&#xA;Then the runtime upgrade produces the logs, which bricks block production after several minutes.&#xD;&#xA;What could be the reason for such `Corrupted state at...` ?&#xD;&#xA;&#xD;&#xA;This does not reproduce with `westend-local`, no problem there." ContentLicense="CC BY-SA 4.0" />
  <row Id="1307" PostHistoryTypeId="2" PostId="369" RevisionGUID="b090acc1-c06f-47df-9a07-c2277b4d003d" CreationDate="2022-02-21T10:53:10.207" UserId="396" Text="I am experiencing some issues with node discovery after upgrading from substrate 2.0 to substrate 3.0&#xD;&#xA;&#xD;&#xA;After upgrading our chain from using substrate 2.0 to substrate 3.0 (Upgrading the client &amp; runtime with a forkless upgrade), the nodes fail to discover peers through Kademlia. mDNS is disabled (on purpose) and only bootnodes are being discovered.&#xD;&#xA;&#xD;&#xA;If I the same build and create a new chainspec and chain starting from block Kademlia discovery is working as intended. &#xD;&#xA;&#xD;&#xA;The version of libp2p used is 0.36.0.&#xD;&#xA;I add –log sub-libp2p flag on the node and I can see in the logs that the substream is opened, the Kademlia discovery being invoked, but throws this error `Failed to get record: NotFound`&#xD;&#xA;```&#xD;&#xA;validator-1_1   | 2022-02-17 15:33:59.909 TRACE tokio-runtime-worker sub-libp2p: External API &lt;= Message(12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp, SetId(2))    &#xD;&#xA;validator-1_1   | 2022-02-17 15:33:59.910 TRACE tokio-runtime-worker sub-libp2p: External API =&gt; Notification(PeerId(&quot;12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&quot;), &quot;/paritytech/grandpa/1&quot;, 150 bytes)    &#xD;&#xA;validator-1_1   | 2022-02-17 15:33:59.910 TRACE tokio-runtime-worker sub-libp2p: Handler(PeerId(&quot;12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&quot;)) &lt;= Sync notification    &#xD;&#xA;validator-1_1   | 2022-02-17 15:33:59.926 TRACE tokio-runtime-worker sub-libp2p: Handler(ConnectionId(TaskId(0))) =&gt; Notification(12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp, SetId(2), 150 bytes)    &#xD;&#xA;...&#xD;&#xA;validator-1_1   | 2022-02-18 08:20:58.033 TRACE tokio-runtime-worker sub-libp2p: Addresses of PeerId(&quot;12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&quot;): [&quot;/dns/validator-0/tcp/30333&quot;, &quot;/dns/validator-0/tcp/30333&quot;, &quot;/dns/validator-0/tcp/30333&quot;, &quot;/dns/validator-0/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&quot;]    &#xD;&#xA;...&#xD;&#xA;2022-02-18 08:21:04.063 TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Failed to get record: NotFound { key: Key(b&quot;h\xe9\xa0\xe3h\x17\x1e\xfc\xfds\xc0\x8c\x11\x8c\n\x9f\x03\xa6\xe5\xac\xa6\xd5{\x11\x83\x94\xeda\xc9\xa6P\xc9&quot;), closest_peers: [PeerId(&quot;12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&quot;)] }    &#xD;&#xA;validator-1_1   | 2022-02-18 08:21:04.063 TRACE tokio-runtime-worker sub-libp2p: Libp2p &#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Are there any know issues in this area? Closest I could find was this, but the fix is already applied to our codebase.&#xD;&#xA;https://github.com/paritytech/substrate/pull/7985/files&#xD;&#xA;&#xD;&#xA;I also tried to rotate the session keys in the validators, just in case there was an issue with old keys but nothing changed.&#xD;&#xA;&#xD;&#xA;Any ideas/suggestions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1309" PostHistoryTypeId="1" PostId="369" RevisionGUID="b090acc1-c06f-47df-9a07-c2277b4d003d" CreationDate="2022-02-21T10:53:10.207" UserId="396" Text="Node discovery (Kademlia) not working after upgrading chain from v2.0 -&gt; v3.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="1310" PostHistoryTypeId="3" PostId="369" RevisionGUID="b090acc1-c06f-47df-9a07-c2277b4d003d" CreationDate="2022-02-21T10:53:10.207" UserId="396" Text="|substrate-node|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1311" PostHistoryTypeId="2" PostId="370" RevisionGUID="e2617598-8b56-4e42-9964-61be02701cdf" CreationDate="2022-02-21T11:22:33.997" UserId="94" Text="In other blockchains I practiced extreme frugality with event data, since it is expensive.  &#xD;&#xA;For example only putting an `ID` into an event which can then be looked up with `lookup(ID) -&gt; InterestingData`.  &#xD;&#xA;&#xD;&#xA;Is this also necessary in Substrate?  &#xD;&#xA;Is there an incentive to keep event data small?   &#xD;&#xA;&#xD;&#xA;This is a legit Q, I have no clue." ContentLicense="CC BY-SA 4.0" />
  <row Id="1313" PostHistoryTypeId="1" PostId="370" RevisionGUID="e2617598-8b56-4e42-9964-61be02701cdf" CreationDate="2022-02-21T11:22:33.997" UserId="94" Text="Which data to put in a Pallet Event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1314" PostHistoryTypeId="3" PostId="370" RevisionGUID="e2617598-8b56-4e42-9964-61be02701cdf" CreationDate="2022-02-21T11:22:33.997" UserId="94" Text="|pallet|frame|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1315" PostHistoryTypeId="4" PostId="367" RevisionGUID="f5bc52b0-7a47-4caf-8b0c-9e9db5a07b37" CreationDate="2022-02-21T11:23:07.757" UserId="352" Comment="edited title" Text="How to solve 'Invalid transaction version'?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1316" PostHistoryTypeId="2" PostId="371" RevisionGUID="23b5760c-60b5-4c68-8a6b-dfb1f3f533f8" CreationDate="2022-02-21T11:43:35.503" UserId="16" Text="When I look at chain specs defined in code they usually contain something like this in their genesis:&#xD;&#xA;```rust&#xD;&#xA;GenesisConfig {&#xD;&#xA;	system: my_runtime::SystemConfig {&#xD;&#xA;		code: my_runtime::WASM_BINARY&#xD;&#xA;			.expect(&quot;WASM binary was not build, please build it!&quot;)&#xD;&#xA;			.to_vec(),&#xD;&#xA;	},&#xD;&#xA;	...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If someone builds a node from source wouldn't that lead to a genesis mismatch due to different wasm blobs? Am I right in the assumption that such a config is merely used to generate a chain spec json file from it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1318" PostHistoryTypeId="1" PostId="371" RevisionGUID="23b5760c-60b5-4c68-8a6b-dfb1f3f533f8" CreationDate="2022-02-21T11:43:35.503" UserId="16" Text="Do I need a json chainspec for a production chain or does a code defined one suffices?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1319" PostHistoryTypeId="3" PostId="371" RevisionGUID="23b5760c-60b5-4c68-8a6b-dfb1f3f533f8" CreationDate="2022-02-21T11:43:35.503" UserId="16" Text="|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1320" PostHistoryTypeId="5" PostId="368" RevisionGUID="fc55015a-5ca2-4cc4-aa60-6f5ac9476523" CreationDate="2022-02-21T12:51:43.490" UserId="85" Comment="formatting" Text="The substrate node template comes up with PoA by default. I am trying to change this consensus engine to Proof of stake, so far I have just changed aura to babe. How can I achieve changing the consensus to PoS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1321" PostHistoryTypeId="4" PostId="368" RevisionGUID="fc55015a-5ca2-4cc4-aa60-6f5ac9476523" CreationDate="2022-02-21T12:51:43.490" UserId="85" Comment="formatting" Text="How to change consensus engine from PoA to PoS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1322" PostHistoryTypeId="6" PostId="240" RevisionGUID="6558a237-cda5-403b-a141-244c0acc4f61" CreationDate="2022-02-21T12:56:28.860" UserId="85" Comment="tag consolidation" Text="|polkadot|parachain|substrate-node-template|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1323" PostHistoryTypeId="6" PostId="295" RevisionGUID="8b935168-5cc0-4253-bfbb-e415595c8a15" CreationDate="2022-02-21T12:57:11.983" UserId="85" Comment="tag consolidation" Text="|weight|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1324" PostHistoryTypeId="2" PostId="372" RevisionGUID="0f37318c-a73b-4046-b99d-69163103d1fd" CreationDate="2022-02-21T13:10:23.373" UserId="73" Text="Yes that is right. &#xD;&#xA;&#xD;&#xA;To generate the genesis block we are currently leveraging the native runtime. It holds the `GenesisConfig` that can decode the json chain specs for example or is the one that is used in the code like in your example. The problem is now that the native runtime evolves together with the on chain runtime, because both are sharing the same code. This would then lead to a genesis block with a potential different storage root. Even with the same native runtime, it would be required that `WASM_BINARY` is the same for everyone, but that isn't the case.&#xD;&#xA;&#xD;&#xA;To solve this, we have the raw chain spec. The raw chain spec is basically the genesis database, aka it contains all the `key =&gt; value` pairs that you will find on each node as genesis state. Putting these values into the trie, will give you the storage root of the genesis block. This way we are not dependent on the native runtime to generate the genesis block. It is always advised, especially for Parachains, to first generate the raw chain spec. Parachain builders then can use the chain spec to extract the genesis wasm binary and to get the genesis state of their Parachain. If they don't do it that way, they probably will have different data registered on the relay chain than the Parachain nodes are using. This will then lead to collators being unable to build PoV candidates, because they can not find the required block in their local database. The error they will see is:&#xD;&#xA;```&#xD;&#xA;Could not find the header of the genesis block in the database!&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;TLDR: If you want to launch a chain, production or for testing (with multiple nodes), use a raw chain spec!" ContentLicense="CC BY-SA 4.0" />
  <row Id="1326" PostHistoryTypeId="2" PostId="373" RevisionGUID="28364c6b-8da8-4805-9a5e-35370cae3573" CreationDate="2022-02-21T13:12:38.007" UserId="73" Text="For Substrate events are also &quot;expensive&quot;. Events are in the state of each block. This means that archive nodes for example need to store all events of all blocks that ever happened. So, if you have data in the state anyway, you should link to it or just put the hash of the data into the event. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1328" PostHistoryTypeId="5" PostId="373" RevisionGUID="1950c6e1-885e-46a1-aec5-b2632ae19c8b" CreationDate="2022-02-21T13:26:20.907" UserId="73" Comment="added 260 characters in body" Text="For Substrate events are also &quot;expensive&quot;. Events are in the state of each block. This means that archive nodes for example need to store all events of all blocks that ever happened. So, if you have data in the state anyway, you should link to it or just put the hash of the data into the event. &#xD;&#xA;&#xD;&#xA;&gt; Is there an incentive to keep event data small?&#xD;&#xA;&#xD;&#xA;Everything that goes to the state and is not part of the main business logic, should be as small as possible. For example the `DispatchError` was also designed in a way to use as less as possible storage. " ContentLicense="CC BY-SA 4.0" />
  <row Id="1331" PostHistoryTypeId="2" PostId="375" RevisionGUID="5c9f399d-f8c6-4772-ad20-7d65c84641be" CreationDate="2022-02-21T15:02:13.693" UserId="450" Text="I usually use `scheduler` to upgrade my runtime and it was working fine until now.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have `Transaction exhaust block limits` trying to upgrade live chain. I build the wasm using `srtool v0.9.19`, and the compact wasm size is around `4.3Mb`. Then, I checked out my previous release commit and the wasm build at that commit is about `3.1Mb`, so maybe the size difference is the problem?&#xD;&#xA;&#xD;&#xA;I also use `sudo.sudoUncheckedWeight` but the transaction is stuck at `broadcast` status on the Polkadot UI.&#xD;&#xA;&#xD;&#xA;Parameters:&#xD;&#xA; - Block Limits: 5Mb&#xD;&#xA;&#xD;&#xA;Please, any suggestion would be very helpful." ContentLicense="CC BY-SA 4.0" />
  <row Id="1333" PostHistoryTypeId="1" PostId="375" RevisionGUID="5c9f399d-f8c6-4772-ad20-7d65c84641be" CreationDate="2022-02-21T15:02:13.693" UserId="450" Text="Runtime Upgrade: Transaction exhaust block limits" ContentLicense="CC BY-SA 4.0" />
  <row Id="1334" PostHistoryTypeId="3" PostId="375" RevisionGUID="5c9f399d-f8c6-4772-ad20-7d65c84641be" CreationDate="2022-02-21T15:02:13.693" UserId="450" Text="|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1335" PostHistoryTypeId="5" PostId="375" RevisionGUID="86f066a1-24bf-45a4-be7a-b772a1f84b07" CreationDate="2022-02-21T15:12:26.410" UserId="450" Comment="added 67 characters in body" Text="I usually use `scheduler` to upgrade my runtime and it was working fine until now.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have `Transaction exhaust block limits` trying to upgrade live chain. I build the wasm using `srtool v0.9.19`, and the compact wasm size is around `4.3Mb`. Then, I checked out my previous release commit and the wasm build at that commit is about `3.1Mb`, so maybe the size difference is the problem?&#xD;&#xA;&#xD;&#xA;I also use `sudo.sudoUncheckedWeight` but the transaction is stuck at `broadcast` status on the Polkadot UI.&#xD;&#xA;&#xD;&#xA;Parameters:&#xD;&#xA;- Block Limits: 5Mb&#xD;&#xA;- Block Weights: 1 seconds, since we're using 3 seconds block time&#xD;&#xA;&#xD;&#xA;Please, any suggestion would be very helpful." ContentLicense="CC BY-SA 4.0" />
  <row Id="1336" PostHistoryTypeId="2" PostId="376" RevisionGUID="98797f75-bcdf-4e8c-a90b-fab79aba5a2e" CreationDate="2022-02-21T15:18:04.917" UserId="16" Text="I want to reset a parachain currently active on the rococo testnet. There is documentation on how to [register a new parachain](https://docs.substrate.io/tutorials/v3/cumulus/rococo/). But what do I need to do in order to restart an existing parachain? I assume some extrinsic (but which) must be submitted as root with the new genesis and wasm blob." ContentLicense="CC BY-SA 4.0" />
  <row Id="1338" PostHistoryTypeId="1" PostId="376" RevisionGUID="98797f75-bcdf-4e8c-a90b-fab79aba5a2e" CreationDate="2022-02-21T15:18:04.917" UserId="16" Text="How to reset a parachain with a new genesis on rococo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1339" PostHistoryTypeId="3" PostId="376" RevisionGUID="98797f75-bcdf-4e8c-a90b-fab79aba5a2e" CreationDate="2022-02-21T15:18:04.917" UserId="16" Text="|parachain|rococo|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1340" PostHistoryTypeId="2" PostId="377" RevisionGUID="f2307241-f3d0-4922-a44f-7745f169a630" CreationDate="2022-02-21T15:46:04.437" UserId="298" Text="I have a parachain currently running on a rococo-staging network. The leases are 1 day.&#xD;&#xA;&#xD;&#xA;I'm making a sudo call &gt; `assignedSlots &gt; assignTempParachainSlot(id, leasePeriodStart)` to upgrade my chain to a temporary or permanent chain so that the lease is extended.&#xD;&#xA;&#xD;&#xA;But i'm getting an error:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Result&lt;Null, SpRuntimeDispatchError&gt;&#xD;&#xA;{&#xD;&#xA;  Err: {&#xD;&#xA;    Module: {&#xD;&#xA;      index: 31&#xD;&#xA;      error: 1&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is happening for both temporary and permanent calls. &#xD;&#xA;&#xD;&#xA;How can i upgrade the parachain? and find out what this error means?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1342" PostHistoryTypeId="1" PostId="377" RevisionGUID="f2307241-f3d0-4922-a44f-7745f169a630" CreationDate="2022-02-21T15:46:04.437" UserId="298" Text="Upgrade parachain's lease period with assignedSlots failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="1343" PostHistoryTypeId="3" PostId="377" RevisionGUID="f2307241-f3d0-4922-a44f-7745f169a630" CreationDate="2022-02-21T15:46:04.437" UserId="298" Text="|polkadot|substrate-node|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1344" PostHistoryTypeId="5" PostId="376" RevisionGUID="c575a436-1052-484f-b3fe-302153c831a0" CreationDate="2022-02-21T15:49:05.760" UserId="16" Comment="added 88 characters in body" Text="I want to reset a parachain currently active on the rococo testnet. There is documentation on how to [register a new parachain](https://docs.substrate.io/tutorials/v3/cumulus/rococo/). But what do I need to do in order to restart an existing parachain? I assume some extrinsic (but which) must be submitted as root with the new genesis and wasm blob.&#xD;&#xA;&#xD;&#xA;I am not concerned with keeping messages queues but I want to keep the parachain id." ContentLicense="CC BY-SA 4.0" />
  <row Id="1345" PostHistoryTypeId="2" PostId="378" RevisionGUID="f12b88fd-6cdc-4884-86ae-f353caaab4bd" CreationDate="2022-02-21T16:06:43.707" UserId="377" Text="I want to use the proxy pallet in my code. Do we have any sample code to use it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1347" PostHistoryTypeId="1" PostId="378" RevisionGUID="f12b88fd-6cdc-4884-86ae-f353caaab4bd" CreationDate="2022-02-21T16:06:43.707" UserId="377" Text="Do we have any example or sample code to use proxy pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1348" PostHistoryTypeId="3" PostId="378" RevisionGUID="f12b88fd-6cdc-4884-86ae-f353caaab4bd" CreationDate="2022-02-21T16:06:43.707" UserId="377" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1349" PostHistoryTypeId="5" PostId="378" RevisionGUID="7c58435c-cf71-4de2-90f4-46053e672dff" CreationDate="2022-02-21T17:04:24.853" UserId="377" Comment="added 10 characters in body" Text="I want to use the proxy pallet in my code. Do we have any sample Substrate code to use it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1350" PostHistoryTypeId="2" PostId="379" RevisionGUID="faf1e937-e20a-4c94-8137-30857a3f1469" CreationDate="2022-02-21T17:49:32.553" UserId="361" Text="This is an involved topic, but as a short primer:&#xD;&#xA;The crucial change on the runtime side is in how the validator set is provided. Using Babe on its own with a hard-coded validator set is still PoA.&#xD;&#xA;You need to configure the validator set to be dynamic based on a PoS mechanism. Polkadot uses pallet-staking in combination with pallet-session for this. You might do the same or use a different staking system.&#xD;&#xA;&#xD;&#xA;**Note:** Because the block production system consists of both runtime as well as node parts you cannot just change the consensus of a running chain and expect it to work. You would need to transition the node from Aura to Babe as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="1352" PostHistoryTypeId="2" PostId="380" RevisionGUID="4186e08f-1964-4168-bdaa-d6fd6475bd3c" CreationDate="2022-02-21T18:58:40.957" UserId="452" Text="The issue lacks details to know exactly what went wrong in the first place (why did finality stop?). That said here are the steps you should have taken in order to debug the problem. &#xD;&#xA;&#xD;&#xA;Use the `grandpa_roundState` RPC to get the current state of GRANDPA, this should allow identifying who are the validators that have not voted yet. You could then use this information to look at the validators deployment and figure out what was wrong: were they running? did they have the appropriate keys in the keystore? &#xD;&#xA;&#xD;&#xA;Assuming that the situation was irrecoverable (e.g. the keys were lost), then you could use the `api.tx.grandpa.noteStalled` extrinsic to forcefully change the validator set. This takes two parameters: the delay in blocks after which the forced validator set change happens (the change itself only happens at end of session, so this delay is on top of that), and the highest block that was finalized by the network so far. &#xD;&#xA;&#xD;&#xA;This last parameter is of extreme importance since this is the block at which finality will be restarted, failure to provide a sensible block number here (i.e. a block number that was actually finalized) can lead to data inconsistency and bricking finality. I suppose this might have happened in your case, as the node is refusing to import a block with the error `A pending forced authority set change could not be applied since it must be applied after the pending standard change at #23434`, which implies that a call to `noteStalled` was done where the finalized number was higher or equal to #23434, yet the node is reporting #23324 as its best finalized number.&#xD;&#xA;&#xD;&#xA;(FWIW I will improve the docs of `grandpa.noteStalled` in a follow-up PR)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1354" PostHistoryTypeId="2" PostId="381" RevisionGUID="fd193206-375f-4527-8875-f0175b46d7c5" CreationDate="2022-02-21T19:09:20.630" UserId="452" Text="The key that you inserted into the keystore is probably invalid, the node fetches the key from the keystore in order to sign a GRANDPA vote and this fails. If you are generating keys for GRANDPA keep in mind that they need to be ed25519.&#xD;&#xA;&#xD;&#xA;Unfortunately the error doesn't make it obvious what the problem is, we will add validation to keystore insertions in the future (so that you can't add an invalid key in the first place)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1356" PostHistoryTypeId="2" PostId="382" RevisionGUID="d249d2ed-8df3-42a1-b8b4-60d4ac8684d9" CreationDate="2022-02-21T19:41:33.790" UserId="45" Text="Paras module exposes two dispatchables to control this:&#xD;&#xA;&#xD;&#xA;- [`force_set_current_code`](https://paritytech.github.io/polkadot/polkadot_runtime_parachains/paras/pallet/struct.Pallet.html#method.force_set_current_code)&#xD;&#xA;- [`force_set_current_head`](https://paritytech.github.io/polkadot/polkadot_runtime_parachains/paras/pallet/struct.Pallet.html#method.force_set_current_head)&#xD;&#xA;&#xD;&#xA;Using the relay-chain governance, you can call those functions to resubmit the code and genesis head for your registered para.&#xD;&#xA;&#xD;&#xA;Currently there is no way to clear the message queues, if you care about that." ContentLicense="CC BY-SA 4.0" />
  <row Id="1358" PostHistoryTypeId="11" PostId="315" RevisionGUID="4adfad1e-2ce9-4844-9ae3-fb4aa91bc4c2" CreationDate="2022-02-21T19:44:25.147" UserId="-1" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:2,&quot;DisplayName&quot;:&quot;Glorfindel&quot;},{&quot;Id&quot;:112,&quot;DisplayName&quot;:&quot;Joe Kerr&quot;},{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;}]}" />
  <row Id="1359" PostHistoryTypeId="2" PostId="383" RevisionGUID="00aaa73e-facc-40c3-832b-f0af31f07525" CreationDate="2022-02-21T20:09:37.247" UserId="29" Text="The metadata provides essential information regarding the substrate blockchain you are connecting to.&#xD;&#xA;&#xD;&#xA;It is unique to that chain's runtime. &#xD;&#xA;&#xD;&#xA;The chain's runtime metadata includes information such as storage items, extrinsic calls, events, constants, and errors that are exposed by that chain's runtime via the various pallets that were used to construct it. &#xD;&#xA;&#xD;&#xA;The metadata most likely will change if the runtime gets upgraded. Therefore you need to make sure you always get the latest metadata.&#xD;&#xA;&#xD;&#xA;The [frame-metadata](https://github.com/paritytech/frame-metadata) repo defines the metadata. Substrate chains implement that type definition. [Frame-metadata](https://github.com/paritytech/frame-metadata) type definitions are versioned e.g. v12, v13, ...&#xD;&#xA;&#xD;&#xA;You can see a nicely formatted example of a metadata [here](https://gist.github.com/insipx/db5e49c0160b1f1bd421a3c34fefdf48).&#xD;&#xA;&#xD;&#xA;Reference: https://docs.substrate.io/v3/runtime/metadata&#xD;&#xA;&#xD;&#xA;I do see your logic though. There could be a way of caching the metadata on the client side so that subsequent requests only check the metadata's version number/hash with the one you have cached. If the version is the same, no need to get the full metadata. If the version you have is out-of-date, then pull the full metadata from the chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="1361" PostHistoryTypeId="34" PostId="176" RevisionGUID="f17533f7-aa10-4429-a7b0-4f945c718466" CreationDate="2022-02-21T20:26:12.640" UserId="3" Comment="2" />
  <row Id="1362" PostHistoryTypeId="5" PostId="325" RevisionGUID="3b50f2fd-0425-4f31-9b1b-44b9189b1a62" CreationDate="2022-02-21T20:49:06.470" UserId="29" Comment="added 98 characters in body" Text="If you take a look at this diagram:&#xD;&#xA;&#xD;&#xA;![](https://d33wubrfki0l68.cloudfront.net/04485e45edfb524bfbebdf0270455902ff5912af/56a28/static/505c4ec510929c01c0e608225c5c598a/6edca/off-chain-workers-v2.png)&#xD;&#xA; &#xD;&#xA;The dotted red lines indicate that the Off-Chain Worker (OCW), although existing in the Substrate Node in tandem with the Substrate Runtime, actually lives in its own separate WASM execution environment - denoted by the dotted red line. One of the main reasons the OCW lives in the Node with the Substrate Runtime is so that it can have access to on-chain state and also so that, if opted-in, the runtime can have access to Off-Chain Storage via Off-Chain Indexing.&#xD;&#xA;&#xD;&#xA;An OCW can be thought of as a second application that runs alongside the blockchain. That being said, your OCW can listen to events from the runtime and react in some manner to those events. Your Substrate Runtime should not have any idea that your OCW exists nor should it assume so.&#xD;&#xA;&#xD;&#xA;More info: https://docs.substrate.io/v3/concepts/off-chain-features/#off-chain-workers&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[This video](https://youtu.be/Gvu39Q2TcqA) has legacy code but is helpful in how one should think of OCWs." ContentLicense="CC BY-SA 4.0" />
  <row Id="1363" PostHistoryTypeId="2" PostId="384" RevisionGUID="5ce09ecf-9a17-4d82-9b6d-bdef2e1dadab" CreationDate="2022-02-22T00:54:11.330" UserId="454" Text="I'm wiring up the substrate sidecar to a chain which has some custom type and some out of date types (as compared to current) such as AccountInfo.&#xD;&#xA;I've found that it uses the older `AccountInfoWithRefCount` definition. Accordingly I created a json file as follows:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;types&quot;: {&#xD;&#xA;    &quot;AccountInfo&quot;: &quot;AccountInfoWithRefCount&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I then used the environment variable `SAS_SUBSTRATE_TYPES=/custom_types/types.json` (obviously with the correct volume mapping done) to fire up the container.&#xD;&#xA;The logs from the container indicate that it is using the custom type file... however no behavioral change is observed. The same decode error is present before and after:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;Unable to decode storage system.account:: createType(AccountInfo):: {\&quot;nonce\&quot;:\&quot;Index\&quot;,\&quot;consumers\&quot;:\&quot;RefCount\&quot;,\&quot;providers\&quot;:\&quot;RefCount\&quot;,\&quot;sufficients\&quot;:\&quot;RefCount\&quot;,\&quot;data\&quot;:\&quot;AccountData\&quot;}:: Decoded input doesn't match input, received … (72 bytes), created … (80 bytes)&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Am I doing something wrong with the type file or is the sidecar not honoring it in some way? Any help much appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="1365" PostHistoryTypeId="1" PostId="384" RevisionGUID="5ce09ecf-9a17-4d82-9b6d-bdef2e1dadab" CreationDate="2022-02-22T00:54:11.330" UserId="454" Text="Substrate Sidecar Custom Type Issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="1366" PostHistoryTypeId="3" PostId="384" RevisionGUID="5ce09ecf-9a17-4d82-9b6d-bdef2e1dadab" CreationDate="2022-02-22T00:54:11.330" UserId="454" Text="|api|sidecar|custom-types|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1367" PostHistoryTypeId="2" PostId="385" RevisionGUID="7b2bcf0f-bafa-4627-8c0f-2f9b7c03efaf" CreationDate="2022-02-22T01:11:08.573" UserId="454" Text="Geez... remove the outer `types` property so just have:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;AccountInfo&quot;: &quot;AccountInfoWithRefCount&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And everything works... maybe this will help someone else." ContentLicense="CC BY-SA 4.0" />
  <row Id="1369" PostHistoryTypeId="2" PostId="386" RevisionGUID="76f1578f-ffdf-465b-ac6c-b6290aa7a94a" CreationDate="2022-02-22T01:12:07.457" UserId="352" Text="I want to decode the extrinsics I received through json-rpc (at rust or java).&#xD;&#xA;&#xD;&#xA;But every time I leave a question here, there's no clear answer.&#xD;&#xA;&#xD;&#xA;First, I'm using subxt.&#xD;&#xA;&#xD;&#xA;(subxt : https://github.com/paritytech/subxt)&#xD;&#xA;&#xD;&#xA;They are decoding it through structure unchecked_extrinsic.&#xD;&#xA;&#xD;&#xA;What is the difference between check_extrinsic and uncheck_extrinsic and opaque_extrinsic?&#xD;&#xA;&#xD;&#xA;And is it the right way to try it? I really want to decode it.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1371" PostHistoryTypeId="1" PostId="386" RevisionGUID="76f1578f-ffdf-465b-ac6c-b6290aa7a94a" CreationDate="2022-02-22T01:12:07.457" UserId="352" Text="What is the difference between check_extrinsic and uncheck_extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1372" PostHistoryTypeId="3" PostId="386" RevisionGUID="76f1578f-ffdf-465b-ac6c-b6290aa7a94a" CreationDate="2022-02-22T01:12:07.457" UserId="352" Text="|decode|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1373" PostHistoryTypeId="2" PostId="387" RevisionGUID="8f2a3c01-5fa1-4939-8ac6-70d8ef0a9768" CreationDate="2022-02-22T02:06:09.623" UserId="83" Text="I integrated the proxy pallet into my code [here][1] mid last year. It is a sample of the Substrate code you might need to use it if you were still using an earlier version of Substrate version 3.0.0.&#xD;&#xA;&#xD;&#xA;There is example Substrate code in the unit test file of the proxy pallet that shows different scenarios of how you may use the proxy pallet.&#xD;&#xA;For example it shows [in this unit test][2] how to use its `add_proxy` extrinsic. For the latest 'master' branch [it is implemented here][3] and [documented here][4].&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/node/pull/213/files&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/proxy/src/tests.rs#L207&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/proxy/src/lib.rs#L234&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/pallet_proxy/pallet/struct.Pallet.html#method.add_proxy" ContentLicense="CC BY-SA 4.0" />
  <row Id="1375" PostHistoryTypeId="5" PostId="386" RevisionGUID="a79ce7c4-9227-4bcc-8e7f-bdce801d16e2" CreationDate="2022-02-22T02:09:44.057" UserId="352" Comment="added 11 characters in body" Text="I want to decode the polkadot's extrinsics I received through json-rpc (at rust or java).&#xD;&#xA;&#xD;&#xA;But every time I leave a question here, there's no clear answer.&#xD;&#xA;&#xD;&#xA;First, I'm using subxt.&#xD;&#xA;&#xD;&#xA;(subxt : https://github.com/paritytech/subxt)&#xD;&#xA;&#xD;&#xA;They are decoding it through structure unchecked_extrinsic.&#xD;&#xA;&#xD;&#xA;What is the difference between check_extrinsic and uncheck_extrinsic and opaque_extrinsic?&#xD;&#xA;&#xD;&#xA;And is it the right way to try it? I really want to decode it.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1376" PostHistoryTypeId="5" PostId="387" RevisionGUID="8006e95f-d524-45ea-83b8-b112ff76d51c" CreationDate="2022-02-22T02:12:41.733" UserId="83" Comment="show link to where it shows how to integrate proxy pallet into runtime" Text="I integrated the proxy pallet into my code [here][1] mid last year. It is a sample of the Substrate code you might need to use it if you were still using an earlier version of Substrate version 3.0.0.&#xD;&#xA;&#xD;&#xA;To integrate the proxy pallet from the latest Substrate 'master' branch you can refer to files like [bin/node/runtime/src/lib.rs][2] that show how to incorporate it into your runtime.&#xD;&#xA;&#xD;&#xA;There is example Substrate code in the unit test file of the proxy pallet that shows different scenarios of how you may use the proxy pallet.&#xD;&#xA;&#xD;&#xA;For example it shows [in this unit test][3] how to use its `add_proxy` extrinsic. For the latest 'master' branch [it is implemented here][4] and [documented here][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/node/pull/213/files&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L315&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/proxy/src/tests.rs#L207&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/proxy/src/lib.rs#L234&#xD;&#xA;  [5]: https://paritytech.github.io/substrate/master/pallet_proxy/pallet/struct.Pallet.html#method.add_proxy" ContentLicense="CC BY-SA 4.0" />
  <row Id="1377" PostHistoryTypeId="2" PostId="388" RevisionGUID="273978a4-9ef3-4d9b-b926-b15357e546ee" CreationDate="2022-02-22T02:28:25.403" UserId="23" Text="The correct way to work with data coming from a substrate node is to use a tool or library that uses the Metadata to decode rpc responses correctly, as shown here: https://docs.substrate.io/v3/runtime/metadata/&#xD;&#xA;&#xD;&#xA;Virtually everything you get from a substrate node over RPC will be [SCALE encoded](https://docs.substrate.io/v3/advanced/scale-codec/) - SCALE requires that you have knowledge of the types in the data that you are working before trying to decode it. There are implementations available in [many languages](https://docs.substrate.io/v3/advanced/scale-codec/#:~:text=been%20implemented%20in-,many%20languages,-%2C%20including%20a%20reference) but it is probably better to use something that handles the process of getting the Metadata for you as well as described previously. &#xD;&#xA;&#xD;&#xA;Regarding the specific types you were asking about: an unchecked extrinsic is an extrinsic with all of the extra data required to verify it's validity still included in it - as you can see for example in the subxt codebase [here](https://github.com/paritytech/subxt/blob/55f04c20a78c5cb1b26584802f562a0cc8f9eb12/subxt/src/extrinsic/mod.rs#L52), the general format is: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  address, &#xD;&#xA;  encoded data,&#xD;&#xA;  signature, &#xD;&#xA;  extra signed data,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;where the contents of the encoded data and extra signed data depend on the specific substrate chain you are working with. &#xD;&#xA;&#xD;&#xA;an opaque extrinsic is the same thing, but the structure is not exposed to the code. It is simply a convention to specify a type as opaque if it's structure is not known or relevant at runtime. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1379" PostHistoryTypeId="2" PostId="389" RevisionGUID="cd98d985-9bd0-4c90-ac2b-a422254bb427" CreationDate="2022-02-22T02:50:50.867" UserId="83" Text="I changed the consensus engine from PoA to PoS for the substrate-node-template when it was Substrate version 3.0.0 about a year ago with the changes shown [here][1].&#xD;&#xA;&#xD;&#xA;To make the change using a more recent Substrate version you can refer to files like [bin/node/runtime/src/lib.rs][2] that show how you would now incorporate pallets like Babe, Staking, and Session into your runtime.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ltfschoen/substrate-node-template/pull/4/files&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L377" ContentLicense="CC BY-SA 4.0" />
  <row Id="1385" PostHistoryTypeId="5" PostId="364" RevisionGUID="4f2416dc-a562-4ee3-b6f9-596738ddd988" CreationDate="2022-02-22T07:08:10.840" UserId="442" Comment="added 1 character in body" Text="Extrinsic marked as `#[transactional]` will get discarded if it returns `Err`.&#xD;&#xA;&#xD;&#xA;But there're some issues about `transactional` annotation, see [paritytech/substrate#10806][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/10806" ContentLicense="CC BY-SA 4.0" />
  <row Id="1386" PostHistoryTypeId="2" PostId="391" RevisionGUID="c706f984-7c35-469d-b295-7433fef81135" CreationDate="2022-02-22T09:23:10.133" UserId="352" Text="As far as I know, the metadata of Polkadot is version 14.&#xD;&#xA;&#xD;&#xA;**Assuming that the metadata version is not updated,**&#xD;&#xA;&#xD;&#xA;**Can the metadata of the recent block be different?**&#xD;&#xA;&#xD;&#xA;    ex) Block(#9135844)'s metadata != Block(#9135845)'s metadata??&#xD;&#xA;&#xD;&#xA;The reason why I'm asking this question seems that I don't have a good concept of metadata yet.&#xD;&#xA;&#xD;&#xA;If the same metadata is used in the example above, I don't think I need to get it from time to time." ContentLicense="CC BY-SA 4.0" />
  <row Id="1388" PostHistoryTypeId="1" PostId="391" RevisionGUID="c706f984-7c35-469d-b295-7433fef81135" CreationDate="2022-02-22T09:23:10.133" UserId="352" Text="Can the metadata of Polkadot change?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1389" PostHistoryTypeId="3" PostId="391" RevisionGUID="c706f984-7c35-469d-b295-7433fef81135" CreationDate="2022-02-22T09:23:10.133" UserId="352" Text="|polkadot|json-rpc|metadata|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1390" PostHistoryTypeId="2" PostId="392" RevisionGUID="a0716b15-10e2-4ae7-96b4-ac25eaea3f86" CreationDate="2022-02-22T10:38:43.907" UserId="299" Text="I referred to parachain_info normally, but couldn't call his `get` method&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  717 |             Parachain(ParachainInfo::get().into())&#xD;&#xA;      |                                      ^^^ function or associated item not found in `parachain_info::Pallet&lt;Runtime&gt;`&#xD;&#xA;```&#xD;&#xA;this is my config about `parachain_info`:&#xD;&#xA;&#xD;&#xA;`runtime/Cargo.toml`:&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;[dependencies]&#xD;&#xA;...&#xD;&#xA;parachain-info = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16', default-features = false }&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&#xD;&#xA;	&quot;std&quot;,&#xD;&#xA;]&#xD;&#xA;std = [&#xD;&#xA;...&#xD;&#xA;	&quot;parachain-info/std&quot;,&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`runtime/src/lib.rs`:&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;impl parachain_info::Config for Runtime {}&#xD;&#xA;...&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;...&#xD;&#xA;		ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3,&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1392" PostHistoryTypeId="1" PostId="392" RevisionGUID="a0716b15-10e2-4ae7-96b4-ac25eaea3f86" CreationDate="2022-02-22T10:38:43.907" UserId="299" Text="function or associated item not found in `parachain_info::Pallet&lt;Runtime&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="1393" PostHistoryTypeId="3" PostId="392" RevisionGUID="a0716b15-10e2-4ae7-96b4-ac25eaea3f86" CreationDate="2022-02-22T10:38:43.907" UserId="299" Text="|polkadot|parachain|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1394" PostHistoryTypeId="2" PostId="393" RevisionGUID="c20e1ab5-6a65-4f5c-9b58-2d52332ac87a" CreationDate="2022-02-22T11:10:39.897" UserId="67" Text="Working on [`libwallet`](https://github.com/virto-network/libwallet) we'd like to create a back-end for Rust friendly micro-controllers for possible future Substrate friendly hardware wallets. The nRF52 and other chips are very common in the embedded Rust ecosystem and come with their own crypto module that can sign/verify messages using the `ed25519` signature algorithm without exposing private keys but most Substrate chains use `sr25519` keys which are not likely to be supported natively by browsers or hardware providers.&#xD;&#xA;&#xD;&#xA;I'm not a cryptography expert so It might even be a dump question, but it's my understanding that Schnorr/Ristretto signatures are not much different from Ed25519 signatures. In the [docs](https://docs.rs/schnorrkel/latest/schnorrkel/sign/struct.Signature.html) of the schnorrkel implementation I find&#xD;&#xA;&#xD;&#xA;&gt; These cannot be converted to any Ed25519 signature because they hash curve points in the Ristretto encoding.&#xD;&#xA;&#xD;&#xA;From my developer understanding I get that the ristretto encoding part is a lossy process so going sr25519 -&gt; ed25519 is not possible but it would seem to me that is not impossible to do the opposite ed25519 -&gt; sr25519 ?  &#xD;&#xA;It would be really near to be able to use the available capabilities of those hardware modules to sign messages and convert them to Substrate compatible signatures, same for the public keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="1396" PostHistoryTypeId="1" PostId="393" RevisionGUID="c20e1ab5-6a65-4f5c-9b58-2d52332ac87a" CreationDate="2022-02-22T11:10:39.897" UserId="67" Text="Convert Ed25519 signature/pub-key to sr25519" ContentLicense="CC BY-SA 4.0" />
  <row Id="1397" PostHistoryTypeId="3" PostId="393" RevisionGUID="c20e1ab5-6a65-4f5c-9b58-2d52332ac87a" CreationDate="2022-02-22T11:10:39.897" UserId="67" Text="|cryptography|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1398" PostHistoryTypeId="2" PostId="394" RevisionGUID="fc57dfec-9676-42e5-90e4-059a29aa0371" CreationDate="2022-02-22T11:36:07.400" UserId="67" Text="From the [Substrate docs](https://docs.substrate.io/v3/runtime/metadata)&#xD;&#xA;&#xD;&#xA;&gt; Since the runtime of a Substrate blockchain is an evolving part of the&#xD;&#xA;&gt; blockchain's state, blockchain metadata is stored on a per-block&#xD;&#xA;&gt; basis. Be aware that querying the metadata for an older block (with an&#xD;&#xA;&gt; archive node, for example) could result in acquiring out-of-date&#xD;&#xA;&gt; metadata that is not compatible with a blockchain's current state.&#xD;&#xA;&#xD;&#xA;Metadata does change and two blocks can have different associated metadata versions, you shouldn't make assumptions about it staying the same but it's true that it doesn't change often. In your example `V14` means that the structure of the metadata will remain unchanged until the next version but doesn't mean the actual data cannot change, for example new pallets being added to the runtime won't change the `v14`, but new metadata will be available describing the newly added extrinsics/storage/etc.&#xD;&#xA;&#xD;&#xA;From a [comment in a related issue](https://github.com/paritytech/substrate/issues/10068#issuecomment-1027854200) I created some time ago. What you probably want is to subscribe for new version changes to fetch metadata only when the runtime is updated." ContentLicense="CC BY-SA 4.0" />
  <row Id="1400" PostHistoryTypeId="2" PostId="395" RevisionGUID="15fefbf8-8f8d-4fd3-9fd4-5f759eabaa9f" CreationDate="2022-02-22T11:47:56.093" UserId="434" Text="I noticed that every pallet (that i've checked) that has any events uses the following line in the pallets config trait:&#xD;&#xA;&#xD;&#xA;``` type Event: From&lt;Event&lt;Self, I&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;; ```&#xD;&#xA;&#xD;&#xA;Given the use of ```From``` i'm guessing the Runtime has one huge Event Enum that contains all pallet Event Enums. Is this the case? If so where is this declared in the Runtime as i cannot find it in the node implementation (if done by a Macro, can you provide some background info).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1402" PostHistoryTypeId="1" PostId="395" RevisionGUID="15fefbf8-8f8d-4fd3-9fd4-5f759eabaa9f" CreationDate="2022-02-22T11:47:56.093" UserId="434" Text="How are Events aggregated" ContentLicense="CC BY-SA 4.0" />
  <row Id="1403" PostHistoryTypeId="3" PostId="395" RevisionGUID="15fefbf8-8f8d-4fd3-9fd4-5f759eabaa9f" CreationDate="2022-02-22T11:47:56.093" UserId="434" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1404" PostHistoryTypeId="2" PostId="396" RevisionGUID="48e87727-cb6e-4a0e-9013-9b7b79e35350" CreationDate="2022-02-22T12:41:59.530" UserId="45" Text="When registering a parachain on a relay-chain you need to provide something called head data (or also referred as genesis state) and wasm.&#xD;&#xA;&#xD;&#xA;What is this head data and how do I get that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1406" PostHistoryTypeId="1" PostId="396" RevisionGUID="48e87727-cb6e-4a0e-9013-9b7b79e35350" CreationDate="2022-02-22T12:41:59.530" UserId="45" Text="What is head data and how do I get it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1407" PostHistoryTypeId="3" PostId="396" RevisionGUID="48e87727-cb6e-4a0e-9013-9b7b79e35350" CreationDate="2022-02-22T12:41:59.530" UserId="45" Text="|parachain|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1408" PostHistoryTypeId="2" PostId="397" RevisionGUID="3105b948-1e3e-406c-88a1-aa34ddf30f41" CreationDate="2022-02-22T12:41:59.530" UserId="45" Text="Parachains can be seen as a function `h' = f(h)`, where:&#xD;&#xA;&#xD;&#xA;- **f** is the wasm blob referred to as PVF (parachain validation function).&#xD;&#xA;- **h** is the current head data. &#xD;&#xA;- **h'** is the new head data.&#xD;&#xA;&#xD;&#xA;&quot;Head data&quot; is just a small payload of data. For example, Cumulus stores a Substrate block header in head data.&#xD;&#xA;&#xD;&#xA;Upon the registration of a parachain, h&lt;sub&gt;0&lt;/sub&gt; needs to be provided. This is a very first head data and in case of Cumulus that will be the block header of the genesis block, the block 0.&#xD;&#xA;&#xD;&#xA;In cumulus one can obtain head data using the `export-genesis-state` subcommand of cumulus-based collator. Similarly, genesis wasm can be obtain using `export-genesis-wasm`.&#xD;&#xA;&#xD;&#xA;More information can be found in [this tutorial](https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1410" PostHistoryTypeId="5" PostId="382" RevisionGUID="4b9fa6f6-cde0-47f3-ac41-d224d0959637" CreationDate="2022-02-22T12:44:26.443" UserId="45" Comment="make the answer more specific by adding a reference to another question" Text="Paras module exposes two dispatchables to control this:&#xD;&#xA;&#xD;&#xA;- [`force_set_current_code`](https://paritytech.github.io/polkadot/polkadot_runtime_parachains/paras/pallet/struct.Pallet.html#method.force_set_current_code)&#xD;&#xA;- [`force_set_current_head`](https://paritytech.github.io/polkadot/polkadot_runtime_parachains/paras/pallet/struct.Pallet.html#method.force_set_current_head)&#xD;&#xA;&#xD;&#xA;Using the relay-chain governance, you can call those functions to resubmit the code and genesis head for your registered para.&#xD;&#xA;&#xD;&#xA;Refer to this question to see what is head data and how to obtain it: https://substrate.stackexchange.com/questions/396/what-is-head-data-and-how-do-i-get-it/397#397&#xD;&#xA;&#xD;&#xA;Currently there is no way to clear the message queues, if you care about that." ContentLicense="CC BY-SA 4.0" />
  <row Id="1411" PostHistoryTypeId="6" PostId="378" RevisionGUID="7021af42-1f89-4894-bf96-c61a064bde6c" CreationDate="2022-02-22T12:44:42.787" UserId="85" Comment="more taggs" Text="|pallet|proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1412" PostHistoryTypeId="2" PostId="398" RevisionGUID="51569526-4267-4b15-aaf6-9a5edc1561a5" CreationDate="2022-02-22T12:54:00.027" UserId="138" Text="I am not a cryptography expert either, so your mileage may vary.&#xD;&#xA;&#xD;&#xA;Both scheme uses the same elliptic curve, but different sign/verify methods. SR25519 fixes more than one problems with EDDSA signatures (cofactors, overflow, no multisig). You cannot convert signatures either way, but you can theoretically reuse the same private keys in both signature schemes. But that would be a bad idea and would go against domain separation of keys.&#xD;&#xA;&#xD;&#xA;Most likely you will need to use the schnorrkel crate to run the algorithms on arithmetic instructions supported by your hardware." ContentLicense="CC BY-SA 4.0" />
  <row Id="1414" PostHistoryTypeId="2" PostId="399" RevisionGUID="e0b2bef6-027d-4e22-89d0-403448c8b3d8" CreationDate="2022-02-22T12:56:08.273" UserId="73" Text="`UncheckedExtrinsic` is the format in which the outside is sending the extrinsic to the node. This extrinsic is aware of the full structure, meaning it knows how to decode the `Call` signature etc. The `UncheckedExtrinsic` is converted to a `CheckedExtrinsic` in the process of applying an extrinsic. These are two structures, that you can not accidentally apply an `UncheckedExtrinsic`, because that one doesn't implement the required traits. Basically some trick to bring the status of the extrinsic to the type level. &#xD;&#xA;&#xD;&#xA;`OpaqueExtrinsic` is being used on the node side to represent an extrinsic. To support forkless upgrades Substrate has the separation of the node and the runtime. The idea is that the node should not know &quot;anything&quot; about the internals of the runtime. This includes supported `Call`s etc. The node is only using specified interfaces (called runtime api in the Substrate context) to talk to the runtime. As the node doesn't know the exact structure of the extrinsic and thus, it just keeps the extrinsic as `OpaqueExtrinsic`. This `OpaqueExtrinsic` is handling the extrinsic as `Vec&lt;u8&gt;`, because the `UncheckedExtrinsic` encoded format is similar to the one of a `Vec&lt;u8&gt;` (prefixed with a compact length). &#xD;&#xA;&#xD;&#xA;However, all of this can be changed. These are just the default types that ship with Substrate. If a Substrate implementer requires a different extrinsic format, they can just implement the required traits and then use this. Maybe this extrinsic format would give the node more insight to the extrinsic etc, but this is up to the implementer." ContentLicense="CC BY-SA 4.0" />
  <row Id="1416" PostHistoryTypeId="2" PostId="400" RevisionGUID="d47a96a1-1537-469d-b8d5-afd995a96451" CreationDate="2022-02-22T13:06:40.853" UserId="73" Text="Yes, you are right that every runtime has `Event` declaration that combines all the events of each pallet. It looks roughly like this:&#xD;&#xA;```rust&#xD;&#xA;enum Event {&#xD;&#xA;   System(frame_system::Event),&#xD;&#xA;   Balances(pallet_balances::Event),&#xD;&#xA;   ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This &quot;overarching&quot; event is generated by the `construct_runtime!` macro. &#xD;&#xA;&#xD;&#xA;You will find this concept of &quot;overarching&quot; types quite a lot in Substrate. Another good example is the `Call` enum that is doing the same as the `Event` enum. &#xD;&#xA;&#xD;&#xA;When you for example send an event from your custom pallet, it will be first converted to the overarching `Event` of the runtime. This is the reason for the `From` implementation you mentioned above. After that conversion the event is passed to `frame-system` to be stored in a `Vec&lt;Event&gt;` where `Event` is the overarching `Event` of the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="1418" PostHistoryTypeId="2" PostId="401" RevisionGUID="415bfe19-3ec8-4ba9-adf0-8eecb9ec6811" CreationDate="2022-02-22T13:11:39.073" UserId="458" Text="I am trying to send transaction to Ethereum signed using Substrate's sp_core edsa.&#xD;&#xA;&#xD;&#xA;        let seed: [u8;32] = [1;32];&#xD;&#xA;    let pair = ecdsa::Pair::from_seed(&amp;seed);&#xD;&#xA;    println!(&quot;Public key {:?}&quot;, pair.public());&#xD;&#xA;    let nonce: U256 = U256::from(1);&#xD;&#xA;    let tx = TransactionRequest::new().to(contract_add).data(data).nonce(nonce).chain_id(1);&#xD;&#xA;    println!(&quot;transaction re {:?}&quot;, tx);&#xD;&#xA;    let sighash = tx.sighash().0;&#xD;&#xA;    let signature = pair.sign(&amp;sighash);&#xD;&#xA;    let converted_sig = ethers_core::types::signature::Signature::try_from(&amp;signature.0[..]).unwrap();&#xD;&#xA;    let signed_encoded_tx = tx.rlp_signed(&amp;converted_sig);&#xD;&#xA;    let pendinf_tx = provider.send_raw_transaction(signed_encoded_tx).await.unwrap();&#xD;&#xA;&#xD;&#xA;But getting following error :-&#xD;&#xA;&#xD;&#xA;    JsonRpcClientError(JsonRpcError(JsonRpcError { code: -32000, message: &quot;invalid sender&quot;, data: None }))&#xD;&#xA;&#xD;&#xA;Also tried send same transaction signed using wallet and its working:-&#xD;&#xA;&#xD;&#xA;    let wallet: LocalWallet = &quot;380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567df&quot;&#xD;&#xA;         .parse().unwrap();&#xD;&#xA;&#xD;&#xA;    let nonce: U256 = U256::from(1);&#xD;&#xA;    let tx = TransactionRequest::new();&#xD;&#xA;    let tx = tx.to(thea_contract.clone()).data(data.clone()).nonce(nonce).chain_id(1);&#xD;&#xA;    let wallet = wallet.with_chain_id(3u64);&#xD;&#xA;    let sighash = tx.sighash().0;&#xD;&#xA;    let signature = wallet.sign_hash(H256::from(sighash), true);&#xD;&#xA;    let signed_encoded_tx = tx.rlp_signed(&amp;signature);&#xD;&#xA;    let pendinf_tx = provider.send_raw_transaction(signed_encoded_tx).await.unwrap();" ContentLicense="CC BY-SA 4.0" />
  <row Id="1420" PostHistoryTypeId="1" PostId="401" RevisionGUID="415bfe19-3ec8-4ba9-adf0-8eecb9ec6811" CreationDate="2022-02-22T13:11:39.073" UserId="458" Text="Send transaction to Ethereum signed using Substrate's sp_core" ContentLicense="CC BY-SA 4.0" />
  <row Id="1421" PostHistoryTypeId="3" PostId="401" RevisionGUID="415bfe19-3ec8-4ba9-adf0-8eecb9ec6811" CreationDate="2022-02-22T13:11:39.073" UserId="458" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1422" PostHistoryTypeId="6" PostId="136" RevisionGUID="397efaa2-ca58-43fd-85ec-799a87154ca8" CreationDate="2022-02-22T13:20:03.840" UserId="85" Comment="add tag" Text="|smart-contract|faucet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1427" PostHistoryTypeId="2" PostId="403" RevisionGUID="79a11697-783e-4fbf-9509-6b528946e122" CreationDate="2022-02-22T14:31:23.570" UserId="265" Text="when running a parachain, we can specify arguments for the relay chain, by adding a double-dash (`--`) separator between parachain and relay chain arguments, like so:&#xD;&#xA;```shell=&#xD;&#xA;$ calamari \&#xD;&#xA;    --name ' marmara' \&#xD;&#xA;    --base-path /var/lib/substrate \&#xD;&#xA;    ...&#xD;&#xA;    -- \&#xD;&#xA;    --name ' marmara' \&#xD;&#xA;    --telemetry-url 'wss://api.telemetry.manta.systems/submit/ 0' \&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;i have noticed that the `--name` parameter is always ignored when it appears in the relay chain arguments. this means that the node's relay-chain *telemetry name* is always set to a random name, which makes it difficult to identify a node quickly in a telemetry ui (eg: [here](https://telemetry.manta.systems/#list/0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe)).&#xD;&#xA;&#xD;&#xA;is it possible to set the node's relay-chain *telemetry name* either with a different argument or by modifying the parachain node binary source code to honour the `--name` parameter? it seems the parameter is just ignored (without error or warning). at least in my testing with manta/calamari and moonbeam/moonriver.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1429" PostHistoryTypeId="1" PostId="403" RevisionGUID="79a11697-783e-4fbf-9509-6b528946e122" CreationDate="2022-02-22T14:31:23.570" UserId="265" Text="how to specify the node's telemetry name for the relay chain when running a parachain node" ContentLicense="CC BY-SA 4.0" />
  <row Id="1430" PostHistoryTypeId="3" PostId="403" RevisionGUID="79a11697-783e-4fbf-9509-6b528946e122" CreationDate="2022-02-22T14:31:23.570" UserId="265" Text="|substrate-node|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1431" PostHistoryTypeId="2" PostId="404" RevisionGUID="cabe54fd-53e2-420c-9a5c-b2ea872a65e3" CreationDate="2022-02-22T14:36:07.540" UserId="452" Text="The way you are specifying it is correct but indeed it was being ignored and a random name was used instead. This was just fixed yesterday: https://github.com/paritytech/cumulus/pull/1008." ContentLicense="CC BY-SA 4.0" />
  <row Id="1433" PostHistoryTypeId="2" PostId="405" RevisionGUID="75d0fd3c-d517-4e69-b01b-2a38177332b4" CreationDate="2022-02-22T15:07:50.180" UserId="29" Text="The `sudo` key is currently controlled by Parity Tech:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/cumulus/rococo/#request-your-parachain-slot&#xD;&#xA;&#xD;&#xA;&gt; The Rococo `sudo` key is controlled by Parity tech at this time, so to&#xD;&#xA;&gt; have the operation required to get a slot, please place a request on&#xD;&#xA;&gt; the Parachain Technical matrix channel once you complete the above and&#xD;&#xA;&gt; are ready to connect! They will initiate the slot for you ASAP.&#xD;&#xA;&#xD;&#xA;If you have already been approved and downgraded from your slot, the article says:&#xD;&#xA;&#xD;&#xA;&gt; Please do note that when your temporary slot's lease ends, the&#xD;&#xA;&gt; parachain is automatically downgraded to a parathread. Registered and&#xD;&#xA;&gt; approved slots are cycled through automatically in a round-robin&#xD;&#xA;&gt; fashion, so you will expect to come back online as a parachain from&#xD;&#xA;&gt; time to time." ContentLicense="CC BY-SA 4.0" />
  <row Id="1435" PostHistoryTypeId="2" PostId="406" RevisionGUID="f11edf4e-0df7-4510-82e2-34fd1a3a34fd" CreationDate="2022-02-22T15:07:58.100" UserId="452" Text="The original question mixes some high-level sync concepts with implementation details, I'll try to clarify.&#xD;&#xA;&#xD;&#xA;From the point of view of a user there are 4 distinct sync modes:&#xD;&#xA;- Light sync - only downloads block headers and therefore transactions are not executed;&#xD;&#xA;- Full sync - &quot;regular&quot; sync where block headers and bodies are downloaded sequentially from genesis and transactions are executed (so state storage is maintained);&#xD;&#xA;- Light state sync - only downloads block headers but once the chain is synced it downloads the whole state of the best block (rather than executing the transactions from genesis in order to create it);&#xD;&#xA;- Warp sync - initially download the best block and the whole state at this block, and finality proofs (currently from GRANDPA) for all validator set transitions from genesis up until the best block. After the initial warp sync is done (and therefore the node is ready to import the latest blocks) historical blocks can be downloaded in the background.&#xD;&#xA;&#xD;&#xA;Going back to terms pointed in the original question:&#xD;&#xA;- Gap sync is, optionally, used by warp sync to sync the historical blocks, i.e. the blocks from genesis up until the block we warped to;&#xD;&#xA;- State sync is used by light state sync and warp sync in order to download the latest state storage at a given block;&#xD;&#xA;- Fork sync is for tracking requests for syncing a specific chain (fork). It is only used after the node is fully synced (through any of the mechanisms above) and is following the latest blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="1437" PostHistoryTypeId="2" PostId="407" RevisionGUID="ffd6d23f-6ed1-4383-baf4-7bbc27215887" CreationDate="2022-02-22T15:12:05.350" UserId="251" Text="I have just integrated BEEFY into my runtime.&#xD;&#xA;A single node works well.&#xD;&#xA;But it can not gossip.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;add_set_reserved_peer with unknown protocol: /paritytech/beefy/1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1439" PostHistoryTypeId="1" PostId="407" RevisionGUID="ffd6d23f-6ed1-4383-baf4-7bbc27215887" CreationDate="2022-02-22T15:12:05.350" UserId="251" Text="`add_set_reserved_peer` with Unknown Protocol" ContentLicense="CC BY-SA 4.0" />
  <row Id="1440" PostHistoryTypeId="3" PostId="407" RevisionGUID="ffd6d23f-6ed1-4383-baf4-7bbc27215887" CreationDate="2022-02-22T15:12:05.350" UserId="251" Text="|beefy|gossip|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1444" PostHistoryTypeId="5" PostId="407" RevisionGUID="762c4949-09a2-4a24-bccc-7320c74d55af" CreationDate="2022-02-22T15:33:06.263" UserId="251" Comment="added 344 characters in body" Text="I have just integrated BEEFY into my runtime.&#xD;&#xA;A single node works well.&#xD;&#xA;But it can not gossip.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;add_set_reserved_peer with unknown protocol: /paritytech/beefy/1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this?&#xD;&#xA;&#xD;&#xA;It looks like I need this update https://github.com/paritytech/substrate/commit/0f070c8020fad552247fd4b43c1a6a4506e456b5.&#xD;&#xA;&#xD;&#xA;But the old name should work too.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Old names for the notifications protocol, used for backward compatibility.&#xD;&#xA;pub(crate) const LEGACY_NAMES: [&amp;'static str; 1] = [&quot;/paritytech/beefy/1&quot;];&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any idea?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1445" PostHistoryTypeId="2" PostId="409" RevisionGUID="659e76f1-3650-4f95-b61f-312473039bd9" CreationDate="2022-02-22T15:42:40.247" UserId="452" Text="The validator identities are the same throughout an entire era, i.e. new validator elections only happen once per era, but every session the validators can use new session keys (https://docs.substrate.io/v3/concepts/session-keys/), but these session keys are still tied to the same validator identities.&#xD;&#xA;&#xD;&#xA;`Epoch` and `Session` are essentially synonyms, BABE just uses the epoch terminology since that's what is used in its paper.&#xD;&#xA;&#xD;&#xA;I think learning about stash / controller / session keys might help with understanding what I mean by &quot;validator identities&quot; (https://wiki.polkadot.network/docs/learn-keys)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1447" PostHistoryTypeId="5" PostId="405" RevisionGUID="e9710518-1948-4e64-89d2-66733e3be1c9" CreationDate="2022-02-22T15:46:33.080" UserId="29" Comment="added 648 characters in body" Text="Looks like your error is coming from the rococo pallet with index 31 so that would be the [AssignedSlots pallet](https://github.com/paritytech/polkadot/blob/v0.9.16/runtime/rococo/src/lib.rs#L243), and specifically Error 1 which is [Cannot Onboard](https://github.com/paritytech/polkadot/blob/ccf7f7ffffe818d84bcf954152446e7a14dccbc9/runtime/parachains/src/paras/mod.rs#L497): &#xD;&#xA;&#xD;&#xA;&gt; Para cannot be onboarded because it is already tracked by our system.&#xD;&#xA;&#xD;&#xA;Which makes sense in your case because you mentioned that you are looking to extend therefore you're already in the system...&#xD;&#xA;&#xD;&#xA;So the issue that I see is a couple things...&#xD;&#xA;&#xD;&#xA;The `sudo` key is currently controlled by Parity Tech:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/cumulus/rococo/#request-your-parachain-slot&#xD;&#xA;&#xD;&#xA;&gt; The Rococo `sudo` key is controlled by Parity tech at this time, so to&#xD;&#xA;&gt; have the operation required to get a slot, please place a request on&#xD;&#xA;&gt; the Parachain Technical matrix channel once you complete the above and&#xD;&#xA;&gt; are ready to connect! They will initiate the slot for you ASAP.&#xD;&#xA;&#xD;&#xA;Additionally, if you have already been approved and downgraded from your slot, the article says:&#xD;&#xA;&#xD;&#xA;&gt; Please do note that when your temporary slot's lease ends, the&#xD;&#xA;&gt; parachain is automatically downgraded to a parathread. Registered and&#xD;&#xA;&gt; approved slots are cycled through automatically in a round-robin&#xD;&#xA;&gt; fashion, so you will expect to come back online as a parachain from&#xD;&#xA;&gt; time to time." ContentLicense="CC BY-SA 4.0" />
  <row Id="1448" PostHistoryTypeId="2" PostId="410" RevisionGUID="766865c7-c783-4d47-80e2-0be40a1d5e30" CreationDate="2022-02-22T15:46:44.120" UserId="361" Text="You code is trying to access the Pallet struct directly while what you want to do is access a value *within* the pallet.&#xD;&#xA;If you e.g. check the [parachain template here](https://github.com/substrate-developer-hub/substrate-parachain-template/blob/200d26e5e2c1be0eed3f2b75d8d33c76c048db3b/runtime/src/lib.rs#L391) it calls `parachain_id` which is what you are probably interested in.&#xD;&#xA;```Rust&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1450" PostHistoryTypeId="10" PostId="378" RevisionGUID="54b800f5-3109-4df0-9ec9-8eee9085d6ea" CreationDate="2022-02-22T15:59:04.813" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:112,&quot;DisplayName&quot;:&quot;Joe Kerr&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;}]}" />
  <row Id="1451" PostHistoryTypeId="5" PostId="405" RevisionGUID="708a9ae2-ea57-412d-9a5b-225697c0d5b0" CreationDate="2022-02-22T16:08:30.557" UserId="29" Comment="added 551 characters in body" Text="Looks like your error is coming from the rococo pallet with index 31 so that would be the [AssignedSlots pallet](https://github.com/paritytech/polkadot/blob/v0.9.16/runtime/rococo/src/lib.rs#L243), and specifically Error 1 which is [Cannot Onboard](https://github.com/paritytech/polkadot/blob/ccf7f7ffffe818d84bcf954152446e7a14dccbc9/runtime/parachains/src/paras/mod.rs#L497): &#xD;&#xA;&#xD;&#xA;&gt; Para cannot be onboarded because it is already tracked by our system.&#xD;&#xA;&#xD;&#xA;Which makes sense in your case because you mentioned that you are looking to extend therefore you're already in the system...&#xD;&#xA;&#xD;&#xA;So the issue that I see is a couple things...&#xD;&#xA;&#xD;&#xA;The `sudo` key is currently controlled by Parity Tech:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/cumulus/rococo/#request-your-parachain-slot&#xD;&#xA;&#xD;&#xA;&gt; The Rococo `sudo` key is controlled by Parity tech at this time, so to&#xD;&#xA;&gt; have the operation required to get a slot, please place a request on&#xD;&#xA;&gt; the Parachain Technical matrix channel once you complete the above and&#xD;&#xA;&gt; are ready to connect! They will initiate the slot for you ASAP.&#xD;&#xA;&gt; &#xD;&#xA;&gt; At this point, requesting a permanent or temporary parachain slot&#xD;&#xA;&gt; still a privileged (sudo) operation to be performed by the (Rococo)&#xD;&#xA;&gt; test chain's operator (using a call to the assignedSlots pallet's&#xD;&#xA;&gt; dispatchable functions) but the long-term plan is to make it a&#xD;&#xA;&gt; community-driven process via Rococo's governance framework.&#xD;&#xA;&#xD;&#xA;Additionally, if you have already been approved and downgraded from your slot:&#xD;&#xA;&#xD;&#xA;&gt; Please do note that when your temporary slot's lease ends, the&#xD;&#xA;&gt; parachain is automatically downgraded to a parathread. Registered and&#xD;&#xA;&gt; approved slots are cycled through automatically in a round-robin&#xD;&#xA;&gt; fashion, so you will expect to come back online as a parachain from&#xD;&#xA;&gt; time to time.&#xD;&#xA;&#xD;&#xA;A note on **Temporary** Parachain Slots on Rococo:&#xD;&#xA;&#xD;&#xA;&gt; Temporary slots are parachain slots that are dynamically allocated in&#xD;&#xA;&gt; a continuous rollover manner. Concretely, at every start of a lease&#xD;&#xA;&gt; period, a certain number of parathreads (up to a maximum defined in&#xD;&#xA;&gt; the relay chain's configuration) will be automatically upgraded to&#xD;&#xA;&gt; parachains for a certain duration. The parachains that were active&#xD;&#xA;&gt; during the ending lease period will be automatically downgraded to&#xD;&#xA;&gt; parathreads to free the slots for others to use in the subsequent one." ContentLicense="CC BY-SA 4.0" />
  <row Id="1453" PostHistoryTypeId="2" PostId="411" RevisionGUID="6773076b-bdd0-443f-8aca-1bee6414f0bd" CreationDate="2022-02-22T16:47:42.383" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="1455" PostHistoryTypeId="1" PostId="411" RevisionGUID="6773076b-bdd0-443f-8aca-1bee6414f0bd" CreationDate="2022-02-22T16:47:42.383" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="1456" PostHistoryTypeId="2" PostId="412" RevisionGUID="ae47a315-d481-4d8b-ba9e-0d773b56bc1e" CreationDate="2022-02-22T16:47:42.383" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="1458" PostHistoryTypeId="1" PostId="412" RevisionGUID="ae47a315-d481-4d8b-ba9e-0d773b56bc1e" CreationDate="2022-02-22T16:47:42.383" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="1459" PostHistoryTypeId="2" PostId="413" RevisionGUID="07e38552-9658-4aac-8320-723b310070c2" CreationDate="2022-02-22T19:25:17.250" UserId="286" Text="Am I fundamentally misunderstanding how staking handles election timings, please?  I expected that we get a validator election every era, so reducing the session per era should increase the frequency of elections.  I found and modified this constant:&#xD;&#xA;&#xD;&#xA;```pub const SessionsPerEra: sp_staking::SessionIndex = 2;``` in bin/node/runtime/src/lib.rs&#xD;&#xA;&#xD;&#xA;It's showing as change in storage according to Polkadot.js, but I'm still getting 6 sessions per era away? (Chain started from genesis this setting.)&#xD;&#xA;&#xD;&#xA;[![staking.sessionsPerEra, staking.currentEra and session.currentInde][1]][1]&#xD;&#xA;&#xD;&#xA;I'm tempted to think it's a misunderstanding on my part rather than a bug? Can someone enlighten me please?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WtMkH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1461" PostHistoryTypeId="1" PostId="413" RevisionGUID="07e38552-9658-4aac-8320-723b310070c2" CreationDate="2022-02-22T19:25:17.250" UserId="286" Text="SessionsPerEra doesn't seem to be affecting session per era" ContentLicense="CC BY-SA 4.0" />
  <row Id="1462" PostHistoryTypeId="3" PostId="413" RevisionGUID="07e38552-9658-4aac-8320-723b310070c2" CreationDate="2022-02-22T19:25:17.250" UserId="286" Text="|session|epoch|era|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1464" PostHistoryTypeId="5" PostId="413" RevisionGUID="ab5d89fa-6412-49bd-b6a0-6da2051ef58f" CreationDate="2022-02-22T20:12:59.257" UserId="286" Comment="typos" Text="Am I fundamentally misunderstanding how staking handles election timings, please?  I expected that we get a validator election every era, so reducing the sessions per era should increase the frequency of elections.  I found and modified this constant:&#xD;&#xA;&#xD;&#xA;```pub const SessionsPerEra: sp_staking::SessionIndex = 2;``` in bin/node/runtime/src/lib.rs&#xD;&#xA;&#xD;&#xA;It's showing as changed in storage according to Polkadot.js, but I'm still getting 6 sessions per era anyway? (Chain started from genesis with this setting.)&#xD;&#xA;&#xD;&#xA;[![staking.sessionsPerEra, staking.currentEra and session.currentInde][1]][1]&#xD;&#xA;&#xD;&#xA;I'm tempted to think it's a misunderstanding on my part rather than a bug? Can someone enlighten me please?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WtMkH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1465" PostHistoryTypeId="4" PostId="413" RevisionGUID="293c88ed-5735-4fa5-b8e5-c61607fea88e" CreationDate="2022-02-22T20:48:03.527" UserId="286" Comment="edited title" Text="SessionsPerEra doesn't seem to be affecting sessions per era" ContentLicense="CC BY-SA 4.0" />
  <row Id="1466" PostHistoryTypeId="5" PostId="406" RevisionGUID="746b5a64-9def-42b3-93af-651f38d344cb" CreationDate="2022-02-22T22:16:57.713" UserId="452" Comment="added 10 characters in body" Text="The original question mixes some high-level sync concepts with implementation details, I'll try to clarify.&#xD;&#xA;&#xD;&#xA;From the point of view of a user there are 4 distinct sync modes:&#xD;&#xA;- Light sync - only downloads block headers and therefore transactions are not executed;&#xD;&#xA;- Full sync - &quot;regular&quot; sync where block headers and bodies are downloaded sequentially from genesis and transactions are executed (so state storage is maintained);&#xD;&#xA;- Light state sync - only downloads block headers but once the chain is synced it downloads the whole state of the best block (rather than executing the transactions from genesis in order to create it);&#xD;&#xA;- Warp sync - initially download the best finalized block and the whole state at this block, and finality proofs (currently from GRANDPA) for all validator set transitions from genesis up until the best finalized block. After the initial warp sync is done (and therefore the node is ready to import the latest blocks) historical blocks can be downloaded in the background.&#xD;&#xA;&#xD;&#xA;Going back to terms pointed in the original question:&#xD;&#xA;- Gap sync is, optionally, used by warp sync to sync the historical blocks, i.e. the blocks from genesis up until the block we warped to;&#xD;&#xA;- State sync is used by light state sync and warp sync in order to download the latest state storage at a given block;&#xD;&#xA;- Fork sync is for tracking requests for syncing a specific chain (fork). It is only used after the node is fully synced (through any of the mechanisms above) and is following the latest blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="1467" PostHistoryTypeId="2" PostId="414" RevisionGUID="750ed9c5-b5ee-4752-b9ec-71c5f9558d4e" CreationDate="2022-02-22T22:57:22.373" UserId="468" Text="In the docs for `CurrencyToVote` it says &#xD;&#xA;&gt; the total issuance being passed in implies that the implementation must be aware of the fact that its values can affect the outcome. This implies that if the vote value is dependent on the total issuance, **it should never be written to storage for later re-use**.&#xD;&#xA;&#xD;&#xA;And in `U128CurrencyToVote` (used by Polkadot), balances get divided by how many times the total issuance fits into a `u64`. &#xD;&#xA;&#xD;&#xA;But the `BagsList` pallet stores these weights [here][1] and uses them for ordering. Does this mean that every time the total issuance hits a multiple of `u64::MAX`, new updates in the list are wildly out of sync with previous inserts (with those previous inserts having a much larger weight)?&#xD;&#xA;&#xD;&#xA;It also feels a little silly to use a `u64` type for vote weights when the `total_issuance` in `pallet-balances` already has to fit into a `Balance` type which is  a `u128` for most chains.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/rustdocs/latest/src/pallet_bags_list/lib.rs.html#232-301" ContentLicense="CC BY-SA 4.0" />
  <row Id="1469" PostHistoryTypeId="1" PostId="414" RevisionGUID="750ed9c5-b5ee-4752-b9ec-71c5f9558d4e" CreationDate="2022-02-22T22:57:22.373" UserId="468" Text="How does `pallet-bags-list` account for total issuance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1470" PostHistoryTypeId="3" PostId="414" RevisionGUID="750ed9c5-b5ee-4752-b9ec-71c5f9558d4e" CreationDate="2022-02-22T22:57:22.373" UserId="468" Text="|pallet|balances|bags-list|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1473" PostHistoryTypeId="5" PostId="413" RevisionGUID="c3622910-6ab7-42b4-8f31-cafdfaa377b9" CreationDate="2022-02-22T23:07:01.167" UserId="286" Comment="added 119 characters in body" Text="**The issue may be that my node code and the runtime block in the chainspec were inconsistent - still confirming.**&#xD;&#xA;&#xD;&#xA;Am I fundamentally misunderstanding how staking handles election timings, please?  I expected that we get a validator election every era, so reducing the sessions per era should increase the frequency of elections.  I found and modified this constant:&#xD;&#xA;&#xD;&#xA;```pub const SessionsPerEra: sp_staking::SessionIndex = 2;``` in bin/node/runtime/src/lib.rs&#xD;&#xA;&#xD;&#xA;It's showing as changed in storage according to Polkadot.js, but I'm still getting 6 sessions per era anyway? (Chain started from genesis with this setting.)&#xD;&#xA;&#xD;&#xA;[![staking.sessionsPerEra, staking.currentEra and session.currentInde][1]][1]&#xD;&#xA;&#xD;&#xA;I'm tempted to think it's a misunderstanding on my part rather than a bug? Can someone enlighten me please?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WtMkH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1479" PostHistoryTypeId="2" PostId="416" RevisionGUID="872ba68c-469e-4747-8664-6b092f9ca421" CreationDate="2022-02-23T01:46:22.673" UserId="238" Text="Is it possible to get the set of keys from a Storage Map on Substrate. It doesn’t seem like Substrate exposes a method to do so: https://docs.substrate.io/rustdocs/latest/frame_support/storage/trait.StorageMap.html#required-methods." ContentLicense="CC BY-SA 4.0" />
  <row Id="1481" PostHistoryTypeId="1" PostId="416" RevisionGUID="872ba68c-469e-4747-8664-6b092f9ca421" CreationDate="2022-02-23T01:46:22.673" UserId="238" Text="Set of Keys from a Storage Map" ContentLicense="CC BY-SA 4.0" />
  <row Id="1482" PostHistoryTypeId="3" PostId="416" RevisionGUID="872ba68c-469e-4747-8664-6b092f9ca421" CreationDate="2022-02-23T01:46:22.673" UserId="238" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1483" PostHistoryTypeId="2" PostId="418" RevisionGUID="0a341a10-e0d3-4793-8254-c01cb13b4bad" CreationDate="2022-02-23T02:18:52.830" UserId="129" Text="I'm trying to upload the flipper contract to Beresheet (Edgeware testnet) but after submitting, I got this contract.NewContractNotFunded error and the extrinsic failed.&#xD;&#xA;I search the error on Google and found [this description][1]:&#xD;&#xA;&#xD;&#xA;&gt; The newly created contract is below the subsistence threshold after executing its contructor. No contracts are allowed to exist below that threshold.&#xD;&#xA;&#xD;&#xA;And this:&#xD;&#xA;&#xD;&#xA;&gt; **Subsistence Threshold**  &#xD;&#xA;&gt; The runtime must make sure that any allowed dispatchable makes sure that the total_balance of the contract stays above Pallet::subsistence_threshold(). Otherwise users could clutter the storage with contracts.&#xD;&#xA;&#xD;&#xA;What exactly the `total_balance` of a contract is? How can I resolve this problem?&#xD;&#xA;&#xD;&#xA;Side question: Is there anyway to call a smart contract in the polkadot.js UI?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/pallet-contracts/2.0.0/pallet_contracts/enum.Error.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="1485" PostHistoryTypeId="1" PostId="418" RevisionGUID="0a341a10-e0d3-4793-8254-c01cb13b4bad" CreationDate="2022-02-23T02:18:52.830" UserId="129" Text="NewContractNotFunded Error after submitting a smart contract on BereSheet" ContentLicense="CC BY-SA 4.0" />
  <row Id="1486" PostHistoryTypeId="3" PostId="418" RevisionGUID="0a341a10-e0d3-4793-8254-c01cb13b4bad" CreationDate="2022-02-23T02:18:52.830" UserId="129" Text="|smart-contract|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1489" PostHistoryTypeId="2" PostId="419" RevisionGUID="a0d72151-4e36-4e6b-9ad4-fab9515ae11e" CreationDate="2022-02-23T05:00:16.293" UserId="28" Text="The FRAME `StorageMap` also implements [`IterableStorageMap`](https://docs.substrate.io/rustdocs/latest/frame_support/storage/trait.IterableStorageMap.html) which allows you to iterate over the keys and/or values of the map:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait IterableStorageMap&lt;K: FullEncode, V: FullCodec&gt;: StorageMap&lt;K, V&gt; {&#xD;&#xA;    type Iterator: Iterator&lt;Item = (K, V)&gt;;&#xD;&#xA;    type KeyIterator: Iterator&lt;Item = K&gt;;&#xD;&#xA;    fn iter() -&gt; Self::Iterator;&#xD;&#xA;    fn iter_from(starting_raw_key: Vec&lt;u8&gt;) -&gt; Self::Iterator;&#xD;&#xA;    fn iter_keys() -&gt; Self::KeyIterator;&#xD;&#xA;    fn iter_keys_from(starting_raw_key: Vec&lt;u8&gt;) -&gt; Self::KeyIterator;&#xD;&#xA;    fn drain() -&gt; Self::Iterator;&#xD;&#xA;    fn translate&lt;O: Decode, F: FnMut(K, O) -&gt; Option&lt;V&gt;&gt;(f: F);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, you should probably never use this in your runtime in an unbounded way. Iterating over the N keys of your storage map would require N database reads, which can be extremely expensive for your runtime weight.&#xD;&#xA;&#xD;&#xA;Instead you should use something like `fn iter_keys_from` where you can pick a specific key to start iterating from, and control how many keys you iterate in a single call." ContentLicense="CC BY-SA 4.0" />
  <row Id="1491" PostHistoryTypeId="2" PostId="420" RevisionGUID="feea3812-b8a6-4720-b551-4efce6863aed" CreationDate="2022-02-23T06:36:51.683" UserId="377" Text="Do we have cli wallet like solana on polkadot or we just have polkadot extension to handle this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1493" PostHistoryTypeId="1" PostId="420" RevisionGUID="feea3812-b8a6-4720-b551-4efce6863aed" CreationDate="2022-02-23T06:36:51.683" UserId="377" Text="Do we have any cli wallet in polkadot/substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1494" PostHistoryTypeId="3" PostId="420" RevisionGUID="feea3812-b8a6-4720-b551-4efce6863aed" CreationDate="2022-02-23T06:36:51.683" UserId="377" Text="|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1495" PostHistoryTypeId="5" PostId="378" RevisionGUID="6c925ef9-d57e-4cc5-9c61-ea7b1f6ace6c" CreationDate="2022-02-23T06:38:52.340" UserId="377" Comment="added 8 characters in body" Text="I want to use the proxy pallet in my code. Do we have any sample Substrate example code to use it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1497" PostHistoryTypeId="6" PostId="403" RevisionGUID="adf7a82e-875d-4fb2-8517-dda4fc1424f0" CreationDate="2022-02-23T07:20:00.223" UserId="452" Comment="The question is related specifically to cumulus" Text="|parachain|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1498" PostHistoryTypeId="24" PostId="403" RevisionGUID="adf7a82e-875d-4fb2-8517-dda4fc1424f0" CreationDate="2022-02-23T07:20:00.223" Comment="Proposed by 452 approved by 265 edit id of 62" ContentLicense="CC BY-SA 4.0" />
  <row Id="1499" PostHistoryTypeId="2" PostId="421" RevisionGUID="2989a66d-d723-4938-a419-b1b89a03f2f5" CreationDate="2022-02-23T08:29:54.607" UserId="129" Text=" I want to build in ink! version 3.0.0-rc7 for example." ContentLicense="CC BY-SA 4.0" />
  <row Id="1501" PostHistoryTypeId="1" PostId="421" RevisionGUID="2989a66d-d723-4938-a419-b1b89a03f2f5" CreationDate="2022-02-23T08:29:54.607" UserId="129" Text="How do I build smart contract with certain version of ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1502" PostHistoryTypeId="3" PostId="421" RevisionGUID="2989a66d-d723-4938-a419-b1b89a03f2f5" CreationDate="2022-02-23T08:29:54.607" UserId="129" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1503" PostHistoryTypeId="2" PostId="422" RevisionGUID="d35862dd-a1f7-4c1d-b7bc-a9d27b2d524f" CreationDate="2022-02-23T08:44:31.960" UserId="227" Text="You can set a fixed dependency version in your `Cargo.toml` by using `=` in front of the version number. For example, like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ink_primitives = { version = &quot;=3.0.0-rc9&quot;, default-features = false }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So you would just have to prefix all ink! `version` entries in your `Cargo.toml` with a `=`.&#xD;&#xA;&#xD;&#xA;Due to the nature of semantic versioning (https://semver.org/) the newest release candidate is always fetched automatically, so you have to pin the explicit version if you want to keep a certain one." ContentLicense="CC BY-SA 4.0" />
  <row Id="1505" PostHistoryTypeId="12" PostId="407" RevisionGUID="d35a9274-b8dc-4a3f-8fd0-387dc1759fff" CreationDate="2022-02-23T08:54:32.447" UserId="251" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;}]}" />
  <row Id="1506" PostHistoryTypeId="13" PostId="407" RevisionGUID="53d73147-0f1f-4c1c-a569-53ea4a052ebd" CreationDate="2022-02-23T08:54:52.140" UserId="251" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;}]}" />
  <row Id="1507" PostHistoryTypeId="5" PostId="407" RevisionGUID="2fe399a4-42ac-4217-b223-7f54dc90156e" CreationDate="2022-02-23T08:55:06.080" UserId="251" Comment="deleted 344 characters in body" Text="I have just integrated BEEFY into my runtime.&#xD;&#xA;A single node works well.&#xD;&#xA;But it can not gossip.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;add_set_reserved_peer with unknown protocol: /paritytech/beefy/1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1508" PostHistoryTypeId="2" PostId="423" RevisionGUID="9aec9320-b061-4d3c-aaf4-5223d6424469" CreationDate="2022-02-23T08:58:28.173" UserId="251" Text="Add this config into service.rs.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;config&#xD;&#xA;	.network&#xD;&#xA;	.extra_sets&#xD;&#xA;	.push(beefy_gadget::beefy_peers_set_config());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1512" PostHistoryTypeId="2" PostId="424" RevisionGUID="fbec16c2-c614-4fe8-af34-a9cda32d2344" CreationDate="2022-02-23T09:30:29.513" UserId="165" Text="As Bruno's answer mentions, once your para is register for a temporary slot it will get onboarded and offboarded automatically following the pallet config.&#xD;&#xA;&#xD;&#xA;Note that your para can only be registered for one, either temporary or permanent, type of slot simultaneously. So if you are looking for changing your para from a temp slot to a permanent one you need to de-register it first from temporary slots so you can register it as a permanent one. " ContentLicense="CC BY-SA 4.0" />
  <row Id="1514" PostHistoryTypeId="5" PostId="424" RevisionGUID="89d376ac-d187-476d-9cf9-38e5d538aa02" CreationDate="2022-02-23T09:37:08.413" UserId="165" Comment="added 634 characters in body" Text="As Bruno's answer mentions, once your para is register for a temporary slot it will get onboarded and offboarded automatically following the pallet config.&#xD;&#xA;&#xD;&#xA;Note that your para can only be registered ony for one, either temporary or permanent, type of slot at the same time. So if you are looking for changing your para from a temp slot to a permanent one you need to de-register it first from temporary slots so you can register it as a permanent one. &#xD;&#xA;&#xD;&#xA;When it comes to detection of errors what you need to know is that the message shows the following info:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Err: {&#xD;&#xA;    Module: {&#xD;&#xA;      index: 31 --&gt; Index of the pallet throwing the error &#xD;&#xA;      error: 1 --&gt; Index of the error in such pallet&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Index of a pallet is defined by its position in `contruct_runtime!` of the runtime. This value can also be defined explicitly like so&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;construct_runtime! {&#xD;&#xA;    // -- snip&#xD;&#xA;    XcmPallet: pallet_xcm = 99, --&gt; index is 99 for this pallet&#xD;&#xA;    // -- snip&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;[source](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs#L296)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1516" PostHistoryTypeId="2" PostId="425" RevisionGUID="73c1c891-bcd5-4e43-b2ff-cef6bf8381e7" CreationDate="2022-02-23T09:49:54.657" UserId="165" Text="For the curious, parachain heads are maintained in the relay chain storage using a map, defined as &#xD;&#xA;```rust&#xD;&#xA;// The head-data of every registered para.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn para_head)]&#xD;&#xA;	pub(super) type Heads&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, ParaId, HeadData&gt;; &#xD;&#xA;```&#xD;&#xA;Source from polkadot code base: https://github.com/paritytech/polkadot/blob/aa4b5fc5df538fe281af8379fba45bc1937a2dd9/runtime/parachains/src/paras/mod.rs#L550-L553" ContentLicense="CC BY-SA 4.0" />
  <row Id="1518" PostHistoryTypeId="2" PostId="426" RevisionGUID="03c96feb-6c07-4ed9-9ec9-8db8826dfbb9" CreationDate="2022-02-23T11:42:39.167" UserId="452" Text="AFAIK there is no actively developed CLI wallet for polkadot/substrate. There is [subwallet](https://github.com/uni-arts-chain/subwallet) which is a CLI wallet with support for basic functionality (like transfers), but it seems to be unmaintained at this point.&#xD;&#xA;&#xD;&#xA;If you are interested in creating a CLI wallet I would suggest that you use [subxt](https://github.com/paritytech/subxt) to build it." ContentLicense="CC BY-SA 4.0" />
  <row Id="1520" PostHistoryTypeId="2" PostId="427" RevisionGUID="22f52eac-05a5-428d-a672-45a70d878c96" CreationDate="2022-02-23T12:07:51.377" UserId="472" Text="Getting this error while trying to build an Ink! contract with a message accepting a reference argument&#xD;&#xA;&#xD;&#xA;       |&#xD;&#xA;    95 |         pub fn some_message(&amp;self, account_id: &amp;AccountId) -&gt; bool {&#xD;&#xA;       |                                                    ^ expected named lifetime parameter&#xD;&#xA;       |&#xD;&#xA;    help: consider introducing a named lifetime parameter&#xD;&#xA;&#xD;&#xA;Adding a named lifetime parameter (as suggested by compiler) doesn't help either:&#xD;&#xA;&#xD;&#xA;    error: ink! messages must not be generic&#xD;&#xA;      --&gt; /home/greez/dev/polkadot/ink/examples/is-contract/lib.rs:95:29&#xD;&#xA;       |&#xD;&#xA;    95 |         pub fn some_message&lt;'a&gt;(&amp;self, account_id: &amp;'a AccountId) -&gt; bool {&#xD;&#xA;       |                             ^^&#xD;&#xA;    &#xD;&#xA;    error: could not compile `is_contract` due to previous error&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1522" PostHistoryTypeId="1" PostId="427" RevisionGUID="22f52eac-05a5-428d-a672-45a70d878c96" CreationDate="2022-02-23T12:07:51.377" UserId="472" Text="Can't pass a reference as an argument to an Ink! contract message (or constructor)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1523" PostHistoryTypeId="3" PostId="427" RevisionGUID="22f52eac-05a5-428d-a672-45a70d878c96" CreationDate="2022-02-23T12:07:51.377" UserId="472" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1524" PostHistoryTypeId="2" PostId="428" RevisionGUID="1aad3a31-6544-4ff2-ae88-d2b34fdec2a9" CreationDate="2022-02-23T12:07:51.377" UserId="472" Text="The reason for this issue is that currently Ink! messages and constructors are not allowed to take simple references as arguments, as they are required to be `Sized` and `scale::Decode`. &#xD;&#xA;&#xD;&#xA;Until this has been improved (see this tracking [issue](https://github.com/paritytech/ink/issues/989)), possible workaround could be to add private methods that take their arguments as references, to call them from inside messages or constructors." ContentLicense="CC BY-SA 4.0" />
  <row Id="1526" PostHistoryTypeId="2" PostId="429" RevisionGUID="a6cc82a0-7c65-42ec-b9df-c8db4b0e8d71" CreationDate="2022-02-23T12:11:49.993" UserId="452" Text="AFAIK there is currently no &quot;production-grade&quot; .NET library which will dynamically generate API code from the chain metadata. &#xD;&#xA;&#xD;&#xA;Fortunately there seems to be work happening on it. There is now [Ajuna.NetApi](https://github.com/ajuna-network/Ajuna.NetApi) (which is a fork/rewrite of [SubstrateNetApi](https://github.com/ajuna-network/SubstrateNetApi)), and it focuses on generating API code from chain metadata. It seems to still be in development and documentation is scarce. I don't have any experience with any of these libraries so can't personally vouch for them." ContentLicense="CC BY-SA 4.0" />
  <row Id="1528" PostHistoryTypeId="2" PostId="430" RevisionGUID="8c6a9321-3ab8-48b1-83d5-810052082d48" CreationDate="2022-02-23T12:17:15.047" UserId="474" Text="For the sake of answering this question (though I have replied to you elsewhere already on this topic); The transaction format is not just a simple SCALE encoding of some details. In rust pseudocode, a transaction will have roughly this format&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Length in bytes of the extrinsic data to follow: &#xD;&#xA;let byte_len = &lt;Compact&lt;u32&gt;&gt;::decode(input)?;&#xD;&#xA;&#xD;&#xA;// decode a byte consisting of the bits 0bABBBBBBB.&#xD;&#xA;// - if A is 1, a signature follows, and if it is 0 there is no signature&#xD;&#xA;// - the bits B decode to the transaction protocol version, currently 4.&#xD;&#xA;let version_and_sig = u8::decode(input)?;&#xD;&#xA;let is_signature = (version_and_sig &amp; b10000000) &gt; 0;&#xD;&#xA;&#xD;&#xA;if (is_signature) {&#xD;&#xA;  let from_address = &lt;MultiAddress&lt;AccountId32,u32&gt;&gt;::decode(input)?;&#xD;&#xA;  let signature = MultiSignature::decode(input)?; // Prob an SR25519 signature&#xD;&#xA;  // Extra information is variable and actually depends on the chain;&#xD;&#xA;  // the below example is for polkadot, last I checked (a while ago).&#xD;&#xA;  // - era (ie is transaction mortal or immortal, and how long will it last?&#xD;&#xA;  // - nonce (how many prior transactions from the from_address?&#xD;&#xA;  // - tip (a tip to the block author, which can be 0)&#xD;&#xA;  let (era, nonce, tip): (Era, Compact&lt;u32&gt;, Compact&lt;u128&gt;)::decode(input)?;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Now, we're decoding the Call enum, which looks something like&#xD;&#xA;// `Pallet::Foo(Call::Something(1, true))`. Enum indexes are currently scale&#xD;&#xA;// encoded to u8's. Often we want to get at least the pallet index, so that we&#xD;&#xA;// can look up in the Metadata how to decode the rest.&#xD;&#xA;let pallet_index = u8::decode(input)?;&#xD;&#xA;let call_index = u8::decode(input)?;&#xD;&#xA;let call_params = decode_call_params(metadata, pallet_index, call_index, input)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In other words, a transaction begins with its compact encoded length in bytes, and then has a byte which is not SCALE encoded and has 1 bit for &quot;will a signature follow&quot; and 7 bits for &quot;what is the transaction protocol version we're using here&quot;. &#xD;&#xA;&#xD;&#xA;After manually decoding that byte you can write logic to SCALE decode the signature (if present) or skip straight to SCALE decoding the call data (if signature isn't present). &#xD;&#xA;&#xD;&#xA;The call data cannot be decoded into a vector of bytes; conceptually it is more like a SCALE encoded enum whose outer variant is the pallet you're making a call into, and inner variant is the call you're making and any parameters that you need to pass to it. One way to decode the call data is to decode a singel `u8` (corresponding to the outer enum variant tag) to see what the pallet index the call is for, and then digging up information about the call enum from the metadata and using that to decode the rest of the call data.&#xD;&#xA;&#xD;&#xA;Have a look at https://github.com/paritytech/desub/blob/f5377bc9946b4b0a89a6b89b0ae58d915683f9c8/desub-current/src/decoder/mod.rs#L225 for an example of how one might decode an extrinsic using runtime metadata.&#xD;&#xA;&#xD;&#xA;Ultimately though, depending on your use case you may prefer to use a library like Subxt, which allows you to build and submit extrinsics, access node storage and subscribe/decode events. There is a bunch of stuff to work out if you want to manually figure out how to encode and decode these things (transactions, events, storage keys and results) yourself, and much of it isn't well documented, so using a library like Subxt will probably get you there much quicker.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1530" PostHistoryTypeId="4" PostId="427" RevisionGUID="eba22e5c-05a2-4bf3-8d56-48590e504677" CreationDate="2022-02-23T12:17:45.590" UserId="472" Comment="edited title" Text="How to pass references as arguments to Ink! contract messages (or constructors)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1532" PostHistoryTypeId="2" PostId="431" RevisionGUID="f7cb89bd-4556-4bc5-bf17-18f80405908d" CreationDate="2022-02-23T12:23:37.300" UserId="452" Text="You can get the list of currently connected peers by querying the `NetworkWorker`, [`peers_debug_info`](https://github.com/paritytech/substrate/blob/master/client/network/src/service.rs#L649-L657) should provide you with the information you want. You might need to extend the `NetworkService` to expose this method (i.e. create an async method there that will send a message to `NetworkWorker` to call `peers_debug_info`).&#xD;&#xA;&#xD;&#xA;This is also used to implement the [`system_peers`](https://github.com/paritytech/substrate/blob/master/client/rpc-api/src/system/mod.rs#L77-L79) RPC endpoint, so you can also look into how that's implemented." ContentLicense="CC BY-SA 4.0" />
  <row Id="1534" PostHistoryTypeId="2" PostId="432" RevisionGUID="f7deb80c-a9c2-4239-a353-8cdb49c4d46c" CreationDate="2022-02-23T12:25:32.373" UserId="442" Text="When you change or update your pallets, such as `Call`s, `Storage`s, `RPC`s, etc, the metadata may change.&#xD;&#xA;&#xD;&#xA;The metadata codec version (such as `V14`) may change with new substrate version." ContentLicense="CC BY-SA 4.0" />
  <row Id="1536" PostHistoryTypeId="2" PostId="433" RevisionGUID="fb76dc96-c4d3-4e56-a59a-c7f2a28d701d" CreationDate="2022-02-23T12:28:09.910" UserId="442" Text="BTW, you can retrieve `Event`s by querying `system.events` storage with specified blockhash." ContentLicense="CC BY-SA 4.0" />
  <row Id="1540" PostHistoryTypeId="2" PostId="434" RevisionGUID="f78708ca-fb5f-4428-a734-8aef067f9ce1" CreationDate="2022-02-23T16:42:37.993" UserId="408" Text="You can start with the [Substrate Frontier Node Template](https://github.com/PureStake/frontier/tree/master/template) project. &#xD;&#xA;&#xD;&#xA;It is a FRAME-based Substrate node with the Ethereum RPC support, ready for hacking.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1542" PostHistoryTypeId="2" PostId="435" RevisionGUID="320b8c09-f010-412d-8f51-051717159fd7" CreationDate="2022-02-23T16:48:58.890" UserId="452" Text="You can use the `revert` command to revert unfinalized blocks. If you need to revert finalized blocks then I suggest you do the following:&#xD;&#xA;- Assuming you want to revert to block #42;&#xD;&#xA;- Add the hash of block #43 to the chain spec under `badBlocks` (example: https://raw.githubusercontent.com/paritytech/polkadot/master/node/service/res/kusama.json);&#xD;&#xA;- Sync a node from scratch and it should stop importing blocks after #42 (since #43 is blacklisted it will fail to import);&#xD;&#xA;- You can now deploy this database to other validators and they should start authoring (and finalizing on top of #42). Alternatively you can also just resync using the new chain spec;&#xD;&#xA;- Since you are reverting finality all clients on the network will need to resync (using the new chainspec with `badBlocks` populated)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1544" PostHistoryTypeId="2" PostId="436" RevisionGUID="54151896-b346-4f2c-ac2b-b5ce6ae8d767" CreationDate="2022-02-23T17:04:28.840" UserId="12" Text="Is it possible to use the chain specification file or some other mechanism to configure a Substrate network with injected block history? In this case, the motivation is CI/CD/testing, but I can see how this could also be useful for network migrations." ContentLicense="CC BY-SA 4.0" />
  <row Id="1546" PostHistoryTypeId="1" PostId="436" RevisionGUID="54151896-b346-4f2c-ac2b-b5ce6ae8d767" CreationDate="2022-02-23T17:04:28.840" UserId="12" Text="Configure a Substrate Network with Injected Block History" ContentLicense="CC BY-SA 4.0" />
  <row Id="1547" PostHistoryTypeId="3" PostId="436" RevisionGUID="54151896-b346-4f2c-ac2b-b5ce6ae8d767" CreationDate="2022-02-23T17:04:28.840" UserId="12" Text="|block|state|configuration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1548" PostHistoryTypeId="2" PostId="437" RevisionGUID="1d15cd81-145a-4982-baa8-bbbad78b2853" CreationDate="2022-02-23T17:20:31.310" UserId="481" Text="The docs on the traits `ReservableCurrency` and `NamedReservableCurrency` currency are the same, although they clearly have subtle differences between them. When should someone use `ReservableCurrency` vs `NamedReservableCurrency`, and how do they differ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/rustdocs/latest/frame_support/traits/trait.ReservableCurrency.html&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/frame_support/traits/trait.NamedReservableCurrency.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="1550" PostHistoryTypeId="1" PostId="437" RevisionGUID="1d15cd81-145a-4982-baa8-bbbad78b2853" CreationDate="2022-02-23T17:20:31.310" UserId="481" Text="Difference between ReservableCurrency and NamedReservableCurrency?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1551" PostHistoryTypeId="3" PostId="437" RevisionGUID="1d15cd81-145a-4982-baa8-bbbad78b2853" CreationDate="2022-02-23T17:20:31.310" UserId="481" Text="|balances|frame|runtime|tcurrency|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1552" PostHistoryTypeId="2" PostId="438" RevisionGUID="58ad3701-4494-4d58-901b-b021aa68e054" CreationDate="2022-02-23T17:23:09.603" UserId="452" Text="You should be able to do this either by persisting the whole database and always using that as a starting point, or using the export / import functionality supported by Substrate. In order to export the historical block data you could do:&#xD;&#xA;&#xD;&#xA;`substrate export-blocks --chain my-chain -d my-chain-db blocks.bin`&#xD;&#xA;&#xD;&#xA;You could then persist this blob somewhere and share it with your test environment. You can then re-import the block data (into a blank database) as the first step before starting your tests:&#xD;&#xA;&#xD;&#xA;`substrate import-blocks --chain my-chain -d my-chain-db blocks.bin`&#xD;&#xA;&#xD;&#xA;When using BABE this isn't possible / pratical due to the liveness requirements of the protocol (i.e. if the chain is down for more than one epoch then it gets bricked and you get the dreaded &quot;unexpected epoch change&quot; error)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1554" PostHistoryTypeId="2" PostId="439" RevisionGUID="7dabc62c-dbc1-418f-884a-cc8ba5ea8959" CreationDate="2022-02-23T17:30:13.717" UserId="94" Text="You can build up a local chain with the `--dev` flag and then import it in your CI.  &#xD;&#xA;There are several ways to restore snapshots, depending on your needs.&#xD;&#xA;&#xD;&#xA;1. For Polkadot/Kusama you can download a chain snapshot from [Polkachu](https://polkachu.com/snapshots). This would be a *real* chain snapshot, so probably to heavy for testing.&#xD;&#xA;2. Import some blocks with the `import-blocks` command that were exported with the `export-blocks` command before. This works fine but if you just use the first 100k blocks (~3MB) they are mostly empty and not representative. Should still work fine for CI though.&#xD;&#xA;3. Just copy paste the `~/.local/share/polkadot/chains/` directory from some backup." ContentLicense="CC BY-SA 4.0" />
  <row Id="1556" PostHistoryTypeId="2" PostId="440" RevisionGUID="5eb4091d-0c06-4046-8422-a6a1ebec20b4" CreationDate="2022-02-23T17:32:56.693" UserId="18" Text="Looking at the [docs][1], it seems I can only return custom weights in dispatchables&#xD;&#xA;&#xD;&#xA;I want to be able to create data in storage then return the ID, because we will be calling the chain from a UI/Dapp&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am assuming this wont be possible because just because an extrinsic was called successfully doesn't mean the data is stored on-chain, we have to wait for consensus to be reached&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So is there a way to return the value stored on-chain on the call itself? or is the best way to have a separate process check the chain state for the stored value? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/frame-support/2.0.0-rc4/frame_support/dispatch/type.DispatchResultWithPostInfo.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="1558" PostHistoryTypeId="1" PostId="440" RevisionGUID="5eb4091d-0c06-4046-8422-a6a1ebec20b4" CreationDate="2022-02-23T17:32:56.693" UserId="18" Text="Can I return a custom value from an extrinsic call" ContentLicense="CC BY-SA 4.0" />
  <row Id="1559" PostHistoryTypeId="3" PostId="440" RevisionGUID="5eb4091d-0c06-4046-8422-a6a1ebec20b4" CreationDate="2022-02-23T17:32:56.693" UserId="18" Text="|parachain|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1560" PostHistoryTypeId="2" PostId="441" RevisionGUID="fc2d511b-be6a-4e21-bc74-b7941acd6076" CreationDate="2022-02-23T17:39:28.710" UserId="94" Text="Your best bet here are to use Events.  &#xD;&#xA;Events can wrap data and it is possible to query historical Events from a node.  &#xD;&#xA;This is useful in case you want to query all successful Events from the past.  &#xD;&#xA;&#xD;&#xA;Have a look at the [template pallet](https://github.com/paritytech/substrate/blob/f54e1a2f294c9baa1d8d335c18a7c3e49c47cf6b/bin/node-template/pallets/template/src/lib.rs#L48) and how it emits an Event with an ID attached." ContentLicense="CC BY-SA 4.0" />
  <row Id="1562" PostHistoryTypeId="5" PostId="434" RevisionGUID="8f976882-6352-4fee-870c-e94abc882df3" CreationDate="2022-02-23T17:45:55.837" UserId="408" Comment="added 262 characters in body" Text="Most evm compatible substrate chains uses pallet-evm and pallet-ethereum provided by [frontier][1], for example Moonbeam, ChainX, Edgeware etc.&#xD;&#xA;&#xD;&#xA;You can start with the [Substrate Frontier Node Template](https://github.com/PureStake/frontier/tree/master/template) project. &#xD;&#xA;&#xD;&#xA;It is a FRAME-based Substrate node with the Ethereum RPC support, ready for hacking.&#xD;&#xA;&#xD;&#xA;You can deploy the frontier node the same way you do a substrate node.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/frontier" ContentLicense="CC BY-SA 4.0" />
  <row Id="1563" PostHistoryTypeId="5" PostId="410" RevisionGUID="584ca5fd-994a-491c-883c-c9d884a1f743" CreationDate="2022-02-23T17:53:47.587" UserId="361" Comment="typo" Text="Your code is trying to access the Pallet struct directly while what you want to do is access a value *within* the pallet.&#xD;&#xA;If you e.g. check the [parachain template here](https://github.com/substrate-developer-hub/substrate-parachain-template/blob/200d26e5e2c1be0eed3f2b75d8d33c76c048db3b/runtime/src/lib.rs#L391) it calls `parachain_id` which is what you are probably interested in.&#xD;&#xA;```Rust&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1564" PostHistoryTypeId="2" PostId="442" RevisionGUID="fcdc057e-246d-493e-a55a-0943425d6b65" CreationDate="2022-02-23T18:52:27.337" UserId="28" Text="The context for `NamedReserveableCurrency` can be found here:&#xD;&#xA;&#xD;&#xA;* https://github.com/paritytech/substrate/issues/7223&#xD;&#xA;* https://github.com/paritytech/substrate/pull/7778&#xD;&#xA;&#xD;&#xA;Basically, this was a feature added later in the balances pallet where users could have a reserved balance which is indexed under a certain &quot;name&quot; usually the pallet which is reserving the balance.&#xD;&#xA;&#xD;&#xA;This allows that you are able to see how much balance each pallet has individually reserved, rather than having a single reserved balance which mixes all the balances together.&#xD;&#xA;&#xD;&#xA;This can also help prevent an error in one pallet from causing issues in another pallet, for example incorrectly accounting for the reserved balance of a user, and thus taking from a shared pot of reserved balances.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1566" PostHistoryTypeId="5" PostId="442" RevisionGUID="3d49e87b-14a6-4736-a285-bf4f4a00ec4e" CreationDate="2022-02-23T18:58:12.650" UserId="28" Comment="added 2 characters in body" Text="The context for `NamedReserveableCurrency` can be found here:&#xD;&#xA;&#xD;&#xA;* https://github.com/paritytech/substrate/issues/7223&#xD;&#xA;* https://github.com/paritytech/substrate/pull/7778&#xD;&#xA;&#xD;&#xA;Basically, this was a feature added later in the balances pallet where users could have a reserved balance which is indexed under a certain &quot;name&quot;. (usually the pallet which is reserving the balance)&#xD;&#xA;&#xD;&#xA;This allows that you are able to see how much balance each pallet has individually reserved, rather than having a single reserved balance which mixes all the balances together.&#xD;&#xA;&#xD;&#xA;This can also help prevent an error in one pallet from causing issues in another pallet, for example incorrectly accounting for the reserved balance of a user, and thus taking from a shared pot of reserved balances.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1568" PostHistoryTypeId="5" PostId="281" RevisionGUID="736a6140-e6b4-43d9-b485-2563f011aadb" CreationDate="2022-02-23T20:48:57.500" UserId="2" Comment="typos corrected, punctuation" Text="I was trying to modify the transaction fee and for that I only want the congestion of the network. In *FeeDetails*, that is present in the **transaction-payment** pallet, we have three fields, i.e., **base_fee, len_fee, adjusted_weight_fee**. The congestion of the network depends on adjusted_weight_fee, so for this purpose I only want that field. But I don't know how to set the other two fields to zero. Any suggestions would be helpful." ContentLicense="CC BY-SA 4.0" />
  <row Id="1569" PostHistoryTypeId="4" PostId="281" RevisionGUID="736a6140-e6b4-43d9-b485-2563f011aadb" CreationDate="2022-02-23T20:48:57.500" UserId="2" Comment="typos corrected, punctuation" Text="How to set base_fee and len_fee to zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1570" PostHistoryTypeId="24" PostId="281" RevisionGUID="736a6140-e6b4-43d9-b485-2563f011aadb" CreationDate="2022-02-23T20:48:57.500" Comment="Proposed by 2 approved by 104, 94 edit id of 59" ContentLicense="CC BY-SA 4.0" />
  <row Id="1571" PostHistoryTypeId="2" PostId="443" RevisionGUID="fe944c4f-2a0f-4874-bf56-616220b1c76b" CreationDate="2022-02-23T20:49:42.420" UserId="73" Text="If you are updating your runtime, currently you compile it twice for native and for wasm. When both are exactly the same you should use the same `spec_version`. In your case here, you updated the native runtime, but did not bumped the `spec_version`. So, the node was thinking that both are compatible, but as this was wrong your chain was running into errors. &#xD;&#xA;&#xD;&#xA;These kind of values like `SessionsPerEra` are also not easily changeable after your chain was launched. So, ensure that you rebuild everything and also have recreated your chain spec." ContentLicense="CC BY-SA 4.0" />
  <row Id="1573" PostHistoryTypeId="2" PostId="444" RevisionGUID="6c7caa9c-db40-44ce-8939-2387ad174cde" CreationDate="2022-02-23T21:08:07.240" UserId="223" Text="## Question:&#xD;&#xA;&#xD;&#xA;In the docs for CurrencyToVote it says&#xD;&#xA;&#xD;&#xA;&gt; the total issuance being passed in implies that the implementation must be aware of the fact that its values can affect the outcome. This implies that if the vote value is dependent on the total issuance, it should never be written to storage for later re-use.&#xD;&#xA;&#xD;&#xA;And in U128CurrencyToVote (used by Polkadot), balances get divided by how many times the total issuance fits into a u64.&#xD;&#xA;&#xD;&#xA;But the BagsList pallet stores these weights here and uses them for ordering. Does this mean that every time the total issuance hits a multiple of u64::MAX, new updates in the list are wildly out of sync with previous inserts (with those previous inserts having a much larger weight)?&#xD;&#xA;&#xD;&#xA;## Answer:&#xD;&#xA;&#xD;&#xA;Short answer: yes. &#xD;&#xA;&#xD;&#xA;When using the bags list as the [`SortedListProvider`](https://paritytech.github.io/substrate/latest/src/pallet_staking/pallet/mod.rs.html#154) for pallet staking, once the total issuance increases over a multiple of `u64::MAX`, new inserts will be out of sync. In this case rebag should be called on all the nodes already in the list. The [rebag](https://paritytech.github.io/substrate/latest/pallet_bags_list/pallet/struct.Pallet.html#method.rebag) extrinsic is permissionless and thus the network can (and is incentivized to) &quot;organically&quot; self adjust. &#xD;&#xA;&#xD;&#xA;If one had a chain where they expected the total issuance would cross `u64::MAX` multiples frequently, this probably would be a suboptimal design choice. &#xD;&#xA;&#xD;&#xA;So to remedy the aformentioned issue the bags list could be made more extensible by having a configurable `Weight` type (probabl something that impls [`PartialOrd`](https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html)). For example if `Balance` was a `u128`, the `Weight` for the bags list could be set to a `u128` and then the [`VoteWeightProvider`](https://paritytech.github.io/substrate/latest/pallet_bags_list/pallet/trait.Config.html#associatedtype.VoteWeightProvider) could be defined to simply return the bonded balance of the account. (PRs welcome!) As far as I know, in the staking use case, the bags list itself doesn't need to use a `u64` for ordering weight (someone please correct me if I am wrong). The actual vote weight is calculated on the spot when collecting the voters (see [`pallet_staking::Pallet::get_npos_voters`](https://github.com/paritytech/substrate/blob/b4ba44d21d9e0a5c15013f60e34daf97e70c5865/frame/staking/src/pallet/impls.rs#L726)). &#xD;&#xA;&#xD;&#xA;Practically, the currrent total issuance is 11,682,369,502,578,275,508 plank. So the total issuance is less then 1/3 of `u64::MAX * 2` and thus would have to 3x to reach the point of every node neediing a rebag, so it will be awhile.&#xD;&#xA;&#xD;&#xA;## Question:&#xD;&#xA;&#xD;&#xA;It also feels a little silly to use a u64 type for vote weights when the total_issuance in pallet-balances already has to fit into a Balance type which is a u128 for most chains.&#xD;&#xA;&#xD;&#xA;## Answer: &#xD;&#xA;&#xD;&#xA;Looking at the [`pallet_staking::Config::CurrencyToVote` docs](https://paritytech.github.io/substrate/latest/pallet_staking/pallet/trait.Config.html#associatedtype.CurrencyToVote) we see: &#xD;&#xA;&#xD;&#xA;&gt; Convert a balance into a number used for election calculation. This must fit into a u64 but is allowed to be sensibly lossy. The u64 is used to communicate with the frame_election_provider_support crate which accepts u64 numbers and does operations in 128. &#xD;&#xA;&#xD;&#xA;This is hinting that the election algorithmns need a type which can be extended to avoid overflowing arithmetic. And it does have one: [`ExtendedBalance`](https://paritytech.github.io/substrate/latest/frame_election_provider_support/type.ExtendedBalance.html), a `u128`. Tangential, in theory one could use a `u128` for vote weight and a `u256` for the arithmetic, but a `u256` is not supported in rust and presumably other impls would have some negative performance consequences." ContentLicense="CC BY-SA 4.0" />
  <row Id="1575" PostHistoryTypeId="5" PostId="444" RevisionGUID="7c89b42c-29e3-4792-b8bd-dfeca126b3b9" CreationDate="2022-02-23T21:15:06.533" UserId="223" Comment="Remove superfluous mention of polkadots issuance " Text="## Question:&#xD;&#xA;&#xD;&#xA;In the docs for CurrencyToVote it says&#xD;&#xA;&#xD;&#xA;&gt; the total issuance being passed in implies that the implementation must be aware of the fact that its values can affect the outcome. This implies that if the vote value is dependent on the total issuance, it should never be written to storage for later re-use.&#xD;&#xA;&#xD;&#xA;And in U128CurrencyToVote (used by Polkadot), balances get divided by how many times the total issuance fits into a u64.&#xD;&#xA;&#xD;&#xA;But the BagsList pallet stores these weights here and uses them for ordering. Does this mean that every time the total issuance hits a multiple of u64::MAX, new updates in the list are wildly out of sync with previous inserts (with those previous inserts having a much larger weight)?&#xD;&#xA;&#xD;&#xA;## Answer:&#xD;&#xA;&#xD;&#xA;Short answer: yes. &#xD;&#xA;&#xD;&#xA;When using the bags list as the [`SortedListProvider`](https://paritytech.github.io/substrate/latest/src/pallet_staking/pallet/mod.rs.html#154) for pallet staking, once the total issuance increases over a multiple of `u64::MAX`, new inserts will be out of sync. In this case rebag should be called on all the nodes already in the list. The [rebag](https://paritytech.github.io/substrate/latest/pallet_bags_list/pallet/struct.Pallet.html#method.rebag) extrinsic is permissionless and thus the network can (and is incentivized to) &quot;organically&quot; self adjust. &#xD;&#xA;&#xD;&#xA;If one had a chain where they expected the total issuance would cross `u64::MAX` multiples frequently, this probably would be a suboptimal design choice. &#xD;&#xA;&#xD;&#xA;So to remedy the aforementioned issue the bags list could be made more extensible by having a configurable `Weight` type (probably something that impls [`PartialOrd`](https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html)). For example if `Balance` was a `u128`, the `Weight` for the bags list could be set to a `u128` and then the [`VoteWeightProvider`](https://paritytech.github.io/substrate/latest/pallet_bags_list/pallet/trait.Config.html#associatedtype.VoteWeightProvider) could be defined to simply return the bonded balance of the account. (PRs welcome!) As far as I know, in the staking use case, the bags list itself doesn't need to use a `u64` for ordering weight (someone please correct me if I am wrong). The actual vote weight is calculated on the spot when collecting the voters (see [`pallet_staking::Pallet::get_npos_voters`](https://github.com/paritytech/substrate/blob/b4ba44d21d9e0a5c15013f60e34daf97e70c5865/frame/staking/src/pallet/impls.rs#L726)). &#xD;&#xA;&#xD;&#xA;## Question:&#xD;&#xA;&#xD;&#xA;It also feels a little silly to use a u64 type for vote weights when the total_issuance in pallet-balances already has to fit into a Balance type which is a u128 for most chains.&#xD;&#xA;&#xD;&#xA;## Answer: &#xD;&#xA;&#xD;&#xA;Looking at the [`pallet_staking::Config::CurrencyToVote` docs](https://paritytech.github.io/substrate/latest/pallet_staking/pallet/trait.Config.html#associatedtype.CurrencyToVote) we see: &#xD;&#xA;&#xD;&#xA;&gt; Convert a balance into a number used for election calculation. This must fit into a u64 but is allowed to be sensibly lossy. The u64 is used to communicate with the frame_election_provider_support crate which accepts u64 numbers and does operations in 128. &#xD;&#xA;&#xD;&#xA;This is hinting that the election algorithmns need a type which can be extended to avoid overflowing arithmetic. And it does have one: [`ExtendedBalance`](https://paritytech.github.io/substrate/latest/frame_election_provider_support/type.ExtendedBalance.html), a `u128`. Tangential, in theory one could use a `u128` for vote weight and a `u256` for the arithmetic, but a `u256` is not supported in rust and presumably other impls would have some negative performance consequences." ContentLicense="CC BY-SA 4.0" />
  <row Id="1576" PostHistoryTypeId="5" PostId="413" RevisionGUID="d05ee792-dc19-4be2-baed-900441e444b1" CreationDate="2022-02-23T21:24:43.513" UserId="286" Comment="Updated the question, since i now understand HOW I messed things up." Text="Am I fundamentally misunderstanding how staking handles election timings, please?  I've been trying to change the number of eras in a session, to increase the number of elections for testing.  &#xD;&#xA;&#xD;&#xA;I expected that we get a validator election every era, so reducing the sessions per era should increase the frequency of elections.  I found and modified this constant, which was originally 6:&#xD;&#xA;&#xD;&#xA;```pub const SessionsPerEra: sp_staking::SessionIndex = 2;``` in bin/node/runtime/src/lib.rs&#xD;&#xA;&#xD;&#xA;It's showing as changed in storage according to Polkadot.js, but I'm still getting 6 sessions per era anyway? (Chain started from genesis with this setting.)&#xD;&#xA;&#xD;&#xA;[![Image showing staking.sessionsPerEra = 2, staking.currentEra = 5 and session.currentIndex = 28][1]][1]&#xD;&#xA;&#xD;&#xA;I've also managed to create another example, where I have 6 sessionsPerEra defined in the code, but the chain is hanging after 2 sessions, with Babe complaining that there is an unexpected change of era. I've been trying 1, 2 or 6 sessions per era, trying to work out what's wrong.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WtMkH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1578" PostHistoryTypeId="2" PostId="445" RevisionGUID="85d7bce5-8cc3-410a-a95a-d59f6093e7e8" CreationDate="2022-02-23T21:39:04.027" UserId="29" Text="I have an unsigned call in my pallet. Should I include a weight for it?&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(???)]&#xD;&#xA;pub fn submit_metric_unsigned(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	_block_number: T::BlockNumber,&#xD;&#xA;	metric: u32,&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1580" PostHistoryTypeId="1" PostId="445" RevisionGUID="85d7bce5-8cc3-410a-a95a-d59f6093e7e8" CreationDate="2022-02-23T21:39:04.027" UserId="29" Text="Should I include weight for an unsigned call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1581" PostHistoryTypeId="3" PostId="445" RevisionGUID="85d7bce5-8cc3-410a-a95a-d59f6093e7e8" CreationDate="2022-02-23T21:39:04.027" UserId="29" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1582" PostHistoryTypeId="5" PostId="445" RevisionGUID="3b42d847-bf4d-42b4-84f9-191e5672263b" CreationDate="2022-02-23T21:45:46.957" UserId="29" Comment="added 40 characters in body" Text="I have an unsigned call in my pallet. Since there will be no fees associated, should I include a weight for it?&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(???)]&#xD;&#xA;pub fn submit_metric_unsigned(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	_block_number: T::BlockNumber,&#xD;&#xA;	metric: u32,&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1583" PostHistoryTypeId="2" PostId="446" RevisionGUID="b3bb1abe-8436-4360-932b-0ea32ff49aae" CreationDate="2022-02-23T21:48:25.423" UserId="45" Text="Yes. Weight is used not only for calculating how much the sender should pay, it is also a measure of how much work can be done. There is also a limit of how much work can be done within a block which should not be exceeded.&#xD;&#xA;&#xD;&#xA;If you leave the extrinsic without weight, then the time taken to process it will not be accounted. Too much or unbounded amount of unaccounted processing time can enable DoS vectors." ContentLicense="CC BY-SA 4.0" />
  <row Id="1585" PostHistoryTypeId="5" PostId="190" RevisionGUID="f6926609-d783-4b85-85bd-0c01337b3801" CreationDate="2022-02-23T21:48:52.017" UserId="2" Comment="typos corrected" Text="The links below have stopped supporting&#xD;&#xA;&#xD;&#xA;- https://github.com/polkadot-java/api&#xD;&#xA;- https://github.com/emeraldpay/polkaj&#xD;&#xA;&#xD;&#xA;Is there a supported library that I can use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1586" PostHistoryTypeId="4" PostId="190" RevisionGUID="f6926609-d783-4b85-85bd-0c01337b3801" CreationDate="2022-02-23T21:48:52.017" UserId="2" Comment="typos corrected" Text="Is there any Java SDK or library for interacting with Substrate nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1587" PostHistoryTypeId="24" PostId="190" RevisionGUID="f6926609-d783-4b85-85bd-0c01337b3801" CreationDate="2022-02-23T21:48:52.017" Comment="Proposed by 2 approved by 104, 94 edit id of 56" ContentLicense="CC BY-SA 4.0" />
  <row Id="1588" PostHistoryTypeId="2" PostId="447" RevisionGUID="ad11b6ca-3a8c-4967-8816-fc0fa83dfdf9" CreationDate="2022-02-23T21:50:48.767" UserId="73" Text="Yes you need to assign a weight for this call. The purpose of weights is not to calculate the fees. &#xD;&#xA;&#xD;&#xA;Weights are there to ensure that your block is staying in the expected limits. Otherwise someone could DoS your chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="1590" PostHistoryTypeId="2" PostId="448" RevisionGUID="e6c1f312-9800-4960-b422-ba6549dae104" CreationDate="2022-02-23T21:56:24.030" UserId="408" Text="You could turn on lto to reduce the size of the wasm blob.&#xD;&#xA;&#xD;&#xA;See https://rustwasm.github.io/docs/book/reference/code-size.html#compiling-with-link-time-optimizations-lto" ContentLicense="CC BY-SA 4.0" />
  <row Id="1592" PostHistoryTypeId="6" PostId="413" RevisionGUID="0d8257c2-cca8-424a-ae4a-5808ed548bde" CreationDate="2022-02-23T22:03:59.247" UserId="286" Comment="edited tags" Text="|session|chainspec|wasm|epoch|era|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1593" PostHistoryTypeId="2" PostId="449" RevisionGUID="beed770f-8dfb-40bd-a8f4-59e7f9c2d590" CreationDate="2022-02-23T22:04:50.043" UserId="29" Text="So the idea of OCW's is that it will do some off-chain &quot;work&quot; and ultimately submit a transaction that will call a public function in the runtime to get the result of that work on-chain.&#xD;&#xA;&#xD;&#xA;OCW's do have direct access to read runtime storage.&#xD;&#xA;&#xD;&#xA;OCW's also have a separate storage of their own which can be used as a basis to &quot;strategize&quot; multiple OCW threads running at the same time.&#xD;&#xA;&#xD;&#xA;You may have two nodes with the CLI flag opted in for OCW's, that does not mean you need both OCW's *doing* work after every block import. You can have logic that if certain conditions are met, only then execute the OCW logic. You can use a combination of listening to events, checking OCW local storage for some value, checking if a threshold was met, etc.&#xD;&#xA;&#xD;&#xA;Here are a couple examples:&#xD;&#xA;&#xD;&#xA;- [Using OCW local storage to create a grace period off of block number](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/examples/offchain-worker/src/lib.rs#L397)&#xD;&#xA;- [Creating a threshold based on block number](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L180)&#xD;&#xA;&#xD;&#xA;Also keep in mind:&#xD;&#xA;&#xD;&#xA;&gt; It's not guaranteed for offchain workers to run on EVERY block, there&#xD;&#xA;&gt; might be cases where some blocks are skipped, or for some the worker&#xD;&#xA;&gt; runs twice (re-orgs), so the code should be able to handle that.&#xD;&#xA;&#xD;&#xA;- [Source](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/examples/offchain-worker/src/lib.rs#L174)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1595" PostHistoryTypeId="2" PostId="450" RevisionGUID="27586318-901e-4f19-827a-d09f4273d7d0" CreationDate="2022-02-23T22:56:58.427" UserId="29" Text="Following up from this question:&#xD;&#xA;- https://substrate.stackexchange.com/questions/445/should-i-include-weight-for-an-unsigned-call&#xD;&#xA;&#xD;&#xA;What **exactly** prevents multiple calls to a weighted unsigned extrinsic from sequentially filling up a block and not leaving any room for any other transactions?&#xD;&#xA;&#xD;&#xA;It looks like unsigned transactions take a higher &quot;base&quot; priority:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/primitives/runtime/src/transaction_validity.rs#L343&#xD;&#xA;&#xD;&#xA;..which makes sense because signed transactions include fees (and sometimes tips) which affect priority.&#xD;&#xA;&#xD;&#xA;Is it a case of transaction priority or transaction validity due to the fact that an unsigned transaction has a nonce of zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1597" PostHistoryTypeId="1" PostId="450" RevisionGUID="27586318-901e-4f19-827a-d09f4273d7d0" CreationDate="2022-02-23T22:56:58.427" UserId="29" Text="What prevents unsigned transactions from filling up a block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1598" PostHistoryTypeId="3" PostId="450" RevisionGUID="27586318-901e-4f19-827a-d09f4273d7d0" CreationDate="2022-02-23T22:56:58.427" UserId="29" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1599" PostHistoryTypeId="5" PostId="450" RevisionGUID="d5324bbc-9fe3-4583-9f24-f884e9499cda" CreationDate="2022-02-23T23:11:16.657" UserId="29" Comment="added 24 characters in body" Text="Following up from this question:&#xD;&#xA;- https://substrate.stackexchange.com/questions/445/should-i-include-weight-for-an-unsigned-call&#xD;&#xA;&#xD;&#xA;What **exactly** prevents multiple calls to a weighted unsigned extrinsic from sequentially filling up a block and not leaving any room for any other transactions?&#xD;&#xA;&#xD;&#xA;It looks like unsigned transactions should be configured to take a higher &quot;base&quot; priority:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/primitives/runtime/src/transaction_validity.rs#L343&#xD;&#xA;&#xD;&#xA;..which makes sense because signed transactions include fees (and sometimes tips) which affect priority.&#xD;&#xA;&#xD;&#xA;Is it a case of transaction priority or transaction validity due to the fact that an unsigned transaction has a nonce of zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1600" PostHistoryTypeId="5" PostId="450" RevisionGUID="79022ccb-9848-45ff-8df7-965fa75d636c" CreationDate="2022-02-23T23:25:30.477" UserId="29" Comment="added 12 characters in body" Text="Following up from this question:&#xD;&#xA;- https://substrate.stackexchange.com/questions/445/should-i-include-weight-for-an-unsigned-call&#xD;&#xA;&#xD;&#xA;What **exactly** prevents multiple of the same calls to a weighted unsigned extrinsic from sequentially filling up a block and not leaving any room for any other transactions?&#xD;&#xA;&#xD;&#xA;It looks like unsigned transactions should be configured to take a higher &quot;base&quot; priority:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/primitives/runtime/src/transaction_validity.rs#L343&#xD;&#xA;&#xD;&#xA;..which makes sense because signed transactions include fees (and sometimes tips) which affect priority.&#xD;&#xA;&#xD;&#xA;Is it a case of transaction priority or transaction validity due to the fact that an unsigned transaction has a nonce of zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1601" PostHistoryTypeId="2" PostId="451" RevisionGUID="315b35b9-4c88-46f6-abbf-dd3fa4010dde" CreationDate="2022-02-23T23:34:12.547" UserId="28" Text="Unsigned transactions should include some `ValidateUnsigned` logic which is used in the transaction queue to determine if an unsigned transaction should even be included in the block.&#xD;&#xA;&#xD;&#xA;You can find an example of that here for the Claims Pallet: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/claims.rs#L467&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::validate_unsigned]&#xD;&#xA;impl&lt;T: Config&gt; ValidateUnsigned for Pallet&lt;T&gt; {&#xD;&#xA;	type Call = Call&lt;T&gt;;&#xD;&#xA;		fn validate_unsigned(_source: TransactionSource, call: &amp;Self::Call) -&gt; TransactionValidity {&#xD;&#xA;&#xD;&#xA;        // Verification logic here.&#xD;&#xA;        // Must be lightweight so it does not take any significant weight,&#xD;&#xA;        // else a transaction spammer could attack this chain.&#xD;&#xA;&#xD;&#xA;		Ok(ValidTransaction {&#xD;&#xA;			priority: PRIORITY,&#xD;&#xA;			requires: vec![],&#xD;&#xA;			provides: vec![(&quot;claims&quot;, signer).encode()],&#xD;&#xA;			longevity: TransactionLongevity::max_value(),&#xD;&#xA;			propagate: true,&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This `validate_unsigned` function must be very lightweight since it will be processed for every unsigned transaction which matches the verification logic.&#xD;&#xA;&#xD;&#xA;But ultimately, if you do not have an appropriate `validate_unsigned` logic, then yes, your chain can totally be filled up by unsigned transactions. So unsigned transactions are only appropriate where you can guarantee how many of them there will be that is valid, and that it wont DDOS your chain&#xD;&#xA;&#xD;&#xA;Two examples:&#xD;&#xA;&#xD;&#xA;1) Allow up to N unsigned transaction per block. Reject the rest until the next block.&#xD;&#xA;2) Allow up to N users 1 free unsigned transaction. After which, the unsigned transaction is not valid anymore. (This is what happens in claims pallet)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1603" PostHistoryTypeId="5" PostId="38" RevisionGUID="7909ea8e-b778-4001-a93f-d9d3bce89eaa" CreationDate="2022-02-23T23:57:24.373" UserId="104" Comment="Grammar" Text="There are two main ways in which assets are transferred between consensus systems in XCM. They are namely via **Asset Teleportation** or via **Reserve Asset Transfers**.&#xD;&#xA;&#xD;&#xA;First of all, a preamble -- XCM instructions are always going to be interpreted according to the consensus system that executes them, and so for all of the instructions that I am going to explain below, *always* remember that the exact behaviour may change depending on which consensus system processes them. What I would hence be describing are the basic behaviours that you can expect each consensus system to possess, regardless of their peculiarities.&#xD;&#xA;&#xD;&#xA;With that said, I am going to describe the intricacies with the two asset transfer models below.&#xD;&#xA;&#xD;&#xA;# Asset Teleportation #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Asset Teleportation][1]][1]&#xD;&#xA;&#xD;&#xA;We start with the easier and more straightforward of the two -- Asset Teleportation. As you can see from the diagram above, there are only 2 actors within this model: the source and the destination. The way in which we transfer assets between the source and the destination are briefly summarized in the numbered labels on the diagram, and are explained in more detail below:&#xD;&#xA;&#xD;&#xA;### 1. InitiateTeleport ###&#xD;&#xA;The source gathers the assets to be teleported from the sending account and **burns** them, taking note of the total amount of assets burned.&#xD;&#xA;&#xD;&#xA;### 2. ReceiveTeleportedAssets ###&#xD;&#xA;The source then creates an XCM instruction called &quot;ReceiveTeleportedAssets&quot; and puts the amount of burned assets and the receiving account as parameters to this instruction. It then sends this instruction over to the destination, where it gets processed and new assets gets **minted** accordingly to the amount burned.&#xD;&#xA;&#xD;&#xA;### 3. DepositAsset ###&#xD;&#xA;The destination then deposits the newly minted assets to the receiving account of the asset.&#xD;&#xA;&#xD;&#xA;The words **burns** and **minted** are highlighted above to give a hint on the disadvantages of this model -- it requires both the source and destination of have a high level of mutual trust. The destination must trust that the source has appropriately burned the assets that was sent over, and the source must also trust the destination to mint the assets that was burned. **Failing to uphold either of these two conditions will result in a change in the asset's total issuance (in the case of fungible tokens) or a complete loss/duplication of an NFT.**&#xD;&#xA;&#xD;&#xA;# Reserve Asset Transfer #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Reserve Asset Transfer][2]][2]&#xD;&#xA;&#xD;&#xA;For consensus systems that don't have the level of trust required for asset teleportation, they can instead opt for trusting a 3rd entity called the reserve to store the real assets (think Statemine on Kusama or Statemint on Polkadot). What this entails is that the source and destination will have to create some sort of mechanism to keep track of the assets that they own on the reserve, and this is usually done by minting a new derivative token. As a corollary, both the source and destination must have accounts on the reserve -- we'll refer to such accounts owned by the source/destination as Sovereign Accounts.&#xD;&#xA;&#xD;&#xA;Below are the steps in which a reserve asset transfer undergoes in order to transfer assets from the source to the destination:&#xD;&#xA;&#xD;&#xA;### 1. InitiateReserveWithdraw ###&#xD;&#xA;The source gathers the derivative assets to be transferred from the sending account and burns them, taking note of the amount of derivatives that were burned.&#xD;&#xA;&#xD;&#xA;### 2. WithdrawAsset ###&#xD;&#xA;The source sends a WithdrawAsset instruction to the reserve, instructing the reserve to withdraw assets equivalent to the amount of derivatives burned from the source's sovereign account.&#xD;&#xA;&#xD;&#xA;### 3. DepositReserveAsset ###&#xD;&#xA;The reserve deposits the assets withdrawn from the previous step to the destination's sovereign account, taking note of the amount of assets deposited.&#xD;&#xA;&#xD;&#xA;### 4. ReserveAssetDeposited ###&#xD;&#xA;The reserve creates a ReserveAssetDeposited instruction with the amount of assets deposited to the destination's sovereign account, and sends this instruction onwards to the destination. The destination receives the instruction and processes it, minting the derivative assets as a result of the process.&#xD;&#xA;&#xD;&#xA;### 5. DepositAsset ###&#xD;&#xA;The destination deposits the derivative assets minted to the receiving account.&#xD;&#xA;&#xD;&#xA;The addition of a 3rd consensus system is already a hint of the disadvantages of a reserve asset transfer model -- firstly, the reserve could easily become a point of centralization when too many consensus systems rely on it to be the reserve of choice for their assets; secondly, the sheer amount of steps required necessarily makes it more prone to errors, and as such, implementors will have to consider more possible pitfalls and provide technical support accordingly when an end user encounters issues arising from these steps. Last but not least, either of the source or destination can opt to designate multiple consensus systems to be their reserves, and in such a situation, care must be taken in order to ensure that the sovereign account on the reserves are balanced, so that one doesn't get all drained while the others still contain a healthy balance.&#xD;&#xA;&#xD;&#xA;One additional point of interest here is that I am also seeing that people are combining the roles of the source and reserve together, so that the source chain also acts as the reserve chain for their native token. This does make the reserve transfer process easier, in the sense that they would only need to execute a `DepositReserveAsset` to the sovereign account of the destination locally, and emit a `ReserveAssetDeposited` message to the destination. The destination would still however need to 1) recognize the source as the proper reserve for the tokens that are being sent over and 2) support minting derivatives of the tokens being sent over. &#xD;&#xA;&#xD;&#xA;# Summary&#xD;&#xA;&#xD;&#xA;Despite being more complex, consensus systems often will first pick the reserve asset transfer model over asset teleportation, due to the trust issues discussed. However, we could imagine that as the source and destination continue to prove themselves to be trustworthy and cooperative on the reserve, they could then negotiate for an asset teleportation agreement and switch over to that entirely.&#xD;&#xA;&#xD;&#xA;As such, we could in fact think of the reserve asset model as a way to establish a baseline of trust between the source and destination. They could even move into various intermediate arrangements, such as unifying the derivative tokens so that they all get issued by either the source or the destination, instead of having each minting their own derivatives. Whether or not the source and destination will move beyond the reserve asset transfer model is up to them to decide.&#xD;&#xA;&#xD;&#xA;For further reading of XCMs in general, Gavin [has][3] [plenty of][4] [blogposts][5] that describe each component of the XCM in detail. Shawn also [has an excellent video][6] describing how you can craft your first cross-chain messages. Finally, there is also [the XCM specification][7] that is the definitive source of truth on any matters related to XCM.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JLfQp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/PC6Lm.png&#xD;&#xA;  [3]: https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392#cb6d&#xD;&#xA;  [4]: https://medium.com/polkadot-network/xcm-part-ii-versioning-and-compatibility-b313fc257b83&#xD;&#xA;  [5]: https://medium.com/polkadot-network/xcm-part-iii-execution-and-error-management-ceb8155dd166&#xD;&#xA;  [6]: https://www.youtube.com/watch?v=5cgq5jOZx9g&#xD;&#xA;  [7]: https://github.com/paritytech/xcm-format" ContentLicense="CC BY-SA 4.0" />
  <row Id="1604" PostHistoryTypeId="2" PostId="452" RevisionGUID="4f067493-c4c3-4601-b048-db61e35895a6" CreationDate="2022-02-24T01:25:38.857" UserId="245" Text="I'm trying to have a `Hash` variable stored in my struct. I have to pass `T` so I can call `T::Hash`. But when I use the struct in the method variable it throws an error.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;pub struct Profile&lt;T: Config&gt; {&#xD;&#xA;	pub my_hash: T::Hash&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn create(origin: OriginFor&lt;T&gt;, profile: Box&lt;Profile&lt;T&gt;&gt;) -&gt; DispatchResultWithPostInfo  {&#xD;&#xA;	let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;	&lt;Profiles&lt;T&gt;&gt;::insert(&amp;sender, profile);&#xD;&#xA;	Self::deposit_event(Event::&lt;T&gt;::ProfileUpdate(sender));&#xD;&#xA;&#xD;&#xA;	Ok(Pays::No.into())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0277]: `T` doesn't implement `std::fmt::Debug`&#xD;&#xA;   --&gt; pallets/template/src/lib.rs:124:39&#xD;&#xA;    |&#xD;&#xA;124 |         pub fn create(origin: OriginFor&lt;T&gt;, profile: Box&lt;Profile&lt;T&gt;&gt;) -&gt; DispatchResultWithPostInfo  {&#xD;&#xA;    |                                             ^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`&#xD;&#xA;    |&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1606" PostHistoryTypeId="1" PostId="452" RevisionGUID="4f067493-c4c3-4601-b048-db61e35895a6" CreationDate="2022-02-24T01:25:38.857" UserId="245" Text="T doesn't implement std::fmt::Debug" ContentLicense="CC BY-SA 4.0" />
  <row Id="1607" PostHistoryTypeId="3" PostId="452" RevisionGUID="4f067493-c4c3-4601-b048-db61e35895a6" CreationDate="2022-02-24T01:25:38.857" UserId="245" Text="|struct|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1608" PostHistoryTypeId="2" PostId="453" RevisionGUID="d37a553d-4b4e-474a-8f96-c228844da5fc" CreationDate="2022-02-24T01:49:14.660" UserId="452" Text="You can make `Profile` more generic by not taking a `T` that's supposed to be a `Config` and instead just a generic `Hash` type, and then fixing the type to `T::Hash` on the function parameter instead. This way there's no issues deriving the `Debug` trait. Try this instead:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;pub struct Profile&lt;Hash&gt; {&#xD;&#xA;    pub my_hash: Hash,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn create(origin: OriginFor&lt;T&gt;, profile: Box&lt;Profile&lt;T::Hash&gt;&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1610" PostHistoryTypeId="5" PostId="421" RevisionGUID="d9717e0d-4ee3-485b-b204-ee7a9cd7fe76" CreationDate="2022-02-24T01:52:18.253" UserId="452" Comment="fixed grammar and english style" Text="I want to use a specific version of ink!, version 3.0.0-rc7 for example. How can I define that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1611" PostHistoryTypeId="4" PostId="421" RevisionGUID="d9717e0d-4ee3-485b-b204-ee7a9cd7fe76" CreationDate="2022-02-24T01:52:18.253" UserId="452" Comment="fixed grammar and english style" Text="How can I use a specific version of ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1612" PostHistoryTypeId="6" PostId="421" RevisionGUID="d9717e0d-4ee3-485b-b204-ee7a9cd7fe76" CreationDate="2022-02-24T01:52:18.253" UserId="452" Comment="fixed grammar and english style" Text="|ink|smart-contract|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1613" PostHistoryTypeId="24" PostId="421" RevisionGUID="d9717e0d-4ee3-485b-b204-ee7a9cd7fe76" CreationDate="2022-02-24T01:52:18.253" Comment="Proposed by 452 approved by 104, 129 edit id of 67" ContentLicense="CC BY-SA 4.0" />
  <row Id="1614" PostHistoryTypeId="2" PostId="454" RevisionGUID="05a33346-0746-4637-9e3b-5eb364b72d00" CreationDate="2022-02-24T01:58:26.303" UserId="104" Text="I suspect what's happening here is the `#[derive(RuntimeDebug)]` requiring `T` to also implement `Debug`. This is a [known issue in Rust][1], where type parameters are often forced to also implement the trait that you are `#[derive]`ing from.&#xD;&#xA;&#xD;&#xA;Fortunately, in Substrate, you can prevent `T` from also deriving `Debug` here by using a special trait called `frame_support::pallet_prelude::RuntimeDebugNoBound`. It does essentially the same thing as `RuntimeDebug`, with the caveat where it leaves all type parameters untouched.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/rust-lang/rust/issues/26925" ContentLicense="CC BY-SA 4.0" />
  <row Id="1616" PostHistoryTypeId="2" PostId="455" RevisionGUID="ffd2d3ef-9ce9-414b-890d-601ab6bd634b" CreationDate="2022-02-24T02:07:31.960" UserId="245" Text="Let's say I have a struct called `MyStruct` and it looks like this.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct MyStruct&lt;&gt; {&#xD;&#xA;	pub name: Vec&lt;u8&gt;,&#xD;&#xA;	pub email: Option&lt;Vec&lt;u8&gt;&gt;,&#xD;&#xA;	pub username: Option&lt;Vec&lt;u8&gt;&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In this case, first I insert `MyStruct` with the required `name` field. Later, I call the same function with optional `email` and `username` fields.&#xD;&#xA;&#xD;&#xA;I can insert data to `MyStorageMap`. However, how can one mutate the data if data exist and merge the new data with existing data?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1618" PostHistoryTypeId="1" PostId="455" RevisionGUID="ffd2d3ef-9ce9-414b-890d-601ab6bd634b" CreationDate="2022-02-24T02:07:31.960" UserId="245" Text="How to merge incoming data with existing data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1619" PostHistoryTypeId="3" PostId="455" RevisionGUID="ffd2d3ef-9ce9-414b-890d-601ab6bd634b" CreationDate="2022-02-24T02:07:31.960" UserId="245" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1620" PostHistoryTypeId="2" PostId="456" RevisionGUID="8d38ba73-a656-4644-be9e-309733bd3c97" CreationDate="2022-02-24T02:21:19.440" UserId="28" Text="You can either do `get` and `insert` like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let mut value = MyStorageMap::&lt;T&gt;::get(key);&#xD;&#xA;value.email = new_email;&#xD;&#xA;value.username = new_username;&#xD;&#xA;MyStorageMap::&lt;T&gt;::insert(value);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or you can simply do a `mutate`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;MyStorage::&lt;T&gt;::mutate(key, |value| {&#xD;&#xA;    value.email = new_email;&#xD;&#xA;    value.username = new_username;&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this context, they are basically the same thing." ContentLicense="CC BY-SA 4.0" />
  <row Id="1622" PostHistoryTypeId="5" PostId="448" RevisionGUID="6e2d0b16-931f-48d2-a89f-9cb5db85cc9f" CreationDate="2022-02-24T03:49:03.613" UserId="408" Comment="added all the steps for you to follow and hope it works for you too." Text="You could &#xD;&#xA;&#xD;&#xA;1) turn on lto to reduce the size of the wasm blob.&#xD;&#xA;&#xD;&#xA;In `Cargo.toml`, add `lto = true` in the `[profile.release]` section:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[profile.release]&#xD;&#xA;lto = true&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This gives LLVM many more opportunities to inline and prune functions. Not only will it make the .wasm smaller, but it will also make it faster at runtime! The downside is that compilation will take longer.&#xD;&#xA;&#xD;&#xA;2) tell LLVM to optimize for size instead of speed.&#xD;&#xA;&#xD;&#xA;LLVM's optimization passes are tuned to improve speed, not size, by default. We can change the goal to code size by modifying the `[profile.release]` section in `Cargo.toml` to this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[profile.release]&#xD;&#xA;opt-level = 's'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or, to even more aggressively optimize for size, at further potential speed costs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[profile.release]&#xD;&#xA;opt-level = 'z'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that, surprisingly enough, `opt-level = &quot;s&quot;` can sometimes result in smaller binaries than `opt-level = &quot;z&quot;`. Always measure!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;3) Use the wasm-opt tool.&#xD;&#xA;&#xD;&#xA;The Binaryen toolkit is a collection of WebAssembly-specific compiler tools. It goes much further than LLVM's WebAssembly backend does, and using its `wasm-opt` tool to post-process a `.wasm` binary generated by LLVM can often get another 15-20% savings on code size. It will often produce runtime speed ups at the same time!&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# Optimize for size.&#xD;&#xA;&#xD;&#xA;wasm-opt -Os -o output.wasm input.wasm&#xD;&#xA;&#xD;&#xA;# Optimize aggressively for size.&#xD;&#xA;wasm-opt -Oz -o output.wasm input.wasm&#xD;&#xA;&#xD;&#xA;# Optimize for speed.&#xD;&#xA;wasm-opt -O -o output.wasm input.wasm&#xD;&#xA;&#xD;&#xA;# Optimize aggressively for speed.&#xD;&#xA;wasm-opt -O3 -o output.wasm input.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From my experience `wasm-opt` is able to reduce a `node_runtime.compact.wasm` from 4.3MB to 3.8 MB. Your mileage may vary.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;$ du -sh ./target/release/wbuild/node-runtime/node_runtime.compact.wasm&#xD;&#xA;4.3M    ./target/release/wbuild/node-runtime/node_runtime.compact.wasm&#xD;&#xA;$ wasm-opt -Oz -o output.wasm ./target/release/wbuild/node-runtime/node_runtime.compact.wasm&#xD;&#xA;$ du -sh output.wasm &#xD;&#xA;3.8M    output.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;References:&#xD;&#xA;- https://rustwasm.github.io/docs/book/reference/code-size.html#compiling-with-link-time-optimizations-lto&#xD;&#xA;&#xD;&#xA;Edit: Sorry for lack of details on my first post attempt. I've added all the steps for you to follow and hope it works for you too." ContentLicense="CC BY-SA 4.0" />
  <row Id="1623" PostHistoryTypeId="5" PostId="448" RevisionGUID="32d5ea86-5318-43f0-9bf4-99d9e5733983" CreationDate="2022-02-24T03:54:52.350" UserId="408" Comment="deleted 16 characters in body" Text="You could &#xD;&#xA;&#xD;&#xA;1) turn on lto to reduce the size of the wasm blob.&#xD;&#xA;&#xD;&#xA;In `Cargo.toml`, add `lto = true` in the `[profile.release]` section:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[profile.release]&#xD;&#xA;lto = true&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This gives LLVM many more opportunities to inline and prune functions. Not only will it make the .wasm smaller, but it will also make it faster at runtime! The downside is that compilation will take longer.&#xD;&#xA;&#xD;&#xA;2) tell LLVM to optimize for size instead of speed.&#xD;&#xA;&#xD;&#xA;LLVM's optimization passes are tuned to improve speed, not size, by default. We can change the goal to code size by modifying the `[profile.release]` section in `Cargo.toml` to this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[profile.release]&#xD;&#xA;opt-level = 's'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or, to even more aggressively optimize for size, at further potential speed costs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[profile.release]&#xD;&#xA;opt-level = 'z'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that, surprisingly enough, `opt-level = &quot;s&quot;` can sometimes result in smaller binaries than `opt-level = &quot;z&quot;`. Always measure!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;3) Use the `wasm-opt` tool.&#xD;&#xA;&#xD;&#xA;The Binaryen toolkit is a collection of WebAssembly-specific compiler tools. It goes much further than LLVM's WebAssembly backend does, and using its `wasm-opt` tool to post-process a `.wasm` binary generated by LLVM can often get another 15-20% savings on code size. It will often produce runtime speed ups at the same time!&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# Optimize for size.&#xD;&#xA;&#xD;&#xA;wasm-opt -Os -o output.wasm input.wasm&#xD;&#xA;&#xD;&#xA;# Optimize aggressively for size.&#xD;&#xA;wasm-opt -Oz -o output.wasm input.wasm&#xD;&#xA;&#xD;&#xA;# Optimize for speed.&#xD;&#xA;wasm-opt -O -o output.wasm input.wasm&#xD;&#xA;&#xD;&#xA;# Optimize aggressively for speed.&#xD;&#xA;wasm-opt -O3 -o output.wasm input.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From my experience `wasm-opt` is able to reduce a `node_runtime.compact.wasm` from 4.3MB to 3.8 MB. Your mileage may vary.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;$ du -sh ./target/release/wbuild/node-runtime/node_runtime.compact.wasm&#xD;&#xA;4.3M    ./target/release/wbuild/node-runtime/node_runtime.compact.wasm&#xD;&#xA;$ wasm-opt -Oz -o output.wasm ./target/release/wbuild/node-runtime/node_runtime.compact.wasm&#xD;&#xA;$ du -sh output.wasm &#xD;&#xA;3.8M    output.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;References:&#xD;&#xA;- https://rustwasm.github.io/docs/book/reference/code-size.html#shrinking-wasm-code-size&#xD;&#xA;&#xD;&#xA;Edit: Sorry for lack of details on my first post attempt. I've added all the steps for you to follow and hope it works for you too." ContentLicense="CC BY-SA 4.0" />
  <row Id="1625" PostHistoryTypeId="2" PostId="457" RevisionGUID="5bb8a472-b78c-4ff6-a5b7-32255bca9e10" CreationDate="2022-02-24T07:30:25.530" UserId="73" Text="&gt; I am assuming this wont be possible because just because an extrinsic was called successfully doesn't mean the data is stored on-chain, we have to wait for consensus to be reached&#xD;&#xA;&#xD;&#xA;The question would be here, return a result to where? What would be the purpose of returning a value that would not be consumed by anyone? &#xD;&#xA;&#xD;&#xA;It is also questionable what kind of data you want to return there, because you hopefully not do any kind of &quot;calculations&quot; in your runtime. However, you can use events to notify the outside of something has happened on your chain. &#xD;&#xA;&#xD;&#xA;In your case, if you send a particular extrinsic, I don't see any purpose to send any event at all. If you send an extrinsic and you see that it was successfully included in a block, it means that you can check the state for the value you are interested. There is no real need to use an event for your use case IMO." ContentLicense="CC BY-SA 4.0" />
  <row Id="1627" PostHistoryTypeId="2" PostId="458" RevisionGUID="c8b68473-7637-43fb-a1f5-e461557a062b" CreationDate="2022-02-24T08:36:58.667" UserId="442" Text="with the Edgeware-specified `contracts` pallet,&#xD;&#xA;&#xD;&#xA;https://github.com/webb-tools/substrate/blob/656e206faaf0353c7e7f14689779379018bbb02a/frame/contracts/src/lib.rs#L771-L780&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	/// Subsistence threshold is the extension of the minimum balance (aka existential deposit)&#xD;&#xA;	/// by the tombstone deposit, required for leaving a tombstone.&#xD;&#xA;	///&#xD;&#xA;	/// Rent or any contract initiated balance transfer mechanism cannot make the balance lower&#xD;&#xA;	/// than the subsistence threshold in order to guarantee that a tombstone is created.&#xD;&#xA;	///&#xD;&#xA;	/// The only way to completely kill a contract without a tombstone is calling `seal_terminate`.&#xD;&#xA;	pub fn subsistence_threshold() -&gt; BalanceOf&lt;T&gt; {&#xD;&#xA;		T::Currency::minimum_balance().saturating_add(T::TombstoneDeposit::get())&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;so it's basically sum of two constants, `balances.existentialDeposit` and `contracts.TombstoneDeposit`.&#xD;&#xA;&#xD;&#xA;you can get these constants by querying chain state.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/z0r7z.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1629" PostHistoryTypeId="2" PostId="459" RevisionGUID="1712a0bc-d05e-4d59-bc6b-1c2206f69f7f" CreationDate="2022-02-24T09:55:51.943" UserId="165" Text="If I want to de register a parathread I have previously registered, which steps should I follow ?&#xD;&#xA;&#xD;&#xA;What happens with the deposit ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1631" PostHistoryTypeId="1" PostId="459" RevisionGUID="1712a0bc-d05e-4d59-bc6b-1c2206f69f7f" CreationDate="2022-02-24T09:55:51.943" UserId="165" Text="How to deregister a parathread?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1632" PostHistoryTypeId="3" PostId="459" RevisionGUID="1712a0bc-d05e-4d59-bc6b-1c2206f69f7f" CreationDate="2022-02-24T09:55:51.943" UserId="165" Text="|parachain|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1633" PostHistoryTypeId="2" PostId="460" RevisionGUID="ca85f63b-4c9c-43b4-98bf-3dea6c5b5623" CreationDate="2022-02-24T10:02:16.883" UserId="165" Text="In order to deregister one parathread a call [`deregister`](https://github.com/paritytech/polkadot/blob/master/runtime/common/src/paras_registrar.rs#L257) needs to be sent to the relay chain.&#xD;&#xA;&#xD;&#xA;Origin must be one of the following:&#xD;&#xA; - root&#xD;&#xA; - the para owner&#xD;&#xA; - the para itself&#xD;&#xA;&#xD;&#xA;The para to deregister must be a parathread.&#xD;&#xA;&#xD;&#xA;This call will proceed freeing all the data previously registered for that para, and consequently all deposits paid for that storage will be returned to the relevant address." ContentLicense="CC BY-SA 4.0" />
  <row Id="1635" PostHistoryTypeId="6" PostId="283" RevisionGUID="99235a68-1772-4c08-9805-94ab9642e522" CreationDate="2022-02-24T10:20:04.627" UserId="45" Comment="tidy up tags" Text="|grandpa|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1636" PostHistoryTypeId="24" PostId="283" RevisionGUID="99235a68-1772-4c08-9805-94ab9642e522" CreationDate="2022-02-24T10:20:04.627" Comment="Proposed by 45 approved by -1, 104 edit id of 66" ContentLicense="CC BY-SA 4.0" />
  <row Id="1637" PostHistoryTypeId="6" PostId="283" RevisionGUID="27f029e0-867a-40b2-a70d-66cae6106355" CreationDate="2022-02-24T10:20:04.627" UserId="452" Comment="add generic consensus tag" Text="|consensus|grandpa|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1638" PostHistoryTypeId="5" PostId="430" RevisionGUID="1615015e-3567-4a12-8d41-23d8d4b4781e" CreationDate="2022-02-24T10:20:17.257" UserId="45" Comment="hide ugly full URL" Text="For the sake of answering this question (though I have replied to you elsewhere already on this topic); The transaction format is not just a simple SCALE encoding of some details. In rust pseudocode, a transaction will have roughly this format&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Length in bytes of the extrinsic data to follow: &#xD;&#xA;let byte_len = &lt;Compact&lt;u32&gt;&gt;::decode(input)?;&#xD;&#xA;&#xD;&#xA;// decode a byte consisting of the bits 0bABBBBBBB.&#xD;&#xA;// - if A is 1, a signature follows, and if it is 0 there is no signature&#xD;&#xA;// - the bits B decode to the transaction protocol version, currently 4.&#xD;&#xA;let version_and_sig = u8::decode(input)?;&#xD;&#xA;let is_signature = (version_and_sig &amp; b10000000) &gt; 0;&#xD;&#xA;&#xD;&#xA;if (is_signature) {&#xD;&#xA;  let from_address = &lt;MultiAddress&lt;AccountId32,u32&gt;&gt;::decode(input)?;&#xD;&#xA;  let signature = MultiSignature::decode(input)?; // Prob an SR25519 signature&#xD;&#xA;  // Extra information is variable and actually depends on the chain;&#xD;&#xA;  // the below example is for polkadot, last I checked (a while ago).&#xD;&#xA;  // - era (ie is transaction mortal or immortal, and how long will it last?&#xD;&#xA;  // - nonce (how many prior transactions from the from_address?&#xD;&#xA;  // - tip (a tip to the block author, which can be 0)&#xD;&#xA;  let (era, nonce, tip): (Era, Compact&lt;u32&gt;, Compact&lt;u128&gt;)::decode(input)?;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Now, we're decoding the Call enum, which looks something like&#xD;&#xA;// `Pallet::Foo(Call::Something(1, true))`. Enum indexes are currently scale&#xD;&#xA;// encoded to u8's. Often we want to get at least the pallet index, so that we&#xD;&#xA;// can look up in the Metadata how to decode the rest.&#xD;&#xA;let pallet_index = u8::decode(input)?;&#xD;&#xA;let call_index = u8::decode(input)?;&#xD;&#xA;let call_params = decode_call_params(metadata, pallet_index, call_index, input)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In other words, a transaction begins with its compact encoded length in bytes, and then has a byte which is not SCALE encoded and has 1 bit for &quot;will a signature follow&quot; and 7 bits for &quot;what is the transaction protocol version we're using here&quot;. &#xD;&#xA;&#xD;&#xA;After manually decoding that byte you can write logic to SCALE decode the signature (if present) or skip straight to SCALE decoding the call data (if signature isn't present). &#xD;&#xA;&#xD;&#xA;The call data cannot be decoded into a vector of bytes; conceptually it is more like a SCALE encoded enum whose outer variant is the pallet you're making a call into, and inner variant is the call you're making and any parameters that you need to pass to it. One way to decode the call data is to decode a singel `u8` (corresponding to the outer enum variant tag) to see what the pallet index the call is for, and then digging up information about the call enum from the metadata and using that to decode the rest of the call data.&#xD;&#xA;&#xD;&#xA;Have a look at the [`decode_extrinsic`](https://github.com/paritytech/desub/blob/f5377bc9946b4b0a89a6b89b0ae58d915683f9c8/desub-current/src/decoder/mod.rs#L225) implementation for an example of how one might decode an extrinsic using runtime metadata.&#xD;&#xA;&#xD;&#xA;Ultimately though, depending on your use case you may prefer to use a library like Subxt, which allows you to build and submit extrinsics, access node storage and subscribe/decode events. There is a bunch of stuff to work out if you want to manually figure out how to encode and decode these things (transactions, events, storage keys and results) yourself, and much of it isn't well documented, so using a library like Subxt will probably get you there much quicker.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1639" PostHistoryTypeId="24" PostId="430" RevisionGUID="1615015e-3567-4a12-8d41-23d8d4b4781e" CreationDate="2022-02-24T10:20:17.257" Comment="Proposed by 45 approved by 104, 452 edit id of 65" ContentLicense="CC BY-SA 4.0" />
  <row Id="1640" PostHistoryTypeId="5" PostId="289" RevisionGUID="3cae0f3f-c965-433b-830d-9753aae37a37" CreationDate="2022-02-24T10:20:33.897" UserId="2" Comment="tags edited, punctuation" Text="Is it possible to create a transaction that calls an offchain worker to write data to the offchain worker?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1641" PostHistoryTypeId="4" PostId="289" RevisionGUID="3cae0f3f-c965-433b-830d-9753aae37a37" CreationDate="2022-02-24T10:20:33.897" UserId="2" Comment="tags edited, punctuation" Text="How to create a transaction that calls an offchain worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1642" PostHistoryTypeId="6" PostId="289" RevisionGUID="3cae0f3f-c965-433b-830d-9753aae37a37" CreationDate="2022-02-24T10:20:33.897" UserId="2" Comment="tags edited, punctuation" Text="|substrate-node|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1643" PostHistoryTypeId="24" PostId="289" RevisionGUID="3cae0f3f-c965-433b-830d-9753aae37a37" CreationDate="2022-02-24T10:20:33.897" Comment="Proposed by 2 approved by 104, 452 edit id of 57" ContentLicense="CC BY-SA 4.0" />
  <row Id="1646" PostHistoryTypeId="2" PostId="461" RevisionGUID="cfb3184a-108f-4145-87d6-9cc99c3d25cc" CreationDate="2022-02-24T11:49:35.600" UserId="167" Text="Peeking at the release checklist of Polkadot (or any other professional substrate-based chain) is a good insight into what components you need to look out for. Here's [an example](https://github.com/paritytech/polkadot/issues/4902) from the 0.9.17 version. I would summarize the most important ones as: &#xD;&#xA;&#xD;&#xA;1. Update `spec_version` and `impl_version` accordingly. If you are not sure when to bump them, read [here](https://paritytech.github.io/substrate/master/sp_version/struct.RuntimeVersion.html).&#xD;&#xA;2. Update `transaction_version` accordingly. Read more about [here](https://paritytech.github.io/substrate/master/sp_version/struct.RuntimeVersion.html).&#xD;&#xA;3. If you added new calls, and you are using `pallet-proxy`, you probably need to check your proxy [`ProxyType`](https://paritytech.github.io/substrate/master/pallet_proxy/pallet/trait.Config.html#associatedtype.ProxyType), most notable, how it implements to [`InstanceCallFilter`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.InstanceFilter.html). &#xD;&#xA;4. Finally, if your pallets have altered their storage in any way that could cause storage to be un-decoable, you need to have some storage migrations, and you need to make sure they are executed, and you better test them since you only get one shot at doing it in production. There are lots of resources about this, and as mentioned earlier, [`try-runtime`](https://paritytech.github.io/substrate/master/try_runtime_cli/enum.Command.html) has a bunch of commands that help with this. There are also some [tutorials](https://docs.substrate.io/v3/tools/try-runtime/) about it in the substrate developer hub. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1648" PostHistoryTypeId="5" PostId="412" RevisionGUID="854a54c2-ea49-4403-950e-91b2da76d92f" CreationDate="2022-02-24T13:26:15.327" UserId="452" Comment="added 188 characters in body" Text="Generic tag for consensus-related questions, e.g. block production protocols, finality protocols, parachains. Best used in combination with other more specific tags (e.g. grandpa or babe)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1649" PostHistoryTypeId="24" PostId="412" RevisionGUID="854a54c2-ea49-4403-950e-91b2da76d92f" CreationDate="2022-02-24T13:26:15.327" Comment="Proposed by 452 approved by -1 edit id of 64" ContentLicense="CC BY-SA 4.0" />
  <row Id="1650" PostHistoryTypeId="5" PostId="412" RevisionGUID="63fc08aa-f706-4418-95f7-b3caf618fa89" CreationDate="2022-02-24T13:26:15.327" UserId="178" Comment="added 12 characters in body" Text="Generic tag for consensus-related questions, e.g. block production protocols, finality protocols, parachains. Best used in combination with other more specific tags (e.g. [tag:grandpa] or [tag:babe])." ContentLicense="CC BY-SA 4.0" />
  <row Id="1651" PostHistoryTypeId="5" PostId="350" RevisionGUID="39358fba-9474-461e-b95e-0a2f610bdf24" CreationDate="2022-02-24T13:26:20.883" UserId="2" Comment="added 82 characters in body" Text="For questions about words, phrases and definitions that are specific to Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="1652" PostHistoryTypeId="24" PostId="350" RevisionGUID="39358fba-9474-461e-b95e-0a2f610bdf24" CreationDate="2022-02-24T13:26:20.883" Comment="Proposed by 2 approved by 178 edit id of 58" ContentLicense="CC BY-SA 4.0" />
  <row Id="1653" PostHistoryTypeId="2" PostId="462" RevisionGUID="7c26e0bc-b2c2-465f-b083-4d39f6e5f63b" CreationDate="2022-02-24T15:30:20.503" UserId="223" Text="One option is `@polkadot/signer-cli` - see https://github.com/polkadot-js/tools/tree/master/packages/signer-cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="1655" PostHistoryTypeId="2" PostId="463" RevisionGUID="73ff8dbd-989b-4f59-9db9-8d4490e23b5d" CreationDate="2022-02-24T15:43:28.850" UserId="129" Text="I want to know the contract address, contract caller, and what parameters were passed into the contract call but in the Polkadot.js UI, the presented fields don't seem to be helpful.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/jERWA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1657" PostHistoryTypeId="1" PostId="463" RevisionGUID="73ff8dbd-989b-4f59-9db9-8d4490e23b5d" CreationDate="2022-02-24T15:43:28.850" UserId="129" Text="How to see the parameters that were passed into a contract call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1658" PostHistoryTypeId="3" PostId="463" RevisionGUID="73ff8dbd-989b-4f59-9db9-8d4490e23b5d" CreationDate="2022-02-24T15:43:28.850" UserId="129" Text="|polkadot-js|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1659" PostHistoryTypeId="2" PostId="464" RevisionGUID="f4965510-f637-45a8-8133-cfdc27fcab3f" CreationDate="2022-02-24T16:44:09.783" UserId="494" Text="I was previously told not to use `String` in ink! contracts.&#xD;&#xA;&#xD;&#xA;Right now I'm using `Vec&lt;u8&gt;` to represent strings, but I'm still feeling a bit unsure if I'm on the right path, mainly because:&#xD;&#xA;- they're unbounded, which can lead to undefined behavior&#xD;&#xA;- whenever I have `Vec&lt;u8&gt;` on some message interface, `polkadot-js` allows me to upload a file, which feels very wrong&#xD;&#xA;&#xD;&#xA;which type is best suited to represent strings in a contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1661" PostHistoryTypeId="1" PostId="464" RevisionGUID="f4965510-f637-45a8-8133-cfdc27fcab3f" CreationDate="2022-02-24T16:44:09.783" UserId="494" Text="Vec&lt;u8&gt; usage for representing strings on ink! Smart Contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="1662" PostHistoryTypeId="3" PostId="464" RevisionGUID="f4965510-f637-45a8-8133-cfdc27fcab3f" CreationDate="2022-02-24T16:44:09.783" UserId="494" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1663" PostHistoryTypeId="2" PostId="465" RevisionGUID="b28dfb7c-3706-4242-bea4-4a3a54bba71f" CreationDate="2022-02-24T16:47:26.613" UserId="94" Text="I see that some pallets wrap phantom data:  &#xD;&#xA;```rust&#xD;&#xA;pub struct Pallet&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;```&#xD;&#xA;and others not:  &#xD;&#xA;```rust&#xD;&#xA;pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;```  &#xD;&#xA;&#xD;&#xA;Why is it there?  &#xD;&#xA;Do I need this in my pallet as well?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1665" PostHistoryTypeId="1" PostId="465" RevisionGUID="b28dfb7c-3706-4242-bea4-4a3a54bba71f" CreationDate="2022-02-24T16:47:26.613" UserId="94" Text="What means `PhantomData&lt;T&gt;` in a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1666" PostHistoryTypeId="3" PostId="465" RevisionGUID="b28dfb7c-3706-4242-bea4-4a3a54bba71f" CreationDate="2022-02-24T16:47:26.613" UserId="94" Text="|pallet|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1667" PostHistoryTypeId="2" PostId="466" RevisionGUID="041ddc19-d7d0-49b2-aac5-19c161217544" CreationDate="2022-02-24T16:49:19.377" UserId="16" Text="If you really need a `String` in your contract then you should use a `String` type. That is the correct way to do it.&#xD;&#xA;&#xD;&#xA;However, using strings in contracts can be considered an anti pattern. Strings are for human consumption and anything user facing should be placed in UI code.&#xD;&#xA;&#xD;&#xA;&gt; they're unbounded, which can lead to undefined behavior&#xD;&#xA;&#xD;&#xA;They are not &quot;more&quot; unbounded as a `String`. Please note that this can not lead to undefined behavior in a contract. At some point you will hit a limit (memory allotted to your contract, gas limit) and this is completely deterministic." ContentLicense="CC BY-SA 4.0" />
  <row Id="1669" PostHistoryTypeId="2" PostId="467" RevisionGUID="b7edbc1f-1d3b-415e-ad56-9441388c35f4" CreationDate="2022-02-24T17:27:34.090" UserId="165" Text="A phantom type parameter is simply a type parameter which is never used. In Rust, this often causes the compiler to complain, and the solution is to add a “dummy” use by way of PhantomData.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Adding a PhantomData&lt;T&gt; field to your type tells the compiler that your type acts as though it stores a value of type T, even though it doesn’t really. This information is used when computing certain safety properties.&#xD;&#xA;&#xD;&#xA; - Rustnomicon: https://doc.rust-lang.org/nomicon/phantom-data.html&#xD;&#xA; - Substrate docs: https://paritytech.github.io/substrate/master/frame_support/pallet_prelude/struct.PhantomData.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="1671" PostHistoryTypeId="2" PostId="468" RevisionGUID="1ac077a2-382d-4f93-a15f-640a56f37491" CreationDate="2022-02-24T17:36:14.347" UserId="165" Text="Offchain workers storage comes in two flavor: Persistent and Local.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub enum StorageKind {&#xD;&#xA;	/// Persistent storage is non-revertible and not fork-aware. It means that any value&#xD;&#xA;	/// set by the offchain worker triggered at block `N(hash1)` is persisted even&#xD;&#xA;	/// if that block is reverted as non-canonical and is available for the worker&#xD;&#xA;	/// that is re-run at block `N(hash2)`.&#xD;&#xA;	/// This storage can be used by offchain workers to handle forks&#xD;&#xA;	/// and coordinate offchain workers running on different forks.&#xD;&#xA;	PERSISTENT = 1_isize,&#xD;&#xA;	/// Local storage is revertible and fork-aware. It means that any value&#xD;&#xA;	/// set by the offchain worker triggered at block `N(hash1)` is reverted&#xD;&#xA;	/// if that block is reverted as non-canonical and is NOT available for the worker&#xD;&#xA;	/// that is re-run at block `N(hash2)`.&#xD;&#xA;	LOCAL = 2_isize,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[source][1]&#xD;&#xA;&#xD;&#xA;My question is, even though one of these StorageKind is defined as `PERSISTENT`, it sounds that it is only persistent as long as it exists in memory, and so persistent between different runs of the worker, as long memory is not dropped. Is this the case ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/c22fce5a311beede13479c9a00cca85d823b6b00/primitives/core/src/offchain/mod.rs#L66-L79" ContentLicense="CC BY-SA 4.0" />
  <row Id="1673" PostHistoryTypeId="1" PostId="468" RevisionGUID="1ac077a2-382d-4f93-a15f-640a56f37491" CreationDate="2022-02-24T17:36:14.347" UserId="165" Text="Persisten Offchain Worker Storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="1674" PostHistoryTypeId="3" PostId="468" RevisionGUID="1ac077a2-382d-4f93-a15f-640a56f37491" CreationDate="2022-02-24T17:36:14.347" UserId="165" Text="|offchain-worker|database|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1677" PostHistoryTypeId="4" PostId="468" RevisionGUID="7f6f7273-babd-4337-b881-9f445c5cc760" CreationDate="2022-02-24T17:44:05.427" UserId="29" Comment="edited title" Text="Persistent Offchain Worker Storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="1678" PostHistoryTypeId="5" PostId="468" RevisionGUID="f55c1f47-0ec0-4df9-96d9-8b2f09c6d1f1" CreationDate="2022-02-24T17:46:05.987" UserId="165" Comment="added 1 character in body" Text="Offchain workers storage comes in two flavors: Persistent and Local.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub enum StorageKind {&#xD;&#xA;	/// Persistent storage is non-revertible and not fork-aware. It means that any value&#xD;&#xA;	/// set by the offchain worker triggered at block `N(hash1)` is persisted even&#xD;&#xA;	/// if that block is reverted as non-canonical and is available for the worker&#xD;&#xA;	/// that is re-run at block `N(hash2)`.&#xD;&#xA;	/// This storage can be used by offchain workers to handle forks&#xD;&#xA;	/// and coordinate offchain workers running on different forks.&#xD;&#xA;	PERSISTENT = 1_isize,&#xD;&#xA;	/// Local storage is revertible and fork-aware. It means that any value&#xD;&#xA;	/// set by the offchain worker triggered at block `N(hash1)` is reverted&#xD;&#xA;	/// if that block is reverted as non-canonical and is NOT available for the worker&#xD;&#xA;	/// that is re-run at block `N(hash2)`.&#xD;&#xA;	LOCAL = 2_isize,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[source][1]&#xD;&#xA;&#xD;&#xA;My question is, even though one of these StorageKind is defined as `PERSISTENT`, it sounds that it is only persistent as long as it exists in memory, and so persistent between different runs of the worker, as long memory is not dropped. Is this the case ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/c22fce5a311beede13479c9a00cca85d823b6b00/primitives/core/src/offchain/mod.rs#L66-L79" ContentLicense="CC BY-SA 4.0" />
  <row Id="1680" PostHistoryTypeId="2" PostId="470" RevisionGUID="5f6c1ca4-921c-4437-8f02-e159075b0a97" CreationDate="2022-02-24T18:11:40.307" UserId="28" Text="The `#[pallet::pallet]` macro simply replaced the `_` in the definition above to `PhantomData&lt;T&gt;`.&#xD;&#xA;&#xD;&#xA;See the notes here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/support/procedural/src/pallet/expand/pallet_struct.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// * Add derive trait on Pallet&#xD;&#xA;/// * Implement GetStorageVersion on Pallet&#xD;&#xA;/// * Implement OnGenesis on Pallet&#xD;&#xA;/// * Implement `fn error_metadata` on Pallet&#xD;&#xA;/// * declare Module type alias for construct_runtime&#xD;&#xA;--&gt; /// * replace the first field type of `struct Pallet` with `PhantomData` if it is `_`&#xD;&#xA;/// * implementation of `PalletInfoAccess` information&#xD;&#xA;/// * implementation of `StorageInfoTrait` on Pallet&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// If the first field type is `_` then we replace with `PhantomData`&#xD;&#xA;if let Some(field) = pallet_item.fields.iter_mut().next() {&#xD;&#xA;	if field.ty == syn::parse_quote!(_) {&#xD;&#xA;		field.ty = syn::parse_quote!(&#xD;&#xA;			#frame_support::sp_std::marker::PhantomData&lt;(#type_use_gen)&gt;&#xD;&#xA;		);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So it is the same thing, and just a friendly &quot;type inference magic&quot; done for the pallet developer." ContentLicense="CC BY-SA 4.0" />
  <row Id="1682" PostHistoryTypeId="2" PostId="471" RevisionGUID="b48ea5a7-0934-47cd-bc54-d50ba94d36e7" CreationDate="2022-02-24T19:40:42.600" UserId="12" Text="Substrate introduces some unique concepts such as [unsigned transactions][1] and [signed extensions][2]. How does transaction signing work in Substrate?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/extrinsics/#unsigned-transactions&#xD;&#xA;  [2]: https://docs.substrate.io/rustdocs/latest/sp_runtime/traits/trait.SignedExtension.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="1684" PostHistoryTypeId="1" PostId="471" RevisionGUID="b48ea5a7-0934-47cd-bc54-d50ba94d36e7" CreationDate="2022-02-24T19:40:42.600" UserId="12" Text="How Does Transaction Signing Work in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1685" PostHistoryTypeId="3" PostId="471" RevisionGUID="b48ea5a7-0934-47cd-bc54-d50ba94d36e7" CreationDate="2022-02-24T19:40:42.600" UserId="12" Text="|extrinsic|transactions|cryptography|signing|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1686" PostHistoryTypeId="2" PostId="472" RevisionGUID="ace279a7-e549-4baa-9248-1ddeab95e7d6" CreationDate="2022-02-24T20:10:47.200" UserId="496" Text="Im trying to make cross contracts calls on already deployed contract, im running the local subtrate node in debug mode, and im getting the following message when trying to preform cross contracts.&#xD;&#xA;&#xD;&#xA;Here is the error: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;ThreadId(34) runtime::contracts: Execution finished with debug buffer: panicked at 'called `Result::unwrap()` on an `Err` value: CalleeTrapped', erc20/lib.rs:102:14&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the ``` DeployedContract1 ``` cross call function code: &#xD;&#xA;``` &#xD;&#xA;        #[ink(message)]&#xD;&#xA;        #[ink(selector = 40)]&#xD;&#xA;        pub fn test(&amp;self) -&gt; u32 {&#xD;&#xA;            self.platform_fee&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is ``` DeployedContract2 (erc20/lib.rs)``` function source code: &#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;		pub fn test1(&amp;self,token_contract: AccountId) -&gt; u32 {&#xD;&#xA;			&#xD;&#xA;            let my_return_value: u32 =  ink_env::call::build_call::&lt;&lt;Self as ::ink_lang::reflect::ContractEnv&gt;::Env&gt;()&#xD;&#xA;            .callee(token_contract) &lt;--- ERROR points here&#xD;&#xA;            .gas_limit(50000)&#xD;&#xA;            .transferred_value(0)&#xD;&#xA;            .exec_input(&#xD;&#xA;                ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0, 0, 0, 40])),&#xD;&#xA;				&#xD;&#xA;&#xD;&#xA;            )&#xD;&#xA;            .returns::&lt;ink_env::call::utils::ReturnType&lt;u32&gt;&gt;()&#xD;&#xA;            .fire()&#xD;&#xA;            .unwrap();&#xD;&#xA;			my_return_value&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1688" PostHistoryTypeId="1" PostId="472" RevisionGUID="ace279a7-e549-4baa-9248-1ddeab95e7d6" CreationDate="2022-02-24T20:10:47.200" UserId="496" Text="Rust Ink - Execution finished with debug buffer: panicked at 'called `Result::unwrap()` on an `Err` value: CalleeTrapped'" ContentLicense="CC BY-SA 4.0" />
  <row Id="1689" PostHistoryTypeId="3" PostId="472" RevisionGUID="ace279a7-e549-4baa-9248-1ddeab95e7d6" CreationDate="2022-02-24T20:10:47.200" UserId="496" Text="|substrate-node|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1690" PostHistoryTypeId="2" PostId="473" RevisionGUID="e1c84767-2c5b-4f62-b342-6fafe1fbeeca" CreationDate="2022-02-24T21:16:19.963" UserId="29" Text="I see the `OffchainIndex` interface defined here:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait OffchainIndex {&#xD;&#xA;	/// Write a key value pair to the Offchain DB database in a buffered fashion.&#xD;&#xA;	fn set(&amp;mut self, key: &amp;[u8], value: &amp;[u8]) {&#xD;&#xA;		self.set_offchain_storage(key, Some(value));&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	/// Remove a key and its associated value from the Offchain DB.&#xD;&#xA;	fn clear(&amp;mut self, key: &amp;[u8]) {&#xD;&#xA;		self.set_offchain_storage(key, None);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Source: https://github.com/paritytech/substrate/blob/e9d79daaa782f41680ada04719151371a737c6fb/primitives/io/src/lib.rs#L1042&#xD;&#xA;&#xD;&#xA;And I can call the Offchain Index like so:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn offchain_index_set() {&#xD;&#xA;	sp_io::offchain_index::set(b&quot;k&quot;, b&quot;v&quot;);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;AFAIU, Offchain Index uses persistent storage. Where is this specified in the code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1692" PostHistoryTypeId="1" PostId="473" RevisionGUID="e1c84767-2c5b-4f62-b342-6fafe1fbeeca" CreationDate="2022-02-24T21:16:19.963" UserId="29" Text="Where can I find the code that defines what StorageKind the Offchain Index uses by default?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1693" PostHistoryTypeId="3" PostId="473" RevisionGUID="e1c84767-2c5b-4f62-b342-6fafe1fbeeca" CreationDate="2022-02-24T21:16:19.963" UserId="29" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1694" PostHistoryTypeId="2" PostId="474" RevisionGUID="2b8ab6ef-e6cc-4e22-998b-82204113931c" CreationDate="2022-02-24T21:43:32.207" UserId="286" Text="I'm trying to debug the code with a visual debugger (IntelliJ Idea, but I suspect this question applies generally).  I can get the debugger to stop on break points while the runtime is initialising but, once it's actually building blocks, it won't stop any more.&#xD;&#xA;&#xD;&#xA;I suspect the difference is that it's running from the runtime code in the binary while it initialises, but once it's running the chain properly, it's using the chain spec WASM blob which the debugger doesn't recognise. (Unless I'm still misunderstanding that.)&#xD;&#xA;&#xD;&#xA;Is there any way that I can force the node to stay with the runtime binary rather than switching?  Or some other way I can debug it? I thought that might be what `--wasm-execution interpreted-i-know-what-i-do` does, but it's not helping.&#xD;&#xA;&#xD;&#xA;If it's important, I'm looking at the staking pallet &quot;start new era&quot; code, and I'm not explicitly versioning my runtimes (they all get tagged as &quot;sup&quot; I think).  Alternatively, is it likely that I have a different issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1696" PostHistoryTypeId="1" PostId="474" RevisionGUID="2b8ab6ef-e6cc-4e22-998b-82204113931c" CreationDate="2022-02-24T21:43:32.207" UserId="286" Text="Debugging with a visual debugger - getting lost in WASM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1697" PostHistoryTypeId="3" PostId="474" RevisionGUID="2b8ab6ef-e6cc-4e22-998b-82204113931c" CreationDate="2022-02-24T21:43:32.207" UserId="286" Text="|runtime|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1698" PostHistoryTypeId="2" PostId="475" RevisionGUID="7b065d58-05bd-4383-a2ff-3e1a7bdfc2a8" CreationDate="2022-02-24T21:54:51.390" UserId="165" Text="sp_core::offchain::storage implements the trait DbExternalities which includes a set of functions for accessing the OffchainDB, in those functions you can declare which kind of storage you are working with.&#xD;&#xA;&#xD;&#xA;You will interact with the Offchain Externalities through the interface provided in sp_io, for this case you can set your storage and declare the `StorageKind` using [`local_storage_set`](https://github.com/paritytech/substrate/blob/master/primitives/io/src/lib.rs#L1120)&#xD;&#xA;```rust&#xD;&#xA;/// Sets a value in the local storage.&#xD;&#xA;///&#xD;&#xA;/// Note this storage is not part of the consensus, it's only accessible by&#xD;&#xA;/// offchain worker tasks running on the same machine. It IS persisted between runs.&#xD;&#xA;fn local_storage_set(&amp;mut self, kind: StorageKind, key: &amp;[u8], value: &amp;[u8]) {&#xD;&#xA;	self.extension::&lt;OffchainDbExt&gt;()&#xD;&#xA;		.expect(&#xD;&#xA;			&quot;local_storage_set can be called only in the offchain call context with&#xD;&#xA;			OffchainDb extension&quot;,&#xD;&#xA;         )&#xD;&#xA;		.local_storage_set(kind, key, value)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;sp_core [DbExternalities trait](https://github.com/paritytech/substrate/blob/master/primitives/core/src/offchain/mod.rs#L635)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1701" PostHistoryTypeId="2" PostId="476" RevisionGUID="b499445e-6afb-4ce4-9af8-c7a9203fd659" CreationDate="2022-02-24T22:03:39.820" UserId="434" Text="```&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    pub(super) type ProofMapping&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, Vec&lt;u8&gt;, (T::AccountId, T::BlockNumber), ValueQuery &gt;;&#xD;&#xA;```&#xD;&#xA;Here, ProofMapping is a type alias for StorageMap, however, trait bounds aren't checked in type aliases, what is the point of having it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1703" PostHistoryTypeId="1" PostId="476" RevisionGUID="b499445e-6afb-4ce4-9af8-c7a9203fd659" CreationDate="2022-02-24T22:03:39.820" UserId="434" Text="Trait bound in type alias in storage definition" ContentLicense="CC BY-SA 4.0" />
  <row Id="1704" PostHistoryTypeId="3" PostId="476" RevisionGUID="b499445e-6afb-4ce4-9af8-c7a9203fd659" CreationDate="2022-02-24T22:03:39.820" UserId="434" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1705" PostHistoryTypeId="5" PostId="475" RevisionGUID="b547d5b9-2ec7-497d-a8f3-4a1de6b1c12f" CreationDate="2022-02-24T22:20:51.803" UserId="165" Comment="added 193 characters in body" Text="sp_core::offchain::storage implements the trait DbExternalities which includes a set of functions for accessing the OffchainDB, in those functions you can declare which kind of storage you are working with.&#xD;&#xA;&#xD;&#xA;You will interact with the Offchain Externalities through the interface provided in sp_io, for this case you can set your storage and declare the `StorageKind` using [`local_storage_set`](https://github.com/paritytech/substrate/blob/master/primitives/io/src/lib.rs#L1120)&#xD;&#xA;```rust&#xD;&#xA;/// Sets a value in the local storage.&#xD;&#xA;///&#xD;&#xA;/// Note this storage is not part of the consensus, it's only accessible by&#xD;&#xA;/// offchain worker tasks running on the same machine. It IS persisted between runs.&#xD;&#xA;fn local_storage_set(&amp;mut self, kind: StorageKind, key: &amp;[u8], value: &amp;[u8]) {&#xD;&#xA;	self.extension::&lt;OffchainDbExt&gt;()&#xD;&#xA;		.expect(&#xD;&#xA;			&quot;local_storage_set can be called only in the offchain call context with&#xD;&#xA;			OffchainDb extension&quot;,&#xD;&#xA;         )&#xD;&#xA;		.local_storage_set(kind, key, value)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;sp_core [DbExternalities trait](https://github.com/paritytech/substrate/blob/master/primitives/core/src/offchain/mod.rs#L635)&#xD;&#xA;&#xD;&#xA;For `OffChainIndex` as your ask, I would say the default `StorageKind` is `PERSISTENT` but I would need to research a bit to confirm or deny this. Would edit this answer for clarifications." ContentLicense="CC BY-SA 4.0" />
  <row Id="1706" PostHistoryTypeId="5" PostId="476" RevisionGUID="ca8780bf-533b-4f4e-ae10-fcfc0bc96d40" CreationDate="2022-02-24T22:30:22.620" UserId="434" Comment="added 32 characters in body; edited title" Text="```&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    pub(super) type ProofMapping&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, Vec&lt;u8&gt;, (T::AccountId, T::BlockNumber), ValueQuery &gt;;&#xD;&#xA;```&#xD;&#xA;What does the syntax used to define ProofMapping mean? Is ProofMapping an implementation of the generic trait StorageMap that is then implemented by the Pallet Struct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1707" PostHistoryTypeId="4" PostId="476" RevisionGUID="ca8780bf-533b-4f4e-ae10-fcfc0bc96d40" CreationDate="2022-02-24T22:30:22.620" UserId="434" Comment="added 32 characters in body; edited title" Text="Storage definition syntax" ContentLicense="CC BY-SA 4.0" />
  <row Id="1708" PostHistoryTypeId="5" PostId="471" RevisionGUID="31f705c7-aa19-455d-b2b0-a2c1a25cb515" CreationDate="2022-02-24T22:39:02.887" UserId="12" Comment="added 140 characters in body; edited title" Text="Substrate introduces some unique concepts such as [unsigned transactions][1] and [signed extensions][2]. What are the steps for encoding an extrinsic in Substrate? What are the specific details that relate to encoding signed transactions for chains that may use one or more signed extensions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/extrinsics/#unsigned-transactions&#xD;&#xA;  [2]: https://docs.substrate.io/rustdocs/latest/sp_runtime/traits/trait.SignedExtension.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="1709" PostHistoryTypeId="4" PostId="471" RevisionGUID="31f705c7-aa19-455d-b2b0-a2c1a25cb515" CreationDate="2022-02-24T22:39:02.887" UserId="12" Comment="added 140 characters in body; edited title" Text="What are the Steps for Encoding an Extrinsic in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1710" PostHistoryTypeId="6" PostId="471" RevisionGUID="565f066a-ed8c-49a0-a0c4-91032926a1f8" CreationDate="2022-02-24T22:44:33.323" UserId="12" Comment="added 140 characters in body; edited title" Text="|extrinsic|scale-codec|transactions|signing|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1711" PostHistoryTypeId="2" PostId="477" RevisionGUID="1116f207-0a71-4bcb-aa7c-2e4f5ccf2387" CreationDate="2022-02-24T23:22:29.793" UserId="215" Text="We have a pallet which has their own account e.g *b&quot;replace_&quot; and we are able to generate sub accounts addresses like so:&#xD;&#xA;&#xD;&#xA;``` let sub_account: T::AccountId = T::PalletId::get().into_sub_account((0, 1)) ```&#xD;&#xA;&#xD;&#xA;In our react frontend, how can we fetch the address of a pallet's sub-account address using PolkadotJS API? (in this example the id is tuple of (0,1))&#xD;&#xA;&#xD;&#xA;We set up the pallet account as detailed in Shawn's accepted answer: https://stackoverflow.com/questions/67082488/transferring-assets-between-accounts-and-pallet&#xD;&#xA;&#xD;&#xA;and i found from this site https://www.shawntabrizi.com/substrate-js-utilities/ we can get the Pallet's account address using:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let address = stringToU8a((&quot;modl&quot; + moduleId).padEnd(32, '\0'));&#xD;&#xA;encodeAddress(address);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Our issue is getting the sub account address for a given id.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1713" PostHistoryTypeId="1" PostId="477" RevisionGUID="1116f207-0a71-4bcb-aa7c-2e4f5ccf2387" CreationDate="2022-02-24T23:22:29.793" UserId="215" Text="How can we get a Pallet's Sub-Account Address using PolkadotJS API" ContentLicense="CC BY-SA 4.0" />
  <row Id="1714" PostHistoryTypeId="3" PostId="477" RevisionGUID="1116f207-0a71-4bcb-aa7c-2e4f5ccf2387" CreationDate="2022-02-24T23:22:29.793" UserId="215" Text="|pallet|palletid|sub-account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1715" PostHistoryTypeId="2" PostId="478" RevisionGUID="ee3540ea-28b2-4136-bd52-8e6bbf22e53f" CreationDate="2022-02-24T23:26:26.690" UserId="28" Text="For each `#[pallet::storage]`, you define a type which has a trait bound for the kind of storage you are defining (`StorageValue`, `StorageMap`, etc...)&#xD;&#xA;&#xD;&#xA;From there, the macro generates a `struct _GeneratedPrefixForStorage$NameOfStorage`, and this struct implements the [`StorageInstance`](https://crates.parity.io/frame_support/traits/trait.StorageInstance.html) trait.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub trait StorageInstance {&#xD;&#xA;    const STORAGE_PREFIX: &amp;'static str;&#xD;&#xA;&#xD;&#xA;    fn pallet_prefix() -&gt; &amp;'static str;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The purpose of this struct is just to hold the unique storage prefix for the storage item, and thus only implements those two things above, giving the storage item a unique key in storage.&#xD;&#xA;&#xD;&#xA;You can see examples of this struct in the Balances Pallet:&#xD;&#xA;&#xD;&#xA;https://crates.parity.io/pallet_balances/pallet/struct._GeneratedPrefixForStorageAccount.html&#xD;&#xA;&#xD;&#xA;This Struct is actually the first parameter of the trait:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type ProofMapping&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, Vec&lt;u8&gt;, (T::AccountId, T::BlockNumber), ValueQuery &gt;;&#xD;&#xA;----------------------------------------------------^^^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But we use macro magic to hide this from the user using type inference syntax. Although it is really macro magic under the hood...&#xD;&#xA;&#xD;&#xA;Now that the `StorageMap` trait has this struct and the prefix it needs, the rest of the storage APIs are automatically generated as you expect on top of the type.&#xD;&#xA;&#xD;&#xA;You can really naively think about the storage item as (super simplified, and not accurate):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct Prefix;&#xD;&#xA;impl StorageInstance for Prefix {&#xD;&#xA;    fn prefix() -&gt; Vec&lt;u8&gt; {&#xD;&#xA;        &quot;PalletName&quot;.to_bytes() + &quot;StorageName&quot;.to_bytes()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type MyStorage = StorageValue&lt;Prefix, Type&gt;;&#xD;&#xA;&#xD;&#xA;trait StorageValue&lt;Prefix, Type&gt; {&#xD;&#xA;    fn get() -&gt; Option&lt;Type&gt; {&#xD;&#xA;        sp_io::storage::get(Prefix::prefix())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn set(value: Type) {&#xD;&#xA;        sp_io::storage::set(Prefix::prefix(), value)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn kill() {&#xD;&#xA;        sp_io::storage::clear(Prefix::prefix())&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // etc...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All we have done with the Pallet Storage macros is generate for you a unique prefix using the Pallet Name and Storage Name." ContentLicense="CC BY-SA 4.0" />
  <row Id="1717" PostHistoryTypeId="6" PostId="476" RevisionGUID="93637277-1636-4b83-9bf0-b611f695b1ae" CreationDate="2022-02-24T23:31:25.437" UserId="28" Comment="edited tags; edited tags" Text="|pallet|storage|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1718" PostHistoryTypeId="5" PostId="478" RevisionGUID="3938ffe8-7dea-4acf-8506-dbd7efa8b1c0" CreationDate="2022-02-24T23:32:30.557" UserId="28" Comment="added 17 characters in body" Text="For each `#[pallet::storage]`, you define a type `NameOfStorage` which has a trait bound for the kind of storage you are defining (`StorageValue`, `StorageMap`, etc...)&#xD;&#xA;&#xD;&#xA;From there, the macro generates a `struct _GeneratedPrefixForStorageNameOfStorage`, and this struct implements the [`StorageInstance`](https://crates.parity.io/frame_support/traits/trait.StorageInstance.html) trait.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub trait StorageInstance {&#xD;&#xA;    const STORAGE_PREFIX: &amp;'static str;&#xD;&#xA;&#xD;&#xA;    fn pallet_prefix() -&gt; &amp;'static str;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The purpose of this struct is just to hold the unique storage prefix for the storage item, and thus only implements those two things above, giving the storage item a unique key in storage.&#xD;&#xA;&#xD;&#xA;You can see examples of this struct in the Balances Pallet:&#xD;&#xA;&#xD;&#xA;https://crates.parity.io/pallet_balances/pallet/struct._GeneratedPrefixForStorageAccount.html&#xD;&#xA;&#xD;&#xA;This Struct is actually the first parameter of the trait:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type NameOfStorage&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, Vec&lt;u8&gt;, (T::AccountId, T::BlockNumber), ValueQuery &gt;;&#xD;&#xA;-----------------------------------------------------^^^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But we use macro magic to hide this from the user using type inference syntax. Although it is really macro magic under the hood...&#xD;&#xA;&#xD;&#xA;Now that the `StorageMap` trait has this struct and the prefix it needs, the rest of the storage APIs are automatically generated as you would expect on top of the type.&#xD;&#xA;&#xD;&#xA;You can really naively think about the storage item as (super simplified, and not accurate):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct Prefix;&#xD;&#xA;impl StorageInstance for Prefix {&#xD;&#xA;    fn prefix() -&gt; Vec&lt;u8&gt; {&#xD;&#xA;        &quot;PalletName&quot;.to_bytes() + &quot;StorageName&quot;.to_bytes()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type MyStorage = StorageValue&lt;Prefix, Type&gt;;&#xD;&#xA;&#xD;&#xA;trait StorageValue&lt;Prefix, Type&gt; {&#xD;&#xA;    fn get() -&gt; Option&lt;Type&gt; {&#xD;&#xA;        sp_io::storage::get(Prefix::prefix())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn set(value: Type) {&#xD;&#xA;        sp_io::storage::set(Prefix::prefix(), value)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn kill() {&#xD;&#xA;        sp_io::storage::clear(Prefix::prefix())&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // etc...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All we have done with the Pallet Storage macros is generate for you a unique prefix using the Pallet Name and Storage Name, and the storage trait itself actually does all the heavy lifting, and implements all the interfaces with the underlying `sp-io` layer." ContentLicense="CC BY-SA 4.0" />
  <row Id="1719" PostHistoryTypeId="2" PostId="479" RevisionGUID="8a51920e-8b81-47b2-ae10-aa9b557953ee" CreationDate="2022-02-24T23:47:57.410" UserId="28" Text="You just need to look at the Rust source code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn into_sub_account&lt;S: Encode&gt;(&amp;self, sub: S) -&gt; T {&#xD;&#xA;	(Id::TYPE_ID, self, sub)&#xD;&#xA;		.using_encoded(|b| T::decode(&amp;mut TrailingZeroInput(b)))&#xD;&#xA;		.expect(&quot;`AccountId` type is never greater than 32 bytes; qed&quot;)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So basically:&#xD;&#xA;&#xD;&#xA; 1. Take the bytes of the `TYPE_ID`.&#xD;&#xA;&#xD;&#xA;    For a `PalletId` that is:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    impl TypeId for PalletId {&#xD;&#xA;	    const TYPE_ID: [u8; 4] = *b&quot;modl&quot;;&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;    As hex bytes, &quot;modl&quot; is: `0x6d6f646c`&#xD;&#xA;&#xD;&#xA; 2. Take the `PalletId` itself as bytes, for example:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    pub const SocietyPalletId: PalletId = PalletId(*b&quot;py/socie&quot;);&#xD;&#xA;    ```&#xD;&#xA;    &#xD;&#xA;    As hex bytes, &quot;py/socie&quot; is: `0x70792f736f636965`&#xD;&#xA;&#xD;&#xA; 3. Take your sub account seed as bytes:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    /// The account ID of the payouts pot. This is where payouts are made from.&#xD;&#xA;	///&#xD;&#xA;	/// This actually does computation. If you need to keep using it, then make sure you cache the&#xD;&#xA;	/// value and only call this once.&#xD;&#xA;	pub fn payouts() -&gt; T::AccountId {&#xD;&#xA;		T::PalletId::get().into_sub_account(b&quot;payouts&quot;)&#xD;&#xA;	}&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;    As bytes, &quot;payouts&quot; is `0x7061796f757473`&#xD;&#xA;&#xD;&#xA;4. Then fill the rest of the account address with `0` to fill the expected account encoded length.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So putting this all together, you can find the account:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x6d6f646c70792f736f6369657061796f75747300000000000000000000000000&#xD;&#xA;--1-------2---------------3-------------4-------------------------&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which leads to SS58 Address:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;5EYCAe5ijiYfqiTEFBxuWTX5AH6oQUT7Fe1Pz5wNvsNWXux7&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And there you go! Check out the Society Pallet Payouts sub-account here: &#xD;&#xA;&#xD;&#xA;https://kusama.subscan.io/account/5EYCAe5ijiYfqiTEFBxuWTX5AH6oQUT7Fe1Pz5wNvsNWXux7" ContentLicense="CC BY-SA 4.0" />
  <row Id="1721" PostHistoryTypeId="2" PostId="480" RevisionGUID="455d0a56-2932-46ef-8f27-4fa610206c1c" CreationDate="2022-02-25T02:49:51.253" UserId="139" Text="Just breezing through the docs for both crates, I can see that they both provide an implementation of phragmen's election algorithm, where `sp_npos_solution` provides an additional `PhragMMS` and `Balancing` algorithms, which I assume are different ways of electing from a voter snapshot. &#xD;&#xA;&#xD;&#xA;In the substrate code base, we can see that for election_provider_multi_phase config, it takes a `Solver` from `frame_election_provider_support`. I could only see `pallet_election_phragmen` however being used in the `pallet_tips` Config. &#xD;&#xA;&#xD;&#xA;I am confused why two separate implementations of phragmen election would be provided. If I were to look at this code for the first time my guess would've been that the `Solver` type should be define like so `type Solver = Elections` where Elections -&gt; pallet_election_phragmen. But apparently that's not the case.&#xD;&#xA;&#xD;&#xA;So between `frame_election_provider_support`, `sp_npos_elections`, and `pallet-elections-phragmen`, which is appropriate for what scenario?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1723" PostHistoryTypeId="1" PostId="480" RevisionGUID="455d0a56-2932-46ef-8f27-4fa610206c1c" CreationDate="2022-02-25T02:49:51.253" UserId="139" Text="What is the difference between pallet_elections_phragmen and sp_npos_solution?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1724" PostHistoryTypeId="3" PostId="480" RevisionGUID="455d0a56-2932-46ef-8f27-4fa610206c1c" CreationDate="2022-02-25T02:49:51.253" UserId="139" Text="|npos|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1725" PostHistoryTypeId="2" PostId="481" RevisionGUID="b9203b1b-887e-40df-abb2-4db79fbb3cc2" CreationDate="2022-02-25T04:21:00.007" UserId="299" Text="guys, When I was doing cross-chain messaging (parallel chain A to parallel chain B), parallel chain A sent XCM message (successfully). After receiving the message, the relay chain was supposed to send it to parallel chain B, but it reported `Error: Brrier`.&#xD;&#xA;&#xD;&#xA;This is the log from the relay chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GrGac.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1727" PostHistoryTypeId="1" PostId="481" RevisionGUID="b9203b1b-887e-40df-abb2-4db79fbb3cc2" CreationDate="2022-02-25T04:21:00.007" UserId="299" Text="XCM message transfer failed. relaychain report `Error: Brrier`" ContentLicense="CC BY-SA 4.0" />
  <row Id="1728" PostHistoryTypeId="3" PostId="481" RevisionGUID="b9203b1b-887e-40df-abb2-4db79fbb3cc2" CreationDate="2022-02-25T04:21:00.007" UserId="299" Text="|polkadot|cumulus|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1729" PostHistoryTypeId="2" PostId="482" RevisionGUID="c129d3ad-9739-4569-9b0f-63e25e5d2d80" CreationDate="2022-02-25T05:40:31.407" UserId="139" Text="I require some insight into how to troubleshoot the following runtime error which only occurs when I try to peer with my running node:&#xD;&#xA;Using substrate v3.0.0 monthly-10-2021&#xD;&#xA;```&#xD;&#xA;Version: 1.0.0-fce706a-x86_64-linux-gnu&#xD;&#xA;&#xD;&#xA;   0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:610:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:502:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:139:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14&#xD;&#xA;   6: &lt;pallet_staking::pallet::pallet::GenesisConfig&lt;T&gt; as frame_support::traits::hooks::GenesisBuild&lt;T&gt;&gt;::build&#xD;&#xA;   7: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;   8: sp_state_machine::basic::BasicExternalities::execute_with_storage&#xD;&#xA;   9: &lt;node_runtime::GenesisConfig as sp_runtime::BuildStorage&gt;::assimilate_storage&#xD;&#xA;  10: sp_runtime::BuildStorage::build_storage&#xD;&#xA;  11: &lt;sc_chain_spec::chain_spec::ChainSpec&lt;G,E&gt; as sp_runtime::BuildStorage&gt;::build_storage&#xD;&#xA;  12: sc_service::client::client::Client&lt;B,E,Block,RA&gt;::new&#xD;&#xA;  13: sc_service::builder::new_full_parts&#xD;&#xA;  14: node::service::new_partial&#xD;&#xA;  15: node::service::new_full&#xD;&#xA;  16: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  17: tokio::park::thread::CachedParkThread::block_on&#xD;&#xA;  18: tokio::runtime::thread_pool::ThreadPool::block_on&#xD;&#xA;  19: tokio::runtime::Runtime::block_on&#xD;&#xA;  20: sc_cli::runner::Runner&lt;C&gt;::run_node_until_exit&#xD;&#xA;  21: node::command::run&#xD;&#xA;  22: node::main&#xD;&#xA;  23: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  24: std::rt::lang_start::{{closure}}&#xD;&#xA;  25: core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:259:13&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14&#xD;&#xA;      std::rt::lang_start_internal::{{closure}}&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:48&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14&#xD;&#xA;      std::rt::lang_start_internal&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:20&#xD;&#xA;  26: main&#xD;&#xA;  27: __libc_start_main&#xD;&#xA;  28: _start&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'main' panicked at 'Expected Ok(_). Got Err(&#xD;&#xA;    Module {&#xD;&#xA;        index: 16,&#xD;&#xA;        error: 4,&#xD;&#xA;        message: Some(&#xD;&#xA;            &quot;EmptyTargets&quot;,&#xD;&#xA;        ),&#xD;&#xA;    },&#xD;&#xA;)', /home/turtle/.cargo/git/checkouts/substrate-7e08433d4c370a21/bf9683e/frame/staking/src/pallet/mod.rs:518&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;&#xD;&#xA;	support.anonymous.an&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;Some information: I am running a dev chain and my testnet_genesis looks something like this: &#xD;&#xA;```rust&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;	wasm_binary: &amp;[u8],&#xD;&#xA;	initial_authorities: Vec&lt;(&#xD;&#xA;		AccountId, // Stash&#xD;&#xA;		AccountId, // Controller&#xD;&#xA;		GrandpaId,&#xD;&#xA;		BabeId,&#xD;&#xA;		ImOnlineId,&#xD;&#xA;		AuthorityDiscoveryId,&#xD;&#xA;	)&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	initial_nominators: Vec&lt;AccountId&gt;,&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;	let mut rng = rand::thread_rng();&#xD;&#xA;	let endowed_accounts = vec![&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;	];&#xD;&#xA;	let stakers = initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator))&#xD;&#xA;		.chain(initial_nominators.iter().map(|x| {&#xD;&#xA;			use rand::{seq::SliceRandom, Rng};&#xD;&#xA;			let limit = (MAX_NOMINATIONS as usize).min(initial_authorities.len());&#xD;&#xA;			let count = rng.gen::&lt;usize&gt;() % limit;&#xD;&#xA;			let nominations = initial_authorities&#xD;&#xA;				.as_slice()&#xD;&#xA;				.choose_multiple(&amp;mut rng, count)&#xD;&#xA;				.into_iter()&#xD;&#xA;				.map(|choice| choice.0.clone())&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;			(x.clone(), x.clone(), STASH, StakerStatus::Nominator(nominations))&#xD;&#xA;		}))&#xD;&#xA;		.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let num_endowed_accounts = endowed_accounts.len();&#xD;&#xA;	const ENDOWMENT: Balance = 10_000_000 * DOLLARS;&#xD;&#xA;	const STASH: Balance = ENDOWMENT / 1000;&#xD;&#xA;&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		system: SystemConfig {&#xD;&#xA;			// Add Wasm runtime to storage.&#xD;&#xA;			code: wasm_binary.to_vec(),&#xD;&#xA;			changes_trie_config: Default::default(),&#xD;&#xA;		},&#xD;&#xA;		authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			balances: endowed_accounts.iter().cloned().map(|k| (k, ENDOWMENT)).collect(),&#xD;&#xA;		},&#xD;&#xA;		babe: BabeConfig {&#xD;&#xA;			authorities: vec![],&#xD;&#xA;			epoch_config: Some(BabeEpochConfiguration {&#xD;&#xA;				c: (1, 4),&#xD;&#xA;				allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,&#xD;&#xA;			}),&#xD;&#xA;		},&#xD;&#xA;		grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;		im_online: ImOnlineConfig { keys: vec![] },&#xD;&#xA;		session: SessionConfig {&#xD;&#xA;			keys: initial_authorities&#xD;&#xA;				.iter()&#xD;&#xA;				.map(|x| {&#xD;&#xA;					(&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						session_keys(x.3.clone(), x.2.clone(), x.4.clone(), x.5.clone()),&#xD;&#xA;					)&#xD;&#xA;				})&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;		},&#xD;&#xA;		sudo: SudoConfig {&#xD;&#xA;			// Assign network admin rights.&#xD;&#xA;			key: root_key,&#xD;&#xA;		},&#xD;&#xA;		staking: StakingConfig {&#xD;&#xA;			validator_count: 255,&#xD;&#xA;			minimum_validator_count: initial_authorities.len() as u32,&#xD;&#xA;			invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),&#xD;&#xA;			slash_reward_fraction: Perbill::from_percent(10),&#xD;&#xA;			stakers,&#xD;&#xA;			..Default::default()&#xD;&#xA;		},&#xD;&#xA;		treasury: Default::default(),&#xD;&#xA;		council: CouncilConfig::default(),&#xD;&#xA;		indices: IndicesConfig { indices: vec![] },&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;My intuition tells me that I am doing something grossly wrong in this chain spec which is causing the runtime to panic.&#xD;&#xA;Running a single node works fine.&#xD;&#xA;I understand that troubleshooting these errors aren't very realistic online, but I just need a hint on where to look thanks :)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1731" PostHistoryTypeId="1" PostId="482" RevisionGUID="c129d3ad-9739-4569-9b0f-63e25e5d2d80" CreationDate="2022-02-25T05:40:31.407" UserId="139" Text="Runtime panic when peering with node:" ContentLicense="CC BY-SA 4.0" />
  <row Id="1732" PostHistoryTypeId="3" PostId="482" RevisionGUID="c129d3ad-9739-4569-9b0f-63e25e5d2d80" CreationDate="2022-02-25T05:40:31.407" UserId="139" Text="|consensus|staking|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1733" PostHistoryTypeId="5" PostId="482" RevisionGUID="b02995be-7cf5-4f94-983e-9b8e8488d61a" CreationDate="2022-02-25T06:25:09.970" UserId="139" Comment="Added more info" Text="I require some insight into how to troubleshoot the following runtime error which only occurs when I try to peer with my running node.&#xD;&#xA;&#xD;&#xA;Using substrate v3.0.0 monthly-10-2021&#xD;&#xA;&#xD;&#xA;I should also add that if I'm running a single node as a validator, I get no block finalization if that has anything to do with the following. Peering with a node results in the following error for the node trying to start and peer:&#xD;&#xA;```&#xD;&#xA;Version: 1.0.0-fce706a-x86_64-linux-gnu&#xD;&#xA;&#xD;&#xA;   0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:610:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:502:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:139:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14&#xD;&#xA;   6: &lt;pallet_staking::pallet::pallet::GenesisConfig&lt;T&gt; as frame_support::traits::hooks::GenesisBuild&lt;T&gt;&gt;::build&#xD;&#xA;   7: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;   8: sp_state_machine::basic::BasicExternalities::execute_with_storage&#xD;&#xA;   9: &lt;node_runtime::GenesisConfig as sp_runtime::BuildStorage&gt;::assimilate_storage&#xD;&#xA;  10: sp_runtime::BuildStorage::build_storage&#xD;&#xA;  11: &lt;sc_chain_spec::chain_spec::ChainSpec&lt;G,E&gt; as sp_runtime::BuildStorage&gt;::build_storage&#xD;&#xA;  12: sc_service::client::client::Client&lt;B,E,Block,RA&gt;::new&#xD;&#xA;  13: sc_service::builder::new_full_parts&#xD;&#xA;  14: node::service::new_partial&#xD;&#xA;  15: node::service::new_full&#xD;&#xA;  16: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  17: tokio::park::thread::CachedParkThread::block_on&#xD;&#xA;  18: tokio::runtime::thread_pool::ThreadPool::block_on&#xD;&#xA;  19: tokio::runtime::Runtime::block_on&#xD;&#xA;  20: sc_cli::runner::Runner&lt;C&gt;::run_node_until_exit&#xD;&#xA;  21: node::command::run&#xD;&#xA;  22: node::main&#xD;&#xA;  23: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  24: std::rt::lang_start::{{closure}}&#xD;&#xA;  25: core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:259:13&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14&#xD;&#xA;      std::rt::lang_start_internal::{{closure}}&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:48&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14&#xD;&#xA;      std::rt::lang_start_internal&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:20&#xD;&#xA;  26: main&#xD;&#xA;  27: __libc_start_main&#xD;&#xA;  28: _start&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'main' panicked at 'Expected Ok(_). Got Err(&#xD;&#xA;    Module {&#xD;&#xA;        index: 16,&#xD;&#xA;        error: 4,&#xD;&#xA;        message: Some(&#xD;&#xA;            &quot;EmptyTargets&quot;,&#xD;&#xA;        ),&#xD;&#xA;    },&#xD;&#xA;)', /home/turtle/.cargo/git/checkouts/substrate-7e08433d4c370a21/bf9683e/frame/staking/src/pallet/mod.rs:518&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;&#xD;&#xA;	support.anonymous.an&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;Some information: I am running a dev chain and my testnet_genesis looks something like this: &#xD;&#xA;```rust&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;	wasm_binary: &amp;[u8],&#xD;&#xA;	initial_authorities: Vec&lt;(&#xD;&#xA;		AccountId, // Stash&#xD;&#xA;		AccountId, // Controller&#xD;&#xA;		GrandpaId,&#xD;&#xA;		BabeId,&#xD;&#xA;		ImOnlineId,&#xD;&#xA;		AuthorityDiscoveryId,&#xD;&#xA;	)&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	initial_nominators: Vec&lt;AccountId&gt;,&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;	let mut rng = rand::thread_rng();&#xD;&#xA;	let endowed_accounts = vec![&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;	];&#xD;&#xA;	let stakers = initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator))&#xD;&#xA;		.chain(initial_nominators.iter().map(|x| {&#xD;&#xA;			use rand::{seq::SliceRandom, Rng};&#xD;&#xA;			let limit = (MAX_NOMINATIONS as usize).min(initial_authorities.len());&#xD;&#xA;			let count = rng.gen::&lt;usize&gt;() % limit;&#xD;&#xA;			let nominations = initial_authorities&#xD;&#xA;				.as_slice()&#xD;&#xA;				.choose_multiple(&amp;mut rng, count)&#xD;&#xA;				.into_iter()&#xD;&#xA;				.map(|choice| choice.0.clone())&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;			(x.clone(), x.clone(), STASH, StakerStatus::Nominator(nominations))&#xD;&#xA;		}))&#xD;&#xA;		.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let num_endowed_accounts = endowed_accounts.len();&#xD;&#xA;	const ENDOWMENT: Balance = 10_000_000 * DOLLARS;&#xD;&#xA;	const STASH: Balance = ENDOWMENT / 1000;&#xD;&#xA;&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		system: SystemConfig {&#xD;&#xA;			// Add Wasm runtime to storage.&#xD;&#xA;			code: wasm_binary.to_vec(),&#xD;&#xA;			changes_trie_config: Default::default(),&#xD;&#xA;		},&#xD;&#xA;		authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			balances: endowed_accounts.iter().cloned().map(|k| (k, ENDOWMENT)).collect(),&#xD;&#xA;		},&#xD;&#xA;		babe: BabeConfig {&#xD;&#xA;			authorities: vec![],&#xD;&#xA;			epoch_config: Some(BabeEpochConfiguration {&#xD;&#xA;				c: (1, 4),&#xD;&#xA;				allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,&#xD;&#xA;			}),&#xD;&#xA;		},&#xD;&#xA;		grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;		im_online: ImOnlineConfig { keys: vec![] },&#xD;&#xA;		session: SessionConfig {&#xD;&#xA;			keys: initial_authorities&#xD;&#xA;				.iter()&#xD;&#xA;				.map(|x| {&#xD;&#xA;					(&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						session_keys(x.3.clone(), x.2.clone(), x.4.clone(), x.5.clone()),&#xD;&#xA;					)&#xD;&#xA;				})&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;		},&#xD;&#xA;		sudo: SudoConfig {&#xD;&#xA;			// Assign network admin rights.&#xD;&#xA;			key: root_key,&#xD;&#xA;		},&#xD;&#xA;		staking: StakingConfig {&#xD;&#xA;			validator_count: 255,&#xD;&#xA;			minimum_validator_count: initial_authorities.len() as u32,&#xD;&#xA;			invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),&#xD;&#xA;			slash_reward_fraction: Perbill::from_percent(10),&#xD;&#xA;			stakers,&#xD;&#xA;			..Default::default()&#xD;&#xA;		},&#xD;&#xA;		treasury: Default::default(),&#xD;&#xA;		council: CouncilConfig::default(),&#xD;&#xA;		indices: IndicesConfig { indices: vec![] },&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;My intuition tells me that I am doing something grossly wrong in this chain spec which is causing the runtime to panic.&#xD;&#xA;Running a single node works fine.&#xD;&#xA;I understand that troubleshooting these errors aren't very realistic online, but I just need a hint on where to look thanks :)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1734" PostHistoryTypeId="5" PostId="481" RevisionGUID="4d96fe9f-ec32-4ee2-a476-37842cd9ba43" CreationDate="2022-02-25T07:08:55.270" UserId="28" Comment="deleted 6 characters in body; edited title" Text="When I was doing cross-chain messaging (parallel chain A to parallel chain B), parallel chain A sent XCM message (successfully). After receiving the message, the relay chain was supposed to send it to parallel chain B, but it reported `Error: Brrier`.&#xD;&#xA;&#xD;&#xA;This is the log from the relay chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GrGac.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1735" PostHistoryTypeId="4" PostId="481" RevisionGUID="4d96fe9f-ec32-4ee2-a476-37842cd9ba43" CreationDate="2022-02-25T07:08:55.270" UserId="28" Comment="deleted 6 characters in body; edited title" Text="XCM message transfer failed. relaychain report `Error: Barrier`" ContentLicense="CC BY-SA 4.0" />
  <row Id="1736" PostHistoryTypeId="5" PostId="481" RevisionGUID="00f28b00-4b03-43f4-893c-903946c87724" CreationDate="2022-02-25T08:34:17.113" UserId="299" Comment="added 5077 characters in body" Text="When I was doing cross-chain messaging (parallel chain A to parallel chain B), parallel chain A sent XCM message (successfully). After receiving the message, the relay chain was supposed to send it to parallel chain B, but it reported `Error: Brrier`.&#xD;&#xA;&#xD;&#xA;This is the log from the relay chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this my Xcm Config and orml Config.&#xD;&#xA;```&#xD;&#xA;match_type! {&#xD;&#xA;	pub type ParentOrParentsExecutivePlurality: impl Contains&lt;MultiLocation&gt; = {&#xD;&#xA;		MultiLocation { parents: 1, interior: Here } |&#xD;&#xA;		MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) }&#xD;&#xA;	};&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;match_type! {&#xD;&#xA;	pub type SpecParachain: impl Contains&lt;MultiLocation&gt; = {&#xD;&#xA;		MultiLocation {parents: 1, interior: X1(Parachain(1000))} |&#xD;&#xA;		MultiLocation {parents: 1, interior: X1(Parachain(2000))}&#xD;&#xA;	};&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub type Barrier = (&#xD;&#xA;	TakeWeightCredit,&#xD;&#xA;	AllowTopLevelPaidExecutionFrom&lt;Everything&gt;,&#xD;&#xA;	AllowUnpaidExecutionFrom&lt;ParentOrParentsExecutivePlurality&gt;,&#xD;&#xA;	// ^^^ Parent and its exec plurality get free execution&#xD;&#xA;	AllowUnpaidExecutionFrom&lt;SpecParachain&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;pub struct XcmConfig;&#xD;&#xA;impl xcm_executor::Config for XcmConfig {&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type XcmSender = XcmRouter;&#xD;&#xA;	// How to withdraw and deposit an asset.&#xD;&#xA;	type AssetTransactor = LocalAssetTransactor;&#xD;&#xA;	type OriginConverter = XcmOriginToTransactDispatchOrigin;&#xD;&#xA;	type IsReserve = MultiNativeAsset;&#xD;&#xA;	type IsTeleporter = (); // Teleporting is disabled.&#xD;&#xA;	type LocationInverter = LocationInverter&lt;Ancestry&gt;;&#xD;&#xA;	type Barrier = Barrier;&#xD;&#xA;	type Weigher = FixedWeightBounds&lt;UnitWeightCost, Call, MaxInstructions&gt;;&#xD;&#xA;	type Trader = UsingComponents&lt;IdentityFee&lt;Balance&gt;, RelayLocation, AccountId, Balances, ()&gt;;&#xD;&#xA;	type ResponseHandler = PolkadotXcm;&#xD;&#xA;	type AssetTrap = PolkadotXcm;&#xD;&#xA;	type AssetClaims = PolkadotXcm;&#xD;&#xA;	type SubscriptionService = PolkadotXcm;&#xD;&#xA;}&#xD;&#xA;......&#xD;&#xA;......&#xD;&#xA;......&#xD;&#xA;// orml_xtokens&#xD;&#xA;#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, Ord, codec::MaxEncodedLen, TypeInfo)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;pub enum CurrencyId {&#xD;&#xA;	// / Relay chain token.&#xD;&#xA;	ROC,&#xD;&#xA;	// Native TokenSymbol&#xD;&#xA;	A,&#xD;&#xA;	// Parachain B token.&#xD;&#xA;	B,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub type Amount = i128;&#xD;&#xA;&#xD;&#xA;pub struct CurrencyIdConvert;&#xD;&#xA;impl Convert&lt;CurrencyId, Option&lt;MultiLocation&gt;&gt; for CurrencyIdConvert {&#xD;&#xA;	fn convert(id: CurrencyId) -&gt; Option&lt;MultiLocation&gt; {&#xD;&#xA;		match id {&#xD;&#xA;			CurrencyId::ROC =&gt; Some(Parent.into()),&#xD;&#xA;			CurrencyId::A=&gt; Some((Parent, Parachain(1000), GeneralKey(&quot;A&quot;.into())).into()),&#xD;&#xA;			CurrencyId::B=&gt; Some((Parent, Parachain(2000), GeneralKey(&quot;B&quot;.into())).into()),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;impl Convert&lt;MultiLocation, Option&lt;CurrencyId&gt;&gt; for CurrencyIdConvert {&#xD;&#xA;	fn convert(l: MultiLocation) -&gt; Option&lt;CurrencyId&gt; {&#xD;&#xA;		let a: Vec&lt;u8&gt; = &quot;A&quot;.into();&#xD;&#xA;		let b: Vec&lt;u8&gt; = &quot;B&quot;.into();&#xD;&#xA;		if l == MultiLocation::parent() {&#xD;&#xA;			return Some(CurrencyId::ROC);&#xD;&#xA;		}&#xD;&#xA;		match l {&#xD;&#xA;			MultiLocation { parents, interior } if parents == 1 =&gt; match interior {&#xD;&#xA;				X2(Parachain(1000), GeneralKey(k)) if k == a =&gt; Some(CurrencyId::A),&#xD;&#xA;				X2(Parachain(2000), GeneralKey(k)) if k == b =&gt; Some(CurrencyId::B),&#xD;&#xA;				_ =&gt; None,&#xD;&#xA;			},&#xD;&#xA;			MultiLocation { parents, interior } if parents == 0 =&gt; match interior {&#xD;&#xA;				X1(GeneralKey(k)) if k == a =&gt; Some(CurrencyId::A),&#xD;&#xA;				X1(GeneralKey(k)) if k == b =&gt; Some(CurrencyId::B),&#xD;&#xA;				_ =&gt; None,&#xD;&#xA;			},&#xD;&#xA;			_ =&gt; None,&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;impl Convert&lt;MultiAsset, Option&lt;CurrencyId&gt;&gt; for CurrencyIdConvert {&#xD;&#xA;	fn convert(a: MultiAsset) -&gt; Option&lt;CurrencyId&gt; {&#xD;&#xA;		if let MultiAsset {&#xD;&#xA;			fun: Fungible(_),&#xD;&#xA;			id: Concrete(id),&#xD;&#xA;		} = a&#xD;&#xA;		{&#xD;&#xA;			Self::convert(id)&#xD;&#xA;		} else {&#xD;&#xA;			Option::None&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct AccountIdToMultiLocation;&#xD;&#xA;impl Convert&lt;AccountId, MultiLocation&gt; for AccountIdToMultiLocation {&#xD;&#xA;	fn convert(account: AccountId) -&gt; MultiLocation {&#xD;&#xA;		X1(Junction::AccountId32 {&#xD;&#xA;			network: NetworkId::Any,&#xD;&#xA;			id: account.into(),&#xD;&#xA;		})&#xD;&#xA;		.into()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into())));&#xD;&#xA;	pub const BaseXcmWeight: Weight = 100_000_000;&#xD;&#xA;	pub const MaxAssetsForTransfer: usize = 2;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl orml_xtokens::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Balance = Balance;&#xD;&#xA;	type CurrencyId = CurrencyId;&#xD;&#xA;	type CurrencyIdConvert = CurrencyIdConvert;&#xD;&#xA;	type AccountIdToMultiLocation = AccountIdToMultiLocation;&#xD;&#xA;	type SelfLocation = SelfLocation;&#xD;&#xA;	type XcmExecutor = XcmExecutor&lt;XcmConfig&gt;;&#xD;&#xA;	type Weigher = FixedWeightBounds&lt;UnitWeightCost, Call, MaxInstructions&gt;;&#xD;&#xA;	type BaseXcmWeight = BaseXcmWeight;&#xD;&#xA;	type LocationInverter = LocationInverter&lt;Ancestry&gt;;&#xD;&#xA;	type MaxAssetsForTransfer = MaxAssetsForTransfer;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_type_with_key! {&#xD;&#xA;	pub ExistentialDeposits: |currency_id: CurrencyId| -&gt; Balance {&#xD;&#xA;		match currency_id {&#xD;&#xA;			_ =&gt; 0,&#xD;&#xA;		}&#xD;&#xA;	};&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub ORMLMaxLocks: u32 = 2;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl orml_tokens::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Balance = Balance;&#xD;&#xA;	type Amount = Amount;&#xD;&#xA;	type CurrencyId = CurrencyId;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type ExistentialDeposits = ExistentialDeposits;&#xD;&#xA;	type OnDust = ();&#xD;&#xA;	type MaxLocks = ORMLMaxLocks;&#xD;&#xA;	type DustRemovalWhitelist = Nothing;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl orml_xcm::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type SovereignOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GrGac.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1737" PostHistoryTypeId="2" PostId="483" RevisionGUID="4dc43758-cb84-453d-b2a2-1c12a049a6aa" CreationDate="2022-02-25T09:02:49.840" UserId="299" Text="I solved the problem because the Weight value was too low." ContentLicense="CC BY-SA 4.0" />
  <row Id="1740" PostHistoryTypeId="2" PostId="484" RevisionGUID="a959db8c-347a-429f-a0d3-2e56e8b2306c" CreationDate="2022-02-25T10:09:04.757" UserId="49" Text="I have seen two methods of executing runtime migrations:&#xD;&#xA;&#xD;&#xA; 1. Execute the migration code directly in the pallet's `on_runtime_upgrade` hook&#xD;&#xA; 2. Create a struct and implement the [`OnRuntimeUpgrade`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.OnRuntimeUpgrade.html) trait. Include the struct in the last generic of the [`Executive`](https://paritytech.github.io/substrate/master/frame_executive/struct.Executive.html) struct.&#xD;&#xA;&#xD;&#xA;It seems that using the pallet's `on_runtime_upgrade` hook is disencouraged for numerous reasons, for example potentially unknown amount of block weight consumption and opaqueness (see [this PR](https://github.com/paritytech/substrate/pull/10434) and [this PR](https://github.com/paritytech/substrate/pull/10650)).&#xD;&#xA;&#xD;&#xA;I have two question, but also feel free to add additional information in regards to this topic that is beyond the scope of those questions:&#xD;&#xA;&#xD;&#xA; 1. What is the current best practice to execute migrations? What should devs put their attention towards when applying this method? Are there pitfalls?&#xD;&#xA; 2. When using the second method described earlier in post (or the best practice method you provided), are overweight blocks still an issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1742" PostHistoryTypeId="1" PostId="484" RevisionGUID="a959db8c-347a-429f-a0d3-2e56e8b2306c" CreationDate="2022-02-25T10:09:04.757" UserId="49" Text="How and where to properly execute pallet migrations?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1743" PostHistoryTypeId="3" PostId="484" RevisionGUID="a959db8c-347a-429f-a0d3-2e56e8b2306c" CreationDate="2022-02-25T10:09:04.757" UserId="49" Text="|weight|migration|on-runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1744" PostHistoryTypeId="2" PostId="485" RevisionGUID="ea9f6304-2881-4ebf-8bb7-15b5ad5a8ac5" CreationDate="2022-02-25T10:09:29.050" UserId="499" Text="[This comment](https://github.com/paritytech/substrate/blob/2d8b02af1852d51b7d6a15d6d98b41b76bac614a/frame/session/src/lib.rs#L637) in the Session pallet states:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Move on to next session. Register new validator set and session keys. Changes to the&#xD;&#xA;/// validator set have a session of delay to take effect. This allows for equivocation&#xD;&#xA;/// punishment after a fork.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We are developing a custom Validator selection mechanic, but when we want to change the Validator set using the Session pallet, we must perform two session rotations in order to get the new set to take effect.&#xD;&#xA;&#xD;&#xA;Are we missing something with respect to the implementation of the Session pallet that would make this necessity clearer? It would be good to get an ELI5 of the reason for the two-Session requirement." ContentLicense="CC BY-SA 4.0" />
  <row Id="1746" PostHistoryTypeId="1" PostId="485" RevisionGUID="ea9f6304-2881-4ebf-8bb7-15b5ad5a8ac5" CreationDate="2022-02-25T10:09:29.050" UserId="499" Text="Why do changes to the Validator set require a one Session delay?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1747" PostHistoryTypeId="3" PostId="485" RevisionGUID="ea9f6304-2881-4ebf-8bb7-15b5ad5a8ac5" CreationDate="2022-02-25T10:09:29.050" UserId="499" Text="|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1748" PostHistoryTypeId="2" PostId="486" RevisionGUID="df2048ae-246a-430d-b4ff-1d81e9d9d390" CreationDate="2022-02-25T10:24:42.687" UserId="139" Text="As I understand, the babe epoch config comes with the option of `SecondaryPlain` and `SecondaryVRF` slots, which is more or less like PoA in the case that no primary block producers are available. &#xD;&#xA;&#xD;&#xA; 1. If this is correct, how can I set these Secondary block producers? Do we set them in the Genesis configuration?&#xD;&#xA;&#xD;&#xA; 2. In a staking chain, do these secondary block producers require a stake backing them for block production?&#xD;&#xA;&#xD;&#xA;I ask this because right now I have a nPoS chain running which stalled since only one validator was online out of 3, and at epoch change I get this: &#xD;&#xA;`ElectionError::Fallback(&quot;NoFallback.&quot;)`&#xD;&#xA;`Error with block built on 0xb4b4...ff08: ClientImport(&quot;Unexpected epoch change&quot;)`&#xD;&#xA;&#xD;&#xA;and I would like to fix it, because I know substrate node can run with one validator in the `--dev` chain.&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="1750" PostHistoryTypeId="1" PostId="486" RevisionGUID="df2048ae-246a-430d-b4ff-1d81e9d9d390" CreationDate="2022-02-25T10:24:42.687" UserId="139" Text="How to set secondary slots for Babe?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1751" PostHistoryTypeId="3" PostId="486" RevisionGUID="df2048ae-246a-430d-b4ff-1d81e9d9d390" CreationDate="2022-02-25T10:24:42.687" UserId="139" Text="|consensus|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1761" PostHistoryTypeId="5" PostId="484" RevisionGUID="37d07b71-abbf-49a1-acbf-37b7a60c7a90" CreationDate="2022-02-25T11:55:59.143" UserId="49" Comment="added 19 characters in body; edited title" Text="I have seen two methods of executing runtime migrations:&#xD;&#xA;&#xD;&#xA; 1. Execute the migration code directly in the pallet's `on_runtime_upgrade` hook&#xD;&#xA; 2. Create a struct and implement the [`OnRuntimeUpgrade`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.OnRuntimeUpgrade.html) trait. Include the struct in the last generic of the [`Executive`](https://paritytech.github.io/substrate/master/frame_executive/struct.Executive.html) struct within the runtime.&#xD;&#xA;&#xD;&#xA;It seems that using the pallet's `on_runtime_upgrade` hook is disencouraged for numerous reasons, for example potentially unknown amount of block weight consumption and opaqueness (see [this PR](https://github.com/paritytech/substrate/pull/10434) and [this PR](https://github.com/paritytech/substrate/pull/10650)).&#xD;&#xA;&#xD;&#xA;I have two question, but also feel free to add additional information in regards to this topic that is beyond the scope of those questions:&#xD;&#xA;&#xD;&#xA; 1. What is the current best practice to execute migrations? What should devs put their attention towards when applying this method? Are there pitfalls?&#xD;&#xA; 2. When using the second method described earlier in post (or the best practice method you provided), are overweight blocks still an issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1762" PostHistoryTypeId="4" PostId="484" RevisionGUID="37d07b71-abbf-49a1-acbf-37b7a60c7a90" CreationDate="2022-02-25T11:55:59.143" UserId="49" Comment="added 19 characters in body; edited title" Text="Where should pallet migrations be executed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1763" PostHistoryTypeId="2" PostId="489" RevisionGUID="f08ddd3c-15c8-4bbd-a49f-bb3c7bfeae17" CreationDate="2022-02-25T12:35:35.783" UserId="452" Text="The secondary slot authors are the same as the primary slot authors, there's no distinct validator set to configure.&#xD;&#xA;&#xD;&#xA;The reason your chain has stalled with &quot;Unexpected epoch change&quot; is because it was offline for more than one epoch which is not supported by BABE.&#xD;&#xA;&#xD;&#xA;Recovering from this is a manual and convoluted process, I don't think it's worth it for dev environments. You can find some information here: https://github.com/paritytech/substrate/issues/4464." ContentLicense="CC BY-SA 4.0" />
  <row Id="1765" PostHistoryTypeId="2" PostId="490" RevisionGUID="b83aa5f8-3df6-44dd-a03f-55ea90dd70e8" CreationDate="2022-02-25T12:42:13.053" UserId="393" Text="I think StorageKind is used to distinguish between different behavior when block revert or fork happens.&#xD;&#xA;&#xD;&#xA;And, if storage use memory or disk is depends on others configuration, such as   you choose to use RocksDb or so." ContentLicense="CC BY-SA 4.0" />
  <row Id="1767" PostHistoryTypeId="2" PostId="491" RevisionGUID="523d964c-cba7-4e04-b411-ac842418f303" CreationDate="2022-02-25T12:49:03.497" UserId="452" Text="This came out of necessity when implementing BABE. In BABE randomness from the VRFs is collected on-chain throughout a session (or epoch in BABE lingo), which is then used in future epochs. By delaying the session we make sure that randomness collected on session N is only used at N+2, and validators who want to start validating at N+2 must already commit to it at session N, without knowing what the randomness for that session will be.&#xD;&#xA;&#xD;&#xA;That said, the session pallet is generic and ready to be used with other consensus protocols that don't have this requirement, so I think it's legitimate that it should allow for instant transitions. There is an open issue for this: https://github.com/paritytech/substrate/issues/8650, you should raise your voice there. :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1769" PostHistoryTypeId="5" PostId="490" RevisionGUID="38e77149-12b7-42cf-baed-530ed3625213" CreationDate="2022-02-25T12:52:00.840" UserId="393" Comment="added 21 characters in body" Text="I think StorageKind is used to distinguish between different behavior when block revert or fork happens.&#xD;&#xA;&#xD;&#xA;And, if storage use memory or disk is depends on the DatabaseSettings.source configuration, such as   you choose to use RocksDb or so." ContentLicense="CC BY-SA 4.0" />
  <row Id="1770" PostHistoryTypeId="2" PostId="492" RevisionGUID="0db9b611-ccd8-4d7b-a315-bcd1929ba4ff" CreationDate="2022-02-25T12:59:19.157" UserId="452" Text="The issue might be that `initial_authorities` accounts don't have any funds, and therefore they don't exist. The error you see comes from the staking module, presumably because it didn't get any valid validators / nominators." ContentLicense="CC BY-SA 4.0" />
  <row Id="1773" PostHistoryTypeId="2" PostId="493" RevisionGUID="f94c3405-51cc-4744-8f5a-6fe90db24896" CreationDate="2022-02-25T13:18:06.143" UserId="442" Text="According to the [doc][1], `OnRuntimeUpgrade` trait can cover the feature of `on_runtime_upgrade` hook. I don't think there's too many difference between these two methods when you just do some simple migrations.&#xD;&#xA;&#xD;&#xA;&gt; NOTE: this doesn’t include all pallet logic triggered on runtime upgrade. For instance it doesn’t include the write of the pallet version in storage. The final complete logic triggered on runtime upgrade is given by implementation of `OnRuntimeUpgrade` trait by `Pallet`.&#xD;&#xA;&#xD;&#xA;And for overweight blocks, it's always an issue, no matter how you cause it.&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_runtime_upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="1775" PostHistoryTypeId="2" PostId="494" RevisionGUID="87800d87-d98e-4d52-8012-44a4c37ba8dc" CreationDate="2022-02-25T13:24:40.210" UserId="442" Text="Caller is the signer of the extrinsic, contract address is the first argument (which named `dest`), parameters is the last argument (named `data`) but without contract definition it cannot be decoded." ContentLicense="CC BY-SA 4.0" />
  <row Id="1777" PostHistoryTypeId="2" PostId="495" RevisionGUID="62235e81-5b80-45ce-bff1-056846027503" CreationDate="2022-02-25T13:29:18.093" UserId="165" Text="Indeed, my first assumption was not correct. What was leading me to thinking about it only living in memory was this in-memory implementation https://github.com/paritytech/substrate/blob/master/primitives/core/src/offchain/storage.rs#L18&#xD;&#xA;But thanks to @chino-chang for the heads up about it being mostly used for testing.&#xD;&#xA;&#xD;&#xA;The writes to db will happen in the [Offchain column](https://github.com/paritytech/substrate/blob/master/client/db/src/lib.rs#L404-L405) and these entries can get a prefix appended to the key so they are a bit more isolated.&#xD;&#xA;&#xD;&#xA;After this bit much of research around the code I feel that my initial questions doesn't bring much value in general, but I would rather leave this thread open just in case it may help someone else. " ContentLicense="CC BY-SA 4.0" />
  <row Id="1779" PostHistoryTypeId="2" PostId="496" RevisionGUID="0605fbf3-4214-4e4d-8d45-649b4994be3f" CreationDate="2022-02-25T13:46:29.480" UserId="28" Text="You can force the runtime to execute in the native binary rather than the Wasm using the `execution` flag:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--execution=native&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From there, you should be able to use the same tracing and debugging tools that you have been using to also peek into the runtime execution. " ContentLicense="CC BY-SA 4.0" />
  <row Id="1781" PostHistoryTypeId="2" PostId="497" RevisionGUID="ce32d36d-c97f-46d4-86d3-325879279594" CreationDate="2022-02-25T13:48:27.493" UserId="73" Text="&gt; What is the current best practice to execute migrations? What should devs put their attention towards when applying this method? Are there pitfalls?&#xD;&#xA;&#xD;&#xA;When you are developing a Pallet for external people, aka you are not just using it in your own runtime. I would recommend to use the &quot;external&quot; migration, aka put it into the runtime lib.rs. This makes it for users easier discoverable that there are migrations being applied and to reason about them. For sure it requires that you mention them in the release nodes of your Pallet. &#xD;&#xA;&#xD;&#xA;However, if you are the &quot;only&quot; user of your Pallet you can also go the way and putting the migration directly into the Pallet. From a technical PoV there is no difference in what you do.&#xD;&#xA;&#xD;&#xA;&gt; When using the second method described earlier in post (or the best practice method you provided), are overweight blocks still an issue?&#xD;&#xA;&#xD;&#xA;Where you place the runtime upgrade, doesn't change anything in regards to overweight blocks. How should it? It will execute the same code in both cases." ContentLicense="CC BY-SA 4.0" />
  <row Id="1783" PostHistoryTypeId="2" PostId="498" RevisionGUID="ace6911a-ea21-4cb3-8704-5856de2ca370" CreationDate="2022-02-25T13:50:27.240" UserId="73" Text="`lldb` also supports debugging when running the runtime with `wasmtime`. See [here][1] for some more information. But be aware that it probably still has quite some rough edges!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.wasmtime.dev/examples-debugging.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="1786" PostHistoryTypeId="5" PostId="482" RevisionGUID="6b80c7ad-c5ec-4c0a-a92b-765515f45abb" CreationDate="2022-02-25T15:04:14.730" UserId="139" Comment="Added some more clarification" Text="I require some insight into how to troubleshoot the following runtime error which only occurs when I try to peer with my running node.&#xD;&#xA;&#xD;&#xA;Using substrate v3.0.0 monthly-10-2021&#xD;&#xA;&#xD;&#xA;I should also add that if I'm running a single node as a validator, I get no block finalization if that has anything to do with the following. Peering with a node results in the following error for the node trying to start and peer:&#xD;&#xA;```&#xD;&#xA;Version: 1.0.0-fce706a-x86_64-linux-gnu&#xD;&#xA;&#xD;&#xA;   0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:610:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:502:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:139:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14&#xD;&#xA;   6: &lt;pallet_staking::pallet::pallet::GenesisConfig&lt;T&gt; as frame_support::traits::hooks::GenesisBuild&lt;T&gt;&gt;::build&#xD;&#xA;   7: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;   8: sp_state_machine::basic::BasicExternalities::execute_with_storage&#xD;&#xA;   9: &lt;node_runtime::GenesisConfig as sp_runtime::BuildStorage&gt;::assimilate_storage&#xD;&#xA;  10: sp_runtime::BuildStorage::build_storage&#xD;&#xA;  11: &lt;sc_chain_spec::chain_spec::ChainSpec&lt;G,E&gt; as sp_runtime::BuildStorage&gt;::build_storage&#xD;&#xA;  12: sc_service::client::client::Client&lt;B,E,Block,RA&gt;::new&#xD;&#xA;  13: sc_service::builder::new_full_parts&#xD;&#xA;  14: node::service::new_partial&#xD;&#xA;  15: node::service::new_full&#xD;&#xA;  16: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  17: tokio::park::thread::CachedParkThread::block_on&#xD;&#xA;  18: tokio::runtime::thread_pool::ThreadPool::block_on&#xD;&#xA;  19: tokio::runtime::Runtime::block_on&#xD;&#xA;  20: sc_cli::runner::Runner&lt;C&gt;::run_node_until_exit&#xD;&#xA;  21: node::command::run&#xD;&#xA;  22: node::main&#xD;&#xA;  23: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  24: std::rt::lang_start::{{closure}}&#xD;&#xA;  25: core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/ops/function.rs:259:13&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14&#xD;&#xA;      std::rt::lang_start_internal::{{closure}}&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:48&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:406:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:370:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panic.rs:133:14&#xD;&#xA;      std::rt::lang_start_internal&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/rt.rs:128:20&#xD;&#xA;  26: main&#xD;&#xA;  27: __libc_start_main&#xD;&#xA;  28: _start&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'main' panicked at 'Expected Ok(_). Got Err(&#xD;&#xA;    Module {&#xD;&#xA;        index: 16,&#xD;&#xA;        error: 4,&#xD;&#xA;        message: Some(&#xD;&#xA;            &quot;EmptyTargets&quot;,&#xD;&#xA;        ),&#xD;&#xA;    },&#xD;&#xA;)', /home/turtle/.cargo/git/checkouts/substrate-7e08433d4c370a21/bf9683e/frame/staking/src/pallet/mod.rs:518&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;&#xD;&#xA;	support.anonymous.an&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;Some information: I am running a dev chain and my testnet_genesis looks something like this: &#xD;&#xA;```rust&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;	wasm_binary: &amp;[u8],&#xD;&#xA;	initial_authorities: Vec&lt;(&#xD;&#xA;		AccountId, // Stash&#xD;&#xA;		AccountId, // Controller&#xD;&#xA;		GrandpaId,&#xD;&#xA;		BabeId,&#xD;&#xA;		ImOnlineId,&#xD;&#xA;		AuthorityDiscoveryId,&#xD;&#xA;	)&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	initial_nominators: Vec&lt;AccountId&gt;,&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;	let mut rng = rand::thread_rng();&#xD;&#xA;	let endowed_accounts = vec![&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;	];&#xD;&#xA;	let stakers = initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator))&#xD;&#xA;		.chain(initial_nominators.iter().map(|x| {&#xD;&#xA;			use rand::{seq::SliceRandom, Rng};&#xD;&#xA;			let limit = (MAX_NOMINATIONS as usize).min(initial_authorities.len());&#xD;&#xA;			let count = rng.gen::&lt;usize&gt;() % limit;&#xD;&#xA;			let nominations = initial_authorities&#xD;&#xA;				.as_slice()&#xD;&#xA;				.choose_multiple(&amp;mut rng, count)&#xD;&#xA;				.into_iter()&#xD;&#xA;				.map(|choice| choice.0.clone())&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;			(x.clone(), x.clone(), STASH, StakerStatus::Nominator(nominations))&#xD;&#xA;		}))&#xD;&#xA;		.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let num_endowed_accounts = endowed_accounts.len();&#xD;&#xA;	const ENDOWMENT: Balance = 10_000_000 * DOLLARS;&#xD;&#xA;	const STASH: Balance = ENDOWMENT / 1000;&#xD;&#xA;&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		system: SystemConfig {&#xD;&#xA;			// Add Wasm runtime to storage.&#xD;&#xA;			code: wasm_binary.to_vec(),&#xD;&#xA;			changes_trie_config: Default::default(),&#xD;&#xA;		},&#xD;&#xA;		authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			balances: endowed_accounts.iter().cloned().map(|k| (k, ENDOWMENT)).collect(),&#xD;&#xA;		},&#xD;&#xA;		babe: BabeConfig {&#xD;&#xA;			authorities: vec![],&#xD;&#xA;			epoch_config: Some(BabeEpochConfiguration {&#xD;&#xA;				c: (1, 4),&#xD;&#xA;				allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,&#xD;&#xA;			}),&#xD;&#xA;		},&#xD;&#xA;		grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;		im_online: ImOnlineConfig { keys: vec![] },&#xD;&#xA;		session: SessionConfig {&#xD;&#xA;			keys: initial_authorities&#xD;&#xA;				.iter()&#xD;&#xA;				.map(|x| {&#xD;&#xA;					(&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						session_keys(x.3.clone(), x.2.clone(), x.4.clone(), x.5.clone()),&#xD;&#xA;					)&#xD;&#xA;				})&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;		},&#xD;&#xA;		sudo: SudoConfig {&#xD;&#xA;			// Assign network admin rights.&#xD;&#xA;			key: root_key,&#xD;&#xA;		},&#xD;&#xA;		staking: StakingConfig {&#xD;&#xA;			validator_count: 255,&#xD;&#xA;			minimum_validator_count: initial_authorities.len() as u32,&#xD;&#xA;			invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),&#xD;&#xA;			slash_reward_fraction: Perbill::from_percent(10),&#xD;&#xA;			stakers,&#xD;&#xA;			..Default::default()&#xD;&#xA;		},&#xD;&#xA;		treasury: Default::default(),&#xD;&#xA;		council: CouncilConfig::default(),&#xD;&#xA;		indices: IndicesConfig { indices: vec![] },&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;My intuition tells me that I am doing something grossly wrong in this chain spec which is causing the runtime to panic.&#xD;&#xA;Running a single node works fine.&#xD;&#xA;I understand that troubleshooting these errors aren't very realistic online, but I just need a hint on where to look thanks :)&#xD;&#xA;&#xD;&#xA;EDIT #1 : N.B: If I try to run this node again, it starts without this exact error, but gives a different in the chain logs: &#xD;&#xA;```&#xD;&#xA; Bootnode with peer id `12D3KooWBmAwcd4PJNJvfV89HwE48nwkRmAgo8Vy3uQEyNNHBox2` is on a different chain (our genesis: 0x6cab…1f0c theirs: 0x7196…f402)    &#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1787" PostHistoryTypeId="2" PostId="499" RevisionGUID="9cbb3b0e-7d91-413d-ae4f-35246a9c66bf" CreationDate="2022-02-25T15:29:52.943" UserId="499" Text="I've read through the docs [here](https://wiki.polkadot.network/docs/learn-accounts) and [here](https://wiki.polkadot.network/docs/learn-accounts) and would like to know a little bit more about how multisigs can work in practice.&#xD;&#xA;&#xD;&#xA;I would like to build a multisig with a set of unchanging parties, and ideally I would like to be able to derive a set of &quot;child accounts&quot; for this multisig, such that transactions can be sent from any of these child accounts by the same set of parties.&#xD;&#xA;&#xD;&#xA;An example usecase is a DEX, wherein a set of signer nodes control a multisig wallet, but the identification of deposits is performed by reserving an ingress address for the transaction (e.g. DOT).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Master Pubkey K&#xD;&#xA; |- Derived Addr 1&#xD;&#xA; |- Derived Addr 2&#xD;&#xA; |- ...&#xD;&#xA; |- Derived Addr N&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is it possible to control all of the above derived addresses with the same set of multisignature signers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1789" PostHistoryTypeId="1" PostId="499" RevisionGUID="9cbb3b0e-7d91-413d-ae4f-35246a9c66bf" CreationDate="2022-02-25T15:29:52.943" UserId="499" Text="Is it possible to derive &quot;child-multisig&quot; addresses?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1790" PostHistoryTypeId="3" PostId="499" RevisionGUID="9cbb3b0e-7d91-413d-ae4f-35246a9c66bf" CreationDate="2022-02-25T15:29:52.943" UserId="499" Text="|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1791" PostHistoryTypeId="2" PostId="500" RevisionGUID="d3120e6a-68fb-47d7-bb35-0186491487e0" CreationDate="2022-02-25T15:34:30.483" UserId="501" Text="I'm trying to implement a Substrate client on IoT, to send a basic extrinsic that stores as an example, a key-value. This code needs to run on ARM or ESP32 kinds of chips.&#xD;&#xA;&#xD;&#xA;Are there any suggestions on which library to use? &#xD;&#xA;&#xD;&#xA;The [polkadot_api_cpp][1] is too old because it supports only up to substrate metadata V7.&#xD;&#xA;Also, I've tried to `no_std` the Rust [substrate-api-client][2] library [without success][3].&#xD;&#xA;&#xD;&#xA;I'm considering building a C client to build/send a transaction to Substrate, but I really wanna be sure that there's no alternative.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/usetech-llc/polkadot_api_cpp&#xD;&#xA;  [2]: https://github.com/scs/substrate-api-client&#xD;&#xA;  [3]: https://github.com/scs/substrate-api-client/issues/190" ContentLicense="CC BY-SA 4.0" />
  <row Id="1793" PostHistoryTypeId="1" PostId="500" RevisionGUID="d3120e6a-68fb-47d7-bb35-0186491487e0" CreationDate="2022-02-25T15:34:30.483" UserId="501" Text="Trying to implement Substrate client on IoT, any suggestions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1794" PostHistoryTypeId="3" PostId="500" RevisionGUID="d3120e6a-68fb-47d7-bb35-0186491487e0" CreationDate="2022-02-25T15:34:30.483" UserId="501" Text="|transactions|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1795" PostHistoryTypeId="2" PostId="501" RevisionGUID="f10f208f-bf2c-4ea1-acf5-04eeaa867780" CreationDate="2022-02-25T15:45:25.657" UserId="29" Text="You can see a list of tools here:&#xD;&#xA;- https://docs.substrate.io/v3/integration/client-libraries&#xD;&#xA;- https://github.com/substrate-developer-hub/awesome-substrate#tools&#xD;&#xA;&#xD;&#xA;Note that some are actively maintained, others are not." ContentLicense="CC BY-SA 4.0" />
  <row Id="1797" PostHistoryTypeId="5" PostId="492" RevisionGUID="7869ea57-61e9-4849-92ed-4230ed9995c8" CreationDate="2022-02-25T15:53:12.637" UserId="452" Comment="extended answer due to question edit" Text="The issue might be that `initial_authorities` accounts don't have any funds, and therefore they don't exist. The error you see comes from the staking module, presumably because it didn't get any valid validators / nominators.&#xD;&#xA;&#xD;&#xA;Edit: regarding the issue of different genesis hashes, it is likely the case that these nodes are being run with slightly different binaries. E.g. imagine that you had node A already running, then you tweaked the chainspec a bit, compiled and started running node B. Since you changed the chainspec, this will affect the genesis hash and therefore node A and B won't be able to connect with each other (from their point-of-view they are on different blockchains)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1798" PostHistoryTypeId="2" PostId="502" RevisionGUID="90ca969b-670b-451a-b79d-6567f1475993" CreationDate="2022-02-25T16:14:22.833" UserId="16" Text="Inside a FRAME runtime I want to check whether a specific storage item was already read in the current block. Reason is to determine the impact of storage accesses across the extrinsics of a block rather than only per extrinsic.&#xD;&#xA;&#xD;&#xA;Basically, for every read I want to know if either one of those statements is true:&#xD;&#xA;1. The storage item already been read in the current block.&#xD;&#xA;2. The storage item has already been written in the current block.&#xD;&#xA;&#xD;&#xA;In both cases the item wouldn't be included in the witness:&#xD;&#xA;1. The witness does not contain duplicate keys.&#xD;&#xA;2. If the key was written it can be pulled from the overlay and doesn't need to be in the witness." ContentLicense="CC BY-SA 4.0" />
  <row Id="1800" PostHistoryTypeId="1" PostId="502" RevisionGUID="90ca969b-670b-451a-b79d-6567f1475993" CreationDate="2022-02-25T16:14:22.833" UserId="16" Text="How can I check whether a specific storage item was already accessed in the current block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1801" PostHistoryTypeId="3" PostId="502" RevisionGUID="90ca969b-670b-451a-b79d-6567f1475993" CreationDate="2022-02-25T16:14:22.833" UserId="16" Text="|storage|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1802" PostHistoryTypeId="2" PostId="503" RevisionGUID="bf21806c-5b33-4006-8204-18901ce4854e" CreationDate="2022-02-25T16:17:13.727" UserId="73" Text="You can not check whether a specific storage item was already read or written. You need to assume the worst case, aka always having a &quot;fresh&quot; read." ContentLicense="CC BY-SA 4.0" />
  <row Id="1805" PostHistoryTypeId="2" PostId="504" RevisionGUID="b787616e-d3ad-4ee0-b08a-35e751fcc1b5" CreationDate="2022-02-25T19:22:57.643" UserId="504" Text="I am changing the collator_selection pallet by removing the LastAuthoredBlock StorageItem and adding an unrelated one, so although the chain is live, no data migration is needed.&#xD;&#xA;&#xD;&#xA;What happens with the data of the old - now inaccessible in code - StorageItem?&#xD;&#xA;&#xD;&#xA;Is there some automated mechanism to prune storage data when it's no longer referenced or do I need to declare a migration from old StorageItem to nothing in order to reclaim the now-unused storage e.g. by following [https://docs.substrate.io/how-to-guides/v3/storage-migrations/basics/][1] and using drain/kill instead of translate?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/how-to-guides/v3/storage-migrations/basics/" ContentLicense="CC BY-SA 4.0" />
  <row Id="1807" PostHistoryTypeId="1" PostId="504" RevisionGUID="b787616e-d3ad-4ee0-b08a-35e751fcc1b5" CreationDate="2022-02-25T19:22:57.643" UserId="504" Text="Reclaim used space of a removed StorageItem on a live chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="1808" PostHistoryTypeId="3" PostId="504" RevisionGUID="b787616e-d3ad-4ee0-b08a-35e751fcc1b5" CreationDate="2022-02-25T19:22:57.643" UserId="504" Text="|storage|migration|pruning|cleanup|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1809" PostHistoryTypeId="2" PostId="505" RevisionGUID="46842217-e883-4016-a581-b735cb273db4" CreationDate="2022-02-25T19:45:58.853" UserId="73" Text="Yes, you will need to kill/drain the old storage items. There is no way the chain can detect that storage items are unused and prune them automatically." ContentLicense="CC BY-SA 4.0" />
  <row Id="1811" PostHistoryTypeId="2" PostId="506" RevisionGUID="61469824-9740-4cd9-a0b6-e41c123c759d" CreationDate="2022-02-25T20:38:14.707" UserId="504" Text="We started a chain using pallet_collator_selection and later forked it. &#xD;&#xA;Both the original and the forked pallet use the `LastAuthoredBlock` StorageItem.&#xD;&#xA;We did **not** execute a storage migration from the original to the forked pallet.&#xD;&#xA;&#xD;&#xA;[The storage docs][1] state that a storage key is made up of the `pallet name` and the `item name`, implying that our forked pallet actually created its own storage key `hash(forked_collator_selection)hash(LastAuthoredBlock)` instead of reusing `hash(pallet_collator_selection)hash(LastAuthoredBlock)`, rendering the latter unused memory.&#xD;&#xA;&#xD;&#xA;**Is there a way to free the memory of the old, now unreferenced `hash(pallet_collator_selection)hash(LastAuthoredBlock)` StorageItem on the live chain after the forked pallet has been deployed without migrating storage at the time?**&#xD;&#xA;&#xD;&#xA;Corollary question to: [Reclaim used space of a removed StorageItem on a live chain][2]&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/advanced/storage/#storage-value-keys&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/504/reclaim-used-space-of-a-removed-storageitem-on-a-live-chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="1813" PostHistoryTypeId="1" PostId="506" RevisionGUID="61469824-9740-4cd9-a0b6-e41c123c759d" CreationDate="2022-02-25T20:38:14.707" UserId="504" Text="Forked Parity pallet, didn't migrate storage, deployed to chain. How to clear original storage from the live chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1814" PostHistoryTypeId="3" PostId="506" RevisionGUID="61469824-9740-4cd9-a0b6-e41c123c759d" CreationDate="2022-02-25T20:38:14.707" UserId="504" Text="|pallet|storage|migration|cleanup|fork|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1815" PostHistoryTypeId="6" PostId="504" RevisionGUID="cf47010f-370e-450b-baf0-6f556ea59f57" CreationDate="2022-02-25T20:38:25.797" UserId="504" Comment="edited tags" Text="|storage|migration|cleanup|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1816" PostHistoryTypeId="2" PostId="507" RevisionGUID="a15d7fb9-2994-466e-a106-2420d8281e4b" CreationDate="2022-02-25T20:45:19.727" UserId="73" Text="You can use [remove_storage_prefix][1]:&#xD;&#xA;```&#xD;&#xA;remove_storage_prefix(&quot;OldPalletNameInYourRuntime&quot;, &quot;LastAuthoredBlock&quot;, &amp;[]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You need to place this into a runtime migration. The last parameter `hash` is empty here because you don't have a map here (the function is generic over storage items and maps).&#xD;&#xA;&#xD;&#xA;Or you could also send a transaction to your chain [`kill_storage`][2]. Be aware that this call requires `root`. As argument you pass a vector with the only element being the raw key of the old storage item (`hash(pallet_collator_selection)hash(LastAuthoredBlock)`).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/frame-support/latest/frame_support/storage/migration/fn.remove_storage_prefix.html&#xD;&#xA;  [2]: https://docs.rs/frame-system/latest/frame_system/pallet/enum.Call.html#variant.kill_storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="1818" PostHistoryTypeId="2" PostId="508" RevisionGUID="edc016f4-4f0e-412d-aaa1-0114335f3c76" CreationDate="2022-02-26T01:47:25.257" UserId="245" Text="I tried using `@polkadot/util`'s `formatBalance` function to get the formated balance of the account. But, it doesn't make sense. &#xD;&#xA;&#xD;&#xA;I believe unit conversion not working properly and I wonder what am I doing wrong.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;await this.api?.query.system.account('5C8Nk6HL1eYNu3NADXDGzARdNYv6uuqoQ2FCQH26odo3Tpvt', ({ nonce, data: balance }) =&gt; {&#xD;&#xA;  console.log('balance:', balance.free.toHuman())&#xD;&#xA;  const free = this.formatBalance(balance.free.toHuman().replace(',', '')).split(' ');&#xD;&#xA;  console.log('$balanceChanges', `{&quot;free&quot;: &quot;${free[0]}&quot;, &quot;freeUnit&quot;: &quot;${free[1]}&quot;, &quot;reserved&quot;: &quot;${balance.reserved.toHuman()}&quot;, &quot;nonce&quot;: &quot;${nonce.toHuman()}&quot;}`);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;balance: 399,999,874,999,852 // should be 399 nanoDES&#xD;&#xA;$balanceChanges {&quot;free&quot;: &quot;399.9986&quot;, &quot;freeUnit&quot;: &quot;mDES&quot;, &quot;reserved&quot;: &quot;0&quot;, &quot;nonce&quot;: &quot;4&quot;}&#xD;&#xA;&#xD;&#xA;balance: 1,000,399,999,874,999,852 // should be 1 DES&#xD;&#xA;$balanceChanges {&quot;free&quot;: &quot;99.9639&quot;, &quot;freeUnit&quot;: &quot;kDES&quot;, &quot;reserved&quot;: &quot;0&quot;, &quot;nonce&quot;: &quot;4&quot;}&#xD;&#xA;&#xD;&#xA;balance: 99,399,999,499,999,407 // should be 99.39 milliDES&#xD;&#xA;$balanceChanges {&quot;free&quot;: &quot;993.9869&quot;, &quot;freeUnit&quot;: &quot;DES&quot;, &quot;reserved&quot;: &quot;0&quot;, &quot;nonce&quot;: &quot;7&quot;}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;&gt; this.api?.registry.chainDecimals&#xD;&#xA;[18]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import { BN, formatBalance as mFormatBalance } from '@polkadot/util';&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;formatBalance(balance: number | string | BN | bigint): string {&#xD;&#xA;    return mFormatBalance(balance, { withUnit: 'DES' }, this.api?.registry.chainDecimals[0]);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1820" PostHistoryTypeId="1" PostId="508" RevisionGUID="edc016f4-4f0e-412d-aaa1-0114335f3c76" CreationDate="2022-02-26T01:47:25.257" UserId="245" Text="How to format balance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1821" PostHistoryTypeId="3" PostId="508" RevisionGUID="edc016f4-4f0e-412d-aaa1-0114335f3c76" CreationDate="2022-02-26T01:47:25.257" UserId="245" Text="|balances|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1822" PostHistoryTypeId="2" PostId="509" RevisionGUID="d22abb5f-c8d5-4041-8cf9-f8e26657c9e2" CreationDate="2022-02-26T02:56:06.310" UserId="129" Text="I'm trying to read the flipper contract data from a contract in a local node, following the code in [here][1].&#xD;&#xA;This is my code:&#xD;&#xA;```&#xD;&#xA;// Required imports&#xD;&#xA;const { ApiPromise, WsProvider } = require(&quot;@polkadot/api&quot;);&#xD;&#xA;const { ContractPromise } = require(&quot;@polkadot/api-contract&quot;);&#xD;&#xA;const { keyring } = require(&quot;@polkadot/ui-keyring&quot;);&#xD;&#xA;keyring.loadAll({ ss58Format: 42, type: &quot;sr25519&quot; });&#xD;&#xA;&#xD;&#xA;const abi = require(&quot;./metadata.json&quot;);&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;    const provider = new WsProvider(&quot;ws://127.0.0.1:9944&quot;);&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;    const contractAddress = &quot;5HDxbYh52Wb34ATHwWhct1FQ4gnavcK8kAyMAVRdHUxgDhYo&quot;;&#xD;&#xA;    const contract = new ContractPromise(api, abi, contractAddress);&#xD;&#xA;&#xD;&#xA;    const alicePair = keyring.createFromUri(&quot;//Alice&quot;);&#xD;&#xA;&#xD;&#xA;    const value = 0;&#xD;&#xA;    const gasLimit = 3000n * 1000000n;&#xD;&#xA;    const { gasConsumed, result, output } = await contract.query.get(&#xD;&#xA;        alicePair.address,&#xD;&#xA;        { value, gasLimit }&#xD;&#xA;    );&#xD;&#xA;    console.log(result.toHuman());&#xD;&#xA;    console.log(gasConsumed.toHuman());&#xD;&#xA;&#xD;&#xA;    if (result.isOk) {&#xD;&#xA;        console.log(&quot;Success&quot;, output.toHuman());&#xD;&#xA;    } else {&#xD;&#xA;        console.error(&quot;Error&quot;, result.asErr);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main()&#xD;&#xA;    .catch(console.error)&#xD;&#xA;    .finally(() =&gt; process.exit());&#xD;&#xA;```&#xD;&#xA;After running this file with node, this is the output:&#xD;&#xA;```&#xD;&#xA;{ Err: { Module: { index: '8', error: '1', message: 'OutOfGas' } } }&#xD;&#xA;3,000,000,000&#xD;&#xA;Error Type {&#xD;&#xA;  registry: TypeRegistry { createdAtHash: undefined },&#xD;&#xA;  createdAtHash: undefined,&#xD;&#xA;  initialU8aLength: undefined,&#xD;&#xA;  isOther: [Getter],&#xD;&#xA;  isCannotLookup: [Getter],&#xD;&#xA;  isBadOrigin: [Getter],&#xD;&#xA;  isModule: [Getter],&#xD;&#xA;  asOther: [Getter],&#xD;&#xA;  asCannotLookup: [Getter],&#xD;&#xA;  asBadOrigin: [Getter],&#xD;&#xA;  asModule: [Getter]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;What caused the error and how to fix it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api-contract/start/contract.read/" ContentLicense="CC BY-SA 4.0" />
  <row Id="1824" PostHistoryTypeId="1" PostId="509" RevisionGUID="d22abb5f-c8d5-4041-8cf9-f8e26657c9e2" CreationDate="2022-02-26T02:56:06.310" UserId="129" Text="OutOfGas Error when trying to read contract data using Polkadot JS API" ContentLicense="CC BY-SA 4.0" />
  <row Id="1825" PostHistoryTypeId="3" PostId="509" RevisionGUID="d22abb5f-c8d5-4041-8cf9-f8e26657c9e2" CreationDate="2022-02-26T02:56:06.310" UserId="129" Text="|polkadot-js|smart-contract|api|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1827" PostHistoryTypeId="2" PostId="510" RevisionGUID="e4f44c93-001e-45c7-9120-0d69201edee0" CreationDate="2022-02-26T03:45:33.070" UserId="29" Text="Good question. You could try something like this:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;import { BN, formatBalance } from '@polkadot/util';&#xD;&#xA;&#xD;&#xA;const formatAccountBalance = async () =&gt; {&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const { nonce, data: balance } = await api.query.system.account('14RYaXRSqb9rPqMaAVp1UZW2czQ6dMNGMbvukwfifi6m8ZgZ');&#xD;&#xA;    const chainDecimals = api.registry.chainDecimals[0];&#xD;&#xA;    console.log('raw balance:', balance.free.toNumber())&#xD;&#xA;    formatBalance.setDefaults({ unit: 'DOT' });&#xD;&#xA;    const defaults = formatBalance.getDefaults();&#xD;&#xA;    const free = formatBalance(balance.free, { withSiFull: true }, chainDecimals);&#xD;&#xA;    const reserved = formatBalance(balance.reserved, { withSiFull: true }, chainDecimals);&#xD;&#xA;    console.log('Formatted balance:', `{&quot;free&quot;: &quot;${free}&quot;, &quot;unit&quot;: &quot;${defaults.unit}&quot;, &quot;reserved&quot;: &quot;${reserved}&quot;, &quot;nonce&quot;: &quot;${nonce.toHuman()}&quot;}`);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Should output something like this:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;raw balance: 562262999731&#xD;&#xA;Formatted balance: {&quot;free&quot;: &quot;56.2262 DOT&quot;, &quot;unit&quot;: &quot;DOT&quot;, &quot;reserved&quot;: &quot;220.2580 DOT&quot;, &quot;nonce&quot;: &quot;21&quot;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Shawn also wrote about this here:&#xD;&#xA;- https://stackoverflow.com/questions/64210673/how-do-you-format-balances-with-the-polkadot-js-api&#xD;&#xA;&#xD;&#xA;There are also nice examples here:&#xD;&#xA;- https://github.com/polkadot-js/common/blob/master/packages/util/src/format/formatBalance.spec.ts" ContentLicense="CC BY-SA 4.0" />
  <row Id="1829" PostHistoryTypeId="2" PostId="511" RevisionGUID="ccb902cb-a3ca-44b0-bf94-d8dea5bbf156" CreationDate="2022-02-26T08:57:33.510" UserId="510" Text="Followed the installation steps provided here&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/&#xD;&#xA;&#xD;&#xA;Steps taken with node version v16.14.0&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;yarn install&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error code&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Resolution step&#xD;&#xA;➤ YN0002: │ eslint-config-react-app@npm:7.0.0 [e199f] doesn't provide @babel/plugin-syntax-flow (p79568), requested by eslint-plugin-flowtype&#xD;&#xA;➤ YN0002: │ eslint-config-react-app@npm:7.0.0 [e199f] doesn't provide @babel/plugin-transform-react-jsx (p2880e), requested by eslint-plugin-flowtype&#xD;&#xA;➤ YN0002: │ react-dev-utils@npm:12.0.0 doesn't provide typescript (p08c91), requested by fork-ts-checker-webpack-plugin&#xD;&#xA;➤ YN0002: │ react-dev-utils@npm:12.0.0 doesn't provide webpack (pf80ce), requested by fork-ts-checker-webpack-plugin&#xD;&#xA;➤ YN0002: │ react-scripts@npm:5.0.0 [9c894] doesn't provide autoprefixer (peca2e), requested by tailwindcss&#xD;&#xA;➤ YN0060: │ react-scripts@npm:5.0.0 [9c894] provides eslint (p3d1f2) with version 8.6.0, which doesn't satisfy what eslint-config-react-app and some of its descendants request&#xD;&#xA;➤ YN0002: │ substrate-front-end-template@workspace:. doesn't provide eslint (p83184), requested by eslint-config-prettier&#xD;&#xA;➤ YN0002: │ substrate-front-end-template@workspace:. doesn't provide webpack (p9e29f), requested by node-polyfill-webpack-plugin&#xD;&#xA;➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements &lt;hash&gt; for details, where &lt;hash&gt; is the six-letter p-prefixed code&#xD;&#xA;➤ YN0000: └ Completed in 0s 245ms&#xD;&#xA;➤ YN0000: ┌ Fetch step&#xD;&#xA;➤ YN0013: │ semantic-ui-css@https://github.com/Semantic-Org/Semantic-UI-CSS.git#commit=01e4a5346496c284db3b19a102458731ccccd911 can't be found in the cache and will be fe&#xD;&#xA;➤ YN0013: │ semantic-ui-css@https://github.com/Semantic-Org/Semantic-UI-CSS.git#commit=01e4a5346496c284db3b19a102458731ccccd911 can't be found in the cache and will be fe&#xD;&#xA;➤ YN0018: │ semantic-ui-css@https://github.com/Semantic-Org/Semantic-UI-CSS.git#commit=01e4a5346496c284db3b19a102458731ccccd911: The remote archive doesn't match the expected checksum&#xD;&#xA;➤ YN0000: └ Completed in 8s 74ms&#xD;&#xA;➤ YN0000: Failed with errors in 8s 327ms&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1831" PostHistoryTypeId="1" PostId="511" RevisionGUID="ccb902cb-a3ca-44b0-bf94-d8dea5bbf156" CreationDate="2022-02-26T08:57:33.510" UserId="510" Text="Error encountered could not complete yarn install of substrate front end template" ContentLicense="CC BY-SA 4.0" />
  <row Id="1832" PostHistoryTypeId="3" PostId="511" RevisionGUID="ccb902cb-a3ca-44b0-bf94-d8dea5bbf156" CreationDate="2022-02-26T08:57:33.510" UserId="510" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1833" PostHistoryTypeId="2" PostId="512" RevisionGUID="595e02d2-b5fb-4a3d-97dd-4ec1a136d14e" CreationDate="2022-02-26T10:08:40.380" UserId="16" Text="The error is telling you that the gas limit you have provided is too low. You supplied a limit of `3 * 10^9` which is 3 milliseconds of execution (1 gas = 1 pico second). This could be too less if the message you are calling is doing some heavy lifting. It really depends on your contract so we cannot really tell.&#xD;&#xA;&#xD;&#xA;You are calling the message through a node RPC in order to retrieve some value. You should set the `gas_limit` to the maximum allowed for an RPC execution and see where this leads. The default for that is `5 * 10^12` (5 seconds). If you still see an out of gas error you should inspect your contract and find out why it consumes such a heavy amount of gas." ContentLicense="CC BY-SA 4.0" />
  <row Id="1835" PostHistoryTypeId="2" PostId="513" RevisionGUID="4545f7f2-ebae-4955-97e5-4fdcf9913e7f" CreationDate="2022-02-26T13:04:53.910" UserId="452" Text="I just tried it and had no issues. This was probably a temporary error with the git repository from `Semantic-Org`. Can you still replicate this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1838" PostHistoryTypeId="2" PostId="514" RevisionGUID="7a10913e-1034-4c7b-960e-65880e34348d" CreationDate="2022-02-26T14:04:23.417" UserId="510" Text="Resolved it by performing these steps&#xD;&#xA;&#xD;&#xA;    yarn cache clean --all&#xD;&#xA;    yarn install&#xD;&#xA;&#xD;&#xA;At this point, got the same error. Then run this:&#xD;&#xA;&#xD;&#xA;    YARN_CHECKSUM_BEHAVIOR=update yarn&#xD;&#xA;&#xD;&#xA;Credits to answer from [Github discussion][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/yarnpkg/berry/issues/1142#issuecomment-607272809" ContentLicense="CC BY-SA 4.0" />
  <row Id="1842" PostHistoryTypeId="2" PostId="515" RevisionGUID="1f8a6d2a-78ef-49f8-be13-276f2a872118" CreationDate="2022-02-26T15:23:44.320" UserId="265" Text="most substrate [documentation](https://wiki.polkadot.network/docs/maintain-guides-how-to-monitor-your-node) recommends monitoring node health using substrate's built in prometheus metrics publisher. i've started to [implement](https://pulse.pelagos.systems/alerts) this but haven't been able to find good examples of validating that a collator node is producing blocks. there are many examples of using the `up` metric to validate that a node is alive and [moonbeam documentation](https://docs.moonbeam.network/node-operators/networks/collators/faq/) mentions the `substrate_proposer_block_constructed_count` metric but not how one might use it in a prometheus rule expression to validate that a node's block production count is within some meaningful thresholds.&#xD;&#xA;an example of how to write an expression that evaluated if a collators block production was within a certain threshold of average block production for all collators within a given timeframe would be exceptionally useful.&#xD;&#xA;do such examples exist or do you know enough about prometheus metric calculations to provide such an example here?&#xD;&#xA;my current set of rules is rather generic and looks like [this](https://pulse.pelagos.systems/rules):&#xD;&#xA;&#xD;&#xA;```yaml&#xD;&#xA;---&#xD;&#xA;groups:&#xD;&#xA;-&#xD;&#xA;  name: substrate node&#xD;&#xA;  rules:&#xD;&#xA;  -&#xD;&#xA;    alert: instance down&#xD;&#xA;    expr: up == 0&#xD;&#xA;    for: 1m&#xD;&#xA;    annotations:&#xD;&#xA;      summary: &gt;-&#xD;&#xA;        instance down: $labels.instance&#xD;&#xA;      description: |&#xD;&#xA;        [{{ $labels.instance }}] of job [{{ $labels.job }}] has been down for more than 1 minute.&#xD;&#xA;    labels:&#xD;&#xA;      severity: critical&#xD;&#xA;  -&#xD;&#xA;    alert: high cpu load&#xD;&#xA;    expr: 100 - (avg by(instance)(rate(node_cpu_seconds_total{mode=&quot;idle&quot;}[2m])) * 100) &gt; 80&#xD;&#xA;    for: 0m&#xD;&#xA;    annotations:&#xD;&#xA;      summary: &gt;-&#xD;&#xA;        high cpu load: $labels.instance&#xD;&#xA;      description: |&#xD;&#xA;        cpu load greater than 80%&#xD;&#xA;        value: {{ $value }}&#xD;&#xA;        labels: {{ $labels }}&#xD;&#xA;    labels:&#xD;&#xA;      severity: warning&#xD;&#xA;  -&#xD;&#xA;    alert: low peer count&#xD;&#xA;    expr: substrate_sync_peers &lt; 10&#xD;&#xA;    for: 0m&#xD;&#xA;    annotations:&#xD;&#xA;      summary: &gt;-&#xD;&#xA;        low peer count: $labels.instance&#xD;&#xA;      description: |&#xD;&#xA;        peer count less than 10&#xD;&#xA;        value: {{ $value }}&#xD;&#xA;        labels: {{ $labels }}&#xD;&#xA;    labels:&#xD;&#xA;      severity: warning&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1844" PostHistoryTypeId="1" PostId="515" RevisionGUID="1f8a6d2a-78ef-49f8-be13-276f2a872118" CreationDate="2022-02-26T15:23:44.320" UserId="265" Text="how can collator block production be monitored?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1845" PostHistoryTypeId="3" PostId="515" RevisionGUID="1f8a6d2a-78ef-49f8-be13-276f2a872118" CreationDate="2022-02-26T15:23:44.320" UserId="265" Text="|substrate-node|metrics|prometheus|alerts|monitoring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1846" PostHistoryTypeId="5" PostId="508" RevisionGUID="a7809f78-cc46-4690-8666-a5aa74275468" CreationDate="2022-02-26T17:50:05.207" UserId="2" Comment="typos corrected" Text="I tried using `@polkadot/util`'s `formatBalance` function to get the formatted balance of the account. But it doesn't make sense. &#xD;&#xA;&#xD;&#xA;I believe unit conversion is not working properly and I wonder what I am doing wrong.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;await this.api?.query.system.account('5C8Nk6HL1eYNu3NADXDGzARdNYv6uuqoQ2FCQH26odo3Tpvt', ({ nonce, data: balance }) =&gt; {&#xD;&#xA;  console.log('balance:', balance.free.toHuman())&#xD;&#xA;  const free = this.formatBalance(balance.free.toHuman().replace(',', '')).split(' ');&#xD;&#xA;  console.log('$balanceChanges', `{&quot;free&quot;: &quot;${free[0]}&quot;, &quot;freeUnit&quot;: &quot;${free[1]}&quot;, &quot;reserved&quot;: &quot;${balance.reserved.toHuman()}&quot;, &quot;nonce&quot;: &quot;${nonce.toHuman()}&quot;}`);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;balance: 399,999,874,999,852 // should be 399 nanoDES&#xD;&#xA;$balanceChanges {&quot;free&quot;: &quot;399.9986&quot;, &quot;freeUnit&quot;: &quot;mDES&quot;, &quot;reserved&quot;: &quot;0&quot;, &quot;nonce&quot;: &quot;4&quot;}&#xD;&#xA;&#xD;&#xA;balance: 1,000,399,999,874,999,852 // should be 1 DES&#xD;&#xA;$balanceChanges {&quot;free&quot;: &quot;99.9639&quot;, &quot;freeUnit&quot;: &quot;kDES&quot;, &quot;reserved&quot;: &quot;0&quot;, &quot;nonce&quot;: &quot;4&quot;}&#xD;&#xA;&#xD;&#xA;balance: 99,399,999,499,999,407 // should be 99.39 milliDES&#xD;&#xA;$balanceChanges {&quot;free&quot;: &quot;993.9869&quot;, &quot;freeUnit&quot;: &quot;DES&quot;, &quot;reserved&quot;: &quot;0&quot;, &quot;nonce&quot;: &quot;7&quot;}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;&gt; this.api?.registry.chainDecimals&#xD;&#xA;[18]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import { BN, formatBalance as mFormatBalance } from '@polkadot/util';&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;formatBalance(balance: number | string | BN | bigint): string {&#xD;&#xA;    return mFormatBalance(balance, { withUnit: 'DES' }, this.api?.registry.chainDecimals[0]);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1847" PostHistoryTypeId="24" PostId="508" RevisionGUID="a7809f78-cc46-4690-8666-a5aa74275468" CreationDate="2022-02-26T17:50:05.207" Comment="Proposed by 2 approved by 94, 452 edit id of 68" ContentLicense="CC BY-SA 4.0" />
  <row Id="1848" PostHistoryTypeId="5" PostId="481" RevisionGUID="b08619b3-d002-492b-9516-fc260969df2e" CreationDate="2022-02-26T17:50:19.930" UserId="2" Comment="typo corrected, capitalization" Text="When I was doing cross-chain messaging (parallel chain A to parallel chain B), parallel chain A sent an XCM message (successfully). After receiving the message, the relay chain was supposed to send it to parallel chain B, but it reported `Error: Barrier`.&#xD;&#xA;&#xD;&#xA;This is the log from the relay chain:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This is my XCM config and ORML config.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;match_type! {&#xD;&#xA;	pub type ParentOrParentsExecutivePlurality: impl Contains&lt;MultiLocation&gt; = {&#xD;&#xA;		MultiLocation { parents: 1, interior: Here } |&#xD;&#xA;		MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Executive, .. }) }&#xD;&#xA;	};&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;match_type! {&#xD;&#xA;	pub type SpecParachain: impl Contains&lt;MultiLocation&gt; = {&#xD;&#xA;		MultiLocation {parents: 1, interior: X1(Parachain(1000))} |&#xD;&#xA;		MultiLocation {parents: 1, interior: X1(Parachain(2000))}&#xD;&#xA;	};&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub type Barrier = (&#xD;&#xA;	TakeWeightCredit,&#xD;&#xA;	AllowTopLevelPaidExecutionFrom&lt;Everything&gt;,&#xD;&#xA;	AllowUnpaidExecutionFrom&lt;ParentOrParentsExecutivePlurality&gt;,&#xD;&#xA;	// ^^^ Parent and its exec plurality get free execution&#xD;&#xA;	AllowUnpaidExecutionFrom&lt;SpecParachain&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;pub struct XcmConfig;&#xD;&#xA;impl xcm_executor::Config for XcmConfig {&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type XcmSender = XcmRouter;&#xD;&#xA;	// How to withdraw and deposit an asset.&#xD;&#xA;	type AssetTransactor = LocalAssetTransactor;&#xD;&#xA;	type OriginConverter = XcmOriginToTransactDispatchOrigin;&#xD;&#xA;	type IsReserve = MultiNativeAsset;&#xD;&#xA;	type IsTeleporter = (); // Teleporting is disabled.&#xD;&#xA;	type LocationInverter = LocationInverter&lt;Ancestry&gt;;&#xD;&#xA;	type Barrier = Barrier;&#xD;&#xA;	type Weigher = FixedWeightBounds&lt;UnitWeightCost, Call, MaxInstructions&gt;;&#xD;&#xA;	type Trader = UsingComponents&lt;IdentityFee&lt;Balance&gt;, RelayLocation, AccountId, Balances, ()&gt;;&#xD;&#xA;	type ResponseHandler = PolkadotXcm;&#xD;&#xA;	type AssetTrap = PolkadotXcm;&#xD;&#xA;	type AssetClaims = PolkadotXcm;&#xD;&#xA;	type SubscriptionService = PolkadotXcm;&#xD;&#xA;}&#xD;&#xA;......&#xD;&#xA;......&#xD;&#xA;......&#xD;&#xA;// orml_xtokens&#xD;&#xA;#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, Ord, codec::MaxEncodedLen, TypeInfo)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;pub enum CurrencyId {&#xD;&#xA;	// / Relay chain token.&#xD;&#xA;	ROC,&#xD;&#xA;	// Native TokenSymbol&#xD;&#xA;	A,&#xD;&#xA;	// Parachain B token.&#xD;&#xA;	B,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub type Amount = i128;&#xD;&#xA;&#xD;&#xA;pub struct CurrencyIdConvert;&#xD;&#xA;impl Convert&lt;CurrencyId, Option&lt;MultiLocation&gt;&gt; for CurrencyIdConvert {&#xD;&#xA;	fn convert(id: CurrencyId) -&gt; Option&lt;MultiLocation&gt; {&#xD;&#xA;		match id {&#xD;&#xA;			CurrencyId::ROC =&gt; Some(Parent.into()),&#xD;&#xA;			CurrencyId::A=&gt; Some((Parent, Parachain(1000), GeneralKey(&quot;A&quot;.into())).into()),&#xD;&#xA;			CurrencyId::B=&gt; Some((Parent, Parachain(2000), GeneralKey(&quot;B&quot;.into())).into()),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;impl Convert&lt;MultiLocation, Option&lt;CurrencyId&gt;&gt; for CurrencyIdConvert {&#xD;&#xA;	fn convert(l: MultiLocation) -&gt; Option&lt;CurrencyId&gt; {&#xD;&#xA;		let a: Vec&lt;u8&gt; = &quot;A&quot;.into();&#xD;&#xA;		let b: Vec&lt;u8&gt; = &quot;B&quot;.into();&#xD;&#xA;		if l == MultiLocation::parent() {&#xD;&#xA;			return Some(CurrencyId::ROC);&#xD;&#xA;		}&#xD;&#xA;		match l {&#xD;&#xA;			MultiLocation { parents, interior } if parents == 1 =&gt; match interior {&#xD;&#xA;				X2(Parachain(1000), GeneralKey(k)) if k == a =&gt; Some(CurrencyId::A),&#xD;&#xA;				X2(Parachain(2000), GeneralKey(k)) if k == b =&gt; Some(CurrencyId::B),&#xD;&#xA;				_ =&gt; None,&#xD;&#xA;			},&#xD;&#xA;			MultiLocation { parents, interior } if parents == 0 =&gt; match interior {&#xD;&#xA;				X1(GeneralKey(k)) if k == a =&gt; Some(CurrencyId::A),&#xD;&#xA;				X1(GeneralKey(k)) if k == b =&gt; Some(CurrencyId::B),&#xD;&#xA;				_ =&gt; None,&#xD;&#xA;			},&#xD;&#xA;			_ =&gt; None,&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;impl Convert&lt;MultiAsset, Option&lt;CurrencyId&gt;&gt; for CurrencyIdConvert {&#xD;&#xA;	fn convert(a: MultiAsset) -&gt; Option&lt;CurrencyId&gt; {&#xD;&#xA;		if let MultiAsset {&#xD;&#xA;			fun: Fungible(_),&#xD;&#xA;			id: Concrete(id),&#xD;&#xA;		} = a&#xD;&#xA;		{&#xD;&#xA;			Self::convert(id)&#xD;&#xA;		} else {&#xD;&#xA;			Option::None&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct AccountIdToMultiLocation;&#xD;&#xA;impl Convert&lt;AccountId, MultiLocation&gt; for AccountIdToMultiLocation {&#xD;&#xA;	fn convert(account: AccountId) -&gt; MultiLocation {&#xD;&#xA;		X1(Junction::AccountId32 {&#xD;&#xA;			network: NetworkId::Any,&#xD;&#xA;			id: account.into(),&#xD;&#xA;		})&#xD;&#xA;		.into()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into())));&#xD;&#xA;	pub const BaseXcmWeight: Weight = 100_000_000;&#xD;&#xA;	pub const MaxAssetsForTransfer: usize = 2;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl orml_xtokens::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Balance = Balance;&#xD;&#xA;	type CurrencyId = CurrencyId;&#xD;&#xA;	type CurrencyIdConvert = CurrencyIdConvert;&#xD;&#xA;	type AccountIdToMultiLocation = AccountIdToMultiLocation;&#xD;&#xA;	type SelfLocation = SelfLocation;&#xD;&#xA;	type XcmExecutor = XcmExecutor&lt;XcmConfig&gt;;&#xD;&#xA;	type Weigher = FixedWeightBounds&lt;UnitWeightCost, Call, MaxInstructions&gt;;&#xD;&#xA;	type BaseXcmWeight = BaseXcmWeight;&#xD;&#xA;	type LocationInverter = LocationInverter&lt;Ancestry&gt;;&#xD;&#xA;	type MaxAssetsForTransfer = MaxAssetsForTransfer;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_type_with_key! {&#xD;&#xA;	pub ExistentialDeposits: |currency_id: CurrencyId| -&gt; Balance {&#xD;&#xA;		match currency_id {&#xD;&#xA;			_ =&gt; 0,&#xD;&#xA;		}&#xD;&#xA;	};&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub ORMLMaxLocks: u32 = 2;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl orml_tokens::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Balance = Balance;&#xD;&#xA;	type Amount = Amount;&#xD;&#xA;	type CurrencyId = CurrencyId;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type ExistentialDeposits = ExistentialDeposits;&#xD;&#xA;	type OnDust = ();&#xD;&#xA;	type MaxLocks = ORMLMaxLocks;&#xD;&#xA;	type DustRemovalWhitelist = Nothing;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl orml_xcm::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type SovereignOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GrGac.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1849" PostHistoryTypeId="24" PostId="481" RevisionGUID="b08619b3-d002-492b-9516-fc260969df2e" CreationDate="2022-02-26T17:50:19.930" Comment="Proposed by 2 approved by 94, 452 edit id of 69" ContentLicense="CC BY-SA 4.0" />
  <row Id="1853" PostHistoryTypeId="2" PostId="516" RevisionGUID="396999cf-9c82-4b4f-8d03-b21ccd881cb2" CreationDate="2022-02-26T19:53:27.670" UserId="332" Text="When I add [BitcoinDevKit](https://docs.rs/bdk/latest/bdk/index.html) as a dependency to the pallet-template, I get compilation errors within the `socks` crate that I don't get when compiling BDK standalone. It seems that BDK supports compilation to WASM, but I am not sure. &#xD;&#xA;&#xD;&#xA;Is it possible to use BDK functionality within a pallet? How can I satisfy these compilation errors? &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error[E0599]: no method named `writev` found for struct `UdpSocket` in the current scope&#xD;&#xA;     --&gt; /home/max/.cargo/registry/src/github.com-1ecc6299db9ec823/socks-0.3.4/src/v5.rs:391:21&#xD;&#xA;      |&#xD;&#xA;  391 |         self.socket.writev([&amp;header[..len + 3], buf])&#xD;&#xA;      |                     ^^^^^^ method not found in `UdpSocket`&#xD;&#xA;      |&#xD;&#xA;      = help: items from traits can only be used if the trait is implemented and in scope&#xD;&#xA;  note: `WritevExt` defines an item `writev`, perhaps you need to implement it&#xD;&#xA;     --&gt; /home/max/.cargo/registry/src/github.com-1ecc6299db9ec823/socks-0.3.4/src/writev.rs:4:1&#xD;&#xA;      |&#xD;&#xA;  4   | pub trait WritevExt {&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1855" PostHistoryTypeId="1" PostId="516" RevisionGUID="396999cf-9c82-4b4f-8d03-b21ccd881cb2" CreationDate="2022-02-26T19:53:27.670" UserId="332" Text="Using BitcoinDevKit as a pallet dependency" ContentLicense="CC BY-SA 4.0" />
  <row Id="1856" PostHistoryTypeId="3" PostId="516" RevisionGUID="396999cf-9c82-4b4f-8d03-b21ccd881cb2" CreationDate="2022-02-26T19:53:27.670" UserId="332" Text="|pallet|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1857" PostHistoryTypeId="2" PostId="517" RevisionGUID="967a36d7-8bbc-44cb-bfb7-e42c59240b75" CreationDate="2022-02-26T20:38:28.640" UserId="245" Text="I'm trying to create a pallet that handles extrinsic and also runtime-api for the RPC endpoints. Since I plan to query storage items with RPC, I've created primitives for my pallet to use within my pallet and RPC.&#xD;&#xA;&#xD;&#xA;I've taken a look at the [Beefy Pallet][2] and its [primitives][1]. I've implemented the code for my use case but got a bunch of errors about encodes and decodes.&#xD;&#xA;&#xD;&#xA;I see that Beefy doesn't implement the traits specified in the error messages. Do I have to implement those? What causes these errors?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// ./profile/common/src/lib.rs&#xD;&#xA;&#xD;&#xA;#[derive(Decode, Encode, Debug, PartialEq, Clone, TypeInfo)]&#xD;&#xA;pub struct About&lt;Hash&gt; {&#xD;&#xA;	pub option_one: Option&lt;Vec&lt;u8&gt;&gt;,&#xD;&#xA;	pub option_two: Hash,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// ./profile/src/lib.rs&#xD;&#xA;&#xD;&#xA;use pallet_profile_primitives::About;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn validator_set_id)]&#xD;&#xA;pub(super) type ValidatorSetId&lt;T: Config&gt; = StorageValue&lt;_, About&lt;T::Hash&gt;, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `About: WrapperTypeDecode` is not satisfied&#xD;&#xA;  --&gt; pallets/estatetial/profile/src/lib.rs:27:12&#xD;&#xA;   |&#xD;&#xA;27 |     #[pallet::pallet]&#xD;&#xA;   |               ^^^^^^ the trait `WrapperTypeDecode` is not implemented for `About`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `Decode` for `About`&#xD;&#xA;   = note: required because of the requirements on the impl of `FullCodec` for `About`&#xD;&#xA;   = note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue&lt;_GeneratedPrefixForStorageValidatorSetId&lt;T&gt;, About&lt;&lt;T as frame_system::Config&gt;::Hash&gt;&gt;`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `About: EncodeLike` is not satisfied&#xD;&#xA;  --&gt; pallets/estatetial/profile/src/lib.rs:27:12&#xD;&#xA;   |&#xD;&#xA;27 |     #[pallet::pallet]&#xD;&#xA;   |               ^^^^^^ the trait `EncodeLike` is not implemented for `About`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `FullEncode` for `About`&#xD;&#xA;   = note: required because of the requirements on the impl of `FullCodec` for `About`&#xD;&#xA;   = note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue&lt;_GeneratedPrefixForStorageValidatorSetId&lt;T&gt;, About&lt;&lt;T as frame_system::Config&gt;::Hash&gt;&gt;`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `About: WrapperTypeEncode` is not satisfied&#xD;&#xA;  --&gt; pallets/estatetial/profile/src/lib.rs:27:12&#xD;&#xA;   |&#xD;&#xA;27 |     #[pallet::pallet]&#xD;&#xA;   |               ^^^^^^ the trait `WrapperTypeEncode` is not implemented for `About`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `Encode` for `About`&#xD;&#xA;   = note: required because of the requirements on the impl of `FullEncode` for `About`&#xD;&#xA;   = note: required because of the requirements on the impl of `FullCodec` for `About`&#xD;&#xA;   = note: required because of the requirements on the impl of `PartialStorageInfoTrait` for `frame_support::pallet_prelude::StorageValue&lt;_GeneratedPrefixForStorageValidatorSetId&lt;T&gt;, About&lt;&lt;T as frame_system::Config&gt;::Hash&gt;&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/primitives/beefy/src/lib.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/beefy/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="1859" PostHistoryTypeId="1" PostId="517" RevisionGUID="967a36d7-8bbc-44cb-bfb7-e42c59240b75" CreationDate="2022-02-26T20:38:28.640" UserId="245" Text="How to create and use custom primitives for Runtime API and Pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1860" PostHistoryTypeId="3" PostId="517" RevisionGUID="967a36d7-8bbc-44cb-bfb7-e42c59240b75" CreationDate="2022-02-26T20:38:28.640" UserId="245" Text="|struct|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1861" PostHistoryTypeId="2" PostId="518" RevisionGUID="c9f53498-c4c0-4385-ac26-1fc891d17cd8" CreationDate="2022-02-26T22:36:49.953" UserId="512" Text="I keep seeing this everywhere. PoVBlock, etc. Can someone share what it stands for and maybe include a link where we can learn more?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1863" PostHistoryTypeId="1" PostId="518" RevisionGUID="c9f53498-c4c0-4385-ac26-1fc891d17cd8" CreationDate="2022-02-26T22:36:49.953" UserId="512" Text="What does PoV stand for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1864" PostHistoryTypeId="3" PostId="518" RevisionGUID="c9f53498-c4c0-4385-ac26-1fc891d17cd8" CreationDate="2022-02-26T22:36:49.953" UserId="512" Text="|pov|povblock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1865" PostHistoryTypeId="2" PostId="519" RevisionGUID="dd09934b-9a1c-4b95-875b-475e7bb60ddf" CreationDate="2022-02-27T01:09:31.277" UserId="28" Text="PoV stands for Proof-Of-Validity.&#xD;&#xA;&#xD;&#xA;This is a specific concept in the parachains protocol which allows validators on Polkadot to execute and verify blocks on the relay chain, which ultimately provides the shared security that Polkadot advertises.&#xD;&#xA;&#xD;&#xA;At a high level, for the relay chain to execute a parachain block, it needs:&#xD;&#xA;&#xD;&#xA;* The parachain block, which contains the extrinsics.&#xD;&#xA;* The state transition function, which is the Wasm runtime.&#xD;&#xA;* The relevant state which is read to complete the extrinsics.&#xD;&#xA;&#xD;&#xA;The PoV is that last bullet point. Basically, the parachain collator will have the entire current state of the chain, and when it produces a new block, it will capture the relevant subset of the state and send it to the relay chain so that it can do it's job and fully execute the block. This is possible because we use a merkle trie, and thus do not need the full state in order to verify the state transition, just the relevant nodes which can be used to recompute the new state root.&#xD;&#xA;&#xD;&#xA;The PoV has a maximum limit for parachain blocks. On Polkadot it is currently configured to 5 MB so that there a limits to how long it could take to gossip that information to the relevant Polkadot validators. This is of relevance since this limit can be reached quite quickly depending on the operations your node is doing, and thus limit the number of transaction you can include in a single parachain block.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1867" PostHistoryTypeId="5" PostId="519" RevisionGUID="51893a69-0d70-43dc-b469-2548aa0e684b" CreationDate="2022-02-27T01:19:36.937" UserId="28" Comment="added 2 characters in body" Text="PoV stands for Proof-Of-Validity.&#xD;&#xA;&#xD;&#xA;This is a specific concept in the parachains protocol which allows validators on Polkadot to execute and verify blocks on the relay chain, which ultimately provides the shared security that Polkadot advertises.&#xD;&#xA;&#xD;&#xA;At a high level, for the relay chain to execute a parachain block, it needs:&#xD;&#xA;&#xD;&#xA;* The parachain block, which contains the extrinsics.&#xD;&#xA;* The state transition function, which is the Wasm runtime.&#xD;&#xA;* The relevant state which is read to complete the extrinsics.&#xD;&#xA;&#xD;&#xA;The PoV is that last bullet point. Basically, the parachain collator will have the entire current state of the chain, and when it produces a new block, it will capture the relevant subset of the state and send it to the relay chain so that it can do it's job and fully execute the block. This is possible because we use a merkle trie, and thus do not need the full state in order to verify the state transition, just the relevant nodes which can be used to recompute the new state root.&#xD;&#xA;&#xD;&#xA;The PoV has a maximum limit for parachain blocks. On Polkadot it is currently configured to 5 MB so that there are limits to how long it could take to gossip that information to the relevant Polkadot validators. This is of relevance since this limit can be reached quite quickly depending on the operations your node is doing, and thus limit the number of transaction you can include in a single parachain block.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1868" PostHistoryTypeId="2" PostId="520" RevisionGUID="8c506f9b-80d6-4cf3-9bdf-44faffe337ba" CreationDate="2022-02-27T12:09:37.580" UserId="286" Text="I'm trying to use the parent block hash in my code, but I having trouble getting the raw numeric values.  I can see that `&lt;frame_system::Pallet&lt;T&gt;&gt;::parent_hash()` returns the values inside an associated type, but I want the [u8; 32] data block inside it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let parent_hash : [u8; 32] = &lt;frame_system::Pallet&lt;T&gt;&gt;::parent_hash().try_into().unwrap();&#xD;&#xA;```&#xD;&#xA;which gives me:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `[u8; 32]: std::convert::From&lt;&lt;T as frame_system::Config&gt;::Hash&gt;` is not satisfied&#xD;&#xA;    |&#xD;&#xA;447 |             let parent_hash : [u8; 32] = &lt;frame_system::Pallet&lt;T&gt;&gt;::parent_hash().try_into().unwrap();&#xD;&#xA;    |                                                                                   ^^^^^^^^ the trait `std::convert::From&lt;&lt;T as frame_system::Config&gt;::Hash&gt;` is not implemented for `[u8; 32]`&#xD;&#xA;    |&#xD;&#xA;    = note: required because of the requirements on the impl of `Into&lt;[u8; 32]&gt;` for `&lt;T as frame_system::Config&gt;::Hash`&#xD;&#xA;    = note: required because of the requirements on the impl of `TryFrom&lt;&lt;T as frame_system::Config&gt;::Hash&gt;` for `[u8; 32]`&#xD;&#xA;    = note: required because of the requirements on the impl of `std::convert::TryInto&lt;[u8; 32]&gt;` for `&lt;T as frame_system::Config&gt;::Hash`&#xD;&#xA;help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement&#xD;&#xA;    |&#xD;&#xA;53  | impl&lt;T: Config&gt; Pallet&lt;T&gt; where [u8; 32]: std::convert::From&lt;&lt;T as frame_system::Config&gt;::Hash&gt; {&#xD;&#xA;    |                           +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And this:&#xD;&#xA;```&#xD;&#xA;let parent_hash : [u8; 32] = &lt;frame_system::Pallet&lt;T&gt;&gt;::parent_hash() as [u8; 32];&#xD;&#xA;```&#xD;&#xA;which gives:&#xD;&#xA;```&#xD;&#xA;error[E0605]: non-primitive cast: `&lt;T as frame_system::Config&gt;::Hash` as `[u8; 32]`&#xD;&#xA;    |&#xD;&#xA;447 |             let parent_hash : [u8; 32] = &lt;frame_system::Pallet&lt;T&gt;&gt;::parent_hash() as [u8; 32];&#xD;&#xA;    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object&#xD;&#xA;```&#xD;&#xA;What's the correct way to do this, please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1870" PostHistoryTypeId="1" PostId="520" RevisionGUID="8c506f9b-80d6-4cf3-9bdf-44faffe337ba" CreationDate="2022-02-27T12:09:37.580" UserId="286" Text="Using parent hash in a pallet - can't get the raw values from the associated type" ContentLicense="CC BY-SA 4.0" />
  <row Id="1871" PostHistoryTypeId="3" PostId="520" RevisionGUID="8c506f9b-80d6-4cf3-9bdf-44faffe337ba" CreationDate="2022-02-27T12:09:37.580" UserId="286" Text="|convert|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1872" PostHistoryTypeId="2" PostId="521" RevisionGUID="dc06b0b6-1e6d-4963-bf5b-9f9a5e6bece9" CreationDate="2022-02-27T12:45:54.667" UserId="452" Text="There is no guarantee that the `Hash` type for a particular chain will be 32 bytes, just because it may be for your specific runtime that type is generic. [These](https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L251-L266) are the only assumptions you can make about the `Hash` type. Alternatively you can convert it to a slice of bytes like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let parent_hash: &amp;[u8] = &lt;frame_system::Pallet&lt;T&gt;&gt;::parent_hash().as_ref();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1874" PostHistoryTypeId="2" PostId="522" RevisionGUID="545835e6-bdfa-46d9-8242-f0848599b2b9" CreationDate="2022-02-27T12:53:10.323" UserId="452" Text="I don't know about `bdk` so can't provide specific info regarding it. Only libraries that allow compiling under `no_std` are supported to be used in the runtime. The fact that this is trying to compile sockets clearly shows that this is not the case (you can't do system calls from the runtime).&#xD;&#xA;&#xD;&#xA;Here's an issue on their repo for this: https://github.com/bitcoindevkit/bdk/issues/205" ContentLicense="CC BY-SA 4.0" />
  <row Id="1876" PostHistoryTypeId="2" PostId="523" RevisionGUID="f74b4953-c684-424d-b56f-06e5bd414835" CreationDate="2022-02-27T16:11:29.647" UserId="213" Text="I am trying to generate random number using the [tutorial][1]:&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {		&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;		type RandomnessSource: Randomness&lt;Self::Hash, Self::BlockNumber&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn get_and_increment_nonce() -&gt; Vec&lt;u8&gt; {&#xD;&#xA;			let nonce = &lt;Nonce&lt;T&gt;&gt;::get();&#xD;&#xA;			&lt;Nonce&lt;T&gt;&gt;::put(nonce.wrapping_add(1));&#xD;&#xA;			nonce.encode()&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;     &#xD;&#xA;    for _ in draws_in_round..end_index {&#xD;&#xA;        let nonce = Self::get_and_increment_nonce();&#xD;&#xA;	    let random_seed = T::RandomnessSource::random(&amp;nonce).encode();&#xD;&#xA;	    let random_number = u64::decode(&amp;mut random_seed.as_ref())&#xD;&#xA;					.expect(&quot;secure hashes should always be bigger than u64; qed&quot;);&#xD;&#xA;	     println!(&quot;random_number, {:?}&quot;, random_number);&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I don't get random number when I run the tests. I get   &#xD;&#xA;random_number, 0  &#xD;&#xA;random_number, 1  &#xD;&#xA;random_number, 2  &#xD;&#xA;random_number, 3  &#xD;&#xA;random_number, 4  &#xD;&#xA;&#xD;&#xA;How to generate u64 random numbers?. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/how-to-guides/v3/pallet-design/randomness/" ContentLicense="CC BY-SA 4.0" />
  <row Id="1878" PostHistoryTypeId="1" PostId="523" RevisionGUID="f74b4953-c684-424d-b56f-06e5bd414835" CreationDate="2022-02-27T16:11:29.647" UserId="213" Text="Test is not generating random number" ContentLicense="CC BY-SA 4.0" />
  <row Id="1879" PostHistoryTypeId="3" PostId="523" RevisionGUID="f74b4953-c684-424d-b56f-06e5bd414835" CreationDate="2022-02-27T16:11:29.647" UserId="213" Text="|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1880" PostHistoryTypeId="2" PostId="524" RevisionGUID="1af861aa-4b52-4bf3-989a-a9b293c27ded" CreationDate="2022-02-27T17:21:52.850" UserId="129" Text="I'm trying to call a smart contract using the Polkadot JS API ([like here][1]). The contract function is really simple, it takes 2 strings: a key and a value as input parameters, then adds the key, value to a hashmap in the contract storage. I can call it normally in the PolkadotJs UI, but when try using the PolkadotJs Javascript API I got this error message:&#xD;&#xA;```2022-02-28 00:12:01        RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1010: Invalid Transaction: Transaction would exhaust the block limits&#xD;&#xA;2022-02-28 00:12:01             DRR: 1010: Invalid Transaction: Transaction would exhaust the block limits&#xD;&#xA;Error: 1010: Invalid Transaction: Transaction would exhaust the block limits&#xD;&#xA;    at RpcCoder._checkError (/home/minhnd/node_modules/@polkadot/rpc-provider/coder/index.cjs:84:13)&#xD;&#xA;    at RpcCoder.decodeResponse (/home/minhnd/node_modules/@polkadot/rpc-provider/coder/index.cjs:47:10)&#xD;&#xA;    at WsProvider.value (/home/minhnd/node_modules/@polkadot/rpc-provider/ws/index.cjs:267:90)&#xD;&#xA;    at W3CWebSocket.value [as onmessage] (/home/minhnd/node_modules/@polkadot/rpc-provider/ws/index.cjs:247:153)&#xD;&#xA;    at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/minhnd/node_modules/yaeti/lib/EventTarget.js:107:17)&#xD;&#xA;    at W3CWebSocket.onMessage (/home/minhnd/node_modules/websocket/lib/W3CWebSocket.js:234:14)&#xD;&#xA;    at WebSocketConnection.&lt;anonymous&gt; (/home/minhnd/node_modules/websocket/lib/W3CWebSocket.js:205:19)&#xD;&#xA;    at WebSocketConnection.emit (node:events:520:28)&#xD;&#xA;    at WebSocketConnection.processFrame (/home/minhnd/node_modules/websocket/lib/WebSocketConnection.js:554:26)&#xD;&#xA;    at /home/minhnd/node_modules/websocket/lib/WebSocketConnection.js:323:40&#xD;&#xA;2022-02-28 00:12:01        RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1010: Invalid Transaction: Transaction would exhaust the block limits&#xD;&#xA;```&#xD;&#xA;This is my code:&#xD;&#xA;```&#xD;&#xA;// Required imports&#xD;&#xA;const { ApiPromise, WsProvider } = require(&quot;@polkadot/api&quot;);&#xD;&#xA;const { ContractPromise } = require(&quot;@polkadot/api-contract&quot;);&#xD;&#xA;const { keyring } = require(&quot;@polkadot/ui-keyring&quot;);&#xD;&#xA;keyring.loadAll({ ss58Format: 42, type: &quot;sr25519&quot; });&#xD;&#xA;&#xD;&#xA;const abi = require(&quot;./freshdi_metadata.json&quot;);&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;    const provider = new WsProvider(&quot;ws://127.0.0.1:9944&quot;);&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;    const contractAddress = &quot;5CbqJvv4VXFNsoK6nj95jD3ajopgJmrB5XP2vXHCvMekxqC6&quot;;&#xD;&#xA;    const contract = new ContractPromise(api, abi, contractAddress);&#xD;&#xA;&#xD;&#xA;    const alicePair = keyring.createFromUri(&quot;//Alice&quot;);&#xD;&#xA;&#xD;&#xA;    const value = 0;&#xD;&#xA;    const gasLimit = 5 * 1000000000000;&#xD;&#xA;&#xD;&#xA;    await contract.tx&#xD;&#xA;        .insertAction({ value, gasLimit }, &quot;key_str&quot;,&quot;value_str&quot;)&#xD;&#xA;        .signAndSend(alicePair, (result) =&gt; {&#xD;&#xA;            if (result.status.isInBlock) {&#xD;&#xA;                console.log(&quot;in a block&quot;);&#xD;&#xA;            } else if (result.status.isFinalized) {&#xD;&#xA;                console.log(&quot;finalized&quot;);&#xD;&#xA;            }&#xD;&#xA;        });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main()&#xD;&#xA;    .catch(console.error)&#xD;&#xA;    .finally(() =&gt; process.exit());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api-contract/start/contract.tx" ContentLicense="CC BY-SA 4.0" />
  <row Id="1882" PostHistoryTypeId="1" PostId="524" RevisionGUID="1af861aa-4b52-4bf3-989a-a9b293c27ded" CreationDate="2022-02-27T17:21:52.850" UserId="129" Text="Transaction would exhaust the block limits error when calling a smart contract from Polkadot JS API" ContentLicense="CC BY-SA 4.0" />
  <row Id="1883" PostHistoryTypeId="3" PostId="524" RevisionGUID="1af861aa-4b52-4bf3-989a-a9b293c27ded" CreationDate="2022-02-27T17:21:52.850" UserId="129" Text="|smart-contract|javascript|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1884" PostHistoryTypeId="5" PostId="213" RevisionGUID="a2eb6a10-9bb1-4ba4-bdb1-b7de4eba3b11" CreationDate="2022-02-27T20:02:55.570" UserId="28" Comment="added 1 character in body" Text="As @bkchr pointed out, you want to use a `BaseCallFilter` which is configured inside of your runtime for the `frame_system` Pallet.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Use this filter to block users from calling any functions in the Balances pallet.&#xD;&#xA;pub struct DontAllowBalances;&#xD;&#xA;impl Contains&lt;Call&gt; for DontAllowBalances {&#xD;&#xA;	fn contains(c: &amp;Call) -&gt; bool {&#xD;&#xA;        // This will match against any call from the Balances pallet.&#xD;&#xA;		!matches!(c, Call::Balances(..))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you configure your System pallet to use this filter:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;	type BaseCallFilter = DontAllowBalances;&#xD;&#xA;    // -- snip --&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This works for any pallet or call, and is how Polkadot and other chains disabled transfers or other kinds of calls in the bootstrapping stages of the network.&#xD;&#xA;&#xD;&#xA;See this PR which is the one which enabled balance transfers on Polkadot and uses this same feature: https://github.com/paritytech/polkadot/pull/1443" ContentLicense="CC BY-SA 4.0" />
  <row Id="1885" PostHistoryTypeId="2" PostId="525" RevisionGUID="5952ab46-a262-4b6a-9ea7-b75f85767580" CreationDate="2022-02-27T20:16:59.033" UserId="94" Text="1. How expensive are storage reads and writes?  &#xD;&#xA;2. Does the cost depend on the size of the item? " ContentLicense="CC BY-SA 4.0" />
  <row Id="1887" PostHistoryTypeId="1" PostId="525" RevisionGUID="5952ab46-a262-4b6a-9ea7-b75f85767580" CreationDate="2022-02-27T20:16:59.033" UserId="94" Text="How expensive is it to access storage items?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1888" PostHistoryTypeId="3" PostId="525" RevisionGUID="5952ab46-a262-4b6a-9ea7-b75f85767580" CreationDate="2022-02-27T20:16:59.033" UserId="94" Text="|storage|weight|database|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1889" PostHistoryTypeId="2" PostId="526" RevisionGUID="0dd2858f-3d58-4086-8bb4-80697381043b" CreationDate="2022-02-27T20:16:59.033" UserId="94" Text="Substrate itself is not concerned with *Cost* but with *Weight*.  &#xD;&#xA;How *Weight* is translated to *Cost* depends on the specific chain.  &#xD;&#xA;*Weight* is the time to complete a specific task. &#xD;&#xA;This will be updated to a multivariate struct [here](https://github.com/paritytech/substrate/pull/10918), for now its just time.&#xD;&#xA;&#xD;&#xA;&gt; How expensive are storage reads and writes?  &#xD;&#xA;&#xD;&#xA;The *Weight* of one storage read/write is a constant in Substrate.  &#xD;&#xA;Currently the values are set to **Read: 25 µs** and **Write: 100 µs**, [here](https://github.com/paritytech/substrate/blob/970ee8034874ceb10f52491958383ec56e6a793c/frame/support/src/weights.rs#L175) and [here](https://github.com/paritytech/substrate/blob/970ee8034874ceb10f52491958383ec56e6a793c/frame/support/src/weights/rocksdb_weights.rs#L28).  &#xD;&#xA;A Substrate chain (like Polkadot) can use these **or custom values instead**.  &#xD;&#xA;We want to give Substrate developers [the tools](https://github.com/paritytech/substrate/pull/10897) to calculate their own values in the future.  &#xD;&#xA;This way they are not reliant on hard-coded values and get more precise results.&#xD;&#xA;&#xD;&#xA;&gt; Does the cost depend on the size of the item?&#xD;&#xA;&#xD;&#xA;No. These constants are not multiplied with the size of the accessed items.  &#xD;&#xA;This will soon change but for now these constants are used as approximation.  &#xD;&#xA;Now you ask how small values can be as fast as large values, let's analyze Polkadot as example.&#xD;&#xA;&#xD;&#xA;# Storage Weights in Polkadot&#xD;&#xA;&#xD;&#xA;Here is a graphic how the storage read/write times look on Polkadot at Block 9091874.  &#xD;&#xA;The top part shows how many values per size exist; **most values are 80 Byte**.  &#xD;&#xA;In the bottom graphic you see the time it took for each value size to be read and written.  &#xD;&#xA;The black lines are the average +25%, which produces nearly the constants that are currently used.  &#xD;&#xA;&#xD;&#xA;| RocksDB DOT#9091874&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Same but with lower Alpha |&#xD;&#xA;| -------------- | -------------- |&#xD;&#xA;| [![RocksDB DOT#9091874][1]][1] | [![RocksDB DOT#9091874][2]][2] |&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The outliers to the top right (very large and slow) are currently ignored, since they are only accessed very rarely.  &#xD;&#xA;In the future we want to make the *Weight* dependent on the value size to have more customizable results.&#xD;&#xA;&#xD;&#xA;## Conclusion&#xD;&#xA;&#xD;&#xA;For Polkadot these constants are fine since most values are 80 Byte and small values indeed have a constant access time.  &#xD;&#xA;We are currently introducing tooling to calculate *Weights* for any Substrate chain to remove such assumptions.  &#xD;&#xA;This way it will be possible to have correct and generally applicable *Weights*.&#xD;&#xA;&#xD;&#xA;# The underlying Database&#xD;&#xA;&#xD;&#xA;An interesting observation in the graphics above is that small values seem to have constant access time.  &#xD;&#xA;Let's look at how the underlying DB performs on its own:  &#xD;&#xA;&#xD;&#xA;| RocksDB Read 8-32 KiB | RocksDB Read 0-64 KiB |&#xD;&#xA;|-|-|&#xD;&#xA;|[![RocksDB Read jump @14600][3]][3]|[![RocksDB Read jump @14600][4]][4]|&#xD;&#xA;&#xD;&#xA;It seems **tightly clustered for small values** and makes a jump at ~14,600 Byte.  &#xD;&#xA;Up or down, depending maybe on total DB size or value size distribution, I don't know.  &#xD;&#xA;RocksDB is difficult to analyze like this, since it does not seem to behave very deterministic in my lab settings.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I assume they chunk the data and small pieces which fit in one chunk all have the same performance.  &#xD;&#xA;ParityDB for example does this in a more predictable way.  &#xD;&#xA;It puts data up to 32KiB in its own chunk while larger values are split up into 4KiB chunks.&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;This shows a 100% jump and a clear 4KiB &quot;staircase&quot; at 32KiB for ParityDB.  &#xD;&#xA;RocksDB is linear in this range. &#xD;&#xA;&#xD;&#xA;That the underlying Database influences the timing so much is another reason to make the *Weights* more customizable.  &#xD;&#xA;The tracking issue for this is [Substrate/10921](https://github.com/paritytech/substrate/issues/10921).&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hPQJl.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/3tdXq.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/QzKwY.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/Eewwt.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/yTBcS.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1891" PostHistoryTypeId="5" PostId="316" RevisionGUID="4b02f99a-24ae-41eb-ad10-4a5d4ddd1620" CreationDate="2022-02-27T20:36:38.197" UserId="94" Comment="Added sr25519 ctx" Text="Substrate provides a [Verify](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.Verify.html) and an [IdentifyAccount](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.IdentifyAccount.html) trait.  &#xD;&#xA;They work with any signature scheme since they are just traits and can be implemented for different crypto schemata.  &#xD;&#xA;This is very helpful when implementing off-chain protocols like Channels, Plasmas, Rollups etc.&#xD;&#xA;&#xD;&#xA;The `Config` trait of your pallet needs to be extended to support it:  &#xD;&#xA;```rust&#xD;&#xA;/// A Signature can be verified with a specific `PublicKey`.&#xD;&#xA;/// The additional traits are boilerplate.&#xD;&#xA;type Signature: Verify&lt;Signer = Self::PublicKey&gt; + Encode + Decode + Member;&#xD;&#xA;&#xD;&#xA;/// A PublicKey can be converted into an `AccountId`. This is required by the&#xD;&#xA;/// `Signature` type.&#xD;&#xA;/// The additional traits are boilerplate.&#xD;&#xA;type PublicKey: IdentifyAccount&lt;AccountId = Self::PublicKey&gt; + Encode + Decode + Member;&#xD;&#xA;```&#xD;&#xA;This makes it possible to verify signatures within the pallet.  &#xD;&#xA;Using it in an Extrinsic looks like this:  &#xD;&#xA;```rust&#xD;&#xA;fn my_verify(_: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: T::Signature, from: T::PublicKey)&#xD;&#xA;{&#xD;&#xA;    let ok = sig.verify(&amp;data, &amp;from);&#xD;&#xA;    // `ok` is a bool. Use in an `if` or `ensure!`.&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On the runtime side you can then inject the *concrete* crypto implementation that you want:  &#xD;&#xA;```rust&#xD;&#xA;type Signature = sp_core::ecdsa::Signature;&#xD;&#xA;type PublicKey = sp_core::ecdsa::PublicKey;&#xD;&#xA;```&#xD;&#xA;Available are `ecdsa`, `sr25519` and `ed25519` all from [sp_core](https://docs.rs/sp-core/latest/sp_core/).  &#xD;&#xA;The Merline signing context for `sr25519` is `b&quot;substrate&quot;` as defined [here](https://github.com/paritytech/substrate/blob/bfc6fb4a95adccf96dadbe5e5e6bb8605d5a2c01/primitives/core/src/sr25519.rs#L61)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1893" PostHistoryTypeId="6" PostId="517" RevisionGUID="4348d6a3-f9d6-47f7-8e16-3eb48b6f91ce" CreationDate="2022-02-27T21:53:32.650" UserId="245" Comment="edited tags" Text="|substrate-node|struct|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1894" PostHistoryTypeId="2" PostId="527" RevisionGUID="6ace75ed-c338-4575-9cd7-893b11098312" CreationDate="2022-02-28T03:14:32.750" UserId="223" Text="I have noticed the entropy for system public key generation is prefixed with patterns like `modlpy/proxy____`.&#xD;&#xA;&#xD;&#xA;1) Is there a documented standard for the length or format of these prefixes?&#xD;&#xA;2) What is the purpose of the trailing underscores?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1896" PostHistoryTypeId="1" PostId="527" RevisionGUID="6ace75ed-c338-4575-9cd7-893b11098312" CreationDate="2022-02-28T03:14:32.750" UserId="223" Text="Is there a standard for generating system public keys?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1897" PostHistoryTypeId="3" PostId="527" RevisionGUID="6ace75ed-c338-4575-9cd7-893b11098312" CreationDate="2022-02-28T03:14:32.750" UserId="223" Text="|runtime|public|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1898" PostHistoryTypeId="2" PostId="528" RevisionGUID="ff6198ba-1739-4d6b-9b2e-fb6c98d815ba" CreationDate="2022-02-28T03:23:11.733" UserId="28" Text="Everything in the line you are referring to gets hashed:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let entropy = (b&quot;modlpy/proxy____&quot;, who, height, ext_index, proxy_type, index)&#xD;&#xA;	.using_encoded(blake2_256);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So there is no difference here what prefix is used. Just something unique enough that it is unlikely to be duplicated somewhere else by accident.&#xD;&#xA;&#xD;&#xA;For other instances of `struct PalletId`, this is specifically defined as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// A pallet identifier. These are per pallet and should be stored in a registry somewhere.&#xD;&#xA;#[derive(Clone, Copy, Eq, PartialEq, Encode, Decode, TypeInfo)]&#xD;&#xA;pub struct PalletId(pub [u8; 8]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So you will find in another places, this is specifically truncated or extended to 8 characters.&#xD;&#xA;&#xD;&#xA;I have no context as to why this struct and pattern was not used here." ContentLicense="CC BY-SA 4.0" />
  <row Id="1900" PostHistoryTypeId="2" PostId="529" RevisionGUID="fc035420-b182-4c72-9e59-03e9ab289948" CreationDate="2022-02-28T03:45:46.847" UserId="515" Text="I got this error when building the whole project 'cargo build --release'. But build package works fine 'cargo build -p pallet-template'&#xD;&#xA;```&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /Users/stefan_muto/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.3/src/lib.rs:219:9&#xD;&#xA;      |&#xD;&#xA;  219 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  220 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  221 | |                         For more information see: \&#xD;&#xA;  222 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1902" PostHistoryTypeId="1" PostId="529" RevisionGUID="fc035420-b182-4c72-9e59-03e9ab289948" CreationDate="2022-02-28T03:45:46.847" UserId="515" Text="failed to resolve: use of undeclared crate or module `imp`" ContentLicense="CC BY-SA 4.0" />
  <row Id="1903" PostHistoryTypeId="3" PostId="529" RevisionGUID="fc035420-b182-4c72-9e59-03e9ab289948" CreationDate="2022-02-28T03:45:46.847" UserId="515" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1904" PostHistoryTypeId="2" PostId="530" RevisionGUID="6c01abb2-07d6-4581-ad27-b80ca07fbf8f" CreationDate="2022-02-28T04:01:49.377" UserId="129" Text="I deploy the flipper contract to Jupiter testnet, when I try to get the contract data, I got this error message although it works just fine on a local node. (I also tested on other test networks and the error persists)&#xD;&#xA;```&#xD;&#xA;2022-02-28 10:53:34        METADATA: Unknown types found, no types for AuthorityState&#xD;&#xA;2022-02-28 10:53:34        RPC-CORE: call(callRequest: ContractCallRequest, at?: BlockHash): ContractExecResult:: -32602: Invalid params: unknown field `storageDepositLimit`, expected one of `origin`, `dest`, `value`, `gasLimit`, `inputData`.&#xD;&#xA;Error: -32602: Invalid params: unknown field `storageDepositLimit`, expected one of `origin`, `dest`, `value`, `gasLimit`, `inputData`.&#xD;&#xA;    at RpcCoder._checkError (/home/minhnd/node_modules/@polkadot/rpc-provider/coder/index.cjs:84:13)&#xD;&#xA;    at RpcCoder.decodeResponse (/home/minhnd/node_modules/@polkadot/rpc-provider/coder/index.cjs:47:10)&#xD;&#xA;    at WsProvider.value (/home/minhnd/node_modules/@polkadot/rpc-provider/ws/index.cjs:267:90)&#xD;&#xA;    at W3CWebSocket.value [as onmessage] (/home/minhnd/node_modules/@polkadot/rpc-provider/ws/index.cjs:247:153)&#xD;&#xA;    at W3CWebSocket._dispatchEvent [as dispatchEvent] (/home/minhnd/node_modules/yaeti/lib/EventTarget.js:107:17)&#xD;&#xA;    at W3CWebSocket.onMessage (/home/minhnd/node_modules/websocket/lib/W3CWebSocket.js:234:14)&#xD;&#xA;    at WebSocketConnection.&lt;anonymous&gt; (/home/minhnd/node_modules/websocket/lib/W3CWebSocket.js:205:19)&#xD;&#xA;    at WebSocketConnection.emit (node:events:520:28)&#xD;&#xA;    at WebSocketConnection.processFrame (/home/minhnd/node_modules/websocket/lib/WebSocketConnection.js:554:26)&#xD;&#xA;    at /home/minhnd/node_modules/websocket/lib/WebSocketConnection.js:323:40&#xD;&#xA;```&#xD;&#xA;This is the code file I use to call the contracts:&#xD;&#xA;```// Required imports&#xD;&#xA;const { ApiPromise, WsProvider } = require(&quot;@polkadot/api&quot;);&#xD;&#xA;const { ContractPromise } = require(&quot;@polkadot/api-contract&quot;);&#xD;&#xA;const { keyring } = require(&quot;@polkadot/ui-keyring&quot;);&#xD;&#xA;keyring.loadAll({ ss58Format: 42, type: &quot;sr25519&quot; });&#xD;&#xA;&#xD;&#xA;const abi = require(&quot;./freshdi_metadata.json&quot;);&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://ws.jupiter-poa.patract.cn/&quot;);&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;    const contractAddress = &quot;kabwymmUkz77bD9VHPbugxv75mLHqw8hR8eLhyXFxnmKU8Z&quot;;&#xD;&#xA;    const contract = new ContractPromise(api, abi, contractAddress);&#xD;&#xA;&#xD;&#xA;    const newPair = keyring.createFromUri(&quot;my secret phrase&quot;)&#xD;&#xA;    const value = 0;&#xD;&#xA;    const gasLimit = 5000000000000;&#xD;&#xA;    const { gasConsumed, result, output } = await contract.query.get(&#xD;&#xA;        newPair.address,&#xD;&#xA;        { value, gasLimit }&#xD;&#xA;    );&#xD;&#xA;    console.log(result.toHuman());&#xD;&#xA;    console.log(gasConsumed.toHuman());&#xD;&#xA;&#xD;&#xA;    if (result.isOk) {&#xD;&#xA;        console.log(&quot;Success&quot;, output.toHuman());&#xD;&#xA;    } else {&#xD;&#xA;        console.error(&quot;Error&quot;, result.asErr);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main()&#xD;&#xA;    .catch(console.error)&#xD;&#xA;    .finally(() =&gt; process.exit());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1906" PostHistoryTypeId="1" PostId="530" RevisionGUID="6c01abb2-07d6-4581-ad27-b80ca07fbf8f" CreationDate="2022-02-28T04:01:49.377" UserId="129" Text="Invalid params: unknown field `storageDepositLimit` Error when getting contract data from a chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="1907" PostHistoryTypeId="3" PostId="530" RevisionGUID="6c01abb2-07d6-4581-ad27-b80ca07fbf8f" CreationDate="2022-02-28T04:01:49.377" UserId="129" Text="|javascript|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1908" PostHistoryTypeId="2" PostId="531" RevisionGUID="9a37fb4e-36a7-4892-9180-66cba9086c09" CreationDate="2022-02-28T04:12:40.693" UserId="393" Text="As the compiler tips says, just try to modify the cargo.toml file in this way:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    [dependencies]&#xD;&#xA;    getrandom = { version = &quot;0.2&quot;, features = [&quot;js&quot;] }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Try it, dude." ContentLicense="CC BY-SA 4.0" />
  <row Id="1910" PostHistoryTypeId="10" PostId="421" RevisionGUID="978d96e2-2498-43e1-8a78-a9e7a7fa25bf" CreationDate="2022-02-28T06:26:15.133" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:112,&quot;DisplayName&quot;:&quot;Joe Kerr&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:442,&quot;DisplayName&quot;:&quot;Chino Chang&quot;}]}" />
  <row Id="1917" PostHistoryTypeId="6" PostId="530" RevisionGUID="5252cf96-21a4-496c-a329-e79ff8d2e3bf" CreationDate="2022-02-28T15:38:47.890" UserId="29" Comment="edited tags" Text="|smart-contract|javascript|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1918" PostHistoryTypeId="2" PostId="533" RevisionGUID="480724e0-275f-4285-b3ae-e058b6409209" CreationDate="2022-02-28T15:46:12.150" UserId="434" Text="After a runtime is complete and all the macros are expanded, what kind of data structure is the runtime?&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;Is the Runtime a struct? If so, what are some of the fields? I want to be able to build a mental model of what exactly I am building; when trying to &quot;see definition&quot; for the runtime I am told it is a struct in some cases and enum in others, i suspect this has to do with the macros." ContentLicense="CC BY-SA 4.0" />
  <row Id="1920" PostHistoryTypeId="1" PostId="533" RevisionGUID="480724e0-275f-4285-b3ae-e058b6409209" CreationDate="2022-02-28T15:46:12.150" UserId="434" Text="What is a runtime as a data structure?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1921" PostHistoryTypeId="3" PostId="533" RevisionGUID="480724e0-275f-4285-b3ae-e058b6409209" CreationDate="2022-02-28T15:46:12.150" UserId="434" Text="|frame|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1922" PostHistoryTypeId="2" PostId="534" RevisionGUID="e1b39e10-f358-43ba-b64c-35bdba4e05b7" CreationDate="2022-02-28T16:25:45.960" UserId="109" Text="I have code that writes to offchain_index:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;offchain_index::set(&amp;my_key, &amp;my_data.encode());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, my unit tests are unable to retrieve the data via:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let my_offchain_data = StorageValueRef::persistent(&amp;my_key).get::&lt;MyDataType&gt;();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The above returns `None`. According to https://docs.substrate.io/how-to-guides/v3/ocw/indexing/ this is how I should retrieve the data.&#xD;&#xA;&#xD;&#xA;If I persist the data using `StorageValueRef::persistent(&amp;my_key).set(&amp;my_data.clone().encode());` I am able to retrieve the data in my unit tests.&#xD;&#xA;&#xD;&#xA;What am I doing wrong?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1924" PostHistoryTypeId="1" PostId="534" RevisionGUID="e1b39e10-f358-43ba-b64c-35bdba4e05b7" CreationDate="2022-02-28T16:25:45.960" UserId="109" Text="How do you test offchain_index::set?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1925" PostHistoryTypeId="3" PostId="534" RevisionGUID="e1b39e10-f358-43ba-b64c-35bdba4e05b7" CreationDate="2022-02-28T16:25:45.960" UserId="109" Text="|offchain-storage|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1926" PostHistoryTypeId="2" PostId="535" RevisionGUID="272e5c69-441e-4184-b2de-7d454476e2d2" CreationDate="2022-02-28T17:15:52.197" UserId="83" Text="I want to determine the minimum amount of collators that a specific parachain that is registered on the Rococo network must have running in order for them to generate and finalize blocks once they have all finished synchronising with the Rococo relay chain.&#xD;&#xA;&#xD;&#xA;In the Cumulus tutorial [here][1], it says: *&quot;You should have at least two **validators** (relay chain nodes) running for every **collator** (parachain nodes) on your network.&quot;*&#xD;&#xA;&#xD;&#xA;Elsewhere in the Cumulus tutorial [here][2] it says that *&quot;chain specs conventionally live in a /res folder that is published in your node's codebase for others to use. For example: Polkadot includes these **relay chain** chain specs under node/service/res&quot;*.&#xD;&#xA;&#xD;&#xA;It further says *&quot;You can **modify** the first section's provided **plain** relay chain spec to include more validators for testing, or go the more &quot;correct&quot; route used for production of modifying the **source** for genesis state in chain_spec.rs for your **relay chain** to add more validators.&quot;*&#xD;&#xA;&#xD;&#xA;It appears that only the **raw** rococo_v2 relay chain spec for Rococo is published [here][3] as file [rococo.json][4], but the directory doesn't include the Rococo **plain** relay chain spec where more validators could be included for testing, so it does not appear that this gets modified to included more validators for testing.&#xD;&#xA;&#xD;&#xA;Also the Rococo Staging Testnet Genesis Config in [chain_spec.rs][5] of the 'master' branch in the Polkadot repository includes eight (8) initial authorities (validators) that do not appear to have been changed. Why doesn't the **plain** relay chain spec or the list of validators for Rococo Staging Testnet Genesis config in that chain_spec.rs file have to change?&#xD;&#xA;&#xD;&#xA;When I connect to Rococo using polkadot.js [here][6] and go to menu Developer &gt; Chain state &gt; Storage &gt; session &gt; validators() then it returns the &quot;current set of validators&quot; for Rococo, as shown below:&#xD;&#xA;&#xD;&#xA;[![current set of Rococo validators][7]][7]&#xD;&#xA;&#xD;&#xA;There are current **thirty nine (39)** of them, which does not match the amount of Rococo validators listed in the chain_spec.rs.&#xD;&#xA;&#xD;&#xA;So my main questions is: If there are currently **thirty nine (39)** Rococo validators, and we want to add collators to a parachain that we have registered on Rococo. Does this mean we should have **at least twenty (20)** **collators** (parachain nodes) running so that we satisfy the requirement mentioned earlier of having at least two validators running for every collator on your network?&#xD;&#xA;If you don't have satisfy that minimum amount of collators running that have finished synchronising with the Rococo relay chain, will your parachain still be able to generate and finalise blocks? &#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/#connecting-additional-parachain-nodes&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/#configure-a-parachain-for-a-specific-relay-chain-and-para-id&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/tree/master/node/service/res&#xD;&#xA;  [4]: https://raw.githubusercontent.com/paritytech/polkadot/master/node/service/res/rococo.json&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot/blob/master/node/service/src/chain_spec.rs#L786&#xD;&#xA;  [6]: https://polkadot.js.org/apps/#/chainstate&#xD;&#xA;  [7]: https://i.stack.imgur.com/8rHdI.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="1928" PostHistoryTypeId="1" PostId="535" RevisionGUID="272e5c69-441e-4184-b2de-7d454476e2d2" CreationDate="2022-02-28T17:15:52.197" UserId="83" Text="How many collators of a registered parachain must be synchronised with the Rococo relay chain for that parachain to generate and finalize blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1929" PostHistoryTypeId="3" PostId="535" RevisionGUID="272e5c69-441e-4184-b2de-7d454476e2d2" CreationDate="2022-02-28T17:15:52.197" UserId="83" Text="|polkadot|cumulus|rococo|chainspec|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1930" PostHistoryTypeId="2" PostId="536" RevisionGUID="24ecfa74-a827-4609-a6fe-f702e13ed9ae" CreationDate="2022-02-28T18:14:15.847" UserId="172" Text="I would like to understand how treasury accounts are created and used under the hood. How do they compare to end user accounts? Are they also just an `AccountId` to `AccountInfo` map in storage? " ContentLicense="CC BY-SA 4.0" />
  <row Id="1932" PostHistoryTypeId="1" PostId="536" RevisionGUID="24ecfa74-a827-4609-a6fe-f702e13ed9ae" CreationDate="2022-02-28T18:14:15.847" UserId="172" Text="How do treasury account compare to end user accounts in FRAME?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1933" PostHistoryTypeId="3" PostId="536" RevisionGUID="24ecfa74-a827-4609-a6fe-f702e13ed9ae" CreationDate="2022-02-28T18:14:15.847" UserId="172" Text="|frame|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1934" PostHistoryTypeId="2" PostId="537" RevisionGUID="601877fe-3619-4700-8e0c-0116174d12aa" CreationDate="2022-02-28T18:19:07.823" UserId="73" Text="There is no difference. From the point of view of the runtime, the treasury account is like a normal account. These special system accounts are just public keys, without the private key being known. So, that means that only the pallet itself can interact with this account." ContentLicense="CC BY-SA 4.0" />
  <row Id="1936" PostHistoryTypeId="2" PostId="538" RevisionGUID="6b8656ee-d278-417e-876d-732801b86a49" CreationDate="2022-02-28T18:23:43.323" UserId="73" Text="You only need 1 collator being synchronized to start building blocks. You also don't need n + 1 validators on the relay chain where n is the number of Parachains. That was the case for Parachains V0 code. However, this was also not related in any way with the collators." ContentLicense="CC BY-SA 4.0" />
  <row Id="1938" PostHistoryTypeId="2" PostId="539" RevisionGUID="7e13e811-f6fa-48c2-b2f6-9b15a5e0571e" CreationDate="2022-02-28T19:31:56.427" UserId="521" Text="I just noticed that `staking.MaxNominations` constant is removed from Kusama runtime starting from 9170. However, I did not find any proper replacement neither in constants nor in storage. Are nomination limits removed entirely or migrated to another place?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1940" PostHistoryTypeId="1" PostId="539" RevisionGUID="7e13e811-f6fa-48c2-b2f6-9b15a5e0571e" CreationDate="2022-02-28T19:31:56.427" UserId="521" Text="Constant `MaxNominations` is removed from the Kusama runtime starting from 9170" ContentLicense="CC BY-SA 4.0" />
  <row Id="1941" PostHistoryTypeId="3" PostId="539" RevisionGUID="7e13e811-f6fa-48c2-b2f6-9b15a5e0571e" CreationDate="2022-02-28T19:31:56.427" UserId="521" Text="|runtime|kusama|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1942" PostHistoryTypeId="5" PostId="539" RevisionGUID="13fa1ceb-47d4-4021-9d35-6984c24ea97a" CreationDate="2022-02-28T19:46:09.943" UserId="521" Comment="added 79 characters in body" Text="I just noticed that `staking.MaxNominations` constant is [removed][1] from Kusama's runtime metadata starting from 9170. However, I did not find any proper replacement neither in constants nor in storage. Are nomination limits removed entirely or migrated to another place?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://kusama.subscan.io/runtime/Staking?version=9170" ContentLicense="CC BY-SA 4.0" />
  <row Id="1943" PostHistoryTypeId="2" PostId="540" RevisionGUID="d023f645-1e5e-4a8a-a711-20d71ecbed82" CreationDate="2022-02-28T20:30:28.523" UserId="28" Text="There a few different primitives for this interaction provided by the Multisig, Proxy, and Utility Pallet.&#xD;&#xA;&#xD;&#xA;If I understand your needs correctly, I would do the following:&#xD;&#xA;&#xD;&#xA;* Generate a multisig with N people using the Multisig Pallet.&#xD;&#xA;* Generate an anonymous proxy using the Proxy Pallet, which is controlled by the Multisig.&#xD;&#xA;* Generate and submit transactions from M derivative accounts of the anonymous proxy using the Utility Pallet.&#xD;&#xA;&#xD;&#xA;When making a call, you would then do:&#xD;&#xA;&#xD;&#xA;* `MultisigApprove ( Proxy -&gt; UtilityDerive -&gt; Call (CallData) )`&#xD;&#xA;&#xD;&#xA;This setup would allow the same N multisig people to control up to `u16::MAX` different derived accounts from the anonymous proxy.&#xD;&#xA;&#xD;&#xA;Furthermore, because you used an anonymous proxy, you can update the multisig backing the anonymous proxy, otherwise you can use the multisig account directly to derive new accounts." ContentLicense="CC BY-SA 4.0" />
  <row Id="1945" PostHistoryTypeId="2" PostId="541" RevisionGUID="1551d702-a23b-4b11-a1bb-51b29efe4efe" CreationDate="2022-02-28T20:44:42.663" UserId="28" Text="&gt; I would like to understand how treasury accounts are created and used under the hood&#xD;&#xA;&#xD;&#xA;You can see [here](https://substrate.stackexchange.com/questions/477/how-can-we-get-a-pallets-sub-account-address-using-polkadotjs-api/479#479) for a similar explanation on sub-accounts.&#xD;&#xA;&#xD;&#xA;To walk through the specific steps here:&#xD;&#xA;&#xD;&#xA; 1. Here is the function defined in the Treasury pallet for generating the account id:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;	/// The account ID of the treasury pot.&#xD;&#xA;	///&#xD;&#xA;	/// This actually does computation. If you need to keep using it, then make sure you cache the&#xD;&#xA;	/// value and only call this once.&#xD;&#xA;	pub fn account_id() -&gt; T::AccountId {&#xD;&#xA;		T::PalletId::get().into_account()&#xD;&#xA;	}&#xD;&#xA;    ```&#xD;&#xA; 2. `T::PalletId::get()` is defined as: &#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    pub const TreasuryPalletId: PalletId = PalletId(*b&quot;py/trsry&quot;);&#xD;&#xA;    ```&#xD;&#xA; 3. `into_account()` is defined as:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    /// Convert into an account ID. This is infallible.&#xD;&#xA;	fn into_account(&amp;self) -&gt; AccountId {&#xD;&#xA;		self.into_sub_account(&amp;())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn into_sub_account&lt;S: Encode&gt;(&amp;self, sub: S) -&gt; T {&#xD;&#xA;		(Id::TYPE_ID, self, sub)&#xD;&#xA;			.using_encoded(|b| T::decode(&amp;mut TrailingZeroInput(b)))&#xD;&#xA;			.expect(&quot;`AccountId` type is never greater than 32 bytes; qed&quot;)&#xD;&#xA;	}&#xD;&#xA;    ```&#xD;&#xA; 4. `Id::TYPE_ID` is defined as:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    impl TypeId for PalletId {&#xD;&#xA;	    const TYPE_ID: [u8; 4] = *b&quot;modl&quot;;&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA; &#xD;&#xA;So to generate the account, we just need to take the raw bytes of &quot;modl&quot; + &quot;py/trsry&quot; and stick that into an account:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;as_bytes(&quot;modl&quot;) = 0x6d6f646c&#xD;&#xA;as_bytes(&quot;py/trsry&quot;) = 0x70792f7472737279&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So the Account Id is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x6d6f646c70792f74727372790000000000000000000000000000000000000000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which maps to Substrate Address:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check it out on Subscan:&#xD;&#xA;&#xD;&#xA;https://polkadot.subscan.io/account/5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z&#xD;&#xA;&#xD;&#xA;This public key has no known private key since it is just generated from raw bytes as shown above. When accessing funds from this account, we dont use an cryptography. The low level runtime has direct access to modify this account in any way without authorization.&#xD;&#xA;&#xD;&#xA;If you want to look for the private key, you can try, and if you succeed, you will get access to all the treasury funds across all Substrate chains. &#xD;&#xA;&#xD;&#xA;A pretty nice bounty, so do let me know when you find it :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1947" PostHistoryTypeId="2" PostId="542" RevisionGUID="f5bba13d-390b-41ca-971e-965b2e1b6659" CreationDate="2022-02-28T20:48:20.170" UserId="28" Text="Yes, the Runtime is a struct which implements a bunch of traits.&#xD;&#xA;&#xD;&#xA;You can look at the Runtime generated by the `substrate-node-template` here:&#xD;&#xA;&#xD;&#xA;https://crates.parity.io/node_template_runtime/struct.Runtime.html&#xD;&#xA;&#xD;&#xA;&gt; If so, what are some of the fields?&#xD;&#xA;&#xD;&#xA;The `Runtime` struct has no fields. It just holds of all the trait implementations, and exposes the `metadata()` function." ContentLicense="CC BY-SA 4.0" />
  <row Id="1949" PostHistoryTypeId="2" PostId="543" RevisionGUID="3db9bee6-83e6-408b-95af-b27c170264fc" CreationDate="2022-02-28T20:56:30.293" UserId="73" Text="You can do it the following way:&#xD;&#xA;```&#xD;&#xA;	let mut ext = sp_io::TestExternalities::new_empty();&#xD;&#xA;    ext.execute_with(|| {&#xD;&#xA;		sp_io::offchain_index::set(b&quot;hello&quot;, b&quot;world&quot;);&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;    ext.persist_offchain_overlay();&#xD;&#xA;	let offchain_db = ext.offchain_db();&#xD;&#xA;	assert_eq!(&#xD;&#xA;		offchain_db.get(b&quot;hello&quot;),&#xD;&#xA;		Some(b&quot;world&quot;.to_vec()),&#xD;&#xA;	);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1951" PostHistoryTypeId="5" PostId="542" RevisionGUID="4f216e43-94cb-46f1-ad90-961786102e05" CreationDate="2022-02-28T20:59:13.520" UserId="28" Comment="added 89 characters in body" Text="Yes, the Runtime is a struct which implements a bunch of traits, for example all the `Config` traits required by the pallets you include in your runtime.&#xD;&#xA;&#xD;&#xA;You can look at the Runtime generated by the `substrate-node-template` here:&#xD;&#xA;&#xD;&#xA;https://crates.parity.io/node_template_runtime/struct.Runtime.html&#xD;&#xA;&#xD;&#xA;&gt; If so, what are some of the fields?&#xD;&#xA;&#xD;&#xA;The `Runtime` struct has no fields. It just holds of all the trait implementations, and exposes the `metadata()` function." ContentLicense="CC BY-SA 4.0" />
  <row Id="1952" PostHistoryTypeId="2" PostId="544" RevisionGUID="b0677ce9-7d1a-4872-861b-764b40ea0590" CreationDate="2022-02-28T21:16:27.930" UserId="14" Text="Here is a simple edit of the `pallet/template/lib.rs` that uses `Vec&lt;u8&gt;` in storage:&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn something)]&#xD;&#xA;	pub(super) type Something&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Twox64Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		Vec&lt;u8&gt;,&#xD;&#xA;		ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		SomethingStored(Vec&lt;u8&gt;, T::AccountId),&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		NoneValue,&#xD;&#xA;		StorageOverflow,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;		pub fn do_something(origin: OriginFor&lt;T&gt;, something: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			&lt;Something&lt;T&gt;&gt;::insert(&amp;who, &amp;something);&#xD;&#xA;			Self::deposit_event(Event::SomethingStored(something, who));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Using it with the current [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template) is not compiling due to the following error:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `Vec&lt;u8&gt;: MaxEncodedLen` is not satisfied&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:15:12&#xD;&#xA;   |&#xD;&#xA;15 |     #[pallet::pallet]&#xD;&#xA;   |               ^^^^^^ the trait `MaxEncodedLen` is not implemented for `Vec&lt;u8&gt;`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageSomething&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::AccountId, Vec&lt;u8&gt;, frame_support::pallet_prelude::ValueQuery&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can compile it using a previous version of the `substrate-node-template` or using the `BoundedVec&lt;u8, T::MaxLength&gt;`, but is there a way to keep using the `Vec&lt;u8&gt;`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1954" PostHistoryTypeId="1" PostId="544" RevisionGUID="b0677ce9-7d1a-4872-861b-764b40ea0590" CreationDate="2022-02-28T21:16:27.930" UserId="14" Text="`MaxEncodedLen` is not implemented for `Vec&lt;u8&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="1955" PostHistoryTypeId="3" PostId="544" RevisionGUID="b0677ce9-7d1a-4872-861b-764b40ea0590" CreationDate="2022-02-28T21:16:27.930" UserId="14" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1956" PostHistoryTypeId="2" PostId="545" RevisionGUID="fd4ea686-d518-4a26-935c-3460db339eab" CreationDate="2022-02-28T21:19:49.143" UserId="167" Text="Unfortunately this was removed accidentally in https://github.com/paritytech/substrate/pull/10601. [This PR](https://github.com/paritytech/substrate/pull/10947) will bring it back, thanks for reporting this. " ContentLicense="CC BY-SA 4.0" />
  <row Id="1958" PostHistoryTypeId="6" PostId="539" RevisionGUID="c214c9f9-3304-4386-a226-87583719b29b" CreationDate="2022-02-28T21:21:02.660" UserId="28" Comment="edited tags" Text="|runtime|kusama|staking|bug|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1959" PostHistoryTypeId="2" PostId="546" RevisionGUID="5d28007d-31db-46da-99be-00eb937acb13" CreationDate="2022-02-28T21:22:35.620" UserId="28" Text="`MaxEncodedLen` is all about setting an upper limit to the size of a storage item.&#xD;&#xA;&#xD;&#xA;In the case of `Vec&lt;u8&gt;`, there is no limit to the size of this storage, since Vectors in Rust do not have such limits (besides fitting in `usize`).&#xD;&#xA;&#xD;&#xA;Thus, if you want to satisfy `MaxEncodedLen`, you must use a `BoundedVec`, and appropriate length limits." ContentLicense="CC BY-SA 4.0" />
  <row Id="1961" PostHistoryTypeId="5" PostId="546" RevisionGUID="81b20de9-1d32-4ca8-8b53-c232088d0995" CreationDate="2022-02-28T21:27:15.657" UserId="28" Comment="added 457 characters in body" Text="`MaxEncodedLen` is all about setting an upper limit to the size of a storage item.&#xD;&#xA;&#xD;&#xA;In the case of `Vec&lt;u8&gt;`, there is no limit to the size of this storage, since Vectors in Rust do not have such limits (besides fitting in `usize`).&#xD;&#xA;&#xD;&#xA;Thus, if you want to satisfy `MaxEncodedLen`, you must use a `BoundedVec`, and appropriate length limits.&#xD;&#xA;&#xD;&#xA;If you want to keep your storage unbounded, you can include `#[pallet::without_storage_info]`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::pallet]&#xD;&#xA;#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;#[pallet::without_storage_info]&#xD;&#xA;pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is okay for a solo-chain, but will be incompatible for Parachains since you need to know limits here in order to limit the [PoV size](https://substrate.stackexchange.com/questions/518/what-does-pov-stand-for)." ContentLicense="CC BY-SA 4.0" />
  <row Id="1962" PostHistoryTypeId="4" PostId="536" RevisionGUID="24f4831f-6fea-4601-a6ea-be84d181ddec" CreationDate="2022-02-28T22:26:27.743" UserId="172" Comment="edited title" Text="How do treasury accounts compare to end user accounts in FRAME?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1963" PostHistoryTypeId="2" PostId="547" RevisionGUID="5eae7774-6fa7-4423-a4da-ed5a70457d63" CreationDate="2022-03-01T05:01:32.467" UserId="450" Text="The issue is resolved by using `.compact.compressed.wasm` produced by `srtool`. I believe using plain `cargo build` should also produce the `.compact.compressed.wasm`.&#xD;&#xA;&#xD;&#xA;Thanks for the support" ContentLicense="CC BY-SA 4.0" />
  <row Id="1965" PostHistoryTypeId="2" PostId="548" RevisionGUID="e173c920-e7ce-4825-ad25-9d4797dd0a9e" CreationDate="2022-03-01T05:27:51.200" UserId="129" Text="I found the solution, I set the gas limit too high.&#xD;&#xA;Thank you all for your support! " ContentLicense="CC BY-SA 4.0" />
  <row Id="1968" PostHistoryTypeId="2" PostId="549" RevisionGUID="446589f1-0846-4b9b-9a34-03d2d1f1a8a9" CreationDate="2022-03-01T07:11:57.097" UserId="104" Text="As Zeke has alluded to in his comment, this is usually a problem with dependencies that did not have the `default-features` option set to false. In addition, you'll also need to know how to enable `std` properly in the `[features]` section in order to fix this issue properly.&#xD;&#xA;&#xD;&#xA;To illustrate, let's say that you want to add a dependency called `nicks-pallet`. The proper way of including it in the `Cargo.toml` file is to write it in the following way:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;nicks-pallet = { /* version or git */, default-features = false }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = []&#xD;&#xA;std = [&quot;nicks-pallet/std&quot;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="1975" PostHistoryTypeId="2" PostId="551" RevisionGUID="384a0d1e-d00e-406c-a4cd-4399dc24f343" CreationDate="2022-03-01T13:27:05.247" UserId="139" Text="`type SignedRewardBase: Get&lt;BalanceOf&lt;Self&gt;&gt;`&#xD;&#xA;Base reward for a signed solution&#xD;&#xA;&#xD;&#xA;`type SignedDepositBase: Get&lt;BalanceOf&lt;Self&gt;&gt;`&#xD;&#xA;Base deposit for a signed solution.&#xD;&#xA;&#xD;&#xA;`type SignedDepositByte: Get&lt;BalanceOf&lt;Self&gt;&gt;`&#xD;&#xA;Per-byte deposit for a signed solution.&#xD;&#xA;&#xD;&#xA;Are some configuration items from ElectionProviderMultiPhase. What are these rewards and deposits aimed at? Who is depositing/getting the rewards? Are nodes that are tied to validators running the election&#xD;&#xA;algorithm getting the rewards, which in most cases is a `stash` account?  Does submitting a solution incur a cost as well? " ContentLicense="CC BY-SA 4.0" />
  <row Id="1977" PostHistoryTypeId="1" PostId="551" RevisionGUID="384a0d1e-d00e-406c-a4cd-4399dc24f343" CreationDate="2022-03-01T13:27:05.247" UserId="139" Text="What are these items in ElectionProviderMultiPhase?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1978" PostHistoryTypeId="3" PostId="551" RevisionGUID="384a0d1e-d00e-406c-a4cd-4399dc24f343" CreationDate="2022-03-01T13:27:05.247" UserId="139" Text="|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1979" PostHistoryTypeId="2" PostId="552" RevisionGUID="22d67ac4-baf6-4270-bf63-c8e29149d2c9" CreationDate="2022-03-01T14:04:54.143" UserId="46" Text="Can we query block data by timestamp? If so what time is the correct one to use? For a typical block object, there's a time property that seems to always be `undefined`, but the first extrinsic (index 0) usually provides timestamp. Is there a way to query details of all blocks whose timestamp is between some date range?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="1981" PostHistoryTypeId="1" PostId="552" RevisionGUID="22d67ac4-baf6-4270-bf63-c8e29149d2c9" CreationDate="2022-03-01T14:04:54.143" UserId="46" Text="Can we query blocks by (extrinsics) timestamp?" ContentLicense="CC BY-SA 4.0" />
  <row Id="1982" PostHistoryTypeId="3" PostId="552" RevisionGUID="22d67ac4-baf6-4270-bf63-c8e29149d2c9" CreationDate="2022-03-01T14:04:54.143" UserId="46" Text="|substrate-node|polkadot-js|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1983" PostHistoryTypeId="2" PostId="553" RevisionGUID="d7ab9bd8-2357-45c5-98b5-bd6c66ecf23f" CreationDate="2022-03-01T14:42:04.540" UserId="299" Text="I need to use this field when configuring config under runtime. The compiler can jump through ctrl, but an error is reported during the compilation process.&#xD;&#xA;&#xD;&#xA;this is my code.&#xD;&#xA;```rust&#xD;&#xA;pub NativeTreasuryAccount: AccountId = TreasuryPalletId::get().into_account();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8tbfh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1985" PostHistoryTypeId="1" PostId="553" RevisionGUID="d7ab9bd8-2357-45c5-98b5-bd6c66ecf23f" CreationDate="2022-03-01T14:42:04.540" UserId="299" Text="method not found in `PalletId`" ContentLicense="CC BY-SA 4.0" />
  <row Id="1986" PostHistoryTypeId="3" PostId="553" RevisionGUID="d7ab9bd8-2357-45c5-98b5-bd6c66ecf23f" CreationDate="2022-03-01T14:42:04.540" UserId="299" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1987" PostHistoryTypeId="2" PostId="554" RevisionGUID="16ca0741-067a-46e0-b3ec-33d3ea1e3d77" CreationDate="2022-03-01T14:43:01.237" UserId="46" Text="PolkadotJS explorer provides a hash value for every extrinsic (see marked screenshot) but the extrinsics list from block data (`block.extrinsics`) does not explicitly provide one. How is this value obtained?&#xD;&#xA;```&#xD;&#xA;// A snippet of block data object with extrinsics list without hash values&#xD;&#xA;{&#xD;&#xA;    &quot;header&quot;: {&#xD;&#xA;        &quot;parentHash&quot;: &quot;0xf1b7dd959ccf1fd4d3fbb4899d80a2b2a39532237583e513625c74184b455deb&quot;,&#xD;&#xA;        &quot;number&quot;: &quot;9,239,202&quot;,&#xD;&#xA;        &quot;stateRoot&quot;: &quot;0x1c46f814b57b5ce14048f45158ae9e639d23af331542049337d0c137acc17ba8&quot;,&#xD;&#xA;        &quot;extrinsicsRoot&quot;: &quot;0x828199393cd2f976bf42ed44f026005a5605f07e4d18781ab48a00d67f22b34f&quot;,&#xD;&#xA;        &quot;digest&quot;: {&#xD;&#xA;            &quot;logs&quot;: [&#xD;&#xA;                ...&#xD;&#xA;            ]&#xD;&#xA;        }&#xD;&#xA;    },&#xD;&#xA;    &quot;extrinsics&quot;: [&#xD;&#xA;        {&#xD;&#xA;            &quot;isSigned&quot;: false,&#xD;&#xA;            &quot;method&quot;: {&#xD;&#xA;                &quot;args&quot;: {&#xD;&#xA;                    &quot;now&quot;: &quot;1,646,142,240,003&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;method&quot;: &quot;set&quot;,&#xD;&#xA;                &quot;section&quot;: &quot;timestamp&quot;&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;            &quot;isSigned&quot;: false,&#xD;&#xA;            &quot;method&quot;: {&#xD;&#xA;                &quot;args&quot;: {&#xD;&#xA;                    &quot;data&quot;: {&#xD;&#xA;                        &quot;bitfields&quot;: [&#xD;&#xA;                            {&#xD;&#xA;                                &quot;payload&quot;: &quot;0b00100001_00000000_00000000_00000000_00000000&quot;,&#xD;&#xA;                                &quot;validatorIndex&quot;: &quot;0&quot;,&#xD;&#xA;                                &quot;signature&quot;: &quot;0xf4cea4e34cf0ad5a15ec171659b2548ae56317eca6aa53d0d2c7a8cb3cb2fd08666673c2991182101c7474452f28b027f8d41ee07e41244987261d988482e986&quot;&#xD;&#xA;                            },&#xD;&#xA;                            ...&#xD;&#xA;                        ],&#xD;&#xA;                      ...&#xD;&#xA;                    }&#xD;&#xA;                },&#xD;&#xA;                &quot;method&quot;: &quot;enter&quot;,&#xD;&#xA;                &quot;section&quot;: &quot;paraInherent&quot;&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;            &quot;isSigned&quot;: true,&#xD;&#xA;            &quot;method&quot;: {&#xD;&#xA;                &quot;args&quot;: {&#xD;&#xA;                    &quot;dest&quot;: {&#xD;&#xA;                        &quot;Id&quot;: &quot;1urK7po3hNyt9FWSbUrMspUGkWw69ChF1KDkcs4Do3F3HoV&quot;&#xD;&#xA;                    },&#xD;&#xA;                    &quot;value&quot;: &quot;46,620,000,000,000&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;method&quot;: &quot;transferKeepAlive&quot;,&#xD;&#xA;                &quot;section&quot;: &quot;balances&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;era&quot;: {&#xD;&#xA;                &quot;MortalEra&quot;: {&#xD;&#xA;                    &quot;period&quot;: &quot;512&quot;,&#xD;&#xA;                    &quot;phase&quot;: &quot;158&quot;&#xD;&#xA;                }&#xD;&#xA;            },&#xD;&#xA;            &quot;nonce&quot;: &quot;81,499&quot;,&#xD;&#xA;            &quot;signature&quot;: &quot;0x675bc56707feb5dc7a0cc90f40ccb21d8dd29733dea0e200c21b7eebabe952c903f31f0b8d57beaf17f578e1c58203de3981d2db4d9a9f1aaf6501ef6b771106&quot;,&#xD;&#xA;            &quot;signer&quot;: {&#xD;&#xA;                &quot;Id&quot;: &quot;16hp43x8DUZtU8L3cJy9Z8JMwTzuu8ZZRWqDZnpMhp464oEd&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;tip&quot;: &quot;0&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;            &quot;isSigned&quot;: true,&#xD;&#xA;            &quot;method&quot;: {&#xD;&#xA;                &quot;args&quot;: {&#xD;&#xA;                    &quot;dest&quot;: {&#xD;&#xA;                        &quot;Id&quot;: &quot;12xtAYsRUrmbniiWQqJtECiBQrMn8AypQcXhnQAc6RB6XkLW&quot;&#xD;&#xA;                    },&#xD;&#xA;                    &quot;value&quot;: &quot;86,098,832,999,986&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;method&quot;: &quot;transfer&quot;,&#xD;&#xA;                &quot;section&quot;: &quot;balances&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;era&quot;: {&#xD;&#xA;                &quot;MortalEra&quot;: {&#xD;&#xA;                    &quot;period&quot;: &quot;64&quot;,&#xD;&#xA;                    &quot;phase&quot;: &quot;30&quot;&#xD;&#xA;                }&#xD;&#xA;            },&#xD;&#xA;            &quot;nonce&quot;: &quot;0&quot;,&#xD;&#xA;            &quot;signature&quot;: &quot;0xaaa69f52ad20cb51aeedd3ad341fdcba34a19ea0f2fbafea643cf182b01b2e115a246df31ac07f940bf2f1bc5584325faaba178759369058273a313b37ce358e&quot;,&#xD;&#xA;            &quot;signer&quot;: {&#xD;&#xA;                &quot;Id&quot;: &quot;13fkvT1NZnWVu762tMCP5Se8wXZPzuawJgW2qJYFTidB7rbq&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;tip&quot;: &quot;0&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;            &quot;isSigned&quot;: true,&#xD;&#xA;            &quot;method&quot;: {&#xD;&#xA;                &quot;args&quot;: {&#xD;&#xA;                    &quot;dest&quot;: {&#xD;&#xA;                        &quot;Id&quot;: &quot;12xtAYsRUrmbniiWQqJtECiBQrMn8AypQcXhnQAc6RB6XkLW&quot;&#xD;&#xA;                    },&#xD;&#xA;                    &quot;value&quot;: &quot;57,471,153,886&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;method&quot;: &quot;transfer&quot;,&#xD;&#xA;                &quot;section&quot;: &quot;balances&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;era&quot;: {&#xD;&#xA;                &quot;MortalEra&quot;: {&#xD;&#xA;                    &quot;period&quot;: &quot;64&quot;,&#xD;&#xA;                    &quot;phase&quot;: &quot;30&quot;&#xD;&#xA;                }&#xD;&#xA;            },&#xD;&#xA;            &quot;nonce&quot;: &quot;0&quot;,&#xD;&#xA;            &quot;signature&quot;: &quot;0x1c736068e09d6005a099089f905d1cdc22547109b957c71cbce5cab3dd01b06a7263ec2be84eb1b74742c5e19c907ab3e2deac528d52104d27e0317bb42edc8a&quot;,&#xD;&#xA;            &quot;signer&quot;: {&#xD;&#xA;                &quot;Id&quot;: &quot;14dGnV6asvvAXjE8fffv5d3C3BeGCRUDuidXfK6LDwTPiqAt&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;tip&quot;: &quot;0&quot;&#xD;&#xA;        }&#xD;&#xA;    ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![Extrinsic hash on polkadot explorer][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/x73uu.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="1989" PostHistoryTypeId="1" PostId="554" RevisionGUID="16ca0741-067a-46e0-b3ec-33d3ea1e3d77" CreationDate="2022-03-01T14:43:01.237" UserId="46" Text="How to obtain extrinsic hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="1990" PostHistoryTypeId="3" PostId="554" RevisionGUID="16ca0741-067a-46e0-b3ec-33d3ea1e3d77" CreationDate="2022-03-01T14:43:01.237" UserId="46" Text="|substrate-node|polkadot-js|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="1991" PostHistoryTypeId="2" PostId="555" RevisionGUID="fd3a03d2-da03-40a8-bd48-d4d1b54f2531" CreationDate="2022-03-01T15:28:51.263" UserId="29" Text="With polkadot{.js} API you should be able to get the extrinsic hash:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// the hash for each extrinsic in the block&#xD;&#xA;signedBlock.block.extrinsics.forEach((ex, index) =&gt; {&#xD;&#xA;  console.log(index, ex.hash.toHex());&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Source: https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-retrieve-the-headerextrinsic-hash-from-blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="1993" PostHistoryTypeId="5" PostId="541" RevisionGUID="87bdf73a-2a1b-41c2-8041-3f2069191774" CreationDate="2022-03-01T15:48:15.577" UserId="29" Comment="added 1 character in body" Text="&gt; I would like to understand how treasury accounts are created and used under the hood&#xD;&#xA;&#xD;&#xA;You can see [here](https://substrate.stackexchange.com/questions/477/how-can-we-get-a-pallets-sub-account-address-using-polkadotjs-api/479#479) for a similar explanation on sub-accounts.&#xD;&#xA;&#xD;&#xA;To walk through the specific steps here:&#xD;&#xA;&#xD;&#xA; 1. Here is the function defined in the Treasury pallet for generating the account id:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;	/// The account ID of the treasury pot.&#xD;&#xA;	///&#xD;&#xA;	/// This actually does computation. If you need to keep using it, then make sure you cache the&#xD;&#xA;	/// value and only call this once.&#xD;&#xA;	pub fn account_id() -&gt; T::AccountId {&#xD;&#xA;		T::PalletId::get().into_account()&#xD;&#xA;	}&#xD;&#xA;    ```&#xD;&#xA; 2. `T::PalletId::get()` is defined as: &#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    pub const TreasuryPalletId: PalletId = PalletId(*b&quot;py/trsry&quot;);&#xD;&#xA;    ```&#xD;&#xA; 3. `into_account()` is defined as:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    /// Convert into an account ID. This is infallible.&#xD;&#xA;	fn into_account(&amp;self) -&gt; AccountId {&#xD;&#xA;		self.into_sub_account(&amp;())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn into_sub_account&lt;S: Encode&gt;(&amp;self, sub: S) -&gt; T {&#xD;&#xA;		(Id::TYPE_ID, self, sub)&#xD;&#xA;			.using_encoded(|b| T::decode(&amp;mut TrailingZeroInput(b)))&#xD;&#xA;			.expect(&quot;`AccountId` type is never greater than 32 bytes; qed&quot;)&#xD;&#xA;	}&#xD;&#xA;    ```&#xD;&#xA; 4. `Id::TYPE_ID` is defined as:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    impl TypeId for PalletId {&#xD;&#xA;	    const TYPE_ID: [u8; 4] = *b&quot;modl&quot;;&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA; &#xD;&#xA;So to generate the account, we just need to take the raw bytes of &quot;modl&quot; + &quot;py/trsry&quot; and stick that into an account:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;as_bytes(&quot;modl&quot;) = 0x6d6f646c&#xD;&#xA;as_bytes(&quot;py/trsry&quot;) = 0x70792f7472737279&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So the Account Id is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x6d6f646c70792f74727372790000000000000000000000000000000000000000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which maps to Substrate Address:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check it out on Subscan:&#xD;&#xA;&#xD;&#xA;https://polkadot.subscan.io/account/5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z&#xD;&#xA;&#xD;&#xA;This public key has no known private key since it is just generated from raw bytes as shown above. When accessing funds from this account, we dont use any cryptography. The low level runtime has direct access to modify this account in any way without authorization.&#xD;&#xA;&#xD;&#xA;If you want to look for the private key, you can try, and if you succeed, you will get access to all the treasury funds across all Substrate chains. &#xD;&#xA;&#xD;&#xA;A pretty nice bounty, so do let me know when you find it :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="1994" PostHistoryTypeId="2" PostId="556" RevisionGUID="ab980409-ddd6-4df5-b9d1-caabc96bf0d1" CreationDate="2022-03-01T16:11:57.280" UserId="452" Text="It's currently not possible to do that with substrate, short of manually searching through the blocks (you can use binary search). This kind of functionality will most likely never be provided by substrate as it can be built by external tools that create indexed databases, that allow answering such queries efficiently. You can find a list [here](https://wiki.polkadot.network/docs/build-data) of tooling that already exists that maybe helpful for your use case." ContentLicense="CC BY-SA 4.0" />
  <row Id="1996" PostHistoryTypeId="2" PostId="557" RevisionGUID="b051a8f3-33f4-4af7-bdfa-dc61de9c110c" CreationDate="2022-03-01T16:14:11.330" UserId="452" Text="Did you import the trait as suggested in the error message? &#xD;&#xA;&#xD;&#xA;`use sp_runtime::traits::AccountIdConversion;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="1998" PostHistoryTypeId="2" PostId="558" RevisionGUID="48b16efc-0b47-4cd2-966d-ccc02f3d02b4" CreationDate="2022-03-02T02:18:43.113" UserId="532" Text="I want to get the token balance in the chain statemine by py-substarte." ContentLicense="CC BY-SA 4.0" />
  <row Id="2000" PostHistoryTypeId="1" PostId="558" RevisionGUID="48b16efc-0b47-4cd2-966d-ccc02f3d02b4" CreationDate="2022-03-02T02:18:43.113" UserId="532" Text="How to get the token balance(rmrk) by py-substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2001" PostHistoryTypeId="3" PostId="558" RevisionGUID="48b16efc-0b47-4cd2-966d-ccc02f3d02b4" CreationDate="2022-03-02T02:18:43.113" UserId="532" Text="|balances|assets|python|substrateinterface|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2002" PostHistoryTypeId="2" PostId="559" RevisionGUID="5888db89-6fe1-4b7a-85b4-f888ef9168e1" CreationDate="2022-03-02T02:43:05.910" UserId="14" Text="```&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;&#xD;&#xA;ASSET_ID = 8  # RMRK.app&#xD;&#xA;ACCOUNT = '&lt;&lt;YOUR_ACCOUNT&gt;&gt;'&#xD;&#xA;&#xD;&#xA;substrate = SubstrateInterface(url='wss://statemine-rpc.polkadot.io')&#xD;&#xA;account_info = substrate.query(&#xD;&#xA;    module='Assets',&#xD;&#xA;    storage_function='Account',&#xD;&#xA;    params=[ASSET_ID, ACCOUNT],&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;print(f'Balance: {account_info[&quot;balance&quot;]}')&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2005" PostHistoryTypeId="2" PostId="560" RevisionGUID="9340bd5c-6e66-4753-905b-9c465685bfa9" CreationDate="2022-03-02T04:20:45.147" UserId="129" Text="I am running a local node on a computer. How can I connect and get information on this node from another computer using Polkadot Js API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2007" PostHistoryTypeId="1" PostId="560" RevisionGUID="9340bd5c-6e66-4753-905b-9c465685bfa9" CreationDate="2022-03-02T04:20:45.147" UserId="129" Text="How to connect to a node from other computer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2008" PostHistoryTypeId="3" PostId="560" RevisionGUID="9340bd5c-6e66-4753-905b-9c465685bfa9" CreationDate="2022-03-02T04:20:45.147" UserId="129" Text="|substrate-node|polkadot-js|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2013" PostHistoryTypeId="2" PostId="562" RevisionGUID="d96315ff-d5ff-4041-9a49-082171add508" CreationDate="2022-03-02T07:56:08.987" UserId="442" Text="Just use the IP address and the Port to connect, for e.g. `ws://192.168.1.2:9944`.&#xD;&#xA;&#xD;&#xA;If you're trying to connect from PolkadotJs Apps, you should run a self-hosted PolkadotJs Apps without HTTPS configured, so that you can connect to an unsecured RPC endpoint." ContentLicense="CC BY-SA 4.0" />
  <row Id="2015" PostHistoryTypeId="5" PostId="558" RevisionGUID="3f6bb26a-5ba3-409c-9c36-75025d9b7ca4" CreationDate="2022-03-02T09:07:07.737" UserId="28" Comment="added 10 characters in body; edited tags" Text="I want to get the token balance of RMRK in the chain statemine with py-substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="2016" PostHistoryTypeId="6" PostId="558" RevisionGUID="3f6bb26a-5ba3-409c-9c36-75025d9b7ca4" CreationDate="2022-03-02T09:07:07.737" UserId="28" Comment="added 10 characters in body; edited tags" Text="|balances|assets|python|token|statemine|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2017" PostHistoryTypeId="2" PostId="563" RevisionGUID="1695301f-c723-4954-b929-cea0b96cbbcb" CreationDate="2022-03-02T09:17:58.163" UserId="139" Text="I am using the polkadot js appimage and sometimes while connecting to my node, I see this :&#xD;&#xA;`Blocked connection to WebSockets server from untrusted origin: Some(&quot;file://&quot;)`.&#xD;&#xA;I've tried running the node with `--rpc-cors all` and that fixes this issue. Can someone explain why does this fix this issue and what should I be doing to not use this option? &#xD;&#xA;All of this is on my local network." ContentLicense="CC BY-SA 4.0" />
  <row Id="2019" PostHistoryTypeId="1" PostId="563" RevisionGUID="1695301f-c723-4954-b929-cea0b96cbbcb" CreationDate="2022-03-02T09:17:58.163" UserId="139" Text="Sometimes Polkadot JS won't connect to the local node, unless I enable rpc-cors all" ContentLicense="CC BY-SA 4.0" />
  <row Id="2020" PostHistoryTypeId="3" PostId="563" RevisionGUID="1695301f-c723-4954-b929-cea0b96cbbcb" CreationDate="2022-03-02T09:17:58.163" UserId="139" Text="|polkadot-js|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2021" PostHistoryTypeId="2" PostId="564" RevisionGUID="30593ead-12dd-49f9-ace3-37976c9fe877" CreationDate="2022-03-02T09:50:55.830" UserId="28" Text="[CORS](https://www.w3.org/wiki/CORS_Enabled) is all about setting up access security across different origins.&#xD;&#xA;&#xD;&#xA;By default, external origins do not have access to your blockchain node, and for good reason, they could easily spam your chain with requests and cause bad performance on your server.&#xD;&#xA;&#xD;&#xA;Instead, you must enable external origins access to your node with `--rpc-cors=all` or by giving an explicit list of origins you want to allow access from.&#xD;&#xA;&#xD;&#xA;Normally, this would not be an issue you run into because if you were running both the web app and the node on the same computer, they share the same origin, so CORS will not even come into play, however you mention an &quot;app image&quot; so maybe you are running your app inside a docker container, and in this case, this looks like a different computer/origin to the node.&#xD;&#xA;&#xD;&#xA;If instead, you run everything directly on the same computer, you would not have this problem, otherwise, doing enabling `--rpc-cors=all` will be fine for your testing here." ContentLicense="CC BY-SA 4.0" />
  <row Id="2023" PostHistoryTypeId="6" PostId="563" RevisionGUID="1dc5d2ae-e371-4e04-a1cc-e883c0c879a4" CreationDate="2022-03-02T09:52:50.493" UserId="28" Comment="edited tags" Text="|polkadot-js|rpc|networking|cors|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2028" PostHistoryTypeId="5" PostId="564" RevisionGUID="0768cd49-e16e-45ac-97d4-6f43bb0d9aa6" CreationDate="2022-03-02T11:38:31.413" UserId="28" Comment="added 387 characters in body" Text="[CORS](https://www.w3.org/wiki/CORS_Enabled) is all about setting up access security across different origins.&#xD;&#xA;&#xD;&#xA;By default, external origins do not have access to your blockchain node, and for good reason, they could easily spam your chain with requests and cause bad performance on your server.&#xD;&#xA;&#xD;&#xA;Instead, you must enable external origins access to your node with `--rpc-cors=all` or by giving an explicit list of origins you want to allow access from.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--rpc-cors &lt;ORIGINS&gt;&#xD;&#xA;    Specify browser Origins allowed to access the HTTP &amp; WS RPC servers.&#xD;&#xA;   &#xD;&#xA;    A comma-separated list of origins (protocol://domain or special `null` value). Value of `all` will disable&#xD;&#xA;    origin validation. Default is to allow localhost and &lt;https://polkadot.js.org&gt; origins. When running in&#xD;&#xA;    --dev mode the default is to allow all origins.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Normally, this would not be an issue you run into because if you were running both the web app and the node on the same computer, they share the same origin, so CORS will not even come into play, however you mention an &quot;app image&quot; so maybe you are running your app inside a docker container, and in this case, this looks like a different computer/origin to the node.&#xD;&#xA;&#xD;&#xA;If instead, you run everything directly on the same computer, you would not have this problem, otherwise, doing enabling `--rpc-cors=all` will be fine for your testing here." ContentLicense="CC BY-SA 4.0" />
  <row Id="2029" PostHistoryTypeId="2" PostId="566" RevisionGUID="e2b09221-c72e-4e5f-a03a-29875d6242d4" CreationDate="2022-03-02T14:02:49.427" UserId="46" Text="&gt; Can we query block data by timestamp?&#xD;&#xA;&#xD;&#xA;See [André's answer](https://substrate.stackexchange.com/a/556/46) above.&#xD;&#xA;&#xD;&#xA;&gt; ... what time is the correct one to use?&#xD;&#xA;&#xD;&#xA;Just want to confirm that the first argument of extrinsic timestamp seems to be the conventional way. See example in [Subquery tutorial](https://github.com/subquery/tutorials-block-timestamp#understanding-this-project)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2031" PostHistoryTypeId="2" PostId="567" RevisionGUID="8b351107-8f61-4b9e-a0c0-e334894e7ec4" CreationDate="2022-03-02T15:51:41.263" UserId="129" Text="I found the reason: Compatibility issue. The testnet I was trying to connect to used an older version of substrate. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2033" PostHistoryTypeId="2" PostId="568" RevisionGUID="fd9b7e55-866d-44c5-894d-858996708fdc" CreationDate="2022-03-02T18:24:27.093" UserId="539" Text="Monitoring a collator node block production rate can be done in the same way as any other Substrate node.&#xD;&#xA;&#xD;&#xA;You can find examples of Substrate Prometheus alerting rules in the [Substrate  Github repo under `.maintain/monitoring/alerting-rule`](https://github.com/paritytech/substrate/blob/master/.maintain/monitoring/alerting-rules/alerting-rules.yaml).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  - alert: BlockProductionSlow&#xD;&#xA;    annotations:&#xD;&#xA;      message: 'Best block on instance {{ $labels.instance }} increases by&#xD;&#xA;      less than 1 per minute for more than 3 minutes.'&#xD;&#xA;    expr: increase(substrate_block_height{status=&quot;best&quot;}[1m]) &lt; 1&#xD;&#xA;    for: 3m&#xD;&#xA;    labels:&#xD;&#xA;      severity: warning&#xD;&#xA;  - alert: BlockProductionSlow&#xD;&#xA;    annotations:&#xD;&#xA;      message: 'Best block on instance {{ $labels.instance }} increases by&#xD;&#xA;      less than 1 per minute for more than 10 minutes.'&#xD;&#xA;    expr: increase(substrate_block_height{status=&quot;best&quot;}[1m]) &lt; 1&#xD;&#xA;    for: 10m&#xD;&#xA;    labels:&#xD;&#xA;      severity: critical&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2046" PostHistoryTypeId="2" PostId="571" RevisionGUID="3d1bcbb4-51e9-4dbe-a01f-840cb8275104" CreationDate="2022-03-03T05:43:57.677" UserId="427" Text="We are trying to restart the nodes with the DB backup file such as chain data DB, keystore etc these are backed up regularly. But we are getting the below error :&#xD;&#xA;&#xD;&#xA;&gt; Error: Service(Client(Backend(&quot;Invalid argument: Column families not opened: col11, col10, col9, col8, col7, col6, col5, col4, col3, col2, col1, col0&quot;)))&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2048" PostHistoryTypeId="1" PostId="571" RevisionGUID="3d1bcbb4-51e9-4dbe-a01f-840cb8275104" CreationDate="2022-03-03T05:43:57.677" UserId="427" Text="DB backup and restarting the node with the DB backed up file is not working as expected" ContentLicense="CC BY-SA 4.0" />
  <row Id="2049" PostHistoryTypeId="3" PostId="571" RevisionGUID="3d1bcbb4-51e9-4dbe-a01f-840cb8275104" CreationDate="2022-03-03T05:43:57.677" UserId="427" Text="|substrate-node|database|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2051" PostHistoryTypeId="2" PostId="572" RevisionGUID="19a0726e-41ef-4a13-b45d-81989af1cb0f" CreationDate="2022-03-03T06:12:03.377" UserId="377" Text="I am just starting m new project on substrate. &#xD;&#xA;Which substrate version i should prefer v3.0.0 stable version or the latest version v4.0.0-dev." ContentLicense="CC BY-SA 4.0" />
  <row Id="2053" PostHistoryTypeId="1" PostId="572" RevisionGUID="19a0726e-41ef-4a13-b45d-81989af1cb0f" CreationDate="2022-03-03T06:12:03.377" UserId="377" Text="Which substrate version we should prefer v3.0.0 or latest one?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2054" PostHistoryTypeId="3" PostId="572" RevisionGUID="19a0726e-41ef-4a13-b45d-81989af1cb0f" CreationDate="2022-03-03T06:12:03.377" UserId="377" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2055" PostHistoryTypeId="2" PostId="573" RevisionGUID="26936a62-bcde-4a36-83e9-89278338958d" CreationDate="2022-03-03T06:34:32.183" UserId="544" Text="In my pallet, I have a `StorageDoubleMap` called `MyDoubleMap`. I want to delete all the kv pairs under `key1`. So I may write the code like beolow:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;for (key2, _value) in MyDoubleMap::&lt;T&gt;::iter_prefix(key1) {&#xD;&#xA;	MyDoubleMap::&lt;T&gt;::remove(key1, key2);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Apparently the map was changed during the iteration. Will it be problematic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2057" PostHistoryTypeId="1" PostId="573" RevisionGUID="26936a62-bcde-4a36-83e9-89278338958d" CreationDate="2022-03-03T06:34:32.183" UserId="544" Text="Is it safe to delete elements when iterating through a storage map in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2058" PostHistoryTypeId="3" PostId="573" RevisionGUID="26936a62-bcde-4a36-83e9-89278338958d" CreationDate="2022-03-03T06:34:32.183" UserId="544" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2059" PostHistoryTypeId="2" PostId="574" RevisionGUID="9a2f0d40-c8ed-40ce-9308-c899d98002b8" CreationDate="2022-03-03T07:38:10.087" UserId="299" Text="How do I ensure that the XCM version of two parallel chains is the same, how do I change the XCM version, and how do I view the current XCM version." ContentLicense="CC BY-SA 4.0" />
  <row Id="2061" PostHistoryTypeId="1" PostId="574" RevisionGUID="9a2f0d40-c8ed-40ce-9308-c899d98002b8" CreationDate="2022-03-03T07:38:10.087" UserId="299" Text="How to set my parachain xcm version" ContentLicense="CC BY-SA 4.0" />
  <row Id="2062" PostHistoryTypeId="3" PostId="574" RevisionGUID="9a2f0d40-c8ed-40ce-9308-c899d98002b8" CreationDate="2022-03-03T07:38:10.087" UserId="299" Text="|polkadot|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2067" PostHistoryTypeId="2" PostId="576" RevisionGUID="715f8bed-0cbd-420a-9e34-9056fa228025" CreationDate="2022-03-03T09:09:23.010" UserId="73" Text="As the [docs][1] are mentioning, you will get undefined results. If you want to remove all these elements, you should directly use [`drain_prefix`][2] as this will give you directly what you want.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/frame-support/latest/frame_support/storage/trait.IterableStorageDoubleMap.html#tymethod.iter_prefix&#xD;&#xA;  [2]: https://docs.rs/frame-support/latest/frame_support/storage/trait.IterableStorageDoubleMap.html#tymethod.drain_prefix" ContentLicense="CC BY-SA 4.0" />
  <row Id="2071" PostHistoryTypeId="2" PostId="577" RevisionGUID="caefee2d-d525-4cda-b19f-9dc6fcf6d2f0" CreationDate="2022-03-03T14:53:47.213" UserId="452" Text="This is usually a sign that the database is corrupted." ContentLicense="CC BY-SA 4.0" />
  <row Id="2073" PostHistoryTypeId="2" PostId="578" RevisionGUID="eb17051a-a52c-4751-9d7c-546df92eea3d" CreationDate="2022-03-03T15:48:05.263" UserId="139" Text="I would like to know if `pallet-staking` has any mechanism that facilitates constrains upon the amount of tokens that can be staked. I think polkadot initially came with no particular requirement for minimum stake, but in the chain I am building, I would like to have a minimum stake for the validator to be considered for elections. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2075" PostHistoryTypeId="1" PostId="578" RevisionGUID="eb17051a-a52c-4751-9d7c-546df92eea3d" CreationDate="2022-03-03T15:48:05.263" UserId="139" Text="Is it possible to specify minimum tokens for staking elections?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2076" PostHistoryTypeId="3" PostId="578" RevisionGUID="eb17051a-a52c-4751-9d7c-546df92eea3d" CreationDate="2022-03-03T15:48:05.263" UserId="139" Text="|staking|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2077" PostHistoryTypeId="5" PostId="572" RevisionGUID="48fe1826-89eb-49bc-ab6a-f7fd6194ec6f" CreationDate="2022-03-03T17:42:41.250" UserId="28" Comment="edited body" Text="I am just starting a new project on substrate. &#xD;&#xA;Which substrate version i should prefer v3.0.0 stable version or the latest version v4.0.0-dev." ContentLicense="CC BY-SA 4.0" />
  <row Id="2078" PostHistoryTypeId="4" PostId="572" RevisionGUID="48fe1826-89eb-49bc-ab6a-f7fd6194ec6f" CreationDate="2022-03-03T17:42:41.250" UserId="28" Comment="edited body" Text="Which Substrate version should I use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2079" PostHistoryTypeId="2" PostId="579" RevisionGUID="a31a4727-ada1-4bf5-ab54-959807acbc2d" CreationDate="2022-03-03T19:01:27.167" UserId="28" Text="I would recommend using the latest version of Substrate for any of your projects, otherwise, using an older version will just lead you to need to upgrade at a later point in time.&#xD;&#xA;&#xD;&#xA;For parachain teams, everyone is synchronized with the `polkadot-*` branches which correspond to the Substrate versions used to release the [Polkadot releases](https://github.com/paritytech/polkadot/releases).&#xD;&#xA;&#xD;&#xA;So each time Polkadot has a new release, all the Substrate ecosystem builders update their version of Substrate to the latest release. This is the best cadence to follow." ContentLicense="CC BY-SA 4.0" />
  <row Id="2081" PostHistoryTypeId="2" PostId="580" RevisionGUID="c480b376-6f1d-4b6e-8fe3-1b1673da21a3" CreationDate="2022-03-03T20:21:34.770" UserId="499" Text="Ok - I found that the [Utility Pallet's](https://github.com/paritytech/substrate/tree/master/frame/utility) [as_derivative](https://github.com/paritytech/substrate/blob/master/frame/utility/src/lib.rs#L259) does exactly what I want!&#xD;&#xA;&#xD;&#xA;The docs of the Utility Pallet say:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Each account has 2 * 2**16 possible &quot;pseudonyms&quot; (alternative account&#xD;&#xA;&gt; IDs) and these can be stacked. This can be useful as a key management&#xD;&#xA;&gt; tool, where you need multiple distinct accounts (e.g. as controllers&#xD;&#xA;&gt; for many staking accounts), but where it's perfectly fine to have each&#xD;&#xA;&gt; of them controlled by the same underlying keypair.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Given that I want to harness the [native Schnorr compatibility](https://wiki.polkadot.network/docs/learn-cryptography#keypairs-and-signing) of Polkadot's cryptographic scheme, this should be all that I need.&#xD;&#xA;&#xD;&#xA;Now I just have to figure out how to replicate the pseudonym derivation (maybe with some [variant of this](https://github.com/lsaether/msig-util)), but that's another job." ContentLicense="CC BY-SA 4.0" />
  <row Id="2083" PostHistoryTypeId="2" PostId="581" RevisionGUID="48f29682-68cc-4a65-9567-e9d5d3410fc7" CreationDate="2022-03-03T21:27:28.550" UserId="34" Text="The pallet itself provides for this, and there is (at the time of writing) a proposal to do just what you are after on Polkadot: https://polkadot.polkassembly.io/post/905&#xD;&#xA;&#xD;&#xA;Here is the type described: https://paritytech.github.io/substrate/master/pallet_staking/type.MinValidatorBond.html&#xD;&#xA;&#xD;&#xA;And here is the call to set it in source: https://github.com/paritytech/substrate/blob/21cadf1af453716aea1e5362c83aa314811da657/frame/staking/src/pallet/mod.rs#L1530-L1561" ContentLicense="CC BY-SA 4.0" />
  <row Id="2085" PostHistoryTypeId="2" PostId="582" RevisionGUID="de0e8a97-73b2-497f-a48b-af8bc5aaeb0d" CreationDate="2022-03-03T21:33:46.260" UserId="543" Text="I'm running into an issue where I cannot deploy contracts to my chain, any help is appreciated.&#xD;&#xA;&#xD;&#xA;I'm using the same setup as: https://github.com/paritytech/substrate/blob/632b32300eb9376767c2ae7b38e79b3f7f5329b1/bin/node/runtime/src/lib.rs#L887-L903 (as referenced in the guide here: https://docs.substrate.io/how-to-guides/v3/pallet-design/contracts-pallet/) to integrate with the contracts pallet and rpc (using version 4.0.0-dev) and regardless of the funds held by an account (using 1 &lt;&lt; 60 as default balance in my chain spec), I receive the &quot;**NewContractNotFunded**&quot; error when trying to deploy any contract. Is this an issue with version 4.0.0-dev, or an issue with my setup? Is a rebase required or is there something else I can do?&#xD;&#xA;&#xD;&#xA;My runtime config is here: https://github.com/driemworks/substrate/blob/1fabe26f239166e210f723756812d7eca069e41e/bin/node-template/runtime/src/lib.rs#L270&#xD;&#xA;&#xD;&#xA;My initial thoughts were that I need to upgrade my fork to the latest substrate master branch. However, a dependency in my fork (rust-ipfs) requires an older version of libp2p (0.39.1) that brings in an older version of libp2p-noise (0.32.0). With the changes made to the master branch, compilation fails with:&#xD;&#xA;&#xD;&#xA;        error[E0282]: type annotations needed&#xD;&#xA;       --&gt; /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-noise-0.32.0/src/protocol/x25519.rs:221:45&#xD;&#xA;        |&#xD;&#xA;    221 |         curve25519_sk.copy_from_slice(&amp;hash.as_ref()[..32]);&#xD;&#xA;        |                                        -----^^^^^^--&#xD;&#xA;        |                                        |    |&#xD;&#xA;        |                                        |    cannot infer type for type parameter `T` declared on the trait `AsRef`&#xD;&#xA;        |                                        this method call resolves to `&amp;T`&#xD;&#xA;        |&#xD;&#xA;        = note: type must be known at this point&#xD;&#xA;&#xD;&#xA;I've tried downgrading libp2p back to 0.39.1, however, I encounter the issue regardless. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2087" PostHistoryTypeId="1" PostId="582" RevisionGUID="de0e8a97-73b2-497f-a48b-af8bc5aaeb0d" CreationDate="2022-03-03T21:33:46.260" UserId="543" Text="Using contracts pallet with version 4.0.0-dev" ContentLicense="CC BY-SA 4.0" />
  <row Id="2088" PostHistoryTypeId="3" PostId="582" RevisionGUID="de0e8a97-73b2-497f-a48b-af8bc5aaeb0d" CreationDate="2022-03-03T21:33:46.260" UserId="543" Text="|rust|libp2p|rust-ipfs|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2089" PostHistoryTypeId="2" PostId="583" RevisionGUID="a1fad8ab-74cf-4f1c-8e5f-e59e85705151" CreationDate="2022-03-03T21:49:58.597" UserId="34" Text="The [docs on this pallet](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/index.html#signed-phase) may help. As well as reading the [signed phase source](https://github.com/paritytech/substrate/blob/master/frame/election-provider-multi-phase/src/signed.rs) to see the mechanics more in detail. &#xD;&#xA;&#xD;&#xA;The [`sumbit` callable](https://github.com/paritytech/substrate/blob/master/frame/election-provider-multi-phase/src/lib.rs) is open to anyone to use, so long as they pass the typical `let who = ensure_signed(origin)?;` check and conply with the deposit mechanisms imposed, and like all callables, there is a weight and thus a fee that is paid to call it. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2091" PostHistoryTypeId="4" PostId="582" RevisionGUID="93a11461-19af-4401-b428-54b5078c75b8" CreationDate="2022-03-03T22:56:34.323" UserId="543" Comment="edited title" Text="NewContractNotFunded error using contracts pallet with version 4.0.0-dev" ContentLicense="CC BY-SA 4.0" />
  <row Id="2092" PostHistoryTypeId="2" PostId="584" RevisionGUID="e68c953d-e55f-41a0-b985-c691bc2a1765" CreationDate="2022-03-04T00:03:30.100" UserId="245" Text="I'd like to get if the extrinsic completed without any extrinsic errors and get the errors if any. `result.isError` returns false when there's an error.&#xD;&#xA;&#xD;&#xA;Could this be because I return `DispatchResult` instead of `DispatchResultWithPostInfo` in my pallet?&#xD;&#xA;&#xD;&#xA;As this [GitHub issue comment][1] suggests, it can be done by getting the block details. But, I'm looking for a more simplified answer.&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;myTx.signAndSend(pair, (result) =&gt; {&#xD;&#xA;    console.log(`Current status is ${result.status}`);&#xD;&#xA;&#xD;&#xA;    console.log('has error', result.isError); // false&#xD;&#xA;&#xD;&#xA;    if (result.isError) {&#xD;&#xA;        console.log('dispatchError', result.dispatchError?.toHuman())&#xD;&#xA;        console.log('internalError', result.internalError)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    if (result.status.isInBlock) {&#xD;&#xA;        console.log(`Transaction included at blockHash ${result.status.asInBlock}`);&#xD;&#xA;    } else if (result.status.isFinalized) {&#xD;&#xA;        console.log(`Transaction finalized at blockHash ${result.status.asFinalized}`);&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/issues/3027#issuecomment-756009635" ContentLicense="CC BY-SA 4.0" />
  <row Id="2094" PostHistoryTypeId="1" PostId="584" RevisionGUID="e68c953d-e55f-41a0-b985-c691bc2a1765" CreationDate="2022-03-04T00:03:30.100" UserId="245" Text="How to know if the extrinsic completed without any extrinsic errors" ContentLicense="CC BY-SA 4.0" />
  <row Id="2095" PostHistoryTypeId="3" PostId="584" RevisionGUID="e68c953d-e55f-41a0-b985-c691bc2a1765" CreationDate="2022-03-04T00:03:30.100" UserId="245" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2096" PostHistoryTypeId="2" PostId="585" RevisionGUID="5768f1e5-49ea-45a6-8283-16d54285609b" CreationDate="2022-03-04T00:14:12.107" UserId="29" Text="If there is a `dispatchError` then the transaction failed.&#xD;&#xA;&#xD;&#xA;Have you tried something like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;myTx.signAndSend(sender, ({ status, events, dispatchError }) =&gt; {&#xD;&#xA;    // status would still be set, but in the case of error we can shortcut&#xD;&#xA;    // to just check it (so an error would indicate InBlock or Finalized)&#xD;&#xA;    if (dispatchError) {&#xD;&#xA;      if (dispatchError.isModule) {&#xD;&#xA;        // for module errors, we have the section indexed, lookup&#xD;&#xA;        const decoded = api.registry.findMetaError(dispatchError.asModule);&#xD;&#xA;        const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;        console.log(`${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;      } else {&#xD;&#xA;        // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;        console.log(dispatchError.toString());&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event" ContentLicense="CC BY-SA 4.0" />
  <row Id="2098" PostHistoryTypeId="5" PostId="573" RevisionGUID="87670351-0daa-48b6-8392-ccca8d7a1f01" CreationDate="2022-03-04T00:17:16.970" UserId="29" Comment="deleted 1 character in body" Text="In my pallet, I have a `StorageDoubleMap` called `MyDoubleMap`. I want to delete all the kv pairs under `key1`. So I may write the code like below:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;for (key2, _value) in MyDoubleMap::&lt;T&gt;::iter_prefix(key1) {&#xD;&#xA;	MyDoubleMap::&lt;T&gt;::remove(key1, key2);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Apparently the map was changed during the iteration. Will it be problematic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2099" PostHistoryTypeId="5" PostId="578" RevisionGUID="f04ddda5-81f2-4640-9a21-c544baa72d38" CreationDate="2022-03-04T00:19:01.533" UserId="29" Comment="added 1 character in body" Text="I would like to know if `pallet-staking` has any mechanism that facilitates constraints upon the amount of tokens that can be staked. I think polkadot initially came with no particular requirement for minimum stake, but in the chain I am building, I would like to have a minimum stake for the validator to be considered for elections. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2100" PostHistoryTypeId="2" PostId="586" RevisionGUID="5f13a804-18ab-4a6f-843f-6ee67e16d220" CreationDate="2022-03-04T00:50:57.340" UserId="223" Text="**tl;dr** The `Config` types in your question are configuration parameters for the deposit of submitting a signed solution and reward for a signed solution accepted at the end of the signed phase.&#xD;&#xA;&#xD;&#xA;### Context&#xD;&#xA;&#xD;&#xA; These are configurations for submitting solutions during the signed phase. For the canonical explanation of the phases see the [module docs](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/index.html). &#xD;&#xA;&#xD;&#xA;For quick a background though, the 3 phases supported by the election provider multi phase pallet are:&#xD;&#xA;&#xD;&#xA;- Off Phase: Nothing is happening. At the threshold of the off and signed phase is when the election snapshot is taken. The off phase starts when the unsigned phase ends.&#xD;&#xA;- Signed Phase: Anyone can submit a solution via the [submit extrinsic](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/pallet/enum.Call.html#variant.submit). When a user submits a solution, some funds are reserved as a deposit. More on this below.&#xD;&#xA;- Unsigned Phase: Block authors can submit an inherent with a solution mined by the offchain worker. &#xD;&#xA;&#xD;&#xA;At the end of the signed phase the submitted solution with the best score is checked to ensure the claimed score matches the actual score. If it does we save it as the queued solution and reward the submitter, but if it does not we discard the solution, slash the submitters deposit, and repeat the process for the next best solution (see [here for high level docs](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/index.html#signed-phase)). When a solution is determined to have a correct score, the submitter is refunded the extrinsic fee, and the deposits based on `SignedDepositBase`, `SignedDepositByte` and a reward based on `SignedRewardBase` - more on this below.&#xD;&#xA;&#xD;&#xA;Here is an example of the flow for checking solutions at the end of the signed phase (see module docs [here](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/index.html#signed-phase))&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;+-------------------------------+&#xD;&#xA;|Solution(score=20, valid=false)| +--&gt;  Slashed&#xD;&#xA;+-------------------------------+&#xD;&#xA;|Solution(score=15, valid=true )| +--&gt;  Rewarded, Saved&#xD;&#xA;+-------------------------------+&#xD;&#xA;|Solution(score=10, valid=true )| +--&gt;  Discarded&#xD;&#xA;+-------------------------------+&#xD;&#xA;|Solution(score=05, valid=false)| +--&gt;  Discarded&#xD;&#xA;+-------------------------------+&#xD;&#xA;|             None              |&#xD;&#xA;+-------------------------------+&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Answer&#xD;&#xA;&#xD;&#xA; The values are for configuring the deposit of submitting a solution and the reward for the highest scored solution at the end fo the signed phase.&#xD;&#xA;&#xD;&#xA;Both values are calculated from within [`Call::submit`](https://github.com/paritytech/substrate/blob/15b8fd5af658810035ec2757b1a977db17f7aab4/frame/election-provider-multi-phase/src/lib.rs#L967).&#xD;&#xA;&#xD;&#xA;The deposit is calculated by `deposit_for`, using `SignedDepositByte` and `SignedDepositBase`. `SignedDepositByte` is multiplied by the length of the encoded solution to create 1 o 3 components for the deposit. `SignedDepositBase` is a static component of the deposit that is added to the other deposit components to create the final deposit. (Note the estimated weight for the feasibility check of the solution is also multiplied by `SignedDepositWeight` to create third deposit component). This deposit is then reserved [here](https://github.com/paritytech/substrate/blob/15b8fd5af658810035ec2757b1a977db17f7aab4/frame/election-provider-multi-phase/src/lib.rs#L1011). Below is the exact logic:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    /// Collect a sufficient deposit to store this solution.&#xD;&#xA;    ///&#xD;&#xA;    /// The deposit is composed of 3 main elements:&#xD;&#xA;    ///&#xD;&#xA;    /// 1. base deposit, fixed for all submissions.&#xD;&#xA;    /// 2. a per-byte deposit, for renting the state usage.&#xD;&#xA;    /// 3. a per-weight deposit, for the potential weight usage in an upcoming on_initialize&#xD;&#xA;    pub fn deposit_for(&#xD;&#xA;        raw_solution: &amp;RawSolution&lt;SolutionOf&lt;T&gt;&gt;,&#xD;&#xA;        size: SolutionOrSnapshotSize,&#xD;&#xA;    ) -&gt; BalanceOf&lt;T&gt; {&#xD;&#xA;        let encoded_len: u32 = raw_solution.encoded_size().saturated_into();&#xD;&#xA;        let encoded_len: BalanceOf&lt;T&gt; = encoded_len.into();&#xD;&#xA;        let feasibility_weight = Self::feasibility_weight_of(raw_solution, size);&#xD;&#xA;&#xD;&#xA;        let len_deposit = T::SignedDepositByte::get().saturating_mul(encoded_len);&#xD;&#xA;        let weight_deposit =&#xD;&#xA;            T::SignedDepositWeight::get().saturating_mul(feasibility_weight.saturated_into());&#xD;&#xA;&#xD;&#xA;        T::SignedDepositBase::get()&#xD;&#xA;            .saturating_add(len_deposit)&#xD;&#xA;            .saturating_add(weight_deposit)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[source](https://github.com/paritytech/substrate/blob/15b8fd5af658810035ec2757b1a977db17f7aab4/frame/election-provider-multi-phase/src/signed.rs#L468-L491)&#xD;&#xA;&#xD;&#xA;The reward is calculated by estimating the fee the user paid to submit the solution and adding that to the `SignedRewardBase`. In practical terms, at the end of the signed phase, if the user submitted a wining solution, the cost of submission is reimbursed and they are given an award of `SignedRewardBase`. The exact logic is below:&#xD;&#xA;&#xD;&#xA;```rust  &#xD;&#xA;  let reward = {&#xD;&#xA;        let call =&#xD;&#xA;            Call::submit { raw_solution: raw_solution.clone(), num_signed_submissions };&#xD;&#xA;        let call_fee = T::EstimateCallFee::estimate_call_fee(&amp;call, None.into());&#xD;&#xA;        T::SignedRewardBase::get().saturating_add(call_fee)&#xD;&#xA;    };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[source](https://github.com/paritytech/substrate/blob/15b8fd5af658810035ec2757b1a977db17f7aab4/frame/election-provider-multi-phase/src/lib.rs#L990-L994)&#xD;&#xA;&#xD;&#xA;Both the reward and deposit are stored with the submitted solution. Lets look at the logic for a when a winning solution is accepted to see how the reward and deposit are used:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    /// Helper function for the case where a solution is accepted in the signed phase.&#xD;&#xA;    ///&#xD;&#xA;    /// Extracted to facilitate with weight calculation.&#xD;&#xA;    ///&#xD;&#xA;    /// Infallible&#xD;&#xA;    pub fn finalize_signed_phase_accept_solution(&#xD;&#xA;        ready_solution: ReadySolution&lt;T::AccountId&gt;,&#xD;&#xA;        who: &amp;T::AccountId,&#xD;&#xA;        deposit: BalanceOf&lt;T&gt;,&#xD;&#xA;        reward: BalanceOf&lt;T&gt;,&#xD;&#xA;    ) {&#xD;&#xA;        // write this ready solution.&#xD;&#xA;        &lt;QueuedSolution&lt;T&gt;&gt;::put(ready_solution);&#xD;&#xA;&#xD;&#xA;        // emit reward event&#xD;&#xA;        Self::deposit_event(crate::Event::Rewarded { account: who.clone(), value: reward });&#xD;&#xA;&#xD;&#xA;        // unreserve deposit.&#xD;&#xA;        let _remaining = T::Currency::unreserve(who, deposit);&#xD;&#xA;        debug_assert!(_remaining.is_zero());&#xD;&#xA;&#xD;&#xA;        // Reward.&#xD;&#xA;        let positive_imbalance = T::Currency::deposit_creating(who, reward);&#xD;&#xA;        T::RewardHandler::on_unbalanced(positive_imbalance);&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[source](https://github.com/paritytech/substrate/blob/15b8fd5af658810035ec2757b1a977db17f7aab4/frame/election-provider-multi-phase/src/signed.rs#L416-L441)&#xD;&#xA;&#xD;&#xA;The deposit is unreserved (it was originally reserved in `Call:submit`) and the reward is deposited into the submitters account. Note that in polkadot the `RewardHandler` is a default impl, thus the rewards are “minted”, increasing the total issuance.&#xD;&#xA;&#xD;&#xA;Finally, lets take a look at what happens when a solution is rejected:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    /// Helper function for the case where a solution is accepted in the rejected phase.&#xD;&#xA;    ///&#xD;&#xA;    /// Extracted to facilitate with weight calculation.&#xD;&#xA;    ///&#xD;&#xA;    /// Infallible&#xD;&#xA;    pub fn finalize_signed_phase_reject_solution(who: &amp;T::AccountId, deposit: BalanceOf&lt;T&gt;) {&#xD;&#xA;        Self::deposit_event(crate::Event::Slashed { account: who.clone(), value: deposit });&#xD;&#xA;        let (negative_imbalance, _remaining) = T::Currency::slash_reserved(who, deposit);&#xD;&#xA;        debug_assert!(_remaining.is_zero());&#xD;&#xA;        T::SlashHandler::on_unbalanced(negative_imbalance);&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[source](https://github.com/paritytech/substrate/blob/15b8fd5af658810035ec2757b1a977db17f7aab4/frame/election-provider-multi-phase/src/signed.rs#L443-L453)&#xD;&#xA;&#xD;&#xA;The deposit is slashed from the users reserved funds. Note that in polkadot the `SlashHandler` is a default impl, thus the slashes are “burned”, decreasing the total issuance.&#xD;&#xA;&#xD;&#xA;### Pulling it all together&#xD;&#xA;&#xD;&#xA;The one missing piece is: how does one submit a signed solution? Parity has been working on a staking election solution miner. At the time of writing it lives [here](https://github.com/paritytech/polkadot/tree/master/utils/staking-miner), in the polkadot repo. In theory this can be made generic for any chain that uses the staking and election provider multi pallets, but it was setup in the polkadot repo to have easy access to the concrete runtime types. It is still in development but in the future Parity hopes to see many miner implementations that compete on speed and, more importantly, the quality of the solution (which can be done by implementing different algorithms). " ContentLicense="CC BY-SA 4.0" />
  <row Id="2102" PostHistoryTypeId="2" PostId="587" RevisionGUID="b18619b8-6953-4b1e-b663-65e98468aa03" CreationDate="2022-03-04T02:25:36.090" UserId="129" Text="I want to decode the contract call data and event data saved in a block. How can I do that?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1][![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/piS9V.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Btrto.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2104" PostHistoryTypeId="1" PostId="587" RevisionGUID="b18619b8-6953-4b1e-b663-65e98468aa03" CreationDate="2022-03-04T02:25:36.090" UserId="129" Text="How to decode smart contract call and event data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2105" PostHistoryTypeId="3" PostId="587" RevisionGUID="b18619b8-6953-4b1e-b663-65e98468aa03" CreationDate="2022-03-04T02:25:36.090" UserId="129" Text="|polkadot-js|smart-contract|events|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2106" PostHistoryTypeId="2" PostId="588" RevisionGUID="d5199ada-e4d5-49e6-864c-957709fc6dc6" CreationDate="2022-03-04T04:57:24.693" UserId="532" Text="I send the trsanction by substrateinterface. And get the keypaire and call &#xD;&#xA;```&#xD;&#xA;call_module = &quot;Assets&quot;&#xD;&#xA;call_function = 'transfer'&#xD;&#xA;call_params = {&#xD;&#xA;    &quot;id&quot;: asset_id,&#xD;&#xA;    &quot;target&quot;: target,&#xD;&#xA;    'amount': amount,&#xD;&#xA; }&#xD;&#xA;```&#xD;&#xA;then, sign the transaction by ```substrate.create_signed_extrinsic&quot;```&#xD;&#xA;the error is&#xD;&#xA;```raise ValueError('Element &quot;{}&quot; of struct is missing in given value'.format(key))&#xD;&#xA;ValueError: Element &quot;asset_id&quot; of struct is missing in given value```." ContentLicense="CC BY-SA 4.0" />
  <row Id="2108" PostHistoryTypeId="1" PostId="588" RevisionGUID="d5199ada-e4d5-49e6-864c-957709fc6dc6" CreationDate="2022-03-04T04:57:24.693" UserId="532" Text="How to solve the issue&quot;Element &quot;asset_id&quot; of struct is missing in given value&quot; when I send a token transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="2109" PostHistoryTypeId="3" PostId="588" RevisionGUID="d5199ada-e4d5-49e6-864c-957709fc6dc6" CreationDate="2022-03-04T04:57:24.693" UserId="532" Text="|python|assets|substrateinterface|transfer|statemine|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2110" PostHistoryTypeId="2" PostId="589" RevisionGUID="1d112354-7084-46c1-af68-21bfb8d071c1" CreationDate="2022-03-04T06:02:53.347" UserId="551" Text="I'm working on a project that uses Substrate in the backend.  The System I am working on is written with Elixir and so I have a rustler NIF (Erlang/Elixir Native Function interface) for interacting with subxt and our substrate client.  A couple days ago, we bumped our subxt version up to the current dev branch.  I am running into major issues trying to use the `filter_events()` event filter though because of the nature of how the Rustler NIF needs to work. &#xD;&#xA;&#xD;&#xA;As a basic rundown, Rustler allows you to define native references and pass them back and forth between the Erlang Virtual Machine. In the case of a event listener, we are talking about a long running loop that iterates over the stream of events and passes them back in structs that can be handled by an associated Elixir Process.  The issue with the new way of dealing with the Event's stream comes from the fact that some of the new structs don't implement the `Send` trait.  More specifically: `FilteredEventDetails` and `Events`. Also, on the other side, the Env/Owned_Env for Rustler also doesn't implement `Send` which makes this tricky.   &#xD;&#xA;&#xD;&#xA;In the original code, I would pass in the client as a Elixir Term and decode it into the client type.  It would reveal the runtime and use the RPC to subscribe to the events.  The listener would match on each of the pallet and variant strings that matched the events that were needed and pass them directly back to a elixir process using an owned environment.&#xD;&#xA;&#xD;&#xA;Here is a snippet:&#xD;&#xA;```rust&#xD;&#xA;let client: ResourceArc&lt;ClientResource&gt; = client.decode().expect(&quot;invalid client&quot;);&#xD;&#xA;let pid = env.pid();&#xD;&#xA;&#xD;&#xA;if let Some(client) = (*client).0.clone() {&#xD;&#xA;    // Alias for tokio::task::spawn on the global runtime.&#xD;&#xA;    let handle = spawn(async move {&#xD;&#xA;        let client = client.clone();&#xD;&#xA;        let runtime = client.runtime().client.clone();&#xD;&#xA;        // Elixir Owned_env&#xD;&#xA;        let mut owned_env = OwnedEnv::new();&#xD;&#xA;&#xD;&#xA;        let sub = runtime&#xD;&#xA;            .rpc()&#xD;&#xA;            .subscribe_events()&#xD;&#xA;            .await&#xD;&#xA;            .expect(&quot;unable to subscribe&quot;);&#xD;&#xA;        // event decoder and subscription&#xD;&#xA;        let decoder = runtime.events_decoder();&#xD;&#xA;        let mut sub = EventSubscription::new(sub, decoder);&#xD;&#xA;        // iterate through all of the events&#xD;&#xA;        while let Some(result) = sub.next().fuse().await {&#xD;&#xA;&#xD;&#xA;            if let Ok(res) = result {&#xD;&#xA;                match (&amp;res.pallet, &amp;res.variant) {&#xD;&#xA;                    (p, v) if p == &quot;Pallet&quot; &amp;&amp; v == &quot;Variant&quot; =&gt; {&#xD;&#xA;                        // decode the Data event. &#xD;&#xA;                        let decoded = Data::decode(&amp;mut &amp;res.data[..]);&#xD;&#xA;                        ...&#xD;&#xA;                        match decoded {&#xD;&#xA;                          Ok(Data { field_0, field_1, .... }) =&gt; {&#xD;&#xA;                               // Send the data event back to Elixir in an ExData struct.&#xD;&#xA;                               owned_env.send_and_clear(&amp;pid, |e| {&#xD;&#xA;                                  crate::atoms::data(),&#xD;&#xA;                                  ExData { field_0, field_1, ...}&#xD;&#xA;                                });&#xD;&#xA;                             }&#xD;&#xA;                        }&#xD;&#xA;   ....&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The outer functions are not async and the system uses a global lazy tokio runtime to deal with futures and streams. &#xD;&#xA;&#xD;&#xA;```runtime&#xD;&#xA;static RUNTIME: Lazy&lt;Runtime&gt; = Lazy::new(|| Runtime::new().expect(&quot;failed to create runtime&quot;));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here's what the new code looks like in comparison:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let handle = spawn(async move {&#xD;&#xA;    ...&#xD;&#xA;    let runtime = client.runtime();&#xD;&#xA;    let events = runtime.events();&#xD;&#xA;    // First `Send` error is here.&#xD;&#xA;    let sub = events.subscribe().await.expect(&quot;failed to subscribe&quot;);&#xD;&#xA;    let events = sub.filter_events::&lt;(Event_1, Event_2, Event_3, ...)&gt;();&#xD;&#xA;    // Second `Send` error from iterator (next) call.&#xD;&#xA;    while let Some(res) = events.next().await {&#xD;&#xA;       if let Ok(result) = res {&#xD;&#xA;          match result.event {&#xD;&#xA;            (Some(Event_1 { field_1, field_2, ... }, _, _, _, ...)) =&gt; {&#xD;&#xA;              owned_env.send_and_clear(&amp;pid, |e| {&#xD;&#xA;                crate::atoms::event_1(),&#xD;&#xA;                ExEvent_1 { field_1, field_2, ... }  &#xD;&#xA;              });&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;       } else {&#xD;&#xA;       ....&#xD;&#xA;       }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've tried a few ways to attempt to squash these `Send` errors; I've attempted to use `pin_mut!` and `Box::pin()` on the two types, I've tried implementing Wrapper types that do implement `Send`, I've tried using `LocalSet` and `tokio::task::spawn_local` but none of these seem to work as solutions for this particular issue.  My latest idea, saw me building the client in the spawned task with the listener but it also saw failure.  Does anyone have any ideas of how I can deal with this issue?  I've looked at all of the subxt examples, and most if not all of them do feature iterators but also are inside of a local thread via `async-std::test` or `async-std::main` neither of which I can use for this particular API.  I know its probably possible for me to do some kind of trickery with channels where the messages are sent back to some other callback function but I want to avoid this if possible as its not very compatible with the Rustler Idioms.   " ContentLicense="CC BY-SA 4.0" />
  <row Id="2112" PostHistoryTypeId="1" PostId="589" RevisionGUID="1d112354-7084-46c1-af68-21bfb8d071c1" CreationDate="2022-03-04T06:02:53.347" UserId="551" Text="Filter Events with subxt over multiple threads" ContentLicense="CC BY-SA 4.0" />
  <row Id="2113" PostHistoryTypeId="3" PostId="589" RevisionGUID="1d112354-7084-46c1-af68-21bfb8d071c1" CreationDate="2022-03-04T06:02:53.347" UserId="551" Text="|rust|events|subxt|streams|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2114" PostHistoryTypeId="2" PostId="590" RevisionGUID="096bb513-c70b-4eaa-9019-5316ac24e0af" CreationDate="2022-03-04T07:09:17.660" UserId="104" Text="The XCM version is located in the XCM pallet, and there are two ways of setting it: either via the pallet's `GenesisConfig` by filling out the `safe_xcm_version` field during runtime construction, or dynamically via the `force_default_xcm_version` extrinsic. As a corollary, the supported XCM version that the XCM pallet supports can easily viewed by querying its `SafeXcmVersion` storage value.&#xD;&#xA;&#xD;&#xA;XCM versionining between parachains do not need to be manually handled most of the time if they both use the XCM pallet as their `SubscriptionService` in their XCM configuration, since the XCM pallet handles version negotiation and conversion between the source and destination automatically." ContentLicense="CC BY-SA 4.0" />
  <row Id="2116" PostHistoryTypeId="2" PostId="591" RevisionGUID="5fd6e7e4-bc20-4fc3-863b-6185166882ac" CreationDate="2022-03-04T07:42:39.067" UserId="104" Text="Are there any differences between XCM and XCMP? I hear these words being thrown around and I thought they meant the same concept, but in some contexts, they appear to be different." ContentLicense="CC BY-SA 4.0" />
  <row Id="2118" PostHistoryTypeId="1" PostId="591" RevisionGUID="5fd6e7e4-bc20-4fc3-863b-6185166882ac" CreationDate="2022-03-04T07:42:39.067" UserId="104" Text="What is the difference between XCM and XCMP?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2119" PostHistoryTypeId="3" PostId="591" RevisionGUID="5fd6e7e4-bc20-4fc3-863b-6185166882ac" CreationDate="2022-03-04T07:42:39.067" UserId="104" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2120" PostHistoryTypeId="2" PostId="592" RevisionGUID="7c9e1e83-7027-40a3-9f93-7758d5991b79" CreationDate="2022-03-04T07:42:39.067" UserId="104" Text="XCM and XCMP are different concepts.&#xD;&#xA;&#xD;&#xA;To explain from its etymology, XCM stands for Cross Consensus Messages, whereas XCMP is short for Cross Consensus Message Passing. Both names should give you a hint that the former is a messaging format, while the latter is a transport protocol.&#xD;&#xA;&#xD;&#xA;Or to use an analogy from Web 2.0, XCM is to HTML and XCMP is to HTTP. In short, XCM is _what gets delivered_, whereas XCMP is _the delivery mechanism_.&#xD;&#xA;&#xD;&#xA;The additional complication here is that XCMP may refer to a general concept that encapsulates all other kinds of transport mechanisms for XCM, such as DMP, UMP and HRMP, _or_ it may refer to a specific type of transport mechanism where parachains open a communication channel to another in order to pass XCM messages directly." ContentLicense="CC BY-SA 4.0" />
  <row Id="2123" PostHistoryTypeId="5" PostId="592" RevisionGUID="852fdc43-45fa-4486-8112-0948c9115c51" CreationDate="2022-03-04T10:15:14.367" UserId="104" Comment="Specify XCMP channels as unidirectional" Text="XCM and XCMP are different concepts.&#xD;&#xA;&#xD;&#xA;To explain from its etymology, XCM stands for Cross Consensus Messages, whereas XCMP is short for Cross Consensus Message Passing. Both names should give you a hint that the former is a messaging format, while the latter is a transport protocol.&#xD;&#xA;&#xD;&#xA;Or to use an analogy from Web 2.0, XCM is to HTML and XCMP is to HTTP. In short, XCM is _what gets delivered_, whereas XCMP is _the delivery mechanism_.&#xD;&#xA;&#xD;&#xA;The additional complication here is that XCMP may refer to a general concept that encapsulates all other kinds of transport mechanisms for XCM, such as DMP, UMP and HRMP, _or_ it may refer to a specific type of transport mechanism where parachains open a unidirectional communication channel to another in order to pass XCM messages directly." ContentLicense="CC BY-SA 4.0" />
  <row Id="2128" PostHistoryTypeId="2" PostId="594" RevisionGUID="00aa3063-d5eb-41b7-8e0a-8656128c6fb7" CreationDate="2022-03-04T13:12:00.273" UserId="139" Text="The substrate node template comes with `Unlicense` whilst the `substrate` code base itself comes with a split license of `Apache 2.0` and `GPL3`. What does this mean for a developer trying to build and deploy a public chain using substrate node template? What should they keep in mind when trying to distribute the binaries/source code? Are they required to explicitly show code changes or can they keep the code modifications private? Does it make a difference if the end chain was built using the `substrate` bin which is licensed as `Apache 2.0` or using `substrate-node-template` which is `Unlicense`? " ContentLicense="CC BY-SA 4.0" />
  <row Id="2130" PostHistoryTypeId="1" PostId="594" RevisionGUID="00aa3063-d5eb-41b7-8e0a-8656128c6fb7" CreationDate="2022-03-04T13:12:00.273" UserId="139" Text="How should we choose a license?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2131" PostHistoryTypeId="3" PostId="594" RevisionGUID="00aa3063-d5eb-41b7-8e0a-8656128c6fb7" CreationDate="2022-03-04T13:12:00.273" UserId="139" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2133" PostHistoryTypeId="2" PostId="595" RevisionGUID="66098ce4-bc0f-4cc7-b358-40a36bec2a94" CreationDate="2022-03-04T15:00:15.987" UserId="285" Text="I would like to add more validation to a third party pallet before calling it from my pallet. The setup I have is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ThirdPartyPallet &#xD;&#xA;  - base_extrinsic(...)&#xD;&#xA;&#xD;&#xA;MyPallet&#xD;&#xA; - custom_base_extrinsic(...)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What i would like to do is run some custom code (like extra validation) before invoking `ThirdPartyPallet.base_extrinsic()`.&#xD;&#xA;&#xD;&#xA;In `MyPallet` I have &quot;inherited&quot; from `ThirdPartyPallet`:&#xD;&#xA;```&#xD;&#xA;pub trait Config: SendTransactionTypes&lt;Call&lt;Self&gt;&gt; + system::Config + third_party_pallet::Config&#xD;&#xA;```&#xD;&#xA;and i can call `base_extrinsic` like this:&#xD;&#xA;```&#xD;&#xA;fn custom_base_extrinsic(origin) -&gt; DispatchResult {&#xD;&#xA;  let signer = ensure_signed(origin)?;&#xD;&#xA;  //Custom code will go here&#xD;&#xA;&#xD;&#xA;  //Here i will call the third party pallet's extrinsic&#xD;&#xA;  third_party_pallet::Module::&lt;T&gt;::base_extrinsic(&lt;T as frame_system::Config&gt;::Origin::from(RawOrigin::Signed(signer)))?;&#xD;&#xA;&#xD;&#xA;  Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This feels like a workaround so my question is, is this allowed/supported. Is there a better way to do this? &#xD;&#xA;&#xD;&#xA;I know there is a `dispatch()` method but I haven't seen any examples where the Call is constructed within the runtime. All usages of `dispatch()` are from Call passed as a parameter to an extrinsic.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2135" PostHistoryTypeId="1" PostId="595" RevisionGUID="66098ce4-bc0f-4cc7-b358-40a36bec2a94" CreationDate="2022-03-04T15:00:15.987" UserId="285" Text="Extending third party pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="2136" PostHistoryTypeId="3" PostId="595" RevisionGUID="66098ce4-bc0f-4cc7-b358-40a36bec2a94" CreationDate="2022-03-04T15:00:15.987" UserId="285" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2137" PostHistoryTypeId="2" PostId="596" RevisionGUID="4a644d56-9265-414b-9b36-55f171bc2db0" CreationDate="2022-03-04T15:11:48.570" UserId="28" Text="In general, the best thing would be if the third party pallet exposed a set of APIs which would allow it to be extensible out of the box and in ways that would be helpful for you.&#xD;&#xA;&#xD;&#xA;However, your approach is totally okay, and something that I [wrote about](https://www.shawntabrizi.com/substrate/extending-substrate-runtime-modules/) a long while back.&#xD;&#xA;&#xD;&#xA;The important thing to do as a follow up to this is to make sure that this pallet you are extending is not callable by setting up a call filter, or hiding the `Call` attribute in your `construct_runtime!`, otherwise someone will just bypass your checks by calling the original pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="2140" PostHistoryTypeId="2" PostId="597" RevisionGUID="a10651c5-ae36-47e9-a3fe-4853ddeb4638" CreationDate="2022-03-04T15:59:13.187" UserId="28" Text="It seems you should review the different software license options available and what they provide:&#xD;&#xA;&#xD;&#xA;https://choosealicense.com/licenses/&#xD;&#xA;&#xD;&#xA;I am not a lawyer, this is not legal advice.&#xD;&#xA;&#xD;&#xA;Apache 2.0 was chosen for Substrate because it is a permissive open source license which allows people to build commercial, for-profit products with it, while keeping their source code and other intellectual property private and patented. We felt this was the best license to ensure that developers using Substrate could build successful businesses on top of this platform. (In comparison with a GNU license which requires all derivative work to also be open source.)&#xD;&#xA;&#xD;&#xA;However, we are protected with Apache 2.0 from malicious individuals from simply forking our code directly and changing the name, copyright, and license data. Any code which is forked from Substrate must maintain the original notices which credits Parity Technologies with that development.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;The `substrate-node-template` is a project built on top of Substrate, and thus can have its own license. In this case, the template is license with Unlicense, which is about the most permissive &quot;license&quot; you can provide. It explicitly states there is no license for this product, and you can do whatever you want with it to any extent, without any conditions.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;However, this is just a project built on top of Substrate, so the underlying Substrate license is not affected by the fact that the `substrate-node-template` uses Unlicense.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9gCK7.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/uuku3.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2142" PostHistoryTypeId="6" PostId="551" RevisionGUID="30d1bff9-2b92-4bf9-9dcf-6a32dfdb95e3" CreationDate="2022-03-04T16:29:25.740" UserId="223" Comment="Add the staking tag" Text="|staking|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2143" PostHistoryTypeId="24" PostId="551" RevisionGUID="30d1bff9-2b92-4bf9-9dcf-6a32dfdb95e3" CreationDate="2022-03-04T16:29:25.740" Comment="Proposed by 223 approved by 104, 452 edit id of 70" ContentLicense="CC BY-SA 4.0" />
  <row Id="2144" PostHistoryTypeId="2" PostId="598" RevisionGUID="c44c211e-1b43-4c0e-adaf-324e41ce0eb5" CreationDate="2022-03-04T17:27:50.957" UserId="276" Text="Are you sure you have the latest version of packages `substrate-interface==1.2.2` and `scalecodec==1.0.34`? &#xD;&#xA;&#xD;&#xA;Because I can remember older versions of scalecodec don't have the 'signed_extensions' support that is included in the metadata and Statemine has the `ChargeAssetTxPayment` extension.&#xD;&#xA;&#xD;&#xA;I was successfully able to transfer an asset on Statemine with the following code:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;keypair = Keypair.create_from_mnemonic(mnemonic)&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=&quot;wss://statemine-rpc.polkadot.io&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;call = substrate.compose_call(&#xD;&#xA;    call_module=&quot;Assets&quot;,&#xD;&#xA;    call_function=&quot;transfer&quot;,&#xD;&#xA;    call_params={'id': asset_id, 'target': account_id, 'amount': amount}&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;extrinsic = substrate.create_signed_extrinsic(call=call, keypair=keypair)&#xD;&#xA;&#xD;&#xA;result = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2146" PostHistoryTypeId="2" PostId="599" RevisionGUID="d91e5cfc-c17e-4f07-82f7-5a1c6f6f2635" CreationDate="2022-03-04T17:38:37.640" UserId="34" Text="To be clear this corrupted state was only in the logs after the RTU was started? Please try with more verbose logs, something like:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;RUST_LOG=debug RUST_BACKTRACE=1 ./target/release/polkadot --chain rococo-local -lruntime=debug&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This _may_ be an incorrect/missing migration, but not clear at first glance. I also think Rococo was restarted somewhere in the 15-&gt;16 timeframe. ([Overall delta](https://github.com/paritytech/polkadot/compare/release-v0.9.15...release-v0.9.16#diff-042f4804d206173992e7ca08b04b53ae8cc927a298722ecc44982c09e48ada76R51))&#xD;&#xA;&#xD;&#xA;The [migrations for Rococo runtime](https://github.com/paritytech/polkadot/compare/release-v0.9.15...release-v0.9.16#diff-0d5d1f76b24989edd69c12c2f482abdf143d8926f1b3191665378b848515d45cR162-R182) - is showing as your logs report for the expected migrations, but a breaking change in format for `sign_transaction` on bridges [here](&#xD;&#xA;https://github.com/paritytech/polkadot/compare/release-v0.9.15...release-v0.9.16#diff-8c207edd8ea24a9e13d6443c97ecb27e6695e7b6f5af02c2c60985f4224664f6L66) and a change in enum [here](https://github.com/paritytech/polkadot/compare/release-v0.9.15...release-v0.9.16#diff-e8c4d678b037a90eff3d9c72ed8338a72463902b9126c81522d5ff5c38320e3eR89) for the bridging may be the thing at fault. But unclear if that is it to me... Is this behavior you see reproducible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2148" PostHistoryTypeId="2" PostId="600" RevisionGUID="78f7d8a0-29cb-4e0f-bc89-7979f1de12aa" CreationDate="2022-03-04T17:55:50.363" UserId="34" Text="Typically all data is [SCALE encoded](https://github.com/paritytech/parity-scale-codec) for Substrate. You need to decode and parse the result into something human readable, like is done on the [contracts-ui](https://github.com/paritytech/contracts-uicontracts-ui) and documented in the [polkadot-js contracts docs](https://polkadot.js.org/docs/api-contract/start/contract.read#reading-contract-values)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2150" PostHistoryTypeId="5" PostId="597" RevisionGUID="9e2661ec-72db-488a-990b-ef2e5ed27953" CreationDate="2022-03-04T18:04:21.597" UserId="28" Comment="added 392 characters in body" Text="It seems you should review the different software license options available and what they provide:&#xD;&#xA;&#xD;&#xA;https://choosealicense.com/licenses/&#xD;&#xA;&#xD;&#xA;I am not a lawyer, this is not legal advice.&#xD;&#xA;&#xD;&#xA;Apache 2.0 was chosen for Substrate's FRAME because it is a permissive open source license which allows people to build commercial, for-profit products with it, while keeping their source code and other intellectual property private and patented. We felt this was the best license to ensure that developers using Substrate could build successful businesses on top of this platform. (In comparison with a GNU license which requires all derivative work to also be open source.)&#xD;&#xA;&#xD;&#xA;However, we are protected with Apache 2.0 from malicious individuals from simply forking our code directly and changing the name, copyright, and license data. Any code which is forked from Substrate must maintain the original notices which credits Parity Technologies with that development.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;The client code in Substrate is licensed with GPL which is a more restrictive copyleft license which requires that any derivative products built with the client code is also made open source, such that everyone can profit from bug fixes and performance improvements which are made by others.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;The `substrate-node-template` is a project built on top of Substrate, and thus can have its own license. In this case, the template is license with Unlicense, which is about the most permissive &quot;license&quot; you can provide. It explicitly states there is no license for this product, and you can do whatever you want with it to any extent, without any conditions.&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;However, this is just a project built on top of Substrate, so the underlying Substrate license is not affected by the fact that the `substrate-node-template` uses Unlicense.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9gCK7.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/tANKA.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/uuku3.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2151" PostHistoryTypeId="2" PostId="601" RevisionGUID="9362acfc-0a25-45a2-a61d-40264f3f9a79" CreationDate="2022-03-04T18:47:33.343" UserId="34" Text="As most Substrate builders are Rust natives, the best examples of extrinsic formation and submission can be found in [subxt](https://github.com/paritytech/subxt).&#xD;&#xA;&#xD;&#xA;For your specific example, [`sp_runtime::traits::SignedExtension`](https://docs.substrate.io/rustdocs/latest/sp_runtime/traits/trait.SignedExtension.html) can be implemented in a manner such as in [subxt/src/extrinsic/extra.rs](https://github.com/paritytech/subxt/blob/master/subxt/src/extrinsic/extra.rs) where `SignedExtra` trait is implimented for various types like `DefaultExtraWithTxPayment`.&#xD;&#xA;&#xD;&#xA;The encoding is implemented in [subxt/src/lib.rs](https://github.com/paritytech/subxt/blob/master/subxt/src/lib.rs#L153-L162) quite simply using the [codec](https://github.com/paritytech/parity-scale-codec) `Encode`/`Decode` traits implemented on things like `Call` [set here](https://github.com/paritytech/subxt/blob/master/subxt/src/lib.rs#L127-L138):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Call trait.&#xD;&#xA;pub trait Call: Encode {&#xD;&#xA;    /// Pallet name.&#xD;&#xA;    const PALLET: &amp;'static str;&#xD;&#xA;    /// Function name.&#xD;&#xA;    const FUNCTION: &amp;'static str;&#xD;&#xA;&#xD;&#xA;    /// Returns true if the given pallet and function names match this call.&#xD;&#xA;    fn is_call(pallet: &amp;str, function: &amp;str) -&gt; bool {&#xD;&#xA;        Self::PALLET == pallet &amp;&amp; Self::FUNCTION == function&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2153" PostHistoryTypeId="2" PostId="602" RevisionGUID="6e696129-4350-4d8f-844a-d16aa315d15e" CreationDate="2022-03-04T21:48:24.830" UserId="245" Text="I was looking through Substrate Frames and noticed that the frames using `Vec&lt;u8&gt;` have a macro `#[pallet::without_storage_info]`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::pallet]&#xD;&#xA;#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;#[pallet::without_storage_info]&#xD;&#xA;pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Default, Clone, PartialEq, sp_core::RuntimeDebug, TypeInfo)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;pub struct About&lt;Hash&gt; {&#xD;&#xA;    pub option_one: Option&lt;Vec&lt;u8&gt;&gt;,&#xD;&#xA;    pub option_two: Hash,&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2155" PostHistoryTypeId="2" PostId="603" RevisionGUID="af8da218-0503-425d-a9c9-9a34d303e2c6" CreationDate="2022-03-04T22:17:38.143" UserId="245" Text="I'm trying to create a custom RPC for my pallet. I've followed Substrate Recipes (I know it's outdated but helped a lot) and `pallet_transaction` for Runtime API and RPC.&#xD;&#xA;&#xD;&#xA;My first RPC, `profile_getSum`, works as expected. However, `profile_getProProfiles` has 2 params, and has an error when I try to request.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;api.rpc.profile.getProProfiles(&quot;0x00&quot;, &quot;toronto&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What I've Tried:**&#xD;&#xA;```javascript&#xD;&#xA;const profession = api.createType('ProfilePrimitivesProfession', 'None');&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; - `api.rpc.profile.getProProfiles(&quot;None&quot;, &quot;toronto&quot;)`&#xD;&#xA; - `api.rpc.profile.getProProfiles(profession.toHex(), &quot;toronto&quot;)`&#xD;&#xA; - `api.rpc.profile.getProProfiles(profession.toRawType(), &quot;toronto&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[rpc]&#xD;&#xA;pub trait ProfileStorageApi&lt;BlockHash, Hash&gt; {&#xD;&#xA;    #[rpc(name = &quot;profile_getSum&quot;)]&#xD;&#xA;	fn get_sum(&amp;self, at: Option&lt;BlockHash&gt;) -&gt; Result&lt;u8&gt;;&#xD;&#xA;&#xD;&#xA;	#[rpc(name = &quot;profile_getProProfiles&quot;)]&#xD;&#xA;	fn get_pro_profiles(&#xD;&#xA;		&amp;self,&#xD;&#xA;		at: Option&lt;BlockHash&gt;,&#xD;&#xA;		profession: Profession,&#xD;&#xA;		area: Vec&lt;u8&gt;,&#xD;&#xA;	) -&gt; Result&lt;Vec&lt;Profile&lt;Hash&gt;&gt;&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Clone, Copy, PartialEq, sp_core::RuntimeDebug, TypeInfo)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;pub enum Profession { None, Option1, Option2 }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-04 16:51:15.760 TRACE ThreadId(82) rpc: Request: {&quot;id&quot;:65,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;profile_getProProfiles&quot;,&quot;params&quot;:[&quot;None&quot;,&quot;0x746f726f6e746f&quot;]}.    &#xD;&#xA;2022-03-04 16:51:15.760 TRACE ThreadId(82) rpc_metrics: [ws] profile_getProProfiles call: MethodCall(MethodCall { jsonrpc: Some(V2), method: &quot;profile_getProProfiles&quot;, params: Array([String(&quot;None&quot;), String(&quot;0x746f726f6e746f&quot;)]), id: Num(65) })&#xD;&#xA;2022-03-04 16:51:15.760 DEBUG tokio-runtime-worker rpc_metrics: [ws] profile_getProProfiles call took 98 μs&#xD;&#xA;2022-03-04 16:51:15.760 DEBUG tokio-runtime-worker rpc: Response: {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid length 4, expected a (both 0x-prefixed or not) hex string with length of 64.&quot;},&quot;id&quot;:65}.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2157" PostHistoryTypeId="1" PostId="603" RevisionGUID="af8da218-0503-425d-a9c9-9a34d303e2c6" CreationDate="2022-03-04T22:17:38.143" UserId="245" Text="Can't request my Custom RPC with a Enum" ContentLicense="CC BY-SA 4.0" />
  <row Id="2158" PostHistoryTypeId="3" PostId="603" RevisionGUID="af8da218-0503-425d-a9c9-9a34d303e2c6" CreationDate="2022-03-04T22:17:38.143" UserId="245" Text="|polkadot-js|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2159" PostHistoryTypeId="2" PostId="604" RevisionGUID="79714ed7-442a-4252-b33e-fce85de8d1cd" CreationDate="2022-03-04T23:35:07.293" UserId="351" Text="In the node template i modified my chain spec .json and generated json file and everything is well. But when i run my node via node-template —dev —tmp. Or via specifying the json file node-template —chain chain spec.json.  The accounts which i defined they arent present while viewing my node in the polkadot js. The alice ,bob and other predefined accounts are only visible despite deleting them.  Am using a node template. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2161" PostHistoryTypeId="1" PostId="604" RevisionGUID="79714ed7-442a-4252-b33e-fce85de8d1cd" CreationDate="2022-03-04T23:35:07.293" UserId="351" Text="The node template cant fetch the accounts from chain-spec.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="2162" PostHistoryTypeId="3" PostId="604" RevisionGUID="79714ed7-442a-4252-b33e-fce85de8d1cd" CreationDate="2022-03-04T23:35:07.293" UserId="351" Text="|runtime|account|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2163" PostHistoryTypeId="2" PostId="605" RevisionGUID="69805efa-9717-4cdb-9540-491131b21739" CreationDate="2022-03-04T23:46:16.397" UserId="68" Text="I am working on testing my pallet.&#xD;&#xA;&#xD;&#xA;in my mock.rs&#xD;&#xA;&#xD;&#xA;    impl pallet_x::Config for Test {&#xD;&#xA;    	type Event = Event;&#xD;&#xA;       type Time = Time&lt;Moment = u64&gt;;&#xD;&#xA;&#xD;&#xA;at cargo test I am getting error:&#xD;&#xA;&#xD;&#xA;&gt; error[E0038]: the trait `hidden_include::traits::Time` cannot be made&#xD;&#xA;&gt; into an object    --&gt; /src/mock.rs:86:17&#xD;&#xA;&gt;     | 86  |     type Time = Time&lt;Moment = u64&gt;;&#xD;&#xA;&gt;     |                 ^^^^^^^^^^^^^^^^^^ `hidden_include::traits::Time` cannot be made into an object&#xD;&#xA;&#xD;&#xA;cargo build has no issue.&#xD;&#xA;&#xD;&#xA;    use frame_support::{&#xD;&#xA;    	construct_runtime, parameter_types,&#xD;&#xA;    	traits::{Everything, Nothing, GenesisBuild, Time, Randomness, LockableCurrency&#xD;&#xA;    	}, Parameter&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;How to implement it?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2165" PostHistoryTypeId="1" PostId="605" RevisionGUID="69805efa-9717-4cdb-9540-491131b21739" CreationDate="2022-03-04T23:46:16.397" UserId="68" Text="mocking Time - hidden_include::traits::Time` cannot be made into an object" ContentLicense="CC BY-SA 4.0" />
  <row Id="2166" PostHistoryTypeId="3" PostId="605" RevisionGUID="69805efa-9717-4cdb-9540-491131b21739" CreationDate="2022-03-04T23:46:16.397" UserId="68" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2167" PostHistoryTypeId="2" PostId="606" RevisionGUID="dbc74c34-c5ef-4c06-8432-aa3527212dbe" CreationDate="2022-03-04T23:54:55.967" UserId="238" Text="Is it possible to get the average length of time (in UNIX time) per block on Substrate?&#xD;&#xA;&#xD;&#xA;I basically want the average session length in UNIX time. I know we can get it in terms of block numbers. But I somehow need to convert block numbers to UNIX time." ContentLicense="CC BY-SA 4.0" />
  <row Id="2169" PostHistoryTypeId="1" PostId="606" RevisionGUID="dbc74c34-c5ef-4c06-8432-aa3527212dbe" CreationDate="2022-03-04T23:54:55.967" UserId="238" Text="Length of time of a block" ContentLicense="CC BY-SA 4.0" />
  <row Id="2170" PostHistoryTypeId="3" PostId="606" RevisionGUID="dbc74c34-c5ef-4c06-8432-aa3527212dbe" CreationDate="2022-03-04T23:54:55.967" UserId="238" Text="|time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2171" PostHistoryTypeId="5" PostId="590" RevisionGUID="d94b6d3d-c5a5-474e-b868-9dadaf4491b5" CreationDate="2022-03-05T01:08:19.077" UserId="104" Comment="Spelling" Text="The XCM version is located in the XCM pallet, and there are two ways of setting it: either via the pallet's `GenesisConfig` by filling out the `safe_xcm_version` field during runtime construction, or dynamically via the `force_default_xcm_version` extrinsic. As a corollary, the supported XCM version that the XCM pallet supports can easily viewed by querying its `SafeXcmVersion` storage value.&#xD;&#xA;&#xD;&#xA;XCM versioning between parachains do not need to be manually handled most of the time if they both use the XCM pallet as their `SubscriptionService` in their XCM configuration, since the XCM pallet handles version negotiation and conversion between the source and destination automatically." ContentLicense="CC BY-SA 4.0" />
  <row Id="2172" PostHistoryTypeId="4" PostId="603" RevisionGUID="5b5d3eba-cc16-48a3-82a4-432a12b5a0bd" CreationDate="2022-03-05T02:38:34.760" UserId="245" Comment="Updated the title" Text="Can't request to my Custom RPC with an Enum" ContentLicense="CC BY-SA 4.0" />
  <row Id="2173" PostHistoryTypeId="2" PostId="607" RevisionGUID="3220b59d-393c-4e6d-9ef9-d8297bd06e4f" CreationDate="2022-03-05T04:36:50.310" UserId="34" Text="The [api docs of enums](https://polkadot.js.org/docs/api/start/types.basics#working-with-enums) is worth a review I think. &#xD;&#xA;If your chain uses metadata v14, the metadata itself specifies the types completely, no need for manual definitions FYI, we highly suggest the update to include `scale-info` added [here](https://github.com/paritytech/substrate/pull/8615). (Manual enum specification is there currently for historic blocks) Note you must annotate your enum to be included in the metadata, for [example](https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L210-L211):&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;pub enum PreimageStatus&lt;AccountId, Balance, BlockNumber&gt; {...}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I notice a mismatch in your `getProProfiles` api call and the `fn get_pro_profiles` declaration as well, 2 vs. 3 parameters. Likely just need to specify all uniformly before you try again? I *believe* `None` is explicitly needed in the api call if you are looking for the `Option` to be correctly sent over the wire." ContentLicense="CC BY-SA 4.0" />
  <row Id="2176" PostHistoryTypeId="5" PostId="603" RevisionGUID="ae53caa1-7de4-4e0b-a2e8-bad87806b507" CreationDate="2022-03-05T06:34:51.757" UserId="245" Comment="Improved Enum for clear representation" Text="I'm trying to create a custom RPC for my pallet. I've followed Substrate Recipes (I know it's outdated but helped a lot) and `pallet_transaction` for Runtime API and RPC.&#xD;&#xA;&#xD;&#xA;My first RPC, `profile_getSum`, works as expected. However, `profile_getProProfiles` has 2 params, and has an error when I try to request.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;api.rpc.profile.getProProfiles(&quot;0x00&quot;, &quot;toronto&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What I've Tried:**&#xD;&#xA;```javascript&#xD;&#xA;const profession = api.createType('ProfilePrimitivesProfession', 'None');&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; - `api.rpc.profile.getProProfiles(&quot;None&quot;, &quot;toronto&quot;)`&#xD;&#xA; - `api.rpc.profile.getProProfiles(profession.toHex(), &quot;toronto&quot;)`&#xD;&#xA; - `api.rpc.profile.getProProfiles(profession.toRawType(), &quot;toronto&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[rpc]&#xD;&#xA;pub trait ProfileStorageApi&lt;BlockHash, Hash&gt; {&#xD;&#xA;    #[rpc(name = &quot;profile_getSum&quot;)]&#xD;&#xA;	fn get_sum(&amp;self, at: Option&lt;BlockHash&gt;) -&gt; Result&lt;u8&gt;;&#xD;&#xA;&#xD;&#xA;	#[rpc(name = &quot;profile_getProProfiles&quot;)]&#xD;&#xA;	fn get_pro_profiles(&#xD;&#xA;		&amp;self,&#xD;&#xA;		at: Option&lt;BlockHash&gt;,&#xD;&#xA;		profession: Profession,&#xD;&#xA;		area: Vec&lt;u8&gt;,&#xD;&#xA;	) -&gt; Result&lt;Vec&lt;Profile&lt;Hash&gt;&gt;&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Clone, Copy, PartialEq, sp_core::RuntimeDebug, TypeInfo)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;pub enum Profession { None, Doctor, Writer }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-04 16:51:15.760 TRACE ThreadId(82) rpc: Request: {&quot;id&quot;:65,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;profile_getProProfiles&quot;,&quot;params&quot;:[&quot;None&quot;,&quot;0x746f726f6e746f&quot;]}.    &#xD;&#xA;2022-03-04 16:51:15.760 TRACE ThreadId(82) rpc_metrics: [ws] profile_getProProfiles call: MethodCall(MethodCall { jsonrpc: Some(V2), method: &quot;profile_getProProfiles&quot;, params: Array([String(&quot;None&quot;), String(&quot;0x746f726f6e746f&quot;)]), id: Num(65) })&#xD;&#xA;2022-03-04 16:51:15.760 DEBUG tokio-runtime-worker rpc_metrics: [ws] profile_getProProfiles call took 98 μs&#xD;&#xA;2022-03-04 16:51:15.760 DEBUG tokio-runtime-worker rpc: Response: {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid length 4, expected a (both 0x-prefixed or not) hex string with length of 64.&quot;},&quot;id&quot;:65}.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2177" PostHistoryTypeId="2" PostId="608" RevisionGUID="bf5f90b8-2abc-4753-bbe6-169e1fd189b9" CreationDate="2022-03-05T18:25:34.300" UserId="452" Text="After getting the number of blocks in a session, you need to know what the average block time is, since you can then multiply the two and get average session length in milliseconds. This depends on the particular consensus protocol that is being used for block production, I will assume that you are using a slot-based protocol (either Aura or BABE). &#xD;&#xA;&#xD;&#xA;When defining your runtime you will have to specify the slot duration, you can see examples here for the [`node`](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/constants.rs#L59) and [`node-template`](https://github.com/paritytech/substrate/blob/master/bin/node-template/runtime/src/lib.rs#L116-L118). Additionally, both the Aura and BABE pallets provide getters for the slot duration: [`aura`](https://github.com/paritytech/substrate/blob/master/frame/aura/src/lib.rs#L181-L186), [`babe`](https://github.com/paritytech/substrate/blob/master/frame/babe/src/lib.rs#L464-L469)." ContentLicense="CC BY-SA 4.0" />
  <row Id="2179" PostHistoryTypeId="2" PostId="609" RevisionGUID="e6059b03-4bf3-49cd-8dbb-d43b4cb8f734" CreationDate="2022-03-05T18:32:47.477" UserId="452" Text="The reason the compiler is complaining about not being able to make an object out of `Time` is because it is a trait, whereas you need to provide a concrete type which implements the `Time` trait. Currently, the only type that implements the `Time` trait is the [timestamp module](https://github.com/paritytech/substrate/blob/master/frame/timestamp/src/lib.rs#L284-L291). So you should add the timestamp module to your mock runtime and then set `type Time = Timestamp;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="2181" PostHistoryTypeId="5" PostId="605" RevisionGUID="feccc2db-57d2-4efd-a057-a0c39076fee9" CreationDate="2022-03-05T18:38:55.367" UserId="452" Comment="deleted 95 characters in body; edited title" Text="I am working on testing my pallet.&#xD;&#xA;&#xD;&#xA;in my mock.rs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_x::Config for Test {&#xD;&#xA;    type Event = Event;&#xD;&#xA;    type Time = Time&lt;Moment = u64&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when running `cargo test` I am getting this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0038]: the trait `hidden_include::traits::Time` cannot be made into an object --&gt; /src/mock.rs:86:17&#xD;&#xA;    | 86  |   type Time = Time&lt;Moment = u64&gt;;&#xD;&#xA;    |              ^^^^^^^^^^^^^^^^^^ `hidden_include::traits::Time` cannot be made into an object&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when running `cargo build` there are no issues.&#xD;&#xA;&#xD;&#xA;`Time` is imported with:&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;use frame_support::traits::Time;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2182" PostHistoryTypeId="4" PostId="605" RevisionGUID="feccc2db-57d2-4efd-a057-a0c39076fee9" CreationDate="2022-03-05T18:38:55.367" UserId="452" Comment="deleted 95 characters in body; edited title" Text="Mocking Time - `hidden_include::traits::Time` cannot be made into an object" ContentLicense="CC BY-SA 4.0" />
  <row Id="2184" PostHistoryTypeId="2" PostId="610" RevisionGUID="1997086f-4166-4e47-bb24-d7cbe55033fa" CreationDate="2022-03-06T09:28:26.403" UserId="67" Text="With not much XCM experience, I understand that with the `Transact` instruction one can call an arbitrary extrinsic in another chain passing the encoded `Call` which is specific to a particular chain(e.g. the index is based on the order of definition of the pallets).&#xD;&#xA;&#xD;&#xA;What I'd like to know, maybe for a future XCM version if not currently possible, is how to send generic instructions that are chain agnostic and don't depend on specific implementations, e.g. the common case of asset transfers that follow the `fungibles` interface. I believe there's already support for fungibles so one question is how does it work and another is how could we implement more of those &quot;standards&quot; easily." ContentLicense="CC BY-SA 4.0" />
  <row Id="2186" PostHistoryTypeId="1" PostId="610" RevisionGUID="1997086f-4166-4e47-bb24-d7cbe55033fa" CreationDate="2022-03-06T09:28:26.403" UserId="67" Text="XCM Transact for interfaces" ContentLicense="CC BY-SA 4.0" />
  <row Id="2187" PostHistoryTypeId="3" PostId="610" RevisionGUID="1997086f-4166-4e47-bb24-d7cbe55033fa" CreationDate="2022-03-06T09:28:26.403" UserId="67" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2192" PostHistoryTypeId="5" PostId="604" RevisionGUID="d061e502-73c3-44f4-b31b-52a17fdf5ffb" CreationDate="2022-03-06T10:56:09.320" UserId="351" Comment="added 1638 characters in body" Text="`pub fn development_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;	let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;&#xD;&#xA;	Ok(ChainSpec::from_genesis(&#xD;&#xA;		// Name&#xD;&#xA;		&quot;Development&quot;,&#xD;&#xA;		// ID&#xD;&#xA;		&quot;dev&quot;,&#xD;&#xA;		ChainType::Development,&#xD;&#xA;		move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				wasm_binary,&#xD;&#xA;				// Initial PoA authorities&#xD;&#xA;				vec![authority_keys_from_seed(&quot;Mrisho&quot;)],&#xD;&#xA;				// Sudo account&#xD;&#xA;				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;				// Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Masanja&quot;),&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				],&#xD;&#xA;				true,&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;		// Bootnodes&#xD;&#xA;		vec![],&#xD;&#xA;		// Telemetry&#xD;&#xA;		None,&#xD;&#xA;		// Protocol ID&#xD;&#xA;		None,&#xD;&#xA;		// Properties&#xD;&#xA;		None,&#xD;&#xA;		// Extensions&#xD;&#xA;		None,&#xD;&#xA;	))&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn local_testnet_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;	let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;&#xD;&#xA;	Ok(ChainSpec::from_genesis(&#xD;&#xA;		// Name&#xD;&#xA;		&quot;Local Testnet&quot;,&#xD;&#xA;		// ID&#xD;&#xA;		&quot;local_testnet&quot;,&#xD;&#xA;		ChainType::Local,&#xD;&#xA;		move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				wasm_binary,&#xD;&#xA;				// Initial PoA authorities&#xD;&#xA;				vec![authority_keys_from_seed(&quot;Mrisho&quot;), authority_keys_from_seed(&quot;Masanja&quot;)],&#xD;&#xA;				// Sudo account&#xD;&#xA;				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;				// Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Masanja&quot;),&#xD;&#xA;&#xD;&#xA;				],&#xD;&#xA;				true,&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;		// Bootnodes&#xD;&#xA;		vec![],&#xD;&#xA;		// Telemetry&#xD;&#xA;		None,&#xD;&#xA;		// Protocol ID&#xD;&#xA;		None,&#xD;&#xA;		// Properties&#xD;&#xA;		None,&#xD;&#xA;		// Extensions&#xD;&#xA;		None,&#xD;&#xA;	))&#xD;&#xA;}&#xD;&#xA;`In the node template i modified my chain spec.rs and generated json file and everything is well. But when i run my node via node-template —dev —tmp. Or via specifying the json file ./node-template —chain chain spec.json.  The accounts which i defined they arent present while viewing my node in the polkadot js. The alice ,bob and other predefined accounts are only visible despite deleting them.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="2193" PostHistoryTypeId="2" PostId="612" RevisionGUID="f720f0f4-5f15-42d2-9efc-98c649595f84" CreationDate="2022-03-06T11:41:09.490" UserId="139" Text="The predefined accounts come from keyring which is special object in polkadot, don't ask me how they work it. To answer your question, to actually see your accounts, if you're using polkadot js apps, you need to tell your polkadot front end that you possess the secret seeds for them, which you can get via a tool like subkey. For example for the first account you'd run something like &#xD;&#xA;`target/release/node-template key inspect //Mrisho` which will provide you with the secret seed (provided you didn't change anything in the `get_account_id_from_seed` function. &#xD;&#xA;&#xD;&#xA;Next add an account on polkadot using the secret seed, which in this case is `0x5b621680b5d950cb1365f01cbd163e930a3d9fdab97d0b6253309ebad79f2686`.&#xD;&#xA;&#xD;&#xA;You should be able to see your account now, with the balance you provided. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2201" PostHistoryTypeId="2" PostId="614" RevisionGUID="8bf1140b-b830-41ee-9b9c-d1b903cb6a08" CreationDate="2022-03-06T15:18:03.517" UserId="352" Text="We are manually decoding the encoded extrinsic.&#xD;&#xA;&gt;[ex 0x510284.. -&gt; TransactionInfo{value=AccountID{address=14pT17...)]&#xD;&#xA;&#xD;&#xA;It was confirmed that polkadot-js is well decoded through the **toHuman** method no matter what event extrinsic is given as an input value.&#xD;&#xA;&#xD;&#xA;But in Java, I need to know the event type in advance like below.&#xD;&#xA;&#xD;&#xA;    // I need to know in advance that it is an event type called Balance Transfer.&#xD;&#xA;    ExtrinsicReader&lt;BalanceTransfer&gt; reader = new ExtrinsicReader&lt;&gt;(&#xD;&#xA;                        new BalanceTransferReader(SS58Type.Network.LIVE),&#xD;&#xA;                        SS58Type.Network.LIVE&#xD;&#xA;                );&#xD;&#xA;&#xD;&#xA;So my question is, can I infer the event type in advance from the encoded extrinsics?&#xD;&#xA;The reason I'm asking this question is because I found that the front of some extrinsics is similar for each event type&#xD;&#xA;&#xD;&#xA;Otherwise, how can I do polkadot-js?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2203" PostHistoryTypeId="1" PostId="614" RevisionGUID="8bf1140b-b830-41ee-9b9c-d1b903cb6a08" CreationDate="2022-03-06T15:18:03.517" UserId="352" Text="Is there a way to know what event it is without decoding the encoded extinsisc?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2204" PostHistoryTypeId="3" PostId="614" RevisionGUID="8bf1140b-b830-41ee-9b9c-d1b903cb6a08" CreationDate="2022-03-06T15:18:03.517" UserId="352" Text="|polkadot|polkadot-js|extrinsic|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2205" PostHistoryTypeId="2" PostId="615" RevisionGUID="b5bfba5f-29a4-4892-887e-a7f4a68cbe41" CreationDate="2022-03-06T17:27:41.770" UserId="494" Text="I'm running a `polkadot` full-node on a Raspberry Pi 4.&#xD;&#xA;&#xD;&#xA;The Substrate Fee system is determined by [Weights &amp; Benchmarking](https://docs.substrate.io/how-to-guides/v3/weights/calculate-fees/).&#xD;&#xA;&#xD;&#xA;How are different CPU architectures (when compared to the standard reference machine) treated under this economic model?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2207" PostHistoryTypeId="1" PostId="615" RevisionGUID="b5bfba5f-29a4-4892-887e-a7f4a68cbe41" CreationDate="2022-03-06T17:27:41.770" UserId="494" Text="How do extrinsic weights apply to Raspbery Pi full nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2208" PostHistoryTypeId="3" PostId="615" RevisionGUID="b5bfba5f-29a4-4892-887e-a7f4a68cbe41" CreationDate="2022-03-06T17:27:41.770" UserId="494" Text="|polkadot|full-node|raspberrypi|arm64|aarch64|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2209" PostHistoryTypeId="5" PostId="615" RevisionGUID="9cb8e429-eed8-4b2c-a8ee-a8bdeb81e60e" CreationDate="2022-03-06T17:46:09.440" UserId="494" Comment="added 3 characters in body" Text="I'm running a `polkadot` full-node on a Raspberry Pi 4.&#xD;&#xA;&#xD;&#xA;While the Substrate Fee system is determined by [Weights &amp; Benchmarking](https://docs.substrate.io/how-to-guides/v3/weights/calculate-fees/), how are different CPU architectures (when compared to the standard reference machine) treated under this economic model?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2210" PostHistoryTypeId="2" PostId="616" RevisionGUID="6bc87886-c49a-4044-9675-57d54f1b4ee7" CreationDate="2022-03-06T19:08:54.433" UserId="28" Text="The Weight system is not about block production, but actually about block import.&#xD;&#xA;&#xD;&#xA;Remember that the high level story around weights is that we are trying to protect the network from blocks that are too large, and may take too long for the configured block time for that network.&#xD;&#xA;&#xD;&#xA;Now protecting the network is absolutely not about protecting a single node from doing block production, but actually protecting **every** node on the network, all of which have to do block import.&#xD;&#xA;&#xD;&#xA;So when the Polkadot network releases a suggested hardware specification, it is saying&quot;&#xD;&#xA;&#xD;&#xA;&gt; You should expect to be able to import all blocks in less than or equal to 2 seconds on hardware which is at least as powerful as the recommended specification.&#xD;&#xA;&#xD;&#xA;Now if you choose to run a full node on a Rasberry Pi, it may work while the network has a low number of transactions per block, but as blocks become more full, you should expect that your hardware will fall behind, and that you will never actually be able to catch up to the current block since it will take you longer per block to _import_ than it will take validators to produce new blocks on the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="2212" PostHistoryTypeId="2" PostId="617" RevisionGUID="774fd908-eebd-4ee8-b7c5-3662bb043092" CreationDate="2022-03-06T19:19:19.820" UserId="28" Text="No, there is currently not a way to know which extrinsics would emit which event types, or what those events would mean.&#xD;&#xA;&#xD;&#xA;FRAME provides a fully customizable programming environment, which means that a user can define any number of custom events, and can emit those events whenever they want in the middle of an extrinsic or other runtime processes.&#xD;&#xA;&#xD;&#xA;They could even be totally nonsensical, for example emitting an event `Balance.Transfer` when no transfer has occurred... however this would make for a really shitty blockchain.&#xD;&#xA;&#xD;&#xA;So really, you need to manually program associations with extrinsics and events to derive meaning from the events, and only by looking at the code of the extrinsic can you know what will be emitted, and when.&#xD;&#xA;&#xD;&#xA;The only thing you can know for sure is that there will be events emitted from `frame_system` telling you whether an extrinsic succeeded or not, and that is the only constant output you can expect for any extrinsic." ContentLicense="CC BY-SA 4.0" />
  <row Id="2214" PostHistoryTypeId="2" PostId="618" RevisionGUID="9a90036d-5308-4a1d-96c1-f6ef0d12ad6c" CreationDate="2022-03-06T19:29:08.827" UserId="28" Text="&gt; generic instructions that are chain agnostic and don't depend on specific implementations&#xD;&#xA;&#xD;&#xA;This is basically what the entire XCM protocol is providing. XCM has made a generic interface for all the &quot;common&quot; cross chain messaging like asset transfers, taking / paying fees, etc...&#xD;&#xA;&#xD;&#xA;The `Transact` instruction is the exception, where we make no guarantees about the underlying behavior from chain to chain, since it is literally just an opaque blob which needs to be interpreted by the receiving chain.&#xD;&#xA;&#xD;&#xA;If you want to extend the number of available generic calls, you can make feature requests to the XCM protocol itself, or define your own custom interface pallet which is shared across the chains you talk to, and acts as a wrapper over the underlying implementations done by custom pallets." ContentLicense="CC BY-SA 4.0" />
  <row Id="2216" PostHistoryTypeId="2" PostId="619" RevisionGUID="33bc7dcd-d680-4091-8066-90b6f580ab28" CreationDate="2022-03-06T20:05:09.597" UserId="28" Text="When building my pallet, I run into the error:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;error[E0277]: the trait bound `T: parity_scale_codec::MaxEncodedLen` is not satisfied&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:42:15&#xD;&#xA;   |&#xD;&#xA;42 |     #[pallet::pallet]&#xD;&#xA;   |               ^^^^^^ the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `T`&#xD;&#xA;   |&#xD;&#xA;note: required because of the requirements on the impl of `parity_scale_codec::MaxEncodedLen` for `Kitty&lt;T&gt;`&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:25:69&#xD;&#xA;   |&#xD;&#xA;25 |     #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;   |                                                                        ^^^^^^^^^^^^^&#xD;&#xA;26 |     #[scale_info(skip_type_params(T))]&#xD;&#xA;27 |     pub struct Kitty&lt;T: Config&gt; {&#xD;&#xA;   |                ^^^^^^^^^^^^^^^^&#xD;&#xA;   = note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageKitties&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::Hash, Kitty&lt;T&gt;&gt;`&#xD;&#xA;   = note: this error originates in the derive macro `MaxEncodedLen` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: consider further restricting this bound&#xD;&#xA;   |&#xD;&#xA;42 |     #[pallet::pallet + parity_scale_codec::MaxEncodedLen]&#xD;&#xA;   |                      +++++++++++++++++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;error: could not compile `pallet-template` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The custom type definitions are:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Struct for holding Kitty information.&#xD;&#xA;#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;pub struct Kitty&lt;T: Config&gt; {&#xD;&#xA;	pub dna: [u8; 16],   // Using 16 bytes to represent a kitty DNA&#xD;&#xA;	pub price: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;	pub gender: Gender,&#xD;&#xA;	pub owner: AccountOf&lt;T&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Enum declaration for Gender.&#xD;&#xA;#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;pub enum Gender {&#xD;&#xA;	Male,&#xD;&#xA;	Female,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As far as I know, `MaxEncodedLen` should work for `Kitty` since all of its fields are also bounded in length.&#xD;&#xA;&#xD;&#xA;How do I resolve this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2218" PostHistoryTypeId="1" PostId="619" RevisionGUID="33bc7dcd-d680-4091-8066-90b6f580ab28" CreationDate="2022-03-06T20:05:09.597" UserId="28" Text="How to fix `parity_scale_codec::MaxEncodedLen` is not implemented for `T`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2219" PostHistoryTypeId="3" PostId="619" RevisionGUID="33bc7dcd-d680-4091-8066-90b6f580ab28" CreationDate="2022-03-06T20:05:09.597" UserId="28" Text="|frame|maxencodedlen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2220" PostHistoryTypeId="2" PostId="620" RevisionGUID="672958bb-a3ef-4fd1-b21d-ac7cac332891" CreationDate="2022-03-06T20:05:09.597" UserId="28" Text="The underlying issue here is that Rust macros are not super intelligent.&#xD;&#xA;&#xD;&#xA;While you are correct that all the interior fields of `Kitty` is bounded in length, you are also using the generic type `T: Config` to help access some of those types.&#xD;&#xA;&#xD;&#xA;The Rust macros for automatically deriving `MaxEncodedLen` naively things that `T` must also be bounded by `MaxEncodedLen`, even though `T` itself is not being used in the actual types.&#xD;&#xA;&#xD;&#xA;We can fix this in one of two ways:&#xD;&#xA;&#xD;&#xA;1. Add a simple &quot;hint&quot; to the compiler in the form of `#[codec(mel_bound())]`.&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;	// Struct for holding Kitty information.&#xD;&#xA;	#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())] // &lt;---------------- Here&#xD;&#xA;	pub struct Kitty&lt;T: Config&gt; {&#xD;&#xA;		pub dna: [u8; 16],   // Using 16 bytes to represent a kitty DNA&#xD;&#xA;		pub price: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;		pub gender: Gender,&#xD;&#xA;		pub owner: AccountOf&lt;T&gt;,&#xD;&#xA;	}&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;    Oversimplifying, this will allow the compiler to skip trying to derive `MaxEncodedLen` for T, and just check the underlying types themselves all have `MaxEncodedLen`.&#xD;&#xA;&#xD;&#xA;2. Do not use `&lt;T: Config&gt;` when defining `Kitties`.&#xD;&#xA;&#xD;&#xA;    Instead, make generic only the types you need:&#xD;&#xA;    ```&#xD;&#xA;    // Struct for holding Kitty information.&#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    pub struct Kitty&lt;Account, Balance&gt; {&#xD;&#xA;        pub dna: [u8; 16],   // Using 16 bytes to represent a kitty DNA&#xD;&#xA;        pub price: Option&lt;Balance&gt;,&#xD;&#xA;        pub gender: Gender,&#xD;&#xA;        pub owner: Account,&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;    In this case, we have been able to remove `T` completely from the struct definition, and thus will have no complaints from the derive macro about trying to implement `MaxEncodedLen` for it. Note that we were also able to get rid of `#[scale_info(skip_type_params(T))]` from the definition aswell, since this basically doing the same thing as `#[codec(mel_bound())]` above." ContentLicense="CC BY-SA 4.0" />
  <row Id="2222" PostHistoryTypeId="5" PostId="604" RevisionGUID="452ecca8-5643-43d3-8ca4-f2f4a09d6676" CreationDate="2022-03-06T20:06:37.680" UserId="28" Comment="added 15 characters in body" Text="```rust&#xD;&#xA;pub fn development_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;	let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;&#xD;&#xA;	Ok(ChainSpec::from_genesis(&#xD;&#xA;		// Name&#xD;&#xA;		&quot;Development&quot;,&#xD;&#xA;		// ID&#xD;&#xA;		&quot;dev&quot;,&#xD;&#xA;		ChainType::Development,&#xD;&#xA;		move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				wasm_binary,&#xD;&#xA;				// Initial PoA authorities&#xD;&#xA;				vec![authority_keys_from_seed(&quot;Mrisho&quot;)],&#xD;&#xA;				// Sudo account&#xD;&#xA;				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;				// Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Masanja&quot;),&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				],&#xD;&#xA;				true,&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;		// Bootnodes&#xD;&#xA;		vec![],&#xD;&#xA;		// Telemetry&#xD;&#xA;		None,&#xD;&#xA;		// Protocol ID&#xD;&#xA;		None,&#xD;&#xA;		// Properties&#xD;&#xA;		None,&#xD;&#xA;		// Extensions&#xD;&#xA;		None,&#xD;&#xA;	))&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn local_testnet_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;	let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;&#xD;&#xA;	Ok(ChainSpec::from_genesis(&#xD;&#xA;		// Name&#xD;&#xA;		&quot;Local Testnet&quot;,&#xD;&#xA;		// ID&#xD;&#xA;		&quot;local_testnet&quot;,&#xD;&#xA;		ChainType::Local,&#xD;&#xA;		move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				wasm_binary,&#xD;&#xA;				// Initial PoA authorities&#xD;&#xA;				vec![authority_keys_from_seed(&quot;Mrisho&quot;), authority_keys_from_seed(&quot;Masanja&quot;)],&#xD;&#xA;				// Sudo account&#xD;&#xA;				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;				// Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Masanja&quot;),&#xD;&#xA;&#xD;&#xA;				],&#xD;&#xA;				true,&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;		// Bootnodes&#xD;&#xA;		vec![],&#xD;&#xA;		// Telemetry&#xD;&#xA;		None,&#xD;&#xA;		// Protocol ID&#xD;&#xA;		None,&#xD;&#xA;		// Properties&#xD;&#xA;		None,&#xD;&#xA;		// Extensions&#xD;&#xA;		None,&#xD;&#xA;	))&#xD;&#xA;}&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;In the node template i modified my chain spec.rs and generated json file and everything is well. But when i run my node via node-template —dev —tmp. Or via specifying the json file ./node-template —chain chain spec.json.  The accounts which i defined they arent present while viewing my node in the polkadot js. The alice ,bob and other predefined accounts are only visible despite deleting them.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="2223" PostHistoryTypeId="2" PostId="621" RevisionGUID="d87f6167-fd5a-4d23-bc64-30d034d1f75a" CreationDate="2022-03-06T20:11:44.280" UserId="28" Text="&gt; The alice, bob and other predefined accounts are only visible despite deleting them.&#xD;&#xA;&#xD;&#xA;This is just a behavior of the Polkadot JS UI when using a &quot;development&quot; chain.&#xD;&#xA;&#xD;&#xA;Note in your chain spec definition, you have:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Name&#xD;&#xA;&quot;Development&quot;,&#xD;&#xA;// ID&#xD;&#xA;&quot;dev&quot;,&#xD;&#xA;ChainType::Development,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These flags are triggering the Polakdot JS UI to automatically show you the accounts Alice, Bob, Charlie, etc... on your UI. To remove them, I believe you can change these flags to something which represents a &quot;production&quot; chain, like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;My Chain&quot;,&#xD;&#xA;&quot;my_chain&quot;,&#xD;&#xA;ChainType::Live,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or, there is probably also a flag on the Polakdot JS API to hide the test accounts.&#xD;&#xA;&#xD;&#xA;As for your custom accounts, the UI does not search for all accounts automatically. The behavior you are seeing with Alice, Bob, Charlie, etc... is specific to these test accounts. If you want to see the accounts you generated, you need to add these accounts to your UI manually." ContentLicense="CC BY-SA 4.0" />
  <row Id="2225" PostHistoryTypeId="5" PostId="621" RevisionGUID="18509093-f131-4fe8-92b9-06618f304dce" CreationDate="2022-03-06T20:17:34.017" UserId="28" Comment="added 608 characters in body" Text="&gt; The alice, bob and other predefined accounts are only visible despite deleting them.&#xD;&#xA;&#xD;&#xA;This is just a behavior of the Polkadot JS UI when using a &quot;development&quot; chain.&#xD;&#xA;&#xD;&#xA;Note in your chain spec definition, you have:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Name&#xD;&#xA;&quot;Development&quot;,&#xD;&#xA;// ID&#xD;&#xA;&quot;dev&quot;,&#xD;&#xA;ChainType::Development,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These flags are triggering the Polakdot JS UI to automatically show you the accounts Alice, Bob, Charlie, etc... on your UI. To remove them, I believe you can change these flags to something which represents a &quot;production&quot; chain, like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;My Chain&quot;,&#xD;&#xA;&quot;my_chain&quot;,&#xD;&#xA;ChainType::Live,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or, there is probably also a flag on the Polakdot JS API to hide the test accounts.&#xD;&#xA;&#xD;&#xA;As for your custom accounts, the UI does not search for all accounts automatically. The behavior you are seeing with Alice, Bob, Charlie, etc... is specific to these test accounts. If you want to see the accounts you generated, you need to add these accounts to your UI manually.&#xD;&#xA;&#xD;&#xA;Since you are using the `get_account_id_from_seed` function provided by the node, your accounts will have a [predefined seed](https://substrate.stackexchange.com/questions/41/what-are-the-predefined-accounts-alice-bob-etc).&#xD;&#xA;&#xD;&#xA;So your accounts private key will be:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;bottom drive obey lake curtain smoke basket hold race lonely fit walk//Mrisho&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And your public address should be:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;5G4ecPFwBYybyX3YKvP1W5GuSgLXsof4cXYSJNWhJFEj3eT3&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But note, that what you are doing is awful for production, since I just posted your private key, and everyone will know it using these functions." ContentLicense="CC BY-SA 4.0" />
  <row Id="2226" PostHistoryTypeId="2" PostId="622" RevisionGUID="5b681ce5-6229-4b2b-b32f-dbce40e028f6" CreationDate="2022-03-07T02:35:27.810" UserId="129" Text="In their [docs][1], they showed how to get the author of the newest blocks, but I want to get the author of a specific block. How can I do that?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/cookbook/blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="2228" PostHistoryTypeId="1" PostId="622" RevisionGUID="5b681ce5-6229-4b2b-b32f-dbce40e028f6" CreationDate="2022-03-07T02:35:27.810" UserId="129" Text="How to retrieve the block author of a specific block using Polkadot JS API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2229" PostHistoryTypeId="3" PostId="622" RevisionGUID="5b681ce5-6229-4b2b-b32f-dbce40e028f6" CreationDate="2022-03-07T02:35:27.810" UserId="129" Text="|block|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2230" PostHistoryTypeId="2" PostId="623" RevisionGUID="3660d2bf-08e1-4c82-8109-a55486abacd4" CreationDate="2022-03-07T03:19:26.640" UserId="244" Text="Is there a way to filter ethereum json-rpc methods to only allow read calls, not writing? " ContentLicense="CC BY-SA 4.0" />
  <row Id="2232" PostHistoryTypeId="1" PostId="623" RevisionGUID="3660d2bf-08e1-4c82-8109-a55486abacd4" CreationDate="2022-03-07T03:19:26.640" UserId="244" Text="Can I make a frontier node only accept json-rpc read methods?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2233" PostHistoryTypeId="3" PostId="623" RevisionGUID="3660d2bf-08e1-4c82-8109-a55486abacd4" CreationDate="2022-03-07T03:19:26.640" UserId="244" Text="|substrate-node-template|json-rpc|frontier|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2234" PostHistoryTypeId="5" PostId="623" RevisionGUID="61d17431-5c79-4ee5-ba4e-4c7ffd2b9d1f" CreationDate="2022-03-07T03:24:53.283" UserId="244" Comment="added 69 characters in body" Text="Is there a way to filter ethereum json-rpc methods to only allow read calls, not writing? ie, filter out `sendTransaction`, `sendRawTransaction`, `create`, etc" ContentLicense="CC BY-SA 4.0" />
  <row Id="2235" PostHistoryTypeId="2" PostId="624" RevisionGUID="2c1d5c37-3845-49ec-b933-dc113cd87e19" CreationDate="2022-03-07T03:28:01.577" UserId="14" Text="You can pass a `blockHash` to `api.derive.chain.getHeader()`, like:&#xD;&#xA;```&#xD;&#xA;// retrieve the last header (hash optional) &lt;---- Here&#xD;&#xA;const blockHash = '0x36d9aabf232d29eae55ccc299c7a5b13522244bffe2ee7220f830041629586e0'&#xD;&#xA;const header = await api.derive.chain.getHeader(blockHash);&#xD;&#xA;console.log(`#${header.number}: ${header.author}`);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2237" PostHistoryTypeId="2" PostId="625" RevisionGUID="8c303abe-e0c1-45b3-9ff5-611943fdd24c" CreationDate="2022-03-07T03:42:28.743" UserId="129" Text="I deploy a smart contract to a substrate chain. How can I upgrade the smart contract's logic to a newer version?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2239" PostHistoryTypeId="1" PostId="625" RevisionGUID="8c303abe-e0c1-45b3-9ff5-611943fdd24c" CreationDate="2022-03-07T03:42:28.743" UserId="129" Text="How to upgrade a smart contract logic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2240" PostHistoryTypeId="3" PostId="625" RevisionGUID="8c303abe-e0c1-45b3-9ff5-611943fdd24c" CreationDate="2022-03-07T03:42:28.743" UserId="129" Text="|smart-contract|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2242" PostHistoryTypeId="2" PostId="626" RevisionGUID="61be99b7-805a-41e9-b16f-1bc188a2694d" CreationDate="2022-03-07T06:56:06.973" UserId="552" Text="When I submit a transation using the polakdot-js-api I get that the transaction is included in block number and I also receive the extrinsic hash&#xD;&#xA;&#xD;&#xA;    ```*Tx included at block hash 0x9225abf7cb9241f543f629c4277cb7799ab90e557af8f4d17201ae1f2d625765*&#xD;&#xA;    *Tx hash: 0x3e2f84e2f46cb82a2491fa772d66127ec8c8c00ce15a0bfc65be31fcf400b7a5*```&#xD;&#xA;&#xD;&#xA;But is it possible for me to get the data that is submitted in that particular transaction through this extrinsic-hash that I got from the above transation?  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2244" PostHistoryTypeId="1" PostId="626" RevisionGUID="61be99b7-805a-41e9-b16f-1bc188a2694d" CreationDate="2022-03-07T06:56:06.973" UserId="552" Text="To get the extrinsic data from the extrinsic Hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="2245" PostHistoryTypeId="3" PostId="626" RevisionGUID="61be99b7-805a-41e9-b16f-1bc188a2694d" CreationDate="2022-03-07T06:56:06.973" UserId="552" Text="|extrinsic|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2246" PostHistoryTypeId="2" PostId="627" RevisionGUID="857b1afc-6f02-482a-bc41-a57bd5c82c21" CreationDate="2022-03-07T07:01:33.723" UserId="532" Text="I want to generate an kusama address. The substrate-interface can make it?Or how to generate an ss58 format address by python" ContentLicense="CC BY-SA 4.0" />
  <row Id="2248" PostHistoryTypeId="1" PostId="627" RevisionGUID="857b1afc-6f02-482a-bc41-a57bd5c82c21" CreationDate="2022-03-07T07:01:33.723" UserId="532" Text="Can generate an address by mnemonic with the sdk substrate-interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2249" PostHistoryTypeId="3" PostId="627" RevisionGUID="857b1afc-6f02-482a-bc41-a57bd5c82c21" CreationDate="2022-03-07T07:01:33.723" UserId="532" Text="|polkadot|parachain|kusama|python|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2250" PostHistoryTypeId="5" PostId="603" RevisionGUID="dfef07e9-549a-4674-8fe8-5fe3746caf26" CreationDate="2022-03-07T07:02:27.520" UserId="245" Comment="Added similar code snippets" Text="I'm trying to create a custom RPC for my pallet. I've followed Substrate Recipes (I know it's outdated but helped a lot) and `pallet_transaction` for Runtime API and RPC.&#xD;&#xA;&#xD;&#xA;My first RPC, `profile_getSum`, works as expected. However, `profile_getProProfiles` has 2 params, and has an error when I try to request.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;api.rpc.profile.getProProfiles(&quot;0x00&quot;, &quot;toronto&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What I've Tried:**&#xD;&#xA;```javascript&#xD;&#xA;const profession = api.createType('ProfilePrimitivesProfession', 'None');&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; - `api.rpc.profile.getProProfiles(&quot;None&quot;, &quot;toronto&quot;)`&#xD;&#xA; - `api.rpc.profile.getProProfiles(profession.toHex(), &quot;toronto&quot;)`&#xD;&#xA; - `api.rpc.profile.getProProfiles(profession.toRawType(), &quot;toronto&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[rpc]&#xD;&#xA;pub trait ProfileStorageApi&lt;BlockHash, Hash&gt; {&#xD;&#xA;    #[rpc(name = &quot;profile_getSum&quot;)]&#xD;&#xA;	fn get_sum(&amp;self, at: Option&lt;BlockHash&gt;) -&gt; Result&lt;u8&gt;;&#xD;&#xA;&#xD;&#xA;	#[rpc(name = &quot;profile_getProProfiles&quot;)]&#xD;&#xA;	fn get_pro_profiles(&#xD;&#xA;		&amp;self,&#xD;&#xA;		at: Option&lt;BlockHash&gt;,&#xD;&#xA;		profession: Profession,&#xD;&#xA;		area: Vec&lt;u8&gt;,&#xD;&#xA;	) -&gt; Result&lt;Vec&lt;Profile&lt;Hash&gt;&gt;&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Clone, Copy, PartialEq, sp_core::RuntimeDebug, TypeInfo)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;pub enum Profession { None, Doctor, Writer }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-04 16:51:15.760 TRACE ThreadId(82) rpc: Request: {&quot;id&quot;:65,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;profile_getProProfiles&quot;,&quot;params&quot;:[&quot;None&quot;,&quot;0x746f726f6e746f&quot;]}.    &#xD;&#xA;2022-03-04 16:51:15.760 TRACE ThreadId(82) rpc_metrics: [ws] profile_getProProfiles call: MethodCall(MethodCall { jsonrpc: Some(V2), method: &quot;profile_getProProfiles&quot;, params: Array([String(&quot;None&quot;), String(&quot;0x746f726f6e746f&quot;)]), id: Num(65) })&#xD;&#xA;2022-03-04 16:51:15.760 DEBUG tokio-runtime-worker rpc_metrics: [ws] profile_getProProfiles call took 98 μs&#xD;&#xA;2022-03-04 16:51:15.760 DEBUG tokio-runtime-worker rpc: Response: {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid length 4, expected a (both 0x-prefixed or not) hex string with length of 64.&quot;},&quot;id&quot;:65}.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Update**&#xD;&#xA;&#xD;&#xA;I've come across [Subsocial's node][1]. Since it has similar RPC methods (having an enum parameter in the runtime-api) with mine it would be a good example.&#xD;&#xA;&#xD;&#xA;Subsocial's [FlatPostKind enum][2]&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Ord, PartialOrd, Clone, Eq, PartialEq)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;pub enum FlatPostKind {&#xD;&#xA;    RegularPost,&#xD;&#xA;    Comment,&#xD;&#xA;    SharedPost&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;[RPC method][3]&#xD;&#xA;```rust&#xD;&#xA;#[rpc(name = &quot;posts_getPublicPosts&quot;)]&#xD;&#xA;fn get_public_posts(&#xD;&#xA;    &amp;self,&#xD;&#xA;    at: Option&lt;BlockHash&gt;,&#xD;&#xA;    kind_filter: Vec&lt;FlatPostKind&gt;,&#xD;&#xA;    start_id: u64,&#xD;&#xA;    limit: u16&#xD;&#xA;) -&gt; Result&lt;Vec&lt;FlatPost&lt;AccountId, BlockNumber&gt;&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As seen in the `fn get_public_posts`, it has a parameter that has a type of `Vec&lt;FlatPostKind&gt;`.&#xD;&#xA;&#xD;&#xA;Still can't get a successful response. I believe it's not on `@polkadotjs/api` side but rather how I try to query.&#xD;&#xA;```&#xD;&#xA;burak@burak-pc:~$ curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:&quot;2&quot;, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;posts_getPublicPosts&quot;, &quot;params&quot;:[[&quot;RegularPost&quot;], &quot;0&quot;, &quot;1&quot;]}' http://localhost:9934&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid type: sequence, expected a 0x-prefixed hex string with length of 64.&quot;},&quot;id&quot;:&quot;2&quot;}&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dappforce/subsocial-node&#xD;&#xA;  [2]: https://github.com/dappforce/subsocial-node/blob/6aea3c368afca13f7937def41a635735f066925e/pallets/posts/src/rpc.rs#L88-L94&#xD;&#xA;  [3]: https://github.com/dappforce/subsocial-node/blob/master/pallets/posts/rpc/src/lib.rs#L24-L31" ContentLicense="CC BY-SA 4.0" />
  <row Id="2251" PostHistoryTypeId="2" PostId="628" RevisionGUID="16465316-a242-4866-a29c-2c0972e72e36" CreationDate="2022-03-07T08:32:44.927" UserId="94" Text="You need to provide the SS58 prefix to the `create_from_mnemonic` function to make it generate a Kusama address as opposed to a generic Substrate address:  &#xD;&#xA;```python&#xD;&#xA;from substrateinterface import Keypair&#xD;&#xA;&#xD;&#xA;# 2 for Kusama.&#xD;&#xA;prefix = 2&#xD;&#xA;mnemonic = 'episode together nose spoon dose oil faculty zoo ankle evoke admit walnut'&#xD;&#xA;&#xD;&#xA;keypair = Keypair.create_from_mnemonic(mnemonic, ss58_format=prefix)&#xD;&#xA;# Prints JHXFqYWQFFr5RkHVzviRiKhY7tutyGcYQb6kUyoScSir862&#xD;&#xA;print(keypair.ss58_address)&#xD;&#xA;```&#xD;&#xA;Kusama has the prefix 2, you can see all of them in the [ss58-registry](https://github.com/compound-finance/substrate/blob/3bb13fdc5be7b04a179b1b1c7c2032534263241d/ss58-registry.json#L32)." ContentLicense="CC BY-SA 4.0" />
  <row Id="2253" PostHistoryTypeId="2" PostId="629" RevisionGUID="2f641e65-1a7c-4eec-bca2-da8cdb4e53a6" CreationDate="2022-03-07T08:45:13.503" UserId="139" Text="I've seen in some guides suggesting to set Session Keys for validating. My concepts of session keys are that they are an amalgation of 4 keys, that will be used instead of the stash or controller keys on a validator node. However my confusion begins when I query the `rotateKeys()` rpc from `author` ( I don't know what author is or where this function is defined, please include an explanation for this in your answer as well ), I get a long key like this : &#xD;&#xA;&#xD;&#xA;`0x87d0bce7ee8e3279674e9a91c4255379592ab5b24ab2bcf9438719d0b08013f0de6b77179766746c767e9fe547d6a57936bbd0846a20b21acd6f75f5fe779f5a6861fae2c2ec3aa460d4559c755d12b4c9186133b8eee66162369348aa7f180afcc75d5a6f0e17f69e8e4c9232ae24b980a230bbe06b1d4ff87ed35985cec04c`&#xD;&#xA;&#xD;&#xA;which is different on every call. Can someone explain what is going on? Where are these keys coming from? Are they random concats of a ed25519 and 3 sr25519, if my sessionKeys struct has 4 keys just like polkadot? &#xD;&#xA;&#xD;&#xA;Am I signing a random key with my controller account and then letting my node use that key for validation (grandpa, Imonline heartbeats, babe authorship, etc?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2255" PostHistoryTypeId="1" PostId="629" RevisionGUID="2f641e65-1a7c-4eec-bca2-da8cdb4e53a6" CreationDate="2022-03-07T08:45:13.503" UserId="139" Text="What does author_rotateKeys do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2256" PostHistoryTypeId="3" PostId="629" RevisionGUID="2f641e65-1a7c-4eec-bca2-da8cdb4e53a6" CreationDate="2022-03-07T08:45:13.503" UserId="139" Text="|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2257" PostHistoryTypeId="2" PostId="630" RevisionGUID="5a39b679-0025-4bc0-a9ed-f8753bcb878c" CreationDate="2022-03-07T08:52:08.707" UserId="139" Text="So my chain is running at the moment with 3 invulnerable validators, and I was trying to add another validator to the mix. I generated 2 accounts, transferred some stash to one of them, made a controller account, bonded some balance with the pair, set session keys and started the validation process, and I could see my stash under the waiting tab for staking. However on next session change, my validator was not included in the validator set, even though I had more stash than all invulnerables combined. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-07 14:16:57  New epoch 3 launching at block 0x951c…403f (block slot 548880939 &gt;= start slot 548880939).    &#xD;&#xA;2022-03-07 14:16:57  Next epoch starts at slot 548881139    &#xD;&#xA;2022-03-07 14:16:57 [#594]   Entering emergency mode: ElectionError::Fallback(&quot;NoFallback.&quot;)    &#xD;&#xA;2022-03-07 14:16:57 [594]  election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)   &#xD;&#xA;```&#xD;&#xA;I repeatedly get these messages on each session/era change. How can I fix this? " ContentLicense="CC BY-SA 4.0" />
  <row Id="2259" PostHistoryTypeId="1" PostId="630" RevisionGUID="5a39b679-0025-4bc0-a9ed-f8753bcb878c" CreationDate="2022-03-07T08:52:08.707" UserId="139" Text="Validator not being onboarded due to Election NoFallback error, possibly" ContentLicense="CC BY-SA 4.0" />
  <row Id="2260" PostHistoryTypeId="3" PostId="630" RevisionGUID="5a39b679-0025-4bc0-a9ed-f8753bcb878c" CreationDate="2022-03-07T08:52:08.707" UserId="139" Text="|consensus|election|private-network|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2265" PostHistoryTypeId="2" PostId="632" RevisionGUID="a9cb550f-4d76-4c33-81ae-3a3decaa4bb9" CreationDate="2022-03-07T11:38:42.330" UserId="407" Text="Good day , i would love to know how to make Sudo calls through subxt library , i can't seem to find a meaningful solution . substrate-api-client has an example on how to make on , but going through the documentation of subxt library, it is doesn't show how." ContentLicense="CC BY-SA 4.0" />
  <row Id="2267" PostHistoryTypeId="1" PostId="632" RevisionGUID="a9cb550f-4d76-4c33-81ae-3a3decaa4bb9" CreationDate="2022-03-07T11:38:42.330" UserId="407" Text="Making sudo call using subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="2268" PostHistoryTypeId="3" PostId="632" RevisionGUID="a9cb550f-4d76-4c33-81ae-3a3decaa4bb9" CreationDate="2022-03-07T11:38:42.330" UserId="407" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2269" PostHistoryTypeId="2" PostId="633" RevisionGUID="63b0f602-637b-42d8-8acf-b551831c9883" CreationDate="2022-03-07T12:06:23.127" UserId="377" Text="I need to create multiple proxies for an account by using proxy accounts. Can I do it?&#xD;&#xA;if yes can I manage multiple proxies to make transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2271" PostHistoryTypeId="1" PostId="633" RevisionGUID="63b0f602-637b-42d8-8acf-b551831c9883" CreationDate="2022-03-07T12:06:23.127" UserId="377" Text="Can i create multiple proxy for a account by using proxy Accounts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2272" PostHistoryTypeId="3" PostId="633" RevisionGUID="63b0f602-637b-42d8-8acf-b551831c9883" CreationDate="2022-03-07T12:06:23.127" UserId="377" Text="|pallet|proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2273" PostHistoryTypeId="2" PostId="634" RevisionGUID="fd30400b-e9c6-4075-a364-f77c17adc919" CreationDate="2022-03-07T12:15:50.347" UserId="532" Text="I want to teleport the ksm in kusama to ksm in statemine. I use the code&#xD;&#xA;```&#xD;&#xA;call = _substrate.compose_call(&#xD;&#xA;        call_module='Xcmpallet',&#xD;&#xA;        call_function='Limited_teleport_assets',&#xD;&#xA;        call_params={&#xD;&#xA;            'dest':&#xD;&#xA;                {&quot;V1&quot;: {&#xD;&#xA;                        &quot;parents&quot;: 0,&#xD;&#xA;                        &quot;interior&quot;: {&quot;X1&quot;: {&quot;Parachain&quot;: 1000}}&#xD;&#xA;                        }},&#xD;&#xA;            &quot;beneficiary&quot;:&#xD;&#xA;                {&quot;V1&quot;: {&#xD;&#xA;                        &quot;parents&quot;: 0,&#xD;&#xA;                        &quot;interior&quot;:&#xD;&#xA;                            {&quot;X1&quot;: {&#xD;&#xA;                                &quot;AccountId32&quot;: {&quot;network&quot;: &quot;Any&quot;,&#xD;&#xA;                                                &quot;id&quot;: target}}}}},&#xD;&#xA;            &quot;assets&quot;: {&quot;V1&quot;: [{&quot;id&quot;: {&quot;Concrete&quot;: {&quot;parents&quot;: 0,&#xD;&#xA;                                                   &quot;interior&quot;: &quot;Here&quot;}},&#xD;&#xA;                               &quot;fun&quot;: {&quot;Fungible&quot;: 10000000)}}]},&#xD;&#xA;            &quot;weightLimit&quot;: &quot;Unlimited&quot;,&#xD;&#xA;        }&#xD;&#xA;    )&#xD;&#xA;``` &#xD;&#xA;but the error is &#xD;&#xA;```{&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;error&quot;: {&quot;code&quot;: -32000, &quot;message&quot;: &quot;Server error&quot;, &quot;data&quot;: &quot;ValueError: Pallet \'Xcmpallet\' not found&quot;}, &quot;id&quot;: 1646654989}'```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2275" PostHistoryTypeId="1" PostId="634" RevisionGUID="fd30400b-e9c6-4075-a364-f77c17adc919" CreationDate="2022-03-07T12:15:50.347" UserId="532" Text="How to solve &quot; Pallet \'Xcmpallet\' not found&quot; when I teleport ksm in kusama to ksm in statemine?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2276" PostHistoryTypeId="3" PostId="634" RevisionGUID="fd30400b-e9c6-4075-a364-f77c17adc919" CreationDate="2022-03-07T12:15:50.347" UserId="532" Text="|kusama|python|substrateinterface|xcmp|statemine|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2281" PostHistoryTypeId="2" PostId="636" RevisionGUID="47c2a593-1ea9-4751-89bb-793746aeeb4c" CreationDate="2022-03-07T12:31:27.317" UserId="380" Text="The answer here was to make the contract [payable](https://stackoverflow.com/a/70862535/1178971).&#xD;&#xA;&#xD;&#xA;This is a fairly recent change to ink contracts that requires the constructors to be decorated with `payable`.&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;    impl Dapp {&#xD;&#xA;        /// Creates a new payable contract&#xD;&#xA;        #[ink(constructor, payable)]&#xD;&#xA;        pub fn new(initial_supply: Balance) -&gt; Self {&#xD;&#xA;            ...&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Source: https://github.com/paritytech/ink/blob/07a8ed9b14a768b87f69dfcd6fedc580c7f36e0e/RELEASES.md#constructors-got-a-new-field-payable-bool" ContentLicense="CC BY-SA 4.0" />
  <row Id="2283" PostHistoryTypeId="5" PostId="636" RevisionGUID="bfa5efd7-0788-4f56-820a-734481ee4801" CreationDate="2022-03-07T12:42:12.937" UserId="380" Comment="added 57 characters in body" Text="The answer here was to make the contract [payable](https://stackoverflow.com/a/70862535/1178971).&#xD;&#xA;&#xD;&#xA;This is a fairly recent change to ink contracts that requires the constructors to be decorated with `payable` if it's intended for them to receive value (i.e. tokens).&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;    impl Dapp {&#xD;&#xA;        /// Creates a new payable contract&#xD;&#xA;        #[ink(constructor, payable)]&#xD;&#xA;        pub fn new(initial_supply: Balance) -&gt; Self {&#xD;&#xA;            ...&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Source: https://github.com/paritytech/ink/blob/07a8ed9b14a768b87f69dfcd6fedc580c7f36e0e/RELEASES.md#constructors-got-a-new-field-payable-bool" ContentLicense="CC BY-SA 4.0" />
  <row Id="2284" PostHistoryTypeId="5" PostId="634" RevisionGUID="97022498-23d1-435a-93e9-1faaf0c03ad0" CreationDate="2022-03-07T12:42:54.747" UserId="532" Comment="deleted 17 characters in body; edited title" Text="I want to teleport the ksm in kusama to ksm in statemine. I use the code&#xD;&#xA;```&#xD;&#xA;call = _substrate.compose_call(&#xD;&#xA;        call_module='Xcmpallet',&#xD;&#xA;        call_function='Limited_teleport_assets',&#xD;&#xA;        call_params={&#xD;&#xA;            'dest':&#xD;&#xA;                {&quot;V1&quot;: {&#xD;&#xA;                        &quot;parents&quot;: 0,&#xD;&#xA;                        &quot;interior&quot;: {&quot;X1&quot;: {&quot;Parachain&quot;: 1000}}&#xD;&#xA;                        }},&#xD;&#xA;            &quot;beneficiary&quot;:&#xD;&#xA;                {&quot;V1&quot;: {&#xD;&#xA;                        &quot;parents&quot;: 0,&#xD;&#xA;                        &quot;interior&quot;:&#xD;&#xA;                            {&quot;X1&quot;: {&#xD;&#xA;                                &quot;AccountId32&quot;: {&quot;network&quot;: &quot;Any&quot;,&#xD;&#xA;                                                &quot;id&quot;: target}}}}},&#xD;&#xA;            &quot;assets&quot;: {&quot;V1&quot;: [{&quot;id&quot;: {&quot;Concrete&quot;: {&quot;parents&quot;: 0,&#xD;&#xA;                                                   &quot;interior&quot;: &quot;Here&quot;}},&#xD;&#xA;                               &quot;fun&quot;: {&quot;Fungible&quot;: 10000000)}}]},&#xD;&#xA;            &quot;weightLimit&quot;: &quot;Unlimited&quot;,&#xD;&#xA;        }&#xD;&#xA;    )&#xD;&#xA;``` &#xD;&#xA;but the error is &#xD;&#xA;```{&quot;code&quot;: -32000, &quot;message&quot;: &quot;Server error&quot;, &quot;data&quot;: &quot;ValueError: Element count of value (1) doesn\'t match type_definition (2)&quot;}```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2285" PostHistoryTypeId="4" PostId="634" RevisionGUID="97022498-23d1-435a-93e9-1faaf0c03ad0" CreationDate="2022-03-07T12:42:54.747" UserId="532" Comment="deleted 17 characters in body; edited title" Text="How to solve &quot; ValueError: Element count of value (1) doesn\'t match type_definition (2)&quot; when I teleport ksm in kusama to ksm in statemine?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2286" PostHistoryTypeId="5" PostId="634" RevisionGUID="30d2e882-9704-4907-b436-7bb90b7c1868" CreationDate="2022-03-07T12:51:27.473" UserId="532" Comment="added 49 characters in body" Text="I want to teleport the ksm in kusama to ksm in statemine. I use the code&#xD;&#xA;```&#xD;&#xA;call = _substrate.compose_call(&#xD;&#xA;        call_module='XcmPallet',&#xD;&#xA;        call_function='limited_teleport_assets',&#xD;&#xA;        call_params={&#xD;&#xA;            'dest':&#xD;&#xA;                {&quot;V1&quot;: {&#xD;&#xA;                        &quot;parents&quot;: 0,&#xD;&#xA;                        &quot;interior&quot;: {&quot;X1&quot;: {&quot;Parachain&quot;: 1000}}&#xD;&#xA;                        }},&#xD;&#xA;            &quot;beneficiary&quot;:&#xD;&#xA;                {&quot;V1&quot;: {&#xD;&#xA;                        &quot;parents&quot;: 0,&#xD;&#xA;                        &quot;interior&quot;:&#xD;&#xA;                            {&quot;X1&quot;: {&#xD;&#xA;                                &quot;AccountId32&quot;: {&quot;network&quot;: {&quot;Any&quot;: None},&#xD;&#xA;                                                &quot;id&quot;: target}}}}},&#xD;&#xA;            &quot;assets&quot;: {&quot;V1&quot;: [{&quot;id&quot;: {&quot;Concrete&quot;: {&quot;parents&quot;: 0,&#xD;&#xA;                                                   &quot;interior&quot;: {&quot;Here&quot;: None}}},&#xD;&#xA;                               &quot;fun&quot;: {&quot;Fungible&quot;: 1000000}}]},&#xD;&#xA;            &quot;fee_asset_item&quot;: 0,&#xD;&#xA;            &quot;weight_limit&quot;: &quot;Unlimited&quot;,&#xD;&#xA;        }&#xD;&#xA;    )&#xD;&#xA;``` &#xD;&#xA;but the error is &#xD;&#xA;```{&quot;code&quot;: -32000, &quot;message&quot;: &quot;Server error&quot;, &quot;data&quot;: &quot;ValueError: Element count of value (1) doesn\'t match type_definition (2)&quot;}```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2289" PostHistoryTypeId="5" PostId="630" RevisionGUID="5fe6874c-f9b0-4f3a-8eb5-9279305ae554" CreationDate="2022-03-07T13:32:45.837" UserId="139" Comment="steps tried" Text="So my chain is running at the moment with 3 invulnerable validators, and I was trying to add another validator to the mix. I generated 2 accounts, transferred some stash to one of them, made a controller account, bonded some balance with the pair, set session keys and started the validation process, and I could see my stash under the waiting tab for staking. However on next session change, my validator was not included in the validator set, even though I had more stash than all invulnerables combined. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-07 14:16:57  New epoch 3 launching at block 0x951c…403f (block slot 548880939 &gt;= start slot 548880939).    &#xD;&#xA;2022-03-07 14:16:57  Next epoch starts at slot 548881139    &#xD;&#xA;2022-03-07 14:16:57 [#594]   Entering emergency mode: ElectionError::Fallback(&quot;NoFallback.&quot;)    &#xD;&#xA;2022-03-07 14:16:57 [594]  election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;I repeatedly get these messages on each session/era change. How can I fix this? &#xD;&#xA;&#xD;&#xA;EDIT : Steps I've tried before :&#xD;&#xA;1. Made sure &#xD;&#xA;```rust&#xD;&#xA;type Fallback = frame_election_provider_support::onchain::OnChainSequentialPhragmen&lt;Self&gt;;&#xD;&#xA;```&#xD;&#xA;2. Started 3 nodes with invulnerable accounts, `--offchain-worker always`&#xD;&#xA;3. The only thing missing from my runtime code is an implementation of `frame_system::offchain::CreateSignedTransaction&lt;LocalCall&gt;` but I don't know how relevant it is. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rzD5R.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2290" PostHistoryTypeId="2" PostId="638" RevisionGUID="807645dc-42af-4bf0-a723-ac3fd8b5d3a3" CreationDate="2022-03-07T15:41:45.790" UserId="172" Text="More generally, if you were to SCALE encode a **_signed transaction_**, you'd follow these steps: &#xD;&#xA;1. Combine the `call`, `extra` and `additional` data and SCALE encode it:&#xD;&#xA;   - `call` data: the pallet index, call index and other fields relevant to this call (e.g. if this is a transfer call from the Balances pallet, this would be `address` and `balance`).&#xD;&#xA;   - `extra` data (signed extensions): e.g. era, nonce and some tip value.&#xD;&#xA;   - `additional` data: the spec version, transaction version and genesis hash of the target chain.&#xD;&#xA;2. If the resulting payload is more than 256 bytes, hash it then sign the result (e.g. using Alice). If not, just sign the SCALE encoded bytes from (1).&#xD;&#xA;3. Format the signature by combining the sender's account ID + the signature from (2) + the `extra` data.&#xD;&#xA;4. Encode the formatted signature.&#xD;&#xA;5. Encode the `call` itself.&#xD;&#xA;6. Construct the extrinsic by creating an array of bytes whereby:&#xD;&#xA;   - The first byte contains the first bit as 1 (denoting that the transaction is signed) and 7 bits containing the [transaction version](https://docs.substrate.io/rustdocs/latest/sp_version/struct.RuntimeVersion.html#structfield.transaction_version) (currently 4 for all Substrate based chains).&#xD;&#xA;   - The remaining bytes contain the result from (4) and (5) (in that order).&#xD;&#xA;7. Prefix the encoded data from (6) with its compact encoded length.&#xD;&#xA;&#xD;&#xA;Have a look at [this example](https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/05_transfer_balance.rs) to see these steps in action. If you were to encode an **_unsigned transaction_**, you'd follow the same procedure except:&#xD;&#xA;1. With no signature present, the part that would usually be signed contains 0 bytes.&#xD;&#xA;2. The first encoded bit is 0 (following the compact length), denoting that the transaction is unsigned.&#xD;&#xA;&#xD;&#xA;For encoding an extrinsic with different signed extensions, you'll need to know what they are and add them to the `extra` data you SCALE encode.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;A couple clarifications on key terms:&#xD;&#xA;&#xD;&#xA;* An [**unsigned transaction**](https://docs.substrate.io/v3/concepts/extrinsics/#unsigned-transactions) in Substrate is just a type of transaction which instead of requiring a signature, requires a set of conditions to be met in order for the transaction to be validated. This implies that developers must carefully implement their own protection mechanisms and economic deterrents against bad actors. &#xD;&#xA;&#xD;&#xA;* A [**signed extension**](https://docs.substrate.io/v3/concepts/tx-pool/#signed-extensions) is a way to extend the information packed into a transaction (signed or unsigned) so that the transaction pool can perform certain validation checks on it. Examples of these checks include: *what's the weight for this transaction and will it fit in the block? Has this transaction already expired? Is the nonce for the same account unique? Is there a tip attached to this transaction?* See the list of signed extensions in FRAME [here](https://docs.substrate.io/rustdocs/latest/frame_system/index.html#signed-extensions). " ContentLicense="CC BY-SA 4.0" />
  <row Id="2292" PostHistoryTypeId="5" PostId="620" RevisionGUID="0ecefd16-a93d-4b75-9ee3-91a7079e02ac" CreationDate="2022-03-07T15:44:35.057" UserId="29" Comment="edited body" Text="The underlying issue here is that Rust macros are not super intelligent.&#xD;&#xA;&#xD;&#xA;While you are correct that all the interior fields of `Kitty` is bounded in length, you are also using the generic type `T: Config` to help access some of those types.&#xD;&#xA;&#xD;&#xA;The Rust macros for automatically deriving `MaxEncodedLen` naively thinks that `T` must also be bounded by `MaxEncodedLen`, even though `T` itself is not being used in the actual types.&#xD;&#xA;&#xD;&#xA;We can fix this in one of two ways:&#xD;&#xA;&#xD;&#xA;1. Add a simple &quot;hint&quot; to the compiler in the form of `#[codec(mel_bound())]`.&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;	// Struct for holding Kitty information.&#xD;&#xA;	#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())] // &lt;---------------- Here&#xD;&#xA;	pub struct Kitty&lt;T: Config&gt; {&#xD;&#xA;		pub dna: [u8; 16],   // Using 16 bytes to represent a kitty DNA&#xD;&#xA;		pub price: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;		pub gender: Gender,&#xD;&#xA;		pub owner: AccountOf&lt;T&gt;,&#xD;&#xA;	}&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;    Oversimplifying, this will allow the compiler to skip trying to derive `MaxEncodedLen` for T, and just check the underlying types themselves all have `MaxEncodedLen`.&#xD;&#xA;&#xD;&#xA;2. Do not use `&lt;T: Config&gt;` when defining `Kitties`.&#xD;&#xA;&#xD;&#xA;    Instead, make generic only the types you need:&#xD;&#xA;    ```&#xD;&#xA;    // Struct for holding Kitty information.&#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    pub struct Kitty&lt;Account, Balance&gt; {&#xD;&#xA;        pub dna: [u8; 16],   // Using 16 bytes to represent a kitty DNA&#xD;&#xA;        pub price: Option&lt;Balance&gt;,&#xD;&#xA;        pub gender: Gender,&#xD;&#xA;        pub owner: Account,&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;    In this case, we have been able to remove `T` completely from the struct definition, and thus will have no complaints from the derive macro about trying to implement `MaxEncodedLen` for it. Note that we were also able to get rid of `#[scale_info(skip_type_params(T))]` from the definition aswell, since this basically doing the same thing as `#[codec(mel_bound())]` above." ContentLicense="CC BY-SA 4.0" />
  <row Id="2294" PostHistoryTypeId="5" PostId="638" RevisionGUID="6a994ba6-5176-4fb6-af00-f293a345a897" CreationDate="2022-03-07T16:26:23.117" UserId="474" Comment="Clarify the unsigned version" Text="More generally, if you were to SCALE encode a **_signed transaction_**, you'd follow these steps: &#xD;&#xA;1. Combine the `call`, `extra` and `additional` data and SCALE encode it:&#xD;&#xA;   - `call` data: the pallet index, call index and other fields relevant to this call (e.g. if this is a transfer call from the Balances pallet, this would be `address` and `balance`).&#xD;&#xA;   - `extra` data (signed extensions): e.g. era, nonce and some tip value.&#xD;&#xA;   - `additional` data: the spec version, transaction version and genesis hash of the target chain.&#xD;&#xA;2. If the resulting payload is more than 256 bytes, hash it then sign the result (e.g. using Alice). If not, just sign the SCALE encoded bytes from (1).&#xD;&#xA;3. Format the signature by combining the sender's account ID + the signature from (2) + the `extra` data.&#xD;&#xA;4. Encode the formatted signature.&#xD;&#xA;5. Encode the `call` itself.&#xD;&#xA;6. Construct the extrinsic by creating an array of bytes whereby:&#xD;&#xA;   - The first byte contains the first bit as 1 (denoting that the transaction is signed) and 7 bits containing the [transaction version](https://docs.substrate.io/rustdocs/latest/sp_version/struct.RuntimeVersion.html#structfield.transaction_version) (currently 4 for all Substrate based chains).&#xD;&#xA;   - The remaining bytes contain the result from (4) and (5) (in that order).&#xD;&#xA;7. Prefix the encoded data from (6) with its compact encoded length.&#xD;&#xA;&#xD;&#xA;Have a look at [this example](https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/05_transfer_balance.rs) to see these steps in action. If you were to encode an **_unsigned transaction_**, you'd follow the same procedure except:&#xD;&#xA;1. The first bit of the first byte set in (6) is 0 (the bit following the compact length added in (7)), denoting that the transaction is unsigned.&#xD;&#xA;2. There are no signature bytes following this first byte encoded in (6); we append the call data from (5) next.&#xD;&#xA;&#xD;&#xA;For encoding an extrinsic with different signed extensions, you'll need to know what they are and add them to the `extra` data you SCALE encode.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;A couple clarifications on key terms:&#xD;&#xA;&#xD;&#xA;* An [**unsigned transaction**](https://docs.substrate.io/v3/concepts/extrinsics/#unsigned-transactions) in Substrate is just a type of transaction which instead of requiring a signature, requires a set of conditions to be met in order for the transaction to be validated. This implies that developers must carefully implement their own protection mechanisms and economic deterrents against bad actors. &#xD;&#xA;&#xD;&#xA;* A [**signed extension**](https://docs.substrate.io/v3/concepts/tx-pool/#signed-extensions) is a way to extend the information packed into a transaction (signed or unsigned) so that the transaction pool can perform certain validation checks on it. Examples of these checks include: *what's the weight for this transaction and will it fit in the block? Has this transaction already expired? Is the nonce for the same account unique? Is there a tip attached to this transaction?* See the list of signed extensions in FRAME [here](https://docs.substrate.io/rustdocs/latest/frame_system/index.html#signed-extensions). " ContentLicense="CC BY-SA 4.0" />
  <row Id="2295" PostHistoryTypeId="24" PostId="638" RevisionGUID="6a994ba6-5176-4fb6-af00-f293a345a897" CreationDate="2022-03-07T16:26:23.117" Comment="Proposed by 474 approved by 172 edit id of 72" ContentLicense="CC BY-SA 4.0" />
  <row Id="2299" PostHistoryTypeId="2" PostId="639" RevisionGUID="27a807b2-fdb4-478e-bc51-10db19ab9750" CreationDate="2022-03-07T16:53:01.507" UserId="172" Text="Different checking mechanisms exists within an extrinsic, to provide a way for applications to ensure some requirements for the extrinisic are met and that it's correctly constructed. To answer your first question, these can be:&#xD;&#xA;&#xD;&#xA;* **Unchecked**: these are signed transactions that require some validation check before they can be accepted in the transaction pool. Any unchecked extrinsic contains the signature for the data being sent plus some extra data.&#xD;&#xA;* **Checked**: inherent extrinsics which by definition don't require signature verification. Instead, they carry information on where the extrinsic comes from and some extra data.&#xD;&#xA;* **Opaque**: used for cases when an extrinsic hasn't yet been committed to a format but can still be decoded." ContentLicense="CC BY-SA 4.0" />
  <row Id="2301" PostHistoryTypeId="2" PostId="640" RevisionGUID="1c0809df-59c5-4f9c-a8ae-abf85a19a440" CreationDate="2022-03-07T17:07:11.050" UserId="372" Text="If you want to do it inside the node, you will need to override some of frontiers RPC handlers. For example, you can see the `EthApi` implementation here:https://github.com/paritytech/frontier/blob/master/client/rpc/src/eth.rs. You could proceed in either of two ways:&#xD;&#xA;&#xD;&#xA;1. Copy this code and change some methods eg `sendRawTransaction` to behave as you like.&#xD;&#xA;2. Write your own struct that wraps the one I linked. For methods you want to enable, you can call into the wrapped original. And for methods you want to block, you can just return immediately with no action or error." ContentLicense="CC BY-SA 4.0" />
  <row Id="2304" PostHistoryTypeId="2" PostId="641" RevisionGUID="b901f08c-472e-4222-855c-ce11b4093049" CreationDate="2022-03-07T17:36:41.337" UserId="85" Text="You can create a proxy with restricted rights and then that account could have a proxy with even more restricted rights I believe.&#xD;&#xA;&#xD;&#xA;Or you could have two proxies with one having voting rights and another having staking rights for example.&#xD;&#xA;&#xD;&#xA;On polkadot there is a non-trivial deposit at the moment for creating a proxy (this is because it has to set up some state on the chain).&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-proxies" ContentLicense="CC BY-SA 4.0" />
  <row Id="2306" PostHistoryTypeId="2" PostId="642" RevisionGUID="68ed73b8-b592-4dde-ae25-f8bf707cf567" CreationDate="2022-03-07T18:53:46.143" UserId="83" Text="&gt; I've seen in some guides suggesting to set Session Keys for validating. My concepts of session keys are that they are an amalgation of 4 keys, that will be used instead of the stash or controller keys on a validator node. &#xD;&#xA;&#xD;&#xA;In the Polkadot wiki **session key** is defined [here][1] as __&quot;Hot keys that are used for performing network operations by validators&quot;__.&#xD;&#xA;&#xD;&#xA;In the Substrate repository [here][2] it shows that these &quot;hot&quot; keys for each authority/validator from a chain specification may be included as session keys in its genesis configuration, and they only include the grandpa, babe, imonline, and authority discovery keys, but not its &quot;cold&quot; stash key or the &quot;hot&quot; controller key. Grandpa are of ed25519 keypair type, whilst the others are sr25519.&#xD;&#xA;&#xD;&#xA;If that chain was using aura instead of babe (for example when running a parachain), then the babe key would be included instead.&#xD;&#xA;&#xD;&#xA;The stash and controller keys need to be [endowed][3] with a balance above the existential deposit, as the controller needs it to pay transaction fees such as bonding the stash to the controller and setting a reward destination, setting the session keys and validator settings with the controller, and loading the session keys into the keystore of the validator node.&#xD;&#xA;&#xD;&#xA;&gt; However my confusion begins when I query the rotateKeys() rpc from author ( I don't know what author is or where this function is defined, please include an explanation for this in your answer as well ), &#xD;&#xA;&#xD;&#xA;&quot;author&quot; represents the the [Substrate **Authoring** RPC API][4]&#xD;&#xA;* `rotate_keys` Substrate rust interface [here][5]&#xD;&#xA;* `rotate_keys` Substrate rust implementation [here][6]&#xD;&#xA;* `rotate_keys` Substrate rust documentation [here][7]&#xD;&#xA;* `rotateKeys` Polkadot.js javascript documentation [here][8]&#xD;&#xA;&#xD;&#xA;&gt; I get a long key like this: 0x87d0bce7ee8e3279674e9a91c4255379592ab5b24ab2bcf9438719d0b08013f0de6b77179766746c767e9fe547d6a57936bbd0846a20b21acd6f75f5fe779f5a6861fae2c2ec3aa460d4559c755d12b4c9186133b8eee66162369348aa7f180afcc75d5a6f0e17f69e8e4c9232ae24b980a230bbe06b1d4ff87ed35985cec04c, which is different on every call. Can someone explain what is going on? Where are these keys coming from? Are they random concats of a ed25519 and 3 sr25519, if my sessionKeys struct has 4 keys just like polkadot?&#xD;&#xA;&#xD;&#xA;In the `rotate_keys` Substrate rust implementation [here][6] it shows that when make that RPC call it calls the `generate_session_keys` function [here][9] and provides the **best block hash** as an argument. &#xD;&#xA;&#xD;&#xA;The `generate_session_keys` function is included in the Substrate documentation [here][10], where it says that this optional argument (the **best block hash**) is used as the seed that it generates a set of session keys from, and those keys are stored within the keystore, and that function returns the **concatenated SCALE encoded public keys** of that set of session keys.&#xD;&#xA;&#xD;&#xA;The response from every rotateKeys() RPC call would be different if the current **best block hash** was different each time it processed that RPC call.&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][11] it shows that it generates each of the key pairs using the seed with `generate_pair(seed.clone())` and concatenates them together (i.e. an ed25519 key pair for grandpa, and three sr25519 key pairs for babe or aura, imonline, and authority discovery), and then encodes the concatenated key pairs using the [Parity SCALE Codec][12].&#xD;&#xA;&#xD;&#xA; The concatenated key pairs may be decoded into raw public keys again using [`decode_into_raw_public_keys`][13].&#xD;&#xA;&#xD;&#xA;&gt; Am I signing a random key with my controller account and then letting my node use that key for validation (grandpa, Imonline heartbeats, babe authorship, etc?)&#xD;&#xA;&#xD;&#xA;In the Polkadot wiki **session certificate** is defined [here][14] as __&quot;A message containing a signature on the concatenation of all the Session keys. Signed by the Controller.&quot;__ &#xD;&#xA;&#xD;&#xA;The [Substrate **Authoring** RPC API][4] stores the generated or provided session keys that are used for validating in the keystore [`CryptoStore`][15], which manages the keys of a node. &#xD;&#xA;&#xD;&#xA;It uses the public key of these stored session keys for signing messages using the controller account.&#xD;&#xA;&#xD;&#xA;A randomly generated key may be provided at genesis or with the `insert_key` RPC call, however the session keys generated with the `rotate_keys` RPC call are based on the **best block hash**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/glossary#session-key&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L311&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L301&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_rpc/author/trait.AuthorApi.html&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/client/rpc-api/src/author/mod.rs#L48&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L102&#xD;&#xA;  [7]: https://paritytech.github.io/substrate/master/sc_rpc/author/trait.AuthorApi.html#tymethod.rotate_keys&#xD;&#xA;  [8]: https://polkadot.js.org/docs/substrate/rpc/#insertkeykeytype-text-suri-text-publickey-bytes-bytes&#xD;&#xA;  [9]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L108&#xD;&#xA;  [10]: https://paritytech.github.io/substrate/master/sp_session/trait.SessionKeys.html#method.generate_session_keys&#xD;&#xA;  [11]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1360&#xD;&#xA;  [12]: https://github.com/paritytech/parity-scale-codec&#xD;&#xA;  [13]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1396&#xD;&#xA;  [14]: https://wiki.polkadot.network/docs/glossary#session-certificate&#xD;&#xA;  [15]: https://paritytech.github.io/substrate/master/sp_keystore/trait.SyncCryptoStore.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="2308" PostHistoryTypeId="5" PostId="642" RevisionGUID="279b2015-f2af-4686-be07-82ff313006aa" CreationDate="2022-03-07T19:09:39.237" UserId="83" Comment="add rotateKeys api implementation for polkadot.js" Text="&gt; I've seen in some guides suggesting to set Session Keys for validating. My concepts of session keys are that they are an amalgation of 4 keys, that will be used instead of the stash or controller keys on a validator node. &#xD;&#xA;&#xD;&#xA;In the Polkadot wiki **session key** is defined [here][1] as __&quot;Hot keys that are used for performing network operations by validators&quot;__.&#xD;&#xA;&#xD;&#xA;In the Substrate repository [here][2] it shows that these &quot;hot&quot; keys for each authority/validator from a chain specification may be included as session keys in its genesis configuration, and they only include the grandpa, babe, imonline, and authority discovery keys, but not its &quot;cold&quot; stash key or the &quot;hot&quot; controller key. Grandpa are of ed25519 keypair type, whilst the others are sr25519.&#xD;&#xA;&#xD;&#xA;If that chain was using aura instead of babe (for example when running a parachain), then the babe key would be included instead.&#xD;&#xA;&#xD;&#xA;The stash and controller keys need to be [endowed][3] with a balance above the existential deposit, as the controller needs it to pay transaction fees such as bonding the stash to the controller and setting a reward destination, setting the session keys and validator settings with the controller, and loading the session keys into the keystore of the validator node.&#xD;&#xA;&#xD;&#xA;&gt; However my confusion begins when I query the rotateKeys() rpc from author ( I don't know what author is or where this function is defined, please include an explanation for this in your answer as well ), &#xD;&#xA;&#xD;&#xA;&quot;author&quot; represents the the [Substrate **Authoring** RPC API][4]&#xD;&#xA;* `rotate_keys` Substrate rust API interface [here][5]&#xD;&#xA;* `rotate_keys` Substrate rust API implementation [here][6]&#xD;&#xA;* `rotate_keys` Substrate rust API documentation [here][7]&#xD;&#xA;* `rotateKeys` Polkadot.js javascript API documentation [here][8]&#xD;&#xA;* `rotateKeys` Polkadot.js javascript API implementation [here][9]&#xD;&#xA;&#xD;&#xA;&gt; I get a long key like this: 0x87d0bce7ee8e3279674e9a91c4255379592ab5b24ab2bcf9438719d0b08013f0de6b77179766746c767e9fe547d6a57936bbd0846a20b21acd6f75f5fe779f5a6861fae2c2ec3aa460d4559c755d12b4c9186133b8eee66162369348aa7f180afcc75d5a6f0e17f69e8e4c9232ae24b980a230bbe06b1d4ff87ed35985cec04c, which is different on every call. Can someone explain what is going on? Where are these keys coming from? Are they random concats of a ed25519 and 3 sr25519, if my sessionKeys struct has 4 keys just like polkadot?&#xD;&#xA;&#xD;&#xA;In the `rotate_keys` Substrate rust implementation [here][6] it shows that when make that RPC call it calls the `generate_session_keys` function [here][10] and provides the **best block hash** as an argument. &#xD;&#xA;&#xD;&#xA;The `generate_session_keys` function is included in the Substrate documentation [here][11], where it says that this optional argument (the **best block hash**) is used as the seed that it generates a set of session keys from, and those keys are stored within the keystore, and that function returns the **concatenated SCALE encoded public keys** of that set of session keys.&#xD;&#xA;&#xD;&#xA;The response from every rotateKeys() RPC call would be different if the current **best block hash** was different each time it processed that RPC call.&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][12] it shows that it generates each of the key pairs using the seed with `generate_pair(seed.clone())` and concatenates them together (i.e. an ed25519 key pair for grandpa, and three sr25519 key pairs for babe or aura, imonline, and authority discovery), and then encodes the concatenated key pairs using the [Parity SCALE Codec][13].&#xD;&#xA;&#xD;&#xA; The concatenated key pairs may be decoded into raw public keys again using [`decode_into_raw_public_keys`][14].&#xD;&#xA;&#xD;&#xA;&gt; Am I signing a random key with my controller account and then letting my node use that key for validation (grandpa, Imonline heartbeats, babe authorship, etc?)&#xD;&#xA;&#xD;&#xA;In the Polkadot wiki **session certificate** is defined [here][15] as __&quot;A message containing a signature on the concatenation of all the Session keys. Signed by the Controller.&quot;__ &#xD;&#xA;&#xD;&#xA;The [Substrate **Authoring** RPC API][4] stores the generated or provided session keys that are used for validating in the keystore [`CryptoStore`][16], which manages the keys of a node. &#xD;&#xA;&#xD;&#xA;It uses the public key of these stored session keys for signing messages using the controller account.&#xD;&#xA;&#xD;&#xA;A randomly generated key may be provided at genesis or with the `insert_key` RPC call, however the session keys generated with the `rotate_keys` RPC call are based on the **best block hash**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/glossary#session-key&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L311&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L301&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_rpc/author/trait.AuthorApi.html&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/client/rpc-api/src/author/mod.rs#L48&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L102&#xD;&#xA;  [7]: https://paritytech.github.io/substrate/master/sc_rpc/author/trait.AuthorApi.html#tymethod.rotate_keys&#xD;&#xA;  [8]: https://polkadot.js.org/docs/substrate/rpc/#insertkeykeytype-text-suri-text-publickey-bytes-bytes&#xD;&#xA;  [9]: https://github.com/polkadot-js/api/blob/master/packages/rpc-augment/src/augment/jsonrpc.ts#L54&#xD;&#xA;  [10]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L108&#xD;&#xA;  [11]: https://paritytech.github.io/substrate/master/sp_session/trait.SessionKeys.html#method.generate_session_keys&#xD;&#xA;  [12]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1360&#xD;&#xA;  [13]: https://github.com/paritytech/parity-scale-codec&#xD;&#xA;  [14]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1396&#xD;&#xA;  [15]: https://wiki.polkadot.network/docs/glossary#session-certificate&#xD;&#xA;  [16]: https://paritytech.github.io/substrate/master/sp_keystore/trait.SyncCryptoStore.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="2309" PostHistoryTypeId="5" PostId="642" RevisionGUID="19c536d7-317c-400c-ba63-0155a6ff1d5d" CreationDate="2022-03-07T19:45:19.370" UserId="83" Comment="add explanation about author" Text="&gt; I've seen in some guides suggesting to set Session Keys for validating. My concepts of session keys are that they are an amalgation of 4 keys, that will be used instead of the stash or controller keys on a validator node. &#xD;&#xA;&#xD;&#xA;In the Polkadot wiki **session key** is defined [here][1] as __&quot;Hot keys that are used for performing network operations by validators&quot;__.&#xD;&#xA;&#xD;&#xA;In the Substrate repository [here][2] it shows that these &quot;hot&quot; keys for each authority/validator from a chain specification may be included as session keys in its genesis configuration, and they only include the grandpa, babe, imonline, and authority discovery keys, but not its &quot;cold&quot; stash key or the &quot;hot&quot; controller key. Grandpa are of ed25519 keypair type, whilst the others are sr25519.&#xD;&#xA;&#xD;&#xA;If that chain was using aura instead of babe (for example when running a parachain), then the babe key would be included instead.&#xD;&#xA;&#xD;&#xA;The stash and controller keys need to be [endowed][3] with a balance above the existential deposit, as the controller needs it to pay transaction fees such as bonding the stash to the controller and setting a reward destination, setting the session keys and validator settings with the controller, and loading the session keys into the keystore of the validator node.&#xD;&#xA;&#xD;&#xA;&gt; However my confusion begins when I query the rotateKeys() rpc from author ( I don't know what author is or where this function is defined, please include an explanation for this in your answer as well ), &#xD;&#xA;&#xD;&#xA;&quot;author&quot; represents the the [Substrate **Authoring** RPC API][4].&#xD;&#xA;&#xD;&#xA;The `rotateKeys` in camelcase may be used in the Polkadot.js javascript API implementation [here][9], which may be used to encode an JSON RPC request with method `author_rotateKeys` and to decode an JSON RPC response. The `rotateKeys` part of the Polkadot.js javascript API documentation is [here][8].&#xD;&#xA;&#xD;&#xA;The Polkadot.js javascript API allows you to configure either a HTTP or WebSockets (WS) provider for sending JSON RPC requests using HTTP to a HTTP RPC server TCP port exposed by the endpoint of a node, or to a WebSockets port that is exposed by a node if you also want support for subscriptions (for example to listen to events such as when the session keys change).&#xD;&#xA;&#xD;&#xA;The node itself listens for these requests. If the JSON RPC request uses the method `author_rotateKeys` then it would be interpreted using the [Substrate **Authoring** RPC API][4].&#xD;&#xA;* `rotate_keys` Substrate rust API interface [here][5]&#xD;&#xA;* `rotate_keys` Substrate rust API implementation [here][6]&#xD;&#xA;* `rotate_keys` Substrate rust API documentation [here][7]&#xD;&#xA;&#xD;&#xA;&gt; I get a long key like this: 0x87d0bce7ee8e3279674e9a91c4255379592ab5b24ab2bcf9438719d0b08013f0de6b77179766746c767e9fe547d6a57936bbd0846a20b21acd6f75f5fe779f5a6861fae2c2ec3aa460d4559c755d12b4c9186133b8eee66162369348aa7f180afcc75d5a6f0e17f69e8e4c9232ae24b980a230bbe06b1d4ff87ed35985cec04c, which is different on every call. Can someone explain what is going on? Where are these keys coming from? Are they random concats of a ed25519 and 3 sr25519, if my sessionKeys struct has 4 keys just like polkadot?&#xD;&#xA;&#xD;&#xA;In the `rotate_keys` Substrate rust implementation [here][6] it shows that when make that RPC call it calls the `generate_session_keys` function [here][10] and provides the **best block hash** as an argument. &#xD;&#xA;&#xD;&#xA;The `generate_session_keys` function is included in the Substrate documentation [here][11], where it says that this optional argument (the **best block hash**) is used as the seed that it generates a set of session keys from, and those keys are stored within the keystore, and that function returns the **concatenated SCALE encoded public keys** of that set of session keys.&#xD;&#xA;&#xD;&#xA;The response from every rotateKeys() RPC call would be different if the current **best block hash** was different each time it processed that RPC call.&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][12] it shows that it generates each of the key pairs using the seed with `generate_pair(seed.clone())` and concatenates them together (i.e. an ed25519 key pair for grandpa, and three sr25519 key pairs for babe or aura, imonline, and authority discovery), and then encodes the concatenated key pairs using the [Parity SCALE Codec][13].&#xD;&#xA;&#xD;&#xA; The concatenated key pairs may be decoded into raw public keys again using [`decode_into_raw_public_keys`][14].&#xD;&#xA;&#xD;&#xA;&gt; Am I signing a random key with my controller account and then letting my node use that key for validation (grandpa, Imonline heartbeats, babe authorship, etc?)&#xD;&#xA;&#xD;&#xA;In the Polkadot wiki **session certificate** is defined [here][15] as __&quot;A message containing a signature on the concatenation of all the Session keys. Signed by the Controller.&quot;__ &#xD;&#xA;&#xD;&#xA;The [Substrate **Authoring** RPC API][4] stores the generated or provided session keys that are used for validating in the keystore [`CryptoStore`][16], which manages the keys of a node. &#xD;&#xA;&#xD;&#xA;It uses the public key of these stored session keys for signing messages using the controller account.&#xD;&#xA;&#xD;&#xA;A randomly generated key may be provided at genesis or with the `insert_key` RPC call, however the session keys generated with the `rotate_keys` RPC call are based on the **best block hash**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/glossary#session-key&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L311&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L301&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_rpc/author/trait.AuthorApi.html&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/client/rpc-api/src/author/mod.rs#L48&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L102&#xD;&#xA;  [7]: https://paritytech.github.io/substrate/master/sc_rpc/author/trait.AuthorApi.html#tymethod.rotate_keys&#xD;&#xA;  [8]: https://polkadot.js.org/docs/substrate/rpc/#insertkeykeytype-text-suri-text-publickey-bytes-bytes&#xD;&#xA;  [9]: https://github.com/polkadot-js/api/blob/master/packages/rpc-augment/src/augment/jsonrpc.ts#L54&#xD;&#xA;  [10]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L108&#xD;&#xA;  [11]: https://paritytech.github.io/substrate/master/sp_session/trait.SessionKeys.html#method.generate_session_keys&#xD;&#xA;  [12]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1360&#xD;&#xA;  [13]: https://github.com/paritytech/parity-scale-codec&#xD;&#xA;  [14]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1396&#xD;&#xA;  [15]: https://wiki.polkadot.network/docs/glossary#session-certificate&#xD;&#xA;  [16]: https://paritytech.github.io/substrate/master/sp_keystore/trait.SyncCryptoStore.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="2310" PostHistoryTypeId="2" PostId="643" RevisionGUID="5905ce1c-d9c9-42ce-9dd8-18f723854f14" CreationDate="2022-03-07T20:07:34.763" UserId="568" Text="According to Polkadot's events description page, the [`Staking.EraPaid`](https://polkadot.js.org/docs/substrate/events/#erapaidu32-u128-u128) event means the following: &#xD;&#xA;&gt;The era payout has been set; the first balance is the validator-payout; the second is the remainder from the maximum amount of reward. [era_index, validator_payout, remainder].&#xD;&#xA;&#xD;&#xA;However, I'd like to know for sure if this event means any balance change has just happened.&#xD;&#xA;&#xD;&#xA;More specifically, would I be correct if I said that the validator of the current block would receive `validator_payout` as a reward? Or do I have to do some math with  `remainder`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2312" PostHistoryTypeId="1" PostId="643" RevisionGUID="5905ce1c-d9c9-42ce-9dd8-18f723854f14" CreationDate="2022-03-07T20:07:34.763" UserId="568" Text="What does the Staking.EraPaid event mean?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2313" PostHistoryTypeId="3" PostId="643" RevisionGUID="5905ce1c-d9c9-42ce-9dd8-18f723854f14" CreationDate="2022-03-07T20:07:34.763" UserId="568" Text="|polkadot|staking|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2314" PostHistoryTypeId="5" PostId="642" RevisionGUID="1865579b-8f14-4f92-8289-6b0323852bd2" CreationDate="2022-03-07T20:28:42.140" UserId="83" Comment="clarify use of cURL vs Polkadot.js" Text="&gt; I've seen in some guides suggesting to set Session Keys for validating. My concepts of session keys are that they are an amalgation of 4 keys, that will be used instead of the stash or controller keys on a validator node. &#xD;&#xA;&#xD;&#xA;In the Polkadot wiki **session key** is defined [here][1] as __&quot;Hot keys that are used for performing network operations by validators&quot;__.&#xD;&#xA;&#xD;&#xA;In the Substrate repository [here][2] it shows that these &quot;hot&quot; keys for each authority/validator from a chain specification may be included as session keys in its genesis configuration, and they only include the grandpa, babe, imonline, and authority discovery keys, but not its &quot;cold&quot; stash key or the &quot;hot&quot; controller key. Grandpa are of ed25519 keypair type, whilst the others are sr25519.&#xD;&#xA;&#xD;&#xA;If that chain was using aura instead of babe (for example when running a parachain), then the babe key would be included instead.&#xD;&#xA;&#xD;&#xA;The stash and controller keys need to be [endowed][3] with a balance above the existential deposit, as the controller needs it to pay transaction fees such as bonding the stash to the controller and setting a reward destination, setting the session keys and validator settings with the controller, and loading the session keys into the keystore of the validator node.&#xD;&#xA;&#xD;&#xA;&gt; However my confusion begins when I query the rotateKeys() rpc from author ( I don't know what author is or where this function is defined, please include an explanation for this in your answer as well ), &#xD;&#xA;&#xD;&#xA;&quot;author&quot; represents the the [Substrate **Authoring** RPC API][4].&#xD;&#xA;&#xD;&#xA;In addition to JSON RPC requests using cURL using method `author_rotateKeys`, `rotateKeys` may also be used with the Polkadot.js javascript API implementation [here][9], which may be used to encode an JSON RPC request with method `author_rotateKeys` and to decode an JSON RPC response. The `rotateKeys` part of the Polkadot.js javascript API documentation is [here][8].&#xD;&#xA;&#xD;&#xA;The Polkadot.js javascript API allows you to configure either a HTTP or WebSockets (WS) provider for sending JSON RPC requests using HTTP to a HTTP RPC server TCP port exposed by the endpoint of a node, or to a WebSockets port that is exposed by a node if you also want support for subscriptions (for example to listen to events such as when the session keys change).&#xD;&#xA;&#xD;&#xA;The node itself listens for these requests. If the JSON RPC request uses the method `author_rotateKeys` then it would be interpreted using the [Substrate **Authoring** RPC API][4].&#xD;&#xA;* `rotate_keys` Substrate rust API interface [here][5]&#xD;&#xA;* `rotate_keys` Substrate rust API implementation [here][6]&#xD;&#xA;* `rotate_keys` Substrate rust API documentation [here][7]&#xD;&#xA;&#xD;&#xA;&gt; I get a long key like this: 0x87d0bce7ee8e3279674e9a91c4255379592ab5b24ab2bcf9438719d0b08013f0de6b77179766746c767e9fe547d6a57936bbd0846a20b21acd6f75f5fe779f5a6861fae2c2ec3aa460d4559c755d12b4c9186133b8eee66162369348aa7f180afcc75d5a6f0e17f69e8e4c9232ae24b980a230bbe06b1d4ff87ed35985cec04c, which is different on every call. Can someone explain what is going on? Where are these keys coming from? Are they random concats of a ed25519 and 3 sr25519, if my sessionKeys struct has 4 keys just like polkadot?&#xD;&#xA;&#xD;&#xA;In the `rotate_keys` Substrate rust implementation [here][6] it shows that when make that RPC call it calls the `generate_session_keys` function [here][10] and provides the **best block hash** as an argument. &#xD;&#xA;&#xD;&#xA;The `generate_session_keys` function is included in the Substrate documentation [here][11], where it says that this optional argument (the **best block hash**) is used as the seed that it generates a set of session keys from, and those keys are stored within the keystore, and that function returns the **concatenated SCALE encoded public keys** of that set of session keys.&#xD;&#xA;&#xD;&#xA;The response from every rotateKeys() RPC call would be different if the current **best block hash** was different each time it processed that RPC call.&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][12] it shows that it generates each of the key pairs using the seed with `generate_pair(seed.clone())` and concatenates them together (i.e. an ed25519 key pair for grandpa, and three sr25519 key pairs for babe or aura, imonline, and authority discovery), and then encodes the concatenated key pairs using the [Parity SCALE Codec][13].&#xD;&#xA;&#xD;&#xA; The concatenated key pairs may be decoded into raw public keys again using [`decode_into_raw_public_keys`][14].&#xD;&#xA;&#xD;&#xA;&gt; Am I signing a random key with my controller account and then letting my node use that key for validation (grandpa, Imonline heartbeats, babe authorship, etc?)&#xD;&#xA;&#xD;&#xA;In the Polkadot wiki **session certificate** is defined [here][15] as __&quot;A message containing a signature on the concatenation of all the Session keys. Signed by the Controller.&quot;__ &#xD;&#xA;&#xD;&#xA;The [Substrate **Authoring** RPC API][4] stores the generated or provided session keys that are used for validating in the keystore [`CryptoStore`][16], which manages the keys of a node. &#xD;&#xA;&#xD;&#xA;It uses the public key of these stored session keys for signing messages using the controller account.&#xD;&#xA;&#xD;&#xA;A randomly generated key may be provided at genesis or with the `insert_key` RPC call, however the session keys generated with the `rotate_keys` RPC call are based on the **best block hash**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/glossary#session-key&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L311&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L301&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_rpc/author/trait.AuthorApi.html&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/client/rpc-api/src/author/mod.rs#L48&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L102&#xD;&#xA;  [7]: https://paritytech.github.io/substrate/master/sc_rpc/author/trait.AuthorApi.html#tymethod.rotate_keys&#xD;&#xA;  [8]: https://polkadot.js.org/docs/substrate/rpc/#insertkeykeytype-text-suri-text-publickey-bytes-bytes&#xD;&#xA;  [9]: https://github.com/polkadot-js/api/blob/master/packages/rpc-augment/src/augment/jsonrpc.ts#L54&#xD;&#xA;  [10]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L108&#xD;&#xA;  [11]: https://paritytech.github.io/substrate/master/sp_session/trait.SessionKeys.html#method.generate_session_keys&#xD;&#xA;  [12]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1360&#xD;&#xA;  [13]: https://github.com/paritytech/parity-scale-codec&#xD;&#xA;  [14]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1396&#xD;&#xA;  [15]: https://wiki.polkadot.network/docs/glossary#session-certificate&#xD;&#xA;  [16]: https://paritytech.github.io/substrate/master/sp_keystore/trait.SyncCryptoStore.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="2315" PostHistoryTypeId="2" PostId="644" RevisionGUID="66f4eb5e-5df3-4f93-b548-ba75f6f4dcab" CreationDate="2022-03-08T00:32:54.217" UserId="29" Text="There is a nice test that could be helpful for you to discover how to use `sudo`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let call = Call::Balances(BalancesCall::transfer {&#xD;&#xA;	dest: bob,&#xD;&#xA;	value: 10_000,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;let found_event = cxt&#xD;&#xA;	.api&#xD;&#xA;	.tx()&#xD;&#xA;	.sudo()&#xD;&#xA;	.sudo(call)&#xD;&#xA;	.sign_and_submit_then_watch(&amp;alice)&#xD;&#xA;	.await?&#xD;&#xA;	.wait_for_finalized_success()&#xD;&#xA;	.await?&#xD;&#xA;	.has::&lt;sudo::events::Sudid&gt;()?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://github.com/paritytech/subxt/blob/b1b717332eb44af3f992ad4486b0d43a8d1f6d79/subxt/tests/integration/frame/sudo.rs#L42" ContentLicense="CC BY-SA 4.0" />
  <row Id="2318" PostHistoryTypeId="5" PostId="625" RevisionGUID="500b5166-5c63-4346-b94f-c17538a2c298" CreationDate="2022-03-08T02:07:01.963" UserId="129" Comment="added 64 characters in body" Text="I deployed a smart contract to a substrate chain. How can I upgrade the smart contract's logic to a newer version?&#xD;&#xA;&#xD;&#xA;Edit: I'm using ink! and deployed on Shibuya (Astar testnet)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2320" PostHistoryTypeId="6" PostId="634" RevisionGUID="6181fb6f-3f3b-4c95-8849-bdff4059b449" CreationDate="2022-03-08T02:54:51.090" UserId="104" Comment="Change XCMP tag to XCM" Text="|kusama|xcm|python|substrateinterface|statemine|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2322" PostHistoryTypeId="2" PostId="645" RevisionGUID="f1a040d8-3903-460f-8169-fea765af99e2" CreationDate="2022-03-08T03:43:01.447" UserId="104" Text="When it comes to generic instructions that don't depend on specific implementations, I don't think XCM is the right answer, because _how_ an XCM instruction gets interpreted is always determined by the chain executing said XCM instruction. That goes to say that even &quot;generic&quot; XCM fungible instructions like `WithdrawAsset` -- there's no guarantee that the asset being withdrawn is always going to be from the `Balances` pallet, and the sender is unable to control any of such behaviours.&#xD;&#xA;&#xD;&#xA;The more appropriate mechanism for executing cross-consensus instructions with well-defined semantics will be [SPREE](https://wiki.polkadot.network/docs/learn-spree), but it is still in the works." ContentLicense="CC BY-SA 4.0" />
  <row Id="2324" PostHistoryTypeId="5" PostId="634" RevisionGUID="09f11c7b-118f-42ef-9e8d-6c6d7f793f81" CreationDate="2022-03-08T06:44:44.113" UserId="532" Comment="added 71 characters in body" Text="I want to teleport the ksm in kusama to ksm in statemine. I use the code&#xD;&#xA;```&#xD;&#xA;call = _substrate.compose_call(&#xD;&#xA;        call_module='XcmPallet',&#xD;&#xA;        call_function='limited_teleport_assets',&#xD;&#xA;        call_params={&#xD;&#xA;            'dest':&#xD;&#xA;                {&quot;V1&quot;: {&#xD;&#xA;                    &quot;parents&quot;: 0,&#xD;&#xA;                    &quot;interior&quot;: {&quot;X1&quot;: {&quot;Parachain&quot;: 1000}}&#xD;&#xA;                }},&#xD;&#xA;            &quot;beneficiary&quot;:&#xD;&#xA;                {&quot;V1&quot;: {&#xD;&#xA;                    &quot;parents&quot;: 0,&#xD;&#xA;                    &quot;interior&quot;:&#xD;&#xA;                        {&quot;X1&quot;: {&#xD;&#xA;                            &quot;AccountId32&quot;: {&quot;network&quot;: &quot;Any&quot;,&#xD;&#xA;                                            &quot;id&quot;: target}}}}},&#xD;&#xA;            &quot;assets&quot;: {&quot;V1&quot;: [&#xD;&#xA;                                {&quot;id&quot;: {&quot;Concrete&quot;: {&quot;parents&quot;: 0,&#xD;&#xA;                                                     &quot;interior&quot;: &quot;Here&quot;&#xD;&#xA;                                                     }}},&#xD;&#xA;                                {&quot;fun&quot;: {&quot;Fungible&quot;: amount}}&#xD;&#xA;                            ]},&#xD;&#xA;            &quot;fee_asset_item&quot;: 0,&#xD;&#xA;            &quot;weight_limit&quot;: &quot;Unlimited&quot;,&#xD;&#xA;        }&#xD;&#xA;    )&#xD;&#xA;``` &#xD;&#xA;but the error is &#xD;&#xA;```{&quot;code&quot;: -32000, &quot;message&quot;: &quot;Server error&quot;, &quot;data&quot;: &quot;ValueError: Element count of value (1) doesn\'t match type_definition (2)&quot;}```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2325" PostHistoryTypeId="2" PostId="646" RevisionGUID="890a0d3e-c661-403d-9bd7-bff1fbde60c9" CreationDate="2022-03-08T08:16:00.083" UserId="567" Text="You can have a look at Parity upgradeable example:&#xD;&#xA;https://github.com/paritytech/ink/tree/master/examples/upgradeable-contract&#xD;&#xA;&#xD;&#xA;It follows proxy pattern of OpenZeppelin" ContentLicense="CC BY-SA 4.0" />
  <row Id="2327" PostHistoryTypeId="5" PostId="604" RevisionGUID="17eb8b1d-70a6-4ee5-9f50-6d2d8463e344" CreationDate="2022-03-08T08:21:21.587" UserId="116" Comment="Spellcheck and language" Text="```rust&#xD;&#xA;pub fn development_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;	let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;&#xD;&#xA;	Ok(ChainSpec::from_genesis(&#xD;&#xA;		// Name&#xD;&#xA;		&quot;Development&quot;,&#xD;&#xA;		// ID&#xD;&#xA;		&quot;dev&quot;,&#xD;&#xA;		ChainType::Development,&#xD;&#xA;		move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				wasm_binary,&#xD;&#xA;				// Initial PoA authorities&#xD;&#xA;				vec![authority_keys_from_seed(&quot;Mrisho&quot;)],&#xD;&#xA;				// Sudo account&#xD;&#xA;				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;				// Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Masanja&quot;),&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				],&#xD;&#xA;				true,&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;		// Bootnodes&#xD;&#xA;		vec![],&#xD;&#xA;		// Telemetry&#xD;&#xA;		None,&#xD;&#xA;		// Protocol ID&#xD;&#xA;		None,&#xD;&#xA;		// Properties&#xD;&#xA;		None,&#xD;&#xA;		// Extensions&#xD;&#xA;		None,&#xD;&#xA;	))&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn local_testnet_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;	let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;&#xD;&#xA;	Ok(ChainSpec::from_genesis(&#xD;&#xA;		// Name&#xD;&#xA;		&quot;Local Testnet&quot;,&#xD;&#xA;		// ID&#xD;&#xA;		&quot;local_testnet&quot;,&#xD;&#xA;		ChainType::Local,&#xD;&#xA;		move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				wasm_binary,&#xD;&#xA;				// Initial PoA authorities&#xD;&#xA;				vec![authority_keys_from_seed(&quot;Mrisho&quot;), authority_keys_from_seed(&quot;Masanja&quot;)],&#xD;&#xA;				// Sudo account&#xD;&#xA;				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;				// Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Mrisho&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Masanja&quot;),&#xD;&#xA;&#xD;&#xA;				],&#xD;&#xA;				true,&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;		// Bootnodes&#xD;&#xA;		vec![],&#xD;&#xA;		// Telemetry&#xD;&#xA;		None,&#xD;&#xA;		// Protocol ID&#xD;&#xA;		None,&#xD;&#xA;		// Properties&#xD;&#xA;		None,&#xD;&#xA;		// Extensions&#xD;&#xA;		None,&#xD;&#xA;	))&#xD;&#xA;}&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;In the node template I modified my chain spec.rs and generated json file and everything is well. But when I run my node via node-template --dev --tmp. Or via specifying the json file ./node-template —chain chain spec.json.  The accounts which I defined they aren't present while viewing my node in the polkadot.js.  Despite deleting them, the alice ,bob and other predefined accounts are the only visible accounts." ContentLicense="CC BY-SA 4.0" />
  <row Id="2328" PostHistoryTypeId="4" PostId="604" RevisionGUID="17eb8b1d-70a6-4ee5-9f50-6d2d8463e344" CreationDate="2022-03-08T08:21:21.587" UserId="116" Comment="Spellcheck and language" Text="The node template can't fetch the accounts from chain-spec.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="2329" PostHistoryTypeId="24" PostId="604" RevisionGUID="17eb8b1d-70a6-4ee5-9f50-6d2d8463e344" CreationDate="2022-03-08T08:21:21.587" Comment="Proposed by 116 approved by 104, 351 edit id of 71" ContentLicense="CC BY-SA 4.0" />
  <row Id="2330" PostHistoryTypeId="5" PostId="645" RevisionGUID="eace1b69-4794-45b1-9206-9737f12aa750" CreationDate="2022-03-08T08:52:58.127" UserId="104" Comment="Grammar" Text="When it comes to generic instructions that don't depend on specific implementations, I don't think XCM is the right answer, because _how_ an XCM instruction gets interpreted is always determined by the chain executing said XCM instruction. That goes to say that even for &quot;generic&quot; XCM fungible instructions like `WithdrawAsset`, there's no guarantee that the asset being withdrawn is always going to be from the `Balances` pallet, and the sender is unable to control any of such behaviours.&#xD;&#xA;&#xD;&#xA;The more appropriate mechanism for executing cross-consensus instructions with well-defined semantics will be [SPREE](https://wiki.polkadot.network/docs/learn-spree), but it is still in the works." ContentLicense="CC BY-SA 4.0" />
  <row Id="2331" PostHistoryTypeId="2" PostId="647" RevisionGUID="4bf9d14e-7a9d-439b-a2af-53e323b0d8a8" CreationDate="2022-03-08T10:14:16.750" UserId="116" Text="Is it possible to change the passphrase of an account in polkadotjs web-browser plugin?&#xD;&#xA;&#xD;&#xA;If the seed words are saved it is possible to import it again with a new password but if I export it to json and try to import it the password remains the same.&#xD;&#xA;&#xD;&#xA;Is there any other known way of chaining it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2333" PostHistoryTypeId="1" PostId="647" RevisionGUID="4bf9d14e-7a9d-439b-a2af-53e323b0d8a8" CreationDate="2022-03-08T10:14:16.750" UserId="116" Text="How to change password for a key in polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="2334" PostHistoryTypeId="3" PostId="647" RevisionGUID="4bf9d14e-7a9d-439b-a2af-53e323b0d8a8" CreationDate="2022-03-08T10:14:16.750" UserId="116" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2335" PostHistoryTypeId="2" PostId="648" RevisionGUID="e8e6e746-6ff3-4db8-875b-153a3380ed5c" CreationDate="2022-03-08T10:28:59.623" UserId="574" Text="I finished the [substrate kitty tutorial](https://docs.substrate.io/tutorials/v3/kitties/pt2/) (backend and frontend). Now I would like to build a simple frontend for the [RMRK pallet](https://github.com/rmrk-team/rmrk-substrate). Now I stuck on the .multi(...) method. Where can I find a documentation about this .multi-method?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;      unsub = await api.query.rmrkCore.collections.multi(collectionIds, collections =&gt; {&#xD;&#xA;          const collectionsMap = collections.map(collection =&gt; parseCollection(collection.unwrap()));&#xD;&#xA;          setCollections(collectionsMap);&#xD;&#xA;      });&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;The collection.unwrap() returns an error because it is [null,null]&#xD;&#xA;&#xD;&#xA;--&gt; However, with the following code I get a nice map&lt;id,collections&gt;&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;const entries = await api.query.rmrkCore.collections.entries();&#xD;&#xA;const ids = entries.map(entry =&gt; entry[0]);&#xD;&#xA;setCollectionIds(ids);&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;My goal is to parse the collections and store them (setCollections(collectionsMap))&#xD;&#xA;&#xD;&#xA;I am grateful about any help :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2337" PostHistoryTypeId="1" PostId="648" RevisionGUID="e8e6e746-6ff3-4db8-875b-153a3380ed5c" CreationDate="2022-03-08T10:28:59.623" UserId="574" Text="How to use the .multi() method? (substrate-fron-end-template)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2338" PostHistoryTypeId="3" PostId="648" RevisionGUID="e8e6e746-6ff3-4db8-875b-153a3380ed5c" CreationDate="2022-03-08T10:28:59.623" UserId="574" Text="|pallet|javascript|substrate-front-end|rmrk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2339" PostHistoryTypeId="2" PostId="649" RevisionGUID="53e6eb54-30c4-46d4-ae63-7b86da0aee16" CreationDate="2022-03-08T10:40:22.167" UserId="575" Text="you can't change the password for your json file. You can set a new password by re-importing the account using the mnemonics. But the password for unlocking the previously downloaded json files won't change." ContentLicense="CC BY-SA 4.0" />
  <row Id="2341" PostHistoryTypeId="5" PostId="65" RevisionGUID="c78db0c0-e800-48ac-9024-7be723dc9b20" CreationDate="2022-03-08T10:56:36.193" UserId="151" Comment="added 8602 characters in body" Text="[Rust][1] is a systems programming language focused on three goals: safety, speed, and concurrency. It maintains these goals without needing a garbage collector, making it a useful language for a number of use cases other languages aren’t good at: embedding in other languages, programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems.&#xD;&#xA;&#xD;&#xA;It improves on current languages targeting this space by having a number of compile-time safety checks that produce no runtime overhead, while eliminating all data races. Rust also aims to achieve ‘zero-cost abstractions’ even though some of these abstractions feel like those of a high-level language. Even then, Rust still allows precise control like a low-level language would.&#xD;&#xA;&#xD;&#xA;## Try Rust online in the [Rust Playground][play]&#xD;&#xA;&#xD;&#xA;The Rust Playground is an online application that allows you to experiment with Rust by editing and running Rust code from the comfort of your browser; no need to install Rust locally! Several crates (Rust's reusable libraries) are available in the playground to showcase some of Rust's ecosystem.&#xD;&#xA;&#xD;&#xA;## Version&#xD;&#xA;&#xD;&#xA;After a long period of iteration and experimentation, Rust 1.0 shipped on May 15th, 2015. This release is the official beginning of the Rust language's commitment to stability, and as such it offers a firm foundation for building applications and libraries. From this point forward, breaking changes are largely out of scope (some minor caveats apply, such as compiler bugs).&#xD;&#xA;&#xD;&#xA;Rust employs three release channels: stable, beta, and nightly. Every six weeks the beta channel is released as a stable version and the current nightly channel becomes the beta candidate.&#xD;&#xA;&#xD;&#xA;### Edition&#xD;&#xA;&#xD;&#xA;Even though Rust commits to stability, editions are used to introduce changes that would be breaking (new keyword for instance). Every version of the compiler supports every edition introduced before its release. You just mark your crate with the edition you want to target and you get the feature of this edition.&#xD;&#xA;&#xD;&#xA;Currently, there are three editions: *2015* *2018*, and *2021*. Find out more in the [Edition Guide](https://doc.rust-lang.org/nightly/edition-guide/).&#xD;&#xA;&#xD;&#xA;## What does it do?&#xD;&#xA;&#xD;&#xA;Rust supports a mixture of programming styles: imperative procedural, concurrent actor, object-oriented and functional. It supports generic programming and meta-programming, in both static and dynamic styles. Rust is also capable of creating bindings for C foreign function interfaces.&#xD;&#xA;&#xD;&#xA;The language design pursues the following goals:&#xD;&#xA;&#xD;&#xA; - Compile-time error detection and prevention.&#xD;&#xA; - Clarity and precision of expression.&#xD;&#xA; - Run-time efficiency.&#xD;&#xA; - High-level zero-cost abstractions.&#xD;&#xA; - Safe concurrency.&#xD;&#xA;&#xD;&#xA;### Standard Library&#xD;&#xA;&#xD;&#xA;You can view what the standard library has to offer, and search through it, [here][2]. The scope of the standard library will continue to grow in future versions of the language.&#xD;&#xA;&#xD;&#xA;## Getting Started&#xD;&#xA;&#xD;&#xA;To get started with the language:&#xD;&#xA;&#xD;&#xA;1. Start with [the book][3].&#xD;&#xA;2. Open up [the standard library documentation][4].&#xD;&#xA;3. Read [Rust by Example][6].&#xD;&#xA;4. When you are ready for the deepest and darkest arts of Rust, dive into [The Rustonomicon][5].&#xD;&#xA;&#xD;&#xA;To help your memory, there is a [cheat sheet][cheat] with references to these books.&#xD;&#xA;&#xD;&#xA;You can find a lot more learning resources (including non-English ones) in [the `rust-learning` repository](https://github.com/ctjhoa/rust-learning) or in [the `rust-unofficial` repository](https://github.com/rust-unofficial).&#xD;&#xA;&#xD;&#xA;  [1]: https://www.rust-lang.org/&#xD;&#xA;  [2]: https://doc.rust-lang.org/std/&#xD;&#xA;  [3]: https://doc.rust-lang.org/book/&#xD;&#xA;  [4]: https://doc.rust-lang.org/std/&#xD;&#xA;  [5]: https://doc.rust-lang.org/nomicon/&#xD;&#xA;[faq]: https://www.rust-lang.org/faq.html&#xD;&#xA;  [6]: https://rustbyexample.com/&#xD;&#xA;[cheat]: https://cheats.rs/&#xD;&#xA;&#xD;&#xA;## Getting Help&#xD;&#xA;&#xD;&#xA;Not all questions are suitable for Stack Overflow, and discussions certainly are not. If you wish to ask for a recommendation for an IDE, a library, or wish to discuss about the best way to organize a bit of code, then you may consider alternative venues.&#xD;&#xA;&#xD;&#xA;More open-ended questions and discussions are welcome on:&#xD;&#xA;&#xD;&#xA; - the [Rust-Beginners IRC channel](https://chat.mibbit.com/?server=irc.mozilla.org&amp;channel=%23rust-beginners),&#xD;&#xA; - the [Rust subreddit](https://www.reddit.com/r/rust/),&#xD;&#xA; - the [Rust users forum](https://users.rust-lang.org/).&#xD;&#xA;&#xD;&#xA;There is a list of Rust IRC channels on the [community page](https://www.rust-lang.org/community#contribute-talk), and there are even language-specific channels if English is not your forte.&#xD;&#xA;&#xD;&#xA;Additionally, the *AreWeXYet* collection of websites provide helpful summaries and lists of thematic resources: &#xD;&#xA;&#xD;&#xA;- [AreWeIDEYet](https://areweideyet.com/)  &#xD;&#xA;- [AreWeWebYet](https://www.arewewebyet.org/)  &#xD;&#xA;- [AreWeGameYet](http://arewegameyet.com/)  &#xD;&#xA;- [AreWeLearningYet](https://www.arewelearningyet.com/)&#xD;&#xA;- [AreWeAsyncYet](https://areweasyncyet.rs/)&#xD;&#xA;&#xD;&#xA;## Producing a [Minimal, Reproducible Example](/help/minimal-reproducible-example) (MRE) for Rust code&#xD;&#xA;&#xD;&#xA;Questions on Stack Overflow that seek debugging help (&quot;why isn't this code working?&quot;) must include the shortest code necessary to reproduce it in the question itself. Without it, the question is off-topic and is likely to be closed. Here are some common points to follow to reduce your code to create a good MRE:&#xD;&#xA;&#xD;&#xA;- Try to run your code in a different environment.&#xD;&#xA;  - On the [Rust Playground][play]&#xD;&#xA;  - In a separate Cargo project&#xD;&#xA;&#xD;&#xA;- If your code fails to compile, include a copy of the error message, preferably complete and unmodified from the compiler's output. &#xD;&#xA;&#xD;&#xA;- Remove unused&#xD;&#xA;   - crates&#xD;&#xA;   - modules&#xD;&#xA;   - types&#xD;&#xA;   - enum variants / members&#xD;&#xA;   - struct members&#xD;&#xA;   - function arguments / return values&#xD;&#xA;&#xD;&#xA;- Combine multiple modules into a single file by rewriting `mod foo;` as `mod foo { /* contents of foo.rs */ }`&#xD;&#xA;&#xD;&#xA;- Replace complete or partial statements or entire function bodies with the macro `unimplemented!()`.&#xD;&#xA;&#xD;&#xA;- Replace booleans with hard-coded `true` or `false` values&#xD;&#xA;&#xD;&#xA;- Remove containing loops and conditional flow statements.&#xD;&#xA;&#xD;&#xA;Remember that some steps might &quot;unlock&quot; other steps; try to apply each step  in turn until no steps can be followed! Ensure that your error continues to occur after each change to avoid going down the wrong path.&#xD;&#xA;&#xD;&#xA;There's also some information that you should provide about your code:&#xD;&#xA;&#xD;&#xA;- It will be assumed that you are using the current stable version of Rust. If you are not using this version of Rust, state your version. This can be found by running `rustc --version`.&#xD;&#xA;&#xD;&#xA;- If you are using crates, state the versions of every crate that you are using. This can be found in your Cargo.lock file.&#xD;&#xA;&#xD;&#xA;## Books&#xD;&#xA;&#xD;&#xA;* [Programming Rust Fast, Safe Systems Development](http://shop.oreilly.com/product/0636920040385.do)&#xD;&#xA;&#xD;&#xA;* [Rust Essentials](http://shop.oreilly.com/product/9781785285769.do)&#xD;&#xA;&#xD;&#xA;* [Rust Cookbook](https://www.packtpub.com/application-development/rust-cookbook)&#xD;&#xA;&#xD;&#xA;* [Beginning Rust - From Novice to Professional](https://www.apress.com/us/book/9781484234679)&#xD;&#xA;&#xD;&#xA;## Code Editors &amp; IDEs:&#xD;&#xA;&#xD;&#xA; * [Atom](https://atom.io) ([Rust language support](https://atom.io/packages/language-rust))&#xD;&#xA; * [Eclipse](https://eclipse.org/) ([plugin](https://github.com/RustDT/RustDT))&#xD;&#xA; * [Emacs](https://www.gnu.org/software/emacs/) ([plugin](https://github.com/rust-lang/rust-mode))&#xD;&#xA; * [GNU Emacs](https://www.gnu.org/software/emacs/) ([Rust-mode](https://github.com/rust-lang/rust-mode))&#xD;&#xA; * [Geany IDE](https://www.geany.org/) ([Rust Language support out-of-the-box](https://www.geany.org/Main/AllFiletypes))&#xD;&#xA; * [Gnome Builder](https://wiki.gnome.org/Apps/Builder) ([Rust Language support out-of-the-box](https://git.gnome.org/browse/gnome-builder/tree/plugins/rust-langserv/rust_langserv_plugin.py))&#xD;&#xA; * [InteliJ IDEA](https://www.jetbrains.com/idea/) ([plugin](https://github.com/intellij-rust/intellij-rust))&#xD;&#xA; * [LightTable](http://lighttable.com/) ([plugin](https://github.com/icorderi/light-rust))&#xD;&#xA; * [Sublime Text](https://www.sublimetext.com/) ([Sublime Text package for Rust](https://packagecontrol.io/packages/Rust))&#xD;&#xA; * [Vim](https://www.vim.org/) ([Rust.vim](https://github.com/rust-lang/rust.vim))&#xD;&#xA; * [Visual Studio Code](https://code.visualstudio.com/) ([Rust extension](https://github.com/saviorisdead/RustyCode), [Rust extension with Language Server Support](https://github.com/editor-rs/vscode-rust))&#xD;&#xA; * [Visual Studio](https://visualstudio.microsoft.com/) ([Visual Studio extension for Rust](https://github.com/PistonDevelopers/VisualRust))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For a comparison of editors' features, see:  [Text editor features overview](https://areweideyet.com/)&#xD;&#xA;(Syntax highlighting, Snippets, Code Completion, Linting, Go-to Definition, Syntax Checking).&#xD;&#xA;&#xD;&#xA;[play]: https://play.rust-lang.org/" ContentLicense="CC BY-SA 4.0" />
  <row Id="2342" PostHistoryTypeId="24" PostId="65" RevisionGUID="c78db0c0-e800-48ac-9024-7be723dc9b20" CreationDate="2022-03-08T10:56:36.193" Comment="Proposed by 151 approved by 452, 94 edit id of 48" ContentLicense="CC BY-SA 4.0" />
  <row Id="2345" PostHistoryTypeId="2" PostId="650" RevisionGUID="0c89f7c4-e66a-48c8-bdea-58c09cdfc5fe" CreationDate="2022-03-08T11:28:17.273" UserId="575" Text="`validator_payout` is the amount that will be paid to all the validators (and their nominators) after an era (not the payment for one validator for the current block).&#xD;&#xA;&#xD;&#xA;The `EraPaid` event is deposited after computing the payout for a particular era with the `end_era` function: https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs (this payout is for all validators/their nominators)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;the `remainder` is got by substracting the `validator_payout` from `max_payout` in the `era_payout` function:&#xD;&#xA;&#xD;&#xA;       fn era_payout(&#xD;&#xA;    		total_staked: Balance,&#xD;&#xA;    		total_issuance: Balance,&#xD;&#xA;    		era_duration_millis: u64,&#xD;&#xA;    	) -&gt; (Balance, Balance) {&#xD;&#xA;    		let (validator_payout, max_payout) = &#xD;&#xA;            inflation::compute_total_payout(&#xD;&#xA;    			&amp;T::get(),&#xD;&#xA;    			total_staked,&#xD;&#xA;    			total_issuance,&#xD;&#xA;    			// Duration of era; more than u64::MAX is rewarded as u64::MAX.&#xD;&#xA;    			era_duration_millis,&#xD;&#xA;    		);&#xD;&#xA;    		let rest = max_payout.saturating_sub(validator_payout.clone());&#xD;&#xA;    		(validator_payout, rest)&#xD;&#xA;    	}" ContentLicense="CC BY-SA 4.0" />
  <row Id="2347" PostHistoryTypeId="5" PostId="541" RevisionGUID="4ac9ba95-3777-4963-88bc-3c0cc23c1518" CreationDate="2022-03-08T11:56:17.830" UserId="116" Comment="Spelling dont -&gt; don't" Text="&gt; I would like to understand how treasury accounts are created and used under the hood&#xD;&#xA;&#xD;&#xA;You can see [here](https://substrate.stackexchange.com/questions/477/how-can-we-get-a-pallets-sub-account-address-using-polkadotjs-api/479#479) for a similar explanation on sub-accounts.&#xD;&#xA;&#xD;&#xA;To walk through the specific steps here:&#xD;&#xA;&#xD;&#xA; 1. Here is the function defined in the Treasury pallet for generating the account id:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;	/// The account ID of the treasury pot.&#xD;&#xA;	///&#xD;&#xA;	/// This actually does computation. If you need to keep using it, then make sure you cache the&#xD;&#xA;	/// value and only call this once.&#xD;&#xA;	pub fn account_id() -&gt; T::AccountId {&#xD;&#xA;		T::PalletId::get().into_account()&#xD;&#xA;	}&#xD;&#xA;    ```&#xD;&#xA; 2. `T::PalletId::get()` is defined as: &#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    pub const TreasuryPalletId: PalletId = PalletId(*b&quot;py/trsry&quot;);&#xD;&#xA;    ```&#xD;&#xA; 3. `into_account()` is defined as:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    /// Convert into an account ID. This is infallible.&#xD;&#xA;	fn into_account(&amp;self) -&gt; AccountId {&#xD;&#xA;		self.into_sub_account(&amp;())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn into_sub_account&lt;S: Encode&gt;(&amp;self, sub: S) -&gt; T {&#xD;&#xA;		(Id::TYPE_ID, self, sub)&#xD;&#xA;			.using_encoded(|b| T::decode(&amp;mut TrailingZeroInput(b)))&#xD;&#xA;			.expect(&quot;`AccountId` type is never greater than 32 bytes; qed&quot;)&#xD;&#xA;	}&#xD;&#xA;    ```&#xD;&#xA; 4. `Id::TYPE_ID` is defined as:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    impl TypeId for PalletId {&#xD;&#xA;	    const TYPE_ID: [u8; 4] = *b&quot;modl&quot;;&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA; &#xD;&#xA;So to generate the account, we just need to take the raw bytes of &quot;modl&quot; + &quot;py/trsry&quot; and stick that into an account:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;as_bytes(&quot;modl&quot;) = 0x6d6f646c&#xD;&#xA;as_bytes(&quot;py/trsry&quot;) = 0x70792f7472737279&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So the Account Id is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x6d6f646c70792f74727372790000000000000000000000000000000000000000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which maps to Substrate Address:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[Check it out on Subscan][1]:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This public key has no known private key since it is just generated from raw bytes as shown above. When accessing funds from this account, we don't use any cryptography. The low level runtime has direct access to modify this account in any way without authorization.&#xD;&#xA;&#xD;&#xA;If you want to look for the private key, you can try, and if you succeed, you will get access to all the treasury funds across all Substrate chains. &#xD;&#xA;&#xD;&#xA;A pretty nice bounty, so do let me know when you find it :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/account/5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z" ContentLicense="CC BY-SA 4.0" />
  <row Id="2348" PostHistoryTypeId="24" PostId="541" RevisionGUID="4ac9ba95-3777-4963-88bc-3c0cc23c1518" CreationDate="2022-03-08T11:56:17.830" Comment="Proposed by 116 approved by 104, 94 edit id of 74" ContentLicense="CC BY-SA 4.0" />
  <row Id="2349" PostHistoryTypeId="2" PostId="651" RevisionGUID="438de59b-f830-4072-a3c9-73f52da0b4e1" CreationDate="2022-03-08T13:52:16.270" UserId="552" Text="Hey so I have been running a custom substrate chain with 3 validators. &#xD;&#xA;But recently the chain got crashed with a log &#xD;&#xA;``` election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)```&#xD;&#xA;&#xD;&#xA;But the chain continued to run after getting this error in chain and in the explorer &#xD;&#xA;```stakingElectionfailed``` &#xD;&#xA;&#xD;&#xA;But after some time the peers connected to validators went from 2 to 0. And when I checked the logs, the validators started forking each other and lost the connectivity. &#xD;&#xA;&#xD;&#xA;Trying to debug this. Anyone faced any similar issue or any hints that I can use? I'm stuck nowhere now :( " ContentLicense="CC BY-SA 4.0" />
  <row Id="2351" PostHistoryTypeId="1" PostId="651" RevisionGUID="438de59b-f830-4072-a3c9-73f52da0b4e1" CreationDate="2022-03-08T13:52:16.270" UserId="552" Text="Substrate validators losing connection to each other" ContentLicense="CC BY-SA 4.0" />
  <row Id="2352" PostHistoryTypeId="3" PostId="651" RevisionGUID="438de59b-f830-4072-a3c9-73f52da0b4e1" CreationDate="2022-03-08T13:52:16.270" UserId="552" Text="|substrate-node|runtime|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2353" PostHistoryTypeId="5" PostId="632" RevisionGUID="1d92ceaf-b634-43a0-b7f4-d07eddf7625a" CreationDate="2022-03-08T14:46:30.270" UserId="116" Comment="Spellcheck and language" Text="Good day, I would love to know how to make Sudo calls through subxt library , I can't seem to find a meaningful solution. substrate-api-client has an example on how to make on, but going through the documentation of subxt library, it doesn't show how to do it." ContentLicense="CC BY-SA 4.0" />
  <row Id="2354" PostHistoryTypeId="24" PostId="632" RevisionGUID="1d92ceaf-b634-43a0-b7f4-d07eddf7625a" CreationDate="2022-03-08T14:46:30.270" Comment="Proposed by 116 approved by 94, 29 edit id of 75" ContentLicense="CC BY-SA 4.0" />
  <row Id="2359" PostHistoryTypeId="2" PostId="653" RevisionGUID="43d25738-cfdd-45f7-b981-3c7d3c53258e" CreationDate="2022-03-08T15:20:46.987" UserId="29" Text="There are a couple ways you could work with that. If you have the extrinsic hash and the block number than you could something like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const exampleBlockNumber = 7200920&#xD;&#xA;const blockHash = await api.rpc.chain.getBlockHash(exampleBlockNumber);&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;const extrinsicHash = &quot;0xeb8f2a5af4a82a237e7e270ed6bd51ce82bb9253802259fd0fdb24212fe65260&quot;&#xD;&#xA;signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;    if (extrinsicHash === ex.hash.toHex()) {&#xD;&#xA;        console.log(index, ex.toHuman());&#xD;&#xA;        const { method: { args, method, section } } = ex;&#xD;&#xA;        console.log(`${section}.${method}(${args.map((a) =&gt; a.toString()).join(', ')})`);&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For this specific example you would get this output:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;1 {&#xD;&#xA;  isSigned: true,&#xD;&#xA;  method: {&#xD;&#xA;    args: { dest: [Object], value: '39.5536 DOT' },&#xD;&#xA;    method: 'transfer',&#xD;&#xA;    section: 'balances'&#xD;&#xA;  },&#xD;&#xA;  era: { MortalEra: { period: '64', phase: '18' } },&#xD;&#xA;  nonce: '0',&#xD;&#xA;  signature: '0x56344710ae648a1da40e2c1a1159c73fdbd7d522af01f1fd330fb6bedc4db615ca983d69fcf7cdf7376ab59fd4c492a711cc64bba48d6ae23762d95176071a0c',&#xD;&#xA;  signer: { Id: '13a9ccJQrJZdLsdisnL31uuApQmNfGd3d3fmGdqLPiBiW8jP' },&#xD;&#xA;  tip: '0'&#xD;&#xA;}&#xD;&#xA;balances.transfer(13Hwdzi6jkXtBWTSU5de5gC93hDog23pdqd59SPZ7s9zXVNL, 395536044985)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2361" PostHistoryTypeId="2" PostId="654" RevisionGUID="9b22c76f-7db0-4913-ba00-ec9f5ca8539b" CreationDate="2022-03-08T16:22:51.120" UserId="68" Text="I have written tests.rs and mock.rs &#xD;&#xA;&#xD;&#xA;everything is working except a function which has checks for root&#xD;&#xA;&#xD;&#xA;		pub fn create_something(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			org: T::Hash&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// TODO: ensure origin == controller&#xD;&#xA;			ensure_root(origin)?;&#xD;&#xA;&#xD;&#xA;My test something like:&#xD;&#xA;&#xD;&#xA;    assert_ok!(MyVeryFirstModuleModule::create_something(Origin::signed(ALICE), H256::random()));&#xD;&#xA;&#xD;&#xA;If I don't comment ensure_root I am getting Bad_Origin panic.&#xD;&#xA;How can I mock root?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2363" PostHistoryTypeId="1" PostId="654" RevisionGUID="9b22c76f-7db0-4913-ba00-ec9f5ca8539b" CreationDate="2022-03-08T16:22:51.120" UserId="68" Text="testing pallet with ensure_root" ContentLicense="CC BY-SA 4.0" />
  <row Id="2364" PostHistoryTypeId="3" PostId="654" RevisionGUID="9b22c76f-7db0-4913-ba00-ec9f5ca8539b" CreationDate="2022-03-08T16:22:51.120" UserId="68" Text="|frame|testing|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2365" PostHistoryTypeId="5" PostId="630" RevisionGUID="4286cd98-7261-452d-b002-130cf928bf9f" CreationDate="2022-03-08T17:08:30.840" UserId="139" Comment="Added log messages from -lruntime::election-provider=trace,runtime::staking=trace" Text="So my chain is running at the moment with 3 invulnerable validators, and I was trying to add another validator to the mix. I generated 2 accounts, transferred some stash to one of them, made a controller account, bonded some balance with the pair, set session keys and started the validation process, and I could see my stash under the waiting tab for staking. However on next session change, my validator was not included in the validator set, even though I had more stash than all invulnerables combined. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-07 14:16:57  New epoch 3 launching at block 0x951c…403f (block slot 548880939 &gt;= start slot 548880939).    &#xD;&#xA;2022-03-07 14:16:57  Next epoch starts at slot 548881139    &#xD;&#xA;2022-03-07 14:16:57 [#594]   Entering emergency mode: ElectionError::Fallback(&quot;NoFallback.&quot;)    &#xD;&#xA;2022-03-07 14:16:57 [594]  election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;I repeatedly get these messages on each session/era change. How can I fix this? &#xD;&#xA;&#xD;&#xA;EDIT : Steps I've tried before :&#xD;&#xA;1. Made sure &#xD;&#xA;```rust&#xD;&#xA;type Fallback = frame_election_provider_support::onchain::OnChainSequentialPhragmen&lt;Self&gt;;&#xD;&#xA;```&#xD;&#xA;2. Started 3 nodes with invulnerable accounts, `--offchain-worker always`&#xD;&#xA;3. The only thing missing from my runtime code is an implementation of `frame_system::offchain::CreateSignedTransaction&lt;LocalCall&gt;` but I don't know how relevant it is. &#xD;&#xA;&#xD;&#xA;After running with `-lruntime::election-provider=trace,runtime::staking=trace`, most particularly @ block #200 we can see this line : &#xD;&#xA;```&#xD;&#xA;2022-03-08 22:34:51.012 DEBUG tokio-runtime-worker runtime::election-provider: [#200]   closed signed phase, found solution? false, discarded 0    &#xD;&#xA;```&#xD;&#xA;Here's the full logs running upto the NoFallback emergency phase -&gt; &#xD;&#xA;```&#xD;&#xA;2022-03-08 22:32:18.033  INFO tokio-runtime-worker substrate: ✨ Imported #149 (0xa76d…cede)    &#xD;&#xA;2022-03-08 22:32:18.033 TRACE      offchain-worker runtime::election-provider: [#149]   lock for offchain worker acquired. Phase = Signed    &#xD;&#xA;2022-03-08 22:32:21.006 TRACE tokio-runtime-worker runtime::election-provider: [#150]   current phase Signed, next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:32:21.007  INFO tokio-runtime-worker substrate: ✨ Imported #150 (0xbe66…165e)    &#xD;&#xA;2022-03-08 22:32:21.007 TRACE      offchain-worker runtime::election-provider: [#150]   lock for offchain worker acquired. Phase = Signed    &#xD;&#xA;2022-03-08 22:32:22.050  INFO tokio-runtime-worker substrate:  Idle (3 peers), best: #150 (0xbe66…165e), finalized #147 (0xdd44…31f2), ⬇ 3.6kiB/s ⬆ 3.1kiB/s    &#xD;&#xA;2022-03-08 22:32:24.030 TRACE tokio-runtime-worker runtime::election-provider: [#151]   current phase Signed, next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:32:24.030 DEBUG tokio-runtime-worker runtime::election-provider: [#151]   closed signed phase, found solution? false, discarded 0    &#xD;&#xA;2022-03-08 22:32:24.031  INFO tokio-runtime-worker runtime::election-provider: [#151]   Starting unsigned phase round 1 enabled true.    &#xD;&#xA;2022-03-08 22:32:24.039  INFO tokio-runtime-worker substrate: ✨ Imported #151 (0xb006…6828)    &#xD;&#xA;2022-03-08 22:32:24.044 TRACE      offchain-worker runtime::election-provider: [#151]   lock for offchain worker acquired. Phase = Unsigned((true, 151))    &#xD;&#xA;2022-03-08 22:32:24.044 DEBUG      offchain-worker runtime::election-provider: [#151]   miner attempting to compute an unsigned solution.    &#xD;&#xA;2022-03-08 22:32:24.044 DEBUG      offchain-worker runtime::election-provider: [#151]   from 5 assignments, truncating to 5 for weight, removing 0    &#xD;&#xA;2022-03-08 22:32:24.044 DEBUG      offchain-worker runtime::election-provider: [#151]   from 5 assignments, truncating to 5 for length, removing 0    &#xD;&#xA;2022-03-08 22:32:24.044 DEBUG      offchain-worker runtime::election-provider: [#151]   pre-dispatch checks failed for mined solution: Module { index: 19, error: 1, message: Some(&quot;PreDispatchWrongWinnerCount&quot;) }    &#xD;&#xA;2022-03-08 22:32:24.044 DEBUG      offchain-worker runtime::election-provider: [#151]   initial offchain thread output: Err(MinerError::PreDispatchChecksFailed(Module { index: 19, error: 1, message: Some(&quot;PreDispatchWrongWinnerCount&quot;) }))    &#xD;&#xA;2022-03-08 22:32:27.021 TRACE tokio-runtime-worker runtime::election-provider: [#152]   current phase Unsigned((true, 151)), next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:32:27.022  INFO tokio-runtime-worker substrate: ✨ Imported #152 (0x011d…36a6)    &#xD;&#xA;2022-03-08 22:32:27.022 TRACE      offchain-worker runtime::election-provider: [#152]   lock for offchain worker acquired. Phase = Unsigned((true, 151))    &#xD;&#xA;2022-03-08 22:32:27.022 DEBUG      offchain-worker runtime::election-provider: [#152]   resubmit offchain thread output: Err(MinerError::Lock(&quot;recently executed.&quot;))    &#xD;&#xA;2022-03-08 22:32:27.050  INFO tokio-runtime-worker substrate:  Idle (3 peers), best: #152 (0x011d…36a6), finalized #149 (0xa76d…cede), ⬇ 3.4kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2022-03-08 22:32:30.010 TRACE tokio-runtime-worker runtime::election-provider: [#153]   current phase Unsigned((true, 151)), next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:32:30.011  INFO tokio-runtime-worker substrate: ✨ Imported #153 (0x5096…6bcf)    &#xD;&#xA;2022-03-08 22:32:30.012 TRACE      offchain-worker runtime::election-provider: [#153]   lock for offchain worker acquired. Phase = Unsigned((true, 151))    &#xD;&#xA;2022-03-08 22:32:30.012 DEBUG      offchain-worker runtime::election-provider: [#153]   resubmit offchain thread output: Err(MinerError::Lock(&quot;recently executed.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and then a few moments later :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-08 22:34:12.011 TRACE tokio-runtime-worker runtime::election-provider: [#187]   current phase Unsigned((true, 151)), next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:34:12.012  INFO tokio-runtime-worker substrate: ✨ Imported #187 (0x59cd…e4be)    &#xD;&#xA;2022-03-08 22:34:12.012 TRACE      offchain-worker runtime::election-provider: [#187]   lock for offchain worker acquired. Phase = Unsigned((true, 151))    &#xD;&#xA;2022-03-08 22:34:12.012 DEBUG      offchain-worker runtime::election-provider: [#187]   miner attempting to restore or compute an unsigned solution.    &#xD;&#xA;2022-03-08 22:34:12.012 DEBUG      offchain-worker runtime::election-provider: [#187]   restoring solution failed due to MinerError::NoStoredSolution    &#xD;&#xA;2022-03-08 22:34:12.012 TRACE      offchain-worker runtime::election-provider: [#187]   mining a new solution.    &#xD;&#xA;2022-03-08 22:34:12.012 DEBUG      offchain-worker runtime::election-provider: [#187]   from 5 assignments, truncating to 5 for weight, removing 0    &#xD;&#xA;2022-03-08 22:34:12.012 DEBUG      offchain-worker runtime::election-provider: [#187]   from 5 assignments, truncating to 5 for length, removing 0    &#xD;&#xA;2022-03-08 22:34:12.012 DEBUG      offchain-worker runtime::election-provider: [#187]   pre-dispatch checks failed for mined solution: Module { index: 19, error: 1, message: Some(&quot;PreDispatchWrongWinnerCount&quot;) }    &#xD;&#xA;2022-03-08 22:34:12.012 DEBUG      offchain-worker runtime::election-provider: [#187]   resubmit offchain thread output: Err(MinerError::PreDispatchChecksFailed(Module { index: 19, error: 1, message: Some(&quot;PreDispatchWrongWinnerCount&quot;) }))    &#xD;&#xA;2022-03-08 22:34:12.057  INFO tokio-runtime-worker substrate:  Idle (3 peers), best: #187 (0x59cd…e4be), finalized #184 (0x75df…d3af), ⬇ 3.7kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2022-03-08 22:34:15.006 TRACE tokio-runtime-worker runtime::election-provider: [#188]   current phase Unsigned((true, 151)), next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:34:15.008  INFO tokio-runtime-worker substrate: ✨ Imported #188 (0xafb7…bb43)    &#xD;&#xA;2022-03-08 22:34:15.008 TRACE      offchain-worker runtime::election-provider: [#188]   lock for offchain worker acquired. Phase = Unsigned((true, 151))    &#xD;&#xA;2022-03-08 22:34:15.008 DEBUG      offchain-worker runtime::election-provider: [#188]   resubmit offchain thread output: Err(MinerError::Lock(&quot;recently executed.&quot;))    &#xD;&#xA;2022-03-08 22:34:15.009 TRACE tokio-runtime-worker runtime::election-provider: [#188]   current phase Unsigned((true, 151)), next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:34:15.010  INFO tokio-runtime-worker substrate: ✨ Imported #188 (0xb7ff…5594)    &#xD;&#xA;2022-03-08 22:34:17.057  INFO tokio-runtime-worker substrate:  Idle (3 peers), best: #188 (0xafb7…bb43), finalized #186 (0x02f0…384f), ⬇ 3.5kiB/s ⬆ 3.0kiB/s    &#xD;&#xA;2022-03-08 22:34:18.027 TRACE tokio-runtime-worker runtime::election-provider: [#189]   current phase Unsigned((true, 151)), next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:34:18.032  INFO tokio-runtime-worker substrate: ✨ Imported #189 (0x6f4b…5fc5)    &#xD;&#xA;2022-03-08 22:34:18.032 TRACE      offchain-worker runtime::election-provider: [#189]   lock for offchain worker acquired. Phase = Unsigned((true, 151))    &#xD;&#xA;2022-03-08 22:34:18.032 DEBUG      offchain-worker runtime::election-provider: [#189]   resubmit offchain thread output: Err(MinerError::Lock(&quot;recently executed.&quot;))    &#xD;&#xA;2022-03-08 22:34:21.010 TRACE tokio-runtime-worker runtime::election-provider: [#190]   current phase Unsigned((true, 151)), next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:34:21.011  INFO tokio-runtime-worker substrate: ✨ Imported #190 (0x15e6…0e33)    &#xD;&#xA;2022-03-08 22:34:21.011 TRACE      offchain-worker runtime::election-provider: [#190]   lock for offchain worker acquired. Phase = Unsigned((true, 151))    &#xD;&#xA;2022-03-08 22:34:21.012 DEBUG      offchain-worker runtime::election-provider: [#190]   resubmit offchain thread output: Err(MinerError::Lock(&quot;recently executed.&quot;))    &#xD;&#xA;2022-03-08 22:34:22.058  INFO tokio-runtime-worker substrate:  Idle (3 peers), best: #190 (0x15e6…0e33), finalized #187 (0x59cd…e4be), ⬇ 3.4kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2022-03-08 22:34:24.011 TRACE tokio-runtime-worker runtime::election-provider: [#191]   current phase Unsigned((true, 151)), next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:34:24.013  INFO tokio-runtime-worker substrate: ✨ Imported #191 (0x2901…8d21)    &#xD;&#xA;2022-03-08 22:34:24.013 TRACE      offchain-worker runtime::election-provider: [#191]   lock for offchain worker acquired. Phase = Unsigned((true, 151))    &#xD;&#xA;2022-03-08 22:34:24.013 DEBUG      offchain-worker runtime::election-provider: [#191]   resubmit offchain thread output: Err(MinerError::Lock(&quot;recently executed.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And finally :&#xD;&#xA;```&#xD;&#xA;2022-03-08 22:34:48.028 TRACE tokio-runtime-worker runtime::election-provider: [#199]   current phase Unsigned((true, 151)), next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:34:48.033  INFO tokio-runtime-worker substrate: ✨ Imported #199 (0x74af…b9a4)    &#xD;&#xA;2022-03-08 22:34:48.033 TRACE      offchain-worker runtime::election-provider: [#199]   lock for offchain worker acquired. Phase = Unsigned((true, 151))    &#xD;&#xA;2022-03-08 22:34:48.034 DEBUG      offchain-worker runtime::election-provider: [#199]   miner attempting to restore or compute an unsigned solution.    &#xD;&#xA;2022-03-08 22:34:48.034 DEBUG      offchain-worker runtime::election-provider: [#199]   restoring solution failed due to MinerError::NoStoredSolution    &#xD;&#xA;2022-03-08 22:34:48.034 TRACE      offchain-worker runtime::election-provider: [#199]   mining a new solution.    &#xD;&#xA;2022-03-08 22:34:48.034 DEBUG      offchain-worker runtime::election-provider: [#199]   from 5 assignments, truncating to 5 for weight, removing 0    &#xD;&#xA;2022-03-08 22:34:48.034 DEBUG      offchain-worker runtime::election-provider: [#199]   from 5 assignments, truncating to 5 for length, removing 0    &#xD;&#xA;2022-03-08 22:34:48.034 DEBUG      offchain-worker runtime::election-provider: [#199]   pre-dispatch checks failed for mined solution: Module { index: 19, error: 1, message: Some(&quot;PreDispatchWrongWinnerCount&quot;) }    &#xD;&#xA;2022-03-08 22:34:48.034 DEBUG      offchain-worker runtime::election-provider: [#199]   resubmit offchain thread output: Err(MinerError::PreDispatchChecksFailed(Module { index: 19, error: 1, message: Some(&quot;PreDispatchWrongWinnerCount&quot;) }))    &#xD;&#xA;2022-03-08 22:34:51.012  INFO tokio-runtime-worker babe:  New epoch 1 launching at block 0xa828…43a0 (block slot 548919697 &gt;= start slot 548919697).    &#xD;&#xA;2022-03-08 22:34:51.012  INFO tokio-runtime-worker babe:  Next epoch starts at slot 548919897    &#xD;&#xA;2022-03-08 22:34:51.012 TRACE tokio-runtime-worker runtime::election-provider: [#200]   current phase Unsigned((true, 151)), next election 201, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:34:51.012 TRACE tokio-runtime-worker runtime::staking: [200]  ending session 0    &#xD;&#xA;2022-03-08 22:34:51.012 TRACE tokio-runtime-worker runtime::staking: [200]  starting session 1    &#xD;&#xA;2022-03-08 22:34:51.012 TRACE tokio-runtime-worker runtime::staking: [200]  planning new session 2    &#xD;&#xA;2022-03-08 22:34:51.012 DEBUG tokio-runtime-worker runtime::election-provider: [#200]   closed signed phase, found solution? false, discarded 0    &#xD;&#xA;2022-03-08 22:34:51.012 ERROR tokio-runtime-worker runtime::election-provider: [#200]   Entering emergency mode: ElectionError::Fallback(&quot;NoFallback.&quot;)    &#xD;&#xA;2022-03-08 22:34:51.012  WARN tokio-runtime-worker runtime::staking: [200]  election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)    &#xD;&#xA;2022-03-08 22:34:51.014  INFO tokio-runtime-worker substrate: ✨ Imported #200 (0xa828…43a0)    &#xD;&#xA;2022-03-08 22:34:51.014 TRACE      offchain-worker runtime::election-provider: [#200]   lock for offchain worker acquired. Phase = Emergency    &#xD;&#xA;2022-03-08 22:34:51.014 DEBUG      offchain-worker runtime::election-provider: [#200]   clearing offchain call cache storage.    &#xD;&#xA;2022-03-08 22:34:52.059  INFO tokio-runtime-worker substrate:  Idle (3 peers), best: #200 (0xa828…43a0), finalized #198 (0xf785…a574), ⬇ 3.5kiB/s ⬆ 3.2kiB/s    &#xD;&#xA;2022-03-08 22:34:54.011 TRACE tokio-runtime-worker runtime::election-provider: [#201]   current phase Emergency, next election 401, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;2022-03-08 22:34:54.012  INFO tokio-runtime-worker substrate: ✨ Imported #201 (0xd142…5747)    &#xD;&#xA;2022-03-08 22:34:54.012 TRACE      offchain-worker runtime::election-provider: [#201]   lock for offchain worker acquired. Phase = Emergency    &#xD;&#xA;2022-03-08 22:34:57.012 TRACE tokio-runtime-worker runtime::election-provider: [#202]   current phase Emergency, next election 401, metadata: Some(SolutionOrSnapshotSize { voters: 5, targets: 4 })    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rzD5R.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2366" PostHistoryTypeId="2" PostId="655" RevisionGUID="73e015cd-cd11-4755-8441-fe481ca10a11" CreationDate="2022-03-08T17:11:56.740" UserId="29" Text="If this is for tests, have you tried using:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;Origin::root()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Example here:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert_ok!(Balances::set_balance(Origin::root(), 1, 1_000, 0));&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/8b2f5379653d9d741f666634ed7f751dd6870381/frame/balances/src/tests.rs#L820" ContentLicense="CC BY-SA 4.0" />
  <row Id="2368" PostHistoryTypeId="2" PostId="656" RevisionGUID="832e9b38-2475-4b23-871f-abc1655dd84a" CreationDate="2022-03-08T19:29:57.073" UserId="332" Text="I am trying to implement the prebuilt `pallet-staking` using `4.0.0-dev` and tag `devhub/latest`. I am getting a compilation error on `npos-elections`. Should I be able to add the staking pallet into the runtime and it would use the correct dependency?  Any recommendation?&#xD;&#xA;```&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;   --&gt; /home/max/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/npos-elections/src/lib.rs:367:45&#xD;&#xA;    |&#xD;&#xA;367 |         Self { total: Default::default(), voters: vec![] }&#xD;&#xA;    |                                                   ^^^&#xD;&#xA;    |&#xD;&#xA;    = note: consider importing one of these items:&#xD;&#xA;            codec::alloc::vec&#xD;&#xA;            crate::sp_std::vec&#xD;&#xA;            scale_info::prelude::vec&#xD;&#xA;            sp_std::vec&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the implementation of the pallet in the runtime:&#xD;&#xA;```rust&#xD;&#xA;impl pallet_staking::Config for Runtime {&#xD;&#xA;  type MaxNominations = ConstU32&lt;16&gt;;&#xD;&#xA;  type Currency = Balances;&#xD;&#xA;  type UnixTime = pallet_timestamp::Pallet&lt;Self&gt;;&#xD;&#xA;  type CurrencyToVote = frame_support::traits::SaturatingCurrencyToVote;&#xD;&#xA;  type RewardRemainder = ();&#xD;&#xA;  type Event = Event;&#xD;&#xA;  type Slash = ();&#xD;&#xA;  type Reward = ();&#xD;&#xA;  type SessionsPerEra = ();&#xD;&#xA;  type SlashDeferDuration = ();&#xD;&#xA;  type SlashCancelOrigin = frame_system::EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;  type BondingDuration = ();&#xD;&#xA;  type SessionInterface = Self;&#xD;&#xA;  type EraPayout = pallet_staking::ConvertCurve&lt;RewardCurve&gt;;&#xD;&#xA;  type NextNewSession = Session;&#xD;&#xA;  type MaxNominatorRewardedPerValidator = ConstU32&lt;64&gt;;&#xD;&#xA;  type OffendingValidatorsThreshold = ();&#xD;&#xA;  type ElectionProvider = onchain::OnChainSequentialPhragmen&lt;Self&gt;;&#xD;&#xA;  type GenesisElectionProvider = Self::ElectionProvider;&#xD;&#xA;  type MaxUnlockingChunks = ConstU32&lt;32&gt;;&#xD;&#xA;  type SortedListProvider = pallet_staking::UseNominatorsMap&lt;Self&gt;;&#xD;&#xA;  type BenchmarkingConfig = pallet_staking::TestBenchmarkingConfig;&#xD;&#xA;  type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And here is my dependency in `runtime/Cargo.toml`&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;pallet-staking = {version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, tag = &quot;devhub/latest&quot;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2370" PostHistoryTypeId="1" PostId="656" RevisionGUID="832e9b38-2475-4b23-871f-abc1655dd84a" CreationDate="2022-03-08T19:29:57.073" UserId="332" Text="Cannot find macro `vec` in this scope when using pallet-staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="2371" PostHistoryTypeId="3" PostId="656" RevisionGUID="832e9b38-2475-4b23-871f-abc1655dd84a" CreationDate="2022-03-08T19:29:57.073" UserId="332" Text="|pallet|staking|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2372" PostHistoryTypeId="2" PostId="657" RevisionGUID="353bacb7-483c-4a97-9f9a-95cb3bd6d8bc" CreationDate="2022-03-08T21:01:21.293" UserId="556" Text="When using the PolkadotJS API to query an ink! erc20 smart contract balanceOf() function from inside of react it returns some strange values. For example if i try this from a node script balanceOf.output returns these values the way you'd expect (a balance of 99 tokens). However, inside of react when querying balanceOf on a users token balance the only values i can seem to find that correspond to balance values are ones inside of balanceOf.output.words;&#xD;&#xA;&#xD;&#xA;this is the output of querying the account of a user who has a token balance of 99&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lasqT.png&#xD;&#xA;&#xD;&#xA;as you can see inside of output the only values that appear to correspond to balance values are inside of word but are not what you would expect (would expect 99) &#xD;&#xA;&#xD;&#xA;any ideas how to interpret these values or convert them such that they display the true value of the users balance?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2374" PostHistoryTypeId="1" PostId="657" RevisionGUID="353bacb7-483c-4a97-9f9a-95cb3bd6d8bc" CreationDate="2022-03-08T21:01:21.293" UserId="556" Text="PolkadotJS API React" ContentLicense="CC BY-SA 4.0" />
  <row Id="2375" PostHistoryTypeId="3" PostId="657" RevisionGUID="353bacb7-483c-4a97-9f9a-95cb3bd6d8bc" CreationDate="2022-03-08T21:01:21.293" UserId="556" Text="|substrate-node|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2376" PostHistoryTypeId="6" PostId="657" RevisionGUID="544858f2-2f31-4c09-a95f-812e2e9b0272" CreationDate="2022-03-08T21:29:28.270" UserId="29" Comment="edited tags" Text="|substrate-node|smart-contract|ink|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2377" PostHistoryTypeId="2" PostId="658" RevisionGUID="57152a34-6d04-4f89-969d-134f4cdf0c15" CreationDate="2022-03-08T21:32:53.140" UserId="29" Text="Try:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;output.toHuman()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://polkadot.js.org/docs/api-contract/start/contract.read#reading-contract-values" ContentLicense="CC BY-SA 4.0" />
  <row Id="2379" PostHistoryTypeId="2" PostId="659" RevisionGUID="eec6be89-4c33-4ef5-9c2d-0e95f433f981" CreationDate="2022-03-08T22:10:24.500" UserId="73" Text="Looks like you didn't put `pallet-staking/std` into the list of enabled features of `std` of your runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="2381" PostHistoryTypeId="2" PostId="660" RevisionGUID="abe8a63e-6c2b-4972-ad60-c8cf38f3befb" CreationDate="2022-03-09T01:01:23.507" UserId="574" Text="I found an [example](https://github.com/polkadot-js/docs/blob/2a29d083e12ec456a2a226a79181fa4fe7c59538/docs/api/examples/promise/read-storage-at.md) in the polkadot-js-docs. In short: it is a multi-query to retrieve several objects. I guess in the kitty-tutorial first the ids of the single objects are retrieved and second for each id the body is queried in a multi-query.&#xD;&#xA;&#xD;&#xA;here the example from the docs:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;// Import the API&#xD;&#xA;const { ApiPromise } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;// Our address for Alice on the dev chain&#xD;&#xA;const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';&#xD;&#xA;const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  // Create our API with a default connection to the local node&#xD;&#xA;  const api = await ApiPromise.create();&#xD;&#xA;&#xD;&#xA;  // Retrieve the last block header, extracting the hash and parentHash&#xD;&#xA;  const { hash, parentHash } = await api.rpc.chain.getHeader();&#xD;&#xA;&#xD;&#xA;  console.log(`last header hash ${hash.toHex()}`);&#xD;&#xA;&#xD;&#xA;  // Retrieve the balance at the preceding block for Alice. For at queries&#xD;&#xA;  // the format is always `.at(&lt;blockhash&gt;, ...params)`&#xD;&#xA;  const balance = await api.query.system.account.at(parentHash, ALICE);&#xD;&#xA;&#xD;&#xA;  console.log(`Alice's balance at ${parentHash.toHex()} was ${balance.data.free}`);&#xD;&#xA;&#xD;&#xA;  // Now perform a multi query, returning multiple balances at once&#xD;&#xA;  const balances = await api.query.system.account.multi([ALICE, BOB]);&#xD;&#xA;&#xD;&#xA;  console.log(`Current balances for Alice and Bob are ${balances[0].data.free} and ${balances[1].data.free}`);&#xD;&#xA;}&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;And I assume the right documentation is this? --&gt; https://www.php.net/manual/en/mysqli.multi-query.php&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2383" PostHistoryTypeId="6" PostId="648" RevisionGUID="d076e6f9-2a67-49b2-8861-b47c43533226" CreationDate="2022-03-09T01:35:16.197" UserId="574" Comment="edited tags" Text="|pallet|javascript|query|substrate-front-end|rmrk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2384" PostHistoryTypeId="2" PostId="661" RevisionGUID="c85ca80c-c82a-47b6-b76c-41aff390b13d" CreationDate="2022-03-09T04:24:24.597" UserId="116" Text="*From the [documentation][1]:*&#xD;&#xA;&#xD;&#xA;*Grandpa:*&#xD;&#xA;&#xD;&#xA;**noteStalled** *(delay: u32, best_finalized_block_number: u32)&#xD;&#xA;interface: api.tx.grandpa.noteStalled&#xD;&#xA;summary: Note that the current authority set of the GRANDPA finality gadget has stalled. This will trigger a forced authority set change at the beginning of the next session, to be enacted delay blocks after that. The delay should be high enough to safely assume that the block signalling the forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters will start the new authority set using the given finalized block as base. Only callable by root.*&#xD;&#xA;&#xD;&#xA;But what does it mean should I give the last generated block as the best finalized block or the one already finalized or the one I would like to continue from? In this case 57281 or 57354?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I tried to use the block 57281 and 100 as delay.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/extrinsics/#notestalleddelay-u32-best_finalized_block_number-u32&#xD;&#xA;  [2]: https://i.stack.imgur.com/1CQLO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2386" PostHistoryTypeId="1" PostId="661" RevisionGUID="c85ca80c-c82a-47b6-b76c-41aff390b13d" CreationDate="2022-03-09T04:24:24.597" UserId="116" Text="How to use noteStalled to recover from a finality lagging chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2387" PostHistoryTypeId="3" PostId="661" RevisionGUID="c85ca80c-c82a-47b6-b76c-41aff390b13d" CreationDate="2022-03-09T04:24:24.597" UserId="116" Text="|grandpa|finality|stalled|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2388" PostHistoryTypeId="2" PostId="662" RevisionGUID="5076afb2-fa1a-4e42-9587-d525006eb472" CreationDate="2022-03-09T05:07:08.080" UserId="554" Text="I was following the tutorial: https://docs.substrate.io/tutorials/v3/kitties/pt1/&#xD;&#xA;and as said in the tutorial I installed kickstart using: cargo install kickstart&#xD;&#xA;&#xD;&#xA;And after that cloned a copy of the most recent node template which asks how you would like to call your node and pallet. So I named node and Pallet as kitties.&#xD;&#xA;&#xD;&#xA;But as I open the kitties directory in the code editor and rename it as kitties-tutorialnew it gives an error of Cargo as:&#xD;&#xA;Execution failed (exit code 101).&#xD;&#xA;C:/Users/msi/.cargo/bin/cargo.exe metadata --verbose --format-version 1 --all-features&#xD;&#xA;stdout : error: failed to load manifest for workspace member `C:\Users\msi\kitties-tutorialnew\node`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to parse manifest at `C:\Users\msi\kitties-tutorialnew\node\Cargo.toml`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  could not parse input as TOML&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  duplicate key: `substrate-build-script-utils` for key `build-dependencies` at line 70 column 1&#xD;&#xA;&#xD;&#xA;stderr : &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2390" PostHistoryTypeId="1" PostId="662" RevisionGUID="5076afb2-fa1a-4e42-9587-d525006eb472" CreationDate="2022-03-09T05:07:08.080" UserId="554" Text="Build the Substrate Kitties Chain Tutorial Cargo Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="2391" PostHistoryTypeId="3" PostId="662" RevisionGUID="5076afb2-fa1a-4e42-9587-d525006eb472" CreationDate="2022-03-09T05:07:08.080" UserId="554" Text="|rust|kitties|cargo|substrate-kitties-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2392" PostHistoryTypeId="5" PostId="661" RevisionGUID="6291c4d8-cc41-48bc-beb4-5e7809872889" CreationDate="2022-03-09T06:19:30.043" UserId="116" Comment="added 32 characters in body" Text="*From the [documentation][1]:*&#xD;&#xA;&#xD;&#xA;*Grandpa:*&#xD;&#xA;&#xD;&#xA;**noteStalled** *(delay: u32, best_finalized_block_number: u32)&#xD;&#xA;interface: api.tx.grandpa.noteStalled&#xD;&#xA;summary: Note that the current authority set of the GRANDPA finality gadget has stalled. This will trigger a forced authority set change at the beginning of the next session, to be enacted delay blocks after that. The delay should be high enough to safely assume that the block signalling the forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters will start the new authority set using the given finalized block as base. Only callable by root.*&#xD;&#xA;&#xD;&#xA;But what does it mean should I give the last generated block as the best finalized block or the one already finalized or the one I would like to continue from? In this case 57281 or 57354?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I tried to use the block 57281 and 100 as delay, nothing happened at block 57382&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/extrinsics/#notestalleddelay-u32-best_finalized_block_number-u32&#xD;&#xA;  [2]: https://i.stack.imgur.com/1CQLO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2393" PostHistoryTypeId="2" PostId="663" RevisionGUID="0eb50940-8a6a-4bd1-8428-b248c572db77" CreationDate="2022-03-09T06:36:28.653" UserId="580" Text="after reading and executing [Start a private network](https://docs.substrate.io/tutorials/v3/private-network/), I managed successfully same exercise with polkadot-local spec chain base. &#xD;&#xA;&#xD;&#xA;Now I would like to do same exercise but this time with rococo local spec but here I'm locked cause I don't know how to add new keys in the session part of the file. Indeed, I don't see any helpfull documentation which explain what is the `beefy` protocol and how to fill it...&#xD;&#xA;&#xD;&#xA;Indeed it seems rococo spec add this protocol when comparing sessions sections between polkadot-local and rococo-local spec : &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Polkadot local session section :*&#xD;&#xA;```&#xD;&#xA;      &quot;session&quot;: {&#xD;&#xA;        &quot;keys&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&#xD;&#xA;            &quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&#xD;&#xA;            {&#xD;&#xA;              &quot;grandpa&quot;: &quot;5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu&quot;,&#xD;&#xA;              &quot;babe&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;              &quot;im_online&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;              &quot;para_validator&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;              &quot;para_assignment&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;              &quot;authority_discovery&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;            &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;            {&#xD;&#xA;              &quot;grandpa&quot;: &quot;5GoNkf6WdbxCFnPdAnYYQyCjAKPJgLNxXwPjwTh6DGg6gN3E&quot;,&#xD;&#xA;              &quot;babe&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;              &quot;im_online&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;              &quot;para_validator&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;              &quot;para_assignment&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;              &quot;authority_discovery&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;&#xD;&#xA;            }&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Rococo local session section :*&#xD;&#xA;```&#xD;&#xA;&quot;session&quot;: {&#xD;&#xA;  &quot;keys&quot;: [&#xD;&#xA;    [&#xD;&#xA;      &quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&#xD;&#xA;      &quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&#xD;&#xA;      {&#xD;&#xA;        &quot;grandpa&quot;: &quot;5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu&quot;,&#xD;&#xA;        &quot;babe&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;        &quot;im_online&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;        &quot;para_validator&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;        &quot;para_assignment&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;        &quot;authority_discovery&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;        &quot;beefy&quot;: &quot;KW39r9CJjAVzmkf9zQ4YDb2hqfAVGdRqn53eRqyruqpxAP5YL&quot;&#xD;&#xA;      }&#xD;&#xA;    ],&#xD;&#xA;    [&#xD;&#xA;      &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;      &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;      {&#xD;&#xA;        &quot;grandpa&quot;: &quot;5GoNkf6WdbxCFnPdAnYYQyCjAKPJgLNxXwPjwTh6DGg6gN3E&quot;,&#xD;&#xA;        &quot;babe&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;        &quot;im_online&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;        &quot;para_validator&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;        &quot;para_assignment&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;        &quot;authority_discovery&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;        &quot;beefy&quot;: &quot;KWByAN7WfZABWS5AoWqxriRmF5f2jnDqy3rB5pfHLGkY93ibN&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  ]&#xD;&#xA;},&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can come of you tell me moe about this `beefy` protocol ? &#xD;&#xA;&#xD;&#xA;Thank you :)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2395" PostHistoryTypeId="1" PostId="663" RevisionGUID="0eb50940-8a6a-4bd1-8428-b248c572db77" CreationDate="2022-03-09T06:36:28.653" UserId="580" Text="Rococo Private Network" ContentLicense="CC BY-SA 4.0" />
  <row Id="2396" PostHistoryTypeId="3" PostId="663" RevisionGUID="0eb50940-8a6a-4bd1-8428-b248c572db77" CreationDate="2022-03-09T06:36:28.653" UserId="580" Text="|private-network|rococo-local|polcadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2397" PostHistoryTypeId="6" PostId="663" RevisionGUID="8efc1514-ad6c-4e48-8811-925b8842b9d4" CreationDate="2022-03-09T06:42:04.733" UserId="580" Comment="say hello :)" Text="|private-network|rococo-local|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2398" PostHistoryTypeId="2" PostId="664" RevisionGUID="07e578f7-3061-427f-be5a-4b9160da6d37" CreationDate="2022-03-09T06:51:40.273" UserId="580" Text="I created a polkadot-local based private network relay chain by adding some new keys both in stacking and session sections of the initial polkadot-local spec (I followed this tutorial [Start a private network](https://docs.substrate.io/tutorials/v3/private-network/) and adapted the logic for polkadot-local spec). My private relay chain is working fine as I see new blocks created from my new polkadot IDs.&#xD;&#xA;&#xD;&#xA;Now I would like to link a parachain to my polkadot-local based relay-chain. However the current [cumulus tutorial](https://docs.substrate.io/tutorials/v3/cumulus/start-relay/) is based on rococo-local chain and I'm wondering if it's possible to mix such spec to link a rococo-local base parachain to polkadot-local base relay chain. &#xD;&#xA;&#xD;&#xA;Currently I can see my rococo-local parachain collator node starting but I see it doesn't detect my relay chain nodes : &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-08 20:51:19 [Relaychain]  Idle (0 peers), best: #0 (0x8a7f…e77d), finalized #0 (0x8a7f…e77d), ⬇ 0 ⬆ 0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can some of you push me some hints on how I can fix this ? &#xD;&#xA;&#xD;&#xA;Thank you :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2400" PostHistoryTypeId="1" PostId="664" RevisionGUID="07e578f7-3061-427f-be5a-4b9160da6d37" CreationDate="2022-03-09T06:51:40.273" UserId="580" Text="Connecting a rococo-local based parachain to a private polkadot-local based relay chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="2401" PostHistoryTypeId="3" PostId="664" RevisionGUID="07e578f7-3061-427f-be5a-4b9160da6d37" CreationDate="2022-03-09T06:51:40.273" UserId="580" Text="|parachain|private-network|rococo-local|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2402" PostHistoryTypeId="2" PostId="665" RevisionGUID="98e312be-7b25-468c-90ce-c0f1b2e22ac5" CreationDate="2022-03-09T06:59:40.383" UserId="580" Text="going through the different tutorials, I discovered rococo-local and polkadot-local network and now I would like to hack these networks to define my own pre-configured accounts (ie: replace alice, alice-stash, bob, bob-stash, charlie ... accounts with my own). &#xD;&#xA;&#xD;&#xA;I didn't see the appropriate tutorials for such exercise and I begin think I need to add my own spec programatically. &#xD;&#xA;&#xD;&#xA;Can some of you push me some interesting advises and/or documentations link to help me managing that ? &#xD;&#xA;&#xD;&#xA;Thank you :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2404" PostHistoryTypeId="1" PostId="665" RevisionGUID="98e312be-7b25-468c-90ce-c0f1b2e22ac5" CreationDate="2022-03-09T06:59:40.383" UserId="580" Text="Howto setup your own pre-configured account in a relay/parachain spec" ContentLicense="CC BY-SA 4.0" />
  <row Id="2405" PostHistoryTypeId="3" PostId="665" RevisionGUID="98e312be-7b25-468c-90ce-c0f1b2e22ac5" CreationDate="2022-03-09T06:59:40.383" UserId="580" Text="|private-network|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2406" PostHistoryTypeId="2" PostId="666" RevisionGUID="ff04df6c-45a3-4ac7-a112-c88f9bd41ff4" CreationDate="2022-03-09T08:16:59.563" UserId="83" Text="Use [polkadot-launch][1] to configure and launch the relay chain and parachain seamlessly. Also refer to this [cumulus][2] tutorial for additional guidance.&#xD;&#xA;&#xD;&#xA;Create relevant accounts and session keys for your parachain. The below example would create relevant accounts for the DataHighway parachain.&#xD;&#xA;&#xD;&#xA;* Generate the sudo account for the DataHighway parachain `subkey inspect --network datahighway --scheme sr25519 &quot;//$SECRET&quot;`. Generate the secret key from the contents of a file so it is not logged in terminal history `openssl rand -hex 256 &gt; secret_key_file &amp;&amp; export SECRET=$( &lt; secret_key_file )`&#xD;&#xA;* Generate accounts for five (5) collators, since the parachain uses Aura `for i in 1 2 3 4 5; do for j in stash controller aura; do subkey inspect --network datahighway --scheme sr25519 &quot;//$SECRET//$i//$j&quot;; done; done; done`&#xD;&#xA;* Add the accounts to the chain_spec.rs of your parachain codebase that is based on the [substrate-parachain-template][3]. For example, see how the [DataHighway's Spreehafen parachain specification for connecting to rococo][4] uses custom pre-configured accounts and session keys, whereas the [DataHighway's rococo-local parachain specification for connecting to rococo-local][5] just used Substrate's in-built accounts like Alice.&#xD;&#xA;&#xD;&#xA;There is a tutorial [here][6] that shows the detailed steps the DataHighway team took to connect their parachain to the rococo-local relay chain.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-launch&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/v3/cumulus/start-relay/&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [4]: https://github.com/DataHighway-DHX/DataHighway-Parachain/blob/main/node/src/chain_spec.rs#L318&#xD;&#xA;  [5]: https://github.com/DataHighway-DHX/DataHighway-Parachain/blob/main/node/src/chain_spec.rs#L155&#xD;&#xA;  [6]: https://github.com/DataHighway-DHX/documentation/blob/master/docs/tutorials/tutorials-node-polkadot-launch-datahighway-rococo-local.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="2408" PostHistoryTypeId="2" PostId="667" RevisionGUID="f080d706-3bcc-46f0-96ab-ff4202f61fb5" CreationDate="2022-03-09T09:23:02.103" UserId="351" Text="Include your pallet into workspace.&#xD;&#xA;Inside cargo.toml as per instruction." ContentLicense="CC BY-SA 4.0" />
  <row Id="2410" PostHistoryTypeId="2" PostId="668" RevisionGUID="9290dd84-b71a-457b-abb1-5ac84c929388" CreationDate="2022-03-09T10:41:45.433" UserId="452" Text="You should pass #57281 as the second parameter to the `noteStalled` call since that is the last block that was finalized, this means that when the GRANDPA validator set is forcibly changed it will resume finalizing from that block on. The delay only counts after the current session ends so the total delay until you see the change happens will be more than 100 blocks. Additionally, this will only rotate the validator set with whatever is selected for the next session, hence if the same validators are there (which presumably aren't finalizing for some reason), then the problem will remain. You should also use the `grandpa_roundState` RPC method to debug which validators aren't voting.&#xD;&#xA;&#xD;&#xA;(Similar question here: https://substrate.stackexchange.com/questions/214/recovering-from-stalled-finality-babe-grandpa/380)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2412" PostHistoryTypeId="4" PostId="663" RevisionGUID="20e641d5-dc85-48b5-89d6-a78a641176b0" CreationDate="2022-03-09T10:57:58.830" UserId="104" Comment="Make clear that the question is about configuring BEEFY" Text="How do I configure the beefy parameter in the spec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2413" PostHistoryTypeId="6" PostId="663" RevisionGUID="20e641d5-dc85-48b5-89d6-a78a641176b0" CreationDate="2022-03-09T10:57:58.830" UserId="104" Comment="Make clear that the question is about configuring BEEFY" Text="|private-network|rococo-local|polkadot-local|beefy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2420" PostHistoryTypeId="2" PostId="670" RevisionGUID="58e67dc8-b8dc-47c3-8c55-c2e9f6f04f61" CreationDate="2022-03-09T12:57:04.693" UserId="125" Text="I am trying to get the block author via `find_author` with digest. I can get the `authority_id` whose type is `sp_consensus_babe::app::Public` or `sp_consensus_aura::app::Public`, how can I convert this to validator's AccountId?&#xD;&#xA;&#xD;&#xA;What I want to do is:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub struct FindAuthorTruncated&lt;F&gt;(PhantomData&lt;F&gt;);&#xD;&#xA;impl&lt;F: FindAuthor&lt;u32&gt;&gt; FindAuthor&lt;H160&gt; for FindAuthorTruncated&lt;F&gt; {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;H160&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		F::find_author(digests).map(|author_index| {&#xD;&#xA;			let authority_id = Aura::authorities()[author_index as usize].clone();&#xD;&#xA;&#xD;&#xA;            // Is there any way to convert the authority_id to T::AccountId?&#xD;&#xA;&#xD;&#xA;			H160::from_slice(&amp;authority_id.to_raw_vec()[4..24])&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2422" PostHistoryTypeId="1" PostId="670" RevisionGUID="58e67dc8-b8dc-47c3-8c55-c2e9f6f04f61" CreationDate="2022-03-09T12:57:04.693" UserId="125" Text="Any way to convert `sp_consensus_babe::app::Public` to `T::AccountId`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2423" PostHistoryTypeId="3" PostId="670" RevisionGUID="58e67dc8-b8dc-47c3-8c55-c2e9f6f04f61" CreationDate="2022-03-09T12:57:04.693" UserId="125" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2426" PostHistoryTypeId="2" PostId="672" RevisionGUID="3b4a0b92-b898-4ca5-b0fc-c0db81af3b6b" CreationDate="2022-03-09T13:12:25.143" UserId="452" Text="Assuming you are using the session pallet, you can query the current set of validators and use the validator index to get a `ValidatorId`." ContentLicense="CC BY-SA 4.0" />
  <row Id="2428" PostHistoryTypeId="2" PostId="673" RevisionGUID="75508e76-a4f0-455c-84e5-74bd8d386a54" CreationDate="2022-03-09T13:21:35.457" UserId="125" Text="A not so perfect solution is:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let account_id = T::AccountId::decode(&amp;mut authority_id.0.as_slice()).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2430" PostHistoryTypeId="5" PostId="670" RevisionGUID="b57bbf2e-52ca-4cc5-9c39-2283c5b90488" CreationDate="2022-03-09T13:22:46.670" UserId="125" Comment="added 22 characters in body" Text="I am trying to get the block author via `find_author` with digest. I can get the `authority_id` whose type is `sp_consensus_babe::app::Public` or `sp_consensus_aura::app::Public`, how can I convert this to validator's AccountId?&#xD;&#xA;&#xD;&#xA;What I want to do is:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub struct FindAuthorTruncated&lt;T, F&gt;(PhantomData&lt;(T, F)&gt;);&#xD;&#xA;impl&lt;T: Config, F: FindAuthor&lt;u32&gt;&gt; FindAuthor&lt;H160&gt; for FindAuthorTruncated&lt;T, F&gt; {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;H160&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		F::find_author(digests).map(|author_index| {&#xD;&#xA;			let authority_id = Aura::authorities()[author_index as usize].clone();&#xD;&#xA;&#xD;&#xA;            // Is there any way to convert the authority_id to T::AccountId?&#xD;&#xA;&#xD;&#xA;			H160::from_slice(&amp;authority_id.to_raw_vec()[4..24])&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2431" PostHistoryTypeId="5" PostId="672" RevisionGUID="4afdb8e1-2705-462f-8de1-7609af19b6bc" CreationDate="2022-03-09T13:44:33.823" UserId="452" Comment="added 229 characters in body" Text="Assuming you are using the session pallet, then you should use `pallet_session::FindAccountFromAuthorIndex`. If you are not using the session pallet then it depends on what you are using to manage the validator set. E.g. in the node-template runtime there is no pallet to manage the validator set and instead the authorities are an hard-coded list in the aura pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="2432" PostHistoryTypeId="4" PostId="648" RevisionGUID="93a1e7e8-029d-4f03-a8d6-b88b60ece431" CreationDate="2022-03-09T15:17:53.037" UserId="28" Comment="edited title" Text="How to use the .multi() method? (substrate-front-end-template)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2433" PostHistoryTypeId="5" PostId="660" RevisionGUID="02fadee4-c554-49e6-ae61-4653f66bc364" CreationDate="2022-03-09T15:18:45.890" UserId="28" Comment="deleted 110 characters in body" Text="I found an [example](https://github.com/polkadot-js/docs/blob/2a29d083e12ec456a2a226a79181fa4fe7c59538/docs/api/examples/promise/read-storage-at.md) in the polkadot-js-docs. In short: it is a multi-query to retrieve several objects. I guess in the kitty-tutorial first the ids of the single objects are retrieved and second for each id the body is queried in a multi-query.&#xD;&#xA;&#xD;&#xA;here the example from the docs:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;// Import the API&#xD;&#xA;const { ApiPromise } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;// Our address for Alice on the dev chain&#xD;&#xA;const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';&#xD;&#xA;const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  // Create our API with a default connection to the local node&#xD;&#xA;  const api = await ApiPromise.create();&#xD;&#xA;&#xD;&#xA;  // Retrieve the last block header, extracting the hash and parentHash&#xD;&#xA;  const { hash, parentHash } = await api.rpc.chain.getHeader();&#xD;&#xA;&#xD;&#xA;  console.log(`last header hash ${hash.toHex()}`);&#xD;&#xA;&#xD;&#xA;  // Retrieve the balance at the preceding block for Alice. For at queries&#xD;&#xA;  // the format is always `.at(&lt;blockhash&gt;, ...params)`&#xD;&#xA;  const balance = await api.query.system.account.at(parentHash, ALICE);&#xD;&#xA;&#xD;&#xA;  console.log(`Alice's balance at ${parentHash.toHex()} was ${balance.data.free}`);&#xD;&#xA;&#xD;&#xA;  // Now perform a multi query, returning multiple balances at once&#xD;&#xA;  const balances = await api.query.system.account.multi([ALICE, BOB]);&#xD;&#xA;&#xD;&#xA;  console.log(`Current balances for Alice and Bob are ${balances[0].data.free} and ${balances[1].data.free}`);&#xD;&#xA;}&#xD;&#xA;````" ContentLicense="CC BY-SA 4.0" />
  <row Id="2434" PostHistoryTypeId="5" PostId="662" RevisionGUID="bab61bdc-b62e-4c62-ac9d-e2b1740ca226" CreationDate="2022-03-09T15:21:22.270" UserId="28" Comment="added 2 characters in body" Text="I was following the tutorial: https://docs.substrate.io/tutorials/v3/kitties/pt1/&#xD;&#xA;and as said in the tutorial I installed kickstart using: cargo install kickstart&#xD;&#xA;&#xD;&#xA;And after that cloned a copy of the most recent node template which asks how you would like to call your node and pallet. So I named node and Pallet as kitties.&#xD;&#xA;&#xD;&#xA;But as I open the kitties directory in the code editor and rename it as kitties-tutorialnew it gives an error of Cargo as:&#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;Execution failed (exit code 101).&#xD;&#xA;C:/Users/msi/.cargo/bin/cargo.exe metadata --verbose --format-version 1 --all-features&#xD;&#xA;stdout : error: failed to load manifest for workspace member `C:\Users\msi\kitties-tutorialnew\node`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to parse manifest at `C:\Users\msi\kitties-tutorialnew\node\Cargo.toml`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  could not parse input as TOML&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  duplicate key: `substrate-build-script-utils` for key `build-dependencies` at line 70 column 1&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2435" PostHistoryTypeId="2" PostId="674" RevisionGUID="da1b2586-660e-44d1-b1ca-76c6d1cf6c03" CreationDate="2022-03-09T15:22:03.753" UserId="28" Text="The error here is written to you in the error message:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  duplicate key: `substrate-build-script-utils` for key `build-dependencies` at line 70 column 1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You have the same import twice in your TOML file, and so you need to remove the duplicate import." ContentLicense="CC BY-SA 4.0" />
  <row Id="2437" PostHistoryTypeId="2" PostId="675" RevisionGUID="f4680870-c5b6-48b5-a148-3432ad8cf59c" CreationDate="2022-03-09T15:42:02.300" UserId="116" Text="What are the steps to take to restart a chain when finality is lagging behind and block productions is also slowing down.&#xD;&#xA;&#xD;&#xA;In the logs there are prints like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Backing off claiming new slot for block authorship: finality is lagging.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have the Sudo key for this chain what can I do to revive it?&#xD;&#xA;&#xD;&#xA;(This is related to https://substrate.stackexchange.com/questions/214/recovering-from-stalled-finality-babe-grandpa and https://substrate.stackexchange.com/questions/661/how-to-use-notestalled-to-recover-from-a-finality-lagging-chain but I'm looking for a checklist to recover the chain when I make another mistake)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2439" PostHistoryTypeId="1" PostId="675" RevisionGUID="f4680870-c5b6-48b5-a148-3432ad8cf59c" CreationDate="2022-03-09T15:42:02.300" UserId="116" Text="Backing off claiming new slot for block authorship: finality is lagging" ContentLicense="CC BY-SA 4.0" />
  <row Id="2440" PostHistoryTypeId="3" PostId="675" RevisionGUID="f4680870-c5b6-48b5-a148-3432ad8cf59c" CreationDate="2022-03-09T15:42:02.300" UserId="116" Text="|babe|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2441" PostHistoryTypeId="2" PostId="676" RevisionGUID="441d3750-696b-4d2e-aac3-e545b3dd5380" CreationDate="2022-03-09T15:50:06.487" UserId="167" Text="This is because for some reason your `pallet-election-provider-multi-phase` failed, without a proper fallback configured. The reason for the failure can be multiple things, but the most common one is that you don't have enough validators candidates, compared to how many you want. &#xD;&#xA;&#xD;&#xA;In other words, if you check the storage item `Staking::validator_count`, and for example if this value is 4, but you only have 3 candidates, your election will always fail.&#xD;&#xA;&#xD;&#xA;We are working on relaxing this condition in [this pull request](https://github.com/paritytech/substrate/pull/10905). &#xD;&#xA;&#xD;&#xA;The easiest fix for a failing election, specially for test networks, is to change `type Fallback` to something that doesn't fail as easy. An example of this is [`frame_election_provider_support::OnchainSequentialPhragmen`](https://paritytech.github.io/substrate/master/frame_election_provider_support/onchain/struct.OnChainSequentialPhragmen.html). &#xD;&#xA;&#xD;&#xA;Although, using this in production can be problematic. This is also something that [another pull request](https://github.com/paritytech/substrate/pull/10988) is trying to tackle. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2443" PostHistoryTypeId="2" PostId="677" RevisionGUID="117ed7fb-2a06-42d6-902c-8b5eaf382182" CreationDate="2022-03-09T15:52:50.710" UserId="167" Text="&gt; `2022-03-08 22:34:48.034 DEBUG      offchain-worker runtime::election-provider: [#199]   pre-dispatch checks failed for mined solution: Module { index: 19, error: 1, message: Some(&quot;PreDispatchWrongWinnerCount&quot;) }`     &#xD;&#xA;&#xD;&#xA;This reveals that the underlying issue is the same as explained in a [similar question](https://substrate.stackexchange.com/questions/651/substrate-validators-losing-connection-to-each-other/676#676): &#xD;&#xA;&#xD;&#xA;&gt; The reason for the failure can be multiple things, but the most common one is that you don't have enough validators candidates, compared to how many you want.&#xD;&#xA;&gt; In other words, if you check the storage item `Staking::validator_count`, and for example if this value is 4, but you only have 3 candidates, your election will always fail. &#xD;&#xA;&#xD;&#xA;The same fix as suggested there should work for you as well. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2445" PostHistoryTypeId="2" PostId="678" RevisionGUID="8e453833-a401-4f7d-be0f-38a817f8a5e9" CreationDate="2022-03-09T16:15:34.573" UserId="167" Text="Here's an overview of all of the named crates, and how they relate to one another. &#xD;&#xA;&#xD;&#xA;[`sp-npos-elections`](https://paritytech.github.io/substrate/master/sp_npos_elections/index.html): This is a generic rust crate that just implements a bunch of algorithms, such as `seq_phragmen`, `phragmms`, and further optimizations like `balancing`.&#xD;&#xA;&#xD;&#xA;[`frame-election-provider-support`](https://paritytech.github.io/substrate/master/frame_election_provider_support/index.html) is the interface of using these elections within FRAME. it contains some types, traits, and abstractions around this. An important trait here is `ElectionProvider`. This is the trait that needs to be implemented for some type, so it can provide the NPoS election to `pallet-staking`, via `type ElectionProvider`. &#xD;&#xA;&#xD;&#xA;[`election-provider-muli-phase`](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/index.html) is one opinionated implementation of `ElectionProvider`, which has extensive documentation in itself about what it does and how it does it. But end of the day, it can be plugged into `pallet-staking` as [`type ElectionProvider`](https://paritytech.github.io/substrate/master/pallet_staking/trait.Config.html#associatedtype.ElectionProvider). &#xD;&#xA;&#xD;&#xA;One of the details of `election-provider-muli-phase` is that it has miners that run on `OffchainWorker` threads of each block, and compute an election, under certain condition. `type Solver` will determine which algorithm we want to use for this case. The documentation for [`type Solver`](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/pallet/trait.Config.html#associatedtype.Solver) explains this further. &#xD;&#xA;&#xD;&#xA;Alternatively, you can look into [what other types implement `ElectionProvider`](https://paritytech.github.io/substrate/master/frame_election_provider_support/trait.ElectionProvider.html#implementors) for more simpler ones. &#xD;&#xA;&#xD;&#xA;Finally, `pallet-elections-phragmen` has nothing to do with any of this, and is a generic pallet capable of running onchain elections, and it is directly using `sp-npos-elections::seq_phragmen`. unlike `election-provider-muli-phase` which is quite complicated and has a lot of internal state, this one us quite simple. In reality, this can only be used for some small-scale election that happens onchain, like a council election in Polkadot. &#xD;&#xA;&#xD;&#xA;This [recent YouTube video](https://www.youtube.com/watch?v=qVd9lAudynY) is a great in-depth explanation of all of this. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2447" PostHistoryTypeId="2" PostId="679" RevisionGUID="fe805f12-805f-4bf7-9352-3289db1a53b8" CreationDate="2022-03-09T16:28:08.757" UserId="94" Text="I keep seeing `#[pallet::compact]` on some extrinsic arguments like here on the `pallet-assets/mint` definition:  &#xD;&#xA;```rust&#xD;&#xA;pub fn mint(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			#[pallet::compact] id: T::AssetId,&#xD;&#xA;			beneficiary: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;			#[pallet::compact] amount: T::Balance,&#xD;&#xA;		) -&gt; DispatchResult&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What does `#[pallet::compact]` do on an argument?  &#xD;&#xA;When do I have to use it for implementing a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2449" PostHistoryTypeId="1" PostId="679" RevisionGUID="fe805f12-805f-4bf7-9352-3289db1a53b8" CreationDate="2022-03-09T16:28:08.757" UserId="94" Text="When to use `compact` on extrinsic arguments?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2450" PostHistoryTypeId="3" PostId="679" RevisionGUID="fe805f12-805f-4bf7-9352-3289db1a53b8" CreationDate="2022-03-09T16:28:08.757" UserId="94" Text="|pallet|frame|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2451" PostHistoryTypeId="2" PostId="680" RevisionGUID="f143bfb0-a31a-4fdc-9e7b-83091ff6dca0" CreationDate="2022-03-09T17:17:34.210" UserId="209" Text="I'm trying to use fixed point variable in my substrate pallet. Here's my import:&#xD;&#xA;&#xD;&#xA;    use frame_support::sp_runtime::FixedU128;&#xD;&#xA;&#xD;&#xA;and when I try to do this&#xD;&#xA;&#xD;&#xA;    let some_var = FixedU128::from_float(0.1515151f64);&#xD;&#xA;&#xD;&#xA;here's what I get: &#xD;&#xA;&#xD;&#xA;     let some_var = FixedU128::from_float(0.1515151f64);&#xD;&#xA;                               ^^^^^^^^^^ function or associated item not found in `FixedU128`&#xD;&#xA;&#xD;&#xA;Which is definitely not true, because `from_float` is there in `FixedU128` as shown here: https://docs.substrate.io/rustdocs/latest/sp_runtime/struct.FixedU128.html#method.from_float&#xD;&#xA;&#xD;&#xA;I guess I'm doing something wrong, pls help. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2453" PostHistoryTypeId="1" PostId="680" RevisionGUID="f143bfb0-a31a-4fdc-9e7b-83091ff6dca0" CreationDate="2022-03-09T17:17:34.210" UserId="209" Text="from_float function or associated item not found in `FixedU128`" ContentLicense="CC BY-SA 4.0" />
  <row Id="2454" PostHistoryTypeId="3" PostId="680" RevisionGUID="f143bfb0-a31a-4fdc-9e7b-83091ff6dca0" CreationDate="2022-03-09T17:17:34.210" UserId="209" Text="|fixed-point-math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2455" PostHistoryTypeId="2" PostId="681" RevisionGUID="c19076c1-35f0-4a37-a2a8-3811792f4b01" CreationDate="2022-03-09T17:37:34.793" UserId="298" Text="I'm running a rococo style relay chain with other community members. It can more than 3 hours to upgrade to parathread and then from parathread to parachain. &#xD;&#xA;&#xD;&#xA;Is there a sudo extrinsic i am missing to completely bypass the onboarding process, where the onboarding time can be reduced? " ContentLicense="CC BY-SA 4.0" />
  <row Id="2457" PostHistoryTypeId="1" PostId="681" RevisionGUID="c19076c1-35f0-4a37-a2a8-3811792f4b01" CreationDate="2022-03-09T17:37:34.793" UserId="298" Text="On our own rococo staging chain is it possible to bypass the long onboarding process for parachains, with Sudo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2458" PostHistoryTypeId="3" PostId="681" RevisionGUID="c19076c1-35f0-4a37-a2a8-3811792f4b01" CreationDate="2022-03-09T17:37:34.793" UserId="298" Text="|substrate-node|rococo-local|polkadot-local|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2459" PostHistoryTypeId="2" PostId="682" RevisionGUID="6bfb7de3-fb03-4986-af5a-1e6c8c3ef438" CreationDate="2022-03-09T18:16:26.377" UserId="29" Text="It should takes 2 sessions for the chain to fully onboard as a parathread.&#xD;&#xA;&#xD;&#xA;As far as going from parathread to parachain, as of right now, you will need to make a request on the parachain technical chat:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/cumulus/rococo/#request-your-parachain-slot&#xD;&#xA;&#xD;&#xA;where a Parity team member (with privileges) will register your parachain.&#xD;&#xA;&#xD;&#xA;Once you temporary slot lease period ends, the next slot will be leased out in a round robin fashion - this way other teams have an opportunity to lease a temporary slot as well. And, with time, your team will regain a slot lease again automatically." ContentLicense="CC BY-SA 4.0" />
  <row Id="2461" PostHistoryTypeId="5" PostId="681" RevisionGUID="4df433d5-2fe2-4ce3-996f-95511f85e0ec" CreationDate="2022-03-09T18:16:53.243" UserId="29" Comment="added 5 characters in body" Text="I'm running a rococo style relay chain with other community members. It can take more than 3 hours to upgrade to parathread and then from parathread to parachain. &#xD;&#xA;&#xD;&#xA;Is there a sudo extrinsic i am missing to completely bypass the onboarding process, where the onboarding time can be reduced? " ContentLicense="CC BY-SA 4.0" />
  <row Id="2462" PostHistoryTypeId="5" PostId="682" RevisionGUID="18e53b27-f1ac-439b-8440-c47b262a430a" CreationDate="2022-03-09T18:29:27.093" UserId="29" Comment="added 1 character in body" Text="It should takes 2 sessions for the chain to fully onboard as a parathread.&#xD;&#xA;&#xD;&#xA;As far as going from parathread to parachain, as of right now, you will need to make a request on the parachain technical chat:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/cumulus/rococo/#request-your-parachain-slot&#xD;&#xA;&#xD;&#xA;where a Parity team member (with privileges) will register your parachain.&#xD;&#xA;&#xD;&#xA;Once your temporary slot lease period ends, the next slot will be leased out in a round robin fashion - this way other teams have an opportunity to lease a temporary slot as well. And, with time, your team will regain a slot lease again automatically." ContentLicense="CC BY-SA 4.0" />
  <row Id="2463" PostHistoryTypeId="2" PostId="683" RevisionGUID="6f5c8e39-3505-4555-80a9-fa09f7f50ca3" CreationDate="2022-03-09T18:35:48.200" UserId="165" Text="You can use `paras.forceQueueAction(paraId)` to make the onboarding happen in the very next session.&#xD;&#xA;I am afraid that this is the only and fastest way that I know to make this process faster." ContentLicense="CC BY-SA 4.0" />
  <row Id="2465" PostHistoryTypeId="2" PostId="684" RevisionGUID="309e09b2-dea8-467a-b16e-c08d20fff862" CreationDate="2022-03-09T18:38:07.497" UserId="28" Text="The `from_float` function is only available for tests and compiling with `std`, and thus is not usable in the runtime itself:&#xD;&#xA;&#xD;&#xA;From [`primitives/arithmetic/src/fixed_point.rs`](https://github.com/paritytech/substrate/blob/master/primitives/arithmetic/src/fixed_point.rs#L414)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg(any(feature = &quot;std&quot;, test))]&#xD;&#xA;pub fn from_float(x: f64) -&gt; Self {&#xD;&#xA;	Self((x * (&lt;Self as FixedPointNumber&gt;::DIV as f64)) as $inner_type)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should use one of the other available APIs to get the number you want." ContentLicense="CC BY-SA 4.0" />
  <row Id="2467" PostHistoryTypeId="5" PostId="683" RevisionGUID="c0a9db68-097e-42eb-9368-bca0dc18f902" CreationDate="2022-03-09T18:47:05.720" UserId="165" Comment="added 412 characters in body" Text="You can use `paras.forceQueueAction(paraId)` to make the onboarding happen in the very next session.&#xD;&#xA;I am afraid that this is the only and fastest way that I know to make this process faster.&#xD;&#xA;&#xD;&#xA;I don't have all the details, but have into account that a new para will need a new subset of validators. And if you check the definition on `Session`&#xD;&#xA;&#xD;&#xA; - &gt; Session: A session is a period of time that has a constant set of&#xD;&#xA;   &gt; validators. Validators can only join or exit the validator set at a&#xD;&#xA;   &gt; session change&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For me it is clear that you cannot go faster than one session when oboarding paras." ContentLicense="CC BY-SA 4.0" />
  <row Id="2468" PostHistoryTypeId="5" PostId="682" RevisionGUID="44f48802-f71f-43d0-b094-f4ef4c67922e" CreationDate="2022-03-09T18:47:25.100" UserId="29" Comment="they are running their own version of rococo" Text="It should take 2 sessions for the chain to fully onboard as a parathread." ContentLicense="CC BY-SA 4.0" />
  <row Id="2469" PostHistoryTypeId="2" PostId="685" RevisionGUID="73acb401-1974-42f1-be3b-2180b2f65cbf" CreationDate="2022-03-09T18:48:29.710" UserId="587" Text="I want to write a function which a user can call with an asset id and the amount of which it wants to deposit. I need to check if said asset id is within a list of allowable assets, which can change over time.&#xD;&#xA;&#xD;&#xA;I've checked the [`frame_support::storage::types`](https://docs.substrate.io/rustdocs/latest/frame_support/storage/types/index.html) docs and couldn't find a storage type that directly implements what I'm looking for.&#xD;&#xA;&#xD;&#xA;I've thought of storing a [`HashSet`](https://doc.rust-lang.org/std/collections/struct.HashSet.html) in a `StorageValue` or using a `StorageMap` with empty values. Any recommendations?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2471" PostHistoryTypeId="1" PostId="685" RevisionGUID="73acb401-1974-42f1-be3b-2180b2f65cbf" CreationDate="2022-03-09T18:48:29.710" UserId="587" Text="How to store a list of allowable assets for a pallet extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2472" PostHistoryTypeId="3" PostId="685" RevisionGUID="73acb401-1974-42f1-be3b-2180b2f65cbf" CreationDate="2022-03-09T18:48:29.710" UserId="587" Text="|pallet|storage|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2473" PostHistoryTypeId="5" PostId="682" RevisionGUID="d7d8046e-fa2f-4c70-ac9a-866d192ebad3" CreationDate="2022-03-09T18:57:32.590" UserId="29" Comment="added 79 characters in body" Text="&gt; It takes 2 sessions for the chain to fully onboard as a parathread.&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/cumulus/rococo/#register-as-a-parathread" ContentLicense="CC BY-SA 4.0" />
  <row Id="2474" PostHistoryTypeId="2" PostId="686" RevisionGUID="e0fa125f-f45f-4566-84a0-5cdd36f49430" CreationDate="2022-03-09T19:02:42.017" UserId="28" Text="You should use `#[pallet::compact]` wherever the type allows it, and you want to take advantage of compact encoding to reduce the amount of bytes that is needed to call an extrinsic.&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/v3/advanced/scale-codec/#compactgeneral-integers&#xD;&#xA;&#xD;&#xA;As a small reminder, `compact` encoding allows types like `0u64` to be represented as only 1 byte `0x00` rather than 8 bytes. This kind of &quot;compactification&quot; will be true for all small values, while it may introduce up to one additional byte overall for only the largest numbers.&#xD;&#xA;&#xD;&#xA;So, by telling your pallet to expect a compact integer, you can on average reduce the number of bytes which are used to successfully call an extrinsic. This can reduce the overall size of your blockchain, and also reduce the fees for the end user.&#xD;&#xA;&#xD;&#xA;This is never required, but is nice to include when the situation makes sense.&#xD;&#xA;&#xD;&#xA;Note that changing between compact and non-compact encoding is a transaction version breaking change, since things like hardware wallets will expect to encode transaction in one of these specific ways." ContentLicense="CC BY-SA 4.0" />
  <row Id="2476" PostHistoryTypeId="5" PostId="685" RevisionGUID="1eedad59-63fa-4dac-8cc1-8d574446821e" CreationDate="2022-03-09T19:16:17.160" UserId="587" Comment="added 438 characters in body" Text="I want to write a function which a user can call with an asset id and the amount of which it wants to deposit. I need to check if said asset id is within a list of allowable assets, which can change over time.&#xD;&#xA;&#xD;&#xA;Something like this&#xD;&#xA;```rust&#xD;&#xA;pub fn add_margin(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	asset: AssetIdOf&lt;T&gt;,&#xD;&#xA;	amount: T::Balance,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;	let acc = ensure_signed(origin)?;&#xD;&#xA;    SupportedAssets&lt;T&gt;::contains(asset)?;&#xD;&#xA;    // do stuff ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've checked the [`frame_support::storage::types`](https://docs.substrate.io/rustdocs/latest/frame_support/storage/types/index.html) docs and couldn't find a storage type that directly implements what I'm looking for.&#xD;&#xA;&#xD;&#xA;I've thought of two alternatives:&#xD;&#xA;1. Using a `StorageValue` with a[`HashSet`](https://doc.rust-lang.org/std/collections/struct.HashSet.html) in it, getting the set and checking if it contains the asset id&#xD;&#xA;2. Using a `StorageMap` which maps asset id to the unit type, thus checking if it contains the asset id as key and ignoring the stored value. &#xD;&#xA;&#xD;&#xA;Any recommendations?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2477" PostHistoryTypeId="2" PostId="687" RevisionGUID="c69c0643-3b0f-48d9-b4d1-2ad4846c8b60" CreationDate="2022-03-09T19:33:11.547" UserId="582" Text="I'm trying to implement a feature where users who lock tokens for a certain period of time are granted some rewards. I'm using `pallet-balances` along with the `LockableCurrency` trait for this purpose.&#xD;&#xA;&#xD;&#xA;I noticed that when calling `T::Currency::set_lock(...)` I have to provide a reasons parameter `WithdrawReasons`.&#xD;&#xA;&#xD;&#xA;What exactly is the purpose of this parameter and how can I select which reason to select and what implication does this parameter have on the lock itself.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2479" PostHistoryTypeId="1" PostId="687" RevisionGUID="c69c0643-3b0f-48d9-b4d1-2ad4846c8b60" CreationDate="2022-03-09T19:33:11.547" UserId="582" Text="Purpose of `WithdrawReasons` when locking funds" ContentLicense="CC BY-SA 4.0" />
  <row Id="2480" PostHistoryTypeId="3" PostId="687" RevisionGUID="c69c0643-3b0f-48d9-b4d1-2ad4846c8b60" CreationDate="2022-03-09T19:33:11.547" UserId="582" Text="|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2481" PostHistoryTypeId="2" PostId="688" RevisionGUID="aca7e7d4-b133-4e77-9ffa-38f076a904e4" CreationDate="2022-03-09T19:48:48.100" UserId="238" Text="Right now when I run:&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:&quot;1&quot;, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;, &quot;params&quot;:[]}' http://localhost:9933&#xD;&#xA;```&#xD;&#xA;I get that `engine_createBlock` is not an RPC method. How do I expose it?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="2483" PostHistoryTypeId="1" PostId="688" RevisionGUID="aca7e7d4-b133-4e77-9ffa-38f076a904e4" CreationDate="2022-03-09T19:48:48.100" UserId="238" Text="How to expose `engine_createBlock` manual-seal RPC?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2484" PostHistoryTypeId="3" PostId="688" RevisionGUID="aca7e7d4-b133-4e77-9ffa-38f076a904e4" CreationDate="2022-03-09T19:48:48.100" UserId="238" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2485" PostHistoryTypeId="2" PostId="689" RevisionGUID="022efbf2-9963-4608-b591-6c3b1e000a42" CreationDate="2022-03-09T19:50:52.560" UserId="496" Text="I'm trying to calculate a value of token by using division operator, here is the code of the price calculation:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_price_for_token_a_as_input(&amp;self) -&gt; Balance {&#xD;&#xA;&#xD;&#xA;            let pool_b_amount: Balance = self.token_b.balance_of(self.get_account_id());&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            let opr:Balance = 10;&#xD;&#xA;            let one = 1*opr.pow(12);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            let price_from_one_token_a_to_b = one / pool_b_amount;&#xD;&#xA;            &#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;            price_from_one_token_a_to_b&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The Value of  ``` price_from_one_token_a_to_b ``` is always 0.&#xD;&#xA;&#xD;&#xA;the values are already 10^12.&#xD;&#xA;&#xD;&#xA;Thanks in advance. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2487" PostHistoryTypeId="1" PostId="689" RevisionGUID="022efbf2-9963-4608-b591-6c3b1e000a42" CreationDate="2022-03-09T19:50:52.560" UserId="496" Text="Rust ink. Division always return 0" ContentLicense="CC BY-SA 4.0" />
  <row Id="2488" PostHistoryTypeId="3" PostId="689" RevisionGUID="022efbf2-9963-4608-b591-6c3b1e000a42" CreationDate="2022-03-09T19:50:52.560" UserId="496" Text="|ink|rust|floating-point-math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2489" PostHistoryTypeId="2" PostId="690" RevisionGUID="76dc445d-63f3-488b-8aca-f059b8b8345d" CreationDate="2022-03-09T20:01:18.740" UserId="28" Text="I think for this specific scenario, something like a `StorageMap` to the unit type makes sense.&#xD;&#xA;&#xD;&#xA;But... it really depends more on your overall usage scenario. Simplifying, your concerns should be, in order:&#xD;&#xA;&#xD;&#xA;1. Reducing the number of storage reads.&#xD;&#xA;2. Reducing the size of the storage read. (Also, ensuring your storage is bounded.)&#xD;&#xA;&#xD;&#xA;So imagine the scenario you use a bounded vector. That means it will only take 1 read to get all of the supported assets, but the read will be a larger encoded value than just a single asset, but also this storage item would need to be bounded in size, so you could not support an unlimited number of whitelisted assets in this object.&#xD;&#xA;&#xD;&#xA;Now imagine you have a `StorageMap`. Reading if one asset is supported will be as efficient as you can get with a storage read, but then you could never really write code where you list all of the supported assets, since that would be one storage read each, and you will quickly run out of weight.&#xD;&#xA;&#xD;&#xA;Imagine you use both a bounded vec and a storage map, so that you can have both options to you, but now your overall blockchain storage will be doubled(-ish).&#xD;&#xA;&#xD;&#xA;Finally, you can imagine not using storage at all, and hard-coding a table of accepted assets into the Runtime itself as some configurable value. This is of course most efficient, and you can do pretty much unlimited stuff here, but then you would need to update your runtime every time you want to update this hard-coded list.&#xD;&#xA;&#xD;&#xA;So there is no right answer. It really depends on the overall usage pattern you are driving." ContentLicense="CC BY-SA 4.0" />
  <row Id="2491" PostHistoryTypeId="5" PostId="689" RevisionGUID="24b08c2c-12e3-4b31-afd6-02950749bd94" CreationDate="2022-03-09T20:14:29.070" UserId="496" Comment="added 70 characters in body; edited title" Text="I'm trying to calculate a value of token by using division operator,&#xD;&#xA;it will return a number higher then 1, but never returns &#xD;&#xA;here is the code of the price calculation:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_price_for_token_a_as_input(&amp;self) -&gt; Balance {&#xD;&#xA;&#xD;&#xA;            let pool_b_amount: Balance = self.token_b.balance_of(self.get_account_id());&#xD;&#xA;           &#xD;&#xA;&#xD;&#xA;            let opr:Balance = 10;&#xD;&#xA;            let one = 1*opr.pow(12);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            let price_from_one_token_a_to_b = one (1) / pool_b_amount (200);&#xD;&#xA;            &#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;            price_from_one_token_a_to_b&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The Value of  ``` price_from_one_token_a_to_b ``` is always 0.&#xD;&#xA;&#xD;&#xA;the values are already 10^12.&#xD;&#xA;&#xD;&#xA;Thanks in advance. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2492" PostHistoryTypeId="4" PostId="689" RevisionGUID="24b08c2c-12e3-4b31-afd6-02950749bd94" CreationDate="2022-03-09T20:14:29.070" UserId="496" Comment="added 70 characters in body; edited title" Text="Rust ink. Division wont return a number with float point" ContentLicense="CC BY-SA 4.0" />
  <row Id="2493" PostHistoryTypeId="2" PostId="691" RevisionGUID="7b9ca1dc-e457-4f00-b035-52c8319013d6" CreationDate="2022-03-09T21:22:16.263" UserId="380" Text="You cannot use floating point maths in `ink!`. If you do something like `10/7` then you will get `1` as a result (rounded from `1.42857142857`).&#xD;&#xA;&#xD;&#xA;It looks like you're calculating `1/200` which is `0.005` and therefore rounded to `0`.&#xD;&#xA;&#xD;&#xA;Check out [this answer](https://substrate.stackexchange.com/a/147/380) for a more complete explanation of why floating point maths is excluded." ContentLicense="CC BY-SA 4.0" />
  <row Id="2495" PostHistoryTypeId="12" PostId="691" RevisionGUID="2a1b293c-5f18-42a8-a9f5-a7a3f3216f7d" CreationDate="2022-03-09T21:37:56.343" UserId="380" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:380,&quot;DisplayName&quot;:&quot;forgetso&quot;}]}" />
  <row Id="2496" PostHistoryTypeId="2" PostId="692" RevisionGUID="2a7033a9-dc3a-4c8a-b10d-1b89ec98ad96" CreationDate="2022-03-09T23:09:34.690" UserId="74" Text="I would like to sign and gossip messages in an offchain service and leverage keys from the keystore used by the SessionKeys such as the Aura/Grandpa/etc. key. Our current strategy requires us to create an independent sr25519 key. Instead, we'd like to use an existing key so we can cross-reference signatures within the authority set.&#xD;&#xA;&#xD;&#xA;What is the proper way to access the keys in this keystore?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2498" PostHistoryTypeId="1" PostId="692" RevisionGUID="2a7033a9-dc3a-4c8a-b10d-1b89ec98ad96" CreationDate="2022-03-09T23:09:34.690" UserId="74" Text="How to access and sign messages with keys from SessionKeys Keystore such as Aura?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2499" PostHistoryTypeId="3" PostId="692" RevisionGUID="2a7033a9-dc3a-4c8a-b10d-1b89ec98ad96" CreationDate="2022-03-09T23:09:34.690" UserId="74" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2502" PostHistoryTypeId="2" PostId="693" RevisionGUID="3b59702e-5ade-4d72-b4e4-4b2127b34049" CreationDate="2022-03-10T04:47:15.540" UserId="74" Text="In order to fetch the keys for a specific `KEY_TYPE` such as `AURA` you just need to use that keystore and pass in the respective KeyType w/ `sr25519 / ecdsa / ed25519`.&#xD;&#xA;```&#xD;&#xA;pub fn sr25519_public_keys(&amp;self) -&gt; Result&lt;Vec&lt;sr25519::Public&gt;, error::Error&gt; {&#xD;&#xA;	let store: SyncCryptoStorePtr = self.0.clone().ok_or_else(|| error::Error::Keystore(&quot;no Keystore&quot;.into()))?;&#xD;&#xA;&#xD;&#xA;	let pk: Vec&lt;sr25519::Public&gt; = SyncCryptoStore::sr25519_public_keys(&amp;*store, AURA)&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|k| sr25519::Public::from(k.clone()))&#xD;&#xA;		.collect();&#xD;&#xA;&#xD;&#xA;	Ok(pk)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2504" PostHistoryTypeId="2" PostId="694" RevisionGUID="587584b6-461c-4f12-8627-460eb230f2e9" CreationDate="2022-03-10T05:11:07.810" UserId="139" Text="This is the definition of `WithdrawReasons`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;bitflags::bitflags! {&#xD;&#xA;	/// Reasons for moving funds out of an account.&#xD;&#xA;	#[derive(Encode, Decode)]&#xD;&#xA;	pub struct WithdrawReasons: u8 {&#xD;&#xA;		/// In order to pay for (system) transaction costs.&#xD;&#xA;		const TRANSACTION_PAYMENT = 0b00000001;&#xD;&#xA;		/// In order to transfer ownership.&#xD;&#xA;		const TRANSFER = 0b00000010;&#xD;&#xA;		/// In order to reserve some funds for a later return or repatriation.&#xD;&#xA;		const RESERVE = 0b00000100;&#xD;&#xA;		/// In order to pay some other (higher-level) fees.&#xD;&#xA;		const FEE = 0b00001000;&#xD;&#xA;		/// In order to tip a validator for transaction inclusion.&#xD;&#xA;		const TIP = 0b00010000;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Note the macro `bitflags!`. &#xD;&#xA;&#xD;&#xA;&gt;The bitflags! macro generates structs that manage a set of flags. The flags should only be defined for integer types, otherwise unexpected type errors may occur at compile time.&#xD;&#xA;&#xD;&#xA;Think of it like switches, which allow you to use operations like `&amp;` or `|` to set values. WithdrawReasons can only be one of these values after you perform some operations to set it. Let's say you locked some funds, you'd want to turn on the RESERVE flag like so and you deducted some fees as well in order to make that transaction, you'd use something like :&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let reasons = WithdrawReasons::RESERVE | WithdrawReasons::FEE;&#xD;&#xA;```&#xD;&#xA;Now reasons hold both flags for RESERVE and FEE, which you can tell by looking at it, or performing an `&amp;` operation, if or not that reason was present.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let fee_deducted : bool = reasons &amp; WithdrawReasons::FEE&#xD;&#xA;assert!(fee_deducted);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you'd like to clear a value say remove FEE from WithdrawReasons, that's easy too&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let clear_fee_deductions = reasons &amp; -WithdrawReasons::FEE&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2506" PostHistoryTypeId="5" PostId="694" RevisionGUID="1223e621-a7b7-4d3d-a3b9-60fc5a10d5fa" CreationDate="2022-03-10T05:34:09.810" UserId="139" Comment="added 7 characters in body" Text="This is the definition of `WithdrawReasons`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;bitflags::bitflags! {&#xD;&#xA;	/// Reasons for moving funds out of an account.&#xD;&#xA;	#[derive(Encode, Decode)]&#xD;&#xA;	pub struct WithdrawReasons: u8 {&#xD;&#xA;		/// In order to pay for (system) transaction costs.&#xD;&#xA;		const TRANSACTION_PAYMENT = 0b00000001;&#xD;&#xA;		/// In order to transfer ownership.&#xD;&#xA;		const TRANSFER = 0b00000010;&#xD;&#xA;		/// In order to reserve some funds for a later return or repatriation.&#xD;&#xA;		const RESERVE = 0b00000100;&#xD;&#xA;		/// In order to pay some other (higher-level) fees.&#xD;&#xA;		const FEE = 0b00001000;&#xD;&#xA;		/// In order to tip a validator for transaction inclusion.&#xD;&#xA;		const TIP = 0b00010000;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Note the macro `bitflags!`. &#xD;&#xA;&#xD;&#xA;&gt;The bitflags! macro generates structs that manage a set of flags. The flags should only be defined for integer types, otherwise unexpected type errors may occur at compile time.&#xD;&#xA;&#xD;&#xA;Think of it like switches, which allow you to use operations like `&amp;` or `|` to get or set values. WithdrawReasons can only be a set of these values after you perform some operations to set it using `|`. Let's say you locked some funds, you'd want to turn on the RESERVE flag like so and you deducted some fees as well in order to make that transaction, you'd use something like :&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let reasons = WithdrawReasons::RESERVE | WithdrawReasons::FEE;&#xD;&#xA;```&#xD;&#xA;Now reasons hold both flags for RESERVE and FEE, which you can tell by looking at it, or performing an `&amp;` operation, if or not that reason was present.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let fee_deducted : bool = reasons &amp; WithdrawReasons::FEE&#xD;&#xA;assert!(fee_deducted);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you'd like to clear a value say remove FEE from WithdrawReasons, that's easy too&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let clear_fee_deductions = reasons &amp; -WithdrawReasons::FEE&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2522" PostHistoryTypeId="5" PostId="681" RevisionGUID="031d5565-67f3-4489-a245-a79c07bc418a" CreationDate="2022-03-10T08:34:51.520" UserId="298" Comment="deleted 11 characters in body" Text="I'm running a rococo style relay chain with other community members. It can take more than 3 hours to upgrade to parathread and then from parathread to parachain. &#xD;&#xA;&#xD;&#xA;Is there a sudo extrinsic i am missing to bypass the onboarding process, where the onboarding time can be reduced? " ContentLicense="CC BY-SA 4.0" />
  <row Id="2523" PostHistoryTypeId="2" PostId="697" RevisionGUID="a569ea51-6e11-4e93-bf78-5e1dfff81795" CreationDate="2022-03-10T08:45:41.660" UserId="85" Text="You can compile polkadot with `--features fast-runtime` and most actions (onboarding, democracy) will require a lot less time." ContentLicense="CC BY-SA 4.0" />
  <row Id="2526" PostHistoryTypeId="2" PostId="698" RevisionGUID="87959b96-292e-40ba-898e-8c697682767e" CreationDate="2022-03-11T03:09:48.143" UserId="129" Text="I was following [this example][1] of ink! upgradable smart contract. After I uploaded the upgradable_contract.contract (Step 4 in the link), I got the following error:&#xD;&#xA;How can I fix it?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/tree/master/examples/upgradeable-contract&#xD;&#xA;  [2]: https://i.stack.imgur.com/AOlwJ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2528" PostHistoryTypeId="1" PostId="698" RevisionGUID="87959b96-292e-40ba-898e-8c697682767e" CreationDate="2022-03-11T03:09:48.143" UserId="129" Text="Extrinsic Failed - Contract code rejected while implementing upgradable contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="2529" PostHistoryTypeId="3" PostId="698" RevisionGUID="87959b96-292e-40ba-898e-8c697682767e" CreationDate="2022-03-11T03:09:48.143" UserId="129" Text="|smart-contract|upgrade|upgradable-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2530" PostHistoryTypeId="2" PostId="699" RevisionGUID="db4c4f19-ad74-4676-b77b-20f5661b7f13" CreationDate="2022-03-11T04:07:06.270" UserId="555" Text="Please try again with a fresh clone. The template has been updated and now uses Substrate's polkadot-v0.9.17 branch, pulling in new updates that should fix the issues above.&#xD;&#xA;Also comment out this line - { use sp_io::hashing::blake2_128 } in /pallets/kitties/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="2532" PostHistoryTypeId="4" PostId="651" RevisionGUID="be4c1267-a786-4154-97e9-a420b871b25d" CreationDate="2022-03-11T05:17:54.853" UserId="167" Comment="The gist of the problem is about election, so I changed it to reflect it. " Text="Substrate validators election failing and connectivy lost" ContentLicense="CC BY-SA 4.0" />
  <row Id="2533" PostHistoryTypeId="24" PostId="651" RevisionGUID="be4c1267-a786-4154-97e9-a420b871b25d" CreationDate="2022-03-11T05:17:54.853" Comment="Proposed by 167 approved by 552 edit id of 76" ContentLicense="CC BY-SA 4.0" />
  <row Id="2534" PostHistoryTypeId="2" PostId="700" RevisionGUID="20b57db8-2789-4ea8-8e54-e12aa8e3255c" CreationDate="2022-03-11T07:45:42.630" UserId="599" Text="`CodeRejected` means that your contract is using some stuff that is not supported by the `contract-pallet`.&#xD;&#xA;&#xD;&#xA;In your case, `seal_delegate_call` is an unstable function at the moment, and it is disabled by default. To enable it you need to build the node with  [`pallet-contracts/unstable-interface`][1] feature. Or you can use `substrate-contracts-node`, it is enabled there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/Cargo.toml#L62" ContentLicense="CC BY-SA 4.0" />
  <row Id="2536" PostHistoryTypeId="2" PostId="701" RevisionGUID="21a1c6fd-9bc7-4efb-8fa6-cbcd867acaf6" CreationDate="2022-03-11T08:44:47.720" UserId="442" Text="I have a map storage, which stores structures. I've just removed a field from the structure, should I write storage migration codes for that? Could substrate work with existing values without a migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2538" PostHistoryTypeId="1" PostId="701" RevisionGUID="21a1c6fd-9bc7-4efb-8fa6-cbcd867acaf6" CreationDate="2022-03-11T08:44:47.720" UserId="442" Text="Should I do storage migration after remove fields from storage struct type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2539" PostHistoryTypeId="3" PostId="701" RevisionGUID="21a1c6fd-9bc7-4efb-8fa6-cbcd867acaf6" CreationDate="2022-03-11T08:44:47.720" UserId="442" Text="|storage|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2540" PostHistoryTypeId="2" PostId="702" RevisionGUID="afcfb4ff-a8f5-4ca7-ad74-e59f2a80283b" CreationDate="2022-03-11T09:10:40.070" UserId="581" Text="I am a curious learner and on my way of understanding the core principles of the Substrate universe + going through the tutorials on substrate.io.&#xD;&#xA;&#xD;&#xA;As far as I understood is: there exists a Core Runtime (chain runtime) and this runtime can be extended with default pallets (aka runtime modules) from FRAME or own developed runtime modules.&#xD;&#xA;&#xD;&#xA;**2 questions** arose when I had a look at this diagram that shows the architectural overview of FRAME: https://docs.substrate.io/v3/runtime/frame/&#xD;&#xA;&#xD;&#xA;1. Are system modules a kind of add ons to Runtime modules (aka Pallets) and CAN be used but it is NOT a must?&#xD;&#xA;&#xD;&#xA;2. If system modules are a kind of 'nice to have', do they change the structure of the Runtime / Runtime modules in any way?&#xD;&#xA;&#xD;&#xA;Thank you in advance and let me know, if more information is required or my request doesn't meet the *StackExchange* principles. &#xD;&#xA;&#xD;&#xA;I appreciate your time and work on that!&#xD;&#xA;&#xD;&#xA;BR&#xD;&#xA;Cindy&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2542" PostHistoryTypeId="1" PostId="702" RevisionGUID="afcfb4ff-a8f5-4ca7-ad74-e59f2a80283b" CreationDate="2022-03-11T09:10:40.070" UserId="581" Text="Basics &gt; Runtime &gt; FRAME &gt; Modules (Runtime, System) / Difference?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2543" PostHistoryTypeId="3" PostId="702" RevisionGUID="afcfb4ff-a8f5-4ca7-ad74-e59f2a80283b" CreationDate="2022-03-11T09:10:40.070" UserId="581" Text="|frame|runtime|basics|systemmodule|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2544" PostHistoryTypeId="2" PostId="703" RevisionGUID="396d24f1-e679-420e-b6c0-273ae6827a39" CreationDate="2022-03-11T09:39:18.527" UserId="581" Text="as a learner and beginner, I have 2 questions about the FRAME Pallets and especially to that overview:&#xD;&#xA;https://docs.substrate.io/v3/runtime/frame/--&gt; Substrate FRAME PALLETS:&#xD;&#xA;&#xD;&#xA;[![Substrate FRAME PALLETS][1]][1] &#xD;&#xA;&#xD;&#xA;The highlighted pallets as Aura, Collective, Timestamp (highlighted pallets in the diagram and linked with the Runtime diagram): &#xD;&#xA;&#xD;&#xA;	1. Are those pallets are necessary for the runtime to work properly? A kind of 'must haves'? &#xD;&#xA;	2. If not: What other core message is this overview supposed to convey? &#xD;&#xA;&#xD;&#xA;Thank you very much in advance.&#xD;&#xA;&#xD;&#xA;Best,&#xD;&#xA;Cindy&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/EGwpi.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2546" PostHistoryTypeId="1" PostId="703" RevisionGUID="396d24f1-e679-420e-b6c0-273ae6827a39" CreationDate="2022-03-11T09:39:18.527" UserId="581" Text="Basics &gt; Runtime &gt; FRAME &gt; Substrate FRAME Pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="2547" PostHistoryTypeId="3" PostId="703" RevisionGUID="396d24f1-e679-420e-b6c0-273ae6827a39" CreationDate="2022-03-11T09:39:18.527" UserId="581" Text="|pallet|frame|runtime|basics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2548" PostHistoryTypeId="2" PostId="704" RevisionGUID="c9d210e5-d83f-4ec3-b407-166d680da80e" CreationDate="2022-03-11T09:42:48.883" UserId="157" Text="One of benchmarked extrinsic of custom pallet requires `Root` sender (or Sudo), uses `pallet_assets` from runtime trait implementation (no coupling here). To verify I'm using `balance()` method to confirm asset is present. One of inputs for that is `AccountId`, so I need to convert `RawOrigin::Root` to `AccountId` somehow. Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="2550" PostHistoryTypeId="1" PostId="704" RevisionGUID="c9d210e5-d83f-4ec3-b407-166d680da80e" CreationDate="2022-03-11T09:42:48.883" UserId="157" Text="Benchmarking: RawOrigin::Root as AccountId" ContentLicense="CC BY-SA 4.0" />
  <row Id="2551" PostHistoryTypeId="3" PostId="704" RevisionGUID="c9d210e5-d83f-4ec3-b407-166d680da80e" CreationDate="2022-03-11T09:42:48.883" UserId="157" Text="|account|root|benchmark|origin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2552" PostHistoryTypeId="2" PostId="705" RevisionGUID="d860998a-ac31-430e-96e6-b9219e13f57e" CreationDate="2022-03-11T11:43:06.310" UserId="351" Text="So first answer 1. &#xD;&#xA;There are consensus pallets and runtime pallets. Aura is a  consensus pallet. Is it important? Yes if you plan to use that consensus  mechanism and No if you don’t plan to use that consensus (There is BABE pallet for consensus also).&#xD;&#xA;&#xD;&#xA;Second question 2. &#xD;&#xA;The message conveyed by that diagram is that in substrate you can pick any pallets you want and configure them onto your runtime. So it doesn’t portray that those are the important pallets. The important pallets are the one being which fit your purpose.  Hope answered your questions " ContentLicense="CC BY-SA 4.0" />
  <row Id="2554" PostHistoryTypeId="2" PostId="706" RevisionGUID="35b34ee2-6325-4f66-b70d-c89bb66d7465" CreationDate="2022-03-11T12:55:37.210" UserId="351" Text="Okey because you are using FRAME framework. frame_system and frame_support pallets are a must because they give you low level types to work on into your custom pallets and also low level functions.&#xD;&#xA;&#xD;&#xA;For example (I hope you know Rust) the return type of a function that is callable to outside world is found in frame_support. Lets go to the low level functions. For example if you want to get a blocknumber currently. That function is inside frame_system. And among other functions and return types. So these low level pallets are very essential. Hope I answered your questions " ContentLicense="CC BY-SA 4.0" />
  <row Id="2556" PostHistoryTypeId="5" PostId="704" RevisionGUID="f21f62e7-f096-480e-b687-dbeb09631c9d" CreationDate="2022-03-11T14:37:45.297" UserId="157" Comment="added 971 characters in body" Text="One of benchmarked extrinsic of custom pallet requires `Root` sender (or Sudo), uses `pallet_assets` from runtime trait implementation (no coupling here). To verify I'm using `balance()` method to confirm asset is present. One of inputs for that is `AccountId`, so I need to convert `RawOrigin::Root` to `AccountId` somehow. Thanks.&#xD;&#xA;&#xD;&#xA;#### Pallet&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;//--- snip ---&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;//--- snip ---&#xD;&#xA;        type AssertCreateUpdateOrigin: EnsureOrigin&lt;&lt;Self as frame_system::Config&gt;::Origin&gt;;&#xD;&#xA;//--- snip ---&#xD;&#xA;    }&#xD;&#xA;//--- snip ---&#xD;&#xA;    #[pallet::call]&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        #[pallet::weight(100_000)]&#xD;&#xA;        pub fn extrinsic_call(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult &#xD;&#xA;        {&#xD;&#xA;            T::AssetCreateUpdateOrigin::ensure_origin(origin)?;&#xD;&#xA;        //--- snip ---&#xD;&#xA;        }&#xD;&#xA;//--- snip ---&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;#### Benchmark&#xD;&#xA;```rust&#xD;&#xA;benchmarks! {&#xD;&#xA;	extrinsic_call {&#xD;&#xA;		let b in 0 .. u8::MAX;&#xD;&#xA;        let account: T::AccountId = RawOrigin::Root.into(); // &lt;&lt;&lt;--- THIS NEEDS TO WORK SOMEHOW &#xD;&#xA;		let id = H160::from_slice(&amp;[bu8; 20]);&#xD;&#xA;	}: _(RawOrigin::Root, id)&#xD;&#xA;	verify {&#xD;&#xA;		assert_eq!(0, T::AssetManager::balance(u128::from_be_bytes([bu8; 16]), &amp;account));&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2557" PostHistoryTypeId="2" PostId="707" RevisionGUID="383997d8-625e-4558-a960-0508a215dcac" CreationDate="2022-03-11T14:54:24.147" UserId="139" Text="So while testing I have about 4 nodes (local) running and if I were to stop them all, and then come back a few minutes later and restart them, with the exact same `--base-path`, I'd get this error : &#xD;&#xA;```&#xD;&#xA;WARN tokio-runtime-worker babe: Error with block built on 0xe8e8..a5ff26f911: ClientImport(&quot;Unexpected epoch change&quot;)    &#xD;&#xA;```&#xD;&#xA;My question is what does this error really indicate, and when does this occur? Is this error common in babe based chains (or is my chain weird)? Does it imply that if all nodes in a substrate blockchain were to go offline, it couldn't be restarted? " ContentLicense="CC BY-SA 4.0" />
  <row Id="2559" PostHistoryTypeId="1" PostId="707" RevisionGUID="383997d8-625e-4558-a960-0508a215dcac" CreationDate="2022-03-11T14:54:24.147" UserId="139" Text="After restarting a chain I get a ClientImport(&quot;Unexpect epoch change&quot;) error. What does this mean in English?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2560" PostHistoryTypeId="3" PostId="707" RevisionGUID="383997d8-625e-4558-a960-0508a215dcac" CreationDate="2022-03-11T14:54:24.147" UserId="139" Text="|substrate-node|consensus|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2566" PostHistoryTypeId="2" PostId="709" RevisionGUID="d31ada39-20e0-4b7d-a0d4-29b34254bad1" CreationDate="2022-03-11T18:37:28.277" UserId="28" Text="This error occurs when you use BABE block production, and stop running the network for an extended period of time.&#xD;&#xA;&#xD;&#xA;Basically, BABE expects that a new block is formed at least once per epoch, which is measured using the computer clock.&#xD;&#xA;&#xD;&#xA;When you turn off the whole network for let's say an hour, and then you start the network again, the next block producer will try to produce a block with the current computer clock time, but this will be far in the future for when the next block is expected by BABE.&#xD;&#xA;&#xD;&#xA;This is not something that is currently recoverable, and thus the best solution is to restart your network, and ensure that this kind of offline-ness does not occur.&#xD;&#xA;&#xD;&#xA;If you do expect to go offline a lot, you should use AURA." ContentLicense="CC BY-SA 4.0" />
  <row Id="2568" PostHistoryTypeId="2" PostId="710" RevisionGUID="5b94d4e6-b58f-43fc-8649-5e804203ddaa" CreationDate="2022-03-11T18:48:12.807" UserId="28" Text="When writing benchmarks which use `EnsureOrigin`, you should be using the specific helper function `successful_origin` which is meant for exactly this scenario:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Some sort of check on the origin is performed by this object.&#xD;&#xA;pub trait EnsureOrigin&lt;OuterOrigin&gt; {&#xD;&#xA;	/// A return type.&#xD;&#xA;	type Success;&#xD;&#xA;&#xD;&#xA;	/// Perform the origin check.&#xD;&#xA;	fn ensure_origin(o: OuterOrigin) -&gt; Result&lt;Self::Success, BadOrigin&gt; {&#xD;&#xA;		Self::try_origin(o).map_err(|_| BadOrigin)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	/// Perform the origin check.&#xD;&#xA;	fn try_origin(o: OuterOrigin) -&gt; Result&lt;Self::Success, OuterOrigin&gt;;&#xD;&#xA;&#xD;&#xA;	/// Returns an outer origin capable of passing `try_origin` check.&#xD;&#xA;	///&#xD;&#xA;	/// ** Should be used for benchmarking only!!! **&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	fn successful_origin() -&gt; OuterOrigin;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this case, you do not need to assume how a user has implemented the `EnsureOrigin` trait, since they will be required to provide an answer to how to pass this check.&#xD;&#xA;&#xD;&#xA;Now, one implementation of this COULD be `RawOrigin::Root`, but then you DEFINITELY cannot assume that you can create an `AccountId` from this.&#xD;&#xA;&#xD;&#xA;It says to me your logic is fundamentally flawed, since an `Origin != Account`. Only one of the possible origins, specifically `Origin::Signed` can be resolved into an `AccountId`." ContentLicense="CC BY-SA 4.0" />
  <row Id="2570" PostHistoryTypeId="2" PostId="711" RevisionGUID="d408caec-f527-4094-9ca9-70a4f6aeca5e" CreationDate="2022-03-11T19:02:55.517" UserId="460" Text="A very basic question. When is Assets pallet useful &amp; when is Balances pallet used? Is Assets pallet similar to an ERC 20 token but implementation at runtime level?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2572" PostHistoryTypeId="1" PostId="711" RevisionGUID="d408caec-f527-4094-9ca9-70a4f6aeca5e" CreationDate="2022-03-11T19:02:55.517" UserId="460" Text="Pallets - Assets &amp; Balances" ContentLicense="CC BY-SA 4.0" />
  <row Id="2573" PostHistoryTypeId="3" PostId="711" RevisionGUID="d408caec-f527-4094-9ca9-70a4f6aeca5e" CreationDate="2022-03-11T19:02:55.517" UserId="460" Text="|pallet|balances|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2574" PostHistoryTypeId="2" PostId="712" RevisionGUID="96d580df-a55f-4acd-886d-c7a96e6b6195" CreationDate="2022-03-11T19:24:37.470" UserId="29" Text="The Assets pallet provides basic functionality for working with fungible assets such as creating a new asset (minting), transferring, freezing, burning, etc.&#xD;&#xA;&#xD;&#xA;More info:&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_assets/index.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The Balances pallet provides functionality for handling accounts and balances.&#xD;&#xA;&#xD;&#xA;Such as:&#xD;&#xA;&#xD;&#xA;- Getting and setting free balances.&#xD;&#xA;- Retrieving total, reserved and unreserved balances.&#xD;&#xA;- Repatriating a reserved balance to a beneficiary account that exists.&#xD;&#xA;- Transferring a balance between accounts (when not reserved).&#xD;&#xA;- Slashing an account balance.&#xD;&#xA;- Account creation and removal.&#xD;&#xA;- Managing total issuance.&#xD;&#xA;- Setting and managing locks.&#xD;&#xA;&#xD;&#xA;More info:&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_balances/index.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2576" PostHistoryTypeId="5" PostId="711" RevisionGUID="1402088c-69b5-46e9-a63b-344f35ae07ef" CreationDate="2022-03-11T19:33:10.243" UserId="29" Comment="deleted 23 characters in body; edited title" Text="When is Assets pallet useful &amp; when is Balances pallet used? Is Assets pallet similar to an ERC 20 token but implementation at runtime level?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2577" PostHistoryTypeId="4" PostId="711" RevisionGUID="1402088c-69b5-46e9-a63b-344f35ae07ef" CreationDate="2022-03-11T19:33:10.243" UserId="29" Comment="deleted 23 characters in body; edited title" Text="When should I use Balances Pallet and when should I use Assets Pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2578" PostHistoryTypeId="2" PostId="713" RevisionGUID="e8e8a490-3d31-426b-acb5-a1c46ff07d9b" CreationDate="2022-03-11T19:38:30.710" UserId="83" Text="&gt; what does this error really indicate&#xD;&#xA;&#xD;&#xA;It means that an unexpected epoch change transition occurred that BABE found and rejected when it was validating the epoch change signal transitions of a block it was trying to import, and indicates that your blockchain is bricked and unable to finalize further blocks.&#xD;&#xA;&#xD;&#xA;*&quot;One invariant of BABE is that you have to have at least one block every epoch_duration slots&quot;* - [Robert Habermeier][1]&#xD;&#xA;&#xD;&#xA;&gt; when does this occur?&#xD;&#xA;&#xD;&#xA;This scans each imported block for epoch change signals. The signals are tracked in a tree (of all forks), and the import logic validates all epoch change transitions, &#xD;&#xA;&#xD;&#xA;It happens when you are using the BABE consensus mechanism and your validator set goes offline for more than one epoch. For example in this may occur if many validators ran out of server storage space at the same time.&#xD;&#xA;&#xD;&#xA;It is caused in the `import_block` block-import handler function of the BABE consensus section of the Substrate source code [here][2] and documented [here][3]&#xD;&#xA;&#xD;&#xA;&gt; Is this error common in BABE based chains (or is my chain weird)?&#xD;&#xA;&#xD;&#xA;Yes, this error is common in chains that are using BABE. Here are a few examples:&#xD;&#xA;&#xD;&#xA;* [https://github.com/paritytech/substrate/issues/4464][1]&#xD;&#xA;* [https://github.com/paritytech/subport/issues/218][4]&#xD;&#xA;* [https://github.com/DataHighway-DHX/node/issues/249][5]&#xD;&#xA;&#xD;&#xA;&gt; Does it imply that if all nodes in a substrate blockchain were to go offline, it couldn't be restarted?&#xD;&#xA;&#xD;&#xA;It may be restarting using the &quot;hard spoon&quot;, &quot;time warp&quot;, or &quot;purge chain&quot; approach, as documented [here][6] and answered [here][7].&#xD;&#xA;&#xD;&#xA;If you choose the &quot;hard spoon&quot; approach then it may be advisable to switch to using Aura for block production instead of Babe since it does not experience this same issue of becoming bricked when the validator set goes offline for more than one epoch, and it also does not cause delays in block production. Different ways to get a snapshot of the on-chain storage state of an existing blockchain, such as all account balances that are to be included in the genesis of the new blockchain is described [here][8].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/4464&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/client/consensus/babe/src/lib.rs#L1447&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_consensus_babe/struct.BabeBlockImport.html#method.import_block&#xD;&#xA;  [4]: https://github.com/paritytech/subport/issues/218&#xD;&#xA;  [5]: https://github.com/DataHighway-DHX/node/issues/249&#xD;&#xA;  [6]: https://github.com/DataHighway-DHX/documentation/blob/master/docs/tutorials/tutorials-nodes-hardspoon.md&#xD;&#xA;  [7]: https://substrate.stackexchange.com/a/175/83&#xD;&#xA;  [8]: https://substrate.stackexchange.com/questions/180/how-can-we-get-a-snapshot-of-all-balances-at-a-certain-block/182#182" ContentLicense="CC BY-SA 4.0" />
  <row Id="2580" PostHistoryTypeId="5" PostId="712" RevisionGUID="cc0a5af3-e0ab-4088-8d13-e28215854e36" CreationDate="2022-03-11T19:49:56.123" UserId="29" Comment="revised answer" Text="The balances pallet is designed to be used as the blockchain's underlying currency. It is extremely optimized for balance movements and transfers, which ensures that the fees that users pay to actually move balances are very low.&#xD;&#xA;&#xD;&#xA;Additionally, balances pallet has extra layers of abstractions, like Reserved Balances and Locked Balances. And these enable balances to be really &quot;useful&quot; at the runtime level. For example, we lock balances for democracy and staking, allowing the same balance to be used twice across two services. On the other hand, we use reserved balances for a lot of things like storage deposits making sure that this kind of balance CANNOT be used twice.&#xD;&#xA;&#xD;&#xA;The assets pallet is just a really simple way of representing some ERC-20 like token, the balances pallet is much more deeply designed&#xD;&#xA;for all of the things you would want to do with a blockchain currency&#xD;&#xA;the only main advantage of assets pallet, is that is supports multiple assets being created in a single pallet, whereas balances pallet is just a single token so in this case, you can think of the assets pallet as an ERC-20 like factory.&#xD;&#xA;&#xD;&#xA;So in essence, you can create your underlying currency using the **balances** pallet and if you need additional currencies you can leverage the **assets** pallet.&#xD;&#xA;&#xD;&#xA;An asset created using the assets pallet is similar to ERC-20 token standard.&#xD;&#xA;&#xD;&#xA;More info:&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_assets/index.html&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_balances/index.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2581" PostHistoryTypeId="5" PostId="712" RevisionGUID="729b7e95-45aa-47b6-a7be-e646ea38f02a" CreationDate="2022-03-11T19:55:25.317" UserId="29" Comment="edited body" Text="The balances pallet is designed to be used as the blockchain's underlying currency. It is extremely optimized for balance movements and transfers, which ensures that the fees that users pay to actually move balances are very low.&#xD;&#xA;&#xD;&#xA;Additionally, balances pallet has extra layers of abstractions, like Reserved Balances and Locked Balances. And these enable balances to be really &quot;useful&quot; at the runtime level. For example, we lock balances for democracy and staking, allowing the same balance to be used twice across two services. On the other hand, we use reserved balances for a lot of things like storage deposits making sure that this kind of balance CANNOT be used twice.&#xD;&#xA;&#xD;&#xA;The assets pallet is just a really simple way of representing some ERC-20 like token, the balances pallet is much more deeply designed&#xD;&#xA;for all of the things you would want to do with a blockchain currency&#xD;&#xA;the only main advantage of assets pallet, is that it supports multiple assets being created in a single pallet, whereas balances pallet is just a single token so in this case, you can think of the assets pallet as an ERC-20 like factory.&#xD;&#xA;&#xD;&#xA;So in essence, you can create your underlying currency using the **balances** pallet and if you need additional currencies you can leverage the **assets** pallet.&#xD;&#xA;&#xD;&#xA;An asset created using the assets pallet is similar to ERC-20 token standard.&#xD;&#xA;&#xD;&#xA;More info:&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_assets/index.html&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_balances/index.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2582" PostHistoryTypeId="5" PostId="712" RevisionGUID="8d01691a-a350-4b87-a7fb-d0a5cbb6b02f" CreationDate="2022-03-11T20:02:54.977" UserId="29" Comment="update links" Text="The balances pallet is designed to be used as the blockchain's underlying currency. It is extremely optimized for balance movements and transfers, which ensures that the fees that users pay to actually move balances are very low.&#xD;&#xA;&#xD;&#xA;Additionally, balances pallet has extra layers of abstractions beyond just the core [currency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.Currency.html), like [Reserved](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.ReservableCurrency.html) Balances and [Locked](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.LockableCurrency.html) Balances. You can see a full list [here](https://paritytech.github.io/substrate/latest/pallet_balances/index.html#implementations-1). And these enable balances to be really &quot;useful&quot; at the runtime level. For example, we lock balances for democracy and staking, allowing the same balance to be used twice across two services. On the other hand, we use reserved balances for a lot of things like storage deposits making sure that this kind of balance CANNOT be used twice.&#xD;&#xA;&#xD;&#xA;The assets pallet is just a really simple way of representing some ERC-20 like token, the balances pallet is much more deeply designed&#xD;&#xA;for all of the things you would want to do with a blockchain currency&#xD;&#xA;the only main advantage of assets pallet, is that it supports multiple assets being created in a single pallet, whereas balances pallet is just a single token so in this case, you can think of the assets pallet as an ERC-20 like factory.&#xD;&#xA;&#xD;&#xA;So in essence, you can create your underlying currency using the **balances** pallet and if you need additional currencies you can leverage the **assets** pallet.&#xD;&#xA;&#xD;&#xA;An asset created using the assets pallet is similar to ERC-20 token standard.&#xD;&#xA;&#xD;&#xA;More info:&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_assets/index.html&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_balances/index.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2583" PostHistoryTypeId="5" PostId="713" RevisionGUID="13ec6cc2-1ec8-4953-9e0d-08d707a0faaf" CreationDate="2022-03-11T20:06:29.023" UserId="83" Comment="fix" Text="&gt; what does this error really indicate&#xD;&#xA;&#xD;&#xA;It means that an unexpected epoch change transition occurred that BABE found and rejected when it was validating the epoch change signal transitions of a block it was trying to import, and indicates that your blockchain is bricked and unable to finalize further blocks.&#xD;&#xA;&#xD;&#xA;*&quot;One invariant of BABE is that you have to have at least one block every epoch_duration slots&quot;* - [Robert Habermeier][1]&#xD;&#xA;&#xD;&#xA;&gt; when does this occur?&#xD;&#xA;&#xD;&#xA;It happens when you are using the BABE consensus mechanism and your validator set goes offline for more than one epoch. For example in this may occur if many validators ran out of server storage space at the same time.&#xD;&#xA;&#xD;&#xA;It is caused in the `import_block` block-import handler function of the BABE consensus section of the Substrate source code [here][2] and documented [here][3]&#xD;&#xA;&#xD;&#xA;&gt; Is this error common in BABE based chains (or is my chain weird)?&#xD;&#xA;&#xD;&#xA;Yes, this error is common in chains that are using BABE. Here are a few examples:&#xD;&#xA;&#xD;&#xA;* [https://github.com/paritytech/substrate/issues/4464][1]&#xD;&#xA;* [https://github.com/paritytech/subport/issues/218][4]&#xD;&#xA;* [https://github.com/DataHighway-DHX/node/issues/249][5]&#xD;&#xA;&#xD;&#xA;&gt; Does it imply that if all nodes in a substrate blockchain were to go offline, it couldn't be restarted?&#xD;&#xA;&#xD;&#xA;It may be restarting using the &quot;hard spoon&quot;, &quot;time warp&quot;, or &quot;purge chain&quot; approach, as documented [here][6] and answered [here][7].&#xD;&#xA;&#xD;&#xA;If you choose the &quot;hard spoon&quot; approach then it may be advisable to switch to using Aura for block production instead of Babe since it does not experience this same issue of becoming bricked when the validator set goes offline for more than one epoch, and it also does not cause delays in block production. Different ways to get a snapshot of the on-chain storage state of an existing blockchain, such as all account balances that are to be included in the genesis of the new blockchain is described [here][8].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/4464&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/client/consensus/babe/src/lib.rs#L1447&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_consensus_babe/struct.BabeBlockImport.html#method.import_block&#xD;&#xA;  [4]: https://github.com/paritytech/subport/issues/218&#xD;&#xA;  [5]: https://github.com/DataHighway-DHX/node/issues/249&#xD;&#xA;  [6]: https://github.com/DataHighway-DHX/documentation/blob/master/docs/tutorials/tutorials-nodes-hardspoon.md&#xD;&#xA;  [7]: https://substrate.stackexchange.com/a/175/83&#xD;&#xA;  [8]: https://substrate.stackexchange.com/questions/180/how-can-we-get-a-snapshot-of-all-balances-at-a-certain-block/182#182" ContentLicense="CC BY-SA 4.0" />
  <row Id="2584" PostHistoryTypeId="5" PostId="712" RevisionGUID="90bcb0a2-f9fa-4644-89a9-b26bbaaac040" CreationDate="2022-03-11T20:09:12.620" UserId="29" Comment="update links" Text="The [balances pallet](https://github.com/paritytech/substrate/tree/master/frame/balances) is designed to be used as the blockchain's underlying currency. It is extremely optimized for balance movements and transfers, which ensures that the fees that users pay to actually move balances are very low.&#xD;&#xA;&#xD;&#xA;Additionally, balances pallet has extra layers of abstractions beyond just the core [currency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.Currency.html), like [Reserved](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.ReservableCurrency.html) Balances and [Locked](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.LockableCurrency.html) Balances. You can see a full list [here](https://paritytech.github.io/substrate/latest/pallet_balances/index.html#implementations-1). And these enable balances to be really &quot;useful&quot; at the runtime level. For example, we lock balances for democracy and staking, allowing the same balance to be used twice across two services. On the other hand, we use reserved balances for a lot of things like storage deposits making sure that this kind of balance CANNOT be used twice.&#xD;&#xA;&#xD;&#xA;The [assets pallet](https://github.com/paritytech/substrate/tree/master/frame/assets) is just a really simple way of representing some ERC-20 like token, the balances pallet is much more deeply designed&#xD;&#xA;for all of the things you would want to do with a blockchain currency&#xD;&#xA;the only main advantage of assets pallet, is that it supports multiple assets being created in a single pallet, whereas balances pallet is just a single token so in this case, you can think of the assets pallet as an ERC-20 like factory.&#xD;&#xA;&#xD;&#xA;So in essence, you can create your underlying currency using the **balances** pallet and if you need additional currencies you can leverage the **assets** pallet.&#xD;&#xA;&#xD;&#xA;An asset created using the assets pallet is similar to ERC-20 token standard.&#xD;&#xA;&#xD;&#xA;More info:&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_assets/index.html&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_balances/index.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2585" PostHistoryTypeId="2" PostId="714" RevisionGUID="d09c6bb3-a76b-42c7-bb0b-9bebe7f04399" CreationDate="2022-03-11T20:30:24.180" UserId="316" Text="I tried deployed two ink-compatible solidity smart contract using solang as the compiler.&#xD;&#xA;When trying to play around cross contract calls, I've stumbled upon the below failure:&#xD;&#xA;&#xD;&#xA;Prerequisite:&#xD;&#xA;1. compile one solidity smart contract using solang: get abi bundle Flip.contract &#xD;&#xA;2. compile another solidity smart contract Inc that takes another smart contract as constructor input&#xD;&#xA;https://github.com/hyperledger-labs/solang/blob/main/integration/substrate/issue666.sol &#xD;&#xA;&#xD;&#xA;Route1, using polkadot.js/app:&#xD;&#xA;1. upload smart contract Flip.contract using the contacts tab.&#xD;&#xA;2. upload Inc.contract and take the Flip account_address as constructor input.&#xD;&#xA;... salt value is auto generated by polkadot.js app&#xD;&#xA;3. call the superFlip method on Inc contract to see if it can call external contract&#xD;&#xA;Results: ContractTrapped&#xD;&#xA;&#xD;&#xA;Route2, suing subxt to construct transaction ourself:&#xD;&#xA;1. deploy Flip.contract, call api.tx().contracts.instantiate_with_code(... same params as route1)&#xD;&#xA;2. deploy Inc.contract, call api.tx().contracts.instantiate_with_code(... same params as route1)&#xD;&#xA;... both steps have the same input data/gas_limit value as route1, we input salt value using account.nonce value&#xD;&#xA;4. call the superFlip method on Inc contract to see if it can call external contract&#xD;&#xA;Results: ExtrinsicSuccess&#xD;&#xA;&#xD;&#xA;Need some help for this, and specifically what should be salt in this scenario. Thx." ContentLicense="CC BY-SA 4.0" />
  <row Id="2587" PostHistoryTypeId="1" PostId="714" RevisionGUID="d09c6bb3-a76b-42c7-bb0b-9bebe7f04399" CreationDate="2022-03-11T20:30:24.180" UserId="316" Text="cross contract call failure when using different salt to instantiate contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="2588" PostHistoryTypeId="3" PostId="714" RevisionGUID="d09c6bb3-a76b-42c7-bb0b-9bebe7f04399" CreationDate="2022-03-11T20:30:24.180" UserId="316" Text="|smart-contract|ink|solang|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2589" PostHistoryTypeId="5" PostId="712" RevisionGUID="3e7b6d3f-f828-4084-83eb-f0ed491d11ed" CreationDate="2022-03-11T21:04:09.643" UserId="29" Comment="deleted 2 characters in body" Text="The [balances pallet](https://github.com/paritytech/substrate/tree/master/frame/balances) is designed to be used as the blockchain's underlying currency. It is extremely optimized for balance movements and transfers, which ensures that the fees that users pay to actually move balances are very low.&#xD;&#xA;&#xD;&#xA;Additionally, balances pallet has extra layers of abstractions beyond just the core [currency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.Currency.html), like [Reserved](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.ReservableCurrency.html) Balances and [Locked](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.LockableCurrency.html) Balances. You can see a full list of implementations [here](https://paritytech.github.io/substrate/latest/pallet_balances/index.html#implementations-1). And these enable balances to be really &quot;useful&quot; at the runtime level. For example, we lock balances for democracy and staking, allowing the same balance to be used twice across two services. On the other hand, we use reserved balances for a lot of things like storage deposits making sure that this kind of balance CANNOT be used twice.&#xD;&#xA;&#xD;&#xA;The [assets pallet](https://github.com/paritytech/substrate/tree/master/frame/assets) is just a really simple way of representing some ERC-20 like token, the balances pallet is much more deeply designed&#xD;&#xA;for all of the things you would want to do with a blockchain currency&#xD;&#xA;the only main advantage of assets pallet is that it supports multiple assets being created in a single pallet whereas balances pallet is just a single token so in this case, you can think of the assets pallet as an ERC-20 like factory.&#xD;&#xA;&#xD;&#xA;So in essence, you can create your underlying currency using the **balances** pallet and if you need additional currencies you can leverage the **assets** pallet.&#xD;&#xA;&#xD;&#xA;An asset created using the assets pallet is similar to ERC-20 token standard.&#xD;&#xA;&#xD;&#xA;More info:&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_assets/index.html&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_balances/index.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2590" PostHistoryTypeId="5" PostId="712" RevisionGUID="433679c8-ce1b-4e0e-a70c-15fd8b36316a" CreationDate="2022-03-11T21:24:56.720" UserId="29" Comment="deleted 2 characters in body" Text="The [balances pallet](https://github.com/paritytech/substrate/tree/master/frame/balances) is designed to be used as the blockchain's underlying currency. It is extremely optimized for balance movements and transfers, which ensures that the fees that users pay to actually move balances are very low.&#xD;&#xA;&#xD;&#xA;There are two ways of storing balances when using the balances pallet. One way is to store the balance in the [pallet itself](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L523). The other, more common way is to store the balance in [frame system account](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L214), defined [here](https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L746) - which is nice because the balance is then stored on the frame system level.&#xD;&#xA;&#xD;&#xA;Additionally, the balances pallet has extra layers of abstractions beyond just [Currency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.Currency.html), like [ReservableCurrency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.ReservableCurrency.html) and [LockableCurrency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.LockableCurrency.html). You can see a full list of implementations [here](https://paritytech.github.io/substrate/latest/pallet_balances/index.html#implementations-1). And these enable balances to be really &quot;useful&quot; at the runtime level. For example, we lock balances for democracy and staking, allowing the same balance to be used twice across two services. On the other hand, we use reserved balances for a lot of things like storage deposits making sure that this kind of balance CANNOT be used twice.&#xD;&#xA;&#xD;&#xA;The [assets pallet](https://github.com/paritytech/substrate/tree/master/frame/assets) is just a really simple way of representing some ERC-20 like token, the balances pallet is much more deeply designed&#xD;&#xA;for all of the things you would want to do with a blockchain currency&#xD;&#xA;the only main advantage of assets pallet is that it supports multiple assets being created in a single pallet whereas balances pallet is just a single token so in this case, you can think of the assets pallet as an ERC-20 like factory.&#xD;&#xA;&#xD;&#xA;So in essence, you can create your underlying currency using the **balances** pallet and if you need additional currencies you can leverage the **assets** pallet.&#xD;&#xA;&#xD;&#xA;An asset created using the assets pallet is similar to ERC-20 token standard.&#xD;&#xA;&#xD;&#xA;More info:&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_assets/index.html&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_balances/index.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2591" PostHistoryTypeId="5" PostId="712" RevisionGUID="86efe5f3-8f6b-4b95-8810-25bdd95d6029" CreationDate="2022-03-11T21:30:38.117" UserId="29" Comment="deleted 2 characters in body" Text="The [balances pallet](https://github.com/paritytech/substrate/tree/master/frame/balances) is designed to be used as the blockchain's underlying currency. It is extremely optimized for balance movements and transfers, which ensures that the fees that users pay to actually move balances are very low.&#xD;&#xA;&#xD;&#xA;There are two ways of storing balances when using the balances pallet. One way is to store the balance in the [pallet itself](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L523). The other, more common way is to store the balance in Frame System's [AccountData](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L214), specifically in Frame System's [AccountInfo](https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L746) - which is nice because the balance is then stored on the Frame System level.&#xD;&#xA;&#xD;&#xA;Additionally, the balances pallet has extra layers of abstractions beyond just [Currency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.Currency.html), like [ReservableCurrency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.ReservableCurrency.html) and [LockableCurrency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.LockableCurrency.html). You can see a full list of implementations [here](https://paritytech.github.io/substrate/latest/pallet_balances/index.html#implementations-1). And these abstractions combined with storing the balance on the Frame System level, enables balances to be really &quot;useful&quot; at the runtime level. For example, we **lock** balances for democracy and staking, allowing the same balance to be used twice across two services. On the other hand, we use **reserved** balances for a lot of things like storage deposits making sure that this kind of balance CANNOT be used twice.&#xD;&#xA;&#xD;&#xA;The [assets pallet](https://github.com/paritytech/substrate/tree/master/frame/assets) is just a really simple way of representing some ERC-20 like token, the balances pallet is much more deeply designed&#xD;&#xA;for all of the things you would want to do with a blockchain currency&#xD;&#xA;the only main advantage of assets pallet is that it supports multiple assets being created in a single pallet whereas balances pallet is just a single token so in this case, you can think of the assets pallet as an ERC-20 like factory.&#xD;&#xA;&#xD;&#xA;So in essence, you can create your underlying native currency using the **balances** pallet and if you need additional currencies you can leverage the **assets** pallet.&#xD;&#xA;&#xD;&#xA;An asset created using the assets pallet is similar to ERC-20 token standard.&#xD;&#xA;&#xD;&#xA;More info:&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_assets/index.html&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_balances/index.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2592" PostHistoryTypeId="5" PostId="712" RevisionGUID="d4d178a9-6696-4863-827b-052e3ac12d99" CreationDate="2022-03-11T21:36:17.853" UserId="29" Comment="deleted 81 characters in body" Text="The [balances pallet](https://github.com/paritytech/substrate/tree/master/frame/balances) is designed to be used as the blockchain's underlying currency. It is extremely optimized for balance movements and transfers, which ensures that the fees that users pay to actually move balances are very low.&#xD;&#xA;&#xD;&#xA;There are two ways of storing balances when using the balances pallet. One way is to store the balance in the [pallet itself](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L523). The other, more common way is to store the balance in Frame System's [AccountData](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L214), specifically in Frame System's [AccountInfo](https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L746) - which is nice because the balance is then stored on the Frame System level.&#xD;&#xA;&#xD;&#xA;Additionally, the balances pallet has extra layers of abstractions beyond just [Currency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.Currency.html), like [ReservableCurrency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.ReservableCurrency.html) and [LockableCurrency](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/currency/trait.LockableCurrency.html). You can see a full list of implementations [here](https://paritytech.github.io/substrate/latest/pallet_balances/index.html#implementations-1). And these abstractions combined with storing the balance on the Frame System level, enables balances to be really &quot;useful&quot; at the runtime level. For example, we **lock** balances for democracy and staking, allowing the same balance to be used twice across two services. On the other hand, we use **reserved** balances for a lot of things like storage deposits making sure that this kind of balance CANNOT be used twice.&#xD;&#xA;&#xD;&#xA;The [assets pallet](https://github.com/paritytech/substrate/tree/master/frame/assets) is just a really simple way of representing some ERC-20 like token, the balances pallet is much more deeply designed&#xD;&#xA;for all of the things you would want to do with a blockchain currency&#xD;&#xA;the only main advantage of assets pallet is that it supports multiple assets being created in a single pallet whereas balances pallet is just a single token so in this case, you can think of the assets pallet as an ERC-20 like factory.&#xD;&#xA;&#xD;&#xA;So in essence, you can create your underlying native currency using the **balances** pallet and if you need additional currencies you can leverage the **assets** pallet.&#xD;&#xA;&#xD;&#xA;More info:&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_assets/index.html&#xD;&#xA;- https://paritytech.github.io/substrate/latest/pallet_balances/index.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2593" PostHistoryTypeId="2" PostId="715" RevisionGUID="3a2fcc0e-3462-45ec-a1b7-dec2f2564f62" CreationDate="2022-03-11T23:31:08.207" UserId="575" Text="The system module is essential for your pallet, which is why it's usually bound to the `Config` trait of pallets (unless you want to re-write all the needed types like `BlockNumber`, `AccountId` etc, which is counter-productive). It contains all the core types that most runtimes will be using." ContentLicense="CC BY-SA 4.0" />
  <row Id="2595" PostHistoryTypeId="2" PostId="716" RevisionGUID="9307abdb-8144-444c-ad1c-cedb0d9babcd" CreationDate="2022-03-12T01:58:01.037" UserId="104" Text="Yes, you should.&#xD;&#xA;&#xD;&#xA;The key thing to know is that you already have some encoded bytes of your struct in storage, and whenever a storage read operation is done on your map, the pallet needs to know how to decode the stored bytes back into a struct properly.&#xD;&#xA;&#xD;&#xA;If you do not create a migration for your storage, then what would happen is that your storage read operations will fail, because the codec finds out that the encoded bytes do not decode back to your expected struct type." ContentLicense="CC BY-SA 4.0" />
  <row Id="2597" PostHistoryTypeId="2" PostId="717" RevisionGUID="c9154a80-52b9-4f17-b3e8-080014c6f2fe" CreationDate="2022-03-13T06:25:47.123" UserId="555" Text="I'm new to substrate and follow this tutorial: https://docs.substrate.io/tutorials/v3/kitties/pt1/.&#xD;&#xA;I'm facing problem in this line : **we'll need to import serde. Add this to your pallet's Cargo.toml file, using the matching version as Substrate upstream.**&#xD;&#xA;how to import serde and match it to the substrate upstream ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2599" PostHistoryTypeId="1" PostId="717" RevisionGUID="c9154a80-52b9-4f17-b3e8-080014c6f2fe" CreationDate="2022-03-13T06:25:47.123" UserId="555" Text="Build the Substrate Kitties Chain Tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="2600" PostHistoryTypeId="3" PostId="717" RevisionGUID="c9154a80-52b9-4f17-b3e8-080014c6f2fe" CreationDate="2022-03-13T06:25:47.123" UserId="555" Text="|substrate-node|substrate-node-template|blockchain|kitties|substrate-kitties-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2601" PostHistoryTypeId="2" PostId="718" RevisionGUID="b71b44ab-5586-4f60-875b-a7952febd544" CreationDate="2022-03-13T08:27:14.887" UserId="554" Text="While building the Substrate Kitties Chain using the tutorial: [https://docs.substrate.io/tutorials/v3/kitties/pt1/][1]&#xD;&#xA;&#xD;&#xA;I got the error like :&#xD;&#xA;&lt;code&gt;&#xD;&#xA;PS C:\Users\msi\kitties-tutorial&gt; cargo build --release&#xD;&#xA;warning: C:\Users\msi\kitties-tutorial\pallets\kitties\Cargo.toml: unused manifest key: dependencies.serde.feature&#xD;&#xA;warning: Git command failed with status: exit code: 128&#xD;&#xA;warning: Could not find `.git/HEAD` searching from `C:\Users\msi\kitties-tutorial\node` upwards!&#xD;&#xA;   Compiling node-kitties-runtime v4.0.0-dev (C:\Users\msi\kitties-tutorial\runtime)&#xD;&#xA;   Compiling pallet-kitties v4.0.0-dev (C:\Users\msi\kitties-tutorial\pallets\kitties)&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `sp_io`                                                                                                             &#xD;&#xA; --&gt; pallets\kitties\src\lib.rs:4:5&#xD;&#xA;  |&#xD;&#xA;4 | use sp_io::hashing::blake2_128;&#xD;&#xA;  |     ^^^^^ use of undeclared crate or module `sp_io`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `blake2_128` in this scope                                                                                                                             &#xD;&#xA;   --&gt; pallets\kitties\src\lib.rs:135:26&#xD;&#xA;    |&#xD;&#xA;135 |             payload.using_encoded(blake2_128)&#xD;&#xA;    |                                   ^^^^^^^^^^ help: a unit struct with a similar name exists: `Blake2_128`&#xD;&#xA;    |&#xD;&#xA;   ::: C:\Users\msi\.cargo\git\checkouts\substrate-7e08433d4c370a21\22d40c7\frame\support\src\hash.rs:143:1&#xD;&#xA;    |&#xD;&#xA;143 | pub struct Blake2_128;&#xD;&#xA;    | ---------------------- similarly named unit struct `Blake2_128` defined here&#xD;&#xA;&#xD;&#xA;warning: unused import: `scale_info::TypeInfo`&#xD;&#xA; --&gt; pallets\kitties\src\lib.rs:2:5&#xD;&#xA;  |&#xD;&#xA;2 | use scale_info::TypeInfo;&#xD;&#xA;  |     ^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  |&#xD;&#xA;  = note: `#[warn(unused_imports)]` on by default&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have added sp-io crates in pallets\kitties\cargo.toml in [dev-dependincies] as&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&#xD;&#xA;sp-io = { default-features = false, version = &quot;5.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.17&quot; }&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;and in [&quot;std&quot;] as &#xD;&#xA;&lt;code&gt;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking/std&quot;,&#xD;&#xA;	&quot;sp-io/std&quot;,&#xD;&#xA;]&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/kitties/pt1/" ContentLicense="CC BY-SA 4.0" />
  <row Id="2603" PostHistoryTypeId="1" PostId="718" RevisionGUID="b71b44ab-5586-4f60-875b-a7952febd544" CreationDate="2022-03-13T08:27:14.887" UserId="554" Text="Failed to resolve: use of undeclared crate or module `sp_io` in Substrate Kitties Chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="2604" PostHistoryTypeId="3" PostId="718" RevisionGUID="b71b44ab-5586-4f60-875b-a7952febd544" CreationDate="2022-03-13T08:27:14.887" UserId="554" Text="|kitties|substrate-kitties-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2605" PostHistoryTypeId="2" PostId="719" RevisionGUID="56383444-4f85-4cf9-bca5-5e9957511818" CreationDate="2022-03-13T09:09:14.033" UserId="515" Text="I'm trying to use pallet_timestamp on function run_to_block when testing PalletA. Here is my code&#xD;&#xA;```&#xD;&#xA;pub fn run_to_block(n: u64) {&#xD;&#xA;	while System::block_number() &lt; n {&#xD;&#xA;		if System::block_number() &gt; 1 {&#xD;&#xA;			PalletA::on_finalize(System::block_number());&#xD;&#xA;			System::on_finalize(System::block_number());&#xD;&#xA;		}&#xD;&#xA;		System::set_block_number(System::block_number() + 1);&#xD;&#xA;		System::on_initialize(System::block_number());&#xD;&#xA;		PalletA::on_initialize(System::block_number());&#xD;&#xA;		Timestamp::on_initialize(System::block_number());&#xD;&#xA;       //Timestamp::on_finalize(System::block_number());  // Got error 'Timestamp must be updated once in the block'&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But on hooks of PalletA the '_now' value is always 0&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;		fn on_finalize(_block_number: BlockNumberFor&lt;T&gt;) {&#xD;&#xA;			let _now = &lt;timestamp::Pallet&lt;T&gt;&gt;::get();&#xD;&#xA;&#xD;&#xA;			println!(&quot;now: {:?}&quot;, _now);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2607" PostHistoryTypeId="1" PostId="719" RevisionGUID="56383444-4f85-4cf9-bca5-5e9957511818" CreationDate="2022-03-13T09:09:14.033" UserId="515" Text="How to use pallet_timestamp on tests with function run_to_block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2608" PostHistoryTypeId="3" PostId="719" RevisionGUID="56383444-4f85-4cf9-bca5-5e9957511818" CreationDate="2022-03-13T09:09:14.033" UserId="515" Text="|substrate-node|configuration|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2609" PostHistoryTypeId="2" PostId="720" RevisionGUID="c3586906-a830-4ecf-88f0-f2c4d095b80a" CreationDate="2022-03-13T11:47:05.217" UserId="575" Text="Add the following (the lines with the `&lt;--- add this` comment to the `[dependencies]` and `[features]` section of the `cargo.toml` file:&#xD;&#xA;&#xD;&#xA;    [dependencies]&#xD;&#xA;    serde = { version = &quot;1.0.119&quot; }  //&lt;----- add this&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = ['std']&#xD;&#xA;    std = [&#xD;&#xA;        'serde/std',  //&lt;----- add this&#xD;&#xA;    ]" ContentLicense="CC BY-SA 4.0" />
  <row Id="2611" PostHistoryTypeId="2" PostId="721" RevisionGUID="8413c11e-718a-4810-a9a5-204f6ba9368d" CreationDate="2022-03-13T12:02:07.313" UserId="575" Text="It seems sp-io is using the v5, whereas the other crates are using v4. try using the v4 of sp-io :&#xD;&#xA;&#xD;&#xA;    [dependecies]&#xD;&#xA;    sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', tag = 'devhub/latest', version = '4.0.0-dev' }" ContentLicense="CC BY-SA 4.0" />
  <row Id="2615" PostHistoryTypeId="5" PostId="628" RevisionGUID="878d669b-1d06-48c5-bb03-60988c044914" CreationDate="2022-03-13T14:05:51.110" UserId="94" Comment="deleted 42 characters in body" Text="You need to provide the SS58 prefix to the `create_from_mnemonic` function to make it generate a Kusama address as opposed to a generic Substrate address:  &#xD;&#xA;```python&#xD;&#xA;from substrateinterface import Keypair&#xD;&#xA;&#xD;&#xA;# 2 for Kusama.&#xD;&#xA;prefix = 2&#xD;&#xA;mnemonic = 'episode together nose spoon dose oil faculty zoo ankle evoke admit walnut'&#xD;&#xA;&#xD;&#xA;keypair = Keypair.create_from_mnemonic(mnemonic, ss58_format=prefix)&#xD;&#xA;# Prints JHXFqYWQFFr5RkHVzviRiKhY7tutyGcYQb6kUyoScSir862&#xD;&#xA;print(keypair.ss58_address)&#xD;&#xA;```&#xD;&#xA;Kusama has the prefix 2, you can see all of them in the [ss58-registry](https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json)." ContentLicense="CC BY-SA 4.0" />
  <row Id="2620" PostHistoryTypeId="2" PostId="724" RevisionGUID="bd64e01a-f9b9-4529-890b-246b6a5cda26" CreationDate="2022-03-13T17:05:34.337" UserId="139" Text="From docs :&#xD;&#xA;&#xD;&#xA;&gt; Create signed transaction.&#xD;&#xA;&gt; &#xD;&#xA;&gt; This trait is meant to be implemented by the runtime and is&#xD;&#xA;&gt; responsible for constructing a payload to be signed and contained&#xD;&#xA;&gt; within the extrinsic. This will most likely include creation of&#xD;&#xA;&gt; SignedExtra (a set of SignedExtensions). Note that the result can be&#xD;&#xA;&gt; altered by inspecting the Call (for instance adjusting fees, or&#xD;&#xA;&gt; mortality depending on the pallet being called).&#xD;&#xA;&#xD;&#xA;I want to understand more about this trait, regarding what module or system requires to create signed transactions, on whose behalf, and are these limited to extrinsics or may include inherents? When it says the trait is implemented for the Runtime, what are the cases when the runtime would like to do so? Likely I also want to understand what this implementation is doing if someone can break it down for me: &#xD;&#xA;```rust&#xD;&#xA;impl&lt;LocalCall&gt; frame_system::offchain::CreateSignedTransaction&lt;LocalCall&gt; for Runtime&#xD;&#xA;where&#xD;&#xA;	Call: From&lt;LocalCall&gt;,&#xD;&#xA;{&#xD;&#xA;	fn create_transaction&lt;C: frame_system::offchain::AppCrypto&lt;Self::Public, Self::Signature&gt;&gt;(&#xD;&#xA;		call: Call,&#xD;&#xA;		public: &lt;Signature as sp_runtime::traits::Verify&gt;::Signer,&#xD;&#xA;		account: AccountId,&#xD;&#xA;		nonce: Index,&#xD;&#xA;	) -&gt; Option&lt;(Call, &lt;UncheckedExtrinsic as sp_runtime::traits::Extrinsic&gt;::SignaturePayload)&gt; {&#xD;&#xA;		let tip = 0;&#xD;&#xA;		// take the biggest period possible.&#xD;&#xA;		let period =&#xD;&#xA;			BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64;&#xD;&#xA;		let current_block = System::block_number()&#xD;&#xA;			.saturated_into::&lt;u64&gt;()&#xD;&#xA;			// The `System::block_number` is initialized with `n+1`,&#xD;&#xA;			// so the actual block number is `n`.&#xD;&#xA;			.saturating_sub(1);&#xD;&#xA;		let era = sp_runtime::generic::Era::mortal(period, current_block);&#xD;&#xA;		let extra = (&#xD;&#xA;			frame_system::CheckSpecVersion::&lt;Runtime&gt;::new(),&#xD;&#xA;			frame_system::CheckTxVersion::&lt;Runtime&gt;::new(),&#xD;&#xA;			frame_system::CheckGenesis::&lt;Runtime&gt;::new(),&#xD;&#xA;			frame_system::CheckEra::&lt;Runtime&gt;::from(era),&#xD;&#xA;			frame_system::CheckNonce::&lt;Runtime&gt;::from(nonce),&#xD;&#xA;			frame_system::CheckWeight::&lt;Runtime&gt;::new(),&#xD;&#xA;			pallet_transaction_payment::ChargeTransactionPayment::&lt;Runtime&gt;::from(tip),&#xD;&#xA;		);&#xD;&#xA;		let raw_payload = SignedPayload::new(call, extra)&#xD;&#xA;			.map_err(|e| {&#xD;&#xA;				log::warn!(&quot;Unable to create signed payload: {:?}&quot;, e);&#xD;&#xA;			})&#xD;&#xA;			.ok()?;&#xD;&#xA;		let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?;&#xD;&#xA;		let address = Indices::unlookup(account);&#xD;&#xA;		let (call, extra, _) = raw_payload.deconstruct();&#xD;&#xA;		Some((call, (address, signature.into(), extra)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2622" PostHistoryTypeId="1" PostId="724" RevisionGUID="bd64e01a-f9b9-4529-890b-246b6a5cda26" CreationDate="2022-03-13T17:05:34.337" UserId="139" Text="What is the purpose of CreateSignedTransaction&lt;LocalCall&gt;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2623" PostHistoryTypeId="3" PostId="724" RevisionGUID="bd64e01a-f9b9-4529-890b-246b6a5cda26" CreationDate="2022-03-13T17:05:34.337" UserId="139" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2624" PostHistoryTypeId="2" PostId="725" RevisionGUID="369e0074-104f-486f-93f5-c5d9a6df64b9" CreationDate="2022-03-13T17:25:14.940" UserId="167" Text="These traits are used for pallets that need to send transactions. The general problem is that a pallet can not know the environment in which it lives, and therefore cannot, by default, have all the information needed to compose a transaction.&#xD;&#xA;&#xD;&#xA;For example, a pallet cannot be aware of the list of other pallets that exist in the runtime, and therefore cannot also build the `SignedExtensions` type properly. &#xD;&#xA;&#xD;&#xA;If you might ask why and when a pallet might need to send a transaction, I refer you to [`pallet_im_online`](https://paritytech.github.io/substrate/master/pallet_im_online/index.html) and [`pallet_election_provider_multi_phase`](https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/index.html), both of which use `offchain_worker`s to send unsigned transactions directly back to the chain.&#xD;&#xA;&#xD;&#xA;These traits are ways through which the runtime is informing a pallet about how transactions need to be built. If you see, both of the aforementioned pallets bound their `Config` to also be [`SendTransactionTypes`](https://paritytech.github.io/substrate/master/frame_system/offchain/trait.SendTransactionTypes.html). &#xD;&#xA;&#xD;&#xA;`CreateSignedTransaction` is a similar trait, which is only needed when a pallet needs to send a signed transaction. A good example of this is [`pallet-example-offchain-worker`](https://paritytech.github.io/substrate/master/pallet_example_offchain_worker/index.html), which has its `Config` be bound to [`CreateSignedTransaction`](https://paritytech.github.io/substrate/master/pallet_example_offchain_worker/pallet/trait.Config.html), which is needed to call into [`Signer::send_signed_transaction`](https://paritytech.github.io/substrate/master/frame_system/offchain/struct.Signer.html#method.send_signed_transaction)." ContentLicense="CC BY-SA 4.0" />
  <row Id="2626" PostHistoryTypeId="2" PostId="726" RevisionGUID="18759ca2-4fd3-4340-a0b4-f4b7f128d47b" CreationDate="2022-03-13T18:31:10.470" UserId="555" Text="I think you have declare sp-io in [dev-dependencies] if this is true then please moved sp-io from [dev-dependencies] to [dependencies]. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2634" PostHistoryTypeId="2" PostId="728" RevisionGUID="123f4831-859a-4755-a11a-84b3be423ff5" CreationDate="2022-03-14T05:04:07.427" UserId="610" Text="Here's my 2 cents.&#xD;&#xA;&#xD;&#xA;Let's step back a little and start from the basics. As you may know, a **node** is a computer participating in the blockchain network, and there is an application, known as a **client**, running in it.&#xD;&#xA;&#xD;&#xA;[This](https://docs.substrate.io/v3/getting-started/architecture/) is a conceptual diagram of a Substrate client.&#xD;&#xA;&#xD;&#xA;The **runtime**, labeled as Wasm Runtime, is a piece of the Substrate client. There are other components besides the runtime that comprise the Substrate client.  &#xD;&#xA;From the [docs](https://docs.substrate.io/v3/concepts/runtime/):&#xD;&#xA;&gt; The runtime of a blockchain is the business logic that defines its behaviour.&#xD;&#xA;&#xD;&#xA;This business logic is organized in domain-specific modules. Broadly speaking, we refer to these modules as **FRAME modules** (pallets). So, we could say that a **set of pallets constitute a runtime**.  &#xD;&#xA;&#xD;&#xA;In the [Substrate Node Template](https://github.com/substrate-developer-hub/substrate-node-template) repository, you could check how the runtime is constructed based on a set of pallets. You could navigate to `runtime/src/lib.rs` and find the [`construct_runtime!`](https://github.com/substrate-developer-hub/substrate-node-template/blob/c962ed17139322f99d25ed5631ddbb5bbbced2a2/runtime/src/lib.rs#L275) macro.  &#xD;&#xA;&#xD;&#xA;You will see the following:&#xD;&#xA;```&#xD;&#xA;// Create the runtime by composing the FRAME pallets that were previously configured.&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		RandomnessCollectiveFlip: pallet_randomness_collective_flip,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		// Include the custom logic from the pallet-template in the runtime.&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;All the pallets except `TemplateModule` are FRAME modules provided by Substrate.  &#xD;&#xA;`TemplateModule` is a custom pallet written by a developer.&#xD;&#xA;&#xD;&#xA;**Back to your questions**, in the link you shared at the System crate section says:&#xD;&#xA;&gt; All other pallets depend on the System crate (pallet_system) as the basis of your Substrate runtime.&#xD;&#xA;The System crate defines all the core types for the Substrate runtime.  &#xD;&#xA;&#xD;&#xA;Based on that, the System pallet, which is part of the &quot;SYSTEM MODULE&quot; block in the diagram, is a **must**.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="2638" PostHistoryTypeId="2" PostId="729" RevisionGUID="e93a7bcb-0c52-4a69-8fb0-fa6cc4f7af17" CreationDate="2022-03-14T07:17:10.683" UserId="129" Text="In the [substrate archive wiki][1], they showed how to archive the polkadot chain's data. Now I want to get other chains' data (like a substrate template node or Astar, Moonbeam, etc). How can I do that?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-archive/wiki" ContentLicense="CC BY-SA 4.0" />
  <row Id="2640" PostHistoryTypeId="1" PostId="729" RevisionGUID="e93a7bcb-0c52-4a69-8fb0-fa6cc4f7af17" CreationDate="2022-03-14T07:17:10.683" UserId="129" Text="How to use substrate archive for custom chains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2641" PostHistoryTypeId="3" PostId="729" RevisionGUID="e93a7bcb-0c52-4a69-8fb0-fa6cc4f7af17" CreationDate="2022-03-14T07:17:10.683" UserId="129" Text="|substrate-node-template|substrate-archive|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2643" PostHistoryTypeId="2" PostId="730" RevisionGUID="058234f0-c1fd-44f4-a6d4-3273ddbf4b58" CreationDate="2022-03-14T08:07:06.790" UserId="554" Text="While doing the tutorial of &quot;Build the Substrate Kitties Chain&quot; there comes a section [https://docs.substrate.io/tutorials/v3/kitties/pt1/#uniqueness-custom-types-and-storage-maps][1] &#xD;&#xA;&#xD;&#xA;In this there it says 'Along with this code, we'll need to import serde. Add this to your pallet's Cargo.toml file, using the matching version as Substrate upstream.'&#xD;&#xA;&#xD;&#xA;So How to add serde in  cargo.toml?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/kitties/pt1/#uniqueness-custom-types-and-storage-maps" ContentLicense="CC BY-SA 4.0" />
  <row Id="2645" PostHistoryTypeId="1" PostId="730" RevisionGUID="058234f0-c1fd-44f4-a6d4-3273ddbf4b58" CreationDate="2022-03-14T08:07:06.790" UserId="554" Text="How to add Serde in pallets\kitties\src\cargo.toml" ContentLicense="CC BY-SA 4.0" />
  <row Id="2646" PostHistoryTypeId="3" PostId="730" RevisionGUID="058234f0-c1fd-44f4-a6d4-3273ddbf4b58" CreationDate="2022-03-14T08:07:06.790" UserId="554" Text="|kitties|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2647" PostHistoryTypeId="2" PostId="731" RevisionGUID="1e02bcdb-0518-4846-9bf6-5b3c9bebbada" CreationDate="2022-03-14T08:07:06.790" UserId="554" Text="To add serde in cargo.toml you should go in pallets\kitties\src\cargo.toml  and in the [dependencies] section add a line like:&#xD;&#xA;&#xD;&#xA;&lt;code&gt;serde = {version=&quot;1.0.136&quot;, feature= [&quot;derive&quot;]}&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;Just keep in mind that the version keeps on updating. So You may have to update the version. Currently, on the date of writing this answer version is 1.0.136" ContentLicense="CC BY-SA 4.0" />
  <row Id="2649" PostHistoryTypeId="2" PostId="732" RevisionGUID="3f85318d-840b-447b-8307-458d15dc9a02" CreationDate="2022-03-14T08:16:56.543" UserId="554" Text="While doing the tutorial of &quot;Build the Substrate Kitties Chain&quot; there comes a section &#xD;&#xA;[https://docs.substrate.io/tutorials/v3/kitties/pt1/#write-the-create_kitty-dispatchable][1]&#xD;&#xA;&#xD;&#xA;In this there it says 'In order to use log::info, add this to your pallet's Cargo.toml file, using the matching version as Substrate upstream.'&#xD;&#xA;&#xD;&#xA;So How to add log in cargo.toml?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/kitties/pt1/#write-the-create_kitty-dispatchable" ContentLicense="CC BY-SA 4.0" />
  <row Id="2651" PostHistoryTypeId="1" PostId="732" RevisionGUID="3f85318d-840b-447b-8307-458d15dc9a02" CreationDate="2022-03-14T08:16:56.543" UserId="554" Text="How to add log to pallet's cargo.toml file to use log::info" ContentLicense="CC BY-SA 4.0" />
  <row Id="2652" PostHistoryTypeId="3" PostId="732" RevisionGUID="3f85318d-840b-447b-8307-458d15dc9a02" CreationDate="2022-03-14T08:16:56.543" UserId="554" Text="|kitties|build|kittiess-chain|build-the-substrate-kitties-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2653" PostHistoryTypeId="2" PostId="733" RevisionGUID="7ff5827d-c67a-4bfe-8b5a-5dc04f27f470" CreationDate="2022-03-14T08:16:56.543" UserId="554" Text="To add log in pallets\kitties\src\cargo.toml  first go into cargo.toml file and in the [dependencies] section add:&#xD;&#xA;&lt;code&gt;&#xD;&#xA;log = {version = &quot;0.4.14&quot;, feature = [&quot;derive&quot;]}&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;Just keep in mind version may change depending upon the updates. So change it accordingly. Currently on the date of writing this answer version is 0.4.14" ContentLicense="CC BY-SA 4.0" />
  <row Id="2655" PostHistoryTypeId="2" PostId="734" RevisionGUID="97a5906e-4fce-4992-a47f-cc9ccaf2abe5" CreationDate="2022-03-14T10:39:42.577" UserId="580" Text="I tested rococo parachains launched thanks polkadot-launch. However I don't see any blocks created from the parachain so I'm wondering if this is normal and if I need to do extra steps to see blocks creation on the parachain. &#xD;&#xA;&#xD;&#xA;**Version double checks :**&#xD;&#xA;&#xD;&#xA;- I'm using parity polkadot node version : `0.9.17-de0ecd4760-x86_64-linux-gnu`&#xD;&#xA;- I'm using cumulus polkadot-collator node version : `5.2.0-76479e7f-x86_64-linux-gnu` (the `76479e7f` is the commit id for cumulus tag `polkadot-v0.9.17`)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Polkadot-launch input configuration :**&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;	&quot;relaychain&quot;: {&#xD;&#xA;		&quot;bin&quot;: &quot;./bin/polkadot&quot;,&#xD;&#xA;		&quot;chain&quot;: &quot;rococo-local&quot;,&#xD;&#xA;		&quot;nodes&quot;: [&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9944,&#xD;&#xA;				&quot;port&quot;: 30444&#xD;&#xA;			},&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9955,&#xD;&#xA;				&quot;port&quot;: 30555&#xD;&#xA;			},&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9966,&#xD;&#xA;				&quot;port&quot;: 30666&#xD;&#xA;			},&#xD;&#xA;			{&#xD;&#xA;				&quot;name&quot;: &quot;dave&quot;,&#xD;&#xA;				&quot;wsPort&quot;: 9977,&#xD;&#xA;				&quot;port&quot;: 30777&#xD;&#xA;			}&#xD;&#xA;		],&#xD;&#xA;		&quot;genesis&quot;: {&#xD;&#xA;			&quot;runtime&quot;: {&#xD;&#xA;				&quot;runtime_genesis_config&quot;: {&#xD;&#xA;					&quot;configuration&quot;: {&#xD;&#xA;						&quot;config&quot;: {&#xD;&#xA;							&quot;validation_upgrade_frequency&quot;: 10,&#xD;&#xA;							&quot;validation_upgrade_delay&quot;: 10&#xD;&#xA;						}&#xD;&#xA;					}&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	},&#xD;&#xA;	&quot;parachains&quot;: [&#xD;&#xA;		{&#xD;&#xA;			&quot;bin&quot;: &quot;./bin/polkadot-collator&quot;,&#xD;&#xA;			&quot;id&quot;: &quot;200&quot;,&#xD;&#xA;			&quot;balance&quot;: &quot;1000000000000000000000&quot;,&#xD;&#xA;			&quot;nodes&quot;: [&#xD;&#xA;				{&#xD;&#xA;					&quot;wsPort&quot;: 9988,&#xD;&#xA;					&quot;port&quot;: 31200,&#xD;&#xA;					&quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;					&quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;				}&#xD;&#xA;			]&#xD;&#xA;		},&#xD;&#xA;		{&#xD;&#xA;			&quot;bin&quot;: &quot;./bin/polkadot-collator&quot;,&#xD;&#xA;			&quot;id&quot;: &quot;300&quot;,&#xD;&#xA;			&quot;balance&quot;: &quot;1000000000000000000000&quot;,&#xD;&#xA;			&quot;nodes&quot;: [&#xD;&#xA;				{&#xD;&#xA;					&quot;wsPort&quot;: 9999,&#xD;&#xA;					&quot;port&quot;: 31300,&#xD;&#xA;					&quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;					&quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;				}&#xD;&#xA;			]&#xD;&#xA;		}&#xD;&#xA;	],&#xD;&#xA;	&quot;hrmpChannels&quot;: [&#xD;&#xA;		{&#xD;&#xA;			&quot;sender&quot;: 200,&#xD;&#xA;			&quot;recipient&quot;: 300,&#xD;&#xA;			&quot;maxCapacity&quot;: 8,&#xD;&#xA;			&quot;maxMessageSize&quot;: 512&#xD;&#xA;		}&#xD;&#xA;	],&#xD;&#xA;	&quot;types&quot;: {},&#xD;&#xA;	&quot;finalization&quot;: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**First log analyses :**&#xD;&#xA;&#xD;&#xA;The first collator node connect to the parachain and synchronize its first relay chain with blocks 31 on epoch 3 : &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-14 00:13:05 [Relaychain]  Applying authority set change scheduled at block #31&#xD;&#xA;2022-03-14 00:13:05 [Relaychain]  Applying GRANDPA set change to new set [(Public(88dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee (5FA9nQDV...)), 1), (Public(d17c2d7823ebf260fd138f2d7e27d114c0145d968b5ff5006125f2414fadae69 (5GoNkf6W...)), 1), (P&#xD;&#xA;ublic(439660b36c6c03afafca027b910b4fecf99801834c62a5e6006f27d978de234f (5DbKjhNL...)), 1), (Public(5e639b43e0052c47447dac87d6fd2b6ec50bdd4d0f614e4299c665249bbd09d9 (5ECTwv6c...)), 1)]&#xD;&#xA;...&#xD;&#xA;2022-03-14 00:13:48 [Relaychain]  New epoch 4 launching at block 0x1f0c…efdd (block slot 274536138 &gt;= start slot 274536138).&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However I never see `[Parachain] Starting collation.` in my logs. I waited till block 152 and epoch 15 with no success...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-14 00:24:48 [Relaychain]  New epoch 15 launching at block 0x0898…5404 (block slot 274536248 &gt;= start slot 274536248).&#xD;&#xA;2022-03-14 00:24:48 [Relaychain]  Next epoch starts at slot 274536258&#xD;&#xA;2022-03-14 00:24:48 [Relaychain] ✨ Imported #151 (0x0898…5404)&#xD;&#xA;2022-03-14 00:24:48 [Relaychain] Advanced session window for approvals update=Advanced { prev_window_start: 9, prev_window_end: 14, new_window_start: 10, new_window_end: 15 }&#xD;&#xA;2022-03-14 00:24:51 [Relaychain]  Idle (5 peers), best: #151 (0x0898…5404), finalized #148 (0x8570…2a6e), ⬇ 4.2kiB/s ⬆ 2.9kiB/s&#xD;&#xA;2022-03-14 00:24:51 [Parachain]  Idle (1 peers), best: #0 (0x0a8a…28c5), finalized #0 (0x0a8a…28c5), ⬇ 49 B/s ⬆ 49 B/s&#xD;&#xA;2022-03-14 00:24:54 [Relaychain] ✨ Imported #152 (0xce66…efb4)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The block count on the parachain remains to 0 :(. Is there something I missed ? &#xD;&#xA;&#xD;&#xA;Thank you for your coming help :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2657" PostHistoryTypeId="1" PostId="734" RevisionGUID="97a5906e-4fce-4992-a47f-cc9ccaf2abe5" CreationDate="2022-03-14T10:39:42.577" UserId="580" Text="Rococo polkadot-launch parachain doesn't create blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="2658" PostHistoryTypeId="3" PostId="734" RevisionGUID="97a5906e-4fce-4992-a47f-cc9ccaf2abe5" CreationDate="2022-03-14T10:39:42.577" UserId="580" Text="|parachain|rococo-local|polkadot-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2659" PostHistoryTypeId="2" PostId="735" RevisionGUID="ba19b12a-0e37-417f-a80f-a6750f6d6783" CreationDate="2022-03-14T11:08:49.730" UserId="429" Text="Are you customizing your RunCommand struct in cli.rs?&#xD;&#xA;I've faced this issue where blocked are not being finalized while customizing the RunCommand struct.&#xD;&#xA;(In my case, I was not providing the correct path of sc_cli::RunCommand in my runner).&#xD;&#xA;&#xD;&#xA;If yes, then you need to provide the correct path of the sc_cli::RunCommand where you are creating the runner in the command.rs." ContentLicense="CC BY-SA 4.0" />
  <row Id="2661" PostHistoryTypeId="2" PostId="736" RevisionGUID="bf152afb-bb23-4622-aad0-c2c418c5d96f" CreationDate="2022-03-14T11:54:15.550" UserId="530" Text="[Parachain url](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.parachain-collator-1.c1.sora2.soramitsu.co.jp#/explorer)&#xD;&#xA;[Repository](https://github.com/sora-xor/sora2-parachain)&#xD;&#xA;&#xD;&#xA;The parachain is based on polkadot-v0.9.13 that was the latest at the time of release.&#xD;&#xA;&#xD;&#xA;The logs have neither warnings nor errors.&#xD;&#xA;&#xD;&#xA;What can we do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2663" PostHistoryTypeId="1" PostId="736" RevisionGUID="bf152afb-bb23-4622-aad0-c2c418c5d96f" CreationDate="2022-03-14T11:54:15.550" UserId="530" Text="parachain doesn't produce blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="2664" PostHistoryTypeId="3" PostId="736" RevisionGUID="bf152afb-bb23-4622-aad0-c2c418c5d96f" CreationDate="2022-03-14T11:54:15.550" UserId="530" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2665" PostHistoryTypeId="2" PostId="737" RevisionGUID="cafdfd5e-dcb7-45f4-8b76-9391c83dbad3" CreationDate="2022-03-14T12:14:21.250" UserId="83" Text="Obtain the &quot;raw&quot; chain definition that you originally used to launch polkadot-launch after copying the latest binary of your parachain to the polkadot-launch bin/ directory. Ensure you are using substrate-parachain-template branch 'polkadot-v0.9.17':&#xD;&#xA;```&#xD;&#xA;./polkadot-launch/bin/parachain-collator build-spec --chain &quot;rococo-local&quot; --disable-default-bootnode &gt; rococo-local-parachain-2000-plain.json&#xD;&#xA;./polkadot-launch/bin/parachain-collator build-spec --chain rococo-local-parachain-2000-plain.json --raw --disable-default-bootnode &gt; rococo-local-parachain-2000-raw.json&#xD;&#xA;cp rococo-local-parachain-2000-raw.json ../&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Obtain Alice's secret seed `0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a` by running the following&#xD;&#xA;```&#xD;&#xA;subkey inspect //Alice&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Insert Alice's session key&#xD;&#xA;```&#xD;&#xA;./polkadot-launch/bin/parachain-collator key insert \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--chain ./polkadot-launch/rococo-local-parachain-2000-raw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri 0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a \&#xD;&#xA;--key-type aura&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Restart polkadot-launch.&#xD;&#xA;&#xD;&#xA;Add another collator node manually. Use an existing bootnode below that you obtain from the logs when you run polkadot-launch. Use the correct Rococo relay chain &quot;raw&quot; chain definition for rococo-local-raw.json below for Polkadot branch 'v0.9.17' and the correct ports.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./polkadot-launch/bin/parachain-collator \&#xD;&#xA;	--collator \&#xD;&#xA;	--alice \&#xD;&#xA;	--chain ./polkadot-launch/rococo-local-parachain-2000-raw.json \&#xD;&#xA;	--base-path /tmp/parachain/alice \&#xD;&#xA;	--bootnodes /ip4/127.0.0.1/tcp/30336/p2p/&lt;INSERT_BOOTNODE_ID&gt; \&#xD;&#xA;	--name &quot;DataHighway-Collator-Alice&quot; \&#xD;&#xA;	--force-authoring \&#xD;&#xA;	--port 31400 \&#xD;&#xA;	--rpc-port 9933 \&#xD;&#xA;	--ws-port 9977 \&#xD;&#xA;	--unsafe-ws-external \&#xD;&#xA;	--unsafe-rpc-external \&#xD;&#xA;	--rpc-cors=all \&#xD;&#xA;	--rpc-methods=Unsafe \&#xD;&#xA;	-- \&#xD;&#xA;	--execution wasm \&#xD;&#xA;	--chain ./polkadot-launch/rococo-local-raw.json \&#xD;&#xA;	--port 30444 \&#xD;&#xA;	--rpc-port 9944 \&#xD;&#xA;	--ws-port 9955&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check that the parachain generates and finalizes blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="2667" PostHistoryTypeId="5" PostId="737" RevisionGUID="9d8a5207-6a32-45cc-b00e-0661ab6f79f6" CreationDate="2022-03-14T12:21:45.873" UserId="83" Comment="add insert key subcommand" Text="Obtain the &quot;raw&quot; chain definition that you originally used to launch polkadot-launch after copying the latest binary of your parachain to the polkadot-launch bin/ directory. Ensure you are using substrate-parachain-template branch 'polkadot-v0.9.17':&#xD;&#xA;```&#xD;&#xA;./polkadot-launch/bin/parachain-collator build-spec --chain &quot;rococo-local&quot; --disable-default-bootnode &gt; rococo-local-parachain-2000-plain.json&#xD;&#xA;./polkadot-launch/bin/parachain-collator build-spec --chain rococo-local-parachain-2000-plain.json --raw --disable-default-bootnode &gt; rococo-local-parachain-2000-raw.json&#xD;&#xA;cp rococo-local-parachain-2000-raw.json ../&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Obtain Alice's secret seed `0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a` by running the following&#xD;&#xA;```&#xD;&#xA;subkey inspect //Alice&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Add the `KeySubcommand` to the CLI of your substrate-parachain-template so you can run `parachain-collator key insert` in the next step, as shown in this [example][1].&#xD;&#xA;&#xD;&#xA;Insert Alice's session key&#xD;&#xA;```&#xD;&#xA;./polkadot-launch/bin/parachain-collator key insert \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--chain ./polkadot-launch/rococo-local-parachain-2000-raw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri 0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a \&#xD;&#xA;--key-type aura&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Restart polkadot-launch.&#xD;&#xA;&#xD;&#xA;Add another collator node manually. Use an existing bootnode below that you obtain from the logs when you run polkadot-launch. Use the correct Rococo relay chain &quot;raw&quot; chain definition for rococo-local-raw.json below for Polkadot branch 'v0.9.17' and the correct ports.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./polkadot-launch/bin/parachain-collator \&#xD;&#xA;	--collator \&#xD;&#xA;	--alice \&#xD;&#xA;	--chain ./polkadot-launch/rococo-local-parachain-2000-raw.json \&#xD;&#xA;	--base-path /tmp/parachain/alice \&#xD;&#xA;	--bootnodes /ip4/127.0.0.1/tcp/30336/p2p/&lt;INSERT_BOOTNODE_ID&gt; \&#xD;&#xA;	--name &quot;DataHighway-Collator-Alice&quot; \&#xD;&#xA;	--force-authoring \&#xD;&#xA;	--port 31400 \&#xD;&#xA;	--rpc-port 9933 \&#xD;&#xA;	--ws-port 9977 \&#xD;&#xA;	--unsafe-ws-external \&#xD;&#xA;	--unsafe-rpc-external \&#xD;&#xA;	--rpc-cors=all \&#xD;&#xA;	--rpc-methods=Unsafe \&#xD;&#xA;	-- \&#xD;&#xA;	--execution wasm \&#xD;&#xA;	--chain ./polkadot-launch/rococo-local-raw.json \&#xD;&#xA;	--port 30444 \&#xD;&#xA;	--rpc-port 9944 \&#xD;&#xA;	--ws-port 9955&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check that the parachain generates and finalizes blocks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/11/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="2668" PostHistoryTypeId="2" PostId="738" RevisionGUID="c0c7bec8-d7d8-41c9-bf4a-af5ee9f69e3b" CreationDate="2022-03-14T12:57:06.600" UserId="83" Text="In [this pull request #19][1] I am trying to merge the following features into another working parachain [pull request #17 here][2]:&#xD;&#xA;* Change `pub type Address = MultiAddress&lt;AccountId, ()&gt;;` to `pub type Address = MultiAddress&lt;AccountId, AccountIndex&gt;;` [here][3]&#xD;&#xA;* Add `CreateSignedTransaction` [here][4]&#xD;&#xA;* Add `SigningTypes` [here][5]&#xD;&#xA;* Use `SendTransactionTypes` [here][6]&#xD;&#xA;&#xD;&#xA;But when I compile pull request #19, it generates the errors [here][7].&#xD;&#xA;&#xD;&#xA;What does the code in these changes do in plain English?&#xD;&#xA;&#xD;&#xA;Why would I need to add the code in pull request #19 to the rest of working parachain code in pull request #17?&#xD;&#xA;&#xD;&#xA;What steps should be taken to satisfying all the unsatisfied trait bounds so the functions `execute_block`, `initialize_block`, `apply_extrinsic`, `finalize_block`, `validate_transaction`, `offchain_worker` may be called and so `struct UncheckedExtrinsic` satisfies `Checkable&lt;ChainContext&lt;Runtime&gt;&gt;` to resolve the errors?&#xD;&#xA;&#xD;&#xA;It mentions that the trait bound `UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, u32&gt;...` in `register_validate_block`, which is required by bound `validate_block`, is not satisfied because the trait `Checkable&lt;ChainContext&lt;Runtime&gt;&gt;` is not implemented for `UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, u32&gt;...` but that it found an implementation for `UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt; as Checkable&lt;Lookup&gt;&gt;`. What does this mean in plain English?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19&#xD;&#xA;  [2]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/17&#xD;&#xA;  [3]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR128&#xD;&#xA;  [4]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR543&#xD;&#xA;  [5]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR585&#xD;&#xA;  [6]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR590&#xD;&#xA;  [7]: https://gist.githubusercontent.com/ltfschoen/63b0d904d221a93607e68322ae1c4dde/raw/df97f57f0c6322fcdd1a25fa3e4ec983cba64632/error-datahighway-multiaddress-accountindex.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="2670" PostHistoryTypeId="1" PostId="738" RevisionGUID="c0c7bec8-d7d8-41c9-bf4a-af5ee9f69e3b" CreationDate="2022-03-14T12:57:06.600" UserId="83" Text="How to update a parachain with `AccountIndex` used by `MultiAddress`, and to use `CreateSignedTransaction` and `SigningTypes` without errors?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2671" PostHistoryTypeId="3" PostId="738" RevisionGUID="c0c7bec8-d7d8-41c9-bf4a-af5ee9f69e3b" CreationDate="2022-03-14T12:57:06.600" UserId="83" Text="|parachain|multiaddress|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2672" PostHistoryTypeId="5" PostId="738" RevisionGUID="52586c52-aa3c-49a3-8cc7-2e0f49cc3ebc" CreationDate="2022-03-14T13:10:03.230" UserId="83" Comment="mention that it worked in the standalone chain but not in the parachain" Text="In [this pull request #19][1] I am trying to merge the following features into another working **parachain** [pull request #17 here][2]:&#xD;&#xA;* Change `pub type Address = MultiAddress&lt;AccountId, ()&gt;;` to `pub type Address = MultiAddress&lt;AccountId, AccountIndex&gt;;` [here][3]&#xD;&#xA;* Add `CreateSignedTransaction` [here][4]&#xD;&#xA;* Add `SigningTypes` [here][5]&#xD;&#xA;* Use `SendTransactionTypes` [here][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What does the code in these changes do in plain English?&#xD;&#xA;&#xD;&#xA;Why didn't it generate any errors when I first added the `AccountIndex`, `CreateSignedTransaction`, `SigningTypes` in the **standalone chain** (a separate repository) in [this pull request #215][8]? But then when I applied the same changes to the **parachain** repository in [pull request #19][1], it generates the errors [here][7].&#xD;&#xA;&#xD;&#xA;What steps should be taken to satisfying all the unsatisfied trait bounds so the functions `execute_block`, `initialize_block`, `apply_extrinsic`, `finalize_block`, `validate_transaction`, `offchain_worker` may be called and so `struct UncheckedExtrinsic` satisfies `Checkable&lt;ChainContext&lt;Runtime&gt;&gt;` to resolve the errors?&#xD;&#xA;&#xD;&#xA;It mentions that the trait bound `UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, u32&gt;...` in `register_validate_block`, which is required by bound `validate_block`, is not satisfied because the trait `Checkable&lt;ChainContext&lt;Runtime&gt;&gt;` is not implemented for `UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, u32&gt;...` but that it found an implementation for `UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt; as Checkable&lt;Lookup&gt;&gt;`. What does this mean in plain English?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19&#xD;&#xA;  [2]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/17&#xD;&#xA;  [3]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR128&#xD;&#xA;  [4]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR543&#xD;&#xA;  [5]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR585&#xD;&#xA;  [6]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR590&#xD;&#xA;  [7]: https://gist.githubusercontent.com/ltfschoen/63b0d904d221a93607e68322ae1c4dde/raw/df97f57f0c6322fcdd1a25fa3e4ec983cba64632/error-datahighway-multiaddress-accountindex.md&#xD;&#xA;  [8]: https://github.com/DataHighway-DHX/node/pull/215/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR1446" ContentLicense="CC BY-SA 4.0" />
  <row Id="2673" PostHistoryTypeId="5" PostId="714" RevisionGUID="b2e2c2c1-abf8-46e6-bc17-1a93d8a83eda" CreationDate="2022-03-14T14:29:27.940" UserId="29" Comment="edited body" Text="I tried deployed two ink-compatible solidity smart contract using solang as the compiler.&#xD;&#xA;When trying to play around cross contract calls, I've stumbled upon the below failure:&#xD;&#xA;&#xD;&#xA;Prerequisite:&#xD;&#xA;1. compile one solidity smart contract using solang: get abi bundle Flip.contract &#xD;&#xA;2. compile another solidity smart contract Inc that takes another smart contract as constructor input&#xD;&#xA;https://github.com/hyperledger-labs/solang/blob/main/integration/substrate/issue666.sol &#xD;&#xA;&#xD;&#xA;Route1, using polkadot.js/app:&#xD;&#xA;1. upload smart contract Flip.contract using the contacts tab.&#xD;&#xA;2. upload Inc.contract and take the Flip account_address as constructor input.&#xD;&#xA;... salt value is auto generated by polkadot.js app&#xD;&#xA;3. call the superFlip method on Inc contract to see if it can call external contract&#xD;&#xA;Results: ContractTrapped&#xD;&#xA;&#xD;&#xA;Route2, using subxt to construct transaction ourself:&#xD;&#xA;1. deploy Flip.contract, call api.tx().contracts.instantiate_with_code(... same params as route1)&#xD;&#xA;2. deploy Inc.contract, call api.tx().contracts.instantiate_with_code(... same params as route1)&#xD;&#xA;... both steps have the same input data/gas_limit value as route1, we input salt value using account.nonce value&#xD;&#xA;4. call the superFlip method on Inc contract to see if it can call external contract&#xD;&#xA;Results: ExtrinsicSuccess&#xD;&#xA;&#xD;&#xA;Need some help for this, and specifically what should be salt in this scenario. Thx." ContentLicense="CC BY-SA 4.0" />
  <row Id="2674" PostHistoryTypeId="10" PostId="634" RevisionGUID="d08e4f37-cdf1-4731-8301-23454fe7971d" CreationDate="2022-03-14T14:32:24.963" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[107],&quot;Voters&quot;:[{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:103,&quot;DisplayName&quot;:&quot;user1271772&quot;},{&quot;Id&quot;:112,&quot;DisplayName&quot;:&quot;Joe Kerr&quot;},{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="2675" PostHistoryTypeId="2" PostId="739" RevisionGUID="55b729a5-00ae-4100-b197-54f81b6490ad" CreationDate="2022-03-14T14:39:44.350" UserId="515" Text="Found solution dealing with pallet_timestamp on unittest:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn run_to_block(n: u64) {&#xD;&#xA;	while System::block_number() &lt; n {&#xD;&#xA;		if System::block_number() &gt; 1 {&#xD;&#xA;			PalletA::on_finalize(System::block_number());&#xD;&#xA;			System::on_finalize(System::block_number());&#xD;&#xA;		}&#xD;&#xA;		System::set_block_number(System::block_number() + 1);&#xD;&#xA;		System::on_initialize(System::block_number());&#xD;&#xA;		PalletA::on_initialize(System::block_number());&#xD;&#xA;		Timestamp::set_timestamp((System::block_number() as u64 * MILLISECS_PER_BLOCK) + INIT_TIMESTAMP); // New line&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2677" PostHistoryTypeId="2" PostId="740" RevisionGUID="5914e191-ffbc-4ea4-b4f0-13c460f7ff53" CreationDate="2022-03-14T15:02:12.330" UserId="555" Text="I am following this tutorial : https://docs.substrate.io/tutorials/v3/kitties/pt1/#build-run-and-interact-with-your-kitties and completed the first part.&#xD;&#xA;But on the polkadot.js, First I created kitties and if I wants to transfer these kitties then this error is shown : system.ExtrinsicFailed Substratekitties.kittyNotExist -&gt;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sI80j.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2679" PostHistoryTypeId="1" PostId="740" RevisionGUID="5914e191-ffbc-4ea4-b4f0-13c460f7ff53" CreationDate="2022-03-14T15:02:12.330" UserId="555" Text="system.ExtrinsicFailed in Polkadot-JS" ContentLicense="CC BY-SA 4.0" />
  <row Id="2680" PostHistoryTypeId="3" PostId="740" RevisionGUID="5914e191-ffbc-4ea4-b4f0-13c460f7ff53" CreationDate="2022-03-14T15:02:12.330" UserId="555" Text="|substrate-node|polkadot|polkadot-js|substrate-node-template|substrate-kitties-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2681" PostHistoryTypeId="5" PostId="738" RevisionGUID="3564094f-c138-40da-8f54-2d5729e02551" CreationDate="2022-03-14T15:42:31.017" UserId="83" Comment="changed description again" Text="In [this pull request #19][1] I am trying to merge the following features into a working **parachain** based on the substrate-parachain-template in this [pull request #17 here][2]:&#xD;&#xA;* Added `AccountIndex` to the address [here][3] so it became the following. Previously it was `MultiAddress&lt;AccountId, ()&gt;;`)&#xD;&#xA;```&#xD;&#xA;pub type Address = MultiAddress&lt;AccountId, AccountIndex&gt;;&#xD;&#xA;```&#xD;&#xA;* Added `CreateSignedTransaction` [here][4]. Its purpose is described in [this answer][7]&#xD;&#xA;* Added `SigningTypes` [here][5]&#xD;&#xA;* Used `SendTransactionTypes` [here][6]&#xD;&#xA;&#xD;&#xA;But it generates the errors shown [here][9].&#xD;&#xA;&#xD;&#xA;However, there weren't any errors when I previously made the same changes in the **standalone chain** based on the substrate-node-template (a separate repository) in [this pull request #215][8]. &#xD;&#xA;&#xD;&#xA;What steps could be taken to try to fix the errors?&#xD;&#xA;&#xD;&#xA;How would you satisfying all the unsatisfied trait bounds so the functions `execute_block`, `initialize_block`, `apply_extrinsic`, `finalize_block`, `validate_transaction`, `offchain_worker` may be called?&#xD;&#xA;&#xD;&#xA;How would you make `struct UncheckedExtrinsic` satisfy trait `Checkable&lt;ChainContext&lt;Runtime&gt;&gt;`?&#xD;&#xA;&#xD;&#xA;How would you implement trait `Checkable&lt;ChainContext&lt;Runtime&gt;&gt;` for trait bound `UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, u32&gt;...` in `register_validate_block`, which is required by bound `validate_block`?&#xD;&#xA;&#xD;&#xA;Where is the implementation for `UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt; as Checkable&lt;Lookup&gt;&gt;` that it says it found?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19&#xD;&#xA;  [2]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/17&#xD;&#xA;  [3]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR128&#xD;&#xA;  [4]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR543&#xD;&#xA;  [5]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR585&#xD;&#xA;  [6]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR590&#xD;&#xA;  [7]: https://substrate.stackexchange.com/questions/724/what-is-the-purpose-of-createsignedtransactionlocalcall&#xD;&#xA;  [8]: https://github.com/DataHighway-DHX/node/pull/215/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR1446&#xD;&#xA;  [9]: https://gist.githubusercontent.com/ltfschoen/63b0d904d221a93607e68322ae1c4dde/raw/df97f57f0c6322fcdd1a25fa3e4ec983cba64632/error-datahighway-multiaddress-accountindex.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="2682" PostHistoryTypeId="4" PostId="738" RevisionGUID="3564094f-c138-40da-8f54-2d5729e02551" CreationDate="2022-03-14T15:42:31.017" UserId="83" Comment="changed description again" Text="How to use `AccountIndex` with `MultiAddress` in a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2683" PostHistoryTypeId="2" PostId="741" RevisionGUID="585f80d0-d215-4415-afd9-247a25679b5e" CreationDate="2022-03-14T16:15:40.760" UserId="610" Text="You mentioned&#xD;&#xA;&#xD;&#xA;&gt; *&quot;... pre-configured accounts (ie: replace alice, alice-stash, bob, bob-stash, charlie ...&quot;*&#xD;&#xA;&#xD;&#xA;Do you mean these accounts?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Assuming you cloned the **Substrate Node Template** repository, you could find them at [node/src/chain_spec.rs](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs).&#xD;&#xA;&#xD;&#xA;In the [`testnet_genesis`](https://github.com/substrate-developer-hub/substrate-node-template/blob/c962ed17139322f99d25ed5631ddbb5bbbced2a2/node/src/chain_spec.rs#L140) function, you can see how the list of tuples (AccountId, Balance) is created. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Configure initial storage state for FRAME modules.&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;    ...&#xD;&#xA;	endowed_accounts: Vec&lt;AccountId&gt;,&#xD;&#xA;    ...&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;	GenesisConfig {&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			// Configure endowed accounts with initial balance of 1 &lt;&lt; 60.&#xD;&#xA;			balances: endowed_accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect(),&#xD;&#xA;		},&#xD;&#xA;&#xD;&#xA;		...&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where `k` is an account_id from the `endowed_accounts` vector, and  &#xD;&#xA;`1&lt;&lt;60` is the 1.1529x10^18 balance amount you see in the image above.&#xD;&#xA;&#xD;&#xA;You could also notice that `testnet_genesis` is called in `development_config` and `local_testnet_config` functions. And how the accounts are generated with `get_account_id_from_seed`.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xP9kf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2685" PostHistoryTypeId="2" PostId="742" RevisionGUID="dd7499cc-f8dd-431e-b338-801e93134849" CreationDate="2022-03-14T17:00:41.113" UserId="209" Text="I'd like to make sure that after sudo access is gone forever, there still remains the following functionality in our PoA blockchain:&#xD;&#xA;&#xD;&#xA;1. new aura and grandpa validators can join,&#xD;&#xA;2. new bootnodes can appear.&#xD;&#xA;&#xD;&#xA;I guess, to implement such functionality, we don't need PoW or PoS, and all can be done with PoA combined with some kind of democratic voting among existing participants.&#xD;&#xA;&#xD;&#xA;I'm willing to give an opportunity to anyone to become a validator and/or create a bootnode with my zero involvement, so that existing validators by themselves could accept newcomers willing to join.&#xD;&#xA;&#xD;&#xA;So the question is: what pallets should I add to the blockchain, how am I supposed to change runtime or node to add such functionality? &#xD;&#xA;&#xD;&#xA;The [Private Network tutorial][1] provide the answers only if I fully own the network, which I would like to avoid. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/private-network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="2687" PostHistoryTypeId="1" PostId="742" RevisionGUID="dd7499cc-f8dd-431e-b338-801e93134849" CreationDate="2022-03-14T17:00:41.113" UserId="209" Text="How to add validators and bootnodes in PoA, when sudo isn't there?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2688" PostHistoryTypeId="3" PostId="742" RevisionGUID="dd7499cc-f8dd-431e-b338-801e93134849" CreationDate="2022-03-14T17:00:41.113" UserId="209" Text="|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2689" PostHistoryTypeId="2" PostId="743" RevisionGUID="4a43f810-4ae6-41b1-9c08-8a6e7e306596" CreationDate="2022-03-14T17:51:09.903" UserId="575" Text="It appears the sender doesn't have a kitty with the that Kitty Id. Confirm that you selected the right account (for the sender) and the right kitty Id." ContentLicense="CC BY-SA 4.0" />
  <row Id="2691" PostHistoryTypeId="2" PostId="744" RevisionGUID="f61a2bf5-7629-4723-a802-41266bbf2c46" CreationDate="2022-03-14T18:10:46.767" UserId="205" Text="`git clone https://github.com/substrate-developer-hub/substrate-front-end-template/ --branch tutorials/kitties`&#xD;&#xA;&#xD;&#xA;The above link is not available anymore. Would you mind sharing the right or latest version one?&#xD;&#xA;TIA." ContentLicense="CC BY-SA 4.0" />
  <row Id="2693" PostHistoryTypeId="1" PostId="744" RevisionGUID="f61a2bf5-7629-4723-a802-41266bbf2c46" CreationDate="2022-03-14T18:10:46.767" UserId="205" Text="ETH Denver 2022 - Kitties custom front-end repo link not available anymore" ContentLicense="CC BY-SA 4.0" />
  <row Id="2694" PostHistoryTypeId="3" PostId="744" RevisionGUID="f61a2bf5-7629-4723-a802-41266bbf2c46" CreationDate="2022-03-14T18:10:46.767" UserId="205" Text="|kitties|substrate-front-end|denver|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2695" PostHistoryTypeId="2" PostId="745" RevisionGUID="e01ee46a-4baa-49c0-90e9-31c638830248" CreationDate="2022-03-14T18:37:14.593" UserId="29" Text="Here is the kitties solution branch for the front-end:&#xD;&#xA;&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-front-end-template/tree/tutorials/solutions/kitties" ContentLicense="CC BY-SA 4.0" />
  <row Id="2701" PostHistoryTypeId="2" PostId="747" RevisionGUID="db92b162-98c8-4eee-a951-9be2e5ad2a3f" CreationDate="2022-03-14T19:33:37.323" UserId="601" Text="i guess you can find all the branch by doing : &#xD;&#xA;&#xD;&#xA;    git branch -a  // to list all branch &#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&#xD;&#xA;    git checkout name_of_branch //to change the current branch" ContentLicense="CC BY-SA 4.0" />
  <row Id="2704" PostHistoryTypeId="2" PostId="748" RevisionGUID="0f06b529-2469-42ff-9212-3b461759b26e" CreationDate="2022-03-14T22:35:44.387" UserId="332" Text="I am having a problem satisfying all of the trait bounds within the `node` crate. I am using the `polkadot-v0.9.17` branch of substrate, as was recommended on another question here. &#xD;&#xA;&#xD;&#xA;It is calling `sc_consensus_babe::import_queue`, which I'm pretty sure is here: https://github.com/paritytech/substrate/blob/polkadot-v0.9.17/client/consensus/babe/src/lib.rs#L1709&#xD;&#xA;&#xD;&#xA;The function has this bound on the where clause:&#xD;&#xA;```&#xD;&#xA;	Client::Api: BlockBuilderApi&lt;Block&gt; + BabeApi&lt;Block&gt; + ApiExt&lt;Block&gt;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This function is called from `node/src/service.rs`, and looks exactly like this: https://github.com/paritytech/substrate/blob/polkadot-v0.9.17/bin/node/cli/src/service.rs#L205&#xD;&#xA;&#xD;&#xA;Everything in my `service.rs` matches the substrate copy. How can I ensure the expected traits are satisfied when calling `import_queue`?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Compiling node-template v4.0.0-dev (substrate-simple-template/node)&#xD;&#xA;error[E0277]: the trait bound `RuntimeApiImpl&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;, sc_service::client::client::Client&lt;sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;&gt;, LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;, sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;&gt;, NativeElseWasmExecutor&lt;ExecutorDispatch&gt;&gt;, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;, node_runtime::RuntimeApi&gt;&gt;: sp_block_builder::BlockBuilder&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;&gt;` is not satisfied&#xD;&#xA;    --&gt; node/src/service.rs:126:21&#xD;&#xA;     |&#xD;&#xA;126  |     let import_queue = sc_consensus_babe::import_queue(&#xD;&#xA;     |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `sp_block_builder::BlockBuilder&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;&gt;` is not implemented for `RuntimeApiImpl&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;, sc_service::client::client::Client&lt;sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;&gt;, LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;, sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;&gt;, NativeElseWasmExecutor&lt;ExecutorDispatch&gt;&gt;, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, node_runtime::Call, MultiSignature, (frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_genesis::CheckGenesis&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_mortality::CheckMortality&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_nonce::CheckNonce&lt;node_runtime::Runtime&gt;, frame_system::extensions::check_weight::CheckWeight&lt;node_runtime::Runtime&gt;, pallet_transaction_payment::ChargeTransactionPayment&lt;node_runtime::Runtime&gt;)&gt;&gt;, node_runtime::RuntimeApi&gt;&gt;`&#xD;&#xA;     |&#xD;&#xA;note: required by a bound in `import_queue`&#xD;&#xA;    --&gt; /home/max/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/client/consensus/babe/src/lib.rs:1736:15&#xD;&#xA;     |&#xD;&#xA;1736 |     Client::Api: BlockBuilderApi&lt;Block&gt; + BabeApi&lt;Block&gt; + ApiExt&lt;Block&gt;,&#xD;&#xA;     |                  ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `import_queue`&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2706" PostHistoryTypeId="1" PostId="748" RevisionGUID="0f06b529-2469-42ff-9212-3b461759b26e" CreationDate="2022-03-14T22:35:44.387" UserId="332" Text="BlockBuilderApi&lt;Block&gt; Trait bounds within node/src/service and rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="2707" PostHistoryTypeId="3" PostId="748" RevisionGUID="0f06b529-2469-42ff-9212-3b461759b26e" CreationDate="2022-03-14T22:35:44.387" UserId="332" Text="|substrate-node|babe|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2710" PostHistoryTypeId="2" PostId="749" RevisionGUID="7fa998e7-9ebc-43ac-acbb-cdac5cdf5e0c" CreationDate="2022-03-15T03:52:22.877" UserId="129" Text="I'm trying to build some ink! contract code ([this one][1]) but I got this error:&#xD;&#xA;```&#xD;&#xA;error: There are multiple `parity-scale-codec` packages in your project, and the specification `parity-scale-codec` is ambiguous.&#xD;&#xA;Please re-run this command with `-p &lt;spec&gt;` where `&lt;spec&gt;` is one of the following:&#xD;&#xA;  parity-scale-codec:2.3.1&#xD;&#xA;  parity-scale-codec:3.1.0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is my cargo.toml file:&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;nft&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Nick Shulhin (Polk4.net) &lt;mshulhin@gmail.com&gt;&quot;]&#xD;&#xA;edition = &quot;2018&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink_primitives = { version = &quot;=3.0.0-rc3&quot;, default-features = false }&#xD;&#xA;ink_metadata = { version = &quot;=3.0.0-rc3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;ink_env = { version = &quot;=3.0.0-rc3&quot;, default-features = false }&#xD;&#xA;ink_storage = { version = &quot;=3.0.0-rc3&quot;, default-features = false }&#xD;&#xA;ink_lang = { version = &quot;=3.0.0-rc3&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;, &quot;full&quot;] }&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;name = &quot;nft&quot;&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;crate-type = [&#xD;&#xA;	# Used for normal contract Wasm blobs.&#xD;&#xA;	&quot;cdylib&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink_metadata/std&quot;,&#xD;&#xA;    &quot;ink_env/std&quot;,&#xD;&#xA;    &quot;ink_storage/std&quot;,&#xD;&#xA;    &quot;ink_primitives/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  [1]: https://github.com/polk4-net/substrate-nft" ContentLicense="CC BY-SA 4.0" />
  <row Id="2712" PostHistoryTypeId="1" PostId="749" RevisionGUID="7fa998e7-9ebc-43ac-acbb-cdac5cdf5e0c" CreationDate="2022-03-15T03:52:22.877" UserId="129" Text="Confilct packages Error in ink! smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="2713" PostHistoryTypeId="3" PostId="749" RevisionGUID="7fa998e7-9ebc-43ac-acbb-cdac5cdf5e0c" CreationDate="2022-03-15T03:52:22.877" UserId="129" Text="|smart-contract|ink|packages|toml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2714" PostHistoryTypeId="2" PostId="750" RevisionGUID="96044bfc-ce56-4d51-a3a6-946adec53a40" CreationDate="2022-03-15T05:33:23.860" UserId="309" Text="I have a function using the following 2 types:&#xD;&#xA;&#xD;&#xA;    pub type BalanceOf&lt;T&gt; = &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;    pub type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;&#xD;&#xA;and I use them to implement a method in a struct using generics:&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Encode, Decode)]&#xD;&#xA;    pub struct Investor&lt;T,U&gt;{&#xD;&#xA;        pub account_id:T,&#xD;&#xA;        pub nft:U,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;T:pallet::Config,U&gt; Investor&lt;T,U&gt;{&#xD;&#xA;        &#xD;&#xA;        pub fn contribute(origin:OriginFor&lt;T&gt;,acc:AccountIdOf&lt;T&gt; ,value:BalanceOf&lt;T&gt;) -&gt; DispatchResult{&#xD;&#xA;            let c1=Contribution::new(&amp;acc,&amp;value);&#xD;&#xA;            let _who = ensure_signed(origin)?;&#xD;&#xA;    		let _now = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;            if ContributionsLog::&lt;T&gt;::contains_key(c1.account){&#xD;&#xA;                ContributionsLog::&lt;T&gt;::mutate(c1.account, |val|{&#xD;&#xA;                    *val += *c1.amount;&#xD;&#xA;                })&#xD;&#xA;            } else {&#xD;&#xA;                ContributionsLog::&lt;T&gt;::insert(&amp;acc,value);&#xD;&#xA;                ContAccounts::&lt;T&gt;::mutate(|val|{&#xD;&#xA;                    val.push(acc);&#xD;&#xA;                })&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            //function taking contribution storage and amount as inputs here&#xD;&#xA;            Ok(().into())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;the problem is when I try to call the contribute method as below&#xD;&#xA;&#xD;&#xA;    Investor::contribute(who,dev.account_id,rent);&#xD;&#xA;&#xD;&#xA;I get the following error:&#xD;&#xA;&#xD;&#xA;&gt; Cannot infer type for type parameter 'T'&#xD;&#xA;&#xD;&#xA;how/where should I define an explicit type for T? " ContentLicense="CC BY-SA 4.0" />
  <row Id="2716" PostHistoryTypeId="1" PostId="750" RevisionGUID="96044bfc-ce56-4d51-a3a6-946adec53a40" CreationDate="2022-03-15T05:33:23.860" UserId="309" Text="Cannot infer type for type parameter 'T'" ContentLicense="CC BY-SA 4.0" />
  <row Id="2717" PostHistoryTypeId="3" PostId="750" RevisionGUID="96044bfc-ce56-4d51-a3a6-946adec53a40" CreationDate="2022-03-15T05:33:23.860" UserId="309" Text="|substrate-node|rust|types|generics|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2718" PostHistoryTypeId="2" PostId="751" RevisionGUID="29f5f377-7cbf-4bf2-b5f3-c1f0399f933d" CreationDate="2022-03-15T05:53:19.877" UserId="28" Text="Rather than call `Investor::contribute(who,dev.account_id,rent);`&#xD;&#xA;&#xD;&#xA;Seems you should call:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Investor::&lt;T, U&gt;::contribute(who,dev.account_id,rent);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And just be explicit with your generics when accessing the `contribute` function." ContentLicense="CC BY-SA 4.0" />
  <row Id="2720" PostHistoryTypeId="2" PostId="752" RevisionGUID="0318ade3-7715-4fbc-9186-24ec5bd0332c" CreationDate="2022-03-15T06:43:13.067" UserId="429" Text="From where do I get the internal logic of --force-authoring flag?&#xD;&#xA;&#xD;&#xA;Here is my scenario:&#xD;&#xA;I've added a custom chain-spec that is similar to the default one where we are setting the environment for --dev flag in my solo chain, and while running the node using the customized chain spec, my node is not producing blocks, and when we are explicitly passing `--force-authoring` flag then the blocks are being produced.&#xD;&#xA;&#xD;&#xA;I don't want to pass the --force-authoring flag explicitly so is there any way to customize it internally?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2722" PostHistoryTypeId="1" PostId="752" RevisionGUID="0318ade3-7715-4fbc-9186-24ec5bd0332c" CreationDate="2022-03-15T06:43:13.067" UserId="429" Text="What is the internal logic of--force-authoring flag?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2723" PostHistoryTypeId="3" PostId="752" RevisionGUID="0318ade3-7715-4fbc-9186-24ec5bd0332c" CreationDate="2022-03-15T06:43:13.067" UserId="429" Text="|authorship|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2724" PostHistoryTypeId="2" PostId="753" RevisionGUID="3b238a96-87cd-4b79-950b-517718bfb0ac" CreationDate="2022-03-15T06:55:07.463" UserId="352" Text="Can I send a balance when my from address and to address are the same?&#xD;&#xA;&#xD;&#xA;The reason for asking these questions is to deal with exceptions during development.&#xD;&#xA;&#xD;&#xA;Of course, I can test it myself, but I don't have a test coin. haha&#xD;&#xA;&#xD;&#xA;we'll have to test it out one more time before it's released, but do you have any information?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2726" PostHistoryTypeId="1" PostId="753" RevisionGUID="3b238a96-87cd-4b79-950b-517718bfb0ac" CreationDate="2022-03-15T06:55:07.463" UserId="352" Text="Can I transfer the balance to the same address on Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2727" PostHistoryTypeId="3" PostId="753" RevisionGUID="3b238a96-87cd-4b79-950b-517718bfb0ac" CreationDate="2022-03-15T06:55:07.463" UserId="352" Text="|polkadot|balances|transactions|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2728" PostHistoryTypeId="6" PostId="752" RevisionGUID="fb3730dc-528a-4a99-865b-db68864e4397" CreationDate="2022-03-15T07:22:46.007" UserId="429" Comment="edited tags" Text="|grandpa|block|finality|authorship|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2729" PostHistoryTypeId="5" PostId="738" RevisionGUID="27d0acb2-9415-4216-a7d7-f6c99be44c51" CreationDate="2022-03-15T07:42:57.867" UserId="83" Comment="question whether these changes are necessary" Text="In [this pull request #19][1] I am trying to merge the following features into a working **parachain** based on the substrate-parachain-template in this [pull request #17 here][2]:&#xD;&#xA;* Added `AccountIndex` to the address [here][3] so it became the following. Previously it was `MultiAddress&lt;AccountId, ()&gt;;`)&#xD;&#xA;```&#xD;&#xA;pub type Address = MultiAddress&lt;AccountId, AccountIndex&gt;;&#xD;&#xA;```&#xD;&#xA;* Added `CreateSignedTransaction` [here][4]. Its purpose is described in [this answer][5]&#xD;&#xA;* Added `SigningTypes` [here][6]&#xD;&#xA;* Used `SendTransactionTypes` [here][7]&#xD;&#xA;&#xD;&#xA;But it generates the errors shown [here][8].&#xD;&#xA;&#xD;&#xA;However, there weren't any errors when I previously made the same changes in the **standalone chain** based on the substrate-node-template (a separate repository) in [this pull request #215][9]. &#xD;&#xA;&#xD;&#xA;What steps could be taken to try to fix the errors?&#xD;&#xA;&#xD;&#xA;How would you satisfying all the unsatisfied trait bounds so the functions `execute_block`, `initialize_block`, `apply_extrinsic`, `finalize_block`, `validate_transaction`, `offchain_worker` may be called?&#xD;&#xA;&#xD;&#xA;How would you make `struct UncheckedExtrinsic` satisfy trait `Checkable&lt;ChainContext&lt;Runtime&gt;&gt;`?&#xD;&#xA;&#xD;&#xA;How would you implement trait `Checkable&lt;ChainContext&lt;Runtime&gt;&gt;` for trait bound `UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, u32&gt;...` in `register_validate_block`, which is required by bound `validate_block`?&#xD;&#xA;&#xD;&#xA;Where is the implementation for `UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt; as Checkable&lt;Lookup&gt;&gt;` that it says it found?&#xD;&#xA;&#xD;&#xA;Update 15th March: I don't think the changes in [pull request #19][1] are necessary, because Kilt's Spiritnet parachain codebase [here][10] that has already live also uses dependencies from Substrate branch 'polkadot-v0.9.17', but even though they are using pallets like pallet_indices, they haven't added `AccountIndex` to `MultiAddress`, and they aren't using `CreateSignedTransaction`, `SigningTypes`, or `SendTransactionTypes`. Similarly with the live Zeitgeist parachain codebase [here][11] isn't using it either.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19&#xD;&#xA;  [2]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/17&#xD;&#xA;  [3]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR128&#xD;&#xA;  [4]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR543&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/724/what-is-the-purpose-of-createsignedtransactionlocalcall&#xD;&#xA;  [6]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR585&#xD;&#xA;  [7]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/19/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR590&#xD;&#xA;  [8]: https://gist.githubusercontent.com/ltfschoen/63b0d904d221a93607e68322ae1c4dde/raw/df97f57f0c6322fcdd1a25fa3e4ec983cba64632/error-datahighway-multiaddress-accountindex.md&#xD;&#xA;  [9]: https://github.com/DataHighway-DHX/node/pull/215/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR1446&#xD;&#xA;  [10]: https://github.com/KILTprotocol/mashnet-node/tree/develop/runtimes&#xD;&#xA;  [11]: https://github.com/zeitgeistpm/zeitgeist/" ContentLicense="CC BY-SA 4.0" />
  <row Id="2730" PostHistoryTypeId="2" PostId="754" RevisionGUID="b4f11595-b2c7-4f3b-a904-edd770f85695" CreationDate="2022-03-15T09:16:19.450" UserId="165" Text="Yes you can, and you will pay for the fees of such a transaction.&#xD;&#xA;And take care of not reaping your account when doing this interaction.What can be avoided by using `KeepAlive` when transacting any balance between two accounts.&#xD;&#xA; &#xD;&#xA;But as you say this is something that you could have tested easily in one of the test public networks:&#xD;&#xA; - [Westend RPC](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.pinknode.io%2Fwestend%2Fexplorer#/explorer)&#xD;&#xA; - [Westend Faucet][1]&#xD;&#xA; - [Rococo RPC][2]&#xD;&#xA; - [Rococo Faucet][3]&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://matrix.to/#/#westend_faucet:matrix.org&#xD;&#xA;  [2]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/explorer&#xD;&#xA;  [3]: https://matrix.to/#/#rococo-faucet:matrix.org" ContentLicense="CC BY-SA 4.0" />
  <row Id="2733" PostHistoryTypeId="2" PostId="755" RevisionGUID="21cb2945-f569-4f2b-8771-82e617115c6a" CreationDate="2022-03-15T10:45:57.143" UserId="139" Text="In your `frame_system::Config` this line : &#xD;&#xA;```rust&#xD;&#xA;    type Lookup = AccountIdLookup&lt;AccountId, ()&gt;;&#xD;&#xA;```&#xD;&#xA;needs to say &#xD;&#xA;```rust&#xD;&#xA;	type Lookup = AccountIdLookup&lt;AccountId, AccountIndex&gt;;&#xD;&#xA;```&#xD;&#xA;This should probably fix your issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="2735" PostHistoryTypeId="2" PostId="756" RevisionGUID="d1db97bf-281b-4484-ba3e-357b67ec5ecc" CreationDate="2022-03-15T11:00:52.630" UserId="139" Text="In Pallet ImOnline configuration&#xD;&#xA;&#xD;&#xA;&gt; `type MaxKeys: Get&lt;u32&gt;` The maximum number of keys that can be added.&#xD;&#xA;&#xD;&#xA;What keys are they talking about? Is it the number of fields from our `SessionsKey` struct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2737" PostHistoryTypeId="1" PostId="756" RevisionGUID="d1db97bf-281b-4484-ba3e-357b67ec5ecc" CreationDate="2022-03-15T11:00:52.630" UserId="139" Text="What is MaxKeys in ImOnline config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2738" PostHistoryTypeId="3" PostId="756" RevisionGUID="d1db97bf-281b-4484-ba3e-357b67ec5ecc" CreationDate="2022-03-15T11:00:52.630" UserId="139" Text="|pallet-imonline|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2739" PostHistoryTypeId="2" PostId="757" RevisionGUID="cea9a8de-7c9f-4729-a214-a8bf62c81eef" CreationDate="2022-03-15T11:05:35.247" UserId="139" Text="All three pallets (babe, grandpa, and authority_discovery) have a field known as `MaxAuthorities`. For a chain, should these values all point to the same number or can they be different?&#xD;&#xA; &#xD;&#xA;From AuthorityDiscovery docs :&#xD;&#xA;&#xD;&#xA;&gt; type MaxAuthorities&#xD;&#xA;&#xD;&#xA;    The maximum number of authorities that can be added.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2741" PostHistoryTypeId="1" PostId="757" RevisionGUID="cea9a8de-7c9f-4729-a214-a8bf62c81eef" CreationDate="2022-03-15T11:05:35.247" UserId="139" Text="Is there a connection between MaxAuthorities from authority_discovery, babe and grandpa?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2742" PostHistoryTypeId="3" PostId="757" RevisionGUID="cea9a8de-7c9f-4729-a214-a8bf62c81eef" CreationDate="2022-03-15T11:05:35.247" UserId="139" Text="|babe|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2743" PostHistoryTypeId="2" PostId="758" RevisionGUID="a348a0e7-68ae-4dac-9d59-26c8723c51ca" CreationDate="2022-03-15T12:09:13.230" UserId="85" Text="ImOnline sends a heartbeat when an authority asks it to. The `MaxKeys` is setting the maximum number of authorities that are allowed to ask for the heartbeat to be sent.&#xD;&#xA;&#xD;&#xA;We try and bound blockchain storage where possible. One of the benefits of this is that the worst case weight is likely to be less with lower bounds and thus users get cheaper fees." ContentLicense="CC BY-SA 4.0" />
  <row Id="2745" PostHistoryTypeId="2" PostId="759" RevisionGUID="6bd97460-0eaa-43a6-8496-32fd91446f97" CreationDate="2022-03-15T12:09:43.877" UserId="170" Text="To answer your question - it's because the versions of your ink dependencies are dependent on different versions of your scale dependencies.&#xD;&#xA;&#xD;&#xA;As @P.Ossun mentioned, with rc-9 it will work with your scale dependencies, I'm not sure you will even be able to build it with rc-3 if you even adjusted the scale dependencies.&#xD;&#xA;&#xD;&#xA;If you will use rc-9, then you will also need to change the version of your package to 2021." ContentLicense="CC BY-SA 4.0" />
  <row Id="2747" PostHistoryTypeId="5" PostId="759" RevisionGUID="aff84e2f-b742-43d9-af7b-897c825a060b" CreationDate="2022-03-15T12:30:53.637" UserId="170" Comment="added 67 characters in body" Text="To answer your question - it's because the versions of your ink dependencies are dependent on different versions of your scale dependencies.&#xD;&#xA;&#xD;&#xA;As [@P.Ossun][1] mentioned, with rc-9 it will work with your scale dependencies, I'm not sure you will even be able to build it with rc-3 if you even adjusted the scale dependencies.&#xD;&#xA;&#xD;&#xA;If you will use rc-9, then you will also need to change the version of your package to 2021.&#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/users/567/p-ossun" ContentLicense="CC BY-SA 4.0" />
  <row Id="2748" PostHistoryTypeId="2" PostId="760" RevisionGUID="a4db4811-a4e9-454c-bcb0-7760c2aa0490" CreationDate="2022-03-15T13:13:08.910" UserId="29" Text="The bootnodes are configured in the chain spec. When you launch additional nodes, you can add bootnodes for that node.&#xD;&#xA;&#xD;&#xA;Have you taken a look at the [node-authorization](https://docs.substrate.io/rustdocs/latest/pallet_node_authorization/index.html) pallet? It has a concept of **well-known** nodes and **sub-nodes** which could fit your use-case.&#xD;&#xA;&#xD;&#xA;If you haven't already take a look at the permissioned network tutorial:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/permissioned-network/&#xD;&#xA;&#xD;&#xA;![](https://docs.substrate.io/static/c97b078a8c85c05733b79aa3c1cf915c/97a96/add_well_known_node.png)&#xD;&#xA;&#xD;&#xA;You can add additional well-known nodes via an extrinsic which can come from sudo **or** governance.&#xD;&#xA;&#xD;&#xA;If you want to integrate governance into your chain, I would start by looking into [pallet_collective](https://paritytech.github.io/substrate/latest/pallet_collective/index.html) and [pallet_democracy](https://paritytech.github.io/substrate/latest/pallet_democracy/index.html).&#xD;&#xA;&#xD;&#xA;For example, you can see the governance pallets Kusama is using here:&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L1391&#xD;&#xA;&#xD;&#xA;... in your case you would not need `PhragmenElection` pallet.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2750" PostHistoryTypeId="5" PostId="760" RevisionGUID="7d0dd630-adf9-4b3f-82e5-fd3ceb5ca4be" CreationDate="2022-03-15T13:21:27.160" UserId="29" Comment="added 193 characters in body" Text="The bootnodes are configured in the chain spec. When you launch additional nodes, you can add bootnodes for that node.&#xD;&#xA;&#xD;&#xA;Have you taken a look at the [node-authorization](https://docs.substrate.io/rustdocs/latest/pallet_node_authorization/index.html) pallet? It has a concept of normal nodes, **well-known** nodes, and **sub-nodes** which could fit your use-case.&#xD;&#xA;&#xD;&#xA;If you haven't already take a look at the permissioned network tutorial:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/permissioned-network/&#xD;&#xA;&#xD;&#xA;![](https://docs.substrate.io/static/394b550f1155ef3c2c4e79d48b028d69/97a96/dave_claim_node.png)&#xD;&#xA;&#xD;&#xA;In your use-case, you could set it up so that anyone can claim a peerId and hence a node.&#xD;&#xA;&#xD;&#xA;![](https://docs.substrate.io/static/c97b078a8c85c05733b79aa3c1cf915c/97a96/add_well_known_node.png)&#xD;&#xA;&#xD;&#xA;You can add additional well-known nodes via an extrinsic which can come from sudo **or** governance.&#xD;&#xA;&#xD;&#xA;If you want to integrate governance into your chain, I would start by looking into [pallet_collective](https://paritytech.github.io/substrate/latest/pallet_collective/index.html) and [pallet_democracy](https://paritytech.github.io/substrate/latest/pallet_democracy/index.html).&#xD;&#xA;&#xD;&#xA;For example, you can see the governance pallets Kusama is using here:&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L1391&#xD;&#xA;&#xD;&#xA;... in your case you would not need `PhragmenElection` pallet.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2751" PostHistoryTypeId="2" PostId="761" RevisionGUID="d095c0a0-6be9-4b9b-82f1-91a1b1c30e82" CreationDate="2022-03-15T13:50:06.457" UserId="165" Text="For your scenario you might find useful the following pallets:&#xD;&#xA;&#xD;&#xA; - [Validator-manager](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/validator_manager.rs) This one is used in Rococo network (PoA).&#xD;&#xA; - [Substrate-validator-set](https://github.com/gautamdhameja/substrate-validator-set) Which can be used for add/remove validators in PoA networks." ContentLicense="CC BY-SA 4.0" />
  <row Id="2753" PostHistoryTypeId="10" PostId="736" RevisionGUID="b6f3df70-09d9-4e69-814a-eb5071229cf6" CreationDate="2022-03-15T14:18:23.067" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;}]}" />
  <row Id="2754" PostHistoryTypeId="2" PostId="762" RevisionGUID="7693e5fc-a73c-459a-b30a-8a6a7aa6a30f" CreationDate="2022-03-15T16:11:06.627" UserId="74" Text="We're working to update our dApp to node 16 and update the dev config to point to the latest polkadot dev config.&#xD;&#xA;&#xD;&#xA;We are using `customize-cra` to customize the babel loaders which looks partially as:&#xD;&#xA;```&#xD;&#xA;module.exports = override(&#xD;&#xA;  ...addExternalBabelPlugins(&#xD;&#xA;    '@babel/plugin-proposal-nullish-coalescing-operator',&#xD;&#xA;    '@babel/plugin-proposal-numeric-separator',&#xD;&#xA;    '@babel/plugin-proposal-optional-chaining',&#xD;&#xA;    ['@babel/plugin-transform-runtime', { &quot;useESModules&quot;: false }],&#xD;&#xA;    '@babel/plugin-proposal-class-properties',&#xD;&#xA;    '@babel/plugin-proposal-private-methods',&#xD;&#xA;    '@babel/plugin-proposal-private-property-in-object',&#xD;&#xA;    '@babel/plugin-syntax-bigint',&#xD;&#xA;    '@babel/plugin-syntax-dynamic-import',&#xD;&#xA;    '@babel/plugin-syntax-import-meta',&#xD;&#xA;    '@babel/plugin-syntax-top-level-await',&#xD;&#xA;    'babel-plugin-styled-components',&#xD;&#xA;  ),&#xD;&#xA;  ...addBabelPlugins(&#xD;&#xA;    '@babel/plugin-proposal-nullish-coalescing-operator',&#xD;&#xA;    '@babel/plugin-proposal-numeric-separator',&#xD;&#xA;    '@babel/plugin-proposal-optional-chaining',&#xD;&#xA;    ['@babel/plugin-transform-runtime', { &quot;useESModules&quot;: false }],&#xD;&#xA;    '@babel/plugin-proposal-class-properties',&#xD;&#xA;    '@babel/plugin-proposal-private-methods',&#xD;&#xA;    '@babel/plugin-proposal-private-property-in-object',&#xD;&#xA;    '@babel/plugin-syntax-bigint',&#xD;&#xA;    '@babel/plugin-syntax-dynamic-import',&#xD;&#xA;    '@babel/plugin-syntax-import-meta',&#xD;&#xA;    '@babel/plugin-syntax-top-level-await',&#xD;&#xA;    'babel-plugin-styled-components',&#xD;&#xA;  ),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We are getting issues as below:&#xD;&#xA;```&#xD;&#xA;Module parse failed: Unexpected token (6:14)&#xD;&#xA;File was processed with these loaders:&#xD;&#xA; * ../../node_modules/react-scripts/node_modules/babel-loader/lib/index.js&#xD;&#xA;You may need an additional loader to handle the result of these loaders.&#xD;&#xA;| export const packageInfo = {&#xD;&#xA;|   name: '@polkadot/api',&#xD;&#xA;&gt;   path: import.meta &amp;&amp; import.meta.url ? new URL('.', import.meta.url).pathname : 'auto',&#xD;&#xA;|   type: 'esm',&#xD;&#xA;|   version: '7.12.1'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any ideas how to resolve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2756" PostHistoryTypeId="1" PostId="762" RevisionGUID="7693e5fc-a73c-459a-b30a-8a6a7aa6a30f" CreationDate="2022-03-15T16:11:06.627" UserId="74" Text="Babel loader issues with polkadotjs and create-react-app" ContentLicense="CC BY-SA 4.0" />
  <row Id="2757" PostHistoryTypeId="3" PostId="762" RevisionGUID="7693e5fc-a73c-459a-b30a-8a6a7aa6a30f" CreationDate="2022-03-15T16:11:06.627" UserId="74" Text="|polkadot-js|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2758" PostHistoryTypeId="2" PostId="763" RevisionGUID="82011a06-8ed5-47fa-a636-5d9509ae48a8" CreationDate="2022-03-15T16:30:22.803" UserId="377" Text="I am working with proxy accounts. In which if i want make transection with by using proxy accounts It will happen like this:&#xD;&#xA;[![perform transaction using proxy][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wyuga.jpg&#xD;&#xA;&#xD;&#xA;As we can see to perform the transection from the proxy account first we need to select the main account by which the proxy account created then we have option to select the proxy option.&#xD;&#xA;&#xD;&#xA;Can do the transection directly from the proxy account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2760" PostHistoryTypeId="1" PostId="763" RevisionGUID="82011a06-8ed5-47fa-a636-5d9509ae48a8" CreationDate="2022-03-15T16:30:22.803" UserId="377" Text="Can we make transaction directly from the proxy account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2761" PostHistoryTypeId="3" PostId="763" RevisionGUID="82011a06-8ed5-47fa-a636-5d9509ae48a8" CreationDate="2022-03-15T16:30:22.803" UserId="377" Text="|pallet|proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2762" PostHistoryTypeId="2" PostId="764" RevisionGUID="4a0aedfa-6f79-4f21-bee0-70b95b120175" CreationDate="2022-03-15T18:27:58.887" UserId="29" Text="`--force-authoring` is defined [here](https://github.com/paritytech/substrate/blob/9eddaec3b8f15eec0c458e7bb3a1c16db91d8199/client/cli/src/config.rs#L408). &#xD;&#xA;&#xD;&#xA;It is part of the [config](https://github.com/paritytech/substrate/blob/9eddaec3b8f15eec0c458e7bb3a1c16db91d8199/client/cli/src/config.rs#L539) so you can call it internally via [`config.force_authoring`](https://github.com/paritytech/substrate/blob/0f070c8020fad552247fd4b43c1a6a4506e456b5/bin/node/cli/src/service.rs#L365)." ContentLicense="CC BY-SA 4.0" />
  <row Id="2764" PostHistoryTypeId="12" PostId="764" RevisionGUID="9f355c0f-406e-4d2e-bf09-a02ecb0ec5b5" CreationDate="2022-03-15T18:52:42.677" UserId="29" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="2765" PostHistoryTypeId="5" PostId="751" RevisionGUID="c72ded48-429b-4110-a2e0-f261104d4aeb" CreationDate="2022-03-15T19:22:01.687" UserId="28" Comment="added 37 characters in body" Text="Rather than call `Investor::contribute(who,dev.account_id,rent);`&#xD;&#xA;&#xD;&#xA;Seems you should call:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Investor::&lt;T::AccountId, u32&gt;::contribute(who,dev.account_id,rent);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And just be explicit with your type definitions of the generics when accessing the `contribute` function." ContentLicense="CC BY-SA 4.0" />
  <row Id="2769" PostHistoryTypeId="2" PostId="765" RevisionGUID="5d1a3a50-780a-4d0e-b7db-dcf1ba9dd14a" CreationDate="2022-03-15T22:12:55.307" UserId="28" Text="No.&#xD;&#xA;&#xD;&#xA;The proxy pallet uses a very simple on-chain storage to map an account to the accounts it can proxy, and with what permissions.&#xD;&#xA;&#xD;&#xA;Thus, to initiate any of those proxy operations, you must first start with a transaction coming from the account which has permissions to be the proxy for the account.&#xD;&#xA;&#xD;&#xA;If you want to make calls directly from the proxied account, you will need to know its private key, and in that case, its not really a &quot;proxied account&quot; anymore, just a regular account..." ContentLicense="CC BY-SA 4.0" />
  <row Id="2771" PostHistoryTypeId="4" PostId="752" RevisionGUID="961b23bf-7f7f-42a7-9a63-33b8cd3f4438" CreationDate="2022-03-15T22:13:34.523" UserId="28" Comment="edited tags; edited title" Text="What is the internal logic of `--force-authoring` flag?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2772" PostHistoryTypeId="6" PostId="752" RevisionGUID="961b23bf-7f7f-42a7-9a63-33b8cd3f4438" CreationDate="2022-03-15T22:13:34.523" UserId="28" Comment="edited tags; edited title" Text="|grandpa|block|finality|authorship|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2773" PostHistoryTypeId="2" PostId="766" RevisionGUID="84bda07c-e6d8-4a42-843b-e3e93f7cc695" CreationDate="2022-03-15T23:00:37.600" UserId="629" Text="I think the issue can be solved either by using a [babel transform](https://www.npmjs.com/package/babel-plugin-transform-import-meta) or maybe not using the `import.meta.url` as can be seen in your error: &#xD;&#xA;```&#xD;&#xA;import.meta &amp;&amp; import.meta.url ? new URL('.', import.meta.url).pathname : 'auto'`&#xD;&#xA;```&#xD;&#xA;as the starting `import.meta.url` returns this error.&#xD;&#xA;&#xD;&#xA;Maybe a simpler solution would be to:&#xD;&#xA;```&#xD;&#xA;const url = new URL('.', import.meta.url);&#xD;&#xA;const result = url?.pathName || 'auto';&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2775" PostHistoryTypeId="2" PostId="767" RevisionGUID="2b46e753-77cd-4ea9-b975-0b8b251ae4b0" CreationDate="2022-03-15T23:56:13.663" UserId="543" Text="I'm encountering an issue where a contract is only able to called functions in my chain extension if they are enumerated with function ids 0 and 1.&#xD;&#xA;&#xD;&#xA;My chain extension has four functions, lets say func1, func2, func3, and func4, with function ids enumerated as 1, 2, 3, 4 (1 -&gt; func1, ..., 4 -&gt; func4). Accordingly, in my contract I registered the chain extension with the appropriate function ids. With this configuration (see code below), I was only able to execute the function associated with function id 1, with function ids 2, 3, and 4 resulting in the contract being trapped when invoked from the contract. I have verified that the functions work and are callable by modifying the contract and extension and testing with func1 as func id = 1, func2 as func id = 1, and so on (i.e. when mapping 1 =&gt; funcN it works without getting trapped, but x &gt; 1 =&gt; funcN does is always trapped). &#xD;&#xA;&#xD;&#xA;The chain extension:&#xD;&#xA;    &#xD;&#xA;    impl ChainExtension&lt;Runtime&gt; for IrisExtension {&#xD;&#xA;    fn call&lt;E: Ext&gt;(&#xD;&#xA;        func_id: u32,&#xD;&#xA;        env: Environment&lt;E, InitState&gt;,&#xD;&#xA;    ) -&gt; Result&lt;RetVal, DispatchError&gt;&#xD;&#xA;    where&#xD;&#xA;        &lt;E::T as SysConfig&gt;::AccountId:&#xD;&#xA;            UncheckedFrom&lt;&lt;E::T as SysConfig&gt;::Hash&gt; + AsRef&lt;[u8]&gt;,&#xD;&#xA;    {&#xD;&#xA;        match func_id {	&#xD;&#xA;            1 =&gt; {&#xD;&#xA;                // read args and call extrinsic 1&#xD;&#xA;				Ok(RetVal::Converging(func_id))&#xD;&#xA;            },&#xD;&#xA;			2 =&gt; {&#xD;&#xA;				// read args and call extrinsic 2&#xD;&#xA;				Ok(RetVal::Converging(func_id))&#xD;&#xA;			},&#xD;&#xA;			3 =&gt; {&#xD;&#xA;				...&#xD;&#xA;			},&#xD;&#xA;			4 =&gt; {&#xD;&#xA;                ...&#xD;&#xA;			},&#xD;&#xA;            _ =&gt; {&#xD;&#xA;                error!(&quot;Called an unregistered `func_id`: {:}&quot;, func_id);&#xD;&#xA;                return Err(DispatchError::Other(&quot;Unimplemented func_id&quot;))&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and in the contract:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[ink(extension = 1, returns_result = false)]&#xD;&#xA;    fn func1(caller: ink_env::AccountId, target: ink_env::AccountId, asset_id: u32, amount: u64) -&gt; [u8; 32];&#xD;&#xA;&#xD;&#xA;    #[ink(extension = 2, returns_result = false)]&#xD;&#xA;    fn func2(caller: ink_env::AccountId, target: ink_env::AccountId, asset_id: u32, amount: u64) -&gt; [u8; 32];&#xD;&#xA;&#xD;&#xA;    #[ink(extension = 3, returns_result = false)]&#xD;&#xA;    fn func3(amount: u64) -&gt; [u8; 32];&#xD;&#xA;&#xD;&#xA;    #[ink(extension = 4, returns_result = false)]&#xD;&#xA;    fn func4(target: ink_env::AccountId) -&gt; [u8; 32];&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Further, I updated the enumeration to start from 0, so 0, 1, 2, 3, and now I'm able to execute functions with func id 0 or 1, but 2 and 3 result in contract trapped (but if I update the configuration so those functions that results in contract trapped are enumerated with 0 and 1, they work, but the previously functioning functions which are now enumerated with 2 and 3 become trapped, i.e. (0 =&gt; funcN, 1 =&gt; funcM both work, but 2 =&gt; funcN results in COntractTrapped). I tried enumerating as 0, 1, 10, 100 as well, with the same behavior. Only func id 0 and 1 allow me to call the chain extension, all others result in ContractTrapped.&#xD;&#xA;&#xD;&#xA;My contract: https://github.com/driemworks/contracts/blob/dev/iris_asset_exchange/lib.rs&#xD;&#xA;&#xD;&#xA;My chain extension: https://github.com/driemworks/substrate/blob/4d001219e3c8ac41c15bd646d25e3b9caccc8e3b/bin/node-template/runtime/src/lib.rs#L847" ContentLicense="CC BY-SA 4.0" />
  <row Id="2777" PostHistoryTypeId="1" PostId="767" RevisionGUID="2b46e753-77cd-4ea9-b975-0b8b251ae4b0" CreationDate="2022-03-15T23:56:13.663" UserId="543" Text="Chain Extension func_id enumeration is resulting in ContractTrapped for func ids greater than 1" ContentLicense="CC BY-SA 4.0" />
  <row Id="2778" PostHistoryTypeId="3" PostId="767" RevisionGUID="2b46e753-77cd-4ea9-b975-0b8b251ae4b0" CreationDate="2022-03-15T23:56:13.663" UserId="543" Text="|smart-contract|ink|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2779" PostHistoryTypeId="10" PostId="663" RevisionGUID="69d95ed4-763e-4544-a294-7bf8e828754c" CreationDate="2022-03-16T00:18:27.607" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:103,&quot;DisplayName&quot;:&quot;user1271772&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;}]}" />
  <row Id="2781" PostHistoryTypeId="2" PostId="768" RevisionGUID="c72f6b59-7150-4116-aae2-a7af2460f00b" CreationDate="2022-03-16T01:04:38.683" UserId="543" Text="I figured it out. I had not added the additional function ids to the FromStatusCode implementation. After updating it to the below, it works as intended.&#xD;&#xA;&#xD;&#xA;    impl ink_env::chain_extension::FromStatusCode for IrisErr {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Err(Self::FailTransferAsset),&#xD;&#xA;            1 =&gt; Err(Self::FailMintAssets),&#xD;&#xA;            2 =&gt; Err(Self::FailLockCurrency),&#xD;&#xA;            3 =&gt; Err(Self::FailUnlockCurrency),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2785" PostHistoryTypeId="2" PostId="769" RevisionGUID="2908bd52-38ee-4f1f-8e6f-42334c846289" CreationDate="2022-03-16T05:57:57.803" UserId="580" Text="Finally I get the answer of my question : it was a silly network issue. What's sad is that I forced --bootnodes '...' options in my collator startup command but it didn't raise any connection issue. &#xD;&#xA;&#xD;&#xA;As adding this parameter is not explicitly described in the tutorial, I don't know if it make sense to create a ticket so that we get explicit network issue log error ..." ContentLicense="CC BY-SA 4.0" />
  <row Id="2787" PostHistoryTypeId="5" PostId="663" RevisionGUID="0318655f-df7c-4926-9fd9-de14eabcd11c" CreationDate="2022-03-16T06:04:21.293" UserId="580" Comment="added 429 characters in body" Text="after reading and executing [Start a private network](https://docs.substrate.io/tutorials/v3/private-network/), I managed successfully same exercise with polkadot-local spec chain base. &#xD;&#xA;&#xD;&#xA;Now I would like to do same exercise but this time with rococo local spec but here I'm locked cause I don't know how to add new keys in the session part of the file. Indeed, I don't see any helpfull documentation which explain what is the `beefy` protocol and how to fill it...&#xD;&#xA;&#xD;&#xA;Indeed it seems rococo spec add this protocol when comparing sessions sections between polkadot-local and rococo-local spec : &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Polkadot local session section :*&#xD;&#xA;```&#xD;&#xA;      &quot;session&quot;: {&#xD;&#xA;        &quot;keys&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&#xD;&#xA;            &quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&#xD;&#xA;            {&#xD;&#xA;              &quot;grandpa&quot;: &quot;5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu&quot;,&#xD;&#xA;              &quot;babe&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;              &quot;im_online&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;              &quot;para_validator&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;              &quot;para_assignment&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;              &quot;authority_discovery&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;            &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;            {&#xD;&#xA;              &quot;grandpa&quot;: &quot;5GoNkf6WdbxCFnPdAnYYQyCjAKPJgLNxXwPjwTh6DGg6gN3E&quot;,&#xD;&#xA;              &quot;babe&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;              &quot;im_online&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;              &quot;para_validator&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;              &quot;para_assignment&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;              &quot;authority_discovery&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;&#xD;&#xA;            }&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Rococo local session section :*&#xD;&#xA;```&#xD;&#xA;&quot;session&quot;: {&#xD;&#xA;  &quot;keys&quot;: [&#xD;&#xA;    [&#xD;&#xA;      &quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&#xD;&#xA;      &quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&#xD;&#xA;      {&#xD;&#xA;        &quot;grandpa&quot;: &quot;5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu&quot;,&#xD;&#xA;        &quot;babe&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;        &quot;im_online&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;        &quot;para_validator&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;        &quot;para_assignment&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;        &quot;authority_discovery&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;        &quot;beefy&quot;: &quot;KW39r9CJjAVzmkf9zQ4YDb2hqfAVGdRqn53eRqyruqpxAP5YL&quot;&#xD;&#xA;      }&#xD;&#xA;    ],&#xD;&#xA;    [&#xD;&#xA;      &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;      &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;      {&#xD;&#xA;        &quot;grandpa&quot;: &quot;5GoNkf6WdbxCFnPdAnYYQyCjAKPJgLNxXwPjwTh6DGg6gN3E&quot;,&#xD;&#xA;        &quot;babe&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;        &quot;im_online&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;        &quot;para_validator&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;        &quot;para_assignment&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;        &quot;authority_discovery&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;        &quot;beefy&quot;: &quot;KWByAN7WfZABWS5AoWqxriRmF5f2jnDqy3rB5pfHLGkY93ibN&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  ]&#xD;&#xA;},&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can come of you tell me moe about this `beefy` protocol ? &#xD;&#xA;&#xD;&#xA;Thank you :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;--- &#xD;&#xA;&#xD;&#xA;Edit: don't really know why this question has been closed. Looking feedbacks from substrate it tells it should tells about one subject. Well let me know if you see other subject than `beefy` protocol here.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Last but not least, that link provides me answer to that question : https://github.com/paritytech/grandpa-bridge-gadget&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/AzUmU.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="2788" PostHistoryTypeId="2" PostId="770" RevisionGUID="959ab701-8da6-4be7-bf1f-732ef282b692" CreationDate="2022-03-16T06:45:40.300" UserId="632" Text="hello is there a way to decode this kind of extrinsic on substrate side without polkadotJs : &#xD;&#xA;&#xD;&#xA;extrinsics: [0402000b935b2a697f01, 84003c2eb55ba53099bea9031b4a30c9a553c29f7c4a3a9f266d6208954268aa8825014031ae12b4edb8b6f49e407b88f21022460e523d57337b70a46ce23765d4b645cd4f05fefaf77be348994429492d1c923ce1a3bbe00a5397e809fbac72864d8dc5031000050000d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d02093d00]? &#xD;&#xA;&#xD;&#xA;I think that 0402000b935b2a697f01 is set timestamp for example.&#xD;&#xA;&#xD;&#xA;thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="2790" PostHistoryTypeId="1" PostId="770" RevisionGUID="959ab701-8da6-4be7-bf1f-732ef282b692" CreationDate="2022-03-16T06:45:40.300" UserId="632" Text="Decode extrinsic on substrate side" ContentLicense="CC BY-SA 4.0" />
  <row Id="2791" PostHistoryTypeId="3" PostId="770" RevisionGUID="959ab701-8da6-4be7-bf1f-732ef282b692" CreationDate="2022-03-16T06:45:40.300" UserId="632" Text="|substrate-node|extrinsic|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2792" PostHistoryTypeId="5" PostId="737" RevisionGUID="566f70f0-c60c-455d-a592-5846f0edc2ec" CreationDate="2022-03-16T06:52:57.520" UserId="83" Comment="specify requirement to change parachain id" Text="Obtain the &quot;raw&quot; chain definition that you originally used to launch polkadot-launch after copying the latest binary of your parachain to the polkadot-launch bin/ directory. Ensure you are using substrate-parachain-template branch 'polkadot-v0.9.17'.&#xD;&#xA;&#xD;&#xA;In substrate-parachain-template chain_spec.rs, change the parachain id values from 1000 to 2000 (i.e. find/replace `&quot;1000.into(),&quot;` with `&quot;2000.into(),&quot;`, find/replace `&quot;para_id: 1000,&quot;` with `&quot;para_id: 2000,&quot;`). Also change `&quot;&quot; | &quot;local&quot;` to `&quot;&quot; | &quot;local&quot; | &quot;rococo-local&quot;`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./polkadot-launch/bin/parachain-collator build-spec --chain &quot;rococo-local&quot; --disable-default-bootnode &gt; rococo-local-parachain-2000-plain.json&#xD;&#xA;./polkadot-launch/bin/parachain-collator build-spec --chain rococo-local-parachain-2000-plain.json --raw --disable-default-bootnode &gt; rococo-local-parachain-2000-raw.json&#xD;&#xA;cp rococo-local-parachain-2000-raw.json ../&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Obtain Alice's secret seed `0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a` by running the following&#xD;&#xA;```&#xD;&#xA;subkey inspect //Alice&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Add the `KeySubcommand` to the CLI of your substrate-parachain-template so you can run `parachain-collator key insert` in the next step, as shown in this [example][1].&#xD;&#xA;&#xD;&#xA;Insert Alice's session key&#xD;&#xA;```&#xD;&#xA;./polkadot-launch/bin/parachain-collator key insert \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--chain ./polkadot-launch/rococo-local-parachain-2000-raw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri 0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a \&#xD;&#xA;--key-type aura&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Restart polkadot-launch.&#xD;&#xA;&#xD;&#xA;Add another collator node manually. Use an existing bootnode below that you obtain from the logs when you run polkadot-launch. Use the correct Rococo relay chain &quot;raw&quot; chain definition for rococo-local-raw.json below for Polkadot branch 'v0.9.17' and the correct ports.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./polkadot-launch/bin/parachain-collator \&#xD;&#xA;	--collator \&#xD;&#xA;	--alice \&#xD;&#xA;	--chain ./polkadot-launch/rococo-local-parachain-2000-raw.json \&#xD;&#xA;	--base-path /tmp/parachain/alice \&#xD;&#xA;	--bootnodes /ip4/127.0.0.1/tcp/30336/p2p/&lt;INSERT_BOOTNODE_ID&gt; \&#xD;&#xA;	--name &quot;DataHighway-Collator-Alice&quot; \&#xD;&#xA;	--force-authoring \&#xD;&#xA;	--port 31400 \&#xD;&#xA;	--rpc-port 9933 \&#xD;&#xA;	--ws-port 9977 \&#xD;&#xA;	--unsafe-ws-external \&#xD;&#xA;	--unsafe-rpc-external \&#xD;&#xA;	--rpc-cors=all \&#xD;&#xA;	--rpc-methods=Unsafe \&#xD;&#xA;	-- \&#xD;&#xA;	--execution wasm \&#xD;&#xA;	--chain ./polkadot-launch/rococo-local-raw.json \&#xD;&#xA;	--port 30444 \&#xD;&#xA;	--rpc-port 9944 \&#xD;&#xA;	--ws-port 9955&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check that the parachain generates and finalizes blocks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/DataHighway-Parachain/pull/11/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="2793" PostHistoryTypeId="5" PostId="736" RevisionGUID="1c68c83b-b335-4607-9688-473d8a85d49e" CreationDate="2022-03-16T10:31:35.103" UserId="530" Comment="added 110 characters in body" Text="[Parachain url](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.parachain-collator-1.c1.sora2.soramitsu.co.jp#/explorer)&#xD;&#xA;[Repository](https://github.com/sora-xor/sora2-parachain)&#xD;&#xA;&#xD;&#xA;The parachain is based on polkadot-v0.9.13 that was the latest at the time of release.&#xD;&#xA;&#xD;&#xA;The logs have neither warnings nor errors.&#xD;&#xA;&#xD;&#xA;What can we do?&#xD;&#xA;&#xD;&#xA;We have two collators and they have connection to each other and there is a connection to the relay chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="2794" PostHistoryTypeId="5" PostId="736" RevisionGUID="692d2ea1-6dd4-45e2-9215-bdc41557eb4c" CreationDate="2022-03-16T10:51:24.597" UserId="530" Comment="added 44 characters in body" Text="[Parachain url](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.parachain-collator-1.c1.sora2.soramitsu.co.jp#/explorer)&#xD;&#xA;[Repository](https://github.com/sora-xor/sora2-parachain)&#xD;&#xA;&#xD;&#xA;The parachain is based on polkadot-v0.9.13 that was the latest at the time of release.&#xD;&#xA;&#xD;&#xA;The logs have neither warnings nor errors.&#xD;&#xA;&#xD;&#xA;What can we do?&#xD;&#xA;&#xD;&#xA;We have two collators and they have connection to each other and there is a connection to the relay chain.&#xD;&#xA;&#xD;&#xA;There is no message &quot;Starting collation&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2796" PostHistoryTypeId="2" PostId="771" RevisionGUID="c1526d32-afd3-4931-820b-c1afea12dc64" CreationDate="2022-03-16T11:26:23.010" UserId="258" Text="I am trying to write a test on PolkadotJS to `chill` Charlie Account so as to remove Charlie as a validator and then ascertain that Charlie has been removed. But, Charlie does not seem to have been removed as a validator, although the Chilled event got triggered on the Polkadot UI explorer.&#xD;&#xA;&#xD;&#xA;        let call = polkadotApi.tx.staking.chill();&#xD;&#xA;		await call.signAndSend(charlieStash);&#xD;&#xA;&#xD;&#xA;More so, could it be that because Charlie is an invulnerable, that's why i cannot chill Charlie? If so, is there an extrinsic to call so as to remove Charlie as an invulnerable at first before calling `chill`?&#xD;&#xA;&#xD;&#xA;      " ContentLicense="CC BY-SA 4.0" />
  <row Id="2798" PostHistoryTypeId="1" PostId="771" RevisionGUID="c1526d32-afd3-4931-820b-c1afea12dc64" CreationDate="2022-03-16T11:26:23.010" UserId="258" Text="Writing a test to call staking.chill() so as to remove Charlie as a Validator" ContentLicense="CC BY-SA 4.0" />
  <row Id="2799" PostHistoryTypeId="3" PostId="771" RevisionGUID="c1526d32-afd3-4931-820b-c1afea12dc64" CreationDate="2022-03-16T11:26:23.010" UserId="258" Text="|substrate-node|polkadot-js|staking|session|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2800" PostHistoryTypeId="2" PostId="772" RevisionGUID="f7eb3053-bf8c-4715-8dfc-3704aed8f8e6" CreationDate="2022-03-16T13:09:50.980" UserId="28" Text="No, the issue here is not related to invulnerables.&#xD;&#xA;&#xD;&#xA;Invulnerables are only immune to getting slashed when an offence occurs.&#xD;&#xA;&#xD;&#xA;Instead, the issue here is probably that you need to wait a full session for the validator set to change, you should not expect that a chill action like this takes place immediately." ContentLicense="CC BY-SA 4.0" />
  <row Id="2802" PostHistoryTypeId="2" PostId="773" RevisionGUID="3a8a6296-4f2e-4dc0-af35-2ede735c6259" CreationDate="2022-03-16T13:15:27.663" UserId="28" Text="Yes, all the information you need to decode those extrinsic blobs can be found using the Runtime Metadata.&#xD;&#xA;&#xD;&#xA;The first two bytes of any extrinsic will tell you which pallet and call is being made:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;vv pallet&#xD;&#xA;0402000b935b2a697f01&#xD;&#xA;  ^^ call&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So you want to look at your runtime metadata, and find which pallet is the 4th index (the 5th pallet), and which call is the 2nd index (the 3rd call).&#xD;&#xA;&#xD;&#xA;I think in this case that this is NOT the timestamp set call, since timestamp only has 1 extrinsic, so the call index would never be `02`." ContentLicense="CC BY-SA 4.0" />
  <row Id="2804" PostHistoryTypeId="2" PostId="774" RevisionGUID="2fdef806-e7d3-416e-8cb5-48a5eb8bcf90" CreationDate="2022-03-16T13:35:16.937" UserId="28" Text="I get a different set of behaviors when running my node with `--dev` than when I run my node with my own custom setup.&#xD;&#xA;&#xD;&#xA;What is happening in the background?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2806" PostHistoryTypeId="1" PostId="774" RevisionGUID="2fdef806-e7d3-416e-8cb5-48a5eb8bcf90" CreationDate="2022-03-16T13:35:16.937" UserId="28" Text="What does the `--dev` flag do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2807" PostHistoryTypeId="3" PostId="774" RevisionGUID="2fdef806-e7d3-416e-8cb5-48a5eb8bcf90" CreationDate="2022-03-16T13:35:16.937" UserId="28" Text="|cli|dev|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2808" PostHistoryTypeId="2" PostId="775" RevisionGUID="9fa0ca08-ce56-4416-b70f-bcd0387e802c" CreationDate="2022-03-16T13:36:17.607" UserId="28" Text="When launching a chain with `--dev`, you are in the background enabling a specific set of CLI flags.&#xD;&#xA;&#xD;&#xA;From the code comments:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`,&#xD;&#xA;/// `--alice`, and `--tmp` flags, unless explicitly overridden.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, if you want to have a similar behavior to `--dev`, but using your own setup, keep in mind the flags above." ContentLicense="CC BY-SA 4.0" />
  <row Id="2810" PostHistoryTypeId="5" PostId="480" RevisionGUID="3c7deaf1-adff-4743-9280-5ced647e7e52" CreationDate="2022-03-16T14:35:50.140" UserId="167" Comment="some crate names are not mentioned correctly. " Text="Just breezing through the docs for both crates, I can see that they both provide an implementation of phragmen's election algorithm, where `sp_npos_elections` provides an additional `PhragMMS` and `Balancing` algorithms, which I assume are different ways of electing from a voter snapshot. &#xD;&#xA;&#xD;&#xA;In the substrate code base, we can see that for `election_provider_multi_phase` config, it takes a `Solver` from `frame_election_provider_support`. I could only see `pallet_election_phragmen` however being used in the `pallet_tips` Config. &#xD;&#xA;&#xD;&#xA;I am confused why two separate implementations of phragmen election would be provided. If I were to look at this code for the first time my guess would've been that the `Solver` type should be define like so `type Solver = Elections` where Elections -&gt; pallet_election_phragmen. But apparently that's not the case.&#xD;&#xA;&#xD;&#xA;So between `frame_election_provider_support`, `sp_npos_elections`, and `pallet-elections-phragmen`, which is appropriate for what scenario?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2811" PostHistoryTypeId="24" PostId="480" RevisionGUID="3c7deaf1-adff-4743-9280-5ced647e7e52" CreationDate="2022-03-16T14:35:50.140" Comment="Proposed by 167 approved by 59 edit id of 77" ContentLicense="CC BY-SA 4.0" />
  <row Id="2812" PostHistoryTypeId="5" PostId="665" RevisionGUID="b1dcdd87-b3e5-44d6-a8a0-e2e6ed89580d" CreationDate="2022-03-16T14:39:52.517" UserId="59" Comment="Improved formatting and grammar. Asked a question in the title, removed &quot;thanks&quot;" Text="I'm going through the different tutorials and I discovered `rococo-local` and `polkadot-local` network and now I would like to hack these networks to define my own pre-configured accounts (ie: replace alice, alice-stash, bob, bob-stash, charlie ... accounts with my own).&#xD;&#xA;&#xD;&#xA;I didn't see the appropriate tutorials for such exercise and I begin think I need to add my own spec programmatically. &#xD;&#xA;&#xD;&#xA;Can some of you push me some interesting advice and/or documentations link to help me managing that? " ContentLicense="CC BY-SA 4.0" />
  <row Id="2813" PostHistoryTypeId="4" PostId="665" RevisionGUID="b1dcdd87-b3e5-44d6-a8a0-e2e6ed89580d" CreationDate="2022-03-16T14:39:52.517" UserId="59" Comment="Improved formatting and grammar. Asked a question in the title, removed &quot;thanks&quot;" Text="How can you setup your own pre-configured account in a relay/parachain spec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2814" PostHistoryTypeId="2" PostId="776" RevisionGUID="871fb336-5374-4bb6-bc79-03758196901b" CreationDate="2022-03-16T14:52:24.830" UserId="28" Text="The `--force-authoring` flag tells a node to produce blocks when it is &quot;offline&quot;, i.e. has no other peers.&#xD;&#xA;&#xD;&#xA;By default, a node assumes if it has no peers, that it is not connected to the internet or any other nodes, and thus should not try to produce blocks since it would be building on its own fork, and this could be bad if suddenly chains got back online again and had to resolve all those forks.&#xD;&#xA;&#xD;&#xA;However, if you are running a single node test network, you absolutely do want to produce blocks without any peers, so you include the `--force-authoring` flag to do that.&#xD;&#xA;&#xD;&#xA;&gt; I don't want to pass the --force-authoring flag explicitly so is there any way to customize it internally?&#xD;&#xA;&#xD;&#xA;You can probably customize your own nodes CLI to have a single flag which wraps certain behaviors like `--force-authoring`, but it doesn't sound like the cost of adding such a custom behavior is worth just adding a few characters to starting your node." ContentLicense="CC BY-SA 4.0" />
  <row Id="2820" PostHistoryTypeId="2" PostId="778" RevisionGUID="e98851fd-3525-436c-aa3a-b8a0d8cffce9" CreationDate="2022-03-16T15:41:17.673" UserId="140" Text="how to get pallet index (u8) of a pallet in runtime? &#xD;&#xA;&#xD;&#xA;I have a scenario, where I have to add filter like this https://github.com/AcalaNetwork/Acala/blob/master/runtime/acala/src/lib.rs#L187&#xD;&#xA;&#xD;&#xA; but method would accept `u8` pallet index instead of `Call`" ContentLicense="CC BY-SA 4.0" />
  <row Id="2822" PostHistoryTypeId="1" PostId="778" RevisionGUID="e98851fd-3525-436c-aa3a-b8a0d8cffce9" CreationDate="2022-03-16T15:41:17.673" UserId="140" Text="How to get pallet index (u8) of a pallet in runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2823" PostHistoryTypeId="3" PostId="778" RevisionGUID="e98851fd-3525-436c-aa3a-b8a0d8cffce9" CreationDate="2022-03-16T15:41:17.673" UserId="140" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2828" PostHistoryTypeId="2" PostId="780" RevisionGUID="3205ce74-c4ad-4170-9417-f70032b30b25" CreationDate="2022-03-16T19:46:43.083" UserId="638" Text="We've seen a significant slow down of block time on Kusama. It seems that this may be related to the deployment od client v0.9.16.&#xD;&#xA;&#xD;&#xA;It is clear what is behind the slow down?&#xD;&#xA;&#xD;&#xA;If so, how close are we to having a solution in place?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2830" PostHistoryTypeId="1" PostId="780" RevisionGUID="3205ce74-c4ad-4170-9417-f70032b30b25" CreationDate="2022-03-16T19:46:43.083" UserId="638" Text="Is it clear what is behind the block time slow down we're seeing in Kusama Parachains, and how close is it to being solved?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2831" PostHistoryTypeId="3" PostId="780" RevisionGUID="3205ce74-c4ad-4170-9417-f70032b30b25" CreationDate="2022-03-16T19:46:43.083" UserId="638" Text="|parachain|kusama|block|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2832" PostHistoryTypeId="2" PostId="781" RevisionGUID="4a5fe361-2c01-4083-8f1b-e5bda1a8b836" CreationDate="2022-03-16T20:18:34.310" UserId="34" Text="Not completely clear yet, you can track the progress here: https://github.com/paritytech/polkadot/issues/4911" ContentLicense="CC BY-SA 4.0" />
  <row Id="2834" PostHistoryTypeId="2" PostId="782" RevisionGUID="6b02ac89-37ee-45cc-ae65-d6a70bb8fb75" CreationDate="2022-03-16T21:00:53.720" UserId="85" Text="The `--dev` flag ensures that the chain starts from genesis each time the process starts (This is what the `--tmp` flag does).&#xD;&#xA;&#xD;&#xA;The other thing that can be handy is the compile time feature `--feature fast-runtime` which speeds up things like democracy so you don't have to wait the standard times (obviously this is only designed for test networks)." ContentLicense="CC BY-SA 4.0" />
  <row Id="2841" PostHistoryTypeId="2" PostId="783" RevisionGUID="a710c5c7-097d-4456-8ecc-ab7019c8edc9" CreationDate="2022-03-16T23:02:00.463" UserId="85" Text="I think making subxt be no std compatible would seem to be the best way to go. &#xD;&#xA;https://github.com/paritytech/subxt/issues/208&#xD;&#xA;&#xD;&#xA;No one has yet given it a crack with a PR, but all the on chain code is no_std so it's probably doable. (There are a few other IOT parachain/threads so maybe check with them too - https://parachains.info/details/nodle_iot and https://www.radom.network/ )" ContentLicense="CC BY-SA 4.0" />
  <row Id="2843" PostHistoryTypeId="2" PostId="784" RevisionGUID="0685107d-8c93-4d0e-a02a-131f3580cc5c" CreationDate="2022-03-16T23:05:33.763" UserId="83" Text="If we want to connect a parachain to Rococo's 'rococo-local' relay chain we follow this [Cumulus tutorial][1] using [polkadot-launch][2]. Part of the pre-launch steps mentioned [here][3] is to minimize your runtime size by pruning the functionality, and to then do [incremental upgrades][4] when the parachain is live to include the missing pallets again.&#xD;&#xA;&#xD;&#xA;However, Rococo's relay chain currently has a `maxCodeSize` of only ~3.15 MB, and if you build the [substrate-parachain-template][5] using branch 'polkadot_v0.9.17' with `cargo build --release` it generates a file /target/release/wbuild/parachain-template-runtime.compact.wasm that is ~2.9 MB. If you add the Sudo pallet to it so you can do the incremental upgrades then building it generates an even larger file of ~3.0, which may not allow enough space for you to do the incremental upgrades to include the missing pallets again during your [launch simulation][6] on the Rococo production testnet before launching on Kusama's production mainnet.&#xD;&#xA;&#xD;&#xA;If you add more pallets than just Sudo and the Scheduler pallet by following [Substrate's Forkless Upgrades][7] tutorial then you might exceed the `maxCodeSize` and [Polkadot.js Apps][8] may generate an error `Bytes:: Maximum call stack size exceeded` or `Invalid Transaction: Transaction would exhaust the block limits` and prevent the runtime upgrade.&#xD;&#xA;&#xD;&#xA;Meanwhile, Kusama's relay chain currently has a `maxCodeSize` of ~10.5 MB, which may be sufficient to include all your pallets. There would be a requirement for an initial 3.0 MB for the genesis build of substrate-parachain-template branch 'polkadot_v0.9.17' (plus Sudo pallet to allow you to perform runtime upgrades), then a further 1.5 MB for the 1st runtime upgrade to add ~15 pallets like preimage, scheduler, democracy, referenda, conviction voting, council collective, technical collective, elections phragmen, tips, treasury, bounties, child bounties, assets, multisig, identity, proxy, and recovery, and then a further 1.5 MB for a 2nd runtime upgrade to add ~25 of our own custom pallets to increase it a total code size of the parachain-template-runtime.compact.wasm file to ~6 MB, which would still be less than Kusama's `maxCodeSize`.&#xD;&#xA;&#xD;&#xA;What is the benefit of Rococo's `maxCodeSize` being smaller Kusama's `maxCodeSize`?&#xD;&#xA;&#xD;&#xA;If Rococo's `maxCodeSize` only allows you to make some small runtime upgrades, but isn't large enough for you to add all your missing pallets when your parachain is live on it as [incremental upgrades][4] after pruning them all to minimize the runtime size for genesis, should you just assume that the remaining runtime upgrades will work on Kusama and proceed to doing it on Kusama instead?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-launch&#xD;&#xA;  [3]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#3-minimize-your-runtime-size&#xD;&#xA;  [4]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#6-incremental-runtime-deployments&#xD;&#xA;  [5]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [6]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#7-launch-simulation&#xD;&#xA;  [7]: https://docs.substrate.io/tutorials/v3/forkless-upgrades/#prepare-an-upgraded-runtime&#xD;&#xA;  [8]: https://polkadot.js.org/apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="2845" PostHistoryTypeId="1" PostId="784" RevisionGUID="0685107d-8c93-4d0e-a02a-131f3580cc5c" CreationDate="2022-03-16T23:05:33.763" UserId="83" Text="`Bytes:: Maximum call stack size exceeded` doing runtime upgrade using substrate-parachain-template branch 'polkadot_v0.9.17' on rococo-local chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="2846" PostHistoryTypeId="3" PostId="784" RevisionGUID="0685107d-8c93-4d0e-a02a-131f3580cc5c" CreationDate="2022-03-16T23:05:33.763" UserId="83" Text="|kusama|rococo|rococo-local|runtime-upgrade|maxcodesize|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2847" PostHistoryTypeId="2" PostId="785" RevisionGUID="036a6c28-ab7f-4405-a468-bb0adfa0fdf4" CreationDate="2022-03-16T23:28:24.553" UserId="205" Text="Where can I find Tomasz Drwięga Off-chain DB indexing example, implementing the `fn on_finalize` runtime function? &#xD;&#xA;TIA" ContentLicense="CC BY-SA 4.0" />
  <row Id="2849" PostHistoryTypeId="1" PostId="785" RevisionGUID="036a6c28-ab7f-4405-a468-bb0adfa0fdf4" CreationDate="2022-03-16T23:28:24.553" UserId="205" Text="Off-chain DB indexing example" ContentLicense="CC BY-SA 4.0" />
  <row Id="2850" PostHistoryTypeId="3" PostId="785" RevisionGUID="036a6c28-ab7f-4405-a468-bb0adfa0fdf4" CreationDate="2022-03-16T23:28:24.553" UserId="205" Text="|database|offchain|indexing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2851" PostHistoryTypeId="2" PostId="786" RevisionGUID="15314842-3a1b-4b0c-9e2c-5b47bf83622a" CreationDate="2022-03-16T23:42:56.533" UserId="205" Text="I found out it's just a `hook`, so no worries, all good.&#xD;&#xA;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;		/// Initialization&#xD;&#xA;		fn on_initialize(now: BlockNumberFor&lt;T&gt;) -&gt; Weight {&#xD;&#xA;			Self::do_initialize(now);&#xD;&#xA;			0&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		/// Block finalization&#xD;&#xA;		fn on_finalize(_n: BlockNumberFor&lt;T&gt;) {&#xD;&#xA;			// at the end of the block, we can safely include the new VRF output&#xD;&#xA;			// from this block into the under-construction randomness. If we've determined&#xD;&#xA;			// that this block was the first in a new epoch, the changeover logic has&#xD;&#xA;			// already occurred at this point, so the under-construction randomness&#xD;&#xA;			// will only contain outputs from the right epoch.&#xD;&#xA;			if let Some(Some(randomness)) = Initialized::&lt;T&gt;::take() {&#xD;&#xA;				Self::deposit_randomness(&amp;randomness);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			// remove temporary &quot;environment&quot; entry from storage&#xD;&#xA;			Lateness::&lt;T&gt;::kill();&#xD;&#xA;		}&#xD;&#xA;	}" ContentLicense="CC BY-SA 4.0" />
  <row Id="2853" PostHistoryTypeId="5" PostId="785" RevisionGUID="29b223ea-746c-4677-9d04-0c31a6dfea34" CreationDate="2022-03-16T23:44:44.467" UserId="205" Comment="added 46 characters in body" Text="Where can I find `Tomasz Drwięga` Off-chain DB indexing example, implementing the following runtime function? &#xD;&#xA;```&#xD;&#xA;fn on_finalize(_n: BlockNumberFor&lt;T&gt;){}&#xD;&#xA;```&#xD;&#xA;TIA" ContentLicense="CC BY-SA 4.0" />
  <row Id="2854" PostHistoryTypeId="2" PostId="787" RevisionGUID="fb2a8ed5-2f76-42c2-8d9b-11a7cfa4f987" CreationDate="2022-03-17T03:55:29.863" UserId="574" Text="I have a Public key (hex) and would like to convert it to an SS58 Address. What is the right function to use?&#xD;&#xA;&#xD;&#xA;I found the docs here with an code-sniped: https://substrate-developer-hub.github.io/docs/en/knowledgebase/advanced/ss58-address-format &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Public key (hex):         0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&#xD;&#xA;&#xD;&#xA;SS58 Address: 12bzRJfh7arnnfPPUZHeJUaE62QLEwhK48QnH9LXeK2m1iZU&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Import Polkadot.js API dependencies.&#xD;&#xA;const { decodeAddress, encodeAddress } = require(&quot;@polkadot/keyring&quot;);&#xD;&#xA;const { hexToU8a, isHex } = require(&quot;@polkadot/util&quot;);&#xD;&#xA;&#xD;&#xA;isHex(address)&#xD;&#xA;hexToU8a(address)&#xD;&#xA;decodeAddress(address)&#xD;&#xA;encodeAddress(address)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But these functions do not bring the right results..&#xD;&#xA;&#xD;&#xA;Any suggestions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2856" PostHistoryTypeId="1" PostId="787" RevisionGUID="fb2a8ed5-2f76-42c2-8d9b-11a7cfa4f987" CreationDate="2022-03-17T03:55:29.863" UserId="574" Text="How to convert Public key (hex) to SS58 Address in JavaScript / Polkadot-JS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2857" PostHistoryTypeId="3" PostId="787" RevisionGUID="fb2a8ed5-2f76-42c2-8d9b-11a7cfa4f987" CreationDate="2022-03-17T03:55:29.863" UserId="574" Text="|polkadot-js|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2858" PostHistoryTypeId="2" PostId="788" RevisionGUID="93202479-9bf3-4502-ab30-ee620519bc02" CreationDate="2022-03-17T05:06:41.850" UserId="309" Text="Hello the following code snippet is giving me headaches:&#xD;&#xA;&#xD;&#xA;    mod items;&#xD;&#xA;    pub use super::*;&#xD;&#xA;    pub use crate::roles::items::*;&#xD;&#xA;    pub type BalanceOf&lt;T&gt; = &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;    pub type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;    pub type Contributors&lt;T&gt; = Vec&lt;AccountIdOf&lt;T&gt;&gt;;&#xD;&#xA;    pub type HouseIndex = u32;&#xD;&#xA;    pub type Bool = bool;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[derive(Debug, PartialEq, Encode, Decode)]&#xD;&#xA;    pub struct Investor&lt;T,U&gt;{&#xD;&#xA;        pub account_id:T,&#xD;&#xA;        pub nft:U,&#xD;&#xA;    }&#xD;&#xA;    impl&lt;T,U&gt; Investor&lt;T,U&gt;{&#xD;&#xA;        pub fn new(acc: T,nft:U)-&gt; Self{&#xD;&#xA;            Investor{&#xD;&#xA;                account_id: acc,&#xD;&#xA;                nft: nft,&#xD;&#xA;            }        &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;T:pallet::Config+frame_system::Config,U&gt; Investor&lt;T,U&gt;{&#xD;&#xA;        &#xD;&#xA;        pub fn contribute(origin:OriginFor&lt;T&gt;,acc:AccountIdOf&lt;T&gt; ,value:BalanceOf&lt;T&gt;) -&gt; DispatchResult{&#xD;&#xA;            let c1=Contribution::new(&amp;acc,&amp;value);&#xD;&#xA;            let _who = ensure_signed(origin)?;&#xD;&#xA;    		let _now = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;            if ContributionsLog::&lt;T&gt;::contains_key(c1.account){&#xD;&#xA;                ContributionsLog::&lt;T&gt;::mutate(c1.account, |val|{&#xD;&#xA;                    *val += *c1.amount;&#xD;&#xA;                })&#xD;&#xA;            } else {&#xD;&#xA;                ContributionsLog::&lt;T&gt;::insert(&amp;acc,value);&#xD;&#xA;                ContAccounts::&lt;T&gt;::mutate(|val|{&#xD;&#xA;                    val.push(acc);&#xD;&#xA;                })&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            //function taking contribution storage and amount as inputs here&#xD;&#xA;            Ok(().into())&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;this code is located in  a mod.rs file it looks good to me, until I try to use the contribute method in my lib.rs:&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;      &#xD;&#xA;      #[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;      pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32, acc:AccountIdOf&lt;T&gt; ,rent:BalanceOf&lt;T&gt;,cd:CID,prop:Properties,start:Option&lt;BlockNumberOf&lt;T&gt;&gt;,end:Option&lt;BlockNumberOf&lt;T&gt;&gt;) -&gt; DispatchResult &#xD;&#xA;      { &#xD;&#xA;         let who = ensure_signed(origin)?;&#xD;&#xA;         let dev=Investor::new(&amp;acc,something);&#xD;&#xA;         Investor::&lt;T::AccountId,u32&gt;::contribute(who,dev.account_id,rent);&#xD;&#xA;        &#xD;&#xA;         &lt;Something&lt;T&gt;&gt;::put(dev.nft+something);&#xD;&#xA;&#xD;&#xA;         Self::deposit_event(Event::SomethingStored(something, who));&#xD;&#xA;         Ok(())&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;this then give me the following error:&#xD;&#xA;&#xD;&#xA;    error[E0599]: the function or associated item `contribute` exists for struct `roles::Investor&lt;&lt;T as frame_system::Config&gt;::AccountId, u32&gt;`, but its trait bounds were not satisfied&#xD;&#xA;       --&gt; pallets/template/src/lib.rs:144:40&#xD;&#xA;        |&#xD;&#xA;    144 |          Investor::&lt;T::AccountId,u32&gt;::contribute(who,dev.account_id,rent);&#xD;&#xA;        |                                        ^^^^^^^^^^ function or associated item cannot be called on `roles::Investor&lt;&lt;T as frame_system::Config&gt;::AccountId, u32&gt;` due to unsatisfied trait bounds&#xD;&#xA;        |&#xD;&#xA;       ::: pallets/template/src/roles/mod.rs:14:1&#xD;&#xA;        |&#xD;&#xA;    14  | pub struct Investor&lt;T,U&gt;{&#xD;&#xA;        | ------------------------ function or associated item `contribute` not found for this&#xD;&#xA;        |&#xD;&#xA;        = note: the following trait bounds were not satisfied:&#xD;&#xA;                `&lt;T as frame_system::Config&gt;::AccountId: pallet::Config`&#xD;&#xA;                `&lt;T as frame_system::Config&gt;::AccountId: frame_system::Config`&#xD;&#xA;&#xD;&#xA;trying to implement investor as below didn't solve the problem either:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        impl&lt;T:frame_system::Config+pallet::Config,U&gt; Investor&lt;T,U&gt;{&#xD;&#xA;        pub fn new(acc: T,nft:U)-&gt; Self{&#xD;&#xA;            Investor{&#xD;&#xA;                account_id: acc,&#xD;&#xA;                nft: nft,&#xD;&#xA;            }        &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;Any advice? Please?&#xD;&#xA;Kazu&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2860" PostHistoryTypeId="1" PostId="788" RevisionGUID="93202479-9bf3-4502-ab30-ee620519bc02" CreationDate="2022-03-17T05:06:41.850" UserId="309" Text="Missing trait problem" ContentLicense="CC BY-SA 4.0" />
  <row Id="2861" PostHistoryTypeId="3" PostId="788" RevisionGUID="93202479-9bf3-4502-ab30-ee620519bc02" CreationDate="2022-03-17T05:06:41.850" UserId="309" Text="|substrate-node|rust|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2862" PostHistoryTypeId="2" PostId="789" RevisionGUID="bb8686d7-357f-461c-bebc-1607fe0ecea8" CreationDate="2022-03-17T05:12:50.137" UserId="377" Text="I am using the proxy account. Can I restrict the main account to make transactions on the chain? So the transaction can be done only from the proxy accounts." ContentLicense="CC BY-SA 4.0" />
  <row Id="2864" PostHistoryTypeId="1" PostId="789" RevisionGUID="bb8686d7-357f-461c-bebc-1607fe0ecea8" CreationDate="2022-03-17T05:12:50.137" UserId="377" Text="How can we restrict the main account to make transection on chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2865" PostHistoryTypeId="3" PostId="789" RevisionGUID="bb8686d7-357f-461c-bebc-1607fe0ecea8" CreationDate="2022-03-17T05:12:50.137" UserId="377" Text="|pallet|proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2866" PostHistoryTypeId="2" PostId="790" RevisionGUID="7d6bbccd-d937-41ed-b81b-3045c7b3469f" CreationDate="2022-03-17T06:44:41.757" UserId="67" Text="Not really, but you could lose the private key by &quot;mistake&quot;, or what is similar, create an *anonymous proxy* where the calling account becomes a proxy of a newly generated account that exists only on-chain and has no known private key, therefore no transactions can be signed directly by it." ContentLicense="CC BY-SA 4.0" />
  <row Id="2868" PostHistoryTypeId="5" PostId="784" RevisionGUID="d4a3376f-975e-4844-b272-ca3d7a7d0acf" CreationDate="2022-03-17T06:45:29.343" UserId="83" Comment="change heading to be simpler" Text="If we want to connect a parachain to Rococo's 'rococo-local' relay chain we follow this [Cumulus tutorial][1] using [polkadot-launch][2]. Part of the pre-launch steps mentioned [here][3] is to minimize your runtime size by pruning the functionality, and to then do [incremental upgrades][4] when the parachain is live to include the missing pallets again.&#xD;&#xA;&#xD;&#xA;However, Rococo's relay chain currently has a `maxCodeSize` of only ~3.15 MB, and if you build the [substrate-parachain-template][5] using branch 'polkadot_v0.9.17' with `cargo build --release` it generates a file /target/release/wbuild/parachain-template-runtime.compact.wasm that is ~2.9 MB. If you add the Sudo pallet to it so you can do the incremental upgrades then building it generates an even larger file of ~3.0, which may not allow enough space for you to do the incremental upgrades to include the missing pallets again during your [launch simulation][6] on the Rococo production testnet before launching on Kusama's production mainnet.&#xD;&#xA;&#xD;&#xA;If you add more pallets than just Sudo and the Scheduler pallet by following [Substrate's Forkless Upgrades][7] tutorial then you might exceed the `maxCodeSize` and [Polkadot.js Apps][8] may generate an error `Bytes:: Maximum call stack size exceeded` or `Invalid Transaction: Transaction would exhaust the block limits` and prevent the runtime upgrade.&#xD;&#xA;&#xD;&#xA;Meanwhile, Kusama's relay chain currently has a `maxCodeSize` of ~10.5 MB, which may be sufficient to include all your pallets. There would be a requirement for an initial 3.0 MB for the genesis build of substrate-parachain-template branch 'polkadot_v0.9.17' (plus Sudo pallet to allow you to perform runtime upgrades), then a further 1.5 MB for the 1st runtime upgrade to add ~15 pallets like preimage, scheduler, democracy, referenda, conviction voting, council collective, technical collective, elections phragmen, tips, treasury, bounties, child bounties, assets, multisig, identity, proxy, and recovery, and then a further 1.5 MB for a 2nd runtime upgrade to add ~25 of our own custom pallets to increase it a total code size of the parachain-template-runtime.compact.wasm file to ~6 MB, which would still be less than Kusama's `maxCodeSize`.&#xD;&#xA;&#xD;&#xA;What is the benefit of Rococo's `maxCodeSize` being smaller Kusama's `maxCodeSize`?&#xD;&#xA;&#xD;&#xA;If Rococo's `maxCodeSize` only allows you to make some small runtime upgrades, but isn't large enough for you to add all your missing pallets when your parachain is live on it as [incremental upgrades][4] after pruning them all to minimize the runtime size for genesis, should you just assume that the remaining runtime upgrades will work on Kusama and proceed to doing it on Kusama instead?&#xD;&#xA;&#xD;&#xA;How would you make a proposal on Rococo to increase its `maxCodeSize` so it matches Kusama's?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-launch&#xD;&#xA;  [3]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#3-minimize-your-runtime-size&#xD;&#xA;  [4]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#6-incremental-runtime-deployments&#xD;&#xA;  [5]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [6]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#7-launch-simulation&#xD;&#xA;  [7]: https://docs.substrate.io/tutorials/v3/forkless-upgrades/#prepare-an-upgraded-runtime&#xD;&#xA;  [8]: https://polkadot.js.org/apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="2869" PostHistoryTypeId="4" PostId="784" RevisionGUID="d4a3376f-975e-4844-b272-ca3d7a7d0acf" CreationDate="2022-03-17T06:45:29.343" UserId="83" Comment="change heading to be simpler" Text="Why is the Rococo `maxCodeSize` too small to do adequate incremental runtime upgrades?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2870" PostHistoryTypeId="2" PostId="791" RevisionGUID="08a12d9d-5393-40ab-82b8-f6bcd2162732" CreationDate="2022-03-17T07:18:07.420" UserId="530" Text="[Parachain url](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.parachain-collator-1.c1.sora2.soramitsu.co.jp#/explorer)&#xD;&#xA;[Repository](https://github.com/sora-xor/sora2-parachain)&#xD;&#xA;&#xD;&#xA;The parachain is based on polkadot-v0.9.13 that was the latest at the time of release.&#xD;&#xA;&#xD;&#xA;The logs have neither warnings nor errors.&#xD;&#xA;&#xD;&#xA;What can we do?&#xD;&#xA;&#xD;&#xA;We have two collators and they have connection to each other and there is a connection to the relay chain.&#xD;&#xA;&#xD;&#xA;There is no message &quot;Starting collation&quot;.&#xD;&#xA;The same configuration worked fine during testing with rococo-local." ContentLicense="CC BY-SA 4.0" />
  <row Id="2872" PostHistoryTypeId="1" PostId="791" RevisionGUID="08a12d9d-5393-40ab-82b8-f6bcd2162732" CreationDate="2022-03-17T07:18:07.420" UserId="530" Text="Parachain doesn't produce blocks, but worked with rococo-local" ContentLicense="CC BY-SA 4.0" />
  <row Id="2873" PostHistoryTypeId="3" PostId="791" RevisionGUID="08a12d9d-5393-40ab-82b8-f6bcd2162732" CreationDate="2022-03-17T07:18:07.420" UserId="530" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2874" PostHistoryTypeId="2" PostId="792" RevisionGUID="e4fc287e-15c5-4349-bfc2-067294200806" CreationDate="2022-03-17T08:06:52.727" UserId="674" Text="All you need is to add prefix when using `encodeAddress(address, prefix)`, as in the wiki for the Polkadot-js API (https://polkadot.js.org/docs/keyring/start/ss58/)&#xD;&#xA;&#xD;&#xA;A snippet:&#xD;&#xA;```&#xD;&#xA;const { encodeAddress } = require(&quot;@polkadot/keyring&quot;);&#xD;&#xA;&#xD;&#xA;const address = &quot;0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&quot;;&#xD;&#xA;&#xD;&#xA;console.log(encodeAddress(address, 0)); //&quot;12bzRJfh7arnnfPPUZHeJUaE62QLEwhK48QnH9LXeK2m1iZU&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2876" PostHistoryTypeId="2" PostId="793" RevisionGUID="52bd3991-3313-4404-84ff-a17115791e6e" CreationDate="2022-03-17T08:11:51.337" UserId="515" Text="I trying to bind H160 address with H256 address,&#xD;&#xA;assume the function:&#xD;&#xA;```&#xD;&#xA;fn bind(origin: OriginFor&lt;T&gt;, address: H156 , signature: [u8; 130]) -&gt; Result&lt;(), Error&lt;T&gt;&gt;{&#xD;&#xA;// check the signature belong to address&#xD;&#xA;ensure!(check_signature(address, signature), Error&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;// bind sender with address&#xD;&#xA;create_account(sender, address);&#xD;&#xA;&#xD;&#xA;Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does this function available on Substrate, or any advice to do the bind function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2878" PostHistoryTypeId="1" PostId="793" RevisionGUID="52bd3991-3313-4404-84ff-a17115791e6e" CreationDate="2022-03-17T08:11:51.337" UserId="515" Text="How to bind Ethereum H160 address with Substrate H256 address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2879" PostHistoryTypeId="3" PostId="793" RevisionGUID="52bd3991-3313-4404-84ff-a17115791e6e" CreationDate="2022-03-17T08:11:51.337" UserId="515" Text="|substrate-node|account|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2880" PostHistoryTypeId="2" PostId="794" RevisionGUID="5084fe04-382c-4d0c-b505-cc2b96af0ad1" CreationDate="2022-03-17T08:47:13.820" UserId="73" Text="```&#xD;&#xA;use frame_support::traits::PalletInfoAccess;&#xD;&#xA;&#xD;&#xA;let my_pallet_index = MyPallet::index();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will give you the index of your pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="2882" PostHistoryTypeId="2" PostId="795" RevisionGUID="354cb0c8-9821-4596-871a-5eaf2b58459c" CreationDate="2022-03-17T10:12:14.760" UserId="85" Text="In theory they could be different as each pallet's implementation could differ, but I would set them all to the same value. In kusama/polkadot we set them all to 100,000 at the moment (not that we have that many validators).&#xD;&#xA;&#xD;&#xA;For parachains you would want to set this to the max number of collators you could have. For example Acala is doing this at the moment:&#xD;&#xA;```&#xD;&#xA;type MaxAuthorities = ConstU32&lt;32&gt;;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2884" PostHistoryTypeId="5" PostId="784" RevisionGUID="69f38987-a3e6-4b7d-938c-dd0010c2c09f" CreationDate="2022-03-17T10:13:49.913" UserId="83" Comment="mention how the alternative Chachacha also has the same maxCodeSize" Text="If we want to connect a parachain to Rococo's 'rococo-local' relay chain we follow this [Cumulus tutorial][1] using [polkadot-launch][2]. Part of the pre-launch steps mentioned [here][3] is to minimize your runtime size by pruning the functionality, and to then do [incremental upgrades][4] when the parachain is live to include the missing pallets again.&#xD;&#xA;&#xD;&#xA;However, Rococo's relay chain currently has a `maxCodeSize` of only ~3.15 MB, and if you build the [substrate-parachain-template][5] using branch 'polkadot_v0.9.17' with `cargo build --release` it generates a file /target/release/wbuild/parachain-template-runtime.compact.wasm that is ~2.9 MB. If you add the Sudo pallet to it so you can do the incremental upgrades then building it generates an even larger file of ~3.0, which may not allow enough space for you to do the incremental upgrades to include the missing pallets again during your [launch simulation][6] on the Rococo production testnet before launching on Kusama's production mainnet.&#xD;&#xA;&#xD;&#xA;If you add more pallets than just Sudo and the Scheduler pallet by following [Substrate's Forkless Upgrades][7] tutorial then you might exceed the `maxCodeSize` and [Polkadot.js Apps][8] may generate an error `Bytes:: Maximum call stack size exceeded` or `Invalid Transaction: Transaction would exhaust the block limits` and prevent the runtime upgrade.&#xD;&#xA;&#xD;&#xA;Meanwhile, Kusama's relay chain currently has a `maxCodeSize` of ~10.5 MB, which may be sufficient to include all your pallets. There would be a requirement for an initial 3.0 MB for the genesis build of substrate-parachain-template branch 'polkadot_v0.9.17' (plus Sudo pallet to allow you to perform runtime upgrades), then a further 1.5 MB for the 1st runtime upgrade to add ~15 pallets like preimage, scheduler, democracy, referenda, conviction voting, council collective, technical collective, elections phragmen, tips, treasury, bounties, child bounties, assets, multisig, identity, proxy, and recovery, and then a further 1.5 MB for a 2nd runtime upgrade to add ~25 of our own custom pallets to increase it a total code size of the parachain-template-runtime.compact.wasm file to ~6 MB, which would still be less than Kusama's `maxCodeSize`.&#xD;&#xA;&#xD;&#xA;What is the benefit of Rococo's `maxCodeSize` being smaller Kusama's `maxCodeSize`?&#xD;&#xA;&#xD;&#xA;If Rococo's `maxCodeSize` only allows you to make some small runtime upgrades, but isn't large enough for you to add all your missing pallets when your parachain is live on it as [incremental upgrades][4] after pruning them all to minimize the runtime size for genesis, should you just assume that the remaining runtime upgrades will work on Kusama and proceed to doing it on Kusama instead?&#xD;&#xA;&#xD;&#xA;How would you make a proposal on Rococo to increase its `maxCodeSize` so it matches Kusama's?&#xD;&#xA;&#xD;&#xA;Note that Chachacha relay chain is alternative production testnet for parachains. But that does not provide an alternative, as it also has the same `maxCodeSize` of as Rococo of ~3.15 MB when you query it [here][9] with Polkadot.js Apps by choosing &quot;Developer &gt; Chain state &gt; Storage &gt; configuration (for &quot;selected state query&quot;) &gt; activeConfig()&quot; and then clicking the (+) icon. &#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-launch&#xD;&#xA;  [3]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#3-minimize-your-runtime-size&#xD;&#xA;  [4]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#6-incremental-runtime-deployments&#xD;&#xA;  [5]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [6]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#7-launch-simulation&#xD;&#xA;  [7]: https://docs.substrate.io/tutorials/v3/forkless-upgrades/#prepare-an-upgraded-runtime&#xD;&#xA;  [8]: https://polkadot.js.org/apps&#xD;&#xA;  [9]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ffullnode-relay.chachacha.centrifuge.io#/chainstate" ContentLicense="CC BY-SA 4.0" />
  <row Id="2887" PostHistoryTypeId="2" PostId="797" RevisionGUID="19be9487-3e45-447e-8051-df278db4d3af" CreationDate="2022-03-17T10:50:37.340" UserId="85" Text="To create a runtime you need to call `construct_runtime!` macro that will create your pallet type, but you also have to configure the pallets so in this case you will need a `pub trait Config: frame_system::Config {pub trait Config: frame_system::Config {`, have a look at how the nicks pallet is done for example:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/v3/add-a-pallet/&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2889" PostHistoryTypeId="5" PostId="788" RevisionGUID="445561c7-e937-4a32-ac0c-09baf26e263c" CreationDate="2022-03-17T11:14:54.380" UserId="309" Comment="added 125 characters in body" Text="Hello the following code snippet is giving me headaches:&#xD;&#xA;&#xD;&#xA;    mod items;&#xD;&#xA;    pub use super::*;&#xD;&#xA;    pub use crate::roles::items::*;&#xD;&#xA;    pub type BalanceOf&lt;T&gt; = &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;    pub type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;    pub type Contributors&lt;T&gt; = Vec&lt;AccountIdOf&lt;T&gt;&gt;;&#xD;&#xA;    pub type HouseIndex = u32;&#xD;&#xA;    pub type Bool = bool;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[derive(Debug, PartialEq, Encode, Decode)]&#xD;&#xA;    pub struct Investor&lt;T,U&gt;{&#xD;&#xA;        pub account_id:T,&#xD;&#xA;        pub nft:U,&#xD;&#xA;    }&#xD;&#xA;    impl&lt;T,U&gt; Investor&lt;T,U&gt;{&#xD;&#xA;        pub fn new(acc: T,nft:U)-&gt; Self{&#xD;&#xA;            Investor{&#xD;&#xA;                account_id: acc,&#xD;&#xA;                nft: nft,&#xD;&#xA;            }        &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;T:pallet::Config+frame_system::Config,U&gt; Investor&lt;T,U&gt;{&#xD;&#xA;        &#xD;&#xA;        pub fn contribute(origin:OriginFor&lt;T&gt;,acc:AccountIdOf&lt;T&gt; ,value:BalanceOf&lt;T&gt;) -&gt; DispatchResult{&#xD;&#xA;            let c1=Contribution::new(&amp;acc,&amp;value);&#xD;&#xA;            let _who = ensure_signed(origin)?;&#xD;&#xA;    		let _now = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;            if ContributionsLog::&lt;T&gt;::contains_key(c1.account){&#xD;&#xA;                ContributionsLog::&lt;T&gt;::mutate(c1.account, |val|{&#xD;&#xA;                    *val += *c1.amount;&#xD;&#xA;                })&#xD;&#xA;            } else {&#xD;&#xA;                ContributionsLog::&lt;T&gt;::insert(&amp;acc,value);&#xD;&#xA;                ContAccounts::&lt;T&gt;::mutate(|val|{&#xD;&#xA;                    val.push(acc);&#xD;&#xA;                })&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;            //function taking contribution storage and amount as inputs here&#xD;&#xA;            Ok(().into())&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;this code is located in  a mod.rs file it looks good to me, until I try to use the contribute method in my lib.rs:&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;      &#xD;&#xA;      #[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;      pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32, acc:AccountIdOf&lt;T&gt; ,rent:BalanceOf&lt;T&gt;,cd:CID,prop:Properties,start:Option&lt;BlockNumberOf&lt;T&gt;&gt;,end:Option&lt;BlockNumberOf&lt;T&gt;&gt;) -&gt; DispatchResult &#xD;&#xA;      { &#xD;&#xA;         let who = ensure_signed(origin)?;&#xD;&#xA;         let dev=Investor::new(&amp;acc,something);&#xD;&#xA;         Investor::&lt;T::AccountId,u32&gt;::contribute(who,dev.account_id,rent);&#xD;&#xA;        &#xD;&#xA;         &lt;Something&lt;T&gt;&gt;::put(dev.nft+something);&#xD;&#xA;&#xD;&#xA;         Self::deposit_event(Event::SomethingStored(something, who));&#xD;&#xA;         Ok(())&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;this then give me the following error:&#xD;&#xA;&#xD;&#xA;    error[E0599]: the function or associated item `contribute` exists for struct `roles::Investor&lt;&lt;T as frame_system::Config&gt;::AccountId, u32&gt;`, but its trait bounds were not satisfied&#xD;&#xA;       --&gt; pallets/template/src/lib.rs:144:40&#xD;&#xA;        |&#xD;&#xA;    144 |          Investor::&lt;T::AccountId,u32&gt;::contribute(who,dev.account_id,rent);&#xD;&#xA;        |                                        ^^^^^^^^^^ function or associated item cannot be called on `roles::Investor&lt;&lt;T as frame_system::Config&gt;::AccountId, u32&gt;` due to unsatisfied trait bounds&#xD;&#xA;        |&#xD;&#xA;       ::: pallets/template/src/roles/mod.rs:14:1&#xD;&#xA;        |&#xD;&#xA;    14  | pub struct Investor&lt;T,U&gt;{&#xD;&#xA;        | ------------------------ function or associated item `contribute` not found for this&#xD;&#xA;        |&#xD;&#xA;        = note: the following trait bounds were not satisfied:&#xD;&#xA;                `&lt;T as frame_system::Config&gt;::AccountId: pallet::Config`&#xD;&#xA;                `&lt;T as frame_system::Config&gt;::AccountId: frame_system::Config`&#xD;&#xA;&#xD;&#xA;trying to implement investor as below didn't solve the problem either:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        impl&lt;T:frame_system::Config+pallet::Config,U&gt; Investor&lt;T,U&gt;{&#xD;&#xA;        pub fn new(acc: T,nft:U)-&gt; Self{&#xD;&#xA;            Investor{&#xD;&#xA;                account_id: acc,&#xD;&#xA;                nft: nft,&#xD;&#xA;            }        &#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;Any advice? Please?&#xD;&#xA;&#xD;&#xA;link to the repo/lib.rs: https://github.com/Fair-Squares/fair-squares/blob/structure_template/pallets/template/src/lib.rs&#xD;&#xA;Kazu&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2890" PostHistoryTypeId="2" PostId="798" RevisionGUID="c4a41ba3-c513-4e46-8fee-411cd1dfc5fe" CreationDate="2022-03-17T11:55:16.727" UserId="172" Text="You can simply use `subkey inspect`:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;subkey inspect --keystore-uri 0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a --network polkadot&#xD;&#xA;URI: &#xD;&#xA;Secret Key URI `` is account:&#xD;&#xA;  Secret seed:       0xfac7959dbfe72f052e5a0c3c8d6530f202b02fd8f9f5ca3580ec8deb7797479e&#xD;&#xA;  Public key (hex):  0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&#xD;&#xA;  Public key (SS58): 12bzRJfh7arnnfPPUZHeJUaE62QLEwhK48QnH9LXeK2m1iZU&#xD;&#xA;  Account ID:        0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&#xD;&#xA;  SS58 Address:      12bzRJfh7arnnfPPUZHeJUaE62QLEwhK48QnH9LXeK2m1iZU&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2894" PostHistoryTypeId="2" PostId="800" RevisionGUID="75070e28-0762-44c4-89a8-390d39240f30" CreationDate="2022-03-17T12:15:42.643" UserId="172" Text="Rewrite your struct so that it's not generic over `T` and `U`: &#xD;&#xA;&#xD;&#xA;For example: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Debug, PartialEq, Encode, Decode)]&#xD;&#xA;pub struct Investor&lt;T::AccountId, u32&gt;{&#xD;&#xA;    pub account_id: T::AccountId,&#xD;&#xA;    pub nft: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and then apply the changes to the other parts of your code." ContentLicense="CC BY-SA 4.0" />
  <row Id="2896" PostHistoryTypeId="2" PostId="801" RevisionGUID="b4829d18-f53c-45dc-a413-6918946a594a" CreationDate="2022-03-17T12:17:27.563" UserId="172" Text="Run `cargo update` to fix any problems with older versions." ContentLicense="CC BY-SA 4.0" />
  <row Id="2898" PostHistoryTypeId="2" PostId="802" RevisionGUID="c5451c1d-f04a-498d-9981-600b0ae5f30f" CreationDate="2022-03-17T12:28:53.427" UserId="172" Text="This sounds like some incompatibilities from the numerous libraries involved. Substrate 2.0 is very behind. I would rebuild your node starting from the latest node template to fix this." ContentLicense="CC BY-SA 4.0" />
  <row Id="2900" PostHistoryTypeId="2" PostId="803" RevisionGUID="4f7bb5bd-b7b5-4905-9388-7471a94a2ffb" CreationDate="2022-03-17T14:01:50.280" UserId="686" Text="I am developing **smart contract that can stake erc20-type token**, and testing it on shibuya testnet. But i have some problems. My staking contract have to request erc20-type token contract to approve for transfer, however, I could not find a proper answer. Inevitably I used an alternative trick. Following is my test code.&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod staking {&#xD;&#xA;    // -- snip --&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Staking {&#xD;&#xA;        staked: StorageHashMap&lt;AccountId, Vec&lt;Stake&gt;&gt;,&#xD;&#xA;        unstaked: StorageHashMap&lt;AccountId, Vec&lt;Balance&gt;&gt;,&#xD;&#xA;        staking_time: Balance,&#xD;&#xA;        block_time: Balance,&#xD;&#xA;        token: Erc20Ref,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(&#xD;&#xA;        Copy,&#xD;&#xA;        Clone,&#xD;&#xA;        Ord,&#xD;&#xA;        Eq,&#xD;&#xA;        Default,&#xD;&#xA;        PackedLayout,&#xD;&#xA;        SpreadLayout,&#xD;&#xA;        scale::Encode,&#xD;&#xA;        scale::Decode,&#xD;&#xA;    )]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub struct Stake {&#xD;&#xA;        amount: Balance,&#xD;&#xA;        timestamp: Balance,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Staking {&#xD;&#xA;&#xD;&#xA;        // -- snip --&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn stake(&amp;mut self, _amount: Balance) {&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            &#xD;&#xA;            // -- snip --&#xD;&#xA;            &#xD;&#xA;            // This line is additive code for an alternative way.&#xD;&#xA;            self.token.approve_from_to(caller, self.env().account_id(), _amount);&#xD;&#xA;            self.token.transfer_from(caller, self.env().account_id(), _amount);&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;And this is erc20-type token code.&#xD;&#xA;```rust&#xD;&#xA;/// If this function is called again it overwrites the current allowance with `value`.&#xD;&#xA;///&#xD;&#xA;/// An `Approval` event is emitted.&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn approve_from_to(&amp;mut self, from: AccountId, to: AccountId, value: Balance) -&gt; Result&lt;()&gt; {&#xD;&#xA;    self.allowances.insert((&amp;from, &amp;to), &amp;value);&#xD;&#xA;    self.env().emit_event(Approval {&#xD;&#xA;         owner: from,&#xD;&#xA;         spender: to,&#xD;&#xA;         value,&#xD;&#xA;    });&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;But it is too dangerous code. Please help my problem. Thank you in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="2902" PostHistoryTypeId="1" PostId="803" RevisionGUID="4f7bb5bd-b7b5-4905-9388-7471a94a2ffb" CreationDate="2022-03-17T14:01:50.280" UserId="686" Text="How to inform polkadot.js wallet to approve erc20-type token transfer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2903" PostHistoryTypeId="3" PostId="803" RevisionGUID="4f7bb5bd-b7b5-4905-9388-7471a94a2ffb" CreationDate="2022-03-17T14:01:50.280" UserId="686" Text="|polkadot|staking|wallet|erc20|approve|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2906" PostHistoryTypeId="6" PostId="803" RevisionGUID="10e44ac4-91aa-4e32-a1ad-87cbc41c14d5" CreationDate="2022-03-17T14:11:35.357" UserId="28" Comment="edited tags" Text="|staking|wallet|approve|astar|erc20|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2907" PostHistoryTypeId="5" PostId="793" RevisionGUID="ae42ead8-09d7-4a9b-8127-270ed3b6ac6a" CreationDate="2022-03-17T14:17:37.647" UserId="515" Comment="edited body" Text="I trying to bind H160 address with H256 address,&#xD;&#xA;assume the function:&#xD;&#xA;```&#xD;&#xA;fn bind(origin: OriginFor&lt;T&gt;, address: H160 , signature: [u8; 130]) -&gt; Result&lt;(), Error&lt;T&gt;&gt;{&#xD;&#xA;// check the signature belong to address&#xD;&#xA;ensure!(check_signature(address, signature), Error&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;// bind sender with address&#xD;&#xA;create_account(sender, address);&#xD;&#xA;&#xD;&#xA;Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does this function available on Substrate, or any advice to do the bind function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2908" PostHistoryTypeId="2" PostId="805" RevisionGUID="fc4e8fba-5433-473f-aabd-ec6406ad5a74" CreationDate="2022-03-17T14:20:30.980" UserId="205" Text="Here is my code:&#xD;&#xA;```&#xD;&#xA;let events = frame_system::Pallet::&lt;T&gt;::events();&#xD;&#xA;```&#xD;&#xA;and the implementation:&#xD;&#xA;https://docs.rs/frame-system/3.0.0/frame_system/pallet/struct.Pallet.html#method.events&#xD;&#xA;&#xD;&#xA;Any ideas? TIA" ContentLicense="CC BY-SA 4.0" />
  <row Id="2910" PostHistoryTypeId="1" PostId="805" RevisionGUID="fc4e8fba-5433-473f-aabd-ec6406ad5a74" CreationDate="2022-03-17T14:20:30.980" UserId="205" Text="error[E0599]: no function or associated item named `events` found for struct `frame_system::Pallet` in the current scope" ContentLicense="CC BY-SA 4.0" />
  <row Id="2911" PostHistoryTypeId="3" PostId="805" RevisionGUID="fc4e8fba-5433-473f-aabd-ec6406ad5a74" CreationDate="2022-03-17T14:20:30.980" UserId="205" Text="|pallet|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2912" PostHistoryTypeId="5" PostId="770" RevisionGUID="11d821df-ed64-443d-9c1f-a8eb62ae0565" CreationDate="2022-03-17T14:50:31.497" UserId="380" Comment="format text" Text="hello is there a way to decode this kind of extrinsic on substrate side without polkadotJs : &#xD;&#xA;&#xD;&#xA;&gt; extrinsics: [0402000b935b2a697f01,&#xD;&#xA;&gt; 84003c2eb55ba53099bea9031b4a30c9a553c29f7c4a3a9f266d6208954268aa8825014031ae12b4edb8b6f49e407b88f21022460e523d57337b70a46ce23765d4b645cd4f05fefaf77be348994429492d1c923ce1a3bbe00a5397e809fbac72864d8dc5031000050000d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d02093d00]&#xD;&#xA;&#xD;&#xA;? &#xD;&#xA;&#xD;&#xA;I think that `0402000b935b2a697f01` is set timestamp for example.&#xD;&#xA;&#xD;&#xA;thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="2913" PostHistoryTypeId="24" PostId="770" RevisionGUID="11d821df-ed64-443d-9c1f-a8eb62ae0565" CreationDate="2022-03-17T14:50:31.497" Comment="Proposed by 380 approved by -1 edit id of 79" ContentLicense="CC BY-SA 4.0" />
  <row Id="2914" PostHistoryTypeId="5" PostId="770" RevisionGUID="b88b62cf-150b-450e-91da-48965fd062a0" CreationDate="2022-03-17T14:50:31.497" UserId="59" Comment="format text" Text="hello is there a way to decode this kind of extrinsic on substrate side without polkadotJs : &#xD;&#xA;&#xD;&#xA;&gt; extrinsics: [0402000b935b2a697f01,&#xD;&#xA;&gt; 84003c2eb55ba53099bea9031b4a30c9a553c29f7c4a3a9f266d6208954268aa8825014031ae12b4edb8b6f49e407b88f21022460e523d57337b70a46ce23765d4b645cd4f05fefaf77be348994429492d1c923ce1a3bbe00a5397e809fbac72864d8dc5031000050000d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d02093d00]&#xD;&#xA;&#xD;&#xA;? &#xD;&#xA;&#xD;&#xA;I think that `0402000b935b2a697f01` is &quot;set timestamp&quot; for example." ContentLicense="CC BY-SA 4.0" />
  <row Id="2915" PostHistoryTypeId="2" PostId="806" RevisionGUID="034e6801-7705-4c50-b8db-d5042d688c2c" CreationDate="2022-03-17T15:32:28.117" UserId="34" Text="H160 has a few _flavors_ that you might pursue in the context of a Substrate chain:&#xD;&#xA;&#xD;&#xA;- If you are looking to _map_ H160 Ethereum addresses to, say, [SR25519](https://docs.moonbeam.network/learn/features/unified-accounts/) that is most common in Substrate chains, it is good to see the implementation in [Frontier](https://github.com/paritytech/frontier/) as a reference. Here a _truncated_ hash scheme is used (H256 -&gt; H160 by taking the first 160 (LE) bytes in the address). There are some tools to inspect truncated vs. Ethereum converted (ECDSA &lt;-&gt; SR25519) addresses [in the frontier node template](https://github.com/paritytech/frontier/blob/c20e13ccea1bc04d82ed5a609c6ccf7d3ec413f4/template/utils/README.md#substrate-evm-utilities).&#xD;&#xA;&#xD;&#xA;- Another important example is to use H160 addresses as the _base_ for accounting in you chain, this is exemplified in [Moonbeam's Unified Accounts]( &#xD;&#xA;https://docs.moonbeam.network/learn/features/unified-accounts/)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2917" PostHistoryTypeId="5" PostId="801" RevisionGUID="e4c86b6d-bc3d-4688-9019-aecdfbf1a1cb" CreationDate="2022-03-17T15:44:56.167" UserId="28" Comment="added 26 characters in body" Text="Run `cargo update -p sp-io` to fix any problems with version mismatch with Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="2918" PostHistoryTypeId="2" PostId="807" RevisionGUID="781e73da-bdbb-4e0e-871f-54113605836e" CreationDate="2022-03-17T15:50:36.287" UserId="205" Text="I found out that `pub fn events()` should only be used in tests, so I'm using `pub fn read_events_no_consensus()` now." ContentLicense="CC BY-SA 4.0" />
  <row Id="2920" PostHistoryTypeId="5" PostId="807" RevisionGUID="c48eb8d8-5fb4-46ac-b707-9470f99b5f02" CreationDate="2022-03-17T16:27:35.307" UserId="205" Comment="added 1270 characters in body" Text="I found out that `pub fn events()` should only be used in tests, so I'm using `pub fn read_events_no_consensus()` now. See code below:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	#[derive(Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	pub struct IndexingData&lt;T: Config&gt; {&#xD;&#xA;		pub key: Vec&lt;u8&gt;, &#xD;&#xA;		pub value: Vec&lt;EventRecord&lt;&lt;T as frame_system::Config&gt;::Event, &lt;T as frame_system::Config&gt;::Hash&gt;&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;		/// Block finalization&#xD;&#xA;		fn on_finalize(_n: BlockNumberFor&lt;T&gt;) {&#xD;&#xA;			let key = Self::derived_key(frame_system::Pallet::&lt;T&gt;::block_number());&#xD;&#xA;			let events = frame_system::Pallet::&lt;T&gt;::read_events_no_consensus();&#xD;&#xA;			let data = IndexingData::&lt;T&gt; { key: b&quot;submit_events&quot;.to_vec(), value: events };&#xD;&#xA;&#xD;&#xA;			offchain_index::set(&amp;key, &amp;data.encode());&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn offchain_worker(block_number: T::BlockNumber) {&#xD;&#xA;			// Reading back the off-chain indexing value. This is exactly the same as reading from&#xD;&#xA;			// ocw local storage.&#xD;&#xA;			let key = Self::derived_key(block_number);&#xD;&#xA;			let storage_ref = StorageValueRef::persistent(&amp;key);&#xD;&#xA;			&#xD;&#xA;			if let Ok(Some(data)) = storage_ref.get::&lt;IndexingData&lt;T&gt;&gt;() {&#xD;&#xA;    		log::info!(&quot;local storage data: {:?}, {:?}&quot;, sp_std::str::from_utf8(&amp;data.key).unwrap_or(&quot;error&quot;), data.value);&#xD;&#xA;			} else {&#xD;&#xA;				log::info!(&quot;Error reading from local storage.&quot;);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2921" PostHistoryTypeId="2" PostId="808" RevisionGUID="38f3afb3-f9fd-406e-bc0c-570b3e9ae599" CreationDate="2022-03-17T16:42:13.027" UserId="692" Text="Im working on a project where i want to store encrypted data on-chain and later reveal that data. For this process im thinking of using a trusted off-chain worker to act as a &quot;key-manager&quot;. This ocw should be able to generate RSA keypairs, store his public key on-chain and keep the private key in his local storage. A user would use the advertised public key to encrypt his message and store it on-chain. After &quot;n&quot; blocks the offchain worker would reveal that message to everyone. &#xD;&#xA;&#xD;&#xA;Im having trouble in finding a substrate compatible crate to handle RSA keypair generation,encryption and decryption. I tried to use pure rust crates such as rsa(https://crates.io/crates/rsa) and ring (https://crates.io/crates/ring) but as soon as i tried to import anything from these crates, substrate panicks.&#xD;&#xA;&#xD;&#xA;[![import panick][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8NKIV.png&#xD;&#xA;&#xD;&#xA;I saw that the sc_network pallet is capable of generating rsa keypairs. Is it also capable of encrypting/decrypting? Can i use it outside of runtime safely? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2923" PostHistoryTypeId="1" PostId="808" RevisionGUID="38f3afb3-f9fd-406e-bc0c-570b3e9ae599" CreationDate="2022-03-17T16:42:13.027" UserId="692" Text="Substrate compatible crate for handling RSA encryption" ContentLicense="CC BY-SA 4.0" />
  <row Id="2924" PostHistoryTypeId="3" PostId="808" RevisionGUID="38f3afb3-f9fd-406e-bc0c-570b3e9ae599" CreationDate="2022-03-17T16:42:13.027" UserId="692" Text="|frame|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2925" PostHistoryTypeId="2" PostId="809" RevisionGUID="e0693528-86a3-42c0-91ee-d039df8b291d" CreationDate="2022-03-17T17:25:43.070" UserId="648" Text="I'm looking to build a WSOP style texas holdem poker competition which includes multiple players turning up to play. With options like folding, raising, betting, etc. All in a fully decentralized way..&#xD;&#xA;&#xD;&#xA;Here's a list of problems:&#xD;&#xA;Where is the random number coming from? (A chainlink VRF system is cool but everyones cards can't be public on the pre-flop, so some kind of RANDAO system that passes through blocks will be needed..)&#xD;&#xA;Could it be built on someone elses parachain or would it require a dedicated parachain?&#xD;&#xA;Would you store the data of each game? (or delete it?)&#xD;&#xA;&#xD;&#xA;What would be the solution for this?&#xD;&#xA;&#xD;&#xA;P.S. I'm looking for devs interested in helping on this problem for paid roles.." ContentLicense="CC BY-SA 4.0" />
  <row Id="2927" PostHistoryTypeId="1" PostId="809" RevisionGUID="e0693528-86a3-42c0-91ee-d039df8b291d" CreationDate="2022-03-17T17:25:43.070" UserId="648" Text="How can I build a fully decentralized daily poker competition?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2928" PostHistoryTypeId="3" PostId="809" RevisionGUID="e0693528-86a3-42c0-91ee-d039df8b291d" CreationDate="2022-03-17T17:25:43.070" UserId="648" Text="|polkadot|poker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2929" PostHistoryTypeId="2" PostId="810" RevisionGUID="f22bfe3b-3f7c-4200-93d1-70ab803ed37e" CreationDate="2022-03-17T18:20:04.443" UserId="697" Text="The big problem after random data is private data which blockchain does not have privacy at all, so you must define a protocol to keep data encrypted in blockchain but at the end of each turn players should show their hands and it needs a way to be sure the player can not create a random hand for itself and should get the hand from the dealer, but if the dealer knows the hand it could be a way to fraud, at the end i have solved the problem by another type of miners who generate hands by solving a diffucult equity and keeps the hash of that data, sends the data to player and player solves another equity to create a random hand ... may be helpful :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="2931" PostHistoryTypeId="2" PostId="811" RevisionGUID="aa4a9299-0ecd-4bd1-b35f-9f1e65b2b5da" CreationDate="2022-03-17T18:26:07.997" UserId="699" Text="Having a **block** with all the extrinsics/events, what code should I write (preferably using polkadotJs) to compute the **total amount of fees** paid?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2933" PostHistoryTypeId="1" PostId="811" RevisionGUID="aa4a9299-0ecd-4bd1-b35f-9f1e65b2b5da" CreationDate="2022-03-17T18:26:07.997" UserId="699" Text="How to compute the fees of a block" ContentLicense="CC BY-SA 4.0" />
  <row Id="2934" PostHistoryTypeId="3" PostId="811" RevisionGUID="aa4a9299-0ecd-4bd1-b35f-9f1e65b2b5da" CreationDate="2022-03-17T18:26:07.997" UserId="699" Text="|polkadot-js|extrinsic|block|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2935" PostHistoryTypeId="2" PostId="812" RevisionGUID="c04ee2f1-783e-4afd-95fc-4adab3e48315" CreationDate="2022-03-17T18:28:01.190" UserId="697" Text="```&#xD;&#xA;[dependencies]&#xD;&#xA;serde = &quot;1.0&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2937" PostHistoryTypeId="2" PostId="813" RevisionGUID="4d31abb9-d367-4f39-8ceb-2a06a0753af4" CreationDate="2022-03-17T18:31:44.190" UserId="699" Text="Some extrinsics allow fees to not be paid if they execute properly (Ex: `council.vote` if it is the first vote of that account on the given proposal).&#xD;&#xA;&#xD;&#xA;What happens when those extrinsics are included inside a `utility.batch` or `utility.batchAll`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2939" PostHistoryTypeId="1" PostId="813" RevisionGUID="4d31abb9-d367-4f39-8ceb-2a06a0753af4" CreationDate="2022-03-17T18:31:44.190" UserId="699" Text="Do all extrinsics fees must be paid when using utility.batch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2940" PostHistoryTypeId="3" PostId="813" RevisionGUID="4d31abb9-d367-4f39-8ceb-2a06a0753af4" CreationDate="2022-03-17T18:31:44.190" UserId="699" Text="|extrinsic|fee|batch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2941" PostHistoryTypeId="6" PostId="587" RevisionGUID="16946caf-e09e-426e-8f83-3a3e46d06907" CreationDate="2022-03-17T18:40:39.283" UserId="34" Comment="contracts is redundant, smart-contract should be used." Text="|polkadot-js|smart-contract|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2942" PostHistoryTypeId="24" PostId="587" RevisionGUID="16946caf-e09e-426e-8f83-3a3e46d06907" CreationDate="2022-03-17T18:40:39.283" Comment="Proposed by 34 approved by 178 edit id of 80" ContentLicense="CC BY-SA 4.0" />
  <row Id="2943" PostHistoryTypeId="6" PostId="714" RevisionGUID="d5f78e51-c682-401c-8d3a-003212873a53" CreationDate="2022-03-17T18:40:48.543" UserId="34" Comment="Etehreum is synonomus with Frontier in the context of substrate, ink is not in question here. " Text="|smart-contract|frontier|solang|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2944" PostHistoryTypeId="24" PostId="714" RevisionGUID="d5f78e51-c682-401c-8d3a-003212873a53" CreationDate="2022-03-17T18:40:48.543" Comment="Proposed by 34 approved by 178 edit id of 82" ContentLicense="CC BY-SA 4.0" />
  <row Id="2945" PostHistoryTypeId="2" PostId="814" RevisionGUID="278f23bc-d73a-494c-8381-b0384a43805f" CreationDate="2022-03-17T19:28:30.493" UserId="167" Text="here you go: &#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const at = await api.rpc.chain.getFinalizedHead();&#xD;&#xA;const block = await api.rpc.chain.getBlock(at);&#xD;&#xA;const blockFees = await Promise.all(block.block.extrinsics.map(&#xD;&#xA;    (ext) =&gt; api.rpc.payment.queryInfo(ext.toHex(), at.toHex()))&#xD;&#xA;);&#xD;&#xA;blockFees.forEach((x) =&gt; console.log(x.partialFee.toHuman()))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2947" PostHistoryTypeId="2" PostId="815" RevisionGUID="bd930364-c671-4dad-9ec9-99692d8d8128" CreationDate="2022-03-17T19:36:54.350" UserId="368" Text="Let's say I want to build a dapp, and I know which pallets it would require. How do I find out which of the current parachains (both Polkadot and Kusama) contain these pallets?&#xD;&#xA;&#xD;&#xA;I know https://(kusama|polkadot|etc).subscan.io/runtime exists, but is there a way to do this programmatically?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2949" PostHistoryTypeId="1" PostId="815" RevisionGUID="bd930364-c671-4dad-9ec9-99692d8d8128" CreationDate="2022-03-17T19:36:54.350" UserId="368" Text="How do I find out which parachains include the pallets my dapp needs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="2950" PostHistoryTypeId="3" PostId="815" RevisionGUID="bd930364-c671-4dad-9ec9-99692d8d8128" CreationDate="2022-03-17T19:36:54.350" UserId="368" Text="|substrate-node|pallet|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2951" PostHistoryTypeId="2" PostId="816" RevisionGUID="10ff03f8-8ecf-4cf8-aaab-521706b4ed01" CreationDate="2022-03-17T19:43:55.290" UserId="73" Text="Yes you will also need to pay for these transactions inside `utility.batch` or `utility.batchAll`. However, you also don't pay for each transaction separately, you pay for all of them directly together. The only thing that happens is that if a transaction returns a post weight, that will be taken into account to reduce the overall fee that will be deducted from the sender. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2953" PostHistoryTypeId="5" PostId="814" RevisionGUID="0ab2e6bd-c867-4686-9321-31648caadd33" CreationDate="2022-03-17T19:43:57.147" UserId="167" Comment="added 62 characters in body" Text="here you go: &#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const at = await api.rpc.chain.getFinalizedHead();&#xD;&#xA;const block = await api.rpc.chain.getBlock(at);&#xD;&#xA;const blockFees = await Promise.all(block.block.extrinsics.map(&#xD;&#xA;    (ext) =&gt; api.rpc.payment.queryInfo(ext.toHex(), at.toHex()))&#xD;&#xA;);&#xD;&#xA;blockFees.forEach((x) =&gt; console.log(x.partialFee.toHuman()))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Although, note that this does not take tips into account. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2954" PostHistoryTypeId="2" PostId="817" RevisionGUID="4fdb1124-d249-40ec-bd58-d0bb9ec6c3c2" CreationDate="2022-03-17T19:56:51.467" UserId="380" Text="Take a look at the runtime for the parachains in question. You could clone their repos and search the runtime `lib.rs` for `pallet_.*` entries.&#xD;&#xA;&#xD;&#xA;From the [moonbeam runtime](https://github.com/PureStake/moonbeam/blob/master/runtime/moonbeam/src/lib.rs):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use pallet_balances::NegativeImbalance;&#xD;&#xA;use pallet_ethereum::Call::transact;&#xD;&#xA;use pallet_ethereum::Transaction as EthereumTransaction;&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;pub use pallet_evm::GenesisAccount;&#xD;&#xA;use pallet_evm::{&#xD;&#xA;	Account as EVMAccount, EnsureAddressNever, EnsureAddressRoot, FeeCalculator, GasWeightMapping,&#xD;&#xA;	Runner,&#xD;&#xA;};&#xD;&#xA;use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From the [kusama](https://github.com/paritytech/polkadot/blob/f170bd6c8bdf9e36b6bd1575db885a9c0fc24b2c/runtime/kusama/src/lib.rs#L23-L87) runtime&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};&#xD;&#xA;use pallet_im_online::sr25519::AuthorityId as ImOnlineId;&#xD;&#xA;use pallet_mmr_primitives as mmr;&#xD;&#xA;use pallet_session::historical as session_historical;&#xD;&#xA;use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is a quick bash script for doing this:&#xD;&#xA;&#xD;&#xA;    substrate-contracts-node git:(initial_balance) ✗ grep -Po '(pallet_[a-z_]*)' runtime/src/lib.rs | sort | uniq &#xD;&#xA;    pallet_aura&#xD;&#xA;    pallet_balances&#xD;&#xA;    pallet_contracts&#xD;&#xA;    pallet_contracts_primitives&#xD;&#xA;    pallet_contracts_rpc_runtime_api&#xD;&#xA;    pallet_grandpa&#xD;&#xA;    pallet_randomness_collective_flip&#xD;&#xA;    pallet_sudo&#xD;&#xA;    pallet_timestamp&#xD;&#xA;    pallet_transaction_payment&#xD;&#xA;    pallet_transaction_payment_rpc_runtime_api&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2956" PostHistoryTypeId="2" PostId="818" RevisionGUID="f3e2eef6-6307-4188-b398-f75d11959838" CreationDate="2022-03-17T19:57:33.113" UserId="583" Text="I am trying to run a local network and post telemetry.&#xD;&#xA;&#xD;&#xA;I am running it with this command&#xD;&#xA;&#xD;&#xA;    SKIP_WASM_BUILD= cargo run -- \&#xD;&#xA;        --base-path data/node1 \&#xD;&#xA;        --chain local \&#xD;&#xA;        --alice \&#xD;&#xA;        --telemetry-url 'wss://telemetry.polkadot.io/submit/0 0' \&#xD;&#xA;        --name validator-alice \&#xD;&#xA;        --validator&#xD;&#xA;&#xD;&#xA;However , I get the following error in the console:&#xD;&#xA;&#xD;&#xA;&gt; 2022-03-17 23:46:42 ❌ Error while dialing&#xD;&#xA;&gt; /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F0: Custom&#xD;&#xA;&gt; { kind: Other, error: Other(A(Handshake(&quot;server rejected handshake;&#xD;&#xA;&gt; status code = 404&quot;))) }&#xD;&#xA;&#xD;&#xA;I would appreciate any assistance in understanding what I am doing wrong" ContentLicense="CC BY-SA 4.0" />
  <row Id="2958" PostHistoryTypeId="1" PostId="818" RevisionGUID="f3e2eef6-6307-4188-b398-f75d11959838" CreationDate="2022-03-17T19:57:33.113" UserId="583" Text="Telemetry for local network" ContentLicense="CC BY-SA 4.0" />
  <row Id="2959" PostHistoryTypeId="3" PostId="818" RevisionGUID="f3e2eef6-6307-4188-b398-f75d11959838" CreationDate="2022-03-17T19:57:33.113" UserId="583" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="2960" PostHistoryTypeId="2" PostId="819" RevisionGUID="c0ed4ff9-b34a-45b8-b08b-87188216f4ef" CreationDate="2022-03-17T20:13:09.327" UserId="29" Text="If you want to do this on the front end, this solution is a bit hacky but you could use [Polkadot{.js} API](https://polkadot.js.org/docs/substrate/storage) to check if the storage exists for that particular pallet (assuming that all pallets your dApp uses rely on pallet storage).&#xD;&#xA;&#xD;&#xA;For example to check the if the staking pallet exists in Polkadot and Rococo:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const getStorage = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    // Polkadot&#xD;&#xA;    const wsPolkadotProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const polkadotApi = await ApiPromise.create({ provider: wsPolkadotProvider });&#xD;&#xA;    console.log(await polkadotApi.query.staking)&#xD;&#xA;&#xD;&#xA;    // Rococo&#xD;&#xA;    const wsRococoProvider = new WsProvider('wss://rococo-rpc.polkadot.io');&#xD;&#xA;    const rococoApi = await ApiPromise.create({ provider: wsRococoProvider });&#xD;&#xA;    console.log(await rococoApi.query.staking)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running this script we see that Polkadot returns methods for staking and Rococo returns `undefined` because Rococo does not use the staking pallet:&#xD;&#xA;&#xD;&#xA;Output:&#xD;&#xA;```sh&#xD;&#xA;{&#xD;&#xA;  palletVersion: [Getter],&#xD;&#xA;  historyDepth: [Getter],&#xD;&#xA;  validatorCount: [Getter],&#xD;&#xA;  minimumValidatorCount: [Getter],&#xD;&#xA;  invulnerables: [Getter],&#xD;&#xA;  bonded: [Getter],&#xD;&#xA;  minNominatorBond: [Getter],&#xD;&#xA;  minValidatorBond: [Getter],&#xD;&#xA;  minCommission: [Getter],&#xD;&#xA;....&#xD;&#xA;undefined&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2962" PostHistoryTypeId="2" PostId="820" RevisionGUID="ce5100e4-1fd7-43ff-9ef4-35c7969a784a" CreationDate="2022-03-17T20:18:21.117" UserId="28" Text="Saying that &quot;fees are not paid&quot; is not a fully accurate statement of what is happening for things like `council.vote`.&#xD;&#xA;&#xD;&#xA;What is actually happening is that at the beginning of the transaction, you are charged a fee assuming the worst case scenario. If we detect you are a first time voter, we refund all of the fee back to the user at the end of the call.&#xD;&#xA;&#xD;&#xA;Unfortunately, the `batch` and `batch_all` calls are not clever enough to support knowing to refund just part of the fees of the call. Either all the fees are paid, or none of them are.&#xD;&#xA;&#xD;&#xA;Additional abstractions and code in the runtime could support this, but, the increased complexity probably won't be worth it at the moment." ContentLicense="CC BY-SA 4.0" />
  <row Id="2965" PostHistoryTypeId="2" PostId="821" RevisionGUID="0e92b25b-b759-4586-9e53-75bca3e789d1" CreationDate="2022-03-17T20:34:37.873" UserId="34" Text="https://docs.substrate.io/tutorials/v3/private-network/ has a good overview of how to do this correctly, including this command as reference for a [node template](https://github.com/substrate-developer-hub/substrate-node-template) _built_ with `cargo build -r`:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Looks like you have and extra `0` in the command you listed. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="2967" PostHistoryTypeId="5" PostId="70" RevisionGUID="9322afa5-253c-4dd2-8079-afbf82393012" CreationDate="2022-03-17T21:01:16.843" UserId="28" Comment="added 40 characters in body" Text="Questions about the Polkadot Relay Chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="2968" PostHistoryTypeId="2" PostId="822" RevisionGUID="1970dced-2813-41ed-8960-6b6177be122c" CreationDate="2022-03-17T21:01:43.343" UserId="34" Text="Some RPCs are [_not safe_ to expose](https://docs.substrate.io/v3/runtime/custom-rpcs/#public-rpcs) for anyone to call, this is an example of one. &#xD;&#xA;&#xD;&#xA;Why? creating and attempting to publish a block that is invalid could lead to [slashing](https://wiki.polkadot.network/docs/learn-staking#slashing). Thus you wouldn't want anyone to be able to instruct your node to build a block.&#xD;&#xA;&#xD;&#xA;Here are a few flags you might put to use to access `engine_createBlock`, and you can see more in `--help` used with the node:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        --rpc-external&#xD;&#xA;            Listen to all RPC interfaces.&#xD;&#xA;            &#xD;&#xA;            Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC&#xD;&#xA;            proxy server to filter out dangerous methods. More details:&#xD;&#xA;            &lt;https://docs.substrate.io/v3/runtime/custom-rpcs/#public-rpcs&gt;. Use `--unsafe-rpc-&#xD;&#xA;            external` to suppress the warning if you understand the risks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        --rpc-methods &lt;METHOD SET&gt;&#xD;&#xA;            RPC methods to expose.&#xD;&#xA;            &#xD;&#xA;            - `Unsafe`: Exposes every RPC method.&#xD;&#xA;            - `Safe`: Exposes only a safe subset of RPC methods, denying unsafe RPC methods.&#xD;&#xA;            - `Auto`: Acts as `Safe` if RPC is served externally, e.g. when `--{rpc,ws}-external` is&#xD;&#xA;              passed, otherwise acts as `Unsafe`.&#xD;&#xA;            &#xD;&#xA;            [default: Auto]&#xD;&#xA;            [possible values: Auto, Safe, Unsafe]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="2970" PostHistoryTypeId="2" PostId="823" RevisionGUID="eefa5180-26b5-43d1-9361-a23619bf75f1" CreationDate="2022-03-17T21:04:02.447" UserId="28" Text="A module that can be used to extend the capabilities of a FRAME-based runtime. Pallets bundle domain-specific logic with runtime primitives like events, and storage items." ContentLicense="CC BY-SA 4.0" />
  <row Id="2972" PostHistoryTypeId="1" PostId="823" RevisionGUID="eefa5180-26b5-43d1-9361-a23619bf75f1" CreationDate="2022-03-17T21:04:02.447" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="2973" PostHistoryTypeId="2" PostId="824" RevisionGUID="652eb037-43e7-40c7-b8b3-afd0c73d3e2a" CreationDate="2022-03-17T21:04:02.447" UserId="28" Text="Questions about Runtime Modules built with the FRAME developer SDK." ContentLicense="CC BY-SA 4.0" />
  <row Id="2975" PostHistoryTypeId="1" PostId="824" RevisionGUID="652eb037-43e7-40c7-b8b3-afd0c73d3e2a" CreationDate="2022-03-17T21:04:02.447" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="2976" PostHistoryTypeId="5" PostId="225" RevisionGUID="db7c4112-55af-45aa-b2bd-f3ee227b782f" CreationDate="2022-03-17T21:05:12.540" UserId="28" Comment="added 211 characters in body" Text="A parachain is a blockchain that derives shared infrastructure and security from a relay chain. You can learn more about parachains on the [Polkadot Wiki](https://wiki.polkadot.network/docs/en/learn-parachains)." ContentLicense="CC BY-SA 4.0" />
  <row Id="2977" PostHistoryTypeId="5" PostId="226" RevisionGUID="f73ef2ed-57da-4227-a425-c89b521ac410" CreationDate="2022-03-17T21:05:12.540" UserId="28" Comment="added 78 characters in body" Text="Questions about blockchains connected to relay chains like Polkadot or Kusama." ContentLicense="CC BY-SA 4.0" />
  <row Id="2978" PostHistoryTypeId="2" PostId="825" RevisionGUID="2ff4feed-318b-47c3-8a35-34b0135c8517" CreationDate="2022-03-17T21:06:57.330" UserId="28" Comment="deleted 689 characters in body" Text="An acronym for the _Framework for Runtime Aggregation of Modularized Entities_ that enables developers to create blockchain [runtime](#runtime) environments from a modular set of components called [pallets](#pallet).&#xD;&#xA;&#xD;&#xA;Runtime developers interact with FRAME using [macros](#macro) such as the following:&#xD;&#xA;&#xD;&#xA;* [`#[pallet::event]`](/v3/runtime/macros#palletevents)&#xD;&#xA;* [`#[pallet::error]`](/v3/runtime/macros#palleterror)&#xD;&#xA;* [`#[pallet::storage]`](/v3/runtime/macros#palletstorage)&#xD;&#xA;* [`#[frame_support::pallet]`](/v3/runtime/macros#frame_supportpallet)&#xD;&#xA;&#xD;&#xA;The macros make it easy to define custom pallets and compose pallets to create a working runtime using the [`construct_runtime!`](/v3/runtime/macros#construct_runtime)&#xD;&#xA;macro to deploy a Substrate-based blockchain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="2980" PostHistoryTypeId="1" PostId="825" RevisionGUID="2ff4feed-318b-47c3-8a35-34b0135c8517" CreationDate="2022-03-17T21:06:57.330" UserId="28" Comment="deleted 689 characters in body" ContentLicense="CC BY-SA 4.0" />
  <row Id="2981" PostHistoryTypeId="2" PostId="826" RevisionGUID="036601df-47ef-45e6-80db-dfe8dc6c631a" CreationDate="2022-03-17T21:06:57.330" UserId="28" Text="Questions about Substrate's framework for developing custom runtime logic." ContentLicense="CC BY-SA 4.0" />
  <row Id="2983" PostHistoryTypeId="1" PostId="826" RevisionGUID="036601df-47ef-45e6-80db-dfe8dc6c631a" CreationDate="2022-03-17T21:06:57.330" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="2984" PostHistoryTypeId="2" PostId="827" RevisionGUID="1e35f995-ff0d-4187-8890-c6d6c04ca4ac" CreationDate="2022-03-17T21:09:06.243" UserId="28" Text="Data that is external to the blockchain and included in a block. In general, there are two types of extrinsics:&#xD;&#xA;&#xD;&#xA; - signed or unsigned transactions.&#xD;&#xA; - inherents inserted by block authors." ContentLicense="CC BY-SA 4.0" />
  <row Id="2986" PostHistoryTypeId="1" PostId="827" RevisionGUID="1e35f995-ff0d-4187-8890-c6d6c04ca4ac" CreationDate="2022-03-17T21:09:06.243" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="2987" PostHistoryTypeId="2" PostId="828" RevisionGUID="28fb2f8f-9489-4f38-9b42-a81840b44235" CreationDate="2022-03-17T21:09:06.243" UserId="28" Text="Questions about runtime calls that can be submitted to the blockchain. a.k.a. Transaction, Dispatchable" ContentLicense="CC BY-SA 4.0" />
  <row Id="2989" PostHistoryTypeId="1" PostId="828" RevisionGUID="28fb2f8f-9489-4f38-9b42-a81840b44235" CreationDate="2022-03-17T21:09:06.243" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="2990" PostHistoryTypeId="2" PostId="829" RevisionGUID="3fcb5e71-f3ac-4dc9-bb00-78479aad014c" CreationDate="2022-03-17T21:10:16.347" UserId="28" Text="A set of tools for writing Substrate-based Polkadot parachains. Refer to the included overview for architectural details, and the Cumulus tutorial for a guided walk-through of using these tools.&#xD;&#xA;&#xD;&#xA;It's easy to write blockchains using Substrate, and the overhead of writing parachains' distribution, p2p, database, and synchronization layers should be just as low. This project aims to make it easy to write parachains for Polkadot by leveraging the power of Substrate.&#xD;&#xA;&#xD;&#xA;Cumulus clouds are shaped sort of like dots; together they form a system that is intricate, beautiful and functional." ContentLicense="CC BY-SA 4.0" />
  <row Id="2992" PostHistoryTypeId="1" PostId="829" RevisionGUID="3fcb5e71-f3ac-4dc9-bb00-78479aad014c" CreationDate="2022-03-17T21:10:16.347" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="2993" PostHistoryTypeId="2" PostId="830" RevisionGUID="6a6e8b26-e297-4ce7-94e3-b991de44118b" CreationDate="2022-03-17T21:10:16.347" UserId="28" Text="Questions about the library used to convert a Substrate chain to a Polkadot Parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="2995" PostHistoryTypeId="1" PostId="830" RevisionGUID="6a6e8b26-e297-4ce7-94e3-b991de44118b" CreationDate="2022-03-17T21:10:16.347" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="2996" PostHistoryTypeId="2" PostId="831" RevisionGUID="fe8aa804-16a6-4570-8607-9809f295f46d" CreationDate="2022-03-17T21:11:57.637" UserId="28" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="2998" PostHistoryTypeId="1" PostId="831" RevisionGUID="fe8aa804-16a6-4570-8607-9809f295f46d" CreationDate="2022-03-17T21:11:57.637" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="2999" PostHistoryTypeId="2" PostId="832" RevisionGUID="e28f50ff-ba93-4b8d-8df9-c0f2fbc74729" CreationDate="2022-03-17T21:11:57.637" UserId="28" Text="Questions about storing and accessing stored data on a Substrate blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="3001" PostHistoryTypeId="1" PostId="832" RevisionGUID="e28f50ff-ba93-4b8d-8df9-c0f2fbc74729" CreationDate="2022-03-17T21:11:57.637" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="3002" PostHistoryTypeId="5" PostId="66" RevisionGUID="fdf12aff-b888-4f1d-b513-fedf3f4a3ad3" CreationDate="2022-03-17T21:13:02.123" UserId="28" Comment="added 100 characters in body" Text="Questions about the Rust programming language, the primary language used in the Substrate ecosystem." ContentLicense="CC BY-SA 4.0" />
  <row Id="3003" PostHistoryTypeId="2" PostId="833" RevisionGUID="441c9526-f06f-444e-a894-777e4587a9ba" CreationDate="2022-03-17T21:13:19.597" UserId="94" Text="When I try to derive the Alice account with PolkadotJS I somehow end up with a different address than in the [docs](https://docs.substrate.io/v3/tools/subkey/#well-known-keys).  &#xD;&#xA;&#xD;&#xA;Here is the code:  &#xD;&#xA;```js&#xD;&#xA;const keyring = new (require('@polkadot/keyring').Keyring)();&#xD;&#xA;&#xD;&#xA;let pair = keyring.createFromUri('//Alice');&#xD;&#xA;console.log(`${pair.address}`);&#xD;&#xA;// prints 5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu&#xD;&#xA;```&#xD;&#xA;Prefixing the it with the dev menmonic `bottom drive obey lake curtain smoke basket hold race lonely fit walk` does not make a difference.  &#xD;&#xA;&#xD;&#xA;The unofficial [python bindings from polkascan](https://github.com/polkascan/py-substrate-interface) and [subkey](https://github.com/paritytech/substrate/tree/master/bin/utils/subkey) both yield the correct address:  &#xD;&#xA;```python&#xD;&#xA;from substrateinterface import Keypair&#xD;&#xA;&#xD;&#xA;keypair = Keypair.create_from_uri('//Alice')&#xD;&#xA;print(keypair.ss58_address)&#xD;&#xA;# prints 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Subkey:&#xD;&#xA;```sh&#xD;&#xA;docker run -it --rm --pull=always docker.io/parity/subkey:latest inspect &quot;//Alice&quot; | grep &quot;SS58 Address&quot;&#xD;&#xA;# prints 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Am I somehow using it wrong or why is PolkadotJS printing `5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3005" PostHistoryTypeId="1" PostId="833" RevisionGUID="441c9526-f06f-444e-a894-777e4587a9ba" CreationDate="2022-03-17T21:13:19.597" UserId="94" Text="PolkadotJS ALICE address differs" ContentLicense="CC BY-SA 4.0" />
  <row Id="3006" PostHistoryTypeId="3" PostId="833" RevisionGUID="441c9526-f06f-444e-a894-777e4587a9ba" CreationDate="2022-03-17T21:13:19.597" UserId="94" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3007" PostHistoryTypeId="2" PostId="834" RevisionGUID="c523c2e5-f94f-4b42-81ef-fbcf105ff617" CreationDate="2022-03-17T21:13:46.860" UserId="28" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="3009" PostHistoryTypeId="1" PostId="834" RevisionGUID="c523c2e5-f94f-4b42-81ef-fbcf105ff617" CreationDate="2022-03-17T21:13:46.860" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="3010" PostHistoryTypeId="2" PostId="835" RevisionGUID="ebd8acbe-e344-418c-862a-b68fc8cad261" CreationDate="2022-03-17T21:13:46.860" UserId="28" Text="Questions about Proof-of-Stake systems built on top of Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="3012" PostHistoryTypeId="1" PostId="835" RevisionGUID="ebd8acbe-e344-418c-862a-b68fc8cad261" CreationDate="2022-03-17T21:13:46.860" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="3013" PostHistoryTypeId="2" PostId="836" RevisionGUID="2f754c6c-5633-450f-92d3-07349358bdd8" CreationDate="2022-03-17T21:16:01.313" UserId="28" Text="The Substrate repository has an example node that can be found here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/tree/master/bin/node&#xD;&#xA;&#xD;&#xA;This node is basically a demo of how to include every different Pallet included with Substrate into a Substrate chain.&#xD;&#xA;&#xD;&#xA;It uses BABE and GRANDPA consensus, along with a NPoS system, however the token economics on this node are not really thought through." ContentLicense="CC BY-SA 4.0" />
  <row Id="3015" PostHistoryTypeId="1" PostId="836" RevisionGUID="2f754c6c-5633-450f-92d3-07349358bdd8" CreationDate="2022-03-17T21:16:01.313" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="3016" PostHistoryTypeId="2" PostId="837" RevisionGUID="6d8691c3-1b48-44e1-949d-48598a4cc9a5" CreationDate="2022-03-17T21:16:01.313" UserId="28" Text="Questions about the included blockchain node in the main Substrate code-base." ContentLicense="CC BY-SA 4.0" />
  <row Id="3018" PostHistoryTypeId="1" PostId="837" RevisionGUID="6d8691c3-1b48-44e1-949d-48598a4cc9a5" CreationDate="2022-03-17T21:16:01.313" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="3019" PostHistoryTypeId="2" PostId="838" RevisionGUID="db10311e-99c3-4dd5-90b6-c749a5ecf45f" CreationDate="2022-03-17T21:17:36.680" UserId="28" Text="The API provides application developers the ability to query a node and interact with the Polkadot or Substrate chains using Javascript.&#xD;&#xA;&#xD;&#xA;Learn more here: https://polkadot.js.org" ContentLicense="CC BY-SA 4.0" />
  <row Id="3021" PostHistoryTypeId="1" PostId="838" RevisionGUID="db10311e-99c3-4dd5-90b6-c749a5ecf45f" CreationDate="2022-03-17T21:17:36.680" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="3022" PostHistoryTypeId="2" PostId="839" RevisionGUID="10396d82-9803-4f1b-a59c-d2fd5ce3e3cb" CreationDate="2022-03-17T21:17:36.680" UserId="28" Text="Questions about the Polakdot JS API used to interact with Substrate based chains via JavaScript." ContentLicense="CC BY-SA 4.0" />
  <row Id="3024" PostHistoryTypeId="1" PostId="839" RevisionGUID="10396d82-9803-4f1b-a59c-d2fd5ce3e3cb" CreationDate="2022-03-17T21:17:36.680" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="3025" PostHistoryTypeId="2" PostId="840" RevisionGUID="9737b425-cff6-40e0-9453-25f4351d4eba" CreationDate="2022-03-17T21:19:44.440" UserId="28" Text="Make sure you specify your keyring to use `sr25519` versus `ed25519` which I believe is default:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// Create a keyring instance&#xD;&#xA;const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;See this [complete example](https://polkadot.js.org/docs/api/examples/promise/make-transfer): &#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// Import the API, Keyring and some utility functions&#xD;&#xA;const { ApiPromise } = require('@polkadot/api');&#xD;&#xA;const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  // Instantiate the API&#xD;&#xA;  const api = await ApiPromise.create();&#xD;&#xA;&#xD;&#xA;  // Constuct the keyring after the API (crypto has an async init)&#xD;&#xA;  const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;&#xD;&#xA;  // Add Alice to our keyring with a hard-deived path (empty phrase, so uses dev)&#xD;&#xA;  const alice = keyring.addFromUri('//Alice');&#xD;&#xA;&#xD;&#xA;  console.log(`${alice.address}`);&#xD;&#xA;  // prints 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3027" PostHistoryTypeId="2" PostId="841" RevisionGUID="1d16258c-b38d-4254-8d9a-c6177d93a883" CreationDate="2022-03-17T21:26:05.653" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="3029" PostHistoryTypeId="1" PostId="841" RevisionGUID="1d16258c-b38d-4254-8d9a-c6177d93a883" CreationDate="2022-03-17T21:26:05.653" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="3030" PostHistoryTypeId="2" PostId="842" RevisionGUID="5528bcb0-4c1a-4f58-ad76-d178f9fd4384" CreationDate="2022-03-17T21:26:05.653" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="3032" PostHistoryTypeId="1" PostId="842" RevisionGUID="5528bcb0-4c1a-4f58-ad76-d178f9fd4384" CreationDate="2022-03-17T21:26:05.653" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="3033" PostHistoryTypeId="6" PostId="833" RevisionGUID="1ae91863-1e84-499a-b469-1f7cc6e1a104" CreationDate="2022-03-17T21:28:04.283" UserId="28" Comment="edited tags" Text="|polkadot-js|keyring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3034" PostHistoryTypeId="2" PostId="843" RevisionGUID="cc177a31-e88f-4582-94b3-175debc89ebe" CreationDate="2022-03-17T21:29:44.360" UserId="34" Text="You must upgrade. Breaking changes since 0.9.13 have landed, and no relay chain can support you presently. It may be easier to start over implementing your changes (adding pallets mostly I see) based on the version of the [parachain template](https://github.com/substrate-developer-hub/substrate-parachain-template) that **matches your target relaychain**." ContentLicense="CC BY-SA 4.0" />
  <row Id="3036" PostHistoryTypeId="2" PostId="844" RevisionGUID="f14427a9-ec03-495d-9b07-c1c839444d6f" CreationDate="2022-03-17T21:31:47.497" UserId="332" Text="I setup a small 3 node network that is using BABE and GRANDPA. When all 3 nodes are connected, it can produce blocks and finalize them. When 2 of the 3 nodes are connected, it can produce blocks but NOT finalize them.&#xD;&#xA;&#xD;&#xA;How can I configure GRANDPA so that blocks can be finalized when 2 of the 3 nodes are connected?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3038" PostHistoryTypeId="1" PostId="844" RevisionGUID="f14427a9-ec03-495d-9b07-c1c839444d6f" CreationDate="2022-03-17T21:31:47.497" UserId="332" Text="GRANDPA not finalizing with 2 of 3 nodes on network" ContentLicense="CC BY-SA 4.0" />
  <row Id="3039" PostHistoryTypeId="3" PostId="844" RevisionGUID="f14427a9-ec03-495d-9b07-c1c839444d6f" CreationDate="2022-03-17T21:31:47.497" UserId="332" Text="|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3040" PostHistoryTypeId="2" PostId="845" RevisionGUID="226c46ea-7847-48cb-a36c-8ec85e2f2c7d" CreationDate="2022-03-17T21:50:23.343" UserId="283" Text="Generally, you should use the `x_runtime.compact.compressed.wasm` which is about a factor of 3 smaller than the compact wasm. This runtime is compressed with zlib and the node knows to decompress it before execution. Using the compressed Wasm saves space on-chain and over the network.&#xD;&#xA;&#xD;&#xA;As for Rococo configuration, that's something that'd be up to the Parity team in charge of the testnet.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3042" PostHistoryTypeId="5" PostId="817" RevisionGUID="4cc3b5fc-6937-4d2d-8eba-9f40b0f085eb" CreationDate="2022-03-17T21:50:54.830" UserId="368" Comment="fix bash syntax" Text="Take a look at the runtime for the parachains in question. You could clone their repos and search the runtime `lib.rs` for `pallet_.*` entries.&#xD;&#xA;&#xD;&#xA;From the [moonbeam runtime](https://github.com/PureStake/moonbeam/blob/master/runtime/moonbeam/src/lib.rs):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use pallet_balances::NegativeImbalance;&#xD;&#xA;use pallet_ethereum::Call::transact;&#xD;&#xA;use pallet_ethereum::Transaction as EthereumTransaction;&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;pub use pallet_evm::GenesisAccount;&#xD;&#xA;use pallet_evm::{&#xD;&#xA;	Account as EVMAccount, EnsureAddressNever, EnsureAddressRoot, FeeCalculator, GasWeightMapping,&#xD;&#xA;	Runner,&#xD;&#xA;};&#xD;&#xA;use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From the [kusama](https://github.com/paritytech/polkadot/blob/f170bd6c8bdf9e36b6bd1575db885a9c0fc24b2c/runtime/kusama/src/lib.rs#L23-L87) runtime&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};&#xD;&#xA;use pallet_im_online::sr25519::AuthorityId as ImOnlineId;&#xD;&#xA;use pallet_mmr_primitives as mmr;&#xD;&#xA;use pallet_session::historical as session_historical;&#xD;&#xA;use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is a quick bash script for doing this:&#xD;&#xA;&#xD;&#xA;    $ grep -Po '(pallet_[a-z_]*)' runtime/src/lib.rs | sort | uniq &#xD;&#xA;    pallet_aura&#xD;&#xA;    pallet_balances&#xD;&#xA;    pallet_contracts&#xD;&#xA;    pallet_contracts_primitives&#xD;&#xA;    pallet_contracts_rpc_runtime_api&#xD;&#xA;    pallet_grandpa&#xD;&#xA;    pallet_randomness_collective_flip&#xD;&#xA;    pallet_sudo&#xD;&#xA;    pallet_timestamp&#xD;&#xA;    pallet_transaction_payment&#xD;&#xA;    pallet_transaction_payment_rpc_runtime_api&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3043" PostHistoryTypeId="24" PostId="817" RevisionGUID="4cc3b5fc-6937-4d2d-8eba-9f40b0f085eb" CreationDate="2022-03-17T21:50:54.830" Comment="Proposed by 368 approved by 380 edit id of 83" ContentLicense="CC BY-SA 4.0" />
  <row Id="3044" PostHistoryTypeId="2" PostId="846" RevisionGUID="e9cae5a3-ff68-43a8-bda1-bad5048f2e73" CreationDate="2022-03-17T22:01:04.070" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="3046" PostHistoryTypeId="1" PostId="846" RevisionGUID="e9cae5a3-ff68-43a8-bda1-bad5048f2e73" CreationDate="2022-03-17T22:01:04.070" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="3047" PostHistoryTypeId="2" PostId="847" RevisionGUID="065a8cde-0e11-45e8-ad1b-f76b6f5cd95c" CreationDate="2022-03-17T22:01:04.070" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="3049" PostHistoryTypeId="1" PostId="847" RevisionGUID="065a8cde-0e11-45e8-ad1b-f76b6f5cd95c" CreationDate="2022-03-17T22:01:04.070" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="3052" PostHistoryTypeId="2" PostId="848" RevisionGUID="88457218-87eb-47c1-a814-d21c640980a1" CreationDate="2022-03-17T22:59:39.310" UserId="85" Text="Great question. If the blockchains you want to interrogate are online then you can get a list of pallets used from the command line using subwasm.&#xD;&#xA;&#xD;&#xA;`subwasm meta wss://rpc.polkadot.io:433`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;- 00: System&#xD;&#xA; - 01: Scheduler&#xD;&#xA; - 02: Babe&#xD;&#xA; - 03: Timestamp&#xD;&#xA; - 04: Indices&#xD;&#xA; - 05: Balances&#xD;&#xA; - 06: Authorship&#xD;&#xA;...snip...&#xD;&#xA; - 71: Slots&#xD;&#xA; - 72: Auctions&#xD;&#xA; - 73: Crowdloan&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;https://github.com/chevdor/subwasm&#xD;&#xA;&#xD;&#xA;Personally I would like to see a way of grepping all the runtime lib.rs across all the parachains and solo chains that are open source. I think that would be enlightening." ContentLicense="CC BY-SA 4.0" />
  <row Id="3055" PostHistoryTypeId="2" PostId="849" RevisionGUID="87104aa9-dc87-43e1-887f-5264c7e9fff2" CreationDate="2022-03-17T23:09:55.770" UserId="128" Text="By default the Polkadot{.js} extension injects all addresses that have been imported into the browser wallet when a connection is requested by a website.&#xD;&#xA;&#xD;&#xA;In comparison, the Metamask extension on Ethereum/Moonbeam/Astar allows you to choose which addresses you want to share with the application:&#xD;&#xA;&#xD;&#xA;[![Metamask connect address][1]][1]&#xD;&#xA;&#xD;&#xA;How would this be accomplished with the Polkadot{.js} extension?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VlfNj.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3057" PostHistoryTypeId="1" PostId="849" RevisionGUID="87104aa9-dc87-43e1-887f-5264c7e9fff2" CreationDate="2022-03-17T23:09:55.770" UserId="128" Text="How to prevent Polkadot{.js} extension from injecting all addresses into the site's JavaScript context" ContentLicense="CC BY-SA 4.0" />
  <row Id="3058" PostHistoryTypeId="3" PostId="849" RevisionGUID="87104aa9-dc87-43e1-887f-5264c7e9fff2" CreationDate="2022-03-17T23:09:55.770" UserId="128" Text="|polkadot-js|account|polkadot-js-extension|metamask|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3059" PostHistoryTypeId="2" PostId="850" RevisionGUID="6c1ea8fc-d758-4fc5-b225-4652605ef86c" CreationDate="2022-03-17T23:09:55.770" UserId="128" Text="The Polkadot{.js} extension doesn't offer site-specific account permissions the same way that Metamask does.&#xD;&#xA;&#xD;&#xA;However, you can set the global visibility of each individual account which will prevent the account information from being injected into the website when a connection is made.&#xD;&#xA;&#xD;&#xA;To hide an account click on the eye icon (it will become red and crossed out when the account is hidden):&#xD;&#xA;&#xD;&#xA;[![Polkadot hide account][1]][1]&#xD;&#xA;&#xD;&#xA;Note that you will have to toggle the visibility settings every time you want to change which accounts are visible to an application.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XKZzE.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3062" PostHistoryTypeId="2" PostId="851" RevisionGUID="e8429299-8aa2-4005-9765-caa5fd958c17" CreationDate="2022-03-18T02:00:10.737" UserId="128" Text="I transferred some KSM from the Kusama relay chain to the Karura parachain, and now I want to withdraw the tokens back to the relay chain. &#xD;&#xA;&#xD;&#xA;That said, it seems that currently the Karura graphical interface is not working (down for meintenance) so I can't use the standard way of bridging the assets out of Karura back to Kusama.&#xD;&#xA;&#xD;&#xA;How can I go about withdrawing the KSM tokens directly without having to use the Karura graphical interface?&#xD;&#xA;&#xD;&#xA;[![Karura Bridge UI][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/W9uYN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3064" PostHistoryTypeId="1" PostId="851" RevisionGUID="e8429299-8aa2-4005-9765-caa5fd958c17" CreationDate="2022-03-18T02:00:10.737" UserId="128" Text="How to withdraw tokens from a parachain when the graphical interface is not working?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3065" PostHistoryTypeId="3" PostId="851" RevisionGUID="e8429299-8aa2-4005-9765-caa5fd958c17" CreationDate="2022-03-18T02:00:10.737" UserId="128" Text="|parachain|xcm|assets|bridge|xtokens|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3066" PostHistoryTypeId="2" PostId="852" RevisionGUID="ca98caa9-142a-4fe0-8844-e946fbb283e3" CreationDate="2022-03-18T02:00:10.737" UserId="128" Text="You can withdraw the assets by submitting an XCM extrinsic directly to the Karura parachain (this applies to any parachain that uses the `xtokens` pallet: [xtokens](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens)).&#xD;&#xA;&#xD;&#xA;This can be done from the command line, but the easier way is to use the Polkadot.js interface for the relevant parachain, the Karura interface can be found here: [Karura - Extrinsics](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkarura-rpc-0.aca-api.network#/extrinsics).&#xD;&#xA;&#xD;&#xA;An example of an `xToken` transfer in a JSON format looks like this:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    name: &quot;currency_id&quot;,&#xD;&#xA;    type: &quot;acala_primitives:currency:CurrencyId&quot;,&#xD;&#xA;    type_name: &quot;CurrencyId&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      Token: &quot;KSM&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;amount&quot;,&#xD;&#xA;    type: &quot;U128&quot;,&#xD;&#xA;    type_name: &quot;Balance&quot;,&#xD;&#xA;    value: &quot;123400000000&quot;&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;dest&quot;,&#xD;&#xA;    type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;    type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      V1: {&#xD;&#xA;        interior: {&#xD;&#xA;          X1: {&#xD;&#xA;            AccountId32: {&#xD;&#xA;              id: &quot;0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&quot;,&#xD;&#xA;              network: {&#xD;&#xA;                Any: null&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        parents: 1&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;dest_weight&quot;,&#xD;&#xA;    type: &quot;U64&quot;,&#xD;&#xA;    type_name: &quot;Weight&quot;,&#xD;&#xA;    value: 5000000000&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;**Arg 1:** `currency_id` defines the token you want to transfer - in our case it's `KSM`.&#xD;&#xA;&#xD;&#xA;**Arg 2:** `amount` defines the amount of tokens you want to transfer - this value uses base units so 1 KSM is 1000000000000 in base units - in our case 123400000000 is equal to 0.1234 KSM&#xD;&#xA;&#xD;&#xA;**Arg 3:** `dest` defines the destination address to which we want to send the tokens - note that this is the 32 byte account ID and not the SS58 address format (you can get the account ID from an address using the `subkey inspect &lt;SS58&gt;` command in the terminal).&#xD;&#xA;&#xD;&#xA;**Arg 4:** `dest_weight` defines the weight for XCM execution on the destination chain - here we set a constant of 5000000000.&#xD;&#xA;&#xD;&#xA;Using the Polkadot.js interface we can fill out the `xTokens.transfer()` extrinsic information:&#xD;&#xA;&#xD;&#xA;[![Extrinsics interface][1]][1]&#xD;&#xA;&#xD;&#xA;We can then submit the transaction and the KSM tokens should be transferred from Karura to Kusama when the transaction is included in the chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/yLGv4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3068" PostHistoryTypeId="2" PostId="853" RevisionGUID="6b6c0397-6024-40f4-bc66-edda3e8c6abd" CreationDate="2022-03-18T02:03:25.800" UserId="28" Text="Your trait bounds are not correct for the type you are passing.&#xD;&#xA;&#xD;&#xA;In your struct definition you wrote:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl&lt;T:pallet::Config+frame_system::Config,U&gt; Investor&lt;T,U&gt; {&#xD;&#xA;   ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But then you called the type with:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Investor::&lt;T::AccountId, u32&gt;::contribute(who,dev.account_id,rent);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This wont work because `T::AccountId` does not implement `pallet::Config + frame_system::Config`, which is exactly what the compiler is telling you.&#xD;&#xA;&#xD;&#xA;If you have `T: pallet::Config + frame_system::Config`, then you need to call with:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Investor::&lt;T, u32&gt;::contribute(who,dev.account_id,rent);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where T in this case is already bounded to `pallet::Config + frame_system::Config` by the Pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="3070" PostHistoryTypeId="5" PostId="852" RevisionGUID="145c64ae-f4a6-4830-94b7-e6718ba7cdae" CreationDate="2022-03-18T02:05:38.733" UserId="128" Comment="added 8 characters in body" Text="You can withdraw the assets by submitting an XCM extrinsic directly to the Karura parachain (this applies to any parachain that uses the `xtokens` pallet: [xtokens](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens)).&#xD;&#xA;&#xD;&#xA;This can be done from the command line, but the easier way is to use the Polkadot.js interface for the relevant parachain, the Karura interface can be found here: [Karura - Extrinsics](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkarura-rpc-0.aca-api.network#/extrinsics).&#xD;&#xA;&#xD;&#xA;An example of an `xToken` transfer in a JSON format looks like this:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    name: &quot;currency_id&quot;,&#xD;&#xA;    type: &quot;acala_primitives:currency:CurrencyId&quot;,&#xD;&#xA;    type_name: &quot;CurrencyId&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      Token: &quot;KSM&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;amount&quot;,&#xD;&#xA;    type: &quot;U128&quot;,&#xD;&#xA;    type_name: &quot;Balance&quot;,&#xD;&#xA;    value: &quot;123400000000&quot;&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;dest&quot;,&#xD;&#xA;    type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;    type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      V1: {&#xD;&#xA;        interior: {&#xD;&#xA;          X1: {&#xD;&#xA;            AccountId32: {&#xD;&#xA;              id: &quot;0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&quot;,&#xD;&#xA;              network: {&#xD;&#xA;                Any: null&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        parents: 1&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;dest_weight&quot;,&#xD;&#xA;    type: &quot;U64&quot;,&#xD;&#xA;    type_name: &quot;Weight&quot;,&#xD;&#xA;    value: 5000000000&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;**Arg 1:** `currency_id` defines the token you want to transfer - in our case it's `KSM`.&#xD;&#xA;&#xD;&#xA;**Arg 2:** `amount` defines the amount of tokens you want to transfer - this value uses base units so 1 KSM is 1000000000000 in base units - in our case 123400000000 is equal to 0.1234 KSM&#xD;&#xA;&#xD;&#xA;**Arg 3:** `dest` defines the destination address to which we want to send the tokens - note that this is the 32 byte account ID and not the SS58 address format (you can get the account ID from an address using the `subkey inspect &lt;SS58&gt;` command in the terminal).&#xD;&#xA;&#xD;&#xA;**Arg 4:** `dest_weight` defines the weight for XCM execution on the destination chain - here we set a constant of 5000000000.&#xD;&#xA;&#xD;&#xA;Using the Polkadot.js interface we can fill out the `xTokens.transfer()` extrinsic information like so:&#xD;&#xA;&#xD;&#xA;[![Extrinsics interface][1]][1]&#xD;&#xA;&#xD;&#xA;We can then submit the transaction and the KSM tokens should be transferred from Karura to Kusama when the transaction is included in the chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/yLGv4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3071" PostHistoryTypeId="5" PostId="853" RevisionGUID="bcfdefa5-884f-487c-9bb8-e1d5bdb55fcc" CreationDate="2022-03-18T02:16:30.047" UserId="28" Comment="added 1246 characters in body" Text="You are really mixing up what the generic types mean to you.&#xD;&#xA;&#xD;&#xA;In one case, you have `T` represent the `AccountId` directly, and in the other case you have it represent your `Config`.&#xD;&#xA;&#xD;&#xA;Here is a minimal sample which uses most of the same code as what you want and compiles:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::{pallet_prelude::*, traits::Currency};&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;	type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;		pub fn do_something(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			something: u32,&#xD;&#xA;			acc: AccountIdOf&lt;T&gt;,&#xD;&#xA;			rent: BalanceOf&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin.clone())?;&#xD;&#xA;			let dev = Investor::&lt;T, u32&gt;::new(acc, something);&#xD;&#xA;			Investor::&lt;T, u32&gt;::contribute(origin, dev.account_id, rent)?;&#xD;&#xA;&#xD;&#xA;			// Do something&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Debug, PartialEq, Encode, Decode)]&#xD;&#xA;	pub struct Investor&lt;T: Config, U&gt; {&#xD;&#xA;		pub account_id: AccountIdOf&lt;T&gt;,&#xD;&#xA;		pub nft: U,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl&lt;T: Config, U&gt; Investor&lt;T, U&gt; {&#xD;&#xA;		pub fn new(acc: AccountIdOf&lt;T&gt;, nft: U) -&gt; Self {&#xD;&#xA;			Investor { account_id: acc, nft }&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		pub fn contribute(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			acc: AccountIdOf&lt;T&gt;,&#xD;&#xA;			value: BalanceOf&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// Do something&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note in this case, `T` always represents `T: Config`, and `AccountId` is always called with `AccountIdOf&lt;T&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="3072" PostHistoryTypeId="2" PostId="854" RevisionGUID="4364a3a2-a87e-4345-98e1-1e6c05a873e3" CreationDate="2022-03-18T02:47:11.883" UserId="28" Text="You can try this out by adding a simple test into your runtime:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[test]&#xD;&#xA;fn get_pallet_by_index() {&#xD;&#xA;	use frame_support::traits::PalletInfoAccess;&#xD;&#xA;	let balance_index = Balances::index();&#xD;&#xA;	println!(&quot;index is {:?}&quot;, balance_index);&#xD;&#xA;	// trigger an error to easily see the print statement&#xD;&#xA;	assert!(false);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The message that appears is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;---- get_pallet_by_index stdout ----&#xD;&#xA;index is 5&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And this matches what you can see in in the `construct_runtime!` where I ran this test:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Create the runtime by composing the FRAME pallets that were previously configured.&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		RandomnessCollectiveFlip: pallet_randomness_collective_flip,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		// Include the custom logic from the pallet-template in the runtime.&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;See that Balances is the 5th index (6th item) in the list." ContentLicense="CC BY-SA 4.0" />
  <row Id="3074" PostHistoryTypeId="4" PostId="851" RevisionGUID="82b3323c-cd42-4080-b9e5-859275b70e53" CreationDate="2022-03-18T02:49:18.380" UserId="34" Comment="this si not a generic answer, it's Karura specific " Text="How to withdraw tokens from a Karura when the Karura Bridge graphical interface is not working?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3075" PostHistoryTypeId="6" PostId="851" RevisionGUID="82b3323c-cd42-4080-b9e5-859275b70e53" CreationDate="2022-03-18T02:49:18.380" UserId="34" Comment="this si not a generic answer, it's Karura specific " Text="|parachain|xcm|assets|bridge|karura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3076" PostHistoryTypeId="24" PostId="851" RevisionGUID="82b3323c-cd42-4080-b9e5-859275b70e53" CreationDate="2022-03-18T02:49:18.380" Comment="Proposed by 34 approved by -1 edit id of 89" ContentLicense="CC BY-SA 4.0" />
  <row Id="3077" PostHistoryTypeId="4" PostId="851" RevisionGUID="f2e61b27-c885-4aaf-b77c-5cc07d9f1460" CreationDate="2022-03-18T02:49:18.380" UserId="128" Comment="this si not a generic answer, it's Karura specific " Text="How to withdraw KSM tokens from Karura without using the Karura Bridge graphical interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3081" PostHistoryTypeId="5" PostId="675" RevisionGUID="b80a72bc-a242-4a02-9833-96d83aca6998" CreationDate="2022-03-18T04:16:12.257" UserId="116" Comment="added 68 characters in body" Text="What are the steps to take to restart a chain when finality is lagging behind and block productions is also slowing down.&#xD;&#xA;&#xD;&#xA;In the logs there are prints like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Backing off claiming new slot for block authorship: finality is lagging.&#xD;&#xA;&#xD;&#xA;This network is a testnet, and it is only using two validators.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have the Sudo key for this chain what can I do to revive it?&#xD;&#xA;&#xD;&#xA;(This is related to https://substrate.stackexchange.com/questions/214/recovering-from-stalled-finality-babe-grandpa and https://substrate.stackexchange.com/questions/661/how-to-use-notestalled-to-recover-from-a-finality-lagging-chain but I'm looking for a checklist to recover the chain when I make another mistake)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3082" PostHistoryTypeId="2" PostId="855" RevisionGUID="2e81bdf4-6d3e-4a5f-95eb-ec9fdfc92a62" CreationDate="2022-03-18T04:25:55.913" UserId="624" Text="I am in the process of updating a react-app from polkadot.js api: 6.9.2 -&gt; 7.12.1. Following some advice in the docs: https://polkadot.js.org/docs/usage/FAQ/, I updated my customize-cra application with some babel plugins and webpack loaders. I am running `import { u8aToHex } from '@polkadot/util'` in a web worker. I am wondering if something is wrong with my configuration.&#xD;&#xA;&#xD;&#xA;After upgrading and adding the babel plugins and webpack loaders, I hit the following error. The code does not hit this issue in polkadot 6.9.2.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Uncaught ReferenceError: window is not defined&#xD;&#xA;getAbsoluteUrl	@	packageInfo.js:8&#xD;&#xA;../../node_modules/@polkadot/x-global/packageInfo.js	@	packageInfo.js:24&#xD;&#xA;__webpack_require__	@	bootstrap:167&#xD;&#xA;(anonymous)	@	index.js:1&#xD;&#xA;../../node_modules/@polkadot/x-global/index.js	@	index.js:17&#xD;&#xA;__webpack_require__	@	bootstrap:167&#xD;&#xA;../../node_modules/@polkadot/x-textdecoder/browser.js	@	browser.js:1&#xD;&#xA;__webpack_require__	@	bootstrap:167&#xD;&#xA;../../node_modules/@polkadot/util/detectOther.js	@	detectOther.js:1&#xD;&#xA;__webpack_require__	@	bootstrap:167&#xD;&#xA;../../node_modules/@polkadot/util/detectPackage.js	@	detectPackage.js:1&#xD;&#xA;__webpack_require__	@	bootstrap:167&#xD;&#xA;../../node_modules/@polkadot/util/index.js	@	index.js:1&#xD;&#xA;__webpack_require__	@	bootstrap:167&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Babel plugins and webpack loaders: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  removeBuiltInBabelConfig,&#xD;&#xA;  ...addBabelPresets(&#xD;&#xA;    '@babel/preset-typescript',&#xD;&#xA;    ['@babel/preset-react', { development: false, runtime: 'automatic' }],&#xD;&#xA;    ['@babel/preset-env', { loose: true, modules: 'commonjs', targets: { browsers: '&gt;0.25% and last 2 versions and not ie 11 and not OperaMini all', node: '12' } }]&#xD;&#xA;  ),&#xD;&#xA;  addBabelPlugin('@babel/plugin-proposal-nullish-coalescing-operator'),&#xD;&#xA;  addBabelPlugin('@babel/plugin-proposal-numeric-separator'),&#xD;&#xA;  addBabelPlugin('@babel/plugin-proposal-optional-chaining'),&#xD;&#xA;  addBabelPlugin(['@babel/plugin-transform-runtime', { &quot;useESModules&quot;: false }]),&#xD;&#xA;  addBabelPlugin('@babel/plugin-syntax-bigint'),&#xD;&#xA;  addBabelPlugin('@babel/plugin-transform-react-jsx'),&#xD;&#xA;  addBabelPlugin('@babel/plugin-syntax-top-level-await'),&#xD;&#xA;  addBabelPlugin('babel-plugin-styled-components'),&#xD;&#xA;  addBabelPlugin(['@babel/plugin-proposal-class-properties', { &quot;loose&quot;: true }]),&#xD;&#xA;  addBabelPlugin(['@babel/plugin-proposal-private-methods', { &quot;loose&quot;: true }]),&#xD;&#xA;  addBabelPlugin(['@babel/plugin-proposal-private-property-in-object', { &quot;loose&quot;: true }]),&#xD;&#xA;  addExternalBabelPlugin(['@babel/plugin-proposal-class-properties', { &quot;loose&quot;: true }]),&#xD;&#xA;  addExternalBabelPlugin(['@babel/plugin-proposal-private-methods', { &quot;loose&quot;: true }]),&#xD;&#xA;  addExternalBabelPlugin(['@babel/plugin-proposal-private-property-in-object', { &quot;loose&quot;: true }]),&#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;config.module.rules.push({&#xD;&#xA;      test: /\.js$/,&#xD;&#xA;      loader: require.resolve('@open-wc/webpack-import-meta-loader'),&#xD;&#xA;    })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3084" PostHistoryTypeId="1" PostId="855" RevisionGUID="2e81bdf4-6d3e-4a5f-95eb-ec9fdfc92a62" CreationDate="2022-03-18T04:25:55.913" UserId="624" Text="Best way to configure Webpack4 and @polkadot dependencies in a webworker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3085" PostHistoryTypeId="3" PostId="855" RevisionGUID="2e81bdf4-6d3e-4a5f-95eb-ec9fdfc92a62" CreationDate="2022-03-18T04:25:55.913" UserId="624" Text="|polkadot-js|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3087" PostHistoryTypeId="2" PostId="856" RevisionGUID="33124df6-2769-45aa-9b63-b2bc14b55118" CreationDate="2022-03-18T05:31:11.363" UserId="1723" Text="@Paradox&#xD;&#xA;I had the following question and I could not quite understand your response. Could you explain in more simple language for me? &#xD;&#xA;&#xD;&#xA;I linked a new Ledger to the Polkadot.js wallet and transferred some refunded DOT tokens into this wallet. But when I opened up my Ledger Live again, the DOT account is showing a “0” balance. Then I went on the Polkadot.js Chrome extension and attempted to link this same ledger, it also shows a zero balance AND it showed a different address for the same Ledger: &#xD;&#xA;&#xD;&#xA;14TaEDyp2QJovndX21KaiHpynuktGEP9eSTgVswsd6WC5jMp&#xD;&#xA;&#xD;&#xA;13NySAb5HVFE786mcizE5CUJ2p3mHWzS5apcYzhxiL4cJgX&#xD;&#xA;&#xD;&#xA;The above&#xD;&#xA;Are those 2 addresse for the same Ledger: one added on the “Accounts” tab and the other on the Chrome extension. &#xD;&#xA;&#xD;&#xA;Now I am hoping to contribute some of the DOT tokens to the Unique crowdloan, but I can transfer my tokens because Ledger shows a zero balance and my attempt to transfer to other Polkadot.js accounts also failed. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3089" PostHistoryTypeId="1" PostId="856" RevisionGUID="33124df6-2769-45aa-9b63-b2bc14b55118" CreationDate="2022-03-18T05:31:11.363" UserId="1723" Text="Polkadot.js and Ledger device compatibility" ContentLicense="CC BY-SA 4.0" />
  <row Id="3090" PostHistoryTypeId="3" PostId="856" RevisionGUID="33124df6-2769-45aa-9b63-b2bc14b55118" CreationDate="2022-03-18T05:31:11.363" UserId="1723" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3091" PostHistoryTypeId="2" PostId="857" RevisionGUID="4f70421b-fea7-4b41-9824-b3e9729e6e1c" CreationDate="2022-03-18T05:40:24.157" UserId="698" Text="Firstly, I would like to advise that you shouldn't contribute DOT using a Ledger account.  It becomes problematic when trying to access the crowdloaned tokens.  A regular account created on Polkadot.JS / Extension is fine.&#xD;&#xA;&#xD;&#xA;As it relates to the Ledger Live and Polkadot.JS.  &#xD;&#xA;&#xD;&#xA;When adding an account on Polkadot.JS you'll be presented with two numbers for your account. The first is Account type and the second is Account index.  Leave both values to 0 and you should attain the account on Ledger Live.&#xD;&#xA;&#xD;&#xA;Each combination of those numbers yields a new address.  You are accurate, there's one ledger device but from that one device you may 'derive' different addresses.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="3093" PostHistoryTypeId="5" PostId="856" RevisionGUID="51f19bd1-4e47-4dbf-a7e6-dbea80c830dd" CreationDate="2022-03-18T06:04:59.613" UserId="128" Comment="Fixed formatting of the question and added tags" Text="I linked a new Ledger to the Polkadot.js wallet and transferred some refunded DOT tokens into this wallet. But when I opened up my Ledger Live again, the DOT account is showing a `0` balance. Then I went on the Polkadot.js Chrome extension and attempted to link this same ledger, it also shows a zero balance AND it showed a different address for the same Ledger: &#xD;&#xA;&#xD;&#xA;14TaEDyp2QJovndX21KaiHpynuktGEP9eSTgVswsd6WC5jMp&#xD;&#xA;&#xD;&#xA;13NySAb5HVFE786mcizE5CUJ2p3mHWzS5apcYzhxiL4cJgX&#xD;&#xA;&#xD;&#xA;The above are those 2 addresses for the same Ledger: one added on the “Accounts” tab and the other on the Chrome extension. &#xD;&#xA;&#xD;&#xA;Now I am hoping to contribute some of the DOT tokens to the Unique crowdloan, but I can't transfer my tokens because Ledger shows a zero balance and my attempt to transfer to other Polkadot.js accounts also failed. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3094" PostHistoryTypeId="6" PostId="856" RevisionGUID="51f19bd1-4e47-4dbf-a7e6-dbea80c830dd" CreationDate="2022-03-18T06:04:59.613" UserId="128" Comment="Fixed formatting of the question and added tags" Text="|polkadot-js|account|polkadot-js-extension|ledger|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3095" PostHistoryTypeId="24" PostId="856" RevisionGUID="51f19bd1-4e47-4dbf-a7e6-dbea80c830dd" CreationDate="2022-03-18T06:04:59.613" Comment="Proposed by 128 approved by 1723 edit id of 94" ContentLicense="CC BY-SA 4.0" />
  <row Id="3100" PostHistoryTypeId="2" PostId="859" RevisionGUID="9210014b-570f-4df5-811e-5badcbea3db9" CreationDate="2022-03-18T06:42:06.190" UserId="299" Text="network: rococo live&#xD;&#xA;this is my parachain log.&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943689-0d21b2b4-fd13-40c1-9f3f-91e988a695fc.png)&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943705-a6c0d777-0087-4033-898f-3d44f73ef074.png)&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943716-b0c2d22c-2ec1-4305-9ec8-d62b0d7f035d.png)&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943726-a1e3dda6-7e0b-4081-b41b-cc1d3bebe868.png)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3102" PostHistoryTypeId="1" PostId="859" RevisionGUID="9210014b-570f-4df5-811e-5badcbea3db9" CreationDate="2022-03-18T06:42:06.190" UserId="299" Text="My parallel chain has not been able to issue a block after submitting the upgrade transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="3103" PostHistoryTypeId="3" PostId="859" RevisionGUID="9210014b-570f-4df5-811e-5badcbea3db9" CreationDate="2022-03-18T06:42:06.190" UserId="299" Text="|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3105" PostHistoryTypeId="2" PostId="860" RevisionGUID="fb729dd5-fc4b-4866-a249-7a59f96618fe" CreationDate="2022-03-18T06:46:24.613" UserId="128" Text="- Make sure that your Ledger firmware is the latest version: **2.0.2**&#xD;&#xA;&#xD;&#xA;[![Firmware version][1]][1]&#xD;&#xA;&#xD;&#xA;- Make sure that your Polkadot ledger app is the latest version: **11.9170.0**&#xD;&#xA;&#xD;&#xA;[![Polkadot ledger app][2]][2]&#xD;&#xA;&#xD;&#xA;As you mentioned in the comments your derivation path arguments should be `AccountType: 1` and `Account Index: 0` so that you can get the correct address: `14TaEDyp2QJovndX21KaiHpynuktGEP9eSTgVswsd6WC5jMp`.&#xD;&#xA;&#xD;&#xA;It seems that Ledger Live allows you to create new accounts only once you have some funds in the already existing account:&#xD;&#xA;&#xD;&#xA;[![Second account][3]][3]&#xD;&#xA;&#xD;&#xA;The first account is always `0,0` the second account should be `1,0` and have a different address.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aACZu.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/aWLiC.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/fZc8n.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3108" PostHistoryTypeId="5" PostId="860" RevisionGUID="5cf673f7-bcb4-4f14-9b98-209e8931bf55" CreationDate="2022-03-18T06:53:06.590" UserId="128" Comment="added 317 characters in body" Text="- Make sure that your Ledger firmware is the latest version: **2.0.2**&#xD;&#xA;&#xD;&#xA;[![Firmware version][1]][1]&#xD;&#xA;&#xD;&#xA;- Make sure that your Polkadot ledger app is the latest version: **11.9170.0**&#xD;&#xA;&#xD;&#xA;[![Polkadot ledger app][2]][2]&#xD;&#xA;&#xD;&#xA;As you mentioned in the comments your derivation path arguments should be `AccountType: 1` and `Account Index: 0` so that you can get the correct address: `14TaEDyp2QJovndX21KaiHpynuktGEP9eSTgVswsd6WC5jMp`.&#xD;&#xA;&#xD;&#xA;It seems that Ledger Live allows you to create new accounts only once you have some funds in the already existing account:&#xD;&#xA;&#xD;&#xA;[![Second account][3]][3]&#xD;&#xA;&#xD;&#xA;i.e. Once you create the first account you should deposit some funds to it (no less than 1.1 DOT to avoid the [existential deposit](https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit) clearing your funds) and then you will be able to create the second account.&#xD;&#xA;&#xD;&#xA;The first account is always `0,0` the second account should be `1,0` and have a different address.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aACZu.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/aWLiC.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/fZc8n.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3109" PostHistoryTypeId="5" PostId="852" RevisionGUID="84460bbe-9d94-48f7-88a2-7fc6d83e68a0" CreationDate="2022-03-18T07:06:01.800" UserId="128" Comment="added 126 characters in body" Text="You can withdraw the assets by submitting an XCM extrinsic directly to the Karura parachain (this applies to any parachain that uses the `xtokens` pallet: [xtokens](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens)).&#xD;&#xA;&#xD;&#xA;This can be done from the command line, but the easier way is to use the Polkadot.js interface for the relevant parachain, the Karura interface can be found here: [Karura - Extrinsics](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkarura-rpc-0.aca-api.network#/extrinsics).&#xD;&#xA;&#xD;&#xA;An example of an `xToken` transfer in a JSON format looks like this:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    name: &quot;currency_id&quot;,&#xD;&#xA;    type: &quot;acala_primitives:currency:CurrencyId&quot;,&#xD;&#xA;    type_name: &quot;CurrencyId&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      Token: &quot;KSM&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;amount&quot;,&#xD;&#xA;    type: &quot;U128&quot;,&#xD;&#xA;    type_name: &quot;Balance&quot;,&#xD;&#xA;    value: &quot;123400000000&quot;&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;dest&quot;,&#xD;&#xA;    type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;    type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      V1: {&#xD;&#xA;        interior: {&#xD;&#xA;          X1: {&#xD;&#xA;            AccountId32: {&#xD;&#xA;              id: &quot;0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&quot;,&#xD;&#xA;              network: {&#xD;&#xA;                Any: null&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        parents: 1&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;dest_weight&quot;,&#xD;&#xA;    type: &quot;U64&quot;,&#xD;&#xA;    type_name: &quot;Weight&quot;,&#xD;&#xA;    value: 5000000000&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;**Arg 1:** `currency_id` defines the token you want to transfer - in our case it's `KSM`.&#xD;&#xA;&#xD;&#xA;**Arg 2:** `amount` defines the amount of tokens you want to transfer - this value uses base units so 1 KSM is 1000000000000 in base units - in our case 123400000000 is equal to 0.1234 KSM&#xD;&#xA;&#xD;&#xA;**Arg 3:** `dest` defines the destination address to which we want to send the tokens - note that this is the 32 byte account ID and not the SS58 address format (you can get the account ID from an address using the `subkey inspect &lt;SS58&gt;` command in the terminal).&#xD;&#xA;&#xD;&#xA;**Note:** The parent junctions parameter `parents` should be set to `1` as we are sending the funds to a single external address.&#xD;&#xA;&#xD;&#xA;**Arg 4:** `dest_weight` defines the weight for XCM execution on the destination chain - here we set a constant of 5000000000.&#xD;&#xA;&#xD;&#xA;Using the Polkadot.js interface we can fill out the `xTokens.transfer()` extrinsic information like so:&#xD;&#xA;&#xD;&#xA;[![Extrinsics interface][1]][1]&#xD;&#xA;&#xD;&#xA;We can then submit the transaction and the KSM tokens should be transferred from Karura to Kusama when the transaction is included in the chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/yLGv4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3110" PostHistoryTypeId="4" PostId="859" RevisionGUID="1e242764-6931-430a-b42a-7c2b505011e9" CreationDate="2022-03-18T07:17:11.543" UserId="85" Comment="edited title" Text="My parachain has not been able to issue a block after submitting the upgrade transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="3111" PostHistoryTypeId="5" PostId="860" RevisionGUID="ada292db-8422-4fec-8866-96ea671373a7" CreationDate="2022-03-18T07:18:13.033" UserId="128" Comment="added 15 characters in body" Text="- Make sure that your Ledger firmware is the latest version: **2.0.2**&#xD;&#xA;&#xD;&#xA;[![Firmware version][1]][1]&#xD;&#xA;&#xD;&#xA;- Make sure that your Polkadot ledger app is the latest version: **11.9170.0**&#xD;&#xA;&#xD;&#xA;[![Polkadot ledger app][2]][2]&#xD;&#xA;&#xD;&#xA;As you mentioned in the comments your derivation path arguments should be `AccountType: 1` and `Account Index: 0` so that you can get the correct address: `14TaEDyp2QJovndX21KaiHpynuktGEP9eSTgVswsd6WC5jMp`.&#xD;&#xA;&#xD;&#xA;It seems that Ledger Live allows you to create new accounts only once you have some funds in the already existing account:&#xD;&#xA;&#xD;&#xA;[![Second account][3]][3]&#xD;&#xA;&#xD;&#xA;i.e. Once you create the first account you should deposit some funds to it (no less than 1 DOT to avoid dropping below the [existential deposit](https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit)) and then you will be able to create the second account.&#xD;&#xA;&#xD;&#xA;The first account is always `0,0` the second account should be `1,0` and have a different address.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aACZu.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/aWLiC.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/fZc8n.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3112" PostHistoryTypeId="5" PostId="860" RevisionGUID="c23b030f-e99c-4b41-8096-8beceebbe4c1" CreationDate="2022-03-18T07:31:55.597" UserId="128" Comment="added 285 characters in body" Text="- Make sure that your Ledger firmware is the latest version: **2.0.2**&#xD;&#xA;&#xD;&#xA;[![Firmware version][1]][1]&#xD;&#xA;&#xD;&#xA;- Make sure that your Polkadot ledger app is the latest version: **11.9170.0**&#xD;&#xA;&#xD;&#xA;[![Polkadot ledger app][2]][2]&#xD;&#xA;&#xD;&#xA;As you mentioned in the comments your derivation path arguments should be `AccountType: 1` and `Account Index: 0` so that you can get the correct address: `14TaEDyp2QJovndX21KaiHpynuktGEP9eSTgVswsd6WC5jMp`.&#xD;&#xA;&#xD;&#xA;It seems that Ledger Live allows you to create new accounts only once you have some funds in the already existing account:&#xD;&#xA;&#xD;&#xA;[![Second account][3]][3]&#xD;&#xA;&#xD;&#xA;i.e. Once you create the first account you should deposit some funds to it (no less than 1 DOT to avoid dropping below the [existential deposit](https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit)) and then you will be able to create the second account.&#xD;&#xA;&#xD;&#xA;The first account is always `0,0` the second account should be `1,0` and have a different address.&#xD;&#xA;&#xD;&#xA;The full derivation paths would be `m/44'/354'/account'/0'/0'` and `m/44'/354'/account'/1'/0'` correspondingly.&#xD;&#xA;&#xD;&#xA;Note that Ledger Live has some limitations:&#xD;&#xA;&#xD;&#xA;- It only detects/creates addresses with `Address Index: 0`&#xD;&#xA;- It will only scan 11 accounts from the last address used&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5ZZNY.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/aWLiC.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/fZc8n.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3113" PostHistoryTypeId="5" PostId="859" RevisionGUID="6cd02518-6b4a-45a3-a14c-042f5a05d826" CreationDate="2022-03-18T07:35:10.903" UserId="299" Comment="added 87 characters in body" Text="network: rococo live&#xD;&#xA;this is my parachain log.&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943689-0d21b2b4-fd13-40c1-9f3f-91e988a695fc.png)&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943705-a6c0d777-0087-4033-898f-3d44f73ef074.png)&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943716-b0c2d22c-2ec1-4305-9ec8-d62b0d7f035d.png)&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943726-a1e3dda6-7e0b-4081-b41b-cc1d3bebe868.png)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/P2V3z.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3114" PostHistoryTypeId="2" PostId="861" RevisionGUID="c54790cd-f8d7-444d-995a-ff41be7d0bed" CreationDate="2022-03-18T07:42:20.777" UserId="85" Text="(Just upgrading my comment so there is an answer.)&#xD;&#xA;&#xD;&#xA;It seems that RSA has a reprieve for now:&#xD;&#xA;https://www.schneier.com/blog/archives/2021/03/no-rsa-is-not-broken.html&#xD;&#xA;&#xD;&#xA;But it is definitely a protocol in need of sunsetting and for new development I would suggest choosing a far stronger alternative." ContentLicense="CC BY-SA 4.0" />
  <row Id="3116" PostHistoryTypeId="5" PostId="859" RevisionGUID="010c4c80-4588-4623-8c66-d8655dab7a99" CreationDate="2022-03-18T07:44:04.947" UserId="299" Comment="added 89 characters in body" Text="network: rococo live&#xD;&#xA;this is my parachain log.&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943689-0d21b2b4-fd13-40c1-9f3f-91e988a695fc.png)&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943705-a6c0d777-0087-4033-898f-3d44f73ef074.png)&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943716-b0c2d22c-2ec1-4305-9ec8-d62b0d7f035d.png)&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/158943726-a1e3dda6-7e0b-4081-b41b-cc1d3bebe868.png)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/P2V3z.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/yWaL1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3117" PostHistoryTypeId="2" PostId="862" RevisionGUID="52cb52ce-6f7f-4316-a05f-31277325bc7a" CreationDate="2022-03-18T08:15:00.313" UserId="452" Text="You can't do that in any safe manner. Every BFT consensus algorithm requires the total number of nodes to be at least `3f + 1` where `f` is the number of faulty nodes. In your case you have one faulty node, which means that the whole system should have at least 4 nodes, where 1 is faulty and the other 3 are healthy. With 3 nodes, no faulty node is tolerated.&#xD;&#xA;&#xD;&#xA;In case you're interested in this here's the seminal paper on this topic: [The Byzantine Generals Problem - Leslie Lamport, Robert Shostak, and Marshall Pease](https://lamport.azurewebsites.net/pubs/byz.pdf)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3119" PostHistoryTypeId="2" PostId="863" RevisionGUID="3c5f24c0-8c57-40f1-961b-2e78842c5fb2" CreationDate="2022-03-18T09:56:06.710" UserId="1722" Text="I'm a newbie in Rust, Substrate, and blockchain development. I'm developing an ink! smart contract that store a list of items. Since the storage version of `Vec` is not available yet, I use a `Mapping` to store the items instead. I've implemented contract methods for adding and getting items successfully. Here is my code:&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct MyContract {&#xD;&#xA;      map: Mapping&lt;u32, MyStruct&gt;,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl MyContract {&#xD;&#xA;      #[ink(constructor)]&#xD;&#xA;      pub fn default() -&gt; Self {&#xD;&#xA;        ink_lang::utils::initialize_contract(|_| {})&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      #[ink(message)]&#xD;&#xA;      pub fn add_item(&amp;mut self, item: MyStruct) {&#xD;&#xA;        self.map.insert(item.id, &amp;item);&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      #[ink(message)]&#xD;&#xA;      pub fn get_item(&amp;self, id: u32) -&gt; MyStruct {&#xD;&#xA;        self.map.get(&amp;id).unwrap().clone()&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now I'm trying to create a method that returns the whole list to the caller. But I'm not able to find a way to do that. Maybe I should convert `Mapping` to `Vec`, but again I can't find a way to do it. Could you please help me? Thanks.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3121" PostHistoryTypeId="1" PostId="863" RevisionGUID="3c5f24c0-8c57-40f1-961b-2e78842c5fb2" CreationDate="2022-03-18T09:56:06.710" UserId="1722" Text="How to return the whole Mapping from a contract method?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3122" PostHistoryTypeId="3" PostId="863" RevisionGUID="3c5f24c0-8c57-40f1-961b-2e78842c5fb2" CreationDate="2022-03-18T09:56:06.710" UserId="1722" Text="|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3123" PostHistoryTypeId="2" PostId="864" RevisionGUID="4f0cb78b-14b3-4d66-97f3-79b7df83eda0" CreationDate="2022-03-18T09:59:07.860" UserId="225" Text="I would also probably advise to avoid rsa. About your issue, it may be possible to import code in runtime by disabling 'std'.&#xD;&#xA;In your cargo.toml, import your ring dependency with flag 'no-default-feature' and add needed feature selectively (obviously not 'std').&#xD;&#xA;In no_std environment (runtime), you will not be able to generate key, or any access to rng. Not sure if signing will be possible, but in your use case you probably only need verification (hash commitment on chain, and reveal later by verifying against content)." ContentLicense="CC BY-SA 4.0" />
  <row Id="3125" PostHistoryTypeId="6" PostId="813" RevisionGUID="9e624070-94aa-413f-9e84-7770f9efd142" CreationDate="2022-03-18T10:12:22.093" UserId="34" Comment="remove over specific tag" Text="|extrinsic|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3126" PostHistoryTypeId="24" PostId="813" RevisionGUID="9e624070-94aa-413f-9e84-7770f9efd142" CreationDate="2022-03-18T10:12:22.093" Comment="Proposed by 34 approved by 178 edit id of 92" ContentLicense="CC BY-SA 4.0" />
  <row Id="3127" PostHistoryTypeId="6" PostId="784" RevisionGUID="262340d9-7f2b-426b-b662-9d3263008f2c" CreationDate="2022-03-18T10:12:40.720" UserId="34" Comment="remove over specific tags" Text="|kusama|rococo|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3128" PostHistoryTypeId="24" PostId="784" RevisionGUID="262340d9-7f2b-426b-b662-9d3263008f2c" CreationDate="2022-03-18T10:12:40.720" Comment="Proposed by 34 approved by 178 edit id of 91" ContentLicense="CC BY-SA 4.0" />
  <row Id="3129" PostHistoryTypeId="6" PostId="809" RevisionGUID="c7aac393-c32c-4cf8-9d1f-cbbbf5e4548c" CreationDate="2022-03-18T10:12:50.863" UserId="34" Comment="removing a sepcific tag, adding a genereal one that can be used for this class of question" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3130" PostHistoryTypeId="24" PostId="809" RevisionGUID="c7aac393-c32c-4cf8-9d1f-cbbbf5e4548c" CreationDate="2022-03-18T10:12:50.863" Comment="Proposed by 34 approved by 178 edit id of 90" ContentLicense="CC BY-SA 4.0" />
  <row Id="3131" PostHistoryTypeId="6" PostId="818" RevisionGUID="5eae8be2-13ef-4e93-a5e9-2dcd15f2b3f6" CreationDate="2022-03-18T10:13:00.347" UserId="34" Comment="new tag, this is a good catagory for others to use IMHO" Text="|substrate-node|telemetry|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3132" PostHistoryTypeId="24" PostId="818" RevisionGUID="5eae8be2-13ef-4e93-a5e9-2dcd15f2b3f6" CreationDate="2022-03-18T10:13:00.347" Comment="Proposed by 34 approved by 178 edit id of 84" ContentLicense="CC BY-SA 4.0" />
  <row Id="3133" PostHistoryTypeId="6" PostId="803" RevisionGUID="434c9600-6d7c-460c-bdda-ee51e4df8a77" CreationDate="2022-03-18T10:14:05.547" UserId="34" Comment="more substrate specific tags" Text="|smart-contract|ink|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3134" PostHistoryTypeId="24" PostId="803" RevisionGUID="434c9600-6d7c-460c-bdda-ee51e4df8a77" CreationDate="2022-03-18T10:14:05.547" Comment="Proposed by 34 approved by 178 edit id of 85" ContentLicense="CC BY-SA 4.0" />
  <row Id="3135" PostHistoryTypeId="6" PostId="744" RevisionGUID="b107ec3a-de3a-40a4-a6bb-3b2f1e2864f7" CreationDate="2022-03-18T10:14:11.327" UserId="34" Comment="remove over specific tag" Text="|kitties|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3136" PostHistoryTypeId="24" PostId="744" RevisionGUID="b107ec3a-de3a-40a4-a6bb-3b2f1e2864f7" CreationDate="2022-03-18T10:14:11.327" Comment="Proposed by 34 approved by 178 edit id of 93" ContentLicense="CC BY-SA 4.0" />
  <row Id="3137" PostHistoryTypeId="2" PostId="865" RevisionGUID="b892304b-463d-4793-acaf-e8711890e539" CreationDate="2022-03-18T10:17:16.760" UserId="452" Text="The root cause of the issue here is stalled finality. The block production will deliberately slow down whenever finality is lagging for too long, this is to avoid creating long unfinalized forks. As such the steps to recovering from this would be the same as described in the two questions you linked.&#xD;&#xA;&#xD;&#xA;Still, this &quot;backoff&quot; logic is configurable and as such you can either disable it for your chain or increase the amount of unfinalized blocks that are tolerated. As an example from the node service: https://github.com/paritytech/substrate/blob/027fc0666fa2f981a693a394f76dc9f4b87209a4/bin/node/cli/src/service.rs#L367-L368 this is one of the arguments that must be passed when starting the BABE worker and it controls the backoff logic. If you pass `None` then no backoff will ever happen, or you can also fine-tune the finality backoff: https://github.com/paritytech/substrate/blob/027fc0666fa2f981a693a394f76dc9f4b87209a4/client/consensus/slots/src/lib.rs#L720-L736. As you can see by default the backoff will trigger after 50 unfinalized blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="3139" PostHistoryTypeId="2" PostId="866" RevisionGUID="f14442ec-5ac7-430e-b54b-6765f1f3130d" CreationDate="2022-03-18T10:27:12.563" UserId="1731" Text="How to add parachain logo to left side menu polkadot.js.org ?[![leftside menu][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sgvyp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3141" PostHistoryTypeId="1" PostId="866" RevisionGUID="f14442ec-5ac7-430e-b54b-6765f1f3130d" CreationDate="2022-03-18T10:27:12.563" UserId="1731" Text="how to add parachain logo to polkadot.js.org?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3142" PostHistoryTypeId="3" PostId="866" RevisionGUID="f14442ec-5ac7-430e-b54b-6765f1f3130d" CreationDate="2022-03-18T10:27:12.563" UserId="1731" Text="|polkadot-js|apps|ui|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3143" PostHistoryTypeId="2" PostId="867" RevisionGUID="3ff661c8-2598-4dab-9486-eaa766c1e987" CreationDate="2022-03-18T10:30:10.283" UserId="581" Text="My questions relate to Core Primitives for setting up a node with FRAME.&#xD;&#xA;&#xD;&#xA;1. Do I include the Core Primitives by using the Crate **frame_system** or Crate **node_primitives**?&#xD;&#xA;&#xD;&#xA;2. The core primitives mentioned here: https://docs.substrate.io/v3/concepts/runtime/#core-primitives are different from the types listed here: https://docs.substrate.io/rustdocs/latest/node_primitives/all.html&#xD;&#xA;How does this difference come about?&#xD;&#xA;&#xD;&#xA;3. If I want to add the pallet_timestamp to my runtime, where do I see the needed primitive data types? All documentation I have found call a similar comment such as: &#xD;&#xA;' Import the Timestamp pallet ... and derive the pallet configuration trait from the timestamp trait.' Where do I find the documentation of the trait? &#xD;&#xA;&#xD;&#xA;Thank you in advance for your answers.&#xD;&#xA;&#xD;&#xA;BR&#xD;&#xA;Cindy&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3145" PostHistoryTypeId="1" PostId="867" RevisionGUID="3ff661c8-2598-4dab-9486-eaa766c1e987" CreationDate="2022-03-18T10:30:10.283" UserId="581" Text="Basics &gt; Runtime &gt; Core primitives &gt; frame_system / node_primitives vs core primitives / Docu of a Pallet configuration trait" ContentLicense="CC BY-SA 4.0" />
  <row Id="3146" PostHistoryTypeId="3" PostId="867" RevisionGUID="3ff661c8-2598-4dab-9486-eaa766c1e987" CreationDate="2022-03-18T10:30:10.283" UserId="581" Text="|pallet|traits|coreprimitives|node-primitives|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3147" PostHistoryTypeId="2" PostId="868" RevisionGUID="6d1ca770-67a9-4873-bd39-db2f537991ab" CreationDate="2022-03-18T10:37:21.160" UserId="139" Text="Hello guys I've been trying to benchmark my runtime but I keep stumbling on this error, so far I've tested it with balances, collective and babe, and I get the same error message. Most likely it's going to happen for all of the pallets:&#xD;&#xA;```&#xD;&#xA;./target/release/substrate benchmark --chain test.json --execution=wasm --wasm-execution=compiled --pallet pallet_babe --extrinsic='*' --steps 50 --repeat 20 --output weights/&#xD;&#xA;2022-03-18 16:01:02 [0]  generated 0 npos voters, 0 from validators and 0 nominators    &#xD;&#xA;2022-03-18 16:01:02 [0]  generated 0 npos voters, 0 from validators and 0 nominators    &#xD;&#xA;Error: Input(&quot;Error getting benchmark list: Other(\&quot;Exported method Benchmark_benchmark_metadata is not found\&quot;)&quot;)&#xD;&#xA;```&#xD;&#xA;Ideally, I would like to generate `WeightInfo` for all my pallets at one go, not one by one, which is what the [answers on this question][1] state. So my understanding is I need to run this command one by one for each pallet that I've included in my runtime only if I can get this to work.&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/295/how-to-generate-weightinfo-for-pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="3149" PostHistoryTypeId="1" PostId="868" RevisionGUID="6d1ca770-67a9-4873-bd39-db2f537991ab" CreationDate="2022-03-18T10:37:21.160" UserId="139" Text="Error running benchmarks on substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="3150" PostHistoryTypeId="3" PostId="868" RevisionGUID="6d1ca770-67a9-4873-bd39-db2f537991ab" CreationDate="2022-03-18T10:37:21.160" UserId="139" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3151" PostHistoryTypeId="2" PostId="869" RevisionGUID="3acd503d-d6ca-421d-aec6-0243a2906b69" CreationDate="2022-03-18T10:39:04.887" UserId="83" Text="Create a pull request into https://github.com/polkadot-js/apps like DataHighway's Spreehafen parachain did [here][1]. It will appear when the maintainer of that repository creates a new release (after your pull request is approved and merged)." ContentLicense="CC BY-SA 4.0" />
  <row Id="3153" PostHistoryTypeId="5" PostId="800" RevisionGUID="3751d54e-492d-48c8-856e-31d11650203b" CreationDate="2022-03-18T11:00:34.657" UserId="172" Comment="Corrected syntax." Text="Rewrite your struct so that it's not generic over `T` and `U`: &#xD;&#xA;&#xD;&#xA;For example: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Debug, PartialEq, Encode, Decode)]&#xD;&#xA;pub struct Investor&lt;AccountId, u32&gt;{&#xD;&#xA;    pub account_id: AccountId,&#xD;&#xA;    pub nft: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and then apply the changes to the other parts of your code." ContentLicense="CC BY-SA 4.0" />
  <row Id="3154" PostHistoryTypeId="5" PostId="800" RevisionGUID="ea0bd30e-1fec-42f1-bdf6-06ff5ae40d20" CreationDate="2022-03-18T11:11:03.913" UserId="172" Comment="deleted 4 characters in body" Text="Rewrite your struct so that it's not generic over `T`: &#xD;&#xA;&#xD;&#xA;For example: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Debug, PartialEq, Encode, Decode)]&#xD;&#xA;pub struct Investor&lt;AccountId, U&gt;{&#xD;&#xA;    pub account_id: AccountId,&#xD;&#xA;    pub nft: U,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and then apply the changes to the other parts of your code." ContentLicense="CC BY-SA 4.0" />
  <row Id="3155" PostHistoryTypeId="5" PostId="869" RevisionGUID="70297659-2c89-400d-92c2-8104ee204566" CreationDate="2022-03-18T11:12:41.930" UserId="83" Comment="Add missing link" Text="Create a pull request into Polkadot. js Apps like DataHighway's Spreehafen parachain did [here][1]. It will appear when the maintainer of that repository creates a new release (after your pull request is approved and merged).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/pull/7118" ContentLicense="CC BY-SA 4.0" />
  <row Id="3156" PostHistoryTypeId="2" PostId="870" RevisionGUID="6c796b22-0ece-49fd-87c3-2a6c66c256ea" CreationDate="2022-03-18T11:41:54.690" UserId="380" Text="`Mapping` is a memory efficient storage type that doesn't hold an index of what's inside it. It is simply a key-value store.&#xD;&#xA;&#xD;&#xA;You will need to store a list of known keys that exist inside the `Mapping`. For example, in [our](https://github.com/prosopo-io/protocol/blob/02455657528203061ee5acb3f50e5b513813f43b/contracts/lib.rs#L263-L264) contract we are storing:&#xD;&#xA;&#xD;&#xA;        dapps: Mapping&lt;AccountId, Dapp&gt;,&#xD;&#xA;        dapp_accounts: Vec&lt;AccountId&gt;,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When we register a new `dapp` we [store](https://github.com/prosopo-io/protocol/blob/02455657528203061ee5acb3f50e5b513813f43b/contracts/lib.rs#L693-L694) the `dapp` to both variables:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                self.dapps.insert(contract, &amp;dapp);&#xD;&#xA;                self.dapp_accounts.push(contract);&#xD;&#xA;&#xD;&#xA;We're using `ink_prelude::vec::Vec;` which is fully loaded into memory. Therefore, it's not appropriate for holding a large amount of values. In future, we will be migrating this to the `ink_storage::Vec`, which is not currently available.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You need to think about the design of your contract in terms of how you will access the data, as this will determine the amount of gas you use. There are common [design techniques from the solidity world](https://ethereum.stackexchange.com/a/13168/794) that may help to inform you.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3158" PostHistoryTypeId="5" PostId="870" RevisionGUID="011daf8e-b2aa-4737-8ad4-f43d309fc9f1" CreationDate="2022-03-18T12:00:22.443" UserId="380" Comment="deleted 6 characters in body" Text="`Mapping` is a memory efficient storage type that doesn't hold an index of what's inside it. It is simply a key-value store.&#xD;&#xA;&#xD;&#xA;You will need to store a list of keys that contain values inside the `Mapping`. For example, in [our](https://github.com/prosopo-io/protocol/blob/02455657528203061ee5acb3f50e5b513813f43b/contracts/lib.rs#L263-L264) contract we are storing:&#xD;&#xA;&#xD;&#xA;        dapps: Mapping&lt;AccountId, Dapp&gt;,&#xD;&#xA;        dapp_accounts: Vec&lt;AccountId&gt;,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When we register a new `dapp` we [store](https://github.com/prosopo-io/protocol/blob/02455657528203061ee5acb3f50e5b513813f43b/contracts/lib.rs#L693-L694) the dapp `AccountId` to both variables:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                self.dapps.insert(contract, &amp;dapp);&#xD;&#xA;                self.dapp_accounts.push(contract);&#xD;&#xA;&#xD;&#xA;We're using `ink_prelude::vec::Vec;` which is fully loaded into memory. Therefore, it's not appropriate for holding a large amount of values. In future, we will be migrating this to the `ink_storage::Vec`, which is not currently available.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You need to think about the design of your contract in terms of how you will access the data, as this will determine the amount of gas you use. There are common [design techniques from the solidity world](https://ethereum.stackexchange.com/a/13168/794) that may help to inform you.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3159" PostHistoryTypeId="2" PostId="871" RevisionGUID="9bea8e9d-82a1-45c3-abbd-3283484de6e7" CreationDate="2022-03-18T12:25:03.800" UserId="85" Text="The node 'client' runs the runtime (which has all the pallets in it).&#xD;&#xA;The node_primitives are defined for the client rather than for the runtime. For pallets one would want to refer to frame_system rather than things on the host node.&#xD;&#xA;&#xD;&#xA;For `pallet_timestamp` have a look at how other parachains have used it as an example. Here Acala is configuring it: https://github.com/AcalaNetwork/Acala/blob/9b1a7b7aa84b98621bddc7efdc0b3a6875cdb380/runtime/karura/src/lib.rs#L345" ContentLicense="CC BY-SA 4.0" />
  <row Id="3161" PostHistoryTypeId="2" PostId="872" RevisionGUID="6fa4d3ae-5eaf-4191-9a0a-5076a491d2f5" CreationDate="2022-03-18T12:29:46.590" UserId="707" Text="I think privacy is one of the key components of gaming, and it's also one of the challenges of moving the whole game logic to the blockchain layer. Adding on top that you don't want to sacrifice interaction time for it. This applies to most of the games that are not providing perfect information like connect four to the players.&#xD;&#xA;&#xD;&#xA;for privacy&#xD;&#xA;- trusted executions using a privacy layer (https://youtu.be/yHlSUevPvH0) - hardware related&#xD;&#xA;- zkSnarks https://www.youtube.com/watch?v=Ayelscjnx2E - computational power related&#xD;&#xA;- hash &amp; reveal (good for simple games, like Rock-Paper-Scissor) https://github.com/ajuna-network/pallet-ajuna-rps - players provide hashes of their interaction (hashed) and reveal at the end the seed and the choice.&#xD;&#xA;  &#xD;&#xA;For poker, I would suggest using trusted execution environments to get privacy and randomness without sacrificing speed (ex. ajuna network)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3163" PostHistoryTypeId="2" PostId="873" RevisionGUID="fad9e281-4f64-4728-a16b-7f4d1e5fb6ba" CreationDate="2022-03-18T13:02:24.513" UserId="1736" Text="In running a polkadot node on the mainnet, i'd like to know how to limit the maximum number of peers, or if this functionality is already built into the protocol somehow. Since my network traffic is limited, I would prefer to either limit the rate of traffic to each peer, or to limit the number of peers my node can interface with. Can anyone help point me in the right direction?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="3165" PostHistoryTypeId="1" PostId="873" RevisionGUID="fad9e281-4f64-4728-a16b-7f4d1e5fb6ba" CreationDate="2022-03-18T13:02:24.513" UserId="1736" Text="How to limit libp2p traffic or set maximum number of peers" ContentLicense="CC BY-SA 4.0" />
  <row Id="3166" PostHistoryTypeId="3" PostId="873" RevisionGUID="fad9e281-4f64-4728-a16b-7f4d1e5fb6ba" CreationDate="2022-03-18T13:02:24.513" UserId="1736" Text="|nodes|network|libp2p|limit|peers|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3167" PostHistoryTypeId="2" PostId="874" RevisionGUID="c2c12033-1609-40a4-a4b8-7d65d31c8a64" CreationDate="2022-03-18T13:13:15.760" UserId="485" Text="Well yes they could be different if you want Babe Authorities to be different from Grandpa Authorities, but this just puts more capital requirements on your consensus system so probably best to make them all the same value and use pallet-session to manage your authority set" ContentLicense="CC BY-SA 4.0" />
  <row Id="3169" PostHistoryTypeId="2" PostId="875" RevisionGUID="b40e071a-1795-4f4d-930b-7abecbbe85ef" CreationDate="2022-03-18T13:15:44.007" UserId="28" Text="The issue here is probably that `--chain test.json` was not created using the `--runtime-benchmarks` feature flag.&#xD;&#xA;&#xD;&#xA;Note that your `--chain` flag inputs your chains genesis, and inside that genesis is the Wasm for your chain on block zero. If that Wasm does not have the benchmarking enabled in it, you will see the error you are having.&#xD;&#xA;&#xD;&#xA;Instead, you should regenerate the `test.json` or run your benchmarks against something like `--chain=dev`, where the genesis and Wasm are automatically regenerated at compile time." ContentLicense="CC BY-SA 4.0" />
  <row Id="3171" PostHistoryTypeId="2" PostId="876" RevisionGUID="d3362833-d19a-4175-9800-bad39532a97e" CreationDate="2022-03-18T13:16:54.807" UserId="699" Text="It is hard to fully understand the reason from the screenshots but I can see some important details:&#xD;&#xA;&#xD;&#xA;Your node is **producing the same block again and again** (see `Imported #8102`).&#xD;&#xA;This means there is no issue producing it but the validator is not receiving it or not able to verify it. Let see the possible reasons&#xD;&#xA;&#xD;&#xA;## Possible issue #1: trouble sending the block ##&#xD;&#xA;The **PoV** (Proof of Validity, that needs to be sent to the validator to verify the block) is significant (see lines `storage_proof: 1992.018...kb`, `Compressed PoV size: 1334.125kb`). If your network connection with the validator is slow or with high latency (far away from each other), the validator might not receive the block in time and not be able to include it.&#xD;&#xA;&#xD;&#xA;This usually auto-resolve by itself once a new (closer/faster) validator(s) is assigned to verify your parachain block.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Possible issue #2: trouble verifying the block ##&#xD;&#xA;The **block execution time** in your logs are low (see `Prepared block for proposing at #8102 (10ms)`), which is good, so I would **discard this issue** in your case. It is very unlikely for the validator to not have enough time to execute the block verification. A parachain block is currently allowed 500ms but if the validator(s) assigned to your parachain is slow, this could lead to the block not being included.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Possible issue #3: Invalid parachain code in the relay ##&#xD;&#xA;Another possibility is if the **`parachain code` in the relay is not matching** the code in your parachain. This can happen when the parachain and the relay are planning to upgrade the parachain code at a different relay block number.&#xD;&#xA;To avoid this issue, avoid performing the upgrade within a `scheduled extrinsic` (like using `system.setCode` in a proposal or in the pallet scheduler).&#xD;&#xA;&#xD;&#xA;If this is the case, you will need help of the relaychain maintainer to update the parachain code on the relay.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3173" PostHistoryTypeId="6" PostId="859" RevisionGUID="203bf059-b1ed-4127-930a-68698d6f8436" CreationDate="2022-03-18T13:20:03.957" UserId="29" Comment="edited tags" Text="|parachain|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3174" PostHistoryTypeId="2" PostId="877" RevisionGUID="0ff9d42f-8713-4930-8f2b-6bab2a15f1b8" CreationDate="2022-03-18T13:20:32.270" UserId="699" Text="The `polkadot` client supports limiting the number of incoming and outgoing peers. The default is currently at 25 each, but you can modify it using `--in-peers 10 --out-peers 10`.&#xD;&#xA;&#xD;&#xA;More details can be obtained using `polkadot --help` command&#xD;&#xA;&#xD;&#xA;Additionally, you should be careful not to decrease it too much neither. This would impact how quickly your node is able to stay in sync with the rest of the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="3176" PostHistoryTypeId="2" PostId="878" RevisionGUID="25822f36-e78c-449d-809e-f500f31dbe0a" CreationDate="2022-03-18T13:32:23.150" UserId="83" Text="If you write and execute a script like [this][1] then you can run benchmarking and automatically generate the weights in an output folder for multiple pallets with a single command&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/DataHighway-Parachain/blob/main/scripts/benchmark_all_pallets.sh" ContentLicense="CC BY-SA 4.0" />
  <row Id="3178" PostHistoryTypeId="5" PostId="853" RevisionGUID="0c4d859a-cc45-4bae-82c6-747d470481e4" CreationDate="2022-03-18T13:47:55.553" UserId="28" Comment="added 5 characters in body" Text="You are really mixing up what the generic types mean to you.&#xD;&#xA;&#xD;&#xA;In one case, you have `T` represent the `AccountId` directly, and in the other case you have it represent your `Config`.&#xD;&#xA;&#xD;&#xA;Here is a minimal sample which uses most of the same code as what you want and compiles:&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::{pallet_prelude::*, traits::Currency};&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;	type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;		pub fn do_something(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			something: u32,&#xD;&#xA;			acc: AccountIdOf&lt;T&gt;,&#xD;&#xA;			rent: BalanceOf&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin.clone())?;&#xD;&#xA;			let dev = Investor::&lt;T, u32&gt;::new(acc, something);&#xD;&#xA;			Investor::&lt;T, u32&gt;::contribute(origin, dev.account_id, rent)?;&#xD;&#xA;&#xD;&#xA;			// Do something&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Debug, PartialEq, Encode, Decode)]&#xD;&#xA;	pub struct Investor&lt;T: Config, U&gt; {&#xD;&#xA;		pub account_id: AccountIdOf&lt;T&gt;,&#xD;&#xA;		pub nft: U,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl&lt;T: Config, U&gt; Investor&lt;T, U&gt; {&#xD;&#xA;		pub fn new(acc: AccountIdOf&lt;T&gt;, nft: U) -&gt; Self {&#xD;&#xA;			Investor { account_id: acc, nft }&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		pub fn contribute(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			acc: AccountIdOf&lt;T&gt;,&#xD;&#xA;			value: BalanceOf&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// Do something&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note in this case, `T` always represents `T: Config`, and `AccountId` is always called with `AccountIdOf&lt;T&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="3179" PostHistoryTypeId="5" PostId="65" RevisionGUID="ff9503fb-c081-477d-b512-ddeebb40a22e" CreationDate="2022-03-18T13:49:40.157" UserId="28" Comment="deleted 8087 characters in body" Text="Rust is a systems programming language focused on three goals: safety, speed, and concurrency. It maintains these goals without needing a garbage collector, making it a useful language for a number of use cases other languages aren’t good at: embedding in other languages, programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems.&#xD;&#xA;&#xD;&#xA;It improves on current languages targeting this space by having a number of compile-time safety checks that produce no runtime overhead, while eliminating all data races. Rust also aims to achieve ‘zero-cost abstractions’ even though some of these abstractions feel like those of a high-level language. Even then, Rust still allows precise control like a low-level language would." ContentLicense="CC BY-SA 4.0" />
  <row Id="3180" PostHistoryTypeId="5" PostId="878" RevisionGUID="10e6faa0-4489-45e7-8c77-90e5f8599dea" CreationDate="2022-03-18T13:52:34.533" UserId="83" Comment="show correction required to the script" Text="If you write and execute a script like [this][1] (move the build command outside of the loop) then you can run benchmarking and automatically generate the weights in an output folder for multiple pallets with a single command&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DataHighway-DHX/DataHighway-Parachain/blob/main/scripts/benchmark_all_pallets.sh" ContentLicense="CC BY-SA 4.0" />
  <row Id="3181" PostHistoryTypeId="2" PostId="879" RevisionGUID="32f15fe1-9a15-427e-be39-5c22876d4706" CreationDate="2022-03-18T14:10:12.970" UserId="172" Text="The entropy in your randomness seems to be taking in both block number and nonce. If you want to capture this behaviour in your tests, you should be manually incrementing [`set_block_number()`](https://docs.substrate.io/rustdocs/latest/frame_system/pallet/struct.Pallet.html#method.set_block_number) and [`set_extrinsic()`](https://docs.substrate.io/rustdocs/latest/frame_system/pallet/struct.Pallet.html#method.set_extrinsic_index): your mock runtime doesn't do this for you and here, `get_and_increment_nonce()` isn't doing anything at all.&#xD;&#xA;&#xD;&#xA;Using these, your loop would look like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;for _ in draws_in_round..end_index {&#xD;&#xA;&#xD;&#xA;    // get the nonce, starting at 0&#xD;&#xA;    let nonce = PalletName::get_and_increment_nonce();&#xD;&#xA;        &#xD;&#xA;    // pass in the nonce&#xD;&#xA;    let random_seed = &lt;Test as Config&gt;::RandomnessSource::random(&amp;nonce).encode();&#xD;&#xA;        &#xD;&#xA;    // pass in random_seed&#xD;&#xA;    let random_number = u64::decode(&amp;mut random_seed.as_ref())&#xD;&#xA;        .expect(&quot;secure hashes should always be bigger than u64; qed&quot;);&#xD;&#xA;    println!(&quot;random_number, {:?}&quot;, random_number);&#xD;&#xA;        &#xD;&#xA;    // increment the extrinsic index &#xD;&#xA;    frame_system::Pallet::&lt;Test&gt;::set_extrinsic_index(1);&#xD;&#xA;        &#xD;&#xA;    // increment the block number&#xD;&#xA;    System::set_block_number(System::block_number() + 1);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Note that it's not clear what you're actually testing here and that in an actual test you'd need to be asserting some condition, e.g. &quot;two values aren't equal&quot; or maybe you want to make a vector of values and check that they have a minimum number of different values?&#xD;&#xA;&#xD;&#xA;In addition, you'd have this set up in an actual `tests.rs` file with its mock runtime. Refer to [this guide](https://docs.substrate.io/how-to-guides/v3/testing/basics/) on how to properly set your test up." ContentLicense="CC BY-SA 4.0" />
  <row Id="3186" PostHistoryTypeId="2" PostId="880" RevisionGUID="0ae5b889-cafa-4260-ba36-3946ad527f94" CreationDate="2022-03-18T14:57:07.333" UserId="28" Text="`TestRandomness` is a very simple wrapper which can allow you to easily write tests pretending to be a randomness generator, but with full control over the values, since writing tests with real randomness can be very difficult or even impossible.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Provides an implementation of [`frame_support::traits::Randomness`] that should only be used in&#xD;&#xA;/// tests!&#xD;&#xA;pub struct TestRandomness&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;Output: codec::Decode + Default, T&gt; frame_support::traits::Randomness&lt;Output, T::BlockNumber&gt;&#xD;&#xA;	for TestRandomness&lt;T&gt;&#xD;&#xA;where&#xD;&#xA;	T: frame_system::Config,&#xD;&#xA;{&#xD;&#xA;	fn random(subject: &amp;[u8]) -&gt; (Output, T::BlockNumber) {&#xD;&#xA;		use sp_runtime::traits::TrailingZeroInput;&#xD;&#xA;&#xD;&#xA;		(&#xD;&#xA;			Output::decode(&amp;mut TrailingZeroInput::new(subject)).unwrap_or_default(),&#xD;&#xA;			frame_system::Pallet::&lt;T&gt;::block_number(),&#xD;&#xA;		)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example, if you have a test that requires a coinflip return &quot;heads&quot;, using real randomness means your test will fail half of the time.&#xD;&#xA;&#xD;&#xA;As you can see in the code above, the randomness is exactly taken from the subject, with no actual randomness happening.&#xD;&#xA;&#xD;&#xA;If you want to introduce real randomness, you are allowed to use `std` for tests, so you can simply introduce the [`rand`](https://docs.rs/rand/latest/rand/) crate into your tests and hook it up that way." ContentLicense="CC BY-SA 4.0" />
  <row Id="3188" PostHistoryTypeId="5" PostId="764" RevisionGUID="92d7b837-fdce-454a-bd04-7ba7c98a1e15" CreationDate="2022-03-18T14:58:36.620" UserId="29" Comment="added 620 characters in body" Text="`--force-authoring` is defined [here](https://github.com/paritytech/substrate/blob/9eddaec3b8f15eec0c458e7bb3a1c16db91d8199/client/cli/src/config.rs#L408). &#xD;&#xA;&#xD;&#xA;It is part of the [config](https://github.com/paritytech/substrate/blob/9eddaec3b8f15eec0c458e7bb3a1c16db91d8199/client/cli/src/config.rs#L539) so you can call it internally like so [`config.force_authoring`](https://github.com/paritytech/substrate/blob/0f070c8020fad552247fd4b43c1a6a4506e456b5/bin/node/cli/src/service.rs#L365).&#xD;&#xA;&#xD;&#xA;As far as it's logic in the code-base, I see it being used explicitly here:&#xD;&#xA;```rs&#xD;&#xA;if !self.force_authoring() &amp;&amp;&#xD;&#xA;    self.sync_oracle().is_offline() &amp;&amp;&#xD;&#xA;    authorities_len.map(|a| a &gt; 1).unwrap_or(false)&#xD;&#xA;{&#xD;&#xA;    debug!(target: logging_target, &quot;Skipping proposal slot. Waiting for the network.&quot;);&#xD;&#xA;    telemetry!(&#xD;&#xA;        telemetry;&#xD;&#xA;        CONSENSUS_DEBUG;&#xD;&#xA;        &quot;slots.skipping_proposal_slot&quot;;&#xD;&#xA;        &quot;authorities_len&quot; =&gt; authorities_len,&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    return None&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/e9d79daaa782f41680ada04719151371a737c6fb/client/consensus/slots/src/lib.rs#L238" ContentLicense="CC BY-SA 4.0" />
  <row Id="3189" PostHistoryTypeId="13" PostId="764" RevisionGUID="8ebf3f08-656b-454f-b1e2-7ed61a6a027f" CreationDate="2022-03-18T14:58:40.090" UserId="29" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="3190" PostHistoryTypeId="5" PostId="805" RevisionGUID="69c01822-50f7-45a7-a8c6-cbddb068692b" CreationDate="2022-03-18T14:59:46.827" UserId="28" Comment="added 157 characters in body" Text="When writing:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let events = frame_system::Pallet::&lt;T&gt;::events();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0599]: no function or associated item named `events` found for struct `frame_system::Pallet` in the current scope&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the implementation:&#xD;&#xA;https://docs.rs/frame-system/3.0.0/frame_system/pallet/struct.Pallet.html#method.events&#xD;&#xA;&#xD;&#xA;Any ideas? TIA" ContentLicense="CC BY-SA 4.0" />
  <row Id="3192" PostHistoryTypeId="2" PostId="881" RevisionGUID="5702a7c2-f594-45fe-b35c-5c7549178900" CreationDate="2022-03-18T15:05:10.763" UserId="28" Text="We have specifically removed access to the `Events` storage item in `frame_system` because it could cause the user to read a huge amount of storage, and the events storage is only meant to be read offline.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Get the current events deposited by the runtime.&#xD;&#xA;///&#xD;&#xA;/// NOTE: This should only be used in tests. Reading events from the runtime can have a large&#xD;&#xA;/// impact on the PoV size of a block. Users should use alternative and well bounded storage&#xD;&#xA;/// items for any behavior like this.&#xD;&#xA;#[cfg(any(feature = &quot;std&quot;, feature = &quot;runtime-benchmarks&quot;, test))]&#xD;&#xA;pub fn events() -&gt; Vec&lt;EventRecord&lt;T::Event, T::Hash&gt;&gt; {&#xD;&#xA;	Self::read_events_no_consensus()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see in the code this function is disabled unless you are running tests or benchmarks.&#xD;&#xA;&#xD;&#xA;Some more context can be found in this PR: https://github.com/paritytech/substrate/pull/9619&#xD;&#xA;&#xD;&#xA;Instead, we provide an &quot;explicitly named&quot; function called `read_events_no_consensus`, which bypasses this protection from the user, and hopes that the user understands what they are doing.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Get the current events deposited by the runtime.&#xD;&#xA;///&#xD;&#xA;/// Should only be called if you know what you are doing and outside of the runtime block&#xD;&#xA;/// execution else it can have a large impact on the PoV size of a block.&#xD;&#xA;pub fn read_events_no_consensus() -&gt; Vec&lt;EventRecord&lt;T::Event, T::Hash&gt;&gt; {&#xD;&#xA;	Events::&lt;T&gt;::get()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This can be helpful for scenarios like an offchain worker reading into the events, which would be okay since this would not appear as a storage read in the [PoV for a parachain](https://substrate.stackexchange.com/questions/518/what-does-pov-stand-for/519#519)." ContentLicense="CC BY-SA 4.0" />
  <row Id="3194" PostHistoryTypeId="2" PostId="882" RevisionGUID="d3f26926-9896-4c19-8548-b284d985db21" CreationDate="2022-03-18T15:46:30.183" UserId="599" Text="for `contract-pallet` and WASM-related contracts was defined a standard [`PSP22`](https://github.com/w3f/PSPs/blob/master/PSPs/psp-22.md) for fungible tokens.&#xD;&#xA;&#xD;&#xA;If you want to interact with that standard you need to do cross-contract calls with the right selectors(identifiers of methods) and expected input arguments.&#xD;&#xA;&#xD;&#xA;For example, you can use the [`PSP22` trait](https://github.com/Supercolony-net/openbrush-contracts/blob/main/contracts/traits/psp22/psp22.rs#L16) from OpenBrush library to do that.&#xD;&#xA;&#xD;&#xA;For that, you need to import `brush` into `Cargo.toml` like [here](https://docs.openbrush.io/smart-contracts/overview#the-default-toml-of-your-project-with-openbrush).&#xD;&#xA;&#xD;&#xA;And after you can write something like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod staking {&#xD;&#xA;    use brush::contracts::traits::psp22::PSP22Ref;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Staking {&#xD;&#xA;        // ...&#xD;&#xA;        token: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Staking {&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn stake(&amp;mut self, _amount: Balance) {&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            PSP22Ref::transfer_from(&amp;self.token,  caller,  self.env().account_id(), _amount, Vec::&lt;u8&gt;::new())?;&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In that case, the caller of your staking contract should approve transfer via the `PSP22::approve` function." ContentLicense="CC BY-SA 4.0" />
  <row Id="3197" PostHistoryTypeId="4" PostId="866" RevisionGUID="963ee8d9-0b0b-49cd-8ce8-1f0c2e00bdb5" CreationDate="2022-03-18T16:54:42.873" UserId="83" Comment="capitalise and fix url" Text="How to add parachain logo to polkadot.js.org/apps?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3199" PostHistoryTypeId="2" PostId="883" RevisionGUID="f298cdcd-90b6-47a9-93b8-0b53407a9738" CreationDate="2022-03-18T19:10:23.147" UserId="1745" Text="My team is looking to implement a project in Substrate, and after some studying it seems like a dependency management nightmare.&#xD;&#xA;&#xD;&#xA;Many of the 'sp' libraries call specific required functions within our own maintained codebase.&#xD;&#xA;&#xD;&#xA;Has anyone come up with a system to manage the updates to substrate core packages in a semi-automated fashion? " ContentLicense="CC BY-SA 4.0" />
  <row Id="3201" PostHistoryTypeId="1" PostId="883" RevisionGUID="f298cdcd-90b6-47a9-93b8-0b53407a9738" CreationDate="2022-03-18T19:10:23.147" UserId="1745" Text="Substrate dependency management" ContentLicense="CC BY-SA 4.0" />
  <row Id="3202" PostHistoryTypeId="3" PostId="883" RevisionGUID="f298cdcd-90b6-47a9-93b8-0b53407a9738" CreationDate="2022-03-18T19:10:23.147" UserId="1745" Text="|substrate-node|substrate-node-template|packages|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3203" PostHistoryTypeId="5" PostId="852" RevisionGUID="de49c428-3050-46c5-ad97-b50340af8329" CreationDate="2022-03-18T19:12:58.843" UserId="128" Comment="added 19 characters in body" Text="You can withdraw the assets by submitting an XCM extrinsic directly to the Karura parachain (this applies to any parachain that uses the `xtokens` pallet: [xtokens](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens)).&#xD;&#xA;&#xD;&#xA;This can be done from the command line, but the easier way is to use the Polkadot.js interface for the relevant parachain, the Karura interface can be found here: [Karura - Extrinsics](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkarura-rpc-0.aca-api.network#/extrinsics).&#xD;&#xA;&#xD;&#xA;An example of an `xToken` transfer in a JSON format looks like this:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    name: &quot;currency_id&quot;,&#xD;&#xA;    type: &quot;acala_primitives:currency:CurrencyId&quot;,&#xD;&#xA;    type_name: &quot;CurrencyId&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      Token: &quot;KSM&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;amount&quot;,&#xD;&#xA;    type: &quot;U128&quot;,&#xD;&#xA;    type_name: &quot;Balance&quot;,&#xD;&#xA;    value: &quot;123400000000&quot;&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;dest&quot;,&#xD;&#xA;    type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;    type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      V1: {&#xD;&#xA;        interior: {&#xD;&#xA;          X1: {&#xD;&#xA;            AccountId32: {&#xD;&#xA;              id: &quot;0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&quot;,&#xD;&#xA;              network: {&#xD;&#xA;                Any: null&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        parents: 1&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;dest_weight&quot;,&#xD;&#xA;    type: &quot;U64&quot;,&#xD;&#xA;    type_name: &quot;Weight&quot;,&#xD;&#xA;    value: 5000000000&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;**Arg 1:** `currency_id` defines the token you want to transfer - in our case it's `KSM`.&#xD;&#xA;&#xD;&#xA;**Arg 2:** `amount` defines the amount of tokens you want to transfer - this value uses base units so 1 KSM is 1000000000000 in base units - in our case 123400000000 is equal to 0.1234 KSM&#xD;&#xA;&#xD;&#xA;**Arg 3:** `dest` defines the destination address to which we want to send the tokens - note that this is the 32 byte account ID and not the SS58 address format (you can get the account ID from an address using the `subkey inspect &lt;SS58&gt;` command in the terminal).&#xD;&#xA;&#xD;&#xA;**Note:** The parent junctions parameter `parents` should be set to `1` as we are sending the funds to a single external address on the relay chain.&#xD;&#xA;&#xD;&#xA;**Arg 4:** `dest_weight` defines the weight for XCM execution on the destination chain - here we set a constant of 5000000000.&#xD;&#xA;&#xD;&#xA;Using the Polkadot.js interface we can fill out the `xTokens.transfer()` extrinsic information like so:&#xD;&#xA;&#xD;&#xA;[![Extrinsics interface][1]][1]&#xD;&#xA;&#xD;&#xA;We can then submit the transaction and the KSM tokens should be transferred from Karura to Kusama when the transaction is included in the chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/yLGv4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3204" PostHistoryTypeId="2" PostId="884" RevisionGUID="c219d7b1-4628-4c1b-83a6-bf73c0bb9ff6" CreationDate="2022-03-18T19:34:56.173" UserId="233" Text="The substrate template node is available [here][1] and you can run it with `cargo run --release --bin node-template-archive`. As for indexing parachains I am actually not sure but I believe it could be as easy as simply providing the chain spec and point it to the rocksdb folder. &#xD;&#xA;If that doesn't work feel free to open a feature request!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-archive/tree/master/bin/node-template-archive" ContentLicense="CC BY-SA 4.0" />
  <row Id="3206" PostHistoryTypeId="2" PostId="885" RevisionGUID="71f0eb14-377f-428c-8fae-41047d9ef905" CreationDate="2022-03-18T19:46:07.697" UserId="28" Text="Polkadot is the number one &quot;user&quot; of the Substrate blockchain framework, and handles updates to Substrate without issue. Similarly, all parachain teams are also able to keep things up to date and running.&#xD;&#xA;&#xD;&#xA;On the main Polkadot repo, we point all dependencies to the Substrate `master` branch. For example:&#xD;&#xA;&#xD;&#xA;```lang-toml&#xD;&#xA;sp-runtime = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;master&quot;, default-features = false }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Each time we make a PR to the Polkadot repo, we update the Substrate dependencies:&#xD;&#xA;&#xD;&#xA;```lang-bash&#xD;&#xA;# this will trigger an update to all Substrate related dependencies&#xD;&#xA;cargo update -p sp-io&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Somtimes, this does involve a breaking change, but there will always be a [companion PR](https://github.com/paritytech/polkadot/pull/5112/files) to the Polkadot repo showing how to fix the breaking change. Usually you can use these as a guide on how to update your own project.&#xD;&#xA;&#xD;&#xA;When launching a release of your chain, it is best to synchronize with the releases of Polkadot, especially if you plan to be a parachain.&#xD;&#xA;&#xD;&#xA;For that, you create a new branch which does not use `master`, but instead one of the [`polkadot-v...`](https://github.com/paritytech/substrate/branches/all?query=polkadot-v) branches.&#xD;&#xA;&#xD;&#xA;Making continuous iterative updates can be better than doing a bunch of updates at once, so as long as you have been keeping up with `master`, it should be pretty easy.&#xD;&#xA;&#xD;&#xA;However, some teams choose to build entirely on just the `polkadot-v...` branches, and only upgrade once per release cycle.&#xD;&#xA;&#xD;&#xA;All of these processes are easily integrated into all CI pipelines." ContentLicense="CC BY-SA 4.0" />
  <row Id="3208" PostHistoryTypeId="2" PostId="886" RevisionGUID="a53dffac-fed4-4abc-bf44-43a904963c5b" CreationDate="2022-03-18T20:09:22.737" UserId="233" Text="Maybe using the [x25519-dalek][1] crate directly and do something along [these][2] lines is useful to you?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.io/crates/x25519-dalek&#xD;&#xA;  [2]: https://kerkour.com/end-to-end-encryption-key-exchange-cryptography-rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="3211" PostHistoryTypeId="2" PostId="887" RevisionGUID="e7a7c8f1-918c-4006-8f14-d5b6a2029a40" CreationDate="2022-03-18T21:04:44.700" UserId="233" Text="To add to the previous answer, the `0` in `&quot;wss://telemetry.polkadot.io/submit/ 0` is the telemetry verbosity level. If you want to run your own local version of [`substrate-telemetry`][1] you would use `ws://localhost:8000/submit 0`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-telemetry" ContentLicense="CC BY-SA 4.0" />
  <row Id="3213" PostHistoryTypeId="2" PostId="888" RevisionGUID="608a3209-5644-4c91-9c5b-1096904e94d1" CreationDate="2022-03-18T22:30:18.987" UserId="587" Text="I tried using the `#![warn(missing_docs)]` macro to check for missing documentation in my pallet, but when running clippy it complains about some pallet macros&#xD;&#xA;```&#xD;&#xA;warning: missing documentation for a struct&#xD;&#xA;   --&gt; frame/clearing-house/src/lib.rs:128:12&#xD;&#xA;    |&#xD;&#xA;128 |       #[pallet::storage]&#xD;&#xA;    |  _______________^&#xD;&#xA;129 | |     /// Supported collateral asset ids&#xD;&#xA;130 | |     pub type CollateralTypes&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, AssetIdOf&lt;T&gt;, ()&gt;;&#xD;&#xA;    | |_______^&#xD;&#xA;```&#xD;&#xA;even though I documented the type declaration. Is there a fix for this? Or is it not worth using the `#![warn(missing_docs)]` at all?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3215" PostHistoryTypeId="1" PostId="888" RevisionGUID="608a3209-5644-4c91-9c5b-1096904e94d1" CreationDate="2022-03-18T22:30:18.987" UserId="587" Text="How to suppress missing_docs warnings for substrate macros?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3216" PostHistoryTypeId="3" PostId="888" RevisionGUID="608a3209-5644-4c91-9c5b-1096904e94d1" CreationDate="2022-03-18T22:30:18.987" UserId="587" Text="|pallet|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3217" PostHistoryTypeId="5" PostId="691" RevisionGUID="68fa228b-f5fd-4e5d-ac08-829faf14f183" CreationDate="2022-03-18T22:45:23.620" UserId="380" Comment="Deleted answer was correct" Text="You cannot use floating point maths in `ink!`. If you do something like `10/7` then you will get `1` as a result (rounded from `1.42857142857`).&#xD;&#xA;&#xD;&#xA;It looks like you're calculating `1e12/200e12` which is `0.005` and therefore rounded to `0`. `1e12/200` is `5e9` and is perhaps what you expected based on your code comments.&#xD;&#xA;&#xD;&#xA;Check out [this answer](https://substrate.stackexchange.com/a/147/380) for a more complete explanation of why floating point maths is excluded." ContentLicense="CC BY-SA 4.0" />
  <row Id="3218" PostHistoryTypeId="13" PostId="691" RevisionGUID="1002234e-d898-414f-92b3-b4873dcdf8b2" CreationDate="2022-03-18T22:46:23.900" UserId="380" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:380,&quot;DisplayName&quot;:&quot;forgetso&quot;}]}" />
  <row Id="3220" PostHistoryTypeId="2" PostId="889" RevisionGUID="d3457ff7-76c1-4000-8296-95e6d0c0ded4" CreationDate="2022-03-18T23:08:45.973" UserId="265" Text="calamari parachain uses an aws dns latency based load balancer for the ws.calamari.systems dns entry used by polkadot.js for websocket interactions with calamari. there are multiple, geographically diverse nodes which will respond to the same `wss://ws.calamari.systems` url, depending on where the client connection comes from.&#xD;&#xA;&#xD;&#xA;a recent increase in traffic to that endpoint resulted in nodes rejecting many ws connections because they were configured with the default `--ws-max-connections 100` setting. increasing this value to `1000` for all nodes, immediately resolved the problem.&#xD;&#xA;&#xD;&#xA;has anyone tested the upper boundaries of what this value can be set to? are there good examples of a prometheus rule that could indicate that a node has more ws connections than it can safely handle? what system properties can be monitored whilst experimenting with higher values for ws-max-connections that would give an indication of overloading?&#xD;&#xA;&#xD;&#xA;i should add that the ws connections are reverse proxied through nginx so that they are served over ssl. i guess that nginx may have it's own limitations but i don't know if they would be hit before substrate's were. most of the nodes run on instance types like r5d.xlarge or r5ad.2xlarge. perhaps the only limitations that matter, relate to the instance type and/or hardware..." ContentLicense="CC BY-SA 4.0" />
  <row Id="3222" PostHistoryTypeId="1" PostId="889" RevisionGUID="d3457ff7-76c1-4000-8296-95e6d0c0ded4" CreationDate="2022-03-18T23:08:45.973" UserId="265" Text="what's a good value for `--ws-max-connections`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3223" PostHistoryTypeId="3" PostId="889" RevisionGUID="d3457ff7-76c1-4000-8296-95e6d0c0ded4" CreationDate="2022-03-18T23:08:45.973" UserId="265" Text="|substrate-node|proxy|network|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3224" PostHistoryTypeId="2" PostId="890" RevisionGUID="75449f37-4663-4750-bd19-f14b90eaca77" CreationDate="2022-03-19T00:28:14.063" UserId="699" Text="I can't really provide a specific number but we also increased it compared to the default value.&#xD;&#xA;&#xD;&#xA;There number of ws connections to allow is highly dependent of what request your users are doing, as most of the resources won't be used for the connection itself but for the request going through.&#xD;&#xA;&#xD;&#xA;Additionally, you can also start to read about the new RPC library being included in Substrate: https://github.com/paritytech/jsonrpsee&#xD;&#xA;&#xD;&#xA;This library allows to &quot;reserve&quot; resources (cpu, memory, ...) for each type of request to better control the load on the RPC server." ContentLicense="CC BY-SA 4.0" />
  <row Id="3227" PostHistoryTypeId="5" PostId="792" RevisionGUID="c1667f89-2344-424c-a98a-829046815dad" CreationDate="2022-03-19T02:06:25.720" UserId="674" Comment="added 49 characters in body" Text="All you need is to add prefix when using `encodeAddress(address, prefix)`, as in the wiki for the Polkadot-js API (https://polkadot.js.org/docs/keyring/start/ss58/)&#xD;&#xA;&#xD;&#xA;A snippet:&#xD;&#xA;```&#xD;&#xA;const { encodeAddress } = require(&quot;@polkadot/keyring&quot;);&#xD;&#xA;&#xD;&#xA;const address = &quot;0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&quot;;&#xD;&#xA;&#xD;&#xA;console.log(encodeAddress(address, 0)); //&quot;12bzRJfh7arnnfPPUZHeJUaE62QLEwhK48QnH9LXeK2m1iZU&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: prefix `0` is for Polkadot address" ContentLicense="CC BY-SA 4.0" />
  <row Id="3230" PostHistoryTypeId="2" PostId="891" RevisionGUID="18a6ec05-6210-49e5-b1b2-d98b10591354" CreationDate="2022-03-19T03:08:51.817" UserId="699" Text="When inspecting the peer reputation of the connected peers, they can have a very wide range a value, how can it be interpreted ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3232" PostHistoryTypeId="1" PostId="891" RevisionGUID="18a6ec05-6210-49e5-b1b2-d98b10591354" CreationDate="2022-03-19T03:08:51.817" UserId="699" Text="What does the peer reputation value correspond to?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3233" PostHistoryTypeId="3" PostId="891" RevisionGUID="18a6ec05-6210-49e5-b1b2-d98b10591354" CreationDate="2022-03-19T03:08:51.817" UserId="699" Text="|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3234" PostHistoryTypeId="2" PostId="892" RevisionGUID="c09a50e7-ea3a-4294-b5e5-62f1d2d84037" CreationDate="2022-03-19T03:11:49.087" UserId="699" Text="Sometime a peer reputation would drop because of networking issue or bug in the design, preventing the node to interact properly with the other peer.&#xD;&#xA;&#xD;&#xA;How long does it take for the peer reputation to become good again after such an event ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3236" PostHistoryTypeId="1" PostId="892" RevisionGUID="c09a50e7-ea3a-4294-b5e5-62f1d2d84037" CreationDate="2022-03-19T03:11:49.087" UserId="699" Text="How long does it take for a peer bad reputation to clear out?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3237" PostHistoryTypeId="3" PostId="892" RevisionGUID="c09a50e7-ea3a-4294-b5e5-62f1d2d84037" CreationDate="2022-03-19T03:11:49.087" UserId="699" Text="|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3238" PostHistoryTypeId="4" PostId="813" RevisionGUID="0d1a0577-ea6d-465b-92c1-ba10ec61ce19" CreationDate="2022-03-19T04:10:17.013" UserId="3" Comment="Fix typo in title" Text="Do all extrinsic fees have to be paid when using utility.batch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3239" PostHistoryTypeId="24" PostId="813" RevisionGUID="0d1a0577-ea6d-465b-92c1-ba10ec61ce19" CreationDate="2022-03-19T04:10:17.013" Comment="Proposed by 3 approved by 699 edit id of 95" ContentLicense="CC BY-SA 4.0" />
  <row Id="3240" PostHistoryTypeId="2" PostId="893" RevisionGUID="7c37e6d8-957b-4c98-9069-894a55e963e9" CreationDate="2022-03-19T04:33:47.873" UserId="213" Text="I am trying to understand slashing and rewarding funds from the recipe example.&#xD;&#xA;&#xD;&#xA;https://substrate.recipes/currency-imbalances.html&#xD;&#xA;&#xD;&#xA;For slashing funds it doesn't require initialization with  &lt;NegativeImbalanceOf&lt;T&gt;&gt;::zero() whereas for rewarding funds it requires initializing &lt;PositiveImbalanceOf&lt;T&gt;&gt;::zero() &#xD;&#xA;&#xD;&#xA;     //slash fund     &#xD;&#xA;     let imbalance = T::Currency::slash_reserved(&amp;to_punish, collateral).0;&#xD;&#xA;     T::Slash::on_unbalanced(imbalance);&#xD;&#xA;&#xD;&#xA;     //reward funds&#xD;&#xA;     let mut total_imbalance = &lt;PositiveImbalanceOf&lt;T&gt;&gt;::zero(); &#xD;&#xA;     let r = T::Currency::deposit_into_existing(&amp;to_reward, reward).ok();&#xD;&#xA;     total_imbalance.maybe_subsume(r);&#xD;&#xA;     T::Reward::on_unbalanced(total_imbalance);&#xD;&#xA;&#xD;&#xA;What does the two extra lines of code do in reward funds, do I have to use it every time I reward funds??" ContentLicense="CC BY-SA 4.0" />
  <row Id="3242" PostHistoryTypeId="1" PostId="893" RevisionGUID="7c37e6d8-957b-4c98-9069-894a55e963e9" CreationDate="2022-03-19T04:33:47.873" UserId="213" Text="Slashing and rewarding funds" ContentLicense="CC BY-SA 4.0" />
  <row Id="3243" PostHistoryTypeId="3" PostId="893" RevisionGUID="7c37e6d8-957b-4c98-9069-894a55e963e9" CreationDate="2022-03-19T04:33:47.873" UserId="213" Text="|pallet|frame|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3244" PostHistoryTypeId="2" PostId="894" RevisionGUID="076ccaa1-f0b3-498b-b419-c92807f050f7" CreationDate="2022-03-19T07:24:02.350" UserId="570" Text="I am trying to get the balance of a wallet account using the wallet address and it's nonce. For example, I can get the latest balance and the total number of nonce of a wallet address with this.&#xD;&#xA;&#xD;&#xA;const { nonce, data: balance } = await api.query.system.account(ADDR); &#xD;&#xA;console.log(balance of account is ${balance.free} and a nonce of ${nonce});&#xD;&#xA;&#xD;&#xA;I'd like to get the balance of an address at a particular nonce like.&#xD;&#xA;&#xD;&#xA;get the balance of account x at nonce number y&#xD;&#xA;&#xD;&#xA;Thank you for reading.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3246" PostHistoryTypeId="1" PostId="894" RevisionGUID="076ccaa1-f0b3-498b-b419-c92807f050f7" CreationDate="2022-03-19T07:24:02.350" UserId="570" Text="Polkadot.js api how to get the balance of an account at a particular nonce" ContentLicense="CC BY-SA 4.0" />
  <row Id="3247" PostHistoryTypeId="3" PostId="894" RevisionGUID="076ccaa1-f0b3-498b-b419-c92807f050f7" CreationDate="2022-03-19T07:24:02.350" UserId="570" Text="|polkadot|polkadot-js|substrate-front-end|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3248" PostHistoryTypeId="2" PostId="895" RevisionGUID="15f1900e-6025-4586-a664-eedc271396ae" CreationDate="2022-03-19T08:39:57.057" UserId="489" Text="i have a question about xcm message. when i call a xcm transact from the origin parachain, it works well in origin parachain. but in destination parachain , it shows an error : `xcmpQueue.Fail`. how can l solve it?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3250" PostHistoryTypeId="1" PostId="895" RevisionGUID="15f1900e-6025-4586-a664-eedc271396ae" CreationDate="2022-03-19T08:39:57.057" UserId="489" Text="About XCM message execute failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="3251" PostHistoryTypeId="3" PostId="895" RevisionGUID="15f1900e-6025-4586-a664-eedc271396ae" CreationDate="2022-03-19T08:39:57.057" UserId="489" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3252" PostHistoryTypeId="2" PostId="896" RevisionGUID="339d3420-fd37-494a-8eae-0b05d58da2bf" CreationDate="2022-03-19T09:56:28.193" UserId="145" Text="Is there a way to test Polkadot and Kusama RPC client applications for a runtime upgrade before it gets enacted? i.e. Is there a way to emulate the upgraded runtime in a sandbox environment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3254" PostHistoryTypeId="1" PostId="896" RevisionGUID="339d3420-fd37-494a-8eae-0b05d58da2bf" CreationDate="2022-03-19T09:56:28.193" UserId="145" Text="Testing RPC clients for runtime upgrades in advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="3255" PostHistoryTypeId="3" PostId="896" RevisionGUID="339d3420-fd37-494a-8eae-0b05d58da2bf" CreationDate="2022-03-19T09:56:28.193" UserId="145" Text="|substrate-node|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3256" PostHistoryTypeId="10" PostId="809" RevisionGUID="218e46cf-a3a6-4b17-8992-95bb0300f952" CreationDate="2022-03-19T10:49:57.360" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;}]}" />
  <row Id="3257" PostHistoryTypeId="2" PostId="897" RevisionGUID="b66a3ff2-93a3-4e38-ad5a-c963137daaee" CreationDate="2022-03-19T10:51:26.397" UserId="167" Text="You can get the balance of an account at any given block hash. For example: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const { nonce, data: balance } = await api.query.system.account.at(HASH, ADDR); &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or, alternatively, you can create a new `api` object that corresponds to the state at block with hash `HASH`: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let atApi = await api.at(HASH);&#xD;&#xA;const { nonce, data: balance } = await atApi.query.system.account(ADDR); &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Knowing this, your questions is reduced then answered in two steps: &#xD;&#xA;&#xD;&#xA;1. First, you need to find the block hash at which the account the nonce number that you are interested in. &#xD;&#xA;2. Then, using the above examples, you can read the account balance at that identified block hash. &#xD;&#xA;&#xD;&#xA;To find the hash corresponding to the nonce you are interested in, you can either do a linear or binary search, but this entirely depends on which range you want to search. And how you do it exactly the same as above: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;for (let x = rangeStart; x &gt; rangeStart; x--) {&#xD;&#xA;	const nonceAtBlock = (await api.query.system.account.at(currentHash, ADDR)).nonce;&#xD;&#xA;	if (nonceAtBlock.eq(7)) { &#xD;&#xA;		// found the nonce! &#xD;&#xA;		break; &#xD;&#xA;	}&#xD;&#xA;	// go to the parent block's hash and check that. &#xD;&#xA;	const parentHash = (await api.rpc.chain.getBlock(currentHash)).block.header.parentHash&#xD;&#xA;	currentHash = parentHash;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3259" PostHistoryTypeId="10" PostId="729" RevisionGUID="5066ee85-7b16-401a-8e4e-be535188a7c3" CreationDate="2022-03-19T10:52:39.520" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:85,&quot;DisplayName&quot;:&quot;Squirrel&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;}]}" />
  <row Id="3260" PostHistoryTypeId="2" PostId="898" RevisionGUID="d6a559c4-3d31-4419-8282-6f8778d7d3b2" CreationDate="2022-03-19T11:14:02.357" UserId="360" Text="I performed an upward teleport from Encointer parachain to Kusama relaychain.&#xD;&#xA;&#xD;&#xA;The parachain confirmed the XCM extrinsic `polkadotXcm.limitedTeleportAssets` and an Event was disposed: `polkadotXcm.Attempted` with&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  Complete: 2,000,000,000&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And the balance was deducted indeed.&#xD;&#xA;&#xD;&#xA;I see that the balance on the relaychain is correct now (it increased by the expected amount). But is there an Event to listen to to detect that the teleport was successful?&#xD;&#xA;&#xD;&#xA;I tried a subscan search for palletXCM events:&#xD;&#xA;https://kusama.subscan.io/event?address=&amp;module=xcmpallet&amp;event=all&amp;startDate=&amp;endDate=&amp;startBlock=&amp;endBlock=&amp;timeType=date&amp;version=9170&#xD;&#xA;&#xD;&#xA;But that wont yield an Event for my upwards teleport&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3262" PostHistoryTypeId="1" PostId="898" RevisionGUID="d6a559c4-3d31-4419-8282-6f8778d7d3b2" CreationDate="2022-03-19T11:14:02.357" UserId="360" Text="how to verify upward teleport on relay chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="3263" PostHistoryTypeId="3" PostId="898" RevisionGUID="d6a559c4-3d31-4419-8282-6f8778d7d3b2" CreationDate="2022-03-19T11:14:02.357" UserId="360" Text="|parachain|xcm|events|teleport|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3264" PostHistoryTypeId="2" PostId="899" RevisionGUID="025e9ade-bb7b-4209-a9c8-917b1fa2a738" CreationDate="2022-03-19T14:13:13.913" UserId="523" Text="usually we use [polkadot-launch](https://github.com/paritytech/polkadot-launch) to test runtime upgrade locally first" ContentLicense="CC BY-SA 4.0" />
  <row Id="3266" PostHistoryTypeId="10" PostId="867" RevisionGUID="f8e28447-8354-45ff-b952-518dcb99fe82" CreationDate="2022-03-19T14:36:05.670" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="3268" PostHistoryTypeId="2" PostId="900" RevisionGUID="ae8452b3-819d-473d-a827-ded41c2cb131" CreationDate="2022-03-19T14:53:49.870" UserId="209" Text="I've launched several substrate nodes in several clouds, one of which is Digital Ocean. The telemetry at telemetry.polkadot.io works just fine, it shows all the nodes and block generated in the real-time. But the [https://polkadot.js.org/apps/#/explorer][1] doesn't connect to any of my blockchain nodes, with the error message &quot;The operation is insecure.&quot;&#xD;&#xA;&#xD;&#xA;This is how I launch my cloud node: &#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --chain=customSpecRaw.json \&#xD;&#xA;    --alice \&#xD;&#xA;    --validator \&#xD;&#xA;    --rpc-cors=all \&#xD;&#xA;    --rpc-methods=Unsafe \&#xD;&#xA;    --unsafe-rpc-external \&#xD;&#xA;    --unsafe-ws-external \&#xD;&#xA;    --no-mdns \&#xD;&#xA;    --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \&#xD;&#xA;    --prometheus-external \&#xD;&#xA;    --name='Digital Ocean Cloud Node'&#xD;&#xA;&#xD;&#xA;Allowing all inbound and outbound traffic on ports for tcp, http, https (ports: 22, 80, 443) on my cloud VM didn't solve the problem. &#xD;&#xA;&#xD;&#xA;I'd be grateful if you tell me if I'm doing something wrong.&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/#/explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="3270" PostHistoryTypeId="1" PostId="900" RevisionGUID="ae8452b3-819d-473d-a827-ded41c2cb131" CreationDate="2022-03-19T14:53:49.870" UserId="209" Text="How do I connect substrate frontend with backend on Digital Ocean?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3271" PostHistoryTypeId="3" PostId="900" RevisionGUID="ae8452b3-819d-473d-a827-ded41c2cb131" CreationDate="2022-03-19T14:53:49.870" UserId="209" Text="|substrate-node|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3272" PostHistoryTypeId="5" PostId="899" RevisionGUID="9ad1ec17-ff92-4c41-a478-01d2ff22013e" CreationDate="2022-03-19T14:59:01.550" UserId="523" Comment="added 353 characters in body" Text="not sure what you want here, for test a runtime upgrade or a polkadot rpc client which will connect to the new runtime.&#xD;&#xA;&#xD;&#xA;usually before on-chain upgrade in polkadot/kusama we use [polkadot-launch](https://github.com/paritytech/polkadot-launch) to launch a test-net locally and do whatever test first&#xD;&#xA;&#xD;&#xA;and for test a runtime upgrade you need to integrate [try-runtime](https://docs.substrate.io/how-to-guides/v3/tools/try-runtime/) into your parachain nodes and test locally first with it  " ContentLicense="CC BY-SA 4.0" />
  <row Id="3273" PostHistoryTypeId="5" PostId="900" RevisionGUID="db1f0186-5825-402a-9266-4dac7181a402" CreationDate="2022-03-19T15:01:18.410" UserId="209" Comment="added 16 characters in body" Text="I've launched several substrate nodes in several clouds, one of which is Digital Ocean. The telemetry at telemetry.polkadot.io works just fine, it shows all the nodes and block generated in the real-time. &#xD;&#xA;&#xD;&#xA;The problem is that [https://polkadot.js.org/apps/#/explorer][1] doesn't connect to any of my blockchain nodes, with the error message &quot;The operation is insecure.&quot;&#xD;&#xA;&#xD;&#xA;This is how I launch my cloud node: &#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --chain=customSpecRaw.json \&#xD;&#xA;    --alice \&#xD;&#xA;    --validator \&#xD;&#xA;    --rpc-cors=all \&#xD;&#xA;    --rpc-methods=Unsafe \&#xD;&#xA;    --unsafe-rpc-external \&#xD;&#xA;    --unsafe-ws-external \&#xD;&#xA;    --no-mdns \&#xD;&#xA;    --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \&#xD;&#xA;    --prometheus-external \&#xD;&#xA;    --name='Digital Ocean Cloud Node'&#xD;&#xA;&#xD;&#xA;Allowing all inbound and outbound traffic on ports for tcp, http, https (ports: 22, 80, 443) on my cloud VM didn't solve the problem. &#xD;&#xA;&#xD;&#xA;I'd be grateful if you tell me if I'm doing something wrong.&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/#/explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="3274" PostHistoryTypeId="2" PostId="901" RevisionGUID="29f03e7c-4b3a-44f1-97f5-d5e2859f1401" CreationDate="2022-03-19T15:02:22.353" UserId="587" Text="Say I have a `StorageDoubleMap` that stores `Data` structs for each user and `ContextId`&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Info&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		Twox64Concat,&#xD;&#xA;		T::ContextId,&#xD;&#xA;		Data,&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;Is there an option to limit the amount of entries per `AccountId`? Or should I keep a count of entries in a separate map?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3276" PostHistoryTypeId="1" PostId="901" RevisionGUID="29f03e7c-4b3a-44f1-97f5-d5e2859f1401" CreationDate="2022-03-19T15:02:22.353" UserId="587" Text="How to limit the number of values by prefix in StorageDoubleMap?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3277" PostHistoryTypeId="3" PostId="901" RevisionGUID="29f03e7c-4b3a-44f1-97f5-d5e2859f1401" CreationDate="2022-03-19T15:02:22.353" UserId="587" Text="|pallet|frame|storage|map|limit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3278" PostHistoryTypeId="2" PostId="902" RevisionGUID="5707ee39-0005-4a90-a1bf-f7baed5c3ac4" CreationDate="2022-03-19T15:07:24.900" UserId="523" Text="enable log first and provide more details here and also if your error is what you link [here](https://matrix.to/#/!WuksvCDImqYSxvNmua:matrix.parity.io/$q2wcrpEy0flzTR2AEoZcW_hBXwiSAZ7s9RY1l2TEsfw?via=matrix.parity.io&amp;via=matrix.org&amp;via=web3.foundation) then you need to check the transact body encoded correctly(pallet index,call index...)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3280" PostHistoryTypeId="2" PostId="903" RevisionGUID="c678267c-58cf-45f1-b7fc-d2c08ab5a5b4" CreationDate="2022-03-19T15:08:41.453" UserId="1760" Text="I'm trying to make an RPC call to a Substrate node, but I can't generate a proper Storage Key. The Module and Method parts are fine, the problem is the Twox64Concat part. The `sp_core::twox_64` of value `33955c59b47da83d1cade50f724a6993` should return `61cb07b62bdbaa9980` but returns `ef859d4c4bea1c66` instead.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Data storage structure:&#xD;&#xA;```&#xD;&#xA;#pallet::storage]&#xD;&#xA;#[pallet::getter(fn addresses_owned)]&#xD;&#xA;/// Keeps track of address owners.&#xD;&#xA;pub(super) type AddressOwners&lt;T: Config&gt; =&#xD;&#xA;   StorageMap&lt;_, Twox64Concat, Address, BoundedVec&lt;T::AccountId, T::MaxAddressOwners&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The rest part of the pallet can be found [here](https://github.com/chainify/pallet-nolik/blob/main/src/lib.rs#L85).&#xD;&#xA;&#xD;&#xA;### My code:&#xD;&#xA;```&#xD;&#xA;    let module_name = &quot;Nolik&quot;;&#xD;&#xA;    let module_name_twox = sp_core::twox_128(module_name.as_bytes());&#xD;&#xA;    let module_name_hex = hex::encode(module_name_twox.clone());&#xD;&#xA;    println!(&quot;MODULE {:?}&quot;, module_name_hex);&#xD;&#xA;&#xD;&#xA;    let method_name = &quot;AddressOwners&quot;;&#xD;&#xA;    let method_name_twox = sp_core::twox_128(method_name.as_bytes());&#xD;&#xA;    let method_name_hex = hex::encode(method_name_twox.clone());&#xD;&#xA;    println!(&quot;METHOD {:?}&quot;, method_name_hex);&#xD;&#xA;&#xD;&#xA;    let storage_key = &quot;33955c59b47da83d1cade50f724a6993&quot;;&#xD;&#xA;    let storage_key_twox = sp_core::twox_64(storage_key.as_bytes());&#xD;&#xA;    let storage_key_hex = hex::encode(storage_key_twox.clone());&#xD;&#xA;    println!(&quot;TWOX64 {:?}&quot;, storage_key_hex);&#xD;&#xA;&#xD;&#xA;    let twox_64_concat: Vec&lt;u8&gt; = storage_key_twox&#xD;&#xA;        .iter()&#xD;&#xA;        .chain(storage_key.as_bytes())&#xD;&#xA;        .cloned()&#xD;&#xA;        .collect();&#xD;&#xA;&#xD;&#xA;    let twox_64_concat_hex = hex::encode(twox_64_concat.clone());&#xD;&#xA;    println!(&quot;TWOX64CONCAT {:?}&quot;, twox_64_concat_hex);&#xD;&#xA;&#xD;&#xA;    let key = format!(&quot;0x{}{}{}&quot;, module_name_hex, method_name_hex, twox_64_concat_hex);&#xD;&#xA;    println!(&quot;KEY {:?}&quot;, key);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### The output&#xD;&#xA;```&#xD;&#xA;MODULE &quot;f90f720da6ab97a2d8404b27e705dda8&quot;&#xD;&#xA;METHOD &quot;82074de3756f76dc0e8434b877c54d17&quot;&#xD;&#xA;TWOX64 &quot;ef859d4c4bea1c66&quot;&#xD;&#xA;TWOX64CONCAT &quot;ef859d4c4bea1c663333393535633539623437646138336431636164653530663732346136393933&quot;&#xD;&#xA;KEY &quot;0xf90f720da6ab97a2d8404b27e705dda882074de3756f76dc0e8434b877c54d17ef859d4c4bea1c663333393535633539623437646138336431636164653530663732346136393933&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Would appreciate any advice. Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/M8sUL.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3282" PostHistoryTypeId="1" PostId="903" RevisionGUID="c678267c-58cf-45f1-b7fc-d2c08ab5a5b4" CreationDate="2022-03-19T15:08:41.453" UserId="1760" Text="Generating a Storage Key when making an RPC request" ContentLicense="CC BY-SA 4.0" />
  <row Id="3283" PostHistoryTypeId="3" PostId="903" RevisionGUID="c678267c-58cf-45f1-b7fc-d2c08ab5a5b4" CreationDate="2022-03-19T15:08:41.453" UserId="1760" Text="|storage|rpc|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3285" PostHistoryTypeId="2" PostId="904" RevisionGUID="143e0f08-974e-40ee-8936-bee119c5d30d" CreationDate="2022-03-19T15:12:53.737" UserId="523" Text="subscan provide such tool to achieve it, just convert it [here](https://kusama.subscan.io/tools/format_transform)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3287" PostHistoryTypeId="5" PostId="902" RevisionGUID="db412906-d45c-4f00-b180-5e27a4d4dae3" CreationDate="2022-03-19T15:52:44.927" UserId="523" Comment="added 45 characters in body" Text="enable log first and provide more details here and guess you are the person who attach [link here](https://matrix.to/#/!WuksvCDImqYSxvNmua:matrix.parity.io/$q2wcrpEy0flzTR2AEoZcW_hBXwiSAZ7s9RY1l2TEsfw?via=matrix.parity.io&amp;via=matrix.org&amp;via=web3.foundation). If so then better check the transact body encoded correctly(e.g pallet index,call index,call params are as expected as target chain)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3288" PostHistoryTypeId="2" PostId="905" RevisionGUID="ab48aa55-53c8-42a0-af13-77d2c22ffcc3" CreationDate="2022-03-19T17:10:39.440" UserId="1761" Text="I am trying to post on Subsocial but when I hit &quot;Create Post&quot; the sign request isn't popping up. I have tried logging in and out, changing the sign request type, disabling and enabling the extension, updating metadata, and I have been all through the extension trying to get the signature request to pop up. I do have a ping next to the extension logo saying &quot;1&quot; with a red square, signifying that I have a sign request but for some reason I can't access it. Thanks for any and all help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="3290" PostHistoryTypeId="1" PostId="905" RevisionGUID="ab48aa55-53c8-42a0-af13-77d2c22ffcc3" CreationDate="2022-03-19T17:10:39.440" UserId="1761" Text="Unable to receive sign request" ContentLicense="CC BY-SA 4.0" />
  <row Id="3291" PostHistoryTypeId="3" PostId="905" RevisionGUID="ab48aa55-53c8-42a0-af13-77d2c22ffcc3" CreationDate="2022-03-19T17:10:39.440" UserId="1761" Text="|polkadot-js|subsocial|sign|request|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3292" PostHistoryTypeId="2" PostId="906" RevisionGUID="19264caf-efb7-4b4a-9527-ab0729480a74" CreationDate="2022-03-19T17:15:05.873" UserId="698" Text="When you first visit the site you'll be asked to 'Auth' the site, was this done?  If not please verify that the site is allowed in Manage Website Access." ContentLicense="CC BY-SA 4.0" />
  <row Id="3294" PostHistoryTypeId="2" PostId="907" RevisionGUID="47c20f82-d9c2-498f-984f-39ec6c3358e7" CreationDate="2022-03-19T18:03:22.877" UserId="209" Text="What's the way to distribute the compiled node binary to peers, so that they wouldn't need to build everything from scratch on their virtual machines? I'm asking this because building everything takes quite some time and effort from a peer and I'd like to simplify this path for them." ContentLicense="CC BY-SA 4.0" />
  <row Id="3296" PostHistoryTypeId="1" PostId="907" RevisionGUID="47c20f82-d9c2-498f-984f-39ec6c3358e7" CreationDate="2022-03-19T18:03:22.877" UserId="209" Text="How do I distribute the compiled node binary to peers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3297" PostHistoryTypeId="3" PostId="907" RevisionGUID="47c20f82-d9c2-498f-984f-39ec6c3358e7" CreationDate="2022-03-19T18:03:22.877" UserId="209" Text="|substrate-node|build|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3298" PostHistoryTypeId="2" PostId="908" RevisionGUID="647b7d18-f69c-4a3d-b3e4-2758659c7245" CreationDate="2022-03-19T18:17:45.970" UserId="145" Text="It's probably going to give that error if you're trying to connect to it through `ws` (i.e. `http`) rather than `wss` (`https`). If you haven't already try deploying an SSL certificate to your server (you can get a time-limited one for free from [zerossl][1]). Deploy the SSL certificate on an `nginx` instance, receive the traffic on the SSL-enabled TCP port and reverse-proxy the traffic to your node.&#xD;&#xA;&#xD;&#xA;There's also a guide in the Polkadot wiki [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://zerossl.com/&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/maintain-wss" ContentLicense="CC BY-SA 4.0" />
  <row Id="3300" PostHistoryTypeId="2" PostId="909" RevisionGUID="4049a361-69c5-4351-9909-7ec8955f0f6b" CreationDate="2022-03-19T18:28:23.517" UserId="145" Text="If the chipset architecture (i.e. the Rust build target, or platform) of your peers are the same as yours you can safely just distribute the binary you built locally. Polkadot GitHub repository releases actually each contain a pre-built binary targeted for `x86_64-unknown-linux-gnu`, which run without problems on `x86_64` Linux machines. For instance you can find the `v0.9.17-rc4` binary on the release page [here][1] in the assets section.&#xD;&#xA;&#xD;&#xA;If your peers are on different platforms then you can target those platforms in your builds and distribute multiple binaries for multiple platforms.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/releases/tag/v0.9.17-rc4" ContentLicense="CC BY-SA 4.0" />
  <row Id="3302" PostHistoryTypeId="5" PostId="908" RevisionGUID="d6cce5d8-7b7a-4fd8-a74b-404fef6c548e" CreationDate="2022-03-19T18:37:27.270" UserId="145" Comment="added 1 character in body" Text="It's probably going to give that error if you're trying to connect to it through `ws` (i.e. `http`) rather than `wss` (`https`). If you haven't already, try deploying an SSL certificate to your server (you can get a time-limited one for free from [zerossl][1]). Deploy the SSL certificate on an `nginx` instance, receive the traffic on the SSL-enabled TCP port and reverse-proxy the traffic to your node.&#xD;&#xA;&#xD;&#xA;There's also a guide in the Polkadot wiki [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://zerossl.com/&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/maintain-wss" ContentLicense="CC BY-SA 4.0" />
  <row Id="3303" PostHistoryTypeId="6" PostId="582" RevisionGUID="b662979d-3845-48f0-a5db-e66814245a1d" CreationDate="2022-03-19T21:07:18.220" UserId="34" Comment="contracts is redundant, smart-contract should be used." Text="|smart-contract|rust|rust-ipfs|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3304" PostHistoryTypeId="24" PostId="582" RevisionGUID="b662979d-3845-48f0-a5db-e66814245a1d" CreationDate="2022-03-19T21:07:18.220" Comment="Proposed by 34 approved by -1 edit id of 81" ContentLicense="CC BY-SA 4.0" />
  <row Id="3305" PostHistoryTypeId="5" PostId="582" RevisionGUID="0b8388e8-d977-4bb2-a790-0aee6a137fdc" CreationDate="2022-03-19T21:07:18.220" UserId="83" Comment="contracts is redundant, smart-contract should be used." Text="I'm running into an issue where I cannot deploy contracts to my chain, any help is appreciated.&#xD;&#xA;&#xD;&#xA;I'm using the same setup as: https://github.com/paritytech/substrate/blob/632b32300eb9376767c2ae7b38e79b3f7f5329b1/bin/node/runtime/src/lib.rs#L887-L903 (as referenced in the guide here: https://docs.substrate.io/how-to-guides/v3/pallet-design/contracts-pallet/) to integrate with the contracts pallet and rpc (using version 4.0.0-dev) and regardless of the funds held by an account (using `1 &lt;&lt; 60` as default balance in my chain spec), I receive the &quot;**NewContractNotFunded**&quot; error when trying to deploy any contract.&#xD;&#xA;&#xD;&#xA;Is this an issue with version 4.0.0-dev, or an issue with my setup?&#xD;&#xA;Is a rebase required or is there something else I can do?&#xD;&#xA;&#xD;&#xA;My runtime config is here: https://github.com/driemworks/substrate/blob/1fabe26f239166e210f723756812d7eca069e41e/bin/node-template/runtime/src/lib.rs#L270&#xD;&#xA;&#xD;&#xA;My initial thoughts were that I need to upgrade my fork to the latest Substrate master branch. However, a dependency in my fork (rust-ipfs) requires an older version of libp2p (0.39.1) that brings in an older version of libp2p-noise (0.32.0). With the changes made to the master branch, compilation fails with:&#xD;&#xA;&#xD;&#xA;        error[E0282]: type annotations needed&#xD;&#xA;       --&gt; /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-noise-0.32.0/src/protocol/x25519.rs:221:45&#xD;&#xA;        |&#xD;&#xA;    221 |         curve25519_sk.copy_from_slice(&amp;hash.as_ref()[..32]);&#xD;&#xA;        |                                        -----^^^^^^--&#xD;&#xA;        |                                        |    |&#xD;&#xA;        |                                        |    cannot infer type for type parameter `T` declared on the trait `AsRef`&#xD;&#xA;        |                                        this method call resolves to `&amp;T`&#xD;&#xA;        |&#xD;&#xA;        = note: type must be known at this point&#xD;&#xA;&#xD;&#xA;I've tried downgrading libp2p back to 0.39.1, however, I encounter the issue regardless. " ContentLicense="CC BY-SA 4.0" />
  <row Id="3306" PostHistoryTypeId="2" PostId="910" RevisionGUID="cdbe6197-c6f3-4db1-8c79-b1b1ba34de44" CreationDate="2022-03-19T21:18:58.083" UserId="223" Text="At the moment I think you would need to keep some other storage items to track the amount of entries per `AccountId`. &#xD;&#xA;&#xD;&#xA;However, I think being able to bound the number of entries per key in a double map or n map would be a useful abstraction for the frame support macros to expose - it would be worth making an issue in https://github.com/paritytech/substrate for this feature request." ContentLicense="CC BY-SA 4.0" />
  <row Id="3308" PostHistoryTypeId="5" PostId="903" RevisionGUID="cac902d8-6066-4034-a856-bda2e4021723" CreationDate="2022-03-19T21:19:49.427" UserId="1760" Comment="added 518 characters in body" Text="I'm trying to make an RPC call to a Substrate node, but I can't generate a proper Storage Key. The Module and Method parts are fine, the problem is the Twox64Concat part. The `sp_core::twox_64` of value `33955c59b47da83d1cade50f724a6993` should return `61cb07b62bdbaa9980` but returns `ef859d4c4bea1c66` instead.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Data storage structure:&#xD;&#xA;```&#xD;&#xA;#pallet::storage]&#xD;&#xA;#[pallet::getter(fn addresses_owned)]&#xD;&#xA;/// Keeps track of address owners.&#xD;&#xA;pub(super) type AddressOwners&lt;T: Config&gt; =&#xD;&#xA;   StorageMap&lt;_, Twox64Concat, Address, BoundedVec&lt;T::AccountId, T::MaxAddressOwners&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The rest part of the pallet can be found [here](https://github.com/chainify/pallet-nolik/blob/main/src/lib.rs#L85).&#xD;&#xA;&#xD;&#xA;### My code:&#xD;&#xA;```&#xD;&#xA;    let module_name = &quot;Nolik&quot;;&#xD;&#xA;    let module_name_twox = sp_core::twox_128(module_name.as_bytes());&#xD;&#xA;    let module_name_hex = hex::encode(module_name_twox.clone());&#xD;&#xA;    println!(&quot;MODULE {:?}&quot;, module_name_hex);&#xD;&#xA;&#xD;&#xA;    let method_name = &quot;AddressOwners&quot;;&#xD;&#xA;    let method_name_twox = sp_core::twox_128(method_name.as_bytes());&#xD;&#xA;    let method_name_hex = hex::encode(method_name_twox.clone());&#xD;&#xA;    println!(&quot;METHOD {:?}&quot;, method_name_hex);&#xD;&#xA;&#xD;&#xA;    let storage_key = &quot;33955c59b47da83d1cade50f724a6993&quot;;&#xD;&#xA;    let storage_key_twox = sp_core::twox_64(storage_key.as_bytes());&#xD;&#xA;    let storage_key_hex = hex::encode(storage_key_twox.clone());&#xD;&#xA;    println!(&quot;TWOX64 {:?}&quot;, storage_key_hex);&#xD;&#xA;&#xD;&#xA;    let twox_64_concat: Vec&lt;u8&gt; = storage_key_twox&#xD;&#xA;        .iter()&#xD;&#xA;        .chain(storage_key.as_bytes())&#xD;&#xA;        .cloned()&#xD;&#xA;        .collect();&#xD;&#xA;&#xD;&#xA;    let twox_64_concat_hex = hex::encode(twox_64_concat.clone());&#xD;&#xA;    println!(&quot;TWOX64CONCAT {:?}&quot;, twox_64_concat_hex);&#xD;&#xA;&#xD;&#xA;    let key = format!(&quot;0x{}{}{}&quot;, module_name_hex, method_name_hex, twox_64_concat_hex);&#xD;&#xA;    println!(&quot;KEY {:?}&quot;, key);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### The output&#xD;&#xA;```&#xD;&#xA;MODULE &quot;f90f720da6ab97a2d8404b27e705dda8&quot;&#xD;&#xA;METHOD &quot;82074de3756f76dc0e8434b877c54d17&quot;&#xD;&#xA;TWOX64 &quot;ef859d4c4bea1c66&quot;&#xD;&#xA;TWOX64CONCAT &quot;ef859d4c4bea1c663333393535633539623437646138336431636164653530663732346136393933&quot;&#xD;&#xA;KEY &quot;0xf90f720da6ab97a2d8404b27e705dda882074de3756f76dc0e8434b877c54d17ef859d4c4bea1c663333393535633539623437646138336431636164653530663732346136393933&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Would appreciate any advice. Thanks!&#xD;&#xA;&#xD;&#xA;## Update&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let storage_key_twox = sp_core::twox_64(storage_key.as_bytes().encode().as_ref());&#xD;&#xA;```&#xD;&#xA;solves the issue and I get the `61cb07b62bdbaa99` hash. But,&#xD;&#xA;there is extra `80` after it. It is possible to extend the original set of bytes and manually add `128` to byte array. &#xD;&#xA;```&#xD;&#xA;let mut with_80: Vec&lt;u8&gt; = vec![128];&#xD;&#xA;with_80.extend(storage_key.as_bytes());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I'm sure it's the wrong way of doing it. &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/M8sUL.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/VwUkz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3309" PostHistoryTypeId="5" PostId="894" RevisionGUID="17a62d8e-d5af-4342-9883-2786859ebf81" CreationDate="2022-03-19T21:22:43.850" UserId="167" Comment="code formatting and minor typos. " Text="I am trying to get the balance of a wallet account using the wallet address and it's nonce. For example, I can get the latest balance and the total number of nonce of a wallet address with this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const { nonce, data: balance } = await api.query.system.account(ADDR); &#xD;&#xA;console.log(balance of account is ${balance.free} and a nonce of ${nonce});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'd like to get the balance of an address at a particular nonce like.&#xD;&#xA;&#xD;&#xA;For example, get the balance of account `x` at nonce number `y`.&#xD;&#xA;&#xD;&#xA;Thank you for reading.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3310" PostHistoryTypeId="24" PostId="894" RevisionGUID="17a62d8e-d5af-4342-9883-2786859ebf81" CreationDate="2022-03-19T21:22:43.850" Comment="Proposed by 167 approved by 94, -1 edit id of 96" ContentLicense="CC BY-SA 4.0" />
  <row Id="3311" PostHistoryTypeId="5" PostId="894" RevisionGUID="e6c28ab6-7094-4b66-90d0-141ad77bd3c3" CreationDate="2022-03-19T21:22:43.850" UserId="83" Comment="code formatting, minor typos, and conciseness" Text="I want get the balance of an account address at a particular nonce.&#xD;&#xA;&#xD;&#xA;I only know how to get the latest balance of an account address and its latest nonce (total number of transactions sent from that account address) with this:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const { nonce, data: balance } = await api.query.system.account(ADDR); &#xD;&#xA;console.log(`latest balance of account address ${ADDR} is ${balance.free} and its latest nonce is ${nonce}`);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thank you for reading." ContentLicense="CC BY-SA 4.0" />
  <row Id="3312" PostHistoryTypeId="4" PostId="894" RevisionGUID="e6c28ab6-7094-4b66-90d0-141ad77bd3c3" CreationDate="2022-03-19T21:22:43.850" UserId="83" Comment="code formatting, minor typos, and conciseness" Text="How to get the balance of an account at a particular nonce using Polkadot.js API" ContentLicense="CC BY-SA 4.0" />
  <row Id="3313" PostHistoryTypeId="5" PostId="897" RevisionGUID="0d67b3ee-eda5-4c5f-8694-cdf5998c4056" CreationDate="2022-03-19T21:41:17.227" UserId="83" Comment="add syntax highlighting. write clearer answer. add missing semicolon" Text="You can get the balance of an account at any given block hash. For example: &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const { nonce, data: balance } = await api.query.system.account.at(HASH, ADDR); &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or, alternatively, you can create a new `api` object that corresponds to the state at block with hash `HASH`: &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;let atApi = await api.at(HASH);&#xD;&#xA;const { nonce, data: balance } = await atApi.query.system.account(ADDR); &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Knowing this, your question is reduced and answered in two steps: &#xD;&#xA;&#xD;&#xA;1. First, you need to find the block hash at which the account address nonce number that you are interested in occurred.&#xD;&#xA;2. Then, using the above examples, you can read the account balance at that identified block hash. &#xD;&#xA;&#xD;&#xA;To find the hash corresponding to the nonce you are interested in, you can either do a linear or binary search, but this entirely depends on which range you want to search. And how you do it exactly the same as described in the above steps: &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;for (let x = rangeStart; x &gt; rangeStart; x--) {&#xD;&#xA;	const nonceAtBlock = (await api.query.system.account.at(currentHash, ADDR)).nonce;&#xD;&#xA;	if (nonceAtBlock.eq(7)) { &#xD;&#xA;		// found the nonce! &#xD;&#xA;		break; &#xD;&#xA;	}&#xD;&#xA;	// go to the parent block's hash and check that. &#xD;&#xA;	const parentHash = (await api.rpc.chain.getBlock(currentHash)).block.header.parentHash;&#xD;&#xA;	currentHash = parentHash;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3314" PostHistoryTypeId="2" PostId="911" RevisionGUID="4bea816d-b3af-4d0d-ada8-e3158b7af410" CreationDate="2022-03-19T21:47:24.217" UserId="73" Text="Quoting from the [peerset code][1]:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// We use `k = 0.98`, so we divide by `50`. With that value, it takes 34.3 seconds&#xD;&#xA;// to reduce the reputation by half.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While the banned threshold is defined as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub const BANNED_THRESHOLD: i32 = 82 * (i32::MIN / 100);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While a [fatal reputation][2] is defined as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub const fn new_fatal(reason: &amp;'static str) -&gt; ReputationChange {&#xD;&#xA;	Self { value: i32::MIN, reason }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Banned threshold: -1760936552 -- i32::Min: -2147483648 -&gt; i32::Min / 2: -1073741824&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, it should take around 34.3 seconds after being banned to be unbanned. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/81d253ed66c2597d5ca6a1852c80a6ecb03ce45f/client/peerset/src/lib.rs#L492-L493&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/81d253ed66c2597d5ca6a1852c80a6ecb03ce45f/client/peerset/src/lib.rs#L114-L116" ContentLicense="CC BY-SA 4.0" />
  <row Id="3316" PostHistoryTypeId="2" PostId="912" RevisionGUID="774917ad-2c70-4835-a1f0-90349cf0c7c6" CreationDate="2022-03-19T22:40:16.437" UserId="494" Text="From [solang docs](https://solang.readthedocs.io/en/latest/targets.html?highlight=substrate#parity-substrate), it seems they target substrate 2.0, which is a relatively outdated release.&#xD;&#xA;&#xD;&#xA;It might be worth it to open an issue on the solang repository asking about compatibility with substrate 3.0." ContentLicense="CC BY-SA 4.0" />
  <row Id="3318" PostHistoryTypeId="2" PostId="913" RevisionGUID="37e31a4c-d9e1-442b-8bef-0503ac904337" CreationDate="2022-03-19T23:20:58.137" UserId="73" Text="this was a result of a bug in the pallet macro. It was generating functions that are internal usage and didn't hide them for the docs. This should now be fixed after https://github.com/paritytech/substrate/pull/11075 this is merged." ContentLicense="CC BY-SA 4.0" />
  <row Id="3320" PostHistoryTypeId="2" PostId="914" RevisionGUID="baa41242-1a8a-47c1-80a0-4993fcdce21b" CreationDate="2022-03-20T01:06:36.177" UserId="83" Text="**To inspect the peer reputation of connected peers when running a collator node using the [substrate-node-template][1] it was necessary to log trace events from the logs:**&#xD;&#xA;```&#xD;&#xA;RUST_LOG=trace RUST_BACKTRACE=1 &lt;INSERT_PATH_NODE_BINARY&gt;/parachain-collator &lt;INSERT_OPTIONS_ARGS_SUBCOMMANDS&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Examples of various collator node logs that mention the peer reputation values ranges (i.e. `x to y`) include:**&#xD;&#xA;```&#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256&#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report : +100 to -156. Reason: Grandpa: Neighbor message    &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report &lt;PEER_NODE_IDENTITY&gt;: -16 to 82. Reason: Any transaction    &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report &lt;PEER_NODE_IDENTITY&gt;: -4096 to -4014. Reason: Bad transaction &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Fleeting &lt;PEER_NODE_IDENTITY&gt;: -156 -&gt; -153  &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Parachain] Fleeting &lt;PEER_NODE_IDENTITY&gt;: -156 -&gt; -153&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**To find out how to what the peer reputation values and reasons in the logs mean, it was necessary to refer to the Substrate source code and documentation:**&#xD;&#xA; &#xD;&#xA;A search for the keyword &quot;reputation&quot; in the Substrate Rust Docs [here][2] shows that peer reputation of a `PeerId` (peer node identity) is handled by the sc_network, sc_service, and sc_peerset Rust crates.&#xD;&#xA;&#xD;&#xA;In the documentation it says that reputation changes are accrued and applied to the `PeerId` sending a request. They are are stored in a vector of the Struct [`ReputationChange`][3], which is the *description of a reputation adjustment for a node*, which includes the fields *peer reputation delta (change)* value of type `i32` and the *reason for the reputation change* of type string.&#xD;&#xA;&#xD;&#xA;It shows the implementation includes a function `new_fatal(reason: &amp;'static str) -&gt; ReputationChange` that accepts a reason for the *new reputation change that forces minimum possible reputation*. Examples of the reasons** for these reputation changes are in the Substrate source code as `Rep::new_fatal(&lt;REASON&gt;)`, such as when a peer sent us the same (block) request multiple times, when the peer is using an unsupported protocol version or when the peer roles that are trying to connect do not match each other, or when a peer id provides an invalid justification to import a block hash. However, since this function forces minimum possible reputation it doesn't need to accept a fields with a *peer reputation delta (change)* value.&#xD;&#xA;&#xD;&#xA;Whereas implementations of the function `new(value: i32, reason: &amp;'static str) -&gt; ReputationChange` in the Substrate source code as ``Rep::new(&lt;PEER_REPUTATION_CHANGE&gt;, &lt;REASON&gt;)`, the first argument accepts a *peer reputation delta (change)* value, and the 2nd argument accepts the  *reason for the change*.&#xD;&#xA;&#xD;&#xA;**To interpret the trace log above** `...Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256`:&#xD;&#xA;&#xD;&#xA;We can see in the Substrate source code [here][4] that we call function [`add_reputation`][5] that *performs an arithmetic addition on the reputation score of that peer* with value [`DISCONNECT_REPUTATION_CHANGE`][6] of `-256` to reduce the reputation of a peer node by that value because we got disconnected from it.&#xD;&#xA;&#xD;&#xA;The peer reputation that is shown in the logs as `-256 to -256` is generated from the 2nd and 3rd arguments of the trace log code in the peerset [`dropped`][7] function of the Substrate source code, as shown below, where the 2nd argument is the reputation change to apply to the peer node that dropped, and the 3rd argument is the existing current reputation of that peer node.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;trace!(target: &quot;peerset&quot;, &quot;Dropping {}: {:+} to {}&quot;, peer_id, DISCONNECT_REPUTATION_CHANGE, entry.reputation());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So the trace log `&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256` can be interpreted in English as *&quot;at this date and time a relay chain node used the peerset crate to report in the network trace logs that peer node with identity `&lt;PEER_NODE_IDENTITY&gt;` got disconnected from the the relay chain so the peer had its reputation reduced by the reputation change value of -256, so its new reputation is -256&quot;*, so in this case prior to dropping the peer node had a reputation of 0.&#xD;&#xA;&#xD;&#xA;**To interpret the trace log above** `...Report &lt;PEER_NODE_IDENTITY&gt;: -4096 to -4014. Reason: Bad transaction`:&#xD;&#xA;&#xD;&#xA;If you do a search of the Substrate source code you will find the report is triggered by the `report_peer` function [here][8] when importing a bad transaction that was sent from a peer, where &#xD;&#xA;`BAD_TRANSACTION` is declared [here][9] with the reputation change to apply to the peer and the reason for the change `Rep = Rep::new(-(1 &lt;&lt; 12), &quot;Bad transaction&quot;)`, so since their new reputation after applying the reputation change to their reputation must have been greater than or equal to the `BANNED_THRESHOLD`, we don't drop that peer yet, but we report that their reputation was reduced by -4096 and their new reputation is -4014. &#xD;&#xA;So prior to applying that reputation change their reputation must have been x, where (x - 4096 = -4014), so x = 82.&#xD;&#xA;&#xD;&#xA;The reason why the reputation change is -4096, is because the `-(1 &lt;&lt; 12)` argument is provided to the `new` function as the peer reputation change value, which is a bitwise left shift operation (`&lt;&lt;`), where you get the binary value of 1 (0000000000001) then shift them left 12 times so it becomes 1000000000000, and then convert that binary value to its decimal equivalent of 4096.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_service/index.html?search=reputation&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_peerset/struct.ReputationChange.html&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L661&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/peersstate.rs#L396&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L54&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L662&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/master/client/network/src/transactions.rs#L422&#xD;&#xA;  [9]: https://github.com/paritytech/substrate/blob/master/client/network/src/transactions.rs#L84" ContentLicense="CC BY-SA 4.0" />
  <row Id="3322" PostHistoryTypeId="5" PostId="914" RevisionGUID="8f5a7e00-ff20-4c66-a118-e1c87ce176fb" CreationDate="2022-03-20T01:13:55.477" UserId="83" Comment="fix formatting" Text="**To inspect the peer reputation of connected peers when running a collator node using the [substrate-node-template][1] it was necessary to log trace events from the logs:**&#xD;&#xA;```&#xD;&#xA;RUST_LOG=trace RUST_BACKTRACE=1 &lt;INSERT_PATH_NODE_BINARY&gt;/parachain-collator &lt;INSERT_OPTIONS_ARGS_SUBCOMMANDS&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Examples of various collator node logs that mention the peer reputation values ranges (i.e. `x to y`) include:**&#xD;&#xA;```&#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256&#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report : +100 to -156. Reason: Grandpa: Neighbor message    &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report &lt;PEER_NODE_IDENTITY&gt;: -16 to 82. Reason: Any transaction    &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report &lt;PEER_NODE_IDENTITY&gt;: -4096 to -4014. Reason: Bad transaction &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Fleeting &lt;PEER_NODE_IDENTITY&gt;: -156 -&gt; -153  &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Parachain] Fleeting &lt;PEER_NODE_IDENTITY&gt;: -156 -&gt; -153&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**To find out how to what the peer reputation values and reasons in the logs mean, it was necessary to refer to the Substrate source code and documentation:**&#xD;&#xA; &#xD;&#xA;A search for the keyword &quot;reputation&quot; in the Substrate Rust Docs [here][2] shows that peer reputation of a `PeerId` (peer node identity) is handled by the sc_network, sc_service, and sc_peerset Rust crates.&#xD;&#xA;&#xD;&#xA;In the documentation it says that reputation changes are accrued and applied to the `PeerId` sending a request. They are are stored in a vector of the Struct [`ReputationChange`][3], which is the *description of a reputation adjustment for a node*, which includes the fields *peer reputation delta (change)* value of type `i32` and the *reason for the reputation change* of type string.&#xD;&#xA;&#xD;&#xA;It shows the implementation includes a function `new_fatal(reason: &amp;'static str) -&gt; ReputationChange` that accepts a reason for the *new reputation change that forces minimum possible reputation*. Examples of the reasons for these reputation changes are in the Substrate source code as `Rep::new_fatal(&lt;REASON&gt;)`, such as when a peer sent us the same (block) request multiple times, when the peer is using an unsupported protocol version or when the peer roles that are trying to connect do not match each other, or when a peer id provides an invalid justification to import a block hash. However, since this function forces minimum possible reputation it doesn't need to accept a fields with a *peer reputation delta (change)* value.&#xD;&#xA;&#xD;&#xA;Whereas implementations of the function `new(value: i32, reason: &amp;'static str) -&gt; ReputationChange` in the Substrate source code as `Rep::new(&lt;PEER_REPUTATION_CHANGE&gt;, &lt;REASON&gt;)`, the first argument accepts a *peer reputation delta (change)* value, and the 2nd argument accepts the  *reason for the change*.&#xD;&#xA;&#xD;&#xA;**To interpret the trace log above** `...Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256`:&#xD;&#xA;&#xD;&#xA;We can see in the Substrate source code [here][4] that we call function [`add_reputation`][5] that *performs an arithmetic addition on the reputation score of that peer* with value [`DISCONNECT_REPUTATION_CHANGE`][6] of `-256` to reduce the reputation of a peer node by that value because we got disconnected from it.&#xD;&#xA;&#xD;&#xA;The peer reputation that is shown in the logs as `-256 to -256` is generated from the 2nd and 3rd arguments of the trace log code in the peerset [`dropped`][7] function of the Substrate source code, as shown below, where the 2nd argument is the reputation change to apply to the peer node that dropped, and the 3rd argument is the existing current reputation of that peer node.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;trace!(target: &quot;peerset&quot;, &quot;Dropping {}: {:+} to {}&quot;, peer_id, DISCONNECT_REPUTATION_CHANGE, entry.reputation());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So the trace log `&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256` can be interpreted in English as *&quot;at this date and time a relay chain node used the peerset crate to report in the network trace logs that peer node with identity `&lt;PEER_NODE_IDENTITY&gt;` got disconnected from the the relay chain so the peer had its reputation reduced by the reputation change value of -256, so its new reputation is -256&quot;*, so in this case prior to dropping the peer node had a reputation of 0.&#xD;&#xA;&#xD;&#xA;**To interpret the trace log above** `...Report &lt;PEER_NODE_IDENTITY&gt;: -4096 to -4014. Reason: Bad transaction`:&#xD;&#xA;&#xD;&#xA;If you do a search of the Substrate source code you will find the report is triggered by the `report_peer` function [here][8] when importing a bad transaction that was sent from a peer, where &#xD;&#xA;`BAD_TRANSACTION` is declared [here][9] with the reputation change to apply to the peer and the reason for the change `Rep = Rep::new(-(1 &lt;&lt; 12), &quot;Bad transaction&quot;)`, so since their new reputation after applying the reputation change to their reputation must have been greater than or equal to the `BANNED_THRESHOLD`, we don't drop that peer yet, but we report that their reputation was reduced by -4096 and their new reputation is -4014. &#xD;&#xA;So prior to applying that reputation change their reputation must have been x, where (x - 4096 = -4014), so x = 82.&#xD;&#xA;&#xD;&#xA;The reason why the reputation change is -4096, is because the `-(1 &lt;&lt; 12)` argument is provided to the `new` function as the peer reputation change value, which is a bitwise left shift operation (`&lt;&lt;`), where you get the binary value of 1 (0000000000001) then shift them left 12 times so it becomes 1000000000000, and then convert that binary value to its decimal equivalent of 4096.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_service/index.html?search=reputation&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_peerset/struct.ReputationChange.html&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L661&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/peersstate.rs#L396&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L54&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L662&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/master/client/network/src/transactions.rs#L422&#xD;&#xA;  [9]: https://github.com/paritytech/substrate/blob/master/client/network/src/transactions.rs#L84" ContentLicense="CC BY-SA 4.0" />
  <row Id="3323" PostHistoryTypeId="2" PostId="915" RevisionGUID="ab52e9cc-76d9-44ef-a516-0cd73abe67e1" CreationDate="2022-03-20T01:25:20.010" UserId="28" Text="I believe all the confusion here is related to the encoding of byte vectors.&#xD;&#xA;&#xD;&#xA;Vectors in [SCALE](https://docs.substrate.io/v3/advanced/scale-codec/#vectors-lists-series-sets) are encoded with a length prefix represented with a compact number.&#xD;&#xA;&#xD;&#xA;&gt; A collection of same-typed values is encoded, prefixed with a compact encoding of the number of items, followed by each item's encoding concatenated in turn.&#xD;&#xA;&#xD;&#xA;This is required because all of of a scale encoded blob is just bytes, so if at some point, some arbitrary number of bytes needs to be decoded, the decoder needs to know how many of those bytes should be used for the byte blob.&#xD;&#xA;&#xD;&#xA;As you solved yourself, you need to `encode()` the bytes before you hash them, so that the length of the bytes is included in the hashing algorithm.&#xD;&#xA;&#xD;&#xA;Lets look at your `storage_key` more closely then, before and after the encode:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let storage_key = &quot;33955c59b47da83d1cade50f724a6993&quot;;&#xD;&#xA;let storage_key_bytes = storage_key.as_bytes();&#xD;&#xA;let storage_key_bytes_encoded = storage_key_bytes.encode();&#xD;&#xA;&#xD;&#xA;println!(&quot;storage_key_bytes: {:?}&quot;, storage_key_bytes);&#xD;&#xA;println!(&quot;storage_key_bytes_encoded: {:?}&quot;, storage_key_bytes_encoded);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; storage_key_bytes: [51, 51, 57, 53, 53, 99, 53, 57, 98, 52, 55, 100, 97, 56, 51, 100, 49, 99, 97, 100, 101, 53, 48, 102, 55, 50, 52, 97, 54, 57, 57, 51]&#xD;&#xA;&#xD;&#xA;&gt; storage_key_bytes_encoded: [128, 51, 51, 57, 53, 53, 99, 53, 57, 98, 52, 55, 100, 97, 56, 51, 100, 49, 99, 97, 100, 101, 53, 48, 102, 55, 50, 52, 97, 54, 57, 57, 51]&#xD;&#xA;&#xD;&#xA;As you can see, there is an extra `128` at the front of `storage_key_bytes_encoded`.&#xD;&#xA;&#xD;&#xA;So you need to also include the `encode()` to your `twox_64_concat` calculation:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let twox_64_concat: Vec&lt;u8&gt; = storage_key_twox&#xD;&#xA;	.iter()&#xD;&#xA;	.chain::&lt;&amp;[u8]&gt;(storage_key.as_bytes().encode().as_ref())&#xD;&#xA;	.cloned()&#xD;&#xA;	.collect();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This results in the correct storage key with the extra `80`, which is just hex representation of `128`:&#xD;&#xA;&#xD;&#xA;&gt; 0xf90f720da6ab97a2d8404b27e705dda882074de3756f76dc0e8434b877c54d1761cb07b62bdbaa99803333393535633539623437646138336431636164653530663732346136393933" ContentLicense="CC BY-SA 4.0" />
  <row Id="3325" PostHistoryTypeId="2" PostId="916" RevisionGUID="5c34dcb6-6768-438b-8ac1-387af8ee4dd4" CreationDate="2022-03-20T02:05:27.593" UserId="28" Text="Any solution to this problem, whether provided by FRAME or implemented manually, would require storing the number of items currently in the map in some other storage location, since you would never want to figure out how many items are there by iterating through all the storage items.&#xD;&#xA;&#xD;&#xA;So you could have:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type Info&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;    _,&#xD;&#xA;    Blake2_128Concat,&#xD;&#xA;    T::AccountId,&#xD;&#xA;    Twox64Concat,&#xD;&#xA;    T::ContextId,&#xD;&#xA;    Data,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type CountForInfo&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;    _,&#xD;&#xA;    Blake2_128Concat,&#xD;&#xA;    T::AccountId,&#xD;&#xA;    u32,&#xD;&#xA;    ValueQuery,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then, before you do any `insert` you check this value:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn try_insert_info(who: T::AccountId, context: T::ContextId, data: Data) -&gt; DispatchResult {&#xD;&#xA;    let already_exists = Info::&lt;T&gt;::contains_key(who, context);&#xD;&#xA;    if !already_exists {&#xD;&#xA;        let count = CountForInfo::&lt;T&gt;::get(who);&#xD;&#xA;        if count &lt; LIMIT {&#xD;&#xA;            CountForInfo::&lt;T&gt;::insert(who, count + 1);&#xD;&#xA;        } else {&#xD;&#xA;            return Err(Error::&lt;T&gt;::TooManyItems.into())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    Info::&lt;T&gt;::insert(who, context, data);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You will notice this function, versus a normal `insert` is way more expensive, since you need to check if this is a brand new storage item, or one that already exists, and if it is new, then you need to check and update the count before inserting the new storage item.&#xD;&#xA;&#xD;&#xA;It will almost always be more efficient for you to track this yourself rather than building an abstraction over this behavior, since you will be able to avoid writing / modifying the count storage item in certain situations.&#xD;&#xA;&#xD;&#xA;For example, imagine you do some code which removes an existing key, and then inserts a new key. In this case, you can likely avoid updating or checking the count at all, which can save you multiple lines of storage access.&#xD;&#xA;&#xD;&#xA;The only time it makes sense to use an abstraction like this is when the code is so complex that avoiding any manual tracking errors outweighs the additional overhead, but even still, probably best to track it manually." ContentLicense="CC BY-SA 4.0" />
  <row Id="3327" PostHistoryTypeId="2" PostId="917" RevisionGUID="46e11409-3feb-4861-ac81-6eaa2be51636" CreationDate="2022-03-20T02:09:23.843" UserId="28" Text="There seems to be no difference here. You can probably simplify the code to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA; //slash fund     &#xD;&#xA; let imbalance = T::Currency::slash_reserved(&amp;to_punish, collateral).0;&#xD;&#xA; T::Slash::on_unbalanced(imbalance);&#xD;&#xA;&#xD;&#xA; //reward funds&#xD;&#xA; let r = T::Currency::deposit_into_existing(&amp;to_reward, reward).ok();&#xD;&#xA; T::Reward::on_unbalanced(r);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Why it was written this way, I cannot speak to, but there is no magic happening or difference between `NegativeImbalanceOf` and `PositiveImbalanceOf`." ContentLicense="CC BY-SA 4.0" />
  <row Id="3335" PostHistoryTypeId="5" PostId="714" RevisionGUID="241a79dd-1d1a-4f2e-ae58-7523cb6fe652" CreationDate="2022-03-20T04:51:33.107" UserId="316" Comment="added 95 characters in body" Text="I tried deployed two ink-compatible solidity smart contract using solang as the compiler.&#xD;&#xA;When trying to play around cross contract calls, I've stumbled upon the below failure:&#xD;&#xA;&#xD;&#xA;Prerequisite:&#xD;&#xA;1. compile one solidity smart contract using solang: get abi bundle Flip.contract &#xD;&#xA;2. compile another solidity smart contract Inc that takes another smart contract as constructor input&#xD;&#xA;https://github.com/hyperledger-labs/solang/blob/main/integration/substrate/issue666.sol &#xD;&#xA;&#xD;&#xA;Route1, using polkadot.js/app:&#xD;&#xA;1. upload smart contract Flip.contract using the contacts tab.&#xD;&#xA;2. upload Inc.contract and take the Flip account_address as constructor input.&#xD;&#xA;... salt value is auto generated by polkadot.js app&#xD;&#xA;3. call the superFlip method on Inc contract to see if it can call external contract&#xD;&#xA;Results: ContractTrapped&#xD;&#xA;&#xD;&#xA;Route2, using subxt to construct transaction ourself:&#xD;&#xA;1. deploy Flip.contract, call api.tx().contracts.instantiate_with_code(... same params as route1)&#xD;&#xA;2. deploy Inc.contract, call api.tx().contracts.instantiate_with_code(... same params as route1)&#xD;&#xA;... both steps have the same input data/gas_limit value as route1, we input salt value using account.nonce value&#xD;&#xA;4. call the superFlip method on Inc contract to see if it can call external contract&#xD;&#xA;Results: ExtrinsicSuccess&#xD;&#xA;&#xD;&#xA;Need some help for this, and specifically what should be salt in this scenario. Thx.&#xD;&#xA;&#xD;&#xA;Example is produced with this node:&#xD;&#xA;https://github.com/paritytech/substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="3336" PostHistoryTypeId="2" PostId="919" RevisionGUID="4fa4aace-2c6d-40b3-8522-74c7b37729a5" CreationDate="2022-03-20T05:10:04.890" UserId="34" Text="Are you familiar at all with Docker, or more broadly, https://opencontainers.org/ ? &#xD;&#xA;&#xD;&#xA;Containers are a commonly requested way to package a _system_ that contains the needed utilities to _build and/or run_ your binary that is included within it. Thus architecture considerations are generally abstracted so you need only to configure the container image to be optimized once, and all users on any arcetecture can use them.&#xD;&#xA;&#xD;&#xA;Useful resources:&#xD;&#xA; - [Polkadot Docker images](https://registry.hub.docker.com/r/parity/polkadot/tags) - _effectively_ a cross-platform executable of a Polkadot node, no build required.&#xD;&#xA; - [Polkadot Docker&#xD;&#xA;   instructions](https://github.com/paritytech/polkadot/blob/master/doc/docker.md)&#xD;&#xA; - The [self-contained Dokerfiles](https://github.com/paritytech/polkadot/tree/master/scripts/dockerfiles/polkadot) to build the Polkadot source within a Docker container.&#xD;&#xA;&#xD;&#xA;Also of note: some _critical_ files need to be generated on a single machine and distributed alongside your binary or within your images, namely your [chain specification](https://docs.substrate.io/v3/runtime/chain-specs/) due to a [non-determinism bug](https://dev.to/gnunicorn/hunting-down-a-non-determinism-bug-in-our-rust-wasm-build-4fk1) present in Rust's handling of Wasm builds. It is _conventional_ to include the chain specification files for your node _within the source code itself_ so that anyone can build your node in the same way, whereby it becomes easy to check for non-determinism by comparing a genesis blob with another.  Polkadot, Kusama, Rococo, and more network chain spec files are found [in the source here](https://github.com/paritytech/polkadot/tree/master/node/service/res)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3338" PostHistoryTypeId="5" PostId="899" RevisionGUID="e0a6dd59-f6a1-4564-b899-7f2d26917d9f" CreationDate="2022-03-20T05:50:04.403" UserId="523" Comment="deleted 9 characters in body" Text="not sure what you want here, for test a runtime upgrade or a polkadot rpc client which will connect to the new runtime.&#xD;&#xA;&#xD;&#xA;usually before on-chain upgrade in polkadot/kusama we use [polkadot-launch](https://github.com/paritytech/polkadot-launch) to launch a test-net locally and do whatever test first&#xD;&#xA;&#xD;&#xA;and for test a runtime upgrade you need to integrate [try-runtime](https://docs.substrate.io/how-to-guides/v3/tools/try-runtime/) into your parachain nodes and test locally first " ContentLicense="CC BY-SA 4.0" />
  <row Id="3339" PostHistoryTypeId="5" PostId="852" RevisionGUID="53fb405b-d19e-4f19-b2f1-d8a9c7f7e635" CreationDate="2022-03-20T07:00:22.700" UserId="128" Comment="added 39 characters in body" Text="You can withdraw the assets by submitting an XCM extrinsic directly to the Karura parachain (this applies to any parachain that uses the `xtokens` pallet: [xtokens](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens)).&#xD;&#xA;&#xD;&#xA;This can be done from the command line, but the easier way is to use the Polkadot.js interface for the relevant parachain, the Karura interface can be found here: [Karura - Extrinsics](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkarura-rpc-0.aca-api.network#/extrinsics).&#xD;&#xA;&#xD;&#xA;An example of an `xToken` transfer in a JSON format looks like this:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    name: &quot;currency_id&quot;,&#xD;&#xA;    type: &quot;acala_primitives:currency:CurrencyId&quot;,&#xD;&#xA;    type_name: &quot;CurrencyId&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      Token: &quot;KSM&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;amount&quot;,&#xD;&#xA;    type: &quot;U128&quot;,&#xD;&#xA;    type_name: &quot;Balance&quot;,&#xD;&#xA;    value: &quot;123400000000&quot;&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;dest&quot;,&#xD;&#xA;    type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;    type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      V1: {&#xD;&#xA;        interior: {&#xD;&#xA;          X1: {&#xD;&#xA;            AccountId32: {&#xD;&#xA;              id: &quot;0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&quot;,&#xD;&#xA;              network: {&#xD;&#xA;                Any: null&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        parents: 1&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;dest_weight&quot;,&#xD;&#xA;    type: &quot;U64&quot;,&#xD;&#xA;    type_name: &quot;Weight&quot;,&#xD;&#xA;    value: 5000000000&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;**Arg 1:** `currency_id` defines the token you want to transfer - in our case it's `KSM`.&#xD;&#xA;&#xD;&#xA;**Arg 2:** `amount` defines the amount of tokens you want to transfer - this value uses base units so 1 KSM is 1000000000000 in base units - in our case 123400000000 is equal to 0.1234 KSM&#xD;&#xA;&#xD;&#xA;**Arg 3:** `dest` defines the destination address to which we want to send the tokens - note that this is the 32 byte account ID and not the SS58 address format (you can get the account ID from an address using the `subkey inspect &lt;SS58&gt;` command in the terminal).&#xD;&#xA;&#xD;&#xA;**Note:** The parent junctions parameter `parents` should be set to `1` as we are sending the funds to an external address on the relay chain (i.e. 1 level up in the consensus hierarchy).&#xD;&#xA;&#xD;&#xA;**Arg 4:** `dest_weight` defines the weight for XCM execution on the destination chain - here we set a constant of 5000000000.&#xD;&#xA;&#xD;&#xA;Using the Polkadot.js interface we can fill out the `xTokens.transfer()` extrinsic information like so:&#xD;&#xA;&#xD;&#xA;[![Extrinsics interface][1]][1]&#xD;&#xA;&#xD;&#xA;We can then submit the transaction and the KSM tokens should be transferred from Karura to Kusama when the transaction is included in the chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/yLGv4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3340" PostHistoryTypeId="2" PostId="920" RevisionGUID="394a4a81-a302-4ee9-9b2b-03a7270b9c11" CreationDate="2022-03-20T07:16:44.323" UserId="1760" Text="You could also use a vector as a value to `AccountId`. &#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn addresses_owned)]&#xD;&#xA;/// Keeps track of address owners.&#xD;&#xA;pub(super) type AddressOwners&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Twox64Concat, Address, BoundedVec&lt;T::AccountId, T::MaxAddressOwners&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;You can find the rest of the code [here](https://github.com/chainify/pallet-nolik/blob/main/src/lib.rs#L85).&#xD;&#xA;&#xD;&#xA;Notice that in this case `T::MaxAddressOwners` is a runtime constant. Is should be specified in the pallet config section. The example is described [here](https://github.com/chainify/pallet-nolik#installation).&#xD;&#xA;&#xD;&#xA;To add a value to the list you can use the code below:&#xD;&#xA;```&#xD;&#xA;#[pallet::weight(10_000)]&#xD;&#xA;pub fn add_owner(&#xD;&#xA;    origin: OriginFor&lt;T&gt;,&#xD;&#xA;    address: Vec&lt;u8&gt;,&#xD;&#xA;    owner: Option&lt;T::AccountId&gt;,&#xD;&#xA;    ) -&gt; DispatchResult {&#xD;&#xA;&#xD;&#xA;    let account = ensure_signed(origin)?;&#xD;&#xA;    let new_owner = match owner {&#xD;&#xA;        Some(res) =&gt; res,&#xD;&#xA;        None =&gt; account.clone()&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let has_owners = Self::has_owners(&amp;address);&#xD;&#xA;    if has_owners {&#xD;&#xA;        ensure!(Self::is_owned(&amp;new_owner, &amp;address) == false, &lt;Error&lt;T&gt;&gt;::AccountInOwners);&#xD;&#xA;        ensure!(Self::is_owned(&amp;account, &amp;address), &lt;Error&lt;T&gt;&gt;::AddressNotOwned);&#xD;&#xA;    }&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;    &lt;AddressOwners&lt;T&gt;&gt;::try_mutate(&amp;address, |owner_vec| {&#xD;&#xA;        owner_vec.try_push(new_owner.clone())&#xD;&#xA;    }).map_err(|_| &lt;Error&lt;T&gt;&gt;::ExceedMaxAddressOwners)?;&#xD;&#xA;&#xD;&#xA;    Self::deposit_event(Event::AddOwner(address, new_owner));&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The origin can be found [here](https://github.com/chainify/pallet-nolik/blob/main/src/lib.rs#L123)." ContentLicense="CC BY-SA 4.0" />
  <row Id="3342" PostHistoryTypeId="2" PostId="921" RevisionGUID="a93bad11-3f1f-4eef-b88c-212ce4240bb6" CreationDate="2022-03-20T08:06:53.677" UserId="1768" Text="I am trying to upgrade the substrate network from Substrate Commit (88c64e06471cc12aa9b25290f24d5566bcb5dd82) Aug 2021 to latest version polkadot-v0.9.17.&#xD;&#xA;&#xD;&#xA;When the updated node tries to sync from the network, it shows the following logs and panics.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Hash: given=81900b0feb7b205fbae0b1becbb65ffecd2cb0ee04c05b64c423c105c96a1724, expected=8ba92748e4c435cde701c1e426205b9a25cb5509300e2d9af30c841a271a8cba    &#xD;&#xA;&#xD;&#xA;====================&#xD;&#xA;&#xD;&#xA;Version: 3.0.0-d63622c0-aarch64-macos&#xD;&#xA;&#xD;&#xA;   0: backtrace::backtrace::trace&#xD;&#xA;   1: backtrace::capture::Backtrace::new&#xD;&#xA;   2: sp_panic_handler::set::{{closure}}&#xD;&#xA;   3: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:610:17&#xD;&#xA;   4: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:500:13&#xD;&#xA;   5: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:139:18&#xD;&#xA;   6: rust_begin_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5&#xD;&#xA;   7: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14&#xD;&#xA;   8: frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::final_checks&#xD;&#xA;   9: tracing::span::Span::in_scope&#xD;&#xA;  10: frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::execute_block&#xD;&#xA;  11: &lt;node_polkadex_runtime::Runtime as sp_api::runtime_decl_for_Core::Core&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,u32&gt;,node_polkadex_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_polkadex_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_polkadex_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;node_polkadex_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;node_polkadex_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;node_polkadex_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;node_polkadex_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;node_polkadex_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::execute_block&#xD;&#xA;  12: sp_api::runtime_decl_for_Core::execute_block_native_call_generator::{{closure}}&#xD;&#xA;  13: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  14: sc_executor::native_executor::WasmExecutor&lt;H&gt;::with_instance::{{closure}}&#xD;&#xA;  15: sc_executor::wasm_runtime::RuntimeCache::with_instance&#xD;&#xA;  16: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_aux&#xD;&#xA;  17: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_using_consensus_failure_handler&#xD;&#xA;  18: &lt;sc_service::client::call_executor::LocalCallExecutor&lt;Block,B,E&gt; as sc_client_api::call_executor::CallExecutor&lt;Block&gt;&gt;::contextual_call&#xD;&#xA;  19: &lt;sc_service::client::client::Client&lt;B,E,Block,RA&gt; as sp_api::CallApiAt&lt;Block&gt;&gt;::call_api_at&#xD;&#xA;  20: sp_api::runtime_decl_for_Core::execute_block_call_api_at&#xD;&#xA;  21: &lt;node_polkadex_runtime::RuntimeApiImpl&lt;__SR_API_BLOCK__,RuntimeApiImplCall&gt; as sp_api::Core&lt;__SR_API_BLOCK__&gt;&gt;::Core_execute_block_runtime_api_impl&#xD;&#xA;  22: sp_api::Core::execute_block_with_context&#xD;&#xA;  23: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  24: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  25: &lt;sc_consensus_babe::BabeBlockImport&lt;Block,Client,Inner&gt; as sc_consensus::block_import::BlockImport&lt;Block&gt;&gt;::import_block::{{closure}}&#xD;&#xA;  26: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  27: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  28: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  29: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  30: &lt;futures_util::future::future::map::Map&lt;Fut,F&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  31: &lt;sc_service::task_manager::prometheus_future::PrometheusFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  32: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  33: tokio::park::thread::CachedParkThread::block_on&#xD;&#xA;  34: tokio::runtime::handle::Handle::block_on&#xD;&#xA;  35: tokio::loom::std::unsafe_cell::UnsafeCell&lt;T&gt;::with_mut&#xD;&#xA;  36: tokio::runtime::task::harness::Harness&lt;T,S&gt;::poll&#xD;&#xA;  37: tokio::runtime::blocking::pool::Inner::run&#xD;&#xA;  38: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  39: core::ops::function::FnOnce::call_once{{vtable.shim}}&#xD;&#xA;  40: &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/alloc/src/boxed.rs:1694:9&#xD;&#xA;      &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/alloc/src/boxed.rs:1694:9&#xD;&#xA;      std::sys::unix::thread::Thread::new::thread_start&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys/unix/thread.rs:106:17&#xD;&#xA;  41: __pthread_deallocate&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'Storage root must match that calculated.', /Users/gautham/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:488&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am not able to understand what's causing the error.&#xD;&#xA;&#xD;&#xA;what is the proper procedure to upgrade the substrate dependencies of a production network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3344" PostHistoryTypeId="1" PostId="921" RevisionGUID="a93bad11-3f1f-4eef-b88c-212ce4240bb6" CreationDate="2022-03-20T08:06:53.677" UserId="1768" Text="Thread 'tokio-runtime-worker' panicked at 'Storage root must match that calculated" ContentLicense="CC BY-SA 4.0" />
  <row Id="3345" PostHistoryTypeId="3" PostId="921" RevisionGUID="a93bad11-3f1f-4eef-b88c-212ce4240bb6" CreationDate="2022-03-20T08:06:53.677" UserId="1768" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3346" PostHistoryTypeId="2" PostId="922" RevisionGUID="901f6fbd-335c-43ec-96a3-5cfb4386292e" CreationDate="2022-03-20T09:33:53.190" UserId="309" Text="The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C.&#xD;&#xA;C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B in order to use functions and types available in B and C (in pallet A, I do a `pub use pallet_B::pallet as B;` and in order to use  types defined in B, inside A/pub mod pallet{..}, I do: `use pallet_B::{Type0, Type1, Type2};`).&#xD;&#xA;Now, this all work fine except in one particular case: for Types defined in B as Type `Type_x&lt;T&gt;=&lt;T as C::Config&gt;::Type_y;`. If I try to import Type_x in A from B, I'm an Error saying that some traits from C::Config are missing, and this is what I don't understand. My perception is that if B already imported everything from C through tight-coupling, then there is no need to call C from A's pallet or A's runtime....What am I misunderstanding?&#xD;&#xA;For a concrete example of what I am trying to do, you can take a look at https://github.com/Fair-Squares/fair-squares/tree/structure_template/pallets&#xD;&#xA;A --&gt; Template, B--&gt;nft, C--&gt;orml-nft&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3348" PostHistoryTypeId="1" PostId="922" RevisionGUID="901f6fbd-335c-43ec-96a3-5cfb4386292e" CreationDate="2022-03-20T09:33:53.190" UserId="309" Text="pallet loose-coupling+tight-coupling, and missing traits" ContentLicense="CC BY-SA 4.0" />
  <row Id="3349" PostHistoryTypeId="3" PostId="922" RevisionGUID="901f6fbd-335c-43ec-96a3-5cfb4386292e" CreationDate="2022-03-20T09:33:53.190" UserId="309" Text="|pallet|substrate-node-template|tight-coupling|loose-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3350" PostHistoryTypeId="2" PostId="923" RevisionGUID="83a52d12-0d08-454f-bf78-47fe21739292" CreationDate="2022-03-20T09:35:03.613" UserId="167" Text="The error is saying that at some point your node computed an incorrect state-root compared to the one that was written in the block header by a validator who authored the block. The cause can be multiple mistakes, but I recommend the following: &#xD;&#xA;&#xD;&#xA;1. try and `purge-chain` and re-sync from scratch.&#xD;&#xA;2. make sure you have bumped your `spec_version` after upgrading.&#xD;&#xA;3. if in doubt, use `--execution Wasm` to not use the native runtime. The validators always use `Wasm` execution method for authoring, and you can probably sync with them if you also execute in `Wasm`.&#xD;&#xA;&#xD;&#xA;Having read my suggestions, I think 2 is the most plausible in your case. Also, not that if you managed to sync the chain with method 3 again, you are certainly doing something wrong regarding your runtime `spec_version` as well, and that needs fixing. " ContentLicense="CC BY-SA 4.0" />
  <row Id="3352" PostHistoryTypeId="5" PostId="922" RevisionGUID="66c76587-afd6-4557-9296-cebeee5e5516" CreationDate="2022-03-20T09:39:23.963" UserId="309" Comment="added 4 characters in body" Text="The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C.&#xD;&#xA;C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B in order to use functions and types available in B and C (in pallet A, I do a `pub use pallet_B::pallet as B;` and in order to use  types defined in B, inside A/pub mod pallet{..}, I do: `use pallet_B::{Type0, Type1, Type2};`).&#xD;&#xA;Now, this all work fine except in one particular case: for Types defined in B as `Type Type_x&lt;T&gt;=&lt;T as C::Config&gt;::Type_y;`. If I try to import Type_x in A from B, I get an Error saying that some traits from C::Config are missing, and this is what I don't understand. My perception is that if B is already accessing everything in C through tight-coupling, then there is no need to call C from A's pallet or A's runtime....What am I misunderstanding?&#xD;&#xA;For a concrete example of what I am trying to do, you can take a look at https://github.com/Fair-Squares/fair-squares/tree/structure_template/pallets&#xD;&#xA;A --&gt; Template, B--&gt;nft, C--&gt;orml-nft&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3353" PostHistoryTypeId="5" PostId="922" RevisionGUID="43d4c290-db5e-4b67-b287-980f94c5a504" CreationDate="2022-03-20T09:55:58.723" UserId="309" Comment="added 60 characters in body" Text="The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C.&#xD;&#xA;C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B in order to use functions and types available in B and C (in pallet A, I do a `pub use pallet_B::pallet as B;` and in order to use  types defined in B, inside A/pub mod pallet{..}, I do: `use pallet_B::{Type0, Type1, Type2};`).&#xD;&#xA;Now, this all work fine except in one particular case: for Types defined in B as `Type Type_x&lt;T&gt;=&lt;T as C::Config&gt;::Type_y;`. If I try to import Type_x in A from B, I get an Error saying that some traits from C::Config are missing, and this is what I don't understand. My perception is that if B is already accessing everything in C through tight-coupling, then there is no need to call C from A's pallet or A's runtime....What am I misunderstanding?&#xD;&#xA;For a concrete example of what I am trying to do, you can take a look at https://github.com/Fair-Squares/fair-squares/tree/structure_template/pallets&#xD;&#xA;A --&gt; Template, B--&gt;nft, C--&gt;orml-nft&#xD;&#xA;Make sure you're looking at the &quot;structure_template&quot; branch." ContentLicense="CC BY-SA 4.0" />
  <row Id="3354" PostHistoryTypeId="5" PostId="921" RevisionGUID="4afa7d8b-80f8-4de5-9a55-fd19114e3ab1" CreationDate="2022-03-20T10:12:58.027" UserId="83" Comment="Add links to commits mentioned. " Text="I am trying to upgrade the Substrate network from Substrate commit [88c64e06471cc12aa9b25290f24d5566bcb5dd82][1] from Sept 2021 to a recent version in Substrate branch [polkadot-v0.9.17][2] from Feb 2022.&#xD;&#xA;&#xD;&#xA;When the updated node tries to sync from the network, it shows the following logs and panics.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Hash: given=81900b0feb7b205fbae0b1becbb65ffecd2cb0ee04c05b64c423c105c96a1724, expected=8ba92748e4c435cde701c1e426205b9a25cb5509300e2d9af30c841a271a8cba    &#xD;&#xA;&#xD;&#xA;====================&#xD;&#xA;&#xD;&#xA;Version: 3.0.0-d63622c0-aarch64-macos&#xD;&#xA;&#xD;&#xA;   0: backtrace::backtrace::trace&#xD;&#xA;   1: backtrace::capture::Backtrace::new&#xD;&#xA;   2: sp_panic_handler::set::{{closure}}&#xD;&#xA;   3: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:610:17&#xD;&#xA;   4: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:500:13&#xD;&#xA;   5: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys_common/backtrace.rs:139:18&#xD;&#xA;   6: rust_begin_unwind&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/panicking.rs:498:5&#xD;&#xA;   7: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14&#xD;&#xA;   8: frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::final_checks&#xD;&#xA;   9: tracing::span::Span::in_scope&#xD;&#xA;  10: frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::execute_block&#xD;&#xA;  11: &lt;node_polkadex_runtime::Runtime as sp_api::runtime_decl_for_Core::Core&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,u32&gt;,node_polkadex_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion&lt;node_polkadex_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;node_polkadex_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;node_polkadex_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;node_polkadex_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;node_polkadex_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;node_polkadex_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;node_polkadex_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::execute_block&#xD;&#xA;  12: sp_api::runtime_decl_for_Core::execute_block_native_call_generator::{{closure}}&#xD;&#xA;  13: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  14: sc_executor::native_executor::WasmExecutor&lt;H&gt;::with_instance::{{closure}}&#xD;&#xA;  15: sc_executor::wasm_runtime::RuntimeCache::with_instance&#xD;&#xA;  16: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_aux&#xD;&#xA;  17: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_using_consensus_failure_handler&#xD;&#xA;  18: &lt;sc_service::client::call_executor::LocalCallExecutor&lt;Block,B,E&gt; as sc_client_api::call_executor::CallExecutor&lt;Block&gt;&gt;::contextual_call&#xD;&#xA;  19: &lt;sc_service::client::client::Client&lt;B,E,Block,RA&gt; as sp_api::CallApiAt&lt;Block&gt;&gt;::call_api_at&#xD;&#xA;  20: sp_api::runtime_decl_for_Core::execute_block_call_api_at&#xD;&#xA;  21: &lt;node_polkadex_runtime::RuntimeApiImpl&lt;__SR_API_BLOCK__,RuntimeApiImplCall&gt; as sp_api::Core&lt;__SR_API_BLOCK__&gt;&gt;::Core_execute_block_runtime_api_impl&#xD;&#xA;  22: sp_api::Core::execute_block_with_context&#xD;&#xA;  23: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  24: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  25: &lt;sc_consensus_babe::BabeBlockImport&lt;Block,Client,Inner&gt; as sc_consensus::block_import::BlockImport&lt;Block&gt;&gt;::import_block::{{closure}}&#xD;&#xA;  26: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  27: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  28: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  29: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  30: &lt;futures_util::future::future::map::Map&lt;Fut,F&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  31: &lt;sc_service::task_manager::prometheus_future::PrometheusFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  32: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  33: tokio::park::thread::CachedParkThread::block_on&#xD;&#xA;  34: tokio::runtime::handle::Handle::block_on&#xD;&#xA;  35: tokio::loom::std::unsafe_cell::UnsafeCell&lt;T&gt;::with_mut&#xD;&#xA;  36: tokio::runtime::task::harness::Harness&lt;T,S&gt;::poll&#xD;&#xA;  37: tokio::runtime::blocking::pool::Inner::run&#xD;&#xA;  38: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  39: core::ops::function::FnOnce::call_once{{vtable.shim}}&#xD;&#xA;  40: &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/alloc/src/boxed.rs:1694:9&#xD;&#xA;      &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/alloc/src/boxed.rs:1694:9&#xD;&#xA;      std::sys::unix::thread::Thread::new::thread_start&#xD;&#xA;             at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/std/src/sys/unix/thread.rs:106:17&#xD;&#xA;  41: __pthread_deallocate&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'Storage root must match that calculated.', /Users/gautham/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:488&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am not able to understand what's causing the error.&#xD;&#xA;&#xD;&#xA;What is the proper procedure to upgrade the Substrate dependencies of a production network?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/commit/88c64e06471cc12aa9b25290f24d5566bcb5dd82&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.17" ContentLicense="CC BY-SA 4.0" />
  <row Id="3361" PostHistoryTypeId="10" PostId="895" RevisionGUID="bd3723dd-cb75-4dba-94ba-84fd30310f51" CreationDate="2022-03-20T13:57:18.820" UserId="59" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:59,&quot;DisplayName&quot;:&quot;Catija&quot;}]}" />
  <row Id="3362" PostHistoryTypeId="2" PostId="925" RevisionGUID="c0a8827e-4a6a-487e-be7c-f0d0e9e7e3b2" CreationDate="2022-03-20T14:26:07.937" UserId="585" Text="For a parachain is it ok to have RPC and collator in one node? If not why? I'd love to hear some deeper explanation." ContentLicense="CC BY-SA 4.0" />
  <row Id="3364" PostHistoryTypeId="1" PostId="925" RevisionGUID="c0a8827e-4a6a-487e-be7c-f0d0e9e7e3b2" CreationDate="2022-03-20T14:26:07.937" UserId="585" Text="Is it ok to combine RPC node with collator together?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3365" PostHistoryTypeId="3" PostId="925" RevisionGUID="c0a8827e-4a6a-487e-be7c-f0d0e9e7e3b2" CreationDate="2022-03-20T14:26:07.937" UserId="585" Text="|parachain|rpc|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3366" PostHistoryTypeId="2" PostId="926" RevisionGUID="51a5df76-a455-4563-abf9-848d34fbc9b7" CreationDate="2022-03-20T14:41:51.297" UserId="213" Text="I want to keep some helper functions in a separate file. How can I do that?&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		fn get_citizen_accountid(citizenid: u128) -&gt;&#xD;&#xA;    		fn get_citizen_id(accountid: T::AccountId) -&gt; &#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="3368" PostHistoryTypeId="1" PostId="926" RevisionGUID="51a5df76-a455-4563-abf9-848d34fbc9b7" CreationDate="2022-03-20T14:41:51.297" UserId="213" Text="How can I have some of the functions in separate file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3369" PostHistoryTypeId="3" PostId="926" RevisionGUID="51a5df76-a455-4563-abf9-848d34fbc9b7" CreationDate="2022-03-20T14:41:51.297" UserId="213" Text="|rust|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3370" PostHistoryTypeId="2" PostId="927" RevisionGUID="f2c07be2-85cd-44de-8541-568be03161a5" CreationDate="2022-03-20T15:05:41.707" UserId="213" Text="Decided to use include! micro&#xD;&#xA;&#xD;&#xA;    include!(&quot;helperfunctions.rs&quot;);&#xD;&#xA;&#xD;&#xA;https://stackoverflow.com/a/35158265/1566713" ContentLicense="CC BY-SA 4.0" />
  <row Id="3372" PostHistoryTypeId="5" PostId="917" RevisionGUID="cc1e646d-5895-4c99-a3fc-9a8c1a7fa878" CreationDate="2022-03-20T15:20:00.743" UserId="28" Comment="added 9 characters in body" Text="There seems to be no difference here. You can probably simplify the code to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA; //slash fund     &#xD;&#xA; let imbalance = T::Currency::slash_reserved(&amp;to_punish, collateral).0;&#xD;&#xA; T::Slash::on_unbalanced(imbalance);&#xD;&#xA;&#xD;&#xA; //reward funds&#xD;&#xA; let r = T::Currency::deposit_into_existing(&amp;to_reward, reward).ok().unwrap();&#xD;&#xA; T::Reward::on_unbalanced(r);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Why it was written this way, I cannot speak to, but there is no magic happening or difference between `NegativeImbalanceOf` and `PositiveImbalanceOf`." ContentLicense="CC BY-SA 4.0" />
  <row Id="3373" PostHistoryTypeId="2" PostId="928" RevisionGUID="760b7e0c-290a-4277-8c3d-3bcad23b2b5f" CreationDate="2022-03-20T15:46:53.497" UserId="28" Text="The `#[pallet]` macro parts of your pallet code cannot be refactored into a separate file.&#xD;&#xA;&#xD;&#xA;So things like:&#xD;&#xA;&#xD;&#xA;* `#[pallet::storage]`&#xD;&#xA;* `#[pallet::config]`&#xD;&#xA;* `#[pallet::call]`&#xD;&#xA;* etc...&#xD;&#xA;&#xD;&#xA;Must all be within the:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet { ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And unfortunately, due to Rust not handling cross file macros, these must all be together.&#xD;&#xA;&#xD;&#xA;However, pretty much everything else can be refactored into separate files using [Rust's module system](https://doc.rust-lang.org/rust-by-example/mod.html).&#xD;&#xA;&#xD;&#xA;So just put your type definitions or additional function helpers into a separate file, and import it like so:&#xD;&#xA;&#xD;&#xA;**lib.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;mod extra;&#xD;&#xA;mod types;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet { ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**extra.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use crate::*;&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	pub fn do_stuff() -&gt; DispatchResult {&#xD;&#xA;        // ...&#xD;&#xA;        Ok(())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**types.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use codec::{Decode, Encode, MaxEncodedLen};&#xD;&#xA;use scale_info::TypeInfo;&#xD;&#xA;&#xD;&#xA;#[derive(Encode, Decode, PartialEq, Debug, Clone, Copy, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct MyStruct {&#xD;&#xA;	pub item1: u64,&#xD;&#xA;	pub item2: u64,&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3375" PostHistoryTypeId="5" PostId="922" RevisionGUID="3eff3568-c74e-4815-af10-bd2a6fc1d909" CreationDate="2022-03-20T15:55:24.613" UserId="28" Comment="spacing" Text="The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C.&#xD;&#xA;&#xD;&#xA;C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B in order to use functions and types available in B and C (in pallet A, I do a `pub use pallet_B::pallet as B;` and in order to use  types defined in B, inside A/pub mod pallet{..}, I do: `use pallet_B::{Type0, Type1, Type2};`).&#xD;&#xA;&#xD;&#xA;Now, this all work fine except in one particular case: for Types defined in B as `Type Type_x&lt;T&gt;=&lt;T as C::Config&gt;::Type_y;`. If I try to import Type_x in A from B, I get an Error saying that some traits from C::Config are missing, and this is what I don't understand. My perception is that if B is already accessing everything in C through tight-coupling, then there is no need to call C from A's pallet or A's runtime....What am I misunderstanding?&#xD;&#xA;&#xD;&#xA;For a concrete example of what I am trying to do, you can take a look at https://github.com/Fair-Squares/fair-squares/tree/structure_template/pallets&#xD;&#xA;&#xD;&#xA;A --&gt; Template, B--&gt;nft, C--&gt;orml-nft&#xD;&#xA;&#xD;&#xA;Make sure you're looking at the &quot;structure_template&quot; branch." ContentLicense="CC BY-SA 4.0" />
  <row Id="3376" PostHistoryTypeId="2" PostId="929" RevisionGUID="4ce32bac-67bb-42b4-a51c-a019aa6b88ec" CreationDate="2022-03-20T16:38:56.447" UserId="140" Text="I am trying to use `T::Call` (This type is defined in `frame&gt;&gt;system`) in storage and pallet dispatchable functions but getting below error. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `&lt;T as frame_system::Config&gt;::Call: WrapperTypeEncode` is not satisfied&#xD;&#xA;  --&gt; pallets/test/src/lib.rs:33:1&#xD;&#xA;   |&#xD;&#xA;33 | #[frame_support::pallet]&#xD;&#xA;   | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `&lt;T as frame_system::Config&gt;::Call`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `Encode` for `&lt;T as frame_system::Config&gt;::Call`&#xD;&#xA;note: required by a bound in `EncodeLike`&#xD;&#xA;  --&gt; /Users/sm/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-2.3.1/src/encode_like.rs:73:25&#xD;&#xA;   |&#xD;&#xA;73 | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;   |                         ^^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;   = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: consider further restricting the associated type&#xD;&#xA;   |&#xD;&#xA;68 |     #[pallet::storage, &lt;T as frame_system::Config&gt;::Call: WrapperTypeEncode]&#xD;&#xA;   |                      ++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I am able to use other `frame&gt;&gt;system` types like `AccountId` and `BlockNumber`. &#xD;&#xA;Can someone please help me to fix this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3378" PostHistoryTypeId="1" PostId="929" RevisionGUID="4ce32bac-67bb-42b4-a51c-a019aa6b88ec" CreationDate="2022-03-20T16:38:56.447" UserId="140" Text="Why can't we use `T::Call` in pallet like `T::AccountId` and `T::BlockNumber`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3379" PostHistoryTypeId="3" PostId="929" RevisionGUID="4ce32bac-67bb-42b4-a51c-a019aa6b88ec" CreationDate="2022-03-20T16:38:56.447" UserId="140" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3380" PostHistoryTypeId="2" PostId="930" RevisionGUID="a6c9187b-a2fb-44a8-8a8d-ac7b00ad5329" CreationDate="2022-03-20T17:19:43.480" UserId="87" Text="When you say &quot;updated node&quot; what exactly do you mean? &#xD;&#xA;&#xD;&#xA;In substrate networks all nodes are updated at once - as soon as the network upgrade transaction is executed. This is because every node will run the WASM blob from that transaction. Your underlying native code maybe out of date however.&#xD;&#xA;&#xD;&#xA;To upgrade your native code, it is never recommended to attempt to upgrade the Cargo manifest yourself, instead you should compile the correct branch/tag from Github.&#xD;&#xA;&#xD;&#xA;With regards to the error this should not happen, but it may indicate that the database has become corrupted or you have compiled your node incorrectly and have effectively created a fork of the existing network.&#xD;&#xA;&#xD;&#xA;If you have inadvertently created a fork, it is best to follow the steps set here to get the correct binary and purge the chain.&#xD;&#xA;&#xD;&#xA;Another way to avoid such issues is to use the official Docker image to run your node." ContentLicense="CC BY-SA 4.0" />
  <row Id="3382" PostHistoryTypeId="2" PostId="931" RevisionGUID="d9a518ea-8cbc-42f4-a5a7-6c7d7aab54cf" CreationDate="2022-03-20T18:15:35.453" UserId="699" Text="It depends of who can access the RPC part but mostly it is **not a good idea** if other people than you can access it.&#xD;&#xA;&#xD;&#xA;The role of the collator is to **produce blocks**, at a very specific moment (when receiving a new relay block) for a **very limited amount of time** (currently limited to 500ms).&#xD;&#xA;&#xD;&#xA;If during the time the collator is producing the block, most of the computer resources (not only CPU, but also memory, I/O, locks...) are taken by some RPC requests, it will reduce the probably to produce a full block and also reduce the probably to have your block sent in time to the relay.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3384" PostHistoryTypeId="2" PostId="932" RevisionGUID="4530381f-6f87-41f5-8099-a1388cd4a4ac" CreationDate="2022-03-20T18:25:26.520" UserId="233" Text="This is currently fiddlier than it needs to be. There will be a `Balances.Deposit` event citing the credited account (along with the normal XCM stuff, like `Xcm.UpwardMessageProcessed`), but for now you need to index both chaning and find the hash of each incoming message and match it with the hashes of outgoing messages.&#xD;&#xA;There's some work under way in `sidecar` related to this: https://github.com/paritytech/substrate-api-sidecar/issues/732" ContentLicense="CC BY-SA 4.0" />
  <row Id="3386" PostHistoryTypeId="5" PostId="914" RevisionGUID="ddcba943-c28e-47c9-a3d4-9b3d5410309e" CreationDate="2022-03-20T20:19:43.993" UserId="83" Comment="Grammar fix" Text="**To inspect the peer reputation of connected peers when running a collator node using the [substrate-node-template][1] it was necessary to log trace events from the logs:**&#xD;&#xA;```&#xD;&#xA;RUST_LOG=trace RUST_BACKTRACE=1 &lt;INSERT_PATH_NODE_BINARY&gt;/parachain-collator &lt;INSERT_OPTIONS_ARGS_SUBCOMMANDS&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Examples of various collator node logs that mention the peer reputation values ranges (i.e. `x to y`) include:**&#xD;&#xA;```&#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256&#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report : +100 to -156. Reason: Grandpa: Neighbor message    &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report &lt;PEER_NODE_IDENTITY&gt;: -16 to 82. Reason: Any transaction    &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report &lt;PEER_NODE_IDENTITY&gt;: -4096 to -4014. Reason: Bad transaction &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Fleeting &lt;PEER_NODE_IDENTITY&gt;: -156 -&gt; -153  &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Parachain] Fleeting &lt;PEER_NODE_IDENTITY&gt;: -156 -&gt; -153&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**To find out what the peer reputation values and reasons in the logs mean, it was necessary to refer to the Substrate source code and documentation:**&#xD;&#xA; &#xD;&#xA;A search for the keyword &quot;reputation&quot; in the Substrate Rust Docs [here][2] shows that peer reputation of a `PeerId` (peer node identity) is handled by the sc_network, sc_service, and sc_peerset Rust crates.&#xD;&#xA;&#xD;&#xA;In the documentation it says that reputation changes are accrued and applied to the `PeerId` sending a request. They are are stored in a vector of the Struct [`ReputationChange`][3], which is the *description of a reputation adjustment for a node*, which includes the fields *peer reputation delta (change)* value of type `i32` and the *reason for the reputation change* of type string.&#xD;&#xA;&#xD;&#xA;It shows the implementation includes a function `new_fatal(reason: &amp;'static str) -&gt; ReputationChange` that accepts a reason for the *new reputation change that forces minimum possible reputation*. Examples of the reasons for these reputation changes are in the Substrate source code as `Rep::new_fatal(&lt;REASON&gt;)`, such as when a peer sent us the same (block) request multiple times, when the peer is using an unsupported protocol version or when the peer roles that are trying to connect do not match each other, or when a peer id provides an invalid justification to import a block hash. However, since this function forces minimum possible reputation it doesn't need to accept a fields with a *peer reputation delta (change)* value.&#xD;&#xA;&#xD;&#xA;Whereas implementations of the function `new(value: i32, reason: &amp;'static str) -&gt; ReputationChange` in the Substrate source code as `Rep::new(&lt;PEER_REPUTATION_CHANGE&gt;, &lt;REASON&gt;)`, the first argument accepts a *peer reputation delta (change)* value, and the 2nd argument accepts the  *reason for the change*.&#xD;&#xA;&#xD;&#xA;**To interpret the trace log above** `...Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256`:&#xD;&#xA;&#xD;&#xA;We can see in the Substrate source code [here][4] that we call function [`add_reputation`][5] that *performs an arithmetic addition on the reputation score of that peer* with value [`DISCONNECT_REPUTATION_CHANGE`][6] of `-256` to reduce the reputation of a peer node by that value because we got disconnected from it.&#xD;&#xA;&#xD;&#xA;The peer reputation that is shown in the logs as `-256 to -256` is generated from the 2nd and 3rd arguments of the trace log code in the peerset [`dropped`][7] function of the Substrate source code, as shown below, where the 2nd argument is the reputation change to apply to the peer node that dropped, and the 3rd argument is the existing current reputation of that peer node.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;trace!(target: &quot;peerset&quot;, &quot;Dropping {}: {:+} to {}&quot;, peer_id, DISCONNECT_REPUTATION_CHANGE, entry.reputation());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So the trace log `&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256` can be interpreted in English as *&quot;at this date and time a relay chain node used the peerset crate to report in the network trace logs that peer node with identity `&lt;PEER_NODE_IDENTITY&gt;` got disconnected from the the relay chain so the peer had its reputation reduced by the reputation change value of -256, so its new reputation is -256&quot;*, so in this case prior to dropping the peer node had a reputation of 0.&#xD;&#xA;&#xD;&#xA;**To interpret the trace log above** `...Report &lt;PEER_NODE_IDENTITY&gt;: -4096 to -4014. Reason: Bad transaction`:&#xD;&#xA;&#xD;&#xA;If you do a search of the Substrate source code you will find the report is triggered by the `report_peer` function [here][8] when importing a bad transaction that was sent from a peer, where &#xD;&#xA;`BAD_TRANSACTION` is declared [here][9] with the reputation change to apply to the peer and the reason for the change `Rep = Rep::new(-(1 &lt;&lt; 12), &quot;Bad transaction&quot;)`, so since their new reputation after applying the reputation change to their reputation must have been greater than or equal to the `BANNED_THRESHOLD`, we don't drop that peer yet, but we report that their reputation was reduced by -4096 and their new reputation is -4014. &#xD;&#xA;So prior to applying that reputation change their reputation must have been x, where (x - 4096 = -4014), so x = 82.&#xD;&#xA;&#xD;&#xA;The reason why the reputation change is -4096, is because the `-(1 &lt;&lt; 12)` argument is provided to the `new` function as the peer reputation change value, which is a bitwise left shift operation (`&lt;&lt;`), where you get the binary value of 1 (0000000000001) then shift them left 12 times so it becomes 1000000000000, and then convert that binary value to its decimal equivalent of 4096.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_service/index.html?search=reputation&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_peerset/struct.ReputationChange.html&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L661&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/peersstate.rs#L396&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L54&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L662&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/master/client/network/src/transactions.rs#L422&#xD;&#xA;  [9]: https://github.com/paritytech/substrate/blob/master/client/network/src/transactions.rs#L84" ContentLicense="CC BY-SA 4.0" />
  <row Id="3387" PostHistoryTypeId="5" PostId="914" RevisionGUID="12b20859-f999-4d41-8fc8-1a71d6c69606" CreationDate="2022-03-20T20:25:03.263" UserId="83" Comment="More Grammar fixes" Text="**To inspect the peer reputation of connected peers when running a collator node using the [substrate-node-template][1] it was necessary to log trace events from the logs:**&#xD;&#xA;```&#xD;&#xA;RUST_LOG=trace RUST_BACKTRACE=1 &lt;INSERT_PATH_NODE_BINARY&gt;/parachain-collator &lt;INSERT_OPTIONS_ARGS_SUBCOMMANDS&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Examples of various collator node logs that mention the peer reputation values ranges (i.e. `x to y`) include:**&#xD;&#xA;```&#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256&#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report : +100 to -156. Reason: Grandpa: Neighbor message    &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report &lt;PEER_NODE_IDENTITY&gt;: -16 to 82. Reason: Any transaction    &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Report &lt;PEER_NODE_IDENTITY&gt;: -4096 to -4014. Reason: Bad transaction &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Fleeting &lt;PEER_NODE_IDENTITY&gt;: -156 -&gt; -153  &#xD;&#xA;&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Parachain] Fleeting &lt;PEER_NODE_IDENTITY&gt;: -156 -&gt; -153&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**To find out what the peer reputation values and reasons in the logs mean, it was necessary to refer to the Substrate source code and documentation:**&#xD;&#xA; &#xD;&#xA;A search for the keyword &quot;reputation&quot; in the Substrate Rust Docs [here][2] shows that peer reputation of a `PeerId` (peer node identity) is handled by the sc_network, sc_service, and sc_peerset Rust crates.&#xD;&#xA;&#xD;&#xA;In the documentation it says that reputation changes are accrued and applied to the `PeerId` sending a request. They are stored in a vector of the Struct [`ReputationChange`][3], which is the *description of a reputation adjustment for a node*, which includes the fields *peer reputation delta (change)* value of type `i32`, and the *reason for the reputation change* of type string.&#xD;&#xA;&#xD;&#xA;It shows the implementation includes a function `new_fatal(reason: &amp;'static str) -&gt; ReputationChange` that accepts a reason for the *new reputation change that forces minimum possible reputation*. Examples of the reasons for these reputation changes are in the Substrate source code as `Rep::new_fatal(&lt;REASON&gt;)`, such as when a peer sent us the same (block) request multiple times, when the peer is using an unsupported protocol version, when the peer roles that are trying to connect do not match each other, or when a peer id provides an invalid justification to import a block hash. However, since this function forces minimum possible reputation it doesn't need to accept a fields with a *peer reputation delta (change)* value.&#xD;&#xA;&#xD;&#xA;Whereas for implementations of the function `new(value: i32, reason: &amp;'static str) -&gt; ReputationChange` in the Substrate source code as `Rep::new(&lt;PEER_REPUTATION_CHANGE&gt;, &lt;REASON&gt;)`, the first argument accepts a *peer reputation delta (change)* value, and the 2nd argument accepts the  *reason for the change*.&#xD;&#xA;&#xD;&#xA;**To interpret the trace log above** `...Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256`:&#xD;&#xA;&#xD;&#xA;We can see in the Substrate source code [here][4] that we call function [`add_reputation`][5] that *performs an arithmetic addition on the reputation score of that peer* with value [`DISCONNECT_REPUTATION_CHANGE`][6] of `-256` to reduce the reputation of a peer node by that value because we got disconnected from it.&#xD;&#xA;&#xD;&#xA;The peer reputation that is shown in the logs as `-256 to -256` is generated from the 2nd and 3rd arguments of the trace log code in the peerset [`dropped`][7] function of the Substrate source code, as shown below, where the 2nd argument is the reputation change to apply to the peer node that dropped, and the 3rd argument is the existing current reputation of that peer node.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;trace!(target: &quot;peerset&quot;, &quot;Dropping {}: {:+} to {}&quot;, peer_id, DISCONNECT_REPUTATION_CHANGE, entry.reputation());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So the trace log `&lt;DATE_TIME&gt; TRACE tokio-runtime-worker peerset: [Relaychain] Dropping &lt;PEER_NODE_IDENTITY&gt;: -256 to -256` can be interpreted in English as *&quot;at this date and time a relay chain node used the peerset crate to report in the network trace logs that peer node with identity `&lt;PEER_NODE_IDENTITY&gt;` got disconnected from the relay chain so the peer had its reputation reduced by the reputation change value of -256, so its new reputation is -256&quot;*, so in this case prior to dropping the peer node had a reputation of 0.&#xD;&#xA;&#xD;&#xA;**To interpret the trace log above** `...Report &lt;PEER_NODE_IDENTITY&gt;: -4096 to -4014. Reason: Bad transaction`:&#xD;&#xA;&#xD;&#xA;If you do a search of the Substrate source code you will find the report is triggered by the `report_peer` function [here][8] when importing a bad transaction that was sent from a peer, where &#xD;&#xA;`BAD_TRANSACTION` is declared [here][9] with the reputation change to apply to the peer and the reason for the change `Rep = Rep::new(-(1 &lt;&lt; 12), &quot;Bad transaction&quot;)`, so since their new reputation after applying the reputation change to their reputation must have been greater than or equal to the `BANNED_THRESHOLD`, we don't drop that peer yet, but we report that their reputation was reduced by -4096 and their new reputation is -4014. &#xD;&#xA;So prior to applying that reputation change their reputation must have been x, where (x - 4096 = -4014), so x = 82.&#xD;&#xA;&#xD;&#xA;The reason why the reputation change is -4096, is because the `-(1 &lt;&lt; 12)` argument is provided to the `new` function as the peer reputation change value, which is a bitwise left shift operation (`&lt;&lt;`), where you get the binary value of 1 (0000000000001) then shift it left 12 times so it becomes 1000000000000, and then convert that binary value to its decimal equivalent of 4096.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_service/index.html?search=reputation&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_peerset/struct.ReputationChange.html&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L661&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/peersstate.rs#L396&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L54&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/master/client/peerset/src/lib.rs#L662&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/master/client/network/src/transactions.rs#L422&#xD;&#xA;  [9]: https://github.com/paritytech/substrate/blob/master/client/network/src/transactions.rs#L84" ContentLicense="CC BY-SA 4.0" />
  <row Id="3388" PostHistoryTypeId="2" PostId="933" RevisionGUID="74d2b18a-6032-4005-933b-1c6a07d7c977" CreationDate="2022-03-20T21:43:30.737" UserId="494" Text="from the [cumulus tutorial](https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/):&#xD;&#xA;&gt; ... You cannot, at this time, connect a parachain with any previous state to a relay chain. All parachains must start from block 0 on the relay chain...&#xD;&#xA;&#xD;&#xA;If that is the case, how does it work when a parachain's lease ends? How does the parachain re-connect to the relay without losing it previous state?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3390" PostHistoryTypeId="1" PostId="933" RevisionGUID="74d2b18a-6032-4005-933b-1c6a07d7c977" CreationDate="2022-03-20T21:43:30.737" UserId="494" Text="chain state after parachain slot renewal" ContentLicense="CC BY-SA 4.0" />
  <row Id="3391" PostHistoryTypeId="3" PostId="933" RevisionGUID="74d2b18a-6032-4005-933b-1c6a07d7c977" CreationDate="2022-03-20T21:43:30.737" UserId="494" Text="|parachain|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3392" PostHistoryTypeId="2" PostId="934" RevisionGUID="83bc353a-4f59-4534-9b6a-475fe1cf8fbe" CreationDate="2022-03-20T21:52:19.300" UserId="359" Text="The tutorial is technically wrong because it is possible to connect a parachain with previous state to a realychain.&#xD;&#xA;&#xD;&#xA;What is not possible (yet), is convert a solo chain to parachain without hardfork (and that will be solved in future soonish).&#xD;&#xA;&#xD;&#xA;Back to the question, basically a parachain/parathread have its header/state and wasm stored in relay chain and that will be used to verify new block produced by collator.&#xD;&#xA;&#xD;&#xA;When a parachain is downgraded into parathread, the header &amp; wasm is kept. So when it is upgraded back to parachain, the previous header &amp; wasm will be used. i.e. the chain just continue to run as nothing happened (just a very long block time between two blocks).&#xD;&#xA;&#xD;&#xA;That also means it is possible to register a parachain on a different relaychain, which is useful for testing purpose when the relaychain died due to the epoch issue. Then you can restart the relaychain, register the current head &amp; wasm of the parachain, update parachain to use new relaychain,and the parachain will continue to run with a new relaychain without loosing state." ContentLicense="CC BY-SA 4.0" />
  <row Id="3394" PostHistoryTypeId="2" PostId="935" RevisionGUID="e4ed6116-98d0-4438-b287-184f6c8dd569" CreationDate="2022-03-20T22:04:29.050" UserId="28" Text="The `Call` type from `frame_system` is not the call that you want to use in this scenario. You should look at how the [Multisig pallet](https://github.com/paritytech/substrate/blob/master/frame/multisig/src/lib.rs) handles working with the `Call` type.&#xD;&#xA;&#xD;&#xA; 1. You must define a new `Call` type in your Pallet config which represents the outer call of the whole runtime:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;	    /// The overarching call type.&#xD;&#xA;	    type Call: Parameter&#xD;&#xA;		    + Dispatchable&lt;Origin = Self::Origin, PostInfo = PostDispatchInfo&gt;&#xD;&#xA;		    + GetDispatchInfo&#xD;&#xA;		    + From&lt;frame_system::Call&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;        // ...&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA; 2. When referencing this type, you should disambiguate which `Call` you want to use, by referring to it by: `&lt;T as Config&gt;::Call&gt;`. Where `Config` represents your pallet's config.&#xD;&#xA;&#xD;&#xA; 3. When using the `Call` as a parameter input into an extrinsic, you should wrap it in a `Box` so that it can be placed on the heap and referenced by pointer, which can help since a `Call` can be very large in size: `Box&lt;&lt;T as Config&gt;::Call&gt;`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3396" PostHistoryTypeId="5" PostId="929" RevisionGUID="bee09f90-4d97-42ad-974e-2ae142453222" CreationDate="2022-03-20T22:05:13.143" UserId="28" Comment="deleted 2 characters in body" Text="I am trying to use `T::Call` (This type is defined in `frame_system`) in storage and pallet dispatchable functions but getting below error. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `&lt;T as frame_system::Config&gt;::Call: WrapperTypeEncode` is not satisfied&#xD;&#xA;  --&gt; pallets/test/src/lib.rs:33:1&#xD;&#xA;   |&#xD;&#xA;33 | #[frame_support::pallet]&#xD;&#xA;   | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `&lt;T as frame_system::Config&gt;::Call`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `Encode` for `&lt;T as frame_system::Config&gt;::Call`&#xD;&#xA;note: required by a bound in `EncodeLike`&#xD;&#xA;  --&gt; /Users/sm/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-2.3.1/src/encode_like.rs:73:25&#xD;&#xA;   |&#xD;&#xA;73 | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;   |                         ^^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;   = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: consider further restricting the associated type&#xD;&#xA;   |&#xD;&#xA;68 |     #[pallet::storage, &lt;T as frame_system::Config&gt;::Call: WrapperTypeEncode]&#xD;&#xA;   |                      ++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I am able to use other `frame_system` types like `AccountId` and `BlockNumber`. &#xD;&#xA;Can someone please help me to fix this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3397" PostHistoryTypeId="6" PostId="929" RevisionGUID="bee09f90-4d97-42ad-974e-2ae142453222" CreationDate="2022-03-20T22:05:13.143" UserId="28" Comment="deleted 2 characters in body" Text="|types|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3398" PostHistoryTypeId="2" PostId="936" RevisionGUID="758c1608-5060-42df-baff-8d8d191b9db2" CreationDate="2022-03-20T22:10:20.007" UserId="28" Text="When a parachain lease ends, it becomes a parathread, and its existing state root and Wasm stays on the relay chain.&#xD;&#xA;&#xD;&#xA;When the parathread protocol is complete, a chain in this state would still be able to produce new blocks, but it may need to pay per block, rather than being guaranteed to get a new block for free like a parachain.&#xD;&#xA;&#xD;&#xA;As such, a parathread can also simply win a new auction and be re-upgraded to a parachain, and in this case, everything moved forward like normal.&#xD;&#xA;&#xD;&#xA;So your statement:&#xD;&#xA;&#xD;&#xA;&gt; How does the parachain re-connect to the relay without losing it previous state?&#xD;&#xA;&#xD;&#xA;Assumes that some state is lost, but this is not true.&#xD;&#xA;&#xD;&#xA;If a parathread was fully offboard, and all state deleted, it would be possible to re-onboard with the old state root and Wasm, and things would appear to work just like before. The only potential issue here would be that they may have a different `ParaId`, and so other chains that interacted with them would need to migrate their past storage, or we could use governance to try and let parachains re-register their old ID." ContentLicense="CC BY-SA 4.0" />
  <row Id="3400" PostHistoryTypeId="5" PostId="936" RevisionGUID="bfa368d1-09ed-4f59-9dd6-5fe97415b946" CreationDate="2022-03-20T22:36:06.687" UserId="28" Comment="edited body" Text="When a parachain lease ends, it becomes a parathread, and its existing state root and Wasm stays on the relay chain.&#xD;&#xA;&#xD;&#xA;When the parathread protocol is complete, a chain in this state would still be able to produce new blocks, but it may need to pay per block, rather than being guaranteed to get a new block for free like a parachain.&#xD;&#xA;&#xD;&#xA;As such, a parathread can also simply win a new auction and be re-upgraded to a parachain, and in this case, everything moves forward like normal.&#xD;&#xA;&#xD;&#xA;So your statement:&#xD;&#xA;&#xD;&#xA;&gt; How does the parachain re-connect to the relay without losing it previous state?&#xD;&#xA;&#xD;&#xA;Assumes that some state is lost, but this is not true.&#xD;&#xA;&#xD;&#xA;If a parathread was fully offboard, and all state deleted, it would be possible to re-onboard with the old state root and Wasm, and things would appear to work just like before. The only potential issue here would be that they may have a different `ParaId`, and so other chains that interacted with them would need to migrate their past storage, or we could use governance to try and let parachains re-register their old ID." ContentLicense="CC BY-SA 4.0" />
  <row Id="3401" PostHistoryTypeId="2" PostId="937" RevisionGUID="f1764e1e-8eff-4e8f-bdf8-a89dd56642e2" CreationDate="2022-03-20T22:39:16.680" UserId="359" Text="We have built this tool to find XCM events cross different chains https://parachain-utilities.vercel.app/xcm&#xD;&#xA;&#xD;&#xA;Code: https://github.com/AcalaNetwork/parachain-utilities/blob/3b1a1f6add16a66f9995dfe4fa70fe6ede31b2f4/src/components/Xcm/Xcm.tsx#L118&#xD;&#xA;&#xD;&#xA;It basically tries search relaychain blocks to look for relevant events and decode it.&#xD;&#xA;&#xD;&#xA;More description can be found here: https://github.com/AcalaNetwork/parachain-utilities/issues/8&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3403" PostHistoryTypeId="5" PostId="922" RevisionGUID="29c94a67-1830-4694-bcbc-df2921f15290" CreationDate="2022-03-21T00:53:42.173" UserId="309" Comment="added 2427 characters in body" Text="The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C.&#xD;&#xA;&#xD;&#xA;C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B in order to use functions and types available in B and C (in pallet A, I do a `pub use pallet_B::pallet as B;` and in order to use  types defined in B, inside A/pub mod pallet{..}, I do: `use pallet_B::{Type0, Type1, Type2};`).&#xD;&#xA;&#xD;&#xA;Now, this all work fine except in one particular case: for Types defined in B as `Type Type_x&lt;T&gt;=&lt;T as C::Config&gt;::Type_y;`. If I try to import Type_x in A from B, I get an Error saying that some traits from C::Config are missing, and this is what I don't understand. My perception is that if B is already accessing everything in C through tight-coupling, then there is no need to call C from A's pallet or A's runtime....What am I misunderstanding?&#xD;&#xA;&#xD;&#xA;For a concrete example of what I am trying to do, you can take a look at https://github.com/Fair-Squares/fair-squares/tree/structure_template/pallets&#xD;&#xA;&#xD;&#xA;A --&gt; Template, B--&gt;nft, C--&gt;orml-nft&#xD;&#xA;&#xD;&#xA;Make sure you're looking at the &quot;structure_template&quot; branch.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;I will try to explain using the real code. several files are involved so it's hard for me to post something minimal &amp; useable.&#xD;&#xA;I need to use types found in the Litentry nft-Pallet, which is tightly coupled to the orml-nft pallet. these types are defined in the Litentry pallet for example as : &#xD;&#xA;&#xD;&#xA;    pub type ClassIdOf&lt;T&gt; = &lt;T as orml_nft::Config&gt;::ClassId;&#xD;&#xA;&#xD;&#xA;and a dummy type I added to confirm my assumption that orml is the culprid:&#xD;&#xA;&#xD;&#xA;    pub type Barak&lt;T&gt; = &lt;T as frame_system::Config&gt;::BlockNumber;&#xD;&#xA;&#xD;&#xA;You can see that Barak does not use orml. Now I include the Litentry pallet in my cargo.toml as &quot;pallet_nft&quot;, and in my pallet I do 2 things: &#xD;&#xA;&#xD;&#xA;    pub use pallet_nft::pallet as NftL;&#xD;&#xA;    use pallet_nft::{Barak, ClassData, ClassIdOf, TokenIdOf,Properties,CID,ClassType};&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, to see the error I need a function in the pallet that calls the Litentry pallet. First the code below which is only using Barak&lt;T&gt; will work:&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {      &#xD;&#xA;          #[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;          pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32, acc:AccountIdOf&lt;T&gt; ,rent:BalanceOf&lt;T&gt;,cd:CID,prop:Properties,start:Barak&lt;T&gt;) -&gt; DispatchResult &#xD;&#xA;          { &#xD;&#xA;    let dev=Investor::&lt;T,u32&gt;::new(acc,something);         &#xD;&#xA;             Investor::&lt;T,u32&gt;::contribute(origin,dev.account_id,rent)?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But, If I add a TokenIdOf as parameter:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {      &#xD;&#xA;          #[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;          pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32, acc:AccountIdOf&lt;T&gt; ,rent:BalanceOf&lt;T&gt;,cd:CID,prop:Properties,start:Barak&lt;T&gt;,cl:TokenIdOf&lt;T&gt; ) -&gt; DispatchResult &#xD;&#xA;          { &#xD;&#xA;    let dev=Investor::&lt;T,u32&gt;::new(acc,something);         &#xD;&#xA;             Investor::&lt;T,u32&gt;::contribute(origin,dev.account_id,rent)?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I get:&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `T: orml_nft::module::Config` is not satisfied&#xD;&#xA;       --&gt; pallets/template/src/lib.rs:137:144&#xD;&#xA;        |&#xD;&#xA;    137 | ...Properties,start:Barak&lt;T&gt;,cl:TokenIdOf&lt;T&gt; )-&gt; DispatchResult &#xD;&#xA;        |                                 ^^^^^^^^^^^^ the trait `orml_nft::module::Config` is not implemented for `T`&#xD;&#xA;        |&#xD;&#xA;    help: consider further restricting this bound&#xD;&#xA;        |&#xD;&#xA;    133 |    impl&lt;T: Config + orml_nft::module::Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        |                   ++++++++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;The only parameter in the function refering to orml and coming for the Litentry pallet is `cl:TokenIdOf&lt;T&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="3404" PostHistoryTypeId="5" PostId="922" RevisionGUID="8d73cd2c-e44f-4bd2-aeb3-bf58af3c2ddd" CreationDate="2022-03-21T01:15:13.680" UserId="309" Comment="added 252 characters in body" Text="The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C.&#xD;&#xA;&#xD;&#xA;C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B in order to use functions and types available in B and C (in pallet A, I do a `pub use pallet_B::pallet as B;` and in order to use  types defined in B, inside A/pub mod pallet{..}, I do: `use pallet_B::{Type0, Type1, Type2};`).&#xD;&#xA;&#xD;&#xA;Now, this all work fine except in one particular case: for Types defined in B as `Type Type_x&lt;T&gt;=&lt;T as C::Config&gt;::Type_y;`. If I try to import Type_x in A from B, I get an Error saying that some traits from C::Config are missing, and this is what I don't understand. My perception is that if B is already accessing everything in C through tight-coupling, then there is no need to call C from A's pallet or A's runtime....What am I misunderstanding?&#xD;&#xA;&#xD;&#xA;For a concrete example of what I am trying to do, you can take a look at https://github.com/Fair-Squares/fair-squares/tree/structure_template/pallets&#xD;&#xA;&#xD;&#xA;A --&gt; Template, B--&gt;nft, C--&gt;orml-nft&#xD;&#xA;&#xD;&#xA;Make sure you're looking at the &quot;structure_template&quot; branch.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;I will try to explain using the real code. several files are involved so it's hard for me to post something minimal &amp; useable.&#xD;&#xA;I need to use types found in the Litentry nft-Pallet, which is tightly coupled to the orml-nft pallet. these types are defined in the Litentry pallet for example as : &#xD;&#xA;&#xD;&#xA;    pub type ClassIdOf&lt;T&gt; = &lt;T as orml_nft::Config&gt;::ClassId;&#xD;&#xA;&#xD;&#xA;and a dummy type I added to confirm my assumption that orml is the culprid:&#xD;&#xA;&#xD;&#xA;    pub type Barak&lt;T&gt; = &lt;T as frame_system::Config&gt;::BlockNumber;&#xD;&#xA;&#xD;&#xA;You can see that Barak does not use orml. Now I include the Litentry pallet in my cargo.toml as &quot;pallet_nft&quot;, and in my pallet I do 2 things: &#xD;&#xA;&#xD;&#xA;    pub use pallet_nft::pallet as NftL;&#xD;&#xA;    use pallet_nft::{Barak, ClassData, ClassIdOf, TokenIdOf,Properties,CID,ClassType};&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, to see the error I need a function in the pallet that calls the Litentry pallet. First the code below which is only using Barak&lt;T&gt; will work:&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {      &#xD;&#xA;          #[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;          pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32, acc:AccountIdOf&lt;T&gt; ,rent:BalanceOf&lt;T&gt;,cd:CID,prop:Properties,start:Barak&lt;T&gt;) -&gt; DispatchResult &#xD;&#xA;          { &#xD;&#xA;    let dev=Investor::&lt;T,u32&gt;::new(acc,something);         &#xD;&#xA;             Investor::&lt;T,u32&gt;::contribute(origin,dev.account_id,rent)?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But, If I add a TokenIdOf as parameter:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {      &#xD;&#xA;          #[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;          pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32, acc:AccountIdOf&lt;T&gt; ,rent:BalanceOf&lt;T&gt;,cd:CID,prop:Properties,start:Barak&lt;T&gt;,cl:TokenIdOf&lt;T&gt; ) -&gt; DispatchResult &#xD;&#xA;          { &#xD;&#xA;    let dev=Investor::&lt;T,u32&gt;::new(acc,something);         &#xD;&#xA;             Investor::&lt;T,u32&gt;::contribute(origin,dev.account_id,rent)?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I get:&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `T: orml_nft::module::Config` is not satisfied&#xD;&#xA;       --&gt; pallets/template/src/lib.rs:137:144&#xD;&#xA;        |&#xD;&#xA;    137 | ...Properties,start:Barak&lt;T&gt;,cl:TokenIdOf&lt;T&gt; )-&gt; DispatchResult &#xD;&#xA;        |                                 ^^^^^^^^^^^^ the trait `orml_nft::module::Config` is not implemented for `T`&#xD;&#xA;        |&#xD;&#xA;    help: consider further restricting this bound&#xD;&#xA;        |&#xD;&#xA;    133 |    impl&lt;T: Config + orml_nft::module::Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        |                   ++++++++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;The only parameter in the function refering to orml and coming for the Litentry pallet is `cl:TokenIdOf&lt;T&gt;`.&#xD;&#xA;Also, in the Litentry pallet we already have:&#xD;&#xA;&#xD;&#xA;    pub trait Config:&#xD;&#xA;    		frame_system::Config&#xD;&#xA;    		+ orml_nft::Config&lt;&#xD;&#xA;    			ClassData = ClassData&lt;BlockNumberOf&lt;Self&gt;, ClassIdOf&lt;Self&gt;&gt;,&#xD;&#xA;    			TokenData = TokenData,&#xD;&#xA;    		&gt;&#xD;&#xA;    	{...}&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3405" PostHistoryTypeId="5" PostId="876" RevisionGUID="21d769f0-ff1f-4857-9548-344c7b867ef6" CreationDate="2022-03-21T02:27:38.673" UserId="699" Comment="added 8 characters in body" Text="It is hard to fully understand the reason from the screenshots but I can see some important details:&#xD;&#xA;&#xD;&#xA;Your node is **producing the same block again and again** (see `Imported #8102`).&#xD;&#xA;This means there is no issue producing it but the validator is not receiving it or not able to verify it. Let see the possible reasons&#xD;&#xA;&#xD;&#xA;## Possible issue #1: trouble sending the block ##&#xD;&#xA;The **PoV** (Proof of Validity, that needs to be sent to the validator to verify the block) is significant (see lines `storage_proof: 1992.018...kb`, `Compressed PoV size: 1334.125kb`). If your network connection with the validator is slow or with high latency (far away from each other), the validator might not receive the block in time and not be able to include it.&#xD;&#xA;&#xD;&#xA;This usually auto-resolve by itself once a new (closer/faster) validator(s) is assigned to verify your parachain block.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Possible issue #2: trouble verifying the block in time ##&#xD;&#xA;The **block execution time** in your logs are low (see `Prepared block for proposing at #8102 (10ms)`), which is good, so I would **discard this issue** in your case. It is very unlikely for the validator to not have enough time to execute the block verification. A parachain block is currently allowed 500ms but if the validator(s) assigned to your parachain is slow, this could lead to the block not being included.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Possible issue #3: Invalid parachain code in the relay ##&#xD;&#xA;Another possibility is if the **`parachain code` in the relay is not matching** the code in your parachain. This can happen when the parachain and the relay are planning to upgrade the parachain code at a different relay block number.&#xD;&#xA;To avoid this issue, avoid performing the upgrade within a `scheduled extrinsic` (like using `system.setCode` in a proposal or in the pallet scheduler).&#xD;&#xA;&#xD;&#xA;If this is the case, you will need help of the relaychain maintainer to update the parachain code on the relay.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3408" PostHistoryTypeId="2" PostId="938" RevisionGUID="f8ee94ec-9eab-4ce4-b616-8a1231d767a6" CreationDate="2022-03-21T03:28:03.643" UserId="251" Text="You can find it in the polkadot apps &gt; network &gt; parachains:&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZWcpk.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3410" PostHistoryTypeId="1" PostId="938" RevisionGUID="f8ee94ec-9eab-4ce4-b616-8a1231d767a6" CreationDate="2022-03-21T03:28:03.643" UserId="251" Text="What's the meaning of non-voters?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3411" PostHistoryTypeId="3" PostId="938" RevisionGUID="f8ee94ec-9eab-4ce4-b616-8a1231d767a6" CreationDate="2022-03-21T03:28:03.643" UserId="251" Text="|parachain|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3412" PostHistoryTypeId="2" PostId="939" RevisionGUID="41c2c0a2-f053-46d8-ac72-9465b09729ce" CreationDate="2022-03-21T03:48:02.177" UserId="283" Text="It's a representation of how many validators the relay chain is waiting for a message from that they have their assigned piece of the parachain's block data. More specifically, it's a representation of the number of '0' bits in this storage entry: https://github.com/paritytech/polkadot/blob/f113e3758a1f9ee9b9dbd621a816559d8157257e/runtime/parachains/src/inclusion/mod.rs#L81&#xD;&#xA;&#xD;&#xA;See https://polkadot.network/blog/polkadot-v1-0-sharding-and-economic-security/ for a deeper explanation of the stages of parachain consensus.&#xD;&#xA;&#xD;&#xA;After a parachain block is backed on-chain, the relay-chain waits for validators to attest to the availability of the data necessary to check the validity of the parachain block. Validators do this by issuing bitfields, where each bit represents an availability core. Availability Cores are where parachain blocks pending availability are kept. The parachain block's data is erasure-coded, with each validator having an assigned chunk, and validators set bits to '1' when they have stored their assigned chunk. This bitfield mechanism enables validators to attest to having chunks from many parachains at once in a single signed message. Validators' bitfields form the rows of a matrix, while the storage entry I linked above can be thought of as a column in the matrix, accumulating the corresponding bits from multiple validators.&#xD;&#xA;&#xD;&#xA;In the example in your image, the relay chain is waiting on 200 validators to submit their bits. Once 2/3 of the validators have submitted '1' bits, the parachain block leaves the availability core and the next block from the parachain can be accepted." ContentLicense="CC BY-SA 4.0" />
  <row Id="3415" PostHistoryTypeId="6" PostId="714" RevisionGUID="4ec855c6-29da-49a9-a89f-5a0cbb7a19ee" CreationDate="2022-03-21T04:21:50.647" UserId="494" Comment="question is not frontier related" Text="|smart-contract|solang|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3416" PostHistoryTypeId="24" PostId="714" RevisionGUID="4ec855c6-29da-49a9-a89f-5a0cbb7a19ee" CreationDate="2022-03-21T04:21:50.647" Comment="Proposed by 714 approved by 316 edit id of 97" ContentLicense="CC BY-SA 4.0" />
  <row Id="3417" PostHistoryTypeId="2" PostId="940" RevisionGUID="802a2c7c-bb86-4f54-bbe1-cf692a215d6f" CreationDate="2022-03-21T07:21:34.417" UserId="1717" Text="After following [parachain guides](https://docs.substrate.io/tutorials/v3/cumulus/rococo/) and setting up a parachain node, we'd like to initiate a temporary slot on rococo testnet for our parachain (`ParaId 2004`).&#xD;&#xA;&#xD;&#xA;According to the document, we should request it on [Parachain Technical matrix channel](https://matrix.to/#/#parachain-technical:matrix.parity.io). Since the channel is currently read-only now. Is there any place to request a parachain slot on Rococo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3419" PostHistoryTypeId="1" PostId="940" RevisionGUID="802a2c7c-bb86-4f54-bbe1-cf692a215d6f" CreationDate="2022-03-21T07:21:34.417" UserId="1717" Text="Where to request a temporary parachain slot on Rococo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3420" PostHistoryTypeId="3" PostId="940" RevisionGUID="802a2c7c-bb86-4f54-bbe1-cf692a215d6f" CreationDate="2022-03-21T07:21:34.417" UserId="1717" Text="|parachain|rococo|slot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3421" PostHistoryTypeId="2" PostId="941" RevisionGUID="7235cd6e-50ae-4ef9-b749-6c3b2e7d4515" CreationDate="2022-03-21T07:38:43.140" UserId="515" Text="There is a way to convert [u8; 32] to AccountId&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;T::AccountId::decode(&amp;mut &amp;bytes[..]).unwrap_or_default();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but how to do the reverse?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let sender: T::AccountId = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;let account_bytes: [u8; 32] = sender; //mismatched types&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3423" PostHistoryTypeId="1" PostId="941" RevisionGUID="7235cd6e-50ae-4ef9-b749-6c3b2e7d4515" CreationDate="2022-03-21T07:38:43.140" UserId="515" Text="How to get bytes [u8; 32] from AccountId?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3424" PostHistoryTypeId="3" PostId="941" RevisionGUID="7235cd6e-50ae-4ef9-b749-6c3b2e7d4515" CreationDate="2022-03-21T07:38:43.140" UserId="515" Text="|substrate-node|accountdata|convert|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3426" PostHistoryTypeId="5" PostId="729" RevisionGUID="536deedb-ea08-41e4-8f75-45a0faef8e46" CreationDate="2022-03-21T08:00:47.223" UserId="129" Comment="add explanation" Text="In the [substrate archive wiki][1], they showed how to archive the polkadot chain's data. Now I want to get other chains' data (like a substrate template node or Astar, Moonbeam, etc). How can I do that?&#xD;&#xA;&#xD;&#xA;In the `node-template-archive/archive.toml` file, I changed the network rockdb directory appropriately.&#xD;&#xA;This is the command I used for Shiden network (Astar testnet)&#xD;&#xA;```&#xD;&#xA;./node-template-archive -c /home/minhnd/Documents/substrate/substrate-archive/bin/node-template-archive/archive.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The log:&#xD;&#xA;```&#xD;&#xA;[14:51] DEBUG Archive Config: ArchiveConfig { chain: ChainConfig { data_path: Some(&quot;/home/minhnd/Documents/substrate/Astar/freshdi_shibuya/chains/shiden/db/full&quot;), cache_size: 128, rocksdb_secondary_path: Some(&quot;./substrate_archive/rocksdb_secondary&quot;), spec: Some(ChainSpec(name = &quot;Development&quot;, id = &quot;dev&quot;)) }, runtime: RuntimeConfig { exec_method: Interpreted, block_workers: 4, wasm_pages: Some(2048), wasm_runtime_overrides: None, code_substitutes: {}, storage_mode: BlockBody }, database: Some(DatabaseConfig { url: &quot;postgres://localhost?dbname=polkadot-archive&amp;user=postgres&amp;password=123&quot; }), control: ControlConfig { task_timeout: 20, max_block_load: 100000, task_url: &quot;amqp://localhost:5672&quot;, storage_indexing: true }, log: LoggerConfig { std: Debug, file: None }, wasm_tracing: Some(TracingConfig { targets: &quot;wasm_tracing,pallet,frame,state&quot;, folder: None }) }&#xD;&#xA;[14:51] INFO Open RocksDB at /home/minhnd/Documents/substrate/Astar/freshdi_shibuya/chains/shiden/db/full, state column budget: 115 MiB, others(11) column cache: 1 MiB&#xD;&#xA;[14:51] DEBUG DB Opened blockchain db, fetched best = 0xe1b8d4c234012350df9aa4ff6b26585d8b7ad431929d4bb958d280f403069492 (313726)&#xD;&#xA;[14:51] DEBUG DB Opened blockchain db, fetched final = 0xf1cf9022c7ebb34b162d5b5e34e705a5a740b2d0ecc1009fb89023e62a488108 (0)&#xD;&#xA;[14:51] DEBUG DB Opened blockchain db, fetched final_state = 0xf1cf9022c7ebb34b162d5b5e34e705a5a740b2d0ecc1009fb89023e62a488108 (0)&#xD;&#xA;[14:51] DEBUG block_gap=None&#xD;&#xA;[14:51] DEBUG DB Opened blockchain db, fetched best = 0xe1b8d4c234012350df9aa4ff6b26585d8b7ad431929d4bb958d280f403069492 (313726)&#xD;&#xA;[14:51] DEBUG DB Opened blockchain db, fetched final = 0xf1cf9022c7ebb34b162d5b5e34e705a5a740b2d0ecc1009fb89023e62a488108 (0)&#xD;&#xA;[14:51] DEBUG DB Opened blockchain db, fetched final_state = 0xf1cf9022c7ebb34b162d5b5e34e705a5a740b2d0ecc1009fb89023e62a488108 (0)&#xD;&#xA;[14:51] DEBUG block_gap=None&#xD;&#xA;[14:51] DEBUG allocator being destroyed, max_total_size 416, max_bumper 1104128&#xD;&#xA;[14:51] DEBUG Prepared new runtime version Some(RuntimeVersion { spec_name: RuntimeString::Owned(&quot;shiden&quot;), impl_name: RuntimeString::Owned(&quot;shiden&quot;), authoring_version: 1, spec_version: 1, impl_version: 0, apis: [([223, 106, 203, 104, 153, 7, 96, 155], 3), ([55, 227, 151, 252, 124, 145, 245, 228], 1), ([64, 254, 58, 212, 1, 248, 149, 154], 5), ([210, 188, 152, 151, 238, 208, 143, 21], 2), ([247, 139, 39, 139, 229, 63, 69, 76], 2), ([188, 157, 137, 144, 79, 91, 146, 63], 1), ([55, 200, 187, 19, 80, 169, 162, 168], 1), ([171, 60, 5, 114, 41, 31, 235, 139], 1), ([234, 147, 227, 241, 111, 61, 105, 98], 1)], transaction_version: 1, state_version: 0 }) in 86 ms.&#xD;&#xA;[14:51] DEBUG Allocated WASM instance 1/4&#xD;&#xA;[14:51] INFO Running archive for  `shiden`, implementation `shiden`. Latest known runtime version: 1. Latest finalized block 0xf1cf…8108 ️&#xD;&#xA;[14:51] DEBUG No cached session for DNSNameRef(&quot;localhost&quot;)&#xD;&#xA;[14:51] DEBUG Not resuming any session&#xD;&#xA;[14:51] DEBUG No cached session for DNSNameRef(&quot;localhost&quot;)&#xD;&#xA;[14:51] DEBUG Not resuming any session&#xD;&#xA;[14:51] DEBUG Using ciphersuite TLS13_AES_256_GCM_SHA384&#xD;&#xA;[14:51] DEBUG Not resuming&#xD;&#xA;[14:51] DEBUG TLS1.3 encrypted extensions: []&#xD;&#xA;[14:51] DEBUG ALPN protocol is None&#xD;&#xA;[14:51] DEBUG Ticket saved&#xD;&#xA;[14:51] DEBUG Ticket saved&#xD;&#xA;[14:51] INFO relation &quot;_sqlx_migrations&quot; already exists, skipping&#xD;&#xA;Error: Expected chain polkadot got shiden&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So I got this `Expected chain polkadot got shiden` error message. I really don't know what to do and how to solve this.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-archive/wiki" ContentLicense="CC BY-SA 4.0" />
  <row Id="3428" PostHistoryTypeId="2" PostId="942" RevisionGUID="9b9286c3-baa5-4123-b014-d9e56096dc34" CreationDate="2022-03-21T08:06:46.517" UserId="145" Text="`From&lt;AccountId32&gt;` is implemented for `[u8; 32]` as you can see [here][1] in the Substrate code, so you can do:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let account_bytes: [u8; 32] = sender.into();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/94dfe152e61e42cd27844a65165cfdedde5232eb/primitives/core/src/crypto.rs#L551" ContentLicense="CC BY-SA 4.0" />
  <row Id="3431" PostHistoryTypeId="2" PostId="943" RevisionGUID="7fc22143-3eac-4222-aafc-6b47d8758d23" CreationDate="2022-03-21T08:53:23.287" UserId="1731" Text="Not good for production use. Threadpool is already occupied with collator tasks&#xD;&#xA;&#xD;&#xA;But its okay for testing, won't be any difference to try rpc calls on polkadot.js.org&#xD;&#xA;&#xD;&#xA;If you have less than 2k ws connection and 5k/s http requests it will be fine" ContentLicense="CC BY-SA 4.0" />
  <row Id="3433" PostHistoryTypeId="2" PostId="944" RevisionGUID="b97c9232-25cd-4ccb-9242-624dca582560" CreationDate="2022-03-21T09:43:14.367" UserId="87" Text="I have been upgrading my parachain many times over the last few days with no issue at all. I have been using Polkadotjs Apps for this also running on my local machine.&#xD;&#xA;&#xD;&#xA;My process is that I use the `Sudo user` in the `Sudo pallet` and by selecting the `Sudo(Call)` extrinsic I can select the `ParachainSystem` pallet.&#xD;&#xA;&#xD;&#xA;From there I can authorize a hash of the `x_runtime.compact.compressed.wasm`, before enacting the upgrade. In every case until now it has worked and I have been able to test the new functionality I added.&#xD;&#xA;&#xD;&#xA;However, my latest upgrade attempt gives me this &quot;Incomplete Execution&quot; error (I note a spelling error in the actual message). The actual file size is `570,166 bytes` so should be well within the limits mentioned in [this issue][1] . I am not sure what this warning means exactly - but I can confirm that the upgrade does not happen. &#xD;&#xA;&#xD;&#xA;Below are two screenshots of the message and the resulting event message.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/784/why-is-the-rococo-maxcodesize-too-small-to-do-adequate-incremental-runtime-upg&#xD;&#xA;  [2]: https://i.stack.imgur.com/2RWjF.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/QtkbL.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3435" PostHistoryTypeId="1" PostId="944" RevisionGUID="b97c9232-25cd-4ccb-9242-624dca582560" CreationDate="2022-03-21T09:43:14.367" UserId="87" Text="What is the Incomplete Execution error on parachain upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3436" PostHistoryTypeId="3" PostId="944" RevisionGUID="b97c9232-25cd-4ccb-9242-624dca582560" CreationDate="2022-03-21T09:43:14.367" UserId="87" Text="|parachain|polkadot-js|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3437" PostHistoryTypeId="2" PostId="945" RevisionGUID="b811ab6c-2215-4c93-8a0f-c0abb2a623d8" CreationDate="2022-03-21T09:56:00.677" UserId="73" Text="While I don't know for sure what the &quot;incomplete execution&quot; error means. I think we can conclude that from your given context it means that the actual sudo transaction was executed successfully, but the wrapped call returned an error. As you show in your screenshot the error is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Module {&#xD;&#xA;  index: 1,&#xD;&#xA;  error: 0,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This error means that a pallet has returned an error. The `index` is the index of the pallet in the runtime. `System` is always at `index == 0` and it is safe to assume that you have `ParachainSystem` at `index == 1`. So, we need to check the [error type][1] in parachain system:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::error]&#xD;&#xA;pub enum Error&lt;T&gt; {&#xD;&#xA;	/// Attempt to upgrade validation function while existing upgrade pending&#xD;&#xA;	OverlappingUpgrades,&#xD;&#xA;	/// Polkadot currently prohibits this parachain from upgrading its validation function&#xD;&#xA;	ProhibitedByPolkadot,&#xD;&#xA;	/// The supplied validation function has compiled into a blob larger than Polkadot is&#xD;&#xA;	/// willing to run&#xD;&#xA;	TooBig,&#xD;&#xA;	/// The inherent which supplies the validation data did not run this block&#xD;&#xA;	ValidationDataNotAvailable,&#xD;&#xA;	/// The inherent which supplies the host configuration did not run this block&#xD;&#xA;	HostConfigurationNotAvailable,&#xD;&#xA;	/// No validation function upgrade is currently scheduled.&#xD;&#xA;	NotScheduled,&#xD;&#xA;	/// No code upgrade has been authorized.&#xD;&#xA;	NothingAuthorized,&#xD;&#xA;	/// The given code upgrade has not been authorized.&#xD;&#xA;	Unauthorized,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `error: 0` means that is was the variant at `0` in the given enum, so it should be `OverlappingUpgrades`. This means that you already have scheduled a  runtime upgrade. For Parachains the runtime upgrades are not applied directly, they need to wait until the relay chain has given the go to apply the runtime upgrade. This minimum time between registering the runtime upgrade and when it is applied is the `validation_upgrade_delay` of the relay chain [`HostConfiguration`][2]. If you are running a test local relay chain network, you can override this value at genesis or also later at runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/680c5738d642b8e14bc8d09059ea17c99d320b4f/pallets/parachain-system/src/lib.rs#L427-L446&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/f113e3758a1f9ee9b9dbd621a816559d8157257e/runtime/parachains/src/configuration.rs#L44-L244" ContentLicense="CC BY-SA 4.0" />
  <row Id="3439" PostHistoryTypeId="2" PostId="946" RevisionGUID="6ca64c4f-312e-4dc3-8406-62f7433a109c" CreationDate="2022-03-21T10:06:43.127" UserId="429" Text="I'm trying to access data that I'm storing through the RPC off-chain endpoint.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I've used OffchainStorage::get() with default config but not getting any data back.&#xD;&#xA;&#xD;&#xA;Is there anything do I need to set up explicitly to extract the stored data?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VXQcR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3441" PostHistoryTypeId="1" PostId="946" RevisionGUID="6ca64c4f-312e-4dc3-8406-62f7433a109c" CreationDate="2022-03-21T10:06:43.127" UserId="429" Text="How to extract data fom Offchain stoage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3442" PostHistoryTypeId="3" PostId="946" RevisionGUID="6ca64c4f-312e-4dc3-8406-62f7433a109c" CreationDate="2022-03-21T10:06:43.127" UserId="429" Text="|offchain|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3443" PostHistoryTypeId="2" PostId="947" RevisionGUID="11c9c20b-13e9-4523-9e85-25601ea2f820" CreationDate="2022-03-21T10:37:18.117" UserId="3" Text="A `DispatchError` will refer to a pallet and a member of the pallet's `Error` enum by index:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;DispatchError: {&quot;module&quot;:{&quot;index&quot;:123,&quot;error&quot;:456}}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It's tiresome and error-prone to look these up manually. How can I automate the process using the polkadot-js API or the web interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3445" PostHistoryTypeId="1" PostId="947" RevisionGUID="11c9c20b-13e9-4523-9e85-25601ea2f820" CreationDate="2022-03-21T10:37:18.117" UserId="3" Text="What's a convenient way to look up a `DispatchError` in polkadot-js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3446" PostHistoryTypeId="3" PostId="947" RevisionGUID="11c9c20b-13e9-4523-9e85-25601ea2f820" CreationDate="2022-03-21T10:37:18.117" UserId="3" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3447" PostHistoryTypeId="2" PostId="948" RevisionGUID="03cd62d2-70f5-4ee5-ab21-da5b12fdbac9" CreationDate="2022-03-21T11:33:50.873" UserId="474" Text="Subxt v0.19.0 has now been released, which includes https://github.com/paritytech/subxt/pull/471. This makes the relevant types `Send`, which hopefully resolves your issue :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3450" PostHistoryTypeId="10" PostId="688" RevisionGUID="aa216037-5d6d-4081-af6a-635419bdfc26" CreationDate="2022-03-21T11:42:53.490" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;}]}" />
  <row Id="3451" PostHistoryTypeId="2" PostId="949" RevisionGUID="eca15f69-a8dc-4255-88d2-c798ad97bd75" CreationDate="2022-03-21T12:22:11.913" UserId="272" Text="In this code : &#xD;&#xA;```rust&#xD;&#xA;sp_npos_elections::generate_solution_type!(&#xD;&#xA;	#[compact]&#xD;&#xA;	pub struct NposCompactSolution16::&lt;&#xD;&#xA;		VoterIndex = u32,&#xD;&#xA;		TargetIndex = u16,&#xD;&#xA;		Accuracy = sp_runtime::PerU16,&#xD;&#xA;	&gt;(16)&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;pub const MAX_NOMINATIONS: u32 =&#xD;&#xA;	&lt;NposCompactSolution16 as sp_npos_elections::NposSolution&gt;::LIMIT as u32;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What does `MAX_NOMINATIONS` stand for and what is it's value? Is it `16` from the `NposCompactSolution16.0`? Also, why is this useful? When should we change this value?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3453" PostHistoryTypeId="1" PostId="949" RevisionGUID="eca15f69-a8dc-4255-88d2-c798ad97bd75" CreationDate="2022-03-21T12:22:11.913" UserId="272" Text="What is MAX_NOMINATIONS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3454" PostHistoryTypeId="3" PostId="949" RevisionGUID="eca15f69-a8dc-4255-88d2-c798ad97bd75" CreationDate="2022-03-21T12:22:11.913" UserId="272" Text="|election|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3456" PostHistoryTypeId="2" PostId="950" RevisionGUID="7a251f56-406b-4c05-9c54-cb2bbb2d7119" CreationDate="2022-03-21T13:44:44.637" UserId="223" Text="The docs for `generate_solution_type` say:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Moreover, the maximum number of edges per voter (distribution per assignment) also need to be&#xD;&#xA;/// specified. Attempting to convert from/to an assignment with more distributions will fail.&#xD;&#xA;///&#xD;&#xA;/// For example, the following generates a public struct with name `TestSolution` with `u16` voter&#xD;&#xA;/// type, `u8` target type and `Perbill` accuracy with maximum of 4 edges per voter.&#xD;&#xA;///&#xD;&#xA;/// ```&#xD;&#xA;/// # use frame_election_provider_solution_type::generate_solution_type;&#xD;&#xA;/// # use sp_arithmetic::per_things::Perbill;&#xD;&#xA;/// generate_solution_type!(pub struct TestSolution::&lt;&#xD;&#xA;///     VoterIndex = u16,&#xD;&#xA;///     TargetIndex = u8,&#xD;&#xA;///     Accuracy = Perbill,&#xD;&#xA;/// &gt;(4));&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that this type is generic to a graph based election algorithm where a voter may elect multiple targets. With this in mind in the context of the staking pallet, the phrase “edges per voter” can be understood as the the maximum number of targets (validators), that a nominator can nominate; in other words the max nominations that a nominator can have.&#xD;&#xA;&#xD;&#xA;The two primary considerations when configuring this value are:&#xD;&#xA; &#xD;&#xA;1. How does changing this value affect the worst case space / memory complexity of operations on nominators?&#xD;&#xA;2. How does changing the value affect the election algorithms ability to achieve its goals (i.e. maximize total stake, maximize min staked validator’s exposure, minimize difference between exposure of max and min staked validators).&#xD;&#xA;&#xD;&#xA;To address (1), one should consider how many total nominators they want in the system. Essentially, increasing the `MAX_NOMINATIONS` will increase the worst case space complexity of each nominator; so as the `MAX_NOMINATIONS` increase, the number of nominators the system can handle will decrease. For example see the discussion [here](https://github.com/paritytech/polkadot/pull/5000#issue-1153832534) about lower the max number of voters on Kusama.&#xD;&#xA;&#xD;&#xA;To address (2), one should consider that hypothetically a phragmen election algorithm can do a better job of creating an optimal set when nominators have selected a wide array of validators (in practice the increase of max nominations is not guaranteed to lead to an increase in solution quality). As an extreme, imagine a max nominations of 1: the algorithm would practically do nothing and we would have the equivalent of a DPoS outcome. &#xD;&#xA;&#xD;&#xA;Also keep in mind that nominator accounts make no sybil resistance guarantees; a low max nominations may encourage some users to break up 1 nominator account into several nominator accounts so they can select a wider variety of validators, thus increasing the nominator space complexity per &quot;real&quot; user." ContentLicense="CC BY-SA 4.0" />
  <row Id="3458" PostHistoryTypeId="2" PostId="951" RevisionGUID="003d7351-e2ca-4f8a-8160-cd289acc525f" CreationDate="2022-03-21T13:54:16.080" UserId="205" Text="From the following function I can read the `frame_system` events:&#xD;&#xA;```&#xD;&#xA;let events = frame_system::Pallet::&lt;T&gt;::read_events_no_consensus();&#xD;&#xA;```&#xD;&#xA;the above provides me the following example array:&#xD;&#xA;```&#xD;&#xA;		EventRecord {&#xD;&#xA;			phase: Phase::ApplyExtrinsic(1),&#xD;&#xA;			event: Event::Balances(Event::Withdraw {&#xD;&#xA;				who: d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d(5 GrwvaEF...),&#xD;&#xA;				amount: 125000107&#xD;&#xA;			}),&#xD;&#xA;			topics: []&#xD;&#xA;		},&#xD;&#xA;		EventRecord {&#xD;&#xA;			phase: Phase::ApplyExtrinsic(1),&#xD;&#xA;			event: Event::SubstrateKitties(Event::Created {&#xD;&#xA;				kitty: [177, 185, 56, 80, 240, 56, 24, 57, 112, 17, 186, 6, 89, 221, 25, 98],&#xD;&#xA;				owner: d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d(5 GrwvaEF...)&#xD;&#xA;			}),&#xD;&#xA;			topics: []&#xD;&#xA;		},&#xD;&#xA;		EventRecord {&#xD;&#xA;			phase: Phase::ApplyExtrinsic(1),&#xD;&#xA;			event: Event::System(Event::ExtrinsicSuccess {&#xD;&#xA;				dispatch_info: DispatchInfo {&#xD;&#xA;					weight: 0,&#xD;&#xA;					class: DispatchClass::Normal,&#xD;&#xA;					pays_fee: Pays::Yes&#xD;&#xA;				}&#xD;&#xA;			}),&#xD;&#xA;			topics: []&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;I would like to be able to parse/match ONLY the ``Event::SubstrateKitties(Event::Created)`` events.&#xD;&#xA;&#xD;&#xA;I also reviewed the link below and ``Shawn Tabrizi`` recommendation related to ``assert_last_event`` use cases:&#xD;&#xA;https://stackoverflow.com/questions/64199998/converting-between-event-types&#xD;&#xA;&#xD;&#xA;However, I still haven't found a proper way to do this. Below is a simplify example of my latest code so far:&#xD;&#xA;```&#xD;&#xA;		#[pallet::hooks]&#xD;&#xA;		impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;			/// Block finalization&#xD;&#xA;			fn on_finalize(_n: BlockNumberFor&lt;T&gt;) {&#xD;&#xA;				let events = frame_system::Pallet::&lt;T&gt;::read_events_no_consensus();&#xD;&#xA;		&#xD;&#xA;				events.iter().for_each(|EventRecord { event, .. }| {&#xD;&#xA;					match event {&#xD;&#xA;						// What should I write here?? =&gt; {&#xD;&#xA;							log::info(&quot;SubstrateKitties event: {:?}&quot;, event);&#xD;&#xA;						},&#xD;&#xA;						_ =&gt; {&#xD;&#xA;							log::info!(&quot;Ignoring system events.&quot;);&#xD;&#xA;						},&#xD;&#xA;					}					&#xD;&#xA;				});&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3460" PostHistoryTypeId="1" PostId="951" RevisionGUID="003d7351-e2ca-4f8a-8160-cd289acc525f" CreationDate="2022-03-21T13:54:16.080" UserId="205" Text="How to parse/match a specific frame_system event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3461" PostHistoryTypeId="3" PostId="951" RevisionGUID="003d7351-e2ca-4f8a-8160-cd289acc525f" CreationDate="2022-03-21T13:54:16.080" UserId="205" Text="|events|offchain|parse|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3462" PostHistoryTypeId="2" PostId="952" RevisionGUID="2a2cd71a-3d1d-416a-a33a-09c8d3e3aaf2" CreationDate="2022-03-21T13:58:02.910" UserId="249" Text="You can review the steps outlined here I believe:&#xD;&#xA;https://docs.substrate.io/tutorials/v3/cumulus/rococo/#request-your-parachain-slot&#xD;&#xA;&#xD;&#xA;**Steps mentioned in docs:**&#xD;&#xA;&#xD;&#xA; 1. In the Polkadot-JS Apps for Rococo, go to Developer -&gt; Extrinsics.&#xD;&#xA; 2. Select the account with enough ROC balance that you wish to use to&#xD;&#xA;    submit a transaction with. &#xD;&#xA; 3. Select the assignedSlots pallet. &#xD;&#xA; 4. Choose the assignTempParachainSlot function. &#xD;&#xA; 5. Insert your reserved para ID. Make sure this matches the one you reserved from the previous section! &#xD;&#xA; 6. Select Current for the LeasePeriodStart. If the current&#xD;&#xA;    slot is full, you will be assigned the next available slot. &#xD;&#xA; 7. Sign and submit the transaction." ContentLicense="CC BY-SA 4.0" />
  <row Id="3464" PostHistoryTypeId="2" PostId="953" RevisionGUID="bee2ddca-ae22-4d26-968f-1f6107c10c1a" CreationDate="2022-03-21T14:11:10.723" UserId="360" Text="I suspect that an extrinsic caused the block production to stall. It's status remains at &quot;broadcast&quot; and no new blocks will be produced. To be sure I'd like to remove it from the tx pool on all nodes/collators. How can I do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3466" PostHistoryTypeId="1" PostId="953" RevisionGUID="bee2ddca-ae22-4d26-968f-1f6107c10c1a" CreationDate="2022-03-21T14:11:10.723" UserId="360" Text="how can I purge all pending extrinsics in the transaction pool" ContentLicense="CC BY-SA 4.0" />
  <row Id="3467" PostHistoryTypeId="3" PostId="953" RevisionGUID="bee2ddca-ae22-4d26-968f-1f6107c10c1a" CreationDate="2022-03-21T14:11:10.723" UserId="360" Text="|parachain|extrinsic|stalled|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3468" PostHistoryTypeId="2" PostId="954" RevisionGUID="15d3a735-4e93-48f2-8124-e08592fd0ec5" CreationDate="2022-03-21T14:34:52.343" UserId="1789" Text="I was following this guide:&#xD;&#xA;&#xD;&#xA;Configuring Genesis for Balances&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/how-to-guides/v3/basics/genesis/&#xD;&#xA;&#xD;&#xA;but got this error:&#xD;&#xA;&#xD;&#xA;associated type Balance not found for T, associated type Balance not found&#xD;&#xA;&#xD;&#xA;So where/what is the definition for this?&#xD;&#xA;&#xD;&#xA;I think it is somewhere inside https://docs.substrate.io/rustdocs/latest/pallet_balances/index.html&#xD;&#xA;&#xD;&#xA;I tried this: type Balance: balances::Config::Balance;&#xD;&#xA;&#xD;&#xA;then failed: expected trait, found associated type balances::Config::Balance not a trait&#xD;&#xA;&#xD;&#xA;Please advise. Thank you&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3470" PostHistoryTypeId="1" PostId="954" RevisionGUID="15d3a735-4e93-48f2-8124-e08592fd0ec5" CreationDate="2022-03-21T14:34:52.343" UserId="1789" Text="T::Balance ... associated type `Balance` not found for `T`" ContentLicense="CC BY-SA 4.0" />
  <row Id="3471" PostHistoryTypeId="3" PostId="954" RevisionGUID="15d3a735-4e93-48f2-8124-e08592fd0ec5" CreationDate="2022-03-21T14:34:52.343" UserId="1789" Text="|polkadot|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3472" PostHistoryTypeId="5" PostId="952" RevisionGUID="00b7b24b-5f4d-432d-9fcf-cff3c0b745ed" CreationDate="2022-03-21T14:42:16.973" UserId="249" Comment="added 130 characters in body" Text="You can review the steps outlined here I believe:&#xD;&#xA;https://docs.substrate.io/tutorials/v3/cumulus/rococo/#request-your-parachain-slot&#xD;&#xA;&#xD;&#xA;Keep in mind I am pretty sure you still need to request someone from Parity to initiate the slot lease as it requires `sudo`. &#xD;&#xA;&#xD;&#xA;**Steps mentioned in docs:**&#xD;&#xA;&#xD;&#xA; 1. In the Polkadot-JS Apps for Rococo, go to Developer -&gt; Extrinsics.&#xD;&#xA; 2. Select the account with enough ROC balance that you wish to use to&#xD;&#xA;    submit a transaction with. &#xD;&#xA; 3. Select the assignedSlots pallet. &#xD;&#xA; 4. Choose the assignTempParachainSlot function. &#xD;&#xA; 5. Insert your reserved para ID. Make sure this matches the one you reserved from the previous section! &#xD;&#xA; 6. Select Current for the LeasePeriodStart. If the current&#xD;&#xA;    slot is full, you will be assigned the next available slot. &#xD;&#xA; 7. Sign and submit the transaction." ContentLicense="CC BY-SA 4.0" />
  <row Id="3473" PostHistoryTypeId="5" PostId="904" RevisionGUID="8f1f48ea-7cc6-45d3-8f65-2ad8debbfed4" CreationDate="2022-03-21T14:42:27.257" UserId="523" Comment="deleted 28 characters in body" Text="subscan provide convert tool [here](https://kusama.subscan.io/tools/format_transform)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3474" PostHistoryTypeId="5" PostId="953" RevisionGUID="34cf3324-9898-4f04-bf1d-767f58694014" CreationDate="2022-03-21T14:42:46.827" UserId="360" Comment="added 224 characters in body" Text="I suspect that an extrinsic caused the block production to stall. It's status remains at &quot;broadcast&quot; and no new blocks will be produced. To be sure I'd like to remove it from the tx pool on all nodes/collators. How can I do that?&#xD;&#xA;&#xD;&#xA;I did find the rpc `author_removeExtrinsic` which should remove and ban an extrinsic by hash. But how would I learn the hash of my extrinsic? if I call `author_pendingExtrinsics` I get the decoded extrinsic, not the hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="3475" PostHistoryTypeId="5" PostId="952" RevisionGUID="3b036a3f-adb0-40d8-a083-8dcd713e9569" CreationDate="2022-03-21T14:49:35.837" UserId="249" Comment="added 190 characters in body" Text="This does not directly answer your question as I am not sure where to request a slot now that the channel is closed and I am pretty sure you still need to request someone from Parity to initiate the slot lease as it requires `sudo`. However I figured it would be good to link the correct docs/steps for future reference.&#xD;&#xA;&#xD;&#xA;Docs for requesting parachain slot on Rococo:&#xD;&#xA;https://docs.substrate.io/tutorials/v3/cumulus/rococo/#request-your-parachain-slot&#xD;&#xA;&#xD;&#xA;**Steps mentioned in docs:**&#xD;&#xA;&#xD;&#xA; 1. In the Polkadot-JS Apps for Rococo, go to Developer -&gt; Extrinsics.&#xD;&#xA; 2. Select the account with enough ROC balance that you wish to use to&#xD;&#xA;    submit a transaction with. &#xD;&#xA; 3. Select the assignedSlots pallet. &#xD;&#xA; 4. Choose the assignTempParachainSlot function. &#xD;&#xA; 5. Insert your reserved para ID. Make sure this matches the one you reserved from the previous section! &#xD;&#xA; 6. Select Current for the LeasePeriodStart. If the current&#xD;&#xA;    slot is full, you will be assigned the next available slot. &#xD;&#xA; 7. Sign and submit the transaction." ContentLicense="CC BY-SA 4.0" />
  <row Id="3476" PostHistoryTypeId="2" PostId="955" RevisionGUID="f4ebc9b3-fd4e-4c95-9a65-42c57397678f" CreationDate="2022-03-21T14:59:36.743" UserId="28" Text="Substrate chains are designed to be completely modular and without any assumptions about the underlying blockchain. This means that Balances are not necessarily a first class citizen within your runtime. Instead, if you want to use Balances in your chain, you need to follow a few common steps which you will see in most pallets.&#xD;&#xA;&#xD;&#xA; 1. Configure your chain to use a `Currency`:&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// Currency type for this pallet.&#xD;&#xA;		type Currency: ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;			+ LockableCurrency&lt;Self::AccountId, Moment = Self::BlockNumber&gt;;&#xD;&#xA;&#xD;&#xA;        // ...&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;    Note you may not need both `ReservableCurrency` and `LockableCurrency`, it depends on how you want to play with the currency.&#xD;&#xA;&#xD;&#xA; 2. Create a simple type alias to make it easier to access the `Balance` type inside of `Currency`:&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;    type BalanceOf&lt;T&gt; =&#xD;&#xA;	    &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA; 3. Use this type alias wherever you want to use the Balance type:&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;    fn transfer(to: T::AccountId, from: T::Account, amount: BalanceOf&lt;T&gt;) -&gt; DispatchResult { ... }&#xD;&#xA;    ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3478" PostHistoryTypeId="2" PostId="956" RevisionGUID="913990fe-284d-45f2-b294-ff1e4a64eb78" CreationDate="2022-03-21T15:00:59.553" UserId="280" Text="For polkadot-js, you can retrieve more information about the error via the event and the `findMetaError` api:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;events&#xD;&#xA;// find/filter for failed events&#xD;&#xA;.filter(({ event }) =&gt;&#xD;&#xA;  api.events.system.ExtrinsicFailed.is(event)&#xD;&#xA;)&#xD;&#xA;// we know that data for system.ExtrinsicFailed is&#xD;&#xA;// (DispatchError, DispatchInfo)&#xD;&#xA;.forEach(({ event: { data: [error, info] } }) =&gt; {&#xD;&#xA;  if (error.isModule) {&#xD;&#xA;    // for module errors, we have the section indexed, lookup&#xD;&#xA;    const decoded = api.registry.findMetaError(error.asModule);&#xD;&#xA;    const { docs, method, section } = decoded;&#xD;&#xA;&#xD;&#xA;    console.log(`${section}.${method}: ${docs.join(' ')}`);&#xD;&#xA;  } else {&#xD;&#xA;    // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;    console.log(error.toString());&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This was extracted from the polkadot-js cookbook recipe [&quot;How do I get the decoded enum for an ExtrinsicFailed event&quot;](https://polkadot.js.org/docs/api/cookbook/tx/#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event)." ContentLicense="CC BY-SA 4.0" />
  <row Id="3480" PostHistoryTypeId="4" PostId="946" RevisionGUID="83a3393e-c4da-4605-bc62-90a58aca2229" CreationDate="2022-03-21T15:09:28.540" UserId="429" Comment="edited title" Text="How to extract data from Offchain stoage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3481" PostHistoryTypeId="5" PostId="956" RevisionGUID="8d25909f-9f22-481d-92ad-366f89ada13a" CreationDate="2022-03-21T15:09:57.037" UserId="280" Comment="remove unnecessary deconstruction" Text="For polkadot-js, you can retrieve more information about the error via the event and the `findMetaError` api:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;events&#xD;&#xA;// find/filter for failed events&#xD;&#xA;.filter(({ event }) =&gt;&#xD;&#xA;  api.events.system.ExtrinsicFailed.is(event)&#xD;&#xA;)&#xD;&#xA;// we know that data for system.ExtrinsicFailed is&#xD;&#xA;// (DispatchError, DispatchInfo)&#xD;&#xA;.forEach(({ event: { data: [error] } }) =&gt; {&#xD;&#xA;    if (error.isModule) {&#xD;&#xA;    // for module errors, we have the section indexed, lookup&#xD;&#xA;    const decoded = api.registry.findMetaError(error.asModule)&#xD;&#xA;    const { docs, method, section } = decoded&#xD;&#xA;    console.log(`${section}.${method}: ${docs.join(' ')}`)&#xD;&#xA;    } else {&#xD;&#xA;        // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;        console.log(error.toString())&#xD;&#xA;    }&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This was extracted from the polkadot-js cookbook recipe [&quot;How do I get the decoded enum for an ExtrinsicFailed event&quot;](https://polkadot.js.org/docs/api/cookbook/tx/#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event).&#xD;&#xA;&#xD;&#xA;Please note that for SUDO you have to apply a different filtering process:&#xD;&#xA;```js&#xD;&#xA;events&#xD;&#xA;// We know this tx should result in `Sudid` event.&#xD;&#xA;.filter(({ event }) =&gt;&#xD;&#xA;  api.events.sudo.Sudid.is(event)&#xD;&#xA;)&#xD;&#xA;// we know Sudid just returns a result&#xD;&#xA;.forEach(({ event: { data: [result] } }) =&gt; {&#xD;&#xA;    // check whether extrinsic was successful&#xD;&#xA;    if (result.isErr) {&#xD;&#xA;        const error = result.asErr&#xD;&#xA;        if (error.isModule) {&#xD;&#xA;            // for module errors, we have the section indexed, lookup&#xD;&#xA;            const decoded = api.registry.findMetaError(error.asModule)&#xD;&#xA;            const { docs, name, section } = decoded&#xD;&#xA;            console.log(`Sudo Transaction Error: ${section}.${name}: ${docs.join(' ')}`)&#xD;&#xA;        } else {&#xD;&#xA;            // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;            console.log(`Sudo Transaction Error: ${error.toString()}`)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;})&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3482" PostHistoryTypeId="2" PostId="957" RevisionGUID="30f1ab49-7bf5-4ad3-b586-2b20aa87b769" CreationDate="2022-03-21T15:10:06.110" UserId="357" Text="We are using rococo-local in our CI/CD but we would like to move to kusama-local because we need to test some xTokens pallet ( upwards / downards transfers ) functionalities with Kusama.&#xD;&#xA;&#xD;&#xA;We are using `paraSudoWrapper` from the rococo-relay chain to speed up the onboarding of our parachain in our Docker setups but looks like this is not that available for Kusama-based rely chain. Am I missing something? Is there another workaround?&#xD;&#xA;&#xD;&#xA;Here an example on how we are registering the chain:&#xD;&#xA;https://github.com/mangata-finance/mangata-node/blob/develop/devops/dockerfiles/parachain-registrator/src/index.js#L61&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks!!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3484" PostHistoryTypeId="1" PostId="957" RevisionGUID="30f1ab49-7bf5-4ad3-b586-2b20aa87b769" CreationDate="2022-03-21T15:10:06.110" UserId="357" Text="Speed up kusama-local onboarding" ContentLicense="CC BY-SA 4.0" />
  <row Id="3485" PostHistoryTypeId="3" PostId="957" RevisionGUID="30f1ab49-7bf5-4ad3-b586-2b20aa87b769" CreationDate="2022-03-21T15:10:06.110" UserId="357" Text="|parachain|kusama|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3486" PostHistoryTypeId="2" PostId="958" RevisionGUID="28bbe0f5-2805-47d8-8e8a-5ef1fe310f7a" CreationDate="2022-03-21T15:16:20.977" UserId="68" Text="I am implementing benchmark to calculate weight in my pallet and need to print some data&#xD;&#xA;I was trying to use if_std println! but got nothing.&#xD;&#xA;What the best way to make printouts for debugging benchmarks.rs?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3488" PostHistoryTypeId="1" PostId="958" RevisionGUID="28bbe0f5-2805-47d8-8e8a-5ef1fe310f7a" CreationDate="2022-03-21T15:16:20.977" UserId="68" Text="Logging in benchmarking mode" ContentLicense="CC BY-SA 4.0" />
  <row Id="3489" PostHistoryTypeId="3" PostId="958" RevisionGUID="28bbe0f5-2805-47d8-8e8a-5ef1fe310f7a" CreationDate="2022-03-21T15:16:20.977" UserId="68" Text="|pallet|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3494" PostHistoryTypeId="2" PostId="960" RevisionGUID="0d4b0e32-43b9-4f85-8d83-a96e9ce2aa5a" CreationDate="2022-03-21T15:27:56.930" UserId="68" Text="I am implementing benchmarking and just wonder how its working.&#xD;&#xA;&#xD;&#xA;For testing we mocking runtime. &#xD;&#xA;&#xD;&#xA;Does it mean that data not really written into blockchain, but rather in some mock structure...?&#xD;&#xA;&#xD;&#xA;What about benchmarking? Is it mock? release? real blockchain?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3496" PostHistoryTypeId="1" PostId="960" RevisionGUID="0d4b0e32-43b9-4f85-8d83-a96e9ce2aa5a" CreationDate="2022-03-21T15:27:56.930" UserId="68" Text="How blockchain used in benchmarking of pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3497" PostHistoryTypeId="3" PostId="960" RevisionGUID="0d4b0e32-43b9-4f85-8d83-a96e9ce2aa5a" CreationDate="2022-03-21T15:27:56.930" UserId="68" Text="|pallet|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3498" PostHistoryTypeId="2" PostId="961" RevisionGUID="05ab5cba-8485-4bc0-80f7-506f16e21e4e" CreationDate="2022-03-21T15:37:18.423" UserId="94" Text="For developing a benchmark in Substrate; you mock the runtime, that is correct.  &#xD;&#xA;&#xD;&#xA;When you then want to deploy your pallet to a real blockchain, you need to re-execute the benchmarks with the real runtime.  &#xD;&#xA;This does not require a change to your benchmarks, but how they are called.&#xD;&#xA;In Polkadot this happens [here](https://github.com/paritytech/polkadot/blob/6532750609c66e686d91d6d44cf8c4d0224ff4b7/runtime/polkadot/src/lib.rs#L1713).  &#xD;&#xA;This then ensures that all the other runtime configuration is taken into account that could influence your benchmark.&#xD;&#xA;&#xD;&#xA;If I misunderstood your question then please extend it a bit to be more concrete." ContentLicense="CC BY-SA 4.0" />
  <row Id="3500" PostHistoryTypeId="2" PostId="962" RevisionGUID="ba67d9c5-e525-4d40-adcc-f8cc0563cd5e" CreationDate="2022-03-21T15:50:06.210" UserId="172" Text="I'm looking to take some courses in order to learn how to become a Substrate runtime engineer. What skills do I need and how can I continue improving them as I progress?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3502" PostHistoryTypeId="1" PostId="962" RevisionGUID="ba67d9c5-e525-4d40-adcc-f8cc0563cd5e" CreationDate="2022-03-21T15:50:06.210" UserId="172" Text="What sort of skills do I need to become a Substrate runtime engineer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3503" PostHistoryTypeId="3" PostId="962" RevisionGUID="ba67d9c5-e525-4d40-adcc-f8cc0563cd5e" CreationDate="2022-03-21T15:50:06.210" UserId="172" Text="|learning|general|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3504" PostHistoryTypeId="2" PostId="963" RevisionGUID="c6402b73-8bc1-4bef-8111-43b7e761f786" CreationDate="2022-03-21T15:50:06.210" UserId="172" Text="If you're aiming to become a Substrate runtime engineer, you'll need to know: &#xD;&#xA;* What blockchains are and how they work. A good course on this is the [MOOC](https://www.youtube.com/playlist?list=PLxVihxZC42nF_MCN9PTvZMIifRjx9cZ2J) by the Web3 Foundation.&#xD;&#xA;* Crypto-economics and game theory &amp;mdash; at least enough to help you design or understand the applications you're working on.&#xD;&#xA;* Rust. You'll need to learn [how to understand and write Rust code](https://github.com/rust-lang/rustlings/), there's no work around this. [This](https://rustinblockchain.org/learning/) page has a good variety of resources for learning Rust in the field of blockchain technology. &#xD;&#xA;* What the relay chain / parachain model is and how it works. The best place is the [Polkadot docs](https://wiki.polkadot.network/docs/getting-started).&#xD;&#xA;&#xD;&#xA;The best way to continue improving is by writing your own runtime logic, reviewing PRs and trying new things!" ContentLicense="CC BY-SA 4.0" />
  <row Id="3506" PostHistoryTypeId="4" PostId="946" RevisionGUID="ce18b200-9001-415f-983a-80b27a3fc6ea" CreationDate="2022-03-21T15:57:57.620" UserId="429" Comment="edited title" Text="How to extract data from Offchain storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3507" PostHistoryTypeId="2" PostId="964" RevisionGUID="c5e13e7d-b21e-499c-86b4-a241a6dc2b97" CreationDate="2022-03-21T15:59:51.627" UserId="34" Text="There is no simple work around, Kusama (as you might know) is a production network where sudo is _not_ used. Rococo is _intended_ to be the place to test all things before you move to Kusama or Polkadot, thus we should be sure that features you need are included in Rococo. Please open an [issue](https://github.com/paritytech/polkadot/issues) to ask for the things you want to test be included with reasoning why. &#xD;&#xA;&#xD;&#xA;For testing things out you _may_ find that [try runtime](https://docs.substrate.io/v3/tools/try-runtime) or the [Polkadot emulator](https://github.com/shaunxw/xcm-simulator#xcm-emulator) (or now up-streamed simulator) would be a good place to test things as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="3509" PostHistoryTypeId="5" PostId="789" RevisionGUID="02926470-f3de-48bc-9c59-d6c8aac4daff" CreationDate="2022-03-21T16:22:31.930" UserId="172" Comment="Fixed grammar and spelling." Text="I am using the proxy account. Can I restrict the main account to make transactions on the chain, so the transaction can be done only from the proxy account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3510" PostHistoryTypeId="4" PostId="789" RevisionGUID="02926470-f3de-48bc-9c59-d6c8aac4daff" CreationDate="2022-03-21T16:22:31.930" UserId="172" Comment="Fixed grammar and spelling." Text="How can we restrict some account from making a transaction on chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3511" PostHistoryTypeId="2" PostId="965" RevisionGUID="93daecc2-6837-4216-b2e2-d689d9d82cad" CreationDate="2022-03-21T16:40:22.373" UserId="172" Text="What components do I need to implement an oracle for a Substrate chain, such as a price feed? I'm looking to understand the general steps and considerations I should make. What libraries or projects already exists that I could use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3513" PostHistoryTypeId="1" PostId="965" RevisionGUID="93daecc2-6837-4216-b2e2-d689d9d82cad" CreationDate="2022-03-21T16:40:22.373" UserId="172" Text="How can I build a price feed oracle for my Substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3514" PostHistoryTypeId="3" PostId="965" RevisionGUID="93daecc2-6837-4216-b2e2-d689d9d82cad" CreationDate="2022-03-21T16:40:22.373" UserId="172" Text="|runtime|oracles|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3515" PostHistoryTypeId="2" PostId="966" RevisionGUID="1638b7a2-30c2-4355-bdf9-3742f1d7d225" CreationDate="2022-03-21T16:44:45.953" UserId="634" Text="Substrate community! &#xD;&#xA;&#xD;&#xA;Recently I came across the substrate-archive project. It does its indexing job extremely well, and I wanted to utilize it with some modifications here and there. Things I wanted to change are the following:&#xD;&#xA;&#xD;&#xA;1. In table `storage`, I would like to add two varchar columns corresponding to the section and method of Substrate events. How do I decode these two out of the raw storage key?&#xD;&#xA;2. For every Substrate event that is in `storage` table, I need to additionally store its numeric index. Can this information be taken from the on-chain data? &#xD;&#xA;3. For every extrinsic, I would like to additionally store its section and method. &#xD;&#xA;4. For every extrinsic, I would like to store the **success** flag: whether or not the transaction was successful or not.&#xD;&#xA;5. For every extrinsic, I would like to store the **signed** flag: whether or not the transaction was signed or not.&#xD;&#xA;&#xD;&#xA;Any pointers of how to achieve the above are greatly appreciated! " ContentLicense="CC BY-SA 4.0" />
  <row Id="3517" PostHistoryTypeId="1" PostId="966" RevisionGUID="1638b7a2-30c2-4355-bdf9-3742f1d7d225" CreationDate="2022-03-21T16:44:45.953" UserId="634" Text="Extending the substrate-archive with more on-chain data" ContentLicense="CC BY-SA 4.0" />
  <row Id="3518" PostHistoryTypeId="3" PostId="966" RevisionGUID="1638b7a2-30c2-4355-bdf9-3742f1d7d225" CreationDate="2022-03-21T16:44:45.953" UserId="634" Text="|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3519" PostHistoryTypeId="2" PostId="967" RevisionGUID="900511f0-8420-4dae-97ec-f2da02fed4a3" CreationDate="2022-03-21T16:46:34.743" UserId="612" Text="&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am use the latest rust toolchain, compiler the pallet-ibc at the branch feature/dv-ics20 : https://github.com/octopus-network/substrate-ibc, this give the blow error.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;suyinrong@suyinrongdeMacBook-Pro  /Volumes/Seagate Basic/octopus/substrate-ibc   feature/dv-ics20 ±  cargo build&#xD;&#xA;warning: Patch `tendermint-light-client v0.23.5 (https://github.com/informalsystems/tendermint-rs?branch=v0.23.x#bcd57ab6)` was not used in the crate graph.&#xD;&#xA;Patch `tendermint-rpc v0.23.5 (https://github.com/informalsystems/tendermint-rs?branch=v0.23.x#bcd57ab6)` was not used in the crate graph.&#xD;&#xA;Patch `tendermint-testgen v0.23.5 (https://github.com/informalsystems/tendermint-rs?branch=v0.23.x#bcd57ab6)` was not used in the crate graph.&#xD;&#xA;Check that the patched package version and available features are compatible&#xD;&#xA;with the dependency requirements. If the patch has a different version from&#xD;&#xA;what is locked in the Cargo.lock file, run `cargo update` to use the new&#xD;&#xA;version. This may also occur with an optional dependency that is not enabled.&#xD;&#xA;   Compiling pallet-ibc v3.0.0-pre.0 (/Volumes/Seagate Basic/octopus/substrate-ibc)&#xD;&#xA;error: failed to run custom build command for `pallet-ibc v3.0.0-pre.0 (/Volumes/Seagate Basic/octopus/substrate-ibc)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Volumes/Seagate Basic/octopus/substrate-ibc/target/debug/build/pallet-ibc-b83f4d16dd5692b4/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Volumes/Seagate Basic/octopus/substrate-ibc/target/debug/wbuild/pallet-ibc/Cargo.toml&quot; &quot;--color=always&quot; &quot;--release&quot;&#xD;&#xA;  Using rustc version: rustc 1.61.0-nightly (c84f39e6c 2022-03-20)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  warning: Patch `tendermint-light-client v0.23.5 (https://github.com/informalsystems/tendermint-rs?branch=v0.23.x#bcd57ab6)` was not used in the crate graph.&#xD;&#xA;  Patch `tendermint-rpc v0.23.5 (https://github.com/informalsystems/tendermint-rs?branch=v0.23.x#bcd57ab6)` was not used in the crate graph.&#xD;&#xA;  Patch `tendermint-testgen v0.23.5 (https://github.com/informalsystems/tendermint-rs?branch=v0.23.x#bcd57ab6)` was not used in the crate graph.&#xD;&#xA;  Check that the patched package version and available features are compatible&#xD;&#xA;  with the dependency requirements. If the patch has a different version from&#xD;&#xA;  what is locked in the Cargo.lock file, run `cargo update` to use the new&#xD;&#xA;  version. This may also occur with an optional dependency that is not enabled.&#xD;&#xA;     Compiling ibc v0.12.0 (/Volumes/Seagate Basic/octopus/ibc-rs/modules)&#xD;&#xA;  error: duplicate lang item in crate `std` (which `arrayvec` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Volumes/Seagate Basic/octopus/substrate-ibc/target/debug/wbuild/pallet-ibc/target/wasm32-unknown-unknown/release/deps/libsp_io-af37dfe030ffe3a3.rmeta&#xD;&#xA;    = note: second definition in `std` loaded from /Users/suyinrong/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-d9a8e4ca4a56d589.rlib&#xD;&#xA;&#xD;&#xA;  error: duplicate lang item in crate `std` (which `arrayvec` depends on): `oom`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Volumes/Seagate Basic/octopus/substrate-ibc/target/debug/wbuild/pallet-ibc/target/wasm32-unknown-unknown/release/deps/libsp_io-af37dfe030ffe3a3.rmeta&#xD;&#xA;    = note: second definition in `std` loaded from /Users/suyinrong/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-d9a8e4ca4a56d589.rlib&#xD;&#xA;&#xD;&#xA;  error: could not compile `ibc` due to 2 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My Env: &#xD;&#xA;```&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/suyinrong/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin&#xD;&#xA;nightly-2022-02-17-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;1.58-aarch64-apple-darwin (default)&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;1.58-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.58.1 (db9d1b20b 2022-01-20)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3521" PostHistoryTypeId="1" PostId="967" RevisionGUID="900511f0-8420-4dae-97ec-f2da02fed4a3" CreationDate="2022-03-21T16:46:34.743" UserId="612" Text="error: duplicate lang item in crate `std` (which `arrayvec` depends on): `panic_impl`" ContentLicense="CC BY-SA 4.0" />
  <row Id="3522" PostHistoryTypeId="3" PostId="967" RevisionGUID="900511f0-8420-4dae-97ec-f2da02fed4a3" CreationDate="2022-03-21T16:46:34.743" UserId="612" Text="|rust|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3523" PostHistoryTypeId="5" PostId="958" RevisionGUID="752e18ea-f988-4b75-acac-d6651d21f9a2" CreationDate="2022-03-21T16:47:31.610" UserId="68" Comment="added code" Text="I am implementing benchmark to calculate weight in my pallet and need to print some data&#xD;&#xA;I was trying to use if_std println! but got nothing.&#xD;&#xA;What the best way to make printouts for debugging benchmarks.rs?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    benchmarks! {&#xD;&#xA;    	create_xyz {&#xD;&#xA;    		let index = &lt;NextXYZIndex&lt;T&gt;&gt;::get();&#xD;&#xA;    		println!(&quot;index:{}&quot;, index);&#xD;&#xA;    		let caller: T::AccountId = whitelisted_caller();&#xD;&#xA;    	}: _(RawOrigin::Signed(caller), index)&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="3530" PostHistoryTypeId="6" PostId="967" RevisionGUID="11557f8f-cc2e-4405-8546-b9ca504d468c" CreationDate="2022-03-21T17:35:37.237" UserId="34" Comment="https://github.com/octopus-network/substrate-ibc" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3531" PostHistoryTypeId="2" PostId="969" RevisionGUID="d6341d87-bbb5-4c81-88d9-91d42036b3a5" CreationDate="2022-03-21T17:38:30.973" UserId="34" Text="If you read the error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Check that the patched package version and available features are compatible&#xD;&#xA;with the dependency requirements. If the patch has a different version from&#xD;&#xA;what is locked in the Cargo.lock file, run `cargo update` to use the new&#xD;&#xA;version. This may also occur with an optional dependency that is not enabled.&#xD;&#xA;```&#xD;&#xA;Did you try this? &#xD;&#xA;&#xD;&#xA;`error: duplicate lang item` is typically caused by versioning issues of some kind. So if update doesn't do it, it may be something more systemic. You might want to file an issue with the upstream IBC repo you are using." ContentLicense="CC BY-SA 4.0" />
  <row Id="3533" PostHistoryTypeId="2" PostId="970" RevisionGUID="f9219563-6c69-4c48-9ac6-783121522158" CreationDate="2022-03-21T17:57:48.280" UserId="94" Text="You can use the `info!` macro or similar from `frame_support::log` as such:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_support::log::info;&#xD;&#xA;&#xD;&#xA;benchmarks! {&#xD;&#xA;	something {&#xD;&#xA;&#xD;&#xA;		info!(&quot;Logging works!&quot;);&#xD;&#xA;&#xD;&#xA;	}: _(args...)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is only helpful for debugging though." ContentLicense="CC BY-SA 4.0" />
  <row Id="3535" PostHistoryTypeId="2" PostId="971" RevisionGUID="0230a273-3cd0-4aa0-ab52-65eb0cebc51e" CreationDate="2022-03-21T18:03:20.820" UserId="28" Text="I would probably not put logs in your production benchmarks, but if you are trying to debug things, you can add a `println!` statement and then run the benchmark tests:&#xD;&#xA;&#xD;&#xA;```lang-sh&#xD;&#xA;cargo test -p pallet-name --features runtime-benchmarks&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will work as long as you have included the:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl_benchmark_test_suite!(Pallet, crate::tests::new_test_ext(), crate::tests::Test);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3537" PostHistoryTypeId="5" PostId="901" RevisionGUID="fec19ba1-50bd-441e-af42-843fd4f24ee7" CreationDate="2022-03-21T18:17:56.527" UserId="587" Comment="added 277 characters in body" Text="Say I have a `StorageDoubleMap` that stores `Data` structs for each user and `ContextId`&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Info&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		Twox64Concat,&#xD;&#xA;		T::ContextId,&#xD;&#xA;		Data,&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;Is there an option to limit the amount of entries per `AccountId`? Or should I keep a count of entries in a separate map?&#xD;&#xA;&#xD;&#xA;**Update**:&#xD;&#xA;&#xD;&#xA;Accessing a specific `ContextId` for an `AccountId` quickly is important to me, that's why I chose `StorageDoubleMap`.&#xD;&#xA;&#xD;&#xA;Moreover, a common operation will be to iterate over all `ContextId`s for an `AccountId`, which `StorageDoubleMap` also [has support for](https://docs.rs/frame-support/latest/frame_support/storage/types/struct.StorageDoubleMap.html#method.iter_prefix)." ContentLicense="CC BY-SA 4.0" />
  <row Id="3539" PostHistoryTypeId="2" PostId="972" RevisionGUID="75eb7126-2fd8-4972-85c5-87b2542da5c8" CreationDate="2022-03-21T19:51:14.033" UserId="167" Text="The code removed in [this](https://github.com/paritytech/substrate/commit/8f5b446ee4c1cff407a2888985178cf692166428) PR is exactly what you need to do. Trying to translate it into your case would yield: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;#[pallet::hooks]&#xD;&#xA;impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	fn on_finalize(_n: BlockNumberFor&lt;T&gt;) {&#xD;&#xA;		let events = frame_system::Pallet::&lt;T&gt;::read_events_no_consensus();&#xD;&#xA;&#xD;&#xA;		events.iter().for_each(|EventRecord { event, .. }| {&#xD;&#xA;			// try and convert the event into a local event.&#xD;&#xA;			let local_event = &lt;T as Config&gt;::Event::from(event);&#xD;&#xA;			match local_event.try_into() {&#xD;&#xA;				Ok(ev)&#xD;&#xA;					// this is an event from this pallet, work with it. &#xD;&#xA;				},&#xD;&#xA;				_ =&gt; {&#xD;&#xA;					// this is an error from some other pallet&#xD;&#xA;				},&#xD;&#xA;			}&#xD;&#xA;		});&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Let's now break down what is happening here: &#xD;&#xA;&#xD;&#xA;The top level runtime has an outer event, which is [this type](https://paritytech.github.io/substrate/master/node_runtime/enum.Event.html). As you see, this is just a wrapper for all pallet events. This type implement `TryInto&lt;T&gt;` where `T` is individual pallet events. Example for pallet-balances [here](https://paritytech.github.io/substrate/master/node_runtime/enum.Event.html#impl-TryInto%3CEvent%3CRuntime%2C%20()%3E%3E).&#xD;&#xA;&#xD;&#xA;In your code, `frame_system::Pallet::&lt;T&gt;::read_events_no_consensus();` returns the outer event type, which you have to iterate and individually try and convert into your local pallet event. " ContentLicense="CC BY-SA 4.0" />
  <row Id="3545" PostHistoryTypeId="2" PostId="974" RevisionGUID="c3547e32-3f07-4db3-867a-42bc3ec99ba7" CreationDate="2022-03-21T20:53:32.517" UserId="359" Text="`author_removeExtrinsic` support remove extrinsic by value &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;You can also either write a script to calculate the hash, or just read it from polkadot apps under Network -&gt; Node info page&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vPwqa.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/pje3e.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3547" PostHistoryTypeId="2" PostId="975" RevisionGUID="b4bd5072-9ed2-43c7-b975-5488b7a2fcee" CreationDate="2022-03-21T20:58:49.120" UserId="1760" Text="I'm trying to generate an extrinsic offline based on [this example](https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/05_transfer_balance.rs). It worked, but the signed transaction is different.  &#xD;&#xA;&#xD;&#xA;### Call Data&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;As you can see in the output the Call Hash is the same.&#xD;&#xA;&#xD;&#xA;### Signed Transaction&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;### My code&#xD;&#xA;&#xD;&#xA;    use serde::{Serialize, Deserialize};&#xD;&#xA;    use sp_keyring::AccountKeyring;&#xD;&#xA;    use sp_runtime::{MultiAddress, MultiSignature, generic::Era};&#xD;&#xA;    use parity_scale_codec::{ Compact, Encode };&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    #[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;    struct SystemSyncState {&#xD;&#xA;        current_block: u32,&#xD;&#xA;        starting_block: u32,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    struct SystemSyncStateSuccess {&#xD;&#xA;        jsonrpc: String,&#xD;&#xA;        result: SystemSyncState,&#xD;&#xA;        id: u8,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    struct SystemAccountNextIndexSuccess {&#xD;&#xA;        jsonrpc: String,&#xD;&#xA;        result: u32,&#xD;&#xA;        id: u8,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    struct ChainGetBlockHashSuccess {&#xD;&#xA;        jsonrpc: String,&#xD;&#xA;        result: String,&#xD;&#xA;        id: u8,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    #[serde(untagged)]&#xD;&#xA;    enum StateGetRuntimeVersionApis {&#xD;&#xA;        Int(u32),&#xD;&#xA;        Str(String),&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    #[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;    struct StateGetRuntimeVersion {&#xD;&#xA;        apis: Vec&lt;[StateGetRuntimeVersionApis;2]&gt;,&#xD;&#xA;        authoring_version: u32,&#xD;&#xA;        impl_name: String,&#xD;&#xA;        impl_version: u32,&#xD;&#xA;        spec_name: String,&#xD;&#xA;        spec_version: u32,&#xD;&#xA;        transaction_version: u32,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    struct StateGetRuntimeVersionSuccess {&#xD;&#xA;        jsonrpc: String,&#xD;&#xA;        result: StateGetRuntimeVersion,&#xD;&#xA;        id: u8,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[derive(Serialize)]&#xD;&#xA;    struct NodeRequest {&#xD;&#xA;        id: u8,&#xD;&#xA;        jsonrpc: String,&#xD;&#xA;        method: String,&#xD;&#xA;        params: Vec&lt;String&gt;,&#xD;&#xA;    }&#xD;&#xA;    pub struct StorageKeyPrefix(Vec&lt;u8&gt;);&#xD;&#xA;    &#xD;&#xA;    async fn get_nonce(account: &amp;sp_runtime::AccountId32) -&gt; u32 {&#xD;&#xA;    &#xD;&#xA;        let client = reqwest::Client::new();&#xD;&#xA;        let req = NodeRequest {&#xD;&#xA;            id: 1,&#xD;&#xA;            jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;            method: &quot;system_accountNextIndex&quot;.to_string(),&#xD;&#xA;            params: vec![account.to_string()],&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        let res = client&#xD;&#xA;            .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;            .json(&amp;serde_json::json!(req))&#xD;&#xA;            .send()&#xD;&#xA;            .await;&#xD;&#xA;    &#xD;&#xA;        match res {&#xD;&#xA;            Ok(res) =&gt; {&#xD;&#xA;                match res.status() {&#xD;&#xA;                    reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                        match res.json::&lt;SystemAccountNextIndexSuccess&gt;().await {&#xD;&#xA;                            Ok(parsed) =&gt; {&#xD;&#xA;                                // println!(&quot;NONCE {:#?}&quot;, parsed.result);&#xD;&#xA;                                parsed.result&#xD;&#xA;                            },&#xD;&#xA;                            Err(e) =&gt; {&#xD;&#xA;                                println!(&quot;ERR {:?}&quot;, e);&#xD;&#xA;                                0&#xD;&#xA;                            },&#xD;&#xA;                        }&#xD;&#xA;                    },&#xD;&#xA;                    _ =&gt; {&#xD;&#xA;                        0&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            },&#xD;&#xA;            Err(_e) =&gt; {&#xD;&#xA;                0&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    async fn get_genesis_hash() -&gt; [u8; 32] {&#xD;&#xA;        let client = reqwest::Client::new();&#xD;&#xA;        let req = NodeRequest {&#xD;&#xA;            id: 1,&#xD;&#xA;            jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;            method: &quot;chain_getBlockHash&quot;.to_string(),&#xD;&#xA;            params: vec![&quot;0&quot;.to_string()]&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        let res = client&#xD;&#xA;            .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;            .json(&amp;serde_json::json!(req))&#xD;&#xA;            .send()&#xD;&#xA;            .await;&#xD;&#xA;    &#xD;&#xA;        match res {&#xD;&#xA;            Ok(res) =&gt; {&#xD;&#xA;                match res.status() {&#xD;&#xA;                    reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                        match res.json::&lt;ChainGetBlockHashSuccess&gt;().await {&#xD;&#xA;                            Ok(parsed) =&gt; {&#xD;&#xA;                                println!(&quot;GENESIS HASH {:#?}&quot;, parsed.result);&#xD;&#xA;                                sp_core::hashing::sha2_256(parsed.result.as_bytes())&#xD;&#xA;                            },&#xD;&#xA;                            Err(e) =&gt; {&#xD;&#xA;                                println!(&quot;ERR {:?}&quot;, e);&#xD;&#xA;                                sp_core::hashing::sha2_256(&amp;[0])&#xD;&#xA;                            },&#xD;&#xA;                        }&#xD;&#xA;                    },&#xD;&#xA;                    _ =&gt; {&#xD;&#xA;                        sp_core::hashing::sha2_256(&amp;[0])&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            },&#xD;&#xA;            Err(_e) =&gt; {&#xD;&#xA;                sp_core::hashing::sha2_256(&amp;[0])&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Fetch runtime information from the node.&#xD;&#xA;    async fn get_runtime_version() -&gt; Result&lt;StateGetRuntimeVersion, Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;        let client = reqwest::Client::new();&#xD;&#xA;        let req = NodeRequest {&#xD;&#xA;            id: 1,&#xD;&#xA;            jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;            method: &quot;state_getRuntimeVersion&quot;.to_string(),&#xD;&#xA;            params: vec![]&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        let res = client&#xD;&#xA;            .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;            .json(&amp;serde_json::json!(req))&#xD;&#xA;            .send()&#xD;&#xA;            .await;&#xD;&#xA;    &#xD;&#xA;        match res {&#xD;&#xA;            Ok(res) =&gt; {&#xD;&#xA;                match res.status() {&#xD;&#xA;                    reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                        match res.json::&lt;StateGetRuntimeVersionSuccess&gt;().await {&#xD;&#xA;                            Ok(parsed) =&gt; {&#xD;&#xA;                                Ok(parsed.result)&#xD;&#xA;                            },&#xD;&#xA;                            Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;                        }&#xD;&#xA;                    },&#xD;&#xA;                    _ =&gt; {&#xD;&#xA;                        Err(String::from(&quot;Something went wrong&quot;).into())&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            },&#xD;&#xA;            Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fn encode_extrinsic&lt;S: Encode ,C: Encode&gt;(signature: Option&lt;S&gt;, call: C) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;        let mut tmp: Vec&lt;u8&gt; = vec![];&#xD;&#xA;    &#xD;&#xA;        const EXTRINSIC_VERSION: u8 = 4;&#xD;&#xA;        match signature.as_ref() {&#xD;&#xA;            Some(s) =&gt; {&#xD;&#xA;                tmp.push(EXTRINSIC_VERSION | 0b1000_0000);&#xD;&#xA;                s.encode_to(&amp;mut tmp);&#xD;&#xA;            },&#xD;&#xA;            None =&gt; {&#xD;&#xA;                tmp.push(EXTRINSIC_VERSION &amp; 0b0111_1111);&#xD;&#xA;            },&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        call.encode_to(&amp;mut tmp);&#xD;&#xA;    &#xD;&#xA;        let compact_len = Compact(tmp.len() as u32);&#xD;&#xA;    &#xD;&#xA;        let mut output: Vec&lt;u8&gt; = vec![];&#xD;&#xA;        compact_len.encode_to(&amp;mut output);&#xD;&#xA;        output.extend(tmp);&#xD;&#xA;    &#xD;&#xA;        output&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[async_std::main]&#xD;&#xA;    async fn main() {&#xD;&#xA;    &#xD;&#xA;        let storage_key = &quot;4d4c14c40d1b7ecb942455794693fa68&quot;;&#xD;&#xA;       &#xD;&#xA;        let pallet_index = 8;&#xD;&#xA;        let method_index = 0;&#xD;&#xA;        let call_index: [u8; 2] = [pallet_index, method_index];&#xD;&#xA;        let address: Vec&lt;u8&gt; = storage_key.as_bytes().to_vec().encode();&#xD;&#xA;        let owner = [0];&#xD;&#xA;        let call_data  = [call_index.to_vec(), address, owner.to_vec()].concat();&#xD;&#xA;    &#xD;&#xA;        let call_hex = hex::encode(call_data.clone());&#xD;&#xA;        println!(&quot;CALL HEX {:?}&quot;, call_hex);&#xD;&#xA;        let hash = sp_core::blake2_256(call_data.as_ref());&#xD;&#xA;        println!(&quot;CALL HASH {:?}&quot;, hex::encode(hash));&#xD;&#xA;    &#xD;&#xA;        let from = AccountKeyring::Alice.to_account_id();&#xD;&#xA;        let alice_nonce = get_nonce(&amp;from).await;&#xD;&#xA;        let runtime_version = get_runtime_version().await.unwrap();&#xD;&#xA;        let genesis_hash = get_genesis_hash().await;&#xD;&#xA;    &#xD;&#xA;        let extra = (&#xD;&#xA;            Era::Immortal,&#xD;&#xA;            Compact(alice_nonce),&#xD;&#xA;            Compact(0u128)&#xD;&#xA;        );&#xD;&#xA;    &#xD;&#xA;        let additional = (&#xD;&#xA;            runtime_version.spec_version,&#xD;&#xA;            runtime_version.transaction_version,&#xD;&#xA;            genesis_hash,&#xD;&#xA;            genesis_hash,&#xD;&#xA;        );&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        let signature = {&#xD;&#xA;            let full_unsigned_payload = (&amp;call_data, &amp;extra, &amp;additional);&#xD;&#xA;            let full_unsigned_payload_scale_bytes = full_unsigned_payload.encode();&#xD;&#xA;    &#xD;&#xA;            if call_data.len() &gt; 256 {&#xD;&#xA;                AccountKeyring::Alice.sign(&amp;sp_core::blake2_256(&amp;full_unsigned_payload_scale_bytes)[..])&#xD;&#xA;            } else {&#xD;&#xA;                AccountKeyring::Alice.sign(&amp;full_unsigned_payload_scale_bytes)&#xD;&#xA;            }&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        let signature_to_encode = Some((&#xD;&#xA;            MultiAddress::Id::&lt;_,u32&gt;(from),&#xD;&#xA;            MultiSignature::Sr25519(signature),&#xD;&#xA;            extra&#xD;&#xA;        ));&#xD;&#xA;    &#xD;&#xA;        let payload_scale_encoded = encode_extrinsic(&#xD;&#xA;            signature_to_encode,&#xD;&#xA;            call_data&#xD;&#xA;        );&#xD;&#xA;        let payload_hex = format!(&quot;0x{}&quot;, hex::encode(&amp;payload_scale_encoded));&#xD;&#xA;        println!(&quot;PAYLOAD HEX {:?}&quot;, payload_hex);&#xD;&#xA;        println!(&quot;TARGET BYTES {:?}&quot;, hex::decode(&quot;29028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01264459d771430ea6f806df70c10f91c783cb31ee8007751a4906fa92ddf70313431871e435f7fbddfb3974ece95c82f3d59cb8abe98d78f47cc150ae99c1b089001400080080346434633134633430643162376563623934323435353739343639336661363800&quot;).unwrap());&#xD;&#xA;        println!(&quot;RESULT BYTES {:?}&quot;, payload_scale_encoded);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;### The output&#xD;&#xA;&#xD;&#xA;    CALL HEX &quot;080080346434633134633430643162376563623934323435353739343639336661363800&quot;&#xD;&#xA;    CALL HASH &quot;9f7038a86de92cd63b1d3edce42730ffeca300c6e590e1a457e675add24ff706&quot;&#xD;&#xA;    GENESIS HASH &quot;0xeba2ea8340d05a42a50ddd5c8cbf5ac91de372cff7c4785bcab4ebbdf388584f&quot;&#xD;&#xA;&#xD;&#xA;    PAYLOAD HEX &quot;0x2d028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01268cb1fc4beb651a7ca1b0944fe22070e702bfb9ba455391a25f5fbefc2cd22b4b4defc1df9c8b946f9be936a0b823f339fd5eed23755dfd4cca467b595be38900140090080080346434633134633430643162376563623934323435353739343639336661363800&quot;&#xD;&#xA;&#xD;&#xA;    TARGET BYTES [41, 2, 132, 0, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, 38, 68, 89, 215, 113, 67, 14, 166, 248, 6, 223, 112, 193, 15, 145, 199, 131, 203, 49, 238, 128, 7, 117, 26, 73, 6, 250, 146, 221, 247, 3, 19, 67, 24, 113, 228, 53, 247, 251, 221, 251, 57, 116, 236, 233, 92, 130, 243, 213, 156, 184, 171, 233, 141, 120, 244, 124, 193, 80, 174, 153, 193, 176, 137, 0, 20, 0, 8, 0, 128, 52, 100, 52, 99, 49, 52, 99, 52, 48, 100, 49, 98, 55, 101, 99, 98, 57, 52, 50, 52, 53, 53, 55, 57, 52, 54, 57, 51, 102, 97, 54, 56, 0]&#xD;&#xA;    RESULT BYTES [45, 2, 132, 0, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, 38, 140, 177, 252, 75, 235, 101, 26, 124, 161, 176, 148, 79, 226, 32, 112, 231, 2, 191, 185, 186, 69, 83, 145, 162, 95, 95, 190, 252, 44, 210, 43, 75, 77, 239, 193, 223, 156, 139, 148, 111, 155, 233, 54, 160, 184, 35, 243, 57, 253, 94, 237, 35, 117, 93, 253, 76, 202, 70, 123, 89, 91, 227, 137, 0, 20, 0, 144, 8, 0, 128, 52, 100, 52, 99, 49, 52, 99, 52, 48, 100, 49, 98, 55, 101, 99, 98, 57, 52, 50, 52, 53, 53, 55, 57, 52, 54, 57, 51, 102, 97, 54, 56, 0]&#xD;&#xA;&#xD;&#xA;The &quot;Result Bytes&quot; is the byte array that I generate. The &quot;Target Bytes&quot; array is generated by the Polkadot web client.&#xD;&#xA;Call Hex and Call Hash are correct and match the ones from the Polkadot web client.&#xD;&#xA;&#xD;&#xA;### Query result&#xD;&#xA;If I try to execute the result Payload Hex I get an error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;### Bytes difference&#xD;&#xA;I've highlighted the bytes that differ:&#xD;&#xA;&#xD;&#xA;TARGET BYTES [`41`, 2, 132, 0, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, 38, `68, 89, 215, 113, 67, 14, 166, 248, 6, 223, 112, 193, 15, 145, 199, 131, 203, 49, 238, 128, 7, 117, 26, 73, 6, 250, 146, 221, 247, 3, 19, 67, 24, 113, 228, 53, 247, 251, 221, 251, 57, 116, 236, 233, 92, 130, 243, 213, 156, 184, 171, 233, 141, 120, 244, 124, 193, 80, 174, 153, 193, 176, 137, 0, 20, 0`, 8, 0, 128, 52, 100, 52, 99, 49, 52, 99, 52, 48, 100, 49, 98, 55, 101, 99, 98, 57, 52, 50, 52, 53, 53, 55, 57, 52, 54, 57, 51, 102, 97, 54, 56, 0]&#xD;&#xA;&#xD;&#xA;RESULT BYTES [`45`, 2, 132, 0, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, 38, `140, 177, 252, 75, 235, 101, 26, 124, 161, 176, 148, 79, 226, 32, 112, 231, 2, 191, 185, 186, 69, 83, 145, 162, 95, 95, 190, 252, 44, 210, 43, 75, 77, 239, 193, 223, 156, 139, 148, 111, 155, 233, 54, 160, 184, 35, 243, 57, 253, 94, 237, 35, 117, 93, 253, 76, 202, 70, 123, 89, 91, 227, 137, 0, 20, 0, 144`, 8, 0, 128, 52, 100, 52, 99, 49, 52, 99, 52, 48, 100, 49, 98, 55, 101, 99, 98, 57, 52, 50, 52, 53, 53, 55, 57, 52, 54, 57, 51, 102, 97, 54, 56, 0]&#xD;&#xA;&#xD;&#xA;Would appreciate any help on finding the reasons of the difference in results. Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CV0J9.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/QfKnN.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/dfyot.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3549" PostHistoryTypeId="1" PostId="975" RevisionGUID="b4bd5072-9ed2-43c7-b975-5488b7a2fcee" CreationDate="2022-03-21T20:58:49.120" UserId="1760" Text="Generating an extrinsic call for a custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="3550" PostHistoryTypeId="3" PostId="975" RevisionGUID="b4bd5072-9ed2-43c7-b975-5488b7a2fcee" CreationDate="2022-03-21T20:58:49.120" UserId="1760" Text="|extrinsic|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3551" PostHistoryTypeId="2" PostId="976" RevisionGUID="c43ce343-5bae-4952-8500-219087eb8d27" CreationDate="2022-03-21T22:31:50.437" UserId="1804" Text="The compiler: expected `DispatchResultWithPostInfo`&#xD;&#xA;&#xD;&#xA;It found:  `) -&gt; DispatchResult {`&#xD;&#xA;&#xD;&#xA;I want to use `DispatchResult` and do not understand what the problem is." ContentLicense="CC BY-SA 4.0" />
  <row Id="3553" PostHistoryTypeId="1" PostId="976" RevisionGUID="c43ce343-5bae-4952-8500-219087eb8d27" CreationDate="2022-03-21T22:31:50.437" UserId="1804" Text="Why is `DispatchResultWithPostInfo` expected?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3554" PostHistoryTypeId="3" PostId="976" RevisionGUID="c43ce343-5bae-4952-8500-219087eb8d27" CreationDate="2022-03-21T22:31:50.437" UserId="1804" Text="|pallet|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3555" PostHistoryTypeId="2" PostId="977" RevisionGUID="ae880e3f-7d2a-4175-86e0-7865436010e3" CreationDate="2022-03-21T22:40:10.607" UserId="205" Text="thanks for you extended and detailed answer. There was just one small missing piece. I had to setup the `TryInto&lt;Event&lt;Self&gt;&gt;` to the `#[pallet::config]` macro or otherwise your will get a `is not implemented for pallet::Event&lt;_&gt;` error. &#xD;&#xA;Thanks for your support. Great job! &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt;&#xD;&#xA;			+ IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;&#xD;&#xA;			+ TryInto&lt;Event&lt;Self&gt;&gt;;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3557" PostHistoryTypeId="5" PostId="976" RevisionGUID="ae6c7526-8f8c-4ec0-acb8-df17a0a1064f" CreationDate="2022-03-21T22:58:23.623" UserId="1804" Comment="added 373 characters in body" Text="The compiler: expected `DispatchResultWithPostInfo`&#xD;&#xA;&#xD;&#xA;It found:  `) -&gt; DispatchResult {`&#xD;&#xA;&#xD;&#xA;I want to use `DispatchResult` and do not understand what the problem is.&#xD;&#xA;&#xD;&#xA;Additional context:&#xD;&#xA;&#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;        #[pallet::call]&#xD;&#xA;        impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;            #[pallet::weight(10_000)]&#xD;&#xA;            pub fn foo(&#xD;&#xA;                origin: OriginFor&lt;T&gt;&#xD;&#xA;            ) -&gt; DispatchResult {&#xD;&#xA;                Ok(())&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="3558" PostHistoryTypeId="2" PostId="978" RevisionGUID="bd2b65f7-0624-4779-826c-1902a28bb823" CreationDate="2022-03-21T23:04:38.750" UserId="145" Text="The problem is the way you encode the call data. Since your `call_data` in `main` is a vector, when you encode it into the temporary byte vector in `encode_extrinsic`, SCALE first appends the length of the vector per specification. You can see the result of this as the excess byte `144` in your &quot;result bytes&quot; at the end of that greyed-out section, right before the module index byte `8`.&#xD;&#xA;&#xD;&#xA;So inside `encode_extrinsic`, instead of doing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;call.encode_to(&amp;mut tmp);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;you should just append the contents of `call` to `tmp`. This should also fix the difference in the first byte, which is caused by this extra byte.&#xD;&#xA;&#xD;&#xA;Rest of the difference is the signature, which I think is expected." ContentLicense="CC BY-SA 4.0" />
  <row Id="3560" PostHistoryTypeId="5" PostId="977" RevisionGUID="0ff1f7dd-c1fa-4866-a2c3-8c0cbdee9ec6" CreationDate="2022-03-21T23:09:38.703" UserId="205" Comment="added 13 characters in body" Text="@kianenigma, thanks for you extended and detailed answer. There was just one small missing piece. I had to setup the `TryInto&lt;Event&lt;Self&gt;&gt;` to the `#[pallet::config]` macro or otherwise your will get a `is not implemented for pallet::Event&lt;_&gt;` error. &#xD;&#xA;Thanks for your support. Great job! &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt;&#xD;&#xA;			+ IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;&#xD;&#xA;			+ TryInto&lt;Event&lt;Self&gt;&gt;;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3561" PostHistoryTypeId="5" PostId="978" RevisionGUID="e16eccc6-c39a-4440-a505-137ec75dcfce" CreationDate="2022-03-21T23:17:02.910" UserId="145" Comment="added 1 character in body" Text="The problem is the way you encode the call data. Since your `call_data` in `main` is a vector, when you encode it into the temporary byte vector in `encode_extrinsic`, SCALE first appends the length of the vector per specification. You can see the result of this as the excess byte `144` in your &quot;result bytes&quot; at the end of that greyed-out section, right before the module index byte `8`.&#xD;&#xA;&#xD;&#xA;So inside `encode_extrinsic`, instead of doing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;call.encode_to(&amp;mut tmp);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;you should just append the contents of `call` to `tmp`. This should also fix the difference in the first byte, which is caused by this excess byte.&#xD;&#xA;&#xD;&#xA;Rest of the difference is the signature, which I think is expected." ContentLicense="CC BY-SA 4.0" />
  <row Id="3562" PostHistoryTypeId="5" PostId="978" RevisionGUID="80d3be28-93d8-40ae-b8cb-30c6870d199b" CreationDate="2022-03-21T23:31:34.680" UserId="145" Comment="Added more source code." Text="The problem is the way you encode the call data. Since your `call_data` in `main` is a vector, when you encode it into the temporary byte vector in `encode_extrinsic`, SCALE first appends the length of the vector per specification. You can see the result of this as the excess byte `144` in your &quot;result bytes&quot; at the end of that greyed-out section, right before the module index byte `8`.&#xD;&#xA;&#xD;&#xA;So inside `encode_extrinsic`, instead of doing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;call.encode_to(&amp;mut tmp);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;you should just append the contents of `call` to `tmp`. You can do it by replacing `encode_extrinsic` with something similar to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn encode_extrinsic&lt;S: Encode&gt;(&#xD;&#xA;    signature: Option&lt;S&gt;,&#xD;&#xA;    call: Vec&lt;u8&gt;,&#xD;&#xA;) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;    let mut tmp: Vec&lt;u8&gt; = vec![];&#xD;&#xA;&#xD;&#xA;    const EXTRINSIC_VERSION: u8 = 4;&#xD;&#xA;    match signature.as_ref() {&#xD;&#xA;        Some(s) =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION | 0b1000_0000);&#xD;&#xA;            s.encode_to(&amp;mut tmp);&#xD;&#xA;        },&#xD;&#xA;        None =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION &amp; 0b0111_1111);&#xD;&#xA;        },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    tmp.extend(call);&#xD;&#xA;&#xD;&#xA;    let compact_len = Compact(tmp.len() as u32);&#xD;&#xA;&#xD;&#xA;    let mut output: Vec&lt;u8&gt; = vec![];&#xD;&#xA;    compact_len.encode_to(&amp;mut output);&#xD;&#xA;    output.extend(tmp);&#xD;&#xA;&#xD;&#xA;    output&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This should also fix the difference in the first byte, which is caused by this excess byte.&#xD;&#xA;&#xD;&#xA;Rest of the difference is the signature, which I think is expected." ContentLicense="CC BY-SA 4.0" />
  <row Id="3563" PostHistoryTypeId="2" PostId="979" RevisionGUID="38caacc0-667b-465f-9774-e1bd725a0b50" CreationDate="2022-03-21T23:40:25.500" UserId="359" Text="Here is another useful feature that no one knows it exists (until now I hope): [fast-runtime](https://github.com/paritytech/polkadot/pull/4332)&#xD;&#xA;&#xD;&#xA;So that you can build a Kusama local runtime with reduced session time without waiting hours for onboarding.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;KSM_EPOCH_DURATION=40 KSM_LAUNCH_PERIOD=3 cargo build --release --features=fast-runtime&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3566" PostHistoryTypeId="5" PostId="978" RevisionGUID="2be1eb44-cdd2-498a-b874-3b36c946af3f" CreationDate="2022-03-22T00:19:27.563" UserId="145" Comment="Added the difference between the given code and the Parity example." Text="The problem is the way you encode the call data. Since your `call_data` in `main` is a vector, when you encode it into the temporary byte vector in `encode_extrinsic`, SCALE first appends the length of the vector per specification. You can see the result of this as the excess byte `144` in your &quot;result bytes&quot; at the end of that greyed-out section, right before the module index byte `8`.&#xD;&#xA;&#xD;&#xA;So inside `encode_extrinsic`, instead of doing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;call.encode_to(&amp;mut tmp);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;you should just append the contents of `call` to `tmp`. You can do it by replacing `encode_extrinsic` with something similar to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn encode_extrinsic&lt;S: Encode&gt;(&#xD;&#xA;    signature: Option&lt;S&gt;,&#xD;&#xA;    call: Vec&lt;u8&gt;,&#xD;&#xA;) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;    let mut tmp: Vec&lt;u8&gt; = vec![];&#xD;&#xA;&#xD;&#xA;    const EXTRINSIC_VERSION: u8 = 4;&#xD;&#xA;    match signature.as_ref() {&#xD;&#xA;        Some(s) =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION | 0b1000_0000);&#xD;&#xA;            s.encode_to(&amp;mut tmp);&#xD;&#xA;        },&#xD;&#xA;        None =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION &amp; 0b0111_1111);&#xD;&#xA;        },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    tmp.extend(call);&#xD;&#xA;&#xD;&#xA;    let compact_len = Compact(tmp.len() as u32);&#xD;&#xA;&#xD;&#xA;    let mut output: Vec&lt;u8&gt; = vec![];&#xD;&#xA;    compact_len.encode_to(&amp;mut output);&#xD;&#xA;    output.extend(tmp);&#xD;&#xA;&#xD;&#xA;    output&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This should also fix the difference in the first byte, which is caused by this excess byte.&#xD;&#xA;&#xD;&#xA;Rest of the difference is the signature, which I think is expected.&#xD;&#xA;&#xD;&#xA;**NOTE:** The difference between your code and the Parity example is that the latter uses a tuple for the call data, and SCALE encoding of tuples does not introduce length bytes." ContentLicense="CC BY-SA 4.0" />
  <row Id="3567" PostHistoryTypeId="5" PostId="978" RevisionGUID="02ed0683-61b7-4af2-b148-45edea0bd4a7" CreationDate="2022-03-22T00:32:16.373" UserId="145" Comment="deleted 62 characters in body" Text="The problem is the way you encode the call data. Since your `call_data` in `main` is a vector, when you encode it into the temporary byte vector in `encode_extrinsic`, SCALE first appends the length of the vector per specification. You can see the result of this as the excess byte `144` in your &quot;result bytes&quot; at the end of that greyed-out section, right before the module index byte `8`.&#xD;&#xA;&#xD;&#xA;So inside `encode_extrinsic`, instead of doing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;call.encode_to(&amp;mut tmp);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;you should just append the contents of `call` to `tmp`. You can do it by replacing `encode_extrinsic` with something similar to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn encode_extrinsic&lt;S: Encode&gt;(&#xD;&#xA;    signature: Option&lt;S&gt;,&#xD;&#xA;    call: Vec&lt;u8&gt;,&#xD;&#xA;) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;    let mut tmp: Vec&lt;u8&gt; = vec![];&#xD;&#xA;&#xD;&#xA;    const EXTRINSIC_VERSION: u8 = 4;&#xD;&#xA;    match signature.as_ref() {&#xD;&#xA;        Some(s) =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION | 0b1000_0000);&#xD;&#xA;            s.encode_to(&amp;mut tmp);&#xD;&#xA;        },&#xD;&#xA;        None =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION &amp; 0b0111_1111);&#xD;&#xA;        },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    tmp.extend(call);&#xD;&#xA;&#xD;&#xA;    let compact_len = Compact(tmp.len() as u32);&#xD;&#xA;&#xD;&#xA;    let mut output: Vec&lt;u8&gt; = vec![];&#xD;&#xA;    compact_len.encode_to(&amp;mut output);&#xD;&#xA;    output.extend(tmp);&#xD;&#xA;&#xD;&#xA;    output&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This should also fix the difference in the first byte, which is caused by this excess byte.&#xD;&#xA;&#xD;&#xA;Rest of the difference is the signature, which I think is expected.&#xD;&#xA;&#xD;&#xA;**NOTE:** The difference between your code and the Parity example is that the latter uses a tuple for the call data." ContentLicense="CC BY-SA 4.0" />
  <row Id="3568" PostHistoryTypeId="2" PostId="980" RevisionGUID="f825410d-ff40-45b2-b3e6-c72789f03bb7" CreationDate="2022-03-22T02:12:45.093" UserId="1808" Text="Is there a way to render Sudo unusable without a runtime upgrade like setting the Sudo key to something nobody knows the private key to?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3570" PostHistoryTypeId="1" PostId="980" RevisionGUID="f825410d-ff40-45b2-b3e6-c72789f03bb7" CreationDate="2022-03-22T02:12:45.093" UserId="1808" Text="Render Sudo without a runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="3571" PostHistoryTypeId="3" PostId="980" RevisionGUID="f825410d-ff40-45b2-b3e6-c72789f03bb7" CreationDate="2022-03-22T02:12:45.093" UserId="1808" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3572" PostHistoryTypeId="2" PostId="981" RevisionGUID="ee37b419-e35f-40c7-b9da-f885c12d0ad4" CreationDate="2022-03-22T04:01:44.160" UserId="28" Text="The suggestion of setting the Sudo key to something like the address with all 1's sounds reasonable, although I would suggest in the long term to remove the pallet using a runtime upgrade if you intend not to use it.&#xD;&#xA;&#xD;&#xA;It may be possible the existence of the Sudo pallet on chains which have a transferable currency would be scrutinized under financial regulation, but I am not a lawyer, so what do I know?&#xD;&#xA;&#xD;&#xA;Note, while on chains like Ethereum, it may be more popular to use the all 0 address, the private key to this public key is known for SR25519 and ED25519, so you definitely do not want to use it there." ContentLicense="CC BY-SA 4.0" />
  <row Id="3574" PostHistoryTypeId="2" PostId="982" RevisionGUID="3d38cda4-3dab-40c7-98d3-0168463e2ded" CreationDate="2022-03-22T04:04:36.227" UserId="28" Text="We have seen evidence that users can sign messages using the SR25519 and ED25519 key with all zeros.&#xD;&#xA;&#xD;&#xA;Why or how is the private key to this account known?&#xD;&#xA;&#xD;&#xA;Are there any other things users should be aware of when using SR25519 or ED25519?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3576" PostHistoryTypeId="1" PostId="982" RevisionGUID="3d38cda4-3dab-40c7-98d3-0168463e2ded" CreationDate="2022-03-22T04:04:36.227" UserId="28" Text="Why does the all 0 public key have a known private key in SR25519 and ED25519?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3577" PostHistoryTypeId="3" PostId="982" RevisionGUID="3d38cda4-3dab-40c7-98d3-0168463e2ded" CreationDate="2022-03-22T04:04:36.227" UserId="28" Text="|cryptography|sr25519|ed25519|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3578" PostHistoryTypeId="2" PostId="983" RevisionGUID="a3e61dd1-a3b0-4828-a91b-47ebfd25f39d" CreationDate="2022-03-22T04:15:39.333" UserId="393" Text="Answer the second question: &quot; Is it 16 from the NposCompactSolution16.0 ?&quot;. &#xD;&#xA;Yes and no, for yes part, it is 16; for no part, 16 does not come from NposCompactSolution16.0, it comes from (16). &#xD;&#xA;&#xD;&#xA;For more detail, you can see the following macros' definitions:&#xD;&#xA;1. syn/src/parse_macro_input.rs macro_rules! parse_macro_input&#xD;&#xA;2. Parse.parse in npos-elctions/solution-type/src/lib.rs&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3580" PostHistoryTypeId="2" PostId="984" RevisionGUID="53a0da7e-90da-4a15-923e-fb965dcdf043" CreationDate="2022-03-22T04:20:12.303" UserId="83" Text="In the Substrate documentation [here][1] and the Substrate reference documentation [here][2] it says the `authoring_version` *&quot;is the version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime&quot;*.&#xD;&#xA;&#xD;&#xA;In [this old pull request][3] for Substrate the `authoring_version` was incremented for Kusama but I am not clear why that was necessary. &#xD;&#xA;It appears to have changed because the following were changed since `paint` was renamed to `pallet` and those block authoring related dependencies changed:&#xD;&#xA;* `pallet-authorship` used instead of `paint-authorship`  &#xD;&#xA;* `pallet-authority-discovery` used instead of `paint-authority-discovery`&#xD;&#xA;* `pallet-babe` used instead of `paint-babe`&#xD;&#xA;Note that the babe pallet is used for authoring blocks, the authorship pallet is used to fetch the current block author and to create and submit unsigned extrinsics, and the authority-discovery pallet is used to *&quot;retrieve the current set of authorities&quot;*.&#xD;&#xA;&#xD;&#xA;Another situation when I think it should change is if you changed consensus mechanism, for example [this old pull request here][4] for the DataHighway changed it from Babe to Aura, but I think it was incorrect that they did not change the `authoring_version`.&#xD;&#xA;&#xD;&#xA;In the Substrate reference documentation [here][5] for `can_author_with`, instead of checking the `authoring_version`, it checks [here][6] if the *&quot;authoring runtimes (`spec_versions`) that this native runtime supports&quot;*&#xD;&#xA; matches the other version that is provided to determine whether it supports authoring blocks, where the other version may be associated with the version provided for a forkless runtime upgrade, which leads me to think that the `spec_version` would typically get bumped alongside an `authoring_version` bump.&#xD;&#xA;&#xD;&#xA;It also says in the Substrate source code [here][7] that *&quot;bug fixes should result in an increment of `spec_version` and possibly `authoring_version`, absolutely not `impl_version` since they change the semantics of the runtime&quot;*. I assume that means the `authoring_version` would only need to be incremented in the case of a bug fix to block authoring related dependencies.&#xD;&#xA;&#xD;&#xA;In the Substrate source code [here][8] it says that *&quot;Per convention: if the runtime behavior changes, increment `spec_version` and set `impl_version` to 0. If only runtime implementation changes and behavior does not, then leave `spec_version` as is and increment `impl_version`.&quot;*.&#xD;&#xA;I assume that the convention also requires that for changes related to authorship then when the runtime behaviour changes but the implementation does not change then you either increment `authoring_version` or set `authoring_version` to 0.&#xD;&#xA;I am not sure what they mean when they say runtime &quot;behavior&quot;.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/upgrades#runtime-versioning&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/node_testing/client/sc_executor/struct.RuntimeVersion.html#structfield.authoring_version&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/pull/600/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR98&#xD;&#xA;  [4]: https://github.com/DataHighway-DHX/node/pull/215/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR218&#xD;&#xA;  [5]: https://paritytech.github.io/substrate/master/node_testing/client/sc_executor/struct.NativeVersion.html#method.can_author_with&#xD;&#xA;  [6]: https://paritytech.github.io/substrate/master/node_testing/client/sc_executor/struct.NativeVersion.html#structfield.can_author_with&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/master/primitives/version/src/lib.rs#L155&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L121" ContentLicense="CC BY-SA 4.0" />
  <row Id="3582" PostHistoryTypeId="1" PostId="984" RevisionGUID="53a0da7e-90da-4a15-923e-fb965dcdf043" CreationDate="2022-03-22T04:20:12.303" UserId="83" Text="When are you required to change the `authoring_version` for forkless runtime upgrades?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3583" PostHistoryTypeId="3" PostId="984" RevisionGUID="53a0da7e-90da-4a15-923e-fb965dcdf043" CreationDate="2022-03-22T04:20:12.303" UserId="83" Text="|substrate-node|polkadot|runtime-upgrade|chainspec|authorship|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3584" PostHistoryTypeId="2" PostId="985" RevisionGUID="47f6d159-69a9-400b-9470-386e731ce589" CreationDate="2022-03-22T04:32:02.167" UserId="393" Text="For more details, how `AccountId` turns out to be `AccountId32` ? You can follow the following path:&#xD;&#xA; 1. in xxxx/runtime.rs(which use to config your node's runtime), you can find following code: &#xD;&#xA;&#xD;&#xA;    pub type AccountId = &lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;&#xD;&#xA;&#xD;&#xA; 2. See the definition of `&lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId`, you'll get &#xD;&#xA;&#xD;&#xA;    type AccountId = AccountId32;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3587" PostHistoryTypeId="5" PostId="984" RevisionGUID="795ed6c6-81b5-48c4-89ed-dade03c4f856" CreationDate="2022-03-22T04:39:44.217" UserId="83" Comment="add newline" Text="In the Substrate documentation [here][1] and the Substrate reference documentation [here][2] it says the `authoring_version` *&quot;is the version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime&quot;*.&#xD;&#xA;&#xD;&#xA;In [this old pull request][3] for Substrate the `authoring_version` was incremented for Kusama but I am not clear why that was necessary. &#xD;&#xA;It appears to have changed because the following were changed since `paint` was renamed to `pallet` and those block authoring related dependencies changed:&#xD;&#xA;* `pallet-authorship` used instead of `paint-authorship`  &#xD;&#xA;* `pallet-authority-discovery` used instead of `paint-authority-discovery`&#xD;&#xA;* `pallet-babe` used instead of `paint-babe`&#xD;&#xA;&#xD;&#xA;Note that the babe pallet is used for authoring blocks, the authorship pallet is used to fetch the current block author and to create and submit unsigned extrinsics, and the authority-discovery pallet is used to *&quot;retrieve the current set of authorities&quot;*.&#xD;&#xA;&#xD;&#xA;Another situation when I think it should change is if you changed consensus mechanism, for example [this old pull request here][4] for the DataHighway changed it from Babe to Aura, but I think it was incorrect that they (me) did not change the `authoring_version`.&#xD;&#xA;&#xD;&#xA;In the Substrate reference documentation [here][5] for `can_author_with`, instead of checking the `authoring_version`, it checks [here][6] if the *&quot;authoring runtimes (`spec_versions`) that this native runtime supports&quot;*&#xD;&#xA; matches the other version that is provided to determine whether it supports authoring blocks, where the other version may be associated with the version provided for a forkless runtime upgrade, which leads me to think that the `spec_version` would typically get bumped alongside an `authoring_version` bump.&#xD;&#xA;&#xD;&#xA;It also says in the Substrate source code [here][7] that *&quot;bug fixes should result in an increment of `spec_version` and possibly `authoring_version`, absolutely not `impl_version` since they change the semantics of the runtime&quot;*. I assume that means the `authoring_version` would only need to be incremented in the case of a bug fix to block authoring related dependencies.&#xD;&#xA;&#xD;&#xA;In the Substrate source code [here][8] it says that *&quot;Per convention: if the runtime behavior changes, increment `spec_version` and set `impl_version` to 0. If only runtime implementation changes and behavior does not, then leave `spec_version` as is and increment `impl_version`.&quot;*.&#xD;&#xA;I assume that the convention also requires that for changes related to authorship then when the runtime behaviour changes but the implementation does not change then you either increment `authoring_version` or set `authoring_version` to 0.&#xD;&#xA;I am not sure what they mean when they say runtime &quot;behavior&quot;.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/upgrades#runtime-versioning&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/node_testing/client/sc_executor/struct.RuntimeVersion.html#structfield.authoring_version&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/pull/600/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR98&#xD;&#xA;  [4]: https://github.com/DataHighway-DHX/node/pull/215/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR218&#xD;&#xA;  [5]: https://paritytech.github.io/substrate/master/node_testing/client/sc_executor/struct.NativeVersion.html#method.can_author_with&#xD;&#xA;  [6]: https://paritytech.github.io/substrate/master/node_testing/client/sc_executor/struct.NativeVersion.html#structfield.can_author_with&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/master/primitives/version/src/lib.rs#L155&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L121" ContentLicense="CC BY-SA 4.0" />
  <row Id="3590" PostHistoryTypeId="2" PostId="986" RevisionGUID="f288781d-aaa1-4e20-9511-3f0341a91641" CreationDate="2022-03-22T05:37:24.593" UserId="283" Text="SR25519 is a Schnorr Signature protocol on top of the [Ristretto](https://ristretto.group/) compressed point format of the Ed25519 curve. &#xD;&#xA;&#xD;&#xA;Bitcoin and Ethereum both use the Secp256k1 elliptic curve.&#xD;&#xA;&#xD;&#xA;In elliptic-curve cryptography, public keys are points. In the Ed25519 curve, 0 is a member of the curve, while in Secp256k1 it is not.&#xD;&#xA;&#xD;&#xA;The secret key (a scalar value) corresponding to this point on the Ed25519 curve is, itself, 0." ContentLicense="CC BY-SA 4.0" />
  <row Id="3592" PostHistoryTypeId="2" PostId="987" RevisionGUID="3a8fb42b-3634-425c-a09e-52a0c003eaeb" CreationDate="2022-03-22T06:45:55.283" UserId="1810" Text="Yes, it's a consequence of the Edwards curve models used, but secp256k1 is a short Weierstrass curve.&#xD;&#xA;&#xD;&#xA;Ed25519 has the identity `(0,1)` in Affine coordinates, meaning `(0,1) + (0,1) = (0,1)` in Ed25519.  It little endian encodes as `[1u8, 0u8, ..., 0u8]`, not all zeros.&#xD;&#xA;&#xD;&#xA;In fact `[0u8; 32]` decodes as `(1,0)` because -1 is a square in F_q with q = 2^255-19, since q is divisible by 4.  It follows `(1,0)` lies on the curve.   It's not in the distinguished prime order subgroup, but `(1,0) + (1,0) = (0,1)` in Ed25519, so `(1,0)` still acts like the identity in sane Ed25519 protocols.  See page 6 of [Ed25519 paper][2].&#xD;&#xA;&#xD;&#xA;Ristretto decompresses `[0u8; 32]` as the [identity][1].  It's arguably somewhat by chance, except Mike Hamberg avoided crazy constants in the Jacobi quartic encoding, so zero stuck around from Ed25519.&#xD;&#xA;&#xD;&#xA;If you want unspendable funds then choose a point via hash-to-curve, which also lets you encode an undependable reason, and control who knows they're unspendable.&#xD;&#xA;&#xD;&#xA;  [1]: https://ristretto.group/test_vectors/ristretto255.html?highlight=identity#test-vectors-for--ristretto255&#xD;&#xA;  [2]: https://ed25519.cr.yp.to/ed25519-20110926.pdf" ContentLicense="CC BY-SA 4.0" />
  <row Id="3594" PostHistoryTypeId="2" PostId="988" RevisionGUID="b9fb9c2e-7f92-4a12-95f4-20db556a7380" CreationDate="2022-03-22T06:55:22.127" UserId="1811" Text="I am very interested in any documentation with examples of how to send NFTs from one parachain to another with XCM." ContentLicense="CC BY-SA 4.0" />
  <row Id="3596" PostHistoryTypeId="1" PostId="988" RevisionGUID="b9fb9c2e-7f92-4a12-95f4-20db556a7380" CreationDate="2022-03-22T06:55:22.127" UserId="1811" Text="Non Fungible Token XCM transfer documentation" ContentLicense="CC BY-SA 4.0" />
  <row Id="3597" PostHistoryTypeId="3" PostId="988" RevisionGUID="b9fb9c2e-7f92-4a12-95f4-20db556a7380" CreationDate="2022-03-22T06:55:22.127" UserId="1811" Text="|parachain|xcm|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3598" PostHistoryTypeId="2" PostId="989" RevisionGUID="7eb28448-5e04-4204-aa43-70326a8e63e1" CreationDate="2022-03-22T07:13:33.953" UserId="620" Text="This is not quite possible on XCM V2, but will be very soon once V3 gets into the runtime. The PR for adding non-fungibles is here: https://github.com/paritytech/polkadot/pull/4950" ContentLicense="CC BY-SA 4.0" />
  <row Id="3600" PostHistoryTypeId="2" PostId="990" RevisionGUID="974ebd89-0599-4c82-9a80-9a9696731b21" CreationDate="2022-03-22T07:14:32.443" UserId="139" Text="I am trying to benchmark `pallet_election_provider_multi_phase` and after quite some time of normal running I get this error which halts the benchmark: &#xD;&#xA;```&#xD;&#xA;2022-03-21 14:52:03 Running Benchmark:  pallet_election_provider_multi_phase    elect_queued    100/50  0/1    &#xD;&#xA;2022-03-21 14:52:08 Running Benchmark:  pallet_election_provider_multi_phase    elect_queued    101/50  0/1    &#xD;&#xA;2022-03-21 14:52:08 [0]  generated 4 npos voters, 3 from validators and 1 nominators    &#xD;&#xA;2022-03-21 14:52:08 [#0]   creating a snapshot with metadata SolutionOrSnapshotSize { voters: 4, targets: 3 }    &#xD;&#xA;2022-03-21 14:52:08 [#0]   Starting signed phase round 1.    &#xD;&#xA;2022-03-21 14:52:08 [0]  generated 4 npos voters, 3 from validators and 1 nominators    &#xD;&#xA;2022-03-21 14:52:08 [#0]   creating a snapshot with metadata SolutionOrSnapshotSize { voters: 4, targets: 3 }    &#xD;&#xA;2022-03-21 14:52:08 [#0]   Starting signed phase round 1.    &#xD;&#xA;Error: Input(&quot;SignedCannotPayDeposit&quot;)&#xD;&#xA;```&#xD;&#xA;How can I fix this? Here's my dev chain spec: &#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;fn development_config_genesis() -&gt; GenesisConfig {&#xD;&#xA;	let wasm_binary = WASM_BINARY.expect(&quot;Development wasm not available&quot;);&#xD;&#xA;	testnet_genesis(&#xD;&#xA;		wasm_binary,&#xD;&#xA;		// Initial authorities aka stakers&#xD;&#xA;		vec![&#xD;&#xA;			authority_keys_from_seed(&quot;Alice&quot;),&#xD;&#xA;		],&#xD;&#xA;		// Sudo account&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		// Initial nominators&#xD;&#xA;		vec![],&#xD;&#xA;	)&#xD;&#xA;}&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;	wasm_binary: &amp;[u8],&#xD;&#xA;	initial_authorities: Vec&lt;(&#xD;&#xA;		AccountId, // Stash&#xD;&#xA;		AccountId, // Controller&#xD;&#xA;		GrandpaId,&#xD;&#xA;		BabeId,&#xD;&#xA;		ImOnlineId,&#xD;&#xA;		AuthorityDiscoveryId,&#xD;&#xA;	)&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	initial_nominators: Vec&lt;AccountId&gt;,&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;	let mut rng = rand::thread_rng();&#xD;&#xA;	let mut endowed_accounts = vec![&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;	];&#xD;&#xA;	let stakers = initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator))&#xD;&#xA;		.chain(initial_nominators.iter().map(|nom| {&#xD;&#xA;			use rand::{seq::SliceRandom, Rng};&#xD;&#xA;			let limit = (MAX_NOMINATIONS as usize).min(initial_authorities.len());&#xD;&#xA;			let count = rng.gen::&lt;usize&gt;() % limit;&#xD;&#xA;			let nominations = initial_authorities&#xD;&#xA;				.as_slice()&#xD;&#xA;				.choose_multiple(&amp;mut rng, count)&#xD;&#xA;				.into_iter()&#xD;&#xA;				.map(|choice| choice.0.clone())&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;			(nom.clone(), nom.clone(), STASH, StakerStatus::Nominator(nominations))&#xD;&#xA;		}))&#xD;&#xA;		.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let num_endowed_accounts = endowed_accounts.len();&#xD;&#xA;	const ENDOWMENT: Balance = 10_000_000 * DOLLARS;&#xD;&#xA;	const STASH: Balance = ENDOWMENT / 1000;&#xD;&#xA;&#xD;&#xA;	initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| &amp;x.0)&#xD;&#xA;		.chain(initial_nominators.iter())&#xD;&#xA;		.for_each(|x| {&#xD;&#xA;			if !endowed_accounts.contains(x) {&#xD;&#xA;				endowed_accounts.push(x.clone())&#xD;&#xA;			}&#xD;&#xA;		});&#xD;&#xA;&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		system: SystemConfig {&#xD;&#xA;			// Add Wasm runtime to storage.&#xD;&#xA;			code: wasm_binary.to_vec(),&#xD;&#xA;			changes_trie_config: Default::default(),&#xD;&#xA;		},&#xD;&#xA;		authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			balances: endowed_accounts&#xD;&#xA;				.iter()&#xD;&#xA;				.cloned()&#xD;&#xA;				.map(|k| (k, ENDOWMENT))&#xD;&#xA;				.collect(),&#xD;&#xA;		},&#xD;&#xA;		babe: BabeConfig {&#xD;&#xA;			authorities: vec![],&#xD;&#xA;			epoch_config: Some(BabeEpochConfiguration {&#xD;&#xA;				c: (1, 4),&#xD;&#xA;				allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,&#xD;&#xA;			}),&#xD;&#xA;		},&#xD;&#xA;		grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;		im_online: ImOnlineConfig { keys: vec![] },&#xD;&#xA;		session: SessionConfig {&#xD;&#xA;			keys: initial_authorities&#xD;&#xA;				.iter()&#xD;&#xA;				.map(|x| {&#xD;&#xA;					(&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						session_keys(x.3.clone(), x.2.clone(), x.4.clone(), x.5.clone()),&#xD;&#xA;					)&#xD;&#xA;				})&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;		},&#xD;&#xA;		sudo: SudoConfig {&#xD;&#xA;			// Assign network admin rights.&#xD;&#xA;			key: root_key,&#xD;&#xA;		},&#xD;&#xA;		staking: StakingConfig {&#xD;&#xA;			validator_count: initial_authorities.len() as u32,&#xD;&#xA;			minimum_validator_count: initial_authorities.len() as u32,&#xD;&#xA;			invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),&#xD;&#xA;			slash_reward_fraction: Perbill::from_percent(10),&#xD;&#xA;			stakers,&#xD;&#xA;			..Default::default()&#xD;&#xA;		},&#xD;&#xA;		treasury: Default::default(),&#xD;&#xA;		council: CouncilConfig::default(),&#xD;&#xA;		indices: IndicesConfig { indices: vec![] },&#xD;&#xA;		elections: ElectionsConfig {&#xD;&#xA;			members: endowed_accounts&#xD;&#xA;				.iter()&#xD;&#xA;				.take((num_endowed_accounts + 1) / 2)&#xD;&#xA;				.cloned()&#xD;&#xA;				.map(|member| (member, STASH))&#xD;&#xA;				.collect(),&#xD;&#xA;		},&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3602" PostHistoryTypeId="1" PostId="990" RevisionGUID="974ebd89-0599-4c82-9a80-9a9696731b21" CreationDate="2022-03-22T07:14:32.443" UserId="139" Text="Unable to run election provider multiphase benchmark" ContentLicense="CC BY-SA 4.0" />
  <row Id="3603" PostHistoryTypeId="3" PostId="990" RevisionGUID="974ebd89-0599-4c82-9a80-9a9696731b21" CreationDate="2022-03-22T07:14:32.443" UserId="139" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3604" PostHistoryTypeId="2" PostId="991" RevisionGUID="9bf4788f-0e74-48fa-90de-bfe0dbd6a9ff" CreationDate="2022-03-22T07:16:39.860" UserId="1806" Text="Using either a Rust or JavaScript client library I would like to get the amount of DOT that is currently being unbonded on the relay chain.&#xD;&#xA;&#xD;&#xA;Some staking information is available on the Polkadot JS interface:&#xD;&#xA;&#xD;&#xA;[![Staking information][1]][1]&#xD;&#xA;&#xD;&#xA;But it does not include any information about the amount of DOT that is being unstaked (i.e. DOT that is currently in the 28 day unbonding period).&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mS0IA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3606" PostHistoryTypeId="1" PostId="991" RevisionGUID="9bf4788f-0e74-48fa-90de-bfe0dbd6a9ff" CreationDate="2022-03-22T07:16:39.860" UserId="1806" Text="How to programmatically get current unbonding information on the Polkadot relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3607" PostHistoryTypeId="3" PostId="991" RevisionGUID="9bf4788f-0e74-48fa-90de-bfe0dbd6a9ff" CreationDate="2022-03-22T07:16:39.860" UserId="1806" Text="|rust|rpc|staking|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3608" PostHistoryTypeId="2" PostId="992" RevisionGUID="4d30ec73-2dc0-4e5a-b01e-c5b652d1b9ef" CreationDate="2022-03-22T07:16:39.860" UserId="1806" Text="Here's an example of how I managed to get this information using the `@polkadot` JavaScript libraries.&#xD;&#xA;&#xD;&#xA;1. Import the correct libraries&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;yarn add @polkadot/api @polkadot/util&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;var { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;var util = require('@polkadot/util');&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Initialize the WebSocket provider&#xD;&#xA;&#xD;&#xA;Here we use the publicly provided WebSocket RPC endpoint from polkadot.io (`wss://rpc.polkadot.io`).&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const provider = new WsProvider(&quot;wss://rpc.polkadot.io&quot;, false);&#xD;&#xA;provider.connect();&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;// ...&#xD;&#xA;provider.disconnect()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Get staking/unlocking information for current era&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let currentEra = await api.query.staking.currentEra()&#xD;&#xA;let storageKey = ''&#xD;&#xA;let total = util.BN_ZERO&#xD;&#xA;&#xD;&#xA;while (true) {&#xD;&#xA;    let stakingEntries = await api.query.staking.ledger.entriesPaged({ args: [], pageSize: 100, startKey: storageKey })&#xD;&#xA;&#xD;&#xA;    if (stakingEntries.length == 0) {&#xD;&#xA;        break&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for (entry of stakingEntries) {&#xD;&#xA;        storageKey = entry[0]&#xD;&#xA;        for (item of entry[1].unwrap().unlocking) {&#xD;&#xA;            if (item.era.toNumber() == currentEra) {&#xD;&#xA;                total = total.add(item.value.toBn())&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    console.log('Processed entries:', stakingEntries.length)&#xD;&#xA;    console.log('Storage key:', storageKey.toString().substring(65))&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;console.log('Era:', currentEra.toString())&#xD;&#xA;console.log('Total:', total.toString().substring(0, total.toString().length-10), 'DOT')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The full program looks like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;var { ApiPromise, WsProvider } = require('@polkadot/api')&#xD;&#xA;var util = require('@polkadot/util')&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;    const provider = new WsProvider('wss://rpc.polkadot.io', false)&#xD;&#xA;    provider.connect()&#xD;&#xA;    const api = await ApiPromise.create({ provider })&#xD;&#xA;&#xD;&#xA;    let currentEra = await api.query.staking.currentEra()&#xD;&#xA;    let storageKey = ''&#xD;&#xA;    let total = util.BN_ZERO&#xD;&#xA;&#xD;&#xA;    while (true) {&#xD;&#xA;        let stakingEntries = await api.query.staking.ledger.entriesPaged({ args: [], pageSize: 100, startKey: storageKey })&#xD;&#xA;&#xD;&#xA;        if (stakingEntries.length == 0) {&#xD;&#xA;            break&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        for (entry of stakingEntries) {&#xD;&#xA;            storageKey = entry[0]&#xD;&#xA;            for (item of entry[1].unwrap().unlocking) {&#xD;&#xA;                if (item.era.toNumber() == currentEra) {&#xD;&#xA;                    total = total.add(item.value.toBn())&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        console.log('Processed entries:', stakingEntries.length)&#xD;&#xA;        console.log('Storage key:', storageKey.toString().substring(65))&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    console.log('Era:', currentEra.toString())&#xD;&#xA;    console.log('Total:', total.toString().substring(0, total.toString().length-10), 'DOT')&#xD;&#xA;&#xD;&#xA;    provider.disconnect()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The final output looks like this:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;Era: 658&#xD;&#xA;Total: 61119 DOT&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3610" PostHistoryTypeId="5" PostId="992" RevisionGUID="c90a84d3-f8d5-405a-8774-ee72a933199a" CreationDate="2022-03-22T07:41:34.220" UserId="1806" Comment="deleted 3 characters in body" Text="Here's an example of how I managed to get this information using the `@polkadot` JavaScript libraries.&#xD;&#xA;&#xD;&#xA;1. Import the correct libraries&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;yarn add @polkadot/api @polkadot/util&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;var { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;var util = require('@polkadot/util');&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Initialize the WebSocket provider&#xD;&#xA;&#xD;&#xA;Here we use the publicly provided WebSocket RPC endpoint from polkadot.io (`wss://rpc.polkadot.io`).&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const provider = new WsProvider(&quot;wss://rpc.polkadot.io&quot;, false);&#xD;&#xA;provider.connect();&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;// ...&#xD;&#xA;provider.disconnect()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Get staking/unlocking information for current era&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let currentEra = await api.query.staking.currentEra()&#xD;&#xA;let storageKey = ''&#xD;&#xA;let total = util.BN_ZERO&#xD;&#xA;&#xD;&#xA;while (true) {&#xD;&#xA;    let stakingEntries = await api.query.staking.ledger.entriesPaged({ args: [], pageSize: 100, startKey: storageKey })&#xD;&#xA;&#xD;&#xA;    if (stakingEntries.length == 0) {&#xD;&#xA;        break&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for (entry of stakingEntries) {&#xD;&#xA;        storageKey = entry[0]&#xD;&#xA;        for (item of entry[1].unwrap().unlocking) {&#xD;&#xA;            if (item.era.toNumber() &gt;= currentEra) {&#xD;&#xA;                total = total.add(item.value.toBn())&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    console.log('Processed entries:', stakingEntries.length)&#xD;&#xA;    console.log('Storage key:', storageKey.toString())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;console.log('From Era:', currentEra.toString())&#xD;&#xA;console.log('Total:', total.toString().substring(0, total.toString().length-10), 'DOT')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The full program looks like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;var { ApiPromise, WsProvider } = require('@polkadot/api')&#xD;&#xA;var util = require('@polkadot/util')&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;    const provider = new WsProvider('wss://rpc.polkadot.io', false)&#xD;&#xA;    provider.connect()&#xD;&#xA;    const api = await ApiPromise.create({ provider })&#xD;&#xA;&#xD;&#xA;    let currentEra = await api.query.staking.currentEra()&#xD;&#xA;    let storageKey = ''&#xD;&#xA;    let total = util.BN_ZERO&#xD;&#xA;&#xD;&#xA;    while (true) {&#xD;&#xA;        let stakingEntries = await api.query.staking.ledger.entriesPaged({ args: [], pageSize: 100, startKey: storageKey })&#xD;&#xA;&#xD;&#xA;        if (stakingEntries.length == 0) {&#xD;&#xA;            break&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        for (entry of stakingEntries) {&#xD;&#xA;            storageKey = entry[0]&#xD;&#xA;            for (item of entry[1].unwrap().unlocking) {&#xD;&#xA;                if (item.era.toNumber() &gt;= currentEra) {&#xD;&#xA;                    total = total.add(item.value.toBn())&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        console.log('Processed entries:', stakingEntries.length)&#xD;&#xA;        console.log('Storage key:', storageKey.toString())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    console.log('From Era:', currentEra.toString())&#xD;&#xA;    console.log('Total:', total.toString().substring(0, total.toString().length-10), 'DOT')&#xD;&#xA;&#xD;&#xA;    provider.disconnect()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The final output looks like this:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;From Era: 658&#xD;&#xA;Total: 33881435 DOT&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3611" PostHistoryTypeId="5" PostId="992" RevisionGUID="503d2871-5eea-4f21-a700-ad2f02fc668e" CreationDate="2022-03-22T07:46:58.090" UserId="1806" Comment="deleted 3 characters in body" Text="Here's an example of how I managed to get this information using the `@polkadot` JavaScript libraries.&#xD;&#xA;&#xD;&#xA;1. Import the correct libraries&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;yarn add @polkadot/api @polkadot/util&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;var { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;var util = require('@polkadot/util');&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Initialize the WebSocket provider&#xD;&#xA;&#xD;&#xA;Here we use the publicly provided WebSocket RPC endpoint from polkadot.io (`wss://rpc.polkadot.io`).&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const provider = new WsProvider(&quot;wss://rpc.polkadot.io&quot;, false);&#xD;&#xA;provider.connect();&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;// ...&#xD;&#xA;provider.disconnect()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Get staking/unlocking information for current era&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// ...&#xD;&#xA;let currentEra = await api.query.staking.currentEra()&#xD;&#xA;let storageKey = ''&#xD;&#xA;let total = util.BN_ZERO&#xD;&#xA;&#xD;&#xA;while (true) {&#xD;&#xA;    let stakingEntries = await api.query.staking.ledger.entriesPaged({ args: [], pageSize: 100, startKey: storageKey })&#xD;&#xA;&#xD;&#xA;    if (stakingEntries.length == 0) {&#xD;&#xA;        break&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for (entry of stakingEntries) {&#xD;&#xA;        storageKey = entry[0]&#xD;&#xA;        for (item of entry[1].unwrap().unlocking) {&#xD;&#xA;            if (item.era.toNumber() &gt;= currentEra) {&#xD;&#xA;                total = total.add(item.value.toBn())&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The full program looks like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;var { ApiPromise, WsProvider } = require('@polkadot/api')&#xD;&#xA;var util = require('@polkadot/util')&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;    const provider = new WsProvider('wss://rpc.polkadot.io', false)&#xD;&#xA;    provider.connect()&#xD;&#xA;    const api = await ApiPromise.create({ provider })&#xD;&#xA;&#xD;&#xA;    let currentEra = await api.query.staking.currentEra()&#xD;&#xA;    let storageKey = ''&#xD;&#xA;    let total = util.BN_ZERO&#xD;&#xA;&#xD;&#xA;    while (true) {&#xD;&#xA;        let stakingEntries = await api.query.staking.ledger.entriesPaged({ args: [], pageSize: 100, startKey: storageKey })&#xD;&#xA;&#xD;&#xA;        if (stakingEntries.length == 0) {&#xD;&#xA;            break&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        for (entry of stakingEntries) {&#xD;&#xA;            storageKey = entry[0]&#xD;&#xA;            for (item of entry[1].unwrap().unlocking) {&#xD;&#xA;                if (item.era.toNumber() &gt;= currentEra) {&#xD;&#xA;                    total = total.add(item.value.toBn())&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        console.log('Processed entries:', stakingEntries.length)&#xD;&#xA;        console.log('Storage key:', storageKey.toString())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    console.log('From era:', currentEra.toString())&#xD;&#xA;    console.log('Total unstaking:', total.toString().substring(0, total.toString().length-10), 'DOT')&#xD;&#xA;&#xD;&#xA;    provider.disconnect()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The final output looks like this:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;From era: 658&#xD;&#xA;Total unstaking: 33881435 DOT&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3612" PostHistoryTypeId="5" PostId="991" RevisionGUID="fb9945a6-0bf3-4e88-8bb0-4a15c3bed704" CreationDate="2022-03-22T07:50:31.370" UserId="1806" Comment="edited body" Text="Using either a Rust or JavaScript client library I would like to get the amount of DOT that is currently being unbonded on the relay chain.&#xD;&#xA;&#xD;&#xA;Some staking information is available in the Polkadot JS interface:&#xD;&#xA;&#xD;&#xA;[![Staking information][1]][1]&#xD;&#xA;&#xD;&#xA;But it does not include any information about the amount of DOT that is being unstaked (i.e. DOT that is currently in the 28 day unbonding period).&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mS0IA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3613" PostHistoryTypeId="5" PostId="990" RevisionGUID="298d71b9-cc57-44f0-b7e0-7e1e2ea3e283" CreationDate="2022-03-22T07:51:33.110" UserId="139" Comment="deleted 4 characters in body" Text="I am trying to benchmark `pallet_election_provider_multi_phase` and after quite some time of normal running I get this error which halts the benchmark: &#xD;&#xA;```&#xD;&#xA;Running Benchmark:  pallet_election_provider_multi_phase    elect_queued    100/50  0/1    &#xD;&#xA;Running Benchmark:  pallet_election_provider_multi_phase    elect_queued    101/50  0/1    &#xD;&#xA;[0]  generated 4 npos voters, 3 from validators and 1 nominators    &#xD;&#xA;[#0]   creating a snapshot with metadata SolutionOrSnapshotSize { voters: 4, targets: 3 }    &#xD;&#xA;[#0]   Starting signed phase round 1.    &#xD;&#xA;[0]  generated 4 npos voters, 3 from validators and 1 nominators    &#xD;&#xA;[#0]   creating a snapshot with metadata SolutionOrSnapshotSize { voters: 4, targets: 3 }    &#xD;&#xA;[#0]   Starting signed phase round 1.    &#xD;&#xA;Error: Input(&quot;SignedCannotPayDeposit&quot;)&#xD;&#xA;```&#xD;&#xA;How can I fix this? Here's my dev chain spec: &#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;fn development_config_genesis() -&gt; GenesisConfig {&#xD;&#xA;	let wasm_binary = WASM_BINARY.expect(&quot;Development wasm not available&quot;);&#xD;&#xA;	testnet_genesis(&#xD;&#xA;		wasm_binary,&#xD;&#xA;		// Initial authorities aka stakers&#xD;&#xA;		vec![&#xD;&#xA;			authority_keys_from_seed(&quot;Alice&quot;),&#xD;&#xA;		],&#xD;&#xA;		// Sudo account&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		// Initial nominators&#xD;&#xA;		vec![],&#xD;&#xA;	)&#xD;&#xA;}&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;	wasm_binary: &amp;[u8],&#xD;&#xA;	initial_authorities: Vec&lt;(&#xD;&#xA;		AccountId, // Stash&#xD;&#xA;		AccountId, // Controller&#xD;&#xA;		GrandpaId,&#xD;&#xA;		BabeId,&#xD;&#xA;		ImOnlineId,&#xD;&#xA;		AuthorityDiscoveryId,&#xD;&#xA;	)&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	initial_nominators: Vec&lt;AccountId&gt;,&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;	let mut rng = rand::thread_rng();&#xD;&#xA;	let mut endowed_accounts = vec![&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;	];&#xD;&#xA;	let stakers = initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator))&#xD;&#xA;		.chain(initial_nominators.iter().map(|n| {&#xD;&#xA;			use rand::{seq::SliceRandom, Rng};&#xD;&#xA;			let limit = (MAX_NOMINATIONS as usize).min(initial_authorities.len());&#xD;&#xA;			let count = rng.gen::&lt;usize&gt;() % limit;&#xD;&#xA;			let nominations = initial_authorities&#xD;&#xA;				.as_slice()&#xD;&#xA;				.choose_multiple(&amp;mut rng, count)&#xD;&#xA;				.into_iter()&#xD;&#xA;				.map(|choice| choice.0.clone())&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;			(n.clone(), n.clone(), STASH, StakerStatus::Nominator(nominations))&#xD;&#xA;		}))&#xD;&#xA;		.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let num_endowed_accounts = endowed_accounts.len();&#xD;&#xA;	const ENDOWMENT: Balance = 10_000_000 * DOLLARS;&#xD;&#xA;	const STASH: Balance = ENDOWMENT / 1000;&#xD;&#xA;&#xD;&#xA;	initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| &amp;x.0)&#xD;&#xA;		.chain(initial_nominators.iter())&#xD;&#xA;		.for_each(|x| {&#xD;&#xA;			if !endowed_accounts.contains(x) {&#xD;&#xA;				endowed_accounts.push(x.clone())&#xD;&#xA;			}&#xD;&#xA;		});&#xD;&#xA;&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		system: SystemConfig {&#xD;&#xA;			// Add Wasm runtime to storage.&#xD;&#xA;			code: wasm_binary.to_vec(),&#xD;&#xA;			changes_trie_config: Default::default(),&#xD;&#xA;		},&#xD;&#xA;		authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			balances: endowed_accounts&#xD;&#xA;				.iter()&#xD;&#xA;				.cloned()&#xD;&#xA;				.map(|k| (k, ENDOWMENT))&#xD;&#xA;				.collect(),&#xD;&#xA;		},&#xD;&#xA;		babe: BabeConfig {&#xD;&#xA;			authorities: vec![],&#xD;&#xA;			epoch_config: Some(BabeEpochConfiguration {&#xD;&#xA;				c: (1, 4),&#xD;&#xA;				allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,&#xD;&#xA;			}),&#xD;&#xA;		},&#xD;&#xA;		grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;		im_online: ImOnlineConfig { keys: vec![] },&#xD;&#xA;		session: SessionConfig {&#xD;&#xA;			keys: initial_authorities&#xD;&#xA;				.iter()&#xD;&#xA;				.map(|x| {&#xD;&#xA;					(&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						session_keys(x.3.clone(), x.2.clone(), x.4.clone(), x.5.clone()),&#xD;&#xA;					)&#xD;&#xA;				})&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;		},&#xD;&#xA;		sudo: SudoConfig {&#xD;&#xA;			// Assign network admin rights.&#xD;&#xA;			key: root_key,&#xD;&#xA;		},&#xD;&#xA;		staking: StakingConfig {&#xD;&#xA;			validator_count: initial_authorities.len() as u32,&#xD;&#xA;			minimum_validator_count: initial_authorities.len() as u32,&#xD;&#xA;			invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),&#xD;&#xA;			slash_reward_fraction: Perbill::from_percent(10),&#xD;&#xA;			stakers,&#xD;&#xA;			..Default::default()&#xD;&#xA;		},&#xD;&#xA;		treasury: Default::default(),&#xD;&#xA;		council: CouncilConfig::default(),&#xD;&#xA;		indices: IndicesConfig { indices: vec![] },&#xD;&#xA;		elections: ElectionsConfig {&#xD;&#xA;			members: endowed_accounts&#xD;&#xA;				.iter()&#xD;&#xA;				.take((num_endowed_accounts + 1) / 2)&#xD;&#xA;				.cloned()&#xD;&#xA;				.map(|member| (member, STASH))&#xD;&#xA;				.collect(),&#xD;&#xA;		},&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3614" PostHistoryTypeId="5" PostId="992" RevisionGUID="3093a81f-64d7-4f03-b303-1f0670506139" CreationDate="2022-03-22T07:54:52.347" UserId="1806" Comment="added 1 character in body" Text="Here's an example of how I managed to get this information using the `@polkadot` JavaScript libraries.&#xD;&#xA;&#xD;&#xA;1. Import the correct libraries&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;yarn add @polkadot/api @polkadot/util&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;var { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;var util = require('@polkadot/util');&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Initialize the WebSocket provider&#xD;&#xA;&#xD;&#xA;Here we use the publicly provided WebSocket RPC endpoint from polkadot.io (`wss://rpc.polkadot.io`).&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const provider = new WsProvider(&quot;wss://rpc.polkadot.io&quot;, false);&#xD;&#xA;provider.connect();&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;// ...&#xD;&#xA;provider.disconnect()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Get staking/unlocking information from current era&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// ...&#xD;&#xA;let currentEra = await api.query.staking.currentEra()&#xD;&#xA;let storageKey = ''&#xD;&#xA;let total = util.BN_ZERO&#xD;&#xA;&#xD;&#xA;while (true) {&#xD;&#xA;    let stakingEntries = await api.query.staking.ledger.entriesPaged({ args: [], pageSize: 100, startKey: storageKey })&#xD;&#xA;&#xD;&#xA;    if (stakingEntries.length == 0) {&#xD;&#xA;        break&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for (entry of stakingEntries) {&#xD;&#xA;        storageKey = entry[0]&#xD;&#xA;        for (item of entry[1].unwrap().unlocking) {&#xD;&#xA;            if (item.era.toNumber() &gt;= currentEra) {&#xD;&#xA;                total = total.add(item.value.toBn())&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The full program looks like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;var { ApiPromise, WsProvider } = require('@polkadot/api')&#xD;&#xA;var util = require('@polkadot/util')&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;    const provider = new WsProvider('wss://rpc.polkadot.io', false)&#xD;&#xA;    provider.connect()&#xD;&#xA;    const api = await ApiPromise.create({ provider })&#xD;&#xA;&#xD;&#xA;    let currentEra = await api.query.staking.currentEra()&#xD;&#xA;    let storageKey = ''&#xD;&#xA;    let total = util.BN_ZERO&#xD;&#xA;&#xD;&#xA;    while (true) {&#xD;&#xA;        let stakingEntries = await api.query.staking.ledger.entriesPaged({ args: [], pageSize: 100, startKey: storageKey })&#xD;&#xA;&#xD;&#xA;        if (stakingEntries.length == 0) {&#xD;&#xA;            break&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        for (entry of stakingEntries) {&#xD;&#xA;            storageKey = entry[0]&#xD;&#xA;            for (item of entry[1].unwrap().unlocking) {&#xD;&#xA;                if (item.era.toNumber() &gt;= currentEra) {&#xD;&#xA;                    total = total.add(item.value.toBn())&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        console.log('Processed entries:', stakingEntries.length)&#xD;&#xA;        console.log('Storage key:', storageKey.toString())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    console.log('From era:', currentEra.toString())&#xD;&#xA;    console.log('Total unstaking:', total.toString().substring(0, total.toString().length-10), 'DOT')&#xD;&#xA;&#xD;&#xA;    provider.disconnect()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The final output looks like this:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;From era: 658&#xD;&#xA;Total unstaking: 33881435 DOT&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3615" PostHistoryTypeId="5" PostId="990" RevisionGUID="df351934-3e38-4df2-97ef-d3178642bf11" CreationDate="2022-03-22T07:58:45.803" UserId="139" Comment="added 123 characters in body" Text="I am trying to benchmark `pallet_election_provider_multi_phase` and after quite some time of normal running I get this error which halts the benchmark: &#xD;&#xA;```&#xD;&#xA;Running Benchmark:  pallet_election_provider_multi_phase    elect_queued    100/50  0/1    &#xD;&#xA;Running Benchmark:  pallet_election_provider_multi_phase    elect_queued    101/50  0/1    &#xD;&#xA;[0]  generated 4 npos voters, 3 from validators and 1 nominators    &#xD;&#xA;[#0]   creating a snapshot with metadata SolutionOrSnapshotSize { voters: 4, targets: 3 }    &#xD;&#xA;[#0]   Starting signed phase round 1.    &#xD;&#xA;[0]  generated 4 npos voters, 3 from validators and 1 nominators    &#xD;&#xA;[#0]   creating a snapshot with metadata SolutionOrSnapshotSize { voters: 4, targets: 3 }    &#xD;&#xA;[#0]   Starting signed phase round 1.    &#xD;&#xA;Error: Input(&quot;SignedCannotPayDeposit&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With `pallet_election_phragmen` I get a different error message: &#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;failed to submit candidacy&quot;)&#xD;&#xA;```&#xD;&#xA;How can I fix this? Here's my dev chain spec: &#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;fn development_config_genesis() -&gt; GenesisConfig {&#xD;&#xA;	let wasm_binary = WASM_BINARY.expect(&quot;Development wasm not available&quot;);&#xD;&#xA;	testnet_genesis(&#xD;&#xA;		wasm_binary,&#xD;&#xA;		// Initial authorities aka stakers&#xD;&#xA;		vec![&#xD;&#xA;			authority_keys_from_seed(&quot;Alice&quot;),&#xD;&#xA;		],&#xD;&#xA;		// Sudo account&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		// Initial nominators&#xD;&#xA;		vec![],&#xD;&#xA;	)&#xD;&#xA;}&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;	wasm_binary: &amp;[u8],&#xD;&#xA;	initial_authorities: Vec&lt;(&#xD;&#xA;		AccountId, // Stash&#xD;&#xA;		AccountId, // Controller&#xD;&#xA;		GrandpaId,&#xD;&#xA;		BabeId,&#xD;&#xA;		ImOnlineId,&#xD;&#xA;		AuthorityDiscoveryId,&#xD;&#xA;	)&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	initial_nominators: Vec&lt;AccountId&gt;,&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;	let mut rng = rand::thread_rng();&#xD;&#xA;	let mut endowed_accounts = vec![&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;	];&#xD;&#xA;	let stakers = initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator))&#xD;&#xA;		.chain(initial_nominators.iter().map(|n| {&#xD;&#xA;			use rand::{seq::SliceRandom, Rng};&#xD;&#xA;			let limit = (MAX_NOMINATIONS as usize).min(initial_authorities.len());&#xD;&#xA;			let count = rng.gen::&lt;usize&gt;() % limit;&#xD;&#xA;			let nominations = initial_authorities&#xD;&#xA;				.as_slice()&#xD;&#xA;				.choose_multiple(&amp;mut rng, count)&#xD;&#xA;				.into_iter()&#xD;&#xA;				.map(|choice| choice.0.clone())&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;			(n.clone(), n.clone(), STASH, StakerStatus::Nominator(nominations))&#xD;&#xA;		}))&#xD;&#xA;		.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let num_endowed_accounts = endowed_accounts.len();&#xD;&#xA;	const ENDOWMENT: Balance = 10_000_000 * DOLLARS;&#xD;&#xA;	const STASH: Balance = ENDOWMENT / 1000;&#xD;&#xA;&#xD;&#xA;	initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| &amp;x.0)&#xD;&#xA;		.chain(initial_nominators.iter())&#xD;&#xA;		.for_each(|x| {&#xD;&#xA;			if !endowed_accounts.contains(x) {&#xD;&#xA;				endowed_accounts.push(x.clone())&#xD;&#xA;			}&#xD;&#xA;		});&#xD;&#xA;&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		system: SystemConfig {&#xD;&#xA;			// Add Wasm runtime to storage.&#xD;&#xA;			code: wasm_binary.to_vec(),&#xD;&#xA;			changes_trie_config: Default::default(),&#xD;&#xA;		},&#xD;&#xA;		authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			balances: endowed_accounts&#xD;&#xA;				.iter()&#xD;&#xA;				.cloned()&#xD;&#xA;				.map(|k| (k, ENDOWMENT))&#xD;&#xA;				.collect(),&#xD;&#xA;		},&#xD;&#xA;		babe: BabeConfig {&#xD;&#xA;			authorities: vec![],&#xD;&#xA;			epoch_config: Some(BabeEpochConfiguration {&#xD;&#xA;				c: (1, 4),&#xD;&#xA;				allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,&#xD;&#xA;			}),&#xD;&#xA;		},&#xD;&#xA;		grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;		im_online: ImOnlineConfig { keys: vec![] },&#xD;&#xA;		session: SessionConfig {&#xD;&#xA;			keys: initial_authorities&#xD;&#xA;				.iter()&#xD;&#xA;				.map(|x| {&#xD;&#xA;					(&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						session_keys(x.3.clone(), x.2.clone(), x.4.clone(), x.5.clone()),&#xD;&#xA;					)&#xD;&#xA;				})&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;		},&#xD;&#xA;		sudo: SudoConfig {&#xD;&#xA;			// Assign network admin rights.&#xD;&#xA;			key: root_key,&#xD;&#xA;		},&#xD;&#xA;		staking: StakingConfig {&#xD;&#xA;			validator_count: initial_authorities.len() as u32,&#xD;&#xA;			minimum_validator_count: initial_authorities.len() as u32,&#xD;&#xA;			invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),&#xD;&#xA;			slash_reward_fraction: Perbill::from_percent(10),&#xD;&#xA;			stakers,&#xD;&#xA;			..Default::default()&#xD;&#xA;		},&#xD;&#xA;		treasury: Default::default(),&#xD;&#xA;		council: CouncilConfig::default(),&#xD;&#xA;		indices: IndicesConfig { indices: vec![] },&#xD;&#xA;		elections: ElectionsConfig {&#xD;&#xA;			members: endowed_accounts&#xD;&#xA;				.iter()&#xD;&#xA;				.take((num_endowed_accounts + 1) / 2)&#xD;&#xA;				.cloned()&#xD;&#xA;				.map(|member| (member, STASH))&#xD;&#xA;				.collect(),&#xD;&#xA;		},&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3616" PostHistoryTypeId="2" PostId="993" RevisionGUID="d25b80b7-501b-4ac3-bb3d-b3d65a65e01b" CreationDate="2022-03-22T08:29:24.570" UserId="1728" Text="I'm trying to use BoundedVec from `frame_support` for one of my storage items like this, &#xD;&#xA;```rust&#xD;&#xA;pub(super) type Payloads&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::BlockNumber, Vec&lt;Payload&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;However I'm confused how to implement `BoundedVec` here instead of `Vec` as I tried something like this which failed &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub(super) type Payloads&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::BlockNumber, BoundedVec&lt;Payload, 100&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Giving me the error, &#xD;&#xA;`error[E0747]: constant provided when a type was expected`&#xD;&#xA;&#xD;&#xA;Can someone who has already worked on this, give me an example of how to use BoundedVec? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3618" PostHistoryTypeId="1" PostId="993" RevisionGUID="d25b80b7-501b-4ac3-bb3d-b3d65a65e01b" CreationDate="2022-03-22T08:29:24.570" UserId="1728" Text="How to use bounded vector for storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="3619" PostHistoryTypeId="3" PostId="993" RevisionGUID="d25b80b7-501b-4ac3-bb3d-b3d65a65e01b" CreationDate="2022-03-22T08:29:24.570" UserId="1728" Text="|substrate-node|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3620" PostHistoryTypeId="2" PostId="994" RevisionGUID="cd027745-a972-4adb-818d-ccdb0817bc1d" CreationDate="2022-03-22T08:31:41.620" UserId="129" Text="Ater I called an contract, this is the extrinsic I found in the block:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;What are the field: value, storageDepositLimit mean?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XyLO7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3622" PostHistoryTypeId="1" PostId="994" RevisionGUID="cd027745-a972-4adb-818d-ccdb0817bc1d" CreationDate="2022-03-22T08:31:41.620" UserId="129" Text="What is &quot;value&quot; and &quot;storageDepositLimit&quot; in contract call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3623" PostHistoryTypeId="3" PostId="994" RevisionGUID="cd027745-a972-4adb-818d-ccdb0817bc1d" CreationDate="2022-03-22T08:31:41.620" UserId="129" Text="|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3624" PostHistoryTypeId="2" PostId="995" RevisionGUID="ecc7e7b5-860c-4e58-b9ed-9aac3d04060a" CreationDate="2022-03-22T09:03:19.017" UserId="145" Text="`BoundedVec` is defined [here][1] in the Substrate code base as below:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, scale_info::TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(S))]&#xD;&#xA;pub struct BoundedVec&lt;T, S&gt;(Vec&lt;T&gt;, PhantomData&lt;S&gt;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As the compiler message shows, it's expecting a type for the second generic parameter. You can use it as `BoundedVec&lt;Payload, ConstU32&lt;100&gt;&gt;` as you can also find in the `BoundedVec` [tests][2], which would make your type declaration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub(super) type Payloads&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::BlockNumber, BoundedVec&lt;Payload, ConstU32&lt;100&gt;&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/c6aa3209d6277b853f5eb15d74fb9812024ef23c/frame/support/src/storage/bounded_vec.rs#L33&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/c6aa3209d6277b853f5eb15d74fb9812024ef23c/frame/support/src/storage/bounded_vec.rs#L586" ContentLicense="CC BY-SA 4.0" />
  <row Id="3626" PostHistoryTypeId="2" PostId="996" RevisionGUID="12479a6f-ae3f-4db7-b4a2-9be64ac3dc9d" CreationDate="2022-03-22T09:07:58.013" UserId="403" Text="I am working on a substrate based blockchain that is in production. We started the node using PoA consensus but now we want to switch to PoS consensus. I did the necessary changes i.e added necessary pallets and switched from aura to babe. And when I run the node from scratch it's working fine. But the forkless upgrade of the existing chain is causing the block production to stop. I also tried to upgrade node binary which was throwing &quot;Unsupported or invalid BabeApi version&quot;.&#xD;&#xA;&#xD;&#xA;Can someone guide me on how to do it correctly? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3628" PostHistoryTypeId="1" PostId="996" RevisionGUID="12479a6f-ae3f-4db7-b4a2-9be64ac3dc9d" CreationDate="2022-03-22T09:07:58.013" UserId="403" Text="How to upgrade consensus engine of a live chain from PoA to PoS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3629" PostHistoryTypeId="3" PostId="996" RevisionGUID="12479a6f-ae3f-4db7-b4a2-9be64ac3dc9d" CreationDate="2022-03-22T09:07:58.013" UserId="403" Text="|consensus|npos|poa|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3630" PostHistoryTypeId="2" PostId="997" RevisionGUID="7058212c-34c7-47ad-a7f8-d96dd6a3f3d6" CreationDate="2022-03-22T09:14:06.200" UserId="1814" Text="Our testnet with 2 collators and 4 validators got stuck producing a single block more than 100 times before finally including it, then production resumed normally as if nothing happened. &#xD;&#xA;&#xD;&#xA;Can it be prevented? &#xD;&#xA;&#xD;&#xA;How can be parachain nudged from this state when it happens?&#xD;&#xA;&#xD;&#xA;This caused [RPC node DB corruption][1] and downtime for all RPC users. We didn't discover any anomalies in logs or node telemetry. It seems to be related to this cumulus [issue][2] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/galacticcouncil/Basilisk-node/issues/411&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/issues/432" ContentLicense="CC BY-SA 4.0" />
  <row Id="3632" PostHistoryTypeId="1" PostId="997" RevisionGUID="7058212c-34c7-47ad-a7f8-d96dd6a3f3d6" CreationDate="2022-03-22T09:14:06.200" UserId="1814" Text="Parachain block production stalls randomly" ContentLicense="CC BY-SA 4.0" />
  <row Id="3633" PostHistoryTypeId="3" PostId="997" RevisionGUID="7058212c-34c7-47ad-a7f8-d96dd6a3f3d6" CreationDate="2022-03-22T09:14:06.200" UserId="1814" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3634" PostHistoryTypeId="2" PostId="998" RevisionGUID="9b698adb-9324-4844-b7a8-f2a105a224e8" CreationDate="2022-03-22T09:16:29.650" UserId="1789" Text="My parachain:&#xD;&#xA;&#xD;&#xA;	type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;    	type Currency: ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;    		+ LockableCurrency&lt;Self::AccountId, Moment = Self::BlockNumber&gt;;&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;	#[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;	#[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		pub single_balance: BalanceOf&lt;T&gt;,&#xD;&#xA;		pub account_map: Vec&lt;(T::AccountId, BalanceOf&lt;T&gt;)&gt;,&#xD;&#xA;	}&#xD;&#xA;	#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	impl&lt;T: Config&gt; Default for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			Self { single_balance: Default::default(), account_map: Default::default() }&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// https://docs.substrate.io/v3/runtime/storage#declaring-storage-items&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_value)]&#xD;&#xA;	pub type SingleValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;; //&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_balance)]&#xD;&#xA;	pub type SingleBalance&lt;T: Config&gt; = StorageValue&lt;_, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	// A map that has enumerable entries.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn accounts)]&#xD;&#xA;	pub type AccountMap&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt;` is not satisfied&#xD;&#xA;&#xD;&#xA;    	#[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;`EncodeLike&lt;u32&gt;` is not implemented for `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;&#xD;&#xA;122 |     pub fn put&lt;Arg: EncodeLike&lt;Value&gt;&gt;(val: Arg) {&#xD;&#xA;&#xD;&#xA;    |                ^^^^^^^^^^^^^^^^ required by this bound in `frame_support::pallet_prelude::StorageValue::&lt;Prefix, Value, QueryKind, OnEmpty&gt;::put`&#xD;&#xA;&#xD;&#xA;help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; &#xD;&#xA;    where &amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt; {&#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="3636" PostHistoryTypeId="1" PostId="998" RevisionGUID="9b698adb-9324-4844-b7a8-f2a105a224e8" CreationDate="2022-03-22T09:16:29.650" UserId="1789" Text="trait `EncodeLike&lt;u32&gt;` is not implemented for `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`" ContentLicense="CC BY-SA 4.0" />
  <row Id="3637" PostHistoryTypeId="3" PostId="998" RevisionGUID="9b698adb-9324-4844-b7a8-f2a105a224e8" CreationDate="2022-03-22T09:16:29.650" UserId="1789" Text="|polkadot|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3638" PostHistoryTypeId="2" PostId="999" RevisionGUID="d86f87a8-079b-436d-b8b3-6fefe1ad0198" CreationDate="2022-03-22T09:20:02.413" UserId="73" Text="You need to change:&#xD;&#xA;```&#xD;&#xA;pub type SingleValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;to&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub type SingleValue&lt;T: Config&gt; = StorageValue&lt;_, BalanceOf&lt;T&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You tried to put the balance type into a `u32` which obviously doesn't work, because `BalanceOf&lt;T&gt;` could be any type." ContentLicense="CC BY-SA 4.0" />
  <row Id="3640" PostHistoryTypeId="5" PostId="998" RevisionGUID="281523c6-7c0c-42cb-b38f-6c97f7a39147" CreationDate="2022-03-22T09:26:51.160" UserId="1789" Comment="added 178 characters in body" Text="I was following this guide:&#xD;&#xA;Configuring Genesis for Balances https://docs.substrate.io/how-to-guides/v3/basics/genesis/&#xD;&#xA;&#xD;&#xA;In my parachain, I replaced `T::Balance` with `BalanceOf&lt;T&gt;`&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;	type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;    	type Currency: ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;    		+ LockableCurrency&lt;Self::AccountId, Moment = Self::BlockNumber&gt;;&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;	#[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;	#[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		pub single_balance: BalanceOf&lt;T&gt;,&#xD;&#xA;		pub account_map: Vec&lt;(T::AccountId, BalanceOf&lt;T&gt;)&gt;,&#xD;&#xA;	}&#xD;&#xA;	#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	impl&lt;T: Config&gt; Default for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			Self { single_balance: Default::default(), account_map: Default::default() }&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// https://docs.substrate.io/v3/runtime/storage#declaring-storage-items&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_value)]&#xD;&#xA;	pub type SingleValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;; //&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_balance)]&#xD;&#xA;	pub type SingleBalance&lt;T: Config&gt; = StorageValue&lt;_, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	// A map that has enumerable entries.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn accounts)]&#xD;&#xA;	pub type AccountMap&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt;` is not satisfied&#xD;&#xA;&#xD;&#xA;    	#[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;`EncodeLike&lt;u32&gt;` is not implemented for `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;&#xD;&#xA;122 |     pub fn put&lt;Arg: EncodeLike&lt;Value&gt;&gt;(val: Arg) {&#xD;&#xA;&#xD;&#xA;    |                ^^^^^^^^^^^^^^^^ required by this bound in `frame_support::pallet_prelude::StorageValue::&lt;Prefix, Value, QueryKind, OnEmpty&gt;::put`&#xD;&#xA;&#xD;&#xA;help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; &#xD;&#xA;    where &amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt; {&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3641" PostHistoryTypeId="5" PostId="966" RevisionGUID="76c7079f-a5aa-4b26-b73b-60ae6798c13c" CreationDate="2022-03-22T09:30:58.673" UserId="634" Comment="deleted 14 characters in body" Text="Substrate community! &#xD;&#xA;&#xD;&#xA;Recently I came across the substrate-archive project. It does its indexing job extremely well, and I wanted to utilize it with some modifications here and there. Things I wanted to change are the following:&#xD;&#xA;&#xD;&#xA;1. In table `storage`, I would like to add two varchar columns corresponding to the section and method of Substrate events. How do I decode these two out of the raw storage key?&#xD;&#xA;2. For every Substrate event that is in `storage` table, I need to additionally store its numeric index. Can this information be taken from the on-chain data? &#xD;&#xA;3. For every extrinsic, I would like to additionally store its section and method. &#xD;&#xA;4. For every extrinsic, I would like to store the **success** flag: whether the transaction was successful or not.&#xD;&#xA;5. For every extrinsic, I would like to store the **signed** flag: whether the transaction was signed or not.&#xD;&#xA;&#xD;&#xA;Any pointers of how to achieve the above are greatly appreciated! " ContentLicense="CC BY-SA 4.0" />
  <row Id="3642" PostHistoryTypeId="2" PostId="1000" RevisionGUID="eaaaabe8-d9bc-456d-9234-fff6bab920e0" CreationDate="2022-03-22T09:35:27.707" UserId="1817" Text="sorry if this is not the right forum, but here goes:&#xD;&#xA;&#xD;&#xA;```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.10.0 --force --locked```&#xD;&#xA;&#xD;&#xA;This fails with the latest rustup toolchain:&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-x86_64-apple-darwin (default)&#xD;&#xA;rustc 1.61.0-nightly (3b348d932 2022-02-19)&#xD;&#xA;&#xD;&#xA;The reason is: &#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable&#xD;&#xA;   --&gt; /Users/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.9.8/src/atomic.rs:314:6&#xD;&#xA;    |&#xD;&#xA;314 | impl&lt;T: ?Sized + Pointable&gt; Atomic&lt;T&gt; {&#xD;&#xA;    |      ^&#xD;&#xA;...&#xD;&#xA;346 |     pub const fn null() -&gt; Atomic&lt;T&gt; {&#xD;&#xA;    |     -------------------------------- function declared as const here&#xD;&#xA;    |&#xD;&#xA;    = note: see issue #93706 &lt;https://github.com/rust-lang/rust/issues/93706&gt; for more information&#xD;&#xA;    = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;How can I get past this? Seems an update is necessary&#xD;&#xA;Thx!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3644" PostHistoryTypeId="1" PostId="1000" RevisionGUID="eaaaabe8-d9bc-456d-9234-fff6bab920e0" CreationDate="2022-03-22T09:35:27.707" UserId="1817" Text="ink! tutorial: contracts-node fails to compile" ContentLicense="CC BY-SA 4.0" />
  <row Id="3645" PostHistoryTypeId="3" PostId="1000" RevisionGUID="eaaaabe8-d9bc-456d-9234-fff6bab920e0" CreationDate="2022-03-22T09:35:27.707" UserId="1817" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3646" PostHistoryTypeId="5" PostId="992" RevisionGUID="124c58f8-c5e9-4d42-81f8-13389d9bbb65" CreationDate="2022-03-22T09:47:49.867" UserId="1806" Comment="added 4 characters in body" Text="Here's an example of how I managed to get this information using the `@polkadot` JavaScript libraries.&#xD;&#xA;&#xD;&#xA;1. Import the Polkadot JS libraries&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;yarn add @polkadot/api @polkadot/util&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;var { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;var util = require('@polkadot/util');&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Initialize the WebSocket provider&#xD;&#xA;&#xD;&#xA;Here we use the publicly provided WebSocket RPC endpoint from polkadot.io (`wss://rpc.polkadot.io`).&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const provider = new WsProvider(&quot;wss://rpc.polkadot.io&quot;, false);&#xD;&#xA;provider.connect();&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;// ...&#xD;&#xA;provider.disconnect()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Get staking/unlocking information starting from current era&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// ...&#xD;&#xA;let currentEra = await api.query.staking.currentEra()&#xD;&#xA;let storageKey = ''&#xD;&#xA;let total = util.BN_ZERO&#xD;&#xA;&#xD;&#xA;while (true) {&#xD;&#xA;    let stakingEntries = await api.query.staking.ledger.entriesPaged({ args: [], pageSize: 100, startKey: storageKey })&#xD;&#xA;&#xD;&#xA;    if (stakingEntries.length == 0) {&#xD;&#xA;        break&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for (entry of stakingEntries) {&#xD;&#xA;        storageKey = entry[0]&#xD;&#xA;        for (item of entry[1].unwrap().unlocking) {&#xD;&#xA;            if (item.era.toNumber() &gt;= currentEra) {&#xD;&#xA;                total = total.add(item.value.toBn())&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The full program looks like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;var { ApiPromise, WsProvider } = require('@polkadot/api')&#xD;&#xA;var util = require('@polkadot/util')&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;    const provider = new WsProvider('wss://rpc.polkadot.io', false)&#xD;&#xA;    provider.connect()&#xD;&#xA;    const api = await ApiPromise.create({ provider })&#xD;&#xA;&#xD;&#xA;    let currentEra = await api.query.staking.currentEra()&#xD;&#xA;    let storageKey = ''&#xD;&#xA;    let total = util.BN_ZERO&#xD;&#xA;&#xD;&#xA;    while (true) {&#xD;&#xA;        let stakingEntries = await api.query.staking.ledger.entriesPaged({ args: [], pageSize: 100, startKey: storageKey })&#xD;&#xA;&#xD;&#xA;        if (stakingEntries.length == 0) {&#xD;&#xA;            break&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        for (entry of stakingEntries) {&#xD;&#xA;            storageKey = entry[0]&#xD;&#xA;            for (item of entry[1].unwrap().unlocking) {&#xD;&#xA;                if (item.era.toNumber() &gt;= currentEra) {&#xD;&#xA;                    total = total.add(item.value.toBn())&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        console.log('Processed entries:', stakingEntries.length)&#xD;&#xA;        console.log('Storage key:', storageKey.toString())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    console.log('From era:', currentEra.toString())&#xD;&#xA;    console.log('Total unstaking:', total.toString().substring(0, total.toString().length-10), 'DOT')&#xD;&#xA;&#xD;&#xA;    provider.disconnect()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The final output looks like this:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;From era: 658&#xD;&#xA;Total unstaking: 33881435 DOT&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3648" PostHistoryTypeId="2" PostId="1001" RevisionGUID="6410c994-c28c-4e75-a78b-d22546868991" CreationDate="2022-03-22T10:23:32.203" UserId="501" Text="I followed the steps in [this cumulus tutorial][1], all is running fine and smooth, but I can't find the template pallet or any other pallet I try to add in the parachain.&#xD;&#xA;&#xD;&#xA; - Is it normal ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've [read that][2]:&#xD;&#xA;&#xD;&#xA;&gt; You cannot, at this time, connect a parachain with any previous state to a relay chain.&#xD;&#xA;&#xD;&#xA;  - So maybe I have to live-upgrade the parachain to include the new pallets ?&#xD;&#xA;&#xD;&#xA;  - What are the steps to include custom logic in a parachain ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/start-relay/&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="3650" PostHistoryTypeId="1" PostId="1001" RevisionGUID="6410c994-c28c-4e75-a78b-d22546868991" CreationDate="2022-03-22T10:23:32.203" UserId="501" Text="Pallets extrinsics not showing in a relay-chain/parachain setup" ContentLicense="CC BY-SA 4.0" />
  <row Id="3651" PostHistoryTypeId="3" PostId="1001" RevisionGUID="6410c994-c28c-4e75-a78b-d22546868991" CreationDate="2022-03-22T10:23:32.203" UserId="501" Text="|parachain|relay-chain|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3652" PostHistoryTypeId="2" PostId="1002" RevisionGUID="a173205e-c5bb-404e-bcf6-17f328aad75e" CreationDate="2022-03-22T10:41:01.663" UserId="380" Text="I am making use of JS tests to check my contract calls however there is a large amount of setup required before each test. This means the tests take a very long time to run. I know the substrate database is stored temporarily on disk:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ls -larth /tmp/substratebziLB2/chains/dev/db/full&#xD;&#xA;total 30M&#xD;&#xA;drwxr-xr-x 3 root root 4.0K Mar 22 09:28 ..&#xD;&#xA;-rw-r--r-- 1 root root    0 Mar 22 09:28 LOCK&#xD;&#xA;-rw-r--r-- 1 root root   36 Mar 22 09:28 IDENTITY&#xD;&#xA;-rw-r--r-- 1 root root   16 Mar 22 09:28 CURRENT&#xD;&#xA;-rw-r--r-- 1 root root  51K Mar 22 09:28 OPTIONS-000035&#xD;&#xA;-rw-r--r-- 1 root root  55K Mar 22 09:28 OPTIONS-000037&#xD;&#xA;-rw-r--r-- 1 root root    1 Mar 22 09:28 db_version&#xD;&#xA;-rw-r--r-- 1 root root 4.1M Mar 22 09:48 000038.log&#xD;&#xA;-rw-r--r-- 1 root root 5.2M Mar 22 09:48 000009.log&#xD;&#xA;-rw-r--r-- 1 root root 4.2M Mar 22 10:07 000041.log&#xD;&#xA;-rw-r--r-- 1 root root 4.1M Mar 22 10:07 000039.log&#xD;&#xA;-rw-r--r-- 1 root root 335K Mar 22 10:07 000044.sst&#xD;&#xA;-rw-r--r-- 1 root root 184K Mar 22 10:27 000047.sst&#xD;&#xA;drwxr-xr-x 2 root root 4.0K Mar 22 10:27 .&#xD;&#xA;-rw-r--r-- 1 root root 1.2K Mar 22 10:27 MANIFEST-000008&#xD;&#xA;-rw-r--r-- 1 root root 4.1M Mar 22 10:27 000045.log&#xD;&#xA;-rw-r--r-- 1 root root 4.3M Mar 22 10:27 000042.log&#xD;&#xA;-rw-r--r-- 1 root root 310K Mar 22 10:28 LOG&#xD;&#xA;-rw-r--r-- 1 root root 3.1M Mar 22 10:34 000046.log&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the process for creating a snapshot of the database and reloading at runtime? I'm assuming something like:&#xD;&#xA;&#xD;&#xA; 1. Copy the entire folder `substratebziLB2` to `/some/path/substratebziLB2`&#xD;&#xA; 2. Then specify `--base-path /some/path/substratebziLB2` when running substrate&#xD;&#xA;&#xD;&#xA;Is this correct?&#xD;&#xA;&#xD;&#xA;Are there any problems with this strategy?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3654" PostHistoryTypeId="1" PostId="1002" RevisionGUID="a173205e-c5bb-404e-bcf6-17f328aad75e" CreationDate="2022-03-22T10:41:01.663" UserId="380" Text="How do I create a snapshot of the substrate database and load it on future runs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3655" PostHistoryTypeId="3" PostId="1002" RevisionGUID="a173205e-c5bb-404e-bcf6-17f328aad75e" CreationDate="2022-03-22T10:41:01.663" UserId="380" Text="|substrate-node|database|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3656" PostHistoryTypeId="2" PostId="1003" RevisionGUID="3ca6090d-a2e4-474c-85d9-959ced3a535d" CreationDate="2022-03-22T10:46:28.147" UserId="104" Text="Aside from the PR that @joepetrowski mentioned, you may want to check out [my answer here](https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm) to decide how exactly you would like to transfer your NFTs, as NFT transfers also use the same models as fungible token transfers, namely reserve asset transfer and teleportation." ContentLicense="CC BY-SA 4.0" />
  <row Id="3658" PostHistoryTypeId="2" PostId="1004" RevisionGUID="6d0121f1-3d74-4e29-be42-ad3bdca0248e" CreationDate="2022-03-22T11:03:38.313" UserId="85" Text="`rustup default nightly`, and then rerun. It's accessing nightly features. I can confirm that it builds using cargo 1.61.0-nightly (65c8266 2022-03-09) on linux." ContentLicense="CC BY-SA 4.0" />
  <row Id="3660" PostHistoryTypeId="5" PostId="1002" RevisionGUID="3aed2c76-3000-441c-936c-e82c839a79c7" CreationDate="2022-03-22T11:07:33.247" UserId="380" Comment="added 2 characters in body" Text="I am making use of JS tests to check my contract calls however there is a large amount of setup required before each test. This means the tests take a very long time to run. I know the substrate database is stored temporarily on disk:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ls -larth /tmp/substratebziLB2/chains/dev/db/full&#xD;&#xA;total 30M&#xD;&#xA;drwxr-xr-x 3 root root 4.0K Mar 22 09:28 ..&#xD;&#xA;-rw-r--r-- 1 root root    0 Mar 22 09:28 LOCK&#xD;&#xA;-rw-r--r-- 1 root root   36 Mar 22 09:28 IDENTITY&#xD;&#xA;-rw-r--r-- 1 root root   16 Mar 22 09:28 CURRENT&#xD;&#xA;-rw-r--r-- 1 root root  51K Mar 22 09:28 OPTIONS-000035&#xD;&#xA;-rw-r--r-- 1 root root  55K Mar 22 09:28 OPTIONS-000037&#xD;&#xA;-rw-r--r-- 1 root root    1 Mar 22 09:28 db_version&#xD;&#xA;-rw-r--r-- 1 root root 4.1M Mar 22 09:48 000038.log&#xD;&#xA;-rw-r--r-- 1 root root 5.2M Mar 22 09:48 000009.log&#xD;&#xA;-rw-r--r-- 1 root root 4.2M Mar 22 10:07 000041.log&#xD;&#xA;-rw-r--r-- 1 root root 4.1M Mar 22 10:07 000039.log&#xD;&#xA;-rw-r--r-- 1 root root 335K Mar 22 10:07 000044.sst&#xD;&#xA;-rw-r--r-- 1 root root 184K Mar 22 10:27 000047.sst&#xD;&#xA;drwxr-xr-x 2 root root 4.0K Mar 22 10:27 .&#xD;&#xA;-rw-r--r-- 1 root root 1.2K Mar 22 10:27 MANIFEST-000008&#xD;&#xA;-rw-r--r-- 1 root root 4.1M Mar 22 10:27 000045.log&#xD;&#xA;-rw-r--r-- 1 root root 4.3M Mar 22 10:27 000042.log&#xD;&#xA;-rw-r--r-- 1 root root 310K Mar 22 10:28 LOG&#xD;&#xA;-rw-r--r-- 1 root root 3.1M Mar 22 10:34 000046.log&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the process for creating a snapshot of the database and reloading at runtime? I'm *assuming* something like:&#xD;&#xA;&#xD;&#xA; 1. Copy the entire folder `substratebziLB2` to `/some/path/substratebziLB2`&#xD;&#xA; 2. Then specify `--base-path /some/path/substratebziLB2` when running substrate&#xD;&#xA;&#xD;&#xA;Is this correct?&#xD;&#xA;&#xD;&#xA;Are there any problems with this strategy?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3661" PostHistoryTypeId="2" PostId="1005" RevisionGUID="ae8867dd-f4fe-4e3c-aa45-c48ccab69a2b" CreationDate="2022-03-22T11:07:40.083" UserId="94" Text="Having a look at the [pallet-preimage](https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/preimage/src/lib.rs#L139) shows how it can be done, the Substrate repo contains examples almost anything that you would want to do with it .  &#xD;&#xA;&#xD;&#xA;The storage item:&#xD;&#xA;```rust&#xD;&#xA;/// The preimages stored by this pallet.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type PreimageFor&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Identity, T::Hash, BoundedVec&lt;u8, T::MaxSize&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The config which defines the `MaxSize` type:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;	/// Max size allowed for a preimage.&#xD;&#xA;	type MaxSize: Get&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And the runtime where the concrete value is injected:  &#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const PreimageMaxSize: u32 = 4096 * 1024;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_preimage::Config for Runtime {&#xD;&#xA;	type MaxSize = PreimageMaxSize;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3663" PostHistoryTypeId="5" PostId="905" RevisionGUID="ea28ea6d-2568-43b0-948c-65cf3afadd30" CreationDate="2022-03-22T11:14:32.443" UserId="116" Comment="Added topic in title removed tags which are not the most relevant" Text="I'm trying to post on Subsocial but when I hit &quot;Create Post&quot; the sign request isn't popping up. I have tried logging in and out, changing the sign request type, disabling and enabling the extension, updating metadata, and I have been all through the extension trying to get the signature request to pop up. I do have a ping next to the extension logo saying &quot;1&quot; with a red square, signifying that I have a sign request but for some reason I can't access it. Thanks for any and all help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="3664" PostHistoryTypeId="4" PostId="905" RevisionGUID="ea28ea6d-2568-43b0-948c-65cf3afadd30" CreationDate="2022-03-22T11:14:32.443" UserId="116" Comment="Added topic in title removed tags which are not the most relevant" Text="Unable to receive sign request on Subsocial" ContentLicense="CC BY-SA 4.0" />
  <row Id="3665" PostHistoryTypeId="6" PostId="905" RevisionGUID="ea28ea6d-2568-43b0-948c-65cf3afadd30" CreationDate="2022-03-22T11:14:32.443" UserId="116" Comment="Added topic in title removed tags which are not the most relevant" Text="|polkadot-js|subsocial|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3666" PostHistoryTypeId="24" PostId="905" RevisionGUID="ea28ea6d-2568-43b0-948c-65cf3afadd30" CreationDate="2022-03-22T11:14:32.443" Comment="Proposed by 116 approved by 34, 104 edit id of 98" ContentLicense="CC BY-SA 4.0" />
  <row Id="3667" PostHistoryTypeId="5" PostId="847" RevisionGUID="d067287b-6d68-4b48-9f3c-ad7d1079d408" CreationDate="2022-03-22T11:14:51.780" UserId="29" Comment="added 48 characters in body" Text="Questions that have to do with the FRAME runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="3668" PostHistoryTypeId="24" PostId="847" RevisionGUID="d067287b-6d68-4b48-9f3c-ad7d1079d408" CreationDate="2022-03-22T11:14:51.780" Comment="Proposed by 29 approved by 94, 104 edit id of 88" ContentLicense="CC BY-SA 4.0" />
  <row Id="3670" PostHistoryTypeId="6" PostId="1002" RevisionGUID="4c6f7e94-66f3-4b49-b41e-9f69e40865ab" CreationDate="2022-03-22T11:35:57.193" UserId="85" Comment="added tag" Text="|substrate-node|database|cli|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3671" PostHistoryTypeId="5" PostId="439" RevisionGUID="b92bde9b-e925-4e33-8dfc-ad7377df3d55" CreationDate="2022-03-22T11:37:32.893" UserId="94" Comment="added 195 characters in body" Text="You can build up a local chain with the `--dev` flag and then import it in your CI.  &#xD;&#xA;There are several ways to restore snapshots, depending on your needs.&#xD;&#xA;&#xD;&#xA;1. For Polkadot/Kusama you can download a chain snapshot from [Polkachu](https://polkachu.com/snapshots). This would be a *real* chain snapshot, so probably to heavy for testing.&#xD;&#xA;2. Import some blocks with the `import-blocks` command that were exported with the `export-blocks` command before. This works fine for real chain specs, but `--dev` create a new genesis and therfore the import fails.&#xD;&#xA;3. Use `export-state` and pass that the resulting file to `--chain`. This will put all the chain state into the genesis block. The new chain will have the same state as the old one, but start at block zero.&#xD;&#xA;4. Just copy paste the `~/.local/share/polkadot/chains/` directory from some backup. Works for real and `--dev` specs." ContentLicense="CC BY-SA 4.0" />
  <row Id="3672" PostHistoryTypeId="2" PostId="1006" RevisionGUID="bb75bacb-01d3-432c-9a80-d3df48bdb69c" CreationDate="2022-03-22T11:43:32.933" UserId="85" Text="Probably a dumb question, but have you disabled all ad-blockers for the site? That might be interfering with some js... (also you didn't mention which browser / OS you were having trouble with)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3674" PostHistoryTypeId="5" PostId="766" RevisionGUID="5e439a2f-1e8a-41aa-953c-f756799e9b95" CreationDate="2022-03-22T11:59:58.520" UserId="629" Comment="added 182 characters in body" Text="I think the issue can be solved either by using a [babel transform](https://www.npmjs.com/package/babel-plugin-transform-import-meta) or maybe not using the `import.meta.url` as can be seen in your error: &#xD;&#xA;```&#xD;&#xA;import.meta &amp;&amp; import.meta.url ? new URL('.', import.meta.url).pathname : 'auto'`&#xD;&#xA;```&#xD;&#xA;as the starting `import.meta.url` returns this error.&#xD;&#xA;&#xD;&#xA;Maybe a simpler solution would be to:&#xD;&#xA;```&#xD;&#xA;const url = new URL('.', import.meta.url);&#xD;&#xA;const result = url?.pathName || 'auto';&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**UPDATE:**&#xD;&#xA;Above was not finally a correct response.&#xD;&#xA;[Here](https://polkadot.js.org/docs/usage/FAQ/#on-webpack-4-i-have-a-parse-error-on-importmetaurl) is a link with the solution" ContentLicense="CC BY-SA 4.0" />
  <row Id="3675" PostHistoryTypeId="2" PostId="1007" RevisionGUID="7f3536cb-7279-4c68-9752-d049e3cfa36f" CreationDate="2022-03-22T12:09:57.147" UserId="139" Text="After building my node (tag monthly-10-2021) with `--features runtime-benchmarks` and/or `--all-features`, I tried to run benchmarks for the pallets and then use them for `WeightInfo` on various pallet configuartions. [Besides pallet_election_phragmen and pallet_election_provider_multi_phase not even successfully completing their benchmarks][1], I get these errors: &#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;     Compiling node-template-runtime v3.0.0-monthly-2021-10 (/home/node-template/runtime)&#xD;&#xA;  error[E0407]: method `check_equivocation_proof` is not a member of trait `pallet_babe::WeightInfo`&#xD;&#xA;    --&gt; /home/node-template/runtime/src/weights/pallet_babe.rs:36:2&#xD;&#xA;     |&#xD;&#xA;  36 | /     fn check_equivocation_proof(x: u32, ) -&gt; Weight {&#xD;&#xA;  37 | |         (118_979_000 as Weight)&#xD;&#xA;  38 | |             // Standard Error: 274_000&#xD;&#xA;  39 | |             .saturating_add((2_965_000 as Weight).saturating_mul(x as Weight))&#xD;&#xA;  40 | |     }&#xD;&#xA;     | |_____^ not a member of trait `pallet_babe::WeightInfo`&#xD;&#xA;&#xD;&#xA;  error[E0407]: method `check_equivocation_proof` is not a member of trait `pallet_grandpa::WeightInfo`&#xD;&#xA;    --&gt; /home/node-template/runtime/src/weights/pallet_grandpa.rs:36:2&#xD;&#xA;     |&#xD;&#xA;  36 | /     fn check_equivocation_proof(x: u32, ) -&gt; Weight {&#xD;&#xA;  37 | |         (104_612_000 as Weight)&#xD;&#xA;  38 | |             // Standard Error: 37_000&#xD;&#xA;  39 | |             .saturating_add((169_000 as Weight).saturating_mul(x as Weight))&#xD;&#xA;  40 | |     }&#xD;&#xA;     | |_____^ not a member of trait `pallet_grandpa::WeightInfo`&#xD;&#xA;&#xD;&#xA;  error[E0046]: not all trait items implemented, missing: `plan_config_change`, `report_equivocation`&#xD;&#xA;    --&gt; /home/node-template/runtime/src/weights/pallet_babe.rs:35:1&#xD;&#xA;     |&#xD;&#xA;  35 | impl&lt;T: frame_system::Config&gt; pallet_babe::WeightInfo for WeightInfo&lt;T&gt; {&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `plan_config_change`, `report_equivocation` in implementation&#xD;&#xA;     |&#xD;&#xA;     = help: implement the missing item: `fn plan_config_change() -&gt; u64 { todo!() }`&#xD;&#xA;     = help: implement the missing item: `fn report_equivocation(_: u32) -&gt; u64 { todo!() }`&#xD;&#xA;&#xD;&#xA;  error[E0046]: not all trait items implemented, missing: `report_equivocation`&#xD;&#xA;    --&gt; /home/node-template/runtime/src/weights/pallet_grandpa.rs:35:1&#xD;&#xA;     |&#xD;&#xA;  35 | impl&lt;T: frame_system::Config&gt; pallet_grandpa::WeightInfo for WeightInfo&lt;T&gt; {&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `report_equivocation` in implementation&#xD;&#xA;     |&#xD;&#xA;     = help: implement the missing item: `fn report_equivocation(_: u32) -&gt; u64 { todo!() }`&#xD;&#xA;&#xD;&#xA;  Some errors have detailed explanations: E0046, E0407.&#xD;&#xA;  For more information about an error, try `rustc --explain E0046`.&#xD;&#xA;  error: could not compile `node-template-runtime` due to 4 previous errors&#xD;&#xA;```&#xD;&#xA;What could have possibly gone wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/990/unable-to-run-election-provider-multiphase-benchmark" ContentLicense="CC BY-SA 4.0" />
  <row Id="3677" PostHistoryTypeId="1" PostId="1007" RevisionGUID="7f3536cb-7279-4c68-9752-d049e3cfa36f" CreationDate="2022-03-22T12:09:57.147" UserId="139" Text="Benchmarking generates files with possibly missing or unnecessary trait impls" ContentLicense="CC BY-SA 4.0" />
  <row Id="3678" PostHistoryTypeId="3" PostId="1007" RevisionGUID="7f3536cb-7279-4c68-9752-d049e3cfa36f" CreationDate="2022-03-22T12:09:57.147" UserId="139" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3682" PostHistoryTypeId="5" PostId="978" RevisionGUID="6fd9dd93-e6eb-45ff-8034-86e5708a38d6" CreationDate="2022-03-22T12:57:02.017" UserId="145" Comment="Possible solution for the signature issue." Text="The problem is the way you encode the call data. Since your `call_data` in `main` is a vector, when you encode it into the temporary byte vector in `encode_extrinsic`, SCALE first appends the length of the vector per specification. You can see the result of this as the excess byte `144` in your &quot;result bytes&quot; at the end of that greyed-out section, right before the module index byte `8`.&#xD;&#xA;&#xD;&#xA;So inside `encode_extrinsic`, instead of doing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;call.encode_to(&amp;mut tmp);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;you should just append the contents of `call` to `tmp`. You can do it by replacing `encode_extrinsic` with something similar to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn encode_extrinsic&lt;S: Encode&gt;(&#xD;&#xA;    signature: Option&lt;S&gt;,&#xD;&#xA;    call: Vec&lt;u8&gt;,&#xD;&#xA;) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;    let mut tmp: Vec&lt;u8&gt; = vec![];&#xD;&#xA;&#xD;&#xA;    const EXTRINSIC_VERSION: u8 = 4;&#xD;&#xA;    match signature.as_ref() {&#xD;&#xA;        Some(s) =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION | 0b1000_0000);&#xD;&#xA;            s.encode_to(&amp;mut tmp);&#xD;&#xA;        },&#xD;&#xA;        None =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION &amp; 0b0111_1111);&#xD;&#xA;        },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    tmp.extend(call);&#xD;&#xA;&#xD;&#xA;    let compact_len = Compact(tmp.len() as u32);&#xD;&#xA;&#xD;&#xA;    let mut output: Vec&lt;u8&gt; = vec![];&#xD;&#xA;    compact_len.encode_to(&amp;mut output);&#xD;&#xA;    output.extend(tmp);&#xD;&#xA;&#xD;&#xA;    output&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This should also fix the difference in the first byte, which is caused by this excess byte.&#xD;&#xA;&#xD;&#xA;Rest of the difference is the signature, which I think is expected.&#xD;&#xA;&#xD;&#xA;**NOTE:** The difference between your code and the Parity example is that the latter uses a tuple for the call data.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;There's another bit that differs in your code from the example. You're checking whether the `call_data` is longer than 256 bytes, but you should be checking whether the `full_unsigned_payload_scale_bytes ` is so when you're signing the payload:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[async_std::main]&#xD;&#xA;async fn main() {&#xD;&#xA;&#xD;&#xA;    // ...&#xD;&#xA;&#xD;&#xA;    let signature = {&#xD;&#xA;        // ...&#xD;&#xA;        if full_unsigned_payload_scale_bytes.len() &gt; 256 {&#xD;&#xA;            AccountKeyring::Alice.sign(&amp;sp_core::blake2_256(&amp;full_unsigned_payload_scale_bytes)[..])&#xD;&#xA;        } else {&#xD;&#xA;            AccountKeyring::Alice.sign(&amp;full_unsigned_payload_scale_bytes)&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This may fix the signature issue if `full_unsigned_payload_scale_bytes` ends up longer than 256 bytes." ContentLicense="CC BY-SA 4.0" />
  <row Id="3683" PostHistoryTypeId="2" PostId="1008" RevisionGUID="f1c116ae-6b90-4825-8d6d-c0be860740c7" CreationDate="2022-03-22T13:07:00.837" UserId="16" Text="All those fields are arguments that were passed to the `contracts.call` extrinsic. The place to look for a description of these arguments is either the rustdoc on of the `pallet-contracts` within substrate or the metadata generated from the runtime containing the pallet-contracts. Unfortunately, the UI doesn't seem to show the description text of those arguments.&#xD;&#xA;&#xD;&#xA;The rust doc of the `call` extrinsic can be found [here](https://paritytech.github.io/substrate/master/pallet_contracts/pallet/enum.Call.html#variant.call).&#xD;&#xA;&#xD;&#xA;`value`: It is the amount of native chain balance that is to be transferred as part of the `call` extrinsic. This is different from any value hold in the contract logic itself.&#xD;&#xA;&#xD;&#xA;`storageDepositLimit`: The `pallet-contracts` uses something called automatic storage deposits where it will charge a deposit from callers in proportion to how much storage a transaction adds to the chain. This argument is for the caller to limit the amount of deposit that can be charged. Think of it as a gas limit but for storage. More information [here](https://github.com/paritytech/substrate/pull/10082).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3686" PostHistoryTypeId="5" PostId="978" RevisionGUID="60a18e14-bfd9-45f9-bf63-146e3292a933" CreationDate="2022-03-22T13:23:47.053" UserId="145" Comment="deleted 8 characters in body" Text="The problem is the way you encode the call data. Since your `call_data` in `main` is a vector, when you encode it into the temporary byte vector in `encode_extrinsic`, SCALE first appends the length of the vector per specification. You can see the result of this as the excess byte `144` in your &quot;result bytes&quot; at the end of that greyed-out section, right before the module index byte `8`.&#xD;&#xA;&#xD;&#xA;So inside `encode_extrinsic`, instead of doing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;call.encode_to(&amp;mut tmp);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;you should just append the contents of `call` to `tmp`. You can do it by replacing `encode_extrinsic` with something similar to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn encode_extrinsic&lt;S: Encode&gt;(&#xD;&#xA;    signature: Option&lt;S&gt;,&#xD;&#xA;    call: Vec&lt;u8&gt;,&#xD;&#xA;) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;    let mut tmp: Vec&lt;u8&gt; = vec![];&#xD;&#xA;&#xD;&#xA;    const EXTRINSIC_VERSION: u8 = 4;&#xD;&#xA;    match signature.as_ref() {&#xD;&#xA;        Some(s) =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION | 0b1000_0000);&#xD;&#xA;            s.encode_to(&amp;mut tmp);&#xD;&#xA;        },&#xD;&#xA;        None =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION &amp; 0b0111_1111);&#xD;&#xA;        },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    tmp.extend(call);&#xD;&#xA;&#xD;&#xA;    let compact_len = Compact(tmp.len() as u32);&#xD;&#xA;&#xD;&#xA;    let mut output: Vec&lt;u8&gt; = vec![];&#xD;&#xA;    compact_len.encode_to(&amp;mut output);&#xD;&#xA;    output.extend(tmp);&#xD;&#xA;&#xD;&#xA;    output&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This should also fix the difference in the first byte, which is caused by this excess byte.&#xD;&#xA;&#xD;&#xA;Rest of the difference is the signature, which I think is expected.&#xD;&#xA;&#xD;&#xA;**NOTE:** The difference between your code and the Parity example is that the latter uses a tuple for the call data.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;There's another bit that differs in your code from the example. You're checking whether `call_data` is longer than 256 bytes, but you should be checking whether `full_unsigned_payload_scale_bytes ` is so when you're signing the payload:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[async_std::main]&#xD;&#xA;async fn main() {&#xD;&#xA;&#xD;&#xA;    // ...&#xD;&#xA;&#xD;&#xA;    let signature = {&#xD;&#xA;        // ...&#xD;&#xA;        if full_unsigned_payload_scale_bytes.len() &gt; 256 {&#xD;&#xA;            AccountKeyring::Alice.sign(&amp;sp_core::blake2_256(&amp;full_unsigned_payload_scale_bytes)[..])&#xD;&#xA;        } else {&#xD;&#xA;            AccountKeyring::Alice.sign(&amp;full_unsigned_payload_scale_bytes)&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This may fix the signature issue if `full_unsigned_payload_scale_bytes` ends up longer than 256 bytes." ContentLicense="CC BY-SA 4.0" />
  <row Id="3687" PostHistoryTypeId="2" PostId="1009" RevisionGUID="51bb4cf5-023c-4c50-8b30-c295ae1586c8" CreationDate="2022-03-22T13:26:39.927" UserId="419" Text="There is an implementation of a price feed pallet in the Chainlink-Substrate integration. It connects to and uses the Chainlink oracle network to fetch the price feed. But you can follow a similar approach to connect to any service or oracle for getting data in the chain.&#xD;&#xA;Here is the code - https://github.com/smartcontractkit/chainlink-polkadot&#xD;&#xA;&#xD;&#xA;Also, here is a good tutorial that explains the process - https://github.com/LaurentTrk/chainlink-substrate-tutorial&#xD;&#xA;&#xD;&#xA;This could be a bit outdated considering the evolving code. But the overall approach still makes sense. &#xD;&#xA;&#xD;&#xA;Also, as an alternative, you can look at Substrate off-chain workers for getting data via http calls. Here is a good overview - https://docs.substrate.io/v3/concepts/off-chain-features/" ContentLicense="CC BY-SA 4.0" />
  <row Id="3689" PostHistoryTypeId="2" PostId="1010" RevisionGUID="ee8b5c41-6ae7-460a-ae2b-62ae7b963a2f" CreationDate="2022-03-22T13:28:57.337" UserId="83" Text="* [orml-oracle][1] pallet template from the Open Runtime Module Library (ORML), which is a community maintained collection of Substrate runtime modules, shows how to create an oracle to make off-chain data available on-chain using off-chain workers.&#xD;&#xA;&#xD;&#xA;* [substrate-price-oracle][2] by Shawn Tabrizi shows specifically how to create an oracle that fetches off-chain price data and stores it on-chain using offchain workers. &#xD;&#xA;&#xD;&#xA;* [pallet-chainlink-feed][3] by Chainlink shows how to create an oracle that fetches off-chain price data and interacts with a seperate token pallet for separation of concerns.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/open-web3-stack/open-runtime-module-library/tree/master/oracle&#xD;&#xA;  [2]: https://github.com/shawntabrizi/substrate-price-oracle/blob/master/src/lib.rs&#xD;&#xA;  [3]: https://github.com/smartcontractkit/chainlink-polkadot/pull/44/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="3691" PostHistoryTypeId="2" PostId="1011" RevisionGUID="e32766f5-b9e9-4aad-a018-41ec81ddff3e" CreationDate="2022-03-22T13:33:59.193" UserId="474" Text="So, I'm not super familiar with substrate-archive, but perhaps I can point you towards some example code to help you with your modifications!&#xD;&#xA;&#xD;&#xA;For substrate event decoding (useful for your **1** and **2**), one example is seen here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/subxt/blob/82f304005b700fabc6632f96f7945595f4da6673/subxt/src/events/events_type.rs#L50&#xD;&#xA;&#xD;&#xA;This code: &#xD;&#xA;- gets hold of the events from storage for a given block hash.&#xD;&#xA;- reads the number of events from the beginning of these bytes&#xD;&#xA;- Puts the remaining event bytes into https://github.com/paritytech/subxt/blob/82f304005b700fabc6632f96f7945595f4da6673/subxt/src/events/events_type.rs#L93&#xD;&#xA;- Allows for these event bytes to be iterated over, keeping track of the current event index (your **2**), at https://github.com/paritytech/subxt/blob/82f304005b700fabc6632f96f7945595f4da6673/subxt/src/events/events_type.rs#L181&#xD;&#xA;- The above decodes each event using https://github.com/paritytech/subxt/blob/82f304005b700fabc6632f96f7945595f4da6673/subxt/src/events/events_type.rs#L333, which decodes the event phase, pallet and variant index (or in other words your **1**).&#xD;&#xA;&#xD;&#xA;The phase of an event points at the specific extrinsic index that it was emitted from (if it came from an extrinsic at all). If an extrinsic succeeded or failed, there will be an ExtrinsicSuccess or ExtrinsicFailure event associated with it (subxt uses those to determine whether an extrinsic has succeeded or failed here: https://github.com/paritytech/subxt/blob/82f304005b700fabc6632f96f7945595f4da6673/subxt/src/transaction.rs#L388 (your **4** and **5**)).&#xD;&#xA;&#xD;&#xA;In actuality, `substrate-archive` uses `desub` under the hood to help decode things. as of V14 metadata, decoding an extrinsic looks like this:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/desub/blob/f5377bc9946b4b0a89a6b89b0ae58d915683f9c8/desub-current/src/decoder/mod.rs#L159&#xD;&#xA;&#xD;&#xA;Getting the pallet and call index from the extrinsic (what you called &quot;section&quot; and &quot;method&quot; in **3**) is done here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/desub/blob/f5377bc9946b4b0a89a6b89b0ae58d915683f9c8/desub-current/src/decoder/mod.rs#L335&#xD;&#xA;&#xD;&#xA;Without looking at substrate-archive I can't recall what is currently stored and so on, so I'm not sure how helpful all of the above really is, but I hope it at least provides some pointers to code that does similar, which may be of use!" ContentLicense="CC BY-SA 4.0" />
  <row Id="3693" PostHistoryTypeId="2" PostId="1012" RevisionGUID="5eea2922-b3ae-41e4-b053-358068e63712" CreationDate="2022-03-22T13:38:00.547" UserId="1814" Text="I think this is just a matter of correctly constructed query, I'm not very familiar with substrate-archive, but I use [subsquid archive][1] (indexer) to achieve the same thing.&#xD;&#xA;&#xD;&#xA;This query will yield what you described:&#xD;&#xA;&#xD;&#xA;    query Events {&#xD;&#xA;      substrate_event(limit: 10) {&#xD;&#xA;        indexInBlock&#xD;&#xA;        name&#xD;&#xA;        blockNumber&#xD;&#xA;        extrinsic {&#xD;&#xA;          name&#xD;&#xA;          substrate_events(where: {section: {_eq: &quot;system&quot;}}) {&#xD;&#xA;            name&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can try it [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.subsquid.io/key-concepts/architecture#squid-archive&#xD;&#xA;  [2]: https://bsx-api-testnet.hydration.cloud/idx/console" ContentLicense="CC BY-SA 4.0" />
  <row Id="3695" PostHistoryTypeId="5" PostId="1010" RevisionGUID="8918c811-ddf2-4266-82c7-8701f082235e" CreationDate="2022-03-22T13:39:10.627" UserId="83" Comment="Mention rewards" Text="* [orml-oracle][1] pallet template from the Open Runtime Module Library (ORML), which is a community maintained collection of Substrate runtime modules, shows the foundations of how to create an oracle to make off-chain data available on-chain using off-chain workers.&#xD;&#xA;&#xD;&#xA;* [substrate-price-oracle][2] by Shawn Tabrizi shows specifically how to create an oracle that fetches off-chain price data and stores it on-chain using offchain workers. &#xD;&#xA;&#xD;&#xA;* [pallet-chainlink-feed][3] by Chainlink is a more complex example of how to create an oracle that fetches off-chain price data and interacts with a seperate token pallet for separation of concerns.&#xD;&#xA;&#xD;&#xA;* [mining-rewards-allowance][4] pallet is a DataHighway Mining Power (mPower) Oracle that I authored to frequently fetch the mPower of accounts from an external API using off-chain workers and store them on-chain to then use it to calculate rewards for them based on their on-chain participation in governance.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/open-web3-stack/open-runtime-module-library/tree/master/oracle&#xD;&#xA;  [2]: https://github.com/shawntabrizi/substrate-price-oracle/blob/master/src/lib.rs&#xD;&#xA;  [3]: https://github.com/smartcontractkit/chainlink-polkadot/pull/44/files&#xD;&#xA;  [4]: https://github.com/DataHighway-DHX/node/pull/238" ContentLicense="CC BY-SA 4.0" />
  <row Id="3696" PostHistoryTypeId="2" PostId="1013" RevisionGUID="0d6c6465-3465-4d6a-b981-fbb833cfdd75" CreationDate="2022-03-22T13:42:48.413" UserId="1814" Text="You can also use [fork-off-substrate][1] script to generate chainspec containing storage of any running chain - even your live network.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/maxsam4/fork-off-substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="3698" PostHistoryTypeId="5" PostId="1012" RevisionGUID="0d721443-9439-4989-a715-41612a84c4fb" CreationDate="2022-03-22T13:47:00.807" UserId="1814" Comment="added 6 characters in body" Text="I think this is just a matter of correctly constructed query, I'm not very familiar with substrate-archive, but I use [subsquid archive][1] (indexer) to achieve the same thing.&#xD;&#xA;&#xD;&#xA;This query will yield what you described:&#xD;&#xA;&#xD;&#xA;    query Events {&#xD;&#xA;      substrate_event(limit: 10) {&#xD;&#xA;        indexInBlock&#xD;&#xA;        name&#xD;&#xA;        blockNumber&#xD;&#xA;        extrinsic {&#xD;&#xA;          name&#xD;&#xA;          substrate_events(where: {section: {_eq: &quot;system&quot;}}) {&#xD;&#xA;            name&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can play with it [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.subsquid.io/key-concepts/architecture#squid-archive&#xD;&#xA;  [2]: https://bsx-api-testnet.hydration.cloud/idx/console" ContentLicense="CC BY-SA 4.0" />
  <row Id="3699" PostHistoryTypeId="2" PostId="1014" RevisionGUID="b27fe55a-3785-43df-81b8-1a9537d51c9a" CreationDate="2022-03-22T13:49:25.427" UserId="234" Text="What I found related to specs/resource requirements (memory, disk space,...) was :&#xD;&#xA;- These [requirements][1] for running a validator node and &#xD;&#xA;- In the polkadot wiki [page][2] the space required for an archive node.&#xD;&#xA;&#xD;&#xA;I was wondering : &#xD;&#xA;1) if these are the latest, up to date requirements&#xD;&#xA;2) if there is a page with some more detailed specs for running an archive node (if necessary) and &#xD;&#xA;3) if these requirements change over time, is there a page where these specs are being updated too ? Or maybe the way to go would be to post a question in the &quot;Polkadot/Kusama validator lounge&quot; matrix chats mentioned [here][3] (for a validator node) ? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#standard-hardware&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/maintain-sync#types-of-nodes&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/community#matrix-chats" ContentLicense="CC BY-SA 4.0" />
  <row Id="3701" PostHistoryTypeId="1" PostId="1014" RevisionGUID="b27fe55a-3785-43df-81b8-1a9537d51c9a" CreationDate="2022-03-22T13:49:25.427" UserId="234" Text="What are the latest minimum specs for running a Polkadot/Kusama node (full node/archive node)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3702" PostHistoryTypeId="3" PostId="1014" RevisionGUID="b27fe55a-3785-43df-81b8-1a9537d51c9a" CreationDate="2022-03-22T13:49:25.427" UserId="234" Text="|nodes|validator|specs|archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3703" PostHistoryTypeId="2" PostId="1015" RevisionGUID="4af57ee4-bf0d-4de8-960b-e24bd676649c" CreationDate="2022-03-22T13:53:56.593" UserId="94" Text="Pallet Grandpa and Babe currently do not have automatic benchmarks.  &#xD;&#xA;They have some default weight files [here](https://github.com/paritytech/substrate/blob/master/frame/grandpa/src/default_weights.rs) and [here](https://github.com/paritytech/substrate/blob/master/frame/babe/src/default_weights.rs) instead.  &#xD;&#xA;&#xD;&#xA;The setup for these benchmarks is very complicated and currently it needs some manual tweaking to work.  &#xD;&#xA;Did you modify your node? Since the [default](https://github.com/substrate-developer-hub/substrate-node-template/blob/7c342164629e7871b4ee3f09de3d4e130bef6543/runtime/src/lib.rs#L328) runtime config for the node template does not list these benchmarks.  &#xD;&#xA;Or are you not using the template?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3705" PostHistoryTypeId="5" PostId="1010" RevisionGUID="9378b6d8-2654-478b-9eef-869e16129d76" CreationDate="2022-03-22T14:02:13.183" UserId="83" Comment="mention example offchain workers was used as reference" Text="* [orml-oracle][1] pallet template from the Open Runtime Module Library (ORML), which is a community maintained collection of Substrate runtime modules, shows the foundations of how to create an oracle to make off-chain data available on-chain using off-chain workers.&#xD;&#xA;&#xD;&#xA;* [substrate-price-oracle][2] by Shawn Tabrizi shows specifically how to create an oracle that fetches off-chain price data and stores it on-chain using offchain workers. &#xD;&#xA;&#xD;&#xA;* [pallet-chainlink-feed][3] by Chainlink is a more complex example of how to create an oracle that fetches off-chain price data and interacts with a seperate token pallet for separation of concerns.&#xD;&#xA;&#xD;&#xA;* [mining-rewards-allowance][4] pallet is a DataHighway Mining Power (mPower) Oracle that frequently fetches the mPower of accounts from an external API using off-chain workers and stores them on-chain to then use it to calculate rewards for them based on their on-chain participation in governance. The Substrate [example-offchain-worker][5] pallet and numerous online tutorials with Tomasz Drwięga were used as reference.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/open-web3-stack/open-runtime-module-library/tree/master/oracle&#xD;&#xA;  [2]: https://github.com/shawntabrizi/substrate-price-oracle/blob/master/src/lib.rs&#xD;&#xA;  [3]: https://github.com/smartcontractkit/chainlink-polkadot/pull/44/files&#xD;&#xA;  [4]: https://github.com/DataHighway-DHX/node/pull/238&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/tree/master/frame/examples/offchain-worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="3706" PostHistoryTypeId="5" PostId="439" RevisionGUID="e85ce0b9-506d-410f-82bd-d91d677c18e3" CreationDate="2022-03-22T14:05:45.577" UserId="94" Comment="added 69 characters in body" Text="You can build up a local chain with the `--dev` flag and then import it in your CI.  &#xD;&#xA;There are several ways to restore snapshots, depending on your needs.&#xD;&#xA;&#xD;&#xA;1. For Polkadot/Kusama you can download a chain snapshot from [Polkachu](https://polkachu.com/snapshots). This would be a *real* chain snapshot, so probably to heavy for testing.&#xD;&#xA;2. Import some blocks with the `import-blocks` command that were exported with the `export-blocks` command before. This works fine for real chain specs, but `--dev` create a new genesis and therfore the import fails.&#xD;&#xA;3. Use `export-state` and pass that the resulting file to `--chain`. This will put all the chain state into the genesis block. The new chain will have the same state as the old one, but start at block zero.&#xD;&#xA;4. Just copy paste the `~/.local/share/polkadot/chains/` directory from some backup. Works for real specs. For `--dev` specs you need to copy the directory you specify with `--base-path`." ContentLicense="CC BY-SA 4.0" />
  <row Id="3707" PostHistoryTypeId="2" PostId="1016" RevisionGUID="f189e756-b404-4b1f-9baf-56a85ea0d9f6" CreationDate="2022-03-22T14:38:33.820" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="3709" PostHistoryTypeId="1" PostId="1016" RevisionGUID="f189e756-b404-4b1f-9baf-56a85ea0d9f6" CreationDate="2022-03-22T14:38:33.820" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="3710" PostHistoryTypeId="2" PostId="1017" RevisionGUID="f835ab89-19de-42e7-a8ee-1cb7f53e0269" CreationDate="2022-03-22T14:38:33.820" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="3712" PostHistoryTypeId="1" PostId="1017" RevisionGUID="f835ab89-19de-42e7-a8ee-1cb7f53e0269" CreationDate="2022-03-22T14:38:33.820" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="3713" PostHistoryTypeId="4" PostId="615" RevisionGUID="4c0d72f5-c003-4ce3-874f-096cd799d45a" CreationDate="2022-03-22T14:39:10.517" UserId="34" Comment="better tags for filtering" Text="How do extrinsic weights apply to Raspbery Pi full-nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3714" PostHistoryTypeId="6" PostId="615" RevisionGUID="4c0d72f5-c003-4ce3-874f-096cd799d45a" CreationDate="2022-03-22T14:39:10.517" UserId="34" Comment="better tags for filtering" Text="|polkadot|weight|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3715" PostHistoryTypeId="2" PostId="1018" RevisionGUID="59b1f020-c6d5-4436-bd98-798c34494f9d" CreationDate="2022-03-22T14:44:39.520" UserId="94" Text="1. The specs that you see in the wiki are up to date:  &#xD;&#xA;```pre&#xD;&#xA;CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz&#xD;&#xA;Storage: A NVMe solid state drive. Should be reasonably sized to deal with blockchain growth. Starting around 80GB - 160GB will be okay for the first six months of Polkadot, but will need to be re-evaluated every six months.&#xD;&#xA;Memory: 64GB ECC.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The size of a Polkadot Archive node is about 390Gb right now (block 9.5M).  &#xD;&#xA;For a pruning node I think the DB is under 100Gb. &#xD;&#xA;The main factor is the CPU though.&#xD;&#xA;&#xD;&#xA;2. An archive node is not time critical, since you are not participating in the consensus.  &#xD;&#xA;You can therefore not loose money if you use subpar hardware. I think that is the reason why there is no reference hardware for archive nodes.&#xD;&#xA;&#xD;&#xA;3. They will be updated soon, but the concrete hardware is not decided upon yet.  &#xD;&#xA;&#xD;&#xA;This Stackexchange is a good place to ask such questions " ContentLicense="CC BY-SA 4.0" />
  <row Id="3717" PostHistoryTypeId="6" PostId="436" RevisionGUID="d787a83f-4d9d-4126-aa0e-e0148c73b5e0" CreationDate="2022-03-22T14:47:59.717" UserId="34" Comment="better tags for filtering" Text="|database|block|snapshot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3718" PostHistoryTypeId="6" PostId="1002" RevisionGUID="fdb56d2e-07f0-4242-9cb5-b7347b1e192b" CreationDate="2022-03-22T14:48:19.457" UserId="34" Comment="better tags for filtering" Text="|database|testing|snapshot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3719" PostHistoryTypeId="10" PostId="1002" RevisionGUID="4e8de096-ba4a-4719-8997-da2f8458ad9e" CreationDate="2022-03-22T14:55:32.303" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[436],&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="3720" PostHistoryTypeId="5" PostId="984" RevisionGUID="3da3ab47-e4df-45ef-9d05-3492b700e8eb" CreationDate="2022-03-22T14:59:55.987" UserId="83" Comment="Make clearer sentence" Text="In the Substrate documentation [here][1] and the Substrate reference documentation [here][2] it says the `authoring_version` *&quot;is the version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime&quot;*.&#xD;&#xA;&#xD;&#xA;In [this old pull request][3] for Substrate the `authoring_version` was incremented for Kusama but I am not clear why that was necessary. &#xD;&#xA;It appears to have changed because the following were changed since `paint` was renamed to `pallet` and those block authoring related dependencies changed:&#xD;&#xA;* `pallet-authorship` used instead of `paint-authorship`  &#xD;&#xA;* `pallet-authority-discovery` used instead of `paint-authority-discovery`&#xD;&#xA;* `pallet-babe` used instead of `paint-babe`&#xD;&#xA;&#xD;&#xA;Note that the babe pallet is used for authoring blocks, the authorship pallet is used to fetch the current block author and to create and submit unsigned extrinsics, and the authority-discovery pallet is used to *&quot;retrieve the current set of authorities&quot;*.&#xD;&#xA;&#xD;&#xA;Another situation when I think it should change is if you changed consensus mechanism, for example [this old pull request here][4] for the DataHighway changed it from Babe to Aura, but I think it was incorrect that they (me) did not change the `authoring_version`.&#xD;&#xA;&#xD;&#xA;In the Substrate reference documentation [here][5] for `can_author_with`, instead of checking the `authoring_version`, it checks [here][6] if the *&quot;authoring runtimes (`spec_versions`) that this native runtime supports&quot;*&#xD;&#xA; matches the other version that is provided to determine whether it supports authoring blocks, where the other version may be associated with the version provided for a forkless runtime upgrade, which leads me to think that the `spec_version` would typically get bumped alongside an `authoring_version` bump.&#xD;&#xA;&#xD;&#xA;It also says in the Substrate source code [here][7] that *&quot;bug fixes should result in an increment of `spec_version` and possibly `authoring_version`, absolutely not `impl_version` since they change the semantics of the runtime&quot;*. I assume that means the `authoring_version` would only need to be incremented in the case of a bug fix or other change related to block authoring dependencies.&#xD;&#xA;&#xD;&#xA;In the Substrate source code [here][8] it says that *&quot;Per convention: if the runtime behavior changes, increment `spec_version` and set `impl_version` to 0. If only runtime implementation changes and behavior does not, then leave `spec_version` as is and increment `impl_version`.&quot;*.&#xD;&#xA;I assume that the convention also requires that for changes related to authorship then when the runtime behaviour changes but the implementation does not change then you either increment `authoring_version` or set `authoring_version` to 0.&#xD;&#xA;I am not sure what they mean when they say runtime &quot;behavior&quot;.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/upgrades#runtime-versioning&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/node_testing/client/sc_executor/struct.RuntimeVersion.html#structfield.authoring_version&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/pull/600/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR98&#xD;&#xA;  [4]: https://github.com/DataHighway-DHX/node/pull/215/files#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecR218&#xD;&#xA;  [5]: https://paritytech.github.io/substrate/master/node_testing/client/sc_executor/struct.NativeVersion.html#method.can_author_with&#xD;&#xA;  [6]: https://paritytech.github.io/substrate/master/node_testing/client/sc_executor/struct.NativeVersion.html#structfield.can_author_with&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/master/primitives/version/src/lib.rs#L155&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L121" ContentLicense="CC BY-SA 4.0" />
  <row Id="3721" PostHistoryTypeId="2" PostId="1019" RevisionGUID="2aef0148-aab8-4449-93ef-67d247eb0dab" CreationDate="2022-03-22T15:00:24.550" UserId="34" Text="Once great resource and reference on generation of snapshots is the [polkadot-snapshot-generator](https://github.com/midl-dev/polkadot-snapshot-generator) tool, that is hosted on https://polkashots.io/ for Polkadot and Kusama (and some other networks/parachains may as well. &#xD;&#xA;&#xD;&#xA;When running a node, `--base-path &lt;my/base/path&gt;` will generate the following structure with the `db` directory containing the &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&lt;my/base/path&gt;/chains ==&gt; &lt;the chains set from chainspec&gt; ==&gt; db&#xD;&#xA;                                                          |&#xD;&#xA;                                                          ==&gt; keystore&#xD;&#xA;                                                          |&#xD;&#xA;                                                          ==&gt; network&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You want to copy _only_ the `db` section here, assuming that you do not want to share the `keystore` with your priv keys (potentially sensitive!) and `network` with your network libp2p info and peering priv keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="3723" PostHistoryTypeId="4" PostId="436" RevisionGUID="50863883-ce02-420c-9d2b-9b3cc7575202" CreationDate="2022-03-22T15:02:40.467" UserId="34" Comment="better title for visibility" Text="How to configure a Substrate Network with Injected Block History from a snapshot or database backup?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3725" PostHistoryTypeId="5" PostId="994" RevisionGUID="bd42ca50-ba32-490b-847d-68ccfdc07934" CreationDate="2022-03-22T15:24:41.530" UserId="16" Comment="Fixed an obvious typo." Text="After I called an contract, this is the extrinsic I found in the block:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;What do these fields mean: `value`, `storageDepositLimit` ?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XyLO7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3726" PostHistoryTypeId="24" PostId="994" RevisionGUID="bd42ca50-ba32-490b-847d-68ccfdc07934" CreationDate="2022-03-22T15:24:41.530" Comment="Proposed by 16 approved by 94, 29 edit id of 99" ContentLicense="CC BY-SA 4.0" />
  <row Id="3727" PostHistoryTypeId="2" PostId="1020" RevisionGUID="a43d1b63-e1c0-420f-8a3a-af5af0254621" CreationDate="2022-03-22T15:33:07.140" UserId="627" Text="The error above stems from the usage of `import.meta.url`. &#xD;&#xA;&#xD;&#xA;WP4 does not have support for this (unlike WP5), so an extra import loader is needed as per the as per the polkadot-js docs https://polkadot.js.org/docs/usage/FAQ#on-webpack-4-i-have-a-parse-error-on-importmetaurl mentioned in your post. &#xD;&#xA;&#xD;&#xA;The error is caused by this loader inside a webworker. &#xD;&#xA;&#xD;&#xA;The loader creates a `getAbsoluteUrl` function that emulates the `import.meta.url` and this function itself refers to `window.location`. Since webworkers doesn't have the `window` object, only making `self` available this process fails with the above error.&#xD;&#xA;&#xD;&#xA;There doesn't seem to be a workaround for this, apart from upgrading to WP5 or bypassing it altogether.&#xD;&#xA;&#xD;&#xA;Some additional ideas may be gleamed from looking at the actual injected loader support code, specifically https://github.com/polkadot-js/common/issues/1435#issuecomment-1072052502" ContentLicense="CC BY-SA 4.0" />
  <row Id="3730" PostHistoryTypeId="2" PostId="1021" RevisionGUID="874e7ae9-8e67-4a8e-896e-5b7332429582" CreationDate="2022-03-22T16:03:06.313" UserId="126" Text="When declaring storage items inside the runtime, we can automatically generate getters to query that storage item, for example (https://docs.substrate.io/v3/runtime/storage/#declaring-storage-items):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn some_primitive_value)]&#xD;&#xA;pub(super) type SomePrimitiveValue&lt;T&gt; = StorageValue&lt;_, u32, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there a simple way to generate a setter in the same way? While a simple setter is likely undesirable on all storage items, it would be handy to have a shorthand way to set storage values from root or signed accounts:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::root_setter(fn some_primitive_value)]&#xD;&#xA;#[pallet::signed_setter(fn some_primitive_value)]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3732" PostHistoryTypeId="1" PostId="1021" RevisionGUID="874e7ae9-8e67-4a8e-896e-5b7332429582" CreationDate="2022-03-22T16:03:06.313" UserId="126" Text="Automatically generating storage setter" ContentLicense="CC BY-SA 4.0" />
  <row Id="3733" PostHistoryTypeId="3" PostId="1021" RevisionGUID="874e7ae9-8e67-4a8e-896e-5b7332429582" CreationDate="2022-03-22T16:03:06.313" UserId="126" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3734" PostHistoryTypeId="2" PostId="1022" RevisionGUID="996c0beb-5fbf-4159-a98d-2ef4dbe79619" CreationDate="2022-03-22T16:11:17.960" UserId="28" Text="There is not a way with our macros, and generally I would suggest not even to use this feature.&#xD;&#xA;&#xD;&#xA;When you include `#[pallet::getter(fn some_primitive_value)]` all that is happening is the generation of the following function:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn some_primitive_value() -&gt; u32 {&#xD;&#xA;    SomePrimitiveValue::&lt;T&gt;::get()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So really you have not saved much code writing, and you have created some macro magic abstraction.&#xD;&#xA;&#xD;&#xA;Similarly, if you wanted to write a &quot;setter&quot;, you can just write:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn set_some_primitive_value(value: u32) {&#xD;&#xA;    SomePrimitiveValue::&lt;T&gt;::put(value)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3736" PostHistoryTypeId="2" PostId="1023" RevisionGUID="f7a84f74-7079-4041-bc42-69115d0d3fed" CreationDate="2022-03-22T16:52:53.523" UserId="1820" Text="It sounds like Subsocial is prompting for the signature, but you're having trouble seeing the pop-up.&#xD;&#xA;&#xD;&#xA;When the Polkadot extension notifies you that there's a pending extrinsic to sign but you don't see the window that's usually because of either of these two reasons:&#xD;&#xA;1. Your browser is blocking the pop-up window of the extension&#xD;&#xA;2. You're using more than one screen and the pop-up is on a different screen.&#xD;&#xA;&#xD;&#xA;I hope this helps!" ContentLicense="CC BY-SA 4.0" />
  <row Id="3738" PostHistoryTypeId="5" PostId="975" RevisionGUID="26eca381-3fd0-459c-a95b-eb1aefc36569" CreationDate="2022-03-22T17:34:04.450" UserId="1760" Comment="Code and outputs update" Text="I'm trying to generate an extrinsic offline based on [this example](https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/05_transfer_balance.rs). It worked, but the signed transaction is different.  &#xD;&#xA;&#xD;&#xA;### Call Data&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;As you can see in the output the Call Hash is the same.&#xD;&#xA;&#xD;&#xA;### Signed Transaction&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;### My code&#xD;&#xA;&#xD;&#xA;    use serde::{Serialize, Deserialize};&#xD;&#xA;    use sp_keyring::AccountKeyring;&#xD;&#xA;    use sp_runtime::{MultiAddress, MultiSignature, generic::Era};&#xD;&#xA;    use parity_scale_codec::{ Compact, Encode };&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    #[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;    struct SystemSyncState {&#xD;&#xA;        current_block: u32,&#xD;&#xA;        starting_block: u32,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    struct SystemSyncStateSuccess {&#xD;&#xA;        jsonrpc: String,&#xD;&#xA;        result: SystemSyncState,&#xD;&#xA;        id: u8,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    struct SystemAccountNextIndexSuccess {&#xD;&#xA;        jsonrpc: String,&#xD;&#xA;        result: u32,&#xD;&#xA;        id: u8,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    struct ChainGetBlockHashSuccess {&#xD;&#xA;        jsonrpc: String,&#xD;&#xA;        result: String,&#xD;&#xA;        id: u8,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    #[serde(untagged)]&#xD;&#xA;    enum StateGetRuntimeVersionApis {&#xD;&#xA;        Int(u32),&#xD;&#xA;        Str(String),&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    #[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;    struct StateGetRuntimeVersion {&#xD;&#xA;        apis: Vec&lt;[StateGetRuntimeVersionApis;2]&gt;,&#xD;&#xA;        authoring_version: u32,&#xD;&#xA;        impl_name: String,&#xD;&#xA;        impl_version: u32,&#xD;&#xA;        spec_name: String,&#xD;&#xA;        spec_version: u32,&#xD;&#xA;        transaction_version: u32,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[allow(dead_code)]&#xD;&#xA;    #[derive(Debug, Deserialize)]&#xD;&#xA;    struct StateGetRuntimeVersionSuccess {&#xD;&#xA;        jsonrpc: String,&#xD;&#xA;        result: StateGetRuntimeVersion,&#xD;&#xA;        id: u8,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[derive(Serialize)]&#xD;&#xA;    struct NodeRequest {&#xD;&#xA;        id: u8,&#xD;&#xA;        jsonrpc: String,&#xD;&#xA;        method: String,&#xD;&#xA;        params: Vec&lt;String&gt;,&#xD;&#xA;    }&#xD;&#xA;    pub struct StorageKeyPrefix(Vec&lt;u8&gt;);&#xD;&#xA;    &#xD;&#xA;    async fn get_nonce(account: &amp;sp_runtime::AccountId32) -&gt; u32 {&#xD;&#xA;    &#xD;&#xA;        let client = reqwest::Client::new();&#xD;&#xA;        let req = NodeRequest {&#xD;&#xA;            id: 1,&#xD;&#xA;            jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;            method: &quot;system_accountNextIndex&quot;.to_string(),&#xD;&#xA;            params: vec![account.to_string()],&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        let res = client&#xD;&#xA;            .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;            .json(&amp;serde_json::json!(req))&#xD;&#xA;            .send()&#xD;&#xA;            .await;&#xD;&#xA;    &#xD;&#xA;        match res {&#xD;&#xA;            Ok(res) =&gt; {&#xD;&#xA;                match res.status() {&#xD;&#xA;                    reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                        match res.json::&lt;SystemAccountNextIndexSuccess&gt;().await {&#xD;&#xA;                            Ok(parsed) =&gt; {&#xD;&#xA;                                // println!(&quot;NONCE {:#?}&quot;, parsed.result);&#xD;&#xA;                                parsed.result&#xD;&#xA;                            },&#xD;&#xA;                            Err(e) =&gt; {&#xD;&#xA;                                println!(&quot;ERR {:?}&quot;, e);&#xD;&#xA;                                0&#xD;&#xA;                            },&#xD;&#xA;                        }&#xD;&#xA;                    },&#xD;&#xA;                    _ =&gt; {&#xD;&#xA;                        0&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            },&#xD;&#xA;            Err(_e) =&gt; {&#xD;&#xA;                0&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    async fn get_genesis_hash() -&gt; [u8; 32] {&#xD;&#xA;        let client = reqwest::Client::new();&#xD;&#xA;        let req = NodeRequest {&#xD;&#xA;            id: 1,&#xD;&#xA;            jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;            method: &quot;chain_getBlockHash&quot;.to_string(),&#xD;&#xA;            params: vec![&quot;0&quot;.to_string()]&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        let res = client&#xD;&#xA;            .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;            .json(&amp;serde_json::json!(req))&#xD;&#xA;            .send()&#xD;&#xA;            .await;&#xD;&#xA;    &#xD;&#xA;        match res {&#xD;&#xA;            Ok(res) =&gt; {&#xD;&#xA;                match res.status() {&#xD;&#xA;                    reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                        match res.json::&lt;ChainGetBlockHashSuccess&gt;().await {&#xD;&#xA;                            Ok(parsed) =&gt; {&#xD;&#xA;                                println!(&quot;GENESIS HASH {:#?}&quot;, parsed.result);&#xD;&#xA;                                sp_core::hashing::sha2_256(parsed.result.as_bytes())&#xD;&#xA;                            },&#xD;&#xA;                            Err(e) =&gt; {&#xD;&#xA;                                println!(&quot;ERR {:?}&quot;, e);&#xD;&#xA;                                sp_core::hashing::sha2_256(&amp;[0])&#xD;&#xA;                            },&#xD;&#xA;                        }&#xD;&#xA;                    },&#xD;&#xA;                    _ =&gt; {&#xD;&#xA;                        sp_core::hashing::sha2_256(&amp;[0])&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            },&#xD;&#xA;            Err(_e) =&gt; {&#xD;&#xA;                sp_core::hashing::sha2_256(&amp;[0])&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Fetch runtime information from the node.&#xD;&#xA;    async fn get_runtime_version() -&gt; Result&lt;StateGetRuntimeVersion, Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;        let client = reqwest::Client::new();&#xD;&#xA;        let req = NodeRequest {&#xD;&#xA;            id: 1,&#xD;&#xA;            jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;            method: &quot;state_getRuntimeVersion&quot;.to_string(),&#xD;&#xA;            params: vec![]&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;        let res = client&#xD;&#xA;            .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;            .json(&amp;serde_json::json!(req))&#xD;&#xA;            .send()&#xD;&#xA;            .await;&#xD;&#xA;    &#xD;&#xA;        match res {&#xD;&#xA;            Ok(res) =&gt; {&#xD;&#xA;                match res.status() {&#xD;&#xA;                    reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                        match res.json::&lt;StateGetRuntimeVersionSuccess&gt;().await {&#xD;&#xA;                            Ok(parsed) =&gt; {&#xD;&#xA;                                Ok(parsed.result)&#xD;&#xA;                            },&#xD;&#xA;                            Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;                        }&#xD;&#xA;                    },&#xD;&#xA;                    _ =&gt; {&#xD;&#xA;                        Err(String::from(&quot;Something went wrong&quot;).into())&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            },&#xD;&#xA;            Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fn encode_extrinsic&lt;S: Encode ,C: Encode&gt;(signature: Option&lt;S&gt;, call: C) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;        let mut tmp: Vec&lt;u8&gt; = vec![];&#xD;&#xA;    &#xD;&#xA;        const EXTRINSIC_VERSION: u8 = 4;&#xD;&#xA;        match signature.as_ref() {&#xD;&#xA;            Some(s) =&gt; {&#xD;&#xA;                tmp.push(EXTRINSIC_VERSION | 0b1000_0000);&#xD;&#xA;                s.encode_to(&amp;mut tmp);&#xD;&#xA;            },&#xD;&#xA;            None =&gt; {&#xD;&#xA;                tmp.push(EXTRINSIC_VERSION &amp; 0b0111_1111);&#xD;&#xA;            },&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        call.encode_to(&amp;mut tmp);&#xD;&#xA;    &#xD;&#xA;        let compact_len = Compact(tmp.len() as u32);&#xD;&#xA;    &#xD;&#xA;        let mut output: Vec&lt;u8&gt; = vec![];&#xD;&#xA;        compact_len.encode_to(&amp;mut output);&#xD;&#xA;        output.extend(tmp);&#xD;&#xA;    &#xD;&#xA;        output&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[async_std::main]&#xD;&#xA;    async fn main() {&#xD;&#xA;    &#xD;&#xA;        let storage_key = &quot;4d4c14c40d1b7ecb942455794693fa68&quot;;&#xD;&#xA;       &#xD;&#xA;        let pallet_index = 8;&#xD;&#xA;        let method_index = 0;&#xD;&#xA;        let call_index: [u8; 2] = [pallet_index, method_index];&#xD;&#xA;        let address: Vec&lt;u8&gt; = storage_key.as_bytes().to_vec().encode();&#xD;&#xA;        let owner = [0];&#xD;&#xA;        let call_data  = [call_index.to_vec(), address, owner.to_vec()].concat();&#xD;&#xA;    &#xD;&#xA;        let call_hex = hex::encode(call_data.clone());&#xD;&#xA;        println!(&quot;CALL HEX {:?}&quot;, call_hex);&#xD;&#xA;        let hash = sp_core::blake2_256(call_data.as_ref());&#xD;&#xA;        println!(&quot;CALL HASH {:?}&quot;, hex::encode(hash));&#xD;&#xA;    &#xD;&#xA;        let from = AccountKeyring::Alice.to_account_id();&#xD;&#xA;        let alice_nonce = get_nonce(&amp;from).await;&#xD;&#xA;        let runtime_version = get_runtime_version().await.unwrap();&#xD;&#xA;        let genesis_hash = get_genesis_hash().await;&#xD;&#xA;    &#xD;&#xA;        let extra = (&#xD;&#xA;            Era::Immortal,&#xD;&#xA;            Compact(alice_nonce),&#xD;&#xA;            Compact(0u128)&#xD;&#xA;        );&#xD;&#xA;    &#xD;&#xA;        let additional = (&#xD;&#xA;            runtime_version.spec_version,&#xD;&#xA;            runtime_version.transaction_version,&#xD;&#xA;            genesis_hash,&#xD;&#xA;            genesis_hash,&#xD;&#xA;        );&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        let signature = {&#xD;&#xA;            let full_unsigned_payload = (&amp;call_data, &amp;extra, &amp;additional);&#xD;&#xA;            let full_unsigned_payload_scale_bytes = full_unsigned_payload.encode();&#xD;&#xA;    &#xD;&#xA;            if call_data.len() &gt; 256 {&#xD;&#xA;                AccountKeyring::Alice.sign(&amp;sp_core::blake2_256(&amp;full_unsigned_payload_scale_bytes)[..])&#xD;&#xA;            } else {&#xD;&#xA;                AccountKeyring::Alice.sign(&amp;full_unsigned_payload_scale_bytes)&#xD;&#xA;            }&#xD;&#xA;        };&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        let signature_to_encode = Some((&#xD;&#xA;            MultiAddress::Id::&lt;_,u32&gt;(from),&#xD;&#xA;            MultiSignature::Sr25519(signature),&#xD;&#xA;            extra&#xD;&#xA;        ));&#xD;&#xA;    &#xD;&#xA;        let payload_scale_encoded = encode_extrinsic(&#xD;&#xA;            signature_to_encode,&#xD;&#xA;            call_data&#xD;&#xA;        );&#xD;&#xA;        let payload_hex = format!(&quot;0x{}&quot;, hex::encode(&amp;payload_scale_encoded));&#xD;&#xA;        println!(&quot;PAYLOAD HEX {:?}&quot;, payload_hex);&#xD;&#xA;        println!(&quot;TARGET BYTES {:?}&quot;, hex::decode(&quot;29028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01264459d771430ea6f806df70c10f91c783cb31ee8007751a4906fa92ddf70313431871e435f7fbddfb3974ece95c82f3d59cb8abe98d78f47cc150ae99c1b089001400080080346434633134633430643162376563623934323435353739343639336661363800&quot;).unwrap());&#xD;&#xA;        println!(&quot;RESULT BYTES {:?}&quot;, payload_scale_encoded);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;### The output&#xD;&#xA;&#xD;&#xA;    CALL HEX &quot;080080346434633134633430643162376563623934323435353739343639336661363800&quot;&#xD;&#xA;    CALL HASH &quot;9f7038a86de92cd63b1d3edce42730ffeca300c6e590e1a457e675add24ff706&quot;&#xD;&#xA;    GENESIS HASH &quot;0xeba2ea8340d05a42a50ddd5c8cbf5ac91de372cff7c4785bcab4ebbdf388584f&quot;&#xD;&#xA;&#xD;&#xA;    PAYLOAD HEX &quot;0x2d028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01268cb1fc4beb651a7ca1b0944fe22070e702bfb9ba455391a25f5fbefc2cd22b4b4defc1df9c8b946f9be936a0b823f339fd5eed23755dfd4cca467b595be38900140090080080346434633134633430643162376563623934323435353739343639336661363800&quot;&#xD;&#xA;&#xD;&#xA;    TARGET BYTES [41, 2, 132, 0, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, 38, 68, 89, 215, 113, 67, 14, 166, 248, 6, 223, 112, 193, 15, 145, 199, 131, 203, 49, 238, 128, 7, 117, 26, 73, 6, 250, 146, 221, 247, 3, 19, 67, 24, 113, 228, 53, 247, 251, 221, 251, 57, 116, 236, 233, 92, 130, 243, 213, 156, 184, 171, 233, 141, 120, 244, 124, 193, 80, 174, 153, 193, 176, 137, 0, 20, 0, 8, 0, 128, 52, 100, 52, 99, 49, 52, 99, 52, 48, 100, 49, 98, 55, 101, 99, 98, 57, 52, 50, 52, 53, 53, 55, 57, 52, 54, 57, 51, 102, 97, 54, 56, 0]&#xD;&#xA;    RESULT BYTES [45, 2, 132, 0, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, 38, 140, 177, 252, 75, 235, 101, 26, 124, 161, 176, 148, 79, 226, 32, 112, 231, 2, 191, 185, 186, 69, 83, 145, 162, 95, 95, 190, 252, 44, 210, 43, 75, 77, 239, 193, 223, 156, 139, 148, 111, 155, 233, 54, 160, 184, 35, 243, 57, 253, 94, 237, 35, 117, 93, 253, 76, 202, 70, 123, 89, 91, 227, 137, 0, 20, 0, 144, 8, 0, 128, 52, 100, 52, 99, 49, 52, 99, 52, 48, 100, 49, 98, 55, 101, 99, 98, 57, 52, 50, 52, 53, 53, 55, 57, 52, 54, 57, 51, 102, 97, 54, 56, 0]&#xD;&#xA;&#xD;&#xA;The &quot;Result Bytes&quot; is the byte array that I generate. The &quot;Target Bytes&quot; array is generated by the Polkadot web client.&#xD;&#xA;Call Hex and Call Hash are correct and match the ones from the Polkadot web client.&#xD;&#xA;&#xD;&#xA;### Query result&#xD;&#xA;If I try to execute the result Payload Hex I get an error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;### Bytes difference&#xD;&#xA;I've highlighted the bytes that differ:&#xD;&#xA;&#xD;&#xA;TARGET BYTES [`41`, 2, 132, 0, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, 38, `68, 89, 215, 113, 67, 14, 166, 248, 6, 223, 112, 193, 15, 145, 199, 131, 203, 49, 238, 128, 7, 117, 26, 73, 6, 250, 146, 221, 247, 3, 19, 67, 24, 113, 228, 53, 247, 251, 221, 251, 57, 116, 236, 233, 92, 130, 243, 213, 156, 184, 171, 233, 141, 120, 244, 124, 193, 80, 174, 153, 193, 176, 137, 0, 20, 0`, 8, 0, 128, 52, 100, 52, 99, 49, 52, 99, 52, 48, 100, 49, 98, 55, 101, 99, 98, 57, 52, 50, 52, 53, 53, 55, 57, 52, 54, 57, 51, 102, 97, 54, 56, 0]&#xD;&#xA;&#xD;&#xA;RESULT BYTES [`45`, 2, 132, 0, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, 38, `140, 177, 252, 75, 235, 101, 26, 124, 161, 176, 148, 79, 226, 32, 112, 231, 2, 191, 185, 186, 69, 83, 145, 162, 95, 95, 190, 252, 44, 210, 43, 75, 77, 239, 193, 223, 156, 139, 148, 111, 155, 233, 54, 160, 184, 35, 243, 57, 253, 94, 237, 35, 117, 93, 253, 76, 202, 70, 123, 89, 91, 227, 137, 0, 20, 0, 144`, 8, 0, 128, 52, 100, 52, 99, 49, 52, 99, 52, 48, 100, 49, 98, 55, 101, 99, 98, 57, 52, 50, 52, 53, 53, 55, 57, 52, 54, 57, 51, 102, 97, 54, 56, 0]&#xD;&#xA;&#xD;&#xA;Would appreciate any help on finding the reasons of the difference in results. Thanks!&#xD;&#xA;&#xD;&#xA;## Update&#xD;&#xA;&#xD;&#xA;This is the last version of the code&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use serde::{Serialize, Deserialize};&#xD;&#xA;use sp_keyring::AccountKeyring;&#xD;&#xA;use sp_runtime::{MultiAddress, MultiSignature, generic::Era};&#xD;&#xA;use parity_scale_codec::{ Compact, Encode };&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;#[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;struct SystemSyncState {&#xD;&#xA;    current_block: u32,&#xD;&#xA;    starting_block: u32,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;struct SystemSyncStateSuccess {&#xD;&#xA;    jsonrpc: String,&#xD;&#xA;    result: SystemSyncState,&#xD;&#xA;    id: u8,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;struct SystemAccountNextIndexSuccess {&#xD;&#xA;    jsonrpc: String,&#xD;&#xA;    result: u32,&#xD;&#xA;    id: u8,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;struct ChainGetBlockHashSuccess {&#xD;&#xA;    jsonrpc: String,&#xD;&#xA;    result: String,&#xD;&#xA;    id: u8,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;#[serde(untagged)]&#xD;&#xA;enum StateGetRuntimeVersionApis {&#xD;&#xA;    Int(u32),&#xD;&#xA;    Str(String),&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;#[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;struct StateGetRuntimeVersion {&#xD;&#xA;    apis: Vec&lt;[StateGetRuntimeVersionApis;2]&gt;,&#xD;&#xA;    authoring_version: u32,&#xD;&#xA;    impl_name: String,&#xD;&#xA;    impl_version: u32,&#xD;&#xA;    spec_name: String,&#xD;&#xA;    spec_version: u32,&#xD;&#xA;    transaction_version: u32,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;struct StateGetRuntimeVersionSuccess {&#xD;&#xA;    jsonrpc: String,&#xD;&#xA;    result: StateGetRuntimeVersion,&#xD;&#xA;    id: u8,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(Serialize)]&#xD;&#xA;struct NodeRequest {&#xD;&#xA;    id: u8,&#xD;&#xA;    jsonrpc: String,&#xD;&#xA;    method: String,&#xD;&#xA;    params: Vec&lt;String&gt;,&#xD;&#xA;}&#xD;&#xA;pub struct StorageKeyPrefix(Vec&lt;u8&gt;);&#xD;&#xA;&#xD;&#xA;async fn get_nonce(account: &amp;sp_runtime::AccountId32) -&gt; u32 {&#xD;&#xA;&#xD;&#xA;    let client = reqwest::Client::new();&#xD;&#xA;    let req = NodeRequest {&#xD;&#xA;        id: 1,&#xD;&#xA;        jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;        method: &quot;system_accountNextIndex&quot;.to_string(),&#xD;&#xA;        params: vec![account.to_string()],&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let res = client&#xD;&#xA;        .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;        .json(&amp;serde_json::json!(req))&#xD;&#xA;        .send()&#xD;&#xA;        .await;&#xD;&#xA;&#xD;&#xA;    match res {&#xD;&#xA;        Ok(res) =&gt; {&#xD;&#xA;            match res.status() {&#xD;&#xA;                reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                    match res.json::&lt;SystemAccountNextIndexSuccess&gt;().await {&#xD;&#xA;                        Ok(parsed) =&gt; {&#xD;&#xA;                            // println!(&quot;NONCE {:#?}&quot;, parsed.result);&#xD;&#xA;                            parsed.result&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; {&#xD;&#xA;                            println!(&quot;ERR {:?}&quot;, e);&#xD;&#xA;                            0&#xD;&#xA;                        },&#xD;&#xA;                    }&#xD;&#xA;                },&#xD;&#xA;                _ =&gt; {&#xD;&#xA;                    0&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        Err(_e) =&gt; {&#xD;&#xA;            0&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;async fn get_genesis_hash() -&gt; [u8; 32] {&#xD;&#xA;    let client = reqwest::Client::new();&#xD;&#xA;    let req = NodeRequest {&#xD;&#xA;        id: 1,&#xD;&#xA;        jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;        method: &quot;chain_getBlockHash&quot;.to_string(),&#xD;&#xA;        params: vec![&quot;0&quot;.to_string()]&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let res = client&#xD;&#xA;        .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;        .json(&amp;serde_json::json!(req))&#xD;&#xA;        .send()&#xD;&#xA;        .await;&#xD;&#xA;&#xD;&#xA;    match res {&#xD;&#xA;        Ok(res) =&gt; {&#xD;&#xA;            match res.status() {&#xD;&#xA;                reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                    match res.json::&lt;ChainGetBlockHashSuccess&gt;().await {&#xD;&#xA;                        Ok(parsed) =&gt; {&#xD;&#xA;                            println!(&quot;GENESIS HASH {:#?}&quot;, parsed.result);&#xD;&#xA;                            sp_core::hashing::sha2_256(parsed.result.as_bytes())&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; {&#xD;&#xA;                            println!(&quot;ERR {:?}&quot;, e);&#xD;&#xA;                            sp_core::hashing::sha2_256(&amp;[0])&#xD;&#xA;                        },&#xD;&#xA;                    }&#xD;&#xA;                },&#xD;&#xA;                _ =&gt; {&#xD;&#xA;                    sp_core::hashing::sha2_256(&amp;[0])&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        Err(_e) =&gt; {&#xD;&#xA;            sp_core::hashing::sha2_256(&amp;[0])&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;async fn get_runtime_version() -&gt; Result&lt;StateGetRuntimeVersion, Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;    let client = reqwest::Client::new();&#xD;&#xA;    let req = NodeRequest {&#xD;&#xA;        id: 1,&#xD;&#xA;        jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;        method: &quot;state_getRuntimeVersion&quot;.to_string(),&#xD;&#xA;        params: vec![]&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let res = client&#xD;&#xA;        .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;        .json(&amp;serde_json::json!(req))&#xD;&#xA;        .send()&#xD;&#xA;        .await;&#xD;&#xA;&#xD;&#xA;    match res {&#xD;&#xA;        Ok(res) =&gt; {&#xD;&#xA;            match res.status() {&#xD;&#xA;                reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                    match res.json::&lt;StateGetRuntimeVersionSuccess&gt;().await {&#xD;&#xA;                        Ok(parsed) =&gt; {&#xD;&#xA;                            Ok(parsed.result)&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;                    }&#xD;&#xA;                },&#xD;&#xA;                _ =&gt; {&#xD;&#xA;                    Err(String::from(&quot;Something went wrong&quot;).into())&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn encode_extrinsic&lt;S: Encode ,C: Encode&gt;(signature: Option&lt;S&gt;, call: C) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;    let mut tmp: Vec&lt;u8&gt; = vec![];&#xD;&#xA;&#xD;&#xA;    const EXTRINSIC_VERSION: u8 = 4;&#xD;&#xA;    match signature.as_ref() {&#xD;&#xA;        Some(s) =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION | 0b1000_0000);&#xD;&#xA;            s.encode_to(&amp;mut tmp);&#xD;&#xA;        },&#xD;&#xA;        None =&gt; {&#xD;&#xA;            tmp.push(EXTRINSIC_VERSION &amp; 0b0111_1111);&#xD;&#xA;        },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    call.encode_to(&amp;mut tmp);&#xD;&#xA;&#xD;&#xA;    let compact_len = Compact(tmp.len() as u32);&#xD;&#xA;&#xD;&#xA;    let mut output: Vec&lt;u8&gt; = vec![];&#xD;&#xA;    compact_len.encode_to(&amp;mut output);&#xD;&#xA;    output.extend(tmp);&#xD;&#xA;&#xD;&#xA;    output&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[async_std::main]&#xD;&#xA;async fn main() {&#xD;&#xA;&#xD;&#xA;    let storage_key = &quot;4d4c14c40d1b7ecb942455794693fa68&quot;;&#xD;&#xA;&#xD;&#xA;    let pallet_index: u8 = 8;&#xD;&#xA;    let method_index: u8 = 0;&#xD;&#xA;&#xD;&#xA;    let address = storage_key.as_bytes().to_owned();&#xD;&#xA;    let owner: [u8; 1] = [0];&#xD;&#xA;    let call_data = (&#xD;&#xA;        pallet_index,&#xD;&#xA;        method_index,&#xD;&#xA;        address,&#xD;&#xA;        owner&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    let from = AccountKeyring::Alice.to_account_id();&#xD;&#xA;    let alice_nonce = get_nonce(&amp;from).await;&#xD;&#xA;    let runtime_version = get_runtime_version().await.unwrap();&#xD;&#xA;    let genesis_hash = get_genesis_hash().await;&#xD;&#xA;&#xD;&#xA;    let extra = (&#xD;&#xA;        Era::Immortal,&#xD;&#xA;        Compact(alice_nonce),&#xD;&#xA;        Compact(0u128)&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    let additional = (&#xD;&#xA;        runtime_version.spec_version,&#xD;&#xA;        runtime_version.transaction_version,&#xD;&#xA;        genesis_hash,&#xD;&#xA;        genesis_hash,&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    let signature = {&#xD;&#xA;        let full_unsigned_payload = (&amp;call_data, &amp;extra, &amp;additional);&#xD;&#xA;        let full_unsigned_payload_scale_bytes = full_unsigned_payload.encode();&#xD;&#xA;&#xD;&#xA;        if full_unsigned_payload_scale_bytes.len() &gt; 256 {&#xD;&#xA;            AccountKeyring::Alice.sign(&amp;sp_core::blake2_256(&amp;full_unsigned_payload_scale_bytes)[..])&#xD;&#xA;        } else {&#xD;&#xA;            AccountKeyring::Alice.sign(&amp;full_unsigned_payload_scale_bytes)&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let signature_to_encode = Some((&#xD;&#xA;        MultiAddress::Id::&lt;_,u32&gt;(from),&#xD;&#xA;        MultiSignature::Sr25519(signature),&#xD;&#xA;        extra&#xD;&#xA;    ));&#xD;&#xA;&#xD;&#xA;    let payload_scale_encoded = encode_extrinsic(&#xD;&#xA;        signature_to_encode,&#xD;&#xA;        call_data&#xD;&#xA;    );&#xD;&#xA;    let payload_hex = format!(&quot;0x{}&quot;, hex::encode(&amp;payload_scale_encoded));&#xD;&#xA;    println!(&quot;TARGET HEX {:?}&quot;, &quot;0x29028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d014c6d14a111568aa33472f6061d31763a0acc15fe32a53f5cd7c0e411bcf7a272636de5498a328c34087140f329780afd9aac3e6ed94213e9215e979771173c87001400080080346434633134633430643162376563623934323435353739343639336661363800&quot;);&#xD;&#xA;    println!(&quot;RESULT HEX {:?}&quot;, payload_hex);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I understand correctly the only problem right now is the incorrect signature.&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;### Bytes difference&#xD;&#xA;TARGET BYTES [41, 2, 132, 0, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, `76, 109, 20, 161, 17, 86, 138, 163, 52, 114, 246, 6, 29, 49, 118, 58, 10, 204, 21, 254, 50, 165, 63, 92, 215, 192, 228, 17, 188, 247, 162, 114, 99, 109, 229, 73, 138, 50, 140, 52, 8, 113, 64, 243, 41, 120, 10, 253, 154, 172, 62, 110, 217, 66, 19, 233, 33, 94, 151, 151, 113, 23, 60, 135`, 0, 20, 0, 8, 0, 128, 52, 100, 52, 99, 49, 52, 99, 52, 48, 100, 49, 98, 55, 101, 99, 98, 57, 52, 50, 52, 53, 53, 55, 57, 52, 54, 57, 51, 102, 97, 54, 56, 0]&#xD;&#xA;&#xD;&#xA;RESULT BYTES [41, 2, 132, 0, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125, 1, `154, 207, 39, 54, 83, 45, 188, 252, 156, 12, 35, 43, 195, 150, 79, 241, 36, 120, 168, 73, 139, 81, 80, 155, 228, 224, 9, 41, 214, 157, 87, 38, 237, 169, 110, 227, 254, 140, 230, 192, 147, 148, 160, 32, 252, 169, 237, 183, 74, 105, 32, 63, 77, 36, 200, 207, 76, 121, 217, 250, 176, 135, 97, 134`, 0, 20, 0, 8, 0, 128, 52, 100, 52, 99, 49, 52, 99, 52, 48, 100, 49, 98, 55, 101, 99, 98, 57, 52, 50, 52, 53, 53, 55, 57, 52, 54, 57, 51, 102, 97, 54, 56, 0]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CV0J9.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/QfKnN.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/dfyot.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/QA6qC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3740" PostHistoryTypeId="2" PostId="1024" RevisionGUID="03748825-a7c3-4c7a-9f4e-7938199f4152" CreationDate="2022-03-22T20:14:49.287" UserId="205" Text="I'm off-chain indexing some pallet events into my off-chain local storage using an OCW. Now, I want to be able to retrieve this data via RPC/REST from an external service. &#xD;&#xA;Is this possible? Does it require the OCW to access the local-storage as part of the RPC/REST query? &#xD;&#xA;Any example will be appreciate it.&#xD;&#xA;Cheers!&#xD;&#xA;&#xD;&#xA;NB: I'm not after an Oracle, I need the opposite case." ContentLicense="CC BY-SA 4.0" />
  <row Id="3742" PostHistoryTypeId="1" PostId="1024" RevisionGUID="03748825-a7c3-4c7a-9f4e-7938199f4152" CreationDate="2022-03-22T20:14:49.287" UserId="205" Text="Is it possible to query an OCW via RPC/REST from an external service?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3743" PostHistoryTypeId="3" PostId="1024" RevisionGUID="03748825-a7c3-4c7a-9f4e-7938199f4152" CreationDate="2022-03-22T20:14:49.287" UserId="205" Text="|rpc|offchain-worker|indexing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3746" PostHistoryTypeId="2" PostId="1026" RevisionGUID="f7bfcd8f-10f4-4a23-b43a-4836c21ddcae" CreationDate="2022-03-22T21:06:59.430" UserId="375" Text="I have some expiry time in block number which I need to deem some storage values expired after that block number, however in the UX I want to present this value as an estimated datetime. &#xD;&#xA;So to be able to do this I believe I need to read the timestamp of the current block and then have an estimation of the time that it takes to generate a block (block_time) and then calculate a timespan as block_count*block_time.&#xD;&#xA;&#xD;&#xA;Is this the best way to estimate the timestamp of a future block?!&#xD;&#xA;&#xD;&#xA;If yes, what is the best way to get an estimation of the block_time (time that it takes to generate a block)?!" ContentLicense="CC BY-SA 4.0" />
  <row Id="3748" PostHistoryTypeId="1" PostId="1026" RevisionGUID="f7bfcd8f-10f4-4a23-b43a-4836c21ddcae" CreationDate="2022-03-22T21:06:59.430" UserId="375" Text="How to estimate the timestamp of a future block in substarte?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3749" PostHistoryTypeId="3" PostId="1026" RevisionGUID="f7bfcd8f-10f4-4a23-b43a-4836c21ddcae" CreationDate="2022-03-22T21:06:59.430" UserId="375" Text="|timestamp|substrate-block-time|block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3750" PostHistoryTypeId="2" PostId="1027" RevisionGUID="f87676f0-1742-461c-a2a8-13cb29fcacac" CreationDate="2022-03-22T21:16:17.857" UserId="1811" Text="Assuming I was a smart contract deployed in a Parachain EVM wanting to cross out to IPFS to save or read data, what is the best way of achieving this in a decentralised way.&#xD;&#xA;For example, doing this via a simple React Dapp, is not realistic as the smart contract will have to be able to always connect to the client e.g. emit an event and the client picks it up and pushes it to IPFS&#xD;&#xA;Running a webserver will solve the above issue but becomes an attack vector, hence quickly evaporates the decentralisation of IPFS data storage and smart contract execution logic" ContentLicense="CC BY-SA 4.0" />
  <row Id="3752" PostHistoryTypeId="1" PostId="1027" RevisionGUID="f87676f0-1742-461c-a2a8-13cb29fcacac" CreationDate="2022-03-22T21:16:17.857" UserId="1811" Text="Smart contract to IPFS communication" ContentLicense="CC BY-SA 4.0" />
  <row Id="3753" PostHistoryTypeId="3" PostId="1027" RevisionGUID="f87676f0-1742-461c-a2a8-13cb29fcacac" CreationDate="2022-03-22T21:16:17.857" UserId="1811" Text="|storage|evm|decentralised|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3754" PostHistoryTypeId="4" PostId="1026" RevisionGUID="62a0a090-1f2e-495a-ae08-2fdadd2243c1" CreationDate="2022-03-22T21:29:08.003" UserId="29" Comment="edited title" Text="How to estimate the timestamp of a future block in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3755" PostHistoryTypeId="5" PostId="1024" RevisionGUID="35d9b9ce-83d5-411f-a391-3777d738dbc6" CreationDate="2022-03-22T21:43:37.227" UserId="205" Comment="added 103 characters in body" Text="I'm off-chain indexing some pallet events into my off-chain local storage using an OCW. Now, I want to be able to retrieve this data via RPC from an external service. &#xD;&#xA;Is this possible? Does it require the OCW to access the local-storage as part of the RPC query? &#xD;&#xA;&#xD;&#xA;Do `Custom RPC` work for the off-chain runtime?&#xD;&#xA;https://docs.substrate.io/v3/runtime/custom-rpcs/&#xD;&#xA;&#xD;&#xA;Any example will be appreciate it.&#xD;&#xA;TIA, Cheers!&#xD;&#xA;&#xD;&#xA;NB: I'm not after an Oracle, I need the opposite case." ContentLicense="CC BY-SA 4.0" />
  <row Id="3756" PostHistoryTypeId="4" PostId="1024" RevisionGUID="35d9b9ce-83d5-411f-a391-3777d738dbc6" CreationDate="2022-03-22T21:43:37.227" UserId="205" Comment="added 103 characters in body" Text="Is it possible to query an OCW's Off-chain storage via RPC from an external service?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3759" PostHistoryTypeId="2" PostId="1029" RevisionGUID="81357bb8-cd50-48f6-8a7d-8679353b163a" CreationDate="2022-03-22T22:16:08.057" UserId="380" Text="Maybe the [offchain::ipfs](https://rs-ipfs.github.io/offchain-ipfs-manual/) project would help you interact with IPFS as it is a modified substrate node.&#xD;&#xA;&#xD;&#xA;Alternatively, you could create a [chain extension](https://github.com/paritytech/ink/tree/master/examples/rand-extension), which would allow your contract to &quot;*call a custom Substrate function from ink!*&quot;. In this scenario, your chain extension would perform the IPFS operations.&#xD;&#xA;&#xD;&#xA;Furthermore, you could create your own pallet, which is an additional library that can be included in the substrate runtime. You could then use this pallet to perform all of your business logic and perhaps not use pallet_contracts at all.&#xD;&#xA;&#xD;&#xA;For each example, to be decentralised you would need to have many nodes  running the software, which is effectively a blockchain / parachain. I'm not sure if there are established parachains that would implement a chain extension you developed for a fee but this could be a potential route if there were.&#xD;&#xA;&#xD;&#xA;Great question and I hope it attracts additional answers as I could also do with some clarity on the interactions of chain extensions and pallets and how to build a network once they're developed. Welcome to the community." ContentLicense="CC BY-SA 4.0" />
  <row Id="3761" PostHistoryTypeId="2" PostId="1030" RevisionGUID="35894138-060d-4b79-901a-3ce6f680f6c8" CreationDate="2022-03-22T22:24:21.803" UserId="494" Text="here's some potentially useful docs: https://rs-ipfs.github.io/offchain-ipfs-manual/substrate-core-modifications.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="3763" PostHistoryTypeId="5" PostId="986" RevisionGUID="276e4eb0-82f3-43f7-af0f-ca44ff90c96a" CreationDate="2022-03-22T23:21:35.593" UserId="283" Comment="(corrections based on Jeff Burdges' answer below)" Text="SR25519 is a Schnorr Signature protocol on top of the [Ristretto](https://ristretto.group/) compressed point format of the Ed25519 curve. &#xD;&#xA;&#xD;&#xA;Bitcoin and Ethereum both use the Secp256k1 elliptic curve.&#xD;&#xA;&#xD;&#xA;In elliptic-curve cryptography, public keys are points. In the Ristretto group, 0 is a member of the group, while in Secp256k1 it is not.&#xD;&#xA;&#xD;&#xA;The secret key (a scalar value) corresponding to this member of the Ristretto group is, itself, 0." ContentLicense="CC BY-SA 4.0" />
  <row Id="3765" PostHistoryTypeId="5" PostId="922" RevisionGUID="66e52cfa-43a1-4d20-952c-46d1a794871d" CreationDate="2022-03-23T00:54:49.760" UserId="309" Comment="deleted 556 characters in body" Text="The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C.&#xD;&#xA;&#xD;&#xA;C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B in order to use functions and types available in B and C (in pallet A, I do a `pub use pallet_B::pallet as B;` and in order to use  types defined in B, inside A/pub mod pallet{..}, I do: `use pallet_B::{Type0, Type1, Type2};`).&#xD;&#xA;&#xD;&#xA;Now, this all work fine except in one particular case: for Types defined in B as `Type Type_x&lt;T&gt;=&lt;T as C::Config&gt;::Type_y;`. If I try to import Type_x in A from B, I get an Error saying that some traits from C::Config are missing, and this is what I don't understand. My perception is that if B is already accessing everything in C through tight-coupling, then there is no need to call C from A's pallet or A's runtime....What am I misunderstanding?&#xD;&#xA;&#xD;&#xA;For a concrete example of what I am trying to do, you can take a look at https://github.com/Fair-Squares/fair-squares/tree/structure_template/pallets&#xD;&#xA;&#xD;&#xA;A --&gt; Template, B--&gt;nft, C--&gt;orml-nft&#xD;&#xA;&#xD;&#xA;Make sure you're looking at the &quot;structure_template&quot; branch.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;**pallet1.rs**&#xD;&#xA;&#xD;&#xA;    use frame_support::{ensure, pallet_prelude::*, Parameter};&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    mod pallet {&#xD;&#xA;        pub trait Config: system::Config {&#xD;&#xA;    		type ClassId: Parameter + Member + AtLeast32BitUnsigned + Default + Copy;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;        #[pallet::storage]&#xD;&#xA;        pub(super) type MyValue&lt;T: Config&gt; = StorageValue&lt;_, u64, ValueQuery&gt;;&#xD;&#xA;    &#xD;&#xA;        // -- snip --&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        pub fn get_value() -&gt; u32 {&#xD;&#xA;            &lt;Something&lt;T&gt;&gt;::get()&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**pallet2.rs**&#xD;&#xA;&#xD;&#xA;    use frame_support::pallet_prelude::*;&#xD;&#xA;    use crate::pallet1;&#xD;&#xA;    mod pallet {&#xD;&#xA;        pub trait Config: pallet1::Config {&#xD;&#xA;            // -- snip --&#xD;&#xA;        }&#xD;&#xA;    	pub type ClassIdOf&lt;T&gt; = &lt;T as pallet1::Config&gt;::ClassId;&#xD;&#xA;	&#xD;&#xA;    #[pallet::call]&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        pub fn get_value_directly(_origin: OriginFor&lt;T&gt;) -&gt; Result {&#xD;&#xA;            let value = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;        pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; Result {&#xD;&#xA;            pallet1::MyValue::&lt;T&gt;::put(value);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;        pub fn get_value_public_function(_origin: OriginFor&lt;T&gt;) -&gt; Result {&#xD;&#xA;            let value = pallet1::Pallet::&lt;T&gt;::get_value();&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**bad_pallet3.rs**&#xD;&#xA;&#xD;&#xA;    use frame_support::pallet_prelude::*;&#xD;&#xA;    use crate::pallet2;&#xD;&#xA;    use pallet2::{ClassIdOf};&#xD;&#xA;    &#xD;&#xA;    mod pallet {&#xD;&#xA;        pub trait Config: {&#xD;&#xA;            // -- snip --&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    #[pallet::call]&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        pub fn get_value_directly(_origin: OriginFor&lt;T&gt;,cl:ClassIdOf&lt;T&gt;) -&gt; Result {&#xD;&#xA;            let value = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; Result {&#xD;&#xA;            pallet1::MyValue::&lt;T&gt;::put(value);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        pub fn get_value_public_function(_origin: OriginFor&lt;T&gt;) -&gt; Result {&#xD;&#xA;            let value = pallet1::Pallet::&lt;T&gt;::get_value();&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;ClassIdOf in Bad_pallet3 is my problem…" ContentLicense="CC BY-SA 4.0" />
  <row Id="3766" PostHistoryTypeId="5" PostId="922" RevisionGUID="b1500574-2f69-4833-8600-8978f45186ff" CreationDate="2022-03-23T01:44:29.147" UserId="28" Comment="make example code compile" Text="The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C.&#xD;&#xA;&#xD;&#xA;C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B in order to use functions and types available in B and C (in pallet A, I do a `pub use pallet_B::pallet as B;` and in order to use  types defined in B, inside A/pub mod pallet{..}, I do: `use pallet_B::{Type0, Type1, Type2};`).&#xD;&#xA;&#xD;&#xA;Now, this all work fine except in one particular case: for Types defined in B as `Type Type_x&lt;T&gt;=&lt;T as C::Config&gt;::Type_y;`. If I try to import Type_x in A from B, I get an Error saying that some traits from C::Config are missing, and this is what I don't understand. My perception is that if B is already accessing everything in C through tight-coupling, then there is no need to call C from A's pallet or A's runtime....What am I misunderstanding?&#xD;&#xA;&#xD;&#xA;For a concrete example of what I am trying to do, you can take a look at https://github.com/Fair-Squares/fair-squares/tree/structure_template/pallets&#xD;&#xA;&#xD;&#xA;A --&gt; Template, B--&gt;nft, C--&gt;orml-nft&#xD;&#xA;&#xD;&#xA;Make sure you're looking at the &quot;structure_template&quot; branch.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;**lib.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub mod pallet1;&#xD;&#xA;pub mod pallet2;&#xD;&#xA;pub mod bad_pallet3;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet1.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type ClassId: Parameter + Member + Default + Copy;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type MyValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	pub fn get_value() -&gt; u32 {&#xD;&#xA;		&lt;MyValue&lt;T&gt;&gt;::get()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet2.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use crate::pallet1;&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet1::Config {}&#xD;&#xA;&#xD;&#xA;	pub type ClassIdOf&lt;T&gt; = &lt;T as pallet1::Config&gt;::ClassId;&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_directly(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; DispatchResult {&#xD;&#xA;			pallet1::MyValue::&lt;T&gt;::put(value);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_public_function(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = pallet1::Pallet::&lt;T&gt;::get_value();&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**bad_pallet3.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use crate::{pallet1, pallet2};&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	use pallet2::pallet::ClassIdOf;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet2::Config {}&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_directly(_origin: OriginFor&lt;T&gt;, _cl: ClassIdOf&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; DispatchResult {&#xD;&#xA;			pallet1::MyValue::&lt;T&gt;::put(value);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_public_function(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = pallet1::Pallet::&lt;T&gt;::get_value();&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;ClassIdOf in Bad_pallet3 is my problem…" ContentLicense="CC BY-SA 4.0" />
  <row Id="3767" PostHistoryTypeId="5" PostId="982" RevisionGUID="3238a28d-6ee0-40ac-bb96-da55933f1ab1" CreationDate="2022-03-23T01:46:40.890" UserId="28" Comment="added 7 characters in body" Text="We have seen evidence that users can sign messages using the SR25519 and ED25519 public key with all zeros.&#xD;&#xA;&#xD;&#xA;Why or how is the private key to this public key known?&#xD;&#xA;&#xD;&#xA;Are there any other things users should be aware of when using SR25519 or ED25519?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3769" PostHistoryTypeId="2" PostId="1031" RevisionGUID="89476a70-4f19-43c7-9644-1db8003b18d0" CreationDate="2022-03-23T01:56:00.580" UserId="1828" Text="Where can I acquire subsocial tokens so I can start using that platform. I see that there's a faucet but when I go to the faucet it says that's no longer available because of main net launch. But that leaves me still unable to create my profile because I can't find the token anywhere. Is there an ETA for availability?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3771" PostHistoryTypeId="1" PostId="1031" RevisionGUID="89476a70-4f19-43c7-9644-1db8003b18d0" CreationDate="2022-03-23T01:56:00.580" UserId="1828" Text="Subsocial tokens to create profile" ContentLicense="CC BY-SA 4.0" />
  <row Id="3772" PostHistoryTypeId="3" PostId="1031" RevisionGUID="89476a70-4f19-43c7-9644-1db8003b18d0" CreationDate="2022-03-23T01:56:00.580" UserId="1828" Text="|token|subsocial|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3773" PostHistoryTypeId="5" PostId="922" RevisionGUID="88bc1c1e-8db4-4e95-a866-32194bbf79bd" CreationDate="2022-03-23T02:16:59.557" UserId="309" Comment="deleted 172 characters in body" Text="The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C.&#xD;&#xA;&#xD;&#xA;C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B in order to use functions and types available in B and C (in pallet A, I do a `pub use pallet_B::pallet as B;` and in order to use  types defined in B, inside A/pub mod pallet{..}, I do: `use pallet_B::{Type0, Type1, Type2};`).&#xD;&#xA;&#xD;&#xA;Now, this all work fine except in one particular case: for Types defined in B as `Type Type_x&lt;T&gt;=&lt;T as C::Config&gt;::Type_y;`. If I try to import Type_x in A from B, I get an Error saying that some traits from C::Config are missing, and this is what I don't understand. My perception is that if B is already accessing everything in C through tight-coupling, then there is no need to call C from A's pallet or A's runtime....What am I misunderstanding?&#xD;&#xA;&#xD;&#xA;For a concrete example of what I am trying to do, you can take a look at https://github.com/Fair-Squares/fair-squares/tree/structure_template/pallets&#xD;&#xA;&#xD;&#xA;A --&gt; Template, B--&gt;nft, C--&gt;orml-nft&#xD;&#xA;&#xD;&#xA;Make sure you're looking at the &quot;structure_template&quot; branch.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;**lib.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub mod pallet1;&#xD;&#xA;pub mod pallet2;&#xD;&#xA;pub mod bad_pallet3;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet1.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type ClassId: Parameter + Member + Default + Copy;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type MyValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	pub fn get_value() -&gt; u32 {&#xD;&#xA;		&lt;MyValue&lt;T&gt;&gt;::get()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet2.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use crate::pallet1;&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet1::Config {}&#xD;&#xA;&#xD;&#xA;	pub type ClassIdOf&lt;T&gt; = &lt;T as pallet1::Config&gt;::ClassId;&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_directly(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; DispatchResult {&#xD;&#xA;			pallet1::MyValue::&lt;T&gt;::put(value);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_public_function(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = pallet1::Pallet::&lt;T&gt;::get_value();&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**bad_pallet3.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use crate::{pallet1, pallet2};&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	use pallet2::pallet::ClassIdOf;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config{}&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_directly(_origin: OriginFor&lt;T&gt;, _cl: ClassIdOf&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = 5;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; DispatchResult {&#xD;&#xA;			let val=value;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;ClassIdOf in Bad_pallet3 is my problem…I only need ClassIdOf in pallet3, so I leave out pallet2::Config" ContentLicense="CC BY-SA 4.0" />
  <row Id="3774" PostHistoryTypeId="2" PostId="1032" RevisionGUID="f7a03ff5-c7eb-4df1-93a7-6e6e19d3bf0b" CreationDate="2022-03-23T02:59:16.087" UserId="240" Text="When build runtime-benchmarks, we start to having issue with pallet-society. See the error details below&#xD;&#xA;&#xD;&#xA;    error[E0046]: not all trait items implemented, missing: `successful_origin`&#xD;&#xA;        --&gt; /Users/home/.cargo/git/checkouts/substrate-7e08433d4c370a21/19162e4/frame/society/src/lib.rs:1268:1&#xD;&#xA;         |&#xD;&#xA;    1268 | impl&lt;T: Config&gt; EnsureOrigin&lt;T::Origin&gt; for EnsureFounder&lt;T&gt; {&#xD;&#xA;         | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `successful_origin` in implementation&#xD;&#xA;         |&#xD;&#xA;         = help: implement the missing item: `fn successful_origin() -&gt; OuterOrigin { todo!() }`&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0046`.&#xD;&#xA;    error: could not compile `pallet-society` due to previous error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The command used to build runtime-benchmarks &#xD;&#xA;&#xD;&#xA;    cargo build --release --features runtime-benchmarks&#xD;&#xA;&#xD;&#xA;We are using polkadot-v0.9.16. I have removed all the pallet-society reference from our project, the problem still persists. From the Cargo.lock file, seems like it's part of the kusama-runtime.&#xD;&#xA;&#xD;&#xA;This command is used to work with polkadot-v0.9.13. Any help would be much appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="3776" PostHistoryTypeId="1" PostId="1032" RevisionGUID="f7a03ff5-c7eb-4df1-93a7-6e6e19d3bf0b" CreationDate="2022-03-23T02:59:16.087" UserId="240" Text="pallet-society issue to build runtime-benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="3777" PostHistoryTypeId="3" PostId="1032" RevisionGUID="f7a03ff5-c7eb-4df1-93a7-6e6e19d3bf0b" CreationDate="2022-03-23T02:59:16.087" UserId="240" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3778" PostHistoryTypeId="2" PostId="1033" RevisionGUID="111a38d9-6da0-45c5-ac0c-ddede8442a00" CreationDate="2022-03-23T03:01:49.593" UserId="140" Text="I am following this PR https://github.com/substrate-developer-hub/substrate-parachain-template/pull/103 to upgrade codebase to Polkadot 0.9.18 but facing the below issue&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   Compiling cexpr v0.6.0&#xD;&#xA;error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable&#xD;&#xA;   --&gt; /home/deployer/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.9.8/src/atomic.rs:314:6&#xD;&#xA;    |&#xD;&#xA;314 | impl&lt;T: ?Sized + Pointable&gt; Atomic&lt;T&gt; {&#xD;&#xA;    |      ^&#xD;&#xA;...&#xD;&#xA;346 |     pub const fn null() -&gt; Atomic&lt;T&gt; {&#xD;&#xA;    |     -------------------------------- function declared as const here&#xD;&#xA;    |&#xD;&#xA;    = note: see issue #93706 &lt;https://github.com/rust-lang/rust/issues/93706&gt; for more information&#xD;&#xA;    = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0658`.&#xD;&#xA;error: could not compile `crossbeam-epoch` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can someone please help me to fix this? Here is code https://github.com/DataHighway-DHX/DataHighway-Parachain/tree/change-para-id&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;installed toolchains&#xD;&#xA;&#xD;&#xA;nightly-2022-02-23-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-2022-02-23-x86_64-unknown-linux-gnu (directory override for '/home/deployer/Parachain')&#xD;&#xA;rustc 1.61.0-nightly (68369a041 2022-02-22)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3780" PostHistoryTypeId="1" PostId="1033" RevisionGUID="111a38d9-6da0-45c5-ac0c-ddede8442a00" CreationDate="2022-03-23T03:01:49.593" UserId="140" Text="Not able to update to Polkadot0.9.18" ContentLicense="CC BY-SA 4.0" />
  <row Id="3781" PostHistoryTypeId="3" PostId="1033" RevisionGUID="111a38d9-6da0-45c5-ac0c-ddede8442a00" CreationDate="2022-03-23T03:01:49.593" UserId="140" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3782" PostHistoryTypeId="2" PostId="1034" RevisionGUID="8212c962-11d8-4f04-863f-d6c7fe3c79cd" CreationDate="2022-03-23T04:09:18.157" UserId="566" Text="I believe the default era period in substrate-node-template is 24 hours. Is there a way for me to change that period?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3784" PostHistoryTypeId="1" PostId="1034" RevisionGUID="8212c962-11d8-4f04-863f-d6c7fe3c79cd" CreationDate="2022-03-23T04:09:18.157" UserId="566" Text="How to change the era period?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3785" PostHistoryTypeId="3" PostId="1034" RevisionGUID="8212c962-11d8-4f04-863f-d6c7fe3c79cd" CreationDate="2022-03-23T04:09:18.157" UserId="566" Text="|substrate-node-template|era|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3786" PostHistoryTypeId="5" PostId="1020" RevisionGUID="a443b0d2-5d26-4c7b-b2c4-1c02eba7be60" CreationDate="2022-03-23T04:29:31.640" UserId="627" Comment="Corrected (some) spelling." Text="The error above stems from the usage of `import.meta.url`. &#xD;&#xA;&#xD;&#xA;WP4 does not have support for this (unlike WP5), so an extra import loader is needed as per the polkadot-js docs https://polkadot.js.org/docs/usage/FAQ#on-webpack-4-i-have-a-parse-error-on-importmetaurl mentioned in your post. &#xD;&#xA;&#xD;&#xA;The error is caused by this loader inside a webworker. &#xD;&#xA;&#xD;&#xA;The loader creates a `getAbsoluteUrl` function that emulates the `import.meta.url` and this function itself refers to `window.location`. Since webworkers doesn't have the `window` object, only making `self` available, this process fails with the above error.&#xD;&#xA;&#xD;&#xA;There doesn't seem to be a workaround for this, apart from upgrading to WP5 or bypassing it altogether.&#xD;&#xA;&#xD;&#xA;Some additional ideas may be gleamed from looking at the actual injected loader support code, specifically https://github.com/polkadot-js/common/issues/1435#issuecomment-1072052502" ContentLicense="CC BY-SA 4.0" />
  <row Id="3787" PostHistoryTypeId="2" PostId="1035" RevisionGUID="dc70a7b1-9255-441a-99f5-95b51ab66857" CreationDate="2022-03-23T04:31:05.470" UserId="283" Text="Eras are measured in sessions. The duration of sessions are dependent on the consensus mechanism.&#xD;&#xA;&#xD;&#xA;To reduce the number of sessions per era, simply adjust the [`SessionsPerEra`](https://github.com/paritytech/substrate/blob/77c15d2546276a865b6e8f1c5d4b1d0ec1961e72/frame/staking/src/pallet/mod.rs#L128) value in the implementation of `pallet_staking::Config`.&#xD;&#xA;&#xD;&#xA;In BABE, the [`EpochDuration`](https://github.com/paritytech/substrate/blob/77c15d2546276a865b6e8f1c5d4b1d0ec1961e72/frame/babe/src/lib.rs#L127) config member is used to set the number of slots (and therefore the amount of time) in a session. This can only be set in the genesis. The actual parameters given to BABE which determine the block time are in the [`epoch_config`](https://github.com/paritytech/substrate/blob/77c15d2546276a865b6e8f1c5d4b1d0ec1961e72/frame/babe/src/lib.rs#L316) field of `pallet_babe`'s `GenesisConfig`.&#xD;&#xA;&#xD;&#xA;To sum up: you have a few variables to play with - the time between blocks, the amount of blocks in a session, and the amount of sessions in an era. By adjusting these, you can adjust the overall time in a staking era." ContentLicense="CC BY-SA 4.0" />
  <row Id="3789" PostHistoryTypeId="5" PostId="996" RevisionGUID="a5ec1fd1-5138-4fea-9912-99e1ad9c1b86" CreationDate="2022-03-23T04:31:59.623" UserId="403" Comment="Updated error images and added more description." Text="I am working on a substrate based blockchain that is in production. We started the node using PoA consensus but now we want to switch to PoS consensus. I did the necessary changes i.e added necessary pallets and switched from aura to babe. And when I run the node from scratch it's working fine. But the forkless upgrade of the existing chain is causing the block production to stop. I also tried to upgrade node binary which was throwing &quot;Unsupported or invalid BabeApi version&quot;.&#xD;&#xA;&#xD;&#xA;This is the error I am getting when I upgrade my runtime.&#xD;&#xA;[![Error on Forkless Upgrade][1]][1]&#xD;&#xA;&#xD;&#xA;Since this change also required node binary upgrade as there were changes in node. This is the error I am getting after upgrading node binary.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I feel like it is because of Genesis config. Since newly added pallets(babe, Staking, etc.) genesis config will not be loaded during forkless runtime upgrade, could it be related to that?&#xD;&#xA;&#xD;&#xA;Can someone guide me on how to do it correctly? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/jUqaG.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6XmNp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3790" PostHistoryTypeId="2" PostId="1036" RevisionGUID="a4fb8892-1054-43ff-8a4d-57f7c7dbc15b" CreationDate="2022-03-23T04:35:26.360" UserId="377" Text="I have created an anonymous proxy(Proxy pallet). Now I need to delete this proxy.&#xD;&#xA;I am using killAnonymous but it is giving me errors &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lQsu1.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please suggest what i am doing incorrect here" ContentLicense="CC BY-SA 4.0" />
  <row Id="3792" PostHistoryTypeId="1" PostId="1036" RevisionGUID="a4fb8892-1054-43ff-8a4d-57f7c7dbc15b" CreationDate="2022-03-23T04:35:26.360" UserId="377" Text="killAnonymous not working as expected for anonymous proxy" ContentLicense="CC BY-SA 4.0" />
  <row Id="3793" PostHistoryTypeId="3" PostId="1036" RevisionGUID="a4fb8892-1054-43ff-8a4d-57f7c7dbc15b" CreationDate="2022-03-23T04:35:26.360" UserId="377" Text="|pallet|proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3794" PostHistoryTypeId="5" PostId="996" RevisionGUID="05013245-f7ab-4964-b8d4-9794c54489d0" CreationDate="2022-03-23T04:38:28.693" UserId="403" Comment="Added more clarity" Text="I am working on a substrate based blockchain that is in production. We started the node using PoA consensus but now we want to switch to PoS consensus. I did the necessary changes i.e added necessary pallets and switched from aura to babe. And when I run the node from scratch it's working fine. But the forkless upgrade of the existing chain is causing the block production to stop. I also tried to upgrade node binary which was throwing &quot;Unsupported or invalid BabeApi version&quot;.&#xD;&#xA;&#xD;&#xA;This is the error I am getting when I upgrade my runtime.&#xD;&#xA;[![Error on Forkless Upgrade][1]][1]&#xD;&#xA;&#xD;&#xA;Since this change also required node binary upgrade as there were changes in node. This is the error I am getting after upgrading node binary. I did both forkless runtime upgrade and node binary upgrade.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I feel like it is because of Genesis config. Since newly added pallets(babe, Staking, etc.) genesis config will not be loaded during forkless runtime upgrade, could it be related to that?&#xD;&#xA;&#xD;&#xA;Can someone guide me on how to do it correctly? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/jUqaG.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6XmNp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3795" PostHistoryTypeId="5" PostId="922" RevisionGUID="870860eb-bf31-4426-bac1-fb5773fb641f" CreationDate="2022-03-23T04:44:20.470" UserId="309" Comment="added 176 characters in body" Text="The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C.&#xD;&#xA;&#xD;&#xA;C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B in order to use functions and types available in B and C (in pallet A, I do a `pub use pallet_B::pallet as B;` and in order to use  types defined in B, inside A/pub mod pallet{..}, I do: `use pallet_B::{Type0, Type1, Type2};`).&#xD;&#xA;&#xD;&#xA;Now, this all work fine except in one particular case: for Types defined in B as `Type Type_x&lt;T&gt;=&lt;T as C::Config&gt;::Type_y;`. If I try to import Type_x in A from B, I get an Error saying that some traits from C::Config are missing, and this is what I don't understand. My perception is that if B is already accessing everything in C through tight-coupling, then there is no need to call C from A's pallet or A's runtime....What am I misunderstanding?&#xD;&#xA;&#xD;&#xA;For a concrete example of what I am trying to do, you can take a look at https://github.com/Fair-Squares/fair-squares/tree/structure_template/pallets&#xD;&#xA;&#xD;&#xA;A --&gt; Template, B--&gt;nft, C--&gt;orml-nft&#xD;&#xA;&#xD;&#xA;Make sure you're looking at the &quot;structure_template&quot; branch.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;**lib.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub mod pallet1;&#xD;&#xA;pub mod pallet2;&#xD;&#xA;pub mod bad_pallet3;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet1.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type ClassId: Parameter + Member + Default + Copy;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type MyValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	pub fn get_value() -&gt; u32 {&#xD;&#xA;		&lt;MyValue&lt;T&gt;&gt;::get()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet2.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use crate::pallet1;&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet1::Config {}&#xD;&#xA;&#xD;&#xA;	pub type ClassIdOf&lt;T&gt; = &lt;T as pallet1::Config&gt;::ClassId;&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_directly(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; DispatchResult {&#xD;&#xA;			pallet1::MyValue::&lt;T&gt;::put(value);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_public_function(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = pallet1::Pallet::&lt;T&gt;::get_value();&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**bad_pallet3.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use crate::{pallet2};&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	use pallet2::pallet::ClassIdOf;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config{}&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_directly(_origin: OriginFor&lt;T&gt;, _cl: ClassIdOf&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = 5;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; DispatchResult {&#xD;&#xA;			let _val=value;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;ClassIdOf in Bad_pallet3 is my problem…I only need ClassIdOf in pallet3, so I leave out pallet2::Config, which is probably the source of the error—-&gt; is there a way to do this without adding pallet2::Config to pallet3::Config (which is a tight-coupling if I understand things correctly…)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3796" PostHistoryTypeId="2" PostId="1037" RevisionGUID="ff253833-1272-404d-9a4c-20dea21814ce" CreationDate="2022-03-23T04:46:51.913" UserId="28" Text="The problem is that you are never doing any &quot;loose coupling&quot;.&#xD;&#xA;&#xD;&#xA;Loose coupling is when you bridge two pallets through a shared trait interface.&#xD;&#xA;&#xD;&#xA;You need to define a trait like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait LooseInterface {&#xD;&#xA;	type ClassId: Parameter + Member + Default + Copy;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And use it across the pallets you want to bridge.&#xD;&#xA;&#xD;&#xA;Here is an example working solution where pallet 3 is loosely coupled to pallet 2:&#xD;&#xA;&#xD;&#xA;**lib.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub mod pallet1;&#xD;&#xA;pub mod pallet2;&#xD;&#xA;pub mod pallet3;&#xD;&#xA;&#xD;&#xA;use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;// This trait is in a shared location. Probably it should live in some primitive library.&#xD;&#xA;pub trait LooseInterface {&#xD;&#xA;	type ClassId: Parameter + Member + Default + Copy;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet1.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type ClassId: Parameter + Member + Default + Copy;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type MyValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	pub fn get_value() -&gt; u32 {&#xD;&#xA;		&lt;MyValue&lt;T&gt;&gt;::get()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet2.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use crate::pallet1;&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet1::Config {}&#xD;&#xA;&#xD;&#xA;	pub type ClassIdOf&lt;T&gt; = &lt;T as pallet1::Config&gt;::ClassId;&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_directly(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = pallet1::MyValue::&lt;T&gt;::get();&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; DispatchResult {&#xD;&#xA;			pallet1::MyValue::&lt;T&gt;::put(value);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_public_function(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = pallet1::Pallet::&lt;T&gt;::get_value();&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    // Here we implement the shared trait for this pallet.&#xD;&#xA;    // Now it can be loosely coupled to other pallets which expect it.&#xD;&#xA;	impl&lt;T: Config&gt; crate::LooseInterface for Pallet&lt;T&gt; {&#xD;&#xA;		type ClassId = ClassIdOf&lt;T&gt;;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**pallet3.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;        // Here we expect &quot;something&quot; to provide the `LooseInterface`.&#xD;&#xA;        // When building your runtime, you would link pallet 3 to pallet 2&#xD;&#xA;        // which will loosely couple them, since you could also use another&#xD;&#xA;        // pallet which implements this trait instead.&#xD;&#xA;		type Interface: crate::LooseInterface;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	type ClassIdOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Interface as crate::LooseInterface&gt;::ClassId;&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn get_value_directly(_origin: OriginFor&lt;T&gt;, _cl: ClassIdOf&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _value = 5;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn set_value_directly(_origin: OriginFor&lt;T&gt;, value: u32) -&gt; DispatchResult {&#xD;&#xA;			let val = value;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally the loose coupling would happen in the runtime configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Configure the pallet-template in pallets/template.&#xD;&#xA;impl pallet3::Config for Runtime {&#xD;&#xA;	type Interface = pallet2::Pallet&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3798" PostHistoryTypeId="2" PostId="1038" RevisionGUID="c1126764-763b-43cf-91cd-957945cae35d" CreationDate="2022-03-23T04:55:21.660" UserId="283" Text="Upgrading a chain from PoA (Proof-of-Authority) to PoS (Proof-of-Stake) is orthogonal to upgrading a chain from Aura to BABE, which is what's causing the issues you are running into. At the moment, it's not possible to change consensus engines mid-flight, which means that you will have to stick with Aura or restart the chain using BABE.&#xD;&#xA;&#xD;&#xA;However, this doesn't rule out moving to PoS - the only difference between PoA and PoS is the mechanism by which validators are selected. In a PoA system, the validators are selected by being part of a permissioned list. In a PoS system, the validators are selected by a token-staking mechanism.&#xD;&#xA;&#xD;&#xA;`pallet_aura` relies on `pallet_session`, which in turn outsources the actual choice of which validators are active in a session to the [`SessionManager`](https://github.com/paritytech/substrate/blob/77c15d2546276a865b6e8f1c5d4b1d0ec1961e72/frame/session/src/lib.rs#L405). To migrate a chain to PoS, simply set this `SessionManager` type to be `pallet_staking` or some other staking pallet, and configure the staking pallet to run elections. After deploying the runtime upgrade, the chain will successfully be PoS.&#xD;&#xA;&#xD;&#xA;You can do the same thing with BABE - just remember that you have to stick with the same consensus engine you started with." ContentLicense="CC BY-SA 4.0" />
  <row Id="3800" PostHistoryTypeId="2" PostId="1039" RevisionGUID="29204073-3564-4418-ab63-24cb7163508a" CreationDate="2022-03-23T05:13:27.060" UserId="283" Text="The answer here is highly dependent on the block production algorithm used. You'd need different logic for each algorithm.&#xD;&#xA;&#xD;&#xA;If you are aware of an existing block X and want to predict the timestamp of a block X+k, the basic way of doing this is with the formula `average_block_time*k + timestamp(X)`. Finding the timestamp can be done by reading the storage of the `Timestamp` pallet - specifically, the [`Now`](https://github.com/paritytech/substrate/blob/77c15d2546276a865b6e8f1c5d4b1d0ec1961e72/frame/timestamp/src/lib.rs#L156) storage item. Or you can extract something specific like a BABE slot from the block's header and extract a timestamp that way. Neither is perfectly accurate, and neither is better than the other. Timestamps in blockchains aren't objective, and usually slightly inaccurate.&#xD;&#xA;&#xD;&#xA;Finding the average block time in BABE can't be done by querying storage, so it's best to just hardcode it per chain or emulate the logic of [`fn slot_duration`](https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/babe/src/lib.rs#L465)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3802" PostHistoryTypeId="2" PostId="1040" RevisionGUID="3c9487ad-4108-4077-93ff-930d79d7820d" CreationDate="2022-03-23T05:35:40.143" UserId="620" Text="The `kill_anonymous` call needs to come [from the anonymous itself](https://github.com/paritytech/substrate/blob/c9fc99d/frame/proxy/src/lib.rs#L368L372):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let who = ensure_signed(origin)?;&#xD;&#xA;let when = (height, ext_index);&#xD;&#xA;let proxy = Self::anonymous_account(&amp;spawner, &amp;proxy_type, index, Some(when));&#xD;&#xA;ensure!(proxy == who, Error::&lt;T&gt;::NoPermission);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Of course the only way to access an anonymous proxy origin is via `proxy.proxy`. Your call above is correct, but you need to wrap it in a `proxy.proxy` such that the origin is the anon proxy.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;proxy.proxy(&#xD;&#xA;    real: &lt;YOUR_ANON_PROXY&gt;,&#xD;&#xA;    force_proxy_type: Any,&#xD;&#xA;    call: proxy.killAnonymous(&#xD;&#xA;        /* args */&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is because the spawner may have set a new account as the proxy and removed itself, so the permission to kill an anon rests with the anon itself." ContentLicense="CC BY-SA 4.0" />
  <row Id="3804" PostHistoryTypeId="2" PostId="1041" RevisionGUID="5ab1c1d0-ef42-47a9-8300-e80bc18dfd35" CreationDate="2022-03-23T05:49:50.953" UserId="28" Text="To add to Rob's post, in the context of User Experience, the best you can do is give a user an estimate which is updated block to block.&#xD;&#xA;&#xD;&#xA;Most logic on the blockchain is measured out in blocks.&#xD;&#xA;&#xD;&#xA;Unfortunately, no consensus system that I know of can provide perfectly accurate time between blocks. Instead, the network has mechanisms to encourage block production within an average window, but can always allow for some error from that average window from block to block.&#xD;&#xA;&#xD;&#xA;For example, in Ethereum and Bitcoin, the block difficulty is adjusted to account for having blocks produced at a specific average interval, however lucky (or unlucky) mining could lead to short or long blocks.&#xD;&#xA;&#xD;&#xA;For Substrate / Polkadot, we allow for block producers to miss their slot, which can lead to longer time between blocks.&#xD;&#xA;&#xD;&#xA;So, if presenting a user with an estimate of how much time before some event on chain happens, I would do the following:&#xD;&#xA;&#xD;&#xA;1. Get the timestamp of the last block produced from the `Timestamp` pallet.&#xD;&#xA;&#xD;&#xA;2. Calculate the estimated future time as a best effort.&#xD;&#xA;&#xD;&#xA;    ```time_at_last_block + average_block_time * number_of_blocks```&#xD;&#xA;&#xD;&#xA;3. Listen for a new block to be produced, and repeat this process.&#xD;&#xA;&#xD;&#xA;This means that a user may see a countdown time go higher after going down, but practically speaking, this is an accurate representation of what is happening on chain.&#xD;&#xA;&#xD;&#xA;You can query the `average_block_time` from the BABE constants:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Xlkck.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3806" PostHistoryTypeId="2" PostId="1042" RevisionGUID="6941c862-db99-444e-a062-9803403c908d" CreationDate="2022-03-23T05:56:52.947" UserId="283" Text="This was answered by Squirrel - they weren't showing up because Polkadot-JS was pointing at the relay chain, not the parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="3808" PostHistoryTypeId="2" PostId="1043" RevisionGUID="4bc38bcf-dd59-459c-99a6-b71820b9c5a1" CreationDate="2022-03-23T06:13:00.050" UserId="627" Text="To add to Rob and Shawn's post... The expected blocktime above is really focussed on chains with `babe`, so it makes 100% sense in the context of the relay chains and production chains using Babe.&#xD;&#xA;&#xD;&#xA;However, there are outliers and in some cases chains with different setups. So for instance in the apps UI, it tries to cater for a whole host of chains -&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-js/apps/blob/7f0a05ca67bbcda7066892f51118a0db9b232b33/packages/react-hooks/src/useBlockInterval.ts#L14-L38&#xD;&#xA;&#xD;&#xA;Walking through it -&#xD;&#xA;&#xD;&#xA; 1. When babe is in-use, use the `babe.expectedBlockTime`&#xD;&#xA; 2. For Kulupu (POW), use `difficulty.targetBlockTime`&#xD;&#xA; 3. For subspace, use `subspace.expectedBlockTime`&#xD;&#xA; 4. For others, use `timestamp.minimumPeriod * 2`, however&#xD;&#xA; - Some chains have it as 50% of expected time&#xD;&#xA; - Some chains don't and use this internally only, in those cases you need to make some assumptions, e.g. is it possibly a parachain&#xD;&#xA; 5. If all else fails and nothing can be found, well, the above applies defaults (may not be applicable to all)&#xD;&#xA;&#xD;&#xA;The above is most probably not perfect and quite possibly missing some cases and/or is ripe for enhancement in the cases where things cannot be found." ContentLicense="CC BY-SA 4.0" />
  <row Id="3810" PostHistoryTypeId="2" PostId="1044" RevisionGUID="fc07c886-3271-47b1-9bdd-74f2ca1d2f26" CreationDate="2022-03-23T06:42:53.483" UserId="544" Text="Practically, when running a Kusama parachain (a program with both a live parachain client and a relay chain client), we give it 4 cores and 8 Gb RAM on GCP.&#xD;&#xA;&#xD;&#xA;Two cores are sufficient for one client. Substrate can almost only utilize one core. So we give it two cores just leave a little room for redundancy. 4 Gb is nearly the minimum ram requirement for one clients. For smaller testnet, 2 Gb could be sufficient, but for larger chains like Kusama, 4 Gb is required. Btw, you'd better to give it 4 Gb swap just in case there's a ram usage spike.&#xD;&#xA;&#xD;&#xA;Oliver gives a good analysis of the storage usage." ContentLicense="CC BY-SA 4.0" />
  <row Id="3812" PostHistoryTypeId="2" PostId="1045" RevisionGUID="3d622185-7e2f-4945-8f41-228e983453a8" CreationDate="2022-03-23T06:56:23.330" UserId="227" Text="I noticed that the `parity-scale-codec` versions 3.0.0, 3.1.0 and 3.1.1 have been yanked: https://crates.io/crates/parity-scale-codec/versions.&#xD;&#xA;&#xD;&#xA;[The changelog of the crate](https://github.com/paritytech/parity-scale-codec/blob/master/CHANGELOG.md) doesn't contain any information about this though. Is it no longer recommended to use those versions? " ContentLicense="CC BY-SA 4.0" />
  <row Id="3814" PostHistoryTypeId="1" PostId="1045" RevisionGUID="3d622185-7e2f-4945-8f41-228e983453a8" CreationDate="2022-03-23T06:56:23.330" UserId="227" Text="Reason for yanked `parity-scale-codec` versions 3.0-3.1.1?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3815" PostHistoryTypeId="3" PostId="1045" RevisionGUID="3d622185-7e2f-4945-8f41-228e983453a8" CreationDate="2022-03-23T06:56:23.330" UserId="227" Text="|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3822" PostHistoryTypeId="2" PostId="1047" RevisionGUID="d558cb39-79d1-491d-9e05-0efb2feafaeb" CreationDate="2022-03-23T07:37:43.767" UserId="138" Text="Based on the diffs, upgrading to bitvec 1.0 broke the serialization format of those types that used bit vectors. Version 3.1.2 is the first release that fixed that regression, so to be on the safe side, the broken versions were yanked." ContentLicense="CC BY-SA 4.0" />
  <row Id="3824" PostHistoryTypeId="2" PostId="1048" RevisionGUID="1f5b0efe-7ba3-4657-a2a5-96f46d89aad9" CreationDate="2022-03-23T07:43:37.073" UserId="223" Text="As Shawn mentions in a comment, you are likely using an older version of Substrate where only `DispatchResultWithPostInfo` was supported. In newer versions both `DispatchResultWithPostInfo` and `DispatchResult` are supported as extrinsic return types. A workaround should be to change `Ok(())` to `Ok(().into())`." ContentLicense="CC BY-SA 4.0" />
  <row Id="3828" PostHistoryTypeId="2" PostId="1049" RevisionGUID="e54135fd-e500-4781-9dd4-85b29e0a5fd0" CreationDate="2022-03-23T07:57:47.360" UserId="393" Text="Yes, Custom RPC work for the off-chain runtime. [Custom Rpc Doc][1]&#xD;&#xA;For example, you can define custom rpc in the following way:&#xD;&#xA;```&#xD;&#xA;#[rpc]&#xD;&#xA;public trait SomeOcsApi {&#xD;&#xA;  &#xD;&#xA;   #[rpc(name=&quot;some_method&quot;)]&#xD;&#xA;   fn some_method(params...) {&#xD;&#xA;      ...&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And, in the implementation, just read the OCS storage&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;struct SomeOcsApiImpl&lt;T: OffchainStorage&gt; {&#xD;&#xA;   storage: Arc&lt;&lt;RwLock&lt;T&gt;&gt;&gt;,&#xD;&#xA;};&#xD;&#xA;impl SomeOcsApi for SomeOcsApiImpl {&#xD;&#xA;   value = self&#xD;&#xA;            .storage&#xD;&#xA;            .read()&#xD;&#xA;            .get(&#xD;&#xA;                sp_offchain::STORAGE_PREFIX,&#xD;&#xA;                &amp;*derive_storage_key(key.as_bytes(), &amp;did),&#xD;&#xA;            )&#xD;&#xA;            .map(from_utf8)&#xD;&#xA;            .unwrap_or_default();&#xD;&#xA;&#xD;&#xA;   Ok(value)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Surely, in your OC indexer should write event to this storage also, share this reference with OC indexer. &#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/custom-rpcs/" ContentLicense="CC BY-SA 4.0" />
  <row Id="3830" PostHistoryTypeId="2" PostId="1050" RevisionGUID="b9e99ff0-979e-4dee-8ef5-0aec9c202927" CreationDate="2022-03-23T08:06:00.423" UserId="627" Text="To expand on wigy's answer, basically the bitvec type and lsb/msb identifier were reversed. To put this into context, instead of the metadata types returning `BitVec&lt;u8, lsb&gt;` it returned `BitVec&lt;lsb, u8&gt;`. &#xD;&#xA;&#xD;&#xA;From a middleware perspective, e.g. the Python, Java, JS, Go, ..., etc. APIs this _could_ be quite problematic especially in the cases where they assumed a fixed ordering for the type fields. Since we also don't get the version of scale-info in the metadata to allow for different codepaths, this was an unintended breaking change and could have required upgrades for all developers building cli tools, UIs, etc. on top of Substrate.&#xD;&#xA;&#xD;&#xA;The JS API was certainly impacted immediately when the original 3.0 was used in Substrate, although it is now a bit smarter and can handle these fields in any order by looking at the type paths to detect which field goes where." ContentLicense="CC BY-SA 4.0" />
  <row Id="3832" PostHistoryTypeId="2" PostId="1051" RevisionGUID="da61260d-6ed4-4257-b973-ed115c70ce76" CreationDate="2022-03-23T08:25:57.790" UserId="179" Text="I'm trying to onboard several teams to the Rococo testnet with the objective that they can then control the parachain. For that, I'm thinking of using the SUDO account and calling `registrar.forceRegister(who,deposit,id,genesisHead,validationCode)`, however I am not sure what `deposit` should be.&#xD;&#xA;&#xD;&#xA;If there's another way of going around this, happy to discuss it as well.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="3834" PostHistoryTypeId="1" PostId="1051" RevisionGUID="da61260d-6ed4-4257-b973-ed115c70ce76" CreationDate="2022-03-23T08:25:57.790" UserId="179" Text="Deposit on registrar.forceRegister(who,deposit,id,genesisHead,validationCode)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3835" PostHistoryTypeId="3" PostId="1051" RevisionGUID="da61260d-6ed4-4257-b973-ed115c70ce76" CreationDate="2022-03-23T08:25:57.790" UserId="179" Text="|parachain|rococo|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3836" PostHistoryTypeId="2" PostId="1052" RevisionGUID="eca532b3-1e84-4545-aab8-6f58e2244e75" CreationDate="2022-03-23T08:32:12.793" UserId="179" Text="After going around this for some time, I realized a couple of things that might be worth sharing. &#xD;&#xA;&#xD;&#xA;TL;DR -&gt; when using Root account, deposit can be _anything_, including 0.&#xD;&#xA;&#xD;&#xA; - The [registrar code][1] clearly shows that deposit with this function can be anything.&#xD;&#xA;```&#xD;&#xA;/// Force the registration of a Para Id on the relay chain.&#xD;&#xA;		///&#xD;&#xA;		/// This function must be called by a Root origin.&#xD;&#xA;		///&#xD;&#xA;		/// The deposit taken can be specified for this registration. Any `ParaId` --&gt; HERE&#xD;&#xA;		/// can be registered, including sub-1000 IDs which are System Parachains.&#xD;&#xA;		#[pallet::weight(&lt;T as Config&gt;::WeightInfo::force_register())]&#xD;&#xA;		pub fn force_register(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			who: T::AccountId,&#xD;&#xA;			deposit: BalanceOf&lt;T&gt;,&#xD;&#xA;			id: ParaId,&#xD;&#xA;			genesis_head: HeadData,&#xD;&#xA;			validation_code: ValidationCode,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			ensure_root(origin)?;&#xD;&#xA;			Self::do_register(who, Some(deposit), id, genesis_head, validation_code, false)&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- When looking at production commongood parachains like Statemint on Polkadot, you can see that the actual deposit stored on chain is 0, as querying `Registrrar.paras(1000)` throws the following:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  manager: 14GVkHxNBUV4BckMdwwVDVhJ9Xb6ckZDZZvE8eMc5MCfbd3x&#xD;&#xA;  deposit: 0&#xD;&#xA;  locked: true&#xD;&#xA;}&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;Finally, I also tested it out and it seemed to work :)&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/6d5578dbbbcf5f2e77b53ca2ed13a558c6ba13f0/runtime/common/src/paras_registrar.rs#L238" ContentLicense="CC BY-SA 4.0" />
  <row Id="3838" PostHistoryTypeId="2" PostId="1053" RevisionGUID="b4d9be33-5ce4-4f2c-8eae-0a0adcd45e7e" CreationDate="2022-03-23T09:08:09.943" UserId="83" Text="I was able to update that repository to branch 'polkadot-v0.9.18' that is used by Cumulus and Substrate repositories and it compiled successfully in the PR [here][1].&#xD;&#xA;&#xD;&#xA;The approach that I used to update it was to:&#xD;&#xA;* Inspect the commit history of the [Cumulus repository branch 'polkadot-v0.9.17'][2] and [Cumulus repository branch 'polkadot-v0.9.18'][3] to find the latest commits that were included in branch 'polkadot-v0.9.18' but not in branch 'polkadot-v0.9.17'.&#xD;&#xA;* Go through each of those latest commits in branch 'polkadot-v0.9.18', and incorporate changes in files that are within folders like: parachain-template/&#xD;&#xA;* Since that repository is using additional pallets from Substrate that are not in the [substrate-node-template][4] it may also be necessary to incorporate changes from [Substrate repository branch 'polkadot-v0.9.18'][5], however this may only required inspecting files in folders: ./bin/node/ and ./bin/node-template/&#xD;&#xA;&#xD;&#xA;  [1]: https://ttps://github.com/DataHighway-DHX/DataHighway-Parachain/pull/35&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/tree/polkadot-v0.9.17&#xD;&#xA;  [3]: https://github.com/paritytech/cumulus/tree/polkadot-v0.9.18&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.18" ContentLicense="CC BY-SA 4.0" />
  <row Id="3841" PostHistoryTypeId="5" PostId="990" RevisionGUID="f728c63e-5c4b-4a10-9acf-43d4e2db9dfd" CreationDate="2022-03-23T09:45:01.130" UserId="139" Comment="deleted 6 characters in body" Text="I am trying to benchmark `pallet_election_provider_multi_phase` and after quite some time of normal running I get this error which halts the benchmark: &#xD;&#xA;```&#xD;&#xA;Running Benchmark:  pallet_election_provider_multi_phase    elect_queued    100/50  0/1    &#xD;&#xA;Running Benchmark:  pallet_election_provider_multi_phase    elect_queued    101/50  0/1    &#xD;&#xA;[0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;[#0]   creating a snapshot with metadata SolutionOrSnapshotSize { voters: 1, targets: 1 } &#xD;&#xA;[#0]   Starting signed phase round 1.    &#xD;&#xA;[0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;[#0]   creating a snapshot with metadata SolutionOrSnapshotSize { voters: 1, targets: 1 } &#xD;&#xA;[#0]   Starting signed phase round 1.    &#xD;&#xA;Error: Input(&quot;SignedCannotPayDeposit&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With `pallet_election_phragmen` I get a different error message: &#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;failed to submit candidacy&quot;)&#xD;&#xA;```&#xD;&#xA;How can I fix this? Here's my dev chain spec: &#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;fn development_config_genesis() -&gt; GenesisConfig {&#xD;&#xA;	let wasm_binary = WASM_BINARY.expect(&quot;Development wasm not available&quot;);&#xD;&#xA;	testnet_genesis(&#xD;&#xA;		wasm_binary,&#xD;&#xA;		// Initial authorities aka stakers&#xD;&#xA;		vec![&#xD;&#xA;			authority_keys_from_seed(&quot;Alice&quot;),&#xD;&#xA;		],&#xD;&#xA;		// Sudo account&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		// Initial nominators&#xD;&#xA;		vec![],&#xD;&#xA;	)&#xD;&#xA;}&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;	wasm_binary: &amp;[u8],&#xD;&#xA;	initial_authorities: Vec&lt;(&#xD;&#xA;		AccountId, // Stash&#xD;&#xA;		AccountId, // Controller&#xD;&#xA;		GrandpaId,&#xD;&#xA;		BabeId,&#xD;&#xA;		ImOnlineId,&#xD;&#xA;		AuthorityDiscoveryId,&#xD;&#xA;	)&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	initial_nominators: Vec&lt;AccountId&gt;,&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;	let mut rng = rand::thread_rng();&#xD;&#xA;	let mut endowed_accounts = vec![&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;	];&#xD;&#xA;	let stakers = initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator))&#xD;&#xA;		.chain(initial_nominators.iter().map(|n| {&#xD;&#xA;			use rand::{seq::SliceRandom, Rng};&#xD;&#xA;			let limit = (MAX_NOMINATIONS as usize).min(initial_authorities.len());&#xD;&#xA;			let count = rng.gen::&lt;usize&gt;() % limit;&#xD;&#xA;			let nominations = initial_authorities&#xD;&#xA;				.as_slice()&#xD;&#xA;				.choose_multiple(&amp;mut rng, count)&#xD;&#xA;				.into_iter()&#xD;&#xA;				.map(|choice| choice.0.clone())&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;			(n.clone(), n.clone(), STASH, StakerStatus::Nominator(nominations))&#xD;&#xA;		}))&#xD;&#xA;		.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let num_endowed_accounts = endowed_accounts.len();&#xD;&#xA;	const ENDOWMENT: Balance = 10_000_000 * DOLLARS;&#xD;&#xA;	const STASH: Balance = ENDOWMENT / 1000;&#xD;&#xA;&#xD;&#xA;	initial_authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|x| &amp;x.0)&#xD;&#xA;		.chain(initial_nominators.iter())&#xD;&#xA;		.for_each(|x| {&#xD;&#xA;			if !endowed_accounts.contains(x) {&#xD;&#xA;				endowed_accounts.push(x.clone())&#xD;&#xA;			}&#xD;&#xA;		});&#xD;&#xA;&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		system: SystemConfig {&#xD;&#xA;			// Add Wasm runtime to storage.&#xD;&#xA;			code: wasm_binary.to_vec(),&#xD;&#xA;			changes_trie_config: Default::default(),&#xD;&#xA;		},&#xD;&#xA;		authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			balances: endowed_accounts&#xD;&#xA;				.iter()&#xD;&#xA;				.cloned()&#xD;&#xA;				.map(|k| (k, ENDOWMENT))&#xD;&#xA;				.collect(),&#xD;&#xA;		},&#xD;&#xA;		babe: BabeConfig {&#xD;&#xA;			authorities: vec![],&#xD;&#xA;			epoch_config: Some(BabeEpochConfiguration {&#xD;&#xA;				c: (1, 4),&#xD;&#xA;				allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,&#xD;&#xA;			}),&#xD;&#xA;		},&#xD;&#xA;		grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;		im_online: ImOnlineConfig { keys: vec![] },&#xD;&#xA;		session: SessionConfig {&#xD;&#xA;			keys: initial_authorities&#xD;&#xA;				.iter()&#xD;&#xA;				.map(|x| {&#xD;&#xA;					(&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						x.0.clone(),&#xD;&#xA;						session_keys(x.3.clone(), x.2.clone(), x.4.clone(), x.5.clone()),&#xD;&#xA;					)&#xD;&#xA;				})&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;		},&#xD;&#xA;		sudo: SudoConfig {&#xD;&#xA;			// Assign network admin rights.&#xD;&#xA;			key: root_key,&#xD;&#xA;		},&#xD;&#xA;		staking: StakingConfig {&#xD;&#xA;			validator_count: initial_authorities.len() as u32,&#xD;&#xA;			minimum_validator_count: initial_authorities.len() as u32,&#xD;&#xA;			invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),&#xD;&#xA;			slash_reward_fraction: Perbill::from_percent(10),&#xD;&#xA;			stakers,&#xD;&#xA;			..Default::default()&#xD;&#xA;		},&#xD;&#xA;		treasury: Default::default(),&#xD;&#xA;		council: CouncilConfig::default(),&#xD;&#xA;		indices: IndicesConfig { indices: vec![] },&#xD;&#xA;		elections: ElectionsConfig {&#xD;&#xA;			members: endowed_accounts&#xD;&#xA;				.iter()&#xD;&#xA;				.take((num_endowed_accounts + 1) / 2)&#xD;&#xA;				.cloned()&#xD;&#xA;				.map(|member| (member, STASH))&#xD;&#xA;				.collect(),&#xD;&#xA;		},&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3842" PostHistoryTypeId="2" PostId="1054" RevisionGUID="3ed6ed8d-2b2e-40c2-9c0b-699315aec37a" CreationDate="2022-03-23T09:53:29.440" UserId="683" Text="While fetching blocks from kusama, I get the following message in the block range [1, 461692]:&#xD;&#xA;`Unable to map u16 to a lookup index&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;I suppose this has to do with the types being used in the old blocks. Is there a types bundle that I can use with the polkadot-js api for the earlier blocks in Kusama network" ContentLicense="CC BY-SA 4.0" />
  <row Id="3844" PostHistoryTypeId="1" PostId="1054" RevisionGUID="3ed6ed8d-2b2e-40c2-9c0b-699315aec37a" CreationDate="2022-03-23T09:53:29.440" UserId="683" Text="types bundle for kusama" ContentLicense="CC BY-SA 4.0" />
  <row Id="3845" PostHistoryTypeId="3" PostId="1054" RevisionGUID="3ed6ed8d-2b2e-40c2-9c0b-699315aec37a" CreationDate="2022-03-23T09:53:29.440" UserId="683" Text="|kusama|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3848" PostHistoryTypeId="2" PostId="1055" RevisionGUID="2542c342-db74-4fe1-91e3-0202c0856a17" CreationDate="2022-03-23T10:05:23.103" UserId="73" Text="The idea behind `authoring_version` was to indicate that something in the api between the runtime and the node changed that makes the node unable to build new blocks. We almost never bumped this version and with the removal of the native runtime this `authoring_version` will probably be deprecated anyway. If you break something in the authoring interface like `apply_extrinsic` you would probably find it out anyway by having the block production fail ;) Currently it would spam your logs with &quot;node upgrade&quot; required. &#xD;&#xA;&#xD;&#xA;TLDR: Set the version to some sane value like `1` for now. We will need to have some more discussion on the future of this `authoring_version` and if we maybe deprecate it or change it and improve the documentation on when to bump this." ContentLicense="CC BY-SA 4.0" />
  <row Id="3850" PostHistoryTypeId="2" PostId="1056" RevisionGUID="a17e00dd-30df-46fa-a89e-19282d4b078b" CreationDate="2022-03-23T10:23:35.920" UserId="609" Text="At the moment it's not possible, but they're working on it.&#xD;&#xA;&#xD;&#xA;Take a look at their FAQ: https://docs.subsocial.network/docs/faq/overview#how-can-i-buy-subsocial-tokens&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3852" PostHistoryTypeId="10" PostId="1032" RevisionGUID="6d2ca225-0b5f-41bb-8321-e53cf980447c" CreationDate="2022-03-23T10:26:44.043" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[240],&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="3853" PostHistoryTypeId="2" PostId="1057" RevisionGUID="a6d11838-e4f7-45c8-a1f9-43954a083970" CreationDate="2022-03-23T10:30:33.897" UserId="85" Text="DM @SubsocialChain nicely on twitter and they might send you one if you send them your address and say you'd like to start blogging. Someone nice on here might but you'd need to stick your address in to meet us half way :-)&#xD;&#xA;&#xD;&#xA;They said that they would be starting to distribute the crowdloan tokens shortly. I would expect that they might be easier to come by after that. But yes it's a bit frustrating in these in-between times." ContentLicense="CC BY-SA 4.0" />
  <row Id="3855" PostHistoryTypeId="2" PostId="1058" RevisionGUID="42e2735e-43e4-42fa-b720-d930d26eba8b" CreationDate="2022-03-23T10:38:01.347" UserId="16" Text="Your call to `fire()` returns a `CalleeTrapped` error which you subsequently turn into a panic by calling `unwrap`. This `unwrap` is where the panic should point to.&#xD;&#xA;&#xD;&#xA;`CalleeTrapped` is a rather unspecific error and just means that the callee trapped (caused by a `panic` in Rust). The function you are calling is infallible if described correctly here. This only leaves some error in the selector.&#xD;&#xA;&#xD;&#xA;I suspect that the selector you specified (`40`) encodes to `[40, 0, 0, 0]` because the `40` is interpreted as integer which is then SCALE encoded. SCALE uses little endian representation." ContentLicense="CC BY-SA 4.0" />
  <row Id="3857" PostHistoryTypeId="2" PostId="1059" RevisionGUID="4f1704fa-5cb7-4bca-bb7d-b4f04b66733a" CreationDate="2022-03-23T10:39:47.257" UserId="139" Text="For example, I executed a increaseValidatorCount (additional 1) extrinsic using `sudo` and I am still seeing blocks finalized with one validator. Does this imply I have to wait until next epoch  or era to see this change implemented? I ask this because I am not sure when would the change take effect (A change in session, or a re-election of validator sets). Are there some examples of other extrinsics that don't take effect until a similar epoch/era change?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3859" PostHistoryTypeId="1" PostId="1059" RevisionGUID="4f1704fa-5cb7-4bca-bb7d-b4f04b66733a" CreationDate="2022-03-23T10:39:47.257" UserId="139" Text="What extrinsics when executed, would need an epoch or an era change to see effects?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3860" PostHistoryTypeId="3" PostId="1059" RevisionGUID="4f1704fa-5cb7-4bca-bb7d-b4f04b66733a" CreationDate="2022-03-23T10:39:47.257" UserId="139" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3861" PostHistoryTypeId="2" PostId="1060" RevisionGUID="370f74e7-9cba-4766-ac26-b27ee2d4fe46" CreationDate="2022-03-23T10:44:39.273" UserId="139" Text="```rust&#xD;&#xA;construct_runtime! {&#xD;&#xA; Council:            pallet_collective::&lt;Instance1&gt;::{Pallet, Call, Storage, Origin&lt;T&gt;, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA; TechnicalCommittee: pallet_collective::&lt;Instance2&gt;::{Pallet, Call, Storage, Origin&lt;T&gt;, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;There seems to be two instances of `pallet_collective` in the substrate node and it has me wondering why? What is the purpose of a `council`, and what is the purpose of a `technical committee` and how are they different from each other?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3863" PostHistoryTypeId="1" PostId="1060" RevisionGUID="370f74e7-9cba-4766-ac26-b27ee2d4fe46" CreationDate="2022-03-23T10:44:39.273" UserId="139" Text="What is the semantic difference between TechnicalCommittee and Council in substrate node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3864" PostHistoryTypeId="3" PostId="1060" RevisionGUID="370f74e7-9cba-4766-ac26-b27ee2d4fe46" CreationDate="2022-03-23T10:44:39.273" UserId="139" Text="|substrate-node|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3865" PostHistoryTypeId="2" PostId="1061" RevisionGUID="64cd052a-8057-4202-a481-b1f4f12037d6" CreationDate="2022-03-23T10:45:49.773" UserId="1731" Text="&#xD;&#xA;How to do WASM update on parachain? &#xD;&#xA;&#xD;&#xA;Which RPC method to call?&#xD;&#xA;&#xD;&#xA;Should this be applied to collator or rpc-node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3867" PostHistoryTypeId="1" PostId="1061" RevisionGUID="64cd052a-8057-4202-a481-b1f4f12037d6" CreationDate="2022-03-23T10:45:49.773" UserId="1731" Text="WASM update on parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3868" PostHistoryTypeId="3" PostId="1061" RevisionGUID="64cd052a-8057-4202-a481-b1f4f12037d6" CreationDate="2022-03-23T10:45:49.773" UserId="1731" Text="|parachain|runtime-upgrade|wasm|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3869" PostHistoryTypeId="5" PostId="472" RevisionGUID="2c8cbce4-855e-49f4-9323-9af9995c6da9" CreationDate="2022-03-23T10:47:32.060" UserId="85" Comment="tidying grammar" Text="I'm trying to make cross contracts calls on already deployed contract, I'm running the local subtrate node in debug mode, and I'm getting the following message when trying to preform cross contracts.&#xD;&#xA;&#xD;&#xA;Here is the error: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;ThreadId(34) runtime::contracts: Execution finished with debug buffer: panicked at 'called `Result::unwrap()` on an `Err` value: CalleeTrapped', erc20/lib.rs:102:14&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the ``` DeployedContract1 ``` cross call function code: &#xD;&#xA;``` &#xD;&#xA;        #[ink(message)]&#xD;&#xA;        #[ink(selector = 40)]&#xD;&#xA;        pub fn test(&amp;self) -&gt; u32 {&#xD;&#xA;            self.platform_fee&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the ``` DeployedContract2 (erc20/lib.rs)``` function source code: &#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;		pub fn test1(&amp;self,token_contract: AccountId) -&gt; u32 {&#xD;&#xA;			&#xD;&#xA;            let my_return_value: u32 =  ink_env::call::build_call::&lt;&lt;Self as ::ink_lang::reflect::ContractEnv&gt;::Env&gt;()&#xD;&#xA;            .callee(token_contract) &lt;--- ERROR points here&#xD;&#xA;            .gas_limit(50000)&#xD;&#xA;            .transferred_value(0)&#xD;&#xA;            .exec_input(&#xD;&#xA;                ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0, 0, 0, 40])),&#xD;&#xA;				&#xD;&#xA;&#xD;&#xA;            )&#xD;&#xA;            .returns::&lt;ink_env::call::utils::ReturnType&lt;u32&gt;&gt;()&#xD;&#xA;            .fire()&#xD;&#xA;            .unwrap();&#xD;&#xA;			my_return_value&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3870" PostHistoryTypeId="5" PostId="1009" RevisionGUID="cefcfb1d-6820-42d7-8edc-513076baf1a3" CreationDate="2022-03-23T10:50:02.827" UserId="419" Comment="updated to address the comment from h4x3rotab  " Text="There is an implementation of a price feed pallet in the Chainlink-Substrate integration. It connects to and uses the Chainlink oracle network to fetch the price feed. &#xD;&#xA;&#xD;&#xA;You can follow a similar approach to build an oracle pallet to connect to any service or oracle for getting data in the chain.&#xD;&#xA;Here is the code - https://github.com/smartcontractkit/chainlink-polkadot&#xD;&#xA;&#xD;&#xA;Also, here is a good tutorial that explains the process - https://github.com/LaurentTrk/chainlink-substrate-tutorial&#xD;&#xA;&#xD;&#xA;This could be a bit outdated considering the evolving code. But the overall approach still makes sense. &#xD;&#xA;&#xD;&#xA;Also, as an alternative, you can look at Substrate off-chain workers for getting data via http calls. Here is a good overview - https://docs.substrate.io/v3/concepts/off-chain-features/&#xD;&#xA;&#xD;&#xA;These are just some examples, and could be useful in understanding how to approach building your own price-feed or any other oracle integration. " ContentLicense="CC BY-SA 4.0" />
  <row Id="3873" PostHistoryTypeId="2" PostId="1063" RevisionGUID="120874ce-56ce-4ad6-bd51-0ed25b0c86a7" CreationDate="2022-03-23T10:55:47.250" UserId="165" Text="The flow of upgrading the runtime in a parachain can definitely be different from the the flow one can be used to when running a solo chain.&#xD;&#xA;&#xD;&#xA;For this scenario what is recommended is following the authorize --&gt; enact path.&#xD;&#xA;&#xD;&#xA;Note that the relay chain needs to be informed of the runtime upgrade before it happens, and just after that you could enact the upgrade in your para.&#xD;&#xA;&#xD;&#xA;Cumulus provides these functionality in through pallet `cumulus-pallet-parachain-system` :&#xD;&#xA; - [`authorize_uprgrade`](https://github.com/paritytech/cumulus/blob/2fe7a2edba05155c6a5f0f3527e1001aad7aee2e/pallets/parachain-system/src/lib.rs#L387)&#xD;&#xA; - [`enact_authorized_upgrade`](https://github.com/paritytech/cumulus/blob/2fe7a2edba05155c6a5f0f3527e1001aad7aee2e/pallets/parachain-system/src/lib.rs#L397)&#xD;&#xA;&#xD;&#xA;Please, find more details on this how to guide:&#xD;&#xA;https://docs.substrate.io/how-to-guides/v3/parachains/runtime-upgrades/" ContentLicense="CC BY-SA 4.0" />
  <row Id="3876" PostHistoryTypeId="2" PostId="1064" RevisionGUID="62589f0b-5910-4b0d-b8bf-ea0ca5c080f1" CreationDate="2022-03-23T11:02:47.580" UserId="85" Text="One I can think of is adding a collator for the statemine parachain:&#xD;&#xA;&#xD;&#xA; 1. One would add the account to the session&#xD;&#xA; 2. run the `collatorSelection registerAsCandidate()` extrinsic. The collator bond would be deposited.&#xD;&#xA; 3. The collator account would be added to the session's validators on the next session change.&#xD;&#xA;&#xD;&#xA;(I think for polkadot's babe one has to wait two sessions before seeing a change, as one does not want a last minute change to influence the [verifiable random number][1] that the next session is just about to use.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-randomness#vrf" ContentLicense="CC BY-SA 4.0" />
  <row Id="3878" PostHistoryTypeId="2" PostId="1065" RevisionGUID="13c37b02-f804-4011-ab6f-d8e8c9efbc30" CreationDate="2022-03-23T11:13:59.177" UserId="85" Text="Just to add to the above answer: One good trick to providing the correct hash for `authorizeUpgrade`: you can select the &quot;hash a file&quot; option on the right and then pick a file on disk and it will compute the correct hash for you.&#xD;&#xA;&#xD;&#xA;[![authoriseUpgrade][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/EQy0R.png&#xD;&#xA;&#xD;&#xA;(but you do need to select the right file...)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3880" PostHistoryTypeId="4" PostId="1060" RevisionGUID="2362b032-1326-4c8c-a837-b2c5e2dea777" CreationDate="2022-03-23T11:17:53.377" UserId="85" Comment="it's not really substrate that has the technical commitee but polkadot." Text="What is the semantic difference between TechnicalCommittee and Council in kusama/polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3881" PostHistoryTypeId="2" PostId="1066" RevisionGUID="7f206ee7-0140-415e-91aa-4dc4087cee54" CreationDate="2022-03-23T12:14:50.977" UserId="1838" Text="chain spec(json ss58Format) is not 42, if i want to update ss58Format to 42, how to do?&#xD;&#xA;&#xD;&#xA;substrate node has started." ContentLicense="CC BY-SA 4.0" />
  <row Id="3883" PostHistoryTypeId="1" PostId="1066" RevisionGUID="7f206ee7-0140-415e-91aa-4dc4087cee54" CreationDate="2022-03-23T12:14:50.977" UserId="1838" Text="how to update SS58Prefix for node that has been started" ContentLicense="CC BY-SA 4.0" />
  <row Id="3884" PostHistoryTypeId="3" PostId="1066" RevisionGUID="7f206ee7-0140-415e-91aa-4dc4087cee54" CreationDate="2022-03-23T12:14:50.977" UserId="1838" Text="|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3885" PostHistoryTypeId="2" PostId="1067" RevisionGUID="c816c3d2-9416-4548-9cbe-fb00e28bc4d4" CreationDate="2022-03-23T12:27:00.477" UserId="1815" Text="i'm trying to define a 1 to N storage relation in my pallet. I have a `Resource` (owned by an account ) which will be linked to N `Use` structs ( kind of a set )&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;- Account #1&#xD;&#xA;  --&gt; Resource #A&#xD;&#xA;         ---&gt; Use #1&#xD;&#xA;         ---&gt; Use #2&#xD;&#xA;         ---&gt; Use #N&#xD;&#xA;&#xD;&#xA;- Account #2&#xD;&#xA;  --&gt; Resource #B&#xD;&#xA;         ---&gt; Use #3&#xD;&#xA;         ---&gt; Use #4&#xD;&#xA;         ---&gt; Use #N'&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From the architectural perspective, what's the best way to define these kind of relationships in the storage?&#xD;&#xA;&#xD;&#xA;Of course the goal of this is to be able to query the three.&#xD;&#xA;&#xD;&#xA;Many Thanks.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3887" PostHistoryTypeId="1" PostId="1067" RevisionGUID="c816c3d2-9416-4548-9cbe-fb00e28bc4d4" CreationDate="2022-03-23T12:27:00.477" UserId="1815" Text="How i define a 1 to N relation in storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3888" PostHistoryTypeId="3" PostId="1067" RevisionGUID="c816c3d2-9416-4548-9cbe-fb00e28bc4d4" CreationDate="2022-03-23T12:27:00.477" UserId="1815" Text="|pallet|frame|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3889" PostHistoryTypeId="2" PostId="1068" RevisionGUID="5082e6cd-9135-4012-9ad8-eaea2c1e91f9" CreationDate="2022-03-23T12:34:14.300" UserId="1839" Text="When I try to deploy any WASM contract using polkadot.js.org/apps, It fails with Error: `system.ExtrinsicFailed(Other)`.&#xD;&#xA;&#xD;&#xA;[![Error Message][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/enGdl.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3891" PostHistoryTypeId="1" PostId="1068" RevisionGUID="5082e6cd-9135-4012-9ad8-eaea2c1e91f9" CreationDate="2022-03-23T12:34:14.300" UserId="1839" Text="WASM contract deployment fails on public networks" ContentLicense="CC BY-SA 4.0" />
  <row Id="3892" PostHistoryTypeId="3" PostId="1068" RevisionGUID="5082e6cd-9135-4012-9ad8-eaea2c1e91f9" CreationDate="2022-03-23T12:34:14.300" UserId="1839" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3893" PostHistoryTypeId="2" PostId="1069" RevisionGUID="823d2a95-79bc-47dd-b168-ebc08a342f7a" CreationDate="2022-03-23T12:34:14.300" UserId="1839" Text="Upload the contract artifacts (`.wasm` file &amp; `metadata.json`) separately instead of uploading the `.contract` bundle. If this fails too, Make sure that you are sending sufficient gas amount and try building the artifacts in _release_ mode to reduce the contract size. Command for the same is ```cargo +nightly contract build --release```&#xD;&#xA;&#xD;&#xA;For more details, You can checkout the following tutorial: [How to deploy ink! smart contract](https://github.com/realnimish/polkadot-amm/blob/main/tutorial.md#deploying-the-smart-contract)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3895" PostHistoryTypeId="2" PostId="1070" RevisionGUID="cb81320d-f06b-4229-900f-2d4e22771f55" CreationDate="2022-03-23T12:42:48.120" UserId="29" Text="From a high-level view this is the Council:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-governance#council&#xD;&#xA;&#xD;&#xA;This is the Technical Committee:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-governance#technical-committee&#xD;&#xA;&#xD;&#xA;Note that:&#xD;&#xA;&gt; Teams are added or removed from the Technical Committee via a simple majority vote of the Council." ContentLicense="CC BY-SA 4.0" />
  <row Id="3897" PostHistoryTypeId="10" PostId="401" RevisionGUID="438e49ba-8057-4ed2-a694-704ae7fbc492" CreationDate="2022-03-23T12:45:41.517" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:85,&quot;DisplayName&quot;:&quot;Squirrel&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:283,&quot;DisplayName&quot;:&quot;rob&quot;},{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="3898" PostHistoryTypeId="10" PostId="784" RevisionGUID="82fe6ebd-e224-4259-ba31-6c877ac1cfbf" CreationDate="2022-03-23T12:45:58.293" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="3899" PostHistoryTypeId="2" PostId="1071" RevisionGUID="2f6948c7-5ac7-438a-aea0-ac94b7f6287c" CreationDate="2022-03-23T12:49:20.343" UserId="354" Text="I want to mint new tokens to a particular account, I found a function **fn mint_into** in *balances pallet*, it is been implemented for fungible assets that's what I understood from the code maybe I am wrong. So what I want to know is that how can I mint new tokens after deploying the blockchain, as tokens are been minted for the validator rewards according to tokenomics, I just want to know how can I mint new tokens according to my needs." ContentLicense="CC BY-SA 4.0" />
  <row Id="3901" PostHistoryTypeId="1" PostId="1071" RevisionGUID="2f6948c7-5ac7-438a-aea0-ac94b7f6287c" CreationDate="2022-03-23T12:49:20.343" UserId="354" Text="Is there a way to mint new native tokens after deploying the substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3902" PostHistoryTypeId="3" PostId="1071" RevisionGUID="2f6948c7-5ac7-438a-aea0-ac94b7f6287c" CreationDate="2022-03-23T12:49:20.343" UserId="354" Text="|substrate-node|polkadot|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3903" PostHistoryTypeId="5" PostId="784" RevisionGUID="3794dd33-4e80-4cc4-9395-268446b51569" CreationDate="2022-03-23T13:07:24.293" UserId="83" Comment="Rewrite so only one succinct question is asked" Text="If we want to connect a parachain to Rococo's 'rococo-local' relay chain we follow this [Cumulus tutorial][1] using [polkadot-launch][2]. Part of the pre-launch steps mentioned [here][3] is to minimize your runtime size by pruning the functionality, and to then do [incremental upgrades][4] using the generated /target/release/wbuild/parachain-template-runtime.compact.wasm file when the parachain is live to include the missing pallets again.&#xD;&#xA;&#xD;&#xA;However, Rococo's relay chain currently has a `maxCodeSize` of only ~3.15 MB, and if you build the [substrate-parachain-template][5] using branch 'polkadot_v0.9.17' with `cargo build --release` it generates that file parachain-template-runtime.compact.wasm that is ~2.9 MB. If you add the Sudo pallet to it so you can do the incremental upgrades then building it generates an even larger file of ~3.0 MB, which may not allow enough space for you to do the incremental upgrades to include the missing pallets again during your [launch simulation][6] on the Rococo production testnet before launching on Kusama's production mainnet.&#xD;&#xA;&#xD;&#xA;If you add more pallets than just Sudo and the Scheduler pallet by following [Substrate's Forkless Upgrades][7] tutorial then you might exceed the `maxCodeSize` and [Polkadot.js Apps][8] may generate an error `Bytes:: Maximum call stack size exceeded` or `Invalid Transaction: Transaction would exhaust the block limits` that prevents the runtime upgrade.&#xD;&#xA;&#xD;&#xA;Meanwhile, Kusama's relay chain currently has a larger `maxCodeSize` of ~10.5 MB, which may be sufficient to include all your pallets. There would be a requirement for an initial 3.0 MB for the genesis build of substrate-parachain-template branch 'polkadot_v0.9.17' (plus Sudo pallet to allow you to perform runtime upgrades), then a further 1.5 MB for the 1st runtime upgrade to add ~15 pallets like preimage, scheduler, democracy, referenda, conviction voting, council collective, technical collective, elections phragmen, tips, treasury, bounties, child bounties, assets, multisig, identity, proxy, and recovery, and then a further 1.5 MB for a 2nd runtime upgrade to add ~25 of our own custom pallets to increase it a total code size of the parachain-template-runtime.compact.wasm file to ~6 MB, which would still be less than Kusama's `maxCodeSize`.&#xD;&#xA;&#xD;&#xA;Note that Chachacha relay chain is alternative production testnet for parachains. But that does not provide an alternative, as it also has the same `maxCodeSize` of as Rococo of ~3.15 MB when you query it [here][9] with Polkadot.js Apps by choosing &quot;Developer &gt; Chain state &gt; Storage &gt; configuration (for &quot;selected state query&quot;) &gt; activeConfig()&quot; and then clicking the (+) icon.&#xD;&#xA;&#xD;&#xA;**Question:** If Rococo's `maxCodeSize` only allows you to make some small runtime upgrades, but isn't large enough for you to add all your missing pallets when your parachain is live on it as [incremental upgrades][4] after pruning them all to minimize the runtime size for genesis, should you just assume that the remaining runtime upgrades will work on Kusama and proceed to doing it on Kusama instead?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-launch&#xD;&#xA;  [3]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#3-minimize-your-runtime-size&#xD;&#xA;  [4]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#6-incremental-runtime-deployments&#xD;&#xA;  [5]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [6]: https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#7-launch-simulation&#xD;&#xA;  [7]: https://docs.substrate.io/tutorials/v3/forkless-upgrades/#prepare-an-upgraded-runtime&#xD;&#xA;  [8]: https://polkadot.js.org/apps&#xD;&#xA;  [9]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ffullnode-relay.chachacha.centrifuge.io#/chainstate" ContentLicense="CC BY-SA 4.0" />
  <row Id="3905" PostHistoryTypeId="2" PostId="1072" RevisionGUID="829d3703-8c3a-4703-80d7-5f1da7edd177" CreationDate="2022-03-23T13:09:56.430" UserId="1837" Text="I have created a simple storage map as follows and I just want to check if it's empty or not. I am comparing it with rust HashMaps, it has the is_empty() method to check. I intend to use this in the same pallet.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn check_storage_map)]&#xD;&#xA;pub type SimpleStorageMap&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_256, u32, u32, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I checked the storage map rust doc but could not find any function associated with it.&#xD;&#xA;I am new to substrate any advice or help is appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="3907" PostHistoryTypeId="1" PostId="1072" RevisionGUID="829d3703-8c3a-4703-80d7-5f1da7edd177" CreationDate="2022-03-23T13:09:56.430" UserId="1837" Text="How to check if StorageMap is empty" ContentLicense="CC BY-SA 4.0" />
  <row Id="3908" PostHistoryTypeId="3" PostId="1072" RevisionGUID="829d3703-8c3a-4703-80d7-5f1da7edd177" CreationDate="2022-03-23T13:09:56.430" UserId="1837" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3910" PostHistoryTypeId="2" PostId="1073" RevisionGUID="aa283735-27a0-422b-989a-47f9c63b8c22" CreationDate="2022-03-23T13:16:38.480" UserId="29" Text="[`mint_into`](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/fungible/trait.Mutate.html#tymethod.mint_into) without [`burn_from`](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/fungible/trait.Mutate.html#tymethod.burn_from) will **mint** new tokens and **increase** the overall supply.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Attempt to increase the `asset` balance of `who` by `amount`.&#xD;&#xA;///&#xD;&#xA;/// If not possible then don't do anything. Possible reasons for failure include:&#xD;&#xA;/// - Minimum balance not met.&#xD;&#xA;/// - Account cannot be created (e.g. because there is no provider reference and/or the asset&#xD;&#xA;///   isn't considered worth anything).&#xD;&#xA;///&#xD;&#xA;/// Since this is an operation which should be possible to take alone, if successful it will&#xD;&#xA;/// increase the overall supply of the underlying token.&#xD;&#xA;fn mint_into(asset: Self::AssetId, who: &amp;AccountId, amount: Self::Balance) -&gt; DispatchResult;&#xD;&#xA;```&#xD;&#xA;https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/support/src/traits/tokens/fungibles.rs#L94&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can see this is what [teleport](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/support/src/traits/tokens/fungibles.rs#L133) uses. The only difference is that teleport also calls `burn_from`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Transfer funds from one account into another. The default implementation uses `mint_into`&#xD;&#xA;/// and `burn_from` and may generate unwanted events.&#xD;&#xA;fn teleport(asset: Self::AssetId, source: &amp;AccountId, dest: &amp;AccountId, amount: Self::Balance,)&#xD;&#xA;```&#xD;&#xA;https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/support/src/traits/tokens/fungibles.rs#L133" ContentLicense="CC BY-SA 4.0" />
  <row Id="3912" PostHistoryTypeId="2" PostId="1074" RevisionGUID="c7ac40ff-7ad3-4d55-9846-5456bca0b805" CreationDate="2022-03-23T13:18:18.030" UserId="384" Text="I am just starting to learn Blockchain.&#xD;&#xA;I am using the following steps to learn.&#xD;&#xA;&#xD;&#xA;1. https://wiki.polkadot.network/&#xD;&#xA;2. https://learnpolkadot.com/kusama/&#xD;&#xA;&#xD;&#xA;Is above the correct order?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3914" PostHistoryTypeId="1" PostId="1074" RevisionGUID="c7ac40ff-7ad3-4d55-9846-5456bca0b805" CreationDate="2022-03-23T13:18:18.030" UserId="384" Text="What are the best learning resources?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3915" PostHistoryTypeId="3" PostId="1074" RevisionGUID="c7ac40ff-7ad3-4d55-9846-5456bca0b805" CreationDate="2022-03-23T13:18:18.030" UserId="384" Text="|polkadot|kusama|learning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3916" PostHistoryTypeId="2" PostId="1075" RevisionGUID="4640d645-343d-4d83-83ea-dc3f2d7d7275" CreationDate="2022-03-23T13:30:16.883" UserId="340" Text="I am looking for best practices around this topic. &#xD;&#xA;&#xD;&#xA;I liked how webrtc-star was easy to use, however I have not found anything in the rust ecosystem that is similar.&#xD;&#xA;&#xD;&#xA;In my mind it would be great if there was a 'yellow pages' you could ask for the bootstrap nodes for chain X, something that could be run by all nodes to aid other networks getting user node 0+ booted." ContentLicense="CC BY-SA 4.0" />
  <row Id="3918" PostHistoryTypeId="1" PostId="1075" RevisionGUID="4640d645-343d-4d83-83ea-dc3f2d7d7275" CreationDate="2022-03-23T13:30:16.883" UserId="340" Text="How-to bootstrap your new blockchain network without centralised infrastructure" ContentLicense="CC BY-SA 4.0" />
  <row Id="3919" PostHistoryTypeId="3" PostId="1075" RevisionGUID="4640d645-343d-4d83-83ea-dc3f2d7d7275" CreationDate="2022-03-23T13:30:16.883" UserId="340" Text="|networking|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3920" PostHistoryTypeId="5" PostId="1066" RevisionGUID="45ea9a4f-d36b-4104-b6ab-8df24e87cf55" CreationDate="2022-03-23T13:37:22.340" UserId="83" Comment="make question clearer" Text="If I have started running a Substrate node but the `ss58Format` value in the chain specification .json file that is generated from using the `build-spec` command is not `42`, how do I update the chain so its SS58 Format is 42? " ContentLicense="CC BY-SA 4.0" />
  <row Id="3921" PostHistoryTypeId="4" PostId="1066" RevisionGUID="45ea9a4f-d36b-4104-b6ab-8df24e87cf55" CreationDate="2022-03-23T13:37:22.340" UserId="83" Comment="make question clearer" Text="How to update the SS58Prefix for a running node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3922" PostHistoryTypeId="5" PostId="1074" RevisionGUID="c0077941-0cf9-44be-9d76-1dd9dbb0f9fd" CreationDate="2022-03-23T13:41:27.177" UserId="384" Comment="added 154 characters in body" Text="I am just starting to learn Blockchain.&#xD;&#xA;I am using the following steps to learn.&#xD;&#xA;&#xD;&#xA;For a Rust programming experience Rust of 4 months + 3 years of Python.&#xD;&#xA;&#xD;&#xA;1. https://wiki.polkadot.network/&#xD;&#xA;2. https://learnpolkadot.com/kusama/&#xD;&#xA;&#xD;&#xA;Goal:&#xD;&#xA;&#xD;&#xA; - Become a Blockchain (in context of Dot Foundation) developer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is above the correct order?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3923" PostHistoryTypeId="5" PostId="1074" RevisionGUID="51d876ba-35da-42a3-98fa-b461a5a0cbe2" CreationDate="2022-03-23T13:48:54.363" UserId="384" Comment="added 34 characters in body" Text="For a Rust programming experience Rust of 4 months + 3 years of Python.&#xD;&#xA;&#xD;&#xA;I am just starting to learn Blockchain.&#xD;&#xA;I am using the following steps to learn.&#xD;&#xA;&#xD;&#xA;1. https://wiki.polkadot.network/&#xD;&#xA;2. https://learnpolkadot.com/kusama/&#xD;&#xA;&#xD;&#xA;Also:&#xD;&#xA;https://web3.foundation&#xD;&#xA;&#xD;&#xA;Goal:&#xD;&#xA;&#xD;&#xA; - Become a Blockchain (in context of Dot Foundation) developer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is above the correct order?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3925" PostHistoryTypeId="5" PostId="1074" RevisionGUID="45af24c9-8da7-4f10-9f3d-d4d83e3470f4" CreationDate="2022-03-23T13:54:54.510" UserId="384" Comment="added 34 characters in body" Text="For a Rust programming experience Rust of 4 months + 3 years of Python.&#xD;&#xA;&#xD;&#xA;I am just starting to learn Blockchain.&#xD;&#xA;I am using the following steps to learn.&#xD;&#xA;&#xD;&#xA;1. https://wiki.polkadot.network/&#xD;&#xA;2. https://learnpolkadot.com/kusama/&#xD;&#xA;3. https://docs.substrate.io/tutorials/v3/&#xD;&#xA;&#xD;&#xA;Also above somewhere should be:&#xD;&#xA;https://web3.foundation&#xD;&#xA;&#xD;&#xA;Goal:&#xD;&#xA;&#xD;&#xA; - Become a Blockchain (in context of Dot Foundation) developer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is above the correct order?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3926" PostHistoryTypeId="4" PostId="1074" RevisionGUID="45af24c9-8da7-4f10-9f3d-d4d83e3470f4" CreationDate="2022-03-23T13:54:54.510" UserId="384" Comment="added 34 characters in body" Text="What is the order of the best learning resources?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3927" PostHistoryTypeId="2" PostId="1076" RevisionGUID="b55b6c1a-cc5b-4cb5-a02d-f93575d8f670" CreationDate="2022-03-23T14:03:32.863" UserId="340" Text="Just looking for a further rationale around each consensus mechanism and what they aim to solve." ContentLicense="CC BY-SA 4.0" />
  <row Id="3929" PostHistoryTypeId="1" PostId="1076" RevisionGUID="b55b6c1a-cc5b-4cb5-a02d-f93575d8f670" CreationDate="2022-03-23T14:03:32.863" UserId="340" Text="What are the various consensus mechanism and how are they best leveraged" ContentLicense="CC BY-SA 4.0" />
  <row Id="3930" PostHistoryTypeId="3" PostId="1076" RevisionGUID="b55b6c1a-cc5b-4cb5-a02d-f93575d8f670" CreationDate="2022-03-23T14:03:32.863" UserId="340" Text="|consensus|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3931" PostHistoryTypeId="2" PostId="1077" RevisionGUID="af498d55-2b17-449e-9bbc-ff3d18eff0c5" CreationDate="2022-03-23T14:14:31.740" UserId="340" Text="Bad bots are a problem for any true digital democratic process to be successful.&#xD;&#xA;&#xD;&#xA;How can we ascertain proof of humanity and distinguish AI/ML from real people." ContentLicense="CC BY-SA 4.0" />
  <row Id="3933" PostHistoryTypeId="1" PostId="1077" RevisionGUID="af498d55-2b17-449e-9bbc-ff3d18eff0c5" CreationDate="2022-03-23T14:14:31.740" UserId="340" Text="How can I ensure only humans can take part in voting activities" ContentLicense="CC BY-SA 4.0" />
  <row Id="3934" PostHistoryTypeId="3" PostId="1077" RevisionGUID="af498d55-2b17-449e-9bbc-ff3d18eff0c5" CreationDate="2022-03-23T14:14:31.740" UserId="340" Text="|democratic|identify|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3935" PostHistoryTypeId="2" PostId="1078" RevisionGUID="54a4e4d3-ca7e-4e81-957f-64d04ac0777d" CreationDate="2022-03-23T14:18:04.767" UserId="515" Text="I'm working with [pallet_evm](https://github.com/paritytech/frontier/blob/master/frame/evm/src/lib.rs#L518) of Frontier to support EVM, I want to map the Substrate account with the EVM account&#xD;&#xA;```&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Mapping&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, H160, AccountId32&gt;;&#xD;&#xA;```&#xD;&#xA; why did I change the AddressMapping of pallet_evm the EVM account balance dropped to 0 &#xD;&#xA;```&#xD;&#xA;impl&lt;T&gt; pallet_evm::AddressMapping&lt;AccountId32&gt; for MyAddressMapping&lt;T&gt;&#xD;&#xA;	where&#xD;&#xA;		T: Config,&#xD;&#xA;	{&#xD;&#xA;		fn into_account_id(address: H160) -&gt; AccountId32 {&#xD;&#xA;			if let Some(account_id) = Mapping::&lt;T&gt;::get(address) {&#xD;&#xA;				account_id&#xD;&#xA;			} else {&#xD;&#xA;				HashedAddressMapping::&lt;BlakeTwo256&gt;::into_account_id(address)&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and why the trait AddressMapping must have the value return rather than an option like this&#xD;&#xA;```&#xD;&#xA;pub trait AddressMapping&lt;A&gt; {&#xD;&#xA;	fn into_account_id(address: H160) -&gt;  Option&lt;A&gt;;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3937" PostHistoryTypeId="1" PostId="1078" RevisionGUID="54a4e4d3-ca7e-4e81-957f-64d04ac0777d" CreationDate="2022-03-23T14:18:04.767" UserId="515" Text="How does 'into_account_id' function of pallet_evm works?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3938" PostHistoryTypeId="3" PostId="1078" RevisionGUID="54a4e4d3-ca7e-4e81-957f-64d04ac0777d" CreationDate="2022-03-23T14:18:04.767" UserId="515" Text="|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3939" PostHistoryTypeId="2" PostId="1079" RevisionGUID="465bbe89-e7c2-4d78-98b1-e6bc6115f7b1" CreationDate="2022-03-23T14:19:10.083" UserId="489" Text="my rust version is :&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;when i run `cargo build` in this dirextory: https://github.com/VegeBun-csj/Proof-Chain/tree/main/pallets/xclient&#xD;&#xA;&#xD;&#xA;i got an error: &#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/58IGQ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/CwpwX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3941" PostHistoryTypeId="1" PostId="1079" RevisionGUID="465bbe89-e7c2-4d78-98b1-e6bc6115f7b1" CreationDate="2022-03-23T14:19:10.083" UserId="489" Text="`no `to_substrate_wasm_fn_return_value` in the root` when i run `cargo build` in pallet dir" ContentLicense="CC BY-SA 4.0" />
  <row Id="3942" PostHistoryTypeId="3" PostId="1079" RevisionGUID="465bbe89-e7c2-4d78-98b1-e6bc6115f7b1" CreationDate="2022-03-23T14:19:10.083" UserId="489" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3943" PostHistoryTypeId="2" PostId="1080" RevisionGUID="eb25b19d-5115-4f52-9a4f-ac803f5401b8" CreationDate="2022-03-23T14:21:05.620" UserId="627" Text="This was an issue on older versions of the JS API. This was fixed in version 7.10.1 - https://github.com/polkadot-js/api/releases/tag/v7.10.1&#xD;&#xA;&#xD;&#xA;The background to this is that to support multiple versions of metadata (Kusama starts on v9, it is not on v14), the metadata gets upgraded, i.e. when a block is retrieved for metadata v9, it is converted internally to v14. This means that internally to the API one version is used - the alternative would be to support codepaths for metadata v9, v10, v11, v12, v13 and (now) v14. &#xD;&#xA;&#xD;&#xA;(As an aside: It could have been worse... and was worse at some point. We dropped support for v0-v8 a while back, the first block on Kusama uses metadata v9, so the cut-off point was set there)&#xD;&#xA;&#xD;&#xA;As part of this metadata upgrade process to the latest version (in this case v14), some types are added to the type registry used in the v14 metadata specification, so basically we emulate what the node returns. In this case `u16` was not added as part of this metadata-to-latest upgrade process, so the built-in `&lt;pallet&gt;.palletVersion(): u16` storage entry couldn't work as expected and the internal decoration of this storage entry yielded the above log.&#xD;&#xA;&#xD;&#xA;For Kusama/Polkadot the API doesn't need additional types, it ships with all historic info for the various upgrades. To fix your case, upgrade to at least `@polkadot/api` 7.10.1 (most recent is certainly best). " ContentLicense="CC BY-SA 4.0" />
  <row Id="3945" PostHistoryTypeId="5" PostId="1080" RevisionGUID="6e895e26-0ff1-41cc-aa89-ee11864a741b" CreationDate="2022-03-23T14:28:28.653" UserId="627" Comment="typo." Text="This was an issue on older versions of the JS API. This was fixed in version 7.10.1 - https://github.com/polkadot-js/api/releases/tag/v7.10.1&#xD;&#xA;&#xD;&#xA;The background to this is that to support multiple versions of metadata (Kusama starts on v9, it is now on v14), the metadata gets upgraded, i.e. when a block is retrieved for metadata v9, it is converted internally to v14. This means that internally to the API one version is used - the alternative would be to support codepaths for metadata v9, v10, v11, v12, v13 and (now) v14. &#xD;&#xA;&#xD;&#xA;(As an aside: It could have been worse... and was worse at some point. We dropped support for v0-v8 a while back, the first block on Kusama uses metadata v9, so the cut-off point was set there)&#xD;&#xA;&#xD;&#xA;As part of this metadata upgrade process to the latest version (in this case v14), some types are added to the type registry used in the v14 metadata specification, so basically we emulate what the node returns. In this case `u16` was not added as part of this metadata-to-latest upgrade process, so the built-in `&lt;pallet&gt;.palletVersion(): u16` storage entry couldn't work as expected and the internal decoration of this storage entry yielded the above log.&#xD;&#xA;&#xD;&#xA;For Kusama/Polkadot the API doesn't need additional types, it ships with all historic info for the various upgrades. To fix your case, upgrade to at least `@polkadot/api` 7.10.1 (most recent is certainly best). " ContentLicense="CC BY-SA 4.0" />
  <row Id="3946" PostHistoryTypeId="2" PostId="1081" RevisionGUID="1aa84243-0e25-4206-9a35-fdab9b2b015b" CreationDate="2022-03-23T14:42:10.860" UserId="501" Text="I try to start a parachain using [the tutorial][1] and don't want to use the [polkadot-launch][2] so I can fully understand the underlying structure.&#xD;&#xA;&#xD;&#xA;The relay chain works and I the parachain relay chain works too, but the parachain don't produce blocks and shows the error: `Could not decode the head data. ...`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-23 15:39:44 Parachain Collator Template    &#xD;&#xA;2022-03-23 15:39:44 ✌️  version 3.0.0-c2e2134-x86_64-linux-gnu    &#xD;&#xA;2022-03-23 15:39:44 ❤️  by Anonymous, 2017-2022    &#xD;&#xA;2022-03-23 15:39:44  Chain specification: Local Testnet    &#xD;&#xA;2022-03-23 15:39:44  Node name: Renault-Collator    &#xD;&#xA;2022-03-23 15:39:44  Role: AUTHORITY    &#xD;&#xA;2022-03-23 15:39:44  Database: RocksDb at /tmp/SIM-multichain-with-polkadot-substrate/parachain/renault/collator/alice/chains/local_testnet/db    &#xD;&#xA;2022-03-23 15:39:44 ⛓  Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)    &#xD;&#xA;2022-03-23 15:39:45 Parachain id: Id(2000)    &#xD;&#xA;2022-03-23 15:39:45 Parachain Account: 5Ec4AhPUwPeyTFyuhGuBbD224mY85LKLMSqSSo33JYWCazU4    &#xD;&#xA;2022-03-23 15:39:45 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000f0d31cb6618778f3049a66a0eb4a420220ffa2cec0cc3f086f835bea61420b8c03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2022-03-23 15:39:45 Is collating: yes    &#xD;&#xA;2022-03-23 15:39:45 [Parachain]  Initializing Genesis block/state (state: 0xf0d3…0b8c, header-hash: 0xef6a…20b9)    &#xD;&#xA;2022-03-23 15:39:45 [Parachain] ⏱  Loaded block-time = 12s from block 0xef6a546522b72881ca05fe59ef4b326fe025a402539b3ab3c3f4f4496e6c20b9    &#xD;&#xA;2022-03-23 15:39:45 [Relaychain]  Initializing Genesis block/state (state: 0xd628…09ce, header-hash: 0x59a3…d8a4)    &#xD;&#xA;2022-03-23 15:39:45 [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain] ⏱  Loaded block-time = 6s from block 0x59a303460528b1113ebc876aedd5158843a8e33bc4d3cd663d64f3d01f10d8a4    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain]  Local node identity is: 12D3KooWMvb7w5tbgk6HyFkxdJDjFvqvX8s9Sh2tHjiYKDRjgyEs    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain]  Highest known block at #0    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain] Listening for new connections on 127.0.0.1:9977.    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain] ️ Connecting all Handles to Overseer&#xD;&#xA;2022-03-23 15:39:46 [Parachain] Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2022-03-23 15:39:46 [Parachain]  Local node identity is: 12D3KooWDQoNQgsaxKhTNDZ6BJjqdK17d474q3YGjXP6iHQ8TUKH    &#xD;&#xA;2022-03-23 15:39:46 [Parachain]  Highest known block at #0    &#xD;&#xA;2022-03-23 15:39:46 [Parachain] 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-03-23 15:39:46 [Parachain] Listening for new connections on 0.0.0.0:8844.    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain]  Discovered new external address for our node: /ip4/134.59.230.93/tcp/30343/ws/p2p/12D3KooWMvb7w5tbgk6HyFkxdJDjFvqvX8s9Sh2tHjiYKDRjgyEs    &#xD;&#xA;2022-03-23 15:39:46 [Parachain]  Discovered new external address for our node: /ip4/127.0.0.1/tcp/40333/p2p/12D3KooWDQoNQgsaxKhTNDZ6BJjqdK17d474q3YGjXP6iHQ8TUKH    &#xD;&#xA;2022-03-23 15:39:46 [Parachain]  Discovered new external address for our node: /ip4/134.59.230.93/tcp/40333/p2p/12D3KooWDQoNQgsaxKhTNDZ6BJjqdK17d474q3YGjXP6iHQ8TUKH    &#xD;&#xA;2022-03-23 15:39:47 Accepted a new tcp connection from 127.0.0.1:41322.    &#xD;&#xA;2022-03-23 15:39:48 [Relaychain] ✨ Imported #206 (0xc195…efe2)    &#xD;&#xA;2022-03-23 15:39:48 [Parachain] Could not decode the head data. error=Error { cause: Some(Error { cause: None, desc: &quot;Not enough data to fill buffer&quot; }), desc: &quot;Could not decode `Header::parent_hash`&quot; }&#xD;&#xA;2022-03-23 15:39:48 [Relaychain] Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 0, new_window_start: 15, new_window_end: 20 }&#xD;&#xA;2022-03-23 15:39:51 [Relaychain]  Idle (4 peers), best: #206 (0xc195…efe2), finalized #204 (0x0fec…a97d), ⬇ 56.2kiB/s ⬆ 14.1kiB/s&#xD;&#xA;2022-03-23 15:39:51 [Parachain]  Idle (0 peers), best: #0 (0xef6a…20b9), finalized #0 (0xef6a…20b9), ⬇ 3.4kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2022-03-23 15:39:54 [Relaychain] ✨ Imported #207 (0xbe6e…4426)    &#xD;&#xA;2022-03-23 15:39:54 [Parachain] Could not decode the head data. error=Error { cause: Some(Error { cause: None, desc: &quot;Not enough data to fill buffer&quot; }), desc: &quot;Could not decode `Header::parent_hash`&quot; }&#xD;&#xA;2022-03-23 15:39:56 [Relaychain]  Idle (4 peers), best: #207 (0xbe6e…4426), finalized #204 (0x0fec…a97d), ⬇ 10.7kiB/s ⬆ 8.0kiB/s&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Does somebody have an idea what this error means ? And if it is actually related to the parachain not producing blocks ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/start-relay/&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-launch" ContentLicense="CC BY-SA 4.0" />
  <row Id="3948" PostHistoryTypeId="1" PostId="1081" RevisionGUID="1aa84243-0e25-4206-9a35-fdab9b2b015b" CreationDate="2022-03-23T14:42:10.860" UserId="501" Text="Parachain not producing blocks ? Error: Could not decode the head data" ContentLicense="CC BY-SA 4.0" />
  <row Id="3949" PostHistoryTypeId="3" PostId="1081" RevisionGUID="1aa84243-0e25-4206-9a35-fdab9b2b015b" CreationDate="2022-03-23T14:42:10.860" UserId="501" Text="|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3950" PostHistoryTypeId="2" PostId="1082" RevisionGUID="0ff527e5-a998-4b9e-bd08-366b05b6878c" CreationDate="2022-03-23T14:43:28.420" UserId="29" Text="This is a hard question to answer but I will try to give my 2 **..**'s on what was helpful for me when I started on the Substrate path as a Polkadot Support Engineer at Parity. Maybe some others can share their perspective as well.&#xD;&#xA;&#xD;&#xA;If you have a bit of a programming background and your goal is that you want to learn blockchain to become familiar with Substrate I would recommend the following:&#xD;&#xA;&#xD;&#xA;Learn blockchain fundamentals with Bill Laboon:&#xD;&#xA;- [Blockchain Fundamentals](https://youtube.com/playlist?list=PLxVihxZC42nF_MCN9PTvZMIifRjx9cZ2J)&#xD;&#xA;&#xD;&#xA;Become familiar with [Substrate Docs](https://substrate.io):&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/overview&#xD;&#xA;&#xD;&#xA;Do **all** the Substrate tutorials:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3&#xD;&#xA;&#xD;&#xA;Subscribe &amp; Watch Videos&#xD;&#xA;- [Parity Tech YouTube](https://www.youtube.com/c/ParityTech)&#xD;&#xA;&#xD;&#xA;Learn about the different pallets available to you. Read them.&#xD;&#xA;- https://paritytech.github.io/substrate/latest/sc_service/index.html?search=pallet&#xD;&#xA;&#xD;&#xA;Build stuff&#xD;&#xA;- Don't be afraid to get your &quot;hands dirty&quot;&#xD;&#xA;- Pick something that you don't know and try to learn it&#xD;&#xA;- Become comfortable configuring and running nodes, integrate pallets, build a pallet from scratch. &#xD;&#xA;- Run a local Substrate chain, launch a parachain.&#xD;&#xA;&#xD;&#xA;Adopt a growth-mindset&#xD;&#xA;- Learn a little everyday; this adds up&#xD;&#xA;&#xD;&#xA;Keep up-to-date on what is happening in the [Polkadot community](https://wiki.polkadot.network/docs/community) especially the Element chats and Github.&#xD;&#xA;&#xD;&#xA;Go deeper into Substrate:&#xD;&#xA;- [Substrate How-To Guides](https://docs.substrate.io/how-to-guides/v3)&#xD;&#xA;&#xD;&#xA;Read the docs!&#xD;&#xA;- [Substrate Rust Docs](https://paritytech.github.io/substrate/latest/sc_service/index.html)&#xD;&#xA;- This is the Substrate Developer's bible&#xD;&#xA;&#xD;&#xA;Read the code!&#xD;&#xA;- https://github.com/paritytech/substrate&#xD;&#xA;- This is the Substrate Developer's home&#xD;&#xA;- You should be regularly poking around in the Substrate codebase to understand how things work; don't be satisfied with concepts, you should understand how it works in the code as well.&#xD;&#xA;&#xD;&#xA;Stay up-to-date on Stack Exchange:&#xD;&#xA;- [Substrate Stack Exchange](https://substrate.stackexchange.com)&#xD;&#xA;- Replicate the issues, solve them&#xD;&#xA;&#xD;&#xA;Learn Rust as you learn Substrate:&#xD;&#xA;- [Rust Book](https://doc.rust-lang.org/book)&#xD;&#xA;- Several other resources available&#xD;&#xA;&#xD;&#xA;Find a mentor &#xD;&#xA;- Blockchain &amp; the Polkadot ecosystem can be complex; however, the community is thriving, there are Polkadot events online and all over the world - great place to meet others who are a little further on the Substrate path&#xD;&#xA;&#xD;&#xA;From here, you could specialize e.g. Substrate Runtime Engineer, Substrate Parachain Engineer, etc. depending on the path you want to take there are a number of additional resources available to you.&#xD;&#xA;&#xD;&#xA;**And last but not least:**&#xD;&#xA;- Participate in a Substrate-related hackathon!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kkK1a.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3952" PostHistoryTypeId="4" PostId="1074" RevisionGUID="2c5a3dfe-276c-4866-b645-e49542323432" CreationDate="2022-03-23T14:44:06.847" UserId="29" Comment="improved title" Text="How do I become a Substrate Developer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3953" PostHistoryTypeId="5" PostId="1074" RevisionGUID="2c5a3dfe-276c-4866-b645-e49542323432" CreationDate="2022-03-23T14:44:06.847" UserId="29" Comment="improved title" Text="I would like to become a Substrate Blockchain Developer.&#xD;&#xA;&#xD;&#xA;What is the recommended path?&#xD;&#xA;&#xD;&#xA;I have 4 months of Rust programming experience and 3 years of Python programming experience.&#xD;&#xA;&#xD;&#xA;I am just starting to learn blockchain.&#xD;&#xA;I am using the following steps to learn.&#xD;&#xA;&#xD;&#xA;1. https://wiki.polkadot.network/&#xD;&#xA;2. https://learnpolkadot.com/kusama/&#xD;&#xA;3. https://docs.substrate.io/tutorials/v3/&#xD;&#xA;4. https://web3.foundation&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3954" PostHistoryTypeId="2" PostId="1083" RevisionGUID="ff0b745c-e6ed-4072-8b71-6ce85dc6cfc5" CreationDate="2022-03-23T14:51:01.323" UserId="183" Text="upon an extrinsic call one of our collators stopped to produce blocks and here's the error log snippet: &#xD;&#xA;```&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Since then it was out of sync and couldn't connect to the parachain network anymore:&#xD;&#xA;```&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Idle (0 peers), best: #117412 (0x6db7…430e), finalized #117411 (0x4f1e…9e09), ⬇ 111.7kiB/s ⬆ 5.6kiB/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The other collators are working fine.&#xD;&#xA;Restarting this collator didn't seem to help. The collators were built based on `polkadot-v0.9.17` branch.&#xD;&#xA;&#xD;&#xA;Why did it happen?&#xD;&#xA;Is there a way to recover from this? Delete the whole local parachain DB and restart it?&#xD;&#xA;&#xD;&#xA;Here's the full log, thanks for any help!&#xD;&#xA;```&#xD;&#xA;2022-03-21 14:48:00 [Parachain]  Idle (5 peers), best: #117409 (0xd230…1c6a), finalized #117408 (0xd2b2…85a8), ⬇ 4.1kiB/s ⬆ 0.3kiB/s&#xD;&#xA;2022-03-21 14:48:00 [Relaychain] ✨ Imported #11906559 (0xa6d4…39f0)&#xD;&#xA;2022-03-21 14:48:01 [Relaychain] ♻️  Reorg on #11906559,0xa6d4…39f0 to #11906559,0xf481…863c, common ancestor #11906558,0xc316…cb4c&#xD;&#xA;2022-03-21 14:48:01 [Relaychain] ✨ Imported #11906559 (0xf481…863c)&#xD;&#xA;2022-03-21 14:48:03 [Relaychain]  Idle (46 peers), best: #11906559 (0xf481…863c), finalized #11906554 (0x6aa2…2c9a), ⬇ 357.9kiB/s ⬆ 387.9kiB/s&#xD;&#xA;2022-03-21 14:48:05 [Parachain]  Idle (5 peers), best: #117409 (0xd230…1c6a), finalized #117408 (0xd2b2…85a8), ⬇ 0.3kiB/s ⬆ 0.3kiB/s&#xD;&#xA;2022-03-21 14:48:06 [Relaychain] ✨ Imported #11906560 (0xac51…57fc)&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Starting collation. relay_parent=0xac51c45933f7f20cd091043a409a0ac7eb85d28cc2cb932bce3f6bfd129257fc at=0x1d3031df9370bc788e04dd83b6ae06539cc33729a5041501e7f5973064c6e380&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Starting consensus session on top of parent 0x1d3031df9370bc788e04dd83b6ae06539cc33729a5041501e7f5973064c6e380&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Prepared block for proposing at 117411 (1 ms) [hash: 0x4644f38f1e294fdfa9548654eb517340c7948f7d77d20ba7293bbaaff574cddf; parent_hash: 0x1d30…e380; extrinsics (2): [0x20c3…76d4, 0x1a4e…62f0]]&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Pre-sealed block for proposal at 117411. Hash now 0x4f1e697ca979e8f00015ba04f544cb87a31aaf22867a4dd0c36c4a2a69349e09, previously 0x4644f38f1e294fdfa9548654eb517340c7948f7d77d20ba7293bbaaff574cddf.&#xD;&#xA;2022-03-21 14:48:06 [Parachain] ✨ Imported #117411 (0x4f1e…9e09)&#xD;&#xA;2022-03-21 14:48:06 [Parachain] PoV size { header: 0.181640625kb, extrinsics: 3.525390625kb, storage_proof: 4.6123046875kb }&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Compressed PoV size: 7.3828125kb&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Produced proof-of-validity candidate. block_hash=0x4f1e697ca979e8f00015ba04f544cb87a31aaf22867a4dd0c36c4a2a69349e09&#xD;&#xA;2022-03-21 14:48:06 [Relaychain] ✨ Imported #11906560 (0x963c…1165)&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Starting collation. relay_parent=0x963c3603694a50f889bd32ed8ca5681359647468b533b03839f98ac0e2601165 at=0x1d3031df9370bc788e04dd83b6ae06539cc33729a5041501e7f5973064c6e380&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Starting consensus session on top of parent 0x1d3031df9370bc788e04dd83b6ae06539cc33729a5041501e7f5973064c6e380&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Prepared block for proposing at 117411 (1 ms) [hash: 0x2088d388da88bfbf7f00a8b06d4c4a9e56326fd37502a76a3fbf10789f174e57; parent_hash: 0x1d30…e380; extrinsics (2): [0x00ae…e5fd, 0x9a44…b9cd]]&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Pre-sealed block for proposal at 117411. Hash now 0x55662869e5f85b6e28906c30c8876ac79a08763cd9bf14c2798fba4d4334dab8, previously 0x2088d388da88bfbf7f00a8b06d4c4a9e56326fd37502a76a3fbf10789f174e57.&#xD;&#xA;2022-03-21 14:48:06 [Parachain] PoV size { header: 0.181640625kb, extrinsics: 3.525390625kb, storage_proof: 4.6123046875kb }&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Compressed PoV size: 7.3955078125kb&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Produced proof-of-validity candidate. block_hash=0x55662869e5f85b6e28906c30c8876ac79a08763cd9bf14c2798fba4d4334dab8&#xD;&#xA;2022-03-21 14:48:06 [Parachain] ✨ Imported #117411 (0x5566…dab8)&#xD;&#xA;2022-03-21 14:48:08 [Relaychain]  Idle (47 peers), best: #11906560 (0xac51…57fc), finalized #11906556 (0x126d…c413), ⬇ 311.1kiB/s ⬆ 482.3kiB/s&#xD;&#xA;2022-03-21 14:48:10 [Parachain]  Idle (5 peers), best: #117410 (0x1d30…e380), finalized #117408 (0xd2b2…85a8), ⬇ 0.4kiB/s ⬆ 16.0kiB/s&#xD;&#xA;2022-03-21 14:48:12 [Relaychain] ✨ Imported #11906561 (0xa3e8…6e5d)&#xD;&#xA;2022-03-21 14:48:13 [Relaychain]  Idle (46 peers), best: #11906561 (0xa3e8…6e5d), finalized #11906557 (0x35bc…e52b), ⬇ 435.7kiB/s ⬆ 1.1MiB/s&#xD;&#xA;2022-03-21 14:48:15 [Parachain]  Idle (5 peers), best: #117410 (0x1d30…e380), finalized #117408 (0xd2b2…85a8), ⬇ 32 B/s ⬆ 0.1kiB/s&#xD;&#xA;2022-03-21 14:48:18 [Relaychain] ✨ Imported #11906562 (0xdaa6…9f28)&#xD;&#xA;2022-03-21 14:48:18 [Relaychain] ✨ Imported #11906562 (0x3638…c47e)&#xD;&#xA;2022-03-21 14:48:18 [Relaychain]  Idle (47 peers), best: #11906562 (0xdaa6…9f28), finalized #11906557 (0x35bc…e52b), ⬇ 316.9kiB/s ⬆ 981.9kiB/s&#xD;&#xA;2022-03-21 14:48:20 [Parachain]  Idle (5 peers), best: #117410 (0x1d30…e380), finalized #117409 (0xd230…1c6a), ⬇ 0.1kiB/s ⬆ 0.2kiB/s&#xD;&#xA;2022-03-21 14:48:23 [Relaychain]  Idle (48 peers), best: #11906562 (0xdaa6…9f28), finalized #11906559 (0xf481…863c), ⬇ 477.9kiB/s ⬆ 2.9MiB/s&#xD;&#xA;2022-03-21 14:48:24 [Relaychain] ✨ Imported #11906563 (0x13f9…b3b5)&#xD;&#xA;2022-03-21 14:48:24 [Parachain] Starting collation. relay_parent=0x13f9f26f921929e6c532795adabc763137ae71de26b72d02061a4fc764bcb3b5 at=0x4f1e697ca979e8f00015ba04f544cb87a31aaf22867a4dd0c36c4a2a69349e09&#xD;&#xA;2022-03-21 14:48:24 [Relaychain] ✨ Imported #11906563 (0x9b1a…9732)&#xD;&#xA;2022-03-21 14:48:24 [Parachain] Starting collation. relay_parent=0x9b1abde446f897d8600780120542fd5dc91a9efbf1e18df8423d45328dfa9732 at=0x4f1e697ca979e8f00015ba04f544cb87a31aaf22867a4dd0c36c4a2a69349e09&#xD;&#xA;2022-03-21 14:48:25 [Parachain]  Idle (5 peers), best: #117411 (0x4f1e…9e09), finalized #117410 (0x1d30…e380), ⬇ 90 B/s ⬆ 0.2kiB/s&#xD;&#xA;2022-03-21 14:48:27 [Parachain] ✨ Imported #117412 (0x6db7…430e)&#xD;&#xA;2022-03-21 14:48:27 [Parachain] ✨ Imported #117412 (0xc45f…ea14)&#xD;&#xA;2022-03-21 14:48:28 [Relaychain]  Idle (47 peers), best: #11906563 (0x13f9…b3b5), finalized #11906560 (0xac51…57fc), ⬇ 705.3kiB/s ⬆ 1.3MiB/s&#xD;&#xA;2022-03-21 14:48:30 [Relaychain] ✨ Imported #11906564 (0x3d5b…2895)&#xD;&#xA;2022-03-21 14:48:30 [Parachain]  Idle (5 peers), best: #117411 (0x4f1e…9e09), finalized #117410 (0x1d30…e380), ⬇ 2.5kiB/s ⬆ 0.8kiB/s&#xD;&#xA;2022-03-21 14:48:33 [Relaychain]  Idle (48 peers), best: #11906564 (0x3d5b…2895), finalized #11906561 (0xa3e8…6e5d), ⬇ 526.9kiB/s ⬆ 998.2kiB/s&#xD;&#xA;2022-03-21 14:48:35 [Parachain]  Idle (5 peers), best: #117411 (0x4f1e…9e09), finalized #117410 (0x1d30…e380), ⬇ 99 B/s ⬆ 99 B/s&#xD;&#xA;2022-03-21 14:48:36 [Relaychain] ✨ Imported #11906565 (0x31c4…6348)&#xD;&#xA;2022-03-21 14:48:36 [Relaychain] ✨ Imported #11906565 (0x91d7…0b0c)&#xD;&#xA;2022-03-21 14:48:38 [Relaychain]  Idle (50 peers), best: #11906565 (0x31c4…6348), finalized #11906561 (0xa3e8…6e5d), ⬇ 618.7kiB/s ⬆ 1.7MiB/s&#xD;&#xA;2022-03-21 14:48:40 [Parachain]  Idle (5 peers), best: #117411 (0x4f1e…9e09), finalized #117410 (0x1d30…e380), ⬇ 24 B/s ⬆ 24 B/s&#xD;&#xA;2022-03-21 14:48:42 [Relaychain] ✨ Imported #11906566 (0xb368…7b9d)&#xD;&#xA;2022-03-21 14:48:42 [Relaychain] ♻️  Reorg on #11906566,0xb368…7b9d to #11906566,0x5e83…4a28, common ancestor #11906565,0x31c4…6348&#xD;&#xA;2022-03-21 14:48:42 [Relaychain] ✨ Imported #11906566 (0x5e83…4a28)&#xD;&#xA;2022-03-21 14:48:42 [Parachain] Starting collation. relay_parent=0x5e8371280c4ed92ffaf3df2218d6ef111eebbf78ce4d41a751e9fffc107f4a28 at=0x6db76adc2fb91abf78bf4610fa8e65f7b93dde99271c013b32499c525617430e&#xD;&#xA;2022-03-21 14:48:42 [Parachain]  Starting consensus session on top of parent 0x6db76adc2fb91abf78bf4610fa8e65f7b93dde99271c013b32499c525617430e&#xD;&#xA;2022-03-21 14:48:42 [Parachain]  Prepared block for proposing at 117413 (1 ms) [hash: 0x30e63829d63f1962ad28aac14426b8e7d917ddbc0d411288ed72a15b7e5bfb5b; parent_hash: 0x6db7…430e; extrinsics (2): [0x9956…4ce5, 0xe068…cc45]]&#xD;&#xA;2022-03-21 14:48:42 [Parachain]  Pre-sealed block for proposal at 117413. Hash now 0x843ab65bbb5bd29c01a1411b29f39ffd975eb7f2fcb8e996532c7109b9ea2402, previously 0x30e63829d63f1962ad28aac14426b8e7d917ddbc0d411288ed72a15b7e5bfb5b.&#xD;&#xA;2022-03-21 14:48:42 [Parachain] ✨ Imported #117413 (0x843a…2402)&#xD;&#xA;2022-03-21 14:48:42 [Parachain] PoV size { header: 0.181640625kb, extrinsics: 3.525390625kb, storage_proof: 4.5537109375kb }&#xD;&#xA;2022-03-21 14:48:42 [Parachain] Compressed PoV size: 7.32421875kb&#xD;&#xA;2022-03-21 14:48:42 [Parachain] Produced proof-of-validity candidate. block_hash=0x843ab65bbb5bd29c01a1411b29f39ffd975eb7f2fcb8e996532c7109b9ea2402&#xD;&#xA;2022-03-21 14:48:43 [Relaychain]  Idle (50 peers), best: #11906566 (0x5e83…4a28), finalized #11906563 (0x13f9…b3b5), ⬇ 511.5kiB/s ⬆ 1022.4kiB/s&#xD;&#xA;2022-03-21 14:48:45 [Parachain]  Idle (5 peers), best: #117412 (0x6db7…430e), finalized #117411 (0x4f1e…9e09), ⬇ 51.0kiB/s ⬆ 18 B/s&#xD;&#xA;2022-03-21 14:48:48 [Relaychain] ✨ Imported #11906567 (0x797d…4dcd)&#xD;&#xA;2022-03-21 14:48:48 [Parachain] Starting collation. relay_parent=0x797de76cbc186beaf702321557fc6243f6ac751dd46cc5c247c15c530cb64dcd at=0x6db76adc2fb91abf78bf4610fa8e65f7b93dde99271c013b32499c525617430e&#xD;&#xA;2022-03-21 14:48:48 [Relaychain]  Idle (50 peers), best: #11906567 (0x797d…4dcd), finalized #11906563 (0x13f9…b3b5), ⬇ 423.2kiB/s ⬆ 706.8kiB/s&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Idle (0 peers), best: #117412 (0x6db7…430e), finalized #117411 (0x4f1e…9e09), ⬇ 111.7kiB/s ⬆ 5.6kiB/s&#xD;&#xA;2022-03-21 14:48:53 [Relaychain]  Idle (50 peers), best: #11906567 (0x797d…4dcd), finalized #11906564 (0x3d5b…2895), ⬇ 875.0kiB/s ⬆ 1.2MiB/s&#xD;&#xA;2022-03-21 14:48:54 [Relaychain] ✨ Imported #11906568 (0xa8f0…ba95)&#xD;&#xA;2022-03-21 14:48:55 [Parachain]  Idle (0 peers), best: #117412 (0x6db7…430e), finalized #117411 (0x4f1e…9e09), ⬇ 0.2kiB/s ⬆ 0.3kiB/s&#xD;&#xA;2022-03-21 14:48:58 [Relaychain]  Idle (49 peers), best: #11906568 (0xa8f0…ba95), finalized #11906565 (0x31c4…6348), ⬇ 672.7kiB/s ⬆ 745.4kiB/s&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3956" PostHistoryTypeId="1" PostId="1083" RevisionGUID="ff0b745c-e6ed-4072-8b71-6ce85dc6cfc5" CreationDate="2022-03-23T14:51:01.323" UserId="183" Text="Collator can't connect to parachain network upon wasm panic" ContentLicense="CC BY-SA 4.0" />
  <row Id="3957" PostHistoryTypeId="3" PostId="1083" RevisionGUID="ff0b745c-e6ed-4072-8b71-6ce85dc6cfc5" CreationDate="2022-03-23T14:51:01.323" UserId="183" Text="|parachain|collator|panic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3958" PostHistoryTypeId="2" PostId="1084" RevisionGUID="fdfa8a8a-d0f4-4a19-8833-b302cab684d9" CreationDate="2022-03-23T14:56:12.883" UserId="280" Text="You have multiple options to achieve your requirement. Eventually it boils down to checking for an empty iterator IMO.&#xD;&#xA;&#xD;&#xA;You can retrieve two iterators of your StorageMap:&#xD;&#xA;1. Either the `KeyPrefixIterator` by calling `SimpleStorageMap::&lt;T&gt;::iter_keys()`&#xD;&#xA;2. Or the `PrefixIterator` by calling `SimpleStorageMap::&lt;T&gt;::iter_values()` &#xD;&#xA;&#xD;&#xA;Then, you could just check whether the first element of your Iterator is `None` or whether the collection to an arbitrary vector is empty:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert!(SimpleStorageMap::&lt;T&gt;::iter_keys().next().is_none());&#xD;&#xA;&#xD;&#xA;assert!(SimpleStorageMap::&lt;T&gt;::iter_keys().collect::&lt;Vec&lt;_&gt;&gt;().is_empty());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="3967" PostHistoryTypeId="5" PostId="1082" RevisionGUID="10d1f8e0-100d-4b23-9cf8-2c5d47c4f1c0" CreationDate="2022-03-23T15:21:05.387" UserId="29" Comment="added 272 characters in body" Text="This is a hard question to answer but I will try to give my 2 **..**'s on what was helpful for me when I started on the Substrate path as a Polkadot Support Engineer at Parity. Maybe some others can share their perspective as well.&#xD;&#xA;&#xD;&#xA;If you have a bit of a programming background and your goal is that you want to learn blockchain to become familiar with Substrate I would recommend the following:&#xD;&#xA;&#xD;&#xA;Learn blockchain fundamentals with Bill Laboon:&#xD;&#xA;- [Blockchain Fundamentals](https://youtube.com/playlist?list=PLxVihxZC42nF_MCN9PTvZMIifRjx9cZ2J)&#xD;&#xA;&#xD;&#xA;Become familiar with [Substrate Docs](https://substrate.io):&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/overview&#xD;&#xA;&#xD;&#xA;Do **all** the Substrate tutorials:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3&#xD;&#xA;&#xD;&#xA;Subscribe &amp; watch videos&#xD;&#xA;- [Parity Tech YouTube](https://www.youtube.com/c/ParityTech)&#xD;&#xA;&#xD;&#xA;Learn about the [different pallets](https://paritytech.github.io/substrate/latest/sc_service/index.html?search=pallet) available to you. Read them.&#xD;&#xA;- Use the full Substrate [node runtime](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1391) as a reference as to how to configure some of these pallets&#xD;&#xA;- Pick a pallet and try to implement it yourself using the [Substrate Node Template](https://github.com/substrate-developer-hub/substrate-node-template)&#xD;&#xA;&#xD;&#xA;Build stuff&#xD;&#xA;- Don't be afraid to get your &quot;hands dirty&quot;&#xD;&#xA;- Pick something that you don't know and try to learn it&#xD;&#xA;- Become comfortable configuring and running nodes &#xD;&#xA;- Build a pallet from scratch&#xD;&#xA;&#xD;&#xA;Adopt a growth-mindset&#xD;&#xA;- Learn a little everyday; this adds up&#xD;&#xA;&#xD;&#xA;Keep up-to-date on what is happening in the [Polkadot community](https://wiki.polkadot.network/docs/community) especially the Element chats and Github.&#xD;&#xA;&#xD;&#xA;Go deeper into Substrate:&#xD;&#xA;- [Substrate How-To Guides](https://docs.substrate.io/how-to-guides/v3)&#xD;&#xA;&#xD;&#xA;Read the docs!&#xD;&#xA;- [Substrate Rust Docs](https://paritytech.github.io/substrate/latest/sc_service/index.html)&#xD;&#xA;- This is the Substrate Developer's bible&#xD;&#xA;&#xD;&#xA;Read the code!&#xD;&#xA;- https://github.com/paritytech/substrate&#xD;&#xA;- This is the Substrate Developer's home&#xD;&#xA;- You should be regularly poking around in the Substrate codebase to understand how things work; don't be satisfied with concepts, you should understand how it works in the code as well.&#xD;&#xA;&#xD;&#xA;Stay up-to-date on Stack Exchange:&#xD;&#xA;- [Substrate Stack Exchange](https://substrate.stackexchange.com)&#xD;&#xA;- Replicate the issues, solve them&#xD;&#xA;&#xD;&#xA;Learn Rust as you learn Substrate:&#xD;&#xA;- [Rust Book](https://doc.rust-lang.org/book)&#xD;&#xA;- Several other resources available&#xD;&#xA;&#xD;&#xA;Find a mentor &#xD;&#xA;- Blockchain &amp; the Polkadot ecosystem can be complex; however, the community is thriving, there are Polkadot events online and all over the world - great place to meet others who are a little further on the Substrate path&#xD;&#xA;&#xD;&#xA;From here, you could specialize e.g. Substrate Runtime Engineer, Substrate Parachain Engineer, etc. depending on the path you want to take there are a number of additional resources available to you.&#xD;&#xA;&#xD;&#xA;**And last but not least:**&#xD;&#xA;- Participate in a Substrate-related hackathon!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kkK1a.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="3971" PostHistoryTypeId="2" PostId="1086" RevisionGUID="5b82d668-2f3b-470b-b302-d44e01b3badd" CreationDate="2022-03-23T16:28:58.287" UserId="692" Text="I think the great majority of people start with substrate-kittties tutorial (https://docs.substrate.io/tutorials/v3/kitties/pt1/). I suggest you take a look at this workshop https://www.youtube.com/watch?v=NrG3co6UWEg (Substrate: Blockchain Framework in Rust - Workshop at @ETHDenver). I think this workshop is very well explained and beginner friendly. If you are looking for a little bit more guidance and mentoring while you are learning substrate there is a paid course in this link: https://www.industryconnect.org/substrate-runtime-developer-academy/&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3978" PostHistoryTypeId="2" PostId="1088" RevisionGUID="31739490-5b8f-4a7f-b9bd-ebc0c09a8dbf" CreationDate="2022-03-23T17:13:04.707" UserId="85" Text="One answer is to force a captcha to be answered. For an example of something that would defeat an AI take a look at https://www.idena.io/ (they are one of the identity provers that are used by gitcoin.co). Idena give you a series of photos (unique to the current session) and you have to pick which order represents a credible story. That's out of the scope of today's AI pretty much.&#xD;&#xA;&#xD;&#xA;It's much, much harder to defeat paid humans though without defeating your target audience if you make the puzzles hard. Consider for example people paid to be in discord to say `GM` for NFT whitelisting drops." ContentLicense="CC BY-SA 4.0" />
  <row Id="3980" PostHistoryTypeId="2" PostId="1089" RevisionGUID="465f9e65-f1a4-4fb2-ae0e-c3354042a4ef" CreationDate="2022-03-23T17:43:30.360" UserId="85" Text="An example is worth 1000 words: Have a look at the uniques pallet in substrate that stores two levels. Uniques are NFTs. One can mint a unique class and then under a particular class, one can mint individual instances of that class. (There's also metadata associated with the class level and the instance level that can be retrieved)&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/7a09b82772b0597cdae224f4b124d660dda9e82b/frame/uniques/src/lib.rs#L195&#xD;&#xA;&#xD;&#xA;(If you want more levels than a double map, you can use an N Storage map which you can read up about here: https://docs.substrate.io/v3/runtime/storage/ )" ContentLicense="CC BY-SA 4.0" />
  <row Id="3982" PostHistoryTypeId="2" PostId="1090" RevisionGUID="48a4f1ec-b804-46cc-8432-3e57e18e7291" CreationDate="2022-03-23T17:55:22.893" UserId="1848" Text="I'm trying to get transaction history (ie. transfers) using just the account id. From my understanding the only way this can be done is if you go through every single block and look up the transaction and see if it matches up with the account number. Is there a better way to do this and is there a way to do it without the use of some sort of database to store all the transaction of the blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3984" PostHistoryTypeId="1" PostId="1090" RevisionGUID="48a4f1ec-b804-46cc-8432-3e57e18e7291" CreationDate="2022-03-23T17:55:22.893" UserId="1848" Text="Transaction history using account id" ContentLicense="CC BY-SA 4.0" />
  <row Id="3985" PostHistoryTypeId="3" PostId="1090" RevisionGUID="48a4f1ec-b804-46cc-8432-3e57e18e7291" CreationDate="2022-03-23T17:55:22.893" UserId="1848" Text="|transaaction|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3986" PostHistoryTypeId="10" PostId="960" RevisionGUID="ce145445-8e4f-4997-93ad-295d111dd54d" CreationDate="2022-03-23T18:13:02.360" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="3987" PostHistoryTypeId="2" PostId="1091" RevisionGUID="896fad50-1c85-4e87-a6de-a8a8acfcd694" CreationDate="2022-03-23T18:37:24.737" UserId="1850" Text="I came across the ink storage Mapping data structure. The official doc seems to explain how to use it but not why it's needed. It seems more complicated to initialize and work with." ContentLicense="CC BY-SA 4.0" />
  <row Id="3989" PostHistoryTypeId="1" PostId="1091" RevisionGUID="896fad50-1c85-4e87-a6de-a8a8acfcd694" CreationDate="2022-03-23T18:37:24.737" UserId="1850" Text="What's the need for ink::storage::Mapping instead of the standard Mapping?" ContentLicense="CC BY-SA 4.0" />
  <row Id="3990" PostHistoryTypeId="3" PostId="1091" RevisionGUID="896fad50-1c85-4e87-a6de-a8a8acfcd694" CreationDate="2022-03-23T18:37:24.737" UserId="1850" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="3991" PostHistoryTypeId="2" PostId="1092" RevisionGUID="562066ea-0305-4926-8b19-7df3b315dcf9" CreationDate="2022-03-23T18:44:53.793" UserId="29" Text="You could use an indexer service in the cloud, where you can literally ask for all transactions made by a specific account ID.&#xD;&#xA;&#xD;&#xA;This is a good post for reference:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/questions/35/is-there-a-good-indexer-for-substrate-chains-like-the-graph&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="3993" PostHistoryTypeId="2" PostId="1093" RevisionGUID="b85e417d-1f25-4675-a869-1b8183fb85db" CreationDate="2022-03-23T18:45:32.773" UserId="627" Text="In the Polkadot space, this is part of the problem Encointer (a common-good parachain on Kusama) aims to solve.&#xD;&#xA;&#xD;&#xA;https://encointer.org/encointer-for-web3/&#xD;&#xA;&#xD;&#xA;Quoting from the above -&#xD;&#xA;&#xD;&#xA;&quot;All that’s needed to prevent abuse (such as Sybil attacks) is proof of personhood, not proof of identity. That is, the community needs to know that each user is a real person, with only one account. In person, that’s easy. A person can’t be in two places at once – and a bot certainly can’t impersonate a human in the flesh.&quot;&#xD;&#xA;&#xD;&#xA;So in Encointer, real people validate other real people and build out the network as a decentralized identity system.&#xD;&#xA;&#xD;&#xA;Disclaimer: Not a participant in this (yet), but I find it quite interesting, even though I'm not fond of people :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="3995" PostHistoryTypeId="2" PostId="1094" RevisionGUID="75ddad6d-1566-42d8-9815-7d4f66457099" CreationDate="2022-03-23T18:48:41.473" UserId="73" Text="There exists the [`CountedStorageMap`][1] that keeps track of the count of elements in the map:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// A wrapper around a `StorageMap` and a `StorageValue&lt;Value=u32&gt;` to keep track of how many items&#xD;&#xA;/// are in a map, without needing to iterate all the values.&#xD;&#xA;///&#xD;&#xA;/// This storage item has additional storage read and write overhead when manipulating values&#xD;&#xA;/// compared to a regular storage map.&#xD;&#xA;///&#xD;&#xA;/// For functions where we only add or remove a value, a single storage read is needed to check if&#xD;&#xA;/// that value already exists. For mutate functions, two storage reads are used to check if the&#xD;&#xA;/// value existed before and after the mutation.&#xD;&#xA;///&#xD;&#xA;/// Whenever the counter needs to be updated, an additional read and write occurs to update that&#xD;&#xA;/// counter.&#xD;&#xA;pub struct CountedStorageMap;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/7a09b82772b0597cdae224f4b124d660dda9e82b/frame/support/src/storage/types/counted_map.rs#L49" ContentLicense="CC BY-SA 4.0" />
  <row Id="3998" PostHistoryTypeId="2" PostId="1095" RevisionGUID="c83dbd42-e543-464a-a602-5ce699303c54" CreationDate="2022-03-23T19:04:27.187" UserId="609" Text="From the sourcecode, I found this description in:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/ink/blob/master/crates/storage/src/collections/hashmap/mod.rs&#xD;&#xA;```&#xD;&#xA;/// A hash map operating on the contract storage.&#xD;&#xA;///&#xD;&#xA;/// Stores a mapping between keys and values.&#xD;&#xA;///&#xD;&#xA;/// # Note&#xD;&#xA;///&#xD;&#xA;/// Unlike Rust's standard `HashMap` that uses the [`core::hash::Hash`] trait&#xD;&#xA;/// in order to hash its keys the storage hash map uses the [`scale::Encode`]&#xD;&#xA;/// encoding in order to hash its keys using a built-in cryptographic&#xD;&#xA;/// hash function provided by the chain runtime.&#xD;&#xA;///&#xD;&#xA;/// The main difference between the lower-level `LazyHashMap` and the&#xD;&#xA;/// `storage::HashMap` is that the latter is aware of its associated keys and&#xD;&#xA;/// values and operates on those instances directly as opposed to `Option`&#xD;&#xA;/// instances of them. Also it provides a more high-level and user focused&#xD;&#xA;/// API.&#xD;&#xA;///&#xD;&#xA;/// Users should generally prefer using this storage hash map over the low-level&#xD;&#xA;/// `LazyHashMap` for direct usage in their smart contracts.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The critical part is that this version uses &quot;scale::Encode&quot; to hash the keys. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4001" PostHistoryTypeId="2" PostId="1096" RevisionGUID="14c1e67f-3ea4-45c5-a1be-d4f9c84476e6" CreationDate="2022-03-23T19:13:07.560" UserId="340" Text="So reading the validators docs.&#xD;&#xA;&#xD;&#xA;It is unclear to myself if 'within two era's' means consecutive, else what greater time frame must I avoid offences for to get a clean rap sheet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4003" PostHistoryTypeId="1" PostId="1096" RevisionGUID="14c1e67f-3ea4-45c5-a1be-d4f9c84476e6" CreationDate="2022-03-23T19:13:07.560" UserId="340" Text="Slashable offences within two eras, what does this mean?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4004" PostHistoryTypeId="3" PostId="1096" RevisionGUID="14c1e67f-3ea4-45c5-a1be-d4f9c84476e6" CreationDate="2022-03-23T19:13:07.560" UserId="340" Text="|era|slashing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4005" PostHistoryTypeId="2" PostId="1097" RevisionGUID="20df6df3-b434-4591-8022-8342fd0c0655" CreationDate="2022-03-23T19:18:11.973" UserId="29" Text="There is a short nice write up on consensus here:&#xD;&#xA;- https://docs.substrate.io/v3/advanced/consensus&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-consensus&#xD;&#xA;&#xD;&#xA;If you're looking for more detailed info:&#xD;&#xA;&#xD;&#xA;**PoW**&#xD;&#xA;- https://paritytech.github.io/substrate/latest/sc_consensus_pow&#xD;&#xA;&#xD;&#xA;**Aura**&#xD;&#xA;- https://paritytech.github.io/substrate/latest/sc_consensus_aura&#xD;&#xA;&#xD;&#xA;**BABE**/**GRANDPA**&#xD;&#xA;- https://paritytech.github.io/substrate/latest/sc_consensus_babe&#xD;&#xA;- https://research.web3.foundation/en/latest/polkadot/block-production.html&#xD;&#xA;- https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html&#xD;&#xA;- https://polkadot.network/blog/polkadot-consensus-part-1-introduction&#xD;&#xA;- https://polkadot.network/blog/polkadot-consensus-part-2-grandpa&#xD;&#xA;- https://polkadot.network/blog/polkadot-consensus-part-3-babe&#xD;&#xA;- https://research.web3.foundation/en/latest/polkadot/finality.html&#xD;&#xA;- https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf&#xD;&#xA;&#xD;&#xA;This may be of interest to you:&#xD;&#xA;- https://github.com/paritytech/substrate/tree/master/client/consensus&#xD;&#xA;&#xD;&#xA;As @Squirrel noted, several of these are covered in [this post](https://substrate.stackexchange.com/questions/204/what-is-the-difference-between-babe-aura-and-grandpa)." ContentLicense="CC BY-SA 4.0" />
  <row Id="4007" PostHistoryTypeId="2" PostId="1098" RevisionGUID="b347a031-7b65-4d0b-b233-df5e651ee503" CreationDate="2022-03-23T19:27:18.827" UserId="557" Text="I'm playing around with some front end utilities where Substrate libraries like `sp_core` would be useful, but I'm getting the following error on compilation:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `secp256k1-sys v0.4.2`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/bread/Workspace/playground/wasm-pack-test/target/release/build/secp256k1-sys-64710e640e2fadab/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  TARGET = Some(&quot;wasm32-unknown-unknown&quot;)&#xD;&#xA;  OPT_LEVEL = Some(&quot;s&quot;)&#xD;&#xA;  HOST = Some(&quot;aarch64-apple-darwin&quot;)&#xD;&#xA;  CC_wasm32-unknown-unknown = None&#xD;&#xA;  CC_wasm32_unknown_unknown = None&#xD;&#xA;  TARGET_CC = None&#xD;&#xA;  CC = None&#xD;&#xA;  CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;  CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;  TARGET_CFLAGS = None&#xD;&#xA;  CFLAGS = None&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  CC_wasm32-unknown-unknown = None&#xD;&#xA;  CC_wasm32_unknown_unknown = None&#xD;&#xA;  TARGET_CC = None&#xD;&#xA;  CC = None&#xD;&#xA;  CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;  CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;  TARGET_CFLAGS = None&#xD;&#xA;  CFLAGS = None&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  running: &quot;clang&quot; &quot;-Os&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-I&quot; &quot;depend/secp256k1/&quot; &quot;-I&quot; &quot;depend/secp256k1/include&quot; &quot;-I&quot; &quot;depend/secp256k1/src&quot; &quot;-I&quot; &quot;wasm-sysroot&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DSECP256K1_API=&quot; &quot;-DENABLE_MODULE_ECDH=1&quot; &quot;-DENABLE_MODULE_SCHNORRSIG=1&quot; &quot;-DENABLE_MODULE_EXTRAKEYS=1&quot; &quot;-DUSE_NUM_NONE=1&quot; &quot;-DUSE_FIELD_INV_BUILTIN=1&quot; &quot;-DUSE_SCALAR_INV_BUILTIN=1&quot; &quot;-DECMULT_GEN_PREC_BITS=4&quot; &quot;-DECMULT_WINDOW_SIZE=15&quot; &quot;-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1&quot; &quot;-DENABLE_MODULE_RECOVERY=1&quot; &quot;-o&quot; &quot;/Users/bread/Workspace/playground/wasm-pack-test/target/wasm32-unknown-unknown/release/build/secp256k1-sys-923268476155554b/out/depend/secp256k1/contrib/lax_der_parsing.o&quot; &quot;-c&quot; &quot;depend/secp256k1/contrib/lax_der_parsing.c&quot;&#xD;&#xA;  cargo:warning=error: unable to create target: 'No available targets are compatible with triple &quot;wasm32-unknown-unknown&quot;'&#xD;&#xA;  cargo:warning=1 error generated.&#xD;&#xA;  exit status: 1&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I figured this should be possible since it can be used in Substrate runtimes that target wasm but perhaps I'm misunderstanding something." ContentLicense="CC BY-SA 4.0" />
  <row Id="4009" PostHistoryTypeId="1" PostId="1098" RevisionGUID="b347a031-7b65-4d0b-b233-df5e651ee503" CreationDate="2022-03-23T19:27:18.827" UserId="557" Text="How to use sp_core in libraries that target wasm for the web" ContentLicense="CC BY-SA 4.0" />
  <row Id="4010" PostHistoryTypeId="3" PostId="1098" RevisionGUID="b347a031-7b65-4d0b-b233-df5e651ee503" CreationDate="2022-03-23T19:27:18.827" UserId="557" Text="|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4011" PostHistoryTypeId="5" PostId="1097" RevisionGUID="500d6614-714f-4120-9d7f-c6108e1696b0" CreationDate="2022-03-23T19:30:01.370" UserId="29" Comment="added 301 characters in body" Text="There is a short nice write up on consensus here:&#xD;&#xA;- https://docs.substrate.io/v3/advanced/consensus&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-consensus&#xD;&#xA;&#xD;&#xA;If you're looking for more detailed info:&#xD;&#xA;&#xD;&#xA;**PoW**&#xD;&#xA;- https://paritytech.github.io/substrate/latest/sc_consensus_pow&#xD;&#xA;&#xD;&#xA;**Aura**&#xD;&#xA;- https://paritytech.github.io/substrate/latest/sc_consensus_aura&#xD;&#xA;&#xD;&#xA;**BABE**/**GRANDPA**&#xD;&#xA;- https://paritytech.github.io/substrate/latest/sc_consensus_babe&#xD;&#xA;- https://research.web3.foundation/en/latest/polkadot/block-production.html&#xD;&#xA;- https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html&#xD;&#xA;- https://polkadot.network/blog/polkadot-consensus-part-1-introduction&#xD;&#xA;- https://polkadot.network/blog/polkadot-consensus-part-2-grandpa&#xD;&#xA;- https://polkadot.network/blog/polkadot-consensus-part-3-babe&#xD;&#xA;- https://research.web3.foundation/en/latest/polkadot/finality.html&#xD;&#xA;- https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf&#xD;&#xA;&#xD;&#xA;This may be of interest to you:&#xD;&#xA;- https://github.com/paritytech/substrate/tree/master/client/consensus&#xD;&#xA;&#xD;&#xA;As @Squirrel noted, several of these are covered in [this post](https://substrate.stackexchange.com/questions/204/what-is-the-difference-between-babe-aura-and-grandpa).&#xD;&#xA;&#xD;&#xA;Videos are nice too:&#xD;&#xA;- [Block Production and Finalization in Polkadot by Bill Laboon](https://www.youtube.com/watch?v=FiEAnVECa8c)&#xD;&#xA;- [Manual Seal &amp; Instant Seal](https://www.youtube.com/watch?v=uhkV0jAcWDY)&#xD;&#xA;- [Consensus in Substrate with Rob](https://www.youtube.com/watch?v=QE8svRKVYOU&amp;t=727s)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4012" PostHistoryTypeId="2" PostId="1099" RevisionGUID="d2ac4d1c-75c7-47f3-9096-4112ecdf2aef" CreationDate="2022-03-23T19:31:55.683" UserId="16" Text="I assume that with &quot;standard mapping&quot; you mean the maps defined in Rust's standard library: `HashMap` and `BTreeMap`.&#xD;&#xA;&#xD;&#xA;The reason for the existence of `ink_storage::Mapping` is that it works entirely different: It delegates the process of mapping keys to values to the `pallet-contracts`. Each item you insert into the `ink_storage::Mapping` will occupy a single storage cell within the contract's storage. Accesses to the map will only pull exactly the item you are accessing from storage into contract memory.&#xD;&#xA;&#xD;&#xA;On the other hand if you just put a `BTreeMap` there it will be serialized as a whole into a single storage cell. Subsequently it will be pulled as a whole from contract storage into contract memory. Not very useful to store large sets of data. You should not do that. You would either use a standard `Vec` for small sets of data that you want to iterate or use `ink_storage::Mapping`." ContentLicense="CC BY-SA 4.0" />
  <row Id="4014" PostHistoryTypeId="2" PostId="1100" RevisionGUID="a75bf8c2-6cf8-4789-b519-a0b03a304ea7" CreationDate="2022-03-23T19:35:07.763" UserId="73" Text="Check your `std` feature declaration in your pallet. There you need to ensure that for every dependency that you imported with `default-features = false` you have added to the `std` feature declaration with `crate/std`." ContentLicense="CC BY-SA 4.0" />
  <row Id="4016" PostHistoryTypeId="5" PostId="1073" RevisionGUID="a113f759-505b-43d7-b717-a3982119f1d5" CreationDate="2022-03-23T19:39:30.547" UserId="29" Comment="added 378 characters in body" Text="[`mint_into`](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/fungible/trait.Mutate.html#tymethod.mint_into) without [`burn_from`](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/fungible/trait.Mutate.html#tymethod.burn_from) will **mint** new tokens and **increase** the overall supply.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Attempt to increase the `asset` balance of `who` by `amount`.&#xD;&#xA;///&#xD;&#xA;/// If not possible then don't do anything. Possible reasons for failure include:&#xD;&#xA;/// - Minimum balance not met.&#xD;&#xA;/// - Account cannot be created (e.g. because there is no provider reference and/or the asset&#xD;&#xA;///   isn't considered worth anything).&#xD;&#xA;///&#xD;&#xA;/// Since this is an operation which should be possible to take alone, if successful it will&#xD;&#xA;/// increase the overall supply of the underlying token.&#xD;&#xA;fn mint_into(asset: Self::AssetId, who: &amp;AccountId, amount: Self::Balance) -&gt; DispatchResult;&#xD;&#xA;```&#xD;&#xA;https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/support/src/traits/tokens/fungibles.rs#L94&#xD;&#xA;&#xD;&#xA;`mint_into` is a Rust trait defined in Frame Support. You can see it is being implemented in [assets pallet](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/assets/src/impl_fungibles.rs#L83) and [balances pallet](https://github.com/paritytech/substrate/blob/8b2f5379653d9d741f666634ed7f751dd6870381/frame/balances/src/lib.rs#L1108).&#xD;&#xA;&#xD;&#xA;You can see this is what [teleport](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/support/src/traits/tokens/fungibles.rs#L133) uses. The only difference is that teleport also calls `burn_from`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Transfer funds from one account into another. The default implementation uses `mint_into`&#xD;&#xA;/// and `burn_from` and may generate unwanted events.&#xD;&#xA;fn teleport(asset: Self::AssetId, source: &amp;AccountId, dest: &amp;AccountId, amount: Self::Balance,)&#xD;&#xA;```&#xD;&#xA;https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/support/src/traits/tokens/fungibles.rs#L133" ContentLicense="CC BY-SA 4.0" />
  <row Id="4017" PostHistoryTypeId="2" PostId="1101" RevisionGUID="a1a04536-d3f2-4081-bc17-cc6ec4fde802" CreationDate="2022-03-23T19:48:22.710" UserId="599" Text="The first question, what is standard `Mapping`?=)&#xD;&#xA;&#xD;&#xA;I will describe differences for standard hashmap from the Rust - `ink_prelude::collections::HashMap`. Hope it answers your question.&#xD;&#xA;&#xD;&#xA;`ink_prelude::collections::HashMap` is fully stored under one **storage** cell. It is fully loaded into the RAM during the execution of the contract from that **storage** cell. That means if `HashMap` contains 1000 elements, then all 1000 elements will be loaded into the RAM. It is a lot of gas.&#xD;&#xA;&#xD;&#xA;`ink_storage::Mapping` is not stored in the storage cell at all. `Mapping` provides simple methods like `get` and `set` a value by some key. Each value's key is prefixed by the `Mapping`(it knows storage prefix), and each value is stored to its storage cell under the prefixed key. That means that element is only loaded if you called the `get` method and passed a valid key.&#xD;&#xA;&#xD;&#xA;The usability of the `Mapping` is much less than `HashMap`. For example, you can't iterate over elements, you can't use `entry` functionality, and so on. But it takes much less gas and the size in the WASM bloat." ContentLicense="CC BY-SA 4.0" />
  <row Id="4019" PostHistoryTypeId="5" PostId="987" RevisionGUID="5d487993-a5e1-49f5-9392-49ef291d22a2" CreationDate="2022-03-23T20:14:37.073" UserId="1810" Comment="pointers for hash-to-curve" Text="Yes, it's a consequence of the Edwards curve models used, but secp256k1 is a short Weierstrass curve.&#xD;&#xA;&#xD;&#xA;Ed25519 has the identity `(0,1)` in Affine coordinates, meaning `(0,1) + (0,1) = (0,1)` in Ed25519.  It little endian encodes as `[1u8, 0u8, ..., 0u8]`, not all zeros.&#xD;&#xA;&#xD;&#xA;In fact `[0u8; 32]` decodes as `(1,0)` because -1 is a square in F_q with q = 2^255-19, since q is divisible by 4.  It follows `(1,0)` lies on the curve.   It's not in the distinguished prime order subgroup, but `(1,0) + (1,0) = (0,1)` in Ed25519, so `(1,0)` still acts like the identity in sane Ed25519 protocols.  See page 6 of [Ed25519 paper][1].&#xD;&#xA;&#xD;&#xA;Ristretto decompresses `[0u8; 32]` as the [identity][2].  It's arguably somewhat by chance, except Mike Hamberg avoided crazy constants in the Jacobi quartic encoding, so zero stuck around from Ed25519.&#xD;&#xA;&#xD;&#xA;If you want unspendable funds then choose a point via [hash-to-curve][3], which also lets you encode an undependable reason, and control who knows they're unspendable.&#xD;&#xA;```&#xD;&#xA;let mut hash = sha2::Shake256::default();&#xD;&#xA;hash.input(input);&#xD;&#xA;let unspendable_address = RistrettoPoint::from_hash(hash).compress()&#xD;&#xA;```&#xD;&#xA;Appears dalek never released a hash-to-curve for ed25519, but they've one in master that's usable for this: https://github.com/dalek-cryptography/curve25519-dalek/blob/main/src/edwards.rs#L532&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://ed25519.cr.yp.to/ed25519-20110926.pdf&#xD;&#xA;  [2]: https://ristretto.group/test_vectors/ristretto255.html?highlight=identity#test-vectors-for--ristretto255&#xD;&#xA;  [3]: https://doc.dalek.rs/curve25519_dalek/ristretto/struct.RistrettoPoint.html#method.hash_from_bytes" ContentLicense="CC BY-SA 4.0" />
  <row Id="4020" PostHistoryTypeId="2" PostId="1102" RevisionGUID="3e533f81-efac-4645-95d5-c7c92fb1c323" CreationDate="2022-03-23T20:28:30.073" UserId="179" Text="A parachain had an upgrade schedule on a relay chain, but the upgrade did not go through, forcing the parachain to stop producing blocks. I tried forcing a new `validationCode` using SUDO, but that did not work either, and the parachain is still waiting to upgrade.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;What's the best solution to unbrick the chain? I don't need to recover any of it's state and ideally I want to remove it. For reference this is the current (March 23 2022) status of [paraID 2000 on Rococo][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UlGIa.png&#xD;&#xA;  [2]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="4022" PostHistoryTypeId="1" PostId="1102" RevisionGUID="3e533f81-efac-4645-95d5-c7c92fb1c323" CreationDate="2022-03-23T20:28:30.073" UserId="179" Text="Unstuck non-upgraded Parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="4023" PostHistoryTypeId="3" PostId="1102" RevisionGUID="3e533f81-efac-4645-95d5-c7c92fb1c323" CreationDate="2022-03-23T20:28:30.073" UserId="179" Text="|parachain|rococo|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4024" PostHistoryTypeId="2" PostId="1103" RevisionGUID="60dc4cc1-76f2-41aa-85a4-bc213317478b" CreationDate="2022-03-23T21:12:02.973" UserId="1853" Text="As the title suggests, I've been trying to call assert_last_event on the tests.rs class without success. The problem first happened when developing the kitties tutorial and after several toolchain version changes later, even more problems started to appear. I've noticed  [XLC's Kitties repo][1] doesn't emit events in the frontend, although the tests.rs class runs successfully despite calling assert_last_event. I've also tried [Substrate Node Template's repo][2], in all the branches that mention 'kitties', but all of them fire the following error:&#xD;&#xA;&#xD;&#xA;    error: failed to get `frame-benchmarking` as a dependency of package `node-template v4.0.0-dev (/home/frkmnt/Documents/Rust/kitties/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;    failed to load source for dependency `frame-benchmarking`&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;    Unable to update https://github.com/paritytech/substrate.git?tag=devhub/latest#e6fbbd5c&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;    object not found - no match for id (e6fbbd5cdf72a5ed7fd65138072ed1f8a320a33d); class=Odb (9); code=NotFound (-3)&#xD;&#xA;&#xD;&#xA;Attempting to update the toolchain as mentioned yields no result and updating the required versions only creates more dependency errors. I also tried it in a blank project, using the template pallet using the latest stable toolchain 1.59.0, along with several others, and modified the existing test to assert the last event as shown:&#xD;&#xA;&#xD;&#xA;    #[test]&#xD;&#xA;    fn it_works_for_default_value() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		assert_ok!(TemplateModule::do_something(Origin::signed(1), 42));&#xD;&#xA;		assert_eq!(TemplateModule::something(), Some(42));&#xD;&#xA;		System::assert_last_event(self::Event::TemplateModule(crate::Event::&lt;Test&gt;::SomethingStored(1, 42)))&#xD;&#xA;	});&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My original project fired this same error, even though this is the only version that successfully ran:&#xD;&#xA;&#xD;&#xA;    ---- tests::it_works_for_default_value stdout ----&#xD;&#xA;    thread 'tests::it_works_for_default_value' panicked at 'events expected', &#xD;&#xA;    /mnt/dados/andre/.cargo/git/checkouts/substrate- &#xD;&#xA;    7e08433d4c370a21/32a4fe0/frame/system/src/lib.rs:1442:42&#xD;&#xA;&#xD;&#xA;I have no warnings and all my code compiles successfully. Before this, it also emitted events and worked perfectly in the frontend when ran with cargo run -- --dev.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/xlc/substrate-kitties&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template.git" ContentLicense="CC BY-SA 4.0" />
  <row Id="4026" PostHistoryTypeId="1" PostId="1103" RevisionGUID="60dc4cc1-76f2-41aa-85a4-bc213317478b" CreationDate="2022-03-23T21:12:02.973" UserId="1853" Text="Problem running assert_last_event in tests.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="4027" PostHistoryTypeId="3" PostId="1103" RevisionGUID="60dc4cc1-76f2-41aa-85a4-bc213317478b" CreationDate="2022-03-23T21:12:02.973" UserId="1853" Text="|kitties|tests|assert-event|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4028" PostHistoryTypeId="2" PostId="1104" RevisionGUID="ac777d18-f66c-4e1f-82be-67c97f634219" CreationDate="2022-03-23T21:15:41.310" UserId="494" Text="From looking at [the source code](https://github.com/paritytech/substrate/blob/4b48e8ec7dffcb599248040f4da5be3de3c09318/frame/system/src/weights.rs#L101), it looks like `system` pallet's `remark` extrinsic has null weight.&#xD;&#xA;&#xD;&#xA;Even though remarks don't add anything in terms of block execution, one could argue it's still having an influence on block size and therefore having an effect on how fast nodes are able to sync the chain.&#xD;&#xA;&#xD;&#xA;How are `remark`s accounted for? What is preventing some troll from flooding the blocks with meaningless remarks without paying proportionally for that priviledge?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4030" PostHistoryTypeId="1" PostId="1104" RevisionGUID="ac777d18-f66c-4e1f-82be-67c97f634219" CreationDate="2022-03-23T21:15:41.310" UserId="494" Text="fee economics around remark" ContentLicense="CC BY-SA 4.0" />
  <row Id="4031" PostHistoryTypeId="3" PostId="1104" RevisionGUID="ac777d18-f66c-4e1f-82be-67c97f634219" CreationDate="2022-03-23T21:15:41.310" UserId="494" Text="|extrinsic|weight|block|fee|substrate-block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4032" PostHistoryTypeId="2" PostId="1105" RevisionGUID="3d4bea4c-f370-4bb8-9fa6-8da40b6676b1" CreationDate="2022-03-23T21:35:56.117" UserId="28" Text="I believe the problem here is small and easy to miss.&#xD;&#xA;&#xD;&#xA;Substrate chains do not emit events when the block number is 0. This is to avoid hundreds or even thousands of events being generated in the genesis block of a Substrate chain.&#xD;&#xA;&#xD;&#xA;So if you want to do any Runtime tests where you check events, make sure you first do:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;frame_system::Pallet::&lt;T&gt;::set_block_number(1);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can also automate this for all of your tests via with:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;	let t = frame_system::GenesisConfig::default().build_storage::&lt;Runtime&gt;().unwrap();&#xD;&#xA;	let mut ext = sp_io::TestExternalities::new(t);&#xD;&#xA;	ext.execute_with(|| System::set_block_number(1));&#xD;&#xA;	ext&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here you see we always will set the block number to 1 before giving you the text externalities environment." ContentLicense="CC BY-SA 4.0" />
  <row Id="4034" PostHistoryTypeId="6" PostId="1103" RevisionGUID="f9d6f435-504a-4078-8351-3c50887c50ad" CreationDate="2022-03-23T21:36:31.573" UserId="28" Comment="edited tags" Text="|pallet|frame|events|tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4035" PostHistoryTypeId="2" PostId="1106" RevisionGUID="be06969c-1a44-42b0-8065-8dda15d1670c" CreationDate="2022-03-23T21:37:54.150" UserId="240" Text="Can you tell me how to mock a trait in benchmarking?&#xD;&#xA;&#xD;&#xA;We have a pallet which takes NFTTrait as one of the configs. See below.&#xD;&#xA;&#xD;&#xA;        #[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;    		/// NFT Handler&#xD;&#xA;    		type NFTHandler: NFTTrait&lt;Self::AccountId, ClassId = ClassId, TokenId = TokenId&gt;;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;In the mock, we have created a struct to mock NFTTrait and pass it to the config. &#xD;&#xA;&#xD;&#xA;    pub struct NFTHandler;&#xD;&#xA;&#xD;&#xA;    impl NFTTrait&lt;u128&gt; for NFTHandler {&#xD;&#xA;       fn check_ownership(who: &amp;AccountId, asset_id: &amp;Self::AssetId) -&gt; Result&lt;bool&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Config for Runtime {&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type NFTHandler = NFTModule;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So how do I achieve the same thing in benchmarking? I tried to &#xD;&#xA;add `use crate::mock::NFTHandler;` on top of benchmarking class. Although IDE can find the correct reference, it did give me an error when I built it.&#xD;&#xA;&#xD;&#xA;    error[E0432]: unresolved import `crate::mock`&#xD;&#xA;      --&gt; pallets/marketplace/src/benchmarking.rs:34:12&#xD;&#xA;       |&#xD;&#xA;    34 | use crate::mock::NFTHandler;&#xD;&#xA;       |            ^^^^ could not find `mock` in the crate root&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any suggestions are welcome, thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="4037" PostHistoryTypeId="1" PostId="1106" RevisionGUID="be06969c-1a44-42b0-8065-8dda15d1670c" CreationDate="2022-03-23T21:37:54.150" UserId="240" Text="How to mock trait in benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="4038" PostHistoryTypeId="3" PostId="1106" RevisionGUID="be06969c-1a44-42b0-8065-8dda15d1670c" CreationDate="2022-03-23T21:37:54.150" UserId="240" Text="|benchmarking|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4039" PostHistoryTypeId="2" PostId="1107" RevisionGUID="1daf9614-4298-4ae5-b488-5e2fc5766c5f" CreationDate="2022-03-23T21:42:10.357" UserId="28" Text="Every extrinsic has an `ExtrinsicBaseWeight` which is defined in FRAME System.&#xD;&#xA;&#xD;&#xA;So even if a benchmark for a particular extrinsic says 0, there will still be the `ExtrinsicBaseWeight` included on top of it. This is also true for any non-zero weight. The final weight of the extrinsic will be `benchmark_weight + extrinsic_base_weight`.&#xD;&#xA;&#xD;&#xA;In fact, we measure the `ExtrinsicBaseWeight` using the `remark` function, so this weight is completely appropriate for the call.&#xD;&#xA;&#xD;&#xA;Beyond this base fee, all extrinsics have a `TransactionByteFee` which is set in the Transaction Payment Pallet. This will increase the fees charged to the user based on how many bytes they use in their encoded extrinsic.&#xD;&#xA;&#xD;&#xA;So the longer your `remark` message, the larger the fee you will pay.&#xD;&#xA;&#xD;&#xA;These two things combined ensure that appropriate fees are paid for `remark` extrinsics." ContentLicense="CC BY-SA 4.0" />
  <row Id="4041" PostHistoryTypeId="2" PostId="1108" RevisionGUID="2dca2a40-5b0c-4b48-ad81-90ccf78944f4" CreationDate="2022-03-23T21:48:03.460" UserId="205" Text="Is there a status/call or query that a pallet could invoke in order to establish if the actual running node instance is fully sync? TIA." ContentLicense="CC BY-SA 4.0" />
  <row Id="4043" PostHistoryTypeId="1" PostId="1108" RevisionGUID="2dca2a40-5b0c-4b48-ad81-90ccf78944f4" CreationDate="2022-03-23T21:48:03.460" UserId="205" Text="How to programmatically determine if a node is fully sync?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4044" PostHistoryTypeId="3" PostId="1108" RevisionGUID="2dca2a40-5b0c-4b48-ad81-90ccf78944f4" CreationDate="2022-03-23T21:48:03.460" UserId="205" Text="|pallet|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4045" PostHistoryTypeId="2" PostId="1109" RevisionGUID="c900943d-2666-49ca-bf25-5a4e4ca1f478" CreationDate="2022-03-23T21:50:02.327" UserId="28" Text="The issue appears to be that you have put your chain into an expected state, which it cannot resolve.&#xD;&#xA;&#xD;&#xA;When calling `schedule_para_cleanup` we check:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Disallow offboarding in case there is an upcoming upgrade.&#xD;&#xA;//&#xD;&#xA;// This is not a fundamential limitation but rather simplification: it allows us to get&#xD;&#xA;// away without introducing additional logic for pruning and, more importantly, enacting&#xD;&#xA;// ongoing PVF pre-checking votes. It also removes some nasty edge cases.&#xD;&#xA;//&#xD;&#xA;// This implicitly assumes that the given para exists, i.e. it's lifecycle != None.&#xD;&#xA;if FutureCodeHash::&lt;T&gt;::contains_key(&amp;id) {&#xD;&#xA;	return Err(Error::&lt;T&gt;::CannotOffboard.into())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am seeing that Para 2000 on Rococo does have a `FutureCodeHash`:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;So the chain cannot be cleaned up until this is removed.&#xD;&#xA;&#xD;&#xA;I am not sure how you got in this state, and it would be good for you to share that so that we may potentially handle these state transitions in the runtime better, but for now, probably you need to use Sudo to remove this storage item  manually, and then you can offboard your chain.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/o7Bps.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4047" PostHistoryTypeId="2" PostId="1110" RevisionGUID="53839a6b-f4e2-4f12-9927-95b2c805eaaa" CreationDate="2022-03-23T22:06:08.493" UserId="28" Text="Bruno mentions how to do this with the `fungibles::*` traits, but the more common API that people use is simply the [`Currency` trait](https://crates.parity.io/frame_support/traits/tokens/currency/trait.Currency.html).&#xD;&#xA;&#xD;&#xA;With `Currency`, trait you have access to a few different functions which could do this, but just as an example, you could use:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Adds up to `value` to the free balance of `who`. If `who` doesn't exist, it is created.&#xD;&#xA;///&#xD;&#xA;/// Infallible.&#xD;&#xA;fn deposit_creating(who: &amp;AccountId, value: Self::Balance) -&gt; Self::PositiveImbalance;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;By [dropping](https://doc.rust-lang.org/std/ops/trait.Drop.html) the positive imbalance that is returned by this function, you will automatically update the total issuance of your blockchain.&#xD;&#xA;&#xD;&#xA;This is what the [Staking Pallet](https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs#L231) does to pay users their staking rewards, and inflate the overall token supply:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Actually make a payment to a staker. This uses the currency's reward function&#xD;&#xA;/// to pay the right payee for the given staker account.&#xD;&#xA;fn make_payout(stash: &amp;T::AccountId, amount: BalanceOf&lt;T&gt;) -&gt; Option&lt;PositiveImbalanceOf&lt;T&gt;&gt; {&#xD;&#xA;	let dest = Self::payee(stash);&#xD;&#xA;	match dest {&#xD;&#xA;		RewardDestination::Controller =&gt; Self::bonded(stash)&#xD;&#xA;			.map(|controller| T::Currency::deposit_creating(&amp;controller, amount)),&#xD;&#xA;		RewardDestination::Stash =&gt; T::Currency::deposit_into_existing(stash, amount).ok(),&#xD;&#xA;		RewardDestination::Staked =&gt; Self::bonded(stash)&#xD;&#xA;			.and_then(|c| Self::ledger(&amp;c).map(|l| (c, l)))&#xD;&#xA;			.and_then(|(controller, mut l)| {&#xD;&#xA;				l.active += amount;&#xD;&#xA;				l.total += amount;&#xD;&#xA;				let r = T::Currency::deposit_into_existing(stash, amount).ok();&#xD;&#xA;				Self::update_ledger(&amp;controller, &amp;l);&#xD;&#xA;				r&#xD;&#xA;			}),&#xD;&#xA;		RewardDestination::Account(dest_account) =&gt;&#xD;&#xA;			Some(T::Currency::deposit_creating(&amp;dest_account, amount)),&#xD;&#xA;		RewardDestination::None =&gt; None,&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4049" PostHistoryTypeId="5" PostId="1108" RevisionGUID="9cdc5e19-a060-442a-9298-4c2ddc0f985c" CreationDate="2022-03-23T22:13:58.557" UserId="205" Comment="added 2 characters in body" Text="Is there a status/call or query that a pallet could invoke in order to establish if the actual running node instance is fully synced? TIA." ContentLicense="CC BY-SA 4.0" />
  <row Id="4050" PostHistoryTypeId="5" PostId="1108" RevisionGUID="eb55a127-0173-4091-813c-f5b26382fd87" CreationDate="2022-03-23T22:26:27.130" UserId="205" Comment="deleted 3 characters in body" Text="Is there a status/call or query that a OCW could invoke in order to establish if the actual running node instance is fully synced? Maybe listening to a `frame_system` event? Or knowing the total blocks number and comparing with the latest one? TIA." ContentLicense="CC BY-SA 4.0" />
  <row Id="4051" PostHistoryTypeId="4" PostId="1108" RevisionGUID="eb55a127-0173-4091-813c-f5b26382fd87" CreationDate="2022-03-23T22:26:27.130" UserId="205" Comment="deleted 3 characters in body" Text="How can a OCW determine if a node is fully sync?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4052" PostHistoryTypeId="5" PostId="1106" RevisionGUID="287c39f4-0171-422c-876d-fac2a024fa99" CreationDate="2022-03-23T22:34:02.947" UserId="240" Comment="added 1431 characters in body" Text="Can you tell me how to mock a trait in benchmarking?&#xD;&#xA;&#xD;&#xA;We have a pallet which takes NFTTrait as one of the configs. See below.&#xD;&#xA;&#xD;&#xA;        #[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;    		/// NFT Handler&#xD;&#xA;    		type NFTHandler: NFTTrait&lt;Self::AccountId, ClassId = ClassId, TokenId = TokenId&gt;;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;In the mock, we have created a struct to mock NFTTrait and pass it to the config. &#xD;&#xA;&#xD;&#xA;    pub struct NFTHandler;&#xD;&#xA;&#xD;&#xA;    impl NFTTrait&lt;u128&gt; for NFTHandler {&#xD;&#xA;       fn check_ownership(who: &amp;AccountId, asset_id: &amp;Self::AssetId) -&gt; Result&lt;bool&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Config for Runtime {&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type NFTHandler = NFTHandler;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So how do I achieve the same thing in benchmarking? I tried to &#xD;&#xA;add `use crate::mock::NFTHandler;` on top of benchmarking class. Although IDE can find the correct reference, it did give me an error when I built it.&#xD;&#xA;&#xD;&#xA;    error[E0432]: unresolved import `crate::mock`&#xD;&#xA;      --&gt; pallets/marketplace/src/benchmarking.rs:34:12&#xD;&#xA;       |&#xD;&#xA;    34 | use crate::mock::NFTHandler;&#xD;&#xA;       |            ^^^^ could not find `mock` in the crate root&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Below is a snippet from benchmarking file&#xD;&#xA;&#xD;&#xA;    #![cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    &#xD;&#xA;    use super::*;&#xD;&#xA;    use sp_std::prelude::*;&#xD;&#xA;    use sp_std::vec;&#xD;&#xA;    &#xD;&#xA;    #[allow(unused)]&#xD;&#xA;    use crate::*;&#xD;&#xA;    use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller};&#xD;&#xA;    use frame_support::traits::{Currency, Get};&#xD;&#xA;    use frame_system::RawOrigin;&#xD;&#xA;    use pallet_nft::{Attributes, CollectionType, TokenType};&#xD;&#xA;    use sp_runtime::traits::{AccountIdConversion, StaticLookup, UniqueSaturatedInto};&#xD;&#xA;    use crate::{Call, Config};&#xD;&#xA;    use crate::mock::NFTHandler;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    const SEED: u32 = 0;&#xD;&#xA;    pub type AccountId = u128;&#xD;&#xA;    pub type AssetId = u128;&#xD;&#xA;    &#xD;&#xA;    const ALICE: AccountId = 1;&#xD;&#xA;    const NFT_ID: AssetId = 99;&#xD;&#xA;    &#xD;&#xA;    fn mint_NFT&lt;T: Config&gt;(caller: T::AccountId) {&#xD;&#xA;    	NFTModule::&lt;T&gt;::mint(&#xD;&#xA;    		RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;    		ALICE,&#xD;&#xA;    		test_attributes(1)		&#xD;&#xA;    	);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    benchmarks! {	&#xD;&#xA;    	list_item{&#xD;&#xA;    		let caller: T::AccountId = account('caller', 0, SEED);&#xD;&#xA;    &#xD;&#xA;            mint_NFT::&lt;T&gt;(caller.clone());&#xD;&#xA;    	}: _(RawOrigin::Signed(caller.clone()), NFT_ID)&#xD;&#xA;    	verify {&#xD;&#xA;    		let listing_id = crate::Pallet::&lt;T&gt;::get_listing_item(NFT_ID);&#xD;&#xA;    		assert_eq!(listing_id, 0);&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl_benchmark_test_suite!(Pallet, crate::benchmarking::tests::new_test_ext(), crate::mock::Test);&#xD;&#xA;&#xD;&#xA;Any suggestions are welcome, thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="4053" PostHistoryTypeId="4" PostId="1108" RevisionGUID="8975e1c8-a0cb-47a3-b792-cc4618174926" CreationDate="2022-03-23T22:42:30.223" UserId="205" Comment="edited title" Text="How can a OCW determine if a node is fully synced?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4054" PostHistoryTypeId="5" PostId="1108" RevisionGUID="8975e1c8-a0cb-47a3-b792-cc4618174926" CreationDate="2022-03-23T22:42:30.223" UserId="205" Comment="edited title" Text="Is there a status/call or query that a OCW could invoke in order to establish if the actual running node instance is fully synced? Maybe listening to a `frame_system` event? Or knowing the total blocks number and comparing with the latest one? TIA.&#xD;&#xA;&#xD;&#xA;NB: To better understand the UC, I have a RPC subscribed to an OCW. I want the RPC to be available, only once the node is fully synced. So I need the OCW to determine this before enabling the RPC calls.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="4055" PostHistoryTypeId="5" PostId="1108" RevisionGUID="f17c25b7-b1c1-4a50-9f17-7171a15e0e85" CreationDate="2022-03-23T22:47:36.273" UserId="205" Comment="edited title" Text="Is there a status-call/api that a OCW could invoke in order to establish if the actual running node instance is fully synced? Maybe listening to a `frame_system` event? Or knowing the total blocks number and comparing with the latest one? TIA.&#xD;&#xA;&#xD;&#xA;NB: To better understand the UC, I have a RPC subscribed to an OCW. I want the RPC to be available, only once the node is fully synced. So I need the OCW to determine this before enabling the RPC calls.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="4056" PostHistoryTypeId="2" PostId="1111" RevisionGUID="0a008b85-9040-4fae-96ca-8cb8885b956e" CreationDate="2022-03-23T22:50:52.163" UserId="28" Text="My guess is that your `mock` is only accessible when compiling with the `test` flag, like so:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod mock;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So if you want to use this dependency, you must do so with this feature gate:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;use crate::mock::NFTHandler;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And note that you cannot really write any non-test code which uses this dependency since it wont compile when you actually want to run benchmarks.&#xD;&#xA;&#xD;&#xA;Instead, you probably DON'T want to import `struct NFTHandler`, but instead use your trait:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;T::NFTHandler::check_ownership(...)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which should require no imports from `mock`." ContentLicense="CC BY-SA 4.0" />
  <row Id="4058" PostHistoryTypeId="5" PostId="1073" RevisionGUID="afba3050-7f6c-4149-bdea-894ec7ad9f22" CreationDate="2022-03-23T23:18:54.910" UserId="29" Comment="proper links; edited body" Text="[`mint_into`](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/fungible/trait.Mutate.html#tymethod.mint_into) without [`burn_from`](https://paritytech.github.io/substrate/latest/frame_support/traits/tokens/fungible/trait.Mutate.html#tymethod.burn_from) will **mint** new tokens and **increase** the overall supply.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Attempt to increase the `asset` balance of `who` by `amount`.&#xD;&#xA;///&#xD;&#xA;/// If not possible then don't do anything. Possible reasons for failure include:&#xD;&#xA;/// - Minimum balance not met.&#xD;&#xA;/// - Account cannot be created (e.g. because there is no provider reference and/or the asset&#xD;&#xA;///   isn't considered worth anything).&#xD;&#xA;///&#xD;&#xA;/// Since this is an operation which should be possible to take alone, if successful it will&#xD;&#xA;/// increase the overall supply of the underlying token.&#xD;&#xA;fn mint_into(asset: Self::AssetId, who: &amp;AccountId, amount: Self::Balance) -&gt; DispatchResult;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[`mint_into`](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/support/src/traits/tokens/fungibles.rs#L94) is a Rust trait defined in Frame Support. You can see it is being implemented in [assets pallet](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/assets/src/impl_fungibles.rs#L83) and [balances pallet](https://github.com/paritytech/substrate/blob/8b2f5379653d9d741f666634ed7f751dd6870381/frame/balances/src/lib.rs#L1108).&#xD;&#xA;&#xD;&#xA;You can see this is what [teleport](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/support/src/traits/tokens/fungibles.rs#L146) uses. The only difference is that teleport also calls [`burn_from`](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/support/src/traits/tokens/fungibles.rs#L141).&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Transfer funds from one account into another. The default implementation uses `mint_into`&#xD;&#xA;/// and `burn_from` and may generate unwanted events.&#xD;&#xA;fn teleport(asset: Self::AssetId, source: &amp;AccountId, dest: &amp;AccountId, amount: Self::Balance,)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4059" PostHistoryTypeId="2" PostId="1112" RevisionGUID="dc44e3c2-03ca-437b-8a39-d542b876b4e0" CreationDate="2022-03-24T01:50:53.830" UserId="359" Text="OCW don't determine if a node is fully synced. It got notified by txpool when new block is imported&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/97ee3d1de19e3f7442b6c0aa4ad360a49d5ea663/client/offchain/src/lib.rs#L225-L232&#xD;&#xA;&#xD;&#xA;Note importing is different than syncing (bulk importing) so OCW are only invoked after the blockchain is fully synced.&#xD;&#xA;&#xD;&#xA;This PR may have more context https://github.com/paritytech/substrate/pull/5200&#xD;&#xA;&#xD;&#xA;Not exactly sure what's your requirement but it doesn't sounds relating to OCW much. Your custom RPC handler should be able to query syncing status and decide what to do. OCW can't determine behaviour of RPC call.&#xD;&#xA;&#xD;&#xA;If the goal is only enable certain RPC when the node is fully synced, you can just do it in the RPC handler without OCW at all." ContentLicense="CC BY-SA 4.0" />
  <row Id="4061" PostHistoryTypeId="2" PostId="1113" RevisionGUID="ae0e548e-41eb-4071-9875-633e5c66d8ca" CreationDate="2022-03-24T01:55:26.913" UserId="125" Text="&gt; why did I change the AddressMapping of pallet_evm the EVM account balance dropped to 0&#xD;&#xA;&#xD;&#xA;This `AddressMapping` uses to do conversation from `H160` to substrate chain `AccountId`. Note the EVM account together with the corresponding substrate AccountId share the same balance module. As you stated the EVM account balance dropped to zero, the corresponding substrate AccountId's balance must also be zero too. Please ensure the convert is correct.&#xD;&#xA;&#xD;&#xA;&gt; why the trait AddressMapping must have the value return rather than an option like this&#xD;&#xA;&#xD;&#xA;According to the design in the frontier repo, An EVM account has a specific corresponding substrate AccountId. Can you explain when we need to return *None* for *AddressMapping*?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4063" PostHistoryTypeId="2" PostId="1114" RevisionGUID="99c43fc1-c9bb-4630-8e6d-79df569a1e9e" CreationDate="2022-03-24T02:23:33.850" UserId="283" Text="I encountered this recently, and the underlying issue was that I had multiple versions of the Substrate git repo being referenced in different `Cargo.toml` files." ContentLicense="CC BY-SA 4.0" />
  <row Id="4068" PostHistoryTypeId="2" PostId="1115" RevisionGUID="535b2ec7-809d-43f1-9097-a5ccf457364b" CreationDate="2022-03-24T05:14:41.443" UserId="566" Text="I've added `Staking` to `substrate-node-template` and just explored the feature. I've managed to add validators and nominators and it looks like everything is working well. &#xD;&#xA;&#xD;&#xA;One thing I'm not able to figure out is how the rewards are being distributed. I've been watching the events at the end of every era and it looks like only `Staking.EraPaid` is being fired. &#xD;&#xA;&#xD;&#xA;From what I understand from the discussion here, https://substrate.stackexchange.com/questions/643/what-does-the-staking-erapaid-event-mean , I should be getting the events `Staking.PayoutStarted` and `Staking.Rewarded` as well. &#xD;&#xA;&#xD;&#xA;I guess I'm trying to figure out the following&#xD;&#xA;&#xD;&#xA; 1. Which pallet is actually distributing the rewards? `pallet_election_provider_multi_phase` or `pallet_staking`&#xD;&#xA; 2. Is there anything I need to define for the Payouts to happen?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4070" PostHistoryTypeId="1" PostId="1115" RevisionGUID="535b2ec7-809d-43f1-9097-a5ccf457364b" CreationDate="2022-03-24T05:14:41.443" UserId="566" Text="How does the Rewards work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4071" PostHistoryTypeId="3" PostId="1115" RevisionGUID="535b2ec7-809d-43f1-9097-a5ccf457364b" CreationDate="2022-03-24T05:14:41.443" UserId="566" Text="|substrate-node-template|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4072" PostHistoryTypeId="2" PostId="1116" RevisionGUID="9a99be02-72a7-45d0-b778-0c36f99bd104" CreationDate="2022-03-24T05:14:46.720" UserId="139" Text="In setting up a live network, starting with a cloud instance running a substrate node. What are the things one needs to keep in mind, in order to make sure they are adhering to best practices?&#xD;&#xA;&#xD;&#xA;1. How many ports should be open? Is one for peering and one for websocket enough? Should `ws-external` be required if are only connecting to that node for exploring the blockchain? &#xD;&#xA;&#xD;&#xA;2. What if we would like to access that from `polkadot.js.org/apps`? What does one need to do in order to list their node as a test or public network on the block explorer. &#xD;&#xA;&#xD;&#xA;3. What about RPC calls? As a sudo key holder, one would like to make sudo calls to the network but I believe it's unsafe to allow `rpc-external` on a public node, so I was thinking of having a local node run a local machine, peer to the cloud instance, and then execute sudo calls. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4074" PostHistoryTypeId="1" PostId="1116" RevisionGUID="9a99be02-72a7-45d0-b778-0c36f99bd104" CreationDate="2022-03-24T05:14:46.720" UserId="139" Text="How to set up a live network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4075" PostHistoryTypeId="3" PostId="1116" RevisionGUID="9a99be02-72a7-45d0-b778-0c36f99bd104" CreationDate="2022-03-24T05:14:46.720" UserId="139" Text="|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4076" PostHistoryTypeId="2" PostId="1117" RevisionGUID="6e4360f9-fcfd-4bba-9ceb-43713605247f" CreationDate="2022-03-24T05:33:23.330" UserId="227" Text="To add a note regarding rationales:&#xD;&#xA;&#xD;&#xA;We recently switched the consensues to manual/instant seal for [`substrate-contracts-node`](https://github.com/paritytech/substrate-contracts-node).&#xD;&#xA;&#xD;&#xA;The rationale was that this particular node is mostly used for local standalone development or in CI's ‒ so it's a big speedup if blocks are immediately produced." ContentLicense="CC BY-SA 4.0" />
  <row Id="4078" PostHistoryTypeId="2" PostId="1118" RevisionGUID="3827e325-7b8c-40af-9b7a-70b9bb3b2661" CreationDate="2022-03-24T05:35:44.660" UserId="139" Text="For pallet_proxy: &#xD;&#xA;&gt; A module allowing accounts to give permission to other accounts to dispatch types of calls from their signed origin. The accounts to which permission is delegated may be requied to announce the action that they wish to execute some duration prior to execution happens. In this case, the target account may reject the announcement and in doing so, veto the execution.&#xD;&#xA;&#xD;&#xA;And pallet_membership:&#xD;&#xA;&gt; Allows control of membership of a set of AccountIds, useful for managing membership of of a collective. A prime member may be set.&#xD;&#xA;&#xD;&#xA;I would like more information on the use cases of these pallets. I don't understand what's meant by `&quot;useful for managing membership of of a collective. A prime member may be set.&quot;`. For pallet_proxyI understand that it's basically equivalent to a `stash-controller` relationship, and I was wondering more about the `type` of calls. What is meant by this? Can a user give specific permission regarding which call or calls they want a proxy to dispatch on their behalf? How do these work out in practice? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4080" PostHistoryTypeId="1" PostId="1118" RevisionGUID="3827e325-7b8c-40af-9b7a-70b9bb3b2661" CreationDate="2022-03-24T05:35:44.660" UserId="139" Text="Pallet membership and Pallet Proxy - what are the use cases?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4081" PostHistoryTypeId="3" PostId="1118" RevisionGUID="3827e325-7b8c-40af-9b7a-70b9bb3b2661" CreationDate="2022-03-24T05:35:44.660" UserId="139" Text="|proxy|pallet-proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4083" PostHistoryTypeId="2" PostId="1119" RevisionGUID="133c6e37-b1a7-4256-b55d-ee975e8fb3ba" CreationDate="2022-03-24T05:48:43.983" UserId="227" Text="Are there examples how to set up a call filter in Substrate to allow _only certain calls of a particular pallet_ to be executed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4085" PostHistoryTypeId="1" PostId="1119" RevisionGUID="133c6e37-b1a7-4256-b55d-ee975e8fb3ba" CreationDate="2022-03-24T05:48:43.983" UserId="227" Text="How to set up `BaseCallFilter` to only allow a limited set of calls of one pallet to be executed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4086" PostHistoryTypeId="3" PostId="1119" RevisionGUID="133c6e37-b1a7-4256-b55d-ee975e8fb3ba" CreationDate="2022-03-24T05:48:43.983" UserId="227" Text="|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4087" PostHistoryTypeId="2" PostId="1120" RevisionGUID="c8ab9bc7-f0a9-4efe-b9a6-5d2ba7cf3b50" CreationDate="2022-03-24T05:53:09.253" UserId="283" Text="The overarching `Call` enum has the following structure&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum Call {&#xD;&#xA;    PalletOne(pallet_one::Call),&#xD;&#xA;    PalletTwo(pallet_two::Call),&#xD;&#xA;    // ... and so on&#xD;&#xA;}&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;The implementation of `Contains&lt;Call&gt;` for a call filter can do pattern-matching on the inner values as well. For example,&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl Contains&lt;Call&gt; for SomeFilter {&#xD;&#xA;    fn contains(call: &amp;Call) -&gt; bool {&#xD;&#xA;        match *call {&#xD;&#xA;            Call::PalletOne(pallet_one::Call::CallA(_)) =&gt; true,&#xD;&#xA;            _ =&gt; false,&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4089" PostHistoryTypeId="2" PostId="1121" RevisionGUID="6215e5aa-cc0a-49ca-86c8-39bfd56f8308" CreationDate="2022-03-24T05:58:10.487" UserId="283" Text="In practice, what `pallet_membership` does is allows you to create &quot;collectives&quot; of accounts, specify the types of actions the collective can take, and with what threshold. For instance, this is used in Polkadot and Kusama governance via the Council and Technical Committee bodies - in both cases the membership, abilities, and method of selection of members are different, but they use the same underlying mechanism to dispatch calls.&#xD;&#xA;&#xD;&#xA;`pallet_proxy` gives users the ability to configure accounts which can issue transactions on behalf of another account. They can configure time delays for each proxy and set restrictions on the types of transactions that each proxy can issue. `pallet_proxy` also enables users to create &quot;anonymous proxies&quot; (which is a terrible name). Anonymous proxies are accounts that have no private key and can only act via one of their configured proxies." ContentLicense="CC BY-SA 4.0" />
  <row Id="4091" PostHistoryTypeId="2" PostId="1122" RevisionGUID="adc6da1a-a970-4c89-826d-df9523bb97aa" CreationDate="2022-03-24T06:33:14.933" UserId="213" Text="I want to implement zk-SNARKs based anonymous voting. Are there examples or packages available for substrate? Where can I get started. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4093" PostHistoryTypeId="1" PostId="1122" RevisionGUID="adc6da1a-a970-4c89-826d-df9523bb97aa" CreationDate="2022-03-24T06:33:14.933" UserId="213" Text="zk SNARKs based anonymous voting" ContentLicense="CC BY-SA 4.0" />
  <row Id="4094" PostHistoryTypeId="3" PostId="1122" RevisionGUID="adc6da1a-a970-4c89-826d-df9523bb97aa" CreationDate="2022-03-24T06:33:14.933" UserId="213" Text="|cryptography|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4095" PostHistoryTypeId="2" PostId="1123" RevisionGUID="28ca2e4d-b2ee-4938-ab4c-d7174e98cf62" CreationDate="2022-03-24T06:49:16.077" UserId="227" Text="The answers already in here are super good. I want to add that for a lot of people &quot;learning by doing&quot; is a great way of getting into a new framework.&#xD;&#xA;&#xD;&#xA;A lot of repositories related to Substrate (Substrate itself, but also parachain projects) have issues in their GitHub repositories tagged as &quot;Good First Issue&quot; or &quot;Mentor available&quot;. These can serve as a good starting point for getting your hands on something and have somebody review your code.&#xD;&#xA;&#xD;&#xA;For example in Substrate:&#xD;&#xA;&gt;https://github.com/paritytech/substrate/labels/Z1-mentor&#xD;&#xA;&gt;&#xD;&#xA;&gt;An easy task where a mentor is available. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4097" PostHistoryTypeId="10" PostId="1076" RevisionGUID="bf359885-0861-4c3e-97e3-70d297778169" CreationDate="2022-03-24T07:02:44.247" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:85,&quot;DisplayName&quot;:&quot;Squirrel&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:1806,&quot;DisplayName&quot;:&quot;Rtsne42&quot;}]}" />
  <row Id="4103" PostHistoryTypeId="2" PostId="1125" RevisionGUID="bceefa9e-615f-4d59-a54f-0f09b06d3f8f" CreationDate="2022-03-24T07:55:19.267" UserId="32" Text="[Proxies](https://wiki.polkadot.network/docs/learn-proxies) can be setup to sign specific or all (**any**) transactions on behalf of an account. You could say that the account is *proxied*, if it has a *proxy*.&#xD;&#xA;&#xD;&#xA;There is a provision to create a keyless account which can be fully functional only when there is at least one proxy with **any** permissions to sign transactions on its behalf. This account (without a private key) is a *proxied* account. It is also not anonymous, as it is assigned a public key and can be traced on the blockchain. &#xD;&#xA;&#xD;&#xA;Hence it is neither *Anonymous* nor a *proxy*. Then why is it called an Anonymous Proxy? Isn't &quot;Transferable Keyless Account&quot; more appropriate, given its use case?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/issues/7735&#xD;&#xA;&#xD;&#xA;https://github.com/w3f/polkadot-wiki/issues/1458" ContentLicense="CC BY-SA 4.0" />
  <row Id="4105" PostHistoryTypeId="1" PostId="1125" RevisionGUID="bceefa9e-615f-4d59-a54f-0f09b06d3f8f" CreationDate="2022-03-24T07:55:19.267" UserId="32" Text="Why is it called Anonymous Proxy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4106" PostHistoryTypeId="3" PostId="1125" RevisionGUID="bceefa9e-615f-4d59-a54f-0f09b06d3f8f" CreationDate="2022-03-24T07:55:19.267" UserId="32" Text="|account|proxy|signing|pallet-proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4107" PostHistoryTypeId="2" PostId="1126" RevisionGUID="21bb265a-4755-4aaa-a654-82e18bf9dbe4" CreationDate="2022-03-24T07:55:48.047" UserId="85" Text="I know that https://manta.network uses ZK for their solution, so you could see how they have gone about things: https://github.com/Manta-Network/manta-signer. They did a [sub0 talk][1].&#xD;&#xA;&#xD;&#xA;I am a beginner in this space, but [plonky2][2] might be fast enough in wasm if it switches to using portable simd (and that allows wasm simd to happen). &#xD;&#xA;&#xD;&#xA;For ZK specific stuff, https://crypto.stackexchange.com/ is also a good place to ask questions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.youtube.com/watch?v=Ayelscjnx2E&#xD;&#xA;  [2]: https://github.com/mir-protocol/plonky2" ContentLicense="CC BY-SA 4.0" />
  <row Id="4109" PostHistoryTypeId="2" PostId="1127" RevisionGUID="3e91f387-85dc-4b99-a5d6-b8734b6c4e28" CreationDate="2022-03-24T08:03:07.137" UserId="85" Text="Here's an example of how we were using a `BaseCallFilter` in the `statemint` parachain to filter out calls that we did not want enabled yet:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/cumulus/blob/2fe7a2edba05155c6a5f0f3527e1001aad7aee2e/polkadot-parachains/statemint/src/lib.rs#L126" ContentLicense="CC BY-SA 4.0" />
  <row Id="4111" PostHistoryTypeId="5" PostId="1125" RevisionGUID="5dbb3ea8-3209-4e18-ad50-dcbcb986a7ca" CreationDate="2022-03-24T08:27:45.827" UserId="32" Comment="added 1 character in body" Text="[Proxies](https://wiki.polkadot.network/docs/learn-proxies) can be setup to sign specific or all (**any**) transactions on behalf of an account. You could say that the account is *proxied*, if it has a *proxy*.&#xD;&#xA;&#xD;&#xA;There is a provision to create a keyless account which can be fully functional only when there is at least one proxy with **any** permissions to sign transactions on its behalf. This account (without a private key) is a *proxied* account. It is also not anonymous, as it is assigned a public key and can be traced on the blockchain. &#xD;&#xA;&#xD;&#xA;Hence, it is neither *Anonymous* nor a *proxy*. Then why is it called an Anonymous Proxy? Isn't &quot;Transferable Keyless Account&quot; more appropriate, given its use case?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/issues/7735&#xD;&#xA;&#xD;&#xA;https://github.com/w3f/polkadot-wiki/issues/1458" ContentLicense="CC BY-SA 4.0" />
  <row Id="4112" PostHistoryTypeId="2" PostId="1128" RevisionGUID="a17d34d4-ea26-4b29-9a66-1378ec6e0ff6" CreationDate="2022-03-24T08:30:27.957" UserId="85" Text="Working remotely, I use podcasts to energise and get me hyped about the incredible possibilities and potential that we could build with substrate and web3.&#xD;&#xA;&#xD;&#xA;What inspiring podcasts are you listening to right now?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4114" PostHistoryTypeId="1" PostId="1128" RevisionGUID="a17d34d4-ea26-4b29-9a66-1378ec6e0ff6" CreationDate="2022-03-24T08:30:27.957" UserId="85" Text="As a substrate dev, what are the most exciting podcasts you're listening to right now?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4115" PostHistoryTypeId="3" PostId="1128" RevisionGUID="a17d34d4-ea26-4b29-9a66-1378ec6e0ff6" CreationDate="2022-03-24T08:30:27.957" UserId="85" Text="|untagged|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4116" PostHistoryTypeId="10" PostId="805" RevisionGUID="b2563fbb-fe5e-41a8-8f4f-36ccea58b692" CreationDate="2022-03-24T08:38:43.440" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:368,&quot;DisplayName&quot;:&quot;smm&quot;}]}" />
  <row Id="4117" PostHistoryTypeId="6" PostId="1128" RevisionGUID="2f9d2be9-89cb-4125-98e1-c114aa35b2c5" CreationDate="2022-03-24T08:39:37.243" UserId="85" Comment="edited tags" Text="|untagged|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4118" PostHistoryTypeId="2" PostId="1129" RevisionGUID="8d375a4a-79de-491c-b464-ef74768a0a6e" CreationDate="2022-03-24T08:41:10.167" UserId="609" Text="I can recommend the https://relaychain.fm/ podcast from Parity themselves.&#xD;&#xA;It teaches a lot about the ecosystem and involved projects." ContentLicense="CC BY-SA 4.0" />
  <row Id="4120" PostHistoryTypeId="5" PostId="1096" RevisionGUID="7242ea9c-63e6-4e70-b8e1-a03bc18c9762" CreationDate="2022-03-24T08:44:33.497" UserId="368" Comment="add quote and link to source" Text="So reading the [validators docs][1]:&#xD;&#xA;&#xD;&#xA;&gt; If a validator was unresponsive or found to have committed a slashable offense within two eras, the validator will be removed from the active set in a process known as involuntary chilling.&#xD;&#xA;&#xD;&#xA;It is unclear to myself if 'within two era's' means consecutive. What greater time frame must I avoid offences for to get a clean rap sheet?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-how-to-chill#involuntary-chills" ContentLicense="CC BY-SA 4.0" />
  <row Id="4121" PostHistoryTypeId="24" PostId="1096" RevisionGUID="7242ea9c-63e6-4e70-b8e1-a03bc18c9762" CreationDate="2022-03-24T08:44:33.497" Comment="Proposed by 368 approved by 340 edit id of 104" ContentLicense="CC BY-SA 4.0" />
  <row Id="4122" PostHistoryTypeId="6" PostId="1108" RevisionGUID="4beacd24-0988-4ece-95ed-c2184aca38b6" CreationDate="2022-03-24T08:46:42.467" UserId="85" Comment="added the addition of a tag." Text="|pallet|offchain-worker|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4124" PostHistoryTypeId="2" PostId="1130" RevisionGUID="b343cbbd-70be-40de-b1be-4c9f44b81403" CreationDate="2022-03-24T08:57:28.113" UserId="429" Text="I can see we have the option to get the values by using their keys one by one using **get()**, but is there any way to get all the pairs together wrapped in an **iterator** so that we don't need to hit the **get()** multiple times? " ContentLicense="CC BY-SA 4.0" />
  <row Id="4126" PostHistoryTypeId="1" PostId="1130" RevisionGUID="b343cbbd-70be-40de-b1be-4c9f44b81403" CreationDate="2022-03-24T08:57:28.113" UserId="429" Text="Is there any way to get all the key/value pairs together from **sc_client_db::offchain::LocalStorage**?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4127" PostHistoryTypeId="3" PostId="1130" RevisionGUID="b343cbbd-70be-40de-b1be-4c9f44b81403" CreationDate="2022-03-24T08:57:28.113" UserId="429" Text="|offchain|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4128" PostHistoryTypeId="2" PostId="1131" RevisionGUID="2b852b5e-4463-4313-9caa-75e40f2507f7" CreationDate="2022-03-24T09:00:53.527" UserId="340" Text="Where should I start and what advice can you give to help me get started with this task.&#xD;&#xA;&#xD;&#xA;I guess my goal is to build a network monitoring tool that can check the health, uptime and reputation of the nodes in the network on per chain basis.&#xD;&#xA;&#xD;&#xA;I also want to use this list to build out my bootstrap list dynamically as the network grows, publishing this to DNS/IPFS/other so that our implementation can consume this list." ContentLicense="CC BY-SA 4.0" />
  <row Id="4130" PostHistoryTypeId="1" PostId="1131" RevisionGUID="2b852b5e-4463-4313-9caa-75e40f2507f7" CreationDate="2022-03-24T09:00:53.527" UserId="340" Text="How-to extract a list of all nodes in blockchain X network and test they are connectable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4131" PostHistoryTypeId="3" PostId="1131" RevisionGUID="2b852b5e-4463-4313-9caa-75e40f2507f7" CreationDate="2022-03-24T09:00:53.527" UserId="340" Text="|nodes|networking|monitoring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4132" PostHistoryTypeId="2" PostId="1132" RevisionGUID="fb382ace-8298-4731-95c8-edada5ec6269" CreationDate="2022-03-24T09:08:36.873" UserId="32" Text="According to the Wiki article - https://wiki.polkadot.network/docs/learn-nominator#oversubscribed-validators only the top 256 nominators of an oversubscribed validator receive rewards. It also mentions that this number can be changed via governance. What is the rationale for it to be 256? Why can't every nominator be rewarded? In case of a slashing event, will only top 256 nominators be slashed or every nominator subscribed to the validator gets slashed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4134" PostHistoryTypeId="1" PostId="1132" RevisionGUID="fb382ace-8298-4731-95c8-edada5ec6269" CreationDate="2022-03-24T09:08:36.873" UserId="32" Text="Why only top 256 nominators are rewarded for an oversubscribed validator on Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4135" PostHistoryTypeId="3" PostId="1132" RevisionGUID="fb382ace-8298-4731-95c8-edada5ec6269" CreationDate="2022-03-24T09:08:36.873" UserId="32" Text="|polkadot|kusama|staking|validator|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4136" PostHistoryTypeId="2" PostId="1133" RevisionGUID="209fd4a7-0550-493f-8696-a9aa31997ece" CreationDate="2022-03-24T09:09:02.007" UserId="1789" Text="after importing pallet_vesting, one of the pre-built pallets, I would like to use the following functions from that pallet_vesting source code:&#xD;&#xA;&#xD;&#xA;      fn add_vesting_schedule(&#xD;&#xA;        who: &amp;T::AccountId,&#xD;&#xA;        locked: BalanceOf&lt;T&gt;,&#xD;&#xA;        per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;        starting_block: T::BlockNumber,&#xD;&#xA;      ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;    pub fn vested_transfer(&#xD;&#xA;      origin: OriginFor&lt;T&gt;,&#xD;&#xA;      target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;      schedule: VestingInfo&lt;BalanceOf&lt;T&gt;, T::BlockNumber&gt;,&#xD;&#xA;    ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;I have figured out those types:&#xD;&#xA;&#xD;&#xA;`OriginFor&lt;T&gt;` for origin type&#xD;&#xA;&#xD;&#xA;`BlockNumberFor&lt;T&gt;`, for starting_block `T::BlockNumber` type&#xD;&#xA;&#xD;&#xA;`BalanceOf&lt;T&gt;` for locked type and per_block type&#xD;&#xA;&#xD;&#xA;      type BalanceOf&lt;T&gt; =&#xD;&#xA;        &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;But I cannot get target type!&#xD;&#xA;&#xD;&#xA;further digging into the source code, I got this:&#xD;&#xA;&#xD;&#xA;    use sp_runtime::traits::{StaticLookup, Zero};&#xD;&#xA;    ...&#xD;&#xA;      impl&lt;T: Config&gt; Lookup for ChainContext&lt;T&gt; {&#xD;&#xA;        type Source = &lt;T::Lookup as StaticLookup&gt;::Source;&#xD;&#xA;        type Target = &lt;T::Lookup as StaticLookup&gt;::Target;&#xD;&#xA;        ...&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;but how to import the target type?&#xD;&#xA;&#xD;&#xA;I cannot even import `sp_runtime`! in the following code, I got this error: &quot;failed to resolve: use of undeclared crate or module `sp_runtime`&quot;!&#xD;&#xA;&#xD;&#xA;    pub use sp_runtime;&#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;      use sp_runtime::traits::{StaticLookup, Zero};&#xD;&#xA;    }&#xD;&#xA;Please help. Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="4138" PostHistoryTypeId="1" PostId="1133" RevisionGUID="209fd4a7-0550-493f-8696-a9aa31997ece" CreationDate="2022-03-24T09:09:02.007" UserId="1789" Text="How to get target type from pallet_vesting?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4139" PostHistoryTypeId="3" PostId="1133" RevisionGUID="209fd4a7-0550-493f-8696-a9aa31997ece" CreationDate="2022-03-24T09:09:02.007" UserId="1789" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4142" PostHistoryTypeId="10" PostId="1074" RevisionGUID="d9a35cc1-33dd-4270-88a2-f08d82da4634" CreationDate="2022-03-24T09:22:46.677" UserId="-1" Comment="105" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:1806,&quot;DisplayName&quot;:&quot;Rtsne42&quot;},{&quot;Id&quot;:368,&quot;DisplayName&quot;:&quot;smm&quot;},{&quot;Id&quot;:359,&quot;DisplayName&quot;:&quot;Bryan Chen&quot;}]}" />
  <row Id="4145" PostHistoryTypeId="2" PostId="1134" RevisionGUID="77cf4e5c-fcb3-45dc-b9f2-2382c278818e" CreationDate="2022-03-24T09:32:07.387" UserId="1862" Text="in February i was got true status with verify identity procedure.&#xD;&#xA;&#xD;&#xA;Now end of March but reserved amount ( ~ 20 DOT ) still locked.&#xD;&#xA;&#xD;&#xA;Could tell me please how I can unlock it?&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="4147" PostHistoryTypeId="1" PostId="1134" RevisionGUID="77cf4e5c-fcb3-45dc-b9f2-2382c278818e" CreationDate="2022-03-24T09:32:07.387" UserId="1862" Text="How i can get back reserved amount for verify identity procedure?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4148" PostHistoryTypeId="3" PostId="1134" RevisionGUID="77cf4e5c-fcb3-45dc-b9f2-2382c278818e" CreationDate="2022-03-24T09:32:07.387" UserId="1862" Text="|polkadot|identify|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4149" PostHistoryTypeId="2" PostId="1135" RevisionGUID="d9947331-d295-43ca-80f7-e6ea4efb2cc6" CreationDate="2022-03-24T09:34:32.593" UserId="16" Text="The `Other` error usually signals that the wasm code uploaded was rejected. There are various reasons for it but the most common is that it uses some function from the `pallet-contracts` that is not available in your node version. Another common error is that the contract code is just too big. That usually happens when the `--release` flag isn't supplied to `cargo contract`. &#xD;&#xA;&#xD;&#xA;Bar any further information the most plausible explanation is that your node is out of date. In newer versions of the node `Other` is replaced by the more descriptive `CodeRejected` error.&#xD;&#xA;&#xD;&#xA;You should:&#xD;&#xA;* Update to the newest [`substrate-contracts-node`](https://github.com/paritytech/substrate-contracts-node)&#xD;&#xA;* Check your contract size whether it above the limit defined [here](https://github.com/paritytech/substrate/blob/56c28e858b2c3d7a6649988bdf3f48fd2eeb6fc5/frame/contracts/src/schedule.rs#L516)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4151" PostHistoryTypeId="5" PostId="1091" RevisionGUID="12817a42-ebf6-4086-ab0f-dc321e50ea8e" CreationDate="2022-03-24T09:39:26.443" UserId="16" Comment="It didn't explain what was meant by &quot;standard mapping&quot;" Text="I came across the `ink_storage::Mapping` data structure. The official doc seems to explain how to use it but not why it's needed. It seems more complicated to initialize and work with than the maps defined by Rust's standard library." ContentLicense="CC BY-SA 4.0" />
  <row Id="4152" PostHistoryTypeId="4" PostId="1091" RevisionGUID="12817a42-ebf6-4086-ab0f-dc321e50ea8e" CreationDate="2022-03-24T09:39:26.443" UserId="16" Comment="It didn't explain what was meant by &quot;standard mapping&quot;" Text="What's the need for ink_storage::Mapping instead of the maps defined by Rust's standard library?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4153" PostHistoryTypeId="2" PostId="1136" RevisionGUID="e2ae0739-22ed-422d-b553-54317042db99" CreationDate="2022-03-24T09:42:32.413" UserId="32" Text="The DOTs are reserved for having an on-chain identity and you can get them back when you clear the identity info https://wiki.polkadot.network/docs/learn-identity#clearing-and-killing-an-identity&#xD;&#xA;&#xD;&#xA;To get your account identity verified, you would have used the registrar service which is availed with a fee (not a deposit) https://wiki.polkadot.network/docs/learn-identity#current-registrars" ContentLicense="CC BY-SA 4.0" />
  <row Id="4155" PostHistoryTypeId="4" PostId="1130" RevisionGUID="7e7dc269-b2a3-4ee5-a7ac-12635d7a1dbf" CreationDate="2022-03-24T09:45:08.813" UserId="429" Comment="edited title" Text="Is there any way to get all the key/value pairs together from sc_client_db::offchain::LocalStorage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4156" PostHistoryTypeId="2" PostId="1137" RevisionGUID="800be5d8-3c70-4f41-93e0-8abf086d68d3" CreationDate="2022-03-24T09:50:07.193" UserId="627" Text="This is purely a Mac M1 issue... and had me scratching my head quite a bit when I ran into it...&#xD;&#xA;&#xD;&#xA;So delving through the Google archives, it seems that `wasm-pack` and friends don't quite like the Apple clang. To resolve this issue after reading through https://github.com/rust-bitcoin/rust-secp256k1/issues/283 -&#xD;&#xA;&#xD;&#xA; 1. Install llvm via homebrew, `brew install llvm`&#xD;&#xA; 2. Add the LLVM to your path `PATH=&quot;/opt/homebrew/opt/llvm/bin:$PATH&quot;` (could be in your profile, .zshrc or equivalent)&#xD;&#xA; 3. Ensure you have the `AR` and `CLANG` environment vars exported, `CC=/opt/homebrew/opt/llvm/bin/clang` &amp; `AR=/opt/homebrew/opt/llvm/bin/llvm-ar`&#xD;&#xA; 4. Run your command and hope for the best...&#xD;&#xA;&#xD;&#xA;In my case, I actually added another start target specifically for this, i.e. I didn't want to mess around with my environment, so basically changed my build command to &#xD;&#xA;&#xD;&#xA;`PATH=&quot;/opt/homebrew/opt/llvm/bin:$PATH&quot; CC=/opt/homebrew/opt/llvm/bin/clang AR=/opt/homebrew/opt/llvm/bin/llvm-ar &lt;command goes here&gt;` &#xD;&#xA;&#xD;&#xA;Slightly messy, but works for me locally and on CI now - https://github.com/polkadot-js/wasm/pull/318/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R20" ContentLicense="CC BY-SA 4.0" />
  <row Id="4158" PostHistoryTypeId="2" PostId="1138" RevisionGUID="b6ec1f5b-e63b-4652-bf37-6c1313c6cdd1" CreationDate="2022-03-24T09:52:53.483" UserId="620" Text="Adding to what Bryan said, you can just call the RPC `system.health`. The response `isSyncing` will be `false` if the node is in sync. No need for an OCW.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/icKIy.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4160" PostHistoryTypeId="2" PostId="1139" RevisionGUID="dab9e29e-234f-4e05-852d-9b62a316ea9f" CreationDate="2022-03-24T09:54:14.993" UserId="16" Text="The `sp_core` crate includes some C dependencies. `secp256k1` is one of them. When this crate is compiled in the context of substrate for use inside the runtime those dependencies are not included because they are guarded behind the `full-crypto` and `std` feature.&#xD;&#xA;&#xD;&#xA;However, when compiling for the web you usually enable `std` and maybe even `full-crypto` which then requires your toolchain to compile C code to wasm.&#xD;&#xA;&#xD;&#xA;From your pathes I can deduce that you are compiling on a Mac. &#xD;&#xA;The LLVM fork of Apple that is used by default does not include a wasm backend. Note that this is not a problem when compiling Rust because it brings its own version of LLVM via Rustup.&#xD;&#xA;&#xD;&#xA;What you need to do is install the vanilla version of LLVM (you could do that via [brew][1]) and instruct your build to use that `CC=/usr/local/opt/llvm/bin/clang`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://brew.sh/" ContentLicense="CC BY-SA 4.0" />
  <row Id="4162" PostHistoryTypeId="5" PostId="1137" RevisionGUID="e82f7f04-85aa-4d57-82a9-060d46263fe3" CreationDate="2022-03-24T09:59:28.917" UserId="627" Comment="deleted 3 characters in body" Text="This is purely a Mac issue... and had me scratching my head quite a bit when I ran into it...&#xD;&#xA;&#xD;&#xA;So delving through the Google archives, it seems that `wasm-pack` and friends don't quite like the Apple clang. To resolve this issue after reading through https://github.com/rust-bitcoin/rust-secp256k1/issues/283 -&#xD;&#xA;&#xD;&#xA; 1. Install llvm via homebrew, `brew install llvm`&#xD;&#xA; 2. Add the LLVM to your path `PATH=&quot;/opt/homebrew/opt/llvm/bin:$PATH&quot;` (could be in your profile, .zshrc or equivalent)&#xD;&#xA; 3. Ensure you have the `AR` and `CLANG` environment vars exported, `CC=/opt/homebrew/opt/llvm/bin/clang` &amp; `AR=/opt/homebrew/opt/llvm/bin/llvm-ar`&#xD;&#xA; 4. Run your command and hope for the best...&#xD;&#xA;&#xD;&#xA;In my case, I actually added another build target specifically for this that adds all the env variables, i.e. I didn't want to mess around with my global environment, so basically changed my build command to &#xD;&#xA;&#xD;&#xA;`PATH=&quot;/opt/homebrew/opt/llvm/bin:$PATH&quot; CC=/opt/homebrew/opt/llvm/bin/clang AR=/opt/homebrew/opt/llvm/bin/llvm-ar &lt;command goes here&gt;` &#xD;&#xA;&#xD;&#xA;Slightly messy, but works for me locally and on CI now - https://github.com/polkadot-js/wasm/pull/318/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R20" ContentLicense="CC BY-SA 4.0" />
  <row Id="4163" PostHistoryTypeId="5" PostId="1061" RevisionGUID="c5b7f879-73a3-454c-9c07-dcf3caee955b" CreationDate="2022-03-24T10:03:34.797" UserId="165" Comment="changing wasm for runtime, is not wrong refering it as wasm, but just more accurate to call it runtime when in substrate context" Text="&#xD;&#xA;What is the proper way of executing a runtime upgrade on a parachain ?&#xD;&#xA;&#xD;&#xA;Which RPC method to call?&#xD;&#xA;&#xD;&#xA;Should this be applied to collator or rpc-node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4164" PostHistoryTypeId="4" PostId="1061" RevisionGUID="c5b7f879-73a3-454c-9c07-dcf3caee955b" CreationDate="2022-03-24T10:03:34.797" UserId="165" Comment="changing wasm for runtime, is not wrong refering it as wasm, but just more accurate to call it runtime when in substrate context" Text="Runtime Upgrades on parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="4165" PostHistoryTypeId="6" PostId="1061" RevisionGUID="c5b7f879-73a3-454c-9c07-dcf3caee955b" CreationDate="2022-03-24T10:03:34.797" UserId="165" Comment="changing wasm for runtime, is not wrong refering it as wasm, but just more accurate to call it runtime when in substrate context" Text="|parachain|runtime-upgrade|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4166" PostHistoryTypeId="24" PostId="1061" RevisionGUID="c5b7f879-73a3-454c-9c07-dcf3caee955b" CreationDate="2022-03-24T10:03:34.797" Comment="Proposed by 165 approved by 29, 16 edit id of 102" ContentLicense="CC BY-SA 4.0" />
  <row Id="4167" PostHistoryTypeId="5" PostId="1061" RevisionGUID="40f4f45e-907f-4bf6-9005-c085e6d6b3db" CreationDate="2022-03-24T10:06:08.790" UserId="29" Comment="added 1 character in body; edited title" Text="I would like to upgrade my parachain.&#xD;&#xA;&#xD;&#xA;What is the proper way of executing a runtime upgrade on a parachain?&#xD;&#xA;&#xD;&#xA;Which RPC method to call?&#xD;&#xA;&#xD;&#xA;Should this be applied to collators or rpc-nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4168" PostHistoryTypeId="4" PostId="1061" RevisionGUID="40f4f45e-907f-4bf6-9005-c085e6d6b3db" CreationDate="2022-03-24T10:06:08.790" UserId="29" Comment="added 1 character in body; edited title" Text="What is the proper way of executing a runtime upgrade on a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4170" PostHistoryTypeId="10" PostId="803" RevisionGUID="9f046cf3-a314-4f15-8306-79d94a9e91fb" CreationDate="2022-03-24T10:13:44.627" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:368,&quot;DisplayName&quot;:&quot;smm&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:16,&quot;DisplayName&quot;:&quot;Alexander Theißen&quot;}]}" />
  <row Id="4171" PostHistoryTypeId="10" PostId="1068" RevisionGUID="3b13bfb8-d5f1-43a2-9262-66afc139e461" CreationDate="2022-03-24T10:14:15.550" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:368,&quot;DisplayName&quot;:&quot;smm&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:1806,&quot;DisplayName&quot;:&quot;Rtsne42&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:16,&quot;DisplayName&quot;:&quot;Alexander Theißen&quot;}]}" />
  <row Id="4172" PostHistoryTypeId="2" PostId="1140" RevisionGUID="ce185ac1-137e-4d28-b02d-827ac33a56db" CreationDate="2022-03-24T10:17:11.047" UserId="285" Text="If I add a new field to a struct that is not stored in storage but used as a parameter to an extrinsic, will it break decoding if a node with the changed runtime is syncing (i.e. executing older blocks where the struct didn't have the extra field? Does it matter where/how I add the extra field? &#xD;&#xA;example: &#xD;&#xA;```&#xD;&#xA;struct exampleStruct {&#xD;&#xA;  a: u32,&#xD;&#xA;  b: u32&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Example 1 - new field added at the begining&#xD;&#xA;struct exampleStruct {&#xD;&#xA;  newField: u32&#xD;&#xA;  a: u32,&#xD;&#xA;  b: u32&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Example 2 - new field added at the end&#xD;&#xA;struct exampleStruct {&#xD;&#xA;  a: u32,&#xD;&#xA;  b: u32,&#xD;&#xA;  newField: u32&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I saw this old discussion here: https://github.com/paritytech/substrate/issues/1221 but not sure how it works for structs.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="4174" PostHistoryTypeId="1" PostId="1140" RevisionGUID="ce185ac1-137e-4d28-b02d-827ac33a56db" CreationDate="2022-03-24T10:17:11.047" UserId="285" Text="Backward compatible changes in the runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="4175" PostHistoryTypeId="3" PostId="1140" RevisionGUID="ce185ac1-137e-4d28-b02d-827ac33a56db" CreationDate="2022-03-24T10:17:11.047" UserId="285" Text="|runtime-upgrade|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4176" PostHistoryTypeId="6" PostId="1071" RevisionGUID="c7243144-33b0-49a1-8001-bb234a12829d" CreationDate="2022-03-24T10:22:06.977" UserId="116" Comment="removed rust tag" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4177" PostHistoryTypeId="24" PostId="1071" RevisionGUID="c7243144-33b0-49a1-8001-bb234a12829d" CreationDate="2022-03-24T10:22:06.977" Comment="Proposed by 116 approved by 16, 165 edit id of 103" ContentLicense="CC BY-SA 4.0" />
  <row Id="4179" PostHistoryTypeId="2" PostId="1141" RevisionGUID="85f11b45-8d1f-4df3-ae83-4741313c6181" CreationDate="2022-03-24T10:37:10.960" UserId="180" Text="I want to store String value, some topics are using Vec&lt;u8&gt;, but I encounted this error: `error[E0599]: no function or associated item named 'max_encoded_len' found for struct 'Vec&lt;u8&gt;' in the current scope`&#xD;&#xA;&#xD;&#xA;My code:&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;        #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    	#[scale_info(skip_type_params(T))]&#xD;&#xA;    	#[codec(mel_bound())]&#xD;&#xA;    	pub struct BizAmount&lt;T: Config&gt; {&#xD;&#xA;    		pub amount: u32,&#xD;&#xA;    		pub price: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;    		pub organization: Organization,&#xD;&#xA;    		pub owner: AccountOf&lt;T&gt;,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    	#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;    	pub struct Organization {&#xD;&#xA;    		pub name: Vec&lt;u8&gt;,&#xD;&#xA;    		pub code: Vec&lt;u8&gt;,&#xD;&#xA;    	}&#xD;&#xA;	    #[pallet::pallet]&#xD;&#xA;	    #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	    pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;I searched on google and not found any stuffs. Thank for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="4181" PostHistoryTypeId="1" PostId="1141" RevisionGUID="85f11b45-8d1f-4df3-ae83-4741313c6181" CreationDate="2022-03-24T10:37:10.960" UserId="180" Text="Store String in Subtrate by using Vec&lt;u8&gt;:" ContentLicense="CC BY-SA 4.0" />
  <row Id="4182" PostHistoryTypeId="3" PostId="1141" RevisionGUID="85f11b45-8d1f-4df3-ae83-4741313c6181" CreationDate="2022-03-24T10:37:10.960" UserId="180" Text="|substrate-node|string|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4183" PostHistoryTypeId="5" PostId="1133" RevisionGUID="4fcbc19f-ffb7-4378-8476-581099b5954a" CreationDate="2022-03-24T10:41:29.413" UserId="1789" Comment="deleted 94 characters in body" Text="after importing pallet_vesting, one of the pre-built pallets, I would like to use the following functions from that pallet_vesting source code:&#xD;&#xA;&#xD;&#xA;      fn add_vesting_schedule(&#xD;&#xA;        who: &amp;T::AccountId,&#xD;&#xA;        locked: BalanceOf&lt;T&gt;,&#xD;&#xA;        per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;        starting_block: T::BlockNumber,&#xD;&#xA;      ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;    pub fn vested_transfer(&#xD;&#xA;      origin: OriginFor&lt;T&gt;,&#xD;&#xA;      target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;      schedule: VestingInfo&lt;BalanceOf&lt;T&gt;, T::BlockNumber&gt;,&#xD;&#xA;    ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;I have figured out those types:&#xD;&#xA;&#xD;&#xA;`OriginFor&lt;T&gt;` for origin type&#xD;&#xA;&#xD;&#xA;`BlockNumberFor&lt;T&gt;`, for starting_block `T::BlockNumber` type&#xD;&#xA;&#xD;&#xA;`BalanceOf&lt;T&gt;` for locked type and per_block type&#xD;&#xA;&#xD;&#xA;      type BalanceOf&lt;T&gt; =&#xD;&#xA;        &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;But I cannot get target type!&#xD;&#xA;&#xD;&#xA;further digging into the source code, I got this:&#xD;&#xA;&#xD;&#xA;    use sp_runtime::traits::{StaticLookup, Zero};&#xD;&#xA;    ...&#xD;&#xA;      impl&lt;T: Config&gt; Lookup for ChainContext&lt;T&gt; {&#xD;&#xA;        type Source = &lt;T::Lookup as StaticLookup&gt;::Source;&#xD;&#xA;        type Target = &lt;T::Lookup as StaticLookup&gt;::Target;&#xD;&#xA;        ...&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;but how to import the target type?&#xD;&#xA;&#xD;&#xA;I have imported `sp_runtime`&#xD;&#xA;&#xD;&#xA;    use frame_support::{&#xD;&#xA;    	pallet_prelude::*,&#xD;&#xA;    	sp_runtime::traits::{Hash, StaticLookup, Zero},&#xD;&#xA;    	traits::{Currency, LockableCurrency, ReservableCurrency},&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;Please help. Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="4184" PostHistoryTypeId="2" PostId="1142" RevisionGUID="3c445e4c-2098-447a-b8fc-d037b06de636" CreationDate="2022-03-24T10:41:57.480" UserId="16" Text="You are trying to derive `MaxEncodedLen` for your `Organization`. This trait can only be implemented for types that have a maximum size defined at compile time. `Vec&lt;u8&gt;` does not have a fixed length because it can grow indefinitely at runtime.&#xD;&#xA;&#xD;&#xA;The solution is to come up with a size limit (probably configured through your `Config` trait) and then use [`BoundedVec`](https://paritytech.github.io/substrate/master/frame_support/storage/bounded_vec/struct.BoundedVec.html) instead of `Vec`." ContentLicense="CC BY-SA 4.0" />
  <row Id="4189" PostHistoryTypeId="2" PostId="1144" RevisionGUID="67f300d8-0711-4805-a8aa-7ea6a015fe9a" CreationDate="2022-03-24T10:48:50.517" UserId="16" Text="I am just assuming that you are looking for some syntax to mention the associated types of a type that implements `StaticLookup`. Should work like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type SourceOf&lt;T&gt; = &lt;T::Lookup as StaticLookup&gt;::Source;&#xD;&#xA;type TargetOf&lt;T&gt; = &lt;T::Lookup as StaticLookup&gt;::Target; &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4191" PostHistoryTypeId="5" PostId="1133" RevisionGUID="050cc3e0-31fa-42c4-8bfd-f1e2fd7ebfee" CreationDate="2022-03-24T10:53:07.857" UserId="1789" Comment="added 328 characters in body" Text="after importing pallet_vesting, one of the pre-built pallets, I have imported `sp_runtime`&#xD;&#xA;&#xD;&#xA;    use frame_support::{&#xD;&#xA;    	pallet_prelude::*,&#xD;&#xA;    	sp_runtime::traits::{Hash, StaticLookup, Zero},&#xD;&#xA;    	traits::{Currency, LockableCurrency, ReservableCurrency},&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would like to use the following functions from that pallet_vesting source code:&#xD;&#xA;&#xD;&#xA;      fn add_vesting_schedule(&#xD;&#xA;        who: &amp;T::AccountId,&#xD;&#xA;        locked: BalanceOf&lt;T&gt;,&#xD;&#xA;        per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;        starting_block: T::BlockNumber,&#xD;&#xA;      ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;    pub fn vested_transfer(&#xD;&#xA;      origin: OriginFor&lt;T&gt;,&#xD;&#xA;      target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;      schedule: VestingInfo&lt;BalanceOf&lt;T&gt;, T::BlockNumber&gt;,&#xD;&#xA;    ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;I have figured out those types:&#xD;&#xA;&#xD;&#xA;`OriginFor&lt;T&gt;` for origin type&#xD;&#xA;&#xD;&#xA;`BlockNumberFor&lt;T&gt;`, for starting_block `T::BlockNumber` type&#xD;&#xA;&#xD;&#xA; `T::AccountId`, for my target or destination arguments&#xD;&#xA;&#xD;&#xA;`BalanceOf&lt;T&gt;` for locked type and per_block type&#xD;&#xA;&#xD;&#xA;      type BalanceOf&lt;T&gt; =&#xD;&#xA;        &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;But that target type is not compatible with the vested_transfer() function's target type! See the error message below:&#xD;&#xA;type annotations needed&#xD;&#xA;cannot satisfy `_: pallet_vesting::Config`rustcE0283&#xD;&#xA;lib.rs(281, 10): required by a bound in `pallet_vesting::Pallet::&lt;T&gt;::vested_transfer`&#xD;&#xA;&#xD;&#xA;how can I import the correct target type?&#xD;&#xA;&#xD;&#xA;further digging into the source code, I got this:&#xD;&#xA;&#xD;&#xA;    use sp_runtime::traits::{StaticLookup, Zero};&#xD;&#xA;    ...&#xD;&#xA;      impl&lt;T: Config&gt; Lookup for ChainContext&lt;T&gt; {&#xD;&#xA;        type Source = &lt;T::Lookup as StaticLookup&gt;::Source;&#xD;&#xA;        type Target = &lt;T::Lookup as StaticLookup&gt;::Target;&#xD;&#xA;        ...&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please help. Thank you!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4193" PostHistoryTypeId="5" PostId="1133" RevisionGUID="da1f7b60-8b4b-484f-a076-62cdc2547614" CreationDate="2022-03-24T11:02:36.113" UserId="1789" Comment="added 2 characters in body" Text="after importing pallet_vesting, one of the pre-built pallets, I have imported `sp_runtime`&#xD;&#xA;&#xD;&#xA;    use frame_support::{&#xD;&#xA;    	pallet_prelude::*,&#xD;&#xA;    	sp_runtime::traits::{Hash, StaticLookup, Zero},&#xD;&#xA;    	traits::{Currency, LockableCurrency, ReservableCurrency},&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would like to use the following functions from that pallet_vesting source code:&#xD;&#xA;&#xD;&#xA;      fn add_vesting_schedule(&#xD;&#xA;        who: &amp;T::AccountId,&#xD;&#xA;        locked: BalanceOf&lt;T&gt;,&#xD;&#xA;        per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;        starting_block: T::BlockNumber,&#xD;&#xA;      ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;    pub fn vested_transfer(&#xD;&#xA;      origin: OriginFor&lt;T&gt;,&#xD;&#xA;      target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;      schedule: VestingInfo&lt;BalanceOf&lt;T&gt;, T::BlockNumber&gt;,&#xD;&#xA;    ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;I have figured out those types:&#xD;&#xA;&#xD;&#xA;`OriginFor&lt;T&gt;` for origin type&#xD;&#xA;&#xD;&#xA;`BlockNumberFor&lt;T&gt;`, for starting_block `T::BlockNumber` type&#xD;&#xA;&#xD;&#xA; `T::AccountId`, for my target or destination arguments&#xD;&#xA;&#xD;&#xA;`BalanceOf&lt;T&gt;` for locked type and per_block type&#xD;&#xA;&#xD;&#xA;      type BalanceOf&lt;T&gt; =&#xD;&#xA;        &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;But that target type is not compatible with the vested_transfer() function's target type! See the error message below:&#xD;&#xA;&#xD;&#xA;type annotations needed&#xD;&#xA;cannot satisfy `_: pallet_vesting::Config`rustcE0283&#xD;&#xA;lib.rs(281, 10): required by a bound in `pallet_vesting::Pallet::&lt;T&gt;::vested_transfer`&#xD;&#xA;&#xD;&#xA;how can I import the correct target type?&#xD;&#xA;&#xD;&#xA;further digging into the source code, I got this:&#xD;&#xA;&#xD;&#xA;    use sp_runtime::traits::{StaticLookup, Zero};&#xD;&#xA;    ...&#xD;&#xA;      impl&lt;T: Config&gt; Lookup for ChainContext&lt;T&gt; {&#xD;&#xA;        type Source = &lt;T::Lookup as StaticLookup&gt;::Source;&#xD;&#xA;        type Target = &lt;T::Lookup as StaticLookup&gt;::Target;&#xD;&#xA;        ...&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please help. Thank you!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4194" PostHistoryTypeId="5" PostId="1133" RevisionGUID="fbb616bd-f821-4c71-8487-3403b4fe2f1b" CreationDate="2022-03-24T11:05:53.627" UserId="1789" Comment="added 3 characters in body" Text="after importing pallet_vesting, one of the pre-built pallets, I have imported `sp_runtime`&#xD;&#xA;&#xD;&#xA;    use frame_support::{&#xD;&#xA;    	pallet_prelude::*,&#xD;&#xA;    	sp_runtime::traits::{Hash, StaticLookup, Zero},&#xD;&#xA;    	traits::{Currency, LockableCurrency, ReservableCurrency},&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would like to use the following functions from that pallet_vesting source code:&#xD;&#xA;&#xD;&#xA;      fn add_vesting_schedule(&#xD;&#xA;        who: &amp;T::AccountId,&#xD;&#xA;        locked: BalanceOf&lt;T&gt;,&#xD;&#xA;        per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;        starting_block: T::BlockNumber,&#xD;&#xA;      ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;    pub fn vested_transfer(&#xD;&#xA;      origin: OriginFor&lt;T&gt;,&#xD;&#xA;      target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;      schedule: VestingInfo&lt;BalanceOf&lt;T&gt;, T::BlockNumber&gt;,&#xD;&#xA;    ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;I have figured out those types:&#xD;&#xA;&#xD;&#xA;`OriginFor&lt;T&gt;` for origin type&#xD;&#xA;&#xD;&#xA;`BlockNumberFor&lt;T&gt;`, for starting_block `T::BlockNumber` type&#xD;&#xA;&#xD;&#xA; `T::AccountId`, for my target or destination arguments&#xD;&#xA;&#xD;&#xA;`BalanceOf&lt;T&gt;` for locked type and per_block type&#xD;&#xA;&#xD;&#xA;      type BalanceOf&lt;T&gt; =&#xD;&#xA;        &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;But that `T::AccountId` is not compatible with the vested_transfer() function's target type! See the error message below:&#xD;&#xA;&#xD;&#xA;type annotations needed&#xD;&#xA;cannot satisfy `_: pallet_vesting::Config`rustcE0283&#xD;&#xA;lib.rs(281, 10): required by a bound in `pallet_vesting::Pallet::&lt;T&gt;::vested_transfer`&#xD;&#xA;&#xD;&#xA;how can I import the correct target type?&#xD;&#xA;&#xD;&#xA;further digging into the source code, I got this:&#xD;&#xA;&#xD;&#xA;    use sp_runtime::traits::{StaticLookup, Zero};&#xD;&#xA;    ...&#xD;&#xA;      impl&lt;T: Config&gt; Lookup for ChainContext&lt;T&gt; {&#xD;&#xA;        type Source = &lt;T::Lookup as StaticLookup&gt;::Source;&#xD;&#xA;        type Target = &lt;T::Lookup as StaticLookup&gt;::Target;&#xD;&#xA;        ...&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please help. Thank you!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4195" PostHistoryTypeId="2" PostId="1145" RevisionGUID="de9d1e92-6a29-4aea-ba87-38290fd59692" CreationDate="2022-03-24T11:15:37.123" UserId="140" Text="Rococo is running on 0.9.18 but from Polkadot js UI, it looks like Kusama is still running on 0.9.17.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LipiG.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am preparing for Kusama deployment. Can someone please point me to the right JSON file for Kusama?&#xD;&#xA;&#xD;&#xA;I am using this https://github.com/paritytech/polkadot/blob/v0.9.18/node/service/res/kusama.json&#xD;&#xA;&#xD;&#xA;and getting below error log&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }&#xD;&#xA;2022-03-24 16:43:00 [Relaychain] Our view contains 0xb0a8…dafe but the overseer never told use we should work on this added=0xb0a8…dafe&#xD;&#xA;2022-03-24 16:43:00 [Relaychain] error=RollingSessionWindow(SessionsUnavailable { kind: RuntimeApi(Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }), info: None })&#xD;&#xA;2022-03-24 16:43:00 [Relaychain] error=Sender(Runtime(RuntimeRequest(Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }))) ctx=&quot;on FromOverseer&quot;&#xD;&#xA;2022-03-24 16:43:00 [Relaychain] Failed to fetch runtime API data for job err=Execution { runtime_api_name: &quot;validator_groups&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_validator_groups is not found&quot;))) }&#xD;&#xA;2022-03-24 16:43:00 [Relaychain] job finished with an error job=&quot;bitfield-signing-job&quot; parent_hash=0xb0a8…dafe err=Util(RuntimeApi(Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }))&#xD;&#xA;2022-03-24 16:43:01 [Relaychain]  Discovered new external address for our node: /ip4/223.233.73.39/tcp/30333/ws/p2p/12D3KooWJx2Xi1wQsSQ3rX2hD21zahPij7ZXfi9qL48jDayh5zka    &#xD;&#xA;2022-03-24 16:43:02 [Relaychain] Received msg before first active leaves update. This is not expected - message will be dropped. msg=ActiveDisputes(Sender { complete: false })&#xD;&#xA;2022-03-24 16:43:02 [Relaychain] error=Sender(AskActiveDisputesCanceled) ctx=&quot;on FromOverseer&quot;&#xD;&#xA;2022-03-24 16:43:05 [Relaychain] ⚙️  Syncing, target=#11947262 (24 peers), best: #7354 (0x49f4…d985), finalized #7170 (0xdfce…7dbf), ⬇ 613.7kiB/s ⬆ 44.4kiB/s    &#xD;&#xA;2022-03-24 16:43:05 [Parachain]  Idle (0 peers), best: #0 (0x20d8…b055), finalized #0 (0x20d8…b055), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-03-24 16:43:10 [Relaychain] ⚙️  Syncing 1338.4 bps, target=#11947263 (25 peers), best: #14046 (0xd40d…9a2d), finalized #13824 (0xb224…3695), ⬇ 736.2kiB/s ⬆ 22.8kiB/s    &#xD;&#xA;2022-03-24 16:43:10 [Parachain]  Idle (0 peers), best: #0 (0x20d8…b055), finalized #0 (0x20d8…b055), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-03-24 16:43:15 [Relaychain] ⚙️  Syncing 1798.4 bps, target=#11947264 (25 peers), best: #23040 (0x08df…e908), finalized #22528 (0xd31f…1eb2), ⬇ 557.7kiB/s ⬆ 22.5kiB/s    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However its syncing with Kusama and showing correct block count. Should I ignore above error message?&#xD;&#xA;&#xD;&#xA;I also want to mention that I just integrated my parachain with Rococo successfully with Polkadot 0.9.18. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4197" PostHistoryTypeId="1" PostId="1145" RevisionGUID="de9d1e92-6a29-4aea-ba87-38290fd59692" CreationDate="2022-03-24T11:15:37.123" UserId="140" Text="Is Kusama still running on 0.9.17?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4198" PostHistoryTypeId="3" PostId="1145" RevisionGUID="de9d1e92-6a29-4aea-ba87-38290fd59692" CreationDate="2022-03-24T11:15:37.123" UserId="140" Text="|substrate-node|polkadot|kusama|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4199" PostHistoryTypeId="2" PostId="1146" RevisionGUID="f47e2a97-edd8-4f1e-b399-26131697cfac" CreationDate="2022-03-24T11:27:18.927" UserId="29" Text="Looks like it will be upgraded to 0.9.18 soon:&#xD;&#xA;- https://kusama.polkassembly.io/referendum/183&#xD;&#xA;&#xD;&#xA;Some nodes may have already upgraded the node itself (upper right is node version) but you can see that the runtime is 0.9.17&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/o3n14.png)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4201" PostHistoryTypeId="2" PostId="1147" RevisionGUID="ad6eeac4-4ab6-4017-901a-b0bbe5cb36b5" CreationDate="2022-03-24T11:28:44.303" UserId="340" Text="It would be nice to build a list of tools that are useful to monitor the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="4203" PostHistoryTypeId="1" PostId="1147" RevisionGUID="ad6eeac4-4ab6-4017-901a-b0bbe5cb36b5" CreationDate="2022-03-24T11:28:44.303" UserId="340" Text="what existing polkadot network monitoring tools are out there?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4204" PostHistoryTypeId="3" PostId="1147" RevisionGUID="ad6eeac4-4ab6-4017-901a-b0bbe5cb36b5" CreationDate="2022-03-24T11:28:44.303" UserId="340" Text="|network|monitoring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4205" PostHistoryTypeId="2" PostId="1148" RevisionGUID="468875f9-c904-4c9f-8fa7-65cae6f4796b" CreationDate="2022-03-24T11:45:08.733" UserId="29" Text="Here are the resources that I am aware of:&#xD;&#xA;&#xD;&#xA;- https://wiki.polkadot.network/docs/build-tools-index#network-monitoring--reporting&#xD;&#xA;- https://wiki.polkadot.network/docs/maintain-guides-how-to-monitor-your-node&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/node-metrics&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4207" PostHistoryTypeId="2" PostId="1149" RevisionGUID="37316d08-9bc9-475b-b009-80a2a69ca65b" CreationDate="2022-03-24T11:47:42.820" UserId="165" Text="So, validators are paid proportionally to the amount of era points they have collected. Payments occur at the end of every era.&#xD;&#xA;&#xD;&#xA;- [`end_era`](https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs#L377) triggers the payout for the finished era.&#xD;&#xA;&#xD;&#xA;- [`do_payout_stakers`](https://github.com/paritytech/substrate/blob/7a09b82772b0597cdae224f4b124d660dda9e82b/frame/staking/src/pallet/impls.rs#L94) for checking out how the payment calculation starts so validators get fraction of the era reward that belongs to the validator and which part of the reward goes to its nominators, between other things.&#xD;&#xA;&#xD;&#xA;- [`make_payout`](https://github.com/paritytech/substrate/blob/7a09b82772b0597cdae224f4b124d660dda9e82b/frame/staking/src/pallet/impls.rs#L231) where the payments to stakers are done.&#xD;&#xA;&#xD;&#xA;If you check those methods you will see that the interesting events to follow, and very well pointed out in the linked discussion are&#xD;&#xA;`PayoutStarted` and `Rewarded`&#xD;&#xA;&#xD;&#xA;Now, nominators, as @Purple_Turtle mentions, need to call [`payout_stakers`](https://github.com/paritytech/substrate/blob/7a09b82772b0597cdae224f4b124d660dda9e82b/frame/staking/src/pallet/mod.rs#L1369) so all nominators behind a specific validator get their rewards. This can be called by anyone, and triggers `do_payout_stakers` mentioned above.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4210" PostHistoryTypeId="2" PostId="1150" RevisionGUID="598e8420-44b3-49e1-b695-d120c6fdd5c3" CreationDate="2022-03-24T11:59:23.810" UserId="1866" Text="The runtime itself is stored on-chain. This is what actually executes the extrinsics for block inclusion. This means that all clients run the exact same on-chain code at any single point in time to execute extrinsics.&#xD;&#xA;&#xD;&#xA;Once an upgrade happens, structures can be changed and the new runtime will once again be able to execute those structures. since the spec_version is used inside the signing payload, transactions created before the upgrade become invalid, so cannot be included into blocks anymore." ContentLicense="CC BY-SA 4.0" />
  <row Id="4212" PostHistoryTypeId="2" PostId="1151" RevisionGUID="b7039e7f-5bd1-4b46-b856-ab509e8ec4d5" CreationDate="2022-03-24T12:06:23.930" UserId="1866" Text="42 is the default development prefix. To register an own prefix add it to the global registry - https://github.com/paritytech/ss58-registry.&#xD;&#xA;&#xD;&#xA;Next update your on-chain system.ss58Prefix constant to reflect the above value and then udate the chain-spec (only needed for RPC nodes, most probably only used as a fallback where the on-chain constant is not available)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4214" PostHistoryTypeId="2" PostId="1152" RevisionGUID="c52614d0-f2e6-40db-ba63-649282a8b324" CreationDate="2022-03-24T12:07:19.377" UserId="227" Text="Are there any guiding principles that can be applied to decide whether to use Substrate's `WeakBoundedVec` or `Vec` in a runtime?&#xD;&#xA;&#xD;&#xA;Is it a general rule of thumb to use `WeakBoundedVec` whenever some worst-case upper bound of the vector can be determined or is there something else to consider?&#xD;&#xA;&#xD;&#xA;Are there other advantages of using `WeakBoundedVec` besides the effect of then having defined a maximum length (and thus setting a bound on the number of iterations) for the vector?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4216" PostHistoryTypeId="1" PostId="1152" RevisionGUID="c52614d0-f2e6-40db-ba63-649282a8b324" CreationDate="2022-03-24T12:07:19.377" UserId="227" Text="When to use `WeakBoundedVec` over `Vec`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4217" PostHistoryTypeId="3" PostId="1152" RevisionGUID="c52614d0-f2e6-40db-ba63-649282a8b324" CreationDate="2022-03-24T12:07:19.377" UserId="227" Text="|frame|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4218" PostHistoryTypeId="2" PostId="1153" RevisionGUID="496291fc-3894-4e65-b45f-54f271e06b0e" CreationDate="2022-03-24T12:07:25.523" UserId="1811" Text="We have not had the chance to study ink! sc yet. A basic question I have is the following. In terms of an EVM deployed sc we rely on the parachain offering primitives in the form of precompiled and predeployed sc so then from our sc using these we can access extrinsics functionality from the pallets.&#xD;&#xA;Question: In regards to ink! sc is there something similar or because these are in Rust are set up to communicate &quot;directly&quot; with pallets. &#xD;&#xA;In other words if Pallet XYZ part of a parachain runtime supplies weather information, in an ink! sc do I get instant access as opposed to a solidity sc in the EVM which is fully dependant on whether that parachain offers a primitive pointing to that pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4220" PostHistoryTypeId="1" PostId="1153" RevisionGUID="496291fc-3894-4e65-b45f-54f271e06b0e" CreationDate="2022-03-24T12:07:25.523" UserId="1811" Text="Ink! smart contracts and extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="4221" PostHistoryTypeId="3" PostId="1153" RevisionGUID="496291fc-3894-4e65-b45f-54f271e06b0e" CreationDate="2022-03-24T12:07:25.523" UserId="1811" Text="|pallet|ink|evm|primitive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4224" PostHistoryTypeId="2" PostId="1154" RevisionGUID="2256e2a0-dd69-431d-950e-363650187006" CreationDate="2022-03-24T12:16:30.733" UserId="377" Text="I need to do the transaction from the multiple chains(Eth, Solana, etc) on the substrate How can we manage the accounts with that interoperability of the chain?&#xD;&#xA;Do we have any solution for that Interoperable problem in Substrate?&#xD;&#xA;Please share some ideas if someone has any idea about this." ContentLicense="CC BY-SA 4.0" />
  <row Id="4226" PostHistoryTypeId="1" PostId="1154" RevisionGUID="2256e2a0-dd69-431d-950e-363650187006" CreationDate="2022-03-24T12:16:30.733" UserId="377" Text="How we can manage the accounts with multiple chains on substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4227" PostHistoryTypeId="3" PostId="1154" RevisionGUID="2256e2a0-dd69-431d-950e-363650187006" CreationDate="2022-03-24T12:16:30.733" UserId="377" Text="|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4228" PostHistoryTypeId="2" PostId="1155" RevisionGUID="bd86a870-7a05-46d7-bd0c-65b32abd4331" CreationDate="2022-03-24T12:38:30.307" UserId="380" Text="It's generally bad practice to store a string in a smart contract&#xD;&#xA;&#xD;&#xA;&gt; In general, you should think twice if you really need String. Smart&#xD;&#xA;&gt; contracts usually don't use strings; those are typically used for user&#xD;&#xA;&gt; interactions and should live in your UI and not on the chain.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Minimizing storage usage of your contract is a best practice and you&#xD;&#xA;&gt; should only persist items which you need to derive state transitions&#xD;&#xA;&gt; in your contract.&#xD;&#xA;&gt; &#xD;&#xA;&gt; If you still, for some reason, need to use String, then you should use&#xD;&#xA;&gt; the String from the ink! prelude.&#xD;&#xA;&#xD;&#xA;[Source](https://paritytech.github.io/ink-docs/faq#how-do-i-use-string-in-my-contract)&#xD;&#xA;&#xD;&#xA;It's quite unlikely that your smart contract will need to know the actual value of a string. Therefore, you can simply hash the string on the client side and then store the hash in the contract.&#xD;&#xA;&#xD;&#xA;For example, in TypeScript before calling your contract function:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { blake2AsU8a } from '@polkadot/util-crypto'&#xD;&#xA;const theString = blake2AsU8a(argVal as unknown as string)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then in the contract, store this value as a `Hash` type&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;the_string: Hash&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4231" PostHistoryTypeId="2" PostId="1156" RevisionGUID="cbda72d6-3563-404e-8109-639e8111a55b" CreationDate="2022-03-24T12:48:55.117" UserId="167" Text="Two reasons, the former being more important: &#xD;&#xA;&#xD;&#xA;- It somehow encourages decentralization. One very large validator, despite being very profitable, will have a limited capacity for nominators to join and actually earn rewards. This incentivizes nominators to avoid these bottlenecks. &#xD;&#xA;- Given the above, since Polkadot currently has 300 validators, it can, in principle, support 76k rewardable nominators. Given the current count of nominators (~20k), I think there are stronger arguments to keep this number at 256. Once a high percentage of the 76k is reached, it is reasonable to increse it further.&#xD;&#xA;&#xD;&#xA;Lastly, The `payout_staker` transaction's weight is a function of this. If this number is increased, this payout will be more costly for validators.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4234" PostHistoryTypeId="4" PostId="1115" RevisionGUID="33578c2e-2eca-4b09-87c7-14e15cdd6f81" CreationDate="2022-03-24T13:11:04.237" UserId="32" Comment="The question is generic and does not provide context for the staking rewards or payouts mentioned in the description" Text="How do the Staking Rewards payouts work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4235" PostHistoryTypeId="24" PostId="1115" RevisionGUID="33578c2e-2eca-4b09-87c7-14e15cdd6f81" CreationDate="2022-03-24T13:11:04.237" Comment="Proposed by 32 approved by 94, 165 edit id of 105" ContentLicense="CC BY-SA 4.0" />
  <row Id="4239" PostHistoryTypeId="2" PostId="1157" RevisionGUID="1d6cfd93-3b66-4849-a725-b6f5944d2677" CreationDate="2022-03-24T13:38:43.123" UserId="1869" Text="To **control** another network's account (or in fact any account), what you really need is a wallet - which could be implemented as a portal like Moonbeam &#xD;&#xA; or polkadot.js/apps does it, or as an extension like Metamask - and such a wallet needs to support both networks.&#xD;&#xA;&#xD;&#xA;Of course a wallet in itself doens't help much, if there is no way to transfer your tokens from chain X to a substrate chain. What you need is some kind of a bridge, ideally a trustless one (e.g. the Snowfork bridge that's in developlment to connect to Ethereum), so that the wallet can make requests, over such a bridge, to transfer the tokens to the other network.&#xD;&#xA;&#xD;&#xA;In terms of UX, you could probably find inspiration from how Moonbeam does it - since it's an EVM chain, they use Metamask on a custom network as a wallet (so your tokens are held in an EVM-style address), but thanks to cross-chain transfers, you can send these tokens to some parachains to your substrate address (e.g. to Acala).&#xD;&#xA;&#xD;&#xA;You can think of the Moonbeam parachain as the equivalent of Ethereum network (also EVM based), and the cross-chain messaging, broadly, as the messasges passed over the Snowfork bridge (though the part of the bridge that's on substrate will most likely need to be a parachain itself, so cross-chain messaging will be involved too)." ContentLicense="CC BY-SA 4.0" />
  <row Id="4242" PostHistoryTypeId="2" PostId="1158" RevisionGUID="194dab28-706a-4288-a4c1-d9ae85f21826" CreationDate="2022-03-24T13:59:42.107" UserId="1752" Text="In Ethereum, clients must monitor for the successful progpagation of transactions (each with a nonce) in order to broadcast a new transaction (with a later nonce).&#xD;&#xA;&#xD;&#xA;If, due to low gas or some other reason, the earlier transaction is not sufficiently propagated, the client must issue a replacement transaction with that nonce (and ensure it propagates) before a transaction with a later nonce will be accepted.&#xD;&#xA;&#xD;&#xA;This limits the utility of pre-signed and offline signed transactions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Polkadot has taken some steps towards more flexible transaction validity but must transactions still be ordered primarily by nonce?&#xD;&#xA;&#xD;&#xA;Another way to phrase this question would be: can a later-nonced transaction ever take priority over a lower-nonced, but perhaps faulty or non-existent transaction?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4244" PostHistoryTypeId="1" PostId="1158" RevisionGUID="194dab28-706a-4288-a4c1-d9ae85f21826" CreationDate="2022-03-24T13:59:42.107" UserId="1752" Text="Can nonces be skipped in Polkadot/ Kusama" ContentLicense="CC BY-SA 4.0" />
  <row Id="4245" PostHistoryTypeId="3" PostId="1158" RevisionGUID="194dab28-706a-4288-a4c1-d9ae85f21826" CreationDate="2022-03-24T13:59:42.107" UserId="1752" Text="|polkadot|transactions|nonce|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4246" PostHistoryTypeId="5" PostId="646" RevisionGUID="e0736a77-1559-4ae2-8c46-8833f5808710" CreationDate="2022-03-24T14:05:08.563" UserId="567" Comment="added 21 characters in body" Text="You can have a look at Parity upgradeable example:&#xD;&#xA;https://github.com/paritytech/ink/tree/master/examples/upgradeable-contracts (fixed broken link)&#xD;&#xA;&#xD;&#xA;It follows proxy pattern of OpenZeppelin" ContentLicense="CC BY-SA 4.0" />
  <row Id="4247" PostHistoryTypeId="2" PostId="1159" RevisionGUID="93f2cf07-6dd5-47cb-ad96-3411ec11cd43" CreationDate="2022-03-24T14:12:08.483" UserId="489" Text="i want to construct a customize `call` in `Instruction::Transact`.But i don't know how can i pass parameter `palletId`(https://github.com/VegeBun-csj/Proof-Chain/blob/main/pallets/xclient/src/lib.rs#L79) and `methodId`(https://github.com/VegeBun-csj/Proof-Chain/blob/main/pallets/xclient/src/lib.rs#L80) &#xD;&#xA;&#xD;&#xA;i configure the palletId and methodId in my Config which can be set in Runtime(https://github.com/VegeBun-csj/Proof-Chain/blob/main/runtime/src/lib.rs#L638). But i don't know how to pass parameter to it." ContentLicense="CC BY-SA 4.0" />
  <row Id="4249" PostHistoryTypeId="1" PostId="1159" RevisionGUID="93f2cf07-6dd5-47cb-ad96-3411ec11cd43" CreationDate="2022-03-24T14:12:08.483" UserId="489" Text="how to pass `palletId` and `methodId` when i construct a Instruction::Transact call" ContentLicense="CC BY-SA 4.0" />
  <row Id="4250" PostHistoryTypeId="3" PostId="1159" RevisionGUID="93f2cf07-6dd5-47cb-ad96-3411ec11cd43" CreationDate="2022-03-24T14:12:08.483" UserId="489" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4251" PostHistoryTypeId="2" PostId="1160" RevisionGUID="4d80d01e-728c-47f4-b834-95584a69afd7" CreationDate="2022-03-24T14:16:44.757" UserId="172" Text="I've been writing tests for `pallet-kitties` and have configured the genesis state inside my mock runtime by setting the storage items for two kitties (one Male and one Female) and their owners (with some balance), that way I can use pre-funded accounts and existing kitties in my tests. So, in `mock.rs`, I have:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub(crate) fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;	let mut t = frame_system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap();&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			balances: vec![(1,  10), (2,  10)]&#xD;&#xA;		},&#xD;&#xA;		substrate_kitties: SubstrateKittiesConfig {&#xD;&#xA;			kitties: vec![&#xD;&#xA;				(1, *b&quot;1234567890123456&quot;, Gender::Female),&#xD;&#xA;				(2, *b&quot;123456789012345a&quot;, Gender::Male)&#xD;&#xA;			]&#xD;&#xA;		},&#xD;&#xA;		..Default::default()&#xD;&#xA;	}&#xD;&#xA;		.assimilate_storage(&amp;mut t)&#xD;&#xA;		.unwrap();&#xD;&#xA;&#xD;&#xA;	let mut ext = sp_io::TestExternalities::new(t);&#xD;&#xA;	ext.execute_with(|| System::set_block_number(1));&#xD;&#xA;	ext&#xD;&#xA;}&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;For one of my tests, I need a third, uniquely owned kitty which means I have to add that kitty and a new account in the genesis state of my mock runtime. This doesn't feel like the best approach because I'd be using genesis state for all of my tests &amp;mdash; even those that don't need the third kitty.&#xD;&#xA;&#xD;&#xA;How can I configure genesis so I can specify genesis state as parameters for my tests instead?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4253" PostHistoryTypeId="1" PostId="1160" RevisionGUID="4d80d01e-728c-47f4-b834-95584a69afd7" CreationDate="2022-03-24T14:16:44.757" UserId="172" Text="How can I configure genesis state for my pallet's tests without hardcoding it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4254" PostHistoryTypeId="3" PostId="1160" RevisionGUID="4d80d01e-728c-47f4-b834-95584a69afd7" CreationDate="2022-03-24T14:16:44.757" UserId="172" Text="|testing|unit-tests|genesis|kitties-tutorial|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4255" PostHistoryTypeId="2" PostId="1161" RevisionGUID="f2a8b927-f030-46e3-987d-5b475775a2b9" CreationDate="2022-03-24T14:16:44.757" UserId="172" Text="You can configure the `new_test_ext` function however you like. In this case, you can make it take the parameters you'll want to use to modify your genesis state and then just pass values into your tests directly. And in `mock.rs`, all you need to do is abstract the configuration logic:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub(crate) fn new_test_ext(users: Vec&lt;(u64, [u8; 16], Gender)&gt;) -&gt; sp_io::TestExternalities {&#xD;&#xA;	let mut t = frame_system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap();&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		//&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			balances: users.iter().map(|(user, _, _)| (*user, 10)).collect(),&#xD;&#xA;		},&#xD;&#xA;		substrate_kitties: SubstrateKittiesConfig {&#xD;&#xA;			kitties: users.iter().map(|(user, kitty, gender)| (*user, *kitty, *gender)).collect(),&#xD;&#xA;		},&#xD;&#xA;		..Default::default()&#xD;&#xA;	}&#xD;&#xA;	.assimilate_storage(&amp;mut t)&#xD;&#xA;	.unwrap();&#xD;&#xA;&#xD;&#xA;	let mut ext = sp_io::TestExternalities::new(t);&#xD;&#xA;	ext.execute_with(|| System::set_block_number(1));&#xD;&#xA;	ext&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Then in `tests.rs`, just specify what you want your state to be for the test you're writing. For example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn should_build_genesis_kitties() {&#xD;&#xA;	new_test_ext(vec![&#xD;&#xA;		(1, *b&quot;1234567890123456&quot;, Gender::Female), // &lt;-- pass in genesis configuration for account #1&#xD;&#xA;		(2, *b&quot;123456789012345a&quot;, Gender::Male),   // &lt;-- pass in genesis configuration for account #2&#xD;&#xA;	])&#xD;&#xA;	.execute_with(|| {&#xD;&#xA;		// Check we have 2 kitties, as specified in genesis&#xD;&#xA;		assert_eq!(CountForKitties::&lt;Test&gt;::get(), 2);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4257" PostHistoryTypeId="2" PostId="1162" RevisionGUID="81e214a7-3107-4159-bcde-63e3e1797dfc" CreationDate="2022-03-24T14:20:05.617" UserId="627" Text="For a default Substrate node, Polkadot and Kusama chain using the `CheckNonce` signed extension, the answer is &quot;no&quot;. &#xD;&#xA;&#xD;&#xA;What it actually does is the following -&#xD;&#xA;&#xD;&#xA; 1. If the `tx-nonce &lt; account-nonce`, it rejects the transaction as stale&#xD;&#xA; 2. If the `tx-nonce &gt; account-nonce`, it places a requirement on this tx to only execute _after_ `tx-nonce - 1`&#xD;&#xA;&#xD;&#xA;So basically the way it is implemented is that you can send transactions with nonce 3, 2 and then 1 and the transaction pool ordering will ensure it executes in the order of 1, 2 and finally 3.&#xD;&#xA;&#xD;&#xA;The logic itself for the default `CheckNonce` signed extension can be found here, &#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/dfb2a8cc35244a688e0b052eafb96c6e534ca5a4/frame/system/src/extensions/check_nonce.rs#L96-L123&#xD;&#xA;&#xD;&#xA;you will see the `requires` step that points to the previous transaction to complete first, before this current is executed.&#xD;&#xA;&#xD;&#xA;Any other Substrate-based chain can obviously can add their own requirements and signed extensions with completely different logic and not use the above, this is just the shipped version that gets used in the Kusama and Polkadot deployments.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4259" PostHistoryTypeId="5" PostId="1133" RevisionGUID="7a9c153f-b1fd-4388-87ca-532814aca81d" CreationDate="2022-03-24T14:35:20.997" UserId="1789" Comment="added 25 characters in body" Text="after importing pallet_vesting, one of the pre-built pallets, I have imported `sp_runtime`&#xD;&#xA;&#xD;&#xA;    use frame_support::{&#xD;&#xA;    	pallet_prelude::*,&#xD;&#xA;    	sp_runtime::traits::{Hash, StaticLookup, Zero},&#xD;&#xA;    	traits::{Currency, LockableCurrency, ReservableCurrency},&#xD;&#xA;    };&#xD;&#xA;    use pallet_vesting;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would like to use the following functions from that pallet_vesting source code:&#xD;&#xA;&#xD;&#xA;      fn add_vesting_schedule(&#xD;&#xA;        who: &amp;T::AccountId,&#xD;&#xA;        locked: BalanceOf&lt;T&gt;,&#xD;&#xA;        per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;        starting_block: T::BlockNumber,&#xD;&#xA;      ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;    pub fn vested_transfer(&#xD;&#xA;      origin: OriginFor&lt;T&gt;,&#xD;&#xA;      target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;      schedule: VestingInfo&lt;BalanceOf&lt;T&gt;, T::BlockNumber&gt;,&#xD;&#xA;    ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;I have figured out those types:&#xD;&#xA;&#xD;&#xA;`OriginFor&lt;T&gt;` for origin type&#xD;&#xA;&#xD;&#xA;`BlockNumberFor&lt;T&gt;`, for starting_block `T::BlockNumber` type&#xD;&#xA;&#xD;&#xA; `T::AccountId`, for my target or destination arguments&#xD;&#xA;&#xD;&#xA;`BalanceOf&lt;T&gt;` for locked type and per_block type&#xD;&#xA;&#xD;&#xA;      type BalanceOf&lt;T&gt; =&#xD;&#xA;        &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;But that `T::AccountId` is not compatible with the vested_transfer() function's target type! See the error message below:&#xD;&#xA;&#xD;&#xA;type annotations needed&#xD;&#xA;cannot satisfy `_: pallet_vesting::Config`rustcE0283&#xD;&#xA;lib.rs(281, 10): required by a bound in `pallet_vesting::Pallet::&lt;T&gt;::vested_transfer`&#xD;&#xA;&#xD;&#xA;how can I import the correct target type?&#xD;&#xA;&#xD;&#xA;further digging into the source code, I got this:&#xD;&#xA;&#xD;&#xA;    use sp_runtime::traits::{StaticLookup, Zero};&#xD;&#xA;    ...&#xD;&#xA;      impl&lt;T: Config&gt; Lookup for ChainContext&lt;T&gt; {&#xD;&#xA;        type Source = &lt;T::Lookup as StaticLookup&gt;::Source;&#xD;&#xA;        type Target = &lt;T::Lookup as StaticLookup&gt;::Target;&#xD;&#xA;        ...&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please help. Thank you!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4260" PostHistoryTypeId="2" PostId="1163" RevisionGUID="ff6277ff-77aa-41a5-bda6-461f9481840e" CreationDate="2022-03-24T14:39:37.237" UserId="172" Text="In most runtimes in production, each pallet has a specific index but its not clear what the logic behind ordering them really is. For example, in Polkadot we can see a comment in the `construct_runtime` macro that alludes to a decision made around anticipating future pallets that would need to be within a specific index range. We can also observe that `XcmPallet` has an index of 99:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;		// Parachain Onboarding Pallets. Start indices at 70 to leave room.&#xD;&#xA;		Registrar: paras_registrar::{Pallet, Call, Storage, Event&lt;T&gt;} = 70,&#xD;&#xA;		Slots: slots::{Pallet, Call, Storage, Event&lt;T&gt;} = 71,&#xD;&#xA;		Auctions: auctions::{Pallet, Call, Storage, Event&lt;T&gt;} = 72,&#xD;&#xA;		Crowdloan: crowdloan::{Pallet, Call, Storage, Event&lt;T&gt;} = 73,&#xD;&#xA;&#xD;&#xA;		// Pallet for sending XCM.&#xD;&#xA;		XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event&lt;T&gt;, Origin, Config} = 99,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What's the logic behind Polkadot's choice in pallet indexing? What is the significance of a pallet's index and what do runtime engineers need to consider when numbering the pallets in their chain's runtime ? It would be great to get an answer that could help other parachain developers make the right pallet indexing decisions for their chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="4262" PostHistoryTypeId="1" PostId="1163" RevisionGUID="ff6277ff-77aa-41a5-bda6-461f9481840e" CreationDate="2022-03-24T14:39:37.237" UserId="172" Text="What's the logic behind Polkadot's choice in pallet indexing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4263" PostHistoryTypeId="3" PostId="1163" RevisionGUID="ff6277ff-77aa-41a5-bda6-461f9481840e" CreationDate="2022-03-24T14:39:37.237" UserId="172" Text="|pallet|polkadot|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4264" PostHistoryTypeId="2" PostId="1164" RevisionGUID="838868e9-c2ca-4787-bc06-2fcccfa0ec52" CreationDate="2022-03-24T14:40:12.603" UserId="179" Text="I'm trying to remove a storage item on the relay chain, specifically a `futureCode` entry for a parachain.&#xD;&#xA;&#xD;&#xA;I've seen that there's an extrinsic I can call `system.killStorage(keys)`, however I have some doubts.&#xD;&#xA;&#xD;&#xA; 1. Is this the path forward?&#xD;&#xA;2. How do I found the `keys` to use on `killStorage`? Seems it's `Vec&lt;Bytes&gt; (Vec&lt;Key&gt;)`.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="4266" PostHistoryTypeId="1" PostId="1164" RevisionGUID="838868e9-c2ca-4787-bc06-2fcccfa0ec52" CreationDate="2022-03-24T14:40:12.603" UserId="179" Text="Manually remove storage items using SUDO" ContentLicense="CC BY-SA 4.0" />
  <row Id="4267" PostHistoryTypeId="3" PostId="1164" RevisionGUID="838868e9-c2ca-4787-bc06-2fcccfa0ec52" CreationDate="2022-03-24T14:40:12.603" UserId="179" Text="|storage|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4268" PostHistoryTypeId="2" PostId="1165" RevisionGUID="d176a3a7-3469-4871-93f2-99c958705e94" CreationDate="2022-03-24T14:48:22.343" UserId="627" Text="If you have access to the polkadot-js/apps UI to you chain, you can get the keys listed in the Developer -&gt; Chain state section. Select the entry you want as well as the params and it will also show the key for that entry. Simply copy it and you should be good to go.&#xD;&#xA;&#xD;&#xA;And example for `futureCodeHash(2000)` on Rococo would be `0xcd710b30bd2eab0352ddcc26417aa194cad3324113c312669f1ac3d50722524b63f5a4efb16ffa83d0070000`&#xD;&#xA;&#xD;&#xA;See below -&#xD;&#xA;&#xD;&#xA;[![Storage app with key selection][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NbKBA.png&#xD;&#xA;&#xD;&#xA;Next up you can use this value in the Developer -&gt; Extrinsics section to remove the storage via the `system.killStorage` extrinsic. &#xD;&#xA;&#xD;&#xA;It has been deployed for this type of cleanup by the council on Kusama/Polkadot a couple of times in the past. (Mostly to remove old state that has moved to different locations)&#xD;&#xA;&#xD;&#xA;As a first round, I would always suggest that you test the process against a dev chain first, unless it is something disposable." ContentLicense="CC BY-SA 4.0" />
  <row Id="4270" PostHistoryTypeId="5" PostId="1125" RevisionGUID="1fda7be0-47c0-41a8-9da9-573890db432f" CreationDate="2022-03-24T14:49:47.980" UserId="32" Comment="deleted 75 characters in body" Text="[Proxies](https://wiki.polkadot.network/docs/learn-proxies) can be setup to sign specific or all (**any**) transactions on behalf of an account. You could say that the account is *proxied*, if it has a *proxy*.&#xD;&#xA;&#xD;&#xA;There is a provision to create a keyless account which can be fully functional only when there is at least one proxy with **any** permissions to sign transactions on its behalf. This account (without a private key) is a *proxied* account. It is also not anonymous, as it is assigned a public key and can be traced on the blockchain. &#xD;&#xA;&#xD;&#xA;Hence, it is neither *Anonymous* nor a *proxy*. Then why is it called an Anonymous Proxy?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/issues/7735&#xD;&#xA;&#xD;&#xA;https://github.com/w3f/polkadot-wiki/issues/1458" ContentLicense="CC BY-SA 4.0" />
  <row Id="4271" PostHistoryTypeId="2" PostId="1166" RevisionGUID="bdea2a98-3ee5-476c-9b73-f73a91dead66" CreationDate="2022-03-24T15:07:45.250" UserId="1789" Text="&#xD;&#xA;The source code of this vested_transfer() function from pallet_vesting:&#xD;&#xA;&#xD;&#xA;    #[pallet::call]&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;      //pallet_vesting::pallet::Pallet  ... this line is from Rust-Analyzer&#xD;&#xA;      pub fn vested_transfer(origin: OriginFor&lt;T&gt;, target: StaticLookup&lt;Self = T::Lookup&gt;::Source, schedule: VestingInfo&lt;BalanceOf&lt;T&gt;, T::BlockNumber&gt;) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;in my own pallet:&#xD;&#xA;&#xD;&#xA;    use pallet_vesting;&#xD;&#xA;    ...&#xD;&#xA;    pub fn my_func(..)-&gt; DispatchResultWithPostInfo {&#xD;&#xA;        ...&#xD;&#xA;    	pallet_vesting::Pallet::&lt;T&gt;::vested_transfer(origin, target, schedule)?;&#xD;&#xA;&#xD;&#xA;I am not sure about the T above... what type should I use?&#xD;&#xA;&#xD;&#xA;The error message I got:&#xD;&#xA;&#xD;&#xA;        the function or associated item `vested_transfer` exists for &#xD;&#xA;    struct `pallet_vesting::Pallet&lt;T&gt;`, &#xD;&#xA;    but .. the following trait bounds were not satisfied:&#xD;&#xA;        T: pallet_vesting::Config`&#xD;&#xA;&#xD;&#xA;and I tried the following for the T above... but couldn't get it to work...&#xD;&#xA;&#xD;&#xA;      where T::pallet_vesting::Config&#xD;&#xA;      T: Config + pallet_vesting::Config&#xD;&#xA;      T: pallet_vesting::Config&#xD;&#xA;      T: Config&#xD;&#xA;&#xD;&#xA;but got this error message: associated type bindings are not allowed here&#xD;&#xA;associated type not allowed here&#xD;&#xA;&#xD;&#xA;Please help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="4273" PostHistoryTypeId="1" PostId="1166" RevisionGUID="bdea2a98-3ee5-476c-9b73-f73a91dead66" CreationDate="2022-03-24T15:07:45.250" UserId="1789" Text="How to call an imported pallet function from my custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="4274" PostHistoryTypeId="3" PostId="1166" RevisionGUID="bdea2a98-3ee5-476c-9b73-f73a91dead66" CreationDate="2022-03-24T15:07:45.250" UserId="1789" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4275" PostHistoryTypeId="2" PostId="1167" RevisionGUID="34a6e99b-a1f1-4bad-ad8e-a31c8f7a5c3d" CreationDate="2022-03-24T15:37:56.537" UserId="1861" Text="`T: Config + pallet_vesting::Config` should be correct. I'll redact this answer once more information is available." ContentLicense="CC BY-SA 4.0" />
  <row Id="4277" PostHistoryTypeId="5" PostId="1166" RevisionGUID="04c7237f-1674-49b3-a059-a63247336f72" CreationDate="2022-03-24T15:52:27.930" UserId="1789" Comment="added 145 characters in body" Text="&#xD;&#xA;The source code of this vest() function from pallet_vesting:&#xD;&#xA;&#xD;&#xA;    #[pallet::call]&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;      //pallet_vesting::pallet::Pallet  ... this line is from Rust-Analyzer&#xD;&#xA;      		pub fn vest(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			Self::do_vest(who)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;in my own pallet:&#xD;&#xA;&#xD;&#xA;    use pallet_vesting;&#xD;&#xA;    ...&#xD;&#xA;		pub fn vest(origin: OriginFor&lt;T&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			pallet_vesting::Pallet::&lt;T&gt;::vest(origin);&#xD;&#xA;			Ok(().into())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;I am not sure about the T above... what type should I use?&#xD;&#xA;&#xD;&#xA;The error message I got:&#xD;&#xA;&#xD;&#xA;        the function or associated item `vest` exists for &#xD;&#xA;    struct `pallet_vesting::Pallet&lt;T&gt;`, &#xD;&#xA;    but .. the following trait bounds were not satisfied:&#xD;&#xA;        T: pallet_vesting::Config`&#xD;&#xA;&#xD;&#xA;Then I replaced the T above, so the function now is...&#xD;&#xA;&#xD;&#xA;    pallet_vesting::Pallet::&lt;T: Config + pallet_vesting::Config&gt;::vest(origin);&#xD;&#xA;&#xD;&#xA;Then I got two errors:&#xD;&#xA;&#xD;&#xA;    error[E0658]: associated type bounds are unstable&#xD;&#xA;    error[E0229]: associated type bindings are not allowed here&#xD;&#xA;&#xD;&#xA;and I tried the following for the T above... but couldn't get it to work...&#xD;&#xA;&#xD;&#xA;      where T::pallet_vesting::Config&#xD;&#xA;      T: pallet_vesting::Config&#xD;&#xA;      T: Config&#xD;&#xA;&#xD;&#xA;Please help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="4278" PostHistoryTypeId="2" PostId="1168" RevisionGUID="ed21f3b5-fc84-4e14-a94e-7dd81742697a" CreationDate="2022-03-24T15:53:45.230" UserId="481" Text="Piggybacking on @jsdw answer:&#xD;&#xA;&#xD;&#xA;**In table storage, I would like to add two varchar columns corresponding to the section and method of Substrate events. How do I decode these two out of the raw storage key?**&#xD;&#xA; &#xD;&#xA;Storage Keys are transparent ([this blog post by Shawn explains this][1] well, and most of it still applies today even if substrate has changed). Therefore each storage key is made up of something like hash(module)+hash(method). The easiest way I have found to reverse this is to create a lookup-table using the metadata and attach each hash to it's corresponding module/method. Since hashes are fixed-length you would be able to separate out the parts from the indexed storage key in SQL and figure out the location based on this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; **For every Substrate event that is in storage table, I need to additionally store its numeric index. Can this information be taken from the on-chain data?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; @jsdw has a good answer for this; event index should be able to be grokked from it's combination with metadata&#xD;&#xA;&#xD;&#xA;**For every extrinsic, I would like to additionally store its section and method.&#xD;&#xA;    For every extrinsic, I would like to store the success flag: whether the transaction was successful or not.&#xD;&#xA;    For every extrinsic, I would like to store the signed flag: whether the transaction was signed or not.**&#xD;&#xA;&#xD;&#xA;All this extrinsic data should all be stored in the `JSONB` field of the `extrinsics` table in SQL (it has already been decoded with desub), which can be directly queried. You can tell a transaction is 'signed' because it will have an additional 'signature' field in this JSON. No signature means not signed&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate/transparent-keys-in-substrate/" ContentLicense="CC BY-SA 4.0" />
  <row Id="4280" PostHistoryTypeId="2" PostId="1169" RevisionGUID="655bf172-45c1-4bdd-b423-5326c38ef018" CreationDate="2022-03-24T15:53:59.717" UserId="620" Text="There is a bit of nuance in those docs, which _slashable offense_ but not _slashed._ When a slash is actually applied, a validator is forceably chilled.&#xD;&#xA;&#xD;&#xA;For example, being offline will only result in a slash if more than 10% of the set is offline in the same session, so it's possible to be offline for one session and not get slashed. Basically, &quot;shit happens&quot; and was probably just a machine being offline for an hour.&#xD;&#xA;&#xD;&#xA;But, if the validator is offline for a session in two consecutive eras, there is probably something faulty with the setup that should be addressed. The network chills the validator to prevent a slash from taking place.&#xD;&#xA;&#xD;&#xA;Note: The docs actually mention two consecutive _spans_, and I'm not sure if span equals _era_.&#xD;&#xA;&#xD;&#xA;More info here: https://research.web3.foundation/en/latest/polkadot/slashing/npos.html&#xD;&#xA;&#xD;&#xA;And the code on this is: https://github.com/paritytech/substrate/blob/master/frame/staking/src/slashing.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="4282" PostHistoryTypeId="5" PostId="1133" RevisionGUID="d17f8e5e-cba9-4a55-a54f-206084988c54" CreationDate="2022-03-24T16:04:16.203" UserId="1789" Comment="added 79 characters in body" Text="after importing pallet_vesting, one of the pre-built pallets https://docs.substrate.io/rustdocs/latest/pallet_vesting/pallet/enum.Call.html&#xD;&#xA;&#xD;&#xA;I have imported `sp_runtime`&#xD;&#xA;&#xD;&#xA;    use frame_support::{&#xD;&#xA;    	pallet_prelude::*,&#xD;&#xA;    	sp_runtime::traits::{Hash, StaticLookup, Zero},&#xD;&#xA;    	traits::{Currency, LockableCurrency, ReservableCurrency},&#xD;&#xA;    };&#xD;&#xA;    use pallet_vesting;&#xD;&#xA;&#xD;&#xA;I would like to use the following functions from that pallet_vesting source code:&#xD;&#xA;&#xD;&#xA;      fn add_vesting_schedule(&#xD;&#xA;        who: &amp;T::AccountId,&#xD;&#xA;        locked: BalanceOf&lt;T&gt;,&#xD;&#xA;        per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;        starting_block: T::BlockNumber,&#xD;&#xA;      ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;    pub fn vested_transfer(&#xD;&#xA;      origin: OriginFor&lt;T&gt;,&#xD;&#xA;      target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;      schedule: VestingInfo&lt;BalanceOf&lt;T&gt;, T::BlockNumber&gt;,&#xD;&#xA;    ) -&gt; DispatchResult {...}&#xD;&#xA;&#xD;&#xA;I have figured out those types:&#xD;&#xA;&#xD;&#xA;`OriginFor&lt;T&gt;` for origin type&#xD;&#xA;&#xD;&#xA;`BlockNumberFor&lt;T&gt;`, for starting_block `T::BlockNumber` type&#xD;&#xA;&#xD;&#xA; `T::AccountId`, for my target or destination arguments&#xD;&#xA;&#xD;&#xA;`BalanceOf&lt;T&gt;` for locked type and per_block type&#xD;&#xA;&#xD;&#xA;      type BalanceOf&lt;T&gt; =&#xD;&#xA;        &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;But that `T::AccountId` is not compatible with the vested_transfer() function's target type! See the error message below:&#xD;&#xA;&#xD;&#xA;type annotations needed&#xD;&#xA;cannot satisfy `_: pallet_vesting::Config`rustcE0283&#xD;&#xA;lib.rs(281, 10): required by a bound in `pallet_vesting::Pallet::&lt;T&gt;::vested_transfer`&#xD;&#xA;&#xD;&#xA;how can I import the correct target type?&#xD;&#xA;&#xD;&#xA;further digging into the source code, I got this:&#xD;&#xA;&#xD;&#xA;    use sp_runtime::traits::{StaticLookup, Zero};&#xD;&#xA;    ...&#xD;&#xA;      impl&lt;T: Config&gt; Lookup for ChainContext&lt;T&gt; {&#xD;&#xA;        type Source = &lt;T::Lookup as StaticLookup&gt;::Source;&#xD;&#xA;        type Target = &lt;T::Lookup as StaticLookup&gt;::Target;&#xD;&#xA;        ...&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please help. Thank you!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4283" PostHistoryTypeId="5" PostId="1166" RevisionGUID="c5cd1318-a0c7-4e21-8e38-20c558a41f25" CreationDate="2022-03-24T16:05:17.393" UserId="1789" Comment="added 80 characters in body" Text="&#xD;&#xA;The source code of this vest() function from pallet_vesting https://docs.substrate.io/rustdocs/latest/pallet_vesting/pallet/enum.Call.html :&#xD;&#xA;&#xD;&#xA;    #[pallet::call]&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;      //pallet_vesting::pallet::Pallet  ... this line is from Rust-Analyzer&#xD;&#xA;      		pub fn vest(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			Self::do_vest(who)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;in my own pallet:&#xD;&#xA;&#xD;&#xA;    use pallet_vesting;&#xD;&#xA;    ...&#xD;&#xA;		pub fn vest(origin: OriginFor&lt;T&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			pallet_vesting::Pallet::&lt;T&gt;::vest(origin);&#xD;&#xA;			Ok(().into())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;I am not sure about the T above... what type should I use?&#xD;&#xA;&#xD;&#xA;The error message I got:&#xD;&#xA;&#xD;&#xA;        the function or associated item `vest` exists for &#xD;&#xA;    struct `pallet_vesting::Pallet&lt;T&gt;`, &#xD;&#xA;    but .. the following trait bounds were not satisfied:&#xD;&#xA;        T: pallet_vesting::Config`&#xD;&#xA;&#xD;&#xA;Then I replaced the T above, so the function now is...&#xD;&#xA;&#xD;&#xA;    pallet_vesting::Pallet::&lt;T: Config + pallet_vesting::Config&gt;::vest(origin);&#xD;&#xA;&#xD;&#xA;Then I got two errors:&#xD;&#xA;&#xD;&#xA;    error[E0658]: associated type bounds are unstable&#xD;&#xA;    error[E0229]: associated type bindings are not allowed here&#xD;&#xA;&#xD;&#xA;and I tried the following for the T above... but couldn't get it to work...&#xD;&#xA;&#xD;&#xA;      where T::pallet_vesting::Config&#xD;&#xA;      T: pallet_vesting::Config&#xD;&#xA;      T: Config&#xD;&#xA;&#xD;&#xA;Please help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="4288" PostHistoryTypeId="2" PostId="1171" RevisionGUID="e2fc98cc-b6f9-4b15-8749-e19599747d2e" CreationDate="2022-03-24T16:14:15.207" UserId="642" Text="As illustrated in Polkadot.js.org staking page which is added below, users who staked more than &quot;min nominated&quot; will receive rewards. minNominated is a dynamic value. I found the code in Polkadot js app [link][1] but does not help a lot. could someone please let me know find the formula to calculate the minNominated?&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/blob/cb60c73daa1febb6ccc78fdf82759ded359e4f0d/packages/page-staking/src/useSortedTargets.ts#L105&#xD;&#xA;  [2]: https://i.stack.imgur.com/tUdoE.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4290" PostHistoryTypeId="1" PostId="1171" RevisionGUID="e2fc98cc-b6f9-4b15-8749-e19599747d2e" CreationDate="2022-03-24T16:14:15.207" UserId="642" Text="what is the formula to calculate minNominated dynamic value in Polkadot staking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4291" PostHistoryTypeId="3" PostId="1171" RevisionGUID="e2fc98cc-b6f9-4b15-8749-e19599747d2e" CreationDate="2022-03-24T16:14:15.207" UserId="642" Text="|polkadot|polkadot-js|staking|minnominated|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4293" PostHistoryTypeId="5" PostId="1152" RevisionGUID="828dacb9-c699-4f08-83e3-c26425e0338b" CreationDate="2022-03-24T16:31:58.497" UserId="227" Comment="added 91 characters in body; edited title" Text="Are there any guiding principles that can be applied to decide whether to use Substrate's `BoundedVec`, `WeakBoundedVec`, or `Vec` in a runtime?&#xD;&#xA;&#xD;&#xA;Is it a general rule of thumb to use the bounded variant whenever some worst-case upper bound of the vector can be determined or is there something else to consider?&#xD;&#xA;&#xD;&#xA;Are there other advantages of using the bounded variant besides the effect of then having defined a maximum length (and thus setting a bound on the number of iterations) for the vector?&#xD;&#xA;&#xD;&#xA;And what's the idea when to use `BoundedVec` vs. `WeakBoundedVec`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4294" PostHistoryTypeId="4" PostId="1152" RevisionGUID="828dacb9-c699-4f08-83e3-c26425e0338b" CreationDate="2022-03-24T16:31:58.497" UserId="227" Comment="added 91 characters in body; edited title" Text="When to use `BoundedVec` vs. `WeakBoundedVec` vs. `Vec`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4295" PostHistoryTypeId="2" PostId="1172" RevisionGUID="4d09e911-1cff-41f8-8431-f02110580da2" CreationDate="2022-03-24T16:32:16.610" UserId="32" Text="Min active nominated value is not based on a formula. The [bags-list](https://paritytech.github.io/substrate/master/pallet_bags_list/) implementation basically sorts the nominators who submitted their nomination intent and takes a snapshot of the top 22,500 nominators and submits it for NPoS election. The min nominated value you see in the screenshot is the minimum stake among the active nominators for that era.&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-nominator#required-minimum-stake" ContentLicense="CC BY-SA 4.0" />
  <row Id="4297" PostHistoryTypeId="2" PostId="1173" RevisionGUID="9851630f-79c0-4d81-8598-4e2ce8bcad85" CreationDate="2022-03-24T16:48:23.993" UserId="227" Text="You currently have two options for writing upgradeable smart contracts in ink!. For both of them we have example contracts. They differ in the following key characteristics.&#xD;&#xA;&#xD;&#xA;The [`forward-calls`](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contracts/forward-calls) example implements a classic forward-pattern:&#xD;&#xA;&#xD;&#xA;* The contract forwards any call that does not match a selector of itself to another contract.&#xD;&#xA;* The other contract needs to be deployed on-chain.&#xD;&#xA;* State is stored in the storage of the contract to which calls are forwarded.&#xD;&#xA;&#xD;&#xA;The [`delegate-calls`](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contracts/delegate-calls) example on the other hand utilizes an API similar to Ethereum's `delegatecall` function:&#xD;&#xA;&#xD;&#xA;* The contract executes any call that does not match a selector of itself with the code of another contract.&#xD;&#xA;* The other contract does not need to be deployed on-chain.&#xD;&#xA;* State is stored in the storage of the originally called contract.&#xD;&#xA;&#xD;&#xA;Future versions of [OpenBrush](https://github.com/Supercolony-net/openbrush-contracts) (a library similar to OpenZeppelin, but for ink!) will contain support for the diamond pattern, another way of building upgradeable contracts." ContentLicense="CC BY-SA 4.0" />
  <row Id="4299" PostHistoryTypeId="2" PostId="1174" RevisionGUID="11f95a6e-8d87-49d9-adee-f983274492ce" CreationDate="2022-03-24T17:29:05.710" UserId="1878" Text="I've heard that it is a bad idea to use Rust's String type in an ink! smart contract.&#xD;&#xA;&#xD;&#xA;Why is this so? And what is your recommendation to use instead for typical use cases of String ‒ so parsing input data, storing textual descriptions of things, etc.?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4301" PostHistoryTypeId="1" PostId="1174" RevisionGUID="11f95a6e-8d87-49d9-adee-f983274492ce" CreationDate="2022-03-24T17:29:05.710" UserId="1878" Text="Why is it a bad idea to use String in an ink! smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4302" PostHistoryTypeId="3" PostId="1174" RevisionGUID="11f95a6e-8d87-49d9-adee-f983274492ce" CreationDate="2022-03-24T17:29:05.710" UserId="1878" Text="|rust|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4303" PostHistoryTypeId="2" PostId="1175" RevisionGUID="27efb739-5148-48a9-b30a-ecfefa0b329c" CreationDate="2022-03-24T17:35:31.390" UserId="85" Text="Generally with smart contracts you can construct them such that rather than using an unbounded and potentially very costly in gas string, one can store the hash of that string which is a fixed size no matter how long the original string is. The gas costs that way are fixed and more predictable leading to a better user experience." ContentLicense="CC BY-SA 4.0" />
  <row Id="4305" PostHistoryTypeId="2" PostId="1176" RevisionGUID="fe7f77c7-3e69-4597-9c38-afa57f30ea55" CreationDate="2022-03-24T17:44:53.793" UserId="28" Text="Please don't use `WeakBoundedVec` ever, unless you are migrating code which you plan to fix in the future.&#xD;&#xA;&#xD;&#xA;Instead use directly `BoundedVec` which ensures that any item placed in storage as a maximum upper bound.&#xD;&#xA;&#xD;&#xA;`WeakBoundedVec` was an unfortunate necessity to migrate some existing logic to use `BoundedVec` logic, but where we could not return an error if the `Vec` was too large.&#xD;&#xA;&#xD;&#xA;As you know (currently), FRAME does not allow you to return an error after modifying storage. As such, there was some code that was programmed in the past that was made to be infallible, but after the introduction of `BoundedVec`s, was no longer infallible.&#xD;&#xA;&#xD;&#xA;When approaching this problem, we could either try to refactor everything, or we could introduce the `WeakBoundedVec`, and we chose the latter.&#xD;&#xA;&#xD;&#xA;`Vec` is okay to use in the runtime, but never to put into storage, since it is unbounded by definition." ContentLicense="CC BY-SA 4.0" />
  <row Id="4307" PostHistoryTypeId="2" PostId="1177" RevisionGUID="76ffc8f9-16f5-412e-b63e-c0067a22ab53" CreationDate="2022-03-24T18:02:32.733" UserId="501" Text="I manage to find my issue: It has nothing to do with substrate. But I'll explain how I got the error: `[Parachain] Could not decode the head data. error=Error`.&#xD;&#xA;&#xD;&#xA;My *add parachain* javascript script that create/send the sudo transaction `parasSudoWrapper.sudoScheduleParaInitialize(para_id, {&quot;genesisHead&quot;: [...], &quot;genesis&quot;: [...], &quot;parachain&quot;: true})` had an issue.&#xD;&#xA;&#xD;&#xA;&quot;genesisHead&quot; and &quot;genesis&quot; **should start with 0x**... but went reading files in javascript by default **it would remove the leading &quot;0&quot;** of the file (containing the hex data), using utf-8 encoding solved it.&#xD;&#xA;&#xD;&#xA;So the transaction looked like:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  genesisHead: x000000000000...&#xD;&#xA;  validationCode: x52bc537646db8...&#xD;&#xA;  parachain: true&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;But should be (look at the **0x**):&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  genesisHead: 0x000000000000...&#xD;&#xA;  validationCode: 0x52bc537646db8...&#xD;&#xA;  parachain: true&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Anyway, still I don't understand that the transaction was still processed even if the format was nonsense with missing the leading 0 in the hex values...probably some javascript magic." ContentLicense="CC BY-SA 4.0" />
  <row Id="4310" PostHistoryTypeId="5" PostId="1142" RevisionGUID="d64b0472-1d76-4e54-895c-e151dfcb72de" CreationDate="2022-03-24T18:18:21.897" UserId="16" Comment="added 760 characters in body" Text="You are trying to derive `MaxEncodedLen` for your `Organization`. This trait can only be implemented for types that have a maximum size defined at compile time. `Vec&lt;u8&gt;` does not have a fixed length because it can grow indefinitely at runtime.&#xD;&#xA;&#xD;&#xA;The solution is to come up with a size limit (probably configured through your `Config` trait) and then use [`BoundedVec`](https://paritytech.github.io/substrate/master/frame_support/storage/bounded_vec/struct.BoundedVec.html) instead of `Vec`.&#xD;&#xA;&#xD;&#xA;An example of that can be observed in the [uniques pallet](https://github.com/paritytech/substrate/blob/f6679ddd31f68e9f1578064d58a246130c27026b/frame/uniques/src/lib.rs):&#xD;&#xA;```rust&#xD;&#xA;trait Config {&#xD;&#xA;	type KeyLimit: Get&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn set_attribute&lt;T: Config&gt;(&#xD;&#xA;	key: BoundedVec&lt;u8, T::KeyLimit&gt;,&#xD;&#xA;	value: BoundedVec&lt;u8, T::ValueLimit&gt;,&#xD;&#xA;) -&gt; DispatchResult {}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`BoundedVec` behaves like a `Vec` except that it takes a second type argument that defines the maximum size it can have. This argument needs to implement [`Get&lt;u32&gt;`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Get.html). `BoundedVec` will enforce this limit automatically and returns an `Err` when pushing new elements to it in case the limit is violated." ContentLicense="CC BY-SA 4.0" />
  <row Id="4311" PostHistoryTypeId="2" PostId="1178" RevisionGUID="a10d69f3-4557-4cca-a267-bede8a8f3413" CreationDate="2022-03-24T18:24:40.097" UserId="1880" Text="What is the purpose of using wasmi in Substrate/Polkadot? &#xD;&#xA;&#xD;&#xA;Would it also be possible to use the wasmer project instead?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4313" PostHistoryTypeId="1" PostId="1178" RevisionGUID="a10d69f3-4557-4cca-a267-bede8a8f3413" CreationDate="2022-03-24T18:24:40.097" UserId="1880" Text="In what way(s) is the wasmi project used in Substrate/Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4314" PostHistoryTypeId="3" PostId="1178" RevisionGUID="a10d69f3-4557-4cca-a267-bede8a8f3413" CreationDate="2022-03-24T18:24:40.097" UserId="1880" Text="|wasmi|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4315" PostHistoryTypeId="2" PostId="1179" RevisionGUID="8fd6a064-f873-4d4c-ac33-e6e06345ac90" CreationDate="2022-03-24T18:28:08.027" UserId="16" Text="The reason why we discourage usage of `String` is because those are regularly meant to display user facing text. A contract should only contain data that absolutely must be subject to consensus: Everything done within a contract is subject to a fee and string manipulation is expensive.&#xD;&#xA;&#xD;&#xA;It is a common misconception that people think that users should directly interact with contracts and then try to output error messages and help texts. This is the job of your front end (typically a web app). For example, you could output numeric error codes and map those to strings in your front end." ContentLicense="CC BY-SA 4.0" />
  <row Id="4317" PostHistoryTypeId="2" PostId="1180" RevisionGUID="2611657b-640b-4208-9b62-9adc59a39e69" CreationDate="2022-03-24T18:42:46.060" UserId="16" Text="There are to ways in which `wasmi` is used within substrate:&#xD;&#xA;&#xD;&#xA;**Execution of the runtime:**&#xD;&#xA;The state transition function of a substrate based chain is defined in terms of wasm code that is hosted in chain state itself. This allows for easy and forkless upgrades of the blockchain logic. For this reason there is a `wasmi` interpreter included in each node in order to execute the runtime. That said, these days we use `wasmtime` by default to execute the runtime. You could still use `wasmi` by supplying `--wasm-execution interpreted-i-know-what-i-do`. However, this it not advised because it is way too slow to keep up with the network.&#xD;&#xA;&#xD;&#xA;**Execution of wasm contracts:** `pallet-contracts` which is part of FRAME (substrate's runtime authoring framework) is a wasm contract platform. Currently, it uses `wasmi` in order to interpret those contracts. Since contracts are untrusted as opposed to the runtime we can't use `wasmtime` which is subject to compiler bombs. Using `wasmer-singlepass` is something we are looking into for contracts. As a matter of fact you could run your contracts with wasmer today by supplying `--feature wasmer-sandbox` when compiling a substrate node. This is still highly experimental, though." ContentLicense="CC BY-SA 4.0" />
  <row Id="4319" PostHistoryTypeId="2" PostId="1181" RevisionGUID="1f126ff2-f4cb-4a13-a48d-68666b54be68" CreationDate="2022-03-24T18:49:07.100" UserId="227" Text="To add to Alex' answer:&#xD;&#xA;&#xD;&#xA;String processing comes with a lot of overhead (e.g. support for UTF-8 operations). For smart contracts it's important that they are small in terms of size, this reduces the gas fees for users as well as the throughput a blockchain can achieve when multiple contracts are called in one block.&#xD;&#xA;&#xD;&#xA;By using String's the entire code bloat for being able to handle them has to be included in the smart contract, thus making them way bigger than they need to be.&#xD;&#xA;&#xD;&#xA;If you're in need for e.g. parsing JSON then that's something that should definitely be done on the side of the user interface/client/Dapp and only the result of the parsing should be submitted.&#xD;&#xA;&#xD;&#xA;If you're really in need to store something human readable you could make it a `Vec&lt;u8&gt;` instead of a String ‒ thus avoiding the inclusion of any String processing overhead." ContentLicense="CC BY-SA 4.0" />
  <row Id="4323" PostHistoryTypeId="2" PostId="1182" RevisionGUID="73a95195-609c-49fb-93b0-597f417105f8" CreationDate="2022-03-24T19:47:39.840" UserId="138" Text="I also cannot give you a full answer, but you can get some inspiration from the [aura_ext](https://github.com/paritytech/cumulus/blob/b5c8fcbae6903f6cb7611cd97f2d1671f7178126/pallets/aura-ext/src/lib.rs#L141) pallet, which does not have much code, but demonstrates some of the problems you can run into when depending on another pallet.&#xD;&#xA;&#xD;&#xA;I think you need to use the `#[pallet::config]` declaration in your pallet probably." ContentLicense="CC BY-SA 4.0" />
  <row Id="4325" PostHistoryTypeId="2" PostId="1183" RevisionGUID="dc8850ee-68f7-4189-b1fa-ad4c7d73fe05" CreationDate="2022-03-24T19:55:04.353" UserId="85" Text="We have now streamlined the process: there's a form to fill in &quot;Rococo Slot Request&quot; that asks all the right questions so that we can make that happen quickly for you:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/subport/issues/new/choose&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4327" PostHistoryTypeId="2" PostId="1184" RevisionGUID="92afe358-cb1e-4d52-bf8d-d6a2ca030b6c" CreationDate="2022-03-24T20:02:50.640" UserId="1824" Text="Substrate has a macro, [`#[transactional]`](https://crates.parity.io/frame_support/attr.transactional.html), to ensure that any modifications to storage are not persisted in case of an error during execution.&#xD;&#xA;&#xD;&#xA;I imagine there's some sort of caching done before committing any changes to the underlying database, and I was curious to know what kind of overhead was associated with annotating a function as `#[transactional]`.&#xD;&#xA;&#xD;&#xA;Maybe as a simple metric, if we consider two functions - one tagged with transactional and another not, how many more times could we execute the non-transactional function vs. the transactional function in the same amount of time?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4329" PostHistoryTypeId="1" PostId="1184" RevisionGUID="92afe358-cb1e-4d52-bf8d-d6a2ca030b6c" CreationDate="2022-03-24T20:02:50.640" UserId="1824" Text="What's the overhead associated with the `#[transactional]` macro?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4330" PostHistoryTypeId="3" PostId="1184" RevisionGUID="92afe358-cb1e-4d52-bf8d-d6a2ca030b6c" CreationDate="2022-03-24T20:02:50.640" UserId="1824" Text="|pallet|storage|runtime|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4331" PostHistoryTypeId="2" PostId="1185" RevisionGUID="654a4a6d-e9a4-4281-a6ea-cb4a1e7f214d" CreationDate="2022-03-24T20:03:49.840" UserId="19" Text="I understand that there is an existential deposit for native token. But, there is any existential deposit for EVM compatible address H160?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4333" PostHistoryTypeId="1" PostId="1185" RevisionGUID="654a4a6d-e9a4-4281-a6ea-cb4a1e7f214d" CreationDate="2022-03-24T20:03:49.840" UserId="19" Text="Existential deposit in EVM compatible address" ContentLicense="CC BY-SA 4.0" />
  <row Id="4334" PostHistoryTypeId="3" PostId="1185" RevisionGUID="654a4a6d-e9a4-4281-a6ea-cb4a1e7f214d" CreationDate="2022-03-24T20:03:49.840" UserId="19" Text="|evm|existential-deposit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4335" PostHistoryTypeId="2" PostId="1186" RevisionGUID="f9f03fe4-2dfa-495a-813b-975fa6750b84" CreationDate="2022-03-24T20:09:40.703" UserId="1850" Text="I want to take a csv input from the caller so that the csv contents can be loaded to the contract storage as a Vector. &#xD;&#xA;&#xD;&#xA;Crates like csv seem to do just that in standard Rust, e.g. using ```std::io``` or ```std::fs::File```. But ink doesn't seem to support the std library. &#xD;&#xA;&#xD;&#xA;Why is it not supported? And how can I parse a csv file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4337" PostHistoryTypeId="1" PostId="1186" RevisionGUID="f9f03fe4-2dfa-495a-813b-975fa6750b84" CreationDate="2022-03-24T20:09:40.703" UserId="1850" Text="How to take file inputs from user on ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4338" PostHistoryTypeId="3" PostId="1186" RevisionGUID="f9f03fe4-2dfa-495a-813b-975fa6750b84" CreationDate="2022-03-24T20:09:40.703" UserId="1850" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4339" PostHistoryTypeId="5" PostId="138" RevisionGUID="73ae7391-fe28-4ddc-89ae-0f207cf35ed6" CreationDate="2022-03-24T20:40:38.773" UserId="34" Comment="Updated to be correct" Text="Edit: now the process is to submit [an issue with the Rococo template here](https://github.com/paritytech/subport/issues/new/choose), after completion of the [cumulus tutorial](https://docs.substrate.io/tutorials/v3/cumulus/rococo/) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Old: You will need to reach out someone with access to Rococo's SUDO account and this person will help you onboard your parathread to a parachain.&#xD;&#xA;&#xD;&#xA;_At the moment of writing this answer that can be done joining [parachain technical element channel](https://matrix.to/#/#parachain-technical:matrix.parity.io)_&#xD;&#xA;&#xD;&#xA;If you are interested in knowing what is the purpose of Rococo network, please read this blog post https://polkadot.network/blog/rococo-revamp-becoming-a-community-parachain-testbed/" ContentLicense="CC BY-SA 4.0" />
  <row Id="4340" PostHistoryTypeId="2" PostId="1187" RevisionGUID="cb15ad3f-26de-4866-9b6d-c741714309f2" CreationDate="2022-03-24T20:47:59.047" UserId="1883" Text="I would like to know how can the key for the state System Events storage can be built for a given block hash/height" ContentLicense="CC BY-SA 4.0" />
  <row Id="4342" PostHistoryTypeId="1" PostId="1187" RevisionGUID="cb15ad3f-26de-4866-9b6d-c741714309f2" CreationDate="2022-03-24T20:47:59.047" UserId="1883" Text="How to build prefixed key for rocksdb" ContentLicense="CC BY-SA 4.0" />
  <row Id="4343" PostHistoryTypeId="3" PostId="1187" RevisionGUID="cb15ad3f-26de-4866-9b6d-c741714309f2" CreationDate="2022-03-24T20:47:59.047" UserId="1883" Text="|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4344" PostHistoryTypeId="6" PostId="1187" RevisionGUID="80254b57-a0dc-4d93-a7c9-e27c16a88e2c" CreationDate="2022-03-24T20:53:03.453" UserId="1883" Comment="edited tags" Text="|storage|runtime|blockchain|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4345" PostHistoryTypeId="2" PostId="1188" RevisionGUID="a6d7e8dd-da16-4b24-8a60-8176a01e8d78" CreationDate="2022-03-24T21:13:22.893" UserId="14" Text="In my opinion, the best way to learn things is by practicing. The Substrate's tutorial (and docs) are already great on that matter.&#xD;&#xA;&#xD;&#xA;But I have to say that I miss something around security there. I remember how I got excited when I first met the [overthewire's wargames](https://overthewire.org/wargames/) and later the [OpenZeppelin's Ethernaut](https://ethernaut.openzeppelin.com/).&#xD;&#xA;&#xD;&#xA;Those are exactly the way I like to learn new stuff, coding to solve challenges with a huge dose of gamification to keep me addicted! =)&#xD;&#xA;&#xD;&#xA;So, is there anything like that already in production or even as a PoC?&#xD;&#xA;&#xD;&#xA;Is so, I'd like to connect with the maintainers to help they on improvements.&#xD;&#xA;&#xD;&#xA;And if there isn't, I already have an initial dev team to create a PoC and then try to fund the project by creating a Treasury's proposal.&#xD;&#xA;&#xD;&#xA;Any idea or feedback is more than welcome, thanks!&#xD;&#xA;&#xD;&#xA;PS: I'm aware of [pallet-chaos](https://github.com/paritytech/pallet-chaos) and it would be definitely used in the project." ContentLicense="CC BY-SA 4.0" />
  <row Id="4347" PostHistoryTypeId="1" PostId="1188" RevisionGUID="a6d7e8dd-da16-4b24-8a60-8176a01e8d78" CreationDate="2022-03-24T21:13:22.893" UserId="14" Text="Is there any wargame-like for Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4348" PostHistoryTypeId="3" PostId="1188" RevisionGUID="a6d7e8dd-da16-4b24-8a60-8176a01e8d78" CreationDate="2022-03-24T21:13:22.893" UserId="14" Text="|learning|security|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4349" PostHistoryTypeId="2" PostId="1189" RevisionGUID="8dc71ed7-1c64-466b-bb66-d2f42de32a8c" CreationDate="2022-03-24T21:35:26.747" UserId="28" Text="Benchmark results for the `#[transactional]` overhead can be found here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/10809&#xD;&#xA;&#xD;&#xA;The key takeaways:&#xD;&#xA;&#xD;&#xA;- Spawning a transactional layer is quite cheap; just 50 nanoseconds per layer.&#xD;&#xA;- Writing 1,000 storage item between one layer is 146,163 nanoseconds, so ~146 nanoseconds per storage item.&#xD;&#xA;    - When compared to the weight of a write in RocksDB (100,000 nanoseconds), the overhead is only .15%, which is extremely nominal.&#xD;&#xA;&#xD;&#xA;This is why we are interested to make `#[tranasctional]` the default behavior across all Substrate extrinsics.&#xD;&#xA;&#xD;&#xA;A specification can be found here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/issues/10806&#xD;&#xA;&#xD;&#xA;The main concern to have with using `#[transactional]` today is to ensure you prevent a potential stack overflow by a malicious user spawning too many of them in a transaction.&#xD;&#xA;&#xD;&#xA;This is why in my proposal, I set an upper limit to the number of layers that can be spawned, and return an error when trying to spawn more layers.&#xD;&#xA;&#xD;&#xA;Additionally, we will make spawning a new layer an explicit action, so that most users will not run into this limit when writing code." ContentLicense="CC BY-SA 4.0" />
  <row Id="4355" PostHistoryTypeId="2" PostId="1191" RevisionGUID="70f62b3f-c956-437f-8dec-3c60dfdfe685" CreationDate="2022-03-24T21:52:36.090" UserId="359" Text="It is up to each individual chain to decide.&#xD;&#xA;&#xD;&#xA;By default, EVM uses pallet-balances to handle native token, so the same ED rule applies.&#xD;&#xA;&#xD;&#xA;It is possible to configure the pallets to use other pallets to handle native token of EVM or simply configure the ED to zero." ContentLicense="CC BY-SA 4.0" />
  <row Id="4357" PostHistoryTypeId="2" PostId="1192" RevisionGUID="c662e3ee-c843-47e3-9f62-1ee11a79cf85" CreationDate="2022-03-24T22:04:13.470" UserId="16" Text="One thing to keep in mind is that the the size of the storage items do not matter for the overhead. They are kept as `Vec` in the overlay and are moved around without copying.&#xD;&#xA;&#xD;&#xA;You pay `O(#dirty_keys)` on each commit or discard. Most notably the read and write performance for keys are unaffected by the current layering depth. More information can be found in the original PR:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/6269" ContentLicense="CC BY-SA 4.0" />
  <row Id="4360" PostHistoryTypeId="6" PostId="1185" RevisionGUID="116e765c-a7d3-404d-85ed-9ece7a9d4562" CreationDate="2022-03-24T22:09:33.110" UserId="34" Comment="edited tags" Text="|evm|frontier|existential-deposit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4361" PostHistoryTypeId="2" PostId="1193" RevisionGUID="9aa30db2-2e67-49a6-b1f7-5b39bf7ed84f" CreationDate="2022-03-24T22:14:49.990" UserId="34" Text="Typically no. Best to use an indexing database on the side like https://github.com/paritytech/substrate-archive . This is in part because the minimal amount of resources possible is wanted to be used in the runtime and the state it operates on. The runtime is not typically referring to _historical state_ only the present state to progress to the next. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4363" PostHistoryTypeId="2" PostId="1194" RevisionGUID="4ae8b18d-d774-4147-8305-c0aab004a0b4" CreationDate="2022-03-24T22:15:16.360" UserId="85" Text="You have two options for [coupling in substrate][1]:&#xD;&#xA;&#xD;&#xA;LOOSE COUPLING:&#xD;&#xA;&#xD;&#xA;Ideally one might want to call:&#xD;&#xA;&#xD;&#xA;`T::MyVesting::vest(origin);`&#xD;&#xA;&#xD;&#xA;`MyVesting` is an associated type that one would define on your pallet's Config. However `T::MyVesting` must be a trait that has the `vest` fn on it. The eagle eyed will notice that the only trait that the vesting pallet currently implements is the `VestingSchedule` trait which does not, alas, have the `vest` fn on it. So it would need a PR to be submitted to substrate to add such a trait to the Vesting pallet. (not too scary and we'd hand hold you through it)&#xD;&#xA;&#xD;&#xA;TIGHT COUPLING:&#xD;&#xA;&#xD;&#xA;Shawn says the alternative is to do &quot;tight coupling&quot;: make your pallet explicitly depend on the pallet_vesting crate (via Cargo.toml), and then making your pallet's Config depend on the one you wish to call, so your pallet's Config trait would now start like this:&#xD;&#xA;&#xD;&#xA;`trait Config: frame_system::Config + pallet_vesting::Config {` &#xD;&#xA;&#xD;&#xA;(ensuring all the trait bounds are satisfied.)&#xD;&#xA;&#xD;&#xA;With that done you can call it like this: &#xD;&#xA;&#xD;&#xA;`pallet_vesting::pallet::Pallet::&lt;T&gt;::vest(origin)?;`&#xD;&#xA;&#xD;&#xA;If you're the end user then tight coupling is not too bad; but if it was part of a library of pallets that people might use in a variety of ways, then one would prefer loose coupling for the added flexibility.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/pallet-coupling/" ContentLicense="CC BY-SA 4.0" />
  <row Id="4365" PostHistoryTypeId="4" PostId="1090" RevisionGUID="c8048085-e446-44c5-aa2e-db014dcf95e4" CreationDate="2022-03-24T22:17:23.747" UserId="34" Comment="Update for clarity" Text="Query node for full history of an account's extrinsic/transaction records" ContentLicense="CC BY-SA 4.0" />
  <row Id="4366" PostHistoryTypeId="6" PostId="1090" RevisionGUID="c8048085-e446-44c5-aa2e-db014dcf95e4" CreationDate="2022-03-24T22:17:23.747" UserId="34" Comment="Update for clarity" Text="|storage|transactions|historical|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4369" PostHistoryTypeId="2" PostId="1196" RevisionGUID="917fdf3e-6480-4bc9-89cc-f157937c4a70" CreationDate="2022-03-24T22:52:22.420" UserId="283" Text="The main consideration when choosing indices is that it's generally much better for signing infrastructure if the index for a particular pallet (and therefore its call type) doesn't change. Especially for hardware wallets, where firmware updates have more friction. When indices don't change, it gives better backwards compatibility in the binary format of extrinsics.&#xD;&#xA;&#xD;&#xA;Runtime developers should typically be explicit about the indices that correspond to pallets, and if there are groups of pallets that are similar or related it's convention to cluster them together. This leads to developers spacing out pallets and leaving room between them for new pallets to be inserted without affecting any other indices." ContentLicense="CC BY-SA 4.0" />
  <row Id="4372" PostHistoryTypeId="5" PostId="1169" RevisionGUID="33261b11-3736-4372-a7d0-b89710f6b1ef" CreationDate="2022-03-24T23:15:32.083" UserId="83" Comment="translate curse into non-slang equivalent to comply with https://meta.stackexchange.com/questions/79974/whats-the-so-policy-for-swearing/80004#80004" Text="There is a bit of nuance in those docs, which _slashable offense_ but not _slashed._ When a slash is actually applied, a validator is forceably chilled.&#xD;&#xA;&#xD;&#xA;For example, being offline will only result in a slash if more than 10% of the set is offline in the same session, so it's possible to be offline for one session and not get slashed. Basically, something bad happened and it was probably just a machine being offline for an hour.&#xD;&#xA;&#xD;&#xA;But, if the validator is offline for a session in two consecutive eras, there is probably something faulty with the setup that should be addressed. The network chills the validator to prevent a slash from taking place.&#xD;&#xA;&#xD;&#xA;Note: The docs actually mention two consecutive _spans_, and I'm not sure if span equals _era_.&#xD;&#xA;&#xD;&#xA;More info here: https://research.web3.foundation/en/latest/polkadot/slashing/npos.html&#xD;&#xA;&#xD;&#xA;And the code on this is: https://github.com/paritytech/substrate/blob/master/frame/staking/src/slashing.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="4373" PostHistoryTypeId="2" PostId="1197" RevisionGUID="7ce3b5b9-48e6-4fa8-b65a-9f2ece4de375" CreationDate="2022-03-24T23:29:19.417" UserId="434" Text="&#xD;&#xA;```#![cfg_attr(not(feature = &quot;std&quot;), no_std)]```&#xD;&#xA;&#xD;&#xA;Does the &quot;std&quot; above reflect the rust standard library or the std feature defined in the cargo.toml for a given crate?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, for many of the features, default features is set to false, but no optional features are given, i [Read](https://dev.to/rimutaka/cargo-features-explained-with-examples-194g) that &#xD;&#xA;```&#xD;&#xA;rusoto_dynamodb = { version = &quot;0.43.0&quot;, default-features = false, optional = true }&#xD;&#xA;```&#xD;&#xA;would be transformed to &#xD;&#xA;```&#xD;&#xA;rusoto_dynamodb = { version = &quot;0.43.0&quot;, default-features = true }&#xD;&#xA;```&#xD;&#xA;Is this the case with the features used in substrate, i.e. would std (default feature) be used by default?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4375" PostHistoryTypeId="1" PostId="1197" RevisionGUID="7ce3b5b9-48e6-4fa8-b65a-9f2ece4de375" CreationDate="2022-03-24T23:29:19.417" UserId="434" Text="std in conditional compilation" ContentLicense="CC BY-SA 4.0" />
  <row Id="4376" PostHistoryTypeId="3" PostId="1197" RevisionGUID="7ce3b5b9-48e6-4fa8-b65a-9f2ece4de375" CreationDate="2022-03-24T23:29:19.417" UserId="434" Text="|rust|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4377" PostHistoryTypeId="5" PostId="1197" RevisionGUID="03f665d4-5e89-4488-96a9-b590ccbf718c" CreationDate="2022-03-25T00:45:36.847" UserId="434" Comment="added 4 characters in body" Text="&#xD;&#xA;```#![cfg_attr(not(feature = &quot;std&quot;), no_std)]```&#xD;&#xA;&#xD;&#xA;Does the &quot;std&quot; above reflect the rust standard library or the std feature defined in the cargo.toml for a given crate?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, for many of the dependencies, default features is set to false, but no optional features are given, i [Read](https://dev.to/rimutaka/cargo-features-explained-with-examples-194g) that &#xD;&#xA;```&#xD;&#xA;rusoto_dynamodb = { version = &quot;0.43.0&quot;, default-features = false, optional = true }&#xD;&#xA;```&#xD;&#xA;would be transformed to &#xD;&#xA;```&#xD;&#xA;rusoto_dynamodb = { version = &quot;0.43.0&quot;, default-features = true }&#xD;&#xA;```&#xD;&#xA;Is this the case with the dependencies used in substrate, i.e. would std (default feature) be used by default?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4378" PostHistoryTypeId="12" PostId="1012" RevisionGUID="0f14b0e6-7b46-46df-9a73-1839b5f3f6a5" CreationDate="2022-03-25T01:18:23.297" UserId="1814" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:1814,&quot;DisplayName&quot;:&quot;mrq&quot;}]}" />
  <row Id="4379" PostHistoryTypeId="13" PostId="1012" RevisionGUID="d3eb79e2-3cc4-4147-85f0-1cd2581990b9" CreationDate="2022-03-25T01:28:36.547" UserId="1814" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:1814,&quot;DisplayName&quot;:&quot;mrq&quot;}]}" />
  <row Id="4380" PostHistoryTypeId="2" PostId="1198" RevisionGUID="d4a62bad-05eb-4f83-baed-e24b393f0821" CreationDate="2022-03-25T01:30:01.320" UserId="1814" Text="Substrate unlike the Ethereum node for example doesn't offer any easy way to query historic state. Therefore I recommend using [subsquid archive][1] (indexer) to store chain history, you can then use GraphQL to query anything you want.&#xD;&#xA;&#xD;&#xA;For example this is last 10 extrinsics that account signed:&#xD;&#xA;&#xD;&#xA;    query Recent {&#xD;&#xA;      substrate_extrinsic(&#xD;&#xA;         where: {signer: {_eq: &quot;bXhxg5XurkmitqYGsPwGXQdXxQAKZYEaHvFjbVPY1kpLrW5ek&quot;}},&#xD;&#xA;         limit: 10, &#xD;&#xA;         order_by: {id: desc}&#xD;&#xA;      ) {&#xD;&#xA;        blockNumber&#xD;&#xA;        name&#xD;&#xA;        args&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can play with it [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.subsquid.io/key-concepts/architecture#squid-archive&#xD;&#xA;  [2]: https://bsx-api-testnet.hydration.cloud/idx/console" ContentLicense="CC BY-SA 4.0" />
  <row Id="4382" PostHistoryTypeId="5" PostId="1198" RevisionGUID="6e561205-8eac-41e2-aa64-d9dd18fe67bf" CreationDate="2022-03-25T01:35:51.527" UserId="1814" Comment="added 126 characters in body" Text="Substrate unlike the Ethereum node for example doesn't offer any easy way to query historic state. Therefore I recommend using [Subsquid archive][1] (indexer) to store chain history, you can then use GraphQL to query anything you want. &#xD;&#xA;&#xD;&#xA;Also you can extend *archive* with a *processor* that will allow to transform data per block into your application specific structure.&#xD;&#xA;&#xD;&#xA;For example this is last 10 extrinsics that account signed:&#xD;&#xA;&#xD;&#xA;    query Recent {&#xD;&#xA;      substrate_extrinsic(&#xD;&#xA;         where: {signer: {_eq: &quot;bXhxg5XurkmitqYGsPwGXQdXxQAKZYEaHvFjbVPY1kpLrW5ek&quot;}},&#xD;&#xA;         limit: 10, &#xD;&#xA;         order_by: {id: desc}&#xD;&#xA;      ) {&#xD;&#xA;        blockNumber&#xD;&#xA;        name&#xD;&#xA;        args&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can play with it [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.subsquid.io/key-concepts/architecture#squid-archive&#xD;&#xA;  [2]: https://bsx-api-testnet.hydration.cloud/idx/console" ContentLicense="CC BY-SA 4.0" />
  <row Id="4383" PostHistoryTypeId="2" PostId="1199" RevisionGUID="3ba7b877-14b1-462b-9a8c-4b559cf499e2" CreationDate="2022-03-25T01:40:35.093" UserId="1814" Text="I recommend using [Subsquid archive][1] (indexer) to store chain history, you can then use GraphQL to query anything you want. &#xD;&#xA;&#xD;&#xA;The *archive* can be connected with a *processor* that will allow to transform data per block into your application specific structure.&#xD;&#xA;&#xD;&#xA;For example this is last 10 extrinsics that account signed:&#xD;&#xA;&#xD;&#xA;    query Recent {&#xD;&#xA;      substrate_extrinsic(&#xD;&#xA;         where: {signer: {_eq: &quot;bXhxg5XurkmitqYGsPwGXQdXxQAKZYEaHvFjbVPY1kpLrW5ek&quot;}},&#xD;&#xA;         limit: 10, &#xD;&#xA;         order_by: {id: desc}&#xD;&#xA;      ) {&#xD;&#xA;        blockNumber&#xD;&#xA;        name&#xD;&#xA;        args&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can play with it [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.subsquid.io/key-concepts/architecture#squid-archive&#xD;&#xA;  [2]: https://bsx-api-testnet.hydration.cloud/idx/console" ContentLicense="CC BY-SA 4.0" />
  <row Id="4385" PostHistoryTypeId="5" PostId="1199" RevisionGUID="79699740-bfc4-42c2-b5a3-d7e198e97854" CreationDate="2022-03-25T01:46:18.550" UserId="1814" Comment="added 290 characters in body" Text="I recommend using [Subsquid Archive][1] (indexer) to store chain history, you can then use GraphQL to query instantly anything you want. &#xD;&#xA;&#xD;&#xA;The *Archive* can be connected with a *Squid* (processor) that will allow to transform data per block into your application-specific structure - similar to the subgraph.&#xD;&#xA;&#xD;&#xA;*Squids* then are connected to the array of query nodes that cache and serve data to the end-users.&#xD;&#xA;&#xD;&#xA;This architecture means excellent scalability and pretty good reindexing times for processors as the most difficult work is already done by indexer.&#xD;&#xA;&#xD;&#xA;For example this query on *Archive* returns last 10 extrinsics that account signed:&#xD;&#xA;&#xD;&#xA;    query Recent {&#xD;&#xA;      substrate_extrinsic(&#xD;&#xA;         where: {signer: {_eq: &quot;bXhxg5XurkmitqYGsPwGXQdXxQAKZYEaHvFjbVPY1kpLrW5ek&quot;}},&#xD;&#xA;         limit: 10, &#xD;&#xA;         order_by: {id: desc}&#xD;&#xA;      ) {&#xD;&#xA;        blockNumber&#xD;&#xA;        name&#xD;&#xA;        args&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can play with it [here][2]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.subsquid.io/key-concepts/architecture#squid-archive&#xD;&#xA;  [2]: https://bsx-api-testnet.hydration.cloud/idx/console" ContentLicense="CC BY-SA 4.0" />
  <row Id="4386" PostHistoryTypeId="2" PostId="1200" RevisionGUID="393f3cfc-c9ff-442e-bd18-d655741bd7c5" CreationDate="2022-03-25T01:50:54.370" UserId="1838" Text="are there any methods or tools? &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;such as parachain id is 1000.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;how to get this parachain's sovereignAccount" ContentLicense="CC BY-SA 4.0" />
  <row Id="4388" PostHistoryTypeId="1" PostId="1200" RevisionGUID="393f3cfc-c9ff-442e-bd18-d655741bd7c5" CreationDate="2022-03-25T01:50:54.370" UserId="1838" Text="how to calculate sovereignAccount for parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4389" PostHistoryTypeId="3" PostId="1200" RevisionGUID="393f3cfc-c9ff-442e-bd18-d655741bd7c5" CreationDate="2022-03-25T01:50:54.370" UserId="1838" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4391" PostHistoryTypeId="2" PostId="1201" RevisionGUID="4536de0c-3c1a-42a8-ba24-c83b4b933300" CreationDate="2022-03-25T03:21:23.367" UserId="83" Text="In the Babe pallet of Substrate, there are tests that shows that a validator will be removed from the active validator set over the course of two **consecutive** eras.&#xD;&#xA;&#xD;&#xA;In the first era a validator commits an offence and an equivocation proof is reported. In the second era the offending validator gets slashed with the unapplied slash from the previous era. In the Staking pallet of Substrate also shows that this offending validator would be involuntarily chilled in the second era, since the effects of removing it from the active validator set in the first era do not take effect until the second era.&#xD;&#xA;&#xD;&#xA;The test function is called `report_equivocation_current_session_works` in the Babe pallet [here][1]. It shows the staking pallet being used, so according to the documentation the longevity should be equal to the bonding duration in blocks, not eras.&#xD;&#xA;&#xD;&#xA;The test function gives each validator in the session the same balance of `10_000_000`, and an exposed slashable balance of `10_000`, and then simulates a case where one of the validators (at index 1) commits an offence and needs enough time to generate an equivocation proof that contains two block header hashes from the current slot within the same first era, and also reports the equivocation proof within that same first era.&#xD;&#xA;&#xD;&#xA;The test function then starts a second era so &quot;the results of the offence report are applied at era end&quot;, as mentioned [here][2] and checks that 100% of the slashable balance of the offending validator gets slashed to `0` and it checks that they are still staking in that second era but with an exposed slashable balance of `0`. I think the test could be improved by checking that they are no longer in the active validator set to demonstrate that they have been involuntarily chilled in the second era.  &#xD;&#xA;&#xD;&#xA;In the Staking pallet implementation where most of this functionality occurs, the `compute_slash` function [here][3] computes the slash of the validator and nominators. It then calls `fetch_spans` to initialize `SlashingSpans` if necessary with a slashing span index, an `AccountId`, and it uses the current era index as the start of the slashing span. It then calls `chill_stash` to involuntarily chill that validator's stash account, which involves removing it from the active validator set, with effects felt at the beginning of the next era (the second era in the case of the above test).&#xD;&#xA;&#xD;&#xA;Also in `compute_slash` function, if the slash amount is more than `0`, and the slashable balance of the validator from the most recent slashing span is also more than `0`, and the misbehaviour occurred within the current slashing span then it provides the values to be slashed to `UnappliedSlash` for slashing to occur in the next era (the second era in the case of the above test).&#xD;&#xA;&#xD;&#xA;Note that in the above test function, the `BabeEquivocationOffence` trait from the Babe pallet or the `GrandpaEquivocationOffence` trait from the Grandpa pallet may be used along with the `report_offence` function from the Offense pallet to provide equivocation offence data in an equivocation report to a `HandleEquivocation` trait in the corresponding pallet, which has utility methods for handling valid equivocation reports including giving them a `ReportLongevity` value if they are proven valid, which it says in the [Substrate Rustdocs][4] is valid for &quot;the bonding duration (in blocks, not eras)&quot; when using the Staking pallet.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/babe/src/tests.rs#L401&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/babe/src/tests.rs#L449&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/staking/src/slashing.rs#L445&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/" ContentLicense="CC BY-SA 4.0" />
  <row Id="4393" PostHistoryTypeId="2" PostId="1202" RevisionGUID="ca15a343-cb59-49a8-8fd8-7a27f96704be" CreationDate="2022-03-25T03:26:11.523" UserId="515" Text="I want to implement function [transfer_all](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L407) of pallet_balances to my pallet, is it possible to call dispatched functions on runtime?&#xD;&#xA;```&#xD;&#xA;fn my_transfer_all(source: T::AccountId, dest: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;		&lt;T as pallet::Config&gt;::Currency::transfer_all(source, dest, false) // no function or associated item named `transfer_all` found&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4395" PostHistoryTypeId="1" PostId="1202" RevisionGUID="ca15a343-cb59-49a8-8fd8-7a27f96704be" CreationDate="2022-03-25T03:26:11.523" UserId="515" Text="Is it possible to call dispatched functions on runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4396" PostHistoryTypeId="3" PostId="1202" RevisionGUID="ca15a343-cb59-49a8-8fd8-7a27f96704be" CreationDate="2022-03-25T03:26:11.523" UserId="515" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4397" PostHistoryTypeId="5" PostId="1201" RevisionGUID="d41c83fa-3fc7-44b3-be58-0fc232cbf67a" CreationDate="2022-03-25T03:29:15.120" UserId="83" Comment="tweak further to make it clearer" Text="In the Babe pallet of Substrate, there are tests that show that a validator will be removed from the active validator set over the course of two **consecutive** eras.&#xD;&#xA;&#xD;&#xA;In the first era, a validator commits an offence and an equivocation proof is reported.&#xD;&#xA;In the second era, the offending validator gets slashed with the unapplied slash from the previous era.&#xD;&#xA;It shows in the the Staking pallet of Substrate, but not in any test, that the offending validator would be involuntarily chilled in the second era, since the effects of removing it from the active validator set in the first era do not take effect until the second era.&#xD;&#xA;&#xD;&#xA;The test function where this happens is called `report_equivocation_current_session_works` in the Babe pallet [here][1].&#xD;&#xA;&#xD;&#xA;The test function gives each validator in the session the same balance of `10_000_000`, and an exposed slashable balance of `10_000`, and then simulates a case where one of the validators (at index 1) commits an offence and needs enough time to generate an equivocation proof that contains two block header hashes from the current slot within the same first era, and also reports the equivocation proof within that same first era.&#xD;&#xA;&#xD;&#xA;The test function then starts a second era so &quot;the results of the offence report are applied at era end&quot;, as mentioned [here][2] and checks that 100% of the slashable balance of the offending validator gets slashed to `0` and it checks that they are still staking in that second era but with an exposed slashable balance of `0`. I think the test could be improved by checking that they are no longer in the active validator set to demonstrate that they have been involuntarily chilled in the second era.  &#xD;&#xA;&#xD;&#xA;In the Staking pallet implementation where most of this functionality occurs, the `compute_slash` function [here][3] computes the slash of the validator and nominators. It then calls `fetch_spans` to initialize `SlashingSpans` if necessary with a slashing span index, an `AccountId`, and it uses the current era index as the start of the slashing span. It then calls `chill_stash` to involuntarily chill that validator's stash account, which involves removing it from the active validator set, with effects felt at the beginning of the next era (the second era in the case of the above test).&#xD;&#xA;&#xD;&#xA;Also in `compute_slash` function, if the slash amount is more than `0`, and the slashable balance of the validator from the most recent slashing span is also more than `0`, and the misbehaviour occurred within the current slashing span then it provides the values to be slashed to `UnappliedSlash` for slashing to occur in the next era (the second era in the case of the above test).&#xD;&#xA;&#xD;&#xA;Note that in the above test function, an equivocation offence trait from the Babe or Grandpa pallet may be used along with the `report_offence` function from the Offense pallet to provide equivocation offence data in an equivocation report to a `HandleEquivocation` trait in the corresponding pallet, which has utility methods for handling valid equivocation reports.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/babe/src/tests.rs#L401&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/babe/src/tests.rs#L449&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/staking/src/slashing.rs#L445&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/" ContentLicense="CC BY-SA 4.0" />
  <row Id="4399" PostHistoryTypeId="5" PostId="1201" RevisionGUID="25d323fc-b209-41b9-868a-2ee790a0d548" CreationDate="2022-03-25T03:42:00.917" UserId="83" Comment="add italics" Text="In the Babe pallet of Substrate, there are tests that show that a validator will be removed from the active validator set over the course of two **consecutive** eras.&#xD;&#xA;&#xD;&#xA;In the first era, a validator commits an offence and an equivocation proof is reported.&#xD;&#xA;In the second era, the offending validator gets slashed with the unapplied slash from the previous era.&#xD;&#xA;It shows in the the Staking pallet of Substrate, but not in any test, that the offending validator would be involuntarily chilled in the second era, since the effects of removing it from the active validator set in the first era do not take effect until the second era.&#xD;&#xA;&#xD;&#xA;The test function where this happens is called `report_equivocation_current_session_works` in the Babe pallet [here][1].&#xD;&#xA;&#xD;&#xA;The test function gives each validator in the session the same balance of `10_000_000`, and an exposed slashable balance of `10_000`, and then simulates a case where one of the validators (at index 1) commits an offence and needs enough time to generate an equivocation proof that contains two block header hashes from the current slot within the same first era, and also reports the equivocation proof within that same first era.&#xD;&#xA;&#xD;&#xA;The test function then starts a second era so *&quot;the results of the offence report are applied at era end&quot;*, as mentioned [here][2] and checks that 100% of the slashable balance of the offending validator gets slashed to `0` and it checks that they are still staking in that second era but with an exposed slashable balance of `0`. &#xD;&#xA;&#xD;&#xA;I think the test could be improved by checking that they are no longer in the active validator set to demonstrate that they have been involuntarily chilled in the second era.  &#xD;&#xA;&#xD;&#xA;In the Staking pallet implementation where most of this functionality occurs, the `compute_slash` function [here][3] computes the slash of the validator and nominators. It then calls `fetch_spans` to initialize `SlashingSpans` if necessary with a slashing span index, an `AccountId`, and it uses the current era index as the start of the slashing span. It then calls `chill_stash` to involuntarily chill that validator's stash account, which involves removing it from the active validator set, with effects felt at the beginning of the next era (the second era in the case of the above test).&#xD;&#xA;&#xD;&#xA;Also in `compute_slash` function, if the slash amount is more than `0`, and the slashable balance of the validator from the most recent slashing span is also more than `0`, and the misbehaviour occurred within the current slashing span then it provides the values to be slashed to `UnappliedSlash` for slashing to occur in the next era (the second era in the case of the above test).&#xD;&#xA;&#xD;&#xA;Note that in the above test function, an equivocation offence trait from the Babe or Grandpa pallet may be used along with the `report_offence` function from the Offense pallet to provide equivocation offence data in an equivocation report to a `HandleEquivocation` trait in the corresponding pallet, which has utility methods for handling valid equivocation reports.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/babe/src/tests.rs#L401&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/babe/src/tests.rs#L449&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/staking/src/slashing.rs#L445&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/" ContentLicense="CC BY-SA 4.0" />
  <row Id="4400" PostHistoryTypeId="2" PostId="1203" RevisionGUID="bc1b2689-c33c-4a40-a445-4e0414719722" CreationDate="2022-03-25T03:51:25.627" UserId="512" Text="I'm working on a quadratic voting function, and I'm trying to use a function like square root. There is no square root function in sp that I could find. What is the best way to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4402" PostHistoryTypeId="1" PostId="1203" RevisionGUID="bc1b2689-c33c-4a40-a445-4e0414719722" CreationDate="2022-03-25T03:51:25.627" UserId="512" Text="How would one compute square root in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4403" PostHistoryTypeId="3" PostId="1203" RevisionGUID="bc1b2689-c33c-4a40-a445-4e0414719722" CreationDate="2022-03-25T03:51:25.627" UserId="512" Text="|no-std|math|log|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4404" PostHistoryTypeId="2" PostId="1204" RevisionGUID="3c943a32-8316-4953-806b-6a1670907e18" CreationDate="2022-03-25T05:35:25.230" UserId="88" Text="To perform non-deterministic arithmetic like division and square roots, I think your best bet is to use fixed-point numbers with [Substrate-fixed](https://github.com/chmike/fpsqrt/blob/master/fpsqrt.c) or hack off of the balance type (which is also a fixed point number - specifically a `U88F40` in substrate-fixed). With that, you'll have access to wider arithmetic operations (fixed-point division, being the most prevalent). Next, you'll need to find an algorithm for computing the square root of a fixed-point number.&#xD;&#xA;&#xD;&#xA;Here are a few links to help in that search:  &#xD;&#xA;I found [this](https://github.com/chmike/fpsqrt/blob/master/fpsqrt.c), but it's written in c and I haven't looked at the paper it's based off of.&#xD;&#xA;&#xD;&#xA;I've also found [this](https://www.fpgarelated.com/showarticle/1347.php) article but I barely glanced through it.&#xD;&#xA;&#xD;&#xA;There's also [Wikipedia](https://en.wikipedia.org/wiki/Methods_of_computing_square_roots)&#xD;&#xA;&#xD;&#xA;I'll try to update this with more info if I find anything interesting.&#xD;&#xA;Lastly, to avoid the headache that comes with these algorithms, I'd advise trying to find a workaround somehow that's equivalent to the square root, or remove the square root entirely by restating the formula either with logarithms (whose value is much easier to compute given the right table) or something similar." ContentLicense="CC BY-SA 4.0" />
  <row Id="4407" PostHistoryTypeId="2" PostId="1205" RevisionGUID="973dff9e-0028-4397-90a2-0f3cb3862c33" CreationDate="2022-03-25T05:55:15.820" UserId="85" Text="As `transfer_all` doesn't seem to be on a trait, then you could do it via tight coupling of making your pallet's Config trait have the pallet_balance::Config as a supertrait:&#xD;&#xA;&#xD;&#xA;`trait Config: frame_system::Config + pallet_balance::Config {`&#xD;&#xA;&#xD;&#xA;See my answer to this question for more: https://substrate.stackexchange.com/questions/1166/how-to-call-an-imported-pallet-function-from-my-custom-pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="4409" PostHistoryTypeId="2" PostId="1206" RevisionGUID="3e4a1dd4-18d3-4226-9237-675bb65e3b04" CreationDate="2022-03-25T05:57:19.153" UserId="167" Text="`Id` (aka `ParaId`) implements `into_account_id()`, as described [here](https://github.com/paritytech/polkadot/blob/645ae551fcce76f040af71d10ad429baf40b6c61/parachain/src/primitives.rs#L308). The code translates to `(&quot;para&quot;, id).encode()`, then decoded as a 32 byte account id, with trailing zeros if need be. &#xD;&#xA;&#xD;&#xA;I am not aware of any tools, but probably it would be very easy to make one, or manually check them. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4411" PostHistoryTypeId="2" PostId="1207" RevisionGUID="2d05b756-99aa-4a65-b7cc-c612e9d11d99" CreationDate="2022-03-25T06:20:41.920" UserId="85" Text="There does not exist a `std` feature in rust. It refers to the `std` feature defined in the Cargo.toml file.&#xD;&#xA;&#xD;&#xA;The `std` feature enables additional code that is used by the node 'client' - the code that runs the runtime (i.e. the code that does consensus, networking, transaction pool etc.). The runtime itself does not use any `std` code as it is all compiled to wasm (which is no_std)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4413" PostHistoryTypeId="5" PostId="946" RevisionGUID="ac1ee21c-d986-43c4-ba5e-5dfdabdab840" CreationDate="2022-03-25T06:29:04.413" UserId="429" Comment="deleted 18 characters in body; edited title" Text="I'm trying to access data that I'm storing through the RPC off-chain endpoint.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Is there any way to get the instance of off-chain storage in *service.rs* through which we can extract that has been stored using the front-end? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VXQcR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4414" PostHistoryTypeId="4" PostId="946" RevisionGUID="ac1ee21c-d986-43c4-ba5e-5dfdabdab840" CreationDate="2022-03-25T06:29:04.413" UserId="429" Comment="deleted 18 characters in body; edited title" Text="How to extract data from Offchain storage in client-side?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4415" PostHistoryTypeId="2" PostId="1208" RevisionGUID="c0830d0d-a1a9-4f00-b932-be560a72412e" CreationDate="2022-03-25T06:35:24.753" UserId="627" Text="If you are just after the integer sqrt (which, depending on your use-case, may be enough), you could follow the approach that the `democracy` pallet does. &#xD;&#xA;&#xD;&#xA;In this case it uses `integer_sqrt::IntegerSquareRoot` under the hood to calculate&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let sqrt_voters = tally.turnout.integer_sqrt();&#xD;&#xA;let sqrt_electorate = electorate.integer_sqrt();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Before doing rational compares. The above use is here -https://github.com/paritytech/substrate/blob/676932fb5543d5b316b4e494631d8e48f98b760d/frame/democracy/src/vote_threshold.rs#L81-L106&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4417" PostHistoryTypeId="2" PostId="1209" RevisionGUID="5fcf0206-0b2c-427e-943c-558020128a03" CreationDate="2022-03-25T06:39:55.533" UserId="429" Text="On the client-side we can get the off-chain storage instance from shared backend instance *(which is of type Arc &lt; FullBanckend &gt;)*.&#xD;&#xA;This instance can be find inside *new_full()*.&#xD;&#xA;&#xD;&#xA;After getting the Bankend's shared instance, we can access our off-chain storage like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // The relevant ocw storage instance.&#xD;&#xA;    let ocw_storage = backend.offchain_storage();&#xD;&#xA;&#xD;&#xA;    // Prefix for accessing values for our application.&#xD;&#xA;    let prefix = &amp;sp_offchain::STORAGE_PREFIX;&#xD;&#xA;&#xD;&#xA;    // Get our value&#xD;&#xA;    ocw_storage.get(prefix, key);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4420" PostHistoryTypeId="2" PostId="1210" RevisionGUID="c5fbd43e-d373-4c35-b3b5-0abed5b60c84" CreationDate="2022-03-25T06:50:20.050" UserId="85" Text="Here is parachain sovereign account 2000 (the AcountId32):&#xD;&#xA;&#xD;&#xA;0x70617261 + d0070000 + 000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;0x70617261 = b&quot;para&quot; &#xD;&#xA;&#xD;&#xA;d0070000 = scale encoded number 2000&#xD;&#xA;&#xD;&#xA;You can see the scale encoding of a u32 by typing the number into collatorSelection/setDesiredCandidates and looking at the encoded call details on the bottom right by `max` that is the encoded version of 2000.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;To copy and paste:&#xD;&#xA;&#xD;&#xA;1000: 0x70617261e8030000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;2000: 0x70617261d0070000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;2001: 0x70617261d1070000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;2002: 0x70617261d2070000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;(That's also enough examples that you could guess the rest. I do think that we need an easy way to get these from polkadot-js maybe from the parachain screen? - PRs welcome!)&#xD;&#xA;&#xD;&#xA;If you want a normal polkadot/kusama address then you can use the &quot;AccountId to Hex&quot; at https://www.shawntabrizi.com/substrate-js-utilities/ - paste in the above on the right hand side as the hex and you will get the address calculated. For example, for 1000 parachain id it returns 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OzbQT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4422" PostHistoryTypeId="5" PostId="1208" RevisionGUID="6b301233-d8f5-4b7e-b664-d82cc13acfda" CreationDate="2022-03-25T06:58:12.547" UserId="627" Comment="added 1 character in body" Text="If you are just after the integer sqrt (which, depending on your use-case, may be enough), you could follow the approach that the `democracy` pallet does. &#xD;&#xA;&#xD;&#xA;In this case it uses `integer_sqrt::IntegerSquareRoot` under the hood to calculate&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let sqrt_voters = tally.turnout.integer_sqrt();&#xD;&#xA;let sqrt_electorate = electorate.integer_sqrt();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Before doing rational compares. The above use is here - https://github.com/paritytech/substrate/blob/676932fb5543d5b316b4e494631d8e48f98b760d/frame/democracy/src/vote_threshold.rs#L81-L106&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4423" PostHistoryTypeId="2" PostId="1211" RevisionGUID="eb3af37d-b415-4431-b0ce-935a33d746c9" CreationDate="2022-03-25T07:02:26.403" UserId="85" Text="The smart contract is run inside the blockchain in a web assembly sandbox. It has no direct access to any files. A file is however nothing more than a vec of bytes and you could accept that vec as an input to one's contract. &#xD;&#xA;&#xD;&#xA;But unless you really need to I would recommend just storing the hash of that file on chain as that will be a lot cheaper and more predictable in terms of gas fees.&#xD;&#xA;&#xD;&#xA;The parachainSystem/enactUpgrade is an example of uploading a file. &#xD;&#xA;&#xD;&#xA;The parachainSystem/authoriseUpgrade is an example of uploading a hash of a file.&#xD;&#xA;&#xD;&#xA;(EDITOR: Those are examples of it done in pallets. Does anyone have any examples of ink contracts doing the same?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4426" PostHistoryTypeId="2" PostId="1212" RevisionGUID="611ff119-363d-4e70-97f9-25d88c722f86" CreationDate="2022-03-25T07:54:39.970" UserId="371" Text="While writing dispatchable methods on substrate pallets, is it possible to sign transaction from one wallet (wallet-1) and then forward that signed transaction to the blockchain from another wallet(wallet-2) so that the tx fees will be paid by wallet-2 but the transaction gets executed on behalf of  wallet-1?&#xD;&#xA;&#xD;&#xA;I have a use case where I want to create a pallet method that should only be exposed to a sudo wallet. This method would take signatures from other wallets, as args, and validate them on-chain.&#xD;&#xA;&#xD;&#xA;PS: I, also, could only find [signAndSend()][1] method on Polkadot-js library, i.e. don't seem to find a way to do the signing and the sending to blockchain part in a two step process.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/start/api.tx#simple-transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="4428" PostHistoryTypeId="1" PostId="1212" RevisionGUID="611ff119-363d-4e70-97f9-25d88c722f86" CreationDate="2022-03-25T07:54:39.970" UserId="371" Text="Substrate Meta Transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="4429" PostHistoryTypeId="3" PostId="1212" RevisionGUID="611ff119-363d-4e70-97f9-25d88c722f86" CreationDate="2022-03-25T07:54:39.970" UserId="371" Text="|pallet|fee|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4430" PostHistoryTypeId="2" PostId="1213" RevisionGUID="b2edd12c-19b9-4966-8e0b-307ae8362ea3" CreationDate="2022-03-25T07:55:13.267" UserId="265" Text="after a council motion has reached its configured threshold (required number of votes collected), the polkadot.js interface enables a &lt;kbd&gt;×&lt;/kbd&gt; close button which, it appears, anyone may interact with.&#xD;&#xA; - is *closing* a motion something that anyone can trigger or does the polkadot.js interface just make it look like that is the case? prior to the threshold being reached, the button is disabled.&#xD;&#xA; - does *closing* a motion cause it to conclude earlier than waiting for the *voting end* date to occur? if not, it seems redundant to provide the mechanism. if so, it seems odd that the mechanism may be triggered by a casual observer.&#xD;&#xA;&#xD;&#xA;can anyone shed light on the purpose of the *close* button and its underlying logic?&#xD;&#xA;&#xD;&#xA;[![council motion `close` interaction on polkadot.js][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/RCk5P.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4432" PostHistoryTypeId="1" PostId="1213" RevisionGUID="b2edd12c-19b9-4966-8e0b-307ae8362ea3" CreationDate="2022-03-25T07:55:13.267" UserId="265" Text="what is the purpose of the `close` interaction on a council motion" ContentLicense="CC BY-SA 4.0" />
  <row Id="4433" PostHistoryTypeId="3" PostId="1213" RevisionGUID="b2edd12c-19b9-4966-8e0b-307ae8362ea3" CreationDate="2022-03-25T07:55:13.267" UserId="265" Text="|polkadot-js|motion|council|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4434" PostHistoryTypeId="2" PostId="1214" RevisionGUID="5f7c8936-5195-4f27-b4fb-dbc28ed8d003" CreationDate="2022-03-25T08:18:40.970" UserId="32" Text="At the time of asking this question, the ED on Polkadot is 1 DOT and Kusama is 0.0000333333 KSM. Polkadot, and most Substrate-based chains, use an existential deposit (ED) to prevent dust accounts from bloating chain state. &#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/build-protocol-info#existential-deposit&#xD;&#xA;&#xD;&#xA;What are the metrics used by Substrate based blockchains when deciding on a specific value for the Existential Deposit? Would a situation arise when Polkadot or Kusama may have to change their ED values?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4436" PostHistoryTypeId="1" PostId="1214" RevisionGUID="5f7c8936-5195-4f27-b4fb-dbc28ed8d003" CreationDate="2022-03-25T08:18:40.970" UserId="32" Text="What criteria do blockchains consider when deciding on Existential Deposit?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4437" PostHistoryTypeId="3" PostId="1214" RevisionGUID="5f7c8936-5195-4f27-b4fb-dbc28ed8d003" CreationDate="2022-03-25T08:18:40.970" UserId="32" Text="|polkadot|kusama|balances|existential-deposit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4438" PostHistoryTypeId="2" PostId="1215" RevisionGUID="8ace5c25-eb6d-45b9-8685-ffbbfd8e73bb" CreationDate="2022-03-25T08:18:58.247" UserId="620" Text="It closes a motion that has enough Aye or Nay votes. The reason it doesn't auto-close is that it would be extra logic on every single vote: looking up to see if it has been passed or rejected. Anyone can call it.&#xD;&#xA;&#xD;&#xA;Its behavior is in the docs: https://paritytech.github.io/substrate/master/pallet_collective/pallet/enum.Call.html#variant.close&#xD;&#xA;&#xD;&#xA;Most pertinent to your question:&#xD;&#xA;&#xD;&#xA;1. May be called by any signed account in order to finish voting and close the proposal.&#xD;&#xA;2. If called before the end of the voting period it will only close the vote if it is has enough votes to be approved or disapproved." ContentLicense="CC BY-SA 4.0" />
  <row Id="4440" PostHistoryTypeId="2" PostId="1216" RevisionGUID="0ef3863d-e52c-4f04-aa5e-807a98f3bffd" CreationDate="2022-03-25T08:22:42.417" UserId="1867" Text="I'm not aware of any wargame like gamification in the spirit of OpenZeppinls Ethernauts and I agree that it might be an interesting and motivating learning experience around Substrate.&#xD;&#xA;&#xD;&#xA;If you want to experience some gamification around Substrate, you might enjoy checking out [Open Emoji Battler](https://github.com/OpenEmojiBattler/open-emoji-battler). While it is not targeting security, it is at least a fully decentralised on-chain game which AFAIK was realised either as a standalone chain or as an ink! Smart Contract." ContentLicense="CC BY-SA 4.0" />
  <row Id="4442" PostHistoryTypeId="2" PostId="1217" RevisionGUID="0628e412-b408-4e3a-9b97-360075c0b664" CreationDate="2022-03-25T08:22:44.563" UserId="225" Text="From the best of my knowledge there is no utility to do it, you are limited to `OffchainStorage` trait.&#xD;&#xA;Technically, the offchain storage directly writes to the underlying db column (just prefixing the key).&#xD;&#xA;&#xD;&#xA;So rocksdb user can iterate on that, but that is not a good solution as paritydb users cannot (it would need to switch paritydb to an ordered column which is not a light change).&#xD;&#xA;&#xD;&#xA;Depending on your use case it may be possible to keep trace of order at a higher level (like storing a linked list or other), but that would be slow and a bit costy. (in some case it can be a best choice, when you need to handle concurrent access and add some mutex like protection with `compare_and_set`).&#xD;&#xA;&#xD;&#xA;Can also think of rolling out your own backend, but then you cannot access it with the standard rpc (so probably no existing ui can access it)." ContentLicense="CC BY-SA 4.0" />
  <row Id="4444" PostHistoryTypeId="2" PostId="1218" RevisionGUID="3dff3309-3b5b-4e5f-a7f3-8d2736cb6f6e" CreationDate="2022-03-25T08:49:03.393" UserId="140" Text="I just integrated our parachain into Rococo. Our testing is completed now we are ready to integrate into Kusama.&#xD;&#xA;&#xD;&#xA;I just want to understand what is the process for Kusama integration. Because Rococo and Kusama have different processes.&#xD;&#xA;&#xD;&#xA;On Rococo, after registering ParaId, we have to share WASM and state files with community, and they onboard us manually.&#xD;&#xA;&#xD;&#xA;I have reserved ParaId on Kusama. My WASM, Spec Json, and Genesis state files are ready. What are the next steps?&#xD;&#xA;&#xD;&#xA;Can someone please help me to understand this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4446" PostHistoryTypeId="1" PostId="1218" RevisionGUID="3dff3309-3b5b-4e5f-a7f3-8d2736cb6f6e" CreationDate="2022-03-25T08:49:03.393" UserId="140" Text="What is required to integrate a Parachain into Kusama?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4447" PostHistoryTypeId="3" PostId="1218" RevisionGUID="3dff3309-3b5b-4e5f-a7f3-8d2736cb6f6e" CreationDate="2022-03-25T08:49:03.393" UserId="140" Text="|substrate-node|polkadot|kusama|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4448" PostHistoryTypeId="5" PostId="1173" RevisionGUID="1e583dd8-db90-4beb-8211-d84edf04a5fa" CreationDate="2022-03-25T08:52:56.517" UserId="227" Comment="added 288 characters in body" Text="You currently have two options for writing upgradeable smart contracts in ink!. For both of them we have example contracts. They differ in the following key characteristics.&#xD;&#xA;&#xD;&#xA;The [`forward-calls`](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contracts/forward-calls) example implements a classic forward-pattern:&#xD;&#xA;&#xD;&#xA;* The contract forwards any call that does not match a selector of itself to another contract. The address of this &quot;another contract&quot; can be changed by the instantiator of the contract  (there is a notion of &quot;admin&quot; in the example contract).&#xD;&#xA;* The other contract needs to be deployed on-chain.&#xD;&#xA;* State is stored in the storage of the contract to which calls are forwarded.&#xD;&#xA;&#xD;&#xA;The [`delegate-calls`](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contracts/delegate-calls) example on the other hand utilizes an API similar to Ethereum's `delegatecall` function:&#xD;&#xA;&#xD;&#xA;* The contract executes any call that does not match a selector of itself with the code of another contract. The address of this &quot;another contract&quot; can be changed by the creator of the contract (there is a notion of &quot;admin&quot; in the example contract).&#xD;&#xA;* The other contract does not need to be deployed on-chain.&#xD;&#xA;* State is stored in the storage of the originally called contract.&#xD;&#xA;&#xD;&#xA;Future versions of [OpenBrush](https://github.com/Supercolony-net/openbrush-contracts) (a library similar to OpenZeppelin, but for ink!) will contain support for the diamond pattern, another way of building upgradeable contracts." ContentLicense="CC BY-SA 4.0" />
  <row Id="4449" PostHistoryTypeId="2" PostId="1219" RevisionGUID="0dc58b32-e5cc-47b9-a211-f241c3f3960e" CreationDate="2022-03-25T08:59:23.133" UserId="32" Text="To become a parachain on Kusama, you have to acquire a parachain slot by winning it through a parachain slot auction - https://kusama.network/auctions/&#xD;&#xA;&#xD;&#xA;There is also a provision to become a parachain via governance if your blockchain is deemed as a common good parachain.&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-parachains#parachain-slot-acquisition" ContentLicense="CC BY-SA 4.0" />
  <row Id="4451" PostHistoryTypeId="2" PostId="1220" RevisionGUID="d59d8c40-b2f4-469f-b1ef-c9a698c3635d" CreationDate="2022-03-25T08:59:42.963" UserId="1866" Text="For both Kusama, there are [slot auctions](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama.api.onfinality.io%2Fpublic-ws#/parachains/auctions), the same happens on Polkadot.&#xD;&#xA;&#xD;&#xA;Auction run for a duration and the winner of the auction wins a slot. To win, you either need to have sufficient funds to secure a slot, or use a [crowdloan](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama.api.onfinality.io%2Fpublic-ws#/parachains/crowdloan) where the community backs you.&#xD;&#xA;&#xD;&#xA;At the end of the lease period, the locked funds are returned." ContentLicense="CC BY-SA 4.0" />
  <row Id="4453" PostHistoryTypeId="2" PostId="1221" RevisionGUID="65ba4fa5-591e-4afb-84b3-32eacc0bc09d" CreationDate="2022-03-25T09:06:35.517" UserId="1866" Text="On Polkadot/Kusama the ED has been reduced in the past via democracy. Basically this was driven by the increase in price, i.e. what made sense at chain launch didn't make sense anymore. &#xD;&#xA;&#xD;&#xA;At the end of the day the ED is not there to &quot;punish&quot;, but rather &quot;protect&quot;. If a scenario arises where the DOT/USD price would be $1000, it wouldn't quite make sense to have 1 DOT as an ED since it would significantly hamper the growth of the platform, attracting new users.&#xD;&#xA;&#xD;&#xA;In the same vein 0 ED doesn't &quot;protect&quot; at all, since it leaves the chain open to state bloat attacks. I believe setting ED is not a exact science, but rather an art, juggling the protection of the chain vs making it attractive for users." ContentLicense="CC BY-SA 4.0" />
  <row Id="4455" PostHistoryTypeId="5" PostId="1173" RevisionGUID="52d6b691-e718-427c-bea4-0a936009af7d" CreationDate="2022-03-25T09:20:23.233" UserId="227" Comment="added 5 characters in body" Text="You currently have two options for writing upgradeable smart contracts in ink!. For both of them we have example contracts. They differ in the following key characteristics.&#xD;&#xA;&#xD;&#xA;The [`forward-calls`](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contracts/forward-calls) example implements a classic forward-pattern:&#xD;&#xA;&#xD;&#xA;* The contract forwards any call that does not match a selector of itself to another contract. The address of this &quot;another contract&quot; can be changed by the instantiator of the contract  (there is a notion of &quot;admin&quot; in the example contract).&#xD;&#xA;* The other contract needs to be deployed on-chain.&#xD;&#xA;* State is stored in the storage of the contract to which calls are forwarded.&#xD;&#xA;&#xD;&#xA;The [`delegate-calls`](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contracts/delegate-calls) example on the other hand utilizes an API similar to Ethereum's `delegatecall` function:&#xD;&#xA;&#xD;&#xA;* The contract executes any call that does not match a selector of itself with the code of another contract. The address of this &quot;another contract&quot; can be changed by the instantiator of the contract (there is a notion of &quot;admin&quot; in the example contract).&#xD;&#xA;* The other contract does not need to be deployed on-chain.&#xD;&#xA;* State is stored in the storage of the originally called contract.&#xD;&#xA;&#xD;&#xA;Future versions of [OpenBrush](https://github.com/Supercolony-net/openbrush-contracts) (a library similar to OpenZeppelin, but for ink!) will contain support for the diamond pattern, another way of building upgradeable contracts." ContentLicense="CC BY-SA 4.0" />
  <row Id="4456" PostHistoryTypeId="2" PostId="1222" RevisionGUID="bb7ead9a-a03c-46f0-b5e1-24224ed8298d" CreationDate="2022-03-25T09:42:33.283" UserId="139" Text="I am trying to build something that will allow me to use unspent treasury funds as I don't understand the proposal system yet, but I won't be overloading this question with that. Here's the scenario:&#xD;&#xA;&#xD;&#xA;The pallet_staking config has this type: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type Reward = (); // rewards are minted from the void&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And is defined as :&#xD;&#xA;```rust&#xD;&#xA; type Reward: OnUnbalanced&lt;&lt;&lt;Self as Config&gt;::Currency as Currency&lt;&lt;Self as Config&gt;::AccountId&gt;&gt;::PositiveImbalance&gt;;&#xD;&#xA;```&#xD;&#xA;I was wondering, how to wire this to the `Treasury` system. If the Treasury has some balance, that's not being used, instead of minting rewards from the void, use the treasury funds for era staking rewards payout. &#xD;&#xA;&#xD;&#xA;How would one go about this? Do I need to write an implementation for `OnUnbalanced` for `Treasury`? If so, what should I be writing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4458" PostHistoryTypeId="1" PostId="1222" RevisionGUID="bb7ead9a-a03c-46f0-b5e1-24224ed8298d" CreationDate="2022-03-25T09:42:33.283" UserId="139" Text="Using unspent funds from Treasury as staking rewards" ContentLicense="CC BY-SA 4.0" />
  <row Id="4459" PostHistoryTypeId="3" PostId="1222" RevisionGUID="bb7ead9a-a03c-46f0-b5e1-24224ed8298d" CreationDate="2022-03-25T09:42:33.283" UserId="139" Text="|staking|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4460" PostHistoryTypeId="11" PostId="729" RevisionGUID="ae601806-2929-41ca-b8a7-81d1b2a0d02d" CreationDate="2022-03-25T10:07:33.413" UserId="-1" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:368,&quot;DisplayName&quot;:&quot;smm&quot;}]}" />
  <row Id="4461" PostHistoryTypeId="2" PostId="1223" RevisionGUID="84b838ca-b61a-4cb7-97ec-9a8c6bdb9b92" CreationDate="2022-03-25T10:15:26.187" UserId="129" Text="I solved the problem. Before I had run the Shiden network, I run the command for polkadot network and I forgot to delete the postgres db (or change the path in the config file to the new db). After creating a new postgres db and change the uri in the config file, the problem solved." ContentLicense="CC BY-SA 4.0" />
  <row Id="4463" PostHistoryTypeId="2" PostId="1224" RevisionGUID="edab9a87-1cc3-4e71-bdd0-435f0c0da878" CreationDate="2022-03-25T10:42:26.450" UserId="1789" Text="I am trying to use one pallet function inside my own pallet... but the argument types have problems...&#xD;&#xA;&#xD;&#xA;		pub fn vested_transfer(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;			locked: BalanceOf&lt;T&gt;,&#xD;&#xA;			per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;			starting_block: BlockNumberFor&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			let vesting_info = pallet_vesting::VestingInfo::&lt;BalanceOf&lt;T&gt;, BlockNumberFor&lt;T&gt;&gt;::new(&#xD;&#xA;				locked,&#xD;&#xA;				per_block,&#xD;&#xA;				starting_block,&#xD;&#xA;			);&#xD;&#xA;			let is_valid = vesting_info.is_valid();&#xD;&#xA;			ensure!(is_valid, &quot;invalid vesting_info&quot;);&#xD;&#xA;			let res = pallet_vesting::Pallet::&lt;T&gt;::vested_transfer(origin, target, vesting_info);&#xD;&#xA;&#xD;&#xA;Then the error message for the 3rd argument vesting_info:&#xD;&#xA;... vesting_info... expected pallet_vesting::Config::Currency, found pallet::Config::Currency&#xD;&#xA;&#xD;&#xA;Then I tried this to cast the vesting_info type: &#xD;&#xA;&#xD;&#xA;    vesting_info as pallet_vesting::Config::Currency&#xD;&#xA;&#xD;&#xA;then the error message: use fully-qualified syntax: `&lt;Type as pallet_vesting::Config&gt;::Currency`&#xD;&#xA;&#xD;&#xA;Then I tried this to fix that casting:&#xD;&#xA;&#xD;&#xA;    vesting_info as &lt;&lt;T as pallet::Config&gt;::Currency as pallet_vesting::Config&gt;::Currency,&#xD;&#xA;&#xD;&#xA;... use of undeclared crate or module `pallet`&#xD;&#xA;&#xD;&#xA;how to use &quot;pallet&quot; ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4465" PostHistoryTypeId="1" PostId="1224" RevisionGUID="edab9a87-1cc3-4e71-bdd0-435f0c0da878" CreationDate="2022-03-25T10:42:26.450" UserId="1789" Text="How to use different types across different pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="4466" PostHistoryTypeId="3" PostId="1224" RevisionGUID="edab9a87-1cc3-4e71-bdd0-435f0c0da878" CreationDate="2022-03-25T10:42:26.450" UserId="1789" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4467" PostHistoryTypeId="2" PostId="1225" RevisionGUID="ae4b2cd8-6319-4a59-b35a-03e0a815849c" CreationDate="2022-03-25T10:44:05.927" UserId="1896" Text="What is the impact of underestimating weights? In what way could an adversary make use of this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4469" PostHistoryTypeId="1" PostId="1225" RevisionGUID="ae4b2cd8-6319-4a59-b35a-03e0a815849c" CreationDate="2022-03-25T10:44:05.927" UserId="1896" Text="What's the impact of underestimating Weights?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4470" PostHistoryTypeId="3" PostId="1225" RevisionGUID="ae4b2cd8-6319-4a59-b35a-03e0a815849c" CreationDate="2022-03-25T10:44:05.927" UserId="1896" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4472" PostHistoryTypeId="2" PostId="1226" RevisionGUID="3236b5f3-cc9f-4129-9963-ed6f06c1b18b" CreationDate="2022-03-25T11:00:20.313" UserId="88" Text="I was exploring typegen for my node's custom types and came across these two concepts in the acala.js codebase in the `type-definitions` package (their use of a &quot;types-bundle.json&quot;), and something similar in the polkadot-js `types-known` package (their use of a &quot;magic number&quot; and version arrays/overrides). So far I've followed the polkadot-js docs for type gen and these haven't really come up. What I tend to do is pull the metadata, then run the typegen based on a single JSON file that specifies the custom types on the chain with the specified directory structure (I still get type errors but I feel like an understanding of the proper process would help mitigate this).&#xD;&#xA;&#xD;&#xA;It seems there is some best practice related to this process for handling multiple chains and exposing the types in one package, and I'd like to know how that works and what the different steps/files involved are." ContentLicense="CC BY-SA 4.0" />
  <row Id="4474" PostHistoryTypeId="1" PostId="1226" RevisionGUID="3236b5f3-cc9f-4129-9963-ed6f06c1b18b" CreationDate="2022-03-25T11:00:20.313" UserId="88" Text="What are type bundles and versioned metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4475" PostHistoryTypeId="3" PostId="1226" RevisionGUID="3236b5f3-cc9f-4129-9963-ed6f06c1b18b" CreationDate="2022-03-25T11:00:20.313" UserId="88" Text="|polkadot-js|types|metadata|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4476" PostHistoryTypeId="2" PostId="1227" RevisionGUID="5cdde044-519a-44b8-a827-9305b4fb2b0a" CreationDate="2022-03-25T11:02:30.520" UserId="94" Text="Great question! &#xD;&#xA;&#xD;&#xA;You don't really need an adversary as even normal chain usage can cause problems in such a scenario.  &#xD;&#xA;The speed of block finalization in Substrate relies on the assumption that each block takes a known-in-advance time to execute, defined by its weight.  &#xD;&#xA;Lets assume the following scenario:  &#xD;&#xA;The weights of `Balances::transfer` is too low for whatever reason.  &#xD;&#xA;&#xD;&#xA;Substrate now receives a block with many transfers.  &#xD;&#xA;It assumes to be able to execute it in 2 seconds, since weights indicate that.  &#xD;&#xA;Now since the weights are too low, it takes longer than 2s.  &#xD;&#xA;This makes it impossible to meet the target time to finish the finalization and stalls any further operation.  &#xD;&#xA;An &quot;adversary&quot; could now exploit that by sending many transfers to stall the chain further.&#xD;&#xA;&#xD;&#xA;I am not sure what the consequences of that would be;  &#xD;&#xA;in the best case the tx-pool would just fill up and you would need to wait longer for your Extrinsic fo finalize.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4478" PostHistoryTypeId="2" PostId="1228" RevisionGUID="91284d97-2cee-4b4b-98bc-0c4ad7bfa958" CreationDate="2022-03-25T11:04:31.273" UserId="85" Text="They can flood your chain with spam transactions and worse they can bloat your state. If your state is very large then it is more time consuming to sync and costly to store. Ideally state growth should stay under the growth of the underlying storage of SSD sizes otherwise things get expensive and you can't use readily available consumer hardware.&#xD;&#xA;&#xD;&#xA;So best to err on the side of caution and be conservative. You can always reduce the weights later." ContentLicense="CC BY-SA 4.0" />
  <row Id="4480" PostHistoryTypeId="2" PostId="1229" RevisionGUID="733ac8b7-54f5-4f53-a47a-9f068782eeca" CreationDate="2022-03-25T11:13:54.963" UserId="53" Text="Basically the same as what happened in Ethereum's Shanghai Attacks. An &quot;attacker&quot; would submit a lot of transactions with the underestimated weights. They would effectively underpay the network for its work and the network would find it had more work to do than the time allowed. However, there's really no material difference here between attacking the network and using the network. The only difference is one of intention.&#xD;&#xA;&#xD;&#xA;For Relay chains like Polkadot, this is problematic in that it slows down block production and disenfranchises users transacting with accurate weights. Taken to the extreme, you'll end up with a denegerate network where blocks take many times as long to create as the nominal block period.&#xD;&#xA;&#xD;&#xA;For parachains this is far worse: parachains work within a much more stringent timing requirements, needing to prepare, author, submit and have verified their blocks in a limited period. The consequence of substantial underestimation of weights could result in the chain stalling completely. (Asynchronous Backing, a major parachain optimisation feature will likely help with this, but won't alleviate it completely.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4487" PostHistoryTypeId="2" PostId="1231" RevisionGUID="8c182399-89f6-403e-b108-9378a30de816" CreationDate="2022-03-25T11:19:40.887" UserId="627" Text="First the good news - for any chain using metadata v14, specifying custom types are not needed. The metadata itself supplies all the types required. This means that when a call is defined in the metadata, the metadata itself specifies the exact type. &#xD;&#xA;&#xD;&#xA;For older versions of the metadata, the reality was different - for each call, the metadata only supplied the type name. This meant that there needed to be a mapping to understand that something called `Balance` is actually a `u128` type and should be encoded and decoded that way.&#xD;&#xA;&#xD;&#xA;On to your question which relates to chains that have not upgraded to v14 as of yet or chains where there is a requirement to query older blocks. For these, you need to supply a mapping of the type names to the actual type it relates to, for instance in your chain you could have `Balance` -&gt; `u64`.&#xD;&#xA;&#xD;&#xA;Taking this example, in Substrate chains are upgradable, so at some point you could decide to change the `Balance` type to a `u128` (with the required migrations). At this point, instead of injecting the `Balance -&gt; u64` mapping, you would inject `Balance -&gt; u128` as a type mapping. So types can and do change through the lifecycle of the runtime.&#xD;&#xA;&#xD;&#xA;In this case we now have an issue - assuming you used `Balance -&gt; u64` up to runtime version 100 and 101 and above used `Balance -&gt; u128`, you will have issues querying blocks before runtime 101, i.e. those will try to decode with the new types.&#xD;&#xA;&#xD;&#xA;To get around this and define types for specific runtime version ranges, the a types bundle entry has 2 parts -&#xD;&#xA;&#xD;&#xA; - the version range, i.e. first runtime version and last runtime version&#xD;&#xA; - the actual types that needs to be applied to this version specified by the min/max range&#xD;&#xA;&#xD;&#xA;A very good example of this is the [Kusama types bundle](https://github.com/polkadot-js/api/blob/b44fcc90b23d8c2915471a8db5825da613199093/packages/types-known/src/spec/kusama.ts#L40-L189) that tracks the chain and all types from the first runtime version up to the present (where no [overrides are applied](https://github.com/polkadot-js/api/blob/b44fcc90b23d8c2915471a8db5825da613199093/packages/types-known/src/spec/kusama.ts#L184-L188) due to metadata v14 being in operation)&#xD;&#xA;&#xD;&#xA;Pulling it all together, for the `Balance` example above, your types bundle would look something like the following -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    // for runtime 0 to 100 &#xD;&#xA;    minmax: [0, 100],&#xD;&#xA;    types: {&#xD;&#xA;      Balance: 'u64'&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    // runtime 101 upgrades to the new Balance&#xD;&#xA;    minmax: [101, 200],&#xD;&#xA;    types: {&#xD;&#xA;      Balance: 'u128'&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    // runtime 201 swapped to metadata v14, nothing needed&#xD;&#xA;    minmax: [201, undefined],&#xD;&#xA;    types: {}&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4489" PostHistoryTypeId="2" PostId="1232" RevisionGUID="96004688-55b7-419f-a08b-97506d228164" CreationDate="2022-03-25T11:35:25.913" UserId="104" Text="I'm not sure what your pallet's functionality is, but _any_ configurable parameter for the pallet should appear as a parameter to the dispatch function, i.e. this here:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn xregister(origin: OriginFor&lt;T&gt;, name: Vec&lt;u8&gt;) -&gt; DispatchResultWithPostInfo&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;needs to be changed to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn xregister(origin: OriginFor&lt;T&gt;, name: Vec&lt;u8&gt;, pallet_id: u8, method_id: u8) -&gt; DispatchResultWithPostInfo&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;... in order for the caller of `xregister` to be able to specify the `palletId` and the `methodId` in the call." ContentLicense="CC BY-SA 4.0" />
  <row Id="4491" PostHistoryTypeId="5" PostId="1224" RevisionGUID="46f26caf-a5ae-4a06-a11f-30446eaa4689" CreationDate="2022-03-25T12:36:13.373" UserId="1789" Comment="added 20 characters in body" Text="I am trying to use one pallet function inside my own pallet... but the argument types have problems...&#xD;&#xA;&#xD;&#xA;		pub fn vested_transfer(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;			locked: BalanceOf&lt;T&gt;,&#xD;&#xA;			per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;			starting_block: BlockNumberFor&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			let vesting_info = pallet_vesting::VestingInfo::&lt;BalanceOf&lt;T&gt;, BlockNumberFor&lt;T&gt;&gt;::new(&#xD;&#xA;				locked,&#xD;&#xA;				per_block,&#xD;&#xA;				starting_block,&#xD;&#xA;			);&#xD;&#xA;			let is_valid = vesting_info.is_valid();&#xD;&#xA;			ensure!(is_valid, &quot;invalid vesting_info&quot;);&#xD;&#xA;			let res = pallet_vesting::Pallet::&lt;T&gt;::vested_transfer(origin, target, vesting_info);&#xD;&#xA;&#xD;&#xA;Then the error message for the 3rd argument vesting_info:&#xD;&#xA;... vesting_info... expected pallet_vesting::Config::Currency, found pallet::Config::Currency&#xD;&#xA;&#xD;&#xA;Then I tried this to cast the vesting_info type: &#xD;&#xA;&#xD;&#xA;    vesting_info as pallet_vesting::Config::Currency&#xD;&#xA;&#xD;&#xA;then the error message: use fully-qualified syntax: `&lt;Type as pallet_vesting::Config&gt;::Currency`&#xD;&#xA;&#xD;&#xA;Then I tried this to fix that casting:&#xD;&#xA;&#xD;&#xA;    vesting_info as &lt;&lt;T as pallet::Config&gt;::Currency as pallet_vesting::Config&gt;::Currency,&#xD;&#xA;&#xD;&#xA;then the error message: use of undeclared crate or module `pallet`&#xD;&#xA;&#xD;&#xA;how to use &quot;pallet&quot; ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4492" PostHistoryTypeId="2" PostId="1233" RevisionGUID="d2fb4c79-e07c-4e07-94fd-06f0e407e2a3" CreationDate="2022-03-25T12:42:41.913" UserId="1866" Text="I am trying to programatically construct the hash as used for multisig transactions, basically the [approveAsMulti](https://polkadot.js.org/docs/substrate/extrinsics#approveasmultithreshold-u16-other_signatories-vecaccountid32-maybe_timepoint-optionpalletmultisigtimepoint-call_hash-u832-max_weight-u64) which taking a call hash.&#xD;&#xA;&#xD;&#xA;So my code is along the following form,&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;/* create the tx */&#xD;&#xA;const inner = api.tx.balances.transfer('1G...', 100000000)&#xD;&#xA;&#xD;&#xA;/* generate the hash */&#xD;&#xA;const hash = inner.hash&#xD;&#xA;&#xD;&#xA;/* generate the approval */&#xD;&#xA;const multi = api.tx.multisig.approveAsMulti(2, ['1G...', ...], null, hash, weight)&#xD;&#xA;&#xD;&#xA;/* send it here ... */&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However the hash I generate is not the same hash as what I can see in the UI, so right at the end I cannot actually seem to approve the final step via the UI. So I'm not sure what goes wrong, the hashes should match?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4494" PostHistoryTypeId="1" PostId="1233" RevisionGUID="d2fb4c79-e07c-4e07-94fd-06f0e407e2a3" CreationDate="2022-03-25T12:42:41.913" UserId="1866" Text="How do I match the hash from JS API to that displayed in the UI" ContentLicense="CC BY-SA 4.0" />
  <row Id="4495" PostHistoryTypeId="3" PostId="1233" RevisionGUID="d2fb4c79-e07c-4e07-94fd-06f0e407e2a3" CreationDate="2022-03-25T12:42:41.913" UserId="1866" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4496" PostHistoryTypeId="10" PostId="996" RevisionGUID="f9e0b9aa-a5d7-44cf-9f79-d8c59a1ab318" CreationDate="2022-03-25T13:11:49.130" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[368],&quot;Voters&quot;:[{&quot;Id&quot;:85,&quot;DisplayName&quot;:&quot;Squirrel&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;}]}" />
  <row Id="4499" PostHistoryTypeId="5" PostId="1224" RevisionGUID="b46d20ef-038c-4ec5-bbab-e153079578b6" CreationDate="2022-03-25T14:03:21.647" UserId="1789" Comment="added 857 characters in body; edited title" Text="I am trying to use one pallet function inside my own pallet... but the argument types have problems...&#xD;&#xA;&#xD;&#xA;      #[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config + pallet_vesting::Config {&#xD;&#xA;        ...}&#xD;&#xA;      #[pallet::call]&#xD;&#xA;      impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        ...&#xD;&#xA;		pub fn vested_transfer(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;			locked: BalanceOf&lt;T&gt;,&#xD;&#xA;			per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;			starting_block: BlockNumberFor&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			let vesting_info = pallet_vesting::VestingInfo::&lt;BalanceOf&lt;T&gt;, BlockNumberFor&lt;T&gt;&gt;::new(&#xD;&#xA;				locked,&#xD;&#xA;				per_block,&#xD;&#xA;				starting_block,&#xD;&#xA;			);&#xD;&#xA;			let is_valid = vesting_info.is_valid();&#xD;&#xA;			ensure!(is_valid, &quot;invalid vesting_info&quot;);&#xD;&#xA;			let res = pallet_vesting::Pallet::&lt;T&gt;::vested_transfer(origin, target, vesting_info);&#xD;&#xA;&#xD;&#xA;Then the error message for the 3rd argument vesting_info:&#xD;&#xA;... vesting_info... expected pallet_vesting::Config::Currency, found pallet::Config::Currency&#xD;&#xA;&#xD;&#xA;Then I tried this to cast the vesting_info type: &#xD;&#xA;&#xD;&#xA;    vesting_info as pallet_vesting::Config::Currency&#xD;&#xA;&#xD;&#xA;... error message: use fully-qualified syntax: `&lt;Type as pallet_vesting::Config&gt;::Currency`&#xD;&#xA;&#xD;&#xA;Then I tried this to fix that the 3rd argument:&#xD;&#xA;&#xD;&#xA;    vesting_info as &lt;&lt;T as pallet::Config&gt;::Currency as pallet_vesting::Config&gt;::Currency,&#xD;&#xA;&#xD;&#xA;... error message: use of undeclared crate or module `pallet`&#xD;&#xA;&#xD;&#xA;Then I tried this to fix that the 3rd argument:&#xD;&#xA;&#xD;&#xA;    vesting_info as &lt;&lt;T as Config&gt;::Currency as pallet_vesting::Config&gt;::Currency,&#xD;&#xA;&#xD;&#xA;... error message: the trait `pallet_vesting::Config` is not implemented for `&lt;T as pallet::Config&gt;::Currency`... an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object&#xD;&#xA;&#xD;&#xA;Then I tried this to fix that the 3rd argument:&#xD;&#xA;&#xD;&#xA;    vesting_info as &lt;&lt;T as Self::Config&gt;::Currency as pallet_vesting::Config&gt;::Currency,&#xD;&#xA;&#xD;&#xA;... error message: the name `Config` is defined multiple times; cannot find associated type `Currency` in `Self::Config`&#xD;&#xA;&#xD;&#xA;how to use &quot;pallet&quot; or different pallet function argument types ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4500" PostHistoryTypeId="4" PostId="1224" RevisionGUID="b46d20ef-038c-4ec5-bbab-e153079578b6" CreationDate="2022-03-25T14:03:21.647" UserId="1789" Comment="added 857 characters in body; edited title" Text="How to use different argument types across different pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="4504" PostHistoryTypeId="2" PostId="1235" RevisionGUID="caca5f1c-fe62-489c-9d40-22d62eb0a348" CreationDate="2022-03-25T14:20:14.533" UserId="179" Text="I'm trying to onboard a team to paraID2000 on Rococo, but I'm not being able to do so successfully. The ID was previously being used by another team that attempted to upgrade their chain and bricked it. What I did was to manually delete the `futureCodeHash` for that previous chain, deregister the paraID, and then re-register it with the new team's information (`registar.forceRegister(who, deposit,id,gensis,wasm`)). Still, the parachain is not producing blocks and I'm not entirely sure why. &#xD;&#xA;&#xD;&#xA;Did I miss any steps in the middle? How can I best debug this?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4506" PostHistoryTypeId="1" PostId="1235" RevisionGUID="caca5f1c-fe62-489c-9d40-22d62eb0a348" CreationDate="2022-03-25T14:20:14.533" UserId="179" Text="Rococo onchain parachain registration not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="4507" PostHistoryTypeId="3" PostId="1235" RevisionGUID="caca5f1c-fe62-489c-9d40-22d62eb0a348" CreationDate="2022-03-25T14:20:14.533" UserId="179" Text="|parachain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4510" PostHistoryTypeId="2" PostId="1236" RevisionGUID="29b44e96-2c9e-4521-b2e8-544c53be61ef" CreationDate="2022-03-25T14:36:45.693" UserId="474" Text="You may need to clarify your question, but these samples might help:&#xD;&#xA;&#xD;&#xA;- A bit of an intro to constructing storage keys and obtaining storage entries from them via a node's RPC API:&#xD;&#xA;&#xD;&#xA;  https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/04_storage.rs&#xD;&#xA;&#xD;&#xA;- How subxt constructs storage keys and uses them to get values back from the RPC API:&#xD;&#xA;&#xD;&#xA;  https://github.com/paritytech/subxt/blob/master/subxt/src/storage.rs#L81&#xD;&#xA;&#xD;&#xA;For the System Events storage, being a plain storage entry, it's quite easy:&#xD;&#xA;&#xD;&#xA;1. Take the pallet name and storage name you're interested in as ASCII bytes , hash them using twox_128 and concatenate the results:&#xD;&#xA;&#xD;&#xA;  ```rust&#xD;&#xA;  let mut prefix = Vec::new();&#xD;&#xA;  prefix.extend(sp_core::twox_128(b&quot;System&quot;));&#xD;&#xA;  prefix.extend(sp_core::twox_128(b&quot;Events&quot;));&#xD;&#xA;  ```&#xD;&#xA;&#xD;&#xA;2. Submit that to the &quot;state_getStorage&quot; RPC endpoint to get back the SCALE encoded bytes representing the events. This would be a call like:&#xD;&#xA;&#xD;&#xA;  ```&#xD;&#xA;  { &#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;, &#xD;&#xA;    &quot;method&quot;: &quot;state_getStorage&quot;, &#xD;&#xA;    &quot;params&quot;: [prefix_hex, block_hash]&#xD;&#xA;  }&#xD;&#xA;  ```&#xD;&#xA;&#xD;&#xA;  Where the first param is the hex encoded `prefix` from (1) (for system event storage,  &quot;0x26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7&quot;), and the second is the hex encoded block hash, or null if you want events from the latest block.&#xD;&#xA;&#xD;&#xA;Bear in mind that your node will only keep storage from some set number of historic blocks; you'll need to fun an archive node I believe to be able to query _any_ block hash and get back the events from it." ContentLicense="CC BY-SA 4.0" />
  <row Id="4512" PostHistoryTypeId="2" PostId="1237" RevisionGUID="88449379-34f1-4602-b447-3e636368cd8e" CreationDate="2022-03-25T14:43:38.407" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4514" PostHistoryTypeId="1" PostId="1237" RevisionGUID="88449379-34f1-4602-b447-3e636368cd8e" CreationDate="2022-03-25T14:43:38.407" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4515" PostHistoryTypeId="2" PostId="1238" RevisionGUID="a65280bb-c201-4549-ac5a-483454ff245b" CreationDate="2022-03-25T14:43:38.407" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4517" PostHistoryTypeId="1" PostId="1238" RevisionGUID="a65280bb-c201-4549-ac5a-483454ff245b" CreationDate="2022-03-25T14:43:38.407" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4518" PostHistoryTypeId="2" PostId="1239" RevisionGUID="8a7354a7-ab23-47c2-bcf8-e62969ea3001" CreationDate="2022-03-25T14:44:22.680" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4520" PostHistoryTypeId="1" PostId="1239" RevisionGUID="8a7354a7-ab23-47c2-bcf8-e62969ea3001" CreationDate="2022-03-25T14:44:22.680" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4521" PostHistoryTypeId="2" PostId="1240" RevisionGUID="9a445075-d849-4bd3-904e-41584a928d7d" CreationDate="2022-03-25T14:44:22.680" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4523" PostHistoryTypeId="1" PostId="1240" RevisionGUID="9a445075-d849-4bd3-904e-41584a928d7d" CreationDate="2022-03-25T14:44:22.680" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4525" PostHistoryTypeId="2" PostId="1241" RevisionGUID="13ed4598-8222-419c-a9c1-5fa17eda1d62" CreationDate="2022-03-25T14:44:57.613" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4527" PostHistoryTypeId="1" PostId="1241" RevisionGUID="13ed4598-8222-419c-a9c1-5fa17eda1d62" CreationDate="2022-03-25T14:44:57.613" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4528" PostHistoryTypeId="2" PostId="1242" RevisionGUID="6d1eceb9-da30-41a9-b962-1e651d6ac723" CreationDate="2022-03-25T14:44:57.613" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4530" PostHistoryTypeId="1" PostId="1242" RevisionGUID="6d1eceb9-da30-41a9-b962-1e651d6ac723" CreationDate="2022-03-25T14:44:57.613" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4531" PostHistoryTypeId="6" PostId="619" RevisionGUID="0c5ce5ef-3d1e-49c6-b999-5504ada2e22a" CreationDate="2022-03-25T14:46:08.630" UserId="172" Comment="Add tag for kitties tutorial." Text="|frame|maxencodedlen|kitties-tutorial|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4532" PostHistoryTypeId="5" PostId="1236" RevisionGUID="d27f2d3e-9c5c-4022-9384-4a6a77b9651e" CreationDate="2022-03-25T14:46:46.723" UserId="474" Comment="edited body" Text="You may need to clarify your question, but these samples might help:&#xD;&#xA;&#xD;&#xA;- A bit of an intro to constructing storage keys and obtaining storage entries from them via a node's RPC API:&#xD;&#xA;&#xD;&#xA;  https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/04_storage.rs&#xD;&#xA;&#xD;&#xA;- How subxt constructs storage keys and uses them to get values back from the RPC API:&#xD;&#xA;&#xD;&#xA;  https://github.com/paritytech/subxt/blob/master/subxt/src/storage.rs#L81&#xD;&#xA;&#xD;&#xA;For the System Events storage, being a plain storage entry, it's quite easy:&#xD;&#xA;&#xD;&#xA;1. Take the pallet name and storage name you're interested in as ASCII bytes , hash them using twox_128 and concatenate the results:&#xD;&#xA;&#xD;&#xA;  ```rust&#xD;&#xA;  let mut prefix = Vec::new();&#xD;&#xA;  prefix.extend(sp_core::twox_128(b&quot;System&quot;));&#xD;&#xA;  prefix.extend(sp_core::twox_128(b&quot;Events&quot;));&#xD;&#xA;  ```&#xD;&#xA;&#xD;&#xA;2. Submit that to the &quot;state_getStorage&quot; RPC endpoint to get back the SCALE encoded bytes representing the events. This would be a call like:&#xD;&#xA;&#xD;&#xA;  ```&#xD;&#xA;  { &#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;, &#xD;&#xA;    &quot;method&quot;: &quot;state_getStorage&quot;, &#xD;&#xA;    &quot;params&quot;: [prefix_hex, block_hash]&#xD;&#xA;  }&#xD;&#xA;  ```&#xD;&#xA;&#xD;&#xA;  Where the first param is the hex encoded `prefix` from (1) (for system event storage,  &quot;0x26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7&quot;), and the second is the hex encoded block hash, or null if you want events from the latest block.&#xD;&#xA;&#xD;&#xA;Bear in mind that your node will only keep storage from some set number of historic blocks; you'll need to run an archive node I believe to be able to query _any_ block hash and get back the events from it." ContentLicense="CC BY-SA 4.0" />
  <row Id="4533" PostHistoryTypeId="2" PostId="1243" RevisionGUID="a749f81b-4be9-4ba6-b3dc-3f14a42c4ca6" CreationDate="2022-03-25T14:46:52.447" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4535" PostHistoryTypeId="1" PostId="1243" RevisionGUID="a749f81b-4be9-4ba6-b3dc-3f14a42c4ca6" CreationDate="2022-03-25T14:46:52.447" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4536" PostHistoryTypeId="2" PostId="1244" RevisionGUID="212ac01c-265c-404e-b9a0-e51475b11d74" CreationDate="2022-03-25T14:46:52.447" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4538" PostHistoryTypeId="1" PostId="1244" RevisionGUID="212ac01c-265c-404e-b9a0-e51475b11d74" CreationDate="2022-03-25T14:46:52.447" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4539" PostHistoryTypeId="2" PostId="1245" RevisionGUID="d2da3a94-627b-49c4-8e7f-c977b08c63e6" CreationDate="2022-03-25T14:48:00.017" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4541" PostHistoryTypeId="1" PostId="1245" RevisionGUID="d2da3a94-627b-49c4-8e7f-c977b08c63e6" CreationDate="2022-03-25T14:48:00.017" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4542" PostHistoryTypeId="2" PostId="1246" RevisionGUID="c9b38269-e2cb-4f6b-815e-e894b40d28dd" CreationDate="2022-03-25T14:48:00.017" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4544" PostHistoryTypeId="1" PostId="1246" RevisionGUID="c9b38269-e2cb-4f6b-815e-e894b40d28dd" CreationDate="2022-03-25T14:48:00.017" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4545" PostHistoryTypeId="2" PostId="1247" RevisionGUID="5790b997-1d29-456d-aee2-efa120d78d39" CreationDate="2022-03-25T14:48:43.327" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4547" PostHistoryTypeId="1" PostId="1247" RevisionGUID="5790b997-1d29-456d-aee2-efa120d78d39" CreationDate="2022-03-25T14:48:43.327" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4548" PostHistoryTypeId="2" PostId="1248" RevisionGUID="4cc3967d-d8d6-4d4a-a7ae-f28a5038433f" CreationDate="2022-03-25T14:48:43.327" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4550" PostHistoryTypeId="1" PostId="1248" RevisionGUID="4cc3967d-d8d6-4d4a-a7ae-f28a5038433f" CreationDate="2022-03-25T14:48:43.327" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4552" PostHistoryTypeId="2" PostId="1249" RevisionGUID="4d53a0dc-70ef-408b-85c7-106270cf9345" CreationDate="2022-03-25T15:02:10.470" UserId="280" Text="The quick and easy way to solve your issue would be to [tightly couple](https://docs.substrate.io/how-to-guides/v3/pallet-design/tight-coupling/) your pallet's `Config` trait with the one of `pallet_vesting`. This way, you would not have to define the `Currency` trait in your Config.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type BalanceOf&lt;T&gt; = &lt;&lt;T as pallet_vesting::Config&gt;::Currency as Currency&lt;&#xD;&#xA;		&lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;	&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;pub trait Config: frame_system::Config + pallet_vesting::Config {&#xD;&#xA;   // your custom associated types&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can simply call the `vested_transfer` like so&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(10_000)]&#xD;&#xA;pub fn your_custom_extrinsic(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	target: &lt;T::Lookup as sp_runtime::traits::StaticLookup&gt;::Source,&#xD;&#xA;	vesting_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;	per_block: BalanceOf&lt;T&gt;,&#xD;&#xA;	lock_period: T::BlockNumber,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;	let vesting_info = pallet_vesting::VestingInfo::&lt;BalanceOf&lt;T&gt;, T::BlockNumber&gt;::new(&#xD;&#xA;		vesting_amount,&#xD;&#xA;		per_block,&#xD;&#xA;		lock_period,&#xD;&#xA;	);&#xD;&#xA;	pallet_vesting::Pallet::&lt;T&gt;::vested_transfer(origin, target, vesting_info)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Without tight coupling, it is more complicated. On a high level, you would need to provide a conversion from your `pallet::Config::Currency` trait to the one of `pallet_vesting::Config::Currency`.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="4554" PostHistoryTypeId="2" PostId="1250" RevisionGUID="7d3d9b4a-6c98-4157-9ad4-8c88383a2613" CreationDate="2022-03-25T15:04:41.267" UserId="627" Text="The short version: for the call-only part, use `inner.method.hash`. &#xD;&#xA;&#xD;&#xA;(I'll use your same `inner` naming throughout.)&#xD;&#xA;&#xD;&#xA;The longer version: The `api.tx` construct is representative of an extrinsic, initially when it is created, it is unsigned, once we use `inner.signAsync(...)` (or `inner.signAndSubmit(...)`), it is signed. So when you call `inner.hash`, you actually retrieve the (initially unsigned) extrinsic hash. &#xD;&#xA;&#xD;&#xA;Internally an extrinsic represented here has two major parts, &#xD;&#xA;&#xD;&#xA; - the signature (comprising the signing address, actual cryptographic signature and all data from the signed extensions as per the metadata definition)&#xD;&#xA; - the call (pallet/method index and call data as per metadata) &#xD;&#xA;&#xD;&#xA;So after all of this: For the hash of the call-only, access the call via the `.method` getter and then the `.hash` on that will return the hash for the call only." ContentLicense="CC BY-SA 4.0" />
  <row Id="4556" PostHistoryTypeId="2" PostId="1251" RevisionGUID="30ad3d55-a64d-4d95-9c96-a4cc78f49c93" CreationDate="2022-03-25T15:26:52.153" UserId="481" Text="If you want to pull a specific storage item from rocksdb, it requires traversing the patricia trie in order to find the key that you want. This can become complicated quickly, and is generally a slow way to retrieve _many_ keys. The code to do this within substrate can be seen here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/318dea38c9d8af7b526b35a619c393b08ad236ce/client/db/src/lib.rs#L145&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/318dea38c9d8af7b526b35a619c393b08ad236ce/primitives/state-machine/src/trie_backend_essence.rs#L80&#xD;&#xA;&#xD;&#xA;Specifically in reference to `RefTrackingState`, `TrieBackend` and `TrieBackendEssence`. &#xD;&#xA;&#xD;&#xA;The first step would be finding the `root` of the storage that you want, which should be provided as a hash in the block i.e the `StateRoot`.&#xD;&#xA;&#xD;&#xA;From there you would need a way to traverse the patricia trie to get to the key you want to pull:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/318dea38c9d8af7b526b35a619c393b08ad236ce/primitives/state-machine/src/trie_backend_essence.rs#L173&#xD;&#xA;&#xD;&#xA;the reason this is slow is because of the time complexity of traversing a trie -- there is no other way to retrieve storage keys from rocksdb.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Substrate has a bunch of traits/caching/syncing/performance optimizations built on top of this raw trie traversal which makes the code complicated to read into -- however it would be really cool if someone could distill this down into it's raw parts and demonstrate how to directly traverse storage keys for substrate rocksdb. I think it could lead to some interesting applications!&#xD;&#xA;&#xD;&#xA;I'm not the most versed in this however I hope this gives you a starting point to begin exploring the topic -- or at least manipulating the substrate trait objects / structs to do your bidding&#xD;&#xA;&#xD;&#xA;some reading on tries: https://en.wikipedia.org/wiki/Radix_tree" ContentLicense="CC BY-SA 4.0" />
  <row Id="4558" PostHistoryTypeId="2" PostId="1252" RevisionGUID="8cfdbb1d-b36b-4e16-8f49-d80d6960a65b" CreationDate="2022-03-25T15:30:12.837" UserId="627" Text="The `signAndSend` in the JS API is actually a process you can split into 2 parts: `.signAsync(...)` and `.send(...)`, internally the JS API does exactly that when calling `signAndSend(...)`. &#xD;&#xA;&#xD;&#xA;However even when splitting it like this, the signatory is responsible for paying the fees. When you sign a transaction, the signature actually is over the transaction payload, which includes the sender address and sender nonce, so in transaction validation both of these are checked as the originator.&#xD;&#xA;&#xD;&#xA;In the case of Polkadot, the chicken-and-egg situation where the user has no funds but has to perform a transaction was done as part of the claims process. Here a user would `attest` that he/she own an account, and have an action performed, without having any funds. &#xD;&#xA;&#xD;&#xA;The details for attest you can [find here](https://github.com/paritytech/polkadot/blob/7b41ce52d9262db1fee09d52d314198295789919/runtime/common/src/claims.rs#L410-L441)&#xD;&#xA;&#xD;&#xA;Basically the way that process works is to sign transaction with some account and then submit an unsigned transaction. A signed extension then validates this information. A similar approach could be followed: get one account to create a signature on some data, and then use another account to send the transaction.&#xD;&#xA;&#xD;&#xA;As you rightly point out, for the default proxy pallet, you need to have some funds reserved to be able to create a proxy. (But like in your example, the sender will pay the fees). The difference is that the full transaction is signed by the sender and all fees paid there, the account being proxied never gets involved after the initial setup." ContentLicense="CC BY-SA 4.0" />
  <row Id="4560" PostHistoryTypeId="5" PostId="1251" RevisionGUID="e6760fda-d5f7-43b5-b037-e80bb0916b38" CreationDate="2022-03-25T15:35:53.370" UserId="481" Comment="added 215 characters in body" Text="If you want to pull a specific storage item from rocksdb, it requires traversing the patricia trie in order to find the key that you want. This can become complicated quickly, and is generally a slow way to retrieve _many_ keys. The code to do this within substrate can be seen here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/318dea38c9d8af7b526b35a619c393b08ad236ce/client/db/src/lib.rs#L145&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/318dea38c9d8af7b526b35a619c393b08ad236ce/primitives/state-machine/src/trie_backend_essence.rs#L80&#xD;&#xA;&#xD;&#xA;Specifically in reference to `RefTrackingState`, `TrieBackend` and `TrieBackendEssence`. &#xD;&#xA;&#xD;&#xA;The first step would be finding the `root` of the storage that you want, which should be provided as a hash in the block i.e the `StateRoot`.&#xD;&#xA;&#xD;&#xA;From there you would need a way to traverse the patricia trie to get to the key you want to pull:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/318dea38c9d8af7b526b35a619c393b08ad236ce/primitives/state-machine/src/trie_backend_essence.rs#L173&#xD;&#xA;&#xD;&#xA;the reason this is slow is because of the time complexity of traversing a trie -- there is no other way to retrieve storage keys from rocksdb.&#xD;&#xA;&#xD;&#xA;The actual traversal (implemented as a rust `Iterator`) is implemented by this crate in substrate: https://github.com/paritytech/substrate/blob/318dea38c9d8af7b526b35a619c393b08ad236ce/primitives/trie/src/lib.rs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Substrate has a bunch of traits/caching/syncing/performance optimizations built on top of this raw trie traversal which makes the code complicated to read into -- however it would be really cool if someone could distill this down into it's raw parts and demonstrate how to directly traverse storage keys for substrate rocksdb. I think it could lead to some interesting applications!&#xD;&#xA;&#xD;&#xA;I'm not the most versed in this however I hope this gives you a starting point to begin exploring the topic -- or at least manipulating the substrate trait objects / structs to do your bidding&#xD;&#xA;&#xD;&#xA;some reading on tries: https://en.wikipedia.org/wiki/Radix_tree" ContentLicense="CC BY-SA 4.0" />
  <row Id="4561" PostHistoryTypeId="2" PostId="1253" RevisionGUID="89c2f679-2dc8-4b8e-8a7d-16a222c5890c" CreationDate="2022-03-25T16:24:47.937" UserId="280" Text="Unfortunately, I could not find how to add _unchecked weight_ to a call via Polkadot JS, e.g. within `signAndSend` or when preparing the unsigned extrinsic. Even in the [cookbook example for runtime upgrades](https://polkadot.js.org/docs/api/examples/promise/upgrade-chain), it is not mentioned.&#xD;&#xA;&#xD;&#xA;I am trying to fix the following error when calling `api.tx.configuration.setValidationUpgradeDelay(5)` with sudo by adding unchecked weight:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/app/node_modules/@polkadot/rpc-provider/coder/index.cjs:76&#xD;&#xA;      throw new _error.default(fmtMessage, code, data);&#xD;&#xA;            ^&#xD;&#xA;&#xD;&#xA;RpcError: 1010: Invalid Transaction: Transaction would exhaust the block limits&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4563" PostHistoryTypeId="1" PostId="1253" RevisionGUID="89c2f679-2dc8-4b8e-8a7d-16a222c5890c" CreationDate="2022-03-25T16:24:47.937" UserId="280" Text="How to provide unchecked weight to a call in Polkadot JS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4564" PostHistoryTypeId="3" PostId="1253" RevisionGUID="89c2f679-2dc8-4b8e-8a7d-16a222c5890c" CreationDate="2022-03-25T16:24:47.937" UserId="280" Text="|polkadot-js|extrinsic|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4565" PostHistoryTypeId="5" PostId="1229" RevisionGUID="ff522eba-6c4b-41a9-9649-0ad93f6becd3" CreationDate="2022-03-25T16:34:20.570" UserId="85" Comment="fixed typo" Text="Basically the same as what happened in Ethereum's Shanghai Attacks. An &quot;attacker&quot; would submit a lot of transactions with the underestimated weights. They would effectively underpay the network for its work and the network would find it had more work to do than the time allowed. However, there's really no material difference here between attacking the network and using the network. The only difference is one of intention.&#xD;&#xA;&#xD;&#xA;For Relay chains like Polkadot, this is problematic in that it slows down block production and disenfranchises users transacting with accurate weights. Taken to the extreme, you'll end up with a degenerate network where blocks take many times as long to create as the nominal block period.&#xD;&#xA;&#xD;&#xA;For parachains this is far worse: parachains work within a much more stringent timing requirements, needing to prepare, author, submit and have verified their blocks in a limited period. The consequence of substantial underestimation of weights could result in the chain stalling completely. (Asynchronous Backing, a major parachain optimisation feature will likely help with this, but won't alleviate it completely.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4566" PostHistoryTypeId="2" PostId="1254" RevisionGUID="769d2334-66e2-4c72-a263-80203683c464" CreationDate="2022-03-25T17:35:54.283" UserId="249" Text="It looks like they have created this process to request rococo slots. &#xD;&#xA;&#xD;&#xA;- https://github.com/paritytech/subport/issues/new/choose" ContentLicense="CC BY-SA 4.0" />
  <row Id="4568" PostHistoryTypeId="2" PostId="1255" RevisionGUID="648e649c-bc5e-4e26-8b5e-e2152dd1ba16" CreationDate="2022-03-25T17:38:44.143" UserId="544" Text="It looks like there's nothing preventing you to just implement your own `OnUnbalanced` that extracts funds from the treasury, and make minting as a fallback. Probably you can take a look at how `OnUnbalanced for ()` is implemented." ContentLicense="CC BY-SA 4.0" />
  <row Id="4570" PostHistoryTypeId="2" PostId="1256" RevisionGUID="0f8837cd-15cb-49e3-b2be-e5f3d7824f0f" CreationDate="2022-03-25T17:47:57.407" UserId="599" Text="I want to fetch information from some source via HTTP. I want to use the off-chain worker to do that after confirmation of transaction with details of the request. Then the response is received, I want to send an unsigned transaction with the result of the response and store that information on the blockchain level. It is similar to oracle flow. But in the future, I also want to do heavy computation work after getting the response.&#xD;&#xA;&#xD;&#xA;My questions:&#xD;&#xA;- Is that possible to run that HTTP request from the parachain's validators nodes?&#xD;&#xA;- If yes, how can I verify that the unsigned transaction was sent by parachain's validator?&#xD;&#xA;&#xD;&#xA;I see how I can implement that from the collator perspective. A can have a whitelist of collators who can post the response, and they can run that off-chain worker. But maybe it is possible to do from parachain's validators=)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4572" PostHistoryTypeId="1" PostId="1256" RevisionGUID="0f8837cd-15cb-49e3-b2be-e5f3d7824f0f" CreationDate="2022-03-25T17:47:57.407" UserId="599" Text="Off-chain workers on parachain's validators" ContentLicense="CC BY-SA 4.0" />
  <row Id="4573" PostHistoryTypeId="3" PostId="1256" RevisionGUID="0f8837cd-15cb-49e3-b2be-e5f3d7824f0f" CreationDate="2022-03-25T17:47:57.407" UserId="599" Text="|substrate-node|parachain|oracles|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4574" PostHistoryTypeId="2" PostId="1257" RevisionGUID="6a419107-0bc5-40e4-8a2e-4c67a0879bca" CreationDate="2022-03-25T17:52:50.823" UserId="544" Text="An easy way to monitor the network condition is to host your own Telemetry server just like how Parity provides the public service. You can find the code at [here](https://github.com/paritytech/substrate-telemetry). The substrate client will connect to the default telemetry endpoint if the user doesn't change it by cli flags. The default endpoint is stored in your chain spec file. So if you want to monitor your own blockchain, this could be a good enough approach.&#xD;&#xA;&#xD;&#xA;However, as pointed out in the comments, the Telemetry connection can always be opt-out by the user. To get a more accurate list, you can run your own crawler to walk the network. This is especially useful if you want to monitor a network without asking users to opt-in your telemetry service. Walking the p2p network is a pretty common pattern used by Bitcoin dns seed crawler. I didn't see any working code for Substrate, but since Substrate uses libp2p, maybe you can check if [some existing ipfs crawler](https://github.com/adlrocha/go-libp2p-crawler) can work with slightly tweaks." ContentLicense="CC BY-SA 4.0" />
  <row Id="4576" PostHistoryTypeId="2" PostId="1258" RevisionGUID="4ba79401-fe65-4b19-98f4-0c5d2bcc91fc" CreationDate="2022-03-25T17:58:43.013" UserId="544" Text="[ChainExtension](https://paritytech.github.io/ink-docs/macros-attributes/chain-extension/) is what you are looking for. It allows the runtime developer to register some native functions in the ink! wasm environment, and allow the ink! code to interact with the pallets directly.&#xD;&#xA;&#xD;&#xA;We can even use it to provides a lot more than just pallet invocation. For instance, at Phala Network, we exposes [HTTP request functions](https://github.com/Phala-Network/fat-contract-workshop/blob/7f4fda70752f9eeba3a8819f38078f1e3c527ae2/lib.rs#L149) in ink! query environment." ContentLicense="CC BY-SA 4.0" />
  <row Id="4579" PostHistoryTypeId="2" PostId="1259" RevisionGUID="9e5500dd-3125-45d2-8734-dc309b646a3c" CreationDate="2022-03-25T18:13:17.723" UserId="544" Text="By &quot;parachain's validator&quot; do you mean the relay chain validator allocated to the parachain? If that's the case, the answer is no. Relay chain validators only run the block validation and cannot be used for off-chain computation. This is necessary to prevent abuse of Polkadot validators. However, you can still verify some execution is being made by the collator in the block validation stage, as long as your off-chain submission is signed by the collator's session key." ContentLicense="CC BY-SA 4.0" />
  <row Id="4581" PostHistoryTypeId="2" PostId="1260" RevisionGUID="9f60281f-7f07-4e2a-a17a-7754a4bc9fdf" CreationDate="2022-03-25T18:36:42.503" UserId="692" Text="Im trying to store a public key in a StorageValue, but when i try to consult it on polkadot-js chain-state, the string gets cut off in the following manner: &#xD;&#xA;&#xD;&#xA;&gt; KeyStart...KeyEnd&#xD;&#xA;&#xD;&#xA;The value being put in storage has the following declaration:&#xD;&#xA;&#xD;&#xA;&gt; let public_key: Vec&lt; u8&gt; = ToRsaPublicKey::to_pkcs1_pem(&amp;pub_key).unwrap().as_bytes().to_vec();&#xD;&#xA;&#xD;&#xA;public_key.len() is 97.&#xD;&#xA;&#xD;&#xA;I think the string is being cut-off in JS, maybe due to &quot;text-overflow: ellipsis&quot; ?&#xD;&#xA;Is there a way to storage a large string without having to split it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4583" PostHistoryTypeId="1" PostId="1260" RevisionGUID="9f60281f-7f07-4e2a-a17a-7754a4bc9fdf" CreationDate="2022-03-25T18:36:42.503" UserId="692" Text="Query on polkadot-apps chain-state cuts of string. Text-overflow?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4584" PostHistoryTypeId="3" PostId="1260" RevisionGUID="9f60281f-7f07-4e2a-a17a-7754a4bc9fdf" CreationDate="2022-03-25T18:36:42.503" UserId="692" Text="|polkadot-js|frame|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4585" PostHistoryTypeId="10" PostId="1153" RevisionGUID="6fc3e2f4-88ee-4c4e-bfbf-c2f44865a2e4" CreationDate="2022-03-25T19:16:06.867" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:85,&quot;DisplayName&quot;:&quot;Squirrel&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:16,&quot;DisplayName&quot;:&quot;Alexander Theißen&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="4588" PostHistoryTypeId="2" PostId="1261" RevisionGUID="9c21b6d9-daae-4792-a3f0-34400894938c" CreationDate="2022-03-25T21:33:26.723" UserId="642" Text="I need to find my account's rank in the semi sorted bagsList hence I look for an API to do fetch that. why is it SEMIsorted that then needs to a rebag call that cost a fee? why it is not sorted at first place or kind of get sorted in the start of each era, snapshot time or any other suitable time?&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="4590" PostHistoryTypeId="1" PostId="1261" RevisionGUID="9c21b6d9-daae-4792-a3f0-34400894938c" CreationDate="2022-03-25T21:33:26.723" UserId="642" Text="How can I fetch the bagsList?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4591" PostHistoryTypeId="3" PostId="1261" RevisionGUID="9c21b6d9-daae-4792-a3f0-34400894938c" CreationDate="2022-03-25T21:33:26.723" UserId="642" Text="|pallet|polkadot|kusama|staking|baglist|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4594" PostHistoryTypeId="2" PostId="1262" RevisionGUID="bb856257-8a6d-4637-8142-6a9be981c2e1" CreationDate="2022-03-25T22:49:47.947" UserId="522" Text="We are using a machine, similar to reference: https://github.com/paritytech/substrate/pull/5848, to benchmark our runtime.&#xD;&#xA;To ascertain that our machine is close enough to the reference, we ran substrate (branch: polkadot-v0.9.16, commit: 19162e43be45817b44c7d48e50d03f074f60fbf4) benchmarks as is for the runtime.&#xD;&#xA;The resulting weights we got were about 20% lower than what is specified in substrate (in the respective weights.rs files), indicating that our machine is 20% faster than the reference.&#xD;&#xA;&#xD;&#xA;Is this expected? Should we get a slower machine? Downclock this one?&#xD;&#xA;Any help is greatly appreciated. Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="4596" PostHistoryTypeId="1" PostId="1262" RevisionGUID="bb856257-8a6d-4637-8142-6a9be981c2e1" CreationDate="2022-03-25T22:49:47.947" UserId="522" Text="Lower resulting weights, for substrate as is, upon benchmarking as compared to the weights file provided" ContentLicense="CC BY-SA 4.0" />
  <row Id="4597" PostHistoryTypeId="3" PostId="1262" RevisionGUID="bb856257-8a6d-4637-8142-6a9be981c2e1" CreationDate="2022-03-25T22:49:47.947" UserId="522" Text="|weight|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4598" PostHistoryTypeId="2" PostId="1263" RevisionGUID="41fc3000-c86c-4a46-bc5f-767801cb8be7" CreationDate="2022-03-25T22:53:58.943" UserId="1760" Text="Working code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use serde::{Serialize, Deserialize};&#xD;&#xA;use std::str::FromStr;&#xD;&#xA;use sp_keyring::AccountKeyring;&#xD;&#xA;use sp_runtime::{MultiAddress, MultiSignature, generic::Era};&#xD;&#xA;use parity_scale_codec::{ Compact, Encode };&#xD;&#xA;use sp_core::H256;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;#[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;struct SystemSyncState {&#xD;&#xA;    current_block: u32,&#xD;&#xA;    starting_block: u32,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;struct SystemSyncStateSuccess {&#xD;&#xA;    jsonrpc: String,&#xD;&#xA;    result: SystemSyncState,&#xD;&#xA;    id: u8,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;struct SystemAccountNextIndexSuccess {&#xD;&#xA;    jsonrpc: String,&#xD;&#xA;    result: u32,&#xD;&#xA;    id: u8,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;struct ChainGetBlockHashSuccess {&#xD;&#xA;    jsonrpc: String,&#xD;&#xA;    result: String,&#xD;&#xA;    id: u8,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;#[serde(untagged)]&#xD;&#xA;enum StateGetRuntimeVersionApis {&#xD;&#xA;    Int(u32),&#xD;&#xA;    Str(String),&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;#[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;struct StateGetRuntimeVersion {&#xD;&#xA;    apis: Vec&lt;[StateGetRuntimeVersionApis;2]&gt;,&#xD;&#xA;    authoring_version: u32,&#xD;&#xA;    impl_name: String,&#xD;&#xA;    impl_version: u32,&#xD;&#xA;    spec_name: String,&#xD;&#xA;    spec_version: u32,&#xD;&#xA;    transaction_version: u32,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;#[derive(Debug, Deserialize)]&#xD;&#xA;struct StateGetRuntimeVersionSuccess {&#xD;&#xA;    jsonrpc: String,&#xD;&#xA;    result: StateGetRuntimeVersion,&#xD;&#xA;    id: u8,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(Serialize)]&#xD;&#xA;struct NodeRequest {&#xD;&#xA;    id: u8,&#xD;&#xA;    jsonrpc: String,&#xD;&#xA;    method: String,&#xD;&#xA;    params: Vec&lt;String&gt;,&#xD;&#xA;}&#xD;&#xA;pub struct StorageKeyPrefix(Vec&lt;u8&gt;);&#xD;&#xA;&#xD;&#xA;async fn get_nonce(account: &amp;sp_runtime::AccountId32) -&gt; Result&lt;u32, Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;&#xD;&#xA;    let client = reqwest::Client::new();&#xD;&#xA;    let req = NodeRequest {&#xD;&#xA;        id: 1,&#xD;&#xA;        jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;        method: &quot;system_accountNextIndex&quot;.to_string(),&#xD;&#xA;        params: vec![account.to_string()],&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let res = client&#xD;&#xA;        .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;        .json(&amp;serde_json::json!(req))&#xD;&#xA;        .send()&#xD;&#xA;        .await;&#xD;&#xA;&#xD;&#xA;    match res {&#xD;&#xA;        Ok(res) =&gt; {&#xD;&#xA;            match res.status() {&#xD;&#xA;                reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                    match res.json::&lt;SystemAccountNextIndexSuccess&gt;().await {&#xD;&#xA;                        Ok(parsed) =&gt; {&#xD;&#xA;                            Ok(parsed.result)&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;                    }&#xD;&#xA;                },&#xD;&#xA;                _ =&gt; Err(String::from(&quot;Something went wrong&quot;).into())&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;async fn get_genesis_hash() -&gt; Result&lt;H256, Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;    let client = reqwest::Client::new();&#xD;&#xA;    let req = NodeRequest {&#xD;&#xA;        id: 1,&#xD;&#xA;        jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;        method: &quot;chain_getBlockHash&quot;.to_string(),&#xD;&#xA;        params: vec![&quot;0&quot;.to_string()]&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let res = client&#xD;&#xA;        .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;        .json(&amp;serde_json::json!(req))&#xD;&#xA;        .send()&#xD;&#xA;        .await;&#xD;&#xA;&#xD;&#xA;    match res {&#xD;&#xA;        Ok(res) =&gt; {&#xD;&#xA;            match res.status() {&#xD;&#xA;                reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                    match res.json::&lt;ChainGetBlockHashSuccess&gt;().await {&#xD;&#xA;                        Ok(parsed) =&gt; {&#xD;&#xA;                            let genesis_hash = parsed.result.replace(&quot;0x&quot;, &quot;&quot;);&#xD;&#xA;                            Ok(sp_core::H256::from_str(genesis_hash.as_ref()).unwrap())&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;                    }&#xD;&#xA;                },&#xD;&#xA;                _ =&gt; Err(String::from(&quot;Something went wrong&quot;).into())&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;async fn get_runtime_version() -&gt; Result&lt;StateGetRuntimeVersion, Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;    let client = reqwest::Client::new();&#xD;&#xA;    let req = NodeRequest {&#xD;&#xA;        id: 1,&#xD;&#xA;        jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;        method: &quot;state_getRuntimeVersion&quot;.to_string(),&#xD;&#xA;        params: vec![]&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let res = client&#xD;&#xA;        .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;        .json(&amp;serde_json::json!(req))&#xD;&#xA;        .send()&#xD;&#xA;        .await;&#xD;&#xA;&#xD;&#xA;    match res {&#xD;&#xA;        Ok(res) =&gt; {&#xD;&#xA;            match res.status() {&#xD;&#xA;                reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                    match res.json::&lt;StateGetRuntimeVersionSuccess&gt;().await {&#xD;&#xA;                        Ok(parsed) =&gt; {&#xD;&#xA;                            Ok(parsed.result)&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;                    }&#xD;&#xA;                },&#xD;&#xA;                _ =&gt; Err(String::from(&quot;Something went wrong&quot;).into())&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        Err(e) =&gt; Err(String::from(e.to_string()).into())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[async_std::main]&#xD;&#xA;async fn main() {&#xD;&#xA;    println!(&quot;TARGET HEX {:?}&quot;, &quot;0x29028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d013ce459f22bd4e8aac926c28ef632ca398216cb735f6c738243ccd0f0215aa20fd00fb01c5951d4a15959ae6e94af4dff0884d84878eed913e5e558419e607284002400080080346434633134633430643162376563623934323435353739343639336661363800&quot;);&#xD;&#xA;    let xt = create_extrinsic_call().await;&#xD;&#xA;    let xt_hex = hex::encode(&amp;xt);&#xD;&#xA;    println!(&quot;RESULT HEX {:?}&quot;, format!(&quot;0x{}&quot;, xt_hex));&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;async fn create_storage_key() -&gt; String {&#xD;&#xA;&#xD;&#xA;    let client = reqwest::Client::new();&#xD;&#xA;    let req = NodeRequest {&#xD;&#xA;        id: 1,&#xD;&#xA;        jsonrpc: &quot;2.0&quot;.to_string(),&#xD;&#xA;        method: &quot;system_syncState&quot;.to_string(),&#xD;&#xA;        params: vec![],&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let res = client&#xD;&#xA;        .post(&quot;http://localhost:9933&quot;)&#xD;&#xA;        .json(&amp;serde_json::json!(req))&#xD;&#xA;        .send()&#xD;&#xA;        .await;&#xD;&#xA;&#xD;&#xA;    match res {&#xD;&#xA;        Ok(res) =&gt; {&#xD;&#xA;            match res.status() {&#xD;&#xA;                reqwest::StatusCode::OK =&gt; {&#xD;&#xA;                    match res.json::&lt;SystemSyncStateSuccess&gt;().await {&#xD;&#xA;                        Ok(_parsed) =&gt; {&#xD;&#xA;                            // println!(&quot;BLOCK {:?}&quot;, parsed.result.current_block);&#xD;&#xA;                            // self.height = Some(parsed.result.current_block);&#xD;&#xA;                            // self.connection_status = ConnectionStatus::Success;&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; {&#xD;&#xA;                            println!(&quot;ERR {:?}&quot;, e)&#xD;&#xA;                        },&#xD;&#xA;                    }&#xD;&#xA;                },&#xD;&#xA;                _ =&gt; {}&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        Err(_e) =&gt; {}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    let module_name = &quot;Nolik&quot;;&#xD;&#xA;    let module_name_twox = sp_core::twox_128(module_name.as_bytes());&#xD;&#xA;    let module_name_hex = hex::encode(module_name_twox.clone());&#xD;&#xA;    println!(&quot;MODULE {:?}&quot;, module_name_hex);&#xD;&#xA;&#xD;&#xA;    let method_name = &quot;AddressOwners&quot;;&#xD;&#xA;    let method_name_twox = sp_core::twox_128(method_name.as_bytes());&#xD;&#xA;    let method_name_hex = hex::encode(method_name_twox.clone());&#xD;&#xA;    println!(&quot;METHOD {:?}&quot;, method_name_hex);&#xD;&#xA;&#xD;&#xA;    let storage_key = &quot;4d4c14c40d1b7ecb942455794693fa68&quot;;&#xD;&#xA;    let storage_key_twox = sp_core::twox_64(storage_key.as_bytes().encode().as_ref());&#xD;&#xA;    let storage_key_hex = hex::encode(storage_key_twox.clone());&#xD;&#xA;    println!(&quot;TWOX64 {:?}&quot;, storage_key_hex);&#xD;&#xA;&#xD;&#xA;    let twox_64_concat: Vec&lt;u8&gt; = storage_key_twox&#xD;&#xA;        .iter()&#xD;&#xA;        .chain::&lt;&amp;[u8]&gt;(storage_key.as_bytes().encode().as_ref())&#xD;&#xA;        .cloned()&#xD;&#xA;        .collect();&#xD;&#xA;&#xD;&#xA;    let twox_64_concat_hex = hex::encode(twox_64_concat.clone());&#xD;&#xA;    println!(&quot;TWOX64CONCAT {:?}&quot;, twox_64_concat_hex);&#xD;&#xA;&#xD;&#xA;    let key = format!(&quot;0x{}{}{}&quot;, module_name_hex, method_name_hex, twox_64_concat_hex);&#xD;&#xA;    key&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;async fn create_extrinsic_call() -&gt; Vec&lt;u8&gt; {&#xD;&#xA;&#xD;&#xA;    let alice = AccountKeyring::Alice.to_account_id();&#xD;&#xA;    let alice_nonce = get_nonce(&amp;alice).await.unwrap();&#xD;&#xA;    let runtime_version = get_runtime_version().await.unwrap();&#xD;&#xA;    let genesis_hash = get_genesis_hash().await.unwrap();&#xD;&#xA;&#xD;&#xA;    let pallet_index: u8 = 8;&#xD;&#xA;    let method_index: u8 = 0;&#xD;&#xA;    let call_index: [u8; 2] = [pallet_index, method_index];&#xD;&#xA;    // extrinsic parameter&#xD;&#xA;    let address: Vec&lt;u8&gt; = &quot;3e341291aa132c446f752265fee146bb&quot;.as_bytes().into();&#xD;&#xA;    // extrinsic parameter&#xD;&#xA;    let owner: [u8; 1] = [0];&#xD;&#xA;&#xD;&#xA;    let call: Vec&lt;u8&gt;  = [call_index.to_vec(), address.encode().clone(), owner.to_vec()].concat();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    let extra = (&#xD;&#xA;        Era::Immortal,&#xD;&#xA;        Compact(alice_nonce),&#xD;&#xA;        Compact(0u128),&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    let additional = (&#xD;&#xA;        runtime_version.spec_version,&#xD;&#xA;        runtime_version.transaction_version,&#xD;&#xA;        genesis_hash,&#xD;&#xA;        genesis_hash,&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;   let call_tup = (&#xD;&#xA;       pallet_index,&#xD;&#xA;       method_index,&#xD;&#xA;       address.clone(),&#xD;&#xA;       owner&#xD;&#xA;   );&#xD;&#xA;&#xD;&#xA;    let payload = (&#xD;&#xA;        &amp;call_tup,&#xD;&#xA;        &amp;extra,&#xD;&#xA;        &amp;additional&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    let signature = payload.using_encoded(|payload| AccountKeyring::Alice.sign(&amp;payload));&#xD;&#xA;    let extrinsic = {&#xD;&#xA;        let mut encoded_inner = Vec::new();&#xD;&#xA;&#xD;&#xA;        (0b1000_0000 + 4u8).encode_to(&amp;mut encoded_inner);&#xD;&#xA;&#xD;&#xA;        MultiAddress::Id::&lt;_, u32&gt;(alice.clone()).encode_to(&amp;mut encoded_inner);&#xD;&#xA;        MultiSignature::from(signature).encode_to(&amp;mut encoded_inner);&#xD;&#xA;        extra.encode_to(&amp;mut encoded_inner);&#xD;&#xA;        encoded_inner.extend(&amp;call);&#xD;&#xA;&#xD;&#xA;        let len = Compact(encoded_inner.len() as u32);&#xD;&#xA;        let mut encoded = Vec::new();&#xD;&#xA;        len.encode_to(&amp;mut encoded);&#xD;&#xA;        encoded.extend(&amp;encoded_inner);&#xD;&#xA;        encoded&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    extrinsic&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The output generates a Call Hex which looks like this:&#xD;&#xA;`0x29028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0142faddae706311cd9113a391aa9fc9827d23a3d66010f08592e217effd7dae38c8c1461b3aed62a1e89c91c3b986dcf187ab04c626ed32971ddfd04d53968a82003800080080336533343132393161613133326334343666373532323635666565313436626200`&#xD;&#xA;&#xD;&#xA;Now it can be used to send an RPC Request&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7N57H.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4600" PostHistoryTypeId="2" PostId="1264" RevisionGUID="323f0a98-56aa-4ba7-ab6c-854eb6daa9fa" CreationDate="2022-03-26T06:13:38.227" UserId="1866" Text="I'm having trouble retrieving the historic balances on Kusama. On Polkadot the exact same code works, so I'm not sure where the issue lies.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;/* Kusama address, api init above */&#xD;&#xA;const query_addr = &quot;GyGN5AZe886p5mk6YMmXyksz683LYTLgzdzWRzTK29oLbru&quot;&#xD;&#xA;&#xD;&#xA;/* get the current free balance */&#xD;&#xA;const { data: { free: free_now } } = await api.query.system.account(query_addr)&#xD;&#xA;console.log(&quot; now&quot;, free_now.toString())&#xD;&#xA;&#xD;&#xA;/* init historic */&#xD;&#xA;const block_hash = await api.rpc.chain.getBlockHash(1337)&#xD;&#xA;const api_at = await api.at(block_hash)&#xD;&#xA;&#xD;&#xA;/* get the historic balance */&#xD;&#xA;const { data: { free: free_then } } = await api_at.query.system.account(query_addr)&#xD;&#xA;console.log(&quot;then&quot;, free_then.toString())&#xD;&#xA;&#xD;&#xA;/* get the difference */&#xD;&#xA;console.log(&quot;diff&quot;, free_now.sub(free_then).toString())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The above code yields `api_at.query.system.account is not a function`. Additionally when I log `Object.keys(api_at.system.account)` I cannot see the `account` entry either, so I'm assuming at that point of the runtime it was stored elsewhere. &#xD;&#xA;&#xD;&#xA;How can I make the above query work on older blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4602" PostHistoryTypeId="1" PostId="1264" RevisionGUID="323f0a98-56aa-4ba7-ab6c-854eb6daa9fa" CreationDate="2022-03-26T06:13:38.227" UserId="1866" Text="Historic balances on Kusama" ContentLicense="CC BY-SA 4.0" />
  <row Id="4603" PostHistoryTypeId="3" PostId="1264" RevisionGUID="323f0a98-56aa-4ba7-ab6c-854eb6daa9fa" CreationDate="2022-03-26T06:13:38.227" UserId="1866" Text="|kusama|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4605" PostHistoryTypeId="2" PostId="1265" RevisionGUID="a8d8a422-1b91-409e-a265-2911c8c21d59" CreationDate="2022-03-26T06:50:34.420" UserId="627" Text="The short answer: use `const free_then = api_at.query.balances.freeBalance(query_addr)`&#xD;&#xA;&#xD;&#xA;For the longer version... You are correct that Kusama went through a number of runtime upgrades and in the current iteration balances are stored as part of `system.account`. Right at launch however, things were a bit different. &#xD;&#xA;&#xD;&#xA;The 3 parts currently stored inside `system.account` were stored in -&#xD;&#xA;&#xD;&#xA; - `balances.freeBalance` - as above, the free balance&#xD;&#xA; - `balances.reservedBalance` - the reserved balance&#xD;&#xA; - `system.accountNonce` - the actual account nonce&#xD;&#xA;&#xD;&#xA;You will notice that when a transaction is sent in this older layout, 2 storage entries needs to be updated: the nonce and the balance. In the current iteration this turns into a single write, which is much more effective.&#xD;&#xA;&#xD;&#xA;Balances could also be stored inside `balances.account`, which just contains the `data` entry as you are mapping it in your question, effectively combining the reserved and free entries.&#xD;&#xA;&#xD;&#xA;If you wish to trawl the whole chain or just protect against where it may be at a specific block, I would suggest checking for the existence of the above queries before making them, something like &#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const free = apiAt.query.system.account&#xD;&#xA;  ? (await apiAt.query.system.account(addr)).data.free&#xD;&#xA;  : apiAt.query.balances.account&#xD;&#xA;    ? (await apiAt.query.balances.account(addr)).free&#xD;&#xA;    ? await apiAt.query.balances.freeBalance(addr)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4608" PostHistoryTypeId="2" PostId="1266" RevisionGUID="661fb60f-78bc-40ce-9a93-97b5ffb8c9b3" CreationDate="2022-03-26T08:16:06.583" UserId="140" Text="I was trying to add a crowdloan campaign for Kusama auction. I went through all these videos https://www.youtube.com/playlist?list=PL5iFq6rVsyFa1WyBzKOSuntzTrxma-vba.&#xD;&#xA;&#xD;&#xA;I am not able to decide:&#xD;&#xA;&#xD;&#xA;1) What should be ending block for my campaign?&#xD;&#xA;2) What should be First and Last period?&#xD;&#xA;&#xD;&#xA;Can someone please help me to understand these parameters? " ContentLicense="CC BY-SA 4.0" />
  <row Id="4610" PostHistoryTypeId="1" PostId="1266" RevisionGUID="661fb60f-78bc-40ce-9a93-97b5ffb8c9b3" CreationDate="2022-03-26T08:16:06.583" UserId="140" Text="How to decide lease period for crowdloan compaign?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4611" PostHistoryTypeId="3" PostId="1266" RevisionGUID="661fb60f-78bc-40ce-9a93-97b5ffb8c9b3" CreationDate="2022-03-26T08:16:06.583" UserId="140" Text="|substrate-node|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4612" PostHistoryTypeId="2" PostId="1267" RevisionGUID="8b0a1090-78a6-4fe6-afa3-e5c1529a1146" CreationDate="2022-03-26T09:32:11.710" UserId="53" Text="You can reimplement `OnUnbalanced`, draining the treasury account as long as it contains funds, and otherwise minting.&#xD;&#xA;&#xD;&#xA;However the overall proposal contains some contention: spending (using the normal treasury governance) becomes effectively free in this model if the treasury under-runs. The treasury itself as a limiting factor on network spend thus becomes meaningless and the decision instead turns into a pure &quot;spend it or lose it&quot;. E.g. if the treasury contains 1m tokens and there is 2m tokens of staking rewards to be paid, then the council can spend between 0 and 1m tokens from the treasury with no repercussions for the final balance of the treasury: in all cases, the treasury will be empty afterwards.&#xD;&#xA;&#xD;&#xA;If this is a reasonable situation, then a more coherent (and easier to implement) alternative could be to always burn all or a large majority of funds in the treasury and always fund the rewards through minting. This would prevent the treasury from being used for much other than staking, but would be a simpler model without this strange artefact.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4614" PostHistoryTypeId="2" PostId="1268" RevisionGUID="ee3167da-29d9-483c-820f-f85f13af3bea" CreationDate="2022-03-26T10:17:04.693" UserId="88" Text="In the new metadata v14, a `types.json` is no longer required for custom types. How does this affect the typegen procedure in the docs which require us to specify these types in the `definition.ts` for each module we declared in runtime before running the `types-from-defs` script of the `@polkadotjs/typegen` package (which is required for `types-from-metadata`)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4616" PostHistoryTypeId="1" PostId="1268" RevisionGUID="ee3167da-29d9-483c-820f-f85f13af3bea" CreationDate="2022-03-26T10:17:04.693" UserId="88" Text="How does typegen work with metadata v14?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4617" PostHistoryTypeId="3" PostId="1268" RevisionGUID="ee3167da-29d9-483c-820f-f85f13af3bea" CreationDate="2022-03-26T10:17:04.693" UserId="88" Text="|polkadot-js|types|metadata|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4618" PostHistoryTypeId="2" PostId="1269" RevisionGUID="469e6f02-6aa6-46ae-856d-7511d44610aa" CreationDate="2022-03-26T10:41:10.433" UserId="642" Text="After some more research I found that BagsList is not sorted because it is a Map not an array!&#xD;&#xA;&#xD;&#xA;If someone wants to find if its address is included in the current round/era of staking:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;        const MY_ADDRESS = '....';&#xD;&#xA;        const assignments: Map&lt;string, bigint&gt; = new Map();&#xD;&#xA;        const currentEra = (await api.query.staking.currentEra()).unwrap();&#xD;&#xA;        const stakers = await api.query.staking.erasStakers.entries(currentEra);&#xD;&#xA;        &#xD;&#xA;        stakers.map((x) =&gt; x[1].others).flat().forEach((x) =&gt; {&#xD;&#xA;          const nominator = String(x.who);&#xD;&#xA;          const amount = BigInt(x.value);&#xD;&#xA;    &#xD;&#xA;          if (assignments.get(nominator)) {&#xD;&#xA;            assignments.set(nominator, amount + (assignments.get(nominator)!))&#xD;&#xA;          } else {&#xD;&#xA;            assignments.set(nominator, amount)&#xD;&#xA;          }&#xD;&#xA;        });&#xD;&#xA;    &#xD;&#xA;        console.log('Am I in? :', !!assignments.get(MY_ADDRESS))" ContentLicense="CC BY-SA 4.0" />
  <row Id="4620" PostHistoryTypeId="2" PostId="1270" RevisionGUID="836fffa4-6a8f-4c73-907d-1ce0540aa15b" CreationDate="2022-03-26T10:43:07.677" UserId="693" Text="What are the benefits of rocksdb over leveldb? Can Substrate use leveldb?&#xD;&#xA;&#xD;&#xA;I understand that rocksdb was the database of choice for Parity Ethereum client, and paritydb aims to fix a lot of the overheads and issues that rocksdb has for Substrate archive nodes. But considering that most Ethereum client uses leveldb, I was wondering if there are any technical reasons for this outside of convenience on Parity’s side. Also, is it possible to use leveldb for Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4622" PostHistoryTypeId="1" PostId="1270" RevisionGUID="836fffa4-6a8f-4c73-907d-1ce0540aa15b" CreationDate="2022-03-26T10:43:07.677" UserId="693" Text="Why does Substrate use rocksdb &amp; paritydb over leveldb?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4623" PostHistoryTypeId="3" PostId="1270" RevisionGUID="836fffa4-6a8f-4c73-907d-1ce0540aa15b" CreationDate="2022-03-26T10:43:07.677" UserId="693" Text="|database|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4624" PostHistoryTypeId="2" PostId="1271" RevisionGUID="83352c4f-b3cd-42b4-b452-a1e48c936ac8" CreationDate="2022-03-26T14:17:24.467" UserId="1866" Text="I guess this is not quite programming related, but does fit into the general &quot;Substrate ecosystem&quot; discussions. I broad terms, I believe I know what the Kusama society does - it forms a human blockchain.&#xD;&#xA;&#xD;&#xA;From having a discussion with one of my friends, he mentioned that the Kusama society had some huge bounties in the past and from there the growth exploded. Can somebody who was there and participated at the time shed some light on this?&#xD;&#xA;&#xD;&#xA;Specifically I guess in historic terms -&#xD;&#xA;&#xD;&#xA; - how did the growth look like when it was launched?&#xD;&#xA; - how did the society manage to put up a large bounty?&#xD;&#xA; - how long did it take before it was taken?&#xD;&#xA; - what happened since then?&#xD;&#xA; - are there more opportunities for big bounties?&#xD;&#xA;&#xD;&#xA;I know this is quite broad, but I guess i'm after some history lesson - and I believe others would be interested as well to learn more about this experiment." ContentLicense="CC BY-SA 4.0" />
  <row Id="4626" PostHistoryTypeId="1" PostId="1271" RevisionGUID="83352c4f-b3cd-42b4-b452-a1e48c936ac8" CreationDate="2022-03-26T14:17:24.467" UserId="1866" Text="Teach me history: Kusama, Society and huge payouts" ContentLicense="CC BY-SA 4.0" />
  <row Id="4627" PostHistoryTypeId="3" PostId="1271" RevisionGUID="83352c4f-b3cd-42b4-b452-a1e48c936ac8" CreationDate="2022-03-26T14:17:24.467" UserId="1866" Text="|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4628" PostHistoryTypeId="2" PostId="1272" RevisionGUID="e71471fd-f346-40e7-b732-462562c82ecc" CreationDate="2022-03-26T14:20:35.620" UserId="85" Text="The readme on the repo gives the reasons: https://github.com/paritytech/parity-db&#xD;&#xA;&#xD;&#xA;Essentially as we have a very constrained use case, we can make optimisations that more generic kv data stores like rocksdb and leveldb can not make. In particular we can make use of the following: &#xD;&#xA;&#xD;&#xA;&gt; Which means most of the keys are fixed size and uniformly distributed. Most values are small. Values over 16 kbytes are rare. &#xD;&#xA;&#xD;&#xA;As we're coding in rust there's every reason to assume that we can improve on the generic databases' performance (which will be written in C/C++). As a rule of thumb not writing your own DB is generally a good idea, but in this case I believe it could well be justified." ContentLicense="CC BY-SA 4.0" />
  <row Id="4630" PostHistoryTypeId="5" PostId="1215" RevisionGUID="d8efb538-848a-4fe6-b374-fe99f20be7c0" CreationDate="2022-03-26T15:13:00.640" UserId="620" Comment="added 3596 characters in body" Text="It closes a motion that has enough Aye or Nay votes. The reason it doesn't auto-close is that it would be extra logic on every single vote: looking up to see if it has been passed or rejected. Anyone can call it.&#xD;&#xA;&#xD;&#xA;Its behavior is in the docs: https://paritytech.github.io/substrate/master/pallet_collective/pallet/enum.Call.html#variant.close&#xD;&#xA;&#xD;&#xA;Most pertinent to your question:&#xD;&#xA;&#xD;&#xA;1. May be called by any signed account in order to finish voting and close the proposal.&#xD;&#xA;2. If called before the end of the voting period it will only close the vote if it is has enough votes to be approved or disapproved.&#xD;&#xA;&#xD;&#xA;--------------&#xD;&#xA;EDIT: Answering your follow up question here to allow for more characters.&#xD;&#xA;&#xD;&#xA;The voting on the proposal closes after the voting period, but somebody still has to call the `close` function. The `close` function is broken into two primary paths: one for if it's called before the end of the voting period, and one for if it's called after. Each path then has sub-paths for what to do if the proposal is approved or not.&#xD;&#xA;&#xD;&#xA;We can generally break down the `close` function into some chunks:&#xD;&#xA;&#xD;&#xA;First, some checks/variable setting. Note specifically that _both_ `approved` and `disapproved` can be false.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;		pub fn close(...) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			let _ = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let voting = Self::voting(&amp;proposal_hash).ok_or(Error::&lt;T, I&gt;::ProposalMissing)?;&#xD;&#xA;			ensure!(voting.index == index, Error::&lt;T, I&gt;::WrongIndex);&#xD;&#xA;&#xD;&#xA;			let mut no_votes = voting.nays.len() as MemberCount;&#xD;&#xA;			let mut yes_votes = voting.ayes.len() as MemberCount;&#xD;&#xA;			let seats = Self::members().len() as MemberCount;&#xD;&#xA;			let approved = yes_votes &gt;= voting.threshold;&#xD;&#xA;			let disapproved = seats.saturating_sub(no_votes) &lt; voting.threshold;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The next segment checks [if one of them is already true](https://github.com/paritytech/substrate/blob/0ac1a00/frame/collective/src/lib.rs#L695L711) (before the voting period is closed). Note that so far, the function hasn't even checked if the voting period is open or closed, it's only checked if there are enough votes to approve or disapprove the proposal.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;			// Allow (dis-)approving the proposal as soon as there are enough votes.&#xD;&#xA;			if approved {&#xD;&#xA;				/* snip */&#xD;&#xA;				let (proposal_weight, proposal_count) =&#xD;&#xA;					Self::do_approve_proposal(seats, yes_votes, proposal_hash, proposal);&#xD;&#xA;				return Ok(/* snip */)&#xD;&#xA;			} else if disapproved {&#xD;&#xA;				Self::deposit_event(Event::Closed { proposal_hash, yes: yes_votes, no: no_votes });&#xD;&#xA;				let proposal_count = Self::do_disapprove_proposal(proposal_hash);&#xD;&#xA;				return Ok(/* snip */)&#xD;&#xA;			}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Assuming it has not been approved or disapproved, then it checks if the [voting period is over](https://github.com/paritytech/substrate/blob/0ac1a00/frame/collective/src/lib.rs#L740L744):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;			// Only allow actual closing of the proposal after the voting period has ended.&#xD;&#xA;			ensure!(&#xD;&#xA;				frame_system::Pallet::&lt;T&gt;::block_number() &gt;= voting.end,&#xD;&#xA;				Error::&lt;T, I&gt;::TooEarly&#xD;&#xA;			);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And finally, if the voting period has ended then it applies the `prime` voter logic and determines whether or not it's been approved:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;			let prime_vote = Self::prime().map(|who| voting.ayes.iter().any(|a| a == &amp;who));&#xD;&#xA;&#xD;&#xA;			// default voting strategy.&#xD;&#xA;			let default = T::DefaultVote::default_vote(prime_vote, yes_votes, no_votes, seats);&#xD;&#xA;&#xD;&#xA;			let abstentions = seats - (yes_votes + no_votes);&#xD;&#xA;			match default {&#xD;&#xA;				true =&gt; yes_votes += abstentions,&#xD;&#xA;				false =&gt; no_votes += abstentions,&#xD;&#xA;			}&#xD;&#xA;			let approved = yes_votes &gt;= voting.threshold;&#xD;&#xA;&#xD;&#xA;			if approved {&#xD;&#xA;				let (proposal, len) = Self::validate_and_get_proposal(&#xD;&#xA;					&amp;proposal_hash,&#xD;&#xA;					length_bound,&#xD;&#xA;					proposal_weight_bound,&#xD;&#xA;				)?;&#xD;&#xA;				Self::deposit_event(Event::Closed { proposal_hash, yes: yes_votes, no: no_votes });&#xD;&#xA;				let (proposal_weight, proposal_count) =&#xD;&#xA;					Self::do_approve_proposal(seats, yes_votes, proposal_hash, proposal);&#xD;&#xA;				Ok(/* snip */)&#xD;&#xA;			} else {&#xD;&#xA;				Self::deposit_event(Event::Closed { proposal_hash, yes: yes_votes, no: no_votes });&#xD;&#xA;				let proposal_count = Self::do_disapprove_proposal(proposal_hash);&#xD;&#xA;				Ok(/* snip */)&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4631" PostHistoryTypeId="2" PostId="1273" RevisionGUID="cc59eb2d-9994-4704-9a1c-33bb8843b1eb" CreationDate="2022-03-26T16:00:39.360" UserId="627" Text="You are correct in that the actual definitions are basically deprecated. However, it does still play a (small) role in that the RPC types are not carried in the metadata. (This will change in the future and is on the issue list in Substrate, but we are not there as of yet.)&#xD;&#xA;&#xD;&#xA;For metadata v14 chains, just pass a completely empty `types` in `definitions.ts`, i.e. if no extra RPC type overrides and/or no extra RPC endpoints, just leave the `types` entry blank.&#xD;&#xA;&#xD;&#xA;In this case it should generate no extra definitions from the empty `types`, but will create the lookups and all additional interfaces for augmentation.&#xD;&#xA;&#xD;&#xA;(There may be dragons... while is gets used exactly in this fashion in the API itself to generate augmentation for Substrate master, Kusama and Polkadot, some brave early-adopters did have some small hiccups which is detailed in the JS API issues.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4633" PostHistoryTypeId="6" PostId="1271" RevisionGUID="220912bb-3eb2-445e-b3c4-7cc3c38ee4d1" CreationDate="2022-03-26T16:15:11.137" UserId="85" Comment="edited tags" Text="|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4634" PostHistoryTypeId="2" PostId="1274" RevisionGUID="2cfd913b-18d6-4ed4-b3bd-9d2ddf80f4ac" CreationDate="2022-03-26T16:21:36.813" UserId="434" Text="This attribute is applied to the item it is defined in and conditionally applies the no_std attribute if we are not using the &quot;std&quot; feature. Why do we need this and in which cases would the no_std attribute be applied?&#xD;&#xA;&#xD;&#xA;My current understanding is that the default feature of a crate is always used, for a pallet, the default feature is made up of the std feature. Why would we check if the std feature is not being used if it is implicitly always used via the default feature?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I asked a similar question here https://substrate.stackexchange.com/questions/1197/std-in-conditional-compilation but this one is more suitable, can the other be deleted or closed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4636" PostHistoryTypeId="1" PostId="1274" RevisionGUID="2cfd913b-18d6-4ed4-b3bd-9d2ddf80f4ac" CreationDate="2022-03-26T16:21:36.813" UserId="434" Text="Why do we need #![cfg_attr(not(feature = &quot;std&quot;), no_std)]" ContentLicense="CC BY-SA 4.0" />
  <row Id="4637" PostHistoryTypeId="3" PostId="1274" RevisionGUID="2cfd913b-18d6-4ed4-b3bd-9d2ddf80f4ac" CreationDate="2022-03-26T16:21:36.813" UserId="434" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4638" PostHistoryTypeId="2" PostId="1275" RevisionGUID="c49b02db-4395-44a0-8626-603a485790cc" CreationDate="2022-03-26T17:10:11.490" UserId="1830" Text="My question is: What governs access to treasury funds? I’m assuming it requires an ink contract that governs who is able to invoke funds transfers out of the treasury and which conditions apply.&#xD;&#xA;&#xD;&#xA;Is that accurate or are there other ways to grant access to treasury funds?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4640" PostHistoryTypeId="1" PostId="1275" RevisionGUID="c49b02db-4395-44a0-8626-603a485790cc" CreationDate="2022-03-26T17:10:11.490" UserId="1830" Text="What governs Treasury funds out?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4641" PostHistoryTypeId="3" PostId="1275" RevisionGUID="c49b02db-4395-44a0-8626-603a485790cc" CreationDate="2022-03-26T17:10:11.490" UserId="1830" Text="|ink|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4642" PostHistoryTypeId="10" PostId="1116" RevisionGUID="2dfdbcb8-b898-4dce-b818-61d7a2f81e30" CreationDate="2022-03-26T17:21:32.643" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:359,&quot;DisplayName&quot;:&quot;Bryan Chen&quot;},{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Alejandro Martínez&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:103,&quot;DisplayName&quot;:&quot;user1271772&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;}]}" />
  <row Id="4643" PostHistoryTypeId="10" PostId="1077" RevisionGUID="1e91f5c4-a97e-4f90-90e8-618c4c1895af" CreationDate="2022-03-26T17:22:18.097" UserId="-1" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:283,&quot;DisplayName&quot;:&quot;rob&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[1]}" />
  <row Id="4644" PostHistoryTypeId="2" PostId="1276" RevisionGUID="6fcf7963-0eb0-4333-80d0-966ef286a0ea" CreationDate="2022-03-26T18:41:52.083" UserId="233" Text="Leveldb and rocksdb are pretty similar on the architecture level (I believe rocksdb actually shared some code with leveldb in the early days, but don't quote me on that) and picking one over the other probably doesn't matter that much, or at least that was the case back then. &#xD;&#xA;&#xD;&#xA;I have not followed leveldb development much in the last few years and it could be that it has improved a lot in the meantime; back when the choice was made, rocksdb had better performance, a better feature set and a very active development team." ContentLicense="CC BY-SA 4.0" />
  <row Id="4646" PostHistoryTypeId="2" PostId="1277" RevisionGUID="aa581874-7d6c-409d-8f1b-506605e6b913" CreationDate="2022-03-26T18:48:39.890" UserId="1914" Text="After pulling from the tutorials/solutions/add-a-pallet, The build process with cargo gives an error.&#xD;&#xA;&#xD;&#xA;cargo build --release&#xD;&#xA;See error&#xD;&#xA;Expected vs. Actual Behavior&#xD;&#xA;The build process is not complete.&#xD;&#xA;&#xD;&#xA;Environment&#xD;&#xA;Operating system: Linux/Ubuntu&#xD;&#xA;Brach: tutorials/solutions/add-a-pallet&#xD;&#xA;Rust version : 1.24.3&#xD;&#xA;Logs, Errors or Screenshots&#xD;&#xA;&#xD;&#xA;error: failed to get frame-benchmarking as a dependency of package node-template v4.0.0-dev (/home/ubuntu/source/repos/substrate-node-template/node)&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;failed to load source for dependency frame-benchmarking&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;Unable to update https://github.com/paritytech/substrate.git?tag=devhub/latest#352c46a6&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;object not found - no match for id (352c46a648a5f2d4526e790a184daa4a1ffdb3bf); class=Odb (9); code=NotFound (-3)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4648" PostHistoryTypeId="1" PostId="1277" RevisionGUID="aa581874-7d6c-409d-8f1b-506605e6b913" CreationDate="2022-03-26T18:48:39.890" UserId="1914" Text="Failed to get frame-benchmarking as a dependency of package" ContentLicense="CC BY-SA 4.0" />
  <row Id="4649" PostHistoryTypeId="3" PostId="1277" RevisionGUID="aa581874-7d6c-409d-8f1b-506605e6b913" CreationDate="2022-03-26T18:48:39.890" UserId="1914" Text="|build|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4650" PostHistoryTypeId="2" PostId="1278" RevisionGUID="365f11c0-0722-4246-9852-f3b797eac505" CreationDate="2022-03-26T18:49:23.697" UserId="233" Text="There is nothing magical about the `std` feature, it's more of an idiomatic label Rust devs use to signal that code that use it will make use of the standard library.&#xD;&#xA;&#xD;&#xA;As for your question about default features and the `optional` attribute, I think you're likely better off reading the rust documentation. In short, the two are unrelated. Using `&quot;default-features&quot;: false` means that the crate is compiled without enabling the default feature; marking the crate `optional` means that it is itself only compiled if there is a feature that enables it, that it's opt-in." ContentLicense="CC BY-SA 4.0" />
  <row Id="4652" PostHistoryTypeId="4" PostId="1203" RevisionGUID="171c605d-184b-4cfe-a17d-a95c0d2370ed" CreationDate="2022-03-26T18:53:16.747" UserId="512" Comment="edited title" Text="What's the best way to compute square root in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4653" PostHistoryTypeId="2" PostId="1279" RevisionGUID="646173af-94bb-45b3-a67b-31f77fd5ecd5" CreationDate="2022-03-26T19:25:48.507" UserId="620" Text="That comes from the [ApproveOrigin](https://github.com/paritytech/substrate/blob/69079b58579ea36812c4a375a118f27aac0fb281/frame/treasury/src/lib.rs#L150). In Polkadot, this is [configured to](https://github.com/paritytech/polkadot/blob/release-v0.9.18/runtime/polkadot/src/lib.rs#L793L796) 3/5 of the Council." ContentLicense="CC BY-SA 4.0" />
  <row Id="4655" PostHistoryTypeId="2" PostId="1280" RevisionGUID="c2f27186-5fe7-4cf9-a9f1-d80d421a5484" CreationDate="2022-03-26T19:36:25.723" UserId="362" Text="The official documentation of StorageMaps states&#xD;&#xA;&#xD;&#xA;&gt; An implementation of a map with a two keys.&#xD;&#xA;&gt; &#xD;&#xA;&gt; It provides an important ability to efficiently remove all entries&#xD;&#xA;&gt; that have a common first key.&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/rustdocs/latest/frame_support/storage/trait.StorageDoubleMap.html&#xD;&#xA;&#xD;&#xA;This reference to _efficiency_ suggests that `remove_prefix` would not require the naive `O(N)` database operations, where `N` is the number of mappings under the given first key, but rather something sublinear, like `O(1)` or `O(log N)`. &#xD;&#xA;&#xD;&#xA;However, I have also asked around about this, and received, the opposite information, I would just love to get a conclusive answer.&#xD;&#xA;&#xD;&#xA; 1. What is the running time in terms of number of mappings under the key to be removed.&#xD;&#xA; 2. If the time is just `O(N)`, in what sense is this efficient?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4657" PostHistoryTypeId="1" PostId="1280" RevisionGUID="c2f27186-5fe7-4cf9-a9f1-d80d421a5484" CreationDate="2022-03-26T19:36:25.723" UserId="362" Text="Complexity of StorageDoubleMap::remove_prefix" ContentLicense="CC BY-SA 4.0" />
  <row Id="4658" PostHistoryTypeId="3" PostId="1280" RevisionGUID="c2f27186-5fe7-4cf9-a9f1-d80d421a5484" CreationDate="2022-03-26T19:36:25.723" UserId="362" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4659" PostHistoryTypeId="2" PostId="1281" RevisionGUID="ae025664-6f2e-417b-aebf-a86a7f760395" CreationDate="2022-03-26T19:42:12.030" UserId="299" Text="```shell&#xD;&#xA;$ cargo build --release --features runtime-benchmarks&#xD;&#xA;$ ./target/release/dorafactory-node benchmark --chain dev --execution=wasm --wasm-execution=compiled --pallet pallet_template --extrinsic do_something -&#xD;&#xA;-steps 20 --repeat 50 --json-file=raw.json --output ./&#xD;&#xA;&#xD;&#xA;=====report=====&#xD;&#xA;&#xD;&#xA;2022-03-27 03:38:52 assembling new collators for new session 0 at #0    &#xD;&#xA;2022-03-27 03:38:52 assembling new collators for new session 1 at #0    &#xD;&#xA;Error: Input(&quot;No benchmarks found which match your input.&quot;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4661" PostHistoryTypeId="1" PostId="1281" RevisionGUID="ae025664-6f2e-417b-aebf-a86a7f760395" CreationDate="2022-03-26T19:42:12.030" UserId="299" Text="Error: Input(&quot;No benchmarks found which match your input.&quot;)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4662" PostHistoryTypeId="3" PostId="1281" RevisionGUID="ae025664-6f2e-417b-aebf-a86a7f760395" CreationDate="2022-03-26T19:42:12.030" UserId="299" Text="|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4663" PostHistoryTypeId="2" PostId="1282" RevisionGUID="5b718fc9-340d-48bd-a361-504cd6459a09" CreationDate="2022-03-26T20:03:46.957" UserId="1923" Text="I would like to begin putting together a history of the usage of different WebSockets across different parachains and parathreads.&#xD;&#xA;&#xD;&#xA;I am relatively new to this ecosystem and have not been about to discover the tools that enable this thus far. &#xD;&#xA;&#xD;&#xA;https://telemetry.polkadot.io/ - Seems to be a tool that is accessing similar types of data, however, I'm a JS developer and do not wish to dig into the RUST code. Perhaps that's lazy, sorry.&#xD;&#xA;&#xD;&#xA;Any pointers in the right direction are welcomed!&#xD;&#xA;&#xD;&#xA;Have a good evening, weekend, month, year and beyond. Long live the Polka! " ContentLicense="CC BY-SA 4.0" />
  <row Id="4665" PostHistoryTypeId="1" PostId="1282" RevisionGUID="5b718fc9-340d-48bd-a361-504cd6459a09" CreationDate="2022-03-26T20:03:46.957" UserId="1923" Text="How to map out transaction history between different WebSocket endpoints?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4666" PostHistoryTypeId="3" PostId="1282" RevisionGUID="5b718fc9-340d-48bd-a361-504cd6459a09" CreationDate="2022-03-26T20:03:46.957" UserId="1923" Text="|polkadot-js|rpc|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4667" PostHistoryTypeId="2" PostId="1283" RevisionGUID="3a629ca0-1b31-4e90-b401-ab2455e4d754" CreationDate="2022-03-26T20:26:01.517" UserId="83" Text="It shows what should happen when offboarding a parachain or parathread from the system in the Polkadot codebase [here](https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/paras/mod.rs#L1129), which includes the following: &#xD;&#xA;&#xD;&#xA;* ☐ Remove the registered parachain id from the head-data storage item `&lt;Self as Store&gt;::Heads::remove(&amp;para)`&#xD;&#xA;* ☐ Remove the registered parachain id from the `FutureCodeUpgrades` storage item `&lt;Self as Store&gt;::FutureCodeUpgrades::remove(&amp;para)`&#xD;&#xA;* ☐ Remove the registered parachain id from the `UpgradeGoAheadSignal` storage item `&lt;Self as Store&gt;::UpgradeGoAheadSignal::remove(&amp;para)`&#xD;&#xA;* ☐ Remove the registered parachain id from the `UpgradeRestrictionSignal` storage item `&lt;Self as Store&gt;::UpgradeRestrictionSignal::remove(&amp;para)`&#xD;&#xA;* ☐ Decrease the number of references of the validation code and remove it from storage if zero is reached, which involves&#xD;&#xA;	* ☑ Copy the `FutureCodeHash` for that parachain id and remove it from `FutureCodeHash` storage&#xD;&#xA;		```&#xD;&#xA;		let removed_future_code_hash = &lt;Self as Store&gt;::FutureCodeHash::take(&amp;para)&#xD;&#xA;		```&#xD;&#xA;	* ☐ If that `FutureCodeHash` value is not `None`, then you need to use that copied `FutureCodeHash` as the `ValidationCodeHash` (`code_hash`) in the `decrease_code_ref` function shown [here](https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/paras/mod.rs#L1959)&#xD;&#xA;		```&#xD;&#xA;		if let Some(removed_future_code_hash) = removed_future_code_hash {&#xD;&#xA;			Self::decrease_code_ref(&amp;removed_future_code_hash);&#xD;&#xA;		}&#xD;&#xA;		```&#xD;&#xA;		* ☐ In `decrease_code_ref` you provide it as an argument to `CodeByHashRefs`.&#xD;&#xA;			* Obtain its `refs` storage value, as shown below:&#xD;&#xA;				```&#xD;&#xA;				fn decrease_code_ref(code_hash: &amp;ValidationCodeHash) -&gt; Weight {&#xD;&#xA;					...&#xD;&#xA;					let refs = &lt;Self as Store&gt;::CodeByHashRefs::get(code_hash)&#xD;&#xA;				```&#xD;&#xA;			* If `refs == 0` then no further action is required in this step.&#xD;&#xA;			* Else if `refs &lt;= 1` then remove that `code_hash` value from the storage values `CodeByHash` and `CodeByHashRefs` as shown below:&#xD;&#xA;				```&#xD;&#xA;				&lt;Self as Store&gt;::CodeByHash::remove(code_hash);&#xD;&#xA;				&lt;Self as Store&gt;::CodeByHashRefs::remove(code_hash);&#xD;&#xA;				```&#xD;&#xA;			* Otherwise you need to insert a value into `CodeByHashRefs` storage, where the key is that `code_hash` and the value is `refs - 1` as shown below:&#xD;&#xA;				```&#xD;&#xA;				&lt;Self as Store&gt;::CodeByHashRefs::insert(code_hash, refs - 1);&#xD;&#xA;				```&#xD;&#xA;* ☐ Note the replacement of code for the parachain id, in the context of the current relay-chain block number, and provide the replaced code, which involves:&#xD;&#xA;	* ☐ Copy the `CurrentCodeHash` for that parachain id and remove it from `CurrentCodeHash` storage&#xD;&#xA;		```&#xD;&#xA;		let removed_code_hash = &lt;Self as Store&gt;::CurrentCodeHash::take(&amp;para)&#xD;&#xA;		```&#xD;&#xA;	* ☐ If that `CurrentCodeHash` value is not `None`, then you need to do the following in the `note_past_code` function:&#xD;&#xA;		* Use that copied `CurrentCodeHash` as the `ValidationCodeHash` (`old_code_hash`) in the `note_past_code` function shown [here](https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/paras/mod.rs#L1187), as shown below:&#xD;&#xA;			```&#xD;&#xA;			if let Some(removed_code_hash) = removed_code_hash {&#xD;&#xA;				Self::note_past_code(para, now, now, removed_code_hash);&#xD;&#xA;			}&#xD;&#xA;			```&#xD;&#xA;		* ☐ In the `note_past_code` function it shows you have to update the `PastCodeMeta` for that parachain id, and the current relay-chain block number, which requires updating the `upgrade_times` property of `ParaPastCodeMeta` by pushing a new `ReplacementTimes { expected_at, activated_at }` value where `expected_at` and `activated_at` are both the current relay-chain block number.&#xD;&#xA;			```&#xD;&#xA;			&lt;Self as Store&gt;::PastCodeMeta::mutate(&amp;id, |past_meta| {&#xD;&#xA;				past_meta.note_replacement(at, now);&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			...&#xD;&#xA;&#xD;&#xA;			impl&lt;N: Ord + Copy + PartialEq&gt; ParaPastCodeMeta&lt;N&gt; {&#xD;&#xA;				// note a replacement has occurred at a given block number.&#xD;&#xA;				pub(crate) fn note_replacement(&amp;mut self, expected_at: N, activated_at: N) {&#xD;&#xA;					self.upgrade_times.push(ReplacementTimes { expected_at, activated_at })&#xD;&#xA;				}&#xD;&#xA;&#xD;&#xA;			...&#xD;&#xA;&#xD;&#xA;			/// Metadata used to track previous parachain validation code that we keep in&#xD;&#xA;			/// the state.&#xD;&#xA;			...&#xD;&#xA;			pub struct ParaPastCodeMeta&lt;N&gt; {&#xD;&#xA;				upgrade_times: Vec&lt;ReplacementTimes&lt;N&gt;&gt;,&#xD;&#xA;			```&#xD;&#xA;		* ☐ In the `note_past_code` function, it shows you have to insert the `old_code_hash` as the new value of a key that is a tuple containing the parachain id and the current relay-chain block number:&#xD;&#xA;			```&#xD;&#xA;			&lt;Self as Store&gt;::PastCodeHash::insert(&amp;(id, at), old_code_hash);&#xD;&#xA;			```&#xD;&#xA;		* ☐ In the `note_past_code` function, it shows you need to update `PastCodePruning` storage by finding the index of the current relay-chain block number, and then inserting a new tuple value under that index `(id, now)`, which is the parachain id and the current relay-chain block number&#xD;&#xA;			```&#xD;&#xA;			&lt;Self as Store&gt;::PastCodePruning::mutate(|pruning| {&#xD;&#xA;				let insert_idx =&#xD;&#xA;					pruning.binary_search_by_key(&amp;now, |&amp;(_, b)| b).unwrap_or_else(|idx| idx);&#xD;&#xA;				pruning.insert(insert_idx, (id, now));&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			...&#xD;&#xA;&#xD;&#xA;			#[pallet::storage]&#xD;&#xA;			pub(super) type PastCodePruning&lt;T: Config&gt; =&#xD;&#xA;				StorageValue&lt;_, Vec&lt;(ParaId, T::BlockNumber)&gt;, ValueQuery&gt;;&#xD;&#xA;			```&#xD;&#xA;&#xD;&#xA;It also shows what to do to deregister a parachain:&#xD;&#xA;&#xD;&#xA;* ☑ Deregister a parachain as shown in the function [here](https://github.com/paritytech/polkadot/blob/master/runtime/common/src/paras_registrar.rs#L538)&#xD;&#xA;&#xD;&#xA;If you have only manually deleted the `FutureCodeHash` for the previous parachain id and deregistered the parachan, then it seems you have only finished doing the steps where I have checked the checkboxes above, and hopefully you made a copy of the `FutureCodeHash` before deleting it, but it appears you still have to do the other offboarding steps that are indicated above with unchecked checkboxes.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4669" PostHistoryTypeId="2" PostId="1284" RevisionGUID="f12d6102-a358-433c-b175-ff391d0465fb" CreationDate="2022-03-26T22:45:22.707" UserId="318" Text="Using “—-dev” instead of “—-chain dev” is a better option for these kinds of tests. The reason is “—-dev” has an implicit “——tmp” which makes sure you don’t need to deal with the previous history of your development tests. It starts a fresh chain for you. In your case I’m afraid that while you’re running a new client with the benchmark features built-in, your runtime is still coming from your previous builds, meaning it doesn’t feature the benchmark option. This is because the runtime would only change on a runtime upgrade. But when you start a fresh dev blockchain the currently built runtime will be used as your runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="4671" PostHistoryTypeId="5" PostId="1281" RevisionGUID="393909f9-9c7c-4622-89b2-c21cc48a444e" CreationDate="2022-03-26T23:25:04.670" UserId="299" Comment="deleted 3 characters in body" Text="```shell&#xD;&#xA;$ cargo build --release --features runtime-benchmarks&#xD;&#xA;$ ./target/release/node-template benchmark --chain dev --execution=wasm --wasm-execution=compiled --pallet pallet_template --extrinsic do_something -&#xD;&#xA;-steps 20 --repeat 50 --json-file=raw.json --output ./&#xD;&#xA;&#xD;&#xA;=====report=====&#xD;&#xA;&#xD;&#xA;2022-03-27 03:38:52 assembling new collators for new session 0 at #0    &#xD;&#xA;2022-03-27 03:38:52 assembling new collators for new session 1 at #0    &#xD;&#xA;Error: Input(&quot;No benchmarks found which match your input.&quot;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4672" PostHistoryTypeId="5" PostId="1281" RevisionGUID="d3cd2b70-ddee-4615-8394-247ffbb149d2" CreationDate="2022-03-26T23:32:24.653" UserId="299" Comment="added 3 characters in body" Text="```shell&#xD;&#xA;$ cargo build --release --features runtime-benchmarks&#xD;&#xA;$ ./target/release/dorafactory-node benchmark --chain dev --execution=wasm --wasm-execution=compiled --pallet pallet_template --extrinsic do_something -&#xD;&#xA;-steps 20 --repeat 50 --json-file=raw.json --output ./&#xD;&#xA;&#xD;&#xA;=====report=====&#xD;&#xA;&#xD;&#xA;2022-03-27 03:38:52 assembling new collators for new session 0 at #0    &#xD;&#xA;2022-03-27 03:38:52 assembling new collators for new session 1 at #0    &#xD;&#xA;Error: Input(&quot;No benchmarks found which match your input.&quot;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4673" PostHistoryTypeId="2" PostId="1285" RevisionGUID="6969b7d2-5bc2-4360-a450-c0f21ca448d9" CreationDate="2022-03-27T04:41:09.533" UserId="28" Text="Efficiently here is probably a poor choice of words, and I think simply refers to the ease of calling the API. I will make a PR to update the wording here.&#xD;&#xA;&#xD;&#xA;There is no magic that can happen with adding or removing keys from the database, you must write and update the merkle trie, which involves removing all of the database entries for those storage values and the subsequent trie nodes that are generated. This where all the complexity comes from.&#xD;&#xA;&#xD;&#xA;`remove_prefix` still behaves `O(N)`, and the underlying implementation just uses an iterator.&#xD;&#xA;&#xD;&#xA;If you plan to use `remove_prefix`, you should consider whether you should be using a `BoundedVec`, where removal of all items is a single storage operation.&#xD;&#xA;&#xD;&#xA;Otherwise, you should use the second parameter to `remove_prefix`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn remove_prefix&lt;KArg1: ?Sized&gt;(&#xD;&#xA;    k1: KArg1,&#xD;&#xA;    limit: Option&lt;u32&gt;&#xD;&#xA;) -&gt; KillStorageResult&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`limit` allows you to put an upper limit to the number of items that `remove_prefix` will do at once, and you can schedule a removal over multiple blocks to keep your runtime logic bounded.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4675" PostHistoryTypeId="2" PostId="1286" RevisionGUID="a11ff397-f8af-422c-84b8-16019fb4f0d3" CreationDate="2022-03-27T05:55:27.933" UserId="85" Text="Looks like this line is missing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;list_benchmark!(list, extra, pallet_dao_core, DaoCoreModule);&#xD;&#xA;```&#xD;&#xA;(or whatever pallet your do_something extrinsic is in)&#xD;&#xA;&#xD;&#xA;(`./target/release/dorafactory-node benchmark --chain=dev --list` did not seem to show the benchmark)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4677" PostHistoryTypeId="2" PostId="1287" RevisionGUID="f612bdcd-6554-4f80-91b1-46104e7b3ba4" CreationDate="2022-03-27T06:01:13.847" UserId="1927" Text="Answer to this question lies in how the runtime get compiled [found here][1]. Runtime get compiled to both native binary as well as a `wasm` module.&#xD;&#xA;&#xD;&#xA;Some features like System Libraries, File I/O, Networking etc doesn't work well with WebAssembly for now. So we make sure to not use them. And hence we stick to explicitly avoid use of std lib.&#xD;&#xA;&#xD;&#xA;The following porting guide will also shed light and make things more clear&#xD;&#xA;&#xD;&#xA;https://udoprog.github.io/rust/2018-02-19/porting-rust-to-wasm.html&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/runtime/" ContentLicense="CC BY-SA 4.0" />
  <row Id="4679" PostHistoryTypeId="2" PostId="1288" RevisionGUID="fd6999e1-aa04-4605-907a-81c6e2aaefdc" CreationDate="2022-03-27T07:21:35.847" UserId="642" Text="How can I get the eraIndex by having a blockNumber, or get date of an era? whichever works.&#xD;&#xA;&#xD;&#xA;like:&#xD;&#xA;&#xD;&#xA;       const eraIndex = getEraIndex(blockNumber);&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;       const date = getDate(eraIndex);&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4681" PostHistoryTypeId="1" PostId="1288" RevisionGUID="fd6999e1-aa04-4605-907a-81c6e2aaefdc" CreationDate="2022-03-27T07:21:35.847" UserId="642" Text="How get eraIndex by blockNumber?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4682" PostHistoryTypeId="3" PostId="1288" RevisionGUID="fd6999e1-aa04-4605-907a-81c6e2aaefdc" CreationDate="2022-03-27T07:21:35.847" UserId="642" Text="|eraindex|blocknumber|date|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4683" PostHistoryTypeId="2" PostId="1289" RevisionGUID="9400c17f-77ed-481b-a103-67ce352fd1db" CreationDate="2022-03-27T07:29:23.043" UserId="1927" Text="While developing with substrate when we make changes in pallets and want to quickly test the changes have explicitly stop existing running node and build the node template (which obviously takes time) and again start the node which takes a lot of time due bootstrap, GRANDPA and all other rituals. &#xD;&#xA;&#xD;&#xA;Do we have some existing solution which I'm not aware of just like other development framework provide `HOT RELOAD` capability so the developer experience is not hampered and these repetitive task which are avoidable can omitted.&#xD;&#xA;&#xD;&#xA;Please let help me with if there are any existing solutions.&#xD;&#xA;&#xD;&#xA;If not will raise a feature request and check for the feasibility." ContentLicense="CC BY-SA 4.0" />
  <row Id="4685" PostHistoryTypeId="1" PostId="1289" RevisionGUID="9400c17f-77ed-481b-a103-67ce352fd1db" CreationDate="2022-03-27T07:29:23.043" UserId="1927" Text="Hot Reloading of changes in Pallet in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="4686" PostHistoryTypeId="3" PostId="1289" RevisionGUID="9400c17f-77ed-481b-a103-67ce352fd1db" CreationDate="2022-03-27T07:29:23.043" UserId="1927" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4687" PostHistoryTypeId="2" PostId="1290" RevisionGUID="d63ee562-5aaa-4b60-a278-5fd74a95821c" CreationDate="2022-03-27T07:40:15.957" UserId="627" Text="What you need to do is the following:&#xD;&#xA;&#xD;&#xA; - Converts the relevant blockNumber to a hash&#xD;&#xA; - Since runtime changes across upgrades, we get an instance of the API at a specific point&#xD;&#xA; - Perform the query against aciveEra, which returns an Option&#xD;&#xA; - Check if the option is Some or None, we don't want to unwrap None&#xD;&#xA; - Display the pertinent details&#xD;&#xA;&#xD;&#xA;In code-form against the JS API, tested as-is on Polkadot -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// the blockNumber we wish to query for&#xD;&#xA;const blockNumber = 9608858;&#xD;&#xA;&#xD;&#xA;// get the blockhash and API instance at this point of the chain&#xD;&#xA;const blockHash = await api.rpc.chain.getBlockHash(blockNumber);&#xD;&#xA;const apiAt = await api.at(blockHash);&#xD;&#xA;&#xD;&#xA;// retrieve the activeEra&#xD;&#xA;const activeEraOpt = await apiAt.query.staking.activeEra();&#xD;&#xA;&#xD;&#xA;if (activeEraOpt.isSome) {&#xD;&#xA;  const { index, start } = activeEraOpt.unwrap();&#xD;&#xA;  &#xD;&#xA;  console.log(`${index.toString()} started at ${new Date(start.unwrap().toNumber()).toString()}`);&#xD;&#xA;} else {&#xD;&#xA;  // there has been nothing at this point&#xD;&#xA;  console.log('no activeEra found')&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4689" PostHistoryTypeId="2" PostId="1291" RevisionGUID="b0251b68-1f65-4b98-8ed3-369604da71c0" CreationDate="2022-03-27T07:41:17.340" UserId="620" Text="To get the era of a block, you can look at the `ActiveEra` storage item in [Staking](https://github.com/paritytech/substrate/blob/7a09b82/frame/staking/src/pallet/mod.rs#L302), and just query it at a particular block.&#xD;&#xA;&#xD;&#xA;If you want to map the other way, era to block, you will need to index the chain for when the eras change, since an era actually corresponds to a range of blocks.&#xD;&#xA;&#xD;&#xA;The [Sidecar staking controller](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/controllers/pallets/PalletsStakingProgressController.ts) is a great place to look for how to derive staking related information. This particular question is handled by the internal function [`deriveSessionAndEraProgress`](https://github.com/paritytech/substrate-api-sidecar/blob/db74ab49fcf948f44332568c57958ff85630c288/src/services/pallets/PalletsStakingProgressService.ts#L128)." ContentLicense="CC BY-SA 4.0" />
  <row Id="4691" PostHistoryTypeId="2" PostId="1292" RevisionGUID="9f7b9e56-930f-4b7c-9a93-28563427ec2c" CreationDate="2022-03-27T07:45:55.147" UserId="642" Text="I did not watch the video, but the following information may help that shows the whole auction periods which consists of a grace period (or auction stage) and a candle phase (or ending stage) .&#xD;&#xA;                                                                                                 &#xD;&#xA;&#xD;&#xA;|**starts**|--27000 blocks (grace period ~ 2days)--|==72000 blocks (candle Phase ~ 5days)==|**ends**|&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;candle phase start block can be fetched via : api.query.auctions.auctionInfo();&#xD;&#xA;&#xD;&#xA;and candle phase duration (ending period) via : api.consts.auctions?.endingPeriod&#xD;&#xA;&#xD;&#xA;then the starts and ends of periods can be easily calculated." ContentLicense="CC BY-SA 4.0" />
  <row Id="4693" PostHistoryTypeId="5" PostId="1283" RevisionGUID="8b32844f-5f41-4403-ba56-b73e81579ff7" CreationDate="2022-03-27T07:58:13.497" UserId="83" Comment="Grammar and bold" Text="It shows what steps should be taken for **offboarding** a parachain or parathread from the system in the Polkadot codebase [here](https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/paras/mod.rs#L1129), which includes the following: &#xD;&#xA;&#xD;&#xA;* ◻ Remove the registered parachain id from the head-data storage item `&lt;Self as Store&gt;::Heads::remove(&amp;para)`&#xD;&#xA;* ◻ Remove the registered parachain id from the `FutureCodeUpgrades` storage item `&lt;Self as Store&gt;::FutureCodeUpgrades::remove(&amp;para)`&#xD;&#xA;* ◻ Remove the registered parachain id from the `UpgradeGoAheadSignal` storage item `&lt;Self as Store&gt;::UpgradeGoAheadSignal::remove(&amp;para)`&#xD;&#xA;* ◻ Remove the registered parachain id from the `UpgradeRestrictionSignal` storage item `&lt;Self as Store&gt;::UpgradeRestrictionSignal::remove(&amp;para)`&#xD;&#xA;* ◻ Decrease the number of references of the validation code and remove it from storage if zero is reached, which involves&#xD;&#xA;	* ☑ Copy the `FutureCodeHash` for that parachain id and remove it from `FutureCodeHash` storage&#xD;&#xA;		```&#xD;&#xA;		let removed_future_code_hash = &lt;Self as Store&gt;::FutureCodeHash::take(&amp;para)&#xD;&#xA;		```&#xD;&#xA;	* ◻ If that `FutureCodeHash` value is not `None`, then you need to use that copied `FutureCodeHash` as the `ValidationCodeHash` (`code_hash`) in the `decrease_code_ref` function shown [here](https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/paras/mod.rs#L1959)&#xD;&#xA;		```&#xD;&#xA;		if let Some(removed_future_code_hash) = removed_future_code_hash {&#xD;&#xA;			Self::decrease_code_ref(&amp;removed_future_code_hash);&#xD;&#xA;		}&#xD;&#xA;		```&#xD;&#xA;		* ◻ In `decrease_code_ref` you provide it as an argument to `CodeByHashRefs`.&#xD;&#xA;			* Obtain its `refs` storage value, as shown below:&#xD;&#xA;				```&#xD;&#xA;				fn decrease_code_ref(code_hash: &amp;ValidationCodeHash) -&gt; Weight {&#xD;&#xA;					...&#xD;&#xA;					let refs = &lt;Self as Store&gt;::CodeByHashRefs::get(code_hash)&#xD;&#xA;				```&#xD;&#xA;			* If `refs == 0` then no further action is required in this step.&#xD;&#xA;			* Else if `refs &lt;= 1` then remove that `code_hash` value from the storage values `CodeByHash` and `CodeByHashRefs` as shown below:&#xD;&#xA;				```&#xD;&#xA;				&lt;Self as Store&gt;::CodeByHash::remove(code_hash);&#xD;&#xA;				&lt;Self as Store&gt;::CodeByHashRefs::remove(code_hash);&#xD;&#xA;				```&#xD;&#xA;			* Otherwise you need to insert a value into `CodeByHashRefs` storage, where the key is that `code_hash` and the value is `refs - 1` as shown below:&#xD;&#xA;				```&#xD;&#xA;				&lt;Self as Store&gt;::CodeByHashRefs::insert(code_hash, refs - 1);&#xD;&#xA;				```&#xD;&#xA;* ◻ Note the replacement of code for the parachain id, in the context of the current relay-chain block number, and provide the replaced code, which involves:&#xD;&#xA;	* ◻ Copy the `CurrentCodeHash` for that parachain id and remove it from `CurrentCodeHash` storage&#xD;&#xA;		```&#xD;&#xA;		let removed_code_hash = &lt;Self as Store&gt;::CurrentCodeHash::take(&amp;para)&#xD;&#xA;		```&#xD;&#xA;	* ◻ If that `CurrentCodeHash` value is not `None`, then you need to do the following in the `note_past_code` function:&#xD;&#xA;		* Use that copied `CurrentCodeHash` as the `ValidationCodeHash` (`old_code_hash`) in the `note_past_code` function shown [here](https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/paras/mod.rs#L1187), as shown below:&#xD;&#xA;			```&#xD;&#xA;			if let Some(removed_code_hash) = removed_code_hash {&#xD;&#xA;				Self::note_past_code(para, now, now, removed_code_hash);&#xD;&#xA;			}&#xD;&#xA;			```&#xD;&#xA;		* ◻ In the `note_past_code` function it shows you have to update the `PastCodeMeta` for that parachain id, and the current relay-chain block number, which requires updating the `upgrade_times` property of `ParaPastCodeMeta` by pushing a new `ReplacementTimes { expected_at, activated_at }` value where `expected_at` and `activated_at` are both the current relay-chain block number.&#xD;&#xA;			```&#xD;&#xA;			&lt;Self as Store&gt;::PastCodeMeta::mutate(&amp;id, |past_meta| {&#xD;&#xA;				past_meta.note_replacement(at, now);&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			...&#xD;&#xA;&#xD;&#xA;			impl&lt;N: Ord + Copy + PartialEq&gt; ParaPastCodeMeta&lt;N&gt; {&#xD;&#xA;				// note a replacement has occurred at a given block number.&#xD;&#xA;				pub(crate) fn note_replacement(&amp;mut self, expected_at: N, activated_at: N) {&#xD;&#xA;					self.upgrade_times.push(ReplacementTimes { expected_at, activated_at })&#xD;&#xA;				}&#xD;&#xA;&#xD;&#xA;			...&#xD;&#xA;&#xD;&#xA;			/// Metadata used to track previous parachain validation code that we keep in&#xD;&#xA;			/// the state.&#xD;&#xA;			...&#xD;&#xA;			pub struct ParaPastCodeMeta&lt;N&gt; {&#xD;&#xA;				upgrade_times: Vec&lt;ReplacementTimes&lt;N&gt;&gt;,&#xD;&#xA;			```&#xD;&#xA;		* ◻ In the `note_past_code` function, it shows you have to insert the `old_code_hash` as the new value of a key that is a tuple containing the parachain id and the current relay-chain block number:&#xD;&#xA;			```&#xD;&#xA;			&lt;Self as Store&gt;::PastCodeHash::insert(&amp;(id, at), old_code_hash);&#xD;&#xA;			```&#xD;&#xA;		* ◻ In the `note_past_code` function, it shows you need to update `PastCodePruning` storage by finding the index of the current relay-chain block number, and then inserting a new tuple value under that index `(id, now)`, which is the parachain id and the current relay-chain block number&#xD;&#xA;			```&#xD;&#xA;			&lt;Self as Store&gt;::PastCodePruning::mutate(|pruning| {&#xD;&#xA;				let insert_idx =&#xD;&#xA;					pruning.binary_search_by_key(&amp;now, |&amp;(_, b)| b).unwrap_or_else(|idx| idx);&#xD;&#xA;				pruning.insert(insert_idx, (id, now));&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			...&#xD;&#xA;&#xD;&#xA;			#[pallet::storage]&#xD;&#xA;			pub(super) type PastCodePruning&lt;T: Config&gt; =&#xD;&#xA;				StorageValue&lt;_, Vec&lt;(ParaId, T::BlockNumber)&gt;, ValueQuery&gt;;&#xD;&#xA;			```&#xD;&#xA;&#xD;&#xA;It also shows what steps to take to **deregister** a parachain:&#xD;&#xA;&#xD;&#xA;* ☑ Deregister a parachain as shown in the function [here](https://github.com/paritytech/polkadot/blob/master/runtime/common/src/paras_registrar.rs#L538)&#xD;&#xA;&#xD;&#xA;If you have only manually deleted the `FutureCodeHash` for the previous parachain id and deregistered the parachan, then it seems you have only finished doing the steps where I have checked the checkboxes above, and hopefully you made a copy of the `FutureCodeHash` before deleting it, but it appears you still have to do the other offboarding steps that are indicated above with unchecked checkboxes.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4694" PostHistoryTypeId="2" PostId="1293" RevisionGUID="31220c95-5eea-44bf-9c87-d1d335eb5355" CreationDate="2022-03-27T08:10:52.540" UserId="627" Text="It is not actually a display issue as suggested, it is by design where values &gt; 512 bits are truncated. If you wish to have the actual full value, you can always query via the developer tools. &#xD;&#xA;&#xD;&#xA;However...&#xD;&#xA;&#xD;&#xA;The trimming actually pre-dates the introduction of `text-overflow: ellipsis` on the fields (which are quite a nightmare to get right when things start nesting in weird ways) and as a consequence, actually duplicates effort. So basically it ended in a situation where &quot;pretty formatting&quot; was applied in the middle and then again by the rendering engine. Not quite optimal to say the least.&#xD;&#xA;&#xD;&#xA;With that in mind, see [this PR](https://github.com/polkadot-js/apps/pull/7245) which actually [removes the manual formatting](https://github.com/polkadot-js/apps/pull/7245/files#diff-1b3384da16415e81132a60c8d8a43593f07d56703551b7e49289d69ff45deb95L60-R60) when converting to a hex display, only relying on the builtin browser version. &#xD;&#xA;&#xD;&#xA;You would obviously still see ellipsis at the _end_ if it does overflow when something like a hex string is too long, however if you are after the field inspect would work since it is display-only. &#xD;&#xA;&#xD;&#xA;For those wanting to scratch an itch: It may actually be quite useful to have a &quot;Copy button&quot; on these output fields, at the very least where `Bytes` or `Hash` or anything that is not structured in a `toHuman()` form is displayed." ContentLicense="CC BY-SA 4.0" />
  <row Id="4696" PostHistoryTypeId="5" PostId="1290" RevisionGUID="3ae4f20d-7c22-45bc-8d11-f5a1b086e389" CreationDate="2022-03-27T08:17:31.740" UserId="627" Comment="added 9 characters in body" Text="What you need to do is the following:&#xD;&#xA;&#xD;&#xA; - Convert the relevant blockNumber to a hash&#xD;&#xA; - Since runtime changes across upgrades, we get an instance of the API at a specific point&#xD;&#xA; - Perform the query against `staking.aciveEra`, which returns an Option&#xD;&#xA; - Check if the option is Some or None, we don't want to unwrap None&#xD;&#xA; - Display the pertinent details&#xD;&#xA;&#xD;&#xA;In code-form against the JS API, tested as-is on Polkadot -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// the blockNumber we wish to query for&#xD;&#xA;const blockNumber = 9608858;&#xD;&#xA;&#xD;&#xA;// get the blockhash and API instance at this point of the chain&#xD;&#xA;const blockHash = await api.rpc.chain.getBlockHash(blockNumber);&#xD;&#xA;const apiAt = await api.at(blockHash);&#xD;&#xA;&#xD;&#xA;// retrieve the activeEra&#xD;&#xA;const activeEraOpt = await apiAt.query.staking.activeEra();&#xD;&#xA;&#xD;&#xA;if (activeEraOpt.isSome) {&#xD;&#xA;  const { index, start } = activeEraOpt.unwrap();&#xD;&#xA;  &#xD;&#xA;  console.log(`${index.toString()} started at ${new Date(start.unwrap().toNumber()).toString()}`);&#xD;&#xA;} else {&#xD;&#xA;  // there has been nothing at this point&#xD;&#xA;  console.log('no activeEra found')&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4697" PostHistoryTypeId="5" PostId="1164" RevisionGUID="246cbd87-cdae-400d-a941-99437e6055c8" CreationDate="2022-03-27T08:18:36.373" UserId="83" Comment="Single clear question" Text="I'm trying to remove a storage item on the relay chain, specifically a `futureCode` entry for a parachain.&#xD;&#xA;&#xD;&#xA;I've seen that there's an extrinsic I can call `system.killStorage(keys)`, however I have some doubts.&#xD;&#xA;&#xD;&#xA;How do I find the `keys` to use on `killStorage` if this is the path forward? It seems it's `Vec&lt;Bytes&gt; (Vec&lt;Key&gt;)`.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="4698" PostHistoryTypeId="4" PostId="1164" RevisionGUID="246cbd87-cdae-400d-a941-99437e6055c8" CreationDate="2022-03-27T08:18:36.373" UserId="83" Comment="Single clear question" Text="How to manually remove storage items using Sudo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4699" PostHistoryTypeId="2" PostId="1294" RevisionGUID="5aa3a71f-5f35-4620-9a11-51e62ea22342" CreationDate="2022-03-27T08:20:33.393" UserId="73" Text="There doesn't exists such a feature. However, given the upgradability of the runtime you could just rebuild your runtime and send a runtime upgrade. Be aware that you would also need to bump your `spec_version`. You could automate some of the work through some simple script.&#xD;&#xA;&#xD;&#xA;You don't need to open a feature request for this, as this can be done through a script which can live completely separate to substrate. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4701" PostHistoryTypeId="5" PostId="1165" RevisionGUID="fdda386e-6581-46a8-8767-4080a7506bab" CreationDate="2022-03-27T08:21:16.297" UserId="83" Comment="typo stuff" Text="If you have access to the polkadot-js/apps UI to your chain, you can get the keys listed in the Developer -&gt; Chain state section. Select the entry you want as well as the params and it will also show the key for that entry. Simply copy it and you should be good to go.&#xD;&#xA;&#xD;&#xA;An example for `futureCodeHash(2000)` on Rococo would be `0xcd710b30bd2eab0352ddcc26417aa194cad3324113c312669f1ac3d50722524b63f5a4efb16ffa83d0070000`&#xD;&#xA;&#xD;&#xA;See below:&#xD;&#xA;&#xD;&#xA;[![Storage app with key selection][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NbKBA.png&#xD;&#xA;&#xD;&#xA;Next up you can use this value in the Developer -&gt; Extrinsics section to remove the storage via the `system.killStorage` extrinsic. &#xD;&#xA;&#xD;&#xA;It has been deployed for this type of cleanup by the Council on Kusama/Polkadot a couple of times in the past (mostly to remove old state that has moved to different locations).&#xD;&#xA;&#xD;&#xA;As a first round, I would always suggest that you test the process against a dev chain first, unless it is something disposable." ContentLicense="CC BY-SA 4.0" />
  <row Id="4702" PostHistoryTypeId="2" PostId="1295" RevisionGUID="a8d85716-3db4-47d0-bc21-bdd8dfe341c6" CreationDate="2022-03-27T08:26:32.420" UserId="1925" Text="I am trying to create [a JS code][2] to be able to vote using proxy account that has been given democracy permissions to stash account, so I would be able to vote using just my mobile phone instead of accessing my home setup for voting using just terminal.&#xD;&#xA;&#xD;&#xA;[Substrate Extrinsics Docs][1] instructs following&#xD;&#xA;proxy(real: AccountId32, force_proxy_type: Option&lt;NodeRuntimeProxyType&gt;, call: Call),&#xD;&#xA;so we need to make a proxy call with address of stash account, type of proxy call and call in encoded format like 0x0500306721211d5404bd9da88e0204360a1a9ab8b87c66c1bc2fcdd37f3c2222cc200f00a0be1c448399.  &#xD;&#xA;My struggle is, how do I get voting data this call data in encoded format? How do I use these imaginary keys to sign my vote?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const PROXY = {&#xD;&#xA;               address: '5D7m1JT5QR6Pg1z4LXZPTNZqiFVzUX9NbAndeZvVzrjUCpNe',&#xD;&#xA;               key: 'expose circle crack addict nasty horny men write sugar cloth sound orbit',&#xD;&#xA;               type: 'Governance'&#xD;&#xA;               };&#xD;&#xA;const STASH = {&#xD;&#xA;               address: '5Dhf5LvBWcvioXuLeGzW1xLaEKTfFmUmnE2ZC5RLKaJu2K8M',&#xD;&#xA;               key: 'tank barrel crack addict nasty horny men write sugar unfold hood expect depend'&#xD;&#xA;               };&#xD;&#xA;&#xD;&#xA;       &#xD;&#xA;function proxyVoting(address, type, ref_index, vote) { &#xD;&#xA;  api.tx.proxy.proxy(address, type, (call)=&gt;{&#xD;&#xA;    api.tx.democracy.vote(ref_index, vote);&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;proxyVoting(STASH.address, PROXY.type, 183, true);&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;Error: createType(Call):: Call: failed decoding proxy.proxy:: Struct: failed on args: {&quot;real&quot;:&quot;AccountId32&quot;,&quot;force_proxy_type&quot;:&quot;Option&lt;KusamaRuntimeProxyType&gt;&quot;,&quot;call&quot;:&quot;Call&quot;}:: Struct: failed on call: Call:: Call: Cannot decode value '(call)=&gt;{&#xD;&#xA;    api.tx.democracy.vote(ref_index, vote);&#xD;&#xA;  }' of type function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/extrinsics/#proxyreal-accountid32-force_proxy_type-optionnoderuntimeproxytype-call-call&#xD;&#xA;  [2]: https://polkadot.js.org/apps/#/js" ContentLicense="CC BY-SA 4.0" />
  <row Id="4704" PostHistoryTypeId="1" PostId="1295" RevisionGUID="a8d85716-3db4-47d0-bc21-bdd8dfe341c6" CreationDate="2022-03-27T08:26:32.420" UserId="1925" Text="How to use Polkadot JS API for governance proxy call correctly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4705" PostHistoryTypeId="3" PostId="1295" RevisionGUID="a8d85716-3db4-47d0-bc21-bdd8dfe341c6" CreationDate="2022-03-27T08:26:32.420" UserId="1925" Text="|polkadot-js|proxy|transactions|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4706" PostHistoryTypeId="2" PostId="1296" RevisionGUID="8055f0cd-e04f-42c9-9eb6-2caad96d751a" CreationDate="2022-03-27T08:34:18.513" UserId="627" Text="Since this was tagged `polkadot-js-api` I will give you the JS API perspective on this. The JS API basically only wraps what the Node &amp; runtime exposes. This means -&#xD;&#xA;&#xD;&#xA; - For the Node, all the RPC functions exposed are mapped and the JS API provides you an interface to them on `api.rpc.*`&#xD;&#xA; - For the runtime, all the storage, extrinsic, const, etc. endpoints exposed by the runtime is mapped, providing you are interface on `api.{tx, query, consts, ...}.*`&#xD;&#xA;&#xD;&#xA;Since you mention telemetry, the actual data that is being passed through to telemetry is not actually available via RPC (and it is an optional push from the nodes and can be switched off), and if it was available it would most probably be behind an `unsafe_` RPC, i.e. not exposed by default. &#xD;&#xA;&#xD;&#xA;Like with Telemetry, data can also be pushed from the nodes to Prometheus and most of the larger RPC providers (and validators) indeed do that for tracking their own infrastructure. Once again, this is also optional and sensitive to the node operation itself, so there are no &quot;general RPC endpoints&quot; available for this. &#xD;&#xA;&#xD;&#xA;The type of information you can get from the `@polkadot/api` would only be related to chain state, i.e. you can connect to multiple endpoints and then query for eg. the same address. There are some basic RPC endpoints that give you some [connection state](https://polkadot.js.org/docs/substrate/rpc#networkstate-networkstate), but they are limited and generally marked `unsafe_`.&#xD;&#xA;&#xD;&#xA;To summarize: The telemetry data is an (optional) push from nodes to a dedicated, configurable endpoint. The same applies to information from Prometheus, it is an optional push to a dedicated endpoint." ContentLicense="CC BY-SA 4.0" />
  <row Id="4708" PostHistoryTypeId="2" PostId="1297" RevisionGUID="83359cc8-1a55-4dec-afda-4d7978a98aff" CreationDate="2022-03-27T08:39:40.273" UserId="627" Text="To wrap something in a proxy, just pass the `api.tx.&lt;module&gt;.&lt;method&gt;(...)` as-is. &#xD;&#xA;&#xD;&#xA;In code it would be -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;function proxyVoting(address, type, ref_index, vote) { &#xD;&#xA;  return api.tx.proxy.proxy(&#xD;&#xA;    address,&#xD;&#xA;    api.tx.democracy.vote(ref_index, vote)&#xD;&#xA;  );&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The same applies everywhere you need to pass a `Call` e.g. batch transactions, sudo, etc." ContentLicense="CC BY-SA 4.0" />
  <row Id="4710" PostHistoryTypeId="2" PostId="1298" RevisionGUID="0e7c99c5-b570-45c8-b728-6353ea488650" CreationDate="2022-03-27T09:36:42.787" UserId="87" Text="I'm not sure what exactly you mean by the point &quot;history of the usage of different WebSockets&quot;, but I have a feeling that you are not intending to inspect the packets exchanged via websockets, but rather the &quot;transaction content&quot; between chains. This is an entirely different thing, and if this is the case, I would forget about the websocket aspect altogether - that is all about networking and doesn't help answer your question.&#xD;&#xA;&#xD;&#xA;This answer is focused on my assumption about it not being about websocket package content - which could be wrong of course.&#xD;&#xA;&#xD;&#xA;Assuming that is the case, I would add to @Jaco response by stating that indeed the libraries he indicated (and developed) are what you need from a technical point of view especially if you are using javascript.&#xD;&#xA;&#xD;&#xA;What you are really looking for are a subset of transactions that are being executed on a parachain - perhaps not the full set of transactions.&#xD;&#xA;&#xD;&#xA;That subset would be all transactions coming from and going to other parachains, possibly via the relaychain and having some implication for storage on the source and target parachains. &#xD;&#xA;&#xD;&#xA;Bear in mind that a transaction has three components:&#xD;&#xA;&#xD;&#xA;1) the content of the transaction (transactions also known as extrinsics)&#xD;&#xA;2) if the processing produces a successful outcome for the entirety of the transaction (if not then of course there are error messages and events to collect)&#xD;&#xA;3) the state changes stored in the blockchain _if_ the transaction was successful&#xD;&#xA;&#xD;&#xA;And this should really relate to the following endpoints, which you can inspect as follows (I use Polkadot as an example):&#xD;&#xA;&#xD;&#xA;[Polkadot Chain State (storage)][1]&#xD;&#xA;&#xD;&#xA;Downward messaging protocol - dmp&#xD;&#xA;[![dmp][2]][2]&#xD;&#xA;&#xD;&#xA;Horizontal Messaging Protocol - hrmp&#xD;&#xA;&#xD;&#xA;This is also available as an extrinsic which you can visit from PDJS Apps&#xD;&#xA;[![hrmp][3]][3]&#xD;&#xA;&#xD;&#xA;Upward Messaging Protocol - ump&#xD;&#xA;&#xD;&#xA;Cross Chain Messaging Protocol - xcmPallet&#xD;&#xA;&#xD;&#xA;Also available as an extrinsic - and you can see the various endpoints by selecting the second menu in PDJS Apps&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;From the perspective of a parachain, I will use [Statemint][5] as the example for storage endpoints, which for a parachain are the same for extrinsic endpoints. (i.e. they are from the same pallets.)&#xD;&#xA;&#xD;&#xA;1) Downward Message Protocol Queue - dmpQueue&#xD;&#xA;&#xD;&#xA;2) PolkadotXCM&#xD;&#xA;&#xD;&#xA;3) xcmpQueue&#xD;&#xA;&#xD;&#xA;I mentioned Events and Errors. These are issues at the time of the transaction, and are commonly available either at the moment they are issued, or by inspecting the specific block that the transaction was executed in (failed or not).&#xD;&#xA;&#xD;&#xA;The last point is about history. Whilst you can of course run a node yourself (you will need to run both the relay chain and all parachain nodes you want to inspect) bear in mind that the history would better be stored in a dedicated database for performance reasons, and because eventually nodes that are not full archive nodes will be pruned.&#xD;&#xA;&#xD;&#xA;Storing history also has another benefit in that you do not have to be constantly online to monitor the responses(Events and errors) from transaction, but can parse the contents of blocks whenever convenient to catch up.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-rpc.dwellir.com#/chainstate&#xD;&#xA;  [2]: https://i.stack.imgur.com/t0wfd.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/AHUWC.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/bfIl3.png&#xD;&#xA;  [5]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fstatemint.api.onfinality.io%2Fpublic-ws#/chainstate" ContentLicense="CC BY-SA 4.0" />
  <row Id="4712" PostHistoryTypeId="2" PostId="1299" RevisionGUID="6bc1c96c-2486-4a13-a203-bd05f96064d1" CreationDate="2022-03-27T10:45:01.820" UserId="3" Text="This is a question that I got stuck on a couple of month ago. My questions were answered in a [disucssion with Shawn Tabrizi on GitHub](https://github.com/substrate-developer-hub/substrate-docs/issues/531), which was a big leap forward for me in understanding the architecture of substrate.&#xD;&#xA;&#xD;&#xA;## Why do we need this and in which cases would the `no_std` attribute be applied?&#xD;&#xA;&#xD;&#xA;Take a look at [Architecture](https://docs.substrate.io/v3/getting-started/architecture/) and the links therein. You'll find that a substrate node contains two version of the runtime code, the _native runtime_ and the _Wasm runtime_ (see https://en.wikipedia.org/wiki/WebAssembly). Note that the Wasm is stored _on chain_.&#xD;&#xA;&#xD;&#xA;This is done to enable forkless runtime upgrades, in which the on-chain Wasm binary is replaced with a new version (but the native binary remains unchanged). Substrate uses Wasm as it is architecture independent (the Wasm must run on machines of different architecture, after all).&#xD;&#xA;&#xD;&#xA;Now, whenever possible the faster native runtime is used to execute calls. But after a forkless runtime upgrade (in which only the Wasm updated), certain features of the native runtime may be outdated. Then the Wasm binary is used to execute the call, instead. See [Executor](https://docs.substrate.io/v3/advanced/executor/) for details.&#xD;&#xA;&#xD;&#xA;Back to the `no_std` attribute. When you build your node, the [runtime/build.rs](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/build.rs) first builds the Wasm binary (see [Build Scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html) for details on build scripts) with the `no_std` attribute. The reason for this is (again) architecture independence. Wasm cannot use the `libstd` of Rust. The _Embedded Rust Book_ puts it quite clearly:&#xD;&#xA;&#xD;&#xA;&gt; In a bare metal environment no code has been loaded before your program. Without the software provided by an OS we can not load the standard library. Instead the program, along with the crates it uses, can only use the hardware (bare metal) to run.&#xD;&#xA;&#xD;&#xA;In other words, `libstd` is OS dependent, and that kind of thing doesn't fly with Wasm.&#xD;&#xA;&#xD;&#xA;So, after the Wasm binary is build, the runtime is compiled again, into the native binary, this time with `std` enabled. The native binary actually contains the Wasm binary (we say that the Wasm is embedded into the native binary). This is done so that the first iteration of the Wasm binary can be copied from the native binary into the on-chain storage at genesis.&#xD;&#xA;&#xD;&#xA;The inclusion of the Wasm is one example of where a block of code is excluded from the Wasm binary (for obvious reasons, in this case):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/wasm_binary.rs&quot;));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Other than that, it doesn't seem like many projects make much use of `std` features directly, but in many of the standard dependencies you will frequently find `#[cfg(feature = &quot;std&quot;)]`, for example [frame/system](https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs). The idea is that using objects only available in `libstd` will improve the performance of the native binary.&#xD;&#xA;&#xD;&#xA;## Why would we check if the `std` feature is not being used if it is implicitly always used via the default feature?&#xD;&#xA;&#xD;&#xA;All dependencies (expect for the Wasm builder, which isn't a part of the runtime) are included using `default-features = false`, which disables this behavior (see [Cargo &gt; Features &gt; The `default` feature](https://doc.rust-lang.org/cargo/reference/features.html#the-default-feature)). For example: [runtime/Cargo.toml](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/Cargo.toml).&#xD;&#xA;&#xD;&#xA;I believe this is done for the following reason:&#xD;&#xA;&#xD;&#xA;- The Wasm builder _doesn't_ use the default feature `std`. If you don't specify `default-features = false` in the dependencies, then the dependencies use their `std` feature, and then the Wasm can't be build.&#xD;&#xA;- The &quot;normal&quot; build process (where you build the native binary) is done using the `std` feature, and you don't want to keep typing `cargo build --features=std`.&#xD;&#xA;&#xD;&#xA;But to be honest, I'm a little shaky on this last point. Maybe someone else can confirm or clarify further.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4714" PostHistoryTypeId="2" PostId="1300" RevisionGUID="16be6324-ce26-4aab-9d08-3e945e6fab54" CreationDate="2022-03-27T11:06:53.000" UserId="87" Text="The error means that you have an inconsistency somewhere in one of your cargo manifests (`Cargo.toml` files). &#xD;&#xA;&#xD;&#xA;It is requesting the `Benchmarking pallet`, but it is not included. Would would need to give much more detail about what you are doing though. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4716" PostHistoryTypeId="2" PostId="1301" RevisionGUID="fb366cd6-ea31-45d0-9d0e-02354c8dcf1f" CreationDate="2022-03-27T12:51:50.790" UserId="448" Text="Could I have one pallet emit an event that other pallets are aware of?&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;- assets-pallet emits an AssetCreated event&#xD;&#xA;- market-pallet listens for the AssetCreated event&#xD;&#xA;&#xD;&#xA;So the assets-pallet is not aware of the market-pallet.&#xD;&#xA;&#xD;&#xA;Is there anything within Substrate for this purpose?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4718" PostHistoryTypeId="1" PostId="1301" RevisionGUID="fb366cd6-ea31-45d0-9d0e-02354c8dcf1f" CreationDate="2022-03-27T12:51:50.790" UserId="448" Text="Are there any event patterns for pallets to communicate within the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4719" PostHistoryTypeId="3" PostId="1301" RevisionGUID="fb366cd6-ea31-45d0-9d0e-02354c8dcf1f" CreationDate="2022-03-27T12:51:50.790" UserId="448" Text="|pallet|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4720" PostHistoryTypeId="2" PostId="1302" RevisionGUID="b064fb13-47fe-4e4a-ae1a-170ce2edafbd" CreationDate="2022-03-27T13:19:00.963" UserId="620" Text="There are ways for pallets to communicate in the runtime, although I wouldn't use events for this (events are stored in an overlay that gets applied to storage at the end of the block (in `pallet_system.on_finalize`). I'm not a core dev, so take this answer as an example/starting point, but definitely not exhaustive. Someone else may have a better solution.&#xD;&#xA;&#xD;&#xA;An example of pallet communication is the reporting of `Offences` to `Staking` in Polkadot. Not every chain that has offenses/slashing necessarily uses staking, so this is left as a configuration.&#xD;&#xA;&#xD;&#xA;Looking at `pallet-offences`, we have a [Config item](https://github.com/paritytech/substrate/blob/d26123aec44e3df00b921ab0d27cbc1de0b11fa9/frame/offences/src/lib.rs#L64), `OnOffenceHandler`. When an offense [is reported](https://github.com/paritytech/substrate/blob/d26123aec44e3df00b921ab0d27cbc1de0b11fa9/frame/offences/src/lib.rs#L142), it calls the handler.&#xD;&#xA;&#xD;&#xA;In Polkadot, the runtime says that this [Offense Handler is Staking](https://github.com/paritytech/polkadot/blob/release-v0.9.18/runtime/polkadot/src/lib.rs#L843). And indeed, the Staking pallet has [an implementation](https://github.com/paritytech/substrate/blob/d26123aec44e3df00b921ab0d27cbc1de0b11fa9/frame/staking/src/pallet/impls.rs#L1139) of the [`OnOffenceHandler` trait](https://github.com/paritytech/substrate/blob/d26123aec44e3df00b921ab0d27cbc1de0b11fa9/primitives/staking/src/offence.rs#L166).&#xD;&#xA;&#xD;&#xA;If you want a similar handler for something like the creation of assets, I'd make an issue/PR to add a handler to the Assets pallet. Then, if another runtime did not want to use that handler, it would just config it to `AssetCreationHandler = ();` in its runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="4722" PostHistoryTypeId="2" PostId="1303" RevisionGUID="1e9a8638-46a2-47d4-8ff0-0e50a7083e44" CreationDate="2022-03-27T13:37:19.700" UserId="489" Text="Is there any customize call example in parachain XCM `transact` ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4724" PostHistoryTypeId="1" PostId="1303" RevisionGUID="1e9a8638-46a2-47d4-8ff0-0e50a7083e44" CreationDate="2022-03-27T13:37:19.700" UserId="489" Text="Parachain XCM customize call" ContentLicense="CC BY-SA 4.0" />
  <row Id="4725" PostHistoryTypeId="3" PostId="1303" RevisionGUID="1e9a8638-46a2-47d4-8ff0-0e50a7083e44" CreationDate="2022-03-27T13:37:19.700" UserId="489" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4726" PostHistoryTypeId="2" PostId="1304" RevisionGUID="a8267c8d-4c67-4c2d-9d68-f94f71ec315c" CreationDate="2022-03-27T13:59:00.793" UserId="83" Text="The &quot;Kappa Sigma Mu (KΣM)&quot; Kusama society website is [here](https://ksmsociety.io/) and further guidance is [here](https://guide.kusama.network/docs/maintain-guides-society-kusama/), which mentions its use of the Substrate [Society pallet](https://paritytech.github.io/substrate/master/pallet_society/index.html), where its rules are stored on-chain [here](https://polkascan.io/kusama/transaction/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17), and members and candidates interact on-chain by connecting to a Kusama endpoint using Polkadot.js Apps [here](https://polkadot.js.org/apps), and then navigate to the Society [here](https://polkadot.js.org/apps/#/society).&#xD;&#xA;&#xD;&#xA;In Kusama Polkassembly Discussions [here](http://kusama.polkassembly.io/discussions) there are numerous historic discussion posts regarding the bounties and growth strategies. It allows you to filter on-chain activities to only list bounties [here](http://kusama.polkassembly.io/bounties) if you want to find currently available bounty opportunities.&#xD;&#xA;&#xD;&#xA;Kusama launched in Sep 2019. It mentions in [this](https://decrypt.co/20457/this-crypto-fraternity-will-pay-you-3000-to-get-a-tattoo) article from Feb 25th 2020 that back then new members that were approved to join received 15 KSM.&#xD;&#xA;&#xD;&#xA;There were &quot;A week in Kusama&quot; posts published [here](https://www.publish0x.com/kusama) that show how the KΣM community growth evolved since launch, including:&#xD;&#xA;* Mar 2021, 150 members (max. capacity) admitted worldwide&#xD;&#xA;* Jan 10th 2021, 44 members, 5 candidates&#xD;&#xA;* Oct 18th, 2020, 23 members, 1 candidate&#xD;&#xA;* Oct 4th, 2020, 17 members&#xD;&#xA;* Sep 27th, 2020, 15 members, no candidates, 2 bids, insufficient pot size to cover the bids.&#xD;&#xA;* Sep 20th, 2020, 12 members, 1 candidate, 5 additional bids&#xD;&#xA;&#xD;&#xA;Since then an example of a bounty that was taken was for KSM brand and website development, where they published progress reports [#1](http://kusama.polkassembly.io/post/615) and [#2](http://kusama.polkassembly.io/post/716), which includes their [KSM Vision Document]( https://docs.google.com/presentation/d/14y2Vu_Gb85TwGDVIKYuhqRdx9WAGY8hRNwjhYyEWLls/edit#slide=id.gd3e550da19_0_12)." ContentLicense="CC BY-SA 4.0" />
  <row Id="4728" PostHistoryTypeId="5" PostId="1304" RevisionGUID="8974a996-c63e-4c8e-8acf-9744f39de243" CreationDate="2022-03-27T14:04:55.710" UserId="83" Comment="mention the history origin" Text="The &quot;Kappa Sigma Mu (KΣM)&quot; Kusama society website is [here](https://ksmsociety.io/) and further guidance is [here](https://guide.kusama.network/docs/maintain-guides-society-kusama/), which mentions its use of the Substrate [Society pallet](https://paritytech.github.io/substrate/master/pallet_society/index.html), where its rules are stored on-chain [here](https://polkascan.io/kusama/transaction/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17), and members and candidates interact on-chain by connecting to a Kusama endpoint using Polkadot.js Apps [here](https://polkadot.js.org/apps), and then navigate to the Society [here](https://polkadot.js.org/apps/#/society).&#xD;&#xA;&#xD;&#xA;In Kusama Polkassembly Discussions [here](http://kusama.polkassembly.io/discussions) there are numerous historic discussion posts regarding the bounties and growth strategies. It allows you to filter on-chain activities to only list bounties [here](http://kusama.polkassembly.io/bounties) if you want to find currently available bounty opportunities.&#xD;&#xA;&#xD;&#xA;Kusama launched in Sep 2019. It mentions in [this](https://decrypt.co/20457/this-crypto-fraternity-will-pay-you-3000-to-get-a-tattoo) article from Feb 25th 2020 that back then new members that were approved to join received 15 KSM.&#xD;&#xA;&#xD;&#xA;There were &quot;A week in Kusama&quot; posts published [here](https://www.publish0x.com/kusama) that show how the KΣM community growth evolved since launch, which I summarised below:&#xD;&#xA;* Mar 27th 2022, 137 members (~91% of max. capacity), 1 candidate&#xD;&#xA;* Mar 2021, 150 members (100% of max. capacity) admitted worldwide&#xD;&#xA;* Jan 10th 2021, 44 members, 5 candidates&#xD;&#xA;* Oct 18th, 2020, 23 members, 1 candidate&#xD;&#xA;* Oct 4th, 2020, 17 members&#xD;&#xA;* Sep 27th, 2020, 15 members, no candidates, 2 bids, insufficient pot size to cover the bids.&#xD;&#xA;* Sep 20th, 2020, 12 members, 1 candidate, 5 additional bids&#xD;&#xA;&#xD;&#xA;Since then an example of a bounty that was taken was for KSM brand and website development, where they published progress reports [#1](http://kusama.polkassembly.io/post/615) and [#2](http://kusama.polkassembly.io/post/716), which includes their [KSM Vision Document]( https://docs.google.com/presentation/d/14y2Vu_Gb85TwGDVIKYuhqRdx9WAGY8hRNwjhYyEWLls/edit#slide=id.gd3e550da19_0_12)." ContentLicense="CC BY-SA 4.0" />
  <row Id="4729" PostHistoryTypeId="2" PostId="1305" RevisionGUID="c6fd9dbb-b16b-470a-a2a5-8d91673b6c79" CreationDate="2022-03-27T15:06:12.443" UserId="301" Text="the simple example is in polkadot xcm-simulator [example][1].&#xD;&#xA;&#xD;&#xA;in theory, the call inside `Transact` can be any dispatch call, as long as it's encoded. because it's need to transfer to remote chain to do real dispatch call.&#xD;&#xA;&#xD;&#xA;a practical case such as parachain want to send xcm to relaychain, and let relaychain do some dispatch call, i.e. Acala use this [xcm message format][2]. for example to batch call, or staking bond etc.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/be005938a64b9170a5d55887ce42004e1b086b7b/xcm/xcm-simulator/example/src/lib.rs#L181-L188&#xD;&#xA;  [2]: https://github.com/AcalaNetwork/Acala/blob/5a8f381a95649eb74385fb7db31421d78118a651/modules/relaychain/src/lib.rs#L154-L158" ContentLicense="CC BY-SA 4.0" />
  <row Id="4731" PostHistoryTypeId="2" PostId="1306" RevisionGUID="e8984664-a6fe-444c-a420-e82437311461" CreationDate="2022-03-27T15:57:05.190" UserId="1837" Text="I am trying to put some test accounts to the storage of the following structure.&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn account_collection)]&#xD;&#xA;pub(super) type AccountsCollection&lt;T: Config&gt; =&#xD;&#xA;	StorageValue&lt;_, Vec&lt;T::AccountId&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Following is an AccounId32 type and I want T::AccountId type. I intend to call some extrinsic which will check if the caller is in account_collection.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let account_collection = vec![&#xD;&#xA;      sp_keyring::sr25519::Keyring::Alice.to_account_id()&#xD;&#xA;       ]&#xD;&#xA;AccountsCollection::&lt;T&gt;::put(&amp;account_collection);&#xD;&#xA;``` &#xD;&#xA;I am new to substrate any advice or help is appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="4733" PostHistoryTypeId="1" PostId="1306" RevisionGUID="e8984664-a6fe-444c-a420-e82437311461" CreationDate="2022-03-27T15:57:05.190" UserId="1837" Text="How to convert AccountId32 to T::AccounId?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4734" PostHistoryTypeId="3" PostId="1306" RevisionGUID="e8984664-a6fe-444c-a420-e82437311461" CreationDate="2022-03-27T15:57:05.190" UserId="1837" Text="|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4735" PostHistoryTypeId="5" PostId="1017" RevisionGUID="58122e7a-bafd-49e1-8b6b-18c3ced12a3a" CreationDate="2022-03-27T16:19:26.830" UserId="34" Comment="added 67 characters in body" Text="Related to running or maintaining a node (aka client) on a network." ContentLicense="CC BY-SA 4.0" />
  <row Id="4736" PostHistoryTypeId="24" PostId="1017" RevisionGUID="58122e7a-bafd-49e1-8b6b-18c3ced12a3a" CreationDate="2022-03-27T16:19:26.830" Comment="Proposed by 34 approved by 94, 83 edit id of 101" ContentLicense="CC BY-SA 4.0" />
  <row Id="4737" PostHistoryTypeId="5" PostId="1303" RevisionGUID="861bafb5-aba3-4f4d-a32a-ced1220a427d" CreationDate="2022-03-27T16:21:13.390" UserId="7" Comment="Improved question" Text="Are there any customized call examples in parachain XCM `transact`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4738" PostHistoryTypeId="24" PostId="1303" RevisionGUID="861bafb5-aba3-4f4d-a32a-ced1220a427d" CreationDate="2022-03-27T16:21:13.390" Comment="Proposed by 7 approved by 28, 83 edit id of 115" ContentLicense="CC BY-SA 4.0" />
  <row Id="4739" PostHistoryTypeId="2" PostId="1307" RevisionGUID="1e13c0af-fb2d-4b67-add3-9f6717447c51" CreationDate="2022-03-27T16:24:13.573" UserId="1850" Text="I couldn't compile ink_env when doing `cargo contract build`. Tried `cargo update` by referencing this other [post] (https://substrate.stackexchange.com/questions/967/error-duplicate-lang-item-in-crate-std-which-arrayvec-depends-on-panic). But it still doesn't work.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: duplicate lang item in crate `std` (which `num_traits` depends on): `oom`.                                                                                             |                                                                                                                                                                           = note: the lang item is first defined in crate `ink_allocator` (which `ink_env` depends on)                                                                                = note: first definition in `ink_allocator` loaded from /home/christopherfkk/phala-network-fat-contract-use-case/target/ink/wasm32-unknown-unknown/release/deps/libink_allocator-20507a21218d777e.rmeta                                                                                                                                                 = note: second definition in `std` loaded from /home/christopherfkk/phala-network-fat-contract-use-case/target/ink/wasm32-unknown-unknown/release/deps/libstd-a0c0252c27199310.rmeta                                                                                                                                                                                                                                                                                                                                              error[E0152]: found duplicate lang item `panic_impl`                                                                                                                          --&gt; /home/christopherfkk/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_env-3.0.0/src/lib.rs:53:1                                                                       |                                                                                                                                                                        53 | fn panic(info: &amp;core::panic::PanicInfo) -&gt; ! {                                                                                                                            | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                              |                                                                                                                                                                           = note: the lang item is first defined in crate `std` (which `num_traits` depends on)                                                                                       = note: first definition in `std` loaded from /home/christopherfkk/phala-network-fat-contract-use-case/target/ink/wasm32-unknown-unknown/release/deps/libstd-a0c0252c27199310.rmeta                                                                                                                                                                     = note: second definition in the local crate (`ink_env`)                                                                                                                                                                                                                                                                                             For more information about this error, try `rustc --explain E0152`.                                                                                                         error: could not compile `ink_env` due to 2 previous errors " ContentLicense="CC BY-SA 4.0" />
  <row Id="4741" PostHistoryTypeId="1" PostId="1307" RevisionGUID="1e13c0af-fb2d-4b67-add3-9f6717447c51" CreationDate="2022-03-27T16:24:13.573" UserId="1850" Text="How to resolve duplicate lang item error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4742" PostHistoryTypeId="3" PostId="1307" RevisionGUID="1e13c0af-fb2d-4b67-add3-9f6717447c51" CreationDate="2022-03-27T16:24:13.573" UserId="1850" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4743" PostHistoryTypeId="2" PostId="1308" RevisionGUID="5cfd2eaa-c0cc-4e09-8c68-da4a254edbbc" CreationDate="2022-03-27T16:24:17.523" UserId="23" Text="The society was launched on January 19th, 2020 with an [onchain convention of membership][1]&#xD;&#xA;&#xD;&#xA;As you can see in Luke's answer, it took half a year for the first dozen members to join. &#xD;&#xA;&#xD;&#xA;The society doesn't &quot;pay bounties to people who join&quot; - instead, people bid how much they are willing to join the society for, and the lowest bidders fill up the empty seats in the society, up to a certain number of seats per ~week - currently, the society is full, so there is usually only one seat available at a time, and that is only if an existing member is suspended from their position. &#xD;&#xA;&#xD;&#xA;This mechanism means that in the early days, especially in the first few months, you could bid whatever you wanted, and if the society's &quot;pot&quot; had that much available, it is what you would receive for joining the society. The society &quot;pot&quot; was initially funded by donations and one or two proposals to the treasury of the chain. &#xD;&#xA;&#xD;&#xA;A couple of early members of the society got rewarded [amounts of up to 1000 ksm][2] for joining. But after these initial big payouts, the amount of bidders/competition meant that it was unlikely that you would be awarded more than 10ksm. Nowadays, the number of prospective members means only bidders requesting effectively 0 KSM end up joining the society. &#xD;&#xA;&#xD;&#xA;Technically, while a small proportion of the Kusama Treasury's continuous burn is now directed towards the society's payout pot, the bidding mechanism means that large amount of tokens is *not accessible to anyone* as long as there are people willing to enter the society for free. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkascan.io/kusama/transaction/0x948d3a4378914341dc7af9220a4c73acb2b3f72a70f14ee8089799da16d94c17&#xD;&#xA;  [2]: https://kusama.subscan.io/extrinsic/3282116-3" ContentLicense="CC BY-SA 4.0" />
  <row Id="4745" PostHistoryTypeId="6" PostId="732" RevisionGUID="81858383-96c6-46a7-9b9a-bb0384f1ab6c" CreationDate="2022-03-27T16:25:01.010" UserId="83" Comment="remove unnecessary extra tag" Text="|kitties|substrate-kitties-chain|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4746" PostHistoryTypeId="2" PostId="1309" RevisionGUID="b30b38c8-ccc0-451d-82f7-e9a634d3b072" CreationDate="2022-03-27T16:34:34.767" UserId="642" Text="I would like to have the start of an era by eraIndex like:&#xD;&#xA;&#xD;&#xA;    const startingTime = getStartTimeOf( eraIndex );&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="4748" PostHistoryTypeId="1" PostId="1309" RevisionGUID="b30b38c8-ccc0-451d-82f7-e9a634d3b072" CreationDate="2022-03-27T16:34:34.767" UserId="642" Text="How get the starting Time of a an EraIndex?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4749" PostHistoryTypeId="3" PostId="1309" RevisionGUID="b30b38c8-ccc0-451d-82f7-e9a634d3b072" CreationDate="2022-03-27T16:34:34.767" UserId="642" Text="|polkadot|staking|session|epoch|eraindex|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4750" PostHistoryTypeId="5" PostId="1159" RevisionGUID="1d010ca0-375f-42e1-85ee-8a8f23c5ea76" CreationDate="2022-03-27T16:36:42.593" UserId="1918" Comment="Copy edited. Jeopardy compliance." Text="I want to construct a customized *call* in `Instruction::Transact`. But how can I pass parameters `palletId` (https://github.com/VegeBun-csj/Proof-Chain/blob/main/pallets/xclient/src/lib.rs#L79) and `methodId` (https://github.com/VegeBun-csj/Proof-Chain/blob/main/pallets/xclient/src/lib.rs#L80)?&#xD;&#xA;&#xD;&#xA;I configure the palletId and methodId in my Config which can be set in *Runtime* (https://github.com/VegeBun-csj/Proof-Chain/blob/main/runtime/src/lib.rs#L638). But how can I pass parameters to it?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4751" PostHistoryTypeId="4" PostId="1159" RevisionGUID="1d010ca0-375f-42e1-85ee-8a8f23c5ea76" CreationDate="2022-03-27T16:36:42.593" UserId="1918" Comment="Copy edited. Jeopardy compliance." Text="How can I pass `palletId` and `methodId` when I construct an Instruction::Transact call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4752" PostHistoryTypeId="24" PostId="1159" RevisionGUID="1d010ca0-375f-42e1-85ee-8a8f23c5ea76" CreationDate="2022-03-27T16:36:42.593" Comment="Proposed by 1918 approved by -1 edit id of 113" ContentLicense="CC BY-SA 4.0" />
  <row Id="4753" PostHistoryTypeId="5" PostId="1159" RevisionGUID="2c2c9ef8-e1e9-4cfa-b771-1e3e9d3517bf" CreationDate="2022-03-27T16:36:42.593" UserId="83" Comment="Copy edited. Jeopardy compliance. Simplify" Text="I want to construct a customized *call* in `Instruction::Transact`. But how can I pass parameters [`palletId`](https://github.com/VegeBun-csj/Proof-Chain/blob/main/pallets/xclient/src/lib.rs#L79) and [`methodId`](https://github.com/VegeBun-csj/Proof-Chain/blob/main/pallets/xclient/src/lib.rs#L80) to it?&#xD;&#xA;&#xD;&#xA;I configure the `palletId` and `methodId` in my `Config`, which can be set in my [*Runtime*](https://github.com/VegeBun-csj/Proof-Chain/blob/main/runtime/src/lib.rs#L638). But how can I pass parameters to it?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4754" PostHistoryTypeId="4" PostId="1159" RevisionGUID="2c2c9ef8-e1e9-4cfa-b771-1e3e9d3517bf" CreationDate="2022-03-27T16:36:42.593" UserId="83" Comment="Copy edited. Jeopardy compliance. Simplify" Text="How to pass `palletId` and `methodId` when constructing an Instruction::Transact call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4755" PostHistoryTypeId="5" PostId="1211" RevisionGUID="940f7661-55ba-44d2-aebc-81b74f8c0179" CreationDate="2022-03-27T16:46:47.760" UserId="368" Comment="add sources" Text="The smart contract is run inside the blockchain in a web assembly sandbox. It has no direct access to any files. A file is however nothing more than a vec of bytes and you could accept that vec as an input to one's contract. &#xD;&#xA;&#xD;&#xA;But unless you really need to I would recommend just storing the hash of that file on chain as that will be a lot cheaper and more predictable in terms of gas fees.&#xD;&#xA;&#xD;&#xA;The [parachainSystem/enact_authorized_upgrade][1] is an example of uploading a file. &#xD;&#xA;&#xD;&#xA;The [parachainSystem/authorize_upgrade][2] is an example of uploading a hash of a file.&#xD;&#xA;&#xD;&#xA;(EDITOR: Those are examples of it done in pallets. Does anyone have any examples of ink contracts doing the same?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/cumulus/cumulus_pallet_parachain_system/pallet/struct.Pallet.html#method.enact_authorized_upgrade&#xD;&#xA;  [2]: https://paritytech.github.io/cumulus/cumulus_pallet_parachain_system/pallet/struct.Pallet.html#method.authorize_upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="4756" PostHistoryTypeId="24" PostId="1211" RevisionGUID="940f7661-55ba-44d2-aebc-81b74f8c0179" CreationDate="2022-03-27T16:46:47.760" Comment="Proposed by 368 approved by -1 edit id of 106" ContentLicense="CC BY-SA 4.0" />
  <row Id="4757" PostHistoryTypeId="5" PostId="1211" RevisionGUID="7e6bb973-206f-4f11-807c-8703e587fe2b" CreationDate="2022-03-27T16:46:47.760" UserId="83" Comment="add sources" Text="The smart contract is run inside the blockchain in a web assembly sandbox. It has no direct access to any files. A file is however nothing more than a vec of bytes and you could accept that vec as an input to one's contract. &#xD;&#xA;&#xD;&#xA;But unless you really need to I would recommend just storing the hash of that file on chain as that will be a lot cheaper and more predictable in terms of gas fees.&#xD;&#xA;&#xD;&#xA;The [parachainSystem/enact_authorized_upgrade][1] is an example of uploading a file. &#xD;&#xA;&#xD;&#xA;The [parachainSystem/authorize_upgrade][2] is an example of uploading a hash of a file.&#xD;&#xA;&#xD;&#xA;(EDITOR: Those are examples of it done in pallets. Does anyone have any examples of ink! contracts doing the same?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/cumulus/cumulus_pallet_parachain_system/pallet/struct.Pallet.html#method.enact_authorized_upgrade&#xD;&#xA;  [2]: https://paritytech.github.io/cumulus/cumulus_pallet_parachain_system/pallet/struct.Pallet.html#method.authorize_upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="4758" PostHistoryTypeId="2" PostId="1310" RevisionGUID="c961cbf4-ebb2-4f61-8474-3a6de4f919ef" CreationDate="2022-03-27T16:54:30.777" UserId="53" Text="Events are really for the communication of state-transitions which happen on-chain to logic or services off-chain which would like to know when such a transition happens.&#xD;&#xA;&#xD;&#xA;They're not designed to be used for communication between different pieces of on-chain logic. To communicate between pallet instances, there are two main patterns: trait inheritance and config trait types.&#xD;&#xA;&#xD;&#xA;Trait inheritance is the simpler but by far less flexible of the two. It is strictly one-directional and allows a &quot;user&quot; pallet to be certain that a &quot;service&quot; pallet exists in the runtime and to be able to call into it, view its storage items &amp;c. It is done by having the &quot;user&quot; pallet's Config trait inherit the Config trait of the &quot;service&quot; pallet rather than, or in addition to, the System pallet's Config trait. For an example, see Tips pallet's Config trait, which uses the Treasury pallet:&#xD;&#xA;&#xD;&#xA;```rust-lang&#xD;&#xA;pub trait Config: pallet_treasury::Config {&#xD;&#xA;	// snip&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Config trait types are the other way to allow for pallet interoperability. They're the most flexible and future-proof way of doing it and most regular Substrate pallets which need to use other pallets do this. It is also one-way, but you can use the pattern twice to make it bidirectional. It involves creating a trait, implementing it with the &quot;service&quot; pallet and introducing a new type item into the &quot;user&quot; pallet's Config trait which is required to implement it. This doesn't hard-code the relationship between the two pallets; the top-level runtime lib.rs actually wires them together, and so in the future you can replace either one of the pallets with an alternative which requires/implements the same trait.&#xD;&#xA;&#xD;&#xA;For an example, see the Config trait of the Gilt pallet, which uses the `ReservableCurrency` trait to allow the top-level runtime lib.rs to connect it to the Balances pallet:&#xD;&#xA;&#xD;&#xA;```rust-lang&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;	/// Currency type that this works on.&#xD;&#xA;	type Currency: ReservableCurrency&lt;Self::AccountId, Balance = Self::CurrencyBalance&gt;;&#xD;&#xA;	// snip&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4760" PostHistoryTypeId="2" PostId="1311" RevisionGUID="0999cf67-1ae9-4fa7-b387-c64882434b2e" CreationDate="2022-03-27T17:29:43.483" UserId="34" Text="[Branchless Programming: Why &quot;If&quot; is Sloowww... and what we can do about it!](https://www.youtube.com/watch?v=bVJ-mWWL7cE) is an example of low level optimizations that you might pursue in a blockchain system to reduce the overhead of your runtime. But in the context of FRAME, a fair amount of the implementation details of much of the runtime logic is behind macros that may interfere with efforts to optimize, and worst case might even lead to worsening the operational overhead of of the logic you are trying to improve.&#xD;&#xA;&#xD;&#xA;What best practices when you are trying to optimize  are there in rumtime developement? &#xD;&#xA;What are the &quot;footguns&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4762" PostHistoryTypeId="1" PostId="1311" RevisionGUID="0999cf67-1ae9-4fa7-b387-c64882434b2e" CreationDate="2022-03-27T17:29:43.483" UserId="34" Text="What optimizations and programing paradimes make the most impact in FRAME Runtime development?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4763" PostHistoryTypeId="3" PostId="1311" RevisionGUID="0999cf67-1ae9-4fa7-b387-c64882434b2e" CreationDate="2022-03-27T17:29:43.483" UserId="34" Text="|runtime|advice|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4764" PostHistoryTypeId="2" PostId="1312" RevisionGUID="7faea56f-e83f-4474-a63d-79682a819e2b" CreationDate="2022-03-27T17:35:20.960" UserId="34" Text="Typically this is an issue with versioning - you _must_ have the same versions from Substrate upstream in your Cargo.toml and Cargo.lock file.&#xD;&#xA;&#xD;&#xA;Try `cargo tree` to investigate the root cause if unclear from the errors you are seeing. Typically resolved by [an update](https://doc.rust-lang.org/cargo/commands/cargo-update.html#examples) `cargo update -p &lt;some substrate crate&gt;` &#xD;&#xA;&#xD;&#xA;Another common cause, that might be applicable here specifically, is &quot;leaking&quot; `std` in a no-std environment, like a Substrate runtime. In the context of `ink` this is also critical, as it compiles to Wasm where [you likely cannot use `std`](https://rustwasm.github.io/docs/book/reference/which-crates-work-with-wasm.html?highlight=no_std#no_std)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4766" PostHistoryTypeId="2" PostId="1313" RevisionGUID="4d2ae54c-2c2c-470d-a17f-b77435f1c9c3" CreationDate="2022-03-27T18:38:40.267" UserId="627" Text="The important point about the chain state is that it only contains information that is needed for _future_ block execution. It is not a generalized database. Staking is a very good example - since we only do payouts for 84 eras (Kusama/Polkadot/other chains may be different) the on-chain state therefore contains the information for the last 84 eras. (Since they need to slash, make payouts, etc.)&#xD;&#xA;&#xD;&#xA;The circle back to your question - since the timestamp for the start of a specific era is not needed for future block execution (the runtime only needs information to make future payouts/slashes and information about the current and next era to progress), there is no state entry that you can query at any time that goes from index -&gt; time. This is basically information derived from the past state, i.e. the block where the index changed.&#xD;&#xA;&#xD;&#xA;This is where block explorers and indexers come in handy. In their case they can follow the chain events and when receiving the `session.NewSession` event can check for a new era and if found, can get the timestamp of that block. (Or from `activeEra`)&#xD;&#xA;&#xD;&#xA;The short version: the on-chain state has a lot of information pertinent to processing, but it generally maps back to a hash, i.e. a block at a specific point in the chain. Derived information such as timestamps and changes over time need to be extracted via indexing and storing it into a generalized database.&#xD;&#xA;&#xD;&#xA;I'm not too familiar with the APIs that some block explorers expose, but they _may_ have something like this indexed and query-able (I would guess that this may be there if it has been a request in the past) " ContentLicense="CC BY-SA 4.0" />
  <row Id="4768" PostHistoryTypeId="2" PostId="1314" RevisionGUID="3932e990-d86e-43fc-a728-fe49755f4c18" CreationDate="2022-03-27T18:44:48.120" UserId="73" Text="You need to import `num_traits` with `default-features = false` in your Cargo.toml file. This will solve the problem. The problem here being that ink itself declares the `oom` Händler, but you also import `std` through `num_traits`. `std` will then also provide the `oom` handler, which is not allowed and leading to your problem. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4770" PostHistoryTypeId="2" PostId="1315" RevisionGUID="46eb12a5-5751-4fe5-b0cb-7ec7ffac7275" CreationDate="2022-03-27T18:50:43.363" UserId="73" Text="Branchless programming doesn't make any sense in a blockchain. Yes that is exaggerated, only if you implement your own crypto (which you should not do) or anything else that is running in a really tight loop you could benefit of Branchless programming. However, for 99.999% of the code you write in your runtime this isn't required.&#xD;&#xA;&#xD;&#xA;The runtime is mainly bound by IO, because it is costly to read/write to the state. This is also the reason weighting mainly boils down to measuring storage read/writes. Yes, if you are only doing computation that will also have a weight. However, if you do some complex computation in your runtime you are probably already doing something wrong.&#xD;&#xA;&#xD;&#xA;So, when you want to optimize your pallet calls, ensure that you don't read data multiple times or that you write too much data. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4772" PostHistoryTypeId="2" PostId="1316" RevisionGUID="0cf82811-4d41-419a-a4d2-1b5141296b4c" CreationDate="2022-03-27T19:13:10.017" UserId="73" Text="Do you have declared `AccountId` as `AccountId32`?&#xD;&#xA;&#xD;&#xA;I assume you are writing a unit test and have some sort of mock runtime where you have somewhere the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;    type AccountId = AccountId32;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you have this, but use a different `AccountId` type, you will need to use this one in your test.&#xD;&#xA;&#xD;&#xA;However, as I'm not aware of the entire context you are writing this test in, you could also do something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let account_collection = vec![sp_keyring::sr25519::Keyring::Alice.to_account_id()].encode();&#xD;&#xA;&#xD;&#xA;AccountsCollection::&lt;T&gt;::put(&amp;Vec::&lt;_&gt;::decode(&amp;mut &amp;account_collection[..]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I still assume that you don't have declared `AccountId32` as the `AccountId` of your mock runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="4774" PostHistoryTypeId="5" PostId="1306" RevisionGUID="e081f9c4-1b97-42ee-b5df-7e7c19798953" CreationDate="2022-03-27T19:39:07.110" UserId="83" Comment="Grammar" Text="I am trying to put some test accounts into the storage of the following structure.&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn account_collection)]&#xD;&#xA;pub(super) type AccountsCollection&lt;T: Config&gt; =&#xD;&#xA;	StorageValue&lt;_, Vec&lt;T::AccountId&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the following I have an `AccountId32` type but I want a `T::AccountId` type. I intend to call some extrinsic which will check if the caller is in `account_collection`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let account_collection = vec![sp_keyring::sr25519::Keyring::Alice.to_account_id()];&#xD;&#xA;AccountsCollection::&lt;T&gt;::put(&amp;account_collection);&#xD;&#xA;``` &#xD;&#xA;I am new to substrate any advice or help is appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="4775" PostHistoryTypeId="4" PostId="1306" RevisionGUID="e081f9c4-1b97-42ee-b5df-7e7c19798953" CreationDate="2022-03-27T19:39:07.110" UserId="83" Comment="Grammar" Text="How to convert AccountId32 to T::AccountId?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4776" PostHistoryTypeId="5" PostId="1316" RevisionGUID="3972e41f-2518-4dfe-adae-848293370246" CreationDate="2022-03-27T19:47:25.640" UserId="83" Comment="Grammar" Text="Did you declare `AccountId` as `AccountId32`?&#xD;&#xA;&#xD;&#xA;I assume you are writing a unit test and have some sort of mock runtime where you have the following somewhere:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;    type AccountId = AccountId32;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you have this, but use a different `AccountId` type, you will need to use this one in your test.&#xD;&#xA;&#xD;&#xA;However, as I'm not aware of the entire context you are writing this test in, you could also do something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let account_collection = vec![sp_keyring::sr25519::Keyring::Alice.to_account_id()].encode();&#xD;&#xA;&#xD;&#xA;AccountsCollection::&lt;T&gt;::put(&amp;Vec::&lt;_&gt;::decode(&amp;mut &amp;account_collection[..]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I still assume that you haven't declared `AccountId32` as the value of `AccountId` in your mock runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="4777" PostHistoryTypeId="5" PostId="1204" RevisionGUID="2469dfb5-bf61-4ba6-b902-c06ae95a0f06" CreationDate="2022-03-27T19:48:53.253" UserId="88" Comment="Reflect Tldr summary" Text="## TLDR:&#xD;&#xA;**`sp-arithmetic` for relatively simple use cases as highlighted in this [answer](https://substrate.stackexchange.com/a/1208/88), and `substrate-fixed` for more advance stuff.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To perform non-deterministic arithmetic like division and square roots, you'll mostly work with fixed-point numbers. One way to easily set them up is to use [Substrate-fixed](https://github.com/chmike/fpsqrt/blob/master/fpsqrt.c) or hack off of the balance type (which is also a fixed point number - specifically a `U88F40` in substrate-fixed). With that, you'll have access to wider arithmetic operations (fixed-point division, being the most prevalent). Next, you'll need to find an algorithm for computing the square root of a fixed-point number.&#xD;&#xA;&#xD;&#xA;Here are a few links to help in that search:  &#xD;&#xA;I found [this](https://github.com/chmike/fpsqrt/blob/master/fpsqrt.c), but it's written in c and I haven't looked at the paper it's based off of.&#xD;&#xA;&#xD;&#xA;I've also found [this](https://www.fpgarelated.com/showarticle/1347.php) article but I barely glanced through it.&#xD;&#xA;&#xD;&#xA;There's also [Wikipedia](https://en.wikipedia.org/wiki/Methods_of_computing_square_roots)&#xD;&#xA;&#xD;&#xA;I'll try to update this with more info if I find anything interesting.&#xD;&#xA;Lastly, to avoid the headache that comes with these algorithms, I'd advise trying to find a workaround somehow that's equivalent to the square root, or remove the square root entirely by restating the formula either with logarithms (whose value is much easier to compute given the right table) or something similar." ContentLicense="CC BY-SA 4.0" />
  <row Id="4780" PostHistoryTypeId="2" PostId="1317" RevisionGUID="64ffe91c-0a15-45c1-8743-971b87f57561" CreationDate="2022-03-27T20:09:12.290" UserId="88" Text="The `node-template` says its `service.rs` is a specialisation of that on the master substrate branch. Hence, it's sort of hard to relate the two, but I'd like to expose an RPC endpoint that's accessible to both off-chain workers and (implicitly) the `polkadotjs` API, such as the `system_peers` endpoint that requires the `NetworkWorker` which is hidden in the `node-template` implementation. how/where would I look to create that in the `node-template`?&#xD;&#xA;&#xD;&#xA;Please note that I'm unfamiliar with asynchronous rust, and implementing custom RPCs, hence the wording might be a bit off, But I'm open to good resources for practical uses of both. &#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="4782" PostHistoryTypeId="1" PostId="1317" RevisionGUID="64ffe91c-0a15-45c1-8743-971b87f57561" CreationDate="2022-03-27T20:09:12.290" UserId="88" Text="How do I extend the service.rs of the node template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4783" PostHistoryTypeId="3" PostId="1317" RevisionGUID="64ffe91c-0a15-45c1-8743-971b87f57561" CreationDate="2022-03-27T20:09:12.290" UserId="88" Text="|polkadot-js|substrate-node-template|rpc|json-rpc|service|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4784" PostHistoryTypeId="2" PostId="1318" RevisionGUID="16705816-e532-40cb-bb77-fb97df900063" CreationDate="2022-03-27T21:07:27.567" UserId="28" Text="I don't recommend that you program into your pallet the logic you shared above.&#xD;&#xA;&#xD;&#xA;One of the benefits of FRAME and the generic types we use is that within a pallet, we do not need to assume what the underlying type of a generic is. So when you make the assumption within your pallet that `T::AccountId` is `AccountId32`, you make your pallet incompatible with any other Substrate system which does not have this assumption.&#xD;&#xA;&#xD;&#xA;Instead, what you should look to do is continue to abstract this kind of behavior behind generic types, and instead only define the actual accounts you want with your specific type in the runtime.&#xD;&#xA;&#xD;&#xA;## Use the Genesis Config of a Pallet&#xD;&#xA;&#xD;&#xA;If your goal is to populate the `AccountsCollection` storage with some test account like Alice for testing your chain, you can create a genesis configuration where you can specify in the chain specification what accounts you want to be populated on block 0.&#xD;&#xA;&#xD;&#xA;You can find template logic for this in the `Balances` pallet, where we use genesis to give users like `Alice` a balance at the beginning of the chain:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;	pub balances: Vec&lt;(T::AccountId, T::Balance)&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;impl&lt;T: Config&lt;I&gt;, I: 'static&gt; Default for GenesisConfig&lt;T, I&gt; {&#xD;&#xA;	fn default() -&gt; Self {&#xD;&#xA;		Self { balances: Default::default() }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::genesis_build]&#xD;&#xA;impl&lt;T: Config&lt;I&gt;, I: 'static&gt; GenesisBuild&lt;T, I&gt; for GenesisConfig&lt;T, I&gt; {&#xD;&#xA;	fn build(&amp;self) {&#xD;&#xA;		let total = self.balances.iter().fold(Zero::zero(), |acc: T::Balance, &amp;(_, n)| acc + n);&#xD;&#xA;		&lt;TotalIssuance&lt;T, I&gt;&gt;::put(total);&#xD;&#xA;&#xD;&#xA;		&lt;StorageVersion&lt;T, I&gt;&gt;::put(Releases::V2_0_0);&#xD;&#xA;&#xD;&#xA;		for (_, balance) in &amp;self.balances {&#xD;&#xA;			assert!(&#xD;&#xA;				*balance &gt;= &lt;T as Config&lt;I&gt;&gt;::ExistentialDeposit::get(),&#xD;&#xA;				&quot;the balance of any account should always be at least the existential deposit.&quot;,&#xD;&#xA;			)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		// ensure no duplicates exist.&#xD;&#xA;		let endowed_accounts = self&#xD;&#xA;			.balances&#xD;&#xA;			.iter()&#xD;&#xA;			.map(|(x, _)| x)&#xD;&#xA;			.cloned()&#xD;&#xA;			.collect::&lt;std::collections::BTreeSet&lt;_&gt;&gt;();&#xD;&#xA;&#xD;&#xA;		assert!(&#xD;&#xA;			endowed_accounts.len() == self.balances.len(),&#xD;&#xA;			&quot;duplicate balances in genesis.&quot;&#xD;&#xA;		);&#xD;&#xA;&#xD;&#xA;		for &amp;(ref who, free) in self.balances.iter() {&#xD;&#xA;			assert!(T::AccountStore::insert(who, AccountData { free, ..Default::default() })&#xD;&#xA;				.is_ok());&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this case, the specific accounts you want to use are not hardcoded into your pallet, but are inserted from the genesis configuration like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Configure initial storage state for FRAME modules.&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;	wasm_binary: &amp;[u8],&#xD;&#xA;	initial_authorities: Vec&lt;(AuraId, GrandpaId)&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	endowed_accounts: Vec&lt;AccountId&gt;,&#xD;&#xA;	_enable_println: bool,&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		system: SystemConfig {&#xD;&#xA;			// Add Wasm runtime to storage.&#xD;&#xA;			code: wasm_binary.to_vec(),&#xD;&#xA;		},&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			// Configure endowed accounts with initial balance of 1 &lt;&lt; 60.&#xD;&#xA;			balances: endowed_accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect(),&#xD;&#xA;		},&#xD;&#xA;		aura: AuraConfig {&#xD;&#xA;			authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),&#xD;&#xA;		},&#xD;&#xA;		grandpa: GrandpaConfig {&#xD;&#xA;			authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(),&#xD;&#xA;		},&#xD;&#xA;		sudo: SudoConfig {&#xD;&#xA;			// Assign network admin rights.&#xD;&#xA;			key: Some(root_key),&#xD;&#xA;		},&#xD;&#xA;		transaction_payment: Default::default(),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4787" PostHistoryTypeId="5" PostId="1253" RevisionGUID="7149b296-bac1-45a2-ab68-b79be2600652" CreationDate="2022-03-27T23:06:12.383" UserId="83" Comment="Update title spell polkadot.js" Text="Unfortunately, I could not find how to add _unchecked weight_ to a call via Polkadot.js, e.g. within `signAndSend` or when preparing the unsigned extrinsic. Even in the [cookbook example for runtime upgrades](https://polkadot.js.org/docs/api/examples/promise/upgrade-chain), it is not mentioned.&#xD;&#xA;&#xD;&#xA;I am trying to fix the following error when calling `api.tx.configuration.setValidationUpgradeDelay(5)` with sudo by adding unchecked weight:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/app/node_modules/@polkadot/rpc-provider/coder/index.cjs:76&#xD;&#xA;      throw new _error.default(fmtMessage, code, data);&#xD;&#xA;            ^&#xD;&#xA;&#xD;&#xA;RpcError: 1010: Invalid Transaction: Transaction would exhaust the block limits&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4788" PostHistoryTypeId="4" PostId="1253" RevisionGUID="7149b296-bac1-45a2-ab68-b79be2600652" CreationDate="2022-03-27T23:06:12.383" UserId="83" Comment="Update title spell polkadot.js" Text="How to provide unchecked weight to a call using Polkadot.js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4789" PostHistoryTypeId="4" PostId="1295" RevisionGUID="3d8e829f-c5ed-43d4-ac01-884304494c44" CreationDate="2022-03-27T23:08:41.823" UserId="83" Comment="Change to. js" Text="How to use Polkadot.js API for governance proxy call correctly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4791" PostHistoryTypeId="2" PostId="1319" RevisionGUID="c8f65a79-1b51-436e-af5e-48d6ffcbe0f7" CreationDate="2022-03-28T03:30:23.657" UserId="25" Text="I found it a bit confusing that part of the logic for block verification is in `sc_consensus::import_queue::Verifier::verify()` implementation and another part is in `sc_consensus::block_import::BlockImport::import_block()` implementation.&#xD;&#xA;&#xD;&#xA;`Vefifier` description says &quot;Verify a justification of a block&quot;, but after looking at https://stackoverflow.com/a/58059237/3806795 and source code of Aura and BABE, it doesn't seem that verifier there has anything to do with finality.&#xD;&#xA;&#xD;&#xA;`sc-consensus-pow` is much simpler, from it it seems that `Verify` is for things that can be verified right away without assuming that any other block was imported and `BlockImport` verifies the rest.&#xD;&#xA;&#xD;&#xA;Do I understand correctly that `Verify` needs to do quick isolated check and `BlockImport` everything that requires previous blocks to be imported and there should be no overlap in what they check (in other words it is guaranteed that `Verify::verify()` will called be first, so no need to do the same work again in `BlockImport::import_block()`)?&#xD;&#xA;&#xD;&#xA;For context: I'm working on a custom non-PoS consensus and want to make sure I'm doing it properly." ContentLicense="CC BY-SA 4.0" />
  <row Id="4793" PostHistoryTypeId="1" PostId="1319" RevisionGUID="c8f65a79-1b51-436e-af5e-48d6ffcbe0f7" CreationDate="2022-03-28T03:30:23.657" UserId="25" Text="How to properly split logic between block verifier and block import?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4794" PostHistoryTypeId="3" PostId="1319" RevisionGUID="c8f65a79-1b51-436e-af5e-48d6ffcbe0f7" CreationDate="2022-03-28T03:30:23.657" UserId="25" Text="|consensus|client|block-import|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4795" PostHistoryTypeId="2" PostId="1320" RevisionGUID="87fd94aa-8e29-40f3-8b76-a30803bd3e2b" CreationDate="2022-03-28T05:24:10.953" UserId="205" Text="There are many docs/tutorials explaining how to extend the node's RPC service with a Custom RPC to query the Runtime storage. What I could not figure it out yet, is how to do the same but to query the Offchain-storage. I basically want to replicate the following available built-in service but with my own Custom RPC:&#xD;&#xA;https://docs.substrate.io/rustdocs/latest/sc_rpc_api/offchain/trait.OffchainApi.html&#xD;&#xA;&#xD;&#xA;Below are my snippets:&#xD;&#xA;&#xD;&#xA;This example works properly.&#xD;&#xA;```&#xD;&#xA;// node/src/rpc.rs&#xD;&#xA;// Ref: https://substrate.recipes/custom-rpc.html&#xD;&#xA;&#xD;&#xA;let mut io = jsonrpc_core::IoHandler::default();&#xD;&#xA;&#xD;&#xA;// Add a silly RPC that returns constant values&#xD;&#xA;io.extend_with(SillyRpc::to_delegate(Silly {},));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This example is the one I'm interested and I could not figure it out how to make it work so far. Here I'm trying to incorporate the offchain-storage.&#xD;&#xA;```&#xD;&#xA;// node/src/rpc.rs&#xD;&#xA;// Ref: https://core.tetcoin.org/rustdocs/v2.0.1/src/sc_rpc/offchain/mod.rs.html&#xD;&#xA;&#xD;&#xA;let mut io = jsonrpc_core::IoHandler::default();&#xD;&#xA;&#xD;&#xA;let storage = ???????&#xD;&#xA;io.extend_with(SillyRpc::to_delegate(Silly::new(storage)));&#xD;&#xA;&#xD;&#xA;NB: Maybe I need a new Offchain client instead or the Runtime client one?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Also related to the following question:&#xD;&#xA;https://substrate.stackexchange.com/questions/1024/is-it-possible-to-query-an-ocws-off-chain-storage-via-rpc-from-an-external-serv/1049#1049&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;Pablo." ContentLicense="CC BY-SA 4.0" />
  <row Id="4797" PostHistoryTypeId="1" PostId="1320" RevisionGUID="87fd94aa-8e29-40f3-8b76-a30803bd3e2b" CreationDate="2022-03-28T05:24:10.953" UserId="205" Text="How to extend a `custom RPC` service to query the `off-chain` storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4798" PostHistoryTypeId="3" PostId="1320" RevisionGUID="87fd94aa-8e29-40f3-8b76-a30803bd3e2b" CreationDate="2022-03-28T05:24:10.953" UserId="205" Text="|rpc|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4799" PostHistoryTypeId="2" PostId="1321" RevisionGUID="997f858d-28e7-46f6-938c-c7a97f81394e" CreationDate="2022-03-28T05:32:40.093" UserId="1927" Text="I was digging into substrate's  **storage_info** macro&lt;br/&gt; https://docs.substrate.io/v3/runtime/macros/#palletgenerate_storage_info. &#xD;&#xA;&#xD;&#xA;To get hands dirty checked code from &lt;br/&gt;&#xD;&#xA;https://github.com/yourarj/substrate-node-template/blob/3d4e7f18e0e1141975e7bb74a6ea64c9eef0dabe/pallets/kittens/src/lib.rs#L13 &lt;br&gt;which is fork of official substrate-node-template&#xD;&#xA;&#xD;&#xA;But not able to compile with the specified macro &lt;br/&gt;&#xD;&#xA;&#xD;&#xA;my code looks something like &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   Compiling pallet-kittens v4.0.0-dev (/home/awesome/workspaces/subsstrate/yourarj/substrate-node-template/pallets/kittens)&#xD;&#xA;error: expected one of: `generate_store`, `without_storage_info`, `storage_version`&#xD;&#xA;  --&gt; pallets/kittens/src/lib.rs:14:12&#xD;&#xA;   |&#xD;&#xA;14 |     #[pallet::generate_storage_info]&#xD;&#xA;   |               ^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/MtKvr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4801" PostHistoryTypeId="1" PostId="1321" RevisionGUID="997f858d-28e7-46f6-938c-c7a97f81394e" CreationDate="2022-03-28T05:32:40.093" UserId="1927" Text="Issue with #[pallet::generate_storage_info]" ContentLicense="CC BY-SA 4.0" />
  <row Id="4802" PostHistoryTypeId="3" PostId="1321" RevisionGUID="997f858d-28e7-46f6-938c-c7a97f81394e" CreationDate="2022-03-28T05:32:40.093" UserId="1927" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4803" PostHistoryTypeId="2" PostId="1322" RevisionGUID="832b8b9b-4381-42e5-b662-b4a0aa606706" CreationDate="2022-03-28T05:53:23.223" UserId="73" Text="The idea of `Verifier` was that it is only being used to verify the block in isolation as you said. This means for POS for example that you only verify the seal of a block.&#xD;&#xA;&#xD;&#xA;Currently that isn't the case, AURA and BABE for example also check the inherents. We are planing some greater refactoring in the future where we will need this isolated block header verification.&#xD;&#xA;&#xD;&#xA;For your own consensus, I would propose that you implement the block verifier as described. The block import can then any kind of verification that needs to access any state or needs access to the full block. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4805" PostHistoryTypeId="2" PostId="1323" RevisionGUID="415aaad9-eb99-46ee-956b-ccb402594563" CreationDate="2022-03-28T05:56:41.037" UserId="73" Text="`generate_storage_info` is now the default. So, you don't need to specify it anymore. For your error here it means, just remove this attribute.&#xD;&#xA;&#xD;&#xA;For reference, it means that if you are just developing a pallet and don't need the `storage_info` for now. You can use `without_storage_info` and then it will not be required. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4807" PostHistoryTypeId="2" PostId="1324" RevisionGUID="c6b7410d-e465-4413-9ef7-87aa677febc5" CreationDate="2022-03-28T06:17:20.450" UserId="1866" Text="I believe Jaco's comment above points to the right answer, at least I cannot find a reference to unchecked weight elsewhere. So I dug a bit into code and docs.&#xD;&#xA;&#xD;&#xA;That led me to looking at the JS UI as well, specifically the sudo page and the &quot;with weight&quot; option there. Specifying it indeed calls the [sudo.sudoUncheckedWeight](https://github.com/polkadot-js/apps/blob/ffe763f28bfe7feea1342eb0a7bea7df9b6cf190/packages/page-sudo/src/Sudo.tsx#L81-L85) with the specified weight in the params as per the [extrinsic definition](https://polkadot.js.org/docs/substrate/extrinsics#sudouncheckedweightcall-call-weight-u64).&#xD;&#xA;&#xD;&#xA;You should be able to do -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;/* the weight we want to use, unchecked */&#xD;&#xA;const weight = 1&#xD;&#xA;&#xD;&#xA;/* the upgrade we want to send */&#xD;&#xA;const upgrade = api.tx.system.setCode(&quot;0x...&quot;)&#xD;&#xA;&#xD;&#xA;/* make the upgrade, unchecked */&#xD;&#xA;const sudo = api.tx.sudo.sudoUncheckedWeight(upgrade, weight)&#xD;&#xA;&#xD;&#xA;/* send sudo here with signAndSend */&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4809" PostHistoryTypeId="2" PostId="1325" RevisionGUID="d5993b85-e596-4836-ab16-00069a39b68a" CreationDate="2022-03-28T06:26:10.733" UserId="683" Text="I get the following error while trying to fetch block #1375921 on Kusama chain:&#xD;&#xA;&#xD;&#xA;    RPC-CORE: getBlock(hash?: BlockHash): SignedBlock:: createType(SignedBlock):: Struct: &#xD;&#xA;    failed on block: {&quot;header&quot;:&quot;Header&quot;,&quot;extrinsics&quot;:&quot;Vec&lt;Extrinsic&gt;&quot;}:: Struct: failed on &#xD;&#xA;    extrinsics: Vec&lt;Extrinsic&gt;:: createType(ExtrinsicV4):: createType(Call):: Call: failed &#xD;&#xA;    decoding balances.transfer:: Struct: failed on args: &#xD;&#xA;    {&quot;dest&quot;:&quot;LookupSource&quot;,&quot;value&quot;:&quot;Compact&lt;Balance&gt;&quot;}:: decodeU8a: failed at &#xD;&#xA;    0x86b7409a11700afb027924cb40fa4388… on dest: {&quot;_enum&quot;: {&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Unable to create Enum via index 134, in Id, Index, Raw, Address32, Address20&#xD;&#xA;&#xD;&#xA;I'm on `@polkadot/api v7.12.1` . How may I rectify this error?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4811" PostHistoryTypeId="1" PostId="1325" RevisionGUID="d5993b85-e596-4836-ab16-00069a39b68a" CreationDate="2022-03-28T06:26:10.733" UserId="683" Text="failed decode in Kusama" ContentLicense="CC BY-SA 4.0" />
  <row Id="4812" PostHistoryTypeId="3" PostId="1325" RevisionGUID="d5993b85-e596-4836-ab16-00069a39b68a" CreationDate="2022-03-28T06:26:10.733" UserId="683" Text="|kusama|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4813" PostHistoryTypeId="2" PostId="1326" RevisionGUID="1390c9e2-e676-4d0e-ad9d-6fd8ef04032a" CreationDate="2022-03-28T06:28:58.253" UserId="1948" Text="Also, adding some extra links to explore:&#xD;&#xA;&#xD;&#xA;- https://ksmsociety.io/&#xD;&#xA;- https://app.subsocial.network/@KappaSigmaMu&#xD;&#xA;- https://app.subsocial.network/@KappaSigmaMu/the-human-blockchain-join-the-kappa-sigma-mu-society-on-18819" ContentLicense="CC BY-SA 4.0" />
  <row Id="4816" PostHistoryTypeId="2" PostId="1327" RevisionGUID="cd3ad180-0ca4-4f8e-892c-3f61fb355e42" CreationDate="2022-03-28T06:31:23.227" UserId="1866" Text="Since it works in the latest API on apps, [1375921 decoded](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/explorer/query/1375921), an upgrade to a recent version may be in order.&#xD;&#xA;&#xD;&#xA;Seems it could be related to the fixed [4645](https://github.com/polkadot-js/api/issues/4645)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4818" PostHistoryTypeId="2" PostId="1328" RevisionGUID="373d4827-62b5-43bd-949d-bc31e7dd5de8" CreationDate="2022-03-28T07:00:47.527" UserId="676" Text="just now, I modify the deps in cargo.toml, degrade from master to polkadot-v0.9.17 branch the compiler throw an error about this &#xD;&#xA;&#xD;&#xA;         Compiling sp-consensus-aura v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.17#22d40c76)&#xD;&#xA;     Compiling pallet-session v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.17#22d40c76)&#xD;&#xA;     Compiling frame-system-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.17#22d40c76)&#xD;&#xA;     Compiling pallet-transaction-payment-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.17#22d40c76)&#xD;&#xA;     Compiling pallet-aura v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.17#22d40c76)&#xD;&#xA;  error[E0599]: no function or associated item named `set_block_number` found for struct `frame_system::Pallet` in the current scope&#xD;&#xA;     --&gt; /home/george/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/system/benchmarking/src/lib.rs:35:1&#xD;&#xA;      |&#xD;&#xA;  35  | / benchmarks! {&#xD;&#xA;  36  | |     remark {&#xD;&#xA;  37  | |         let b in 0 .. *T::BlockLength::get().max.get(DispatchClass::Normal) as u32;&#xD;&#xA;  38  | |         let remark_message = vec![1; b as usize];&#xD;&#xA;  ...   |&#xD;&#xA;  127 | |     impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test);&#xD;&#xA;  128 | | }&#xD;&#xA;      | | ^&#xD;&#xA;      | | |&#xD;&#xA;      | |_function or associated item not found in `frame_system::Pallet&lt;T&gt;`&#xD;&#xA;      |   help: there is an associated function with a similar name: `block_number`&#xD;&#xA;      |&#xD;&#xA;      = note: this error originates in the macro `$crate::impl_benchmark` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4820" PostHistoryTypeId="1" PostId="1328" RevisionGUID="373d4827-62b5-43bd-949d-bc31e7dd5de8" CreationDate="2022-03-28T07:00:47.527" UserId="676" Text="Why system pallet compiled failed caused by benchamrking part" ContentLicense="CC BY-SA 4.0" />
  <row Id="4821" PostHistoryTypeId="3" PostId="1328" RevisionGUID="373d4827-62b5-43bd-949d-bc31e7dd5de8" CreationDate="2022-03-28T07:00:47.527" UserId="676" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4822" PostHistoryTypeId="2" PostId="1329" RevisionGUID="a880679a-c772-4d66-be89-5d95aaa492ca" CreationDate="2022-03-28T08:02:57.343" UserId="251" Text="If I want to migrate the `Balance::Locks` to a new structure. &#xD;&#xA;Imagine there are millions of accounts in the storage.&#xD;&#xA;&#xD;&#xA;This is what I came out. Is this the right way? Split them into multiple blocks. If yes, how can I record the pos?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;storage OldLocks&#xD;&#xA;storage NewLocks&#xD;&#xA;storage LastPos&#xD;&#xA;&#xD;&#xA;fn on_new_block() {&#xD;&#xA;    LastPos::put(migrate(old, LastPos::get()));&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Aka the locks' `getter` during the migration&#xD;&#xA;fn lock_of(account) -&gt; Amount {&#xD;&#xA;    let mut locks = [];&#xD;&#xA;&#xD;&#xA;    if let Some(lock) = NewLocks::get(account) {&#xD;&#xA;        locks.append(lock);&#xD;&#xA;    }&#xD;&#xA;    if let Some(lock) = OldLocks::get(account) {&#xD;&#xA;        locks.append(lock);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    return locks.cal_total_lock_amount();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4824" PostHistoryTypeId="1" PostId="1329" RevisionGUID="a880679a-c772-4d66-be89-5d95aaa492ca" CreationDate="2022-03-28T08:02:57.343" UserId="251" Text="How to perform a large migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4825" PostHistoryTypeId="3" PostId="1329" RevisionGUID="a880679a-c772-4d66-be89-5d95aaa492ca" CreationDate="2022-03-28T08:02:57.343" UserId="251" Text="|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4826" PostHistoryTypeId="2" PostId="1330" RevisionGUID="ec5fb279-0792-481b-acca-c211d3d12ae8" CreationDate="2022-03-28T08:03:15.430" UserId="1949" Text="I know that all the objects in the JS API has the `toHex()` function, so that would answer the first bit of my question - how to serialize when I have an extrinsic from `getBlock()`.&#xD;&#xA;&#xD;&#xA;However where I'm burning a bit is on the reverse, going from the hex back into an extrinsic object so I can inspect it. Currently I have something, but not sure if it the best -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const h = x.toHex();&#xD;&#xA;const y = api.registry.createType('Extrinsic', h);&#xD;&#xA;&#xD;&#xA;console.log(y.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is only for the same runtime, so I don't need historic capability." ContentLicense="CC BY-SA 4.0" />
  <row Id="4828" PostHistoryTypeId="1" PostId="1330" RevisionGUID="ec5fb279-0792-481b-acca-c211d3d12ae8" CreationDate="2022-03-28T08:03:15.430" UserId="1949" Text="Two-way JS serlialise between hex and extrinsic object" ContentLicense="CC BY-SA 4.0" />
  <row Id="4829" PostHistoryTypeId="3" PostId="1330" RevisionGUID="ec5fb279-0792-481b-acca-c211d3d12ae8" CreationDate="2022-03-28T08:03:15.430" UserId="1949" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4830" PostHistoryTypeId="2" PostId="1331" RevisionGUID="997d4e27-e755-468c-a7df-efd13fd1f8d6" CreationDate="2022-03-28T08:25:16.730" UserId="627" Text="There is nothing wrong with the above approach, however generally I try to steer people clear from using `createType` (all string name based) unless there is no other way. Since the API always converts types anyway, the use should be minimal in &quot;normal&quot; code.&#xD;&#xA;&#xD;&#xA;For the above, the api does indeed provide a shortcut for quick construction (I'm using your naming here for alignment) -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// re-construct an extrinsic from the input&#xD;&#xA;const y = api.tx(h);&#xD;&#xA;&#xD;&#xA;// log, submit, etc.&#xD;&#xA;console.log(y.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Although you are excluding historic, I'll just add some detail for that usecase for future searchers. As you alluded to the both your and my construction does require the same runtime/metadata, the latter being quite important since call indexes may not have moved between upgrades, but generally type indexes (as provided since metadata v14) do move around on upgrades.&#xD;&#xA;&#xD;&#xA;I took a quick look at the historic `api.at(&lt;blockHash&gt;)` and the interface returned there does not contain an `.tx(&lt;hex-goes-here&gt;)` helper, so the only way there to reconstruct is indeed via `apiAt.createType(...)` as above. (This seems like an oversight, will log it)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4832" PostHistoryTypeId="5" PostId="1329" RevisionGUID="89c0e5f0-7786-4d61-b0b6-297b68c31dec" CreationDate="2022-03-28T08:30:47.487" UserId="251" Comment="edited body" Text="If I want to migrate the `Balance::Locks` to a new structure. &#xD;&#xA;Imagine there are millions of accounts in the storage.&#xD;&#xA;&#xD;&#xA;This is what I came out. Is this the right way? Split them into multiple blocks. If yes, how can I record the pos?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;storage OldLocks&#xD;&#xA;storage NewLocks&#xD;&#xA;storage LastPos&#xD;&#xA;&#xD;&#xA;fn on_new_block() {&#xD;&#xA;    LastPos::put(migrate_from(LastPos::get()));&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Aka the locks' `getter` during the migration&#xD;&#xA;fn lock_of(account) -&gt; Amount {&#xD;&#xA;    let mut locks = [];&#xD;&#xA;&#xD;&#xA;    if let Some(lock) = NewLocks::get(account) {&#xD;&#xA;        locks.append(lock);&#xD;&#xA;    }&#xD;&#xA;    if let Some(lock) = OldLocks::get(account) {&#xD;&#xA;        locks.append(lock);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    return locks.cal_total_lock_amount();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="4833" PostHistoryTypeId="2" PostId="1332" RevisionGUID="20d27e70-a46a-4bfe-aeb8-2ee0910b9e03" CreationDate="2022-03-28T09:25:10.067" UserId="1789" Text="My code for this crowdloan rewards pallet&#xD;&#xA;&#xD;&#xA;      #[pallet::config]&#xD;&#xA;      pub trait Config: frame_system::Config {&#xD;&#xA;        type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;        type RelayChainAccountId: Parameter&#xD;&#xA;          + Into&lt;AccountId32&gt;&#xD;&#xA;          + From&lt;AccountId32&gt;&#xD;&#xA;          + TypeInfo&#xD;&#xA;          + Ord;&#xD;&#xA;        type VestingBlockNumber: AtLeast32BitUnsigned + Parameter + Default + Into&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;        type VestingBlockProvider: BlockNumberProvider&lt;BlockNumber = Self::VestingBlockNumber&gt;;&#xD;&#xA;          ...&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;      #[pallet::storage]&#xD;&#xA;      #[pallet::getter(fn accounts_payable)]&#xD;&#xA;      pub type AccountsPayable&lt;T: Config&gt; =&#xD;&#xA;        StorageMap&lt;_, Blake2_128Concat, T::AccountId, RewardInfo&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;      #[pallet::storage]&#xD;&#xA;      #[pallet::getter(fn claimed_relay_chain_ids)]&#xD;&#xA;      pub type ClaimedRelayChainIds&lt;T: Config&gt; =&#xD;&#xA;        StorageMap&lt;_, Blake2_128Concat, T::RelayChainAccountId, ()&gt;;&#xD;&#xA;&#xD;&#xA;      #[pallet::storage]&#xD;&#xA;      #[pallet::getter(fn unassociated_contributions)]&#xD;&#xA;      pub type UnassociatedContributions&lt;T: Config&gt; =&#xD;&#xA;        StorageMap&lt;_, Blake2_128Concat, T::RelayChainAccountId, RewardInfo&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;      #[pallet::storage]&#xD;&#xA;      #[pallet::storage_prefix = &quot;InitRelayBlock&quot;]&#xD;&#xA;      #[pallet::getter(fn init_vesting_block)]&#xD;&#xA;      type InitVestingBlock&lt;T: Config&gt; = StorageValue&lt;_, T::VestingBlockNumber, ValueQuery&gt;;&#xD;&#xA;    &#xD;&#xA;      #[pallet::storage]&#xD;&#xA;      #[pallet::storage_prefix = &quot;EndRelayBlock&quot;]&#xD;&#xA;      #[pallet::getter(fn end_vesting_block)]&#xD;&#xA;      type EndVestingBlock&lt;T: Config&gt; = StorageValue&lt;_, T::VestingBlockNumber, ValueQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    pub type BalanceOf&lt;T&gt; =&#xD;&#xA;      &lt;&lt;T as Config&gt;::RewardCurrency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;    &#xD;&#xA;    #[derive(Clone, PartialEq, Eq, Encode, Decode, Default, TypeInfo)]&#xD;&#xA;    #[scale_info(skip_type_params(T))]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;    //#[codec(mel_bound())] //not working&#xD;&#xA;    //#[pallet::without_storage_info] // not working&#xD;&#xA;    pub struct RewardInfo&lt;T: Config&gt; {&#xD;&#xA;      pub total_reward: BalanceOf&lt;T&gt;,&#xD;&#xA;      pub claimed_reward: BalanceOf&lt;T&gt;,&#xD;&#xA;      pub contributed_relay_addresses: Vec&lt;T::RelayChainAccountId&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then I got error messages:&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `RewardInfo&lt;T&gt;: parity_scale_codec::MaxEncodedLen` is not satisfied&#xD;&#xA;      --&gt; pallets/crowdloan-rewards/src/lib.rs:36:12&#xD;&#xA;       |&#xD;&#xA;    36 |     #[pallet::pallet]&#xD;&#xA;       |               ^^^^^^ the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `RewardInfo&lt;T&gt;`&#xD;&#xA;       |&#xD;&#xA;       = note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageAccountsPayable&lt;T&gt;, frame_support::Blake2_128Concat, &lt;T as frame_system::Config&gt;::AccountId, RewardInfo&lt;T&gt;&gt;`&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `&lt;T as pallet::Config&gt;::RelayChainAccountId: parity_scale_codec::MaxEncodedLen` is not satisfied&#xD;&#xA;      --&gt; pallets/crowdloan-rewards/src/lib.rs:36:12&#xD;&#xA;       |&#xD;&#xA;    36 |     #[pallet::pallet]&#xD;&#xA;       |               ^^^^^^ the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `&lt;T as pallet::Config&gt;::RelayChainAccountId`&#xD;&#xA;       |&#xD;&#xA;    &#xD;&#xA;       = note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageClaimedRelayChainIds&lt;T&gt;, frame_support::Blake2_128Concat, &lt;T as pallet::Config&gt;::RelayChainAccountId, ()&gt;`&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `&lt;T as pallet::Config&gt;::VestingBlockNumber: parity_scale_codec::MaxEncodedLen` is not satisfied&#xD;&#xA;      --&gt; pallets/crowdloan-rewards/src/lib.rs:36:12&#xD;&#xA;       |&#xD;&#xA;    36 |     #[pallet::pallet]&#xD;&#xA;       |               ^^^^^^ the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `&lt;T as pallet::Config&gt;::VestingBlockNumber`&#xD;&#xA;       |&#xD;&#xA;       = note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageValue&lt;_GeneratedPrefixForStorageInitVestingBlock&lt;T&gt;, &lt;T as pallet::Config&gt;::VestingBlockNumber, frame_support::pallet_prelude::ValueQuery&gt;`&#xD;&#xA;&#xD;&#xA;It seems those three errors are related to the MaxEncodedLen... &#xD;&#xA;&#xD;&#xA;I am using polkadot-v0.9.17 substrate.&#xD;&#xA;Please advise. Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="4835" PostHistoryTypeId="1" PostId="1332" RevisionGUID="20d27e70-a46a-4bfe-aeb8-2ee0910b9e03" CreationDate="2022-03-28T09:25:10.067" UserId="1789" Text="trait bound MaxEncodedLen is not satisfied/not implemented for `RewardInfo&lt;T&gt;` or `&lt;T as pallet::Config&gt;::RelayChainAccountId`" ContentLicense="CC BY-SA 4.0" />
  <row Id="4836" PostHistoryTypeId="3" PostId="1332" RevisionGUID="20d27e70-a46a-4bfe-aeb8-2ee0910b9e03" CreationDate="2022-03-28T09:25:10.067" UserId="1789" Text="|pallet|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4837" PostHistoryTypeId="2" PostId="1333" RevisionGUID="cf63d131-9cf5-41cc-8955-808d6a6e5960" CreationDate="2022-03-28T09:43:09.250" UserId="444" Text="I am trying to run the [substrate-api-client][1] as a dependency for making RPC calls to the local substrate node. \&#xD;&#xA;But i am getting this error: &#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidMetadata(InvalidVersion)'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any help would be superb.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/scs/substrate-api-client" ContentLicense="CC BY-SA 4.0" />
  <row Id="4839" PostHistoryTypeId="1" PostId="1333" RevisionGUID="cf63d131-9cf5-41cc-8955-808d6a6e5960" CreationDate="2022-03-28T09:43:09.250" UserId="444" Text="Error with substrate-api-client on local node" ContentLicense="CC BY-SA 4.0" />
  <row Id="4840" PostHistoryTypeId="3" PostId="1333" RevisionGUID="cf63d131-9cf5-41cc-8955-808d6a6e5960" CreationDate="2022-03-28T09:43:09.250" UserId="444" Text="|substrate-node|substrate-node-template|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4841" PostHistoryTypeId="2" PostId="1334" RevisionGUID="9cc6b21c-df0b-4633-a467-9e1c2cffbead" CreationDate="2022-03-28T09:59:20.273" UserId="85" Text="`pub contributed_relay_addresses: Vec&lt;T::RelayChainAccountId&gt;,`&#xD;&#xA; - If you replace the `Vec` with a `BoundedVec` it won't complain.&#xD;&#xA;&#xD;&#xA;You would want something like this instead:&#xD;&#xA;&#xD;&#xA;`pub contributed_relay_addresses: BoundedVec&lt;T::RelayChainAccountId, ConstU32&lt;100&gt;&gt;,`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;See https://substrate.stackexchange.com/questions/993/how-to-use-bounded-vector-for-storage&#xD;&#xA;&#xD;&#xA;You can read more about bounded vec here: https://substrate.stackexchange.com/questions/1152/when-to-use-boundedvec-vs-weakboundedvec-vs-vec&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4843" PostHistoryTypeId="2" PostId="1335" RevisionGUID="98ff55e3-e1b9-41d3-bd19-8bad562d4ffd" CreationDate="2022-03-28T10:22:05.100" UserId="627" Text="There was indeed an issue in the 7.11.x series for historical blocks, however `7.12.1` included the fix. However the answer above to check against (a) the apps UI (which generally is very fresh, even betas) and (b) check later versions is generally good.&#xD;&#xA;&#xD;&#xA;However in this case, there is nothing that needs an upgrade. This code works locally -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider, packageInfo } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  const api = await ApiPromise.create({ provider: new WsProvider('wss://kusama-rpc.polkadot.io') });&#xD;&#xA;  const blockHash = await api.rpc.chain.getBlockHash(1375921);&#xD;&#xA;  const block = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;&#xD;&#xA;  console.log(`@polkadot/api ${packageInfo.version}`);&#xD;&#xA;  console.log(JSON.stringify(block.toHuman()));&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().then(() =&gt; process.exit());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With the following dependencies -&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;test&quot;,&#xD;&#xA;  &quot;version&quot;: &quot;1.0.0&quot;,&#xD;&#xA;  &quot;main&quot;: &quot;index.js&quot;,&#xD;&#xA;  &quot;license&quot;: &quot;MIT&quot;,&#xD;&#xA;  &quot;scripts&quot;: {&#xD;&#xA;    &quot;start&quot;: &quot;node ./test.mjs&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;dependencies&quot;: {&#xD;&#xA;    &quot;@polkadot/api&quot;: &quot;7.12.1&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It outputs the following (version included for sanity) -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;$ node ./test.mjs&#xD;&#xA;@polkadot/api 7.12.1&#xD;&#xA;{&quot;block&quot;:{&quot;header&quot;:{&quot;parentHash&quot;:&quot;0x34d769953a4f0b33d13f509129d93591c02e00eb678d6f935748cc2bf5d8f06b&quot;,&quot;number&quot;:&quot;1,375,921&quot;,&quot;stateRoot&quot;:&quot;0x67d8d1f6274a0895ac2c38f3883a721b73cd14769b52a9edf83236b70ed6b1b0&quot;,&quot;extrinsicsRoot&quot;:&quot;0xb2d7e1384ce2f2ee72dd0c28338bcb73a3f26c2e5c33bb6dcb81f967a7813688&quot;,&quot;digest&quot;:{&quot;logs&quot;:[{&quot;PreRuntime&quot;:[&quot;BABE&quot;,&quot;0x010c00000078b6bb0f000000007ad0448d3d622242c9347fa9ef38d8754e60fec552f18b28424ad9b54547394902f7748a0e3a05a36848171d13c5858d213329fa2ef588d751b3f562f1beb1099c33331dc63947411f4cd1363a8db610e0745b7489fc6e14a77cb8b96726250f&quot;]},{&quot;Seal&quot;:[&quot;BABE&quot;,&quot;0x66b2ae937711e397e17f73189831f860d784d9ed499848b86441511e20f181512bf37f1c44c53b4ce9614784833aabacc2fbaf55d5aa668c7c1a0cea5d7e9e87&quot;]}]}},&quot;extrinsics&quot;:[{&quot;isSigned&quot;:false,&quot;method&quot;:{&quot;args&quot;:{&quot;now&quot;:&quot;1,583,761,104,000&quot;},&quot;method&quot;:&quot;set&quot;,&quot;section&quot;:&quot;timestamp&quot;}},{&quot;isSigned&quot;:false,&quot;method&quot;:{&quot;args&quot;:{&quot;hint&quot;:&quot;1,375,918&quot;},&quot;method&quot;:&quot;finalHint&quot;,&quot;section&quot;:&quot;finalityTracker&quot;}},{&quot;isSigned&quot;:false,&quot;method&quot;:{&quot;args&quot;:{&quot;heads&quot;:[]},&quot;method&quot;:&quot;setHeads&quot;,&quot;section&quot;:&quot;parachains&quot;}},{&quot;isSigned&quot;:true,&quot;method&quot;:{&quot;args&quot;:{&quot;dest&quot;:&quot;FcxNWVy5RESDsErjwyZmPCW6Z8Y3fbfLzmou34YZTrbcraL&quot;,&quot;value&quot;:&quot;2.0000 KSM&quot;},&quot;method&quot;:&quot;transfer&quot;,&quot;section&quot;:&quot;balances&quot;},&quot;era&quot;:{&quot;MortalEra&quot;:{&quot;period&quot;:&quot;64&quot;,&quot;phase&quot;:&quot;45&quot;}},&quot;nonce&quot;:&quot;0&quot;,&quot;signature&quot;:&quot;0x7a1effc5c8348a0262585d43aceea41171a849c3173b151c132b8fa093c9a4064b4459f978ac277b7cbd5dd047d907cbb6497c1fa9e607dee9c1c79276df778e&quot;,&quot;signer&quot;:&quot;Ead9wbT57JWbVt2SVQMzuuGmegydWa3SadGVypS8DKEZigo&quot;,&quot;tip&quot;:&quot;0&quot;}]},&quot;justifications&quot;:null}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It would point to a local issue, no types should be injected for Kusama/Polkadot/etc. The API ships with everything required. This does sound like possibly an `Address` types that was added, resulting in everything after it being incorrect." ContentLicense="CC BY-SA 4.0" />
  <row Id="4848" PostHistoryTypeId="5" PostId="1159" RevisionGUID="af4d79c6-c36e-4156-863d-8b19ebf58ee8" CreationDate="2022-03-28T10:25:27.230" UserId="178" Comment="included code that had been posted as answer" Text="I want to construct a customized *call* in `Instruction::Transact`. But how can I pass parameters [`palletId`](https://github.com/VegeBun-csj/Proof-Chain/blob/main/pallets/xclient/src/lib.rs#L79) and [`methodId`](https://github.com/VegeBun-csj/Proof-Chain/blob/main/pallets/xclient/src/lib.rs#L80) to it?&#xD;&#xA;&#xD;&#xA;I configure the `palletId` and `methodId` in my `Config`, which can be set in my [*Runtime*](https://github.com/VegeBun-csj/Proof-Chain/blob/main/runtime/src/lib.rs#L638). But how can I pass parameters to it?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Here's my pallet code:&#xD;&#xA;&#xD;&#xA;1. This is my customize `call`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        #[derive(Encode, Decode, Clone, PartialEq, Eq, Default, RuntimeDebug, TypeInfo)]&#xD;&#xA;        pub struct XregisterCall&lt;AccountId&gt; {&#xD;&#xA;            // two call parameter: palletId and methodId&#xD;&#xA;            call_index: [u8; 2],&#xD;&#xA;            // method parameter: register_account and register_name&#xD;&#xA;            account: AccountId,&#xD;&#xA;            name: Vec&lt;u8&gt;,&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;2. This is my `Config`&#xD;&#xA;&#xD;&#xA;        #[pallet::config]&#xD;&#xA;        pub trait Config: frame_system::Config {&#xD;&#xA;            type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;    &#xD;&#xA;            /// The XCM sender module.&#xD;&#xA;            type XcmSender: SendXcm;&#xD;&#xA;    &#xD;&#xA;            /// Xregister Pallet ID in xregister server&#xD;&#xA;            type XregisterPalletID: Get&lt;u8&gt;;&#xD;&#xA;    &#xD;&#xA;            /// Xregister Method ID in xregister server&#xD;&#xA;            type XregisterMethodID: Get&lt;u8&gt;;&#xD;&#xA;    &#xD;&#xA;            /// Xregister maximum weight&#xD;&#xA;            type XregisterWeightAtMost: Get&lt;u64&gt;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;3. In my dispatchable `call`, the code is this:&#xD;&#xA;&#xD;&#xA;        let call = XregisterCall::&lt;T::AccountId&gt;::new(&#xD;&#xA;                    T::XregisterPalletID::get(), // palletId&#xD;&#xA;                    T::XregisterMethodID::get(), // pallet中的mathod Id&#xD;&#xA;                    who.clone(),                 // accountId&#xD;&#xA;                    name.clone(),                // registered name&#xD;&#xA;                );&#xD;&#xA;    &#xD;&#xA;                // build the xcm transact message&#xD;&#xA;                let message = Xcm(vec![Instruction::Transact {&#xD;&#xA;                    origin_type: OriginKind::Native,&#xD;&#xA;                    require_weight_at_most: T::XregisterWeightAtMost::get(),&#xD;&#xA;                    call: call.encode().into(),&#xD;&#xA;                }]);&#xD;&#xA;    &#xD;&#xA;                // send the message to xregister server chain&#xD;&#xA;                match T::XcmSender::send_xcm(&#xD;&#xA;                    (1, Junction::Parachain(4000u32.into())),  // 4000 is the destination parachain Id.&#xD;&#xA;                    message,&#xD;&#xA;                ) {&#xD;&#xA;                    // send_xcm结果是一个result&#xD;&#xA;                    Ok(()) =&gt; {&#xD;&#xA;                        // emit the event if send successfully&#xD;&#xA;                        Self::deposit_event(Event::Xregister(who, name));&#xD;&#xA;                        Ok(().into())&#xD;&#xA;                    },&#xD;&#xA;                    Err(_) =&gt; Err(Error::&lt;T&gt;::XcmSendError.into()),&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;4. My runtime config code is this:&#xD;&#xA;&#xD;&#xA;    https://github.com/VegeBun-csj/Proof-Chain/blob/main/runtime/src/lib.rs#L635&#xD;&#xA;&#xD;&#xA;In the above, I configure the `XregisterPalletID` and `XregisterMethodID`, so that I can pass the two parameters in runtime. Is this scheme OK? So the question is that I don't know how can I pass parameter in Runtime. If it's wrong, how can I correct it? Or are there any examples for me to take? I'm not familiar with xcm customize calls." ContentLicense="CC BY-SA 4.0" />
  <row Id="4849" PostHistoryTypeId="4" PostId="1317" RevisionGUID="aa1f7350-029e-4f26-a7d0-ef0eb005bc4b" CreationDate="2022-03-28T10:28:43.053" UserId="88" Comment="edited title" Text="How do I include a new rpc to a node from the node-template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4850" PostHistoryTypeId="2" PostId="1336" RevisionGUID="57eb93d0-83b2-42ef-85ae-c5ceaa76278f" CreationDate="2022-03-28T10:32:50.923" UserId="1806" Text="I deployed a relay chain node using the provided docker container:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;docker run \&#xD;&#xA;    --detach \&#xD;&#xA;    --name=polkadot \&#xD;&#xA;    --volume=&quot;$(pwd)/data:/data&quot; \&#xD;&#xA;    --network=host \&#xD;&#xA;    --entrypoint=polkadot \&#xD;&#xA;    &quot;parity/polkadot:v0.9.12&quot; \&#xD;&#xA;    --pruning=archive \&#xD;&#xA;    --name=polkadot-mainnet-123 \&#xD;&#xA;    --database=rocksdb \&#xD;&#xA;    --base-path=/data \&#xD;&#xA;    --port=30333 \&#xD;&#xA;    --rpc-port=8833 \&#xD;&#xA;    --rpc-cors=all \&#xD;&#xA;    --rpc-external \&#xD;&#xA;    --ws-port=8844 \&#xD;&#xA;    --ws-external \&#xD;&#xA;    --in-peers=5 \&#xD;&#xA;    --out-peers=5 \&#xD;&#xA;    --max-parallel-downloads=5 \&#xD;&#xA;    --prometheus-port=9688&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I also deployed a parachain node with the provided docker container (Moonbeam in this case):&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;docker run \&#xD;&#xA;    --detach \&#xD;&#xA;    --name=moonbeam \&#xD;&#xA;    --volume=&quot;$(pwd)/data:/data/volume&quot; \&#xD;&#xA;    --network=host \&#xD;&#xA;    --entrypoint=&quot;/moonbeam/moonbeam&quot; \&#xD;&#xA;    &quot;purestake/moonbeam:sha-7b9a2ceb&quot; \&#xD;&#xA;    --chain=moonbeam \&#xD;&#xA;    --base-path=/data/volume \&#xD;&#xA;    --name=moonbeam-mainnet-123 \&#xD;&#xA;    --port=30340 \&#xD;&#xA;    --rpc-port=9988 \&#xD;&#xA;    --rpc-cors=all \&#xD;&#xA;    --rpc-external \&#xD;&#xA;    --ws-port=9999 \&#xD;&#xA;    --ws-external \&#xD;&#xA;    --in-peers=5 \&#xD;&#xA;    --out-peers=5 \&#xD;&#xA;    --prometheus-port=9636 \&#xD;&#xA;    -- \&#xD;&#xA;    --name=polkadot-mainnet-456 \&#xD;&#xA;    --port=30341 \&#xD;&#xA;    --rpc-port=19988 \&#xD;&#xA;    --rpc-cors=all \&#xD;&#xA;    --rpc-external \&#xD;&#xA;    --ws-port=19999 \&#xD;&#xA;    --ws-external \&#xD;&#xA;    --in-peers=5 \&#xD;&#xA;    --out-peers=5 \&#xD;&#xA;    --prometheus-port=19636&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see the Moonbeam node has a Relay chain node bundled in the same deployment.&#xD;&#xA;&#xD;&#xA;This is also true of most other parachain nodes (e.g. Astar, Acala etc.).&#xD;&#xA;&#xD;&#xA;This is quite surprising to me as I initially thought it should be relatively trivial to point the parachain node at an existing (fully synced) Relay chain node, and have it establish a connection through a Unix socket or a TCP port.&#xD;&#xA;&#xD;&#xA;Naturally having each parachain deploy and sync its own Relay chain node is not ideal since the Relay chain node is usually the most resource intensive aspect of the deployment and so having to replicate it with every parachain deployment is an unnecessary waste of compute resources.&#xD;&#xA;&#xD;&#xA;I understand that the Cumulus framework is used to register a parachain and connect with the Relay chain, but why is the parachain node tied to the Relay chain node in the same binary of most parachain projects - is it just for convenience or is there a technical reason of why the nodes have to be deployed together?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4852" PostHistoryTypeId="1" PostId="1336" RevisionGUID="57eb93d0-83b2-42ef-85ae-c5ceaa76278f" CreationDate="2022-03-28T10:32:50.923" UserId="1806" Text="How to deploy a parachain node and connect it to an existing relay chain node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4853" PostHistoryTypeId="3" PostId="1336" RevisionGUID="57eb93d0-83b2-42ef-85ae-c5ceaa76278f" CreationDate="2022-03-28T10:32:50.923" UserId="1806" Text="|parachain|cumulus|nodes|relay-chain|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4854" PostHistoryTypeId="5" PostId="1317" RevisionGUID="eb433424-d152-4939-936a-3cbe2ec6dfb3" CreationDate="2022-03-28T10:42:56.300" UserId="88" Comment="Edit title and made question clearer" Text="The `node-template` says its `service.rs` is a specialisation of that on the substrate master branch. Hence, it's sort of hard to relate the two. Nonetheless, I'd like to expose an RPC endpoint that's accessible to both off-chain workers and (implicitly) the `polkadotjs` API, such as the `system_peers` endpoint that requires the `NetworkWorker`. But this is hidden in the `node-template` implementation. how/where would I look to obtain an instance of it or an equivalent struct in the `node-template`?&#xD;&#xA;&#xD;&#xA;Please note that I'm unfamiliar with asynchronous rust, and implementing custom RPCs, hence the wording might be a bit off, But I'm open to good resources for practical uses of both. &#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="4855" PostHistoryTypeId="4" PostId="1317" RevisionGUID="eb433424-d152-4939-936a-3cbe2ec6dfb3" CreationDate="2022-03-28T10:42:56.300" UserId="88" Comment="Edit title and made question clearer" Text="How do I include a new rpc that uses a NetworkWorker in the node-template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4857" PostHistoryTypeId="5" PostId="1302" RevisionGUID="d86a13e1-72b0-45f7-ae36-483709d758e0" CreationDate="2022-03-28T11:19:35.070" UserId="620" Comment="added 1 character in body" Text="There are ways for pallets to communicate in the runtime, although I wouldn't use events for this (events are stored in an overlay that gets applied to storage at the end of the block (in `pallet_system.on_finalize`)). I'm not a core dev, so take this answer as an example/starting point, but definitely not exhaustive. Someone else may have a better solution.&#xD;&#xA;&#xD;&#xA;An example of pallet communication is the reporting of `Offences` to `Staking` in Polkadot. Not every chain that has offenses/slashing necessarily uses staking, so this is left as a configuration.&#xD;&#xA;&#xD;&#xA;Looking at `pallet-offences`, we have a [Config item](https://github.com/paritytech/substrate/blob/d26123aec44e3df00b921ab0d27cbc1de0b11fa9/frame/offences/src/lib.rs#L64), `OnOffenceHandler`. When an offense [is reported](https://github.com/paritytech/substrate/blob/d26123aec44e3df00b921ab0d27cbc1de0b11fa9/frame/offences/src/lib.rs#L142), it calls the handler.&#xD;&#xA;&#xD;&#xA;In Polkadot, the runtime says that this [Offense Handler is Staking](https://github.com/paritytech/polkadot/blob/release-v0.9.18/runtime/polkadot/src/lib.rs#L843). And indeed, the Staking pallet has [an implementation](https://github.com/paritytech/substrate/blob/d26123aec44e3df00b921ab0d27cbc1de0b11fa9/frame/staking/src/pallet/impls.rs#L1139) of the [`OnOffenceHandler` trait](https://github.com/paritytech/substrate/blob/d26123aec44e3df00b921ab0d27cbc1de0b11fa9/primitives/staking/src/offence.rs#L166).&#xD;&#xA;&#xD;&#xA;If you want a similar handler for something like the creation of assets, I'd make an issue/PR to add a handler to the Assets pallet. Then, if another runtime did not want to use that handler, it would just config it to `AssetCreationHandler = ();` in its runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="4859" PostHistoryTypeId="5" PostId="1336" RevisionGUID="349ada2c-87d6-42a4-919d-711c22e01beb" CreationDate="2022-03-28T11:41:24.797" UserId="1806" Comment="edited body" Text="I deployed a relay chain node using the provided docker container:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;docker run \&#xD;&#xA;    --detach \&#xD;&#xA;    --name=polkadot \&#xD;&#xA;    --volume=&quot;$(pwd)/data:/data&quot; \&#xD;&#xA;    --network=host \&#xD;&#xA;    --entrypoint=polkadot \&#xD;&#xA;    &quot;parity/polkadot:v0.9.12&quot; \&#xD;&#xA;    --pruning=archive \&#xD;&#xA;    --name=polkadot-mainnet-123 \&#xD;&#xA;    --database=rocksdb \&#xD;&#xA;    --base-path=/data \&#xD;&#xA;    --port=30333 \&#xD;&#xA;    --rpc-port=8833 \&#xD;&#xA;    --rpc-cors=all \&#xD;&#xA;    --rpc-external \&#xD;&#xA;    --ws-port=8844 \&#xD;&#xA;    --ws-external \&#xD;&#xA;    --in-peers=5 \&#xD;&#xA;    --out-peers=5 \&#xD;&#xA;    --max-parallel-downloads=5 \&#xD;&#xA;    --prometheus-port=9688&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I also deployed a parachain node with the provided docker container (Moonbeam in this case):&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;docker run \&#xD;&#xA;    --detach \&#xD;&#xA;    --name=moonbeam \&#xD;&#xA;    --volume=&quot;$(pwd)/data:/data/volume&quot; \&#xD;&#xA;    --network=host \&#xD;&#xA;    --entrypoint=&quot;/moonbeam/moonbeam&quot; \&#xD;&#xA;    &quot;purestake/moonbeam:sha-7b9a2ceb&quot; \&#xD;&#xA;    --chain=moonbeam \&#xD;&#xA;    --base-path=/data/volume \&#xD;&#xA;    --name=moonbeam-mainnet-123 \&#xD;&#xA;    --port=30340 \&#xD;&#xA;    --rpc-port=9988 \&#xD;&#xA;    --rpc-cors=all \&#xD;&#xA;    --rpc-external \&#xD;&#xA;    --ws-port=9999 \&#xD;&#xA;    --ws-external \&#xD;&#xA;    --in-peers=5 \&#xD;&#xA;    --out-peers=5 \&#xD;&#xA;    --prometheus-port=9636 \&#xD;&#xA;    -- \&#xD;&#xA;    --name=polkadot-mainnet-456 \&#xD;&#xA;    --port=30341 \&#xD;&#xA;    --rpc-port=19988 \&#xD;&#xA;    --rpc-cors=all \&#xD;&#xA;    --rpc-external \&#xD;&#xA;    --ws-port=19999 \&#xD;&#xA;    --ws-external \&#xD;&#xA;    --in-peers=5 \&#xD;&#xA;    --out-peers=5 \&#xD;&#xA;    --prometheus-port=19636&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see the Moonbeam node has a relay chain node bundled in the same deployment.&#xD;&#xA;&#xD;&#xA;This is also true of most other parachain nodes (e.g. Astar, Acala etc.).&#xD;&#xA;&#xD;&#xA;This is quite surprising to me as I initially thought it should be relatively trivial to point the parachain node at an existing (fully synced) relay chain node, and have it establish a connection through a Unix socket or a TCP port.&#xD;&#xA;&#xD;&#xA;Naturally having each parachain deploy and sync its own relay chain node is not ideal since the relay chain node is usually the most resource intensive aspect of the deployment and so having to replicate it with every parachain deployment is an unnecessary waste of compute resources.&#xD;&#xA;&#xD;&#xA;I understand that the Cumulus framework is used to register a parachain and connect with the relay chain, but why is the parachain node tied to the relay chain node in the same binary of most parachain projects - is it just for convenience or is there a technical reason of why the nodes have to be deployed together?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4860" PostHistoryTypeId="5" PostId="1303" RevisionGUID="b790860c-f3c5-45e4-91d9-1af830cf7d1c" CreationDate="2022-03-28T11:48:32.643" UserId="489" Comment="added 1067 characters in body" Text="Are there any customized call examples in parachain XCM `transact`?&#xD;&#xA;&#xD;&#xA;More specificily, i want to know the differnece of transact call &#xD;&#xA; construction in different pallet and the same pallet bwtween two parachain.&#xD;&#xA;&#xD;&#xA;I know that cumulus have a pallet called [ping][1]，that is used to take the case of the same pallet `transact call` between different parachain,that is so cool.&#xD;&#xA;In `ping` pallet, the transact call which will pass to the destination parachan can be constructed by the dispatchable call in origin parachain,Since the `transact call` is same as the pallet call in destination parachain.&#xD;&#xA;&#xD;&#xA;But when i want to construct a XCM `transact call` in origin parachain to dispatch the destination parachain pallet where the method is not in the origin parachain pallet.how can i do it ?&#xD;&#xA;&#xD;&#xA;so, my question is:    &#xD;&#xA;if i want dispatch a call in destination parachain's pallet and the call is not in my origin parachain pallet.in this case, how can i construct my call in XCM transact which is different from the [ping][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/master/polkadot-parachains/pallets/ping/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="4861" PostHistoryTypeId="2" PostId="1337" RevisionGUID="0e63cb37-092e-4cf4-9157-fe7eeb5958ae" CreationDate="2022-03-28T11:53:42.253" UserId="139" Text="In my pallet, I am writing a function that checks if a user has some minimum amount of free balance, and if they do, proceed with the transaction by locking a `DepositFee` amount. I found that `set_lock` perfectly fits my use case however it asks for a `LockIdentifier`. What should I use here? Can it be any single name or does it have to be unique for each transaction made to this pallet function? " ContentLicense="CC BY-SA 4.0" />
  <row Id="4863" PostHistoryTypeId="1" PostId="1337" RevisionGUID="0e63cb37-092e-4cf4-9157-fe7eeb5958ae" CreationDate="2022-03-28T11:53:42.253" UserId="139" Text="How to choose a Lock Identifier?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4864" PostHistoryTypeId="3" PostId="1337" RevisionGUID="0e63cb37-092e-4cf4-9157-fe7eeb5958ae" CreationDate="2022-03-28T11:53:42.253" UserId="139" Text="|pallet|palletid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4865" PostHistoryTypeId="2" PostId="1338" RevisionGUID="f22cdcc4-f044-4fbe-8de9-f2962bc032b2" CreationDate="2022-03-28T11:57:56.610" UserId="1949" Text="Am I correct in understanding that the governance portion of Polkadot/Kusama/Substrate is undergoing a small revolution in terms of code?&#xD;&#xA;&#xD;&#xA;Based on what I've seen/heard:&#xD;&#xA;&#xD;&#xA; 1. Democracy is undergoing a re-development&#xD;&#xA; 2. Council won't be part of this going forward&#xD;&#xA; &#xD;&#xA;I must admit that I'm not a great reader of Rust code, so pointing to the relevant MRs would be great, however a birds eye view of the envisioned changes would be absolutely better and the rationale behind them even better than that.&#xD;&#xA;&#xD;&#xA;(It is actually great to see an integral part of what makes the chains different also evolve, hence the questions)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4867" PostHistoryTypeId="1" PostId="1338" RevisionGUID="f22cdcc4-f044-4fbe-8de9-f2962bc032b2" CreationDate="2022-03-28T11:57:56.610" UserId="1949" Text="Democracy rework in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="4868" PostHistoryTypeId="3" PostId="1338" RevisionGUID="f22cdcc4-f044-4fbe-8de9-f2962bc032b2" CreationDate="2022-03-28T11:57:56.610" UserId="1949" Text="|polkadot|kusama|governance|democratic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4869" PostHistoryTypeId="2" PostId="1339" RevisionGUID="69e654d8-5fc0-4157-b9eb-cce0f3e2ada2" CreationDate="2022-03-28T12:26:50.697" UserId="139" Text="In the trait config for `LockableCurrency` there's a type `MaxLocks`. I am writing a pallet that uses `set_lock` and `remove_lock` from this trait. Should I implement checks to see if I am not exceeding `MaxLocks` before calling `set_lock`? If yes, how should I check how many locks an account already has? " ContentLicense="CC BY-SA 4.0" />
  <row Id="4871" PostHistoryTypeId="1" PostId="1339" RevisionGUID="69e654d8-5fc0-4157-b9eb-cce0f3e2ada2" CreationDate="2022-03-28T12:26:50.697" UserId="139" Text="Should pallets that lock currency check for MaxLocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4872" PostHistoryTypeId="3" PostId="1339" RevisionGUID="69e654d8-5fc0-4157-b9eb-cce0f3e2ada2" CreationDate="2022-03-28T12:26:50.697" UserId="139" Text="|lockable-currency|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4873" PostHistoryTypeId="2" PostId="1340" RevisionGUID="d2a63d0a-98ee-4e8d-9491-a9654652c492" CreationDate="2022-03-28T12:27:40.753" UserId="53" Text="The overall tracking issue for &quot;new governance&quot; is [substrate#10252](https://github.com/paritytech/substrate/issues/10252). New pallets for governance primitives have been introduced in:&#xD;&#xA;&#xD;&#xA;- https://github.com/paritytech/substrate/pull/10195&#xD;&#xA;- https://github.com/paritytech/substrate/pull/10159&#xD;&#xA;- https://github.com/paritytech/substrate/pull/10356&#xD;&#xA;&#xD;&#xA;The new pallets are designed not to need governance bodies such as the council.&#xD;&#xA;&#xD;&#xA;I'm working on a proposal to upgrade Kusama to use these new pallets in [polkadot#5205](https://github.com/paritytech/polkadot/pull/5205), though this PR does not remove the old governance pallets; that, if approved, would come later.&#xD;&#xA;&#xD;&#xA;There will shortly be an explainer article on the work and rationale behind it." ContentLicense="CC BY-SA 4.0" />
  <row Id="4875" PostHistoryTypeId="2" PostId="1341" RevisionGUID="afe4b362-76e8-4f8e-943f-5e79bd2a1ad7" CreationDate="2022-03-28T12:29:43.527" UserId="537" Text="in Mangata we run into some problems when integrating polkadot-ui with our chain.&#xD;&#xA;&#xD;&#xA;For most of the time we use older polkadot.js apps v0.96.1 - that version allows for types definition injection using developer tab. It works without problem but that feature was removed in newer versions of apps(&gt;0.96.1). As we are going live soon we would like to integrate with the most recent version hosted on https://polkadot.js.org/apps/&#xD;&#xA;&#xD;&#xA;We created dedicated npm package @mangata-finance/types with our types definitions both generated using typegen and custom ones:&#xD;&#xA;https://github.com/mangata-finance/types/blob/main/src/interfaces/definitions.ts#L2-L23&#xD;&#xA;https://www.npmjs.com/package/@mangata-finance/types&#xD;&#xA;&#xD;&#xA;One of the modifications we did is custom Header definitions that introduces 2 new fields. It seems that that type is not propagated properly but maybe we are missing something. Anyway when we try to submit extrinsic to our node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;1010: Invalid transaction: Transaction has bad signature.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We spotted same problem already when:&#xD;&#xA;&#xD;&#xA; - we don't inject custom definitions in js scripts, *but it works when types are injected*&#xD;&#xA;```&#xD;&#xA;  const api = await ApiPromise.create({&#xD;&#xA;    provider: wsProvider,&#xD;&#xA;    types: {&#xD;&#xA;      ShufflingSeed: {&#xD;&#xA;        seed: 'H256',&#xD;&#xA;        proof: 'H512'&#xD;&#xA;      },&#xD;&#xA;      Header: {&#xD;&#xA;        parentHash: &quot;Hash&quot;,&#xD;&#xA;        number: &quot;Compact&lt;BlockNumber&gt;&quot;,&#xD;&#xA;        stateRoot: &quot;Hash&quot;,&#xD;&#xA;        extrinsicsRoot: &quot;Hash&quot;,&#xD;&#xA;        digest: &quot;Digest&quot;,&#xD;&#xA;        seed: &quot;ShufflingSeed&quot;,&#xD;&#xA;        count: &quot;BlockNumber&quot;&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA;  })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; - we use older version of polkdot ui (0.96.1) and types are not injected using developer tab, but it works fine after providing the header type definition.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4877" PostHistoryTypeId="1" PostId="1341" RevisionGUID="afe4b362-76e8-4f8e-943f-5e79bd2a1ad7" CreationDate="2022-03-28T12:29:43.527" UserId="537" Text="Custom block header definition ignored by polkadot ui" ContentLicense="CC BY-SA 4.0" />
  <row Id="4878" PostHistoryTypeId="3" PostId="1341" RevisionGUID="afe4b362-76e8-4f8e-943f-5e79bd2a1ad7" CreationDate="2022-03-28T12:29:43.527" UserId="537" Text="|substrate-node|parachain|polkadot-js|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4879" PostHistoryTypeId="2" PostId="1342" RevisionGUID="48e7851c-5eb2-4adb-9aa1-3309d28f29d6" CreationDate="2022-03-28T12:36:38.537" UserId="139" Text="Can someone explain the difference between `set_lock` and `extend_lock`?&#xD;&#xA;&#xD;&#xA;From my reading of the documentation on both, I figure that `extend_lock` should be called when we want to impose more locks on an already locked account, ie, if my pallet has already called `set_lock` on `Alice`, and she makes another call to the same pallet, rather than creating a new lock, I `extend_lock`. &#xD;&#xA;&#xD;&#xA;Question : for a particular `LockIdentifier` does calling `extend_lock` add to the amount already locked and does `set_lock` reset the lock with a new amount with which it was called? Would that imply that `extend_lock` increases the number of `locks` on an account, whereas `set_lock` keeps the number of `locks` constant? " ContentLicense="CC BY-SA 4.0" />
  <row Id="4881" PostHistoryTypeId="1" PostId="1342" RevisionGUID="48e7851c-5eb2-4adb-9aa1-3309d28f29d6" CreationDate="2022-03-28T12:36:38.537" UserId="139" Text="extend_lock vs set_lock" ContentLicense="CC BY-SA 4.0" />
  <row Id="4882" PostHistoryTypeId="3" PostId="1342" RevisionGUID="48e7851c-5eb2-4adb-9aa1-3309d28f29d6" CreationDate="2022-03-28T12:36:38.537" UserId="139" Text="|lockable-currency|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4883" PostHistoryTypeId="6" PostId="1337" RevisionGUID="ff096c2b-f6d3-42dc-88ef-5cd30040cdc8" CreationDate="2022-03-28T12:38:08.973" UserId="139" Comment="edited tags" Text="|pallet|palletid|lockable-currency|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4884" PostHistoryTypeId="2" PostId="1343" RevisionGUID="562e190c-d360-4fd0-9c04-dbac2a4def7b" CreationDate="2022-03-28T13:22:07.220" UserId="53" Text="- `set_lock` *replaces* any previous lock of the given identifier with the new lock. The previous amount which is locked under the given identifier is completely disregarded.&#xD;&#xA;- `extend_lock` does not replace any existing lock of the given identifier, but rather leaves the final amount locked as the *maximum* of the previous amount and the new amount.&#xD;&#xA;&#xD;&#xA;Basically, if you do not want to *reduce* the amount that is locked with the given identifier, use `extend_lock`. If do want to allow the possibility of the amount locked with the given identifier to reduce, use `set_lock`.&#xD;&#xA;&#xD;&#xA;In both cases, a new lock is created if there was no previous lock with the given identifier in place. Similarly no new locks are created if there was." ContentLicense="CC BY-SA 4.0" />
  <row Id="4886" PostHistoryTypeId="2" PostId="1344" RevisionGUID="a749e94d-f9d0-4b82-a4e9-fcc11be2a108" CreationDate="2022-03-28T13:29:59.173" UserId="53" Text="Every account may have up to one lock in place from each of up to `MaxLocks` identifiers at any time.&#xD;&#xA;&#xD;&#xA;Your identifier should not be already used in any Substrate crate. A simple namespacing scheme would be to use your pallet's name or obviously identifiable parts thereof. E.g. the lock used for the Phragmen Elections pallet is `&quot;phrelect&quot;`.&#xD;&#xA;&#xD;&#xA;If your pallet may need to give a large number of independent locks for each account ID, then you will likely need to create a lock aggregation system within your pallet. For an example of this see `update_lock` in the Balances pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="4888" PostHistoryTypeId="2" PostId="1345" RevisionGUID="5adf7230-af86-4306-85a8-ef48bd7b390d" CreationDate="2022-03-28T13:41:52.327" UserId="53" Text="The current solution is to require the runtime-author to set `MaxLocks` to the number of unique `LockIdentifier` values in the runtime. This alleviates any need to check the number of locks since there can only ever be as many locks as identifiers as each identifier can result in at most one lock per account.&#xD;&#xA;&#xD;&#xA;If `MaxLocks` is underestimated then it's likely not the end of the world; it means that the weights and PoV footprint estimations will be a little lower than they should be, but there's enough headroom in both of these that a small error shouldn't cause anything catastrophic to happen.&#xD;&#xA;&#xD;&#xA;(This does place some effort on the part of the runtime-author and a mistake might be made. This will likely be abstracted away in the future by requiring the `LockIdentifier` type to be an amalgamation type similar to `Origin`, `Event` and `Error` but whose values are enumerable.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="4890" PostHistoryTypeId="2" PostId="1346" RevisionGUID="1d4abcec-7fdb-4980-afc1-0b0f3cf2480c" CreationDate="2022-03-28T13:46:58.183" UserId="53" Text="This is basically the correct approach.&#xD;&#xA;&#xD;&#xA;There isn't actually any need to record the position: you should be removing items from `OldLocks` and inserting equivalents into `NewLocks`. You can stop the migration once `OldLocks` is empty. As long as you can guarantee that migration will remove at least one item from `OldLocks` and that your runtime never introduces any items into `OldLocks` then this will complete in a finite time.&#xD;&#xA;&#xD;&#xA;See the `pallet-xcm` in Polkadot for an example on multi-block migrations." ContentLicense="CC BY-SA 4.0" />
  <row Id="4892" PostHistoryTypeId="2" PostId="1347" RevisionGUID="3e1cd2b7-23dd-4ef6-9e50-26f0f34630bf" CreationDate="2022-03-28T13:55:22.233" UserId="679" Text="I don't know how can I convert Option&lt;BalanceOf&lt;T&gt;&gt; (subtrate specific type)to u64 (rust primitive types)?&#xD;&#xA;&#xD;&#xA;I followed this article( https://substrate.stackexchange.com/questions/13/how-do-you-convert-between-substrate-specific-types-and-rust-primitive-types ), it helped me while converting u64 to Option&lt;BalanceOf&lt;T&gt; using the below function. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	pub fn u64_to_balance_option(input: u8) -&gt; Option&lt;BalanceOf&lt;T&gt;&gt; {&#xD;&#xA;			input.try_into().ok()&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I also need to convert some Option&lt;BalanceOf&lt;T&gt;&gt; types inside u64 to perform some mathematical operation and then again convert u64 to Option&lt;BalanceOf&lt;T&gt;&gt; to put back inside my storage items.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4894" PostHistoryTypeId="1" PostId="1347" RevisionGUID="3e1cd2b7-23dd-4ef6-9e50-26f0f34630bf" CreationDate="2022-03-28T13:55:22.233" UserId="679" Text="How to convert substrate Specific Types(Option&lt;BalanceOf&lt;T&gt;&gt; ) to Rust Primitive types (U64)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4895" PostHistoryTypeId="3" PostId="1347" RevisionGUID="3e1cd2b7-23dd-4ef6-9e50-26f0f34630bf" CreationDate="2022-03-28T13:55:22.233" UserId="679" Text="|substrate-node-template|substrateinterface|rust-ipfs|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4896" PostHistoryTypeId="2" PostId="1348" RevisionGUID="f17cc1a0-b085-47e5-88e2-122aab60d82f" CreationDate="2022-03-28T14:14:13.043" UserId="53" Text="You'll see that `Currency::Balance` is bound to `AtLeast32BitUnsigned` which by being bound to `BaseArithmetic` is bound to implement `TryInto&lt;u64&gt;`. Therefore the most obvious code is something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn balance_to_u64_option(input: impl TryInto&lt;u64&gt;) -&gt; Option&lt;u64&gt; {&#xD;&#xA;    input.try_into().ok()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, balances cannot necessarily be expressed as a `u64`, so this really isn't such a great plan for production code as it will restrict your pallet to being used only when someone has a small enough balance.&#xD;&#xA;&#xD;&#xA;In general, you should aim to do all arithmetic in the native Polkadot types. `Currency::Balance` is required to implement all the typical arithmetic operations for this reason.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4899" PostHistoryTypeId="6" PostId="1338" RevisionGUID="56883b93-439c-4411-a745-0120d72184bb" CreationDate="2022-03-28T14:18:13.930" UserId="85" Comment="edited tags" Text="|polkadot|kusama|democratic|governance|decentralised|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4900" PostHistoryTypeId="5" PostId="1320" RevisionGUID="0252892c-b047-4387-b093-ba41bd29ac78" CreationDate="2022-03-28T14:48:39.570" UserId="205" Comment="added 169 characters in body" Text="There are many docs/tutorials explaining how to extend the node's RPC service with a Custom RPC to query the Runtime storage. What I could not figure it out yet, is how to do the same but to query the Offchain-storage. I basically want to replicate the following available built-in service but with my own Custom RPC:&#xD;&#xA;https://docs.substrate.io/rustdocs/latest/sc_rpc_api/offchain/trait.OffchainApi.html&#xD;&#xA;&#xD;&#xA;Below are my snippets:&#xD;&#xA;&#xD;&#xA;This example works properly.&#xD;&#xA;```&#xD;&#xA;// node/src/rpc.rs&#xD;&#xA;// Ref: https://substrate.recipes/custom-rpc.html&#xD;&#xA;&#xD;&#xA;let mut io = jsonrpc_core::IoHandler::default();&#xD;&#xA;&#xD;&#xA;// Add a silly RPC that returns constant values&#xD;&#xA;io.extend_with(SillyRpc::to_delegate(Silly {},));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This example is the one I'm interested and I could not figure it out how to make it work so far. Here I'm trying to incorporate the offchain-storage.&#xD;&#xA;```&#xD;&#xA;// node/src/rpc.rs&#xD;&#xA;// Ref: https://core.tetcoin.org/rustdocs/v2.0.1/src/sc_rpc/offchain/mod.rs.html&#xD;&#xA;&#xD;&#xA;let mut io = jsonrpc_core::IoHandler::default();&#xD;&#xA;&#xD;&#xA;let storage = ???????&#xD;&#xA;io.extend_with(SillyRpc::to_delegate(Silly::new(storage)));&#xD;&#xA;```&#xD;&#xA;The closest code I found is the following from `builder.rs`:&#xD;&#xA;```&#xD;&#xA;let maybe_offchain_rpc = offchain_storage.map(|storage| {&#xD;&#xA;	let offchain = sc_rpc::offchain::Offchain::new(storage, deny_unsafe);&#xD;&#xA;	offchain::OffchainApi::to_delegate(offchain)&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also related to the previous question:&#xD;&#xA;https://substrate.stackexchange.com/questions/1024/is-it-possible-to-query-an-ocws-off-chain-storage-via-rpc-from-an-external-serv/1049#1049&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;Pablo." ContentLicense="CC BY-SA 4.0" />
  <row Id="4901" PostHistoryTypeId="5" PostId="1320" RevisionGUID="2725a40e-5b6b-48ab-9c12-f2e599184ce0" CreationDate="2022-03-28T15:14:37.180" UserId="205" Comment="added 60 characters in body" Text="There are many docs/tutorials explaining how to extend the node's RPC service with a Custom RPC to query the Runtime storage. What I could not figure it out yet, is how to do the same but to query the Offchain-storage. I basically want to replicate the following available built-in service but with my own Custom RPC:&#xD;&#xA;https://docs.substrate.io/rustdocs/latest/sc_rpc_api/offchain/trait.OffchainApi.html&#xD;&#xA;&#xD;&#xA;Below are my snippets:&#xD;&#xA;&#xD;&#xA;This example works properly. No storage required.&#xD;&#xA;```&#xD;&#xA;// node/src/rpc.rs&#xD;&#xA;// Ref: https://substrate.recipes/custom-rpc.html&#xD;&#xA;&#xD;&#xA;let mut io = jsonrpc_core::IoHandler::default();&#xD;&#xA;&#xD;&#xA;// Add a silly RPC that returns constant values&#xD;&#xA;io.extend_with(SillyRpc::to_delegate(Silly {},));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The following example is the one I'm interested in, and I could not figure it out how to make it work so far. Below I'm trying to incorporate the `offchain-storage`.&#xD;&#xA;```&#xD;&#xA;// node/src/rpc.rs&#xD;&#xA;// Ref: https://core.tetcoin.org/rustdocs/v2.0.1/src/sc_rpc/offchain/mod.rs.html&#xD;&#xA;&#xD;&#xA;let mut io = jsonrpc_core::IoHandler::default();&#xD;&#xA;&#xD;&#xA;let storage = ???????&#xD;&#xA;io.extend_with(SillyRpc::to_delegate(Silly::new(storage)));&#xD;&#xA;```&#xD;&#xA;The closest code I found similar to what I need is the following from `builder.rs`:&#xD;&#xA;```&#xD;&#xA;let maybe_offchain_rpc = offchain_storage.map(|storage| {&#xD;&#xA;	let offchain = sc_rpc::offchain::Offchain::new(storage, deny_unsafe);&#xD;&#xA;	offchain::OffchainApi::to_delegate(offchain)&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also related to the previous question:&#xD;&#xA;https://substrate.stackexchange.com/questions/1024/is-it-possible-to-query-an-ocws-off-chain-storage-via-rpc-from-an-external-serv/1049#1049&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;Pablo." ContentLicense="CC BY-SA 4.0" />
  <row Id="4902" PostHistoryTypeId="2" PostId="1349" RevisionGUID="f5992342-0baf-4b4e-b93c-89e73bb7b08d" CreationDate="2022-03-28T15:31:56.057" UserId="34" Text="It is common to want to be absolutely sure any runtime upgrades and some mission critical extrinsics will work as expected in a safe but otherwise identical environment to a production chain. Testing this locally would be ideal.&#xD;&#xA;&#xD;&#xA;Is there a recommended way to _emulate_ the configuration and/or the present state, for [`polkadot-launch`](https://github.com/paritytech/polkadot-launch) for a live relay chain? " ContentLicense="CC BY-SA 4.0" />
  <row Id="4904" PostHistoryTypeId="1" PostId="1349" RevisionGUID="f5992342-0baf-4b4e-b93c-89e73bb7b08d" CreationDate="2022-03-28T15:31:56.057" UserId="34" Text="How can I test a parachain against a production relay chain's live state and configuration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4905" PostHistoryTypeId="3" PostId="1349" RevisionGUID="f5992342-0baf-4b4e-b93c-89e73bb7b08d" CreationDate="2022-03-28T15:31:56.057" UserId="34" Text="|parachain|testing|polkadot-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4906" PostHistoryTypeId="2" PostId="1350" RevisionGUID="617f28a3-59ee-48ce-8199-c147f66abf9e" CreationDate="2022-03-28T15:31:56.057" UserId="34" Text="## [Fork off Relay Chain](https://github.com/Phala-Network/fork-off-relaychain)&#xD;&#xA;&#xD;&#xA;&gt; This script allows bootstrapping a new substrate chain with the current state of a live chain. Using this, you can create a fork of Polkadot, Kusama and other substrate chain for development purposes.&#xD;&#xA;&#xD;&#xA;Also useful:&#xD;&#xA;- [`xcm-emulator`](https://github.com/shaunxw/xcm-simulator) - the emulator that takes into account state of a target chain (simulator is now in Polkadot itself)." ContentLicense="CC BY-SA 4.0" />
  <row Id="4908" PostHistoryTypeId="5" PostId="1240" RevisionGUID="f93dece3-519a-4584-bb54-d75fe4010bb7" CreationDate="2022-03-28T16:17:38.500" UserId="172" Comment="added 41 characters in body" Text="Posts pertaining to the Kitties tutorial." ContentLicense="CC BY-SA 4.0" />
  <row Id="4909" PostHistoryTypeId="24" PostId="1240" RevisionGUID="f93dece3-519a-4584-bb54-d75fe4010bb7" CreationDate="2022-03-28T16:17:38.500" Comment="Proposed by 172 approved by 83, 85 edit id of 108" ContentLicense="CC BY-SA 4.0" />
  <row Id="4910" PostHistoryTypeId="5" PostId="1246" RevisionGUID="731ae374-6ce0-453e-bd31-6cdeec1ccdd4" CreationDate="2022-03-28T16:17:49.460" UserId="172" Comment="added 60 characters in body" Text="Everything smart contract related, either WASM or EVM based." ContentLicense="CC BY-SA 4.0" />
  <row Id="4911" PostHistoryTypeId="24" PostId="1246" RevisionGUID="731ae374-6ce0-453e-bd31-6cdeec1ccdd4" CreationDate="2022-03-28T16:17:49.460" Comment="Proposed by 172 approved by 83, 85 edit id of 111" ContentLicense="CC BY-SA 4.0" />
  <row Id="4912" PostHistoryTypeId="6" PostId="1075" RevisionGUID="e618d80d-cfdb-4309-b991-5dabb22a8043" CreationDate="2022-03-28T16:24:28.887" UserId="85" Comment="edited tags" Text="|networking|libp2p|unstoppable|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4913" PostHistoryTypeId="6" PostId="1338" RevisionGUID="933fe5ce-2c02-412f-bb39-b022a1179250" CreationDate="2022-03-28T16:24:50.437" UserId="85" Comment="edited tags" Text="|polkadot|kusama|governance|democratic|unstoppable|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4914" PostHistoryTypeId="6" PostId="1027" RevisionGUID="a7f5e54c-3024-40a8-b710-5d39a589ab09" CreationDate="2022-03-28T16:25:19.997" UserId="85" Comment="edited tags" Text="|storage|evm|unstoppable|decentralised|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4915" PostHistoryTypeId="2" PostId="1351" RevisionGUID="1e470326-e1c8-4d48-ab78-04b1590cd2cd" CreationDate="2022-03-28T16:28:48.990" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4917" PostHistoryTypeId="1" PostId="1351" RevisionGUID="1e470326-e1c8-4d48-ab78-04b1590cd2cd" CreationDate="2022-03-28T16:28:48.990" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4918" PostHistoryTypeId="2" PostId="1352" RevisionGUID="674c084e-219d-4b22-be0d-64ab7dab59e9" CreationDate="2022-03-28T16:28:48.990" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4920" PostHistoryTypeId="1" PostId="1352" RevisionGUID="674c084e-219d-4b22-be0d-64ab7dab59e9" CreationDate="2022-03-28T16:28:48.990" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4921" PostHistoryTypeId="2" PostId="1353" RevisionGUID="a94fbe32-31d9-42ea-97c3-05e943d796b8" CreationDate="2022-03-28T16:51:51.757" UserId="28" Text="As far as I know, Substrate has not come up with a solution for this yet.&#xD;&#xA;&#xD;&#xA;Substrate uses bootnodes to connect new nodes to the existing network, and from there, the networking protocol will connect the node to appropriate peers, and it shouldn't have any problems after that.&#xD;&#xA;&#xD;&#xA;However, we are dependent currently on those bootnodes to initialize the connection to network peers.&#xD;&#xA;&#xD;&#xA;However, this is something that has been talked about before. I think we just need the right solution to implement." ContentLicense="CC BY-SA 4.0" />
  <row Id="4923" PostHistoryTypeId="6" PostId="1321" RevisionGUID="305df4f9-9eea-46dc-8b0e-89249a39cbc6" CreationDate="2022-03-28T16:58:51.810" UserId="85" Comment="edited tags" Text="|storage|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4924" PostHistoryTypeId="6" PostId="1261" RevisionGUID="d57d0a84-22f2-49ba-ae10-3e2d54264fbe" CreationDate="2022-03-28T17:02:49.253" UserId="85" Comment="edited tags" Text="|pallet|polkadot|kusama|staking|bags-list|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4925" PostHistoryTypeId="6" PostId="518" RevisionGUID="d39c0e7e-b33f-4392-b102-8f8fe9b4e1d4" CreationDate="2022-03-28T17:05:42.980" UserId="85" Comment="edited tags" Text="|pov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4926" PostHistoryTypeId="6" PostId="1103" RevisionGUID="e5a3b62a-828f-4288-b052-5dbc2729e05c" CreationDate="2022-03-28T17:06:48.180" UserId="85" Comment="edited tags" Text="|pallet|frame|events|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4927" PostHistoryTypeId="2" PostId="1354" RevisionGUID="ae0849bc-645c-4d62-8435-980d146fa715" CreationDate="2022-03-28T17:22:30.507" UserId="1927" Text="I'm fiddling with substrate's `#[pallet::generate_store(pub(super) trait Store)]`\&#xD;&#xA;https://docs.substrate.io/v3/runtime/macros/#palletpallet&#xD;&#xA;&#xD;&#xA;Documentation says &#xD;&#xA;&gt;Generates the Store trait if the attribute is provided, which contains an associated type for each storage item. It takes the form of a more explicit Rust struct module and can be written as pub struct Pallet&lt;T&gt;(_);, with the appropriate PhantomData replacing _ to make it generic.&#xD;&#xA;&#xD;&#xA;Here is my kittens pallet. Even if I remove the macro mentioned above, node works fine as expected.\&#xD;&#xA;https://github.com/yourarj/substrate-node-playground/blob/adfafc5e0733ade8fd9b422585716baea11da35a/pallets/kittens/src/lib.rs#L13&#xD;&#xA;&#xD;&#xA;I tried applying cargo expand with both cases is that I found out the following differences. A `Store trait` and it's implemented for `Pallet Struct`.\&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;But in both the cases my functionality is not impacted at all. It mutates chain state and queries the state as expected.&#xD;&#xA;&#xD;&#xA;So &#xD;&#xA;&gt; Why should we use this `#[pallet::generate_store(pub(super) trait Store)]`? What's the point?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GxDED.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4929" PostHistoryTypeId="1" PostId="1354" RevisionGUID="ae0849bc-645c-4d62-8435-980d146fa715" CreationDate="2022-03-28T17:22:30.507" UserId="1927" Text="When should I use #[pallet::generate_store(pub(super) trait Store)]" ContentLicense="CC BY-SA 4.0" />
  <row Id="4930" PostHistoryTypeId="3" PostId="1354" RevisionGUID="ae0849bc-645c-4d62-8435-980d146fa715" CreationDate="2022-03-28T17:22:30.507" UserId="1927" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4931" PostHistoryTypeId="2" PostId="1355" RevisionGUID="dfecb962-5f78-4e2c-b581-340c21487ba9" CreationDate="2022-03-28T17:28:52.157" UserId="1779" Text="We are investigating fluctuating block production times, and something that caught my eyes in the logs were `Collation wasn't advertised to any validator`. What does this mean, exactly, and could it cause long block production times?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4933" PostHistoryTypeId="1" PostId="1355" RevisionGUID="dfecb962-5f78-4e2c-b581-340c21487ba9" CreationDate="2022-03-28T17:28:52.157" UserId="1779" Text="&quot;Collation wasn't advertised to any validator&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4934" PostHistoryTypeId="3" PostId="1355" RevisionGUID="dfecb962-5f78-4e2c-b581-340c21487ba9" CreationDate="2022-03-28T17:28:52.157" UserId="1779" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4936" PostHistoryTypeId="2" PostId="1356" RevisionGUID="3977404e-aa2f-4766-bbff-4daf33f68d48" CreationDate="2022-03-28T18:44:58.690" UserId="1970" Text="I'm quite new at this, but I'm having trouble understanding the &quot;metadata version&quot;. &#xD;&#xA;&#xD;&#xA;My confusion stems from the fact that I know that Polkadot/Kusama has upgraded to v14 a while back, but I don't see the version on-chain reflecting that. The same with chains from the Acala team, they are v14 chains, but in this case the version number I can see if very far away from that and what is on Polkadot and Kusama.&#xD;&#xA;&#xD;&#xA;Am I missing something basic?&#xD;&#xA;&#xD;&#xA;In my defense I know that v14 makes type mapping between system easier, hence the basis for my question on how to read this from the information I can see. I have read the question here around it, but it refers to blocks, metadata versions, metadata upgrades and differences - so it seems like v14 can change?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4938" PostHistoryTypeId="1" PostId="1356" RevisionGUID="3977404e-aa2f-4766-bbff-4daf33f68d48" CreationDate="2022-03-28T18:44:58.690" UserId="1970" Text="Metadata versioning" ContentLicense="CC BY-SA 4.0" />
  <row Id="4939" PostHistoryTypeId="3" PostId="1356" RevisionGUID="3977404e-aa2f-4766-bbff-4daf33f68d48" CreationDate="2022-03-28T18:44:58.690" UserId="1970" Text="|polkadot|kusama|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4943" PostHistoryTypeId="2" PostId="1357" RevisionGUID="2a035664-8045-4090-b1cd-b6095b31816a" CreationDate="2022-03-28T20:21:12.420" UserId="380" Text="I have the Substrate Connect light client [browser extension](https://chrome.google.com/webstore/detail/substrate-connect-extensi/khccbhhbocaaklceanjginbdheafklai) installed but there are no networks listed in the options.&#xD;&#xA;&#xD;&#xA;Click into the `Options` in the extension:&#xD;&#xA;&#xD;&#xA;[![Browser extension][1]][1]&#xD;&#xA;&#xD;&#xA;Clicking `Networks` does nothing:&#xD;&#xA;&#xD;&#xA;[![Browser extension settings page][2]][2]&#xD;&#xA;&#xD;&#xA;How do I connect to a substrate-based network using this extension?&#xD;&#xA;&#xD;&#xA;The [docs](https://paritytech.github.io/substrate-connect/#extension) don't give any hints.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/t5Ewp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6UZLi.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4945" PostHistoryTypeId="1" PostId="1357" RevisionGUID="2a035664-8045-4090-b1cd-b6095b31816a" CreationDate="2022-03-28T20:21:12.420" UserId="380" Text="How do I connect to a network using Substrate Connect?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4946" PostHistoryTypeId="3" PostId="1357" RevisionGUID="2a035664-8045-4090-b1cd-b6095b31816a" CreationDate="2022-03-28T20:21:12.420" UserId="380" Text="|substrate-connect|browser-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4947" PostHistoryTypeId="5" PostId="1357" RevisionGUID="8afdbc8b-078f-4571-9bfe-b8478858421f" CreationDate="2022-03-28T20:37:12.797" UserId="380" Comment="added 411 characters in body" Text="I have the Substrate Connect light client [browser extension](https://chrome.google.com/webstore/detail/substrate-connect-extensi/khccbhhbocaaklceanjginbdheafklai) installed but there are no networks listed in the options.&#xD;&#xA;&#xD;&#xA;Click into the `Options` in the extension:&#xD;&#xA;&#xD;&#xA;[![Browser extension][1]][1]&#xD;&#xA;&#xD;&#xA;Clicking `Networks` does nothing:&#xD;&#xA;&#xD;&#xA;[![Browser extension settings page][2]][2]&#xD;&#xA;&#xD;&#xA;How do I connect to a substrate-based network using this extension?&#xD;&#xA;&#xD;&#xA;The [docs](https://paritytech.github.io/substrate-connect/#extension) don't give many hints. I have **bolded** part of the below.&#xD;&#xA;&#xD;&#xA;&gt; For in-browser use, Substrate Connect provides a Browser Extension&#xD;&#xA;&gt; built upon the @substrate/light node module that is running the&#xD;&#xA;&gt; selected light clients **inside the extension** so that the end-user&#xD;&#xA;&gt; doesn't need to fire up a light node in every browser tab. This will&#xD;&#xA;&gt; also allow the light-node to keep syncing as long as the browser&#xD;&#xA;&gt; window stays open.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/t5Ewp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6UZLi.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4948" PostHistoryTypeId="5" PostId="1299" RevisionGUID="3f9f3e57-7fde-4a68-9a8b-d5ebc05d332d" CreationDate="2022-03-29T00:15:56.743" UserId="3" Comment="Include corrections, elaborate on Wasm builder" Text="This is a question that I got stuck on a couple of month ago. My questions were answered in a [disucssion with Shawn Tabrizi on GitHub](https://github.com/substrate-developer-hub/substrate-docs/issues/531), which was a big leap forward for me in understanding the architecture of substrate.&#xD;&#xA;&#xD;&#xA;## Why do we need this and in which cases would the `no_std` attribute be applied?&#xD;&#xA;&#xD;&#xA;Take a look at [Architecture](https://docs.substrate.io/v3/getting-started/architecture/) and the links therein. You'll find that a substrate node contains two version of the runtime code, the _native runtime_ and the _Wasm runtime_ (see https://en.wikipedia.org/wiki/WebAssembly). Note that the Wasm is stored _on chain_.&#xD;&#xA;&#xD;&#xA;This is done to enable forkless runtime upgrades, in which the on-chain Wasm binary is replaced with a new version (but the native binary remains unchanged). Substrate uses Wasm as it is architecture independent (the Wasm must run on machines of different architecture, after all).&#xD;&#xA;&#xD;&#xA;Now, whenever possible the faster native runtime is used to execute calls. But after a forkless runtime upgrade (in which only the Wasm updated), certain features of the native runtime may be outdated. Then the Wasm binary is used to execute the call, instead. See [Executor](https://docs.substrate.io/v3/advanced/executor/) for details.&#xD;&#xA;&#xD;&#xA;Back to the `no_std` attribute. When you build your node, the [runtime/build.rs](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/build.rs) first builds the Wasm binary (see [Build Scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html) for details on build scripts) with the `no_std` attribute. The reason for this is (again) architecture independence. Wasm cannot use the `libstd` of Rust. The _Embedded Rust Book_ puts it quite clearly:&#xD;&#xA;&#xD;&#xA;&gt; In a bare metal environment no code has been loaded before your program. Without the software provided by an OS we can not load the standard library. Instead the program, along with the crates it uses, can only use the hardware (bare metal) to run.&#xD;&#xA;&#xD;&#xA;In other words, `libstd` is OS dependent, ~~and that kind of thing doesn't fly with Wasm.~~ Apparently you can use `libstd` in Wasm, but this was rejected for a number of reasons: https://github.com/paritytech/substrate/issues/4043&#xD;&#xA;&#xD;&#xA;So, after the Wasm binary is build, the runtime is compiled again, into the native binary, this time with `std` enabled. The native binary actually contains the Wasm binary (we say that the Wasm is embedded into the native binary). This is done so that the first iteration of the Wasm binary can be copied from the native binary into the on-chain storage at genesis.&#xD;&#xA;&#xD;&#xA;The inclusion of the Wasm is one example of where a block of code is excluded from the Wasm binary (for obvious reasons, in this case):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/wasm_binary.rs&quot;));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Other than that, it doesn't seem like many projects make much use of `std` features directly, but in many of the standard dependencies you will frequently find `#[cfg(feature = &quot;std&quot;)]`, for example [frame/system](https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs). The idea is that using objects only available in `libstd` will improve the performance of the native binary.&#xD;&#xA;&#xD;&#xA;## Why would we check if the `std` feature is not being used if it is implicitly always used via the default feature?&#xD;&#xA;&#xD;&#xA;All dependencies (expect for the Wasm builder, which isn't a part of the runtime) are included using `default-features = false`, which disables this behavior (see [Cargo &gt; Features &gt; The `default` feature](https://doc.rust-lang.org/cargo/reference/features.html#the-default-feature)). For example: [runtime/Cargo.toml](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/Cargo.toml).&#xD;&#xA;&#xD;&#xA;I believe this is done for the following reason:&#xD;&#xA;&#xD;&#xA;- The Wasm builder _doesn't_ use the default feature `std`. If you don't specify `default-features = false` in the dependencies, then the dependencies use their `std` feature, and then the Wasm can't be build.&#xD;&#xA;- The &quot;normal&quot; build process (where you build the native binary) is done using the `std` feature, and you don't want to keep typing `cargo build --features=std`.&#xD;&#xA;&#xD;&#xA;But to be honest, I'm a little shaky on this last point. Maybe someone else can confirm or clarify further.&#xD;&#xA;&#xD;&#xA;## Gory Details&#xD;&#xA;&#xD;&#xA;To elaborate on point about the Wasm builder not using `std`: When looking at the source of [substrate_wasm_builder](https://crates.parity.io/src/substrate_wasm_builder/builder.rs.html), you'll find that the builder loads the runtime `Cargo.toml` and calls `wasm_project::create_and_compile` (see https://crates.parity.io/src/substrate_wasm_builder/builder.rs.html#244), which in turn filters out the `std` feature (https://crates.parity.io/src/substrate_wasm_builder/wasm_project.rs.html#314-340)." ContentLicense="CC BY-SA 4.0" />
  <row Id="4949" PostHistoryTypeId="2" PostId="1358" RevisionGUID="c7061352-8396-4539-bc5f-ce6bc463aba3" CreationDate="2022-03-29T03:19:59.370" UserId="251" Text="IIUC, once anyone of the currency drop-down below the ED then the account will be killed. And I will lose all other currencies." ContentLicense="CC BY-SA 4.0" />
  <row Id="4951" PostHistoryTypeId="1" PostId="1358" RevisionGUID="c7061352-8396-4539-bc5f-ce6bc463aba3" CreationDate="2022-03-29T03:19:59.370" UserId="251" Text="How to deal with multiple currencies ED?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4952" PostHistoryTypeId="3" PostId="1358" RevisionGUID="c7061352-8396-4539-bc5f-ce6bc463aba3" CreationDate="2022-03-29T03:19:59.370" UserId="251" Text="|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4953" PostHistoryTypeId="5" PostId="1358" RevisionGUID="95fe9b35-f829-4d3b-acd4-8443a64d75a0" CreationDate="2022-03-29T03:29:28.280" UserId="251" Comment="deleted 36 characters in body" Text="IIUC, once anyone of the currency drop-down below the ED then the account will be killed.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4954" PostHistoryTypeId="2" PostId="1359" RevisionGUID="ec1e222e-2a54-4834-8f7b-9b9ae903acde" CreationDate="2022-03-29T06:25:50.330" UserId="627" Text="I believe your confusion stems from &quot;metadata version&quot; and &quot;runtime version&quot; and what the metadata contains at a specific point of the chain.&#xD;&#xA;&#xD;&#xA;Metadata exposes all the constants, storage, extrinsics, events, errors and runtime types to the outside world. The metadata version refers to the **format** in which this data is provided. Connecting to a chain and retrieving the metadata will yield a result where the **contents** fully describes the runtime modules.&#xD;&#xA;&#xD;&#xA;- Metadata version - ecosystem-wide, a format definition&#xD;&#xA;- Runtime version - chain-specific, related to runtime features&#xD;&#xA;&#xD;&#xA;Each runtime upgrade does change the metadata contents and this stays static until the chain is upgraded again. The formatting of the way this information is provided changes relatively infrequently.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4956" PostHistoryTypeId="6" PostId="1358" RevisionGUID="6083dbb5-02fe-48cd-b845-ecfc971740b1" CreationDate="2022-03-29T06:43:48.260" UserId="85" Comment="edited tags" Text="|balances|existential-deposit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4957" PostHistoryTypeId="5" PostId="1358" RevisionGUID="6083dbb5-02fe-48cd-b845-ecfc971740b1" CreationDate="2022-03-29T06:43:48.260" UserId="85" Comment="edited tags" Text="If I understand correctly, once anyone of the currency drop-down below the ED then the account will be killed.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4958" PostHistoryTypeId="2" PostId="1360" RevisionGUID="78d27ddb-5ea7-442b-b9ea-6be090e8db62" CreationDate="2022-03-29T06:51:04.677" UserId="280" Text="You are correct that when an account's balance drops below the existential deposit, its state is removed from the storage to not bloat up the precious on-chain storage. The handling of the remaining balance is up to the runtime configuration, most projects send it to the Treasury or burn it.&#xD;&#xA;&#xD;&#xA;You could take a look at Basilisk's take on handling ED in a multi-asset environment which they presented during Sub0 2021 ([video](https://www.youtube.com/watch?v=Iz1lfVyAKQ0)). They take multiple factors such as the current price and liquidity into account to determine the ED dynamically. Moreover, they showcase an off-chain duster.&#xD;&#xA;&#xD;&#xA;A simple solution would be to map each asset `X1, ..., Xn` to a value of an asset `Y` hard-coded in the runtime and base your ED on `Y` such that the sum of all of your assets' translated values shall not fall below a certain threshold: `sum(Y(X1), ..., Y(Xn)) &gt;= ED`." ContentLicense="CC BY-SA 4.0" />
  <row Id="4960" PostHistoryTypeId="2" PostId="1361" RevisionGUID="a676170b-341f-465a-af16-99046107465c" CreationDate="2022-03-29T08:04:58.290" UserId="459" Text="Polkadot is capable of allowing you to defining the native runtimes you want included within the final node binary (with flags like `polkadot-native`, `kusama-native` and so on..). Attempting to port the ability to do something similar has resulted with an odd problem.&#xD;&#xA;&#xD;&#xA;When building with `enable-runtime-one` _or_ `enable-runtime-two` (the equivalent flags in the codebase I'm working on), the code is successfully able to compile but attempting to compile with _both_ flags seems to cause overlapping symbols.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error: symbol `AccountNonceApi_account_nonce` is already defined&#xD;&#xA;      --&gt; /src/runtime/runtime/src/runtime/lib.rs:1281:1&#xD;&#xA;       |&#xD;&#xA;  1281 | / sp_api::impl_runtime_apis! {&#xD;&#xA;  1282 | |     impl sp_api::Core&lt;Block&gt; for Runtime {&#xD;&#xA;  1283 | |         fn version() -&gt; RuntimeVersion {&#xD;&#xA;  1284 | |             VERSION&#xD;&#xA;  ...    |&#xD;&#xA;  1539 | |     }&#xD;&#xA;  1540 | | }&#xD;&#xA;       | |_^&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the macro `sp_api::impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, I don't see any deduplication between [Polkadot](https://github.com/paritytech/polkadot/blob/be005938a64b9170a5d55887ce42004e1b086b7b/runtime/polkadot/src/lib.rs#L2048), [Kusama](https://github.com/paritytech/polkadot/blob/be005938a64b9170a5d55887ce42004e1b086b7b/runtime/kusama/src/lib.rs#L1900) or [Westend](https://github.com/paritytech/polkadot/blob/be005938a64b9170a5d55887ce42004e1b086b7b/runtime/westend/src/lib.rs#L1455)'s runtime logic. I initially thought that perhaps I could deduplicate it by placing it in the common runtime but that causes more problems than solving them.&#xD;&#xA;&#xD;&#xA;How do I resolve the problem with repeating symbols (and I've tried just removing the symbol from one and keeping the other and the errors it has given me seem to indicate that it's a bad idea)&#xD;&#xA;&#xD;&#xA;As for additional information, the codebase is built upon the `polkadot-v0.9.15-1` branch using Rust stable `1.57` and WASM nightly `2021-11-29`." ContentLicense="CC BY-SA 4.0" />
  <row Id="4962" PostHistoryTypeId="1" PostId="1361" RevisionGUID="a676170b-341f-465a-af16-99046107465c" CreationDate="2022-03-29T08:04:58.290" UserId="459" Text="Attempting to build multiple runtimes, stopped by `AccountNonceApi_account_nonce` is already defined" ContentLicense="CC BY-SA 4.0" />
  <row Id="4963" PostHistoryTypeId="3" PostId="1361" RevisionGUID="a676170b-341f-465a-af16-99046107465c" CreationDate="2022-03-29T08:04:58.290" UserId="459" Text="|rust|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4964" PostHistoryTypeId="2" PostId="1362" RevisionGUID="54dcc25c-f3c1-42cc-9348-dbbb74a62e5c" CreationDate="2022-03-29T08:18:39.610" UserId="459" Text="There are two primary troubleshooting steps based off comments and messages surrounding the problem.&#xD;&#xA;&#xD;&#xA;* Ensure all your dependencies are set to the _same_ branch and tag, mismatches are known to be a cause of this problem ([source](https://github.com/substrate-developer-hub/substrate-node-template/issues/269#issuecomment-988763697))&#xD;&#xA;* It is possible that `std` is leaking into your runtime code when it shouldn't. If your runtime relies on a crate, it should be `no-std` capable. &#xD;&#xA;&#xD;&#xA;  One possible culprit can be `serde`, a dependency that _does_ have `no-std` support but can have `std` enabled by default, triggering the problem. ([source](https://github.com/paritytech/substrate/issues/2971#issuecomment-506954545)). &#xD;&#xA;&#xD;&#xA;  **This was the cause of the problem in my case and applying the patch in the comment resolved it**&#xD;&#xA;&#xD;&#xA;It might be a good idea to go through all your dependencies and ensure that &#xD;&#xA;&#xD;&#xA;  * they support `no-std` environments and &#xD;&#xA;&#xD;&#xA;  * `std` is not enabled by default (that's what `default-features = false` accomplishes) but also that `[package]/std` is added to the `std` feature within `Cargo.toml`" ContentLicense="CC BY-SA 4.0" />
  <row Id="4966" PostHistoryTypeId="2" PostId="1363" RevisionGUID="7a71e885-9ff8-44ac-bdef-5fd5aae79368" CreationDate="2022-03-29T09:06:30.167" UserId="172" Text="The metadata version is specified as an enum variant in the [`frame_metadata` crate](https://docs.substrate.io/rustdocs/latest/frame_metadata/v14/struct.RuntimeMetadataV14.html), which all runtime pallets use. When a runtime gets compiled to Wasm, the most reliable way to know its metadata information is by inspecting it.&#xD;&#xA;&#xD;&#xA;So the on-chain source of truth for which metadata version a chain is running can be found by looking at a chain's Wasm binary. You can verify this using [`subwasm`](https://github.com/chevdor/subwasm) (go [here](https://github.com/chevdor/subwasm#install) to follow instructions on installing it). For example:&#xD;&#xA;&#xD;&#xA;1. Get Polkadot's Wasm binary (replace `polkadot` with `local` if you're running a chain you want to check locally).&#xD;&#xA;```bash&#xD;&#xA;subwasm get --chain polkadot  -o polkadot.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Save the metadata in a JSON file.&#xD;&#xA;```bash&#xD;&#xA; subwasm --json meta polkadot.wasm  &gt; polkadot-metadata.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Look at the second line of `polkadot-metadata.json` you've created and you'll see the version:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;V14&quot;: {&#xD;&#xA;//--snip--&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Yes, one day this may change to V15 to add more features to the metadata system, but this is a [much bigger undertaking](https://github.com/paritytech/substrate/pull/8615) than any other kind of version bump, such as a runtime version bump which is chain-specific. Adding to Jaco's point, the versioning is more like a universal format in this way.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4968" PostHistoryTypeId="4" PostId="1356" RevisionGUID="2108f164-2583-471f-acab-1eab4c2f138b" CreationDate="2022-03-29T09:08:17.533" UserId="172" Comment="Clarified question." Text="How do I check what metadata version a chain is running?" ContentLicense="CC BY-SA 4.0" />
  <row Id="4969" PostHistoryTypeId="6" PostId="518" RevisionGUID="643fcfb2-11b8-4b8c-89a4-dfa9ced601be" CreationDate="2022-03-29T09:12:36.847" UserId="172" Comment="Add parachain tag." Text="|parachain|pov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4970" PostHistoryTypeId="2" PostId="1364" RevisionGUID="a1d6e4c6-41b9-4e00-ae86-fc295814a15b" CreationDate="2022-03-29T09:17:04.720" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4972" PostHistoryTypeId="1" PostId="1364" RevisionGUID="a1d6e4c6-41b9-4e00-ae86-fc295814a15b" CreationDate="2022-03-29T09:17:04.720" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4973" PostHistoryTypeId="2" PostId="1365" RevisionGUID="4bdd9add-609c-4d6f-a548-cb6af0fdc7b3" CreationDate="2022-03-29T09:17:04.720" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4975" PostHistoryTypeId="1" PostId="1365" RevisionGUID="4bdd9add-609c-4d6f-a548-cb6af0fdc7b3" CreationDate="2022-03-29T09:17:04.720" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4976" PostHistoryTypeId="5" PostId="1299" RevisionGUID="884f10ee-f850-4cef-8e77-03887fb37ebe" CreationDate="2022-03-29T09:47:13.487" UserId="3" Comment="Fix formatting" Text="This is a question that I got stuck on a couple of month ago. My questions were answered in a [disucssion with Shawn Tabrizi on GitHub](https://github.com/substrate-developer-hub/substrate-docs/issues/531), which was a big leap forward for me in understanding the architecture of substrate.&#xD;&#xA;&#xD;&#xA;## Why do we need this and in which cases would the `no_std` attribute be applied?&#xD;&#xA;&#xD;&#xA;Take a look at [Architecture](https://docs.substrate.io/v3/getting-started/architecture/) and the links therein. You'll find that a substrate node contains two version of the runtime code, the _native runtime_ and the _Wasm runtime_ (see https://en.wikipedia.org/wiki/WebAssembly). Note that the Wasm is stored _on chain_.&#xD;&#xA;&#xD;&#xA;This is done to enable forkless runtime upgrades, in which the on-chain Wasm binary is replaced with a new version (but the native binary remains unchanged). Substrate uses Wasm as it is architecture independent (the Wasm must run on machines of different architecture, after all).&#xD;&#xA;&#xD;&#xA;Now, whenever possible the faster native runtime is used to execute calls. But after a forkless runtime upgrade (in which only the Wasm updated), certain features of the native runtime may be outdated. Then the Wasm binary is used to execute the call, instead. See [Executor](https://docs.substrate.io/v3/advanced/executor/) for details.&#xD;&#xA;&#xD;&#xA;Back to the `no_std` attribute. When you build your node, the [runtime/build.rs](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/build.rs) first builds the Wasm binary (see [Build Scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html) for details on build scripts) with the `no_std` attribute. The reason for this is (again) architecture independence. Wasm cannot use the `libstd` of Rust. The _Embedded Rust Book_ puts it quite clearly:&#xD;&#xA;&#xD;&#xA;&gt; In a bare metal environment no code has been loaded before your program. Without the software provided by an OS we can not load the standard library. Instead the program, along with the crates it uses, can only use the hardware (bare metal) to run.&#xD;&#xA;&#xD;&#xA;In other words, `libstd` is OS dependent, and that kind of thing doesn't fly with Wasm. Apparently you can use `libstd` in Wasm, but this was rejected for a number of reasons: https://github.com/paritytech/substrate/issues/4043&#xD;&#xA;&#xD;&#xA;So, after the Wasm binary is build, the runtime is compiled again, into the native binary, this time with `std` enabled. The native binary actually contains the Wasm binary (we say that the Wasm is embedded into the native binary). This is done so that the first iteration of the Wasm binary can be copied from the native binary into the on-chain storage at genesis.&#xD;&#xA;&#xD;&#xA;The inclusion of the Wasm is one example of where a block of code is excluded from the Wasm binary (for obvious reasons, in this case):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/wasm_binary.rs&quot;));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Other than that, it doesn't seem like many projects make much use of `std` features directly, but in many of the standard dependencies you will frequently find `#[cfg(feature = &quot;std&quot;)]`, for example [frame/system](https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs). The idea is that using objects only available in `libstd` will improve the performance of the native binary.&#xD;&#xA;&#xD;&#xA;## Why would we check if the `std` feature is not being used if it is implicitly always used via the default feature?&#xD;&#xA;&#xD;&#xA;All dependencies (expect for the Wasm builder, which isn't a part of the runtime) are included using `default-features = false`, which disables this behavior (see [Cargo &gt; Features &gt; The `default` feature](https://doc.rust-lang.org/cargo/reference/features.html#the-default-feature)). For example: [runtime/Cargo.toml](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/Cargo.toml).&#xD;&#xA;&#xD;&#xA;I believe this is done for the following reason:&#xD;&#xA;&#xD;&#xA;- The Wasm builder _doesn't_ use the default feature `std`. If you don't specify `default-features = false` in the dependencies, then the dependencies use their `std` feature, and then the Wasm can't be build.&#xD;&#xA;- The &quot;normal&quot; build process (where you build the native binary) is done using the `std` feature, and you don't want to keep typing `cargo build --features=std`.&#xD;&#xA;&#xD;&#xA;But to be honest, I'm a little shaky on this last point. Maybe someone else can confirm or clarify further.&#xD;&#xA;&#xD;&#xA;## Gory Details&#xD;&#xA;&#xD;&#xA;To elaborate on point about the Wasm builder not using `std`: When looking at the source of [substrate_wasm_builder](https://crates.parity.io/src/substrate_wasm_builder/builder.rs.html), you'll find that the builder loads the runtime `Cargo.toml` and calls `wasm_project::create_and_compile` (see https://crates.parity.io/src/substrate_wasm_builder/builder.rs.html#244), which in turn filters out the `std` feature (https://crates.parity.io/src/substrate_wasm_builder/wasm_project.rs.html#314-340)." ContentLicense="CC BY-SA 4.0" />
  <row Id="4977" PostHistoryTypeId="2" PostId="1366" RevisionGUID="c2ba314d-910f-4f86-8511-d218f1c60403" CreationDate="2022-03-29T09:55:03.987" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4979" PostHistoryTypeId="1" PostId="1366" RevisionGUID="c2ba314d-910f-4f86-8511-d218f1c60403" CreationDate="2022-03-29T09:55:03.987" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4980" PostHistoryTypeId="2" PostId="1367" RevisionGUID="10bafb03-aff6-4ace-8a60-d01ced1ca579" CreationDate="2022-03-29T09:55:03.987" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4982" PostHistoryTypeId="1" PostId="1367" RevisionGUID="10bafb03-aff6-4ace-8a60-d01ced1ca579" CreationDate="2022-03-29T09:55:03.987" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4983" PostHistoryTypeId="2" PostId="1368" RevisionGUID="13e7df54-a3a9-4d5d-84e8-9c588b04645b" CreationDate="2022-03-29T09:57:52.740" UserId="167" Text="The `Store` trait, as you see, just creates some aliases, and is completely optional. &#xD;&#xA;&#xD;&#xA;For example, with this trait, you can access all of the storage items regardless of being `pub` or not as associated type `Pallet`. Although, in FRAME v2 all storage items have to be `pub(crate)` at the minimum, and I think the `Store` trait only exists in FRAME v2 for backwards compatibility and will likely be removed in further versions. " ContentLicense="CC BY-SA 4.0" />
  <row Id="4985" PostHistoryTypeId="2" PostId="1369" RevisionGUID="fe04d352-d394-4fe0-9f1b-0e719379a2b1" CreationDate="2022-03-29T10:02:32.510" UserId="32" Text="When building an app with substrate connect, it will detect whether the user has the extension and use it, or create the WASM light client in-page for them.&#xD;&#xA;&#xD;&#xA;For instance, after opening https://polkadot.js.org/apps/#/explorer you have an option to switch to light client&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;If the connection is successful, you should see it under the networks tab &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TPJ9k.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/29yf3.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4987" PostHistoryTypeId="2" PostId="1370" RevisionGUID="1d6bf5d0-98bf-47a6-857a-865191bd197a" CreationDate="2022-03-29T10:03:59.383" UserId="180" Text="I am developing a Pallet and I defined this type:&#xD;&#xA;&#xD;&#xA;    type BalanceOf&lt;T&gt; =&#xD;&#xA;    		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;and my question is how to add value of this `tmp` value with input amount:&#xD;&#xA;&#xD;&#xA;    let mut tmp:BalanceOf&lt;T&gt;;&#xD;&#xA;    pub fn mint(&#xD;&#xA;    			owner: &amp;T::AccountId,&#xD;&#xA;    			amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    		) -&gt; Result&lt;[u8; 3], DispatchError&gt; {&#xD;&#xA;       // How to increase tmp value with input amount&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="4989" PostHistoryTypeId="1" PostId="1370" RevisionGUID="1d6bf5d0-98bf-47a6-857a-865191bd197a" CreationDate="2022-03-29T10:03:59.383" UserId="180" Text="Increase variable value of Balance&lt;T&gt; type" ContentLicense="CC BY-SA 4.0" />
  <row Id="4990" PostHistoryTypeId="3" PostId="1370" RevisionGUID="1d6bf5d0-98bf-47a6-857a-865191bd197a" CreationDate="2022-03-29T10:03:59.383" UserId="180" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="4991" PostHistoryTypeId="5" PostId="1369" RevisionGUID="be6cf1fe-e11e-4181-8aa3-16a00b34cfaf" CreationDate="2022-03-29T10:08:43.627" UserId="32" Comment="added 76 characters in body" Text="&#xD;&#xA;&#xD;&#xA;Apps that are built with substrate connect compatibility will detect whether the user has the extension and use it, or create the WASM light client in-page for them.&#xD;&#xA;&#xD;&#xA;For instance, Polkadot, Kusama and Westend can be accessed through Substrate Connect. After opening https://polkadot.js.org/apps/#/explorer you have an option to switch to light client&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;If the connection is successful, you should see it under the networks tab &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TPJ9k.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/29yf3.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="4992" PostHistoryTypeId="2" PostId="1371" RevisionGUID="01465a92-0545-4dd9-95bc-28905ab37ffe" CreationDate="2022-03-29T10:12:11.173" UserId="1861" Text="This was partially only a logging issue, that logged this in the collator protocol subsystem.&#xD;&#xA;&#xD;&#xA;The issue of fluctuating block times is a known issue and is planned to be fixed with the v0.9.19 release (at the time of writing)." ContentLicense="CC BY-SA 4.0" />
  <row Id="4994" PostHistoryTypeId="2" PostId="1372" RevisionGUID="fbb645d6-30cb-4d2f-bd6c-01cc8f5ffc46" CreationDate="2022-03-29T10:13:54.723" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4996" PostHistoryTypeId="1" PostId="1372" RevisionGUID="fbb645d6-30cb-4d2f-bd6c-01cc8f5ffc46" CreationDate="2022-03-29T10:13:54.723" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="4997" PostHistoryTypeId="2" PostId="1373" RevisionGUID="bb5190a1-fc65-47b3-975f-2a530ebd5cfc" CreationDate="2022-03-29T10:13:54.723" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="4999" PostHistoryTypeId="1" PostId="1373" RevisionGUID="bb5190a1-fc65-47b3-975f-2a530ebd5cfc" CreationDate="2022-03-29T10:13:54.723" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5000" PostHistoryTypeId="5" PostId="1369" RevisionGUID="369d3295-8579-44e8-abea-c29a758f8751" CreationDate="2022-03-29T10:19:49.743" UserId="32" Comment="added 51 characters in body" Text="&#xD;&#xA;&#xD;&#xA;Apps that are built with substrate connect compatibility will detect whether the user has the extension and use it, or create the WASM light client in-page for them.&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate-connect/&#xD;&#xA;&#xD;&#xA;For instance, Polkadot, Kusama and Westend can be accessed through Substrate Connect. After opening https://polkadot.js.org/apps/#/explorer you have an option to switch to light client&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;If the connection is successful, you should see it under the networks tab &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TPJ9k.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/29yf3.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5001" PostHistoryTypeId="2" PostId="1374" RevisionGUID="aa872b32-9366-4ce1-aa19-e1c58a913b0e" CreationDate="2022-03-29T10:29:41.610" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5003" PostHistoryTypeId="1" PostId="1374" RevisionGUID="aa872b32-9366-4ce1-aa19-e1c58a913b0e" CreationDate="2022-03-29T10:29:41.610" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5004" PostHistoryTypeId="2" PostId="1375" RevisionGUID="f9628e7d-86a3-4b69-ab24-fb3b1c28f04b" CreationDate="2022-03-29T10:29:41.610" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5006" PostHistoryTypeId="1" PostId="1375" RevisionGUID="f9628e7d-86a3-4b69-ab24-fb3b1c28f04b" CreationDate="2022-03-29T10:29:41.610" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5007" PostHistoryTypeId="2" PostId="1376" RevisionGUID="4745a706-ec5c-4697-b749-6519054f77be" CreationDate="2022-03-29T10:33:30.000" UserId="53" Text="There is a `Saturating` math trait in the arithmetic primitives - you can use that:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use sp_arithmetic::traits::Saturating;&#xD;&#xA;tmp.saturating_accrue(amount);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can also use `AddAssign` or `CheckedAdd` traits if you either don't care about overflow(!) or want to handle it other than by saturating.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5009" PostHistoryTypeId="5" PostId="1371" RevisionGUID="561b8b3a-dca5-4f35-963b-8c2b9b75ffea" CreationDate="2022-03-29T10:38:16.660" UserId="1861" Comment="added 55 characters in body" Text="This was partially only a logging issue, that logged this in the collator protocol in _some_ occassions where it should not have logged the message.&#xD;&#xA;&#xD;&#xA;The issue of fluctuating block times is a known issue and is planned to be fixed with the v0.9.19 release (at the time of writing)." ContentLicense="CC BY-SA 4.0" />
  <row Id="5010" PostHistoryTypeId="4" PostId="1311" RevisionGUID="f6d45bc0-6184-433a-9de9-a2c2a3be7bc3" CreationDate="2022-03-29T11:12:59.307" UserId="1937" Comment="fix spelling" Text="What optimizations and programing paradigms make the most impact in FRAME Runtime development?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5011" PostHistoryTypeId="24" PostId="1311" RevisionGUID="f6d45bc0-6184-433a-9de9-a2c2a3be7bc3" CreationDate="2022-03-29T11:12:59.307" Comment="Proposed by 1937 approved by 85, 34 edit id of 116" ContentLicense="CC BY-SA 4.0" />
  <row Id="5012" PostHistoryTypeId="2" PostId="1377" RevisionGUID="3e77c4d9-7850-4225-9c98-6e14e9ba7748" CreationDate="2022-03-29T11:26:33.020" UserId="360" Text="Substrate-api-client doesn't aim at reverse compatibility. Therefore you may need to work with an older revision if you need legacy metadata. Or upgrade the node and/or runtime you're talking to if you can" ContentLicense="CC BY-SA 4.0" />
  <row Id="5014" PostHistoryTypeId="2" PostId="1378" RevisionGUID="9d5c458a-d53e-48a8-95fc-68735aaae3ad" CreationDate="2022-03-29T11:35:57.630" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5016" PostHistoryTypeId="1" PostId="1378" RevisionGUID="9d5c458a-d53e-48a8-95fc-68735aaae3ad" CreationDate="2022-03-29T11:35:57.630" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5017" PostHistoryTypeId="2" PostId="1379" RevisionGUID="b572d97a-7ad0-49c0-a5fd-064031566fdc" CreationDate="2022-03-29T11:35:57.630" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5019" PostHistoryTypeId="1" PostId="1379" RevisionGUID="b572d97a-7ad0-49c0-a5fd-064031566fdc" CreationDate="2022-03-29T11:35:57.630" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5020" PostHistoryTypeId="5" PostId="869" RevisionGUID="6675bd12-d1ce-423f-8a20-7e704e66e2ce" CreationDate="2022-03-29T12:14:31.127" UserId="83" Comment="make response generic" Text="Create a pull request into Polkadot. js Apps like a prospective parachain did [here][1]. It will appear when the maintainer of that repository creates a new release (after your pull request is approved and merged).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/pull/7118" ContentLicense="CC BY-SA 4.0" />
  <row Id="5021" PostHistoryTypeId="5" PostId="1010" RevisionGUID="09ee689d-21d9-41e0-bc91-885479406a7d" CreationDate="2022-03-29T12:17:51.443" UserId="83" Comment="update generic answer" Text="* [orml-oracle][1] pallet template from the Open Runtime Module Library (ORML), which is a community maintained collection of Substrate runtime modules, shows the foundations of how to create an oracle to make off-chain data available on-chain using off-chain workers.&#xD;&#xA;&#xD;&#xA;* [substrate-price-oracle][2] by Shawn Tabrizi shows specifically how to create an oracle that fetches off-chain price data and stores it on-chain using offchain workers. &#xD;&#xA;&#xD;&#xA;* [pallet-chainlink-feed][3] by Chainlink is a more complex example of how to create an oracle that fetches off-chain price data and interacts with a seperate token pallet for separation of concerns.&#xD;&#xA;&#xD;&#xA;* [example-offchain-worker][5] pallet and numerous online tutorials with Tomasz Drwięga show how to use an oracle to fetch data from an external API using off-chain workers and store it on-chain. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/open-web3-stack/open-runtime-module-library/tree/master/oracle&#xD;&#xA;  [2]: https://github.com/shawntabrizi/substrate-price-oracle/blob/master/src/lib.rs&#xD;&#xA;  [3]: https://github.com/smartcontractkit/chainlink-polkadot/pull/44/files&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/tree/master/frame/examples/offchain-worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="5022" PostHistoryTypeId="2" PostId="1380" RevisionGUID="152774f3-209a-48b8-89e9-c3cd11a4297e" CreationDate="2022-03-29T12:39:39.300" UserId="1866" Text="I believe Jaco and Sacha explained the &quot;content&quot; concept quite nicely. &#xD;&#xA;&#xD;&#xA;If you wish to only use the JS UI to query, you can do the following making RPC calls (the lazy version of cli tools) -&#xD;&#xA;&#xD;&#xA;Metadata version -&#xD;&#xA;&#xD;&#xA;[![getMetadata][1]][1]&#xD;&#xA;&#xD;&#xA;Runtime version -&#xD;&#xA;&#xD;&#xA;[![getRuntimeVersion][2]][2]&#xD;&#xA;&#xD;&#xA;All queries in the above UI under chain state &amp; extrinsics is decorated by the metadata content.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DIrj1.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/EEwo8.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="5024" PostHistoryTypeId="2" PostId="1381" RevisionGUID="d09a81f8-0fe2-4db4-8ade-948170e92008" CreationDate="2022-03-29T12:57:22.150" UserId="716" Text="How would I track the token issuance of a parachain, using either the polkadot api or on-chain data?  Does anyone have a simple example?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5026" PostHistoryTypeId="1" PostId="1381" RevisionGUID="d09a81f8-0fe2-4db4-8ade-948170e92008" CreationDate="2022-03-29T12:57:22.150" UserId="716" Text="How to track token issuance" ContentLicense="CC BY-SA 4.0" />
  <row Id="5027" PostHistoryTypeId="3" PostId="1381" RevisionGUID="d09a81f8-0fe2-4db4-8ade-948170e92008" CreationDate="2022-03-29T12:57:22.150" UserId="716" Text="|parachain|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5028" PostHistoryTypeId="2" PostId="1382" RevisionGUID="9de0805d-50d0-4a36-945a-000104718156" CreationDate="2022-03-29T12:59:01.363" UserId="1949" Text="This question came to the forefront after reading the question about [the connect extension](https://substrate.stackexchange.com/questions/1357/how-do-i-connect-to-a-network-using-substrate-connect) and the usage thereof on live networks. &#xD;&#xA;&#xD;&#xA;From the comments it is apparent that I can use the JS API to connect (since the apps UI can do it), so my question is how do I set this up? Which packages do I need in addition to the API and how do I wire it up?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5030" PostHistoryTypeId="1" PostId="1382" RevisionGUID="9de0805d-50d0-4a36-945a-000104718156" CreationDate="2022-03-29T12:59:01.363" UserId="1949" Text="Substrate connect &amp; JS API" ContentLicense="CC BY-SA 4.0" />
  <row Id="5031" PostHistoryTypeId="3" PostId="1382" RevisionGUID="9de0805d-50d0-4a36-945a-000104718156" CreationDate="2022-03-29T12:59:01.363" UserId="1949" Text="|polkadot|kusama|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5032" PostHistoryTypeId="2" PostId="1383" RevisionGUID="413e9416-8ef8-4699-9254-96d3ee34a6f8" CreationDate="2022-03-29T13:02:33.167" UserId="1949" Text="It is exposed in the state under `balances.totalIssuance`, so the following will work -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const total = await api.query.balances.totalIssuance();&#xD;&#xA;&#xD;&#xA;console.log(total.toString());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For the parachain connect to the parachain wss endpoint, for the relay chain connect to the relay wss endpoint." ContentLicense="CC BY-SA 4.0" />
  <row Id="5034" PostHistoryTypeId="2" PostId="1384" RevisionGUID="df16d9a7-708e-48dc-83dd-d904511df6fa" CreationDate="2022-03-29T13:46:38.857" UserId="627" Text="As of the [latest API release](https://github.com/polkadot-js/api/releases/tag/v7.14.1) this week, the `ScProvider` is actually exported in the `@polkadot` packages. To take advantage of it, ensure that you have at least `@polkadot/api` 7.14.3 installed.&#xD;&#xA;&#xD;&#xA;(Prior to this release, you could access the provider via the `@substrate/connect` package - the use is slightly different, but nicely [documented](https://github.com/paritytech/substrate-connect/tree/main/packages/connect) by the team)&#xD;&#xA;&#xD;&#xA;Assuming you have a latest API, you could do the following -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// important: Only ESM is currently supported for&#xD;&#xA;// substrate-connect (either in Node or the browser),&#xD;&#xA;// so always use `import`, not `require`&#xD;&#xA;import { ApiPromise } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;// the ScProvider import is via a sub-path&#xD;&#xA;import { ScProvider } from '@polkadot/rpc-provider/substrate-connect';&#xD;&#xA;&#xD;&#xA;// do magic :)&#xD;&#xA;async function main () {&#xD;&#xA;  // create a provider, point it to Polkadot&#xD;&#xA;  const provider = new ScProvider('polkadot');&#xD;&#xA;&#xD;&#xA;  // the ScProvider doesn't connect automatically&#xD;&#xA;  await provider.connect();&#xD;&#xA;&#xD;&#xA;  // create an API&#xD;&#xA;  const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;  // follow new heads&#xD;&#xA;  api.rpc.chain.subscribeNewHeads((h) =&gt;&#xD;&#xA;    console.log(`\n--- ${h.number.unwrap().toString()}\n`)&#xD;&#xA;  );&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`console.log` above is not quite the _best_ solution since the `ScProvider` logs all sync details, however the intent of the above is to show you how to wire it up. If you do decide to run it in Node via the commandline and _just_ want the blockNumber outputs, run it via `node ./sc.mjs | grep &quot;^---&quot;`. However seeing it run and sync is quite a lot of fun...&#xD;&#xA;&#xD;&#xA;(And if you run it under Node, add `main().catch(() =&gt; process.exit(-1));` at the bottom of the script - the entry point needs to be called from somewhere...)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5038" PostHistoryTypeId="2" PostId="1385" RevisionGUID="f6b33ebf-de44-42f3-b563-005958825223" CreationDate="2022-03-29T14:12:14.000" UserId="1984" Text="The [Polkadot Wiki states][1] that &#xD;&#xA;&#xD;&#xA;&gt; If you do not see &quot;Accounts &gt; Teleport&quot; in PolkadotJS Apps, the source chain that you have selected does not support teleportation yet. As of June 2021, unsupported chains include Polkadot mainnet, Rococo testnet, and their respective parachains.&#xD;&#xA;&#xD;&#xA;Looking at Kusama, I also only see two parachains in the PolkadotJS Apps dropdown menu to teleport KSM to, and from those two parachains I can only teleport to Kusama. &#xD;&#xA;&#xD;&#xA;Will I eventually be able to teleport between parachains, or is it always relay chain &lt;-&gt; parachain? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-teleport#troubleshooting" ContentLicense="CC BY-SA 4.0" />
  <row Id="5040" PostHistoryTypeId="1" PostId="1385" RevisionGUID="f6b33ebf-de44-42f3-b563-005958825223" CreationDate="2022-03-29T14:12:14.000" UserId="1984" Text="Will I eventually be able to teleport assets between parachains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5041" PostHistoryTypeId="3" PostId="1385" RevisionGUID="f6b33ebf-de44-42f3-b563-005958825223" CreationDate="2022-03-29T14:12:14.000" UserId="1984" Text="|xcm|teleport|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5042" PostHistoryTypeId="2" PostId="1386" RevisionGUID="35ad695a-c30a-48ec-852a-6de44ee94222" CreationDate="2022-03-29T14:43:50.833" UserId="620" Text="There are two questions in here, one related to trust between chains and the other related to the message transport protocol.&#xD;&#xA;&#xD;&#xA;First, the use of teleportation has to do with how much two chains trust each other, and not the message path (Relay &lt;-&gt; para vs. para &lt;-&gt; para). You will be able to teleport between parachains, as long as they have a trusted relationship. For chains that don't have a trusted relationship, they use reserve backed asset transfers. For a high level difference, check out [Gav's article](https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392) on XCM. To get more in the weeds, the [XCM v2 spec](https://github.com/paritytech/xcm-format/tree/v2#initiateteleport) has more formal definitions.&#xD;&#xA;&#xD;&#xA;Second, all messages currently go through the Relay Chain using XCMP-lite (aka HRMP). Once XCMP is fully implemented, channels will indeed be directly between parachains, and they would use teleportation or reserve backed transfer depending on their trust relationship.&#xD;&#xA;&#xD;&#xA;Finally, regarding Polkadot vs. Kusama, XCM has currently mostly been used on Kusama (with the exception of upgrade messages from the Relay Chain to Shell/Statemint). We expect this functionality to come to Polkadot in one of the next releases." ContentLicense="CC BY-SA 4.0" />
  <row Id="5044" PostHistoryTypeId="5" PostId="1066" RevisionGUID="a0456327-3af8-4440-99f0-93a46b90b6d3" CreationDate="2022-03-29T15:12:37.840" UserId="1838" Comment="added 271 characters in body; edited tags" Text="If I have started running a Substrate node but the `ss58Format` value in the chain specification .json file that is generated from using the `build-spec` command is not `42`, how do I update the chain so its SS58 Format is 42? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;20220329 add:&#xD;&#xA;&gt; i have updated system's SS58Prefix(set SS58Prefix=42), but the ss58Format  from rpc's response is not 42&#xD;&#xA;&#xD;&#xA;how to update rpc's ss58Format?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const res = await api.rpc.system.properties()&#xD;&#xA;console.log(res)&#xD;&#xA;&#xD;&#xA;# ss58Format is not 42. &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5045" PostHistoryTypeId="6" PostId="1066" RevisionGUID="a0456327-3af8-4440-99f0-93a46b90b6d3" CreationDate="2022-03-29T15:12:37.840" UserId="1838" Comment="added 271 characters in body; edited tags" Text="|rpc|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5046" PostHistoryTypeId="5" PostId="1066" RevisionGUID="67fa3d31-c53b-4adf-9a8f-2f9f37955eb3" CreationDate="2022-03-29T15:18:45.790" UserId="1838" Comment="added 271 characters in body; edited tags" Text="If I have started running a Substrate node but the `ss58Format` value in the chain specification .json file that is generated from using the `build-spec` command is not `42`, how do I update the chain so its SS58 Format is 42? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;20220329 add:&#xD;&#xA;&gt; i have updated system's SS58Prefix(set SS58Prefix=42),and upgrade wasm, but the ss58Format  from rpc's response is not 42&#xD;&#xA;&#xD;&#xA;how to update rpc's ss58Format?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const res = await api.rpc.system.properties()&#xD;&#xA;console.log(res)&#xD;&#xA;&#xD;&#xA;# ss58Format is not 42. &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5047" PostHistoryTypeId="5" PostId="1356" RevisionGUID="3c30a005-a15a-4e95-b5fd-96b2779164be" CreationDate="2022-03-29T15:36:51.273" UserId="1970" Comment="Clarified." Text="I'm quite new at this, but I'm having trouble understanding the &quot;metadata version&quot;. &#xD;&#xA;&#xD;&#xA;My confusion stems from the fact that I know that Polkadot/Kusama has upgraded to v14 a while back, but I don't see the runtime version on-chain reflecting that. The same with chains from the Acala team, they are v14 chains, but in this case the runtime version number I can see if very far away from that and what is on Polkadot and Kusama.&#xD;&#xA;&#xD;&#xA;Am I missing something basic? How does the runtime relate to the metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5049" PostHistoryTypeId="6" PostId="1381" RevisionGUID="257172c1-2d32-4b57-a0bb-a60bb80e8dfb" CreationDate="2022-03-29T15:39:31.273" UserId="85" Comment="edited tags" Text="|parachain|polkadot-js|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5051" PostHistoryTypeId="2" PostId="1387" RevisionGUID="591c7aae-b966-42b7-86f8-7abb1a9df0d7" CreationDate="2022-03-29T15:52:29.317" UserId="139" Text="Here's what I am making: A pallet which &quot;reserves&quot; or &quot;locks&quot; some funds, incrementally each time a function `X` is called from an account. If I call `X`, 10 times, and my deposit fee is 100 tokens, I expect 1000 tokens to be &quot;bonded&quot; by the end of the transaction(s). For this I need some checks in place and here's what I came up with:&#xD;&#xA;&#xD;&#xA; 1. Their free balance &gt; deposit, 100 tokens in this case&#xD;&#xA; 2. If they already have some deposit, say 400 tokens are bonded from this account, go ahead and bond 100 more, making the total 500 tokens.&#xD;&#xA;3. Create a function unreserve that when called, could unreserve an arbitrary amount from their bonded tokens so far.&#xD;&#xA;&#xD;&#xA;I've considered, `NamedReservableCurrency`, `LockableCurrency` and `ReservableCurrency`, and I am debating which one should I go for. &#xD;&#xA;&#xD;&#xA;I've also thought of maintaining a map from `AccountId` to `Balance` in which the map deals with the bond amount, and I simply call `extend_lock` from `LockableCurrency` to extend the bonded amount. &#xD;&#xA;&#xD;&#xA;Which one among the three that I've listed fits better to this purpose and why?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5053" PostHistoryTypeId="1" PostId="1387" RevisionGUID="591c7aae-b966-42b7-86f8-7abb1a9df0d7" CreationDate="2022-03-29T15:52:29.317" UserId="139" Text="Is ReservableCurrency or LockableCurrency a better fit for incremental bonding?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5054" PostHistoryTypeId="3" PostId="1387" RevisionGUID="591c7aae-b966-42b7-86f8-7abb1a9df0d7" CreationDate="2022-03-29T15:52:29.317" UserId="139" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5055" PostHistoryTypeId="2" PostId="1388" RevisionGUID="5e855ca7-5bbf-45b9-ab8b-b343c604dc26" CreationDate="2022-03-29T15:54:45.713" UserId="1991" Text="I want to integrate DOT into app based on React Native. There is a problem with a connection to the Browser environment: ReferenceError: Can't find variable: document.&#xD;&#xA;A few more details:&#xD;&#xA;- the issues with the webassembly were solved using asmjs&#xD;&#xA;- the issue that remains is the linking to the browser environment: ReferenceError: Can’t find variable: document&#xD;&#xA;there were also problems with the environment for other coins but they have been successfully mocked with rn-nodeify &#xD;&#xA;This is the list of Dot libraries requiring browser environment:&#xD;&#xA;&#xD;&#xA;“@polkadot/api”: “7.4.1&quot;,&#xD;&#xA;“@polkadot/util-crypto”: “8.3.2&quot;,&#xD;&#xA;“@polkadot/x-randomvalues”: “8.3.2&quot;&#xD;&#xA;&#xD;&#xA;What should I do?&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="5057" PostHistoryTypeId="1" PostId="1388" RevisionGUID="5e855ca7-5bbf-45b9-ab8b-b343c604dc26" CreationDate="2022-03-29T15:54:45.713" UserId="1991" Text="How to connect to the browser environment (for DOT libs)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5058" PostHistoryTypeId="3" PostId="1388" RevisionGUID="5e855ca7-5bbf-45b9-ab8b-b343c604dc26" CreationDate="2022-03-29T15:54:45.713" UserId="1991" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5059" PostHistoryTypeId="2" PostId="1389" RevisionGUID="b0c9944b-513b-4dda-8950-954ffa5176db" CreationDate="2022-03-29T15:59:00.653" UserId="1989" Text="The actors in my pallet are identified by the tuple `(AccountId, CurrencyId)` which requires most extrinsics to specify the `CurrencyId` enum as a separate argument.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;```rust&#xD;&#xA;    #[pallet::weight(&lt;T as Config&gt;::WeightInfo::register())]&#xD;&#xA;    #[transactional]&#xD;&#xA;    pub fn register(&#xD;&#xA;        origin: OriginFor&lt;T&gt;,&#xD;&#xA;        currency_id: T::CurrencyId,&#xD;&#xA;    ) -&gt; DispatchResult {&#xD;&#xA;        let account_id = ensure_signed(origin)?;&#xD;&#xA;        let actor_id = ActorId::new(account_id, currency_id);&#xD;&#xA;        ...&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is it possible to define a custom `Origin` such that `ensure_signed(origin)?` returns the pre-constructed tuple?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5061" PostHistoryTypeId="1" PostId="1389" RevisionGUID="b0c9944b-513b-4dda-8950-954ffa5176db" CreationDate="2022-03-29T15:59:00.653" UserId="1989" Text="Is it possible to define a custom origin in my pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5062" PostHistoryTypeId="3" PostId="1389" RevisionGUID="b0c9944b-513b-4dda-8950-954ffa5176db" CreationDate="2022-03-29T15:59:00.653" UserId="1989" Text="|pallet|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5063" PostHistoryTypeId="2" PostId="1390" RevisionGUID="a815004c-7457-41c7-ae67-53efb26e74b0" CreationDate="2022-03-29T16:15:04.963" UserId="283" Text="You can add and create custom origins in pallets.&#xD;&#xA;&#xD;&#xA;In your pallet, you define the origin type.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {}&#xD;&#xA;&#xD;&#xA;	/// Origin for the parachains.&#xD;&#xA;	#[pallet::origin]&#xD;&#xA;	#[derive(PartialEq, Eq, Clone, Encode, Decode, sp_core::RuntimeDebug, scale_info::TypeInfo)]&#xD;&#xA;	pub enum Origin {&#xD;&#xA;		/// Custom Origin type.&#xD;&#xA;		CustomOrigin(InternalStruct),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// This is an analogue of `ensure_signed` for the custom origin type.&#xD;&#xA;pub fn ensure_custom_origin&lt;OuterOrigin&gt;(o: OuterOrigin) -&gt; result::Result&lt;InternalStruct, BadOrigin&gt;&#xD;&#xA;where&#xD;&#xA;	OuterOrigin: Into&lt;result::Result&lt;Origin, OuterOrigin&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	match o.into() {&#xD;&#xA;		Ok(Origin::Custom(internal)) =&gt; Ok(internal),&#xD;&#xA;		_ =&gt; Err(BadOrigin),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then you can integrate this in `construct_runtime!` to add your custom origin type to the overarching runtime origin.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;construct_runtime! {&#xD;&#xA;    pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = OpaqueBlock,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;        // .. other pallets&#xD;&#xA;        CustomOriginPallet: custom_origin_pallet::{Pallet, Origin},&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Per your question about whether you can create a custom origin which modifies the behavior of `ensure_signed`, the answer is 'no'. `ensure_signed` only accepts origins of the form `frame_system::RawOrigin::Signed(AccountId)`." ContentLicense="CC BY-SA 4.0" />
  <row Id="5065" PostHistoryTypeId="5" PostId="869" RevisionGUID="ff39501e-b2d4-4f77-a24e-7b8d778f4292" CreationDate="2022-03-29T16:16:59.967" UserId="83" Comment="fix gap" Text="Create a pull request into Polkadot.js Apps like a prospective parachain did [here][1]. It will appear when the maintainer of that repository creates a new release (after your pull request is approved and merged).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/pull/7118" ContentLicense="CC BY-SA 4.0" />
  <row Id="5066" PostHistoryTypeId="6" PostId="1388" RevisionGUID="2bb44aee-9aab-4501-9ffd-b815b6a0f0fb" CreationDate="2022-03-29T16:54:01.263" UserId="627" Comment="edited tags" Text="|polkadot|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5067" PostHistoryTypeId="2" PostId="1391" RevisionGUID="ffaaa770-69f2-4bf5-8f98-8c3d8db88134" CreationDate="2022-03-29T17:08:54.170" UserId="627" Text="Take a look at this [`@polkadot/api` issue](https://github.com/polkadot-js/api/issues/4577). Basically the poster had the same question.&#xD;&#xA;&#xD;&#xA;In this case it led to [an enhancement](https://github.com/polkadot-js/api/pull/4578) making the derives augmentable (usage in this link to the PR) and that went out into the wild as part of the [7.9.1 release](https://github.com/polkadot-js/api/releases/tag/v7.9.1)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5069" PostHistoryTypeId="6" PostId="215" RevisionGUID="ff9ced2f-93c1-41c7-b8d0-1690466828c6" CreationDate="2022-03-29T17:11:50.557" UserId="627" Comment="edited tags" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5070" PostHistoryTypeId="5" PostId="1391" RevisionGUID="e3cbabcf-eda1-4eb9-916a-256d1d35d705" CreationDate="2022-03-29T17:20:52.117" UserId="627" Comment="Previous link in comment." Text="Take a look at this [`@polkadot/api` issue](https://github.com/polkadot-js/api/issues/4577). Basically the poster had the same question.&#xD;&#xA;&#xD;&#xA;In this case it led to [an enhancement](https://github.com/polkadot-js/api/pull/4578) making the derives augmentable (usage below copied from this PR) and that went out into the wild as part of the [7.9.1 release](https://github.com/polkadot-js/api/releases/tag/v7.9.1)&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// augmentDerives.ts&#xD;&#xA;import type { Observable } from 'rxjs';&#xD;&#xA;&#xD;&#xA;declare module '@polkadot/api-derive/derive' {&#xD;&#xA;  // extend, add our custom section&#xD;&#xA;  export interface ExactDerive {&#xD;&#xA;    customPallet: {&#xD;&#xA;      someMethod: ReturnType&lt;() =&gt; () =&gt; Observable&lt;number[]&gt;&gt;&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;EDIT: Giving credit where credit is due - @RosaryBeads did mention the exact same link in a comment above, I didn't see it when posting this... Keeping it here since my expansion on the usage as well as version adds enough additional context.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5071" PostHistoryTypeId="33" PostId="990" RevisionGUID="031a8afe-5f85-4335-924d-2fdbad983bff" CreationDate="2022-03-29T17:33:15.933" UserId="139" Comment="3" />
  <row Id="5072" PostHistoryTypeId="2" PostId="1392" RevisionGUID="bbe453d0-80db-4d59-95b8-4eb4d62d5c07" CreationDate="2022-03-29T18:24:54.647" UserId="554" Text="I am trying to run the frontier-node-template:https://github.com/substrate-developer-hub/frontier-node-template/ &lt;br&gt;&#xD;&#xA;But it gives an error as shown below. I tried to change the&lt;br&gt; &#xD;&#xA;rustup default nightly-2021-11-12&lt;br&gt;&#xD;&#xA;rustup override set nightly-2021-11-12&lt;br&gt;&#xD;&#xA;rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-12&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&lt;code&gt;&#xD;&#xA;error[E0308]: mismatched types                                                                                                                                                         &#xD;&#xA;   --&gt; C:\Users\msi\.cargo\registry\src\github.com-1ecc6299db9ec823\parity-db-0.3.1\src\index.rs:502:3&#xD;&#xA;    |&#xD;&#xA;501 |     fn madvise_random(&amp;self, _map: &amp;mut memmap2::MmapMut) {&#xD;&#xA;    |                                                           - expected `()` because of default return type&#xD;&#xA;502 |         Ok(())&#xD;&#xA;    |         ^^^^^^- help: consider using a semicolon here: `;`&#xD;&#xA;    |         |&#xD;&#xA;    |         expected `()`, found enum `std::result::Result`&#xD;&#xA;    |&#xD;&#xA;    = note: expected unit type `()`&#xD;&#xA;                    found enum `std::result::Result&lt;(), _&gt;`&#xD;&#xA;&#xD;&#xA;   Compiling cid v0.6.1&#xD;&#xA;   Compiling zstd v0.6.1+zstd.1.4.9&#xD;&#xA;For more information about this error, try `rustc --explain E0308`.                                                                                                                    &#xD;&#xA;error: could not compile `parity-db` due to previous error                                                                                                                             &#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&lt;/code&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5074" PostHistoryTypeId="1" PostId="1392" RevisionGUID="bbe453d0-80db-4d59-95b8-4eb4d62d5c07" CreationDate="2022-03-29T18:24:54.647" UserId="554" Text="Frontier-node-template giving error" ContentLicense="CC BY-SA 4.0" />
  <row Id="5075" PostHistoryTypeId="3" PostId="1392" RevisionGUID="bbe453d0-80db-4d59-95b8-4eb4d62d5c07" CreationDate="2022-03-29T18:24:54.647" UserId="554" Text="|frontier|frontier-node-template|frontier-workshop|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5076" PostHistoryTypeId="2" PostId="1393" RevisionGUID="309c018c-6e9d-443d-abb2-a6e2e1184b82" CreationDate="2022-03-29T19:06:23.990" UserId="1760" Text="I've successfully submitted the extrinsic RPC call and got a JSON response&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;result&quot;: &quot;0x715b0b0d105920a928ad005bd525a68d6b8b60e73afa043174fe0db2f7133db8&quot;,&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Knowing the transaction hash, how can I know whether the extrinsic got accepted or rejected by the network. Is there a way to see the error code in case of rejection? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="5078" PostHistoryTypeId="1" PostId="1393" RevisionGUID="309c018c-6e9d-443d-abb2-a6e2e1184b82" CreationDate="2022-03-29T19:06:23.990" UserId="1760" Text="Getting extrinsic data with the transaction hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="5079" PostHistoryTypeId="3" PostId="1393" RevisionGUID="309c018c-6e9d-443d-abb2-a6e2e1184b82" CreationDate="2022-03-29T19:06:23.990" UserId="1760" Text="|extrinsic|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5080" PostHistoryTypeId="2" PostId="1394" RevisionGUID="77e8fea7-3ba1-41e5-b070-af8b35d19e23" CreationDate="2022-03-29T19:56:14.980" UserId="360" Text="It is a common problem that the launch of parachains on a live relay chain is tricky and hard to debug because relaychain validator logs are not easily available.&#xD;&#xA;&#xD;&#xA;What can go wrong with parachain launches in general?&#xD;&#xA;Why does a parachain block production stall at a later stage?&#xD;&#xA;&#xD;&#xA;What checklist to follow before asking for support?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5082" PostHistoryTypeId="1" PostId="1394" RevisionGUID="77e8fea7-3ba1-41e5-b070-af8b35d19e23" CreationDate="2022-03-29T19:56:14.980" UserId="360" Text="Our parachain doesn't produce blocks [checklist]" ContentLicense="CC BY-SA 4.0" />
  <row Id="5083" PostHistoryTypeId="3" PostId="1394" RevisionGUID="77e8fea7-3ba1-41e5-b070-af8b35d19e23" CreationDate="2022-03-29T19:56:14.980" UserId="360" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5084" PostHistoryTypeId="2" PostId="1395" RevisionGUID="31180e86-cb4b-4b6f-9854-1f004e32aadb" CreationDate="2022-03-29T19:56:14.980" UserId="360" Text="The following checklist should help avoiding the most common reasons why a parachain won't produce blocks. The most common reasons on top, the more advanced trouble further down&#xD;&#xA;&#xD;&#xA; 1. Is your collator in sync with the latest block on the correct relay chain?&#xD;&#xA;    * check collator log. look for `[Relaychain] ✨ Imported #216436 (0x149a…96fe)`&#xD;&#xA;       * This would indicate you're still synching: `[Relaychain] ⚙️  Syncing 77.3 bps, target=#216367 (28 peers), best: #213071 (0x7d38…04f3), finalized #212992 (0x505d…c7e5), ⬇ 3.6kiB/s ⬆ 3.8kiB/s`&#xD;&#xA; 2. Are you running at least 2 authority collators? Are they peering up?&#xD;&#xA;    * check collator logs: `Role: AUTHORITY` / &#xD;&#xA;    `Is collating: yes` / `[Parachain]  Idle (3 peers)`&#xD;&#xA; 3. Are authority keys injected (rpc `author.insertKey`)? (If your parachain runtime uses Aura)&#xD;&#xA;    * verify with collator rpc: `author.hasKey`&#xD;&#xA; 4. Is your collator set up with the correct Paraid?&#xD;&#xA;    * check collator log `Parachain id: Id(1003)`&#xD;&#xA;    * check if your state has the same paraid. with js/apps, query `parachainInfo.parachainId` (a mismatch here can also cause trouble with XCM)&#xD;&#xA; 5. Does parachain genesis match what is registered on the relay chain?&#xD;&#xA;    * check collator logs `Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000236b98be9f06700ff1618e1f9cbb43bc006571517d`&#xD;&#xA;    * compare to relaychain `paras.heads(&lt;paraid&gt;)` if you are at block 0, this should be the same as your genesis state above&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then you should at least see `[Parachain] Starting collation`&#xD;&#xA;&#xD;&#xA;Still not producing blocks?&#xD;&#xA;&#xD;&#xA; 6. Does the runtime which the relaychain validators use for PoV validation match the runtime your collator uses to produce blocks? (this can be different if your genesis state and submitted wasm do not match)&#xD;&#xA;    * on the relaychain, query `paras.currentCodeHash(&lt;paraid&gt;)`&#xD;&#xA;    * does that match with a runtime with the same `specVersion` your collator shows in js/apps?&#xD;&#xA;      * otherwise, the relaychain validator may fail to include the block with `panicked at 'Transaction has a bad signature'`&#xD;&#xA;    * if you're unsure, you can calculate the hash of any runtime wasm file by using js/apps extrinsic `parachainSystem.authorizeUpgrade` and compare the hash with the one registered on the relachain&#xD;&#xA;    " ContentLicense="CC BY-SA 4.0" />
  <row Id="5086" PostHistoryTypeId="6" PostId="1389" RevisionGUID="39dde9eb-11f7-47ea-a61b-23c64b7267ee" CreationDate="2022-03-29T20:03:41.817" UserId="85" Comment="edited tags" Text="|pallet|account|origin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5087" PostHistoryTypeId="5" PostId="1371" RevisionGUID="55b0767e-4988-48dc-8953-44ae94e6cbe9" CreationDate="2022-03-29T20:05:27.693" UserId="1861" Comment="added 64 characters in body" Text="This was partially only a logging issue, that logged this in the collator protocol in _some_ occassions where it should not have logged the message.&#xD;&#xA;&#xD;&#xA;The issue of fluctuating block times is a known issue and is planned to be fixed with the v0.9.19 release (at the time of writing), also see https://github.com/paritytech/polkadot/issues/4911&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5088" PostHistoryTypeId="2" PostId="1396" RevisionGUID="9bbfbf7d-b2a0-45cb-a589-54f4e67bf111" CreationDate="2022-03-29T20:48:21.310" UserId="73" Text="You can not combine two runtimes into one wasm binary. The problem is the runtime api. The runtime api exposes its functions as extern &quot;C&quot; functions. As both of your runtimes probably implement the same runtime apis like `Core`, you are defining the same exported functions multiple times. &#xD;&#xA;&#xD;&#xA;For Polkadot/Kusama/Westend they all are compiled into individual wasm binaries. The features you have mentioned e.g. `polkadot-native` already contain the &quot;native&quot; in their name. Native here means the native runtime and for the native runtime we don't expose these extern &quot;C&quot; functions and thus, don't have these problems in Polkadot." ContentLicense="CC BY-SA 4.0" />
  <row Id="5091" PostHistoryTypeId="2" PostId="1397" RevisionGUID="a9286acd-5246-45e6-86df-2391d57a589e" CreationDate="2022-03-29T21:16:45.237" UserId="1904" Text="I am aware of [this example][1] that shows how to create a mock chain extension and test that. However, I do not know how to test the chain extension that is used by the runtime and calling functions from pallets. How do I ensure the chain extension is interacting correctly with pallets?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/tree/master/examples/rand-extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="5093" PostHistoryTypeId="1" PostId="1397" RevisionGUID="a9286acd-5246-45e6-86df-2391d57a589e" CreationDate="2022-03-29T21:16:45.237" UserId="1904" Text="How do I test a chain extension used in the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5094" PostHistoryTypeId="3" PostId="1397" RevisionGUID="a9286acd-5246-45e6-86df-2391d57a589e" CreationDate="2022-03-29T21:16:45.237" UserId="1904" Text="|ink|runtime|smart-contract|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5095" PostHistoryTypeId="5" PostId="842" RevisionGUID="8eee1226-5af8-4e8d-9286-b1e142a432ac" CreationDate="2022-03-29T21:27:58.867" UserId="172" Comment="Updated usage guide. " Text="A question that refers to the balances pallet, or anything to do with balance transfers." ContentLicense="CC BY-SA 4.0" />
  <row Id="5096" PostHistoryTypeId="24" PostId="842" RevisionGUID="8eee1226-5af8-4e8d-9286-b1e142a432ac" CreationDate="2022-03-29T21:27:58.867" Comment="Proposed by 172 approved by 627, 85 edit id of 121" ContentLicense="CC BY-SA 4.0" />
  <row Id="5097" PostHistoryTypeId="5" PostId="841" RevisionGUID="a7c90248-af5f-4852-b758-836bce2e0c71" CreationDate="2022-03-29T21:29:57.613" UserId="172" Comment="Updated usage guide. " Text="A question that refers to the balances pallet, or anything to do with balance transfers." ContentLicense="CC BY-SA 4.0" />
  <row Id="5098" PostHistoryTypeId="24" PostId="841" RevisionGUID="a7c90248-af5f-4852-b758-836bce2e0c71" CreationDate="2022-03-29T21:29:57.613" Comment="Proposed by 172 approved by 627, 85 edit id of 120" ContentLicense="CC BY-SA 4.0" />
  <row Id="5099" PostHistoryTypeId="6" PostId="997" RevisionGUID="0af34066-05d1-448f-a271-0aada7105eac" CreationDate="2022-03-29T21:34:33.387" UserId="85" Comment="edited tags" Text="|parachain|stalled|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5100" PostHistoryTypeId="6" PostId="214" RevisionGUID="b68cc4c3-a30c-4686-a513-ad1acf9a04c5" CreationDate="2022-03-29T21:36:08.713" UserId="85" Comment="edited tags" Text="|consensus|grandpa|finality|stalled|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5101" PostHistoryTypeId="6" PostId="1394" RevisionGUID="fd938547-fe8b-4a0a-90ee-5221b7d04249" CreationDate="2022-03-29T21:36:40.027" UserId="85" Comment="edited tags" Text="|parachain|stalled|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5102" PostHistoryTypeId="6" PostId="486" RevisionGUID="587b4155-b7d3-4767-a39a-f1db4dfe8ee3" CreationDate="2022-03-29T21:37:05.083" UserId="85" Comment="edited tags" Text="|consensus|babe|stalled|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5103" PostHistoryTypeId="2" PostId="1398" RevisionGUID="c7776b85-0b5e-4876-821d-582bc8360031" CreationDate="2022-03-29T22:55:48.120" UserId="28" Text="I think you need to provide more clarity what is failing for you, but this works fine:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn add_balance(balance1: BalanceOf&lt;T&gt;, balance2: BalanceOf&lt;T&gt;) -&gt; BalanceOf&lt;T&gt; {&#xD;&#xA;	use sp_runtime::traits::Saturating;&#xD;&#xA;	balance1.saturating_add(balance2)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5105" PostHistoryTypeId="5" PostId="1390" RevisionGUID="03da1547-1776-4a3e-8615-38346c79ffae" CreationDate="2022-03-29T23:06:26.133" UserId="28" Comment="make example code compile" Text="You can add and create custom origins in pallets.&#xD;&#xA;&#xD;&#xA;In your pallet, you define the origin type.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_support::pallet_prelude::*;&#xD;&#xA;use pallet::*;&#xD;&#xA;use sp_runtime::traits::BadOrigin;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use super::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {}&#xD;&#xA;&#xD;&#xA;	/// Origin for the parachains.&#xD;&#xA;	#[pallet::origin]&#xD;&#xA;	#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;	pub enum Origin {&#xD;&#xA;		/// Custom Origin type.&#xD;&#xA;		CustomOrigin(InternalStruct),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;pub struct InternalStruct {&#xD;&#xA;	item: u64,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// This is an analogue of `ensure_signed` for the custom origin type.&#xD;&#xA;pub fn ensure_custom_origin&lt;OuterOrigin&gt;(o: OuterOrigin) -&gt; Result&lt;InternalStruct, BadOrigin&gt;&#xD;&#xA;where&#xD;&#xA;	OuterOrigin: Into&lt;Result&lt;Origin, OuterOrigin&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	match o.into() {&#xD;&#xA;		Ok(Origin::CustomOrigin(internal)) =&gt; Ok(internal),&#xD;&#xA;		_ =&gt; Err(BadOrigin),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then you can integrate this in `construct_runtime!` to add your custom origin type to the overarching runtime origin.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;construct_runtime! {&#xD;&#xA;    pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = OpaqueBlock,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;        // .. other pallets&#xD;&#xA;        CustomOriginPallet: custom_origin_pallet::{Pallet, Origin},&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Per your question about whether you can create a custom origin which modifies the behavior of `ensure_signed`, the answer is 'no'. `ensure_signed` only accepts origins of the form `frame_system::RawOrigin::Signed(AccountId)`." ContentLicense="CC BY-SA 4.0" />
  <row Id="5106" PostHistoryTypeId="2" PostId="1399" RevisionGUID="e937ca5b-44ab-4488-a448-86198003cdf8" CreationDate="2022-03-29T23:16:56.683" UserId="28" Text="I think your current approach looks right.&#xD;&#xA;&#xD;&#xA;While it is possible to create custom origins as Rob as shown, it is probably not very ergonomic to use across your pallets.&#xD;&#xA;&#xD;&#xA;Instead, as you have shown in your pseudo code, having the user input the currency_id and doing that `actor_id` calculation / conversion makes sense to me.&#xD;&#xA;&#xD;&#xA;In any case, if you do use a custom origin, users would need to interact with your pallet first to create and re-dispatch the new origin. FRAME core on its own is not modular in this way. You would not be able to override the `Signed` origin type." ContentLicense="CC BY-SA 4.0" />
  <row Id="5108" PostHistoryTypeId="2" PostId="1400" RevisionGUID="f2048505-1aac-44b8-b4dc-5aa210cbad47" CreationDate="2022-03-29T23:22:47.277" UserId="28" Text="Each client for the different networks are behind feature flags in the Polkadot repo. Take a look at:&#xD;&#xA;&#xD;&#xA;**polkadot/cli/Cargo.toml**&#xD;&#xA;&#xD;&#xA;```lang-toml&#xD;&#xA;# Configure the native runtimes to use. Polkadot is enabled by default.&#xD;&#xA;#&#xD;&#xA;# Validators require the native runtime currently&#xD;&#xA;polkadot-native = [&quot;service/polkadot-native&quot;]&#xD;&#xA;kusama-native = [&quot;service/kusama-native&quot;]&#xD;&#xA;westend-native = [&quot;service/westend-native&quot;]&#xD;&#xA;rococo-native = [&quot;service/rococo-native&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can see feature gated code all over the repo like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn native_runtime_version(spec: &amp;Box&lt;dyn service::ChainSpec&gt;) -&gt; &amp;'static RuntimeVersion {&#xD;&#xA;	#[cfg(feature = &quot;kusama-native&quot;)]&#xD;&#xA;	if spec.is_kusama() {&#xD;&#xA;		return &amp;service::kusama_runtime::VERSION&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;westend-native&quot;)]&#xD;&#xA;	if spec.is_westend() {&#xD;&#xA;		return &amp;service::westend_runtime::VERSION&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;rococo-native&quot;)]&#xD;&#xA;	if spec.is_rococo() || spec.is_wococo() || spec.is_versi() {&#xD;&#xA;		return &amp;service::rococo_runtime::VERSION&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(not(all(&#xD;&#xA;		feature = &quot;rococo-native&quot;,&#xD;&#xA;		feature = &quot;westend-native&quot;,&#xD;&#xA;		feature = &quot;kusama-native&quot;&#xD;&#xA;	)))]&#xD;&#xA;	let _ = spec;&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;polkadot-native&quot;)]&#xD;&#xA;	{&#xD;&#xA;		return &amp;service::polkadot_runtime::VERSION&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(not(feature = &quot;polkadot-native&quot;))]&#xD;&#xA;	panic!(&quot;No runtime feature (polkadot, kusama, westend, rococo) is enabled&quot;)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As Basti has mentioned, you should make sure things like the `runtime-api` are only compiled once per runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="5110" PostHistoryTypeId="2" PostId="1401" RevisionGUID="e9794332-3be5-4a4f-b4fe-ec371540f98e" CreationDate="2022-03-29T23:45:42.097" UserId="28" Text="If you look at the `Tranasct` instruction, you will see it expects a `DoubleEncoded&lt;Call&gt;` with a generic `Call` parameter:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub enum Instruction&lt;Call&gt; {&#xD;&#xA;	/// Apply the encoded transaction `call`, whose dispatch-origin should be `origin` as expressed&#xD;&#xA;	/// by the kind of origin `origin_type`.&#xD;&#xA;	///&#xD;&#xA;	/// - `origin_type`: The means of expressing the message origin as a dispatch origin.&#xD;&#xA;	/// - `max_weight`: The weight of `call`; this should be at least the chain's calculated weight&#xD;&#xA;	///   and will be used in the weight determination arithmetic.&#xD;&#xA;	/// - `call`: The encoded transaction to be applied.&#xD;&#xA;	///&#xD;&#xA;	/// Safety: No concerns.&#xD;&#xA;	///&#xD;&#xA;	/// Kind: *Instruction*.&#xD;&#xA;	///&#xD;&#xA;	/// Errors:&#xD;&#xA;	Transact {&#xD;&#xA;		origin_type: OriginKind,&#xD;&#xA;		#[codec(compact)]&#xD;&#xA;		require_weight_at_most: u64,&#xD;&#xA;		call: DoubleEncoded&lt;Call&gt;,&#xD;&#xA;	},&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This `Call` should be the `Call` type of the chain you want to access, and can change depending on which chain you are calling. So you must coordinate with the chain you are calling, and hard code the `Call` type for that chain into your runtime.&#xD;&#xA;&#xD;&#xA;As you can imagine, this is the only way that two different chains can generically call transact.&#xD;&#xA;&#xD;&#xA;This is actually why XCM exists at all, to make common calls that different parachains would need to interact with each other generic, and independent of an underlying changing `Call` type that would be unique to each chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="5112" PostHistoryTypeId="2" PostId="1402" RevisionGUID="25818a2b-918d-4ce3-ba78-3c0e7c1e5977" CreationDate="2022-03-30T00:07:49.210" UserId="28" Text="The chain spec is no longer a canonical place to store the SS58 Prefix for a chain.&#xD;&#xA;&#xD;&#xA;Instead you should use the `SS58Prefix` configuration constant in `frame_system`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// The designated SS85 prefix of this chain.&#xD;&#xA;///&#xD;&#xA;/// This replaces the &quot;ss58Format&quot; property declared in the chain spec. Reason is&#xD;&#xA;/// that the runtime should know about the prefix in order to make use of it as&#xD;&#xA;/// an identifier of the chain.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type SS58Prefix: Get&lt;u16&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is how things like Polkadot JS API get the appropriate SS58 for your chain.&#xD;&#xA;&#xD;&#xA;For your node binary, you want to be sure to call:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sp_core::crypto::set_default_ss58_version(ss58_version);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This value can come from the the runtime, or you can program whatever functionality you want. For example, in Polkadot, we don't actually pull the value from the chain spec, we just check which chainspec has been loaded, and then pull the SS58 from the [registry](https://github.com/paritytech/ss58-registry):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn set_default_ss58_version(spec: &amp;Box&lt;dyn service::ChainSpec&gt;) {&#xD;&#xA;	let ss58_version = if spec.is_kusama() {&#xD;&#xA;		Ss58AddressFormatRegistry::KusamaAccount&#xD;&#xA;	} else if spec.is_westend() {&#xD;&#xA;		Ss58AddressFormatRegistry::SubstrateAccount&#xD;&#xA;	} else {&#xD;&#xA;		Ss58AddressFormatRegistry::PolkadotAccount&#xD;&#xA;	}&#xD;&#xA;	.into();&#xD;&#xA;&#xD;&#xA;	sp_core::crypto::set_default_ss58_version(ss58_version);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5114" PostHistoryTypeId="2" PostId="1403" RevisionGUID="a482f53d-91e0-4ab6-8c0d-f1836df3259d" CreationDate="2022-03-30T00:30:20.947" UserId="28" Text="I believe this is an artifact from the the old design for how we collected all the different storage items in the `decl_storage!` macro in FRAME v1.&#xD;&#xA;&#xD;&#xA;Here is an example definition:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;crate::decl_storage! {&#xD;&#xA;	trait Store for Module&lt;T: Config&gt; as Runtime {&#xD;&#xA;		Value get(fn value) config(): (u64, u64);&#xD;&#xA;		NumberMap: map hasher(identity) u32 =&gt; u64;&#xD;&#xA;		DoubleMap: double_map hasher(identity) u32, hasher(identity) u32 =&gt; u64;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, the old macro simply wrapped an entire `trait Store`, and generated all the storage items using this.&#xD;&#xA;&#xD;&#xA;When redesigning FRAME storage for FRAME v2, an individual `type` pattern was used:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type Value&lt;T&gt; = StorageValue&lt;_, u32&gt;;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type Map&lt;T&gt; = StorageMap&lt;_, Blake2_128Concat, u8, u16&gt;;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type DoubleMap&lt;T&gt; =&#xD;&#xA;	StorageDoubleMap&lt;_, Blake2_128Concat, u8, Twox64Concat, u16, u32&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To maintain backwards compatibility, this extra `generate_store` attribute was created. It should not affect you as a pallet developer if you use it or not." ContentLicense="CC BY-SA 4.0" />
  <row Id="5116" PostHistoryTypeId="2" PostId="1404" RevisionGUID="e6107151-7dc4-4e68-8613-047613fabdef" CreationDate="2022-03-30T02:15:36.730" UserId="180" Text="My question is `What is the difference between dependencies and dev-dependencies in Cargo.toml`. And for developing pallet, now I have to declare crate in `dependencies`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5118" PostHistoryTypeId="1" PostId="1404" RevisionGUID="e6107151-7dc4-4e68-8613-047613fabdef" CreationDate="2022-03-30T02:15:36.730" UserId="180" Text="What is the difference between dependencies and dev-dependencies in Cargo.toml" ContentLicense="CC BY-SA 4.0" />
  <row Id="5119" PostHistoryTypeId="3" PostId="1404" RevisionGUID="e6107151-7dc4-4e68-8613-047613fabdef" CreationDate="2022-03-30T02:15:36.730" UserId="180" Text="|cargo|toml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5120" PostHistoryTypeId="6" PostId="1404" RevisionGUID="6d1aec3f-c7ab-45a4-973d-96dc437e4054" CreationDate="2022-03-30T02:16:51.793" UserId="28" Comment="edited tags" Text="|rust|cargo|toml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5121" PostHistoryTypeId="2" PostId="1405" RevisionGUID="dbba922a-7bf7-4671-b67b-ebdc5d45cdc4" CreationDate="2022-03-30T02:23:55.537" UserId="28" Text="To add to Sam's post:&#xD;&#xA;&#xD;&#xA;It should be noted that Offchain Workers are very often misunderstood. It is not trivial just to write some random http request as part of pallet development and expect it to work. The runtime's state transition function must be completely deterministic, and the use of Offchain Workers introduces non-determinism. So you must go much deeper into what this tool is, what it is not, and how to correctly use it." ContentLicense="CC BY-SA 4.0" />
  <row Id="5123" PostHistoryTypeId="2" PostId="1406" RevisionGUID="d987d29e-3089-4f9c-8389-f0d230b7640d" CreationDate="2022-03-30T02:39:35.803" UserId="28" Text="This is a general Rust concept:&#xD;&#xA;&#xD;&#xA;https://doc.rust-lang.org/rust-by-example/testing/dev_dependencies.html&#xD;&#xA;&#xD;&#xA;Basically, `[dev-dependencies]` are the crates you only need for compiling and running tests.&#xD;&#xA;&#xD;&#xA;There are at least two advantages of separating test crates in this way:&#xD;&#xA;&#xD;&#xA;1. When compiling for release, these test crates are not compiled into your binary, which can save space and compilation time.&#xD;&#xA;&#xD;&#xA;2. Normally, the Rust compiler checks for and prohibits any [cyclic dependencies](https://users.rust-lang.org/t/how-to-resolve-cyclic-dependency/51387). For `[dev-dependencies]`, this check is ignored, allowing two crates to be dependent on eachother specifically for tests.&#xD;&#xA;&#xD;&#xA;If you use a crate in your main code, you must include it as a `[dependencies]`, however, if you only use it for tests, then you should place it as a `[dev-dependencies]`.&#xD;&#xA;&#xD;&#xA;If you are confused, I recommend to copy patterns from other crates found in Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="5125" PostHistoryTypeId="5" PostId="1370" RevisionGUID="6a4ca732-7dd8-4b19-80fe-aa36872e53fb" CreationDate="2022-03-30T02:40:17.190" UserId="180" Comment="added 2414 characters in body" Text="I am developing a Pallet and I defined this type:&#xD;&#xA;&#xD;&#xA;    type BalanceOf&lt;T&gt; =&#xD;&#xA;    		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;and my question is how to add value of this `tmp` value with input amount:&#xD;&#xA;&#xD;&#xA;    let mut tmp:BalanceOf&lt;T&gt;;&#xD;&#xA;    pub fn mint(&#xD;&#xA;    			owner: &amp;T::AccountId,&#xD;&#xA;    			amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    		) -&gt; Result&lt;[u8; 3], DispatchError&gt; {&#xD;&#xA;       // How to increase tmp value with input amount&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;my Cargo.toml of pallet:&#xD;&#xA;and it caused: `Caused by:&#xD;&#xA;  Dependency 'sp-runtime' has different source paths depending on the build target. Each dependency must have a single canonical source path irrespective of build target.`&#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = 'pallet-nft-wcn'&#xD;&#xA;    version = '4.0.0-dev'&#xD;&#xA;    description = 'FRAME pallet template for defining custom runtime logic.'&#xD;&#xA;    authors = ['Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;']&#xD;&#xA;    homepage = 'https://substrate.io/'&#xD;&#xA;    edition = '2021'&#xD;&#xA;    license = 'Unlicense'&#xD;&#xA;    publish = false&#xD;&#xA;    repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;    &#xD;&#xA;    [package.metadata.docs.rs]&#xD;&#xA;    targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    codec = { package = &quot;parity-scale-codec&quot;, version = &quot;2.0.0&quot;, default-features = false, features = [&#xD;&#xA;    	&quot;derive&quot;,&#xD;&#xA;    ] }&#xD;&#xA;    scale-info = { version = &quot;1.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    frame-support = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.17&quot;}&#xD;&#xA;    frame-system = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.17&quot; }&#xD;&#xA;    frame-benchmarking = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.17&quot;, optional = true }&#xD;&#xA;    sp-runtime = { version = &quot;5.0.0&quot;}&#xD;&#xA;    serde = { version = &quot;1.0&quot;, features = [&quot;derive&quot;] }&#xD;&#xA;    sp-std = { default-features = false, version = '3.0.0' }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [dev-dependencies]&#xD;&#xA;    sp-core = { default-features = false, version = &quot;5.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.17&quot; }&#xD;&#xA;    sp-io = { default-features = false, version = &quot;5.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.17&quot; }&#xD;&#xA;    sp-runtime = { default-features = false, version = &quot;5.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.17&quot; }&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;    	&quot;codec/std&quot;,&#xD;&#xA;    	&quot;scale-info/std&quot;,&#xD;&#xA;    	&quot;frame-support/std&quot;,&#xD;&#xA;    	&quot;frame-system/std&quot;,&#xD;&#xA;    	&quot;frame-benchmarking/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;    &#xD;&#xA;    runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;    try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5127" PostHistoryTypeId="2" PostId="1407" RevisionGUID="6fd5189e-e409-4997-ad70-233d2fd33554" CreationDate="2022-03-30T03:40:20.970" UserId="180" Text="I using `Substrate-template-node` to build pallet and my laptop have Core-i7 chip, but the time to build is range from 9-12 minutes. So, when I change code and have to wait to build and run.&#xD;&#xA;&#xD;&#xA;So, my question is Is there anyway to build faster?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5129" PostHistoryTypeId="1" PostId="1407" RevisionGUID="6fd5189e-e409-4997-ad70-233d2fd33554" CreationDate="2022-03-30T03:40:20.970" UserId="180" Text="How to increase performance of building Substrate by &quot;cargo build --release&quot; command" ContentLicense="CC BY-SA 4.0" />
  <row Id="5130" PostHistoryTypeId="3" PostId="1407" RevisionGUID="6fd5189e-e409-4997-ad70-233d2fd33554" CreationDate="2022-03-30T03:40:20.970" UserId="180" Text="|substrate-node-template|performance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5131" PostHistoryTypeId="2" PostId="1408" RevisionGUID="40cbbdb3-d9ec-4cd0-b73e-bba9b3a35999" CreationDate="2022-03-30T05:07:41.320" UserId="627" Text="The Substrate `author_` RPC namespace has 2 submission mechanisms -&#xD;&#xA;&#xD;&#xA;- `author_submitExtrinsic` - this only returns the hash, doesn't guarantee inclusion&#xD;&#xA;- `author_submitAndWatchExtrinsic` - this is a subscription that returns the status of the extrinsic, e.g. Broadcast, InBlock, Finalized, etc.&#xD;&#xA;&#xD;&#xA;Once the subscription reaches `InBlock(blockHash)` or `Finalized(blockHash)` you can get the DispatchResult from the block to determine the actual runtime execution status. &#xD;&#xA;&#xD;&#xA;It may be rejected in the transaction pool already, e.g. a `Stale` status is an example of this, in that case it won't make it into a block, so it won't get to a `Finalized` state at all.&#xD;&#xA;&#xD;&#xA;If you cannot submit &amp; watch, a more limiting approach would be to watch `author_pendingExtrinsics` to see if it is unprocessed and check incoming blocks for inclusion. In this case you lose out on any won't-be-included statuses from the transaction pool." ContentLicense="CC BY-SA 4.0" />
  <row Id="5133" PostHistoryTypeId="2" PostId="1409" RevisionGUID="70ff2e72-17ce-4ed0-b767-8275acc02a6d" CreationDate="2022-03-30T05:15:52.370" UserId="83" Text="The cause of the error message `failed to submit candidacy` may be because when calling the extrinsic function [`submit_candidacy`][1] of the `pallet_election_phragmen` pallet to add a new endowed account candidate and the current amount of candidates as witness data, either the actual amount of candidates differs from the witness data, it is preventing duplicate candidacy as the candidate being submitted is a candidate already, the candidate being submitted is not currently an active member or active runner-up, or the candidate being submitted has insufficient funds to bond.&#xD;&#xA;&#xD;&#xA;In order to have sufficient funds to submit the `CandidacyBond` as a candidate, doing so must not cause their account balance to fall below the value of the `ExistentialDeposit` that is defined in your runtime in runtime/src/lib.rs, extract below:&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;impl pallet_balances::Config for Runtime {&#xD;&#xA;    type ExistentialDeposit = &lt;EXISTENTIAL_DEPOSIT&gt;;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;impl pallet_elections_phragmen::Config for Runtime {&#xD;&#xA;	type CandidacyBond = &lt;CANDIDACY_BOND&gt;;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the extract of the chain specification file node/src/chain_spec.rs that you have shared, it shows that you are making each account in the `endowed_accounts` a current elected member and giving each of them a balance value of `STASH`, where that is calculated from the following, however you have not shown what value you are using for `DOLLARS`. Please check that the value you are using for `DOLLARS` allows the `STASH` value to be at least the `ExistentialDeposit` plus the `CandidacyBond`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const ENDOWMENT: Balance = 10_000_000 * DOLLARS;&#xD;&#xA;const STASH: Balance = ENDOWMENT / 1000;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The cause of the error message `SignedCannotPayDeposit` is the origin failed to pay the deposit to store a solution when calling the extrinsic function [`submit`][2] of the `pallet_election_provider_multi_phase ` pallet, where the deposit required to be collected is calculated using [deposit_for][3]. Please also try increasing the value of `ENDOWMENT`, since in the extract of the chain specification file node/src/chain_spec.rs that you have shared, it shows that `endowed_accounts` is the list of accounts that are being endowed with that balance at genesis.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const ENDOWMENT: Balance = 10_000_000 * DOLLARS;&#xD;&#xA;const STASH: Balance = ENDOWMENT / 1000;&#xD;&#xA;&#xD;&#xA;GenesisConfig {&#xD;&#xA;    ...&#xD;&#xA;    balances: BalancesConfig {&#xD;&#xA;        balances: endowed_accounts&#xD;&#xA;            .iter()&#xD;&#xA;            .cloned()&#xD;&#xA;            .map(|k| (k, ENDOWMENT))&#xD;&#xA;            .collect(),&#xD;&#xA;    },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/pallet_elections_phragmen/pallet/struct.Pallet.html#method.submit_candidacy&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/pallet/struct.Pallet.html#method.submit&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/pallet/struct.Pallet.html#method.deposit_for" ContentLicense="CC BY-SA 4.0" />
  <row Id="5135" PostHistoryTypeId="2" PostId="1410" RevisionGUID="af914cc8-aaa7-49b9-b13c-8b36d07d7bb0" CreationDate="2022-03-30T06:06:53.197" UserId="1837" Text="I am trying to call an extrinsic with specific AccoundId, I have considered two options&#xD;&#xA;1) Generate AccountId from Key-Pair&#xD;&#xA;   ```&#xD;&#xA;   let caller = sr25519::Pair::from_string(&quot;//1&quot;, None)&#xD;&#xA;                .unwrap()&#xD;&#xA;                .public();&#xD;&#xA;   ```&#xD;&#xA;2) Hardcode accountId&#xD;&#xA;   ```&#xD;&#xA;   let caller:T::AccountId = &quot;5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o&quot;.to_owned().into()&#xD;&#xA;   ```&#xD;&#xA;Generating the same AccoundId is important because there is an Origin check in extrinsic that AccountId should exit in Some_Storage of type Vec&lt;T::AccountId&gt;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;benchmarks! {&#xD;&#xA;    set_value {&#xD;&#xA;    let caller = sr25519::Pair::from_string(&quot;//1&quot;, None).unwrap();&#xD;&#xA;    }: _(RawOrigin::Signed(caller.public().into()),2)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there any way to generate AccountId from the above two ways or any other way?&#xD;&#xA;Any help or advice is appreciated.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5137" PostHistoryTypeId="1" PostId="1410" RevisionGUID="af914cc8-aaa7-49b9-b13c-8b36d07d7bb0" CreationDate="2022-03-30T06:06:53.197" UserId="1837" Text="Generate specific AccountId to execute benchmark extrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="5138" PostHistoryTypeId="3" PostId="1410" RevisionGUID="af914cc8-aaa7-49b9-b13c-8b36d07d7bb0" CreationDate="2022-03-30T06:06:53.197" UserId="1837" Text="|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5140" PostHistoryTypeId="5" PostId="1393" RevisionGUID="f1dd2260-f437-4900-927c-4819a827da69" CreationDate="2022-03-30T07:39:19.270" UserId="1760" Comment="added 1659 characters in body" Text="I've successfully submitted the extrinsic RPC call and got a JSON response&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;result&quot;: &quot;0x715b0b0d105920a928ad005bd525a68d6b8b60e73afa043174fe0db2f7133db8&quot;,&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Knowing the transaction hash, how can I know whether the extrinsic got accepted or rejected by the network. Is there a way to see the error code in case of rejection? Thanks&#xD;&#xA;&#xD;&#xA;## Update&#xD;&#xA;I'm calling a method in a custom pallet. The runtime logic returns a `System.ExtrinsicFailed` exception with a specific error.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;But the submitted extrinsic is still included to the block. &#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;result&quot;: {&#xD;&#xA;        &quot;block&quot;: {&#xD;&#xA;            &quot;extrinsics&quot;: [&#xD;&#xA;                &quot;0x280402000b74c3add97f01&quot;,&#xD;&#xA;                &quot;0xe9018400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d010a53e10e6c6b4e3f0ec5faf3e4db39e1b70766873ae3462e53c90b1316565e408c7c74dc6bdf4d4274871d44ec27956fd6547b733e6cfacf9b34526251c1ad84006400080040e00b2d48eee975515138552126e2bf8600&quot;&#xD;&#xA;            ],&#xD;&#xA;            &quot;header&quot;: {&#xD;&#xA;                &quot;digest&quot;: {&#xD;&#xA;                    &quot;logs&quot;: [&#xD;&#xA;                        &quot;0x06617572612041ab601000000000&quot;,&#xD;&#xA;                        &quot;0x0561757261010126d20fb044834f6f1a9d036403af6ad87bfec598889ddcc174fbaf190c75ce77120ae859cc739b1089850346409868ef229989a91ee08b5d860ed838bc79d68f&quot;&#xD;&#xA;                    ]&#xD;&#xA;                },&#xD;&#xA;                &quot;extrinsicsRoot&quot;: &quot;0x35f1510c6c4704691c742a107d2a53e722b65e08d268a369052f728d35b981a1&quot;,&#xD;&#xA;                &quot;number&quot;: &quot;0x19b4&quot;,&#xD;&#xA;                &quot;parentHash&quot;: &quot;0x6f589b4e8d8885f59b726689d702e86f55af07af281e4c9377987841c31e7dd4&quot;,&#xD;&#xA;                &quot;stateRoot&quot;: &quot;0xa9e3f1fc62e82c501289266655eabeb04c3488d67184d683ed27bd4a3e336350&quot;&#xD;&#xA;            }&#xD;&#xA;        },&#xD;&#xA;        &quot;justifications&quot;: null&#xD;&#xA;    },&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What are logs? Do I understand correctly, that they also can be deserialised? Do they correspond to extrinsic with the same index?&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cQrcj.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5141" PostHistoryTypeId="2" PostId="1411" RevisionGUID="47dfcec2-92d6-432a-b739-c34cca97d6dc" CreationDate="2022-03-30T08:07:14.320" UserId="459" Text="When attempting to build the Democracy pallet (`pallet_democracy`) within a runtime based on the `polkadot-v0.9.15-1` branch, built native using Rust stable `1.57` and WASM using Rust nightly `2021-11-29`, this build error appears with little assisting information.&#xD;&#xA;&#xD;&#xA;```'&#xD;&#xA;error[E0107]: missing generics for struct `pallet_democracy::GenesisConfig`&#xD;&#xA;    --&gt; runtime/alpha/src/lib.rs:1177:1&#xD;&#xA;     |&#xD;&#xA;1177 | / construct_runtime! {&#xD;&#xA;1178 | |     pub enum Runtime where&#xD;&#xA;1179 | |         Block = Block,&#xD;&#xA;1180 | |         NodeBlock = primitives::Block,&#xD;&#xA;...    |&#xD;&#xA;1247 | |     }&#xD;&#xA;1248 | | }&#xD;&#xA;     | |_^ expected 1 generic argument&#xD;&#xA;     |&#xD;&#xA;note: struct defined here, with 1 generic parameter: `T`&#xD;&#xA;    --&gt; /usr/local/cargo/git/checkouts/substrate-7e08433d4c370a21/e6fbbd5/frame/democracy/src/lib.rs:479:13&#xD;&#xA;     |&#xD;&#xA;479  |     pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;     |                ^^^^^^^^^^^^^ -&#xD;&#xA;     = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: add missing generic argument&#xD;&#xA;     |&#xD;&#xA;1177 | GenesisConfig&lt;T&gt;&#xD;&#xA;     |&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0107`.&#xD;&#xA;error: could not compile `native-runtime-alpha` due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Contents of `runtime/alpha/src/lib.rs`**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;#![recursion_limit = &quot;256&quot;]&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/wasm_binary.rs&quot;));&#xD;&#xA;[...]&#xD;&#xA;impl pallet_democracy::Config for Runtime {&#xD;&#xA;	type Proposal = Call;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;[...]&#xD;&#xA;	type ExternalOrigin = pallet_collective::EnsureProportionAtLeast&lt;_1, _2, AccountId, CouncilCollective&gt;;&#xD;&#xA;	type ExternalMajorityOrigin = pallet_collective::EnsureProportionAtLeast&lt;_1, _2, AccountId, CouncilCollective&gt;;&#xD;&#xA;	type ExternalDefaultOrigin = pallet_collective::EnsureProportionAtLeast&lt;_1, _1, AccountId, CouncilCollective&gt;;&#xD;&#xA;	type FastTrackOrigin = pallet_collective::EnsureProportionAtLeast&lt;_2, _3, AccountId, TechnicalCollective&gt;;&#xD;&#xA;	type InstantOrigin = pallet_collective::EnsureProportionAtLeast&lt;_1, _1, AccountId, TechnicalCollective&gt;;&#xD;&#xA;	type InstantAllowed = InstantAllowed;&#xD;&#xA;	type FastTrackVotingPeriod = FastTrackVotingPeriod;&#xD;&#xA;	type CancellationOrigin = EnsureOneOf&lt;&#xD;&#xA;		AccountId,&#xD;&#xA;		EnsureRoot&lt;AccountId&gt;,&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;_2, _3, AccountId, CouncilCollective&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;	type CancelProposalOrigin = EnsureOneOf&lt;&#xD;&#xA;		AccountId,&#xD;&#xA;		EnsureRoot&lt;AccountId&gt;,&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;_1, _1, AccountId, TechnicalCollective&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;	type BlacklistOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type VetoOrigin = pallet_collective::EnsureMember&lt;AccountId, TechnicalCollective&gt;;&#xD;&#xA;[...]&#xD;&#xA;	type OperationalPreimageOrigin = pallet_collective::EnsureMember&lt;AccountId, CouncilCollective&gt;;&#xD;&#xA;	type WeightInfo = pallet_democracy::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;	type MaxProposals = MaxProposals;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;[...]&#xD;&#xA;&#xD;&#xA;/// The type used to represent the kinds of proxying allowed.&#xD;&#xA;#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen, scale_info::TypeInfo)]&#xD;&#xA;pub enum ProxyType {&#xD;&#xA;	Any,&#xD;&#xA;	NonTransfer,&#xD;&#xA;	Governance,&#xD;&#xA;	Staking,&#xD;&#xA;	IdentityJudgement,&#xD;&#xA;	CancelProxy,&#xD;&#xA;}&#xD;&#xA;impl Default for ProxyType { fn default() -&gt; Self { Self::Any } }&#xD;&#xA;impl InstanceFilter&lt;Call&gt; for ProxyType {&#xD;&#xA;	fn filter(&amp;self, c: &amp;Call) -&gt; bool {&#xD;&#xA;		match self {&#xD;&#xA;			ProxyType::Any =&gt; true,&#xD;&#xA;			ProxyType::NonTransfer =&gt; matches!(c,&#xD;&#xA;[...]&#xD;&#xA;				Call::Democracy(..) |&#xD;&#xA;[...]&#xD;&#xA;			ProxyType::Governance =&gt; matches!(c,&#xD;&#xA;[...]&#xD;&#xA;				Call::Democracy(..) |&#xD;&#xA;[...]&#xD;&#xA;			)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;[...]&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = primitives::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;[...]&#xD;&#xA;		Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event&lt;T&gt;},&#xD;&#xA;[...]&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Contents of `node/src/lib.rs`**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use sc_service::ChainType;&#xD;&#xA;use sp_core::{ed25519, Pair, Public};&#xD;&#xA;use sp_runtime::traits::{IdentifyAccount, Verify};&#xD;&#xA;use native_alpha::{&#xD;&#xA;	AccountId, AuthorityDiscoveryId, AuthorityDiscoveryConfig, BabeConfig, BalancesConfig, BabeId,&#xD;&#xA;    CouncilConfig, ImOnlineId, IndicesConfig, GenesisConfig, GrandpaId, GrandpaConfig, SessionConfig,&#xD;&#xA;    StakingConfig, Signature, SystemConfig, TechnicalCommitteeConfig,&#xD;&#xA;    BABE_GENESIS_EPOCH_CONFIG, WASM_BINARY&#xD;&#xA;};&#xD;&#xA;pub type ChainSpec = sc_service::GenericChainSpec&lt;GenesisConfig&gt;;&#xD;&#xA;[...]&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;	wasm_binary: &amp;[u8],&#xD;&#xA;	initial_authorities: Vec&lt;(&#xD;&#xA;		AccountId,&#xD;&#xA;		AccountId,&#xD;&#xA;		BabeId,&#xD;&#xA;		GrandpaId,&#xD;&#xA;		ImOnlineId,&#xD;&#xA;		AuthorityDiscoveryId,&#xD;&#xA;	)&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	endowed_accounts: Vec&lt;AccountId&gt;,&#xD;&#xA;	_enable_println: bool,&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;	GenesisConfig {&#xD;&#xA;[...]&#xD;&#xA;		democracy: Default::default(),&#xD;&#xA;[...]&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, it seems that the `construct_runtime` macro generates `GenesisConfig` which is then extended with `sc_service::GenericChainSpec` to give us the `ChainSpec` type, which is then used by the node.&#xD;&#xA;&#xD;&#xA;We are using other pallets that do require a `GenesisConfig` (such as `pallet_grandpa`) but don't have similar errors as merely uncommenting calls to `pallet_democracy` bypasses the problem altogether." ContentLicense="CC BY-SA 4.0" />
  <row Id="5143" PostHistoryTypeId="1" PostId="1411" RevisionGUID="47dfcec2-92d6-432a-b739-c34cca97d6dc" CreationDate="2022-03-30T08:07:14.320" UserId="459" Text="substrate: missing generics for struct `pallet_democracy::GenesisConfig`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5144" PostHistoryTypeId="3" PostId="1411" RevisionGUID="47dfcec2-92d6-432a-b739-c34cca97d6dc" CreationDate="2022-03-30T08:07:14.320" UserId="459" Text="|substrate-node|pallet|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5145" PostHistoryTypeId="10" PostId="1154" RevisionGUID="8b8fedb5-e5a9-41c2-899d-94196be6d501" CreationDate="2022-03-30T08:13:32.267" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:368,&quot;DisplayName&quot;:&quot;smm&quot;},{&quot;Id&quot;:103,&quot;DisplayName&quot;:&quot;user1271772&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:459,&quot;DisplayName&quot;:&quot;Kittywhiskers Van Gogh&quot;}]}" />
  <row Id="5146" PostHistoryTypeId="6" PostId="1407" RevisionGUID="6e8dc05f-463f-4e79-a4ed-7b42560585a0" CreationDate="2022-03-30T08:20:28.260" UserId="85" Comment="edited tags" Text="|substrate-node-template|build|performance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5147" PostHistoryTypeId="2" PostId="1412" RevisionGUID="6f4002ac-2a28-45d2-adeb-33e73d1404f3" CreationDate="2022-03-30T08:26:50.590" UserId="85" Text="Rather than:&#xD;&#xA;&#xD;&#xA; `Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event&lt;T&gt;},`&#xD;&#xA;&#xD;&#xA;Add in `&lt;T&gt;` to the Config here:&#xD;&#xA;&#xD;&#xA; `Democracy: pallet_democracy::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},`&#xD;&#xA;&#xD;&#xA;or if you're ok having all of the exports of that pallet you can just say:&#xD;&#xA;&#xD;&#xA; `Democracy: pallet_democracy,`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5149" PostHistoryTypeId="5" PostId="1412" RevisionGUID="771dbd2f-35e3-4fdb-b996-c9a86056fe74" CreationDate="2022-03-30T08:34:09.773" UserId="85" Comment="added 73 characters in body" Text="Rather than:&#xD;&#xA;&#xD;&#xA; `Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event&lt;T&gt;},`&#xD;&#xA;&#xD;&#xA;Add in `&lt;T&gt;` to the Config here:&#xD;&#xA;&#xD;&#xA; `Democracy: pallet_democracy::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},`&#xD;&#xA;&#xD;&#xA;or if you're ok having all of the exports of that pallet you can just say:&#xD;&#xA;&#xD;&#xA; `Democracy: pallet_democracy,`&#xD;&#xA;&#xD;&#xA;(This second syntax is fairly new which is why it's not as prevalent)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5150" PostHistoryTypeId="5" PostId="1365" RevisionGUID="a3bf52d4-6fc6-4285-8b6b-a238859d9e3a" CreationDate="2022-03-30T08:48:10.857" UserId="172" Comment="added 123 characters in body" Text="Posts that reference the Substrate node template, a basic Substrate node typically used for getting started with Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="5151" PostHistoryTypeId="24" PostId="1365" RevisionGUID="a3bf52d4-6fc6-4285-8b6b-a238859d9e3a" CreationDate="2022-03-30T08:48:10.857" Comment="Proposed by 172 approved by 85, 94 edit id of 119" ContentLicense="CC BY-SA 4.0" />
  <row Id="5152" PostHistoryTypeId="5" PostId="1016" RevisionGUID="dbe96eaf-b3df-4969-a505-e461de25ef51" CreationDate="2022-03-30T08:49:09.553" UserId="34" Comment="added 334 characters in body" Text="Good reference for a start:&#xD;&#xA;- [Polkadot Wiki, Maintaining section](https://wiki.polkadot.network/docs/maintain-index) that discusses many basic aspects of operation.&#xD;&#xA;- [`Awesome` Substrate Products &amp; Services](https://github.com/substrate-developer-hub/awesome-substrate#products-and-services) that may relate to operation of nodes." ContentLicense="CC BY-SA 4.0" />
  <row Id="5153" PostHistoryTypeId="24" PostId="1016" RevisionGUID="dbe96eaf-b3df-4969-a505-e461de25ef51" CreationDate="2022-03-30T08:49:09.553" Comment="Proposed by 34 approved by 85, 94 edit id of 100" ContentLicense="CC BY-SA 4.0" />
  <row Id="5154" PostHistoryTypeId="5" PostId="1374" RevisionGUID="39495f89-02b1-4780-99f9-c0638b3fbe10" CreationDate="2022-03-30T08:49:23.917" UserId="172" Comment="added 299 characters in body" Text="Rococo is a test network set aside for testing parachains, cumulus, and related technologies. Test networks in the Polkadot ecosystem are experimental networks where testing and development takes place. Networks are often executed on a testnet before they are deployed to a main, production network." ContentLicense="CC BY-SA 4.0" />
  <row Id="5155" PostHistoryTypeId="24" PostId="1374" RevisionGUID="39495f89-02b1-4780-99f9-c0638b3fbe10" CreationDate="2022-03-30T08:49:23.917" Comment="Proposed by 172 approved by 85, 94 edit id of 125" ContentLicense="CC BY-SA 4.0" />
  <row Id="5156" PostHistoryTypeId="5" PostId="1375" RevisionGUID="ff41aa4f-4e98-432e-8619-0583aba3bf0b" CreationDate="2022-03-30T08:50:17.303" UserId="172" Comment="added 40 characters in body" Text="Questions about the Rococo test network." ContentLicense="CC BY-SA 4.0" />
  <row Id="5157" PostHistoryTypeId="24" PostId="1375" RevisionGUID="ff41aa4f-4e98-432e-8619-0583aba3bf0b" CreationDate="2022-03-30T08:50:17.303" Comment="Proposed by 172 approved by 85, 94 edit id of 126" ContentLicense="CC BY-SA 4.0" />
  <row Id="5158" PostHistoryTypeId="2" PostId="1413" RevisionGUID="35ef2e57-0447-4a20-a8bb-bee943265f6e" CreationDate="2022-03-30T09:04:30.637" UserId="415" Text="The parachain node and the relay chain node were tightly coupled and could not be run individually. The parachain node directly calls into the relay chain client. Not all of the required relay chain functionality is exposed via RPC API, so separation of the nodes is not straightforward.&#xD;&#xA;&#xD;&#xA;However, there is an ongoing effort to separate these two nodes and give users the option to run them separately: https://github.com/paritytech/cumulus/issues/545. Once this work is finished, you will be able to run the parachain and relay chain nodes as individual processes. In recent versions of cumulus, there is already experimental support for running parachain full nodes with the following command:&#xD;&#xA;&#xD;&#xA;```polkadot-collator --relay-chain-rpc-url ws://localhost:&lt;relay_chain_rpc_ws_port&gt; ...```  &#xD;&#xA;&#xD;&#xA;The `relay-chain-rpc-url` should point to the WebSocket API of your running relay chain full node.&#xD;&#xA;&#xD;&#xA;Please note that collation is currently not supported, so you cannot supply the `--validator` or `--collator` flags in combination with `--relay-chain-rpc-url`." ContentLicense="CC BY-SA 4.0" />
  <row Id="5160" PostHistoryTypeId="2" PostId="1414" RevisionGUID="31c22321-15e3-49b0-a5ec-11df1c0e1bd6" CreationDate="2022-03-30T09:19:38.297" UserId="94" Text="Yes you can use the [frame_benchmarking::account](https://docs.substrate.io/rustdocs/latest/frame_benchmarking/fn.account.html) function to derive accounts deterministically.  &#xD;&#xA;It is possible to vary them with a seed, if needed.  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_benchmarking::{account, whitelist};&#xD;&#xA;&#xD;&#xA;const SEED: u32 = 1;&#xD;&#xA;&#xD;&#xA;benchmarks! {&#xD;&#xA;    set_value {&#xD;&#xA;&#xD;&#xA;        let caller: T::AccountId = account(&quot;Alice&quot;, 0, SEED);&#xD;&#xA;        whitelist!(caller);&#xD;&#xA;&#xD;&#xA;    }: _(RawOrigin::Signed(caller), 2)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The `whitelist` macro invocation is important to make the signing part work.  &#xD;&#xA;Otherwise if you just need *a* fixed account, you can use the [whitelisted_caller](https://docs.substrate.io/rustdocs/latest/frame_benchmarking/fn.whitelisted_caller.html) account." ContentLicense="CC BY-SA 4.0" />
  <row Id="5162" PostHistoryTypeId="2" PostId="1415" RevisionGUID="3a3479ae-7317-4d97-ae0e-bfe2f4b3f914" CreationDate="2022-03-30T09:51:34.267" UserId="1837" Text="I am trying to recover a ecdsa pub key from the given signature and data. But returned pubkey does not match with the signer. Is there something that is missing or wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let pair = ecdsa::Pair::from_string(&amp;format!(&quot;//{}&quot;,1), None).unwrap();&#xD;&#xA;let t_hash = keccak_256(b&quot;Hello&quot;);&#xD;&#xA;let new_signature = pair.sign(&amp;t_hash);&#xD;&#xA;if let Ok(recover_pub_key) = sp_io::crypto::secp256k1_ecdsa_recover(&amp;new_signature.0, &amp;t_hash) {&#xD;&#xA;	print!(&quot;This is recovered key : {:?}&quot;,recover_pub_key);&#xD;&#xA;	} else {&#xD;&#xA;		print!(&quot;recovery failed ...!&quot;);&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;signer publicKey : [3, 51, 2, 40, 152, 20, 6, 98, 223, 234, 132, 126, 60, 191, 229, 233, 137, 132, 90, 198, 118, 110, 131, 71, 47, 139, 12, 101, 13, 133, 231, 123, 174]&#xD;&#xA;&#xD;&#xA;Recovered PublicKey : [81, 75, 231, 120, 203, 190, 133, 220, 74, 33, 169, 246, 87, 80, 28, 196, 89, 171, 118, 173, 174, 27, 147, 176, 42, 53, 71, 229, 36, 36, 0, 90, 52, 165, 231, 253, 187, 118, 225, 90, 140, 119, 23, 194, 231, 252, 99, 207, 211, 84, 179, 184, 245, 248, 243, 215, 56, 53, 26, 252, 92, 230, 14, 218]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5164" PostHistoryTypeId="1" PostId="1415" RevisionGUID="3a3479ae-7317-4d97-ae0e-bfe2f4b3f914" CreationDate="2022-03-30T09:51:34.267" UserId="1837" Text="Recover ECDSA pub key from signature" ContentLicense="CC BY-SA 4.0" />
  <row Id="5165" PostHistoryTypeId="3" PostId="1415" RevisionGUID="3a3479ae-7317-4d97-ae0e-bfe2f4b3f914" CreationDate="2022-03-30T09:51:34.267" UserId="1837" Text="|signing|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5166" PostHistoryTypeId="2" PostId="1416" RevisionGUID="c2bdae6f-1930-4dc4-b154-7a45c6b5c22b" CreationDate="2022-03-30T10:32:56.527" UserId="544" Text="Is it possible / how to build a Beefy super light client for Kusama or Polkadot?&#xD;&#xA;&#xD;&#xA;Beefy is designed to make the syncing process and finality proof very succinct to enable Ethereum on-chain light client. I want to build a super light client that can validate the storage at some recent blocks but doesn't require to download the full relay chain history. We used to have a GRANDPA light client, but to validate the recent storage proof, it has to sync all the historical blocks. Therefore the client must have the access to a full Kusama archive node with over 600 GiB database.&#xD;&#xA;&#xD;&#xA;I've already read the Beefy docs from [here](https://github.com/paritytech/grandpa-bridge-gadget/blob/master/docs/walkthrough.md). However it's still unclear how to build a light client that can only sync from a pruned relay chain node." ContentLicense="CC BY-SA 4.0" />
  <row Id="5168" PostHistoryTypeId="1" PostId="1416" RevisionGUID="c2bdae6f-1930-4dc4-b154-7a45c6b5c22b" CreationDate="2022-03-30T10:32:56.527" UserId="544" Text="How to build a &quot;super light&quot; bridge based on Beefy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5169" PostHistoryTypeId="3" PostId="1416" RevisionGUID="c2bdae6f-1930-4dc4-b154-7a45c6b5c22b" CreationDate="2022-03-30T10:32:56.527" UserId="544" Text="|polkadot|grandpa|beefy|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5170" PostHistoryTypeId="2" PostId="1417" RevisionGUID="bc606db9-0873-4927-8a89-2ff591ed0b99" CreationDate="2022-03-30T10:37:55.283" UserId="139" Text="If you are building a pallet testing just the pallet instead of building the entire thing is better. Just run `cargo check -p your_pallet_name`." ContentLicense="CC BY-SA 4.0" />
  <row Id="5172" PostHistoryTypeId="2" PostId="1418" RevisionGUID="02ff151d-5612-4fb0-abb2-17f337730061" CreationDate="2022-03-30T10:38:09.090" UserId="1987" Text="While registering the paraID on rococo testnet I'm getting an error registrar.AlreadyRegistered &#xD;&#xA;it is assigning me 2015 ID which is already in use.&#xD;&#xA; [![enter image description here][1]][1] [![enter image description here][2]][2]&#xD;&#xA;I need to know that how I register a unique paraID? or how I can find my paraID is unique?&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Can someone please guide where am I going wrong? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ks4HQ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/OAnh3.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5174" PostHistoryTypeId="1" PostId="1418" RevisionGUID="02ff151d-5612-4fb0-abb2-17f337730061" CreationDate="2022-03-30T10:38:09.090" UserId="1987" Text="Getting already assigned paraID" ContentLicense="CC BY-SA 4.0" />
  <row Id="5175" PostHistoryTypeId="3" PostId="1418" RevisionGUID="02ff151d-5612-4fb0-abb2-17f337730061" CreationDate="2022-03-30T10:38:09.090" UserId="1987" Text="|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5176" PostHistoryTypeId="2" PostId="1419" RevisionGUID="20e5c75f-8b33-4f83-bf58-0718e52eec8d" CreationDate="2022-03-30T10:42:21.110" UserId="94" Text="Making your code work required:&#xD;&#xA;- Using `sign_prehashed` instead of `sign`&#xD;&#xA;- `secp256k1_ecdsa_recover_compressed` instead of `secp256k1_ecdsa_recover`&#xD;&#xA;- Using `ecdsa::Public::from_raw` to construct the recovered PK&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_core::{ecdsa, keccak_256, Pair};&#xD;&#xA;use sp_io::crypto::secp256k1_ecdsa_recover_compressed;&#xD;&#xA;&#xD;&#xA;let pair = ecdsa::Pair::from_string(&amp;format!(&quot;//{}&quot;,1), None).unwrap();&#xD;&#xA;let hash = keccak_256(b&quot;Hello&quot;);&#xD;&#xA;let signature = pair.sign_prehashed(&amp;hash);&#xD;&#xA;&#xD;&#xA;if let Ok(recovered_raw) = secp256k1_ecdsa_recover_compressed(&amp;signature.0, &amp;hash) {&#xD;&#xA;	let recovered = ecdsa::Public::from_raw(recovered_raw);&#xD;&#xA;	// Assert that we recovered the correct PK.&#xD;&#xA;	assert_eq!(pair.public(), recovered);&#xD;&#xA;} else {&#xD;&#xA;	println!(&quot;recovery failed ...!&quot;);&#xD;&#xA;}&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;There are much better ways to do this than directly using the low-level primitives.  &#xD;&#xA;Maybe [this question](https://substrate.stackexchange.com/questions/305/how-to-verify-a-signature-in-a-pallet) better fits your use-case." ContentLicense="CC BY-SA 4.0" />
  <row Id="5178" PostHistoryTypeId="5" PostId="1329" RevisionGUID="92ba943d-c032-4b40-bc3b-dbf159eb1278" CreationDate="2022-03-30T10:47:56.003" UserId="251" Comment="added 142 characters in body" Text="If I want to migrate the `Balance::Locks` to a new structure. &#xD;&#xA;Imagine there are millions of accounts in the storage.&#xD;&#xA;&#xD;&#xA;This is what I came out. Is this the right way? Split them into multiple blocks. If yes, how can I record the pos?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;storage OldLocks&#xD;&#xA;storage NewLocks&#xD;&#xA;storage LastPos&#xD;&#xA;&#xD;&#xA;fn on_new_block() {&#xD;&#xA;    LastPos::put(migrate_from(LastPos::get()));&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Aka the locks' `getter` during the migration&#xD;&#xA;fn lock_of(account) -&gt; Amount {&#xD;&#xA;    let mut locks = [];&#xD;&#xA;&#xD;&#xA;    if let Some(lock) = NewLocks::get(account) {&#xD;&#xA;        locks.append(lock);&#xD;&#xA;    }&#xD;&#xA;    if let Some(lock) = OldLocks::get(account) {&#xD;&#xA;        locks.append(lock);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    return locks.cal_total_lock_amount();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Furthermore, what if I want to keep using the old name? I don't want to break the API. `move_prefix(b&quot;Locks&quot;, b&quot;OldLocks&quot;)` first, does this take too much weights?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5179" PostHistoryTypeId="4" PostId="1418" RevisionGUID="9269acfa-b2ec-41fc-909d-b8be97319aa0" CreationDate="2022-03-30T11:11:55.807" UserId="1987" Comment="edited tags; edited title" Text="Getting already assigned paraID while registering paraid" ContentLicense="CC BY-SA 4.0" />
  <row Id="5180" PostHistoryTypeId="6" PostId="1418" RevisionGUID="9269acfa-b2ec-41fc-909d-b8be97319aa0" CreationDate="2022-03-30T11:11:55.807" UserId="1987" Comment="edited tags; edited title" Text="|parachain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5181" PostHistoryTypeId="5" PostId="1418" RevisionGUID="d6450187-4ced-4c1b-9b76-d8391322ae6f" CreationDate="2022-03-30T11:17:44.993" UserId="1987" Comment="edited tags; edited title" Text="Background - I have relay chain setup that is able to connect to local rococo testnet, and I am trying to obtain and register unique para_id on Rococo testnet via the polkadotjs app. I have provided the next available id as described in the document, but we received an error that it's already registered.&#xD;&#xA;&#xD;&#xA;Details of the error are below:&#xD;&#xA;&#xD;&#xA;it is assigning me 2015 ID which is already in use.&#xD;&#xA; [![enter image description here][1]][1] [![enter image description here][2]][2]&#xD;&#xA;I need to know that how I register a unique paraID? or how I can find my paraID is unique?&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Can someone please guide where am I going wrong? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ks4HQ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/OAnh3.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5182" PostHistoryTypeId="4" PostId="1418" RevisionGUID="d6450187-4ced-4c1b-9b76-d8391322ae6f" CreationDate="2022-03-30T11:17:44.993" UserId="1987" Comment="edited tags; edited title" Text="Provided next available para id is already registered" ContentLicense="CC BY-SA 4.0" />
  <row Id="5183" PostHistoryTypeId="2" PostId="1420" RevisionGUID="9e94530c-6901-4323-b6bb-d226059af8da" CreationDate="2022-03-30T11:19:07.507" UserId="627" Text="There seems to be an inconsistency between the parachains and the registrar. The Rococo state indeed refers to 2015 as the next free id, and it is indeed already assigned -&#xD;&#xA;&#xD;&#xA;[![current nextFreeId][1]][1]&#xD;&#xA;&#xD;&#xA;What you may be able to do is to register it manually via extrinsics, &#xD;&#xA;&#xD;&#xA;[![manual register][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VXUwd.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/qW6lF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5185" PostHistoryTypeId="2" PostId="1421" RevisionGUID="aab78069-e055-46e1-9a47-044479b937b6" CreationDate="2022-03-30T11:37:40.343" UserId="125" Text="I am struggling with `#[runtime_interface]` the whole day. here is the [Runtime Interface Trait Defination](https://github.com/darwinia-network/darwinia-common/blob/main/primitives/evm-trace/ext/src/lib.rs), the expanded macro is too long to paste here, here is a [expanded macro](https://gist.github.com/AsceticBear/be8ea70c6a1e4848468824fd4832dc23). I have lots of questions here.&#xD;&#xA;&#xD;&#xA;- From the [runtime_interface rust doc](https://crates.parity.io/sp_runtime_interface/attr.runtime_interface.html):&#xD;&#xA;&gt; This interface is callable from a native and a wasm runtime. The macro will generate the corresponding code for the native implementation and the code for calling from the wasm side to the native implementation.&#xD;&#xA;&#xD;&#xA;What I understand here(If wrong, please correct me):&#xD;&#xA;&#xD;&#xA;1. This HostFunction will be registered in the executor, this belongs to the node side.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub struct HostFunctions;&#xD;&#xA;impl proc_macro_runtime_interface::sp_wasm_interface::HostFunctions for HostFunctions{...}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. I do not know what `&amp;mut dyn proc_macro_runtime_interface::Externalities` is, but I guess this is for the runtime side. Can somebody explain how to understand the `Externalities` here?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;impl DvmExt for &amp;mut dyn proc_macro_runtime_interface::Externalities {...}&#xD;&#xA;```&#xD;&#xA;3. Other generated code(part of it). I guess this is `the code for calling from the wasm side to the native implementation.` I noticed that this function uses `proc_macro_runtime_interface::with_externalities(...)` and I found [Use sp_externalities::with_externalities](https://crates.parity.io/sp_externalities/fn.with_externalities.html). But, I am still don't know how this function call from wasm side to the native side.&#xD;&#xA;&#xD;&#xA; ```rs&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;/// An `Evm` event proxied by the runtime to this host function.&#xD;&#xA;/// evm -&gt; runtime -&gt; host.&#xD;&#xA;fn evm_event_version_1(event: Vec&lt;u8&gt;) {&#xD;&#xA;    {&#xD;&#xA;        use ::tracing::__macro_support::Callsite as _;&#xD;&#xA;        static CALLSITE: ::tracing::__macro_support::MacroCallsite = {&#xD;&#xA;            use ::tracing::__macro_support::MacroCallsite;&#xD;&#xA;            static META: ::tracing::Metadata&lt;'static&gt; = {&#xD;&#xA;                ::tracing_core::metadata::Metadata::new(&#xD;&#xA;                    &quot;evm_event_version_1&quot;,&#xD;&#xA;                    &quot;dp_evm_trace_ext::dvm_ext&quot;,&#xD;&#xA;                    ::tracing::Level::TRACE,&#xD;&#xA;                    Some(&quot;primitives/evm-trace/ext/src/lib.rs&quot;),&#xD;&#xA;                    Some(31u32),&#xD;&#xA;                    Some(&quot;dp_evm_trace_ext::dvm_ext&quot;),&#xD;&#xA;                    ::tracing_core::field::FieldSet::new(&#xD;&#xA;                        &amp;[],&#xD;&#xA;                        ::tracing_core::callsite::Identifier(&amp;CALLSITE),&#xD;&#xA;                    ),&#xD;&#xA;                    ::tracing::metadata::Kind::SPAN,&#xD;&#xA;                )&#xD;&#xA;            };&#xD;&#xA;            MacroCallsite::new(&amp;META)&#xD;&#xA;        };&#xD;&#xA;        let mut interest = ::tracing::subscriber::Interest::never();&#xD;&#xA;        if ::tracing::Level::TRACE &lt;= ::tracing::level_filters::STATIC_MAX_LEVEL&#xD;&#xA;            &amp;&amp; ::tracing::Level::TRACE &lt;= ::tracing::level_filters::LevelFilter::current()&#xD;&#xA;            &amp;&amp; {&#xD;&#xA;                interest = CALLSITE.interest();&#xD;&#xA;                !interest.is_never()&#xD;&#xA;            }&#xD;&#xA;            &amp;&amp; CALLSITE.is_enabled(interest)&#xD;&#xA;        {&#xD;&#xA;            let meta = CALLSITE.metadata();&#xD;&#xA;            ::tracing::Span::new(meta, &amp;{ meta.fields().value_set(&amp;[]) })&#xD;&#xA;        } else {&#xD;&#xA;            let span = CALLSITE.disabled_span();&#xD;&#xA;            {};&#xD;&#xA;            span&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    .in_scope(|| {&#xD;&#xA;        proc_macro_runtime_interface::with_externalities(|mut __externalities__| {&#xD;&#xA;            DvmExt::evm_event_version_1(&amp;mut __externalities__, event)&#xD;&#xA;        })&#xD;&#xA;        .expect(&quot;`evm_event_version_1` called outside of an Externalities-provided environment.&quot;)&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;4. After all the above things are done. What is the common way to call from the wasm side to the native side or the native side to the wasm side? Is there any example for beginners to understand?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5187" PostHistoryTypeId="1" PostId="1421" RevisionGUID="aab78069-e055-46e1-9a47-044479b937b6" CreationDate="2022-03-30T11:37:40.343" UserId="125" Text="How to understand [runtime-interface] and `Externalities`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5188" PostHistoryTypeId="3" PostId="1421" RevisionGUID="aab78069-e055-46e1-9a47-044479b937b6" CreationDate="2022-03-30T11:37:40.343" UserId="125" Text="|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5189" PostHistoryTypeId="2" PostId="1422" RevisionGUID="9d22c62c-94ed-4acf-bef0-cacb5a89a74e" CreationDate="2022-03-30T12:50:32.760" UserId="434" Text="As an example, in the Kitties tutorial :&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;pub enum Gender {&#xD;&#xA;    Male,&#xD;&#xA;    Female,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Why do we use Serialize and Deserialize given that the implementations are not compiled when building the WASM runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5191" PostHistoryTypeId="1" PostId="1422" RevisionGUID="9d22c62c-94ed-4acf-bef0-cacb5a89a74e" CreationDate="2022-03-30T12:50:32.760" UserId="434" Text="What is the benefit of using Serde::Serialize/Deserialize on defined types?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5192" PostHistoryTypeId="3" PostId="1422" RevisionGUID="9d22c62c-94ed-4acf-bef0-cacb5a89a74e" CreationDate="2022-03-30T12:50:32.760" UserId="434" Text="|pallet|runtime|kitties-tutorial|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5193" PostHistoryTypeId="4" PostId="1410" RevisionGUID="a338c27e-cb38-4da5-b880-fcf5e3053e66" CreationDate="2022-03-30T13:58:55.567" UserId="1837" Comment="edited title" Text="Convert [u8;32] to AccountId" ContentLicense="CC BY-SA 4.0" />
  <row Id="5194" PostHistoryTypeId="2" PostId="1423" RevisionGUID="9693da6a-21fc-43f2-85a5-559d3adcb872" CreationDate="2022-03-30T14:05:00.817" UserId="351" Text="    #[derive(Encode,Decode,TypeInfo)&#xD;&#xA;    #[scale_info(skip_type_params(T))]&#xD;&#xA;    Pub struct Asset&lt;T:Config&gt; {&#xD;&#xA;    Id:###&#xD;&#xA;    Name:##&#xD;&#xA;    }&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;  So in the above example if you dont include the second macro. The compiler will yell at you that typeinfo is not implemented in type T. &#xD;&#xA;But if you includr the macro it compiles fine. &#xD;&#xA;So what does the macro do to the struct and how does it tackle the issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5196" PostHistoryTypeId="1" PostId="1423" RevisionGUID="9693da6a-21fc-43f2-85a5-559d3adcb872" CreationDate="2022-03-30T14:05:00.817" UserId="351" Text="What is the role of this macro?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5197" PostHistoryTypeId="3" PostId="1423" RevisionGUID="9693da6a-21fc-43f2-85a5-559d3adcb872" CreationDate="2022-03-30T14:05:00.817" UserId="351" Text="|substrate-node|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5198" PostHistoryTypeId="5" PostId="1420" RevisionGUID="d2b75f69-6fb8-4f59-a7ad-1529ab18c967" CreationDate="2022-03-30T14:16:48.860" UserId="627" Comment="added 533 characters in body" Text="There seems to be an inconsistency between the parachains and the registrar. The Rococo state indeed refers to 2015 as the next free id, and it is indeed already assigned -&#xD;&#xA;&#xD;&#xA;[![current nextFreeId][1]][1]&#xD;&#xA;&#xD;&#xA;(This part edited from the comment below, the original comment for calling `register` was incorrect) &#xD;&#xA;&#xD;&#xA;Since the UI button only calls `registrar.reserve()` here and the logic is all handled by the runtime, it certainly points to an inconsistency. Internally [`reserve` gets the next free id](https://github.com/paritytech/polkadot/blob/b9d52210c1a0b2d9ea7eae3bec8a8cb57666f854/runtime/common/src/paras_registrar.rs#L344-L350)&#xD;&#xA;&#xD;&#xA;Where it fails then is in [`do_reserve`](https://github.com/paritytech/polkadot/blob/b9d52210c1a0b2d9ea7eae3bec8a8cb57666f854/runtime/common/src/paras_registrar.rs#L488) checking the lifecycle. &#xD;&#xA;&#xD;&#xA;So in this case I would suggest `sudo` to do an adjustment of that next_free storage location - since it maps to something already registered, it cannot move forward.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VXUwd.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5199" PostHistoryTypeId="10" PostId="1328" RevisionGUID="fd350f92-5d21-4360-adfb-ec7f4cd28056" CreationDate="2022-03-30T15:20:56.767" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:280,&quot;DisplayName&quot;:&quot;William Freudenberger&quot;},{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Alejandro Martínez&quot;},{&quot;Id&quot;:85,&quot;DisplayName&quot;:&quot;Squirrel&quot;}]}" />
  <row Id="5200" PostHistoryTypeId="5" PostId="1419" RevisionGUID="bc289c53-6208-4e34-b74c-061098b09291" CreationDate="2022-03-30T15:26:19.247" UserId="94" Comment="deleted 2 characters in body" Text="Making your code work required:&#xD;&#xA;- Using `sign_prehashed` instead of `sign`&#xD;&#xA;- `secp256k1_ecdsa_recover_compressed` instead of `secp256k1_ecdsa_recover`&#xD;&#xA;- Using `ecdsa::Public::from_raw` to construct the recovered PK&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_core::{ecdsa, keccak_256, Pair};&#xD;&#xA;use sp_io::crypto::secp256k1_ecdsa_recover_compressed;&#xD;&#xA;&#xD;&#xA;let pair = ecdsa::Pair::from_string(&amp;format!(&quot;//{}&quot;,1), None).unwrap();&#xD;&#xA;let hash = keccak_256(b&quot;Hello&quot;);&#xD;&#xA;let signature = pair.sign_prehashed(&amp;hash);&#xD;&#xA;&#xD;&#xA;if let Ok(recovered_raw) = secp256k1_ecdsa_recover_compressed(&amp;signature.0, &amp;hash) {&#xD;&#xA;	let recovered = ecdsa::Public::from_raw(recovered_raw);&#xD;&#xA;	// Assert that we recovered the correct PK.&#xD;&#xA;	assert_eq!(pair.public(), recovered);&#xD;&#xA;} else {&#xD;&#xA;	panic!(&quot;recovery failed ...!&quot;);&#xD;&#xA;}&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;There are much better ways to do this than directly using the low-level primitives.  &#xD;&#xA;Maybe [this question](https://substrate.stackexchange.com/questions/305/how-to-verify-a-signature-in-a-pallet) better fits your use-case." ContentLicense="CC BY-SA 4.0" />
  <row Id="5201" PostHistoryTypeId="10" PostId="1125" RevisionGUID="dfca29c5-39a3-4bde-870b-d47bdb2f751e" CreationDate="2022-03-30T15:27:49.170" UserId="-1" Comment="105" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:459,&quot;DisplayName&quot;:&quot;Kittywhiskers Van Gogh&quot;},{&quot;Id&quot;:32,&quot;DisplayName&quot;:&quot;DrW3RK&quot;}]}" />
  <row Id="5204" PostHistoryTypeId="2" PostId="1425" RevisionGUID="59379ebb-8f59-4b6e-88e9-61a00bf9a2f1" CreationDate="2022-03-30T15:49:38.580" UserId="140" Text="We generated WASM and State files to submit on Rococo. It went fine and we get successfully registered as parachain on Rococo. &#xD;&#xA;&#xD;&#xA;Can we use the same WASM and State files for registering parathread on Kusama, which we used for Rococo?&#xD;&#xA;&#xD;&#xA;Or &#xD;&#xA;&#xD;&#xA;We need to generate again on our mainnet server, which we are using to integrate with Kusama." ContentLicense="CC BY-SA 4.0" />
  <row Id="5206" PostHistoryTypeId="1" PostId="1425" RevisionGUID="59379ebb-8f59-4b6e-88e9-61a00bf9a2f1" CreationDate="2022-03-30T15:49:38.580" UserId="140" Text="Can we use same WASM and State files for registering parathread on Kusama, which we used for Rococo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5207" PostHistoryTypeId="3" PostId="1425" RevisionGUID="59379ebb-8f59-4b6e-88e9-61a00bf9a2f1" CreationDate="2022-03-30T15:49:38.580" UserId="140" Text="|substrate-node|polkadot|kusama|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5208" PostHistoryTypeId="2" PostId="1426" RevisionGUID="c8bc06c5-3c30-4768-b56c-0db8ddc02bb0" CreationDate="2022-03-30T15:55:53.420" UserId="1849" Text="My understanding is that `--pruning` remove the old trie nodes but does not delete the content of the blocks, is there a way to also delete the blocks/transaction up to some point and only keep states to save on storage. " ContentLicense="CC BY-SA 4.0" />
  <row Id="5210" PostHistoryTypeId="1" PostId="1426" RevisionGUID="c8bc06c5-3c30-4768-b56c-0db8ddc02bb0" CreationDate="2022-03-30T15:55:53.420" UserId="1849" Text="Is there a way to prune blocks/transactions from the database" ContentLicense="CC BY-SA 4.0" />
  <row Id="5211" PostHistoryTypeId="3" PostId="1426" RevisionGUID="c8bc06c5-3c30-4768-b56c-0db8ddc02bb0" CreationDate="2022-03-30T15:55:53.420" UserId="1849" Text="|database|pruning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5212" PostHistoryTypeId="2" PostId="1427" RevisionGUID="bfd2bb71-1dff-43fa-9703-6132bcb7750d" CreationDate="2022-03-30T16:07:18.037" UserId="172" Text="[Interlay (interBTC)](https://docs.interlay.io/#/) is a parachain that allows users to use their BTC on other parachains by locking up BTC in vaults, which, if I understood correctly act as a network of verifiers. What are the differences between running a vault client and running a collator node? What constraints are interBTC vaults faced with that traditional collators aren't ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5214" PostHistoryTypeId="1" PostId="1427" RevisionGUID="bfd2bb71-1dff-43fa-9703-6132bcb7750d" CreationDate="2022-03-30T16:07:18.037" UserId="172" Text="How are interBTC vaults different from collators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5215" PostHistoryTypeId="3" PostId="1427" RevisionGUID="bfd2bb71-1dff-43fa-9703-6132bcb7750d" CreationDate="2022-03-30T16:07:18.037" UserId="172" Text="|parachain|parachain-collator|interbtc|bitcoin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5216" PostHistoryTypeId="2" PostId="1428" RevisionGUID="d0eb28f9-b893-411a-b1da-40fcda8a734b" CreationDate="2022-03-30T16:34:59.720" UserId="28" Text="The answer to this question is similar to the answer here:&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/619/how-to-fix-parity-scale-codecmaxencodedlen-is-not-implemented-for-t/620#620&#xD;&#xA;&#xD;&#xA;Basically, Rust macros are not that intelligent. In the case of the `TypeInfo` derive macro, we parse the underlying object, and try to turn it into some JSON expressed type which can be put in the metadata and used by front-ends.&#xD;&#xA;&#xD;&#xA;While this type is generic over `&lt;T: Config&gt;`, we don't actually want to (or need to) include this information in the `TypeInfo` generation. This is really a Rust generic bound, so it does not make sense to include it in this context.&#xD;&#xA;&#xD;&#xA;However, the macro does not know that, so we have `#[scale_info(skip_type_params(T))]` to be able to tell the macro to simply skip this when generating the `TypeInfo`, and that makes everything work." ContentLicense="CC BY-SA 4.0" />
  <row Id="5218" PostHistoryTypeId="4" PostId="1423" RevisionGUID="a74baf94-13dc-4505-af03-d884af9db050" CreationDate="2022-03-30T16:35:14.783" UserId="28" Comment="edited title" Text="What is the role of `#[scale_info(skip_type_params(T))]`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5219" PostHistoryTypeId="6" PostId="1423" RevisionGUID="a74baf94-13dc-4505-af03-d884af9db050" CreationDate="2022-03-30T16:35:14.783" UserId="28" Comment="edited title" Text="|runtime|scale-codec|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5220" PostHistoryTypeId="2" PostId="1429" RevisionGUID="20272dac-90e5-4189-995c-3a5692e80b54" CreationDate="2022-03-30T17:27:31.800" UserId="139" Text="This may be a dumb question because I don't understand the concept of session keys well enough and neither have extensive experience using shell loops: in substrate one finds this comment telling us how to generate keys for a network: &#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;# stash, controller, session-key&#xD;&#xA;# generated with secret:&#xD;&#xA;for i in 1 2 3 4 ; do for j in stash controller; do subkey inspect &quot;$secret&quot;/fir/$j/$i; done; done&#xD;&#xA;#&#xD;&#xA;# and&#xD;&#xA;#&#xD;&#xA;for i in 1 2 3 4 ; do for j in session; do subkey --ed25519 inspect &quot;$secret&quot;//fir//$j//$i; done; done&#xD;&#xA;```&#xD;&#xA;I have trouble understanding both these commands.&#xD;&#xA;&#xD;&#xA;1. In `do for j in stash controller` which one is it? `$j` can either be `stash` or `controller`?&#xD;&#xA;2. In `do for j in session` what is `session` and how does one get it? &#xD;&#xA;&#xD;&#xA;I understand `$i` loops over the number of authorities, the only problem is I don't understand how `$j` is chosen in both instances." ContentLicense="CC BY-SA 4.0" />
  <row Id="5222" PostHistoryTypeId="1" PostId="1429" RevisionGUID="20272dac-90e5-4189-995c-3a5692e80b54" CreationDate="2022-03-30T17:27:31.800" UserId="139" Text="How to generate keys for authorities?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5223" PostHistoryTypeId="3" PostId="1429" RevisionGUID="20272dac-90e5-4189-995c-3a5692e80b54" CreationDate="2022-03-30T17:27:31.800" UserId="139" Text="|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5224" PostHistoryTypeId="5" PostId="1429" RevisionGUID="1d844226-a874-41e8-a4a2-64c3494babe3" CreationDate="2022-03-30T17:34:52.043" UserId="139" Comment="deleted 287 characters in body" Text="This may be a dumb question because I don't understand the concept of session keys well enough and neither have extensive experience using shell loops: in substrate one finds this comment telling us how to generate keys for a network: &#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;# stash, controller, session-key&#xD;&#xA;# generated with secret:&#xD;&#xA;for i in 1 2 3 4 ; do for j in stash controller; do subkey inspect &quot;$secret&quot;/fir/$j/$i; done; done&#xD;&#xA;#&#xD;&#xA;# and&#xD;&#xA;#&#xD;&#xA;for i in 1 2 3 4 ; do for j in session; do subkey --ed25519 inspect &quot;$secret&quot;//fir//$j//$i; done; done&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In `do for j in session` what is `session` and how does one get it? &#xD;&#xA;Is it some sort of `secret` such that for one authority three keys distinct derivations are generated like the following? &#xD;&#xA;1. `$secret/stash-secret`&#xD;&#xA;2. `$secret/controller-secret`&#xD;&#xA;3. `$secret/session-secret`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5225" PostHistoryTypeId="2" PostId="1430" RevisionGUID="888a64ad-201e-4ff9-9e74-ae8dc9211c8a" CreationDate="2022-03-30T18:22:04.140" UserId="85" Text="If you look in the cumulus repo at statemint, you'll see how we set out westmint, statemine and statemint as separate runtimes.&#xD;&#xA;&#xD;&#xA;There are going to be different assumptions and constants in the different relay chains so one would want to benchmark each runtime separately, and thus you would want separate runtimes.&#xD;&#xA;&#xD;&#xA;You can still extract common values to avoid repeating yourself. E.g. https://github.com/paritytech/cumulus/blob/master/polkadot-parachains/parachains-common/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="5228" PostHistoryTypeId="5" PostId="1373" RevisionGUID="9fd42428-0759-4de7-b1cc-69d7fa538fb0" CreationDate="2022-03-30T20:21:45.187" UserId="172" Comment="added 106 characters in body" Text="Questions relating to custom RPC implementations or using existing RPCs to make calls to a Substrate node." ContentLicense="CC BY-SA 4.0" />
  <row Id="5229" PostHistoryTypeId="24" PostId="1373" RevisionGUID="9fd42428-0759-4de7-b1cc-69d7fa538fb0" CreationDate="2022-03-30T20:21:45.187" Comment="Proposed by 172 approved by 85, 83 edit id of 123" ContentLicense="CC BY-SA 4.0" />
  <row Id="5230" PostHistoryTypeId="5" PostId="228" RevisionGUID="28f90e47-ce58-4bb2-824d-5dfacde6bbda" CreationDate="2022-03-30T20:23:32.620" UserId="172" Comment="added 83 characters in body" Text="Any questions relating to the Grandpa pallet or block finality in Substrate chains." ContentLicense="CC BY-SA 4.0" />
  <row Id="5231" PostHistoryTypeId="24" PostId="228" RevisionGUID="28f90e47-ce58-4bb2-824d-5dfacde6bbda" CreationDate="2022-03-30T20:23:32.620" Comment="Proposed by 172 approved by 85, 83 edit id of 124" ContentLicense="CC BY-SA 4.0" />
  <row Id="5232" PostHistoryTypeId="5" PostId="1367" RevisionGUID="a910f206-85ce-4cd7-8fab-ee8f91716b32" CreationDate="2022-03-30T20:24:13.817" UserId="172" Comment="added 139 characters in body" Text="Questions that refer to using Polkadot JS api, a Javascript API to build front-end applications designed to interact with a Substrate node." ContentLicense="CC BY-SA 4.0" />
  <row Id="5233" PostHistoryTypeId="24" PostId="1367" RevisionGUID="a910f206-85ce-4cd7-8fab-ee8f91716b32" CreationDate="2022-03-30T20:24:13.817" Comment="Proposed by 172 approved by 85, 83 edit id of 122" ContentLicense="CC BY-SA 4.0" />
  <row Id="5235" PostHistoryTypeId="2" PostId="1431" RevisionGUID="1819e0d1-ae32-47a7-b91b-c6ae4a0ea830" CreationDate="2022-03-31T01:14:53.230" UserId="1925" Text="I recommend reading well written wikipage about different keys: https://wiki.polkadot.network/docs/learn-keys&#xD;&#xA;&#xD;&#xA;Sessionkeys are hotkeys saved on your validator node. Normally generate them with RPC-command rotatekeys:&#xD;&#xA;```&#xD;&#xA;'curl -H &quot;Content-Type: application/json&quot; -d '\''{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;author_rotateKeys&quot;, &quot;params&quot;:[]}'\'' http://localhost:9933 &gt;&gt; ~/sessionkeys.log &amp;&amp; tail -1 ~/sessionkeys.log&#xD;&#xA;```&#xD;&#xA;This script saves your sessionkeys in log file every time you rotate them, but you can also find all the sessionkeys at /home/$USER/.local/share/polkadot/chains/$CHAIN/keystore&#xD;&#xA;&#xD;&#xA;This looped command you have found seems to be more about inspecting existing keys. To generate stash and controller keys, you can repeat following subkey commnad twice and save the mnemonics.&#xD;&#xA;```&#xD;&#xA;subkey generate --network $NETWORK&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5237" PostHistoryTypeId="2" PostId="1432" RevisionGUID="130490d5-4b5a-4c3d-8023-a7c643b0576d" CreationDate="2022-03-31T02:46:57.757" UserId="25" Text="I'm wondering what is current state of the art of Substrate's pallet-contracts performance as compared to the same functional implementation as a pallet.&#xD;&#xA;&#xD;&#xA;I acknowledge that different logic can have different cost, but it would still be useful to know if it is 2x inherently slower, 10x, 100x... It would help others to make a decision whether this is definitely not acceptable overhead or something that can be considered.&#xD;&#xA;&#xD;&#xA;Specifically I'm curious about the cost without gas metering enabled, to get a sense of the baseline. Roughly the cost of running wasmi on top of wasmtime rather than natively, but I wasn't able to find benchmarks of those either." ContentLicense="CC BY-SA 4.0" />
  <row Id="5239" PostHistoryTypeId="1" PostId="1432" RevisionGUID="130490d5-4b5a-4c3d-8023-a7c643b0576d" CreationDate="2022-03-31T02:46:57.757" UserId="25" Text="What is the ballpark performance overhead of pallet-contracts (excluding metering)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5240" PostHistoryTypeId="3" PostId="1432" RevisionGUID="130490d5-4b5a-4c3d-8023-a7c643b0576d" CreationDate="2022-03-31T02:46:57.757" UserId="25" Text="|runtime|smart-contract|wasm|wasmi|performance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5241" PostHistoryTypeId="2" PostId="1433" RevisionGUID="9dfc3bf8-cceb-47c7-9e7d-b8a290b1ea5e" CreationDate="2022-03-31T02:51:19.490" UserId="299" Text="this is my service config.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;this is my rpc config.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;this is error message.&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XnMXo.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Vf5le.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/wE1yc.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5243" PostHistoryTypeId="1" PostId="1433" RevisionGUID="9dfc3bf8-cceb-47c7-9e7d-b8a290b1ea5e" CreationDate="2022-03-31T02:51:19.490" UserId="299" Text="About the problems with switching to Babe Consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="5244" PostHistoryTypeId="3" PostId="1433" RevisionGUID="9dfc3bf8-cceb-47c7-9e7d-b8a290b1ea5e" CreationDate="2022-03-31T02:51:19.490" UserId="299" Text="|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5246" PostHistoryTypeId="2" PostId="1434" RevisionGUID="ab64c2ba-d473-409c-bd07-3d36acc94a25" CreationDate="2022-03-31T05:19:09.917" UserId="234" Text="How can I see in more detail what operations are called when my transaction is submitted." ContentLicense="CC BY-SA 4.0" />
  <row Id="5248" PostHistoryTypeId="1" PostId="1434" RevisionGUID="ab64c2ba-d473-409c-bd07-3d36acc94a25" CreationDate="2022-03-31T05:19:09.917" UserId="234" Text="How can I get a deeper / lower level insight into how my transaction is processed with sidecar?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5249" PostHistoryTypeId="3" PostId="1434" RevisionGUID="ab64c2ba-d473-409c-bd07-3d36acc94a25" CreationDate="2022-03-31T05:19:09.917" UserId="234" Text="|transactions|sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5250" PostHistoryTypeId="2" PostId="1435" RevisionGUID="34359b7b-14d2-4318-b05e-273cc4bcd936" CreationDate="2022-03-31T05:22:06.690" UserId="234" Text="Sidecar provides the following experimental `trace` related endpoints :&#xD;&#xA;&#xD;&#xA;    /experimental/blocks/{blockId}/traces/operations?actions=false&#xD;&#xA;    /experimental/blocks/head/traces/operations?actions=false&#xD;&#xA;    /experimental/blocks/{blockId}/traces&#xD;&#xA;    /experimental/blocks/head/traces&#xD;&#xA;&#xD;&#xA;These endpoints were introduced &amp; described in more detail in this [PR](https://github.com/paritytech/substrate-api-sidecar/pull/383)&#xD;&#xA;&#xD;&#xA;And the result from these endpoints is very well explained in this [diagram](https://docs.google.com/drawings/d/1vZoJo9jaXlz0LmrdTOgHck9_1LsfuQPRmTr-5g1tOis/edit)&#xD;&#xA;&#xD;&#xA;To be able to get these endpoints you need to check 2 things :&#xD;&#xA;&#xD;&#xA;1. Run your node with the flag `—unsafe-rpc-external`&#xD;&#xA;2. Check that the `BlocksTrace` controller has been activated for the chain you are running.&#xD;&#xA;&#xD;&#xA;More details on that you can find in this closed [issue](https://github.com/paritytech/substrate-api-sidecar/issues/866)&#xD;&#xA;&#xD;&#xA;Right now, since these endpoints are experimental there are available by default only for Kusama and Polkadot running nodes (by using the flag mentioned above).&#xD;&#xA;&#xD;&#xA;For other chains, the `BlocksTrace` controller is not active by default so you have to do it manually so add the `BlocksTrace` controller locally in the corresponding controller file of your chain, eg. for Polkadot is this [file](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/chains-config/polkadotControllers.ts)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5252" PostHistoryTypeId="5" PostId="1434" RevisionGUID="21d00231-e9d8-4820-87d2-93f647830c1a" CreationDate="2022-03-31T05:24:27.587" UserId="234" Comment="added 126 characters in body; edited tags" Text="How can I see in more detail what operations are called when my transaction is submitted ? &#xD;&#xA;If there is a way to see all operations/extrinsics/calls that happened in a specific block then that could be useful also." ContentLicense="CC BY-SA 4.0" />
  <row Id="5253" PostHistoryTypeId="6" PostId="1434" RevisionGUID="21d00231-e9d8-4820-87d2-93f647830c1a" CreationDate="2022-03-31T05:24:27.587" UserId="234" Comment="added 126 characters in body; edited tags" Text="|transactions|block|sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5254" PostHistoryTypeId="5" PostId="1434" RevisionGUID="f6f360cf-f2c6-4101-b103-448722a9fafc" CreationDate="2022-03-31T05:36:03.240" UserId="234" Comment="added 104 characters in body" Text="How can I see in more detail what operations are called when my transaction is submitted ? &#xD;&#xA;&#xD;&#xA;If there is a way to see all operations/extrinsics/calls that happened in a specific block then that could be useful also. &#xD;&#xA;&#xD;&#xA;My goal is to get a more low level insight into the transaction process / block by using sidecar." ContentLicense="CC BY-SA 4.0" />
  <row Id="5255" PostHistoryTypeId="2" PostId="1436" RevisionGUID="f1c1b483-4b7a-464c-b644-a0f597680edf" CreationDate="2022-03-31T05:51:13.683" UserId="46" Text="Is there a simpler way to add balance transfer values without converting them to BN or Unit value first? For example, say I want to add &quot;0x00000000000000001bc16d674ec80000&quot;, &quot;0x000000000000021e19e0c9bab2400000&quot; and  &quot;0x00000000000000000de0b6b3a7640000&quot; which in units are &quot;2.0000 Unit&quot;,  &quot;10.0000 kUnit&quot;, and &quot;1.0000 Unit&quot;.&#xD;&#xA;&#xD;&#xA;I have used [@polkadot/util](https://www.npmjs.com/package/@polkadot/util) 's `formatBalance` with `forceUnit` option to get uniform units and then add. But I feel like there may be a better way." ContentLicense="CC BY-SA 4.0" />
  <row Id="5257" PostHistoryTypeId="1" PostId="1436" RevisionGUID="f1c1b483-4b7a-464c-b644-a0f597680edf" CreationDate="2022-03-31T05:51:13.683" UserId="46" Text="How to accurately add extrinsic balance transfer values" ContentLicense="CC BY-SA 4.0" />
  <row Id="5258" PostHistoryTypeId="3" PostId="1436" RevisionGUID="f1c1b483-4b7a-464c-b644-a0f597680edf" CreationDate="2022-03-31T05:51:13.683" UserId="46" Text="|polkadot-js|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5259" PostHistoryTypeId="5" PostId="1181" RevisionGUID="bfcc7d65-e78c-4511-a438-5aaaa9d99057" CreationDate="2022-03-31T06:13:22.277" UserId="227" Comment="added 190 characters in body" Text="To add to Alex' answer:&#xD;&#xA;&#xD;&#xA;String processing comes with a lot of overhead (e.g. support for UTF-8 operations). For smart contracts it's important that they are small in terms of size, this reduces the gas fees for users as well as the throughput a blockchain can achieve when multiple contracts are called in one block.&#xD;&#xA;&#xD;&#xA;By using String's the entire code bloat for being able to handle them has to be included in the smart contract, thus making them way bigger than they need to be.&#xD;&#xA;&#xD;&#xA;If you're in need for e.g. parsing JSON then that's something that should definitely be done on the side of the user interface/client/Dapp and only the result of the parsing should be submitted.&#xD;&#xA;&#xD;&#xA;If you're really in need to store something human readable you could make it a `Vec&lt;u8&gt;` instead of a String ‒ thus avoiding the inclusion of any String processing overhead.&#xD;&#xA;&#xD;&#xA;If you're really really in need of String, then ink! exposes it via the crate `ink_prelude` as `ink_prelude::String` (see https://paritytech.github.io/ink/ink_prelude/string/index.html)." ContentLicense="CC BY-SA 4.0" />
  <row Id="5260" PostHistoryTypeId="2" PostId="1437" RevisionGUID="36ffabfb-e806-406c-80a2-7a023c4f4ddb" CreationDate="2022-03-31T06:34:22.510" UserId="73" Text="In general, it is not advised to look at the output of any macro at all, if you are not developing it ;) If there are questions that you want to know specifically or if the docs are missing information, I would encourage you to open an issue on github. Did you take a look at the docs of the [macro][1]? These docs explain what the macro is doing and also show code for the individual steps. Nevertheless, I will answer you your questions.&#xD;&#xA;&#xD;&#xA;&gt; 1. This HostFunction will be registered in the executor, this belongs to the node side.&#xD;&#xA;&#xD;&#xA;Yes that is correct.&#xD;&#xA;&#xD;&#xA;&gt; 2. I do not know what &amp;mut dyn proc_macro_runtime_interface::Externalities is, but I guess this is for the runtime side. Can somebody explain how to understand the Externalities here?&#xD;&#xA;&#xD;&#xA;In general everything that is behind the `#[cfg(feature = &quot;std&quot;)]` feature flag means that it is on the host side. As you are declaring the runtime interface as `trait`, this trait with some changes to the signatures is used to implement it for `&amp;mut dyn proc_macro_runtime_interface::Externalities`. `Externalities` is again a trait that is provided by Substrate. This trait mainly provides functionality for interacting with the storage, e.g. it provides the functions to get/set storage. You can find the trait declaration [here][2]. The `Externalities` also provides access to extensions that are registered in the node. These extensions for example provide access to the key store etc.&#xD;&#xA;&#xD;&#xA;&gt; 3. Other generated code(part of it). I guess this is the code for calling from the wasm side to the native implementation. I noticed that this function uses proc_macro_runtime_interface::with_externalities(...) and I found Use sp_externalities::with_externalities. But, I am still don't know how this function call from wasm side to the native side.&#xD;&#xA;&#xD;&#xA;The code you have shown there again is the code that is being part of the host side. This specific code is the one that prepares the context to execute the actual implementation. The important part of this function is calling the `with_externalities`. The `Externalities` are being set in a thread local variable before we execute any runtime functionality and you get access to this thread local variable using `with_externalities`. When it comes to the wasm side, there is a `extern &quot;C&quot;` function declared for each trait method. There is a &quot;decorator&quot; function that uses the same function signature as the trait method and that will be the one you are calling. This function the internally calls the `extern &quot;C&quot;` function and this lands then on the host side. On the host side you convert the arguments given to the function back to the correct rust types and then call the host side implementation.&#xD;&#xA;&#xD;&#xA;&gt; 4. After all the above things are done. What is the common way to call from the wasm side to the native side or the native side to the wasm side? Is there any example for beginners to understand?&#xD;&#xA;&#xD;&#xA;You just need to call `dvm_ext::evm_event(events)`. &#xD;&#xA;&#xD;&#xA;In general calling from wasm to host side is done using the runtime interface. The other way around, host to wasm, uses the runtime api.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-runtime-interface/latest/sp_runtime_interface/attr.runtime_interface.html&#xD;&#xA;  [2]: https://docs.rs/sp-externalities/latest/sp_externalities/trait.Externalities.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="5262" PostHistoryTypeId="2" PostId="1438" RevisionGUID="ed180e38-6ea7-46d1-a28e-1ec63060f3d7" CreationDate="2022-03-31T06:36:15.277" UserId="73" Text="If you run with `--keep-blocks=256` you will prune all blocks that are 256 blocks behind the last finalized block. Block pruning is disabled by default." ContentLicense="CC BY-SA 4.0" />
  <row Id="5264" PostHistoryTypeId="2" PostId="1439" RevisionGUID="09240cd0-f7c3-4b5e-a11e-0163b2dafa97" CreationDate="2022-03-31T06:36:35.047" UserId="227" Text="There's a couple of things to unpack here:&#xD;&#xA;&#xD;&#xA;* A smart contract environment is highly sandboxed. A smart contract is executed by every node in a blockchain network. This is needed so that the nodes can come to consensus on the state the blockchain will have after the contract has been executed. Therefore every node needs to have the exact same state before the contract is executed, otherwise the results of its execution could differ after executing it. This would be very bad since it's essential for nodes to agree on a common state. Just think of balances ‒ the majority of the network must have a consensus on the account balances, there has to be some common ground truth, otherwise things like the double-spending problem are possible. That's why it can never be possible to access `std::io` or `std::fs::File` in a smart contract ‒ a smart contract could yield entirely different result based on what files a node would have on its local file system.&#xD;&#xA;&#xD;&#xA;* For smart contracts it's important that they are small in terms of size, this reduces the gas fees for users as well as the throughput a blockchain can achieve when multiple contracts are called in one block. Operations like parsing a CSV are expensive in terms of computation and it's an anti-pattern to require users to pay for them. _Generally anything that is not strictly required for the state transitions of a smart contract should not be in it._ What you should do instead is have e.g. the user interface already do this parsing and call our contract with the result of it.&#xD;&#xA;&#xD;&#xA;In terms of Rust's standard library there is more to say there, but the short answer is that ink! has the [`ink_prelude`](https://paritytech.github.io/ink/ink_prelude/) crate, which exposes a number of the primitives that you are likely searching for, so e.g.  `ink_prelude::vec::Vec`. More data structures (like `Mapping`) are available in [`ink_storage`](https://paritytech.github.io/ink/ink_storage/), they have been optimized for usage in smart contracts.&#xD;&#xA;&#xD;&#xA;If you want more details on this whole topic I recommend reading our FAQ answer to &quot;[Why is Rust's standard library (stdlib) not available in `ink!`?](https://paritytech.github.io/ink-docs/faq/#why-is-rusts-standard-library-stdlib-not-available-in-ink)&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="5266" PostHistoryTypeId="2" PostId="1440" RevisionGUID="6d498fb6-920e-4a91-b7b5-ebd68ba824ba" CreationDate="2022-03-31T06:37:55.237" UserId="73" Text="We use serde for exporting/importing the `GenesisConfig`. So, if you want to use something as part of the `GenesisConfig` of your pallet you need to derive `Serialize`/`Deserialize`." ContentLicense="CC BY-SA 4.0" />
  <row Id="5268" PostHistoryTypeId="2" PostId="1441" RevisionGUID="0f66a6c7-8eab-4a7d-ba53-c8b9ee6ba1cd" CreationDate="2022-03-31T06:41:33.583" UserId="73" Text="&gt; Can we use the same WASM and State files for registering parathread on Kusama, which we used for Rococo?&#xD;&#xA;&#xD;&#xA;Yes, technically you can do this. Assuming you have the same `ParaId` on both networks it should work flawlessly. However, you should be aware that this then may leads to your two networks to join, because both are using the same genesis hash. I mean the will not really join, but nodes from one network may connect to node of the other network. It could lead to some confusion. However, if you only had deployed for testing on Rococo and shut down everything again, this should not happen." ContentLicense="CC BY-SA 4.0" />
  <row Id="5270" PostHistoryTypeId="2" PostId="1442" RevisionGUID="6bae00c0-7caa-45a4-9b95-4a6edafbf2b5" CreationDate="2022-03-31T06:43:57.247" UserId="73" Text="You need to implement the `MmrRuntimeApi` of `pallet-mmr-rpc`." ContentLicense="CC BY-SA 4.0" />
  <row Id="5272" PostHistoryTypeId="2" PostId="1443" RevisionGUID="077f0141-19c9-4f8b-9e0b-534d0de6cb82" CreationDate="2022-03-31T06:46:09.470" UserId="227" Text="What are the shortcomings of the current governance mechanism in Polkadot and how will its next iteration address those?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5274" PostHistoryTypeId="1" PostId="1443" RevisionGUID="077f0141-19c9-4f8b-9e0b-534d0de6cb82" CreationDate="2022-03-31T06:46:09.470" UserId="227" Text="What are the shortcomings of Polkadot's governance and what will its next iteration be?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5275" PostHistoryTypeId="3" PostId="1443" RevisionGUID="077f0141-19c9-4f8b-9e0b-534d0de6cb82" CreationDate="2022-03-31T06:46:09.470" UserId="227" Text="|polkadot|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5276" PostHistoryTypeId="2" PostId="1444" RevisionGUID="9d375024-ff51-420b-8cee-89ab247dac56" CreationDate="2022-03-31T06:50:45.650" UserId="227" Text="Some answers recommend to build with `--release` or with a production profile. But this misses the point of the original question. If you do this the build will actually take longer due to a number of additional optimizations that are applied!&#xD;&#xA;&#xD;&#xA;You should consider the difference between using `cargo build` and `cargo check`: &#xD;&#xA;&#xD;&#xA;&gt;This will essentially compile the packages without performing the final step of code generation, which is faster than running cargo build.&#xD;&#xA;&#xD;&#xA;(from the [`cargo-check`](https://doc.rust-lang.org/cargo/commands/cargo-check.html) docs)&#xD;&#xA;&#xD;&#xA;So if you e.g. just want to check for compiler errors `cargo check` is already sufficient.&#xD;&#xA;&#xD;&#xA;If you're really in need for faster binary builds then having a beefy remove machine on which you execute the build via [`cargo-remote`](https://github.com/sgeisler/cargo-remote) can be an option. There are also reports that using a local [`sccache`](https://github.com/mozilla/sccache) installation + setting the environment variable `RUSTC_WRAPPER=&quot;sccache&quot;` speeds this process up due to the additional caching done through `sccache`." ContentLicense="CC BY-SA 4.0" />
  <row Id="5278" PostHistoryTypeId="2" PostId="1445" RevisionGUID="15985a2c-fad9-4fdc-9e72-f0f1da0587f2" CreationDate="2022-03-31T07:01:17.043" UserId="627" Text="I'm assuming the above are hex strings? In that case you would need to convert and add them.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { hexToBn } from '@polkadot/util';&#xD;&#xA;&#xD;&#xA;// convert and add&#xD;&#xA;const total = hexToBn('0x00000000000000001bc16d674ec80000')&#xD;&#xA;  .add(hexToBn('0x000000000000021e19e0c9bab2400000'))&#xD;&#xA;  .add(hexToBn('0x00000000000000000de0b6b3a7640000'));&#xD;&#xA;&#xD;&#xA;// format as needed&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5280" PostHistoryTypeId="2" PostId="1446" RevisionGUID="dac7e10f-1ffc-482c-ade2-fa6c86f307fa" CreationDate="2022-03-31T07:28:58.227" UserId="544" Text="Not sure if you understand IPFS correctly.&#xD;&#xA;&#xD;&#xA;First, IPFS is a **content distribution network** rather than a storage. It allows you to discover some content stored in some nodes in the network. So to my understanding there's no direct way to &quot;save data&quot; to IPFS. Second, contracts can only handle very limited size of data. So there's very small chance you need to read or write to a file within a contract. Generally it's more realistic to just save a IPFS link in your contract (e.g. NFT images). It implies the user need to pin a file on IPFS first, and save the link to the contract later.&#xD;&#xA;&#xD;&#xA;If you want to make sure the data indeed exists and is stored somewhere, you may need a kind of **&quot;proof of storage&quot;**, the evidence that your data is archived on some decentralized storage. This can be done by a combination of merkle proof and the storage root on a permanent storage chain (i.e. Arweave). Btw, proof of storage is not a commonly used term, at least the one used by Filecoin is very misleading because it only prove a specific miner stores some data, not the commitment of the data on the blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="5282" PostHistoryTypeId="2" PostId="1447" RevisionGUID="a428d3bc-0520-4932-b9cc-943a8a2d4c19" CreationDate="2022-03-31T07:29:07.170" UserId="1948" Text="Since the very first governance proposals were put up for discussion, the community already began thinking about alternatives and possible new designs to counteract some identified weaknesses in the model. Many community members have already identified the lack of participation as its weakest point. Others felt that the Council was the weakest aspect, arguing that, even if Council were to grow in number, this form of representation had no place in a decentralized on-chain governance system. Many community members, despite being able to delegate voting power and use conviction voting, also noticed a low representation of smaller token holders.&#xD;&#xA;&#xD;&#xA;The Democracy module became a primary focus in recent discussions of the new governance design, as it allows all token holders to be able to propose, participate and be held accountable for the proposals they submit. All public proposals use what is called *positive adaptive quorum biasing*, meaning that as the referendum turnout increases, the threshold of aye votes required to pass lowers. Since making a protocol change comes with risk, this system was designed to favour the status quo. Positive biasing ensured that with lower turnout, only uncontroversial proposals can pass.&#xD;&#xA;&#xD;&#xA;The new governance model basically builds on top of this, and aims for a more censorship-resilient type of design in which community members can participate in a secure and decentralised manner: The various Council responsibilities will be migrated to the community. The new model will define different origins for different calls: each of them will include different thresholds and turnouts needed for a proposal to pass. For example, a runtime upgrade (`set_code` call) does not have the same implications for the ecosystem as the approval of a treasury tip (`reportAwesome` call), and therefore different origins are needed in which different turnouts, approvals, deposits and a minimum enactment periods will be predetermined on the pallet.&#xD;&#xA;&#xD;&#xA;What this means, in simple terms, is that different proposals submitted by the community will enjoy different approval thresholds, depending on the call up for vote. So, generally speaking, the new model will relay on three elements:&#xD;&#xA;&#xD;&#xA;- transfer of responsibilities from Council to Democracy module;&#xD;&#xA;- different origins for proposals, defining different tracks and therefore different required turnouts and thresholds depending on the call to be enacted;&#xD;&#xA;- a more flexible way to delegate voting power by community members.&#xD;&#xA;&#xD;&#xA;This new model should be up for discussion and vote by the community soon, and if a runtime upgrade in which the new pallets are invcluded is approved by the community, we should expect to see the first changes soon (on Kusama first, ofc). Some articles will be published soon on this to start the discussion!" ContentLicense="CC BY-SA 4.0" />
  <row Id="5284" PostHistoryTypeId="6" PostId="1443" RevisionGUID="2a8951c2-2581-4090-8650-252084a7175e" CreationDate="2022-03-31T08:15:29.197" UserId="85" Comment="edited tags" Text="|polkadot|unstoppable|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5285" PostHistoryTypeId="5" PostId="1405" RevisionGUID="6a051122-b1fb-442f-a2f6-6c317b432684" CreationDate="2022-03-31T08:22:17.113" UserId="380" Comment="added the reasons why further understanding is required" Text="To add to Sam's post:&#xD;&#xA;&#xD;&#xA;It should be noted that Offchain Workers are very often misunderstood. It is not trivial just to write some random http request as part of pallet development and expect it to work. The runtime's state transition function must be completely deterministic, and the use of Offchain Workers introduces non-determinism. So you must go much deeper into what this tool is, what it is not, and how to correctly use it.&#xD;&#xA;&#xD;&#xA;From the docs:&#xD;&#xA;&#xD;&#xA;&gt; Note that the results from off-chain workers are not subject to&#xD;&#xA;&gt; regular transaction verification. A verification mechanism (e.g.&#xD;&#xA;&gt; voting, averaging, checking sender signatures, or simply &quot;trusting&quot;)&#xD;&#xA;&gt; should be implemented to determine what information gets into the&#xD;&#xA;&gt; chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="5286" PostHistoryTypeId="24" PostId="1405" RevisionGUID="6a051122-b1fb-442f-a2f6-6c317b432684" CreationDate="2022-03-31T08:22:17.113" Comment="Proposed by 380 approved by 85, 18 edit id of 129" ContentLicense="CC BY-SA 4.0" />
  <row Id="5287" PostHistoryTypeId="2" PostId="1448" RevisionGUID="c89ebc37-1133-487a-8b8e-78e809b241a8" CreationDate="2022-03-31T08:34:10.133" UserId="18" Text="Given one of the core USPs of Polkadot is its modularity and interoperability, it should be relatively easy to allow assets/tokens to be transferred between chains via XCM&#xD;&#xA;&#xD;&#xA;My question is about what is the &quot;best practice&quot;. Is there one defined? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I think we ideally need to make it simple and straightforward to import an asset from one chain to another and while the UI work needs to be done, we need a consistent way of allowing new chains to add another's chains tokens into their runtime &#xD;&#xA;&#xD;&#xA;As far as I can tell there are 2 ways to do this&#xD;&#xA;&#xD;&#xA;1) [Assets Pallet](https://github.com/paritytech/substrate/tree/master/frame/assets)&#xD;&#xA;2) [ORML-Tokens](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;While I understand the need to not have substrate be opinionated and allow chains the freedom to implement a registry as they see fit, I think defining a guide/tutorial or a best practice will go a long way. &#xD;&#xA;&#xD;&#xA;Very similar to how the substrate-node-template onboarded so many engineers and teams &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There is already an issue raised on [here](https://github.com/open-web3-stack/open-runtime-module-library/issues/721s). Please feel free to comment/help if you are interested" ContentLicense="CC BY-SA 4.0" />
  <row Id="5289" PostHistoryTypeId="1" PostId="1448" RevisionGUID="c89ebc37-1133-487a-8b8e-78e809b241a8" CreationDate="2022-03-31T08:34:10.133" UserId="18" Text="How to import a token from Parachain X to my Parachain Y" ContentLicense="CC BY-SA 4.0" />
  <row Id="5290" PostHistoryTypeId="3" PostId="1448" RevisionGUID="c89ebc37-1133-487a-8b8e-78e809b241a8" CreationDate="2022-03-31T08:34:10.133" UserId="18" Text="|xcm|assets|orml-xtokens|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5291" PostHistoryTypeId="4" PostId="1433" RevisionGUID="0d760ccb-3a16-4a54-8dd0-27f91997bfca" CreationDate="2022-03-31T09:01:03.707" UserId="34" Comment="misleading title and tags" Text="pallet-mmr-rpc missing impl" ContentLicense="CC BY-SA 4.0" />
  <row Id="5292" PostHistoryTypeId="6" PostId="1433" RevisionGUID="0d760ccb-3a16-4a54-8dd0-27f91997bfca" CreationDate="2022-03-31T09:01:03.707" UserId="34" Comment="misleading title and tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5293" PostHistoryTypeId="4" PostId="1432" RevisionGUID="3dfebb51-8931-4abf-b1b7-d4ed38f92a3c" CreationDate="2022-03-31T09:03:32.743" UserId="34" Comment="edited title" Text="Performance of same logic with a contract using pallet-contracts vs. a native pallet (excluding metering)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5294" PostHistoryTypeId="2" PostId="1449" RevisionGUID="e9ca6841-5676-44c9-a6ad-514b4723a020" CreationDate="2022-03-31T09:06:44.300" UserId="139" Text="Why does `pallet-election-phragmen` have a Balance field here? &#xD;&#xA;```rust&#xD;&#xA;   #[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		pub members: Vec&lt;(T::AccountId, BalanceOf&lt;T&gt;)&gt;,&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5296" PostHistoryTypeId="1" PostId="1449" RevisionGUID="e9ca6841-5676-44c9-a6ad-514b4723a020" CreationDate="2022-03-31T09:06:44.300" UserId="139" Text="Why does pallet-election-phragmen have a Balance field in it's Genesis Config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5297" PostHistoryTypeId="3" PostId="1449" RevisionGUID="e9ca6841-5676-44c9-a6ad-514b4723a020" CreationDate="2022-03-31T09:06:44.300" UserId="139" Text="|pallet-election-phragmen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5298" PostHistoryTypeId="2" PostId="1450" RevisionGUID="9c30dfd0-ae21-42bb-945c-a2004cc64f4d" CreationDate="2022-03-31T09:29:46.783" UserId="139" Text="```&#xD;&#xA;Blocked connection to WebSockets server from untrusted origin: Some(&quot;file://&quot;)    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can't figure out what I should use as an argument for `rpc-cors` to make this websocket connection. I've tried `ws://localhost`, `localhost`, `file://`, none of it seems to work. I am using the Polkadot-Js-AppImage." ContentLicense="CC BY-SA 4.0" />
  <row Id="5300" PostHistoryTypeId="1" PostId="1450" RevisionGUID="9c30dfd0-ae21-42bb-945c-a2004cc64f4d" CreationDate="2022-03-31T09:29:46.783" UserId="139" Text="What should the cors origin be for localhost?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5301" PostHistoryTypeId="3" PostId="1450" RevisionGUID="9c30dfd0-ae21-42bb-945c-a2004cc64f4d" CreationDate="2022-03-31T09:29:46.783" UserId="139" Text="|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5302" PostHistoryTypeId="2" PostId="1451" RevisionGUID="725df540-c57a-4fad-9f1e-31b945437931" CreationDate="2022-03-31T09:44:40.483" UserId="679" Text="Hello all developers and community members, I am very new to Substrate and Rust. &#xD;&#xA;&#xD;&#xA;I am creating a pallet for NFT marketplace. &#xD;&#xA;&#xD;&#xA;for storing out the NFT details I've created a struct as mentioned below. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct NFTStruct&lt;T: Config&gt; {&#xD;&#xA;		pub dna: [u8; 16],   // Using 16 bytes to represent a NFT DNA&#xD;&#xA;		pub price: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;		pub gender: Gender,&#xD;&#xA;		pub owner: AccountOf&lt;T&gt;,&#xD;&#xA;		pub creator: AccountOf&lt;T&gt;,&#xD;&#xA;		pub royalty: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have two fields here 1) `price` 2) `royalty`. &#xD;&#xA;&#xD;&#xA;I am able to set the price of nft using `set_price function` , and royalty using `set_creator_royalty function `. upto this things are working fine. &#xD;&#xA;&#xD;&#xA;Now I have a challenge, whenever user wants to buy NFT he can buy using `buy_nft` function which I have defined inside my pallet. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		// buy_nft&#xD;&#xA;		#[transactional]&#xD;&#xA;		#[pallet::weight(100)]&#xD;&#xA;		pub fn buy_nft(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			nft_id: T::Hash,&#xD;&#xA;			bid_price: BalanceOf&lt;T&gt;&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let buyer = ensure_signed(origin)?;&#xD;&#xA;	&#xD;&#xA;			// Check the nft exists and buyer is not the current nft owner&#xD;&#xA;			let nft = Self::nfts(&amp;nft_id).ok_or(&lt;Error&lt;T&gt;&gt;::NFTNotExist)?;&#xD;&#xA;			ensure!(nft.owner != buyer, &lt;Error&lt;T&gt;&gt;::BuyerIsNFTOwner);&#xD;&#xA;			&#xD;&#xA;			//Check if the nft is for sale.&#xD;&#xA;			// Check the nft is for sale and the nft ask price &lt;= bid_price&#xD;&#xA;			if let Some(ask_price) = nft.price {&#xD;&#xA;				ensure!(ask_price &lt;= bid_price, &lt;Error&lt;T&gt;&gt;::NFTBidPriceTooLow);&#xD;&#xA;			} else {&#xD;&#xA;				Err(&lt;Error&lt;T&gt;&gt;::NFTNotForSale)?;&#xD;&#xA;			}&#xD;&#xA;			// Check the buyer has enough free balance&#xD;&#xA;			ensure!(T::Currency::free_balance(&amp;buyer) &gt;= bid_price, &lt;Error&lt;T&gt;&gt;::NotEnoughBalance);&#xD;&#xA;&#xD;&#xA;			// Verify the buyer has the capacity to receive one more nft&#xD;&#xA;			let to_owned = &lt;NFTsOwned&lt;T&gt;&gt;::get(&amp;buyer);&#xD;&#xA;			ensure!((to_owned.len() as u32) &lt; T::MaxNFTsOwned::get(), &lt;Error&lt;T&gt;&gt;::ExceedMaxNFTOwned);&#xD;&#xA;			let seller = nft.owner.clone();&#xD;&#xA;		&#xD;&#xA;			//Transfer the amount from buyer to seller&#xD;&#xA;			T::Currency::transfer(&amp;buyer, &amp;seller, bid_price, ExistenceRequirement::KeepAlive)?;&#xD;&#xA;			// Transfer the nft from seller to buyer&#xD;&#xA;			Self::transfer_nft_to(&amp;nft_id, &amp;buyer)?;&#xD;&#xA;&#xD;&#xA;			// Deposit relevant Event&#xD;&#xA;			Self::deposit_event(Event::Bought(buyer, seller, nft_id, bid_price));&#xD;&#xA;	&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;but in this function I want to make changes for `royalty_split` , I mean, whenever user tends to buy NFT at the price which owner has set and the royalty in percent which creator set using `set_creator_royalty function`  should be spitted from the actual price and should be transferred to creator's address and the rest should be transferred to the owner's address. &#xD;&#xA;&#xD;&#xA;For ex- &#xD;&#xA;&#xD;&#xA;nft with hash 0x11c5g5 has the price of 100 and the royalty is 10%. user came to buy_nft, he made a payment of 100 Tokens, 90 Tokens should be transferred to owner's wallet and 10 Tokens should be transferred to creator's wallet. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Approaches I tried**&#xD;&#xA;&#xD;&#xA;1&#xD;&#xA;&#xD;&#xA;Inside the buy_nft function, I tried multiplying  nft.price and nft.royalty both are of same type Option&lt;BalanceOf&lt;T&gt;&gt;. And divide it with 100 to get the percentages/share of creator&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;			let nft_price = nft.price;&#xD;&#xA;			let creator_royalty = nft.royalty;&#xD;&#xA;			let creator_share_percent = nft_price * creator_royalty /100;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**I got this errror**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cannot multiply `std::option::Option&lt;&lt;&lt;T as pallet::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;` by `std::option::Option&lt;&lt;&lt;T as pallet::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;`&#xD;&#xA;```&#xD;&#xA;2&#xD;&#xA;&#xD;&#xA;I have tried to solve it with different approaches as well, I thought I should convert/typecast both of these values to U64 (Rust primitive type). &#xD;&#xA;&#xD;&#xA;For it I used a function &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		//function to  convert balance to u64&#xD;&#xA;		pub fn balance_to_u64(input: BalanceOf&lt;T&gt;) -&gt; Option&lt;u64&gt; {&#xD;&#xA;			TryInto::&lt;u64&gt;::try_into(input).ok()&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But the issue is, the function `balance_to_u64 ` only takes ` BalanceOf&lt;T&gt;&gt; ` as an argument and my type is ` Option&lt;BalanceOf&lt;T&gt;&gt; `. &#xD;&#xA;&#xD;&#xA;If I try to pass `nft.price` or `nft.royalty` as a parameter inside `balance_to_u64` function I got this error. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;mismatched types&#xD;&#xA;&#xD;&#xA;expected associated type, found enum `std::option::Option`&#xD;&#xA;&#xD;&#xA;note: expected associated type `&lt;&lt;T as pallet::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;                    found enum `std::option::Option&lt;&lt;&lt;T as pallet::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;`&#xD;&#xA;help: consider constraining the associated type `&lt;&lt;T as pallet::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance` to `std::option::Option&lt;&lt;&lt;T as pallet::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;`&#xD;&#xA;note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have spent around 1 week to solve this problem but unfortunately I got no solution. I am totally frustrated and looking for some help from any of the senior person. &#xD;&#xA;&#xD;&#xA;If you have any solution or any suggestion for me, please help me out. &#xD;&#xA;&#xD;&#xA;Thank you &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5304" PostHistoryTypeId="1" PostId="1451" RevisionGUID="725df540-c57a-4fad-9f1e-31b945437931" CreationDate="2022-03-31T09:44:40.483" UserId="679" Text="How to perform arithmetic operation on Option&lt;BalanceOf&lt;T&gt;&gt;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5305" PostHistoryTypeId="3" PostId="1451" RevisionGUID="725df540-c57a-4fad-9f1e-31b945437931" CreationDate="2022-03-31T09:44:40.483" UserId="679" Text="|substrate-node|substrate-node-template|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5306" PostHistoryTypeId="6" PostId="1451" RevisionGUID="d10f8068-21d3-4bdd-82ff-e89ea9dfac38" CreationDate="2022-03-31T09:50:53.080" UserId="679" Comment="Added one more tag" Text="|substrate-node|rust|substrate-node-template|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5307" PostHistoryTypeId="2" PostId="1452" RevisionGUID="517f8e7f-14ab-4fe6-ab02-e285be9e1604" CreationDate="2022-03-31T10:07:55.167" UserId="125" Text="I rewrite it another way, it's much easier to read:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;for i in 1 2 3 4; &#xD;&#xA;do &#xD;&#xA;    for j in session; &#xD;&#xA;        do subkey inspect &quot;$secret&quot;//fir//$j//$i; &#xD;&#xA;    done; &#xD;&#xA;done&#xD;&#xA;```&#xD;&#xA;The output result:&#xD;&#xA;```sh&#xD;&#xA;Secret Key URI `//fir//session//1` is account: //here&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0x68dcc9c2a71375c5fe58047ab26d2b1fdecbe9c289552cb8be3dbedf33ab7382&#xD;&#xA;  Public key (hex):  0x4a95b20a23190ebe5edeadbeaaf3b254b24780ba7e9afebc0e04fbdb0d26d80c&#xD;&#xA;  Account ID:        0x4a95b20a23190ebe5edeadbeaaf3b254b24780ba7e9afebc0e04fbdb0d26d80c&#xD;&#xA;  Public key (SS58): 5DkVsP9rBeqgAWdse9nYATDAV9RWEky2xVBppAN9bzf34GVS&#xD;&#xA;  SS58 Address:      5DkVsP9rBeqgAWdse9nYATDAV9RWEky2xVBppAN9bzf34GVS&#xD;&#xA;Secret Key URI `//fir//session//2` is account: //here&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0x17b13ce6e96657189bf1ec2572d51ec9bccbf80224ee2b9f52fdb67ab10670a0&#xD;&#xA;  Public key (hex):  0xac1ea46ad5376593bf482ae09ed6911512cb7d39873e48c696a882252455d843&#xD;&#xA;  Account ID:        0xac1ea46ad5376593bf482ae09ed6911512cb7d39873e48c696a882252455d843&#xD;&#xA;  Public key (SS58): 5FxPCKXqnB77D2RyVaGbUL4un6aX1eCMvDf1v3W2nYU8pRXj&#xD;&#xA;  SS58 Address:      5FxPCKXqnB77D2RyVaGbUL4un6aX1eCMvDf1v3W2nYU8pRXj&#xD;&#xA;Secret Key URI `//fir//session//3` is account: //here&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0xd7cb7a3f7a93fe88a74154583c55467b1c04bd8d59ce7fa11520ed58c0623a57&#xD;&#xA;  Public key (hex):  0x169be3313d2d1061b4dca389ba6eea62d283ec02f8c985b729912e0d49db2164&#xD;&#xA;  Account ID:        0x169be3313d2d1061b4dca389ba6eea62d283ec02f8c985b729912e0d49db2164&#xD;&#xA;  Public key (SS58): 5CaMDeYr4KiP1dc1qZ4Q4ebtVBJ8z1SVpfi29bsgrwzBTmDs&#xD;&#xA;  SS58 Address:      5CaMDeYr4KiP1dc1qZ4Q4ebtVBJ8z1SVpfi29bsgrwzBTmDs&#xD;&#xA;Secret Key URI `//fir//session//4` is account: //here&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0x10b4d4337294b10743a6deb817b43fb09817afb5b53859449a679189086ffb86&#xD;&#xA;  Public key (hex):  0x341ff69c999f56c5e54f551c0a6a6a319b87deb53cc980ddd7420bfd51d62a36&#xD;&#xA;  Account ID:        0x341ff69c999f56c5e54f551c0a6a6a319b87deb53cc980ddd7420bfd51d62a36&#xD;&#xA;  Public key (SS58): 5DF3qobzyHw439qrDbVwr69QaEdNXkdcVN8hRpGJZDqhYNKb&#xD;&#xA;  SS58 Address:      5DF3qobzyHw439qrDbVwr69QaEdNXkdcVN8hRpGJZDqhYNKb&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&gt; In do for j in session what is session and how does one get it?&#xD;&#xA;&#xD;&#xA;As you can see, the `session` is a literal string actually, and `&quot;$secret&quot;/fir/$j/$i` used to generate different mock secret key.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5309" PostHistoryTypeId="2" PostId="1453" RevisionGUID="97ab54fc-9c3d-466e-a42f-06e4dbb2a19e" CreationDate="2022-03-31T10:11:59.363" UserId="1881" Text="Smart contracts via `pallet-contracts` are run using a Wasm interpreter, namely `wasmi`, while native pallets are run via Wasm JIT, namely Wasmtime, (or native).&#xD;&#xA;&#xD;&#xA;Therefore the underlying question is: What is the performance difference between the `wasmi` interpreter and the Wasmtime JIT or native code.&#xD;&#xA;&#xD;&#xA;For this I collected some benchmarks in the past using Coremark utilities.&#xD;&#xA;The scores can be used as a linear comparison of performance.&#xD;&#xA;They are depending on the system the tests ran on but allow for comparison if run on the same platform.&#xD;&#xA;&#xD;&#xA;The scores indicate the following relations:&#xD;&#xA;&#xD;&#xA;- `wasmi` is roughly 1.6% the performance of native code&#xD;&#xA;- `wasm3`, the fastest known Wasm interpreter is roughly 8% the performance of native code.&#xD;&#xA;- Wasmtime JIT  is roughly 50% of the performance of native code.&#xD;&#xA;&#xD;&#xA;We are currently working on speeding up our `wasmi` interpreter but there are no results, yet. The `wasm3` performance is quite impressive for an interpreter and we will probably not surpass it but hopefully come close to it.&#xD;&#xA;&#xD;&#xA;There is also work done to use Wasmer singlepass as another execution engine for `pallet-contracts` which is roughly 50% the performance of Wasmtime and therefore ~25% of native code. However, this work is very experimental as of now." ContentLicense="CC BY-SA 4.0" />
  <row Id="5311" PostHistoryTypeId="2" PostId="1454" RevisionGUID="8d8cddb0-6124-4a31-8c1e-72d9f9bc8885" CreationDate="2022-03-31T10:19:33.207" UserId="299" Text="In fact, I was able to compile successfully on MAC, but I had problems compiling on Linux.&#xD;&#xA;```bash&#xD;&#xA;error: failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/dev/shm/dorafactory-node/target/release/build/tikv-jemalloc-sys-8c3a8dc9023b0c9d/build-script-build` (exit status: 101)&#xD;&#xA;  --- stdout&#xD;&#xA;  TARGET=x86_64-unknown-linux-gnu&#xD;&#xA;  HOST=x86_64-unknown-linux-gnu&#xD;&#xA;  NUM_JOBS=4&#xD;&#xA;  OUT_DIR=&quot;/dev/shm/dorafactory-node/target/release/build/tikv-jemalloc-sys-5b25ede0006e4506/out&quot;&#xD;&#xA;  BUILD_DIR=&quot;/dev/shm/dorafactory-node/target/release/build/tikv-jemalloc-sys-5b25ede0006e4506/out/build&quot;&#xD;&#xA;  SRC_DIR=&quot;/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.4.3+5.2.1-patched.2&quot;&#xD;&#xA;  OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  CC_x86_64-unknown-linux-gnu = None&#xD;&#xA;  CC_x86_64_unknown_linux_gnu = None&#xD;&#xA;  HOST_CC = None&#xD;&#xA;  CC = None&#xD;&#xA;  CFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  CFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  HOST_CFLAGS = None&#xD;&#xA;  CFLAGS = None&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  CC=&quot;cc&quot;&#xD;&#xA;  CFLAGS=&quot;-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall&quot;&#xD;&#xA;  JEMALLOC_REPO_DIR=&quot;jemalloc&quot;&#xD;&#xA;  running: &quot;sh&quot; &quot;/dev/shm/dorafactory-node/target/release/build/tikv-jemalloc-sys-5b25ede0006e4506/out/build/configure&quot; &quot;--disable-cxx&quot; &quot;--with-private-namespace=_rjem_&quot; &quot;--host=x86_64-unknown-linux-gnu&quot; &quot;--build=x86_64-unknown-linux-gnu&quot; &quot;--prefix=/dev/shm/dorafactory-node/target/release/build/tikv-jemalloc-sys-5b25ede0006e4506/out&quot;&#xD;&#xA;  checking for xsltproc... false&#xD;&#xA;  checking for x86_64-unknown-linux-gnu-gcc... cc&#xD;&#xA;  checking whether the C compiler works... yes&#xD;&#xA;  checking for C compiler default output file name... a.out&#xD;&#xA;  checking for suffix of executables...&#xD;&#xA;  checking whether we are cross compiling... no&#xD;&#xA;  checking for suffix of object files... o&#xD;&#xA;  checking whether we are using the GNU C compiler... yes&#xD;&#xA;  checking whether cc accepts -g... yes&#xD;&#xA;  checking for cc option to accept ISO C89... none needed&#xD;&#xA;  checking whether compiler is cray... no&#xD;&#xA;  checking whether compiler supports -std=gnu11... yes&#xD;&#xA;  checking whether compiler supports -Wall... yes&#xD;&#xA;  checking whether compiler supports -Wextra... yes&#xD;&#xA;  checking whether compiler supports -Wshorten-64-to-32... yes&#xD;&#xA;  checking whether compiler supports -Wsign-compare... yes&#xD;&#xA;  checking whether compiler supports -Wundef... yes&#xD;&#xA;  checking whether compiler supports -Wno-format-zero-length... yes&#xD;&#xA;  checking whether compiler supports -pipe... yes&#xD;&#xA;  checking whether compiler supports -g3... yes&#xD;&#xA;  checking how to run the C preprocessor... cc -E&#xD;&#xA;  checking for grep that handles long lines and -e... /usr/bin/grep&#xD;&#xA;  checking for egrep... /usr/bin/grep -E&#xD;&#xA;  checking for ANSI C header files... yes&#xD;&#xA;  checking for sys/types.h... yes&#xD;&#xA;  checking for sys/stat.h... yes&#xD;&#xA;  checking for stdlib.h... yes&#xD;&#xA;  checking for string.h... yes&#xD;&#xA;  checking for memory.h... yes&#xD;&#xA;  checking for strings.h... yes&#xD;&#xA;  checking for inttypes.h... yes&#xD;&#xA;  checking for stdint.h... yes&#xD;&#xA;  checking for unistd.h... yes&#xD;&#xA;  checking whether byte ordering is bigendian... no&#xD;&#xA;  checking size of void *... 8&#xD;&#xA;  checking size of int... 4&#xD;&#xA;  checking size of long... 8&#xD;&#xA;  checking size of long long... 8&#xD;&#xA;  checking size of intmax_t... 8&#xD;&#xA;  checking build system type... x86_64-unknown-linux-gnu&#xD;&#xA;  checking host system type... x86_64-unknown-linux-gnu&#xD;&#xA;  checking whether pause instruction is compilable... yes&#xD;&#xA;  checking number of significant virtual address bits... 48&#xD;&#xA;  checking for x86_64-unknown-linux-gnu-ar... no&#xD;&#xA;  checking for ar... ar&#xD;&#xA;  checking for x86_64-unknown-linux-gnu-nm... no&#xD;&#xA;  checking for nm... nm&#xD;&#xA;  checking for gawk... gawk&#xD;&#xA;  checking malloc.h usability... yes&#xD;&#xA;  checking malloc.h presence... yes&#xD;&#xA;  checking for malloc.h... yes&#xD;&#xA;  checking whether malloc_usable_size definition can use const argument... no&#xD;&#xA;  checking for library containing log... -lm&#xD;&#xA;  checking whether __attribute__ syntax is compilable... yes&#xD;&#xA;  checking whether compiler supports -fvisibility=hidden... yes&#xD;&#xA;  checking whether compiler supports -fvisibility=hidden... no&#xD;&#xA;  checking whether compiler supports -Werror... yes&#xD;&#xA;  checking whether compiler supports -herror_on_warning... no&#xD;&#xA;  checking whether tls_model attribute is compilable... yes&#xD;&#xA;  checking whether compiler supports -Werror... yes&#xD;&#xA;  checking whether compiler supports -herror_on_warning... no&#xD;&#xA;  checking whether alloc_size attribute is compilable... yes&#xD;&#xA;  checking whether compiler supports -Werror... yes&#xD;&#xA;  checking whether compiler supports -herror_on_warning... no&#xD;&#xA;  checking whether format(gnu_printf, ...) attribute is compilable... no&#xD;&#xA;  checking whether compiler supports -Werror... yes&#xD;&#xA;  checking whether compiler supports -herror_on_warning... no&#xD;&#xA;  checking whether format(printf, ...) attribute is compilable... yes&#xD;&#xA;  checking whether compiler supports -Werror... yes&#xD;&#xA;  checking whether compiler supports -herror_on_warning... no&#xD;&#xA;  checking whether format(printf, ...) attribute is compilable... yes&#xD;&#xA;  checking for a BSD-compatible install... /usr/bin/install -c&#xD;&#xA;  checking for x86_64-unknown-linux-gnu-ranlib... no&#xD;&#xA;  checking for ranlib... ranlib&#xD;&#xA;  checking for ld... /usr/bin/ld&#xD;&#xA;  checking for autoconf... false&#xD;&#xA;  checking for memalign... yes&#xD;&#xA;  checking for valloc... yes&#xD;&#xA;  checking for __libc_calloc... yes&#xD;&#xA;  checking for __libc_free... yes&#xD;&#xA;  checking for __libc_malloc... yes&#xD;&#xA;  checking for __libc_memalign... yes&#xD;&#xA;  checking for __libc_realloc... yes&#xD;&#xA;  checking for __libc_valloc... yes&#xD;&#xA;  checking for __posix_memalign... no&#xD;&#xA;  checking whether compiler supports -O3... yes&#xD;&#xA;......&#xD;&#xA;......&#xD;&#xA;  autogen            : 0&#xD;&#xA;  debug              : 0&#xD;&#xA;  stats              : 1&#xD;&#xA;  experimetal_smallocx : 0&#xD;&#xA;  prof               : 0&#xD;&#xA;  prof-libunwind     : 0&#xD;&#xA;  prof-libgcc        : 0&#xD;&#xA;  prof-gcc           : 0&#xD;&#xA;  fill               : 1&#xD;&#xA;  utrace             : 0&#xD;&#xA;  xmalloc            : 0&#xD;&#xA;  log                : 0&#xD;&#xA;  lazy_lock          : 0&#xD;&#xA;  cache-oblivious    : 1&#xD;&#xA;  cxx                : 0&#xD;&#xA;  ===============================================================================&#xD;&#xA;  running: &quot;make&quot; &quot;-j&quot; &quot;4&quot;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)', /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.4.3+5.2.1-patched.2/build.rs:334:19&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5313" PostHistoryTypeId="1" PostId="1454" RevisionGUID="8d8cddb0-6124-4a31-8c1e-72d9f9bc8885" CreationDate="2022-03-31T10:19:33.207" UserId="299" Text="Failed to compile on Linux" ContentLicense="CC BY-SA 4.0" />
  <row Id="5314" PostHistoryTypeId="3" PostId="1454" RevisionGUID="8d8cddb0-6124-4a31-8c1e-72d9f9bc8885" CreationDate="2022-03-31T10:19:33.207" UserId="299" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5315" PostHistoryTypeId="2" PostId="1455" RevisionGUID="ad0f976d-6661-4300-bce8-f54a34d7c621" CreationDate="2022-03-31T10:22:09.963" UserId="1959" Text="Gavin Wood mentioned it [here][1].&#xD;&#xA;&gt; Statemint trusts the Polkadot Relay Chain to have destroyed the 1 DOT on its side prior to sending the message. (It does!)&#xD;&#xA;&#xD;&#xA;When teleporting assets from chain A to chain B, chain A destroyed the assets, but the XCM instructions execution failed&#xD;&#xA;1. Can the destroyed assets be recovered?&#xD;&#xA;&#xD;&#xA;2. If yes, how to recover? Is it by recasting?&#xD;&#xA;&#xD;&#xA;3. If it is by recasting, can NFT be recasted with the original ID?&#xD;&#xA;&#xD;&#xA;Some documentation I've found (not related to XCM) shows that assets are **locked** when transferred across chains, not **destroyed**. I think if it is a locked asset, it is very easy to recover by unlocking, but here, it is **destroyed** rather than **locked**, destroyed and locked are not equal, right?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392" ContentLicense="CC BY-SA 4.0" />
  <row Id="5317" PostHistoryTypeId="1" PostId="1455" RevisionGUID="ad0f976d-6661-4300-bce8-f54a34d7c621" CreationDate="2022-03-31T10:22:09.963" UserId="1959" Text="Can the destroyed assets be recovered after the XCM teleporting failed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5318" PostHistoryTypeId="3" PostId="1455" RevisionGUID="ad0f976d-6661-4300-bce8-f54a34d7c621" CreationDate="2022-03-31T10:22:09.963" UserId="1959" Text="|xcm|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5319" PostHistoryTypeId="2" PostId="1456" RevisionGUID="d2eaa4bd-d026-49b8-a8c7-4d8a9adcea30" CreationDate="2022-03-31T10:24:14.450" UserId="2033" Text="I am trying to integrate ipfs in substrate-node-template, I came across https://github.com/rs-ipfs/substrate/tree/offchain_ipfs/bin/node-template, when I am trying to build it , getting many build error, basically they are because of different version, As the last code updated in repo is 2years ago.&#xD;&#xA;So I tried to use with substrate version 3.0.0, but there also I found some version conflict.&#xD;&#xA;After fixing this, I found another error such as &quot;error: unresolved imports sp_core::offchain::IpfsRequest&quot;&#xD;&#xA;When i checked in sp-core crates.io https://docs.rs/sp-core/4.0.0/sp_core/offchain/index.html, there is no such IpfsRequest , IpfsResponse modules present.&#xD;&#xA;&#xD;&#xA;Can anyone help for this." ContentLicense="CC BY-SA 4.0" />
  <row Id="5321" PostHistoryTypeId="1" PostId="1456" RevisionGUID="d2eaa4bd-d026-49b8-a8c7-4d8a9adcea30" CreationDate="2022-03-31T10:24:14.450" UserId="2033" Text="How can I integrate ipfs with substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="5322" PostHistoryTypeId="3" PostId="1456" RevisionGUID="d2eaa4bd-d026-49b8-a8c7-4d8a9adcea30" CreationDate="2022-03-31T10:24:14.450" UserId="2033" Text="|substrate-node|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5323" PostHistoryTypeId="5" PostId="1455" RevisionGUID="3a0eb32d-93dc-4b5e-b3d3-dc7d32feb890" CreationDate="2022-03-31T10:37:42.077" UserId="1959" Comment="added 53 characters in body" Text="Gavin Wood mentioned it [here][1], assets are destroyed before the xcm message is sent.&#xD;&#xA;&gt; Statemint trusts the Polkadot Relay Chain to have destroyed the 1 DOT on its side prior to sending the message. (It does!)&#xD;&#xA;&#xD;&#xA;When teleporting assets from chain A to chain B, chain A destroyed the assets, but the XCM instructions execution failed&#xD;&#xA;1. Can the destroyed assets be recovered?&#xD;&#xA;&#xD;&#xA;2. If yes, how to recover? Is it by recasting?&#xD;&#xA;&#xD;&#xA;3. If it is by recasting, can NFT be recasted with the original ID?&#xD;&#xA;&#xD;&#xA;Some documentation I've found (not related to XCM) shows that assets are **locked** when transferred across chains, not **destroyed**. I think if it is a locked asset, it is very easy to recover by unlocking, but here, it is **destroyed** rather than **locked**, destroyed and locked are not equal, right?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392" ContentLicense="CC BY-SA 4.0" />
  <row Id="5324" PostHistoryTypeId="2" PostId="1457" RevisionGUID="5d723dd2-ce62-4c1c-8983-86f4131fd446" CreationDate="2022-03-31T10:40:30.827" UserId="377" Text="What are precompiled in moonbeam and relevant EVM-enabled chains? and why we should use it if we are going to create EVM enabled chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5326" PostHistoryTypeId="1" PostId="1457" RevisionGUID="5d723dd2-ce62-4c1c-8983-86f4131fd446" CreationDate="2022-03-31T10:40:30.827" UserId="377" Text="What are precompiled in moonbeam and relevant EVM enabled chains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5327" PostHistoryTypeId="3" PostId="1457" RevisionGUID="5d723dd2-ce62-4c1c-8983-86f4131fd446" CreationDate="2022-03-31T10:40:30.827" UserId="377" Text="|evm|moonbeam|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5328" PostHistoryTypeId="2" PostId="1458" RevisionGUID="446b815d-6b22-463f-9015-a96615c9c7ca" CreationDate="2022-03-31T11:03:24.763" UserId="88" Text="It seems the main `offchain::ipfs` fork has stalled for a bit.&#xD;&#xA;See the readme on this branch of the repo:&#xD;&#xA;&#xD;&#xA;https://github.com/rs-ipfs/substrate/tree/offchain_ipfs&#xD;&#xA;&#xD;&#xA;It seems there are two other well-maintained forks you can use instead.&#xD;&#xA;&#xD;&#xA;The most recently updated of the two seems to be `uggugteam/substrate`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5330" PostHistoryTypeId="2" PostId="1459" RevisionGUID="0dd94bfd-6d49-4ce4-909f-1a95dba012c5" CreationDate="2022-03-31T11:22:50.570" UserId="73" Text="```&#xD;&#xA;let creator_share_percent = nft.royalty.map(|creator_roality| {&#xD;&#xA;    nft.price.unwrap_or_default() * creator_roality /100&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But be aware that `creator_share_percent` is again an `Option`. So, you need to handle it as `Option` as well. You will then probably do something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;if let Some(creator_share_percent) = creator_share_percent {&#xD;&#xA;    // pay the creator share.&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5332" PostHistoryTypeId="2" PostId="1460" RevisionGUID="a58aac0e-02dc-46da-b514-5874f187954d" CreationDate="2022-03-31T11:24:44.783" UserId="73" Text="This `BalanceOf&lt;T&gt;` represents the stake of each member in the first election." ContentLicense="CC BY-SA 4.0" />
  <row Id="5334" PostHistoryTypeId="6" PostId="1449" RevisionGUID="1a5abbdc-cafb-4016-bd02-48c4717a9d81" CreationDate="2022-03-31T11:24:55.040" UserId="73" Comment="edited tags" Text="|frame|pallet-election-phragmen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5335" PostHistoryTypeId="2" PostId="1461" RevisionGUID="f309a563-84a8-4558-86bc-4337aacb749e" CreationDate="2022-03-31T13:29:40.547" UserId="139" Text=" According to https://wiki.polkadot.network/docs/maintain-wss#importing-the-certificate&#xD;&#xA;One can visit the cloud instance on `https` and download the certificate and then proceed to connect to a websocket via 443, but how can one achieve this using the electron App or Polkadot Appimage? I am currently on windows, and I can connect to my cloud via my browser, but not via my electron app, supposedly because my app cannot obtain the certificate." ContentLicense="CC BY-SA 4.0" />
  <row Id="5337" PostHistoryTypeId="1" PostId="1461" RevisionGUID="f309a563-84a8-4558-86bc-4337aacb749e" CreationDate="2022-03-31T13:29:40.547" UserId="139" Text="How do we import a self-signed certificate for the Polkadot-JS electron app or AppImage|?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5338" PostHistoryTypeId="3" PostId="1461" RevisionGUID="f309a563-84a8-4558-86bc-4337aacb749e" CreationDate="2022-03-31T13:29:40.547" UserId="139" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5339" PostHistoryTypeId="2" PostId="1462" RevisionGUID="fd970a66-b31a-4cc8-99dc-e5847773f746" CreationDate="2022-03-31T15:08:33.883" UserId="2036" Text="-1&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm trying to learn how to implement EVM pre-compiles in substrate (frontier), but I cannot find any documentation anywhere. If I try and reference something like moonbeam I fall into dependency hell. If you could point me towards some documentation or let me see some of what you have done I would be very grateful." ContentLicense="CC BY-SA 4.0" />
  <row Id="5341" PostHistoryTypeId="1" PostId="1462" RevisionGUID="fd970a66-b31a-4cc8-99dc-e5847773f746" CreationDate="2022-03-31T15:08:33.883" UserId="2036" Text="Does anybody know where I can find frontier evm precompile documentation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5342" PostHistoryTypeId="3" PostId="1462" RevisionGUID="fd970a66-b31a-4cc8-99dc-e5847773f746" CreationDate="2022-03-31T15:08:33.883" UserId="2036" Text="|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5343" PostHistoryTypeId="2" PostId="1463" RevisionGUID="cb7a3db2-d713-42b4-9258-4fb7c076119c" CreationDate="2022-03-31T16:02:26.310" UserId="2038" Text="I cannot seem to setup a RPC call that accepts a `u128` param. &#xD;&#xA;&#xD;&#xA;I can input the following &#xD;&#xA;```ts&#xD;&#xA;let u128Input = new BN(&quot;10&quot;)&#xD;&#xA;let output = await api.rpc.template.testRpc(u128Input);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but get an error when the number is large&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;let u128Input = new BN(&quot;10000000000000000&quot;)&#xD;&#xA;let output = await api.rpc.template.testRpc(u128Input);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the following error &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RPC-CORE: testRpc(amount: Balance): Balance:: -32602: Invalid params: invalid type: string &quot;0x0000000000000000002386f26fc10000&quot;, expected u128.&#xD;&#xA;RpcError: -32602: Invalid params: invalid type: string &quot;0x0000000000000000002386f26fc10000&quot;, expected u128.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My `runtime-api/src/lib.rs` file looks like&#xD;&#xA;```rs&#xD;&#xA;sp_api::decl_runtime_apis! {&#xD;&#xA;	pub trait TemplateApi&lt;Balance&gt; where&#xD;&#xA;		Balance: Codec + MaybeDisplay,&#xD;&#xA;	{&#xD;&#xA;		fn test_rpc(amount: Balance) -&gt; Result&lt;u64, DispatchError&gt;;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What should I change to allow `u128` inputs?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5345" PostHistoryTypeId="1" PostId="1463" RevisionGUID="cb7a3db2-d713-42b4-9258-4fb7c076119c" CreationDate="2022-03-31T16:02:26.310" UserId="2038" Text="How to setup and RPC call that accepts a u128 input?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5346" PostHistoryTypeId="3" PostId="1463" RevisionGUID="cb7a3db2-d713-42b4-9258-4fb7c076119c" CreationDate="2022-03-31T16:02:26.310" UserId="2038" Text="|rust|serialization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5348" PostHistoryTypeId="2" PostId="1464" RevisionGUID="1c0260c2-5e77-4cc1-bf18-1357f40ec5a1" CreationDate="2022-03-31T16:32:43.380" UserId="85" Text="Fastest way to get to the bottom of this might be to: &#xD;&#xA;&#xD;&#xA;`git clone https://github.com/tikv/jemallocator.git` and put some println next to `build.rs:334:19` so that you can find out which command it's actually complaining about.&#xD;&#xA;&#xD;&#xA;`cargo build` in the `jemalloc-sys` dir should invoke the same error. Once you know what it's really complaining about the fix should be fairly trivial. ( could also consider a PR so that the next person gets a nicer failure)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5350" PostHistoryTypeId="2" PostId="1465" RevisionGUID="eb4d8cc5-2e86-4d66-a949-8a85823d43d5" CreationDate="2022-03-31T17:25:46.073" UserId="2008" Text="We have a prototype of substrate-based blockchain running with few nodes.&#xD;&#xA;&#xD;&#xA;After some time running and testing we came up with new version of code-base, which consists of the same runtime, pallets and storage items but with some naming changes for both pallet crates and their storage.&#xD;&#xA;&#xD;&#xA;So there are few questions I am interested in:&#xD;&#xA;1. Is it possible to migrate from old code base to new one (which are basically two different repositories with different structure but with similar components) without loosing blocks history and storage data?&#xD;&#xA;2. Would forkless upgrade via uploading new WASM binary work considering it was built from different code-base?&#xD;&#xA;&#xD;&#xA;I already checked substrate documentation [1][1], [2][2] and didn't find similar problem. There is a storage migration article but the problem discovered there is not exactly what I am looking for. It is just about adding new field to pallet storage.&#xD;&#xA;&#xD;&#xA;I know it's possible to transfer all storage between blockchains by dumping all the storage from one and then transfering into another via genesis file configuration. But it would also be nice to store blocks history with all executed transactions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/how-to-guides/v3/storage-migrations/basics/&#xD;&#xA;  [2]: https://docs.substrate.io/v3/runtime/upgrades/" ContentLicense="CC BY-SA 4.0" />
  <row Id="5352" PostHistoryTypeId="1" PostId="1465" RevisionGUID="eb4d8cc5-2e86-4d66-a949-8a85823d43d5" CreationDate="2022-03-31T17:25:46.073" UserId="2008" Text="Migrating to new code base" ContentLicense="CC BY-SA 4.0" />
  <row Id="5353" PostHistoryTypeId="3" PostId="1465" RevisionGUID="eb4d8cc5-2e86-4d66-a949-8a85823d43d5" CreationDate="2022-03-31T17:25:46.073" UserId="2008" Text="|storage|runtime|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5354" PostHistoryTypeId="2" PostId="1466" RevisionGUID="06d4d85d-c224-4baf-9896-944bd92bc430" CreationDate="2022-03-31T17:36:22.833" UserId="560" Text="I'm trying to copy a function from the frontier pallet(fc_rpc::format::Formatter), I copied it to a file and imported that.&#xD;&#xA;frontier-752fb1c28a6c675a/ea37e8f/client/rpc/src/format.rs&#xD;&#xA;It's the same code:&#xD;&#xA;```rust&#xD;&#xA;use pallet_ethereum::TransactionValidationError as VError;&#xD;&#xA;use sc_transaction_pool_api::error::{Error as PError, IntoPoolError};&#xD;&#xA;use sp_runtime::transaction_validity::InvalidTransaction;&#xD;&#xA;&#xD;&#xA;pub trait Formatter: Send + Sync + 'static {&#xD;&#xA;	fn pool_error(err: impl IntoPoolError) -&gt; String;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Formatter keeping the same output as before the introduction of this&#xD;&#xA;// formatter design.&#xD;&#xA;pub struct Legacy;&#xD;&#xA;&#xD;&#xA;impl Formatter for Legacy {&#xD;&#xA;	fn pool_error(err: impl IntoPoolError) -&gt; String {&#xD;&#xA;		format!(&quot;submit transaction to pool failed: {:?}&quot;, err)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Formats the same way Geth node formats responses.&#xD;&#xA;pub struct Geth;&#xD;&#xA;&#xD;&#xA;impl Formatter for Geth {&#xD;&#xA;	fn pool_error(err: impl IntoPoolError) -&gt; String {&#xD;&#xA;		// Error strings from :&#xD;&#xA;		// https://github.com/ethereum/go-ethereum/blob/794c6133efa2c7e8376d9d141c900ea541790bce/core/error.go&#xD;&#xA;		match err.into_pool_error() {&#xD;&#xA;			Ok(PError::AlreadyImported(_)) =&gt; &quot;already known&quot;.to_string(),&#xD;&#xA;			// In Frontier the only case there is a `TemporarilyBanned` is because&#xD;&#xA;			// the same transaction was received before and returned&#xD;&#xA;			// `InvalidTransaction::Stale`. Thus we return the same error.&#xD;&#xA;			Ok(PError::TemporarilyBanned) =&gt; &quot;nonce too low&quot;.into(),&#xD;&#xA;			Ok(PError::TooLowPriority { .. }) =&gt; &quot;replacement transaction underpriced&quot;.into(),&#xD;&#xA;			Ok(PError::InvalidTransaction(inner)) =&gt; match inner {&#xD;&#xA;				InvalidTransaction::Stale =&gt; &quot;nonce too low&quot;.into(),&#xD;&#xA;				InvalidTransaction::Payment =&gt; &quot;insufficient funds for gas * price + value&quot;.into(),&#xD;&#xA;				InvalidTransaction::ExhaustsResources =&gt; &quot;gas limit reached&quot;.into(),&#xD;&#xA;				InvalidTransaction::Custom(inner) =&gt; match inner.into() {&#xD;&#xA;					VError::UnknownError =&gt; &quot;unknown error&quot;.into(),&#xD;&#xA;					VError::InvalidChainId =&gt; &quot;invalid chain id&quot;.into(),&#xD;&#xA;					VError::InvalidSignature =&gt; &quot;invalid sender&quot;.into(),&#xD;&#xA;					VError::GasLimitTooLow =&gt; &quot;intrinsic gas too low&quot;.into(),&#xD;&#xA;					VError::GasLimitTooHigh =&gt; &quot;exceeds block gas limit&quot;.into(),&#xD;&#xA;					VError::InsufficientFundsForTransfer =&gt; {&#xD;&#xA;						&quot;insufficient funds for transfer&quot;.into()&#xD;&#xA;					}&#xD;&#xA;				},&#xD;&#xA;				_ =&gt; &quot;unknown error&quot;.into(),&#xD;&#xA;			},&#xD;&#xA;			err @ _ =&gt; format!(&quot;submit transaction to pool failed: {:?}&quot;, err),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I allow fc_rpc::format::Formatter to be the same type as the local instance of Formatter?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shouldn't it be possible to do this with a similar statement like this:&#xD;&#xA;```rust&#xD;&#xA;dyn fc_rpc::format::Formatter: Formatter,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is the error i'm getting:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;error[E0277]: the trait bound `Geth: fc_rpc::format::Formatter` is not satisfied&#xD;&#xA;   --&gt; node/rpc/src/lib.rs:255:17&#xD;&#xA;    |&#xD;&#xA;255 |       io.extend_with(EthApiServer::to_delegate(EthApi::new(&#xD;&#xA;    |  ____________________^&#xD;&#xA;256 | |         client.clone(),&#xD;&#xA;257 | |         pool.clone(),&#xD;&#xA;258 | |         graph.clone(),&#xD;&#xA;...   |&#xD;&#xA;269 | |         fee_history_cache,&#xD;&#xA;270 | |     )));&#xD;&#xA;    | |______^ the trait `fc_rpc::format::Formatter` is not implemented for `Geth`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `fc_rpc::EthApi`&#xD;&#xA;   --&gt; /home/filip/.cargo/git/checkouts/frontier-752fb1c28a6c675a/ea37e8f/client/rpc/src/eth.rs:65:72&#xD;&#xA;    |&#xD;&#xA;65  | pub struct EthApi&lt;B: BlockT, C, P, CT, BE, H: ExHashT, A: ChainApi, F: Formatter&gt; {&#xD;&#xA;    |                                                                        ^^^^^^^^^ required by this bound in `fc_rpc::EthApi`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Geth: fc_rpc::format::Formatter` is not satisfied&#xD;&#xA;   --&gt; node/rpc/src/lib.rs:255:2&#xD;&#xA;    |&#xD;&#xA;255 | /     io.extend_with(EthApiServer::to_delegate(EthApi::new(&#xD;&#xA;256 | |         client.clone(),&#xD;&#xA;257 | |         pool.clone(),&#xD;&#xA;258 | |         graph.clone(),&#xD;&#xA;...   |&#xD;&#xA;269 | |         fee_history_cache,&#xD;&#xA;270 | |     )));&#xD;&#xA;    | |_______^ the trait `fc_rpc::format::Formatter` is not implemented for `Geth`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `fc_rpc::EthApi`&#xD;&#xA;   --&gt; /home/filip/.cargo/git/checkouts/frontier-752fb1c28a6c675a/ea37e8f/client/rpc/src/eth.rs:65:72&#xD;&#xA;    |&#xD;&#xA;65  | pub struct EthApi&lt;B: BlockT, C, P, CT, BE, H: ExHashT, A: ChainApi, F: Formatter&gt; {&#xD;&#xA;    |                                                                        ^^^^^^^^^ required by this bound in `fc_rpc::EthApi`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Check out the code:&#xD;&#xA;git clone -b erup-5-latest https://github.com/edgeware-network/edgeware-node&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5356" PostHistoryTypeId="1" PostId="1466" RevisionGUID="06d4d85d-c224-4baf-9896-944bd92bc430" CreationDate="2022-03-31T17:36:22.833" UserId="560" Text="frontier ethereum pallet integration, the trait `fc_rpc::format::Formatter` is not implemented for `Geth`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5357" PostHistoryTypeId="3" PostId="1466" RevisionGUID="06d4d85d-c224-4baf-9896-944bd92bc430" CreationDate="2022-03-31T17:36:22.833" UserId="560" Text="|rpc|frontier|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5359" PostHistoryTypeId="2" PostId="1467" RevisionGUID="97157435-a901-4b85-8878-c72e1dfdea1e" CreationDate="2022-03-31T19:33:37.083" UserId="2044" Text="In ink! smart contract, we usually use AccountID and save the balances in array using mapping or HashMap. This is the traditional way of ERC20 smart contract.&#xD;&#xA;&#xD;&#xA;I am now developing on my local chain, and main token is MMM.&#xD;&#xA;&#xD;&#xA;What I want is to transfer our own token (MMM) via smart contract, not deployed token.&#xD;&#xA;&#xD;&#xA;Is my idea correct? and can anyone help me?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5361" PostHistoryTypeId="1" PostId="1467" RevisionGUID="97157435-a901-4b85-8878-c72e1dfdea1e" CreationDate="2022-03-31T19:33:37.083" UserId="2044" Text="How to transfer funds via Currency(Balance Pallet) in ink! smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5362" PostHistoryTypeId="3" PostId="1467" RevisionGUID="97157435-a901-4b85-8878-c72e1dfdea1e" CreationDate="2022-03-31T19:33:37.083" UserId="2044" Text="|substrate-node|pallet|ink|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5363" PostHistoryTypeId="6" PostId="1463" RevisionGUID="21a01f54-6d89-4da8-b163-aa5bf428df2f" CreationDate="2022-03-31T21:22:10.457" UserId="28" Comment="edited tags" Text="|rust|polkadot-js|serialization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5364" PostHistoryTypeId="2" PostId="1468" RevisionGUID="62437500-7cc3-4b28-b164-57461ca568d8" CreationDate="2022-03-31T21:27:37.407" UserId="28" Text="End of the day, you will need to do a storage migration with your OLD network to make it compatible with your new code. And depending on what you changed, it may not be easily doable.&#xD;&#xA;&#xD;&#xA;You cannot just create a brand new client and expect your old blocks to exist, because your new client may not be compatible to import the old blocks.&#xD;&#xA;&#xD;&#xA;Additionally, you cannot just change your pallets and expect the old genesis to work since the genesis is dependent on the specific storage items and structures from your original chain.&#xD;&#xA;&#xD;&#xA;If you want to work with a whole new client and a whole new codebase, restarting your genesis makes the most sense to me. You can still migrate things like user accounts and balances over to your new chain, but you should assume that all previous history is lost.&#xD;&#xA;&#xD;&#xA;If you want to keep the history, you need to start bringing your new changes incrementally into your old client, making sure that any client breaking changes are handled, for example using `client_logic_1` from block 1 to N, and using `client_logic_2` for block N and on." ContentLicense="CC BY-SA 4.0" />
  <row Id="5366" PostHistoryTypeId="2" PostId="1469" RevisionGUID="91f7a5fc-86ca-4892-9ae5-f2d423377a1a" CreationDate="2022-03-31T22:23:28.427" UserId="1792" Text="I'm writing chain extensions for my pallets and I have a few functions that require dynamic sized types, for example `Vec&lt;u8&gt;` for metadata and `Vec&lt;u64&gt;` for a list of asset ids.&#xD;&#xA;&#xD;&#xA;The way I am approaching this right now is to make an array filled with zeroes in the size of the boundaries set for those cases in the runtime and fill the beginning with the actual data in the contract, then send it to the chain extension like that and removing the trailing zeroes.&#xD;&#xA;&#xD;&#xA;Sure this works, but it cannot be the best possible approach and I'm struggling to find any resource on chain extensions. There's a short documentation page and an example that shows the very minimum, only deals with a single function that has a single fixed size argument.&#xD;&#xA;&#xD;&#xA;So yeah, what I'm looking for here is a better approach to dynamic sized types in chain extensions but I'd really appreciate any resources and actual code for me to take a look." ContentLicense="CC BY-SA 4.0" />
  <row Id="5368" PostHistoryTypeId="1" PostId="1469" RevisionGUID="91f7a5fc-86ca-4892-9ae5-f2d423377a1a" CreationDate="2022-03-31T22:23:28.427" UserId="1792" Text="Correct way to use dynamic sized types in chain extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="5369" PostHistoryTypeId="3" PostId="1469" RevisionGUID="91f7a5fc-86ca-4892-9ae5-f2d423377a1a" CreationDate="2022-03-31T22:23:28.427" UserId="1792" Text="|ink|types|chain-extension|contracts|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5370" PostHistoryTypeId="5" PostId="1448" RevisionGUID="029cc6ed-2a6d-4601-872f-1eb1bd18b9f4" CreationDate="2022-03-31T23:06:42.113" UserId="104" Comment="Fix link" Text="Given one of the core USPs of Polkadot is its modularity and interoperability, it should be relatively easy to allow assets/tokens to be transferred between chains via XCM&#xD;&#xA;&#xD;&#xA;My question is about what is the &quot;best practice&quot;. Is there one defined? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I think we ideally need to make it simple and straightforward to import an asset from one chain to another and while the UI work needs to be done, we need a consistent way of allowing new chains to add another's chains tokens into their runtime &#xD;&#xA;&#xD;&#xA;As far as I can tell there are 2 ways to do this&#xD;&#xA;&#xD;&#xA;1) [Assets Pallet](https://github.com/paritytech/substrate/tree/master/frame/assets)&#xD;&#xA;2) [ORML-Tokens](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;While I understand the need to not have substrate be opinionated and allow chains the freedom to implement a registry as they see fit, I think defining a guide/tutorial or a best practice will go a long way. &#xD;&#xA;&#xD;&#xA;Very similar to how the substrate-node-template onboarded so many engineers and teams &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There is already an issue raised on [here](https://github.com/open-web3-stack/open-runtime-module-library/issues/721). Please feel free to comment/help if you are interested" ContentLicense="CC BY-SA 4.0" />
  <row Id="5371" PostHistoryTypeId="2" PostId="1470" RevisionGUID="59aa7399-da2e-4c10-a98a-53df5d638709" CreationDate="2022-04-01T01:14:01.090" UserId="543" Text="I'm playing around with custom RPC endpoints exposed from my substrate node, but I'm encountering an issue when trying to call it with polkadotjs. Initially, my endpoint only accepted a single parameter of type Bytes. Invocation from the frontend worked with any problems. After modifying the endpoint to also accept parameters with type Vec&lt;u8&gt; and u32 (note: this is only a change in params, the implementation was not changed), polkadotjs has an error when calling createType (when the endpoint is invoked), seemingly requiring an  expected size:&#xD;&#xA;&#xD;&#xA;`createType(Vec&lt;u8&gt;):: Bytes: required length less than remainder, expected at least 54, found 32`&#xD;&#xA;&#xD;&#xA;Is this an issue with using Vec&lt;u8&gt; as a parameter or an issue with my configuration?&#xD;&#xA;&#xD;&#xA;In my frontend I've added the following RPC config to the api creation:&#xD;&#xA;&#xD;&#xA;    const api = await ApiPromise.create({&#xD;&#xA;                provider,&#xD;&#xA;                rpc: {&#xD;&#xA;                  iris: {&#xD;&#xA;                    retrieveBytes: {&#xD;&#xA;                      description: 'retrieve bytes from iris',&#xD;&#xA;                      params: [&#xD;&#xA;                        {&#xD;&#xA;                            name: 'signature',&#xD;&#xA;                            type: 'Vec&lt;u8&gt;'&#xD;&#xA;                        },&#xD;&#xA;                        {&#xD;&#xA;                            name: 'message',&#xD;&#xA;                            type: 'Bytes'&#xD;&#xA;                        },&#xD;&#xA;                        {&#xD;&#xA;                            name: 'signer',&#xD;&#xA;                            type: 'Vec&lt;u8&gt;'&#xD;&#xA;                        },&#xD;&#xA;                        {&#xD;&#xA;                          name: 'asset_id',&#xD;&#xA;                          type: 'u32'&#xD;&#xA;                        }&#xD;&#xA;                      ],&#xD;&#xA;                      type: 'Bytes'&#xD;&#xA;                    }&#xD;&#xA;                  }&#xD;&#xA;                }&#xD;&#xA;            });&#xD;&#xA;&#xD;&#xA;Which I am calling using this:&#xD;&#xA;&#xD;&#xA;        await api.rpc.iris.retrieveBytes(signature, message, accountId, assetId)&#xD;&#xA;        .then(res =&gt; success_callback(res))&#xD;&#xA;        .catch(err =&gt; error_callback(err));&#xD;&#xA;&#xD;&#xA;My api implementation does nothing but return empty bytes.&#xD;&#xA;&#xD;&#xA;    pub fn retrieve_bytes(&#xD;&#xA;    		signature: Vec&lt;u8&gt;,&#xD;&#xA;    		message: Bytes,&#xD;&#xA;    		signer: Vec&lt;u8&gt;,&#xD;&#xA;    		asset_id: u32,&#xD;&#xA;        ) -&gt; Bytes {&#xD;&#xA;    		Bytes(Vec::new())&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="5373" PostHistoryTypeId="1" PostId="1470" RevisionGUID="59aa7399-da2e-4c10-a98a-53df5d638709" CreationDate="2022-04-01T01:14:01.090" UserId="543" Text="PolkadotJS how to properly setup api for custom RPC invocation" ContentLicense="CC BY-SA 4.0" />
  <row Id="5374" PostHistoryTypeId="3" PostId="1470" RevisionGUID="59aa7399-da2e-4c10-a98a-53df5d638709" CreationDate="2022-04-01T01:14:01.090" UserId="543" Text="|polkadot-js|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5375" PostHistoryTypeId="2" PostId="1471" RevisionGUID="a769b95a-08e6-4b16-b39d-a3ebc76c0c4f" CreationDate="2022-04-01T02:09:37.657" UserId="543" Text="I've been working on a fork of this repo. To update to V3, I ended up just rebuilding the entire repo on top of the substrate master branch. Most of it is encapsulated here: https://github.com/iridium-labs/substrate/commit/7a1c1c89857e28b3a1dbd3a56ca2c8d433ce233d&#xD;&#xA;&#xD;&#xA;As some guidance, you won't be able to update the latest version of substrate due to the libp2p upgrade (which rust-ipfs hasn't completed yet).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5378" PostHistoryTypeId="2" PostId="1472" RevisionGUID="7f0ef826-14fb-4b38-9320-74d7d5e982c4" CreationDate="2022-04-01T02:21:11.983" UserId="299" Text="I solved this problem, and there are two cases.&#xD;&#xA;1. Make is not installed. You need to install make&#xD;&#xA;`sudo apt-get install make -y`&#xD;&#xA;2. Do not compile projects in the mount area, this problem can occur." ContentLicense="CC BY-SA 4.0" />
  <row Id="5380" PostHistoryTypeId="2" PostId="1473" RevisionGUID="96888d2d-60f9-438c-8c21-bd65f611a0b7" CreationDate="2022-04-01T02:27:02.830" UserId="299" Text="If you register `parathread` with genesis and WASM generated on the MAC, then run the blockchain on Linux. Will this future run blockchain and fail?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5382" PostHistoryTypeId="1" PostId="1473" RevisionGUID="96888d2d-60f9-438c-8c21-bd65f611a0b7" CreationDate="2022-04-01T02:27:02.830" UserId="299" Text="Is the genesis built on the MAC different from the genesis built on Linux" ContentLicense="CC BY-SA 4.0" />
  <row Id="5383" PostHistoryTypeId="3" PostId="1473" RevisionGUID="96888d2d-60f9-438c-8c21-bd65f611a0b7" CreationDate="2022-04-01T02:27:02.830" UserId="299" Text="|wasm|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5386" PostHistoryTypeId="2" PostId="1474" RevisionGUID="42587b91-ff58-4a05-82d7-5a88ba710864" CreationDate="2022-04-01T03:23:39.857" UserId="28" Text="If you create a genesis on Mac and on Linux, they may differ, and that is OKAY.&#xD;&#xA;&#xD;&#xA;There will be no issues running a genesis generated on Mac with a node running on Linux.&#xD;&#xA;&#xD;&#xA;The genesis of a chain is entirely operating system agnostic. It is either a JSON object with non-encoded values, or a RAW spec is just directly encoded key and value pairs.&#xD;&#xA;&#xD;&#xA;The difference here will be with the Wasm included in the genesis, which will work on both operating systems, since Wasm is a platform agnostic format, but there may be artifacts in the Wasm which are specific to an OS, or even specific to the time or way to compile the Wasm.&#xD;&#xA;&#xD;&#xA;End of the day, these artifacts to not impact the final code which is executed, my understanding is these are mostly metadata stuff which can ultimately cause differences in the final generated object." ContentLicense="CC BY-SA 4.0" />
  <row Id="5388" PostHistoryTypeId="5" PostId="1472" RevisionGUID="784eb241-e661-43d9-9fe8-b8fefc3d014c" CreationDate="2022-04-01T04:40:43.363" UserId="299" Comment="deleted 69 characters in body" Text="I solved this problem, and there are two cases.&#xD;&#xA;1. Make is not installed. You need to install make&#xD;&#xA;`sudo apt-get install make -y`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5389" PostHistoryTypeId="2" PostId="1475" RevisionGUID="3114cacd-8766-42ba-94db-f370fbeb962e" CreationDate="2022-04-01T05:23:45.093" UserId="125" Text="I want to output some debug info in the [wasm_builder](https://github.com/paritytech/substrate/blob/master/utils/wasm-builder/Cargo.toml), What is the right way to do this? We cannot use normally runtime `log::debug!(...)` approach here, as the `build.rs` is compiled with the node build process. I have tried to use `println!(...)` directly, seems not work.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5391" PostHistoryTypeId="1" PostId="1475" RevisionGUID="3114cacd-8766-42ba-94db-f370fbeb962e" CreationDate="2022-04-01T05:23:45.093" UserId="125" Text="How to output debug log in `build.rs`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5392" PostHistoryTypeId="3" PostId="1475" RevisionGUID="3114cacd-8766-42ba-94db-f370fbeb962e" CreationDate="2022-04-01T05:23:45.093" UserId="125" Text="|substrate-node|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5395" PostHistoryTypeId="2" PostId="1477" RevisionGUID="f090dcad-3fce-4e40-b56d-4a0c3b9a3b30" CreationDate="2022-04-01T07:56:16.597" UserId="627" Text="For the RPCs, I believe `NumberOrHex` is what you are after. Here is an example from the [contracts RPC](https://github.com/paritytech/substrate/blob/2287cd80830b081bd51bd8c313c6213d312e541e/frame/contracts/rpc/src/lib.rs#L74-L85), where both the `value` &amp; `gas_limit` are defined as this type.&#xD;&#xA;&#xD;&#xA;I believe it is possibly something like (untested and I'm certainly not a Rust dev...) -&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_rpc::number::NumberOrHex;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;pub trait TemplateApi&lt;Balance&gt; where&#xD;&#xA;        Balance: Codec + Copy + TryFrom&lt;NumberOrHex&gt;,&#xD;&#xA;    {&#xD;&#xA;        fn test_rpc(amount: Balance) -&gt; Result&lt;u64, DispatchError&gt;;&#xD;&#xA;    }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5397" PostHistoryTypeId="2" PostId="1478" RevisionGUID="eb32b948-e040-4a93-8eac-9768adfc4550" CreationDate="2022-04-01T08:02:05.707" UserId="83" Text="I want to be able to connect a collator node using https://polkadot.js.org/apps that is based on the substrate-parachain-template using branch 'polkadot-v0.9.18' and is being run as a parachain in **production**, but I do not want to use `--rpc-cors=all`. Instead I want to **enable origin validation** and manually add the **default** browser origins that are allowed. It mentions what values may be provided to `--rpc-cors=` in the documentation [here][1].&#xD;&#xA;```bash&#xD;&#xA;--rpc-cors &lt;ORIGINS&gt;&#xD;&#xA;    Specify browser Origins allowed to access the HTTP &amp; WS RPC servers.&#xD;&#xA;    &#xD;&#xA;    A comma-separated list of origins (protocol://domain or special `null` value). Value of&#xD;&#xA;    `all` will disable origin validation. Default is to allow localhost and&#xD;&#xA;    &lt;https://polkadot.js.org&gt; origins. When running in --dev mode the default is to allow&#xD;&#xA;    all origins.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][2], it shows the list of browser origins that it uses by **default**, which corresponds to the what it mentions above *&quot;Default is to allow localhost and &lt;https://polkadot.js.org&gt; origins.&quot;*.&#xD;&#xA;&#xD;&#xA;However, when I manually add the list as `--rpc-cors=&quot;http://localhost:*,http://127.0.0.1:*,https://localhost:*,https://127.0.0.1:*,https://polkadot.js.org&quot;` and additionally use `--unsafe-ws-external --unsafe-rpc-external --rpc-cors=all --rpc-methods=Unsafe`, if I then try to connect from the same https://polkadot.js.org/apps/?rpc=wss://&lt;MY_PARACHAIN_DOMAIN&gt; endpoint that connected successfully when using `--rpc-cors=all`, it gives the following error in the browser console `API-WS: disconnected from wss://&lt;MY_PARACHAIN_DOMAIN&gt;: 1006:: Abnormal Closure`&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sc_cli/struct.RunCmd.html#structfield.rpc_cors&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/client/cli/src/commands/run_cmd.rs#L406" ContentLicense="CC BY-SA 4.0" />
  <row Id="5399" PostHistoryTypeId="1" PostId="1478" RevisionGUID="eb32b948-e040-4a93-8eac-9768adfc4550" CreationDate="2022-04-01T08:02:05.707" UserId="83" Text="How to use the default Substrate CLI rpc-cors values without using rpc-cors=all for a Collator node and connect from Polkadot.js Apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="5400" PostHistoryTypeId="3" PostId="1478" RevisionGUID="eb32b948-e040-4a93-8eac-9768adfc4550" CreationDate="2022-04-01T08:02:05.707" UserId="83" Text="|polkadot-js|json-rpc|cors|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5401" PostHistoryTypeId="2" PostId="1479" RevisionGUID="826217a5-68ab-4a69-b58f-dcd0eacc2571" CreationDate="2022-04-01T08:23:57.423" UserId="599" Text="Each type in ink! implements `scale::Encode` and `scale::Decode`. That serialization and deserialization are used across the substrate everywhere. To pass some dynamic types you can encode it on the contract side and decode it on the extension side." ContentLicense="CC BY-SA 4.0" />
  <row Id="5403" PostHistoryTypeId="2" PostId="1480" RevisionGUID="6f6ce18b-caa7-48d4-bbe7-b051e65162a4" CreationDate="2022-04-01T08:26:49.657" UserId="227" Text="If I understand your question correctly, you want to invoke a function in your smart contract that transfers your native chain token to another account.&#xD;&#xA;&#xD;&#xA;In ink! there is the function [`ink_env::transfer`](https://paritytech.github.io/ink/ink_env/fn.transfer.html) to do this.&#xD;&#xA;&#xD;&#xA;You can take a look at the `give_me` function in our [`contract-transfer`](https://github.com/paritytech/ink/blob/master/examples/contract-transfer/lib.rs) example, it does exactly this plus some error handling around it." ContentLicense="CC BY-SA 4.0" />
  <row Id="5405" PostHistoryTypeId="2" PostId="1481" RevisionGUID="d2415ec1-2ed8-4e85-9864-18930b4fb8fe" CreationDate="2022-04-01T08:34:39.363" UserId="53" Text="In general, destroyed assets cannot be recovered, so it's crucial to preplan your XCM to actually work.&#xD;&#xA;&#xD;&#xA;However there are two main fail-safe mechanisms that were introduced in XCMv2 which can help you to reduce the chance of asset loss.&#xD;&#xA;&#xD;&#xA;### Error handling&#xD;&#xA;&#xD;&#xA;There is a new instruction `SetErrorHandler` which allows you to nominate a piece of code to execute if and only if an error occurs. This could be used to refund any unused assets sitting in the Holding Register, in case, e.g. a `TeleportAssets` instruction failed on the sending side.&#xD;&#xA;&#xD;&#xA;### Asset Trapping&#xD;&#xA;&#xD;&#xA;Sometimes when an error happens, there is no obvious way to handle it &#xD;&#xA;and refund the assets safely. This might be for example because your code is executing on a remote chain and you lack the resources to teleport them back again.&#xD;&#xA;&#xD;&#xA;For this we have Asset Traps. Asset Traps are a feature which the executing chain itself can enable for certain assets (via the `XcmConfig::AssetTrap` type item) it believes valuable enough. It ensures assets which are left in the Holding Register after execution is over are retained on-chain for some later time when they can be claimed by the origin of the message." ContentLicense="CC BY-SA 4.0" />
  <row Id="5407" PostHistoryTypeId="5" PostId="1478" RevisionGUID="ce5fed34-5d7d-4017-a736-657e39210aa9" CreationDate="2022-04-01T08:35:12.303" UserId="83" Comment="make it clearer what I did" Text="I want to be able to connect a collator node using https://polkadot.js.org/apps that is based on the substrate-parachain-template using branch 'polkadot-v0.9.18' and is being run as a parachain in **production**, but I do not want to use `--rpc-cors=all`. Instead I want to **enable origin validation** and manually add the **default** browser origins that are allowed. It mentions what values may be provided to `--rpc-cors=` in the documentation [here][1].&#xD;&#xA;```bash&#xD;&#xA;--rpc-cors &lt;ORIGINS&gt;&#xD;&#xA;    Specify browser Origins allowed to access the HTTP &amp; WS RPC servers.&#xD;&#xA;    &#xD;&#xA;    A comma-separated list of origins (protocol://domain or special `null` value). Value of&#xD;&#xA;    `all` will disable origin validation. Default is to allow localhost and&#xD;&#xA;    &lt;https://polkadot.js.org&gt; origins. When running in --dev mode the default is to allow&#xD;&#xA;    all origins.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][2], it shows the list of browser origins that it uses by **default**, which corresponds to the what it mentions above *&quot;Default is to allow localhost and &lt;https://polkadot.js.org&gt; origins.&quot;*.&#xD;&#xA;&#xD;&#xA;However, when I manually add the list and additionally use `--unsafe-ws-external --unsafe-rpc-external --rpc-methods=Unsafe`, as shown below:&#xD;&#xA;```&#xD;&#xA;--rpc-cors=&quot;http://localhost:*,http://127.0.0.1:*,https://localhost:*,https://127.0.0.1:*,https://polkadot.js.org&quot; \&#xD;&#xA;--unsafe-ws-external \&#xD;&#xA;--unsafe-rpc-external \&#xD;&#xA;--rpc-methods=Unsafe` \&#xD;&#xA;```&#xD;&#xA;If I then try to connect from the same https://polkadot.js.org/apps/?rpc=wss://&lt;MY_PARACHAIN_DOMAIN&gt; endpoint that previously connected successfully when using `--rpc-cors=all`, it gives the following error in the browser console `API-WS: disconnected from wss://&lt;MY_PARACHAIN_DOMAIN&gt;: 1006:: Abnormal Closure`&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sc_cli/struct.RunCmd.html#structfield.rpc_cors&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/client/cli/src/commands/run_cmd.rs#L406" ContentLicense="CC BY-SA 4.0" />
  <row Id="5408" PostHistoryTypeId="5" PostId="1478" RevisionGUID="1abbbf5a-9fe8-41e3-bf6f-049880b7bcbd" CreationDate="2022-04-01T09:10:51.063" UserId="83" Comment="add more research troubleshooting" Text="I want to be able to connect a collator node using https://polkadot.js.org/apps that is based on the substrate-parachain-template using branch 'polkadot-v0.9.18' and is being run as a parachain in **production**, but I do not want to use `--rpc-cors=all`. Instead I want to **enable origin validation** and manually add the **default** browser origins that are allowed. It mentions what values may be provided to `--rpc-cors=` in the documentation [here][1].&#xD;&#xA;```bash&#xD;&#xA;--rpc-cors &lt;ORIGINS&gt;&#xD;&#xA;    Specify browser Origins allowed to access the HTTP &amp; WS RPC servers.&#xD;&#xA;    &#xD;&#xA;    A comma-separated list of origins (protocol://domain or special `null` value). Value of&#xD;&#xA;    `all` will disable origin validation. Default is to allow localhost and&#xD;&#xA;    &lt;https://polkadot.js.org&gt; origins. When running in --dev mode the default is to allow&#xD;&#xA;    all origins.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][2], it shows the list of browser origins that it uses by **default**, which corresponds to the what it mentions above *&quot;Default is to allow localhost and &lt;https://polkadot.js.org&gt; origins.&quot;*.&#xD;&#xA;&#xD;&#xA;However, when I manually add the list and additionally use `--unsafe-ws-external --unsafe-rpc-external --rpc-methods=Unsafe`, as shown below:&#xD;&#xA;```&#xD;&#xA;--rpc-cors=&quot;http://localhost:*,http://127.0.0.1:*,https://localhost:*,https://127.0.0.1:*,https://polkadot.js.org,wss://&lt;MY_PARACHAIN_DOMAIN&gt;&quot; \&#xD;&#xA;--unsafe-ws-external \&#xD;&#xA;--unsafe-rpc-external \&#xD;&#xA;--rpc-methods=Unsafe` \&#xD;&#xA;```&#xD;&#xA;If I then try to connect from the same https://polkadot.js.org/apps/?rpc=wss://&lt;MY_PARACHAIN_DOMAIN&gt; endpoint that previously connected successfully when using `--rpc-cors=all`, it gives the following error in the browser console `API-WS: disconnected from wss://&lt;MY_PARACHAIN_DOMAIN&gt;: 1006:: Abnormal Closure`.&#xD;&#xA;&#xD;&#xA;Whilst troubleshooting, I found the Substrate implementation uses the ['jsonrpc-ws-server' crate][3] [here][4], where it uses a middleware function [verify_origin][5] to verify whether each the request origin header is the the lists of allowed origins, otherwise the collator logs should output `Blocked connection to WebSockets server from untrusted origin: &lt;REQUEST_ORIGIN&gt;`, however I do not get any of these warnings shown in the logs.&#xD;&#xA;&#xD;&#xA;So based on the logic in the `header_is_allowed` function [here][6], I think either the the header of the requests from https://polkadot.js.org are not being specified for some reason, or origin validation is still disabled even though I am not using `--rpc-cors=all` and despite instead providing a custom list of browser origins that I assumed would enable origin validation.&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sc_cli/struct.RunCmd.html#structfield.rpc_cors&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/client/cli/src/commands/run_cmd.rs#L406&#xD;&#xA;  [3]: https://crates.io/crates/jsonrpc-ws-server&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/client/rpc-servers/Cargo.toml#L25&#xD;&#xA;  [5]: https://github.com/paritytech/jsonrpc/blob/master/ws/src/session.rs#L185&#xD;&#xA;  [6]: https://github.com/paritytech/jsonrpc/blob/master/ws/src/session.rs#L371" ContentLicense="CC BY-SA 4.0" />
  <row Id="5409" PostHistoryTypeId="2" PostId="1482" RevisionGUID="0eecbaf2-cf46-42aa-9c65-90d8bd560f0f" CreationDate="2022-04-01T10:14:00.033" UserId="16" Text="The substrate backend of solang didn't get much love lately for various reasons. As a consequence of this it is out of date and doesn't work flawlessy with newer substrate versions. The current hypothesis is that your current error is connected to salt handling: Solang doesn't calculate he callee's address correctly.&#xD;&#xA;&#xD;&#xA;It was discussed in this post: https://substrate.stackexchange.com/questions/202/calling-the-function-of-an-other-contract-in-solidity/&#xD;&#xA;&#xD;&#xA;Also, check out this issue: https://github.com/hyperledger-labs/solang/issues/666&#xD;&#xA;&#xD;&#xA;This situation will get better soon when we eventually get more people on the substrate backend.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5415" PostHistoryTypeId="2" PostId="1484" RevisionGUID="8dcc869c-4cce-4423-a8e2-f500a5b1900f" CreationDate="2022-04-01T10:48:58.717" UserId="1837" Text="I am trying to run a benchmark for one of the test cases where I need to have some AccountId in storage to check and verify that the origin of the caller exists in storage &#xD;&#xA;&#xD;&#xA;I there any way to convert sr25519::Public to AccountId.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use sp_io::crypto::{sr25519_generate}&#xD;&#xA;&#xD;&#xA;benchmark! {&#xD;&#xA;   set_and_verify {&#xD;&#xA;		let pub_key = sr25519_generate(AURA,None);&#xD;&#xA;        let msg = b&quot;hello&quot;;&#xD;&#xA;        let signature:sr25519::Signature= sr25519_sign(AURA,&amp;pub_key,&amp;msg).unwrap();&#xD;&#xA;        let accounts:T::AccounId = vec![pub_key]&#xD;&#xA;         StorageAccounts::&lt;T&gt;::put(&amp;accounts);&#xD;&#xA;	}: _(RawOrigin::Root,(msg.encode(),signature.encode()))&#xD;&#xA;	verify {&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5417" PostHistoryTypeId="1" PostId="1484" RevisionGUID="8dcc869c-4cce-4423-a8e2-f500a5b1900f" CreationDate="2022-04-01T10:48:58.717" UserId="1837" Text="Generate AccountId from sr25519::Public" ContentLicense="CC BY-SA 4.0" />
  <row Id="5418" PostHistoryTypeId="3" PostId="1484" RevisionGUID="8dcc869c-4cce-4423-a8e2-f500a5b1900f" CreationDate="2022-04-01T10:48:58.717" UserId="1837" Text="|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5419" PostHistoryTypeId="2" PostId="1485" RevisionGUID="ac4f8dd3-22b1-44b5-a886-cd89d7408e14" CreationDate="2022-04-01T10:54:35.513" UserId="285" Text="You can decode the bytes into an accountId using something like this:&#xD;&#xA;```&#xD;&#xA;let accounts = T::AccountId::decode(&amp;mut &amp;pub_key.encode()[..]).unwrap()&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5421" PostHistoryTypeId="2" PostId="1486" RevisionGUID="c162fd0e-5897-4fcd-a9f7-214b61b67407" CreationDate="2022-04-01T11:18:34.910" UserId="73" Text="Short, you can not print from a `build.rs` file by default. It only prints the output when the `build.rs` returns an error. So, you could print what you are interested in and then panic or exit the process. Then you will see your output.&#xD;&#xA;&#xD;&#xA;However, you can also print warnings from a `build.rs` file that are always printed.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;println!(&quot;cargo:warning=MESSAGE&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can find more information [here][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargo-warning" ContentLicense="CC BY-SA 4.0" />
  <row Id="5423" PostHistoryTypeId="2" PostId="1487" RevisionGUID="ed0e9188-56bd-4f28-b158-ec0d05e7ed7b" CreationDate="2022-04-01T11:20:38.583" UserId="100" Text="When I deploy an ERC20 on Polkadot JS Apps, i can see that the return type of `total_supply` is `u128`, however according to the contract metadata it should display `Balance`. &#xD;&#xA;Noticed also for ERC1155 messages, for example `create`&#xD;&#xA;&#xD;&#xA;Is this intentional or is it a bug?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5425" PostHistoryTypeId="1" PostId="1487" RevisionGUID="ed0e9188-56bd-4f28-b158-ec0d05e7ed7b" CreationDate="2022-04-01T11:20:38.583" UserId="100" Text="Incorrect display name for smart contracts numeric return types" ContentLicense="CC BY-SA 4.0" />
  <row Id="5426" PostHistoryTypeId="3" PostId="1487" RevisionGUID="ed0e9188-56bd-4f28-b158-ec0d05e7ed7b" CreationDate="2022-04-01T11:20:38.583" UserId="100" Text="|polkadot-js|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5427" PostHistoryTypeId="6" PostId="1487" RevisionGUID="ea606305-88fd-426a-bd23-9b2e71572d4b" CreationDate="2022-04-01T11:26:25.043" UserId="100" Comment="edited tags" Text="|smart-contract|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5428" PostHistoryTypeId="2" PostId="1488" RevisionGUID="1a55448e-66d8-4bbc-8283-0189becb7b13" CreationDate="2022-04-01T11:35:32.367" UserId="53" Text="In general you can't unless `AccountId` is bound to a trait which actually provides you with a conversion function which does what you want.&#xD;&#xA;&#xD;&#xA;The `frame_system::Config::AccountId` which I'd presume you're using could easily be a type into which makes no sense to convert from a S/R25519 public key. For example, in test runtimes, `AccountId` is a `u64`, in a Polkadot runtime, it is `MultiSigner`.&#xD;&#xA;&#xD;&#xA;If you don't really care about how it is converted, but you just want some `AccountId` value vaguely associated with the public key, then you might do something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;(0u8. pub_key).using_encoded(|entropy| {&#xD;&#xA;	AccountId::decode(&amp;mut TrailingZeroInput::new(entropy))&#xD;&#xA;		.expect(&quot;infinite input; no invalid input; qed&quot;)&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This won't necessarily give any kind of sensible value of `AccountId`, but should work ok for the most common of them. It works by ensuring the first byte is zero, which is guaranteed to convert into a sensible enum variant in the case of something like a `MultiSigner` and won't do any harm with something like a `u64`. Be warned though: it won't work in general and it will result in a completely arbitrary and meaningless value of `AccountId`.&#xD;&#xA;&#xD;&#xA;The *correct* way of doing it is a bit more involved and may not be needed if this is just test/benchmarking code. It involves introducing a more bounded version of `AccountId` into your pallet's `Config` trait, a little bit like the `Event` type which pops up everywhere.&#xD;&#xA;&#xD;&#xA;It would be bounded similarly:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type AccountId: From&lt;sr25519::Public&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Anything of this type (which because of the `IsType` bound now includes the System's `AccountId`) is convertible from an Sr25519 public key." ContentLicense="CC BY-SA 4.0" />
  <row Id="5430" PostHistoryTypeId="5" PostId="1458" RevisionGUID="a6d7869e-e699-4519-96f8-5d2da1961e63" CreationDate="2022-04-01T11:47:35.857" UserId="88" Comment="Removed time oversight" Text="It seems the main `offchain::ipfs` fork has stalled for a bit.&#xD;&#xA;See the readme on this branch of the repo:&#xD;&#xA;&#xD;&#xA;https://github.com/rs-ipfs/substrate/tree/offchain_ipfs&#xD;&#xA;&#xD;&#xA;It seems there are two other well-maintained forks you can use instead.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5435" PostHistoryTypeId="2" PostId="1490" RevisionGUID="5e1b00ea-15ac-4015-b310-451ed0712486" CreationDate="2022-04-01T12:18:53.357" UserId="2057" Text="In my application, I need to fire multiple transactions, and want to create `statusCheck()` function, which will let me know how many transactions of total are still pending to be added to block. Is it possible?&#xD;&#xA;&#xD;&#xA;In my usecase, there is need to fire multiple transactions signed by same stash. There are lots of transactions, and they take lots of blocks before all of them are finalized. (As each transaction is a batch transaction, I see only one transaction getting added in one block at a time. Hence N transaction takes N blocks to complete all transactions).&#xD;&#xA; &#xD;&#xA;For simplicity at Javascript side, I can not make JS code to wait for events from each transaction to return &quot;status.isFinalized&quot;. Instead, after firing all N transactions, I want to write statusCheck() function, which when called will find how many transactions are yet pending to be finalized. That way, top level APP can call this statusCheck() again and again to find % completion (number of transactions pending / all transactions). &#xD;&#xA;&#xD;&#xA;I am firing transactions by calling `api.tx.utility.batch(txs).signAndSend`. I tried using `api.query.system.account` and `api.rpc.system.accountNextIndex`, but they give `nonce` which include &quot;pending transactions&quot; as well. Is there way to find out when a specific transaction/nonce gets confirmed/finalized? Thanks for help guys." ContentLicense="CC BY-SA 4.0" />
  <row Id="5437" PostHistoryTypeId="1" PostId="1490" RevisionGUID="5e1b00ea-15ac-4015-b310-451ed0712486" CreationDate="2022-04-01T12:18:53.357" UserId="2057" Text="For a given stash address, how to know how many transactions are pending to be added to block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5438" PostHistoryTypeId="3" PostId="1490" RevisionGUID="5e1b00ea-15ac-4015-b310-451ed0712486" CreationDate="2022-04-01T12:18:53.357" UserId="2057" Text="|polkadot-js|transactions|substrateinterface|finality|nonce|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5439" PostHistoryTypeId="2" PostId="1491" RevisionGUID="aaa3e30d-bcd3-45e4-86b4-15434c923d15" CreationDate="2022-04-01T12:27:40.133" UserId="139" Text="Starting a PoS network, I realised that my local node requires keys to start producing blocks. Unlike in test networks where I could simply pass `--alice` and have the validator keys inserted into the keystore and start block production, how do I go about doing it for a different account? In PoS we have controller and stash accounts, so if I am going to insert my keys like this : &#xD;&#xA;```rust&#xD;&#xA;./target/release/node-template key insert --base-path /tmp/node01 \&#xD;&#xA;--chain customSpecRaw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri &lt;your-secret-seed&gt; \&#xD;&#xA;--password-interactive \&#xD;&#xA;--key-type babe&#xD;&#xA;```&#xD;&#xA;whose `suri` should this be? Stash? Controller? Or just my regular seed from which I have derived both stash and controller addresses? " ContentLicense="CC BY-SA 4.0" />
  <row Id="5441" PostHistoryTypeId="1" PostId="1491" RevisionGUID="aaa3e30d-bcd3-45e4-86b4-15434c923d15" CreationDate="2022-04-01T12:27:40.133" UserId="139" Text="How to start a PoS network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5442" PostHistoryTypeId="3" PostId="1491" RevisionGUID="aaa3e30d-bcd3-45e4-86b4-15434c923d15" CreationDate="2022-04-01T12:27:40.133" UserId="139" Text="|genesis|npos|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5443" PostHistoryTypeId="4" PostId="1490" RevisionGUID="dc864378-3f77-4736-850e-5fee26aacb5e" CreationDate="2022-04-01T12:36:08.527" UserId="2057" Comment="edited title" Text="How to know how many transactions are pending to be added to block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5444" PostHistoryTypeId="2" PostId="1492" RevisionGUID="55d9def7-125c-46a0-b160-8d9a8a3d534c" CreationDate="2022-04-01T12:46:38.960" UserId="139" Text="My cloud and local instance use the same file, my local host has telnet access to 30333 on the cloud instance, I've made sure to connect with the correct peerId, I can still see no peers form. How can I enable debug messages regards to peering ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5446" PostHistoryTypeId="1" PostId="1492" RevisionGUID="55d9def7-125c-46a0-b160-8d9a8a3d534c" CreationDate="2022-04-01T12:46:38.960" UserId="139" Text="How to debug issues regarding peering?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5447" PostHistoryTypeId="3" PostId="1492" RevisionGUID="55d9def7-125c-46a0-b160-8d9a8a3d534c" CreationDate="2022-04-01T12:46:38.960" UserId="139" Text="|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5448" PostHistoryTypeId="2" PostId="1493" RevisionGUID="e1d294d6-0735-4779-8e84-1e1e0614bafe" CreationDate="2022-04-01T12:51:24.770" UserId="94" Text="You can also put a where clause into your benchmark and change your mocked runtime to use real crypto. Bit ugly but works.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;benchmark! {&#xD;&#xA;	where_clause {&#xD;&#xA;		where T::AccountId: From&lt;sp_core::sr25519::Public&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	…&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5450" PostHistoryTypeId="5" PostId="1478" RevisionGUID="4da42582-68a4-4a1c-9929-b5de1dcb6972" CreationDate="2022-04-01T13:38:24.110" UserId="83" Comment="clearer explanation" Text="I want to be able to connect a collator node using https://polkadot.js.org/apps that is based on the substrate-parachain-template using branch 'polkadot-v0.9.18' and is being run as a parachain in **production**, but I do not want to use `--rpc-cors=all`. Instead I want to **enable origin validation** and manually add the **default** browser origins that are allowed. It mentions what values may be provided to `--rpc-cors=` in the documentation [here][1].&#xD;&#xA;```bash&#xD;&#xA;--rpc-cors &lt;ORIGINS&gt;&#xD;&#xA;    Specify browser Origins allowed to access the HTTP &amp; WS RPC servers.&#xD;&#xA;    &#xD;&#xA;    A comma-separated list of origins (protocol://domain or special `null` value). Value of&#xD;&#xA;    `all` will disable origin validation. Default is to allow localhost and&#xD;&#xA;    &lt;https://polkadot.js.org&gt; origins. When running in --dev mode the default is to allow&#xD;&#xA;    all origins.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][2], it shows the list of browser origins that it uses by **default**, which corresponds to the what it mentions above *&quot;Default is to allow localhost and &lt;https://polkadot.js.org&gt; origins.&quot;*.&#xD;&#xA;&#xD;&#xA;However, when I manually add the list and additionally use `--unsafe-ws-external --unsafe-rpc-external --rpc-methods=Unsafe`, as shown below:&#xD;&#xA;```&#xD;&#xA;--rpc-cors=&quot;http://localhost:*,http://127.0.0.1:*,https://localhost:*,https://127.0.0.1:*,https://polkadot.js.org,wss://&lt;MY_PARACHAIN_DOMAIN&gt;&quot; \&#xD;&#xA;--unsafe-ws-external \&#xD;&#xA;--unsafe-rpc-external \&#xD;&#xA;--rpc-methods=Unsafe` \&#xD;&#xA;```&#xD;&#xA;If I then try to connect from the same https://polkadot.js.org/apps/?rpc=wss://&lt;MY_PARACHAIN_DOMAIN&gt; endpoint that previously connected successfully when using `--rpc-cors=all`, it gives the following error in the browser console `API-WS: disconnected from wss://&lt;MY_PARACHAIN_DOMAIN&gt;: 1006:: Abnormal Closure`.&#xD;&#xA;&#xD;&#xA;Whilst investigating, I found the Substrate implementation uses the ['jsonrpc-ws-server' crate][3] [here][4], where it uses a middleware function [verify_origin][5] to verify whether each request origin header is in the list of allowed origins, otherwise the collator logs should output `Blocked connection to WebSockets server from untrusted origin: &lt;REQUEST_ORIGIN&gt;`, however I do not get any of these warnings shown in the logs.&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sc_cli/struct.RunCmd.html#structfield.rpc_cors&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/client/cli/src/commands/run_cmd.rs#L406&#xD;&#xA;  [3]: https://crates.io/crates/jsonrpc-ws-server&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/client/rpc-servers/Cargo.toml#L25&#xD;&#xA;  [5]: https://github.com/paritytech/jsonrpc/blob/master/ws/src/session.rs#L185&#xD;&#xA;  [6]: https://github.com/paritytech/jsonrpc/blob/master/ws/src/session.rs#L371" ContentLicense="CC BY-SA 4.0" />
  <row Id="5451" PostHistoryTypeId="5" PostId="1488" RevisionGUID="2ba9cf35-182d-43af-8648-cc8472460d4d" CreationDate="2022-04-01T14:33:40.663" UserId="53" Comment="Introduce another alternative." Text="In general you can't unless `AccountId` is bound to a trait which actually provides you with a conversion function which does what you want.&#xD;&#xA;&#xD;&#xA;The `frame_system::Config::AccountId` which I'd presume you're using could easily be a type into which it makes no sense to convert from a S/R25519 public key. For example, in test runtimes, `AccountId` is a `u64`, in a Polkadot runtime, it is `MultiSigner`.&#xD;&#xA;&#xD;&#xA;If you don't really care about how it is converted, but you just want some `AccountId` value vaguely associated with the public key, then you might do something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;(0u8. pub_key).using_encoded(|entropy| {&#xD;&#xA;	AccountId::decode(&amp;mut TrailingZeroInput::new(entropy))&#xD;&#xA;		.expect(&quot;infinite input; no invalid input; qed&quot;)&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This won't necessarily give any kind of sensible value of `AccountId`, but should work ok for the most common of them. It works by ensuring the first byte is zero, which is guaranteed to convert into a sensible enum variant in the case of something like a `MultiSigner` and won't do any harm with something like a `u64`. Be warned though: it won't work in general and it will result in a completely arbitrary and meaningless value of `AccountId`.&#xD;&#xA;&#xD;&#xA;The *correct* ways of doing it are a bit more involved and may not be needed if this is just test/benchmarking code. One way involves introducing a more bounded version of `AccountId` into your pallet's `Config` trait, a little bit like the `Event` type which pops up everywhere.&#xD;&#xA;&#xD;&#xA;It would be bounded similarly:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type AccountId: From&lt;sr25519::Public&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Anything of this type (which because of the `IsType` bound now includes the System's `AccountId`) is convertible from an Sr25519 public key.&#xD;&#xA;&#xD;&#xA;Another way would be to introduce another type item in the `Config` trait which implements the conversion. it would look something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type ConvertIntoAccountId: Convert&lt;sr25519::Public, Self::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This has the advantage that you don't need to implement `From&lt;sr25519::Public&gt;` for your `AccountId`, which might be difficult or impossible." ContentLicense="CC BY-SA 4.0" />
  <row Id="5452" PostHistoryTypeId="2" PostId="1494" RevisionGUID="2d8d439e-6090-404a-808f-789db97da7d5" CreationDate="2022-04-01T14:43:49.483" UserId="1904" Text="I'm not sure if this is the simplest way, but I came up with a solution. &#xD;&#xA;&#xD;&#xA; 1. Write a basic smart contract that calls each chain extension function&#xD;&#xA; 2. Create a mock runtime using the chain extension&#xD;&#xA; 3. Build the contract, upload it with `pallet_contracts::bare_upload_code` and `pallet_contracts::bare_instantiate`&#xD;&#xA; 4. Write a test that calls the contract's functions with `pallet_contracts::bare_call` and verify they work as intended" ContentLicense="CC BY-SA 4.0" />
  <row Id="5454" PostHistoryTypeId="2" PostId="1495" RevisionGUID="d49e9b67-5cfb-4497-9852-6a029ee33e03" CreationDate="2022-04-01T15:15:32.377" UserId="2040" Text="I think Substrate API is really messy and difficult to understand. How could I get all the transactions for an account? And getting account by address is also counterintuitive: you need to make a `query` with some module and function but I didn't find any list of available functions and modules. So I would appreciate if you could suggest me clear and full documentation. &#xD;&#xA;&#xD;&#xA;P.S. I'm using `Python` for development, so therefor I use https://github.com/polkascan/py-substrate-interface and code for getting account by address looks like:&#xD;&#xA;```&#xD;&#xA;result = substrate.query(&#xD;&#xA;    module='System',&#xD;&#xA;    storage_function='Account',&#xD;&#xA;    params=['F4xQKRUagnSGjFqafyhajLs94e7Vvzvr8ebwYJceKpr8R7T']&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5456" PostHistoryTypeId="1" PostId="1495" RevisionGUID="d49e9b67-5cfb-4497-9852-6a029ee33e03" CreationDate="2022-04-01T15:15:32.377" UserId="2040" Text="Get account transactions using Substrate API" ContentLicense="CC BY-SA 4.0" />
  <row Id="5457" PostHistoryTypeId="3" PostId="1495" RevisionGUID="d49e9b67-5cfb-4497-9852-6a029ee33e03" CreationDate="2022-04-01T15:15:32.377" UserId="2040" Text="|account|transactions|python|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5458" PostHistoryTypeId="2" PostId="1496" RevisionGUID="a9914a8f-240e-4199-be3a-07cf5b0945c1" CreationDate="2022-04-01T16:03:52.117" UserId="138" Text="Substrate indeed covers quite many use-cases, not just transferring coins from one account to another, and some of that complexity will leak through any API, even if there are specialized ones in the making for a few typical use-cases.&#xD;&#xA;&#xD;&#xA;The part of the system you care about in your question is the `Balances` pallet that has a pretty comprehensive [Rust documentation](https://docs.substrate.io/rustdocs/latest/pallet_balances/index.html). This pallet does not maintain a list of extrinsics that changed the balance of the account, but [some nodes in the network](https://polkadot.subscan.io/account/12zsKEDVcHpKEWb99iFt3xrTCQQXZMu477nJQsTBBrof5k2h?tab=transfer) index `Transfer` events while executing blocks and store these events in a database." ContentLicense="CC BY-SA 4.0" />
  <row Id="5460" PostHistoryTypeId="5" PostId="1495" RevisionGUID="5c718a0c-ad13-4ccc-8267-fc70217a83b7" CreationDate="2022-04-01T16:15:02.527" UserId="2040" Comment="added 40 characters in body" Text="I think Substrate API is really messy and difficult to understand. How could I get all the transactions for an account? And getting account by address is also counterintuitive: you need to make a `query` with some module and function but I didn't find any list of available functions and modules. So I would appreciate if you could suggest me clear and full documentation. &#xD;&#xA;&#xD;&#xA;P.S. I'm using `Python` for development, so therefor I use [py-substrate-interface][1] and code for getting account by address looks like:&#xD;&#xA;```&#xD;&#xA;result = substrate.query(&#xD;&#xA;    module='System',&#xD;&#xA;    storage_function='Account',&#xD;&#xA;    params=['F4xQKRUagnSGjFqafyhajLs94e7Vvzvr8ebwYJceKpr8R7T']&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkascan/py-substrate-interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="5461" PostHistoryTypeId="5" PostId="1496" RevisionGUID="4cb8419d-c58c-49eb-b002-cd213147e3d1" CreationDate="2022-04-01T16:16:29.630" UserId="138" Comment="Added link to self-hosted indexers" Text="Substrate indeed covers quite many use-cases, not just transferring coins from one account to another, and some of that complexity will leak through any API, even if there are specialized ones in the making for a few typical use-cases.&#xD;&#xA;&#xD;&#xA;The part of the system you care about in your question is the `Balances` pallet that has a pretty comprehensive [Rust documentation](https://docs.substrate.io/rustdocs/latest/pallet_balances/index.html). This pallet does not maintain a list of extrinsics that changed the balance of the account, but [some nodes in the network](https://polkadot.subscan.io/account/12zsKEDVcHpKEWb99iFt3xrTCQQXZMu477nJQsTBBrof5k2h?tab=transfer) index `Transfer` events while executing blocks and store these events in a database. You can also build such a node on your own, [this answer to another question](https://substrate.stackexchange.com/a/56/138) might help you in the right direction." ContentLicense="CC BY-SA 4.0" />
  <row Id="5462" PostHistoryTypeId="6" PostId="1266" RevisionGUID="e8cc2896-354d-414c-b97f-ed8126212ad9" CreationDate="2022-04-01T16:37:39.947" UserId="85" Comment="edited tags" Text="|substrate-node|polkadot|kusama|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5464" PostHistoryTypeId="2" PostId="1497" RevisionGUID="376259b8-7ee7-4cc3-ab87-51a331107d25" CreationDate="2022-04-01T16:46:22.150" UserId="28" Text="No blockchain is designed to be able to easily get all transactions for an account, as this is a waste of storage for a normal syncing chain.&#xD;&#xA;&#xD;&#xA;Substrate provide the ability to run an Archive node, which stores all state for all blocks since the genesis, but querying for all transactions for a user would require searching all blocks, which can be slow for sure.&#xD;&#xA;&#xD;&#xA;The correct solution for such a query is to use a blockchain indexer as described here: https://substrate.stackexchange.com/questions/35/is-there-a-good-indexer-for-substrate-chains-like-the-graph&#xD;&#xA;&#xD;&#xA;Or a block explorer like:&#xD;&#xA;&#xD;&#xA;* https://polkascan.io/&#xD;&#xA;* https://www.subscan.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="5466" PostHistoryTypeId="2" PostId="1498" RevisionGUID="2ce7f175-0821-415e-9bee-125ab3f1b9e9" CreationDate="2022-04-01T16:51:59.730" UserId="283" Text="GRANDPA light clients don't need to download or store all the blocks. In fact, https://github.com/paritytech/smoldot/ is an example of what you're referring to as a super-light client. It only stores recent headers and can validate state proofs. BEEFY isn't actually needed for that, and BEEFY is designed for smart-contract light clients used in bridges to other chains.&#xD;&#xA;&#xD;&#xA;However, the GRANDPA authority set changes are fairly heavy and do add up to several MBs of data at this point. Additionally, they grow linearly with the chain. There are researchers working on extensions to BEEFY which will allow for authority set change proofs to be made much more compact using zero-knowledge proofs, which can reduce the data needed to sync a light client substantially." ContentLicense="CC BY-SA 4.0" />
  <row Id="5468" PostHistoryTypeId="5" PostId="1427" RevisionGUID="5de5d39d-a382-47b9-b3dc-16e2e1392bd7" CreationDate="2022-04-01T17:41:50.607" UserId="172" Comment="Made question more specific." Text="[Interlay (interBTC)](https://docs.interlay.io/#/) is a parachain that allows users to use their BTC on other parachains by locking up BTC in vaults, which, if I understood correctly act as a network of verifiers. How can I run an interBTC vault and what are the advantages to running one?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5469" PostHistoryTypeId="4" PostId="1427" RevisionGUID="5de5d39d-a382-47b9-b3dc-16e2e1392bd7" CreationDate="2022-04-01T17:41:50.607" UserId="172" Comment="Made question more specific." Text="How can I run an interBTC vault?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5470" PostHistoryTypeId="33" PostId="1427" RevisionGUID="c04e9b46-7f42-4594-9b59-1099f78052c6" CreationDate="2022-04-01T19:17:17.037" UserId="85" Comment="4" />
  <row Id="5471" PostHistoryTypeId="2" PostId="1499" RevisionGUID="241b3b5a-64a3-43cd-b289-b80f31ed1a12" CreationDate="2022-04-01T22:06:06.607" UserId="28" Text="Lets take for example you wanted to launch a crowdloan were targeting lease period 21-28 on Kusama.&#xD;&#xA;&#xD;&#xA;For your crowdloan settings:&#xD;&#xA;&#xD;&#xA;- `index`: Your Parachain ID&#xD;&#xA;- `cap`: The maximum number of tokens you want to accept.&#xD;&#xA;- `first_period`: The first lease period you want, in this case 21.&#xD;&#xA;- `last_period`: The last lease period you want, in this case 28.&#xD;&#xA;- `end`: The block number you want the crowdloan to end. This will either be aligned with the auction schedule, or at most, be the last block in lease period 21, since afterward, you can no longer win slot 21, and the crowdloan is invalid.&#xD;&#xA;&#xD;&#xA;When selecting the end date for your crowdloan, you should first look at the auction schedule.&#xD;&#xA;&#xD;&#xA;According to https://kusama.network/auctions/, the first auction for 21 - 28 will be the 31st auction:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Auction #31&#xD;&#xA;- Auction Starts April 6th, 2022 - Block #12096600&#xD;&#xA;- Bidding Ends April 13th, 2022 - Block #12195600&#xD;&#xA;- Slot Duration Lease Period 21-28; May 19th, 2022 - April 27th, 2023&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The last auction for 21 - 28 will be Auction #35:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Auction #35&#xD;&#xA;Auction Starts May 4th, 2022 - Block #12499800&#xD;&#xA;Bidding Ends May 11th, 2022 - Block #12598800&#xD;&#xA;Slot Duration Lease Period 21-28; May 19th, 2022 - April 27th, 2023&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, bidding for this last auction ends on `Block #12598800`.&#xD;&#xA;&#xD;&#xA;I would recommend to set your crowdloan end at that time." ContentLicense="CC BY-SA 4.0" />
  <row Id="5473" PostHistoryTypeId="2" PostId="1500" RevisionGUID="ba8f3662-fac3-4edb-b1f8-ccdfa94eace7" CreationDate="2022-04-01T22:06:46.530" UserId="181" Text="There doesn't seem to be a clear way to test that e.g. a given `call` function in a chain extension is set up to behave the way that is expected(because it's difficult to instantiate the `Environment` struct externally).&#xD;&#xA;&#xD;&#xA;Instead, you might break some parts out of `call` and test them individually. For example, the matching on the `func_id` is a large portion of the chain extension's work https://github.com/paritytech/ink/blob/6f105c2a0288b9a160385e1795375e5ad0350e34/examples/rand-extension/runtime/chain-extension-example.rs#L29-L48. You might split this out into a separate function that takes the function id and returns the expected call, if you can figure out a clean way to separate it from the `env.write()`. Then, you can test this new function, for example.&#xD;&#xA;&#xD;&#xA;You can also look at the existing ink! tests in the chain extension example that test chain extension setup more implicitly. In this case they are checking the state after using a chain extension that calls an extrinsic. https://github.com/paritytech/ink/blob/6f105c2a0288b9a160385e1795375e5ad0350e34/examples/rand-extension/lib.rs#L124-L155" ContentLicense="CC BY-SA 4.0" />
  <row Id="5475" PostHistoryTypeId="5" PostId="1499" RevisionGUID="dbe0a4c7-6635-445c-9250-3e82ae7d4aa6" CreationDate="2022-04-01T22:19:25.980" UserId="28" Comment="added 6 characters in body" Text="Lets take for example you wanted to launch a crowdloan were targeting lease period 21-28 on Kusama.&#xD;&#xA;&#xD;&#xA;For your crowdloan settings:&#xD;&#xA;&#xD;&#xA;- `index`: Your Parachain ID&#xD;&#xA;- `cap`: The maximum number of tokens you want to accept.&#xD;&#xA;- `first_period`: The first lease period you want, in this case 21.&#xD;&#xA;- `last_period`: The last lease period you want, in this case 28.&#xD;&#xA;- `end`: The block number you want the crowdloan to end. This will either be aligned with the auction schedule, or at most, be the last block in lease period 21, since afterward, you can no longer win slot 21, and the crowdloan is invalid.&#xD;&#xA;&#xD;&#xA;When selecting the end date for your crowdloan, you should first look at the auction schedule.&#xD;&#xA;&#xD;&#xA;According to https://kusama.network/auctions/, the first auction for 21 - 28 will be the 31st auction:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Auction #31&#xD;&#xA;- Auction Starts April 6th, 2022 - Block #12096600&#xD;&#xA;- Bidding Ends April 13th, 2022 - Block #12195600&#xD;&#xA;- Slot Duration Lease Period 21-28; May 19th, 2022 - April 27th, 2023&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The last auction for 21 - 28 will be Auction #35:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Auction #35&#xD;&#xA;- Auction Starts May 4th, 2022 - Block #12499800&#xD;&#xA;- Bidding Ends May 11th, 2022 - Block #12598800&#xD;&#xA;- Slot Duration Lease Period 21-28; May 19th, 2022 - April 27th, 2023&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, bidding for this last auction ends on `Block #12598800`.&#xD;&#xA;&#xD;&#xA;I would recommend to set your crowdloan end at that time." ContentLicense="CC BY-SA 4.0" />
  <row Id="5476" PostHistoryTypeId="2" PostId="1501" RevisionGUID="5c438ea5-82bb-4749-8e5c-d42d6bc6a14d" CreationDate="2022-04-01T22:55:30.293" UserId="587" Text="Suppose my pallet implements a trait `MyTrait` so that it can be loosely coupled with another pallet. Suppose also that `MyTrait::my_function()` makes storage modifications, which I would like to notify users of. &#xD;&#xA;&#xD;&#xA;Is it okay to emit an event in the implementation of this function, even though it will only be called indirectly by other pallets? Will the event be visible in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5478" PostHistoryTypeId="1" PostId="1501" RevisionGUID="5c438ea5-82bb-4749-8e5c-d42d6bc6a14d" CreationDate="2022-04-01T22:55:30.293" UserId="587" Text="Should events only be emitted in extrinsics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5479" PostHistoryTypeId="3" PostId="1501" RevisionGUID="5c438ea5-82bb-4749-8e5c-d42d6bc6a14d" CreationDate="2022-04-01T22:55:30.293" UserId="587" Text="|pallet|events|loose-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5480" PostHistoryTypeId="2" PostId="1502" RevisionGUID="e10e9ec2-5501-4531-9bb3-11324c748e62" CreationDate="2022-04-02T01:35:12.137" UserId="299" Text="**Environment：**&#xD;&#xA;one test machine: just mac-m1-pro local&#xD;&#xA;rococo-local: 2 relaychain node&#xD;&#xA;parachain: 2 collator(Alice and Bob)&#xD;&#xA;parachain consensus: aura&#xD;&#xA;&#xD;&#xA;The network I started locally is aura consensus, and Alice and Bob cannot implement polling out blocks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this is my start commands.&#xD;&#xA;```bash&#xD;&#xA;./target/release/dorafactory-node \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain dora-dev.json \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain  rococo-local-cfde.json \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;============================&#xD;&#xA;============================&#xD;&#xA;============================&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;./target/release/dorafactory-node \&#xD;&#xA;--bob \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain dora-dev.json \&#xD;&#xA;--base-path /tmp/parachain/bob \&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/40333/p2p/12D3KooWHWpTpxy1sEAesbYE7oJCaHcLwwB2wtYTvzZQS7GoWfU3  \&#xD;&#xA;--port 40334 \&#xD;&#xA;--ws-port 8845 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain rococo-local-cfde.json \&#xD;&#xA;--port 30344 \&#xD;&#xA;--ws-port 9978&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWDxv3tNkmGJiWhqKSEZyFZLfMNoc35w4iV7qtVSfteszB&#xD;&#xA;```&#xD;&#xA;this parachain explorer.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;and this system log.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XXQoU.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Fw4DP.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="5482" PostHistoryTypeId="1" PostId="1502" RevisionGUID="e10e9ec2-5501-4531-9bb3-11324c748e62" CreationDate="2022-04-02T01:35:12.137" UserId="299" Text="About a network of multiple collector nodes, but only one collector node blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="5483" PostHistoryTypeId="3" PostId="1502" RevisionGUID="e10e9ec2-5501-4531-9bb3-11324c748e62" CreationDate="2022-04-02T01:35:12.137" UserId="299" Text="|parachain|collator|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5484" PostHistoryTypeId="2" PostId="1503" RevisionGUID="f74fab11-c6bf-4c7e-8eee-2172d144a3fa" CreationDate="2022-04-02T05:45:49.797" UserId="609" Text="From https://docs.interlay.io/#/vault/overview&#xD;&#xA;```&#xD;&#xA;What do I need to become a Vault?&#xD;&#xA;&#xD;&#xA;    Vault client (source)&#xD;&#xA;    Bitcoin full node (instructions)&#xD;&#xA;    Polkadot account (public/private keypair)&#xD;&#xA;    Some KSM/DOT to provide as collateral and pay for transaction fees&#xD;&#xA;&#xD;&#xA;Head over to “Installation” for a detailed setup guide.&#xD;&#xA;```&#xD;&#xA;And as for the advantages, that page states:&#xD;&#xA;```&#xD;&#xA;Why operating a Vault?&#xD;&#xA;&#xD;&#xA;    Earning potential:&#xD;&#xA;        interBTC: All Vaults are part of a fee pool and earn fees in&#xD;&#xA;          interBTC when any user issues or redeems interBTC.&#xD;&#xA;        KINT (Kintsugi-only): Vaults receive a KINT block reward.&#xD;&#xA;        KSM/DOT (planned feature): Subject to governance, Vaults are&#xD;&#xA;         able to provide collateral in liquid staked assets like&#xD;&#xA;         LKSM or LDOT to receive both staking rewards from the relay&#xD;&#xA;         chain and the rewards form the Kintsugi/interBTC bridge.&#xD;&#xA;&#xD;&#xA;    Self-custody: Vaults hold BTC of users in custody. If you are a&#xD;&#xA;         large liquidity provider, you can be your own vault and&#xD;&#xA;         retain custody over your BTC holdings until you sell &#xD;&#xA;         interBTC.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5486" PostHistoryTypeId="2" PostId="1504" RevisionGUID="7a219b3e-f383-4404-a387-3b83bf9b83ab" CreationDate="2022-04-02T06:06:09.793" UserId="609" Text="You should create a new identity/keys each node.&#xD;&#xA;&#xD;&#xA;The actual &quot;controller&quot; or &quot;Authority&quot; are defined in the chains genesis block.&#xD;&#xA;You can see an example of this in the substrate node template:  &#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For information on how to create keys for your nodes:  &#xD;&#xA;https://docs.substrate.io/tutorials/v3/private-network/#generate-your-own-keys" ContentLicense="CC BY-SA 4.0" />
  <row Id="5488" PostHistoryTypeId="2" PostId="1505" RevisionGUID="1d6cb962-4165-4fde-8da4-6073777e5712" CreationDate="2022-04-02T06:31:10.613" UserId="28" Text="Adding:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--log sub-libp2p=trace&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Should let you see all the trace logs related specifically to libp2p and networking." ContentLicense="CC BY-SA 4.0" />
  <row Id="5490" PostHistoryTypeId="2" PostId="1506" RevisionGUID="f0d59eaf-472c-4b1c-bbcc-e9e08597e4ec" CreationDate="2022-04-02T06:41:13.440" UserId="566" Text="I'm trying to create a contract that verifies the signature in a contract function. I wasn't able to find anything in the examples or in the docs. &#xD;&#xA;&#xD;&#xA;Is it possible to send a signature to an ink! contract and verify it in its methods?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5492" PostHistoryTypeId="1" PostId="1506" RevisionGUID="f0d59eaf-472c-4b1c-bbcc-e9e08597e4ec" CreationDate="2022-04-02T06:41:13.440" UserId="566" Text="How to verify a signature in Ink! contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="5493" PostHistoryTypeId="3" PostId="1506" RevisionGUID="f0d59eaf-472c-4b1c-bbcc-e9e08597e4ec" CreationDate="2022-04-02T06:41:13.440" UserId="566" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5494" PostHistoryTypeId="2" PostId="1507" RevisionGUID="013894ca-b737-469a-bdad-4b5c6fb92944" CreationDate="2022-04-02T06:42:47.883" UserId="28" Text="Yes it is okay, and yes it definitely makes sense.&#xD;&#xA;&#xD;&#xA;The most common example of this pattern can be found in the Balances pallet, where Balances events are emitted every time the `Currency` trait is called from another pallet.&#xD;&#xA;&#xD;&#xA;This allows off-chain services like Exchanges track all movement of funds, even when other pallets are doing the interactions." ContentLicense="CC BY-SA 4.0" />
  <row Id="5496" PostHistoryTypeId="2" PostId="1508" RevisionGUID="7a21017d-973a-44a4-8ad9-17bc3b7892eb" CreationDate="2022-04-02T07:06:17.553" UserId="28" Text="In general, issues like this are due to incorrectly encoding `Vec` in SCALE.&#xD;&#xA;&#xD;&#xA;All `Vec`s are [prepended with their length](https://docs.substrate.io/v3/advanced/scale-codec/#vectors-lists-series-sets).&#xD;&#xA;&#xD;&#xA;&gt; A collection of same-typed values is encoded, prefixed with a compact encoding of the number of items, followed by each item's encoding concatenated in turn.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;Vector of unsigned 16-bit integers:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[4, 8, 15, 16, 23, 42]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;SCALE Bytes:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x18040008000f00100017002a00&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where `0x18` is the hex representation of the number 24, which is the byte length of the vector: 6 digits that are each 4 bytes.&#xD;&#xA;&#xD;&#xA;When an error like:&#xD;&#xA;&#xD;&#xA;&gt; createType(Vec&lt;u8&gt;):: Bytes: required length less than remainder, expected at least 54, found 32&#xD;&#xA;&#xD;&#xA;Shows up, it means that it is trying to read the first bytes as the length, and the length it is reading does not match the actual available bytes, implying something was encoded incorrectly.&#xD;&#xA;&#xD;&#xA;In this case, the first bytes read as &quot;the length of this vector is 54 bytes&quot;, and then the actual vector is only 32 bytes long, which is clearly an error." ContentLicense="CC BY-SA 4.0" />
  <row Id="5498" PostHistoryTypeId="2" PostId="1509" RevisionGUID="e95da08b-5ad6-4f04-93ec-ce69e2997b49" CreationDate="2022-04-02T07:10:42.620" UserId="627" Text="The [author_pendingExtrinsics RPC](https://polkadot.js.org/docs/substrate/rpc#pendingextrinsics-vecextrinsic) provides the list of pending extrinsics that is in the pool.&#xD;&#xA;&#xD;&#xA;This is retrieved on a per-node basis, i.e. it will list the extrinsics that is available for the specific RPC node you are connecting to. (Some other nodes may have transactions that have not propagated to your RPC node)&#xD;&#xA;&#xD;&#xA;If a transaction is not pending, assuming you submitted to the same RPC node, it is either included or has been removed from the pool, i.e. it could have been stale. To explicitly see what is included in a block, check new blocks and check for the extrinsic details of those processed." ContentLicense="CC BY-SA 4.0" />
  <row Id="5500" PostHistoryTypeId="2" PostId="1510" RevisionGUID="7cfb9441-a2af-4a37-b5bd-e6470e97d2b0" CreationDate="2022-04-02T08:34:33.057" UserId="213" Text="I have following code so far.&#xD;&#xA;&#xD;&#xA;    import { useSubstrateState } from './../substrate-lib'&#xD;&#xA;    import { web3FromSource } from '@polkadot/extension-dapp'&#xD;&#xA;&#xD;&#xA;    const { api, currentAccount } = useSubstrateState()    &#xD;&#xA;    const getFromAcct = async () =&gt; {&#xD;&#xA;            const {&#xD;&#xA;              address,&#xD;&#xA;              meta: { source, isInjected },&#xD;&#xA;            } = currentAccount&#xD;&#xA;        &#xD;&#xA;            if (!isInjected) {&#xD;&#xA;              return [currentAccount]&#xD;&#xA;            }&#xD;&#xA;        &#xD;&#xA;          &#xD;&#xA;            const injector = await web3FromSource(source)&#xD;&#xA;            return [address, { signer: injector.signer }]&#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;And transaction as:&#xD;&#xA;&#xD;&#xA;    const fromAcct = await getFromAcct()&#xD;&#xA;    const unsub = await txExecute&#xD;&#xA;                  .signAndSend(...fromAcct, ({ status, events }) =&gt; {&#xD;&#xA;                    txResHandler(status, events)&#xD;&#xA;                  })&#xD;&#xA;                  .catch(txErrHandler)&#xD;&#xA;&#xD;&#xA;But it doesn't call the polkadot extension.   &#xD;&#xA;It gives error `Cannot destructure property 'address' of 'currentAccount' as it is null.`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5502" PostHistoryTypeId="1" PostId="1510" RevisionGUID="7cfb9441-a2af-4a37-b5bd-e6470e97d2b0" CreationDate="2022-04-02T08:34:33.057" UserId="213" Text="How to load account address from polkadot extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5503" PostHistoryTypeId="3" PostId="1510" RevisionGUID="7cfb9441-a2af-4a37-b5bd-e6470e97d2b0" CreationDate="2022-04-02T08:34:33.057" UserId="213" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5504" PostHistoryTypeId="2" PostId="1511" RevisionGUID="e8bba9a1-bffb-4d84-ba1c-03659ce4088e" CreationDate="2022-04-02T08:43:10.300" UserId="627" Text="You issue lies here -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const {&#xD;&#xA;  address,&#xD;&#xA;  meta: { source, isInjected },&#xD;&#xA;} = currentAccount&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As the error suggests, in this case `currentAccount === null`, so trying to extract `address` from it is invalid.&#xD;&#xA;&#xD;&#xA;Either check for the `null` value before attempting to deconstruct, or don't allow `null` returns for `currentAccount` from `useSubstrateState()`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5506" PostHistoryTypeId="2" PostId="1512" RevisionGUID="0cd922ee-8ef2-4075-87de-f20c53182606" CreationDate="2022-04-02T09:31:09.373" UserId="599" Text="At the moment `contract-pallet` allows you only to verify ECDSA signatures. In ink! you can use [ink_env::ecdsa_recover](https://github.com/paritytech/ink/blob/master/crates/env/src/api.rs#L493) to do that." ContentLicense="CC BY-SA 4.0" />
  <row Id="5508" PostHistoryTypeId="2" PostId="1513" RevisionGUID="ba2e701a-bc4f-44d0-b8b1-5eba3c01fda9" CreationDate="2022-04-02T10:34:46.950" UserId="442" Text="In additional, there's a guide to run a vault.&#xD;&#xA;&#xD;&#xA;https://docs.interlay.io/#/vault/installation&#xD;&#xA;&#xD;&#xA;With Docker/Docker Compose&#xD;&#xA;&gt; Setup the Vault client using docker-compose. This guide is only for the&#xD;&#xA;&gt; testnet, please follow the Standard Installation for Kintsugi.&#xD;&#xA;&gt; 1. Install docker and docker-compose&#xD;&#xA;&gt; 2. Download the docker-compose file&#xD;&#xA;&#xD;&#xA;Or without Docker:&#xD;&#xA;&gt; Run Bitcoin and the Vault binary as a service on your computer or server. &gt; Follow this guide if you are interested in operating a Vault for earning and participating in the protocol.&#xD;&#xA;&gt; 1. Install a Bitcoin node&#xD;&#xA;&gt; 3. Install a pre-built binary" ContentLicense="CC BY-SA 4.0" />
  <row Id="5510" PostHistoryTypeId="2" PostId="1514" RevisionGUID="a8135318-9dc1-4a93-ad39-9ef9b906207c" CreationDate="2022-04-02T12:06:49.210" UserId="16" Text="In order to read memory from a contract you should check out the different functions on the [`Environment`](https://paritytech.github.io/substrate/master/pallet_contracts/chain_extension/struct.Environment.html) type. As Green Baneling already pointed out correctly you should use SCALE in order to encode and decode types from and to contract memory.&#xD;&#xA;&#xD;&#xA;As you already noticed the `read_as` function is only meant for types where the size is known at compile time. In your case you should use `env.read_as_unbounded(len: u32)`. The `len` passed by the contract can be read by calling `env.in_len()`." ContentLicense="CC BY-SA 4.0" />
  <row Id="5512" PostHistoryTypeId="2" PostId="1515" RevisionGUID="9fa5681a-f2b4-4770-ab09-d85a05f97034" CreationDate="2022-04-02T14:09:19.150" UserId="2074" Text="Pallet token:&#xD;&#xA; ```&#xD;&#xA;   #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config + pallet_balances::Config {&#xD;&#xA;&#xD;&#xA;        type TokenId: Member&#xD;&#xA;            + Parameter&#xD;&#xA;            + AtLeast32BitUnsigned&#xD;&#xA;            + Default&#xD;&#xA;            + PartialEq&#xD;&#xA;            + Copy&#xD;&#xA;            + Codec&#xD;&#xA;            + MaybeSerializeDeserialize;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is function with the type parameters&#xD;&#xA;```&#xD;&#xA;        pub fn do_mint(&#xD;&#xA;            token: T::TokenId,&#xD;&#xA;            beneficiary: &amp;T::AccountId,&#xD;&#xA;            amount: BalanceOf&lt;T&gt;,&#xD;&#xA;            _maybe_check_issuer: Option&lt;T::AccountId&gt;,&#xD;&#xA;        ) -&gt; DispatchResult &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The benchmarking code.&#xD;&#xA;```&#xD;&#xA;        where         &#xD;&#xA;        T: pallet_fuso_token::Config,&#xD;&#xA;        let token : T::TokenId = 1;&#xD;&#xA;        pallet_token::Pallet::&lt;T&gt;::mint_into(&#xD;&#xA;            token,&#xD;&#xA;            &amp;ferdie,&#xD;&#xA;            10000000.into(),&#xD;&#xA;        )?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;result:&#xD;&#xA;```&#xD;&#xA;  --&gt; pallet-fuso-verifier/src/benchmarking.rs:87:15&#xD;&#xA;   |&#xD;&#xA;87 |             1.into(),&#xD;&#xA;   |               ^^^^ the trait `std::convert::From&lt;i32&gt;` is not implemented for `&lt;T as pallet_fuso_token::Config&gt;::TokenId`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `std::convert::Into&lt;&lt;T as pallet_fuso_token::Config&gt;::TokenId&gt;` for `i32`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5514" PostHistoryTypeId="1" PostId="1515" RevisionGUID="9fa5681a-f2b4-4770-ab09-d85a05f97034" CreationDate="2022-04-02T14:09:19.150" UserId="2074" Text="How to reference the function with udf type parameters from another pallet in benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="5515" PostHistoryTypeId="3" PostId="1515" RevisionGUID="9fa5681a-f2b4-4770-ab09-d85a05f97034" CreationDate="2022-04-02T14:09:19.150" UserId="2074" Text="|pallet|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5516" PostHistoryTypeId="2" PostId="1516" RevisionGUID="7ec0d1b8-ab84-4b0f-b62c-f215f324ff11" CreationDate="2022-04-02T14:31:43.460" UserId="53" Text="This should work:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let token: T::TokenId = 1u32;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5518" PostHistoryTypeId="5" PostId="1488" RevisionGUID="9d7bd30f-5932-4a62-a575-a738816f8b09" CreationDate="2022-04-02T14:35:25.697" UserId="53" Comment="edited body" Text="In general you can't unless `AccountId` is bound to a trait which actually provides you with a conversion function which does what you want.&#xD;&#xA;&#xD;&#xA;The `frame_system::Config::AccountId` which I'd presume you're using could easily be a type into which it makes no sense to convert from a S/R25519 public key. For example, in test runtimes, `AccountId` is a `u64`, in a Polkadot runtime, it is `MultiSigner`.&#xD;&#xA;&#xD;&#xA;If you don't really care about how it is converted, but you just want some `AccountId` value vaguely associated with the public key, then you might do something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;(0u8, pub_key).using_encoded(|entropy| {&#xD;&#xA;	AccountId::decode(&amp;mut TrailingZeroInput::new(entropy))&#xD;&#xA;		.expect(&quot;infinite input; no invalid input; qed&quot;)&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This won't necessarily give any kind of sensible value of `AccountId`, but should work ok for the most common of them. It works by ensuring the first byte is zero, which is guaranteed to convert into a sensible enum variant in the case of something like a `MultiSigner` and won't do any harm with something like a `u64`. Be warned though: it won't work in general and it will result in a completely arbitrary and meaningless value of `AccountId`.&#xD;&#xA;&#xD;&#xA;The *correct* ways of doing it are a bit more involved and may not be needed if this is just test/benchmarking code. One way involves introducing a more bounded version of `AccountId` into your pallet's `Config` trait, a little bit like the `Event` type which pops up everywhere.&#xD;&#xA;&#xD;&#xA;It would be bounded similarly:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type AccountId: From&lt;sr25519::Public&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Anything of this type (which because of the `IsType` bound now includes the System's `AccountId`) is convertible from an Sr25519 public key.&#xD;&#xA;&#xD;&#xA;Another way would be to introduce another type item in the `Config` trait which implements the conversion. It would look something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type ConvertIntoAccountId: Convert&lt;sr25519::Public, Self::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This has the advantage that you don't need to implement `From&lt;sr25519::Public&gt;` for your `AccountId`, which might be difficult or impossible." ContentLicense="CC BY-SA 4.0" />
  <row Id="5519" PostHistoryTypeId="4" PostId="1506" RevisionGUID="c1d77e24-c48b-4192-a82c-d4cf24539af6" CreationDate="2022-04-02T15:48:20.690" UserId="1824" Comment="The &quot;i&quot; in ink! is lowercase, see here: https://paritytech.github.io/ink-docs/faq/#is-it-ink-or-ink-what-does-the--stand-for" Text="How to verify a signature in ink! contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="5520" PostHistoryTypeId="24" PostId="1506" RevisionGUID="c1d77e24-c48b-4192-a82c-d4cf24539af6" CreationDate="2022-04-02T15:48:20.690" Comment="Proposed by 1824 approved by 566 edit id of 131" ContentLicense="CC BY-SA 4.0" />
  <row Id="5521" PostHistoryTypeId="6" PostId="1427" RevisionGUID="64bddd90-16f1-486f-8b6a-356f561f77ae" CreationDate="2022-04-02T16:00:15.777" UserId="172" Comment="edited tags" Text="|parachain|bitcoin|interbtc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5522" PostHistoryTypeId="2" PostId="1517" RevisionGUID="e9887e00-b745-4f8d-b68b-bfe3a195c8e0" CreationDate="2022-04-02T16:17:44.900" UserId="2076" Text="I understand that it is [possible to use Substrate to run a solo chain][1], without attaching as a Parachain to a relay chain - are there any live projects running as Solo Substrate yet? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://medium.com/polkadot-network/a-brief-summary-of-everything-substrate-and-polkadot-f1f21071499d" ContentLicense="CC BY-SA 4.0" />
  <row Id="5524" PostHistoryTypeId="1" PostId="1517" RevisionGUID="e9887e00-b745-4f8d-b68b-bfe3a195c8e0" CreationDate="2022-04-02T16:17:44.900" UserId="2076" Text="Solo Substrate chains - are there any examples yet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5525" PostHistoryTypeId="3" PostId="1517" RevisionGUID="e9887e00-b745-4f8d-b68b-bfe3a195c8e0" CreationDate="2022-04-02T16:17:44.900" UserId="2076" Text="|substrate-node|parachain|parathread|solo-substate|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5526" PostHistoryTypeId="2" PostId="1518" RevisionGUID="de2a42aa-8920-4394-bbfd-80dc66447ed3" CreationDate="2022-04-02T17:49:59.040" UserId="73" Text="Polkadot itself is an example of a solo chain that is build on top of Substrate ;)&#xD;&#xA;&#xD;&#xA;Subsocial is another example. " ContentLicense="CC BY-SA 4.0" />
  <row Id="5528" PostHistoryTypeId="2" PostId="1519" RevisionGUID="a359e1f5-bc30-4951-81a9-a5e03cead66f" CreationDate="2022-04-02T18:40:19.110" UserId="68" Text="As we know transactions on Ethereum are atomic. &#xD;&#xA;If something throws, everything rolls back.&#xD;&#xA;Do we have something similar in Substrate? &#xD;&#xA;Or all changes I should manually revert?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5530" PostHistoryTypeId="1" PostId="1519" RevisionGUID="a359e1f5-bc30-4951-81a9-a5e03cead66f" CreationDate="2022-04-02T18:40:19.110" UserId="68" Text="rollback in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="5531" PostHistoryTypeId="3" PostId="1519" RevisionGUID="a359e1f5-bc30-4951-81a9-a5e03cead66f" CreationDate="2022-04-02T18:40:19.110" UserId="68" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5532" PostHistoryTypeId="2" PostId="1520" RevisionGUID="242cc1c0-1c98-41e9-a7fa-115a5821ba5a" CreationDate="2022-04-02T19:21:30.873" UserId="587" Text="I believe you're referring to rolling back storage modifications, right?&#xD;&#xA;&#xD;&#xA;In that case, you may use the [`#[transactional]`](https://paritytech.github.io/substrate/master/frame_support/attr.transactional.html) macro to achieve that purpose.&#xD;&#xA;&#xD;&#xA;That or you may use the [&quot;Verify first, write last&quot;](https://docs.substrate.io/v3/runtime/storage/#verify-first-write-last) pattern. Although, the `transactional` macro is pretty [inexpensive](https://substrate.stackexchange.com/questions/1184/whats-the-overhead-associated-with-the-transactional-macro).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5534" PostHistoryTypeId="2" PostId="1521" RevisionGUID="509f844a-ee3b-48a8-854e-88d03fb2dad2" CreationDate="2022-04-02T20:28:37.433" UserId="28" Text="At the time of this post, Substrate does not have a &quot;revert&quot; behavior by default.&#xD;&#xA;&#xD;&#xA;That is, any change made to storage will be committed to the chain at the end of the block.&#xD;&#xA;&#xD;&#xA;We are in the process of changing this and introducing a [storage layer](https://github.com/paritytech/substrate/issues/10806) by default for each transaction to the chain. That will be such that all changes caused by a transaction could be reverted automatically if the extrinsic return an error.&#xD;&#xA;&#xD;&#xA;Until then, we recommend updating the logic of your code to only write to storage when you know everything will be committed, or use the `#[transactional]` tag mentioned above.&#xD;&#xA;&#xD;&#xA;But it is coming soon!" ContentLicense="CC BY-SA 4.0" />
  <row Id="5537" PostHistoryTypeId="5" PostId="1478" RevisionGUID="32dc512f-73c4-4004-a9ea-a637ea9ed2a9" CreationDate="2022-04-02T21:07:27.943" UserId="83" Comment="remove extra information from my investigation and make question clearer so it isn't perceived as a blog post" Text="I want to be able to connect a collator node using https://polkadot.js.org/apps that is based on the substrate-parachain-template using branch 'polkadot-v0.9.18' and is being run as a parachain in **production**, but I do not want to use `--rpc-cors=all`. Instead I want to **enable origin validation** and manually add the **default** browser origins that are allowed. It mentions what values may be provided to `--rpc-cors=` in the documentation [here][1].&#xD;&#xA;```bash&#xD;&#xA;--rpc-cors &lt;ORIGINS&gt;&#xD;&#xA;    Specify browser Origins allowed to access the HTTP &amp; WS RPC servers.&#xD;&#xA;    &#xD;&#xA;    A comma-separated list of origins (protocol://domain or special `null` value). Value of&#xD;&#xA;    `all` will disable origin validation. Default is to allow localhost and&#xD;&#xA;    &lt;https://polkadot.js.org&gt; origins. When running in --dev mode the default is to allow&#xD;&#xA;    all origins.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][2], it shows the list of browser origins that it uses by **default**, which corresponds to the what it mentions above *&quot;Default is to allow localhost and &lt;https://polkadot.js.org&gt; origins.&quot;*.&#xD;&#xA;&#xD;&#xA;It previously connected successfully when using just `--rpc-cors=all`. But why after I provide the options shown below instead does it give the following error in the browser console `API-WS: disconnected from wss://&lt;MY_PARACHAIN_DOMAIN&gt;: 1006:: Abnormal Closure` and not output the warning `Blocked connection to WebSockets server from untrusted origin: &lt;REQUEST_ORIGIN&gt;` (since it uses ['jsonrpc-ws-server' crate][4] to verify whether each request origin header is in the list of allowed origins) in the collator logs when I then try to connect from the https://polkadot.js.org/apps/?rpc=wss://&lt;MY_PARACHAIN_DOMAIN&gt; endpoint?&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-collator \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;--rpc-cors=&quot;http://localhost:*,http://127.0.0.1:*,https://localhost:*,https://127.0.0.1:*,https://polkadot.js.org,wss://&lt;MY_PARACHAIN_DOMAIN&gt;&quot; \&#xD;&#xA;--unsafe-ws-external \&#xD;&#xA;--unsafe-rpc-external \&#xD;&#xA;--rpc-methods=Unsafe` \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain ./res/rococo-raw.json \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sc_cli/struct.RunCmd.html#structfield.rpc_cors&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/client/cli/src/commands/run_cmd.rs#L406&#xD;&#xA;  [3]: https://crates.io/crates/jsonrpc-ws-server&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/client/rpc-servers/Cargo.toml#L25&#xD;&#xA;  [5]: https://github.com/paritytech/jsonrpc/blob/master/ws/src/session.rs#L185&#xD;&#xA;  [6]: https://github.com/paritytech/jsonrpc/blob/master/ws/src/session.rs#L371" ContentLicense="CC BY-SA 4.0" />
  <row Id="5539" PostHistoryTypeId="5" PostId="1502" RevisionGUID="387ade4f-24eb-4f0e-a97a-d2860708fc41" CreationDate="2022-04-03T00:53:36.060" UserId="299" Comment="added 2455 characters in body" Text="**Environment：**&#xD;&#xA;one test machine: just mac-m1-pro local&#xD;&#xA;rococo-local: 2 relaychain node&#xD;&#xA;parachain: 2 collator(Alice and Bob)&#xD;&#xA;parachain consensus: aura&#xD;&#xA;&#xD;&#xA;The network I started locally is aura consensus, and Alice and Bob cannot implement polling out blocks.&#xD;&#xA;&#xD;&#xA;about chain_spec file:&#xD;&#xA;```rust&#xD;&#xA;pub fn development_config() -&gt; ChainSpec {&#xD;&#xA;    let dev_id: u32 = 2000;&#xD;&#xA;    ChainSpec::from_genesis(&#xD;&#xA;        // Name&#xD;&#xA;        &quot;Test Network&quot;,&#xD;&#xA;        // ID&#xD;&#xA;        &quot;test&quot;,&#xD;&#xA;        ChainType::Local,&#xD;&#xA;        move || {&#xD;&#xA;            dorafactory_genesis(&#xD;&#xA;                // subkey inspect &quot;$SECRET&quot;&#xD;&#xA;                hex![&quot;xxxxxxxxxxxexamplexxxxxxxxxxxxxxxxx&quot;].into(),&#xD;&#xA;                // initial collators.&#xD;&#xA;                vec![&#xD;&#xA;                    (&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;                        get_collator_keys_from_seed(&quot;Alice&quot;),&#xD;&#xA;                    ),&#xD;&#xA;                    (&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;                        get_collator_keys_from_seed(&quot;Bob&quot;),&#xD;&#xA;                    ),&#xD;&#xA;                ],&#xD;&#xA;                vec![&#xD;&#xA;                    hex![&quot;xxxxxxxxxxxexamplexxxxxxxxxxxxxxxxx&quot;].into(),&#xD;&#xA;                ],&#xD;&#xA;                dev_para_id.into(),&#xD;&#xA;            )&#xD;&#xA;        },&#xD;&#xA;        // Bootnodes&#xD;&#xA;        Vec::new(),&#xD;&#xA;        // Telemetry&#xD;&#xA;        None,&#xD;&#xA;        // Protocol ID&#xD;&#xA;        Some(&quot;Parachain&quot;),&#xD;&#xA;        // Fork ID&#xD;&#xA;        None,&#xD;&#xA;        // Properties&#xD;&#xA;        Some(get_properties()),&#xD;&#xA;        // Extensions&#xD;&#xA;        Extensions {&#xD;&#xA;            relay_chain: &quot;rococo-local&quot;.into(), // You MUST set this to the correct network!&#xD;&#xA;            para_id: dev_id.into(),&#xD;&#xA;        },&#xD;&#xA;    )&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;GenesisConfig {&#xD;&#xA;    GenesisConfig {&#xD;&#xA;        .........&#xD;&#xA;        .........&#xD;&#xA;        parachain_info: node_runtime::ParachainInfoConfig { parachain_id: id },&#xD;&#xA;        collator_selection: node_runtime::CollatorSelectionConfig {&#xD;&#xA;            invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),&#xD;&#xA;            candidacy_bond: EXISTENTIAL_DEPOSIT * 16,&#xD;&#xA;            ..Default::default()&#xD;&#xA;        },&#xD;&#xA;        session: node_runtime::SessionConfig {&#xD;&#xA;            keys: invulnerables&#xD;&#xA;                .into_iter()&#xD;&#xA;                .map(|(acc, aura)| {&#xD;&#xA;                    (&#xD;&#xA;                        acc.clone(),                 // account id&#xD;&#xA;                        acc,                         // validator id&#xD;&#xA;                        template_session_keys(aura), // session keys&#xD;&#xA;                    )&#xD;&#xA;                })&#xD;&#xA;                .collect(),&#xD;&#xA;        },&#xD;&#xA;        aura: Default::default(),&#xD;&#xA;        aura_ext: Default::default(),&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this is my start commands.&#xD;&#xA;```bash&#xD;&#xA;./target/release/dorafactory-node \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain dora-dev.json \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain  rococo-local-cfde.json \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;============================&#xD;&#xA;============================&#xD;&#xA;============================&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;./target/release/dorafactory-node \&#xD;&#xA;--bob \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain dora-dev.json \&#xD;&#xA;--base-path /tmp/parachain/bob \&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/40333/p2p/12D3KooWHWpTpxy1sEAesbYE7oJCaHcLwwB2wtYTvzZQS7GoWfU3  \&#xD;&#xA;--port 40334 \&#xD;&#xA;--ws-port 8845 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain rococo-local-cfde.json \&#xD;&#xA;--port 30344 \&#xD;&#xA;--ws-port 9978&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWDxv3tNkmGJiWhqKSEZyFZLfMNoc35w4iV7qtVSfteszB&#xD;&#xA;```&#xD;&#xA;this parachain explorer.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;and this system log.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XXQoU.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Fw4DP.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="5545" PostHistoryTypeId="2" PostId="1523" RevisionGUID="e50ffb03-9601-453b-a388-6f547ea7c098" CreationDate="2022-04-03T05:07:33.517" UserId="299" Text="pallet code:&#xD;&#xA;```rust&#xD;&#xA;use sp_runtime::traits::{AccountIdConversion, Hash};&#xD;&#xA;.......&#xD;&#xA;.......&#xD;&#xA;        pub do_something(...) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;         ......&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        pub fn say_hello(&#xD;&#xA;            origin: OriginFor&lt;T&gt;,&#xD;&#xA;            id: u32,&#xD;&#xA;            hash: T::Hash,&#xD;&#xA;            name: Vec&lt;u8&gt;,&#xD;&#xA;        ) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;            let who = ensure_signed(origin)?;&#xD;&#xA;           ......&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;benchmark code:&#xD;&#xA;```rust&#xD;&#xA;benchmarks! {&#xD;&#xA;    do_something {&#xD;&#xA;        let s in 1 .. 60u32;&#xD;&#xA;        Template::&lt;T&gt;::say_hello(&lt;T as frame_system::Config&gt;::Origin::from(RawOrigin::Signed(bob)), s, hex!(&quot;d282f389399565f3671145f5916e51652b60eee8e5c759293a2f5771b8ddfd2e&quot;).into(), &quot;hack&quot;.to_string().into());&#xD;&#xA;        }&#xD;&#xA;    }: _(RawOrigin::Root, s)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;error message: &#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `&lt;T as frame_system::Config&gt;::Hash: From&lt;[u8; 32]&gt;` is not satisfied&#xD;&#xA;  --&gt; pallets/template/src/benchmarking.rs:34:196&#xD;&#xA;   |&#xD;&#xA;34 | ...9293a2f5771b8ddfd2e&quot;).into(), &quot;hack&quot;.to_string().into());&#xD;&#xA;   |                          ^^^^ the trait `From&lt;[u8; 32]&gt;` is not implemented for `&lt;T as frame_system::Config&gt;::Hash`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `Into&lt;&lt;T as frame_system::Config&gt;::Hash&gt;` for `[u8; 32]`&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5547" PostHistoryTypeId="1" PostId="1523" RevisionGUID="e50ffb03-9601-453b-a388-6f547ea7c098" CreationDate="2022-04-03T05:07:33.517" UserId="299" Text="How do I pass a sp_runtime::traits::Hash value into benchmark function" ContentLicense="CC BY-SA 4.0" />
  <row Id="5548" PostHistoryTypeId="3" PostId="1523" RevisionGUID="e50ffb03-9601-453b-a388-6f547ea7c098" CreationDate="2022-04-03T05:07:33.517" UserId="299" Text="|weight|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5550" PostHistoryTypeId="5" PostId="1515" RevisionGUID="51cdd83f-a7d4-4c89-99bf-8ebf3519e4f4" CreationDate="2022-04-03T06:17:55.927" UserId="2074" Comment="deleted 5 characters in body" Text="Pallet token:&#xD;&#xA; ```&#xD;&#xA;   #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config + pallet_balances::Config {&#xD;&#xA;&#xD;&#xA;        type TokenId: Member&#xD;&#xA;            + Parameter&#xD;&#xA;            + AtLeast32BitUnsigned&#xD;&#xA;            + Default&#xD;&#xA;            + PartialEq&#xD;&#xA;            + Copy&#xD;&#xA;            + Codec&#xD;&#xA;            + MaybeSerializeDeserialize;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is function with the type parameters&#xD;&#xA;```&#xD;&#xA;        pub fn do_mint(&#xD;&#xA;            token: T::TokenId,&#xD;&#xA;            beneficiary: &amp;T::AccountId,&#xD;&#xA;            amount: BalanceOf&lt;T&gt;,&#xD;&#xA;            _maybe_check_issuer: Option&lt;T::AccountId&gt;,&#xD;&#xA;        ) -&gt; DispatchResult &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The benchmarking code.&#xD;&#xA;```&#xD;&#xA;        where         &#xD;&#xA;        T: pallet_token::Config,&#xD;&#xA;        let token : T::TokenId = 1;&#xD;&#xA;        pallet_token::Pallet::&lt;T&gt;::mint_into(&#xD;&#xA;            token,&#xD;&#xA;            &amp;ferdie,&#xD;&#xA;            10000000.into(),&#xD;&#xA;        )?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;result:&#xD;&#xA;```&#xD;&#xA;  --&gt; pallet-verifier/src/benchmarking.rs:87:15&#xD;&#xA;   |&#xD;&#xA;87 |             1.into(),&#xD;&#xA;   |               ^^^^ the trait `std::convert::From&lt;i32&gt;` is not implemented for `&lt;T as pallet_fuso_token::Config&gt;::TokenId`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `std::convert::Into&lt;&lt;T as pallet_fuso_token::Config&gt;::TokenId&gt;` for `i32`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5551" PostHistoryTypeId="5" PostId="1503" RevisionGUID="7c2906f8-f501-4b2e-b353-7d53aac8249b" CreationDate="2022-04-03T06:49:04.050" UserId="172" Comment="Clarify answer." Text="From the [documentation](https://docs.interlay.io/#/vault/overview), to become a Vault you need:&#xD;&#xA;&#xD;&#xA;* A Vault client.&#xD;&#xA;* A Bitcoin full node.&#xD;&#xA;* A Polkadot account (public/private keypair).&#xD;&#xA;* Some KSM/DOT to provide as collateral and pay for transaction fees.&#xD;&#xA;&#xD;&#xA;As for the advantages, running a Vault allows you to earn fees and rewards:&#xD;&#xA;&#xD;&#xA;* All Vaults are part of a fee pool and earn fees in interBTC when any user issues or redeems interBTC.&#xD;&#xA;* Vaults on Kintsugi receive a KINT block reward.&#xD;&#xA;* Planned feature: subject to governance, Vaults are able to provide collateral in liquid staked assets like LKSM or LDOT to receive both staking rewards from the relay chain and the rewards form the Kintsugi/interBTC bridge.&#xD;&#xA;&#xD;&#xA;In addition, you can be your own Vault if you're a large liquidity provider and don't want to rely/trust other Vaults. In this case you retain custody over your BTC holdings until you sell interBTC." ContentLicense="CC BY-SA 4.0" />
  <row Id="5553" PostHistoryTypeId="5" PostId="1434" RevisionGUID="1d17dd16-a17a-41b0-bcca-8031143d497d" CreationDate="2022-04-03T10:13:26.303" UserId="223" Comment="slight wording change" Text="How can I see in more detail what operations are executed when my transaction is submitted ? &#xD;&#xA;&#xD;&#xA;If there is a way to see all operations/extrinsics/calls that happened in a specific block then that could be useful also. &#xD;&#xA;&#xD;&#xA;My goal is to get a more low level insight into the transaction process / block by using sidecar." ContentLicense="CC BY-SA 4.0" />
  <row Id="5554" PostHistoryTypeId="6" PostId="1434" RevisionGUID="1d17dd16-a17a-41b0-bcca-8031143d497d" CreationDate="2022-04-03T10:13:26.303" UserId="223" Comment="slight wording change" Text="|extrinsic|block|transactions|sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5555" PostHistoryTypeId="24" PostId="1434" RevisionGUID="1d17dd16-a17a-41b0-bcca-8031143d497d" CreationDate="2022-04-03T10:13:26.303" Comment="Proposed by 223 approved by 234 edit id of 130" ContentLicense="CC BY-SA 4.0" />
  <row Id="5556" PostHistoryTypeId="2" PostId="1524" RevisionGUID="8569cd60-cab4-4408-8b10-59e5a373f506" CreationDate="2022-04-03T11:34:46.957" UserId="16" Text="You can use the `Decode` trait in order to create a `frame_system::pallet::Config::Hash` from bytes:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let hash = T::Hash::decode(&#xD;&#xA;    hex!(&quot;d282f389399565f3671145f5916e51652b60eee8e5c759293a2f5771b8ddfd2e&quot;).as_ref()&#xD;&#xA;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5558" PostHistoryTypeId="2" PostId="1525" RevisionGUID="34a98d24-dd03-4698-915c-eac0f0453f4f" CreationDate="2022-04-03T13:35:11.600" UserId="566" Text="As I understand from the docs, every contract gets its own AccountId. In the [contract-transfer][1] tests, I'm getting the same AccountId from both `accounts.alice` and `contract_id()`. &#xD;&#xA;&#xD;&#xA;I modified the contract to return its AccountId through a function ( `self.env().account_id()` ), but it is still returning Alice's AccountId. &#xD;&#xA;&#xD;&#xA;Am I doing something wrong? Could someone please point me in the right direction as to how to handle this scenario in unit tests? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/examples/contract-transfer/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="5560" PostHistoryTypeId="1" PostId="1525" RevisionGUID="34a98d24-dd03-4698-915c-eac0f0453f4f" CreationDate="2022-04-03T13:35:11.600" UserId="566" Text="How to get an ink! contract's AccountId in unit tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5561" PostHistoryTypeId="3" PostId="1525" RevisionGUID="34a98d24-dd03-4698-915c-eac0f0453f4f" CreationDate="2022-04-03T13:35:11.600" UserId="566" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5562" PostHistoryTypeId="2" PostId="1526" RevisionGUID="49e069ae-f58c-468e-8ff6-d03fa1177b2a" CreationDate="2022-04-03T13:41:22.790" UserId="642" Text="right now there is no oversubscribed validator on Kusama but a lot of validators on Polkadot are already oversubscribed, why stakers do not stake Kusama instead and insist nominating oversubscribes?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WZMgU.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5564" PostHistoryTypeId="1" PostId="1526" RevisionGUID="49e069ae-f58c-468e-8ff6-d03fa1177b2a" CreationDate="2022-04-03T13:41:22.790" UserId="642" Text="Why stakers tend to stake more on DOT than KSM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5565" PostHistoryTypeId="3" PostId="1526" RevisionGUID="49e069ae-f58c-468e-8ff6-d03fa1177b2a" CreationDate="2022-04-03T13:41:22.790" UserId="642" Text="|kusama|staking|general|polkdadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5566" PostHistoryTypeId="6" PostId="1525" RevisionGUID="f038fd68-0b94-4abe-a320-7bc70d62dac8" CreationDate="2022-04-03T13:43:03.883" UserId="566" Comment="edited tags" Text="|ink|unit-tests|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5567" PostHistoryTypeId="5" PostId="1525" RevisionGUID="f038fd68-0b94-4abe-a320-7bc70d62dac8" CreationDate="2022-04-03T13:43:03.883" UserId="566" Comment="edited tags" Text="From what I understand from the docs, every contract gets its own AccountId. In the [contract-transfer][1] tests, I'm getting the same AccountId from both `accounts.alice` and `contract_id()`. &#xD;&#xA;&#xD;&#xA;I modified the contract to return its AccountId through a function ( `self.env().account_id()` ), but it is still returning Alice's AccountId. &#xD;&#xA;&#xD;&#xA;Am I doing something wrong? Could someone please point me in the right direction as to how to handle this scenario in unit tests? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/examples/contract-transfer/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="5568" PostHistoryTypeId="5" PostId="1525" RevisionGUID="2cb3f42d-8958-43e0-ae4a-50cb77f7dca9" CreationDate="2022-04-03T13:52:31.557" UserId="566" Comment="added 4 characters in body" Text="From what I understand from the docs, every contract gets its own AccountId. But in the [contract-transfer][1] tests, I'm getting the same AccountId from both `accounts.alice` and `contract_id()`. &#xD;&#xA;&#xD;&#xA;I modified the contract to return its AccountId through a function ( `self.env().account_id()` ), but it is still returning Alice's AccountId. &#xD;&#xA;&#xD;&#xA;Am I doing something wrong? Could someone please point me in the right direction as to how to handle this scenario in unit tests? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/examples/contract-transfer/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="5570" PostHistoryTypeId="2" PostId="1527" RevisionGUID="04f43777-dcd3-49c3-8bc6-5a2359001919" CreationDate="2022-04-03T14:04:25.860" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5572" PostHistoryTypeId="1" PostId="1527" RevisionGUID="04f43777-dcd3-49c3-8bc6-5a2359001919" CreationDate="2022-04-03T14:04:25.860" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5573" PostHistoryTypeId="2" PostId="1528" RevisionGUID="5deffed7-591d-4b17-8ede-fec3cca66a9d" CreationDate="2022-04-03T14:04:25.860" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5575" PostHistoryTypeId="1" PostId="1528" RevisionGUID="5deffed7-591d-4b17-8ede-fec3cca66a9d" CreationDate="2022-04-03T14:04:25.860" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5577" PostHistoryTypeId="2" PostId="1529" RevisionGUID="f15371ef-b364-42d1-9213-54681c99af28" CreationDate="2022-04-03T17:43:55.150" UserId="554" Text="This error normally comes in windows. As Native development of substrate is not very well supported in windows so you will face errors now and then. But there is a permanent solution for the same.&#xD;&#xA;As we all know Substrate development is easiest on Unix-based operating systems like macOS or Linux.&#xD;&#xA;So we will convert our windows into Linux without installing any new software just by Enabling some inbuilt windows feature. &#xD;&#xA;&#xD;&#xA;First of all, prepare your windows system for the substrate. This can be done using **windows subsystem Linux(wsl)**. To use it go into the control panel &gt; programs &gt; programs and Features &gt; Turn windows Feature On and OFF &#xD;&#xA;And in it tick mark on **Hyper-V** and **windows subsystem for Linux** as shown in the images below.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;After that Enable the visualization by going into the bios advance section on your laptop. To access bios on different laptops there is a different process. So look on youtube for how to Enable visualization on your system.&#xD;&#xA;&#xD;&#xA;If you have a home edition of windows, Hyper-V might not be there so first install that. To install hyper-v follow the below instruction:&#xD;&#xA;1. Open Notepad and paste the below-given code as shown below:&#xD;&#xA;&#xD;&#xA;&lt;code&gt; &#xD;&#xA;pushd &quot;%~dp0&quot;&#xD;&#xA;dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum &gt;hv.txt&#xD;&#xA;for /f %%i in ('findstr /i . hv.txt 2^&gt;nul') do dism /online /norestart /add-package:&quot;%SystemRoot%\servicing\Packages\%%i&quot;&#xD;&#xA;del hv.txt&#xD;&#xA;Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL&#xD;&#xA;pause&#xD;&#xA;&lt;/code&gt;&#xD;&#xA;&#xD;&#xA;2. After that in the notepad where you have pasted the code select 'Save as' and then name the file as hyper-v.bat and below that in 'save as type' select All Files and save it on the desktop or wherever you can easily find it. &#xD;&#xA;3. Then run that file as administrator&#xD;&#xA;&#xD;&#xA;It will ask you to restart your system and Hyper-v will be installed on your system.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;After all the above is done go into the windows app store and search wsl. You will se multiple options. There select Ubuntu 20.04.4 LTS (or whatever you like) and download it as it's famous and normally used.&#xD;&#xA;And in ubuntu set username and password. Username should follow [a-z,0-9] only.&#xD;&#xA;&#xD;&#xA;After that follow the instructions on this doc: https://docs.substrate.io/v3/getting-started/installation/#ubuntudebian&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sYoh2.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6uaIu.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5579" PostHistoryTypeId="2" PostId="1530" RevisionGUID="a941db72-0475-4e88-9458-969113665649" CreationDate="2022-04-03T18:05:12.697" UserId="28" Text="Kusama supports 1,000 active validators while Polkadot only supports 300 currently.&#xD;&#xA;&#xD;&#xA;Kusama has 7,500 nominators.&#xD;&#xA;&#xD;&#xA;Polkadot has 24,000 nominators.&#xD;&#xA;&#xD;&#xA;This will naturally lead to more validators being oversubscribed on Polkadot.&#xD;&#xA;&#xD;&#xA;As the network feels that the staking system is more stable and scalable, governance will increase these limits on Polkadot too." ContentLicense="CC BY-SA 4.0" />
  <row Id="5581" PostHistoryTypeId="5" PostId="1525" RevisionGUID="10ba2f56-fdd8-4fc5-b2d5-dd04968011a9" CreationDate="2022-04-03T18:22:34.220" UserId="566" Comment="deleted 156 characters in body" Text="From what I understand from the docs, every contract gets its own AccountId. But in the [contract-transfer][1] tests, I'm getting the same AccountId from both `accounts.alice` and `contract_id()`. &#xD;&#xA;&#xD;&#xA;I modified the contract to return its AccountId using `self.env().account_id()`, but it still returns Alice's AccountId. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/examples/contract-transfer/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="5582" PostHistoryTypeId="2" PostId="1531" RevisionGUID="9e11ee41-1ac6-4eac-bf70-758dc2cd2e6c" CreationDate="2022-04-03T18:36:31.913" UserId="377" Text="There is documentation by moonbeam https://docs.moonbeam.network/builders/build/canonical-contracts/precompiles/&#xD;&#xA;&#xD;&#xA;few more links that may help you &#xD;&#xA;https://docs.astar.network/build/smart-contracts/ethereum-virtual-machine/evm-precompiles&#xD;&#xA;https://medium.com/@drstone/edgeware-evm-precompiles-a-deeper-dive-840a78f36320" ContentLicense="CC BY-SA 4.0" />
  <row Id="5586" PostHistoryTypeId="5" PostId="1502" RevisionGUID="2a0ef52d-6a53-4c2b-aa96-78ee95fa6252" CreationDate="2022-04-03T22:20:10.637" UserId="83" Comment="bullet points" Text="**Environment：**&#xD;&#xA;* Test machine: 1x mac-m1-pro local&#xD;&#xA;* Relay chain (rococo-local): 2x relay chain nodes&#xD;&#xA;* Parachains: 2x collators (Alice and Bob)&#xD;&#xA;* Parachain consensus: aura&#xD;&#xA;&#xD;&#xA;I started the network locally and it uses aura consensus, but Alice and Bob cannot implement polling out blocks.&#xD;&#xA;&#xD;&#xA;chain_spec file contents:&#xD;&#xA;```rust&#xD;&#xA;pub fn development_config() -&gt; ChainSpec {&#xD;&#xA;    let dev_id: u32 = 2000;&#xD;&#xA;    ChainSpec::from_genesis(&#xD;&#xA;        // Name&#xD;&#xA;        &quot;Test Network&quot;,&#xD;&#xA;        // ID&#xD;&#xA;        &quot;test&quot;,&#xD;&#xA;        ChainType::Local,&#xD;&#xA;        move || {&#xD;&#xA;            dorafactory_genesis(&#xD;&#xA;                // subkey inspect &quot;$SECRET&quot;&#xD;&#xA;                hex![&quot;examplexxxxxxxxxxxxxxxxx&quot;].into(),&#xD;&#xA;                // initial collators.&#xD;&#xA;                vec![&#xD;&#xA;                    (&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;                        get_collator_keys_from_seed(&quot;Alice&quot;),&#xD;&#xA;                    ),&#xD;&#xA;                    (&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;                        get_collator_keys_from_seed(&quot;Bob&quot;),&#xD;&#xA;                    ),&#xD;&#xA;                ],&#xD;&#xA;                vec![&#xD;&#xA;                    hex![&quot;examplexxxxxxxxxxxxxxxxx&quot;].into(),&#xD;&#xA;                ],&#xD;&#xA;                dev_para_id.into(),&#xD;&#xA;            )&#xD;&#xA;        },&#xD;&#xA;        // Bootnodes&#xD;&#xA;        Vec::new(),&#xD;&#xA;        // Telemetry&#xD;&#xA;        None,&#xD;&#xA;        // Protocol ID&#xD;&#xA;        Some(&quot;Parachain&quot;),&#xD;&#xA;        // Fork ID&#xD;&#xA;        None,&#xD;&#xA;        // Properties&#xD;&#xA;        Some(get_properties()),&#xD;&#xA;        // Extensions&#xD;&#xA;        Extensions {&#xD;&#xA;            relay_chain: &quot;rococo-local&quot;.into(),&#xD;&#xA;            para_id: dev_id.into(),&#xD;&#xA;        },&#xD;&#xA;    )&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;GenesisConfig {&#xD;&#xA;    GenesisConfig {&#xD;&#xA;&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;        parachain_info: node_runtime::ParachainInfoConfig { parachain_id: id },&#xD;&#xA;        collator_selection: node_runtime::CollatorSelectionConfig {&#xD;&#xA;            invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),&#xD;&#xA;            candidacy_bond: EXISTENTIAL_DEPOSIT * 16,&#xD;&#xA;            ..Default::default()&#xD;&#xA;        },&#xD;&#xA;        session: node_runtime::SessionConfig {&#xD;&#xA;            keys: invulnerables&#xD;&#xA;                .into_iter()&#xD;&#xA;                .map(|(acc, aura)| {&#xD;&#xA;                    (&#xD;&#xA;                        acc.clone(),                 // account id&#xD;&#xA;                        acc,                         // validator id&#xD;&#xA;                        template_session_keys(aura), // session keys&#xD;&#xA;                    )&#xD;&#xA;                })&#xD;&#xA;                .collect(),&#xD;&#xA;        },&#xD;&#xA;        aura: Default::default(),&#xD;&#xA;        aura_ext: Default::default(),&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These are my commands to start the collators Alice and Bob:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/dorafactory-node \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain dora-dev.json \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain  rococo-local-cfde.json \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/dorafactory-node \&#xD;&#xA;--bob \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain dora-dev.json \&#xD;&#xA;--base-path /tmp/parachain/bob \&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/40333/p2p/12D3KooWHWpTpxy1sEAesbYE7oJCaHcLwwB2wtYTvzZQS7GoWfU3  \&#xD;&#xA;--port 40334 \&#xD;&#xA;--ws-port 8845 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain rococo-local-cfde.json \&#xD;&#xA;--port 30344 \&#xD;&#xA;--ws-port 9978&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWDxv3tNkmGJiWhqKSEZyFZLfMNoc35w4iV7qtVSfteszB&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The parachain explorer shows this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;The terminal logs show this for Bob and Alice:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XXQoU.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Fw4DP.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="5587" PostHistoryTypeId="4" PostId="1502" RevisionGUID="2a0ef52d-6a53-4c2b-aa96-78ee95fa6252" CreationDate="2022-04-03T22:20:10.637" UserId="83" Comment="bullet points" Text="Why is only one collator node shown to be participating in block production at a time when there are multiple collator nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5588" PostHistoryTypeId="4" PostId="1502" RevisionGUID="6d20ba3f-b83f-4d60-a4d1-7def009b5b29" CreationDate="2022-04-03T22:38:21.693" UserId="83" Comment="change title" Text="Why are parachain candidate blocks from only one collator being backed and added on-chain at a time when there are multiple collators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5590" PostHistoryTypeId="2" PostId="1532" RevisionGUID="3ecad573-d88d-420c-961a-08f7682b902c" CreationDate="2022-04-04T05:44:21.020" UserId="359" Text="The error message is very clear&#xD;&#xA;&#xD;&#xA;&gt; the trait `std::convert::From&lt;i32&gt;` is not implemented for `&lt;T as pallet_fuso_token::Config&gt;::TokenId`&#xD;&#xA;&#xD;&#xA;i.e. It doesn't know how to convert `i32` to `TokenId`&#xD;&#xA;&#xD;&#xA;Your `TokenId` is `AtLeast32BitUnsigned` which implements `From&lt;u32&gt;` so the solution is simple, make it `u32` instead of `i32`.&#xD;&#xA;&#xD;&#xA;`1u32.into()`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5598" PostHistoryTypeId="2" PostId="1533" RevisionGUID="3897b77c-0b67-4dd3-bf08-e92d1c0b2405" CreationDate="2022-04-04T06:03:13.993" UserId="139" Text="So my node requires port 30333 to peer with other nodes, and since I am using Nginx on the server, I followed this guide : https://wiki.polkadot.network/docs/maintain-guides-how-to-setup-a-validator-with-reverse-proxy.&#xD;&#xA;&#xD;&#xA;In this guide there's one code block like this : &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;server {&#xD;&#xA;  listen 0.0.0.0:2435;&#xD;&#xA;  location / {&#xD;&#xA;    proxy_pass http://localhost:30333;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;which gives me the following issue : &#xD;&#xA;```&#xD;&#xA;nginx[83369]: nginx: [emerg] &quot;location&quot; directive is not allowed here in /etc/nginx/streams-enabled/polkadot-proxy.conf:3&#xD;&#xA;```&#xD;&#xA;Any ideas on how to fix this? " ContentLicense="CC BY-SA 4.0" />
  <row Id="5600" PostHistoryTypeId="1" PostId="1533" RevisionGUID="3897b77c-0b67-4dd3-bf08-e92d1c0b2405" CreationDate="2022-04-04T06:03:13.993" UserId="139" Text="Nginx troubles on setting a remote validator node" ContentLicense="CC BY-SA 4.0" />
  <row Id="5601" PostHistoryTypeId="3" PostId="1533" RevisionGUID="3897b77c-0b67-4dd3-bf08-e92d1c0b2405" CreationDate="2022-04-04T06:03:13.993" UserId="139" Text="|peers|nginx|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5603" PostHistoryTypeId="2" PostId="1534" RevisionGUID="5fcf0e4f-30b6-41b8-992f-174585d6c3a6" CreationDate="2022-04-04T06:36:32.357" UserId="1867" Text="I added a function `getId()` to the `contract-transfer` example [here](https://github.com/achimcc/contract_get_account_id/blob/main/lib.rs).&#xD;&#xA;&#xD;&#xA;After starting substrate contracts node locally(version substrate-contracts-node 0.11.0-bb0cd97-x86_64-linux-gnu) with `substrate-contracts-node --dev --tmp`, and connecting it with [contracts ui](https://paritytech.github.io/contracts-ui/), I can call the function to obtain the contracts `AccountId`, which is different from Alice's `AccountId`:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;How precisely did you try to access `self.env().account_id()`? From a contract test function, on a local node or on the testnet?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dyibr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5606" PostHistoryTypeId="4" PostId="1491" RevisionGUID="7204eb86-ec08-46a4-aa43-919108d2002a" CreationDate="2022-04-04T06:41:44.980" UserId="139" Comment="edited title" Text="When inserting authority keys, should I choose the controller derivation, the stash derivation, or just the vanilla secret?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5607" PostHistoryTypeId="2" PostId="1535" RevisionGUID="00c84554-b318-444a-8a96-85f4c5c97589" CreationDate="2022-04-04T07:07:04.750" UserId="139" Text="[Following the answer on this post][1] : Need some help understanding this &quot;unexpected end of file&quot; error from my node trying to connect on remote &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Reach failure for Some(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)) through &quot;/ip4/13.235.23.68/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))    &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Failed to reach PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;) through &quot;/ip4/13.235.23.68/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Pending connection: Transport error: upgrade apply error: unexpected end of file    &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Reach failure for Some(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)) through &quot;/ip4/13.235.23.68/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1492/how-to-debug-issues-regarding-peering/1505#1505" ContentLicense="CC BY-SA 4.0" />
  <row Id="5609" PostHistoryTypeId="1" PostId="1535" RevisionGUID="00c84554-b318-444a-8a96-85f4c5c97589" CreationDate="2022-04-04T07:07:04.750" UserId="139" Text="p2p connection failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="5610" PostHistoryTypeId="3" PostId="1535" RevisionGUID="00c84554-b318-444a-8a96-85f4c5c97589" CreationDate="2022-04-04T07:07:04.750" UserId="139" Text="|networking|peers|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5614" PostHistoryTypeId="2" PostId="1536" RevisionGUID="08baa6e9-4d48-4a0d-80f8-aeb2b6f40954" CreationDate="2022-04-04T08:16:12.520" UserId="1970" Text="Your `server` block should be inside the `http` block.&#xD;&#xA;&#xD;&#xA;Here is some details around it for the exact same error - https://stackoverflow.com/questions/20392741/nginx-errorlocation-directive-is-not-allowed-here-in-etc-nginx-nginx-conf76" ContentLicense="CC BY-SA 4.0" />
  <row Id="5616" PostHistoryTypeId="2" PostId="1537" RevisionGUID="bca12d79-e377-421b-a2e4-fda65cdbf595" CreationDate="2022-04-04T08:17:26.223" UserId="1806" Text="I'm trying to build a `substrate-node-template` with the following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo build --debug&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have my cargo `target-dir` set inside a global `~/.cargo/config.toml` file:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[build]&#xD;&#xA;target-dir = &quot;/home/foo/.cargo/target&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The environment variable `CARGO_TARGET_DIR` is unset.&#xD;&#xA;&#xD;&#xA;Normally this configuration builds everything inside the `~/.cargo/target` directory - which saves a lot of space on disk (not having to duplicate build artifacts for every project).&#xD;&#xA;&#xD;&#xA;Note that this also works for Wasm projects, which usually end up in the `.cargo/target/wasm32-unknown-unknown` directory.&#xD;&#xA;&#xD;&#xA;That said, it seems that the `build.rs` script uses a `wasm_builder` package, which does something unusual - where it creates a new Wasm project inside of the `target` directory (under `wbuild`) and builds that project separately, causing the build to fail since it does not respect the global `target-dir` setting and also ignores the `CARGO_TARGET_DIR` variable so it can't find the correct build artifacts.&#xD;&#xA;&#xD;&#xA;Is there a way to make the `build.rs` script respect the global `target-dir` settings and build the artifacts inside of the configured directory?&#xD;&#xA;&#xD;&#xA;P.S. Based on the git history the reason the `wasm_builder` ignores the `CARGO_TARGET_DIR` is because it used to cause a cargo deadlock, since the `build.rs` script would try to build inside of the same `target` directory as the parent cargo process." ContentLicense="CC BY-SA 4.0" />
  <row Id="5618" PostHistoryTypeId="1" PostId="1537" RevisionGUID="bca12d79-e377-421b-a2e4-fda65cdbf595" CreationDate="2022-04-04T08:17:26.223" UserId="1806" Text="Building a substrate node template with a global cargo `target` directory" ContentLicense="CC BY-SA 4.0" />
  <row Id="5619" PostHistoryTypeId="3" PostId="1537" RevisionGUID="bca12d79-e377-421b-a2e4-fda65cdbf595" CreationDate="2022-04-04T08:17:26.223" UserId="1806" Text="|substrate-node|substrate-node-template|wasm|build|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5620" PostHistoryTypeId="5" PostId="1537" RevisionGUID="fe02e65c-2164-448e-88e5-017496392411" CreationDate="2022-04-04T08:22:37.663" UserId="1806" Comment="deleted 6 characters in body" Text="I'm trying to build a `substrate-node-template` with the following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo build --debug&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have my cargo `target-dir` set inside a global `~/.cargo/config.toml` file:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[build]&#xD;&#xA;target-dir = &quot;/home/foo/.cargo/target&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The environment variable `CARGO_TARGET_DIR` is unset.&#xD;&#xA;&#xD;&#xA;Normally this configuration builds everything inside the `~/.cargo/target` directory - which saves a lot of space on disk (not having to duplicate build artifacts for every project).&#xD;&#xA;&#xD;&#xA;Note that this also works for Wasm projects, which usually end up in the `.cargo/target/wasm32-unknown-unknown` directory.&#xD;&#xA;&#xD;&#xA;That said, it seems that the `build.rs` script uses a `wasm_builder` package, which does something unusual - it creates a new Wasm project inside of the `target` directory (under `wbuild`) and builds that project separately, causing the build to fail since it does not respect the global `target-dir` setting and also ignores the `CARGO_TARGET_DIR` variable so it can't find the correct build artifacts.&#xD;&#xA;&#xD;&#xA;Is it possible to make the `build.rs` script respect the global `target-dir` settings and build the artifacts inside of the configured global directory?&#xD;&#xA;&#xD;&#xA;P.S. Based on git history, the reason the `wasm_builder` ignores the `CARGO_TARGET_DIR` is because it used to cause a cargo deadlock, since the `build.rs` script would try to build inside of the same `target` directory as the parent cargo process." ContentLicense="CC BY-SA 4.0" />
  <row Id="5621" PostHistoryTypeId="2" PostId="1538" RevisionGUID="69489950-c708-4efc-adf0-f1847107cd5a" CreationDate="2022-04-04T08:22:50.237" UserId="1970" Text="Kusama is not as popular or high-profile as Polkadot, so it the latter attracts more nominators. According to the subscan.io stats, &#xD;&#xA;&#xD;&#xA; - Polkadot ~950k holders&#xD;&#xA; - Kusama ~246k holders&#xD;&#xA;&#xD;&#xA;It is a different network, with different goals. I guess not all nominators want to experience chaos. &#xD;&#xA;&#xD;&#xA;Without getting into &quot;pricing&quot;, the ranking of the networks of various sites does generally what drives people toward the &quot;blue chips&quot;, the numbers in accounts and active nominators show this." ContentLicense="CC BY-SA 4.0" />
  <row Id="5624" PostHistoryTypeId="2" PostId="1539" RevisionGUID="c4bc5c23-dba8-4a52-8831-01da53ddc90b" CreationDate="2022-04-04T09:52:39.733" UserId="2102" Text="I've been trying to add some rpc calls available for my node, but an error related to the 'getrandom' module appears (even tho I'm not even using it).&#xD;&#xA;&#xD;&#xA;I have a very simple pallet that creates and transfers items, and it is working just fine. The problem comes when I try to add the custom rpc calls to the node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to &#xD;&#xA;enable the &quot;js&quot; feature. For more information see: &#xD;&#xA;https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;```&#xD;&#xA;I tried adding the dependency as stated in the documentation regarding this issue, but nothing seems to fix the issue, it just generates more errors.&#xD;&#xA;&#xD;&#xA;This is the documentation I've been using to implement the custom rpc calls for my pallet. I'll leave here my SO question, which is a little bit longer but its the same issue: https://stackoverflow.com/questions/71734501/error-adding-custom-rpcs-for-custom-pallet-substrate&#xD;&#xA;&#xD;&#xA;https://core.tetcoin.org/recipes/custom-rpc.html#rpc-to-call-a-runtime-api&#xD;&#xA;&#xD;&#xA;https://core.tetcoin.org/recipes/runtime-api.html&#xD;&#xA;&#xD;&#xA;Is there any recent documentation about adding custom RPCs for a pallet? Everything I've found is pretty outdated I think. " ContentLicense="CC BY-SA 4.0" />
  <row Id="5626" PostHistoryTypeId="1" PostId="1539" RevisionGUID="c4bc5c23-dba8-4a52-8831-01da53ddc90b" CreationDate="2022-04-04T09:52:39.733" UserId="2102" Text="Error adding Custom RPCs for pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="5627" PostHistoryTypeId="3" PostId="1539" RevisionGUID="c4bc5c23-dba8-4a52-8831-01da53ddc90b" CreationDate="2022-04-04T09:52:39.733" UserId="2102" Text="|pallet|rust|substrate-node-template|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5628" PostHistoryTypeId="10" PostId="1454" RevisionGUID="7f5a18ec-d66c-4157-a2f8-ba26d65f3fcc" CreationDate="2022-04-04T09:52:58.860" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;}]}" />
  <row Id="5629" PostHistoryTypeId="2" PostId="1540" RevisionGUID="14cdf235-1999-409b-ab5f-f69d8c7c21b1" CreationDate="2022-04-04T10:48:35.233" UserId="2066" Text="In the tutorial of learning substrate, a storage map for stored items is defined as follows, in which the symbol &quot;=&gt;&quot; appears, but this specification is not in the standard syntax of rust. How to understand it?&#xD;&#xA;&#xD;&#xA;'''MyMap get(my_map): map u8 =&gt; Vec&lt;u8&gt;; '''" ContentLicense="CC BY-SA 4.0" />
  <row Id="5631" PostHistoryTypeId="1" PostId="1540" RevisionGUID="14cdf235-1999-409b-ab5f-f69d8c7c21b1" CreationDate="2022-04-04T10:48:35.233" UserId="2066" Text="Definition of storage map for stored items" ContentLicense="CC BY-SA 4.0" />
  <row Id="5632" PostHistoryTypeId="3" PostId="1540" RevisionGUID="14cdf235-1999-409b-ab5f-f69d8c7c21b1" CreationDate="2022-04-04T10:48:35.233" UserId="2066" Text="|storage|map|syntax|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5633" PostHistoryTypeId="5" PostId="1537" RevisionGUID="0120b169-eb65-4694-a1e9-3e8434879f94" CreationDate="2022-04-04T11:32:04.827" UserId="1806" Comment="added 2624 characters in body" Text="I'm trying to build a `substrate-node-template` with the following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo build&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have my cargo `target-dir` set inside a global `~/.cargo/config.toml` file:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[build]&#xD;&#xA;target-dir = &quot;/home/foo/.cargo/target&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The environment variable `CARGO_TARGET_DIR` is unset.&#xD;&#xA;&#xD;&#xA;Normally this configuration builds everything inside the `~/.cargo/target` directory - which saves a lot of space on disk (not having to duplicate build artifacts for every project).&#xD;&#xA;&#xD;&#xA;Note that this also works for Wasm projects, which usually end up in the `.cargo/target/wasm32-unknown-unknown` directory.&#xD;&#xA;&#xD;&#xA;That said, it seems that the `build.rs` script uses a `wasm_builder` crate, which does something unusual - it creates a new Wasm project inside of the `target` directory (under `wbuild`) and builds that project separately, causing the build to fail since it does not respect the global `target-dir` setting and also ignores the `CARGO_TARGET_DIR` variable so it can't find the correct build artifacts.&#xD;&#xA;&#xD;&#xA;The cargo build hangs forever at the `node-template-runtime` step:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Building [=======================&gt; ] 839/843: node-template-runtime(build)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I export the `CARGO_TARGET_DIR=target` env var the build proceeds further but then fails at the `build.rs` step for `node-template-runtime` because the `build.rs` script ignores the `CARGO_TARGET_DIR`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Compiling node-template-runtime-wasm v1.0.0 (/home/foo/substrate/substrate-node-template/target/debug/wbuild/node-template-runtime)&#xD;&#xA;Finished release [optimized] target(s) in 52.13s&#xD;&#xA;  thread 'main' panicked at 'Failed to compact generated WASM binary.: Error(HeapOther(&quot;Can't read from the file: Os { code: 2, kind: NotFound, message: \&quot;No such file or directory\&quot; }&quot;))', /home/foo/substrate/substrate.mod/utils/wasm-builder/src/wasm_project.rs:618:14&#xD;&#xA;  stack backtrace:&#xD;&#xA;     0: rust_begin_unwind&#xD;&#xA;               at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5&#xD;&#xA;     1: core::panicking::panic_fmt&#xD;&#xA;               at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14&#xD;&#xA;     2: core::result::unwrap_failed&#xD;&#xA;               at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/result.rs:1690:5&#xD;&#xA;     3: core::result::Result&lt;T,E&gt;::expect&#xD;&#xA;               at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/result.rs:975:23&#xD;&#xA;     4: substrate_wasm_builder::wasm_project::compact_wasm_file&#xD;&#xA;               at /home/foo/substrate/substrate.mod/utils/wasm-builder/src/wasm_project.rs:617:3&#xD;&#xA;     5: substrate_wasm_builder::wasm_project::create_and_compile&#xD;&#xA;               at /home/foo/substrate/substrate.mod/utils/wasm-builder/src/wasm_project.rs:130:3&#xD;&#xA;     6: substrate_wasm_builder::builder::build_project&#xD;&#xA;               at /home/foo/substrate/substrate.mod/utils/wasm-builder/src/builder.rs:244:30&#xD;&#xA;     7: substrate_wasm_builder::builder::WasmBuilder::build&#xD;&#xA;               at /home/foo/substrate/substrate.mod/utils/wasm-builder/src/builder.rs:162:3&#xD;&#xA;     8: build_script_build::main&#xD;&#xA;               at ./build.rs:4:2&#xD;&#xA;     9: core::ops::function::FnOnce::call_once&#xD;&#xA;               at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/ops/function.rs:227:5&#xD;&#xA;  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The only way I can successfully build it is if I unset the global `target-dir` option and leave cargo to use the default `./target` directory for the entire build.&#xD;&#xA;&#xD;&#xA;It seems that most of the build problems stem from the assumptions that the `wasm_builder` crate makes, hence the `build.rs` only works if it uses the default cargo target directory location.&#xD;&#xA;&#xD;&#xA;P.S. Based on git history, the reason the `wasm_builder` ignores the `CARGO_TARGET_DIR` is because it used to cause a cargo deadlock, since the `build.rs` script would try to build inside of the same `target` directory as the parent cargo process." ContentLicense="CC BY-SA 4.0" />
  <row Id="5634" PostHistoryTypeId="2" PostId="1541" RevisionGUID="9c592851-c21c-4dc9-a6a4-05af084b7e03" CreationDate="2022-04-04T11:33:26.250" UserId="499" Text="We've had a test network running for about 3.5 months with regularly-rotating sets of Aura / Grandpa Validators.&#xD;&#xA;&#xD;&#xA;Suddenly, we have run into an issue whereby the vast majority (~2/3) of the network has crashed due to an error in the node software which references equivocation:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-04-03 01:57:10 ⛓  Native runtime: chainflip-node-111 (chainflip-node-1.tx1.au1)&#xD;&#xA;2022-04-03 01:57:10 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs&#xD;&#xA;2022-04-03 01:57:10  Local node identity is: 12D3KooWQbTk1xVSvp8YM3p8uoJrjSa3LKL2UBt11Excd1i11spW&#xD;&#xA;2022-04-03 01:57:10  Highest known block at #1502697&#xD;&#xA;2022-04-03 01:57:10 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;2022-04-03 01:57:10 Listening for new connections on 127.0.0.1:9944.&#xD;&#xA;2022-04-03 01:57:10 Detected precommit equivocation in the finality worker: Equivocation { round_number: 16286, identity: Public(72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854 (5EeJu7Mc...)), first: (Precommit { target_hash: 0xdebdc23f58d523fc1030ed688ed08aaf252dc71b298b024ba254e39c1713c9fd, target_number: 1502695 }, Signature(718a0d6598ae2467fd8b14cdf45862de76cb312b451653573bc8878cd617a99fe87ee3acb20391aa1aaae95b3ca5c22064e33b68e1ddf33e5732e2aa2cc7f905)), second: (Precommit { target_hash: 0x455b67971ddd25a36f132d1b8cf283147f9250c4c0aaf657b538142bf08cc88b, target_number: 1502694 }, Signature(9e9fa86949ccd8e0b909c0e573f494ce2fd3e1794c1d3adacb426d9393ced247b51e9686f455676ecaf6cfd4f58759cf7366f193f8e1d0579268f033aa17eb00)) }&#xD;&#xA;2022-04-03 01:57:11 GRANDPA voter error: Client(BadJustification(&quot;invalid precommits for target commit&quot;))&#xD;&#xA;2022-04-03 01:57:11 Essential task `grandpa-voter` failed. Shutting down service.&#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I understand that this might happen if 1/3 of the Authority Set had misconfigured Validators sending duplicate Grandpa votes. I find that hard to believe but I'm willing to investigate further if this is the most likely cause. &#xD;&#xA;&#xD;&#xA;I have a few more questions though:&#xD;&#xA;&#xD;&#xA;- What is the Public identity which is reported in this log message? I can't find it in any of our logs, which would indicate that it is not a public identifier that we're ever referencing (ie, it doesn't show up in the Polkajs interface). Is it referring to a particular Session key? How would I find the Aura ID of this identifier such that I can ask for the logs from this machine?&#xD;&#xA;- Does Aura have different equivocation conditions to Babe? I would assume not, since this is functionality of Grandpa.&#xD;&#xA;- How can we recover from this scenario? We're currently attempting to re-sync our nodes from one of the Validators which is still online, is this the correct approach? Finality is stalled but it looks like block production is still ongoing." ContentLicense="CC BY-SA 4.0" />
  <row Id="5636" PostHistoryTypeId="1" PostId="1541" RevisionGUID="9c592851-c21c-4dc9-a6a4-05af084b7e03" CreationDate="2022-04-04T11:33:26.250" UserId="499" Text="Equivocation crash (network with ~100 Aura Validators)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5637" PostHistoryTypeId="3" PostId="1541" RevisionGUID="9c592851-c21c-4dc9-a6a4-05af084b7e03" CreationDate="2022-04-04T11:33:26.250" UserId="499" Text="|grandpa|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5638" PostHistoryTypeId="5" PostId="1537" RevisionGUID="fb5997b9-f4b7-4305-80e0-8398431c8a9a" CreationDate="2022-04-04T11:52:48.887" UserId="1806" Comment="added 961 characters in body" Text="I'm trying to build a `substrate-node-template` with the following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo build&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have my cargo `target-dir` set inside a global `~/.cargo/config.toml` file:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[build]&#xD;&#xA;target-dir = &quot;/home/foo/.cargo/target&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The environment variable `CARGO_TARGET_DIR` is unset.&#xD;&#xA;&#xD;&#xA;Normally this configuration builds everything inside the `~/.cargo/target` directory - which saves a lot of space on disk (not having to duplicate build artifacts for every project).&#xD;&#xA;&#xD;&#xA;Note that this also works for Wasm projects, which usually end up in the `.cargo/target/wasm32-unknown-unknown` directory.&#xD;&#xA;&#xD;&#xA;That said, it seems that the `build.rs` script uses a `wasm_builder` crate, which does something unusual - it creates a new Wasm project inside of the `target` directory (under `wbuild`) and builds that project separately, causing the build to fail since it does not respect the global `target-dir` setting and also ignores the `CARGO_TARGET_DIR` variable so it can't find the correct build artifacts.&#xD;&#xA;&#xD;&#xA;The cargo build hangs forever at the `node-template-runtime` step, most likely due to a deadlock, i.e. the parent `cargo build` is using the global `~/.cargo/target/` directory and the secondary runtime build is also using the global `~/.cargo/target/` directory instead of the nested `./target/debug/wbuild/node-template-runtime` as it expects:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Building [=======================&gt; ] 839/843: node-template-runtime(build)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I export the `CARGO_TARGET_DIR=target` env var the build proceeds further but then fails at the `build.rs` step for `node-template-runtime` because the `build.rs` script ignores the `CARGO_TARGET_DIR`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Compiling node-template-runtime-wasm v1.0.0 (/home/foo/substrate/substrate-node-template/target/debug/wbuild/node-template-runtime)&#xD;&#xA;Finished release [optimized] target(s) in 52.13s&#xD;&#xA;  thread 'main' panicked at 'Failed to compact generated WASM binary.: Error(HeapOther(&quot;Can't read from the file: Os { code: 2, kind: NotFound, message: \&quot;No such file or directory\&quot; }&quot;))', /home/foo/substrate/substrate.mod/utils/wasm-builder/src/wasm_project.rs:618:14&#xD;&#xA;  stack backtrace:&#xD;&#xA;     0: rust_begin_unwind&#xD;&#xA;               at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5&#xD;&#xA;     1: core::panicking::panic_fmt&#xD;&#xA;               at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14&#xD;&#xA;     2: core::result::unwrap_failed&#xD;&#xA;               at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/result.rs:1690:5&#xD;&#xA;     3: core::result::Result&lt;T,E&gt;::expect&#xD;&#xA;               at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/result.rs:975:23&#xD;&#xA;     4: substrate_wasm_builder::wasm_project::compact_wasm_file&#xD;&#xA;               at /home/foo/substrate/substrate.mod/utils/wasm-builder/src/wasm_project.rs:617:3&#xD;&#xA;     5: substrate_wasm_builder::wasm_project::create_and_compile&#xD;&#xA;               at /home/foo/substrate/substrate.mod/utils/wasm-builder/src/wasm_project.rs:130:3&#xD;&#xA;     6: substrate_wasm_builder::builder::build_project&#xD;&#xA;               at /home/foo/substrate/substrate.mod/utils/wasm-builder/src/builder.rs:244:30&#xD;&#xA;     7: substrate_wasm_builder::builder::WasmBuilder::build&#xD;&#xA;               at /home/foo/substrate/substrate.mod/utils/wasm-builder/src/builder.rs:162:3&#xD;&#xA;     8: build_script_build::main&#xD;&#xA;               at ./build.rs:4:2&#xD;&#xA;     9: core::ops::function::FnOnce::call_once&#xD;&#xA;               at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/ops/function.rs:227:5&#xD;&#xA;  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The only way I can successfully build it is if I unset the global `target-dir` option and leave cargo to use the default `./target` directory for the entire build.&#xD;&#xA;&#xD;&#xA;It seems that most of the build problems stem from the assumptions that the `wasm_builder` crate makes, hence the `build.rs` only works if it uses the default cargo target directory location.&#xD;&#xA;&#xD;&#xA;Based on git history [issue#7532](https://github.com/paritytech/substrate/pull/7532), the reason the `wasm_builder` ignores the `CARGO_TARGET_DIR` is because it used to cause a cargo deadlock, since the `build.rs` script would try to build inside of the same `target` directory as the parent cargo process - but this seems to cause additional issues when not using the default target dir path.&#xD;&#xA;&#xD;&#xA;For comparison, this is the successful build directory structure under `./target`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;target&#xD;&#xA;    debug&#xD;&#xA;        wbuild&#xD;&#xA;            node-template-runtime&#xD;&#xA;                target&#xD;&#xA;                    release&#xD;&#xA;                    wasm32-unknown-unknown&#xD;&#xA;                        release&#xD;&#xA;                            node_template_runtime.wasm&#xD;&#xA;                node_template_runtime.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And this is the unsuccessful build directory structure:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;target&#xD;&#xA;    debug&#xD;&#xA;        wbuild&#xD;&#xA;            node-template-runtime&#xD;&#xA;                &lt;empty&gt;&#xD;&#xA;    release&#xD;&#xA;    wasm32-unknown-unknown&#xD;&#xA;        release&#xD;&#xA;            target&#xD;&#xA;            node_template_runtime.wasm&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5639" PostHistoryTypeId="2" PostId="1542" RevisionGUID="74e69e72-948a-4fa9-800d-2f3d58a6a07d" CreationDate="2022-04-04T12:14:49.587" UserId="128" Text="What seems to be happening is that the `wasm_builder` builds the runtime in a nested location in the target directory:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;target&#xD;&#xA;    debug&#xD;&#xA;        wbuild&#xD;&#xA;            node-template-runtime&#xD;&#xA;                src&#xD;&#xA;                Cargo.toml&#xD;&#xA;                Cargo.lock&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which should create a nested target directory for the runtime build:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;target&#xD;&#xA;    debug&#xD;&#xA;        wbuild&#xD;&#xA;            node-template-runtime&#xD;&#xA;                target&#xD;&#xA;                src&#xD;&#xA;                Cargo.toml&#xD;&#xA;                Cargo.lock&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But since the `target-dir` is set in `.cargo/config.toml` the build script puts both target directories in the global path instead:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;.cargo/target&#xD;&#xA;    debug (parent)&#xD;&#xA;    release (child)&#xD;&#xA;    wasm32-unknown-unknown (child)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then when the `build.rs` script runs it can't find the wasm binary under the nested location and fails when trying to compress it.&#xD;&#xA;&#xD;&#xA;I'm supposing that a short-term solution would be to make the `wasm_builder` also ignore the `target-dir` setting the same way it ignores the `CARGO_TARGET_DIR` as they seem to be related problems." ContentLicense="CC BY-SA 4.0" />
  <row Id="5641" PostHistoryTypeId="2" PostId="1543" RevisionGUID="9d8f3cc8-ef4d-4d7c-a6e1-84c3760bd78b" CreationDate="2022-04-04T12:22:29.850" UserId="1722" Text="I've created a network of 2 nodes on cloud servers for testing, using Substrate contract node. They have been running for about 3 months now and producing almost 1M blocks. But today they are in an idle state and stop producing blocks. What are the possible causes of this and how to fix it? Thanks.&#xD;&#xA;&#xD;&#xA;Node #1:&#xD;&#xA;```&#xD;&#xA;2022-04-04 19:12:28  Idle (0 peers), best: #978694 (0xa8dd…8e3e), finalized #978667 (0xde39…9655), ⬇ 0 ⬆ 0&#xD;&#xA;2022-04-04 19:12:33  Idle (0 peers), best: #978694 (0xa8dd…8e3e), finalized #978667 (0xde39…9655), ⬇ 0.3kiB/s ⬆ 0.3kiB/s&#xD;&#xA;2022-04-04 19:12:38  Idle (0 peers), best: #978694 (0xa8dd…8e3e), finalized #978667 (0xde39…9655), ⬇ 0 ⬆ 0&#xD;&#xA;2022-04-04 19:12:43  Idle (0 peers), best: #978694 (0xa8dd…8e3e), finalized #978667 (0xde39…9655), ⬇ 0.2kiB/s ⬆ 0.2kiB/s&#xD;&#xA;2022-04-04 19:12:48  Idle (0 peers), best: #978694 (0xa8dd…8e3e), finalized #978667 (0xde39…9655), ⬇ 55 B/s ⬆ 49 B/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Node #2:&#xD;&#xA;```&#xD;&#xA;2022-04-04 19:12:37  Idle (0 peers), best: #978690 (0x9cdf…3d7a), finalized #978667 (0xde39…9655), ⬇ 0 ⬆ 0&#xD;&#xA;2022-04-04 19:12:42  Idle (0 peers), best: #978690 (0x9cdf…3d7a), finalized #978667 (0xde39…9655), ⬇ 0.2kiB/s ⬆ 0.2kiB/s&#xD;&#xA;2022-04-04 19:12:47  Idle (0 peers), best: #978690 (0x9cdf…3d7a), finalized #978667 (0xde39…9655), ⬇ 49 B/s ⬆ 55 B/s&#xD;&#xA;2022-04-04 19:12:52  Idle (0 peers), best: #978690 (0x9cdf…3d7a), finalized #978667 (0xde39…9655), ⬇ 0.2kiB/s ⬆ 0.2kiB/s&#xD;&#xA;2022-04-04 19:12:57  Idle (0 peers), best: #978690 (0x9cdf…3d7a), finalized #978667 (0xde39…9655), ⬇ 0 ⬆ 0&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5643" PostHistoryTypeId="1" PostId="1543" RevisionGUID="9d8f3cc8-ef4d-4d7c-a6e1-84c3760bd78b" CreationDate="2022-04-04T12:22:29.850" UserId="1722" Text="Substrate nodes stop producing blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="5644" PostHistoryTypeId="3" PostId="1543" RevisionGUID="9d8f3cc8-ef4d-4d7c-a6e1-84c3760bd78b" CreationDate="2022-04-04T12:22:29.850" UserId="1722" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5645" PostHistoryTypeId="34" PostId="1427" RevisionGUID="ee275d73-0bb8-44b8-a60b-9826e6689ade" CreationDate="2022-04-04T12:23:25.530" UserId="85" Comment="4" />
  <row Id="5646" PostHistoryTypeId="6" PostId="1543" RevisionGUID="64e5c6bc-6def-46be-a2e3-1933ab9c6cab" CreationDate="2022-04-04T12:25:02.390" UserId="85" Comment="edited tags" Text="|substrate-node|stalled|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5647" PostHistoryTypeId="6" PostId="1541" RevisionGUID="d1d46550-0843-4020-80d0-5931b84fa4bb" CreationDate="2022-04-04T12:26:00.450" UserId="85" Comment="edited tags" Text="|grandpa|stalled|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5649" PostHistoryTypeId="2" PostId="1544" RevisionGUID="0a5e3f55-9955-4a61-8f7c-243952ca76e2" CreationDate="2022-04-04T12:30:31.493" UserId="627" Text="You are most-probably assuming that something with a `displayName` of `Balance` conveys more information than it does. It does not refer to a specific instance of a `Balance` type on-chain nor to a specific pallet that ties it into any display formatting. For Substrate there is no real &quot;one-balance-rules-all&quot; indicator.&#xD;&#xA;&#xD;&#xA;In terms of the balances pallet itself, something that has `displayName: Balance` is provided as a type in the config to the pallet instance, i.e. where it is instantiated in the runtime. The following is done (which the metadata then converts into the actual primitive type as well as `displayName` as used in the pallet code) -&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_balances::Config for Runtime {&#xD;&#xA;	...&#xD;&#xA;	type Balance = Balance;&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now bear in mind that the chain itself can have multiple instances of this pallet (chains are not required to have only a single `Balance` instance and indeed a growing number does not) and for each of these instances, even if they do point to the same primitive type in terms of storage size, the formatting would be different in terms of token and decimals.&#xD;&#xA;&#xD;&#xA;In the same fashion, there are multiple pallets that also take a config param of `Balance`, but in their cases it is not something that reflects native tokens or can be formatted in that way. An example is `assets` which also get configured with a `type Balance = ...` whith a subsequent `displayName: Balance` but the formatting there is purely driven by the on-chain metadata for a specific asset instance. So here a `Balance` displayName cannot be equated to a `Balance` displayName that is in-use anywhere else. [1]&#xD;&#xA;&#xD;&#xA;In the runtime contracts instantiation, the mapping for `Balances` is done via the `type Currency = Balances` where `Balances` refers to a specific instance of the balance pallet, here no `type Balance = ...` is injected into the config. &#xD;&#xA;&#xD;&#xA;Contracts, as to be deployed via a `.contract` file, are even more loosely defined, since there is no trait config information that gets supplied or that can be used to tie a displayName to any runtime pallet that is available on-chain. Here the `Balance` formatting is up to the user intent.&#xD;&#xA;&#xD;&#xA;So there is nothing in the metadata for the contracts pallet, nor in the contract-as-deployed types itself, that ties `displayName: Balance` to a type in the runtime, aka a specific instance of a balances runtime pallet. The `Currency = Balances` is not in the metadata mapping to infer which `Balance` instance is used. Contracts are certainly not tied to a specific runtime. What can be deduced 100% is the size of the type since that is absolutely specified, not the meaning and/or formatting. [2]&#xD;&#xA;&#xD;&#xA;So in the current iteration, by design, unless the UI itself applies display overrides, each generic formatter only displays the primitive - as mapped to by the metadata type, never on the inexact string-name. There is just not enough information to actually try and map any single type to a specific instance of a same-name-type elsewhere. The apps UI deals in absolutes - unless it known 100% that there is an is exact match, it doesn't attempt it.&#xD;&#xA;&#xD;&#xA;[1] They could refer, despite having the same name, to different underlying primitives, or the same primitive with obviously different meanings&#xD;&#xA;&#xD;&#xA;[2] Not sure what happens when you deploy a contract containing types mapping `Balance` as `u128` on a chain with a `Balance` as `u64`. (e.g. ERC* doesn't really reflect an actual movable balances-pallet-instance balance, so no reason not to work, just not sure if there is checks or not...)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5651" PostHistoryTypeId="5" PostId="1542" RevisionGUID="73c5e74f-ff3e-462e-8c64-348b0a691260" CreationDate="2022-04-04T12:30:32.377" UserId="128" Comment="added 19 characters in body" Text="What seems to be happening is that the `wasm_builder` builds the runtime in a nested location in the target directory:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;target&#xD;&#xA;    debug&#xD;&#xA;        wbuild&#xD;&#xA;            node-template-runtime&#xD;&#xA;                src&#xD;&#xA;                Cargo.toml&#xD;&#xA;                Cargo.lock&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which should create a nested target directory for the runtime build:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;target&#xD;&#xA;    debug&#xD;&#xA;        wbuild&#xD;&#xA;            node-template-runtime&#xD;&#xA;                target&#xD;&#xA;                src&#xD;&#xA;                Cargo.toml&#xD;&#xA;                Cargo.lock&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But since the `target-dir` is set in `.cargo/config.toml` the build script puts both target directories in the global path instead:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;.cargo/target&#xD;&#xA;    debug (parent)&#xD;&#xA;    release (child)&#xD;&#xA;    wasm32-unknown-unknown (child)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then when the `build.rs` script tries to compress the wasm binary it can't find it under the nested location and fails with the &quot;No such file or directory&quot; error as show above.&#xD;&#xA;&#xD;&#xA;I'm supposing that a short-term solution would be to make the `wasm_builder` also ignore the `target-dir` setting the same way it ignores the `CARGO_TARGET_DIR` as they seem to be related problems." ContentLicense="CC BY-SA 4.0" />
  <row Id="5652" PostHistoryTypeId="2" PostId="1545" RevisionGUID="851fe3d4-9c70-45eb-934e-b304ca7c1e11" CreationDate="2022-04-04T12:32:41.757" UserId="85" Text="https://alephzero.org/ is an example of a solo substrate chain. It's interesting in that it's using a bespoke consensus mechanism and I believe it is a DAG based chain rather than a normal chain.&#xD;&#xA;&#xD;&#xA;They have a blog post about why they pivoted to using substrate: &#xD;&#xA;&#xD;&#xA;https://alephzero.org/blog/substrate-aleph-zero-consensus/" ContentLicense="CC BY-SA 4.0" />
  <row Id="5656" PostHistoryTypeId="2" PostId="1546" RevisionGUID="d4ec8f21-2ec5-4475-97e8-81ca76977205" CreationDate="2022-04-04T13:05:29.303" UserId="128" Text="If I recall correctly, one of the first solo chains was the [Edgeware](https://edgewa.re/) Wasm smart contract chain, which uses the substrate SDK but does not connect to the Polkadot relay chain.&#xD;&#xA;&#xD;&#xA;They are also building a sister chain called [Kabocha](https://www.kabocha.network/) but I think it's planning to be a parachain on Kusama instead.&#xD;&#xA;&#xD;&#xA;The github repositories can be found here: https://github.com/Edgeware-Network&#xD;&#xA;&#xD;&#xA;Also the obvious ones are:&#xD;&#xA;&#xD;&#xA;- Polkadot&#xD;&#xA;- Kusama&#xD;&#xA;&#xD;&#xA;Though they also act as relay-chains." ContentLicense="CC BY-SA 4.0" />
  <row Id="5658" PostHistoryTypeId="5" PostId="1546" RevisionGUID="47217d2a-5bf9-4e33-aeb7-74dbf8821096" CreationDate="2022-04-04T13:10:56.257" UserId="128" Comment="added 314 characters in body" Text="If I recall correctly, one of the first solo chains was the [Edgeware](https://edgewa.re/) Wasm smart contract chain, which uses the substrate SDK but does not connect to the Polkadot relay chain.&#xD;&#xA;&#xD;&#xA;They are also building a sister chain called [Kabocha](https://www.kabocha.network/) but I think it's planning to be a parachain on Kusama instead.&#xD;&#xA;&#xD;&#xA;The github repositories can be found here: https://github.com/Edgeware-Network&#xD;&#xA;&#xD;&#xA;Also the obvious ones are:&#xD;&#xA;&#xD;&#xA;- Polkadot&#xD;&#xA;- Kusama&#xD;&#xA;&#xD;&#xA;Though they also act as relay-chains.&#xD;&#xA;&#xD;&#xA;I think at the moment it makes more sense to connect to the relay chain as a parachain, since if you run as a solo chain you lose the relay-chain security and trustless XCM capabilities. Maybe as the parachain slots become more saturated there will be more teams experimenting with their own standalone chains." ContentLicense="CC BY-SA 4.0" />
  <row Id="5659" PostHistoryTypeId="6" PostId="1537" RevisionGUID="d2b162f7-e02d-4425-9053-1b63be064224" CreationDate="2022-04-04T13:21:53.720" UserId="1806" Comment="edited tags" Text="|substrate-node-template|wasm|build|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5660" PostHistoryTypeId="2" PostId="1547" RevisionGUID="c94c7828-5123-49e3-8dea-229d255cf3be" CreationDate="2022-04-04T13:27:19.973" UserId="452" Text="The node has 0 peers and as such it refrains from authoring to avoid creating unnecessary forks. You can force a node to author while still having no peers with `--force-authoring`. Obviously you should investigate why the node has 0 peers but that's outside the scope of this question." ContentLicense="CC BY-SA 4.0" />
  <row Id="5662" PostHistoryTypeId="5" PostId="1534" RevisionGUID="7f40b7f6-0033-43c7-9343-43c34d5e5851" CreationDate="2022-04-04T13:32:14.427" UserId="1867" Comment="added 668 characters in body" Text="The testing Engine is still limited in some capabilities: It is correct that a Smart Contract obtains its `AccountId`, but I doubt that this is currently reflected by the testing Engine, since it currently doesn't simulate the instantiation of a Smart Contract which would assign a `AccountId` to the contract. &#xD;&#xA;&#xD;&#xA;Therefore `self.env().account_id()` currently returns the callee's AccountId which is manually set by calling `ink_env::test::set_callee::&lt;ink_env::DefaultEnvironment&gt;(account_id)`. If you want to test it, you need to configure a `AccountId` for your Smart Contract first. I added a test in my example [here](https://github.com/achimcc/contract_get_account_id/blob/main/lib.rs#L125-L137). &#xD;&#xA;&#xD;&#xA;I added a function `getId()` to the `contract-transfer` example [here](https://github.com/achimcc/contract_get_account_id/blob/main/lib.rs).&#xD;&#xA;&#xD;&#xA;After starting substrate contracts node locally(version substrate-contracts-node 0.11.0-bb0cd97-x86_64-linux-gnu) with `substrate-contracts-node --dev --tmp`, and connecting it with [contracts ui](https://paritytech.github.io/contracts-ui/), I can call the function to obtain the contracts `AccountId`, which is different from Alice's `AccountId`:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;So it indeed returns the Smart Contracts `AccountId` when deplyed on the Substrate Node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dyibr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5664" PostHistoryTypeId="5" PostId="1534" RevisionGUID="1365daa8-239c-49f5-bee5-b6ba378942f6" CreationDate="2022-04-04T13:40:46.687" UserId="1867" Comment="added 7 characters in body" Text="The testing Engine is still limited in some capabilities: It is correct that a Smart Contract obtains its own `AccountId`, but I doubt that this is currently reflected by the testing Engine, since it currently doesn't simulate the instantiation of a Smart Contract, which would assign a `AccountId` to the contract. &#xD;&#xA;&#xD;&#xA;Therefore `self.env().account_id()` currently returns the callee's AccountId, which is manually set by calling `ink_env::test::set_callee::&lt;ink_env::DefaultEnvironment&gt;(account_id)`. If you want to test it, you need to configure an `AccountId` for your Smart Contract first. I added a test in my example [here](https://github.com/achimcc/contract_get_account_id/blob/main/lib.rs#L125-L137). &#xD;&#xA;&#xD;&#xA;I added a function `getId()` to the `contract-transfer` example [here](https://github.com/achimcc/contract_get_account_id/blob/main/lib.rs).&#xD;&#xA;&#xD;&#xA;After starting substrate contracts node locally(version substrate-contracts-node 0.11.0-bb0cd97-x86_64-linux-gnu) with `substrate-contracts-node --dev --tmp`, and connecting it with [contracts ui](https://paritytech.github.io/contracts-ui/), I can call the function to obtain the contracts `AccountId`, which is different from Alice's `AccountId`:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;So it indeed returns the Smart Contracts `AccountId` when deplyed on the Substrate Node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dyibr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5665" PostHistoryTypeId="2" PostId="1548" RevisionGUID="d04b653e-6ab0-4b83-9158-559aea465021" CreationDate="2022-04-04T13:41:01.363" UserId="280" Text="It's not standard Rust syntax because it makes use of the `#[pallet::storage]` macro. Please have a look at the official documentation for [the macro]((https://docs.substrate.io/rustdocs/latest/frame_support/attr.pallet.html#storage-palletstorage-optional)) and the [StorageMap type](https://docs.substrate.io/rustdocs/latest/frame_support/storage/types/struct.StorageMap.html) for more information. &#xD;&#xA;&#xD;&#xA;In short, &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn some_map)]&#xD;&#xA;pub(super) type SomeMap&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, SomeKey, SomeValue, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;sets up a StorageMap with name `SomeMap` for `SomeKey --&gt; SomeValue` with getter function `some_map` using the `Blake2_128Concat` hasher. `ValueQuery` states that the resulting value lookup is not wrapped into an Option, which would be the case if you were using `OptionQuery` (default implementation of the QueryKind generic).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5667" PostHistoryTypeId="5" PostId="1548" RevisionGUID="7c9c3f37-358e-4ad4-b4f7-bee67db69b76" CreationDate="2022-04-04T14:01:31.573" UserId="280" Comment="deleted 2 characters in body" Text="It's not standard Rust syntax because it makes use of the `#[pallet::storage]` macro. Please have a look at the official documentation for [the macro](https://docs.substrate.io/rustdocs/latest/frame_support/attr.pallet.html#storage-palletstorage-optional) and the [StorageMap type](https://docs.substrate.io/rustdocs/latest/frame_support/storage/types/struct.StorageMap.html) for more information. &#xD;&#xA;&#xD;&#xA;In short, &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn some_map)]&#xD;&#xA;pub(super) type SomeMap&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, SomeKey, SomeValue, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;sets up a StorageMap with name `SomeMap` for `SomeKey --&gt; SomeValue` with getter function `some_map` using the `Blake2_128Concat` hasher. `ValueQuery` states that the resulting value lookup is not wrapped into an Option, which would be the case if you were using `OptionQuery` (default implementation of the QueryKind generic).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5668" PostHistoryTypeId="5" PostId="1548" RevisionGUID="a050ab2c-72e3-4e1f-bba7-5f5365e9682d" CreationDate="2022-04-04T14:19:57.517" UserId="280" Comment="deleted 1 character in body" Text="It's not standard Rust syntax because it makes use of the `#[pallet::storage]` macro. Please have a look at the official documentation for [the macro](https://docs.substrate.io/rustdocs/latest/frame_support/attr.pallet.html#storage-palletstorage-optional) and the [StorageMap type](https://docs.substrate.io/rustdocs/latest/frame_support/storage/types/struct.StorageMap.html) for more information. &#xD;&#xA;&#xD;&#xA;In short, &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn some_map)]&#xD;&#xA;pub(super) type SomeMap&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, SomeKey, SomeValue, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;sets up a StorageMap with name `SomeMap` for `SomeKey =&gt; SomeValue` with getter function `some_map` using the `Blake2_128Concat` hasher. `ValueQuery` states that the resulting value lookup is not wrapped into an Option, which would be the case if you were using `OptionQuery` (default implementation of the QueryKind generic).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5669" PostHistoryTypeId="4" PostId="1519" RevisionGUID="597658b0-f13b-462e-b287-32efc58fdfa4" CreationDate="2022-04-04T14:32:21.637" UserId="128" Comment="More specific title and tags" Text="Transaction rollback in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="5670" PostHistoryTypeId="6" PostId="1519" RevisionGUID="597658b0-f13b-462e-b287-32efc58fdfa4" CreationDate="2022-04-04T14:32:21.637" UserId="128" Comment="More specific title and tags" Text="|pallet|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5671" PostHistoryTypeId="24" PostId="1519" RevisionGUID="597658b0-f13b-462e-b287-32efc58fdfa4" CreationDate="2022-04-04T14:32:21.637" Comment="Proposed by 128 approved by 18, 68 edit id of 138" ContentLicense="CC BY-SA 4.0" />
  <row Id="5672" PostHistoryTypeId="2" PostId="1549" RevisionGUID="451a9dc1-c3a2-4472-af63-a5db86dee420" CreationDate="2022-04-04T14:37:03.283" UserId="1793" Text="We want to perform extrinsic **xcmPallet.reserveTransferAssets** from Kusama to our Mangata parachain.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const transfer = await api.tx.xcmPallet.reserveTransferAssets(...someParas);&#xD;&#xA;const info = await api.tx.xcmPallet.reserveTransferAssets(...someParas).paymentInfo(sender);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We know how to find the **Origin Chain Transfer Fee** because info is **RuntimeDispatchInfo** and there is a **partialFee** property which is nice. &#xD;&#xA;&#xD;&#xA;Our main concern as we saw on Karura or Bifrost that they have **Destination Chain Transfer Fee** which we are not sure how to get this number. What is the way to obtain this fee before the user sign the extrinsic ? &#xD;&#xA;&#xD;&#xA;Another question is related to successful transaction: we can see in our parachain the event **parachainSystem.DownwardMessagesReceived** or **dmpQueue.ExecutedDownward**. So in order to know whether this xcm transaction is complete is only to subscribe to these events ? &#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="5674" PostHistoryTypeId="1" PostId="1549" RevisionGUID="451a9dc1-c3a2-4472-af63-a5db86dee420" CreationDate="2022-04-04T14:37:03.283" UserId="1793" Text="How to determine destination chain transfer fee when executing tx.xcmPallet.reserveTransferAssets" ContentLicense="CC BY-SA 4.0" />
  <row Id="5675" PostHistoryTypeId="3" PostId="1549" RevisionGUID="451a9dc1-c3a2-4472-af63-a5db86dee420" CreationDate="2022-04-04T14:37:03.283" UserId="1793" Text="|xcm|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5676" PostHistoryTypeId="5" PostId="1535" RevisionGUID="37b2d9c0-97d0-48b2-9517-8fbefceee429" CreationDate="2022-04-04T14:47:49.813" UserId="139" Comment="added 261 characters in body; edited title" Text="[Following the answer on this post][1] : Need some help understanding this &quot;unexpected end of file&quot; error from my node trying to connect on remote &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Reach failure for Some(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)) through &quot;/ip4/13.235.23.68/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))    &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Failed to reach PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;) through &quot;/ip4/13.235.23.68/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Pending connection: Transport error: upgrade apply error: unexpected end of file    &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Reach failure for Some(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)) through &quot;/ip4/13.235.23.68/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))  &#xD;&#xA;```&#xD;&#xA;Context: I am trying to peer two nodes, one on a server behind an nginx reverse proxy, and one on my local machine. Enabling the debug messages I can see `UnexpectedEof`. I've tried removing the nginx proxy, and tried running it with the same raw chain spec. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1492/how-to-debug-issues-regarding-peering/1505#1505" ContentLicense="CC BY-SA 4.0" />
  <row Id="5677" PostHistoryTypeId="4" PostId="1535" RevisionGUID="37b2d9c0-97d0-48b2-9517-8fbefceee429" CreationDate="2022-04-04T14:47:49.813" UserId="139" Comment="added 261 characters in body; edited title" Text="Troubleshooting : Peering connection failed due to libp2p error" ContentLicense="CC BY-SA 4.0" />
  <row Id="5678" PostHistoryTypeId="5" PostId="1461" RevisionGUID="577da070-1015-4dd7-8c58-902969c2e89d" CreationDate="2022-04-04T14:49:08.657" UserId="128" Comment="Remove extra symbol in title and add tls tag" Text="According to https://wiki.polkadot.network/docs/maintain-wss#importing-the-certificate&#xD;&#xA;One can visit the cloud instance on `https` and download the certificate and then proceed to connect to a websocket via 443, but how can one achieve this using the electron App or Polkadot Appimage? I am currently on windows, and I can connect to my cloud via my browser, but not via my electron app, supposedly because my app cannot obtain the certificate." ContentLicense="CC BY-SA 4.0" />
  <row Id="5679" PostHistoryTypeId="4" PostId="1461" RevisionGUID="577da070-1015-4dd7-8c58-902969c2e89d" CreationDate="2022-04-04T14:49:08.657" UserId="128" Comment="Remove extra symbol in title and add tls tag" Text="How do we import a self-signed certificate for the Polkadot-JS electron app or AppImage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5680" PostHistoryTypeId="6" PostId="1461" RevisionGUID="577da070-1015-4dd7-8c58-902969c2e89d" CreationDate="2022-04-04T14:49:08.657" UserId="128" Comment="Remove extra symbol in title and add tls tag" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5681" PostHistoryTypeId="24" PostId="1461" RevisionGUID="577da070-1015-4dd7-8c58-902969c2e89d" CreationDate="2022-04-04T14:49:08.657" Comment="Proposed by 128 approved by 139 edit id of 136" ContentLicense="CC BY-SA 4.0" />
  <row Id="5682" PostHistoryTypeId="5" PostId="1378" RevisionGUID="b1ae02e2-55e2-4357-a654-ea3d1615e832" CreationDate="2022-04-04T14:49:27.443" UserId="172" Comment="added 376 characters in body" Text="[Substrate API client](https://github.com/scs/substrate-api-client) is a library written in Rust for connecting to the Substrate's RPC interface via WebSockets allowing to:&#xD;&#xA;&#xD;&#xA;- Compose extrinsics, send them and subscribe to updates (synchronously)&#xD;&#xA;- Compose extrinsics for `no_std` builds&#xD;&#xA;- Watch events and execute code upon events.&#xD;&#xA;- Parse and print a node's metadata.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5683" PostHistoryTypeId="24" PostId="1378" RevisionGUID="b1ae02e2-55e2-4357-a654-ea3d1615e832" CreationDate="2022-04-04T14:49:27.443" Comment="Proposed by 172 approved by 85, 139 edit id of 127" ContentLicense="CC BY-SA 4.0" />
  <row Id="5684" PostHistoryTypeId="2" PostId="1550" RevisionGUID="672d76b0-bc93-41e6-a708-cc199e96f421" CreationDate="2022-04-04T14:50:17.933" UserId="53" Text="There is not currently any way to get this value automatically. It is generally expected that in the near term the community will standardise around a fixed fee expressed in DOT or KSM.&#xD;&#xA;&#xD;&#xA;In the future I'd expect a change in XCM to include ways for a parachain to advertise a schedule of prices, similarly to how it can advertise its native XCM version. This is described in https://github.com/paritytech/polkadot/issues/4118 and can be expected in an upcoming XCM version.&#xD;&#xA;&#xD;&#xA;The two events you mention are indeed good in order to help understand which messages are being executed. XCMv3, currently undergoing external code audit, introduces more powerful means of tracking messages and their effects via topics (a user-settable 32-byte message identifier) as well as the a general message hash which should be traceable through XCMP between chains." ContentLicense="CC BY-SA 4.0" />
  <row Id="5686" PostHistoryTypeId="5" PostId="1535" RevisionGUID="62b36467-3b27-4719-81cb-e357323c7282" CreationDate="2022-04-04T14:57:02.913" UserId="139" Comment="added 1959 characters in body" Text="[Following the answer on this post][1] : Need some help understanding this &quot;unexpected end of file&quot; error from my node trying to connect on remote &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;TRACE tokio-runtime-worker sub-libp3p: Libp2p =&gt; Dialing(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;))    &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Reach failure for Some(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Failed to reach PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNPeQjpkZcf8xfQLfz&quot;: Pending connection: Transport error: upgrade apply error: unexpected end of file                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Reach failure for Some(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Failed to reach PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Pending connection: Transport error: upgrade apply error: unexpected end of file                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Reach failure for Some(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Dial failure for PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: PSM &lt;= Dropped(12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz, SetId(0))                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Failed to reach PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Pending connection: Transport error: upgrade apply error: unexpected end of file                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: PSM =&gt; Connect(12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz, SetId(0)): Will start to connect at until Instant { tv_sec: 2261, tv_nsec: 649712813 }            &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Query for 0020fa47e52ff34a6141190c69d58229d541a72b2a4fe4ed428952b2e515764fd229 yielded 0 results   &#xD;&#xA;                                                                                 &#xD;&#xA;```&#xD;&#xA;Context: I am trying to peer two nodes, one on a server behind an nginx reverse proxy, and one on my local machine. Enabling the debug messages I can see `UnexpectedEof`. I've tried removing the nginx proxy, and tried running it with the same raw chain spec. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1492/how-to-debug-issues-regarding-peering/1505#1505" ContentLicense="CC BY-SA 4.0" />
  <row Id="5687" PostHistoryTypeId="5" PostId="1351" RevisionGUID="36dec78e-242a-457b-943a-cd39e51efbe2" CreationDate="2022-04-04T15:00:40.787" UserId="85" Comment="added 106 characters in body" Text="See A. Antonopoulos's talk:&#xD;&#xA;&#xD;&#xA;https://aantonop.com/unstoppable-code-the-difference-between-cant-and-wont/" ContentLicense="CC BY-SA 4.0" />
  <row Id="5688" PostHistoryTypeId="24" PostId="1351" RevisionGUID="36dec78e-242a-457b-943a-cd39e51efbe2" CreationDate="2022-04-04T15:00:40.787" Comment="Proposed by 85 approved by 94, 139 edit id of 117" ContentLicense="CC BY-SA 4.0" />
  <row Id="5689" PostHistoryTypeId="5" PostId="1352" RevisionGUID="5338dd19-752b-4eeb-92ed-953de3f35952" CreationDate="2022-04-04T15:00:45.640" UserId="85" Comment="added 59 characters in body" Text="Unstoppable code is the difference between can't and won't." ContentLicense="CC BY-SA 4.0" />
  <row Id="5690" PostHistoryTypeId="24" PostId="1352" RevisionGUID="5338dd19-752b-4eeb-92ed-953de3f35952" CreationDate="2022-04-04T15:00:45.640" Comment="Proposed by 85 approved by 94, 139 edit id of 118" ContentLicense="CC BY-SA 4.0" />
  <row Id="5691" PostHistoryTypeId="2" PostId="1551" RevisionGUID="29a7fdd2-c68c-4e99-a1d2-dfb22b833964" CreationDate="2022-04-04T15:35:04.800" UserId="2113" Text="I'm following the [Substrate Kitties tutorial](https://docs.substrate.io/tutorials/v3/kitties/pt2/), and I've run into some problems getting the front end working. &#xD;&#xA;&#xD;&#xA;The backend node seems to be working just fine, but this code snippet for the front end:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Subscription function for kitty count&#xD;&#xA;const subscribeCount = () =&gt; {&#xD;&#xA;  let unsub = null&#xD;&#xA;  const asyncFetch = async () =&gt; {&#xD;&#xA;    unsub = await api.query.substrateKitties.countForKitties(&#xD;&#xA;      async count =&gt; {&#xD;&#xA;        // Fetch all kitty keys&#xD;&#xA;        const entries = await api.query.substrateKitties.kitties.entries()&#xD;&#xA;        const ids = entries.map(entry =&gt; entry[1].unwrap().dna)&#xD;&#xA;        setKittyIds(ids)&#xD;&#xA;      }&#xD;&#xA;    )&#xD;&#xA;  }&#xD;&#xA;  asyncFetch()&#xD;&#xA;  return () =&gt; {&#xD;&#xA;    unsub &amp;&amp; unsub()&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;throws an exception:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Kitties.js:26 Uncaught (in promise) TypeError: api.query.substrateKitties.countForKitties is not a function&#xD;&#xA;    at asyncFetch (Kitties.js:26:1)&#xD;&#xA;    at subscribeCount (Kitties.js:34:1)&#xD;&#xA;    at invokePassiveEffectCreate (react-dom.development.js:23487:1)&#xD;&#xA;    at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)&#xD;&#xA;    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)&#xD;&#xA;    at invokeGuardedCallback (react-dom.development.js:4056:1)&#xD;&#xA;    at flushPassiveEffectsImpl (react-dom.development.js:23574:1)&#xD;&#xA;    at unstable_runWithPriority (scheduler.development.js:468:1)&#xD;&#xA;    at runWithPriority$1 (react-dom.development.js:11276:1)&#xD;&#xA;    at flushPassiveEffects (react-dom.development.js:23447:1)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I first followed the tutorial carefully, and to ensure I didn't mess anything up, I cloned the [backend](https://github.com/substrate-developer-hub/substrate-node-template) and [frontend](https://github.com/substrate-developer-hub/substrate-front-end-template.git) repos and switched to the `tutorials/solutions/kitties` branch. Same error.&#xD;&#xA;&#xD;&#xA;Is the front end code out of date?&#xD;&#xA;&#xD;&#xA;Thanks for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="5693" PostHistoryTypeId="1" PostId="1551" RevisionGUID="29a7fdd2-c68c-4e99-a1d2-dfb22b833964" CreationDate="2022-04-04T15:35:04.800" UserId="2113" Text="TypeError: api.query.substrateKitties.countForKitties is not a function" ContentLicense="CC BY-SA 4.0" />
  <row Id="5694" PostHistoryTypeId="3" PostId="1551" RevisionGUID="29a7fdd2-c68c-4e99-a1d2-dfb22b833964" CreationDate="2022-04-04T15:35:04.800" UserId="2113" Text="|polkadot-js|kitties-tutorial|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5695" PostHistoryTypeId="2" PostId="1552" RevisionGUID="4005e46b-a289-40e4-9480-530d69d5a3e1" CreationDate="2022-04-04T15:53:37.063" UserId="128" Text="You have a couple of options:&#xD;&#xA;&#xD;&#xA;- If you are using a browser, you can do what it says in the docs - by clicking on &quot;Proceed to site&quot; in the browser pop-up the self-signed certificate should become whitelisted - which should then allow you to connect to a local node using the browser Polkadot interface.&#xD;&#xA;&#xD;&#xA;- If you are using electron, you most likely won't get the &quot;Proceed to site&quot; popup since this is usually browser-specific - though a similar popup could be implemented in the Polkadot-JS interface if you want to contribute to the repository: https://github.com/polkadot-js/apps&#xD;&#xA;&#xD;&#xA;- You can expose the node endpoint on a public server port and create a certificate signed by a real certificate authority e.g. Let's encrypt (https://letsencrypt.org/docs/) - then you should be able to connect with Electron/Browser without any issues but this could be problematic if you want to keep the node private on localhost.&#xD;&#xA;&#xD;&#xA;- Another option is to generate your own certificate, either self-signed or signed by a local root, and trust it in your operating system’s trust store. Then use that certificate in your local node websocket endpoint.&#xD;&#xA;&#xD;&#xA;The process of adding a self-signed certificate to a local trust store is different based on different operating systems:&#xD;&#xA;&#xD;&#xA;On Arch Linux / Fedora Linux:&#xD;&#xA;&#xD;&#xA;1. Copy the self-signed certificate to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/etc/ca-certificates/trust-source/anchors/mycertificate.crt&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Update the trust store (as root):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo update-ca-trust&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On Ubuntu:&#xD;&#xA;&#xD;&#xA;1. Copy the self-signed certificate to: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/usr/local/share/ca-certificates/mycertificate.crt&#xD;&#xA;```&#xD;&#xA;2. Update the trust store (as root):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo update-ca-certificates&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm less familiar with how to do this on Windows but I found an article online that might be of use: &#xD;&#xA;&#xD;&#xA;[make-a-self-signed-certificate-trusted-on-windows](https://www.ntweekly.com/2020/08/31/make-a-self-signed-certificate-trusted-on-windows/)&#xD;&#xA;&#xD;&#xA;And here's an article on how to do this on MacOS:&#xD;&#xA;&#xD;&#xA;[trust-self-signed-certificates-macos](https://readwriteexercise.com/posts/trust-self-signed-certificates-macos/)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5697" PostHistoryTypeId="5" PostId="1379" RevisionGUID="46a00e20-d78b-47c8-a23d-eeda004460b0" CreationDate="2022-04-04T15:53:37.920" UserId="172" Comment="added 128 characters in body" Text="Questions relating to the Rust library for connecting to Substrate APIs over WebSockets, developed by Supercomputing Systems AG." ContentLicense="CC BY-SA 4.0" />
  <row Id="5698" PostHistoryTypeId="24" PostId="1379" RevisionGUID="46a00e20-d78b-47c8-a23d-eeda004460b0" CreationDate="2022-04-04T15:53:37.920" Comment="Proposed by 172 approved by 85, 139 edit id of 128" ContentLicense="CC BY-SA 4.0" />
  <row Id="5699" PostHistoryTypeId="5" PostId="1462" RevisionGUID="a89f33b4-2dcd-4804-9ef6-6b2f0ab60efd" CreationDate="2022-04-04T15:53:53.923" UserId="128" Comment="Added documentation tag and fixed the title." Text="I'm trying to learn how to implement EVM pre-compiles in substrate (frontier), but I cannot find any documentation anywhere. If I try and reference something like moonbeam I fall into dependency hell. If you could point me towards some documentation or let me see some of what you have done I would be very grateful." ContentLicense="CC BY-SA 4.0" />
  <row Id="5700" PostHistoryTypeId="4" PostId="1462" RevisionGUID="a89f33b4-2dcd-4804-9ef6-6b2f0ab60efd" CreationDate="2022-04-04T15:53:53.923" UserId="128" Comment="Added documentation tag and fixed the title." Text="Where can I find frontier evm precompile documentation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5701" PostHistoryTypeId="6" PostId="1462" RevisionGUID="a89f33b4-2dcd-4804-9ef6-6b2f0ab60efd" CreationDate="2022-04-04T15:53:53.923" UserId="128" Comment="Added documentation tag and fixed the title." Text="|frontier|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5702" PostHistoryTypeId="24" PostId="1462" RevisionGUID="a89f33b4-2dcd-4804-9ef6-6b2f0ab60efd" CreationDate="2022-04-04T15:53:53.923" Comment="Proposed by 128 approved by 18, 139 edit id of 133" ContentLicense="CC BY-SA 4.0" />
  <row Id="5703" PostHistoryTypeId="5" PostId="1248" RevisionGUID="56c4e98e-1cf7-4a9f-85d4-e97f45ff1bd8" CreationDate="2022-04-04T15:54:08.443" UserId="172" Comment="added 46 characters in body" Text="Oracle-like capabilities for Substrate chains." ContentLicense="CC BY-SA 4.0" />
  <row Id="5704" PostHistoryTypeId="24" PostId="1248" RevisionGUID="56c4e98e-1cf7-4a9f-85d4-e97f45ff1bd8" CreationDate="2022-04-04T15:54:08.443" Comment="Proposed by 172 approved by 85, 139 edit id of 112" ContentLicense="CC BY-SA 4.0" />
  <row Id="5705" PostHistoryTypeId="5" PostId="1552" RevisionGUID="ad7670a2-80e7-49b6-83c6-4eb71e6f06ec" CreationDate="2022-04-04T15:59:12.323" UserId="128" Comment="added 152 characters in body" Text="You have a couple of options:&#xD;&#xA;&#xD;&#xA;- If you are using a browser, you can do what it says in the docs - by clicking on &quot;Proceed to site&quot; in the browser pop-up the self-signed certificate should become whitelisted - which should then allow you to connect to a local node using the browser Polkadot interface.&#xD;&#xA;&#xD;&#xA;- If you are using electron, you most likely won't get the &quot;Proceed to site&quot; popup since this is usually browser-specific - though a similar popup could be implemented in the Polkadot-JS interface if you want to contribute to the repository: https://github.com/polkadot-js/apps&#xD;&#xA;&#xD;&#xA;- You can expose the node endpoint on a public server port and create a certificate signed by a real certificate authority e.g. Let's encrypt (https://letsencrypt.org/docs/) - then you should be able to connect with Electron/Browser without any issues but this could be problematic if you want to keep the node private on localhost.&#xD;&#xA;&#xD;&#xA;- Another option is to generate your own certificate, either self-signed or signed by a local root, and trust it in your operating system’s trust store. Then use that certificate in your local node websocket endpoint.&#xD;&#xA;&#xD;&#xA;The process of adding a self-signed certificate to a local trust store is different based on different operating systems:&#xD;&#xA;&#xD;&#xA;On Arch/Fedora Linux ([update-ca-trust](https://man.archlinux.org/man/update-ca-trust.8)):&#xD;&#xA;&#xD;&#xA;1. Copy the self-signed certificate to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/etc/ca-certificates/trust-source/anchors/mycertificate.crt&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Update the trust store (as root):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo update-ca-trust&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On Ubuntu/Debian Linux ([security-trust-store](https://ubuntu.com/server/docs/security-trust-store)):&#xD;&#xA;&#xD;&#xA;1. Copy the self-signed certificate to: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/usr/local/share/ca-certificates/mycertificate.crt&#xD;&#xA;```&#xD;&#xA;2. Update the trust store (as root):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo update-ca-certificates&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm less familiar with how to do this on Windows but I found an article online that might be of use: &#xD;&#xA;&#xD;&#xA;[make-a-self-signed-certificate-trusted-on-windows](https://www.ntweekly.com/2020/08/31/make-a-self-signed-certificate-trusted-on-windows/)&#xD;&#xA;&#xD;&#xA;And here's an article on how to do this on MacOS:&#xD;&#xA;&#xD;&#xA;[trust-self-signed-certificates-macos](https://readwriteexercise.com/posts/trust-self-signed-certificates-macos/)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5707" PostHistoryTypeId="5" PostId="1552" RevisionGUID="e3ad0213-fdc8-4681-acae-c16325d17d61" CreationDate="2022-04-04T16:09:26.107" UserId="128" Comment="added 567 characters in body" Text="You have a couple of options:&#xD;&#xA;&#xD;&#xA;- If you are using a browser, you can do what it says in the docs - by clicking on &quot;Proceed to site&quot; in the browser pop-up the self-signed certificate should become whitelisted - which should then allow you to connect to a local node using the browser Polkadot interface.&#xD;&#xA;&#xD;&#xA;- If you are using electron, you most likely won't get the &quot;Proceed to site&quot; popup since this is usually browser-specific - though a similar popup could be implemented in the Polkadot-JS interface if you want to contribute to the repository: https://github.com/polkadot-js/apps&#xD;&#xA;&#xD;&#xA;- You can expose the node endpoint on a public server port and create a certificate signed by a real certificate authority e.g. Let's encrypt (https://letsencrypt.org/docs/) - then you should be able to connect with Electron/Browser without any issues but this could be problematic if you want to keep the node private on localhost.&#xD;&#xA;&#xD;&#xA;- Another option is to generate your own certificate, either self-signed or signed by a local root, and trust it in your operating system’s trust store. Then use that certificate in your local node's websocket endpoint.&#xD;&#xA;&#xD;&#xA;The process of adding a self-signed certificate to a local trust store is different based on different operating systems:&#xD;&#xA;&#xD;&#xA;On Arch/Fedora Linux ([update-ca-trust](https://man.archlinux.org/man/update-ca-trust.8)):&#xD;&#xA;&#xD;&#xA;1. Copy the self-signed certificate to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/etc/ca-certificates/trust-source/anchors/mycertificate.crt&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Update the trust store (as root):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo update-ca-trust&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On Ubuntu/Debian Linux ([security-trust-store](https://ubuntu.com/server/docs/security-trust-store)):&#xD;&#xA;&#xD;&#xA;1. Copy the self-signed certificate to: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/usr/local/share/ca-certificates/mycertificate.crt&#xD;&#xA;```&#xD;&#xA;2. Update the trust store (as root):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo update-ca-certificates&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm less familiar with how to do this on Windows but I found an article online that might be of use: &#xD;&#xA;&#xD;&#xA;[make-a-self-signed-certificate-trusted-on-windows](https://www.ntweekly.com/2020/08/31/make-a-self-signed-certificate-trusted-on-windows/)&#xD;&#xA;&#xD;&#xA;And here's an article on how to do this on MacOS:&#xD;&#xA;&#xD;&#xA;[trust-self-signed-certificates-macos](https://readwriteexercise.com/posts/trust-self-signed-certificates-macos/)&#xD;&#xA;&#xD;&#xA;&gt; 1. Open Keychain Access and the All Items category (lower left) &#xD;&#xA;&gt; 2. Locate your self-signed certificate file (.pem, .p12, or something else) in Finder&#xD;&#xA;&gt; 3. Drag your certificate file from Finder to Keychain Access, in the list on the right&#xD;&#xA;&gt; 4. Open Certificates on the very bottom left&#xD;&#xA;&gt; 5. Find the certificate you just dragged in and double click it (if there’s a dropdown arrow on the left then just ignore that, we want the top level one)&#xD;&#xA;&gt; 6. Click the Trust dropdown arrow then change When using this certificate from System Defaults to Always Trust&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5708" PostHistoryTypeId="5" PostId="1535" RevisionGUID="61afd894-e9d7-4c71-890d-9b2bbbe2a8e2" CreationDate="2022-04-04T16:11:09.137" UserId="139" Comment="added 169 characters in body" Text="[Following the answer on this post][1] : Need some help understanding this &quot;unexpected end of file&quot; error from my node trying to connect on remote &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;TRACE tokio-runtime-worker sub-libp3p: Libp2p =&gt; Dialing(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;))    &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Reach failure for Some(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Failed to reach PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNPeQjpkZcf8xfQLfz&quot;: Pending connection: Transport error: upgrade apply error: unexpected end of file                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Reach failure for Some(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Failed to reach PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Pending connection: Transport error: upgrade apply error: unexpected end of file                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Reach failure for Some(PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Transport(Other(Custom { kind: Other, error: Other(A(B(Apply(Io(Kind(UnexpectedEof)))))) }))                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Dial failure for PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;)                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: PSM &lt;= Dropped(12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz, SetId(0))                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Failed to reach PeerId(&quot;12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;) through &quot;/ip4/&lt;IP&gt;/tcp/30333/p2p/12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz&quot;: Pending connection: Transport error: upgrade apply error: unexpected end of file                           &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: PSM =&gt; Connect(12D3KooWJgoKKAVg7AfWn9FJQRqtVzhGkSNuPeQjpkZcf8xfQLfz, SetId(0)): Will start to connect at until Instant { tv_sec: 2261, tv_nsec: 649712813 }            &#xD;&#xA;TRACE tokio-runtime-worker sub-libp2p: Libp2p =&gt; Query for 0020fa47e52ff34a6141190c69d58229d541a72b2a4fe4ed428952b2e515764fd229 yielded 0 results   &#xD;&#xA;                                                                                 &#xD;&#xA;```&#xD;&#xA;Context: I am trying to peer two nodes, one on a server behind an nginx reverse proxy, and one on my local machine. Enabling the debug messages I can see `UnexpectedEof`. I've tried removing the nginx proxy, and tried running it with the same raw chain spec. &#xD;&#xA;&#xD;&#xA;EDIT #2 : I should mention that this error doesn't occur if both nodes are validators (i.e. running with `--validator` or having authority keys in their keystore). Only if one of the nodes happens to be not a validator, then I see this error.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1492/how-to-debug-issues-regarding-peering/1505#1505" ContentLicense="CC BY-SA 4.0" />
  <row Id="5709" PostHistoryTypeId="5" PostId="1494" RevisionGUID="be5c3ec4-bab5-4899-b83b-4ad7bb515f57" CreationDate="2022-04-04T16:22:30.890" UserId="1904" Comment="Combine step 3 and 4, since they are really one step" Text="I'm not sure if this is the simplest way, but I came up with a solution. &#xD;&#xA;&#xD;&#xA; 1. Write a basic smart contract that calls each chain extension function&#xD;&#xA; 2. Create a mock runtime using the chain extension&#xD;&#xA; 3. Write a test that builds the contract, uploads it with `pallet_contracts::bare_upload_code` and `pallet_contracts::bare_instantiate`. Then call the contract's functions and verify the state of the appropriate pallets." ContentLicense="CC BY-SA 4.0" />
  <row Id="5710" PostHistoryTypeId="2" PostId="1553" RevisionGUID="4287d346-fd94-4e62-aa7c-a7d78765b8c3" CreationDate="2022-04-04T16:46:11.693" UserId="83" Text="&gt; What is the Public identity which is reported in this log message? I can't find it in any of our logs, which would indicate that it is not a public identifier that we're ever referencing (ie, it doesn't show up in the Polkajs interface). Is it referring to a particular Session key? How would I find the Aura ID of this identifier such that I can ask for the logs from this machine?&#xD;&#xA;&#xD;&#xA;Note: I will attempt to answer this question out of the many questions you asked.&#xD;&#xA;&#xD;&#xA;There are multiple public identities reported in the log message that you provided.&#xD;&#xA;&#xD;&#xA;The node identity `Local node identity is: 12D3KooWQbTk1xVSvp8YM3p8uoJrjSa3LKL2UBt11Excd1i11spW` that is shown in your logs may have been automatically generated if you did not specify a value for the `--node-key` option when running your validator node, which you can manually generate using `subkey generate-node-key --file node-key` https://substrate.dev/docs/en/knowledgebase/integrate/subkey#generating-node-keys, which generates a public peer bootnode ID (node ID) like the value `12D3KooWQbTk1xVSvp8YM3p8uoJrjSa3LKL2UBt11Excd1i11spW` shown in your logs, and it adds an associated secret Node Key to a file named 'node-key' and you specify that as the value of `--node-key &lt;GENERATED_NODE_KEY&gt;` when starting your validator&#xD;&#xA;&#xD;&#xA;Another public identity mentioned in your logs is the authority id of the equivocator (offender) that it detected as being the precommit equivocation finality worker `identity: Public(72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854 (5EeJu7Mc...))`, and it shows the round number `round_number` when that equivocation happened.&#xD;&#xA;&#xD;&#xA;If you use Subkey and prefix that address with `0x`, you can reveal the full SS58 Address:&#xD;&#xA;```bash&#xD;&#xA;$ subkey inspect --public --scheme Sr25519 0x72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854&#xD;&#xA;Network ID/version: substrate&#xD;&#xA;  Public key (hex):   0x72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854&#xD;&#xA;  Account ID:         0x72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854&#xD;&#xA;  SS58 Address:       5EeJu7McQLXjVxWKfUWqYsBbB6oHDEPNcPpv6dununkMq74J&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There are two more public identities in your logs that are the signatures of votes that are used to verify the precommit equivocation proof.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;first: (Precommit { target_hash: 0x&lt;BLOCK_HASH_X&gt;, target_number: &lt;BLOCK_NO_X&gt; }, Signature(&lt;SIGNATURE_VOTER_1&gt;)),&#xD;&#xA;second: (Precommit { target_hash: 0x&lt;BLOCK_HASH_Y&gt;, target_number: &lt;BLOCK_NO_Y&gt; }, Signature(&lt;SIGNATURE_VOTER_2&gt;)) }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the Substrate implementation it says outgoing message votes to the network by authorities may be replaced depending on whether or not they have voted, and the votes are *&quot;stored unsigned&quot;*. It says this means the *&quot;signatures need to be &quot;stable&quot;*, and that this is currently true for `Ed25519` signatures, and that *&quot;care must be taken when switching to different key types&quot;*&#xD;&#xA;&#xD;&#xA;I wonder if you the issue you encountered were generated because your validators are not using Grandpa session keys that were generated using the Ed25519 cryptography scheme? For example to generate a Grandpa session key using Subkey using the Ed25519 (instead of the Subkey's default Sr25519 cryptography scheme) you could run `subkey inspect --scheme=ed25519 &quot;$SECRET//1//grandpa&quot;`, where `$SECRET` is your Secret Key URI." ContentLicense="CC BY-SA 4.0" />
  <row Id="5712" PostHistoryTypeId="5" PostId="1553" RevisionGUID="42ee0636-8795-40de-adbf-5388adeb3442" CreationDate="2022-04-04T17:09:36.747" UserId="83" Comment="mention possibly needing to remove existing keys first" Text="There are multiple public identities reported in the log message that you provided.&#xD;&#xA;&#xD;&#xA;The node identity `Local node identity is: 12D3KooWQbTk1xVSvp8YM3p8uoJrjSa3LKL2UBt11Excd1i11spW` that is shown in your logs may have been automatically generated if you did not specify a value for the `--node-key` option when running your validator node, which you can manually generate using `subkey generate-node-key --file node-key` https://substrate.dev/docs/en/knowledgebase/integrate/subkey#generating-node-keys, which generates a public peer bootnode ID (node ID) like the value `12D3KooWQbTk1xVSvp8YM3p8uoJrjSa3LKL2UBt11Excd1i11spW` shown in your logs, and it adds an associated secret Node Key to a file named 'node-key' and you specify that as the value of `--node-key &lt;GENERATED_NODE_KEY&gt;` when starting your validator&#xD;&#xA;&#xD;&#xA;Another public identity mentioned in your logs is the authority id of the equivocator (offender) that it detected as being the precommit equivocation finality worker `identity: Public(72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854 (5EeJu7Mc...))`, and it shows the round number `round_number` when that equivocation happened.&#xD;&#xA;&#xD;&#xA;If you use Subkey and prefix that address with `0x`, you can reveal the full SS58 Address:&#xD;&#xA;```bash&#xD;&#xA;$ subkey inspect --public --scheme Sr25519 0x72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854&#xD;&#xA;Network ID/version: substrate&#xD;&#xA;  Public key (hex):   0x72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854&#xD;&#xA;  Account ID:         0x72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854&#xD;&#xA;  SS58 Address:       5EeJu7McQLXjVxWKfUWqYsBbB6oHDEPNcPpv6dununkMq74J&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There are two more public identities in your logs that are the signatures of votes that are used to verify the precommit equivocation proof.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;first: (Precommit { target_hash: 0x&lt;BLOCK_HASH_X&gt;, target_number: &lt;BLOCK_NO_X&gt; }, Signature(&lt;SIGNATURE_VOTER_1&gt;)),&#xD;&#xA;second: (Precommit { target_hash: 0x&lt;BLOCK_HASH_Y&gt;, target_number: &lt;BLOCK_NO_Y&gt; }, Signature(&lt;SIGNATURE_VOTER_2&gt;)) }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the Substrate implementation it says outgoing message votes to the network by authorities may be replaced depending on whether or not they have voted, and the votes are *&quot;stored unsigned&quot;*. It says this means the *&quot;signatures need to be &quot;stable&quot;*, and that this is currently true for `Ed25519` signatures, and that *&quot;care must be taken when switching to different key types&quot;*&#xD;&#xA;&#xD;&#xA;I wonder if you the issue you encountered were generated because your validators are not using Grandpa session keys that were generated using the Ed25519 cryptography scheme? For example to generate a Grandpa session key using Subkey using the Ed25519 (instead of the Subkey's default Sr25519 cryptography scheme) you could run `subkey inspect --scheme=ed25519 &quot;$SECRET//1//grandpa&quot;`, where `$SECRET` is your Secret Key URI.&#xD;&#xA;&#xD;&#xA;If that is the cause then you could try removing the old Grandpa session keys and generating and inserting new Grandpa session keys for all validators using the Ed25519 cryptography scheme." ContentLicense="CC BY-SA 4.0" />
  <row Id="5713" PostHistoryTypeId="5" PostId="1553" RevisionGUID="cf3c4b86-4c86-4762-bd54-165e3882b121" CreationDate="2022-04-04T17:40:17.630" UserId="83" Comment="Fix grammar" Text="There are multiple public identities reported in the log message that you provided.&#xD;&#xA;&#xD;&#xA;The node identity `Local node identity is: 12D3KooWQbTk1xVSvp8YM3p8uoJrjSa3LKL2UBt11Excd1i11spW` that is shown in your logs may have been automatically generated if you did not specify a value for the `--node-key` option when running your validator node, which you can manually generate using `subkey generate-node-key --file node-key` https://substrate.dev/docs/en/knowledgebase/integrate/subkey#generating-node-keys, which generates a public peer bootnode ID (node ID) like the value `12D3KooWQbTk1xVSvp8YM3p8uoJrjSa3LKL2UBt11Excd1i11spW` shown in your logs, and it adds an associated secret Node Key to a file named 'node-key' and you specify that as the value of `--node-key &lt;GENERATED_NODE_KEY&gt;` when starting your validator.&#xD;&#xA;&#xD;&#xA;Another public identity mentioned in your logs is the authority id of the equivocator (offender) that it detected as being the precommit equivocation finality worker `identity: Public(72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854 (5EeJu7Mc...))`, and it shows the round number `round_number` when that equivocation happened.&#xD;&#xA;&#xD;&#xA;If you use Subkey and prefix that address with `0x`, you can reveal the full SS58 Address:&#xD;&#xA;```bash&#xD;&#xA;$ subkey inspect --public --scheme Sr25519 0x72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854&#xD;&#xA;Network ID/version: substrate&#xD;&#xA;  Public key (hex):   0x72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854&#xD;&#xA;  Account ID:         0x72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854&#xD;&#xA;  SS58 Address:       5EeJu7McQLXjVxWKfUWqYsBbB6oHDEPNcPpv6dununkMq74J&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There are two more public identities in your logs that are the signatures of votes that are used to verify the precommit equivocation proof.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;first: (Precommit { target_hash: 0x&lt;BLOCK_HASH_X&gt;, target_number: &lt;BLOCK_NO_X&gt; }, Signature(&lt;SIGNATURE_VOTER_1&gt;)),&#xD;&#xA;second: (Precommit { target_hash: 0x&lt;BLOCK_HASH_Y&gt;, target_number: &lt;BLOCK_NO_Y&gt; }, Signature(&lt;SIGNATURE_VOTER_2&gt;)) }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the Substrate implementation it says outgoing message votes to the network by authorities may be replaced depending on whether or not they have voted, and the votes are *&quot;stored unsigned&quot;*. It says this means the *&quot;signatures need to be &quot;stable&quot;*, and that this is currently true for `Ed25519` signatures, and that *&quot;care must be taken when switching to different key types&quot;*.&#xD;&#xA;&#xD;&#xA;I wonder if you the issue you encountered was generated because your validators are using Grandpa session keys that were generated using the default Sr25519 cryptography scheme instead of Ed25519? For example to generate a Grandpa session key for your first validator using Subkey with Ed25519 (instead of the Subkey's default Sr25519 cryptography scheme) you could run `subkey inspect --scheme=ed25519 &quot;$SECRET//1//grandpa&quot;`, where `$SECRET` is your Secret Key URI.&#xD;&#xA;&#xD;&#xA;If that is the cause then you could try removing the old Grandpa session keys and generating and inserting new Grandpa session keys for all validators using the Ed25519 cryptography scheme." ContentLicense="CC BY-SA 4.0" />
  <row Id="5714" PostHistoryTypeId="5" PostId="1471" RevisionGUID="14241d19-e2a3-4a39-b869-a16c5148bec4" CreationDate="2022-04-04T18:03:26.437" UserId="543" Comment="deleted 147 characters in body" Text="I've been working on a fork of this repo. To update to V3, I ended up just rebuilding the entire repo on top of the substrate master branch. Most of it is encapsulated here: https://github.com/iridium-labs/substrate/commit/7a1c1c89857e28b3a1dbd3a56ca2c8d433ce233d&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5715" PostHistoryTypeId="2" PostId="1554" RevisionGUID="0f7c3a21-f5dd-40dc-9124-febb78acd961" CreationDate="2022-04-04T19:17:49.587" UserId="2117" Text="I've used `await api.query.staking.nominators(address)` but that just returns something like:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;	&quot;result&quot;: {&#xD;&#xA;		&quot;targets&quot;: [&#xD;&#xA;			&quot;{nominatorId1}&quot;,&#xD;&#xA;			&quot;{nominatorId2}&quot;&#xD;&#xA;		],&#xD;&#xA;		&quot;submittedIn&quot;: 4957,&#xD;&#xA;		&quot;suppressed&quot;: false&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This is useful but I don't know the statuses of each of them. Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="5717" PostHistoryTypeId="1" PostId="1554" RevisionGUID="0f7c3a21-f5dd-40dc-9124-febb78acd961" CreationDate="2022-04-04T19:17:49.587" UserId="2117" Text="How do I check the status of nominations for a staking account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5718" PostHistoryTypeId="3" PostId="1554" RevisionGUID="0f7c3a21-f5dd-40dc-9124-febb78acd961" CreationDate="2022-04-04T19:17:49.587" UserId="2117" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5719" PostHistoryTypeId="2" PostId="1555" RevisionGUID="fc249275-58ff-46ae-8893-63ec8e4f5297" CreationDate="2022-04-04T19:47:17.017" UserId="73" Text="The authority key is neither the controller nor the stash key. &#xD;&#xA;&#xD;&#xA;What you call authority key, is actually called session key. Such a session key can be changed once per session. For the genesis you need to specify the keys of the genesis authorities. You only specify the public key in the chain spec. This public key should be unique and not belong to the stash or controller. How you generate the public key is up to you, as long as you use the correct crypto." ContentLicense="CC BY-SA 4.0" />
  <row Id="5721" PostHistoryTypeId="5" PostId="1529" RevisionGUID="a61410a4-3048-418b-a051-e0ad4930cd31" CreationDate="2022-04-04T19:51:17.597" UserId="128" Comment="Use code block instead of in-line code" Text="This error normally comes in windows. As Native development of substrate is not very well supported in windows so you will face errors now and then. But there is a permanent solution for the same.&#xD;&#xA;As we all know Substrate development is easiest on Unix-based operating systems like macOS or Linux.&#xD;&#xA;So we will convert our windows into Linux without installing any new software just by Enabling some inbuilt windows feature. &#xD;&#xA;&#xD;&#xA;First of all, prepare your windows system for the substrate. This can be done using **windows subsystem Linux(wsl)**. To use it go into the control panel &gt; programs &gt; programs and Features &gt; Turn windows Feature On and OFF &#xD;&#xA;And in it tick mark on **Hyper-V** and **windows subsystem for Linux** as shown in the images below.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;After that Enable the visualization by going into the bios advance section on your laptop. To access bios on different laptops there is a different process. So look on youtube for how to Enable visualization on your system.&#xD;&#xA;&#xD;&#xA;If you have a home edition of windows, Hyper-V might not be there so first install that. To install hyper-v follow the below instruction:&#xD;&#xA;1. Open Notepad and paste the below-given code as shown below:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;pushd &quot;%~dp0&quot;&#xD;&#xA;dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum &gt;hv.txt&#xD;&#xA;for /f %%i in ('findstr /i . hv.txt 2^&gt;nul') do dism /online /norestart /add-package:&quot;%SystemRoot%\servicing\Packages\%%i&quot;&#xD;&#xA;del hv.txt&#xD;&#xA;Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL&#xD;&#xA;pause&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. After that in the notepad where you have pasted the code select 'Save as' and then name the file as hyper-v.bat and below that in 'save as type' select All Files and save it on the desktop or wherever you can easily find it. &#xD;&#xA;3. Then run that file as administrator&#xD;&#xA;&#xD;&#xA;It will ask you to restart your system and Hyper-v will be installed on your system.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;After all the above is done go into the windows app store and search wsl. You will se multiple options. There select Ubuntu 20.04.4 LTS (or whatever you like) and download it as it's famous and normally used.&#xD;&#xA;And in ubuntu set username and password. Username should follow [a-z,0-9] only.&#xD;&#xA;&#xD;&#xA;After that follow the instructions on this doc: https://docs.substrate.io/v3/getting-started/installation/#ubuntudebian&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sYoh2.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6uaIu.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="5722" PostHistoryTypeId="24" PostId="1529" RevisionGUID="a61410a4-3048-418b-a051-e0ad4930cd31" CreationDate="2022-04-04T19:51:17.597" Comment="Proposed by 128 approved by 554 edit id of 135" ContentLicense="CC BY-SA 4.0" />
  <row Id="5723" PostHistoryTypeId="2" PostId="1556" RevisionGUID="99e6032c-6afa-4f90-bafd-0622cf032d58" CreationDate="2022-04-04T20:21:22.013" UserId="205" Text="@Shawn is right. Unfortunately in the `kitties tutorial part I`, some snippets still use the deprecated `kitty_cnt` method (as below) to get the number of stored kitties. This last is probably why you are getting the error: Your `front-end` is trying to reach a getter method that does not exists. &#xD;&#xA;However, the repos you described above are properly updated and both implement the right matching method: `countForKitties`.  &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn kitty_cnt)]&#xD;&#xA;pub(super) type KittyCnt&lt;T: Config&gt; = StorageValue&lt;_, u64, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/aabf0add87414e72dbec26e3bf0bf3da47f250a7/pallets/kitties/src/lib.rs#L108" ContentLicense="CC BY-SA 4.0" />
  <row Id="5725" PostHistoryTypeId="2" PostId="1557" RevisionGUID="6d400b7a-c910-48dc-8e51-756958cdac86" CreationDate="2022-04-04T20:25:12.307" UserId="566" Text="I'm trying to do the signature verification on an ink! contract. I'm using [ink_env::ecdsa_recover][1] for this purpose.&#xD;&#xA;&#xD;&#xA;It is returning Compressed Public Key of type `[u8; 33]`. &#xD;&#xA;&#xD;&#xA;I have the AccountId of the signer in the contract storage. Is there a way I can get the AccountId from the Compressed Public Key to verify the signer? or is there a better way to approach this? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/crates/env/src/api.rs#L493" ContentLicense="CC BY-SA 4.0" />
  <row Id="5727" PostHistoryTypeId="1" PostId="1557" RevisionGUID="6d400b7a-c910-48dc-8e51-756958cdac86" CreationDate="2022-04-04T20:25:12.307" UserId="566" Text="How to get AccountId from compressed public key?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5728" PostHistoryTypeId="3" PostId="1557" RevisionGUID="6d400b7a-c910-48dc-8e51-756958cdac86" CreationDate="2022-04-04T20:25:12.307" UserId="566" Text="|ink|smart-contract|ecdsa-verify|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5729" PostHistoryTypeId="5" PostId="1556" RevisionGUID="2953ef8b-52ad-46b8-bcf0-ce4ac80f3aef" CreationDate="2022-04-04T20:27:31.040" UserId="205" Comment="added 1 character in body" Text="@Shawn is right. Unfortunately in the `kitties tutorial part I`, some snippets still use the deprecated `kitty_cnt` method (as below) to get the number of stored kitties. This last is probably why you are getting the error: Your `Frontend` is trying to reach a `getter` method that does not exists. &#xD;&#xA;However, the repos you described above are properly updated and both implement the right matching method: `countForKitties`.  &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn kitty_cnt)]&#xD;&#xA;pub(super) type KittyCnt&lt;T: Config&gt; = StorageValue&lt;_, u64, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/aabf0add87414e72dbec26e3bf0bf3da47f250a7/pallets/kitties/src/lib.rs#L108" ContentLicense="CC BY-SA 4.0" />
  <row Id="5730" PostHistoryTypeId="4" PostId="1557" RevisionGUID="618dd0c8-eb39-45e0-aa5c-8648dd2bd010" CreationDate="2022-04-04T20:39:39.337" UserId="566" Comment="edited title" Text="How to get AccountId from compressed public key in an ink! contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5731" PostHistoryTypeId="5" PostId="1557" RevisionGUID="618dd0c8-eb39-45e0-aa5c-8648dd2bd010" CreationDate="2022-04-04T20:39:39.337" UserId="566" Comment="edited title" Text="I'm trying to do the signature verification in an ink! contract. I'm using [ink_env::ecdsa_recover][1] for this purpose.&#xD;&#xA;&#xD;&#xA;It is returning Compressed Public Key of type `[u8; 33]`. &#xD;&#xA;I have the AccountId of the signer in the contract storage. &#xD;&#xA;&#xD;&#xA;Is there a way I can get the AccountId from the Compressed Public Key to verify the signer? or is there a better way to approach this? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/crates/env/src/api.rs#L493" ContentLicense="CC BY-SA 4.0" />
  <row Id="5732" PostHistoryTypeId="6" PostId="1557" RevisionGUID="4152e844-f36a-4d03-9d22-5363887dfcd8" CreationDate="2022-04-04T20:52:56.737" UserId="566" Comment="edited tags" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5733" PostHistoryTypeId="2" PostId="1558" RevisionGUID="104ee597-8ab0-4dec-859b-93eb9653292b" CreationDate="2022-04-04T20:53:56.593" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5735" PostHistoryTypeId="1" PostId="1558" RevisionGUID="104ee597-8ab0-4dec-859b-93eb9653292b" CreationDate="2022-04-04T20:53:56.593" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5736" PostHistoryTypeId="2" PostId="1559" RevisionGUID="c8b32ac8-70cb-4539-b606-a73201a34430" CreationDate="2022-04-04T20:53:56.593" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5738" PostHistoryTypeId="1" PostId="1559" RevisionGUID="c8b32ac8-70cb-4539-b606-a73201a34430" CreationDate="2022-04-04T20:53:56.593" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5739" PostHistoryTypeId="2" PostId="1560" RevisionGUID="79b0909f-bb65-49d5-bd69-017d73891193" CreationDate="2022-04-04T20:58:41.043" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5741" PostHistoryTypeId="1" PostId="1560" RevisionGUID="79b0909f-bb65-49d5-bd69-017d73891193" CreationDate="2022-04-04T20:58:41.043" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5742" PostHistoryTypeId="2" PostId="1561" RevisionGUID="2e0a6084-b4bb-4d49-82fb-9e77c6e021d6" CreationDate="2022-04-04T20:58:41.043" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5744" PostHistoryTypeId="1" PostId="1561" RevisionGUID="2e0a6084-b4bb-4d49-82fb-9e77c6e021d6" CreationDate="2022-04-04T20:58:41.043" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5745" PostHistoryTypeId="2" PostId="1562" RevisionGUID="5a7a5ed7-442d-4de3-b2c5-6d03f40ab5d3" CreationDate="2022-04-04T21:46:43.813" UserId="2124" Text="While trying to run benchmark with the following command, I am getting errors:&#xD;&#xA;```target/debug/imbue-collator benchmark --chain=pukimak.json --steps=100 --repeat=200 --pallet=proposals --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=example_weights.rs --template=./scripts/frame-weight-template.hbs```&#xD;&#xA;&#xD;&#xA;Error: &#xD;&#xA;```Error: Input(&quot;Error getting benchmark list: Other: Exported method Benchmark_benchmark_metadata is not found&quot;)```&#xD;&#xA;&#xD;&#xA;Used local chain spec via this command:&#xD;&#xA;./target/debug/imbue-collator build-spec --chain imbue-dev --raw --disable-default-bootnode &gt; pukimak.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;Able to run benchmark help command using the collator on CLI:&#xD;&#xA;```./target/debug/imbue-collator --help benchmark&#xD;&#xA;imbue-collator 2.0.0-c68dc56-x86_64-linux-gnu&#xD;&#xA;imbue &lt;https://github.com/ImbueNetwork&gt;&#xD;&#xA;imbue testnet&#xD;&#xA;&#xD;&#xA;The command-line arguments provided first will be passed to the parachain node, while the arguments&#xD;&#xA;provided after -- will be passed to the relaychain node.&#xD;&#xA;&#xD;&#xA;imbue-collator [parachain-args] -- [relaychain-args]&#xD;&#xA;&#xD;&#xA;USAGE:&#xD;&#xA;    imbue-collator [OPTIONS] [-- &lt;RELAYCHAIN_ARGS&gt;...]&#xD;&#xA;    imbue-collator &lt;SUBCOMMAND&gt;&#xD;&#xA;&#xD;&#xA;ARGS:&#xD;&#xA;    &lt;RELAYCHAIN_ARGS&gt;...&#xD;&#xA;            Relaychain arguments&#xD;&#xA;&#xD;&#xA;OPTIONS:&#xD;&#xA;        --alice&#xD;&#xA;            Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5747" PostHistoryTypeId="1" PostId="1562" RevisionGUID="5a7a5ed7-442d-4de3-b2c5-6d03f40ab5d3" CreationDate="2022-04-04T21:46:43.813" UserId="2124" Text="Error getting benchmark list: Other: Exported method Benchmark_benchmark_metadata is not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="5748" PostHistoryTypeId="3" PostId="1562" RevisionGUID="5a7a5ed7-442d-4de3-b2c5-6d03f40ab5d3" CreationDate="2022-04-04T21:46:43.813" UserId="2124" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5749" PostHistoryTypeId="5" PostId="1524" RevisionGUID="605bb6c7-5342-4852-affb-bcea51202317" CreationDate="2022-04-04T22:09:37.100" UserId="16" Comment="edited body" Text="You can use the `Decode` trait in order to create a `frame_system::pallet::Config::Hash` from bytes:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let hash = T::Hash::decode(&#xD;&#xA;    hex!(&quot;d282f389399565f3671145f5916e51652b60eee8e5c759293a2f5771b8ddfd2e&quot;).as_mut()&#xD;&#xA;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5750" PostHistoryTypeId="2" PostId="1563" RevisionGUID="f36a8d59-41a4-4eee-9043-a8869d94acbc" CreationDate="2022-04-05T02:17:05.010" UserId="309" Text="You could get the Public key (hex) using the inspect command of subkey --&gt; &#xD;&#xA;Take a look at this link:&#xD;&#xA;[enter link description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/tools/subkey/&#xD;&#xA;&#xD;&#xA;If you already have it (for example `0xd6a3105d6768e956e9e5d41050ac29843f98561410d3a47f9dd5b3b227ab8746`), add `hex-literal = &quot;0.3.4&quot;` in your Cargo.toml, and then in your ink contract, your account Id will be: &#xD;&#xA;&#xD;&#xA;    AccountId = hex_literal::hex![&quot;d6a3105d6768e956e9e5d41050ac29843f98561410d3a47f9dd5b3b227ab8746&quot;].into();&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5752" PostHistoryTypeId="2" PostId="1564" RevisionGUID="8cad7ff3-e35f-4e26-85d1-b90f678a5220" CreationDate="2022-04-05T03:18:53.000" UserId="299" Text="If you want to use `Hash type` in benchmark. Please try to use this.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let hash = T::Hashing::hash_of(&amp;1);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5754" PostHistoryTypeId="2" PostId="1565" RevisionGUID="1285709b-cea5-4c17-bbab-82a1a3bdfc38" CreationDate="2022-04-05T04:07:27.977" UserId="340" Text="My goal is to tail the output and setup some health checks to monitor the nodes health.&#xD;&#xA;&#xD;&#xA;So I'm looking for example outputs and actions to take. Should I search SRC for log outputs! Is there a best practice article for node health checks.&#xD;&#xA;&#xD;&#xA;Eg&#xD;&#xA;- Panics/non zero return = restart process if &#xD;&#xA;- uptime GT hrs else check hw spec&#xD;&#xA;- Target - finalised GT 10 blocks = check iops&#xD;&#xA;- Stuck at block X = bump version&#xD;&#xA;- Etc etc" ContentLicense="CC BY-SA 4.0" />
  <row Id="5756" PostHistoryTypeId="1" PostId="1565" RevisionGUID="1285709b-cea5-4c17-bbab-82a1a3bdfc38" CreationDate="2022-04-05T04:07:27.977" UserId="340" Text="When running an archive node, what potential error conditions should I monitor for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5757" PostHistoryTypeId="3" PostId="1565" RevisionGUID="1285709b-cea5-4c17-bbab-82a1a3bdfc38" CreationDate="2022-04-05T04:07:27.977" UserId="340" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5763" PostHistoryTypeId="2" PostId="1567" RevisionGUID="a3f35177-1a8e-477a-bcde-45c29c9d1838" CreationDate="2022-04-05T05:19:06.913" UserId="1878" Text="Is it possible to set up a call filter (`BaseCallFilter`) so that the filtering is done based on the parameters of the call? So if the extrinsic parameters match a certain criterion they should either be filtered or not." ContentLicense="CC BY-SA 4.0" />
  <row Id="5765" PostHistoryTypeId="1" PostId="1567" RevisionGUID="a3f35177-1a8e-477a-bcde-45c29c9d1838" CreationDate="2022-04-05T05:19:06.913" UserId="1878" Text="Is it possible to set up a call filter based on the call arguments?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5766" PostHistoryTypeId="3" PostId="1567" RevisionGUID="a3f35177-1a8e-477a-bcde-45c29c9d1838" CreationDate="2022-04-05T05:19:06.913" UserId="1878" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5767" PostHistoryTypeId="2" PostId="1568" RevisionGUID="e60bacfe-b884-4b3b-8e23-fd2c71bf4ccc" CreationDate="2022-04-05T05:20:32.013" UserId="1867" Text="The public key `pub_key` should just be the byte representation of the `AcccountId`.&#xD;&#xA;&#xD;&#xA;Try `AccountId::from(pub_key)` and compare it to your `AccountId`." ContentLicense="CC BY-SA 4.0" />
  <row Id="5769" PostHistoryTypeId="2" PostId="1569" RevisionGUID="8cadc96e-1df0-4631-a85b-eef81e6d83af" CreationDate="2022-04-05T05:40:57.813" UserId="2129" Text="There are a number of examples, the closest to a &quot;list&quot; I can think of is the polkadot-js apps UI where &quot;solo chains&quot; are contained in their own section.&#xD;&#xA;&#xD;&#xA;So for relay + para, the entries on the &quot;chain selection&quot; under the following fits in this category -&#xD;&#xA;&#xD;&#xA; - Polkadot &amp; Parachains&#xD;&#xA; - Kusama &amp; Parachains&#xD;&#xA; - Test Westend &amp; Parachains&#xD;&#xA; - Test Rococo &amp; Parachains&#xD;&#xA;&#xD;&#xA;For the solo chains, you are after the following -&#xD;&#xA;&#xD;&#xA; - Live networks&#xD;&#xA; - Test networks&#xD;&#xA;&#xD;&#xA;Under live you will see some of the ones mentioned above in addition to: Aleph Zero, Automata, Centrifuge, ChainX, Competitors Club, Crown Sterling, Crust Network, Darwinia, Dock, Edgeware, Genshiro, HydraDX, ... Subgame, Subsocial, Swapdex, UniArts, ... the list is long.&#xD;&#xA;&#xD;&#xA;Interesting here (for me) is Kulupu with is POW.&#xD;&#xA;&#xD;&#xA;Some of these do have parachains as well, either on Kusama or Polkadot (or are testing on the test relays), these are seperate chains to the stand-alone ones." ContentLicense="CC BY-SA 4.0" />
  <row Id="5771" PostHistoryTypeId="2" PostId="1570" RevisionGUID="2b57294a-8cbc-40cc-8c73-421c278ea563" CreationDate="2022-04-05T05:46:04.040" UserId="2129" Text="There are also examples for events that are not tied to extrinsics, or rather those submitted much earlier. &#xD;&#xA;&#xD;&#xA;For instance the scheduler can perform an upgrade for a runtime approved via democracy. In this case events such as `PreImageUsed` and `CodeUpdated` are emitted." ContentLicense="CC BY-SA 4.0" />
  <row Id="5776" PostHistoryTypeId="2" PostId="1571" RevisionGUID="0cb7a1bd-d15e-4ea9-9e42-37548862f9a6" CreationDate="2022-04-05T06:18:23.537" UserId="85" Text="You can match against anything in the Call enum. Here's an example from Acala:&#xD;&#xA;&#xD;&#xA;https://github.com/AcalaNetwork/Acala/blob/f4b80d7200c19b78d3777e8a4a87bc6893740d23/runtime/karura/src/lib.rs#L198&#xD;&#xA;&#xD;&#xA;I can't find any example where anyone has so far filtered based on the values in the arguments. So far it's all been on the shape and structure of the calls but I don't see any reason not to. That said, it might make sense to separate out calls that you intend to treat in different ways into separate calls or separate enum variants inside your call - that might be less confusing for users of your parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="5778" PostHistoryTypeId="5" PostId="1552" RevisionGUID="3d3b70ab-4e69-4f5e-8782-0fc6abc2f420" CreationDate="2022-04-05T06:49:12.290" UserId="128" Comment="added 3 characters in body" Text="You have a couple of options:&#xD;&#xA;&#xD;&#xA;- If you are using a browser, you can do what it says in the docs - by clicking on &quot;Proceed to site&quot; in the browser pop-up the self-signed certificate should become whitelisted - which should then allow you to connect to a local node using the browser Polkadot interface.&#xD;&#xA;&#xD;&#xA;- If you are using electron, you most likely won't get the &quot;Proceed to site&quot; popup since this is usually browser-specific - though a similar popup could be implemented in the Polkadot-JS electron app if you want to contribute to the repository: https://github.com/polkadot-js/apps&#xD;&#xA;&#xD;&#xA;- You can expose the node endpoint on a public server port and create a certificate signed by a real certificate authority e.g. Let's encrypt (https://letsencrypt.org/docs/) - then you should be able to connect with Electron/Browser without any issues but this could be problematic if you want to keep the node private on localhost.&#xD;&#xA;&#xD;&#xA;- Another option is to generate your own certificate, either self-signed or signed by a local root, and trust it in your operating system’s trust store. Then use that certificate in your local node's websocket endpoint.&#xD;&#xA;&#xD;&#xA;The process of adding a self-signed certificate to a local trust store is different based on different operating systems:&#xD;&#xA;&#xD;&#xA;On Arch/Fedora Linux ([update-ca-trust](https://man.archlinux.org/man/update-ca-trust.8)):&#xD;&#xA;&#xD;&#xA;1. Copy the self-signed certificate to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/etc/ca-certificates/trust-source/anchors/mycertificate.crt&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Update the trust store (as root):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo update-ca-trust&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On Ubuntu/Debian Linux ([security-trust-store](https://ubuntu.com/server/docs/security-trust-store)):&#xD;&#xA;&#xD;&#xA;1. Copy the self-signed certificate to: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/usr/local/share/ca-certificates/mycertificate.crt&#xD;&#xA;```&#xD;&#xA;2. Update the trust store (as root):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo update-ca-certificates&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm less familiar with how to do this on Windows but I found an article online that might be of use: &#xD;&#xA;&#xD;&#xA;[make-a-self-signed-certificate-trusted-on-windows](https://www.ntweekly.com/2020/08/31/make-a-self-signed-certificate-trusted-on-windows/)&#xD;&#xA;&#xD;&#xA;And here's an article on how to do this on MacOS:&#xD;&#xA;&#xD;&#xA;[trust-self-signed-certificates-macos](https://readwriteexercise.com/posts/trust-self-signed-certificates-macos/)&#xD;&#xA;&#xD;&#xA;&gt; 1. Open Keychain Access and the All Items category (lower left) &#xD;&#xA;&gt; 2. Locate your self-signed certificate file (.pem, .p12, or something else) in Finder&#xD;&#xA;&gt; 3. Drag your certificate file from Finder to Keychain Access, in the list on the right&#xD;&#xA;&gt; 4. Open Certificates on the very bottom left&#xD;&#xA;&gt; 5. Find the certificate you just dragged in and double click it (if there’s a dropdown arrow on the left then just ignore that, we want the top level one)&#xD;&#xA;&gt; 6. Click the Trust dropdown arrow then change When using this certificate from System Defaults to Always Trust&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5779" PostHistoryTypeId="5" PostId="1568" RevisionGUID="03c2d140-e57a-4813-9d41-6ea69d845b41" CreationDate="2022-04-05T07:08:29.920" UserId="1867" Comment="added 464 characters in body" Text="A compressed public key can by represented by the `ECDSAPublicKey` struct from the `eth_compatibility` [crate](https://github.com/paritytech/ink/blob/master/crates/eth_compatibility) from ink.&#xD;&#xA;&#xD;&#xA;Try to create an `ECDSAPublicKey` struct from your uncompressed public key and then invoke the `to_default_account_id()` function from it which is defined [here](https://github.com/paritytech/ink/blob/master/crates/eth_compatibility/src/lib.rs#L140-L150).&#xD;&#xA;&#xD;&#xA;The public key `pub_key` should then be just the byte representation of the `AcccountId`.&#xD;&#xA;&#xD;&#xA;Try `AccountId::from(pub_key)` and compare it to your `AccountId`.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5784" PostHistoryTypeId="2" PostId="1572" RevisionGUID="20d2445d-4586-4d47-80ac-a59dad52eccc" CreationDate="2022-04-05T07:32:30.673" UserId="2102" Text="I was wondering what's the main difference (besides the code) between using the decl_storage! macro rule and using the [pallet::storage] macro?&#xD;&#xA;&#xD;&#xA;I've seen pretty much everyone using macro rules, but on the latest versions of the substrate node, I can't import macro rules like decl_event! or decl_error!, only decl_storage!&#xD;&#xA;&#xD;&#xA;Thx!" ContentLicense="CC BY-SA 4.0" />
  <row Id="5786" PostHistoryTypeId="1" PostId="1572" RevisionGUID="20d2445d-4586-4d47-80ac-a59dad52eccc" CreationDate="2022-04-05T07:32:30.673" UserId="2102" Text="Defining pallet storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="5787" PostHistoryTypeId="3" PostId="1572" RevisionGUID="20d2445d-4586-4d47-80ac-a59dad52eccc" CreationDate="2022-04-05T07:32:30.673" UserId="2102" Text="|pallet|substrate-node-template|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5788" PostHistoryTypeId="2" PostId="1573" RevisionGUID="85f01592-d0e7-4b9d-9699-5aba2fdf1496" CreationDate="2022-04-05T07:36:24.110" UserId="523" Text="try add your `proposal` pallet into [benchmark metadata]( &#xD;&#xA;https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/kusama/src/lib.rs#L1933) like this" ContentLicense="CC BY-SA 4.0" />
  <row Id="5791" PostHistoryTypeId="2" PostId="1574" RevisionGUID="94b5f40e-0928-45d8-bcb1-ebe2bf357a06" CreationDate="2022-04-05T07:39:51.237" UserId="1744" Text="I was running a substrate node on my system but unknowingly I didn't stop the node by using 'CTRL+C' and closed the editor. But after that I am seeing that on frontend node is running continuously even though node is not running in the editor.&#xD;&#xA;So there might be a reason that it is still running in the backend of my system but I am not able to see it. So How to stop that node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5793" PostHistoryTypeId="1" PostId="1574" RevisionGUID="94b5f40e-0928-45d8-bcb1-ebe2bf357a06" CreationDate="2022-04-05T07:39:51.237" UserId="1744" Text="Node running on Frontend" ContentLicense="CC BY-SA 4.0" />
  <row Id="5794" PostHistoryTypeId="3" PostId="1574" RevisionGUID="94b5f40e-0928-45d8-bcb1-ebe2bf357a06" CreationDate="2022-04-05T07:39:51.237" UserId="1744" Text="|nodes|frontend|command|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5795" PostHistoryTypeId="5" PostId="1562" RevisionGUID="1989c006-59cc-4bd3-8e38-354279f06c75" CreationDate="2022-04-05T07:53:11.730" UserId="128" Comment="Code block formatting" Text="While trying to run benchmark with the following command, I am getting errors:&#xD;&#xA;```&#xD;&#xA;target/debug/imbue-collator benchmark --chain=pukimak.json --steps=100 --repeat=200 --pallet=proposals --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=example_weights.rs --template=./scripts/frame-weight-template.hbs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error: &#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;Error getting benchmark list: Other: Exported method Benchmark_benchmark_metadata is not found&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Used local chain spec via this command:&#xD;&#xA;```&#xD;&#xA;./target/debug/imbue-collator build-spec --chain imbue-dev --raw --disable-default-bootnode &gt; pukimak.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;Able to run benchmark help command using the collator on CLI:&#xD;&#xA;```./target/debug/imbue-collator --help benchmark&#xD;&#xA;imbue-collator 2.0.0-c68dc56-x86_64-linux-gnu&#xD;&#xA;imbue &lt;https://github.com/ImbueNetwork&gt;&#xD;&#xA;imbue testnet&#xD;&#xA;&#xD;&#xA;The command-line arguments provided first will be passed to the parachain node, while the arguments&#xD;&#xA;provided after -- will be passed to the relaychain node.&#xD;&#xA;&#xD;&#xA;imbue-collator [parachain-args] -- [relaychain-args]&#xD;&#xA;&#xD;&#xA;USAGE:&#xD;&#xA;    imbue-collator [OPTIONS] [-- &lt;RELAYCHAIN_ARGS&gt;...]&#xD;&#xA;    imbue-collator &lt;SUBCOMMAND&gt;&#xD;&#xA;&#xD;&#xA;ARGS:&#xD;&#xA;    &lt;RELAYCHAIN_ARGS&gt;...&#xD;&#xA;            Relaychain arguments&#xD;&#xA;&#xD;&#xA;OPTIONS:&#xD;&#xA;        --alice&#xD;&#xA;            Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5796" PostHistoryTypeId="5" PostId="1572" RevisionGUID="9f0f907e-c157-40af-a2f8-3ad65bde8f1b" CreationDate="2022-04-05T08:01:15.950" UserId="128" Comment="deleted 8 characters in body" Text="What's the main difference (besides the code) between using the `decl_storage!` macro rule and using the `[pallet::storage]` macro?&#xD;&#xA;&#xD;&#xA;I've seen pretty much everyone using macro rules, but on the latest versions of the substrate node, I can't import macro rules like `decl_event!` or `decl_error!`, only `decl_storage!`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5797" PostHistoryTypeId="5" PostId="1540" RevisionGUID="3421e3e7-103f-4d66-a359-921c24463ba0" CreationDate="2022-04-05T08:18:31.077" UserId="1806" Comment="Code formatting" Text="In the tutorial of learning substrate, a storage map for stored items is defined as follows, in which the symbol `=&gt;` appears, but this specification is not in the standard syntax of rust. How to understand it?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;MyMap get(my_map): map u8 =&gt; Vec&lt;u8&gt;;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5798" PostHistoryTypeId="24" PostId="1540" RevisionGUID="3421e3e7-103f-4d66-a359-921c24463ba0" CreationDate="2022-04-05T08:18:31.077" Comment="Proposed by 1806 approved by 94, 128 edit id of 137" ContentLicense="CC BY-SA 4.0" />
  <row Id="5799" PostHistoryTypeId="10" PostId="1122" RevisionGUID="9b167775-43cd-4692-afe6-7612552f5103" CreationDate="2022-04-05T08:23:49.537" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:359,&quot;DisplayName&quot;:&quot;Bryan Chen&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;}]}" />
  <row Id="5800" PostHistoryTypeId="10" PostId="1147" RevisionGUID="922c0bdc-5699-48ca-950b-2c3d5c04920e" CreationDate="2022-04-05T08:26:31.640" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:380,&quot;DisplayName&quot;:&quot;forgetso&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;}]}" />
  <row Id="5801" PostHistoryTypeId="10" PostId="965" RevisionGUID="869da0f8-628d-4626-8b27-b3b9d9c4c3df" CreationDate="2022-04-05T08:27:07.473" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:170,&quot;DisplayName&quot;:&quot;Coreggon&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;}]}" />
  <row Id="5802" PostHistoryTypeId="5" PostId="1568" RevisionGUID="74b4d27a-029f-4786-a5a7-752e43f766c0" CreationDate="2022-04-05T08:46:32.450" UserId="1867" Comment="added 189 characters in body" Text="A compressed public key can by represented by the `ECDSAPublicKey` struct from the `eth_compatibility` [crate](https://github.com/paritytech/ink/blob/master/crates/eth_compatibility) from ink.&#xD;&#xA;&#xD;&#xA;Try to create an `ECDSAPublicKey` struct from your uncompressed public key and then invoke the `to_default_account_id()` function from it which is defined [here](https://github.com/paritytech/ink/blob/master/crates/eth_compatibility/src/lib.rs#L140-L150).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Try the following:&#xD;&#xA;&#xD;&#xA;1. Add the `eth_compatibility` crate to your project&#xD;&#xA;2. Import `eth_compatibility::ECDSAPublicKey`&#xD;&#xA;3. Define an `ecdsa_key` from your `compressed_pub_key` with: `let ecdsa_key=ECDSAPublicKey::from(compressed_pub_key)`&#xD;&#xA;4. Derive an `account_id` of type `AccountId` with: `let account_id=ecdsa_key.to_default_account_id()` &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5803" PostHistoryTypeId="5" PostId="1568" RevisionGUID="e8460658-a4ee-421c-815e-c40e46c2bc24" CreationDate="2022-04-05T08:55:48.583" UserId="1867" Comment="added 2 characters in body" Text="A compressed public key can by represented by the `ECDSAPublicKey` struct from the `eth_compatibility` [crate](https://github.com/paritytech/ink/blob/master/crates/eth_compatibility) from ink.&#xD;&#xA;&#xD;&#xA;Try to create an `ECDSAPublicKey` struct from your uncompressed public key and then invoke the `to_default_account_id()` function from it which is defined [here](https://github.com/paritytech/ink/blob/master/crates/eth_compatibility/src/lib.rs#L140-L150).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Try the following:&#xD;&#xA;&#xD;&#xA;1. Add the `eth_compatibility` crate to your project&#xD;&#xA;2. Import `eth_compatibility::ECDSAPublicKey`&#xD;&#xA;3. Define an `ecdsa_key` from your `compressed_pub_key` with: `let ecdsa_key=ECDSAPublicKey::from(compressed_pub_key);`&#xD;&#xA;4. Derive an `account_id` of type `AccountId` with: `let account_id=ecdsa_key.to_default_account_id();` &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5811" PostHistoryTypeId="5" PostId="1568" RevisionGUID="009866f5-15db-4847-abe8-fa5aae90d008" CreationDate="2022-04-05T09:31:45.730" UserId="1867" Comment="edited body" Text="A compressed public key can be represented by the `ECDSAPublicKey` struct from the `eth_compatibility` [crate](https://github.com/paritytech/ink/blob/master/crates/eth_compatibility) from ink.&#xD;&#xA;&#xD;&#xA;Try to create an `ECDSAPublicKey` struct from your uncompressed public key and then invoke the `to_default_account_id()` function from it which is defined [here](https://github.com/paritytech/ink/blob/master/crates/eth_compatibility/src/lib.rs#L140-L150).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Try the following:&#xD;&#xA;&#xD;&#xA;1. Add the `eth_compatibility` crate to your project&#xD;&#xA;2. Import `eth_compatibility::ECDSAPublicKey`&#xD;&#xA;3. Define an `ecdsa_key` from your `compressed_pub_key` with: `let ecdsa_key=ECDSAPublicKey::from(compressed_pub_key);`&#xD;&#xA;4. Derive an `account_id` of type `AccountId` with: `let account_id=ecdsa_key.to_default_account_id();` &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5813" PostHistoryTypeId="2" PostId="1576" RevisionGUID="13601191-262a-4b82-b99e-83ad412f0e2a" CreationDate="2022-04-05T09:36:28.237" UserId="1989" Text="If I were to insert multiple (valid) author keys over RPC, how does a collator or validator choose which key to sign with when producing a block? As far as I know this cannot be set on start-up.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5815" PostHistoryTypeId="1" PostId="1576" RevisionGUID="13601191-262a-4b82-b99e-83ad412f0e2a" CreationDate="2022-04-05T09:36:28.237" UserId="1989" Text="How does a collator or validator choose their signing key?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5816" PostHistoryTypeId="3" PostId="1576" RevisionGUID="13601191-262a-4b82-b99e-83ad412f0e2a" CreationDate="2022-04-05T09:36:28.237" UserId="1989" Text="|grandpa|babe|collator|validator|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5818" PostHistoryTypeId="2" PostId="1577" RevisionGUID="bb83ff7b-0f4d-47c3-9a57-17c94228643e" CreationDate="2022-04-05T10:06:43.610" UserId="2132" Text="Nominators active in a specific era -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const VALIDATOR = &quot;1...&quot;&#xD;&#xA;const NOMINATORS = [&quot;1...&quot;, &quot;1...&quot;]&#xD;&#xA;&#xD;&#xA;const opt_era_info = await api.query.staking.activeEra()&#xD;&#xA;const val_exposure = await api.query.staking.erasStakers(&#xD;&#xA;  opt_era_info.unwrap().index,&#xD;&#xA;  VALIDATOR&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;console.log(&#xD;&#xA;  val_exposure.others&#xD;&#xA;    .filter(o =&gt;&#xD;&#xA;      NOMINATORS.some(n =&gt;&#xD;&#xA;        o.who.eq(n)&#xD;&#xA;      )&#xD;&#xA;    )&#xD;&#xA;    .map(n =&gt;&#xD;&#xA;      `${n.who.toString()} =&gt; ${n.value.toString()}`&#xD;&#xA;    )&#xD;&#xA;    .join(&quot;\n&quot;)&#xD;&#xA;&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Those inactive are the reverse, not in a specific era." ContentLicense="CC BY-SA 4.0" />
  <row Id="5821" PostHistoryTypeId="2" PostId="1578" RevisionGUID="7dd16bcb-8033-488d-9dd3-48f139c36473" CreationDate="2022-04-05T11:35:47.893" UserId="702" Text="The `decl_*` macros were deprecated in favour of the newer [procedural][1] macros, such as `[pallet::storage]`. &#xD;&#xA;&#xD;&#xA;The problem with old macros is that they invented new syntax, instead of allowing users to write idiomatic Rust code. This caused several problems, including difficulties in diagnosing syntax errors, and causing `rustfmt` to not work well.&#xD;&#xA;&#xD;&#xA;It is not recommended to use the `decl_*` macros anymore.&#xD;&#xA;&#xD;&#xA;A more detailed rationale is discussed here:&#xD;&#xA;https://github.com/paritytech/substrate/discussions/7788#discussioncomment-252559&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/reference/procedural-macros.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="5823" PostHistoryTypeId="5" PostId="1574" RevisionGUID="80396fea-5be6-4e4a-83c0-205fc8ea236b" CreationDate="2022-04-05T11:45:13.563" UserId="172" Comment="Clarified question." Text="I was running a Substrate node on my system but unknowingly I didn't stop the node by using 'CTRL+C' and closed the editor. After that I could see that on frontend, my node was running continuously even though it is was no longer running in the editor.&#xD;&#xA;&#xD;&#xA;So there might be a reason that it is still running in the backend of my system but I am not able to see it. So how to stop that node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5824" PostHistoryTypeId="4" PostId="1574" RevisionGUID="80396fea-5be6-4e4a-83c0-205fc8ea236b" CreationDate="2022-04-05T11:45:13.563" UserId="172" Comment="Clarified question." Text="How do I kill a running node once I close the terminal I launched it in?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5825" PostHistoryTypeId="2" PostId="1579" RevisionGUID="6923adbf-25bf-423a-8135-b95cc85aba14" CreationDate="2022-04-05T12:21:26.413" UserId="172" Text="[Declarative macros](https://doc.rust-lang.org/book/ch19-06-macros.html#declarative-macros-with-macro_rules-for-general-metaprogramming) (specifically, `macro_rules!`) are used in FRAME V1. Most of FRAME pallets written prior to January 2021 use these. FRAME V2 on the other hand, officially introduced in January 2021 uses [attribute macros](https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros) and today are what all FRAME pallets use. There still exists projects which use FRAME V1 however developers are encouraged to [upgrade their pallets](https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html#upgrade-guidelines). Although V2 is backwards compatible with V1, V1 is no longer being improved for new features. &#xD;&#xA;&#xD;&#xA;**The major improvements from V1 and V2 is that V2 provides a much better developer experience.**&#xD;&#xA;&#xD;&#xA;Main differences:&#xD;&#xA;* V1 is closer to writing DSL (domain-specific language) code, as in it requires runtime engineers to write more code to declare traits and types, because everything is custom to the macro requirements in the background. This also makes understanding compilation errors more difficult.&#xD;&#xA;* V2 is more heavily based on Rust idioms to define types and uses FRAME [system](https://docs.substrate.io/rustdocs/latest/frame_system/index.html) and [support](https://docs.substrate.io/rustdocs/latest/frame_system/index.html) crates to write code within the constraints of the macro being used. This means that if all macros were removed, the pallet would still compile as all macro inputs are correct Rust syntax, making it easier to understand where errors are coming from.&#xD;&#xA;&#xD;&#xA;You can read more about the FRAME V1 macros [here](https://hackmd.io/@fscJ0GEvRb2rqALLZB1kfA/SkSerkamt#FRAME-v1-Declarative-Macros).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5827" PostHistoryTypeId="4" PostId="1572" RevisionGUID="662caf6a-3493-4958-8003-a3be0364ce97" CreationDate="2022-04-05T12:24:26.897" UserId="172" Comment="Clarified question." Text="What are the differences between using declarative and attribute macros in FRAME?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5828" PostHistoryTypeId="6" PostId="1572" RevisionGUID="662caf6a-3493-4958-8003-a3be0364ce97" CreationDate="2022-04-05T12:24:26.897" UserId="172" Comment="Clarified question." Text="|pallet|substrate-node-template|frame|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5829" PostHistoryTypeId="6" PostId="1470" RevisionGUID="4c3e320d-37b1-4a17-bdfc-341f11bc6687" CreationDate="2022-04-05T12:29:06.013" UserId="172" Comment="Added SCALE tag." Text="|polkadot-js|rpc|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5830" PostHistoryTypeId="2" PostId="1580" RevisionGUID="d82ba566-a767-4edd-83cb-9c411acbe067" CreationDate="2022-04-05T12:32:25.463" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5832" PostHistoryTypeId="1" PostId="1580" RevisionGUID="d82ba566-a767-4edd-83cb-9c411acbe067" CreationDate="2022-04-05T12:32:25.463" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5833" PostHistoryTypeId="2" PostId="1581" RevisionGUID="d6bf82b5-3ea7-476d-baf8-c454724ce4a1" CreationDate="2022-04-05T12:32:25.463" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5835" PostHistoryTypeId="1" PostId="1581" RevisionGUID="d6bf82b5-3ea7-476d-baf8-c454724ce4a1" CreationDate="2022-04-05T12:32:25.463" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5836" PostHistoryTypeId="2" PostId="1582" RevisionGUID="e827d5eb-475e-42c2-bad8-e194586c3c8a" CreationDate="2022-04-05T12:37:56.797" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5838" PostHistoryTypeId="1" PostId="1582" RevisionGUID="e827d5eb-475e-42c2-bad8-e194586c3c8a" CreationDate="2022-04-05T12:37:56.797" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5839" PostHistoryTypeId="2" PostId="1583" RevisionGUID="6b49a6d7-0c55-4cd7-9ddc-65c964fbceb9" CreationDate="2022-04-05T12:37:56.797" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5841" PostHistoryTypeId="1" PostId="1583" RevisionGUID="6b49a6d7-0c55-4cd7-9ddc-65c964fbceb9" CreationDate="2022-04-05T12:37:56.797" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5842" PostHistoryTypeId="2" PostId="1584" RevisionGUID="a24d5b5b-e148-450c-bcaa-aa26233035b7" CreationDate="2022-04-05T12:42:19.903" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5844" PostHistoryTypeId="1" PostId="1584" RevisionGUID="a24d5b5b-e148-450c-bcaa-aa26233035b7" CreationDate="2022-04-05T12:42:19.903" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5845" PostHistoryTypeId="2" PostId="1585" RevisionGUID="ffb65f99-006d-482c-9027-4980f1b6ec60" CreationDate="2022-04-05T12:42:19.903" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5847" PostHistoryTypeId="1" PostId="1585" RevisionGUID="ffb65f99-006d-482c-9027-4980f1b6ec60" CreationDate="2022-04-05T12:42:19.903" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5848" PostHistoryTypeId="2" PostId="1586" RevisionGUID="785bcfa1-04c7-4d5d-9e2e-9684dbbf3062" CreationDate="2022-04-05T12:48:51.400" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5850" PostHistoryTypeId="1" PostId="1586" RevisionGUID="785bcfa1-04c7-4d5d-9e2e-9684dbbf3062" CreationDate="2022-04-05T12:48:51.400" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5851" PostHistoryTypeId="2" PostId="1587" RevisionGUID="7020ac18-e362-44d7-aea0-37150638839b" CreationDate="2022-04-05T12:48:51.400" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="5853" PostHistoryTypeId="1" PostId="1587" RevisionGUID="7020ac18-e362-44d7-aea0-37150638839b" CreationDate="2022-04-05T12:48:51.400" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="5854" PostHistoryTypeId="2" PostId="1588" RevisionGUID="2c488815-4642-4b38-aad4-0b4fd3c275dd" CreationDate="2022-04-05T12:51:53.900" UserId="16" Text="The next big thing for Parachains is [asynchronous backing](https://github.com/paritytech/polkadot/issues/3779). It will allow parachains to build blocks concurrently with the relay chain and hence bring back the block time from 12s to 6s.&#xD;&#xA;&#xD;&#xA;One other difference to a standalone chain is that parachains only allow for 0.5s of execution time (block weight) as opposed to 2s for a standalone chain. Will this limitation also be lifted by asynchronous backing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5856" PostHistoryTypeId="1" PostId="1588" RevisionGUID="2c488815-4642-4b38-aad4-0b4fd3c275dd" CreationDate="2022-04-05T12:51:53.900" UserId="16" Text="Will asynchronous backing increase the available block weight?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5857" PostHistoryTypeId="3" PostId="1588" RevisionGUID="2c488815-4642-4b38-aad4-0b4fd3c275dd" CreationDate="2022-04-05T12:51:53.900" UserId="16" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5858" PostHistoryTypeId="2" PostId="1589" RevisionGUID="0f673823-e316-4abb-aefa-dde2674ce471" CreationDate="2022-04-05T13:00:29.337" UserId="283" Text="It remains to be seen exactly by how much, but this is one of the main goals of asynchronous backing. By adding more pipelining to the parachains protocol, more execution time can be allocated to each block. The parachains protocol only reasons about resources in terms of execution time and PoV size per block, but increases in either should map closely to increases in Substrate weight." ContentLicense="CC BY-SA 4.0" />
  <row Id="5860" PostHistoryTypeId="2" PostId="1590" RevisionGUID="f4c9727b-b777-4439-a545-471c02404b03" CreationDate="2022-04-05T13:03:51.600" UserId="138" Text="This question is not specific to Substrate or Polkadot, but we are glad to help you. Pressing `Ctrl+C` in a terminal does the same as sending the `INT` signal to the running process. The simplest way to stop it is to run the following in another terminal and press `Y` on the processes you want to interrupt.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;killall -s INT -i polkadot&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5862" PostHistoryTypeId="2" PostId="1591" RevisionGUID="944d9d51-6470-49f2-aca6-ba47de57e16c" CreationDate="2022-04-05T13:17:26.813" UserId="2136" Text="I am new to both substrate and rust so trying to educate myself. I've the read documentation for both and am now going through the various tutorials and guides. I'm currently on the [Basic Storage Migration Guide][1] but trying to complete it using the #[pallet::storage] notation instead of decl_storage! which I understand is no longer considered best practise. The guide uses the Nicks pallet as an example, updating it form a single name to a first and last name. I'm trying to do the same.&#xD;&#xA;&#xD;&#xA;I've added a migration module with a deprecated pallet (haven't added the migration function yet but this will come later), crated a struct holding a BoundedVec for the first name and Option&lt;BoundedVec&gt; for the last name, updated the storage and updated the various functions to accordingly. I've derived Encode, Decode, MaxEncodedLen and TypeInfo for my struct  and am using T::MaxLength to define the length of the BoundedVecs:&#xD;&#xA;&#xD;&#xA;    // This file is part of Substrate.&#xD;&#xA;    &#xD;&#xA;    // Copyright (C) 2019-2022 Parity Technologies (UK) Ltd.&#xD;&#xA;    // SPDX-License-Identifier: Apache-2.0&#xD;&#xA;    &#xD;&#xA;    // Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#xD;&#xA;    // you may not use this file except in compliance with the License.&#xD;&#xA;    // You may obtain a copy of the License at&#xD;&#xA;    //&#xD;&#xA;    // 	http://www.apache.org/licenses/LICENSE-2.0&#xD;&#xA;    //&#xD;&#xA;    // Unless required by applicable law or agreed to in writing, software&#xD;&#xA;    // distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xD;&#xA;    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xD;&#xA;    // See the License for the specific language governing permissions and&#xD;&#xA;    // limitations under the License.&#xD;&#xA;    &#xD;&#xA;    //! # Nicks Pallet&#xD;&#xA;    //!&#xD;&#xA;    //! - [`Config`]&#xD;&#xA;    //! - [`Call`]&#xD;&#xA;    //!&#xD;&#xA;    //! ## Overview&#xD;&#xA;    //!&#xD;&#xA;    //! Nicks is an example pallet for keeping track of account names on-chain. It makes no effort to&#xD;&#xA;    //! create a name hierarchy, be a DNS replacement or provide reverse lookups. Furthermore, the&#xD;&#xA;    //! weights attached to this pallet's dispatchable functions are for demonstration purposes only and&#xD;&#xA;    //! have not been designed to be economically secure. Do not use this pallet as-is in production.&#xD;&#xA;    //!&#xD;&#xA;    //! ## Interface&#xD;&#xA;    //!&#xD;&#xA;    //! ### Dispatchable Functions&#xD;&#xA;    //!&#xD;&#xA;    //! * `set_name` - Set the associated name of an account; a small deposit is reserved if not already&#xD;&#xA;    //!   taken.&#xD;&#xA;    //! * `clear_name` - Remove an account's associated name; the deposit is returned.&#xD;&#xA;    //! * `kill_name` - Forcibly remove the associated name; the deposit is lost.&#xD;&#xA;    &#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    use frame_support::traits::{Currency, OnUnbalanced, ReservableCurrency};&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    use sp_runtime::traits::{StaticLookup, Zero};&#xD;&#xA;    use sp_std::prelude::*;&#xD;&#xA;    &#xD;&#xA;    type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;    type BalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Currency as Currency&lt;AccountIdOf&lt;T&gt;&gt;&gt;::Balance;&#xD;&#xA;    type NegativeImbalanceOf&lt;T&gt; =&#xD;&#xA;    	&lt;&lt;T as Config&gt;::Currency as Currency&lt;AccountIdOf&lt;T&gt;&gt;&gt;::NegativeImbalance;&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    	use super::*;&#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		/// The overarching event type.&#xD;&#xA;    		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The currency trait.&#xD;&#xA;    		type Currency: ReservableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// Reservation fee.&#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type ReservationFee: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// What to do with slashed funds.&#xD;&#xA;    		type Slashed: OnUnbalanced&lt;NegativeImbalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The origin which may forcibly set or remove a name. Root can always do this.&#xD;&#xA;    		type ForceOrigin: EnsureOrigin&lt;Self::Origin&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The minimum length a name may be.&#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type MinLength: Get&lt;u32&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The maximum length a name may be.&#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type MaxLength: Get&lt;u32&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// A name was set.&#xD;&#xA;    		NameSet { who: T::AccountId },&#xD;&#xA;    		/// A name was forcibly set.&#xD;&#xA;    		NameForced { target: T::AccountId },&#xD;&#xA;    		/// A name was changed.&#xD;&#xA;    		NameChanged { who: T::AccountId },&#xD;&#xA;    		/// A name was cleared, and the given balance returned.&#xD;&#xA;    		NameCleared { who: T::AccountId, deposit: BalanceOf&lt;T&gt; },&#xD;&#xA;    		/// A name was removed and the given balance slashed.&#xD;&#xA;    		NameKilled { target: T::AccountId, deposit: BalanceOf&lt;T&gt; },&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	/// Error for the nicks pallet.&#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// A name is too short.&#xD;&#xA;    		TooShort,&#xD;&#xA;    		/// A name is too long.&#xD;&#xA;    		TooLong,&#xD;&#xA;    		/// An account isn't named.&#xD;&#xA;    		Unnamed,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;    	pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;    		first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;    		last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	impl&lt;T: Config&gt; Nickname&lt;T&gt; {&#xD;&#xA;    		fn max_encoded_len() -&gt; usize {&#xD;&#xA;    			let maxLength = T::MaxLength::get() as usize;&#xD;&#xA;    			maxLength * 2&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	/// The lookup table for names.&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	pub(super) type NameOf&lt;T: Config&gt; =&#xD;&#xA;    		StorageMap&lt;_, Twox64Concat, T::AccountId, (Nickname&lt;T&gt;, BalanceOf&lt;T&gt;)&gt;;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		/// Set an account's name. The name should be a UTF-8-encoded string by convention, though&#xD;&#xA;    		/// we don't check it.&#xD;&#xA;    		///&#xD;&#xA;    		/// The name may not be more than `T::MaxLength` bytes, nor less than `T::MinLength` bytes.&#xD;&#xA;    		///&#xD;&#xA;    		/// If the account doesn't already have a name, then a fee of `ReservationFee` is reserved&#xD;&#xA;    		/// in the account.&#xD;&#xA;    		///&#xD;&#xA;    		/// The dispatch origin for this call must be _Signed_.&#xD;&#xA;    		///&#xD;&#xA;    		/// # &lt;weight&gt;&#xD;&#xA;    		/// - O(1).&#xD;&#xA;    		/// - At most one balance operation.&#xD;&#xA;    		/// - One storage read/write.&#xD;&#xA;    		/// - One event.&#xD;&#xA;    		/// # &lt;/weight&gt;&#xD;&#xA;    		&#xD;&#xA;    		#[pallet::weight(50_000_000)]&#xD;&#xA;    		pub fn set_name(origin: OriginFor&lt;T&gt;, first: Vec&lt;u8&gt;, last: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;    			let sender = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			let bounded_first: BoundedVec&lt;_, _&gt; =&#xD;&#xA;    				first.try_into().map_err(|()| Error::&lt;T&gt;::TooLong)?;&#xD;&#xA;    			ensure!(bounded_first.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;    			let bounded_last: BoundedVec&lt;_, _&gt; =&#xD;&#xA;    				last.try_into().map_err(|()| Error::&lt;T&gt;::TooLong)?;&#xD;&#xA;    			ensure!(bounded_last.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;    &#xD;&#xA;    			let bounded_last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt; = Some(bounded_last);&#xD;&#xA;    &#xD;&#xA;    			let deposit = if let Some((_, deposit)) = &lt;NameOf&lt;T&gt;&gt;::get(&amp;sender) {&#xD;&#xA;    				Self::deposit_event(Event::&lt;T&gt;::NameChanged { who: sender.clone() });&#xD;&#xA;    				deposit&#xD;&#xA;    			} else {&#xD;&#xA;    				let deposit = T::ReservationFee::get();&#xD;&#xA;    				T::Currency::reserve(&amp;sender, deposit.clone())?;&#xD;&#xA;    				Self::deposit_event(Event::&lt;T&gt;::NameSet { who: sender.clone() });&#xD;&#xA;    				deposit&#xD;&#xA;    			};&#xD;&#xA;    &#xD;&#xA;    			&lt;NameOf&lt;T&gt;&gt;::insert(&amp;sender, (Nickname{first: bounded_first, last: bounded_last}, deposit));&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		/// Clear an account's name and return the deposit. Fails if the account was not named.&#xD;&#xA;    		///&#xD;&#xA;    		/// The dispatch origin for this call must be _Signed_.&#xD;&#xA;    		///&#xD;&#xA;    		/// # &lt;weight&gt;&#xD;&#xA;    		/// - O(1).&#xD;&#xA;    		/// - One balance operation.&#xD;&#xA;    		/// - One storage read/write.&#xD;&#xA;    		/// - One event.&#xD;&#xA;    		/// # &lt;/weight&gt;&#xD;&#xA;    		#[pallet::weight(70_000_000)]&#xD;&#xA;    		pub fn clear_name(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;    			let sender = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			let deposit = &lt;NameOf&lt;T&gt;&gt;::take(&amp;sender).ok_or(Error::&lt;T&gt;::Unnamed)?.1;&#xD;&#xA;    &#xD;&#xA;    			let err_amount = T::Currency::unreserve(&amp;sender, deposit.clone());&#xD;&#xA;    			debug_assert!(err_amount.is_zero());&#xD;&#xA;    &#xD;&#xA;    			Self::deposit_event(Event::&lt;T&gt;::NameCleared { who: sender, deposit });&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		/// Remove an account's name and take charge of the deposit.&#xD;&#xA;    		///&#xD;&#xA;    		/// Fails if `target` has not been named. The deposit is dealt with through `T::Slashed`&#xD;&#xA;    		/// imbalance handler.&#xD;&#xA;    		///&#xD;&#xA;    		/// The dispatch origin for this call must match `T::ForceOrigin`.&#xD;&#xA;    		///&#xD;&#xA;    		/// # &lt;weight&gt;&#xD;&#xA;    		/// - O(1).&#xD;&#xA;    		/// - One unbalanced handler (probably a balance transfer)&#xD;&#xA;    		/// - One storage read/write.&#xD;&#xA;    		/// - One event.&#xD;&#xA;    		/// # &lt;/weight&gt;&#xD;&#xA;    		#[pallet::weight(70_000_000)]&#xD;&#xA;    		pub fn kill_name(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			T::ForceOrigin::ensure_origin(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Figure out who we're meant to be clearing.&#xD;&#xA;    			let target = T::Lookup::lookup(target)?;&#xD;&#xA;    			// Grab their deposit (and check that they have one).&#xD;&#xA;    			let deposit = &lt;NameOf&lt;T&gt;&gt;::take(&amp;target).ok_or(Error::&lt;T&gt;::Unnamed)?.1;&#xD;&#xA;    			// Slash their deposit from them.&#xD;&#xA;    			T::Slashed::on_unbalanced(T::Currency::slash_reserved(&amp;target, deposit.clone()).0);&#xD;&#xA;    &#xD;&#xA;    			Self::deposit_event(Event::&lt;T&gt;::NameKilled { target, deposit });&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		/// Set a third-party account's name with no deposit.&#xD;&#xA;    		///&#xD;&#xA;    		/// No length checking is done on the name.&#xD;&#xA;    		///&#xD;&#xA;    		/// The dispatch origin for this call must match `T::ForceOrigin`.&#xD;&#xA;    		///&#xD;&#xA;    		/// # &lt;weight&gt;&#xD;&#xA;    		/// - O(1).&#xD;&#xA;    		/// - At most one balance operation.&#xD;&#xA;    		/// - One storage read/write.&#xD;&#xA;    		/// - One event.&#xD;&#xA;    		/// # &lt;/weight&gt;&#xD;&#xA;    		#[pallet::weight(70_000_000)]&#xD;&#xA;    		pub fn force_name(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;    			first: Vec&lt;u8&gt;,&#xD;&#xA;    			last: Vec&lt;u8&gt;,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			T::ForceOrigin::ensure_origin(origin)?;&#xD;&#xA;    &#xD;&#xA;    			let bounded_first: BoundedVec&lt;_, _&gt; =&#xD;&#xA;    				first.try_into().map_err(|()| Error::&lt;T&gt;::TooLong)?;&#xD;&#xA;    			ensure!(bounded_first.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;    			let bounded_last: BoundedVec&lt;_, _&gt; =&#xD;&#xA;    				last.try_into().map_err(|()| Error::&lt;T&gt;::TooLong)?;&#xD;&#xA;    			ensure!(bounded_last.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;    &#xD;&#xA;    			let bounded_last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt; = Some(bounded_last);&#xD;&#xA;    &#xD;&#xA;    			let target = T::Lookup::lookup(target)?;&#xD;&#xA;    			let deposit = &lt;NameOf&lt;T&gt;&gt;::get(&amp;target).map(|x| x.1).unwrap_or_else(Zero::zero);&#xD;&#xA;    			&lt;NameOf&lt;T&gt;&gt;::insert(&amp;target, (Nickname{first: bounded_first, last: bounded_last}, deposit));&#xD;&#xA;    &#xD;&#xA;    			Self::deposit_event(Event::&lt;T&gt;::NameForced { target });&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	pub mod migration {&#xD;&#xA;    		use super::*;&#xD;&#xA;    &#xD;&#xA;    		#[frame_support::pallet]&#xD;&#xA;    		pub mod deprecated_pallet {&#xD;&#xA;    			use super::*;&#xD;&#xA;    &#xD;&#xA;    			#[pallet::config]&#xD;&#xA;    			pub trait Config: frame_system::Config + pallet::Config {&#xD;&#xA;    &#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			#[pallet::pallet]&#xD;&#xA;    			#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    			pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    			#[pallet::storage]&#xD;&#xA;    			pub(super) type NameOf&lt;T: Config&gt; =&#xD;&#xA;    				StorageMap&lt;_, Twox64Concat, T::AccountId, (BoundedVec&lt;u8, T::MaxLength&gt;, BalanceOf&lt;T&gt;)&gt;;&#xD;&#xA;    &#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;    	use super::*;&#xD;&#xA;    	use crate as pallet_nicks;&#xD;&#xA;    &#xD;&#xA;    	use frame_support::{&#xD;&#xA;    		assert_noop, assert_ok, ord_parameter_types, parameter_types,&#xD;&#xA;    		traits::{ConstU32, ConstU64},&#xD;&#xA;    	};&#xD;&#xA;    	use frame_system::EnsureSignedBy;&#xD;&#xA;    	use sp_core::H256;&#xD;&#xA;    	use sp_runtime::{&#xD;&#xA;    		testing::Header,&#xD;&#xA;    		traits::{BadOrigin, BlakeTwo256, IdentityLookup},&#xD;&#xA;    	};&#xD;&#xA;    &#xD;&#xA;    	type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic&lt;Test&gt;;&#xD;&#xA;    	type Block = frame_system::mocking::MockBlock&lt;Test&gt;;&#xD;&#xA;    &#xD;&#xA;    	frame_support::construct_runtime!(&#xD;&#xA;    		pub enum Test where&#xD;&#xA;    			Block = Block,&#xD;&#xA;    			NodeBlock = Block,&#xD;&#xA;    			UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;    		{&#xD;&#xA;    			System: frame_system,&#xD;&#xA;    			Balances: pallet_balances,&#xD;&#xA;    			Nicks: pallet_nicks,&#xD;&#xA;    		}&#xD;&#xA;    	);&#xD;&#xA;    &#xD;&#xA;    	parameter_types! {&#xD;&#xA;    		pub BlockWeights: frame_system::limits::BlockWeights =&#xD;&#xA;    			frame_system::limits::BlockWeights::simple_max(1024);&#xD;&#xA;    	}&#xD;&#xA;    	impl frame_system::Config for Test {&#xD;&#xA;    		type BaseCallFilter = frame_support::traits::Everything;&#xD;&#xA;    		type BlockWeights = ();&#xD;&#xA;    		type BlockLength = ();&#xD;&#xA;    		type DbWeight = ();&#xD;&#xA;    		type Origin = Origin;&#xD;&#xA;    		type Index = u64;&#xD;&#xA;    		type BlockNumber = u64;&#xD;&#xA;    		type Hash = H256;&#xD;&#xA;    		type Call = Call;&#xD;&#xA;    		type Hashing = BlakeTwo256;&#xD;&#xA;    		type AccountId = u64;&#xD;&#xA;    		type Lookup = IdentityLookup&lt;Self::AccountId&gt;;&#xD;&#xA;    		type Header = Header;&#xD;&#xA;    		type Event = Event;&#xD;&#xA;    		type BlockHashCount = ConstU64&lt;250&gt;;&#xD;&#xA;    		type Version = ();&#xD;&#xA;    		type PalletInfo = PalletInfo;&#xD;&#xA;    		type AccountData = pallet_balances::AccountData&lt;u64&gt;;&#xD;&#xA;    		type OnNewAccount = ();&#xD;&#xA;    		type OnKilledAccount = ();&#xD;&#xA;    		type SystemWeightInfo = ();&#xD;&#xA;    		type SS58Prefix = ();&#xD;&#xA;    		type OnSetCode = ();&#xD;&#xA;    		type MaxConsumers = ConstU32&lt;16&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	impl pallet_balances::Config for Test {&#xD;&#xA;    		type MaxLocks = ();&#xD;&#xA;    		type MaxReserves = ();&#xD;&#xA;    		type ReserveIdentifier = [u8; 8];&#xD;&#xA;    		type Balance = u64;&#xD;&#xA;    		type Event = Event;&#xD;&#xA;    		type DustRemoval = ();&#xD;&#xA;    		type ExistentialDeposit = ConstU64&lt;1&gt;;&#xD;&#xA;    		type AccountStore = System;&#xD;&#xA;    		type WeightInfo = ();&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	ord_parameter_types! {&#xD;&#xA;    		pub const One: u64 = 1;&#xD;&#xA;    	}&#xD;&#xA;    	impl Config for Test {&#xD;&#xA;    		type Event = Event;&#xD;&#xA;    		type Currency = Balances;&#xD;&#xA;    		type ReservationFee = ConstU64&lt;2&gt;;&#xD;&#xA;    		type Slashed = ();&#xD;&#xA;    		type ForceOrigin = EnsureSignedBy&lt;One, u64&gt;;&#xD;&#xA;    		type MinLength = ConstU32&lt;3&gt;;&#xD;&#xA;    		type MaxLength = ConstU32&lt;16&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;    		let mut t = frame_system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap();&#xD;&#xA;    		pallet_balances::GenesisConfig::&lt;Test&gt; { balances: vec![(1, 10), (2, 10)] }&#xD;&#xA;    			.assimilate_storage(&amp;mut t)&#xD;&#xA;    			.unwrap();&#xD;&#xA;    		t.into()&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[test]&#xD;&#xA;    	fn kill_name_should_work() {&#xD;&#xA;    		new_test_ext().execute_with(|| {&#xD;&#xA;    			assert_ok!(Nicks::set_name(Origin::signed(2), b&quot;Dave&quot;.to_vec()));&#xD;&#xA;    			assert_eq!(Balances::total_balance(&amp;2), 10);&#xD;&#xA;    			assert_ok!(Nicks::kill_name(Origin::signed(1), 2));&#xD;&#xA;    			assert_eq!(Balances::total_balance(&amp;2), 8);&#xD;&#xA;    			assert_eq!(&lt;NameOf&lt;Test&gt;&gt;::get(2), None);&#xD;&#xA;    		});&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[test]&#xD;&#xA;    	fn force_name_should_work() {&#xD;&#xA;    		new_test_ext().execute_with(|| {&#xD;&#xA;    			assert_noop!(&#xD;&#xA;    				Nicks::set_name(Origin::signed(2), b&quot;Dr. David Brubeck, III&quot;.to_vec()),&#xD;&#xA;    				Error::&lt;Test&gt;::TooLong,&#xD;&#xA;    			);&#xD;&#xA;    &#xD;&#xA;    			assert_ok!(Nicks::set_name(Origin::signed(2), b&quot;Dave&quot;.to_vec()));&#xD;&#xA;    			assert_eq!(Balances::reserved_balance(2), 2);&#xD;&#xA;    			assert_noop!(&#xD;&#xA;    				Nicks::force_name(Origin::signed(1), 2, b&quot;Dr. David Brubeck, III&quot;.to_vec()),&#xD;&#xA;    				Error::&lt;Test&gt;::TooLong,&#xD;&#xA;    			);&#xD;&#xA;    			assert_ok!(Nicks::force_name(Origin::signed(1), 2, b&quot;Dr. Brubeck, III&quot;.to_vec()));&#xD;&#xA;    			assert_eq!(Balances::reserved_balance(2), 2);&#xD;&#xA;    			let (name, amount) = &lt;NameOf&lt;Test&gt;&gt;::get(2).unwrap();&#xD;&#xA;    			assert_eq!(name, b&quot;Dr. Brubeck, III&quot;.to_vec());&#xD;&#xA;    			assert_eq!(amount, 2);&#xD;&#xA;    		});&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[test]&#xD;&#xA;    	fn normal_operation_should_work() {&#xD;&#xA;    		new_test_ext().execute_with(|| {&#xD;&#xA;    			assert_ok!(Nicks::set_name(Origin::signed(1), b&quot;Gav&quot;.to_vec()));&#xD;&#xA;    			assert_eq!(Balances::reserved_balance(1), 2);&#xD;&#xA;    			assert_eq!(Balances::free_balance(1), 8);&#xD;&#xA;    			assert_eq!(&lt;NameOf&lt;Test&gt;&gt;::get(1).unwrap().0, b&quot;Gav&quot;.to_vec());&#xD;&#xA;    &#xD;&#xA;    			assert_ok!(Nicks::set_name(Origin::signed(1), b&quot;Gavin&quot;.to_vec()));&#xD;&#xA;    			assert_eq!(Balances::reserved_balance(1), 2);&#xD;&#xA;    			assert_eq!(Balances::free_balance(1), 8);&#xD;&#xA;    			assert_eq!(&lt;NameOf&lt;Test&gt;&gt;::get(1).unwrap().0, b&quot;Gavin&quot;.to_vec());&#xD;&#xA;    &#xD;&#xA;    			assert_ok!(Nicks::clear_name(Origin::signed(1)));&#xD;&#xA;    			assert_eq!(Balances::reserved_balance(1), 0);&#xD;&#xA;    			assert_eq!(Balances::free_balance(1), 10);&#xD;&#xA;    		});&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[test]&#xD;&#xA;    	fn error_catching_should_work() {&#xD;&#xA;    		new_test_ext().execute_with(|| {&#xD;&#xA;    			assert_noop!(Nicks::clear_name(Origin::signed(1)), Error::&lt;Test&gt;::Unnamed);&#xD;&#xA;    &#xD;&#xA;    			assert_noop!(&#xD;&#xA;    				Nicks::set_name(Origin::signed(3), b&quot;Dave&quot;.to_vec()),&#xD;&#xA;    				pallet_balances::Error::&lt;Test, _&gt;::InsufficientBalance&#xD;&#xA;    			);&#xD;&#xA;    &#xD;&#xA;    			assert_noop!(&#xD;&#xA;    				Nicks::set_name(Origin::signed(1), b&quot;Ga&quot;.to_vec()),&#xD;&#xA;    				Error::&lt;Test&gt;::TooShort&#xD;&#xA;    			);&#xD;&#xA;    			assert_noop!(&#xD;&#xA;    				Nicks::set_name(Origin::signed(1), b&quot;Gavin James Wood, Esquire&quot;.to_vec()),&#xD;&#xA;    				Error::&lt;Test&gt;::TooLong&#xD;&#xA;    			);&#xD;&#xA;    			assert_ok!(Nicks::set_name(Origin::signed(1), b&quot;Dave&quot;.to_vec()));&#xD;&#xA;    			assert_noop!(Nicks::kill_name(Origin::signed(2), 1), BadOrigin);&#xD;&#xA;    			assert_noop!(Nicks::force_name(Origin::signed(2), 1, b&quot;Whatever&quot;.to_vec()), BadOrigin);&#xD;&#xA;    		});&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;When I try to compile this I get:&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `T: parity_scale_codec::MaxEncodedLen` is not satisfied    --&gt; pallets/nicks/src/lib.rs:128:12&#xD;&#xA;        | 128 |     #[pallet::pallet]&#xD;&#xA;        |               ^^^^^^ the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `T`&#xD;&#xA;        | note: required because of the requirements on the impl of `parity_scale_codec::MaxEncodedLen` for `Nickname&lt;T&gt;`    --&gt; pallets/nicks/src/lib.rs:110:27&#xD;&#xA;        | 110 |     #[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;        |                              ^^^^^^^^^^^^^ 111 |     pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;        |                ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;        = note: 1 redundant requirement hidden&#xD;&#xA;        = note: required because of the requirements on the impl of `parity_scale_codec::MaxEncodedLen` for `(Nickname&lt;T&gt;, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance)`&#xD;&#xA;        = note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageMap&lt;pallet::_GeneratedPrefixForStorageNameOf&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::AccountId, (Nickname&lt;T&gt;, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance)&gt;`&#xD;&#xA;        = note: this error originates in the derive macro `MaxEncodedLen` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting this bound&#xD;&#xA;        | 128 |     #[pallet::pallet + parity_scale_codec::MaxEncodedLen]&#xD;&#xA;        |                      +++++++++++++++++++++++++++++++++++&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `T: scale_info::TypeInfo` is not satisfied    --&gt; pallets/nicks/src/lib.rs:124:12&#xD;&#xA;        | 124 |     #[pallet::storage]&#xD;&#xA;        |               ^^^^^^^ the trait `scale_info::TypeInfo` is not implemented for `T`&#xD;&#xA;        | note: required because of the requirements on the impl of `scale_info::TypeInfo` for `Nickname&lt;T&gt;`    --&gt; pallets/nicks/src/lib.rs:110:42&#xD;&#xA;        | 110 |     #[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;        |                                             ^^^^^^^^ 111 |     pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;        |                ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;        = note: 1 redundant requirement hidden&#xD;&#xA;        = note: required because of the requirements on the impl of `scale_info::TypeInfo` for `(Nickname&lt;T&gt;, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance)`&#xD;&#xA;        = note: required because of the requirements on the impl of `StaticTypeInfo` for `(Nickname&lt;T&gt;, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance)`&#xD;&#xA;        = note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageMap&lt;pallet::_GeneratedPrefixForStorageNameOf&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::AccountId, (Nickname&lt;T&gt;, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance)&gt;`&#xD;&#xA;        = note: this error originates in the derive macro `TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider restricting type parameter `T`&#xD;&#xA;        | 51  | #[frame_support::pallet]: scale_info::TypeInfo&#xD;&#xA;        |                         ++++++++++++++++++++++&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0277`. error: could not compile `pallet-nicks` due to 2 previous errors warning: build failed, waiting for other jobs to finish... error: build failed&#xD;&#xA;&#xD;&#xA;I understand that it is telling me that T needs to implement MaxEncodedLen and TypeInfo but I can't figure out how to do it. I've tried many different permutatations from using Vec instead of BoundedVec to implementing the suggestions from the compiler, but whatever I do generates errors of one kind or another. So I've reached the point where it's time to ask for help!&#xD;&#xA;&#xD;&#xA;I'm sure this is a newbie question that somebody with more experience resolve in seconds.&#xD;&#xA;&#xD;&#xA;Thanks in advance for your help.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/how-to-guides/v3/storage-migrations/basics/" ContentLicense="CC BY-SA 4.0" />
  <row Id="5864" PostHistoryTypeId="1" PostId="1591" RevisionGUID="944d9d51-6470-49f2-aca6-ba47de57e16c" CreationDate="2022-04-05T13:17:26.813" UserId="2136" Text="Storage Migration Guide Using #[pallet::storage]" ContentLicense="CC BY-SA 4.0" />
  <row Id="5865" PostHistoryTypeId="3" PostId="1591" RevisionGUID="944d9d51-6470-49f2-aca6-ba47de57e16c" CreationDate="2022-04-05T13:17:26.813" UserId="2136" Text="|storage|runtime-upgrade|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5866" PostHistoryTypeId="2" PostId="1592" RevisionGUID="aa648dca-9af3-4b03-8eed-e1688dfa8733" CreationDate="2022-04-05T13:33:28.813" UserId="234" Text="I have multiple stash accounts with funds which I will bond/stake but I would like to handle them from one controller account. Is that possible ? If yes, is it safe / recommended ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5868" PostHistoryTypeId="1" PostId="1592" RevisionGUID="aa648dca-9af3-4b03-8eed-e1688dfa8733" CreationDate="2022-04-05T13:33:28.813" UserId="234" Text="Can I have one controller account from which I can handle/control the funds of multiple stash accounts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5869" PostHistoryTypeId="3" PostId="1592" RevisionGUID="aa648dca-9af3-4b03-8eed-e1688dfa8733" CreationDate="2022-04-05T13:33:28.813" UserId="234" Text="|account|stash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5870" PostHistoryTypeId="2" PostId="1593" RevisionGUID="d26598d7-9354-4772-a97b-8881e034b798" CreationDate="2022-04-05T13:40:17.867" UserId="234" Text="You cannot have one controller account to handle/control many stash accounts but you can use proxies to achieve that. Stash&lt;&gt;Controller is a strictly one-to-one relationship but proxies are many-to-many. So you can have N stashes with N controllers, and then set a single account as a [Staking proxy][1] for each controller.&#xD;&#xA;&#xD;&#xA;For context, stash/controller existed before the Proxy pallet did. The stash/controller relationship is almost like a specific use case of a specialized proxy, the concept was just generalized into the Proxy pallet. We did discuss removing the stash/controller concept entirely and just telling people to use proxies, but it's still around basically for legacy reasons.&#xD;&#xA;&#xD;&#xA;The use of proxies is encouraged and especially [proxies][2] of a specific type/role, eg. governance proxy or staking proxy (so other than the type “Any”). A reason that we encourage the use of proxies is that they add a layer of security and organization to your accounts and account funds as mentioned in our educational video [What are Proxies?][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-proxies#staking-proxies&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-proxies#proxy-types&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=EuaM5dWAJis" ContentLicense="CC BY-SA 4.0" />
  <row Id="5877" PostHistoryTypeId="2" PostId="1595" RevisionGUID="f09761f2-b472-4f32-81a1-cca2bd63145f" CreationDate="2022-04-05T13:53:46.177" UserId="73" Text="Yes it should increase the available block execution time. These 0.5s where chosen by me to fit into the 2 seconds we have to build, send and validate the block. We already currently see that we don't fit into these 2 seconds because networking is for example too slow. With asynchronous backing we should hopefully be able to lift all of these restrictions to allow bigger blocks :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5879" PostHistoryTypeId="2" PostId="1596" RevisionGUID="d7b6a3f9-00ed-4cda-b14e-31c4c4fa0604" CreationDate="2022-04-05T14:00:22.713" UserId="620" Text="This is what `session.set_keys` achieves, it declares that an on-chain account (presumably with keys in some form of cold storage) will sign blocks/consensus messages with some other key. When a node starts, it checks the chain state to see if any private keys in its keystore match the public keys that are registered on-chain. If it has the keys, then it will sign the corresponding messages with them." ContentLicense="CC BY-SA 4.0" />
  <row Id="5881" PostHistoryTypeId="2" PostId="1597" RevisionGUID="94a90fd0-dca6-4f82-830f-cd829040a44d" CreationDate="2022-04-05T14:18:31.843" UserId="100" Text="I was wondering if there is currently a way to know the consensus type for the node I am connected to. I would like to determine if there is some kind of manual consensus, like for example in the case of the [substrate-contracts-node][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node/pull/42" ContentLicense="CC BY-SA 4.0" />
  <row Id="5883" PostHistoryTypeId="1" PostId="1597" RevisionGUID="94a90fd0-dca6-4f82-830f-cd829040a44d" CreationDate="2022-04-05T14:18:31.843" UserId="100" Text="How can a Dapp know the consensus type of the node it's connected to?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5884" PostHistoryTypeId="3" PostId="1597" RevisionGUID="94a90fd0-dca6-4f82-830f-cd829040a44d" CreationDate="2022-04-05T14:18:31.843" UserId="100" Text="|substrate-node|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5885" PostHistoryTypeId="5" PostId="1597" RevisionGUID="98f73d12-db07-40bc-9094-a3ecadcecab5" CreationDate="2022-04-05T14:25:40.630" UserId="100" Comment="added 6 characters in body" Text="I was wondering if there is currently a way to know the consensus type for the node my Dapp is connected to. I would like to determine if there is some kind of manual consensus, like for example in the case of the [substrate-contracts-node][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node/pull/42" ContentLicense="CC BY-SA 4.0" />
  <row Id="5886" PostHistoryTypeId="2" PostId="1598" RevisionGUID="e69421bf-9f9a-4f27-bc9a-452302847029" CreationDate="2022-04-05T14:43:31.623" UserId="627" Text="Since the runtime gets exposed via metadata, you can check for the availability of the pallets and certain methods on them. These can be storage locations, constants, extrinsics, events, etc.&#xD;&#xA;&#xD;&#xA;For instance just using storage &amp; JS API (since that is what I'm familiar with) -&#xD;&#xA;&#xD;&#xA; - `api.query.authorship.author` - authorship pallet&#xD;&#xA; - `api.query.aura.authorities` - aura&#xD;&#xA; - `api.query.babe.authorities` - babe&#xD;&#xA; - `api.query.grandpa.pendingChange` - grandpa&#xD;&#xA;&#xD;&#xA;So basically something like -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;if (api.query.authorship?.author) {&#xD;&#xA;  // authorship pallet&#xD;&#xA;} else if (api.query.aura?.authorities) {&#xD;&#xA;  // aura pallet&#xD;&#xA;} else if (api.query.babe?.authorities) {&#xD;&#xA;  // babe&#xD;&#xA;} else if ... // anything else, even POW&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It only checks for existence of something specific in the runtime, but doesn't actually make calls in those checks." ContentLicense="CC BY-SA 4.0" />
  <row Id="5888" PostHistoryTypeId="5" PostId="1598" RevisionGUID="837ea442-f47e-4b8e-9b53-a8f7ac49ed19" CreationDate="2022-04-05T14:50:32.390" UserId="627" Comment="added 137 characters in body" Text="Since the runtime gets exposed via metadata, you can check for the availability of the pallets and certain methods on them. These can be storage locations, constants, extrinsics, events, etc.&#xD;&#xA;&#xD;&#xA;For instance just using storage &amp; JS API (since that is what I'm familiar with) -&#xD;&#xA;&#xD;&#xA; - `api.query.authorship.author` - authorship pallet&#xD;&#xA; - `api.query.aura.authorities` - aura&#xD;&#xA; - `api.query.babe.authorities` - babe&#xD;&#xA; - `api.query.difficulty.currentDifficulty` - Kulupu POW&#xD;&#xA; - `api.query.grandpa.pendingChange` - grandpa&#xD;&#xA;&#xD;&#xA;So basically something like -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;if (api.query.aura?.authorities) {&#xD;&#xA;  // aura pallet&#xD;&#xA;} else if (api.query.babe?.authorities) {&#xD;&#xA;  // babe&#xD;&#xA;} else if (api.query.authorship?.author) {&#xD;&#xA;  // authorship pallet&#xD;&#xA;  // can be used in conjunction with aura, see&#xD;&#xA;  // e.g. Statemine parachain&#xD;&#xA;} else if ... // anything else, even POW&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It only checks for existence of something specific in the runtime, but doesn't actually make calls in those checks." ContentLicense="CC BY-SA 4.0" />
  <row Id="5889" PostHistoryTypeId="2" PostId="1599" RevisionGUID="76b57c0e-c248-4983-9ff6-6cda4122c1b5" CreationDate="2022-04-05T15:00:10.243" UserId="165" Text="I have observed that not in every scenario the manager of the para is able to [deregister](https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/common/src/paras_registrar.rs#L257) the parathread.&#xD;&#xA;So I would like to gather here what are the scenarios where we can hit this, and their reasons." ContentLicense="CC BY-SA 4.0" />
  <row Id="5891" PostHistoryTypeId="1" PostId="1599" RevisionGUID="76b57c0e-c248-4983-9ff6-6cda4122c1b5" CreationDate="2022-04-05T15:00:10.243" UserId="165" Text="Deregistering my parathread using its manager account is not always possible" ContentLicense="CC BY-SA 4.0" />
  <row Id="5892" PostHistoryTypeId="3" PostId="1599" RevisionGUID="76b57c0e-c248-4983-9ff6-6cda4122c1b5" CreationDate="2022-04-05T15:00:10.243" UserId="165" Text="|parachain|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5893" PostHistoryTypeId="2" PostId="1600" RevisionGUID="ac1ce89d-5158-4975-b6f2-c596857328ab" CreationDate="2022-04-05T15:01:45.020" UserId="53" Text="I might be misunderstanding what the aims are for this query, but the specific consensus algorithm is an implementation detail that should probably not (need to) be exposed to Dapps. There are many factors that alter the transaction processing service which Dapps rely on and consensus algorithm is only one of them.&#xD;&#xA;&#xD;&#xA;Rather, they might want to query the guarantees given by the service which the blockchain provides.&#xD;&#xA;&#xD;&#xA;Specifically, the expected period from transaction submission to some minimal non-reversion guarantee (e.g. block inclusion) and some maximal non-reversion guarantee (e.g. &quot;finality&quot;). They might also want to query the strength of consensus (expressed in terms of cost of reversion) for either extreme. On Polkadot, they'd get something like 18 seconds with ~$5 cost of reversion (which is modelled as the opportunity cost for missing a block reward) and 30 seconds with $500m cost of reversion (which is modelled as the slash for 2/3 validators which would need to equivocate).&#xD;&#xA;&#xD;&#xA;This might be queried depending on tx fee paid (which in Ethereum's case, depending on the tx pool, would make a big difference to those periods) and it might be reasonable to query typical expectations (e.g. estimations of average and variability for the above periods)." ContentLicense="CC BY-SA 4.0" />
  <row Id="5900" PostHistoryTypeId="2" PostId="1602" RevisionGUID="1fdb0db2-cb3d-4e7a-a113-b2902d60c204" CreationDate="2022-04-05T15:45:53.740" UserId="1777" Text="What is the best way that we can intercept a transfer in pallet_balance ?&#xD;&#xA;&#xD;&#xA;EX: check user has identity in pallet_identity before transfer with pallet_balance" ContentLicense="CC BY-SA 4.0" />
  <row Id="5902" PostHistoryTypeId="1" PostId="1602" RevisionGUID="1fdb0db2-cb3d-4e7a-a113-b2902d60c204" CreationDate="2022-04-05T15:45:53.740" UserId="1777" Text="Intercept transaction in pallet_balance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5903" PostHistoryTypeId="3" PostId="1602" RevisionGUID="1fdb0db2-cb3d-4e7a-a113-b2902d60c204" CreationDate="2022-04-05T15:45:53.740" UserId="1777" Text="|balances|transactions|transfer|pallet-identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5904" PostHistoryTypeId="2" PostId="1603" RevisionGUID="c881e5ad-77ea-431f-8e9f-97bbdaa6f9be" CreationDate="2022-04-05T15:46:55.820" UserId="165" Text="There is one clear scenario where the account who registered the para will not be able to deregister it, which is if this para has been onboarded as a parachain.&#xD;&#xA;This one is clearly stated in the source of deregister itself, where it checks for the lifecycle of the para to be Parathread - [link to the code](https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/common/src/paras_registrar.rs#L539-L543)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5906" PostHistoryTypeId="5" PostId="1603" RevisionGUID="cc67bcf3-f6ac-4592-abc3-0cfb9f740b53" CreationDate="2022-04-05T15:54:41.393" UserId="165" Comment="added 652 characters in body" Text="There is one clear scenario where the account who registered the para will not be able to deregister it, which is if this para has been onboarded as a parachain.&#xD;&#xA;This one is clearly stated in the source of deregister itself, where it checks for the lifecycle of the para to be Parathread - [link to the code](https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/common/src/paras_registrar.rs#L539-L543).&#xD;&#xA;&#xD;&#xA;At the same time, when a parathread is onboarded as a parachain we can see a lock is applied.&#xD;&#xA;```rust&#xD;&#xA;// Upgrade a registered parathread into a parachain.&#xD;&#xA;	fn make_parachain(id: ParaId) -&gt; DispatchResult {&#xD;&#xA;		// -- snip --&#xD;&#xA;		// Once a para has upgraded to a parachain, it can no longer be managed by the owner.&#xD;&#xA;		// Intentionally, the flag stays with the para even after downgrade.&#xD;&#xA;		Self::apply_lock(id);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;[sorce](https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/common/src/paras_registrar.rs#L414-L416).&#xD;&#xA;This lock prevents the manager to deregister the parathread by its own." ContentLicense="CC BY-SA 4.0" />
  <row Id="5907" PostHistoryTypeId="5" PostId="1603" RevisionGUID="6be4ebad-fb9b-4849-bba4-e0457ba44daf" CreationDate="2022-04-05T16:01:30.173" UserId="165" Comment="added 652 characters in body" Text="There is one clear scenario where the account who registered the para will not be able to deregister it, which is if this para has been onboarded as a parachain.&#xD;&#xA;This one is clearly stated in the source of deregister itself, where it checks for the lifecycle of the para to be Parathread - [link to the code](https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/common/src/paras_registrar.rs#L539-L543).&#xD;&#xA;&#xD;&#xA;At the same time, when a parathread is onboarded as a parachain we can see a lock is applied.&#xD;&#xA;```rust&#xD;&#xA;// Upgrade a registered parathread into a parachain.&#xD;&#xA;	fn make_parachain(id: ParaId) -&gt; DispatchResult {&#xD;&#xA;		// -- snip --&#xD;&#xA;		// Once a para has upgraded to a parachain, it can no longer be managed by the owner.&#xD;&#xA;		// Intentionally, the flag stays with the para even after downgrade.&#xD;&#xA;		Self::apply_lock(id);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;[sorce](https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/common/src/paras_registrar.rs#L414-L416).&#xD;&#xA;This lock prevents the manager to deregister the parathread by its own.&#xD;&#xA;&#xD;&#xA;We can find another lock being applied when creating a crowdloan campaing. The paraId involved in the crowdloan will be locked, and so under the same restrictions for the manager of such para. We can find the code where the lock is applied this time [here](https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/common/src/crowdloan/mod.rs#L438).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Create a new crowdloaning campaign for a parachain slot with the given lease period range.&#xD;&#xA;///&#xD;&#xA;/// This applies a lock to your parachain configuration, ensuring that it cannot be changed&#xD;&#xA;/// by the parachain manager.&#xD;&#xA;		#[pallet::weight(T::WeightInfo::create())]&#xD;&#xA;		pub fn create(&#xD;&#xA;            // -- snip --&#xD;&#xA;&#xD;&#xA;            // Add a lock to the para so that the configuration cannot be changed.&#xD;&#xA;			T::Registrar::apply_lock(index);&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::&lt;T&gt;::Created(index));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5909" PostHistoryTypeId="2" PostId="1604" RevisionGUID="5aa85693-d5d2-490f-a24f-dd1e629716ae" CreationDate="2022-04-05T16:50:28.763" UserId="1731" Text="I would start with this guide https://wiki.polkadot.network/docs/maintain-guides-how-to-monitor-your-node&#xD;&#xA;&#xD;&#xA;Substrate nodes have builtin Prometheus exporter. Blockchain node usually runs without any interruptions for years or so, unless there's a need to update binary.&#xD;&#xA;&#xD;&#xA; - For collator nodes I would pay attention for block time and block&#xD;&#xA;   authorship&#xD;&#xA;-  For RPC nodes Its better to monitor WS connections, WS&#xD;&#xA;   flags, consistency of file system. Most of these metrics are already&#xD;&#xA;   implemented into Prometheus node exporter&#xD;&#xA;   https://github.com/prometheus/node_exporter&#xD;&#xA;&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="5911" PostHistoryTypeId="2" PostId="1605" RevisionGUID="5faeb882-5354-4696-87a1-002fa578f1d7" CreationDate="2022-04-05T17:17:01.027" UserId="28" Text="In the end, this behavior is a bit annoying, but follows the principles of decentralized networks.&#xD;&#xA;&#xD;&#xA;The &quot;parachain lock&quot; is used to identify when a parachain elevates from something &quot;owned&quot; by a user to something that itself is a decentralized entity.&#xD;&#xA;&#xD;&#xA;For example, when doing registration, there is a registration owner, and someone who can manage that paracahin. But once it is open to a crowdloan, then you have potentially millions of users backing a project with their own capital, and the project no longer is owned by just one person, but actually all the crowdloan contributors.&#xD;&#xA;&#xD;&#xA;Additionally, once a parachain creates a block, then it becomes something that is again, a decentralized network, and not something that should just be owned or managed by a central actor.&#xD;&#xA;&#xD;&#xA;This is why you have to go to governance. Why should any one person be able to shut down or delete a decentralized parachain (once it is live)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5913" PostHistoryTypeId="2" PostId="1606" RevisionGUID="530f5f2b-d2dc-4aae-92e7-cce43dfe353d" CreationDate="2022-04-05T17:18:03.197" UserId="1956" Text="I'd like to create an account that is only usable through the root origin like the treasury account. It should be possible to transfer funds to it, but sending from it should only be possible through the logic of the pallet that I'm developing. &#xD;&#xA;&#xD;&#xA;I could just instanciate the treasury pallet, but I would like to dynamically create them on user request.&#xD;&#xA;&#xD;&#xA;How would I do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5915" PostHistoryTypeId="1" PostId="1606" RevisionGUID="530f5f2b-d2dc-4aae-92e7-cce43dfe353d" CreationDate="2022-04-05T17:18:03.197" UserId="1956" Text="How to create an escrow account without runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="5916" PostHistoryTypeId="3" PostId="1606" RevisionGUID="530f5f2b-d2dc-4aae-92e7-cce43dfe353d" CreationDate="2022-04-05T17:18:03.197" UserId="1956" Text="|frame|account|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5917" PostHistoryTypeId="2" PostId="1607" RevisionGUID="b4051ae8-e63b-4a68-b616-b8d09eb8011e" CreationDate="2022-04-05T17:19:14.470" UserId="28" Text="You must create a &quot;wrapper&quot; pallet which will wrap the Balances pallet and expose the APIs you want with the checks you want.&#xD;&#xA;&#xD;&#xA;An idea like this was written about here: https://www.shawntabrizi.com/substrate/extending-substrate-runtime-modules/&#xD;&#xA;&#xD;&#xA;Note it is very old and uses very old syntax, but the ideas are still relevant.&#xD;&#xA;&#xD;&#xA;Basically after wrapping your pallet around the Balances pallet, you want to configure your runtime so that the Balances pallet is not callable, and then users can only call APIs through your wrapper pallet with the checks you expect." ContentLicense="CC BY-SA 4.0" />
  <row Id="5919" PostHistoryTypeId="2" PostId="1608" RevisionGUID="fec86c75-4195-4b66-8e37-b473049979f6" CreationDate="2022-04-05T17:34:41.117" UserId="620" Text="If you are willing to use Root origin then you can use any account. Assuming you are using 32 byte account IDs, you can just hash something to get an otherwise inaccessible account. Then do a Root dispatch of `balances.force_transfer`.&#xD;&#xA;&#xD;&#xA;I actually did this before on Kusama: https://kusama.polkassembly.io/motion/394&#xD;&#xA;&#xD;&#xA;Namely:&#xD;&#xA;```&#xD;&#xA;hash(“xcm_exploit_karura_extrinsic_735603-2”) = 0x407d09daacfb6586a4fa1b3083e5c2002275d9ebbd67f2c0a2c6f2701ec43376&#xD;&#xA;```&#xD;&#xA;Which as a 32-byte `AccountId` = `E2sj6XZ4GxzMon1QNycjrQaQsKRaY3zb2jRKREiPRmX1sfQ`" ContentLicense="CC BY-SA 4.0" />
  <row Id="5921" PostHistoryTypeId="5" PostId="1591" RevisionGUID="ddeedb9b-6b6a-42bc-89d8-d7ec94b58804" CreationDate="2022-04-05T17:42:22.240" UserId="85" Comment="```lang-rust" Text="I am new to both substrate and rust so trying to educate myself. I've the read documentation for both and am now going through the various tutorials and guides. I'm currently on the [Basic Storage Migration Guide][1] but trying to complete it using the #[pallet::storage] notation instead of decl_storage! which I understand is no longer considered best practise. The guide uses the Nicks pallet as an example, updating it form a single name to a first and last name. I'm trying to do the same.&#xD;&#xA;&#xD;&#xA;I've added a migration module with a deprecated pallet (haven't added the migration function yet but this will come later), crated a struct holding a BoundedVec for the first name and Option&lt;BoundedVec&gt; for the last name, updated the storage and updated the various functions to accordingly. I've derived Encode, Decode, MaxEncodedLen and TypeInfo for my struct  and am using T::MaxLength to define the length of the BoundedVecs:&#xD;&#xA;```lang-rust&#xD;&#xA;    // This file is part of Substrate.&#xD;&#xA;    &#xD;&#xA;    // Copyright (C) 2019-2022 Parity Technologies (UK) Ltd.&#xD;&#xA;    // SPDX-License-Identifier: Apache-2.0&#xD;&#xA;    &#xD;&#xA;    // Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#xD;&#xA;    // you may not use this file except in compliance with the License.&#xD;&#xA;    // You may obtain a copy of the License at&#xD;&#xA;    //&#xD;&#xA;    // 	http://www.apache.org/licenses/LICENSE-2.0&#xD;&#xA;    //&#xD;&#xA;    // Unless required by applicable law or agreed to in writing, software&#xD;&#xA;    // distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xD;&#xA;    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xD;&#xA;    // See the License for the specific language governing permissions and&#xD;&#xA;    // limitations under the License.&#xD;&#xA;    &#xD;&#xA;    //! # Nicks Pallet&#xD;&#xA;    //!&#xD;&#xA;    //! - [`Config`]&#xD;&#xA;    //! - [`Call`]&#xD;&#xA;    //!&#xD;&#xA;    //! ## Overview&#xD;&#xA;    //!&#xD;&#xA;    //! Nicks is an example pallet for keeping track of account names on-chain. It makes no effort to&#xD;&#xA;    //! create a name hierarchy, be a DNS replacement or provide reverse lookups. Furthermore, the&#xD;&#xA;    //! weights attached to this pallet's dispatchable functions are for demonstration purposes only and&#xD;&#xA;    //! have not been designed to be economically secure. Do not use this pallet as-is in production.&#xD;&#xA;    //!&#xD;&#xA;    //! ## Interface&#xD;&#xA;    //!&#xD;&#xA;    //! ### Dispatchable Functions&#xD;&#xA;    //!&#xD;&#xA;    //! * `set_name` - Set the associated name of an account; a small deposit is reserved if not already&#xD;&#xA;    //!   taken.&#xD;&#xA;    //! * `clear_name` - Remove an account's associated name; the deposit is returned.&#xD;&#xA;    //! * `kill_name` - Forcibly remove the associated name; the deposit is lost.&#xD;&#xA;    &#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    use frame_support::traits::{Currency, OnUnbalanced, ReservableCurrency};&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    use sp_runtime::traits::{StaticLookup, Zero};&#xD;&#xA;    use sp_std::prelude::*;&#xD;&#xA;    &#xD;&#xA;    type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;    type BalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Currency as Currency&lt;AccountIdOf&lt;T&gt;&gt;&gt;::Balance;&#xD;&#xA;    type NegativeImbalanceOf&lt;T&gt; =&#xD;&#xA;    	&lt;&lt;T as Config&gt;::Currency as Currency&lt;AccountIdOf&lt;T&gt;&gt;&gt;::NegativeImbalance;&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    	use super::*;&#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		/// The overarching event type.&#xD;&#xA;    		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The currency trait.&#xD;&#xA;    		type Currency: ReservableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// Reservation fee.&#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type ReservationFee: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// What to do with slashed funds.&#xD;&#xA;    		type Slashed: OnUnbalanced&lt;NegativeImbalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The origin which may forcibly set or remove a name. Root can always do this.&#xD;&#xA;    		type ForceOrigin: EnsureOrigin&lt;Self::Origin&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The minimum length a name may be.&#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type MinLength: Get&lt;u32&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The maximum length a name may be.&#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type MaxLength: Get&lt;u32&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// A name was set.&#xD;&#xA;    		NameSet { who: T::AccountId },&#xD;&#xA;    		/// A name was forcibly set.&#xD;&#xA;    		NameForced { target: T::AccountId },&#xD;&#xA;    		/// A name was changed.&#xD;&#xA;    		NameChanged { who: T::AccountId },&#xD;&#xA;    		/// A name was cleared, and the given balance returned.&#xD;&#xA;    		NameCleared { who: T::AccountId, deposit: BalanceOf&lt;T&gt; },&#xD;&#xA;    		/// A name was removed and the given balance slashed.&#xD;&#xA;    		NameKilled { target: T::AccountId, deposit: BalanceOf&lt;T&gt; },&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	/// Error for the nicks pallet.&#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// A name is too short.&#xD;&#xA;    		TooShort,&#xD;&#xA;    		/// A name is too long.&#xD;&#xA;    		TooLong,&#xD;&#xA;    		/// An account isn't named.&#xD;&#xA;    		Unnamed,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;    	pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;    		first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;    		last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	impl&lt;T: Config&gt; Nickname&lt;T&gt; {&#xD;&#xA;    		fn max_encoded_len() -&gt; usize {&#xD;&#xA;    			let maxLength = T::MaxLength::get() as usize;&#xD;&#xA;    			maxLength * 2&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	/// The lookup table for names.&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	pub(super) type NameOf&lt;T: Config&gt; =&#xD;&#xA;    		StorageMap&lt;_, Twox64Concat, T::AccountId, (Nickname&lt;T&gt;, BalanceOf&lt;T&gt;)&gt;;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		/// Set an account's name. The name should be a UTF-8-encoded string by convention, though&#xD;&#xA;    		/// we don't check it.&#xD;&#xA;    		///&#xD;&#xA;    		/// The name may not be more than `T::MaxLength` bytes, nor less than `T::MinLength` bytes.&#xD;&#xA;    		///&#xD;&#xA;    		/// If the account doesn't already have a name, then a fee of `ReservationFee` is reserved&#xD;&#xA;    		/// in the account.&#xD;&#xA;    		///&#xD;&#xA;    		/// The dispatch origin for this call must be _Signed_.&#xD;&#xA;    		///&#xD;&#xA;    		/// # &lt;weight&gt;&#xD;&#xA;    		/// - O(1).&#xD;&#xA;    		/// - At most one balance operation.&#xD;&#xA;    		/// - One storage read/write.&#xD;&#xA;    		/// - One event.&#xD;&#xA;    		/// # &lt;/weight&gt;&#xD;&#xA;    		&#xD;&#xA;    		#[pallet::weight(50_000_000)]&#xD;&#xA;    		pub fn set_name(origin: OriginFor&lt;T&gt;, first: Vec&lt;u8&gt;, last: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;    			let sender = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			let bounded_first: BoundedVec&lt;_, _&gt; =&#xD;&#xA;    				first.try_into().map_err(|()| Error::&lt;T&gt;::TooLong)?;&#xD;&#xA;    			ensure!(bounded_first.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;    			let bounded_last: BoundedVec&lt;_, _&gt; =&#xD;&#xA;    				last.try_into().map_err(|()| Error::&lt;T&gt;::TooLong)?;&#xD;&#xA;    			ensure!(bounded_last.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;    &#xD;&#xA;    			let bounded_last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt; = Some(bounded_last);&#xD;&#xA;    &#xD;&#xA;    			let deposit = if let Some((_, deposit)) = &lt;NameOf&lt;T&gt;&gt;::get(&amp;sender) {&#xD;&#xA;    				Self::deposit_event(Event::&lt;T&gt;::NameChanged { who: sender.clone() });&#xD;&#xA;    				deposit&#xD;&#xA;    			} else {&#xD;&#xA;    				let deposit = T::ReservationFee::get();&#xD;&#xA;    				T::Currency::reserve(&amp;sender, deposit.clone())?;&#xD;&#xA;    				Self::deposit_event(Event::&lt;T&gt;::NameSet { who: sender.clone() });&#xD;&#xA;    				deposit&#xD;&#xA;    			};&#xD;&#xA;    &#xD;&#xA;    			&lt;NameOf&lt;T&gt;&gt;::insert(&amp;sender, (Nickname{first: bounded_first, last: bounded_last}, deposit));&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		/// Clear an account's name and return the deposit. Fails if the account was not named.&#xD;&#xA;    		///&#xD;&#xA;    		/// The dispatch origin for this call must be _Signed_.&#xD;&#xA;    		///&#xD;&#xA;    		/// # &lt;weight&gt;&#xD;&#xA;    		/// - O(1).&#xD;&#xA;    		/// - One balance operation.&#xD;&#xA;    		/// - One storage read/write.&#xD;&#xA;    		/// - One event.&#xD;&#xA;    		/// # &lt;/weight&gt;&#xD;&#xA;    		#[pallet::weight(70_000_000)]&#xD;&#xA;    		pub fn clear_name(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;    			let sender = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			let deposit = &lt;NameOf&lt;T&gt;&gt;::take(&amp;sender).ok_or(Error::&lt;T&gt;::Unnamed)?.1;&#xD;&#xA;    &#xD;&#xA;    			let err_amount = T::Currency::unreserve(&amp;sender, deposit.clone());&#xD;&#xA;    			debug_assert!(err_amount.is_zero());&#xD;&#xA;    &#xD;&#xA;    			Self::deposit_event(Event::&lt;T&gt;::NameCleared { who: sender, deposit });&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		/// Remove an account's name and take charge of the deposit.&#xD;&#xA;    		///&#xD;&#xA;    		/// Fails if `target` has not been named. The deposit is dealt with through `T::Slashed`&#xD;&#xA;    		/// imbalance handler.&#xD;&#xA;    		///&#xD;&#xA;    		/// The dispatch origin for this call must match `T::ForceOrigin`.&#xD;&#xA;    		///&#xD;&#xA;    		/// # &lt;weight&gt;&#xD;&#xA;    		/// - O(1).&#xD;&#xA;    		/// - One unbalanced handler (probably a balance transfer)&#xD;&#xA;    		/// - One storage read/write.&#xD;&#xA;    		/// - One event.&#xD;&#xA;    		/// # &lt;/weight&gt;&#xD;&#xA;    		#[pallet::weight(70_000_000)]&#xD;&#xA;    		pub fn kill_name(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			T::ForceOrigin::ensure_origin(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Figure out who we're meant to be clearing.&#xD;&#xA;    			let target = T::Lookup::lookup(target)?;&#xD;&#xA;    			// Grab their deposit (and check that they have one).&#xD;&#xA;    			let deposit = &lt;NameOf&lt;T&gt;&gt;::take(&amp;target).ok_or(Error::&lt;T&gt;::Unnamed)?.1;&#xD;&#xA;    			// Slash their deposit from them.&#xD;&#xA;    			T::Slashed::on_unbalanced(T::Currency::slash_reserved(&amp;target, deposit.clone()).0);&#xD;&#xA;    &#xD;&#xA;    			Self::deposit_event(Event::&lt;T&gt;::NameKilled { target, deposit });&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		/// Set a third-party account's name with no deposit.&#xD;&#xA;    		///&#xD;&#xA;    		/// No length checking is done on the name.&#xD;&#xA;    		///&#xD;&#xA;    		/// The dispatch origin for this call must match `T::ForceOrigin`.&#xD;&#xA;    		///&#xD;&#xA;    		/// # &lt;weight&gt;&#xD;&#xA;    		/// - O(1).&#xD;&#xA;    		/// - At most one balance operation.&#xD;&#xA;    		/// - One storage read/write.&#xD;&#xA;    		/// - One event.&#xD;&#xA;    		/// # &lt;/weight&gt;&#xD;&#xA;    		#[pallet::weight(70_000_000)]&#xD;&#xA;    		pub fn force_name(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			target: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;    			first: Vec&lt;u8&gt;,&#xD;&#xA;    			last: Vec&lt;u8&gt;,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			T::ForceOrigin::ensure_origin(origin)?;&#xD;&#xA;    &#xD;&#xA;    			let bounded_first: BoundedVec&lt;_, _&gt; =&#xD;&#xA;    				first.try_into().map_err(|()| Error::&lt;T&gt;::TooLong)?;&#xD;&#xA;    			ensure!(bounded_first.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;    			let bounded_last: BoundedVec&lt;_, _&gt; =&#xD;&#xA;    				last.try_into().map_err(|()| Error::&lt;T&gt;::TooLong)?;&#xD;&#xA;    			ensure!(bounded_last.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;    &#xD;&#xA;    			let bounded_last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt; = Some(bounded_last);&#xD;&#xA;    &#xD;&#xA;    			let target = T::Lookup::lookup(target)?;&#xD;&#xA;    			let deposit = &lt;NameOf&lt;T&gt;&gt;::get(&amp;target).map(|x| x.1).unwrap_or_else(Zero::zero);&#xD;&#xA;    			&lt;NameOf&lt;T&gt;&gt;::insert(&amp;target, (Nickname{first: bounded_first, last: bounded_last}, deposit));&#xD;&#xA;    &#xD;&#xA;    			Self::deposit_event(Event::&lt;T&gt;::NameForced { target });&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    		&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	pub mod migration {&#xD;&#xA;    		use super::*;&#xD;&#xA;    &#xD;&#xA;    		#[frame_support::pallet]&#xD;&#xA;    		pub mod deprecated_pallet {&#xD;&#xA;    			use super::*;&#xD;&#xA;    &#xD;&#xA;    			#[pallet::config]&#xD;&#xA;    			pub trait Config: frame_system::Config + pallet::Config {&#xD;&#xA;    &#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			#[pallet::pallet]&#xD;&#xA;    			#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    			pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    			#[pallet::storage]&#xD;&#xA;    			pub(super) type NameOf&lt;T: Config&gt; =&#xD;&#xA;    				StorageMap&lt;_, Twox64Concat, T::AccountId, (BoundedVec&lt;u8, T::MaxLength&gt;, BalanceOf&lt;T&gt;)&gt;;&#xD;&#xA;    &#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;    	use super::*;&#xD;&#xA;    	use crate as pallet_nicks;&#xD;&#xA;    &#xD;&#xA;    	use frame_support::{&#xD;&#xA;    		assert_noop, assert_ok, ord_parameter_types, parameter_types,&#xD;&#xA;    		traits::{ConstU32, ConstU64},&#xD;&#xA;    	};&#xD;&#xA;    	use frame_system::EnsureSignedBy;&#xD;&#xA;    	use sp_core::H256;&#xD;&#xA;    	use sp_runtime::{&#xD;&#xA;    		testing::Header,&#xD;&#xA;    		traits::{BadOrigin, BlakeTwo256, IdentityLookup},&#xD;&#xA;    	};&#xD;&#xA;    &#xD;&#xA;    	type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic&lt;Test&gt;;&#xD;&#xA;    	type Block = frame_system::mocking::MockBlock&lt;Test&gt;;&#xD;&#xA;    &#xD;&#xA;    	frame_support::construct_runtime!(&#xD;&#xA;    		pub enum Test where&#xD;&#xA;    			Block = Block,&#xD;&#xA;    			NodeBlock = Block,&#xD;&#xA;    			UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;    		{&#xD;&#xA;    			System: frame_system,&#xD;&#xA;    			Balances: pallet_balances,&#xD;&#xA;    			Nicks: pallet_nicks,&#xD;&#xA;    		}&#xD;&#xA;    	);&#xD;&#xA;    &#xD;&#xA;    	parameter_types! {&#xD;&#xA;    		pub BlockWeights: frame_system::limits::BlockWeights =&#xD;&#xA;    			frame_system::limits::BlockWeights::simple_max(1024);&#xD;&#xA;    	}&#xD;&#xA;    	impl frame_system::Config for Test {&#xD;&#xA;    		type BaseCallFilter = frame_support::traits::Everything;&#xD;&#xA;    		type BlockWeights = ();&#xD;&#xA;    		type BlockLength = ();&#xD;&#xA;    		type DbWeight = ();&#xD;&#xA;    		type Origin = Origin;&#xD;&#xA;    		type Index = u64;&#xD;&#xA;    		type BlockNumber = u64;&#xD;&#xA;    		type Hash = H256;&#xD;&#xA;    		type Call = Call;&#xD;&#xA;    		type Hashing = BlakeTwo256;&#xD;&#xA;    		type AccountId = u64;&#xD;&#xA;    		type Lookup = IdentityLookup&lt;Self::AccountId&gt;;&#xD;&#xA;    		type Header = Header;&#xD;&#xA;    		type Event = Event;&#xD;&#xA;    		type BlockHashCount = ConstU64&lt;250&gt;;&#xD;&#xA;    		type Version = ();&#xD;&#xA;    		type PalletInfo = PalletInfo;&#xD;&#xA;    		type AccountData = pallet_balances::AccountData&lt;u64&gt;;&#xD;&#xA;    		type OnNewAccount = ();&#xD;&#xA;    		type OnKilledAccount = ();&#xD;&#xA;    		type SystemWeightInfo = ();&#xD;&#xA;    		type SS58Prefix = ();&#xD;&#xA;    		type OnSetCode = ();&#xD;&#xA;    		type MaxConsumers = ConstU32&lt;16&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	impl pallet_balances::Config for Test {&#xD;&#xA;    		type MaxLocks = ();&#xD;&#xA;    		type MaxReserves = ();&#xD;&#xA;    		type ReserveIdentifier = [u8; 8];&#xD;&#xA;    		type Balance = u64;&#xD;&#xA;    		type Event = Event;&#xD;&#xA;    		type DustRemoval = ();&#xD;&#xA;    		type ExistentialDeposit = ConstU64&lt;1&gt;;&#xD;&#xA;    		type AccountStore = System;&#xD;&#xA;    		type WeightInfo = ();&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	ord_parameter_types! {&#xD;&#xA;    		pub const One: u64 = 1;&#xD;&#xA;    	}&#xD;&#xA;    	impl Config for Test {&#xD;&#xA;    		type Event = Event;&#xD;&#xA;    		type Currency = Balances;&#xD;&#xA;    		type ReservationFee = ConstU64&lt;2&gt;;&#xD;&#xA;    		type Slashed = ();&#xD;&#xA;    		type ForceOrigin = EnsureSignedBy&lt;One, u64&gt;;&#xD;&#xA;    		type MinLength = ConstU32&lt;3&gt;;&#xD;&#xA;    		type MaxLength = ConstU32&lt;16&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;    		let mut t = frame_system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap();&#xD;&#xA;    		pallet_balances::GenesisConfig::&lt;Test&gt; { balances: vec![(1, 10), (2, 10)] }&#xD;&#xA;    			.assimilate_storage(&amp;mut t)&#xD;&#xA;    			.unwrap();&#xD;&#xA;    		t.into()&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[test]&#xD;&#xA;    	fn kill_name_should_work() {&#xD;&#xA;    		new_test_ext().execute_with(|| {&#xD;&#xA;    			assert_ok!(Nicks::set_name(Origin::signed(2), b&quot;Dave&quot;.to_vec()));&#xD;&#xA;    			assert_eq!(Balances::total_balance(&amp;2), 10);&#xD;&#xA;    			assert_ok!(Nicks::kill_name(Origin::signed(1), 2));&#xD;&#xA;    			assert_eq!(Balances::total_balance(&amp;2), 8);&#xD;&#xA;    			assert_eq!(&lt;NameOf&lt;Test&gt;&gt;::get(2), None);&#xD;&#xA;    		});&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[test]&#xD;&#xA;    	fn force_name_should_work() {&#xD;&#xA;    		new_test_ext().execute_with(|| {&#xD;&#xA;    			assert_noop!(&#xD;&#xA;    				Nicks::set_name(Origin::signed(2), b&quot;Dr. David Brubeck, III&quot;.to_vec()),&#xD;&#xA;    				Error::&lt;Test&gt;::TooLong,&#xD;&#xA;    			);&#xD;&#xA;    &#xD;&#xA;    			assert_ok!(Nicks::set_name(Origin::signed(2), b&quot;Dave&quot;.to_vec()));&#xD;&#xA;    			assert_eq!(Balances::reserved_balance(2), 2);&#xD;&#xA;    			assert_noop!(&#xD;&#xA;    				Nicks::force_name(Origin::signed(1), 2, b&quot;Dr. David Brubeck, III&quot;.to_vec()),&#xD;&#xA;    				Error::&lt;Test&gt;::TooLong,&#xD;&#xA;    			);&#xD;&#xA;    			assert_ok!(Nicks::force_name(Origin::signed(1), 2, b&quot;Dr. Brubeck, III&quot;.to_vec()));&#xD;&#xA;    			assert_eq!(Balances::reserved_balance(2), 2);&#xD;&#xA;    			let (name, amount) = &lt;NameOf&lt;Test&gt;&gt;::get(2).unwrap();&#xD;&#xA;    			assert_eq!(name, b&quot;Dr. Brubeck, III&quot;.to_vec());&#xD;&#xA;    			assert_eq!(amount, 2);&#xD;&#xA;    		});&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[test]&#xD;&#xA;    	fn normal_operation_should_work() {&#xD;&#xA;    		new_test_ext().execute_with(|| {&#xD;&#xA;    			assert_ok!(Nicks::set_name(Origin::signed(1), b&quot;Gav&quot;.to_vec()));&#xD;&#xA;    			assert_eq!(Balances::reserved_balance(1), 2);&#xD;&#xA;    			assert_eq!(Balances::free_balance(1), 8);&#xD;&#xA;    			assert_eq!(&lt;NameOf&lt;Test&gt;&gt;::get(1).unwrap().0, b&quot;Gav&quot;.to_vec());&#xD;&#xA;    &#xD;&#xA;    			assert_ok!(Nicks::set_name(Origin::signed(1), b&quot;Gavin&quot;.to_vec()));&#xD;&#xA;    			assert_eq!(Balances::reserved_balance(1), 2);&#xD;&#xA;    			assert_eq!(Balances::free_balance(1), 8);&#xD;&#xA;    			assert_eq!(&lt;NameOf&lt;Test&gt;&gt;::get(1).unwrap().0, b&quot;Gavin&quot;.to_vec());&#xD;&#xA;    &#xD;&#xA;    			assert_ok!(Nicks::clear_name(Origin::signed(1)));&#xD;&#xA;    			assert_eq!(Balances::reserved_balance(1), 0);&#xD;&#xA;    			assert_eq!(Balances::free_balance(1), 10);&#xD;&#xA;    		});&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[test]&#xD;&#xA;    	fn error_catching_should_work() {&#xD;&#xA;    		new_test_ext().execute_with(|| {&#xD;&#xA;    			assert_noop!(Nicks::clear_name(Origin::signed(1)), Error::&lt;Test&gt;::Unnamed);&#xD;&#xA;    &#xD;&#xA;    			assert_noop!(&#xD;&#xA;    				Nicks::set_name(Origin::signed(3), b&quot;Dave&quot;.to_vec()),&#xD;&#xA;    				pallet_balances::Error::&lt;Test, _&gt;::InsufficientBalance&#xD;&#xA;    			);&#xD;&#xA;    &#xD;&#xA;    			assert_noop!(&#xD;&#xA;    				Nicks::set_name(Origin::signed(1), b&quot;Ga&quot;.to_vec()),&#xD;&#xA;    				Error::&lt;Test&gt;::TooShort&#xD;&#xA;    			);&#xD;&#xA;    			assert_noop!(&#xD;&#xA;    				Nicks::set_name(Origin::signed(1), b&quot;Gavin James Wood, Esquire&quot;.to_vec()),&#xD;&#xA;    				Error::&lt;Test&gt;::TooLong&#xD;&#xA;    			);&#xD;&#xA;    			assert_ok!(Nicks::set_name(Origin::signed(1), b&quot;Dave&quot;.to_vec()));&#xD;&#xA;    			assert_noop!(Nicks::kill_name(Origin::signed(2), 1), BadOrigin);&#xD;&#xA;    			assert_noop!(Nicks::force_name(Origin::signed(2), 1, b&quot;Whatever&quot;.to_vec()), BadOrigin);&#xD;&#xA;    		});&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I try to compile this I get:&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `T: parity_scale_codec::MaxEncodedLen` is not satisfied    --&gt; pallets/nicks/src/lib.rs:128:12&#xD;&#xA;        | 128 |     #[pallet::pallet]&#xD;&#xA;        |               ^^^^^^ the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `T`&#xD;&#xA;        | note: required because of the requirements on the impl of `parity_scale_codec::MaxEncodedLen` for `Nickname&lt;T&gt;`    --&gt; pallets/nicks/src/lib.rs:110:27&#xD;&#xA;        | 110 |     #[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;        |                              ^^^^^^^^^^^^^ 111 |     pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;        |                ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;        = note: 1 redundant requirement hidden&#xD;&#xA;        = note: required because of the requirements on the impl of `parity_scale_codec::MaxEncodedLen` for `(Nickname&lt;T&gt;, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance)`&#xD;&#xA;        = note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageMap&lt;pallet::_GeneratedPrefixForStorageNameOf&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::AccountId, (Nickname&lt;T&gt;, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance)&gt;`&#xD;&#xA;        = note: this error originates in the derive macro `MaxEncodedLen` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting this bound&#xD;&#xA;        | 128 |     #[pallet::pallet + parity_scale_codec::MaxEncodedLen]&#xD;&#xA;        |                      +++++++++++++++++++++++++++++++++++&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `T: scale_info::TypeInfo` is not satisfied    --&gt; pallets/nicks/src/lib.rs:124:12&#xD;&#xA;        | 124 |     #[pallet::storage]&#xD;&#xA;        |               ^^^^^^^ the trait `scale_info::TypeInfo` is not implemented for `T`&#xD;&#xA;        | note: required because of the requirements on the impl of `scale_info::TypeInfo` for `Nickname&lt;T&gt;`    --&gt; pallets/nicks/src/lib.rs:110:42&#xD;&#xA;        | 110 |     #[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;        |                                             ^^^^^^^^ 111 |     pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;        |                ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;        = note: 1 redundant requirement hidden&#xD;&#xA;        = note: required because of the requirements on the impl of `scale_info::TypeInfo` for `(Nickname&lt;T&gt;, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance)`&#xD;&#xA;        = note: required because of the requirements on the impl of `StaticTypeInfo` for `(Nickname&lt;T&gt;, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance)`&#xD;&#xA;        = note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageMap&lt;pallet::_GeneratedPrefixForStorageNameOf&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::AccountId, (Nickname&lt;T&gt;, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance)&gt;`&#xD;&#xA;        = note: this error originates in the derive macro `TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider restricting type parameter `T`&#xD;&#xA;        | 51  | #[frame_support::pallet]: scale_info::TypeInfo&#xD;&#xA;        |                         ++++++++++++++++++++++&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0277`. error: could not compile `pallet-nicks` due to 2 previous errors warning: build failed, waiting for other jobs to finish... error: build failed&#xD;&#xA;&#xD;&#xA;I understand that it is telling me that T needs to implement MaxEncodedLen and TypeInfo but I can't figure out how to do it. I've tried many different permutatations from using Vec instead of BoundedVec to implementing the suggestions from the compiler, but whatever I do generates errors of one kind or another. So I've reached the point where it's time to ask for help!&#xD;&#xA;&#xD;&#xA;I'm sure this is a newbie question that somebody with more experience resolve in seconds.&#xD;&#xA;&#xD;&#xA;Thanks in advance for your help.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/how-to-guides/v3/storage-migrations/basics/" ContentLicense="CC BY-SA 4.0" />
  <row Id="5922" PostHistoryTypeId="2" PostId="1609" RevisionGUID="8dd24e0f-68ef-4241-b1d6-a797cb63823f" CreationDate="2022-04-05T19:20:38.583" UserId="2128" Text="With BABE, I understand validators to produce blocks and chosen randomly and multiple validators may be eligible to produce a block, already providing a large amount of forks/fork opportunities. If no validator is chosen, or none produce valid blocks, any validator may step in to produce a block.&#xD;&#xA;&#xD;&#xA;GRANDPA is supposed to have the validators finalize on the longest chain given the most primary slot validator produced blocks.&#xD;&#xA;&#xD;&#xA;If there are valid blocks produced by primary slot validators, yet the validators as a whole finalize on a chain ignoring those blocks and instead favoring blocks produced by secondary slot validators, will non-validator nodes consider this a consensus violation (non-best chain chosen to become best chain) or will they adapt accordingly? I expect the answer will be they'll adapt accordingly, given natural scenario:&#xD;&#xA;- Primary slot validators take too long to publish&#xD;&#xA;- Random validator steps in&#xD;&#xA;- Random validator's block is successfully propagated before a block by a primary slot validator&#xD;&#xA;&#xD;&#xA;Yet I wanted to sanity check my understanding of consensus here." ContentLicense="CC BY-SA 4.0" />
  <row Id="5924" PostHistoryTypeId="1" PostId="1609" RevisionGUID="8dd24e0f-68ef-4241-b1d6-a797cb63823f" CreationDate="2022-04-05T19:20:38.583" UserId="2128" Text="Substrate chain reconcilliation with BABE/GRANDPA" ContentLicense="CC BY-SA 4.0" />
  <row Id="5925" PostHistoryTypeId="3" PostId="1609" RevisionGUID="8dd24e0f-68ef-4241-b1d6-a797cb63823f" CreationDate="2022-04-05T19:20:38.583" UserId="2128" Text="|consensus|grandpa|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5926" PostHistoryTypeId="2" PostId="1610" RevisionGUID="192b4806-7a75-4810-b201-8eabb0c6ff54" CreationDate="2022-04-05T19:33:43.630" UserId="2128" Text="I've read through various documentation on consensus algorithms, along with the fellow SE post https://substrate.stackexchange.com/questions/204/what-is-the-difference-between-babe-aura-and-grandpa. I'm unsure what the posited advantage of BABE/GRANDPA is when you have equal weights.&#xD;&#xA;&#xD;&#xA;The only possible idea I may have is GRANDPA's chain finalization, instead of block finalization, offers greater efficiency despite use of VRFs and the amount of forks it causes, along with a consistent block time (and reduced signature count). With 50 validators at 5 seconds, a 30% failure (below the expected BFT threshold) would cause a 75s latency at worst which could be considered unacceptable. Having 30% of nodes fail at once (and right next to each other in the queue) should almost never happen though when discussing real world usage? Perfectly even distribution would have every second block take 10 seconds (5, 5, failure, 10, 5, failure, 10, 5, failure, 10, 5...).&#xD;&#xA;&#xD;&#xA;Are there any other considerations I'm missing? Has there been a performance analysis publicized comparing the two? Are the consensus algorithms sufficiently light weight where performance isn't considered a concern and the added robustness of BABE/GRANDPA makes it optimal?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5928" PostHistoryTypeId="1" PostId="1610" RevisionGUID="192b4806-7a75-4810-b201-8eabb0c6ff54" CreationDate="2022-04-05T19:33:43.630" UserId="2128" Text="Advantages of BABE/GRANDPA over Aura for sovereign chains when weights are equal" ContentLicense="CC BY-SA 4.0" />
  <row Id="5929" PostHistoryTypeId="3" PostId="1610" RevisionGUID="192b4806-7a75-4810-b201-8eabb0c6ff54" CreationDate="2022-04-05T19:33:43.630" UserId="2128" Text="|grandpa|babe|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5930" PostHistoryTypeId="2" PostId="1611" RevisionGUID="6ef2621c-c081-4796-a42f-f2fa6975e208" CreationDate="2022-04-05T20:00:22.230" UserId="205" Text="in your code you are trying to replace an expected `BoundedVec&lt;u8, T::MaxLength&gt;` with the a `NickName`'s struct.&#xD;&#xA;```&#xD;&#xA;        #[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;        pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;            first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;            last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        impl&lt;T: Config&gt; Nickname&lt;T&gt; {&#xD;&#xA;            fn max_encoded_len() -&gt; usize {&#xD;&#xA;                let maxLength = T::MaxLength::get() as usize;&#xD;&#xA;                maxLength * 2&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        /// The lookup table for names.&#xD;&#xA;        #[pallet::storage]&#xD;&#xA;        pub(super) type NameOf&lt;T: Config&gt; =&#xD;&#xA;            StorageMap&lt;_, Twox64Concat, T::AccountId, (Nickname&lt;T&gt;, BalanceOf&lt;T&gt;)&gt;;&#xD;&#xA;```&#xD;&#xA;I suggest you review the latest `Nicks` pallet code and replace your `#[pallet::storage]` macro with the proper according changes:&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="5933" PostHistoryTypeId="5" PostId="1597" RevisionGUID="a11b1f37-6b21-406d-8b17-3501e30378dc" CreationDate="2022-04-05T20:28:33.497" UserId="100" Comment="added 215 characters in body; edited title" Text="The `substrate-contracts-node` changed consensus to `manual-seal` starting [v0.11.0][1], and now produces blocks only when a transaction is submitted.&#xD;&#xA;&#xD;&#xA;Because we were relying on the block 1 hash for some logic, this change was pretty breaking. &#xD;&#xA;&#xD;&#xA;Of course, the problem is relying on block 1 in the first place, but I was wondering if there is currently a way to know if the node my Dapp is connected to produces blocks automatically or not. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.11.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="5934" PostHistoryTypeId="4" PostId="1597" RevisionGUID="a11b1f37-6b21-406d-8b17-3501e30378dc" CreationDate="2022-04-05T20:28:33.497" UserId="100" Comment="added 215 characters in body; edited title" Text="How can a Dapp know if the node produces blocks automatically or not?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5935" PostHistoryTypeId="2" PostId="1612" RevisionGUID="b27a3843-7b73-49c6-a1f0-9741819906a0" CreationDate="2022-04-05T20:40:48.013" UserId="88" Text="&#xD;&#xA;I also noticed that the docs were lacking in explanation on how to add custom rpcs, but then I stumbled on the rust RPC repo by parity. It's referenced at the bottom of the docs on substrate.io that talks about [adding custom rpcs](https://docs.substrate.io/v3/runtime/custom-rpcs/): &#xD;&#xA;https://github.com/paritytech/jsonrpc&#xD;&#xA;&#xD;&#xA;From the examples in the README file, it seems the RPC is a struct that implements the RPC trait. This RPC trait has some macros derived that help specify the functions to be exposed. This is then made concrete on the RPC struct with an impl block that defines the functions fully. To do the same on a node, the main focus would be to find something similar to the two impl blocks (one for the trait, the other for the struct). I'd look for something similar on substrate nodes and use that instead.&#xD;&#xA;&#xD;&#xA;To give an example with the node-template I used,&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/blob/v3.0.0%2Bmonthly-2021-08/node/src/rpc.rs&#xD;&#xA;&#xD;&#xA;I just looked through it and there's a comment at the bottom that explains how to extend the functionality on a node.&#xD;&#xA;Specifically:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;	// Extend this RPC with a custom API by using the following syntax.&#xD;&#xA;	// `YourRpcStruct` should have a reference to a client, which is needed&#xD;&#xA;	// to call into the runtime.&#xD;&#xA;	// `io.extend_with(YourRpcTrait::to_delegate(YourRpcStruct::new(ReferenceToClient, ...)));`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;To bring things together, I'd call this method (`io.extend_with()`), or its equivalent on your setup, with a custom struct that has the rpcs you'd like to expose and the accompanying trait following the guide from `paritytech/jsonrpc`.&#xD;&#xA;&#xD;&#xA;This doesn't quite answer your question with the error, but I hope it helps you implement a custom RPC." ContentLicense="CC BY-SA 4.0" />
  <row Id="5937" PostHistoryTypeId="5" PostId="1612" RevisionGUID="c14e898b-2e39-4410-a90e-6802bd52373a" CreationDate="2022-04-05T20:47:29.447" UserId="88" Comment="Added client example" Text="&#xD;&#xA;I also noticed that the docs were lacking in explanation on how to add custom rpcs, but then I stumbled on the rust RPC repo by parity. It's referenced at the bottom of the docs on substrate.io that talks about [adding custom rpcs](https://docs.substrate.io/v3/runtime/custom-rpcs/): &#xD;&#xA;https://github.com/paritytech/jsonrpc&#xD;&#xA;&#xD;&#xA;From the examples in the README file, it seems the RPC is a struct that implements the RPC trait. This RPC trait has some macros derived that help specify the functions to be exposed. This is then made concrete on the RPC struct with an impl block that defines the functions fully. To do the same on a node, the main focus would be to find something similar to the two impl blocks (one for the trait, the other for the struct). I'd look for something similar on substrate nodes and use that instead.&#xD;&#xA;&#xD;&#xA;To give an example with the node-template I used,&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/blob/v3.0.0%2Bmonthly-2021-08/node/src/rpc.rs&#xD;&#xA;&#xD;&#xA;I just looked through it and there's a comment at the bottom that explains how to extend the functionality on a node.&#xD;&#xA;Specifically:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;	// Extend this RPC with a custom API by using the following syntax.&#xD;&#xA;	// `YourRpcStruct` should have a reference to a client, which is needed&#xD;&#xA;	// to call into the runtime.&#xD;&#xA;	// `io.extend_with(YourRpcTrait::to_delegate(YourRpcStruct::new(ReferenceToClient, ...)));`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;To bring things together, I'd call this method (`io.extend_with()`), or its equivalent on your setup, with a custom struct that has the rpcs you'd like to expose and the accompanying trait following the guide from `paritytech/jsonrpc`. Specifically, the one on clients: https://github.com/paritytech/jsonrpc#client-support&#xD;&#xA;&#xD;&#xA;This doesn't quite answer your question with the error, but I hope it helps you implement a custom RPC." ContentLicense="CC BY-SA 4.0" />
  <row Id="5938" PostHistoryTypeId="2" PostId="1613" RevisionGUID="34cfee4a-3e66-45e8-97e3-4918102e85b2" CreationDate="2022-04-05T21:19:40.917" UserId="245" Text="Following along the [Substrate's Forkless Upgrades][1] guide. I can upgrade the runtime but I can't figure it out how to upgrade my pallet's RPC.&#xD;&#xA;&#xD;&#xA;I have commented the below code for testing purposes and forgot to uncomment during build. Thought, this would be a good practice if I could make a forkless upgrade but I'm stuck. :(&#xD;&#xA;&#xD;&#xA;**node/src/rpc.rs:**&#xD;&#xA;```rust&#xD;&#xA;/** snip */&#xD;&#xA;// io.extend_with(TemplateStorageApi::to_delegate(TemplateStorage::new(client.clone())));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/forkless-upgrades/" ContentLicense="CC BY-SA 4.0" />
  <row Id="5940" PostHistoryTypeId="1" PostId="1613" RevisionGUID="34cfee4a-3e66-45e8-97e3-4918102e85b2" CreationDate="2022-04-05T21:19:40.917" UserId="245" Text="Upgrade Node's RPC" ContentLicense="CC BY-SA 4.0" />
  <row Id="5941" PostHistoryTypeId="3" PostId="1613" RevisionGUID="34cfee4a-3e66-45e8-97e3-4918102e85b2" CreationDate="2022-04-05T21:19:40.917" UserId="245" Text="|substrate-node|rpc|forkless-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5942" PostHistoryTypeId="2" PostId="1614" RevisionGUID="b7e2d9ec-6263-46ed-9771-f3dbb84f4c32" CreationDate="2022-04-05T22:29:38.490" UserId="434" Text="On chains that implement an EVM, nfts that follow the ERC-721 standard can easily be queried by tokenID to find out the owner, what would be the RMRK equivalent?&#xD;&#xA;&#xD;&#xA;Would users have to scan through every remark made on chain and filter out the particular NFT they are looking for, then step through, following the protocol spec to determine the owner?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5944" PostHistoryTypeId="1" PostId="1614" RevisionGUID="b7e2d9ec-6263-46ed-9771-f3dbb84f4c32" CreationDate="2022-04-05T22:29:38.490" UserId="434" Text="How can users trustlessly verify ownership of RMRK NFTs" ContentLicense="CC BY-SA 4.0" />
  <row Id="5945" PostHistoryTypeId="3" PostId="1614" RevisionGUID="b7e2d9ec-6263-46ed-9771-f3dbb84f4c32" CreationDate="2022-04-05T22:29:38.490" UserId="434" Text="|rmrk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5950" PostHistoryTypeId="2" PostId="1616" RevisionGUID="e5b98f14-9fd9-4d93-9bde-adc5eb3b5fd3" CreationDate="2022-04-05T22:52:12.560" UserId="205" Text="Please review the following recipe link. Cheers!&#xD;&#xA;https://substrate.recipes/custom-rpc.html&#xD;&#xA;&#xD;&#xA;*NB*: Also related to: https://substrate.stackexchange.com/questions/1024/is-it-possible-to-query-an-ocws-off-chain-storage-via-rpc-from-an-external-serv/1049#1049" ContentLicense="CC BY-SA 4.0" />
  <row Id="5955" PostHistoryTypeId="5" PostId="1616" RevisionGUID="26f2ce7b-1da6-4259-a877-6d1185770a09" CreationDate="2022-04-05T23:29:45.853" UserId="205" Comment="deleted 128 characters in body" Text="Please review the following Recipe link. All you are looking for is carefully explained there.&#xD;&#xA;&#xD;&#xA;https://substrate.recipes/custom-rpc.html&#xD;&#xA;&#xD;&#xA;Cheers!" ContentLicense="CC BY-SA 4.0" />
  <row Id="5957" PostHistoryTypeId="2" PostId="1618" RevisionGUID="143d98a6-a7a0-414b-a2e6-144820334a9a" CreationDate="2022-04-06T02:54:56.180" UserId="180" Text="I need to change this parameter to generate block more quickly, for example I can set to 100. So my transaction can execute instantly.&#xD;&#xA;&#xD;&#xA;So my question is:What happen when I have many nodes?&#xD;&#xA;- The storage&#xD;&#xA;- The CPU consumption&#xD;&#xA;- ...&#xD;&#xA;&#xD;&#xA;My current laptop works fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="5959" PostHistoryTypeId="1" PostId="1618" RevisionGUID="143d98a6-a7a0-414b-a2e6-144820334a9a" CreationDate="2022-04-06T02:54:56.180" UserId="180" Text="What happen when decrease &quot;MILLISECS_PER_BLOCK&quot; parameter in runtime/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="5960" PostHistoryTypeId="3" PostId="1618" RevisionGUID="143d98a6-a7a0-414b-a2e6-144820334a9a" CreationDate="2022-04-06T02:54:56.180" UserId="180" Text="|substrate-block-time|block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5961" PostHistoryTypeId="2" PostId="1619" RevisionGUID="230447d8-d706-4907-b88b-7243887fbaa2" CreationDate="2022-04-06T03:15:14.963" UserDisplayName="user2122" Text="Is it possible to Mint Fungible token on Development (local) Substrate?&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps not showing &quot;assets&quot; under &quot;network&quot; tab.&#xD;&#xA;&#xD;&#xA;Using substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="5963" PostHistoryTypeId="1" PostId="1619" RevisionGUID="230447d8-d706-4907-b88b-7243887fbaa2" CreationDate="2022-04-06T03:15:14.963" UserDisplayName="user2122" Text="Mint Fungible Token Development Network" ContentLicense="CC BY-SA 4.0" />
  <row Id="5964" PostHistoryTypeId="3" PostId="1619" RevisionGUID="230447d8-d706-4907-b88b-7243887fbaa2" CreationDate="2022-04-06T03:15:14.963" UserDisplayName="user2122" Text="|token|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5965" PostHistoryTypeId="2" PostId="1620" RevisionGUID="92092935-5784-4f0f-8c5b-01a7bba85673" CreationDate="2022-04-06T04:22:11.637" UserId="523" Text="`substrate-contracts-node` is a template project for smart contract only, for token test you need to add `Asset` and `Nft` pallet into runtime like [cumulus](https://github.com/paritytech/cumulus/blob/8d0e4229c580245f8e9a493bc39d0b94a9afa4c9/polkadot-parachains/statemine/src/lib.rs#L573-L574) " ContentLicense="CC BY-SA 4.0" />
  <row Id="5967" PostHistoryTypeId="2" PostId="1621" RevisionGUID="8ac05174-8f53-4a73-993d-93c2ac9c522c" CreationDate="2022-04-06T04:27:56.560" UserId="523" Text="guess what you need actually is [instant-seal-consensus](https://substrate.recipes/kitchen-node.html#instant-seal-consensus)" ContentLicense="CC BY-SA 4.0" />
  <row Id="5969" PostHistoryTypeId="2" PostId="1622" RevisionGUID="1bee41be-51c4-4fd9-93e7-100691b5ad80" CreationDate="2022-04-06T04:30:53.120" UserId="2146" Text="Still very new to this ecosystem. I'm trying to build a ReactApp that can access my NFT's that I have purchased on the Singular App.&#xD;&#xA;&#xD;&#xA;High level explanation, how do I do this? &#xD;&#xA;&#xD;&#xA;Low level, point me in the right direction?  &#xD;&#xA;&#xD;&#xA;I'm new and could use a gentle nudge in the right direction.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="5971" PostHistoryTypeId="1" PostId="1622" RevisionGUID="1bee41be-51c4-4fd9-93e7-100691b5ad80" CreationDate="2022-04-06T04:30:53.120" UserId="2146" Text="Access your NFTs using PolkadotJS API" ContentLicense="CC BY-SA 4.0" />
  <row Id="5972" PostHistoryTypeId="3" PostId="1622" RevisionGUID="1bee41be-51c4-4fd9-93e7-100691b5ad80" CreationDate="2022-04-06T04:30:53.120" UserId="2146" Text="|polkadot-js|api|javascript|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5978" PostHistoryTypeId="2" PostId="1624" RevisionGUID="f061474b-28dd-424f-b6ed-20d9cd738229" CreationDate="2022-04-06T06:12:46.410" UserId="227" Text="Let's say a Substrate chain had a long and prosper life and is about to reach a block number of `BlockNumber::MAX` (lucky chain!).&#xD;&#xA;&#xD;&#xA;Short of a reincarnation as a new chain with the genesis block retaining all prior memories ‒ what are mitigation strategies for this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5980" PostHistoryTypeId="1" PostId="1624" RevisionGUID="f061474b-28dd-424f-b6ed-20d9cd738229" CreationDate="2022-04-06T06:12:46.410" UserId="227" Text="Mitigation strategies if a chain would reach `BlockNumber::MAX`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5981" PostHistoryTypeId="3" PostId="1624" RevisionGUID="f061474b-28dd-424f-b6ed-20d9cd738229" CreationDate="2022-04-06T06:12:46.410" UserId="227" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5982" PostHistoryTypeId="5" PostId="1478" RevisionGUID="ab9f52d3-9990-4115-a6a7-8141967bb807" CreationDate="2022-04-06T06:26:50.260" UserId="83" Comment="update to show that same error when `wss://&lt;MY_PARACHAIN_DOMAIN&gt;` is not in the --rpc-cors list" Text="I want to be able to connect a collator node using https://polkadot.js.org/apps that is based on the substrate-parachain-template using branch 'polkadot-v0.9.18' and is being run as a parachain in **production**, but I do not want to use `--rpc-cors=all`. Instead I want to **enable origin validation** and manually add the **default** browser origins that are allowed. It mentions what values may be provided to `--rpc-cors=` in the documentation [here][1].&#xD;&#xA;```bash&#xD;&#xA;--rpc-cors &lt;ORIGINS&gt;&#xD;&#xA;    Specify browser Origins allowed to access the HTTP &amp; WS RPC servers.&#xD;&#xA;    &#xD;&#xA;    A comma-separated list of origins (protocol://domain or special `null` value). Value of&#xD;&#xA;    `all` will disable origin validation. Default is to allow localhost and&#xD;&#xA;    &lt;https://polkadot.js.org&gt; origins. When running in --dev mode the default is to allow&#xD;&#xA;    all origins.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][2], it shows the list of browser origins that it uses by **default**, which corresponds to the what it mentions above *&quot;Default is to allow localhost and &lt;https://polkadot.js.org&gt; origins.&quot;*.&#xD;&#xA;&#xD;&#xA;It previously connected successfully when using just `--rpc-cors=all`. But why after I provide the options shown below instead does it give the following error in the browser console `API-WS: disconnected from wss://&lt;MY_PARACHAIN_DOMAIN&gt;: 1006:: Abnormal Closure` and not output the warning `Blocked connection to WebSockets server from untrusted origin: &lt;REQUEST_ORIGIN&gt;` (since it uses ['jsonrpc-ws-server' crate][4] to verify whether each request origin header is in the list of allowed origins) in the collator logs when I then try to connect from the https://polkadot.js.org/apps/?rpc=wss://&lt;MY_PARACHAIN_DOMAIN&gt; endpoint?&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-collator \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;--rpc-cors=&quot;http://localhost:*,http://127.0.0.1:*,https://localhost:*,https://127.0.0.1:*,https://polkadot.js.org&quot; \&#xD;&#xA;--unsafe-ws-external \&#xD;&#xA;--unsafe-rpc-external \&#xD;&#xA;--rpc-methods=Unsafe` \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain ./res/rococo-raw.json \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sc_cli/struct.RunCmd.html#structfield.rpc_cors&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/client/cli/src/commands/run_cmd.rs#L406&#xD;&#xA;  [3]: https://crates.io/crates/jsonrpc-ws-server&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/client/rpc-servers/Cargo.toml#L25&#xD;&#xA;  [5]: https://github.com/paritytech/jsonrpc/blob/master/ws/src/session.rs#L185&#xD;&#xA;  [6]: https://github.com/paritytech/jsonrpc/blob/master/ws/src/session.rs#L371" ContentLicense="CC BY-SA 4.0" />
  <row Id="5983" PostHistoryTypeId="2" PostId="1625" RevisionGUID="586389d4-25c5-4aa5-a0f1-25b4901bfcd6" CreationDate="2022-04-06T06:33:50.987" UserId="2132" Text="The answer of detecting the capabilities is valid, i.e.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;if (api.query.aura?.authorities || api.query.babe?.authorities) {&#xD;&#xA;  // this should be non-manual&#xD;&#xA;} else {&#xD;&#xA;  // this is manual&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However in your case you are just after &quot;blocks produced&quot;, so for manual seal at block 2 it would work as well. So just change the logic to check if there are blocks&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const curr_head = await api.rpc.chain.getHeader()&#xD;&#xA;&#xD;&#xA;if (curr_head.number.isEmpty()) {&#xD;&#xA;  // nothing has been produced, we are on genesis&#xD;&#xA;} else {&#xD;&#xA;  // block has been produced&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="5985" PostHistoryTypeId="2" PostId="1626" RevisionGUID="0698e0ab-3380-4918-b2ee-47e545c3c2f8" CreationDate="2022-04-06T06:34:47.437" UserId="1867" Text="If you want to gain Access to NFTs which you purchased on Singular, then you are dealing with RMRK NFTs which live in Smart Contracts deployed to the [Moonriver Network](https://moonbeam.network/announcements/rmrk-logic-coming-to-moonriver/) which is a L1 parachchain on Polkadot.&#xD;&#xA;&#xD;&#xA;While in theory, Polkadot.js should be capable of querying and decoding data from Moonriver contracts, I'd recommend you to check out the SDK which is developed for this purpose:&#xD;&#xA;https://github.com/rmrk-team/rmrk-tools " ContentLicense="CC BY-SA 4.0" />
  <row Id="5987" PostHistoryTypeId="2" PostId="1627" RevisionGUID="43a0ca4a-ea7e-42e4-9a0d-e634c131ecbd" CreationDate="2022-04-06T06:39:12.397" UserId="139" Text="https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#submitting-the-setkeys-transaction&#xD;&#xA;&#xD;&#xA;Upto this point in the documentation, it's easy to get a session key from calling rotate keys, however the way to call `set_keys` is not shown. I don't have access to a PolkadotJS apps GUI right now and would like to change my keys for my validator node. How should I build this extrinsic, sign it and send it from the CLI? " ContentLicense="CC BY-SA 4.0" />
  <row Id="5989" PostHistoryTypeId="1" PostId="1627" RevisionGUID="43a0ca4a-ea7e-42e4-9a0d-e634c131ecbd" CreationDate="2022-04-06T06:39:12.397" UserId="139" Text="How to call session.set_keys from the CLI?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5990" PostHistoryTypeId="3" PostId="1627" RevisionGUID="43a0ca4a-ea7e-42e4-9a0d-e634c131ecbd" CreationDate="2022-04-06T06:39:12.397" UserId="139" Text="|session|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="5991" PostHistoryTypeId="5" PostId="1624" RevisionGUID="1934863f-677e-4b41-b0b0-c31139bff73e" CreationDate="2022-04-06T06:47:29.930" UserId="227" Comment="added 5 characters in body" Text="Let's say a Substrate chain had a long and prosper life and is about to reach a block number of `BlockNumber::MAX` (lucky chain!).&#xD;&#xA;&#xD;&#xA;Short of a reincarnation as a new chain with the genesis block retaining all prior memories ‒ what would be mitigation strategies for this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="5992" PostHistoryTypeId="2" PostId="1628" RevisionGUID="12c0e808-26cc-489f-9f45-1d1765533c05" CreationDate="2022-04-06T06:50:53.143" UserId="2132" Text="In standard Substrate, `type BlockNumber = u32` so `BlockNumber::MAX` is `0xffffffff` or `4294967295` in decimal.&#xD;&#xA;&#xD;&#xA;Assuming 6 second blocks: (4294967295 * 6) / (60 * 60 * 24 * 365) = 817 years.&#xD;&#xA;&#xD;&#xA;Assuming 1 second blocks: (4294967295 * 1) / (60 * 60 * 24 * 365) = 136 years.&#xD;&#xA;&#xD;&#xA;Assuming 0.5 second blocks: (4294967295 / 2) / (60 * 60 * 24 * 365) = 68 years.&#xD;&#xA;&#xD;&#xA;The impact of 2038 is closer. Since everything is upgradable and types can be changed, it is not something to loose sleep over until the chain gets to &quot;some years out&quot;. " ContentLicense="CC BY-SA 4.0" />
  <row Id="5994" PostHistoryTypeId="5" PostId="1624" RevisionGUID="73435beb-9f5c-4843-b29b-22861aca7ef5" CreationDate="2022-04-06T06:52:07.987" UserId="227" Comment="added 5 characters in body" Text="Let's say a Substrate chain had a long and prosper life and is about to reach a block number of `BlockNumber::MAX` (lucky chain!).&#xD;&#xA;&#xD;&#xA;Short of a reincarnation as a new chain with the genesis block retaining all prior memories ‒ what would be mitigation strategies for this case?&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;The question is getting downvoted, I'm aware that this is a rather hypothetical question and that it's unlikely to occur in the next couple hundred years. Still I think it's an interesting scenario to explore.&#xD;&#xA;&#xD;&#xA;Also consider that those calculations are with the current block time, if block time decreases massively due to technological advances this will also change the outlook." ContentLicense="CC BY-SA 4.0" />
  <row Id="5995" PostHistoryTypeId="2" PostId="1629" RevisionGUID="a3369808-eda3-4597-a77a-d21c230ece0b" CreationDate="2022-04-06T06:57:54.437" UserId="2132" Text="Validator selection. Aura is in a round-robin fashion and therefore has predictable block authors, Babe does not.&#xD;&#xA;&#xD;&#xA;If you can predict the validators for a specific block way into the future, you can think of some attack strategies." ContentLicense="CC BY-SA 4.0" />
  <row Id="5997" PostHistoryTypeId="5" PostId="1618" RevisionGUID="401e357b-3e15-47b8-a9aa-3c09b7e955be" CreationDate="2022-04-06T06:59:11.227" UserId="128" Comment="added 38 characters in body; edited title" Text="I need to change the `MILLISECS_PER_BLOCK` parameter to generate blocks more quickly. &#xD;&#xA;&#xD;&#xA;For example I can set to `100` so that my transaction can execute instantly.&#xD;&#xA;&#xD;&#xA;The question is: What will happen when I have many nodes?&#xD;&#xA;&#xD;&#xA;- The storage&#xD;&#xA;- The CPU consumption&#xD;&#xA;- ...&#xD;&#xA;&#xD;&#xA;My current laptop works fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="5998" PostHistoryTypeId="4" PostId="1618" RevisionGUID="401e357b-3e15-47b8-a9aa-3c09b7e955be" CreationDate="2022-04-06T06:59:11.227" UserId="128" Comment="added 38 characters in body; edited title" Text="What happens when I decrease the `MILLISECS_PER_BLOCK` parameter in runtime/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="5999" PostHistoryTypeId="2" PostId="1630" RevisionGUID="3b913b89-7a8c-4464-a70b-c15f09e3940b" CreationDate="2022-04-06T07:00:26.007" UserId="139" Text="Currently I am starting my node with one authority, and the genesis config for grandpa looks like this : &#xD;&#xA;```rust&#xD;&#xA;grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;```&#xD;&#xA;Would it be possible to assign some privileged accounts more weight in the Grandpa voting round after adding them to this `authorities` list like so? &#xD;&#xA;```rust&#xD;&#xA;grandpa: GrandpaConfig { authorities: intial_authorities.map(|x| (x.3.clone(), 10)) }&#xD;&#xA;```&#xD;&#xA;where assume `x.3` is the `GrandpaId` of `initial_authorities`. What kind of changes would this entail?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6001" PostHistoryTypeId="1" PostId="1630" RevisionGUID="3b913b89-7a8c-4464-a70b-c15f09e3940b" CreationDate="2022-04-06T07:00:26.007" UserId="139" Text="How would adding more weight to grandpa voting of my initial authority at genesis affect finality?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6002" PostHistoryTypeId="3" PostId="1630" RevisionGUID="3b913b89-7a8c-4464-a70b-c15f09e3940b" CreationDate="2022-04-06T07:00:26.007" UserId="139" Text="|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6003" PostHistoryTypeId="2" PostId="1631" RevisionGUID="0561041e-63f8-474b-8b4b-a9e33069b8fb" CreationDate="2022-04-06T07:07:33.627" UserId="2132" Text="Since metadata v14 the runtime fully specifies all runtime interfaces and types. On the RPC side however the `rpc_methods` only returns the list of methods exposed, without any type details for them. This basically means that a mapping from these names to actual definitions are maintained in various SDKs.&#xD;&#xA;&#xD;&#xA;There is also a version flag in this RPC response so it must mean it is somehow upgradable. &#xD;&#xA;&#xD;&#xA;So my question is: are there plans and/or ongoing work to make these fully described with parameters and return types ala metadata-v14-for-rpcs." ContentLicense="CC BY-SA 4.0" />
  <row Id="6005" PostHistoryTypeId="1" PostId="1631" RevisionGUID="0561041e-63f8-474b-8b4b-a9e33069b8fb" CreationDate="2022-04-06T07:07:33.627" UserId="2132" Text="RPC full types specification" ContentLicense="CC BY-SA 4.0" />
  <row Id="6006" PostHistoryTypeId="3" PostId="1631" RevisionGUID="0561041e-63f8-474b-8b4b-a9e33069b8fb" CreationDate="2022-04-06T07:07:33.627" UserId="2132" Text="|rpc|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6007" PostHistoryTypeId="5" PostId="1626" RevisionGUID="900aab7a-a3e6-4adf-b9a9-26023e9244a9" CreationDate="2022-04-06T07:19:16.070" UserId="1867" Comment="deleted 2 characters in body" Text="If you want to gain Access to NFTs which you purchased on Singular, then you are dealing with RMRK NFTs which live in Smart Contracts deployed to the [Moonriver Network](https://moonbeam.network/announcements/rmrk-logic-coming-to-moonriver/) which is a L1 parachchain on Kusama.&#xD;&#xA;&#xD;&#xA;While in theory, Polkadot.js should be capable of querying and decoding data from Moonriver contracts, I'd recommend you to check out the SDK which is developed for this purpose:&#xD;&#xA;https://github.com/rmrk-team/rmrk-tools " ContentLicense="CC BY-SA 4.0" />
  <row Id="6009" PostHistoryTypeId="2" PostId="1632" RevisionGUID="9ad65d1d-e0f1-4683-8cd5-76180f15d67b" CreationDate="2022-04-06T07:42:39.230" UserId="139" Text="Right now I have one cloud instance running a node, and 2 local instances on the same computer. On my local instances, in the bootnodes flag I pass the address to my cloud instance. Initially I was expecting that this would result in `(2 peers)` showing up on each of my local instances, but only my cloud instance shows `(2 peers)`, the local instances show `(1 peer)`, which is the cloud instance.&#xD;&#xA;&#xD;&#xA;Now my initial mental model was that this cloud instance would just be used as a means to sync up or discover other nodes in the network, and the nodes would then decide amongst themselves how to send communication to the fastest/nearest node, rather than the bootnode. Resulting in `(2 peers)` showing for each node (local or remote). &#xD;&#xA;&#xD;&#xA;What I am asking is a networking question, does it happen that my local nodes could be communicating between themselves without going through the remote instance? Say `local A` produced a block, will that information be relayed directly to `local B` or through `remote` and then to `local B`? &#xD;&#xA;&#xD;&#xA;Also, is it possible to use the bootnode as just a discovery point for other nodes? If not, is it possible to specify multiple bootnodes (if yes how)? " ContentLicense="CC BY-SA 4.0" />
  <row Id="6011" PostHistoryTypeId="1" PostId="1632" RevisionGUID="9ad65d1d-e0f1-4683-8cd5-76180f15d67b" CreationDate="2022-04-06T07:42:39.230" UserId="139" Text="Is it possible to connect to more than a single bootnode?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6012" PostHistoryTypeId="3" PostId="1632" RevisionGUID="9ad65d1d-e0f1-4683-8cd5-76180f15d67b" CreationDate="2022-04-06T07:42:39.230" UserId="139" Text="|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6013" PostHistoryTypeId="2" PostId="1633" RevisionGUID="3abafa49-81af-407a-85d3-33f0aa7b558b" CreationDate="2022-04-06T07:57:23.933" UserId="2146" Text="So, thanks to Achim, in the rmrk-tools repo, you can use: https://github.com/rmrk-team/rmrk-tools#fetchremarks&#xD;&#xA;&#xD;&#xA;    fetchRemarks(api, to, from, prefixes); method call&#xD;&#xA;&#xD;&#xA;It's not pretty but it's a start:&#xD;&#xA;&#xD;&#xA;    async function getRmrks(){&#xD;&#xA;    const wsProvider = new WsProvider('wss://kusama-rpc.polkadot.io');&#xD;&#xA;    const ADDR = &lt;QUERY_ADDRESS_OF_NFT_MINT&gt;;&#xD;&#xA;    &#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const remarkBlocks = fetchRemarks(api, 12128900, 12128990,  [''])&#xD;&#xA;    .then( (remarkBlock) =&gt; {&#xD;&#xA;        remarkBlock&#xD;&#xA;            .forEach((block)=&gt;{&#xD;&#xA;                block.calls&#xD;&#xA;                    .filter((obj) =&gt;{ &#xD;&#xA;                        if(obj.caller === ADDR) {&#xD;&#xA;                            console.log(obj);&#xD;&#xA;                        }&#xD;&#xA;                    });&#xD;&#xA;            });&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6015" PostHistoryTypeId="5" PostId="1618" RevisionGUID="995c5704-fb3e-4b2a-822a-91353340c0fc" CreationDate="2022-04-06T07:59:03.957" UserId="128" Comment="added 3 characters in body" Text="I need to change the `MILLISECS_PER_BLOCK` parameter to generate blocks more quickly. &#xD;&#xA;&#xD;&#xA;For example I can set it to `100` so that my transaction can execute instantly.&#xD;&#xA;&#xD;&#xA;The question is: What will happen when I have many nodes?&#xD;&#xA;&#xD;&#xA;- The storage&#xD;&#xA;- The CPU consumption&#xD;&#xA;- ...&#xD;&#xA;&#xD;&#xA;My current laptop works fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="6016" PostHistoryTypeId="2" PostId="1634" RevisionGUID="6ece65cd-58bc-428d-9d93-494ad22f55e7" CreationDate="2022-04-06T08:00:33.217" UserId="354" Text="I have declared a variable in **balances/lib.rs** inside a function in **[pallet::call]**, i want to call that variable at runtime in **staking pallet** to call it after the era completes. Can someone help me with this or is there a way to call the completion of era in **balances pallet**. I am happy with either solution. Thank you in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="6018" PostHistoryTypeId="1" PostId="1634" RevisionGUID="6ece65cd-58bc-428d-9d93-494ad22f55e7" CreationDate="2022-04-06T08:00:33.217" UserId="354" Text="Call a variable from [pallet::call], in another pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="6019" PostHistoryTypeId="3" PostId="1634" RevisionGUID="6ece65cd-58bc-428d-9d93-494ad22f55e7" CreationDate="2022-04-06T08:00:33.217" UserId="354" Text="|substrate-node|polkadot|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6020" PostHistoryTypeId="5" PostId="1618" RevisionGUID="0b28c637-d390-40c9-950b-3ba985725970" CreationDate="2022-04-06T08:04:22.013" UserId="128" Comment="added 2 characters in body" Text="I need to change the `MILLISECS_PER_BLOCK` parameter to generate blocks more quickly. &#xD;&#xA;&#xD;&#xA;For example I can set it to `100` so that my transaction can execute instantly.&#xD;&#xA;&#xD;&#xA;The question is: What will happen when I have many nodes?&#xD;&#xA;&#xD;&#xA;- The storage&#xD;&#xA;- The CPU consumption&#xD;&#xA;- ...&#xD;&#xA;&#xD;&#xA;Currently my laptop works fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="6021" PostHistoryTypeId="2" PostId="1635" RevisionGUID="c1774d93-9601-42d9-8406-c6e1bef1ad93" CreationDate="2022-04-06T08:07:56.807" UserId="1838" Text="When we tested the cross-chain transfer, we found that the fee was a bit high. How to optimize various parameters to reduce the transfer fee" ContentLicense="CC BY-SA 4.0" />
  <row Id="6023" PostHistoryTypeId="1" PostId="1635" RevisionGUID="c1774d93-9601-42d9-8406-c6e1bef1ad93" CreationDate="2022-04-06T08:07:56.807" UserId="1838" Text="How to optimize the fees for cross-chain transfers" ContentLicense="CC BY-SA 4.0" />
  <row Id="6024" PostHistoryTypeId="3" PostId="1635" RevisionGUID="c1774d93-9601-42d9-8406-c6e1bef1ad93" CreationDate="2022-04-06T08:07:56.807" UserId="1838" Text="|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6025" PostHistoryTypeId="2" PostId="1636" RevisionGUID="9c3b3190-5834-4dff-ae21-bbda7c7e6b5b" CreationDate="2022-04-06T08:23:04.003" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="6027" PostHistoryTypeId="1" PostId="1636" RevisionGUID="9c3b3190-5834-4dff-ae21-bbda7c7e6b5b" CreationDate="2022-04-06T08:23:04.003" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6028" PostHistoryTypeId="2" PostId="1637" RevisionGUID="a74181c7-1991-41f8-a414-58846029676b" CreationDate="2022-04-06T08:23:04.003" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="6030" PostHistoryTypeId="1" PostId="1637" RevisionGUID="a74181c7-1991-41f8-a414-58846029676b" CreationDate="2022-04-06T08:23:04.003" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6031" PostHistoryTypeId="6" PostId="202" RevisionGUID="e5e379a3-53d7-4e98-8107-5cdd7ce7da5e" CreationDate="2022-04-06T08:26:17.587" UserId="172" Comment="edited tags" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6032" PostHistoryTypeId="2" PostId="1638" RevisionGUID="eee052e2-e343-40d9-a46a-a6b645845ef5" CreationDate="2022-04-06T08:39:01.650" UserId="2149" Text="Tests are not working in substrate-frontend-template.&#xD;&#xA;1. Use template:&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;2. Uncomment tests in &#xD;&#xA;substrate-front-end/src/__tests__/App.js&#xD;&#xA;3. See test error:&#xD;&#xA;&#xD;&#xA;    cd substrate-front-end \&#xD;&#xA;    yarn install \&#xD;&#xA;    yarn test&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    FAIL src/__tests__/App.js&#xD;&#xA;      ● Test suite failed to run&#xD;&#xA;    &#xD;&#xA;        Jest encountered an unexpected token&#xD;&#xA;    &#xD;&#xA;        Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.&#xD;&#xA;&#xD;&#xA;There is a note in substrate-front-end/src/__tests__/App.js&#xD;&#xA;that it's due to issue: https://github.com/polkadot-js/api/issues/3430&#xD;&#xA;and there is a probably fix: https://github.com/woss/polkadot-packages-jest-typescript-setup.&#xD;&#xA;&#xD;&#xA;The fix is working on it's own data but when I add my test it crashes:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    import { cryptoWaitReady, signatureVerify } from '@polkadot/util-crypto'&#xD;&#xA;    &#xD;&#xA;    beforeEach(async (): Promise&lt;void&gt; =&gt; {&#xD;&#xA;      await cryptoWaitReady();&#xD;&#xA;    });&#xD;&#xA;    &#xD;&#xA;    describe('util-crypto test', () =&gt; {&#xD;&#xA;      it('signatureVerify', () =&gt; {&#xD;&#xA;        const refereeU8 = new Uint8Array([228, 167, 81, 18, 204, 23, 38, 108, 155, 194, 90, 41, 194, 163, 58, 60, 89, 176, 227, 117, 233, 66, 197, 106, 239, 232, 113, 141, 216, 124, 78, 49,])&#xD;&#xA;        const dataToSignU8 = new Uint8Array([0, 0, 0, 1, 228, 167, 81, 18, 204, 23, 38, 108, 155, 194, 90, 41, 194, 163, 58, 60, 89, 176, 227, 117, 233, 66, 197, 106, 239, 232, 113, 141, 216, 124, 78, 49, 178, 77, 57, 242, 36, 161, 83, 238, 138, 176, 187, 13, 7, 59, 100, 92, 45, 157, 163, 43, 133, 176, 199, 22, 118, 202, 133, 229, 161, 199, 255, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10])&#xD;&#xA;        const rightSignatureU8 = new Uint8Array([96, 20, 15, 21, 11, 137, 10, 192, 129, 3, 154, 34, 203, 118, 28, 19, 176, 54, 165, 181, 227, 156, 70, 197, 73, 86, 226, 111, 137, 243, 69, 95, 41, 74, 25, 254, 228, 34, 212, 189, 141, 134, 194, 44, 229, 172, 27, 43, 67, 73, 73, 58, 61, 63, 37, 176, 120, 195, 153, 198, 46, 42, 231, 129])&#xD;&#xA;        const rightSignatureU8TestingResult = signatureVerify(dataToSignU8, rightSignatureU8, refereeU8)&#xD;&#xA;        expect(rightSignatureU8TestingResult).toStrictEqual(true);&#xD;&#xA;      })&#xD;&#xA;    })&#xD;&#xA;&#xD;&#xA;The result:&#xD;&#xA;&#xD;&#xA;    &gt; polkadot-api-test-fail@1.0.0 test /Users/adr/programming/polkadot-packages-jest-typescript-setup&#xD;&#xA;    &gt; NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles&#xD;&#xA;    &#xD;&#xA;    (node:45484) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time&#xD;&#xA;    (Use `node --trace-warnings ...` to show where the warning was created)&#xD;&#xA;     FAIL  packages/demo1/src/index.spec.ts&#xD;&#xA;      ● Test suite failed to run&#xD;&#xA;    &#xD;&#xA;        Must use import to load ES Module: /Users/adr/programming/polkadot-packages-jest-typescript-setup/node_modules/@polkadot/x-bigint/shim.js&#xD;&#xA;    &#xD;&#xA;          at Runtime.requireModule (node_modules/.pnpm/jest-runtime@27.0.0-next.9_@babel+core@7.14.3/node_modules/jest-runtime/build/index.js:791:21)&#xD;&#xA;    &#xD;&#xA;    Test Suites: 1 failed, 1 total&#xD;&#xA;    Tests:       0 total&#xD;&#xA;    Snapshots:   0 total&#xD;&#xA;    Time:        2.169 s&#xD;&#xA;    Ran all test suites.&#xD;&#xA;     ELIFECYCLE  Test failed. See above for more details.&#xD;&#xA;&#xD;&#xA;Please help me to fix the substrate-front-end-template to be able to use tests with polkadot js api." ContentLicense="CC BY-SA 4.0" />
  <row Id="6034" PostHistoryTypeId="1" PostId="1638" RevisionGUID="eee052e2-e343-40d9-a46a-a6b645845ef5" CreationDate="2022-04-06T08:39:01.650" UserId="2149" Text="substrate-frontend-template and polkadot-js incompatibility" ContentLicense="CC BY-SA 4.0" />
  <row Id="6035" PostHistoryTypeId="3" PostId="1638" RevisionGUID="eee052e2-e343-40d9-a46a-a6b645845ef5" CreationDate="2022-04-06T08:39:01.650" UserId="2149" Text="|polkadot-js|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6036" PostHistoryTypeId="2" PostId="1639" RevisionGUID="2515f70b-cd0b-4a4c-8050-246de0d9a038" CreationDate="2022-04-06T08:46:29.160" UserId="298" Text="We're trying to upload a Rococo fork, it seems that Rococo doesn't have pallet_scheduler out the box, so we don't have that option. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo.sudo &#xD;&#xA;1010: Invalid transaction:&#xD;&#xA;Transaction would exhaust the block limits&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;I'm using the `rococo_runtime.compact.compressed.wasm` bin which is only 971KB.&#xD;&#xA;&#xD;&#xA;Is there anyway we can force the upgrade?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6038" PostHistoryTypeId="1" PostId="1639" RevisionGUID="2515f70b-cd0b-4a4c-8050-246de0d9a038" CreationDate="2022-04-06T08:46:29.160" UserId="298" Text="Upgrade Rococo fork, error would exhaust block limits (no pallet_scheduler)" ContentLicense="CC BY-SA 4.0" />
  <row Id="6039" PostHistoryTypeId="3" PostId="1639" RevisionGUID="2515f70b-cd0b-4a4c-8050-246de0d9a038" CreationDate="2022-04-06T08:46:29.160" UserId="298" Text="|polkadot|rococo|rococo-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6040" PostHistoryTypeId="2" PostId="1640" RevisionGUID="b57c8298-d004-4172-bf6a-66078a2034ae" CreationDate="2022-04-06T08:50:01.117" UserId="627" Text="Put through the upgrade with `sudo.sudoUncheckedWeight` instead of `sudo.sudo`. &#xD;&#xA;&#xD;&#xA;If using the apps UI, the sudo page does have a toggle to swap this this second call aka the &quot;with weight override&quot; toggle enables this call to be used." ContentLicense="CC BY-SA 4.0" />
  <row Id="6042" PostHistoryTypeId="2" PostId="1641" RevisionGUID="1233df4a-c607-485e-9ae9-cf5df7b124f9" CreationDate="2022-04-06T08:54:27.897" UserId="2153" Text="I have a question about how pallet-contracts interprets a Wasm contract. Are the following assumptions correct?&#xD;&#xA;&#xD;&#xA; - pallet-contracts interprets contracts through the simple [wasmi](https://github.com/paritytech/wasmi) interpreter&#xD;&#xA; - gas metering is not done by extending this interpreter with metering capabilities, but by cleverly analyzing the Wasm code and injecting calls to a metering function as sparingly as possible (through wasm-instrument)&#xD;&#xA; - like every pallet also pallet-contracts is compiled to Wasm itself as part of the Wasm runtime&#xD;&#xA; - the Wasm runtime is executed through the more powerful [Wasmtime](https://github.com/bytecodealliance/wasmtime) Wasm engine (as part of the external node), which even does JIT compilation&#xD;&#xA;&#xD;&#xA;So if these assumptions are correct, does that mean that every contract is intepreted through wasmi, whereas wasmi itself is executed through Wasmtime, i.e., a double layer of Wasm execution?&#xD;&#xA;&#xD;&#xA;If so, is there any chance to remove one layer in the future and execute the contract directly through the node's Wasmtime engine? If not, why not use Wasmtime instead of wasmi in pallet-contracts, I guess that would be more efficient and would also allow for SIMD operations?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6044" PostHistoryTypeId="1" PostId="1641" RevisionGUID="1233df4a-c607-485e-9ae9-cf5df7b124f9" CreationDate="2022-04-06T08:54:27.897" UserId="2153" Text="Wasm interpreter in pallet-contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="6045" PostHistoryTypeId="3" PostId="1641" RevisionGUID="1233df4a-c607-485e-9ae9-cf5df7b124f9" CreationDate="2022-04-06T08:54:27.897" UserId="2153" Text="|smart-contract|wasm|wasmi|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6046" PostHistoryTypeId="2" PostId="1642" RevisionGUID="f663a12c-2c54-4b24-99e3-2665beb2a709" CreationDate="2022-04-06T09:08:54.477" UserId="697" Text="I need to store huge amount of sorted integers, it should be traversable with efficient get and insert, if i can iterate over storage map so let me know how? Or is there any BTreeMap storage type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6048" PostHistoryTypeId="1" PostId="1642" RevisionGUID="f663a12c-2c54-4b24-99e3-2665beb2a709" CreationDate="2022-04-06T09:08:54.477" UserId="697" Text="BTreeMap Storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="6049" PostHistoryTypeId="3" PostId="1642" RevisionGUID="f663a12c-2c54-4b24-99e3-2665beb2a709" CreationDate="2022-04-06T09:08:54.477" UserId="697" Text="|polkadot|storage|frame|runtime|btreemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6050" PostHistoryTypeId="2" PostId="1643" RevisionGUID="a062776f-6711-4f37-b0e7-b5a179f435c0" CreationDate="2022-04-06T09:14:57.293" UserId="316" Text="I'm currently trying to figure why my contract-call failed only with the contracts-ui.&#xD;&#xA;&#xD;&#xA;My setup is as follows:&#xD;&#xA;1. running substrate-contracts-node&#xD;&#xA;2. interact with polkadot.js/app under the contracts tab &#xD;&#xA;&#xD;&#xA;Steps to reproduce:&#xD;&#xA;1. create smart contracts via the upload&amp;deploy button. [![enter image description here][1]][1]&#xD;&#xA;2. call it's method via ui&#xD;&#xA;&#xD;&#xA;Since my contract failed with ContractTrapped, I went to the events tab and view the extrinsic and it's parameters and:&#xD;&#xA;1. reproduce the contract and call it from a test program using subxt&#xD;&#xA;2. and it passed without problem&#xD;&#xA;3. therefore I copied the extrinsic hash from the original failed extrinsic [![enter image description here][2]][2]&#xD;&#xA;4. paste it under extrinsics tab and decode it, and it's unable to decode the extrinsic it just create and executed. [![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Why is the contract extrinsic undecodable? I'm suspecting the extrinsic created from frontend is way different than hand rolling it via subxt.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Kieft.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/G0R5M.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/6FZWc.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6052" PostHistoryTypeId="1" PostId="1643" RevisionGUID="a062776f-6711-4f37-b0e7-b5a179f435c0" CreationDate="2022-04-06T09:14:57.293" UserId="316" Text="extrinsic created under contract tab undecodable" ContentLicense="CC BY-SA 4.0" />
  <row Id="6053" PostHistoryTypeId="3" PostId="1643" RevisionGUID="a062776f-6711-4f37-b0e7-b5a179f435c0" CreationDate="2022-04-06T09:14:57.293" UserId="316" Text="|polkadot-js|subxt|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6054" PostHistoryTypeId="2" PostId="1644" RevisionGUID="1a257599-22ff-4c8e-bcbc-223aa160d247" CreationDate="2022-04-06T09:16:48.773" UserId="627" Text="You tried to decode a hash of the extrinsic, not the actual encoded extrinsic itself.&#xD;&#xA;&#xD;&#xA;The &quot;extrinsic hash&quot; is a one-way `blake256(&lt;extrinsic data&gt;)` so it doesn't contain the decodable extrinsic data." ContentLicense="CC BY-SA 4.0" />
  <row Id="6056" PostHistoryTypeId="2" PostId="1645" RevisionGUID="20b6d1a5-7093-40d4-8e9f-04eb1d9e17e2" CreationDate="2022-04-06T09:25:36.447" UserId="697" Text="To define any variable you should use `pallet::storage` and declare it in `Config` and for accessing that from another pallet you need to use one of two methods that describes in `Pallet Coupling`" ContentLicense="CC BY-SA 4.0" />
  <row Id="6058" PostHistoryTypeId="2" PostId="1646" RevisionGUID="d8f32a51-c777-4b17-8752-515b48169517" CreationDate="2022-04-06T09:48:29.397" UserId="426" Text="I stumbled upon an unexpected behavior when doing storage migration.&#xD;&#xA;&#xD;&#xA;### Problem Description &#xD;&#xA;I want to clean-up a large `DoubleStorageMap` in multiple steps.&#xD;&#xA;And that works just fine, however I also want to be able to test this using `try-runtime`. So I modified the code to recursively call the clean-up when `try-runtime` feature is enabled.&#xD;&#xA;&#xD;&#xA;The code looks something like this:&#xD;&#xA;```Rust&#xD;&#xA;        pub fn storage_cleanup&lt;T: Config&gt;(weight_limit: Weight) -&gt; Weight {&#xD;&#xA;            ...&#xD;&#xA;            let limit = ...;&#xD;&#xA;            match SomeDoubleStorageMap::&lt;T&gt;::remove_all(Some(limit)) {&#xD;&#xA;                KillStorageResult::AllRemoved(removed_entries_num) =&gt; {&#xD;&#xA;                    consumed_weight += deletion_weight * removed_entries_num as u64;&#xD;&#xA;                }&#xD;&#xA;                KillStorageResult::SomeRemaining(removed_entries_num) =&gt; {&#xD;&#xA;                    consumed_weight += deletion_weight * removed_entries_num as u64;&#xD;&#xA;                    if cfg!(feature = &quot;try-runtime&quot;) {&#xD;&#xA;                        return consumed_weight + storage_cleanup::&lt;T&gt;(weight_limit);&#xD;&#xA;                    } else {&#xD;&#xA;                        return consumed_weight;&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            ...&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Scenario&#xD;&#xA;- Let's say that initially, `SomeDoubleStorageMap` has **3000** entries.&#xD;&#xA;- Limit is set to **100** meaning that at most, we'll delete **100** entries in one call.&#xD;&#xA;- I want to emphasize again that it works just fine when tested on-chain where each deletion is part of another block.&#xD;&#xA;- When this is tested with `try-runtime`, it will enter an infinite loop.&#xD;&#xA;- I've tried printing `removed_entries_num` and size of the storage map and it goes like this:&#xD;&#xA;    - **First Iteration**&#xD;&#xA;        - Initial map size is **3000**&#xD;&#xA;        - **100** entries are removed, **2900** entries remain&#xD;&#xA;    - **Second Iteration**&#xD;&#xA;        - Initial map size is **2900**&#xD;&#xA;        - **entries** are removed, **2900** entries remain&#xD;&#xA;    - **Previous step is performed until stack is exhausted**&#xD;&#xA;&#xD;&#xA;`remove_all` provides info as if something was removed, but the size doesn't change.&#xD;&#xA;I assume it has to be related to the fact I'm doing it all as part of a single block.&#xD;&#xA;&#xD;&#xA;## Question&#xD;&#xA;Is this a bug or expected behavior?&#xD;&#xA;I've checked the docs and the code but couldn't find why this happens." ContentLicense="CC BY-SA 4.0" />
  <row Id="6060" PostHistoryTypeId="1" PostId="1646" RevisionGUID="d8f32a51-c777-4b17-8752-515b48169517" CreationDate="2022-04-06T09:48:29.397" UserId="426" Text="Multiple remove_all calls in same block" ContentLicense="CC BY-SA 4.0" />
  <row Id="6061" PostHistoryTypeId="3" PostId="1646" RevisionGUID="d8f32a51-c777-4b17-8752-515b48169517" CreationDate="2022-04-06T09:48:29.397" UserId="426" Text="|storage|map|remove-all|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6062" PostHistoryTypeId="5" PostId="588" RevisionGUID="b4c78728-733c-4d13-ba22-2358c80edab9" CreationDate="2022-04-06T09:54:10.710" UserId="128" Comment="added 35 characters in body" Text="I send the transaction using the substrate interface. &#xD;&#xA;&#xD;&#xA;I get the key pair and call: &#xD;&#xA;```&#xD;&#xA;call_module = &quot;Assets&quot;&#xD;&#xA;call_function = 'transfer'&#xD;&#xA;call_params = {&#xD;&#xA;    &quot;id&quot;: asset_id,&#xD;&#xA;    &quot;target&quot;: target,&#xD;&#xA;    'amount': amount,&#xD;&#xA; }&#xD;&#xA;```&#xD;&#xA;Then, I sign the transaction using `substrate.create_signed_extrinsic`,&#xD;&#xA;but I get an error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;raise ValueError('Element &quot;{}&quot; of struct is missing in given value'.format(key))&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;ValueError: Element &quot;asset_id&quot; of struct is missing in given value&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6063" PostHistoryTypeId="5" PostId="1602" RevisionGUID="6ca16040-6ead-4fde-a9f6-50f88d7f93ae" CreationDate="2022-04-06T10:03:32.720" UserId="128" Comment="Avoid opinion based phrasing of the question e.g. &quot;What is the best way to ...&quot;" Text="In what way can I intercept a transfer in `pallet_balance`?&#xD;&#xA;&#xD;&#xA;For example, I would like to check that the user has an identity in `pallet_identity` before completing a transfer with `pallet_balance`." ContentLicense="CC BY-SA 4.0" />
  <row Id="6064" PostHistoryTypeId="4" PostId="1602" RevisionGUID="6ca16040-6ead-4fde-a9f6-50f88d7f93ae" CreationDate="2022-04-06T10:03:32.720" UserId="128" Comment="Avoid opinion based phrasing of the question e.g. &quot;What is the best way to ...&quot;" Text="How can I intercept a transaction in pallet_balance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6065" PostHistoryTypeId="5" PostId="1642" RevisionGUID="7c4affca-49d6-4259-8b25-04c66765e0b9" CreationDate="2022-04-06T10:10:37.543" UserId="128" Comment="Fix grammar, spelling and title" Text="I would like to store a large amount of sorted integers, they should be traversable with efficient `get` and `insert`. &#xD;&#xA;&#xD;&#xA;If I can iterate over a storage map, could you let me know how? &#xD;&#xA;&#xD;&#xA;Or is there a BTreeMap storage type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6066" PostHistoryTypeId="4" PostId="1642" RevisionGUID="7c4affca-49d6-4259-8b25-04c66765e0b9" CreationDate="2022-04-06T10:10:37.543" UserId="128" Comment="Fix grammar, spelling and title" Text="BTreeMap storage type" ContentLicense="CC BY-SA 4.0" />
  <row Id="6067" PostHistoryTypeId="2" PostId="1647" RevisionGUID="d3b615cb-2c12-4940-8ab8-e4ec84807856" CreationDate="2022-04-06T10:20:28.363" UserId="1867" Text="Overall your assumptions are correct. WASM Smart Contracts are currently interpreted by the [wasmi](https://github.com/paritytech/wasmi) Interpreter.&#xD;&#xA;&#xD;&#xA;There exists indeed considerations to switch to the [wasmer](https://github.com/wasmerio/wasmer) compiler/runtime. AFAIK those compilers are heavily platform dependent and the Validator nodes would need to expose some ABIs first, so that we can execute those execution engines within the runtime. &#xD;&#xA;&#xD;&#xA;It is also not granted, that a compiler, which would have to compile the Smart Contract on every access, would improve the performance in any case." ContentLicense="CC BY-SA 4.0" />
  <row Id="6069" PostHistoryTypeId="5" PostId="1634" RevisionGUID="897f6458-302c-487b-a659-1c450e10f28d" CreationDate="2022-04-06T10:20:42.847" UserId="128" Comment="Fix grammar, spelling and formatting" Text="I have declared a variable in `balances/lib.rs` inside a `[pallet::call]` function. &#xD;&#xA;&#xD;&#xA;I want to call that variable at runtime in the **staking pallet** after the era completes. &#xD;&#xA;&#xD;&#xA;Or is there a way to call the completion of an era in the **balances pallet**? &#xD;&#xA;&#xD;&#xA;I am happy with either solution." ContentLicense="CC BY-SA 4.0" />
  <row Id="6070" PostHistoryTypeId="4" PostId="1634" RevisionGUID="897f6458-302c-487b-a659-1c450e10f28d" CreationDate="2022-04-06T10:20:42.847" UserId="128" Comment="Fix grammar, spelling and formatting" Text="Call a variable from [pallet::call] in another pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="6073" PostHistoryTypeId="5" PostId="1539" RevisionGUID="5522cceb-d777-41ab-8b8a-3fc4f9c33848" CreationDate="2022-04-06T10:41:34.923" UserId="2102" Comment="added 168 characters in body" Text="I've been trying to add some rpc calls available for my node, but an error related to the 'getrandom' module appears (even tho I'm not even using it).&#xD;&#xA;&#xD;&#xA;I have a very simple pallet that creates and transfers items, and it is working just fine. The problem comes when I try to add the custom rpc calls to the node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to &#xD;&#xA;enable the &quot;js&quot; feature. For more information see: &#xD;&#xA;https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;```&#xD;&#xA;I tried adding the dependency as stated in the documentation regarding this issue, but nothing seems to fix the issue, it just generates more errors.&#xD;&#xA;&#xD;&#xA;This is the documentation I've been using to implement the custom rpc calls for my pallet. I'll leave here my SO question, which is a little bit longer but its the same issue: https://stackoverflow.com/questions/71734501/error-adding-custom-rpcs-for-custom-pallet-substrate&#xD;&#xA;&#xD;&#xA;https://core.tetcoin.org/recipes/custom-rpc.html#rpc-to-call-a-runtime-api&#xD;&#xA;&#xD;&#xA;https://core.tetcoin.org/recipes/runtime-api.html&#xD;&#xA;&#xD;&#xA;Is there any recent documentation about adding custom RPCs for a pallet? Everything I've found is pretty outdated I think. &#xD;&#xA;&#xD;&#xA;UPDATE: I've uploaded the current status of the code, I think it will be easier to try.&#xD;&#xA;&#xD;&#xA;https://github.com/andresvsm/substrate-pallet-rpc/tree/rpc-implementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="6074" PostHistoryTypeId="5" PostId="1635" RevisionGUID="0eb3c597-1f47-4471-bd78-2cc5f5286bd2" CreationDate="2022-04-06T10:45:51.963" UserId="1838" Comment="added 208 characters in body; edited tags" Text="When we tested the cross-chain transfer, we found that the fee was a bit high. How to optimize various parameters to reduce the transfer fee&#xD;&#xA;&#xD;&#xA;such as: parachain A(tokenA) &lt;=&gt; parachain B(tokenB), my parachain is A,how to reuduce tokenB cross-chain transfe fee at parachain A.&#xD;&#xA;those parameters will directly affect the cross-chain transfer fee？&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6075" PostHistoryTypeId="6" PostId="1635" RevisionGUID="0eb3c597-1f47-4471-bd78-2cc5f5286bd2" CreationDate="2022-04-06T10:45:51.963" UserId="1838" Comment="added 208 characters in body; edited tags" Text="|parachain|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6080" PostHistoryTypeId="5" PostId="1635" RevisionGUID="71631f6f-ae8e-454f-861f-0b85d5de63ac" CreationDate="2022-04-06T10:54:59.320" UserId="1838" Comment="added 208 characters in body; edited tags" Text="When we tested the cross-chain transfer, we found that the fee was a bit high. How to optimize various parameters to reduce the transfer fee&#xD;&#xA;&#xD;&#xA;such as: parachain A(tokenA) &lt;=&gt; parachain B(tokenB), my parachain is A,how to reduce the cost of cross-chain transfer of tokenB to parachain A, and the cost of tokenB back to parachain B from parachainA.&#xD;&#xA;&#xD;&#xA;those parameters will directly affect the cross-chain transfer fee？&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6081" PostHistoryTypeId="2" PostId="1649" RevisionGUID="4141af54-dd0c-49c5-a66c-0a543a08a114" CreationDate="2022-04-06T10:55:43.607" UserId="16" Text="All your assumptions are correct. And yes we have a double layer of execution right now. There exists [an API][1] that allows us to have the execution engine within the the client (native code) which would allow us to use a compiler instead of an interpreter. Supported execution engines for this right now are wasmi and wasmer singlepass. We can't use wasmtime because as an optimizing compiler it uses non linear algorithms that are highly susceptible to compiler bombs. The runtime code is somewhat trusted as opposed to contracts. Also, it is totally unclear if compilation brings an end to end benefit for the typical contract workload.&#xD;&#xA;&#xD;&#xA;That said, this API is currently not available on the relay chain validators. We plan to use the in-runtime interpreter until we clearly see that moving it to the client improves performance. Using an in-runtime interpreter gives us the most flexibility in making changes because we don't rely on any client behavior.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/184d29caf8302053fac74ad74cd68bf43572108e/primitives/io/src/lib.rs#L1480-L1578" ContentLicense="CC BY-SA 4.0" />
  <row Id="6087" PostHistoryTypeId="2" PostId="1651" RevisionGUID="299b76c1-d5a9-43a5-94bb-7651304e6f23" CreationDate="2022-04-06T11:33:39.010" UserId="2102" Text="I'm facing the same kind of question I think. The problem is that it doesn't really matter if your extrinsic is executed correctly or not, if the transaction submitted is correct (the structure and data), it will be added to the chain.&#xD;&#xA;&#xD;&#xA;I haven't find an easier way to determine if the execution was okay or not, but there's this page that I'm sure will help &#xD;&#xA;&#xD;&#xA;Polkadot API: https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-determine-if-an-extrinsic-succeededfailed&#xD;&#xA;&#xD;&#xA;Keep in mind that the extrinsic hash might not be unique at some point, so you need to combine block number and extrinsic hash to ensure you are getting the right events.&#xD;&#xA;&#xD;&#xA;The following threads are also useful:&#xD;&#xA;&#xD;&#xA;*How to get extrinsic details by extrinsic hash*: https://github.com/polkadot-js/api/issues/2326&#xD;&#xA;&#xD;&#xA;*Extrinsic hash from Event, How to?*: https://github.com/polkadot-js/api/issues/4240" ContentLicense="CC BY-SA 4.0" />
  <row Id="6089" PostHistoryTypeId="2" PostId="1652" RevisionGUID="cc813c6b-0784-4c50-a973-92aae8e5a4c0" CreationDate="2022-04-06T11:43:21.963" UserId="627" Text="The environment has 2 parts: the on-chain runtime (WASM) and then the node that executes the actual runtime. &#xD;&#xA;&#xD;&#xA;Effectively the runtime deals with everything that happens on-chain. The node deals with everything that interfaces with the physical world, e.g. Database access (the runtime has host calls to communicate with the DB), WS/HTTP interfaces, etc.&#xD;&#xA;&#xD;&#xA;Therefore the node/binary provides the RPC interfaces itself and if there are changes on this layer, the binary itself needs an update. Some RPCs will indeed call into the runtime, others may not (for instance if you get network stats, this is only extracted from the P2P interfaces).&#xD;&#xA;&#xD;&#xA;The short version: if you add a new pallet or extrinsic, upgrade the runtime. If you add a new RPC, upgrade the node binary." ContentLicense="CC BY-SA 4.0" />
  <row Id="6092" PostHistoryTypeId="2" PostId="1653" RevisionGUID="a5df4b2f-8965-4507-bbe7-b2a1b472f657" CreationDate="2022-04-06T11:59:39.760" UserId="80" Text="I am trying to write a discord bot using rust/serenity to verify signature signed using polkadot.js app. I use `schnorrkel` crate, wrap the message in `&lt;Bytes&gt;...&lt;/Bytes&gt;` and use the [verify method][1] to do this. Everything works as expected for sr25519 signatures. But if the user has generated an ed25519 keypair, this fails. &#xD;&#xA;&#xD;&#xA;How can I verify ed25519 signatures? Can I figure out from the signature (or public key) if it has been generated by a ed25519 keypair? I tried with [ed25519_dalek][2] crate but could not make it work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/schnorrkel/0.10.2/schnorrkel/keys/struct.PublicKey.html#method.verify&#xD;&#xA;  [2]: https://docs.rs/ed25519-dalek/latest/ed25519_dalek/" ContentLicense="CC BY-SA 4.0" />
  <row Id="6094" PostHistoryTypeId="1" PostId="1653" RevisionGUID="a5df4b2f-8965-4507-bbe7-b2a1b472f657" CreationDate="2022-04-06T11:59:39.760" UserId="80" Text="How do I verify a signature signed using Polkadot.js app with rust code" ContentLicense="CC BY-SA 4.0" />
  <row Id="6095" PostHistoryTypeId="3" PostId="1653" RevisionGUID="a5df4b2f-8965-4507-bbe7-b2a1b472f657" CreationDate="2022-04-06T11:59:39.760" UserId="80" Text="|polkadot-js|rust|cryptography|ed25519|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6096" PostHistoryTypeId="6" PostId="1160" RevisionGUID="21df58bd-e2a3-4576-9cf5-6e1f8386bcfb" CreationDate="2022-04-06T12:16:40.837" UserId="172" Comment="edited tags" Text="|frame|testing|genesis|kitties-tutorial|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6097" PostHistoryTypeId="2" PostId="1654" RevisionGUID="00e78e09-d257-4bf7-8262-070fafe2c7ab" CreationDate="2022-04-06T12:36:45.337" UserId="172" Text="There are some good conceptual explainers on what [anonymous proxies](https://wiki.polkadot.network/docs/learn-proxies#anonymous-proxies) are, yet it's not clear to me which use cases they serve best.&#xD;&#xA;&#xD;&#xA;What are some problems that using anonymous proxies would solve? What are some concrete case studies?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6099" PostHistoryTypeId="1" PostId="1654" RevisionGUID="00e78e09-d257-4bf7-8262-070fafe2c7ab" CreationDate="2022-04-06T12:36:45.337" UserId="172" Text="What are some good use cases for anonymous proxies?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6100" PostHistoryTypeId="3" PostId="1654" RevisionGUID="00e78e09-d257-4bf7-8262-070fafe2c7ab" CreationDate="2022-04-06T12:36:45.337" UserId="172" Text="|frame|account|proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6101" PostHistoryTypeId="2" PostId="1655" RevisionGUID="c576e5ce-9b17-498f-a948-3f65ee66d9d2" CreationDate="2022-04-06T12:54:57.953" UserId="627" Text="The JS side actually operates via WASM (if available, which is 99.99% of the cases). When using WASM it uses the same `ed25519_dalek` crate you pointed to. &#xD;&#xA;&#xD;&#xA;Specifically [here is the Rust/WASM code](https://github.com/polkadot-js/wasm/blob/e435c1e7b8287dd8ceb5bec566abd6d918e58268/packages/wasm-crypto/src/rs/ed25519.rs#L59-L72&#xD;&#xA;) it uses for ed25519 verification.&#xD;&#xA;&#xD;&#xA;(There are WASM and non-WASM tests on the JS libs to ensure that they do match, i.e. the WASM verification should align with a pure JS implementation as well)" ContentLicense="CC BY-SA 4.0" />
  <row Id="6103" PostHistoryTypeId="2" PostId="1656" RevisionGUID="4bc90d0b-7d91-47c2-ba76-521b490af74d" CreationDate="2022-04-06T12:55:23.667" UserId="620" Text="One good use case is to be able to transfer ownership of a multisig member. Since multisig `AccountId`s are derived based on their members, changing one member changes the address of the multisig. If that account is staked or otherwise locked into some long-term commitment, it can be overly burdensome to change a member.&#xD;&#xA;&#xD;&#xA;However, if all members are anonymous proxies, one member can simply set a new proxy to the anonymous (proxied account) and renounce their proxy rights.&#xD;&#xA;&#xD;&#xA;Concretely, this is useful e.g. in a company that uses multisigs to manage its assets, but has employees join or leave the company. When an employee who is a member of a multisig leaves, they can transfer that member to a new employee." ContentLicense="CC BY-SA 4.0" />
  <row Id="6105" PostHistoryTypeId="5" PostId="1630" RevisionGUID="08cc6a83-5921-4185-8d50-fb81d3dd4a37" CreationDate="2022-04-06T12:56:10.290" UserId="139" Comment="Changes are incompatible with the sessions pallet" Text="Currently I am starting my node with one authority, and the genesis config for grandpa looks like this : &#xD;&#xA;```rust&#xD;&#xA;grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;```&#xD;&#xA;Would it be possible to assign some privileged accounts more weight in the Grandpa voting round after adding them to this `authorities` list like so? &#xD;&#xA;```rust&#xD;&#xA;grandpa: GrandpaConfig { authorities: intial_authorities.map(|x| (x.3.clone(), 10)) }&#xD;&#xA;```&#xD;&#xA;where assume `x.3` is the `GrandpaId` of `initial_authorities`. What kind of changes would this entail?&#xD;&#xA;&#xD;&#xA;Edit: This doesn't work with the sessions pallet as it panics with an authority already initialized error. Anyway to bypass this behaviour and set custom weights to our grandpa authorities on genesis?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6106" PostHistoryTypeId="6" PostId="1630" RevisionGUID="08cc6a83-5921-4185-8d50-fb81d3dd4a37" CreationDate="2022-04-06T12:56:10.290" UserId="139" Comment="Changes are incompatible with the sessions pallet" Text="|grandpa|finality|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6107" PostHistoryTypeId="2" PostId="1657" RevisionGUID="e84f1bd4-2758-43f9-998c-b4c883dabae6" CreationDate="2022-04-06T13:03:04.293" UserId="342" Text="**If the two nodes are not on the same local network** I suggest you to restart the first node and grab its p2p PeerId.&#xD;&#xA;&#xD;&#xA;It should print it during startup phase:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-04-06 14:47:07   Local node identity is: 12D3KooWLWcgKzEUsdPewa7mppXv8u3ZypqwgiQzRYLA93JAz52C                                              &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Restart the second node using the first node peer id, ipv4 address and tcp port for discovery&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./substrate [some options] --bootnodes /ip4/&lt;ipv4-addr&gt;/tcp/&lt;p2p-tcp-port&gt;/p2p/12D3KooWLWcgKzEUsdPewa7mppXv8u3ZypqwgiQzRYLA93JAz52C&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(Default p2p-tcp-port is 30333)&#xD;&#xA;&#xD;&#xA;**If the two nodes are on the same local network** then you should not require to do this since mDNS discovery is enabled by default.&#xD;&#xA;In this case the cause could be the firewall blocking mdns port (udp 5353)." ContentLicense="CC BY-SA 4.0" />
  <row Id="6109" PostHistoryTypeId="2" PostId="1658" RevisionGUID="69f30dc2-550f-42c2-8900-7a40155e199b" CreationDate="2022-04-06T13:41:50.697" UserId="139" Text="From a security standpoint I'd like to understand who can peer with my node. Let's say I make the chainspec public, and someone comes along with a different node binary, and peers with my node, with a malicious pallet, would that happen or something would prevent such a thing from happening? &#xD;&#xA;&#xD;&#xA;I ask this because I am trying to understand what kind of security threats, besides keys being stolen &amp; DoS, are possible on the node itself." ContentLicense="CC BY-SA 4.0" />
  <row Id="6111" PostHistoryTypeId="1" PostId="1658" RevisionGUID="69f30dc2-550f-42c2-8900-7a40155e199b" CreationDate="2022-04-06T13:41:50.697" UserId="139" Text="What factors determine who can peer with my node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6112" PostHistoryTypeId="3" PostId="1658" RevisionGUID="69f30dc2-550f-42c2-8900-7a40155e199b" CreationDate="2022-04-06T13:41:50.697" UserId="139" Text="|networking|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6113" PostHistoryTypeId="2" PostId="1659" RevisionGUID="603d801b-af83-4805-a28e-4696de43bf0a" CreationDate="2022-04-06T13:47:28.310" UserId="2107" Text="I'm a newbie with rust and substrate. I'm currently trying to build a PSP34 compatible smart contract (NFT) for documents. In this contract, I'd like to have the following structure:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Default, Debug, Clone, Encode, Decode)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;pub struct DocumentInfo {&#xD;&#xA;    // ...&#xD;&#xA;    /// Mapping to check who has signed&#xD;&#xA;    pub signatures: Mapping&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then, in the smart contract, I'm using OpenBrush and it has the following storage definition:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate, PSP34Storage)]&#xD;&#xA;    pub struct DocumentContract {&#xD;&#xA;        #[PSP34StorageField]&#xD;&#xA;        psp34: PSP34Data,&#xD;&#xA;&#xD;&#xA;        // Fields of current contract&#xD;&#xA;        /// mapping from token id to `DocumentInfo`&#xD;&#xA;        document_info: Mapping&lt;Id, DocumentInfo&gt;,&#xD;&#xA;        /// the id of last document&#xD;&#xA;        last_document_id: Id,&#xD;&#xA;        /// ids no longer used (can be reused)&#xD;&#xA;        freed_ids: Vec&lt;Id&gt;,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The problem is that the signatures mapping gives me the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; | #[derive(Default, Debug, Clone, Encode, Decode)]&#xD;&#xA;   |                          ----- in this derive macro expansion&#xD;&#xA;...&#xD;&#xA;53 |     pub signatures: Mapping&lt;AccountId, ()&gt;,&#xD;&#xA;   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `Mapping&lt;ink_env::AccountId, ()&gt;`&#xD;&#xA;   |&#xD;&#xA;   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Mapping&lt;ink_env::AccountId, ()&gt;: WrapperTypeEncode` is not satisfied&#xD;&#xA;  --&gt; traits/document.rs:39:33&#xD;&#xA;   |&#xD;&#xA;39 | #[derive(Default, Debug, Clone, Encode, Decode)]&#xD;&#xA;   |                                 ^^^^^^ the trait `WrapperTypeEncode` is not implemented for `Mapping&lt;ink_env::AccountId, ()&gt;`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `Encode` for `Mapping&lt;ink_env::AccountId, ()&gt;`&#xD;&#xA;   = note: this error originates in the derive macro `Encode` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Mapping&lt;ink_env::AccountId, ()&gt;: WrapperTypeDecode` is not satisfied&#xD;&#xA;  --&gt; traits/document.rs:53:5&#xD;&#xA;   |&#xD;&#xA;53 |     pub signatures: Mapping&lt;AccountId, ()&gt;,&#xD;&#xA;   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `Mapping&lt;ink_env::AccountId, ()&gt;`&#xD;&#xA;   |&#xD;&#xA;   = note: required because of the requirements on the impl of `parity_scale_codec::Decode` for `Mapping&lt;ink_env::AccountId, ()&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I kind of understand what the errors mean, but not really and I have no clue how to fix it. Would appreciate if someone could shine a light on this for me." ContentLicense="CC BY-SA 4.0" />
  <row Id="6115" PostHistoryTypeId="1" PostId="1659" RevisionGUID="603d801b-af83-4805-a28e-4696de43bf0a" CreationDate="2022-04-06T13:47:28.310" UserId="2107" Text="How to have a mapping in a custom structure inside an ink! contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6116" PostHistoryTypeId="3" PostId="1659" RevisionGUID="603d801b-af83-4805-a28e-4696de43bf0a" CreationDate="2022-04-06T13:47:28.310" UserId="2107" Text="|rust|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6118" PostHistoryTypeId="2" PostId="1660" RevisionGUID="fa7a0594-e586-436f-ae46-62e5e8974e8b" CreationDate="2022-04-06T13:56:58.640" UserId="1866" Text="For cli, you can use the [polkadot-js api-cli](https://github.com/polkadot-js/tools/tree/master/packages/api-cli) -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;$ polkadot-js-api --seed ... --tx tx.session.setKeys 0x....&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There is also a docker image available with all the `polkadot-js/tools` tools." ContentLicense="CC BY-SA 4.0" />
  <row Id="6120" PostHistoryTypeId="10" PostId="1475" RevisionGUID="c62aecc9-4373-41f2-a7a3-1b0d61055e96" CreationDate="2022-04-06T13:59:15.473" UserId="-1" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:544,&quot;DisplayName&quot;:&quot;h4x3rotab&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:499,&quot;DisplayName&quot;:&quot;Tom Nash&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[1]}" />
  <row Id="6121" PostHistoryTypeId="2" PostId="1661" RevisionGUID="ed2bd1ca-d58e-4571-8390-830417f72f60" CreationDate="2022-04-06T13:59:24.717" UserId="1866" Text="Since the sessions &amp; staking generally work on epochs, you don't want to make a change mid-flight. So anything staking-related is (purposefully) delayed." ContentLicense="CC BY-SA 4.0" />
  <row Id="6123" PostHistoryTypeId="2" PostId="1662" RevisionGUID="878c27fb-cf1f-4e1c-952a-588997fb57bf" CreationDate="2022-04-06T14:00:28.523" UserId="2155" Text="I was recently reading the code for substrate wasmtime, but I ran into some problems. I don't really understand the difference between `runtime` and `sandbox`.&#xD;&#xA;&#xD;&#xA;For example, in the file `substrate/client/executor/wasmtime/src/runtime.rs`, we can call the method `call()` of `WasmtimeInstance` to execute the functions in the wasm instance. Also, in the `substrate/client/executor/wasmtime/src/host.rs` file, is the `invoke()` function implemented for `HostContext` also executing functions in the wasm instance?&#xD;&#xA;&#xD;&#xA;What is the difference between the runtime instance and the sandbox instance?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="6125" PostHistoryTypeId="1" PostId="1662" RevisionGUID="878c27fb-cf1f-4e1c-952a-588997fb57bf" CreationDate="2022-04-06T14:00:28.523" UserId="2155" Text="What is the relationship between `sandbox`, `executor` and `runtime`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6126" PostHistoryTypeId="3" PostId="1662" RevisionGUID="878c27fb-cf1f-4e1c-952a-588997fb57bf" CreationDate="2022-04-06T14:00:28.523" UserId="2155" Text="|runtime|wasmtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6127" PostHistoryTypeId="2" PostId="1663" RevisionGUID="a5d74c89-ac4a-4665-8dde-63ecb6ebafac" CreationDate="2022-04-06T14:01:45.583" UserId="1866" Text="For the on-chain RMRK protocol, it is indeed the case. However,&#xD;&#xA;&#xD;&#xA; - RMRK has a new version on Moonriver&#xD;&#xA; - Statemine's assets doesn't have this issue&#xD;&#xA;&#xD;&#xA;Basically the initial implementation (as I understand) was pushing the chain itself into directions it didn't have pallets for (and no contracts existed), using tools at-hand. In this case remarks.&#xD;&#xA;&#xD;&#xA;Expect chaos... I guess :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="6129" PostHistoryTypeId="2" PostId="1664" RevisionGUID="2ecf03bc-8dde-436c-868b-768ae5a19e57" CreationDate="2022-04-06T14:04:30.603" UserId="1866" Text="I checked the current apps UI against these chains. As explained in the comment above, it seems to have indeed been a misconfiguration when the chain was added on the UI - the types were not mapped on the correct spec.&#xD;&#xA;&#xD;&#xA;As of now, even checking in the developer console as per the linked issue in the comment above, the header is correctly constructed." ContentLicense="CC BY-SA 4.0" />
  <row Id="6131" PostHistoryTypeId="2" PostId="1665" RevisionGUID="a1553b32-e6c3-49dc-b3e0-645da34090a9" CreationDate="2022-04-06T14:11:45.057" UserId="1866" Text="If submitted via subxt, if you view the specific block inside the apps UI, the extrinsic will be decoded - so you can compare one submitted in another blocks (via JS) to one submitted in a recent block (via subxt).&#xD;&#xA;&#xD;&#xA;Since you copied the hash, I'm assuming you could see the extrinsic.&#xD;&#xA;&#xD;&#xA;Alternatively, make a rpc query for that block and copy/paste the extrinsic response (hex string) into the UI to be decoded." ContentLicense="CC BY-SA 4.0" />
  <row Id="6134" PostHistoryTypeId="2" PostId="1666" RevisionGUID="330cfdda-18bb-4e4c-aa74-9feec204d1be" CreationDate="2022-04-06T14:18:36.253" UserId="45" Text="It is hard to tell what happens with this particular configuration. There are many parameters in play. Instead, I can give a rough description of what should happen within that period. Having that you can tell if that works in your case or not. I can say that in general case of a public blockchain network this will unlikely work.&#xD;&#xA;&#xD;&#xA;Now, you can expect the following things to happen during the block time:&#xD;&#xA;&#xD;&#xA;1. A block producer should import the current block. That means executing the runtime with the contents of the block, primarily the transactions.&#xD;&#xA;2. The result of block execution should be written into the database. This, however, can be performed asynchronously. It still will take some CPU, IO and memory bandwidth, and thus may need to be taken into account.&#xD;&#xA;3. At some point the block producer will need to come up with its own block. It will fetch transactions ready for inclusion and try to apply them. This may take more time than importing a corresponding block, since the block producer may try to apply a transaction but roll it back.&#xD;&#xA;4. The created block and its state changes will have to be saved into the database.&#xD;&#xA;5. The block producer then will have to disseminate the block to its neighboring peers. The peers in turn will do the same. Hopefully that will lead to each and every node being aware of that block in a certain amount of time. This process is not instantaneous and depends on how the nodes are connected, their bandwidth and etc.&#xD;&#xA;6. At some point the next block producer will have to produce a block.&#xD;&#xA;&#xD;&#xA;Note that at certain low configuration of block time, the next block producer might have not received the current block. In that case, the next block producer will create a block chained to the previous and not the current block. This is not the end of the world, but it will lead to wasted effort, which will in turn affect the worsen the performance.&#xD;&#xA;&#xD;&#xA;There is [an article](https://vitalik.ca/general/2021/05/23/scaling.html) which expands on this.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6136" PostHistoryTypeId="2" PostId="1667" RevisionGUID="636ec07d-dd04-4bf6-b37a-7d39b4dfda55" CreationDate="2022-04-06T14:28:12.787" UserId="697" Text="only developers should answer this question but i have somthings to notice:&#xD;&#xA;&#xD;&#xA; 1. you can use an `array` instead of `Mapping` for signatures&#xD;&#xA; 2. the `DocumentInfo` needs `#[ink(storage)]` and any maps inside of it should be initialized with `ink_lang::utils::initialize_contract` inside `new` or any `constructor` of `DocumentInfo`" ContentLicense="CC BY-SA 4.0" />
  <row Id="6138" PostHistoryTypeId="2" PostId="1668" RevisionGUID="abcd6121-fe51-4053-8696-fbfa1bfd75cc" CreationDate="2022-04-06T15:00:54.583" UserId="2107" Text="Found the reason for the problem. Basically it is because I'm using a mapping inside a mapping and that is not allowed (https://github.com/paritytech/ink/issues/1175). The solution is to have this information outside the struct as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate, PSP34Storage)]&#xD;&#xA;    pub struct DocumentContract {&#xD;&#xA;        #[PSP34StorageField]&#xD;&#xA;        psp34: PSP34Data,&#xD;&#xA;&#xD;&#xA;        // Fields of current contract&#xD;&#xA;        /// mapping from token id to `DocumentInfo`&#xD;&#xA;        document_info: Mapping&lt;Id, DocumentInfo&gt;,&#xD;&#xA;        /// Mapping with tuple key&#xD;&#xA;        signatures: Mapping&lt;(Id, AccountId), ()&gt;,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6147" PostHistoryTypeId="2" PostId="1670" RevisionGUID="a3aa7b9e-8868-4d16-a9fe-e1ddd33e3afa" CreationDate="2022-04-06T15:59:00.543" UserId="73" Text="There is no sorted storage type. That would be way too expensive to realize, just imagine adding an item how many storage reads that would need. However, for small things you can just use a storage value that uses a `BTreeMap` as type. Here you just need to be aware that every time you access it, you would need to decode the entire `BTreeMap`. In the end it boils down to what you want to achieve and what are your constraints." ContentLicense="CC BY-SA 4.0" />
  <row Id="6149" PostHistoryTypeId="5" PostId="31" RevisionGUID="578be32c-5bb3-4aa9-9dce-aba182763f94" CreationDate="2022-04-06T16:47:30.050" UserId="172" Comment="Put URL as hyperlink." Text="You can turn your substrate into being as close as possible to ethereum by adopting ethereum conventions for example changing address types to match. But if you do that, those addresses need a translation step when talking to other parachains (not a problem if you have a solo chain). It's a question of trade offs and finding a happy medium.&#xD;&#xA;&#xD;&#xA;There was a [fantastic walk-though of how to create a compatible chain at Sub0](https://www.youtube.com/watch?v=V9KfvhoqLJ4&#xD;&#xA;)&#xD;&#xA;(it's intense but an amazing demonstration of the flexibility that the generics gives you).&#xD;&#xA;&#xD;&#xA;Remember the other option which may be more appropriate to your use case is rather than doing all the work to build an EVM compatible chain, you could build on one of the existing EVM compatible chain platforms like Moonbeam, Acala or Astar for example that each have chosen different tradeoffs on EVM compatibility." ContentLicense="CC BY-SA 4.0" />
  <row Id="6150" PostHistoryTypeId="5" PostId="1662" RevisionGUID="39da8520-4939-4074-b2ee-40cfe08dea3b" CreationDate="2022-04-06T16:55:18.060" UserId="172" Comment="Improve post quality." Text="I was recently reading the [code for Substrate wasmtime](https://github.com/paritytech/substrate/tree/master/client/executor/wasmtime), but I ran into some problems. I don't really understand the difference between `runtime` and `sandbox`.&#xD;&#xA;&#xD;&#xA;For example, in the [`runtime.rs`](https://github.com/paritytech/substrate/blob/c89d524dea7bfb474f2e036ebc486fca9c81533f/client/executor/wasmtime/src/runtime.rs) file, we can call the `call()` method of `WasmtimeInstance` to execute the functions in the wasm instance. Also, in the [`host.rs`](https://github.com/paritytech/substrate/blob/c89d524dea7bfb474f2e036ebc486fca9c81533f/client/executor/wasmtime/src/host.rs) file, is the `invoke()` function implemented for `HostContext` also executing functions in the wasm instance?&#xD;&#xA;&#xD;&#xA;What is the difference between the runtime instance and the sandbox instance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6151" PostHistoryTypeId="2" PostId="1671" RevisionGUID="56ca18cb-dbf6-4e99-b752-4b1ec68fe86e" CreationDate="2022-04-06T16:57:12.200" UserId="45" Text="Commonly, &quot;Runtime&quot; refers to something that performs or aids execution. However, historically, what we call a &quot;Runtime&quot; differs from how the word is commonly used. &quot;Runtime&quot; in the context of Substrate is the wasm image that is being executed to instruct how the Substrate client should behave: how to execute block or how to validate a transaction.&#xD;&#xA;&#xD;&#xA;Executor is what we picked to refer to the machinery that executes the wasm &quot;Runtime&quot;. Substrate has two executors on board: wasmi and wasmtime. Alternatively, you can also see it being referred as &quot;execution engine&quot;.&#xD;&#xA;&#xD;&#xA;So that is, when Substrate imports a block it executes it by calling into a &quot;Runtime API&quot; called `execute_block`, by asking either wasmtime or wasmi to create a &quot;Runtime&quot; instance and execute the aforementioned entrypoint.&#xD;&#xA;&#xD;&#xA;With that sorted, we can now move on to &quot;sandbox&quot;. Substrate supports execution of smart-contracts that are represented by Wasm code. Naive approach to execute Wasm smart-contracts inside Wasm &quot;Runtime&quot; is for example compile wasm interpreter in and use that. A more sophisticated approach is to allow the Wasm &quot;Runtime&quot; to create wasm instances. That feature in Substrate is referred as &quot;Sandbox&quot;. We are [thinking](https://github.com/paritytech/substrate/issues/10297) of changing of how we refer to that feature to Wasm Virtualization.&#xD;&#xA;&#xD;&#xA;The logic of the code is a bit convoluted. To understand what happens there we need to learn one more term.&#xD;&#xA;&#xD;&#xA;In general, Wasm is a limited and abstract environment. Usually, the Wasm environment supposed to have a certain set of functions that interact with the external environment. Those are called host functions. They are provided by the embedder of the Wasm implementation. In our case we can say that &quot;Runtime&quot; communicates with the Substrate by calling the host functions.&#xD;&#xA;&#xD;&#xA;The Sandbox feature is represented by a set of host functions. When a &quot;Runtime&quot; wants to create a sandbox instance it will ask Substrate by calling a specific host function to do that.&#xD;&#xA;&#xD;&#xA;Note that since executed Wasm code usually requires a set of host functions to do something useful, the &quot;Runtime&quot; needs to specify those host functions. To be useful and contextualized those host functions are provided by the &quot;Runtime&quot;.&#xD;&#xA;&#xD;&#xA;Now, let's examine the following example: a &quot;Runtime&quot; executes a transaction that creates a smart-contract through Sandbox which then stores something in storage.&#xD;&#xA;&#xD;&#xA;In this case, the &quot;Runtime&quot; will create a sandbox instance by passing in the code of the instantiated Wasm module and the host functions available to the said module. In this case the provided host function is, say, `ext_set_storage`. Then the &quot;Runtime&quot; passes the control to the smart-contract sandbox instance. It executes code and eventually calls the `ext_set_storage` function. Then the `ext_set_storage` gets control within the Runtime and sets the storage.&#xD;&#xA;&#xD;&#xA;Now due to the technical limitations, the sandboxed instance cannot directly call the &quot;Runtime&quot;. But we smooth it out by providing some trampolines that will convert calls to the sandboxed host to the Runtime. This is exactly the code you stumbled upon.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6153" PostHistoryTypeId="2" PostId="1672" RevisionGUID="d2196c34-1bc3-43c5-9ac0-a523f89abec2" CreationDate="2022-04-06T17:01:46.040" UserId="283" Text="GRANDPA as a gadget is meant to function on top of something like BABE, which is a blockchain extension process that is itself eventually consistent. The only goal of GRANDPA is to speed up the eventual consistency where that is possible.&#xD;&#xA;&#xD;&#xA;If for some reason, more than 1/3 of nodes began to disrespect the expected BABE fork-choice rule that is used as input for vote in GRANDPA, nodes would defer to the GRANDPA validators to determine what is finalized. One reason for this is that it's difficult (prior to achieving consensus) to prove that a node has received some piece of information, such as a block, before taking a particular action. This means that it's not really feasible to slash or ignore GRANDPA voters who don't appear to be respecting the fork-choice rule. &#xD;&#xA;&#xD;&#xA;So to answer your question: in the Substrate implementation of GRANDPA, nodes will defer to GRANDPA finality over the BABE fork-choice rule even if they appear to be in conflict with one another." ContentLicense="CC BY-SA 4.0" />
  <row Id="6155" PostHistoryTypeId="5" PostId="1643" RevisionGUID="daabdd98-3384-4b03-a4cf-7651d7c2944d" CreationDate="2022-04-06T17:10:37.143" UserId="172" Comment="Clarified question and improved quality." Text="I am running the [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node) and using the contracts UI to interact with it in Polkadot JS Apps. The contract call is failing when I try using the UI, although the same call works from a `subxt` test program.&#xD;&#xA;&#xD;&#xA;Steps to reproduce:&#xD;&#xA;1. Create smart contracts via the upload&amp;deploy button. [![enter image description here][1]][1]&#xD;&#xA;2. Call it's method via the UI.&#xD;&#xA;&#xD;&#xA;Since my contract failed with `ContractTrapped`, I went to the events tab to view the extrinsic and it's parameters. Using this I:&#xD;&#xA;1. Reproduced the contract and called it from a test program using `subxt`.&#xD;&#xA;2. I verified that it passed without problem.&#xD;&#xA;3. I copied the extrinsic hash from the original failed extrinsic [![enter image description here][2]][2]&#xD;&#xA;4. I pasted it under the extrinsics tab to decode it. But it was **unable to decode the extrinsic**. [![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Why is the contract extrinsic undecodable? I'm suspecting the extrinsic created from the frontend is way different than hand rolling it via subxt.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Kieft.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/G0R5M.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/6FZWc.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6156" PostHistoryTypeId="4" PostId="1643" RevisionGUID="daabdd98-3384-4b03-a4cf-7651d7c2944d" CreationDate="2022-04-06T17:10:37.143" UserId="172" Comment="Clarified question and improved quality." Text="Why can't I decode an extrinsic created with the contracts tab in Polkadot JS apps?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6157" PostHistoryTypeId="2" PostId="1673" RevisionGUID="2c199ff4-053a-4dad-9bf0-e09570d84e24" CreationDate="2022-04-06T17:18:08.757" UserId="283" Text="To directly answer the question as stated: yes, you can connect to multiple bootnodes.&#xD;&#xA;&#xD;&#xA;Libp2p is meant to discover nodes from its connected nodes by using a [Kademlia](https://github.com/libp2p/rust-libp2p/blob/7a1147877a52c7150190acdef35676cdac370299/protocols/kad/src/lib.rs#L23) implementation of a Distributed Hash Table (DHT).&#xD;&#xA;&#xD;&#xA;Oftentimes, in my experience, nodes on the same machine often discover each other without bootnodes through the use of [MDNS](https://tools.ietf.org/html/rfc6762), which libp2p also implements. This is, for example, why you can run two nodes on a `--local` development chain without updating the chain-spec and it will work.&#xD;&#xA;&#xD;&#xA;You can specify multiple bootnodes either in the chain spec JSON file or override them on the command line with the `--bootnodes` flag.&#xD;&#xA;&#xD;&#xA;For example, here's the Rococo v2_1 chain-spec, which gives many boot nodes.&#xD;&#xA;&#xD;&#xA;```JSON&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;Rococo&quot;,&#xD;&#xA;  &quot;id&quot;: &quot;rococo_v2_1&quot;,&#xD;&#xA;  &quot;chainType&quot;: &quot;Live&quot;,&#xD;&#xA;  &quot;bootNodes&quot;: [&#xD;&#xA;    &quot;/ip4/34.90.151.124/tcp/30333/p2p/12D3KooWF7BUbG5ErMZ47ZdarRwtpZamgcZqxwpnFzkhjc1spHnP&quot;,&#xD;&#xA;    &quot;/ip4/34.90.151.124/tcp/30334/ws/p2p/12D3KooWF7BUbG5ErMZ47ZdarRwtpZamgcZqxwpnFzkhjc1spHnP&quot;,&#xD;&#xA;    &quot;/ip4/34.90.137.14/tcp/30333/p2p/12D3KooWLcpkpvjr5ccgtUdTSYtNDjEdsDcPNrt2Rb7yXuAf7bUE&quot;,&#xD;&#xA;    &quot;/ip4/34.90.137.14/tcp/30334/ws/p2p/12D3KooWLcpkpvjr5ccgtUdTSYtNDjEdsDcPNrt2Rb7yXuAf7bUE&quot;,&#xD;&#xA;    &quot;/ip4/35.204.67.254/tcp/30333/p2p/12D3KooWGjEEDmNbBkXLM1uKMseK9iYD3osKA4JGdGKMZDCusjd6&quot;,&#xD;&#xA;    &quot;/ip4/35.204.67.254/tcp/30334/ws/p2p/12D3KooWGjEEDmNbBkXLM1uKMseK9iYD3osKA4JGdGKMZDCusjd6&quot;,&#xD;&#xA;    &quot;/ip4/34.90.121.39/tcp/30333/p2p/12D3KooWBhkZQydNHDR3XSehnrfj1KNFCdpwgDrYpX54FrUR1FRS&quot;,&#xD;&#xA;    &quot;/ip4/34.90.121.39/tcp/30334/ws/p2p/12D3KooWBhkZQydNHDR3XSehnrfj1KNFCdpwgDrYpX54FrUR1FRS&quot;,&#xD;&#xA;    &quot;/ip4/34.91.145.35/tcp/30333/p2p/12D3KooWBuLAMevZexnFKCgTyoz3AnHQn98D9cfe1Mg3kPoCjkwf&quot;,&#xD;&#xA;    &quot;/ip4/34.91.145.35/tcp/30334/ws/p2p/12D3KooWBuLAMevZexnFKCgTyoz3AnHQn98D9cfe1Mg3kPoCjkwf&quot;,&#xD;&#xA;    &quot;/ip4/34.91.77.80/tcp/30333/p2p/12D3KooWA5BAM71y9NtV5NH6EjANgYKRZ8jNLJ5z8GJ5RPdjt63n&quot;,&#xD;&#xA;    &quot;/ip4/34.91.77.80/tcp/30334/ws/p2p/12D3KooWA5BAM71y9NtV5NH6EjANgYKRZ8jNLJ5z8GJ5RPdjt63n&quot;,&#xD;&#xA;    &quot;/ip4/34.91.84.25/tcp/30333/p2p/12D3KooWSV4VqhBHZKKBsZKmVU462qRW9PmXTSuYvuajt1P93djA&quot;,&#xD;&#xA;    &quot;/ip4/34.91.84.25/tcp/30334/ws/p2p/12D3KooWSV4VqhBHZKKBsZKmVU462qRW9PmXTSuYvuajt1P93djA&quot;,&#xD;&#xA;    &quot;/ip4/34.91.97.19/tcp/30333/p2p/12D3KooWD6wC88atMMyVeP6ZKg9sK7QmUL8x8m1RxMW8rhv2vWyg&quot;,&#xD;&#xA;    &quot;/ip4/34.91.97.19/tcp/30334/ws/p2p/12D3KooWD6wC88atMMyVeP6ZKg9sK7QmUL8x8m1RxMW8rhv2vWyg&quot;&#xD;&#xA;  ],&#xD;&#xA;  # ... much omitted&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And the help text for `--bootnodes` is: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--bootnodes &lt;ADDR&gt;...                                        &#xD;&#xA;            Specify a list of bootnodes&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6159" PostHistoryTypeId="5" PostId="211" RevisionGUID="cd3a5f20-8bc1-4c89-b234-019185fd8570" CreationDate="2022-04-06T17:28:32.870" UserId="104" Comment="Use more accurate wording" Text="To add onto Shawn's detailed answer, the XCM format is comprised of a set of instructions that convey semantics and optionally contain operands that is defined by the spec for the chain that processes the instructions.&#xD;&#xA;&#xD;&#xA;For example, one of the basic XCM instructions is `WithdrawAsset`, and if we take a look at the spec, it says the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Remove the on-chain asset(s) (assets) and accrue them into Holding.&#xD;&#xA;&#xD;&#xA;Operands:&#xD;&#xA;&#xD;&#xA; * assets: MultiAssets: The asset(s) to be removed; must be owned by Origin.&#xD;&#xA;&#xD;&#xA;Kind: Instruction.&#xD;&#xA;&#xD;&#xA;Errors: Fallible.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The first paragraph in the spec denotes _what_ the `WithdrawAsset` instruction is aimed to do -- remove on-chain assets owned by the origin (i.e. the account that submitted the XCM instruction) and put it into the holding [register].&#xD;&#xA;&#xD;&#xA;The next item there lists out the operands that `WithdrawAsset` is expected to contain. We see that there's only one operand called `assets`, and it is used to indicate the assets -- both the class and amount of assets -- that we want to remove from the origin.&#xD;&#xA;&#xD;&#xA;After that, we see the kind of XCM instruction that `WithdrawAsset` belongs to. Despite it being called &quot;XCM instructions&quot;, some of them are not strictly &quot;instructions&quot; in the sense that they are used to orchestrate actions or behavioural changes; `ReserveAssetDeposited` would be one such XCM &quot;instruction&quot; that is not a kind of instruction, but a kind of &quot;trusted indication&quot;, as it is used to truthfully inform its destination that some assets have been put into its account on the reserve chain. Needless to say though, `WithdrawAsset` is a kind of instruction.&#xD;&#xA;&#xD;&#xA;Finally, we are informed about whether or not the instruction is fallible or not. Later versions of the spec may eventually add the kinds of errors that we would expect to see when errors are thrown whilst processing an XCM instruction.&#xD;&#xA;&#xD;&#xA;What you won't see in the spec here is _how_ exactly the consensus system that executes the XCM instructions is supposed to process them; that is left for the implementors of the consensus system to decide. To give a concrete example with `WithdrawAsset`, the spec only defines the format of the instruction and the purpose of it. The exact functions to call or modules to include is not mentioned at all within the spec, meaning that it really doesn't matter if the implementor has used the balances pallet, the assets pallet or even some other mechanism to withdraw assets from the origin account, as long as the methods used fulfills the objective of &quot;removing the on-chain assets and accrue them into the holding register&quot;.&#xD;&#xA;&#xD;&#xA;A corollary to what I have mentioned above is that implementors may even introduce side effects while processing a particular XCM instruction, such as making logs of the instructions that it has processed, or firing off events based on conditions, etc. In XCM, we simply don't quite care about these side effects, as long as the consensus system can produce the specified semantics." ContentLicense="CC BY-SA 4.0" />
  <row Id="6160" PostHistoryTypeId="10" PostId="1526" RevisionGUID="8b4026d2-47c6-47ed-a8d2-9111816d3dc9" CreationDate="2022-04-06T17:32:04.107" UserId="-1" Comment="105" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:459,&quot;DisplayName&quot;:&quot;Kittywhiskers Van Gogh&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:359,&quot;DisplayName&quot;:&quot;Bryan Chen&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;}]}" />
  <row Id="6162" PostHistoryTypeId="2" PostId="1674" RevisionGUID="105f4502-bdb9-435f-99c2-d5e2bf67a426" CreationDate="2022-04-06T17:39:34.260" UserId="1820" Text="Another use case would be if you want an account where several different people have different levels of access. &#xD;&#xA;&#xD;&#xA;For example, an anonymous proxy of a company might be controlled by a multisig consisting of the C-level executives (with the &quot;Any&quot; type), which in turn can be consisting of anonymous proxies as Joe described, and they allocate one or two employees to handle staking. So, they add these accounts to the anonymous proxy with a type of &quot;Staking&quot;. These employees can take any staking action, but they can't do anything else with the account.&#xD;&#xA;&#xD;&#xA;You could do something similar with a personal account for increased security. You could have your stash on an anonymous proxy and the account with type &quot;Any&quot; is a hardware wallet locked in a vault. You then add an account for staking and another for governance, or a single one with type &quot;NonTransfer&quot;. If any of these are compromised, your funds are still safe." ContentLicense="CC BY-SA 4.0" />
  <row Id="6166" PostHistoryTypeId="5" PostId="1631" RevisionGUID="4aa7c543-f533-42d6-8911-737e7ecc4260" CreationDate="2022-04-06T18:14:29.080" UserId="34" Comment="added 87 characters in body; edited tags; edited title" Text="Since [metadata v14 and `scale-info`](https://github.com/paritytech/substrate/pull/8615) were introduced, the runtime fully specifies all runtime interfaces and types. On the RPC side however the `rpc_methods` only returns the list of methods exposed, without any type details for them. This basically means that a mapping from these names to actual definitions are maintained in various SDKs.&#xD;&#xA;&#xD;&#xA;There is also a version flag in this RPC response so it must mean it is somehow upgradable. &#xD;&#xA;&#xD;&#xA;So my question is: are there plans and/or ongoing work to make these fully described with parameters and return types ala metadata-v14-for-rpcs." ContentLicense="CC BY-SA 4.0" />
  <row Id="6167" PostHistoryTypeId="4" PostId="1631" RevisionGUID="4aa7c543-f533-42d6-8911-737e7ecc4260" CreationDate="2022-04-06T18:14:29.080" UserId="34" Comment="added 87 characters in body; edited tags; edited title" Text="RPC full type specification from metadata" ContentLicense="CC BY-SA 4.0" />
  <row Id="6168" PostHistoryTypeId="6" PostId="1631" RevisionGUID="4aa7c543-f533-42d6-8911-737e7ecc4260" CreationDate="2022-04-06T18:14:29.080" UserId="34" Comment="added 87 characters in body; edited tags; edited title" Text="|rpc|metadata|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6169" PostHistoryTypeId="2" PostId="1675" RevisionGUID="d522b67f-a54d-4ff8-b7b9-9e671fd9a499" CreationDate="2022-04-06T18:27:51.597" UserId="283" Text="GRANDPA is orthogonal to the blockchain extension algorithm. GRANDPA doesn't create blocks but only finalizes blocks that have already been created.&#xD;&#xA;&#xD;&#xA;One main downside to Aura is the fact that the block author for every upcoming slot is easily predictable: it's a simple round-robin mechanism where validators take turns authoring blocks. An attacker which can DoS one validator at a time can halt block production across the entire network.&#xD;&#xA;&#xD;&#xA;BABE uses VRFs to limit the amount of blocks produces, but also makes the author of the next block unpredictable. This makes BABE objectively more secure.&#xD;&#xA;&#xD;&#xA;Both are lightweight.&#xD;&#xA;&#xD;&#xA;I don't consider differing weights across validators' votes to make any impact on the viability of either consensus algorithm relative to the other." ContentLicense="CC BY-SA 4.0" />
  <row Id="6171" PostHistoryTypeId="34" PostId="990" RevisionGUID="3b89b825-d585-4801-aead-175304fafd20" CreationDate="2022-04-06T19:03:00.277" UserId="-1" Comment="3" />
  <row Id="6172" PostHistoryTypeId="2" PostId="1676" RevisionGUID="7d71aa7f-fb27-4fab-97a9-28422ceaf643" CreationDate="2022-04-06T19:21:06.527" UserId="34" Text="https://polkadot.js.org/docs/api/examples/promise/typegen/ might be exactly what you need to get started. Types are fully described, from the [getMetadata](https://polkadot.js.org/docs/substrate/rpc#getmetadataat-blockhash-metadata) endpoint:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;js API interface: api.rpc.state.getMetadata&#xD;&#xA;jsonrpc: state_getMetadata&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note the value returned by the RPC is [SCALE encoded](https://github.com/paritytech/parity-scale-codec), and needs to be decoded for you use.&#xD;&#xA;&#xD;&#xA;[`subxt` is a good reference](https://github.com/paritytech/subxt) and for a simple CLI implementation decoding the output, [`subsee` is great too](https://github.com/ascjones/subsee)" ContentLicense="CC BY-SA 4.0" />
  <row Id="6174" PostHistoryTypeId="4" PostId="717" RevisionGUID="a3c08906-1742-42fd-9d84-3c69bedd12e4" CreationDate="2022-04-06T19:24:22.253" UserId="34" Comment="edited tags; edited title" Text="How to match the versions or Susbstrate upstream in my project's dependancies?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6175" PostHistoryTypeId="6" PostId="717" RevisionGUID="a3c08906-1742-42fd-9d84-3c69bedd12e4" CreationDate="2022-04-06T19:24:22.253" UserId="34" Comment="edited tags; edited title" Text="|rust|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6176" PostHistoryTypeId="2" PostId="1677" RevisionGUID="d1e7d462-cb12-43dd-93fd-d909f23b8da9" CreationDate="2022-04-06T19:28:20.893" UserId="34" Text="`cargo tree | grep serde` can be used to get the package specific versions needed for `serde`. Here you can see what substrate libs need, and match what substrate uses.&#xD;&#xA;&#xD;&#xA;Also manually matching what existing in the [`Cargo.toml` of  your upstream crates](https://github.com/paritytech/substrate/blob/master/client/cli/Cargo.toml#L27-L28) can work too. " ContentLicense="CC BY-SA 4.0" />
  <row Id="6178" PostHistoryTypeId="10" PostId="717" RevisionGUID="a6c7d4b9-bc04-4aba-80ab-718c79e612b8" CreationDate="2022-04-06T19:28:58.120" UserId="-1" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:459,&quot;DisplayName&quot;:&quot;Kittywhiskers Van Gogh&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="6181" PostHistoryTypeId="2" PostId="1678" RevisionGUID="93c75c40-e6c0-48b0-9bb5-f87d375753dd" CreationDate="2022-04-06T20:36:19.930" UserId="1824" Text="In your original question the errors have to do with you trying to derive traits on&#xD;&#xA;your struct which `Mapping` doesn't implement. For example, the [`#[derive(Clone)]`](https://doc.rust-lang.org/std/clone/trait.Clone.html#derivable)&#xD;&#xA;macro tries to call `clone()` on every field in the struct - and `Mapping` doesn't&#xD;&#xA;implement `Clone` resulting in the errors you see.&#xD;&#xA;&#xD;&#xA;Now, moving on to the `Mapping` inside a `Mapping` situation. It is possible to get the&#xD;&#xA;following to compile:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;pub mod mapper {&#xD;&#xA;    use ink_storage::{&#xD;&#xA;        traits::{&#xD;&#xA;            SpreadAllocate,&#xD;&#xA;            SpreadLayout,&#xD;&#xA;        },&#xD;&#xA;        Mapping,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    type Id = u8;&#xD;&#xA;&#xD;&#xA;    #[derive(SpreadAllocate, SpreadLayout)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub struct Map {&#xD;&#xA;        map: Mapping&lt;AccountId, ()&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Mapper {&#xD;&#xA;        map: Mapping&lt;Id, Map&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Mapper {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            ink_lang::utils::initialize_contract(|_| {})&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get(&amp;mut self) {&#xD;&#xA;            // self.map.get(0); &lt;- Doesn't work!&#xD;&#xA;            todo!()&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, if you try and use this it won't work.&#xD;&#xA;&#xD;&#xA;The reason for this is the `Mapping` requires that [values implement `PackedLayout`](https://paritytech.github.io/ink/ink_storage/struct.Mapping.html#impl). This&#xD;&#xA;essentially says that the value should be able to be stored in a single storage cell.&#xD;&#xA;&#xD;&#xA;`Mapping` itself does not implement `PackedLayout` since it cannot be stored in a single&#xD;&#xA;storage cell. Instead, a `Mapping` is &quot;stored&quot; across many storage cells, each&#xD;&#xA;corresponding to one of the entries in the map (I'm glossing over some details here,&#xD;&#xA;technically `Mapping` isn't stored anywhere). &#xD;&#xA;&#xD;&#xA;This is why nested `Mapping`'s are not supported.&#xD;&#xA;&#xD;&#xA;You are correct in finding that the best approach here is to use a tuple as a key instead.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6185" PostHistoryTypeId="2" PostId="1679" RevisionGUID="b421b06a-eaef-4246-978a-d4c1d095b755" CreationDate="2022-04-06T21:36:40.680" UserId="2169" Text="I compiled and am running the resulting binaries for backend_core and backend_shard in my node's localhost, they are nicely connected to each other and receiving &quot;submits&quot; from a polkadot binary in the same node too.&#xD;&#xA;&#xD;&#xA;However, after launching the frontend with `yarn start` I get the following screen with the &quot;Waiting for telemetry...&quot; message, nothing else seems to happen:&#xD;&#xA;[![Waiting for Telemetry Screen][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0oD8H.png&#xD;&#xA;&#xD;&#xA;Please note that I am connecting through SSH and I am translating the remote port 3000 into my PC's 4000, in case you wonder about the odd url in the picture :D&#xD;&#xA;&#xD;&#xA;The terminal with the `yarn start` command shows:&#xD;&#xA;&#xD;&#xA;&gt; Compiled successfully!&#xD;&#xA;&gt; &#xD;&#xA;&gt; You can now view @dotstats/frontend in the browser.&#xD;&#xA;&gt; &#xD;&#xA;&gt;   http://localhost:3000/&#xD;&#xA;&gt; &#xD;&#xA;&gt; Note that the development build is not optimized. To create a&#xD;&#xA;&gt; production build, use yarn build.&#xD;&#xA;&#xD;&#xA;Any suggestions for troubleshooting? What may be going wrong here?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="6187" PostHistoryTypeId="1" PostId="1679" RevisionGUID="b421b06a-eaef-4246-978a-d4c1d095b755" CreationDate="2022-04-06T21:36:40.680" UserId="2169" Text="&quot;Waiting for Telemetry...&quot; message in Substrate local telemetry frontend" ContentLicense="CC BY-SA 4.0" />
  <row Id="6188" PostHistoryTypeId="3" PostId="1679" RevisionGUID="b421b06a-eaef-4246-978a-d4c1d095b755" CreationDate="2022-04-06T21:36:40.680" UserId="2169" Text="|frontend|telemetry|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6189" PostHistoryTypeId="2" PostId="1680" RevisionGUID="6b623167-cab5-4e4b-92d9-d70d295f17f0" CreationDate="2022-04-06T21:41:23.123" UserId="642" Text="When I run the following code in some calls I get the following errors:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;- DRR: createType(ExtrinsicStatus):: Cannot map Enum JSON, unable to find 'reason' in future, ready, broadcast, inblock, retracted, finalitytimeout, finalized, usurped, dropped, invalid&#xD;&#xA;&#xD;&#xA;- CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: -32601: Method not found&#xD;&#xA;&#xD;&#xA;are these errors occur because of some runtime differences? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    export async function signAndSend (api: ApiPromise, submittable: SubmittableExtrinsic&lt;'promise', ISubmittableResult&gt;, _signer: KeyringPair, senderAddress: string): Promise&lt;TxInfo&gt; {&#xD;&#xA;      return new Promise((resolve) =&gt; {&#xD;&#xA;&#xD;&#xA;    void submittable.signAndSend(_signer, async (result) =&gt; {&#xD;&#xA;      let txFailed = false;&#xD;&#xA;      let failureText: string;&#xD;&#xA;&#xD;&#xA;      console.log(JSON.parse(JSON.stringify(result)));&#xD;&#xA;&#xD;&#xA;      if (result.dispatchError) {&#xD;&#xA;        if (result.dispatchError.isModule) {&#xD;&#xA;          // for module errors, we have the section indexed, lookup&#xD;&#xA;          const decoded = api.registry.findMetaError(result.dispatchError.asModule);&#xD;&#xA;          const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;          txFailed = true;&#xD;&#xA;          failureText = `${docs.join(' ')}`;&#xD;&#xA;&#xD;&#xA;          console.log(`dispatchError module: ${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;        } else {&#xD;&#xA;          // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;          console.log(`dispatchError other reason: ${result.dispatchError.toString()}`);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      if (result.status.isFinalized) { &#xD;&#xA;        const hash = result.status.isFinalized ? result.status.asFinalized : result.status.asInBlock;&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(hash);&#xD;&#xA;        const blockNumber = signedBlock.block.header.number;&#xD;&#xA;        const txHash = result.txHash.toString();&#xD;&#xA;&#xD;&#xA;        // search for the hash of the extrinsic in the block&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex) =&gt; {&#xD;&#xA;          if (ex.isSigned) {&#xD;&#xA;            if (String(ex.signer) == senderAddress) {&#xD;&#xA;              const queryInfo = await api.rpc.payment.queryInfo(ex.toHex(), signedBlock.block.hash);&#xD;&#xA;              const fee = queryInfo.partialFee.toString();&#xD;&#xA;&#xD;&#xA;              resolve({ block: Number(blockNumber), failureText: failureText, fee: fee, status: txFailed ? 'failed' : 'success', txHash: txHash });&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        });&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6191" PostHistoryTypeId="1" PostId="1680" RevisionGUID="6b623167-cab5-4e4b-92d9-d70d295f17f0" CreationDate="2022-04-06T21:41:23.123" UserId="642" Text="DRR: createType(ExtrinsicStatus):: Cannot map Enum JSON, unable to find 'reason' in future, ready, broadcast, inblock, retracted, finalitytimeout" ContentLicense="CC BY-SA 4.0" />
  <row Id="6192" PostHistoryTypeId="3" PostId="1680" RevisionGUID="6b623167-cab5-4e4b-92d9-d70d295f17f0" CreationDate="2022-04-06T21:41:23.123" UserId="642" Text="|polkadot|api|extrinsicstatus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6193" PostHistoryTypeId="5" PostId="1679" RevisionGUID="3e1a4d81-b26a-4ccd-9e92-ed17b8873414" CreationDate="2022-04-06T21:43:36.280" UserId="2169" Comment="(added 'yarn build' results)" Text="I compiled and am running (as systemd units) the binaries for backend_core and backend_shard in my node's localhost, they are nicely connected to each other and receiving all &quot;submits&quot; from a polkadot binary in the same node too.&#xD;&#xA;&#xD;&#xA;However, after launching the frontend with `yarn start` I get the following screen with the &quot;Waiting for telemetry...&quot; message, nothing else seems to happen:&#xD;&#xA;[![Waiting for Telemetry Screen][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0oD8H.png&#xD;&#xA;&#xD;&#xA;Please note that I am connecting through SSH and I am translating the remote port 3000 into my PC's 4000, in case you wonder about the odd url in the picture :D&#xD;&#xA;&#xD;&#xA;The terminal with the `yarn start` command shows:&#xD;&#xA;&#xD;&#xA;&gt; Compiled successfully!&#xD;&#xA;&gt; &#xD;&#xA;&gt; You can now view @dotstats/frontend in the browser.&#xD;&#xA;&gt; &#xD;&#xA;&gt;   http://localhost:3000/&#xD;&#xA;&gt; &#xD;&#xA;&gt; Note that the development build is not optimized. To create a&#xD;&#xA;&gt; production build, use yarn build.&#xD;&#xA;&#xD;&#xA;And when trying to build, I get the following dump:&#xD;&#xA;&#xD;&#xA;&gt; yarn run v1.22.18 $ react-scripts-ts build Creating an optimized&#xD;&#xA;&gt; production build... Starting type checking and linting service...&#xD;&#xA;&gt; Using 1 worker with 2048MB memory limit ts-loader: Using&#xD;&#xA;&gt; typescript@4.4.2 and&#xD;&#xA;&gt; /home/telemetry/substrate-telemetry/frontend/tsconfig.prod.json Failed&#xD;&#xA;&gt; to compile.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Failed to minify the bundle. Error: static/js/main.4c691ad1.js from&#xD;&#xA;&gt; UglifyJs Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;&gt;     at Array.forEach (&lt;anonymous&gt;)&#xD;&#xA;&gt;     at /home/telemetry/substrate-telemetry/frontend/node_modules/react-scripts-ts/scripts/build.js:127:23&#xD;&#xA;&gt;     at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:269:13&#xD;&#xA;&gt;     at Compiler.emitRecords (/home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:375:38)&#xD;&#xA;&gt;     at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:262:10&#xD;&#xA;&gt;     at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:368:12&#xD;&#xA;&gt;     at next (/home/telemetry/substrate-telemetry/frontend/node_modules/tapable/lib/Tapable.js:218:11)&#xD;&#xA;&gt;     at Compiler.&lt;anonymous&gt; (/home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)&#xD;&#xA;&gt;     at next (/home/telemetry/substrate-telemetry/frontend/node_modules/tapable/lib/Tapable.js:220:14)&#xD;&#xA;&gt;     at /home/telemetry/substrate-telemetry/frontend/node_modules/sw-precache-webpack-plugin/lib/index.js:98:18&#xD;&#xA;&gt; Read more here: http://bit.ly/2tRViJ9&#xD;&#xA;&gt; &#xD;&#xA;&gt; error Command failed with exit code 1.&#xD;&#xA;&#xD;&#xA;Any suggestions for troubleshooting? What may be going wrong here?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="6194" PostHistoryTypeId="5" PostId="1679" RevisionGUID="93d3bfa7-0f88-453f-a915-61c6278d0810" CreationDate="2022-04-06T22:20:31.770" UserId="2169" Comment="added 303 characters in body" Text="I compiled and am running (as systemd units) the binaries for backend_core (at default port 8000) and backend_shard (at default port 8001) in my node's localhost, they are nicely connected to each other and receiving all &quot;submits&quot; from a polkadot binary in the same node too.&#xD;&#xA;&#xD;&#xA;However, after launching the frontend with `yarn start` I get the following screen with the &quot;Waiting for telemetry...&quot; message, nothing else seems to happen:&#xD;&#xA;[![Waiting for Telemetry Screen][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0oD8H.png&#xD;&#xA;&#xD;&#xA;The browser's console shows the following error:&#xD;&#xA;&#xD;&#xA;&gt; Connection.ts:108&#xD;&#xA;&gt; &#xD;&#xA;&gt; WebSocket connection to 'ws://127.0.0.1:8000/feed' failed: &#xD;&#xA;&gt; &#xD;&#xA;&gt; (anonymous) @ Connection.ts:108&#xD;&#xA;&gt;&#xD;&#xA;&gt; socket @ Connection.ts:85&#xD;&#xA;&gt; &#xD;&#xA;&gt; trySocket @ Connection.ts:92&#xD;&#xA;&#xD;&#xA;Please note that I am connecting through SSH and I am translating the remote port 3000 into my PC's 4000, in case you wonder about the odd url in the picture :D&#xD;&#xA;&#xD;&#xA;The terminal with the `yarn start` command shows:&#xD;&#xA;&#xD;&#xA;&gt; Compiled successfully!&#xD;&#xA;&gt; &#xD;&#xA;&gt; You can now view @dotstats/frontend in the browser.&#xD;&#xA;&gt; &#xD;&#xA;&gt;   http://localhost:3000/&#xD;&#xA;&gt; &#xD;&#xA;&gt; Note that the development build is not optimized. To create a&#xD;&#xA;&gt; production build, use yarn build.&#xD;&#xA;&#xD;&#xA;And when trying to build, I get the following dump:&#xD;&#xA;&#xD;&#xA;&gt; yarn run v1.22.18 $ react-scripts-ts build Creating an optimized&#xD;&#xA;&gt; production build... Starting type checking and linting service...&#xD;&#xA;&gt; Using 1 worker with 2048MB memory limit ts-loader: Using&#xD;&#xA;&gt; typescript@4.4.2 and&#xD;&#xA;&gt; /home/telemetry/substrate-telemetry/frontend/tsconfig.prod.json Failed&#xD;&#xA;&gt; to compile.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Failed to minify the bundle. Error: static/js/main.4c691ad1.js from&#xD;&#xA;&gt; UglifyJs Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;&gt;     at Array.forEach (&lt;anonymous&gt;)&#xD;&#xA;&gt;     at /home/telemetry/substrate-telemetry/frontend/node_modules/react-scripts-ts/scripts/build.js:127:23&#xD;&#xA;&gt;     at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:269:13&#xD;&#xA;&gt;     at Compiler.emitRecords (/home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:375:38)&#xD;&#xA;&gt;     at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:262:10&#xD;&#xA;&gt;     at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:368:12&#xD;&#xA;&gt;     at next (/home/telemetry/substrate-telemetry/frontend/node_modules/tapable/lib/Tapable.js:218:11)&#xD;&#xA;&gt;     at Compiler.&lt;anonymous&gt; (/home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)&#xD;&#xA;&gt;     at next (/home/telemetry/substrate-telemetry/frontend/node_modules/tapable/lib/Tapable.js:220:14)&#xD;&#xA;&gt;     at /home/telemetry/substrate-telemetry/frontend/node_modules/sw-precache-webpack-plugin/lib/index.js:98:18&#xD;&#xA;&gt; Read more here: http://bit.ly/2tRViJ9&#xD;&#xA;&gt; &#xD;&#xA;&gt; error Command failed with exit code 1.&#xD;&#xA;&#xD;&#xA;Any suggestions for troubleshooting? What may be going wrong here?&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6195" PostHistoryTypeId="10" PostId="1356" RevisionGUID="d67349e6-2427-4071-9246-9b07e960413d" CreationDate="2022-04-07T01:00:16.143" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="6196" PostHistoryTypeId="10" PostId="997" RevisionGUID="e615dd31-45db-4afb-8722-868d9afafa44" CreationDate="2022-04-07T01:02:19.577" UserId="-1" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:283,&quot;DisplayName&quot;:&quot;rob&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="6197" PostHistoryTypeId="10" PostId="1197" RevisionGUID="26cb9ed6-b721-4d3a-9f08-c789e73ca65f" CreationDate="2022-04-07T01:03:42.063" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:434,&quot;DisplayName&quot;:&quot;infinitesimallySmart&quot;},{&quot;Id&quot;:402,&quot;DisplayName&quot;:&quot;Big Brother&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="6198" PostHistoryTypeId="6" PostId="1517" RevisionGUID="a44bd63b-d2bd-42ec-874d-070ea45398e2" CreationDate="2022-04-07T01:07:41.120" UserId="128" Comment="Typo in the tag" Text="|substrate-node|parachain|parathread|solo-substrate|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6199" PostHistoryTypeId="24" PostId="1517" RevisionGUID="a44bd63b-d2bd-42ec-874d-070ea45398e2" CreationDate="2022-04-07T01:07:41.120" Comment="Proposed by 128 approved by -1 edit id of 139" ContentLicense="CC BY-SA 4.0" />
  <row Id="6200" PostHistoryTypeId="6" PostId="1517" RevisionGUID="4f58e72c-f9ea-4816-9e4a-200361919328" CreationDate="2022-04-07T01:07:41.120" UserId="34" Comment="Typo in the tag" Text="|substrate-node|parachain|parathread|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6201" PostHistoryTypeId="5" PostId="1603" RevisionGUID="61e616d6-8f5f-4d2c-9b8b-8abb8742412b" CreationDate="2022-04-07T01:07:55.480" UserId="2132" Comment="Replace &quot;sorce&quot; with &quot;source/&quot;" Text="There is one clear scenario where the account who registered the para will not be able to deregister it, which is if this para has been onboarded as a parachain.&#xD;&#xA;This one is clearly stated in the source of deregister itself, where it checks for the lifecycle of the para to be Parathread - [link to the code](https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/common/src/paras_registrar.rs#L539-L543).&#xD;&#xA;&#xD;&#xA;At the same time, when a parathread is onboarded as a parachain we can see a lock is applied.&#xD;&#xA;```rust&#xD;&#xA;// Upgrade a registered parathread into a parachain.&#xD;&#xA;	fn make_parachain(id: ParaId) -&gt; DispatchResult {&#xD;&#xA;		// -- snip --&#xD;&#xA;		// Once a para has upgraded to a parachain, it can no longer be managed by the owner.&#xD;&#xA;		// Intentionally, the flag stays with the para even after downgrade.&#xD;&#xA;		Self::apply_lock(id);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;[source](https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/common/src/paras_registrar.rs#L414-L416).&#xD;&#xA;This lock prevents the manager to deregister the parathread by its own.&#xD;&#xA;&#xD;&#xA;We can find another lock being applied when creating a crowdloan campaign. The paraId involved in the crowdloan will be locked, and so under the same restrictions for the manager of such parachain. We can find the code where the lock is applied this time [here](https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/common/src/crowdloan/mod.rs#L438).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Create a new crowdloaning campaign for a parachain slot with the given lease period range.&#xD;&#xA;///&#xD;&#xA;/// This applies a lock to your parachain configuration, ensuring that it cannot be changed&#xD;&#xA;/// by the parachain manager.&#xD;&#xA;		#[pallet::weight(T::WeightInfo::create())]&#xD;&#xA;		pub fn create(&#xD;&#xA;            // -- snip --&#xD;&#xA;&#xD;&#xA;            // Add a lock to the para so that the configuration cannot be changed.&#xD;&#xA;			T::Registrar::apply_lock(index);&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::&lt;T&gt;::Created(index));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6202" PostHistoryTypeId="24" PostId="1603" RevisionGUID="61e616d6-8f5f-4d2c-9b8b-8abb8742412b" CreationDate="2022-04-07T01:07:55.480" Comment="Proposed by 2132 approved by 128, 34 edit id of 149" ContentLicense="CC BY-SA 4.0" />
  <row Id="6203" PostHistoryTypeId="6" PostId="1662" RevisionGUID="b8a24d71-8b0e-409b-a252-bfba7a89969d" CreationDate="2022-04-07T01:08:15.017" UserId="45" Comment="add the wasm tag" Text="|runtime|wasm|wasmtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6204" PostHistoryTypeId="24" PostId="1662" RevisionGUID="b8a24d71-8b0e-409b-a252-bfba7a89969d" CreationDate="2022-04-07T01:08:15.017" Comment="Proposed by 45 approved by 128, 34 edit id of 151" ContentLicense="CC BY-SA 4.0" />
  <row Id="6205" PostHistoryTypeId="5" PostId="1392" RevisionGUID="45f45f5f-1117-48a4-a2a6-14678720e010" CreationDate="2022-04-07T01:08:42.870" UserId="128" Comment="A more specific title and use code block" Text="I am trying to run the frontier-node-template:https://github.com/substrate-developer-hub/frontier-node-template/ &lt;br&gt;&#xD;&#xA;But it gives an error as shown below. I tried to change the&lt;br&gt; &#xD;&#xA;rustup default nightly-2021-11-12&lt;br&gt;&#xD;&#xA;rustup override set nightly-2021-11-12&lt;br&gt;&#xD;&#xA;rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-12&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0308]: mismatched types                                                                                                                                                         &#xD;&#xA;   --&gt; C:\Users\msi\.cargo\registry\src\github.com-1ecc6299db9ec823\parity-db-0.3.1\src\index.rs:502:3&#xD;&#xA;    |&#xD;&#xA;501 |     fn madvise_random(&amp;self, _map: &amp;mut memmap2::MmapMut) {&#xD;&#xA;    |                                                           - expected `()` because of default return type&#xD;&#xA;502 |         Ok(())&#xD;&#xA;    |         ^^^^^^- help: consider using a semicolon here: `;`&#xD;&#xA;    |         |&#xD;&#xA;    |         expected `()`, found enum `std::result::Result`&#xD;&#xA;    |&#xD;&#xA;    = note: expected unit type `()`&#xD;&#xA;                    found enum `std::result::Result&lt;(), _&gt;`&#xD;&#xA;&#xD;&#xA;   Compiling cid v0.6.1&#xD;&#xA;   Compiling zstd v0.6.1+zstd.1.4.9&#xD;&#xA;For more information about this error, try `rustc --explain E0308`.                                                                                                                    &#xD;&#xA;error: could not compile `parity-db` due to previous error                                                                                                                             &#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6206" PostHistoryTypeId="4" PostId="1392" RevisionGUID="45f45f5f-1117-48a4-a2a6-14678720e010" CreationDate="2022-04-07T01:08:42.870" UserId="128" Comment="A more specific title and use code block" Text="Frontier-node-template compilation error on Windows" ContentLicense="CC BY-SA 4.0" />
  <row Id="6207" PostHistoryTypeId="24" PostId="1392" RevisionGUID="45f45f5f-1117-48a4-a2a6-14678720e010" CreationDate="2022-04-07T01:08:42.870" Comment="Proposed by 128 approved by 139, 34 edit id of 134" ContentLicense="CC BY-SA 4.0" />
  <row Id="6208" PostHistoryTypeId="5" PostId="1680" RevisionGUID="4491e35f-0f8e-4b8e-87cd-4ec565b02af0" CreationDate="2022-04-07T04:00:16.997" UserId="642" Comment="added 283 characters in body" Text="When I run the following code in some calls I get the following errors:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;- DRR: createType(ExtrinsicStatus):: Cannot map Enum JSON, unable to find 'reason' in future, ready, broadcast, inblock, retracted, finalitytimeout, finalized, usurped, dropped, invalid&#xD;&#xA;&#xD;&#xA;- CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: -32601: Method not found&#xD;&#xA;&#xD;&#xA;are these errors occur because of some runtime differences? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    import { ApiPromise } from '@polkadot/api'; // &quot;^7.11.1&quot;&#xD;&#xA;    import { SubmittableExtrinsic } from '@polkadot/api/types';&#xD;&#xA;    import { KeyringPair } from '@polkadot/keyring/types'; //&quot;^8.4.1&quot;&#xD;&#xA;    import { ISubmittableResult } from '@polkadot/types/types'; &quot;^7.11.2-1&quot;&#xD;&#xA;    &#xD;&#xA;    export async function signAndSend (api: ApiPromise, submittable: SubmittableExtrinsic&lt;'promise', ISubmittableResult&gt;, _signer: KeyringPair, senderAddress: string): Promise&lt;TxInfo&gt; {&#xD;&#xA;          return new Promise((resolve) =&gt; {&#xD;&#xA;&#xD;&#xA;    void submittable.signAndSend(_signer, async (result) =&gt; {&#xD;&#xA;      let txFailed = false;&#xD;&#xA;      let failureText: string;&#xD;&#xA;&#xD;&#xA;      console.log(JSON.parse(JSON.stringify(result)));&#xD;&#xA;&#xD;&#xA;      if (result.dispatchError) {&#xD;&#xA;        if (result.dispatchError.isModule) {&#xD;&#xA;          // for module errors, we have the section indexed, lookup&#xD;&#xA;          const decoded = api.registry.findMetaError(result.dispatchError.asModule);&#xD;&#xA;          const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;          txFailed = true;&#xD;&#xA;          failureText = `${docs.join(' ')}`;&#xD;&#xA;&#xD;&#xA;          console.log(`dispatchError module: ${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;        } else {&#xD;&#xA;          // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;          console.log(`dispatchError other reason: ${result.dispatchError.toString()}`);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      if (result.status.isFinalized) { &#xD;&#xA;        const hash = result.status.isFinalized ? result.status.asFinalized : result.status.asInBlock;&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(hash);&#xD;&#xA;        const blockNumber = signedBlock.block.header.number;&#xD;&#xA;        const txHash = result.txHash.toString();&#xD;&#xA;&#xD;&#xA;        // search for the hash of the extrinsic in the block&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex) =&gt; {&#xD;&#xA;          if (ex.isSigned) {&#xD;&#xA;            if (String(ex.signer) == senderAddress) {&#xD;&#xA;              const queryInfo = await api.rpc.payment.queryInfo(ex.toHex(), signedBlock.block.hash);&#xD;&#xA;              const fee = queryInfo.partialFee.toString();&#xD;&#xA;&#xD;&#xA;              resolve({ block: Number(blockNumber), failureText: failureText, fee: fee, status: txFailed ? 'failed' : 'success', txHash: txHash });&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        });&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6209" PostHistoryTypeId="5" PostId="1680" RevisionGUID="b1d56073-9448-43e3-b8d9-65f4733921ca" CreationDate="2022-04-07T04:09:34.477" UserId="642" Comment="added 35 characters in body" Text="When I run the following code in some calls I get the following errors:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;- DRR: createType(ExtrinsicStatus):: Cannot map Enum JSON, unable to find 'reason' in future, ready, broadcast, inblock, retracted, finalitytimeout, finalized, usurped, dropped, invalid&#xD;&#xA;&#xD;&#xA;- CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: -32601: Method not found&#xD;&#xA;&#xD;&#xA;are these errors occur because of some runtime differences? &#xD;&#xA;(endpoint: &quot;wss://rpc.polkadot.io&quot;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    import { ApiPromise } from '@polkadot/api'; // &quot;^7.11.1&quot;&#xD;&#xA;    import { SubmittableExtrinsic } from '@polkadot/api/types';&#xD;&#xA;    import { KeyringPair } from '@polkadot/keyring/types'; //&quot;^8.4.1&quot;&#xD;&#xA;    import { ISubmittableResult } from '@polkadot/types/types'; &quot;^7.11.2-1&quot;&#xD;&#xA;    &#xD;&#xA;    export async function signAndSend (api: ApiPromise, submittable: SubmittableExtrinsic&lt;'promise', ISubmittableResult&gt;, _signer: KeyringPair, senderAddress: string): Promise&lt;TxInfo&gt; {&#xD;&#xA;          return new Promise((resolve) =&gt; {&#xD;&#xA;&#xD;&#xA;    void submittable.signAndSend(_signer, async (result) =&gt; {&#xD;&#xA;      let txFailed = false;&#xD;&#xA;      let failureText: string;&#xD;&#xA;&#xD;&#xA;      console.log(JSON.parse(JSON.stringify(result)));&#xD;&#xA;&#xD;&#xA;      if (result.dispatchError) {&#xD;&#xA;        if (result.dispatchError.isModule) {&#xD;&#xA;          // for module errors, we have the section indexed, lookup&#xD;&#xA;          const decoded = api.registry.findMetaError(result.dispatchError.asModule);&#xD;&#xA;          const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;          txFailed = true;&#xD;&#xA;          failureText = `${docs.join(' ')}`;&#xD;&#xA;&#xD;&#xA;          console.log(`dispatchError module: ${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;        } else {&#xD;&#xA;          // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;          console.log(`dispatchError other reason: ${result.dispatchError.toString()}`);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      if (result.status.isFinalized) { &#xD;&#xA;        const hash = result.status.isFinalized ? result.status.asFinalized : result.status.asInBlock;&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(hash);&#xD;&#xA;        const blockNumber = signedBlock.block.header.number;&#xD;&#xA;        const txHash = result.txHash.toString();&#xD;&#xA;&#xD;&#xA;        // search for the hash of the extrinsic in the block&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex) =&gt; {&#xD;&#xA;          if (ex.isSigned) {&#xD;&#xA;            if (String(ex.signer) == senderAddress) {&#xD;&#xA;              const queryInfo = await api.rpc.payment.queryInfo(ex.toHex(), signedBlock.block.hash);&#xD;&#xA;              const fee = queryInfo.partialFee.toString();&#xD;&#xA;&#xD;&#xA;              resolve({ block: Number(blockNumber), failureText: failureText, fee: fee, status: txFailed ? 'failed' : 'success', txHash: txHash });&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        });&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6210" PostHistoryTypeId="5" PostId="1679" RevisionGUID="df9bd0bf-8543-46dd-a49b-7e3c4f4e58f9" CreationDate="2022-04-07T05:34:50.630" UserId="128" Comment="Use code blocks instead of quotes" Text="I compiled and am running (as systemd units) the binaries for backend_core (at default port 8000) and backend_shard (at default port 8001) in my node's localhost, they are nicely connected to each other and receiving all &quot;submits&quot; from a polkadot binary in the same node too.&#xD;&#xA;&#xD;&#xA;However, after launching the frontend with `yarn start` I get the following screen with the &quot;Waiting for telemetry...&quot; message, nothing else seems to happen:&#xD;&#xA;[![Waiting for Telemetry Screen][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0oD8H.png&#xD;&#xA;&#xD;&#xA;The browser's console shows the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Connection.ts:108&#xD;&#xA;&#xD;&#xA;WebSocket connection to 'ws://127.0.0.1:8000/feed' failed: &#xD;&#xA;&#xD;&#xA;(anonymous) @ Connection.ts:108&#xD;&#xA;&#xD;&#xA;socket @ Connection.ts:85&#xD;&#xA;&#xD;&#xA;trySocket @ Connection.ts:92&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please note that I am connecting through SSH and I am translating the remote port 3000 into my PC's 4000, in case you wonder about the odd url in the picture :D&#xD;&#xA;&#xD;&#xA;The terminal with the `yarn start` command shows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Compiled successfully!&#xD;&#xA;&#xD;&#xA;You can now view @dotstats/frontend in the browser.&#xD;&#xA;&#xD;&#xA;  http://localhost:3000/&#xD;&#xA; &#xD;&#xA;Note that the development build is not optimized. To create a&#xD;&#xA;production build, use yarn build.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And when trying to build, I get the following dump:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;yarn run v1.22.18 $ react-scripts-ts build Creating an optimized&#xD;&#xA;production build... Starting type checking and linting service...&#xD;&#xA;Using 1 worker with 2048MB memory limit ts-loader: Using&#xD;&#xA;typescript@4.4.2 and&#xD;&#xA;/home/telemetry/substrate-telemetry/frontend/tsconfig.prod.json Failed&#xD;&#xA;to compile.&#xD;&#xA;&#xD;&#xA;Failed to minify the bundle. Error: static/js/main.4c691ad1.js from&#xD;&#xA;UglifyJs Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at Array.forEach (&lt;anonymous&gt;)&#xD;&#xA;    at /home/telemetry/substrate-telemetry/frontend/node_modules/react-scripts-ts/scripts/build.js:127:23&#xD;&#xA;    at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:269:13&#xD;&#xA;    at Compiler.emitRecords (/home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:375:38)&#xD;&#xA;    at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:262:10&#xD;&#xA;    at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:368:12&#xD;&#xA;    at next (/home/telemetry/substrate-telemetry/frontend/node_modules/tapable/lib/Tapable.js:218:11)&#xD;&#xA;    at Compiler.&lt;anonymous&gt; (/home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)&#xD;&#xA;    at next (/home/telemetry/substrate-telemetry/frontend/node_modules/tapable/lib/Tapable.js:220:14)&#xD;&#xA;    at /home/telemetry/substrate-telemetry/frontend/node_modules/sw-precache-webpack-plugin/lib/index.js:98:18&#xD;&#xA;Read more here: http://bit.ly/2tRViJ9&#xD;&#xA;&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Do you have any suggestions for troubleshooting? What may be going wrong here?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6211" PostHistoryTypeId="5" PostId="1680" RevisionGUID="c1329116-147e-4ea1-81e2-0376dbc8501e" CreationDate="2022-04-07T06:27:37.047" UserId="642" Comment="added 2 characters in body" Text="When I run the following code in some calls I get the following errors:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;- DRR: createType(ExtrinsicStatus):: Cannot map Enum JSON, unable to find 'reason' in future, ready, broadcast, inblock, retracted, finalitytimeout, finalized, usurped, dropped, invalid&#xD;&#xA;&#xD;&#xA;- CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: -32601: Method not found&#xD;&#xA;&#xD;&#xA;are these errors occur because of some runtime differences? &#xD;&#xA;(endpoint: &quot;wss://rpc.polkadot.io&quot;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    import { ApiPromise } from '@polkadot/api'; // &quot;^7.11.1&quot;&#xD;&#xA;    import { SubmittableExtrinsic } from '@polkadot/api/types';&#xD;&#xA;    import { KeyringPair } from '@polkadot/keyring/types'; //&quot;^8.4.1&quot;&#xD;&#xA;    import { ISubmittableResult } from '@polkadot/types/types'; //&quot;^7.11.2-1&quot;&#xD;&#xA;    &#xD;&#xA;    export async function signAndSend (api: ApiPromise, submittable: SubmittableExtrinsic&lt;'promise', ISubmittableResult&gt;, _signer: KeyringPair, senderAddress: string): Promise&lt;TxInfo&gt; {&#xD;&#xA;          return new Promise((resolve) =&gt; {&#xD;&#xA;&#xD;&#xA;    void submittable.signAndSend(_signer, async (result) =&gt; {&#xD;&#xA;      let txFailed = false;&#xD;&#xA;      let failureText: string;&#xD;&#xA;&#xD;&#xA;      console.log(JSON.parse(JSON.stringify(result)));&#xD;&#xA;&#xD;&#xA;      if (result.dispatchError) {&#xD;&#xA;        if (result.dispatchError.isModule) {&#xD;&#xA;          // for module errors, we have the section indexed, lookup&#xD;&#xA;          const decoded = api.registry.findMetaError(result.dispatchError.asModule);&#xD;&#xA;          const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;          txFailed = true;&#xD;&#xA;          failureText = `${docs.join(' ')}`;&#xD;&#xA;&#xD;&#xA;          console.log(`dispatchError module: ${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;        } else {&#xD;&#xA;          // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;          console.log(`dispatchError other reason: ${result.dispatchError.toString()}`);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      if (result.status.isFinalized) { &#xD;&#xA;        const hash = result.status.isFinalized ? result.status.asFinalized : result.status.asInBlock;&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(hash);&#xD;&#xA;        const blockNumber = signedBlock.block.header.number;&#xD;&#xA;        const txHash = result.txHash.toString();&#xD;&#xA;&#xD;&#xA;        // search for the hash of the extrinsic in the block&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex) =&gt; {&#xD;&#xA;          if (ex.isSigned) {&#xD;&#xA;            if (String(ex.signer) == senderAddress) {&#xD;&#xA;              const queryInfo = await api.rpc.payment.queryInfo(ex.toHex(), signedBlock.block.hash);&#xD;&#xA;              const fee = queryInfo.partialFee.toString();&#xD;&#xA;&#xD;&#xA;              resolve({ block: Number(blockNumber), failureText: failureText, fee: fee, status: txFailed ? 'failed' : 'success', txHash: txHash });&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        });&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6212" PostHistoryTypeId="5" PostId="1680" RevisionGUID="755abe60-7332-4173-9b3f-e06a3ec8d6d0" CreationDate="2022-04-07T08:03:38.743" UserId="642" Comment="added 7 characters in body" Text="When I run the following code in some calls I get the following errors:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;- DRR: createType(ExtrinsicStatus):: Cannot map Enum JSON, unable to find 'reason' in future, ready, broadcast, inblock, retracted, finalitytimeout, finalized, usurped, dropped, invalid&#xD;&#xA;&#xD;&#xA;- CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: -32601: Method not found&#xD;&#xA;&#xD;&#xA;are these errors occur because of some runtime differences? &#xD;&#xA;(endpoint: &quot;wss://kusama-rpc.polkadot.io&quot;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    import { ApiPromise } from '@polkadot/api'; // &quot;^7.11.1&quot;&#xD;&#xA;    import { SubmittableExtrinsic } from '@polkadot/api/types';&#xD;&#xA;    import { KeyringPair } from '@polkadot/keyring/types'; //&quot;^8.4.1&quot;&#xD;&#xA;    import { ISubmittableResult } from '@polkadot/types/types'; //&quot;^7.11.2-1&quot;&#xD;&#xA;    &#xD;&#xA;    export async function signAndSend (api: ApiPromise, submittable: SubmittableExtrinsic&lt;'promise', ISubmittableResult&gt;, _signer: KeyringPair, senderAddress: string): Promise&lt;TxInfo&gt; {&#xD;&#xA;          return new Promise((resolve) =&gt; {&#xD;&#xA;&#xD;&#xA;    void submittable.signAndSend(_signer, async (result) =&gt; {&#xD;&#xA;      let txFailed = false;&#xD;&#xA;      let failureText: string;&#xD;&#xA;&#xD;&#xA;      console.log(JSON.parse(JSON.stringify(result)));&#xD;&#xA;&#xD;&#xA;      if (result.dispatchError) {&#xD;&#xA;        if (result.dispatchError.isModule) {&#xD;&#xA;          // for module errors, we have the section indexed, lookup&#xD;&#xA;          const decoded = api.registry.findMetaError(result.dispatchError.asModule);&#xD;&#xA;          const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;          txFailed = true;&#xD;&#xA;          failureText = `${docs.join(' ')}`;&#xD;&#xA;&#xD;&#xA;          console.log(`dispatchError module: ${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;        } else {&#xD;&#xA;          // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;          console.log(`dispatchError other reason: ${result.dispatchError.toString()}`);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      if (result.status.isFinalized) { &#xD;&#xA;        const hash = result.status.isFinalized ? result.status.asFinalized : result.status.asInBlock;&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(hash);&#xD;&#xA;        const blockNumber = signedBlock.block.header.number;&#xD;&#xA;        const txHash = result.txHash.toString();&#xD;&#xA;&#xD;&#xA;        // search for the hash of the extrinsic in the block&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex) =&gt; {&#xD;&#xA;          if (ex.isSigned) {&#xD;&#xA;            if (String(ex.signer) == senderAddress) {&#xD;&#xA;              const queryInfo = await api.rpc.payment.queryInfo(ex.toHex(), signedBlock.block.hash);&#xD;&#xA;              const fee = queryInfo.partialFee.toString();&#xD;&#xA;&#xD;&#xA;              resolve({ block: Number(blockNumber), failureText: failureText, fee: fee, status: txFailed ? 'failed' : 'success', txHash: txHash });&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        });&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6213" PostHistoryTypeId="5" PostId="1539" RevisionGUID="77ca5bed-55ec-4bd3-8173-970b8730b1a4" CreationDate="2022-04-07T08:32:56.733" UserId="2102" Comment="Updated git url" Text="I've been trying to add some rpc calls available for my node, but an error related to the 'getrandom' module appears (even tho I'm not even using it).&#xD;&#xA;&#xD;&#xA;I have a very simple pallet that creates and transfers items, and it is working just fine. The problem comes when I try to add the custom rpc calls to the node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to &#xD;&#xA;enable the &quot;js&quot; feature. For more information see: &#xD;&#xA;https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;```&#xD;&#xA;I tried adding the dependency as stated in the documentation regarding this issue, but nothing seems to fix the issue, it just generates more errors.&#xD;&#xA;&#xD;&#xA;This is the documentation I've been using to implement the custom rpc calls for my pallet. I'll leave here my SO question, which is a little bit longer but its the same issue: https://stackoverflow.com/questions/71734501/error-adding-custom-rpcs-for-custom-pallet-substrate&#xD;&#xA;&#xD;&#xA;https://core.tetcoin.org/recipes/custom-rpc.html#rpc-to-call-a-runtime-api&#xD;&#xA;&#xD;&#xA;https://core.tetcoin.org/recipes/runtime-api.html&#xD;&#xA;&#xD;&#xA;Is there any recent documentation about adding custom RPCs for a pallet? Everything I've found is pretty outdated I think. &#xD;&#xA;&#xD;&#xA;UPDATE: I've uploaded the current status of the code, I think it will be easier to try.&#xD;&#xA;&#xD;&#xA;https://github.com/andresvsm/substrate-pallet-rpc/tree/items-branch" ContentLicense="CC BY-SA 4.0" />
  <row Id="6214" PostHistoryTypeId="2" PostId="1681" RevisionGUID="c6782421-cc1a-4f9c-abcd-6765c756ade6" CreationDate="2022-04-07T08:35:10.620" UserId="121" Text="When we have an Ink! smart contract code calling a native Substrate pallet function, on the pallet side how to retrieve:&#xD;&#xA;&#xD;&#xA;1. The calling smart contract address/ID&#xD;&#xA;2. The original caller of the smart contract (or is this possible?)&#xD;&#xA;3. The equivalent EVM `msg.value` in the smart contract, if there is one?&#xD;&#xA;&#xD;&#xA;If there is any tutorial/example that covers the above questions, it will be great just to paste the link out as well.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="6216" PostHistoryTypeId="1" PostId="1681" RevisionGUID="c6782421-cc1a-4f9c-abcd-6765c756ade6" CreationDate="2022-04-07T08:35:10.620" UserId="121" Text="Getting smart contract value from native Substrate pallet function" ContentLicense="CC BY-SA 4.0" />
  <row Id="6217" PostHistoryTypeId="3" PostId="1681" RevisionGUID="c6782421-cc1a-4f9c-abcd-6765c756ade6" CreationDate="2022-04-07T08:35:10.620" UserId="121" Text="|pallet|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6218" PostHistoryTypeId="2" PostId="1682" RevisionGUID="a0ef48e5-2b8e-481d-a1e5-f443c8c7a8d7" CreationDate="2022-04-07T08:45:19.133" UserId="121" Text="The use case is that maybe the existing chain has bricked down (not producing block anymore possibly due to no block having been produced in the past epoch), or I want to copy the current production chain data to a test environment and try out storage migration.&#xD;&#xA;&#xD;&#xA;Is it possible to to export the running chain data, import it to a new chain with the new chain resumed and run (continue producing blocks)? If yes, is there a guide on how to do it?&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="6220" PostHistoryTypeId="1" PostId="1682" RevisionGUID="a0ef48e5-2b8e-481d-a1e5-f443c8c7a8d7" CreationDate="2022-04-07T08:45:19.133" UserId="121" Text="How to export the current running chain data and import it in a new chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6221" PostHistoryTypeId="3" PostId="1682" RevisionGUID="a0ef48e5-2b8e-481d-a1e5-f443c8c7a8d7" CreationDate="2022-04-07T08:45:19.133" UserId="121" Text="|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6222" PostHistoryTypeId="2" PostId="1683" RevisionGUID="1d879835-b6e0-4c41-963b-3355cc6f5216" CreationDate="2022-04-07T08:45:48.467" UserId="1878" Text="What is the consequence if I implement `MaxEncodedLen` lower than the actual max length of the type? Will the bytes which are above the length just not be written to storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6224" PostHistoryTypeId="1" PostId="1683" RevisionGUID="1d879835-b6e0-4c41-963b-3355cc6f5216" CreationDate="2022-04-07T08:45:48.467" UserId="1878" Text="What happens if I implement `MaxEncodedLen` lower than the actual max length?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6225" PostHistoryTypeId="3" PostId="1683" RevisionGUID="1d879835-b6e0-4c41-963b-3355cc6f5216" CreationDate="2022-04-07T08:45:48.467" UserId="1878" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6226" PostHistoryTypeId="2" PostId="1684" RevisionGUID="ef602e79-13da-4b96-9015-16d9db838ebd" CreationDate="2022-04-07T08:47:16.283" UserId="451" Text="This is definitely a feature we have in mind, however at the moment there are no plans to implement it in the immediate future.&#xD;&#xA;&#xD;&#xA;I have created an issue for it in Substrate: https://github.com/paritytech/substrate/issues/11181, so keep an eye on that for any updates, and add any comments/suggestions you may have." ContentLicense="CC BY-SA 4.0" />
  <row Id="6228" PostHistoryTypeId="2" PostId="1685" RevisionGUID="7dde246d-c21b-4b0f-a140-5a017f287c17" CreationDate="2022-04-07T09:17:25.230" UserId="1728" Text="So currently, I need to iterate over the StorageMap defined like this: &#xD;&#xA;```Rust&#xD;&#xA;pub(super) type Report&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, (T::AccountId, HealthRound), Reports&lt;T::AccountId,HealthRound&gt;, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;And to solve this, I found `IterableStorageMap` in `frame_support::storage`, So I defined it like this &#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;pub(super) type Report&lt;T: Config&gt; = IterableStorageMap&lt;_, Blake2_128Concat, (T::AccountId, HealthRound), Reports&lt;T::AccountId,HealthRound&gt;, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;Upon doing this, I get an error like this&#xD;&#xA;```Rust&#xD;&#xA;error: Invalid pallet::storage, expected ident: `StorageValue` or `StorageMap` or `StorageDoubleMap` or `StorageNMap` in order to expand metadata, found `IterableStorageMap`.&#xD;&#xA;```&#xD;&#xA;Am I missing something? It would be of great help if someone who has already used this can explain how to initialize this type of `StorageItem`.  &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6230" PostHistoryTypeId="1" PostId="1685" RevisionGUID="7dde246d-c21b-4b0f-a140-5a017f287c17" CreationDate="2022-04-07T09:17:25.230" UserId="1728" Text="How to use `IterableStorageMap`" ContentLicense="CC BY-SA 4.0" />
  <row Id="6231" PostHistoryTypeId="3" PostId="1685" RevisionGUID="7dde246d-c21b-4b0f-a140-5a017f287c17" CreationDate="2022-04-07T09:17:25.230" UserId="1728" Text="|storage|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6232" PostHistoryTypeId="2" PostId="1686" RevisionGUID="e3d84be7-fb8c-4043-83ed-7a581c2595fa" CreationDate="2022-04-07T10:24:53.690" UserId="87" Text="I am trying to get some information about the (other) nodes that are connected to my parachain node. &#xD;&#xA;&#xD;&#xA;I can see how many nodes are connected ( in telemetry and polkadotjs apps), but how can I find their network identities? Can I query this information via RPC or polkadot js? If so how? " ContentLicense="CC BY-SA 4.0" />
  <row Id="6234" PostHistoryTypeId="1" PostId="1686" RevisionGUID="e3d84be7-fb8c-4043-83ed-7a581c2595fa" CreationDate="2022-04-07T10:24:53.690" UserId="87" Text="Is it possible to inspect which nodes are connected to your node via rpc or polakdot.js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6235" PostHistoryTypeId="3" PostId="1686" RevisionGUID="e3d84be7-fb8c-4043-83ed-7a581c2595fa" CreationDate="2022-04-07T10:24:53.690" UserId="87" Text="|substrate-node|networking|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6236" PostHistoryTypeId="2" PostId="1687" RevisionGUID="5b415a6c-4c12-4742-be02-eb8ab9f159a4" CreationDate="2022-04-07T10:25:43.937" UserId="1989" Text="We have a few collators for the Kintsugi parachain actively syncing and producing blocks when they suddenly fall-over due to the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Apr 02 21:06:00 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: 2022-04-02 21:06:00 [Relaychain] ✨ Imported #12082344 (0x9ef8…3509)&#xD;&#xA;Apr 02 21:06:01 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: 2022-04-02 21:06:01 [Parachain]  Idle (27 peers), best: #665718 (0x7648…e130), finalized #665718 (0x7648…e130), ⬇ 15.9kiB/s ⬆ 16.8kiB/s&#xD;&#xA;Apr 02 21:06:03 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: 2022-04-02 21:06:03 [Relaychain]  Idle (50 peers), best: #12082344 (0x9ef8…3509), finalized #12082341 (0xbdf5…24bb), ⬇ 312.3kiB/s ⬆ 549.4kiB/s&#xD;&#xA;Apr 02 21:06:06 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: 2022-04-02 21:06:06 [Parachain]  Idle (27 peers), best: #665718 (0x7648…e130), finalized #665718 (0x7648…e130), ⬇ 7.6kiB/s ⬆ 8.3kiB/s&#xD;&#xA;Apr 02 21:06:06 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: 2022-04-02 21:06:06 [Relaychain] ✨ Imported #12082345 (0xa6b2…9cb1)&#xD;&#xA;Apr 02 21:06:06 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: 2022-04-02 21:06:06 Off-chain worker started on block 665719&#xD;&#xA;Apr 02 21:06:06 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: 2022-04-02 21:06:06 [Parachain] Starting collation. relay_parent=0xa6b2df698486715d55479010149e18cd14e11196553ad920752e9e181fd69cb1 at=0x2ba467927cfdf92d41997301b1b9aa38f09cef2c365ed9676fafa71a4f5eb669&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: 2022-04-02 21:06:07 [Parachain] panicked at 'Storage root must match that calculated.', /builds/interlay/interbtc/.cargo/git/checkouts/substrate-f4423eebfa0046a3/22d40c7/frame/executive/src/lib.rs:488:9&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: 2022-04-02 21:06:07 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: WASM backtrace:&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]:     0: 0x32b297 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]:     1: 0x1173a - &lt;unknown&gt;!core::panicking::panic_fmt::hce09957bf3e88e08&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]:     2: 0xc0f4f - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::execute_block::h2b20ae17664d24fe&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]:     3: 0x14ff47 - &lt;unknown&gt;!Core_execute_block&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]:     &#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: 2022-04-02 21:06:07 [Parachain]  Error importing block 0x0520227ed2b74353dc2517aaf3a59e66e874fbb391a849faf6a1640812ff2f29: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]: WASM backtrace:&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]:     0: 0x32b297 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]:     1: 0x1173a - &lt;unknown&gt;!core::panicking::panic_fmt::hce09957bf3e88e08&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]:     2: 0xc0f4f - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::execute_block::h2b20ae17664d24fe&#xD;&#xA;Apr 02 21:06:07 ubuntu-s-2vcpu-4gb-amd-fra1-01 kintsugi[309550]:     3: 0x14ff47 - &lt;unknown&gt;!Core_execute_block&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;No runtime upgrades were performed and the collators all have `--execution=wasm` set. This appears to be unrecoverable until we manually restart the node." ContentLicense="CC BY-SA 4.0" />
  <row Id="6238" PostHistoryTypeId="1" PostId="1687" RevisionGUID="5b415a6c-4c12-4742-be02-eb8ab9f159a4" CreationDate="2022-04-07T10:25:43.937" UserId="1989" Text="Collator panicked at 'Storage root must match that calculated.'" ContentLicense="CC BY-SA 4.0" />
  <row Id="6239" PostHistoryTypeId="3" PostId="1687" RevisionGUID="5b415a6c-4c12-4742-be02-eb8ab9f159a4" CreationDate="2022-04-07T10:25:43.937" UserId="1989" Text="|runtime|wasm|collator|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6240" PostHistoryTypeId="2" PostId="1688" RevisionGUID="d16ce36f-253a-493d-a648-58355b16f8a3" CreationDate="2022-04-07T10:36:06.973" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="6242" PostHistoryTypeId="1" PostId="1688" RevisionGUID="d16ce36f-253a-493d-a648-58355b16f8a3" CreationDate="2022-04-07T10:36:06.973" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6243" PostHistoryTypeId="1" PostId="1689" RevisionGUID="22d2742e-5a6e-452b-a0e8-3268342b1595" CreationDate="2022-04-07T10:36:06.973" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6245" PostHistoryTypeId="2" PostId="1689" RevisionGUID="22d2742e-5a6e-452b-a0e8-3268342b1595" CreationDate="2022-04-07T10:36:06.973" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="6246" PostHistoryTypeId="2" PostId="1690" RevisionGUID="c744a20d-f706-4bc4-8b35-e34c8c0f0c9b" CreationDate="2022-04-07T10:38:08.540" UserId="2132" Text="I would like to use a standard JS `Proxy` around `ApiPromise`, basically to add my own fields to the object without having to extend it. I have some issues doing the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const proxied = new Proxy(&#xD;&#xA;  new ApiPromise({ provider: new WsProvider() }),&#xD;&#xA;  {&#xD;&#xA;    something: () =&gt; &quot;test&quot;&#xD;&#xA;  }&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;console.log(&quot;something=&quot;, proxied.something())&#xD;&#xA;&#xD;&#xA;await proxied.isReady&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My first `console.log` executes correctly and then on the next line it fails with the following error:&#xD;&#xA;&#xD;&#xA;`TypeError: Cannot read private member #isReadyPromise from an object whose class did not declare it`&#xD;&#xA;&#xD;&#xA;The above comes from internally to the `ApiPromise`, specifically `@polkadot/api/promise/Api.js:162:17`. Is there a specific step that I'm missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6248" PostHistoryTypeId="1" PostId="1690" RevisionGUID="c744a20d-f706-4bc4-8b35-e34c8c0f0c9b" CreationDate="2022-04-07T10:38:08.540" UserId="2132" Text="Using a JS Proxy around ApiPromise" ContentLicense="CC BY-SA 4.0" />
  <row Id="6249" PostHistoryTypeId="3" PostId="1690" RevisionGUID="c744a20d-f706-4bc4-8b35-e34c8c0f0c9b" CreationDate="2022-04-07T10:38:08.540" UserId="2132" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6250" PostHistoryTypeId="2" PostId="1691" RevisionGUID="2f17d03d-abf2-4b71-9fce-a1d4b2825a1e" CreationDate="2022-04-07T10:44:25.150" UserId="126" Text="You can get that information from the RPC call `system.peers()`.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CHB8x.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6252" PostHistoryTypeId="2" PostId="1692" RevisionGUID="507b1771-fe73-4583-8175-2e02b8473a99" CreationDate="2022-04-07T10:48:03.970" UserId="213" Text="When you declare a storage say&#xD;&#xA;&#xD;&#xA;    pub type Something&lt;T&gt; = StorageValue&lt;_, u32&gt;;&#xD;&#xA;&#xD;&#xA;We get query function &quot;something&quot;.&#xD;&#xA;&#xD;&#xA;But I want to write some specific functions that reads storage and supplies it to frontend. &#xD;&#xA;&#xD;&#xA;Say:&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    fn get_something() -&gt; u32 {&#xD;&#xA;           match &lt;Something&lt;T&gt;&gt;::get() {&#xD;&#xA;    				None =&gt; Err(Error::&lt;T&gt;::NoneValue)?,&#xD;&#xA;    				Some(value) =&gt; {&#xD;&#xA;    					value + 1&#xD;&#xA;    				},&#xD;&#xA;    			}&#xD;&#xA;        }&#xD;&#xA;Solidity has view functions. How to write view functions or custom queries in substrate? " ContentLicense="CC BY-SA 4.0" />
  <row Id="6254" PostHistoryTypeId="1" PostId="1692" RevisionGUID="507b1771-fe73-4583-8175-2e02b8473a99" CreationDate="2022-04-07T10:48:03.970" UserId="213" Text="How to write a custom query for storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6255" PostHistoryTypeId="3" PostId="1692" RevisionGUID="507b1771-fe73-4583-8175-2e02b8473a99" CreationDate="2022-04-07T10:48:03.970" UserId="213" Text="|polkadot-js|substrate-node-template|substrate-front-end|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6256" PostHistoryTypeId="2" PostId="1693" RevisionGUID="2c1cef2b-71fc-4e7f-a1da-1f646f5406dd" CreationDate="2022-04-07T11:05:04.660" UserId="642" Text="I use &quot;api.derive.crowdloan.ownContributions&quot; to get my contribution amount to an already active crowdloan and it works. But to get the contribution on a parachain which has already leased an slot such as ACALA (paraId:2000), the api returns 0.&#xD;&#xA;&#xD;&#xA;Is there another api to fetch it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6258" PostHistoryTypeId="1" PostId="1693" RevisionGUID="2c1cef2b-71fc-4e7f-a1da-1f646f5406dd" CreationDate="2022-04-07T11:05:04.660" UserId="642" Text="how to get my own crowdloan contribution to a parachain which is already onboard?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6259" PostHistoryTypeId="3" PostId="1693" RevisionGUID="2c1cef2b-71fc-4e7f-a1da-1f646f5406dd" CreationDate="2022-04-07T11:05:04.660" UserId="642" Text="|parachain|crowdloan|contribution|hasleased|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6260" PostHistoryTypeId="2" PostId="1694" RevisionGUID="63d5de23-c4fc-4e3f-a697-b33813d6d8ce" CreationDate="2022-04-07T11:07:19.213" UserId="167" Text="&gt; We get query function &quot;something&quot;.&#xD;&#xA;&#xD;&#xA;You don't get this out of the box. You will get this only when you declare `#[pallet::getter(fn something)]` on top of the storage item. This is totally optional, and adds a `fn something` to `impl&lt;T: Config&gt; Pallet&lt;T&gt; {}`. You can simply skip the `#[pallet::getter(fn something)]`, and add your custom getter/view function: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  fn get_something() -&gt; u32 {&#xD;&#xA;    // custom logic&#xD;&#xA;  } &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6262" PostHistoryTypeId="2" PostId="1695" RevisionGUID="126f57d6-c03c-4d6c-974c-ddbfba100b0f" CreationDate="2022-04-07T11:19:26.967" UserId="298" Text="Working on final touches for chain-spec to create a parathread on kusama. What is the relay-chain name for kusama? kusama or kusama-native?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6264" PostHistoryTypeId="1" PostId="1695" RevisionGUID="126f57d6-c03c-4d6c-974c-ddbfba100b0f" CreationDate="2022-04-07T11:19:26.967" UserId="298" Text="What is the relay-chain name for Kusama for chain-spec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6265" PostHistoryTypeId="3" PostId="1695" RevisionGUID="126f57d6-c03c-4d6c-974c-ddbfba100b0f" CreationDate="2022-04-07T11:19:26.967" UserId="298" Text="|substrate-node|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6266" PostHistoryTypeId="2" PostId="1696" RevisionGUID="a5327a91-6d8c-4f1e-8ee8-6f8280786e03" CreationDate="2022-04-07T11:46:36.400" UserId="298" Text="2 questions here:&#xD;&#xA;&#xD;&#xA;If the current lease period is 20, and we make lease period from lease 20 to 27, because we dont want to compete with the chains that will renew their lease for lease 21, essentially giving up a lease period, will that affect how much time we have as a crowdloan period?&#xD;&#xA;&#xD;&#xA;Can we choose when to enter into an auction? Does having a lower cap speed up getting into an auction?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6268" PostHistoryTypeId="1" PostId="1696" RevisionGUID="a5327a91-6d8c-4f1e-8ee8-6f8280786e03" CreationDate="2022-04-07T11:46:36.400" UserId="298" Text="Can you speed up the crowdloan period?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6269" PostHistoryTypeId="3" PostId="1696" RevisionGUID="a5327a91-6d8c-4f1e-8ee8-6f8280786e03" CreationDate="2022-04-07T11:46:36.400" UserId="298" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6270" PostHistoryTypeId="5" PostId="1693" RevisionGUID="902d4987-ecef-4bc1-990d-2a244d5c7d66" CreationDate="2022-04-07T11:53:30.350" UserId="642" Comment="added 816 characters in body" Text="I use &quot;api.derive.crowdloan.ownContributions&quot; to get my contribution amount to an already active crowdloan and it works. But to get the contribution on a parachain which has already leased an slot such as ACALA (paraId:2000), the api returns 0.&#xD;&#xA;&#xD;&#xA;Is there another api to fetch it?&#xD;&#xA;&#xD;&#xA;that part of the code is:&#xD;&#xA;&#xD;&#xA;    const paraIds = auction.crowdloans.map((c: Crowdloan) =&gt; c.fund.paraId);&#xD;&#xA;    const myHexAddress = getHexEncodedAddress(api, chain, address, settings);&#xD;&#xA;    const myAccountsHex = [myHexAddress];&#xD;&#xA;    &#xD;&#xA;    Promise.all(paraIds.map((id) =&gt; api.derive.crowdloan.ownContributions(id, myAccountsHex)))&#xD;&#xA;      .then((myContributions) =&gt; {&#xD;&#xA;        const myContibutionsMap: Map&lt;number, Balance&gt; = new Map();&#xD;&#xA;    &#xD;&#xA;        myContributions.forEach((m, index) =&gt; myContibutionMap.set(paraIds[index], m[myHexAddress] as Balance));&#xD;&#xA;        setMyContributions(myContibutionsMap);&#xD;&#xA;      }).catch(console.error);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then for example myContributions.get(2102) on kusama (for Pichiu) returns a correct value&#xD;&#xA;but myContributions.get(2000) on Polkadot (for Acala) returns 0 which is not correct!" ContentLicense="CC BY-SA 4.0" />
  <row Id="6271" PostHistoryTypeId="2" PostId="1697" RevisionGUID="efc5771e-965e-4e20-8083-5a7e3841d638" CreationDate="2022-04-07T11:53:50.340" UserId="172" Text="There's a [Sub0 workshop](https://www.youtube.com/watch?v=sfwg2aMz66I) about building a parachain, called the [Adz chain](https://github.com/paritytech/adz), and front-end application using [Substrate Connect](https://github.com/paritytech/substrate-connect) &amp;mdash; the library and browser extension designed to build applications that generate and use their own in-browser light client.&#xD;&#xA;&#xD;&#xA;In the workshop, Martin [goes through the different storage items of the parachain](https://youtu.be/sfwg2aMz66I?t=996) he's built, implying careful decisions he's made about the way he's designed the storage for it to be optimized for light client users.&#xD;&#xA;&#xD;&#xA;I understand that storage reads and writes are expensive in general and storage should always be optimized around minimizing that cost (i.e. of traversing the Merkle trie). But I'm wondering whether developers optimizing for _light client first applications_ need to adopt an even more careful mindset, and if so what specific tradeoffs or tools should they consider? How would I optimize a runtime to be as light client friendly as possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6273" PostHistoryTypeId="1" PostId="1697" RevisionGUID="efc5771e-965e-4e20-8083-5a7e3841d638" CreationDate="2022-04-07T11:53:50.340" UserId="172" Text="How can I make my runtime as light client friendly as possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6274" PostHistoryTypeId="3" PostId="1697" RevisionGUID="efc5771e-965e-4e20-8083-5a7e3841d638" CreationDate="2022-04-07T11:53:50.340" UserId="172" Text="|runtime|substrate-connect|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6275" PostHistoryTypeId="6" PostId="1696" RevisionGUID="56419692-09c5-4975-9928-f568e8ac71eb" CreationDate="2022-04-07T11:58:24.750" UserId="172" Comment="edited tags" Text="|polkadot|kusama|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6276" PostHistoryTypeId="5" PostId="1696" RevisionGUID="56419692-09c5-4975-9928-f568e8ac71eb" CreationDate="2022-04-07T11:58:24.750" UserId="172" Comment="edited tags" Text="If the current lease period is 20, and we make a lease period from lease 20 to 27, because we don't want to compete with the chains that will renew their lease for lease 21 (essentially giving up a lease period), will that affect how much time we have as a crowdloan period?&#xD;&#xA;&#xD;&#xA;Also, can we choose when to enter into an auction? Would having a lower cap speed up getting into one?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6277" PostHistoryTypeId="2" PostId="1698" RevisionGUID="c4641256-3d13-41a0-96f7-3cc606fe8517" CreationDate="2022-04-07T12:07:12.547" UserId="172" Text="In addition to the tutorials mentioned by Sam, [this workshop](https://www.youtube.com/watch?v=sfwg2aMz66I&amp;list=PLp0_ueXY_enX6S5sogeo7GHD1BXTLj5Xr) is very thorough as it explains all the steps of taking your solochain to a parachain as well as building the front-end for it. It even ends with demoing the entire application.&#xD;&#xA;&#xD;&#xA;Skip to [this part](https://youtu.be/sfwg2aMz66I?list=PLp0_ueXY_enX6S5sogeo7GHD1BXTLj5Xr&amp;t=2751) to get an overview of the steps you'll need to take to convert your solo-chain to a parachain connected to a live relay chain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="6280" PostHistoryTypeId="2" PostId="1699" RevisionGUID="f03a1567-e34e-4e3c-9f29-ec277bccea31" CreationDate="2022-04-07T12:15:23.770" UserId="73" Text="This is expected behavior. At least for now. I opened the following pr to improve the docs around this: https://github.com/paritytech/substrate/pull/11182" ContentLicense="CC BY-SA 4.0" />
  <row Id="6282" PostHistoryTypeId="5" PostId="1693" RevisionGUID="06e0b085-246f-4b6a-8d09-4c57cf4c8182" CreationDate="2022-04-07T12:17:09.827" UserId="642" Comment="added 208 characters in body" Text="I use &quot;api.derive.crowdloan.ownContributions&quot; to get my contribution amount to an already active crowdloan and it works. But to get the contribution on a parachain which has already leased an slot such as ACALA (paraId:2000), the api returns 0.&#xD;&#xA;&#xD;&#xA;Is there another api to fetch it?&#xD;&#xA;&#xD;&#xA;that part of the code is:&#xD;&#xA;&#xD;&#xA;    const paraIds = auction.crowdloans.map((c: Crowdloan) =&gt; c.fund.paraId);&#xD;&#xA;    const myHexAddress = getHexEncodedAddress(api, chain, address, settings);&#xD;&#xA;    const myAccountsHex = [myHexAddress];&#xD;&#xA;    &#xD;&#xA;    Promise.all(paraIds.map((id) =&gt; api.derive.crowdloan.ownContributions(id, myAccountsHex)))&#xD;&#xA;      .then((myContributions) =&gt; {&#xD;&#xA;        const myContibutionsMap: Map&lt;number, Balance&gt; = new Map();&#xD;&#xA;    &#xD;&#xA;        myContributions.forEach((m, index) =&gt; myContibutionMap.set(paraIds[index], m[myHexAddress] as Balance));&#xD;&#xA;        setMyContributions(myContibutionsMap);&#xD;&#xA;      }).catch(console.error);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then for example myContributions.get(2102) on kusama (for Pichiu) returns a correct value&#xD;&#xA;but myContributions.get(2000) on Polkadot (for Acala) returns 0 which is not correct!&#xD;&#xA;&#xD;&#xA;the complete code is [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Nick-1979/polkadot-Js-Plus-extension/blob/a967d8bc9f693eb723d3e418649b88bb0a625a02/packages/extension-plus/src/Popup/CrowdLoans/index.tsx#L117" ContentLicense="CC BY-SA 4.0" />
  <row Id="6283" PostHistoryTypeId="2" PostId="1700" RevisionGUID="15e01d19-7708-411e-b11a-e866e15fd88a" CreationDate="2022-04-07T12:17:55.460" UserId="73" Text="This is probably related to the broken state cache. See [here][1] for more information. For now you can run your nodes with `--state-cache-size 0` to prevent this bug.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/9769" ContentLicense="CC BY-SA 4.0" />
  <row Id="6285" PostHistoryTypeId="2" PostId="1701" RevisionGUID="f4f581a8-de0f-41e5-9321-f983197960c7" CreationDate="2022-04-07T12:21:27.347" UserId="2136" Text="@ShawnTabrizi answered the question perfectly in the comments. Adding it here as an answer to make it easier for others to find. All credit goes to @ShawnTabrizi. The solution is to add codec(mel_bound()) and scale_info(skip_type_params(T)) macros to the struct that needs to be stored when the struct includes BoundedVecs. Because BoundedVecs need a MaxLength parameter, T can not be avoided, the compiler mistakenly believes that T therefore needs to implement MaxEncodedLen and TypeInfo. The macros above tell the compiler that it doesn't. More information here: [https://substrate.stackexchange.com/questions/619/how-to-fix-parity-scale-codecmaxencodedlen-is-not-implemented-for-t/620#620][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/619/how-to-fix-parity-scale-codecmaxencodedlen-is-not-implemented-for-t/620#620" ContentLicense="CC BY-SA 4.0" />
  <row Id="6287" PostHistoryTypeId="2" PostId="1702" RevisionGUID="69aa99fd-f2dc-45b2-9bb3-cf4d13787a44" CreationDate="2022-04-07T12:35:04.227" UserId="45" Text="Currently we impose a restriction on deregistering if a parachain validation code upgrade is underway. &#xD;&#xA;&#xD;&#xA;The reason for that is trying to save on the complexity of the design. Allowing deregistering if an upgrade scheduled would complicate the logic and on another hand this limitation does not seem to be very restrictive.&#xD;&#xA;&#xD;&#xA;That said, with enough demand I think the restriction could be lifted." ContentLicense="CC BY-SA 4.0" />
  <row Id="6289" PostHistoryTypeId="2" PostId="1703" RevisionGUID="f058edd6-2cba-4edb-8e6b-02fefd076c9b" CreationDate="2022-04-07T12:50:15.940" UserId="627" Text="This is actually a known issue with [JS private fields](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields) and [JS Proxy objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy). If you have some time to spare, you can read a [quite lengthy discussion](https://github.com/tc39/proposal-class-fields/issues/106) on it at TC39.&#xD;&#xA;&#xD;&#xA;I have actually seen this out in the wild before with non-explicit proxies introduced by [Vue 3 refs](https://github.com/polkadot-js/api/issues/4656). The &quot;quite lengthy discussion&quot; above does help for the general case, since it mentions a pattern which seems to work -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const proxied = new Proxy(&#xD;&#xA;  new ApiPromise({ ... }),&#xD;&#xA;  {&#xD;&#xA;    // getter target for build-in API properties, returns it directly on&#xD;&#xA;    // target if found, otherwise defers to the implementation provided&#xD;&#xA;    get (target, prop, _receiver) {&#xD;&#xA;      return prop in target&#xD;&#xA;        ? target[prop]&#xD;&#xA;        : this[prop];&#xD;&#xA;    },&#xD;&#xA;    // any extras you wish to add&#xD;&#xA;    something: () =&gt; 'test'&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tested the above addition the code  you provided and it does seem to do what is expected, logging both the output from `something()` as well as `isReady` not failing. Additionally could also subscribe to new blocks directly on `proxied`.&#xD;&#xA;&#xD;&#xA;I know you did mention it in passing, but an `class MyApi extends ApiPromise { ... }` would also have the desired effect of adding new methods, without having the above work-around for Proxy + private fields. This is generally the approach I would go for, but it obviously depends on your specific usage." ContentLicense="CC BY-SA 4.0" />
  <row Id="6291" PostHistoryTypeId="5" PostId="1693" RevisionGUID="ca623cc5-cadb-462b-abd5-3aacb508bde6" CreationDate="2022-04-07T12:51:52.413" UserId="642" Comment="added 69 characters in body" Text="I use &quot;api.derive.crowdloan.ownContributions&quot; to get my contribution amount to an already active crowdloan and it works. But to get the contribution on a parachain which has already leased an slot such as ACALA (paraId:2000), the api returns 0.&#xD;&#xA;&#xD;&#xA;Is there another api to fetch it?&#xD;&#xA;&#xD;&#xA;that part of the code is:&#xD;&#xA;&#xD;&#xA;    const paraIds = auction.crowdloans.map((c: Crowdloan) =&gt; c.fund.paraId);&#xD;&#xA;    const myHexAddress = getHexEncodedAddress(api, chain, address, settings);&#xD;&#xA;    const myAccountsHex = [myHexAddress];&#xD;&#xA;    &#xD;&#xA;    Promise.all(paraIds.map((id) =&gt; api.derive.crowdloan.ownContributions(id, myAccountsHex)))&#xD;&#xA;      .then((myContributions) =&gt; {&#xD;&#xA;        const myContibutionsMap: Map&lt;number, Balance&gt; = new Map();&#xD;&#xA;    &#xD;&#xA;        myContributions.forEach((m, index) =&gt; myContibutionMap.set(paraIds[index], m[myHexAddress] as Balance));&#xD;&#xA;        setMyContributions(myContibutionsMap);&#xD;&#xA;      }).catch(console.error);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then for example myContributions.get(2102) on kusama (for Pichiu) returns a correct value&#xD;&#xA;but myContributions.get(2000) on Polkadot (for Acala) returns 0 which is not correct!&#xD;&#xA;&#xD;&#xA;the complete code is [here][1]&#xD;&#xA;&#xD;&#xA;ps: even Polkawallet does not show the ACALA contribution correct!!&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Nick-1979/polkadot-Js-Plus-extension/blob/a967d8bc9f693eb723d3e418649b88bb0a625a02/packages/extension-plus/src/Popup/CrowdLoans/index.tsx#L117" ContentLicense="CC BY-SA 4.0" />
  <row Id="6292" PostHistoryTypeId="5" PostId="1693" RevisionGUID="1d829811-a30d-4459-8454-08a653224677" CreationDate="2022-04-07T12:57:39.660" UserId="642" Comment="deleted 1 character in body" Text="I use &quot;api.derive.crowdloan.ownContributions&quot; to get my contribution amount to an already active crowdloan and it works. But to get the contribution on a parachain which has already leased a slot such as ACALA (paraId:2000), the api returns 0.&#xD;&#xA;&#xD;&#xA;Is there another api to fetch it?&#xD;&#xA;&#xD;&#xA;that part of the code is:&#xD;&#xA;&#xD;&#xA;    const paraIds = auction.crowdloans.map((c: Crowdloan) =&gt; c.fund.paraId);&#xD;&#xA;    const myHexAddress = getHexEncodedAddress(api, chain, address, settings);&#xD;&#xA;    const myAccountsHex = [myHexAddress];&#xD;&#xA;    &#xD;&#xA;    Promise.all(paraIds.map((id) =&gt; api.derive.crowdloan.ownContributions(id, myAccountsHex)))&#xD;&#xA;      .then((myContributions) =&gt; {&#xD;&#xA;        const myContibutionsMap: Map&lt;number, Balance&gt; = new Map();&#xD;&#xA;    &#xD;&#xA;        myContributions.forEach((m, index) =&gt; myContibutionMap.set(paraIds[index], m[myHexAddress] as Balance));&#xD;&#xA;        setMyContributions(myContibutionsMap);&#xD;&#xA;      }).catch(console.error);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then for example myContributions.get(2102) on kusama (for Pichiu) returns a correct value&#xD;&#xA;but myContributions.get(2000) on Polkadot (for Acala) returns 0 which is not correct!&#xD;&#xA;&#xD;&#xA;the complete code is [here][1]&#xD;&#xA;&#xD;&#xA;ps: even Polkawallet does not show the ACALA contribution correct!!&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Nick-1979/polkadot-Js-Plus-extension/blob/a967d8bc9f693eb723d3e418649b88bb0a625a02/packages/extension-plus/src/Popup/CrowdLoans/index.tsx#L117" ContentLicense="CC BY-SA 4.0" />
  <row Id="6293" PostHistoryTypeId="2" PostId="1704" RevisionGUID="1d8e1b9c-1d98-4e18-8b9f-e6e064a1c1fc" CreationDate="2022-04-07T13:09:29.827" UserId="32" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;To start a crowdloan campaign, you need to specify&#xD;&#xA;&#xD;&#xA; - ParaID (Assuming you registered as a parathread)&#xD;&#xA; - Cap - the maximum number of tokens that can be contributed&#xD;&#xA; - FirstPeriod - Planned start of the parachain lease&#xD;&#xA; - lastPeriod - Planned end of the parachain lease&#xD;&#xA; - end - the block number at which you would like to end the crowdloan campaign&#xD;&#xA;&#xD;&#xA;Now, coming to your question, as you mentioned lease period 20, I inferred that you are planning to start a crowdloan campaign on Kusama. The next [available auction on Kusama][2] is 32nd auction that starts on April 13th. If you manage to win that auction, you have a chance to onboard your parachain after May 19th. The earliest you can onboard is during the lease period 21. Your chance to have onboarded as a parachain during lease period 20 is gone!&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;If you do not want to compete with the parachains which are aiming for lease period 21 onboarding, you can choose to set firstPeriod as 22 and lastPeriod as 29. You can choose to start the crowdloan anytime for any of the parachain slots in the future (each parachain slot has a range of 8 lease periods) and run it for a really long time so that you manage to win, but the contributors are stuck with your crowdloan till the end block you specify, if you do not manage to win any auction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mK2tH.png&#xD;&#xA;  [2]: https://kusama.network/auctions/&#xD;&#xA;  [3]: https://i.stack.imgur.com/Gy8TR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6295" PostHistoryTypeId="5" PostId="1704" RevisionGUID="04dba42d-7731-449b-bf93-b89373f26069" CreationDate="2022-04-07T13:17:12.577" UserId="32" Comment="added 389 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;To start a crowdloan campaign, you need to specify&#xD;&#xA;&#xD;&#xA; - ParaID (Assuming you registered as a parathread)&#xD;&#xA; - Cap - the maximum number of tokens that can be contributed&#xD;&#xA; - FirstPeriod - Planned start of the parachain lease&#xD;&#xA; - lastPeriod - Planned end of the parachain lease&#xD;&#xA; - end - the block number at which you would like to end the crowdloan campaign&#xD;&#xA;&#xD;&#xA;Now, coming to your question, as you mentioned lease period 20, I inferred that you are planning to start a crowdloan campaign on Kusama. The next [available auction on Kusama][2] is 32nd auction that starts on April 13th. If you manage to win that auction, you have a chance to onboard your parachain after May 19th. The earliest you can onboard is during the lease period 21. **Your chance to have onboarded as a parachain during lease period 20 is gone!**&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;If you do not want to compete with the parachains which are aiming for lease period 21 onboarding, you can choose to set firstPeriod as 22 and lastPeriod as 29. You can choose to start the crowdloan anytime for any of the parachain slots in the future (each parachain slot has a range of 8 lease periods) and run it for a really long time so that you manage to win, but the contributors are stuck with your crowdloan till the end block you specify, if you do not manage to win any auction.&#xD;&#xA;&#xD;&#xA;**Would having a lower cap speed up getting into one?**&#xD;&#xA;&#xD;&#xA;Setting a crowdloan cap is a strategic decision that involves many considerations. One of them  is that you should have enough tokens to be competitive and stand a chance in winning the auction. Setting a lower cap and getting maxed out will essentially freeze your crowdloan and no additional contributions can be made to it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mK2tH.png&#xD;&#xA;  [2]: https://kusama.network/auctions/&#xD;&#xA;  [3]: https://i.stack.imgur.com/Gy8TR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6296" PostHistoryTypeId="5" PostId="1704" RevisionGUID="e5eda212-528d-4329-ad4e-7bec355d8ce4" CreationDate="2022-04-07T13:22:44.180" UserId="32" Comment="added 389 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;To start a crowdloan campaign, you need to specify&#xD;&#xA;&#xD;&#xA; - ParaID (Assuming you registered as a parathread)&#xD;&#xA; - Cap - the maximum number of tokens that can be contributed&#xD;&#xA; - FirstPeriod - Planned start of the parachain lease&#xD;&#xA; - lastPeriod - Planned end of the parachain lease&#xD;&#xA; - end - the block number at which you would like to end the crowdloan campaign&#xD;&#xA;&#xD;&#xA;Now, coming to your question, as you mentioned lease period 20, I inferred that you are planning to start a crowdloan campaign on Kusama. The next [available auction on Kusama][2] is 32nd auction that starts on April 13th. If you manage to win that auction, you have a chance to onboard your parachain after May 19th. The earliest you can onboard is during the lease period 21. **Your chance to have onboarded as a parachain during lease period 20 is gone!**&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;If you do not want to compete with the parachains which are aiming for lease period 21 onboarding, you can choose to set firstPeriod as 22 and lastPeriod as 29. You can choose to start the crowdloan anytime for any of the parachain slots in the future (each parachain slot has a range of 8 lease periods) and run it for a really long time so that you manage to win, but the contributors are stuck with your crowdloan till the end block you specify, if you do not manage to win any auction.&#xD;&#xA;&#xD;&#xA;**Would having a lower cap speed up getting into one?**&#xD;&#xA;&#xD;&#xA;Setting a crowdloan cap is a strategic decision that involves many considerations. One of them  is that you should have enough tokens to be competitive and stand a chance in winning the auction. Setting a lower cap and getting maxed out will essentially freeze your crowdloan and no additional contributions can be made to it.&#xD;&#xA;&#xD;&#xA;For an insight into crowdloan campaign strategies, check out the previous successful crowdloan campaigns on https://parachains.info/auctions/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mK2tH.png&#xD;&#xA;  [2]: https://kusama.network/auctions/&#xD;&#xA;  [3]: https://i.stack.imgur.com/Gy8TR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6297" PostHistoryTypeId="5" PostId="1693" RevisionGUID="985293e7-f811-471e-8ae2-8da5c6eb4a0c" CreationDate="2022-04-07T13:31:27.600" UserId="128" Comment="Fix tags, grammar and code formatting." Text="I use `api.derive.crowdloan.ownContributions` to get my contribution amount to an already active crowdloan and it works. But to get the contribution on a parachain which has already leased a slot such as ACALA (`paraId:2000`), the api returns `0`.&#xD;&#xA;&#xD;&#xA;Is there another API to fetch it?&#xD;&#xA;&#xD;&#xA;That part of the code is:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const paraIds = auction.crowdloans.map((c: Crowdloan) =&gt; c.fund.paraId);&#xD;&#xA;const myHexAddress = getHexEncodedAddress(api, chain, address, settings);&#xD;&#xA;const myAccountsHex = [myHexAddress];&#xD;&#xA;    &#xD;&#xA;Promise.all(paraIds.map((id) =&gt; api.derive.crowdloan.ownContributions(id, myAccountsHex)))&#xD;&#xA;.then((myContributions) =&gt; {&#xD;&#xA;     const myContibutionsMap: Map&lt;number, Balance&gt; = new Map();&#xD;&#xA;    &#xD;&#xA;     myContributions.forEach((m, index) =&gt; myContibutionMap.set(paraIds[index], m[myHexAddress] as Balance));&#xD;&#xA;     setMyContributions(myContibutionsMap);&#xD;&#xA;}).catch(console.error);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then for example `myContributions.get(2102)` on Kusama (for Pichiu) returns a correct value&#xD;&#xA;but `myContributions.get(2000)` on Polkadot (for Acala) returns `0` which is not correct!&#xD;&#xA;&#xD;&#xA;The complete code is [here][1].&#xD;&#xA;&#xD;&#xA;P.S. Even Polkawallet does not show the ACALA contribution correctly.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Nick-1979/polkadot-Js-Plus-extension/blob/a967d8bc9f693eb723d3e418649b88bb0a625a02/packages/extension-plus/src/Popup/CrowdLoans/index.tsx#L117" ContentLicense="CC BY-SA 4.0" />
  <row Id="6298" PostHistoryTypeId="4" PostId="1693" RevisionGUID="985293e7-f811-471e-8ae2-8da5c6eb4a0c" CreationDate="2022-04-07T13:31:27.600" UserId="128" Comment="Fix tags, grammar and code formatting." Text="How to get my own crowdloan contribution to a parachain which is already onboard?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6299" PostHistoryTypeId="6" PostId="1693" RevisionGUID="985293e7-f811-471e-8ae2-8da5c6eb4a0c" CreationDate="2022-04-07T13:31:27.600" UserId="128" Comment="Fix tags, grammar and code formatting." Text="|parachain|polkadot-js|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6302" PostHistoryTypeId="5" PostId="1704" RevisionGUID="feeba253-cd8a-443c-82e6-eb23e358fd16" CreationDate="2022-04-07T13:54:56.640" UserId="32" Comment="added 176 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;To start a crowdloan campaign, you need to specify&#xD;&#xA;&#xD;&#xA; - ParaID (Assuming you registered as a parathread)&#xD;&#xA; - Cap - the maximum number of tokens that can be contributed&#xD;&#xA; - FirstPeriod - Planned start of the parachain lease&#xD;&#xA; - lastPeriod - Planned end of the parachain lease&#xD;&#xA; - end - the block number at which you would like to end the crowdloan campaign&#xD;&#xA;&#xD;&#xA;Now, coming to your question, as you mentioned lease period 20, I inferred that you are planning to start a crowdloan campaign on Kusama. The next [available auction on Kusama][2] is 32nd auction that starts on April 13th. If you manage to win that auction, you have a chance to onboard your parachain after May 19th. The earliest you can onboard is during the lease period 21. **Your chance to have onboarded as a parachain during lease period 20 is gone!**&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;If you do not want to compete with the parachains which are aiming for lease period 21 onboarding, you can choose to set firstPeriod as 22 and lastPeriod as 29. You can choose to start the crowdloan anytime for any of the parachain slots in the future (each parachain slot has a range of 8 lease periods) and run it for a really long time so that you manage to win, but the contributors are stuck with your crowdloan till the end block you specify, if you do not manage to win any auction.&#xD;&#xA;&#xD;&#xA;**Would having a lower cap speed up getting into one?**&#xD;&#xA;&#xD;&#xA;Setting a crowdloan cap is a strategic decision that involves many considerations. One of them  is that you should have enough tokens to be competitive and stand a chance in winning the auction. Setting a lower cap and getting maxed out will essentially freeze your crowdloan and no additional contributions can be made to it.&#xD;&#xA;&#xD;&#xA;For an insight into crowdloan campaign strategies, check out the previous successful crowdloan campaigns on https://parachains.info/auctions/&#xD;&#xA;&#xD;&#xA;For more info on Auctions and Crowdloans, refer to Polkadot Wiki:&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-auction&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-crowdloans&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mK2tH.png&#xD;&#xA;  [2]: https://kusama.network/auctions/&#xD;&#xA;  [3]: https://i.stack.imgur.com/Gy8TR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6303" PostHistoryTypeId="2" PostId="1705" RevisionGUID="c807cf13-2c1f-4d35-87f3-3279412291c2" CreationDate="2022-04-07T13:55:43.590" UserId="280" Text="The chain name for the Kusama relay-chain is `kusama`. The `kusama-native` is a feature you might want to enable when building your own Kusama spec.&#xD;&#xA;&#xD;&#xA;For the purpose of preparing a parathread chainspec, it is sufficient to provide the Kusama relay spec with `--chain=kusama`." ContentLicense="CC BY-SA 4.0" />
  <row Id="6305" PostHistoryTypeId="2" PostId="1706" RevisionGUID="2d05ba6e-7cef-461d-8fa6-525d58422b5b" CreationDate="2022-04-07T14:06:05.700" UserId="298" Text="During an auction crowdloan for propsoective parachain, does the auction run automatically? Or do we need to manually make a bid? &#xD;&#xA;&#xD;&#xA;If it is manual then why doesn’t everyone go all in at the beginning of the auction period? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6307" PostHistoryTypeId="1" PostId="1706" RevisionGUID="2d05ba6e-7cef-461d-8fa6-525d58422b5b" CreationDate="2022-04-07T14:06:05.700" UserId="298" Text="During crowdloan is the auction automatic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6308" PostHistoryTypeId="3" PostId="1706" RevisionGUID="2d05ba6e-7cef-461d-8fa6-525d58422b5b" CreationDate="2022-04-07T14:06:05.700" UserId="298" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6309" PostHistoryTypeId="2" PostId="1707" RevisionGUID="7848076c-3290-4723-a83e-172d39f70423" CreationDate="2022-04-07T14:25:42.683" UserId="280" Text="A crowdloan automatically places a bid in the `on_initialize` hook (e.g. every block) after entering the ending period if the raised funds have increased since the last bid, see [here](https://github.com/paritytech/polkadot/blob/master/runtime/common/src/crowdloan/mod.rs#L346)." ContentLicense="CC BY-SA 4.0" />
  <row Id="6311" PostHistoryTypeId="2" PostId="1708" RevisionGUID="a74b5164-7cf3-4f8c-94ad-0cea958d925b" CreationDate="2022-04-07T14:36:21.543" UserId="32" Text="Adding to William's answer, here is an example that shows the bidding in action. When a campaign receives a contribution, the bid is automatically placed with the updated balance. In the screenshot below, you can see the block numbers at which bids have been automatically placed due to crowdloan contributions &#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/#/parachains/auctions&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/J08Le.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6313" PostHistoryTypeId="2" PostId="1709" RevisionGUID="ffd6c8d7-a7dd-438e-8ffb-b2e335fe6ab9" CreationDate="2022-04-07T14:43:57.013" UserId="16" Text="These environmental information is available to the `ChainExtension` through the `Environment::ext()` function. An instance of `Environment` is passed to `ChainExtension::call()` as a parameter.&#xD;&#xA;&#xD;&#xA;The `ext()` function returns a type that implements [`Ext`](https://paritytech.github.io/substrate/master/pallet_contracts/chain_extension/trait.Ext.html). Check out the linked documentation for the available functions.&#xD;&#xA;&#xD;&#xA;To answer your question:&#xD;&#xA;1. `env.ext().caller()`&#xD;&#xA;2. We don't provide this functionality on purpose because basically every use of this information constitutes a security problem on Ethereum.  We have `env.ext().caller_is_origin()`, though.&#xD;&#xA;3. `env.ext().value_transferred()`" ContentLicense="CC BY-SA 4.0" />
  <row Id="6315" PostHistoryTypeId="2" PostId="1710" RevisionGUID="f23b7702-1a02-4928-b8d5-9bbb94043684" CreationDate="2022-04-07T14:48:55.897" UserId="280" Text="You might not need to use an explicit `IterableStorageMap` as a normal `StorageMap` supports iterating both over the keys as well as they values, see the [Documentation](https://docs.substrate.io/rustdocs/latest/frame_support/storage/types/struct.StorageMap.html#method.iter):&#xD;&#xA;&#xD;&#xA;1. Either via the `KeyPrefixIterator` by calling `Report::&lt;T&gt;::iter_keys()`&#xD;&#xA;2. Or via the `PrefixIterator` by calling `Report::&lt;T&gt;::iter_values()`&#xD;&#xA;&#xD;&#xA;for&#xD;&#xA; &#xD;&#xA;```rust&#xD;&#xA;pub(super) type Report&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, (T::AccountId, HealthRound), Reports&lt;T::AccountId,HealthRound&gt;, OptionQuery&gt;;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6318" PostHistoryTypeId="2" PostId="1711" RevisionGUID="529d4280-fde1-47cb-a2bb-7e5e6f75d34d" CreationDate="2022-04-07T16:13:00.593" UserId="1849" Text="Is there a way to tell the validator node to store `db/full/parachains` on a different partition/location. Or is it safe to rsync it to a folder on another partition and then simlink it for a live validator? " ContentLicense="CC BY-SA 4.0" />
  <row Id="6320" PostHistoryTypeId="1" PostId="1711" RevisionGUID="529d4280-fde1-47cb-a2bb-7e5e6f75d34d" CreationDate="2022-04-07T16:13:00.593" UserId="1849" Text="Is there a way for a validator node to store relay chain db and parachain data in different partitions" ContentLicense="CC BY-SA 4.0" />
  <row Id="6321" PostHistoryTypeId="3" PostId="1711" RevisionGUID="529d4280-fde1-47cb-a2bb-7e5e6f75d34d" CreationDate="2022-04-07T16:13:00.593" UserId="1849" Text="|parachain|database|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6322" PostHistoryTypeId="2" PostId="1712" RevisionGUID="65dafb05-e006-4696-ade3-3b83845b18c8" CreationDate="2022-04-07T16:48:39.230" UserId="213" Text="I want to write custom query based on this [answer][1]:&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        pub fn hello_world() -&gt; u128 {&#xD;&#xA;            10&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But the problem is, it is not exposed in query of pallet inspector in substrate-node-template.&#xD;&#xA;&#xD;&#xA;Neither I could query with polkadot js api. &#xD;&#xA;&#xD;&#xA;      const queryResHandler = result =&gt;&#xD;&#xA;        result.isNone ? setStatus('None') : setStatus(result.toString()) &#xD;&#xA;    const opts = []&#xD;&#xA;    let data = api.query.templateModule.hello_world(...opts, queryResHandler)&#xD;&#xA;    or &#xD;&#xA;    let data = api.query.templateModule.helloWorld(...opts, queryResHandler)&#xD;&#xA;&#xD;&#xA;Gives error   &#xD;&#xA;&#xD;&#xA;    TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function&#xD;&#xA;&#xD;&#xA;What more I need to do?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/1694/213" ContentLicense="CC BY-SA 4.0" />
  <row Id="6324" PostHistoryTypeId="1" PostId="1712" RevisionGUID="65dafb05-e006-4696-ade3-3b83845b18c8" CreationDate="2022-04-07T16:48:39.230" UserId="213" Text="Custom query for storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="6325" PostHistoryTypeId="3" PostId="1712" RevisionGUID="65dafb05-e006-4696-ade3-3b83845b18c8" CreationDate="2022-04-07T16:48:39.230" UserId="213" Text="|substrate-node-template|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6326" PostHistoryTypeId="5" PostId="1611" RevisionGUID="eac2d5ce-d8f0-43e3-a633-48193eae57b3" CreationDate="2022-04-07T16:53:48.117" UserId="205" Comment="deleted 1 character in body" Text="in your code you are trying to replace an expected `BoundedVec&lt;u8, T::MaxLength&gt;` with your `NickName`'s struct.&#xD;&#xA;```&#xD;&#xA;        #[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;        pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;            first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;            last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        impl&lt;T: Config&gt; Nickname&lt;T&gt; {&#xD;&#xA;            fn max_encoded_len() -&gt; usize {&#xD;&#xA;                let maxLength = T::MaxLength::get() as usize;&#xD;&#xA;                maxLength * 2&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        /// The lookup table for names.&#xD;&#xA;        #[pallet::storage]&#xD;&#xA;        pub(super) type NameOf&lt;T: Config&gt; =&#xD;&#xA;            StorageMap&lt;_, Twox64Concat, T::AccountId, (Nickname&lt;T&gt;, BalanceOf&lt;T&gt;)&gt;;&#xD;&#xA;```&#xD;&#xA;I suggest you review the latest `Nicks` pallet code and replace your `#[pallet::storage]` macro with the proper according changes:&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6327" PostHistoryTypeId="2" PostId="1713" RevisionGUID="758ab82a-6486-4657-bc8c-d73def496078" CreationDate="2022-04-07T17:19:48.073" UserId="377" Text="Do we have any reference how we can implement gasless/feeless transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6329" PostHistoryTypeId="1" PostId="1713" RevisionGUID="758ab82a-6486-4657-bc8c-d73def496078" CreationDate="2022-04-07T17:19:48.073" UserId="377" Text="how we can implement gasless/feeless transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6330" PostHistoryTypeId="3" PostId="1713" RevisionGUID="758ab82a-6486-4657-bc8c-d73def496078" CreationDate="2022-04-07T17:19:48.073" UserId="377" Text="|pallet|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6331" PostHistoryTypeId="2" PostId="1714" RevisionGUID="678c9bef-ff88-4e7a-814e-d544a2fd24c8" CreationDate="2022-04-07T17:54:02.237" UserId="234" Text="I guess I have to make use of the [utility.batch][1] call but I am not sure how to pass the different anonymous proxy TXs in the batch call. &#xD;&#xA;I am also not sure of the use of the variable [index][2] in the `anonymous` call. Maybe it is there to distinguish the different anonymous proxy transactions? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/utility/src/lib.rs#L199&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/f98ef8abfc54bb7801b21be899e63f5058350e14/frame/proxy/src/lib.rs#L313" ContentLicense="CC BY-SA 4.0" />
  <row Id="6333" PostHistoryTypeId="1" PostId="1714" RevisionGUID="678c9bef-ff88-4e7a-814e-d544a2fd24c8" CreationDate="2022-04-07T17:54:02.237" UserId="234" Text="Is it possible to create multiple anonymous proxies in the same transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6334" PostHistoryTypeId="3" PostId="1714" RevisionGUID="678c9bef-ff88-4e7a-814e-d544a2fd24c8" CreationDate="2022-04-07T17:54:02.237" UserId="234" Text="|proxy|batch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6335" PostHistoryTypeId="2" PostId="1715" RevisionGUID="7cc7867d-9202-4545-b65d-8ccf2b241900" CreationDate="2022-04-07T17:58:05.333" UserId="283" Text="There are broadly two ways of doing this: **Inherents** and **Unsigned Transactions**&#xD;&#xA;&#xD;&#xA;**Inherents** are designed to be placed directly into the block by the author; they aren't stored in the transaction pool and broadcast between nodes. They are generated as part of the authoring process.&#xD;&#xA;&#xD;&#xA;**Unsigned Transactions** are, from FRAME's perspective, extrinsics like any other. Except for the main difference that they have no associated sending account. They still manifest as `Call`s - all the differences in handling unsigned transactions are related to deduplicating and spam resilience to avoid the spam against the chain. &#xD;&#xA;&#xD;&#xA;One example is Polkadot's 'claims' module. Here's the code for the actual call, which uses `ensure_none` to check that there is no regular account origin: https://github.com/paritytech/polkadot/blob/29a3f90bcbe6f237494d495f26c5f31c1451b216/runtime/common/src/claims.rs#L313-L328 and here's the code for the `ValidateUnsigned` implementation which specifies additional validity and spam protection conditions that are necessary for this transaction type to be safe. Nodes will also use the `validate_unsigned` implementation to keep their transaction pool pruned and avoid broadcasting or keeping around outdated unsigned transactions. https://github.com/paritytech/polkadot/blob/29a3f90bcbe6f237494d495f26c5f31c1451b216/runtime/common/src/claims.rs#L466-L516" ContentLicense="CC BY-SA 4.0" />
  <row Id="6337" PostHistoryTypeId="2" PostId="1716" RevisionGUID="8c293175-7da9-49ce-8878-cd2ce32bab75" CreationDate="2022-04-07T18:04:17.243" UserId="283" Text="The reason for the `index` in the `anonymous` call in `pallet-proxy` is exactly for the purposes of disambiguating multiple anonymous proxies in a single transaction.&#xD;&#xA;&#xD;&#xA;It's because of the way that the proxies module deterministically generates account IDs for proxies: https://github.com/paritytech/substrate/blob/f98ef8abfc54bb7801b21be899e63f5058350e14/frame/proxy/src/lib.rs#L648-L664&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	pub fn anonymous_account(&#xD;&#xA;		who: &amp;T::AccountId,&#xD;&#xA;		proxy_type: &amp;T::ProxyType,&#xD;&#xA;		index: u16,&#xD;&#xA;		maybe_when: Option&lt;(T::BlockNumber, u32)&gt;,&#xD;&#xA;	) -&gt; T::AccountId {&#xD;&#xA;		let (height, ext_index) = maybe_when.unwrap_or_else(|| {&#xD;&#xA;			(&#xD;&#xA;				system::Pallet::&lt;T&gt;::block_number(),&#xD;&#xA;				system::Pallet::&lt;T&gt;::extrinsic_index().unwrap_or_default(),&#xD;&#xA;			)&#xD;&#xA;		});&#xD;&#xA;		let entropy = (b&quot;modlpy/proxy____&quot;, who, height, ext_index, proxy_type, index)&#xD;&#xA;			.using_encoded(blake2_256);&#xD;&#xA;		Decode::decode(&amp;mut TrailingZeroInput::new(entropy.as_ref()))&#xD;&#xA;			.expect(&quot;infinite length input; no invalid inputs for type; qed&quot;)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, it takes the block height and current extrinsic index within the block as inputs. If this isn't within a batch call, then there's no need for disambiguation. However, if multiple calls to `anonymous_account` occur within the same extrinsic, they need a disambiguating input to the account ID generation function.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/f98ef8abfc54bb7801b21be899e63f5058350e14/frame/proxy/src/lib.rs#L317&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;		pub fn anonymous(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proxy_type: T::ProxyType,&#xD;&#xA;			delay: T::BlockNumber,&#xD;&#xA;			index: u16,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let anonymous = Self::anonymous_account(&amp;who, &amp;proxy_type, index, None);&#xD;&#xA;&#xD;&#xA;        // .. remainder omitted&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is why `fn anonymous` accepts an index the user can use to avoid collisions in a batch." ContentLicense="CC BY-SA 4.0" />
  <row Id="6339" PostHistoryTypeId="10" PostId="1574" RevisionGUID="f858644d-fc93-48b2-8545-6c0f94e09b1e" CreationDate="2022-04-07T18:13:57.763" UserId="-1" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:368,&quot;DisplayName&quot;:&quot;smm&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[1]}" />
  <row Id="6340" PostHistoryTypeId="2" PostId="1717" RevisionGUID="4fbdcb2b-9a45-4310-976c-751666746282" CreationDate="2022-04-07T18:21:10.527" UserId="28" Text="`MaxEncodedLen` is used for weight estimation, so the problem you face here will be the same as if you &quot;under-weigh&quot; your extrinsics.&#xD;&#xA;&#xD;&#xA;When producing a block, the weight stuff ensures that your block is not &quot;too big&quot;. If you put a `MaxEncodedLen` smaller than the actual encoded length, you may produce blocks which are bigger than allowed, and thus will be rejected by the Relay Chain. If these blocks can be generated by users, then a user could attack your network by filling your chain full of under-length extrinsics, and basically force all the nodes on your network to waste a bunch of computation building blocks which are invalid.&#xD;&#xA;&#xD;&#xA;&gt; Will the bytes which are above the length just not be written to storage?&#xD;&#xA;&#xD;&#xA;No, the storage will still be written, and we don't check `MaxEncodedLen` when writing to storage. For some types like `BoundedVec`, there is special decoding logic which will return an error decoding storage where the vector is bigger than the expected bound, but this is programmed specifically for this type." ContentLicense="CC BY-SA 4.0" />
  <row Id="6355" PostHistoryTypeId="2" PostId="1720" RevisionGUID="4dcdfdc6-9880-4c75-9271-f9ad85980e98" CreationDate="2022-04-08T05:36:12.063" UserId="240" Text="We have recently upgraded our runtime to polkadot 0.9.17. We noticed the wasm runtime seems too large i.e. 5.3 MB which exceeds the limit.&#xD;&#xA;&#xD;&#xA;Is there a way or best approach to reduce the wasm size?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="6357" PostHistoryTypeId="1" PostId="1720" RevisionGUID="4dcdfdc6-9880-4c75-9271-f9ad85980e98" CreationDate="2022-04-08T05:36:12.063" UserId="240" Text="large wasm size for polkadot 0.9.17" ContentLicense="CC BY-SA 4.0" />
  <row Id="6358" PostHistoryTypeId="3" PostId="1720" RevisionGUID="4dcdfdc6-9880-4c75-9271-f9ad85980e98" CreationDate="2022-04-08T05:36:12.063" UserId="240" Text="|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6359" PostHistoryTypeId="2" PostId="1721" RevisionGUID="aaa1445b-8c1a-4b1b-8814-a30010c2c78f" CreationDate="2022-04-08T05:41:53.403" UserId="627" Text="You should use the compressed runtime artefact generated by the build. &#xD;&#xA;&#xD;&#xA;For instance in the case of Kusama it is `kusama_runtime-v9170.compact.compressed.wasm` (note the `*.compressed.wasm`) as per the [assets on the release](https://github.com/paritytech/polkadot/releases/tag/v0.9.17-rc4)." ContentLicense="CC BY-SA 4.0" />
  <row Id="6361" PostHistoryTypeId="5" PostId="1528" RevisionGUID="8c7218fd-dd24-4813-8118-3195ad28c089" CreationDate="2022-04-08T05:54:52.643" UserId="172" Comment="added 142 characters in body" Text="Questions about transactions, including signed and unsigned extrinsics, transaction formats, transaction pools and constructing transactions. " ContentLicense="CC BY-SA 4.0" />
  <row Id="6362" PostHistoryTypeId="24" PostId="1528" RevisionGUID="8c7218fd-dd24-4813-8118-3195ad28c089" CreationDate="2022-04-08T05:54:52.643" Comment="Proposed by 172 approved by 139, 85 edit id of 132" ContentLicense="CC BY-SA 4.0" />
  <row Id="6365" PostHistoryTypeId="5" PostId="1529" RevisionGUID="2d9ef459-8d85-46af-8597-cd6f4b32480c" CreationDate="2022-04-08T06:21:51.517" UserId="554" Comment="added 1 character in body" Text="This error normally comes in windows. As Native development of substrate is not very well supported in windows so you will face errors now and then. But there is a permanent solution for the same.&#xD;&#xA;As we all know Substrate development is easiest on Unix-based operating systems like macOS or Linux.&#xD;&#xA;So we will convert our windows into Linux without installing any new software just by Enabling some inbuilt windows feature. &#xD;&#xA;&#xD;&#xA;First of all, prepare your windows system for the substrate. This can be done using **windows subsystem Linux(wsl)**. To use it go into the control panel &gt; programs &gt; programs and Features &gt; Turn windows Feature On and OFF &#xD;&#xA;And in it tick mark on **Hyper-V** and **windows subsystem for Linux** as shown in the images below.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;After that Enable the virtualization by going into the bios advance section on your laptop. To access bios on different laptops there is a different process. So look on youtube for how to Enable virtualization on your system.&#xD;&#xA;&#xD;&#xA;If you have a home edition of windows, Hyper-V might not be there so first install that. To install hyper-v follow the below instruction:&#xD;&#xA;1. Open Notepad and paste the below-given code as shown below:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;pushd &quot;%~dp0&quot;&#xD;&#xA;dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum &gt;hv.txt&#xD;&#xA;for /f %%i in ('findstr /i . hv.txt 2^&gt;nul') do dism /online /norestart /add-package:&quot;%SystemRoot%\servicing\Packages\%%i&quot;&#xD;&#xA;del hv.txt&#xD;&#xA;Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL&#xD;&#xA;pause&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. After that in the notepad where you have pasted the code select 'Save as' and then name the file as hyper-v.bat and below that in 'save as type' select All Files and save it on the desktop or wherever you can easily find it. &#xD;&#xA;3. Then run that file as administrator&#xD;&#xA;&#xD;&#xA;It will ask you to restart your system and Hyper-v will be installed on your system.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;After all the above is done go into the windows app store and search wsl. You will se multiple options. There select Ubuntu 20.04.4 LTS (or whatever you like) and download it as it's famous and normally used.&#xD;&#xA;And in ubuntu set username and password. Username should follow [a-z,0-9] only.&#xD;&#xA;&#xD;&#xA;After that follow the instructions on this doc: https://docs.substrate.io/v3/getting-started/installation/#ubuntudebian&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sYoh2.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6uaIu.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6366" PostHistoryTypeId="5" PostId="1681" RevisionGUID="b6197506-6207-44e8-8186-6b3cb2347bf0" CreationDate="2022-04-08T06:34:33.477" UserId="16" Comment="added 15 characters in body; edited title; edited tags" Text="When we have an Ink! smart contract code calling a chain extension, how do we receive this information from within the chain extension:&#xD;&#xA;&#xD;&#xA;1. The calling smart contract address/ID&#xD;&#xA;2. The original caller of the smart contract (or is this possible?)&#xD;&#xA;3. The equivalent EVM `msg.value` in the smart contract, if there is one?&#xD;&#xA;&#xD;&#xA;If there is any tutorial/example that covers the above questions, it will be great just to paste the link out as well.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="6367" PostHistoryTypeId="4" PostId="1681" RevisionGUID="b6197506-6207-44e8-8186-6b3cb2347bf0" CreationDate="2022-04-08T06:34:33.477" UserId="16" Comment="added 15 characters in body; edited title; edited tags" Text="How to access environmental information about a contract from within a chain extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6368" PostHistoryTypeId="6" PostId="1681" RevisionGUID="b6197506-6207-44e8-8186-6b3cb2347bf0" CreationDate="2022-04-08T06:34:33.477" UserId="16" Comment="added 15 characters in body; edited title; edited tags" Text="|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6369" PostHistoryTypeId="2" PostId="1722" RevisionGUID="44c213a6-8e33-4bed-bcab-ad55c2e4fb66" CreationDate="2022-04-08T06:50:38.313" UserId="139" Text="In `pallet-staking`'s genesis config there are two items : &#xD;&#xA;```rust&#xD;&#xA;pub validator_count: u32,&#xD;&#xA;pub minimum_validator_count: u32,&#xD;&#xA;```&#xD;&#xA;Question : How are we to interpret them in the context of Grandpa finality? I know that to achieve finality a minimum of 2/3 of validators must vote on a chain to finalize it. So if I have `X` validators on Genesis and `Y` more validators join my set, would I be correct to assume that (2/3 of `X+Y`) are the current Grandpa authorities? " ContentLicense="CC BY-SA 4.0" />
  <row Id="6371" PostHistoryTypeId="1" PostId="1722" RevisionGUID="44c213a6-8e33-4bed-bcab-ad55c2e4fb66" CreationDate="2022-04-08T06:50:38.313" UserId="139" Text="Grandpa authorities in the context of pallet-staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="6372" PostHistoryTypeId="3" PostId="1722" RevisionGUID="44c213a6-8e33-4bed-bcab-ad55c2e4fb66" CreationDate="2022-04-08T06:50:38.313" UserId="139" Text="|grandpa|genesis|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6373" PostHistoryTypeId="2" PostId="1723" RevisionGUID="9fca55fc-012a-4374-934b-1833a818d97a" CreationDate="2022-04-08T07:05:21.573" UserId="2102" Text="Does substrate archive store events anywhere? It doesn't seems like it does, although it saves extrinsics and its parameters. &#xD;&#xA;&#xD;&#xA;I'm also having this kind of issue when running the app with a custom archive.toml&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[09:02] INFO Open RocksDB at /var/folders/19/5tshxn412wx071h968j4s3s00000gn/T/substrate6CfgCx/chains/dev/db/full, state column budget: 115 MiB, others(11) column cache: 1 MiB&#xD;&#xA;Error: Backend error: Unexpected Error: RuntimeCode(&quot;`:code` hash not found&quot;)&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    Unexpected Error: RuntimeCode(&quot;`:code` hash not found&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The only way to make it work has been by relaunching it until it starts to process the data. Has anyone faced this kind of issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6375" PostHistoryTypeId="1" PostId="1723" RevisionGUID="9fca55fc-012a-4374-934b-1833a818d97a" CreationDate="2022-04-08T07:05:21.573" UserId="2102" Text="Events in Substrate Archive" ContentLicense="CC BY-SA 4.0" />
  <row Id="6376" PostHistoryTypeId="3" PostId="1723" RevisionGUID="9fca55fc-012a-4374-934b-1833a818d97a" CreationDate="2022-04-08T07:05:21.573" UserId="2102" Text="|substrate-archive|archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6378" PostHistoryTypeId="2" PostId="1724" RevisionGUID="ae42e4fb-5ea9-4cf4-8f4c-b282ba8a8e36" CreationDate="2022-04-08T07:32:07.380" UserId="206" Text="We need to insert a lot of data to storage. In standalone version we can do it via System.SetStorage with sudo weight override. But in parachains this approach maybe can break our chain. What are the best practice for big parachain migration?   " ContentLicense="CC BY-SA 4.0" />
  <row Id="6380" PostHistoryTypeId="1" PostId="1724" RevisionGUID="ae42e4fb-5ea9-4cf4-8f4c-b282ba8a8e36" CreationDate="2022-04-08T07:32:07.380" UserId="206" Text="Parachain large migration best practices" ContentLicense="CC BY-SA 4.0" />
  <row Id="6381" PostHistoryTypeId="3" PostId="1724" RevisionGUID="ae42e4fb-5ea9-4cf4-8f4c-b282ba8a8e36" CreationDate="2022-04-08T07:32:07.380" UserId="206" Text="|parachain|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6382" PostHistoryTypeId="2" PostId="1725" RevisionGUID="77b7ef20-343d-4724-9109-acb183d586bb" CreationDate="2022-04-08T07:37:11.470" UserId="172" Text="As stated in this [open issue](https://github.com/paritytech/substrate-archive/issues/136), storing events is a feature that's yet to be implemented. Since this current version was released before type-decoding (metadata V14) was a thing, it doesn't differentiate from different types of storage. &#xD;&#xA;&#xD;&#xA;&gt; With type-decoding we can differentiate based on the pallet an entry came from/particular transaction names/etc and it would then be trivial to allow a user to enter a set of pallets or entries they want and not index anything else.&#xD;&#xA;&#xD;&#xA;Something we'll hopefully see in the near future." ContentLicense="CC BY-SA 4.0" />
  <row Id="6384" PostHistoryTypeId="2" PostId="1726" RevisionGUID="21b1b8df-60b3-4059-9a2d-ea328dbe31d2" CreationDate="2022-04-08T07:56:46.077" UserId="172" Text="The total issuance of a Substrate chain is most commonly a storage item from the [Balances pallet](https://github.com/paritytech/substrate/tree/master/frame/balances). Here's how you would find this value using Polkadot JS Apps:&#xD;&#xA;&#xD;&#xA;1. Go to the [chain state for the chain you're querying](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate).&#xD;&#xA;2. Select the `balances` pallet and the `totalIssuance` storage item.&#xD;&#xA;3. Hit the &quot; `+` &quot; button on the right and you'll see some `u128` value appear.&#xD;&#xA;&#xD;&#xA;For example, querying Polkadot's chain state:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rWWQT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6387" PostHistoryTypeId="2" PostId="1727" RevisionGUID="fab6fd66-92e9-43c8-acd2-5e07a686da31" CreationDate="2022-04-08T07:59:54.597" UserId="611" Text="We have multiple testnet runtimes configured for the node. A new pallet I'm building is only available for testing in one testnet. There is also a new custom RPC I have written to call into the new pallet. How do I prevent errors caused by some of the runtimes not implementing the RPC interface because they don't have the new pallet included/configured when building the node?&#xD;&#xA; &#xD;&#xA;I wonder if cargo features might help here, but not sure how to use it" ContentLicense="CC BY-SA 4.0" />
  <row Id="6389" PostHistoryTypeId="1" PostId="1727" RevisionGUID="fab6fd66-92e9-43c8-acd2-5e07a686da31" CreationDate="2022-04-08T07:59:54.597" UserId="611" Text="Releasing custom RPC implementation on only a single testnet runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="6390" PostHistoryTypeId="3" PostId="1727" RevisionGUID="fab6fd66-92e9-43c8-acd2-5e07a686da31" CreationDate="2022-04-08T07:59:54.597" UserId="611" Text="|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6391" PostHistoryTypeId="5" PostId="998" RevisionGUID="ec2a5f20-6ee0-4a23-ad19-3e392dca1e5b" CreationDate="2022-04-08T08:08:15.640" UserId="172" Comment="Clarified post." Text="I was following [this guide Configuring Genesis for Balances](https://docs.substrate.io/how-to-guides/v3/basics/genesis/).&#xD;&#xA;&#xD;&#xA;In my parachain, I replaced `T::Balance` with `BalanceOf&lt;T&gt;`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;    	type Currency: ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;    		+ LockableCurrency&lt;Self::AccountId, Moment = Self::BlockNumber&gt;;&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;	#[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;	#[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		pub single_balance: BalanceOf&lt;T&gt;,&#xD;&#xA;		pub account_map: Vec&lt;(T::AccountId, BalanceOf&lt;T&gt;)&gt;,&#xD;&#xA;	}&#xD;&#xA;	#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	impl&lt;T: Config&gt; Default for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			Self { single_balance: Default::default(), account_map: Default::default() }&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// https://docs.substrate.io/v3/runtime/storage#declaring-storage-items&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_value)]&#xD;&#xA;	pub type SingleValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;; //&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_balance)]&#xD;&#xA;	pub type SingleBalance&lt;T: Config&gt; = StorageValue&lt;_, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	// A map that has enumerable entries.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn accounts)]&#xD;&#xA;	pub type AccountMap&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt;` is not satisfied.&#xD;&#xA;&#xD;&#xA;Here's the genesis configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;And the error I'm getting:&#xD;&#xA;&#xD;&#xA;`EncodeLike&lt;u32&gt;` is not implemented for `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;&#xD;&#xA;`122 |     pub fn put&lt;Arg: EncodeLike&lt;Value&gt;&gt;(val: Arg) {&#xD;&#xA;     |                ^^^^^^^^^^^^^^^^ required by this bound in frame_support::pallet_prelude::StorageValue::&lt;Prefix, Value, QueryKind, OnEmpty&gt;::put&#xD;&#xA;help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; &#xD;&#xA;    where &amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt; {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6392" PostHistoryTypeId="4" PostId="998" RevisionGUID="ec2a5f20-6ee0-4a23-ad19-3e392dca1e5b" CreationDate="2022-04-08T08:08:15.640" UserId="172" Comment="Clarified post." Text="Trait bounds not satisfied for `Balance` type" ContentLicense="CC BY-SA 4.0" />
  <row Id="6393" PostHistoryTypeId="2" PostId="1728" RevisionGUID="739df37d-fb94-4ea8-915d-917d3e4f6352" CreationDate="2022-04-08T09:05:23.553" UserId="139" Text="So during my testing I found out that with just 1 node running, on an npos consensus, my chain grew from 110 Mb to 990 Mb within two days. Is this expected? Are there strategies for controlling the blockchain growth rate? " ContentLicense="CC BY-SA 4.0" />
  <row Id="6395" PostHistoryTypeId="1" PostId="1728" RevisionGUID="739df37d-fb94-4ea8-915d-917d3e4f6352" CreationDate="2022-04-08T09:05:23.553" UserId="139" Text="Are there ways to suppress blockchain growth rate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6396" PostHistoryTypeId="3" PostId="1728" RevisionGUID="739df37d-fb94-4ea8-915d-917d3e4f6352" CreationDate="2022-04-08T09:05:23.553" UserId="139" Text="|storage|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6398" PostHistoryTypeId="2" PostId="1729" RevisionGUID="bb7a735e-a10a-4f35-9787-db86f9ac460a" CreationDate="2022-04-08T09:06:50.627" UserId="200" Text="On an actively syncing parachain node, I observed an [import_notification_stream][1] subscriber is not notified.&#xD;&#xA;&#xD;&#xA;In the same code context, if I subscribe to the [finality_notification_stream][2] instead, I get inmediately notified.&#xD;&#xA;&#xD;&#xA; - When reading the documentation I noticed that `Not guaranteed to be fired for every imported block` is mentioned. What is the reason to not being guaranteed?&#xD;&#xA;- In a syncing node, can the number of active `import_notification_sinks` affect on notification delivery guarantees?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/sc_client_api/client/trait.BlockchainEvents.html#tymethod.import_notification_stream&#xD;&#xA;  [2]: https://crates.parity.io/sc_client_api/client/trait.BlockchainEvents.html#tymethod.finality_notification_stream" ContentLicense="CC BY-SA 4.0" />
  <row Id="6400" PostHistoryTypeId="1" PostId="1729" RevisionGUID="bb7a735e-a10a-4f35-9787-db86f9ac460a" CreationDate="2022-04-08T09:06:50.627" UserId="200" Text="`BlockchainEvents` reliability and differences on a syncing node" ContentLicense="CC BY-SA 4.0" />
  <row Id="6401" PostHistoryTypeId="3" PostId="1729" RevisionGUID="bb7a735e-a10a-4f35-9787-db86f9ac460a" CreationDate="2022-04-08T09:06:50.627" UserId="200" Text="|streams|blockchain-events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6404" PostHistoryTypeId="2" PostId="1730" RevisionGUID="7fbba28b-79ae-4dd7-a35b-0dff9fca96ae" CreationDate="2022-04-08T09:29:56.433" UserId="160" Text="As far as I understand, besides the `ed25519` and `sr25519` signatures, there is a compatibility mode for ECDSA keypairs that should use the `secp256k1` curve.&#xD;&#xA;&#xD;&#xA;[![non-compatible keys][1]][1]&#xD;&#xA;&#xD;&#xA;Both Bitcoin and Ethereum use the `secp256k1` curve parameters for their accounts and signatures. But how do the Substrate ECDSA keys differ from Bitcoin/Ethereum keys?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wLAU1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6406" PostHistoryTypeId="1" PostId="1730" RevisionGUID="7fbba28b-79ae-4dd7-a35b-0dff9fca96ae" CreationDate="2022-04-08T09:29:56.433" UserId="160" Text="How do ECDSA subkeys differ from Bitcoin/Ethereum keys?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6407" PostHistoryTypeId="3" PostId="1730" RevisionGUID="7fbba28b-79ae-4dd7-a35b-0dff9fca96ae" CreationDate="2022-04-08T09:29:56.433" UserId="160" Text="|ethereum|ed25519|sr25519|ecdsa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6408" PostHistoryTypeId="2" PostId="1731" RevisionGUID="e79874b5-e227-436d-945a-8bcb885e7d23" CreationDate="2022-04-08T09:31:37.827" UserId="523" Text="you can just define some empty/dummy impl of the rpc interface, e.g beefy pallet is enabled in rococo but not yet in [polkadot](https://github.com/paritytech/polkadot/blob/b216f1f79809273e9f525ce5791e1af0e3aef36b/runtime/polkadot/src/lib.rs#L1911-L1916)&#xD;&#xA;&#xD;&#xA;or you can define particular [rpc collections](https://github.com/paritytech/polkadot/blob/b216f1f79809273e9f525ce5791e1af0e3aef36b/node/client/src/lib.rs#L122-L136) for each runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="6410" PostHistoryTypeId="2" PostId="1732" RevisionGUID="94841730-5eaf-45ef-b264-15a2dea3d69a" CreationDate="2022-04-08T09:47:20.553" UserId="298" Text="I am running a rococo fork and used Polkadot `[release-v0.9.18][1]` to make a runtime upgrade. &#xD;&#xA;&#xD;&#xA;I upgraded the chain initially, but didn’t see a difference in the chain. So then I realised I need to bump the versions as mentioned [here][2] in the docs.&#xD;&#xA;&#xD;&#xA;My question is: how do I know what versions to bump? For example, do i need to manually bump the authoring version, by checking the release and seeing is that is a requirement. Is there notes in the release that talk specifically to that? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/releases&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/upgrades/" ContentLicense="CC BY-SA 4.0" />
  <row Id="6412" PostHistoryTypeId="1" PostId="1732" RevisionGUID="94841730-5eaf-45ef-b264-15a2dea3d69a" CreationDate="2022-04-08T09:47:20.553" UserId="298" Text="Do I need to bump the versions of a new release manually before making a runtime upgrade from a Polkadot release-v0.9.xx?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6413" PostHistoryTypeId="3" PostId="1732" RevisionGUID="94841730-5eaf-45ef-b264-15a2dea3d69a" CreationDate="2022-04-08T09:47:20.553" UserId="298" Text="|substrate-node|polkadot|rococo|rococo-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6415" PostHistoryTypeId="5" PostId="1706" RevisionGUID="71f01880-4948-4a62-9eda-9fc13782bc96" CreationDate="2022-04-08T09:48:07.397" UserId="298" Comment="deleted 1 character in body" Text="During an auction crowdloan for propsective parachain, does the auction run automatically? Or do we need to manually make a bid? &#xD;&#xA;&#xD;&#xA;If it is manual then why doesn’t everyone go all in at the beginning of the auction period? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6416" PostHistoryTypeId="2" PostId="1733" RevisionGUID="a49384d6-2468-4973-b553-6ec52aced944" CreationDate="2022-04-08T10:07:39.023" UserId="213" Text="New substrate version requires derive MaxEncodedLen&#xD;&#xA;&#xD;&#xA;I have a following storage:&#xD;&#xA;&#xD;&#xA;    #[derive(PartialEq, Eq, PartialOrd, Ord, Default, Clone, Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;    pub struct SortitionSumTree&lt;AccountId&gt; {&#xD;&#xA;        pub k: u64,&#xD;&#xA;        pub stack: Vec&lt;u64&gt;,&#xD;&#xA;        pub nodes: Vec&lt;u64&gt;,&#xD;&#xA;        pub ids_to_node_indexes: BTreeMap&lt;AccountId, u64&gt;, // citizen id, node index&#xD;&#xA;        pub node_indexes_to_ids: BTreeMap&lt;u64, AccountId&gt;, // node index, citizen id&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But it gives error:&#xD;&#xA;&#xD;&#xA;    no function or associated item named `max_encoded_len` found for struct `std::vec::Vec&lt;u64&gt;` in the current scope&#xD;&#xA;    &#xD;&#xA;    no function or associated item named `max_encoded_len` found for struct `std::collections::BTreeMap` in the current scope&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6418" PostHistoryTypeId="1" PostId="1733" RevisionGUID="a49384d6-2468-4973-b553-6ec52aced944" CreationDate="2022-04-08T10:07:39.023" UserId="213" Text="Storing BTreeMap and Vec gives error" ContentLicense="CC BY-SA 4.0" />
  <row Id="6419" PostHistoryTypeId="3" PostId="1733" RevisionGUID="a49384d6-2468-4973-b553-6ec52aced944" CreationDate="2022-04-08T10:07:39.023" UserId="213" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6420" PostHistoryTypeId="2" PostId="1734" RevisionGUID="20c33306-efbd-483d-9758-64774dfca519" CreationDate="2022-04-08T10:10:29.657" UserId="73" Text="&gt; When reading the documentation I noticed that Not guaranteed to be fired for every imported block is mentioned. What is the reason to not being guaranteed?&#xD;&#xA;&#xD;&#xA;When your node is fully synced and you are only syncing at the tip of the chain you will get all notifications. However, when you are doing a major sync, aka syncing from genesis you will not get any notifications. Otherwise you would get like thousands of notifications in a short amount of time. This is just some fairly simple [heuristic][1]:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		let make_notifications = match origin {&#xD;&#xA;			BlockOrigin::NetworkBroadcast | BlockOrigin::Own | BlockOrigin::ConsensusBroadcast =&gt;&#xD;&#xA;				true,&#xD;&#xA;			BlockOrigin::Genesis | BlockOrigin::NetworkInitialSync | BlockOrigin::File =&gt; false,&#xD;&#xA;		};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; In a syncing node, can the number of active import_notification_sinks affect on notification delivery guarantees?&#xD;&#xA;&#xD;&#xA;No the number of active sinks doesn't influence the delivery guarantees.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/a0b287557cc032e1c224a5e1dbb82f485c085d0b/client/service/src/client/client.rs#L581-L588" ContentLicense="CC BY-SA 4.0" />
  <row Id="6422" PostHistoryTypeId="6" PostId="1706" RevisionGUID="bb75f0ac-ea8a-44a7-846d-5ef905083dd5" CreationDate="2022-04-08T10:16:09.293" UserId="172" Comment="edited tags" Text="|polkadot|kusama|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6423" PostHistoryTypeId="2" PostId="1735" RevisionGUID="d561edf0-e4ec-4def-89dd-a8019d76a824" CreationDate="2022-04-08T10:17:44.633" UserId="73" Text="The point here is that `BTreeMap` by default isn't bounded. Meaning you could store an unlimited amount of data in these maps. For this case there exists the `BoundedBTreeMap` type in Substrate. There you statically need to define the upper number of data that will be stored inside the `BTreeMap`.&#xD;&#xA;&#xD;&#xA;You can also disable the requirement for `MaxEncodedLength` by setting the [`without_storage_info`][1] attribute. If your pallet should not be used in Parachain, that is completely fine, because there you don't have the requirement to produce a storage proof which needs to be predictable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/1323/73" ContentLicense="CC BY-SA 4.0" />
  <row Id="6425" PostHistoryTypeId="4" PostId="1728" RevisionGUID="e1074e87-5f81-4dde-9692-6576dccfa50c" CreationDate="2022-04-08T10:24:59.143" UserId="139" Comment="edited title" Text="Are there ways to suppress blockchain growth rate (in terms of storage)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6426" PostHistoryTypeId="2" PostId="1736" RevisionGUID="a9a7ac04-f50d-4b77-b805-d95b1988cbf9" CreationDate="2022-04-08T10:25:12.810" UserId="2099" Text="I'm trying to retrieve all values in my StorageMap defined as such in my pallet:&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn submitted_tasks)]&#xD;&#xA;pub type SubmittedTasks&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_128Concat, B3Hash, Task&lt;T&gt;, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;from my runtime api (in runtime/src/lib.rs), currently defined as such and not working:&#xD;&#xA;```&#xD;&#xA;impl pallet_submitter_runtime_api::SubmitterRuntimeApi&lt;Block&gt; for Runtime {&#xD;&#xA;    fn get_submitted_tasks() -&gt; Vec&lt;Vec&lt;u8&gt;&gt; {&#xD;&#xA;        // This macro generated getter only allows me to query one item.&#xD;&#xA;        SubmitterModule::submitted_tasks();&#xD;&#xA;&#xD;&#xA;        // This does not compile due to associated item not found&#xD;&#xA;        SubmitterModule::SubmittedTasks.iter_values().collect();&#xD;&#xA;        &#xD;&#xA;        vec![]&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now from my understanding, if i use the macro generated getter, it's only possible to query one value from the StorageMap, however I would like to iterate over all values to collect them.&#xD;&#xA;How can I achieve this?&#xD;&#xA;&#xD;&#xA;Note: the return type will be the vector of encoded Tasks for simplicity " ContentLicense="CC BY-SA 4.0" />
  <row Id="6428" PostHistoryTypeId="1" PostId="1736" RevisionGUID="a9a7ac04-f50d-4b77-b805-d95b1988cbf9" CreationDate="2022-04-08T10:25:12.810" UserId="2099" Text="Runtime API to collect values in StorageMap" ContentLicense="CC BY-SA 4.0" />
  <row Id="6429" PostHistoryTypeId="3" PostId="1736" RevisionGUID="a9a7ac04-f50d-4b77-b805-d95b1988cbf9" CreationDate="2022-04-08T10:25:12.810" UserId="2099" Text="|storage|runtime|api|map|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6430" PostHistoryTypeId="2" PostId="1737" RevisionGUID="b2733aa1-fc25-4645-ba20-a17e2603c973" CreationDate="2022-04-08T10:26:39.733" UserId="342" Text="In Substrate related blockchains the account id is derived from the public key using SS58 encoding. See here: https://docs.substrate.io/v3/advanced/ss58/" ContentLicense="CC BY-SA 4.0" />
  <row Id="6436" PostHistoryTypeId="2" PostId="1739" RevisionGUID="0a430da2-7096-487f-a665-d53865de5bbf" CreationDate="2022-04-08T10:49:54.040" UserId="73" Text="This should work. I added a comment above the line in the code to explain what happens there.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_submitter_runtime_api::SubmitterRuntimeApi&lt;Block&gt; for Runtime {&#xD;&#xA;    fn get_submitted_tasks() -&gt; Vec&lt;Vec&lt;u8&gt;&gt; {&#xD;&#xA;        // This macro generated getter only allows me to query one item.&#xD;&#xA;        SubmitterModule::submitted_tasks();&#xD;&#xA;&#xD;&#xA;        // The return type is Vec&lt;Vec&lt;u8&gt;&gt;, but your StorageMap stores &#xD;&#xA;        // as value a `Task&lt;T&gt;`. So, you need to first encode this value&#xD;&#xA;        // and then you can collect into a vector. You probably just missed&#xD;&#xA;        // the explicit type to make Rust happy.&#xD;&#xA;        SubmitterModule::SubmittedTasks.iter_values().map(|v| v.encode()).collect::&lt;Vec&lt;Vec&lt;_&gt;&gt;&gt;();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6438" PostHistoryTypeId="6" PostId="1736" RevisionGUID="3e798494-fb5d-4667-b3f8-23c06d1fbbf8" CreationDate="2022-04-08T10:50:04.513" UserId="73" Comment="edited tags" Text="|storage|runtime|frame|api|map|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6439" PostHistoryTypeId="6" PostId="1733" RevisionGUID="f38a2808-e0da-449d-898d-fd8ea8f0405f" CreationDate="2022-04-08T10:50:24.377" UserId="73" Comment="edited tags" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6440" PostHistoryTypeId="6" PostId="1729" RevisionGUID="f5f9f1e4-7b89-44c7-9193-7cea662abfb7" CreationDate="2022-04-08T10:51:02.627" UserId="73" Comment="edited tags" Text="|substrate-node|streams|blockchain-events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6441" PostHistoryTypeId="2" PostId="1740" RevisionGUID="70ae27cd-3831-497f-9e65-2fca429c4c49" CreationDate="2022-04-08T11:02:39.100" UserId="429" Text="I'm trying to add a test case for my function which is extracting key from the local Keystore.&#xD;&#xA;&#xD;&#xA;This is how I'm creating an instance of a local Keystore and setting a key inside it in my test environment:&#xD;&#xA;&#xD;&#xA;    let keystore = LocalKeystore::in_memory();&#xD;&#xA;    SyncCryptoStore::insert_unknown(&amp;keystore, KeyTypeId::try_from(&quot;test&quot;).unwrap(), &quot;test&quot;, public_key);&#xD;&#xA;&#xD;&#xA;Here the problem I'm facing is, I'm unable to extract the stored key from the keystone.&#xD;&#xA;This is how I'm extracting it:&#xD;&#xA;&#xD;&#xA;    SyncCryptoStore::sr25519_public_keys(&amp;keystore, KeyTypeId::try_from(&quot;test&quot;).unwrap())&#xD;&#xA;&#xD;&#xA;This function is returning an empty vector.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6443" PostHistoryTypeId="1" PostId="1740" RevisionGUID="70ae27cd-3831-497f-9e65-2fca429c4c49" CreationDate="2022-04-08T11:02:39.100" UserId="429" Text="How to test local keystore?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6444" PostHistoryTypeId="3" PostId="1740" RevisionGUID="70ae27cd-3831-497f-9e65-2fca429c4c49" CreationDate="2022-04-08T11:02:39.100" UserId="429" Text="|storage|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6445" PostHistoryTypeId="5" PostId="1739" RevisionGUID="cc2ee54a-8549-434e-8d22-91c6708cae57" CreationDate="2022-04-08T11:09:42.193" UserId="73" Comment="added 13 characters in body" Text="This should work. I added a comment above the line in the code to explain what happens there.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_submitter_runtime_api::SubmitterRuntimeApi&lt;Block&gt; for Runtime {&#xD;&#xA;    fn get_submitted_tasks() -&gt; Vec&lt;Vec&lt;u8&gt;&gt; {&#xD;&#xA;        // This macro generated getter only allows me to query one item.&#xD;&#xA;        SubmitterModule::submitted_tasks();&#xD;&#xA;&#xD;&#xA;        // The return type is Vec&lt;Vec&lt;u8&gt;&gt;, but your StorageMap stores &#xD;&#xA;        // as value a `Task&lt;T&gt;`. So, you need to first encode this value&#xD;&#xA;        // and then you can collect into a vector. You probably just missed&#xD;&#xA;        // the explicit type to make Rust happy.&#xD;&#xA;        pallet_submitter::SubmittedTasks::&lt;Runtime&gt;::iter_values().map(|v| v.encode()).collect::&lt;Vec&lt;Vec&lt;_&gt;&gt;&gt;();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6446" PostHistoryTypeId="2" PostId="1741" RevisionGUID="98124d3f-9cfb-48b2-be02-749e29669f6f" CreationDate="2022-04-08T11:12:43.043" UserId="523" Text="subscribe and trace &#xD;&#xA;```&#xD;&#xA;const unsub = await api.query.balances.totalIssuance((total) =&gt; {&#xD;&#xA;  console.log(`Total issuance changed to ${total}`);&#xD;&#xA;});&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6448" PostHistoryTypeId="2" PostId="1742" RevisionGUID="2b432f7d-1b48-4289-b930-686416c1c369" CreationDate="2022-04-08T11:21:39.080" UserId="523" Text="you can refact the huge runtime migration to an temporarily extrinsic which can be executed multiple times and each time just migrate part of the data not exceed max weight in one block" ContentLicense="CC BY-SA 4.0" />
  <row Id="6450" PostHistoryTypeId="2" PostId="1743" RevisionGUID="9ca754e9-07e6-42f8-be70-dceaddedd0ad" CreationDate="2022-04-08T11:22:04.097" UserId="2146" Text="In the polkadot docs under NFT's they write this:&#xD;&#xA;&#xD;&#xA;&gt; A general-purpose blockchain is not built to natively understand the concept of NFTs. It is only natively aware and optimized for its own native tokens, but implementations built on such a chain are essentially &quot;hacks&quot;.&#xD;&#xA;&#xD;&#xA;Take Singular.app for example. When I log in and view my space. I INSTANTLY have my purchased NFT's. I see backend API calls to what I'm assuming involves the use of GraphQL, a query is passed with the Asset's remark ID. &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Are they making writes to the block-chain, listening to the KSM chain on their serverd backend? They  then filters any system.remark 'hacks' on the Kusama network, write it to their back-end to update any changes made to these NFTs, and then use GraphQL queries to fetch them? &#xD;&#xA;&#xD;&#xA;When a user logs in, they query their Wallet address to their backend, which can then cross reference all NFT's associated with that walletAddress? Then retrieve the ipfs routed image?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/f76Ja.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6452" PostHistoryTypeId="1" PostId="1743" RevisionGUID="9ca754e9-07e6-42f8-be70-dceaddedd0ad" CreationDate="2022-04-08T11:22:04.097" UserId="2146" Text="How do conventional block chains access NFTs" ContentLicense="CC BY-SA 4.0" />
  <row Id="6453" PostHistoryTypeId="3" PostId="1743" RevisionGUID="9ca754e9-07e6-42f8-be70-dceaddedd0ad" CreationDate="2022-04-08T11:22:04.097" UserId="2146" Text="|polkadot|kusama|rmrk|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6454" PostHistoryTypeId="5" PostId="1742" RevisionGUID="32a11a4c-bcbc-4431-ac20-9b7b5d5d1671" CreationDate="2022-04-08T11:29:59.557" UserId="523" Comment="added 6 characters in body" Text="you can refact the huge runtime migration to an temporarily extrinsic which can be executed multiple times and each time just migrate part of the data which not exceed max weight in one block" ContentLicense="CC BY-SA 4.0" />
  <row Id="6455" PostHistoryTypeId="2" PostId="1744" RevisionGUID="0d201388-6dc1-4a58-a580-c68863b90270" CreationDate="2022-04-08T11:44:19.240" UserId="1959" Text="*XCM version: 3*&#xD;&#xA;&#xD;&#xA;I have two ways to express addresses on Ethereum, but don't know which is correct, or both are wrong?&#xD;&#xA;&#xD;&#xA;1. First locate the Ethereum network, and then locate the account address. Requires 2 `Junction`.&#xD;&#xA;```&#xD;&#xA;let eth_net:Junction = NetworkId::EthereumFoundation.into();&#xD;&#xA;let address:Junction = account_key_20.clone().into();&#xD;&#xA;let location1:MultiLocation = X2(eth_net, address).into();&#xD;&#xA;```&#xD;&#xA;2. Directly locate the account address in the Ethereum network with 1 `Junction`&#xD;&#xA;```&#xD;&#xA;let location2:MultiLocation = X1(Junction::AccountKey20 {&#xD;&#xA;	network: Option::from(EthereumFoundation),&#xD;&#xA;	key: account_key_20&#xD;&#xA;}).into();&#xD;&#xA;```&#xD;&#xA;When I print location1 and location2 they look like this. Which way should I use? Why?&#xD;&#xA;```&#xD;&#xA;location1: MultiLocation { parents: 0, interior: X2(GlobalConsensus(EthereumFoundation), AccountKey20 { network: None, key: [...] }) }&#xD;&#xA;&#xD;&#xA;location2: MultiLocation { parents: 0, interior: X1(AccountKey20 { network: Some(EthereumFoundation), key: [...] }) }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6457" PostHistoryTypeId="1" PostId="1744" RevisionGUID="0d201388-6dc1-4a58-a580-c68863b90270" CreationDate="2022-04-08T11:44:19.240" UserId="1959" Text="How to use `MultiLocation` in xcm to express an account address on Ethereum?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6458" PostHistoryTypeId="3" PostId="1744" RevisionGUID="0d201388-6dc1-4a58-a580-c68863b90270" CreationDate="2022-04-08T11:44:19.240" UserId="1959" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6459" PostHistoryTypeId="5" PostId="1744" RevisionGUID="e156be56-2823-4ffc-be1d-cc4c865035ef" CreationDate="2022-04-08T11:50:07.143" UserId="1959" Comment="added 6 characters in body" Text="*XCM version: 3*&#xD;&#xA;&#xD;&#xA;I have two ways to express addresses on Ethereum, but don't know which is correct, or both are wrong?&#xD;&#xA;&#xD;&#xA;Option 1: First locate the Ethereum network, and then locate the account address. Requires 2 `Junction`.&#xD;&#xA;```&#xD;&#xA;let eth_net:Junction = NetworkId::EthereumFoundation.into();&#xD;&#xA;let address:Junction = account_key_20.into();&#xD;&#xA;let location1:MultiLocation = X2(eth_net, address).into();&#xD;&#xA;```&#xD;&#xA;Option 2: Directly locate the account address in the Ethereum network with 1 `Junction`&#xD;&#xA;```&#xD;&#xA;let location2:MultiLocation = X1(Junction::AccountKey20 {&#xD;&#xA;	network: Option::from(EthereumFoundation),&#xD;&#xA;	key: account_key_20&#xD;&#xA;}).into();&#xD;&#xA;```&#xD;&#xA;When I print location1 and location2 they look like this. Which way should I use? Why?&#xD;&#xA;```&#xD;&#xA;location1: MultiLocation { parents: 0, interior: X2(GlobalConsensus(EthereumFoundation), AccountKey20 { network: None, key: [...] }) }&#xD;&#xA;&#xD;&#xA;location2: MultiLocation { parents: 0, interior: X1(AccountKey20 { network: Some(EthereumFoundation), key: [...] }) }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6464" PostHistoryTypeId="5" PostId="1744" RevisionGUID="79650bb8-6867-44be-a57d-81af9c3bdfbb" CreationDate="2022-04-08T11:55:56.093" UserId="1959" Comment="added 6 characters in body" Text="*XCM version: 3*&#xD;&#xA;&#xD;&#xA;I have two ways of expressing an ethereum address via &quot;MultiLocation&quot;, but don't know which is correct, or both are wrong?&#xD;&#xA;&#xD;&#xA;Option 1: First locate the Ethereum network, and then locate the account address. Requires 2 `Junction`.&#xD;&#xA;```&#xD;&#xA;let eth_net:Junction = NetworkId::EthereumFoundation.into();&#xD;&#xA;let address:Junction = account_key_20.into();&#xD;&#xA;let location1:MultiLocation = X2(eth_net, address).into();&#xD;&#xA;```&#xD;&#xA;Option 2: Directly locate the account address in the Ethereum network with 1 `Junction`&#xD;&#xA;```&#xD;&#xA;let location2:MultiLocation = X1(Junction::AccountKey20 {&#xD;&#xA;	network: Option::from(EthereumFoundation),&#xD;&#xA;	key: account_key_20&#xD;&#xA;}).into();&#xD;&#xA;```&#xD;&#xA;When I print location1 and location2 they look like this. Which way should I use? Why?&#xD;&#xA;```&#xD;&#xA;location1: MultiLocation { parents: 0, interior: X2(GlobalConsensus(EthereumFoundation), AccountKey20 { network: None, key: [...] }) }&#xD;&#xA;&#xD;&#xA;location2: MultiLocation { parents: 0, interior: X1(AccountKey20 { network: Some(EthereumFoundation), key: [...] }) }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6465" PostHistoryTypeId="5" PostId="1689" RevisionGUID="fd237e0f-c970-48ca-bd02-4a63604983ee" CreationDate="2022-04-08T12:23:10.460" UserId="172" Comment="added 55 characters in body" Text="Questions relating to troubleshooting specific errors. " ContentLicense="CC BY-SA 4.0" />
  <row Id="6466" PostHistoryTypeId="24" PostId="1689" RevisionGUID="fd237e0f-c970-48ca-bd02-4a63604983ee" CreationDate="2022-04-08T12:23:10.460" Comment="Proposed by 172 approved by 85, 139 edit id of 152" ContentLicense="CC BY-SA 4.0" />
  <row Id="6467" PostHistoryTypeId="5" PostId="1730" RevisionGUID="b3e7f2c8-5eb8-437e-9070-e32d96daa9cd" CreationDate="2022-04-08T13:06:31.627" UserId="160" Comment="added 29 characters in body" Text="As far as I understand, besides the `ed25519` and `sr25519` signatures, there is a compatibility mode for ECDSA keypairs that should use the `secp256k1` curve.&#xD;&#xA;&#xD;&#xA;[![non-compatible keys][1]][1]&#xD;&#xA;&#xD;&#xA;Both Bitcoin and Ethereum use the `secp256k1` curve parameters for their accounts and signatures. But how do the Substrate ECDSA keys differ from Bitcoin/Ethereum keys? Why are they not compatible?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wLAU1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6468" PostHistoryTypeId="2" PostId="1746" RevisionGUID="a94edfd4-5093-4bd4-b1fd-f5a4b16c0fee" CreationDate="2022-04-08T13:24:28.120" UserId="332" Text="I am working with the staking pallet and configuring parameters. The `RewardRemainder` is receiving the issued amount based on the `imbalance` from difference to the optimal staking percentage. &#xD;&#xA;&#xD;&#xA;How can I provide the Council the ability to burn and mint tokens directly from and to the Treasury based on a Council vote? " ContentLicense="CC BY-SA 4.0" />
  <row Id="6470" PostHistoryTypeId="1" PostId="1746" RevisionGUID="a94edfd4-5093-4bd4-b1fd-f5a4b16c0fee" CreationDate="2022-04-08T13:24:28.120" UserId="332" Text="Provide Council the Ability to Mint/Burn tokens based on Council Proposals" ContentLicense="CC BY-SA 4.0" />
  <row Id="6471" PostHistoryTypeId="3" PostId="1746" RevisionGUID="a94edfd4-5093-4bd4-b1fd-f5a4b16c0fee" CreationDate="2022-04-08T13:24:28.120" UserId="332" Text="|pallet-treasury|council|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6472" PostHistoryTypeId="2" PostId="1747" RevisionGUID="9a1e4c17-cd21-46b5-8dcc-1556d18529ea" CreationDate="2022-04-08T13:26:35.400" UserId="627" Text="The process of how the private keys are derived is slightly different. This applies to both the how the (parent) key is generated and then subsequent derivations on this.&#xD;&#xA;&#xD;&#xA;In BTC/ETC and most (all other) blockchains, when you enter the mnemonic, it normalized that and then does the pbkdf2 rounds on it. In Substrate, the mnemonic is first taken to entropy before the pbkdf2 rounds are applied. This means that the same mnemonic will yield 2 different private keys in the Sustrate vs other blockchain projects. &#xD;&#xA;&#xD;&#xA;On top of this, you have the derivation, which is also different, the HD paths vs the Substrate paths.&#xD;&#xA;&#xD;&#xA;Having said all this, there are some wallets (most notably those supporting multi blockchain currencies) that uses their &quot;normal ed25519/secp256k1&quot; keys on a Substrate environment. So one you have a key and can sign, it doesn't matter. The difference is rather how you get to the key.&#xD;&#xA;&#xD;&#xA;As a note, when connecting to an ETH-compatible chain, e.g Moonbeam, the apps UI does give an option to use ETH-standard mnemonic -&gt; seed as well as the ETH standard derivation paths." ContentLicense="CC BY-SA 4.0" />
  <row Id="6474" PostHistoryTypeId="2" PostId="1748" RevisionGUID="27ea33d2-edf1-4e7a-ab22-7ea9b0639dea" CreationDate="2022-04-08T13:32:18.860" UserId="139" Text="[![polkadot UI][1]][1]&#xD;&#xA;&#xD;&#xA;This maybe a trivial question: &#xD;&#xA;&#xD;&#xA;As you can see here this is my local node that imports some 300 blocks and I was expecting this syncing to say `yes` instead of `no`. When does it say yes?  I am running with `pruning=archive` and also tried running with `prunig=1000` to see if it made a difference but it didn't &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/MRDjm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6476" PostHistoryTypeId="1" PostId="1748" RevisionGUID="27ea33d2-edf1-4e7a-ab22-7ea9b0639dea" CreationDate="2022-04-08T13:32:18.860" UserId="139" Text="When does sync say yes on polkadot js ui?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6477" PostHistoryTypeId="3" PostId="1748" RevisionGUID="27ea33d2-edf1-4e7a-ab22-7ea9b0639dea" CreationDate="2022-04-08T13:32:18.860" UserId="139" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6478" PostHistoryTypeId="2" PostId="1749" RevisionGUID="8f559f08-84fa-412e-91a3-e2690e9ba26f" CreationDate="2022-04-08T13:44:15.120" UserId="2204" Text="In substrate, does first block (block number 1) get finalised the same way as rest of the block? Or is finalisation of first block a special case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6480" PostHistoryTypeId="1" PostId="1749" RevisionGUID="8f559f08-84fa-412e-91a3-e2690e9ba26f" CreationDate="2022-04-08T13:44:15.120" UserId="2204" Text="In substrate, does first block (block number 1) get finalised the same way as rest of the block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6481" PostHistoryTypeId="3" PostId="1749" RevisionGUID="8f559f08-84fa-412e-91a3-e2690e9ba26f" CreationDate="2022-04-08T13:44:15.120" UserId="2204" Text="|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6482" PostHistoryTypeId="2" PostId="1750" RevisionGUID="9953c030-a6e0-4de1-b9c5-8949d075f7fa" CreationDate="2022-04-08T14:05:32.467" UserId="1789" Text="My team has got our parachain crowdloan pallet working, thanks to Moonbeam.&#xD;&#xA;&#xD;&#xA;According to Polkadot's description on Crowdloan, I think there must be some kind of Crowdfunding+Slot Auction going on somewhere before any Crowdloan can happen, right?&#xD;&#xA;&#xD;&#xA;(as a Crowdloan just gives out reward tokens over certain time periods, but before this can happen the crowdfunding must be finished first!)&#xD;&#xA;&#xD;&#xA;The thing is that I could not find such crowdfunding or auction source code in either Polkadot or Moonbeam repositories... &#xD;&#xA;&#xD;&#xA;If such source code is hidden, then we can only trust Polkadot team to run Crowdfunding and Slot Auction for my team, is that correct?&#xD;&#xA;&#xD;&#xA;Please advise. Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="6484" PostHistoryTypeId="1" PostId="1750" RevisionGUID="9953c030-a6e0-4de1-b9c5-8949d075f7fa" CreationDate="2022-04-08T14:05:32.467" UserId="1789" Text="How does my parachain crowdloan pallet work with Slot Auction + Crowdfunding?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6485" PostHistoryTypeId="3" PostId="1750" RevisionGUID="9953c030-a6e0-4de1-b9c5-8949d075f7fa" CreationDate="2022-04-08T14:05:32.467" UserId="1789" Text="|parachain|crowdloan|auctions|crowdfunding|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6487" PostHistoryTypeId="5" PostId="1463" RevisionGUID="26889ee4-f478-4674-8a35-adaf7d614825" CreationDate="2022-04-08T14:53:09.100" UserId="2038" Comment="added 1970 characters in body" Text="I cannot seem to setup a RPC call that accepts a `u128` param. &#xD;&#xA;&#xD;&#xA;I can input the following &#xD;&#xA;```ts&#xD;&#xA;let u128Input = new BN(&quot;10&quot;)&#xD;&#xA;let output = await api.rpc.template.testRpc(u128Input);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but get an error when the number is large&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;let u128Input = new BN(&quot;10000000000000000&quot;)&#xD;&#xA;let output = await api.rpc.template.testRpc(u128Input);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the following error &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RPC-CORE: testRpc(amount: Balance): Balance:: -32602: Invalid params: invalid type: string &quot;0x0000000000000000002386f26fc10000&quot;, expected u128.&#xD;&#xA;RpcError: -32602: Invalid params: invalid type: string &quot;0x0000000000000000002386f26fc10000&quot;, expected u128.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My `runtime-api/src/lib.rs` file looks like&#xD;&#xA;```rs&#xD;&#xA;sp_api::decl_runtime_apis! {&#xD;&#xA;	pub trait TemplateApi&lt;Balance&gt; where&#xD;&#xA;		Balance: Codec + MaybeDisplay,&#xD;&#xA;	{&#xD;&#xA;		fn test_rpc(amount: Balance) -&gt; Result&lt;u64, DispatchError&gt;;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What should I change to allow `u128` inputs?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Update&#xD;&#xA;&#xD;&#xA;`NumberOrHex` was exactly what I needed &#xD;&#xA;&#xD;&#xA;I updated the `rpc/runtime-api/src/lib.rs` to look like&#xD;&#xA;```rs&#xD;&#xA;sp_api::decl_runtime_apis! {&#xD;&#xA;	pub trait TemplateApi&lt;Balance&gt; where&#xD;&#xA;		Balance: Codec,&#xD;&#xA;	{&#xD;&#xA;		fn test_rpc(amount: Balance) -&gt; Result&lt;Balance, DispatchError&gt;;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I updated the `rpc/src/lib.rs` to look like&#xD;&#xA;```rs&#xD;&#xA;#[rpc]&#xD;&#xA;pub trait TemplateApi&lt;BlockHash, Balance&gt;&#xD;&#xA;where&#xD;&#xA;	Balance: Codec + Copy + TryFrom&lt;NumberOrHex&gt;,&#xD;&#xA;{&#xD;&#xA;	#[rpc(name = &quot;template_testRpc&quot;)]&#xD;&#xA;	fn test_rpc(&amp;self, amount: NumberOrHex, at: Option&lt;BlockHash&gt;) -&gt; Result&lt;NumberOrHex&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also the `impl` had to be updated and added a custom serialization and deserialization&#xD;&#xA;```rs&#xD;&#xA;impl&lt;C, Block, Balance&gt; TemplateApi&lt;&lt;Block as BlockT&gt;::Hash, Balance&gt; for Api&lt;C, Block&gt;&#xD;&#xA;where&#xD;&#xA;	Block: BlockT,&#xD;&#xA;	C: Send + Sync + 'static,&#xD;&#xA;	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;	C: HeaderBackend&lt;Block&gt;,&#xD;&#xA;	C::Api: TemplateRuntimeApi&lt;Block, Balance&gt;,&#xD;&#xA;	Balance: Codec + Copy + TryFrom&lt;NumberOrHex&gt; + Into&lt;NumberOrHex&gt; + std::fmt::Display,&#xD;&#xA;{&#xD;&#xA;	fn test_rpc(&#xD;&#xA;		&amp;self,&#xD;&#xA;		amount: NumberOrHex,&#xD;&#xA;		at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;,&#xD;&#xA;	) -&gt; Result&lt;NumberOrHex&gt; {&#xD;&#xA;		let api = self.client.runtime_api();&#xD;&#xA;		let at: BlockId&lt;Block&gt; = BlockId::hash(at.unwrap_or(self.client.info().best_hash));&#xD;&#xA;&#xD;&#xA;		let try_into_rpc_balance = |value: Balance| {&#xD;&#xA;			value.try_into().map_err(|_| RpcError {&#xD;&#xA;				code: ErrorCode::InvalidParams,&#xD;&#xA;				message: format!(&quot;{} doesn't fit in NumberOrHex representation&quot;, value),&#xD;&#xA;				data: None,&#xD;&#xA;			})&#xD;&#xA;		};&#xD;&#xA;&#xD;&#xA;		let res = api&#xD;&#xA;			.test_rpc(&amp;at, decode_hex(amount, &quot;balance&quot;)?)&#xD;&#xA;			.map_err(runtime_error_into_rpc_error)?&#xD;&#xA;			.map_err(test_rpc_error)?;&#xD;&#xA;&#xD;&#xA;		try_into_rpc_balance(res)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;fn decode_hex&lt;H: std::fmt::Debug + Copy, T: TryFrom&lt;H&gt;&gt;(from: H, name: &amp;str) -&gt; Result&lt;T&gt; {&#xD;&#xA;	from.try_into().map_err(|_| RpcError {&#xD;&#xA;		code: ErrorCode::InvalidParams,&#xD;&#xA;		message: format!(&quot;{:?} does not fit into the {} type&quot;, from, name),&#xD;&#xA;		data: None,&#xD;&#xA;	})&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6488" PostHistoryTypeId="4" PostId="1744" RevisionGUID="4a34217c-ee59-424b-945e-538cd868d23c" CreationDate="2022-04-08T15:22:52.657" UserId="1959" Comment="edited title" Text="How to use `MultiLocation` in xcm to express an account address of Ethereum?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6489" PostHistoryTypeId="2" PostId="1751" RevisionGUID="3e0843d1-3743-47ee-82f4-51052ef890c0" CreationDate="2022-04-08T15:27:16.853" UserId="452" Text="The first block is #0 (genesis block) and it is always considered finalized by default since it is explicitly defined as part of the chain spec, any subsequent blocks (#1 included) are treated equally and finalized with whatever consensus protocol the given chain provides (typically GRANDPA)." ContentLicense="CC BY-SA 4.0" />
  <row Id="6491" PostHistoryTypeId="6" PostId="1749" RevisionGUID="c992b43f-0333-4e14-8f6d-e0b2655eeca2" CreationDate="2022-04-08T15:28:44.310" UserId="452" Comment="edited tags" Text="|consensus|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6492" PostHistoryTypeId="2" PostId="1752" RevisionGUID="7a49cd77-e3a5-4a5c-a5a3-b757c0a4d443" CreationDate="2022-04-08T15:46:12.863" UserId="140" Text="How can we convert Substrate address to Etherum address?&#xD;&#xA;&#xD;&#xA;There is an EVM to substrate address conversion that edgeware provide https://edgewa.re/keygen" ContentLicense="CC BY-SA 4.0" />
  <row Id="6494" PostHistoryTypeId="1" PostId="1752" RevisionGUID="7a49cd77-e3a5-4a5c-a5a3-b757c0a4d443" CreationDate="2022-04-08T15:46:12.863" UserId="140" Text="How can we convert Substrate address to Etherum address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6495" PostHistoryTypeId="3" PostId="1752" RevisionGUID="7a49cd77-e3a5-4a5c-a5a3-b757c0a4d443" CreationDate="2022-04-08T15:46:12.863" UserId="140" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6496" PostHistoryTypeId="5" PostId="1750" RevisionGUID="06657c71-b942-470e-bb76-d1e38a02ea60" CreationDate="2022-04-08T16:40:52.377" UserId="128" Comment="Remove thanks and fix some grammar" Text="My team has got our parachain crowdloan pallet working, thanks to Moonbeam.&#xD;&#xA;&#xD;&#xA;According to Polkadot's description of Crowdloans, I think there must be some kind of Crowdfunding+Slot Auction going on somewhere before any Crowdloan can happen, right?&#xD;&#xA;&#xD;&#xA;(as a Crowdloan just gives out reward tokens over certain time periods, but before this can happen the crowdfunding must be finished first!)&#xD;&#xA;&#xD;&#xA;The thing is that I could not find such crowdfunding or auction source code in either Polkadot or Moonbeam repositories... &#xD;&#xA;&#xD;&#xA;If such source code is hidden, then we can only trust Polkadot team to run Crowdfunding and Slot Auction for my team, is that correct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6497" PostHistoryTypeId="5" PostId="1749" RevisionGUID="f08b2c1a-103d-4058-8434-05c1457b3629" CreationDate="2022-04-08T16:44:22.187" UserId="128" Comment="Fix wording" Text="In substrate, does genesis block get finalised the same way as the subsequent blocks, or is finalisation of the genesis block a special case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6498" PostHistoryTypeId="4" PostId="1749" RevisionGUID="f08b2c1a-103d-4058-8434-05c1457b3629" CreationDate="2022-04-08T16:44:22.187" UserId="128" Comment="Fix wording" Text="In substrate, does the genesis block get finalised the same way as the subsequent blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6499" PostHistoryTypeId="2" PostId="1753" RevisionGUID="c53b308b-7615-4151-bdea-88234a0b058c" CreationDate="2022-04-08T17:08:52.840" UserId="2212" Text="I've seen the developer docs, but what I am looking for is a paper that explains why Substrate is organized in the way that it is. As far as I understand, Substrate builds chains that are EVM-compatible. How does it do that and what design features allow it to do so while still giving the developer flexibility to create modular designs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6501" PostHistoryTypeId="1" PostId="1753" RevisionGUID="c53b308b-7615-4151-bdea-88234a0b058c" CreationDate="2022-04-08T17:08:52.840" UserId="2212" Text="Is there a substrate technology explainer available?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6502" PostHistoryTypeId="3" PostId="1753" RevisionGUID="c53b308b-7615-4151-bdea-88234a0b058c" CreationDate="2022-04-08T17:08:52.840" UserId="2212" Text="|blockchain-frameworks|systemmodule|design|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6503" PostHistoryTypeId="4" PostId="1746" RevisionGUID="6644eaa2-34b2-4422-96fb-e2f007190aab" CreationDate="2022-04-08T17:13:53.263" UserId="32" Comment="edited title" Text="How to provide Council the Ability to Mint/Burn tokens based on Council Proposals?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6504" PostHistoryTypeId="2" PostId="1754" RevisionGUID="2d72b91f-e534-454e-87c7-6d532f64c5ac" CreationDate="2022-04-08T17:35:44.807" UserId="2213" Text="What is the difference between an Extrinsic and a Dispatchable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6506" PostHistoryTypeId="1" PostId="1754" RevisionGUID="2d72b91f-e534-454e-87c7-6d532f64c5ac" CreationDate="2022-04-08T17:35:44.807" UserId="2213" Text="What is the difference between Extrinsic and Dispatchable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6507" PostHistoryTypeId="3" PostId="1754" RevisionGUID="2d72b91f-e534-454e-87c7-6d532f64c5ac" CreationDate="2022-04-08T17:35:44.807" UserId="2213" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6508" PostHistoryTypeId="2" PostId="1755" RevisionGUID="86af55b7-bf72-4aaf-8f8d-a83cab32eaba" CreationDate="2022-04-08T17:42:06.143" UserId="2213" Text="I saw that some of the calls in `frame` take `Vec` as a parameter. I haven't found a call that takes `BoundedVec`, but my impression was that I should basically always use `BoundedVec` over `Vec`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6510" PostHistoryTypeId="1" PostId="1755" RevisionGUID="86af55b7-bf72-4aaf-8f8d-a83cab32eaba" CreationDate="2022-04-08T17:42:06.143" UserId="2213" Text="Why do frame calls take a `Vec` parameter instead of `BoundedVec`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6511" PostHistoryTypeId="3" PostId="1755" RevisionGUID="86af55b7-bf72-4aaf-8f8d-a83cab32eaba" CreationDate="2022-04-08T17:42:06.143" UserId="2213" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6512" PostHistoryTypeId="2" PostId="1756" RevisionGUID="f1d5e533-3e2e-48f8-a8e8-972c7c8259c2" CreationDate="2022-04-08T17:43:54.153" UserId="342" Text="The Ethereum address correspond to the last 20 bytes of the keccak-256 hash of the (decompressed) secp256k1 public key.&#xD;&#xA;&#xD;&#xA;For example, given the following key generated via `subkey` tool:&#xD;&#xA;&#xD;&#xA;    ❯ subkey generate --scheme Ecdsa&#xD;&#xA;    Secret phrase `normal whale earth envelope wash bench drip latin please inform crisp congress` is account:&#xD;&#xA;    Secret seed:      0x6c51a7f71537a60e666288a292ceabf322202af75e39bc34fd10f576cee489a5&#xD;&#xA;    Public key (hex): 0x025f13d211338f64fcc941e80b9d71929c38a7147762541da4123de45cedb0b312&#xD;&#xA;    Account ID:       0x211e23eda1f535feb3abd690513a0c2731c4bb9940aad59f0fb3c8abe89308e1&#xD;&#xA;    SS58 Address:     5Cp8PdGYPGe2Vc5WLb4eUmbeuhxuDjPSQcpyWgVSjh97D9sR&#xD;&#xA;&#xD;&#xA;Public key is given in compressed form:&#xD;&#xA;&#xD;&#xA;    Compressed:         0x025f13d211338f64fcc941e80b9d71929c38a7147762541da4123de45cedb0b312&#xD;&#xA;&#xD;&#xA;Decompress it&#xD;&#xA;&#xD;&#xA;    Decompressed:       0x045f13d211338f64fcc941e80b9d71929c38a7147762541da4123de45cedb0b31290c16565dbc3c937fd1d9cf4ecc8ad489551a7d608ec5c649bec747183334754&#xD;&#xA;&#xD;&#xA;Compute the Keccak-256 of the decompressed key (excluded the first byte (0x04))&#xD;&#xA;&#xD;&#xA;    Keccak-256:         0x09ed410a80b44d0a8c3e7e1fd924abdb51e253b19f69fd8114fe6d9a1794d2cf&#xD;&#xA;&#xD;&#xA;The last 20 bytes is the Ethereum address&#xD;&#xA;&#xD;&#xA;    Eth Address:        0xd924abdb51e253b19f69fd8114fe6d9a1794d2cf&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Said that, if instead you only have a Substrate AccountId (without the public key)  it is not possible to convert it to the corresponding ETH address.&#xD;&#xA;&#xD;&#xA;The reason is that the AccountId is the result of a hash applied to the PublicKey (+ some other data) and thus it is not possible to revert it in order to recover the public key (and apply the procedure I've described above).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Here is a code snip doing the conversion in the Substrate Beefy pallet:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/87ebfdbcf8242c04856e3881a78ea0bc369d77a2/frame/beefy-mmr/src/lib.rs#L70-L89" ContentLicense="CC BY-SA 4.0" />
  <row Id="6514" PostHistoryTypeId="2" PostId="1757" RevisionGUID="b36593d4-346e-4ed0-a908-1bb01d9a3acf" CreationDate="2022-04-08T17:50:32.473" UserId="73" Text="1. `BoundedVec` is still a relative new type that was introduced in the last months. It is not yet used everywhere.&#xD;&#xA;2. `BoundedVec` is mainly useful for when you want to make your storage bound to some maximum number of elements. A call should already by bound by a proper fee model. Meaning if someone wants to send you 1MB of data in one call, they need to pay for it. `BoundedVec` doesn't make that much sense there. However, if you want to have a static upper bound, then you can for sure also use `BoundedVec` as a parameter." ContentLicense="CC BY-SA 4.0" />
  <row Id="6516" PostHistoryTypeId="2" PostId="1758" RevisionGUID="a3e10ede-249a-48e0-ae89-dfb865f2ac22" CreationDate="2022-04-08T17:59:17.543" UserId="104" Text="It is still too early to know how exactly we should specify an Ethereum account in a `MultiLocation` in XCM, since we still don't have a Polkadot-Ethereum bridge yet (or a Kusama-Ethereum bridge for the matter), because whichever choice you make to specify the location of an Ethereum account is entirely dependent on how the bridge is configured to interpret the `MultiLocation`.&#xD;&#xA;&#xD;&#xA;That said, given what we already know with the format of `MultiLocation`s sent to bridges, there are a couple of things that we need to know first before we can specify the `MultiLocation` of an Ethereum account -- firstly, what is the `MultiLocation` of your consensus system with respect to the relay chain? Assuming you are a parachain, then the `MultiLocation` of an Ethereum account could be specified with `(Parent, Parent, EthereumFoundation, AccountKey20 { network: None, key: [..] }).into()`.&#xD;&#xA;&#xD;&#xA;Again I must stress, we currently do not have a bridge to Ethereum, so anything `MultiLocation` we specify now is subject to change." ContentLicense="CC BY-SA 4.0" />
  <row Id="6518" PostHistoryTypeId="5" PostId="1758" RevisionGUID="3f77f652-d0cf-4118-90c2-846c14c903c2" CreationDate="2022-04-08T18:08:01.153" UserId="104" Comment="added 133 characters in body" Text="It is still too early to know how exactly we should specify an Ethereum account in a `MultiLocation` in XCM, since we still don't have a Polkadot-Ethereum bridge yet (or a Kusama-Ethereum bridge for the matter), because whichever choice you make to specify the location of an Ethereum account is entirely dependent on how the bridge is configured to interpret the `MultiLocation`.&#xD;&#xA;&#xD;&#xA;That said, given what we already know with the format of `MultiLocation`s sent to bridges, there are a couple of things that we need to know first before we can specify the `MultiLocation` of an Ethereum account -- firstly, what is the `MultiLocation` of your consensus system with respect to the relay chain? Assuming you are a parachain, then the `MultiLocation` of an Ethereum account could be specified with `(Parent, Parent, EthereumFoundation, AccountKey20 { network: None, key: [..] }).into()`.&#xD;&#xA;&#xD;&#xA;Again I must stress, we currently do not have a bridge to Ethereum, so anything `MultiLocation` we specify now is subject to change. Perhaps it's actually better if you tell us why you absolutely _need_ to specify an Ethereum account right now for your application?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6519" PostHistoryTypeId="5" PostId="1757" RevisionGUID="c066695c-9315-4629-b0a5-ace9ef93dff1" CreationDate="2022-04-08T18:08:48.813" UserId="104" Comment="added 2 characters in body" Text="1. `BoundedVec` is still a relatively new type that was introduced in the last months. It is not yet used everywhere.&#xD;&#xA;2. `BoundedVec` is mainly useful for when you want to make your storage bound to some maximum number of elements. A call should already by bound by a proper fee model. Meaning if someone wants to send you 1MB of data in one call, they need to pay for it. `BoundedVec` doesn't make that much sense there. However, if you want to have a static upper bound, then you can for sure also use `BoundedVec` as a parameter." ContentLicense="CC BY-SA 4.0" />
  <row Id="6520" PostHistoryTypeId="5" PostId="1749" RevisionGUID="302fe17a-a001-4fa1-803f-c3fabbddcf12" CreationDate="2022-04-08T18:11:17.500" UserId="128" Comment="added 4 characters in body" Text="In substrate, does the genesis block get finalised the same way as the subsequent blocks, or is finalisation of the genesis block a special case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6521" PostHistoryTypeId="2" PostId="1759" RevisionGUID="b092fb1f-411c-445b-8c2e-4df3dbdd961c" CreationDate="2022-04-08T18:28:49.543" UserId="45" Text="The &quot;dispatchable&quot; concept comes from FRAME. When somebody says `Dispatchable` they mean one of the entrypoints in a pallet. &#xD;&#xA;&#xD;&#xA;For example, Balance's [`transfer`](https://github.com/paritytech/substrate/blob/87ebfdbcf8242c04856e3881a78ea0bc369d77a2/frame/balances/src/lib.rs#L275) is a dispatchable. Alternatively, it might be referred as a `Call`, e.g. [`Call::transfer`](https://crates.parity.io/pallet_balances/pallet/enum.Call.html#variant.transfer).&#xD;&#xA;&#xD;&#xA;[Extrinsic](https://docs.substrate.io/v3/concepts/extrinsics/) is something that gets included in a block. Typically, it is a transaction that is sent by a user. Within FRAME every extrinsic specifies the [dispatchable](https://github.com/paritytech/substrate/blob/9a6d706d8db00abb6ba183839ec98ecd9924b1f8/primitives/runtime/src/generic/unchecked_extrinsic.rs#L53)." ContentLicense="CC BY-SA 4.0" />
  <row Id="6526" PostHistoryTypeId="2" PostId="1760" RevisionGUID="0c4f9713-f93b-4746-8fed-03f23e09c111" CreationDate="2022-04-09T05:37:05.050" UserId="2146" Text="Hi I was following the beginner's tutorial here: https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/&#xD;&#xA;&#xD;&#xA;when I get to cargo build --release I get the following error: &#xD;&#xA;&#xD;&#xA;&gt; &gt;   --- stderr   thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)',&#xD;&#xA;&gt; /home/hidden-username/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.4.3+5.2.1-patched.2/build.rs:334:19&#xD;&#xA;&#xD;&#xA;I'm running Windows 10 (im sorrrry!) but operating my node on a WSL lsb_release &#xD;&#xA;&#xD;&#xA;Ubuntu 20.04.4 LTS (focal)&#xD;&#xA;&#xD;&#xA;    &gt; &#xD;&#xA;    &gt; installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    nightly-x86_64-unknown-linux-gnu&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    rustc 1.60.0 (7737e0b5c 2022-04-04)&#xD;&#xA;&#xD;&#xA;I ran a full Backtrace, if anyone cares to take a look. &#xD;&#xA;&#xD;&#xA;&gt; --- stderr&#xD;&#xA;&#xD;&#xA;      thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)', /home/user-name/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.4.3+5.2.1-patched.2/build.rs:334:19&#xD;&#xA;      stack backtrace:&#xD;&#xA;         0:     0x7f8453e871ad - std::backtrace_rs::backtrace::libunwind::trace::hee598835bc88d35b&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5&#xD;&#xA;         1:     0x7f8453e871ad - std::backtrace_rs::backtrace::trace_unsynchronized::h9cdc730ba5cf5d72&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5&#xD;&#xA;         2:     0x7f8453e871ad - std::sys_common::backtrace::_print_fmt::h75aeaf7ed30e43fa&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5&#xD;&#xA;         3:     0x7f8453e871ad - &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt::h606862f787600875&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22&#xD;&#xA;         4:     0x7f8453eaa37c - core::fmt::write::he803f0f418caf762&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17&#xD;&#xA;         5:     0x7f8453e827c8 - std::io::Write::write_fmt::h70bc45872f37e7bb&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15&#xD;&#xA;         6:     0x7f8453e89487 - std::sys_common::backtrace::_print::h64d038cf8ac3e13e&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5&#xD;&#xA;         7:     0x7f8453e89487 - std::sys_common::backtrace::print::h359300b4a7fccf65&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9&#xD;&#xA;         8:     0x7f8453e89487 - std::panicking::default_hook::{{closure}}::hf51be35e2f510149&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22&#xD;&#xA;         9:     0x7f8453e89150 - std::panicking::default_hook::h03ca0f22e1d2d25e&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9&#xD;&#xA;        10:     0x7f8453e89bd9 - std::panicking::rust_panic_with_hook::h3b7380e99b825b63&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:698:17&#xD;&#xA;        11:     0x7f8453e898c7 - std::panicking::begin_panic_handler::{{closure}}::h8e849d0710154ce0&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13&#xD;&#xA;        12:     0x7f8453e87674 - std::sys_common::backtrace::__rust_end_short_backtrace::hedcdaddbd4c46cc5&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;        13:     0x7f8453e895d9 - rust_begin_unwind&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5&#xD;&#xA;        14:     0x7f8453e09493 - core::panicking::panic_fmt::he1bbc7336d49a357&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14&#xD;&#xA;        15:     0x7f8453e0e179 - build_script_build::execute::h343d6afa2e0ceef7&#xD;&#xA;        16:     0x7f8453e0df86 - build_script_build::run::h77c5c3d9911c5b0d&#xD;&#xA;        17:     0x7f8453e0cc93 - build_script_build::main::h58a32d56a136094c&#xD;&#xA;        18:     0x7f8453e11cd3 - core::ops::function::FnOnce::call_once::hbbb738d0cd945cf7&#xD;&#xA;        19:     0x7f8453e11a69 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf9dce89d7f8aca0b&#xD;&#xA;        20:     0x7f8453e11a39 - std::rt::lang_start::{{closure}}::h5e39e3c0ddde7c39&#xD;&#xA;        21:     0x7f8453e86891 - core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once::hb7014f43484a8b4e&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:259:13&#xD;&#xA;        22:     0x7f8453e86891 - std::panicking::try::do_call::h7bc9dc436daeb8c7&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40&#xD;&#xA;        23:     0x7f8453e86891 - std::panicking::try::h653d68a27ff5f175&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19&#xD;&#xA;        24:     0x7f8453e86891 - std::panic::catch_unwind::h9d739f9f59895e68&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14&#xD;&#xA;        25:     0x7f8453e86891 - std::rt::lang_start_internal::{{closure}}::hf006f2bc7ce22bbe&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:48&#xD;&#xA;        26:     0x7f8453e86891 - std::panicking::try::do_call::hfb39d6df61a2e69f&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40&#xD;&#xA;        27:     0x7f8453e86891 - std::panicking::try::h13e2d225134958ac&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19&#xD;&#xA;        28:     0x7f8453e86891 - std::panic::catch_unwind::h3bd49b5a5dfb1a50&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14&#xD;&#xA;        29:     0x7f8453e86891 - std::rt::lang_start_internal::h2ba92edce36c035e&#xD;&#xA;                                     at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:20&#xD;&#xA;        30:     0x7f8453e11a21 - std::rt::lang_start::hc141b7822a458dac&#xD;&#xA;        31:     0x7f8453e0ea53 - main&#xD;&#xA;        32:     0x7f8453b940b3 - __libc_start_main&#xD;&#xA;        33:     0x7f8453e09c6e - _start&#xD;&#xA;        34:                0x0 - &lt;unknown&gt;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6528" PostHistoryTypeId="1" PostId="1760" RevisionGUID="0c4f9713-f93b-4746-8fed-03f23e09c111" CreationDate="2022-04-09T05:37:05.050" UserId="2146" Text="Substrate-node-template build fail for Ubuntu 20.04 on Windows 10" ContentLicense="CC BY-SA 4.0" />
  <row Id="6529" PostHistoryTypeId="3" PostId="1760" RevisionGUID="0c4f9713-f93b-4746-8fed-03f23e09c111" CreationDate="2022-04-09T05:37:05.050" UserId="2146" Text="|substrate-node-template|wsl|windows|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6530" PostHistoryTypeId="2" PostId="1761" RevisionGUID="3f28f716-8d1e-4440-89ad-128ccb8fe2ea" CreationDate="2022-04-09T05:51:09.300" UserId="1773" Text="I was told after parachains one of the next steps is parathreads, where can I find information about parathreads estimated release date in Kusama?&#xD;&#xA;&#xD;&#xA;PS: I read the following in Reddit: &#xD;&#xA;-Well parathread cannot send state transition proofs for Relay Chain validators for now I think. So yes, they exists, because before becoming a parachain, the previous stage is being a parathread, but they cannot do anything-&#xD;&#xA;&#xD;&#xA;Does this mean they exist but they are not functional yet? When can we expect fully functional parathreads in Kusama?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6532" PostHistoryTypeId="1" PostId="1761" RevisionGUID="3f28f716-8d1e-4440-89ad-128ccb8fe2ea" CreationDate="2022-04-09T05:51:09.300" UserId="1773" Text="Parathreads fully functional in Kusama?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6533" PostHistoryTypeId="3" PostId="1761" RevisionGUID="3f28f716-8d1e-4440-89ad-128ccb8fe2ea" CreationDate="2022-04-09T05:51:09.300" UserId="1773" Text="|kusama|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6534" PostHistoryTypeId="2" PostId="1762" RevisionGUID="da331378-bbbf-4794-bf04-d0d9e4e5c13a" CreationDate="2022-04-09T07:08:50.423" UserId="1959" Text="XCM version: 3&#xD;&#xA;&#xD;&#xA;I'm learing XCM. I want to specify a Polkadot account when within a parachain on Polkadot like Statemint, I know it can be specified with `ParentThen(X1(AccountId32)).into`.&#xD;&#xA;&#xD;&#xA;But are the other two ways below correct? What is the difference between the three of them?&#xD;&#xA;&#xD;&#xA;Option 1: Use `NetworkId` to sepcify Polkadot in `GlobalConsensus`.&#xD;&#xA;```&#xD;&#xA;MultiLocation { &#xD;&#xA;   parents: 0,&#xD;&#xA;   interior: X2(GlobalConsensus(Polkadot), AccountId32 { network: None, id: [...] }) &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Option 2: Use `NetworkId` to specify Polkadot in `AccountId32`.&#xD;&#xA;```&#xD;&#xA;MultiLocation {&#xD;&#xA;   parents: 0,&#xD;&#xA;   interior: X1(AccountId32 { network: Some(Polkadot), id: [...] }) &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I know this question may be similar to [another ][1], but the focus of that question may be Ethereum, here I want to know what is the difference between these two ways of specifying `NetworkId` and when should I use which?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1744/how-to-use-multilocation-in-xcm-to-express-an-account-address-of-ethereum" ContentLicense="CC BY-SA 4.0" />
  <row Id="6536" PostHistoryTypeId="1" PostId="1762" RevisionGUID="da331378-bbbf-4794-bf04-d0d9e4e5c13a" CreationDate="2022-04-09T07:08:50.423" UserId="1959" Text="What is the difference between `GlobalConsensus` (tuple struct with NetworkId) and `NetworkId` (be used via AccountId32) in XCM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6537" PostHistoryTypeId="3" PostId="1762" RevisionGUID="da331378-bbbf-4794-bf04-d0d9e4e5c13a" CreationDate="2022-04-09T07:08:50.423" UserId="1959" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6538" PostHistoryTypeId="5" PostId="1762" RevisionGUID="7150e4ac-7790-4302-bdf9-60dcd31c6cc6" CreationDate="2022-04-09T07:16:07.750" UserId="1959" Comment="added 19 characters in body; edited title" Text="XCM version: 3&#xD;&#xA;&#xD;&#xA;I'm learing XCM. I want to specify a Polkadot account by `MultiLocation` when within a parachain on Polkadot like Statemint, I know it can be specified with `ParentThen(X1(AccountId32)).into`.&#xD;&#xA;&#xD;&#xA;But are the other two ways below correct? What is the difference between the three of them?&#xD;&#xA;&#xD;&#xA;Option 1: Use `NetworkId` to sepcify Polkadot in `GlobalConsensus`.&#xD;&#xA;```&#xD;&#xA;MultiLocation { &#xD;&#xA;   parents: 0,&#xD;&#xA;   interior: X2(GlobalConsensus(Polkadot), AccountId32 { network: None, id: [...] }) &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Option 2: Use `NetworkId` to specify Polkadot in `AccountId32`.&#xD;&#xA;```&#xD;&#xA;MultiLocation {&#xD;&#xA;   parents: 0,&#xD;&#xA;   interior: X1(AccountId32 { network: Some(Polkadot), id: [...] }) &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I know this question may be similar to [another ][1], but the focus of that question may be Ethereum, here I want to know what is the difference between these two ways of specifying `NetworkId` and when should I use which?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1744/how-to-use-multilocation-in-xcm-to-express-an-account-address-of-ethereum" ContentLicense="CC BY-SA 4.0" />
  <row Id="6539" PostHistoryTypeId="4" PostId="1762" RevisionGUID="7150e4ac-7790-4302-bdf9-60dcd31c6cc6" CreationDate="2022-04-09T07:16:07.750" UserId="1959" Comment="added 19 characters in body; edited title" Text="What is the difference between `GlobalConsensus` (tuple struct with NetworkId) and `NetworkId` (be used via AccountId32) in XCM `MultiLocation`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6542" PostHistoryTypeId="2" PostId="1763" RevisionGUID="80da5c4c-57b5-429c-b4f8-b61ca741c635" CreationDate="2022-04-09T09:01:31.560" UserId="576" Text="I run polkadot node from my vps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```./target/release/polkadot \&#xD;&#xA;--alice \&#xD;&#xA;--validator \&#xD;&#xA;--base-path /tmp/relay/alice \&#xD;&#xA;--chain rococo-custom-2-raw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9944&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but not working on polkadot-JS by using this address,&#xD;&#xA;&#xD;&#xA;```wss://mydomain.com:9944```&#xD;&#xA;&#xD;&#xA;I use wss because for https. &#xD;&#xA;&#xD;&#xA;but broweser(chrome) just said,&#xD;&#xA;&#xD;&#xA;&quot;Waiting to make a connection to the remote endpoint and finishing API initialization.&quot;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6544" PostHistoryTypeId="1" PostId="1763" RevisionGUID="80da5c4c-57b5-429c-b4f8-b61ca741c635" CreationDate="2022-04-09T09:01:31.560" UserId="576" Text="Can't connect to pokadot-js UI from my VPS blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="6545" PostHistoryTypeId="3" PostId="1763" RevisionGUID="80da5c4c-57b5-429c-b4f8-b61ca741c635" CreationDate="2022-04-09T09:01:31.560" UserId="576" Text="|rpc|wss|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6546" PostHistoryTypeId="2" PostId="1764" RevisionGUID="06763481-27ad-4501-a823-da0f3f81d89b" CreationDate="2022-04-09T09:15:21.203" UserId="627" Text="Turning a non-secure endpoint into a secure endpoint cannot be done simply by adding `wss://` in-front. The `wss://` assumes that there is a secure connection with a certificate. In this case if you check the node logs, you can see that it rejects the connection since it cannot parse it.&#xD;&#xA;&#xD;&#xA;Due to browser security the `https://polkadot.js.org/apps/` cannot connect to a non-secure WSS endpoint, unless it is localhost. There is a guide to setup an [nginx proxy](https://wiki.polkadot.network/docs/maintain-wss) that allows you to setup a secure connection.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6548" PostHistoryTypeId="2" PostId="1765" RevisionGUID="3f8d16a5-2f4b-4eb3-9677-c6f263866187" CreationDate="2022-04-09T09:19:52.180" UserId="697" Text="there are some good information about design architecture here https://docs.substrate.io/v3/runtime/frame/" ContentLicense="CC BY-SA 4.0" />
  <row Id="6550" PostHistoryTypeId="2" PostId="1766" RevisionGUID="4b0d8a4c-c4f5-41b1-8ba5-7a9a297dfd4b" CreationDate="2022-04-09T09:20:23.577" UserId="167" Text="The Reddit answer is correct. They exist as an abstraction because the lifecycle of a parachain starts from and ends in being a parathread, but the core functionality (i.e. pay-as-you-go, generating para-blocks and proofs) are not active/fully implemented yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="6552" PostHistoryTypeId="2" PostId="1767" RevisionGUID="5352727e-fb4b-43c0-9ecd-05faed4ffa62" CreationDate="2022-04-09T09:22:30.733" UserId="85" Text="You can run up polkadot-js locally if that's easier for you?&#xD;&#xA;&#xD;&#xA;```lang-sh&#xD;&#xA;git clone https://github.com/polkadot-js/apps&#xD;&#xA;yarn&#xD;&#xA;yarn run start&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6554" PostHistoryTypeId="2" PostId="1768" RevisionGUID="1060ab91-0900-47c3-9359-894b3efb34b4" CreationDate="2022-04-09T09:27:28.290" UserId="1970" Text="The display there is from the `system_health` RPC which returns a [Health struct](https://github.com/paritytech/substrate/blob/994bb57b77b2845e9e1b48d8eb77c9160366d525/client/rpc-api/src/system/helpers.rs#L43-L52). &#xD;&#xA;&#xD;&#xA;This itself is populated from the [networking sync state](https://github.com/paritytech/substrate/blob/994bb57b77b2845e9e1b48d8eb77c9160366d525/client/service/src/lib.rs#L187-L192). The value finally comes from [here](https://github.com/paritytech/substrate/blob/994bb57b77b2845e9e1b48d8eb77c9160366d525/client/network/src/protocol/sync.rs#L605-L618) on the networking layer. &#xD;&#xA;&#xD;&#xA;The logic in this code seems to indicate that when current the connected height is [5 blocks](https://github.com/paritytech/substrate/blob/994bb57b77b2845e9e1b48d8eb77c9160366d525/client/network/src/protocol/sync.rs#L104) behind, it is in sync state." ContentLicense="CC BY-SA 4.0" />
  <row Id="6556" PostHistoryTypeId="2" PostId="1769" RevisionGUID="aabafa62-2ed6-4050-a26e-3ccca916c754" CreationDate="2022-04-09T10:23:39.660" UserId="697" Text="You can check the key existance with [has_key][1] method and list all available keys with [keys][2]. the `sr25519_public_keys` method forces to retrieve just the `sr25519` ones.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/sp_keystore/trait.SyncCryptoStore.html#tymethod.has_keys&#xD;&#xA;  [2]: https://crates.parity.io/sp_keystore/trait.SyncCryptoStore.html#method.keys" ContentLicense="CC BY-SA 4.0" />
  <row Id="6558" PostHistoryTypeId="5" PostId="1585" RevisionGUID="b88dd65b-5134-4b9f-b2c0-28e69d49c7c7" CreationDate="2022-04-09T13:48:44.823" UserId="172" Comment="added 36 characters in body" Text="Questions about Substrate tutorials." ContentLicense="CC BY-SA 4.0" />
  <row Id="6559" PostHistoryTypeId="24" PostId="1585" RevisionGUID="b88dd65b-5134-4b9f-b2c0-28e69d49c7c7" CreationDate="2022-04-09T13:48:44.823" Comment="Proposed by 172 approved by 85, 83 edit id of 147" ContentLicense="CC BY-SA 4.0" />
  <row Id="6560" PostHistoryTypeId="5" PostId="1581" RevisionGUID="c52ed51e-c20a-4e29-9286-81202cd5832a" CreationDate="2022-04-09T13:49:03.623" UserId="172" Comment="added 121 characters in body" Text="Questions pertaining to runtime storage and chain databases, including querying storage, database back-ups and archiving." ContentLicense="CC BY-SA 4.0" />
  <row Id="6561" PostHistoryTypeId="24" PostId="1581" RevisionGUID="c52ed51e-c20a-4e29-9286-81202cd5832a" CreationDate="2022-04-09T13:49:03.623" Comment="Proposed by 172 approved by 85, 83 edit id of 143" ContentLicense="CC BY-SA 4.0" />
  <row Id="6562" PostHistoryTypeId="5" PostId="1584" RevisionGUID="9994bacb-46dc-4161-9a87-0e9fd3e14b75" CreationDate="2022-04-09T13:49:43.723" UserId="172" Comment="added 240 characters in body" Text="Although other community maintained tutorials exists, the primary source of tutorials comes from the [Substrate Developer Hub](https://docs.substrate.io/tutorials/v3/). However, this tag can be used to group any tutorial teaching Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="6563" PostHistoryTypeId="24" PostId="1584" RevisionGUID="9994bacb-46dc-4161-9a87-0e9fd3e14b75" CreationDate="2022-04-09T13:49:43.723" Comment="Proposed by 172 approved by 85, 83 edit id of 146" ContentLicense="CC BY-SA 4.0" />
  <row Id="6564" PostHistoryTypeId="5" PostId="1561" RevisionGUID="be877c43-cc05-4470-8788-d4fa52875403" CreationDate="2022-04-09T13:50:00.903" UserId="172" Comment="added 96 characters in body" Text="Questions inquiring about using Substrate based EVMs including the EVM pallet or related tools. " ContentLicense="CC BY-SA 4.0" />
  <row Id="6565" PostHistoryTypeId="24" PostId="1561" RevisionGUID="be877c43-cc05-4470-8788-d4fa52875403" CreationDate="2022-04-09T13:50:00.903" Comment="Proposed by 172 approved by 85, 83 edit id of 141" ContentLicense="CC BY-SA 4.0" />
  <row Id="6566" PostHistoryTypeId="5" PostId="1637" RevisionGUID="a7f4d50d-38e7-4a7b-a98c-12b1baf0c012" CreationDate="2022-04-09T13:52:23.273" UserId="172" Comment="added 96 characters in body" Text="Questions relating to setting up, debugging or launching a private network built with Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="6567" PostHistoryTypeId="24" PostId="1637" RevisionGUID="a7f4d50d-38e7-4a7b-a98c-12b1baf0c012" CreationDate="2022-04-09T13:52:23.273" Comment="Proposed by 172 approved by 85, 83 edit id of 150" ContentLicense="CC BY-SA 4.0" />
  <row Id="6568" PostHistoryTypeId="5" PostId="1587" RevisionGUID="ece45df0-fcad-4d7a-817f-edfeffc32c08" CreationDate="2022-04-09T13:52:40.973" UserId="172" Comment="added 65 characters in body" Text="Questions about account types, account IDs and account addresses." ContentLicense="CC BY-SA 4.0" />
  <row Id="6569" PostHistoryTypeId="24" PostId="1587" RevisionGUID="ece45df0-fcad-4d7a-817f-edfeffc32c08" CreationDate="2022-04-09T13:52:40.973" Comment="Proposed by 172 approved by 85, 83 edit id of 148" ContentLicense="CC BY-SA 4.0" />
  <row Id="6570" PostHistoryTypeId="2" PostId="1770" RevisionGUID="8d524b5d-102d-470b-a2cc-85ab32181086" CreationDate="2022-04-09T15:01:11.343" UserId="1806" Text="I understand that there are two main Rust client libraries for Substrate:&#xD;&#xA;&#xD;&#xA;- `subxt`&#xD;&#xA;- `substrate-api-client`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've checked out the examples for both libraries and it seems to me that they are mostly the same.&#xD;&#xA;&#xD;&#xA;From what I understand `substrate-api-client` is a web3 foundation grant recipient and `subxt` is the library built by Parity Technologies.&#xD;&#xA;&#xD;&#xA;That said, I couldn't find any direct comparisons or information about the pros and cons of each library and why you would use one over the other (or maybe one is simply better than the other)." ContentLicense="CC BY-SA 4.0" />
  <row Id="6572" PostHistoryTypeId="1" PostId="1770" RevisionGUID="8d524b5d-102d-470b-a2cc-85ab32181086" CreationDate="2022-04-09T15:01:11.343" UserId="1806" Text="Rust Substrate clients - `subxt` and `substrate-api-client` how do they differ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6573" PostHistoryTypeId="3" PostId="1770" RevisionGUID="8d524b5d-102d-470b-a2cc-85ab32181086" CreationDate="2022-04-09T15:01:11.343" UserId="1806" Text="|rust|rpc|subxt|client|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6574" PostHistoryTypeId="4" PostId="1770" RevisionGUID="e233117b-bdc8-41ec-ba9e-237bd31d5553" CreationDate="2022-04-09T15:04:11.773" UserId="128" Comment="edited title" Text="Substrate client libraries in Rust - `subxt` and `substrate-api-client` how do they differ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6575" PostHistoryTypeId="4" PostId="1770" RevisionGUID="e0c79b46-7485-453c-bb1f-c66e84758b33" CreationDate="2022-04-09T15:07:30.597" UserId="1806" Comment="edited title" Text="Rust client libraries - `subxt` and `substrate-api-client` how do they differ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6576" PostHistoryTypeId="4" PostId="1761" RevisionGUID="4242ddbd-d729-48c3-954e-093de4dc2050" CreationDate="2022-04-09T16:21:31.210" UserId="128" Comment="edited title" Text="Are Parathreads fully functional on Kusama?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6577" PostHistoryTypeId="5" PostId="1761" RevisionGUID="4242ddbd-d729-48c3-954e-093de4dc2050" CreationDate="2022-04-09T16:21:31.210" UserId="128" Comment="edited title" Text="I was told that after parachains, one of the next steps is parathreads, where can I find information about parathreads estimated release date on Kusama?&#xD;&#xA;&#xD;&#xA;PS: I read the following on Reddit: &#xD;&#xA;&gt; Well parathread cannot send state transition proofs for Relay Chain validators for now I think. So yes, they exists, because before becoming a parachain, the previous stage is being a parathread, but they cannot do anything&#xD;&#xA;&#xD;&#xA;Does this mean they exist but they are not functional yet? When can we expect fully functional parathreads on Kusama?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6578" PostHistoryTypeId="5" PostId="1763" RevisionGUID="f7d0cf90-2ec6-4712-ae4b-6e4684f858f5" CreationDate="2022-04-09T16:30:47.250" UserId="128" Comment="Fix typos and grammar." Text="I ran a Polkadot node from my VPS:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;--alice \&#xD;&#xA;--validator \&#xD;&#xA;--base-path /tmp/relay/alice \&#xD;&#xA;--chain rococo-custom-2-raw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9944&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it's not working in the polkadot-js UI when using this address:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;wss://mydomain.com:9944&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I use `wss` because for `https` the browser(chrome) just said:&#xD;&#xA;&#xD;&#xA;&quot;Waiting to make a connection to the remote endpoint and finishing API initialization.&quot;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6579" PostHistoryTypeId="4" PostId="1748" RevisionGUID="10677cbb-33f2-45d0-8762-36b941968f6b" CreationDate="2022-04-09T16:32:44.703" UserId="128" Comment="edited title" Text="When does sync say yes on polkadot-js UI?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6580" PostHistoryTypeId="5" PostId="1748" RevisionGUID="022537fb-4d56-4221-9c01-6997f26a7711" CreationDate="2022-04-09T16:49:45.747" UserId="128" Comment="edited body" Text="[![polkadot UI][1]][1]&#xD;&#xA;&#xD;&#xA;This maybe a trivial question: &#xD;&#xA;&#xD;&#xA;As you can see here this is my local node that imports some 300 blocks and I was expecting this syncing to say `yes` instead of `no`. When does it say yes?  I am running with `pruning=archive` and also tried running with `prunig=1000` to see if it made a difference but it didn't.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/MRDjm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6581" PostHistoryTypeId="2" PostId="1771" RevisionGUID="45558576-c686-4b7e-9ed7-d8fd92e4ee5f" CreationDate="2022-04-09T16:51:53.237" UserId="2136" Text="I have a Storage Map which I am using to to store structs and a Storage Value to use for indexing this:&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn consequences)]&#xD;&#xA;    /// Storage map holding basic Consequence information&#xD;&#xA;    pub(super) type Consequences&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, ConsequenceIndex, ConsequenceInfoOf&lt;T&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn consequence_count)]&#xD;&#xA;    /// Storage value holding the number of existing Consequences (including the Purpose)&#xD;&#xA;    pub(super) type ConsequenceCount&lt;T: Config&gt; = StorageValue&lt;_, ConsequenceIndex, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;So far so good.&#xD;&#xA;&#xD;&#xA;Now I need to create child-parent relationships between my `Consequences`. To do this I am using a pair of child tries for each `Consequence`, one to hold the parents of the `Consequence` and another to hold the children of the `Consequence`. The idea being that I can then search either way. I've created some helper functions to achieve this:&#xD;&#xA;&#xD;&#xA;    /// Find the ID of the child trie containing a Consequence's Children&#xD;&#xA;    ///&#xD;&#xA;    /// Each Consequence stores its Children in a child trie&#xD;&#xA;    /// This helper function calculates the id of the associated child trie.&#xD;&#xA;    fn children_trie_id_from_index(index: ConsequenceIndex) -&gt; child::ChildInfo {&#xD;&#xA;    	let mut buf = Vec::new();&#xD;&#xA;    	buf.extend_from_slice(b&quot;consequencechildren&quot;);&#xD;&#xA;    	buf.extend_from_slice(&amp;index.to_le_bytes()[..]);&#xD;&#xA;    &#xD;&#xA;    	child::ChildInfo::new_default(T::Hashing::hash(&amp;buf[..]).as_ref())&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Find the ID of the child trie containing a Consequence's Parents&#xD;&#xA;    ///&#xD;&#xA;    /// Each Consequence stores its Parents in a child trie&#xD;&#xA;    /// This helper function calculates the id of the associated child trie.&#xD;&#xA;    fn parents_trie_id_from_index(index: ConsequenceIndex) -&gt; child::ChildInfo {&#xD;&#xA;    	let mut buf = Vec::new();&#xD;&#xA;    	buf.extend_from_slice(b&quot;consequenceparents&quot;);&#xD;&#xA;    	buf.extend_from_slice(&amp;index.to_le_bytes()[..]);&#xD;&#xA;    &#xD;&#xA;    	child::ChildInfo::new_default(T::Hashing::hash(&amp;buf[..]).as_ref())&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Add a parent-child relationship between two Consequences&#xD;&#xA;    ///&#xD;&#xA;    /// All relationships should be added by this function to avoid corruption of data&#xD;&#xA;    fn add_consequence_relationship(parent_consequence: ConsequenceIndex,&#xD;&#xA;    	child_consequence: ConsequenceIndex,&#xD;&#xA;    ) {&#xD;&#xA;    	// Add the child to the Parent's list of Children &#xD;&#xA;    	let parent_children = Self::children_trie_id_from_index(parent_consequence);&#xD;&#xA;    	child_consequence.using_encoded(|b| child::put(&amp;parent_children, b, &amp;true));&#xD;&#xA;    	// Add the parent to the Child's list of Children &#xD;&#xA;    	let child_parents = Self::parents_trie_id_from_index(child_consequence);&#xD;&#xA;    	parent_consequence.using_encoded(|b| child::put(&amp;child_parents, b, &amp;true));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Again, so far so good.&#xD;&#xA;&#xD;&#xA;Now I need to iterate over my child tries and can't work out how to do it. Can anybody show me how to set up an iterator to go through each key of a child tier?&#xD;&#xA;&#xD;&#xA;(If anybody has any smarter ideas for managing the child-parent relationships between my `Consequences`, they would also be greatly received)&#xD;&#xA;&#xD;&#xA;Thanks in advance for any help&#xD;&#xA;&#xD;&#xA;Jonathan" ContentLicense="CC BY-SA 4.0" />
  <row Id="6583" PostHistoryTypeId="1" PostId="1771" RevisionGUID="45558576-c686-4b7e-9ed7-d8fd92e4ee5f" CreationDate="2022-04-09T16:51:53.237" UserId="2136" Text="Child Trie Iterators" ContentLicense="CC BY-SA 4.0" />
  <row Id="6584" PostHistoryTypeId="3" PostId="1771" RevisionGUID="45558576-c686-4b7e-9ed7-d8fd92e4ee5f" CreationDate="2022-04-09T16:51:53.237" UserId="2136" Text="|storage|child-trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6585" PostHistoryTypeId="5" PostId="1740" RevisionGUID="4524b054-5e6b-4fca-bf89-5c3781ee4318" CreationDate="2022-04-09T16:54:57.167" UserId="128" Comment="added 16 characters in body; edited title" Text="I'm trying to add a test case for my function which is extracting key from the local Keystore.&#xD;&#xA;&#xD;&#xA;This is how I'm creating an instance of a local Keystore and setting a key inside it in my test environment:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let keystore = LocalKeystore::in_memory();&#xD;&#xA;SyncCryptoStore::insert_unknown(&amp;keystore, KeyTypeId::try_from(&quot;test&quot;).unwrap(), &quot;test&quot;, public_key);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here the problem I'm facing is, I'm unable to extract the stored key from the keystone.&#xD;&#xA;This is how I'm extracting it:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;SyncCryptoStore::sr25519_public_keys(&amp;keystore, KeyTypeId::try_from(&quot;test&quot;).unwrap())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This function is returning an empty vector.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6586" PostHistoryTypeId="4" PostId="1740" RevisionGUID="4524b054-5e6b-4fca-bf89-5c3781ee4318" CreationDate="2022-04-09T16:54:57.167" UserId="128" Comment="added 16 characters in body; edited title" Text="How to test a local keystore?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6587" PostHistoryTypeId="5" PostId="1771" RevisionGUID="5884b130-b7be-4b19-bcf9-094b7b74382b" CreationDate="2022-04-09T17:09:19.657" UserId="128" Comment="Fix, code formatting, title and tags" Text="I have a Storage Map which I am using to to store structs and a Storage Value to use for indexing this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn consequences)]&#xD;&#xA;/// Storage map holding basic Consequence information&#xD;&#xA;pub(super) type Consequences&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, ConsequenceIndex, ConsequenceInfoOf&lt;T&gt;, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn consequence_count)]&#xD;&#xA;/// Storage value holding the number of existing Consequences (including the Purpose)&#xD;&#xA;pub(super) type ConsequenceCount&lt;T: Config&gt; = StorageValue&lt;_, ConsequenceIndex, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So far so good.&#xD;&#xA;&#xD;&#xA;Now I need to create child-parent relationships between my `Consequences`. To do this I am using a pair of child tries for each `Consequence`, one to hold the parents of the `Consequence` and another to hold the children of the `Consequence`. The idea being that I can then search either way. I've created some helper functions to achieve this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Find the ID of the child trie containing a Consequence's Children&#xD;&#xA;///&#xD;&#xA;/// Each Consequence stores its Children in a child trie&#xD;&#xA;/// This helper function calculates the id of the associated child trie.&#xD;&#xA;fn children_trie_id_from_index(index: ConsequenceIndex) -&gt; child::ChildInfo {&#xD;&#xA;	let mut buf = Vec::new();&#xD;&#xA;	buf.extend_from_slice(b&quot;consequencechildren&quot;);&#xD;&#xA;	buf.extend_from_slice(&amp;index.to_le_bytes()[..]);&#xD;&#xA;&#xD;&#xA;	child::ChildInfo::new_default(T::Hashing::hash(&amp;buf[..]).as_ref())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Find the ID of the child trie containing a Consequence's Parents&#xD;&#xA;///&#xD;&#xA;/// Each Consequence stores its Parents in a child trie&#xD;&#xA;/// This helper function calculates the id of the associated child trie.&#xD;&#xA;fn parents_trie_id_from_index(index: ConsequenceIndex) -&gt; child::ChildInfo {&#xD;&#xA;	let mut buf = Vec::new();&#xD;&#xA;	buf.extend_from_slice(b&quot;consequenceparents&quot;);&#xD;&#xA;	buf.extend_from_slice(&amp;index.to_le_bytes()[..]);&#xD;&#xA;&#xD;&#xA;	child::ChildInfo::new_default(T::Hashing::hash(&amp;buf[..]).as_ref())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Add a parent-child relationship between two Consequences&#xD;&#xA;///&#xD;&#xA;/// All relationships should be added by this function to avoid corruption of data&#xD;&#xA;fn add_consequence_relationship(parent_consequence: ConsequenceIndex,&#xD;&#xA;	child_consequence: ConsequenceIndex,&#xD;&#xA;) {&#xD;&#xA;	// Add the child to the Parent's list of Children &#xD;&#xA;	let parent_children = Self::children_trie_id_from_index(parent_consequence);&#xD;&#xA;	child_consequence.using_encoded(|b| child::put(&amp;parent_children, b, &amp;true));&#xD;&#xA;	// Add the parent to the Child's list of Children &#xD;&#xA;	let child_parents = Self::parents_trie_id_from_index(child_consequence);&#xD;&#xA;	parent_consequence.using_encoded(|b| child::put(&amp;child_parents, b, &amp;true));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Again, so far so good.&#xD;&#xA;&#xD;&#xA;Now I need to iterate over my child tries and can't work out how to do it. Can anybody show me how to set up an iterator to go through each key of a child tier?&#xD;&#xA;&#xD;&#xA;P.S. If anybody has any smarter ideas for managing the child-parent relationships between my `Consequences`, they would also be greatly received." ContentLicense="CC BY-SA 4.0" />
  <row Id="6588" PostHistoryTypeId="4" PostId="1771" RevisionGUID="5884b130-b7be-4b19-bcf9-094b7b74382b" CreationDate="2022-04-09T17:09:19.657" UserId="128" Comment="Fix, code formatting, title and tags" Text="How to create an iterator for a child storage trie?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6589" PostHistoryTypeId="6" PostId="1771" RevisionGUID="5884b130-b7be-4b19-bcf9-094b7b74382b" CreationDate="2022-04-09T17:09:19.657" UserId="128" Comment="Fix, code formatting, title and tags" Text="|storage|rust|trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6590" PostHistoryTypeId="5" PostId="1760" RevisionGUID="8b23b96f-1731-4759-b392-60720c384dd0" CreationDate="2022-04-09T17:15:59.113" UserId="128" Comment="Fix code formatting" Text="Hi I was following the beginner's tutorial here: https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/&#xD;&#xA;&#xD;&#xA;When I get to cargo build --release I get the following error: &#xD;&#xA;```sh&#xD;&#xA;thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)',&#xD;&#xA;/home/hidden-username/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.4.3+5.2.1-patched.2/build.rs:334:19&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm running Windows 10 but operating my node on a WSL `lsb_release`.&#xD;&#xA;&#xD;&#xA;Ubuntu 20.04.4 LTS (focal)&#xD;&#xA;&#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    nightly-x86_64-unknown-linux-gnu&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    rustc 1.60.0 (7737e0b5c 2022-04-04)&#xD;&#xA;&#xD;&#xA;I ran a full Backtrace, if anyone cares to take a look:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)', /home/user-name/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.4.3+5.2.1-patched.2/build.rs:334:19&#xD;&#xA;stack backtrace:&#xD;&#xA;   0:     0x7f8453e871ad - std::backtrace_rs::backtrace::libunwind::trace::hee598835bc88d35b&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5&#xD;&#xA;   1:     0x7f8453e871ad - std::backtrace_rs::backtrace::trace_unsynchronized::h9cdc730ba5cf5d72&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5&#xD;&#xA;   2:     0x7f8453e871ad - std::sys_common::backtrace::_print_fmt::h75aeaf7ed30e43fa&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5&#xD;&#xA;   3:     0x7f8453e871ad - &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt::h606862f787600875&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22&#xD;&#xA;   4:     0x7f8453eaa37c - core::fmt::write::he803f0f418caf762&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17&#xD;&#xA;   5:     0x7f8453e827c8 - std::io::Write::write_fmt::h70bc45872f37e7bb&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15&#xD;&#xA;   6:     0x7f8453e89487 - std::sys_common::backtrace::_print::h64d038cf8ac3e13e&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5&#xD;&#xA;   7:     0x7f8453e89487 - std::sys_common::backtrace::print::h359300b4a7fccf65&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9&#xD;&#xA;   8:     0x7f8453e89487 - std::panicking::default_hook::{{closure}}::hf51be35e2f510149&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22&#xD;&#xA;   9:     0x7f8453e89150 - std::panicking::default_hook::h03ca0f22e1d2d25e&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9&#xD;&#xA;  10:     0x7f8453e89bd9 - std::panicking::rust_panic_with_hook::h3b7380e99b825b63&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:698:17&#xD;&#xA;  11:     0x7f8453e898c7 - std::panicking::begin_panic_handler::{{closure}}::h8e849d0710154ce0&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13&#xD;&#xA;  12:     0x7f8453e87674 - std::sys_common::backtrace::__rust_end_short_backtrace::hedcdaddbd4c46cc5&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;  13:     0x7f8453e895d9 - rust_begin_unwind&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5&#xD;&#xA;  14:     0x7f8453e09493 - core::panicking::panic_fmt::he1bbc7336d49a357&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14&#xD;&#xA;  15:     0x7f8453e0e179 - build_script_build::execute::h343d6afa2e0ceef7&#xD;&#xA;  16:     0x7f8453e0df86 - build_script_build::run::h77c5c3d9911c5b0d&#xD;&#xA;  17:     0x7f8453e0cc93 - build_script_build::main::h58a32d56a136094c&#xD;&#xA;  18:     0x7f8453e11cd3 - core::ops::function::FnOnce::call_once::hbbb738d0cd945cf7&#xD;&#xA;  19:     0x7f8453e11a69 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf9dce89d7f8aca0b&#xD;&#xA;  20:     0x7f8453e11a39 - std::rt::lang_start::{{closure}}::h5e39e3c0ddde7c39&#xD;&#xA;  21:     0x7f8453e86891 - core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once::hb7014f43484a8b4e&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:259:13&#xD;&#xA;  22:     0x7f8453e86891 - std::panicking::try::do_call::h7bc9dc436daeb8c7&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40&#xD;&#xA;  23:     0x7f8453e86891 - std::panicking::try::h653d68a27ff5f175&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19&#xD;&#xA;  24:     0x7f8453e86891 - std::panic::catch_unwind::h9d739f9f59895e68&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14&#xD;&#xA;  25:     0x7f8453e86891 - std::rt::lang_start_internal::{{closure}}::hf006f2bc7ce22bbe&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:48&#xD;&#xA;  26:     0x7f8453e86891 - std::panicking::try::do_call::hfb39d6df61a2e69f&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40&#xD;&#xA;  27:     0x7f8453e86891 - std::panicking::try::h13e2d225134958ac&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19&#xD;&#xA;  28:     0x7f8453e86891 - std::panic::catch_unwind::h3bd49b5a5dfb1a50&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14&#xD;&#xA;  29:     0x7f8453e86891 - std::rt::lang_start_internal::h2ba92edce36c035e&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:20&#xD;&#xA;  30:     0x7f8453e11a21 - std::rt::lang_start::hc141b7822a458dac&#xD;&#xA;  31:     0x7f8453e0ea53 - main&#xD;&#xA;  32:     0x7f8453b940b3 - __libc_start_main&#xD;&#xA;  33:     0x7f8453e09c6e - _start&#xD;&#xA;  34:                0x0 - &lt;unknown&gt;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6591" PostHistoryTypeId="4" PostId="1770" RevisionGUID="bc856f05-1278-419d-8daa-aa4edb78b4a7" CreationDate="2022-04-09T17:24:47.210" UserId="1806" Comment="edited title" Text="How do `subxt` and `substrate-api-client` libraries differ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6592" PostHistoryTypeId="5" PostId="793" RevisionGUID="a3e81ab6-a9c2-4140-8d5b-9e472325cc3b" CreationDate="2022-04-09T17:30:38.717" UserId="128" Comment="Fix grammar and code formatting" Text="I'm trying to bind a H160 address with a H256 address, if we &#xD;&#xA;assume this function:&#xD;&#xA;```rust&#xD;&#xA;fn bind(origin: OriginFor&lt;T&gt;, address: H160 , signature: [u8; 130]) -&gt; Result&lt;(), Error&lt;T&gt;&gt;{&#xD;&#xA;    // check the signature belonging to an address&#xD;&#xA;    ensure!(check_signature(address, signature), Error&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;    // bind the sender with the address&#xD;&#xA;    create_account(sender, address);&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is this function available in Substrate? Or do you have any advice on how to do the bind function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6593" PostHistoryTypeId="4" PostId="793" RevisionGUID="a3e81ab6-a9c2-4140-8d5b-9e472325cc3b" CreationDate="2022-04-09T17:30:38.717" UserId="128" Comment="Fix grammar and code formatting" Text="How to bind an Ethereum H160 address with a Substrate H256 address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6598" PostHistoryTypeId="5" PostId="1752" RevisionGUID="eb9b9db7-0bd3-474f-9be5-a639d11ab8f0" CreationDate="2022-04-09T17:34:17.590" UserId="128" Comment="added 6 characters in body; edited title" Text="How can I convert a Substrate address to an Etherum address?&#xD;&#xA;&#xD;&#xA;There is an EVM to substrate address conversion that Edgeware provides: https://edgewa.re/keygen" ContentLicense="CC BY-SA 4.0" />
  <row Id="6599" PostHistoryTypeId="4" PostId="1752" RevisionGUID="eb9b9db7-0bd3-474f-9be5-a639d11ab8f0" CreationDate="2022-04-09T17:34:17.590" UserId="128" Comment="added 6 characters in body; edited title" Text="How to convert a Substrate address to an Etherum address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6602" PostHistoryTypeId="2" PostId="1773" RevisionGUID="5c126d32-3203-4142-b93b-b327a15e13a4" CreationDate="2022-04-09T21:41:41.110" UserId="245" Text="I was questioning this for a while. Having parachains are generally good for security and the ecosystem. &#xD;&#xA;&#xD;&#xA;As seen in the [*Polkadot whitepaper*][1], 2nd order Relay-chain is mentioned.&#xD;&#xA;&#xD;&#xA;[![Polkadot whitepaper][2]][2]&#xD;&#xA;&#xD;&#xA;I believe it is not possible since I haven't seen any example of it or a chain that does this. &#xD;&#xA;&#xD;&#xA;So, I have a few questions about this implementation.&#xD;&#xA;&#xD;&#xA; - What are the drawbacks?&#xD;&#xA; - Parachains don't have block finalization, it's being done in the relay chain. Would adding a 2nd order Relay-chain with block finalization be possible at all?&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/PolkaDotPaper.pdf&#xD;&#xA;  [2]: https://i.stack.imgur.com/EViBm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6604" PostHistoryTypeId="1" PostId="1773" RevisionGUID="5c126d32-3203-4142-b93b-b327a15e13a4" CreationDate="2022-04-09T21:41:41.110" UserId="245" Text="Is it possible to add 2nd order Relay-chain to Relay-chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="6605" PostHistoryTypeId="3" PostId="1773" RevisionGUID="5c126d32-3203-4142-b93b-b327a15e13a4" CreationDate="2022-04-09T21:41:41.110" UserId="245" Text="|polkadot|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6606" PostHistoryTypeId="5" PostId="1760" RevisionGUID="e0b46365-20a7-4d8b-877f-c18194baa5e6" CreationDate="2022-04-09T21:47:34.740" UserId="128" Comment="deleted 3 characters in body" Text="I was following the beginner's tutorial here: https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/&#xD;&#xA;&#xD;&#xA;When I get to cargo build --release I get the following error: &#xD;&#xA;```sh&#xD;&#xA;thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)',&#xD;&#xA;/home/hidden-username/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.4.3+5.2.1-patched.2/build.rs:334:19&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm running Windows 10 but operating my node on a WSL `lsb_release`.&#xD;&#xA;&#xD;&#xA;Ubuntu 20.04.4 LTS (focal)&#xD;&#xA;&#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    nightly-x86_64-unknown-linux-gnu&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    rustc 1.60.0 (7737e0b5c 2022-04-04)&#xD;&#xA;&#xD;&#xA;I ran a full Backtrace, if anyone cares to take a look:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)', /home/user-name/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.4.3+5.2.1-patched.2/build.rs:334:19&#xD;&#xA;stack backtrace:&#xD;&#xA;   0:     0x7f8453e871ad - std::backtrace_rs::backtrace::libunwind::trace::hee598835bc88d35b&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5&#xD;&#xA;   1:     0x7f8453e871ad - std::backtrace_rs::backtrace::trace_unsynchronized::h9cdc730ba5cf5d72&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5&#xD;&#xA;   2:     0x7f8453e871ad - std::sys_common::backtrace::_print_fmt::h75aeaf7ed30e43fa&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5&#xD;&#xA;   3:     0x7f8453e871ad - &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt::h606862f787600875&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22&#xD;&#xA;   4:     0x7f8453eaa37c - core::fmt::write::he803f0f418caf762&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17&#xD;&#xA;   5:     0x7f8453e827c8 - std::io::Write::write_fmt::h70bc45872f37e7bb&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15&#xD;&#xA;   6:     0x7f8453e89487 - std::sys_common::backtrace::_print::h64d038cf8ac3e13e&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5&#xD;&#xA;   7:     0x7f8453e89487 - std::sys_common::backtrace::print::h359300b4a7fccf65&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9&#xD;&#xA;   8:     0x7f8453e89487 - std::panicking::default_hook::{{closure}}::hf51be35e2f510149&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22&#xD;&#xA;   9:     0x7f8453e89150 - std::panicking::default_hook::h03ca0f22e1d2d25e&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9&#xD;&#xA;  10:     0x7f8453e89bd9 - std::panicking::rust_panic_with_hook::h3b7380e99b825b63&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:698:17&#xD;&#xA;  11:     0x7f8453e898c7 - std::panicking::begin_panic_handler::{{closure}}::h8e849d0710154ce0&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13&#xD;&#xA;  12:     0x7f8453e87674 - std::sys_common::backtrace::__rust_end_short_backtrace::hedcdaddbd4c46cc5&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;  13:     0x7f8453e895d9 - rust_begin_unwind&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5&#xD;&#xA;  14:     0x7f8453e09493 - core::panicking::panic_fmt::he1bbc7336d49a357&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14&#xD;&#xA;  15:     0x7f8453e0e179 - build_script_build::execute::h343d6afa2e0ceef7&#xD;&#xA;  16:     0x7f8453e0df86 - build_script_build::run::h77c5c3d9911c5b0d&#xD;&#xA;  17:     0x7f8453e0cc93 - build_script_build::main::h58a32d56a136094c&#xD;&#xA;  18:     0x7f8453e11cd3 - core::ops::function::FnOnce::call_once::hbbb738d0cd945cf7&#xD;&#xA;  19:     0x7f8453e11a69 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf9dce89d7f8aca0b&#xD;&#xA;  20:     0x7f8453e11a39 - std::rt::lang_start::{{closure}}::h5e39e3c0ddde7c39&#xD;&#xA;  21:     0x7f8453e86891 - core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once::hb7014f43484a8b4e&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:259:13&#xD;&#xA;  22:     0x7f8453e86891 - std::panicking::try::do_call::h7bc9dc436daeb8c7&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40&#xD;&#xA;  23:     0x7f8453e86891 - std::panicking::try::h653d68a27ff5f175&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19&#xD;&#xA;  24:     0x7f8453e86891 - std::panic::catch_unwind::h9d739f9f59895e68&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14&#xD;&#xA;  25:     0x7f8453e86891 - std::rt::lang_start_internal::{{closure}}::hf006f2bc7ce22bbe&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:48&#xD;&#xA;  26:     0x7f8453e86891 - std::panicking::try::do_call::hfb39d6df61a2e69f&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40&#xD;&#xA;  27:     0x7f8453e86891 - std::panicking::try::h13e2d225134958ac&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19&#xD;&#xA;  28:     0x7f8453e86891 - std::panic::catch_unwind::h3bd49b5a5dfb1a50&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14&#xD;&#xA;  29:     0x7f8453e86891 - std::rt::lang_start_internal::h2ba92edce36c035e&#xD;&#xA;                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:20&#xD;&#xA;  30:     0x7f8453e11a21 - std::rt::lang_start::hc141b7822a458dac&#xD;&#xA;  31:     0x7f8453e0ea53 - main&#xD;&#xA;  32:     0x7f8453b940b3 - __libc_start_main&#xD;&#xA;  33:     0x7f8453e09c6e - _start&#xD;&#xA;  34:                0x0 - &lt;unknown&gt;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6607" PostHistoryTypeId="2" PostId="1774" RevisionGUID="02e72750-526a-405f-b4e7-f156f8b7f242" CreationDate="2022-04-09T23:34:21.720" UserId="587" Text="I have an extrinsic with multiple calls to other pallet functions. As it calls other internal functions, more than one of them access the same storage value (either an actual `StorageValue` or the same key in a `StorageMap`).&#xD;&#xA;&#xD;&#xA;Will this add to the total weight of the extrinsic, i.e., is there an additional cost to reading a storage value more than once? Should I refactor my code to read the storage value once and pass it around to avoid re-reading it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6609" PostHistoryTypeId="1" PostId="1774" RevisionGUID="02e72750-526a-405f-b4e7-f156f8b7f242" CreationDate="2022-04-09T23:34:21.720" UserId="587" Text="Do repeated reads of the same storage value add to the total weight?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6610" PostHistoryTypeId="3" PostId="1774" RevisionGUID="02e72750-526a-405f-b4e7-f156f8b7f242" CreationDate="2022-04-09T23:34:21.720" UserId="587" Text="|pallet|storage|frame|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6611" PostHistoryTypeId="2" PostId="1775" RevisionGUID="5c531ff9-4c73-4ff1-a7f6-e156f81258bc" CreationDate="2022-04-10T00:09:21.373" UserId="34" Text="I think you are misunderstanding the mechanism of rewards for participants in a crowdloan that exist on your parachain and the slot auctions and crowdloans that exist on the relay chain. &#xD;&#xA;&#xD;&#xA;Relay chains has the slot mechanisms, including the crowdloan pallet in its' runtime, that is actually implemented alongside the relay chain runtimes here: https://github.com/paritytech/polkadot/tree/master/runtime/common/src&#xD;&#xA;&#xD;&#xA;Parachains _may_ implement other logic that looks at the state of the relay chain for information they then map to something on their parachain. Up to them and their community to decide." ContentLicense="CC BY-SA 4.0" />
  <row Id="6613" PostHistoryTypeId="2" PostId="1776" RevisionGUID="5ce8cc78-05a0-43e9-a49e-36acfc7341a7" CreationDate="2022-04-10T04:25:44.973" UserId="299" Text="`experimental environment: m1 pro macbook`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;when I want send more transactions.&#xD;&#xA;the code will report this to me:&#xD;&#xA;```&#xD;&#xA; RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1014: Priority is too low: (12562 vs 12562): The transaction has too low priority to replace another transaction already in the pool.&#xD;&#xA;2022-04-09 23:44:45             DRR: 1014: Priority is too low: (12562 vs 12562): The transaction has too low priority to replace another transaction already in the pool.&#xD;&#xA;2022-04-09 23:44:45        RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1014: Priority is too low: (12562 vs 12562): The transaction has too low priority to replace another transaction already in the pool.&#xD;&#xA;```&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/162581292-d45a3713-8305-4558-93b2-da716bd047da.png)&#xD;&#xA;----&#xD;&#xA;**My solution to this is to start multiple dockers and repeat the script.**&#xD;&#xA;but I found that I could not connect over the `IP(like 192.168.xxx.xxx)` of the `LAN`.&#xD;&#xA;Parallel chains can only be connected through `127.0.0.1`.(Even localhost is not supported).&#xD;&#xA;this is my parachain start command.&#xD;&#xA;```shell&#xD;&#xA;./target/release/dorafactory-node \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain dora-roc-testnet.json \&#xD;&#xA;--base-path /tmp/parachain/alice --log=info,xcm=trace,xcm-executor=trace \&#xD;&#xA;--port 40334 \&#xD;&#xA;--ws-port 8845 --ws-external --rpc-external --rpc-methods=unsafe --prometheus-port 9777 --prometheus-external \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain rococo-local-cfde.json \&#xD;&#xA;--port 30344 \&#xD;&#xA;--ws-port 9978&#xD;&#xA;```&#xD;&#xA;and this my `hosts`:&#xD;&#xA;```&#xD;&#xA;##&#xD;&#xA;# Host Database&#xD;&#xA;#&#xD;&#xA;# localhost is used to configure the loopback interface&#xD;&#xA;# when the system is booting.  Do not change this entry.&#xD;&#xA;##&#xD;&#xA;127.0.0.1	localhost&#xD;&#xA;```&#xD;&#xA;this is my LAN ip:&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/162581605-e361fc42-884f-422f-8a19-a02b585ebde4.png)&#xD;&#xA;&#xD;&#xA;this is my js-script error report:&#xD;&#xA;&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/162581615-38006524-f199-4045-9dca-bc3212f58307.png)&#xD;&#xA;![image](https://user-images.githubusercontent.com/45918704/162581633-ed0e7594-f49d-4e1d-94ed-bf5f864dd34d.png)&#xD;&#xA;&#xD;&#xA;this is my `WEB_SOCKET` on my `js-script`:&#xD;&#xA;```javascript&#xD;&#xA;const { ApiPromise, WsProvider, Keyring } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;const WEB_SOCKET = 'ws://192.168.1.4:8845';&#xD;&#xA;const wsProvider = new WsProvider(WEB_SOCKET);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6615" PostHistoryTypeId="1" PostId="1776" RevisionGUID="5ce8cc78-05a0-43e9-a49e-36acfc7341a7" CreationDate="2022-04-10T04:25:44.973" UserId="299" Text="How to use `polkadot-api` to send multiple transactions simultaneously?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6616" PostHistoryTypeId="3" PostId="1776" RevisionGUID="5ce8cc78-05a0-43e9-a49e-36acfc7341a7" CreationDate="2022-04-10T04:25:44.973" UserId="299" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6617" PostHistoryTypeId="10" PostId="1760" RevisionGUID="a3f50066-8408-4619-b6e9-4554de34f0c0" CreationDate="2022-04-10T06:07:44.510" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[1454],&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="6618" PostHistoryTypeId="2" PostId="1777" RevisionGUID="6fac77b8-bbd2-41a3-8610-91bce2a8a760" CreationDate="2022-04-10T06:23:14.440" UserId="1768" Text="I am not able to compile Substrate v0.9.17 on Rust version 1.60.0 stable. I am getting the following compilation error. It was working before I did `rustup update`. I missed recording which Rust version I was using when it was working.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /Users/gautham/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.6/src/lib.rs:235:9&#xD;&#xA;      |&#xD;&#xA;  235 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  236 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  237 | |                         For more information see: \&#xD;&#xA;  238 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /Users/gautham/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.6/src/lib.rs:262:5&#xD;&#xA;      |&#xD;&#xA;  262 |     imp::getrandom_inner(dest)&#xD;&#xA;      |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0433`.&#xD;&#xA;  error: could not compile `getrandom` due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6620" PostHistoryTypeId="1" PostId="1777" RevisionGUID="6fac77b8-bbd2-41a3-8610-91bce2a8a760" CreationDate="2022-04-10T06:23:14.440" UserId="1768" Text="Unable to compile Substrate v0.9.17 on Rust v1.60.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6621" PostHistoryTypeId="3" PostId="1777" RevisionGUID="6fac77b8-bbd2-41a3-8610-91bce2a8a760" CreationDate="2022-04-10T06:23:14.440" UserId="1768" Text="|substrate-node|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6622" PostHistoryTypeId="2" PostId="1778" RevisionGUID="0e4105a7-e965-4a9f-b77b-82e58c1346ed" CreationDate="2022-04-10T06:28:52.230" UserId="2132" Text="The [polkadot-js api cookbook](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-take-the-pending-tx-pool-into-account-in-my-nonce) has an example of this, which uses the `system.accountNextIndex` rpc.&#xD;&#xA;&#xD;&#xA;Overall you have a couple of options -&#xD;&#xA;&#xD;&#xA; 1. Pass the nonce in as `-1`, which will use the above RPC to check against the pool (the docs example above)&#xD;&#xA; 2. Query the nonce before sending, and then manually increment on each transaction (passing it through via `nonce: ...`)&#xD;&#xA;&#xD;&#xA;Example of the first (as detailed in the above link) -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;for (let i = 0; i &lt; 10; i++) {&#xD;&#xA;  const txhash = await api.tx.balances&#xD;&#xA;    .transfer(recipient, 123)&#xD;&#xA;    .signAndSend(sender, { nonce: -1 })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Example of the second approach, manually incrementing -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// or get it via system.account, not taking the txpool into account&#xD;&#xA;let nonce = await api.rpc.system.accountNextIndex(sender)&#xD;&#xA;&#xD;&#xA;for (let i = 0; i &lt; 10; i++) {&#xD;&#xA;  const txhash = await api.tx.balances&#xD;&#xA;    .transfer(recipient, 123)&#xD;&#xA;    .signAndSend(sender, { nonce })&#xD;&#xA;  nonce = nonce.addn(1)&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6624" PostHistoryTypeId="2" PostId="1779" RevisionGUID="575474d4-38fb-48ca-9d7f-7e12568208bf" CreationDate="2022-04-10T06:56:59.343" UserId="1768" Text="I found that using this specific Rust version, `nightly-2022-01-01` allows me to compile it without any change in the codebase." ContentLicense="CC BY-SA 4.0" />
  <row Id="6626" PostHistoryTypeId="2" PostId="1780" RevisionGUID="7ab9960d-e652-420b-99e2-60009f46a016" CreationDate="2022-04-10T06:59:07.637" UserId="85" Text="My understanding is that if your reading the same value multiple times in the same transaction then the read should be cached and you only pay for it once in weight. I think the same is true if you write to the same location multiple times in a transaction - it would only save the last write (and only charge you for one write)." ContentLicense="CC BY-SA 4.0" />
  <row Id="6628" PostHistoryTypeId="2" PostId="1781" RevisionGUID="e6fc1991-99d2-40eb-9d53-9c7202517ad7" CreationDate="2022-04-10T07:49:01.097" UserId="2200" Text="I'm interested in systems where transaction fees can be paid for from a fund so that the end users don't have to deal with the chain's native token.&#xD;&#xA;&#xD;&#xA;This is what I've found so far: https://github.com/shawntabrizi/substrate-feeless-token-factory Looks super helpful, but I still want to double check if there's anything more.&#xD;&#xA;&#xD;&#xA;Is there more writing on the topic? In particular, does any chain use something like that successfully?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6630" PostHistoryTypeId="1" PostId="1781" RevisionGUID="e6fc1991-99d2-40eb-9d53-9c7202517ad7" CreationDate="2022-04-10T07:49:01.097" UserId="2200" Text="Transaction fee paying fund" ContentLicense="CC BY-SA 4.0" />
  <row Id="6631" PostHistoryTypeId="3" PostId="1781" RevisionGUID="e6fc1991-99d2-40eb-9d53-9c7202517ad7" CreationDate="2022-04-10T07:49:01.097" UserId="2200" Text="|pallet|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6632" PostHistoryTypeId="2" PostId="1782" RevisionGUID="0739c38d-6c57-409c-bdde-0a1319f27097" CreationDate="2022-04-10T08:33:18.703" UserId="338" Text="I am having this issue of an error when transacting on my custom Setheum substrate Node. `ERROR: balances.transferKeepAlive -32602: Invalid params: UnknownVersion.`. Does it have anything to do with changing my `SS58Prefix` to SOMETHING LIKE `204`? or not, because it seems to still show up even after changing my `SS58Prefix` TO `42`. I have no other idea how this Error is rooted. The repo is dependent on the `polkadot-v0.9.10 substrate branch`, it is here: https://github.com/Setheum-Labs/Setheum. &#xD;&#xA;&#xD;&#xA;Steps to replicate:&#xD;&#xA;1. `make build &amp;&amp; make run`;&#xD;&#xA;2. send an amount using polkadot.js Apps from ALICE to BOB or any other dev account available;&#xD;&#xA;&#xD;&#xA;A similar report is here: https://matrix.to/#/!HzySYSaIhtyWrwiwEV:matrix.org/$163790241319597utjEp:matrix.org?via=matrix.parity.io&amp;via=corepaper.org&amp;via=matrix.org" ContentLicense="CC BY-SA 4.0" />
  <row Id="6634" PostHistoryTypeId="1" PostId="1782" RevisionGUID="0739c38d-6c57-409c-bdde-0a1319f27097" CreationDate="2022-04-10T08:33:18.703" UserId="338" Text="ERROR: balances.transferKeepAlive -32602: Invalid params: UnknownVersion" ContentLicense="CC BY-SA 4.0" />
  <row Id="6635" PostHistoryTypeId="3" PostId="1782" RevisionGUID="0739c38d-6c57-409c-bdde-0a1319f27097" CreationDate="2022-04-10T08:33:18.703" UserId="338" Text="|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6636" PostHistoryTypeId="5" PostId="1779" RevisionGUID="943943aa-36fa-45fd-a4b1-5dec40e076d4" CreationDate="2022-04-10T09:19:20.893" UserId="1768" Comment="added 246 characters in body" Text="I found that using this specific Rust version, `nightly-2022-01-01` allows me to compile it without any change in the codebase.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT&#xD;&#xA;&#xD;&#xA;As shared by bkchr in the comments the issue is [fixed upstream][1] and can be resolved by fetching the latest version of substrate.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/commit/4bc2af13cd81007a2a340d0333062179420d5daf" ContentLicense="CC BY-SA 4.0" />
  <row Id="6637" PostHistoryTypeId="2" PostId="1783" RevisionGUID="07c25e40-1fb7-445b-969c-bc5510781657" CreationDate="2022-04-10T10:04:16.020" UserId="2228" Text="I need to prevent empty blocks from being added to my blockchain.&#xD;&#xA;&#xD;&#xA;This is for a very small scale chain, in which 99.99884% of blocks are empty, so not adding empty blocks will dramatically reduce the size of the chain.&#xD;&#xA;&#xD;&#xA;Simply increasing the block time doesn't solve this for me as the transactions still need to be finalized quickly.&#xD;&#xA;&#xD;&#xA;If there are no transactions, no blocks should be produced.&#xD;&#xA;&#xD;&#xA;I can't seem to find where I could do this. Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="6639" PostHistoryTypeId="1" PostId="1783" RevisionGUID="07c25e40-1fb7-445b-969c-bc5510781657" CreationDate="2022-04-10T10:04:16.020" UserId="2228" Text="How to reject empty blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6640" PostHistoryTypeId="3" PostId="1783" RevisionGUID="07c25e40-1fb7-445b-969c-bc5510781657" CreationDate="2022-04-10T10:04:16.020" UserId="2228" Text="|consensus|blockchain-size|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6641" PostHistoryTypeId="2" PostId="1784" RevisionGUID="f1fd94a9-6e12-46fc-ab67-d0e5ae6b16e7" CreationDate="2022-04-10T10:09:28.467" UserId="523" Text="AFAIK xcm applies only to substrate based chains with same/similar consensus, for ethereum or btc bridge you may consider different solutions mentioned [here](https://polkadot.network/blog/polkadot-bridges-connecting-the-polkadot-ecosystem-with-external-networks/)" ContentLicense="CC BY-SA 4.0" />
  <row Id="6643" PostHistoryTypeId="2" PostId="1785" RevisionGUID="bcf77828-c1d2-4112-b19b-16108c76887c" CreationDate="2022-04-10T11:19:32.157" UserId="338" Text="Yes the issue seems to be that I changed the `SS58Prefix` from the default substrate `42`. And the prefix I used is not registered in the [SS58_Registry](https://github.com/paritytech/ss58-registry).&#xD;&#xA;This means that to use a different/unique custom SS58Prefix, one needs to register it to the [SS58_Registry](https://github.com/paritytech/ss58-registry).&#xD;&#xA;&#xD;&#xA;My solution was validated in this [issue](https://github.com/Setheum-Labs/Setheum/issues/823)" ContentLicense="CC BY-SA 4.0" />
  <row Id="6645" PostHistoryTypeId="2" PostId="1786" RevisionGUID="a34d8563-970f-4f8d-9426-4a916e355bec" CreationDate="2022-04-10T11:55:09.687" UserId="213" Text="I am trying to implement custom rpc using the tutorial : &#xD;&#xA; https://substrate.recipes/custom-rpc.html, I successfully implemented silly rpc but getting error for runtime api rpc.&#xD;&#xA;&#xD;&#xA;Here are my code:&#xD;&#xA;template/rpc/src/lib.rs&#xD;&#xA;&#xD;&#xA;    use jsonrpc_core::{Error as RpcError, ErrorCode, Result};&#xD;&#xA;    use jsonrpc_derive::rpc;&#xD;&#xA;    use sp_api::ProvideRuntimeApi;&#xD;&#xA;    use sp_blockchain::HeaderBackend;&#xD;&#xA;    use sp_runtime::{generic::BlockId, traits::Block as BlockT};&#xD;&#xA;    use std::sync::Arc;&#xD;&#xA;    use shivarthu_runtime_api::ShivarthuApi as ShivarthuRuntimeApi;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[rpc]&#xD;&#xA;    pub trait ShivarthuApi&lt;BlockHash&gt; {&#xD;&#xA;    	#[rpc(name= &quot;shivarthu_helloWorld&quot;)]&#xD;&#xA;    	fn hello_world(&amp;self, at: Option&lt;BlockHash&gt;) -&gt; Result&lt;u128&gt;;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    pub struct Shivarthu&lt;C, M&gt; {&#xD;&#xA;    	client: Arc&lt;C&gt;,&#xD;&#xA;    	_marker: std::marker::PhantomData&lt;M&gt;,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;C, M&gt; Shivarthu&lt;C, M&gt; {&#xD;&#xA;    	pub fn new(client: Arc&lt;C&gt;) -&gt; Self {&#xD;&#xA;    		Self {&#xD;&#xA;    			client,&#xD;&#xA;    			_marker: Default::default(),&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    impl&lt;C, Block&gt; ShivarthuApi&lt;&lt;Block as BlockT&gt;::Hash&gt; for Shivarthu&lt;C, Block&gt;&#xD;&#xA;    where&#xD;&#xA;    	Block: BlockT,&#xD;&#xA;    	C: Send + Sync + 'static,&#xD;&#xA;    	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;    	C: HeaderBackend&lt;Block&gt;,&#xD;&#xA;    	C::Api: ShivarthuRuntimeApi&lt;Block&gt;,&#xD;&#xA;    {&#xD;&#xA;    	fn hello_world(&amp;self, at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;) -&gt; Result&lt;u128&gt; {&#xD;&#xA;    		let api = self.client.runtime_api();&#xD;&#xA;    		let at = BlockId::hash(at.unwrap_or_else(||&#xD;&#xA;    			// If the block hash is not supplied assume the best block.&#xD;&#xA;    			self.client.info().best_hash));&#xD;&#xA;    &#xD;&#xA;    		let runtime_api_result = api.hello_world(&amp;at);&#xD;&#xA;    		runtime_api_result.map_err(|e| RpcError {&#xD;&#xA;    			code: ErrorCode::ServerError(9876), // No real reason for this value&#xD;&#xA;    			message: &quot;Something wrong&quot;.into(),&#xD;&#xA;    			data: Some(format!(&quot;{:?}&quot;, e).into()),&#xD;&#xA;    		})&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In node/src/rpc.rs&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    io.extend_with(shivarthu_rpc::ShivarthuApi::to_delegate(&#xD;&#xA;    		shivarthu_rpc::Shivarthu::new(client),&#xD;&#xA;    	));&#xD;&#xA;&#xD;&#xA;It gives error:&#xD;&#xA;&#xD;&#xA;    io.extend_with(shivarthu_rpc::ShivarthuApi::to_delegate(&#xD;&#xA;       |                    ---------------------------------------- required by a bound introduced by this call&#xD;&#xA;    58 |         shivarthu_rpc::Shivarthu::new(client),&#xD;&#xA;       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `shivarthu_runtime_api::ShivarthuApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;` is not implemented for `&lt;C as ProvideRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;&gt;::Api`&#xD;&#xA;       |&#xD;&#xA;       = note: required because of the requirements on the impl of `ShivarthuApi&lt;H256&gt;` for `Shivarthu&lt;C, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;`&#xD;&#xA;    help: consider further restricting the associated type&#xD;&#xA;       |&#xD;&#xA;    36 |     P: TransactionPool + 'static, &lt;C as ProvideRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;&gt;::Api: shivarthu_runtime_api::ShivarthuApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6647" PostHistoryTypeId="1" PostId="1786" RevisionGUID="a34d8563-970f-4f8d-9426-4a916e355bec" CreationDate="2022-04-10T11:55:09.687" UserId="213" Text="Implementation of runtime api RPC" ContentLicense="CC BY-SA 4.0" />
  <row Id="6648" PostHistoryTypeId="3" PostId="1786" RevisionGUID="a34d8563-970f-4f8d-9426-4a916e355bec" CreationDate="2022-04-10T11:55:09.687" UserId="213" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6649" PostHistoryTypeId="5" PostId="1771" RevisionGUID="709000ec-ab43-49cd-bd3d-3485277e328e" CreationDate="2022-04-10T13:27:05.183" UserId="2136" Comment="added 150 characters in body" Text="I have a Storage Map which I am using to to store structs and a Storage Value to use for indexing this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn consequences)]&#xD;&#xA;/// Storage map holding basic Consequence information&#xD;&#xA;pub(super) type Consequences&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, ConsequenceIndex, ConsequenceInfoOf&lt;T&gt;, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn consequence_count)]&#xD;&#xA;/// Storage value holding the number of existing Consequences (including the Purpose)&#xD;&#xA;pub(super) type ConsequenceCount&lt;T: Config&gt; = StorageValue&lt;_, ConsequenceIndex, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So far so good.&#xD;&#xA;&#xD;&#xA;Now I need to create child-parent relationships between my `Consequences`. To do this I am using a pair of child tries for each `Consequence`, one to hold the parents of the `Consequence` and another to hold the children of the `Consequence`. The idea being that I can then search either way. I've created some helper functions to achieve this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Find the ID of the child trie containing a Consequence's Children&#xD;&#xA;///&#xD;&#xA;/// Each Consequence stores its Children in a child trie&#xD;&#xA;/// This helper function calculates the id of the associated child trie.&#xD;&#xA;fn children_trie_id_from_index(index: ConsequenceIndex) -&gt; child::ChildInfo {&#xD;&#xA;	let mut buf = Vec::new();&#xD;&#xA;	buf.extend_from_slice(b&quot;consequencechildren&quot;);&#xD;&#xA;	buf.extend_from_slice(&amp;index.to_le_bytes()[..]);&#xD;&#xA;&#xD;&#xA;	child::ChildInfo::new_default(T::Hashing::hash(&amp;buf[..]).as_ref())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Find the ID of the child trie containing a Consequence's Parents&#xD;&#xA;///&#xD;&#xA;/// Each Consequence stores its Parents in a child trie&#xD;&#xA;/// This helper function calculates the id of the associated child trie.&#xD;&#xA;fn parents_trie_id_from_index(index: ConsequenceIndex) -&gt; child::ChildInfo {&#xD;&#xA;	let mut buf = Vec::new();&#xD;&#xA;	buf.extend_from_slice(b&quot;consequenceparents&quot;);&#xD;&#xA;	buf.extend_from_slice(&amp;index.to_le_bytes()[..]);&#xD;&#xA;&#xD;&#xA;	child::ChildInfo::new_default(T::Hashing::hash(&amp;buf[..]).as_ref())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Add a parent-child relationship between two Consequences&#xD;&#xA;///&#xD;&#xA;/// All relationships should be added by this function to avoid corruption of data&#xD;&#xA;fn add_consequence_relationship(parent_consequence: ConsequenceIndex,&#xD;&#xA;	child_consequence: ConsequenceIndex,&#xD;&#xA;) {&#xD;&#xA;	// Add the child to the Parent's list of Children &#xD;&#xA;	let parent_children = Self::children_trie_id_from_index(parent_consequence);&#xD;&#xA;	child_consequence.using_encoded(|b| child::put(&amp;parent_children, b, &amp;true));&#xD;&#xA;	// Add the parent to the Child's list of Children &#xD;&#xA;	let child_parents = Self::parents_trie_id_from_index(child_consequence);&#xD;&#xA;	parent_consequence.using_encoded(|b| child::put(&amp;child_parents, b, &amp;true));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Again, so far so good.&#xD;&#xA;&#xD;&#xA;Now I need to iterate over my child tries and can't work out how to do it. Can anybody show me how to set up an iterator to go through each key of a child tier?&#xD;&#xA;&#xD;&#xA;I notice that for existing storage iterators I need to know the first key. I would not, by default, know that at the time of creating my iterator.&#xD;&#xA;&#xD;&#xA;P.S. If anybody has any smarter ideas for managing the child-parent relationships between my `Consequences`, they would also be greatly received." ContentLicense="CC BY-SA 4.0" />
  <row Id="6650" PostHistoryTypeId="2" PostId="1787" RevisionGUID="fe847e90-99d7-4fc8-8f27-9eca3df07e67" CreationDate="2022-04-10T15:18:01.543" UserId="296" Text="I just created my first substrate node following the official tutorial, I'm wondering how do I make it public, so other people can also communicate with my node &#xD;&#xA;&#xD;&#xA;Do I host it on Digital Ocean/AWS ?&#xD;&#xA;&#xD;&#xA;Thanks," ContentLicense="CC BY-SA 4.0" />
  <row Id="6652" PostHistoryTypeId="1" PostId="1787" RevisionGUID="fe847e90-99d7-4fc8-8f27-9eca3df07e67" CreationDate="2022-04-10T15:18:01.543" UserId="296" Text="How to make substrate node publicly accessible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6653" PostHistoryTypeId="3" PostId="1787" RevisionGUID="fe847e90-99d7-4fc8-8f27-9eca3df07e67" CreationDate="2022-04-10T15:18:01.543" UserId="296" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6654" PostHistoryTypeId="2" PostId="1788" RevisionGUID="4f7ebc05-eb5f-4565-b028-a7f48aeffe22" CreationDate="2022-04-10T16:15:43.547" UserId="213" Text="Ya got it,&#xD;&#xA;&#xD;&#xA;The error was because of file node/src/rpc.rs&#xD;&#xA;&#xD;&#xA;    pub fn create_full&lt;C, P&gt;(deps: FullDeps&lt;C, P&gt;) -&gt; jsonrpc_core::IoHandler&lt;sc_rpc::Metadata&gt;&#xD;&#xA;    where&#xD;&#xA;    	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;    	C: HeaderBackend&lt;Block&gt; + HeaderMetadata&lt;Block, Error = BlockChainError&gt; + 'static,&#xD;&#xA;    	C: Send + Sync + 'static,&#xD;&#xA;    	C::Api: substrate_frame_rpc_system::AccountNonceApi&lt;Block, AccountId, Index&gt;,&#xD;&#xA;    	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi&lt;Block, Balance&gt;,&#xD;&#xA;    	C::Api: BlockBuilder&lt;Block&gt;,&#xD;&#xA;    	C::Api: shivarthu_runtime_api::ShivarthuApi&lt;Block&gt;,&#xD;&#xA;    	P: TransactionPool + 'static,&#xD;&#xA;    {&#xD;&#xA;&#xD;&#xA;I didn't put this line:&#xD;&#xA;&#xD;&#xA;    C::Api: shivarthu_runtime_api::ShivarthuApi&lt;Block&gt;," ContentLicense="CC BY-SA 4.0" />
  <row Id="6660" PostHistoryTypeId="2" PostId="1790" RevisionGUID="c3801f55-0c84-47ef-bdef-1b496170949a" CreationDate="2022-04-10T17:49:27.293" UserId="28" Text="You can take a look at the `crowdloan` pallet in Polkadot to see an example of manipulating and using a child-trie.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/runtime/common/src/crowdloan/mod.rs&#xD;&#xA;&#xD;&#xA;To create a iterator, you can do something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_support::storage::{child, ChildTriePrefixIterator};&#xD;&#xA;&#xD;&#xA;pub fn contribution_iterator(&#xD;&#xA;	index: FundIndex,&#xD;&#xA;) -&gt; ChildTriePrefixIterator&lt;(T::AccountId, (BalanceOf&lt;T&gt;, Vec&lt;u8&gt;))&gt; {&#xD;&#xA;	ChildTriePrefixIterator::&lt;_&gt;::with_prefix_over_key::&lt;Identity&gt;(&#xD;&#xA;		&amp;Self::id_from_index(index),&#xD;&#xA;		&amp;[],&#xD;&#xA;	)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that in this iterator, we are specifying the known types of the key and values stored in the child-trie. For your child-trie, it may be different than the example above. After that, you can simply use the iterator as you would expect." ContentLicense="CC BY-SA 4.0" />
  <row Id="6662" PostHistoryTypeId="2" PostId="1791" RevisionGUID="cce12291-d831-4619-b65a-0467f40161c0" CreationDate="2022-04-10T17:56:22.333" UserId="627" Text="Everything running on Polkadot &amp; Kusama is OSS, there is nothing &quot;private&quot; or &quot;hidden&quot; or deployed without the source being available:&#xD;&#xA;&#xD;&#xA;[Crowdloans source](https://github.com/paritytech/polkadot/blob/256d5db19585b469a8b0e2e2f22e86c2ae25785e/runtime/common/src/crowdloan/mod.rs#L1)&#xD;&#xA;&#xD;&#xA;[Auctions source](https://github.com/paritytech/polkadot/blob/256d5db19585b469a8b0e2e2f22e86c2ae25785e/runtime/common/src/auctions.rs#L1)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6665" PostHistoryTypeId="2" PostId="1792" RevisionGUID="422ddf8a-fe9f-41cc-8b22-9d7625b6a9b8" CreationDate="2022-04-10T20:17:54.337" UserId="2232" Text="I am trying to create an address for Kusama. Here is my code:&#xD;&#xA;&#xD;&#xA;    const seed = bip39.mnemonicToSeedSync(WALLET_MNEMONIC, WALLET_PASSWORD);&#xD;&#xA;    const privateKeyBuffer = bip32&#xD;&#xA;        .fromSeed(seed)&#xD;&#xA;        .derivePath(`m/44'/434'/0'/0/${accountIndex}`).privateKey; &#xD;&#xA;    const keyring = new Keyring({ss58Format: 2});&#xD;&#xA;    return keyring.addFromAddress('0x'+privateKeyBuffer.toString(&quot;hex&quot;));&#xD;&#xA;&#xD;&#xA;Is that approach true and why my address is:&#xD;&#xA;&#xD;&#xA;    GUUy9QMLbhotJegAQVyViZUGu6UrohzFcxfNm5nCtF5hKjP&#xD;&#xA;&#xD;&#xA;but it is shown as:&#xD;&#xA;&#xD;&#xA;    5FxsJq4UiEgt8eqEPhgvbmCU8JpF48tooF7uz6opj62ax9yA&#xD;&#xA;&#xD;&#xA;at explorer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6667" PostHistoryTypeId="1" PostId="1792" RevisionGUID="422ddf8a-fe9f-41cc-8b22-9d7625b6a9b8" CreationDate="2022-04-10T20:17:54.337" UserId="2232" Text="How to Create Address for Kusama" ContentLicense="CC BY-SA 4.0" />
  <row Id="6668" PostHistoryTypeId="3" PostId="1792" RevisionGUID="422ddf8a-fe9f-41cc-8b22-9d7625b6a9b8" CreationDate="2022-04-10T20:17:54.337" UserId="2232" Text="|kusama|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6672" PostHistoryTypeId="2" PostId="1794" RevisionGUID="6151b0da-42e5-456d-b27b-4c71c0fa7542" CreationDate="2022-04-10T23:05:14.473" UserId="2232" Text="I create my signer wallet as follows:&#xD;&#xA;&#xD;&#xA;    const seed = bip39.mnemonicToSeedSync(WALLET_MNEMONIC, WALLET_PASSWORD);&#xD;&#xA;    const privateKeyBuffer = bip32&#xD;&#xA;        .fromSeed(seed)&#xD;&#xA;        .derivePath(`m/44'/434'/0'/0/0`).privateKey; &#xD;&#xA;    const keyring = new Keyring({ss58Format: 2});&#xD;&#xA;    return keyring.addFromAddress('0x'+privateKeyBuffer.toString(&quot;hex&quot;));&#xD;&#xA;&#xD;&#xA;and I try to transfer KSM from that account into another one:&#xD;&#xA;&#xD;&#xA;    const unsub = await api.tx.balances&#xD;&#xA;        .transfer(recipientAddress, amount)&#xD;&#xA;        .signAndSend(signerWallet, (result) =&gt; {&#xD;&#xA;            console.log(`Current status is ${result.status}`);&#xD;&#xA;            if (result.status.isInBlock) {&#xD;&#xA;                console.log(`Transaction included at blockHash ${result.status.asInBlock}`);&#xD;&#xA;            } else if (result.status.isFinalized) {&#xD;&#xA;                console.log(`Transaction finalized at blockHash ${result.status.asFinalized}`);&#xD;&#xA;                unsub();&#xD;&#xA;            }&#xD;&#xA;        });&#xD;&#xA;&#xD;&#xA;However I get that error:&#xD;&#xA;&#xD;&#xA;    Cannot sign with a locked key pair&#xD;&#xA;&#xD;&#xA;What is the problem with my code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6674" PostHistoryTypeId="1" PostId="1794" RevisionGUID="6151b0da-42e5-456d-b27b-4c71c0fa7542" CreationDate="2022-04-10T23:05:14.473" UserId="2232" Text="Cannot sign with a locked key pair Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="6675" PostHistoryTypeId="3" PostId="1794" RevisionGUID="6151b0da-42e5-456d-b27b-4c71c0fa7542" CreationDate="2022-04-10T23:05:14.473" UserId="2232" Text="|kusama|polkadot-js|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6676" PostHistoryTypeId="2" PostId="1795" RevisionGUID="999e5dc4-2423-4e46-8234-ea5d6d6402c8" CreationDate="2022-04-11T04:15:53.797" UserId="2228" Text="There are a ton of approaches to this, but you usually need to apply some kind of logic ensure the transactions can't get spammed or used as a DDOS attack vector - this applies whether the fees are being paid from a fund or are totally non existent.&#xD;&#xA;&#xD;&#xA;- Iota and Nano are feeless chains that make use of PoW or PoS attached to transactions to reduce spamming.&#xD;&#xA;- on Ethereum and other smart contract capable chains, it's possible to delegate transaction fees. Here is one example approach: https://medium.com/bitclave/do-not-pay-transaction-fees-in-ethereum-21a9dccaaf63&#xD;&#xA;- Kadena has the concept of gas stations that use a fund to cover fees for transactions that match a specific set of criteria.&#xD;&#xA;&#xD;&#xA;This article describles several approaches various blockchains have used:&#xD;&#xA;https://www.bitrates.com/news/p/feeless-cryptocurrency-how-do-blockchains-achieve-free-transactions&#xD;&#xA;&#xD;&#xA;There are a lot of other examples too.&#xD;&#xA;&#xD;&#xA;-----------&#xD;&#xA;&#xD;&#xA;As far as implementing something like this in substrate, you might be interested in this seminar:&#xD;&#xA;https://www.youtube.com/watch?v=7GOd2g4JZqg&#xD;&#xA;&#xD;&#xA;Alternatively, another approach could be to supply your own `CurrencyAdapter` to `OnChargeTransaction` of the `pallet_transaction_payment`. &#xD;&#xA;```&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;`CurrencyAdapter` implements the `OnChargeTransaction` trait which has a `correct_and_deposit_fee()` function which is called at the end of every transaction to refund any excess fee the user may have paid. You could modify that to run some arbitrary logic to fully refund the transaction fees when your desired conditions are satisfied." ContentLicense="CC BY-SA 4.0" />
  <row Id="6678" PostHistoryTypeId="5" PostId="1750" RevisionGUID="234db57a-30e2-49f6-bdc6-1f0b82dce3d8" CreationDate="2022-04-11T04:35:33.953" UserId="1789" Comment="added 394 characters in body" Text="My team has got our parachain crowdloan pallet working, thanks to [&#xD;&#xA;PureStake &amp; Moonbeam][1]&#xD;&#xA;&#xD;&#xA;According to Polkadot and Moonbeam's [description of Crowdloans][2] and [example specs][3], I think there must be some kind of Crowdfunding+Slot Auction going on somewhere before any Crowdloan can happen, right?&#xD;&#xA;&#xD;&#xA;(as a Crowdloan just gives out reward tokens over certain time periods, but before this can happen the crowdfunding must be finished first, right?)&#xD;&#xA;&#xD;&#xA;The thing is that I could not find such crowdfunding or auction source code in either Polkadot or Moonbeam repositories... &#xD;&#xA;&#xD;&#xA;If such source code is hidden, then we can only trust Polkadot team to run Crowdfunding and Slot Auction for my team, is that correct?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/PureStake/crowdloan-rewards&#xD;&#xA;  [2]: https://medium.com/moonbeam-network/what-is-a-crowdloan-benefits-explanation-7c6540267617&#xD;&#xA;  [3]: https://medium.com/moonbeam-network/moonriver-crowdloan-what-you-need-to-know-7d918a0d7002&#xD;&#xA;  More reference: https://medium.com/moonbeam-network/tagged/crowdloan" ContentLicense="CC BY-SA 4.0" />
  <row Id="6679" PostHistoryTypeId="2" PostId="1796" RevisionGUID="457d4380-0382-4185-9560-d30648c35b66" CreationDate="2022-04-11T06:24:56.590" UserId="1949" Text="You need a private key for the account with which you want to sign a transaction. Signing is done with the private key, verification with the public key.&#xD;&#xA;&#xD;&#xA;In the above code an address is added to the keyring with no information about the private key. The `addFromAddress` is for addressbook functionality or pairs where you don't need the private key at all, for instance a proxied account.&#xD;&#xA;&#xD;&#xA;Use [addFromPair](https://github.com/polkadot-js/common/blob/e96a204bb5d85970e316e3477dbd69189c83c7e9/packages/keyring/src/keyring.ts#L126-L134) and supply a [Keypair](https://github.com/polkadot-js/common/blob/e96a204bb5d85970e316e3477dbd69189c83c7e9/packages/util-crypto/src/types.ts#L7-L10) that has both the private and public keys.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6681" PostHistoryTypeId="2" PostId="1797" RevisionGUID="ff220e80-93b5-4139-a260-46f60b5bfb21" CreationDate="2022-04-11T06:25:13.210" UserId="342" Text="Short answer: you're probably not using your address in the &quot;Kusama&quot; pane of the polkadot js application.&#xD;&#xA;&#xD;&#xA;In practice, the two addresses you've shared belong to the same public key. Are just shown differently because of the network id.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Long answer.&#xD;&#xA;&#xD;&#xA;By using `subkey` tool you can see that both the addresses correspond to the same public key:&#xD;&#xA;&#xD;&#xA;    ❯ subkey inspect 5FxsJq4UiEgt8eqEPhgvbmCU8JpF48tooF7uz6opj62ax9yA&#xD;&#xA;    Public Key URI `5FxsJq4UiEgt8eqEPhgvbmCU8JpF48tooF7uz6opj62ax9yA` is account:&#xD;&#xA;    Network ID/version: substrate&#xD;&#xA;    Public key (hex):   0xac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b&#xD;&#xA;    Account ID:         0xac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b&#xD;&#xA;    SS58 Address:       5FxsJq4UiEgt8eqEPhgvbmCU8JpF48tooF7uz6opj62ax9yA&#xD;&#xA;&#xD;&#xA;    ❯ subkey inspect GUUy9QMLbhotJegAQVyViZUGu6UrohzFcxfNm5nCtF5hKjP&#xD;&#xA;    Public Key URI `GUUy9QMLbhotJegAQVyViZUGu6UrohzFcxfNm5nCtF5hKjP` is account:&#xD;&#xA;    Network ID/version: kusama&#xD;&#xA;    Public key (hex):   0xac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b&#xD;&#xA;    Account ID:         0xac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b&#xD;&#xA;    SS58 Address:       GUUy9QMLbhotJegAQVyViZUGu6UrohzFcxfNm5nCtF5hKjP&#xD;&#xA;&#xD;&#xA;What is different is the network-id. You can manually check the network id of an Address by converting it from base 58 to hex (e.g. using [this](https://www.better-converter.com/Encoders-Decoders/Base58Check-to-Hexadecimal-Decoder) website):&#xD;&#xA;&#xD;&#xA;    b58: 5FxsJq4UiEgt8eqEPhgvbmCU8JpF48tooF7uz6opj62ax9yA&#xD;&#xA;    hex: 2a ac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b 8861&#xD;&#xA;&#xD;&#xA;    b58: GUUy9QMLbhotJegAQVyViZUGu6UrohzFcxfNm5nCtF5hKjP&#xD;&#xA;    hex: 02 ac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b cea2&#xD;&#xA;&#xD;&#xA;From the decoded hex, you can see that the address is just the concatenation of three elements: NetworkId ++ PublicKey ++ Checksum&#xD;&#xA;&#xD;&#xA;What changes between the two AccountId you've provided is just the network id (0x02 for Kusama, 0x2a for Generic-Substrate) and the checksum (because the network id is different).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6684" PostHistoryTypeId="2" PostId="1798" RevisionGUID="4b0f4bda-7b2b-4e7e-adde-7cc1c49149cf" CreationDate="2022-04-11T06:30:20.880" UserId="265" Text="you *can* host it with a cloud provider **but** you certainly don't have to.&#xD;&#xA;making a node public is partly about making it reachable over the internet. this is a big subject because there's a lot to think about in terms of availability (is your node reachable behind your routers, switches and firewalls), security (is the access limited to things you are comfortable with and prepared for) and authenticity (can your node be impersonated by an imposter or mitm).&#xD;&#xA;&#xD;&#xA;substrate nodes expose a number of services over tcp. you can make none, some or all of these ports visible to the world:&#xD;&#xA;&#xD;&#xA; - **p2p**: usually on port `30333`. otherwise customised with cli arg: `--port 30333`. this port is used by the network to create consensus and share blockchain state. if you want other nodes to be able to learn about your node's blockchain state (a good thing), open this port first.&#xD;&#xA; - **ws**: usually on port `9944`. otherwise customised with cli arg: `--ws-port 9944`. listen on the public socket with `--ws-external`. this port responds to websocket queries that keep subscribers informed of the changing state of your node's ledger over time. it can also be used by polkadot.js to provide rich interactions with your node&#xD;&#xA; - **rpc**: usually on port `9933`. otherwise customised with cli arg: `--rpc-port 9933`. listen on the public socket with `--rpc-external`. this port responds to rpc queries enabling a limited set of interactions with your node. some rpc calls are not safe to expose to the world and substrate has some cli flags (like `--rpc-methods safe`) that help you to prevent exposure of unsafe rpc calls (like `author_insertKey`, amongst others)&#xD;&#xA; - **metrics**: usually on port `9615`. otherwise customised with cli arg: `--prometheus-port 9615`. listen on the public socket with `--prometheus-external`. this port exposes metrics that help you to monitor the health of your node. it can give you information about things like slow or stopped block production and is usually monitored by a metrics monitoring suite like prometheus, alertmanager and grafana.&#xD;&#xA;&#xD;&#xA;if you're running a parachain node, all of the above ports are duplicated (with default port numbers incremented by 1) because parachain binaries run both an embedded relay chain node and their own parachain node.&#xD;&#xA;&#xD;&#xA;the references to cli args for listening on public sockets above, modifies the node to listen on all interfaces (eg: `0.0.0.0:9944`) rather than just the loopback interface (eg: `127.0.0.1:9944`).&#xD;&#xA;&#xD;&#xA;to expose these ports to the world, you need to have:&#xD;&#xA; - an isp that does not block the port numbers you use and allows multiple, simultaneous inbound tcp connections (some german isps are known to throttle down when a substrate node instigates or receives more than a threshold number of connections)&#xD;&#xA; - a router capable of forwarding requests to those port numbers from the router that receives the request to the node system running your node&#xD;&#xA; - either a fixed ip address or dynamic dns that is synchronised to your dynamic ip address&#xD;&#xA;&#xD;&#xA;it is good practice to put any service you expose to the world behind ssl. a simple way to do this is to:&#xD;&#xA; - register a domain name (or use one provided by your dyn dns provider)&#xD;&#xA; - use let's encrypt's certbot to request an ssl certificate for that domain&#xD;&#xA; - run an nginx reverse proxy listening on port 443 (ssl/tls) and forwarding requests to your node ports." ContentLicense="CC BY-SA 4.0" />
  <row Id="6686" PostHistoryTypeId="2" PostId="1799" RevisionGUID="04522c83-3980-4047-a01c-834d3645a8e3" CreationDate="2022-04-11T06:30:35.990" UserId="1949" Text="With &quot;at explorer&quot; I believe you mean in something like the polkadot-js apps UI? &#xD;&#xA;&#xD;&#xA;In that case, the configuration for the display is based on your settings. The ss58prefix is for display purposes only. When you use `ss58Format: 2` in your keyring, that instructs the keyring to display any address using that format. It doesn't and cannot apply externally to the keyring.&#xD;&#xA;&#xD;&#xA;Any additional explorer-like application where you use the address will use the format as specified by the chain (for development chains this is 42), unless specifically overridden." ContentLicense="CC BY-SA 4.0" />
  <row Id="6689" PostHistoryTypeId="5" PostId="1797" RevisionGUID="65a2ca9e-81b6-45c9-93ea-a53e83c19bbb" CreationDate="2022-04-11T06:39:41.903" UserId="342" Comment="added 144 characters in body" Text="You're probably not using your address in the &quot;Kusama&quot; pane of the polkadot js application (I'm assuming you are using polkadot js).&#xD;&#xA;&#xD;&#xA;In practice, the two addresses you've shared belong to the same public key. Are just shown differently because of the network id.&#xD;&#xA;&#xD;&#xA;In the polkadot js pane, you can change how the addresses are visualized (i.e. what net-id to use) from 'settings-&gt;general-&gt;address-prefix'.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Some background you may find useful.&#xD;&#xA;&#xD;&#xA;By using `subkey` tool you can see that both the addresses correspond to the same public key:&#xD;&#xA;&#xD;&#xA;    ❯ subkey inspect 5FxsJq4UiEgt8eqEPhgvbmCU8JpF48tooF7uz6opj62ax9yA&#xD;&#xA;    Public Key URI `5FxsJq4UiEgt8eqEPhgvbmCU8JpF48tooF7uz6opj62ax9yA` is account:&#xD;&#xA;    Network ID/version: substrate&#xD;&#xA;    Public key (hex):   0xac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b&#xD;&#xA;    Account ID:         0xac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b&#xD;&#xA;    SS58 Address:       5FxsJq4UiEgt8eqEPhgvbmCU8JpF48tooF7uz6opj62ax9yA&#xD;&#xA;&#xD;&#xA;    ❯ subkey inspect GUUy9QMLbhotJegAQVyViZUGu6UrohzFcxfNm5nCtF5hKjP&#xD;&#xA;    Public Key URI `GUUy9QMLbhotJegAQVyViZUGu6UrohzFcxfNm5nCtF5hKjP` is account:&#xD;&#xA;    Network ID/version: kusama&#xD;&#xA;    Public key (hex):   0xac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b&#xD;&#xA;    Account ID:         0xac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b&#xD;&#xA;    SS58 Address:       GUUy9QMLbhotJegAQVyViZUGu6UrohzFcxfNm5nCtF5hKjP&#xD;&#xA;&#xD;&#xA;What is different is the network-id. You can manually check the network id of an Address by converting it from base 58 to hex (e.g. using [this](https://www.better-converter.com/Encoders-Decoders/Base58Check-to-Hexadecimal-Decoder) website):&#xD;&#xA;&#xD;&#xA;    b58: 5FxsJq4UiEgt8eqEPhgvbmCU8JpF48tooF7uz6opj62ax9yA&#xD;&#xA;    hex: 2a ac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b 8861&#xD;&#xA;&#xD;&#xA;    b58: GUUy9QMLbhotJegAQVyViZUGu6UrohzFcxfNm5nCtF5hKjP&#xD;&#xA;    hex: 02 ac7d46c501e44622a0fc27cca4e0dafff4dbc098e346478788493395e603852b cea2&#xD;&#xA;&#xD;&#xA;From the decoded hex, you can see that the address is just the concatenation of three elements: NetworkId ++ PublicKey ++ Checksum&#xD;&#xA;&#xD;&#xA;What changes between the two AccountId you've provided is just the network id (0x02 for Kusama, 0x2a for Generic-Substrate) and the checksum (because the network id is different).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6690" PostHistoryTypeId="6" PostId="1781" RevisionGUID="23b4e6bc-70a5-4782-b289-15f644170210" CreationDate="2022-04-11T06:57:18.773" UserId="85" Comment="edited tags" Text="|pallet|weight|fee|feeless|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6691" PostHistoryTypeId="6" PostId="281" RevisionGUID="89acbe7c-2052-46fa-9251-d2aa94c26387" CreationDate="2022-04-11T06:59:18.150" UserId="85" Comment="edited tags" Text="|substrate-node|polkadot|rust|fee|feeless|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6692" PostHistoryTypeId="6" PostId="1713" RevisionGUID="f3e7fdfc-903d-4c04-88b4-3381c6151958" CreationDate="2022-04-11T06:59:56.090" UserId="85" Comment="edited tags" Text="|pallet|fee|feeless|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6693" PostHistoryTypeId="2" PostId="1800" RevisionGUID="74a7f9a7-9c4a-463a-8648-ccf7a52063ff" CreationDate="2022-04-11T08:15:55.620" UserId="2192" Text="It sounds like you want transactions to be 'free' - possibly for a some subset of network participants. &#xD;&#xA;&#xD;&#xA;Depending on your runtime there are different ways to achieve this. The easiest being: you can remove transaction payments entirely from your runtime by simply deleting `pallet_transaction_payments` from the `construct_runtime!` macro invocation. &#xD;&#xA;&#xD;&#xA;For something more subtle you can write a custom implementation of `OnChargeTransaction` and hook this up to the transaction payments pallet.&#xD;&#xA;&#xD;&#xA;I would recommend having a read through the docs for [pallet_transaction_payment][1] and the [OnChargeTransaction][2] trait.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/latest/pallet_transaction_payment/index.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/latest/pallet_transaction_payment/trait.OnChargeTransaction.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="6695" PostHistoryTypeId="2" PostId="1801" RevisionGUID="de1b9557-cbc9-4773-8560-29f2f1cb42cc" CreationDate="2022-04-11T09:44:39.760" UserId="1789" Text="My team can run unit tests on our parachain crowdloan pallet.&#xD;&#xA;&#xD;&#xA;Now how can I get a list of relay accounts, native accounts and reward amounts used in my unit tests from a real life Crowdloan campaign on the Relay Chain?&#xD;&#xA;&#xD;&#xA;Here is doc from [Polkadot Crowdloan][1]:&#xD;&#xA;quote &quot;Each fund has a child-trie which stores all contributors account IDs together with the amount they contributed; the root of this can then be used by the parachain to allow contributors to prove that they made some particular contribution to the project (e.g. to be rewarded through some token or badge).&quot;&#xD;&#xA;&#xD;&#xA;I am not sure when it says &quot;the root of this&quot;. the root of what? &#xD;&#xA;what is the root?&#xD;&#xA;How can my the parachain use &quot;the root of this&quot; to find out who(relay account) has made contribution? and how much is the contribution?&#xD;&#xA;&#xD;&#xA;Here is an unit test code from [PureStake &amp; Moonbeam's pallet unit tests][2]&#xD;&#xA;&#xD;&#xA;    assert_ok!(Crowdloan::initialize_reward_vec(&#xD;&#xA;    	Origin::root(),&#xD;&#xA;    	vec![&#xD;&#xA;    		([1u8; 32].into(), Some(1), 500u32.into()),&#xD;&#xA;    		([2u8; 32].into(), Some(2), 500u32.into()),&#xD;&#xA;    		(pairs[0].public().into(), None, 500u32.into()),&#xD;&#xA;    		(pairs[1].public().into(), None, 500u32.into()),&#xD;&#xA;    		(pairs[2].public().into(), None, 500u32.into())&#xD;&#xA;    	]&#xD;&#xA;    ));&#xD;&#xA;&#xD;&#xA;For relay accounts, I see `pairs[0], pairs[3], pairs[2]` are made from get_ed25519_pairs() located at the mock.rs, and [1u8; 32] &amp; [2u8; 32] are made with random u8 integers I suppose. &#xD;&#xA;&#xD;&#xA;For native accounts, I see `Some(1) and Some(2)`, random integers I suppose.&#xD;&#xA;&#xD;&#xA;Is this the way to make relay accounts and native accounts in real life or I can use PolkadotJS to achieve the same?&#xD;&#xA;&#xD;&#xA;I see 500u32.into() is a reward amount in each of the vector items above.&#xD;&#xA;&#xD;&#xA;How can I find out the reward amount for each contributor?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/256d5db19585b469a8b0e2e2f22e86c2ae25785e/runtime/common/src/crowdloan/mod.rs#L22&#xD;&#xA;  [2]: https://github.com/PureStake/crowdloan-rewards/blob/main/src/tests.rs#L38&#xD;&#xA;  [3]: https://github.com/PureStake/crowdloan-rewards" ContentLicense="CC BY-SA 4.0" />
  <row Id="6697" PostHistoryTypeId="1" PostId="1801" RevisionGUID="de1b9557-cbc9-4773-8560-29f2f1cb42cc" CreationDate="2022-04-11T09:44:39.760" UserId="1789" Text="How to get relay accounts, native accounts and contributed amounts from a Crowdloan campaign?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6698" PostHistoryTypeId="3" PostId="1801" RevisionGUID="de1b9557-cbc9-4773-8560-29f2f1cb42cc" CreationDate="2022-04-11T09:44:39.760" UserId="1789" Text="|parachain|crowdloan|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6699" PostHistoryTypeId="2" PostId="1802" RevisionGUID="6ef40033-7c8d-43f1-8f75-eddaef7f4989" CreationDate="2022-04-11T09:48:09.567" UserId="2244" Text="I'm trying to fetch the stats (amount raised, remaining time) of specific crowdloan using Polkadot.js API however I can't find any examples or docs explaining the `crowdloan` queries.&#xD;&#xA;&#xD;&#xA;It is certainly possible as Polkadot.js app shows this under &#xD;&#xA;[/apps/#/parachains/crowdloan][1] path. &#xD;&#xA;&#xD;&#xA;Anyone has example how to get this data?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/#/parachains/crowdloan" ContentLicense="CC BY-SA 4.0" />
  <row Id="6701" PostHistoryTypeId="1" PostId="1802" RevisionGUID="6ef40033-7c8d-43f1-8f75-eddaef7f4989" CreationDate="2022-04-11T09:48:09.567" UserId="2244" Text="How to fetch status of specific crowdloan using polkadot{.js} API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6702" PostHistoryTypeId="3" PostId="1802" RevisionGUID="6ef40033-7c8d-43f1-8f75-eddaef7f4989" CreationDate="2022-04-11T09:48:09.567" UserId="2244" Text="|polkadot-js|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6703" PostHistoryTypeId="5" PostId="1801" RevisionGUID="d3953921-ef39-40a1-817a-5a2f49163873" CreationDate="2022-04-11T10:40:29.950" UserId="1789" Comment="added 118 characters in body" Text="My team can run unit tests on our parachain crowdloan pallet.&#xD;&#xA;&#xD;&#xA;Now how can I get a list of relay accounts, native accounts and reward amounts used in my unit tests from a real life Crowdloan campaign on the Relay Chain?&#xD;&#xA;&#xD;&#xA;Here is doc from [Polkadot Crowdloan][1]:&#xD;&#xA;quote &quot;Each fund has a child-trie which stores all contributors account IDs together with the amount they contributed; the root of this can then be used by the parachain to allow contributors to prove that they made some particular contribution to the project (e.g. to be rewarded through some token or badge).&quot;&#xD;&#xA;&#xD;&#xA;I am not sure when it says &quot;the root of this&quot;. the root of what? &#xD;&#xA;what is the root?&#xD;&#xA;How can my the parachain use &quot;the root of this&quot; to find out who(relay account) has made contribution? and how much is the contribution?&#xD;&#xA;&#xD;&#xA;Here is an unit test code from [PureStake &amp; Moonbeam's pallet unit tests][2]&#xD;&#xA;&#xD;&#xA;    assert_ok!(Crowdloan::initialize_reward_vec(&#xD;&#xA;    	Origin::root(),&#xD;&#xA;    	vec![&#xD;&#xA;    		([1u8; 32].into(), Some(1), 500u32.into()),&#xD;&#xA;    		([2u8; 32].into(), Some(2), 500u32.into()),&#xD;&#xA;    		(pairs[0].public().into(), None, 500u32.into()),&#xD;&#xA;    		(pairs[1].public().into(), None, 500u32.into()),&#xD;&#xA;    		(pairs[2].public().into(), None, 500u32.into())&#xD;&#xA;    	]&#xD;&#xA;    ));&#xD;&#xA;&#xD;&#xA;For relay accounts, I see `pairs[0], pairs[3], pairs[2]` are made from get_ed25519_pairs() located at the mock.rs, and [1u8; 32] &amp; [2u8; 32] are made with random u8 integers I suppose. &#xD;&#xA;&#xD;&#xA;For native accounts, I see `Some(1) and Some(2)`, random integers I suppose.&#xD;&#xA;&#xD;&#xA;Is this the way to make relay accounts and native accounts in real life or I can use PolkadotJS to achieve the same?&#xD;&#xA;&#xD;&#xA;I see 500u32.into() is a reward amount in each of the vector items above.&#xD;&#xA;&#xD;&#xA;How can I find out the reward amount for each contributor?&#xD;&#xA;&#xD;&#xA;In real life, this contributor vector above can be very large. How can I easily deal with this problem?&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/256d5db19585b469a8b0e2e2f22e86c2ae25785e/runtime/common/src/crowdloan/mod.rs#L22&#xD;&#xA;  [2]: https://github.com/PureStake/crowdloan-rewards/blob/main/src/tests.rs#L38&#xD;&#xA;  [3]: https://github.com/PureStake/crowdloan-rewards" ContentLicense="CC BY-SA 4.0" />
  <row Id="6704" PostHistoryTypeId="2" PostId="1803" RevisionGUID="8fb7e342-fcd9-4c1c-9df8-903319a8b0ee" CreationDate="2022-04-11T10:40:48.463" UserId="172" Text="Yes, the approach is correct. Your confusion comes from the way your explorer is defaulting to a Polkadot address. &#xD;&#xA;&#xD;&#xA;All accounts for different Substrate based chains use the SS58 format. This means a single 256-bit public key  can represent a range of different chain-specific account addresses. UIs just need to convert it according to what chain a user wants to interact with.&#xD;&#xA;&#xD;&#xA;Have a look at [this tool](https://polkadot.subscan.io/tools/format_transform?input=5FxsJq4UiEgt8eqEPhgvbmCU8JpF48tooF7uz6opj62ax9yA&amp;type=All) to see what different addresses would look like for your example. " ContentLicense="CC BY-SA 4.0" />
  <row Id="6706" PostHistoryTypeId="6" PostId="1752" RevisionGUID="2d3075af-3565-4c79-ba62-cc2b7884a1d3" CreationDate="2022-04-11T10:49:02.740" UserId="172" Comment="edited tags" Text="|substrate-node|account|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6707" PostHistoryTypeId="2" PostId="1804" RevisionGUID="fc18cd79-a868-4342-b66d-72e82dbaf232" CreationDate="2022-04-11T11:00:53.990" UserId="2195" Text="Is there a way to revert a raw chainspec to the original format?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6709" PostHistoryTypeId="1" PostId="1804" RevisionGUID="fc18cd79-a868-4342-b66d-72e82dbaf232" CreationDate="2022-04-11T11:00:53.990" UserId="2195" Text="Convert a raw chainspec to the original format" ContentLicense="CC BY-SA 4.0" />
  <row Id="6710" PostHistoryTypeId="3" PostId="1804" RevisionGUID="fc18cd79-a868-4342-b66d-72e82dbaf232" CreationDate="2022-04-11T11:00:53.990" UserId="2195" Text="|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6711" PostHistoryTypeId="2" PostId="1805" RevisionGUID="6ae5e100-0114-4f5d-bb9e-66a4d1979bd4" CreationDate="2022-04-11T11:48:58.930" UserId="2247" Text="given a known ethereum public key, is it possible to determine a substrate public key for the same account (for the purpose of an airdrop)?&#xD;&#xA;&#xD;&#xA;i believe that substrate keys are interchangeable across substrate networks so that donations sent to a public polkadot address could trigger an airdrop to the sender of tokens on a different (new) substrate chain. i believe that the donation-sender could access their airdropped tokens by creating an account on the new substrate chain using the same mnemonic as they had used to create the polkadot account.&#xD;&#xA;&#xD;&#xA;for example:&#xD;&#xA; - a polkadot account: `16q5vjQ3UZvfsxGRfupR3caacDEQxMAj1vgwVYWJaf1VBTc`&#xD;&#xA; - [sends dot](https://polkadot.subscan.io/extrinsic/9239466-2) to recipient: `1x8aa2N2Ar9SQweJv9vsuZn3WYDHu7gMQu1RePjZuBe33Hv`&#xD;&#xA; - a bot monitoring donations to the recipient above, triggers an airdrop (of the new token) to the public hex key of the sender: `0x04721868f93b81470eeb505d4d476189fe6e78d7e3aaaabde081ea3c77f2107b` (obtained with `subkey inspect 16q5vjQ3UZvfsxGRfupR3caacDEQxMAj1vgwVYWJaf1VBTc`)&#xD;&#xA; - the sender accesses the new token by creating an account on the new substrate network using the same seed as they had used to create their polkadot account.&#xD;&#xA;&#xD;&#xA;two questions:&#xD;&#xA; - is the substrate example actually possible or have i made incorrect assumptions?&#xD;&#xA; - could something similar be accomplished if an erc20 donation was made to a monitored erc20 address. eg: can a public substrate account id be derived from an erc20 account id and will the owner of the erc20 account be able to access the new substrate token using their erc20 account seed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6713" PostHistoryTypeId="1" PostId="1805" RevisionGUID="6ae5e100-0114-4f5d-bb9e-66a4d1979bd4" CreationDate="2022-04-11T11:48:58.930" UserId="2247" Text="convert ethereum public key to substrate public key" ContentLicense="CC BY-SA 4.0" />
  <row Id="6714" PostHistoryTypeId="3" PostId="1805" RevisionGUID="6ae5e100-0114-4f5d-bb9e-66a4d1979bd4" CreationDate="2022-04-11T11:48:58.930" UserId="2247" Text="|account|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6715" PostHistoryTypeId="5" PostId="1805" RevisionGUID="e4c5e180-a76a-4868-abef-066ff70122ca" CreationDate="2022-04-11T13:32:06.063" UserId="2247" Comment="added 339 characters in body" Text="given a known ethereum public key, is it possible to determine a substrate public key for the same account (for the purpose of an airdrop)?&#xD;&#xA;&#xD;&#xA;i believe that substrate keys are interchangeable across substrate networks so that donations sent to a public polkadot address could trigger an airdrop to the sender of tokens on a different (new) substrate chain. i believe that the donation-sender could access their airdropped tokens by creating an account on the new substrate chain using the same mnemonic as they had used to create the polkadot account.&#xD;&#xA;&#xD;&#xA;for example:&#xD;&#xA; - a polkadot account: `16q5vjQ3UZvfsxGRfupR3caacDEQxMAj1vgwVYWJaf1VBTc`&#xD;&#xA; - [sends dot](https://polkadot.subscan.io/extrinsic/9239466-2) to recipient: `1x8aa2N2Ar9SQweJv9vsuZn3WYDHu7gMQu1RePjZuBe33Hv`&#xD;&#xA; - a bot monitoring donations to the recipient above, triggers an airdrop (of the new token) to the public hex key of the sender: `0x04721868f93b81470eeb505d4d476189fe6e78d7e3aaaabde081ea3c77f2107b` (obtained with `subkey inspect 16q5vjQ3UZvfsxGRfupR3caacDEQxMAj1vgwVYWJaf1VBTc`)&#xD;&#xA; - the sender accesses the new token by creating an account on the new substrate network using the same seed as they had used to create their polkadot account.&#xD;&#xA;&#xD;&#xA;two questions:&#xD;&#xA; - is the substrate example actually possible or have i made incorrect assumptions?&#xD;&#xA; - could something similar be accomplished if an erc20 donation was made to a monitored erc20 address. eg: can a public substrate account id be derived from an erc20 account id and will the owner of the erc20 account be able to access the new substrate token using their erc20 account seed?&#xD;&#xA;&#xD;&#xA;edit: i have seen https://substrate.stackexchange.com/questions/1752/how-to-convert-a-substrate-address-to-an-etherum-address which asks how to do the conversion in the opposite direction but i am looking for specific guidance on whether an ethereum account holder would be able to access a substrate account using their ethereum seed." ContentLicense="CC BY-SA 4.0" />
  <row Id="6716" PostHistoryTypeId="6" PostId="1792" RevisionGUID="d8676b03-c38b-449a-a647-47fa02a4588a" CreationDate="2022-04-11T13:35:28.113" UserId="172" Comment="edited tags" Text="|kusama|polkadot-js|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6717" PostHistoryTypeId="4" PostId="1792" RevisionGUID="c6daf12e-86c9-49e8-8e59-f6c831351ac2" CreationDate="2022-04-11T13:41:36.643" UserId="45" Comment="Change the title so that it better describes the contents of the question" Text="Different representation of the same address between polkadot-js and an explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="6718" PostHistoryTypeId="2" PostId="1806" RevisionGUID="ba477e49-09a3-4715-acbd-2ed4ec9ab6ef" CreationDate="2022-04-11T14:22:22.020" UserId="1789" Text="My parachain's unit tests can run no problem.&#xD;&#xA;&#xD;&#xA;I am aware of &quot;Rococo Slot Request&quot; from https://docs.substrate.io/tutorials/v3/cumulus/rococo/#request-your-parachain-slot&#xD;&#xA;&#xD;&#xA;and in this section talking about Testing a Parachain&#xD;&#xA;https://wiki.polkadot.network/docs/build-pdk#testing-a-parachain&#xD;&#xA;&#xD;&#xA;But that does not mention about testing the Slot Auction and Crowdloan in a live environment, i.e. the Rococo chain.&#xD;&#xA;&#xD;&#xA;A) How can I do such a test?&#xD;&#xA;&#xD;&#xA;B) Is this all manual tests, meaning all button clicking can only be done by a real person?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6720" PostHistoryTypeId="1" PostId="1806" RevisionGUID="ba477e49-09a3-4715-acbd-2ed4ec9ab6ef" CreationDate="2022-04-11T14:22:22.020" UserId="1789" Text="How to test parachain + Slot Auction + Crowdloan in Rococo chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6721" PostHistoryTypeId="3" PostId="1806" RevisionGUID="ba477e49-09a3-4715-acbd-2ed4ec9ab6ef" CreationDate="2022-04-11T14:22:22.020" UserId="1789" Text="|parachain|rococo|crowdloan|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6722" PostHistoryTypeId="2" PostId="1807" RevisionGUID="5eeb5bee-2cf3-4c5f-823e-cb63ec20fd76" CreationDate="2022-04-11T15:49:53.230" UserId="234" Text="If for example you are interested in fetching the stats you mentioned for the paraId = 2037 in Polkadot, then you could try running the following example code in [Polkadot-js apps &gt; Developer menu &gt; Javascript submenu][1] :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const paraInfo = await api.query.crowdloan.funds(2037);&#xD;&#xA;console.log(JSON.stringify(paraInfo, null, 4));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and it will give you the following result :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;depositor&quot;: &quot;14bEKMdGLwGKNTz4BtT7venXZ4RcXdGfBSdEYrJLPNoHRvoK&quot;,&#xD;&#xA;    &quot;verifier&quot;: null,&#xD;&#xA;    &quot;deposit&quot;: 5000000000000,&#xD;&#xA;    &quot;raised&quot;: &quot;0x0000000000000000001b1201976cc6ed&quot;,&#xD;&#xA;    &quot;end&quot;: 10881401,&#xD;&#xA;    &quot;cap&quot;: &quot;0x00000000000000000214e8348c4f0000&quot;,&#xD;&#xA;    &quot;lastContribution&quot;: {&#xD;&#xA;        &quot;ending&quot;: 9829425&#xD;&#xA;    },&#xD;&#xA;    &quot;firstPeriod&quot;: 8,&#xD;&#xA;    &quot;lastPeriod&quot;: 15,&#xD;&#xA;    &quot;fundIndex&quot;: 31&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think you are interested in the values associated with the keys `raised` and `end` ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/js" ContentLicense="CC BY-SA 4.0" />
  <row Id="6724" PostHistoryTypeId="2" PostId="1808" RevisionGUID="b8ec0a6d-0555-40e9-8461-962d2a9699c1" CreationDate="2022-04-11T16:14:30.120" UserId="2111" Text="How to config a locally tested parachain to connect it to the Rococo public test-network? &#xD;&#xA;I mean on the startup phase (before the Rococo Slot Request Form), following the Cumulus tutorial: after obtaining a paraID how can I run the substrate-parachain-template to get the onBoarding parathread status on Rococo ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6726" PostHistoryTypeId="1" PostId="1808" RevisionGUID="b8ec0a6d-0555-40e9-8461-962d2a9699c1" CreationDate="2022-04-11T16:14:30.120" UserId="2111" Text="Parachain config for Rococo public test network" ContentLicense="CC BY-SA 4.0" />
  <row Id="6727" PostHistoryTypeId="3" PostId="1808" RevisionGUID="b8ec0a6d-0555-40e9-8461-962d2a9699c1" CreationDate="2022-04-11T16:14:30.120" UserId="2111" Text="|parachain|rococo|cumulus|chainspec|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6728" PostHistoryTypeId="2" PostId="1809" RevisionGUID="2e723930-822a-4b81-9105-98a0aba06abb" CreationDate="2022-04-11T16:18:03.800" UserId="104" Text="Let's take a look at the docs on `GlobalConsensus`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// A global network capable of externalizing its own consensus. This is not generally&#xD;&#xA;/// meaningful outside of the universal level.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The only chance where a `MultiLocation` mentions something that is &quot;at the universal level&quot; would be bridges, hence outside of the application of bridges, we don't really use the `GlobalConsensus` junction all that much. So if the XCM in question originates from Kusama and attempts to send an XCM over to Polkadot via a bridge, then I would expect to see a `GlobalConsensus` junction, in order to instruct the bridge to relay it to the correct destination.&#xD;&#xA;&#xD;&#xA;However, in most cases, the `MultiLocation` is referring to a location that is _local_, i.e. it does not exist outside of the local consensus system and doesn't require reaching out to the universal consensus level, and so most of the time, one does not even need to specify exactly _which_ `NetworkId` to use in the `id` field of `AccountId32` -- a simple `None` would already suffice (though it would still work if `Polkadot` is specified, provided that the local consensus system is indeed Polkadot). Note also that the account ID is not an SS58 address, and so no matter which parachain your source or destination is, the account ID would still stay the same, as an SS58 address can always be derived from an `AccountId32`." ContentLicense="CC BY-SA 4.0" />
  <row Id="6730" PostHistoryTypeId="2" PostId="1810" RevisionGUID="8537b713-dcd5-4d33-a387-b341b2e537e0" CreationDate="2022-04-11T17:07:26.027" UserId="2149" Text="I'm trying to figure out why my pallet UI produces wrong signatures when using Polkadot.js extension.&#xD;&#xA;UI is similar to https://polkadot.js.org/apps/#/signing: it calculates the signature over  data and also sends the (data, account public key and calculated signature) as a signed transaction to a backend.&#xD;&#xA;The extrinsic at the backend uses:&#xD;&#xA;sp_io::crypto::sr25519_verify &#xD;&#xA;function to validate the signature over the data and ensure_signed to validate the signature over the transaction.&#xD;&#xA;&#xD;&#xA;sp_io::crypto::sr25519_verify works fine when I use the data signed by default accounts like Alice, Bob etc or with accounts created from browser but fails with accounts created in Polkadot.js extension.&#xD;&#xA;&#xD;&#xA;I've also tried to figure out how the page https://polkadot.js.org/apps/#/signing works, but I failed to validate any of signatures created by the https://polkadot.js.org/apps/#/signing page with sp_io::crypto::sr25519_verify.&#xD;&#xA;&#xD;&#xA;Could you explain?&#xD;&#xA;- A. Why I have the problem with data signed by the extension but don't have a problem with local accounts?&#xD;&#xA;- B. Why signature that is generated by https://polkadot.js.org/apps/#/signing doesn't pass sp_io::crypto::sr25519_verify checks?&#xD;&#xA;&#xD;&#xA;Here are examples:&#xD;&#xA;1A. GOOD&#xD;&#xA;```&#xD;&#xA;fn right_polkadot_js_local_referee_sign() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		//--------&#xD;&#xA;		let letter_id: u32 = 0;&#xD;&#xA;		let ask_price_u128: u128 = 1000000000000000;&#xD;&#xA;		let referee_id_bytes: [u8; 32] = [&#xD;&#xA;			212, 53, 147, 199,  21, 253, 211,  28,&#xD;&#xA;			 97, 20,  26, 189,   4, 169, 159, 214,&#xD;&#xA;			130, 44, 133,  88, 133,  76, 205, 227,&#xD;&#xA;			154, 86, 132, 231, 165, 109, 162, 125&#xD;&#xA;		  ];&#xD;&#xA;		let worker_id_bytes: [u8; 32] = [&#xD;&#xA;			142, 175,   4,  21,  22, 135, 115,  99,&#xD;&#xA;			 38, 201, 254, 161, 126,  37, 252,  82,&#xD;&#xA;			135,  97,  54, 147, 201,  18, 144, 156,&#xD;&#xA;			178,  38, 170,  71, 148, 242, 106,  72&#xD;&#xA;		  ];&#xD;&#xA;		let referee_sign_bytes: [u8; 64] = [&#xD;&#xA;			182,  73, 190, 228, 168,  27,  40,  93, 241,   1, 189,&#xD;&#xA;			213, 181,  17,  37,   5,  40, 185, 154, 183,  57, 178,&#xD;&#xA;			 69, 102, 202, 243, 230, 192,  75,  40, 124,  16, 254,&#xD;&#xA;			 95,   7, 125,  50, 157, 254,   1, 204,  32,  22,   2,&#xD;&#xA;			176,  45, 232,   5, 152,  71, 213, 175, 102, 235, 177,&#xD;&#xA;			237, 199, 213,  84, 125, 226, 142, 206, 137&#xD;&#xA;		  ];&#xD;&#xA;		//--------&#xD;&#xA;		let ask_price_bytes = &amp;ask_price_u128.to_be_bytes();&#xD;&#xA;		let letter_id_bytes = &amp;letter_id.to_be_bytes();&#xD;&#xA;		let mut skill_receipt_data = Vec::new();&#xD;&#xA;		skill_receipt_data.extend_from_slice(letter_id_bytes);&#xD;&#xA;		skill_receipt_data.extend_from_slice(&amp;referee_id_bytes);&#xD;&#xA;		skill_receipt_data.extend_from_slice(&amp;worker_id_bytes);&#xD;&#xA;		skill_receipt_data.extend_from_slice(ask_price_bytes);&#xD;&#xA;&#xD;&#xA;		assert_eq!(&#xD;&#xA;			LettersModule::signature_is_valid(&#xD;&#xA;				H512::from(referee_sign_bytes),&#xD;&#xA;				skill_receipt_data,&#xD;&#xA;				H256::from(referee_id_bytes)&#xD;&#xA;			),&#xD;&#xA;			true&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;------ lib.rs ------&#xD;&#xA;fn signature_is_valid(signature: H512, message: Vec&lt;u8&gt;, pubkey: H256) -&gt; bool {&#xD;&#xA;		sp_io::crypto::sr25519_verify(&#xD;&#xA;			&amp;Signature::from_raw(*signature.as_fixed_bytes()),&#xD;&#xA;			&amp;message,&#xD;&#xA;			&amp;Public::from_h256(pubkey),&#xD;&#xA;		)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2B. BAD (fails)&#xD;&#xA;```&#xD;&#xA;fn right_polkadot_js_extension_referee_sign() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		//--------&#xD;&#xA;		let letter_id: u32 = 23;&#xD;&#xA;		let ask_price_u128: u128 = 1000000000000000;&#xD;&#xA;		let referee_id_bytes: [u8; 32] = [&#xD;&#xA;			202, 112, 158, 97, 34, 240, 209, 219, 93, 46, 189, 180, 28, 113, 25, 197, 205, 6, 81,&#xD;&#xA;			50, 184, 168, 77, 159, 24, 205, 125, 9, 110, 129, 98, 22,&#xD;&#xA;		];&#xD;&#xA;		let worker_id_bytes: [u8; 32] = [&#xD;&#xA;			142, 175, 4, 21, 22, 135, 115, 99, 38, 201, 254, 161, 126, 37, 252, 82, 135, 97, 54,&#xD;&#xA;			147, 201, 18, 144, 156, 178, 38, 170, 71, 148, 242, 106, 72,&#xD;&#xA;		];&#xD;&#xA;		let referee_sign_bytes: [u8; 64] = [&#xD;&#xA;			46, 98, 203, 32, 13, 16, 69, 158, 4, 224, 203, 206, 205, 18, 44, 113, 74, 154, 131, 90,&#xD;&#xA;			154, 30, 71, 181, 186, 130, 120, 30, 8, 253, 177, 25, 26, 56, 200, 13, 48, 180, 5, 9,&#xD;&#xA;			30, 190, 171, 221, 146, 79, 231, 151, 59, 47, 1, 177, 117, 99, 119, 23, 69, 68, 27,&#xD;&#xA;			219, 112, 27, 245, 132,&#xD;&#xA;		];&#xD;&#xA;		//--------&#xD;&#xA;		let ask_price_bytes = &amp;ask_price_u128.to_be_bytes();&#xD;&#xA;		let letter_id_bytes = &amp;letter_id.to_be_bytes();&#xD;&#xA;		let mut skill_receipt_data = Vec::new();&#xD;&#xA;		skill_receipt_data.extend_from_slice(letter_id_bytes);&#xD;&#xA;		skill_receipt_data.extend_from_slice(&amp;referee_id_bytes);&#xD;&#xA;		skill_receipt_data.extend_from_slice(&amp;worker_id_bytes);&#xD;&#xA;		skill_receipt_data.extend_from_slice(ask_price_bytes);&#xD;&#xA;&#xD;&#xA;		assert_eq!(&#xD;&#xA;			LettersModule::signature_is_valid(&#xD;&#xA;				H512::from(referee_sign_bytes),&#xD;&#xA;				skill_receipt_data,&#xD;&#xA;				H256::from(referee_id_bytes)&#xD;&#xA;			),&#xD;&#xA;			true&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;------ lib.rs ------&#xD;&#xA;fn signature_is_valid(signature: H512, message: Vec&lt;u8&gt;, pubkey: H256) -&gt; bool {&#xD;&#xA;		sp_io::crypto::sr25519_verify(&#xD;&#xA;			&amp;Signature::from_raw(*signature.as_fixed_bytes()),&#xD;&#xA;			&amp;message,&#xD;&#xA;			&amp;Public::from_h256(pubkey),&#xD;&#xA;		)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2A. GOOD: sp_io::crypto::sr25519_verify validates signature generated by sign function from Keyring (@polkadot/keyring)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;------ tests.rs ------&#xD;&#xA;// //Alice&#xD;&#xA;// account: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;// account_hex: 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;// dataHex: 0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48&#xD;&#xA;// signatureHex: 0x803453ffa845ff410d66fadef8fcbccf5131e117f9e9dd92ff0dc6fff5c6051fda5e3a4dd291d2093172cabada00c0bbe9fb5ab481ee65cc431928cd09cd1c81&#xD;&#xA;// true: signature is valid by signatureVerify from @polkadot/util-crypto&#xD;&#xA;&#xD;&#xA;let account_bytes: [u8; 32] = [212,53,147,199,21,253,211,28,97,20,26,189,4,169,159,214,130,44,133,88,133,76,205,227,154,86,132,231,165,109,162,125];&#xD;&#xA;let data_bytes: [u8; 32] = [142,175,4,21,22,135,115,99,38,201,254,161,126,37,252,82,135,97,54,147,201,18,144,156,178,38,170,71,148,242,106,72];&#xD;&#xA;let signature_bytes: [u8; 64] = [128,52,83,255,168,69,255,65,13,102,250,222,248,252,188,207,81,49,225,23,249,233,221,146,255,13,198,255,245,198,5,31,218,94,58,77,210,145,210,9,49,114,202,186,218,0,192,187,233,251,90,180,129,238,101,204,67,25,40,205,9,205,28,129];&#xD;&#xA;&#xD;&#xA;let mut data_to_sign = Vec::new();&#xD;&#xA;		data_to_sign.extend_from_slice(&amp;data_bytes);&#xD;&#xA;&#xD;&#xA;		assert_eq!(&#xD;&#xA;			LettersModule::signature_is_valid(&#xD;&#xA;				H512::from(signature_bytes),&#xD;&#xA;				data_to_sign,&#xD;&#xA;				H256::from(account_bytes)&#xD;&#xA;			),&#xD;&#xA;			true&#xD;&#xA;		);&#xD;&#xA;&#xD;&#xA;------ lib.rs ------&#xD;&#xA;fn signature_is_valid(signature: H512, message: Vec&lt;u8&gt;, pubkey: H256) -&gt; bool {&#xD;&#xA;		sp_io::crypto::sr25519_verify(&#xD;&#xA;			&amp;Signature::from_raw(*signature.as_fixed_bytes()),&#xD;&#xA;			&amp;message,&#xD;&#xA;			&amp;Public::from_h256(pubkey),&#xD;&#xA;		)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;2B. BAD: sp_io::crypto::sr25519_verify marks signature as INVALID. The signature was generated by https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/signing&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// --------- for Rust tests ------------&#xD;&#xA;// Test-local (extension) (https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/signing)&#xD;&#xA;// account: 15aS8Pih7iv6ZUVBL4AXkhihuZEaMbXdXe6CpN1MDE8LXGkm&#xD;&#xA;// account_hex: 0xca709e6122f0d1db5d2ebdb41c7119c5cd065132b8a84d9f18cd7d096e816216&#xD;&#xA;// dataHex: 0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48&#xD;&#xA;// signatureHex: 0xc043d89ebc0046edda36715cc60b5bc1b433d95aa445ae40b3d7264802b5976582c47d2750ec18ae16194b8d75e46d3f3fa6028625717aa6c86741864dad0086&#xD;&#xA;// true: signature is valid by signatureVerify from @polkadot/util-crypto&#xD;&#xA;&#xD;&#xA;let account_bytes: [u8; 32] = [202,112,158,97,34,240,209,219,93,46,189,180,28,113,25,197,205,6,81,50,184,168,77,159,24,205,125,9,110,129,98,22];&#xD;&#xA;let data_bytes: [u8; 32] = [142,175,4,21,22,135,115,99,38,201,254,161,126,37,252,82,135,97,54,147,201,18,144,156,178,38,170,71,148,242,106,72];&#xD;&#xA;let signature_bytes: [u8; 64] = [192,67,216,158,188,0,70,237,218,54,113,92,198,11,91,193,180,51,217,90,164,69,174,64,179,215,38,72,2,181,151,101,130,196,125,39,80,236,24,174,22,25,75,141,117,228,109,63,63,166,2,134,37,113,122,166,200,103,65,134,77,173,0,134];&#xD;&#xA;&#xD;&#xA;let mut data_to_sign = Vec::new();&#xD;&#xA;		data_to_sign.extend_from_slice(&amp;data_bytes);&#xD;&#xA;&#xD;&#xA;		assert_eq!(&#xD;&#xA;			LettersModule::signature_is_valid(&#xD;&#xA;				H512::from(signature_bytes),&#xD;&#xA;				data_to_sign,&#xD;&#xA;				H256::from(account_bytes)&#xD;&#xA;			),&#xD;&#xA;			true&#xD;&#xA;		);&#xD;&#xA;&#xD;&#xA;------ lib.rs ------&#xD;&#xA;fn signature_is_valid(signature: H512, message: Vec&lt;u8&gt;, pubkey: H256) -&gt; bool {&#xD;&#xA;		sp_io::crypto::sr25519_verify(&#xD;&#xA;			&amp;Signature::from_raw(*signature.as_fixed_bytes()),&#xD;&#xA;			&amp;message,&#xD;&#xA;			&amp;Public::from_h256(pubkey),&#xD;&#xA;		)&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6732" PostHistoryTypeId="1" PostId="1810" RevisionGUID="8537b713-dcd5-4d33-a387-b341b2e537e0" CreationDate="2022-04-11T17:07:26.027" UserId="2149" Text="Transaction fails with account from an extension but OK with local account" ContentLicense="CC BY-SA 4.0" />
  <row Id="6733" PostHistoryTypeId="3" PostId="1810" RevisionGUID="8537b713-dcd5-4d33-a387-b341b2e537e0" CreationDate="2022-04-11T17:07:26.027" UserId="2149" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6734" PostHistoryTypeId="10" PostId="1457" RevisionGUID="9f7c2d66-b4b1-4edf-8872-875c2fc88719" CreationDate="2022-04-11T17:36:35.467" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;}]}" />
  <row Id="6736" PostHistoryTypeId="10" PostId="1753" RevisionGUID="93faa156-d397-4ba0-9f32-7d00ae0758bc" CreationDate="2022-04-11T17:39:58.353" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:32,&quot;DisplayName&quot;:&quot;DrW3RK&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:587,&quot;DisplayName&quot;:&quot;Angelo&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;}]}" />
  <row Id="6737" PostHistoryTypeId="10" PostId="1634" RevisionGUID="63284e53-4589-4550-8212-59d4ac1245c8" CreationDate="2022-04-11T17:42:09.503" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;}]}" />
  <row Id="6738" PostHistoryTypeId="2" PostId="1811" RevisionGUID="16fd732e-3116-40c6-9f79-7fe055c0255c" CreationDate="2022-04-11T17:42:51.690" UserId="627" Text="The extension wraps all data inside `&lt;Bytes&gt;...&lt;/Bytes&gt;` for the raw-data signing operation.&#xD;&#xA;&#xD;&#xA;Here is some relevant [Rust tests](https://github.com/polkadot-js/wasm/blob/1916a4e10cd7fc151edbfbd95a9dafc724920110/packages/wasm-crypto/src/rs/sr25519.rs#L252-L269) as used via JS &lt;-&gt; WASM." ContentLicense="CC BY-SA 4.0" />
  <row Id="6740" PostHistoryTypeId="5" PostId="1559" RevisionGUID="75a672c3-7d4f-4d90-ad6f-ab04ace11e5a" CreationDate="2022-04-11T17:48:50.297" UserId="172" Comment="added 105 characters in body" Text="Questions that relate to pallets and disptachables that emit specific events, including decoding events. " ContentLicense="CC BY-SA 4.0" />
  <row Id="6741" PostHistoryTypeId="24" PostId="1559" RevisionGUID="75a672c3-7d4f-4d90-ad6f-ab04ace11e5a" CreationDate="2022-04-11T17:48:50.297" Comment="Proposed by 172 approved by 85, 104 edit id of 140" ContentLicense="CC BY-SA 4.0" />
  <row Id="6742" PostHistoryTypeId="5" PostId="1582" RevisionGUID="f5f33dbd-d195-4e5d-8741-94f982a8599c" CreationDate="2022-04-11T17:48:57.300" UserId="172" Comment="added 229 characters in body" Text="[Astar network](https://docs.astar.network/) is a dApp hub that supports Etherem Virtual Machine and WebAssembly smart contracts and other layer 2 solutions, designed to provide scalable and interoperable infrastructure for Web3." ContentLicense="CC BY-SA 4.0" />
  <row Id="6743" PostHistoryTypeId="24" PostId="1582" RevisionGUID="f5f33dbd-d195-4e5d-8741-94f982a8599c" CreationDate="2022-04-11T17:48:57.300" Comment="Proposed by 172 approved by 85, 104 edit id of 144" ContentLicense="CC BY-SA 4.0" />
  <row Id="6744" PostHistoryTypeId="5" PostId="1242" RevisionGUID="89ef6d4e-e831-4ce5-b780-c695b37a155b" CreationDate="2022-04-11T17:49:01.810" UserId="172" Comment="added 41 characters in body" Text="Posts pertaining to the Kitties tutorial." ContentLicense="CC BY-SA 4.0" />
  <row Id="6745" PostHistoryTypeId="24" PostId="1242" RevisionGUID="89ef6d4e-e831-4ce5-b780-c695b37a155b" CreationDate="2022-04-11T17:49:01.810" Comment="Proposed by 172 approved by 85, 104 edit id of 109" ContentLicense="CC BY-SA 4.0" />
  <row Id="6746" PostHistoryTypeId="5" PostId="1583" RevisionGUID="b1813716-7df9-47f5-8ddb-61292e67af83" CreationDate="2022-04-11T17:49:14.977" UserId="172" Comment="added 74 characters in body" Text="Questions that are specific to Astar's implementation of a Substrate node." ContentLicense="CC BY-SA 4.0" />
  <row Id="6747" PostHistoryTypeId="24" PostId="1583" RevisionGUID="b1813716-7df9-47f5-8ddb-61292e67af83" CreationDate="2022-04-11T17:49:14.977" Comment="Proposed by 172 approved by 85, 104 edit id of 145" ContentLicense="CC BY-SA 4.0" />
  <row Id="6748" PostHistoryTypeId="2" PostId="1812" RevisionGUID="58edd768-2bb5-4c77-b3d5-cc6fc652c136" CreationDate="2022-04-11T18:28:11.357" UserId="2257" Text="Starting with version 9.17 and greater I started getting these errors for the custom pallets Ive made. Could I please get a pointer in resolving this issue? Example output from compiler:&#xD;&#xA;&#xD;&#xA;#[derive(Debug, Clone, PartialEq, Default, Encode, Decode, scale_info::TypeInfo)]&#xD;&#xA;   |                                       ^^^^^^^&#xD;&#xA;   = note: required because of the requirements on the impl of `frame_support::traits::Get&lt;SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;` for `GetDefault`&#xD;&#xA;   = note: required because of the requirements on the impl of `QueryKindTrait&lt;SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;, GetDefault&gt;` for `frame_support::pallet_prelude::ValueQuery`&#xD;&#xA;   = note: required because of the requirements on the impl of `frame_support::storage::generator::StorageMap&lt;&lt;T as frame_system::Config&gt;::AccountId, SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageSolMnemonic&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::AccountId, SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;, frame_support::pallet_prelude::ValueQuery&gt;`&#xD;&#xA;   = note: required because of the requirements on the impl of `frame_support::StorageMap&lt;&lt;T as frame_system::Config&gt;::AccountId, SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageSolMnemonic&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::AccountId, SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;, frame_support::pallet_prelude::ValueQuery&gt;`&#xD;&#xA;   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: consider further restricting the associated type&#xD;&#xA;   |&#xD;&#xA;97 |     #[pallet::storage, &lt;T as frame_system::Config&gt;::AccountId: std::default::Default]&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6750" PostHistoryTypeId="1" PostId="1812" RevisionGUID="58edd768-2bb5-4c77-b3d5-cc6fc652c136" CreationDate="2022-04-11T18:28:11.357" UserId="2257" Text="How do I properly impl Default for T::AccountId?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6751" PostHistoryTypeId="3" PostId="1812" RevisionGUID="58edd768-2bb5-4c77-b3d5-cc6fc652c136" CreationDate="2022-04-11T18:28:11.357" UserId="2257" Text="|default|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6752" PostHistoryTypeId="5" PostId="1812" RevisionGUID="cd8e98f8-74ac-4b49-927a-12a3460947d0" CreationDate="2022-04-11T18:47:22.017" UserId="45" Comment="Improved formatting" Text="Starting with version 9.17 and greater I started getting these errors for the custom pallets I've made. Could I please get a pointer in resolving this issue? Example output from compiler:&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, Clone, PartialEq, Default, Encode, Decode, scale_info::TypeInfo)]&#xD;&#xA;       |                                       ^^^^^^^&#xD;&#xA;       = note: required because of the requirements on the impl of `frame_support::traits::Get&lt;SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;` for `GetDefault`&#xD;&#xA;       = note: required because of the requirements on the impl of `QueryKindTrait&lt;SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;, GetDefault&gt;` for `frame_support::pallet_prelude::ValueQuery`&#xD;&#xA;       = note: required because of the requirements on the impl of `frame_support::storage::generator::StorageMap&lt;&lt;T as frame_system::Config&gt;::AccountId, SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageSolMnemonic&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::AccountId, SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;, frame_support::pallet_prelude::ValueQuery&gt;`&#xD;&#xA;       = note: required because of the requirements on the impl of `frame_support::StorageMap&lt;&lt;T as frame_system::Config&gt;::AccountId, SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageSolMnemonic&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::AccountId, SolanaAccount&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;, frame_support::pallet_prelude::ValueQuery&gt;`&#xD;&#xA;       = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    help: consider further restricting the associated type&#xD;&#xA;       |&#xD;&#xA;    97 |     #[pallet::storage, &lt;T as frame_system::Config&gt;::AccountId: std::default::Default]&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6753" PostHistoryTypeId="2" PostId="1813" RevisionGUID="ba50ca4f-e726-4cc4-be7c-395f35a00822" CreationDate="2022-04-11T18:55:49.453" UserId="73" Text="No there is no automatic way for this. It would not be impossible as long as you have the native runtime that you used to build the raw chain spec. However, no one before required this before and thus, it is not supported." ContentLicense="CC BY-SA 4.0" />
  <row Id="6755" PostHistoryTypeId="5" PostId="1573" RevisionGUID="c6bdb493-b590-4b22-bedc-ec77d24c0519" CreationDate="2022-04-11T19:19:43.673" UserId="2124" Comment="Code snippet changes that made it work" Text="try add your `proposal` pallet into [benchmark metadata]( &#xD;&#xA;https://github.com/paritytech/polkadot/blob/96d736ce75e8467862cd63037faa6d6e56122532/runtime/kusama/src/lib.rs#L1933) like this&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Code change based on the input provided above:&#xD;&#xA;```    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	impl frame_benchmarking::Benchmark&lt;Block&gt; for Runtime {&#xD;&#xA;		fn benchmark_metadata(extra: bool) -&gt; (&#xD;&#xA;			Vec&lt;frame_benchmarking::BenchmarkList&gt;,&#xD;&#xA;			Vec&lt;frame_support::traits::StorageInfo&gt;,&#xD;&#xA;		) {&#xD;&#xA;			use frame_benchmarking::{baseline, Benchmarking, BenchmarkList};&#xD;&#xA;			use frame_support::traits::StorageInfoTrait;&#xD;&#xA;			use frame_system_benchmarking::Pallet as SystemBench;&#xD;&#xA;			use baseline::Pallet as BaselineBench;&#xD;&#xA;&#xD;&#xA;			let mut list = Vec::&lt;BenchmarkList&gt;::new();&#xD;&#xA;			list_benchmarks!(list, extra);&#xD;&#xA;&#xD;&#xA;			let storage_info = AllPalletsWithSystem::storage_info();&#xD;&#xA;&#xD;&#xA;			return (list, storage_info)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn dispatch_benchmark(&#xD;&#xA;			config: frame_benchmarking::BenchmarkConfig&#xD;&#xA;		) -&gt; Result&lt;Vec&lt;frame_benchmarking::BenchmarkBatch&gt;, sp_runtime::RuntimeString&gt; {&#xD;&#xA;			use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch, TrackedStorageKey};&#xD;&#xA;&#xD;&#xA;			use frame_system_benchmarking::Pallet as SystemBench;&#xD;&#xA;			use baseline::Pallet as BaselineBench;&#xD;&#xA;&#xD;&#xA;			impl frame_system_benchmarking::Config for Runtime {}&#xD;&#xA;			impl baseline::Config for Runtime {}&#xD;&#xA;&#xD;&#xA;			let whitelist: Vec&lt;TrackedStorageKey&gt; = vec![&#xD;&#xA;				// Block Number&#xD;&#xA;				hex_literal::hex!(&quot;XXX1&quot;).to_vec().into(),&#xD;&#xA;				// Total Issuance&#xD;&#xA;				hex_literal::hex!(&quot;XXX2&quot;).to_vec().into(),&#xD;&#xA;				// Execution Phase&#xD;&#xA;				hex_literal::hex!(&quot;XXX3&quot;).to_vec().into(),&#xD;&#xA;				// Event Count&#xD;&#xA;				hex_literal::hex!(&quot;XXX4&quot;).to_vec().into(),&#xD;&#xA;				// System Events&#xD;&#xA;				hex_literal::hex!(&quot;XXX5&quot;).to_vec().into(),&#xD;&#xA;			];&#xD;&#xA;&#xD;&#xA;			let mut batches = Vec::&lt;BenchmarkBatch&gt;::new();&#xD;&#xA;			let params = (&amp;config, &amp;whitelist);&#xD;&#xA;			add_benchmarks!(params, batches);&#xD;&#xA;&#xD;&#xA;			Ok(batches)&#xD;&#xA;		}&#xD;&#xA;	}```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6756" PostHistoryTypeId="24" PostId="1573" RevisionGUID="c6bdb493-b590-4b22-bedc-ec77d24c0519" CreationDate="2022-04-11T19:19:43.673" Comment="Proposed by 2124 approved by 104, 128 edit id of 153" ContentLicense="CC BY-SA 4.0" />
  <row Id="6757" PostHistoryTypeId="2" PostId="1814" RevisionGUID="a071df6d-3bae-4fd6-9f0b-d831e372ce6e" CreationDate="2022-04-11T19:33:26.707" UserId="53" Text="Short answer: `AccountId` is not designed to be bound to `Default`. A &quot;default&quot; `AccountId` doesn't make any sense to have and it helped mask a previous issue and so it was removed in a recent release.&#xD;&#xA;&#xD;&#xA;This means that `AccountId` values cannot be used as storage item values which assume a default value.&#xD;&#xA;&#xD;&#xA;In your case, you'll probably need to replace the `ValueQuery` with an `OptionQuery` and handle the possibility that the map item doesn't exist (i.e. that it returns `None`). An alternative would be to manually implement `Default` for `SolanaAccount&lt;AccountId&gt;` when `AccountId` doesn't itself implement `Default`." ContentLicense="CC BY-SA 4.0" />
  <row Id="6759" PostHistoryTypeId="4" PostId="1812" RevisionGUID="8967ae86-8526-491a-9224-61f83857a196" CreationDate="2022-04-11T19:34:39.210" UserId="53" Comment="edited title" Text="What happened to the `Default` implementation for `T::AccountId`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6760" PostHistoryTypeId="2" PostId="1815" RevisionGUID="f022b86d-babd-4add-b06e-7bf81c59ce07" CreationDate="2022-04-11T20:10:35.010" UserId="53" Text="Let's look at these three `MultiLocation` values, assuming we have a 32-byte account ID `id`:&#xD;&#xA;&#xD;&#xA;### 1. `(Parent, AccountId32 { network: None, id }).into()`&#xD;&#xA;&#xD;&#xA;This is more idiomatic, but otherwise exactly equal to the first suggestion you made:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ParentThen(X1(AccountId32 { network: None, id })).into()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It means &quot;the 32-byte account of identity `id` as interpreted within the context of the parent's consensus system&quot;, with an extra note that `id` (i.e. that 32-byte value) should not be considered associated with a particular network.&#xD;&#xA;&#xD;&#xA;An example of using this would be when referring to a Relay-chain account from within a parachain's logic. The `Parent` would take it &quot;up&quot; into the Relay-chain location and then the `AccountId32` would bring it &quot;down&quot; into an account on it.&#xD;&#xA;&#xD;&#xA;### 2. `(Polkadot, AccountId32 { network: None, id }).into()`&#xD;&#xA;&#xD;&#xA;This is more idiomatic, but otherwise exactly equal to the second suggestion you made:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;MultiLocation {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: X2(&#xD;&#xA;    GlobalConsensus(Polkadot),&#xD;&#xA;    AccountId32 { network: None, id }&#xD;&#xA;  )&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It means &quot;the 32-byte account of identity `id` as interpreted within the context of the Polkadot network which itself should be found within the local consensus system&quot;, with an extra note that `id` (i.e. that 32-byte value) should not be considered associated with a particular network.&#xD;&#xA;&#xD;&#xA;Since no real consensus system contains the Polkadot network, this location doesn't make any sense.&#xD;&#xA;&#xD;&#xA;The corresponding value of type `InteriorMultiLocation` is: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;MultiLocation::from((Polkadot, AccountId32 { network: None, id }))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This does have a meaning: being an `InteriorMultiLocation` it never contains `Parent`s and thus is used to represent *Universal* locations, i.e. locations to be interpreted within the hypothetical *Universal Consensus* defined as the parent of all top-level consensus systems.&#xD;&#xA;&#xD;&#xA;Used in this way, the value would refer to the account `id` on the Polkadot Relay-chain, much like in the example for (1).&#xD;&#xA;&#xD;&#xA;### 3. `AccountId32 { network: Some(Polkadot), id }.into()`&#xD;&#xA;&#xD;&#xA;This is more idiomatic, but otherwise exactly equal to the third suggestion you made:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;MultiLocation {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: X1(&#xD;&#xA;    AccountId32 { network: Some(Polkadot), id }&#xD;&#xA;  )&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This means &quot;the 32-byte account of identity `id` as interpreted within the context of the local consensus system&quot;, with an extra note that `id` (i.e. that 32-byte value) should be considered strictly associated with the Polkadot network, as opposed to e.g. Kusama.&#xD;&#xA;&#xD;&#xA;In general, specifying the `network` in an `AccountId32` is not done since there is rarely a need to make a strict association between a particular account and a network. Generally an account is considered &quot;compatible&quot; if the public key (i.e. `id`) is the same length as account IDs on the local chain.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6762" PostHistoryTypeId="5" PostId="1765" RevisionGUID="2691218d-c09b-4b13-943b-751cfd0995b7" CreationDate="2022-04-11T21:21:18.210" UserId="697" Comment="added 334 characters in body" Text="think as you want a blockchain that has fees on transfers, there are many blockchains and you should read all docs and codes to find which parts of that codes are related to manipulating balances so it is extremely hard, but `Polkadot` architecture allows you and pointed to where you can do that. `FRAME` is the power of `Polkadot`. there are some good information about design architecture here https://docs.substrate.io/v3/runtime/frame/" ContentLicense="CC BY-SA 4.0" />
  <row Id="6763" PostHistoryTypeId="2" PostId="1816" RevisionGUID="d7d1a63c-7db0-4509-b3f8-62a5c2bbf9b0" CreationDate="2022-04-12T01:35:43.937" UserId="2254" Text="We registered a parathread to start crowdloan on kusama, the crowloan just ended recently and we failed to get a slot. So I just used the same account to deregister, but always failed with Bad Origin，how can I deregister. We want to upgrade our chain for next round of crowdloan." ContentLicense="CC BY-SA 4.0" />
  <row Id="6765" PostHistoryTypeId="1" PostId="1816" RevisionGUID="d7d1a63c-7db0-4509-b3f8-62a5c2bbf9b0" CreationDate="2022-04-12T01:35:43.937" UserId="2254" Text="Why will deregister a parathread failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="6766" PostHistoryTypeId="3" PostId="1816" RevisionGUID="d7d1a63c-7db0-4509-b3f8-62a5c2bbf9b0" CreationDate="2022-04-12T01:35:43.937" UserId="2254" Text="|kusama|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6777" PostHistoryTypeId="2" PostId="1819" RevisionGUID="5218f920-ad0b-4d95-b0bd-90a161f59610" CreationDate="2022-04-12T05:28:12.610" UserId="544" Text="I believe you can follow this tutorial to connect to Rococo: https://wiki.polkadot.network/docs/build-pdk#testing-a-parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="6779" PostHistoryTypeId="2" PostId="1820" RevisionGUID="2f2725e6-e56e-4aa8-8d30-4937b3faaa87" CreationDate="2022-04-12T05:30:17.063" UserId="544" Text="I'd suggest to run a local rococo with [polkadot-launch](https://github.com/paritytech/polkadot-launch) where you can quickly launch your own relaychain and parachain. You can also tweak the config file to not automatically onboard your parachain. With the sudo permission you can easily test crowdloan and slot auction." ContentLicense="CC BY-SA 4.0" />
  <row Id="6781" PostHistoryTypeId="2" PostId="1821" RevisionGUID="7e58821c-de65-4a3d-aa86-97429ccd9054" CreationDate="2022-04-12T05:51:48.013" UserId="73" Text="Before you can deregister your parathread, you will need to end the crowdloan and have dissolved it. Otherwise the crowdloan still &quot;holds a reference&quot; onto the parathread. &#xD;&#xA;&#xD;&#xA;Also be aware that one crowdloan can be used for multiple auctions if you failed to get a slot in the first try." ContentLicense="CC BY-SA 4.0" />
  <row Id="6783" PostHistoryTypeId="2" PostId="1822" RevisionGUID="964af703-a6a1-498f-8a28-7884482d48c7" CreationDate="2022-04-12T05:55:43.410" UserId="544" Text="To control the storage usage of a full node, you can try to:&#xD;&#xA;&#xD;&#xA;- Raise the base transaction fee to discourage dust transaction on your blockchain&#xD;&#xA;- Lower down the block weight so that less extrinsics can be included in each block&#xD;&#xA;- Lower down the block producing time (from 6s to something like 1min)" ContentLicense="CC BY-SA 4.0" />
  <row Id="6785" PostHistoryTypeId="2" PostId="1823" RevisionGUID="0a380e61-1a1d-423c-b82c-4a355fb9f214" CreationDate="2022-04-12T05:57:11.117" UserId="544" Text="You can move the parachain or relaychain database to another partition, and then make a soft symlink pointing to the new location in the original directory. This is a widely used trick in Khala mining community." ContentLicense="CC BY-SA 4.0" />
  <row Id="6790" PostHistoryTypeId="5" PostId="1167" RevisionGUID="469063b9-baad-41ee-b0c7-8e0a42c47cc3" CreationDate="2022-04-12T07:44:06.547" UserId="1861" Comment="deleted 67 characters in body" Text="`T: Config + pallet_vesting::Config` is correct." ContentLicense="CC BY-SA 4.0" />
  <row Id="6791" PostHistoryTypeId="2" PostId="1825" RevisionGUID="1f2aecc3-f4ce-4ec6-a467-7b4975b51699" CreationDate="2022-04-12T08:42:15.487" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="6793" PostHistoryTypeId="1" PostId="1825" RevisionGUID="1f2aecc3-f4ce-4ec6-a467-7b4975b51699" CreationDate="2022-04-12T08:42:15.487" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6794" PostHistoryTypeId="1" PostId="1826" RevisionGUID="6376bae9-5dcd-4141-b8d2-28c8feaeddb8" CreationDate="2022-04-12T08:42:15.487" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="6796" PostHistoryTypeId="2" PostId="1826" RevisionGUID="6376bae9-5dcd-4141-b8d2-28c8feaeddb8" CreationDate="2022-04-12T08:42:15.487" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="6797" PostHistoryTypeId="2" PostId="1827" RevisionGUID="7a5a1c2a-d1d3-42fc-b524-7bc8c4a7c14e" CreationDate="2022-04-12T12:14:13.037" UserId="2264" Text="I was commissioned to create a C# RPC client and after successfully implementing SCALE (as verified by `polkadot-java` tests), I decided to start by creating a deserializer for the V11 metadata.&#xD;&#xA;&#xD;&#xA;Initially I started creating the object model using the [Rust documentation][1] and then found the `types-support` package that seemed to contain both a [reference hex payload][2] as well as the [decoded payload][3], ideal for creating a unit test for the deserializer.&#xD;&#xA;&#xD;&#xA;In due process I found some discrepancies that I wasn't able to explain and I hope this question will shed some light. Specifically:&#xD;&#xA;- Some of the keys don't match. e.g. `args` (`types-support`) vs `arguments` (Rust)&#xD;&#xA;- Some types seem to have a stripped prefix. e.g. `BlockNumber` (`types-support`) vs `T::BlockNumber` in the decoded data.&#xD;&#xA;- Some other types seem to have a stripped suffix. e.g. `Vec&lt;UncleEntryItem&gt;` vs `Vec&lt;UncleEntryItem&lt;T::BlockNumber, T::Hash, T::AccountId&gt;&gt;`&#xD;&#xA;&#xD;&#xA;I understand that V11 is not the latest version of the metadata (and for the life of me I can't remember why I went with V11 instead of V14 for the first test right now), but shouldn't all these match?&#xD;&#xA;&#xD;&#xA;Full JSON can be found in [this gist][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/monthly-2021-09+1/frame_metadata/struct.ModuleMetadata.html&#xD;&#xA;  [2]: https://github.com/polkadot-js/api/blob/master/packages/types-support/src/metadata/v11/substrate-hex.ts&#xD;&#xA;  [3]: https://github.com/polkadot-js/api/blob/master/packages/types-support/src/metadata/v11/substrate-json.json&#xD;&#xA;  [4]: https://gist.github.com/georgiosd/8ef4c2bf9babe39a794aefaf3c37326f" ContentLicense="CC BY-SA 4.0" />
  <row Id="6799" PostHistoryTypeId="1" PostId="1827" RevisionGUID="7a5a1c2a-d1d3-42fc-b524-7bc8c4a7c14e" CreationDate="2022-04-12T12:14:13.037" UserId="2264" Text="Difference in metadata exported to JSON between polkadot-js and reference implementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="6800" PostHistoryTypeId="3" PostId="1827" RevisionGUID="7a5a1c2a-d1d3-42fc-b524-7bc8c4a7c14e" CreationDate="2022-04-12T12:14:13.037" UserId="2264" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6801" PostHistoryTypeId="2" PostId="1828" RevisionGUID="cf77ddc5-0094-40af-ae41-e13f64e33ed5" CreationDate="2022-04-12T13:23:27.063" UserId="627" Text="In the completely unmaintained v11, the types were all sync-ed manually between the runtime and SDKs. This means that for each and every Rust PR made, there needed to be eyes on it, and then all the types aligned and duplicated into the JS codebase. Some things like `args` were shortened since it aligned with the types used _inside_ the JS API, i.e. less overhead from a JS maintenance pov.&#xD;&#xA;&#xD;&#xA;In addition, all namespaces were stripped. This is for a specific reason since in the TS type generation we can't do `export type T::Balance = ...`. The same applies to generics, where TS has an own generic type system.&#xD;&#xA;&#xD;&#xA;So up to v13, all generics as well as trait prefixed were removed. The long and the short of it is that to support all the tooling around the JS API and the fact that everything is manual, there is no way these types and names could match.&#xD;&#xA;&#xD;&#xA;For v14 all this type information comes from the metadata, so field names match in any struct. (There are a couple of renames remaining where the actual field names conflict with JS reserved words, but these are generally few.) &#xD;&#xA;&#xD;&#xA;In the case of type-names for v14, they are generated based on the type paths specified in the metadata, so eg. a type called `sp_runtime::TokenError` becomes `SpRuntimeTokenError`. (There is some slight type de-dupes also at play here, e.g. `pallet_staking::pallet::pallet::Event` would become `PalletStakingPalletEvent`)&#xD;&#xA;&#xD;&#xA;You really should not be developing on anything that is not metadata v14 at this point in the Substrate history." ContentLicense="CC BY-SA 4.0" />
  <row Id="6803" PostHistoryTypeId="2" PostId="1829" RevisionGUID="202902b7-b9b7-41c1-bdff-6cc44f1344f5" CreationDate="2022-04-12T15:21:50.000" UserId="380" Text="I've seen [instant seal mentioned](https://youtu.be/uhkV0jAcWDY?t=392) as a way to get transactions sealed by the substrate node upon receipt.&#xD;&#xA;&#xD;&#xA;I also know that moonbeam have this [in their node](https://github.com/PureStake/moonbeam/commit/e018d429c027a0e95bd504dd7204881ba1c8d7b2).&#xD;&#xA;&#xD;&#xA;Is there a substrate node that includes `pallet-contracts` and also implements instant seal?&#xD;&#xA;&#xD;&#xA;If not, is it possible to modify the [substrate contracts node](https://github.com/paritytech/substrate-contracts-node/) to include this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6805" PostHistoryTypeId="1" PostId="1829" RevisionGUID="202902b7-b9b7-41c1-bdff-6cc44f1344f5" CreationDate="2022-04-12T15:21:50.000" UserId="380" Text="Is there an instant seal docker image of substrate that includes `pallet-contracts`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6806" PostHistoryTypeId="3" PostId="1829" RevisionGUID="202902b7-b9b7-41c1-bdff-6cc44f1344f5" CreationDate="2022-04-12T15:21:50.000" UserId="380" Text="|substrate-node-template|pallet-contracts|instant-seal|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6807" PostHistoryTypeId="4" PostId="1829" RevisionGUID="5e669c5f-2758-4f4f-9e3c-dfc7b5989210" CreationDate="2022-04-12T15:39:51.910" UserId="380" Comment="edited title" Text="Is there an instant seal docker image of substrate that includes pallet-contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6808" PostHistoryTypeId="2" PostId="1830" RevisionGUID="f84856a3-3330-4c5c-a47f-670eb6d58fa8" CreationDate="2022-04-12T16:13:47.213" UserId="16" Text="The substrate contracts node [already uses instant seal](https://github.com/paritytech/substrate-contracts-node/pull/42). Just update to the [latest version](https://github.com/paritytech/substrate-contracts-node/releases)." ContentLicense="CC BY-SA 4.0" />
  <row Id="6810" PostHistoryTypeId="6" PostId="1829" RevisionGUID="519574cf-8bc4-436b-b1d5-085b436a85a9" CreationDate="2022-04-12T16:15:25.280" UserId="16" Comment="edited tags; edited tags" Text="|smart-contract|consensus|pallet-contracts|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6811" PostHistoryTypeId="4" PostId="1829" RevisionGUID="f79dc870-6f38-41e3-9009-c3fdda47c32e" CreationDate="2022-04-12T16:28:41.297" UserId="16" Comment="edited title" Text="Is there a substrate node that contains pallet-contracts and uses instant seal consensus?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6812" PostHistoryTypeId="4" PostId="1812" RevisionGUID="562e6c06-df09-4fa8-9528-88e6d5f8c2e8" CreationDate="2022-04-12T16:30:32.743" UserId="34" Comment="edited tags; edited title" Text="Why is there no `Default` implementation for `T::AccountId`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6813" PostHistoryTypeId="6" PostId="1812" RevisionGUID="562e6c06-df09-4fa8-9528-88e6d5f8c2e8" CreationDate="2022-04-12T16:30:32.743" UserId="34" Comment="edited tags; edited title" Text="|frame|runtime|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6814" PostHistoryTypeId="2" PostId="1831" RevisionGUID="b5872401-0df6-4cba-a11a-ebc814d3eff6" CreationDate="2022-04-12T17:10:24.943" UserId="165" Text="I have written a post covering this specific topic, I think it might solve your doubts&#xD;&#xA;https://substrate.stackexchange.com/questions/1599/deregistering-my-parathread-using-its-manager-account-is-not-always-possible" ContentLicense="CC BY-SA 4.0" />
  <row Id="6816" PostHistoryTypeId="2" PostId="1832" RevisionGUID="749ea93b-8bf2-47cc-a45f-36be1cc6b538" CreationDate="2022-04-12T17:16:38.887" UserId="165" Text="This is the section of the tutorial that you want to check for registering your parathread. https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/#registration-transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="6818" PostHistoryTypeId="2" PostId="1833" RevisionGUID="5824fd2d-24d1-41f2-b202-08bb5cf1f059" CreationDate="2022-04-12T17:27:25.837" UserId="244" Text="In [Substrate docs](https://docs.substrate.io/v3/concepts/weight/), it's said:&#xD;&#xA;&quot;The maximum block weight should be equivalent to one-third of the target block time, allocating one third for block construction, one third for network propagation, and one third for import and verification.&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For example, in the original runtime, total compute time is 2 seconds (`2 * WEIGHT_PER_SECOND`) while block time is 6s:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const Version: RuntimeVersion = VERSION;&#xD;&#xA;	pub const BlockHashCount: BlockNumber = 2400;&#xD;&#xA;	/// We allow for 2 seconds of compute with a 6 second average block time.&#xD;&#xA;	pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights&#xD;&#xA;		::with_sensible_defaults(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO);&#xD;&#xA;	pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength&#xD;&#xA;		::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);&#xD;&#xA; &#xD;&#xA;...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What could happen if started a new chain with decreased block time (1000 ms), but did not change the block weight of 2 seconds?&#xD;&#xA;&#xD;&#xA;And after genesis, could those variables be changed with a Forkless upgrade without negative consequences?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6820" PostHistoryTypeId="1" PostId="1833" RevisionGUID="5824fd2d-24d1-41f2-b202-08bb5cf1f059" CreationDate="2022-04-12T17:27:25.837" UserId="244" Text="What could happen if the `BlockWeights` is set HIGHER than `MILLISECS_PER_BLOCK` (block time)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6821" PostHistoryTypeId="3" PostId="1833" RevisionGUID="5824fd2d-24d1-41f2-b202-08bb5cf1f059" CreationDate="2022-04-12T17:27:25.837" UserId="244" Text="|runtime|weight|runtime-upgrade|substrate-block-time|block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6822" PostHistoryTypeId="10" PostId="1752" RevisionGUID="91ef6cbc-6800-43ca-850d-2f0ffae91067" CreationDate="2022-04-12T17:56:18.690" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[793],&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:3,&quot;DisplayName&quot;:&quot;mkl&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:244,&quot;DisplayName&quot;:&quot;afm&quot;}]}" />
  <row Id="6823" PostHistoryTypeId="2" PostId="1834" RevisionGUID="f4f9e815-1cb7-4ab7-907f-3477a4c003d5" CreationDate="2022-04-12T19:06:35.300" UserId="377" Text="I am developing a pallet in which I need to check the balance of the account that is making the transaction. How can I check that?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6825" PostHistoryTypeId="1" PostId="1834" RevisionGUID="f4f9e815-1cb7-4ab7-907f-3477a4c003d5" CreationDate="2022-04-12T19:06:35.300" UserId="377" Text="How we can check the balance of the account in any pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6826" PostHistoryTypeId="3" PostId="1834" RevisionGUID="f4f9e815-1cb7-4ab7-907f-3477a4c003d5" CreationDate="2022-04-12T19:06:35.300" UserId="377" Text="|pallet|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6828" PostHistoryTypeId="5" PostId="1679" RevisionGUID="977519c5-c7bc-47a8-b99f-dec6f7ff9fb8" CreationDate="2022-04-12T19:30:32.530" UserId="2169" Comment="better wording after Dan's questions" Text="I compiled and am running the binaries for backend's telemetry_core (at default port 8000) and telemetry_shard (at default port 8001) as systemd units in my server, they are nicely connected to each other and they are receiving all &quot;submits&quot; from a polkadot node running in the same server too.&#xD;&#xA;&#xD;&#xA;However, after launching the frontend with `yarn start` in the same server, and opening the remote &quot;localhost port&quot; in my local browser (via SSH), I get the following screen with the &quot;Waiting for telemetry...&quot; message, nothing else seems to happen:&#xD;&#xA;[![Waiting for Telemetry Screen][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0oD8H.png&#xD;&#xA;&#xD;&#xA;The browser's console shows the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Connection.ts:108&#xD;&#xA;&#xD;&#xA;WebSocket connection to 'ws://127.0.0.1:8000/feed' failed: &#xD;&#xA;&#xD;&#xA;(anonymous) @ Connection.ts:108&#xD;&#xA;&#xD;&#xA;socket @ Connection.ts:85&#xD;&#xA;&#xD;&#xA;trySocket @ Connection.ts:92&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please note that I am connecting to my server via SSH and I am translating the remote port 3000 into my PC's 4000, in case you wonder about the odd url in the picture :D&#xD;&#xA;&#xD;&#xA;The terminal with the `yarn start` command shows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Compiled successfully!&#xD;&#xA;&#xD;&#xA;You can now view @dotstats/frontend in the browser.&#xD;&#xA;&#xD;&#xA;  http://localhost:3000/&#xD;&#xA; &#xD;&#xA;Note that the development build is not optimized. To create a&#xD;&#xA;production build, use yarn build.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And when trying to build, I get the following dump:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;yarn run v1.22.18 $ react-scripts-ts build Creating an optimized&#xD;&#xA;production build... Starting type checking and linting service...&#xD;&#xA;Using 1 worker with 2048MB memory limit ts-loader: Using&#xD;&#xA;typescript@4.4.2 and&#xD;&#xA;/home/telemetry/substrate-telemetry/frontend/tsconfig.prod.json Failed&#xD;&#xA;to compile.&#xD;&#xA;&#xD;&#xA;Failed to minify the bundle. Error: static/js/main.4c691ad1.js from&#xD;&#xA;UglifyJs Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at Array.forEach (&lt;anonymous&gt;)&#xD;&#xA;    at /home/telemetry/substrate-telemetry/frontend/node_modules/react-scripts-ts/scripts/build.js:127:23&#xD;&#xA;    at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:269:13&#xD;&#xA;    at Compiler.emitRecords (/home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:375:38)&#xD;&#xA;    at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:262:10&#xD;&#xA;    at /home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/Compiler.js:368:12&#xD;&#xA;    at next (/home/telemetry/substrate-telemetry/frontend/node_modules/tapable/lib/Tapable.js:218:11)&#xD;&#xA;    at Compiler.&lt;anonymous&gt; (/home/telemetry/substrate-telemetry/frontend/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)&#xD;&#xA;    at next (/home/telemetry/substrate-telemetry/frontend/node_modules/tapable/lib/Tapable.js:220:14)&#xD;&#xA;    at /home/telemetry/substrate-telemetry/frontend/node_modules/sw-precache-webpack-plugin/lib/index.js:98:18&#xD;&#xA;Read more here: http://bit.ly/2tRViJ9&#xD;&#xA;&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Do you have any suggestions for troubleshooting? What may be going wrong here?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6829" PostHistoryTypeId="2" PostId="1835" RevisionGUID="5d24928f-4e5d-4b07-8e1b-c5a4f1def85f" CreationDate="2022-04-12T19:54:40.120" UserId="2169" Text="After the questions from Dan, I found the problem to be in my SSH connection to the remote server: I was tunnelling port 3000 only (frontend), but the front end needs a local connection available to the telemetry_core service (port 8000), as shown in the browser error:&#xD;&#xA;&#xD;&#xA;&gt; WebSocket connection to 'ws://127.0.0.1:8000/feed' failed&#xD;&#xA;&#xD;&#xA;So,  tunnelling both ports 3000 &amp; 8000 to my local host solved the problem:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rTo86.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6831" PostHistoryTypeId="6" PostId="1816" RevisionGUID="f3741e57-8f3d-4e97-bd6c-95cb212142f6" CreationDate="2022-04-12T23:55:51.973" UserId="544" Comment="Better to tag as crowdloan" Text="|kusama|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6832" PostHistoryTypeId="24" PostId="1816" RevisionGUID="f3741e57-8f3d-4e97-bd6c-95cb212142f6" CreationDate="2022-04-12T23:55:51.973" Comment="Proposed by 544 approved by 45, -1 edit id of 154" ContentLicense="CC BY-SA 4.0" />
  <row Id="6833" PostHistoryTypeId="5" PostId="1816" RevisionGUID="eb573724-4ff9-40b6-8e70-e45561107070" CreationDate="2022-04-12T23:55:51.973" UserId="283" Comment="Better to tag as crowdloan, cleaned up text without changing meaning" Text="We registered a parathread to start crowdloan on kusama. The crowdloan just ended recently and we failed to get a slot. So I just used the same account to deregister, but it always fails with &quot;Bad Origin&quot;. How can I deregister? We want to upgrade our chain for another crowdloan." ContentLicense="CC BY-SA 4.0" />
  <row Id="6834" PostHistoryTypeId="4" PostId="1816" RevisionGUID="eb573724-4ff9-40b6-8e70-e45561107070" CreationDate="2022-04-12T23:55:51.973" UserId="283" Comment="Better to tag as crowdloan, cleaned up text without changing meaning" Text="Why does deregistering a parathread fail while a crowdloan is open?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6835" PostHistoryTypeId="2" PostId="1836" RevisionGUID="9c7d80a3-66fa-4ca3-bf25-1697259d391c" CreationDate="2022-04-13T00:04:42.613" UserId="283" Text="How exactly it behaves depends on the consensus engine that's being used, but when blocks are consistently overfull it causes a slowdown of the chain. In certain consensus engines, it might lead to a stall.&#xD;&#xA;&#xD;&#xA;In consensus engines like BABE and Aura, where a slot leader unilaterally authors and distributes a block, things just slow down. You can imagine a node X starting to create a block B1 against some parent block B0, but not finishing it before the next time slot, where a node Y starts authoring. Y also starts authoring a block B1' on top of B0, because it's not aware of X's block. X finishes authoring its block B1 before the next time slot, and then the next node Z starts building B2 on top of B1. Y's block B1' becomes an orphaned fork when it's completed. And so on - lots of orphaned forks, lots of skipped blocks. The overfull blocks start to work against the throughput of the chain.&#xD;&#xA;&#xD;&#xA;In some consensus engines, like Tendermint or HotStuff, where blocks are proposed and need to be signed off on by 2/3 of validators before being accepted, block execution might just time out, and rounds of consensus would proceed with no block being accepted, and the chain would not make progress. Most implementations would work around this by raising timeouts exponentially over time, which would mean that the chain just slows down.&#xD;&#xA;&#xD;&#xA;Weight is a fuzzy mechanism. In the world of consensus, network latency and execution time can be treated similarly. If network latencies are low, execution times can go up. But if network latencies are high, you can't budget as much time for execution. Consensus mechanisms have differing assumptions about the network conditions they function under, and different ways of dealing with the worst cases of those network assumptions." ContentLicense="CC BY-SA 4.0" />
  <row Id="6837" PostHistoryTypeId="2" PostId="1837" RevisionGUID="d55c2797-f1a8-4fc1-9840-b2f4c8f179cf" CreationDate="2022-04-13T02:50:27.150" UserId="125" Text="A common way is:&#xD;&#xA;```rs&#xD;&#xA;ensure!(T::Currency::free_balance(&amp;who) &gt;= some_value, &lt;Error&lt;T&gt;&gt;::InsufficientBalance);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="6839" PostHistoryTypeId="2" PostId="1838" RevisionGUID="a0683353-c5d6-424d-b6d4-2a2d156664e4" CreationDate="2022-04-13T04:09:15.777" UserId="1717" Text="I want to cancel a crowdloan before its ending block and find there are `crowdloan.refund` and `crowdloan.dissolve` extrinsics.&#xD;&#xA;&#xD;&#xA;Can I use `crowdloan.refund` or `crowdloan.dissolve` extrinsic to cancel a crowdloan? If not, is there any way to cancel a crowdloan before it ends? Thanks for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="6841" PostHistoryTypeId="1" PostId="1838" RevisionGUID="a0683353-c5d6-424d-b6d4-2a2d156664e4" CreationDate="2022-04-13T04:09:15.777" UserId="1717" Text="How to cancel a crowdloan before its ending block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6842" PostHistoryTypeId="3" PostId="1838" RevisionGUID="a0683353-c5d6-424d-b6d4-2a2d156664e4" CreationDate="2022-04-13T04:09:15.777" UserId="1717" Text="|parachain|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6852" PostHistoryTypeId="2" PostId="1841" RevisionGUID="f27c1c57-11ca-4775-b6ef-a78e3150d89e" CreationDate="2022-04-13T08:12:49.577" UserId="73" Text="&gt; What could happen if started a new chain with decreased block time (1000 ms), but did not change the block weight of 2 seconds?&#xD;&#xA;&#xD;&#xA;I don't really know what you mean by block time, but I assume you mean the time we have in maximum one block can take to execute. Here in your case block time is based on the block weight. There isn't any other parameter defining this. &#xD;&#xA;&#xD;&#xA;However, I think you mean something like we have a block weight of 2 seconds and a slot duration of 1 second. Meaning we want to produce a block every second. If you have a normal Substrate node, nothing problematic will happen (in most cases). The block production is tracking the time and if it runs over a maximum (depending on the block production part of the slot duration). Let's assume we give the block production 500 ms. Of this 500ms 67% are allocated for the actual block initialization plus transaction execution. If we are now above these 67% of execution time we will stop the block production and finalize the block. Then you send out the block to the network. &#xD;&#xA;&#xD;&#xA;The runtime is now tracking also the used block weight and if we for example already used 80% of the block weight and the node tries to push another transaction that would take another 21% block weight, the runtime would &quot;deny&quot; the transaction for now. It would need to be retried in a different block. However, in your case here were block weight is much bigger than the actual time we got for block production it could happen that at 60% of the time we got, we push a transaction that uses a lot of weight. The runtime wouldn't &quot;deny&quot; because it thinks there is still enough time left and then it would start to process the transaction. We don't support aborting transaction that are being applied, this means we would run until the transaction is applied. If that takes too much time we would probably have missed our slot and throw the entire block away. So, we would have wasted all the block production for nothing.&#xD;&#xA;&#xD;&#xA;If there is a malicious validator that manages to produce a 2 second block in like 500ms, it could force all other nodes to import this block (we don't abort block import, because the runtime needs to ensure that blocks are not taking infinite time to import). So, someone could maybe spam your network with very big blocks and let it may stall a little bit.&#xD;&#xA;&#xD;&#xA;&gt;And after genesis, could those variables be changed with a Forkless upgrade without negative consequences?&#xD;&#xA;&#xD;&#xA;Yes you can change the block weight without any consequences. Only the `SLOT_DURATION` can not be changed that easily!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6855" PostHistoryTypeId="2" PostId="1842" RevisionGUID="6c9543bf-58cc-46ec-b922-d9d129e1e1a7" CreationDate="2022-04-13T09:51:25.937" UserId="523" Text="their is a `edit` call to change the end date of the fund, authorized only to sudo" ContentLicense="CC BY-SA 4.0" />
  <row Id="6857" PostHistoryTypeId="2" PostId="1843" RevisionGUID="47242c43-80d4-4918-bd63-76f061871739" CreationDate="2022-04-13T09:53:26.467" UserId="125" Text="A benchmark test for function with a param like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;runner_execute {&#xD;&#xA;&#xD;&#xA;	let x in 1..10000000;&#xD;&#xA;&#xD;&#xA;	...&#xD;&#xA;&#xD;&#xA;	let gas_limit_call = x as u64;&#xD;&#xA;&#xD;&#xA;}: {&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;	let call_runner_results = T::Runner::call(&#xD;&#xA;		...&#xD;&#xA;		gas_limit_call,&#xD;&#xA;		...&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The benchmark result:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl WeightInfo for () {&#xD;&#xA;	// Storage: System Account (r:1 w:0)&#xD;&#xA;	// Storage: Ethereum RemainingRingBalance (r:1 w:0)&#xD;&#xA;	// Storage: EVM AccountCodes (r:1 w:0)&#xD;&#xA;	// Storage: EVM AccountStorages (r:1 w:0)&#xD;&#xA;	fn runner_execute(x: u32, ) -&gt; Weight {&#xD;&#xA;		(5_773_816_000 as Weight)&#xD;&#xA;			// Standard Error: 0&#xD;&#xA;			.saturating_add((38_000 as Weight).saturating_mul(x as Weight))&#xD;&#xA;			.saturating_add(RocksDbWeight::get().reads(4 as Weight))&#xD;&#xA;			.saturating_add(RocksDbWeight::get().writes(1 as Weight))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;In terms of db read and write weight, it's very clear, but how do you understand `(*(5_773_816_000 as Weight)`? Could I get a more detailed weight consumption report?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6859" PostHistoryTypeId="1" PostId="1843" RevisionGUID="47242c43-80d4-4918-bd63-76f061871739" CreationDate="2022-04-13T09:53:26.467" UserId="125" Text="How to read the benchmark result?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6860" PostHistoryTypeId="3" PostId="1843" RevisionGUID="47242c43-80d4-4918-bd63-76f061871739" CreationDate="2022-04-13T09:53:26.467" UserId="125" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6861" PostHistoryTypeId="2" PostId="1844" RevisionGUID="e4c92165-d00c-49a0-9178-7d45ad9f4495" CreationDate="2022-04-13T09:55:23.263" UserId="139" Text="I am using the staking pallet and it has an item known as `minimum_validator_count`. I'd like to learn what would happen if the actual validators in the network is less than this entity. Would the election fail to give a usable result? Will no blocks be finalized until the minimum validator count is met? &#xD;&#xA;&#xD;&#xA;Also as a bonus question, how is it possible to increase this quantity in a running chain? " ContentLicense="CC BY-SA 4.0" />
  <row Id="6863" PostHistoryTypeId="1" PostId="1844" RevisionGUID="e4c92165-d00c-49a0-9178-7d45ad9f4495" CreationDate="2022-04-13T09:55:23.263" UserId="139" Text="What happens if validator count &lt; minimum_validator_count?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6864" PostHistoryTypeId="3" PostId="1844" RevisionGUID="e4c92165-d00c-49a0-9178-7d45ad9f4495" CreationDate="2022-04-13T09:55:23.263" UserId="139" Text="|consensus|staking|validator|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6865" PostHistoryTypeId="5" PostId="1843" RevisionGUID="53f59198-2544-4570-aaad-fc4b285b85e6" CreationDate="2022-04-13T09:58:37.553" UserId="125" Comment="deleted 2 characters in body" Text="A benchmark test for function with a param like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;runner_execute {&#xD;&#xA;&#xD;&#xA;	let x in 1..10000000;&#xD;&#xA;&#xD;&#xA;	...&#xD;&#xA;&#xD;&#xA;	let gas_limit_call = x as u64;&#xD;&#xA;&#xD;&#xA;}: {&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;	let call_runner_results = T::Runner::call(&#xD;&#xA;		...&#xD;&#xA;		gas_limit_call,&#xD;&#xA;		...&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The benchmark result:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl WeightInfo for () {&#xD;&#xA;	// Storage: System Account (r:1 w:0)&#xD;&#xA;	// Storage: Ethereum RemainingRingBalance (r:1 w:0)&#xD;&#xA;	// Storage: EVM AccountCodes (r:1 w:0)&#xD;&#xA;	// Storage: EVM AccountStorages (r:1 w:0)&#xD;&#xA;	fn runner_execute(x: u32, ) -&gt; Weight {&#xD;&#xA;		(5_773_816_000 as Weight)&#xD;&#xA;			// Standard Error: 0&#xD;&#xA;			.saturating_add((38_000 as Weight).saturating_mul(x as Weight))&#xD;&#xA;			.saturating_add(RocksDbWeight::get().reads(4 as Weight))&#xD;&#xA;			.saturating_add(RocksDbWeight::get().writes(1 as Weight))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;In terms of db read and write weight, it's very clear, but how do you understand `(5_773_816_000 as Weight)`? Could I get a more detailed weight consumption report?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6866" PostHistoryTypeId="2" PostId="1845" RevisionGUID="e5f06c22-6a84-4b15-b576-c48a7956c6d5" CreationDate="2022-04-13T10:09:42.030" UserId="94" Text="The magic number there is not very helpful, I agree. We will change that [here](https://github.com/paritytech/substrate/issues/11215).  &#xD;&#xA;  &#xD;&#xA;One unit of *weight* is equivalent to `10^-12` seconds.  &#xD;&#xA;Your extrinsic therefore always takes at least 5.774 milliseconds to execute.  &#xD;&#xA;Currently the execution time, storage Reads/Writes and PoV size are the only thing that are measured.  &#xD;&#xA;The weights will also take the PoV size into account [soon](https://github.com/paritytech/substrate/pull/10918).  &#xD;&#xA;&#xD;&#xA;A more detailed report is printed by the node, you should see something like (older versions try `--raw`):  &#xD;&#xA;```pre&#xD;&#xA;Pallet: &quot;pallet_lottery&quot;, Extrinsic: &quot;set_calls&quot;, Lowest values: [], Highest values: [], Steps: 50, Repeat: 20                                                                                                                                 &#xD;&#xA;Raw Storage Info    &#xD;&#xA;========                                                   &#xD;&#xA;Storage: Lottery CallIndices (r:0 w:1)&#xD;&#xA;                                           &#xD;&#xA;Median Slopes Analysis                     &#xD;&#xA;========                         &#xD;&#xA;-- Extrinsic Time --             &#xD;&#xA;                                           &#xD;&#xA;Model:                                     &#xD;&#xA;Time ~=    18.44                 &#xD;&#xA;    + n    0.463                 &#xD;&#xA;              µs                 &#xD;&#xA;                                           &#xD;&#xA;Reads = 0 + (0 * n)              &#xD;&#xA;Writes = 1 + (0 * n)             &#xD;&#xA;                                                     &#xD;&#xA;Min Squares Analysis             &#xD;&#xA;========                         &#xD;&#xA;-- Extrinsic Time --             &#xD;&#xA;                                                     &#xD;&#xA;Data points distribution:        &#xD;&#xA;    n   mean µs  sigma µs       %&#xD;&#xA;    0     17.85     0.127    0.7%          &#xD;&#xA;    1     19.29     0.122    0.6%&#xD;&#xA;    2     19.55     0.113    0.5%                    &#xD;&#xA;    3     19.83     0.246    1.2%&#xD;&#xA;    4     20.36     0.232    1.1%          &#xD;&#xA;    5     20.91     0.138    0.6%                    &#xD;&#xA;    6     21.04     0.133    0.6%                    &#xD;&#xA;    7      21.7     0.133    0.6%                    &#xD;&#xA;    8      22.1     0.155    0.7%                    &#xD;&#xA;    9     22.76     0.232    1.0%                          &#xD;&#xA;   10     22.92     0.196    0.8%                    &#xD;&#xA;                                                     &#xD;&#xA;Quality and confidence:                                    &#xD;&#xA;param     error                                            &#xD;&#xA;n         0.009                                            &#xD;&#xA;&#xD;&#xA;Model:                                                     &#xD;&#xA;Time ~=    18.42                                           &#xD;&#xA;    + n    0.466                                           &#xD;&#xA;              µs                                           &#xD;&#xA;&#xD;&#xA;Reads = 0 + (0 * n)                                        &#xD;&#xA;Writes = 1 + (0 * n) &#xD;&#xA;```&#xD;&#xA;On newer substrate versions its possible to pass in the `--json` or `--json-file &lt;PATH&gt;` flags  &#xD;&#xA;to access the raw results in a machine-readable manner.  &#xD;&#xA;&#xD;&#xA;One final tip: Your `10000000` is also a magic number , you could add a Config value instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="6868" PostHistoryTypeId="6" PostId="1843" RevisionGUID="68cc84a4-d0b3-4891-a230-3f5eb88b078b" CreationDate="2022-04-13T10:10:00.293" UserId="94" Comment="edited tags" Text="|pallet|weight|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6869" PostHistoryTypeId="2" PostId="1846" RevisionGUID="d6e71670-998a-47af-954e-2296eae21245" CreationDate="2022-04-13T10:29:21.717" UserId="693" Text="The EVM works in a sandbox with its own accounts (and mapped accounts). So it is possible to access all tokens within the EVM sandbox with a Ethereum signer, while EVM accounts cannot make a transaction with a substrate native signer.&#xD;&#xA;&#xD;&#xA;I think this article might help you regarding the different signers’ relationship https://medium.com/astar-network/using-astar-network-account-between-substrate-and-evm-656643df22a0" ContentLicense="CC BY-SA 4.0" />
  <row Id="6871" PostHistoryTypeId="5" PostId="1844" RevisionGUID="390a0d83-20c5-4a43-852b-0df845a73a13" CreationDate="2022-04-13T10:55:42.200" UserId="139" Comment="added 301 characters in body" Text="I am using the staking pallet and it has an item known as `minimum_validator_count`. I'd like to learn what would happen if the actual validators in the network is less than this entity. Would the election fail to give a usable result? Will no blocks be finalized until the minimum validator count is met? &#xD;&#xA;&#xD;&#xA;Also as a bonus question, how is it possible to increase this quantity in a running chain? &#xD;&#xA;&#xD;&#xA;Edit : I've found a few calls in the staking module that are &#xD;&#xA;&#xD;&#xA; - increaseValidatorCount(additional)&#xD;&#xA; - setValidatorCount(new)&#xD;&#xA; - scaleValidatorCount(factor)&#xD;&#xA;&#xD;&#xA;Which sounds like acts on the `minimum_validator_count`. Am I correct? Does it require special privileges to call this function?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6872" PostHistoryTypeId="2" PostId="1847" RevisionGUID="723e285e-97f9-488f-9eb9-8d260804cdf0" CreationDate="2022-04-13T11:01:49.437" UserId="139" Text="I am trying to learn how to use the `collective` module and started my chain using just 1 council member. Then I create a proposal for some function like set_balance, and execute it with a threshold of 1. Since I am the only member in the council I assumed it would pass. &#xD;&#xA;&#xD;&#xA;After a few moments I can see a successful dispatch, but on the explorer I see this : &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;What does this mean and where am I going wrong?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ITudL.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6874" PostHistoryTypeId="1" PostId="1847" RevisionGUID="723e285e-97f9-488f-9eb9-8d260804cdf0" CreationDate="2022-04-13T11:01:49.437" UserId="139" Text="How do collective origins work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6875" PostHistoryTypeId="3" PostId="1847" RevisionGUID="723e285e-97f9-488f-9eb9-8d260804cdf0" CreationDate="2022-04-13T11:01:49.437" UserId="139" Text="|council|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6876" PostHistoryTypeId="6" PostId="1847" RevisionGUID="6353e6ba-71e2-413c-9f26-b267d6f89392" CreationDate="2022-04-13T11:08:36.930" UserId="85" Comment="edited tags" Text="|council|origin|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6877" PostHistoryTypeId="5" PostId="1844" RevisionGUID="b731266b-2924-42a4-84bb-0198edd8cee0" CreationDate="2022-04-13T11:11:13.950" UserId="139" Comment="added 155 characters in body" Text="I am using the staking pallet and it has an item known as `minimum_validator_count`. I'd like to learn what would happen if the actual validators in the network is less than this entity. Would the election fail to give a usable result? Will no blocks be finalized until the minimum validator count is met? &#xD;&#xA;&#xD;&#xA;Also as a bonus question, how is it possible to increase this quantity in a running chain? &#xD;&#xA;&#xD;&#xA;**Edit #1**: I've found a few calls in the staking module that are &#xD;&#xA;&#xD;&#xA; - increaseValidatorCount(additional)&#xD;&#xA; - setValidatorCount(new)&#xD;&#xA; - scaleValidatorCount(factor)&#xD;&#xA;&#xD;&#xA;Which sounds like acts on the `minimum_validator_count`. Am I correct? Does it require special privileges to call this function?&#xD;&#xA;&#xD;&#xA;**Edit #2**: I tried calling these methods with `sudo`, to increase it to 3 but then I checked my `minimum_validator_count` and it was still the same `1`.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6882" PostHistoryTypeId="2" PostId="1849" RevisionGUID="aa129a7a-4492-4fe7-8e49-46c17aa37c52" CreationDate="2022-04-13T12:37:17.733" UserId="139" Text="```rust&#xD;&#xA;/// Fraction of a proposal's value that should be bonded in order to place the proposal.&#xD;&#xA;/// An accepted proposal gets these back. A rejected proposal does not.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type ProposalBond: Get&lt;Permill&gt;;&#xD;&#xA;&#xD;&#xA;/// Minimum amount of funds that should be placed in a deposit for making a proposal.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type ProposalBondMinimum: Get&lt;BalanceOf&lt;Self, I&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In treasury configuration, If I am creating a proposal what should be the bond amount? Should it be the `min(ProposalBond, ProposalBondMinimum)` where `ProposalBond` is defined as some percentage of the requested amount? " ContentLicense="CC BY-SA 4.0" />
  <row Id="6884" PostHistoryTypeId="1" PostId="1849" RevisionGUID="aa129a7a-4492-4fe7-8e49-46c17aa37c52" CreationDate="2022-04-13T12:37:17.733" UserId="139" Text="Proposal bond in pallet-treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="6885" PostHistoryTypeId="3" PostId="1849" RevisionGUID="aa129a7a-4492-4fe7-8e49-46c17aa37c52" CreationDate="2022-04-13T12:37:17.733" UserId="139" Text="|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6886" PostHistoryTypeId="2" PostId="1850" RevisionGUID="38a3a0a1-9623-4793-8ed8-713d845f40d9" CreationDate="2022-04-13T12:41:44.763" UserId="2263" Text="I'm trying to generate documentation for substrate RPC queries using the `meta` property in the `@polkadot/api` library. Something like `api.query.&lt;pallet&gt;.&lt;storageitem/extrinsic&gt;.meta`. This gives me most of the data that i need, except for what appears to the types for the parameters/return type of the RPCs. For these, i seem to be presented with an index mapping like the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  name: 'palletVersion',&#xD;&#xA;  modifier: 'Required',&#xD;&#xA;  type: { plain: 2 },&#xD;&#xA;  fallback: '0x',&#xD;&#xA;  docs: [ 'Returns the current pallet version from storage' ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;For plain types, and for what i assume are custom types (under the &quot;type&quot; key)&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  name: 'Votes',&#xD;&#xA;  modifier: 'Optional',&#xD;&#xA;  type: { map: { hashers: [Array], key: 83, value: 6 } },&#xD;&#xA;  fallback: '0x00',&#xD;&#xA;  docs: [&#xD;&#xA;    ' A lookup mapping (epoch, call_hash) to a bitmask representing the votes for each validator.'&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My question is: What is the most efficient way to dereference these integers (which i assume reference types in a datastructure somewhere) so that my documentation  can easily show the base types required for the parameters and return signature of each RPC call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6888" PostHistoryTypeId="1" PostId="1850" RevisionGUID="38a3a0a1-9623-4793-8ed8-713d845f40d9" CreationDate="2022-04-13T12:41:44.763" UserId="2263" Text="Generate documentation with base types from a substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="6889" PostHistoryTypeId="3" PostId="1850" RevisionGUID="38a3a0a1-9623-4793-8ed8-713d845f40d9" CreationDate="2022-04-13T12:41:44.763" UserId="2263" Text="|substrate-node|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6892" PostHistoryTypeId="2" PostId="1852" RevisionGUID="016ebb8b-3601-4602-8abb-c673df2c1a9e" CreationDate="2022-04-13T12:55:17.227" UserId="472" Text="Having this data in *hex format*, you can decode it using [cargo-contract][1] command line utility simply like this (*run from the contract src folder*):&#xD;&#xA;&#xD;&#xA;    cargo contract decode -d &lt;data_hex_string&gt; -t message &#xD;&#xA;&#xD;&#xA;You can decode event and constructor data in the same way by running it with `-t event` and `-t constructor` accordingly.&#xD;&#xA; &#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="6894" PostHistoryTypeId="2" PostId="1853" RevisionGUID="8f61303f-ef71-4e14-bb31-32904bf65a1b" CreationDate="2022-04-13T13:12:39.737" UserId="620" Text="Can't tell much without seeing your code, but looks like a few things:&#xD;&#xA;&#xD;&#xA;1. `set_balance` requires Root origin, so Council won't be enough, unless you configure your Root origin to be from Council.&#xD;&#xA;2. To dispatch from the Council, you should use `propose`, `vote`, and `close` from the Collective pallet. If approved, then it will [construct the necessary origin](https://github.com/paritytech/substrate/blob/32510e13afa84a2fa917a94e5d7e18d480a34a22/frame/collective/src/lib.rs#L869) and dispatch the call." ContentLicense="CC BY-SA 4.0" />
  <row Id="6896" PostHistoryTypeId="2" PostId="1854" RevisionGUID="70a6adb4-429d-4ff8-9440-31233af33189" CreationDate="2022-04-13T13:40:59.410" UserId="494" Text="During the last [Substrate Builders Program](https://substrate.io/ecosystem/substrate-builders-program/) Office Hours, the [Mangata](https://mangata.finance/) team raised awareness around some potential confusion around the **Substrate Benchmarking System** and how it is being applied in the Polkadot Ecosystem.&#xD;&#xA;&#xD;&#xA;Polkadot Wiki suggests some [Standard Hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#standard-hardware), which are the same as in the [Substrate Docs](https://docs.substrate.io/v3/runtime/benchmarking/).&#xD;&#xA;&#xD;&#xA;Meanwhile, OnFinality Polkadot node hardware has modest 4GB of memory, and go even lower for parachain nodes.&#xD;&#xA;&#xD;&#xA;How do we reconcile those differences?&#xD;&#xA;Can OnFinality's nodes hit bottlenecks earlier than expected, due to their deviation from standard hardware?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6898" PostHistoryTypeId="1" PostId="1854" RevisionGUID="70a6adb4-429d-4ff8-9440-31233af33189" CreationDate="2022-04-13T13:40:59.410" UserId="494" Text="Hardware: Benchmark Standard vs Ecosystem Nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="6899" PostHistoryTypeId="3" PostId="1854" RevisionGUID="70a6adb4-429d-4ff8-9440-31233af33189" CreationDate="2022-04-13T13:40:59.410" UserId="494" Text="|benchmarking|fee|feeless|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6900" PostHistoryTypeId="5" PostId="1845" RevisionGUID="91c18020-6da1-45bc-9bdc-b5455c263fce" CreationDate="2022-04-13T14:07:21.533" UserId="94" Comment="added 108 characters in body" Text="The magic number there is not very helpful, I agree. We will change that [here](https://github.com/paritytech/substrate/issues/11215).  &#xD;&#xA;  &#xD;&#xA;One unit of *weight* is equivalent to `10^-12` seconds.  &#xD;&#xA;Your extrinsic therefore always takes at least 5.774 milliseconds to execute.  &#xD;&#xA;The 38_000 means that the weight of your extrinsic increases linear for each `gas_limit_call` by 38 ns. &#xD;&#xA;&#xD;&#xA;Currently the execution time, storage Reads/Writes and PoV size are the only thing that are measured.  &#xD;&#xA;The weights will also take the PoV size into account [soon](https://github.com/paritytech/substrate/pull/10918).  &#xD;&#xA;&#xD;&#xA;A more detailed report is printed by the node, you should see something like (older versions try `--raw`):  &#xD;&#xA;```pre&#xD;&#xA;Pallet: &quot;pallet_lottery&quot;, Extrinsic: &quot;set_calls&quot;, Lowest values: [], Highest values: [], Steps: 50, Repeat: 20                                                                                                                                 &#xD;&#xA;Raw Storage Info    &#xD;&#xA;========                                                   &#xD;&#xA;Storage: Lottery CallIndices (r:0 w:1)&#xD;&#xA;                                           &#xD;&#xA;Median Slopes Analysis                     &#xD;&#xA;========                         &#xD;&#xA;-- Extrinsic Time --             &#xD;&#xA;                                           &#xD;&#xA;Model:                                     &#xD;&#xA;Time ~=    18.44                 &#xD;&#xA;    + n    0.463                 &#xD;&#xA;              µs                 &#xD;&#xA;                                           &#xD;&#xA;Reads = 0 + (0 * n)              &#xD;&#xA;Writes = 1 + (0 * n)             &#xD;&#xA;                                                     &#xD;&#xA;Min Squares Analysis             &#xD;&#xA;========                         &#xD;&#xA;-- Extrinsic Time --             &#xD;&#xA;                                                     &#xD;&#xA;Data points distribution:        &#xD;&#xA;    n   mean µs  sigma µs       %&#xD;&#xA;    0     17.85     0.127    0.7%          &#xD;&#xA;    1     19.29     0.122    0.6%&#xD;&#xA;    2     19.55     0.113    0.5%                    &#xD;&#xA;    3     19.83     0.246    1.2%&#xD;&#xA;    4     20.36     0.232    1.1%          &#xD;&#xA;    5     20.91     0.138    0.6%                    &#xD;&#xA;    6     21.04     0.133    0.6%                    &#xD;&#xA;    7      21.7     0.133    0.6%                    &#xD;&#xA;    8      22.1     0.155    0.7%                    &#xD;&#xA;    9     22.76     0.232    1.0%                          &#xD;&#xA;   10     22.92     0.196    0.8%                    &#xD;&#xA;                                                     &#xD;&#xA;Quality and confidence:                                    &#xD;&#xA;param     error                                            &#xD;&#xA;n         0.009                                            &#xD;&#xA;&#xD;&#xA;Model:                                                     &#xD;&#xA;Time ~=    18.42                                           &#xD;&#xA;    + n    0.466                                           &#xD;&#xA;              µs                                           &#xD;&#xA;&#xD;&#xA;Reads = 0 + (0 * n)                                        &#xD;&#xA;Writes = 1 + (0 * n) &#xD;&#xA;```&#xD;&#xA;On newer substrate versions its possible to pass in the `--json` or `--json-file &lt;PATH&gt;` flags  &#xD;&#xA;to access the raw results in a machine-readable manner.  &#xD;&#xA;&#xD;&#xA;One final tip: Your `10000000` is also a magic number , you could add a Config value instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="6901" PostHistoryTypeId="2" PostId="1855" RevisionGUID="195a9923-7ed7-4fe9-9cbd-978c7a19ac55" CreationDate="2022-04-13T14:20:40.917" UserId="139" Text="I don't want to keep my keys on the server. I am concerned with best practices whenever it comes to running anything on the cloud, and as such, if I am running a validator node, I realise that I need to provide my keys or at least sign session keys and insert it into the keystore. Can someone show me the best way to go about this? &#xD;&#xA;&#xD;&#xA; 1. Generate a stash/controller pair from a secret seed on local machine. Done.&#xD;&#xA; 2. Start a node on a cloud instance with `--validator` flag. Done.&#xD;&#xA; 3. Generate session keys by calling rotateKeys() like so : `curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;author_rotateKeys&quot;, &quot;params&quot;:[]}' http://localhost:9933`. Done.&#xD;&#xA; 4. How to sign this key and insert it into the keystore? &#xD;&#xA; 5. Anything else that's required for the block production/validation to begin? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6903" PostHistoryTypeId="1" PostId="1855" RevisionGUID="195a9923-7ed7-4fe9-9cbd-978c7a19ac55" CreationDate="2022-04-13T14:20:40.917" UserId="139" Text="How can I generate and sign session keys and insert it to the keystore before starting my node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6904" PostHistoryTypeId="3" PostId="1855" RevisionGUID="195a9923-7ed7-4fe9-9cbd-978c7a19ac55" CreationDate="2022-04-13T14:20:40.917" UserId="139" Text="|substrate-node|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6905" PostHistoryTypeId="2" PostId="1856" RevisionGUID="a6f5f312-1852-44cb-b251-c38eab34711a" CreationDate="2022-04-13T14:27:09.903" UserId="2286" Text="my question is regarding Polkadot, I need to get the value of any &quot;transfer&quot; transactions and there's no problem with it with &quot;transfer_keep_alive&quot; and &quot;transfer&quot; transactions. On &quot;transfer_all&quot;, however, extrinsics don't contain the &quot;value&quot;. I got a clue that I need to get events of a block via ```state_getStorage``` RPC method, but I'm struggling with which keys I should provide as params. There's not much info in docs about it. Also, I'm not using a polkadot-js lib and only use HTTP RPC requests. How do I get the events for the block via ```state_getStorage``` method?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6907" PostHistoryTypeId="1" PostId="1856" RevisionGUID="a6f5f312-1852-44cb-b251-c38eab34711a" CreationDate="2022-04-13T14:27:09.903" UserId="2286" Text="How to get the value of a &quot;transfer_all&quot; transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6908" PostHistoryTypeId="3" PostId="1856" RevisionGUID="a6f5f312-1852-44cb-b251-c38eab34711a" CreationDate="2022-04-13T14:27:09.903" UserId="2286" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6909" PostHistoryTypeId="2" PostId="1857" RevisionGUID="575466c5-bc6e-449b-b234-eb30c6da9a99" CreationDate="2022-04-13T14:34:56.763" UserId="1959" Text="XCM version: 3&#xD;&#xA;&#xD;&#xA;### 1. I bought 3_000_000 weight, but it might actually only need 3000 weight, how can I refund the fees of (3_000_000-3000) weight?&#xD;&#xA;```rust&#xD;&#xA;ParaA::execute_with(|| {&#xD;&#xA;	let message = Xcm(vec![&#xD;&#xA;	    WithdrawAsset(&#xD;&#xA;		    (Here, send_amount).into(),&#xD;&#xA;	    ),&#xD;&#xA;	    BuyExecution { fees: (Here, send_amount).into(), weight_limit: Limited(3_000_000) },&#xD;&#xA;	    DepositAsset { assets: All.into(), beneficiary: Parachain(2).into() },&#xD;&#xA;	]);&#xD;&#xA;	// Send withdraw and deposit&#xD;&#xA;	assert_ok!(ParachainPalletXcm::send_xcm(Here, Parent, message.clone()));&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;### 2. I can use `RefundSurplus` in `ErrorHandler`, but it seems that the refund surplus only related to the count of instructions after the `Trap`, even though I bought far more weight than needed. For example `RefundSurplus` of code(1) get more refund than code(2) only because of it has more instructions than code(2) after `Trap`, right? &#xD;&#xA;code 1:&#xD;&#xA;```rust&#xD;&#xA;ParaA::execute_with(|| {&#xD;&#xA;	let message = Xcm(vec![&#xD;&#xA;	    WithdrawAsset(&#xD;&#xA;		    (Here, send_amount).into(),&#xD;&#xA;	    ),&#xD;&#xA;	    BuyExecution { fees: (Here, send_amount).into(), weight_limit: Limited(3_000_000) },&#xD;&#xA;        SetErrorHandler(Xcm(vec![&#xD;&#xA;			RefundSurplus,&#xD;&#xA;			DepositAsset { assets: All.into(), beneficiary: Parachain(2).into() },&#xD;&#xA;		])),&#xD;&#xA;		Trap(0),&#xD;&#xA;	    DepositAsset { assets: All.into(), beneficiary: Parachain(2).into() },&#xD;&#xA;        DepositAsset { assets: All.into(), beneficiary: Parachain(2).into() },&#xD;&#xA;        DepositAsset { assets: All.into(), beneficiary: Parachain(2).into() },&#xD;&#xA;	]);&#xD;&#xA;	// Send withdraw and deposit&#xD;&#xA;	assert_ok!(ParachainPalletXcm::send_xcm(Here, Parent, message.clone()));&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;code 2:&#xD;&#xA;```rust&#xD;&#xA;ParaA::execute_with(|| {&#xD;&#xA;	let message = Xcm(vec![&#xD;&#xA;	    WithdrawAsset(&#xD;&#xA;		    (Here, send_amount).into(),&#xD;&#xA;	    ),&#xD;&#xA;	    BuyExecution { fees: (Here, send_amount).into(), weight_limit: Limited(3_000_000) },&#xD;&#xA;        SetErrorHandler(Xcm(vec![&#xD;&#xA;			RefundSurplus,&#xD;&#xA;			DepositAsset { assets: All.into(), beneficiary: Parachain(2).into() },&#xD;&#xA;		])),&#xD;&#xA;		Trap(0),&#xD;&#xA;	    DepositAsset { assets: All.into(), beneficiary: Parachain(2).into() },&#xD;&#xA;	]);&#xD;&#xA;	// Send withdraw and deposit&#xD;&#xA;	assert_ok!(ParachainPalletXcm::send_xcm(Here, Parent, message.clone()));&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6911" PostHistoryTypeId="1" PostId="1857" RevisionGUID="575466c5-bc6e-449b-b234-eb30c6da9a99" CreationDate="2022-04-13T14:34:56.763" UserId="1959" Text="How do I request a refund for the purchase of additional weight in XCM ？(not just for instructions that were never dispatched)" ContentLicense="CC BY-SA 4.0" />
  <row Id="6912" PostHistoryTypeId="3" PostId="1857" RevisionGUID="575466c5-bc6e-449b-b234-eb30c6da9a99" CreationDate="2022-04-13T14:34:56.763" UserId="1959" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6913" PostHistoryTypeId="2" PostId="1858" RevisionGUID="d3dbb233-d139-4363-9128-fc194e2c60f8" CreationDate="2022-04-13T14:53:26.107" UserId="620" Text="You can just use [Substrate API Sidecar's](https://github.com/paritytech/substrate-api-sidecar) `GET block` endpoint. It will give you all the events associated with each extrinsic.&#xD;&#xA;&#xD;&#xA;Sidecar is stateless and requires very few system resources. Just give it a WS connection to a node and use the [Sidecar API](https://paritytech.github.io/substrate-api-sidecar/dist/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="6915" PostHistoryTypeId="2" PostId="1859" RevisionGUID="0627ce51-8411-4762-808d-36ec3d0a645f" CreationDate="2022-04-13T15:03:08.987" UserId="94" Text="The hardware requirements that you found are correct.  &#xD;&#xA;&#xD;&#xA;There are multiple things to consider when thinking about hardware requirements.  &#xD;&#xA;&#xD;&#xA;## Type Of The Node  &#xD;&#xA;The hardware requirements are aimed at **Validators** which participate in the consensus.  &#xD;&#xA;They need to execute time-critical calculations and can be *slashed* for not meeting the deadlines.  &#xD;&#xA;In order to have some baseline to calculating the deadlines, we opted for a *reference* hardware.  &#xD;&#xA;Ultimately this is only guideline and you can make your own choice.  &#xD;&#xA;Parity just provides these requirements as a reference, not a hard requirement.&#xD;&#xA;&#xD;&#xA;**Archive** nodes and **pruning** nodes can basically use any hardware they see fit since they are not consensus relevant.  &#xD;&#xA;&#xD;&#xA;**Custom indexer** have to measure their own requirements.  &#xD;&#xA;Since most blocks are currently not full, you can probably use very cheap hardware.&#xD;&#xA;&#xD;&#xA;## Chain Usage&#xD;&#xA;&#xD;&#xA;Polkadot blocks are mostly not even close to their maximum possible weight.  &#xD;&#xA;Since the reference hardware is designed for 100% chain usage,&#xD;&#xA;this translates to much less resource usage than to what is possible,  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Regarding your concrete question:  &#xD;&#xA;&gt; Can OnFinality's nodes hit bottlenecks earlier than expected, due to their deviation from standard hardware? &#xD;&#xA;&#xD;&#xA;Yes, it is possible that they would not keep up if the chain usage surges and they are using subpar hardware.  &#xD;&#xA;In this case its on them to make sure that this does not happen." ContentLicense="CC BY-SA 4.0" />
  <row Id="6917" PostHistoryTypeId="2" PostId="1860" RevisionGUID="b2714b3b-bedb-44ca-933d-0020241ac111" CreationDate="2022-04-13T15:53:41.023" UserId="85" Text="How do I see what xcmp channels are set up between parachains on kusama and polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6919" PostHistoryTypeId="1" PostId="1860" RevisionGUID="b2714b3b-bedb-44ca-933d-0020241ac111" CreationDate="2022-04-13T15:53:41.023" UserId="85" Text="How do I see what channels are set up between parachains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6920" PostHistoryTypeId="3" PostId="1860" RevisionGUID="b2714b3b-bedb-44ca-933d-0020241ac111" CreationDate="2022-04-13T15:53:41.023" UserId="85" Text="|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6921" PostHistoryTypeId="2" PostId="1861" RevisionGUID="8fd1e126-59c5-4d01-8353-750dfa0fcac0" CreationDate="2022-04-13T15:54:30.487" UserId="85" Text="There's a great visualisation of the kusama channels set up here:&#xD;&#xA;&#xD;&#xA;https://dotsama-channels.vercel.app/#/" ContentLicense="CC BY-SA 4.0" />
  <row Id="6923" PostHistoryTypeId="5" PostId="1855" RevisionGUID="f2ac1d77-0d9e-46e0-8258-8fccf7e71c64" CreationDate="2022-04-13T17:36:38.987" UserId="139" Comment="added 250 characters in body" Text="I don't want to keep my keys on the server. I am concerned with best practices whenever it comes to running anything on the cloud, and as such, if I am running a validator node, I realise that I need to provide my keys or at least sign session keys and insert it into the keystore. Can someone show me the best way to go about this? &#xD;&#xA;&#xD;&#xA; 1. Generate a stash/controller pair from a secret seed on local machine. Done.&#xD;&#xA; 2. Start a node on a cloud instance with `--validator` flag. Done.&#xD;&#xA; 3. Generate session keys by calling rotateKeys() like so : `curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;author_rotateKeys&quot;, &quot;params&quot;:[]}' http://localhost:9933`. Done.&#xD;&#xA; 4. How to sign this key and insert it into the keystore? &#xD;&#xA; 5. Anything else that's required for the block production/validation to begin? &#xD;&#xA;&#xD;&#xA;Edit #1 : I see this tool https://github.com/polkadot-js/tools/tree/master/packages/signer-cli for signing messages offline. Can it be used to sign a session key and send it to the chain keystore? Can someone show how if this is indeed possible? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6924" PostHistoryTypeId="2" PostId="1862" RevisionGUID="978b3c74-baea-467c-bd23-4786dafbfa2b" CreationDate="2022-04-13T18:18:02.490" UserId="1803" Text="Our goal is to migrate pallet code to the newer Substrate version and keep the block history (since ~ august 2020).&#xD;&#xA;&#xD;&#xA;[Old Substrate ver. (10.02.2021)][1] -&gt; [New Substrate ver. (14.01.2022)][2]&#xD;&#xA;&#xD;&#xA;For such purpose, we've created a brand new repo with the new structure and newer Substrate version. Recently the code migration was finished. &#xD;&#xA;&#xD;&#xA;Right now, we are trying to upgrade the runtime of our testnet nodes and getting the `FailedToExtractRuntimeVersion` error while calling `setCode` extrinsic.&#xD;&#xA;&#xD;&#xA;**What should be changed in the runtime from the new repo** in order to generate a valid Wasm which will be accepted by the node? &#xD;&#xA;&#xD;&#xA;Attributes `spec_name`, `spec_version`, and `authoring_version` are the same between Wasm and native.&#xD;&#xA;&#xD;&#xA;**Should we update the node (native binary) first?**&#xD;&#xA;&#xD;&#xA;We tried to do so and run the new node with the original `chain_spec`, but JSON structure was different (got `unknown key` errors).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/commit/49a4103f4bfef55be20a5c6d26e18ff3003c3353&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/commit/afb74de23dfe2994e7ce38c0870efb9734e966f7" ContentLicense="CC BY-SA 4.0" />
  <row Id="6926" PostHistoryTypeId="1" PostId="1862" RevisionGUID="978b3c74-baea-467c-bd23-4786dafbfa2b" CreationDate="2022-04-13T18:18:02.490" UserId="1803" Text="Runtime upgrade error: system.FailedToExtractRuntimeVersion" ContentLicense="CC BY-SA 4.0" />
  <row Id="6927" PostHistoryTypeId="3" PostId="1862" RevisionGUID="978b3c74-baea-467c-bd23-4786dafbfa2b" CreationDate="2022-04-13T18:18:02.490" UserId="1803" Text="|substrate-node|runtime-upgrade|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6928" PostHistoryTypeId="2" PostId="1863" RevisionGUID="753c633a-4abc-4fda-bbf9-0650e4e3583b" CreationDate="2022-04-13T19:52:00.453" UserId="298" Text="The current lease is 20 on Kusama. &#xD;&#xA;&#xD;&#xA;We have elected to go for leases 22-29.&#xD;&#xA;&#xD;&#xA;The upcoming auction is #33&#xD;&#xA;&#xD;&#xA;This next auction is bidding for leases 21-28. (We have locked in 22-29). &#xD;&#xA;&#xD;&#xA;Please check the below statements if they’re correct:&#xD;&#xA;&#xD;&#xA;0) Are we able to bid in the next auction?&#xD;&#xA;&#xD;&#xA;1) Therefore we can only bid for 22-28, correct. &#xD;&#xA;&#xD;&#xA;2) If so how much more do we need to bid in total to beat a competitor? Given that we are missing the 21st lease. Or is it the other way round and we don’t need as much total bid? &#xD;&#xA;&#xD;&#xA;3) how do we bid for the missing 29th lease period?&#xD;&#xA;&#xD;&#xA;4) can a chain bid in auction without being in a crowdloan? If so are they bidding as an individual?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6930" PostHistoryTypeId="1" PostId="1863" RevisionGUID="753c633a-4abc-4fda-bbf9-0650e4e3583b" CreationDate="2022-04-13T19:52:00.453" UserId="298" Text="Questions about crowdloan process questions: Can we bid in the next auction even though our starting lease is 2 leases away?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6931" PostHistoryTypeId="3" PostId="1863" RevisionGUID="753c633a-4abc-4fda-bbf9-0650e4e3583b" CreationDate="2022-04-13T19:52:00.453" UserId="298" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6932" PostHistoryTypeId="4" PostId="1863" RevisionGUID="4e6977c7-8db7-4a0c-9951-d8d0ce6c8e57" CreationDate="2022-04-13T20:36:05.713" UserId="298" Comment="edited title" Text="Can we bid in the next auction even though our starting lease is 2 leases away?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6933" PostHistoryTypeId="2" PostId="1864" RevisionGUID="a34fc64a-3124-414f-8e4f-34abb0ce29ce" CreationDate="2022-04-13T20:39:21.777" UserId="1904" Text="I would like to know the recommended way to benchmark a chain extension, and then how to charge the calculated weight. According to [this document][1], we need to write benchmarks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/pallet_contracts/chain_extension/index.html#benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="6935" PostHistoryTypeId="1" PostId="1864" RevisionGUID="a34fc64a-3124-414f-8e4f-34abb0ce29ce" CreationDate="2022-04-13T20:39:21.777" UserId="1904" Text="How to benchmark a chain extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6936" PostHistoryTypeId="3" PostId="1864" RevisionGUID="a34fc64a-3124-414f-8e4f-34abb0ce29ce" CreationDate="2022-04-13T20:39:21.777" UserId="1904" Text="|runtime|smart-contract|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6937" PostHistoryTypeId="2" PostId="1865" RevisionGUID="afe78cf1-a55a-45bd-9cb3-39b9149be408" CreationDate="2022-04-13T20:40:20.060" UserId="2163" Text="I am currently looking at the assets pallet and I don't really understand what the touch method does. Hope someone can explain it to me. Thanks!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6939" PostHistoryTypeId="1" PostId="1865" RevisionGUID="afe78cf1-a55a-45bd-9cb3-39b9149be408" CreationDate="2022-04-13T20:40:20.060" UserId="2163" Text="Substrate assets pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="6940" PostHistoryTypeId="3" PostId="1865" RevisionGUID="afe78cf1-a55a-45bd-9cb3-39b9149be408" CreationDate="2022-04-13T20:40:20.060" UserId="2163" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6943" PostHistoryTypeId="2" PostId="1866" RevisionGUID="e991bcb0-7d09-43b9-beab-b7e172d5478f" CreationDate="2022-04-14T02:56:07.780" UserId="2293" Text="Is there any way I can get the state of the extrinsic when I initiate the call before the block is finalized?&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="6945" PostHistoryTypeId="1" PostId="1866" RevisionGUID="e991bcb0-7d09-43b9-beab-b7e172d5478f" CreationDate="2022-04-14T02:56:07.780" UserId="2293" Text="Transaction hash when call extrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="6946" PostHistoryTypeId="3" PostId="1866" RevisionGUID="e991bcb0-7d09-43b9-beab-b7e172d5478f" CreationDate="2022-04-14T02:56:07.780" UserId="2293" Text="|polkadot-js|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6948" PostHistoryTypeId="2" PostId="1867" RevisionGUID="443ce80c-325c-47e5-8627-4a153473dd5c" CreationDate="2022-04-14T03:09:23.940" UserId="301" Text="I have a same call with same era,nonce,tip, and a same signer. the SignedPayload is construct by call and Extra(era,nonce,tip here), so the payload should be unchanged. but in polkadot.js I checked the signature in two trying is different.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;this is two diffrent encoded result:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;My questionn is are there any other factor decide the signature beside signer,call and SignedExtrension?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/FPI7f.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/p1vja.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="6950" PostHistoryTypeId="1" PostId="1867" RevisionGUID="443ce80c-325c-47e5-8627-4a153473dd5c" CreationDate="2022-04-14T03:09:23.940" UserId="301" Text="Why signature diverse with same additon signed of SignedExtension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6951" PostHistoryTypeId="3" PostId="1867" RevisionGUID="443ce80c-325c-47e5-8627-4a153473dd5c" CreationDate="2022-04-14T03:09:23.940" UserId="301" Text="|polkadot-js|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6952" PostHistoryTypeId="2" PostId="1868" RevisionGUID="0e6e51c1-b418-4cb0-9ee0-be6073b76361" CreationDate="2022-04-14T03:38:13.743" UserId="627" Text="In sr25519 the signatures are non-deterministic. That means for the same input it will generate different signatures each time it is called.&#xD;&#xA;&#xD;&#xA;This is different from ed25519 and secp256k1 where the same data always yields the same signature." ContentLicense="CC BY-SA 4.0" />
  <row Id="6954" PostHistoryTypeId="2" PostId="1869" RevisionGUID="bf87a37d-ea8e-416e-82bc-95837ee503e0" CreationDate="2022-04-14T05:56:44.437" UserId="609" Text="In short, the 'touch' method creates a new &quot;Asset Account&quot; for the &quot;User Account&quot;.&#xD;&#xA;&#xD;&#xA;I suspect that the 'touch' name comes from the unix command called 'touch' which creates a new file if it does not exist already. (sort of, dont worry about it).&#xD;&#xA;&#xD;&#xA;In the v4.0.0-dev source for the asset pallet, you can see in the lib.rs that 'Touch' calls 'do_touch', which we can find in functions.rs.&#xD;&#xA;&#xD;&#xA;If we look at that do_touch function, we can see that it checks if the &quot;User Account&quot; already has an entry for the &quot;Asset Account&quot;, and if it does not it inserts a new &quot;Asset Account&quot; for the &quot;User Account&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="6956" PostHistoryTypeId="2" PostId="1870" RevisionGUID="b77a7e2b-0997-47de-9c19-1af365ce84c1" CreationDate="2022-04-14T06:52:56.010" UserId="1838" Text="No specific data migration logic for this pallet. but the data retrieved by the chain state has changed.&#xD;&#xA;here is code logic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub enum MyEnum {&#xD;&#xA;	A,&#xD;&#xA;	B,&#xD;&#xA;	C,&#xD;&#xA;	D,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, Copy, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct MyStruct&lt;&#xD;&#xA;	Balance: Encode + Decode + Clone + Debug + Eq + PartialEq,&#xD;&#xA;	AccountId: Encode + Decode + Clone + Debug + Eq + PartialEq,&#xD;&#xA;&gt; {&#xD;&#xA;	pub account: AccountId,&#xD;&#xA;&#xD;&#xA;	pub cost: Balance,&#xD;&#xA;&#xD;&#xA;	pub action: MyEnum,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn action_list)]&#xD;&#xA;pub(super) type ActionListOf&lt;T: Config&gt; =&#xD;&#xA;StorageMap&lt;_, Blake2_128Concat, MyEnum, Vec&lt;Option&lt;MyStruct&lt;BalanceOf&lt;T&gt;, T::AccountId&gt;&gt;&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;before the upgrade, the retrieved data of the chain state is as follows:&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      B&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        account: 5HgtRNQxpttSomysgAsGgYmohdMD8knPBt8HtR5EH3neLbvV&#xD;&#xA;        fee: 100,000,000,000,000,0&#xD;&#xA;        action: B&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After the upgrade, the retrieved data of the chain state is as follows:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      A&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        account: 5HgtRNQxpttSomysgAsGgYmohdMD8knPBt8HtR5EH3neLbvV&#xD;&#xA;        fee: 100,000,000,000,000,0&#xD;&#xA;        action: B&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The key in the StorageMap has changed, how to fix this problem？&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6958" PostHistoryTypeId="1" PostId="1870" RevisionGUID="b77a7e2b-0997-47de-9c19-1af365ce84c1" CreationDate="2022-04-14T06:52:56.010" UserId="1838" Text="upgrade runtime, the stored data has changed" ContentLicense="CC BY-SA 4.0" />
  <row Id="6959" PostHistoryTypeId="3" PostId="1870" RevisionGUID="b77a7e2b-0997-47de-9c19-1af365ce84c1" CreationDate="2022-04-14T06:52:56.010" UserId="1838" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6960" PostHistoryTypeId="5" PostId="1870" RevisionGUID="bbb23852-0fd2-430d-82e9-eb377b6bd61c" CreationDate="2022-04-14T07:04:25.883" UserId="1838" Comment="deleted 2 characters in body" Text="No custom data migration logic for this pallet. but the data retrieved by the chain state has changed.&#xD;&#xA;here is code logic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub enum MyEnum {&#xD;&#xA;	A,&#xD;&#xA;	B,&#xD;&#xA;	C,&#xD;&#xA;	D,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, Copy, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct MyStruct&lt;&#xD;&#xA;	Balance: Encode + Decode + Clone + Debug + Eq + PartialEq,&#xD;&#xA;	AccountId: Encode + Decode + Clone + Debug + Eq + PartialEq,&#xD;&#xA;&gt; {&#xD;&#xA;	pub account: AccountId,&#xD;&#xA;&#xD;&#xA;	pub cost: Balance,&#xD;&#xA;&#xD;&#xA;	pub action: MyEnum,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn action_list)]&#xD;&#xA;pub(super) type ActionListOf&lt;T: Config&gt; =&#xD;&#xA;StorageMap&lt;_, Blake2_128Concat, MyEnum, Vec&lt;Option&lt;MyStruct&lt;BalanceOf&lt;T&gt;, T::AccountId&gt;&gt;&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;before the upgrade, the retrieved data of the chain state is as follows:&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      B&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        account: 5HgtRNQxpttSomysgAsGgYmohdMD8knPBt8HtR5EH3neLbvV&#xD;&#xA;        fee: 100,000,000,000,000,0&#xD;&#xA;        action: B&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After the upgrade, the retrieved data of the chain state is as follows:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      A&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        account: 5HgtRNQxpttSomysgAsGgYmohdMD8knPBt8HtR5EH3neLbvV&#xD;&#xA;        fee: 100,000,000,000,000,0&#xD;&#xA;        action: B&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The key in the StorageMap has changed, how to fix this problem？&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6962" PostHistoryTypeId="2" PostId="1871" RevisionGUID="061551b3-8d02-4314-858e-31be0a6c8746" CreationDate="2022-04-14T07:35:47.300" UserId="139" Text="[In this video Joe Petrowski][1] demonstrates a command which allows us to set a stake and also choose a reward destination. But unfortunately some of the command gets obscured by their video picture. Can someone write down the full command which we can use to send these  staking bond transactions? Also setting the session keys using the signer would be very helpful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://youtu.be/ejgPSwdLj5o?t=1130" ContentLicense="CC BY-SA 4.0" />
  <row Id="6964" PostHistoryTypeId="1" PostId="1871" RevisionGUID="061551b3-8d02-4314-858e-31be0a6c8746" CreationDate="2022-04-14T07:35:47.300" UserId="139" Text="What are the set cli commands to stake on a validator node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6965" PostHistoryTypeId="3" PostId="1871" RevisionGUID="061551b3-8d02-4314-858e-31be0a6c8746" CreationDate="2022-04-14T07:35:47.300" UserId="139" Text="|polkadot-js|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6966" PostHistoryTypeId="2" PostId="1872" RevisionGUID="7afedea0-36cb-4bd9-b096-6a204511ddb8" CreationDate="2022-04-14T07:41:51.783" UserId="523" Text="it is in pending queue before finized, you may try some blockchain explorer like [subscan](https://kusama.subscan.io/extrinsic)" ContentLicense="CC BY-SA 4.0" />
  <row Id="6968" PostHistoryTypeId="2" PostId="1873" RevisionGUID="670d2c20-54f5-4aae-b079-9a542078d225" CreationDate="2022-04-14T07:42:41.583" UserId="180" Text="In this [code][1], we can see the `pallet::compact` is used. So why we need this instruction?&#xD;&#xA;&#xD;&#xA;quotes code:&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(1_000)]&#xD;&#xA;    		pub fn transfer(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			to: T::AccountId,&#xD;&#xA;    			#[pallet::compact] amount: T::Balance,&#xD;&#xA;    		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    			let sender = ensure_signed(origin)?;&#xD;&#xA;    			let sender_balance = Self::get_balance(&amp;sender);&#xD;&#xA;    			let receiver_balance = Self::get_balance(&amp;to);&#xD;&#xA;    &#xD;&#xA;    			// Calculate new balances.&#xD;&#xA;    			let update_sender = sender_balance.saturating_sub(amount);&#xD;&#xA;    			let update_to = receiver_balance.saturating_add(amount);&#xD;&#xA;    &#xD;&#xA;    			// Update both accounts storage.&#xD;&#xA;    			&lt;BalanceToAccount&lt;T&gt;&gt;::insert(&amp;sender, update_sender);&#xD;&#xA;    			&lt;BalanceToAccount&lt;T&gt;&gt;::insert(&amp;to, update_to);&#xD;&#xA;    &#xD;&#xA;    			// Emit event.&#xD;&#xA;    			Self::deposit_event(Event::Transferred(sender, to, amount));&#xD;&#xA;    			Ok(().into())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-how-to-guides/blob/main/example-code/template-node/pallets/mint-token/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="6970" PostHistoryTypeId="1" PostId="1873" RevisionGUID="670d2c20-54f5-4aae-b079-9a542078d225" CreationDate="2022-04-14T07:42:41.583" UserId="180" Text="What is the meaning of pallet::compact in Pallet development" ContentLicense="CC BY-SA 4.0" />
  <row Id="6971" PostHistoryTypeId="3" PostId="1873" RevisionGUID="670d2c20-54f5-4aae-b079-9a542078d225" CreationDate="2022-04-14T07:42:41.583" UserId="180" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6972" PostHistoryTypeId="2" PostId="1874" RevisionGUID="0f9ff79f-e2c6-41eb-8eb4-0673a49bbb85" CreationDate="2022-04-14T08:29:29.100" UserId="523" Text="0. no&#xD;&#xA;1. yes&#xD;&#xA;2. hard to say depends on your competitor,the auction will just pickup winner(s) for it's best earning &#xD;&#xA;3. you can create another crowdloan for the missing period or just bid individually as mentioned &#xD;&#xA;4. same as 3 " ContentLicense="CC BY-SA 4.0" />
  <row Id="6974" PostHistoryTypeId="2" PostId="1875" RevisionGUID="b47a1b01-b0ac-4e38-8f3f-239c90e928f9" CreationDate="2022-04-14T08:56:03.120" UserId="499" Text="It looks like you can do something like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;let query = api.query[pallet][storage].meta;&#xD;&#xA;let valueType = (query.type.isMap) ? query.type.asMap.value.toJSON() : query.type.asPlain.toJSON();&#xD;&#xA;let valueTypeDef = api.registry.metadata.lookup.getTypeDef(valueType).type;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I took this from the OP of [this issue](https://github.com/polkadot-js/api/issues/4445).&#xD;&#xA;&#xD;&#xA;It should give you the string representation of the type, which you can use in your documentation. The above example solves for the value but you can do the same for the key." ContentLicense="CC BY-SA 4.0" />
  <row Id="6976" PostHistoryTypeId="2" PostId="1876" RevisionGUID="75c04855-0b64-49da-8ea9-50e37725d461" CreationDate="2022-04-14T08:56:18.160" UserId="73" Text="`pallet::compact` is just a &quot;shortcut&quot; for writing `Compact&lt;T::Balance&gt;`.&#xD;&#xA;&#xD;&#xA;[Compact][1] is a wrapper defined by `parity-scale-codec` to compact integers when being stored in their encoded format. So, that the entire transaction is a little bit smaller. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/parity-scale-codec/latest/parity_scale_codec/struct.Compact.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="6978" PostHistoryTypeId="5" PostId="1870" RevisionGUID="83d7b052-c12c-4eb2-abe1-c4f52c560600" CreationDate="2022-04-14T09:42:49.683" UserId="1838" Comment="added 88 characters in body" Text="No custom data migration logic for this pallet. but the data retrieved by the chain state has changed.&#xD;&#xA;here is code logic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub enum MyEnum {&#xD;&#xA;	A,&#xD;&#xA;	B,&#xD;&#xA;	C,&#xD;&#xA;	D,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, Copy, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct MyStruct&lt;&#xD;&#xA;	Balance: Encode + Decode + Clone + Debug + Eq + PartialEq,&#xD;&#xA;	AccountId: Encode + Decode + Clone + Debug + Eq + PartialEq,&#xD;&#xA;&gt; {&#xD;&#xA;	pub account: AccountId,&#xD;&#xA;&#xD;&#xA;	pub cost: Balance,&#xD;&#xA;&#xD;&#xA;	pub action: MyEnum,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn action_list)]&#xD;&#xA;pub(super) type ActionListOf&lt;T: Config&gt; =&#xD;&#xA;StorageMap&lt;_, Blake2_128Concat, MyEnum, Vec&lt;Option&lt;MyStruct&lt;BalanceOf&lt;T&gt;, T::AccountId&gt;&gt;&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;before the upgrade, the retrieved data of the chain state is as follows:&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      B&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        account: 5HgtRNQxpttSomysgAsGgYmohdMD8knPBt8HtR5EH3neLbvV&#xD;&#xA;        fee: 100,000,000,000,000,0&#xD;&#xA;        action: B&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After the upgrade, the retrieved data of the chain state is as follows:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      A&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        account: 5HgtRNQxpttSomysgAsGgYmohdMD8knPBt8HtR5EH3neLbvV&#xD;&#xA;        fee: 100,000,000,000,000,0&#xD;&#xA;        action: B&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The key in the StorageMap has changed, how to fix this problem？&#xD;&#xA;&#xD;&#xA;commit checklist QA:&#xD;&#xA;&#xD;&#xA; 1. no update code for this pallet&#xD;&#xA; 2. update system weight&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6979" PostHistoryTypeId="2" PostId="1877" RevisionGUID="6cf1302e-fa1b-4684-a623-aa6eff7aec57" CreationDate="2022-04-14T10:38:17.103" UserId="544" Text="You can insert the pre-generated session keys to the node by calling rpc `author_insertKey`. However you will need to take care of the encoding of the keys, since the content of the session keys in different chains may vary. I would suggest to insert the key with Polkadot.js. Here's an example:&#xD;&#xA;&#xD;&#xA;https://github.com/Phala-Network/khala-parachain/blob/main/scripts/js/insert_session_key.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="6981" PostHistoryTypeId="2" PostId="1878" RevisionGUID="0ba6ca40-526a-42e6-b989-714a8a13a37f" CreationDate="2022-04-14T11:26:33.550" UserId="1789" Text="&#xD;&#xA;&#xD;&#xA;        Compiling polkadot-runtime v0.9.18 (https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c982)&#xD;&#xA;       Compiling kusama-runtime v0.9.18 (https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c982)&#xD;&#xA;       Compiling paid-chain-runtime v0.0.1 (/mnt/sda3/polkadot/1paidchain/runtime)&#xD;&#xA;        Checking ethereum v0.12.0&#xD;&#xA;    error[E0277]: the trait bound `H256: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39&#xD;&#xA;        |&#xD;&#xA;    10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)&#xD;&#xA;        |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H256`&#xD;&#xA;        |&#xD;&#xA;    note: required by a bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13&#xD;&#xA;        |&#xD;&#xA;    382 |         TY: TypeInfo + 'static + ?Sized,&#xD;&#xA;        |             ^^^^^^^^ required by this bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;        = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `H160: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39&#xD;&#xA;        |&#xD;&#xA;    10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)&#xD;&#xA;        |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H160`&#xD;&#xA;        |&#xD;&#xA;    note: required by a bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13&#xD;&#xA;        |&#xD;&#xA;    382 |         TY: TypeInfo + 'static + ?Sized,&#xD;&#xA;        |             ^^^^^^^^ required by this bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;        = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `Bloom: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39&#xD;&#xA;        |&#xD;&#xA;    10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)&#xD;&#xA;        |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `Bloom`&#xD;&#xA;        |&#xD;&#xA;    note: required by a bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13&#xD;&#xA;        |&#xD;&#xA;    382 |         TY: TypeInfo + 'static + ?Sized,&#xD;&#xA;        |             ^^^^^^^^ required by this bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;        = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `ethereum_types::U256: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.&#xD;&#xA;&#xD;&#xA;rs:10:39&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6983" PostHistoryTypeId="1" PostId="1878" RevisionGUID="0ba6ca40-526a-42e6-b989-714a8a13a37f" CreationDate="2022-04-14T11:26:33.550" UserId="1789" Text="Frontier(pallet-ethereum) project failed to compile after updating from polkadot-v0.9.17 to v0.9.18" ContentLicense="CC BY-SA 4.0" />
  <row Id="6984" PostHistoryTypeId="3" PostId="1878" RevisionGUID="0ba6ca40-526a-42e6-b989-714a8a13a37f" CreationDate="2022-04-14T11:26:33.550" UserId="1789" Text="|polkadot|rust|evm|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6985" PostHistoryTypeId="4" PostId="1865" RevisionGUID="ef6806c2-648b-4604-b141-60379b7620de" CreationDate="2022-04-14T11:27:23.490" UserId="544" Comment="Clarify the question" Text="What does `touch` method do in assets pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6986" PostHistoryTypeId="6" PostId="1865" RevisionGUID="ef6806c2-648b-4604-b141-60379b7620de" CreationDate="2022-04-14T11:27:23.490" UserId="544" Comment="Clarify the question" Text="|pallet|pallet-assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6987" PostHistoryTypeId="24" PostId="1865" RevisionGUID="ef6806c2-648b-4604-b141-60379b7620de" CreationDate="2022-04-14T11:27:23.490" Comment="Proposed by 544 approved by 45, 2163 edit id of 159" ContentLicense="CC BY-SA 4.0" />
  <row Id="6992" PostHistoryTypeId="5" PostId="1878" RevisionGUID="1f1f1711-e937-4223-88ca-66e99687f82e" CreationDate="2022-04-14T11:32:04.777" UserId="1789" Comment="added 572 characters in body; edited title" Text="Frontier(pallet-ethereum) project failed to compile after updating from polkadot-v0.9.17 to v0.9.18&#xD;&#xA;&#xD;&#xA;        Compiling polkadot-runtime v0.9.18 (https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c982)&#xD;&#xA;       Compiling kusama-runtime v0.9.18 (https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c982)&#xD;&#xA;       Compiling paid-chain-runtime v0.0.1 (/mnt/sda3/polkadot/1paidchain/runtime)&#xD;&#xA;        Checking ethereum v0.12.0&#xD;&#xA;    error[E0277]: the trait bound `H256: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39&#xD;&#xA;        |&#xD;&#xA;    10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)&#xD;&#xA;        |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H256`&#xD;&#xA;        |&#xD;&#xA;    note: required by a bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13&#xD;&#xA;        |&#xD;&#xA;    382 |         TY: TypeInfo + 'static + ?Sized,&#xD;&#xA;        |             ^^^^^^^^ required by this bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;        = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `H160: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39&#xD;&#xA;        |&#xD;&#xA;    10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)&#xD;&#xA;        |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H160`&#xD;&#xA;        |&#xD;&#xA;    note: required by a bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13&#xD;&#xA;        |&#xD;&#xA;    382 |         TY: TypeInfo + 'static + ?Sized,&#xD;&#xA;        |             ^^^^^^^^ required by this bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;        = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `Bloom: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39&#xD;&#xA;        |&#xD;&#xA;    10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)&#xD;&#xA;        |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `Bloom`&#xD;&#xA;        |&#xD;&#xA;    note: required by a bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13&#xD;&#xA;        |&#xD;&#xA;    382 |         TY: TypeInfo + 'static + ?Sized,&#xD;&#xA;        |             ^^^^^^^^ required by this bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;        = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `ethereum_types::U256: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My Rust tool-chain&#xD;&#xA;&#xD;&#xA;    Default host: x86_64-unknown-linux-gnu&#xD;&#xA;    rustup home:  /home/user2038/.rustup&#xD;&#xA;    installed toolchains&#xD;&#xA;    stable-x86_64-unknown-linux-gnu&#xD;&#xA;    nightly-2021-09-10-x86_64-unknown-linux-gnu&#xD;&#xA;    nightly-2021-11-12-x86_64-unknown-linux-gnu&#xD;&#xA;    nightly-x86_64-unknown-linux-gnu&#xD;&#xA;    bpf&#xD;&#xA;    1.59.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    1.59.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    rustc 1.59.0 (9d1b2106e 2022-02-23)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6993" PostHistoryTypeId="4" PostId="1878" RevisionGUID="1f1f1711-e937-4223-88ca-66e99687f82e" CreationDate="2022-04-14T11:32:04.777" UserId="1789" Comment="added 572 characters in body; edited title" Text="trait bound `H256: TypeInfo` is not satisfiedthe; `TypeInfo` is not implemented for `H256, H160, H64, ethereum_types::U256`" ContentLicense="CC BY-SA 4.0" />
  <row Id="6994" PostHistoryTypeId="2" PostId="1880" RevisionGUID="c62519ae-a1a3-4b53-a6a7-fa4881fb2be2" CreationDate="2022-04-14T12:04:42.463" UserId="1752" Text="Not sure if I can add any more detail to the question!&#xD;&#xA;How to get total issuance through polkadot.js.org/apps ?&#xD;&#xA;&#xD;&#xA;It would also be helpful to know the general way to access chain constants through polkadot.js.org/apps." ContentLicense="CC BY-SA 4.0" />
  <row Id="6996" PostHistoryTypeId="1" PostId="1880" RevisionGUID="c62519ae-a1a3-4b53-a6a7-fa4881fb2be2" CreationDate="2022-04-14T12:04:42.463" UserId="1752" Text="How to get total issuance through polkadot.js.org/apps?" ContentLicense="CC BY-SA 4.0" />
  <row Id="6997" PostHistoryTypeId="3" PostId="1880" RevisionGUID="c62519ae-a1a3-4b53-a6a7-fa4881fb2be2" CreationDate="2022-04-14T12:04:42.463" UserId="1752" Text="|parachain|apps|constants|" ContentLicense="CC BY-SA 4.0" />
  <row Id="6998" PostHistoryTypeId="5" PostId="1878" RevisionGUID="c652f882-cb49-4511-a469-8faf42b84467" CreationDate="2022-04-14T12:56:13.787" UserId="1789" Comment="deleted 6 characters in body" Text="Frontier(pallet-ethereum) project failed to compile after updating from polkadot-v0.9.17 to v0.9.18&#xD;&#xA;&#xD;&#xA;        Compiling polkadot-runtime v0.9.18 (https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c982)&#xD;&#xA;       Compiling kusama-runtime v0.9.18 (https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c982)&#xD;&#xA;       Compiling p-chain-runtime v0.0.1 (/mnt/sda3/polkadot/1pchain/runtime)&#xD;&#xA;        Checking ethereum v0.12.0&#xD;&#xA;    error[E0277]: the trait bound `H256: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39&#xD;&#xA;        |&#xD;&#xA;    10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)&#xD;&#xA;        |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H256`&#xD;&#xA;        |&#xD;&#xA;    note: required by a bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13&#xD;&#xA;        |&#xD;&#xA;    382 |         TY: TypeInfo + 'static + ?Sized,&#xD;&#xA;        |             ^^^^^^^^ required by this bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;        = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `H160: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39&#xD;&#xA;        |&#xD;&#xA;    10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)&#xD;&#xA;        |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H160`&#xD;&#xA;        |&#xD;&#xA;    note: required by a bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13&#xD;&#xA;        |&#xD;&#xA;    382 |         TY: TypeInfo + 'static + ?Sized,&#xD;&#xA;        |             ^^^^^^^^ required by this bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;        = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `Bloom: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.rs:10:39&#xD;&#xA;        |&#xD;&#xA;    10  |     derive(codec::Encode, codec::Decode, scale_info::TypeInfo)&#xD;&#xA;        |                                          ^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `Bloom`&#xD;&#xA;        |&#xD;&#xA;    note: required by a bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.1.1/src/build.rs:382:13&#xD;&#xA;        |&#xD;&#xA;    382 |         TY: TypeInfo + 'static + ?Sized,&#xD;&#xA;        |             ^^^^^^^^ required by this bound in `FieldBuilder::&lt;N&gt;::ty`&#xD;&#xA;        = note: this error originates in the derive macro `scale_info::TypeInfo` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `ethereum_types::U256: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/user2038/.cargo/registry/src/github.com-1ecc6299db9ec823/ethereum-0.12.0/src/header.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My Rust tool-chain&#xD;&#xA;&#xD;&#xA;    Default host: x86_64-unknown-linux-gnu&#xD;&#xA;    rustup home:  /home/user2038/.rustup&#xD;&#xA;    installed toolchains&#xD;&#xA;    stable-x86_64-unknown-linux-gnu&#xD;&#xA;    nightly-2021-09-10-x86_64-unknown-linux-gnu&#xD;&#xA;    nightly-2021-11-12-x86_64-unknown-linux-gnu&#xD;&#xA;    nightly-x86_64-unknown-linux-gnu&#xD;&#xA;    bpf&#xD;&#xA;    1.59.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    1.59.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    rustc 1.59.0 (9d1b2106e 2022-02-23)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="6999" PostHistoryTypeId="4" PostId="1878" RevisionGUID="74513986-d5b7-4a74-8470-b6e7897dabc8" CreationDate="2022-04-14T13:14:08.407" UserId="1789" Comment="edited title" Text="trait bound `H256: TypeInfo` is not satisfied; `TypeInfo` is not implemented for `H256, H160, H64, ethereum_types::U256`" ContentLicense="CC BY-SA 4.0" />
  <row Id="7000" PostHistoryTypeId="2" PostId="1881" RevisionGUID="db60839f-c553-47ee-8f70-db96f12b264b" CreationDate="2022-04-14T13:23:30.763" UserId="29" Text="In polkadot{.js}'s Chain state &gt; Storage &gt; balances &gt; totalIssuance&#xD;&#xA;&#xD;&#xA;Like so:&#xD;&#xA;&#xD;&#xA;[![totalIssuance][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1jDqO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7002" PostHistoryTypeId="2" PostId="1882" RevisionGUID="bf335cbc-e0cb-4a51-acfb-409e1af7da86" CreationDate="2022-04-14T13:30:46.843" UserId="448" Text="When building the runtime useing `cargo build --release` I'm running into this error:&#xD;&#xA;```&#xD;&#xA;error[E0432]: unresolved import `sp_core::to_substrate_wasm_fn_return_value`&#xD;&#xA;    --&gt; /home/christian/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/api/src/lib.rs:80:9&#xD;&#xA;     |&#xD;&#xA;  80 | pub use sp_core::to_substrate_wasm_fn_return_value;&#xD;&#xA;     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `to_substrate_wasm_fn_return_value` in the root&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0432`.&#xD;&#xA;  error: could not compile `sp-api` due to previous error&#xD;&#xA;```&#xD;&#xA;I tried `cargo update` and `rustup update`&#xD;&#xA;&#xD;&#xA;I looked at the `.../primitives/core/src/lib.rs` file and it does have `pub fn to_substrate_wasm_fn_return_value` implemented, so I don't know why it can't find it.&#xD;&#xA;&#xD;&#xA;I'm new to rust so I don't fully know how to troubleshoot this. Any Ideas?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7004" PostHistoryTypeId="1" PostId="1882" RevisionGUID="bf335cbc-e0cb-4a51-acfb-409e1af7da86" CreationDate="2022-04-14T13:30:46.843" UserId="448" Text="Unresolved import `sp_core::to_substrate_wasm_fn_return_value`" ContentLicense="CC BY-SA 4.0" />
  <row Id="7005" PostHistoryTypeId="3" PostId="1882" RevisionGUID="bf335cbc-e0cb-4a51-acfb-409e1af7da86" CreationDate="2022-04-14T13:30:46.843" UserId="448" Text="|build|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7006" PostHistoryTypeId="2" PostId="1883" RevisionGUID="5f44fbfd-1a51-44e9-97fc-d528748319eb" CreationDate="2022-04-14T13:37:28.770" UserId="246" Text="If you wanted to calculate TVL for a substrate chain would you include 'Reserved Balances'? Or would you only be interested in 'Locked Balances'? (Locked Balance = max lock on an account)" ContentLicense="CC BY-SA 4.0" />
  <row Id="7008" PostHistoryTypeId="1" PostId="1883" RevisionGUID="5f44fbfd-1a51-44e9-97fc-d528748319eb" CreationDate="2022-04-14T13:37:28.770" UserId="246" Text="How to calculate Total Value Locked for a Substrate Chain? Should 'Reserved Balances' be included?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7009" PostHistoryTypeId="3" PostId="1883" RevisionGUID="5f44fbfd-1a51-44e9-97fc-d528748319eb" CreationDate="2022-04-14T13:37:28.770" UserId="246" Text="|accountdata|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7010" PostHistoryTypeId="2" PostId="1884" RevisionGUID="764253bc-7731-4394-a6c0-49f107489bdd" CreationDate="2022-04-14T14:01:48.073" UserId="16" Text="The difference between locked and reserve balance is that the former can be overlapping while the latter cannot. Usually reserved balance is used to lock tokens for storage consumed. When exactly something should be a lock or a reserve is an economic question. That said, you can see that reserved balance is even &quot;more locked&quot; than locked balance. Hence it should be included in TLV." ContentLicense="CC BY-SA 4.0" />
  <row Id="7013" PostHistoryTypeId="2" PostId="1885" RevisionGUID="a8cba8e1-f4a0-4238-95dd-2d811a2a2c8b" CreationDate="2022-04-14T15:52:29.703" UserId="301" Text="I'm using a ed-25519 account, and first sign with no submission, and use the 「Signed transaction」to decode, the result(right pic) show the era Period is 0x40...(decimal=64), which means era is from #1 to #65(1+64=65)&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;then I do a real submit, but the extrinsic lifetime shows the era is from #1 to #33. the right pic shows era Period is 0x20...(decimal=32) which means era end is 1=32=33.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;My question is why the two era in these two scene is different? I need to make sure these two era keep same, in other words, how can I make era of Sign(no submission) be the same as real submit action.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TmI1C.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/uisHd.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="7015" PostHistoryTypeId="1" PostId="1885" RevisionGUID="a8cba8e1-f4a0-4238-95dd-2d811a2a2c8b" CreationDate="2022-04-14T15:52:29.703" UserId="301" Text="The era of Sign with no submission action is different than submit" ContentLicense="CC BY-SA 4.0" />
  <row Id="7016" PostHistoryTypeId="3" PostId="1885" RevisionGUID="a8cba8e1-f4a0-4238-95dd-2d811a2a2c8b" CreationDate="2022-04-14T15:52:29.703" UserId="301" Text="|polkadot-js|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7017" PostHistoryTypeId="2" PostId="1886" RevisionGUID="2543c7fc-0cc2-40b3-8ea5-b562fbd0121d" CreationDate="2022-04-14T15:55:30.707" UserId="489" Text="I want to know the relaionship between Polkadot consensus and Honey Badger BFT(HBBFT).&#xD;&#xA;Does polkadot's consensus using some code about HBBFT? if yes,i want to know it. Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7019" PostHistoryTypeId="1" PostId="1886" RevisionGUID="2543c7fc-0cc2-40b3-8ea5-b562fbd0121d" CreationDate="2022-04-14T15:55:30.707" UserId="489" Text="Polkadot consensus and Honey Bandger BFT" ContentLicense="CC BY-SA 4.0" />
  <row Id="7020" PostHistoryTypeId="3" PostId="1886" RevisionGUID="2543c7fc-0cc2-40b3-8ea5-b562fbd0121d" CreationDate="2022-04-14T15:55:30.707" UserId="489" Text="|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7021" PostHistoryTypeId="2" PostId="1887" RevisionGUID="877b55cb-61ca-49a4-b508-73bd110db187" CreationDate="2022-04-14T16:02:38.473" UserId="283" Text="No, Polkadot's consensus doesn't use HBBFT. When the original vision paper was written (https://polkadot.network/PolkaDotPaper.pdf), it was mentioned as a possible component or inspiration for research to be done later. But Polkadot ended up using a custom hybrid consensus mechanism composed of BABE and GRANDPA. Neither of these use threshold encryption or are asynchronously live (which is the hallmark of HBBFT)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7023" PostHistoryTypeId="2" PostId="1888" RevisionGUID="acfedddb-393a-4d17-b248-ef511c619a7e" CreationDate="2022-04-14T17:18:57.030" UserId="29" Text="Also the following are worthy mentions:&#xD;&#xA;&#xD;&#xA;[parachain-launch](https://github.com/open-web3-stack/parachain-launch)&#xD;&#xA;&gt; parachain-launch is a script that generates a docker compose file allowing you to launch a testnet of multiple blockchain nodes.&#xD;&#xA;&#xD;&#xA;[zombienet](https://github.com/paritytech/zombienet)&#xD;&#xA;&gt;A cli tool to easily spawn ephemeral Polkadot/Substrate networks and perform tests against them." ContentLicense="CC BY-SA 4.0" />
  <row Id="7025" PostHistoryTypeId="2" PostId="1889" RevisionGUID="b8407e9f-11c6-4d49-b2ca-246ce3d22e87" CreationDate="2022-04-14T17:54:49.087" UserId="1816" Text="I'm currently trying to prove a storage entry by verifying the output of `getReadProof` but am not really sure how to do this. &#xD;&#xA;&#xD;&#xA;For some context: I want to query a parachains header from the relay chains storage, and then prove the correctness by using a storage proof. I generate the storage key for the header I'm interested in and query the encoded header. Next, I call `getReadProof` and receive a proof object. &#xD;&#xA;&#xD;&#xA;My question is, how do I verify this thing? I have access to verified headers of the relay chain (and by extension the storage root) but am not sure what to do with it. The proof object kind of looks like a typical merkle path, but the entries have different lengths, so they can't be hashes. They kind of look like storage keys to me, with the padded sections." ContentLicense="CC BY-SA 4.0" />
  <row Id="7027" PostHistoryTypeId="1" PostId="1889" RevisionGUID="b8407e9f-11c6-4d49-b2ca-246ce3d22e87" CreationDate="2022-04-14T17:54:49.087" UserId="1816" Text="Verify storage entry with getReadProof" ContentLicense="CC BY-SA 4.0" />
  <row Id="7028" PostHistoryTypeId="3" PostId="1889" RevisionGUID="b8407e9f-11c6-4d49-b2ca-246ce3d22e87" CreationDate="2022-04-14T17:54:49.087" UserId="1816" Text="|storage|consensus|trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7029" PostHistoryTypeId="5" PostId="1886" RevisionGUID="13485e82-cf29-4bf1-ae9e-f953790220dc" CreationDate="2022-04-14T18:45:11.140" UserId="452" Comment="deleted 51 characters in body" Text="I want to know the relationship between Polkadot consensus and Honey Badger BFT (HBBFT). Is Polkadot's consensus using HBBFT?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7030" PostHistoryTypeId="2" PostId="1890" RevisionGUID="89c8966d-bcac-47b2-a97d-effea3eab846" CreationDate="2022-04-14T19:03:15.960" UserId="2301" Text="Basically a project that would relay on all the nuts and bolts in the substrate toolset to understand more of where the ecosystem is going and how to work for companies like parity tech." ContentLicense="CC BY-SA 4.0" />
  <row Id="7032" PostHistoryTypeId="1" PostId="1890" RevisionGUID="89c8966d-bcac-47b2-a97d-effea3eab846" CreationDate="2022-04-14T19:03:15.960" UserId="2301" Text="What is the most straight forward/complete project i can work to master substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7033" PostHistoryTypeId="3" PostId="1890" RevisionGUID="89c8966d-bcac-47b2-a97d-effea3eab846" CreationDate="2022-04-14T19:03:15.960" UserId="2301" Text="|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7034" PostHistoryTypeId="2" PostId="1891" RevisionGUID="b5a4a30e-cf71-4566-8ddb-54f121d045e9" CreationDate="2022-04-14T19:05:10.490" UserId="73" Text="You can use the [`read_proof_check`][1] method:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;read_proof_check(relay_chain_storage_root, proof, keys);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However that only works on the node side. &#xD;&#xA;&#xD;&#xA;If you need to do it in the runtime, you can do something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let db = proof.into_memory_db();&#xD;&#xA;let res = sp_trie::read_trie_value(&amp;db, &amp;relay_chain_storage_root, parachain_header_key);&#xD;&#xA;&#xD;&#xA;match res {&#xD;&#xA;   Ok(value) =&gt; // do something with the value,&#xD;&#xA;   Err(err) =&gt; // invalid storage proof.&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-state-machine/latest/sp_state_machine/fn.read_proof_check.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="7036" PostHistoryTypeId="2" PostId="1892" RevisionGUID="8226ae11-ae25-4dba-95e5-f9b40abdfdc1" CreationDate="2022-04-14T19:11:55.877" UserId="29" Text="&#xD;&#xA;You could start by going through all the tutorials here: https://docs.substrate.io/tutorials/v3&#xD;&#xA;&#xD;&#xA;Be on the lookout for an upcoming hackathon: https://substrate.io/ecosystem/opportunities/hackathons&#xD;&#xA;&#xD;&#xA;If you're looking for a real-world application, then pick a topic that you like and build a Substrate chain. For example, if you're into NFTs, build a Substrate NFT chain. This will require you to put together a runtime with FRAME pallets and learn how to run a Substrate node among various other topics.&#xD;&#xA;&#xD;&#xA;You could take that a step further and convert it into a parachain. &#xD;&#xA;&#xD;&#xA;If you reach that milestone, then deploy on the Rococo testnet, do a couple runtime upgrades to understand how that works and try opening HRMP channels with other parachains.&#xD;&#xA;&#xD;&#xA;By doing all of this you will become familiar with how Substrate/Polkadot works and you will touch on key Substrate features." ContentLicense="CC BY-SA 4.0" />
  <row Id="7038" PostHistoryTypeId="4" PostId="1886" RevisionGUID="b13fdb03-0467-44d5-996a-abf6cd8a3d0b" CreationDate="2022-04-14T19:35:59.013" UserId="283" Comment="edited title" Text="Polkadot consensus and Honey Badger BFT" ContentLicense="CC BY-SA 4.0" />
  <row Id="7039" PostHistoryTypeId="2" PostId="1893" RevisionGUID="329c24c6-72df-40cd-84e5-186aedf15c6f" CreationDate="2022-04-15T01:38:21.137" UserId="1959" Text="I want to do some logging related to xcm messages and I need an ID for the message.&#xD;&#xA;If there is no ID for XCM, is there a proper way to generate the ID for the message?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7041" PostHistoryTypeId="1" PostId="1893" RevisionGUID="329c24c6-72df-40cd-84e5-186aedf15c6f" CreationDate="2022-04-15T01:38:21.137" UserId="1959" Text="Is there an ID for XCM message?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7042" PostHistoryTypeId="3" PostId="1893" RevisionGUID="329c24c6-72df-40cd-84e5-186aedf15c6f" CreationDate="2022-04-15T01:38:21.137" UserId="1959" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7043" PostHistoryTypeId="2" PostId="1894" RevisionGUID="ef499579-4f7e-4308-8911-a9913fc8e471" CreationDate="2022-04-15T01:54:54.803" UserId="2302" Text="1 the runtime storage `order` type as follow：&#xD;&#xA;```rust&#xD;&#xA;// Order storage&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn order)]&#xD;&#xA;	pub type Orders&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		(LaneId, MessageNonce),&#xD;&#xA;		Order&lt;T::AccountId, T::BlockNumber, RingBalance&lt;T, I&gt;&gt;,&#xD;&#xA;		OptionQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;the auto-generated querying JS api as follow:&#xD;&#xA;```javascript&#xD;&#xA;      orders: AugmentedQuery&lt;ApiType, (arg: ITuple&lt;[LaneId, MessageNonce]&gt; | [LaneId | string | Uint8Array, MessageNonce | AnyNumber | Uint8Array]) =&gt; Observable&lt;Option&lt;Order&gt;&gt;, [ITuple&lt;[LaneId, MessageNonce]&gt;]&gt; &amp; QueryableStorageEntry&lt;ApiType, [ITuple&lt;[LaneId, MessageNonce]&gt;]&gt;;&#xD;&#xA;```&#xD;&#xA;the client orders api can  only query part of orders from parameters. &#xD;&#xA; &#xD;&#xA;**my question is that is there any way to query all orders from storage?**&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7045" PostHistoryTypeId="1" PostId="1894" RevisionGUID="ef499579-4f7e-4308-8911-a9913fc8e471" CreationDate="2022-04-15T01:54:54.803" UserId="2302" Text="Get all runtime storage `Orders` values from the client" ContentLicense="CC BY-SA 4.0" />
  <row Id="7046" PostHistoryTypeId="3" PostId="1894" RevisionGUID="ef499579-4f7e-4308-8911-a9913fc8e471" CreationDate="2022-04-15T01:54:54.803" UserId="2302" Text="|polkadot-js|storage|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7047" PostHistoryTypeId="2" PostId="1895" RevisionGUID="5f6ebc41-5590-437c-a953-c57f45187473" CreationDate="2022-04-15T02:08:57.243" UserId="223" Text="You should be able to use `entries` to get all the key value pairs from a map.&#xD;&#xA;&#xD;&#xA;See the polkdot.js docs here: https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries&#xD;&#xA;&#xD;&#xA;The below is taken from the above link:&#xD;&#xA;&#xD;&#xA;When working maps and double-maps, it is possible to retrieve a list of all the keys and entries for the map. For this we can use the .entries(&lt;args&gt;): [StorageKey, Type][] queries. For example we may want to know the current list of validator exposures at a current era in the staking module -&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;...&#xD;&#xA;// Retrieve the active era&#xD;&#xA;const activeEra = await api.query.staking.activeEra();&#xD;&#xA;&#xD;&#xA;// retrieve all exposures for the active era&#xD;&#xA;const exposures = await api.query.staking.erasStakers.entries(activeEra.index);&#xD;&#xA;&#xD;&#xA;exposures.forEach(([key, exposure]) =&gt; {&#xD;&#xA;  console.log('key arguments:', key.args.map((k) =&gt; k.toHuman()));&#xD;&#xA;  console.log('     exposure:', exposure.toHuman());&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To understand the usage of the key.args, you need to understand that map/doublemap keys are stored alongside their lookups. This means that the raw key has hashed parts as well as the raw data. The API will decode the keys and provide the raw key arguments in args. This would mean -&#xD;&#xA;&#xD;&#xA;if we are querying api.query.staking.validators(validatorId: AccountId) via entries, the key.args would be [AccountId]&#xD;&#xA;if we are querying `api.query.staking.erasStakers(era: EraIndex, validatorId: AccountId)` via `entries`, the `key.args` would be `[EraIndex, AccountId]`" ContentLicense="CC BY-SA 4.0" />
  <row Id="7049" PostHistoryTypeId="2" PostId="1896" RevisionGUID="749c709e-1d98-40df-8d22-ab65a1a81b52" CreationDate="2022-04-15T03:02:06.793" UserId="2303" Text="I'm trying to run some rpc tests for staking. I'm using the polkadot binary with `--dev`, which works reasonably well, except that the epoch/bonding timings are way too long for testing/development. I can't seem to set these via the command line parameters. I also tried `polkadot build-spec --dev`, but the resulting json doesn't seem to have these parameters, or at least that I can recognize.&#xD;&#xA;&#xD;&#xA;Is there an easy way to configure the chain parameters (most of the things found here: https://wiki.polkadot.network/docs/maintain-polkadot-parameters) for a dev node?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7051" PostHistoryTypeId="1" PostId="1896" RevisionGUID="749c709e-1d98-40df-8d22-ab65a1a81b52" CreationDate="2022-04-15T03:02:06.793" UserId="2303" Text="Configure chain parameters (epoch/era/bondig/etc) for dev node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7052" PostHistoryTypeId="3" PostId="1896" RevisionGUID="749c709e-1d98-40df-8d22-ab65a1a81b52" CreationDate="2022-04-15T03:02:06.793" UserId="2303" Text="|testing|dev-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7053" PostHistoryTypeId="2" PostId="1897" RevisionGUID="4e18b534-25f3-41aa-bf77-51f70c6bff72" CreationDate="2022-04-15T04:02:36.463" UserId="104" Text="Yes, in the upcoming XCM v3, you can use the XCM hash as a sort of unique ID to identify an XCM." ContentLicense="CC BY-SA 4.0" />
  <row Id="7055" PostHistoryTypeId="2" PostId="1898" RevisionGUID="7373cbfe-fbce-4ab0-a9dc-21aa3a3f6a54" CreationDate="2022-04-15T04:28:09.187" UserId="2304" Text="I'm working with the node template and I want a particular type of extrinsic to not have to pay a fee. I followed [these instructions][1] but whenever I add another value to the &quot;pallet::weight(10_000)&quot; tuple after the weight data and do &quot;cargo build --release&quot;, I get this error.&#xD;&#xA;&#xD;&#xA;    error: unexpected token&#xD;&#xA;      --&gt; pallets/wavefunction/src/lib.rs:71:32&#xD;&#xA;       |&#xD;&#xA;    71 |         #[pallet::weight(10_000, Pays::No)]&#xD;&#xA;       |  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can't see it here but in my terminal there's a caret pointing to the comma between &quot;10_000&quot; and &quot;Pays::No&quot;. Clearly it doesn't like the comma but the documentation says that it's fine. I've tried it with a fresh template and with different types of weight values (10_000, 1000, etc. ) and the build works fine. I only get this error when I try to add an additional value to the tuple like the dispatch class or whether or not a fee should be paid. I've tried it without using any commas but I just get another error.&#xD;&#xA;&#xD;&#xA;This is the version of the Rust toolchain I'm using&#xD;&#xA;&#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    rustc 1.59.0 (9d1b2106e 2022-02-23)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/weights-and-fees/#dispatch-classes&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7057" PostHistoryTypeId="1" PostId="1898" RevisionGUID="7373cbfe-fbce-4ab0-a9dc-21aa3a3f6a54" CreationDate="2022-04-15T04:28:09.187" UserId="2304" Text="Adding PaysFee to #[pallet::weight(&quot;&quot;)] produces unexpected token error" ContentLicense="CC BY-SA 4.0" />
  <row Id="7058" PostHistoryTypeId="3" PostId="1898" RevisionGUID="7373cbfe-fbce-4ab0-a9dc-21aa3a3f6a54" CreationDate="2022-04-15T04:28:09.187" UserId="2304" Text="|weight|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7059" PostHistoryTypeId="2" PostId="1899" RevisionGUID="8ddd3b78-53a0-4ee8-938e-76455b039ba2" CreationDate="2022-04-15T06:01:13.387" UserId="73" Text="The `db/full/parachains` will currently will be always put under the path of the main db. So, you could run your collator with `collator -- -d /some/path/for/db`. And then the parachains db will end in `/some/path/for/db/.../full/parachains`.&#xD;&#xA;&#xD;&#xA;However, you can also do the symlink &quot;trick&quot; you mentioned." ContentLicense="CC BY-SA 4.0" />
  <row Id="7061" PostHistoryTypeId="2" PostId="1900" RevisionGUID="a9ff9e76-5d39-4ae2-8fd8-8468e201e54b" CreationDate="2022-04-15T07:20:25.183" UserId="1789" Text="This looks like mismatching versions. &#xD;&#xA;`cargo tree -p scale-info` will show you.&#xD;&#xA;&#xD;&#xA;ethereum-types has very permissive requirements for scale-info, so maybe a `cargo update -p scale-info` will fix the mismatch.&#xD;&#xA;&#xD;&#xA;    cargo tree&#xD;&#xA;    cargo tree -p scale-info:1.0.0&#xD;&#xA;    cargo tree -p scale-info:2.1.1&#xD;&#xA;    &#xD;&#xA;    cargo update -p scale-info&#xD;&#xA;    cargo update -p scale-info:2.1.1&#xD;&#xA;    cargo update -p scale-info:1.0.0&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/scale-info/issues/153" ContentLicense="CC BY-SA 4.0" />
  <row Id="7063" PostHistoryTypeId="5" PostId="1885" RevisionGUID="ead91b08-aba6-41dd-a93c-7484423c6286" CreationDate="2022-04-15T08:04:28.637" UserId="301" Comment="deleted 100 characters in body" Text="I'm using a ed-25519 account, and first sign with no submission, and use the 「Signed transaction」to decode, the result(right pic) show the era Period is 0x40...&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;then I do a real submit, but the extrinsic lifetime shows the era is from #1 to #33. the right pic shows era Period is 0x20...&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;My question is why the two era in these two scene is different? I need to make sure these two era keep same, in other words, how can I make era of Sign(no submission) be the same as real submit action.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TmI1C.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/uisHd.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="7064" PostHistoryTypeId="5" PostId="1844" RevisionGUID="7c4aec8b-72ad-45ed-b828-23cb37df31f2" CreationDate="2022-04-15T09:01:15.510" UserId="139" Comment="added 135 characters in body" Text="I am using the staking pallet and it has an item known as `minimum_validator_count`. I'd like to learn what would happen if the actual validators in the network is less than this entity. Would the election fail to give a usable result? Will no blocks be finalized until the minimum validator count is met? &#xD;&#xA;&#xD;&#xA;Also as a bonus question, how is it possible to increase this quantity in a running chain? &#xD;&#xA;&#xD;&#xA;**Edit #1**: I've found a few calls in the staking module that are &#xD;&#xA;&#xD;&#xA; - increaseValidatorCount(additional)&#xD;&#xA; - setValidatorCount(new)&#xD;&#xA; - scaleValidatorCount(factor)&#xD;&#xA;&#xD;&#xA;Which sounds like acts on the `minimum_validator_count`. Am I correct? Does it require special privileges to call this function?&#xD;&#xA;&#xD;&#xA;**Edit #2**: I tried calling these methods with `sudo`, to increase it to 3 but then I checked my `minimum_validator_count` and it was still the same `1`.&#xD;&#xA;&#xD;&#xA;**Edit #3**: What is the entity `validator_count` and how is it different from `minimum_validator_count` in the staking genesis config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7065" PostHistoryTypeId="2" PostId="1901" RevisionGUID="5720f4f4-6b08-473e-adac-aa4503b4713e" CreationDate="2022-04-15T09:25:19.563" UserId="53" Text="It depends entirely on what you want to calculate. TVL is often used as an indicator in the field of defi, and for that you'd probably need to look at attributes beyond merely locks and reserves. For example, a defi smart contract might hold funds which are not locked/reserved from the strict perspective of the Balances pallet, however they may still be logically locked into some lending/borrowing mechanism." ContentLicense="CC BY-SA 4.0" />
  <row Id="7067" PostHistoryTypeId="2" PostId="1902" RevisionGUID="56db0e65-58dc-41e7-a335-489603f1f888" CreationDate="2022-04-15T09:42:46.063" UserId="53" Text="They are representing the same thing. The left image is merely a more tangible representation.&#xD;&#xA;&#xD;&#xA;`Era` is defined as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub enum Era {&#xD;&#xA;	/// The transaction is valid forever. The genesis hash must be present in the signed content.&#xD;&#xA;	Immortal,&#xD;&#xA;&#xD;&#xA;	/// Period and phase are encoded:&#xD;&#xA;	/// - The period of validity from the block hash found in the signing material.&#xD;&#xA;	/// - The phase in the period that this transaction's lifetime begins (and, importantly,&#xD;&#xA;	/// implies which block hash is included in the signature material). If the `period` is&#xD;&#xA;	/// greater than 1 &lt;&lt; 12, then it will be a factor of the times greater than 1&lt;&lt;12 that&#xD;&#xA;	/// `period` is.&#xD;&#xA;	///&#xD;&#xA;	/// When used on `FRAME`-based runtimes, `period` cannot exceed `BlockHashCount` parameter&#xD;&#xA;	/// of `system` module.&#xD;&#xA;	Mortal(Period, Phase),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So you have `01 2000_0000_0000_0000 0100_0000_0000_0000` (underscores added by me). The `01` implies `Mortal`; the two numbers are `Period` and `Phase`. They are hex dumps in SCALE (Little Endian) format, meaning that the first bytes are the least significant, so these two numbers are just: `32` (`Period`) and `1` (`Phase`).&#xD;&#xA;&#xD;&#xA;Basically the transaction is valid for `Period` blocks. The `Phase` and `Period` are used along with the `current` height of the chain when the transaction is included and the chain's recent history of block hashes in order to recover a past block hash which is utilised in the transaction's signed content and must match up for the transaction's signature to check out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7069" PostHistoryTypeId="6" PostId="1885" RevisionGUID="2e6c51ec-ad88-4786-b611-0115d7eab3e1" CreationDate="2022-04-15T12:31:12.923" UserId="85" Comment="edited tags" Text="|era|signed-extensions|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7070" PostHistoryTypeId="2" PostId="1903" RevisionGUID="01c161fb-1b8a-440d-bdfc-6d4be852d5c7" CreationDate="2022-04-15T12:42:17.387" UserId="85" Text="I think this is a mistake in the docs, rather than:&#xD;&#xA;&#xD;&#xA;```#[pallet::weight(10_000, Pays::No)]```&#xD;&#xA;&#xD;&#xA;it should be as a tuple:&#xD;&#xA;&#xD;&#xA;```#[pallet::weight((10_000, Pays::No))]```&#xD;&#xA;&#xD;&#xA;I agree it would be nicer if this wasn't the case... but for now I'll fix the instructions." ContentLicense="CC BY-SA 4.0" />
  <row Id="7072" PostHistoryTypeId="2" PostId="1904" RevisionGUID="b7bca578-6749-455d-9303-76a806bec502" CreationDate="2022-04-15T13:26:25.483" UserId="523" Text="    cargo build --release --features fast-runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="7074" PostHistoryTypeId="2" PostId="1905" RevisionGUID="860aae7e-5e8c-456c-aec9-a9c29a3bd21a" CreationDate="2022-04-15T13:30:39.967" UserId="85" Text="&#xD;&#xA;Within 20% sounds fine. It's all about getting the order of magnitude right ( [the big O complexity notation][1] ).&#xD;&#xA;We have built in some machine benchmarks into substrate so that we can tell if our machine spec is roughly in line with the parity benchmark machines that the weights are generated on.&#xD;&#xA;&#xD;&#xA;Now that [this PR][2] has landed you can run this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run --profile production benchmark machine&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://en.wikipedia.org/wiki/Big_O_notation#:~:text=Big%20O%20notation%20is%20a,a%20particular%20value%20or%20infinity.&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/pull/11198" ContentLicense="CC BY-SA 4.0" />
  <row Id="7076" PostHistoryTypeId="5" PostId="1905" RevisionGUID="2b0d3284-3191-4a19-8b16-9469c6beeedd" CreationDate="2022-04-15T13:45:23.377" UserId="85" Comment="added stats" Text="&#xD;&#xA;Within 20% sounds fine. It's all about getting the order of magnitude right ( [the big O complexity notation][1] ).&#xD;&#xA;We have built in some machine benchmarks into substrate so that we can tell if our machine spec is roughly in line with the parity benchmark machines that the weights are generated on.&#xD;&#xA;&#xD;&#xA;Now that [this PR][2] has landed you can run this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run --profile production benchmark machine --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These are the results of master at 1e0807fb477 on one of our benchmarking machines:&#xD;&#xA;```&#xD;&#xA;+----------+----------------+-------+------+&#xD;&#xA;| Category | Function       | Score | Unit |&#xD;&#xA;+----------+----------------+-------+------+&#xD;&#xA;| CPU      | BLAKE2-256     | 1029  | MB/s |&#xD;&#xA;+----------+----------------+-------+------+&#xD;&#xA;| CPU      | SR25519 Verify | 665.3 | KB/s |&#xD;&#xA;+----------+----------------+-------+------+&#xD;&#xA;| Memory   | Copy           | 14697 | MB/s |&#xD;&#xA;+----------+----------------+-------+------+&#xD;&#xA;| Disk     | Seq Write      | 472   | MB/s |&#xD;&#xA;+----------+----------------+-------+------+&#xD;&#xA;| Disk     | Rnd Write      | 212   | MB/s |&#xD;&#xA;+----------+----------------+-------+------+&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://en.wikipedia.org/wiki/Big_O_notation#:~:text=Big%20O%20notation%20is%20a,a%20particular%20value%20or%20infinity.&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/pull/11198" ContentLicense="CC BY-SA 4.0" />
  <row Id="7077" PostHistoryTypeId="5" PostId="1891" RevisionGUID="42b2783e-fd83-4126-a49e-53e9f7aa98e4" CreationDate="2022-04-15T14:02:48.533" UserId="85" Comment="added lang-rust" Text="You can use the [`read_proof_check`][1] method:&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;read_proof_check(relay_chain_storage_root, proof, keys);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However that only works on the node side. &#xD;&#xA;&#xD;&#xA;If you need to do it in the runtime, you can do something like:&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;let db = proof.into_memory_db();&#xD;&#xA;let res = sp_trie::read_trie_value(&amp;db, &amp;relay_chain_storage_root, parachain_header_key);&#xD;&#xA;&#xD;&#xA;match res {&#xD;&#xA;   Ok(value) =&gt; // do something with the value,&#xD;&#xA;   Err(err) =&gt; // invalid storage proof.&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-state-machine/latest/sp_state_machine/fn.read_proof_check.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="7078" PostHistoryTypeId="2" PostId="1906" RevisionGUID="93bb848e-babe-44b5-8721-62066c719134" CreationDate="2022-04-15T14:06:21.873" UserId="53" Text="There is no inbuilt ID for an XCM message.&#xD;&#xA;&#xD;&#xA;If there were then it would probably better belong to the transport mechanism (e.g. XCMP, UMP, DMP, bridge) rather than XCM which is merely the message *format*. Unfortunately even if those transport mechanisms did provide a unique identifier it would not work for messages where the conceptual &quot;destination&quot; is not the *immediate* destination of the message (e.g. `ReserveAssetTransfer` or `ExportMessage`). In these cases what is actually happening is that you are sending a message to an (initial) destination which is then executing it and in doing so sending one or more further messages to one or more further destinations. This may even happen multiple times, leading to a cascade of messages actually being sent. It becomes completely undefined - to XCM - what these messages' relationship to the originally sent message is: is it notionally the *same* message just being routed a further step (and thus should perhaps have the same ID)? A *reply* or error report? A new message containing information or an instruction for a third-party?&#xD;&#xA;&#xD;&#xA;So we need something more sophisticated than a mere unique ID for messages on a single endpoint-pair for the ID to be generally useful. And indeed, in XCM v3 something more sophisticated exists to help with tracking an XCM message as its effects are felt between chains:&#xD;&#xA;&#xD;&#xA;1. Message Hash. This is returned as part of sending an XCM (through the `SendXcm` trait) and can be used to identify the message through its context at the destination point. This has two main limitations in utility:&#xD;&#xA;- A message with exactly the same content would have the same hash. This can be worked around by introducing an instruction into the message which does nothing but ensure it has a unique hash, (e.g. `SetErrorHandler(Xcm(vec![Trap(&lt;ID&gt;)]))` in the last position).&#xD;&#xA;- Any message which relies on XCM instructions for effecting a multi-hop route (e.g. using `ReserveAssetTransfer` or `ExportMessage` in v3) won't work since the message contents are necessarily different depending on which leg of the journey it is on.&#xD;&#xA;2. Topics. The Topic is a register in the XCVM which is passed to any external functions. It may be set to any value using the `SetTopic` instruction. This allows a sender to craft a message which carries with it an ID tag. The nice thing about the Topic is that when combined with the message _origin_, it can be made into a secure, universally-unique identifier. It can also be used inside of internal message fragments, carrying the *conceptual* identity of a message even when the message gets edited as it moves through different hops on its journey.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7080" PostHistoryTypeId="2" PostId="1907" RevisionGUID="03af8299-68cd-4c94-bb79-44e3a313960b" CreationDate="2022-04-15T14:20:13.590" UserId="53" Text="If you need to ensure that `AssertCreateUpdateOrigin` resolves into an `AccountId`, consider placing a bound on the `Success` type:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type AssertCreateUpdateOrigin: EnsureOrigin&lt;&lt;Self as frame_system::Config&gt;::Origin, Success=Self::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can then use:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let account = AssertCreateUpdateOrigin::ensure_origin(origin)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will either bail with an error or properly populate `account` with an value determined by the origin. As @shawn says, it is up to the implementer of `AssertCreateUpdateOrigin` to ensure that a successful origin actually exists for the purpose of benchmarking and you can get access to such an origin by using `AssetCreateUpdateOrigin::successful_origin()`.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7082" PostHistoryTypeId="2" PostId="1908" RevisionGUID="4678eaf6-a22f-4f11-8b68-ab968791a60c" CreationDate="2022-04-15T14:47:13.407" UserId="85" Text="I think there's a slight misunderstanding here. If you read BuyExecution docs:&#xD;&#xA;```&#xD;&#xA;	/// Pay for the execution of some XCM `xcm` and `orders` with up to `weight`&#xD;&#xA;	/// picoseconds of execution time, paying for this with up to `fees` from the Holding Register.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `BuyExecution` sets the maximum weight that will be spent. If the fees are less than 3 million weight then you should get a refund." ContentLicense="CC BY-SA 4.0" />
  <row Id="7084" PostHistoryTypeId="6" PostId="1857" RevisionGUID="fde817ef-c25b-4425-9966-48f80b419e47" CreationDate="2022-04-15T14:48:47.957" UserId="85" Comment="edited tags" Text="|xcm|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7086" PostHistoryTypeId="2" PostId="1909" RevisionGUID="b01a22ae-393a-460d-92cd-a01063bd6f1e" CreationDate="2022-04-15T16:30:30.063" UserId="85" Text="It seems to me that the drawback is that one would need a token to stake to secure the set of para-para-chains. The safety of all the para-para-chains would depend upon DOT and this additional PoS token. I.e. there might be a limit to how much economy you could have underneath a relay-relay chain before it becomes viable for attacks on it (it really would depend on the PoS token price).&#xD;&#xA;&#xD;&#xA;An alternative scaling solution might be to validate ZK proofs on the para-chain. I think Manta is an example of this route.&#xD;&#xA;&#xD;&#xA;I'm sure these are not the only two options in the design space! I'm sure we will see a lot of innovation trialing out the various approaches. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7089" PostHistoryTypeId="5" PostId="1895" RevisionGUID="3014b7ec-b987-4d52-ba1b-4393d5c13506" CreationDate="2022-04-15T19:22:04.330" UserId="29" Comment="added 1 character in body" Text="You should be able to use `entries` to get all the key value pairs from a map.&#xD;&#xA;&#xD;&#xA;See the polkdot.js docs here: https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries&#xD;&#xA;&#xD;&#xA;The below is taken from the above link:&#xD;&#xA;&#xD;&#xA;When working maps and double-maps, it is possible to retrieve a list of all the keys and entries for the map. For this we can use the .entries(&lt;args&gt;): [StorageKey, Type][] queries. For example we may want to know the current list of validator exposures at a current era in the staking module -&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;...&#xD;&#xA;// Retrieve the active era&#xD;&#xA;const activeEra = await api.query.staking.activeEra();&#xD;&#xA;&#xD;&#xA;// retrieve all exposures for the active era&#xD;&#xA;const exposures = await api.query.staking.erasStakers.entries(activeEra.index);&#xD;&#xA;&#xD;&#xA;exposures.forEach(([key, exposure]) =&gt; {&#xD;&#xA;  console.log('key arguments:', key.args.map((k) =&gt; k.toHuman()));&#xD;&#xA;  console.log('     exposure:', exposure.toHuman());&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To understand the usage of the key.args, you need to understand that map/doublemap keys are stored alongside their lookups. This means that the raw key has hashed parts as well as the raw data. The API will decode the keys and provide the raw key arguments in args. This would mean if we are querying `api.query.staking.validators(validatorId: AccountId)` via `entries`, the key.args would be `[AccountId]`&#xD;&#xA;if we are querying `api.query.staking.erasStakers(era: EraIndex, validatorId: AccountId)` via `entries`, the `key.args` would be `[EraIndex, AccountId]`" ContentLicense="CC BY-SA 4.0" />
  <row Id="7090" PostHistoryTypeId="5" PostId="1544" RevisionGUID="1e6408da-9297-4fe3-a088-4c9a4a64d810" CreationDate="2022-04-15T20:09:02.463" UserId="29" Comment="added 1 character in body" Text="You are most-probably assuming that something with a `displayName` of `Balance` conveys more information than it does. It does not refer to a specific instance of a `Balance` type on-chain nor to a specific pallet that ties it into any display formatting. For Substrate there is no real &quot;one-balance-rules-all&quot; indicator.&#xD;&#xA;&#xD;&#xA;In terms of the balances pallet itself, something that has `displayName: Balance` is provided as a type in the config to the pallet instance, i.e. where it is instantiated in the runtime. The following is done (which the metadata then converts into the actual primitive type as well as `displayName` as used in the pallet code) -&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_balances::Config for Runtime {&#xD;&#xA;	...&#xD;&#xA;	type Balance = Balance;&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now bear in mind that the chain itself can have multiple instances of this pallet (chains are not required to have only a single `Balance` instance and indeed a growing number does not) and for each of these instances, even if they do point to the same primitive type in terms of storage size, the formatting would be different in terms of token and decimals.&#xD;&#xA;&#xD;&#xA;In the same fashion, there are multiple pallets that also take a config param of `Balance`, but in their cases it is not something that reflects native tokens or can be formatted in that way. An example is `assets` which also gets configured with a `type Balance = ...` whith a subsequent `displayName: Balance` but the formatting there is purely driven by the on-chain metadata for a specific asset instance. So here a `Balance` displayName cannot be equated to a `Balance` displayName that is in-use anywhere else. [1]&#xD;&#xA;&#xD;&#xA;In the runtime contracts instantiation, the mapping for `Balances` is done via the `type Currency = Balances` where `Balances` refers to a specific instance of the balance pallet, here no `type Balance = ...` is injected into the config. &#xD;&#xA;&#xD;&#xA;Contracts, as to be deployed via a `.contract` file, are even more loosely defined, since there is no trait config information that gets supplied or that can be used to tie a displayName to any runtime pallet that is available on-chain. Here the `Balance` formatting is up to the user intent.&#xD;&#xA;&#xD;&#xA;So there is nothing in the metadata for the contracts pallet, nor in the contract-as-deployed types itself, that ties `displayName: Balance` to a type in the runtime, aka a specific instance of a balances runtime pallet. The `Currency = Balances` is not in the metadata mapping to infer which `Balance` instance is used. Contracts are certainly not tied to a specific runtime. What can be deduced 100% is the size of the type since that is absolutely specified, not the meaning and/or formatting. [2]&#xD;&#xA;&#xD;&#xA;So in the current iteration, by design, unless the UI itself applies display overrides, each generic formatter only displays the primitive - as mapped to by the metadata type, never on the inexact string-name. There is just not enough information to actually try and map any single type to a specific instance of a same-name-type elsewhere. The apps UI deals in absolutes - unless it known 100% that there is an is exact match, it doesn't attempt it.&#xD;&#xA;&#xD;&#xA;[1] They could refer, despite having the same name, to different underlying primitives, or the same primitive with obviously different meanings&#xD;&#xA;&#xD;&#xA;[2] Not sure what happens when you deploy a contract containing types mapping `Balance` as `u128` on a chain with a `Balance` as `u64`. (e.g. ERC* doesn't really reflect an actual movable balances-pallet-instance balance, so no reason not to work, just not sure if there is checks or not...)" ContentLicense="CC BY-SA 4.0" />
  <row Id="7091" PostHistoryTypeId="5" PostId="1314" RevisionGUID="ec6706f4-88c7-4676-a461-f86c4e72d7c0" CreationDate="2022-04-15T20:17:54.563" UserId="29" Comment="edited body" Text="You need to import `num_traits` with `default-features = false` in your Cargo.toml file. This will solve the problem. The problem here being that ink itself declares the `oom` handler, but you also import `std` through `num_traits`. `std` will then also provide the `oom` handler, which is not allowed and leading to your problem. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7092" PostHistoryTypeId="2" PostId="1910" RevisionGUID="bc52a996-1109-466e-9123-410309e3474f" CreationDate="2022-04-15T21:36:56.317" UserId="34" Text="[The benchmark docs](https://docs.substrate.io/v3/runtime/benchmarking/) are the best place to start, and good [examples of `benchman.rs`](https://github.com/paritytech/substrate/blob/master/frame/tips/src/benchmarking.rs) files in Substrate as reference. Your goal is to create worst case scenario weights for using your chain extension, as it (like all other pallet logic) cannot be allowed to consume more time to execute than the block allows. As you may be simply a directly calling other properly bechmarked pallet's logic, it could be as simple as a 1 to 1 mapping plus the slight extra overhead the chain extension itself calling this vs. directly. Conversely, this may add significant new logic and more complete benchmarking to match." ContentLicense="CC BY-SA 4.0" />
  <row Id="7094" PostHistoryTypeId="6" PostId="1864" RevisionGUID="e740e203-dd1d-4b31-b76c-6224e108b756" CreationDate="2022-04-15T21:40:47.687" UserId="34" Comment="edited tags" Text="|smart-contract|ink|chain-extension|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7098" PostHistoryTypeId="2" PostId="1911" RevisionGUID="e8cb971f-faf7-4666-8023-b625ec14fa97" CreationDate="2022-04-16T09:52:56.543" UserId="2314" Text="I saw how to handle error from chain extension  on smart contract side&#xD;&#xA;https://paritytech.github.io/ink-docs/macros-attributes/chain-extension#error-code&#xD;&#xA;&#xD;&#xA;But i can't find example&#xD;&#xA;and can't understand how to return error from chain extension implementation?&#xD;&#xA;&#xD;&#xA;return Err(DispatchError::Other(&quot;Unimplemented func_id&quot;))&#xD;&#xA;or &#xD;&#xA;Ok(RetVal::Converging(1))&#xD;&#xA;&#xD;&#xA;What i need return from chain extension call function to have possibility get this error &#xD;&#xA;in Result&lt;(),Error&gt; on ink! smart contract side?&#xD;&#xA;&#xD;&#xA;#[ink(extension = 1106, returns_result = true)]&#xD;&#xA;fn some_func(subject: PalletAssetBalanceRequest) -&gt; Result([u8; 16], SomeError);&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7100" PostHistoryTypeId="1" PostId="1911" RevisionGUID="e8cb971f-faf7-4666-8023-b625ec14fa97" CreationDate="2022-04-16T09:52:56.543" UserId="2314" Text="How to return error from chain extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7101" PostHistoryTypeId="3" PostId="1911" RevisionGUID="e8cb971f-faf7-4666-8023-b625ec14fa97" CreationDate="2022-04-16T09:52:56.543" UserId="2314" Text="|ink|chain-extension|chain-extention|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7102" PostHistoryTypeId="5" PostId="1826" RevisionGUID="f9ee7052-fc6a-4b5a-9e5d-d08b15b9aa13" CreationDate="2022-04-16T09:56:06.713" UserId="172" Comment="added 56 characters in body" Text="Users asking questions related to the Ethereum network. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7103" PostHistoryTypeId="24" PostId="1826" RevisionGUID="f9ee7052-fc6a-4b5a-9e5d-d08b15b9aa13" CreationDate="2022-04-16T09:56:06.713" Comment="Proposed by 172 approved by 94, 85 edit id of 158" ContentLicense="CC BY-SA 4.0" />
  <row Id="7104" PostHistoryTypeId="5" PostId="233" RevisionGUID="e12d5e6e-05ad-4e55-a960-81247b4be233" CreationDate="2022-04-16T09:56:19.273" UserId="172" Comment="Updated excerpt and text accordingly. " Text="The first block is called the genesis block and the genesis configuration implies anything to do with setting parameters that specify the genesis state of a chain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7105" PostHistoryTypeId="24" PostId="233" RevisionGUID="e12d5e6e-05ad-4e55-a960-81247b4be233" CreationDate="2022-04-16T09:56:19.273" Comment="Proposed by 172 approved by 94, 85 edit id of 155" ContentLicense="CC BY-SA 4.0" />
  <row Id="7106" PostHistoryTypeId="5" PostId="1861" RevisionGUID="57a147f7-8a84-409b-885d-0254e502d9f0" CreationDate="2022-04-16T09:56:39.267" UserId="544" Comment="Explain where to get the data" Text="There's a great visualisation of the kusama channels set up here:&#xD;&#xA;&#xD;&#xA;https://dotsama-channels.vercel.app/#/&#xD;&#xA;&#xD;&#xA;And if you wonder where to get the source data, you can query the following storage from Polkadot.js:&#xD;&#xA;&#xD;&#xA;- `hrmp.hrmpChannels`: the opened channels&#xD;&#xA;- `hrmp.hrmpOpenChannelRequests`: the pending open channel requests&#xD;&#xA;- `hrmp.hrmpCloseChannelRequests`: the pending close channel requests" ContentLicense="CC BY-SA 4.0" />
  <row Id="7107" PostHistoryTypeId="24" PostId="1861" RevisionGUID="57a147f7-8a84-409b-885d-0254e502d9f0" CreationDate="2022-04-16T09:56:39.267" Comment="Proposed by 544 approved by 45, 85 edit id of 160" ContentLicense="CC BY-SA 4.0" />
  <row Id="7108" PostHistoryTypeId="5" PostId="1825" RevisionGUID="26bfad59-3655-4c43-8785-8dfb2029afaf" CreationDate="2022-04-16T09:57:23.697" UserId="172" Comment="added 236 characters in body" Text="Ethereum is an EVM blockchain built to scale native layer 2 applications. Substrate chains and Ethereum can communicate with each other through bridges and can be made compatible with Frontier, Substrate’s Ethereum compatibility layer. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7109" PostHistoryTypeId="24" PostId="1825" RevisionGUID="26bfad59-3655-4c43-8785-8dfb2029afaf" CreationDate="2022-04-16T09:57:23.697" Comment="Proposed by 172 approved by 94, 85 edit id of 157" ContentLicense="CC BY-SA 4.0" />
  <row Id="7110" PostHistoryTypeId="5" PostId="234" RevisionGUID="c1205f02-1560-438e-bea5-0c11ec2e0ed3" CreationDate="2022-04-16T09:57:40.010" UserId="172" Comment="Updated excerpt and text accordingly. " Text="Questions about the genesis block or genesis configuration of a chain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7111" PostHistoryTypeId="24" PostId="234" RevisionGUID="c1205f02-1560-438e-bea5-0c11ec2e0ed3" CreationDate="2022-04-16T09:57:40.010" Comment="Proposed by 172 approved by 94, 85 edit id of 156" ContentLicense="CC BY-SA 4.0" />
  <row Id="7112" PostHistoryTypeId="12" PostId="1908" RevisionGUID="9cf5accd-e0df-4955-9a53-445a451e9856" CreationDate="2022-04-16T12:49:51.227" UserId="85" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:85,&quot;DisplayName&quot;:&quot;Squirrel&quot;}]}" />
  <row Id="7113" PostHistoryTypeId="2" PostId="1912" RevisionGUID="3a619e22-d320-4455-9371-5e1f81fb6a44" CreationDate="2022-04-16T13:08:27.477" UserId="2315" Text="Is there a way for ink! smart contract developers to use custom structs with HashMap fields inside storage struct?&#xD;&#xA;&#xD;&#xA;What I want to do&#xD;&#xA;```&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    a: ink_prelude::vec::Vec&lt;AccountId&gt;,&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct SampleStorage {&#xD;&#xA;    sample_struct: SampleStruct,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To do so, SampleStruct needs to implement scale::Encode, scale::Decode, scale_info::TypeInfo etc with derive macro like below.&#xD;&#xA;```&#xD;&#xA;#[derive(scale::Encode, scale::Decode)]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;)]&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    a: ink_prelude::vec::Vec&lt;AccountId&gt;, // &lt;- Vec has no issue&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However this derive implementation fails at compilation due to error `the trait bound 'HashMap&lt;ink_env::AccountId, ()&gt;: WrapperTypeDecode\' is not satisfied&#xD;&#xA;the following other types implement trait 'WrapperTypeDecode':&#xD;&#xA;  Arc&lt;T&gt;&#xD;&#xA;  Box&lt;T&gt;&#xD;&#xA;  Rc&lt;T&gt;&#xD;&#xA;required because of the requirements on the impl of 'parity_scale_codec::Decode' for 'HashMap&lt;ink_env::AccountId, ()&gt;'`.&#xD;&#xA;&#xD;&#xA;(I guess HashMap needs to implement `WrapperTypeDecode` trait and this is why I cannot use HashMap inside storage struct)&#xD;&#xA;&#xD;&#xA;I'd like to know if there's a workaround to avoid this and use HashMap properly, at the same time, if ink! library side needs modification or not." ContentLicense="CC BY-SA 4.0" />
  <row Id="7115" PostHistoryTypeId="1" PostId="1912" RevisionGUID="3a619e22-d320-4455-9371-5e1f81fb6a44" CreationDate="2022-04-16T13:08:27.477" UserId="2315" Text="How to use custom struct with HashMap field inside storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="7116" PostHistoryTypeId="3" PostId="1912" RevisionGUID="3a619e22-d320-4455-9371-5e1f81fb6a44" CreationDate="2022-04-16T13:08:27.477" UserId="2315" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7117" PostHistoryTypeId="5" PostId="1912" RevisionGUID="09afcc8b-4d3d-49d5-948f-792b6865623c" CreationDate="2022-04-16T13:24:01.143" UserId="2315" Comment="added 72 characters in body" Text="Is there a way for ink! smart contract developers to use custom structs with HashMap fields inside storage struct?&#xD;&#xA;&#xD;&#xA;What I want to do&#xD;&#xA;```&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    a: ink_prelude::vec::Vec&lt;AccountId&gt;,&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct SampleStorage {&#xD;&#xA;    sample_struct: SampleStruct,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To do so, SampleStruct needs to implement scale::Encode, scale::Decode, scale_info::TypeInfo etc with derive macro like below.&#xD;&#xA;```&#xD;&#xA;#[derive(scale::Encode, scale::Decode)]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;)]&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    a: ink_prelude::vec::Vec&lt;AccountId&gt;, // &lt;- Vec has no issue&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However this derive implementation fails at compilation due to error `the trait bound 'HashMap&lt;ink_env::AccountId, ()&gt;: WrapperTypeDecode\' is not satisfied&#xD;&#xA;the following other types implement trait 'WrapperTypeDecode':&#xD;&#xA;  Arc&lt;T&gt;&#xD;&#xA;  Box&lt;T&gt;&#xD;&#xA;  Rc&lt;T&gt;&#xD;&#xA;required because of the requirements on the impl of 'parity_scale_codec::Decode' for 'HashMap&lt;ink_env::AccountId, ()&gt;'`. &#xD;&#xA;&#xD;&#xA;`ink_storage::Mapping&lt;AccountId, ()&gt;` is also not doable.&#xD;&#xA;&#xD;&#xA;(I guess HashMap needs to implement `WrapperTypeDecode` trait and this is why I cannot use HashMap inside storage struct)&#xD;&#xA;&#xD;&#xA;I'd like to know if there's a workaround to avoid this and use HashMap properly, at the same time, if ink! library side needs modification or not." ContentLicense="CC BY-SA 4.0" />
  <row Id="7118" PostHistoryTypeId="5" PostId="1912" RevisionGUID="b88468a0-6972-4f21-8709-aad0023b5250" CreationDate="2022-04-16T13:31:38.920" UserId="2315" Comment="added 18 characters in body" Text="Is there a way for ink! smart contract developers to use custom structs with HashMap fields inside storage struct?&#xD;&#xA;&#xD;&#xA;What I want to do&#xD;&#xA;```&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    sample_vec: ink_prelude::vec::Vec&lt;AccountId&gt;,&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct SampleStorage {&#xD;&#xA;    sample_struct: SampleStruct,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To do so, SampleStruct needs to implement scale::Encode, scale::Decode, scale_info::TypeInfo etc with derive macro like below.&#xD;&#xA;```&#xD;&#xA;#[derive(scale::Encode, scale::Decode)]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;)]&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    sample_vec: ink_prelude::vec::Vec&lt;AccountId&gt;, // &lt;- Vec has no issue&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However this derive implementation fails at compilation due to error `the trait bound 'HashMap&lt;ink_env::AccountId, ()&gt;: WrapperTypeDecode\' is not satisfied&#xD;&#xA;the following other types implement trait 'WrapperTypeDecode':&#xD;&#xA;  Arc&lt;T&gt;&#xD;&#xA;  Box&lt;T&gt;&#xD;&#xA;  Rc&lt;T&gt;&#xD;&#xA;required because of the requirements on the impl of 'parity_scale_codec::Decode' for 'HashMap&lt;ink_env::AccountId, ()&gt;'`. &#xD;&#xA;&#xD;&#xA;`ink_storage::Mapping&lt;AccountId, ()&gt;` is also not doable.&#xD;&#xA;&#xD;&#xA;(I guess HashMap needs to implement `WrapperTypeDecode` trait and this is why I cannot use HashMap inside storage struct)&#xD;&#xA;&#xD;&#xA;I'd like to know if there's a workaround to avoid this and use HashMap properly, at the same time, if ink! library side needs modification or not." ContentLicense="CC BY-SA 4.0" />
  <row Id="7119" PostHistoryTypeId="5" PostId="1912" RevisionGUID="3a1d16bd-2a86-4f04-94fc-38e2f5310bae" CreationDate="2022-04-16T13:45:49.267" UserId="2315" Comment="added 660 characters in body" Text="Is there a way for ink! smart contract developers to use custom structs with HashMap fields inside storage struct?&#xD;&#xA;&#xD;&#xA;What I want to do&#xD;&#xA;```&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    sample_vec: ink_prelude::vec::Vec&lt;AccountId&gt;,&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct SampleStorage {&#xD;&#xA;    sample_struct: SampleStruct,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To do so, SampleStruct needs to implement scale::Encode, scale::Decode, scale_info::TypeInfo etc with derive macro like below.&#xD;&#xA;```&#xD;&#xA;#[derive(scale::Encode, scale::Decode)]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;)]&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    sample_vec: ink_prelude::vec::Vec&lt;AccountId&gt;, // &lt;- Vec has no issue&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However this derive implementation fails at compilation due to error `the trait bound 'HashMap&lt;ink_env::AccountId, ()&gt;: WrapperTypeDecode\' is not satisfied&#xD;&#xA;the following other types implement trait 'WrapperTypeDecode':&#xD;&#xA;  Arc&lt;T&gt;&#xD;&#xA;  Box&lt;T&gt;&#xD;&#xA;  Rc&lt;T&gt;&#xD;&#xA;required because of the requirements on the impl of 'parity_scale_codec::Decode' for 'HashMap&lt;ink_env::AccountId, ()&gt;'`. &#xD;&#xA;&#xD;&#xA;`ink_storage::Mapping&lt;AccountId, ()&gt;` is also not doable.&#xD;&#xA;&#xD;&#xA;(I guess HashMap needs to implement `WrapperTypeDecode` trait and this is why I cannot use HashMap inside storage struct)&#xD;&#xA;&#xD;&#xA;I'd like to know if there's a workaround to avoid this and use HashMap properly, at the same time, if ink! library side needs modification or not.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Dependencies&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;ink_primitives = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_metadata = { version = &quot;3.0&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;ink_env = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_storage = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_lang = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_prelude = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7120" PostHistoryTypeId="5" PostId="1912" RevisionGUID="40952339-7f09-475a-ba2d-1a45f2cdc42c" CreationDate="2022-04-16T14:28:51.383" UserId="2315" Comment="deleted 123 characters in body" Text="Is there a way for ink! smart contract developers to use custom structs with HashMap fields inside storage struct?&#xD;&#xA;&#xD;&#xA;What I want to do&#xD;&#xA;```&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    sample_vec: ink_prelude::vec::Vec&lt;AccountId&gt;,&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct SampleStorage {&#xD;&#xA;    sample_struct: SampleStruct,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To do so, SampleStruct needs to implement scale::Encode, scale::Decode, scale_info::TypeInfo etc with derive macro like below.&#xD;&#xA;```&#xD;&#xA;#[derive(scale::Encode, scale::Decode)]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;)]&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    sample_vec: ink_prelude::vec::Vec&lt;AccountId&gt;, // &lt;- Vec has no issue&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However this derive implementation fails at compilation due to error `the trait bound 'HashMap&lt;ink_env::AccountId, ()&gt;: WrapperTypeDecode\' is not satisfied&#xD;&#xA;the following other types implement trait 'WrapperTypeDecode':&#xD;&#xA;  Arc&lt;T&gt;&#xD;&#xA;  Box&lt;T&gt;&#xD;&#xA;  Rc&lt;T&gt;&#xD;&#xA;required because of the requirements on the impl of 'parity_scale_codec::Decode' for 'HashMap&lt;ink_env::AccountId, ()&gt;'`. &#xD;&#xA;&#xD;&#xA;`ink_storage::Mapping&lt;AccountId, ()&gt;` is also not doable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'd like to know if there's a workaround to avoid this and use HashMap properly, at the same time, if ink! library side needs modification or not.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Dependencies&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;ink_primitives = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_metadata = { version = &quot;3.0&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;ink_env = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_storage = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_lang = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_prelude = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7121" PostHistoryTypeId="5" PostId="1912" RevisionGUID="a0d47415-b98e-4b8a-b66c-c2955d6c826a" CreationDate="2022-04-16T14:52:40.127" UserId="2315" Comment="deleted 152 characters in body" Text="Is there a way for ink! smart contract developers to use custom structs with HashMap fields inside storage struct?&#xD;&#xA;&#xD;&#xA;What I want to do&#xD;&#xA;```&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    sample_vec: ink_prelude::vec::Vec&lt;AccountId&gt;,&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct SampleStorage {&#xD;&#xA;    sample_struct: SampleStruct,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To do so, SampleStruct needs to implement scale::Encode, scale::Decode, scale_info::TypeInfo etc with derive macro like below.&#xD;&#xA;```&#xD;&#xA;#[derive(scale::Encode, scale::Decode)]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;)]&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;    sample_vec: ink_prelude::vec::Vec&lt;AccountId&gt;, // &lt;- Vec has no issue&#xD;&#xA;    sample_hash_map: ink_prelude::collections::HashMap&lt;AccountId, ()&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However this derive implementation fails at compilation due to error `the trait bound 'HashMap&lt;ink_env::AccountId, ()&gt;: WrapperTypeDecode\' is not satisfied&#xD;&#xA;the following other types implement trait 'WrapperTypeDecode':&#xD;&#xA;  Arc&lt;T&gt;&#xD;&#xA;  Box&lt;T&gt;&#xD;&#xA;  Rc&lt;T&gt;&#xD;&#xA;required because of the requirements on the impl of 'parity_scale_codec::Decode' for 'HashMap&lt;ink_env::AccountId, ()&gt;'`. &#xD;&#xA;&#xD;&#xA;`ink_storage::Mapping&lt;AccountId, ()&gt;` is also not doable.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Dependencies&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;ink_primitives = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_metadata = { version = &quot;3.0&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;ink_env = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_storage = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_lang = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;ink_prelude = { version = &quot;3.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7129" PostHistoryTypeId="2" PostId="1915" RevisionGUID="ce8f2a21-3eb7-488d-8337-3d4bea6929d8" CreationDate="2022-04-16T19:37:50.070" UserId="299" Text="What is the default voting system after submitting a democratic proposal?&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-governance#tallying&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hl0Rf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/tiH5y.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7131" PostHistoryTypeId="1" PostId="1915" RevisionGUID="ce8f2a21-3eb7-488d-8337-3d4bea6929d8" CreationDate="2022-04-16T19:37:50.070" UserId="299" Text="How the democratic voting system in the document is decided?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7132" PostHistoryTypeId="3" PostId="1915" RevisionGUID="ce8f2a21-3eb7-488d-8337-3d4bea6929d8" CreationDate="2022-04-16T19:37:50.070" UserId="299" Text="|democratic|vote|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7133" PostHistoryTypeId="2" PostId="1916" RevisionGUID="fdb24c4d-016c-40ca-8ecf-d825aff8c4a0" CreationDate="2022-04-16T19:40:34.213" UserId="299" Text="Is there any way to speed up the implementation of democratic proposals?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/10t2n.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7135" PostHistoryTypeId="1" PostId="1916" RevisionGUID="fdb24c4d-016c-40ca-8ecf-d825aff8c4a0" CreationDate="2022-04-16T19:40:34.213" UserId="299" Text="Once the referendum is over, can the democratic proposals passed be implemented directly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7136" PostHistoryTypeId="3" PostId="1916" RevisionGUID="fdb24c4d-016c-40ca-8ecf-d825aff8c4a0" CreationDate="2022-04-16T19:40:34.213" UserId="299" Text="|democratic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7137" PostHistoryTypeId="2" PostId="1917" RevisionGUID="51694ab4-e13e-4239-b8f8-1f9b34bc34e5" CreationDate="2022-04-16T19:45:36.150" UserId="299" Text="On KSM, how many democratic proposals can be submitted in each referendum period?&#xD;&#xA;and what config on ksm runtime?&#xD;&#xA;I find here are two referendum on ksm.&#xD;&#xA;My proposal is urgent. What should I do?&#xD;&#xA;I can only submit democratic proposals, and I am very worried that my proposals will be crowded out by parliamentary proposals, because I have very important proposals to submit.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/G0jEL.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7139" PostHistoryTypeId="1" PostId="1917" RevisionGUID="51694ab4-e13e-4239-b8f8-1f9b34bc34e5" CreationDate="2022-04-16T19:45:36.150" UserId="299" Text="On KSM, how many democratic proposals can be submitted in each referendum period?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7140" PostHistoryTypeId="3" PostId="1917" RevisionGUID="51694ab4-e13e-4239-b8f8-1f9b34bc34e5" CreationDate="2022-04-16T19:45:36.150" UserId="299" Text="|democratic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7141" PostHistoryTypeId="5" PostId="1887" RevisionGUID="c0fb3dbb-61a2-4a32-918d-94867ab39c0d" CreationDate="2022-04-16T21:42:25.547" UserId="45" Comment="Add some links for the details" Text="No, Polkadot's consensus doesn't use HBBFT. When the original vision paper was written (https://polkadot.network/PolkaDotPaper.pdf), it was mentioned as a possible component or inspiration for research to be done later. But Polkadot ended up using a custom hybrid consensus mechanism composed of [BABE] and [GRANDPA]. Neither of these use threshold encryption or are asynchronously live (which is the hallmark of HBBFT).&#xD;&#xA;&#xD;&#xA;[BABE]: https://polkadot.network/blog/polkadot-consensus-part-3-babe/&#xD;&#xA;[GRANDPA]: https://polkadot.network/blog/polkadot-consensus-part-2-grandpa/" ContentLicense="CC BY-SA 4.0" />
  <row Id="7142" PostHistoryTypeId="2" PostId="1918" RevisionGUID="edcbf4fd-beb4-4183-b7b0-8c664cf9efe1" CreationDate="2022-04-16T22:59:53.467" UserId="2311" Text="I am creating a parachain with a custom pallet, where i have this set up in storage: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    pub type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;    pub type NeuronMetadataOf&lt;T&gt; = NeuronMetadata&lt;AccountIdOf&lt;T&gt;&gt;;&#xD;&#xA;    pub type BalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;    pub struct NeuronMetadata&lt;AccountId&gt; {&#xD;&#xA;      &#xD;&#xA;              /// ---- The associated hotkey account.&#xD;&#xA;        /// Registration and changing weights can be made by this&#xD;&#xA;        /// account.&#xD;&#xA;        pub key1: AccountId,&#xD;&#xA;&#xD;&#xA;        pub key2: AccountId,&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn uid)]&#xD;&#xA;    pub(super) type Neurons&lt;T:Config&gt; = StorageMap&lt;&#xD;&#xA;        _, &#xD;&#xA;        Identity, &#xD;&#xA;        u32, &#xD;&#xA;        NeuronMetadataOf&lt;T&gt;, &#xD;&#xA;        ValueQuery&#xD;&#xA;    &gt;;&#xD;&#xA;&#xD;&#xA;        #[cfg(feature = &quot;std&quot;)]&#xD;&#xA;        impl&lt;T&gt; Default for NeuronMetadata&lt;T&gt; {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Self { &#xD;&#xA;                key1: Default::default(),&#xD;&#xA;                key2: Default::default(),&#xD;&#xA;                }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;My understanding is AccountId is not designed to be bound to Default. A &quot;default&quot; AccountId doesn't make any sense to have and it helped mask a previous issue and so it was removed in a recent release. (This is from: https://substrate.stackexchange.com/questions/1812/why-is-there-no-default-implementation-for-taccountid). However now that I've defined a Default implementation for it, I keep getting an error that says &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `T: std::default::Default` is not satisfied&#xD;&#xA;   --&gt; pallets/subtensor/src/lib.rs:245:13&#xD;&#xA;    |&#xD;&#xA;245 |                 key1: Default::default(),&#xD;&#xA;    |                         ^^^^^^^^^^^^^^^^ the trait `std::default::Default` is not implemented for `T`&#xD;&#xA;    |&#xD;&#xA;note: required by `std::default::Default::default`&#xD;&#xA;```&#xD;&#xA;So my question is, I don't understand how to manually define `Default` for an `AccountId` struct like `NeuronMetaData&lt;AccountId&gt;`. Any examples would be super helpful here.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="7144" PostHistoryTypeId="1" PostId="1918" RevisionGUID="edcbf4fd-beb4-4183-b7b0-8c664cf9efe1" CreationDate="2022-04-16T22:59:53.467" UserId="2311" Text="Manually implement `Default` for `AccountId`" ContentLicense="CC BY-SA 4.0" />
  <row Id="7145" PostHistoryTypeId="3" PostId="1918" RevisionGUID="edcbf4fd-beb4-4183-b7b0-8c664cf9efe1" CreationDate="2022-04-16T22:59:53.467" UserId="2311" Text="|frame|runtime|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7146" PostHistoryTypeId="2" PostId="1919" RevisionGUID="b57859cf-b64b-4e0d-aeda-84e3317c64b1" CreationDate="2022-04-17T01:39:56.137" UserId="45" Text="The error message actually gives a clue. It says that you are trying to call `Default::default() → Self` and assign it to `key1`. &#xD;&#xA;&#xD;&#xA;You cannot call a function of a trait, you can only call a function on the implementing type. Rustc figures out that this type is `T`, the type of `key1`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T&gt; Default for NeuronMetadata&lt;T&gt; {&#xD;&#xA;  fn default() -&gt; Self {&#xD;&#xA;    Self { &#xD;&#xA;      key1: Default::default(),&#xD;&#xA;      key2: Default::default(),&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Look at the `impl&lt;T&gt;` part. It just declares `T` without any bounds. That is to say, that `T` can be any type whatsoever, including a type that does not implement `Default`. That's what rustc is trying to tell you.&#xD;&#xA;&#xD;&#xA;It's not obvious to me what you are trying to achieve in the end, but since `AccountId` doesn't have a proper `Default` implementation as was mentioned in the linked answer, you will have to come up with a way that avoids using that.&#xD;&#xA;&#xD;&#xA;For example, a common way to introduce &quot;defaultness&quot; is to use `Option&lt;T&gt;` instead of bare `T`. `Option&lt;T&gt;` has a `None` variant. This scheme is similar to having a null-reference in other languages such as Java/JS, etc.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7148" PostHistoryTypeId="2" PostId="1920" RevisionGUID="db397ec8-7fa8-4514-8276-339bcf349ed4" CreationDate="2022-04-17T05:04:18.660" UserId="2146" Text="I'm trying to make my very first indexer. I want to pull the `caller` (initiator's address) of a runtime system.remark, as well as the `block number`.&#xD;&#xA;&#xD;&#xA;What is the best way to do this via hooking into the runtime modules. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7150" PostHistoryTypeId="1" PostId="1920" RevisionGUID="db397ec8-7fa8-4514-8276-339bcf349ed4" CreationDate="2022-04-17T05:04:18.660" UserId="2146" Text="How to get caller and block number using Polkadot/Kusama Runtime modules and SubSquid" ContentLicense="CC BY-SA 4.0" />
  <row Id="7151" PostHistoryTypeId="3" PostId="1920" RevisionGUID="db397ec8-7fa8-4514-8276-339bcf349ed4" CreationDate="2022-04-17T05:04:18.660" UserId="2146" Text="|polkadot|runtime|kusama|subsquid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7152" PostHistoryTypeId="2" PostId="1921" RevisionGUID="839ac59e-fdec-46b4-bb60-e453eec4a6d7" CreationDate="2022-04-17T08:51:56.350" UserId="2307" Text="I have this error when I try to convert T::Moment to u64:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `u64: From&lt;&lt;T as pallet_nft::Config&gt;::Moment&gt;` is not satisfied&#xD;&#xA;   --&gt; pallets/ocw/src/lib.rs:193:30&#xD;&#xA;    |&#xD;&#xA;193 |                 let y = order.created_at.saturated_into::&lt;u64&gt;();&#xD;&#xA;    |                                          ^^^^^^^^^^^^^^ the trait `From&lt;&lt;T as pallet_nft::Config&gt;::Moment&gt;` is not implemented for `u64`&#xD;&#xA;    |    &#xD;&#xA;= note: required because of the requirements on the impl of `Into&lt;u64&gt;` for `&lt;T as pallet_nft::Config&gt;::Moment`&#xD;&#xA;= note: required because of the requirements on the impl of `std::convert::TryFrom&lt;&lt;T as pallet_nft::Config&gt;::Moment&gt;` for `u64`&#xD;&#xA;= note: required because of the requirements on the impl of `TryInto&lt;u64&gt;` for `&lt;T as pallet_nft::Config&gt;::Moment`&#xD;&#xA;= note: required because of the requirements on the impl of `UniqueSaturatedInto&lt;u64&gt;` for `&lt;T as pallet_nft::Config&gt;::Moment`&#xD;&#xA;note: required by a bound in `saturated_into`&#xD;&#xA;```&#xD;&#xA;So how to fix this. Thanks for reading!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7154" PostHistoryTypeId="1" PostId="1921" RevisionGUID="839ac59e-fdec-46b4-bb60-e453eec4a6d7" CreationDate="2022-04-17T08:51:56.350" UserId="2307" Text="How to convert T::Moment to u64" ContentLicense="CC BY-SA 4.0" />
  <row Id="7155" PostHistoryTypeId="3" PostId="1921" RevisionGUID="839ac59e-fdec-46b4-bb60-e453eec4a6d7" CreationDate="2022-04-17T08:51:56.350" UserId="2307" Text="|convert|moment|u64|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7156" PostHistoryTypeId="2" PostId="1922" RevisionGUID="1ce02b7b-db83-45e5-b92f-fe05b3508403" CreationDate="2022-04-17T09:25:37.450" UserId="1948" Text="Every 7 days, a new referendum will come up for a vote, assuming there is at least one proposal in one of the queues. There is a queue for Council-approved proposals (&quot;external queue&quot;) and a queue for publicly submitted proposals. The referendum to be voted upon alternates between the top proposal in the two queues.&#xD;&#xA;&#xD;&#xA;This mean that in the current design, only one referendum will be voted per launch period (7 days). However, if the Technical Committee decides to fast-track a proposal in external queue, given its urgency, more than one proposals can be voted at the same time. &#xD;&#xA;&#xD;&#xA;It is true that, if you submit as a public proposal, you will need to wait for your proposal to be seconded first, then voted (7 days) then enacted (7 more days). A way to speed this up, and if your proposal is pertinent to the vote of the community, you can request the Council to take into account your proposal for subsmission: any councillor will be able to open an external motion to then pass it to vote by the community. If you need assistance, feel free to contact me on Element: @raul.rtti:matrix.parity.io&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7158" PostHistoryTypeId="5" PostId="1922" RevisionGUID="5ef5a67a-020e-4988-97c4-b5362f1fcb81" CreationDate="2022-04-17T09:32:45.750" UserId="1948" Comment="added 87 characters in body" Text="Every 7 days, a new referendum will come up for a vote, assuming there is at least one proposal in one of the queues. There is a queue for Council-approved proposals (&quot;External Queue&quot;) and a queue for publicly submitted proposals (&quot;Proposals&quot;). The referendum to be voted upon alternates between the top proposal in the two queues.&#xD;&#xA;&#xD;&#xA;This mean that in the current design, only one referendum will be voted per launch period (7 days). However, if the Technical Committee decides to fast-track a proposal in external queue given its urgency, more than one proposal can be voted at the same time - as you can see on your screenshot (the added proposals originate from council as external motions).&#xD;&#xA;&#xD;&#xA;It is true that if you submit in public queue you will need to wait for your proposal to be seconded first, then voted (7 days) then enacted (7 more days). A way to speed this up, and if your proposal is pertinent to the vote of the community, is to request Council to take into account your proposal for submission: any councillor will be able to open an external motion, work with TC on fast-tracking (if an emergency) to then pass it to vote by the community. &#xD;&#xA;&#xD;&#xA;If you need assistance, feel free to contact me on Element: @raul.rtti:matrix.parity.io&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7159" PostHistoryTypeId="2" PostId="1923" RevisionGUID="95f26325-9aa6-4dff-851e-c6ea4d65f7b9" CreationDate="2022-04-17T10:07:20.417" UserId="1948" Text="By submitting it as an external motion in Council: if the proposal originates in Council as an external motion and the Technical Committee fast-tracks the proposal to move it to referenda queue, they can define the length of the enactment period: this means TC will define the voting period and the enactment period. However, if you submit it as a public proposal, both voting and enactment periods will last for 7 days. &#xD;&#xA;&#xD;&#xA;Take into account that TC will only execute short voting periods if the proposal is defined as urgent: meaning these are used for emergency bug fixes or rapid implementation of new but battle-tested features into the runtime - the TC always takes into account the safety of the network as a whole. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7161" PostHistoryTypeId="6" PostId="1911" RevisionGUID="20096612-735c-4176-a4a1-9ad266c39245" CreationDate="2022-04-17T10:17:19.013" UserId="16" Comment="edited tags" Text="|ink|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7162" PostHistoryTypeId="5" PostId="1911" RevisionGUID="20096612-735c-4176-a4a1-9ad266c39245" CreationDate="2022-04-17T10:17:19.013" UserId="16" Comment="edited tags" Text="I saw how to handle error from chain extension  on smart contract side&#xD;&#xA;https://paritytech.github.io/ink-docs/macros-attributes/chain-extension#error-code&#xD;&#xA;&#xD;&#xA;But i can't find example&#xD;&#xA;and can't understand how to return error from chain extension implementation?&#xD;&#xA;&#xD;&#xA;return Err(DispatchError::Other(&quot;Unimplemented func_id&quot;))&#xD;&#xA;or &#xD;&#xA;Ok(RetVal::Converging(1))&#xD;&#xA;&#xD;&#xA;What i need return from chain extension call function to have possibility get this error:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(extension = 1106, returns_result = true)]&#xD;&#xA;fn some_func(subject: PalletAssetBalanceRequest) -&gt; Result([u8; 16], SomeError);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7163" PostHistoryTypeId="2" PostId="1924" RevisionGUID="ec31aae1-7b7b-44f9-aa50-988ee0fe1a4b" CreationDate="2022-04-17T10:32:06.733" UserId="16" Text="You need to SCALE encode the `Result([u8; 16], SomeError)` and write it to the output buffer:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl ChainExtension for MyExtension {&#xD;&#xA;    fn call(func_id: u32, env: Environment) -&gt; Result&lt;RetVal&gt; {&#xD;&#xA;		// use buffers for input and output (as opposed to primitives)&#xD;&#xA;		let env = env.buf_in_buf_out();&#xD;&#xA;&#xD;&#xA;		/// do stuff with the input ...&#xD;&#xA;		let input: PalletAssetBalanceRequest = env.read_as()?;&#xD;&#xA;&#xD;&#xA;		/// write your error to the output buffer&#xD;&#xA;		let err: Result([u8; 16], SomeError) = ...;&#xD;&#xA;		env.write(err.encode().as_ref(), false, None);&#xD;&#xA;&#xD;&#xA;		// 0 usually means success which means your output buffer will be decoded by ink!.&#xD;&#xA;		// depends on your `FromStatusCode` implementation, though&#xD;&#xA;		Ok(RetVal::Converging(0))&#xD;&#xA;	}	&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also, check out the [chain extension documentation](https://paritytech.github.io/substrate/master/pallet_contracts/chain_extension/index.html)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7165" PostHistoryTypeId="6" PostId="1911" RevisionGUID="5ecbd6ff-9516-4c55-87f7-f6abc21adced" CreationDate="2022-04-17T10:55:15.887" UserId="16" Comment="edited tags" Text="|ink|smart-contract|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7166" PostHistoryTypeId="2" PostId="1925" RevisionGUID="25f85ced-40aa-4af4-beee-a19b073f8d25" CreationDate="2022-04-17T11:18:43.047" UserId="2102" Text="After reading this post https://substrate.stackexchange.com/questions/1786/implementation-of-runtime-api-rpc, I found out I was also missing the same requirement. Adding it and re-exporting my custom runtime for the custom pallet, the node compiled and it's working.&#xD;&#xA;&#xD;&#xA;I didn't need to include the getRandom crate to make it work, it was just that missing line -.-" ContentLicense="CC BY-SA 4.0" />
  <row Id="7172" PostHistoryTypeId="2" PostId="1927" RevisionGUID="754368f8-c8c6-42b6-9597-485493ac6a0d" CreationDate="2022-04-17T13:17:22.140" UserId="74" Text="I'm trying to generate type interfaces using definitions directly from Substrate and ORML libraries. I'm using the polkadotjs package versions 8.1.1.&#xD;&#xA;&#xD;&#xA;My type generate file looks like:&#xD;&#xA;```&#xD;&#xA;import * as ormlDefinitions from '@open-web3/orml-types/interfaces/definitions';&#xD;&#xA;&#xD;&#xA;// import fs from 'fs';&#xD;&#xA;import { generateDefaultConsts, generateDefaultQuery, generateDefaultRpc, generateDefaultTx } from '@polkadot/typegen/generate';&#xD;&#xA;import { generateInterfaceTypes } from '@polkadot/typegen/generate/interfaceRegistry';&#xD;&#xA;import { generateTsDef } from '@polkadot/typegen/generate/tsDef';&#xD;&#xA;import * as defaultDefinitions from '@polkadot/types/interfaces/definitions';&#xD;&#xA;&#xD;&#xA;// import * as webbDefinitions from '../src/interfaces/definitions.js';&#xD;&#xA;import metadata from '../src/metadata/static-latest.js';&#xD;&#xA;&#xD;&#xA;// eslint-disable-next-line @typescript-eslint/no-unused-vars&#xD;&#xA;const { runtime: _runtime, ...ormlModulesDefinitions } = ormlDefinitions;&#xD;&#xA;&#xD;&#xA;// eslint-disable-next-line @typescript-eslint/no-unused-vars&#xD;&#xA;const { runtime, ...substrateDefinitions } = defaultDefinitions;&#xD;&#xA;&#xD;&#xA;// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment&#xD;&#xA;const definitions = {&#xD;&#xA;  '@open-web3/orml-types/interfaces': ormlModulesDefinitions,&#xD;&#xA;  '@polkadot/types/interfaces': substrateDefinitions&#xD;&#xA;  // '@webb-tools/types/interfaces': webbDefinitions&#xD;&#xA;} as any;&#xD;&#xA;&#xD;&#xA;generateTsDef(definitions, 'packages/types/src/interfaces', '@webb-tools/types/interfaces');&#xD;&#xA;generateInterfaceTypes(definitions, 'packages/types/src/interfaces/augment-types.ts');&#xD;&#xA;generateDefaultConsts('packages/types/src/interfaces/augment-api-consts.ts', metadata, definitions, false);&#xD;&#xA;&#xD;&#xA;generateDefaultTx('packages/types/src/interfaces/augment-api-tx.ts', metadata, definitions, false);&#xD;&#xA;generateDefaultQuery('packages/types/src/interfaces/augment-api-query.ts', metadata, definitions, false);&#xD;&#xA;generateDefaultRpc('packages/types/src/interfaces/augment-api-rpc.ts', definitions);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Even without our custom types, I'm stuck getting this to execute and generate the type files. The errors are due to some undefined parameters.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;packages/types/src/interfaces/types.ts&#xD;&#xA;	Generating&#xD;&#xA;TypeError: Cannot convert undefined or null to object&#xD;&#xA;    at Function.entries (&lt;anonymous&gt;)&#xD;&#xA;    at file:///Users/drew/webb/webb.js/node_modules/@polkadot/typegen/generate/tsDef.js:295:12&#xD;&#xA;    at writeFile (file:///Users/drew/webb/webb.js/node_modules/@polkadot/typegen/util/file.js:9:19)&#xD;&#xA;    at generateTsDef (file:///Users/drew/webb/webb.js/node_modules/@polkadot/typegen/generate/tsDef.js:293:3)&#xD;&#xA;    at file:///Users/drew/webb/webb.js/packages/types/scripts/generate.ts:42:1&#xD;&#xA;    at ModuleJob.run (node:internal/modules/esm/module_job:195:25)&#xD;&#xA;    at async Promise.all (index 0)&#xD;&#xA;    at async ESMLoader.import (node:internal/modules/esm/loader:337:24)&#xD;&#xA;    at async loadESM (node:internal/process/esm_loader:88:5)&#xD;&#xA;    at async handleMainPromise (node:internal/modules/run_main:61:12)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any ideas how to add custom type libraries and generate from metadata? Is there some tutorial available against up-to-date dependencies?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7174" PostHistoryTypeId="1" PostId="1927" RevisionGUID="754368f8-c8c6-42b6-9597-485493ac6a0d" CreationDate="2022-04-17T13:17:22.140" UserId="74" Text="Error generating types/type interfaces" ContentLicense="CC BY-SA 4.0" />
  <row Id="7175" PostHistoryTypeId="3" PostId="1927" RevisionGUID="754368f8-c8c6-42b6-9597-485493ac6a0d" CreationDate="2022-04-17T13:17:22.140" UserId="74" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7177" PostHistoryTypeId="2" PostId="1928" RevisionGUID="af39d4e9-c97f-478f-8403-1a538c5f17bd" CreationDate="2022-04-17T16:32:40.930" UserId="450" Text="I have some questions that about custom data structure in ink!.&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/ink-docs/faq#what-are-the-scaleencode-and-scaledecode-traits. I already implemented some features with pallet and using the Encode, Decode trait is straight forward to me.&#xD;&#xA;&#xD;&#xA;However, there is also a section using some advance storage feature of ink!. https://paritytech.github.io/ink-docs/datastructures/custom-datastructure&#xD;&#xA;&#xD;&#xA;I’m kinda confused that which approach to use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7179" PostHistoryTypeId="1" PostId="1928" RevisionGUID="af39d4e9-c97f-478f-8403-1a538c5f17bd" CreationDate="2022-04-17T16:32:40.930" UserId="450" Text="Custom Data Struct in Ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7180" PostHistoryTypeId="3" PostId="1928" RevisionGUID="af39d4e9-c97f-478f-8403-1a538c5f17bd" CreationDate="2022-04-17T16:32:40.930" UserId="450" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7181" PostHistoryTypeId="5" PostId="1917" RevisionGUID="d613d4d3-1826-42cc-8119-78478d6d6959" CreationDate="2022-04-17T18:05:14.113" UserId="85" Comment="ksm -&gt; kusama" Text="On Kusama, how many democratic proposals can be submitted in each referendum period?&#xD;&#xA;and what config on ksm runtime?&#xD;&#xA;I find here are two referendum on kusama.&#xD;&#xA;My proposal is urgent. What should I do?&#xD;&#xA;I can only submit democratic proposals, and I am very worried that my proposals will be crowded out by parliamentary proposals, because I have very important proposals to submit.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/G0jEL.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7182" PostHistoryTypeId="4" PostId="1917" RevisionGUID="d613d4d3-1826-42cc-8119-78478d6d6959" CreationDate="2022-04-17T18:05:14.113" UserId="85" Comment="ksm -&gt; kusama" Text="On Kusama, how many democratic proposals can be submitted in each referendum period?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7183" PostHistoryTypeId="6" PostId="1920" RevisionGUID="f8b0bfa9-5e3e-4d61-b200-d4174b38499f" CreationDate="2022-04-17T18:07:40.663" UserId="85" Comment="edited tags; edited tags" Text="|polkadot|runtime|kusama|indexing|subsquid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7184" PostHistoryTypeId="6" PostId="35" RevisionGUID="cd2356e3-d5fa-4667-b3bd-a3be492bb09b" CreationDate="2022-04-17T18:08:35.533" UserId="85" Comment="edited tags" Text="|transactions|indexing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7188" PostHistoryTypeId="10" PostId="1777" RevisionGUID="a8575db8-c1b7-4272-8c4a-927562ec4801" CreationDate="2022-04-17T18:43:39.817" UserId="-1" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[1]}" />
  <row Id="7189" PostHistoryTypeId="5" PostId="1911" RevisionGUID="9ecee540-347a-4483-b0d4-a652c0e85ceb" CreationDate="2022-04-17T18:48:34.033" UserId="34" Comment="added 14 characters in body" Text="I saw how to handle error from chain extension  on smart contract side&#xD;&#xA;https://paritytech.github.io/ink-docs/macros-attributes/chain-extension#error-code&#xD;&#xA;&#xD;&#xA;But I can't find example&#xD;&#xA;and can't understand how to return error from chain extension implementation?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;return Err(DispatchError::Other(&quot;Unimplemented func_id&quot;))&#xD;&#xA;or &#xD;&#xA;Ok(RetVal::Converging(1))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What I need return from chain extension call function to have possibility get this error:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(extension = 1106, returns_result = true)]&#xD;&#xA;fn some_func(subject: PalletAssetBalanceRequest) -&gt; Result([u8; 16], SomeError);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7190" PostHistoryTypeId="10" PostId="1804" RevisionGUID="a44ea911-9433-4ed6-aba2-09da52acbfaf" CreationDate="2022-04-17T19:04:50.373" UserId="-1" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:128,&quot;DisplayName&quot;:&quot;Daniel Chmielewski&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="7191" PostHistoryTypeId="5" PostId="1916" RevisionGUID="53aad0cd-cc76-4914-a983-d096850b41c1" CreationDate="2022-04-17T22:22:32.237" UserId="34" Comment="added 77 characters in body; edited tags" Text="Is there any way to speed up the implementation of [democracy pallet](https://github.com/paritytech/substrate/tree/master/frame/democracy) proposals?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/10t2n.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7192" PostHistoryTypeId="6" PostId="1916" RevisionGUID="53aad0cd-cc76-4914-a983-d096850b41c1" CreationDate="2022-04-17T22:22:32.237" UserId="34" Comment="added 77 characters in body; edited tags" Text="|polkadot|kusama|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7193" PostHistoryTypeId="6" PostId="1915" RevisionGUID="494f7c8b-926f-4b30-a9d2-4edd59463fe5" CreationDate="2022-04-17T22:23:48.723" UserId="34" Comment="edited tags" Text="|polkadot|kusama|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7194" PostHistoryTypeId="6" PostId="1921" RevisionGUID="f08d1b5e-aaee-4253-a0ff-5ec958c3854e" CreationDate="2022-04-17T22:42:06.593" UserId="34" Comment="edited tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7195" PostHistoryTypeId="6" PostId="1865" RevisionGUID="d1a6e790-45f1-4c9b-85aa-902287ca24e5" CreationDate="2022-04-17T22:43:50.180" UserId="34" Comment="edited tags" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7198" PostHistoryTypeId="6" PostId="1613" RevisionGUID="b4dcbfb0-73e0-4684-998e-30b8f5a9c252" CreationDate="2022-04-17T22:47:37.740" UserId="34" Comment="edited tags" Text="|substrate-node|rpc|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7199" PostHistoryTypeId="2" PostId="1930" RevisionGUID="db7b471e-2b7a-4511-bacc-b7f5193624ad" CreationDate="2022-04-17T22:54:41.443" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="7201" PostHistoryTypeId="1" PostId="1930" RevisionGUID="db7b471e-2b7a-4511-bacc-b7f5193624ad" CreationDate="2022-04-17T22:54:41.443" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7202" PostHistoryTypeId="1" PostId="1931" RevisionGUID="de4de7b9-183d-435e-b607-77323b211984" CreationDate="2022-04-17T22:54:41.443" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7204" PostHistoryTypeId="2" PostId="1931" RevisionGUID="de4de7b9-183d-435e-b607-77323b211984" CreationDate="2022-04-17T22:54:41.443" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="7205" PostHistoryTypeId="2" PostId="1932" RevisionGUID="1ed5144e-02f9-4a49-88da-7288a2673799" CreationDate="2022-04-18T00:03:31.897" UserId="549" Text="I have function that will take an admin account and verify when metadata is passed in that the admin account has signed it and the Signature is provided in a struct called `NftSaleMetadata&lt;AccountId, BoundedString&gt;`. When I write unit tests the tests pass, but when I write the javascript scripts to sign the metadata then execute a transaction, I get failures. Is there something wrong with my verification function?&#xD;&#xA;&#xD;&#xA;`NftSaleMetadata` struct&#xD;&#xA;```&#xD;&#xA;/// Metadata to ensure metadata passed in is signed by the Overlord account&#xD;&#xA;#[derive(Encode, Decode, Clone, Debug, PartialEq, TypeInfo)]&#xD;&#xA;pub struct NftSaleMetadata&lt;BoundedString&gt; {&#xD;&#xA;	pub metadata: BoundedString,&#xD;&#xA;	pub signature: sr25519::Signature,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;`verify_nft_metadata` that is called from a public minting function&#xD;&#xA;```&#xD;&#xA;pub fn verify_nft_metadata(&#xD;&#xA;	overlord: &amp;T::AccountId,&#xD;&#xA;	nft_metadata: NftSaleMetadata&lt;BoundedVec&lt;u8, T::StringLimit&gt;&gt;,&#xD;&#xA;) -&gt; Result&lt;BoundedVec&lt;u8, T::StringLimit&gt;, Error&lt;T&gt;&gt; {&#xD;&#xA;	let metadata = nft_metadata.metadata;&#xD;&#xA;	let signature = nft_metadata.signature;&#xD;&#xA;	// Serialize evidence&#xD;&#xA;	let msg = Encode::encode(&amp;metadata);&#xD;&#xA;	let encode_overlord = T::AccountId::encode(overlord);&#xD;&#xA;	let h256_overlord = H256::from_slice(&amp;encode_overlord);&#xD;&#xA;	let overlord_key = sr25519::Public::from_h256(h256_overlord);&#xD;&#xA;	// verify claim&#xD;&#xA;	ensure!(&#xD;&#xA;		sp_io::crypto::sr25519_verify(&amp;signature, &amp;msg, &amp;overlord_key),&#xD;&#xA;		Error::&lt;T&gt;::InvalidMetadata&#xD;&#xA;	);&#xD;&#xA;	Ok(metadata)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Unit test example that passes where `claim_spirit` will call helper function `verify_nft_metadata` to verify the signed metadata&#xD;&#xA;```&#xD;&#xA;#[test]&#xD;&#xA;fn claimed_spirit_works() {&#xD;&#xA;	ExtBuilder::default().build(OVERLORD).execute_with(|| {&#xD;&#xA;		let overlord_pair = sr25519::Pair::from_seed(b&quot;28133080042813308004281330800428&quot;);&#xD;&#xA;		// let overlord_pub = overlord_pair.public();&#xD;&#xA;		// Set Overlord and configuration then enable spirits to be claimed&#xD;&#xA;		setup_config(StatusType::ClaimSpirits);&#xD;&#xA;		let metadata = stb(&quot;I am Spirit&quot;);&#xD;&#xA;		let enc_metadata = Encode::encode(&amp;metadata);&#xD;&#xA;		let metadata_signature = overlord_pair.sign(&amp;enc_metadata);&#xD;&#xA;		let nft_sale_metadata =&#xD;&#xA;			NftSaleMetadata { metadata: metadata.clone(), signature: metadata_signature };&#xD;&#xA;		// Sign BOB's Public Key and Metadata encoding with OVERLORD account&#xD;&#xA;		let claim = Encode::encode(&amp;BOB);&#xD;&#xA;		let overlord_signature = overlord_pair.sign(&amp;claim);&#xD;&#xA;		let bob_ticket = ClaimSpiritTicket { account: BOB, signature: overlord_signature };&#xD;&#xA;		// Dispatch a claim spirit from BOB's account&#xD;&#xA;		assert_ok!(PhalaWorld::claim_spirit(&#xD;&#xA;			Origin::signed(BOB),&#xD;&#xA;			Some(bob_ticket),&#xD;&#xA;			nft_sale_metadata.clone()&#xD;&#xA;		));&#xD;&#xA;		// ALICE should be able to claim since she has minimum amount of PHA&#xD;&#xA;		assert_ok!(PhalaWorld::claim_spirit(Origin::signed(ALICE), None, nft_sale_metadata));&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;JS script that fail when trying to `claim_spirit` the output to console says valid signature, but the transaction fails with invalid metadata&#xD;&#xA;```&#xD;&#xA;const keyring = new Keyring({type: 'sr25519'});&#xD;&#xA;// status types&#xD;&#xA;const claimSpirits = api.createType('StatusType', 'ClaimSpirits');&#xD;&#xA;const overlord = keyring.addFromUri(overlordPrivkey);&#xD;&#xA;const metadata = stringToU8a('I am Spirit');&#xD;&#xA;const metadataSig = overlord.sign(metadata);&#xD;&#xA;const isValid = overlord.verify(metadata, metadataSig, overlord.publicKey);&#xD;&#xA;    &#xD;&#xA;// output the result&#xD;&#xA;console.log(`${u8aToHex(metadataSig)}\n ${u8aToHex(metadata)} is ${isValid ? 'valid' : 'invalid'}`);&#xD;&#xA;const nftSignedMetadata = api.createType(&quot;NftSaleMetadata&quot;, {'metadata': metadata, 'signature': metadataSig});&#xD;&#xA;await api.tx.phalaWorld.claimSpirit(null, nftSignedMetadata).signAndSend(user);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7207" PostHistoryTypeId="1" PostId="1932" RevisionGUID="1ed5144e-02f9-4a49-88da-7288a2673799" CreationDate="2022-04-18T00:03:31.897" UserId="549" Text="Why does my unit test pass when verifying signed metadata, but fails when signing through Polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="7208" PostHistoryTypeId="3" PostId="1932" RevisionGUID="1ed5144e-02f9-4a49-88da-7288a2673799" CreationDate="2022-04-18T00:03:31.897" UserId="549" Text="|substrate-node|pallet|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7209" PostHistoryTypeId="2" PostId="1933" RevisionGUID="6ca14659-f170-4133-8f84-ed0fcb5a1db6" CreationDate="2022-04-18T00:12:51.363" UserId="2118" Text="My goal is to get a list of the stash account addresses of all validators using the golang substrate client. &#xD;&#xA;&#xD;&#xA;**Context**&#xD;&#xA;My approach so far is to take inspiration from the polkadotjs application and other apps that use it. With the polkadotjs client fetching all stash accounts can be achieved with the derive api by calling `api.derive.staking.stashes()`. Under the hood this calls `api.query.staking.validators.keys()`, from what I gather this retrieves all the keys with the prefix &quot;Staking&quot; and function &quot;Validators&quot;. With the golang client, I am able to get a list of StorageKeys that are under &quot;Staking&quot; - &quot;Validators&quot;, however, I can not make sense of them in the same way the polkadotjs client can, which seems to automatically decode the arguments from a storage key. &#xD;&#xA;&#xD;&#xA;**Question** How do I decode/retrieve the argument from a types.StorageKey to an account ID in the golang substrate client? Or, alternatively, how do I query all stash addresses with the golang client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7211" PostHistoryTypeId="1" PostId="1933" RevisionGUID="6ca14659-f170-4133-8f84-ed0fcb5a1db6" CreationDate="2022-04-18T00:12:51.363" UserId="2118" Text="Retrieving all validator accounts with the golang client" ContentLicense="CC BY-SA 4.0" />
  <row Id="7212" PostHistoryTypeId="3" PostId="1933" RevisionGUID="6ca14659-f170-4133-8f84-ed0fcb5a1db6" CreationDate="2022-04-18T00:12:51.363" UserId="2118" Text="|staking|validator|golang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7214" PostHistoryTypeId="5" PostId="1921" RevisionGUID="b2accc11-73e9-4292-9d5d-49828fea9d77" CreationDate="2022-04-18T04:08:54.860" UserId="2307" Comment="added 1447 characters in body" Text="Here is my code:&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;    pub struct PayInstallmentOrder&lt;Account, Balance, Time&gt; {&#xD;&#xA;		pub creator: Account,&#xD;&#xA;		pub created_at: Time,&#xD;&#xA;        pub periods_left: u8,&#xD;&#xA;		pub paid: Balance,&#xD;&#xA;		pub nft_id: [u8; 16],&#xD;&#xA;	}&#xD;&#xA;#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;&#xD;&#xA;		type Currency: ReservableCurrency&lt;Self::AccountId&gt; + Currency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		type NFTRandomness: Randomness&lt;Self::Hash, Self::BlockNumber&gt;;&#xD;&#xA;&#xD;&#xA;		type WeightInfo: WeightInfo;&#xD;&#xA;&#xD;&#xA;		/// Deposit required for per byte.&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type DataDepositPerByte: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;		type Moment: Parameter&#xD;&#xA;			+ Default&#xD;&#xA;			+ Scale&lt;Self::BlockNumber, Output = Self::Moment&gt;&#xD;&#xA;			+ Copy&#xD;&#xA;			+ MaxEncodedLen&#xD;&#xA;			+ StaticTypeInfo&#xD;&#xA;			+ MaybeSerializeDeserialize&#xD;&#xA;			+ Send;&#xD;&#xA;&#xD;&#xA;		type Timestamp: Time&lt;Moment = Self::Moment&gt;;&#xD;&#xA;	}&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    pub fn get_installment_orders() -&gt; Vec&lt;PayInstallmentOrder&lt;T::AccountId, BalanceOf&lt;T&gt;, T::Moment&gt;&gt; {&#xD;&#xA;			OrderByTokenId::&lt;T&gt;::iter_values().collect()&#xD;&#xA;		}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// then I do tightly coupling in another pallet to call get_installment_orders() and take the created_at field in orders&#xD;&#xA;```&#xD;&#xA;I have this error when I try to convert T::Moment to u64 in the other pallet&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `u64: From&lt;&lt;T as pallet_nft::Config&gt;::Moment&gt;` is not satisfied&#xD;&#xA;   --&gt; pallets/ocw/src/lib.rs:193:30&#xD;&#xA;    |&#xD;&#xA;193 |                 let y = order.created_at.saturated_into::&lt;u64&gt;();&#xD;&#xA;    |                                          ^^^^^^^^^^^^^^ the trait `From&lt;&lt;T as pallet_nft::Config&gt;::Moment&gt;` is not implemented for `u64`&#xD;&#xA;    |    &#xD;&#xA;= note: required because of the requirements on the impl of `Into&lt;u64&gt;` for `&lt;T as pallet_nft::Config&gt;::Moment`&#xD;&#xA;= note: required because of the requirements on the impl of `std::convert::TryFrom&lt;&lt;T as pallet_nft::Config&gt;::Moment&gt;` for `u64`&#xD;&#xA;= note: required because of the requirements on the impl of `TryInto&lt;u64&gt;` for `&lt;T as pallet_nft::Config&gt;::Moment`&#xD;&#xA;= note: required because of the requirements on the impl of `UniqueSaturatedInto&lt;u64&gt;` for `&lt;T as pallet_nft::Config&gt;::Moment`&#xD;&#xA;note: required by a bound in `saturated_into`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So how to fix this. Thanks for reading!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7215" PostHistoryTypeId="2" PostId="1934" RevisionGUID="f7de86ba-310e-434e-b204-ee902588f807" CreationDate="2022-04-18T05:50:06.827" UserId="549" Text="I ended up resolving the issue. What the substrate code is doing is encoding the metadata before signing with the `Overlord` admin account which is a step I was missing with my JS script. Here is what the script looks like that allowed to verify the signed metadata.&#xD;&#xA;```&#xD;&#xA;const metadata = 'I am Spirit';&#xD;&#xA;const metadataType = api.createType('BoundedVec&lt;u8, T::StringLimit&gt;', metadata).toU8a();&#xD;&#xA;const metadataSig = overlord.sign(metadataType);&#xD;&#xA;const isValid = overlord.verify(metadata, metadataSig, overlord.address);&#xD;&#xA;const nftSignedMetadata = api.createType('NftSaleMetadata', {'metadata': metadataType, 'signature': metadataSig});&#xD;&#xA;    &#xD;&#xA;  &#xD;&#xA;// Mint a Spirit with another user account&#xD;&#xA;await api.tx.phalaWorld.claimSpirit(null, nftSignedMetadata).signAndSend(user);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7217" PostHistoryTypeId="2" PostId="1935" RevisionGUID="1a393f2b-1cee-47b9-bc63-ed7b1a408f3b" CreationDate="2022-04-18T07:58:47.537" UserId="393" Text="What if you just define Moment(associated type) in the following way:&#xD;&#xA;&#xD;&#xA;    type Moment: Parameter&#xD;&#xA;            + Default&#xD;&#xA;            + Scale&lt;Self::BlockNumber, Output = Self::Moment&gt;&#xD;&#xA;            + Copy&#xD;&#xA;            + MaxEncodedLen&#xD;&#xA;            + StaticTypeInfo&#xD;&#xA;            + MaybeSerializeDeserialize&#xD;&#xA;            + Send&#xD;&#xA;            + Into&lt;u64&gt;;&#xD;&#xA;&#xD;&#xA;Take care of the bottom line &quot;+ Into&lt;u64&gt;&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="7219" PostHistoryTypeId="2" PostId="1936" RevisionGUID="e6dc3302-ce10-4c97-a136-fb0f0a0e70b8" CreationDate="2022-04-18T08:20:37.330" UserId="1838" Text="for techcomm:&#xD;&#xA;&#xD;&#xA;use technicalCommittee &gt; setMembers(newMembers, prime, oldCount)&#xD;&#xA;&#xD;&#xA;technicalCommittee page will synchronize this information(chainstate &gt; technicalCommittee &gt; members) in real time&#xD;&#xA;&#xD;&#xA;but for council:&#xD;&#xA;&#xD;&#xA;use council &gt; setMembers(newMembers, prime, oldCount)&#xD;&#xA;&#xD;&#xA;Council page's member and  chain state(council &gt; members) are different. why?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7221" PostHistoryTypeId="1" PostId="1936" RevisionGUID="e6dc3302-ce10-4c97-a136-fb0f0a0e70b8" CreationDate="2022-04-18T08:20:37.330" UserId="1838" Text="why Council page's member and chain state(council &gt; members) are different?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7222" PostHistoryTypeId="3" PostId="1936" RevisionGUID="e6dc3302-ce10-4c97-a136-fb0f0a0e70b8" CreationDate="2022-04-18T08:20:37.330" UserId="1838" Text="|council|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7229" PostHistoryTypeId="2" PostId="1938" RevisionGUID="17fc3dd4-f557-4456-8643-cdffa3965118" CreationDate="2022-04-18T10:46:32.270" UserId="2332" Text="the ID of the account that triggered the extrinsic is present in the &#xD;&#xA;`ExtrinsicHandlerContext`, under `extrinsic.signer`. You can simply do this to obtain it:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;ctx.extrinsic.signer&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the block number is available in the `block` field of the `ExtrinsicHandlerContext` as `height`:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;ctx.block.height&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You could also hook to the `system.Remarked` event, instead of the `system.remark` call.&#xD;&#xA;&#xD;&#xA;https://polkadot.subscan.io/event?module=System&amp;event=Remarked&#xD;&#xA;&#xD;&#xA;The Event should follow the call, if I am not mistaken, and, as a bonus, it reports the `sender` field as one of the Event's arguments. Subsquid's typegen generates this wrapper for it:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;export class SystemRemarkedEvent {&#xD;&#xA;  constructor(private ctx: EventContext) {&#xD;&#xA;    assert(this.ctx.event.name === 'system.Remarked')&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   *  On on-chain remark happened. \[origin, remark_hash\]&#xD;&#xA;   */&#xD;&#xA;  get isV2030(): boolean {&#xD;&#xA;    return this.ctx._chain.getEventHash('system.Remarked') === 'e54ae910805a8a9413af1a7f5885a5d0ba5f4e105175cd6b0ce2a8702ddf1861'&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   *  On on-chain remark happened. \[origin, remark_hash\]&#xD;&#xA;   */&#xD;&#xA;  get asV2030(): [Uint8Array, Uint8Array] {&#xD;&#xA;    assert(this.isV2030)&#xD;&#xA;    return this.ctx._chain.decodeEvent(this.ctx.event)&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   * On on-chain remark happened.&#xD;&#xA;   */&#xD;&#xA;  get isV9160(): boolean {&#xD;&#xA;    return this.ctx._chain.getEventHash('system.Remarked') === 'c58b73482fe762a6dcca2f35266f0d1739333312cf7a50eea55c666d0cda6101'&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   * On on-chain remark happened.&#xD;&#xA;   */&#xD;&#xA;  get asV9160(): {sender: v9160.AccountId32, hash: v9160.H256} {&#xD;&#xA;    assert(this.isV9160)&#xD;&#xA;    return this.ctx._chain.decodeEvent(this.ctx.event)&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  get isLatest(): boolean {&#xD;&#xA;    deprecateLatest()&#xD;&#xA;    return this.isV9160&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  get asLatest(): {sender: v9160.AccountId32, hash: v9160.H256} {&#xD;&#xA;    deprecateLatest()&#xD;&#xA;    return this.asV9160&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As for the block number, it's even easier, you can get it like this:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;ctx.event.blockNumber&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7232" PostHistoryTypeId="2" PostId="1939" RevisionGUID="b98264cf-7d74-419d-9433-8cf1a22efd4a" CreationDate="2022-04-18T11:01:54.107" UserId="140" Text="I was going through ss58 documentation and trying to find out the relationship between ss58 and public key. &#xD;&#xA;&#xD;&#xA;I want to know what is the use of this prefix https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7234" PostHistoryTypeId="1" PostId="1939" RevisionGUID="b98264cf-7d74-419d-9433-8cf1a22efd4a" CreationDate="2022-04-18T11:01:54.107" UserId="140" Text="What is the use of this prefix https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="7235" PostHistoryTypeId="3" PostId="1939" RevisionGUID="b98264cf-7d74-419d-9433-8cf1a22efd4a" CreationDate="2022-04-18T11:01:54.107" UserId="140" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7237" PostHistoryTypeId="2" PostId="1940" RevisionGUID="9b8392f7-264d-4ca7-8e9e-3ed1c531a7a4" CreationDate="2022-04-18T12:38:10.703" UserId="2338" Text="I've been wondering how I can access a contract's code hash. I see that from ink version 3.0.1, there is a function inside the ink_env crate **code_hash** but even when updating to the following version, I don't have access to it. Is there any other way of doing this or a similar one, just to retrieve the code hash, i.e from the **&quot;metadata.json&quot;** of the contract or the **&quot;.contract&quot;** file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7239" PostHistoryTypeId="1" PostId="1940" RevisionGUID="9b8392f7-264d-4ca7-8e9e-3ed1c531a7a4" CreationDate="2022-04-18T12:38:10.703" UserId="2338" Text="Ways to get the code hash of a contract by a given address" ContentLicense="CC BY-SA 4.0" />
  <row Id="7240" PostHistoryTypeId="3" PostId="1940" RevisionGUID="9b8392f7-264d-4ca7-8e9e-3ed1c531a7a4" CreationDate="2022-04-18T12:38:10.703" UserId="2338" Text="|substrate-node|ink|pallet-contracts|codehash|contractscodehash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7241" PostHistoryTypeId="2" PostId="1941" RevisionGUID="307dd857-8ae2-4b39-9c32-af9b654ae751" CreationDate="2022-04-18T13:10:34.587" UserId="2195" Text="I'm trying to set another owner for the messages and GRANDPA pallets, but I'm not succeeding while using the sudo account. I'm getting a sudo.Sudid BadOrigin error as a result.&#xD;&#xA;&#xD;&#xA;I've been told that this could be a permission error. What am I missing here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7243" PostHistoryTypeId="1" PostId="1941" RevisionGUID="307dd857-8ae2-4b39-9c32-af9b654ae751" CreationDate="2022-04-18T13:10:34.587" UserId="2195" Text="sudo(bridgeRococoGrandpa.setOwner()) call resulting in BadOrigin error" ContentLicense="CC BY-SA 4.0" />
  <row Id="7244" PostHistoryTypeId="3" PostId="1941" RevisionGUID="307dd857-8ae2-4b39-9c32-af9b654ae751" CreationDate="2022-04-18T13:10:34.587" UserId="2195" Text="|pallet|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7245" PostHistoryTypeId="5" PostId="1941" RevisionGUID="19d6a2b7-c084-4b1e-b17e-69e9a2aa6d8e" CreationDate="2022-04-18T13:40:46.957" UserId="2195" Comment="solution found" Text="I'm trying to set another owner for the messages and GRANDPA pallets, but I'm not succeeding while using the sudo account. I'm getting a sudo.Sudid BadOrigin error as a result.&#xD;&#xA;&#xD;&#xA;I've been told that this could be a permission error. What am I missing here?&#xD;&#xA;&#xD;&#xA;Edit: It does work if I submit an extrinsic instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="7246" PostHistoryTypeId="2" PostId="1942" RevisionGUID="1d8f5324-cb33-441d-889b-8fd08b6af647" CreationDate="2022-04-18T13:51:13.657" UserId="2102" Text="I've been doing some work with subsquid as my blockchain indexer (https://docs.subsquid.io/), I think it only saves finalized blocks, but I haven't found anything related to that. &#xD;&#xA;&#xD;&#xA;Does anyone know if I'm right? Does it only store finalized blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7248" PostHistoryTypeId="1" PostId="1942" RevisionGUID="1d8f5324-cb33-441d-889b-8fd08b6af647" CreationDate="2022-04-18T13:51:13.657" UserId="2102" Text="Does SubSquid only store finalized blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7249" PostHistoryTypeId="3" PostId="1942" RevisionGUID="1d8f5324-cb33-441d-889b-8fd08b6af647" CreationDate="2022-04-18T13:51:13.657" UserId="2102" Text="|subsquid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7250" PostHistoryTypeId="2" PostId="1943" RevisionGUID="0dd7952c-e10a-4cc3-b45e-9375ed9931f1" CreationDate="2022-04-18T13:52:21.063" UserId="2340" Text="Working on a parachain, the executable that is build is a collator node. It will run both the parachain and the relay-chain nodes.&#xD;&#xA;&#xD;&#xA;For pallet development (pure product, unrelated to the chain being a standalone or a parachain, just the stuff that make this chain special), it's not ideal to have to run a local relay chain + the collator node just to test you runtime and call a few extrinsics.&#xD;&#xA;&#xD;&#xA;What I am looking for is for an easy way to run the parachain runtime as a standalone. Basically, run the chain runtime without the added Cumulus part. Like I would have running `cargo run --dev` on a regular, non parachain, chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="7252" PostHistoryTypeId="1" PostId="1943" RevisionGUID="0dd7952c-e10a-4cc3-b45e-9375ed9931f1" CreationDate="2022-04-18T13:52:21.063" UserId="2340" Text="Run parachain as local regular chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="7253" PostHistoryTypeId="3" PostId="1943" RevisionGUID="0dd7952c-e10a-4cc3-b45e-9375ed9931f1" CreationDate="2022-04-18T13:52:21.063" UserId="2340" Text="|parachain|runtime|collator|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7254" PostHistoryTypeId="2" PostId="1944" RevisionGUID="ed53de9d-aa64-4a63-aed4-03de447c9c3b" CreationDate="2022-04-18T14:03:05.440" UserId="342" Text="First thing to keep in mind is that an SS58 address is just a sequence of bytes   encoded in base 58. This sequence can be dissected in three components:&#xD;&#xA; 1. Network-Id&#xD;&#xA; 2. Public Key (verbatim in case of sr25519/ed25519 or hashed in case of secp255k1 key)&#xD;&#xA; 3. Checksum&#xD;&#xA;&#xD;&#xA;The Network-Id is what is referred as the &quot;prefix&quot; in the ss58 registry you shared. For example a generic Substrate address has a prefix set to 42 ([here](https://github.com/paritytech/ss58-registry/blob/809d71dd2da2683772e15a0432b93b5d23305760/ss58-registry.json#L374)).&#xD;&#xA;&#xD;&#xA;The same public key can be used to generate different addresses by changing the prefix (the checksum changes as a consequence).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;An example may help.&#xD;&#xA;&#xD;&#xA;Generate a sr25519 keypair via `subkey` tool:&#xD;&#xA;&#xD;&#xA;    ❯ subkey generate --scheme sr25519&#xD;&#xA;    Secret phrase `trip embody match refuse exchange cabin brand try write eight lamp endorse` is account:&#xD;&#xA;      Secret seed:      0xa444d232c8a70098d94add70f9ceb4702c58aca4558966e2ce7d59c153306389&#xD;&#xA;      Public key (hex): 0x6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79&#xD;&#xA;      Account ID:       0x6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79&#xD;&#xA;      SS58 Address:     5EUAFw4JM21WgrjqEqBPXGSZ2zUCkxdCiaNTeuzC7t8twpiD&#xD;&#xA;&#xD;&#xA;Convert the SS58 address from base 58 to hex to inspect the content (for example using [this](https://www.better-converter.com/Encoders-Decoders/Base58Check-to-Hexadecimal-Decoder) website).&#xD;&#xA;&#xD;&#xA;    B58: 5EUAFw4JM21WgrjqEqBPXGSZ2zUCkxdCiaNTeuzC7t8twpiD&#xD;&#xA;    Hex: 2a6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e7973b2&#xD;&#xA;&#xD;&#xA;The hex version can be decomposed as follows:&#xD;&#xA;&#xD;&#xA; - 2a = Network id (42 in decimal == generic Substrate network)&#xD;&#xA; - 6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79 = sr25519 Public Key&#xD;&#xA; - 73b2 = checksum&#xD;&#xA;&#xD;&#xA;The very same public key can be part of an address used in a different network. For example, for Polkadot:&#xD;&#xA;&#xD;&#xA;    ❯ subkey inspect --scheme sr25519 &quot;trip embody match refuse exchange cabin brand try write eight lamp endorse&quot; --network polkadot&#xD;&#xA;    Secret phrase `trip embody match refuse exchange cabin brand try write eight lamp endorse` is account:&#xD;&#xA;      Secret seed:      0xa444d232c8a70098d94add70f9ceb4702c58aca4558966e2ce7d59c153306389&#xD;&#xA;      Public key (hex): 0x6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79&#xD;&#xA;      Account ID:       0x6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79&#xD;&#xA;      SS58 Address:     13QTQGKNCoGz8PkMCUEPfRGhtcTrTGBLo56wpCyYfyAR89hu&#xD;&#xA;&#xD;&#xA;Convert the SS58 address from base 58 to hex&#xD;&#xA;&#xD;&#xA;    Base 58: 13QTQGKNCoGz8PkMCUEPfRGhtcTrTGBLo56wpCyYfyAR89hu&#xD;&#xA;    Hex: 006a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79259c&#xD;&#xA;&#xD;&#xA;Note that the public key component is still the same, while the Network-ID and the Checksum is changed (Network id is now set to 0x00, i.e. the Polkadot prefix [here](https://github.com/paritytech/ss58-registry/blob/809d71dd2da2683772e15a0432b93b5d23305760/ss58-registry.json#L14))&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You can find another example [here](https://substrate.stackexchange.com/questions/1792/different-representation-of-the-same-address-between-polkadot-js-and-an-explorer/1797#1797) " ContentLicense="CC BY-SA 4.0" />
  <row Id="7256" PostHistoryTypeId="2" PostId="1945" RevisionGUID="807eb212-be47-48e9-8b42-235dde936ac2" CreationDate="2022-04-18T14:17:19.980" UserId="342" Text="I'm reading the &quot;parachain implementers guide&quot; [here](https://w3f.github.io/parachain-implementers-guide/protocol-approval.html) and I understood that the parachain block journey ends when it is finally &quot;approved&quot; and included in the relay chain.&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA; 1. Where/How is the parablock information stored (e.g. as a digest entry within a relay chain block or directly in the relay chain state via an extrinsic?)&#xD;&#xA; 2. What information is finally stored (e.g. only the parachain new state hash?)&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="7258" PostHistoryTypeId="1" PostId="1945" RevisionGUID="807eb212-be47-48e9-8b42-235dde936ac2" CreationDate="2022-04-18T14:17:19.980" UserId="342" Text="Where and how is the information about a parachain block stored within the relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7259" PostHistoryTypeId="3" PostId="1945" RevisionGUID="807eb212-be47-48e9-8b42-235dde936ac2" CreationDate="2022-04-18T14:17:19.980" UserId="342" Text="|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7260" PostHistoryTypeId="2" PostId="1946" RevisionGUID="df5b4c24-6f8b-47d7-9b7c-d5b609e000d1" CreationDate="2022-04-18T15:31:30.220" UserId="45" Text="By looking at the code, it looks like the code has been just [landed](https://github.com/paritytech/ink/pull/1205), maybe that's why you don't have access to it.&#xD;&#xA;&#xD;&#xA;&gt; Is there any other way of doing this or a similar one, just to retrieve the code hash, i.e from the &quot;metadata.json&quot; of the contract or the &quot;.contract&quot; file?&#xD;&#xA;&#xD;&#xA;Assuming you don't need to read the code hash on-chain and you just need to obtain the code hash of a given wasm file, then it should be rather simple.&#xD;&#xA;&#xD;&#xA;Per [this](https://github.com/paritytech/substrate/blob/0a7e5ea46a17d71818eef8216e24eef0565bab57/frame/contracts/src/wasm/prepare.rs#L503), the `code_hash` is nothing else but the hash of the wasm code according to the specified hasher. This is chain dependent, but [more](https://github.com/substrate-developer-hub/substrate-node-template/blob/e7dc0c7a7f481e7ea24e1794f147decd14814c53/runtime/src/lib.rs#L166) often than not it [is](https://github.com/paritytech/cumulus/blob/master/polkadot-parachains/canvas-kusama/src/lib.rs#L162) blake2-256 hasher (or more specifically, it [is](https://github.com/paritytech/substrate/blob/0a7e5ea46a17d71818eef8216e24eef0565bab57/primitives/core/hashing/src/lib.rs#L45) the blake2b-256).&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7262" PostHistoryTypeId="2" PostId="1947" RevisionGUID="38c753af-2d5e-4c35-9860-d5436b85c0f9" CreationDate="2022-04-18T15:51:07.860" UserId="45" Text="The parachain block candidate first gets included into the relay-chain during the processes known as &quot;backing&quot;. At that point, the candidate is just saved in the relay-chain, but is not treated as &quot;executed&quot;. Only when the backed candidate gets available the candidate is taken into account by the relay-chain and its effects are applied. That includes updating the head data and sending out messages. But at that point, the chain at which such candidate is included is not finalized and cannot be, until all the candidates are gone through the approval process.&#xD;&#xA;&#xD;&#xA;The candidate data gets into the relay-chain via the so-called [parasinherent](https://w3f.github.io/parachain-implementers-guide/runtime/parainherent.html). Inherent is a special type of an extrinsic which is submitted by the block producer. During the on-chain handling, they will get into the [`process_candidates`](https://github.com/paritytech/polkadot/blob/da5b6b691d2edd2fd797e5ed612be06fa65af627/runtime/parachains/src/paras_inherent/mod.rs#L519) of the [inclusion](https://w3f.github.io/parachain-implementers-guide/runtime/inclusion.html) module. Then the candidate receipts will get [saved](https://github.com/paritytech/polkadot/blob/da5b6b691d2edd2fd797e5ed612be06fa65af627/runtime/parachains/src/inclusion/mod.rs#L670) into the storage while waiting for the availability.&#xD;&#xA;&#xD;&#xA;Similarly, [`process_ bitfields`](https://github.com/paritytech/polkadot/blob/da5b6b691d2edd2fd797e5ed612be06fa65af627/runtime/parachains/src/inclusion/mod.rs#L431) handles the candidates that passed the availability stage which, as I mentioned earlier, leads to the [enactment](https://github.com/paritytech/polkadot/blob/da5b6b691d2edd2fd797e5ed612be06fa65af627/runtime/parachains/src/inclusion/mod.rs#L408) of the candidate.&#xD;&#xA;&#xD;&#xA;[`enact_candidate`](https://github.com/paritytech/polkadot/blob/da5b6b691d2edd2fd797e5ed612be06fa65af627/runtime/parachains/src/inclusion/mod.rs#L724) performs several state transitions, as you can see. The most important one is noting new head.&#xD;&#xA;&#xD;&#xA;As comes from its name, it [updates](https://github.com/paritytech/polkadot/blob/da5b6b691d2edd2fd797e5ed612be06fa65af627/runtime/parachains/src/paras/mod.rs#L1821) the head data of the corresponding parachain.&#xD;&#xA;&#xD;&#xA;The head data is a small piece of data. In Cumulus it is used to save the header of the last parablock which contains the state hash." ContentLicense="CC BY-SA 4.0" />
  <row Id="7264" PostHistoryTypeId="2" PostId="1948" RevisionGUID="86ab146a-53f9-454c-afc6-6458df9164c8" CreationDate="2022-04-18T16:26:45.647" UserId="2332" Text="Yes, your intuition is correct. The stream of finalized blocks comes from the node itself and it's up the node to figure out and report the block status (in case of parachains, that would be communicating with validators on the relay chain, for example).&#xD;&#xA;&#xD;&#xA;Hope this helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="7266" PostHistoryTypeId="5" PostId="1941" RevisionGUID="441fcb18-af83-435a-8405-22f459e8da8e" CreationDate="2022-04-18T16:29:08.600" UserId="2195" Comment="added 43 characters in body" Text="I'm trying to set another owner for the messages and GRANDPA pallets, but I'm not succeeding while using the sudo account. I'm getting a sudo.Sudid BadOrigin error as a result.&#xD;&#xA;&#xD;&#xA;I've been told that this could be a permission error. What am I missing here?&#xD;&#xA;&#xD;&#xA;Edit: It does work if I submit an extrinsic instead. I'd like to understand why it does though." ContentLicense="CC BY-SA 4.0" />
  <row Id="7267" PostHistoryTypeId="2" PostId="1949" RevisionGUID="b2042ece-cf98-4176-9a8e-a95b2186adf0" CreationDate="2022-04-18T16:58:39.177" UserId="2342" Text="I have synced a Substrate-based parachain (Moonbase Alpha) and stopped the node to take a snapshot of the database directory. I would like to know what's the best block of this snapshot, but without running a node again with that data, only with the data of the database. Is there a way to do so with the (in this case `moonbeam`) binary? Maybe some kind of clear file in the database directory structure that is readable?&#xD;&#xA;&#xD;&#xA;Thanks in advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="7269" PostHistoryTypeId="1" PostId="1949" RevisionGUID="b2042ece-cf98-4176-9a8e-a95b2186adf0" CreationDate="2022-04-18T16:58:39.177" UserId="2342" Text="Get best parachain block without running a node" ContentLicense="CC BY-SA 4.0" />
  <row Id="7270" PostHistoryTypeId="3" PostId="1949" RevisionGUID="b2042ece-cf98-4176-9a8e-a95b2186adf0" CreationDate="2022-04-18T16:58:39.177" UserId="2342" Text="|substrate-node|rpc|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7271" PostHistoryTypeId="2" PostId="1950" RevisionGUID="cb0b743e-d729-405a-9bf1-8c194880eaf9" CreationDate="2022-04-18T17:36:10.863" UserId="2311" Text="For anyone who stumbles onto this same issue, I resolved it by moving the AccountId type variables (key1, key2) out of the struct, and working with them from the outside. This way it's more secure and you don't need to deal with setting up defaults for it, which was removed for security reasons anyways. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7273" PostHistoryTypeId="2" PostId="1951" RevisionGUID="b5627989-f951-4f46-865e-f92b4e872db3" CreationDate="2022-04-18T18:34:36.807" UserId="494" Text="how can a contract call other pallet functions within the same runtime? is [`chain_extension`](https://docs.substrate.io/rustdocs/latest/pallet_contracts/chain_extension/index.html) the only way to achieve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7275" PostHistoryTypeId="1" PostId="1951" RevisionGUID="b5627989-f951-4f46-865e-f92b4e872db3" CreationDate="2022-04-18T18:34:36.807" UserId="494" Text="How to call runtime functions from contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="7276" PostHistoryTypeId="3" PostId="1951" RevisionGUID="b5627989-f951-4f46-865e-f92b4e872db3" CreationDate="2022-04-18T18:34:36.807" UserId="494" Text="|smart-contract|pallet-contracts|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7277" PostHistoryTypeId="5" PostId="1949" RevisionGUID="551f23e0-895d-4233-b7c7-a543f35f986f" CreationDate="2022-04-18T18:51:48.903" UserId="34" Comment="added 93 characters in body; edited tags; edited title" Text="I have synced a Substrate-based parachain (Moonbase Alpha) and stopped the node to take a snapshot of the database directory. I would like to know what's the best block (block height, last finalized block) of this snapshot, but without running a node again with that data, only with the database itself. &#xD;&#xA;&#xD;&#xA;Is there a way to read information directly from the database, without a separate process? Or at least more minimal process so not to require a complete node operating on the DB to discover the block height?&#xD;&#xA;&#xD;&#xA;Thanks in advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="7278" PostHistoryTypeId="4" PostId="1949" RevisionGUID="551f23e0-895d-4233-b7c7-a543f35f986f" CreationDate="2022-04-18T18:51:48.903" UserId="34" Comment="added 93 characters in body; edited tags; edited title" Text="Get block height from database snapshot, without running a node" ContentLicense="CC BY-SA 4.0" />
  <row Id="7279" PostHistoryTypeId="6" PostId="1949" RevisionGUID="551f23e0-895d-4233-b7c7-a543f35f986f" CreationDate="2022-04-18T18:51:48.903" UserId="34" Comment="added 93 characters in body; edited tags; edited title" Text="|database|snapshot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7280" PostHistoryTypeId="5" PostId="1951" RevisionGUID="4ac6789e-ea28-4bf4-8e34-3cc000dff53f" CreationDate="2022-04-18T18:55:51.097" UserId="34" Comment="added 71 characters in body; edited tags; edited title" Text="A [`chain_extension`](https://docs.substrate.io/rustdocs/latest/pallet_contracts/chain_extension/index.html) is one way to call into the runtime from a smart contract on the contracts pallet. &#xD;&#xA;&#xD;&#xA;What other methods exist, and why might you use them instead of the extension pattern?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7281" PostHistoryTypeId="4" PostId="1951" RevisionGUID="4ac6789e-ea28-4bf4-8e34-3cc000dff53f" CreationDate="2022-04-18T18:55:51.097" UserId="34" Comment="added 71 characters in body; edited tags; edited title" Text="How to call runtime functions from a contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="7282" PostHistoryTypeId="6" PostId="1951" RevisionGUID="4ac6789e-ea28-4bf4-8e34-3cc000dff53f" CreationDate="2022-04-18T18:55:51.097" UserId="34" Comment="added 71 characters in body; edited tags; edited title" Text="|ink|smart-contract|pallet-contracts|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7283" PostHistoryTypeId="2" PostId="1952" RevisionGUID="ab7b750f-c9aa-4aa3-a9b3-0779b51f4587" CreationDate="2022-04-18T19:09:38.193" UserId="2124" Text="Trying to establish this function to be able to run to a specific block to test progressive extrinsics across blocks to simulate real execution within benchmarks:&#xD;&#xA;&#xD;&#xA;```fn run_to_block(n: u64) {&#xD;&#xA;    while System::block_number() &lt; n {&#xD;&#xA;        if System::block_number() &gt; 1 {&#xD;&#xA;            Proposals::on_finalize(System::block_number());&#xD;&#xA;            System::on_finalize(System::block_number());&#xD;&#xA;        }&#xD;&#xA;        System::set_block_number(System::block_number() + 1);&#xD;&#xA;        System::on_initialize(System::block_number());&#xD;&#xA;        Proposals::on_initialize(System::block_number());&#xD;&#xA;    }&#xD;&#xA;}```&#xD;&#xA;&#xD;&#xA;Unfortunately not able to compile with System within benchmark" ContentLicense="CC BY-SA 4.0" />
  <row Id="7285" PostHistoryTypeId="1" PostId="1952" RevisionGUID="ab7b750f-c9aa-4aa3-a9b3-0779b51f4587" CreationDate="2022-04-18T19:09:38.193" UserId="2124" Text="How do I access current block number within Benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="7286" PostHistoryTypeId="3" PostId="1952" RevisionGUID="ab7b750f-c9aa-4aa3-a9b3-0779b51f4587" CreationDate="2022-04-18T19:09:38.193" UserId="2124" Text="|benchmark|blocknumber|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7287" PostHistoryTypeId="2" PostId="1953" RevisionGUID="95d9fca3-d135-4f2c-9e17-90e6227b90a1" CreationDate="2022-04-18T19:18:59.010" UserId="29" Text="As you mentioned, according to the [!ink docs](https://paritytech.github.io/ink-docs/basics/environment-functions), you should have access to [code_hash](https://paritytech.github.io/ink/ink_env/fn.code_hash.html).&#xD;&#xA;&#xD;&#xA;Make sure you're using the correct syntax. In an `#[ink(constructor)]` use `Self::env().code_hash()` or if you're trying to access the `code_hash` in an `#[ink(message)]` then use `self.env().code_hash()`.&#xD;&#xA;&#xD;&#xA;You can see a list of all the functions available to you [here](https://paritytech.github.io/ink/ink_env/#functions).&#xD;&#xA;&#xD;&#xA;If you're asking from the `contracts-pallet` side, you can also access the code hash via:&#xD;&#xA;&gt; Chain state &gt; Storage &gt; contracts &gt; codeStorage" ContentLicense="CC BY-SA 4.0" />
  <row Id="7289" PostHistoryTypeId="5" PostId="1825" RevisionGUID="24569b87-b10a-40c0-b083-8b679b6c0fa3" CreationDate="2022-04-18T19:32:21.853" UserId="85" Comment="evm doesn't run all on all layer 2s." Text="Ethereum is an EVM blockchain built to run layer 1 decentralised applications. Many ethereum scaling layer 2 solutions also run the EVM. Substrate chains and Ethereum can communicate with each other through bridges (E.g. [Snowbridge][1]) and can be made compatible with [Frontier][2], Substrate’s Ethereum compatibility layer that can run solidity based EVM dapps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://snowbridge.snowfork.com/&#xD;&#xA;  [2]: https://github.com/paritytech/frontier" ContentLicense="CC BY-SA 4.0" />
  <row Id="7290" PostHistoryTypeId="24" PostId="1825" RevisionGUID="24569b87-b10a-40c0-b083-8b679b6c0fa3" CreationDate="2022-04-18T19:32:21.853" Comment="Proposed by 85 approved by 34, 45 edit id of 161" ContentLicense="CC BY-SA 4.0" />
  <row Id="7291" PostHistoryTypeId="2" PostId="1954" RevisionGUID="c2c0ce59-caa8-4a2c-b606-af40e573fb95" CreationDate="2022-04-18T19:35:33.130" UserId="29" Text="With an [!ink](https://paritytech.github.io/ink-docs) smart contract, you are interacting with the runtime via the [`contracts-pallet`](https://github.com/paritytech/substrate/tree/master/frame/contracts) and it's default defined API. If you want to extend the [`contracts-pallet`](https://github.com/paritytech/substrate/tree/master/frame/contracts) API, the recommended [!ink](https://paritytech.github.io/ink-docs) way of doing so is to use the [chain extension](https://paritytech.github.io/ink-docs/macros-attributes/chain-extension) feature - it's built into the [`contracts-pallet`](https://github.com/paritytech/substrate/tree/master/frame/contracts) and [!ink](https://paritytech.github.io/ink-docs).&#xD;&#xA;&#xD;&#xA;Of course you are not limited to this, imagine [`contracts-pallet`](https://github.com/paritytech/substrate/tree/master/frame/contracts) with [`evm-pallet`](https://docs.rs/pallet-evm/latest/pallet_evm/) and cross-contract interaction or even cross-chain contract interaction." ContentLicense="CC BY-SA 4.0" />
  <row Id="7293" PostHistoryTypeId="2" PostId="1955" RevisionGUID="535a14b7-6fd5-466c-a890-5e68a3c8177e" CreationDate="2022-04-18T19:44:38.997" UserId="29" Text="There is a tutorial on generating type definitions here: &#xD;&#xA;- https://polkadot.js.org/docs/api/examples/promise/typegen&#xD;&#xA;&#xD;&#xA;And some sample code here: &#xD;&#xA;- https://github.com/polkadot-js/docs/tree/master/docs/api/examples/promise/typegen" ContentLicense="CC BY-SA 4.0" />
  <row Id="7295" PostHistoryTypeId="2" PostId="1956" RevisionGUID="7d80f7f8-3f7e-424b-8a63-fc7315c310fc" CreationDate="2022-04-18T23:01:16.970" UserId="18" Text="You can jump to a block number using frame_system, just pass in the block number you want to jump to&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;```&#xD;&#xA;fn run_to_block&lt;T: Config&gt;(new_block: &lt;T as frame_system::Config&gt;::BlockNumber) {&#xD;&#xA;    frame_system::Pallet::&lt;T&gt;::set_block_number(new_block);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/cumulus/blob/HEAD/pallets/collator-selection/src/benchmarking.rs#L199" ContentLicense="CC BY-SA 4.0" />
  <row Id="7297" PostHistoryTypeId="6" PostId="35" RevisionGUID="c203a1be-28ae-42a6-bd31-7749f5ee9c3d" CreationDate="2022-04-19T01:09:24.223" UserId="34" Comment="edited tags" Text="|transactions|substrate-archive|indexing|subsquid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7299" PostHistoryTypeId="2" PostId="1957" RevisionGUID="95611c5b-7396-4ef7-86bb-a89bf779d27c" CreationDate="2022-04-19T04:29:49.103" UserId="1768" Text="I want to check if a given extrinsic is executed successfully or not from a light client inside the enclave (aka Intel SGX). We are importing new blocks and iterating over the extrinsics interested in and taking actions based on that.&#xD;&#xA;&#xD;&#xA;Extrinsics that fail are also included in that list, so what's the Substrate's equivalent of receipts in Ethereum?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7301" PostHistoryTypeId="1" PostId="1957" RevisionGUID="95611c5b-7396-4ef7-86bb-a89bf779d27c" CreationDate="2022-04-19T04:29:49.103" UserId="1768" Text="what's the Substrate's equivalent of receipts in Ethereum?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7302" PostHistoryTypeId="3" PostId="1957" RevisionGUID="95611c5b-7396-4ef7-86bb-a89bf779d27c" CreationDate="2022-04-19T04:29:49.103" UserId="1768" Text="|light-client|extrinsicstatus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7303" PostHistoryTypeId="6" PostId="1957" RevisionGUID="aab5b3e9-3a07-4095-b110-31973ee69753" CreationDate="2022-04-19T05:02:07.047" UserId="34" Comment="edited tags" Text="|extrinsic|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7304" PostHistoryTypeId="5" PostId="1957" RevisionGUID="aab5b3e9-3a07-4095-b110-31973ee69753" CreationDate="2022-04-19T05:02:07.047" UserId="34" Comment="edited tags" Text="I want to check if a given extrinsic is executed successfully or not from a light client inside the enclave (aka Intel SGX). We are importing new blocks and iterating over the extrinsics interested in and taking actions based on that.&#xD;&#xA;&#xD;&#xA;Extrinsics that fail are also included in that list, so what's the Substrate's equivalent of [receipts in Ethereum](https://ethereum.stackexchange.com/questions/16525/what-are-ethereum-transaction-receipts-and-what-are-they-used-for)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7305" PostHistoryTypeId="2" PostId="1958" RevisionGUID="84ed8113-4ae2-41de-8203-45dd18ee1143" CreationDate="2022-04-19T05:08:22.460" UserId="34" Text="Practically speaking, [events](https://docs.substrate.io/v3/runtime/events-and-errors/) are what you are looking for. It is up to the pallet implementation to define and emit these in a way that is useful for end consumers, like for use case. &#xD;&#xA;&#xD;&#xA;If there is information missing in events that you're needing from a pallet, best to raise an issue to get specific about requirements to get those events baked in. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7307" PostHistoryTypeId="5" PostId="1957" RevisionGUID="ed149a34-c687-423d-88f8-e551889d57e7" CreationDate="2022-04-19T05:36:55.130" UserId="1768" Comment="improved the context of question" Text="I want to check if a given extrinsic is executed successfully or not from a light client inside the enclave (aka Intel SGX). I am importing new blocks, iterating over the extrinsics I am interested in, and taking actions based on that.&#xD;&#xA;&#xD;&#xA;Extrinsics that fail are also included in that list, so what's the Substrate's equivalent of [receipts in Ethereum](https://ethereum.stackexchange.com/questions/16525/what-are-ethereum-transaction-receipts-and-what-are-they-used-for)?&#xD;&#xA;&#xD;&#xA;Specifically, how to verify the events at a different point in time as we do in [Ethereum][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://ethereum.stackexchange.com/questions/16117/proving-the-existence-of-logs-to-the-blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="7308" PostHistoryTypeId="4" PostId="1957" RevisionGUID="ed149a34-c687-423d-88f8-e551889d57e7" CreationDate="2022-04-19T05:36:55.130" UserId="1768" Comment="improved the context of question" Text="What's the Substrate's equivalent of receipts in Ethereum?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7309" PostHistoryTypeId="5" PostId="1944" RevisionGUID="beaea301-77b5-43a9-8366-5ed8e87e96ce" CreationDate="2022-04-19T07:56:23.763" UserId="342" Comment="edited body" Text="First thing to keep in mind is that an SS58 address is just a sequence of bytes   encoded in base 58. This sequence can be dissected in three components:&#xD;&#xA; 1. Network-Id&#xD;&#xA; 2. Public Key (verbatim in case of sr25519/ed25519 or hashed in case of secp255k1 key)&#xD;&#xA; 3. Checksum&#xD;&#xA;&#xD;&#xA;The Network-Id is what is referred as the &quot;prefix&quot; in the ss58 registry you shared. For example a generic Substrate address has a prefix set to 42 ([here](https://github.com/paritytech/ss58-registry/blob/809d71dd2da2683772e15a0432b93b5d23305760/ss58-registry.json#L374)).&#xD;&#xA;&#xD;&#xA;The same public key can be used to generate different addresses by changing the prefix (the checksum changes as a consequence).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;An example may help.&#xD;&#xA;&#xD;&#xA;Generate a sr25519 keypair via `subkey` tool:&#xD;&#xA;&#xD;&#xA;    ❯ subkey generate --scheme sr25519&#xD;&#xA;    Secret phrase `trip embody match refuse exchange cabin brand try write eight lamp endorse` is account:&#xD;&#xA;      Secret seed:      0xa444d232c8a70098d94add70f9ceb4702c58aca4558966e2ce7d59c153306389&#xD;&#xA;      Public key (hex): 0x6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79&#xD;&#xA;      Account ID:       0x6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79&#xD;&#xA;      SS58 Address:     5EUAFw4JM21WgrjqEqBPXGSZ2zUCkxdCiaNTeuzC7t8twpiD&#xD;&#xA;&#xD;&#xA;Convert the SS58 address from base 58 to hex to inspect the content (for example using [this](https://www.better-converter.com/Encoders-Decoders/Base58Check-to-Hexadecimal-Decoder) website).&#xD;&#xA;&#xD;&#xA;    B58: 5EUAFw4JM21WgrjqEqBPXGSZ2zUCkxdCiaNTeuzC7t8twpiD&#xD;&#xA;    Hex: 2a6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e7973b2&#xD;&#xA;&#xD;&#xA;The hex version can be decomposed as follows:&#xD;&#xA;&#xD;&#xA; - 2a = Network id (42 in decimal == generic Substrate network)&#xD;&#xA; - 6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79 = sr25519 Public Key&#xD;&#xA; - 73b2 = checksum&#xD;&#xA;&#xD;&#xA;The very same public key can be part of an address used in a different network. For example, for Polkadot:&#xD;&#xA;&#xD;&#xA;    ❯ subkey inspect --network polkadot --scheme sr25519 &quot;trip embody match refuse exchange cabin brand try write eight lamp endorse&quot;&#xD;&#xA;    Secret phrase `trip embody match refuse exchange cabin brand try write eight lamp endorse` is account:&#xD;&#xA;      Secret seed:      0xa444d232c8a70098d94add70f9ceb4702c58aca4558966e2ce7d59c153306389&#xD;&#xA;      Public key (hex): 0x6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79&#xD;&#xA;      Account ID:       0x6a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79&#xD;&#xA;      SS58 Address:     13QTQGKNCoGz8PkMCUEPfRGhtcTrTGBLo56wpCyYfyAR89hu&#xD;&#xA;&#xD;&#xA;Convert the SS58 address from base 58 to hex&#xD;&#xA;&#xD;&#xA;    Base 58: 13QTQGKNCoGz8PkMCUEPfRGhtcTrTGBLo56wpCyYfyAR89hu&#xD;&#xA;    Hex: 006a5bfc392d5479b306d85c1e03766207b5443466f8e4668eedb97c26918e2e79259c&#xD;&#xA;&#xD;&#xA;Note that the public key component is still the same, while the Network-ID and the Checksum is changed (Network id is now set to 0x00, i.e. the Polkadot prefix [here](https://github.com/paritytech/ss58-registry/blob/809d71dd2da2683772e15a0432b93b5d23305760/ss58-registry.json#L14))&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You can find another example [here](https://substrate.stackexchange.com/questions/1792/different-representation-of-the-same-address-between-polkadot-js-and-an-explorer/1797#1797) " ContentLicense="CC BY-SA 4.0" />
  <row Id="7310" PostHistoryTypeId="2" PostId="1959" RevisionGUID="b547442c-60a1-48ac-8fea-8221ba0dff6d" CreationDate="2022-04-19T08:32:57.303" UserId="94" Text="It depends on which pallets are deployed in your *mocked* runtime.  &#xD;&#xA;In the easiest case you can just set the block number.  &#xD;&#xA;But often you also have to call the hooks of the deployed pallets.  &#xD;&#xA;In the way that you tried, other example [here](https://github.com/paritytech/substrate/blob/0a7e5ea46a17d71818eef8216e24eef0565bab57/frame/gilt/src/mock.rs#L125).  &#xD;&#xA;Could you maybe also include the error message and the mocked runtime if this does not answer your question?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7312" PostHistoryTypeId="2" PostId="1960" RevisionGUID="c36ab361-ff27-47ad-b38f-ad470470026a" CreationDate="2022-04-19T09:17:32.917" UserId="523" Text="you may use some `manual-seal` consensus or just `aura` with some `MockValidationDataProvider` to mock data from relaychain.&#xD;&#xA;&#xD;&#xA;take Acala's dev runtime [Mandala](https://github.com/AcalaNetwork/Acala/blob/2fa44c17c61a9e88bfa9509d6c855422c9544b5c/node/cli/src/command.rs#L473) as reference" ContentLicense="CC BY-SA 4.0" />
  <row Id="7318" PostHistoryTypeId="5" PostId="1936" RevisionGUID="59c2f9e6-3aae-44e1-8205-1ca9e56c8ae0" CreationDate="2022-04-19T10:17:21.023" UserId="1838" Comment="added 302 characters in body" Text="for techcomm:&#xD;&#xA;&#xD;&#xA;use technicalCommittee &gt; setMembers(newMembers, prime, oldCount)&#xD;&#xA;&#xD;&#xA;technicalCommittee page will synchronize this information(chainstate &gt; technicalCommittee &gt; members) in real time&#xD;&#xA;&#xD;&#xA;but for council:&#xD;&#xA;&#xD;&#xA;use council &gt; setMembers(newMembers, prime, oldCount)&#xD;&#xA;&#xD;&#xA;Council page's member and  chain state(council &gt; members) are different. why?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;clarify info add:&#xD;&#xA;&#xD;&#xA;i use `https://polkadot.js.org/apps/#/extrinsics` -&gt; `council` -&gt; `set_member(sudo)`&#xD;&#xA;&#xD;&#xA;for members from:&#xD;&#xA;&#xD;&#xA;    chainstate -&gt; council -&gt; members(): Vec&lt;AccountId32&gt;&#xD;&#xA;&#xD;&#xA;for members from:&#xD;&#xA;&#xD;&#xA;    https://polkadot.js.org/apps/#/council -&gt; members&#xD;&#xA;are different.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7319" PostHistoryTypeId="2" PostId="1962" RevisionGUID="feb9a737-9a3c-45ac-8842-f83b9f8bb9de" CreationDate="2022-04-19T10:37:00.517" UserId="1717" Text="I am currently developing a parachain, and I'd like to add some custom events after block validation and log block authors who produce invalid blocks.&#xD;&#xA;&#xD;&#xA;I found that the trait `cumulus_pallet_parachain_system::CheckInherents` could be used in `cumulus_pallet_parachain_system::register_validate_block!` to check the validity of each block proposed, but could not find a good way to add callback function of it.&#xD;&#xA;&#xD;&#xA;Is there any way to add a callback after block validation? Thanks for your help." ContentLicense="CC BY-SA 4.0" />
  <row Id="7321" PostHistoryTypeId="1" PostId="1962" RevisionGUID="feb9a737-9a3c-45ac-8842-f83b9f8bb9de" CreationDate="2022-04-19T10:37:00.517" UserId="1717" Text="How to add callback function after block validation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7322" PostHistoryTypeId="3" PostId="1962" RevisionGUID="feb9a737-9a3c-45ac-8842-f83b9f8bb9de" CreationDate="2022-04-19T10:37:00.517" UserId="1717" Text="|parachain|validation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7323" PostHistoryTypeId="2" PostId="1963" RevisionGUID="17637687-d8cc-4cc1-883c-5e45b9c98e26" CreationDate="2022-04-19T11:18:04.007" UserId="2057" Text="In `payoutStakers()` I see that `Era` argument needs to between `current_era` and `history_depth`. So are unclaimed payouts for very eras effectively lost?&#xD;&#xA;If they are unclaimable, then are those funds moved to treasury? Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="7325" PostHistoryTypeId="1" PostId="1963" RevisionGUID="17637687-d8cc-4cc1-883c-5e45b9c98e26" CreationDate="2022-04-19T11:18:04.007" UserId="2057" Text="Possible to claim Payouts for very old Era?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7326" PostHistoryTypeId="3" PostId="1963" RevisionGUID="17637687-d8cc-4cc1-883c-5e45b9c98e26" CreationDate="2022-04-19T11:18:04.007" UserId="2057" Text="|staking|era|payouts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7327" PostHistoryTypeId="2" PostId="1964" RevisionGUID="8a1239dd-88b0-4eca-92f3-83bd4892cf71" CreationDate="2022-04-19T11:47:37.157" UserId="1838" Text=" i read polkadot.js code ,the logic of `https://polkadot.js.org/apps/#/council -&gt; members` data are from `elections.members`. so they are different.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7329" PostHistoryTypeId="5" PostId="1954" RevisionGUID="5e0a6115-c43e-4d3f-aaac-8caf3234550e" CreationDate="2022-04-19T11:48:51.167" UserId="16" Comment="It is ink! not !ink." Text="With an [ink!](https://paritytech.github.io/ink-docs) smart contract, you are interacting with the runtime via the [`contracts-pallet`](https://github.com/paritytech/substrate/tree/master/frame/contracts) and it's default defined API. If you want to extend the [`contracts-pallet`](https://github.com/paritytech/substrate/tree/master/frame/contracts) API, the recommended [ink!](https://paritytech.github.io/ink-docs) way of doing so is to use the [chain extension](https://paritytech.github.io/ink-docs/macros-attributes/chain-extension) feature - it's built into the [`contracts-pallet`](https://github.com/paritytech/substrate/tree/master/frame/contracts) and [ink!](https://paritytech.github.io/ink-docs).&#xD;&#xA;&#xD;&#xA;Of course you are not limited to this, imagine [`contracts-pallet`](https://github.com/paritytech/substrate/tree/master/frame/contracts) with [`evm-pallet`](https://docs.rs/pallet-evm/latest/pallet_evm/) and cross-contract interaction or even cross-chain contract interaction." ContentLicense="CC BY-SA 4.0" />
  <row Id="7330" PostHistoryTypeId="2" PostId="1965" RevisionGUID="8a705f69-7252-446e-bc41-723b5be9485f" CreationDate="2022-04-19T12:10:17.373" UserId="265" Text="i'd like to monitor the number of connections each node is handling on its ws, rpc and p2p ports with a view to right-sizing infrastructure capacity to exceed the typical load by a learned safe margin.&#xD;&#xA;&#xD;&#xA;has anyone figured out what the prometheus rules might look like?&#xD;&#xA;&#xD;&#xA;i've identified these metrics that i believe contain the right information:&#xD;&#xA;&#xD;&#xA;```yaml&#xD;&#xA;# HELP substrate_rpc_requests_finished Number of RPC requests (not calls) processed by the server.&#xD;&#xA;# TYPE substrate_rpc_requests_finished counter&#xD;&#xA;- substrate_rpc_requests_finished{protocol=&quot;http&quot;,chain=&quot;calamari&quot;} 1580264&#xD;&#xA;- substrate_rpc_requests_finished{protocol=&quot;ws&quot;,chain=&quot;calamari&quot;} 167445457&#xD;&#xA;&#xD;&#xA;# HELP substrate_rpc_requests_started Number of RPC requests (not calls) received by the server.&#xD;&#xA;# TYPE substrate_rpc_requests_started counter&#xD;&#xA;- substrate_rpc_requests_started{protocol=&quot;http&quot;,chain=&quot;calamari&quot;} 1580264&#xD;&#xA;- substrate_rpc_requests_started{protocol=&quot;ws&quot;,chain=&quot;calamari&quot;} 167445473&#xD;&#xA;&#xD;&#xA;# HELP substrate_rpc_sessions_closed Number of persistent RPC sessions closed&#xD;&#xA;# TYPE substrate_rpc_sessions_closed counter&#xD;&#xA;- substrate_rpc_sessions_closed{chain=&quot;calamari&quot;} 1104752&#xD;&#xA;&#xD;&#xA;# HELP substrate_rpc_sessions_opened Number of persistent RPC sessions opened&#xD;&#xA;# TYPE substrate_rpc_sessions_opened counter&#xD;&#xA;- substrate_rpc_sessions_opened{chain=&quot;calamari&quot;} 1104821&#xD;&#xA;&#xD;&#xA;# HELP substrate_sub_libp2p_connections_closed_total Total number of connections closed, by direction and reason&#xD;&#xA;# TYPE substrate_sub_libp2p_connections_closed_total counter&#xD;&#xA;- substrate_sub_libp2p_connections_closed_total{direction=&quot;out&quot;,reason=&quot;keep-alive-timeout&quot;,chain=&quot;calamari&quot;} 5154&#xD;&#xA;- substrate_sub_libp2p_connections_closed_total{direction=&quot;out&quot;,reason=&quot;ping-timeout&quot;,chain=&quot;calamari&quot;} 55&#xD;&#xA;- substrate_sub_libp2p_connections_closed_total{direction=&quot;out&quot;,reason=&quot;transport-error&quot;,chain=&quot;calamari&quot;} 11846&#xD;&#xA;&#xD;&#xA;# HELP substrate_sub_libp2p_connections_opened_total Total number of connections opened by direction&#xD;&#xA;# TYPE substrate_sub_libp2p_connections_opened_total counter&#xD;&#xA;- substrate_sub_libp2p_connections_opened_total{direction=&quot;out&quot;,chain=&quot;calamari&quot;} 17093&#xD;&#xA;&#xD;&#xA;# HELP substrate_sub_libp2p_distinct_peers_connections_closed_total Total number of connections closed with distinct peers&#xD;&#xA;# TYPE substrate_sub_libp2p_distinct_peers_connections_closed_total counter&#xD;&#xA;- substrate_sub_libp2p_distinct_peers_connections_closed_total{chain=&quot;calamari&quot;} 17055&#xD;&#xA;&#xD;&#xA;# HELP substrate_sub_libp2p_distinct_peers_connections_opened_total Total number of connections opened with distinct peers&#xD;&#xA;# TYPE substrate_sub_libp2p_distinct_peers_connections_opened_total counter&#xD;&#xA;- substrate_sub_libp2p_distinct_peers_connections_opened_total{chain=&quot;calamari&quot;} 17093&#xD;&#xA;&#xD;&#xA;# HELP substrate_sub_libp2p_incoming_connections_total Total number of incoming connections on the listening sockets&#xD;&#xA;# TYPE substrate_sub_libp2p_incoming_connections_total counter&#xD;&#xA;- substrate_sub_libp2p_incoming_connections_total{chain=&quot;calamari&quot;} 0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; my statistics and promql foo falls something short of ninja and i don't really understand how to write the expression i need. take the following promql queries, for example:&#xD;&#xA;&#xD;&#xA;- [substrate rpc requests finished](https://pulse.pelagos.systems/graph?g0.expr=substrate_rpc_requests_finished%7Bprotocol%3D%22ws%22%7D%5B1m%5D&amp;g0.tab=1&amp;g0.stacked=0&amp;g0.show_exemplars=0&amp;g0.range_input=1h&amp;g0.end_input=2022-04-18%2018%3A03%3A35&amp;g0.moment_input=2022-04-18%2018%3A03%3A35)&#xD;&#xA;   ```promql&#xD;&#xA;   substrate_rpc_requests_finished{protocol=&quot;ws&quot;}[1m]&#xD;&#xA;   ```&#xD;&#xA;   [![substrate rpc requests finished][1]][1]&#xD;&#xA;&#xD;&#xA;- [rate of substrate rpc requests finished](https://pulse.pelagos.systems/graph?g0.expr=rate(substrate_rpc_requests_finished%7Bprotocol%3D%22ws%22%7D%5B1m%5D)&amp;g0.tab=0&amp;g0.stacked=0&amp;g0.show_exemplars=0&amp;g0.range_input=1h&amp;g0.end_input=2022-04-18%2018%3A03%3A35&amp;g0.moment_input=2022-04-18%2018%3A03%3A35)&#xD;&#xA;   ```promql&#xD;&#xA;   rate(substrate_rpc_requests_finished{protocol=&quot;ws&quot;}[1m])&#xD;&#xA;   ```&#xD;&#xA;   [![rate of: substrate rpc requests finished][2]][2]&#xD;&#xA;&#xD;&#xA;it's not apparent to me what these queries are telling me. i think `substrate_rpc_requests_finished{protocol=&quot;ws&quot;}[1m]` is telling me that some nodes are handling more than 100 million ws requests per minute. these numbers surprise me. have i misinterpreted them? i don't understand what wrapping the query in `rate()` does. the [docs](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate) suggest it's the request increase rate over the previous period. if so, it's not what i need as i'm interested in *volume* rather than *increase*.&#xD;&#xA;&#xD;&#xA;## what i really want to know is:&#xD;&#xA;- what query expression would tell me that a node is approaching `--ws-max-connections` (see also: https://substrate.stackexchange.com/questions/889/whats-a-good-value-for-ws-max-connections)?&#xD;&#xA;- what other query expressions could tell me about rpc (http) and p2p connection volumes?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7H6MS.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/BujCV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7332" PostHistoryTypeId="1" PostId="1965" RevisionGUID="8a705f69-7252-446e-bc41-723b5be9485f" CreationDate="2022-04-19T12:10:17.373" UserId="265" Text="how can substrate prometheus metrics be used to monitor and alert on the number of concurrent connections?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7333" PostHistoryTypeId="3" PostId="1965" RevisionGUID="8a705f69-7252-446e-bc41-723b5be9485f" CreationDate="2022-04-19T12:10:17.373" UserId="265" Text="|monitoring|metrics|prometheus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7334" PostHistoryTypeId="2" PostId="1966" RevisionGUID="a02014c5-370d-42c2-974f-4ab3f4000d7c" CreationDate="2022-04-19T13:16:24.460" UserId="234" Text="Here are some extra information related to disk usage/database size for Kusama and Polkadot :&#xD;&#xA;https://paranodes.io/DBSize" ContentLicense="CC BY-SA 4.0" />
  <row Id="7336" PostHistoryTypeId="2" PostId="1967" RevisionGUID="d4dd8f84-1a2f-4bee-a7b8-4bc42fb4d662" CreationDate="2022-04-19T13:41:15.913" UserId="29" Text="I know polkadot{.js} has an API to access contract storage here:&#xD;&#xA;- https://polkadot.js.org/docs/substrate/storage#contracts&#xD;&#xA;&#xD;&#xA;How do I get the code hash via the account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7338" PostHistoryTypeId="1" PostId="1967" RevisionGUID="d4dd8f84-1a2f-4bee-a7b8-4bc42fb4d662" CreationDate="2022-04-19T13:41:15.913" UserId="29" Text="How do I get the code hash of a smart contract using Polkadot{.js} API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7339" PostHistoryTypeId="3" PostId="1967" RevisionGUID="d4dd8f84-1a2f-4bee-a7b8-4bc42fb4d662" CreationDate="2022-04-19T13:41:15.913" UserId="29" Text="|smart-contract|polkadot-js|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7341" PostHistoryTypeId="2" PostId="1968" RevisionGUID="fe66275f-e1b5-438a-af3f-08c9fbe6e210" CreationDate="2022-04-19T13:41:15.913" UserId="29" Text="You can write something similar:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const fetchCodeHash = async () =&gt; {&#xD;&#xA;    // Canvas&#xD;&#xA;    const wsCanvasProvider = new WsProvider('wss://rococo-canvas-rpc.polkadot.io');&#xD;&#xA;    const canvasApi = await ApiPromise.create({ provider: wsCanvasProvider });&#xD;&#xA;    const account = &quot;0x2ce787b4b143ff878457c7dc9dc44e34a22e3fa9db5a8fad07bfb384b99c614b&quot;;&#xD;&#xA;    console.log((await canvasApi.query.contracts.codeStorage(account)).toHuman());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If the account has a contract, you will get similar output:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      instructionWeightsVersion: '2',&#xD;&#xA;      initial: '2',&#xD;&#xA;      maximum: '16',&#xD;&#xA;      code: '0x0061736d0100000001771260037f7f7f017f60027f7f017f60037f7f7f0060027f7f0060047f7f7f7f0060017f0060057f7f7f7f7f0060037e7e7f0060000060047f7f7e7e0060017f017e60047f7f7f7f017f60067f7f7f7f7f7f0060057f7f7f7e7e006000017f60057f7f7f7e7e017f60017f017f60077f7f7f7f7f7f7f017f02fb010b057365616c30127365616c5f6465'... 61548 more characters&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="7342" PostHistoryTypeId="5" PostId="1963" RevisionGUID="56f65d42-ceca-420e-b014-83cd50f9cd0b" CreationDate="2022-04-19T13:58:00.197" UserId="29" Comment="added 4 characters in body" Text="In `payoutStakers()` I see that `Era` argument needs to between `current_era` and `history_depth`. So are unclaimed payouts for very old eras effectively lost?&#xD;&#xA;If they are unclaimable, then are those funds moved to treasury? Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="7343" PostHistoryTypeId="2" PostId="1969" RevisionGUID="ec15d01c-9f89-4178-a439-fcfd49f63ff5" CreationDate="2022-04-19T14:04:13.130" UserId="73" Text="The validation function of a Parachain is executed on the relay chain. So, this would bring you that much to &quot;log&quot; any block author. If a block is invalid, it also means that the execution panics and your callback wouldn't be executed at all.&#xD;&#xA;&#xD;&#xA;There is also no way currently for being informed about invalid blocks.&#xD;&#xA;&#xD;&#xA;You could implement your own [`BlockImport`][1]. This would mainly forward everything to the underlying block imports, but if there is a failure you could handle it. Then you would be able to observe any failed block. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/b7697f085d7bad89e5a794780c8903ee18dcebd8/client/consensus/common/src/block_import.rs#L322-L342" ContentLicense="CC BY-SA 4.0" />
  <row Id="7345" PostHistoryTypeId="5" PostId="1210" RevisionGUID="15983876-8997-4106-a74b-05db4ce8fce1" CreationDate="2022-04-19T14:31:12.143" UserId="85" Comment="added sibl" Text="Here is parachain sovereign account 2000 (the AcountId32):&#xD;&#xA;&#xD;&#xA;0x70617261 + d0070000 + 000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;0x70617261 = b&quot;para&quot; (up/down) or 0x7369626c = b&quot;sibl&quot; (side-to-side)&#xD;&#xA;&#xD;&#xA;d0070000 = scale encoded number 2000&#xD;&#xA;&#xD;&#xA;You can see the scale encoding of a u32 by typing the number into collatorSelection/setDesiredCandidates and looking at the encoded call details on the bottom right by `max` that is the encoded version of 2000.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;To copy and paste:&#xD;&#xA;&#xD;&#xA;1000: 0x70617261e8030000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;2000: 0x70617261d0070000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;2001: 0x70617261d1070000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;2002: 0x70617261d2070000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;(That's also enough examples that you could guess the rest. I do think that we need an easy way to get these from polkadot-js maybe from the parachain screen? - PRs welcome!)&#xD;&#xA;&#xD;&#xA;If you want a normal polkadot/kusama address then you can use the &quot;AccountId to Hex&quot; at https://www.shawntabrizi.com/substrate-js-utilities/ - paste in the above on the right hand side as the hex and you will get the address calculated. For example, for 1000 parachain id it returns 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OzbQT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7346" PostHistoryTypeId="2" PostId="1970" RevisionGUID="69f53ffe-f157-42dd-b834-3364e637479a" CreationDate="2022-04-19T15:02:47.307" UserId="29" Text="I am reading the Cumulus docs on running a node:&#xD;&#xA;- https://github.com/paritytech/cumulus#build--launch-a-node&#xD;&#xA;&#xD;&#xA;Why is it that when I run:&#xD;&#xA;```sh&#xD;&#xA;./target/release/polkadot-collator --tmp --chain westmint&#xD;&#xA;```&#xD;&#xA;blocks seem to get produced and finalized at a very fast rate:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;2022-04-19 10:56:55 [Parachain] assembling new collators for new session 2 at #1800    &#xD;&#xA;2022-04-19 10:56:56 [Parachain] assembling new collators for new session 3 at #3600    &#xD;&#xA;2022-04-19 10:56:57 [Parachain] assembling new collators for new session 4 at #5400    &#xD;&#xA;2022-04-19 10:56:57 [Relaychain] ⚙️  Syncing, target=#10482356 (16 peers), best: #7481 (0xb64f…40c4), finalized #7168 (0xa1a9…fb0d), ⬇ 526.5kiB/s ⬆ 13.6kiB/s    &#xD;&#xA;2022-04-19 10:56:57 [Parachain] ⚙️  Syncing, target=#1987773 (5 peers), best: #5628 (0x2de9…a6b7), finalized #0 (0x67f9…98c9), ⬇ 3.0MiB/s ⬆ 32.3kiB/s    &#xD;&#xA;2022-04-19 10:56:58 Accepted a new tcp connection from 127.0.0.1:51659.    &#xD;&#xA;2022-04-19 10:56:59 [Parachain] assembling new collators for new session 5 at #7200    &#xD;&#xA;2022-04-19 10:57:00 [Parachain] assembling new collators for new session 6 at #9000    &#xD;&#xA;2022-04-19 10:57:02 [Parachain] assembling new collators for new session 7 at #10800    &#xD;&#xA;2022-04-19 10:57:02 [Parachain] ⚙️  Syncing 1240.7 bps, target=#1987773 (5 peers), best: #11839 (0x31c1…256f), finalized #0 (0x67f9…98c9), ⬇ 2.2MiB/s ⬆ 18.5kiB/s    &#xD;&#xA;2022-04-19 10:57:02 [Relaychain] ⚙️  Syncing 1326.2 bps, target=#10482357 (23 peers), best: #14123 (0x6ff5…9915), finalized #13824 (0xc608…ba94), ⬇ 385.9kiB/s ⬆ 8.5kiB/s  &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7348" PostHistoryTypeId="1" PostId="1970" RevisionGUID="69f53ffe-f157-42dd-b834-3364e637479a" CreationDate="2022-04-19T15:02:47.307" UserId="29" Text="Why is the collator node producing and finalizing blocks at such a fast rate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7349" PostHistoryTypeId="3" PostId="1970" RevisionGUID="69f53ffe-f157-42dd-b834-3364e637479a" CreationDate="2022-04-19T15:02:47.307" UserId="29" Text="|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7350" PostHistoryTypeId="2" PostId="1971" RevisionGUID="66f36263-82cb-4ce5-ac17-e939909f3466" CreationDate="2022-04-19T15:48:44.763" UserId="73" Text="You are syncing. That means you are just importing the old blocks and that can happen much faster than what the actual block time is. When you have reached the tip of the chain, you will import blocks as they are being produced. So, much slower, under perfect conditions currently around 1 block every 12 seconds." ContentLicense="CC BY-SA 4.0" />
  <row Id="7352" PostHistoryTypeId="2" PostId="1972" RevisionGUID="3716d129-a0cd-451f-bac5-bfe463e2e4a3" CreationDate="2022-04-19T17:13:48.650" UserId="2356" Text="When submitting a stake request through the Python substrate-interface library, the extrinsic receipt comes back with the following parameters:&#xD;&#xA;&#xD;&#xA;    ({'Module': {'index': 6, 'error': '0x02000000'}}, {'weight': 558355000, 'class': 'Normal', 'pays_fee': 'Yes'})&#xD;&#xA;&#xD;&#xA;When this map gets passed down through the error handling, it fails with a TypeError because `'0x02000000'` is not a valid int index on the map. &#xD;&#xA;&#xD;&#xA;Stack trace:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    File &quot;/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/eulith_staking_manager/staking/dot/fxn_implementations/substrateCallImplementation.py&quot;, line 54, in call&#xD;&#xA;        if receipt.is_success:&#xD;&#xA;      File &quot;/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/substrateinterface/base.py&quot;, line 3305, in is_success&#xD;&#xA;        self.process_events()&#xD;&#xA;      File &quot;/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/substrateinterface/base.py&quot;, line 3204, in process_events&#xD;&#xA;        module_error = self.substrate.metadata_decoder.get_module_error(&#xD;&#xA;      File &quot;/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/scalecodec/types.py&quot;, line 1907, in get_module_error&#xD;&#xA;        return module.errors[error_index]&#xD;&#xA;      File &quot;/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/scalecodec/base.py&quot;, line 790, in __getitem__&#xD;&#xA;        return self.value_object[item]&#xD;&#xA;    TypeError: list indices must be integers or slices, not str&#xD;&#xA;&#xD;&#xA;What does this error code mean, and what is the correct fix to interpret the returned error?&#xD;&#xA;&#xD;&#xA;Thank you!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7354" PostHistoryTypeId="1" PostId="1972" RevisionGUID="3716d129-a0cd-451f-bac5-bfe463e2e4a3" CreationDate="2022-04-19T17:13:48.650" UserId="2356" Text="0x02000000 Being Returned in Extrinsic Receipt and Failing Error Module Indexing" ContentLicense="CC BY-SA 4.0" />
  <row Id="7355" PostHistoryTypeId="3" PostId="1972" RevisionGUID="3716d129-a0cd-451f-bac5-bfe463e2e4a3" CreationDate="2022-04-19T17:13:48.650" UserId="2356" Text="|staking|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7356" PostHistoryTypeId="5" PostId="1972" RevisionGUID="fd6ea9cb-27dd-49ee-86cb-0775dc0a3ca1" CreationDate="2022-04-19T17:33:53.467" UserId="2356" Comment="added 193 characters in body" Text="When submitting a stake request through the Python substrate-interface library, the extrinsic receipt comes back with the following parameters:&#xD;&#xA;&#xD;&#xA;    ({'Module': {'index': 6, 'error': '0x02000000'}}, {'weight': 558355000, 'class': 'Normal', 'pays_fee': 'Yes'})&#xD;&#xA;&#xD;&#xA;Also seen it return from the unbond endpoint with a similar response: &#xD;&#xA;&#xD;&#xA;    ({'Module': {'index': 6, 'error': '0x07000000'}}, {'weight': 1163003000, 'class': 'Normal', 'pays_fee': 'Yes'})&#xD;&#xA;&#xD;&#xA;When this map gets passed down through the error handling, it fails with a TypeError because `'0x02000000'` is not a valid int index on the map. &#xD;&#xA;&#xD;&#xA;Stack trace:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    File &quot;/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/eulith_staking_manager/staking/dot/fxn_implementations/substrateCallImplementation.py&quot;, line 54, in call&#xD;&#xA;        if receipt.is_success:&#xD;&#xA;      File &quot;/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/substrateinterface/base.py&quot;, line 3305, in is_success&#xD;&#xA;        self.process_events()&#xD;&#xA;      File &quot;/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/substrateinterface/base.py&quot;, line 3204, in process_events&#xD;&#xA;        module_error = self.substrate.metadata_decoder.get_module_error(&#xD;&#xA;      File &quot;/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/scalecodec/types.py&quot;, line 1907, in get_module_error&#xD;&#xA;        return module.errors[error_index]&#xD;&#xA;      File &quot;/Users/kristian/Documents/v0MMVP/venv/lib/python3.9/site-packages/scalecodec/base.py&quot;, line 790, in __getitem__&#xD;&#xA;        return self.value_object[item]&#xD;&#xA;    TypeError: list indices must be integers or slices, not str&#xD;&#xA;&#xD;&#xA;What does this error code mean, and what is the correct fix to interpret the returned error?&#xD;&#xA;&#xD;&#xA;Thank you!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7357" PostHistoryTypeId="5" PostId="272" RevisionGUID="a52f3ef8-2cba-4f00-83c0-01ea5dcd8d01" CreationDate="2022-04-19T17:42:45.157" UserId="372" Comment="added into about manual and instant seal" Text="Sealing a block means adding some final consensus-related information to a block to complete the block authoring process. Sealing happens on the client-side after all transactions have been executed and and other runtime logic has completed.&#xD;&#xA;&#xD;&#xA;When other nodes in the network import your block, they will check the seal before checking other more computationally-expensive parts of the block such as executing transactions.&#xD;&#xA;&#xD;&#xA;The exact information included in the seal depends on the consensus engine. In PoA and PoS consensus the seal is a signature. In PoW it is the mining output.&#xD;&#xA;&#xD;&#xA;Because sealing a block usually the final step in authoring a block, people sometimes speak of &quot;sealing&quot; when they are really referring to the larger authoring process. This is the case for both manual seal and instant seal. The misnomer is particularly bad in this case because manual and instant seal don't actually use a cryptographic seal. A more accurate name would be &quot;manual authoring&quot; and &quot;instant authoring&quot;. Learn more about what they are in https://substrate.stackexchange.com/questions/204/what-is-the-difference-between-babe-aura-and-grandpa/" ContentLicense="CC BY-SA 4.0" />
  <row Id="7358" PostHistoryTypeId="2" PostId="1973" RevisionGUID="d09d9f97-5e6f-4d79-bb40-6b7170d1c270" CreationDate="2022-04-19T17:43:06.800" UserId="2065" Text="I need to mint an NFT and create metaverse for our auction pallet benchmarking. Both of these are handled by external pallet functionality and wondered if there is a FRAME-base benchmarking solution for using external calls from this pallet. Here is a code example:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;fn mint_NFT&lt;T: Config&gt;(caller: T::AccountId) {&#xD;&#xA;	//T::NFTHandler::mint_land_nft(caller.clone().into(), vec![1], test_attributes(1));&#xD;&#xA;	T::NFTHandler::create_token_class(&#xD;&#xA;		&amp;caller.clone(),&#xD;&#xA;		vec![1],&#xD;&#xA;		test_attributes(1),&#xD;&#xA;		0u32.into(),&#xD;&#xA;		TokenType::Transferable,&#xD;&#xA;		CollectionType::Collectable,&#xD;&#xA;		Perbill::from_percent(0u32),&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	T::NFTHandler::mint_token(&amp;caller.clone(), 0u32.into(), vec![1], test_attributes(1));&#xD;&#xA;	/*&#xD;&#xA;		pallet_nft::Pallet::&lt;T&gt;::create_group(RawOrigin::Root.into(), vec![1], vec![1]);&#xD;&#xA;		pallet_nft::Pallet::&lt;T&gt;::create_class(&#xD;&#xA;			RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;			vec![1],&#xD;&#xA;			test_attributes(1),&#xD;&#xA;			0u32.into(),&#xD;&#xA;			TokenType::Transferable,&#xD;&#xA;			CollectionType::Collectable,&#xD;&#xA;			Perbill::from_percent(0u32),&#xD;&#xA;		);&#xD;&#xA;		pallet_nft::Pallet::&lt;T&gt;::mint(&#xD;&#xA;			RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;			0u32.into(),&#xD;&#xA;			vec![1],&#xD;&#xA;			test_attributes(1),&#xD;&#xA;			3,&#xD;&#xA;		);&#xD;&#xA;	*/&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn create_metaverse_for_account&lt;T: Config&gt;(caller: T::AccountId) {&#xD;&#xA;	//pallet_metaverse::Pallet::&lt;T&gt;::create_metaverse(&#xD;&#xA;	//	RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;	//	vec![1u8],&#xD;&#xA;	//);&#xD;&#xA;}&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;The benchmarking builds successfully when using the code that is not commented but it does not seem to work when running it on the pallet. If I use the commented code instead, I get the following error&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;[E0599]: the function or associated item mint exists for struct pallet_nft::Pallet&lt;T&gt;, but its trait bounds were not satisfied&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;We found a possible solution using the orml benchmarking pallet but wondered if there is a  way to fix the issue using FRAME?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7360" PostHistoryTypeId="1" PostId="1973" RevisionGUID="d09d9f97-5e6f-4d79-bb40-6b7170d1c270" CreationDate="2022-04-19T17:43:06.800" UserId="2065" Text="Using another pallet calls for benchmarking using FRAME" ContentLicense="CC BY-SA 4.0" />
  <row Id="7361" PostHistoryTypeId="3" PostId="1973" RevisionGUID="d09d9f97-5e6f-4d79-bb40-6b7170d1c270" CreationDate="2022-04-19T17:43:06.800" UserId="2065" Text="|weight|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7362" PostHistoryTypeId="6" PostId="1972" RevisionGUID="aa9ded23-8cfb-441e-92ac-ad3e9ddeaddd" CreationDate="2022-04-19T18:10:46.033" UserId="85" Comment="edited tags" Text="|staking|python|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7363" PostHistoryTypeId="6" PostId="1970" RevisionGUID="03db24e0-4b1a-4ecd-af92-8db787360dc0" CreationDate="2022-04-19T18:11:33.863" UserId="85" Comment="edited tags" Text="|cumulus|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7364" PostHistoryTypeId="2" PostId="1974" RevisionGUID="e6d061c2-4f71-41b1-a62b-a5fb4bbfeb3c" CreationDate="2022-04-19T19:44:16.140" UserId="587" Text="When declaring types, with generic parameters, to be stored in runtime storage, it’s common to see this pattern&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct MyItem&lt;TypeA, TypeB&gt; {&#xD;&#xA;    pub item_a: TypeA,&#xD;&#xA;    pub item_b: TypeB,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type MyItemOf&lt;T&gt; = MyItem&lt;&lt;T as Config&gt;::TypeA, &lt;T as Config&gt;::TypeB&gt;;&#xD;&#xA;```&#xD;&#xA;However, this seems a bit clunky, and I have tried the following&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct MyItem&lt;T: Config&gt; {&#xD;&#xA;    pub item_a: T::TypeA,&#xD;&#xA;    pub item_b: T::TypeB,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;only to get an error saying that `T` doesn’t implement `TypeInfo`. This is what I ran into in the past, so I've used the first pattern above for some time.&#xD;&#xA;&#xD;&#xA;There’s a way to get the second approach above to work by using [`#[scale_info(skip_type_params(..))]`](https://paritytech.github.io/substrate/master/scale_info/index.html#scale_infoskip_type_params) to tell `scale_info` to ignore that `T` doesn't implement `TypeInfo`.&#xD;&#xA;&#xD;&#xA;Still, I run into the error that `MyItem&lt;T&gt;` doesn't implement `parity_scale_codec::MaxEncodedLen`. I've looked around and found that the [Substrate Kitties tutorial](https://docs.substrate.io/tutorials/v3/kitties/pt1/#scaffold-kitty-struct) uses the `#[codec(mel_bound)]` attribute on its `Kitty&lt;T&gt;` struct. I found that it also works in my case and I ended up with&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, MaxEncodedLen, TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;#[codec(mel_bound())]&#xD;&#xA;pub struct MyItem&lt;T: Config&gt; {&#xD;&#xA;    pub item_a: T::TypeA,&#xD;&#xA;    pub item_b: T::TypeB,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I don't quite understand how `#[codec(mel_bound())]` works and what are the tradeoffs involved with it. I couldn't find much documentation around it. Would anyone be kind enough to explain how it works?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7366" PostHistoryTypeId="1" PostId="1974" RevisionGUID="e6d061c2-4f71-41b1-a62b-a5fb4bbfeb3c" CreationDate="2022-04-19T19:44:16.140" UserId="587" Text="How does `#[codec(mel_bound())]` work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7367" PostHistoryTypeId="3" PostId="1974" RevisionGUID="e6d061c2-4f71-41b1-a62b-a5fb4bbfeb3c" CreationDate="2022-04-19T19:44:16.140" UserId="587" Text="|storage|frame|scale-codec|generics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7368" PostHistoryTypeId="2" PostId="1975" RevisionGUID="71d71dcc-add4-4223-9480-5ec65e8f31db" CreationDate="2022-04-19T19:57:51.493" UserId="29" Text="I have a chain extension implemented on [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node) and in my [!ink](https://paritytech.github.io/ink-docs/) smart contract according to [this](https://github.com/paritytech/ink/tree/v3.0.0-rc8/examples/rand-extension) tutorial. When I try to instantiate my contract on a local [contracts-ui](https://github.com/paritytech/contracts-ui) I get the following message:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;module uses chain extensions but chain extensions are disabled&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What do I need to do to enable chain extensions?**&#xD;&#xA;&#xD;&#xA;&gt;[Here](https://github.com/brunopgalvao/chain-extension-example-001/blob/main/runtime/src/lib.rs) is my code for sanity check." ContentLicense="CC BY-SA 4.0" />
  <row Id="7370" PostHistoryTypeId="1" PostId="1975" RevisionGUID="71d71dcc-add4-4223-9480-5ec65e8f31db" CreationDate="2022-04-19T19:57:51.493" UserId="29" Text="How to enable chain extensions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7371" PostHistoryTypeId="3" PostId="1975" RevisionGUID="71d71dcc-add4-4223-9480-5ec65e8f31db" CreationDate="2022-04-19T19:57:51.493" UserId="29" Text="|ink|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7373" PostHistoryTypeId="2" PostId="1976" RevisionGUID="566937f7-1a70-4e7e-a76a-f3e7e32e299a" CreationDate="2022-04-19T19:57:51.493" UserId="29" Text="Make sure you have `type ChainExtension` defined in your runtime:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;    ....&#xD;&#xA;	type ChainExtension = FetchRandomExtension;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;...as indicated in the docs:&#xD;&#xA;- https://github.com/paritytech/ink/tree/v3.0.0-rc8/examples/rand-extension#chain-side-integration&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also remember that there are two ways of running the [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node):&#xD;&#xA;&#xD;&#xA;1. Cloning it, modifying it, building it, running it:&#xD;&#xA;```sh&#xD;&#xA;git clone https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;cd substrate-contracts-node&#xD;&#xA;cargo build&#xD;&#xA;./target/debug/substrate-contracts-node --tmp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt;OR&#xD;&#xA;&#xD;&#xA;2. Using `cargo install` and just running it:&#xD;&#xA;```sh&#xD;&#xA;cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked&#xD;&#xA;substrate-contracts-node --tmp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Turns out I was modifying my code and running my node using the second option (which was a completely different install!) " ContentLicense="CC BY-SA 4.0" />
  <row Id="7374" PostHistoryTypeId="2" PostId="1977" RevisionGUID="dbe76a62-5ab8-4759-9d19-af8aed9aff34" CreationDate="2022-04-19T20:05:34.950" UserId="73" Text="`skip_type_params(T)` boils down to the same as `mel_bound()`, both will have an empty where-bound for the implementation of `MaxEncodedLen`. The advantage of `skip_type_params` is that if there are more generic parameters it is easier to skip single ones, while `mel_bound()` skips all generic parameters. &#xD;&#xA;&#xD;&#xA;By default the macro will put the following where-bound: `T: MaxEncodedLen`. As you already have seen, this is wrong. So, we have the `mel_bound` attribute which lets you as a developer write the where-bound manually. You could write `mel_bound(T::TypeA: MaxEncodedLen, T::TypeB: MaxEncodedLen)` and it would compile as well. However, you don't need this because you probably have the bound on `TypeA: MaxEncodedLen` in your trait declaration. So, you just write `mel_bound()` to get an empty where-bound.&#xD;&#xA;&#xD;&#xA;There is actually an issue to also add `skip_type_params` support to scale-codec: https://github.com/paritytech/parity-scale-codec/issues/316" ContentLicense="CC BY-SA 4.0" />
  <row Id="7376" PostHistoryTypeId="5" PostId="1975" RevisionGUID="b7044325-9cdb-4231-a890-0c840c9e9e93" CreationDate="2022-04-19T20:45:56.050" UserId="29" Comment="added 19 characters in body" Text="I have a chain extension implemented on [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node) and in my [ink!](https://paritytech.github.io/ink-docs/) smart contract according to [this](https://github.com/paritytech/ink/tree/v3.0.0-rc8/examples/rand-extension) tutorial. When I try to instantiate my contract on a local [contracts-ui](https://github.com/paritytech/contracts-ui) I get the following message:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;module uses chain extensions but chain extensions are disabled&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What do I need to do to enable chain extensions?**&#xD;&#xA;&#xD;&#xA;&gt;[Here](https://github.com/brunopgalvao/chain-extension-example-001/commit/18f217af5813844b1f56b175d33eb9a6ebe7afa8) is my code for sanity check." ContentLicense="CC BY-SA 4.0" />
  <row Id="7377" PostHistoryTypeId="2" PostId="1978" RevisionGUID="8c5085d9-152d-4971-9f10-671090b9e876" CreationDate="2022-04-19T23:08:46.433" UserId="245" Text="I'm trying to implement Layer 2 to Substrate. Substrate node runs BABE and GRANDPA to produce blocks and finalize. &#xD;&#xA;&#xD;&#xA;Layer 2 comes built into the Substrate (planning to develop this way). It will have a faster slot-based block production and maybe finalization as well.&#xD;&#xA;&#xD;&#xA;I'm thinking of having 2 consensus algorithms in parallel built into the Substrate node. Let's say that layer 2 produces 6 blocks for every block time for the Substrate node and sends the block proofs via runtime-api (or rpc).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;&#xD;&#xA;[![Visual explination][1]][1]&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;&#xD;&#xA;I've hacked the Substrate to achieve this. First, added AURA to the node that has BABE. I separated the tasks so block production and finalization wouldn't affect different consensus algorithms. I didn't count for Prometheus. It compiled ok but got this error&#xD;&#xA;&#xD;&#xA;&gt; Failed to register proposer prometheus metrics: Duplicate metrics collector registration attempted. &#xD;&#xA;Essential task `basic-block-import-worker` failed. Shutting down service.&#xD;&#xA;&#xD;&#xA;I haven't dug more after this. I'm questioning the possibility of this at this point.&#xD;&#xA;&#xD;&#xA; - Should there be 2 separate runtimes? Or is the node's runtime&#xD;&#xA;   enough?&#xD;&#xA; - How would block finalization be done?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zH7lg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7379" PostHistoryTypeId="1" PostId="1978" RevisionGUID="8c5085d9-152d-4971-9f10-671090b9e876" CreationDate="2022-04-19T23:08:46.433" UserId="245" Text="Using 2 consensus algorithms" ContentLicense="CC BY-SA 4.0" />
  <row Id="7380" PostHistoryTypeId="3" PostId="1978" RevisionGUID="8c5085d9-152d-4971-9f10-671090b9e876" CreationDate="2022-04-19T23:08:46.433" UserId="245" Text="|substrate-node|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7381" PostHistoryTypeId="5" PostId="1973" RevisionGUID="306b9c4c-512a-4743-8cb4-f370faeed931" CreationDate="2022-04-19T23:54:32.627" UserId="2065" Comment="added 37 characters in body" Text="I need to mint an NFT and create metaverse for our auction pallet benchmarking. Both of these are handled by external pallet functionality and wondered if there is a FRAME-base benchmarking solution for using external calls from this pallet. Here is a code example from the benchmarking of the auction:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;fn mint_NFT&lt;T: Config&gt;(caller: T::AccountId) {&#xD;&#xA;	//T::NFTHandler::mint_land_nft(caller.clone().into(), vec![1], test_attributes(1));&#xD;&#xA;	T::NFTHandler::create_token_class(&#xD;&#xA;		&amp;caller.clone(),&#xD;&#xA;		vec![1],&#xD;&#xA;		test_attributes(1),&#xD;&#xA;		0u32.into(),&#xD;&#xA;		TokenType::Transferable,&#xD;&#xA;		CollectionType::Collectable,&#xD;&#xA;		Perbill::from_percent(0u32),&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	T::NFTHandler::mint_token(&amp;caller.clone(), 0u32.into(), vec![1], test_attributes(1));&#xD;&#xA;	/*&#xD;&#xA;		pallet_nft::Pallet::&lt;T&gt;::create_group(RawOrigin::Root.into(), vec![1], vec![1]);&#xD;&#xA;		pallet_nft::Pallet::&lt;T&gt;::create_class(&#xD;&#xA;			RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;			vec![1],&#xD;&#xA;			test_attributes(1),&#xD;&#xA;			0u32.into(),&#xD;&#xA;			TokenType::Transferable,&#xD;&#xA;			CollectionType::Collectable,&#xD;&#xA;			Perbill::from_percent(0u32),&#xD;&#xA;		);&#xD;&#xA;		pallet_nft::Pallet::&lt;T&gt;::mint(&#xD;&#xA;			RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;			0u32.into(),&#xD;&#xA;			vec![1],&#xD;&#xA;			test_attributes(1),&#xD;&#xA;			3,&#xD;&#xA;		);&#xD;&#xA;	*/&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn create_metaverse_for_account&lt;T: Config&gt;(caller: T::AccountId) {&#xD;&#xA;	//pallet_metaverse::Pallet::&lt;T&gt;::create_metaverse(&#xD;&#xA;	//	RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;	//	vec![1u8],&#xD;&#xA;	//);&#xD;&#xA;}&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;The benchmarking builds successfully when using the code that is not commented but it does not seem to work when running it on the pallet. If I use the commented code instead, I get the following error&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;[E0599]: the function or associated item mint exists for struct pallet_nft::Pallet&lt;T&gt;, but its trait bounds were not satisfied&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;We found a possible solution using the orml benchmarking pallet but wondered if there is a  way to fix the issue using FRAME?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7382" PostHistoryTypeId="2" PostId="1979" RevisionGUID="0d2f9de0-e404-4994-af74-fd18ce3ce529" CreationDate="2022-04-20T00:00:29.467" UserId="304" Text="I'm trying to pull on-chain asset data from Basilisk via subxt. The name field of this `asset_details` struct is a BoundedVec and I need to be able to run the `into_inner()` method to get the vec from inside the BoundedVec. &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;To get access to the method I need to add the frame_support crate as a dependency to my crate. I've tried many tweaks to this dependency but I always get some crazy dependency tree error that I don't know how to solve. Is it really this hard to get access to frame_support? Any ideas appreciated!&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/E6TE8.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/mP7QR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7384" PostHistoryTypeId="1" PostId="1979" RevisionGUID="0d2f9de0-e404-4994-af74-fd18ce3ce529" CreationDate="2022-04-20T00:00:29.467" UserId="304" Text="How to add frame_support crate as dependency in cargo.toml?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7385" PostHistoryTypeId="3" PostId="1979" RevisionGUID="0d2f9de0-e404-4994-af74-fd18ce3ce529" CreationDate="2022-04-20T00:00:29.467" UserId="304" Text="|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7386" PostHistoryTypeId="2" PostId="1980" RevisionGUID="0505eb0a-aa53-42d6-92ef-f768539b3ac4" CreationDate="2022-04-20T00:04:10.507" UserId="29" Text="I am assuming this is for the Kusama runtime?&#xD;&#xA;&#xD;&#xA;There is a good resource for interpreting error messages [here](https://wiki.polkadot.network/docs/maintain-errors#polkadotjs-apps-explorer).&#xD;&#xA;&#xD;&#xA;Index 6 in the Kusama runtime is the Staking pallet.&#xD;&#xA;```rs&#xD;&#xA;Staking: pallet_staking::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;} = 6,&#xD;&#xA;```&#xD;&#xA;0x02 in decimal is 2 and error 2 in the Staking pallet is `NotStash` with the message: `Not a stash account.` &#xD;&#xA;&#xD;&#xA;0x07 in decimal is 7 and error 7 in the Staking pallet is `InvalidSlashIndex` with the message `Slash record index out of bounds.`&#xD;&#xA;&#xD;&#xA;You could also try something like this:&#xD;&#xA;&#xD;&#xA;```py&#xD;&#xA;receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)&#xD;&#xA;print(receipt.error_message['name'])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As to why you're getting the leading zeros, I am not sure. Typically when I am working with Substrate I get error messages like this: `{'Module': {'index': 6, 'error': '7'}`. You could start to debug it [here](https://github.com/polkascan/py-substrate-interface/blob/2bf913c086cb34c09c87d5d68b1e1bef58da8439/substrateinterface/base.py#L3234). Also, there was a [new release of FRAME metadata](https://github.com/paritytech/frame-metadata/releases/tag/v15.0.0) recently where the `scale-info` was updated to v2.0.0 and the `parity-scale-codec` was also updated to v3.0.0. Maybe consider opening an issue in the [py-substrate-interface repo](https://github.com/polkascan/py-substrate-interface/issues)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7388" PostHistoryTypeId="5" PostId="1980" RevisionGUID="7aa2f79f-f22d-4860-a2d5-2605c7a6016e" CreationDate="2022-04-20T00:15:32.710" UserId="29" Comment="added 17 characters in body" Text="I am assuming this is for the Kusama runtime?&#xD;&#xA;&#xD;&#xA;There is a good resource for interpreting error messages [here](https://wiki.polkadot.network/docs/maintain-errors#polkadotjs-apps-explorer).&#xD;&#xA;&#xD;&#xA;Index 6 in the Kusama runtime is the Staking pallet.&#xD;&#xA;```rs&#xD;&#xA;Staking: pallet_staking::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;} = 6,&#xD;&#xA;```&#xD;&#xA;0x02 in decimal is 2 and error 2 in the Staking pallet is `NotStash` with the message: `Not a stash account.` &#xD;&#xA;&#xD;&#xA;0x07 in decimal is 7 and error 7 in the Staking pallet is `InsufficientValue` with the message `Can not bond with value less than minimum balance.`&#xD;&#xA;&#xD;&#xA;You could also try something like this:&#xD;&#xA;&#xD;&#xA;```py&#xD;&#xA;receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)&#xD;&#xA;print(receipt.error_message['name'])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As to why you're getting the leading zeros, I am not sure. Typically when I am working with Substrate I get error messages like this: `{'Module': {'index': 6, 'error': '7'}`. You could start to debug it [here](https://github.com/polkascan/py-substrate-interface/blob/2bf913c086cb34c09c87d5d68b1e1bef58da8439/substrateinterface/base.py#L3234). Also, there was a [new release of FRAME metadata](https://github.com/paritytech/frame-metadata/releases/tag/v15.0.0) recently where the `scale-info` was updated to v2.0.0 and the `parity-scale-codec` was also updated to v3.0.0. Maybe consider opening an issue in the [py-substrate-interface repo](https://github.com/polkascan/py-substrate-interface/issues)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7389" PostHistoryTypeId="2" PostId="1981" RevisionGUID="b5a3aeb5-7c89-41bb-b0aa-91a5b3125d3e" CreationDate="2022-04-20T01:05:02.963" UserId="2165" Text="Does the 9190 version of westend change something with fees? We used to parse a transaction and check for a field called partialFee but looks like it's not present anymore since I see this for a block now instead:&#xD;&#xA;&#xD;&#xA;&quot;info&quot;:{&quot;error&quot;:&quot;Fee calculation not supported for 9190#westend&quot;}&#xD;&#xA;&#xD;&#xA;On latest substrate/polkadot versions. &#xD;&#xA;&#xD;&#xA;Polkadot v0.9.18&#xD;&#xA;substrate-api-sidecar v11.3.16" ContentLicense="CC BY-SA 4.0" />
  <row Id="7391" PostHistoryTypeId="1" PostId="1981" RevisionGUID="b5a3aeb5-7c89-41bb-b0aa-91a5b3125d3e" CreationDate="2022-04-20T01:05:02.963" UserId="2165" Text="Westend PartialFees in version 9190" ContentLicense="CC BY-SA 4.0" />
  <row Id="7392" PostHistoryTypeId="3" PostId="1981" RevisionGUID="b5a3aeb5-7c89-41bb-b0aa-91a5b3125d3e" CreationDate="2022-04-20T01:05:02.963" UserId="2165" Text="|fee|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7393" PostHistoryTypeId="5" PostId="1980" RevisionGUID="22e7ad44-024c-4acf-933e-857eb189195a" CreationDate="2022-04-20T01:06:26.597" UserId="29" Comment="added 9 characters in body" Text="I am assuming this is for the Kusama runtime?&#xD;&#xA;&#xD;&#xA;There is a good resource for interpreting error messages [here](https://wiki.polkadot.network/docs/maintain-errors#polkadotjs-apps-explorer).&#xD;&#xA;&#xD;&#xA;Index 6 in the Kusama runtime is the Staking pallet.&#xD;&#xA;```rs&#xD;&#xA;Staking: pallet_staking::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;} = 6,&#xD;&#xA;```&#xD;&#xA;0x02 in decimal is 2 and error 2 in the Staking pallet is `AlreadyBonded` with the message: `Stash is already bonded.` &#xD;&#xA;&#xD;&#xA;0x07 in decimal is 7 and error 7 in the Staking pallet is `InsufficientValue` with the message `Can not bond with value less than minimum balance.`&#xD;&#xA;&#xD;&#xA;You could also try something like this:&#xD;&#xA;&#xD;&#xA;```py&#xD;&#xA;receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)&#xD;&#xA;print(receipt.error_message['name'])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As to why you're getting the leading zeros, I am not sure. Typically when I am working with Substrate I get error messages like this: `{'Module': {'index': 6, 'error': '7'}`. You could start to debug it [here](https://github.com/polkascan/py-substrate-interface/blob/2bf913c086cb34c09c87d5d68b1e1bef58da8439/substrateinterface/base.py#L3234). Also, there was a [new release of FRAME metadata](https://github.com/paritytech/frame-metadata/releases/tag/v15.0.0) recently where the `scale-info` was updated to v2.0.0 and the `parity-scale-codec` was also updated to v3.0.0. Maybe consider opening an issue in the [py-substrate-interface repo](https://github.com/polkascan/py-substrate-interface/issues)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7394" PostHistoryTypeId="2" PostId="1982" RevisionGUID="a755deae-25b9-47d9-8202-e1a60b7687b0" CreationDate="2022-04-20T01:42:50.147" UserId="2330" Text="new to substrate. here are three modules: `Democracy` `Council`, `TechnicalCommittee`. i did some experiments on the local testnet ,but failed.&#xD;&#xA;&#xD;&#xA;I know that the proposal under `Democracy` can execute sudo origin. so i did the following:&#xD;&#xA;&#xD;&#xA;Democracy -&gt; Submit preimage(system-&gt; set_balance(sudo origin) and get this preimage hash) -&gt; Submit proposal(input preimage hash)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;if the proposal enters referenda and voted pass. this set_balance proposal will execute. this process will take a long time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`Council`, `TechnicalCommittee` can speed up the process. and they all use collective pallet.&#xD;&#xA;&#xD;&#xA;i use `techcomm` -&gt; `proposals` -&gt; `Submit proposal`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;democracy -&gt; fastTrack(proposalHash is set_balance preimage hash)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;vote and end time, I click the close button. but i get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;technicalCommittee.Executed:&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;  Err: BadOrigin&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;why?  fastTrack origin is FastTrackOrigin.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type FastTrackOrigin =pallet_collective::EnsureProportionAtLeast&lt;AccountId, TechnicalCollective, 2, 3&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;i use TechnicalCommittee vote this proposal and close(execute) it, why Origin is BadOrigin?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If use `Council` and `TechnicalCommittee`, What the correct process should look like？&#xD;&#xA;&#xD;&#xA;BTW,is there any more comprehensive documentation on this?. such as :&#xD;&#xA;&#xD;&#xA;https://polkadot.network/blog/polkadot-governance/" ContentLicense="CC BY-SA 4.0" />
  <row Id="7396" PostHistoryTypeId="1" PostId="1982" RevisionGUID="a755deae-25b9-47d9-8202-e1a60b7687b0" CreationDate="2022-04-20T01:42:50.147" UserId="2330" Text="How to better understand permissions in the Democracy module" ContentLicense="CC BY-SA 4.0" />
  <row Id="7397" PostHistoryTypeId="3" PostId="1982" RevisionGUID="a755deae-25b9-47d9-8202-e1a60b7687b0" CreationDate="2022-04-20T01:42:50.147" UserId="2330" Text="|council|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7398" PostHistoryTypeId="5" PostId="996" RevisionGUID="526e45dd-c17a-4397-85b3-fd5c5f0a1acc" CreationDate="2022-04-20T04:26:40.467" UserId="403" Comment="added 362 characters in body" Text="I am working on a substrate based blockchain that is in production. We started the node using PoA consensus but now we want to switch to PoS consensus. I did the necessary changes i.e added necessary pallets and switched from aura to babe. And when I run the node from scratch it's working fine. But the forkless upgrade of the existing chain is causing the block production to stop. I also tried to upgrade node binary which was throwing &quot;Unsupported or invalid BabeApi version&quot;.&#xD;&#xA;&#xD;&#xA;This is the error I am getting when I upgrade my runtime.&#xD;&#xA;[![Error on Forkless Upgrade][1]][1]&#xD;&#xA;&#xD;&#xA;Since this change also required node binary upgrade as there were changes in node. This is the error I am getting after upgrading node binary. I did both forkless runtime upgrade and node binary upgrade.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I feel like it is because of Genesis config. Since newly added pallets(babe, Staking, etc.) genesis config will not be loaded during forkless runtime upgrade, could it be related to that?&#xD;&#xA;&#xD;&#xA;Can someone guide me on how to do it correctly? &#xD;&#xA;&#xD;&#xA;Edit: This question is not similar to [How to change consensus engine from PoA to PoS?](https://substrate.stackexchange.com/questions/368/how-to-change-consensus-engine-from-poa-to-pos)&#xD;&#xA;The difference is this question is asking about the runtime upgrade of the chain from PoA to PoS. In the latter one, it does not tell that or even if that's possible or not.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/jUqaG.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6XmNp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7399" PostHistoryTypeId="2" PostId="1983" RevisionGUID="effbd6cf-ea89-41b5-9ac0-f3d24a197e85" CreationDate="2022-04-20T04:46:01.233" UserId="627" Text="The error encoding has changed slightly in Substrate master, specifically [after this PR](https://github.com/paritytech/substrate/pull/10242)&#xD;&#xA;&#xD;&#xA;In this case your results seems to match up with the recent encoding where `error` is 4 bytes -&#xD;&#xA;&#xD;&#xA; - the first byte still refers to the actual error index&#xD;&#xA; - the additional bytes are additional (encoded) error details" ContentLicense="CC BY-SA 4.0" />
  <row Id="7401" PostHistoryTypeId="2" PostId="1984" RevisionGUID="32a6c136-c973-4b9e-9bd0-e52e7fdf44ba" CreationDate="2022-04-20T08:02:43.513" UserId="225" Text="&gt; Is there a way to read information directly from the database, without a separate process?&#xD;&#xA;&#xD;&#xA;It is always possible to reverse engineer the client db storage to read directly https://github.com/paritytech/substrate/blob/9461b2de04210c6c193726a745c3ec6552b4ce9f/client/db/src/utils.rs#L509 but then you need to decode the header manually, and it is not future proof.&#xD;&#xA;(and utils to read either db content will spawn a process).&#xD;&#xA;&#xD;&#xA;Minimal process could be interesting though, I think adding a cli command to display chain info would be the easiest direction (calling fn `info` from `HeaderBackend` with a new command in crate `sc-cli`)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7403" PostHistoryTypeId="2" PostId="1985" RevisionGUID="d9d89a31-7cbe-47ca-a93e-2c140f161b65" CreationDate="2022-04-20T09:39:01.040" UserId="2366" Text="After completing the cumulus tutorial, I'm trying to connect the parachain to Rococo. I have two questions&#xD;&#xA; 1. Do we need to run our own validator nodes for Rococo? (my understanding is that its not needed)&#xD;&#xA; 2. If step 1 is not needed, how do we connect to the Rococo relaychain nodes, I have previously used `-- -- chain rococo` at the end of the start command to connect the parachain to rococo, but that is no longer working.&#xD;&#xA;&#xD;&#xA;The startup command used&#xD;&#xA;```&#xD;&#xA;./target/release/parachain \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 9944 \&#xD;&#xA;--rpc-port 9979 --rpc-cors all --discover-local \&#xD;&#xA;--rpc-external --rpc-methods=unsafe \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain rococo&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The parachain logs&#xD;&#xA;```&#xD;&#xA;2022-04-20 09:27:56 [Parachain]  Initializing Genesis block/state (state: 0xf223…16d5, header-hash: 0x0626…9b5d)    &#xD;&#xA;2022-04-20 09:27:58 [Relaychain]  Initializing Genesis block/state (state: 0x43ea…c82a, header-hash: 0xaaf2…7897)    &#xD;&#xA;2022-04-20 09:27:58 [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-04-20 09:27:59 [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-04-20 09:27:59 [Relaychain]   Local node identity is: 12D3KooWLy23nK6ke5guymJCnrv9DuenT3wGfwfFARo4TBj6tEQA    &#xD;&#xA;2022-04-20 09:27:59 [Relaychain]  Highest known block at #0    &#xD;&#xA;2022-04-20 09:27:59 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    &#xD;&#xA;2022-04-20 09:27:59 [Relaychain] Listening for new connections on 127.0.0.1:9945.    &#xD;&#xA;2022-04-20 09:27:59 [Parachain]   Local node identity is: 12D3KooWBRhKyabqGxhzm7LSrbgNepLPYLY8C9cMHYQQFPZg99Bn    &#xD;&#xA;2022-04-20 09:27:59 [Parachain]  Highest known block at #0    &#xD;&#xA;2022-04-20 09:27:59 [Parachain] 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-04-20 09:27:59 [Parachain] Listening for new connections on 127.0.0.1:9944.    &#xD;&#xA;2022-04-20 09:27:59 [Relaychain] error=RollingSessionWindow(SessionsUnavailable { kind: RuntimeApi(Execution { runtime_api_name: &quot;SessionInfo&quot;, source: FailedToDecodeReturnValue { function: &quot;session_info&quot;, error: Error { cause: Some(Error { cause: Some(Error { cause: Some(Error { cause: Some(Error { cause: None, desc: &quot;Not enough data to fill buffer&quot; }), desc: &quot;Could not decode `Public.0`&quot; }), desc: &quot;Could not decode `Public.0`&quot; }), desc: &quot;Could not decode `SessionInfo::validators`&quot; }), desc: &quot;Could not decode `Option::Some(T)`&quot; } } }), info: Some(SessionsUnavailableInfo { window_start: 0, window_end: 0, block_hash: 0xaaf2cd1b74b5f726895921259421b534124726263982522174147046b8827897 }) })&#xD;&#xA;2022-04-20 09:27:59 [Relaychain] Received msg before first active leaves update. This is not expected - message will be dropped. msg=ActiveDisputes(Sender { complete: false })&#xD;&#xA;2022-04-20 09:27:59 [Relaychain] error=Sender(AskActiveDisputesCanceled) ctx=&quot;on FromOverseer&quot;&#xD;&#xA;2022-04-20 09:28:00 [Relaychain] Bootnode with peer id `12D3KooWD6wC88atMMyVeP6ZKg9sK7QmUL8x8m1RxMW8rhv2vWyg` is on a different chain (our genesis: 0xaaf2…7897 theirs: 0x27b0…c184)    &#xD;&#xA;2022-04-20 09:28:00 [Relaychain] Bootnode with peer id `12D3KooWF7BUbG5ErMZ47ZdarRwtpZamgcZqxwpnFzkhjc1spHnP` is on a different chain (our genesis: 0xaaf2…7897 theirs: 0x27b0…c184)    &#xD;&#xA;2022-04-20 09:28:00 [Relaychain] Bootnode with peer id `12D3KooWLcpkpvjr5ccgtUdTSYtNDjEdsDcPNrt2Rb7yXuAf7bUE` is on a different chain (our genesis: 0xaaf2…7897 theirs: 0x27b0…c184)    &#xD;&#xA;2022-04-20 09:28:00 [Relaychain] Bootnode with peer id `12D3KooWSV4VqhBHZKKBsZKmVU462qRW9PmXTSuYvuajt1P93djA` is on a different chain (our genesis: 0xaaf2…7897 theirs: 0x27b0…c184)    &#xD;&#xA;2022-04-20 09:28:00 [Relaychain] Bootnode with peer id `12D3KooWBhkZQydNHDR3XSehnrfj1KNFCdpwgDrYpX54FrUR1FRS` is on a different chain (our genesis: 0xaaf2…7897 theirs: 0x27b0…c184)    &#xD;&#xA;2022-04-20 09:28:00 [Relaychain] Bootnode with peer id `12D3KooWBuLAMevZexnFKCgTyoz3AnHQn98D9cfe1Mg3kPoCjkwf` is on a different chain (our genesis: 0xaaf2…7897 theirs: 0x27b0…c184)    &#xD;&#xA;2022-04-20 09:28:00 [Relaychain] Bootnode with peer id `12D3KooWA5BAM71y9NtV5NH6EjANgYKRZ8jNLJ5z8GJ5RPdjt63n` is on a different chain (our genesis: 0xaaf2…7897 theirs: 0x27b0…c184)    &#xD;&#xA;2022-04-20 09:28:00 [Relaychain] Bootnode with peer id `12D3KooWGjEEDmNbBkXLM1uKMseK9iYD3osKA4JGdGKMZDCusjd6` is on a different chain (our genesis: 0xaaf2…7897 theirs: 0x27b0…c184)        &#xD;&#xA;2022-04-20 09:28:03 [Relaychain] Received msg before first active leaves update. This is not expected - message will be dropped. msg=ActiveDisputes(Sender { complete: false })&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;using polkadot-0.9.18 and tested locally with polkadot release-v00.9.18 branch" ContentLicense="CC BY-SA 4.0" />
  <row Id="7405" PostHistoryTypeId="1" PostId="1985" RevisionGUID="d9d89a31-7cbe-47ca-a93e-2c140f161b65" CreationDate="2022-04-20T09:39:01.040" UserId="2366" Text="Bootnodes for Rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="7406" PostHistoryTypeId="3" PostId="1985" RevisionGUID="d9d89a31-7cbe-47ca-a93e-2c140f161b65" CreationDate="2022-04-20T09:39:01.040" UserId="2366" Text="|parachain|rococo|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7407" PostHistoryTypeId="2" PostId="1986" RevisionGUID="26871383-ca09-40e9-ad22-29cc0de8b9cb" CreationDate="2022-04-20T09:46:49.847" UserId="85" Text="(Preferably dump text rather than images as we can copy paste and try things).&#xD;&#xA;&#xD;&#xA;In this case I would suggest pulling in the sp-keyring from master substrate:&#xD;&#xA;https://github.com/paritytech/substrate/tree/master/primitives/keyring&#xD;&#xA;&#xD;&#xA;That should mean that it is compatible with the frame support version you are pulling in." ContentLicense="CC BY-SA 4.0" />
  <row Id="7409" PostHistoryTypeId="6" PostId="1978" RevisionGUID="6a16c751-5944-4cd1-ba30-7b3cd746064d" CreationDate="2022-04-20T09:52:43.003" UserId="85" Comment="edited tags" Text="|substrate-node|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7410" PostHistoryTypeId="2" PostId="1987" RevisionGUID="247b7023-dc10-4432-97b8-3abc4efe8ab4" CreationDate="2022-04-20T09:56:10.530" UserId="2355" Text="I am trying to test a parachain, following [this tutorial][1]. /!\ The parachain is not the one in the tutorial, it is [kabocha's parachain][2].&#xD;&#xA;&#xD;&#xA;I have a working relay chain (setup like the tutorial), and two validator nodes (same).&#xD;&#xA;I can generate the wasm and genesis state for my parachain without problem.&#xD;&#xA;When i start my parachain, i have a `No validators assigned to our core.` message&#xD;&#xA;&#xD;&#xA;After reserving the slot on polkadot.js, no problem, but when i add my collator node as a parathread using sudo (as mentionned in the tutorial), i start having this error:&#xD;&#xA;&#xD;&#xA;    Could not find the header of the genesis block in the database! block_hash=0xdf34458113a507a37b3d953eba1a59b01ba98614eab86fe933765d39defea3cd&#xD;&#xA;&#xD;&#xA;The only mention i have found is [here][3], but it doesnt solve my issue, as `--parachain-id` is not a valid flag.&#xD;&#xA;&#xD;&#xA;Does anyone have an idea how to fix this problem ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/&#xD;&#xA;  [2]: https://github.com/kabocha-network/parachain/tree/kab-release-v0.1.3&#xD;&#xA;  [3]: https://github.com/paritytech/cumulus/issues/385" ContentLicense="CC BY-SA 4.0" />
  <row Id="7412" PostHistoryTypeId="1" PostId="1987" RevisionGUID="247b7023-dc10-4432-97b8-3abc4efe8ab4" CreationDate="2022-04-20T09:56:10.530" UserId="2355" Text="Could not find the header of the genesis block in the database!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7413" PostHistoryTypeId="3" PostId="1987" RevisionGUID="247b7023-dc10-4432-97b8-3abc4efe8ab4" CreationDate="2022-04-20T09:56:10.530" UserId="2355" Text="|parachain|kabocha|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7414" PostHistoryTypeId="2" PostId="1988" RevisionGUID="cb2f7b73-f4f5-405c-ab2d-69477f6344ea" CreationDate="2022-04-20T09:56:31.243" UserId="140" Text="With https://www.rinkeby.io/#explorer, we can check the balance of any Ethereum address.&#xD;&#xA;&#xD;&#xA;Is there any tool/portal for substrate address, where we can check the balance of any substrate account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7416" PostHistoryTypeId="1" PostId="1988" RevisionGUID="cb2f7b73-f4f5-405c-ab2d-69477f6344ea" CreationDate="2022-04-20T09:56:31.243" UserId="140" Text="How can we check the balance of any substrate account if we have its key?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7417" PostHistoryTypeId="3" PostId="1988" RevisionGUID="cb2f7b73-f4f5-405c-ab2d-69477f6344ea" CreationDate="2022-04-20T09:56:31.243" UserId="140" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7418" PostHistoryTypeId="2" PostId="1989" RevisionGUID="f6ece162-77d1-4109-a8a3-a219c24c4b3c" CreationDate="2022-04-20T10:11:38.000" UserId="140" Text="I got the answer. Its subscan.io " ContentLicense="CC BY-SA 4.0" />
  <row Id="7420" PostHistoryTypeId="2" PostId="1990" RevisionGUID="336f0d4b-71f7-41e6-9db8-d087d43cedb1" CreationDate="2022-04-20T10:20:40.347" UserId="379" Text="When trying to migrate the runtime from a very early version of substrate 3 (aug 2021) to polkadot 0.9.18 we are getting the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Failed to extract the runtime version from the new runtime., ,  Either calling `Core_version` or decoding `RuntimeVersion` failed.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Following RuntimeVersion struct was defined:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub const VERSION: RuntimeVersion = RuntimeVersion {&#xD;&#xA;	spec_name: create_runtime_str!(&quot;substrate-threefold&quot;),&#xD;&#xA;	impl_name: create_runtime_str!(&quot;substrate-threefold&quot;),&#xD;&#xA;	authoring_version: 1,&#xD;&#xA;	// The version of the runtime specification. A full node will not attempt to use its native&#xD;&#xA;	//   runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,&#xD;&#xA;	//   `spec_version`, and `authoring_version` are the same between Wasm and native.&#xD;&#xA;	// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use&#xD;&#xA;	//   the compatible custom types.&#xD;&#xA;	spec_version: 100,&#xD;&#xA;	impl_version: 1,&#xD;&#xA;	apis: RUNTIME_API_VERSIONS,&#xD;&#xA;	transaction_version: 2,&#xD;&#xA;	state_version: 0,&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I read that `state_version` should be set to 0 in order to perform the migration. But it seems like it's not working." ContentLicense="CC BY-SA 4.0" />
  <row Id="7422" PostHistoryTypeId="1" PostId="1990" RevisionGUID="336f0d4b-71f7-41e6-9db8-d087d43cedb1" CreationDate="2022-04-20T10:20:40.347" UserId="379" Text="Failed to do runtime upgrade: FailedToExtractRuntimeVersion" ContentLicense="CC BY-SA 4.0" />
  <row Id="7423" PostHistoryTypeId="3" PostId="1990" RevisionGUID="336f0d4b-71f7-41e6-9db8-d087d43cedb1" CreationDate="2022-04-20T10:20:40.347" UserId="379" Text="|runtime|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7424" PostHistoryTypeId="2" PostId="1991" RevisionGUID="38975e66-100c-44bb-b66c-8bb15a6b7435" CreationDate="2022-04-20T11:09:28.507" UserId="2055" Text="I'm looking for some kind of hook or channel in the node that gets triggered immediately after the runtime upgrade. Something like `on_runtime_upgrade` that is available for pallets. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7426" PostHistoryTypeId="1" PostId="1991" RevisionGUID="38975e66-100c-44bb-b66c-8bb15a6b7435" CreationDate="2022-04-20T11:09:28.507" UserId="2055" Text="Is there way to listen for runtime upgrades within the node" ContentLicense="CC BY-SA 4.0" />
  <row Id="7427" PostHistoryTypeId="3" PostId="1991" RevisionGUID="38975e66-100c-44bb-b66c-8bb15a6b7435" CreationDate="2022-04-20T11:09:28.507" UserId="2055" Text="|substrate-node|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7428" PostHistoryTypeId="2" PostId="1992" RevisionGUID="1dde1b6f-d14b-4ac4-b1e3-122147ee96de" CreationDate="2022-04-20T12:03:53.703" UserId="165" Text="You might be using the wrong chain spec of Rococo.&#xD;&#xA;&#xD;&#xA;The one running was included in this PR: https://github.com/paritytech/polkadot/pull/5113/commits/e9a0947de83f8ced4402a6d2df54dd78d861369d" ContentLicense="CC BY-SA 4.0" />
  <row Id="7430" PostHistoryTypeId="2" PostId="1993" RevisionGUID="14856052-e489-4a74-9527-cbe14d3ae69c" CreationDate="2022-04-20T13:24:57.813" UserId="73" Text="There is no such functionality. However, you can do the same as the `state_runtimeVersion` RPC. Get a `import_notification_stream` and then get the `RuntimeVersion` of each block that was imported. When the `RuntimeVersion` differs between two blocks, then you know that there was a runtime upgrade." ContentLicense="CC BY-SA 4.0" />
  <row Id="7432" PostHistoryTypeId="2" PostId="1994" RevisionGUID="138a685c-5d38-41e5-bf82-ef1d3955280a" CreationDate="2022-04-20T14:17:07.933" UserId="523" Text="correct, when new era triggered the underlying storage like `ErasStakers*` and `ErasValidator*` will be removed and unclaimable. Staking reward is usually a model of inflation(mint/deposit) so no transfer/move required" ContentLicense="CC BY-SA 4.0" />
  <row Id="7434" PostHistoryTypeId="2" PostId="1995" RevisionGUID="e52bee5a-4864-42ca-8315-8d23760916a6" CreationDate="2022-04-20T14:23:35.680" UserId="2376" Text="I'm running a node in dev mode: `./substrate/target/release/substrate --dev --tmp --ws-external`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My client connection code:&#xD;&#xA;```&#xD;&#xA;provider = new WsProvider(wsProvider)&#xD;&#xA;api = await new ApiPromise({ provider }).isReady;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am testing an app using polkadot js api, and often connecting via ws. This has worked fine, except now when I connect it says the node is at full capacity:&#xD;&#xA;&#xD;&#xA;`2022-04-19 17:03:12 Unable to build WebSocket connection WS Error &lt;Capacity&gt;: Unable to add another connection to the event loop.`&#xD;&#xA;&#xD;&#xA;I assumed the `disconnect` event is fired when the client app closes, I'm not sure why it is full.&#xD;&#xA;&#xD;&#xA;`netstat` shows a few ESTABLISHED connections from my ip, not sure why as I'm not currently even running the app." ContentLicense="CC BY-SA 4.0" />
  <row Id="7436" PostHistoryTypeId="1" PostId="1995" RevisionGUID="e52bee5a-4864-42ca-8315-8d23760916a6" CreationDate="2022-04-20T14:23:35.680" UserId="2376" Text="Dev Substrate Node at Capacity for WS Connections, how to flush?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7437" PostHistoryTypeId="3" PostId="1995" RevisionGUID="e52bee5a-4864-42ca-8315-8d23760916a6" CreationDate="2022-04-20T14:23:35.680" UserId="2376" Text="|rpc|api|dev|ws|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7438" PostHistoryTypeId="2" PostId="1996" RevisionGUID="76a4e168-1c78-4a27-a76e-d8146e24a2b6" CreationDate="2022-04-20T14:43:59.117" UserId="2099" Text="Starting with the node-template, I switched my chains block authoring from Aura to Babe, which compiles fine but does not manage to finalize any blocks. I suspect it's a wrong genesis configuration. The RPC call for grandpa roundState shows the following:&#xD;&#xA;```json&#xD;&#xA;{&quot;setId&quot;:0,&quot;best&quot;:{&quot;round&quot;:1,&quot;totalWeight&quot;:2,&quot;thresholdWeight&quot;:2,&quot;prevotes&quot;:{&quot;currentWeight&quot;:1,&quot;missing&quot;:[&quot;5GoNkf6WdbxCFnPdAnYYQyCjAKPJgLNxXwPjwTh6DGg6gN3E&quot;]},&quot;precommits&quot;:{&quot;currentWeight&quot;:0,&quot;missing&quot;:[&quot;5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu&quot;,&quot;5GoNkf6WdbxCFnPdAnYYQyCjAKPJgLNxXwPjwTh6DGg6gN3E&quot;]}},&quot;background&quot;:[]}&#xD;&#xA;```&#xD;&#xA;Not sure what I can extract from that.&#xD;&#xA;&#xD;&#xA;My question is which part of the code is responsible for proper finalization." ContentLicense="CC BY-SA 4.0" />
  <row Id="7440" PostHistoryTypeId="1" PostId="1996" RevisionGUID="76a4e168-1c78-4a27-a76e-d8146e24a2b6" CreationDate="2022-04-20T14:43:59.117" UserId="2099" Text="Grandpa + Babe finality issues" ContentLicense="CC BY-SA 4.0" />
  <row Id="7441" PostHistoryTypeId="3" PostId="1996" RevisionGUID="76a4e168-1c78-4a27-a76e-d8146e24a2b6" CreationDate="2022-04-20T14:43:59.117" UserId="2099" Text="|grandpa|babe|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7443" PostHistoryTypeId="5" PostId="1976" RevisionGUID="c479a9dd-a6e2-4dd6-99e8-85a967e090d4" CreationDate="2022-04-20T16:01:22.297" UserId="16" Comment="Should use `--dev` instead of `--tmp`" Text="Make sure you have `type ChainExtension` defined in your runtime:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;    ....&#xD;&#xA;	type ChainExtension = FetchRandomExtension;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;...as indicated in the docs:&#xD;&#xA;- https://github.com/paritytech/ink/tree/v3.0.0-rc8/examples/rand-extension#chain-side-integration&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also remember that there are two ways of running the [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node):&#xD;&#xA;&#xD;&#xA;1. Cloning it, modifying it, building it, running it:&#xD;&#xA;```sh&#xD;&#xA;git clone https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;cd substrate-contracts-node&#xD;&#xA;cargo run --release -- --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt;OR&#xD;&#xA;&#xD;&#xA;2. Using `cargo install` and just running it:&#xD;&#xA;```sh&#xD;&#xA;cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked&#xD;&#xA;substrate-contracts-node --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Turns out I was modifying my code and running my node using the second option (which was a completely different install!) " ContentLicense="CC BY-SA 4.0" />
  <row Id="7444" PostHistoryTypeId="2" PostId="1997" RevisionGUID="f74eaf03-4e18-4687-b7ca-18524c9bd915" CreationDate="2022-04-20T16:02:10.913" UserId="2163" Text="Error message: &lt;pre&gt;&#xD;&#xA;error: failed to select a version for 'log'.&#xD;&#xA;    ... required by package 'frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate#580ebae1)'&#xD;&#xA;    ... which satisfies git dependency 'frame-benchmarking' of package 'pallet-contracts v4.0.0-dev (https://github.com/paritytech/substrate#580ebae1)'&#xD;&#xA;    ... which satisfies git dependency 'pallet-contracts' of package 'node-template-runtime v4.0.0-dev (/home/sergej/substrate-test/runtime)'&#xD;&#xA;    ... which satisfies path dependency 'node-template-runtime' (locked to 4.0.0-dev) of package 'node-template v4.0.0-dev (/home/sergej/substrate-test/node)'&#xD;&#xA;versions that meet the requirements '^0.4.16' are: 0.4.16&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package 'log v0.4.14'&#xD;&#xA;    ... which satisfies dependency 'log = &quot;^0.4&quot;' (locked to 0.4.14) of package 'finality-grandpa v0.15.0'&#xD;&#xA;    ... which satisfies dependency 'finality-grandpa = &quot;^0.15.0&quot;' (locked to 0.15.0) of package 'sc-finality-grandpa v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)'&#xD;&#xA;    ... which satisfies git dependency 'sc-finality-grandpa' (locked to 0.10.0-dev) of package 'node-template v4.0.0-dev (/home/sergej/substrate-test/node)'&#xD;&#xA;&#xD;&#xA;failed to select a version for 'log' which could resolve this conflict&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;This happened after I added this to the ***Cargo.toml*** in the runtime directory: &#xD;&#xA;&lt;pre&gt;&#xD;&#xA;pallet-contracts = { git = &quot;https://github.com/paritytech/substrate&quot;, package = &quot;pallet-contracts&quot;, default-features = false }&#xD;&#xA;pallet-contracts-primitives = { git = &quot;https://github.com/paritytech/substrate&quot;, package = &quot;pallet-contracts-primitives&quot;, default-features = false }&#xD;&#xA;pallet-contracts-rpc-runtime-api = { git = &quot;https://github.com/paritytech/substrate&quot;, package = &quot;pallet-contracts-rpc-runtime-api&quot;, default-features = false }&#xD;&#xA;&lt;/pre&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7446" PostHistoryTypeId="1" PostId="1997" RevisionGUID="f74eaf03-4e18-4687-b7ca-18524c9bd915" CreationDate="2022-04-20T16:02:10.913" UserId="2163" Text="Error when implementing contracts pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="7447" PostHistoryTypeId="3" PostId="1997" RevisionGUID="f74eaf03-4e18-4687-b7ca-18524c9bd915" CreationDate="2022-04-20T16:02:10.913" UserId="2163" Text="|pallet|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7448" PostHistoryTypeId="2" PostId="1998" RevisionGUID="8e8f4232-30bc-4668-b4d9-c1b417b00577" CreationDate="2022-04-20T16:09:46.823" UserId="2146" Text="I'm trying to save some deeply nested information to the database, but I keep encountering an error when I go to save it using `ctx.store.save(obj)`.&#xD;&#xA;&#xD;&#xA;My object looks like this.&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    let writeToDB = {&#xD;&#xA;        prop1: [],&#xD;&#xA;        prop2: [ objA, objB],&#xD;&#xA;        prop3: [ obj1, Obj2 ],&#xD;&#xA;        prop4: 10,&#xD;&#xA;        prop5: &quot;astring&quot;,&#xD;&#xA;        doesNotWork: {&#xD;&#xA;          nestObj1: {&#xD;&#xA;            field1: &quot;aStringasdf&quot;,&#xD;&#xA;            field2: {&#xD;&#xA;              inceptionString1: &quot;squid&quot;,&#xD;&#xA;              inceptionString2: &quot;shrimp&quot;&#xD;&#xA;            }&#xD;&#xA;          },&#xD;&#xA;          nestObj2: {&#xD;&#xA;            ponds1: &quot;anotherString&quot;,&#xD;&#xA;            ponds2: {&#xD;&#xA;              peach: &quot;a&quot;,&#xD;&#xA;              pear: &quot;b&quot;,&#xD;&#xA;              plumb: &quot;c&quot;,&#xD;&#xA;              apples: &quot;d&quot;,&#xD;&#xA;              bananas: &quot;e&quot;,&#xD;&#xA;              apricot: &quot;f&quot;,&#xD;&#xA;              oranges: &quot;g&quot;&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        pending: false,&#xD;&#xA;        id: &quot;15a56da27d-WG&quot;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Where i'm having issues is when writing this nested object to the database.&#xD;&#xA;&#xD;&#xA;    doesNotWork: {&#xD;&#xA;      nestObj1: {&#xD;&#xA;        field1: &quot;aStringasdf&quot;,&#xD;&#xA;        field2: {&#xD;&#xA;          inceptionString1: &quot;squid&quot;,&#xD;&#xA;          inceptionString1: &quot;shrimp&quot;&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      nestObj2: {&#xD;&#xA;        ponds1: &quot;anotherString&quot;,&#xD;&#xA;        ponds2: {&#xD;&#xA;          peach: &quot;a&quot;,&#xD;&#xA;          pear: &quot;b&quot;,&#xD;&#xA;          plumb: &quot;c&quot;,&#xD;&#xA;          apples: &quot;d&quot;,&#xD;&#xA;          bananas: &quot;e&quot;,&#xD;&#xA;          apricot: &quot;f&quot;,&#xD;&#xA;          oranges: &quot;g&quot;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I generate my entity. (all extrinsic data are of type string,  int and boolean). &#xD;&#xA;&#xD;&#xA;processor.ts file:&#xD;&#xA;&#xD;&#xA;    let ctx: ExtrinsicHandlerContext = ctxHandler; &#xD;&#xA;&#xD;&#xA;    const extrinsicData = getExtrisic(ctx); //writeToDB  object&#xD;&#xA;    const entity = await getOrCreate(ctx.store, DesiredObject, id); //&#xD;&#xA;&#xD;&#xA;    entity.doesNotWork = extrinsicData.doesNotWork&#xD;&#xA;&#xD;&#xA;    ctx.store.save(entity); &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I build my code and run `processor.ts`, at the point it gets to save this object. I run into the error.&#xD;&#xA;&#xD;&#xA;terminal: when running `node -r dotenv/config lib/processor.js`&#xD;&#xA;&#xD;&#xA;      TypeError: obj.toJSON is not a function&#xD;&#xA;        at Object.to (/path/squid-template/lib/model/generated/desiredObj.model.js:103:94)&#xD;&#xA;        at Function.ApplyValueTransformers.transformTo (/path/squid-template/node_modules/typeorm/util/ApplyValueTransformers.js:22:28)&#xD;&#xA;        at PostgresDriver.preparePersistentValue (/path/squid-template/node_modules/typeorm/driver/postgres/PostgresDriver.js:517:69)&#xD;&#xA;        at /path/squid-template/node_modules/typeorm/query-builder/InsertQueryBuilder.js:454:57&#xD;&#xA;        at Array.forEach (&lt;anonymous&gt;)&#xD;&#xA;        at /path/squid-template/node_modules/typeorm/query-builder/InsertQueryBuilder.js:432:25&#xD;&#xA;        at Array.forEach (&lt;anonymous&gt;)&#xD;&#xA;        at InsertQueryBuilder.createValuesExpression (/path/squid-template/node_modules/typeorm/query-builder/InsertQueryBuilder.js:431:23)&#xD;&#xA;        at InsertQueryBuilder.createInsertExpression (/path/squid-template/node_modules/typeorm/query-builder/InsertQueryBuilder.js:265:37)&#xD;&#xA;        at InsertQueryBuilder.getQuery (/path/squid-template/node_modules/typeorm/query-builder/InsertQueryBuilder.js:38:21&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;going to /lib/model/generated/desiredObj.model.js:103:94  &#xD;&#xA;&#xD;&#xA;    __decorate([&#xD;&#xA;        (0, typeorm_1.Column)(&quot;jsonb&quot;, { transformer: { to: obj =&gt; obj == null ? undefined : obj.toJSON(), from: obj =&gt; obj == null ? undefined : new _properties_1.Properties(undefined, obj) }, nullable: true }),&#xD;&#xA;        __metadata(&quot;design:type&quot;, Object)&#xD;&#xA;    ], desiredObject.prototype, &quot;doesNotWork&quot;, void 0);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm not too familiar with using GraphQL ORM, but I can see the toJSON function defined.... I've isolated the problem to the writing of this deep nested field. When I remove this property (incoming extrinsic data is null) it writes to the db. When it has data, it throws the typeError above.&#xD;&#xA;&#xD;&#xA;Either there is something wrong with my schema (most likely) or it's a little deeper. &#xD;&#xA;&#xD;&#xA;Any ideas? I tried getting this to work for a while now. How would you write the schema for the doesNotWork property? Assuming nullables for all nested fields? I've put my schema below for it. &#xD;&#xA;&#xD;&#xA;Cheers&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      type writeToDB @entity{&#xD;&#xA;          prop1: [String]&#xD;&#xA;          prop2: [XYZ] @derivedFrom(field: &quot;ignore&quot;)&#xD;&#xA;          prop3: [ABC] @derivedFrom(field: &quot;these&quot;)&#xD;&#xA;          prop4: Int!&#xD;&#xA;          prop5: String!&#xD;&#xA;          doesNotWork: DoesNotWork &#xD;&#xA;          pending: Boolean!&#xD;&#xA;          id: ID!&#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      type DoesNotWork {&#xD;&#xA;        nestObj1: Object1 &#xD;&#xA;        nestObj2: Object2 &#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      type Object2 {&#xD;&#xA;        ponds1: String&#xD;&#xA;        ponds2: Fruits &#xD;&#xA;        pointerPropsA: DoesNotWork &#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      type Object1 {&#xD;&#xA;        field1: String&#xD;&#xA;        field2: InceptionObj &#xD;&#xA;        pointerPropsB: DoesNotWork &#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      &#xD;&#xA;      type InceptionObj {&#xD;&#xA;        inceptionString1: String &#xD;&#xA;        inceptionString1: String&#xD;&#xA;        pointerProp1: Object1&#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      type Fruits {&#xD;&#xA;        peach: String&#xD;&#xA;        pear: String&#xD;&#xA;        plumb: String&#xD;&#xA;        apples: String&#xD;&#xA;        bananas: String&#xD;&#xA;        apricot: String&#xD;&#xA;        oranges: String&#xD;&#xA;        pointerProp2: Object2&#xD;&#xA;      }" ContentLicense="CC BY-SA 4.0" />
  <row Id="7450" PostHistoryTypeId="1" PostId="1998" RevisionGUID="8e8f4232-30bc-4668-b4d9-c1b417b00577" CreationDate="2022-04-20T16:09:46.823" UserId="2146" Text="Saving deeply nested objects using subsquid" ContentLicense="CC BY-SA 4.0" />
  <row Id="7451" PostHistoryTypeId="3" PostId="1998" RevisionGUID="8e8f4232-30bc-4668-b4d9-c1b417b00577" CreationDate="2022-04-20T16:09:46.823" UserId="2146" Text="|subsquid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7452" PostHistoryTypeId="6" PostId="1998" RevisionGUID="8f78d001-accf-4d46-8d43-3e0f36eb7bb7" CreationDate="2022-04-20T16:23:41.097" UserId="85" Comment="edited tags" Text="|indexing|subsquid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7453" PostHistoryTypeId="2" PostId="1999" RevisionGUID="73a1cf46-6b6a-45c6-a630-b6e1d5b82e9f" CreationDate="2022-04-20T16:42:15.493" UserId="1816" Text="I want to generate a `StorageProof` for a specific event that is stored in storage. I have found `System_Events` but this returns me all events of a block, instead of a specific one. I stumbled on `getChildReadProof` and am thinking the `childStorageKey` could be the index in the `Vec&lt;Event&gt;` but am unable to generate valid calls, and have the suspicion this is incorrect in general. &#xD;&#xA;&#xD;&#xA;Is there another module I'm missing for accessing events and performing a storage proof?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7455" PostHistoryTypeId="1" PostId="1999" RevisionGUID="73a1cf46-6b6a-45c6-a630-b6e1d5b82e9f" CreationDate="2022-04-20T16:42:15.493" UserId="1816" Text="getReadProof for specific event" ContentLicense="CC BY-SA 4.0" />
  <row Id="7456" PostHistoryTypeId="3" PostId="1999" RevisionGUID="73a1cf46-6b6a-45c6-a630-b6e1d5b82e9f" CreationDate="2022-04-20T16:42:15.493" UserId="1816" Text="|storage|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7457" PostHistoryTypeId="2" PostId="2000" RevisionGUID="fdc1fd1c-2e46-4c94-a2bc-726816772511" CreationDate="2022-04-20T16:45:12.693" UserId="12" Text="In Substrate code, there is logic to determine the way in which extrinsics should be formatted for the runtime (ref: https://github.com/paritytech/substrate/blob/v3.0.0/client/transaction-pool/src/api.rs#L174). This logic is based on the version of Substrate's `TaggedTransactionQueue`. Does this version line up with any of the versions that Substrate runtimes advertise via their [metadata][1]? What versions of Polkadot use which transaction versions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/metadata/#decoded-metadata-format" ContentLicense="CC BY-SA 4.0" />
  <row Id="7459" PostHistoryTypeId="1" PostId="2000" RevisionGUID="fdc1fd1c-2e46-4c94-a2bc-726816772511" CreationDate="2022-04-20T16:45:12.693" UserId="12" Text="How to Determine Extrinsic Format" ContentLicense="CC BY-SA 4.0" />
  <row Id="7460" PostHistoryTypeId="3" PostId="2000" RevisionGUID="fdc1fd1c-2e46-4c94-a2bc-726816772511" CreationDate="2022-04-20T16:45:12.693" UserId="12" Text="|extrinsic|transactions|metadata|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7461" PostHistoryTypeId="2" PostId="2001" RevisionGUID="52aab0d2-fada-4c65-9792-4fb6edd2c7f2" CreationDate="2022-04-20T16:49:41.277" UserId="1786" Text="So for sidecar specifically this is a bug due to `TransactionByteFee` being changed to `LengthToFee` in v9190. We use that perByte value to help calculate the `partialFee` within our helper package called `@substrate/calc`.&#xD;&#xA;&#xD;&#xA;See the following PR which introduced these changes inside of polkadot: https://github.com/paritytech/polkadot/pull/5028&#xD;&#xA;&#xD;&#xA;See the following PR that fixes this issue inside of substrate-api-sidecar: https://github.com/paritytech/substrate-api-sidecar/pull/900&#xD;&#xA;&#xD;&#xA;As soon as that PR is merged a new patch release will be shipped, there is a tracking issue in github here: https://github.com/paritytech/substrate-api-sidecar/issues/899" ContentLicense="CC BY-SA 4.0" />
  <row Id="7463" PostHistoryTypeId="2" PostId="2002" RevisionGUID="3c377b02-9707-4b7a-88df-a4fc7e1ccefc" CreationDate="2022-04-20T16:52:05.117" UserId="2366" Text="Syncing parachain to rococo generates the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-04-20 16:47:13 [Relaychain] DB corrupted: Corruption: Corrupted compressed block contents: Snappy. Repair will be triggered on next restart    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain] Block import error: Database    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain]  Error importing block 0xf70389c0893eb2603c86c087d5472bcdf63e401f9cd9d46e8ac4678009c652fb: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain]  Error importing block 0x2474ce5dbf0075dd96a6af41b3d7e846473ce571ecae9b74d268d198294b8801: block has an unknown parent    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain]  Error importing block 0xaf3e7e3e4429cf3dae316fa074d688d660c45eed5d18ad2cfa6a72ac87f4830f: block has an unknown parent    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain]  Error importing block 0xcddc29180173f0024f5de514b5c5476260840dde0a09241b0ed031c54e2efb2e: block has an unknown parent    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain]  Error importing block 0xe77146a356ccc0b422cc192d4eb9b6d956d5e6bed5f7ba6a2ebca873b659d7b3: block has an unknown parent    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain]  Error importing block 0xdf3d7de4ab483214165a37667b1be4a405991fa669f7fbb3ac75b200fbc8e5b0: block has an unknown parent    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain]  Error importing block 0x97e17ed1120a0e0e2835936cc9eb89457f15d7054d86f895ab1e655129975350: block has an unknown parent    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain] DB corrupted: Corruption: Corrupted compressed block contents: Snappy. Repair will be triggered on next restart    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain] Block import error: Database    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain]  Error importing block 0xf70389c0893eb2603c86c087d5472bcdf63e401f9cd9d46e8ac4678009c652fb: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain]  Error importing block 0x3784e3a954b95f9c478720a7a0bb6d1f343301b673c5bb67cef351482f98790f: block has an unknown parent    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain] DB corrupted: Corruption: Corrupted compressed block contents: Snappy. Repair will be triggered on next restart    &#xD;&#xA;2022-04-20 16:47:13 [Relaychain] Block import error: Database &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Startup command used&#xD;&#xA;```&#xD;&#xA;./target/release/parachain \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 9944 \&#xD;&#xA;--rpc-port 9979 --rpc-cors all --discover-local \&#xD;&#xA;--rpc-external --rpc-methods=unsafe \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain rococo.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Using the latest rococo.json from https://github.com/paritytech/polkadot/blob/master/node/service/res/rococo.json&#xD;&#xA;&#xD;&#xA;The error goes away after some time but syncing does not happen (0 bps)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2022-04-20 16:49:45 [Parachain]  Idle (0 peers), best: #0 (0x0626…9b5d), finalized #0 (0x0626…9b5d), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-20 16:49:45 [Relaychain] ⚙️  Syncing  0.0 bps, target=#531880 (1 peers), best: #722 (0x6452…e6ea), finalized #512 (0xd1b3…6a0a), ⬇ 10.0kiB/s ⬆ 10.1kiB/s    &#xD;&#xA;2022-04-20 16:49:50 [Parachain]  Idle (0 peers), best: #0 (0x0626…9b5d), finalized #0 (0x0626…9b5d), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-20 16:49:50 [Relaychain]  Idle (0 peers), best: #722 (0x6452…e6ea), finalized #512 (0xd1b3…6a0a), ⬇ 7.2kiB/s ⬆ 7.5kiB/s    &#xD;&#xA;2022-04-20 16:49:55 [Parachain]  Idle (0 peers), best: #0 (0x0626…9b5d), finalized #0 (0x0626…9b5d), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-20 16:49:55 [Relaychain]  Idle (0 peers), best: #722 (0x6452…e6ea), finalized #512 (0xd1b3…6a0a), ⬇ 9.0kiB/s ⬆ 9.0kiB/s    &#xD;&#xA;2022-04-20 16:50:00 [Parachain]  Idle (0 peers), best: #0 (0x0626…9b5d), finalized #0 (0x0626…9b5d), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-20 16:50:00 [Relaychain] ⚙️  Syncing  0.0 bps, target=#531883 (1 peers), best: #722 (0x6452…e6ea), finalized #512 (0xd1b3…6a0a), ⬇ 9.7kiB/s ⬆ 10.3kiB/s    &#xD;&#xA;2022-04-20 16:50:05 [Parachain]  Idle (0 peers), best: #0 (0x0626…9b5d), finalized #0 (0x0626…9b5d), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-20 16:50:05 [Relaychain] ⚙️  Syncing  0.0 bps, target=#531883 (1 peers), best: #722 (0x6452…e6ea), finalized #512 (0xd1b3…6a0a), ⬇ 8.2kiB/s ⬆ 8.4kiB/s    &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7465" PostHistoryTypeId="1" PostId="2002" RevisionGUID="3c377b02-9707-4b7a-88df-a4fc7e1ccefc" CreationDate="2022-04-20T16:52:05.117" UserId="2366" Text="Database corruption on syncing parachain to rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="7466" PostHistoryTypeId="3" PostId="2002" RevisionGUID="3c377b02-9707-4b7a-88df-a4fc7e1ccefc" CreationDate="2022-04-20T16:52:05.117" UserId="2366" Text="|substrate-node|parachain|rococo|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7467" PostHistoryTypeId="2" PostId="2003" RevisionGUID="fbd62508-ca0f-4eb0-b519-070db2f11788" CreationDate="2022-04-20T16:55:02.130" UserId="2356" Text="I'm trying to measure the unbonding amount directly from a substrate-interface query. &#xD;&#xA;&#xD;&#xA;Here's the amount I'm interested in: &#xD;&#xA;&#xD;&#xA;[![unbonding amount][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eWIk1.png&#xD;&#xA;&#xD;&#xA;I can get some account information with this query: &#xD;&#xA;&#xD;&#xA;`value = self.active_substrate.query('System', 'Account', params=[self.ss58_address]).value`&#xD;&#xA;&#xD;&#xA;But this returns &#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;                    'nonce': value['nonce'],&#xD;&#xA;                    'consumers': value['consumers'],&#xD;&#xA;                    'providers': value['providers'],&#xD;&#xA;                    'sufficients': value['sufficients'],&#xD;&#xA;                    'coin_units': self.config.coinName,&#xD;&#xA;                    'free': free,&#xD;&#xA;                    'reserved': reserved,&#xD;&#xA;                    'misc_frozen': misc_frozen,&#xD;&#xA;                    'fee_frozen': fee_frozen&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Unless I'm missing something, there's no way to derive the unbonding amount from this result. Is there a better / different query to use for these details? Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7469" PostHistoryTypeId="1" PostId="2003" RevisionGUID="fbd62508-ca0f-4eb0-b519-070db2f11788" CreationDate="2022-04-20T16:55:02.130" UserId="2356" Text="Access The Unbonding Amount With Substrate Query" ContentLicense="CC BY-SA 4.0" />
  <row Id="7470" PostHistoryTypeId="3" PostId="2003" RevisionGUID="fbd62508-ca0f-4eb0-b519-070db2f11788" CreationDate="2022-04-20T16:55:02.130" UserId="2356" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7471" PostHistoryTypeId="2" PostId="2004" RevisionGUID="680d800a-0634-4094-ba74-ff9bd9b3d4ba" CreationDate="2022-04-20T16:59:10.003" UserId="2146" Text="So, I got it. &#xD;&#xA;&#xD;&#xA;In the end, it was an issue with my schema.&#xD;&#xA;&#xD;&#xA;I had to change it to this.&#xD;&#xA;&#xD;&#xA;      type writeToDB @entity{&#xD;&#xA;      prop1: [String]&#xD;&#xA;      prop2: [XYZ] @derivedFrom(field: &quot;ignore&quot;)&#xD;&#xA;      prop3: [ABC] @derivedFrom(field: &quot;these&quot;)&#xD;&#xA;      prop4: Int!&#xD;&#xA;      prop5: String!&#xD;&#xA;      doesNotWork: DoesNotWork **@derivedFrom(field:&quot;thisWorks&quot;)**&#xD;&#xA;      pending: Boolean!&#xD;&#xA;      id: ID!&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     }&#xD;&#xA;      &#xD;&#xA;      type DoesNotWork **@entity** {&#xD;&#xA;        nestObj1: Object1 &#xD;&#xA;        nestObj2: Object2 &#xD;&#xA;        thisWorks: **writeToDB! @unique**&#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      type Object2 {&#xD;&#xA;        ponds1: String&#xD;&#xA;        ponds2: Fruits &#xD;&#xA;        pointerPropsA: DoesNotWork &#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      type Object1 {&#xD;&#xA;        field1: String&#xD;&#xA;        field2: InceptionObj &#xD;&#xA;        pointerPropsB: DoesNotWork &#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      &#xD;&#xA;      type InceptionObj {&#xD;&#xA;        inceptionString1: String &#xD;&#xA;        inceptionString1: String&#xD;&#xA;        pointerProp1: Object1&#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      type Fruits {&#xD;&#xA;        peach: String&#xD;&#xA;        pear: String&#xD;&#xA;        plumb: String&#xD;&#xA;        apples: String&#xD;&#xA;        bananas: String&#xD;&#xA;        apricot: String&#xD;&#xA;        oranges: String&#xD;&#xA;        pointerProp2: Object2&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then I changed this&#xD;&#xA;&#xD;&#xA;    ctx.store.save(entity);&#xD;&#xA;&#xD;&#xA;to this&#xD;&#xA;&#xD;&#xA;    ctx.store.save({...entity, doesNotWork: extrinsicData.doesNotWork});" ContentLicense="CC BY-SA 4.0" />
  <row Id="7473" PostHistoryTypeId="12" PostId="2004" RevisionGUID="015dadb0-9df7-4ab4-855d-33975c149086" CreationDate="2022-04-20T17:10:16.677" UserId="2146" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2146,&quot;DisplayName&quot;:&quot;rarara&quot;}]}" />
  <row Id="7474" PostHistoryTypeId="13" PostId="2004" RevisionGUID="c5bab770-aba9-4fea-961a-5ba5f7f2a466" CreationDate="2022-04-20T17:14:13.357" UserId="2146" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2146,&quot;DisplayName&quot;:&quot;rarara&quot;}]}" />
  <row Id="7475" PostHistoryTypeId="5" PostId="2004" RevisionGUID="a00706c0-4402-4008-9489-4b66fcc63a2f" CreationDate="2022-04-20T17:14:51.777" UserId="2146" Comment="Added @entity and @unique to respective types for nested object" Text="So, I got it. &#xD;&#xA;&#xD;&#xA;In the end, it was an issue with my schema.&#xD;&#xA;&#xD;&#xA;I had to change it to this.&#xD;&#xA;&#xD;&#xA;      type writeToDB @entity{&#xD;&#xA;      prop1: [String]&#xD;&#xA;      prop2: [XYZ] @derivedFrom(field: &quot;ignore&quot;)&#xD;&#xA;      prop3: [ABC] @derivedFrom(field: &quot;these&quot;)&#xD;&#xA;      prop4: Int!&#xD;&#xA;      prop5: String!&#xD;&#xA;      doesNotWork: DoesNotWork **@derivedFrom(field:&quot;thisWorks&quot;)**&#xD;&#xA;      pending: Boolean!&#xD;&#xA;      id: ID!&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     }&#xD;&#xA;      &#xD;&#xA;      type DoesNotWork **@entity** {&#xD;&#xA;        nestObj1: Object1 &#xD;&#xA;        nestObj2: Object2 &#xD;&#xA;        thisWorks: **writeToDB! @unique**&#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      type Object2 {&#xD;&#xA;        ponds1: String&#xD;&#xA;        ponds2: Fruits &#xD;&#xA;        pointerPropsA: DoesNotWork &#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      type Object1 {&#xD;&#xA;        field1: String&#xD;&#xA;        field2: InceptionObj &#xD;&#xA;        pointerPropsB: DoesNotWork &#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      &#xD;&#xA;      type InceptionObj {&#xD;&#xA;        inceptionString1: String &#xD;&#xA;        inceptionString1: String&#xD;&#xA;        pointerProp1: Object1&#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;      type Fruits {&#xD;&#xA;        peach: String&#xD;&#xA;        pear: String&#xD;&#xA;        plumb: String&#xD;&#xA;        apples: String&#xD;&#xA;        bananas: String&#xD;&#xA;        apricot: String&#xD;&#xA;        oranges: String&#xD;&#xA;        pointerProp2: Object2&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7476" PostHistoryTypeId="5" PostId="1973" RevisionGUID="c47c183e-a327-49f2-8985-e808706204e5" CreationDate="2022-04-20T17:24:02.040" UserId="2065" Comment="added 7 characters in body" Text="I need to mint an NFT and create metaverse for our auction pallet benchmarking. Both of these are handled by external pallet functionality and wondered if there is a FRAME-base benchmarking solution for using external calls from this pallet. Here is a code example from the benchmarking of the auction pallet:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;fn mint_NFT&lt;T: Config&gt;(caller: T::AccountId) {&#xD;&#xA;	//T::NFTHandler::mint_land_nft(caller.clone().into(), vec![1], test_attributes(1));&#xD;&#xA;	T::NFTHandler::create_token_class(&#xD;&#xA;		&amp;caller.clone(),&#xD;&#xA;		vec![1],&#xD;&#xA;		test_attributes(1),&#xD;&#xA;		0u32.into(),&#xD;&#xA;		TokenType::Transferable,&#xD;&#xA;		CollectionType::Collectable,&#xD;&#xA;		Perbill::from_percent(0u32),&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	T::NFTHandler::mint_token(&amp;caller.clone(), 0u32.into(), vec![1], test_attributes(1));&#xD;&#xA;	/*&#xD;&#xA;		pallet_nft::Pallet::&lt;T&gt;::create_group(RawOrigin::Root.into(), vec![1], vec![1]);&#xD;&#xA;		pallet_nft::Pallet::&lt;T&gt;::create_class(&#xD;&#xA;			RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;			vec![1],&#xD;&#xA;			test_attributes(1),&#xD;&#xA;			0u32.into(),&#xD;&#xA;			TokenType::Transferable,&#xD;&#xA;			CollectionType::Collectable,&#xD;&#xA;			Perbill::from_percent(0u32),&#xD;&#xA;		);&#xD;&#xA;		pallet_nft::Pallet::&lt;T&gt;::mint(&#xD;&#xA;			RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;			0u32.into(),&#xD;&#xA;			vec![1],&#xD;&#xA;			test_attributes(1),&#xD;&#xA;			3,&#xD;&#xA;		);&#xD;&#xA;	*/&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn create_metaverse_for_account&lt;T: Config&gt;(caller: T::AccountId) {&#xD;&#xA;	//pallet_metaverse::Pallet::&lt;T&gt;::create_metaverse(&#xD;&#xA;	//	RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;	//	vec![1u8],&#xD;&#xA;	//);&#xD;&#xA;}&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;The benchmarking builds successfully when using the code that is not commented but it does not seem to work when running it on the pallet. If I use the commented code instead, I get the following error&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;[E0599]: the function or associated item mint exists for struct pallet_nft::Pallet&lt;T&gt;, but its trait bounds were not satisfied&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;We found a possible solution using the orml benchmarking pallet but wondered if there is a  way to fix the issue using FRAME?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7477" PostHistoryTypeId="5" PostId="2000" RevisionGUID="81a60aad-940c-4f40-b623-6cb9dcc0c5f4" CreationDate="2022-04-20T17:27:50.267" UserId="12" Comment="clarify that this question is not actually about the extrinsic format" Text="In Substrate code, there is logic to determine the way in which extrinsics should be submitted to the runtime (ref: https://github.com/paritytech/substrate/blob/v3.0.0/client/transaction-pool/src/api.rs#L174). This logic is based on the version of Substrate's `TaggedTransactionQueue`. Does this version line up with any of the versions that Substrate runtimes advertise via their [metadata][1]? What versions of Polkadot use which transaction versions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/metadata/#decoded-metadata-format" ContentLicense="CC BY-SA 4.0" />
  <row Id="7478" PostHistoryTypeId="4" PostId="2000" RevisionGUID="81a60aad-940c-4f40-b623-6cb9dcc0c5f4" CreationDate="2022-04-20T17:27:50.267" UserId="12" Comment="clarify that this question is not actually about the extrinsic format" Text="How to Determine Transaction Interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="7479" PostHistoryTypeId="5" PostId="1908" RevisionGUID="7d4d2409-656b-440e-bb7a-9ff428736698" CreationDate="2022-04-20T17:28:20.683" UserId="85" Comment="talked with Keith" Text="The official answer is that you need to reclaim your trapped assets as shown by this test:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/e85f2d3355e909a82d936b259548385835c4398b/xcm/pallet-xcm/src/tests.rs#L532&#xD;&#xA;&#xD;&#xA;However I think it ought to be possible to set an appendix in the original xcm so that the surplus is redirected back to the source:&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;SetAppendix(Xcm(vec![					&#xD;&#xA;	RefundSurplus,&#xD;&#xA;	DepositAsset { assets: All.into(), max_assets: 1, beneficiary: source.clone() },&#xD;&#xA;])),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Imperially it does not seem that you need to buy additional execution (`buy_execution((Here, SEND_AMOUNT)),`) in the appendix (which is good as I was worried about a chicken and egg situation)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7480" PostHistoryTypeId="13" PostId="1908" RevisionGUID="30d0929c-a60f-4ee7-82ae-751dc327fa85" CreationDate="2022-04-20T17:28:27.587" UserId="85" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:85,&quot;DisplayName&quot;:&quot;Squirrel&quot;}]}" />
  <row Id="7481" PostHistoryTypeId="5" PostId="2000" RevisionGUID="11789bbd-a88e-420f-9fe5-68c4780aca4e" CreationDate="2022-04-20T17:37:37.377" UserId="12" Comment="added 67 characters in body" Text="In Substrate code, there is logic to determine the way in which extrinsics should be submitted to the runtime (ref: https://github.com/paritytech/substrate/blob/v3.0.0/client/transaction-pool/src/api.rs#L174). This logic is based on the version of Substrate's `TaggedTransactionQueue`. Does the version of the transaction queue line up with any of the versions that Substrate runtimes advertise via their [metadata][1] (e.g. extrinsic version, metadata version)? What versions of Polkadot use which transaction versions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/metadata/#decoded-metadata-format" ContentLicense="CC BY-SA 4.0" />
  <row Id="7482" PostHistoryTypeId="2" PostId="2005" RevisionGUID="efc83f1d-2a13-495d-b7b4-e0979fc05779" CreationDate="2022-04-20T17:41:01.003" UserId="73" Text="There is currently not efficient way to proof only the existence of one event. So, you need to read all events in the moment.&#xD;&#xA;&#xD;&#xA;However there is an issue open to improve the situation: https://github.com/paritytech/substrate/issues/11216" ContentLicense="CC BY-SA 4.0" />
  <row Id="7484" PostHistoryTypeId="6" PostId="2003" RevisionGUID="c3e5e07b-19c1-459e-9408-fe504244fff9" CreationDate="2022-04-20T18:15:35.533" UserId="28" Comment="edited tags" Text="|staking|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7485" PostHistoryTypeId="4" PostId="1613" RevisionGUID="958f4eb9-93bc-4375-bfaa-d841d6f444fe" CreationDate="2022-04-20T18:23:33.470" UserId="29" Comment="edited title" Text="How do I upgrade my node's RPC?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7486" PostHistoryTypeId="2" PostId="2006" RevisionGUID="728cfc1f-2635-4968-b480-c5a34631d0fa" CreationDate="2022-04-20T19:14:58.400" UserId="380" Text="I'm hitting an error when trying to do a cross contract call with two contracts running on substrate branch `monthly-2022-03` and compiled with &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    &quot;language&quot;: &quot;ink! 3.0.0-rc8&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;rustc 1.62.0-nightly&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error is `'encountered error while calling ImportedContract::example_function: NotCallable'`&#xD;&#xA;&#xD;&#xA;The `External` Contract is imported as follows:&#xD;&#xA;&#xD;&#xA;        /// Calls the `External` contract&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn external_fn_wrapper(&amp;self, accountid: AccountId, threshold: u8) -&gt; bool {&#xD;&#xA;            let mut external_instance: ExternalRef = ink_env::call::FromAccountId::from_account_id(self.external_account);&#xD;&#xA;            external_instance.external_function(accountid, threshold).unwrap()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;The function that's trying to be cross-called in the `External` contract is public which I assume means it's callable.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn external_function(&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does anyone have any ideas?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7488" PostHistoryTypeId="1" PostId="2006" RevisionGUID="728cfc1f-2635-4968-b480-c5a34631d0fa" CreationDate="2022-04-20T19:14:58.400" UserId="380" Text="Why would a cross contract call be giving `NotCallable`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7489" PostHistoryTypeId="3" PostId="2006" RevisionGUID="728cfc1f-2635-4968-b480-c5a34631d0fa" CreationDate="2022-04-20T19:14:58.400" UserId="380" Text="|pallet-contracts|blockchaincross-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7490" PostHistoryTypeId="2" PostId="2007" RevisionGUID="f1c43279-bebd-4ce5-9229-0b56e12bb08e" CreationDate="2022-04-20T20:43:56.787" UserId="28" Text="You are looking for the amount of funds being unlocked in the Staking pallet, and so you should query the Staking storage. I am not super familiar with `substrate-interface`, so this may just be pseudo code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;value = self.active_substrate.query('Staking', 'Ledger', params=[self.ss58_address]).value&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this you should see an `unlocking` field which has the list of funds that are pending to be unlocked (unbonding)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7492" PostHistoryTypeId="2" PostId="2008" RevisionGUID="bc17c624-eff9-4327-bd87-395af2478f1e" CreationDate="2022-04-20T20:53:37.260" UserId="28" Text="&gt; What are the drawbacks?&#xD;&#xA;&#xD;&#xA;The most notable drawback to continually nesting relay chains is the increased delay of things like finalization, cross-chain messages, and other things from the outer chains to the main Polkadot relay chain.&#xD;&#xA;&#xD;&#xA;For example, imagine the block time of all chains is 6 seconds. If you have 3 nested relay chains, you would expect that any cross-chain message from a parachain on the 3rd layer to the main Polkadot relay chain would take 18 seconds or more, since each layer would need to produce a block to the lower layer with the message in it.&#xD;&#xA;&#xD;&#xA;Luckily, parachains which are in active communication can position themselves close together to reduce this delay, but as mentioned, there would still be lag between block production on the outer edges of the network, and block finalization at the main Polkadot relay chain.&#xD;&#xA;&#xD;&#xA;&gt; I believe it is not possible since I haven't seen any example of it or a chain that does this.&#xD;&#xA;&#xD;&#xA;As Rob mentions, the current implementation of the parachains protocol does not have all the required logic to supported nested relay chains, which is why you don't see them.&#xD;&#xA;&#xD;&#xA;But you should expect that in the future, this will be made possible." ContentLicense="CC BY-SA 4.0" />
  <row Id="7495" PostHistoryTypeId="2" PostId="2009" RevisionGUID="8b2e8373-6570-4547-bd5f-6306c3c05dfe" CreationDate="2022-04-20T20:58:50.007" UserId="28" Text="To add a new RPC to the Substrate Node Template, you should look at the `rpc.rs` file included with it that contains an example and docs for adding a new RPC:&#xD;&#xA;&#xD;&#xA;**/node/src/rpc.rs**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Instantiate all full RPC extensions.&#xD;&#xA;pub fn create_full&lt;C, P&gt;(deps: FullDeps&lt;C, P&gt;) -&gt; jsonrpc_core::IoHandler&lt;sc_rpc::Metadata&gt;&#xD;&#xA;where&#xD;&#xA;	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;	C: HeaderBackend&lt;Block&gt; + HeaderMetadata&lt;Block, Error = BlockChainError&gt; + 'static,&#xD;&#xA;	C: Send + Sync + 'static,&#xD;&#xA;	C::Api: substrate_frame_rpc_system::AccountNonceApi&lt;Block, AccountId, Index&gt;,&#xD;&#xA;	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi&lt;Block, Balance&gt;,&#xD;&#xA;	C::Api: BlockBuilder&lt;Block&gt;,&#xD;&#xA;	P: TransactionPool + 'static,&#xD;&#xA;{&#xD;&#xA;	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi};&#xD;&#xA;	use substrate_frame_rpc_system::{FullSystem, SystemApi};&#xD;&#xA;&#xD;&#xA;	let mut io = jsonrpc_core::IoHandler::default();&#xD;&#xA;	let FullDeps { client, pool, deny_unsafe } = deps;&#xD;&#xA;&#xD;&#xA;	io.extend_with(SystemApi::to_delegate(FullSystem::new(client.clone(), pool, deny_unsafe)));&#xD;&#xA;&#xD;&#xA;	io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new(client.clone())));&#xD;&#xA;&#xD;&#xA;	// Extend this RPC with a custom API by using the following syntax.&#xD;&#xA;	// `YourRpcStruct` should have a reference to a client, which is needed&#xD;&#xA;	// to call into the runtime.&#xD;&#xA;	// `io.extend_with(YourRpcTrait::to_delegate(YourRpcStruct::new(ReferenceToClient, ...)));`&#xD;&#xA;&#xD;&#xA;	io&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As for specifically implementing the `NetworkWorker` into your node, you should take a look at the implementation in the main Substrate Node, and pull that in. Otherwise, you can open a [new issue](https://github.com/paritytech/substrate/issues/new), and ask a developer to include it into the `node-template` for you." ContentLicense="CC BY-SA 4.0" />
  <row Id="7497" PostHistoryTypeId="5" PostId="2000" RevisionGUID="8fcdffb5-b5c2-41ee-a7db-0bd3a645d25e" CreationDate="2022-04-20T21:23:19.750" UserId="12" Comment="added 192 characters in body" Text="In Substrate code, there is logic to determine the way in which extrinsics should be submitted to the runtime (ref: https://github.com/paritytech/substrate/blob/v3.0.0/client/transaction-pool/src/api.rs#L174). This logic is based on the version of Substrate's `TaggedTransactionQueue`. Does the version of the transaction queue line up with any of the versions that Substrate runtimes advertise via their [metadata][1] (e.g. extrinsic version, metadata version)? What versions of Polkadot use which transaction versions?&#xD;&#xA;&#xD;&#xA;Where are [these extrinsic format versions][2] documented and how does the runtime advertise which version it is expecting?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/metadata/#decoded-metadata-format&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/pull/10829/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="7498" PostHistoryTypeId="5" PostId="2000" RevisionGUID="31a1889a-1a0e-427a-998e-59a78b5c62df" CreationDate="2022-04-20T21:30:35.263" UserId="12" Comment="deleted 127 characters in body" Text="In Substrate code, there is logic to determine the way in which extrinsics should be submitted to the runtime (ref: https://github.com/paritytech/substrate/blob/v3.0.0/client/transaction-pool/src/api.rs#L174). This logic is based on the version of Substrate's `TaggedTransactionQueue`. Does the version of the transaction queue line up with any of the versions that Substrate runtimes advertise via their [metadata][1] (e.g. extrinsic version, metadata version)? What versions of Polkadot use which transaction versions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/metadata/#decoded-metadata-format&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/pull/10829/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="7499" PostHistoryTypeId="5" PostId="2000" RevisionGUID="37c5c86d-56db-48e3-9afb-1128d71da49f" CreationDate="2022-04-20T21:57:02.823" UserId="12" Comment="added 181 characters in body" Text="In Substrate code, there is logic to determine the way in which extrinsics should be submitted to the runtime (ref: https://github.com/paritytech/substrate/blob/v3.0.0/client/transaction-pool/src/api.rs#L174). This logic is based on the version of Substrate's `TaggedTransactionQueue`. Does the version of the transaction queue line up with any of the versions that Substrate runtimes advertise via their [metadata][1] (e.g. extrinsic version, metadata version)? What versions of Polkadot use which transaction versions?&#xD;&#xA;&#xD;&#xA;It seems like maybe this should be advertised by way of [the `apis` attribute on the `RuntimeVersion` type][2], but I'm not sure how to decode the API ID.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/metadata/#decoded-metadata-format&#xD;&#xA;  [2]: https://crates.parity.io/sp_version/struct.RuntimeVersion.html#structfield.apis" ContentLicense="CC BY-SA 4.0" />
  <row Id="7500" PostHistoryTypeId="2" PostId="2010" RevisionGUID="36da814d-071c-4a12-9776-aa8014d3b331" CreationDate="2022-04-20T22:16:34.043" UserId="12" Text="This is communicated via [the `apis` attribute on the RuntimeVersion type][1]. The interface version I am looking for is that of the `TaggedTransactionQueue`, which has an API ID of `0xd2bc9897eed08f15` per the [documentation][2] for how to calculate these IDs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/sp_version/struct.RuntimeVersion.html#structfield.apis&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sp_version/type.ApiId.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="7502" PostHistoryTypeId="2" PostId="2011" RevisionGUID="c6e736da-7aaa-4dc4-b11d-bd79217d701e" CreationDate="2022-04-20T23:19:31.157" UserId="2042" Text="I'm building out some local unit tests and am trying to figure out how to mock Polkadot requests/responses. I'm doing my best to get mock-socket (https://github.com/thoov/mock-socket) working, but I'm wondering if there is any documentation on using this with Polkadot JS? Or if someone has some handy examples? I know that mock-socket is already integrated&#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7504" PostHistoryTypeId="1" PostId="2011" RevisionGUID="c6e736da-7aaa-4dc4-b11d-bd79217d701e" CreationDate="2022-04-20T23:19:31.157" UserId="2042" Text="Mocking Polkadot requests in Jest" ContentLicense="CC BY-SA 4.0" />
  <row Id="7505" PostHistoryTypeId="3" PostId="2011" RevisionGUID="c6e736da-7aaa-4dc4-b11d-bd79217d701e" CreationDate="2022-04-20T23:19:31.157" UserId="2042" Text="|polkadot-js|testing|unit-tests|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7513" PostHistoryTypeId="2" PostId="2014" RevisionGUID="b581709f-3a78-4e8d-8d4f-5d54906ce392" CreationDate="2022-04-21T05:45:48.627" UserId="139" Text="[![enter image description here][1]][1]&#xD;&#xA;As you can see in the image, our chain randomly stalled just short of jumping into the next epoch. I have no clue why. How should I go about debugging such issues?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TZ15J.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7515" PostHistoryTypeId="1" PostId="2014" RevisionGUID="b581709f-3a78-4e8d-8d4f-5d54906ce392" CreationDate="2022-04-21T05:45:48.627" UserId="139" Text="How to debug chain stalls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7516" PostHistoryTypeId="3" PostId="2014" RevisionGUID="b581709f-3a78-4e8d-8d4f-5d54906ce392" CreationDate="2022-04-21T05:45:48.627" UserId="139" Text="|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7517" PostHistoryTypeId="6" PostId="2014" RevisionGUID="c4bffbdc-c190-426d-bc71-d1122ba841d8" CreationDate="2022-04-21T07:19:27.750" UserId="85" Comment="edited tags" Text="|stalled|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7518" PostHistoryTypeId="2" PostId="2015" RevisionGUID="ae39b9ef-cba4-4f60-a9ca-f51afc62ddd1" CreationDate="2022-04-21T08:33:35.953" UserId="2383" Text="Using [substrate-interface](https://pypi.org/project/substrate-interface/) I'm trying to get the amount of DOT in staking for non-active validators, those that are waiting.&#xD;&#xA;I can get the active validators' amount by using the `storage_function` `ErasStakers`, but I can't find any for the rest of the validators.&#xD;&#xA;&#xD;&#xA;I get the `{'total': 0, 'own': 0, 'others': []}` but just for the active stakers of the current era (`Staking:ActiveEra`):&#xD;&#xA;&#xD;&#xA;    active_validator = substrate.query_map(&#xD;&#xA;        module='Staking',&#xD;&#xA;        storage_function='ErasStakers',&#xD;&#xA;        page_size=300,&#xD;&#xA;        params=[era_index]&#xD;&#xA;    )&#xD;&#xA;Is there any call or combination of calls I could use to get the staked amount for the full set of validators (active+waiting)?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7520" PostHistoryTypeId="1" PostId="2015" RevisionGUID="ae39b9ef-cba4-4f60-a9ca-f51afc62ddd1" CreationDate="2022-04-21T08:33:35.953" UserId="2383" Text="How to obtain the staking amount for non-active validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7521" PostHistoryTypeId="3" PostId="2015" RevisionGUID="ae39b9ef-cba4-4f60-a9ca-f51afc62ddd1" CreationDate="2022-04-21T08:33:35.953" UserId="2383" Text="|staking|substrateinterface|python|polkascan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7522" PostHistoryTypeId="2" PostId="2016" RevisionGUID="209bccf1-e778-432a-9741-293d42dad157" CreationDate="2022-04-21T10:30:36.580" UserId="139" Text="I am trying to debug my network, and since the epoch times are quite large (4 hours) and eras (1 day), are waiting validators considered for election at the end of an epoch or at the end of an era?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7524" PostHistoryTypeId="1" PostId="2016" RevisionGUID="209bccf1-e778-432a-9741-293d42dad157" CreationDate="2022-04-21T10:30:36.580" UserId="139" Text="Are validators elected at the end of each Era or Epoch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7525" PostHistoryTypeId="3" PostId="2016" RevisionGUID="209bccf1-e778-432a-9741-293d42dad157" CreationDate="2022-04-21T10:30:36.580" UserId="139" Text="|staking|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7526" PostHistoryTypeId="2" PostId="2017" RevisionGUID="12b1da41-4b1c-47d4-9206-808ca1ebd4d5" CreationDate="2022-04-21T10:55:10.470" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="7528" PostHistoryTypeId="1" PostId="2017" RevisionGUID="12b1da41-4b1c-47d4-9206-808ca1ebd4d5" CreationDate="2022-04-21T10:55:10.470" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7529" PostHistoryTypeId="1" PostId="2018" RevisionGUID="d4e56149-7659-42ee-9bd9-9fc9b095aea1" CreationDate="2022-04-21T10:55:10.470" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7531" PostHistoryTypeId="2" PostId="2018" RevisionGUID="d4e56149-7659-42ee-9bd9-9fc9b095aea1" CreationDate="2022-04-21T10:55:10.470" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="7533" PostHistoryTypeId="5" PostId="1930" RevisionGUID="17e79552-82bc-452d-9c8f-f46a190f242a" CreationDate="2022-04-21T10:58:44.670" UserId="34" Comment="added 379 characters in body" Text="Storage migrations are custom, one-time functions that allow developers to rework existing storage in order to convert it to conform to updated expectations performed during a runtime upgrade.&#xD;&#xA;&#xD;&#xA;- [Documentation](https://docs.substrate.io/v3/runtime/upgrades/#storage-migrations)&#xD;&#xA;- [Migration how to guide](https://docs.substrate.io/how-to-guides/v3/storage-migrations/basics/)" ContentLicense="CC BY-SA 4.0" />
  <row Id="7534" PostHistoryTypeId="24" PostId="1930" RevisionGUID="17e79552-82bc-452d-9c8f-f46a190f242a" CreationDate="2022-04-21T10:58:44.670" Comment="Proposed by 34 approved by 85, 172 edit id of 162" ContentLicense="CC BY-SA 4.0" />
  <row Id="7535" PostHistoryTypeId="5" PostId="2011" RevisionGUID="131f8c3d-b4d6-4a2d-b8c9-db7624b3ccc5" CreationDate="2022-04-21T11:03:15.473" UserId="172" Comment="More concise." Text="I'm building out some local unit tests and am trying to figure out how to mock Polkadot requests/responses. I'm trying to get [mock-socket](https://github.com/thoov/mock-socket) working, wondering if there is any documentation on using this with Polkadot JS? Or if anyone has any handy examples?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7541" PostHistoryTypeId="2" PostId="2020" RevisionGUID="14243a3d-67f5-4766-9319-f4f304f4a593" CreationDate="2022-04-21T12:04:00.490" UserId="28" Text="Your code assumes that the pallet you are benchmarking has a tight coupling with `pallet_nft`, however this is an assumption that you must satsify within the rust trait bounds.&#xD;&#xA;&#xD;&#xA;The solution, as the compiler is hinting to you, is to explicitly define the tight coupling in your `T` generic:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;T: Config + pallet_nft::Config&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This change ensures that your runtime will have the `pallet_nft` in order to compile the benchmarking code.&#xD;&#xA;&#xD;&#xA;The even better solution is to write a benchmark which does not assume that specifically `pallet_nft` is used, but instead the NFT trait like `T::NFTHandler` will expose the functions you are trying to call, keeping your benchmarks flexible beyond just a single specific pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="7543" PostHistoryTypeId="2" PostId="2021" RevisionGUID="0101209d-11ff-49cf-b060-7a9776e42c89" CreationDate="2022-04-21T12:08:18.373" UserId="379" Text="We have a lot of pallets that have early V3 syntax, example here: https://github.com/threefoldtech/tfchain/blob/development/substrate-node/pallets/pallet-burning/src/lib.rs&#xD;&#xA;&#xD;&#xA;We want to port them to the new pallet syntax of polkadot version 0.9.18, since we are also upgrading the entire runtime and node to be compatible with future upgrades / changes.&#xD;&#xA;&#xD;&#xA;Also, what happens with the storage that is currently on our networks when we will upgrade all the pallets to use the new syntax? Will we need storage migration for all the objects?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7545" PostHistoryTypeId="1" PostId="2021" RevisionGUID="0101209d-11ff-49cf-b060-7a9776e42c89" CreationDate="2022-04-21T12:08:18.373" UserId="379" Text="How to easily port the code for V3 pallets (early V3 syntax) to new syntax (4.0.0-dev)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7546" PostHistoryTypeId="3" PostId="2021" RevisionGUID="0101209d-11ff-49cf-b060-7a9776e42c89" CreationDate="2022-04-21T12:08:18.373" UserId="379" Text="|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7547" PostHistoryTypeId="2" PostId="2022" RevisionGUID="a866f7e0-2a1c-41aa-9093-d4cea5d0b30d" CreationDate="2022-04-21T13:48:10.447" UserId="28" Text="You can take a look at the [upgrade guidelines](https://crates.parity.io/frame_support/attr.pallet.html#upgrade-guidelines) for converting to the new FRAME V2 macros.&#xD;&#xA;&#xD;&#xA;There is also a [checklist](https://crates.parity.io/frame_support/attr.pallet.html#checking-upgrade-guidelines) of things to check to make sure you don't inadvertently cause a breaking change.&#xD;&#xA;&#xD;&#xA;In general, storage items should not need to be migrated at all, since the only main change here is syntax, not actually the underlying logic.&#xD;&#xA;&#xD;&#xA;You can find a huge number of practical examples of migrations here: https://github.com/paritytech/substrate/issues/7882" ContentLicense="CC BY-SA 4.0" />
  <row Id="7549" PostHistoryTypeId="2" PostId="2023" RevisionGUID="a4abec2d-7388-460c-af0d-fd4f3009639a" CreationDate="2022-04-21T13:55:20.230" UserId="523" Text="era and build with `fast_runtime` to speed" ContentLicense="CC BY-SA 4.0" />
  <row Id="7551" PostHistoryTypeId="2" PostId="2024" RevisionGUID="c2301bfa-82ae-4932-bda0-2f38f70dd488" CreationDate="2022-04-21T14:00:53.607" UserId="28" Text="I believe you will need to do a few queries here to get the data you want:&#xD;&#xA;&#xD;&#xA;1. Get all validator stash accounts from iterating over the `Validators` storage map&#xD;&#xA;2. Get all the controller accounts by mapping the validator stash to the validator controller via the `Bonded` storage map&#xD;&#xA;3. Get the amount of tokens staked for that validator from the `Ledger` storage map&#xD;&#xA;&#xD;&#xA;From there, you need to add up all the values to get the total amount staked." ContentLicense="CC BY-SA 4.0" />
  <row Id="7553" PostHistoryTypeId="4" PostId="1979" RevisionGUID="3b7442aa-a271-49c5-a83e-fc724b288326" CreationDate="2022-04-21T14:18:13.913" UserId="544" Comment="Clarify the question" Text="How to resolve conflicted dependency versions when import frame_support" ContentLicense="CC BY-SA 4.0" />
  <row Id="7554" PostHistoryTypeId="6" PostId="1979" RevisionGUID="3b7442aa-a271-49c5-a83e-fc724b288326" CreationDate="2022-04-21T14:18:13.913" UserId="544" Comment="Clarify the question" Text="|rust|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7555" PostHistoryTypeId="24" PostId="1979" RevisionGUID="3b7442aa-a271-49c5-a83e-fc724b288326" CreationDate="2022-04-21T14:18:13.913" Comment="Proposed by 544 approved by 85, 45 edit id of 164" ContentLicense="CC BY-SA 4.0" />
  <row Id="7556" PostHistoryTypeId="5" PostId="2023" RevisionGUID="0c49e8d8-f39d-42f1-98a6-c689a5dda4ab" CreationDate="2022-04-21T14:31:43.060" UserId="523" Comment="added 100 characters in body" Text="era and the duration can be shortened in the case that validator misbehaves found, and you can build with `fast_runtime` to speed for dev test" ContentLicense="CC BY-SA 4.0" />
  <row Id="7557" PostHistoryTypeId="2" PostId="2025" RevisionGUID="eb977e12-012d-4d2a-9212-09cd14f9afb8" CreationDate="2022-04-21T14:34:02.917" UserId="1966" Text="When running a substrate node, the CLI accepts a parameter called `rpc_methods` which accepts `Auto`, `Safe` and `Unsafe` arguments. &#xD;&#xA;&#xD;&#xA;How can developers declare an RPC call Unsafe and how can one get the list of `RpcMethods::Unsafe` methods?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7559" PostHistoryTypeId="1" PostId="2025" RevisionGUID="eb977e12-012d-4d2a-9212-09cd14f9afb8" CreationDate="2022-04-21T14:34:02.917" UserId="1966" Text="Different between safe and unsafe RPC calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="7560" PostHistoryTypeId="3" PostId="2025" RevisionGUID="eb977e12-012d-4d2a-9212-09cd14f9afb8" CreationDate="2022-04-21T14:34:02.917" UserId="1966" Text="|rpc|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7561" PostHistoryTypeId="2" PostId="2026" RevisionGUID="87d9086a-d9e9-4881-a0f2-bc5969ba0e90" CreationDate="2022-04-21T15:30:39.157" UserId="620" Text="Assuming you are using BABE/Aura and GRANDPA, epoch and era are completely separate conceptual entities. Epochs belong to BABE/Aura and are the chunks of time containing authoring slots. Sessions and Eras belong to GRANDPA and define when the validator set can change (on session boundary).&#xD;&#xA;&#xD;&#xA;In practice, [Session looks to BABE](https://github.com/paritytech/polkadot/blob/release-v0.9.19/runtime/polkadot/src/lib.rs#L418) about when to change, so epochs and sessions change at the same time. Anyway, regarding when the election takes place...&#xD;&#xA;&#xD;&#xA;The `pallet_staking` config defines the [number of sessions per era](https://github.com/paritytech/polkadot/blob/release-v0.9.19/runtime/polkadot/src/lib.rs#L543). But there are actually two types of era, `CurrentEra` and `ActiveEra`. Active is what most users are generally familiar with as it concerns the set of active validators and is what points/rewards are mapped to. However, the network also keeps track of a [CurrentEra](https://github.com/paritytech/substrate/blob/f160775/frame/staking/src/pallet/mod.rs#L296), which is the latest _planned_ era. This means that the election can take place during some active era and the system can queue up all the election winners for the next era ahead of time (perhaps node operators would want an alert to make sure their nodes are online and synced ahead of them being in the active set).&#xD;&#xA;&#xD;&#xA;The election takes place in the second to last session of an active era. Therefore, `CurrentEra = ActiveEra` for the first 5 of 6 sessions, but, `CurrentEra = ActiveEra + 1` in the 6th session. In this session, validators can see if they've won and will be active in the next era. The [Sidecar docs](https://github.com/paritytech/substrate-api-sidecar/blob/v11.3.17/src/controllers/pallets/PalletsStakingProgressController.ts#L45L59) have a good diagram on the Staking Progress endpoint." ContentLicense="CC BY-SA 4.0" />
  <row Id="7563" PostHistoryTypeId="5" PostId="1871" RevisionGUID="c33262ea-1515-4b0d-a438-7698a7bb9b5b" CreationDate="2022-04-21T15:49:57.793" UserId="139" Comment="Added more clarity." Text="[In this video Joe Petrowski][1] demonstrates a command which allows us to set a stake and also choose a reward destination. But unfortunately some of the command gets obscured by their video picture. &#xD;&#xA;&#xD;&#xA;As I've narrowed it down, I require a step-by-step procedure that shows us &#xD;&#xA;&#xD;&#xA; - How to use polkadot-api-cli to sign and submit a session key (set session keys)&#xD;&#xA; - The command for how to call staking.validate/chill &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: https://youtu.be/ejgPSwdLj5o?t=1130" ContentLicense="CC BY-SA 4.0" />
  <row Id="7564" PostHistoryTypeId="33" PostId="1871" RevisionGUID="d5d321a0-cb69-4839-94ba-33ab369735f9" CreationDate="2022-04-21T16:56:32.033" UserId="139" Comment="5" />
  <row Id="7565" PostHistoryTypeId="2" PostId="2027" RevisionGUID="4e7db0ba-a536-4128-94c2-ae638ede01eb" CreationDate="2022-04-21T17:06:37.850" UserId="299" Text="How is base fee calculated?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**My understanding is that `WeightToFee` is just a transformation equation(`Weight -&gt; Balance`).**&#xD;&#xA;**But what is this `x`?**&#xD;&#xA;&#xD;&#xA;So the **final transaction fee** is this?:&#xD;&#xA;```bash&#xD;&#xA;base_fee = (-/+)coeff_integer * x^(degree) + coeff_frac * x^(degree);&#xD;&#xA;inclusion_fee = base_fee + length_fee + [targeted_fee_adjustment * weight_fee];&#xD;&#xA;total_fee = inclusion_fee + tip;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/rustdocs/latest/frame_support/weights/struct.WeightToFeeCoefficient.html&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mf2p0.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Ziuoc.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7567" PostHistoryTypeId="1" PostId="2027" RevisionGUID="4e7db0ba-a536-4128-94c2-ae638ede01eb" CreationDate="2022-04-21T17:06:37.850" UserId="299" Text="How is base fee calculated?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7568" PostHistoryTypeId="3" PostId="2027" RevisionGUID="4e7db0ba-a536-4128-94c2-ae638ede01eb" CreationDate="2022-04-21T17:06:37.850" UserId="299" Text="|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7569" PostHistoryTypeId="5" PostId="1871" RevisionGUID="a9c8eddd-4914-48ce-a165-9291ac73b6ab" CreationDate="2022-04-21T18:59:34.173" UserId="139" Comment="added 29 characters in body" Text="[In this video Joe Petrowski][1] demonstrates a command which allows us to set a stake and also choose a reward destination. But unfortunately some of the command gets obscured by their video picture. &#xD;&#xA;&#xD;&#xA;As I've narrowed it down, I require a step-by-step procedure that shows us &#xD;&#xA;&#xD;&#xA; - How to use polkadot-api-cli to sign and submit a session key (set session keys)&#xD;&#xA; - The command for how to set validator prefernces i.e call staking.validate/chill &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: https://youtu.be/ejgPSwdLj5o?t=1130" ContentLicense="CC BY-SA 4.0" />
  <row Id="7570" PostHistoryTypeId="5" PostId="1871" RevisionGUID="2ffe3466-4e15-4039-949d-0490b4b9275a" CreationDate="2022-04-21T19:07:58.813" UserId="139" Comment="added 411 characters in body" Text="[In this video Joe Petrowski][1] demonstrates a command which allows us to set a stake and also choose a reward destination. But unfortunately some of the command gets obscured by their video picture. &#xD;&#xA;&#xD;&#xA;As I've narrowed it down, I require a step-by-step procedure that shows us &#xD;&#xA;&#xD;&#xA; - How to use polkadot-api-cli to sign and submit a session key (set session keys)&#xD;&#xA; - The command for how to set validator prefernces i.e call staking.validate/chill &#xD;&#xA; &#xD;&#xA;Edit #1 : I may have figured out how to set validator prefs: I get a json response with : &#xD;&#xA;`yarn run:api  --seed .. tx.staking.validate '[&quot;30&quot;, false]' --ws ..`&#xD;&#xA;&#xD;&#xA;However, I don't see a commission set to 30%. I've tried it with `30` and `&quot;30&quot;` both. I've also tried putting the second arg `&quot;No&quot;` instead of false and both seemed to work. However I'd like to set the commission % properly.&#xD;&#xA;&#xD;&#xA;  [1]: https://youtu.be/ejgPSwdLj5o?t=1130" ContentLicense="CC BY-SA 4.0" />
  <row Id="7571" PostHistoryTypeId="2" PostId="2028" RevisionGUID="f7e40349-d4de-4ae7-aef6-659b4e5ef96e" CreationDate="2022-04-21T19:36:58.017" UserId="2389" Text="Anyone know how to get in touch with the devs behind the Polkadot Ledger app?  I am having issues with the Ledger Nano S Plus when using Polkadot.js web extension?  When I try to sign, I get this error:&#xD;&#xA;&#xD;&#xA;***Ledger error: Failed to execute 'requestDevice' on 'USB': Must be handling a user gesture to show a permission request***&#xD;&#xA;&#xD;&#xA;I have the latest firmware and app versions.  And it is not a hardware issue since it works with LedgerLive for Polkadot, and the apps for other protocols(Eth/Solana/etc) all work.  It is a app specific issue related to version 12.9180.1, which is used for the Nano S Plus.  The version available for the regular Nano S, 12.9180.0, works fine.&#xD;&#xA;&#xD;&#xA;I have spoken to the Ledger team, and they asked that I reach out to the app dev team.  But how?  Any help in pointing me to the right direction appreciated!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7573" PostHistoryTypeId="1" PostId="2028" RevisionGUID="f7e40349-d4de-4ae7-aef6-659b4e5ef96e" CreationDate="2022-04-21T19:36:58.017" UserId="2389" Text="Issues with Ledger Nano S Plus - not able to sign for Polkadot.js web extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="7574" PostHistoryTypeId="3" PostId="2028" RevisionGUID="f7e40349-d4de-4ae7-aef6-659b4e5ef96e" CreationDate="2022-04-21T19:36:58.017" UserId="2389" Text="|polkadot-js|ledger|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7575" PostHistoryTypeId="2" PostId="2029" RevisionGUID="44cf9856-61c8-40a8-8191-91fefca72287" CreationDate="2022-04-21T22:37:05.640" UserId="2393" Text="I was thinking of something similar for validator nodes to be able to auto-update, or at least send an alert.  Maybe use a cron job to check for updates.  For bitcoin miners, updates are very rare compared to the Dot ecosystem." ContentLicense="CC BY-SA 4.0" />
  <row Id="7577" PostHistoryTypeId="2" PostId="2030" RevisionGUID="d4edc770-de50-4b40-aeb5-731da5d15d8c" CreationDate="2022-04-21T23:06:58.153" UserId="28" Text="There used to be exactly an `on_runtime_upgrade` which was implemented at the pallet level, but we removed this because it was basically an anti-pattern to assume that all blockchains using a specific version of a pallet would trigger the upgrade in the exact way you expect.&#xD;&#xA;&#xD;&#xA;Upgrades of pallets and general runtime logic can and should only be programmed at the runtime level, where you have context of all the other pallets, logic, and behaviors which may be affected by a runtime upgrade.&#xD;&#xA;&#xD;&#xA;You can still write your migration / after-upgrade logic in the pallet, and simply expose it as a public function, and then include that into your `on_runtime_upgrade` hook, which should be exactly the same as what you are looking for here." ContentLicense="CC BY-SA 4.0" />
  <row Id="7579" PostHistoryTypeId="2" PostId="2031" RevisionGUID="2adf6464-1934-4e78-88b1-36ff231fec63" CreationDate="2022-04-22T00:44:21.520" UserId="2042" Text="I'm aware of using a callback in `signAndSend` or `sign` to verify if a transaction is finalized (like here: https://polkadot.js.org/docs/api/start/api.tx.subs/). Is there a way to do this _after_ the transaction has been sent?&#xD;&#xA;&#xD;&#xA;Or more specifically: how can I check if a transaction transfer has been completed after it has already been sent?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7581" PostHistoryTypeId="1" PostId="2031" RevisionGUID="2adf6464-1934-4e78-88b1-36ff231fec63" CreationDate="2022-04-22T00:44:21.520" UserId="2042" Text="How to check the status of a transaction (after sending)" ContentLicense="CC BY-SA 4.0" />
  <row Id="7582" PostHistoryTypeId="3" PostId="2031" RevisionGUID="2adf6464-1934-4e78-88b1-36ff231fec63" CreationDate="2022-04-22T00:44:21.520" UserId="2042" Text="|transactions|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7583" PostHistoryTypeId="2" PostId="2032" RevisionGUID="80ffd548-7114-4a5c-acbd-2e370c93b639" CreationDate="2022-04-22T03:34:24.463" UserId="2394" Text="I am following the Ink tutorial at https://docs.substrate.io/tutorials/v3/ink-workshop/pt1/ .&#xD;&#xA;&#xD;&#xA;When running `substrate-contracts-node --dev` no block is produced.&#xD;&#xA;&#xD;&#xA;Only log line produced is: &#xD;&#xA;&#xD;&#xA;```  Local node identity is: 12D3KooWRwU7xwcrgEfSqTW2xcosGU47VUVULkJgTQyg5kFdnmrV    &#xD;&#xA;2022-04-22 11:26:45  Operating system: macos    &#xD;&#xA;2022-04-22 11:26:45  CPU architecture: aarch64    &#xD;&#xA;2022-04-22 11:26:45  Highest known block at #0    &#xD;&#xA;2022-04-22 11:26:45 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-04-22 11:26:45 Listening for new connections on 127.0.0.1:9944.    &#xD;&#xA;2022-04-22 11:26:46 Accepted a new tcp connection from 127.0.0.1:59063.    &#xD;&#xA;2022-04-22 11:26:50  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:26:55  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:27:00  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:27:05  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:27:10  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;&#xD;&#xA;[.....]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7585" PostHistoryTypeId="1" PostId="2032" RevisionGUID="80ffd548-7114-4a5c-acbd-2e370c93b639" CreationDate="2022-04-22T03:34:24.463" UserId="2394" Text="substrate-contracts-node does not produce blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="7586" PostHistoryTypeId="3" PostId="2032" RevisionGUID="80ffd548-7114-4a5c-acbd-2e370c93b639" CreationDate="2022-04-22T03:34:24.463" UserId="2394" Text="|substrate-node|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7587" PostHistoryTypeId="4" PostId="2032" RevisionGUID="eda522f7-b66a-4f51-9998-0529b01ceddb" CreationDate="2022-04-22T03:40:40.473" UserId="2394" Comment="edited title" Text="Ink tutorial: substrate-contracts-node does not produce blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="7588" PostHistoryTypeId="5" PostId="2032" RevisionGUID="eda522f7-b66a-4f51-9998-0529b01ceddb" CreationDate="2022-04-22T03:40:40.473" UserId="2394" Comment="edited title" Text="I am following the Ink tutorial at https://docs.substrate.io/tutorials/v3/ink-workshop/pt1/ .&#xD;&#xA;&#xD;&#xA;When running `substrate-contracts-node --dev` no block is produced.&#xD;&#xA;&#xD;&#xA;Only log line produced is: &#xD;&#xA;&#xD;&#xA;```  Local node identity is: 12D3KooWRwU7xwcrgEfSqTW2xcosGU47VUVULkJgTQyg5kFdnmrV    &#xD;&#xA;2022-04-22 11:26:45  Operating system: macos    &#xD;&#xA;2022-04-22 11:26:45  CPU architecture: aarch64    &#xD;&#xA;2022-04-22 11:26:45  Highest known block at #0    &#xD;&#xA;2022-04-22 11:26:45 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-04-22 11:26:45 Listening for new connections on 127.0.0.1:9944.    &#xD;&#xA;2022-04-22 11:26:46 Accepted a new tcp connection from 127.0.0.1:59063.    &#xD;&#xA;2022-04-22 11:26:50  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:26:55  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:27:00  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:27:05  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:27:10  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;&#xD;&#xA;[.....]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;wam I missing anything here?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7589" PostHistoryTypeId="5" PostId="2032" RevisionGUID="734d3b96-5761-477c-b180-87f53353709a" CreationDate="2022-04-22T03:49:39.150" UserId="2394" Comment="deleted 1 character in body" Text="I am following the Ink tutorial at https://docs.substrate.io/tutorials/v3/ink-workshop/pt1/ .&#xD;&#xA;&#xD;&#xA;When running `substrate-contracts-node --dev` no block is produced.&#xD;&#xA;&#xD;&#xA;Only log line produced is: &#xD;&#xA;&#xD;&#xA;```  Local node identity is: 12D3KooWRwU7xwcrgEfSqTW2xcosGU47VUVULkJgTQyg5kFdnmrV    &#xD;&#xA;2022-04-22 11:26:45  Operating system: macos    &#xD;&#xA;2022-04-22 11:26:45  CPU architecture: aarch64    &#xD;&#xA;2022-04-22 11:26:45  Highest known block at #0    &#xD;&#xA;2022-04-22 11:26:45 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-04-22 11:26:45 Listening for new connections on 127.0.0.1:9944.    &#xD;&#xA;2022-04-22 11:26:46 Accepted a new tcp connection from 127.0.0.1:59063.    &#xD;&#xA;2022-04-22 11:26:50  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:26:55  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:27:00  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:27:05  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-04-22 11:27:10  Idle (0 peers), best: #0 (0x02ba…032a), finalized #0 (0x02ba…032a), ⬇ 0 ⬆ 0    &#xD;&#xA;&#xD;&#xA;[.....]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;am I missing anything here?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7590" PostHistoryTypeId="2" PostId="2033" RevisionGUID="792d07c8-8e0c-40fc-9d7a-5cd8775714a5" CreationDate="2022-04-22T04:38:35.523" UserId="245" Text="Substrate contracts node uses instant block seals. You need to send transactions to produce blocks.&#xD;&#xA;&#xD;&#xA;&gt; The instant seal consensus engine, and its cousin the manual seal consensus engine, are both included in the same [sc-consensus-manual-seal][1] crate. Instant seal simply authors a new block whenever a new transaction is available in the queue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sc-consensus-manual-seal/latest/sc_consensus_manual_seal/" ContentLicense="CC BY-SA 4.0" />
  <row Id="7592" PostHistoryTypeId="2" PostId="2034" RevisionGUID="8949a545-543b-4ecd-b761-f24be9d496ee" CreationDate="2022-04-22T05:46:28.130" UserId="139" Text="So this happened when I created a new validator and injected their session keys into my node. Then I proceeded to call `forceNewEra` from the staking module as sudo, and I am greeted with this : &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;Proposing failed: ClientImport(&quot;RuntimeApiError(Application(Execution(RuntimePanicked(\&quot;Validator with index 0 is disabled and should not be attempting to author blocks.\&quot;))))&quot;) &#xD;&#xA;&#xD;&#xA;What does it mean?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7594" PostHistoryTypeId="1" PostId="2034" RevisionGUID="8949a545-543b-4ecd-b761-f24be9d496ee" CreationDate="2022-04-22T05:46:28.130" UserId="139" Text="What does this validator error mean? &quot;Validator with index 0 is disabled and should not be attempting to author blocks.&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7595" PostHistoryTypeId="3" PostId="2034" RevisionGUID="8949a545-543b-4ecd-b761-f24be9d496ee" CreationDate="2022-04-22T05:46:28.130" UserId="139" Text="|error|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7596" PostHistoryTypeId="2" PostId="2035" RevisionGUID="c174f4a3-d9e4-4c11-9b4a-67f02b74f471" CreationDate="2022-04-22T06:38:52.483" UserId="642" Text="Thanks to @shawnTabrizi, he explained to me why this issue arose, and I share it with the community that might help someone.&#xD;&#xA;&#xD;&#xA;Acala had two options during the Crowdloan,&#xD;&#xA;&#xD;&#xA; 1. lock your DOT and get ACA, or&#xD;&#xA; 2. lock your DOT and get &quot;ACA and&#xD;&#xA;    LCDOT&quot;.&#xD;&#xA;&#xD;&#xA; In the latter case, it was not the usual contribution, but kind of &quot;Centralized Crowdloan&quot;. In fact In that case a contributor sends DOTs to an address which is not controlled by the Crowdloan pallet but Acala team (and probably they transferred all these type of contributions to crowdloan  pallet related address themselves to win the auction). I contributed via Polkawallet, chose the second option, that's why I can not fetch my Acala contribution via the code." ContentLicense="CC BY-SA 4.0" />
  <row Id="7598" PostHistoryTypeId="2" PostId="2036" RevisionGUID="f7dae3ec-993b-4129-9ead-b3f948481b4e" CreationDate="2022-04-22T06:39:37.180" UserId="2394" Text="Following https://docs.substrate.io/tutorials/v3/ink-workshop/pt1/ , &#xD;&#xA;I run `substrate-contracts-node --dev` to start the node, but the Contract UI at https://paritytech.github.io/contracts-ui/ shows `Connection Error` and cannot connect to Local Node, preventing contract deployment. &#xD;&#xA;&#xD;&#xA;Any configuration to be changed ?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CzfLe.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7600" PostHistoryTypeId="1" PostId="2036" RevisionGUID="f7dae3ec-993b-4129-9ead-b3f948481b4e" CreationDate="2022-04-22T06:39:37.180" UserId="2394" Text="Ink tutorial Contract UI connection error - does not connect to local node" ContentLicense="CC BY-SA 4.0" />
  <row Id="7601" PostHistoryTypeId="3" PostId="2036" RevisionGUID="f7dae3ec-993b-4129-9ead-b3f948481b4e" CreationDate="2022-04-22T06:39:37.180" UserId="2394" Text="|substrate-node|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7602" PostHistoryTypeId="5" PostId="2036" RevisionGUID="ee466023-3768-4a1f-9ca1-4d62232e4f40" CreationDate="2022-04-22T06:54:52.430" UserId="2394" Comment="added 232 characters in body; edited title" Text="Following https://docs.substrate.io/tutorials/v3/ink-workshop/pt1/ , &#xD;&#xA;I run `substrate-contracts-node --dev` to start the node, but the Contract UI at https://paritytech.github.io/contracts-ui/ shows `Connection Error` and cannot connect to Local Node, preventing contract deployment. &#xD;&#xA;&#xD;&#xA;Any configuration to be changed ?&#xD;&#xA;&#xD;&#xA;Running on Chrome, Apple M1 chip.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**EDIT**: it looks like a websocket connection error:&#xD;&#xA;```&#xD;&#xA;2022-04-22 14:50:15 Blocked connection to WebSockets server from untrusted origin: Some(&quot;https://paritytech.github.io&quot;)    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;how can we allow the connection?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CzfLe.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7603" PostHistoryTypeId="4" PostId="2036" RevisionGUID="ee466023-3768-4a1f-9ca1-4d62232e4f40" CreationDate="2022-04-22T06:54:52.430" UserId="2394" Comment="added 232 characters in body; edited title" Text="Ink tutorial Contract UI websocket connection error" ContentLicense="CC BY-SA 4.0" />
  <row Id="7604" PostHistoryTypeId="2" PostId="2037" RevisionGUID="76106b39-99b3-452a-bf7e-bdcf42d2aefc" CreationDate="2022-04-22T06:55:21.277" UserId="139" Text="So here's the answer: &#xD;&#xA;To validate using `polkadot-cli-api` you need three things: &#xD;&#xA;&#xD;&#xA; 1. Create a controller/stash pair and then tell your chain that they are a controller/stash pair using `staking.bond`&#xD;&#xA; 2. State your intention to validate&#xD;&#xA; 3. Generate session keys and insert them into your keystore.&#xD;&#xA;&#xD;&#xA;You can use `signer` also, but I'll write for `api`.&#xD;&#xA;&#xD;&#xA;`--ws` will take in the websocket address of your node for example `--ws &quot;ws://127.0.0.1:9944&quot;`&#xD;&#xA;&#xD;&#xA;`--seed` will take the `seed` used to sign the transaction&#xD;&#xA;&#xD;&#xA;1. api --account \&lt;Stash account\&gt; --seed \&lt;stash seed\&gt; --ws \&lt;ws endpoint\&gt; tx.staking.bond \&lt;Controller bs58 address\&gt; \&lt;Amount to bond\&gt; \&lt;Payee destination\&gt;&#xD;&#xA;&#xD;&#xA;2. api --account \&lt;Controller account\&gt; --seed \&lt;controller seed\&gt; --ws \&lt;ws endpoint\&gt; tx.staking.validate '[\&lt;Commission in parts per billion\&gt;, \&lt;boolean to allow for nominations\&gt;]'&#xD;&#xA;&#xD;&#xA;3. api --account \&lt;Controller\&gt; --seed ... --ws .... tx.session.setKeys \&lt;Input from author_rotateKeys()\&gt; 0x &#xD;&#xA;&#xD;&#xA;If you follow these steps you'll be able to validate without access to a GUI." ContentLicense="CC BY-SA 4.0" />
  <row Id="7606" PostHistoryTypeId="2" PostId="2038" RevisionGUID="6b50162e-df14-4bb8-9049-6dbb8391b694" CreationDate="2022-04-22T06:56:51.957" UserId="620" Text="Looks like you figured it out! I haven't used that CLI in a while.&#xD;&#xA;&#xD;&#xA;And you mentioned it in the details, but commission is a `PerBill`. So 30% would be `300_000_000`." ContentLicense="CC BY-SA 4.0" />
  <row Id="7608" PostHistoryTypeId="5" PostId="2036" RevisionGUID="0d437528-76c5-4c55-bb2d-e5010f0cc003" CreationDate="2022-04-22T07:02:30.753" UserId="2394" Comment="added 169 characters in body" Text="Following https://docs.substrate.io/tutorials/v3/ink-workshop/pt1/ , &#xD;&#xA;I run `substrate-contracts-node --dev` to start the node, but the Contract UI at https://paritytech.github.io/contracts-ui/ shows `Connection Error` and cannot connect to Local Node, preventing contract deployment. &#xD;&#xA;&#xD;&#xA;Any configuration to be changed ?&#xD;&#xA;&#xD;&#xA;Running on Chrome, Apple M1 chip.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**EDIT**: it looks like a websocket connection error:&#xD;&#xA;```&#xD;&#xA;2022-04-22 14:50:15 Blocked connection to WebSockets server from untrusted origin: Some(&quot;https://paritytech.github.io&quot;)    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;how can we allow the connection?&#xD;&#xA;&#xD;&#xA;**EDIT2**: I've added `--unsafe-ws-external` to ` substrate-contracts-node` command and Contract UI connects to LocalNode, but not sure this is the correct solution.&#xD;&#xA;(https://github.com/openethereum/parity-ethereum/issues/9678)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CzfLe.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7609" PostHistoryTypeId="2" PostId="2039" RevisionGUID="3d524a23-2579-493f-8f82-f661aa138207" CreationDate="2022-04-22T07:16:46.663" UserId="2102" Text="There are a few things you can do:&#xD;&#xA;&#xD;&#xA; - If you have the extrinsic hash of the tx and its block number, using the polkadot app, you can explore the blocks and look for your transaction and check if its in block and if the execution was fine (extrinsicSuccess). But I don't think this is what you need.&#xD;&#xA; - If you know the block number where your tx is in, query the block where your transaction is registered and inspect its events to check if the tx succeed or failed. You can use the Polkadot API to query the block has using its number like:&#xD;&#xA;```js&#xD;&#xA;// Get the hash of the block nº1&#xD;&#xA;const blockHash = await api.rpc.chain.getBlockHash(1);&#xD;&#xA;// Get the block itself&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;```&#xD;&#xA;  - If you don't know your block number but know the extrinsic hash, you need to process each block (or a slice of them) until you find your extrinsic. This is needed because extrinsic hashes are not unique, but combining the block number + extrinsic hash is.&#xD;&#xA;  - You can also have an event listener running all the time and processing each block in order to keep track of every transaction execution.&#xD;&#xA;&#xD;&#xA;This page is really useful to understand how to fetch things and determine the status of a transaction https://polkadot.js.org/docs/api/cookbook/blocks, but again, as long as you have some basic information of the transaction you should be able to make some queries that retrieve what you need." ContentLicense="CC BY-SA 4.0" />
  <row Id="7611" PostHistoryTypeId="2" PostId="2040" RevisionGUID="7c0fe1c0-be9d-4f71-bfb7-b4d0f1ae79bf" CreationDate="2022-04-22T07:27:49.977" UserId="2394" Text="this error happens when the local node is not ran in development mode - need to run `substrate-contracts-node --dev` (https://github.com/paritytech/substrate-contracts-node/issues/50)&#xD;&#xA;&#xD;&#xA;the problem was that I was running the executable from https://github.com/paritytech/substrate-contracts-node/releases, that starts the node in Local Testnet (instead of dev)" ContentLicense="CC BY-SA 4.0" />
  <row Id="7613" PostHistoryTypeId="2" PostId="2041" RevisionGUID="969deab6-cc01-44bd-9e08-92a9531e00fa" CreationDate="2022-04-22T07:32:08.607" UserId="85" Text="I've not used substrate-api-client yet, but I think one distinguishing feature is autogeneration of code from metadata is something that subxt has put a lot of effort into.&#xD;&#xA;&#xD;&#xA;substrate-api-client supports `no_std` which subxt does not ([yet][1]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt/issues/484" ContentLicense="CC BY-SA 4.0" />
  <row Id="7615" PostHistoryTypeId="2" PostId="2042" RevisionGUID="cce13d03-9b40-4624-a9ce-de5cadbc4fda" CreationDate="2022-04-22T07:36:53.047" UserId="85" Text="(Just upgrading popyakin's comment to an answer so that this question has an answer)&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/1659/how-to-have-a-mapping-in-a-custom-structure-inside-an-ink-contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="7617" PostHistoryTypeId="16" PostId="2042" RevisionGUID="f6db920d-c4e0-40a3-9049-5900fdacf9fb" CreationDate="2022-04-22T07:36:53.047" UserId="85" />
  <row Id="7618" PostHistoryTypeId="6" PostId="60" RevisionGUID="dac54c42-ebb4-40cf-ab85-ebdec45242b6" CreationDate="2022-04-22T07:40:09.447" UserId="85" Comment="edited tags" Text="|polkadot|rust|kusama|gossamer|golang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7619" PostHistoryTypeId="2" PostId="2043" RevisionGUID="cc472bcb-98ea-4cfa-8691-5f6c3dfccdea" CreationDate="2022-04-22T07:52:12.450" UserId="642" Text="After a treasury tip receives &quot;half + 1&quot; tips from the councils, It goes to the countdown period. I run `api.consts.tips.tipCountdown` on Polkadot an get `14,400`, which should be in blocks! If it is true 14400 equals 24 hours (since the inter-block space is 6 seconds). &#xD;&#xA;&#xD;&#xA;Now my question is, If my calculation is true, why after passing more than 24 hours some tips close button on Polkadot js are still grey/disabled?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7621" PostHistoryTypeId="1" PostId="2043" RevisionGUID="cc472bcb-98ea-4cfa-8691-5f6c3dfccdea" CreationDate="2022-04-22T07:52:12.450" UserId="642" Text="Why after passing more than 24 hours some tips close button on Polkadot js are still grey/disabled?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7622" PostHistoryTypeId="3" PostId="2043" RevisionGUID="cc472bcb-98ea-4cfa-8691-5f6c3dfccdea" CreationDate="2022-04-22T07:52:12.450" UserId="642" Text="|polkadot|polkadot-js|tips|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7623" PostHistoryTypeId="2" PostId="2044" RevisionGUID="0bcb74c6-ae7c-45c0-ab7d-12ea76c5de49" CreationDate="2022-04-22T08:05:59.647" UserId="85" Text="One reason for too high fees can be because parachains are using:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type Trader = UsingComponents&lt;IdentityFee, ..&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see in [statemint here][1] for example that this was recently changed to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	type Trader =&#xD;&#xA;		UsingComponents&lt;WeightToFee, ..&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Typically parachains don't need to charge as much as the relay chain for fees.&#xD;&#xA;&#xD;&#xA;(Associated issue: https://github.com/paritytech/cumulus/issues/920 )&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/d68e9bf27b38fff296ea9f57124d5f9b309018c3/polkadot-parachains/statemint/src/xcm_config.rs#L170" ContentLicense="CC BY-SA 4.0" />
  <row Id="7625" PostHistoryTypeId="2" PostId="2045" RevisionGUID="1c0ed896-bce8-47b8-86dd-a816810b1d0b" CreationDate="2022-04-22T08:16:45.707" UserId="2102" Text="Is it possible to retrieve the latest finalized block from a non-finalized block and its information? Using the Polkadot JS App we can check the chain state using the hash of the block, and using the Polkadot API we can retrieve the latest finalized head and proceed with some operations, but is it possible to do so from, for example, a pallet? Let's say I want to block some actions on a pallet storage until the last modification made on the same storage have been finalized." ContentLicense="CC BY-SA 4.0" />
  <row Id="7627" PostHistoryTypeId="1" PostId="2045" RevisionGUID="1c0ed896-bce8-47b8-86dd-a816810b1d0b" CreationDate="2022-04-22T08:16:45.707" UserId="2102" Text="Get last finalized block" ContentLicense="CC BY-SA 4.0" />
  <row Id="7628" PostHistoryTypeId="3" PostId="2045" RevisionGUID="1c0ed896-bce8-47b8-86dd-a816810b1d0b" CreationDate="2022-04-22T08:16:45.707" UserId="2102" Text="|substrate-node|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7629" PostHistoryTypeId="2" PostId="2046" RevisionGUID="384e86af-99c4-4f72-9443-22406f1f345c" CreationDate="2022-04-22T08:19:38.050" UserId="73" Text="Declaring a RPC unsafe is completely up to the developer. You need to pass the [`DenyUnsafe`][1] type to your RPC implementation. (you get the deny unsafe passed to the [`rpc_extensions_builder`][2]). Then you need to call in your RPC `self.deny_unsafe.check_if_safe()?`. That's it.&#xD;&#xA;&#xD;&#xA;&gt; how can one get the list of RpcMethods::Unsafe methods&#xD;&#xA;&#xD;&#xA;That is currently not supported!&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sc-rpc-api/latest/sc_rpc_api/enum.DenyUnsafe.html&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/731667f458cee06c2ac2de6855e8359fced87333/bin/node/cli/src/service.rs#L256-L275" ContentLicense="CC BY-SA 4.0" />
  <row Id="7631" PostHistoryTypeId="52" PostId="2031" RevisionGUID="dca80e96-ccc7-4441-9eeb-b6018fbfe834" CreationDate="2022-04-22T08:50:27.617" />
  <row Id="7632" PostHistoryTypeId="4" PostId="2045" RevisionGUID="56123339-5f6b-4bea-853f-86f5d62e881f" CreationDate="2022-04-22T09:02:25.580" UserId="2102" Comment="edited title" Text="Get last finalized block information" ContentLicense="CC BY-SA 4.0" />
  <row Id="7633" PostHistoryTypeId="2" PostId="2047" RevisionGUID="3dde25d8-a754-43bd-b14e-9899b3b19ae3" CreationDate="2022-04-22T09:26:21.450" UserId="1950" Text="I have configured the staking pallet in the Substrate node template and tried to add it to the Cargo.toml in Run time &#xD;&#xA;Then it ended up in the following error when building&#xD;&#xA;This happens if I add any pallets to the cargo toml &#xD;&#xA;&#xD;&#xA;What should be the fix for this ?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;pallet-stakingt = { version = &quot;0.0.1&quot;, default-features = false, path = &quot;../pallets/dct&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.6/src/lib.rs:235:9&#xD;&#xA;      |&#xD;&#xA;  235 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  236 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  237 | |                         For more information see: \&#xD;&#xA;  238 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.6/src/lib.rs:262:5&#xD;&#xA;      |&#xD;&#xA;  262 |     imp::getrandom_inner(dest)&#xD;&#xA;      |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7635" PostHistoryTypeId="1" PostId="2047" RevisionGUID="3dde25d8-a754-43bd-b14e-9899b3b19ae3" CreationDate="2022-04-22T09:26:21.450" UserId="1950" Text="Cannot import any pallets to the run time of node template" ContentLicense="CC BY-SA 4.0" />
  <row Id="7636" PostHistoryTypeId="3" PostId="2047" RevisionGUID="3dde25d8-a754-43bd-b14e-9899b3b19ae3" CreationDate="2022-04-22T09:26:21.450" UserId="1950" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7637" PostHistoryTypeId="2" PostId="2048" RevisionGUID="a2e8d0b7-e56e-43c2-8734-cf75e9b4cc38" CreationDate="2022-04-22T09:30:20.203" UserId="2099" Text="You need to add the wasm target support to the rust toolchain as such:&#xD;&#xA;```shell&#xD;&#xA;rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7639" PostHistoryTypeId="2" PostId="2049" RevisionGUID="80705653-b0fc-479a-9934-deb338c567b0" CreationDate="2022-04-22T09:36:51.747" UserId="18" Text="What is the difference between both XCM calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7641" PostHistoryTypeId="1" PostId="2049" RevisionGUID="80705653-b0fc-479a-9934-deb338c567b0" CreationDate="2022-04-22T09:36:51.747" UserId="18" Text="What does limitTeleportAssets do? and how is it different than reserverTransferAssets" ContentLicense="CC BY-SA 4.0" />
  <row Id="7642" PostHistoryTypeId="3" PostId="2049" RevisionGUID="80705653-b0fc-479a-9934-deb338c567b0" CreationDate="2022-04-22T09:36:51.747" UserId="18" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7643" PostHistoryTypeId="2" PostId="2050" RevisionGUID="54a6bde2-a70d-4969-82dd-551b53e309af" CreationDate="2022-04-22T09:37:13.710" UserId="18" Text="Both execute the same logic but the limited one can add a weight limit to the execution.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/0a34022e31c85001f871bb4067b7d5f5cab91207/xcm/pallet-xcm/src/lib.rs#L825" ContentLicense="CC BY-SA 4.0" />
  <row Id="7645" PostHistoryTypeId="2" PostId="2051" RevisionGUID="1c3fcbc6-3304-4b00-b29a-4a4557b7fc09" CreationDate="2022-04-22T10:25:08.070" UserId="151" Text="I'm running a Polkadot and a Kusama node on (separate) docker containers. Both are archive nodes, so it takes some more space (according to the wiki 15 to 20 Go). I was counting on the fact that 1) the nodes will grow with time and 2) Docker volumes may take more space than expected. However both volumes are just huge compared to what I expected. Data are from the nodes obviously, and no other container are using these volumes. So the issue should come from the Polkadot and Kusama nodes.&#xD;&#xA;&#xD;&#xA;Here is the result of  ```docker system df -v``` :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Local Volumes space usage:&#xD;&#xA;&#xD;&#xA;VOLUME NAME                                                        LINKS     SIZE&#xD;&#xA;polkadot-node                                                      0         340.3GB&#xD;&#xA;kusama-node                                                        0         449.6GB&#xD;&#xA;766d53de4186afe3fd9e9ccd8749bce3747a8e806638eac319d023b1b38be30b   0         4.803kB&#xD;&#xA;0086e5137317bd84b06145a8c61efac31071c195aecb0127bd8520fbc367d441   0         4.803kB&#xD;&#xA;a1f9e73a691743af61386d5d52bf816c21e8f7ae39c8972647cb67d66f3a41eb   1         205.7MB&#xD;&#xA;&#xD;&#xA;Build cache usage: 0B&#xD;&#xA;&#xD;&#xA;CACHE ID   CACHE TYPE   SIZE      CREATED   LAST USED   USAGE     SHARED&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here are the docker-compose files for both nodes (other services omitted), the only difference is that everything named &quot;kusama&quot; can be replaced by &quot;polkadot&quot; :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;version: &quot;3.8&quot;&#xD;&#xA;services: &#xD;&#xA;    kusama-node: &#xD;&#xA;        image: parity/polkadot:latest&#xD;&#xA;        volumes:&#xD;&#xA;            - kusama-node:/data&#xD;&#xA;        container_name: kusama-node&#xD;&#xA;        command: '--name &quot;CrommVardekNode&quot; --chain kusama --unsafe-ws-external --pruning archive --rpc-cors=all --base-path /data/polkadot --wasm-execution Compiled'&#xD;&#xA;        ports:&#xD;&#xA;            - &quot;127.0.1.1:30333:30333&quot;&#xD;&#xA;        networks:&#xD;&#xA;            - kusama&#xD;&#xA;&#xD;&#xA;networks:&#xD;&#xA;    kusama:&#xD;&#xA;        external: true&#xD;&#xA;&#xD;&#xA;volumes:&#xD;&#xA;  kusama-node:&#xD;&#xA;    external: true&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Why do the volumes take so much disk space ? (Note, the nodes were not even completely synced (about 90%))&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7647" PostHistoryTypeId="1" PostId="2051" RevisionGUID="1c3fcbc6-3304-4b00-b29a-4a4557b7fc09" CreationDate="2022-04-22T10:25:08.070" UserId="151" Text="Polkadot archive node running on docker uses a lot of space" ContentLicense="CC BY-SA 4.0" />
  <row Id="7648" PostHistoryTypeId="3" PostId="2051" RevisionGUID="1c3fcbc6-3304-4b00-b29a-4a4557b7fc09" CreationDate="2022-04-22T10:25:08.070" UserId="151" Text="|polkadot|kusama|nodes|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7649" PostHistoryTypeId="2" PostId="2052" RevisionGUID="8008164a-cf46-4949-9e02-c7280846a5aa" CreationDate="2022-04-22T10:48:02.330" UserId="45" Text="I assume that you have a BABE+GRANDPA chain in mind.&#xD;&#xA;&#xD;&#xA;This may be not trivial since GRANDPA, the part of the consensus protocol that is responsible for finalization, works asynchronously and also different nodes can have different views on it.&#xD;&#xA;&#xD;&#xA;Because of that there is no such a host function that a pallet can call in the Substrate Client to ask such info. It would plainly be non-deterministic.&#xD;&#xA;&#xD;&#xA;A block producer may include an inherent which says what was the finalized block at the time of the block creation. If done naively, however, nothing prevents block producers to cheat and put anything there.&#xD;&#xA;&#xD;&#xA;Theoretically, the block producer may submit GRANDPA proofs on-chain where they are checked. This should solve the problem.&#xD;&#xA;&#xD;&#xA;Practically, however, I believe Substrate doesn't support that at the moment.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7651" PostHistoryTypeId="4" PostId="2045" RevisionGUID="6cda66f9-35c3-476e-a2eb-0493a0a6474d" CreationDate="2022-04-22T10:57:08.687" UserId="45" Comment="clarify title and add consensus tag" Text="Get last finalized block information from a pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="7652" PostHistoryTypeId="6" PostId="2045" RevisionGUID="6cda66f9-35c3-476e-a2eb-0493a0a6474d" CreationDate="2022-04-22T10:57:08.687" UserId="45" Comment="clarify title and add consensus tag" Text="|substrate-node|pallet|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7653" PostHistoryTypeId="24" PostId="2045" RevisionGUID="6cda66f9-35c3-476e-a2eb-0493a0a6474d" CreationDate="2022-04-22T10:57:08.687" Comment="Proposed by 45 approved by 2102 edit id of 167" ContentLicense="CC BY-SA 4.0" />
  <row Id="7654" PostHistoryTypeId="2" PostId="2053" RevisionGUID="f69dfc79-dae9-491f-a875-99bf9aa03449" CreationDate="2022-04-22T11:01:15.020" UserId="2395" Text="I am querying extrinsic data and I am able to fetch gasLimit and gasPrice out of Extrinsic.method.args.How do I fetch the gasUsed from an Extrinsic object. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7656" PostHistoryTypeId="1" PostId="2053" RevisionGUID="f69dfc79-dae9-491f-a875-99bf9aa03449" CreationDate="2022-04-22T11:01:15.020" UserId="2395" Text="How to find out the gas Consumed from a extrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="7657" PostHistoryTypeId="3" PostId="2053" RevisionGUID="f69dfc79-dae9-491f-a875-99bf9aa03449" CreationDate="2022-04-22T11:01:15.020" UserId="2395" Text="|polkadot-js|polkadot-js-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7658" PostHistoryTypeId="52" PostId="2032" RevisionGUID="ee7b26a7-da70-41c7-a610-f928b94b93d2" CreationDate="2022-04-22T11:35:34.033" />
  <row Id="7659" PostHistoryTypeId="5" PostId="2047" RevisionGUID="3663306c-23ba-4855-af08-b881bc3f8ff6" CreationDate="2022-04-22T12:03:35.313" UserId="1950" Comment="added 4 characters in body" Text="I have configured the staking pallet in the Substrate node template and tried to add it to the Cargo.toml in Run time &#xD;&#xA;Then it ended up in the following error when building&#xD;&#xA;This happens if I add any pallets to the cargo toml &#xD;&#xA;&#xD;&#xA;What should be the fix for this ?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;pallet-stakingt = { version = &quot;0.0.1&quot;, default-features = false, path = &quot;../pallets/staking&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.6/src/lib.rs:235:9&#xD;&#xA;      |&#xD;&#xA;  235 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  236 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  237 | |                         For more information see: \&#xD;&#xA;  238 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.6/src/lib.rs:262:5&#xD;&#xA;      |&#xD;&#xA;  262 |     imp::getrandom_inner(dest)&#xD;&#xA;      |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7660" PostHistoryTypeId="2" PostId="2054" RevisionGUID="d6b98336-7eb0-4b61-ae3d-4882687c9205" CreationDate="2022-04-22T12:34:01.267" UserId="45" Text="This error may indicate that you are trying to compile the code for the `wasm32-unknown-unknown` platform and at the same time passing the `std` feature.&#xD;&#xA;&#xD;&#xA;The `std` feature is supposed to be passed **only** when building for the host platform, i.e. for you laptop or server which likely runs *nix/macOS or Windows. &#xD;&#xA;&#xD;&#xA;Is there a chance that that's the case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7662" PostHistoryTypeId="2" PostId="2055" RevisionGUID="46cb1b1e-608d-485f-bf48-5adbe79b5053" CreationDate="2022-04-22T12:59:45.360" UserId="523" Text="The main difference should be `reserve` vs `Teleport`. reserve transfer require asset backup in sovereign account while `Teleport` not" ContentLicense="CC BY-SA 4.0" />
  <row Id="7664" PostHistoryTypeId="5" PostId="2055" RevisionGUID="2e5c3572-14ef-403b-a41a-5e56973b29b9" CreationDate="2022-04-22T13:04:46.120" UserId="523" Comment="deleted 2 characters in body" Text="The main difference should be `reserve` vs `Teleport`. Reserve transfer require asset backup in sovereign account while Teleport not" ContentLicense="CC BY-SA 4.0" />
  <row Id="7665" PostHistoryTypeId="2" PostId="2056" RevisionGUID="db7c013c-9b15-4c5a-bd5b-f60e2af33b52" CreationDate="2022-04-22T13:24:47.500" UserId="139" Text="I've learned that babe chains, when all validators go offline, stalls and isn't recoverable. But my question is, from a database perspective we have the data in the chainstate folders right? So wouldn't it be possible to do something to &quot;resurrect&quot; a chain? " ContentLicense="CC BY-SA 4.0" />
  <row Id="7667" PostHistoryTypeId="1" PostId="2056" RevisionGUID="db7c013c-9b15-4c5a-bd5b-f60e2af33b52" CreationDate="2022-04-22T13:24:47.500" UserId="139" Text="Is it possible to resurrect babe chains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7668" PostHistoryTypeId="3" PostId="2056" RevisionGUID="db7c013c-9b15-4c5a-bd5b-f60e2af33b52" CreationDate="2022-04-22T13:24:47.500" UserId="139" Text="|babe|stalled|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7671" PostHistoryTypeId="2" PostId="2058" RevisionGUID="bab49482-e59f-491b-bad5-57ff945df33c" CreationDate="2022-04-22T13:56:40.140" UserId="2102" Text="If you are using the Polkadot API, you need to check the Contract section (https://polkadot.js.org/docs/api-contract/start/contract.read/):&#xD;&#xA;```js&#xD;&#xA;const { gasConsumed, result, output } = await contract.query.get(alicePair.address, { value, gasLimit });&#xD;&#xA;```&#xD;&#xA;Interacting with your contract (querying or executing functions) will return information like the gasConsumed in the execution, as shown above." ContentLicense="CC BY-SA 4.0" />
  <row Id="7673" PostHistoryTypeId="5" PostId="2056" RevisionGUID="abb41a50-8026-4639-ae9d-bee3e7dc3812" CreationDate="2022-04-22T14:03:14.723" UserId="452" Comment="deleted 1 character in body; edited tags" Text="I've learned that babe chains, when all validators go offline, stalls and isn't recoverable. But my question is, from a database perspective we have the data in the chainstate folders right? So wouldn't it be possible to do something to &quot;resurrect&quot; a chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7674" PostHistoryTypeId="6" PostId="2056" RevisionGUID="abb41a50-8026-4639-ae9d-bee3e7dc3812" CreationDate="2022-04-22T14:03:14.723" UserId="452" Comment="deleted 1 character in body; edited tags" Text="|consensus|babe|stalled|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7675" PostHistoryTypeId="2" PostId="2059" RevisionGUID="e044686c-ced5-4d29-a08a-40f3ca28fb9b" CreationDate="2022-04-22T14:04:20.080" UserId="452" Text="We do have the data of the current chain state but we are still bound by the rules that are set in the runtime, one of the current rules is that the BABE pallet assumes that there will be at least one block per epoch. Unless you somehow change the runtime (which you can't do without producing blocks), it is hard to get around this. Currently the only approach to recover from this situation is to &quot;wind back&quot; the local clock and produce blocks in the past so that they are accepted by the runtime. This is a manual and convoluted process, something that we do not want to inflict on our users (there are some pieces of advice on it here: https://github.com/paritytech/substrate/issues/4464).&#xD;&#xA;&#xD;&#xA;That said, the end goal is to remove this limitation by allowing BABE to skip epochs entirely, i.e. if we were offline for 2 epochs then we would skip from epoch 2 to 4 when the validators come back online. This would still have security implications since the security model of BABE assumes protocol liveness (otherwise we don't collect entropy from the VRFs), but it would make this error go away for good." ContentLicense="CC BY-SA 4.0" />
  <row Id="7677" PostHistoryTypeId="2" PostId="2060" RevisionGUID="2f6ff680-7040-4fb4-8dc9-eb0add5360d0" CreationDate="2022-04-22T14:04:59.350" UserId="2107" Text="I'm currently looking for a way to deploy the blockchain I'm working on and it has been a struggle to find out the best practices for doing so. The chain is based on the substrate-node-template but it adds the contracts pallet. My goal is to have the node running as a validator on a cloud provider. The biggest problem I have currently is finding resources on how to properly handle the keys generation and management. &#xD;&#xA;&#xD;&#xA;This is my first time ever trying to deploy something like this, so maybe my questions don't make any sense. But there are quite a few things that are not yet clear for me. For example:&#xD;&#xA;&#xD;&#xA;- How many key-pairs do I need to have when running the node? Only the session keys? or do I need controller and stash keys as well? ([Polkadot wiki for reference](https://wiki.polkadot.network/docs/learn-keys))&#xD;&#xA;- How should these keys be generated? I know I can use [Subkey](https://docs.substrate.io/v3/tools/subkey/) to generate them, but when (during vs prior to deployment) and where (locally vs cloud) should that be done?&#xD;&#xA;- Is it considered a bad practice to have the keys stored in the computer running the node?&#xD;&#xA;&#xD;&#xA;Anyway, I'd appreciate if someone could explain me the steps necessary to have this all done in the proper way. I haven't found many resources online about deploying standalone substrate chains, mostly it regards deploying them as parachains." ContentLicense="CC BY-SA 4.0" />
  <row Id="7679" PostHistoryTypeId="1" PostId="2060" RevisionGUID="2f6ff680-7040-4fb4-8dc9-eb0add5360d0" CreationDate="2022-04-22T14:04:59.350" UserId="2107" Text="How to deploy a production-ready standalone blockchain using substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7680" PostHistoryTypeId="3" PostId="2060" RevisionGUID="2f6ff680-7040-4fb4-8dc9-eb0add5360d0" CreationDate="2022-04-22T14:04:59.350" UserId="2107" Text="|substrate-node|nodes|security|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7681" PostHistoryTypeId="2" PostId="2061" RevisionGUID="19c6466e-062c-4309-b334-68c0cb0fe8ac" CreationDate="2022-04-22T14:20:43.767" UserId="411" Text="The following nodes are Subsocial parachain nodes. We use `polkadot-v0.9.16` as our dependencies version. Gonna upgrade soon, but we need to solve the collators issues before.&#xD;&#xA;&#xD;&#xA;Occasionally some of the nodes lose their peers or just stop syncing new blocks.&#xD;&#xA;&#xD;&#xA;It looks like that on telemetry:&#xD;&#xA;[![Polkadot telemetry page screenshot][1]][1]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After some explorations done, I saw no specific issues or errors on the &quot;broken&quot; node. &#xD;&#xA;&#xD;&#xA;Here's the `RUST_LOG=runtime=debug` logs output:&#xD;&#xA;&#xD;&#xA;```log&#xD;&#xA;2022-04-22 13:55:18.492  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #12365417 (0x9848…0e07)    &#xD;&#xA;2022-04-22 13:55:21.710  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (31 peers), best: #12365417 (0x9848…0e07), finalized #12365412 (0x7a5a…b415), ⬇ 808.5kiB/s ⬆ 481.4kiB/s    &#xD;&#xA;2022-04-22 13:55:21.763  INFO tokio-runtime-worker substrate: [Parachain] ⚙️  Syncing  0.0 bps, target=#368643 (5 peers), best: #368529 (0xb918…6868), finalized #368529 (0xb918…6868), ⬇ 1.6kiB/s ⬆ 1.6kiB/s    &#xD;&#xA;2022-04-22 13:55:23.057  WARN tokio-runtime-worker parachain::collator-protocol: [Relaychain] No validators assigned to our core.&#xD;&#xA;2022-04-22 13:55:24.380  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #12365418 (0x6d22…522c)    &#xD;&#xA;2022-04-22 13:55:24.391  WARN tokio-runtime-worker parachain::collator-protocol: [Relaychain] No validators assigned to our core.&#xD;&#xA;2022-04-22 13:55:26.739  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (31 peers), best: #12365418 (0x6d22…522c), finalized #12365415 (0xd50a…0100), ⬇ 313.3kiB/s ⬆ 474.4kiB/s    &#xD;&#xA;2022-04-22 13:55:26.765  INFO tokio-runtime-worker substrate: [Parachain]  Idle (3 peers), best: #368529 (0xb918…6868), finalized #368529 (0xb918…6868), ⬇ 0.5kiB/s ⬆ 0.7kiB/s    &#xD;&#xA;2022-04-22 13:55:26.949  WARN tokio-runtime-worker parachain::collator-protocol: [Relaychain] No validators assigned to our core.&#xD;&#xA;2022-04-22 13:55:30.482  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #12365419 (0xcada…7490)    &#xD;&#xA;2022-04-22 13:55:31.754  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (31 peers), best: #12365419 (0xcada…7490), finalized #12365416 (0x0b97…f2bd), ⬇ 600.3kiB/s ⬆ 677.1kiB/s    &#xD;&#xA;2022-04-22 13:55:31.766  INFO tokio-runtime-worker substrate: [Parachain]  Idle (3 peers), best: #368529 (0xb918…6868), finalized #368529 (0xb918…6868), ⬇ 0.8kiB/s ⬆ 0.8kiB/s    &#xD;&#xA;2022-04-22 13:55:36.518  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #12365420 (0x5784…6499)    &#xD;&#xA;2022-04-22 13:55:36.767  INFO tokio-runtime-worker substrate: [Parachain]  Idle (3 peers), best: #368529 (0xb918…6868), finalized #368529 (0xb918…6868), ⬇ 0.5kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-04-22 13:55:36.773  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (31 peers), best: #12365420 (0x5784…6499), finalized #12365416 (0x0b97…f2bd), ⬇ 204.3kiB/s ⬆ 286.7kiB/s    &#xD;&#xA;2022-04-22 13:55:36.854  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #12365420 (0x1313…b17d)    &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Sometimes we can see output like this as well:&#xD;&#xA;&#xD;&#xA;```log&#xD;&#xA;2022-04-22 14:06:56.691  WARN tokio-runtime-worker parachain::runtime-api: [Relaychain] cannot query the runtime API version: UnknownBlock: State already discarded for BlockId::Hash(0x0914c22e73613d1fc07c37b81cc487f321dbfa4193cca6ad4b6675872118469b)&#xD;&#xA;2022-04-22 14:06:56.695  WARN tokio-runtime-worker parachain::collator-protocol: [Relaychain] Failed to handle incoming network message err=NonFatal(Runtime(RuntimeRequest(NotSupported { runtime_api_name: &quot;availability_cores&quot; })))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rYHBN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7683" PostHistoryTypeId="1" PostId="2061" RevisionGUID="19c6466e-062c-4309-b334-68c0cb0fe8ac" CreationDate="2022-04-22T14:20:43.767" UserId="411" Text="Parachain nodes become idle" ContentLicense="CC BY-SA 4.0" />
  <row Id="7684" PostHistoryTypeId="3" PostId="2061" RevisionGUID="19c6466e-062c-4309-b334-68c0cb0fe8ac" CreationDate="2022-04-22T14:20:43.767" UserId="411" Text="|parachain|kusama|parachain-collator|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7685" PostHistoryTypeId="2" PostId="2062" RevisionGUID="adca0bed-1ac3-4760-94ab-71a06fdfc09a" CreationDate="2022-04-22T14:42:54.677" UserId="582" Text="[From Shawn Tabrizi Answer][1]&#xD;&#xA;&#xD;&#xA;&gt; An account's locked balance is another abstraction over it's free&#xD;&#xA;&gt; balance. In this case, it is a certain amount that is locked from&#xD;&#xA;&gt; withdrawing for a certain reason.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The different withdraw reasons are:&#xD;&#xA;&gt; &#xD;&#xA;&gt; * Transaction Payment: In order to pay for (system) transaction costs.&#xD;&#xA;&gt; * Transfer: In order to transfer ownership.&#xD;&#xA;&gt; * Reserve: In order to reserve some funds for a later return or repatriation.&#xD;&#xA;&gt; * Fee: In order to pay some other (higher-level) fees.&#xD;&#xA;&gt;&#xD;&#xA;&gt; So if an account has a lock for 100 units with WithdrawReasons::Transfer, it&#xD;&#xA;&gt; cannot make a transfer which brings its free balance lower than 100&#xD;&#xA;&gt; units. However, this account will be able to perform another operation&#xD;&#xA;&gt; like reserve taking its free balance below 100 units. A lock can have&#xD;&#xA;&gt; multiple reasons associated with it, in which case, those funds can&#xD;&#xA;&gt; only be spent for the other reasons.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Multiple different locks can be placed on an account, but these locks&#xD;&#xA;&gt; overlay one another rather than stack. This means that if an account&#xD;&#xA;&gt; has 3 locks for 100 units, the account can spend it's funds for any&#xD;&#xA;&gt; reason down to 100 units, at which point the locks will start to come&#xD;&#xA;&gt; into play.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/56418100/what-is-the-difference-between-free-balance-reserved-balance-locked-balance-v/56418101#56418101" ContentLicense="CC BY-SA 4.0" />
  <row Id="7687" PostHistoryTypeId="2" PostId="2063" RevisionGUID="2a7cc5d4-209b-453a-bb5a-8b1a06bf2a9f" CreationDate="2022-04-22T15:52:23.320" UserId="174" Text="With the release of [Asynchronous Backing][1], a good performance increase is expected ([lower block time, increased block weight][2]). &#xD;&#xA;&#xD;&#xA;Which further efforts are being undertaken with regards to Polkadot scalability? &#xD;&#xA;&#xD;&#xA;From [@alexander-theißen][3], I learned that:&#xD;&#xA;* At the pallet-contracts layer, there's work done on: [code merkelization][4], [user space gas metering][5], [using register based byte code for wasmi][6], [maybe a switch to a jit compiler][7], [speeding up validation and instrumentation][8].&#xD;&#xA;* At the FRAME-level, there's work to reduce the weights of all kind of extrinsics &#xD;&#xA;* On the protocol level there seems to be something like &quot;nested parachains&quot; being developed. &#xD;&#xA;&#xD;&#xA;I'd love to learn more about the scalability efforts. Further links and resources would be much welcomed. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/issues/3779&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1588/will-asynchronous-backing-increase-the-available-block-weight&#xD;&#xA;  [3]: https://substrate.stackexchange.com/users/16/alexander-thei%C3%9Fen&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/issues/9431&#xD;&#xA;  [5]: https://github.com/paritytech/wasm-instrument/issues/11&#xD;&#xA;  [6]: https://github.com/paritytech/wasmi/pull/367&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/issues/10298&#xD;&#xA;  [8]: https://github.com/paritytech/wasm-instrument/issues/3" ContentLicense="CC BY-SA 4.0" />
  <row Id="7689" PostHistoryTypeId="1" PostId="2063" RevisionGUID="2a7cc5d4-209b-453a-bb5a-8b1a06bf2a9f" CreationDate="2022-04-22T15:52:23.320" UserId="174" Text="Scalability beyond Asynchronous Backing" ContentLicense="CC BY-SA 4.0" />
  <row Id="7690" PostHistoryTypeId="3" PostId="2063" RevisionGUID="2a7cc5d4-209b-453a-bb5a-8b1a06bf2a9f" CreationDate="2022-04-22T15:52:23.320" UserId="174" Text="|runtime|frame|relay-chain|performance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7691" PostHistoryTypeId="2" PostId="2064" RevisionGUID="3a8b1dbc-ccfa-4150-8884-ade537830b1c" CreationDate="2022-04-22T16:23:53.660" UserId="85" Text="What's the best way to get set up and start developing dapps on Moonbeam?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7693" PostHistoryTypeId="1" PostId="2064" RevisionGUID="3a8b1dbc-ccfa-4150-8884-ade537830b1c" CreationDate="2022-04-22T16:23:53.660" UserId="85" Text="How do I get started developing dapps on Moonbeam and Moonriver?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7694" PostHistoryTypeId="3" PostId="2064" RevisionGUID="3a8b1dbc-ccfa-4150-8884-ade537830b1c" CreationDate="2022-04-22T16:23:53.660" UserId="85" Text="|moonbeam|moonriver|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7696" PostHistoryTypeId="2" PostId="2065" RevisionGUID="ab6b709b-5fab-40ad-974c-0a1ad194bb8f" CreationDate="2022-04-22T16:23:53.660" UserId="85" Text="The newly announced Moonbeam academy is free and available here:&#xD;&#xA;&#xD;&#xA;https://academy.moonbeam.network/ and is also available in [Chinese][1]. (Not all modules are translated yet)&#xD;&#xA;&#xD;&#xA;The Moonbuilders course curriculum includes a welcome lesson to prepare participants with background knowledge about Substrate, Polkadot, and Moonbeam. There are eight lessons beginning with education about the ecosystem itself and moving toward the application of developer tools like Remix, Solidity, Truffle, and Hardhat. The course provides guided opportunities to test skills and experiment with Web 3 applications, including Ethers.js, price feeds, precompiles, and building a staking DAO. More content will be added soon to cover Moonbeam technology updates and new integrations in the ecosystem.&#xD;&#xA;&#xD;&#xA;[Read the official announcement][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://moonbeam-china.teachable.com/p/moonbeam-v2-0&#xD;&#xA;  [2]: https://moonbeam.network/blog/moonbuilders-academy-is-now-open/" ContentLicense="CC BY-SA 4.0" />
  <row Id="7698" PostHistoryTypeId="2" PostId="2066" RevisionGUID="a375f484-71d8-4212-aac0-a1811073db7a" CreationDate="2022-04-22T16:28:55.667" UserId="85" Text="It's pulling in two substrate versions at once. Substrate is not mix and match - you only ever want one version of substrate in your Cargo.lock file.&#xD;&#xA;&#xD;&#xA;Try `rev=&quot;580ebae1&quot;` on your `pallet-contracts` crate imports so that your importing the same version of substrate (otherwise I think it will just take latest master which is likely conflicting wtih the one you have brought in. Alternatively, `cargo update -p sp-io` should upgrade the locked substrate version to the latest master. Hope this helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="7700" PostHistoryTypeId="2" PostId="2067" RevisionGUID="70cba025-aeed-4cd9-aae3-38995d4b55bc" CreationDate="2022-04-22T16:44:17.883" UserId="85" Text="For production ready I think the best guide is probably to crib as much of the [validator setup][1] as possible. This is designed to set you up with best security practices. (In fact I would read everything under the &quot;Validator Guides&quot; section as a lot of it is transferable)&#xD;&#xA;&#xD;&#xA;In particular I would point you towards the [suggested reference setup][2] with ansible and terraform prepared for you. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot&#xD;&#xA;  [2]: https://github.com/w3f/polkadot-validator-setup" ContentLicense="CC BY-SA 4.0" />
  <row Id="7702" PostHistoryTypeId="2" PostId="2068" RevisionGUID="1af36755-f5c6-485e-b2e9-eb86dbd39ac4" CreationDate="2022-04-22T17:03:09.627" UserId="85" Text="This is a dupe of:&#xD;&#xA;https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm/38#38 , but the TL/DR is:&#xD;&#xA;&#xD;&#xA; - Teleport Assets: They mint new assets on the dest chain and TRUST that the source chain really did burn them. ([Diagram][1])&#xD;&#xA; - Reserve Transfer: Some assets on an agreed reserve chain (E.g. statemint) are moved from your chain's account to their chain's account and then their chain will likely mint the beneficiary some IOUs on the dest chain to represent the money (that actually never leaves the reserve chain). ([Diagram][2]) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.figma.com/file/EIebkEmJro91Q33HH9V2p2/XCM-Teleport?node-id=0%3A1&#xD;&#xA;  [2]: https://www.figma.com/file/9WoqPIRBv2zh23yt8LGU0c/XCM-Transfer-Reserve-Asset?node-id=0%3A1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7704" PostHistoryTypeId="2" PostId="2069" RevisionGUID="7991b434-cecd-4e66-a76c-8857ed173a18" CreationDate="2022-04-22T19:48:25.450" UserId="29" Text="[![contractsCall][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HkyWM.png&#xD;&#xA;&#xD;&#xA;*Click the image for better resolution*&#xD;&#xA;&#xD;&#xA;With a contracts call extrinsic there will be an associated event `balances.Withdraw` where you can deduce the gas consumed. You may want to look at using an [indexer](https://substrate.stackexchange.com/questions/35/is-there-a-good-indexer-for-substrate-chains-like-the-graph)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7706" PostHistoryTypeId="5" PostId="2053" RevisionGUID="d66ecd4b-d528-4aa4-9e6c-2b5b5797c332" CreationDate="2022-04-22T20:12:36.113" UserId="29" Comment="added 7 characters in body; edited title" Text="I am querying extrinsic data and I am able to fetch `gasLimit` and `gasPrice` out of Extrinsic.method.args. How do I fetch the `gasUsed` from an Extrinsic object. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7707" PostHistoryTypeId="4" PostId="2053" RevisionGUID="d66ecd4b-d528-4aa4-9e6c-2b5b5797c332" CreationDate="2022-04-22T20:12:36.113" UserId="29" Comment="added 7 characters in body; edited title" Text="How do I find the gas consumed by a contracts extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7708" PostHistoryTypeId="2" PostId="2070" RevisionGUID="2deea2e7-8d84-4c11-b972-e5e3f2e6b788" CreationDate="2022-04-22T20:26:34.263" UserId="29" Text="The [wiki](https://wiki.polkadot.network/docs/maintain-sync) says that it was  15 to 20GB around Kusama's 1.6 millionth block.&#xD;&#xA;&#xD;&#xA;Kusama is now at &gt; 12 million blocks.&#xD;&#xA;&#xD;&#xA;Taken from the [docs](https://wiki.polkadot.network/docs/build-node-management#basic-node-operations):&#xD;&#xA;&#xD;&#xA;&gt; **Archive node**&#xD;&#xA;&gt;&#xD;&#xA;&gt;An archive node **does not prune any block or state data.** Use the --pruning archive flag. Certain types of nodes like validators must run in archive mode. Likewise, all events are cleared from state in each block, so **if you want to store events** then **you will need an archive node.**" ContentLicense="CC BY-SA 4.0" />
  <row Id="7710" PostHistoryTypeId="5" PostId="2069" RevisionGUID="ada03502-2216-46b5-9bd4-24a903c6fe08" CreationDate="2022-04-22T20:58:06.243" UserId="29" Comment="added 61 characters in body" Text="[![contractsCall][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HkyWM.png&#xD;&#xA;&#xD;&#xA;*Click the image for better resolution*&#xD;&#xA;&#xD;&#xA;With a contracts call extrinsic there will be an associated event `balances.Withdraw` where you can deduce the [gas consumed](https://docs.substrate.io/v3/runtime/smart-contracts/#gas). You may want to look at using an [indexer](https://substrate.stackexchange.com/questions/35/is-there-a-good-indexer-for-substrate-chains-like-the-graph)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7711" PostHistoryTypeId="2" PostId="2071" RevisionGUID="020212e6-9cad-4c4f-b76d-8165f27e1c8d" CreationDate="2022-04-22T21:10:42.020" UserId="481" Text="when running nodes with `--pruning=archive`, there is sadly no silver bullet that will free up space for you -- you are specifying to keep all state data from block 0, and that slowly grows. The space listed for kusama and polkadot seems about right.&#xD;&#xA;&#xD;&#xA;I'd be curious to hear why you need to use the archive flag, running without it definitely saves space and works for most use-cases" ContentLicense="CC BY-SA 4.0" />
  <row Id="7713" PostHistoryTypeId="52" PostId="2056" RevisionGUID="d8c76dc2-6e2b-418a-98d2-ea99ee2f7520" CreationDate="2022-04-22T21:27:47.433" />
  <row Id="7714" PostHistoryTypeId="2" PostId="2072" RevisionGUID="898aa4be-5754-483c-881e-f139ef56f17a" CreationDate="2022-04-22T22:00:01.450" UserId="16" Text="Gas and weight are one and the same concept when it comes to pallet-contracts. We merely kept the name gas for historic reasons. The gas limit you supply to the `contracts.call` extrinsic directly influences the weight of the extrinsic (1to1 translation).&#xD;&#xA;&#xD;&#xA;So what you want to index is the `system.ExtrinsicSuccess` or `system.ExtrinsicFailed` event emitted by the `contracts.call` exrinsic. It contains a `weight` field which tells you the overall weight of the extrinsic. This is essentially the gas that was consumed + static overhead of the extrinsic.&#xD;&#xA;&#xD;&#xA;I think things get clearer when you look at the [weight annotation of the `call` extrinsic](https://github.com/paritytech/substrate/blob/662598908902ec8879fcd6a950324ef6735ea1f6/frame/contracts/src/lib.rs#L358):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(T::WeightInfo::call().saturating_add(*gas_limit))]&#xD;&#xA;pub fn call() { ... }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7716" PostHistoryTypeId="2" PostId="2073" RevisionGUID="cda2d980-f9c7-469f-922e-c25f4d707727" CreationDate="2022-04-22T22:05:46.543" UserId="2399" Text="- What's the practical learning path for async / in-own-pace learning?&#xD;&#xA;- Or what's the recommended &quot;live&quot; learning path (bootcamps, etc.)?&#xD;&#xA;- Any concrete resources to use for self learning? There seem to be a lot of resources and it would take time to explore each of them. Maybe someone knows the resources that helped them to get onboarded easily?&#xD;&#xA;&#xD;&#xA;Any type of guidance is highly appreciated!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7718" PostHistoryTypeId="1" PostId="2073" RevisionGUID="cda2d980-f9c7-469f-922e-c25f4d707727" CreationDate="2022-04-22T22:05:46.543" UserId="2399" Text="Any guidance for the developers that are new to Polkadot/Substrate stack?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7719" PostHistoryTypeId="3" PostId="2073" RevisionGUID="cda2d980-f9c7-469f-922e-c25f4d707727" CreationDate="2022-04-22T22:05:46.543" UserId="2399" Text="|learning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7720" PostHistoryTypeId="6" PostId="2053" RevisionGUID="40b444b2-4983-406c-827b-342b0e59e7c6" CreationDate="2022-04-22T22:09:22.977" UserId="16" Comment="edited tags" Text="|smart-contract|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7722" PostHistoryTypeId="5" PostId="2069" RevisionGUID="baada061-20a2-48dc-9515-389502333dd2" CreationDate="2022-04-22T22:35:22.267" UserId="29" Comment="deleted 1 character in body" Text="[![contractsCall][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HkyWM.png&#xD;&#xA;&#xD;&#xA;*Click the image for better resolution*&#xD;&#xA;&#xD;&#xA;With a contracts call extrinsic there will be an associated event `ExtrinsicSuccess` where you can deduce the [gas consumed](https://docs.substrate.io/v3/runtime/smart-contracts/#gas). You may want to look at using an [indexer](https://substrate.stackexchange.com/questions/35/is-there-a-good-indexer-for-substrate-chains-like-the-graph)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7723" PostHistoryTypeId="2" PostId="2074" RevisionGUID="e1a3b0b4-7852-49e6-a171-fb492f20a4fa" CreationDate="2022-04-23T00:10:19.987" UserId="283" Text="We have a number of protocol updates that will help improve scalability at the protocol level.&#xD;&#xA;&#xD;&#xA;Torrent-style fetching of PoVs: https://github.com/paritytech/polkadot/issues/3307 . This includes a &quot;PreVF&quot; mechanism that can be used to prove light client validity of a parachain header to a validator, which it can then use to participate in torrent-style networking to download the PoV (the Proof-of-Validity). Faster PoV downloads/uploads means more data and more time spent executing - higher throughput.&#xD;&#xA;&#xD;&#xA;&quot;Fat availability cores&quot;: https://github.com/paritytech/polkadot/issues/4951&#xD;&#xA;&#xD;&#xA;This is an extension to asynchronous backing that allows parachains to progress faster than the relay-chain by having more than one block pending availability at a time.&#xD;&#xA;&#xD;&#xA;&quot;Methods to avoid ever including parachain code in critical-path data&quot;: https://github.com/paritytech/polkadot/issues/3310 . This makes code upgrades for parachains cheaper and less likely to clog up the gossip network.&#xD;&#xA;&#xD;&#xA;There are also a lot of general engineering improvements (Wasm execution speed, database accesses, etc.) which will help with scalability.&#xD;&#xA;&#xD;&#xA;There are rough plans for Polkadot 2.0, which will involve nested relay chains or at least multiple relay chains sharing a validator-set. But nothing written or published yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="7725" PostHistoryTypeId="2" PostId="2075" RevisionGUID="dea736db-aead-4ecb-89df-ab3ba7a5a2eb" CreationDate="2022-04-23T05:40:39.180" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="7727" PostHistoryTypeId="1" PostId="2075" RevisionGUID="dea736db-aead-4ecb-89df-ab3ba7a5a2eb" CreationDate="2022-04-23T05:40:39.180" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7728" PostHistoryTypeId="1" PostId="2076" RevisionGUID="5da52557-69c8-4350-975a-2377e13534af" CreationDate="2022-04-23T05:40:39.180" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7730" PostHistoryTypeId="2" PostId="2076" RevisionGUID="5da52557-69c8-4350-975a-2377e13534af" CreationDate="2022-04-23T05:40:39.180" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="7731" PostHistoryTypeId="2" PostId="2077" RevisionGUID="c7198ad0-8ed9-4243-996b-04d54cef6bbb" CreationDate="2022-04-23T06:28:11.210" UserId="2363" Text="I want to get the bool value from the flipper contract. I use Rust and subxt. But I cannot convert it to a primitive type.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    let value: bool = api&#xD;&#xA;        .metadata()&#xD;&#xA;        .pallet(&quot;test_contract&quot;)&#xD;&#xA;        .map_err(|err| ErrorInternalServerError(err))?&#xD;&#xA;        .storage(&quot;value&quot;)&#xD;&#xA;        .map_err(|err| ErrorInternalServerError(err))?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have tried the `conv` and `into` methods. Also the `decode` but no luck. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7733" PostHistoryTypeId="1" PostId="2077" RevisionGUID="c7198ad0-8ed9-4243-996b-04d54cef6bbb" CreationDate="2022-04-23T06:28:11.210" UserId="2363" Text="Fetch storage data and convert it to primitive types with subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="7734" PostHistoryTypeId="3" PostId="2077" RevisionGUID="c7198ad0-8ed9-4243-996b-04d54cef6bbb" CreationDate="2022-04-23T06:28:11.210" UserId="2363" Text="|rust|smart-contract|subxt|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7735" PostHistoryTypeId="2" PostId="2078" RevisionGUID="92175fc9-f1be-4065-8e93-06819ce1da94" CreationDate="2022-04-23T07:23:04.607" UserId="1810" Text="We expect careful benchmarking work to expose many further optimizations, which falls under rob's &quot;general engineering improvements&quot;.&#xD;&#xA;&#xD;&#xA;We've experimental low level ideas, like I suspect QUIC would improve networking performance somewhat, which requires either developing nQUIC or else using TLS 1.3.&#xD;&#xA;&#xD;&#xA;XCMP shall permit far more messages than XCM, because transport happens off-chain.&#xD;&#xA;&#xD;&#xA;We've &quot;whole block optimizations&quot; which typically also help resist MEV.  These come in cryptographic flavors like [Schnorr half-aggregation][1] or [SnarkPack][2] but also non-cryptographic ones, like doing uniswaps with all buys &amp; sell in a block receiving the same common price, thus making the tx commutative &amp; thread friendly.&#xD;&#xA;&#xD;&#xA;We'll move heavy relay chain functionality onto parachains, what we call system parahreads.&#xD;&#xA;&#xD;&#xA;Sassafras permits removing memepools, which saves busy parachains considerable CPU time.&#xD;&#xA;&#xD;&#xA;We'll do multiple relay chains eventually.  It'll resemble [OmniLedger][3], meaning it's an algorithm for shuffling validators between relay chains, for which the security analysis uses a stronger honest assumption and concentration bounds.  We think the OmniLedger analysis came out somewhat flawed however, so redoing it.. very slowly.&#xD;&#xA;&#xD;&#xA;  [1]: https://eprint.iacr.org/2022/222&#xD;&#xA;  [2]: https://eprint.iacr.org/2021/529&#xD;&#xA;  [3]: https://eprint.iacr.org/2017/406" ContentLicense="CC BY-SA 4.0" />
  <row Id="7737" PostHistoryTypeId="5" PostId="2077" RevisionGUID="37d6864b-8a30-4088-982e-3d44c6b726b9" CreationDate="2022-04-23T08:58:33.587" UserId="2363" Comment="added 807 characters in body" Text="I want to get the bool value from the flipper contract. I use Rust and subxt. But I cannot convert it to a primitive type.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    let value: bool = api&#xD;&#xA;        .metadata()&#xD;&#xA;        .pallet(&quot;test_contract&quot;)&#xD;&#xA;        .map_err(|err| ErrorInternalServerError(err))?&#xD;&#xA;        .storage(&quot;value&quot;)&#xD;&#xA;        .map_err(|err| ErrorInternalServerError(err))?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have tried the `conv` and `into` methods. Also the `decode` but no luck. &#xD;&#xA;The error I'm seeing is:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `bool: std::convert::From&lt;&amp;frame_metadata::v14::StorageEntryMetadata&lt;PortableForm&gt;&gt;` is not satisfied&#xD;&#xA;  --&gt; src/controllers/polkadot.rs:55:10&#xD;&#xA;   |&#xD;&#xA;55 |         .into();&#xD;&#xA;   |          ^^^^ the trait `std::convert::From&lt;&amp;frame_metadata::v14::StorageEntryMetadata&lt;PortableForm&gt;&gt;` is not implemented for `bool`&#xD;&#xA;   |&#xD;&#xA;   = help: the following implementations were found:&#xD;&#xA;             &lt;bool as std::convert::From&lt;core_foundation::boolean::CFBoolean&gt;&gt;&#xD;&#xA;             &lt;bool as std::convert::From&lt;parity_wasm::elements::primitives::VarUint1&gt;&gt;&#xD;&#xA;             &lt;bool as std::convert::From&lt;subtle::Choice&gt;&gt;&#xD;&#xA;   = note: required because of the requirements on the impl of `Into&lt;bool&gt;` for `&amp;frame_metadata::v14::StorageEntryMetadata&lt;PortableForm&gt;`&#xD;&#xA;```&#xD;&#xA;Also without into:&#xD;&#xA;```&#xD;&#xA;   = note: `?` operator cannot convert from `&amp;frame_metadata::v14::StorageEntryMetadata&lt;PortableForm&gt;` to `bool`&#xD;&#xA;   = note:   expected type `bool`&#xD;&#xA;           found reference `&amp;frame_metadata::v14::StorageEntryMetadata&lt;PortableForm&gt;`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7738" PostHistoryTypeId="2" PostId="2079" RevisionGUID="9876b6a2-f6a5-4281-a1f5-0b83067474ff" CreationDate="2022-04-23T09:11:49.087" UserId="183" Text="I'm wondering if there's any general instruction guidance when parachain block authoring is somehow stuck. I understand the relaychain network might need to do something to help parachain get out of the situation (e.g. clearing out the stuck blocks), but what should we do on the parachain side?&#xD;&#xA;&#xD;&#xA;The question originates from the situation where last week on rococo-parachain I have had a runtime upgrade which stopped the parachain blocks from being produced, the reason is unclear as the built wasm was tested OK on the staging testnet and the new wasm itself is just a trivial change to `baseCallFilter`. I have contacted the rococo admin to ask them to clean up the stuck block if possible. After that I'm still struggling to get the blocks authoring working (it worked once, but even then it started from block #0, so all the previous states were lost).&#xD;&#xA;&#xD;&#xA;Therefore I'm curious if there's any **guidance or handbook** to follow when such a situation happens. I understand the root cause behind it could be various, but maybe there's a more concrete and detailed procedure that we can do from parachain side (especially in production env), so that:&#xD;&#xA;- it preserves all the historical state&#xD;&#xA;- it can continue authoring blocks after the relaychain fixes the block&#xD;&#xA;&#xD;&#xA;The guidance could include things like:&#xD;&#xA;- DB backup and restore?&#xD;&#xA;- which parachain DB is safe to clear (collator/rpc node)?&#xD;&#xA;- what's the order of clearing and restarting the collator/rpc nodes usually?&#xD;&#xA;- How to debug if still no blocks can be produced?&#xD;&#xA;- ...&#xD;&#xA;&#xD;&#xA;If it's hard to list the steps to cover all cases, maybe some general principles would help too (DOs and DONTs). I highly appreciate any help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7740" PostHistoryTypeId="1" PostId="2079" RevisionGUID="9876b6a2-f6a5-4281-a1f5-0b83067474ff" CreationDate="2022-04-23T09:11:49.087" UserId="183" Text="General instructions after parachain block authoring is stuck" ContentLicense="CC BY-SA 4.0" />
  <row Id="7741" PostHistoryTypeId="3" PostId="2079" RevisionGUID="9876b6a2-f6a5-4281-a1f5-0b83067474ff" CreationDate="2022-04-23T09:11:49.087" UserId="183" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7742" PostHistoryTypeId="5" PostId="2079" RevisionGUID="a2594627-3bbe-4219-ab43-91305646f6da" CreationDate="2022-04-23T10:40:56.713" UserId="183" Comment="added 9 characters in body" Text="I'm wondering if there's any general instruction guidance when parachain block authoring is somehow stuck. I understand the relaychain network might need to do something to help parachain get out of the situation (e.g. clearing out the stuck blocks), but what should we do on the parachain side?&#xD;&#xA;&#xD;&#xA;The question originates from the situation where last week on rococo-parachain I have had a runtime upgrade which stopped the parachain blocks from being produced, the reason is unclear as the built wasm was tested OK on the staging testnet and the new wasm itself is just a trivial change to `baseCallFilter`. I have contacted the rococo admin to ask them to clean up the stuck block if possible. After that I'm still struggling to get the blocks authoring working (it worked once, but even then it started from block #0, so all the previous states were lost).&#xD;&#xA;&#xD;&#xA;Therefore I'm curious if there's any **guidance or handbook** to follow when such a situation happens. I understand the root cause behind it could be various, but maybe there's a more concrete and detailed procedure that we can do from parachain side (especially in production env), so that:&#xD;&#xA;- it preserves all the historical state&#xD;&#xA;- it can continue authoring blocks after the relaychain fixes the block&#xD;&#xA;&#xD;&#xA;The guidance could include things like:&#xD;&#xA;- DB backup and restore?&#xD;&#xA;- which parachain DB is safe to clear (collator/rpc/bootnode node)?&#xD;&#xA;- what's the order of clearing and restarting the collator/rpc nodes usually?&#xD;&#xA;- How to debug if still no blocks can be produced?&#xD;&#xA;- ...&#xD;&#xA;&#xD;&#xA;If it's hard to list the steps to cover all cases, maybe some general principles would help too (DOs and DONTs). I highly appreciate any help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="7743" PostHistoryTypeId="10" PostId="2073" RevisionGUID="8ea716a2-b5b6-4318-8f99-7a72980ac666" CreationDate="2022-04-23T10:41:35.220" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[1074],&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="7744" PostHistoryTypeId="52" PostId="2063" RevisionGUID="03efbc6e-3995-4a3d-b2bd-bcfec3d47a62" CreationDate="2022-04-23T11:22:23.603" />
  <row Id="7745" PostHistoryTypeId="2" PostId="2080" RevisionGUID="64ec51ac-1c7c-4118-ac91-f267e6937a6a" CreationDate="2022-04-23T13:48:02.980" UserId="183" Text="We are currently backing up our parachain DB on a daily base: `/path/to/db/full/`, I thought it can be used for recovery when the DB gets accidentally deleted/corrupted. But it seems that once the onchain state is newer than the backed-up DB, it can't be used anymore.&#xD;&#xA;&#xD;&#xA;The steps that I've done:&#xD;&#xA;1. start a 2 relaychain + 1 parachain node network, so this parachain node is the sole collator in this case&#xD;&#xA;2. assume the parachain runs to block #30, kill the parachain, make the backup (= copy the parachain-db folder to somewhere else)&#xD;&#xA;3. remove the parachain DB, restart parachain, the parachain will be stuck at #0 =&gt; `OK`&#xD;&#xA;4. stop parachain, replace the parachain DB with the backed-up one, restart parachain&#xD;&#xA;5. parachain will start from #30 and continues to produce blocks =&gt; `OK`&#xD;&#xA;6. wait until it runs to #40, stop parachain, remove the parachain DB (simulates that the DB gets accidentally deleted and we only have an older backup)&#xD;&#xA;7. restart parachain, it will be stuck at #0 =&gt; `OK`&#xD;&#xA;8. stop parachain, replace the parachain DB with the backed-up one, restart parachain&#xD;&#xA;9. parachain will be stuck at #30 and can't produce blocks anymore =&gt; `NOK`&#xD;&#xA;&#xD;&#xA;So it looks like that an older backup can not be used for recovery. Did I understand it correctly? If so what's the point of backing up DBs? Just for faster syncing for a newly launched node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7747" PostHistoryTypeId="1" PostId="2080" RevisionGUID="64ec51ac-1c7c-4118-ac91-f267e6937a6a" CreationDate="2022-04-23T13:48:02.980" UserId="183" Text="How to properly use backed-up DBs for parachain recovery?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7748" PostHistoryTypeId="3" PostId="2080" RevisionGUID="64ec51ac-1c7c-4118-ac91-f267e6937a6a" CreationDate="2022-04-23T13:48:02.980" UserId="183" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7749" PostHistoryTypeId="2" PostId="2081" RevisionGUID="a71b891f-4791-439c-97b7-1461f2fa85ad" CreationDate="2022-04-23T14:54:13.370" UserId="29" Text="[This](https://docs.substrate.io/v3/runtime/smart-contracts) article has quite a few strong points between smart contract vs runtime development.&#xD;&#xA;&#xD;&#xA;&gt; It aims to provide insight on reasons for choosing smart contract development over runtime development for your on-chain logic.&#xD;&#xA;&#xD;&#xA;Here is the full link:&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/v3/runtime/smart-contracts&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Additionally, the Polkadot wiki has some notes on this:&#xD;&#xA;- https://wiki.polkadot.network/docs/build-smart-contracts&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7755" PostHistoryTypeId="2" PostId="2083" RevisionGUID="41831adf-8296-4f28-b23c-fce3af2ddaff" CreationDate="2022-04-23T17:23:47.787" UserId="28" Text="Base fee represents the fee of any extrinsic with a certain extrinsic class, not yet including the specific logic of that extrinsic. That is to say, that there is some overhead fee required for any extrinsic, even one that executes no logic, and the base fee represents that.&#xD;&#xA;&#xD;&#xA;The documented definition is:&#xD;&#xA;&#xD;&#xA;&gt; _base fee_: This is the minimum amount a user pays for a transaction. It is declared as a base _weight_ in the runtime and converted to a fee using `WeightToFee`.&#xD;&#xA;&#xD;&#xA;Weight is has a standard value across all chains representing pico-seconds. For example, 1 seconds of weight would be `1_000_000_000_000`.&#xD;&#xA;&#xD;&#xA;Since Weight has a standard representation, but all blockchains can have different representations of currencies, we need a function like `WeightToFee` to allow a blockchain developer to convert between the standard weight value to a representation of the blockchian currency.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;Imagine I have two chains which represent a USD stable coin, however, one uses 12 decimals, and the other uses 9 decimals.&#xD;&#xA;&#xD;&#xA;So to represent $1, you would have:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;chain a: 1_000_000_000_000 UNITS&#xD;&#xA;chain b: 1_000_000_000 UNITS&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where `UNITS` is the lowest denomination of that currency.&#xD;&#xA;&#xD;&#xA;Now imagine you want to have both chains charge $1, for 1 second of computation on the network.&#xD;&#xA;&#xD;&#xA;Chain a would define a `WeightToFee` function which is simply the identity, since these two values match 1:1.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn weight_to_fee(weight: u64) -&gt; Balance {&#xD;&#xA;    weight.into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, chain b would need to adjust the weight value to turn it into the appropriate fee since they only use 9 decimals:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn weight_to_fee(weight: u64) -&gt; Balance {&#xD;&#xA;    (weight / 1000).into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Within the transaction payment pallet, `WeightToFee` is a trait that can be defined by the runtime developer, and can even have more complex logic. For example, imagine charging different amounts of fees at different tiers:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn weight_to_fee(weight: u64) -&gt; Balance {&#xD;&#xA;    if weight &gt; THRESHOLD_1 {&#xD;&#xA;         (weight * FEE_MULTIPLIER_1).into()&#xD;&#xA;    } else if (weight &gt; THRESHOLD_2)&#xD;&#xA;         (weight * FEE_MULTIPLIER_2).into()&#xD;&#xA;    } else if ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So to answer your question, there is no concrete way that these things are calculated for all Substrate chains. If you are asking about a specific chain like Polkadot, you can look at the implementation of the `WeightToFee` trait:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	/// Handles converting a weight scalar to a fee value, based on the scale and granularity of the&#xD;&#xA;	/// node's balance type.&#xD;&#xA;	///&#xD;&#xA;	/// This should typically create a mapping between the following ranges:&#xD;&#xA;	///   - [0, `MAXIMUM_BLOCK_WEIGHT`]&#xD;&#xA;	///   - [Balance::min, Balance::max]&#xD;&#xA;	///&#xD;&#xA;	/// Yet, it can be used for any other sort of change to weight-fee. Some examples being:&#xD;&#xA;	///   - Setting it to `0` will essentially disable the weight fee.&#xD;&#xA;	///   - Setting it to `1` will cause the literal `#[weight = x]` values to be charged.&#xD;&#xA;	pub struct WeightToFee;&#xD;&#xA;	impl WeightToFeePolynomial for WeightToFee {&#xD;&#xA;		type Balance = Balance;&#xD;&#xA;		fn polynomial() -&gt; WeightToFeeCoefficients&lt;Self::Balance&gt; {&#xD;&#xA;			// in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:&#xD;&#xA;			let p = super::currency::CENTS;&#xD;&#xA;			let q = 10 * Balance::from(ExtrinsicBaseWeight::get());&#xD;&#xA;			smallvec![WeightToFeeCoefficient {&#xD;&#xA;				degree: 1,&#xD;&#xA;				negative: false,&#xD;&#xA;				coeff_frac: Perbill::from_rational(p % q, q),&#xD;&#xA;				coeff_integer: p / q,&#xD;&#xA;			}]&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7757" PostHistoryTypeId="2" PostId="2084" RevisionGUID="8f622e74-6b80-421f-8a90-7f1ca9ccaf5d" CreationDate="2022-04-23T17:29:45.553" UserId="29" Text="I would like to batch several extrinsic calls into one transactions, but I am not sure if I should use `utility.batch()` or `utility.batchAll()`. **What is the difference?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="7759" PostHistoryTypeId="1" PostId="2084" RevisionGUID="8f622e74-6b80-421f-8a90-7f1ca9ccaf5d" CreationDate="2022-04-23T17:29:45.553" UserId="29" Text="What is the difference between the extrinsics utility.batch() and utility.batchAll()?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7760" PostHistoryTypeId="3" PostId="2084" RevisionGUID="8f622e74-6b80-421f-8a90-7f1ca9ccaf5d" CreationDate="2022-04-23T17:29:45.553" UserId="29" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7762" PostHistoryTypeId="2" PostId="2085" RevisionGUID="c82840dc-0a17-4450-8fea-585813d8bf93" CreationDate="2022-04-23T17:29:45.553" UserId="29" Text="[`utility.batchAll()`](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/utility/src/lib.rs#L284) does not commit if one of the calls in the batch fails.&#xD;&#xA;&#xD;&#xA;&gt; The whole transaction will rollback and fail if any of the calls failed.&#xD;&#xA;&#xD;&#xA;[`utility.batch()`](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/utility/src/lib.rs#L177) commits each successful call regardless if a call fails.&#xD;&#xA;&#xD;&#xA;&gt; If a call failed and the batch was interrupted, then the&#xD;&#xA;&gt; `BatchInterrupted` event is deposited, along with the number of&#xD;&#xA;&gt; successful calls made and the error of the failed call. If all were&#xD;&#xA;&gt; successful, then the `BatchCompleted` event is deposited.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7763" PostHistoryTypeId="2" PostId="2086" RevisionGUID="634f263b-c1d8-4d4e-969b-766abb8eab1f" CreationDate="2022-04-23T17:47:39.597" UserId="29" Text="I am running Rococo local on my machine and my parachain stalled. I would like to reset the state of my parachain and restart my collator. **How do I do this?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="7765" PostHistoryTypeId="1" PostId="2086" RevisionGUID="634f263b-c1d8-4d4e-969b-766abb8eab1f" CreationDate="2022-04-23T17:47:39.597" UserId="29" Text="How do I reset my parachain's state?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7766" PostHistoryTypeId="3" PostId="2086" RevisionGUID="634f263b-c1d8-4d4e-969b-766abb8eab1f" CreationDate="2022-04-23T17:47:39.597" UserId="29" Text="|parachain|rococo-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7768" PostHistoryTypeId="2" PostId="2087" RevisionGUID="6ffc7455-6b2d-4a16-8135-d771c6facacd" CreationDate="2022-04-23T17:47:39.597" UserId="29" Text="If all you want to do is reset the state for your parachain:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Y6O8s.png)&#xD;&#xA;&#xD;&#xA;If you want to reset the state and upload new code then you can use `utility.batchAll()` and call `paras.forceSetCurrentHead()` and `paras.forceSetCurrentCode()`.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/GFjyX.png)&#xD;&#xA;&#xD;&#xA;Then restart your collator(s) and you should see the `paras.head()` change.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/nrRsD.png)" ContentLicense="CC BY-SA 4.0" />
  <row Id="7771" PostHistoryTypeId="2" PostId="2088" RevisionGUID="92085fe1-98f9-4ed7-acd8-d9bbdb821d04" CreationDate="2022-04-23T20:09:03.737" UserId="28" Text="If the changes you showed above are the only changes you made, you did not add your pallet to your runtime correctly.&#xD;&#xA;&#xD;&#xA;Take a look at this tutorial showing you how to add a pallet to your runtime: https://docs.substrate.io/tutorials/v3/add-a-pallet/&#xD;&#xA;&#xD;&#xA;Beyond adding the pallet to your runtime like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-nicks = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You need to also properly enable the `std` feature flag:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[features]&#xD;&#xA;default = ['std']&#xD;&#xA;std = [&#xD;&#xA;    ...&#xD;&#xA;    'pallet-aura/std',&#xD;&#xA;    'pallet-balances/std',&#xD;&#xA;    'pallet-nicks/std',&#xD;&#xA;    ...&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7773" PostHistoryTypeId="2" PostId="2089" RevisionGUID="ead0e817-941e-421d-bafb-22b32b4f8e7c" CreationDate="2022-04-23T20:17:30.563" UserId="28" Text="There is not any documentation that I am aware of that specifically combines `mock-socket` and `polkadot-js-api`.&#xD;&#xA;&#xD;&#xA;Similar mocking of requests and responses has been implemented in a few other places:&#xD;&#xA;&#xD;&#xA; * https://github.com/paritytech/polkadot-launch&#xD;&#xA; * https://github.com/paritytech/zombienet&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Probably some others too if you reach out to the parachain development community." ContentLicense="CC BY-SA 4.0" />
  <row Id="7775" PostHistoryTypeId="2" PostId="2090" RevisionGUID="42f495d3-0d36-486b-96bd-1e746fa42ee3" CreationDate="2022-04-23T20:26:29.937" UserId="28" Text="This error appears when checking a validator against the `DisabledValidators` hook.&#xD;&#xA;&#xD;&#xA;This is most commonly implemented by the Session pallet, which maintains a storage list of validators that should be disabled:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	/// Indices of disabled validators.&#xD;&#xA;	///&#xD;&#xA;	/// The vec is always kept sorted so that we can find whether a given validator is&#xD;&#xA;	/// disabled using binary search. It gets cleared when `on_session_ending` returns&#xD;&#xA;	/// a new set of identities.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn disabled_validators)]&#xD;&#xA;	pub type DisabledValidators&lt;T&gt; = StorageValue&lt;_, Vec&lt;u32&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This error means whichever validator you are running into an issue with is part of this `DisabledValidators` list, or whatever you have implemented for the `DisabledValidators` hook.&#xD;&#xA;&#xD;&#xA;If you don't want this behavior, use `()` for the `DisabledValidators` hook." ContentLicense="CC BY-SA 4.0" />
  <row Id="7777" PostHistoryTypeId="52" PostId="2084" RevisionGUID="69b6aa34-aef1-41bf-bd3b-7fd8b2b59b25" CreationDate="2022-04-24T01:30:01.027" />
  <row Id="7778" PostHistoryTypeId="5" PostId="2047" RevisionGUID="70801280-07bf-4156-a93f-a28693d9a540" CreationDate="2022-04-24T04:51:48.267" UserId="1950" Comment="added 772 characters in body" Text="I have configured the staking pallet in the Substrate node template and tried to add it to the Cargo.toml in Run time &#xD;&#xA;Then it ended up in the following error when building&#xD;&#xA;This happens if I add any pallets to the cargo toml &#xD;&#xA;&#xD;&#xA;What should be the fix for this ?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;pallet-stakingt = { version = &quot;0.0.1&quot;, default-features = false, path = &quot;../pallets/staking&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.6/src/lib.rs:235:9&#xD;&#xA;      |&#xD;&#xA;  235 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  236 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  237 | |                         For more information see: \&#xD;&#xA;  238 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.6/src/lib.rs:262:5&#xD;&#xA;      |&#xD;&#xA;  262 |     imp::getrandom_inner(dest)&#xD;&#xA;      |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-staking/std&quot;,&#xD;&#xA;	&quot;pallet-dct/std&quot;,&#xD;&#xA;	&quot;pallet-uniques/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7779" PostHistoryTypeId="2" PostId="2091" RevisionGUID="524282a3-aab8-446a-8384-9bc8e0ad08e7" CreationDate="2022-04-24T04:53:03.330" UserId="613" Text="I read about the [XCM post](https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392) and the answer by Joe [here](https://substrate.stackexchange.com/questions/1385/will-i-eventually-be-able-to-teleport-assets-between-parachains). Now I wonder right now what is the actual way that current parachains adopt to xcm assets. According to their &quot;Trust level&quot;, I think they may adopt &quot;reserve backed transfer&quot;. If so, if it is possible for the asset that is transfered from Parachain A to Parachain B can continue to be transfered to Parachain C?&#xD;&#xA;To be specific, if Karura, Bifrost and Moonriver all open xcm channel with each other, can $KAR on Bifrost can theoretically be transfered to Moonriver? And if it is possible, whether it is actually $KAR transfered from the account on Karura controlled by Bifrost to the account on Karura controlled by Moonriver in the background?&#xD;&#xA;So my understanding is the xcm transfer involves 3 parachains, the path should be 1. Bifrost burn the sender account's derivative $KAR value and 2. Karura transfer the actual $KAR from the accound controlled by Bifrost to the account controlled by Moonriver and 3. Moonriver mint the derivative $KAR to the receiver account on Moonriver?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7781" PostHistoryTypeId="1" PostId="2091" RevisionGUID="524282a3-aab8-446a-8384-9bc8e0ad08e7" CreationDate="2022-04-24T04:53:03.330" UserId="613" Text="What is the actual XCM way between parachains on Kusama?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7782" PostHistoryTypeId="3" PostId="2091" RevisionGUID="524282a3-aab8-446a-8384-9bc8e0ad08e7" CreationDate="2022-04-24T04:53:03.330" UserId="613" Text="|parachain|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7783" PostHistoryTypeId="2" PostId="2092" RevisionGUID="f2c61042-deb2-4ea1-bc34-f8c1b9d72252" CreationDate="2022-04-24T07:30:48.197" UserId="2140" Text="I am doing Substrate-tutorial and I just have a question about template-node.&#xD;&#xA;Inside impl 'frame_system::Config for Runtime {} code, there are `type Event = Event` and `type Call = Call`, but I don't see any import statement for 'Event' and 'Call' types, where do these 'Event' and 'Call' come from...? It just seems like they come from nowhere.&#xD;&#xA;&#xD;&#xA;Thank You." ContentLicense="CC BY-SA 4.0" />
  <row Id="7785" PostHistoryTypeId="1" PostId="2092" RevisionGUID="f2c61042-deb2-4ea1-bc34-f8c1b9d72252" CreationDate="2022-04-24T07:30:48.197" UserId="2140" Text="Event type &amp; Call type" ContentLicense="CC BY-SA 4.0" />
  <row Id="7786" PostHistoryTypeId="3" PostId="2092" RevisionGUID="f2c61042-deb2-4ea1-bc34-f8c1b9d72252" CreationDate="2022-04-24T07:30:48.197" UserId="2140" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7787" PostHistoryTypeId="2" PostId="2093" RevisionGUID="70a722af-8f00-40fe-b6a0-f9497a424b43" CreationDate="2022-04-24T08:48:11.767" UserId="2010" Text="I have a scenario where I want to executed a scheduled call via scheduler pallet at blocknumber n , this call will change certain storage items of pallet. So before this storage changes I want to use offchain_worker() to dump storage to some http server.&#xD;&#xA;Now I feel that scheduled call will be executed before offchain_worker() gets triggered for blocknumber n. Is this true? if yes then what can be done to achieve my goal." ContentLicense="CC BY-SA 4.0" />
  <row Id="7789" PostHistoryTypeId="1" PostId="2093" RevisionGUID="70a722af-8f00-40fe-b6a0-f9497a424b43" CreationDate="2022-04-24T08:48:11.767" UserId="2010" Text="when offhcain_worker gets executed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7790" PostHistoryTypeId="3" PostId="2093" RevisionGUID="70a722af-8f00-40fe-b6a0-f9497a424b43" CreationDate="2022-04-24T08:48:11.767" UserId="2010" Text="|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7791" PostHistoryTypeId="2" PostId="2094" RevisionGUID="7fb7a2f4-b912-43d0-b8a5-6793b23dee3e" CreationDate="2022-04-24T09:38:27.540" UserId="183" Text="Given the following parachain network setup:&#xD;&#xA;- collator **C0**&#xD;&#xA;- collator **C1**&#xD;&#xA;- bootnode **B0**&#xD;&#xA;&#xD;&#xA;C0 and C1 are initial collators that are specified in chain spec (invulnerables).&#xD;&#xA;B0 is the sole bootnode in chain spec and also acts as public rpc-node.&#xD;&#xA;&#xD;&#xA;Questions would be:&#xD;&#xA;1. How would they sync with each other if all of their DBs are different? (e.g. when C0 and B0's DB get corrupted while C1 has the valid DB) &#xD;&#xA;2. If I delete C0 and B0's DB, can they start to sync correctly from the beginning?&#xD;&#xA;3. What if I delete C1's DB instead? I assume there's no way to get the correct DB anymore?&#xD;&#xA;4. Is it generally true that as long as there's one node which has the valid DB, the whole parachain network can sync to the correct state eventually? No matter which role this node is (collator/rpc-node/bootnode)? And does the pruning mode matter?&#xD;&#xA;5. How does the parachain network find out the &quot;valid&quot; DB? Given that the relaychain network only records the head state of parachain blocks.&#xD;&#xA;&#xD;&#xA;If there's any official documentation about this it would be very helpful!&#xD;&#xA;Thank you for any help." ContentLicense="CC BY-SA 4.0" />
  <row Id="7793" PostHistoryTypeId="1" PostId="2094" RevisionGUID="7fb7a2f4-b912-43d0-b8a5-6793b23dee3e" CreationDate="2022-04-24T09:38:27.540" UserId="183" Text="Is there any &quot;primary&quot; DB in parachain network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7794" PostHistoryTypeId="3" PostId="2094" RevisionGUID="7fb7a2f4-b912-43d0-b8a5-6793b23dee3e" CreationDate="2022-04-24T09:38:27.540" UserId="183" Text="|parachain|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7795" PostHistoryTypeId="2" PostId="2095" RevisionGUID="413892e7-3176-4209-8ecd-8c7d6c005527" CreationDate="2022-04-24T09:47:12.980" UserId="2406" Text="tom@tompc:~/Downloads/substrate-front-end-template$ yarn install&#xD;&#xA;00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'&#xD;&#xA;&#xD;&#xA;Distributor ID:	Ubuntu&#xD;&#xA;Description:	Ubuntu 22.04 LTS&#xD;&#xA;Release:	22.04&#xD;&#xA;Codename:	jammy" ContentLicense="CC BY-SA 4.0" />
  <row Id="7797" PostHistoryTypeId="1" PostId="2095" RevisionGUID="413892e7-3176-4209-8ecd-8c7d6c005527" CreationDate="2022-04-24T09:47:12.980" UserId="2406" Text="substrate-front-end-template, yarn install failure" ContentLicense="CC BY-SA 4.0" />
  <row Id="7798" PostHistoryTypeId="3" PostId="2095" RevisionGUID="413892e7-3176-4209-8ecd-8c7d6c005527" CreationDate="2022-04-24T09:47:12.980" UserId="2406" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7799" PostHistoryTypeId="2" PostId="2096" RevisionGUID="4ee9fddd-a0d8-40fe-8bd6-892261a68930" CreationDate="2022-04-24T09:50:19.987" UserId="2099" Text="This is due to an incorrect yarn version i believe.&#xD;&#xA;I fixed it on Ubuntu 20.04 by installing node and yarn in the following way:&#xD;&#xA;```shell&#xD;&#xA;# Install Nodejs&#xD;&#xA;curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - &amp;&amp;&#xD;&#xA;sudo apt update &amp;&amp;&#xD;&#xA;sudo apt install nodejs &amp;&amp;&#xD;&#xA;sudo apt install build-essential&#xD;&#xA;&#xD;&#xA;# Install Yarn&#xD;&#xA;curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - &amp;&amp; &#xD;&#xA;echo &quot;deb https://dl.yarnpkg.com/debian/ stable main&quot; | sudo tee /etc/apt/sources.list.d/yarn.list &amp;&amp;&#xD;&#xA;sudo apt update &amp;&amp;&#xD;&#xA;sudo apt install yarn &amp;&amp;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Hope this helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="7801" PostHistoryTypeId="2" PostId="2097" RevisionGUID="befb2742-a291-4959-99eb-60dd88b76dc5" CreationDate="2022-04-24T10:25:24.243" UserId="2140" Text="Inside mod pallet {}, there is code for RawOrigin, which is&#xD;&#xA;&#xD;&#xA;    pub enum RawOrigin&lt;AccountId&gt; {&#xD;&#xA;	    Root,&#xD;&#xA;	    Signed(AccountId),&#xD;&#xA;	    None,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I don't know how we can use this AccountId type explicitly, I mean shouldn't the code look like this?&#xD;&#xA;&#xD;&#xA;    pub enum RawOrigin&lt;T:config::AccounId&gt; {&#xD;&#xA;	    Root,&#xD;&#xA;	    Signed(T:config::AccountId),&#xD;&#xA;	    None,&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="7803" PostHistoryTypeId="1" PostId="2097" RevisionGUID="befb2742-a291-4959-99eb-60dd88b76dc5" CreationDate="2022-04-24T10:25:24.243" UserId="2140" Text="frame system pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="7804" PostHistoryTypeId="3" PostId="2097" RevisionGUID="befb2742-a291-4959-99eb-60dd88b76dc5" CreationDate="2022-04-24T10:25:24.243" UserId="2140" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7805" PostHistoryTypeId="5" PostId="1982" RevisionGUID="4cdf7909-d227-420c-aa33-009ff147001f" CreationDate="2022-04-24T15:41:58.323" UserId="2330" Comment="added 76 characters in body; edited title" Text="new to substrate. here are three modules: `Democracy` `Council`, `TechnicalCommittee`. i did some experiments on the local testnet ,but failed.&#xD;&#xA;&#xD;&#xA;I know that the proposal under `Democracy` can execute sudo origin. so i did the following:&#xD;&#xA;&#xD;&#xA;Democracy -&gt; Submit preimage(system-&gt; set_balance(sudo origin) and get this preimage hash) -&gt; Submit proposal(input preimage hash)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;if the proposal enters referenda and voted pass. this set_balance proposal will execute. this process will take a long time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`Council`, `TechnicalCommittee` can speed up the process. and they all use collective pallet.&#xD;&#xA;&#xD;&#xA;i use `techcomm` -&gt; `proposals` -&gt; `Submit proposal`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;democracy -&gt; fastTrack(proposalHash is set_balance preimage hash)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;vote and end time, I click the close button. but i get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;technicalCommittee.Executed:&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;  Err: BadOrigin&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;why?  fastTrack origin is FastTrackOrigin.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type FastTrackOrigin =pallet_collective::EnsureProportionAtLeast&lt;AccountId, TechnicalCollective, 2, 3&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;i use TechnicalCommittee vote this proposal and close(execute) it, why Origin is BadOrigin?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If use `Council` and `TechnicalCommittee`, What the correct process should look like？&#xD;&#xA;&#xD;&#xA;BTW,is there any more comprehensive documentation on this?. such as :&#xD;&#xA;&#xD;&#xA;https://polkadot.network/blog/polkadot-governance/&#xD;&#xA;&#xD;&#xA;ADD:&#xD;&#xA;If i want to use fast_tack to setBalance, what is the correct way?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7806" PostHistoryTypeId="4" PostId="1982" RevisionGUID="4cdf7909-d227-420c-aa33-009ff147001f" CreationDate="2022-04-24T15:41:58.323" UserId="2330" Comment="added 76 characters in body; edited title" Text="How to better understand permissions in the Democracy module(fastTrack)" ContentLicense="CC BY-SA 4.0" />
  <row Id="7809" PostHistoryTypeId="2" PostId="2098" RevisionGUID="61485203-2b20-40e4-8026-95824a61e4a6" CreationDate="2022-04-24T20:42:17.330" UserId="28" Text="You should review how generics work in Rust.&#xD;&#xA;&#xD;&#xA;By defining `RawOrigin` as `pub enum RawOrigin&lt;AccountId&gt;`, we allow this enum object to work for any generic `AccountId` type.&#xD;&#xA;&#xD;&#xA;What you seem to want actually is defined in the `frame_system` pallet elsewhere:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Exposed trait-generic origin type.&#xD;&#xA;#[pallet::origin]&#xD;&#xA;pub type Origin&lt;T&gt; = RawOrigin&lt;&lt;T as Config&gt;::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here you can see we take this `RawOrigin` type, and directly use the `AccountId` definition from `Config` as you wanted.&#xD;&#xA;&#xD;&#xA;However, doing it this way takes advantage of the `#[pallet::origin]` macro, which allows pallets to register new origins in the Substrate runtime, rather than making some hard coded assumptions about this kind of thing.&#xD;&#xA;&#xD;&#xA;So this is a very intended abstraction, and part of the overall modular design of Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="7811" PostHistoryTypeId="4" PostId="2097" RevisionGUID="d485992e-c614-44f7-b073-d07dda53908f" CreationDate="2022-04-24T20:43:29.247" UserId="28" Comment="edited tags; edited title" Text="Question about Raw Origin in Frame System Pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="7812" PostHistoryTypeId="6" PostId="2097" RevisionGUID="d485992e-c614-44f7-b073-d07dda53908f" CreationDate="2022-04-24T20:43:29.247" UserId="28" Comment="edited tags; edited title" Text="|frame|origin|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7813" PostHistoryTypeId="6" PostId="2095" RevisionGUID="26eb248f-3831-4505-9309-2abca3d2c1cf" CreationDate="2022-04-24T20:43:54.980" UserId="28" Comment="edited tags" Text="|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7814" PostHistoryTypeId="6" PostId="2092" RevisionGUID="4746b840-14ea-4644-80c2-18193f1e091b" CreationDate="2022-04-24T20:44:51.203" UserId="28" Comment="edited tags" Text="|substrate-node-template|events|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7815" PostHistoryTypeId="2" PostId="2099" RevisionGUID="c99b65c5-0f0f-4d7c-ae73-a85baadf23e3" CreationDate="2022-04-24T21:10:44.423" UserId="2408" Text="I'm trying to implement simple PoW for my node. After debugging all other stuff I've encountered the problem where `finality-grandpa` and `storage` do not get compiled because standart library macros are (for some reason) out of scope.&#xD;&#xA;&#xD;&#xA;I've checked that `std` features and enabled for all dependencies where they need to be enabled. Also I found [this](https://doc.rust-lang.org/cargo/reference/features-examples.html?highlight=no-std#:~:text=full%20standard%20library.-,The%20wasm%2Dbindgen,-package%20defines%20a) information about one of the dependencies. But as it's a non-local (pulled from github) I can't change that functionality.&#xD;&#xA;&#xD;&#xA;Please note that I did not modify any of these two pallets (just imported my own, implementing PoW). Before that (on clear substrate-node-template which I use as a base for my project) those built without any problem.  &#xD;&#xA;&#xD;&#xA;The question is: How do I fix this? Should I enable `std` for these crates somehow? &#xD;&#xA;As far as I know, the node is built into native Rust and WASM, and for WASM it's built in no-std. By why did it build before in this case?  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a [link](https://pastebin.com/1YfwG4Qx) to a part of the error message I get.  &#xD;&#xA;And here is a [link](https://github.com/CREESTL/Crain) to the repo with my last changes&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7817" PostHistoryTypeId="1" PostId="2099" RevisionGUID="c99b65c5-0f0f-4d7c-ae73-a85baadf23e3" CreationDate="2022-04-24T21:10:44.423" UserId="2408" Text="How to enable std features in multiple pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7818" PostHistoryTypeId="3" PostId="2099" RevisionGUID="c99b65c5-0f0f-4d7c-ae73-a85baadf23e3" CreationDate="2022-04-24T21:10:44.423" UserId="2408" Text="|storage|substrate-node-template|grandpa|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7819" PostHistoryTypeId="2" PostId="2100" RevisionGUID="a7ffa5b0-1904-440b-8a2f-a81ae348b99f" CreationDate="2022-04-24T21:16:35.703" UserId="28" Text="Indeed, this is where Macro magic is happening. These `Event` and `Call` types are coming from `construct_runtime!`, and is generating an &quot;outer enum&quot; which collects all the events and calls from all the other pallets and puts it together into a single overall type which is then transferred back into the pallet.&#xD;&#xA;&#xD;&#xA;You can think of it kind of like a recursive definition, where values must first be collected from the pallets, &quot;constructed&quot; in the runtime, and then sent back to the pallets.&#xD;&#xA;&#xD;&#xA;The Rust compiler ensures all of this maintains all of the type rules required." ContentLicense="CC BY-SA 4.0" />
  <row Id="7821" PostHistoryTypeId="5" PostId="2091" RevisionGUID="c740a673-b19d-4c10-94f6-d92513feecec" CreationDate="2022-04-24T21:33:19.303" UserId="29" Comment="edited body" Text="I read about the [XCM post](https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392) and the answer by Joe [here](https://substrate.stackexchange.com/questions/1385/will-i-eventually-be-able-to-teleport-assets-between-parachains). Now I wonder right now what is the actual way that current parachains adopt to xcm assets. According to their &quot;Trust level&quot;, I think they may adopt &quot;reserve backed transfer&quot;. If so, if it is possible for the asset that is transfered from Parachain A to Parachain B can continue to be transfered to Parachain C?&#xD;&#xA;To be specific, if Karura, Bifrost and Moonriver all open xcm channel with each other, can $KAR on Bifrost can theoretically be transfered to Moonriver? And if it is possible, whether it is actually $KAR transfered from the account on Karura controlled by Bifrost to the account on Karura controlled by Moonriver in the background?&#xD;&#xA;So my understanding is the xcm transfer involves 3 parachains, the path should be 1. Bifrost burn the sender account's derivative $KAR value and 2. Karura transfer the actual $KAR from the account controlled by Bifrost to the account controlled by Moonriver and 3. Moonriver mint the derivative $KAR to the receiver account on Moonriver?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7822" PostHistoryTypeId="2" PostId="2101" RevisionGUID="3b2ca209-1cee-4834-b039-7be1032440c1" CreationDate="2022-04-24T22:15:23.077" UserId="29" Text="OCW's run asynchronously at the end of every block import.&#xD;&#xA;&#xD;&#xA;You could use a combination of [off-chain storage](https://docs.substrate.io/v3/concepts/off-chain-features/) and [off-chain indexing](https://docs.substrate.io/v3/concepts/off-chain-features).&#xD;&#xA;&#xD;&#xA;Off-chain Storage to orchestrate [when to run the OCW](https://github.com/paritytech/substrate/blob/master/frame/examples/offchain-worker/src/lib.rs#L177) (it does not need to run at the end of every block import).&#xD;&#xA;&#xD;&#xA;And you could have your pallet write its storage to the off-chain indexing storage before it changes its storage so it is accessible by the OCW when it runs later.&#xD;&#xA;&#xD;&#xA;Note that even with the above solution, the OCW will still run at the end of block import.&#xD;&#xA;&#xD;&#xA;Take a look at these two guides. The code is a bit legacy but still relevant:&#xD;&#xA;- https://github.com/JoshOrndorff/recipes/blob/master/text/off-chain-workers/storage.md&#xD;&#xA;- https://github.com/JoshOrndorff/recipes/blob/master/text/off-chain-workers/indexing.md&#xD;&#xA;&#xD;&#xA;References&#xD;&#xA;- [StorageValueRef](https://paritytech.github.io/substrate/latest/sp_runtime/offchain/storage/struct.StorageValueRef.html)&#xD;&#xA;- [offchain_index](https://paritytech.github.io/substrate/latest/sp_io/offchain_index/index.html)" ContentLicense="CC BY-SA 4.0" />
  <row Id="7824" PostHistoryTypeId="5" PostId="2093" RevisionGUID="7679c3ee-9ba1-45e6-8132-7738717d5f60" CreationDate="2022-04-24T22:16:57.003" UserId="29" Comment="added 4 characters in body; edited title" Text="I have a scenario where I want to execute a scheduled call via the scheduler pallet at block number n, this call will change certain storage items of pallet. So before this storage changes I want to use offchain_worker() to dump storage to some http server.&#xD;&#xA;Now I feel that scheduled call will be executed before offchain_worker() gets triggered for block number n. Is this true? if yes then what can be done to achieve my goal." ContentLicense="CC BY-SA 4.0" />
  <row Id="7825" PostHistoryTypeId="4" PostId="2093" RevisionGUID="7679c3ee-9ba1-45e6-8132-7738717d5f60" CreationDate="2022-04-24T22:16:57.003" UserId="29" Comment="added 4 characters in body; edited title" Text="When off-chain worker gets executed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7826" PostHistoryTypeId="2" PostId="2102" RevisionGUID="7700b7a4-5218-4139-a308-7ddbad188e78" CreationDate="2022-04-24T23:12:22.263" UserId="29" Text="You are correct in stating that the [`fast_track` call must have the origin `FastTrackOrigin`](https://github.com/paritytech/substrate/blob/22d40c761a985482f93bbbea5ba4199bdba74f8e/frame/democracy/src/lib.rs#L799).&#xD;&#xA;&#xD;&#xA;Remember that Polkadot [has `Sudo` removed](https://github.com/paritytech/polkadot/commit/29fea4e433f1c5e74a3ea8c4237e6af5f65a8217) and fastTrack is something that the technical committee is responsible for so it makes sense that it has to come from the technical committee = [`fastTrackOrigin`]( https://github.com/paritytech/substrate/tree/master/frame/democracy#fast-track-origin).&#xD;&#xA;&#xD;&#xA;You could try adding yourself to the technical committee via the extrinsic `technicalMembership &gt; addMember` then trying again. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7829" PostHistoryTypeId="52" PostId="2093" RevisionGUID="f1f28569-9b76-412c-85d0-04b0b1d45f91" CreationDate="2022-04-25T02:43:42.730" />
  <row Id="7830" PostHistoryTypeId="2" PostId="2103" RevisionGUID="273076c6-c512-4e47-adda-43c19b146e05" CreationDate="2022-04-25T02:53:03.510" UserId="34" Text="&gt;  standard library macros are (for some reason) out of scope.&#xD;&#xA;&#xD;&#xA;_TL;DR: you cannont use `std` in runtime development_&#xD;&#xA;&#xD;&#xA;As you see on the [node template](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/src/lib.rs) all _runtime_ files must not use `std` because they target Wasm, and thus cannot generally use the full `std`, and include:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Instead of the full library, the general subset of `std` types and traits you likely need are in [`sp_std`](https://paritytech.github.io/substrate/master/sp_std/index.html). This includes primitives like `str` and `vec` modules. Of note, it's likely for runtime development [`frame_support::storage::BoundedVec`](https://paritytech.github.io/substrate/master/frame_support/storage/bounded_vec/struct.BoundedVec.html) should be used though, as boundedness is typically critical in runtimes)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7832" PostHistoryTypeId="2" PostId="2104" RevisionGUID="6902c997-904a-4e85-8712-a16744449797" CreationDate="2022-04-25T03:19:55.670" UserId="34" Text="## Background&#xD;&#xA;&#xD;&#xA;Transaction Mortality is described on the [Polkadot Wiki](https://wiki.polkadot.network/docs/build-protocol-info#transaction-mortality) as:&#xD;&#xA;&#xD;&#xA;&gt; Extrinsics can be mortal or immortal... If the extrinsic is not&#xD;&#xA;&gt; included in a block within this validity window, it will be discarded&#xD;&#xA;&gt; from the transaction queue.&#xD;&#xA;&gt; &#xD;&#xA;&gt; **The chain** only stores a limited number of prior block hashes as reference. You can query this parameter, called `BlockHashCount`, from&#xD;&#xA;&gt; the chain state or metadata. This parameter [is set to 2400 blocks on&#xD;&#xA;&gt; Polkadot](https://github.com/paritytech/polkadot/blob/975e780ae0d988dc033f400ba822d14b326ee5b9/runtime/common/src/lib.rs#L76-L92)&#xD;&#xA;&gt; (about four hours) **at genesis**...&#xD;&#xA;&gt; &#xD;&#xA;&gt; Setting the block checkpoint to zero, using the genesis hash, and a&#xD;&#xA;&gt; validity period of zero will make the transaction &quot;immortal&quot;.&#xD;&#xA;&#xD;&#xA;## Motivation&#xD;&#xA;&#xD;&#xA;**I would like to change (increase or decrease) the maximal lifetime of a transaction in on my network.**&#xD;&#xA;&#xD;&#xA;I see I can set the `BlockHashCount` on my chain in the [node template runtime](https://github.com/paritytech/substrate/blob/174735ea1bb5fc4513519c45181d8df63d86f613/bin/node-template/runtime/src/lib.rs#L134-L143) but the wiki implies that it cannot be changed from genesis. It also implies that this parameter affects much more than the behavior of the &quot;cached&quot; hashes on the node from the description above, so it's unclear why this may be unsafe to modify, or if there is another means to only change the behavior of what is the maximal validity period for a transaction to be included, at the runtime level, and (separately) at the transaction pool level.&#xD;&#xA;&#xD;&#xA;## Question&#xD;&#xA;&#xD;&#xA;**Is it safe to perform a runtime upgrade to update `BlockHashCount`, and if so, what side effects will this have?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="7834" PostHistoryTypeId="1" PostId="2104" RevisionGUID="6902c997-904a-4e85-8712-a16744449797" CreationDate="2022-04-25T03:19:55.670" UserId="34" Text="Can I modify the `BlockHashCount` on my chain safely to change transaction mortality?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7835" PostHistoryTypeId="3" PostId="2104" RevisionGUID="6902c997-904a-4e85-8712-a16744449797" CreationDate="2022-04-25T03:19:55.670" UserId="34" Text="|transactions|runtime-upgrade|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7836" PostHistoryTypeId="2" PostId="2105" RevisionGUID="6d8f1d3c-6074-43a6-87f0-b420a3ea66fe" CreationDate="2022-04-25T03:59:33.193" UserId="34" Text="Substrate builds are _big_. And running some of rust's best-in-class tools like [`rust-analyzer`](https://github.com/rust-analyzer/rust-analyzer/) at least with default settings leasts to continuious full blast use of most user's resources. &#xD;&#xA;&#xD;&#xA;What are the best tools &amp; tips to use tools like this for Substrate IDE development? Specifically VSCode _although I personally prefer [Codium](https://vscodium.com/#why)_." ContentLicense="CC BY-SA 4.0" />
  <row Id="7838" PostHistoryTypeId="1" PostId="2105" RevisionGUID="6d8f1d3c-6074-43a6-87f0-b420a3ea66fe" CreationDate="2022-04-25T03:59:33.193" UserId="34" Text="Best tools &amp; settings for `VSCode` for Substrate development" ContentLicense="CC BY-SA 4.0" />
  <row Id="7839" PostHistoryTypeId="3" PostId="2105" RevisionGUID="6d8f1d3c-6074-43a6-87f0-b420a3ea66fe" CreationDate="2022-04-25T03:59:33.193" UserId="34" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7840" PostHistoryTypeId="5" PostId="2105" RevisionGUID="df8c1f03-3044-42cc-9240-a24f503a767d" CreationDate="2022-04-25T04:07:53.033" UserId="34" Comment="added 226 characters in body; edited title" Text="Substrate builds are _resource intensive_. Running some of rust's best-in-class tools like [`rust-analyzer`](https://github.com/rust-analyzer/rust-analyzer/) at least with default settings leads to continuous full use of most resources and take frustratingly long to start working, if they do at all.&#xD;&#xA;&#xD;&#xA;What are the best tools &amp; tips to use tools like this for Substrate IDE development? Specifically VSCode _although I personally prefer [Codium](https://vscodium.com/#why)_.&#xD;&#xA;&#xD;&#xA;I also will disqualify &quot;use some powerful remote machine with...&quot; in answers, as I aim to efficiently develop **offline** on a moderately resource limited machine." ContentLicense="CC BY-SA 4.0" />
  <row Id="7841" PostHistoryTypeId="4" PostId="2105" RevisionGUID="df8c1f03-3044-42cc-9240-a24f503a767d" CreationDate="2022-04-25T04:07:53.033" UserId="34" Comment="added 226 characters in body; edited title" Text="Best tools &amp; settings for `VSCode` for *offline* Substrate development" ContentLicense="CC BY-SA 4.0" />
  <row Id="7842" PostHistoryTypeId="2" PostId="2106" RevisionGUID="2578dd9e-1018-4527-abf6-75dd7604f048" CreationDate="2022-04-25T04:58:38.690" UserId="393" Text="Except your question about ocw, for your target &quot;So before this storage changes I want to use offchain_worker() to dump storage to some http server&quot;, I think it's not a great scenario to use OCW/OCS. &#xD;&#xA;&#xD;&#xA;What you really want is ability to indexing you on-chain data (cover before or after change), it's good to use indexing service like subquery.&#xD;&#xA;&#xD;&#xA;As CQRS pattern goes, block-chain act as the Command part, if you want to build the query part, indexing service/infrastructure is there to serve.&#xD;&#xA;&#xD;&#xA;In detail, for your requirement, you can listen to every block's modification on your specific storage item, and then write those value into db(like postgres). " ContentLicense="CC BY-SA 4.0" />
  <row Id="7844" PostHistoryTypeId="2" PostId="2107" RevisionGUID="61d49a03-fadb-4f67-9c3a-74c8c51e1fe4" CreationDate="2022-04-25T05:57:17.350" UserId="620" Text="How does the Wiki imply that changing it is unsafe?&#xD;&#xA;&#xD;&#xA;Changing it will just affect the size of the storage trie under FRAME System. Since Substrate uses a base 16 trie, you'd have to go to a really high count to affect trie depth.&#xD;&#xA;&#xD;&#xA;In fact, Kusama has already upgraded its `BlockHashCount`. At genesis, [it was 250](https://github.com/paritytech/polkadot/blob/v0.7.2/runtime/src/lib.rs#L143)." ContentLicense="CC BY-SA 4.0" />
  <row Id="7846" PostHistoryTypeId="5" PostId="2107" RevisionGUID="bcb2587e-aa84-471b-9634-e1e310ae79f0" CreationDate="2022-04-25T06:03:32.913" UserId="620" Comment="added 64 characters in body" Text="How does the Wiki imply that changing it is unsafe?&#xD;&#xA;&#xD;&#xA;Changing it will just affect the size of the storage trie under FRAME System. Since Substrate uses a base 16 trie, you'd have to go to a really high count to affect trie depth.&#xD;&#xA;&#xD;&#xA;In fact, Kusama has already upgraded its `BlockHashCount`. At genesis, [it was 250](https://github.com/paritytech/polkadot/blob/v0.7.2/runtime/src/lib.rs#L143).&#xD;&#xA;&#xD;&#xA;The change: https://github.com/paritytech/polkadot/pull/1086" ContentLicense="CC BY-SA 4.0" />
  <row Id="7848" PostHistoryTypeId="2" PostId="2108" RevisionGUID="fd862bf4-bef6-4634-8f78-0e267b0cfbbf" CreationDate="2022-04-25T07:33:46.697" UserId="2102" Text="Is it possible to set a different priority for the transactions other than the fee or tip sent? If so, where should I modify the substrate-node to make it work. For example let's say I want to give some account more priority over others, therefore when this account sends a transaction, I want this transaction to be prioritized over the rest. " ContentLicense="CC BY-SA 4.0" />
  <row Id="7850" PostHistoryTypeId="1" PostId="2108" RevisionGUID="fd862bf4-bef6-4634-8f78-0e267b0cfbbf" CreationDate="2022-04-25T07:33:46.697" UserId="2102" Text="Setting custom priority for transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="7851" PostHistoryTypeId="3" PostId="2108" RevisionGUID="fd862bf4-bef6-4634-8f78-0e267b0cfbbf" CreationDate="2022-04-25T07:33:46.697" UserId="2102" Text="|substrate-node|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7852" PostHistoryTypeId="2" PostId="2109" RevisionGUID="aff603be-03e8-4b7e-bcd1-7e7be77050ee" CreationDate="2022-04-25T08:26:05.003" UserId="451" Text="&gt; I want to get the bool value from the flipper contract&#xD;&#xA;&#xD;&#xA;In order to read the return value of a contract message, you need to invoke it via RPC, a so called &quot;dry-run&quot;, since calling it via a transaction will not return a value.&#xD;&#xA;&#xD;&#xA;You would need to construct a request and then call the `&quot;contracts_call&quot;` rpc  method. At the current time there is no library available to do this, you would have to copy code from [`cargo-contract`][1]&#xD;&#xA;&#xD;&#xA;If on the other hand you did want to invoke a state changing contract transaction with `subxt` (e.g. `flip` in your case) you will need to invoke `call` on the contracts pallet e.g.:&#xD;&#xA;&#xD;&#xA;    api&#xD;&#xA;            .tx()&#xD;&#xA;            .contracts()&#xD;&#xA;            .call(&#xD;&#xA;                contract_address,&#xD;&#xA;                value,&#xD;&#xA;                gas_limit,&#xD;&#xA;                storage_deposit_limit,&#xD;&#xA;                data,&#xD;&#xA;            )&#xD;&#xA;            .sign_and_submit_then_watch_default(signer)&#xD;&#xA;            .await?;&#xD;&#xA;&#xD;&#xA; `data` will need to be populated with the `selector` of the contract message, together with the encoded args. The code above is copied from [`cargo-contract`][2].&#xD;&#xA;&#xD;&#xA;If you are just experimenting and don't want to integrate the above calls into your codebase, I recommend using [`cargo-contract`][3] to interact with the contract during development.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/blob/cfd55bd66811f959e465bd7f1b6d5d60e2240fbc/src/cmd/extrinsics/call.rs#L90&#xD;&#xA;  [2]: https://github.com/paritytech/cargo-contract/blob/cfd55bd66811f959e465bd7f1b6d5d60e2240fbc/src/cmd/extrinsics/call.rs#L163&#xD;&#xA;  [3]: https://github.com/paritytech/cargo-contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="7854" PostHistoryTypeId="2" PostId="2110" RevisionGUID="9ea74207-db47-4992-89fd-36975a6bc2b9" CreationDate="2022-04-25T08:30:40.170" UserId="2411" Text="Currently, I only found a way to interact with smart contracts by [contracts UI](https://paritytech.github.io/contracts-ui).&#xD;&#xA;&#xD;&#xA;Is there a js SDK or some other libraries for an off-chain process to interact with ink! smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7856" PostHistoryTypeId="1" PostId="2110" RevisionGUID="9ea74207-db47-4992-89fd-36975a6bc2b9" CreationDate="2022-04-25T08:30:40.170" UserId="2411" Text="Is there a js SDK or some other library to interact with ink! smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7857" PostHistoryTypeId="3" PostId="2110" RevisionGUID="9ea74207-db47-4992-89fd-36975a6bc2b9" CreationDate="2022-04-25T08:30:40.170" UserId="2411" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7858" PostHistoryTypeId="5" PostId="38" RevisionGUID="76ab3b05-7e9a-4bf1-a61f-e7466b850206" CreationDate="2022-04-25T08:31:20.340" UserId="104" Comment="Make asset teleportation more general than burning/minting" Text="There are two main ways in which assets are transferred between consensus systems in XCM. They are namely via **Asset Teleportation** or via **Reserve Asset Transfers**.&#xD;&#xA;&#xD;&#xA;First of all, a preamble -- XCM instructions are always going to be interpreted according to the consensus system that executes them, and so for all of the instructions that I am going to explain below, *always* remember that the exact behaviour may change depending on which consensus system processes them. What I would hence be describing are the basic behaviours that you can expect each consensus system to possess, regardless of their peculiarities.&#xD;&#xA;&#xD;&#xA;With that said, I am going to describe the intricacies with the two asset transfer models below.&#xD;&#xA;&#xD;&#xA;# Asset Teleportation #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Asset Teleportation][1]][1]&#xD;&#xA;&#xD;&#xA;We start with the easier and more straightforward of the two -- Asset Teleportation. As you can see from the diagram above, there are only 2 actors within this model: the source and the destination. The way in which we transfer assets between the source and the destination are briefly summarized in the numbered labels on the diagram, and are explained in more detail below:&#xD;&#xA;&#xD;&#xA;### 1. InitiateTeleport ###&#xD;&#xA;The source gathers the assets to be teleported from the sending account and **takes them out of the circulating supply**, taking note of the total amount of assets that was taken out.&#xD;&#xA;&#xD;&#xA;### 2. ReceiveTeleportedAssets ###&#xD;&#xA;The source then creates an XCM instruction called &quot;ReceiveTeleportedAssets&quot; and puts the amount of assets taken out of circulation and the receiving account as parameters to this instruction. It then sends this instruction over to the destination, where it gets processed and new assets gets **put back into circulating supply** accordingly.&#xD;&#xA;&#xD;&#xA;### 3. DepositAsset ###&#xD;&#xA;The destination then deposits the assets to the receiving account of the asset.&#xD;&#xA;&#xD;&#xA;The phrases **taken out of circulating supply** and **put back into circulating supply** are highlighted above to firstly give an indication of how much flexibility an XCM executor has in implementing the semantics of taking an asset out of and putting it back into its circulating supply. The straightforward answer is to burn the assets to take them out of circulation, but one can imagine that there are indeed multiple methods of achieving the same goal, such as transferring the assets locally to an inaccessible account, and likewise for putting assets back to circulation -- the receiving consensus system can freely choose to implement such semantics by releasing assets from a pre-filled and inaccessible treasury of the assets transferred, or perform a mint of the assets.&#xD;&#xA;&#xD;&#xA;As such, the above also gives a hint on the disadvantages of this model -- it requires both the source and destination of have a high level of mutual trust. The destination must trust that the source has appropriately removed the assets that was sent over from the circulating supply, and the source must also trust the destination to put the assets that was burned back into the circulating supply. The result of an asset teleportation should result in the same circulating supply of the asset. **Failing to uphold either of these two conditions will result in a change in the asset's total issuance (in the case of fungible tokens) or a complete loss/duplication of an NFT.**&#xD;&#xA;&#xD;&#xA;# Reserve Asset Transfer #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Reserve Asset Transfer][2]][2]&#xD;&#xA;&#xD;&#xA;For consensus systems that don't have the level of trust required for asset teleportation, they can instead opt for trusting a 3rd entity called the reserve to store the real assets (think Statemine on Kusama or Statemint on Polkadot). What this entails is that the source and destination will have to create some sort of mechanism to keep track of the assets that they own on the reserve, and this is usually done by minting a new derivative token. As a corollary, both the source and destination must have accounts on the reserve -- we'll refer to such accounts owned by the source/destination as Sovereign Accounts.&#xD;&#xA;&#xD;&#xA;Below are the steps in which a reserve asset transfer undergoes in order to transfer assets from the source to the destination:&#xD;&#xA;&#xD;&#xA;### 1. InitiateReserveWithdraw ###&#xD;&#xA;The source gathers the derivative assets to be transferred from the sending account and burns them, taking note of the amount of derivatives that were burned.&#xD;&#xA;&#xD;&#xA;### 2. WithdrawAsset ###&#xD;&#xA;The source sends a WithdrawAsset instruction to the reserve, instructing the reserve to withdraw assets equivalent to the amount of derivatives burned from the source's sovereign account.&#xD;&#xA;&#xD;&#xA;### 3. DepositReserveAsset ###&#xD;&#xA;The reserve deposits the assets withdrawn from the previous step to the destination's sovereign account, taking note of the amount of assets deposited.&#xD;&#xA;&#xD;&#xA;### 4. ReserveAssetDeposited ###&#xD;&#xA;The reserve creates a ReserveAssetDeposited instruction with the amount of assets deposited to the destination's sovereign account, and sends this instruction onwards to the destination. The destination receives the instruction and processes it, minting the derivative assets as a result of the process.&#xD;&#xA;&#xD;&#xA;### 5. DepositAsset ###&#xD;&#xA;The destination deposits the derivative assets minted to the receiving account.&#xD;&#xA;&#xD;&#xA;The addition of a 3rd consensus system is already a hint of the disadvantages of a reserve asset transfer model -- firstly, the reserve could easily become a point of centralization when too many consensus systems rely on it to be the reserve of choice for their assets; secondly, the sheer amount of steps required necessarily makes it more prone to errors, and as such, implementors will have to consider more possible pitfalls and provide technical support accordingly when an end user encounters issues arising from these steps. Last but not least, either of the source or destination can opt to designate multiple consensus systems to be their reserves, and in such a situation, care must be taken in order to ensure that the sovereign account on the reserves are balanced, so that one doesn't get all drained while the others still contain a healthy balance.&#xD;&#xA;&#xD;&#xA;One additional point of interest here is that I am also seeing that people are combining the roles of the source and reserve together, so that the source chain also acts as the reserve chain for their native token. This does make the reserve transfer process easier, in the sense that they would only need to execute a `DepositReserveAsset` to the sovereign account of the destination locally, and emit a `ReserveAssetDeposited` message to the destination. The destination would still however need to 1) recognize the source as the proper reserve for the tokens that are being sent over and 2) support minting derivatives of the tokens being sent over. &#xD;&#xA;&#xD;&#xA;# Summary&#xD;&#xA;&#xD;&#xA;Despite being more complex, consensus systems often will first pick the reserve asset transfer model over asset teleportation, due to the trust issues discussed. However, we could imagine that as the source and destination continue to prove themselves to be trustworthy and cooperative on the reserve, they could then negotiate for an asset teleportation agreement and switch over to that entirely.&#xD;&#xA;&#xD;&#xA;As such, we could in fact think of the reserve asset model as a way to establish a baseline of trust between the source and destination. They could even move into various intermediate arrangements, such as unifying the derivative tokens so that they all get issued by either the source or the destination, instead of having each minting their own derivatives. Whether or not the source and destination will move beyond the reserve asset transfer model is up to them to decide.&#xD;&#xA;&#xD;&#xA;For further reading of XCMs in general, Gavin [has][3] [plenty of][4] [blogposts][5] that describe each component of the XCM in detail. Shawn also [has an excellent video][6] describing how you can craft your first cross-chain messages. Finally, there is also [the XCM specification][7] that is the definitive source of truth on any matters related to XCM.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JLfQp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/PC6Lm.png&#xD;&#xA;  [3]: https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392#cb6d&#xD;&#xA;  [4]: https://medium.com/polkadot-network/xcm-part-ii-versioning-and-compatibility-b313fc257b83&#xD;&#xA;  [5]: https://medium.com/polkadot-network/xcm-part-iii-execution-and-error-management-ceb8155dd166&#xD;&#xA;  [6]: https://www.youtube.com/watch?v=5cgq5jOZx9g&#xD;&#xA;  [7]: https://github.com/paritytech/xcm-format" ContentLicense="CC BY-SA 4.0" />
  <row Id="7859" PostHistoryTypeId="5" PostId="2110" RevisionGUID="f050a0c5-96f1-486e-8b3e-1e458807d54a" CreationDate="2022-04-25T08:37:08.877" UserId="2411" Comment="added 10 characters in body" Text="Currently, I only found a way to interact with smart contracts by [contracts UI](https://paritytech.github.io/contracts-ui).&#xD;&#xA;&#xD;&#xA;Is there an SDK for node.js or some other libraries for an off-chain process to interact with ink! smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7860" PostHistoryTypeId="2" PostId="2111" RevisionGUID="b5b82964-b290-4bc5-b243-b22c7727ca8c" CreationDate="2022-04-25T08:57:27.613" UserId="74" Text="# Issue&#xD;&#xA;We are experiencing a behaviour on our standalone/parachain node where the `Network Bps` on our cloud provider linearly increases throughout the lifecycle of our protocol. The increase continues without restraint until there's a tremendous amount of outbound/inbound traffic, accelerating the costs of the service.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/pzfK0.png&#xD;&#xA;&#xD;&#xA;# Overview of protocol&#xD;&#xA;Every session (6 hours) we run a certain multi-party computation (t-ECDSA DKG) offchain and begin using Substrate's network layer `GossipEngine` to gossip messages as part of the protocol to other peers on the network. This leads us to believe that we should be seeing a *constant* outbound `Bps sent` since we clean up the existing system by replacing it with the execution of a new MPC. However, the graph indicates this is not the case. Instead, it seems like we *are not* cleaning things up and instead every DKG's outbound traffic is compounding on one another.&#xD;&#xA;&#xD;&#xA;## Where we gossip messages&#xD;&#xA;### Gossiping&#xD;&#xA;We gossip messages in 3 different places for some auxiliary protocols we run.&#xD;&#xA;- [For gossiping messages related to the DKG/Sign protocol](https://github.com/webb-tools/dkg-substrate/blob/master/dkg-gadget/src/messages/dkg_message.rs#L168-L171)&#xD;&#xA;- [For gossiping DKG public key for on-chain purposes](https://github.com/webb-tools/dkg-substrate/blob/master/dkg-gadget/src/messages/public_key_gossip.rs#L135-L138)&#xD;&#xA;- [For gossiping misbehaviour reports](https://github.com/webb-tools/dkg-substrate/blob/master/dkg-gadget/src/messages/misbehaviour_report.rs#L141-L144)&#xD;&#xA;&#xD;&#xA;### Validating&#xD;&#xA;In this latest graph we are using the `GossipValidator::validate` function with `ProcessAndDiscard` in hopes of avoiding any unnecessary outbound re-broadcasting. Nonetheless this hasn't fixed the situation.&#xD;&#xA;- [The implementation today is configurable over some # of re-broadcasts](https://github.com/webb-tools/dkg-substrate/blob/master/dkg-gadget/src/gossip.rs#L110-L115)&#xD;&#xA;&#xD;&#xA;Perhaps there's parts of the gossip engine I haven't grasped yet but otherwise what are some recommended ways of handling/debugging these situations? " ContentLicense="CC BY-SA 4.0" />
  <row Id="7862" PostHistoryTypeId="1" PostId="2111" RevisionGUID="b5b82964-b290-4bc5-b243-b22c7727ca8c" CreationDate="2022-04-25T08:57:27.613" UserId="74" Text="Outbound network traffic linearly growing with offchain protocol and recommendations for handling traffic growth" ContentLicense="CC BY-SA 4.0" />
  <row Id="7863" PostHistoryTypeId="3" PostId="2111" RevisionGUID="b5b82964-b290-4bc5-b243-b22c7727ca8c" CreationDate="2022-04-25T08:57:27.613" UserId="74" Text="|substrate-node|offchain|gossip|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7864" PostHistoryTypeId="5" PostId="2006" RevisionGUID="37ae9320-0f0c-49a3-9422-1c413a4fe39d" CreationDate="2022-04-25T09:06:39.850" UserId="380" Comment="added 118 characters in body; edited title" Text="I'm hitting an error when trying to do a cross contract call with two contracts running on substrate branch `monthly-2022-03` and compiled with &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    &quot;language&quot;: &quot;ink! 3.0.0-rc8&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;rustc 1.62.0-nightly&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error is `'encountered error while calling ImportedContract::external_function: NotCallable'`&#xD;&#xA;&#xD;&#xA;The `External` Contract is imported as follows:&#xD;&#xA;&#xD;&#xA;        /// Calls the `External` contract&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn external_fn_wrapper(&amp;self, accountid: AccountId, threshold: u8) -&gt; bool {&#xD;&#xA;            let mut external_instance: ExternalRef = ink_env::call::FromAccountId::from_account_id(self.external_account);&#xD;&#xA;            external_instance.external_function(accountid, threshold).unwrap()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;The function that's trying to be cross-called in the `External` contract is public which I assume means it's callable.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn external_function(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            user: AccountId,&#xD;&#xA;            threshold: u8,&#xD;&#xA;        ) -&gt; Result&lt;bool, Error&gt; {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does anyone have any ideas?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7865" PostHistoryTypeId="4" PostId="2006" RevisionGUID="37ae9320-0f0c-49a3-9422-1c413a4fe39d" CreationDate="2022-04-25T09:06:39.850" UserId="380" Comment="added 118 characters in body; edited title" Text="Why would a cross contract call be giving `NotCallable`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7866" PostHistoryTypeId="5" PostId="2111" RevisionGUID="50bcb947-744d-4b9d-80a6-f81f61018dc2" CreationDate="2022-04-25T09:09:25.713" UserId="74" Comment="added 82 characters in body" Text="# Issue&#xD;&#xA;We are experiencing a behaviour on our standalone/parachain node where the `Network Bps` on our cloud provider linearly increases throughout the lifecycle of our protocol. The increase continues without restraint until there's a tremendous amount of outbound/inbound traffic, accelerating the costs of the service.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/pzfK0.png&#xD;&#xA;&#xD;&#xA;# Overview of protocol&#xD;&#xA;Every session (6 hours) we run a certain multi-party computation (t-ECDSA DKG) offchain and begin using Substrate's network layer `GossipEngine` to gossip messages as part of the protocol to other peers on the network. This leads us to believe that we should be seeing a *constant* outbound `Bps sent` since we clean up the existing system by replacing it with the execution of a new MPC. However, the graph indicates this is not the case. Instead, it seems like we *are not* cleaning things up and instead every DKG's outbound traffic is compounding on one another.&#xD;&#xA;&#xD;&#xA;## Where we gossip messages&#xD;&#xA;### Gossiping&#xD;&#xA;We gossip messages in 3 different places for some auxiliary protocols we run.&#xD;&#xA;- [For gossiping messages related to the DKG/Sign protocol](https://github.com/webb-tools/dkg-substrate/blob/master/dkg-gadget/src/messages/dkg_message.rs#L168-L171)&#xD;&#xA;- [For gossiping DKG public key for on-chain purposes](https://github.com/webb-tools/dkg-substrate/blob/master/dkg-gadget/src/messages/public_key_gossip.rs#L135-L138)&#xD;&#xA;- [For gossiping misbehaviour reports](https://github.com/webb-tools/dkg-substrate/blob/master/dkg-gadget/src/messages/misbehaviour_report.rs#L141-L144)&#xD;&#xA;&#xD;&#xA;### Validating&#xD;&#xA;In this latest graph we are using the `GossipValidator::validate` function with `ProcessAndDiscard` in hopes of avoiding any unnecessary outbound re-broadcasting. Nonetheless this hasn't fixed the situation.&#xD;&#xA;- [The implementation today is configurable over some # of re-broadcasts](https://github.com/webb-tools/dkg-substrate/blob/master/dkg-gadget/src/gossip.rs#L110-L115)&#xD;&#xA;&#xD;&#xA;## Questions&#xD;&#xA;- Perhaps there's parts of the gossip engine I haven't grasped yet but otherwise what are some recommended ways of handling/debugging these situations?&#xD;&#xA;- Are there side-effects I should be aware for the gossip engine?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7867" PostHistoryTypeId="2" PostId="2112" RevisionGUID="62e8bcd7-693f-4e65-98e1-0e122c7d1eb7" CreationDate="2022-04-25T09:27:51.707" UserId="2412" Text="At block 9987733, 1zugcacYFxX3HveFpJVUShjfb3KyaomfVqMTFoxYuUWCdD8 received 11.0711047073 DOT as signaled by a balances/Deposit event ([event link](https://polkadot.subscan.io/extrinsic/9987733-0?event=9987733-562)).&#xD;&#xA;&#xD;&#xA;I don't understand why that account received that money at that block, usually the source of the money is the event's signer but that specific event is unsigned." ContentLicense="CC BY-SA 4.0" />
  <row Id="7869" PostHistoryTypeId="1" PostId="2112" RevisionGUID="62e8bcd7-693f-4e65-98e1-0e122c7d1eb7" CreationDate="2022-04-25T09:27:51.707" UserId="2412" Text="Need help understanding deposit event" ContentLicense="CC BY-SA 4.0" />
  <row Id="7870" PostHistoryTypeId="3" PostId="2112" RevisionGUID="62e8bcd7-693f-4e65-98e1-0e122c7d1eb7" CreationDate="2022-04-25T09:27:51.707" UserId="2412" Text="|polkadot|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7871" PostHistoryTypeId="2" PostId="2113" RevisionGUID="81444b57-127f-47af-800a-aa7a89bb892a" CreationDate="2022-04-25T09:35:01.150" UserId="2140" Text="    pub fn ensure_signed&lt;OuterOrigin, AccountId&gt;(o: OuterOrigin) -&gt; &#xD;&#xA;        Result&lt;AccountId, BadOrigin&gt;&#xD;&#xA;        where OuterOrigin: &#xD;&#xA;            Into&lt;Result&lt;RawOrigin&lt;AccountId&gt;,OuterOrigin&gt;&gt;,&#xD;&#xA;        {&#xD;&#xA;	        match o.into() {&#xD;&#xA;		        Ok(RawOrigin::Signed(t)) =&gt; Ok(t),&#xD;&#xA;		        _ =&gt; Err(BadOrigin),&#xD;&#xA;	    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;1. In which case, do we get the BadOrigin?&#xD;&#xA;&#xD;&#xA;    		type Origin: Into&lt;Result&lt;RawOrigin&lt;Self::AccountId&gt;, &#xD;&#xA;                         Self::Origin&gt;&gt;&#xD;&#xA;			             + From&lt;RawOrigin&lt;Self::AccountId&gt;&gt;&#xD;&#xA;			             + Clone&#xD;&#xA;			             + OriginTrait&lt;Call = Self::Call&gt;;&#xD;&#xA;&#xD;&#xA;2. type Origin is bounded to Into &amp; From trait, I am not sure how to understand this type. Does Into&lt;Result&lt;RawOrigin&lt;Self::AccountId&gt;&gt;&gt; mean whoever implements `impl Into&lt;Result&lt;RawOrigin&lt;Self::AccountId&gt; for &lt;U&gt; or impl From&lt;RawOrigin&lt;Self::AccountId&gt;&gt; for &lt;U&gt;`, then this U can be Origin type? " ContentLicense="CC BY-SA 4.0" />
  <row Id="7873" PostHistoryTypeId="1" PostId="2113" RevisionGUID="81444b57-127f-47af-800a-aa7a89bb892a" CreationDate="2022-04-25T09:35:01.150" UserId="2140" Text="about ensure_signed" ContentLicense="CC BY-SA 4.0" />
  <row Id="7874" PostHistoryTypeId="3" PostId="2113" RevisionGUID="81444b57-127f-47af-800a-aa7a89bb892a" CreationDate="2022-04-25T09:35:01.150" UserId="2140" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7875" PostHistoryTypeId="2" PostId="2114" RevisionGUID="2b17c781-738b-45ef-8d8f-30da65cef1bb" CreationDate="2022-04-25T09:56:08.087" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="7877" PostHistoryTypeId="1" PostId="2114" RevisionGUID="2b17c781-738b-45ef-8d8f-30da65cef1bb" CreationDate="2022-04-25T09:56:08.087" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7878" PostHistoryTypeId="1" PostId="2115" RevisionGUID="540174b1-1509-4aa9-acf3-80a93fa571ab" CreationDate="2022-04-25T09:56:08.087" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="7880" PostHistoryTypeId="2" PostId="2115" RevisionGUID="540174b1-1509-4aa9-acf3-80a93fa571ab" CreationDate="2022-04-25T09:56:08.087" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="7881" PostHistoryTypeId="2" PostId="2116" RevisionGUID="8edb6a3e-3be9-4f51-9822-65ce383bd3f7" CreationDate="2022-04-25T10:06:53.710" UserId="620" Text="It's because that account [reported a GRANDPA equivocation](https://polkadot.subscan.io/extrinsic/9598517-2) and the slash was enacted." ContentLicense="CC BY-SA 4.0" />
  <row Id="7883" PostHistoryTypeId="2" PostId="2117" RevisionGUID="80b9c889-9a03-425d-bc85-e142eb2d0f56" CreationDate="2022-04-25T10:43:59.300" UserId="2414" Text="While I am trying to write code for implementing pow algorithm in Substrate I have been getting some version issue with sp-core. &#xD;&#xA;The error says &quot;failed to select a version for the requirement `sp-core = &quot;^4.0.0-dev&quot;`&#xD;&#xA;candidate versions found which didn't match: 5.0.0&quot; I have tried to change the version multiple times but this error persist on compiling. Can someone point what how to fix this error or guide me where to look for the solution [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VCTfQ.png&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7885" PostHistoryTypeId="1" PostId="2117" RevisionGUID="80b9c889-9a03-425d-bc85-e142eb2d0f56" CreationDate="2022-04-25T10:43:59.300" UserId="2414" Text="failed to select a version for the requirement `sp-core = &quot;^4.0.0-dev&quot;` candidate versions found which didn't match: 5.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="7886" PostHistoryTypeId="3" PostId="2117" RevisionGUID="80b9c889-9a03-425d-bc85-e142eb2d0f56" CreationDate="2022-04-25T10:43:59.300" UserId="2414" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7887" PostHistoryTypeId="2" PostId="2118" RevisionGUID="d107c4c7-f7f1-45cd-af83-efae17e9e769" CreationDate="2022-04-25T11:13:05.277" UserId="2366" Text="You are most likely using sp-core = 4.0.0 in your Cargo.toml. The version has become outdated, the current is 6.0.0 (https://github.com/paritytech/substrate/blob/master/primitives/core/Cargo.toml)&#xD;&#xA;&#xD;&#xA;If you are not directly using it, check your Cargo.lock to see which crate is importing sp-core and update that crate. A good starting point for substrate project is the node template (https://github.com/substrate-developer-hub/substrate-node-template)" ContentLicense="CC BY-SA 4.0" />
  <row Id="7889" PostHistoryTypeId="2" PostId="2119" RevisionGUID="6c14f7e3-4472-41ec-99cb-cd8fbb661641" CreationDate="2022-04-25T11:22:22.743" UserId="1948" Text="tl;dr: the default for public proposal is positive turnout bias.&#xD;&#xA;&#xD;&#xA;If you submit a public proposal to democracy module (as you show in the screenshot above), once it is up for vote, it will be tallied with a positive turnout bias (super majority approve): this means that, in order to be approved a heavy super-majority of `aye` votes is required to carry at low turnouts, but as turnout increases towards 100%, it becomes a simple majority-carries. &#xD;&#xA;&#xD;&#xA;For your proposal to pass you need to lobby for a big turnout: the turnout increase lowers the required `Aye` votes for the proposal to pass." ContentLicense="CC BY-SA 4.0" />
  <row Id="7891" PostHistoryTypeId="2" PostId="2120" RevisionGUID="afcd9d57-e213-4df3-8ed5-3a0c350e1255" CreationDate="2022-04-25T11:46:09.570" UserId="45" Text="In the example presented above, the code seems to call `o.into()`. `into()` comes from the `Into` trait. `o` is of `OuterOrigin` and it is a generic parameter, thus will be determined at the time of a call, by the caller.&#xD;&#xA;&#xD;&#xA;Thus, if the implementation of that type `o.into()` returns any `Err` variant of the `Result` enum, or the variant `Ok` with anything else but `RawOrigin::Signed` then `BadOrigin` will be returned.&#xD;&#xA;&#xD;&#xA;Regarding the second question. This type declaration declares an associated type `Origin`, which is bounded by several traits. That means, that when the trait (I assume you got that line from a trait `Config`) is implemented for some type then the implementer, among other things, has to provide a type into `Origin`, such that it satisfies all the bounds for `Origin`.&#xD;&#xA;&#xD;&#xA;E.g.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl Config for X {&#xD;&#xA;  type Origin = MyOrigin;&#xD;&#xA;  type AccountId = MyAccountId;&#xD;&#xA;  // ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;That type `Y` should have implementations for &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl Into&lt;Result&lt;RawOrigin&lt;MyAccountId&gt;, MyOrigin&gt;&gt; for MyOrigin {&#xD;&#xA;  fn into(self) -&gt; Result&lt;RawOrigin&lt;MyAccountId&gt;&gt; {&#xD;&#xA;    // ...&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl From&lt;RawOrigin&lt;MyAccountId&gt;&gt; for MyOrigin {&#xD;&#xA;  fn from(o: RawOrigin&lt;MyAccountId&gt;) -&gt; MyOrigin {&#xD;&#xA;    // .&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7893" PostHistoryTypeId="2" PostId="2121" RevisionGUID="ece55966-0c9e-4555-be33-fee05c6126d3" CreationDate="2022-04-25T11:59:21.983" UserId="2092" Text="I am trying to aggregate on-chain data in an Off-Chain Worker, e.g. summing transaction fees from the last 24 hrs. This is proposed as one of the central use cases for [Off-Chain Workers][1].&#xD;&#xA;&#xD;&#xA;From my [research][2], it appears that recent blocks can be accessed from the availability store and should eliminate the need to make an external web request. &#xD;&#xA;&#xD;&#xA;However, I have not yet found a clean API for accessing this data. Is there a recommended way to read data from blocks in the Availability Store? If not, are there best practices that should be followed?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/off-chain-features/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/discussions/9701" ContentLicense="CC BY-SA 4.0" />
  <row Id="7895" PostHistoryTypeId="1" PostId="2121" RevisionGUID="ece55966-0c9e-4555-be33-fee05c6126d3" CreationDate="2022-04-25T11:59:21.983" UserId="2092" Text="Accessing On-Chain Data In an Off-Chain Worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="7896" PostHistoryTypeId="3" PostId="2121" RevisionGUID="ece55966-0c9e-4555-be33-fee05c6126d3" CreationDate="2022-04-25T11:59:21.983" UserId="2092" Text="|storage|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7897" PostHistoryTypeId="5" PostId="2121" RevisionGUID="97e1069f-88d4-4319-b986-a57c1ac52726" CreationDate="2022-04-25T12:25:28.413" UserId="2092" Comment="added 1 character in body" Text="I am looking to aggregate On-Chain data in an Off-Chain Worker, e.g. summing transaction fees included in blocks from the last 24 hrs. This is listed as one of the main use cases for [Off-Chain Workers][1].&#xD;&#xA;&#xD;&#xA;From my [research][2], it appears that recent blocks can be accessed from the availability store and should eliminate the need to make an external web request. &#xD;&#xA;&#xD;&#xA;However, I have not yet found a clean API for accessing this data. Is there a recommended way to read data from blocks in the Availability Store? If not, are there best practices that should be followed?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/off-chain-features/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/discussions/9701" ContentLicense="CC BY-SA 4.0" />
  <row Id="7898" PostHistoryTypeId="2" PostId="2122" RevisionGUID="3762f9ec-98b4-4104-be2d-e891bb145b93" CreationDate="2022-04-25T12:44:26.817" UserId="2395" Text="I'm trying to index the names and decimals of tokens in moonbeam, I think I should listen for contract instantiation event to get those data. Which event and module should I listen for? Or is there any other straight forward way to get the data that i'm looking for?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7900" PostHistoryTypeId="1" PostId="2122" RevisionGUID="3762f9ec-98b4-4104-be2d-e891bb145b93" CreationDate="2022-04-25T12:44:26.817" UserId="2395" Text="which event should I listen to get contract instantiation data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7901" PostHistoryTypeId="3" PostId="2122" RevisionGUID="3762f9ec-98b4-4104-be2d-e891bb145b93" CreationDate="2022-04-25T12:44:26.817" UserId="2395" Text="|polkadot|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7902" PostHistoryTypeId="2" PostId="2123" RevisionGUID="91fec89f-c92c-4daf-aac7-4ba12aebccdf" CreationDate="2022-04-25T12:48:36.513" UserId="624" Text="It seems there is a mismatch between autocomplete suggestion return types from an ApiPromise instance and the actual returned type.&#xD;&#xA;&#xD;&#xA;I am using `&quot;@polkadot/api&quot;: &quot;8.1.1&quot;`. I am writing some typescript tests for some custom api.derive methods for a substrate node. I have generated the custom types and methods following https://polkadot.js.org/docs/api/examples/promise/typegen/ as a guideline. &#xD;&#xA;&#xD;&#xA;When I wish to use these derives, my editor properly autocompletes methods:&#xD;&#xA;[![Typescript autocomplete custom types][1]][1]&#xD;&#xA;&#xD;&#xA;However, when I attempt to access methods such as unwrap on the Option&lt;&gt; type following the [docs](https://polkadot.js.org/docs/api/start/types.basics/#working-with-optiontype), I get the following issue in my typescript compiler:&#xD;&#xA;&#xD;&#xA;[![Typescript complaints about Codec][2]][2]&#xD;&#xA;&#xD;&#xA;Does anyone have some hints as to why every return type from the ApiPromise is returning a base `Codec` instead of the desired type?&#xD;&#xA;&#xD;&#xA;-------&#xD;&#xA;&#xD;&#xA;Other notes:&#xD;&#xA;&#xD;&#xA;- The typegen docs example and scripts seem to be a bit out of date. I have an auto-generated `types-lookup.ts` file which has defined all of my custom types. I have tried exposing it in my `tsconfig.json` like so:&#xD;&#xA;```&#xD;&#xA;&quot;@polkadot/types/lookup&quot;: [&#xD;&#xA;    &quot;packages/types/src/interfaces/types-lookup.ts&quot;&#xD;&#xA;],&#xD;&#xA;&quot;@polkadot/api/augment&quot;: [&quot;packages/types/src/interfaces/augment-api.ts&quot;],&#xD;&#xA;&quot;@polkadot/types/augment&quot;: [&quot;packages/types/src/interfaces/augment-types.ts&quot;],&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cbyG2.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/UMKCg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7904" PostHistoryTypeId="1" PostId="2123" RevisionGUID="91fec89f-c92c-4daf-aac7-4ba12aebccdf" CreationDate="2022-04-25T12:48:36.513" UserId="624" Text="Custom typegen and using ApiPromise: Property 'unwrap' does not exist on type 'Codec'" ContentLicense="CC BY-SA 4.0" />
  <row Id="7905" PostHistoryTypeId="3" PostId="2123" RevisionGUID="91fec89f-c92c-4daf-aac7-4ba12aebccdf" CreationDate="2022-04-25T12:48:36.513" UserId="624" Text="|polkadot-js|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7906" PostHistoryTypeId="5" PostId="2121" RevisionGUID="823d259e-4d9a-4e3f-a7bb-9405c7c111a3" CreationDate="2022-04-25T12:49:09.260" UserId="2092" Comment="added 37 characters in body" Text="I am looking to aggregate On-Chain data in an Off-Chain Worker, e.g. summing transaction fees included in blocks from the last 24 hrs. This is listed as one of the main use cases for [Off-Chain Workers][1].&#xD;&#xA;&#xD;&#xA;However, I have not yet found a clean API for accessing this data. Is there a recommended way to read data from locally stored blocks? If not, are there best practices that should be followed? If possible, I would like to eliminate the need to make an external web request. &#xD;&#xA;&#xD;&#xA;[Note]: As mentioned below, the [availability store][2] is only on Polkadot and does not exist for general Substrate chains.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/off-chain-features/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/discussions/9701" ContentLicense="CC BY-SA 4.0" />
  <row Id="7907" PostHistoryTypeId="2" PostId="2124" RevisionGUID="703946f4-9f8b-46e1-a41c-f9b83611691b" CreationDate="2022-04-25T13:13:08.283" UserId="2311" Text="We are running into an allocator memory error where the number of heap pages appears to be insufficient to run a transaction on our validator (substrate-node). &#xD;&#xA;&#xD;&#xA;This is the error in question:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-04-25 13:10:40 Evicting failed runtime instance: Runtime panicked: Failed to allocate memory: &quot;Allocator ran out of space&quot;&#xD;&#xA;2022-04-25 13:10:40 Essential task `transaction-pool-task-0` failed. Shutting down service.&#xD;&#xA;^C^C2022-04-25 13:10:42 running out of space with current bumper 135395720, mem size 135397376&#xD;&#xA;&#xD;&#xA;====================&#xD;&#xA;&#xD;&#xA;Version: 4.0.0-dev-e9702fe-x86_64-linux-gnu&#xD;&#xA;&#xD;&#xA;   0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:702:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14&#xD;&#xA;   6: core::result::unwrap_failed&#xD;&#xA;             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/result.rs:1749:5&#xD;&#xA;   7: tracing::span::Span::in_scope&#xD;&#xA;   8: sp_io::allocator::ExtAllocatorMallocVersion1::call&#xD;&#xA;   9: &lt;core::panic::unwind_safe::AssertUnwindSafe&lt;F&gt; as core::ops::function::FnOnce&lt;()&gt;&gt;::call_once&#xD;&#xA;  10: &lt;F as wasmtime::func::IntoFunc&lt;T,(wasmtime::func::Caller&lt;T&gt;,A1),R&gt;&gt;::into_func::wasm_to_host_shim&#xD;&#xA;  11: &lt;unknown&gt;&#xD;&#xA;  12: &lt;unknown&gt;&#xD;&#xA;  13: &lt;unknown&gt;&#xD;&#xA;  14: &lt;unknown&gt;&#xD;&#xA;  15: &lt;unknown&gt;&#xD;&#xA;  16: &lt;unknown&gt;&#xD;&#xA;  17: &lt;unknown&gt;&#xD;&#xA;  18: &lt;unknown&gt;&#xD;&#xA;  19: wasmtime_runtime::traphandlers::catch_traps::call_closure&#xD;&#xA;  20: wasmtime_setjmp&#xD;&#xA;  21: wasmtime_runtime::traphandlers::catch_traps&#xD;&#xA;  22: wasmtime::func::invoke_wasm_and_catch_traps&#xD;&#xA;  23: wasmtime::func::typed::TypedFunc&lt;Params,Results&gt;::call&#xD;&#xA;  24: sc_executor_wasmtime::instance_wrapper::EntryPoint::call&#xD;&#xA;  25: sc_executor_wasmtime::runtime::perform_call&#xD;&#xA;  26: &lt;sc_executor_wasmtime::runtime::WasmtimeInstance&lt;H&gt; as sc_executor_common::wasm_runtime::WasmInstance&gt;::call&#xD;&#xA;  27: sc_executor_common::wasm_runtime::WasmInstance::call_export&#xD;&#xA;  28: std::panicking::try&#xD;&#xA;  29: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  30: sc_executor::native_executor::WasmExecutor&lt;H&gt;::with_instance::{{closure}}&#xD;&#xA;  31: sc_executor::wasm_runtime::RuntimeCache::with_instance&#xD;&#xA;  32: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_aux&#xD;&#xA;  33: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_using_consensus_failure_handler&#xD;&#xA;  34: &lt;sc_service::client::call_executor::LocalCallExecutor&lt;Block,B,E&gt; as sc_client_api::call_executor::CallExecutor&lt;Block&gt;&gt;::contextual_call&#xD;&#xA;  35: &lt;sc_service::client::client::Client&lt;B,E,Block,RA&gt; as sp_api::CallApiAt&lt;Block&gt;&gt;::call_api_at&#xD;&#xA;  36: sp_api::runtime_decl_for_Core::initialize_block_call_api_at&#xD;&#xA;  37: &lt;node_template_runtime::RuntimeApiImpl&lt;__SR_API_BLOCK__,RuntimeApiImplCall&gt; as sp_api::Core&lt;__SR_API_BLOCK__&gt;&gt;::Core_initialize_block_runtime_api_impl&#xD;&#xA;  38: sp_api::Core::initialize_block&#xD;&#xA;  39: tracing::span::Span::in_scope&#xD;&#xA;  40: sc_transaction_pool::api::validate_transaction_blocking&#xD;&#xA;  41: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  42: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  43: &lt;futures_util::future::future::map::Map&lt;Fut,F&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  44: &lt;sc_service::task_manager::prometheus_future::PrometheusFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  45: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  46: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  47: tokio::park::thread::CachedParkThread::block_on&#xD;&#xA;  48: tokio::runtime::handle::Handle::block_on&#xD;&#xA;  49: &lt;tokio::runtime::blocking::task::BlockingTask&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  50: tokio::runtime::task::harness::Harness&lt;T,S&gt;::poll&#xD;&#xA;  51: tokio::runtime::blocking::pool::Inner::run&#xD;&#xA;  52: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  53: core::ops::function::FnOnce::call_once{{vtable.shim}}&#xD;&#xA;  54: &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1853:9&#xD;&#xA;      &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1853:9&#xD;&#xA;      std::sys::unix::thread::Thread::new::thread_start&#xD;&#xA;             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys/unix/thread.rs:108:17&#xD;&#xA;  55: start_thread&#xD;&#xA;  56: clone&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'Failed to allocate memory: &quot;Allocator ran out of space&quot;', /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/io/src/lib.rs:1284&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To resolve this, we are looking at increasing the number of heap pages on this line in `Service.rs`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	let executor = NativeElseWasmExecutor::&lt;ExecutorDispatch&gt;::new(&#xD;&#xA;		config.wasm_method,&#xD;&#xA;		config.default_heap_pages,&#xD;&#xA;		config.max_runtime_instances,&#xD;&#xA;		config.runtime_cache_size,&#xD;&#xA;	);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The question is we do not know what this value is, as the documentation only says &quot;default number of 64KB pages to allocate for wasm execution&quot;: https://docs.substrate.io/rustdocs/latest/sc_service/config/struct.Configuration.html#structfield.default_heap_pages&#xD;&#xA;&#xD;&#xA;Any idea what the current value is of this variable? Alternatively, can we increase it sufficiently?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7909" PostHistoryTypeId="1" PostId="2124" RevisionGUID="703946f4-9f8b-46e1-a41c-f9b83611691b" CreationDate="2022-04-25T13:13:08.283" UserId="2311" Text="How to change the number of heap pages" ContentLicense="CC BY-SA 4.0" />
  <row Id="7910" PostHistoryTypeId="3" PostId="2124" RevisionGUID="703946f4-9f8b-46e1-a41c-f9b83611691b" CreationDate="2022-04-25T13:13:08.283" UserId="2311" Text="|frame|substrate-node-template|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7911" PostHistoryTypeId="2" PostId="2125" RevisionGUID="7d5be983-d949-4139-8674-516095590918" CreationDate="2022-04-25T13:24:01.883" UserId="2311" Text="We figured it out with help from @CustomBlink, the default value is &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Substrate: client/executor/src/native_executor.rs: Lines 51-52:&#xD;&#xA;51    /// Default num of pages for the heap&#xD;&#xA;52    const DEFAULT_HEAP_PAGES: u64 = 2048&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7913" PostHistoryTypeId="2" PostId="2126" RevisionGUID="ad7f9d13-5e20-4780-bee1-bc222b958f7a" CreationDate="2022-04-25T13:37:54.873" UserId="2102" Text="I think [substrate-archive][1] is the most reliable one when it comes to performance. It is connected directly to the RocksDB, therefore its processing time is way faster than other applications that rely on RPC calls. &#xD;&#xA;&#xD;&#xA;Of course it has its own caveats, for example, substrate-archive doesn't store events or results from extrinsics, making it harder to determine if the extrinsics registered in the PostgresDB succeed or not. &#xD;&#xA;&#xD;&#xA;[Subsquid][2] is also a good indexer but even thought it says that it is built on top of substrate archive, it only takes the idea from it, and creates an indexer that is basically querying the node for each block that it is being processed. If you overload the substrate-node with transactions using, for example, [sub-flood][3], the subsquid indexer tends to slow down and it can cause the indexing process to be way behind the latest state of the chain. The good thing about subsquid is that it stores only finalized data, so you don't have to deal with finalization or else.&#xD;&#xA;&#xD;&#xA;I think the best solution could be a combination of substrate-archive and maybe another process running next to it to enrich the already indexed information, adding events and extrinsic execution results, for example.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-archive&#xD;&#xA;  [2]: https://github.com/subsquid/squid-template&#xD;&#xA;  [3]: https://github.com/paritytech/sub-flood" ContentLicense="CC BY-SA 4.0" />
  <row Id="7917" PostHistoryTypeId="5" PostId="2126" RevisionGUID="6a0277db-5506-4dee-8cdc-02847f3ead16" CreationDate="2022-04-25T14:20:10.210" UserId="29" Comment="deleted 1 character in body" Text="I think [substrate-archive][1] is the most reliable one when it comes to performance. It is connected directly to the RocksDB, therefore its processing time is way faster than other applications that rely on RPC calls. &#xD;&#xA;&#xD;&#xA;Of course it has its own caveats, for example, substrate-archive doesn't store events or results from extrinsics, making it harder to determine if the extrinsics registered in the PostgresDB succeed or not. &#xD;&#xA;&#xD;&#xA;[Subsquid][2] is also a good indexer but even though it says that it is built on top of substrate archive, it only takes the idea from it, and creates an indexer that is basically querying the node for each block that it is being processed. If you overload the substrate-node with transactions using, for example, [sub-flood][3], the subsquid indexer tends to slow down and it can cause the indexing process to be way behind the latest state of the chain. The good thing about subsquid is that it stores only finalized data, so you don't have to deal with finalization or else.&#xD;&#xA;&#xD;&#xA;I think the best solution could be a combination of substrate-archive and maybe another process running next to it to enrich the already indexed information, adding events and extrinsic execution results, for example.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-archive&#xD;&#xA;  [2]: https://github.com/subsquid/squid-template&#xD;&#xA;  [3]: https://github.com/paritytech/sub-flood" ContentLicense="CC BY-SA 4.0" />
  <row Id="7918" PostHistoryTypeId="2" PostId="2127" RevisionGUID="e702658c-3c89-4d73-9758-925fbbc38cb4" CreationDate="2022-04-25T14:21:41.380" UserId="45" Text="Modifying the client code probably is one way.&#xD;&#xA;&#xD;&#xA;However, the canonical way is to alter the number of extra pages mounted is to change the value of [`:heappages`](https://github.com/paritytech/substrate/blob/01a3ad65d933cc58e79c04d114edb4d6c69b470a/primitives/storage/src/lib.rs#L197) in the storage.&#xD;&#xA;&#xD;&#xA;The number is SCALE-encoded u64. The u64 is not compact-encoded, so it's just 8 byte integer encoded as little-endian.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7920" PostHistoryTypeId="2" PostId="2128" RevisionGUID="0e307ad2-ee51-4101-aed8-4cad64d34655" CreationDate="2022-04-25T14:22:39.577" UserId="2417" Text="Is this [polkadot.js](https://polkadot.js.org/docs/api-contract) what you need?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7922" PostHistoryTypeId="2" PostId="2129" RevisionGUID="37591ed1-21fe-4a25-9474-e5a13709c80a" CreationDate="2022-04-25T14:31:46.143" UserId="425" Text="There is very little information to be found on `static` parameter types. All I could find is a [docstring][1] that says: In testing, `StaticArgument` can be altered later: `StaticArgument::set(8)`.&#xD;&#xA;&#xD;&#xA;I need to alter a parameter in benchmarking code to be able to benchmark a specific path Pallet config:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;  type HeadersToKeep: Get&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the runtime code the parameter is declared as `static`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;    pub static HeadersToKeepArgument: u32 = 1000;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Passed to the config:&#xD;&#xA;&#xD;&#xA;impl my_pallet::Config for Runtime {&#xD;&#xA;    type HeadersToKeep = HeadersToKeepArgument;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I want to set it's value to execute a benchmark code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;benchmarks! {&#xD;&#xA;&#xD;&#xA;  benchmark_with_pruning {&#xD;&#xA;&#xD;&#xA;    let _ = T::HeadersToKeep::set(3);&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;  }: foo(RawOrigin::Signed(caller.clone()))&#xD;&#xA;&#xD;&#xA;  verify {&#xD;&#xA;   ...&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;75 |         let _ = T::HeadersToKeep::set(3);&#xD;&#xA;   |                                   ^^^ function or associated item cannot be called on `&lt;T as pallet::Config&gt;::HeadersToKeep` due to unsatisfied trait bounds&#xD;&#xA;   |&#xD;&#xA;   = note: the following trait bounds were not satisfied:&#xD;&#xA;           `&lt;T as pallet::Config&gt;::HeadersToKeep: frame_support::storage::generator::StorageValue&lt;_&gt;`&#xD;&#xA;           which is required by `&lt;T as pallet::Config&gt;::HeadersToKeep: frame_support::StorageValue&lt;_&gt;`&#xD;&#xA;           `&amp;&lt;T as pallet::Config&gt;::HeadersToKeep: frame_support::storage::generator::StorageValue&lt;_&gt;`&#xD;&#xA;           which is required by `&amp;&lt;T as pallet::Config&gt;::HeadersToKeep: frame_support::StorageValue&lt;_&gt;`&#xD;&#xA;           `&amp;mut &lt;T as pallet::Config&gt;::HeadersToKeep: frame_support::storage::generator::StorageValue&lt;_&gt;`&#xD;&#xA;           which is required by `&amp;mut &lt;T as pallet::Config&gt;::HeadersToKeep: frame_support::StorageValue&lt;_&gt;`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/polkadot-v0.9.13/frame/support/src/lib.rs#L351" ContentLicense="CC BY-SA 4.0" />
  <row Id="7924" PostHistoryTypeId="1" PostId="2129" RevisionGUID="37591ed1-21fe-4a25-9474-e5a13709c80a" CreationDate="2022-04-25T14:31:46.143" UserId="425" Text="Setting static parameter types in benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="7925" PostHistoryTypeId="3" PostId="2129" RevisionGUID="37591ed1-21fe-4a25-9474-e5a13709c80a" CreationDate="2022-04-25T14:31:46.143" UserId="425" Text="|pallet|runtime|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7926" PostHistoryTypeId="2" PostId="2130" RevisionGUID="7d4fabd0-957c-47dd-810a-83f5a329810b" CreationDate="2022-04-25T14:39:23.350" UserId="448" Text="My build was working last week now I can't build rocksdb for some reason.&#xD;&#xA;&#xD;&#xA;I made sure that I went though the [install steps](https://docs.substrate.io/v3/getting-started/installation/) again in case I was missing something.&#xD;&#xA;&#xD;&#xA;Here's the rest of the out:&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `librocksdb-sys v6.20.3`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/christian/something/target/release/build/librocksdb-sys-da8801d786dd32a1/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  cargo:rerun-if-changed=rocksdb/&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  CXX_x86_64-unknown-linux-gnu = None&#xD;&#xA;  CXX_x86_64_unknown_linux_gnu = None&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  CXX = None&#xD;&#xA;  CXXFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  CXXFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,llvm14-builtins-abi,sse,sse2&quot;)&#xD;&#xA;  CXX_x86_64-unknown-linux-gnu = None&#xD;&#xA;  CXX_x86_64_unknown_linux_gnu = None&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  CXX = None&#xD;&#xA;  CXXFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  CXXFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,llvm14-builtins-abi,sse,sse2&quot;)&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/blob/blob_file_builder.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_builder.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/arena_wrapped_db_iter.o&quot; &quot;-c&quot; &quot;rocksdb/db/arena_wrapped_db_iter.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/cache/cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/cache.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/blob/blob_file_cache.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_cache.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/cache/sharded_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/sharded_cache.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/cache/lru_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/lru_cache.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/cache/clock_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/clock_cache.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/blob/blob_file_addition.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_addition.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/blob/blob_file_garbage.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_garbage.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/blob/blob_file_meta.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_meta.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/blob/blob_file_reader.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_reader.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/blob/blob_log_format.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_log_format.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/blob/blob_log_sequential_reader.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_log_sequential_reader.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/blob/blob_log_writer.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_log_writer.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/builder.o&quot; &quot;-c&quot; &quot;rocksdb/db/builder.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/c.o&quot; &quot;-c&quot; &quot;rocksdb/db/c.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/column_family.o&quot; &quot;-c&quot; &quot;rocksdb/db/column_family.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/compaction/compaction.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/compaction/compaction_iterator.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction_iterator.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/compaction/compaction_job.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction_job.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/compaction/compaction_picker.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction_picker.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/compaction/compaction_picker_fifo.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction_picker_fifo.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/compaction/compaction_picker_level.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction_picker_level.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/compaction/compaction_picker_universal.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction_picker_universal.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/compaction/sst_partitioner.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/sst_partitioner.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/convenience.o&quot; &quot;-c&quot; &quot;rocksdb/db/convenience.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/db_filesnapshot.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_filesnapshot.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/db_impl/compacted_db_impl.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_impl/compacted_db_impl.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/db_impl/db_impl.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_impl/db_impl.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/db_impl/db_impl_compaction_flush.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_impl/db_impl_compaction_flush.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/db_impl/db_impl_debug.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_impl/db_impl_debug.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/db_impl/db_impl_experimental.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_impl/db_impl_experimental.cc&quot;&#xD;&#xA;  cargo:warning=c++: internal compiler error: Killed (program cc1plus)&#xD;&#xA;  cargo:warning=Please submit a full bug report,&#xD;&#xA;  cargo:warning=with preprocessed source if appropriate.&#xD;&#xA;  cargo:warning=See &lt;file:///usr/share/doc/gcc-7/README.Bugs&gt; for instructions.&#xD;&#xA;  exit status: 4&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/db_impl/db_impl_files.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_impl/db_impl_files.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  error occurred: Command &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++11&quot; &quot;-Wno-unused-parameter&quot; &quot;-msse2&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-o&quot; &quot;/home/christian/something/target/release/build/librocksdb-sys-53fb9acd9310b761/out/rocksdb/db/compaction/compaction_job.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction_job.cc&quot; with args &quot;c++&quot; did not execute successfully (status code exit status: 4).&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I run rustup show:&#xD;&#xA;```&#xD;&#xA;rustup show                                                                                     git:master*&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /home/christian/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.60.0 (7737e0b5c 2022-04-04)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7928" PostHistoryTypeId="1" PostId="2130" RevisionGUID="7d4fabd0-957c-47dd-810a-83f5a329810b" CreationDate="2022-04-25T14:39:23.350" UserId="448" Text="failed to run custom build command for `librocksdb-sys v6.20.3`" ContentLicense="CC BY-SA 4.0" />
  <row Id="7929" PostHistoryTypeId="3" PostId="2130" RevisionGUID="7d4fabd0-957c-47dd-810a-83f5a329810b" CreationDate="2022-04-25T14:39:23.350" UserId="448" Text="|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7930" PostHistoryTypeId="2" PostId="2131" RevisionGUID="9afa07e4-c311-41c3-b11d-59314096fb2a" CreationDate="2022-04-25T14:53:23.813" UserId="85" Text="If you want a bit more pure rust then you can enable the feature `with-parity-db` and it won't use rocksdb.&#xD;&#xA;&#xD;&#xA;Alternatively if you look in `shell.nix` you can see we set up these env vars:  &#xD;&#xA;```&#xD;&#xA;  RUST_SRC_PATH = &quot;${rust-nightly}/lib/rustlib/src/rust/src&quot;;&#xD;&#xA;  LIBCLANG_PATH = &quot;${llvmPackages.libclang.lib}/lib&quot;;&#xD;&#xA;  PROTOC = &quot;${protobuf}/bin/protoc&quot;;&#xD;&#xA;  ROCKSDB_LIB_DIR = &quot;${rocksdb}/lib&quot;;&#xD;&#xA;```&#xD;&#xA;Assuming you've installed rocksdb then `ROCKSDB_LIB_DIR` is probably what your missing. (I'm on nixos so everything works for me)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7932" PostHistoryTypeId="6" PostId="2130" RevisionGUID="0d8974a8-6463-433f-9a0f-b1c94ba50f05" CreationDate="2022-04-25T14:53:41.633" UserId="85" Comment="edited tags" Text="|build|rocksdb|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7933" PostHistoryTypeId="6" PostId="2124" RevisionGUID="e31491c6-3e7b-469f-a5c8-b653905a5972" CreationDate="2022-04-25T14:54:58.490" UserId="85" Comment="edited tags" Text="|frame|substrate-node-template|wasm|memory|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7934" PostHistoryTypeId="6" PostId="2111" RevisionGUID="721f049b-76af-4c67-8c82-0c2a0b23c325" CreationDate="2022-04-25T14:55:24.320" UserId="85" Comment="edited tags" Text="|substrate-node|networking|offchain|gossip|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7935" PostHistoryTypeId="2" PostId="2132" RevisionGUID="11f838a9-cd9d-41df-8ce9-25ea3848432a" CreationDate="2022-04-25T15:11:33.037" UserId="380" Text="I think this was because I was calling a mutable function from a non-mutable function using a read. I changed the definition of `external_function` to be non-mutating, ran `cargo clean` in the cross calling contract, redeployed, and then it started to work.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn external_function(&#xD;&#xA;            &amp;self, // mut is gone&#xD;&#xA;        ...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="7938" PostHistoryTypeId="2" PostId="2133" RevisionGUID="b2accc45-89c1-4310-b626-214daee88886" CreationDate="2022-04-25T15:19:07.687" UserId="73" Text="You can implement a custom [`SignedExtension`][1] in your runtime that handles this job for you.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;struct PrioritizeAccount;&#xD;&#xA;&#xD;&#xA;impl SignedExtension for PrioritizeAccount {&#xD;&#xA;    type AccountId = AccountId;&#xD;&#xA;    type Call = Call;&#xD;&#xA;    type AdditionalSigned = ();&#xD;&#xA;    type Pre = ();&#xD;&#xA;&#xD;&#xA;    fn validate(&#xD;&#xA;        who: &amp;Self::AccountId, &#xD;&#xA;        _call: &amp;Self::Call, &#xD;&#xA;        _info: &amp;DispatchInfoOf&lt;Self::Call&gt;, &#xD;&#xA;        _len: usize,&#xD;&#xA;    ) -&gt; TransactionValidity {&#xD;&#xA;        if who == special_account {&#xD;&#xA;             Ok(ValidTransaction { priority: TransactionValidity::MAX, ..Default::default() })&#xD;&#xA;        } else {&#xD;&#xA;             Ok(Default::default())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Something like this should do the trick. Then you need to add this to your `SignedExtra` in your runtime `lib.rs` file. But whatever logic you write there, you need to ensure that it is safe and DOS resistant. Otherwise someone could may spam your chain.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.SignedExtension.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="7940" PostHistoryTypeId="2" PostId="2134" RevisionGUID="02d3b66d-0cea-4840-ba7f-c878358000b8" CreationDate="2022-04-25T17:05:19.243" UserId="85" Text="You have it spot on. If Karura, Bifrost and Moonriver all open xcm channel with each other, $stKAR on Bifrost's sovereign account on statemint can be transfered to Moonriver's sovereign account on statemint and then Moonriver's soverign account can transfer those back to Karura's sovereign account completing the circle. At each point whichever chain's account has the tokens will mint some derivatives to represent them on their local chain and then burn them when they reserve transfer them on to another chain.&#xD;&#xA;&#xD;&#xA;I say $smKAR rather than $KAR because $KAR only exists on the Karura chain. Karaura would have to mint an asset on statemint that it could then reserve transfer around (while never actually leaving statemint). This would be fine as the Karura parachain would be trusted to have the power to mint $KSR and so would be trusted to have mint rights to $smKSR. I.e. Karura and statemint trust each other enough that they can effectively teleport. (Maybe a parachain should be able to teleport any asset that they are able to mint on statemint of to make this simpler? I shall confer on this...).&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7942" PostHistoryTypeId="5" PostId="2099" RevisionGUID="bd61dd8b-197d-4cab-9119-627ed3d40c46" CreationDate="2022-04-25T17:26:26.450" UserId="34" Comment="tags updated for search" Text="I'm trying to implement simple PoW for my node. After debugging all other stuff I've encountered the problem where `finality-grandpa` and `storage` do not get compiled because standard library macros are (for some reason) out of scope.&#xD;&#xA;&#xD;&#xA;I've checked that `std` features and enabled for all dependencies where they need to be enabled. Also I found [this](https://doc.rust-lang.org/cargo/reference/features-examples.html?highlight=no-std#:~:text=full%20standard%20library.-,The%20wasm%2Dbindgen,-package%20defines%20a) information about one of the dependencies. But as it's a non-local (pulled from github) I can't change that functionality.&#xD;&#xA;&#xD;&#xA;Please note that I did not modify any of these two pallets (just imported my own, implementing PoW). Before that (on clear substrate-node-template which I use as a base for my project) those built without any problem.  &#xD;&#xA;&#xD;&#xA;The question is: How do I fix this? Should I enable `std` for these crates somehow? &#xD;&#xA;As far as I know, the node is built into native Rust and WASM, and for WASM it's built in no-std. By why did it build before in this case?  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a [link](https://pastebin.com/1YfwG4Qx) to a part of the error message I get.  &#xD;&#xA;And here is a [link](https://github.com/CREESTL/Crain) to the repo with my last changes&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7943" PostHistoryTypeId="4" PostId="2099" RevisionGUID="bd61dd8b-197d-4cab-9119-627ed3d40c46" CreationDate="2022-04-25T17:26:26.450" UserId="34" Comment="tags updated for search" Text="How to enable `std` features in pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7944" PostHistoryTypeId="6" PostId="2099" RevisionGUID="bd61dd8b-197d-4cab-9119-627ed3d40c46" CreationDate="2022-04-25T17:26:26.450" UserId="34" Comment="tags updated for search" Text="|runtime|substrate-node-template|wasm|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7945" PostHistoryTypeId="24" PostId="2099" RevisionGUID="bd61dd8b-197d-4cab-9119-627ed3d40c46" CreationDate="2022-04-25T17:26:26.450" Comment="Proposed by 34 approved by 2408 edit id of 169" ContentLicense="CC BY-SA 4.0" />
  <row Id="7946" PostHistoryTypeId="52" PostId="2112" RevisionGUID="3ffac2fd-834d-4fb2-a3ec-751569efadaf" CreationDate="2022-04-25T17:28:10.547" />
  <row Id="7949" PostHistoryTypeId="2" PostId="2135" RevisionGUID="3880db73-6e12-4386-aa0e-9bc189a21aa4" CreationDate="2022-04-25T20:20:37.837" UserId="83" Comment="added 34 characters in body; deleted 2 characters in body" Text="# Luke Schoen might not get things right and might not be the best coder but he's loyal and tries hard and he'll stick around to make the community that's nurtured him a success" ContentLicense="CC BY-SA 4.0" />
  <row Id="7955" PostHistoryTypeId="52" PostId="2124" RevisionGUID="6e6a5a83-ecd0-4d9c-bfaa-443d7cc3e984" CreationDate="2022-04-25T21:13:18.780" />
  <row Id="7956" PostHistoryTypeId="2" PostId="2137" RevisionGUID="c13ea4f1-2f42-4ab6-a523-2c572e0e00da" CreationDate="2022-04-25T21:32:13.217" UserId="28" Text="I am core developer and community contributor of the Substrate and Polkadot ecosystem. I am passionate about the success of developers trying to build the future of Web3 with these technologies.&#xD;&#xA;&#xD;&#xA;I work at Parity Technologies, the company that originally created these products. I lead the FRAME team and the Documentation / Developer Experience team.&#xD;&#xA;&#xD;&#xA;User feedback is critical to me to improve FRAME, so a role like moderating the StackExchange would already be a natural part of my daily activities. I also want to take the opportunity to find ways for the StackExchange and documentation facilitate one another, ultimately leading to more users being successful in our ecosystem.&#xD;&#xA;&#xD;&#xA;I have been an active contributor in the past on StackOverflow and the Ethereum StackExchange. I was the one who initially proposed this Substrate and Polkadot StackExchange. I have also been the single highest contributor to dedicated Substrate and Polkadot support channels predating this StackExchange community.&#xD;&#xA;&#xD;&#xA;If I were to be voted into this role, you should know that I will spend all my energy driving forward the success of developers and users, and by extension the success of this community." ContentLicense="CC BY-SA 4.0" />
  <row Id="7959" PostHistoryTypeId="5" PostId="38" RevisionGUID="1cc996ff-8453-450d-b539-d7c0618731ec" CreationDate="2022-04-25T22:39:04.997" UserId="104" Comment="added 7 characters in body" Text="There are two main ways in which assets are transferred between consensus systems in XCM. They are namely via **Asset Teleportation** or via **Reserve Asset Transfers**.&#xD;&#xA;&#xD;&#xA;First of all, a preamble -- XCM instructions are always going to be interpreted according to the consensus system that executes them, and so for all of the instructions that I am going to explain below, *always* remember that the exact behaviour may change depending on which consensus system processes them. What I would hence be describing are the basic behaviours that you can expect each consensus system to possess, regardless of their peculiarities.&#xD;&#xA;&#xD;&#xA;With that said, I am going to describe the intricacies with the two asset transfer models below.&#xD;&#xA;&#xD;&#xA;# Asset Teleportation #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Asset Teleportation][1]][1]&#xD;&#xA;&#xD;&#xA;We start with the easier and more straightforward of the two -- Asset Teleportation. As you can see from the diagram above, there are only 2 actors within this model: the source and the destination. The way in which we transfer assets between the source and the destination are briefly summarized in the numbered labels on the diagram, and are explained in more detail below:&#xD;&#xA;&#xD;&#xA;### 1. InitiateTeleport ###&#xD;&#xA;The source gathers the assets to be teleported from the sending account and **takes them out of the circulating supply**, taking note of the total amount of assets that was taken out.&#xD;&#xA;&#xD;&#xA;### 2. ReceiveTeleportedAssets ###&#xD;&#xA;The source then creates an XCM instruction called &quot;ReceiveTeleportedAssets&quot; and puts the amount of assets taken out of circulation and the receiving account as parameters to this instruction. It then sends this instruction over to the destination, where it gets processed and new assets gets **put back into circulating supply** accordingly.&#xD;&#xA;&#xD;&#xA;### 3. DepositAsset ###&#xD;&#xA;The destination then deposits the assets to the receiving account of the asset.&#xD;&#xA;&#xD;&#xA;The phrases **taken out of circulating supply** and **put back into circulating supply** are highlighted above to firstly give an indication of how much flexibility an XCM executor has in implementing the semantics of taking an asset out of and putting it back into its circulating supply. The straightforward answer is to burn the assets to take them out of circulation, but one can imagine that there are indeed multiple methods of achieving the same goal, such as transferring the assets locally to an inaccessible account, and likewise for putting assets back to circulation -- the receiving consensus system can freely choose to implement such semantics by releasing assets from a pre-filled and inaccessible treasury of the assets transferred, or perform a mint of the assets.&#xD;&#xA;&#xD;&#xA;As such, the above also gives a hint on the disadvantages of this model -- it requires both the source and destination of have a high level of mutual trust. The destination must trust that the source has appropriately removed the assets that was sent over from the circulating supply, and the source must also trust the destination to put the assets that was taken out of circulation back into circulation. The result of an asset teleportation should result in the same circulating supply of the asset. **Failing to uphold either of these two conditions will result in a change in the asset's total issuance (in the case of fungible tokens) or a complete loss/duplication of an NFT.**&#xD;&#xA;&#xD;&#xA;# Reserve Asset Transfer #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Reserve Asset Transfer][2]][2]&#xD;&#xA;&#xD;&#xA;For consensus systems that don't have the level of trust required for asset teleportation, they can instead opt for trusting a 3rd entity called the reserve to store the real assets (think Statemine on Kusama or Statemint on Polkadot). What this entails is that the source and destination will have to create some sort of mechanism to keep track of the assets that they own on the reserve, and this is usually done by minting a new derivative token. As a corollary, both the source and destination must have accounts on the reserve -- we'll refer to such accounts owned by the source/destination as Sovereign Accounts.&#xD;&#xA;&#xD;&#xA;Below are the steps in which a reserve asset transfer undergoes in order to transfer assets from the source to the destination:&#xD;&#xA;&#xD;&#xA;### 1. InitiateReserveWithdraw ###&#xD;&#xA;The source gathers the derivative assets to be transferred from the sending account and burns them, taking note of the amount of derivatives that were burned.&#xD;&#xA;&#xD;&#xA;### 2. WithdrawAsset ###&#xD;&#xA;The source sends a WithdrawAsset instruction to the reserve, instructing the reserve to withdraw assets equivalent to the amount of derivatives burned from the source's sovereign account.&#xD;&#xA;&#xD;&#xA;### 3. DepositReserveAsset ###&#xD;&#xA;The reserve deposits the assets withdrawn from the previous step to the destination's sovereign account, taking note of the amount of assets deposited.&#xD;&#xA;&#xD;&#xA;### 4. ReserveAssetDeposited ###&#xD;&#xA;The reserve creates a ReserveAssetDeposited instruction with the amount of assets deposited to the destination's sovereign account, and sends this instruction onwards to the destination. The destination receives the instruction and processes it, minting the derivative assets as a result of the process.&#xD;&#xA;&#xD;&#xA;### 5. DepositAsset ###&#xD;&#xA;The destination deposits the derivative assets minted to the receiving account.&#xD;&#xA;&#xD;&#xA;The addition of a 3rd consensus system is already a hint of the disadvantages of a reserve asset transfer model -- firstly, the reserve could easily become a point of centralization when too many consensus systems rely on it to be the reserve of choice for their assets; secondly, the sheer amount of steps required necessarily makes it more prone to errors, and as such, implementors will have to consider more possible pitfalls and provide technical support accordingly when an end user encounters issues arising from these steps. Last but not least, either of the source or destination can opt to designate multiple consensus systems to be their reserves, and in such a situation, care must be taken in order to ensure that the sovereign account on the reserves are balanced, so that one doesn't get all drained while the others still contain a healthy balance.&#xD;&#xA;&#xD;&#xA;One additional point of interest here is that I am also seeing that people are combining the roles of the source and reserve together, so that the source chain also acts as the reserve chain for their native token. This does make the reserve transfer process easier, in the sense that they would only need to execute a `DepositReserveAsset` to the sovereign account of the destination locally, and emit a `ReserveAssetDeposited` message to the destination. The destination would still however need to 1) recognize the source as the proper reserve for the tokens that are being sent over and 2) support minting derivatives of the tokens being sent over. &#xD;&#xA;&#xD;&#xA;# Summary&#xD;&#xA;&#xD;&#xA;Despite being more complex, consensus systems often will first pick the reserve asset transfer model over asset teleportation, due to the trust issues discussed. However, we could imagine that as the source and destination continue to prove themselves to be trustworthy and cooperative on the reserve, they could then negotiate for an asset teleportation agreement and switch over to that entirely.&#xD;&#xA;&#xD;&#xA;As such, we could in fact think of the reserve asset model as a way to establish a baseline of trust between the source and destination. They could even move into various intermediate arrangements, such as unifying the derivative tokens so that they all get issued by either the source or the destination, instead of having each minting their own derivatives. Whether or not the source and destination will move beyond the reserve asset transfer model is up to them to decide.&#xD;&#xA;&#xD;&#xA;For further reading of XCMs in general, Gavin [has][3] [plenty of][4] [blogposts][5] that describe each component of the XCM in detail. Shawn also [has an excellent video][6] describing how you can craft your first cross-chain messages. Finally, there is also [the XCM specification][7] that is the definitive source of truth on any matters related to XCM.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JLfQp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/PC6Lm.png&#xD;&#xA;  [3]: https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392#cb6d&#xD;&#xA;  [4]: https://medium.com/polkadot-network/xcm-part-ii-versioning-and-compatibility-b313fc257b83&#xD;&#xA;  [5]: https://medium.com/polkadot-network/xcm-part-iii-execution-and-error-management-ceb8155dd166&#xD;&#xA;  [6]: https://www.youtube.com/watch?v=5cgq5jOZx9g&#xD;&#xA;  [7]: https://github.com/paritytech/xcm-format" ContentLicense="CC BY-SA 4.0" />
  <row Id="7960" PostHistoryTypeId="5" PostId="2110" RevisionGUID="eb807269-47b5-42d4-b28c-0e1b48873524" CreationDate="2022-04-26T03:19:05.913" UserId="2411" Comment="deleted 36 characters in body; edited title" Text="Currently, I only found a way to interact with smart contracts by [contracts UI](https://paritytech.github.io/contracts-ui).&#xD;&#xA;&#xD;&#xA;Are there any detailed docs on how to interact with smart contracts of `ink!` with polkadot.js or something else?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7961" PostHistoryTypeId="4" PostId="2110" RevisionGUID="eb807269-47b5-42d4-b28c-0e1b48873524" CreationDate="2022-04-26T03:19:05.913" UserId="2411" Comment="deleted 36 characters in body; edited title" Text="Are there any detailed docs on how to interact with smart contracts of `ink!`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7962" PostHistoryTypeId="5" PostId="2093" RevisionGUID="4b74068b-45de-4525-9ca2-70d45c66fca5" CreationDate="2022-04-26T03:51:07.157" UserId="1918" Comment="Copy edited (e.g. ref. &lt;https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol&gt;). Fixed the question formation - missing auxiliary (or helping) verb - see e.g. &lt;https://www.youtube.com/watch?v=t4yWEt0OSpg&amp;t=1m49s&gt; (see also &lt;https://www.youtube.com/watch?v=kS5NfSzXfrI&gt; (QUASM))." Text="I have a scenario where I want to execute a scheduled call via the scheduler pallet at block number n. This call will change certain storage items of pallet.&#xD;&#xA;&#xD;&#xA;So before this storage changes, I want to use offchain_worker() to dump storage to some HTTP server.&#xD;&#xA;&#xD;&#xA;Now I feel that scheduled call will be executed before offchain_worker() gets triggered for block number n. Is this true? If yes, then what can be done to achieve my goal?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="7963" PostHistoryTypeId="4" PostId="2093" RevisionGUID="4b74068b-45de-4525-9ca2-70d45c66fca5" CreationDate="2022-04-26T03:51:07.157" UserId="1918" Comment="Copy edited (e.g. ref. &lt;https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol&gt;). Fixed the question formation - missing auxiliary (or helping) verb - see e.g. &lt;https://www.youtube.com/watch?v=t4yWEt0OSpg&amp;t=1m49s&gt; (see also &lt;https://www.youtube.com/watch?v=kS5NfSzXfrI&gt; (QUASM))." Text="When does an off-chain worker get executed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7964" PostHistoryTypeId="24" PostId="2093" RevisionGUID="4b74068b-45de-4525-9ca2-70d45c66fca5" CreationDate="2022-04-26T03:51:07.157" Comment="Proposed by 1918 approved by 29, 2010 edit id of 172" ContentLicense="CC BY-SA 4.0" />
  <row Id="7970" PostHistoryTypeId="2" PostId="2139" RevisionGUID="fa23ab5d-59a9-4828-8e96-8f9be5d68f99" CreationDate="2022-04-26T04:21:10.733" UserId="393" Text="In your case, if you want to know how the benchmark result goes after you change the constant, you can just change that, and then benchmark this pallet. &#xD;&#xA;&#xD;&#xA;Because when you modify the constant and deploy the new runtime code, you also need to do this benchmark again, right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7972" PostHistoryTypeId="2" PostId="2140" RevisionGUID="3145cb2c-a32a-45e7-a883-0a96f816e1bf" CreationDate="2022-04-26T04:46:18.643" UserId="393" Text="1. In which case, do we get the BadOrigin?&#xD;&#xA;Give an example(maybe not proper), maybe the RawOrigin is None, means maybe some submit an extrinsic without signing it.&#xD;&#xA;&#xD;&#xA;2. type Origin is bounded to Into &amp; From trait, I am not sure how to understand this type. Does Into&lt;Result&lt;RawOriginSelf::AccountId&gt;&gt; mean whoever implements impl Into&lt;Result&lt;RawOrigin&lt;Self::AccountId&gt; for &lt;U&gt; or impl From&lt;RawOrigin&lt;Self::AccountId&gt;&gt; for &lt;U&gt;, then this U can be Origin type?&#xD;&#xA;&#xD;&#xA;I think so, just read the doc of these two trait[From trait][1][Into trait][2], you'll be super clear.&#xD;&#xA;And in the docs, you'll find following explaination:&#xD;&#xA;&#xD;&#xA;    From&lt;T&gt; for U implies Into&lt;U&gt; for T&#xD;&#xA;    From is reflexive, which means that From&lt;T&gt; for T is implemented&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/std/convert/trait.From.html&#xD;&#xA;  [2]: https://doc.rust-lang.org/std/convert/trait.Into.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="7975" PostHistoryTypeId="2" PostId="2141" RevisionGUID="a0c15b10-b3fe-4ad1-93f8-00296e92d9e9" CreationDate="2022-04-26T05:35:42.320" UserId="140" Text="I am able to decode a `Call` into `pallet id` and `call id` using below code&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let (pallet_idx, call_idx): (u8, u8) = call&#xD;&#xA;				.using_encoded(|mut bytes| Decode::decode(&amp;mut bytes))&#xD;&#xA;				.expect(&#xD;&#xA;					&quot;decode input is output of Call encode; Call guaranteed to have two enums; qed&quot;,&#xD;&#xA;				);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I build a `Call` back using pallet id and call id?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7977" PostHistoryTypeId="1" PostId="2141" RevisionGUID="a0c15b10-b3fe-4ad1-93f8-00296e92d9e9" CreationDate="2022-04-26T05:35:42.320" UserId="140" Text="How to encode pallet id &amp; call id and then re-encode to a real Call" ContentLicense="CC BY-SA 4.0" />
  <row Id="7978" PostHistoryTypeId="3" PostId="2141" RevisionGUID="a0c15b10-b3fe-4ad1-93f8-00296e92d9e9" CreationDate="2022-04-26T05:35:42.320" UserId="140" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7979" PostHistoryTypeId="2" PostId="2142" RevisionGUID="7b2cae8b-1b36-452c-bcd3-aef199683e64" CreationDate="2022-04-26T06:16:12.807" UserId="139" Text="On empty blocks you can see [![enter image description here][1]][1] such transactions where `paysFee: Yes`. What does it mean though? Who is paying the fees for the timestamp module? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/oj9Gq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="7981" PostHistoryTypeId="1" PostId="2142" RevisionGUID="7b2cae8b-1b36-452c-bcd3-aef199683e64" CreationDate="2022-04-26T06:16:12.807" UserId="139" Text="On empty blocks, who is paying timestamp fees?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7982" PostHistoryTypeId="3" PostId="2142" RevisionGUID="7b2cae8b-1b36-452c-bcd3-aef199683e64" CreationDate="2022-04-26T06:16:12.807" UserId="139" Text="|fee|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7983" PostHistoryTypeId="2" PostId="2143" RevisionGUID="596928d8-4b19-4f9d-ba1a-692f42b9abec" CreationDate="2022-04-26T06:24:47.833" UserId="139" Text="What are the ramifications of using `InstantSeal` on a public standalone chain? According to the comments on https://substrate.stackexchange.com/questions/1783/how-to-reject-empty-blocks, it's quite evident that babe/aura based chains require blocks to be produced in the  current epoch, however it is also fact that many chains simply don't see their bandwidth being used and most blocks are empty, taking up unnecessary space on disk. &#xD;&#xA;&#xD;&#xA;As a consequence, it would be desirable to have a combination of instant seal/epoch based consensus, where let's say hypothetically, it's not just blocks that get produced when the network meets a transaction, but an entire epoch/era that gets triggered. Then the network can start and run through an entire era, until it again goes to *sleep*, where it waits for a transaction to occur, thus saving disk/network/cpu resources. &#xD;&#xA;&#xD;&#xA;I'd like to know why would this work or won't work. Is there something I am missing about the way block production algorithms like babe/aura?" ContentLicense="CC BY-SA 4.0" />
  <row Id="7985" PostHistoryTypeId="1" PostId="2143" RevisionGUID="596928d8-4b19-4f9d-ba1a-692f42b9abec" CreationDate="2022-04-26T06:24:47.833" UserId="139" Text="On using Instantseal on a public standalone network" ContentLicense="CC BY-SA 4.0" />
  <row Id="7986" PostHistoryTypeId="3" PostId="2143" RevisionGUID="596928d8-4b19-4f9d-ba1a-692f42b9abec" CreationDate="2022-04-26T06:24:47.833" UserId="139" Text="|consensus|babe|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7991" PostHistoryTypeId="2" PostId="2145" RevisionGUID="50c9c0d3-ffef-471f-bd33-5197f6deeaea" CreationDate="2022-04-26T07:36:15.473" UserId="2395" Text="I would like to read contract information(especially name, symbol, decimal, owner) from token contracts like shown here: https://moonbeam.moonscan.io/token/0x818ec0a7fe18ff94269904fced6ae3dae6d6dc0b#readContract&#xD;&#xA;&#xD;&#xA;How do I read that from on-chain? Also, how do I figure out if a contract is a token contract?&#xD;&#xA;&#xD;&#xA;context: this is for an indexer project." ContentLicense="CC BY-SA 4.0" />
  <row Id="7993" PostHistoryTypeId="1" PostId="2145" RevisionGUID="50c9c0d3-ffef-471f-bd33-5197f6deeaea" CreationDate="2022-04-26T07:36:15.473" UserId="2395" Text="Read Token Contract Information" ContentLicense="CC BY-SA 4.0" />
  <row Id="7994" PostHistoryTypeId="3" PostId="2145" RevisionGUID="50c9c0d3-ffef-471f-bd33-5197f6deeaea" CreationDate="2022-04-26T07:36:15.473" UserId="2395" Text="|polkadot|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7995" PostHistoryTypeId="2" PostId="2146" RevisionGUID="f0eba435-e8cf-48ce-b0a9-e767cac06ebe" CreationDate="2022-04-26T08:09:58.037" UserId="32" Text="As a Technical Educator at Web3 Foundation, I would like to actively engage with the community on Substrate and Polkadot Stack Exchange and create/update educational content to address the key knowledge gaps identified. I would like to put my knowledge on Polkadot and Substrate to test and refine it through moderating the Q&amp;As on a daily basis." ContentLicense="CC BY-SA 4.0" />
  <row Id="7997" PostHistoryTypeId="6" PostId="2145" RevisionGUID="dfe58535-69c6-400f-9313-f20c5f64d26c" CreationDate="2022-04-26T08:42:46.773" UserId="28" Comment="edited tags" Text="|polkadot|polkadot-js|frontier|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="7998" PostHistoryTypeId="2" PostId="2147" RevisionGUID="610aedec-cc1c-414f-b961-05c9a1c6c248" CreationDate="2022-04-26T08:44:55.093" UserId="139" Text="I understand the concept of forkless updates, in that the code of the runtime is stored on the chain itself, and a runtime upgrade would entail updating this storage value on the chain. But looking at the polkadot node implementation on github, it is under quite active developement. &#xD;&#xA;&#xD;&#xA;My question was, do these code changes affect the operation of the chain? Are changes to the `node` code irrelevant to the `runtime`? Can I make changes to the `node` code and still have it peer with other nodes running on an older version of the `node` but on the same `runtime`? Will only changes to `runtime` require a `setCode` call? " ContentLicense="CC BY-SA 4.0" />
  <row Id="8000" PostHistoryTypeId="1" PostId="2147" RevisionGUID="610aedec-cc1c-414f-b961-05c9a1c6c248" CreationDate="2022-04-26T08:44:55.093" UserId="139" Text="How does frequent updates to polkadot affect the operation of the polkadot chain itself?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8001" PostHistoryTypeId="3" PostId="2147" RevisionGUID="610aedec-cc1c-414f-b961-05c9a1c6c248" CreationDate="2022-04-26T08:44:55.093" UserId="139" Text="|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8002" PostHistoryTypeId="2" PostId="2148" RevisionGUID="44c1cdd3-381b-4e44-8fad-ee3365aafc00" CreationDate="2022-04-26T08:47:21.540" UserId="2102" Text="I was wondering what is the process of a transaction being removed or dropped from a transaction pool. When a transaction is submitted to the network, It is validated by a node and then gossiped to its peers and they will also validate the transaction and so on. Once the transaction makes it into a block, and this block is submitted to the network, do nodes check if any of their transactions within the tx pool is within the block? Does transaction within the tx pool get validated each time they are going to be included on a block? If so, I guess the transaction gets dropped as it will be invalidated by, for example, its nonce. " ContentLicense="CC BY-SA 4.0" />
  <row Id="8004" PostHistoryTypeId="1" PostId="2148" RevisionGUID="44c1cdd3-381b-4e44-8fad-ee3365aafc00" CreationDate="2022-04-26T08:47:21.540" UserId="2102" Text="Transactions lifecycle" ContentLicense="CC BY-SA 4.0" />
  <row Id="8005" PostHistoryTypeId="3" PostId="2148" RevisionGUID="44c1cdd3-381b-4e44-8fad-ee3365aafc00" CreationDate="2022-04-26T08:47:21.540" UserId="2102" Text="|transactions|block|validation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8006" PostHistoryTypeId="2" PostId="2149" RevisionGUID="41f6b020-ebfb-4262-8508-56fa1b82b136" CreationDate="2022-04-26T08:48:39.720" UserId="28" Text="`timestamp.set` is an unsigned extrinsic:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn set(origin: OriginFor&lt;T&gt;, #[pallet::compact] now: T::Moment) -&gt; DispatchResult {&#xD;&#xA;	ensure_none(origin)?;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So even though the UI reports `paysFee: Yes`, there is actually no fee being taken:&#xD;&#xA;&#xD;&#xA;You can see some of that logic being represented here:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Query the detailed fee of a given `call`.&#xD;&#xA;pub fn query_fee_details&lt;Extrinsic: sp_runtime::traits::Extrinsic + GetDispatchInfo&gt;(&#xD;&#xA;	unchecked_extrinsic: Extrinsic,&#xD;&#xA;	len: u32,&#xD;&#xA;) -&gt; FeeDetails&lt;BalanceOf&lt;T&gt;&gt;&#xD;&#xA;where&#xD;&#xA;	T::Call: Dispatchable&lt;Info = DispatchInfo&gt;,&#xD;&#xA;{&#xD;&#xA;	let dispatch_info = &lt;Extrinsic as GetDispatchInfo&gt;::get_dispatch_info(&amp;unchecked_extrinsic);&#xD;&#xA;&#xD;&#xA;	let tip = 0u32.into();&#xD;&#xA;&#xD;&#xA;	if unchecked_extrinsic.is_signed().unwrap_or(false) {&#xD;&#xA;		Self::compute_fee_details(len, &amp;dispatch_info, tip)&#xD;&#xA;	} else {&#xD;&#xA;		// Unsigned extrinsics have no inclusion fee.&#xD;&#xA;		FeeDetails { inclusion_fee: None, tip }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8008" PostHistoryTypeId="2" PostId="2150" RevisionGUID="42104bc2-7dec-411c-90a0-2629c16b2122" CreationDate="2022-04-26T09:32:59.353" UserId="28" Text="Should be something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let bytes: Vec&lt;u8&gt; = (pallet_idx, call_idx).encode();&#xD;&#xA;let call: Call = Decode::decode::&lt;Call&gt;(&amp;mut &amp;bytes);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For these kinds of questions, reviewing how [SCALE codec](https://substrate.dev/docs/en/knowledgebase/advanced/codec) works is helpful, and then realizing that all types are just bytes, and can be arbitrarily passed back and forth from encoding and decoding." ContentLicense="CC BY-SA 4.0" />
  <row Id="8010" PostHistoryTypeId="2" PostId="2151" RevisionGUID="69c3c728-1e82-4cbf-b9d8-230335fe9448" CreationDate="2022-04-26T09:45:56.530" UserId="2411" Text="I get nothing by using `api.query.contracts.contractInfoOf`, I'm working with a local substrate node. And I'm able to see my deployed contract at https://polkadot.js.org/apps/#/contracts .&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import {ApiPromise, WsProvider, Keyring } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const wsProvider = new WsProvider(&quot;ws://127.0.0.1:9944&quot;);&#xD;&#xA;const api = await ApiPromise.create();&#xD;&#xA;const res = await api.query.contracts.contractInfoOf(&quot;5CNcbf4FDSgzJ7pBMpe1gxRkndXEK9thRtCjb1fHFbhRwK57&quot;);&#xD;&#xA;console.log(res.registry);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The result is `TypeRegistry {}`.&#xD;&#xA;&#xD;&#xA;Is this situation reasonable? &#xD;&#xA;Can `query.contracts.contractInfoOf` get the ABI of deployed contract? &#xD;&#xA;&#xD;&#xA;I'm a beginner at substrate and ink!...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/onfMX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8012" PostHistoryTypeId="1" PostId="2151" RevisionGUID="69c3c728-1e82-4cbf-b9d8-230335fe9448" CreationDate="2022-04-26T09:45:56.530" UserId="2411" Text="I get nothing by calling `api.query.contracts.contractInfoOf`" ContentLicense="CC BY-SA 4.0" />
  <row Id="8013" PostHistoryTypeId="3" PostId="2151" RevisionGUID="69c3c728-1e82-4cbf-b9d8-230335fe9448" CreationDate="2022-04-26T09:45:56.530" UserId="2411" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8014" PostHistoryTypeId="2" PostId="2152" RevisionGUID="c6331651-7a84-4f12-bbf7-ec499f6f9915" CreationDate="2022-04-26T09:46:49.860" UserId="73" Text="Every node validates every transaction that comes from the outside. From the outside here means either by a RPC call or from another node. If a transaction is valid it is stored in the ready or future queue. Transactions are stored in the future queue if they have requirement that can not be fulfilled by any of transactions in the ready queue. &#xD;&#xA;Every time a node imports a block, the transaction pool is notified. The transaction pool takes goes through all transactions in the block and removes them from their own pool. &#xD;&#xA;&#xD;&#xA;&gt; Does transaction within the tx pool get validated each time they are going to be included on a block?&#xD;&#xA;&#xD;&#xA;Yes, part of the execution is the validation of a transaction. This validation is the same as when the transaction entered the pool/was re-validated. &#xD;&#xA;&#xD;&#xA;&gt; If so, I guess the transaction gets dropped as it will be invalidated by, for example, its nonce.&#xD;&#xA;&#xD;&#xA;All transaction that fail to be applied while building a block are being recorded and being removed from the transaction pool afterwards." ContentLicense="CC BY-SA 4.0" />
  <row Id="8016" PostHistoryTypeId="2" PostId="2153" RevisionGUID="07b5da7b-7574-4c65-be74-5071f101a05f" CreationDate="2022-04-26T10:14:37.680" UserId="2055" Text="I'm trying to calculate extrinsic root from the given extrinsics in the block and compare it with extrinsics root in the header. The result is not the same.&#xD;&#xA;&#xD;&#xA;Here is an example for block `10030907` in polkadot&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;BlakeTwo256::ordered_trie_root(&#xD;&#xA;        block&#xD;&#xA;            .block&#xD;&#xA;            .extrinsics&#xD;&#xA;            .into_iter()&#xD;&#xA;            .map(|ext| ext.0)&#xD;&#xA;            .collect(),&#xD;&#xA;        sp_runtime::StateVersion::V0,&#xD;&#xA;    );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Result: 0xcc69903a7b42a3bf3a12d2e4d7be2b8dc16f8d7d620f8f77cb3cfbfafdf25197&#xD;&#xA;Expected extrinsincs root in header: 0x13ae7177c2e2dd759ab8b0a85859fdcf0c4b8b23f5f1ad94d76ba740abaea711&#xD;&#xA;&#xD;&#xA;I'm using custom OpaqueExtrinsic that makes the inner Vec&lt;u8&gt; public and rest all remains same as the `sp_runtime::OpaqueExtrinsic`&#xD;&#xA;&#xD;&#xA;Any thoughts on where I'm going wrong ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8018" PostHistoryTypeId="1" PostId="2153" RevisionGUID="07b5da7b-7574-4c65-be74-5071f101a05f" CreationDate="2022-04-26T10:14:37.680" UserId="2055" Text="Calculate extrinsincs root" ContentLicense="CC BY-SA 4.0" />
  <row Id="8019" PostHistoryTypeId="3" PostId="2153" RevisionGUID="07b5da7b-7574-4c65-be74-5071f101a05f" CreationDate="2022-04-26T10:14:37.680" UserId="2055" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8020" PostHistoryTypeId="5" PostId="2153" RevisionGUID="b4cb4d12-c228-41ba-8baa-a0dd0aa560fe" CreationDate="2022-04-26T10:30:08.083" UserId="2055" Comment="improved formatting for hex" Text="I'm trying to calculate extrinsic root from the given extrinsics in the block and compare it with extrinsics root in the header. The result is not the same.&#xD;&#xA;&#xD;&#xA;Here is an example for block `10030907` in polkadot&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;BlakeTwo256::ordered_trie_root(&#xD;&#xA;        block&#xD;&#xA;            .block&#xD;&#xA;            .extrinsics&#xD;&#xA;            .into_iter()&#xD;&#xA;            .map(|ext| ext.0)&#xD;&#xA;            .collect(),&#xD;&#xA;        sp_runtime::StateVersion::V0,&#xD;&#xA;    );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Result: `0xcc69903a7b42a3bf3a12d2e4d7be2b8dc16f8d7d620f8f77cb3cfbfafdf25197`&#xD;&#xA;Expected extrinsincs root in header: `0x13ae7177c2e2dd759ab8b0a85859fdcf0c4b8b23f5f1ad94d76ba740abaea711`&#xD;&#xA;&#xD;&#xA;I'm using custom OpaqueExtrinsic that makes the inner Vec&lt;u8&gt; public and rest all remains same as the `sp_runtime::OpaqueExtrinsic`&#xD;&#xA;&#xD;&#xA;Any thoughts on where I'm going wrong ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8021" PostHistoryTypeId="5" PostId="2153" RevisionGUID="2b5a145e-98de-4eef-9d5e-21140c7101c6" CreationDate="2022-04-26T10:36:36.383" UserId="2055" Comment="formatting" Text="I'm trying to calculate extrinsic root from the given extrinsics in the block and compare it with extrinsics root in the header. The result is not the same.&#xD;&#xA;&#xD;&#xA;Here is an example for block `10030907` in polkadot&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;BlakeTwo256::ordered_trie_root(&#xD;&#xA;        block&#xD;&#xA;            .block&#xD;&#xA;            .extrinsics&#xD;&#xA;            .into_iter()&#xD;&#xA;            .map(|ext| ext.0)&#xD;&#xA;            .collect(),&#xD;&#xA;        sp_runtime::StateVersion::V0,&#xD;&#xA;    );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Result: `0xcc69903a7b42a3bf3a12d2e4d7be2b8dc16f8d7d620f8f77cb3cfbfafdf25197`&#xD;&#xA;&#xD;&#xA;Expected(in the header): `0x13ae7177c2e2dd759ab8b0a85859fdcf0c4b8b23f5f1ad94d76ba740abaea711`&#xD;&#xA;&#xD;&#xA;I'm using custom OpaqueExtrinsic that makes the inner Vec&lt;u8&gt; public and rest all remains same as the `sp_runtime::OpaqueExtrinsic`&#xD;&#xA;&#xD;&#xA;Any thoughts on where I'm going wrong ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8022" PostHistoryTypeId="2" PostId="2154" RevisionGUID="1bdc3636-ae80-41f5-a224-5120cb589cb1" CreationDate="2022-04-26T10:39:25.530" UserId="74" Text="# Drew Stone&#xD;&#xA;&#xD;&#xA;I've been building on Substrate for around 3-4+ years now as one of the earliest external developers interfacing with this stack. I maintained and built the custom runtime modules for Edgeware and deployed the testnets and mainnet chains.&#xD;&#xA;&#xD;&#xA;I am still actively building on Substrate through Webb and would like to continue expanding the interaction I can bring through moderating and providing info/good questions as a builder for this forum. I will help foster good questions and answers from within my organization to help bring more clarity to development in this ecosystem." ContentLicense="CC BY-SA 4.0" />
  <row Id="8024" PostHistoryTypeId="2" PostId="2155" RevisionGUID="acbd4dee-e90b-4fad-82ec-a3c0f51ec4c9" CreationDate="2022-04-26T11:59:45.647" UserId="157" Text="When writing tests for client module I'm having troubles instantiating gadget for the client with the error:&#xD;&#xA;&#xD;&#xA;&gt; the trait `module_primitives::ModuleApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u64,&#xD;&#xA;&gt; BlakeTwo256&gt;, sc_network_test::Extrinsic&gt;&gt;` is not implemented for&#xD;&#xA;&gt; `RuntimeApiImpl&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u64,&#xD;&#xA;&gt; BlakeTwo256&gt;, sc_network_test::Extrinsic&gt;,&#xD;&#xA;&gt; substrate_test_runtime_client::client::Client&lt;substrate_test_runtime_client::sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u64,&#xD;&#xA;&gt; BlakeTwo256&gt;, sc_network_test::Extrinsic&gt;&gt;,&#xD;&#xA;&gt; LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u64,&#xD;&#xA;&gt; BlakeTwo256&gt;, sc_network_test::Extrinsic&gt;,&#xD;&#xA;&gt; substrate_test_runtime_client::sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u64,&#xD;&#xA;&gt; BlakeTwo256&gt;, sc_network_test::Extrinsic&gt;&gt;,&#xD;&#xA;&gt; NativeElseWasmExecutor&lt;LocalExecutorDispatch&gt;&gt;,&#xD;&#xA;&gt; sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u64,&#xD;&#xA;&gt; BlakeTwo256&gt;, sc_network_test::Extrinsic&gt;,&#xD;&#xA;&gt; substrate_test_runtime_client::substrate_test_runtime::RuntimeApi&gt;&gt;`&#xD;&#xA;&#xD;&#xA;Implementation:&#xD;&#xA;&#xD;&#xA;    pub(crate) type ModuleTestParams = ModuleParams&lt;PeersFullClient, Backend&gt;;&#xD;&#xA;    pub(crate) type PeerData = Option&lt;ModuleTestParams&gt;;&#xD;&#xA;    &#xD;&#xA;    pub(crate) type ModulePeer = Peer&lt;PeerData, PeersClient&gt;;&#xD;&#xA;    &#xD;&#xA;    pub(crate) struct ModuleTestNet {&#xD;&#xA;    	peers: Vec&lt;ModulePeer&gt;,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl ModuleTestNet {&#xD;&#xA;    	pub(crate) fn new(n_authority: usize, n_full: usize) -&gt; Self {&#xD;&#xA;    		let mut net = ModuleTestNet { peers: Vec::with_capacity(n_authority + n_full) };&#xD;&#xA;    		for _ in 0..n_authority {&#xD;&#xA;    			net.add_authority_peer();&#xD;&#xA;    		}&#xD;&#xA;    		for _ in 0..n_full {&#xD;&#xA;    			net.add_full_peer();&#xD;&#xA;    		}&#xD;&#xA;    		net&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	pub(crate) fn add_authority_peer(&amp;mut self) {&#xD;&#xA;    		self.add_full_peer_with_config(FullPeerConfig {&#xD;&#xA;    			notifications_protocols: vec![&quot;module/1&quot;.into()],&#xD;&#xA;    			is_authority: true,&#xD;&#xA;    			..Default::default()&#xD;&#xA;    		})&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	pub(crate) fn add_full_peer(&amp;mut self) {&#xD;&#xA;    		todo!()&#xD;&#xA;    	}&#xD;&#xA;    	pub(crate) fn generate_blocks(&#xD;&#xA;    		&amp;mut self,&#xD;&#xA;    		count: usize,&#xD;&#xA;    		session_length: u64,&#xD;&#xA;    		validator_set: &amp;ValidatorSet&lt;AuthorityId&gt;,&#xD;&#xA;    	) {&#xD;&#xA;    		self.peer(0).generate_blocks(count, BlockOrigin::File, |builder| {&#xD;&#xA;    			let mut block = builder.build().unwrap().block;&#xD;&#xA;    &#xD;&#xA;    			if *block.header.number() % session_length == 0 {&#xD;&#xA;    				add_auth_change_digest(&amp;mut block.header, validator_set.clone());&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			block&#xD;&#xA;    		});&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;TestNetFactory is implemented.&#xD;&#xA;&#xD;&#xA;Then trait:&#xD;&#xA;&#xD;&#xA;    pub(crate) struct RuntimeApi {&#xD;&#xA;    	inner: TestApi,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl ProvideRuntimeApi&lt;Block&gt; for TestApi {&#xD;&#xA;    	type Api = RuntimeApi;&#xD;&#xA;    	fn runtime_api&lt;'a&gt;(&amp;'a self) -&gt; ApiRef&lt;'a, Self::Api&gt; {&#xD;&#xA;    		RuntimeApi { inner: self.clone() }.into()&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    sp_api::mock_impl_runtime_apis! {&#xD;&#xA;    	impl ModuleApi&lt;Block&gt; for RuntimeApi {}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And instantiation (where error comes from):&#xD;&#xA;&#xD;&#xA;    fn initialize_module(&#xD;&#xA;    	net: &amp;mut ModuleTestNet,&#xD;&#xA;    	peers: Vec&lt;(usize, &amp;ModuleKeyring, ModuleTestParams)&gt;,&#xD;&#xA;    ) -&gt; impl Future&lt;Output = ()&gt; {&#xD;&#xA;    	let voters = FuturesUnordered::new();&#xD;&#xA;    &#xD;&#xA;    	for (peer_id, key, module_params) in peers.into_iter() {&#xD;&#xA;    		let gadget = start_module_gadget::&lt;_, _, _&gt;(module_params);&#xD;&#xA;    &#xD;&#xA;    		fn assert_send&lt;T: Send&gt;(_: &amp;T) {}&#xD;&#xA;    		assert_send(&amp;gadget);&#xD;&#xA;    		voters.push(gadget);&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	voters.for_each(|_| async move {})&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Declaration of gadget starting function:&#xD;&#xA;&#xD;&#xA;    pub async fn start_module_gadget&lt;B, BE, C&gt;(module_params: ModuleParams&lt;C, BE&gt;)&#xD;&#xA;    where&#xD;&#xA;    	B: Block,&#xD;&#xA;    	BE: Backend&lt;B&gt;,&#xD;&#xA;    	C: Client&lt;B, BE&gt;,&#xD;&#xA;    	C::Api: ModuleApi&lt;B&gt;,&#xD;&#xA;    {&#xD;&#xA;    	let ModuleParams { client, backend, key_store, rpc_send } = module_params;&#xD;&#xA;    &#xD;&#xA;    	let worker_params = worker::WorkerParams { client, backend, key_store, rpc_send };&#xD;&#xA;    &#xD;&#xA;    	let mut worker = worker::ModuleWorker::&lt;_, _, _&gt;::new(worker_params);&#xD;&#xA;   &#xD;&#xA;    	worker.run().await&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="8026" PostHistoryTypeId="1" PostId="2155" RevisionGUID="acbd4dee-e90b-4fad-82ec-a3c0f51ec4c9" CreationDate="2022-04-26T11:59:45.647" UserId="157" Text="Client testing - Runtime trait implementation approach" ContentLicense="CC BY-SA 4.0" />
  <row Id="8027" PostHistoryTypeId="3" PostId="2155" RevisionGUID="acbd4dee-e90b-4fad-82ec-a3c0f51ec4c9" CreationDate="2022-04-26T11:59:45.647" UserId="157" Text="|testing|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8028" PostHistoryTypeId="2" PostId="2156" RevisionGUID="94c49e04-4404-4362-9aa6-0b15d48551ce" CreationDate="2022-04-26T13:18:44.303" UserId="452" Text="I think you are missing a bound `C: ProvideRuntimeApi&lt;B&gt;` on your `start_module_gadget` function." ContentLicense="CC BY-SA 4.0" />
  <row Id="8030" PostHistoryTypeId="2" PostId="2157" RevisionGUID="8b986bcc-f39d-434c-a9a4-514567a32c6e" CreationDate="2022-04-26T13:37:19.067" UserId="53" Text="&gt; My question was, do these code changes affect the operation of the chain? Are changes to the node code irrelevant to the runtime?&#xD;&#xA;&#xD;&#xA;Changes to the runtime and changes to the node are for the most part independent and thus runtime upgrades and individual nodes upgrading will not generally affect the operation of the chain.&#xD;&#xA;&#xD;&#xA;&gt; Can I make changes to the node code and still have it peer with other nodes running on an older version of the node but on the same runtime?&#xD;&#xA;&#xD;&#xA;In general, changes to node code can be made and nodes can be upgraded to this new code entirely independently of the client versions of other nodes on the same network.&#xD;&#xA;&#xD;&#xA;&gt; Will only changes to runtime require a setCode call?&#xD;&#xA;&#xD;&#xA;Changes to the runtime will only take effect when the network is upgraded using its governance procedure (which could be as simple as a `sudo` call) using `setCode`.&#xD;&#xA;&#xD;&#xA;There are exceptions to the general rule of independence. To ensure a piece of node software works with a chain's runtime:&#xD;&#xA;&#xD;&#xA;- Any API entry points into the runtime (defined by `impl_runtime_apis!`) which the node software's client is expecting must be defined in the network's runtime.&#xD;&#xA;- Any API re-entry points back into the client (known as _host functions_) which the network's runtime is expecting must be defined in the node software's client.&#xD;&#xA;- Additionally, some types and data structures such as the hash format, block number and block header must be compatible.&#xD;&#xA;&#xD;&#xA;To ensure that node software of differing versions work with each other, then in addition to the above, the network wire-format and protocols must be compatible. Nodes will generally retain only those peers which are vaguely respectful of the relationship. This is not especially well defined as different client software may have different expectations and peer-selection strategies. Roughly speaking clients should attempt to be as useful as possible to their peers while minimising the amount of information they ask for. Messages take resources to be processed and sending duplicate messages, out-of-date information or information which the sender could reasonably know is useless to the recipient are all considered bad form and may result in becoming kicked from the peerset.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8032" PostHistoryTypeId="2" PostId="2158" RevisionGUID="fa47f18e-3db9-4d82-a7dc-841d6bd3e516" CreationDate="2022-04-26T13:38:31.373" UserId="627" Text="Each API result object has a `registry` - this is the built-in API registry, which is what you are logging there.&#xD;&#xA;&#xD;&#xA;The [contractInfoOf](https://polkadot.js.org/docs/substrate/storage#contractinfoofaccountid32-optionpalletcontractsstoragerawcontractinfo) returns an `Option&lt; PalletContractsStorageRawContractInfo&gt;`, which is not the ABI (this is never uploaded, only kept locally).&#xD;&#xA;&#xD;&#xA;If you are interested in what `PalletContractsStorageRawContractInfo` contains, [here](https://github.com/polkadot-js/api/blob/dbfb03760c4d1c60dae31ac61456b04bf9e1c26a/packages/types-augment/src/lookup/types-substrate.ts#L4218-L4222) is a TypeScript representation as extracted from the Substrate master metadata.&#xD;&#xA;&#xD;&#xA;It contains the `trieId`, `codeHash` as `storageDeposit` fields." ContentLicense="CC BY-SA 4.0" />
  <row Id="8034" PostHistoryTypeId="2" PostId="2159" RevisionGUID="1f4a4c90-71da-416d-a99c-2fae6de273b8" CreationDate="2022-04-26T13:45:14.243" UserId="377" Text="I am working on a pallet in which there is storage in which I am using a tuple.&#xD;&#xA;Can we use a struct instead of a tuple in the storage of pallet?&#xD;&#xA;if yes is there any reference to how we can use it?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8036" PostHistoryTypeId="1" PostId="2159" RevisionGUID="1f4a4c90-71da-416d-a99c-2fae6de273b8" CreationDate="2022-04-26T13:45:14.243" UserId="377" Text="How can we use struct instead of tuple in pallet structure?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8037" PostHistoryTypeId="3" PostId="2159" RevisionGUID="1f4a4c90-71da-416d-a99c-2fae6de273b8" CreationDate="2022-04-26T13:45:14.243" UserId="377" Text="|pallet|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8038" PostHistoryTypeId="2" PostId="2160" RevisionGUID="faf735f1-54e5-4fdb-9429-3f9f674e80d0" CreationDate="2022-04-26T13:48:03.190" UserId="53" Text="The [XCM Format](https://github.com/paritytech/xcm-format) repository provides a place to propose and discuss additions to the XCM protocol. There is at present no means to introduce unofficial format extensions outside of the mainline versioning system (which is linear in nature), though the `Transact` instruction allows chains to query and utilise custom functionality in each other&#xD;&#xA;&#xD;&#xA;It should be possible to add a more flexible extension system to the XCM format, with the list of extensions being part of the XCM version identifier, however nothing is proposed yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="8040" PostHistoryTypeId="2" PostId="2161" RevisionGUID="7a6118d1-2f74-442c-8ce8-4dc49ee0c21f" CreationDate="2022-04-26T13:50:44.567" UserId="53" Text="# Gav&#xD;&#xA;&#xD;&#xA;# &#xD;&#xA;&#xD;&#xA;Coded much of Frame, Substrate and Polkadot and probably have a bit too much of the design decisions taken in my head rather than down electronically. Perhaps I can be useful in ensuring that the questions here are sensible and the answers here are not too far from the truth." ContentLicense="CC BY-SA 4.0" />
  <row Id="8042" PostHistoryTypeId="2" PostId="2162" RevisionGUID="7ef0babc-9684-41a2-9924-27fe0ced35f0" CreationDate="2022-04-26T13:51:08.837" UserId="45" Text="If you use FRAME and the corresponding macros to define storage, then in that case the values stored will be serialized using the SCALE encoding.&#xD;&#xA;&#xD;&#xA;SCALE encoding is equivalent between structs and tuples as long as they have the equal number of fields, with the same types.&#xD;&#xA;&#xD;&#xA;For example, those structs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type A = (u32, bool);&#xD;&#xA;&#xD;&#xA;#[derive(Encode, Decode)]&#xD;&#xA;struct B {&#xD;&#xA;  number: u32,&#xD;&#xA;  flag: bool,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;should be encoded the same way, so the following assertion will always be held:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// for each a of type A and each b of type B&#xD;&#xA;fn test(a: A, b: B) {&#xD;&#xA;  // the SCALE encoding will be equal&#xD;&#xA;  assert_eq!(&#xD;&#xA;    a.encode(),&#xD;&#xA;    b.encode(),&#xD;&#xA;  );&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8044" PostHistoryTypeId="2" PostId="2163" RevisionGUID="00af168e-400c-4d70-ab7e-3a355e4b8bdd" CreationDate="2022-04-26T13:51:52.963" UserId="418" Text="I have a pallet I'm working on that wants to deal with emojis (allowing emojis to be submitted, stored, etc).  i found Rust crate [unic_emoji_char](https://docs.rs/unic-emoji-char/latest/unic_emoji_char/) which I think would help greatly, but can't get it to work in a pallet.  I'm assuming it has something to do with `std`.&#xD;&#xA;&#xD;&#xA;To the cargo.toml I add:&#xD;&#xA;`unic-emoji-char = { version = &quot;0.9.0&quot;, default-features = false }`&#xD;&#xA;&#xD;&#xA;And in std:&#xD;&#xA;`	&quot;unic-emoji-char/std&quot;,`&#xD;&#xA;&#xD;&#xA;Snips of errors when I `cargo test`:&#xD;&#xA;```&#xD;&#xA;error: failed to select a version for `unic-emoji-char`.&#xD;&#xA;...&#xD;&#xA;the package `pallet-rmrk-core` depends on `unic-emoji-char`, with features: `std` but `unic-emoji-char` does not have these features.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Guessing I just can't use this library, but are there any suggestions for how to do emoji-checking with Rust/Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8046" PostHistoryTypeId="1" PostId="2163" RevisionGUID="00af168e-400c-4d70-ab7e-3a355e4b8bdd" CreationDate="2022-04-26T13:51:52.963" UserId="418" Text="Testing for emojis in a Substrate Pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="8047" PostHistoryTypeId="3" PostId="2163" RevisionGUID="00af168e-400c-4d70-ab7e-3a355e4b8bdd" CreationDate="2022-04-26T13:51:52.963" UserId="418" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8048" PostHistoryTypeId="2" PostId="2164" RevisionGUID="fcdf863c-6698-4a52-9dbc-0889d89a424f" CreationDate="2022-04-26T13:56:23.770" UserId="45" Text="The `std` feature is not something that works out of box. It is just a convention that crate authors may or may not stick to.&#xD;&#xA;&#xD;&#xA;As you can see, there is no `std` feature in Cargo.toml of `unic-emoji-char` [here](https://github.com/open-i18n/rust-unic/blob/41cd2b01e2e51a2b8d7d32fd13b14c0c092ac014/unic/emoji/char/Cargo.toml). &#xD;&#xA;&#xD;&#xA;Apart from that, compiling code to a runtime implies using the `no_std` environment (see [here](https://substrate.stackexchange.com/questions/1274/why-do-we-need-cfg-attrnotfeature-std-no-std) for more details) and the crate in question does not seem to declare that in it's lib.rs." ContentLicense="CC BY-SA 4.0" />
  <row Id="8050" PostHistoryTypeId="2" PostId="2165" RevisionGUID="112723b5-7423-4cd2-87ec-18732a91dcee" CreationDate="2022-04-26T14:06:57.330" UserId="2033" Text="I want to maintain log manager, especially for the custom logs.&#xD;&#xA;I tried to integrate **graylog** server but available supporting crate for graylog does not have support for non-std so I am facing issue.&#xD;&#xA;So can anyone suggest how can I maintain my substrate node logs.&#xD;&#xA;Is it possible with **telemetry** to send custom logs from both runtime-context and ocw-context" ContentLicense="CC BY-SA 4.0" />
  <row Id="8052" PostHistoryTypeId="1" PostId="2165" RevisionGUID="112723b5-7423-4cd2-87ec-18732a91dcee" CreationDate="2022-04-26T14:06:57.330" UserId="2033" Text="How Can I send custom logs to telemetry data" ContentLicense="CC BY-SA 4.0" />
  <row Id="8053" PostHistoryTypeId="3" PostId="2165" RevisionGUID="112723b5-7423-4cd2-87ec-18732a91dcee" CreationDate="2022-04-26T14:06:57.330" UserId="2033" Text="|substrate-node|substrate-node-template|telemetry|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8054" PostHistoryTypeId="52" PostId="2142" RevisionGUID="2eef4109-8db9-4d30-ac37-c8117e2a5d60" CreationDate="2022-04-26T14:21:16.047" />
  <row Id="8055" PostHistoryTypeId="2" PostId="2166" RevisionGUID="4cb2e73e-9a31-4d7c-a668-fae3717c6381" CreationDate="2022-04-26T14:36:58.510" UserId="2435" Text="We are seeing some strange behaviour with some (not all) of our validator nodes. We are using the standard BABE / GRANDPA pallets.&#xD;&#xA;&#xD;&#xA;When it is their turn to produce a block, they produce the block, but immediately after their peer count drops and it looks like none of the validator peers ever receives the block they've produced.&#xD;&#xA;&#xD;&#xA;The next block producer then produces a block at the same height and the original validator / block producer has their block reorg'ed out of the chain.&#xD;&#xA;&#xD;&#xA;An example log file from one of the validators is below. The other validators never receive block `0x8cb6`. Any ideas or suggestions on how to debug or what might be causing the error would be much appreciated!&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Apr 25 07:16:50 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:16:50  Idle (37 peers), best: #2556897 (0x04de…82bb), finalized #2556895 (0xcf6d…6a77), ⬇ 123.2kiB/s ⬆ 151.5kiB/s&#xD;&#xA;Apr 25 07:16:54 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:16:54  Starting consensus session on top of parent 0x04de4479769fb895cdaac629985ba1161ca1e3f326798973009ebd11579082bb&#xD;&#xA;Apr 25 07:16:54 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:16:54  Prepared block for proposing at 2556898 [hash: 0x20769becac0a66900a5414ba276f82495f1c096a2af3037c5e5d86ef11ddfd5e; parent_hash: 0x04de…82bb; extrinsics (1): [0x3098…7607]]&#xD;&#xA;Apr 25 07:16:54 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:16:54  Pre-sealed block for proposal at 2556898. Hash now 0x8cb6aab5906ce62841dc8c18bd3fd1ceb856eb967524987937a37cdc520590a8, previously 0x20769becac0a66900a5414ba276f82495f1c096a2af3037c5e5d86ef11ddfd5e.&#xD;&#xA;Apr 25 07:16:54 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:16:54 ✨ Imported #2556898 (0x8cb6…90a8)&#xD;&#xA;Apr 25 07:16:55 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:16:55  Idle (37 peers), best: #2556898 (0x8cb6…90a8), finalized #2556895 (0xcf6d…6a77), ⬇ 100.5kiB/s ⬆ 132.0kiB/s&#xD;&#xA;Apr 25 07:17:00 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:17:00  Idle (37 peers), best: #2556898 (0x8cb6…90a8), finalized #2556895 (0xcf6d…6a77), ⬇ 20.1kiB/s ⬆ 64.7kiB/s&#xD;&#xA;Apr 25 07:17:00 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:17:00 ✨ Imported #2556898 (0xc087…2639)&#xD;&#xA;Apr 25 07:17:05 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:17:05  Idle (9 peers), best: #2556898 (0x8cb6…90a8), finalized #2556895 (0xcf6d…6a77), ⬇ 10.9kiB/s ⬆ 57.6kiB/s&#xD;&#xA;Apr 25 07:17:06 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:17:06 ♻️  Reorg on #2556898,0x8cb6…90a8 to #2556899,0xf011…2102, common ancestor #2556897,0x04de…82bb&#xD;&#xA;Apr 25 07:17:06 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:17:06 ✨ Imported #2556899 (0xf011…2102)&#xD;&#xA;Apr 25 07:17:10 ip-10-20-1-156.ap-southeast-2.compute.internal polymesh-4.1.1-linux-amd64[12043]: 2022-04-25 07:17:10  Idle (12 peers), best: #2556899 (0xf011…2102), finalized #2556897 (0x04de…82bb), ⬇ 14.0kiB/s ⬆ 54.2kiB/s&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8057" PostHistoryTypeId="1" PostId="2166" RevisionGUID="4cb2e73e-9a31-4d7c-a668-fae3717c6381" CreationDate="2022-04-26T14:36:58.510" UserId="2435" Text="Validator node dropping peers after producing a block followed by a reorg" ContentLicense="CC BY-SA 4.0" />
  <row Id="8058" PostHistoryTypeId="3" PostId="2166" RevisionGUID="4cb2e73e-9a31-4d7c-a668-fae3717c6381" CreationDate="2022-04-26T14:36:58.510" UserId="2435" Text="|babe|validator|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8059" PostHistoryTypeId="2" PostId="2167" RevisionGUID="4f83dd95-a220-4e4b-960d-72c63218da7b" CreationDate="2022-04-26T14:48:24.543" UserId="2136" Text="I have an Off Chain Worker that validates some data in IPFS and then calls a function on chain to set the status to valid or invalid. That's all working fine.&#xD;&#xA;&#xD;&#xA;However, I do not need all nodes to validate all of the data. To avoid wasting node resources I would like to rotate the work of validation between nodes. For example, imagine my network has 5 nodes, on block 1 node 1 runs the validation, on block 2 node 2, on block 3 node 3 etc.&#xD;&#xA;&#xD;&#xA;Given that it doesn't matter if there are occasional blocks when 2 nodes run validation or blocks when no node does, my idea has been to use a random number generator in the off chain worker for each node to decide whether to do validation or not. The offchain worker would do something like this:&#xD;&#xA;&#xD;&#xA;let peer_count = no. of peers&#xD;&#xA;let random_int = random integer between 0 and peer_count&#xD;&#xA;if random_int == 0 {Carry out the valdiation}&#xD;&#xA;else { quit }&#xD;&#xA;&#xD;&#xA;So in my example with 5 nodes, each node will do the validation, on average, once every 5 blocks.&#xD;&#xA;&#xD;&#xA;Here's my question - how do I get the no. of peers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8061" PostHistoryTypeId="1" PostId="2167" RevisionGUID="4f83dd95-a220-4e4b-960d-72c63218da7b" CreationDate="2022-04-26T14:48:24.543" UserId="2136" Text="How to get the Peer count in and Off Chain Worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8062" PostHistoryTypeId="3" PostId="2167" RevisionGUID="4f83dd95-a220-4e4b-960d-72c63218da7b" CreationDate="2022-04-26T14:48:24.543" UserId="2136" Text="|offchain-worker|peers|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8063" PostHistoryTypeId="5" PostId="2167" RevisionGUID="8dd38812-9cac-4ce7-a11b-4e6c44135071" CreationDate="2022-04-26T15:04:53.717" UserId="2136" Comment="added 16 characters in body" Text="I have an Off Chain Worker that validates some data in IPFS and then calls a function on chain to set the status to valid or invalid. That's all working fine.&#xD;&#xA;&#xD;&#xA;However, I do not need all nodes to validate all of the data. To avoid wasting node resources I would like to rotate the work of validation between nodes. For example, imagine my network has 5 nodes, on block 1 node 1 runs the validation, on block 2 node 2, on block 3 node 3 etc.&#xD;&#xA;&#xD;&#xA;Given that it doesn't matter if there are occasional blocks when 2 nodes run validation or blocks when no node does, my idea has been to use a random number generator in the off chain worker for each node to decide whether to do validation or not. The offchain worker would do something like this:&#xD;&#xA;&#xD;&#xA;    let peer_count = no. of peers&#xD;&#xA;    let random_int = random integer between 0 and peer_count&#xD;&#xA;    if random_int == 0 {Carry out the valdiation}&#xD;&#xA;    else { quit }&#xD;&#xA;&#xD;&#xA;So in my example with 5 nodes, each node will do the validation, on average, once every 5 blocks.&#xD;&#xA;&#xD;&#xA;Here's my question - how do I get the no. of peers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8064" PostHistoryTypeId="2" PostId="2168" RevisionGUID="e6e3a028-e94f-4903-935f-a0bac06e3f48" CreationDate="2022-04-26T15:39:44.003" UserId="1838" Text="some wiki for Monitoring and Telemetry&#xD;&#xA;:https://wiki.polkadot.network/docs/build-node-management#monitoring-and-telemetry" ContentLicense="CC BY-SA 4.0" />
  <row Id="8066" PostHistoryTypeId="2" PostId="2169" RevisionGUID="f102b809-de92-412f-9c9e-a9ebeba1e51d" CreationDate="2022-04-26T16:05:00.193" UserId="1838" Text="Statemint/Statemine provides a first-class interface for creating, managing, and using both fungible and non-fungible assets.&#xD;&#xA;Other token such as `USDT` will also be minted on it, How to integrate Statemint/Statemine's assets(such as USDT) into own parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8068" PostHistoryTypeId="1" PostId="2169" RevisionGUID="f102b809-de92-412f-9c9e-a9ebeba1e51d" CreationDate="2022-04-26T16:05:00.193" UserId="1838" Text="how to integrating Statemint/Statemine into parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8069" PostHistoryTypeId="3" PostId="2169" RevisionGUID="f102b809-de92-412f-9c9e-a9ebeba1e51d" CreationDate="2022-04-26T16:05:00.193" UserId="1838" Text="|statemine|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8070" PostHistoryTypeId="5" PostId="2160" RevisionGUID="bda99e1d-b894-4e30-a065-c770717a9e37" CreationDate="2022-04-26T16:16:39.257" UserId="53" Comment="added 1 character in body" Text="The [XCM Format](https://github.com/paritytech/xcm-format) repository provides a place to propose and discuss additions to the XCM protocol. There is at present no means to introduce unofficial format extensions outside of the mainline versioning system (which is linear in nature), though the `Transact` instruction allows chains to query and utilise custom functionality in each other.&#xD;&#xA;&#xD;&#xA;It should be possible to add a more flexible extension system to the XCM format, with the list of extensions being part of the XCM version identifier, however nothing is proposed yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="8071" PostHistoryTypeId="5" PostId="2164" RevisionGUID="ec7e66d8-4da0-41cb-acc3-f43f9839b399" CreationDate="2022-04-26T16:22:58.170" UserId="53" Comment="deleted 1 character in body" Text="The `std` feature is not something that works out of box. It is just a convention that crate authors may or may not stick to.&#xD;&#xA;&#xD;&#xA;As you can see, there is no `std` feature in Cargo.toml of `unic-emoji-char` [here](https://github.com/open-i18n/rust-unic/blob/41cd2b01e2e51a2b8d7d32fd13b14c0c092ac014/unic/emoji/char/Cargo.toml). &#xD;&#xA;&#xD;&#xA;Apart from that, compiling code to a runtime implies using the `no_std` environment (see [here](https://substrate.stackexchange.com/questions/1274/why-do-we-need-cfg-attrnotfeature-std-no-std) for more details) and the crate in question does not seem to declare that in its lib.rs." ContentLicense="CC BY-SA 4.0" />
  <row Id="8072" PostHistoryTypeId="52" PostId="2148" RevisionGUID="9c10f341-d280-4908-a2e5-60ac6b6c4f8c" CreationDate="2022-04-26T16:51:27.830" />
  <row Id="8073" PostHistoryTypeId="2" PostId="2170" RevisionGUID="edb457bf-5a7d-4780-8ea2-092722517efa" CreationDate="2022-04-26T17:28:08.983" UserId="29" Text="# Bruno Galvao&#xD;&#xA;&#xD;&#xA;Hello!&#xD;&#xA;&#xD;&#xA;I am passionate about all things **Polkadot** and **Substrate** and as such I joined Parity Technologies as a Polkadot Support Engineer.&#xD;&#xA;&#xD;&#xA;It would be an honor to be a moderator and **help the community grow** in a **strong** and **positive** manner.&#xD;&#xA;&#xD;&#xA;I believe I am a good candidate because:&#xD;&#xA;&#xD;&#xA;- I can **relate** to those who struggle with complex topics - I have been there, I know what that is like.&#xD;&#xA;&#xD;&#xA;- It is in-line with my role (Polkadot Support Engineer). On a daily basis, I already find myself interacting with many of the moderator tasks outlined [here](https://stackoverflow.blog/2009/05/18/a-theory-of-moderation).&#xD;&#xA;&#xD;&#xA;- I am passionate about learning more about Polkadot/Substrate and **sharing** that knowledge with the world!&#xD;&#xA;&#xD;&#xA;- I strive to bring **clarity** to the table, whether that means reaching out to others in the community to get an answer or spending hours digging deeper into code in order to bring a **clear** and **concise** answer to our community.&#xD;&#xA;&#xD;&#xA;If I am elected, I will spend my time and effort in bringing a SE that is well-organized and serves its true purpose.&#xD;&#xA;&#xD;&#xA;Yours Truly,&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Moderator)]&#xD;&#xA;Bruno Galvao&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8075" PostHistoryTypeId="5" PostId="2017" RevisionGUID="75768e89-4a37-411d-a962-abf3de6fbf5c" CreationDate="2022-04-26T17:32:00.923" UserId="172" Comment="added 150 characters in body" Text="[Subsquid][1] is a blockchain indexing solution that gives developers and analysts the data they need to build Web3. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://subsquid.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="8076" PostHistoryTypeId="24" PostId="2017" RevisionGUID="75768e89-4a37-411d-a962-abf3de6fbf5c" CreationDate="2022-04-26T17:32:00.923" Comment="Proposed by 172 approved by 45, 29 edit id of 165" ContentLicense="CC BY-SA 4.0" />
  <row Id="8077" PostHistoryTypeId="5" PostId="1931" RevisionGUID="4f85083a-4b0f-4abf-a68f-ded86a8e9263" CreationDate="2022-04-26T17:32:21.717" UserId="34" Comment="added 66 characters in body" Text="Related to runtime upgrades, a one time conversion of chain state." ContentLicense="CC BY-SA 4.0" />
  <row Id="8078" PostHistoryTypeId="24" PostId="1931" RevisionGUID="4f85083a-4b0f-4abf-a68f-ded86a8e9263" CreationDate="2022-04-26T17:32:21.717" Comment="Proposed by 34 approved by 85, 29 edit id of 163" ContentLicense="CC BY-SA 4.0" />
  <row Id="8079" PostHistoryTypeId="6" PostId="2159" RevisionGUID="cdbd2e23-e04e-4c45-af77-e0d260c8518c" CreationDate="2022-04-26T17:56:06.763" UserId="45" Comment="add scale-codec tag" Text="|pallet|storage|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8080" PostHistoryTypeId="24" PostId="2159" RevisionGUID="cdbd2e23-e04e-4c45-af77-e0d260c8518c" CreationDate="2022-04-26T17:56:06.763" Comment="Proposed by 45 approved by 29, -1 edit id of 175" ContentLicense="CC BY-SA 4.0" />
  <row Id="8081" PostHistoryTypeId="4" PostId="2159" RevisionGUID="5af08775-49e3-4ee2-92f7-c969a01f0ff5" CreationDate="2022-04-26T17:56:06.763" UserId="377" Comment="add scale-codec tag" Text="How can we use struct instead of tuple in pallet storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8082" PostHistoryTypeId="5" PostId="2146" RevisionGUID="64d2f613-b320-403c-9aa1-caa50251731a" CreationDate="2022-04-26T18:01:32.117" UserId="32" Comment="added 11 characters in body" Text="# Radha&#xD;&#xA;&#xD;&#xA;As a Technical Educator at Web3 Foundation, I would like to actively engage with the community on Substrate and Polkadot Stack Exchange and create/update educational content to address the key knowledge gaps identified. I would like to put my knowledge on Polkadot and Substrate to test and refine it through moderating the Q&amp;As on a daily basis." ContentLicense="CC BY-SA 4.0" />
  <row Id="8083" PostHistoryTypeId="2" PostId="2171" RevisionGUID="a987cca6-806c-42d1-ac58-0a0448927966" CreationDate="2022-04-26T18:04:48.207" UserId="73" Text="There is no way to get the number of peers of your node. Doing that would also only work as long as all nodes are connected to each other, which isn't working in a really decentralized network. So, you will need to do something different. You will not be able to prevent that multiple nodes are validating the same data. From your short description it actually sounds like you want/need multiple nodes that validate the data. How do you want to ensure that when only one node is validating the data, it isn't lying? That it actually verified the data correctly.&#xD;&#xA;&#xD;&#xA;Now to a possible solution. You can use the [`random_seed`][1] function to give you a random seed. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let random_seed = sp_io::offchain::random_seed();&#xD;&#xA;&#xD;&#xA;let number = u32::decode(&amp;mut &amp;random_seed[..]).expect(&quot;The seed is 32 byte and `u32` can be decoded from any 4 bytes; qed&quot;);&#xD;&#xA;&#xD;&#xA;if number % 100 &lt; 50 {&#xD;&#xA;    do_the_validation();&#xD;&#xA;} &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Be aware that for you real implementation you should ensure that always multiple nodes are validating the data and sending the result to the runtime.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-io/latest/sp_io/offchain/fn.random_seed.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="8085" PostHistoryTypeId="2" PostId="2172" RevisionGUID="755bc84d-1144-4fa0-a7c4-649944d70242" CreationDate="2022-04-26T18:09:04.917" UserId="73" Text="You need to use the encoded extrinsics, so the following should do it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;BlakeTwo256::ordered_trie_root(&#xD;&#xA;   block&#xD;&#xA;       .block&#xD;&#xA;       .extrinsics&#xD;&#xA;       .iter()&#xD;&#xA;       .map(Encode::encode)&#xD;&#xA;       .collect(),&#xD;&#xA;   sp_runtime::StateVersion::V0,&#xD;&#xA;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8087" PostHistoryTypeId="2" PostId="2173" RevisionGUID="8f9d654c-0cf5-4fce-9f60-297cf5e954f8" CreationDate="2022-04-26T18:12:20.460" UserId="299" Text="About Code:&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/runtime/src/lib.rs#L130-L145&#xD;&#xA;```rust&#xD;&#xA;pub struct WeightToFee;&#xD;&#xA;impl WeightToFeePolynomial for WeightToFee {&#xD;&#xA;	type Balance = Balance;&#xD;&#xA;	fn polynomial() -&gt; WeightToFeeCoefficients&lt;Self::Balance&gt; {&#xD;&#xA;		// in Rococo, extrinsic base weight (smallest non-zero weight) is mapped to 1 MILLIUNIT:&#xD;&#xA;		// in our template, we map to 1/10 of that, or 1/10 MILLIUNIT&#xD;&#xA;		let p = MILLIUNIT / 10;&#xD;&#xA;		let q = 100 * Balance::from(ExtrinsicBaseWeight::get());&#xD;&#xA;		smallvec![WeightToFeeCoefficient {&#xD;&#xA;			degree: 1,&#xD;&#xA;			negative: false,&#xD;&#xA;			coeff_frac: Perbill::from_rational(p % q, q),&#xD;&#xA;			coeff_integer: p / q,&#xD;&#xA;		}]&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I don't really understand what `Perbill:: from_Rational (P % q, q)` means.&#xD;&#xA;Has anyone tried to plot this polynomial in rectangular coordinates?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8089" PostHistoryTypeId="1" PostId="2173" RevisionGUID="8f9d654c-0cf5-4fce-9f60-297cf5e954f8" CreationDate="2022-04-26T18:12:20.460" UserId="299" Text="What is the polynomial corresponding to WeightToFee in the official library?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8090" PostHistoryTypeId="3" PostId="2173" RevisionGUID="8f9d654c-0cf5-4fce-9f60-297cf5e954f8" CreationDate="2022-04-26T18:12:20.460" UserId="299" Text="|weight|weighttofee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8091" PostHistoryTypeId="52" PostId="2153" RevisionGUID="3122bc15-9fd8-4274-8ec0-04a346d57360" CreationDate="2022-04-26T18:28:05.500" />
  <row Id="8092" PostHistoryTypeId="2" PostId="2174" RevisionGUID="dcb2ee31-a566-485a-922d-d9667a3a6a5a" CreationDate="2022-04-26T18:30:26.543" UserId="620" Text="It just approximates `p/q` (in this line, `(p % q) / q`) as a `PerBill`: https://github.com/paritytech/substrate/blob/2195448d01fc935912d8cf543be6d609f5899652/primitives/arithmetic/src/per_things.rs#L265L283" ContentLicense="CC BY-SA 4.0" />
  <row Id="8094" PostHistoryTypeId="5" PostId="2169" RevisionGUID="71443664-ec2e-4803-9887-12a58cff4064" CreationDate="2022-04-26T18:48:24.337" UserId="34" Comment="update tags, clarify question to be more broad" Text="Statemint/Statemine provides a first-class interface for creating, managing, and using both fungible and non-fungible assets.&#xD;&#xA;Token such as `USDT` are minted on it.&#xD;&#xA;&#xD;&#xA;What methods are possible to interact with Statemint/Statemine's assets into a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8095" PostHistoryTypeId="4" PostId="2169" RevisionGUID="71443664-ec2e-4803-9887-12a58cff4064" CreationDate="2022-04-26T18:48:24.337" UserId="34" Comment="update tags, clarify question to be more broad" Text="How to access Statemint/Statemine assets in a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8096" PostHistoryTypeId="6" PostId="2169" RevisionGUID="71443664-ec2e-4803-9887-12a58cff4064" CreationDate="2022-04-26T18:48:24.337" UserId="34" Comment="update tags, clarify question to be more broad" Text="|kusama|xcm|assets|statemint|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8097" PostHistoryTypeId="24" PostId="2169" RevisionGUID="71443664-ec2e-4803-9887-12a58cff4064" CreationDate="2022-04-26T18:48:24.337" Comment="Proposed by 34 approved by 29, 1838 edit id of 176" ContentLicense="CC BY-SA 4.0" />
  <row Id="8098" PostHistoryTypeId="2" PostId="2175" RevisionGUID="277a6240-5693-4281-8c12-b14946188f9c" CreationDate="2022-04-26T18:50:57.217" UserId="2283" Text="I have [declared][1] `pub struct Change&lt;T: Config&gt; {` at my pallet. Hand made &#xD;&#xA;`impl&lt;T: Config&gt; Clone for Change&lt;T&gt; {` works fine, but when I'm adding `#[derive(Clone)]` to `struct Change` compiler raise errors:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo build -r&#xD;&#xA;   Compiling nae-node-runtime v4.0.0-dev (/Users/dmitriyshabanov/Projects/nae/nae-substrate-node/runtime)&#xD;&#xA;   Compiling pallet-nae v0.1.0-dev (/Users/dmitriyshabanov/Projects/nae/nae-substrate-node/pallets/nae)&#xD;&#xA;error[E0599]: the method `clone` exists for struct `BoundedVec&lt;Change&lt;T&gt;, &lt;T as pallet::Config&gt;::MaxChanges&gt;`, but its trait bounds were not satisfied&#xD;&#xA;   --&gt; pallets/nae/src/lib.rs:149:26&#xD;&#xA;    |&#xD;&#xA;23  |     pub struct Change&lt;T: Config&gt; {&#xD;&#xA;    |     ---------------------------- doesn't satisfy `Change&lt;T&gt;: Clone`&#xD;&#xA;...&#xD;&#xA;149 |             for change in changes.clone() {&#xD;&#xA;    |                                   ^^^^^ method cannot be called on `BoundedVec&lt;Change&lt;T&gt;, &lt;T as pallet::Config&gt;::MaxChanges&gt;` due to unsatisfied trait bounds&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/dmitriyshabanov/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:400:1&#xD;&#xA;    |&#xD;&#xA;400 | pub struct Vec&lt;T, #[unstable(feature = &quot;allocator_api&quot;, issue = &quot;32838&quot;)] A: Allocator = Global&gt; {&#xD;&#xA;    | ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec&lt;Change&lt;T&gt;&gt;: Clone`&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/dmitriyshabanov/.cargo/git/checkouts/substrate-7e08433d4c370a21/fc3fd07/frame/support/src/storage/bounded_vec.rs:42:1&#xD;&#xA;    |&#xD;&#xA;42  | pub struct BoundedVec&lt;T, S&gt;(Vec&lt;T&gt;, PhantomData&lt;S&gt;);&#xD;&#xA;    | ---------------------------------------------------- doesn't satisfy `_: Clone`&#xD;&#xA;    |&#xD;&#xA;    = note: the following trait bounds were not satisfied:&#xD;&#xA;            `Change&lt;T&gt;: Clone`&#xD;&#xA;            which is required by `BoundedVec&lt;Change&lt;T&gt;, &lt;T as pallet::Config&gt;::MaxChanges&gt;: Clone`&#xD;&#xA;            `Change&lt;T&gt;: Clone`&#xD;&#xA;            which is required by `Vec&lt;Change&lt;T&gt;&gt;: Clone`&#xD;&#xA;help: consider annotating `Change&lt;T&gt;` with `#[derive(Clone)]`&#xD;&#xA;    |&#xD;&#xA;23  |     #[derive(Clone)]&#xD;&#xA;    |&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Change&lt;T&gt;: Clone` is not satisfied&#xD;&#xA;   --&gt; pallets/nae/src/lib.rs:100:34&#xD;&#xA;    |&#xD;&#xA;100 |         MutationAccepted(T::AccountId, BoundedVec&lt;Change&lt;T&gt;, T::MaxChanges&gt;)&#xD;&#xA;    |                                        ^^^^^^^^^^ expected an implementor of trait `Clone`&#xD;&#xA;    |&#xD;&#xA;note: required because of the requirements on the impl of `Clone` for `Change&lt;T&gt;`&#xD;&#xA;   --&gt; pallets/nae/src/lib.rs:21:52&#xD;&#xA;    |&#xD;&#xA;21  |     #[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Clone)]&#xD;&#xA;    |                                                       ^^^^^&#xD;&#xA;    = note: 1 redundant requirement hidden&#xD;&#xA;    = note: required because of the requirements on the impl of `Clone` for `BoundedVec&lt;Change&lt;T&gt;, &lt;T as pallet::Config&gt;::MaxChanges&gt;`&#xD;&#xA;    = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: consider borrowing here&#xD;&#xA;    |&#xD;&#xA;100 |         MutationAccepted(T::AccountId, &amp;BoundedVec&lt;Change&lt;T&gt;, T::MaxChanges&gt;)&#xD;&#xA;    |                                        +&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Change&lt;T&gt;: Clone` is not satisfied&#xD;&#xA;   --&gt; pallets/nae/src/lib.rs:135:4&#xD;&#xA;    |&#xD;&#xA;135 |             changes: BoundedVec&lt;Change&lt;T&gt;, T::MaxChanges&gt;&#xD;&#xA;    |             ^^^^^^^ expected an implementor of trait `Clone`&#xD;&#xA;    |&#xD;&#xA;note: required because of the requirements on the impl of `Clone` for `Change&lt;T&gt;`&#xD;&#xA;   --&gt; pallets/nae/src/lib.rs:21:52&#xD;&#xA;    |&#xD;&#xA;21  |     #[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Clone)]&#xD;&#xA;    |                                                       ^^^^^&#xD;&#xA;    = note: 1 redundant requirement hidden&#xD;&#xA;    = note: required because of the requirements on the impl of `Clone` for `BoundedVec&lt;Change&lt;T&gt;, &lt;T as pallet::Config&gt;::MaxChanges&gt;`&#xD;&#xA;    = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: consider borrowing here&#xD;&#xA;    |&#xD;&#xA;135 |             &amp;changes: BoundedVec&lt;Change&lt;T&gt;, T::MaxChanges&gt;&#xD;&#xA;    |             +&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0277, E0599.&#xD;&#xA;For more information about an error, try `rustc --explain E0277`.&#xD;&#xA;error: could not compile `pallet-nae` due to 3 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any idea what can be wrong and how to fix?&#xD;&#xA;&#xD;&#xA;PS:&#xD;&#xA;```&#xD;&#xA;rustc 1.60.0 (7737e0b5c 2022-04-04)&#xD;&#xA;cargo 1.60.0 (d1fd9fe2c 2022-03-01)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DigitaIAM/nae-substrate-node/blob/main/pallets/nae/src/lib.rs#L23" ContentLicense="CC BY-SA 4.0" />
  <row Id="8100" PostHistoryTypeId="1" PostId="2175" RevisionGUID="277a6240-5693-4281-8c12-b14946188f9c" CreationDate="2022-04-26T18:50:57.217" UserId="2283" Text="Use Config as generic" ContentLicense="CC BY-SA 4.0" />
  <row Id="8101" PostHistoryTypeId="3" PostId="2175" RevisionGUID="277a6240-5693-4281-8c12-b14946188f9c" CreationDate="2022-04-26T18:50:57.217" UserId="2283" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8102" PostHistoryTypeId="2" PostId="2176" RevisionGUID="e4954fc7-9661-4264-a844-5039a542c731" CreationDate="2022-04-26T19:02:13.377" UserId="73" Text="You don't implement `Clone` for your `Change` struct. &#xD;&#xA;&#xD;&#xA;Use the following declaration:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, frame_support::CloneNoBound)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	pub struct Change&lt;T: Config&gt; {&#xD;&#xA;		/// primary object of relation&#xD;&#xA;		pub primary: ID,&#xD;&#xA;&#xD;&#xA;		/// description of relation between primary object and value&#xD;&#xA;		pub relation: BoundedVec&lt;ID, T::MaxContent&gt;,&#xD;&#xA;&#xD;&#xA;		/// value before modification&#xD;&#xA;		pub before: Option&lt;Value&gt;,&#xD;&#xA;&#xD;&#xA;		/// value after modification&#xD;&#xA;		pub after: Option&lt;Value&gt;,&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then your type will implement `Clone`. Be aware that I used the custom `CloneNoBound` derive macro provided by Substrate. You can also use the standard `Clone` from the rust standard library. However, this will require that `T` also implements `Clone`, which is really not required here. Otherwise you can also still implement `Clone` manually:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	pub struct Change&lt;T: Config&gt; {&#xD;&#xA;		/// primary object of relation&#xD;&#xA;		pub primary: ID,&#xD;&#xA;&#xD;&#xA;		/// description of relation between primary object and value&#xD;&#xA;		pub relation: BoundedVec&lt;ID, T::MaxContent&gt;,&#xD;&#xA;&#xD;&#xA;		/// value before modification&#xD;&#xA;		pub before: Option&lt;Value&gt;,&#xD;&#xA;&#xD;&#xA;		/// value after modification&#xD;&#xA;		pub after: Option&lt;Value&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Clone for Change {&#xD;&#xA;        fn clone(&amp;self) -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                primary: self.primary.clone(),&#xD;&#xA;                relation: self.relation.clone(),&#xD;&#xA;                before: self.before.clone(),&#xD;&#xA;                after: self.after.clone(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    } &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8104" PostHistoryTypeId="2" PostId="2177" RevisionGUID="f23a35ac-de4f-48e4-8a56-696622f12215" CreationDate="2022-04-26T19:42:04.747" UserId="632" Text="I know that some RPC query exist to get informations like : &#xD;&#xA;system_properties&#xD;&#xA;system_chain&#xD;&#xA;system_chainType&#xD;&#xA;&#xD;&#xA;But I would like to have all of them in a same custom call.&#xD;&#xA;How I can access to those informations ?&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="8106" PostHistoryTypeId="1" PostId="2177" RevisionGUID="f23a35ac-de4f-48e4-8a56-696622f12215" CreationDate="2022-04-26T19:42:04.747" UserId="632" Text="Read spec chain in a custom rpc method" ContentLicense="CC BY-SA 4.0" />
  <row Id="8107" PostHistoryTypeId="3" PostId="2177" RevisionGUID="f23a35ac-de4f-48e4-8a56-696622f12215" CreationDate="2022-04-26T19:42:04.747" UserId="632" Text="|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8108" PostHistoryTypeId="2" PostId="2178" RevisionGUID="0a839477-1401-44e6-8386-0b7afe6e53d3" CreationDate="2022-04-26T20:45:35.177" UserId="85" Text="There's some great examples of how to use subxt to listen to [all events][1].&#xD;&#xA;&#xD;&#xA;Polkadot-js events screen seem to show events grouped by the extrinsic that created them. Can I do the same in rust?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt/blob/master/examples/examples/subscribe_all_events.rs&#xD;&#xA;&#xD;&#xA;(if not subxt is there an alternative way?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="8110" PostHistoryTypeId="1" PostId="2178" RevisionGUID="0a839477-1401-44e6-8386-0b7afe6e53d3" CreationDate="2022-04-26T20:45:35.177" UserId="85" Text="With subxt how can I subscribe to watch extrinsics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8111" PostHistoryTypeId="3" PostId="2178" RevisionGUID="0a839477-1401-44e6-8386-0b7afe6e53d3" CreationDate="2022-04-26T20:45:35.177" UserId="85" Text="|rust|extrinsic|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8112" PostHistoryTypeId="5" PostId="2114" RevisionGUID="51c459c6-9e0d-4906-a25f-8bc5687f1a43" CreationDate="2022-04-26T20:47:21.903" UserId="151" Comment="added 387 characters in body" Text="The term `docker` usually refers to a set of open-source tools that allow developers to build and run containers individually or as a 'stack' of related containers. A container is an isolated package that contains everything, except for the kernel, needed to run a piece of software. Docker was originally written to work with Linux and has more recently been implemented on MS Windows. " ContentLicense="CC BY-SA 4.0" />
  <row Id="8113" PostHistoryTypeId="24" PostId="2114" RevisionGUID="51c459c6-9e0d-4906-a25f-8bc5687f1a43" CreationDate="2022-04-26T20:47:21.903" Comment="Proposed by 151 approved by 29, 85 edit id of 170" ContentLicense="CC BY-SA 4.0" />
  <row Id="8114" PostHistoryTypeId="5" PostId="2076" RevisionGUID="0fd38053-b48f-4556-a815-dfca9d478c0d" CreationDate="2022-04-26T20:47:39.040" UserId="88" Comment="added 259 characters in body" Text="For math questions in general that do not fall into special categories such as `floating-point` , `fixed-point`, or `safe-math` as previously used, all of which are also valid subsets of this category hence this tag can also be used to earmark such questions." ContentLicense="CC BY-SA 4.0" />
  <row Id="8115" PostHistoryTypeId="24" PostId="2076" RevisionGUID="0fd38053-b48f-4556-a815-dfca9d478c0d" CreationDate="2022-04-26T20:47:39.040" Comment="Proposed by 88 approved by 29, 85 edit id of 168" ContentLicense="CC BY-SA 4.0" />
  <row Id="8116" PostHistoryTypeId="5" PostId="2115" RevisionGUID="80cc581f-c7ed-4608-a469-e869e7e5b1b8" CreationDate="2022-04-26T20:47:52.320" UserId="151" Comment="added 136 characters in body" Text="For questions about building and running Docker containers. Specifically in the context of substrate related softwares (nodes, UI, etc.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="8117" PostHistoryTypeId="24" PostId="2115" RevisionGUID="80cc581f-c7ed-4608-a469-e869e7e5b1b8" CreationDate="2022-04-26T20:47:52.320" Comment="Proposed by 151 approved by 29, 85 edit id of 171" ContentLicense="CC BY-SA 4.0" />
  <row Id="8118" PostHistoryTypeId="6" PostId="2122" RevisionGUID="897fd272-1233-4330-ac3f-4838a7d013ab" CreationDate="2022-04-26T20:48:05.440" UserId="45" Comment="add the EVM tag which seems to be relevant here" Text="|polkadot|polkadot-js|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8119" PostHistoryTypeId="24" PostId="2122" RevisionGUID="897fd272-1233-4330-ac3f-4838a7d013ab" CreationDate="2022-04-26T20:48:05.440" Comment="Proposed by 45 approved by 29, 85 edit id of 173" ContentLicense="CC BY-SA 4.0" />
  <row Id="8120" PostHistoryTypeId="5" PostId="2099" RevisionGUID="120255a4-e4ba-43fd-a77b-ed55022de1eb" CreationDate="2022-04-26T20:48:15.860" UserId="116" Comment="Inline error message to increase readability and so it is not lost if external link changes." Text="I'm trying to implement simple PoW for my node. After debugging all other stuff I've encountered the problem where `finality-grandpa` and `storage` do not get compiled because standard library macros are (for some reason) out of scope.&#xD;&#xA;&#xD;&#xA;I've checked that `std` features and enabled for all dependencies where they need to be enabled. Also I found [this](https://doc.rust-lang.org/cargo/reference/features-examples.html?highlight=no-std#:~:text=full%20standard%20library.-,The%20wasm%2Dbindgen,-package%20defines%20a) information about one of the dependencies. But as it's a non-local (pulled from github) I can't change that functionality.&#xD;&#xA;&#xD;&#xA;Please note that I did not modify any of these two pallets (just imported my own, implementing PoW). Before that (on clear substrate-node-template which I use as a base for my project) those built without any problem.  &#xD;&#xA;&#xD;&#xA;The question is: How do I fix this? Should I enable `std` for these crates somehow? &#xD;&#xA;As far as I know, the node is built into native Rust and WASM, and for WASM it's built in no-std. By why did it build before in this case?  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a part of the error message I get:&#xD;&#xA;```&#xD;&#xA;cargo build --release &#xD;&#xA;    Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;   Compiling node-template-runtime v4.0.0-dev (/home/creestl/programming/blockchain/crain/runtime)&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/home/creestl/programming/blockchain/crain/runtime)`&#xD;&#xA; &#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/creestl/programming/blockchain/crain/target/release/build/node-template-runtime-d1d0301f1ce42478/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/home/creestl/programming/blockchain/crain/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.62.0-nightly (de1bc0008 2022-04-21)&#xD;&#xA; &#xD;&#xA; &#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)&#xD;&#xA;     Compiling sp-finality-grandpa v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)&#xD;&#xA;  error: cannot find macro `format` in this scope&#xD;&#xA;    --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/fc3fd07/primitives/finality-grandpa/src/lib.rs:43:2&#xD;&#xA;     |&#xD;&#xA;  43 |     app_crypto!(ed25519, GRANDPA);&#xD;&#xA;     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: consider importing one of these items:&#xD;&#xA;             alloc::format&#xD;&#xA;             scale_info::prelude::format&#xD;&#xA;     = note: this error originates in the macro `$crate::app_crypto_public_common_if_std` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA; &#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `std`&#xD;&#xA;    --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/fc3fd07/primitives/finality-grandpa/src/lib.rs:43:2&#xD;&#xA;     |&#xD;&#xA;  43 |     app_crypto!(ed25519, GRANDPA);&#xD;&#xA;     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `std`&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `$crate::app_crypto_public_common_if_std` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA; &#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared type `String`&#xD;&#xA;    --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/fc3fd07/primitives/finality-grandpa/src/lib.rs:43:2&#xD;&#xA;     |&#xD;&#xA;  43 |     app_crypto!(ed25519, GRANDPA);&#xD;&#xA;     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `$crate::app_crypto_public_common_if_std` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;  help: consider importing one of these items&#xD;&#xA;     |&#xD;&#xA;  42 |     use alloc::string::String;&#xD;&#xA;     |&#xD;&#xA;  42 |     use codec::alloc::string::String;&#xD;&#xA;     |&#xD;&#xA;  42 |     use scale_info::prelude::string::String;&#xD;&#xA;     |&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;And here is a [link](https://github.com/CREESTL/Crain) to the repo with my last changes&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8121" PostHistoryTypeId="24" PostId="2099" RevisionGUID="120255a4-e4ba-43fd-a77b-ed55022de1eb" CreationDate="2022-04-26T20:48:15.860" Comment="Proposed by 116 approved by 29, 85 edit id of 174" ContentLicense="CC BY-SA 4.0" />
  <row Id="8122" PostHistoryTypeId="5" PostId="2018" RevisionGUID="e7741378-42ca-4ab5-a03d-a587063cbd9a" CreationDate="2022-04-26T20:48:23.667" UserId="172" Comment="added 81 characters in body" Text="Questions about using Subsquid APIs to index and query archived blockchain state." ContentLicense="CC BY-SA 4.0" />
  <row Id="8123" PostHistoryTypeId="24" PostId="2018" RevisionGUID="e7741378-42ca-4ab5-a03d-a587063cbd9a" CreationDate="2022-04-26T20:48:23.667" Comment="Proposed by 172 approved by 29, 85 edit id of 166" ContentLicense="CC BY-SA 4.0" />
  <row Id="8124" PostHistoryTypeId="2" PostId="2179" RevisionGUID="55711ca1-d91b-4475-800f-08ae007be772" CreationDate="2022-04-26T20:56:28.547" UserId="2104" Text="Q1. What is the existence of `Unsigned Transaction` for?&#xD;&#xA;- I have read about it here: https://docs.substrate.io/v3/concepts/extrinsics/&#xD;&#xA;- But it still does not really make sense to me why it exists in Polkadot. What other examples or cases do we need to use this transaction type, other than `I'm Online` Pallet?&#xD;&#xA;- From `I'm Online` pallet, why does a validator node need to send a heartbeat(unsigned tx) which tells it's online?&#xD;&#xA;&#xD;&#xA;Q2. If Unsigned Transaction does not require any tx-fee, isn't such unsigned one vulnerable to DDoS Attack? If not, how does Polkadot protect its own network from such attacks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8126" PostHistoryTypeId="1" PostId="2179" RevisionGUID="55711ca1-d91b-4475-800f-08ae007be772" CreationDate="2022-04-26T20:56:28.547" UserId="2104" Text="Few Questions about 'Unsigned Transaction' from tutorial: &lt;Create your first Substrate blockchain&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8127" PostHistoryTypeId="3" PostId="2179" RevisionGUID="55711ca1-d91b-4475-800f-08ae007be772" CreationDate="2022-04-26T20:56:28.547" UserId="2104" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8128" PostHistoryTypeId="2" PostId="2180" RevisionGUID="74def937-c7a0-4481-a21f-18d62d3cf894" CreationDate="2022-04-26T22:00:35.830" UserId="590" Text="Substrate supports multiple signature schemes: ecdsa, sr2551, ed25519. &#xD;&#xA;When sending a signed transaction how does substrate know what scheme to use for signature verification?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8130" PostHistoryTypeId="1" PostId="2180" RevisionGUID="74def937-c7a0-4481-a21f-18d62d3cf894" CreationDate="2022-04-26T22:00:35.830" UserId="590" Text="How does Substrate detect the signing scheme when verifying signatures?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8131" PostHistoryTypeId="3" PostId="2180" RevisionGUID="74def937-c7a0-4481-a21f-18d62d3cf894" CreationDate="2022-04-26T22:00:35.830" UserId="590" Text="|substrate-node|substrate-node-template|cryptography|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8132" PostHistoryTypeId="2" PostId="2181" RevisionGUID="877d4897-8309-4fc8-9f8f-1580377c7214" CreationDate="2022-04-27T01:31:21.127" UserId="2356" Text="I'm trying to create a KeyPair class instance (https://github.com/polkascan/py-substrate-interface/blob/master/substrateinterface/base.py) from a Ledger hardware wallet. Does anyone know how to do this (if it's even possible?) &#xD;&#xA;&#xD;&#xA;Alternatively, I can just generate the signature payload and use other tooling to sign it with the Ledger. But eventually it would be nice to be able to use Ledger out of the box to sign transactions in substrate interface. I can submit a PR with this functionality if it doesn't already exist. &#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="8134" PostHistoryTypeId="1" PostId="2181" RevisionGUID="877d4897-8309-4fc8-9f8f-1580377c7214" CreationDate="2022-04-27T01:31:21.127" UserId="2356" Text="Use Ledger For ECDSA Signature in Python Substrate Interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="8135" PostHistoryTypeId="3" PostId="2181" RevisionGUID="877d4897-8309-4fc8-9f8f-1580377c7214" CreationDate="2022-04-27T01:31:21.127" UserId="2356" Text="|signing|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8136" PostHistoryTypeId="2" PostId="2182" RevisionGUID="fe74abc3-68f2-42f6-840a-adf349eb5588" CreationDate="2022-04-27T05:24:07.983" UserId="620" Text="It is a SCALE-encoded [`MultiSignature` enum](https://github.com/paritytech/substrate/blob/8bc45ed4be61b83dcfac77bfc8002858ff8042ec/primitives/runtime/src/lib.rs#L230L240). so in SCALE encoding the first byte tells you which variant the value is. So you will notice that ed25519 signatures always start with 0x00, sr25519 with 0x01, and ecdsa with 0x02.&#xD;&#xA;&#xD;&#xA;So in a fully serialized transaction, the &quot;signature&quot; is actually `0x &lt;scheme&gt; + &lt;signature&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="8138" PostHistoryTypeId="52" PostId="2180" RevisionGUID="1fe70ff6-d859-49ce-82c3-c15242f2df91" CreationDate="2022-04-27T06:00:39.313" />
  <row Id="8139" PostHistoryTypeId="2" PostId="2183" RevisionGUID="c96b2492-8b26-42df-b5b7-c539614fb81c" CreationDate="2022-04-27T06:11:49.213" UserId="627" Text="The logic in subxt will map through in a similar way. &#xD;&#xA;&#xD;&#xA;The [EventRecord struct](https://github.com/paritytech/substrate/blob/6e740bc89d097a38d922d5619b55e0c7e8664a6c/frame/system/src/lib.rs#L706-L713) contains a [Phase enum](https://github.com/paritytech/substrate/blob/6e740bc89d097a38d922d5619b55e0c7e8664a6c/frame/system/src/lib.rs#L688-L695) where `ApplyExtrinsic(u32)` refers to the index of the extrinsic in the block.&#xD;&#xA;&#xD;&#xA;So the way to map it is -&#xD;&#xA;&#xD;&#xA; 1. If `phase` is not `ApplyExtrinsic`, it doesn't map to a transaction, e.g. it is a system event&#xD;&#xA; 2. If the `phase` is `ApplyExtrinsic`, get the index from this value&#xD;&#xA; 3. Map the extracted index to the extrinsic, as found in the block" ContentLicense="CC BY-SA 4.0" />
  <row Id="8142" PostHistoryTypeId="2" PostId="2184" RevisionGUID="f12d545f-82f6-4e80-a19e-31cb62565007" CreationDate="2022-04-27T08:10:16.790" UserId="2034" Text="my validator node shows the issue &quot;low connectivity, authority lookup failed for too many validators&quot;, can I know what this means? And is it dangerous for the safety of the chain?&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6BXEE.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="8144" PostHistoryTypeId="1" PostId="2184" RevisionGUID="f12d545f-82f6-4e80-a19e-31cb62565007" CreationDate="2022-04-27T08:10:16.790" UserId="2034" Text="what's the meaning of &quot;low connectivity, authority lookup failed for too many validators&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8145" PostHistoryTypeId="3" PostId="2184" RevisionGUID="f12d545f-82f6-4e80-a19e-31cb62565007" CreationDate="2022-04-27T08:10:16.790" UserId="2034" Text="|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8146" PostHistoryTypeId="2" PostId="2185" RevisionGUID="9bdaccfd-4c14-4cba-a886-87db4f4b0b57" CreationDate="2022-04-27T09:50:41.267" UserId="398" Text="I have my base currency as 18 decimals like 1_000_000_000_000_000_000. I want to set my base fee to charge using ```1_000_000_000_000_000_000``` for each evm transaction. How can i do? currently i have done this but not working properly.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct FixedGasPrice;&#xD;&#xA;&#xD;&#xA;impl FeeCalculator for FixedGasPrice {&#xD;&#xA;    fn min_gas_price() -&gt; U256 {&#xD;&#xA;        (1 * 1_000_000_000).into()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;if i try to change this formula into ```(1 * 1_000_000_000_000_000_000).into()``` i am getting error whenever i try to deploy the contract from remix." ContentLicense="CC BY-SA 4.0" />
  <row Id="8148" PostHistoryTypeId="1" PostId="2185" RevisionGUID="9bdaccfd-4c14-4cba-a886-87db4f4b0b57" CreationDate="2022-04-27T09:50:41.267" UserId="398" Text="Implementing min gas fee for pallet_evm" ContentLicense="CC BY-SA 4.0" />
  <row Id="8149" PostHistoryTypeId="3" PostId="2185" RevisionGUID="9bdaccfd-4c14-4cba-a886-87db4f4b0b57" CreationDate="2022-04-27T09:50:41.267" UserId="398" Text="|evm|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8150" PostHistoryTypeId="2" PostId="2186" RevisionGUID="4cbf9a70-4c17-4a96-96be-fcf48b1c81a1" CreationDate="2022-04-27T09:54:50.710" UserId="27" Text="I've found these two open issues:&#xD;&#xA;- [Re-Genesis #7458](https://github.com/paritytech/substrate/issues/7458)&#xD;&#xA;- [Swappable Consensus #1304](https://github.com/paritytech/substrate/issues/1304)&#xD;&#xA;&#xD;&#xA;and would be interested if there is more practical guidance on an example basis?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8152" PostHistoryTypeId="1" PostId="2186" RevisionGUID="4cbf9a70-4c17-4a96-96be-fcf48b1c81a1" CreationDate="2022-04-27T09:54:50.710" UserId="27" Text="What is the current state of Swappable Consensus and Re-Genesis" ContentLicense="CC BY-SA 4.0" />
  <row Id="8153" PostHistoryTypeId="3" PostId="2186" RevisionGUID="4cbf9a70-4c17-4a96-96be-fcf48b1c81a1" CreationDate="2022-04-27T09:54:50.710" UserId="27" Text="|substrate-node|consensus|cumulus|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8154" PostHistoryTypeId="5" PostId="2185" RevisionGUID="ac5bb9eb-e70f-4720-b34a-c1903c0eed16" CreationDate="2022-04-27T09:58:50.377" UserId="398" Comment="added 266 characters in body" Text="I have my base currency as 18 decimals like 1_000_000_000_000_000_000. I want to set my base fee to charge using ```1_000_000_000_000_000_000``` for each evm transaction. How can i do? currently i have done this but not working properly.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct FixedGasPrice;&#xD;&#xA;&#xD;&#xA;impl FeeCalculator for FixedGasPrice {&#xD;&#xA;    fn min_gas_price() -&gt; U256 {&#xD;&#xA;        (1 * 1_000_000_000).into()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;if i try to change this formula into ```(1 * 1_000_000_000_000_000_000).into()``` i am getting error whenever i try to deploy the contract from remix. I am getting below error:&#xD;&#xA;&#xD;&#xA;    creation of MyToken20 errored: [ethjs-query] while formatting outputs from RPC '{&quot;value&quot;:{&quot;code&quot;:-32603,&quot;data&quot;:{&quot;code&quot;:-32603,&quot;message&quot;:&quot;submit transaction to pool failed: Pool(InvalidTransaction(InvalidTransaction::Custom(1)))&quot;}}} " ContentLicense="CC BY-SA 4.0" />
  <row Id="8155" PostHistoryTypeId="2" PostId="2187" RevisionGUID="23e7a755-673b-4c8a-ba84-fb72ce9d3336" CreationDate="2022-04-27T10:05:49.917" UserId="2099" Text="My chain currently has a couple of custom RPC interfaces that I'd like to interact with using substrates front-end-template.&#xD;&#xA;I'm aware that the src/config/common.json file requires modification, which currently looks like this:&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;APP_NAME&quot;: &quot;substrate-front-end-template&quot;,&#xD;&#xA;  &quot;CUSTOM_RPC_METHODS&quot;: {}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;What is the correct syntax for defining my custom RPC here?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8157" PostHistoryTypeId="1" PostId="2187" RevisionGUID="23e7a755-673b-4c8a-ba84-fb72ce9d3336" CreationDate="2022-04-27T10:05:49.917" UserId="2099" Text="Extending front-end-template with custom RPC" ContentLicense="CC BY-SA 4.0" />
  <row Id="8158" PostHistoryTypeId="3" PostId="2187" RevisionGUID="23e7a755-673b-4c8a-ba84-fb72ce9d3336" CreationDate="2022-04-27T10:05:49.917" UserId="2099" Text="|rpc|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8159" PostHistoryTypeId="52" PostId="2178" RevisionGUID="fe0bc7a9-c26c-4c6a-93a6-380ce6876e82" CreationDate="2022-04-27T10:07:51.913" />
  <row Id="8160" PostHistoryTypeId="2" PostId="2188" RevisionGUID="5e283c8e-71e0-402c-aec0-8cc6b679cfed" CreationDate="2022-04-27T11:27:02.080" UserId="157" Text="I have client which works in parallel with custom pallet through Api implementation. To do proper testing I have to implement pallet for runtime similarly how `construct_runtime!` does to be able to refer to it. What is the approach to achieve this? Maybe some client already implements this? Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="8162" PostHistoryTypeId="1" PostId="2188" RevisionGUID="5e283c8e-71e0-402c-aec0-8cc6b679cfed" CreationDate="2022-04-27T11:27:02.080" UserId="157" Text="Client testing - simulate construct_runtime! and to include specific pallet into test runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="8163" PostHistoryTypeId="3" PostId="2188" RevisionGUID="5e283c8e-71e0-402c-aec0-8cc6b679cfed" CreationDate="2022-04-27T11:27:02.080" UserId="157" Text="|pallet|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8164" PostHistoryTypeId="5" PostId="2181" RevisionGUID="0d81cd8e-0dd9-4fe9-9606-4e4c54fe53ce" CreationDate="2022-04-27T12:14:07.113" UserId="172" Comment="Add tag and improved question." Text="I'm trying to create a KeyPair class instance (https://github.com/polkascan/py-substrate-interface/blob/master/substrateinterface/base.py) from a Ledger hardware wallet. Does anyone know how to do this (if it's even possible)?&#xD;&#xA;&#xD;&#xA;Alternatively, I can just generate the signature payload and use other tooling to sign it with the Ledger. But eventually it would be nice to be able to use Ledger out of the box to sign transactions in substrate interface. I can submit a PR with this functionality if it doesn't already exist." ContentLicense="CC BY-SA 4.0" />
  <row Id="8165" PostHistoryTypeId="6" PostId="2181" RevisionGUID="0d81cd8e-0dd9-4fe9-9606-4e4c54fe53ce" CreationDate="2022-04-27T12:14:07.113" UserId="172" Comment="Add tag and improved question." Text="|python|signing|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8166" PostHistoryTypeId="2" PostId="2189" RevisionGUID="003ea291-d6bf-4475-ba36-a6907259a272" CreationDate="2022-04-27T12:16:51.103" UserId="380" Text="I am using the [substrate contracts node](https://github.com/paritytech/substrate-contracts-node/) and my transactions are successfully submitted to the chain. I've checked using a dry run query and also checked in the explorer for the block after performing the tx. However, when I try to use the transaction result in polkadot-js, I cannot access fields such as `status`, as they are `undefined`.&#xD;&#xA;&#xD;&#xA;I'm calling the `signAndSend` function of the extrinsic but the `result: SubmittableResult` I get is simply the extrinsic hash.&#xD;&#xA;&#xD;&#xA;    extrinsic&#xD;&#xA;      .signAndSend(&#xD;&#xA;        signerAddress,&#xD;&#xA;        {&#xD;&#xA;          ...options&#xD;&#xA;        },&#xD;&#xA;        (result: SubmittableResult) =&gt; {&#xD;&#xA;          if (result.status.isInBlock) { //status is undefined here??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;According to the `SubmittableResult` type in polkadot-js, `status` should be there:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;export declare class SubmittableResult implements ISubmittableResult {&#xD;&#xA;    readonly dispatchError?: DispatchError;&#xD;&#xA;    readonly dispatchInfo?: DispatchInfo;&#xD;&#xA;    readonly internalError?: Error;&#xD;&#xA;    readonly events: EventRecord[];&#xD;&#xA;    readonly status: ExtrinsicStatus;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8168" PostHistoryTypeId="1" PostId="2189" RevisionGUID="003ea291-d6bf-4475-ba36-a6907259a272" CreationDate="2022-04-27T12:16:51.103" UserId="380" Text="Why is result.status undefined in an extrinsic's SubmittableResult?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8169" PostHistoryTypeId="3" PostId="2189" RevisionGUID="003ea291-d6bf-4475-ba36-a6907259a272" CreationDate="2022-04-27T12:16:51.103" UserId="380" Text="|polkadot-js|substrate-contracts-node|extrinsicstatus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8174" PostHistoryTypeId="5" PostId="2189" RevisionGUID="4d38eccb-037b-486a-8e04-20ec5e032940" CreationDate="2022-04-27T13:32:51.673" UserId="380" Comment="added 18 characters in body" Text="I am using the [substrate contracts node](https://github.com/paritytech/substrate-contracts-node/) and my transactions are successfully submitted to the chain. I've checked using a dry run query and also checked in the explorer for the block after performing the tx. However, when I try to use the transaction result in polkadot-js, I cannot access fields such as `status`, as they are `undefined`.&#xD;&#xA;&#xD;&#xA;I'm calling the `signAndSend` function of the extrinsic but the `result: SubmittableResult` I get is simply the extrinsic hash as a `Uint8Array`.&#xD;&#xA;&#xD;&#xA;    extrinsic&#xD;&#xA;      .signAndSend(&#xD;&#xA;        signerAddress,&#xD;&#xA;        {&#xD;&#xA;          ...options&#xD;&#xA;        },&#xD;&#xA;        (result: SubmittableResult) =&gt; {&#xD;&#xA;          if (result.status.isInBlock) { //status is undefined here??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;According to the `SubmittableResult` type in polkadot-js, `status` should be there:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;export declare class SubmittableResult implements ISubmittableResult {&#xD;&#xA;    readonly dispatchError?: DispatchError;&#xD;&#xA;    readonly dispatchInfo?: DispatchInfo;&#xD;&#xA;    readonly internalError?: Error;&#xD;&#xA;    readonly events: EventRecord[];&#xD;&#xA;    readonly status: ExtrinsicStatus;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8175" PostHistoryTypeId="2" PostId="2191" RevisionGUID="8f6bbc83-1213-48b2-8918-c950512fa830" CreationDate="2022-04-27T13:34:34.573" UserId="2440" Text="*Very sorry for such a newbie question; just don't know where else to ask *&#xD;&#xA;&#xD;&#xA;Essentially, I want to programmatically dump from the network who won the most recent election. To do so, I'm issuing an `erasStakers(...)`[https://polkadot.js.org/docs/substrate/storage/#erasstakersu32-accountid32-palletstakingexposure] RPC call. So far as I understand it, there is no direct RPC API call for `erasStakers(...)`, and one needs to interact with the node through `getStorage(...)` to learn the election result.&#xD;&#xA;&#xD;&#xA;Yet the Polkadot Explorer somehow shows the human-readable output:&#xD;&#xA;[![Polkadot Explorer with an election winners shown][1]][1]&#xD;&#xA;&#xD;&#xA;However, when I do in my Nodejs code:&#xD;&#xA;&#xD;&#xA;    await api.query.staking.erasStakers(635, null)&#xD;&#xA;    // =&gt; {&quot;total&quot;:0,&quot;own&quot;:0,&quot;others&quot;:[]}&#xD;&#xA;&#xD;&#xA;It seems the Polkadot Node just returns an empty object.&#xD;&#xA;&#xD;&#xA;I also know about Parity's `substrate-debug-kit`[https://github.com/paritytech/substrate-debug-kit/blob/master/offline-election/src/subcommands/staking.rs] repo, which queries the Polkadot's node. I believe I could leverage `sub_storage::read` from that repo, but I can't guess the correct &quot;Prefix&quot; parameter and the return type to get `erasStakers`; it just says &quot;get_pairs failed&quot;, whatever I try.&#xD;&#xA;&#xD;&#xA;**Is there a way to get either in my NodeJS or in my Rust code something akin to what I see in the picture — a human readable structure representing an `erasStakers(...)` call?**&#xD;&#xA;&#xD;&#xA;*I'm new to Polkadot, so apologies if I mixed up terms, or misunderstood something trivial — any help would be much appreciated.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Sy1s5.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="8177" PostHistoryTypeId="1" PostId="2191" RevisionGUID="8f6bbc83-1213-48b2-8918-c950512fa830" CreationDate="2022-04-27T13:34:34.573" UserId="2440" Text="How to do &quot;erasStakers&quot; in Rust?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8178" PostHistoryTypeId="3" PostId="2191" RevisionGUID="8f6bbc83-1213-48b2-8918-c950512fa830" CreationDate="2022-04-27T13:34:34.573" UserId="2440" Text="|polkadot-js|subxt|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8179" PostHistoryTypeId="5" PostId="2174" RevisionGUID="cb35d297-2437-438e-83dd-de67341df88b" CreationDate="2022-04-27T14:19:40.727" UserId="620" Comment="added 728 characters in body" Text="It just approximates `p/q` (in this line, `(p % q) / q`) as a `PerBill`: https://github.com/paritytech/substrate/blob/2195448d01fc935912d8cf543be6d609f5899652/primitives/arithmetic/src/per_things.rs#L265L283&#xD;&#xA;&#xD;&#xA;--------------&#xD;&#xA;&#xD;&#xA;EDIT: I see the question is more about the polynomial than the `from_rational` function.&#xD;&#xA;&#xD;&#xA;The polynomial is just of the form `a*x^n + b*x^(n-1) + ...` where `x` is the independent variable, `{a, b, ...}` are coefficients and the exponent of each term is its degree. You see that the polynomial actually returns a `vec` of `WeightToFeeCoefficient` structs. The `degree` tells you the exponent, `negative` tells you if it's positive or negative, and `coeff_integer + coeff_frac` tells you the constant coefficient on the term.&#xD;&#xA;&#xD;&#xA;Since there is only one term in this polynomial, and `Weight` is the independent variable, it would be the function:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fee: Balance = (p / q + (p % q) / q) * Weight;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This isn't the _final_ fee, as the length fee will also be added and then the fee will be adjusted based on the `NextFeeMultiplier`." ContentLicense="CC BY-SA 4.0" />
  <row Id="8180" PostHistoryTypeId="2" PostId="2192" RevisionGUID="ed2d8c51-3f21-460e-8d6f-f09c1c057e5a" CreationDate="2022-04-27T15:18:49.930" UserId="67" Text="Assets pallet and ORML tokens are not related to the cross-chain transfer of assets, instead they are just slightly different ways to store balances in chains supporting more than one kind of fungible token, both implement the [`frame_support::traits::fungibles`](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungibles/index.html).  &#xD;&#xA;&#xD;&#xA;For the cross chain transfer you would build an XCM with the right set of instructions(i.e. something including `InitiateTeleport`, `TransferReserveAsset` and the likes). But crafting an XCM is not always straightforward so to answer your question, I'd say [`orml-xtokens`](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens) is a good &quot;standard way&quot; to do cross chain transfer of assets, you can integrate it with either `orml-tokens` or `pallet-assets` and it will handle the annoying parts of constructing the right XCM to do a reserve asset transfer." ContentLicense="CC BY-SA 4.0" />
  <row Id="8182" PostHistoryTypeId="2" PostId="2193" RevisionGUID="0017bbb9-91bd-4bf2-8af0-df3901776cdf" CreationDate="2022-04-27T15:55:51.127" UserId="2441" Text="This Substrate PR removed `TryInto` from the sp_std's prelude: https://github.com/paritytech/substrate/pull/11136&#xD;&#xA;&#xD;&#xA;While attempting to update to `v0.9.19`, which includes this PR, I am encountering this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared type `TryInto`&#xD;&#xA;   --&gt; pallets/parachain-staking/src/lib.rs:160:12&#xD;&#xA;    |&#xD;&#xA;160 |     #[pallet::error]&#xD;&#xA;    |               ^^^^^ not found in this scope&#xD;&#xA;    |&#xD;&#xA;    = note: 'sp_std::convert::TryInto' is included in the prelude starting in Edition 2021&#xD;&#xA;    = note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021&#xD;&#xA;    = note: 'core::convert::TryInto' is included in the prelude starting in Edition 2021&#xD;&#xA;help: consider importing one of these items&#xD;&#xA;    |&#xD;&#xA;72  |     use core::convert::TryInto;&#xD;&#xA;    |&#xD;&#xA;72  |     use sp_std::convert::TryInto;&#xD;&#xA;    |&#xD;&#xA;72  |     use std::convert::TryInto;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error suggests that `TryInto` should be included in `Edition 2021`, but this constraint seems to be satisfied. Here is `rustup show` output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /home/stephen/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;nightly-2022-02-20-x86_64-unknown-linux-gnu&#xD;&#xA;nightly-x86_64-unknown-linux-gnu (default)&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.62.0-nightly (082e4ca49 2022-04-26)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I revert the Substrate commit/PR mentioned above, the problem goes away.&#xD;&#xA;&#xD;&#xA;I'm able to compile `substrate` itself as well as `polkadot` and `cumulus` at their respective `v0.9.19` branches without any errors.&#xD;&#xA;&#xD;&#xA;Any suggestions would be greatly appreciated, thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="8184" PostHistoryTypeId="1" PostId="2193" RevisionGUID="0017bbb9-91bd-4bf2-8af0-df3901776cdf" CreationDate="2022-04-27T15:55:51.127" UserId="2441" Text="Cannot find TryInto (compilation error) after it was pruned from prelude" ContentLicense="CC BY-SA 4.0" />
  <row Id="8185" PostHistoryTypeId="3" PostId="2193" RevisionGUID="0017bbb9-91bd-4bf2-8af0-df3901776cdf" CreationDate="2022-04-27T15:55:51.127" UserId="2441" Text="|error|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8186" PostHistoryTypeId="5" PostId="2192" RevisionGUID="38b434f3-b3fe-4ac0-a4a0-e4906451581d" CreationDate="2022-04-27T16:17:36.277" UserId="67" Comment="added 733 characters in body" Text="Assets pallet and ORML tokens are not related to the cross-chain transfer of assets, instead they are just slightly different ways to store balances in chains supporting more than one kind of fungible token, both implement the [`frame_support::traits::fungibles`](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungibles/index.html).  &#xD;&#xA;&#xD;&#xA;For the cross chain transfer you would build an XCM with the right set of instructions(i.e. something including `InitiateTeleport`, `TransferReserveAsset` and the likes). But crafting an XCM is not always straightforward so to answer your question, I'd say [`orml-xtokens`](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens) is a good &quot;standard way&quot; to do cross chain transfer of assets, you can integrate it with either `orml-tokens` or `pallet-assets` and it will handle the annoying parts of constructing the right XCM to do a reserve asset transfer.  &#xD;&#xA;I asset registry from the linked issue doesn't solves the issue of importing the tokens to your chain but It might help deciding what to do with some tokens that just arrived to your chain(e.g. via xtokens), I imagine in the case of orml-tokens you could use the registry to decide what AssetId to use based on a MultiLocation, with pallet-assets you could also use the metadata of your registry to create a new asset class. You should also have an AssetId that is flexible enough to represent different kinds of assets coming from diffrent chains, e.g. a bit number like `u64`, or a more descriptive type like &#xD;&#xA;```rust&#xD;&#xA;enum Asset {&#xD;&#xA;  NetiveToken,&#xD;&#xA;  RelayChainToken,&#xD;&#xA;  FriendParachain(u8),&#xD;&#xA;  OtherParachains(u64),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8187" PostHistoryTypeId="2" PostId="2194" RevisionGUID="f71a01cc-adbf-4491-af14-32a0bb14ecdf" CreationDate="2022-04-27T16:23:48.100" UserId="53" Text="This is a slightly more complex subject than it sounds. The reason is that while Polkadot guarantees the *correct execution* of each parachain's logic, it does not guarantee that the logic does something *sensible or expected* by some particular set of onlookers.&#xD;&#xA;&#xD;&#xA;An obvious example would be *teleports*. The act of teleporting is basically the act of burning a token on one *sending* chain and at some point in the near future creating a token on *receiving* chain. One instance of this would be sending DOT from the Polkadot Relay-chain to the Statemint parachain: The DOT is destroyed on the Relay-chain and created on Statemint. It can be teleported back which involves it being destroyed on Statemint and minted again on the Relay-chain.&#xD;&#xA;&#xD;&#xA;It is fairly easy to construct an XCM message to do this, and the XCM pallet in Cumulus includes such a facility to do just this (search for `fn teleport_assets`). However, there is nothing embedded in the Polkadot protocol which stops the sending chain from sending a message to tell the &quot;recipient&quot; chain to mint a particular asset without actually destroying the corresponding asset. The reason we do teleporting between the Relay-chain and Statemint is because the Relay-chain is in complete control of Statemint's logic via governance, and thus it can *trust* Statemint to behave as expected.&#xD;&#xA;&#xD;&#xA;The same cannot be said of arbitrary teams' parachains. Without even getting into malicious intent, an innocent bug could cause a parachain to inadvertently send unfaithful teleport counterparts, instructing the minting of tokens on receiving chains which never existed on the sending chain.&#xD;&#xA;&#xD;&#xA;To manage this there are two solutions:&#xD;&#xA;&#xD;&#xA;- SPREE (Secure Parachain Runtime Execution Enclaves), which allows for non-negotiable, individually addressable identical instances of logic modules (basically, pallets) to exist on parachains, thereby alleviating the need for one parachain to trust another's logic. This is not yet implemented but is at the design stage.&#xD;&#xA;- Reserve Assets, the current solution, which is essentially to name a particular chain as the universally trusted home for an asset. When this asset &quot;exists&quot; on any chain which is not the home-chain, it in fact is just an IOU (or fully-backed derivative).&#xD;&#xA;&#xD;&#xA;When SPREE is delivered then the answer to this question will basically just be &quot;have your parachain opt-in to the assets SPREE module&quot;. Until then, it's a little harder. Teleporting can work if both your parachain and the parachain from which you wish to receive the given asset trust each other's logic (to be point of bankrupting yourself if you're wrong about it). This isn't usually the case, but might work if a single parachain team end up deploying to multiple parachains. Otherwise we're basically stuck with reserve asset transfers. Right now for these to work, each asset must be configured individually with the fungible implementation in the runtime together with the home-chain on which the actual asset sits.&#xD;&#xA;&#xD;&#xA;This is only a temporary solution. Changes which are part of the XCMv3 upgrade will bring along the possibility of automating the ability to receive, host and send foreign assets without requiring those assets to be explicitly configured in the runtime. There is already an example of this in the XCM v3 branch using the Uniques pallet `CreateOrigin` and `MultiLocation`s as a means of identifying a foreign NFT by its relative location." ContentLicense="CC BY-SA 4.0" />
  <row Id="8189" PostHistoryTypeId="5" PostId="2193" RevisionGUID="f29907df-2dbb-443d-87a6-8ca1b46534c3" CreationDate="2022-04-27T18:23:46.557" UserId="2441" Comment="added 309 characters in body" Text="This Substrate PR removed `TryInto` from the sp_std's prelude: https://github.com/paritytech/substrate/pull/11136&#xD;&#xA;&#xD;&#xA;While attempting to update to `v0.9.19`, which includes this PR, I am encountering this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared type `TryInto`&#xD;&#xA;   --&gt; pallets/parachain-staking/src/lib.rs:160:12&#xD;&#xA;    |&#xD;&#xA;160 |     #[pallet::error]&#xD;&#xA;    |               ^^^^^ not found in this scope&#xD;&#xA;    |&#xD;&#xA;    = note: 'sp_std::convert::TryInto' is included in the prelude starting in Edition 2021&#xD;&#xA;    = note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021&#xD;&#xA;    = note: 'core::convert::TryInto' is included in the prelude starting in Edition 2021&#xD;&#xA;help: consider importing one of these items&#xD;&#xA;    |&#xD;&#xA;72  |     use core::convert::TryInto;&#xD;&#xA;    |&#xD;&#xA;72  |     use sp_std::convert::TryInto;&#xD;&#xA;    |&#xD;&#xA;72  |     use std::convert::TryInto;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error suggests that `TryInto` should be included in `Edition 2021`, but this constraint seems to be satisfied. Here is `rustup show` output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /home/stephen/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;nightly-2022-02-20-x86_64-unknown-linux-gnu&#xD;&#xA;nightly-x86_64-unknown-linux-gnu (default)&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.62.0-nightly (082e4ca49 2022-04-26)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I revert the Substrate commit/PR mentioned above, the problem goes away.&#xD;&#xA;&#xD;&#xA;I'm able to compile `substrate` itself as well as `polkadot` and `cumulus` at their respective `v0.9.19` branches without any errors.&#xD;&#xA;&#xD;&#xA;The exact line of code that produced this error can be found on the Moonbeam repository: https://github.com/PureStake/moonbeam/blob/bc4d3dbd6159893fab4d9adb265a581d7c502563/pallets/parachain-staking/src/lib.rs#L161&#xD;&#xA;&#xD;&#xA;And can be reproduced by compiling that pallet with `cargo build -p parachain-staking`.&#xD;&#xA;&#xD;&#xA;Any suggestions would be greatly appreciated, thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="8191" PostHistoryTypeId="6" PostId="2184" RevisionGUID="668344a9-b548-4d42-9ca8-ea4ff9fd404f" CreationDate="2022-04-27T18:46:32.887" UserId="29" Comment="edited tags" Text="|nodes|validator|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8192" PostHistoryTypeId="5" PostId="2184" RevisionGUID="668344a9-b548-4d42-9ca8-ea4ff9fd404f" CreationDate="2022-04-27T18:46:32.887" UserId="29" Comment="edited tags" Text="My validator node shows the issue &quot;low connectivity, authority lookup failed for too many validators&quot;, what does this mean? And is it dangerous for the safety of the chain?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6BXEE.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="8193" PostHistoryTypeId="4" PostId="2184" RevisionGUID="668344a9-b548-4d42-9ca8-ea4ff9fd404f" CreationDate="2022-04-27T18:46:32.887" UserId="29" Comment="edited tags" Text="What's the meaning of &quot;low connectivity, authority lookup failed for too many validators&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8194" PostHistoryTypeId="2" PostId="2195" RevisionGUID="d3fd816d-ad3b-4569-988d-4320c32082e8" CreationDate="2022-04-27T19:46:53.373" UserId="2442" Text="I have the following struct, where Characters is the [newtype idiom][1] around `Vec&lt;u8&gt;`.&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)]&#xD;&#xA;    pub struct OperationData {&#xD;&#xA;      config: BTreeMap&lt;Characters, Vec&lt;Characters&gt;&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now, If I submit an extrinsic call to save such structure:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      config: { hasher: [ 'Sha2_256', 'Blake3_256' ] },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The structure is stored correctly but upon reading (for instance in polkadot ui I get:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      config: {&#xD;&#xA;        0x686173686572: [&#xD;&#xA;          Sha2_256&#xD;&#xA;          Blake3_256&#xD;&#xA;        ]&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Why the map key is encoded? Is there a way to avoid this? If I'm not wrong (and I might be) this wasn't happening with polkadot-js API v7 but started happening with v8&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/rust-by-example/generics/new_types.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="8196" PostHistoryTypeId="1" PostId="2195" RevisionGUID="d3fd816d-ad3b-4569-988d-4320c32082e8" CreationDate="2022-04-27T19:46:53.373" UserId="2442" Text="Map keys are encoded while they should be plain text" ContentLicense="CC BY-SA 4.0" />
  <row Id="8197" PostHistoryTypeId="3" PostId="2195" RevisionGUID="d3fd816d-ad3b-4569-988d-4320c32082e8" CreationDate="2022-04-27T19:46:53.373" UserId="2442" Text="|scale-codec|btreemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8198" PostHistoryTypeId="2" PostId="2196" RevisionGUID="5a2570a2-d7ae-4c36-b7aa-d31971a5864a" CreationDate="2022-04-27T20:29:40.920" UserId="85" Text="How can I decode an extrinsic or event dynamically in rust? (I want to be able to decode across all parachains)&#xD;&#xA;&#xD;&#xA;A lot of the heavy lifting seems to be `frame-metadata` and `scale-info`. There's a [desub][1] project that seems like it ought to be able to do this. I've managed to get a `&amp;Type&lt;PortableForm&gt;` based on the v14 metadata but I can't quite see how I can decode it (or alternatively decode it into a JsonValue).&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/desub/blob/master/desub-current/src/value/mod.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="8200" PostHistoryTypeId="1" PostId="2196" RevisionGUID="5a2570a2-d7ae-4c36-b7aa-d31971a5864a" CreationDate="2022-04-27T20:29:40.920" UserId="85" Text="How can I decode an extrinsic or event dynamically in rust?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8201" PostHistoryTypeId="3" PostId="2196" RevisionGUID="5a2570a2-d7ae-4c36-b7aa-d31971a5864a" CreationDate="2022-04-27T20:29:40.920" UserId="85" Text="|rust|scale-codec|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8202" PostHistoryTypeId="6" PostId="614" RevisionGUID="e527ba36-f680-4e88-a3a7-20c8d4a36ac3" CreationDate="2022-04-27T20:33:40.930" UserId="85" Comment="edited tags" Text="|polkadot|polkadot-js|extrinsic|decode|java|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8203" PostHistoryTypeId="5" PostId="2196" RevisionGUID="4420da68-0844-4daf-92d7-7f0f4e0396dc" CreationDate="2022-04-27T21:13:09.567" UserId="85" Comment="found something that might work for extrinsics..." Text="How can I decode an extrinsic or event dynamically in rust? (I want to be able to decode across all parachains)&#xD;&#xA;&#xD;&#xA;A lot of the heavy lifting seems to be `frame-metadata` and `scale-info`. There's a [desub][1] project that seems like it ought to be able to do this. I've managed to get a `&amp;Type&lt;PortableForm&gt;` based on the v14 metadata but I can't quite see how I can decode it (or alternatively decode it into a JsonValue).&#xD;&#xA;&#xD;&#xA;Hmm will try [this][2] for extrinsics. Not sure on events?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/desub/blob/master/desub-current/src/value/mod.rs&#xD;&#xA;  [2]: https://github.com/paritytech/desub/blob/852f9539e16a7129ad2be3204d28a17d7e23aae6/desub-current/tests/decode_extrinsics.rs#L99" ContentLicense="CC BY-SA 4.0" />
  <row Id="8204" PostHistoryTypeId="2" PostId="2197" RevisionGUID="16c580d1-5f6f-461b-9e74-d6f7313e7c9e" CreationDate="2022-04-27T21:26:14.073" UserId="2283" Text="Do I have to manually Serialize/Deserialize BoundedVec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8206" PostHistoryTypeId="1" PostId="2197" RevisionGUID="16c580d1-5f6f-461b-9e74-d6f7313e7c9e" CreationDate="2022-04-27T21:26:14.073" UserId="2283" Text="Serde::Serialize/Deserialize for BoundedVec" ContentLicense="CC BY-SA 4.0" />
  <row Id="8207" PostHistoryTypeId="3" PostId="2197" RevisionGUID="16c580d1-5f6f-461b-9e74-d6f7313e7c9e" CreationDate="2022-04-27T21:26:14.073" UserId="2283" Text="|pallet|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8208" PostHistoryTypeId="2" PostId="2198" RevisionGUID="e89faa73-cdbf-4af8-80a9-97bdf884b9b3" CreationDate="2022-04-27T21:50:25.713" UserId="276" Text="This is indeed caused by recently released PR https://github.com/paritytech/substrate/pull/10242, updated `DispatchError` processing released in https://github.com/polkascan/py-substrate-interface/releases/tag/v1.2.4" ContentLicense="CC BY-SA 4.0" />
  <row Id="8210" PostHistoryTypeId="2" PostId="2199" RevisionGUID="7c77de46-f6f4-4118-b99c-4bf1f7c93e02" CreationDate="2022-04-27T22:06:37.310" UserId="104" Text="As @apopiak had suggested in the comments, your `Cargo.toml` is still [set as the 2018 edition of Rust][1], hence it is not able to locate `TryInto` in the prelude. My guess is that if you change it to 2021, it will fix your issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/PureStake/moonbeam/blob/bc4d3dbd6159893fab4d9adb265a581d7c502563/pallets/parachain-staking/Cargo.toml#L5" ContentLicense="CC BY-SA 4.0" />
  <row Id="8212" PostHistoryTypeId="2" PostId="2200" RevisionGUID="c401586d-f864-4ba6-baed-c3c2aa04eeba" CreationDate="2022-04-28T00:30:27.640" UserId="245" Text="I'm trying to create a layer 2 blockchain. In this blockchain, I do some computing to add to a transaction. Basically, I want to add a custom type to store in the block alongside Extrinsics.&#xD;&#xA;&#xD;&#xA;Are there any examples of this? Or, where should I take a look at the source code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8214" PostHistoryTypeId="1" PostId="2200" RevisionGUID="c401586d-f864-4ba6-baed-c3c2aa04eeba" CreationDate="2022-04-28T00:30:27.640" UserId="245" Text="Custom Transaction type" ContentLicense="CC BY-SA 4.0" />
  <row Id="8215" PostHistoryTypeId="3" PostId="2200" RevisionGUID="c401586d-f864-4ba6-baed-c3c2aa04eeba" CreationDate="2022-04-28T00:30:27.640" UserId="245" Text="|transactions|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8216" PostHistoryTypeId="2" PostId="2201" RevisionGUID="a9953c4e-99a1-42e1-814f-6d71354d8e6c" CreationDate="2022-04-28T00:50:37.870" UserId="2443" Text="**Problem**&#xD;&#xA;&#xD;&#xA;Keys cannot be added to keystore.&#xD;&#xA;&#xD;&#xA;**Situation description**&#xD;&#xA;&#xD;&#xA;To launch the private network, the boot node was first started and succeeded.&#xD;&#xA;The next time I tried to add a keys to the keystore I got the following error.&#xD;&#xA;  &#xD;&#xA;Tutorial URL&#xD;&#xA;  [enter link description here][1]&#xD;&#xA;&#xD;&#xA;**Error**&#xD;&#xA;  &#xD;&#xA;-bash: version: No such file or directory&#xD;&#xA;&#xD;&#xA;**Execution environment**&#xD;&#xA;&#xD;&#xA;mamOS Big Sur version 11.3.1&#xD;&#xA;Macbook Air（M1, 2020）&#xD;&#xA;&#xD;&#xA;**Commands executed in the terminal**&#xD;&#xA;&#xD;&#xA;./target/release/node-template key insert --base-path /tmp/node01 \&#xD;&#xA;--chain customSpecRaw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri your-secret-seed \&#xD;&#xA;--password-interactive \&#xD;&#xA;--key-type aura&#xD;&#xA;&#xD;&#xA;※The your-secret-seed section has been changed.&#xD;&#xA;&#xD;&#xA;**Research**&#xD;&#xA;&#xD;&#xA;■Location where the command was executed&#xD;&#xA;&#xD;&#xA;/Users/username/Substrate/substrate-node-template&#xD;&#xA;&#xD;&#xA;■Path to Key Store&#xD;&#xA;&#xD;&#xA;/private/tmp/node01/chains/local_testnet/keystore&#xD;&#xA;&#xD;&#xA;**Questionable points.**&#xD;&#xA; &#xD;&#xA; 【--base-path /tmp/node01 \】&#xD;&#xA;&#xD;&#xA;Even though the boot node was able to run, why does it show no files or directories when I add a keys, as the above error indicates?&#xD;&#xA;Is there a problem with the path that prevents adding keys? If so, why was the boot node able to run?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/private-network/#Start-the-blockchain-using-predefined-accounts" ContentLicense="CC BY-SA 4.0" />
  <row Id="8218" PostHistoryTypeId="1" PostId="2201" RevisionGUID="a9953c4e-99a1-42e1-814f-6d71354d8e6c" CreationDate="2022-04-28T00:50:37.870" UserId="2443" Text="Keys cannot be added to keystore" ContentLicense="CC BY-SA 4.0" />
  <row Id="8219" PostHistoryTypeId="3" PostId="2201" RevisionGUID="a9953c4e-99a1-42e1-814f-6d71354d8e6c" CreationDate="2022-04-28T00:50:37.870" UserId="2443" Text="|private-network|key|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8220" PostHistoryTypeId="2" PostId="2202" RevisionGUID="3f707c96-f6aa-4195-96d7-0038b24a03a0" CreationDate="2022-04-28T00:54:24.430" UserId="34" Text="### Goal&#xD;&#xA;&#xD;&#xA;To use a full snapshot at some block height of one chain and selectively pull in select parts of this state.&#xD;&#xA;&#xD;&#xA;### Use cases&#xD;&#xA;&#xD;&#xA;1. Migrating state from another chain. Example:&#xD;&#xA;   - A snapshot of only assets pallet on some other chain&#xD;&#xA;&#xD;&#xA;1. Partial or complete snapshot _recovery_. Example:&#xD;&#xA;   - A `sudo` state change bricked a chain, and a new one is started that wants to restart (with a new genesis) with much the same state overall, but not the corrupt parts.&#xD;&#xA;&#xD;&#xA;### Known tools&#xD;&#xA;&#xD;&#xA;- [fork-off-substrate](https://github.com/maxsam4/fork-off-substrate) - allows for hard forks &#xD;&#xA;&#xD;&#xA;### Question&#xD;&#xA;&#xD;&#xA;**How would one perform a selective state &quot;upload&quot; of parts of some full chain state data?**&#xD;&#xA;&#xD;&#xA;I think [fork-off-substrate](https://github.com/maxsam4/fork-off-substrate) may have parts of the solution, but the selectivity and how to go about actually _identifying_ the state to use is unclear. Also this would not _necessarily_ be performed at genesis, and may need to be piece-wise for the limitations on parachains (as outlined [here in the parachain runtime upgrade How-to Guides](https://docs.substrate.io/how-to-guides/v3/parachains/runtime-upgrades/#steps))  &#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="8222" PostHistoryTypeId="1" PostId="2202" RevisionGUID="3f707c96-f6aa-4195-96d7-0038b24a03a0" CreationDate="2022-04-28T00:54:24.430" UserId="34" Text="How to selectively populate state from a snapshot of one chain onto another?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8223" PostHistoryTypeId="3" PostId="2202" RevisionGUID="3f707c96-f6aa-4195-96d7-0038b24a03a0" CreationDate="2022-04-28T00:54:24.430" UserId="34" Text="|storage|migration|snapshot|fork|recovery|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8224" PostHistoryTypeId="2" PostId="2203" RevisionGUID="88cca873-9109-49d9-bce3-b8c3d22bdc4e" CreationDate="2022-04-28T01:25:48.323" UserId="489" Text="I use pallet account in my pallet.&#xD;&#xA;```&#xD;&#xA;pub const PALLET_ID: PalletId = PalletId(*b&quot;abababab&quot;);&#xD;&#xA;pub fn account_id() -&gt; T::AccountId {&#xD;&#xA;		PALLET_ID.into_account()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;How can i get the pallet's account by polkadot.js app? Because i want to transfer some balance to the pallet's account." ContentLicense="CC BY-SA 4.0" />
  <row Id="8226" PostHistoryTypeId="1" PostId="2203" RevisionGUID="88cca873-9109-49d9-bce3-b8c3d22bdc4e" CreationDate="2022-04-28T01:25:48.323" UserId="489" Text="About pallet's account" ContentLicense="CC BY-SA 4.0" />
  <row Id="8227" PostHistoryTypeId="3" PostId="2203" RevisionGUID="88cca873-9109-49d9-bce3-b8c3d22bdc4e" CreationDate="2022-04-28T01:25:48.323" UserId="489" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8228" PostHistoryTypeId="2" PostId="2204" RevisionGUID="9dde9192-2d6a-4470-b8c4-5aa89779ef21" CreationDate="2022-04-28T05:25:04.683" UserId="344" Text="I am trying to do a democracy vote using the API.&#xD;&#xA;&#xD;&#xA;First I am getting the balance of my account:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  const balance = (await api.query.system.account(my_account)).data.free;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;  const voteConfig: Vote = new GenericVote(api.registry, {                                                                                                                           &#xD;&#xA;    aye: true,                                                                                                                                                                      &#xD;&#xA;    conviction: 'None',                                                                                                                                                              &#xD;&#xA;  });                                                                                                                                                                                &#xD;&#xA;  let vote: PalletDemocracyVoteAccountVote = { asStandard: { vote: voteConfig, balance: balance } };&#xD;&#xA;&#xD;&#xA;  let txHash = await api.tx.democracy.vote(i, vote).signAndSend(payoutKey, (({ events = [], status }: any) =&gt; {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I am getting the type error below:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/home/nochem/.nvm/versions/node/v17.4.0/lib/node_modules/ts-node/src/index.ts:820&#xD;&#xA;    return new TSError(diagnosticText, diagnosticCodes);&#xD;&#xA;           ^&#xD;&#xA;TSError: ⨯ Unable to compile TypeScript:&#xD;&#xA;votebot.ts:102:48 - error TS2322: Type '{ vote: Vote; balance: u128; }' is not assignable to type '{ readonly vote: Vote; readonly balance: u128; } &amp; Struct&lt;TypesDef&lt;Codec&gt;, { [x: string]: any; }, { [x: string]: string; }&gt;'.&#xD;&#xA;  Type '{ vote: Vote; balance: u128; }' is missing the following properties from type 'Struct&lt;TypesDef&lt;Codec&gt;, { [x: string]: any; }, { [x: string]: string; }&gt;': #private, defKeys, getT, isEmpty, and 25 more.&#xD;&#xA;&#xD;&#xA;102   let vote: PalletDemocracyVoteAccountVote = { asStandard: { vote: voteConfig, balance: balance } };&#xD;&#xA;                                                   ~~~~~~~~~~&#xD;&#xA;&#xD;&#xA;  node_modules/@polkadot/types-augment/lookup/types-substrate.d.ts:430:18&#xD;&#xA;    430         readonly asStandard: {&#xD;&#xA;                         ~~~~~~~~~~&#xD;&#xA;    The expected type comes from property 'asStandard' which is declared here on type 'PalletDemocracyVoteAccountVote'&#xD;&#xA;&#xD;&#xA;    at createTSError (/home/nochem/.nvm/versions/node/v17.4.0/lib/node_modules/ts-node/src/index.ts:820:12)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I compile the above code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8230" PostHistoryTypeId="1" PostId="2204" RevisionGUID="9dde9192-2d6a-4470-b8c4-5aa89779ef21" CreationDate="2022-04-28T05:25:04.683" UserId="344" Text="How to do a democracy pallet vote using Polkadot API in typescript" ContentLicense="CC BY-SA 4.0" />
  <row Id="8231" PostHistoryTypeId="3" PostId="2204" RevisionGUID="9dde9192-2d6a-4470-b8c4-5aa89779ef21" CreationDate="2022-04-28T05:25:04.683" UserId="344" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8232" PostHistoryTypeId="2" PostId="2205" RevisionGUID="14181b92-36ff-4021-9d3f-3122cbb3319e" CreationDate="2022-04-28T06:04:07.103" UserId="2213" Text="Is there maybe something like Collator-MEV, Validator-MEV, …?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8234" PostHistoryTypeId="1" PostId="2205" RevisionGUID="14181b92-36ff-4021-9d3f-3122cbb3319e" CreationDate="2022-04-28T06:04:07.103" UserId="2213" Text="Is there an analog for MEV in Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8235" PostHistoryTypeId="3" PostId="2205" RevisionGUID="14181b92-36ff-4021-9d3f-3122cbb3319e" CreationDate="2022-04-28T06:04:07.103" UserId="2213" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8236" PostHistoryTypeId="2" PostId="2206" RevisionGUID="4687bf8b-dc69-494a-a277-ced862f80b83" CreationDate="2022-04-28T06:37:57.347" UserId="139" Text="I have a machine running a sync node and , for sync nodes, we have to pass in the `rpc-cors all` option to allow websocket connections from any origin for interfacing through the `apps` UI. Now this machine has resources that could support another node, probably as a validator, and it had me thinking, what if I started a validator on the same machine, on different ports, but then the chainstate would be duplicated on the machine effectively doubling the storage requirement of the chain.&#xD;&#xA;&#xD;&#xA;My question was, would it be possible to share the same chainstate among two nodes running on the same machine in order to avoid data duplication?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8238" PostHistoryTypeId="1" PostId="2206" RevisionGUID="4687bf8b-dc69-494a-a277-ced862f80b83" CreationDate="2022-04-28T06:37:57.347" UserId="139" Text="Is it possible to share chainstate among two nodes that run on the same system?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8239" PostHistoryTypeId="3" PostId="2206" RevisionGUID="4687bf8b-dc69-494a-a277-ced862f80b83" CreationDate="2022-04-28T06:37:57.347" UserId="139" Text="|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8240" PostHistoryTypeId="6" PostId="2177" RevisionGUID="2a5a3a02-2d50-4235-bd96-e26f33601ea5" CreationDate="2022-04-28T06:56:47.703" UserId="632" Comment="edited tags" Text="|substrate-node|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8245" PostHistoryTypeId="2" PostId="2208" RevisionGUID="a7ce3935-88d3-4e7d-8085-d22323d20151" CreationDate="2022-04-28T07:34:50.700" UserId="70" Text="I am setting up the integration tests to transfer Asset from Parachain A to Parachain B (clone Parachain A). &#xD;&#xA;&#xD;&#xA;The XCM execution went successfully on Parachain A, the balance was deducted successfully, but Parachain B got a problem receiving tokens. It throws errors on Parachain B at `BuyExecution` with error `xcm::v2::traits::Error::TooExpensive`. There is `Trader` has been set up for fee calculation, also `8_000_000_000_000` in weight but seems I missed something to make it works. &#xD;&#xA;&#xD;&#xA;If anyone has experienced the same issues, would really appreciate if you can shed some lights so I can isolate and fix the issue. &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Vj5Co.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8247" PostHistoryTypeId="1" PostId="2208" RevisionGUID="a7ce3935-88d3-4e7d-8085-d22323d20151" CreationDate="2022-04-28T07:34:50.700" UserId="70" Text="XCM BuyExecution Fail: TooExpensive when transferring Native Token from your parachain to clone parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="8248" PostHistoryTypeId="3" PostId="2208" RevisionGUID="a7ce3935-88d3-4e7d-8085-d22323d20151" CreationDate="2022-04-28T07:34:50.700" UserId="70" Text="|polkadot|xcm|hrmp|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8249" PostHistoryTypeId="2" PostId="2209" RevisionGUID="8aa16c2c-af39-4040-84fc-79c01dc94181" CreationDate="2022-04-28T08:32:39.943" UserId="28" Text="`--base-path /tmp/node01` does not seem to match the path you want which is `/private/tmp/node01/chains/local_testnet/keystore`.&#xD;&#xA;&#xD;&#xA;So maybe just update your `base-path` path.&#xD;&#xA;&#xD;&#xA;Or maybe just `mkdir /tmp/node01`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8251" PostHistoryTypeId="2" PostId="2210" RevisionGUID="2b8f8db3-3f67-4d2b-99ef-0eee90021a31" CreationDate="2022-04-28T08:45:22.573" UserId="492" Text="I added some custom RPC endpoints to a substrate blockchain, but when I connect to the node with a simple script it prints:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;API/INIT: RPC methods not decorated: ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The RPCs work, but don't show up in the polkadot Apps.&#xD;&#xA;&#xD;&#xA;How can I decorate my custom RPC endpoints and will they show up in the polkadot Apps afterwards?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8253" PostHistoryTypeId="1" PostId="2210" RevisionGUID="2b8f8db3-3f67-4d2b-99ef-0eee90021a31" CreationDate="2022-04-28T08:45:22.573" UserId="492" Text="Custom RPCs not decorated" ContentLicense="CC BY-SA 4.0" />
  <row Id="8254" PostHistoryTypeId="3" PostId="2210" RevisionGUID="2b8f8db3-3f67-4d2b-99ef-0eee90021a31" CreationDate="2022-04-28T08:45:22.573" UserId="492" Text="|polkadot-js|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8255" PostHistoryTypeId="2" PostId="2211" RevisionGUID="c33ee7a0-3c1a-4907-a477-31133cc76514" CreationDate="2022-04-28T08:50:06.050" UserId="53" Text="I suppose it might be best described as CEV (Collator Extracted Value) or VEV (Validator Extracted Value). But I think best would be BAEV (Block Author Extracted Value), since it applies equally to all consensus methods." ContentLicense="CC BY-SA 4.0" />
  <row Id="8257" PostHistoryTypeId="2" PostId="2212" RevisionGUID="cc617b99-d2db-41c7-86ef-978b5bee27c8" CreationDate="2022-04-28T09:01:51.607" UserId="28" Text="If you read the code for `fork-off-substrate`, you will see that it ultimately collects a list of &quot;module prefixes&quot;, and then queries storage using that list.&#xD;&#xA;&#xD;&#xA;Right now it collects a list of prefixes to skip:&#xD;&#xA;&#xD;&#xA;```lang-javascript&#xD;&#xA;/**&#xD;&#xA; * All module prefixes except those mentioned in the skippedModulesPrefix will be added to this by the script.&#xD;&#xA; * If you want to add any past module or part of a skipped module, add the prefix here manually.&#xD;&#xA; *&#xD;&#xA; * Any storage value’s hex can be logged via console.log(api.query.&lt;module&gt;.&lt;call&gt;.key([...opt params])),&#xD;&#xA; * e.g. console.log(api.query.timestamp.now.key()).&#xD;&#xA; *&#xD;&#xA; * If you want a map/doublemap key prefix, you can do it via .keyPrefix(),&#xD;&#xA; * e.g. console.log(api.query.system.account.keyPrefix()).&#xD;&#xA; *&#xD;&#xA; * For module hashing, do it via xxhashAsHex,&#xD;&#xA; * e.g. console.log(xxhashAsHex('System', 128)).&#xD;&#xA; */&#xD;&#xA;let prefixes = ['0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9' /* System.Account */];&#xD;&#xA;const skippedModulesPrefix = ['System', 'Session', 'Babe', 'Grandpa', 'GrandpaFinality', 'FinalityTracker', 'Authorship'];&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But your question seems to want the opposite, which is just the storage specific pallet, ignoring the rest.&#xD;&#xA;&#xD;&#xA;For that, you just need to query the keys which start with the prefix you expect.&#xD;&#xA;&#xD;&#xA;Starting from first principles, do something like:&#xD;&#xA;&#xD;&#xA;```lang-javascript&#xD;&#xA;let prefix = xxhashAsHex(module.name, 128)&#xD;&#xA;let allStorageKeys = api.rpc.state.getKeys(prefix);&#xD;&#xA;let allStorage = api.rpc.state.queryStorageAt(allStorageKeys);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then you insert these keys / values into your new chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="8259" PostHistoryTypeId="5" PostId="2194" RevisionGUID="ff722824-8365-4fc8-86ab-6bd860614a79" CreationDate="2022-04-28T09:04:08.710" UserId="53" Comment="added 36 characters in body" Text="This is a slightly more complex subject than it sounds. The reason is that while Polkadot guarantees the *correct execution* of each parachain's logic, it does not guarantee that the logic does something *sensible or expected* by some particular set of onlookers.&#xD;&#xA;&#xD;&#xA;An obvious example would be *teleports*. The act of teleporting is basically the act of burning a token on one *sending* chain and at some point in the near future creating a token representing that destroyed asset on a *receiving* chain. One instance of this would be sending DOT from the Polkadot Relay-chain to the Statemint parachain: The DOT is destroyed on the Relay-chain and created on Statemint. It can be teleported back which involves it being destroyed on Statemint and minted again on the Relay-chain.&#xD;&#xA;&#xD;&#xA;It is fairly easy to construct an XCM message to do this, and the XCM pallet in Cumulus includes such a facility to do just this (search for `fn teleport_assets`). However, there is nothing embedded in the Polkadot protocol which stops the sending chain from sending a message to tell the &quot;recipient&quot; chain to mint a particular asset without actually destroying the corresponding asset. The reason we do teleporting between the Relay-chain and Statemint is because the Relay-chain is in complete control of Statemint's logic via governance, and thus it can *trust* Statemint to behave as expected.&#xD;&#xA;&#xD;&#xA;The same cannot be said of arbitrary teams' parachains. Without even getting into malicious intent, an innocent bug could cause a parachain to inadvertently send unfaithful teleport counterparts, instructing the minting of tokens on receiving chains which never existed on the sending chain.&#xD;&#xA;&#xD;&#xA;To manage this there are two solutions:&#xD;&#xA;&#xD;&#xA;- SPREE (Secure Parachain Runtime Execution Enclaves), which allows for non-negotiable, individually addressable identical instances of logic modules (basically, pallets) to exist on parachains, thereby alleviating the need for one parachain to trust another's logic. This is not yet implemented but is at the design stage.&#xD;&#xA;- Reserve Assets, the current solution, which is essentially to name a particular chain as the universally trusted home for an asset. When this asset &quot;exists&quot; on any chain which is not the home-chain, it in fact is just an IOU (or fully-backed derivative) which can be traded in for an instance of the real asset which exists on the home-chain.&#xD;&#xA;&#xD;&#xA;When SPREE is delivered then the answer to this question will basically just be &quot;have your parachain opt-in to the assets SPREE module&quot;. Until then, it's a little harder. Teleporting can work if both your parachain and the parachain from which you wish to receive the given asset trust each other's logic (to the point of bankrupting eachother if there is a bug in one). This level of trust between parachains isn't usually the case, but might work if a single parachain team end up deploying to multiple parachains. Otherwise we're basically stuck with reserve asset transfers. Right now for these to work, each asset must be configured individually with the fungible implementation in the runtime together with the home-chain on which the actual asset sits.&#xD;&#xA;&#xD;&#xA;This is only a temporary solution. Changes which are part of the XCMv3 upgrade will bring along the possibility of automating the ability to receive, host and send foreign assets without requiring those assets to be explicitly configured in the runtime. There is already an example of this in the XCM v3 branch using the Uniques pallet `CreateOrigin` and `MultiLocation`s as a means of identifying a foreign NFT by its relative location." ContentLicense="CC BY-SA 4.0" />
  <row Id="8260" PostHistoryTypeId="2" PostId="2213" RevisionGUID="d0664d11-8b42-44d9-8803-cd7317487528" CreationDate="2022-04-28T09:11:29.953" UserId="28" Text="This is not possible, since both nodes will be trying to read / write from the same database, and they won't behave well together.&#xD;&#xA;&#xD;&#xA;In this case, I don't see a difference having your validator act as also the node that which exposes the RPC. It should practically behave the same, and it is not like the syncing node and the validator node will have different data.&#xD;&#xA;&#xD;&#xA;That being said, generally we would never suggest doing this, since your RPC would be publicly accessible, it would be easy for a malicious user to spam your node with queries, and then affect the performance of your validator, which could cause you to miss blocks, get slashed, etc...&#xD;&#xA;&#xD;&#xA;Block producer nodes should really be isolated and treated as a first class application on dedicated hardware, since ultimately you are putting a lot of money behind these nodes behaving well." ContentLicense="CC BY-SA 4.0" />
  <row Id="8262" PostHistoryTypeId="2" PostId="2214" RevisionGUID="ee6db4ea-8e32-40bc-8ff4-ba0bb4d67052" CreationDate="2022-04-28T09:14:52.143" UserId="342" Text="I don't know if you can do it directly using polkadot.js but I can suggest you a couple of ways to obtain the account id you are looking for.&#xD;&#xA;&#xD;&#xA;# The easy way&#xD;&#xA;&#xD;&#xA;Just write a trivial Rust program that uses the Substrate API to get what you want:&#xD;&#xA;&#xD;&#xA;    use frame_support::PalletId;&#xD;&#xA;    use sp_runtime::{MultiSignature, traits::{AccountIdConversion, IdentifyAccount, Verify}};&#xD;&#xA;    type AccountId = &lt;&lt;MultiSignature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;&#xD;&#xA;&#xD;&#xA;    let pallet_id = PalletId(*b&quot;abababab&quot;);&#xD;&#xA;    let acc: AccountId = pallet_id.into_account();&#xD;&#xA;    println!(&quot;{}&quot;, acc.to_string());&#xD;&#xA;&#xD;&#xA;# The manual way&#xD;&#xA;&#xD;&#xA;This is if you are curious about understanding what is going on under to hood...&#xD;&#xA;&#xD;&#xA;Given the pallet id: `&quot;abababab&quot;`, to manually reproduce what the `into_account` method is doing:&#xD;&#xA;&#xD;&#xA;1. prepend the `&quot;modl&quot;` prefix to your pallet id and encode it.&#xD;&#xA;&#xD;&#xA;        &quot;modlabababab&quot; = (in hex) =&gt; 6d6f646c6162616261626162&#xD;&#xA;&#xD;&#xA;2. zero pad the encoded byte array up to 32 bytes&#xD;&#xA;&#xD;&#xA;        6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;3. prepend the network id (e.g. 0x2a for Substrate network)&#xD;&#xA;&#xD;&#xA;        2a6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;4. prepend the `&quot;SS58PRE&quot;` to the byte array computed in 3&#xD;&#xA;&#xD;&#xA;        (&quot;SS58PRE&quot; = (in hex) =&gt; 53533538505245)&#xD;&#xA;        =&gt; 535335385052452a6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;5. Compute the Blake2 hash of the byte array computed in 4&#xD;&#xA;&#xD;&#xA;        $ echo 535335385052452a6d6f646c61626162616261620000000000000000000000000000000000000000 | xxd -ps -r | b2sum --length 512&#xD;&#xA;          70c39bed485b02f21d07be4de45946492f0177bb5663b3018fe5714fc8d014705c94ed4d7cae0b92ed9c141c298a2d72264fc87700f223dd94ccc6bf9202b025&#xD;&#xA;&#xD;&#xA;6. append the first two bytes of the Blake2 hash (i.e. the &quot;checksum&quot;) to the string computed in 3&#xD;&#xA;&#xD;&#xA;        2a6d6f646c6162616261626162000000000000000000000000000000000000000070c3&#xD;&#xA;&#xD;&#xA;7. convert to base 58&#xD;&#xA;&#xD;&#xA;        $ echo 2a6d6f646c6162616261626162000000000000000000000000000000000000000070c3 | xxd -ps -r | base58&#xD;&#xA;        5EYCAe5fiMgHBR7cyJUzU6YLj8uRjgHZrkt2VJxW5cjSHSYi&#xD;&#xA;&#xD;&#xA;Your account id is `5EYCAe5fiMgHBR7cyJUzU6YLj8uRjgHZrkt2VJxW5cjSHSYi`&#xD;&#xA;&#xD;&#xA;Note: if you don't have the `base58` tool installed you can always use an online tool such as [this](https://appdevtools.com/base58-encoder-decoder) (select &quot;hex&quot; input).&#xD;&#xA;&#xD;&#xA;# Using Subkey&#xD;&#xA;&#xD;&#xA;Once you have the byte array computed in point 3 of the &quot;manual way&quot; you can pass it directly to `subkey` tool&#xD;&#xA;&#xD;&#xA;    $ subkey inspect --public 6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;    Network ID/version: substrate&#xD;&#xA;      Public key (hex):   0x6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;      Account ID:         0x6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;      SS58 Address:       5EYCAe5fiMgHBR7cyJUzU6YLj8uRjgHZrkt2VJxW5cjSHSYi&#xD;&#xA;&#xD;&#xA;# Bonus&#xD;&#xA;&#xD;&#xA;Shell script for the manual procedure&#xD;&#xA;&#xD;&#xA;    #!/bin/bash&#xD;&#xA;    pre=$(printf &quot;modl&quot;$1 | xxd -ps)&#xD;&#xA;    pre=$(printf &quot;2a%-64s&quot; $pre | sed 's/ /0/g')&#xD;&#xA;    to_hash=$(printf &quot;53533538505245&quot;$pre)&#xD;&#xA;    checksum=$(echo $to_hash | xxd -ps -r | b2sum --length 512 | cut -c 1-4)&#xD;&#xA;    echo $pre$checksum | xxd -ps -r | base58&#xD;&#xA;&#xD;&#xA;Call it as:&#xD;&#xA;&#xD;&#xA;       $ ./&lt;thescriptname&gt; abababab&#xD;&#xA;       5EYCAe5fiMgHBR7cyJUzU6YLj8uRjgHZrkt2VJxW5cjSHSYi&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8264" PostHistoryTypeId="2" PostId="2215" RevisionGUID="0bcbdfe2-58f4-4b5c-9d3e-64685a30b966" CreationDate="2022-04-28T09:17:10.590" UserId="451" Text="Regarding dynamic event decoding, this is something that `cargo-contract` does. It is not easily reusable at the moment but feel free to copy the code and use it for inspiration. Start [here](https://github.com/paritytech/cargo-contract/blob/master/src/cmd/extrinsics/events.rs#L41). &#xD;&#xA;&#xD;&#xA;The other alternative at the moment would be to add that functionality to `desub`, which should be relatively straightforward since it already implements the underlying dynamic type decoding.&#xD;&#xA;&#xD;&#xA;Eventually there should be a unified crate for dynamically decoding events, possibly as part of `subxt`." ContentLicense="CC BY-SA 4.0" />
  <row Id="8266" PostHistoryTypeId="2" PostId="2216" RevisionGUID="df614615-6367-439d-9e74-60baab3ea197" CreationDate="2022-04-28T09:17:29.610" UserId="140" Text="We are looking to build a blockchain using substrate. &#xD;&#xA;&#xD;&#xA;We are wondering if there is a way to put text/data into the genesis block. We would like to save some information about what blockchain stands for in that.&#xD;&#xA;&#xD;&#xA;We just want to know whether its possible or not. If yes, how to do it?&#xD;&#xA;&#xD;&#xA;Thanks in advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="8268" PostHistoryTypeId="1" PostId="2216" RevisionGUID="df614615-6367-439d-9e74-60baab3ea197" CreationDate="2022-04-28T09:17:29.610" UserId="140" Text="Is it possible to add some text in genesis block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8269" PostHistoryTypeId="3" PostId="2216" RevisionGUID="df614615-6367-439d-9e74-60baab3ea197" CreationDate="2022-04-28T09:17:29.610" UserId="140" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8270" PostHistoryTypeId="2" PostId="2217" RevisionGUID="752803fe-3d30-4d0c-89cf-8b9aa1798466" CreationDate="2022-04-28T09:19:40.940" UserId="213" Text="u128 is [not supported][1] on rpc. So I am trying to use NumberOrHex &#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/1463/how-to-setup-and-rpc-call-that-accepts-a-u128-input&#xD;&#xA;&#xD;&#xA;Here is my code for runtime api:&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    use codec::Codec;&#xD;&#xA;    &#xD;&#xA;    sp_api::decl_runtime_apis! {&#xD;&#xA;    	pub trait ShivarthuApi&lt;U128&gt; where&#xD;&#xA;    	U128: Codec {&#xD;&#xA;    		fn hello_world() -&gt; U128;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;Cargo.toml&#xD;&#xA;&#xD;&#xA;    [dependencies]&#xD;&#xA;    sp-api = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.18&quot; }&#xD;&#xA;    codec = { package = &quot;parity-scale-codec&quot;, version = &quot;2.3.1&quot; }&#xD;&#xA;&#xD;&#xA;It gives error:&#xD;&#xA;&#xD;&#xA;    the trait bound `U128: sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::parity_scale_codec::WrapperTypeDecode` is not satisfied&#xD;&#xA;    &#xD;&#xA;    the trait `sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::parity_scale_codec::WrapperTypeDecode` is not implemented for `U128`&#xD;&#xA;    &#xD;&#xA;    note: required because of the requirements on the impl of `sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::Decode` for `U128`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/jsonrpc/issues/470" ContentLicense="CC BY-SA 4.0" />
  <row Id="8272" PostHistoryTypeId="1" PostId="2217" RevisionGUID="752803fe-3d30-4d0c-89cf-8b9aa1798466" CreationDate="2022-04-28T09:19:40.940" UserId="213" Text="u128 is not supported on jsonrpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="8273" PostHistoryTypeId="3" PostId="2217" RevisionGUID="752803fe-3d30-4d0c-89cf-8b9aa1798466" CreationDate="2022-04-28T09:19:40.940" UserId="213" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8274" PostHistoryTypeId="5" PostId="2214" RevisionGUID="3f559a8a-0064-49d1-9f34-4df8c57e7239" CreationDate="2022-04-28T09:20:11.163" UserId="342" Comment="deleted 18 characters in body" Text="I don't know if you can do it directly using polkadot.js but I can suggest you a couple of ways to obtain the account id you are looking for.&#xD;&#xA;&#xD;&#xA;# The easy way&#xD;&#xA;&#xD;&#xA;Just write a trivial Rust program that uses the Substrate API to get what you want:&#xD;&#xA;&#xD;&#xA;    use frame_support::PalletId;&#xD;&#xA;    use sp_runtime::{MultiSignature, traits::{AccountIdConversion, IdentifyAccount, Verify}};&#xD;&#xA;    type AccountId = &lt;&lt;MultiSignature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;&#xD;&#xA;&#xD;&#xA;    let pallet_id = PalletId(*b&quot;abababab&quot;);&#xD;&#xA;    let acc: AccountId = pallet_id.into_account();&#xD;&#xA;    println!(&quot;{}&quot;, acc.to_string());&#xD;&#xA;&#xD;&#xA;# The manual way&#xD;&#xA;&#xD;&#xA;This is if you are curious about understanding what is going on under to hood...&#xD;&#xA;&#xD;&#xA;Given the pallet id: `&quot;abababab&quot;`, to manually reproduce what the `into_account` method is doing:&#xD;&#xA;&#xD;&#xA;1. prepend the `&quot;modl&quot;` prefix to your pallet id&#xD;&#xA;&#xD;&#xA;        &quot;modlabababab&quot; = (in hex) =&gt; 6d6f646c6162616261626162&#xD;&#xA;&#xD;&#xA;2. zero pad the encoded byte array to 32 bytes&#xD;&#xA;&#xD;&#xA;        6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;3. prepend the network id (e.g. 0x2a for Substrate network)&#xD;&#xA;&#xD;&#xA;        2a6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;4. prepend the `&quot;SS58PRE&quot;` to the byte array computed in 3&#xD;&#xA;&#xD;&#xA;        (&quot;SS58PRE&quot; = (in hex) =&gt; 53533538505245)&#xD;&#xA;        =&gt; 535335385052452a6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;5. Compute the Blake2 hash of the byte array computed in 4&#xD;&#xA;&#xD;&#xA;        $ echo 535335385052452a6d6f646c61626162616261620000000000000000000000000000000000000000 | xxd -ps -r | b2sum --length 512&#xD;&#xA;          70c39bed485b02f21d07be4de45946492f0177bb5663b3018fe5714fc8d014705c94ed4d7cae0b92ed9c141c298a2d72264fc87700f223dd94ccc6bf9202b025&#xD;&#xA;&#xD;&#xA;6. append the first two bytes of the Blake2 hash (i.e. the &quot;checksum&quot;) to the string computed in 3&#xD;&#xA;&#xD;&#xA;        2a6d6f646c6162616261626162000000000000000000000000000000000000000070c3&#xD;&#xA;&#xD;&#xA;7. convert to base 58&#xD;&#xA;&#xD;&#xA;        $ echo 2a6d6f646c6162616261626162000000000000000000000000000000000000000070c3 | xxd -ps -r | base58&#xD;&#xA;        5EYCAe5fiMgHBR7cyJUzU6YLj8uRjgHZrkt2VJxW5cjSHSYi&#xD;&#xA;&#xD;&#xA;Your account id is `5EYCAe5fiMgHBR7cyJUzU6YLj8uRjgHZrkt2VJxW5cjSHSYi`&#xD;&#xA;&#xD;&#xA;Note: if you don't have the `base58` tool installed you can always use an online tool such as [this](https://appdevtools.com/base58-encoder-decoder) (select &quot;hex&quot; input).&#xD;&#xA;&#xD;&#xA;# Using Subkey&#xD;&#xA;&#xD;&#xA;Once you have the byte array computed in point 3 of the &quot;manual way&quot; you can pass it directly to `subkey` tool&#xD;&#xA;&#xD;&#xA;    $ subkey inspect --public 6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;    Network ID/version: substrate&#xD;&#xA;      Public key (hex):   0x6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;      Account ID:         0x6d6f646c61626162616261620000000000000000000000000000000000000000&#xD;&#xA;      SS58 Address:       5EYCAe5fiMgHBR7cyJUzU6YLj8uRjgHZrkt2VJxW5cjSHSYi&#xD;&#xA;&#xD;&#xA;# Bonus&#xD;&#xA;&#xD;&#xA;Shell script for the manual procedure&#xD;&#xA;&#xD;&#xA;    #!/bin/bash&#xD;&#xA;    pre=$(printf &quot;modl&quot;$1 | xxd -ps)&#xD;&#xA;    pre=$(printf &quot;2a%-64s&quot; $pre | sed 's/ /0/g')&#xD;&#xA;    to_hash=$(printf &quot;53533538505245&quot;$pre)&#xD;&#xA;    checksum=$(echo $to_hash | xxd -ps -r | b2sum --length 512 | cut -c 1-4)&#xD;&#xA;    echo $pre$checksum | xxd -ps -r | base58&#xD;&#xA;&#xD;&#xA;Call it as:&#xD;&#xA;&#xD;&#xA;       $ ./&lt;thescriptname&gt; abababab&#xD;&#xA;       5EYCAe5fiMgHBR7cyJUzU6YLj8uRjgHZrkt2VJxW5cjSHSYi&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8275" PostHistoryTypeId="2" PostId="2218" RevisionGUID="a3a33bf3-17b9-4ae3-afc0-71e24fa17ed0" CreationDate="2022-04-28T09:35:30.903" UserId="28" Text="The chain-specification is just a list of storage key / value pairs.&#xD;&#xA;&#xD;&#xA;So you can select a random key, and set some text as the value of that storage, and then insert that in your genesis block.&#xD;&#xA;&#xD;&#xA;From there, this text will live in your blockchain storage forever.&#xD;&#xA;&#xD;&#xA;Using a text to hex tool:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Key&#xD;&#xA;&quot;:my_statement:&quot; = 0x3a6d795f73746174656d656e743a&#xD;&#xA;// Value&#xD;&#xA;&quot;This is the text I want to store.&quot; = 0x5468697320697320746865207465787420492077616e7420746f2073746f72652e&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you update your chain specification:&#xD;&#xA;&#xD;&#xA;```lang-json&#xD;&#xA;&quot;genesis&quot;: {&#xD;&#xA;    &quot;raw&quot;: {&#xD;&#xA;      &quot;top&quot;: {&#xD;&#xA;        &quot;0x3a6d795f73746174656d656e743a&quot;: &quot;0x5468697320697320746865207465787420492077616e7420746f2073746f72652e&quot;,&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8277" PostHistoryTypeId="2" PostId="2219" RevisionGUID="9d62502e-f19a-45d5-b786-a80dc30b59f4" CreationDate="2022-04-28T09:38:29.030" UserId="627" Text="The only information that is exposed to APIs are the names of the RPCs, this excludes -&#xD;&#xA;&#xD;&#xA; - the actual description of the method (optional, but useful in some case)&#xD;&#xA; - the actual input parameters and their types&#xD;&#xA; - the actual return type&#xD;&#xA;&#xD;&#xA;So in this case the API is correct - it can _see_ that there is a methods, but if has no idea how to &quot;decorate&quot; it since it has no information about the input and output parameters. (This is unlike anything exposed by the runtime, e.g. state/extrinsics/errors since with metadata v14 we have all the pertinent information on these, including the types)&#xD;&#xA;&#xD;&#xA;You would need to manually fully describe the methods and add it to the [API initialization options](https://polkadot.js.org/docs/api/start/rpc.custom)&#xD;&#xA;&#xD;&#xA;For the apps UI specifically, this is specified in the [apps-config package](https://github.com/polkadot-js/apps/tree/master/packages/apps-config/src/api/spec) on a per-chain/runtime basis.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8279" PostHistoryTypeId="2" PostId="2220" RevisionGUID="d0d2befa-0c41-44ea-816f-64a471542083" CreationDate="2022-04-28T09:39:57.907" UserId="380" Text="This was because I was instantiating the contract with `HttpProvider` instead of `WsProvider`. Changing to `WsProvider` allows the extrinsic result to be a subscription and therefore update with extra information when available.&#xD;&#xA;&#xD;&#xA;I had also missed the following helpful message in the console logs:&#xD;&#xA;&#xD;&#xA;&gt; API/INIT: Api will be available in a limited mode since the provider&#xD;&#xA;&gt; does not support subscriptions&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8281" PostHistoryTypeId="2" PostId="2221" RevisionGUID="d0515bfd-12b8-4c53-9cf7-f3ac0f276130" CreationDate="2022-04-28T09:42:31.520" UserId="627" Text="`asStandard` is when you receive the object back. In that case the `is&lt;Key&gt;` and `as&lt;Key&gt;` helpers allow you to convert the received enum to the internal view of a specific field. &#xD;&#xA;&#xD;&#xA;To construct it, it needs the key `Standard` for the enum, so you need -&#xD;&#xA;&#xD;&#xA;`{ Standard: { vote: voteConfig, balance: balance } }`&#xD;&#xA;&#xD;&#xA;The API would always create the types, so you never need to do it manually via `new`. In this case I would suggest -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  let vote = { &#xD;&#xA;    Standard: {&#xD;&#xA;      vote: {                                                                                                                           &#xD;&#xA;        aye: true,                                                                                                                                                                      &#xD;&#xA;        conviction: 'None',                                                                                                                                                              &#xD;&#xA;      },&#xD;&#xA;      balance: balance&#xD;&#xA;    }&#xD;&#xA;  };&#xD;&#xA;&#xD;&#xA;  let unsub = await api.tx.democracy.vote(i, vote).signAndSend(payoutKey, ...);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8283" PostHistoryTypeId="6" PostId="2205" RevisionGUID="279c8284-9c9e-4379-b956-f2adc79b919c" CreationDate="2022-04-28T10:18:49.020" UserId="85" Comment="edited tags" Text="|polkadot|mev|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8284" PostHistoryTypeId="5" PostId="2168" RevisionGUID="0a5f7795-3204-47e8-a2cf-ff76421e7e5d" CreationDate="2022-04-28T10:20:25.397" UserId="1838" Comment="added 97 characters in body" Text="some wiki for Monitoring and Telemetry&#xD;&#xA;:https://wiki.polkadot.network/docs/build-node-management#monitoring-and-telemetry&#xD;&#xA;&#xD;&#xA;for your commit QA:&#xD;&#xA;&#xD;&#xA; 1.the `Loki + promtail + Grafana` logging system may meet your needs." ContentLicense="CC BY-SA 4.0" />
  <row Id="8285" PostHistoryTypeId="2" PostId="2222" RevisionGUID="3c853e8c-4d6f-4b11-bee4-f9a82eb9e73e" CreationDate="2022-04-28T10:28:53.570" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="8287" PostHistoryTypeId="1" PostId="2222" RevisionGUID="3c853e8c-4d6f-4b11-bee4-f9a82eb9e73e" CreationDate="2022-04-28T10:28:53.570" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8288" PostHistoryTypeId="1" PostId="2223" RevisionGUID="8c8c7793-289e-4ec4-979d-6a8607557a6a" CreationDate="2022-04-28T10:28:53.570" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8290" PostHistoryTypeId="2" PostId="2223" RevisionGUID="8c8c7793-289e-4ec4-979d-6a8607557a6a" CreationDate="2022-04-28T10:28:53.570" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="8291" PostHistoryTypeId="2" PostId="2224" RevisionGUID="a633b703-e543-49ff-8387-76b67128eefd" CreationDate="2022-04-28T10:35:32.177" UserId="2102" Text="I'm trying to return an item that is within a storageMap. Its key is a Vec(u8), but I don't know how to send this type using a curl call. I receive de following message.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;~ % curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;items_getItemById&quot;, &quot;params&quot;: [1234] }' http://localhost:9933&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid type: integer `1234`, expected a (both 0x-prefixed or not) hex string with length of 64.&quot;},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;~ p27 % curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;items_getItemById&quot;, &quot;params&quot;: [&quot;1234&quot;] }' http://localhost:9933&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid length 4, expected a (both 0x-prefixed or not) hex string with length of 64.&quot;},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;~ p27 % curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;items_getItemById&quot;, &quot;params&quot;: [&quot;0x1234&quot;] }' http://localhost:9933&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid length 4, expected a (both 0x-prefixed or not) hex string with length of 64.&quot;},&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the item stored on chain:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      1234321&#xD;&#xA;    ]&#xD;&#xA;    {&#xD;&#xA;      id: 1234321&#xD;&#xA;      summary: 12341234&#xD;&#xA;      owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      state: ForSale&#xD;&#xA;      price: 23&#xD;&#xA;      lastUpdate: 1234123&#xD;&#xA;      creationBlock: 4&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The main issue is that I'm not able to query the item from the following function:&#xD;&#xA;```rs&#xD;&#xA;pub fn get_item(id: ProductId) -&gt; Option&lt;ItemRpc&gt; {&#xD;&#xA;	Self::get_item_by_id(&amp;id)&#xD;&#xA;} &#xD;&#xA;&#xD;&#xA;fn get_item_by_id(id: &amp;[u8]) -&gt; Option&lt;ItemRpc&gt; {&#xD;&#xA;	if let Some(value) = Self::items(id) {&#xD;&#xA;		Some(value.to_rpc())&#xD;&#xA;	} else {&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This is how I create items for the pallet:&#xD;&#xA;[![Creation entry point][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eYRWV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8293" PostHistoryTypeId="1" PostId="2224" RevisionGUID="a633b703-e543-49ff-8387-76b67128eefd" CreationDate="2022-04-28T10:35:32.177" UserId="2102" Text="Custom RPC parameters" ContentLicense="CC BY-SA 4.0" />
  <row Id="8294" PostHistoryTypeId="3" PostId="2224" RevisionGUID="a633b703-e543-49ff-8387-76b67128eefd" CreationDate="2022-04-28T10:35:32.177" UserId="2102" Text="|substrate-node|pallet|rpc|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8295" PostHistoryTypeId="12" PostId="2224" RevisionGUID="66bb43e2-84c3-4be5-a48e-f22f3a5897b7" CreationDate="2022-04-28T10:46:14.023" UserId="2102" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2102,&quot;DisplayName&quot;:&quot;andresvsm&quot;}]}" />
  <row Id="8296" PostHistoryTypeId="13" PostId="2224" RevisionGUID="223b42be-a32d-49fd-b277-c8b6c5c76d7d" CreationDate="2022-04-28T10:49:54.580" UserId="2102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2102,&quot;DisplayName&quot;:&quot;andresvsm&quot;}]}" />
  <row Id="8297" PostHistoryTypeId="5" PostId="2224" RevisionGUID="bcfcf340-8a9b-4f68-beab-348c5c64a229" CreationDate="2022-04-28T10:50:57.357" UserId="2102" Comment="deleted 337 characters in body" Text="I'm trying to return an item that is within a storageMap. Its key is a Vec(u8), but I don't know how to send this type using a curl call. I tried using the id as string and using its hex version and I receive de following message:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;~ % curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;items_getItemById&quot;, &quot;params&quot;: [1234321] }' http://localhost:9933&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid type: integer `1234321`, expected a (both 0x-prefixed or not) hex string with length of 64.&quot;},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;~ % curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;items_getItemById&quot;, &quot;params&quot;: [0x31323334333231] }' http://localhost:9933&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32700,&quot;message&quot;:&quot;Parse error&quot;},&quot;id&quot;:null}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the item stored on chain:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      1234321&#xD;&#xA;    ]&#xD;&#xA;    {&#xD;&#xA;      id: 1234321&#xD;&#xA;      summary: 12341234&#xD;&#xA;      owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      state: ForSale&#xD;&#xA;      price: 23&#xD;&#xA;      lastUpdate: 1234123&#xD;&#xA;      creationBlock: 4&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The main issue is that I'm not able to query the item from the following function:&#xD;&#xA;```rs&#xD;&#xA;pub fn get_item(id: ProductId) -&gt; Option&lt;ItemRpc&gt; {&#xD;&#xA;	Self::get_item_by_id(&amp;id)&#xD;&#xA;} &#xD;&#xA;&#xD;&#xA;fn get_item_by_id(id: &amp;[u8]) -&gt; Option&lt;ItemRpc&gt; {&#xD;&#xA;	if let Some(value) = Self::items(id) {&#xD;&#xA;		Some(value.to_rpc())&#xD;&#xA;	} else {&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This is how I create items for the pallet:&#xD;&#xA;[![Creation entry point][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eYRWV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8298" PostHistoryTypeId="2" PostId="2225" RevisionGUID="6938e46f-baa3-4e8c-be0b-48f2df97d36a" CreationDate="2022-04-28T10:51:51.643" UserId="429" Text="What if we don't provide range inside benchmark and provide 10 in **steps** while running benchmark?&#xD;&#xA;Is there any default range provided by framework or is there anything else will happen in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8300" PostHistoryTypeId="1" PostId="2225" RevisionGUID="6938e46f-baa3-4e8c-be0b-48f2df97d36a" CreationDate="2022-04-28T10:51:51.643" UserId="429" Text="Range in benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="8301" PostHistoryTypeId="3" PostId="2225" RevisionGUID="6938e46f-baa3-4e8c-be0b-48f2df97d36a" CreationDate="2022-04-28T10:51:51.643" UserId="429" Text="|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8302" PostHistoryTypeId="4" PostId="2167" RevisionGUID="3bc3bb33-8bfd-40c6-a800-eca643efce05" CreationDate="2022-04-28T11:09:53.083" UserId="2136" Comment="edited title" Text="How to get the Peer count in an Off Chain Worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8303" PostHistoryTypeId="2" PostId="2226" RevisionGUID="e9af824c-b855-4d7e-96b8-a2c8d27f210c" CreationDate="2022-04-28T11:18:08.557" UserId="70" Text="Thanks for all the comments. Based on the suggestions, I have identified the issue and posted here which may help other Substrate builders in the future. &#xD;&#xA;&#xD;&#xA;As mentioned by @Gav, there is a problem with the asset that pay for weight, doing more debugging with this [line](https://github.com/paritytech/polkadot/blob/master/xcm/xcm-builder/src/weight.rs#L155.) when `Trader` calculates fee. I found the asset `MultiLocation` is mismatched. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8305" PostHistoryTypeId="2" PostId="2227" RevisionGUID="0d344da2-d5c3-4d7e-aa18-0fb8d319b720" CreationDate="2022-04-28T11:18:12.203" UserId="28" Text="You can take a look at the implementation here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/utils/frame/benchmarking-cli/src/pallet/command.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let mut all_components = Vec::new();&#xD;&#xA;for (idx, (name, low, high)) in components.iter().enumerate() {&#xD;&#xA;	let lowest = self.lowest_range_values.get(idx).cloned().unwrap_or(*low);&#xD;&#xA;	let highest = self.highest_range_values.get(idx).cloned().unwrap_or(*high);&#xD;&#xA;&#xD;&#xA;	let diff = highest - lowest;&#xD;&#xA;&#xD;&#xA;	// Create up to `STEPS` steps for that component between high and low.&#xD;&#xA;	let step_size = (diff / self.steps).max(1);&#xD;&#xA;	let num_of_steps = diff / step_size + 1;&#xD;&#xA;	for s in 0..num_of_steps {&#xD;&#xA;		// This is the value we will be testing for component `name`&#xD;&#xA;		let component_value = lowest + step_size * s;&#xD;&#xA;&#xD;&#xA;		// Select the max value for all the other components.&#xD;&#xA;		let c: Vec&lt;(BenchmarkParameter, u32)&gt; = components&#xD;&#xA;			.iter()&#xD;&#xA;			.enumerate()&#xD;&#xA;			.map(|(idx, (n, _, h))| {&#xD;&#xA;				if n == name {&#xD;&#xA;					(*n, component_value)&#xD;&#xA;				} else {&#xD;&#xA;					(*n, *self.highest_range_values.get(idx).unwrap_or(h))&#xD;&#xA;				}&#xD;&#xA;			})&#xD;&#xA;			.collect();&#xD;&#xA;		all_components.push(c);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;all_components&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in the case you don't have a range, we only have 1 step for &quot;steps&quot;, and will use all the repeats." ContentLicense="CC BY-SA 4.0" />
  <row Id="8308" PostHistoryTypeId="2" PostId="2228" RevisionGUID="6b5fddd5-ef2b-46a4-9903-a33298eabc00" CreationDate="2022-04-28T11:28:15.467" UserId="2140" Text="this is rust-based question.&#xD;&#xA;In Substrate code, there are lots of type casting. For example,&#xD;&#xA;for the BalanceOf&lt;T&gt; type alias, &#xD;&#xA;&#xD;&#xA;    &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&#xD;&#xA;&#xD;&#xA;How is it possible to cast generic type(T) to some trait(Config), which has no exact size on compile time?&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8310" PostHistoryTypeId="1" PostId="2228" RevisionGUID="6b5fddd5-ef2b-46a4-9903-a33298eabc00" CreationDate="2022-04-28T11:28:15.467" UserId="2140" Text="Type casting to trait. T as Config" ContentLicense="CC BY-SA 4.0" />
  <row Id="8311" PostHistoryTypeId="3" PostId="2228" RevisionGUID="6b5fddd5-ef2b-46a4-9903-a33298eabc00" CreationDate="2022-04-28T11:28:15.467" UserId="2140" Text="|substrate-node|generics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8317" PostHistoryTypeId="2" PostId="2230" RevisionGUID="ca0d79b3-acf7-4085-8ca0-7dd2ead995ee" CreationDate="2022-04-28T13:08:56.610" UserId="2408" Text="This is caused because of `getrandom` library which is a dependency of one of the other crates.&#xD;&#xA;Add this line to the `Cargo.toml` file of the crate _which has this lib as a dependency_:  &#xD;&#xA;`getrandom = { version = &quot;0.2&quot;, features = [&quot;js&quot;] }`&#xD;&#xA;&#xD;&#xA;For example if dependencies look like this:&#xD;&#xA;&#xD;&#xA;    your_crate&#xD;&#xA;      |&#xD;&#xA;    lib_a&#xD;&#xA;      |&#xD;&#xA;    lib_b&#xD;&#xA;      |&#xD;&#xA;    getrandom  &#xD;&#xA;then you should add this line to `your_crate/Cargo.toml`" ContentLicense="CC BY-SA 4.0" />
  <row Id="8319" PostHistoryTypeId="5" PostId="2179" RevisionGUID="45c131c7-b040-483f-a0f5-bc2aabffbd30" CreationDate="2022-04-28T13:38:36.170" UserId="29" Comment="deleted 1 character in body; edited title" Text="Q1. What is the existence of `Unsigned Transaction` for?&#xD;&#xA;- I have read about it here: https://docs.substrate.io/v3/concepts/extrinsics&#xD;&#xA;- But it still does not really make sense to me why it exists in Polkadot. What other examples or cases do we need to use this transaction type, other than `I'm Online` Pallet?&#xD;&#xA;- From `I'm Online` pallet, why does a validator node need to send a heartbeat(unsigned tx) which tells it's online?&#xD;&#xA;&#xD;&#xA;Q2. If Unsigned Transaction does not require any tx-fee, isn't such unsigned one vulnerable to DDoS Attack? If not, how does Polkadot protect its own network from such attacks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8320" PostHistoryTypeId="4" PostId="2179" RevisionGUID="45c131c7-b040-483f-a0f5-bc2aabffbd30" CreationDate="2022-04-28T13:38:36.170" UserId="29" Comment="deleted 1 character in body; edited title" Text="Why unsigned transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8321" PostHistoryTypeId="2" PostId="2231" RevisionGUID="11abe52e-ff94-49de-b96a-946a0930c3cf" CreationDate="2022-04-28T13:38:58.327" UserId="29" Text="That is correct - with a signed transaction [there is validation](https://docs.substrate.io/v3/concepts/tx-pool/#validity) to check the nonce, make sure the user has enough to pay for the fee, and check if the signature is valid. With an unsigned transaction you get none of this. It is up to the runtime engineer to construct their own logic such as spam prevention and create *checks* for what they consider is an invalid transaction (or valid transaction).&#xD;&#xA;&#xD;&#xA;As an example of creating such logic, in the [I'm Online pallet](https://github.com/paritytech/substrate/tree/master/frame/im-online) there is a function [`validate_unsigned`](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L551) that has a number of checks:&#xD;&#xA;1. [Check if we have already received a &quot;heartbeat&quot; from this authority](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L553)&#xD;&#xA;2. [Check to see if the session index is the same](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L558)&#xD;&#xA;3. [Verify that the transaction is coming from a valid authority](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L564)&#xD;&#xA;4. [Check that the signature is valid](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L574)&#xD;&#xA;&#xD;&#xA;**Why use an unsigned transaction?**&#xD;&#xA;&#xD;&#xA;Sometimes there are other ways to prove that a transaction is valid for your use case. If you can validate a transaction through some other means then it can open up possibilities to do things that would not be as efficient with a signed transaction such as system calls. For example, validators that need to submit a transaction to the chain such as [extrinsics that are generated on a node](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/babe/src/equivocation.rs#L183) or [produced by an off-chain worker](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/examples/offchain-worker/src/lib.rs#L301). The accounts generating these transactions do not typically hold funds and yet via unsigned transactions and checking where the transaction comes from either via the `TransactionSource` or against a signature, these nodes can submit extrinsics to the chain.&#xD;&#xA;&#xD;&#xA;If you can cover all checks for validation for the unsigned transaction that you are implementing in your runtime, then there can be a lot of value in working with unsigned transactions. Another example, is to send a proof in the payload and that in combination with your validation could be sufficient for your needs.&#xD;&#xA;&#xD;&#xA;An example of this is to sign a payload with a public key (perhaps an authority key), send it as an unsigned transaction, and have validation to check whether a provided signature matches the public key that was used to sign that payload. There is a nice how-to guide on this [here](https://docs.substrate.io/how-to-guides/v3/ocw/transactions/#sending-unsigned-transactions-with-signed-payloads&#xD;&#xA;). Additionally, the [off-chain worker example](https://github.com/paritytech/substrate/tree/master/frame/examples/offchain-worker) leverages unsigned transactions with a signed payload to [check if the transaction is produced by the off-chain worker](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/examples/offchain-worker/src/lib.rs#L318) and, if so, mark it as valid.&#xD;&#xA;&#xD;&#xA;Keep in mind that regardless if it is signed or unsigned, all transactions pass through [`validate_transaction`](https://docs.substrate.io/rustdocs/latest/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html#method.validate_transaction). This function will do some checks for the validity of a transaction but it will not check if the transactions succeed, therefore as noted [here](https://docs.substrate.io/v3/concepts/tx-pool/#validity) this could be another potential attack vector." ContentLicense="CC BY-SA 4.0" />
  <row Id="8323" PostHistoryTypeId="2" PostId="2232" RevisionGUID="a8eeb75a-c0b8-49df-b400-06f273b74a1d" CreationDate="2022-04-28T14:26:08.200" UserId="2408" Text="I've copied Kulupu's `difficulty` [pallet](https://github.com/kulupu/kulupu/blob/master/frame/difficulty/src/lib.rs) and tried to build my node after connecting the pallet. The `decl_storage!` macro in that pallet looks like this:&#xD;&#xA;&#xD;&#xA;    decl_storage! {&#xD;&#xA;	trait Store for Module&lt;T: Config&gt; as Difficulty {&#xD;&#xA;		/// Past difficulties and timestamps, from earliest to latest.&#xD;&#xA;		// TODO Bug here&#xD;&#xA;		PastDifficultiesAndTimestamps: [Option&lt;DifficultyAndTimestamp&lt;T::Moment&gt;&gt;; 60] = [None; DIFFICULTY_ADJUST_WINDOW as usize];&#xD;&#xA;		/// Current difficulty.&#xD;&#xA;		pub CurrentDifficulty get(fn difficulty) build(|config: &amp;GenesisConfig| {&#xD;&#xA;			config.initial_difficulty&#xD;&#xA;		}): Difficulty;&#xD;&#xA;		/// Initial difficulty.&#xD;&#xA;		pub InitialDifficulty config(initial_difficulty): Difficulty;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;  &#xD;&#xA;And the error I get is:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `[std::option::Option&lt;DifficultyAndTimestamp&lt;&lt;T as pallet_timestamp::Config&gt;::Moment&gt;&gt;; 60]: sp_core::Encode` is not satisfied&#xD;&#xA;  --&gt; pallets/difficulty/src/lib.rs:40:1&#xD;&#xA;   |&#xD;&#xA;40 | / decl_storage! {&#xD;&#xA;41 | |     trait Store for Module&lt;T: Config&gt; as Difficulty {&#xD;&#xA;42 | |         /// Past difficulties and timestamps, from earliest to latest.&#xD;&#xA;43 | |         // TODO Implement sp_core::Encode, Decode for&#xD;&#xA;...  |&#xD;&#xA;51 | |     }&#xD;&#xA;52 | | }&#xD;&#xA;   | |_^ the trait `sp_core::Encode` is not implemented for `[std::option::Option&lt;DifficultyAndTimestamp&lt;&lt;T as pallet_timestamp::Config&gt;::Moment&gt;&gt;; 60]`&#xD;&#xA;   |&#xD;&#xA;   = help: the following implementations were found:&#xD;&#xA;             &lt;[T; N] as sp_core::Encode&gt;&#xD;&#xA;             &lt;[T] as sp_core::Encode&gt;&#xD;&#xA;note: required by a bound in `hidden_include::storage::generator::StorageValue`&#xD;&#xA;  --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/1b57cff/frame/support/src/storage/generator/value.rs:30:27&#xD;&#xA;   |&#xD;&#xA;30 | pub trait StorageValue&lt;T: FullCodec&gt; {&#xD;&#xA;   |                           ^^^^^^^^^ required by this bound in `hidden_include::storage::generator::StorageValue`&#xD;&#xA;   = note: this error originates in the macro `decl_storage` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It says that `sp_core:Encode` (and Decode and some others...) is not implemented for `Option&lt;DifficultyAndTimestamp&lt;...&gt;&gt;` even though there is such `Derive` in `difficulty` pallet:&#xD;&#xA;```&#xD;&#xA;#[derive(Encode, Decode, TypeInfo, Clone, Copy, Eq, PartialEq, Debug)]&#xD;&#xA;pub struct DifficultyAndTimestamp&lt;M&gt; {&#xD;&#xA;	pub difficulty: Difficulty,&#xD;&#xA;	pub timestamp: M,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;__ALSO__ if I just clone whole Kulupu's repo and `cd` to `difficulty` crate and run `cargo build --release` it builds no problem. But if I do the same in my crate (with the _same_ code) it won't build.&#xD;&#xA;&#xD;&#xA;How do I fix this?   &#xD;&#xA;Should I provide a whole error massage? " ContentLicense="CC BY-SA 4.0" />
  <row Id="8325" PostHistoryTypeId="1" PostId="2232" RevisionGUID="a8eeb75a-c0b8-49df-b400-06f273b74a1d" CreationDate="2022-04-28T14:26:08.200" UserId="2408" Text="How to Implement sp_core:Encode?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8326" PostHistoryTypeId="3" PostId="2232" RevisionGUID="a8eeb75a-c0b8-49df-b400-06f273b74a1d" CreationDate="2022-04-28T14:26:08.200" UserId="2408" Text="|pallet|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8327" PostHistoryTypeId="2" PostId="2233" RevisionGUID="d3bed19c-f93f-4416-890a-9c43a81b8009" CreationDate="2022-04-28T14:51:17.303" UserId="2136" Text="Feels like a very newbie question but, whilst I've found hints of how to implement this, I can't find the recommended solution.&#xD;&#xA;&#xD;&#xA;I have an offchain worker that does some validation of remote data and then calls an onchain function to say the data is either valid or invalid. I'm only using signed transactions.&#xD;&#xA;&#xD;&#xA;How do I check, in my onchain function, that the call was made by an offchain worker and not some random individual calling it as an extrinsic?&#xD;&#xA;&#xD;&#xA;Feels like I should be using the AuthorityId but I'm not sure how..." ContentLicense="CC BY-SA 4.0" />
  <row Id="8329" PostHistoryTypeId="1" PostId="2233" RevisionGUID="d3bed19c-f93f-4416-890a-9c43a81b8009" CreationDate="2022-04-28T14:51:17.303" UserId="2136" Text="How to ensure call was made by Offchain Worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="8330" PostHistoryTypeId="3" PostId="2233" RevisionGUID="d3bed19c-f93f-4416-890a-9c43a81b8009" CreationDate="2022-04-28T14:51:17.303" UserId="2136" Text="|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8331" PostHistoryTypeId="2" PostId="2234" RevisionGUID="1bebd1aa-fdf8-4b7e-a3c7-61521ec44ed6" CreationDate="2022-04-28T15:05:04.750" UserId="28" Text="This kind of error is usually misleading.&#xD;&#xA;&#xD;&#xA;It is clear that `Encode` is being derived in the code snippet above, but as you see the compiler is complaining that it isn't being derived.&#xD;&#xA;&#xD;&#xA;This usually happens when there are mismatched dependencies. For example, one part of your code uses `sp-core = v1.0.0` and the other uses `sp-core = v2.0.0`.&#xD;&#xA;&#xD;&#xA;In this case, if the derive is generating `Encode` for `v1.0.0`, but then some `v2.0.0` code checks this, it will say that `Encode` is not derived because of the version mismatch.&#xD;&#xA;&#xD;&#xA;I don't have a specific solution for you since I don't know your exact project structure, but I would check that all versions of crates you are using, especially the versions of Substrate, are in agreement." ContentLicense="CC BY-SA 4.0" />
  <row Id="8333" PostHistoryTypeId="2" PostId="2235" RevisionGUID="c2204897-f275-4200-a65d-f655a5f990f0" CreationDate="2022-04-28T15:07:59.770" UserId="411" Text="I have some simple question. What `state_version` stands for, and when it should be changed?&#xD;&#xA;&#xD;&#xA;As I can see, in [Cumulus parachain template][1] on `polkadot-v0.9.18` tag the `state_version` was changed to 1. &lt;br&gt; Also, `transaction_version` was increased, but when I compare extrinsic ordering and metadata [on our chain (between 0.9.16 and 0.9.18)][2], it looks like `transaction_version` need not change.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/polkadot-v0.9.18/parachain-template/runtime/src/lib.rs#L176-L177&#xD;&#xA;  [2]: https://github.com/dappforce/subsocial-parachain/compare/b9bfbb5ecd6b97d3f3e2a9f6a9724d0d428897a4...v0.1.4" ContentLicense="CC BY-SA 4.0" />
  <row Id="8335" PostHistoryTypeId="1" PostId="2235" RevisionGUID="c2204897-f275-4200-a65d-f655a5f990f0" CreationDate="2022-04-28T15:07:59.770" UserId="411" Text="Clarification on state_version and transaction_version change in Cumulus parachain template" ContentLicense="CC BY-SA 4.0" />
  <row Id="8336" PostHistoryTypeId="3" PostId="2235" RevisionGUID="c2204897-f275-4200-a65d-f655a5f990f0" CreationDate="2022-04-28T15:07:59.770" UserId="411" Text="|parachain|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8337" PostHistoryTypeId="2" PostId="2236" RevisionGUID="ef809bda-438a-4a47-a755-31aaaecb3def" CreationDate="2022-04-28T15:21:28.583" UserId="28" Text="&gt; But it still does not really make sense to me why it exists in Polkadot.&#xD;&#xA;&#xD;&#xA;I think part of building a generic and extensible blockchain framework is to support tools like this, even if we wouldn't have used them. So I would pose to you, why not?&#xD;&#xA;&#xD;&#xA;It is important to note that unsigned extrinsics are not necessarily &quot;without a signature&quot;. Usually, they contain a signature within the extrinsic data, instead of in an expected signature format for a signed extrinsic. This can allow for a number of behaviors:&#xD;&#xA;&#xD;&#xA; * Skipping default behaviors like extracting a fee from the signer.&#xD;&#xA; * Supporting different signature schemes which may not be natively supported by the chain.&#xD;&#xA; * Supporting alternative verification methods on top of the extrinsic data.&#xD;&#xA;&#xD;&#xA;In this case, you can think of a signed extrinsic as a set of extrinsics that go through a default pipeline of basic signature verification, fee payment, and then function dispatch. Whereas an unsigned extrinsic goes through a custom pipeline that is defined by the developer in `validate_unsigned`.&#xD;&#xA;&#xD;&#xA;Polkadot DOES have use cases for unsigned extrinsics.&#xD;&#xA;&#xD;&#xA;For example, Polkadot used an unsigned extrinsic to allow users that contributed in the Polkadot ICO to claim their initial DOT tokens.&#xD;&#xA;&#xD;&#xA;In this case, we used an unsigned extrinsic for a few reasons:&#xD;&#xA;&#xD;&#xA; * To support a secp256k1 Ethereum signature, instead of the sr25519 / ed25519 signature that Polkadot would normally expect. A secp256k1 signed extrinsic would be invalid by default on Polkadot.&#xD;&#xA; * To support a feeless transaction for those initial DOT claims. It wouldn't be very friendly if users had to first buy DOT to pay for the transaction to claim their DOT. In this case, to solve the chicken and egg problem, we allowed users one free transaction to claim their DOT token in this way.&#xD;&#xA;* To add the additional verification logic so that users could not abuse this transaction to spam the chain, and in result only allowing one transaction of this kind from each user." ContentLicense="CC BY-SA 4.0" />
  <row Id="8339" PostHistoryTypeId="5" PostId="2179" RevisionGUID="0a2770e6-32db-462f-9fa7-789232c8dea6" CreationDate="2022-04-28T15:22:33.377" UserId="28" Comment="deleted 1 character in body; edited tags; edited title" Text="Q1. What is the existence of `Unsigned extrinsics` for?&#xD;&#xA;- I have read about it here: https://docs.substrate.io/v3/concepts/extrinsics&#xD;&#xA;- But it still does not really make sense to me why it exists in Polkadot. What other examples or cases do we need to use this transaction type, other than `I'm Online` Pallet?&#xD;&#xA;- From `I'm Online` pallet, why does a validator node need to send a heartbeat(unsigned tx) which tells it's online?&#xD;&#xA;&#xD;&#xA;Q2. If Unsigned Transaction does not require any tx-fee, isn't such unsigned one vulnerable to DDoS Attack? If not, how does Polkadot protect its own network from such attacks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8340" PostHistoryTypeId="4" PostId="2179" RevisionGUID="0a2770e6-32db-462f-9fa7-789232c8dea6" CreationDate="2022-04-28T15:22:33.377" UserId="28" Comment="deleted 1 character in body; edited tags; edited title" Text="Why unsigned extrinsics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8341" PostHistoryTypeId="6" PostId="2179" RevisionGUID="0a2770e6-32db-462f-9fa7-789232c8dea6" CreationDate="2022-04-28T15:22:33.377" UserId="28" Comment="deleted 1 character in body; edited tags; edited title" Text="|extrinsic|pallet-imonline|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8342" PostHistoryTypeId="5" PostId="2236" RevisionGUID="705e4fd5-b8ed-4465-b994-f7989d15d1b8" CreationDate="2022-04-28T15:34:43.967" UserId="28" Comment="added 345 characters in body" Text="&gt; But it still does not really make sense to me why it exists in Polkadot.&#xD;&#xA;&#xD;&#xA;I think part of building a generic and extensible blockchain framework is to support tools like this, even if we wouldn't have used them. So I would pose to you, why not?&#xD;&#xA;&#xD;&#xA;It is important to note that unsigned extrinsics are not necessarily &quot;without a signature&quot;. Usually, they contain a signature within the extrinsic data, instead of in an expected signature format for a signed extrinsic. This can allow for a number of behaviors:&#xD;&#xA;&#xD;&#xA; * Skipping default behaviors like extracting a fee from the signer.&#xD;&#xA; * Supporting different signature schemes which may not be natively supported by the chain.&#xD;&#xA; * Supporting alternative verification methods on top of the extrinsic data.&#xD;&#xA;&#xD;&#xA;In this case, you can think of a signed extrinsic as a set of extrinsics that go through a default pipeline of basic signature verification, fee payment, and then function dispatch. Whereas an unsigned extrinsic goes through a custom pipeline that is defined by the developer in `validate_unsigned`.&#xD;&#xA;&#xD;&#xA;Polkadot DOES have use cases for unsigned extrinsics.&#xD;&#xA;&#xD;&#xA;For example, Polkadot used an unsigned extrinsic to allow users that contributed in the Polkadot ICO to claim their initial DOT tokens.&#xD;&#xA;&#xD;&#xA;In this case, we used an unsigned extrinsic for a few reasons:&#xD;&#xA;&#xD;&#xA; * To support a secp256k1 Ethereum signature, instead of the sr25519 / ed25519 signature that Polkadot would normally expect. A secp256k1 signed extrinsic would be invalid by default on Polkadot.&#xD;&#xA; * To support a feeless transaction for those initial DOT claims. It wouldn't be very friendly if users had to first buy DOT to pay for the transaction to claim their DOT. In this case, to solve the chicken and egg problem, we allowed users one free transaction to claim their DOT token in this way.&#xD;&#xA;* To add the additional verification logic so that users could not abuse this transaction to spam the chain, and in result only allowing one transaction of this kind from each user.&#xD;&#xA;&#xD;&#xA;In the case of the I'm Online pallet, we use an Unsigned Extrinsic because the nodes use a custom signing key which is rotated often and managed by the node. These keys are not expected to have any funds behind them, and we don't necessarily assume a specific cryptography used, and thus we take advantage of unsigned extrinsics in this way." ContentLicense="CC BY-SA 4.0" />
  <row Id="8343" PostHistoryTypeId="2" PostId="2237" RevisionGUID="4ee61e6f-b41a-44ed-af15-7f506ecdfb4f" CreationDate="2022-04-28T15:45:30.477" UserId="2102" Text="I know that transactions require certain fees to ensure the correctness of the network, but i was wondering if it is possible to do the reverse operation. I want to give users that send transactions Balance." ContentLicense="CC BY-SA 4.0" />
  <row Id="8345" PostHistoryTypeId="1" PostId="2237" RevisionGUID="4ee61e6f-b41a-44ed-af15-7f506ecdfb4f" CreationDate="2022-04-28T15:45:30.477" UserId="2102" Text="Is it possible to give Balance for transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8346" PostHistoryTypeId="3" PostId="2237" RevisionGUID="4ee61e6f-b41a-44ed-af15-7f506ecdfb4f" CreationDate="2022-04-28T15:45:30.477" UserId="2102" Text="|substrate-node|pallet|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8347" PostHistoryTypeId="5" PostId="2195" RevisionGUID="b247d8fa-9d37-4945-8501-45656872f89a" CreationDate="2022-04-28T15:52:33.590" UserId="2442" Comment="added 172 characters in body; edited title" Text="I have the following struct, where Characters is the [newtype idiom][1] around `Vec&lt;u8&gt;`.&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)]&#xD;&#xA;    pub struct OperationData {&#xD;&#xA;      config: BTreeMap&lt;Characters, Vec&lt;Characters&gt;&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now, If I submit an extrinsic call to save such structure:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      config: { hasher: [ 'Sha2_256', 'Blake3_256' ] },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The structure is stored correctly but upon reading (for instance in polkadot ui) I get:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      config: {&#xD;&#xA;        0x686173686572: [&#xD;&#xA;          Sha2_256&#xD;&#xA;          Blake3_256&#xD;&#xA;        ]&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It appears that the call to `Struct.toHuman()` does not attempt any conversion of the UTF-8 hex-encoded bytes of the key of the map entry:&#xD;&#xA;&#xD;&#xA;    h  a  s  h  e  r&#xD;&#xA;    68 61 73 68 65 72&#xD;&#xA;&#xD;&#xA;*It does, however, decode the bytes inside the value of the map entry.*&#xD;&#xA;&#xD;&#xA;Is there a way to indicate the decoder to decode the map entry keys as well?&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/rust-by-example/generics/new_types.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="8348" PostHistoryTypeId="4" PostId="2195" RevisionGUID="b247d8fa-9d37-4945-8501-45656872f89a" CreationDate="2022-04-28T15:52:33.590" UserId="2442" Comment="added 172 characters in body; edited title" Text="Decode Map keys in call to Struct.toHuman()" ContentLicense="CC BY-SA 4.0" />
  <row Id="8349" PostHistoryTypeId="5" PostId="2195" RevisionGUID="caaf678f-7347-4a52-8ccf-6d3e12360c97" CreationDate="2022-04-28T16:07:56.037" UserId="2442" Comment="added 77 characters in body; edited tags" Text="I have the following struct, where Characters is the [newtype idiom][1] around `Vec&lt;u8&gt;`.&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)]&#xD;&#xA;    pub struct OperationData {&#xD;&#xA;      config: BTreeMap&lt;Characters, Vec&lt;Characters&gt;&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Now, If I submit an extrinsic call to save such structure:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      config: { hasher: [ 'Sha2_256', 'Blake3_256' ] },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The structure is stored correctly but upon reading (for instance in polkadot ui) I get:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      config: {&#xD;&#xA;        0x686173686572: [&#xD;&#xA;          Sha2_256&#xD;&#xA;          Blake3_256&#xD;&#xA;        ]&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It appears that the call to `Struct.toHuman()` does not attempt any conversion of the UTF-8 hex-encoded bytes of the key of the map entry:&#xD;&#xA;&#xD;&#xA;    h  a  s  h  e  r&#xD;&#xA;    68 61 73 68 65 72&#xD;&#xA;&#xD;&#xA;*It does, however, decode the bytes inside the value of the map entry.*&#xD;&#xA;&#xD;&#xA;Is there a way to indicate the decoder to decode the map entry keys as well? Any good reason why Map keys are disregarded despite their type association?&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/rust-by-example/generics/new_types.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="8350" PostHistoryTypeId="6" PostId="2195" RevisionGUID="caaf678f-7347-4a52-8ccf-6d3e12360c97" CreationDate="2022-04-28T16:07:56.037" UserId="2442" Comment="added 77 characters in body; edited tags" Text="|polkadot-js|btreemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8351" PostHistoryTypeId="2" PostId="2238" RevisionGUID="30464a3e-431c-41d9-a0b1-535f4f02614d" CreationDate="2022-04-28T16:28:00.473" UserId="2314" Text="my example looks like this :&#xD;&#xA;&#xD;&#xA;    #[ink(extension = 1111]&#xD;&#xA;    fn asset_name(asset_id: u32) -&gt; Result&lt;[u8], PalletAssetErr&gt;&#xD;&#xA;&#xD;&#xA;or this&#xD;&#xA;&#xD;&#xA;    fn asset_name(asset_id: u32) -&gt; Result&lt;[u8], PalletAssetErr&gt; {&#xD;&#xA;            ::ink_env::chain_extension::ChainExtensionMethod::build(1111u32)&#xD;&#xA;                .input::&lt;u32&gt;()&#xD;&#xA;                .output::&lt;[u8]&gt;()&#xD;&#xA;                .handle_error_code::&lt;PalletAssetErr&gt;()&#xD;&#xA;                .call(&amp;asset_id)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and I got this error&#xD;&#xA;&#xD;&#xA;&gt; Result&lt;[u8], PalletAssetErr&gt; doesn't have a size known at compile-time&#xD;&#xA;&#xD;&#xA;because [u8] has unknown size at compile time...&#xD;&#xA;&#xD;&#xA;How to get dynamic size data on smart contract side? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8353" PostHistoryTypeId="1" PostId="2238" RevisionGUID="30464a3e-431c-41d9-a0b1-535f4f02614d" CreationDate="2022-04-28T16:28:00.473" UserId="2314" Text="How to retrieve dynamic type size data from chain extension in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8354" PostHistoryTypeId="3" PostId="2238" RevisionGUID="30464a3e-431c-41d9-a0b1-535f4f02614d" CreationDate="2022-04-28T16:28:00.473" UserId="2314" Text="|ink|smart-contract|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8355" PostHistoryTypeId="5" PostId="2137" RevisionGUID="fa925085-fd53-49a5-8f6b-ebda23b89283" CreationDate="2022-04-28T16:31:27.173" UserId="178" Comment="added 1 character in body" Text="# Shawn Tabrizi&#xD;&#xA;&#xD;&#xA;I am core developer and community contributor of the Substrate and Polkadot ecosystem. I am passionate about the success of developers trying to build the future of Web3 with these technologies.&#xD;&#xA;&#xD;&#xA;I work at Parity Technologies, the company that originally created these products. I lead the FRAME team and the Documentation / Developer Experience team.&#xD;&#xA;&#xD;&#xA;User feedback is critical to me to improve FRAME, so a role like moderating the Stack Exchange would already be a natural part of my daily activities. I also want to take the opportunity to find ways for the SE and documentation facilitate one another, ultimately leading to more users being successful in our ecosystem.&#xD;&#xA;&#xD;&#xA;I have been an active contributor in the past on Stack Overflow and the Ethereum Stack Exchange. I was the one who initially proposed this Substrate and Polkadot Stack Exchange. I have also been the single highest contributor to dedicated Substrate and Polkadot support channels predating this SE community.&#xD;&#xA;&#xD;&#xA;If I were to be voted into this role, you should know that I will spend all my energy driving forward the success of developers and users, and by extension the success of this community." ContentLicense="CC BY-SA 4.0" />
  <row Id="8356" PostHistoryTypeId="5" PostId="2135" RevisionGUID="6a95c7bd-3c25-4db1-a68b-be7c470c3f9b" CreationDate="2022-04-28T16:31:52.850" UserId="178" Comment="added 16 characters in body" Text="# Luke Schoen &#xD;&#xA;&#xD;&#xA;Luke Schoen might not get things right and might not be the best coder but he's loyal and tries hard and he'll stick around to make the community that's nurtured him a success" ContentLicense="CC BY-SA 4.0" />
  <row Id="8357" PostHistoryTypeId="52" PostId="2210" RevisionGUID="f693df19-fa01-4ab2-94a0-833fb532bd3f" CreationDate="2022-04-28T16:45:29.417" />
  <row Id="8358" PostHistoryTypeId="2" PostId="2239" RevisionGUID="39bbf930-febd-4957-bcea-1a042f84306b" CreationDate="2022-04-28T16:54:21.910" UserId="170" Text="As the error suggests, the size has to be known at compilation time. So, either sized arrays, or `ink_prelude::vec::Vec` is what you need." ContentLicense="CC BY-SA 4.0" />
  <row Id="8360" PostHistoryTypeId="52" PostId="2216" RevisionGUID="f94d1e28-609c-4db2-84ee-d50955daec68" CreationDate="2022-04-28T17:23:03.300" />
  <row Id="8361" PostHistoryTypeId="2" PostId="2240" RevisionGUID="458028ef-6f84-4084-88ec-21d4e2cd17ef" CreationDate="2022-04-28T17:44:22.257" UserId="3" Text="I can't find anything on how to use the compact encoding of integers with `Option&lt;...&gt;`. Is this possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8363" PostHistoryTypeId="1" PostId="2240" RevisionGUID="458028ef-6f84-4084-88ec-21d4e2cd17ef" CreationDate="2022-04-28T17:44:22.257" UserId="3" Text="Can SCALE compact encoding be used with `Option&lt;T&gt;`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8364" PostHistoryTypeId="3" PostId="2240" RevisionGUID="458028ef-6f84-4084-88ec-21d4e2cd17ef" CreationDate="2022-04-28T17:44:22.257" UserId="3" Text="|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8365" PostHistoryTypeId="2" PostId="2241" RevisionGUID="c336d7de-48dd-443b-a419-8571e7198d6b" CreationDate="2022-04-28T19:41:19.617" UserId="2447" Text="maybe a silly question... Is possible to query a balance using a HTTP call like eth_getBalance? I need a raw http call, like one that i can perform with curl.&#xD;&#xA;&#xD;&#xA;I looked the methods that polkadot RPC API expose but none of them query the balance. Also i already know that we have polkadot-js but i need to make a normal HTTP call as I said before.&#xD;&#xA;&#xD;&#xA;Thanks guys!" ContentLicense="CC BY-SA 4.0" />
  <row Id="8367" PostHistoryTypeId="1" PostId="2241" RevisionGUID="c336d7de-48dd-443b-a419-8571e7198d6b" CreationDate="2022-04-28T19:41:19.617" UserId="2447" Text="Query account balance with HTTP calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="8368" PostHistoryTypeId="3" PostId="2241" RevisionGUID="c336d7de-48dd-443b-a419-8571e7198d6b" CreationDate="2022-04-28T19:41:19.617" UserId="2447" Text="|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8369" PostHistoryTypeId="2" PostId="2242" RevisionGUID="58b03cf5-bd50-4a37-bfa5-36ac092692bd" CreationDate="2022-04-28T20:31:13.440" UserId="45" Text="Yes, this is possible.&#xD;&#xA;&#xD;&#xA;In the general case, the SCALE encoding of `Option&lt;T&gt;` is:&#xD;&#xA;&#xD;&#xA;- In case of `None`, the byte `0x00` and&#xD;&#xA;- In case of `Some(T)`, the byte `0x01` followed by the encoding of the value `T`.&#xD;&#xA;&#xD;&#xA;So for example, `Some(32u8)` will be encoded as `0x01 0x20`.&#xD;&#xA;&#xD;&#xA;This is specified in the SCALE encoding [page](https://docs.substrate.io/v3/advanced/scale-codec/#options)." ContentLicense="CC BY-SA 4.0" />
  <row Id="8373" PostHistoryTypeId="2" PostId="2244" RevisionGUID="77bc16f7-0733-4ab3-95ba-619296f1282d" CreationDate="2022-04-28T20:41:18.450" UserId="45" Text="I think `state_version` is related to migration to a new version of the representation of the key-value trie. I think if you start a new chain, it's better to use the latest version from the start. At the moment of writing, I think it's the version 1.&#xD;&#xA;&#xD;&#xA;Changing `transaction_version` is just a way to communicate that the transaction/extrinsic became incompatible with another version. For example, in case you change parameters of a dispatchable to something else, you will need to bump the `transaction_version` or else a user sent transaction might be misinterpreted.&#xD;&#xA;&#xD;&#xA;And, btw, those are not related to Cumulus but rather are coming from Substrate.&#xD;&#xA;&#xD;&#xA;See documentation to those methods [here](https://github.com/paritytech/substrate/blob/88731ed619f6be1280f01cc8f02f10e2fb4cf199/primitives/version/src/lib.rs#L201-L214)." ContentLicense="CC BY-SA 4.0" />
  <row Id="8375" PostHistoryTypeId="2" PostId="2245" RevisionGUID="f062c067-0b06-42b5-b896-76d35e93a955" CreationDate="2022-04-28T20:52:09.263" UserId="245" Text="I had the same issue and it answered [here][1]. You need to add one more param for `Option&lt;BlockHash&gt;` &#xD;&#xA;&#xD;&#xA;I believe you can try this,&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;items_getItemById&quot;, &quot;params&quot;: [null, 1234321] }' http://localhost:9933&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/607/245" ContentLicense="CC BY-SA 4.0" />
  <row Id="8377" PostHistoryTypeId="5" PostId="2242" RevisionGUID="2954ef74-a381-4bc8-99be-01d981475302" CreationDate="2022-04-28T21:01:33.263" UserId="45" Comment="Added a compact example." Text="Yes, this is possible.&#xD;&#xA;&#xD;&#xA;In the general case, the SCALE encoding of `Option&lt;T&gt;` is:&#xD;&#xA;&#xD;&#xA;- In case of `None`, the byte `0x00` and&#xD;&#xA;- In case of `Some(T)`, the byte `0x01` followed by the encoding of the value `T`.&#xD;&#xA;&#xD;&#xA;So for example, `Some(32u8)` will be encoded as `0x01 0x20`. &#xD;&#xA;&#xD;&#xA;If `T` is a compact integer, then it would simply use a compact encoding. E.g. `Some(Compact(65535))` would be encoded as `0x01 0xfe 0xff 0x03 0x00` according to [this](https://docs.substrate.io/v3/advanced/scale-codec/#compactgeneral-integers).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is specified in the SCALE encoding [page](https://docs.substrate.io/v3/advanced/scale-codec/#options)." ContentLicense="CC BY-SA 4.0" />
  <row Id="8378" PostHistoryTypeId="5" PostId="2197" RevisionGUID="ab74a36b-0626-481d-9400-59149a79e8dc" CreationDate="2022-04-28T21:45:02.417" UserId="2283" Comment="added 132 characters in body" Text="Do I have to manually Serialize/Deserialize BoundedVec?&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;There was no implementation, so I'm coding one [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/11314" ContentLicense="CC BY-SA 4.0" />
  <row Id="8379" PostHistoryTypeId="5" PostId="2231" RevisionGUID="4a4e9d7f-d073-4b72-b89c-9cec17f174c2" CreationDate="2022-04-28T22:50:18.727" UserId="29" Comment="added 291 characters in body" Text="That is correct - with a signed transaction [there is validation](https://docs.substrate.io/v3/concepts/tx-pool/#validity) to check the nonce, make sure the user has enough to pay for the fee, and check if the signature is valid. With an unsigned transaction you get none of this. It is up to the runtime engineer to construct their own logic such as spam prevention and create *checks* for what they consider is an invalid transaction (or valid transaction).&#xD;&#xA;&#xD;&#xA;As an example of creating such logic, in the [I'm Online pallet](https://github.com/paritytech/substrate/tree/master/frame/im-online) there is a function [`validate_unsigned`](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L551) that has a number of checks:&#xD;&#xA;1. [Check if we have already received a &quot;heartbeat&quot; from this authority](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L553)&#xD;&#xA;2. [Check to see if the session index is the same](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L558)&#xD;&#xA;3. [Verify that the transaction is coming from a valid authority](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L564)&#xD;&#xA;4. [Check that the signature is valid](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L574)&#xD;&#xA;&#xD;&#xA;**Why use an unsigned transaction?**&#xD;&#xA;&#xD;&#xA;Sometimes there are other ways to prove that a transaction is valid for your use case. If you can validate a transaction through some other means then it can open up possibilities to do things that would not be as efficient with a signed transaction such as system calls. For example, validators that need to submit a transaction to the chain such as [extrinsics that are generated on a node](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/babe/src/equivocation.rs#L183) or [produced by an off-chain worker](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/examples/offchain-worker/src/lib.rs#L301). The accounts generating these transactions do not typically hold funds and yet via unsigned transactions and checking where the transaction comes from either via the `TransactionSource` or against a signature, these nodes can submit extrinsics to the chain. Another point here to make is that a typical good use cases for signed transactions is if you want to record the associated caller of the transaction and in the case of system calls we often do not have a need for such, we only want to make sure that the call is coming from a valid source.&#xD;&#xA;&#xD;&#xA;If you can cover all checks for validation for the unsigned transaction that you are implementing in your runtime, then there can be a lot of value in working with unsigned transactions. Another example, is to send a proof in the payload and that in combination with your validation could be sufficient for your needs.&#xD;&#xA;&#xD;&#xA;An example of this is to sign a payload with a public key (perhaps an authority key), send it as an unsigned transaction, and have validation to check whether a provided signature matches the public key that was used to sign that payload. There is a nice how-to guide on this [here](https://docs.substrate.io/how-to-guides/v3/ocw/transactions/#sending-unsigned-transactions-with-signed-payloads&#xD;&#xA;). Additionally, the [off-chain worker example](https://github.com/paritytech/substrate/tree/master/frame/examples/offchain-worker) leverages unsigned transactions with a signed payload to [check if the transaction is produced by the off-chain worker](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/examples/offchain-worker/src/lib.rs#L318) and, if so, mark it as valid.&#xD;&#xA;&#xD;&#xA;Keep in mind that regardless if it is signed or unsigned, all transactions pass through [`validate_transaction`](https://docs.substrate.io/rustdocs/latest/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html#method.validate_transaction). This function will do some checks for the validity of a transaction but it will not check if the transactions succeed, therefore as noted [here](https://docs.substrate.io/v3/concepts/tx-pool/#validity) this could be another potential attack vector." ContentLicense="CC BY-SA 4.0" />
  <row Id="8380" PostHistoryTypeId="5" PostId="2231" RevisionGUID="8e735959-e23d-44b7-a1ed-46685969f6b3" CreationDate="2022-04-28T22:58:13.733" UserId="29" Comment="added 291 characters in body" Text="That is correct - with a signed transaction [there is validation](https://docs.substrate.io/v3/concepts/tx-pool/#validity) to check the nonce, make sure the user has enough to pay for the fee, and check if the signature is valid. With an unsigned transaction you get none of this. It is up to the runtime engineer to construct their own logic such as spam prevention and create *checks* for what they consider is an invalid transaction (or valid transaction).&#xD;&#xA;&#xD;&#xA;As an example of creating such logic, in the [I'm Online pallet](https://github.com/paritytech/substrate/tree/master/frame/im-online) there is a function [`validate_unsigned`](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L551) that has a number of checks:&#xD;&#xA;1. [Check if we have already received a &quot;heartbeat&quot; from this authority](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L553)&#xD;&#xA;2. [Check to see if the session index is the same](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L558)&#xD;&#xA;3. [Verify that the transaction is coming from a valid authority](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L564)&#xD;&#xA;4. [Check that the signature is valid](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/im-online/src/lib.rs#L574)&#xD;&#xA;&#xD;&#xA;**Why use an unsigned transaction?**&#xD;&#xA;&#xD;&#xA;Sometimes there are other ways to prove that a transaction is valid for your use case. If you can validate a transaction through some other means then it can open up possibilities to do things that would not be as efficient with a signed transaction such as system calls. For example, validators that need to submit a transaction to the chain such as [extrinsics that are generated on a node](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/frame/babe/src/equivocation.rs#L183) or [produced by an off-chain worker](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/examples/offchain-worker/src/lib.rs#L301). The accounts generating these transactions do not typically hold funds and yet via unsigned transactions and checking where the transaction comes from either via the `TransactionSource` or against a signature, these nodes can submit extrinsics to the chain. Another point here to make is that a typical good use case for signed transactions is if you want to record the associated caller of the transaction and in the case of system calls you often do not have a need for such, you only want to make sure that the call is coming from a valid source. However, if you do have a need to know the caller there is a way to do this with unsigned transactions with a signed payload. Sometimes this is desired if you want to record the associated transaction caller, but do not want the caller be responsible for the transaction fee payment.&#xD;&#xA;&#xD;&#xA;If you can cover all checks for validation for the unsigned transaction that you are implementing in your runtime, then there can be a lot of value in working with unsigned transactions. Another example, is to send a proof in the payload and that in combination with your validation could be sufficient for your needs.&#xD;&#xA;&#xD;&#xA;An example of this is to sign a payload with a public key (perhaps an authority key), send it as an unsigned transaction, and have validation to check whether a provided signature matches the public key that was used to sign that payload. There is a nice how-to guide on this [here](https://docs.substrate.io/how-to-guides/v3/ocw/transactions/#sending-unsigned-transactions-with-signed-payloads&#xD;&#xA;). Additionally, the [off-chain worker example](https://github.com/paritytech/substrate/tree/master/frame/examples/offchain-worker) leverages unsigned transactions with a signed payload to [check if the transaction is produced by the off-chain worker](https://github.com/paritytech/substrate/blob/1532b72162240edf0d41ecb39e66e2a1f5a73b6f/frame/examples/offchain-worker/src/lib.rs#L318) and, if so, mark it as valid.&#xD;&#xA;&#xD;&#xA;Keep in mind that regardless if it is signed or unsigned, all transactions pass through [`validate_transaction`](https://docs.substrate.io/rustdocs/latest/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html#method.validate_transaction). This function will do some checks for the validity of a transaction but it will not check if the transactions succeed, therefore as noted [here](https://docs.substrate.io/v3/concepts/tx-pool/#validity) this could be another potential attack vector." ContentLicense="CC BY-SA 4.0" />
  <row Id="8381" PostHistoryTypeId="2" PostId="2246" RevisionGUID="356e342b-75cf-41e2-b9c8-feb4f8df1555" CreationDate="2022-04-29T00:26:47.267" UserId="2448" Text="what is a rpc node and how to build one for a developer, as rpc node information is limited, ? Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="8383" PostHistoryTypeId="1" PostId="2246" RevisionGUID="356e342b-75cf-41e2-b9c8-feb4f8df1555" CreationDate="2022-04-29T00:26:47.267" UserId="2448" Text="Hello, could someone please provide me with some information about the rpc node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8384" PostHistoryTypeId="3" PostId="2246" RevisionGUID="356e342b-75cf-41e2-b9c8-feb4f8df1555" CreationDate="2022-04-29T00:26:47.267" UserId="2448" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8385" PostHistoryTypeId="2" PostId="2247" RevisionGUID="c771d344-92ae-4b9f-9ab3-7897f5d10f27" CreationDate="2022-04-29T01:15:31.843" UserId="549" Text="Currently I am developing a Fat Contract (Native to Phala Network) that also supports Ink Based Smart Contracts to be written within the Fat Contracts which is what my example is doing.&#xD;&#xA;&#xD;&#xA;To describe the problem, I am able to send HTTP requests from my Fat Contract that will return a JSON format response. This is where I get stuck bc in the runtime, I can usually parse the response using `serde`, but `serde` is not able to be used when writing these contracts due to a float being used in the library that causes the contract to get rejected during the upload. Typically this piece of code would be able to parse this response:&#xD;&#xA;```&#xD;&#xA;{&quot;id&quot;:&quot;12196238-420ae612726839da09--DREAMLIKE_BIRD_007-00000007&quot;,&quot;forsale&quot;:0,&quot;owner&quot;:&quot;Gy2SSkZWXq3jHwmSEBSpqVpKN8cWEAECwKnvS7j3srV7sZ9&quot;,&quot;rootowner&quot;:&quot;Gy2SSkZWXq3jHwmSEBSpqVpKN8cWEAECwKnvS7j3srV7sZ9&quot;,&quot;collectionId&quot;:&quot;420ae612726839da09-&quot;,&quot;metadata&quot;:&quot;ipfs://ipfs/bafkreiduurl6jkqxqx3h5nhmegdkxq2smq7hbmbaryaudrz2xw563xtrza&quot;,&quot;sn&quot;:&quot;00000007&quot;,&quot;updated_at&quot;:&quot;2022-04-18T05:53:02.409768+00:00&quot;,&quot;image&quot;:&quot;https://kanaria-img.rmrk.link/1650261182409/jpeg/12196238-420ae612726839da09--DREAMLIKE_BIRD_007-00000007.jpg&quot;}&#xD;&#xA;```&#xD;&#xA;With this piece of code:&#xD;&#xA;```&#xD;&#xA;let response = http_get!(api_url);&#xD;&#xA;if response.status_code != 200 {&#xD;&#xA;    return Err(Error::TokenValidationFailed);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;let body = response.body;&#xD;&#xA;let json_body = json!(body);&#xD;&#xA;let rmrk_nft: RmrkNft =&#xD;&#xA;    serde_json::from_value(json_body).or(Err(Error::TokenValidationFailed))?;&#xD;&#xA;```&#xD;&#xA;Where `RmrkNft` struct is defined as:&#xD;&#xA;```&#xD;&#xA;/// RMRK NFT structure&#xD;&#xA;#[derive(Deserialize, Debug, Eq, PartialEq)]&#xD;&#xA;pub struct RmrkNft {&#xD;&#xA;    id: String,&#xD;&#xA;    metadata: String,&#xD;&#xA;    image: String,&#xD;&#xA;    rootowner: String,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;My question is if there is an alternative to `serde` that will allow me to parse the JSON response from my HTTP request to be able to load into my `RmrkNft` struct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8387" PostHistoryTypeId="1" PostId="2247" RevisionGUID="c771d344-92ae-4b9f-9ab3-7897f5d10f27" CreationDate="2022-04-29T01:15:31.843" UserId="549" Text="Parsing JSON in ink based Smart Contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="8388" PostHistoryTypeId="3" PostId="2247" RevisionGUID="c771d344-92ae-4b9f-9ab3-7897f5d10f27" CreationDate="2022-04-29T01:15:31.843" UserId="549" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8389" PostHistoryTypeId="2" PostId="2248" RevisionGUID="757f2d4c-e023-4b10-bccc-3f4d57636a69" CreationDate="2022-04-29T01:17:58.523" UserId="29" Text="I often see the two words used interchangeably. This has led me to read the docs:&#xD;&#xA;&#xD;&#xA;&gt; Extrinsics fall into three categories: inherents, signed transactions, and unsigned transactions.&#xD;&#xA;- https://docs.substrate.io/v3/concepts/extrinsics&#xD;&#xA;&#xD;&#xA;&gt; **extrinsic**&#xD;&#xA;&gt;&#xD;&#xA;&gt; Data that is external to the blockchain and included in a block. In&#xD;&#xA;&gt; general, there are two types of extrinsics:&#xD;&#xA;&gt; &#xD;&#xA;&gt; - signed or unsigned transactions.&#xD;&#xA;&gt; - inherents inserted by block authors.&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/glossary/#extrinsic&#xD;&#xA;&#xD;&#xA;&gt; **transaction**&#xD;&#xA;&gt;&#xD;&#xA;&gt; A type of extrinsic that can be safely gossiped between nodes on the network because it can be verified through signatures or signed extensions.&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/glossary/#transaction&#xD;&#xA;&#xD;&#xA;What is the difference between an extrinsic and a transaction? Is a transaction an extrinsic?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8391" PostHistoryTypeId="1" PostId="2248" RevisionGUID="757f2d4c-e023-4b10-bccc-3f4d57636a69" CreationDate="2022-04-29T01:17:58.523" UserId="29" Text="Is a transaction an extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8392" PostHistoryTypeId="3" PostId="2248" RevisionGUID="757f2d4c-e023-4b10-bccc-3f4d57636a69" CreationDate="2022-04-29T01:17:58.523" UserId="29" Text="|extrinsic|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8394" PostHistoryTypeId="2" PostId="2249" RevisionGUID="5f85e809-d1c1-4cb8-bffd-3c73de01b0f4" CreationDate="2022-04-29T01:17:58.523" UserId="29" Text="Broadly speaking an extrinsic is data that is external to the blockchain that is included in a block - think of the extrinsic root in a block with all its children ([example](https://explorer.polkascan.io/kusama/block/12457588)). You can think of an extrinsic as a broader term to encompass, as the definition says, [inherents](https://docs.substrate.io/v3/concepts/extrinsics/#inherents), signed transactions, and unsigned transactions - these are all types of extrinsics - these are all external *proposed* runtime calls.&#xD;&#xA;&#xD;&#xA;**Is a transaction an extrinsic?**&#xD;&#xA;&#xD;&#xA;&gt; Yes, in the same sense that a rose is a flower.&#xD;&#xA;&#xD;&#xA;A transaction is a type of extrinsic.&#xD;&#xA;&#xD;&#xA;**Bonus: Why is it called transaction pool and not extrinsic pool?**&#xD;&#xA;&#xD;&#xA;Only transactions (`signed` and `unsigned`) are included in the transaction pool. Inherents, which is another type of extrinsic, are never included in the transaction pool and instead are inserted into the block by the block authors." ContentLicense="CC BY-SA 4.0" />
  <row Id="8395" PostHistoryTypeId="5" PostId="2246" RevisionGUID="e310bef2-389b-4613-aa56-919dc38a314c" CreationDate="2022-04-29T01:26:01.610" UserId="29" Comment="A bit more clear, hopefully this is what the author intended.; edited tags; edited tags" Text="What is a RPC node and how to build one as a developer. &#xD;&#xA;&#xD;&#xA;Also, are there any resources available?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8396" PostHistoryTypeId="4" PostId="2246" RevisionGUID="e310bef2-389b-4613-aa56-919dc38a314c" CreationDate="2022-04-29T01:26:01.610" UserId="29" Comment="A bit more clear, hopefully this is what the author intended.; edited tags; edited tags" Text="What is an RPC node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8397" PostHistoryTypeId="6" PostId="2246" RevisionGUID="e310bef2-389b-4613-aa56-919dc38a314c" CreationDate="2022-04-29T01:26:01.610" UserId="29" Comment="A bit more clear, hopefully this is what the author intended.; edited tags; edited tags" Text="|polkadot|rpc|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8398" PostHistoryTypeId="2" PostId="2250" RevisionGUID="e9a772c2-a127-470a-b943-c88faa686c0f" CreationDate="2022-04-29T02:06:44.387" UserId="29" Text="![](https://i.stack.imgur.com/OyAvW.png)&#xD;&#xA;&#xD;&#xA;Remote Procedure Calls, or RPCs, are a way for an external program (eg. [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc)) to make calls to a Substrate node or another way of saying this is that RPC's is a way to allow the outside world to communicate with our blockchain.&#xD;&#xA;&#xD;&#xA;When you run a Substrate node you can expose an HTTP or WebSocket RPC server via a TCP port. You can also specify whether you want to expose all RPC methods from your node or only those deemed as *safe*.&#xD;&#xA;&#xD;&#xA;Substrate nodes use [JSON-RPC](https://github.com/paritytech/jsonrpc) which is defined as:&#xD;&#xA;&#xD;&#xA;&gt; A stateless, lightweight remote procedure call protocol that is&#xD;&#xA;&gt; encoded in JSON. JSON-RPC provides a standard way to call functions on&#xD;&#xA;&gt; a remote system by using JavaScript Object Notation.&#xD;&#xA;&#xD;&#xA;Substrate exposes metadata that is organized per pallet on your chain. This metadata is automatically generated by Substrate and available via RPC. With this metadata you can know what RPC methods are available per pallet. This is how [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc) generates [its api](https://polkadot.js.org/docs/substrate/rpc/).&#xD;&#xA;&#xD;&#xA;If you want to learn more I recommend you follow [this](https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain) tutorial and when you successfully run your Substrate node, try running it with the following command: `cargo run -- --help` and scroll up and see all the available RPC flags and options that are available to use.&#xD;&#xA;&#xD;&#xA;Also, open [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc) and poke around to see all the available RPC calls available on Polkadot.&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;Try running this CURL command from your terminal:&#xD;&#xA;```sh&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;}' https://polkadot-rpc.dwellir.com&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in essence when you're running a node:&#xD;&#xA;```sh&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name Node01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As shown above, it is common to have a subset of your nodes run an RPC server so that the outside world can communicate with your blockchain.&#xD;&#xA;&#xD;&#xA;References &amp; Resources&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/architecture&#xD;&#xA;- https://docs.substrate.io/v3/runtime/custom-rpcs&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/glossary/#json-rpc&#xD;&#xA;- https://docs.substrate.io/v3/runtime/metadata/&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8400" PostHistoryTypeId="6" PostId="2179" RevisionGUID="13bbec4d-96e7-46c1-8ed1-bbdd84302fe3" CreationDate="2022-04-29T02:27:41.887" UserId="29" Comment="edited tags" Text="|extrinsic|transactions|pallet-imonline|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8401" PostHistoryTypeId="5" PostId="2250" RevisionGUID="73454eea-3cbb-47c1-95b5-c2cb125502e0" CreationDate="2022-04-29T02:39:51.690" UserId="29" Comment="added 76 characters in body" Text="![](https://i.stack.imgur.com/OyAvW.png)&#xD;&#xA;&#xD;&#xA;Remote Procedure Calls, or RPCs, are a way for an external program (eg. [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc)) to make calls to a Substrate node or another way of saying this is that RPC's is a way to allow the outside world to communicate with our blockchain.&#xD;&#xA;&#xD;&#xA;When you run a Substrate node you can expose an HTTP or WebSocket RPC server via a TCP port. You can also specify whether you want to expose all RPC methods from your node or only those deemed as *safe*.&#xD;&#xA;&#xD;&#xA;Substrate nodes use [JSON-RPC](https://github.com/paritytech/jsonrpc) which is defined as:&#xD;&#xA;&#xD;&#xA;&gt; A stateless, lightweight remote procedure call protocol that is&#xD;&#xA;&gt; encoded in JSON. JSON-RPC provides a standard way to call functions on&#xD;&#xA;&gt; a remote system by using JavaScript Object Notation.&#xD;&#xA;&#xD;&#xA;Substrate exposes metadata that is organized per pallet on your chain. This metadata is automatically generated by Substrate and available via RPC. With this metadata you can know what RPC methods are available per pallet. This is how [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc) generates [its api](https://polkadot.js.org/docs/substrate/rpc/).&#xD;&#xA;&#xD;&#xA;If you want to learn more I recommend you follow [this](https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain) tutorial and when you successfully run your Substrate node, try running it with the following command: `cargo run -- --help` and scroll up and see all the available RPC flags and options that are available to use.&#xD;&#xA;&#xD;&#xA;Also, open [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc) and poke around to see all the available RPC calls available on Polkadot.&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;Try running this CURL command from your terminal:&#xD;&#xA;```sh&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;}' https://polkadot-rpc.dwellir.com&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in essence when you're running a node:&#xD;&#xA;```sh&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name Node01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As shown above, it is common to have a subset of your nodes run an RPC server so that the outside world can communicate with your blockchain.&#xD;&#xA;&#xD;&#xA;References &amp; Resources&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/architecture&#xD;&#xA;- https://docs.substrate.io/v3/runtime/custom-rpcs&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/glossary/#json-rpc&#xD;&#xA;- https://docs.substrate.io/v3/runtime/metadata&#xD;&#xA;- https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8402" PostHistoryTypeId="5" PostId="2246" RevisionGUID="f821ed88-6700-47b2-98f2-bd9e31bcc6f0" CreationDate="2022-04-29T02:43:17.210" UserId="29" Comment="added 1 character in body" Text="What is an RPC node and how to build one as a developer. &#xD;&#xA;&#xD;&#xA;Also, are there any resources available?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8403" PostHistoryTypeId="5" PostId="2250" RevisionGUID="ceab0fb3-5026-4a08-8d2d-91239dbae1c2" CreationDate="2022-04-29T02:48:40.247" UserId="29" Comment="added 110 characters in body" Text="![](https://i.stack.imgur.com/OyAvW.png)&#xD;&#xA;&#xD;&#xA;Remote Procedure Calls, or RPCs, are a way for an external program (eg. [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc)) to make calls to a Substrate node or another way of saying this is that RPC's is a way to allow the outside world to communicate with our blockchain.&#xD;&#xA;&#xD;&#xA;When you run a Substrate node you can expose an HTTP or WebSocket RPC server via a TCP port. You can also specify whether you want to expose all RPC methods from your node or only those deemed as *safe*.&#xD;&#xA;&#xD;&#xA;Substrate nodes use [JSON-RPC](https://github.com/paritytech/jsonrpc) which is defined as:&#xD;&#xA;&#xD;&#xA;&gt; A stateless, lightweight remote procedure call protocol that is&#xD;&#xA;&gt; encoded in JSON. JSON-RPC provides a standard way to call functions on&#xD;&#xA;&gt; a remote system by using JavaScript Object Notation.&#xD;&#xA;&#xD;&#xA;Substrate exposes metadata that is organized per pallet on your chain. This metadata is automatically generated by Substrate and available via RPC. With this metadata you can know what RPC methods are available per pallet. This is how [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc) generates [its api](https://polkadot.js.org/docs/substrate/rpc/).&#xD;&#xA;&#xD;&#xA;If you want to learn more I recommend you follow [this](https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain) tutorial and when you successfully run your Substrate node, try running it with the following command: `cargo run -- --help` and scroll up and see all the available RPC flags and options that are available to use.&#xD;&#xA;&#xD;&#xA;Also, open [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc) and poke around to see all the available RPC calls available on Polkadot.&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;Try running this CURL command from your terminal:&#xD;&#xA;```sh&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;}' https://polkadot-rpc.dwellir.com&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in essence when you're running a node:&#xD;&#xA;```sh&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name Node01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As shown above, it is common to have a subset of your nodes run an RPC server so that the outside world can communicate with your blockchain. In this example, port `9933` is running an HTTP RPC server and port `9945` is running a WebSocket RPC server.&#xD;&#xA;&#xD;&#xA;WebSockets are nice because you can subscribe to them and receive live push notifications when what you're subscribed to changes.&#xD;&#xA;&#xD;&#xA;References &amp; Resources&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/architecture&#xD;&#xA;- https://docs.substrate.io/v3/runtime/custom-rpcs&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/glossary/#json-rpc&#xD;&#xA;- https://docs.substrate.io/v3/runtime/metadata&#xD;&#xA;- https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8404" PostHistoryTypeId="5" PostId="2250" RevisionGUID="90683a22-5620-4631-b747-2200ab672370" CreationDate="2022-04-29T03:05:41.190" UserId="29" Comment="added 262 characters in body" Text="![](https://i.stack.imgur.com/OyAvW.png)&#xD;&#xA;&#xD;&#xA;Remote Procedure Calls, or RPCs, are a way for an external program (eg. [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc)) to make calls to a Substrate node or another way of saying this is that RPC's is a way to allow the outside world to communicate with our blockchain.&#xD;&#xA;&#xD;&#xA;When you run a Substrate node you can expose an HTTP or WebSocket RPC server via a TCP port. You can also specify whether you want to expose all RPC methods from your node or only those deemed as *safe*.&#xD;&#xA;&#xD;&#xA;Substrate nodes use [JSON-RPC](https://github.com/paritytech/jsonrpc) which is defined as:&#xD;&#xA;&#xD;&#xA;&gt; A stateless, lightweight remote procedure call protocol that is&#xD;&#xA;&gt; encoded in JSON. JSON-RPC provides a standard way to call functions on&#xD;&#xA;&gt; a remote system by using JavaScript Object Notation.&#xD;&#xA;&#xD;&#xA;Substrate exposes metadata that is organized per pallet on your chain. This metadata is automatically generated by Substrate and available via RPC. This metadata reveals information about the storage items, extrinsic calls, events, constants, and errors available per pallet. This is how [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc) generates [its api](https://polkadot.js.org/docs/substrate).&#xD;&#xA;&#xD;&#xA;One of the most important RPCs is `rpc_methods`. This RPC shows all the RPC methods that are available on that particular node.&#xD;&#xA;&#xD;&#xA;You can call this RPC on the Polkadot network by running the following curl command in your terminal:&#xD;&#xA;```sh&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;}' https://polkadot-rpc.dwellir.com&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Another way is to this is by opening [polkadot{.js} apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/rpc) and poke around to see all the available RPC calls that are available on Polkadot.&#xD;&#xA;&#xD;&#xA;If you want to learn more I recommend you follow [this](https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain) tutorial and when you successfully run your Substrate node, try running it with the following command: `cargo run -- --help` and scroll up and see all the available RPC flags and options that are available to use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So in essence when you're running a node:&#xD;&#xA;```sh&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name Node01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As shown above, it is common to have a subset of your nodes run an RPC server so that the outside world can communicate with your blockchain. In this example, port `9933` is running an HTTP RPC server and port `9945` is running a WebSocket RPC server.&#xD;&#xA;&#xD;&#xA;WebSockets are nice because you can subscribe to them and receive live push notifications when what you're subscribed to changes.&#xD;&#xA;&#xD;&#xA;References &amp; Resources&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/architecture&#xD;&#xA;- https://docs.substrate.io/v3/runtime/custom-rpcs&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/glossary/#json-rpc&#xD;&#xA;- https://docs.substrate.io/v3/runtime/metadata&#xD;&#xA;- https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8405" PostHistoryTypeId="2" PostId="2251" RevisionGUID="d9bb14c5-e0f0-430b-af7a-fbb798787841" CreationDate="2022-04-29T03:06:17.603" UserId="29" Text="There is actually a detailed tutorial on this:&#xD;&#xA;- https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8407" PostHistoryTypeId="5" PostId="2251" RevisionGUID="71a53760-ca7c-4b4d-85c2-0deb965544c4" CreationDate="2022-04-29T03:53:42.077" UserId="29" Comment="added 917 characters in body" Text="Here is a simple example of getting Polkadot's total issuance:&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getStorage&quot;, &quot;params&quot;: [&quot;0xc2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80&quot;]}' https://polkadot-rpc.dwellir.com&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x3a39574d0bd4e0a40000000000000000&quot;,&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There is actually a detailed tutorial on this:&#xD;&#xA;- https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc&#xD;&#xA;&#xD;&#xA;Keep in mind that in the tutorial Shawn is querying the storage for the balances pallet. In Polkadot, account balance is stored in the system pallet. You can get the user's account balance via `system &gt; account` but what you will get back in your response is the SCALE encoded version of a data structure that looks something like this:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  nonce: 26&#xD;&#xA;  consumers: 3&#xD;&#xA;  providers: 1&#xD;&#xA;  sufficients: 0&#xD;&#xA;  data: {&#xD;&#xA;    free: 12,082,294,213,399&#xD;&#xA;    reserved: 0&#xD;&#xA;    miscFrozen: 11,099,882,066,510&#xD;&#xA;    feeFrozen: 11,099,882,066,510&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8408" PostHistoryTypeId="2" PostId="2252" RevisionGUID="3db3d9cb-26d7-407f-a855-2afec4690de6" CreationDate="2022-04-29T04:41:09.770" UserId="2339" Text="In default [Substrate-Node-Template](https://github.com/substrate-developer-hub/substrate-node-template) I want to make some actions inside **validate_transaction** function which is located in runtime/src/lib.rs:&#xD;&#xA;```&#xD;&#xA;fn validate_transaction(&#xD;&#xA;            source: TransactionSource,&#xD;&#xA;            tx: &lt;Block as BlockT&gt;::Extrinsic,&#xD;&#xA;            block_hash: &lt;Block as BlockT&gt;::Hash,&#xD;&#xA;        ) -&gt; TransactionValidity {...}&#xD;&#xA;```&#xD;&#xA;What I'm trying to do, is to take [tx](https://docs.rs/sp-runtime/6.0.0/sp_runtime/generic/struct.UncheckedExtrinsic.html) parameter and extract Call Value by:&#xD;&#xA;```&#xD;&#xA;            if tx.signature.is_none() {&#xD;&#xA;                //Do Something&#xD;&#xA;            }else {&#xD;&#xA;                let function_result = &amp;tx.function;&#xD;&#xA;            };&#xD;&#xA;```&#xD;&#xA;This function_result variable has type 'Call' with value of&#xD;&#xA;&#xD;&#xA;*Call::Mypallet(Call::my_custom_function { content: [123, 32, 9, 34, 110, 101, 116]}*&#xD;&#xA;I want to get content as a final result. But can not somehow communicatie with &quot;Call&quot; type. How can i extract the content field from there?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8410" PostHistoryTypeId="1" PostId="2252" RevisionGUID="3db3d9cb-26d7-407f-a855-2afec4690de6" CreationDate="2022-04-29T04:41:09.770" UserId="2339" Text="Substrate Pallet::Call, unpack the Pallet:Call's content" ContentLicense="CC BY-SA 4.0" />
  <row Id="8411" PostHistoryTypeId="3" PostId="2252" RevisionGUID="3db3d9cb-26d7-407f-a855-2afec4690de6" CreationDate="2022-04-29T04:41:09.770" UserId="2339" Text="|substrate-node|substrate-node-template|extrinsic|call|validation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8412" PostHistoryTypeId="2" PostId="2253" RevisionGUID="d9765316-375f-4260-8a53-08897fe89dd1" CreationDate="2022-04-29T05:44:03.327" UserId="627" Text="I believe the template will use the same format as the polkadot-js API since it will pass those through to the API itself, you can find [examples here](https://polkadot.js.org/docs/api/start/rpc.custom)&#xD;&#xA;&#xD;&#xA;And indeed, if I look at the front-end-template itself, [it uses that config](https://github.com/substrate-developer-hub/substrate-front-end-template/blob/e36c75de93a8fbd6a40b374129fbfa50a2bff16d/src/substrate-lib/SubstrateContext.js#L20) to pass it [through to the API](https://github.com/substrate-developer-hub/substrate-front-end-template/blob/e36c75de93a8fbd6a40b374129fbfa50a2bff16d/src/substrate-lib/SubstrateContext.js#L69) on init." ContentLicense="CC BY-SA 4.0" />
  <row Id="8414" PostHistoryTypeId="2" PostId="2254" RevisionGUID="b38ac9fb-dc35-4596-840d-c967b11f0196" CreationDate="2022-04-29T05:45:14.923" UserId="1809" Text="I'm pretty new with Substrate and Rust, but I was trying to generate a key pair using the `from_string` function of `sp_core::crypto::Pair` . I haven't had any luck and kept getting either `InvalidHexString` or `InvalidPhrase` errors when I try to pass valid key items generated from the `subkey` tool. &#xD;&#xA;&#xD;&#xA;For instance, I generated these key items from subkey tool by running the cmd `subkey generate`:&#xD;&#xA;```&#xD;&#xA;Secret phrase:       endorse doctor arch helmet master dragon wild favorite property mercy vault maze&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x78b8fbbbea218509c00d3531e72128d4eae54089f15deb24d721e30b351733ad&#xD;&#xA;  Public key (hex):  0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Account ID:        0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Public key (SS58): 5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;  SS58 Address:      5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I pass in the secret phrase I got from subkey tool to the `from_string` function, I get an `InvalidPhrase` error when submitting the composed extrinsic, even tho it was generated from subkey. This is sample code below:&#xD;&#xA;```rust&#xD;&#xA;  let priv_key: String = &quot;endorse/doctor/arch/helmet/master/dragon/wild/favorite/property/mercy/vault/maze&quot;.to_owned();&#xD;&#xA;  let from = Pair::from_string(&amp;priv_key[..], None).unwrap();&#xD;&#xA;  //let from = AccountKeyring::Bob.pair();&#xD;&#xA;  let api = Api::new(client).map(|api| api.set_signer(from)).unwrap();&#xD;&#xA;  ....&#xD;&#xA;  extrinsic_submitters::submit_to_save_item(api, incoming_item, now, datetime);&#xD;&#xA;```&#xD;&#xA;This is the error I get upon submission of extrinsic:&#xD;&#xA;```&#xD;&#xA;thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidPhrase', src/services/route_actions/mod.rs:76:53&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get similar error when using the secret seed as argument for `from_string`, only difference is I get `InvalidHexString` error when submitting the composed extrinsic. I was trying to follow the documentation of `from_string` usage in this link: https://docs.substrate.io/rustdocs/latest/sp_core/crypto/trait.Pair.html &#xD;&#xA;&#xD;&#xA;Any tips on this on how to make this work? I was thinking the items I generated were valid. My goal was to be able to pass in a valid secret phrase or secret seed in this code. I would then like to be able to sign an extrinsic using the generated key pair before passing the extrinsic to the chain. Thanks, all!" ContentLicense="CC BY-SA 4.0" />
  <row Id="8416" PostHistoryTypeId="1" PostId="2254" RevisionGUID="b38ac9fb-dc35-4596-840d-c967b11f0196" CreationDate="2022-04-29T05:45:14.923" UserId="1809" Text="Substrate Rust generate key pair using sp_core::crypto::Pair" ContentLicense="CC BY-SA 4.0" />
  <row Id="8417" PostHistoryTypeId="3" PostId="2254" RevisionGUID="b38ac9fb-dc35-4596-840d-c967b11f0196" CreationDate="2022-04-29T05:45:14.923" UserId="1809" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8418" PostHistoryTypeId="5" PostId="2254" RevisionGUID="fabfd593-c11a-494a-aa1a-637fa6196885" CreationDate="2022-04-29T06:16:39.363" UserId="1809" Comment="added 23 characters in body" Text="I'm pretty new with Substrate and Rust, but I was trying to generate a key pair using the `from_string` function of `sp_core::crypto::Pair` . I haven't had any luck and kept getting either `InvalidHexString` or `InvalidPhrase` errors when I try to pass valid key items generated from the `subkey` tool. &#xD;&#xA;&#xD;&#xA;For instance, I generated these key items from subkey tool by running the cmd `subkey generate`:&#xD;&#xA;```&#xD;&#xA;Secret phrase:       endorse doctor arch helmet master dragon wild favorite property mercy vault maze&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x78b8fbbbea218509c00d3531e72128d4eae54089f15deb24d721e30b351733ad&#xD;&#xA;  Public key (hex):  0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Account ID:        0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Public key (SS58): 5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;  SS58 Address:      5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I pass in the secret phrase I got from subkey tool to the `from_string` function, I get an `InvalidPhrase` error when submitting the composed extrinsic, even tho it was generated from subkey. This is sample code below:&#xD;&#xA;```rust&#xD;&#xA;  let priv_key: String = &quot;endorse/doctor/arch/helmet/master/dragon/wild/favorite/property/mercy/vault/maze&quot;.to_owned();&#xD;&#xA;  let from = Pair::from_string(&amp;priv_key[..], None).unwrap();&#xD;&#xA;  //let from = AccountKeyring::Bob.pair();&#xD;&#xA;  let api = Api::new(client).map(|api| api.set_signer(from)).unwrap();&#xD;&#xA;  ....&#xD;&#xA;  extrinsic_submitters::submit_to_save_item(api, incoming_item, now, datetime);&#xD;&#xA;```&#xD;&#xA;This is the error I get upon submission of extrinsic:&#xD;&#xA;```&#xD;&#xA;thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidPhrase', src/services/route_actions/mod.rs:76:53&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get similar error when using the secret seed as argument for `from_string`, only difference is I get `InvalidHexString` error when submitting the composed extrinsic. I was trying to follow the documentation of `from_string` usage in this link: https://docs.substrate.io/rustdocs/latest/sp_core/crypto/trait.Pair.html &#xD;&#xA;&#xD;&#xA;Any tips on this on how to make this work? I was thinking the items I generated were valid. My goal was to be able to pass in a valid secret phrase or secret seed in this code to generate a key pair. I would then like to be able to sign an extrinsic using the generated key pair before passing the extrinsic to the chain. Thanks, all!" ContentLicense="CC BY-SA 4.0" />
  <row Id="8419" PostHistoryTypeId="2" PostId="2255" RevisionGUID="24b93233-e704-482c-a266-94dacd169401" CreationDate="2022-04-29T06:30:05.840" UserId="398" Text="I have updated rust version. when i try to build the frontier template i am getting the below error:&#xD;&#xA;&#xD;&#xA; *&#xD;&#xA;&#xD;&#xA;    error[E0599]: no function or associated item named `set_block_number` found for struct `frame_system::Pallet` in the current scope&#xD;&#xA;         --&gt; /home/faraz/.cargo/git/checkouts/substrate-7e08433d4c370a21/1db34ff/frame/system/benchmarking/src/lib.rs:35:1&#xD;&#xA;          |&#xD;&#xA;      35  | / benchmarks! {&#xD;&#xA;      36  | |     remark {&#xD;&#xA;      37  | |         let b in 0 .. *T::BlockLength::get().max.get(DispatchClass::Normal) as u32;&#xD;&#xA;      38  | |         let remark_message = vec![1; b as usize];&#xD;&#xA;      ...   |&#xD;&#xA;      127 | |     impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test);&#xD;&#xA;      128 | | }&#xD;&#xA;          | | ^&#xD;&#xA;          | | |&#xD;&#xA;          | |_function or associated item not found in `frame_system::Pallet&lt;T&gt;`&#xD;&#xA;          |   help: there is an associated function with a similar name: `block_number`&#xD;&#xA;          |&#xD;&#xA;          = note: this error originates in the macro `$crate::impl_benchmark` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;      For more information about this error, try `rustc --explain E0599`.&#xD;&#xA;      error: could not compile `frame-system-benchmarking` due to previous error&#xD;&#xA;&#xD;&#xA;*&#xD;&#xA;I am using the following version of rustc:&#xD;&#xA;&#xD;&#xA;    Default host: x86_64-unknown-linux-gnu&#xD;&#xA;    rustup home:  /home/faraz/.rustup&#xD;&#xA;    &#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    nightly-x86_64-unknown-linux-gnu&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    rustc 1.60.0 (7737e0b5c 2022-04-04)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8421" PostHistoryTypeId="1" PostId="2255" RevisionGUID="24b93233-e704-482c-a266-94dacd169401" CreationDate="2022-04-29T06:30:05.840" UserId="398" Text="no function or associated item named `set_block_number` found for struct `frame_system::Pallet` in the current scope" ContentLicense="CC BY-SA 4.0" />
  <row Id="8422" PostHistoryTypeId="3" PostId="2255" RevisionGUID="24b93233-e704-482c-a266-94dacd169401" CreationDate="2022-04-29T06:30:05.840" UserId="398" Text="|substrate-node|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8423" PostHistoryTypeId="2" PostId="2256" RevisionGUID="54e3c235-825c-46c8-84cc-d008de57e238" CreationDate="2022-04-29T06:52:31.253" UserId="489" Text="i'm reading `collator-selection` [pallet][1]. i notice that when distribute the reward to the collator, the reward is the half of pallet account. why does it not distribute all the balance of pallet account? if take this, is that mean the next collator can get more reward? i'm confused about it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/master/pallets/collator-selection/src/lib.rs#L479" ContentLicense="CC BY-SA 4.0" />
  <row Id="8425" PostHistoryTypeId="1" PostId="2256" RevisionGUID="54e3c235-825c-46c8-84cc-d008de57e238" CreationDate="2022-04-29T06:52:31.253" UserId="489" Text="About collator staking pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="8426" PostHistoryTypeId="3" PostId="2256" RevisionGUID="54e3c235-825c-46c8-84cc-d008de57e238" CreationDate="2022-04-29T06:52:31.253" UserId="489" Text="|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8427" PostHistoryTypeId="2" PostId="2257" RevisionGUID="5193204e-8b15-4ea5-9015-8555dde29432" CreationDate="2022-04-29T06:53:34.327" UserId="28" Text="The `set_block_numer` function is only available when running tests or executing `runtime-benchmarks`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Set the block number to something in particular. Can be used as an alternative to&#xD;&#xA;/// `initialize` for tests that don't need to bother with the other environment entries.&#xD;&#xA;#[cfg(any(feature = &quot;std&quot;, feature = &quot;runtime-benchmarks&quot;, test))]&#xD;&#xA;pub fn set_block_number(n: T::BlockNumber) {&#xD;&#xA;	&lt;Number&lt;T&gt;&gt;::put(n);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems this error would appear if you are trying to access this function outside of these feature gated contexts.&#xD;&#xA;&#xD;&#xA;Make sure that you are building the code you want with the appropriate feature flags, and that your `Cargo.toml` has the appropriate feature gates setup too." ContentLicense="CC BY-SA 4.0" />
  <row Id="8429" PostHistoryTypeId="5" PostId="2257" RevisionGUID="7c5eb1ab-4ed8-425d-b7a3-da186f40b180" CreationDate="2022-04-29T07:16:15.957" UserId="28" Comment="added 311 characters in body" Text="The `set_block_numer` function is only available when running tests or executing `runtime-benchmarks`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Set the block number to something in particular. Can be used as an alternative to&#xD;&#xA;/// `initialize` for tests that don't need to bother with the other environment entries.&#xD;&#xA;#[cfg(any(feature = &quot;std&quot;, feature = &quot;runtime-benchmarks&quot;, test))]&#xD;&#xA;pub fn set_block_number(n: T::BlockNumber) {&#xD;&#xA;	&lt;Number&lt;T&gt;&gt;::put(n);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems this error would appear if you are trying to access this function outside of these feature gated contexts.&#xD;&#xA;&#xD;&#xA;Make sure that you are building the code you want with the appropriate feature flags, and that your `Cargo.toml` has the appropriate feature gates setup too.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Doing a closer look, the solution is: https://github.com/paritytech/frontier/commit/b95c5da38652c2253f906c77d097060f7f86d142&#xD;&#xA;&#xD;&#xA;You should remove the lines:&#xD;&#xA;&#xD;&#xA;```lang-toml&#xD;&#xA;'frame-benchmarking/std',&#xD;&#xA;'frame-system-benchmarking/std',&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If they exist. This is simply a mistake in the configuration." ContentLicense="CC BY-SA 4.0" />
  <row Id="8430" PostHistoryTypeId="2" PostId="2258" RevisionGUID="76b29633-5b8f-42e1-aa91-43620df69663" CreationDate="2022-04-29T07:22:17.663" UserId="620" Text="It does increase the reward for the next collators, but there is an economic problem with giving all fees to the block author. The fees adjust per-block according to the `NextFeeMultiplier`, which adjusts based on how full (in weight terms) a block is. So if a block is empty, then the fees for the next block are lower, but if a block is full then they are higher.&#xD;&#xA;&#xD;&#xA;If a collator takes all the transaction fees, they would actually have the incentive to stuff blocks with thousands of their own transactions (e.g. balance transfer from `my_account_A` to `my_account_B`), because it would make all future transaction fees higher, and they'd get their own fees back as the block author.&#xD;&#xA;&#xD;&#xA;However, if 50% of the fees go to _some future collator,_ then collators would lose funds with this strategy because they'd only recuperate 50% of the fees they were paying." ContentLicense="CC BY-SA 4.0" />
  <row Id="8432" PostHistoryTypeId="2" PostId="2259" RevisionGUID="f2f9188f-f280-4a13-9232-f90297c6d27a" CreationDate="2022-04-29T08:04:19.400" UserId="179" Text="I want to open a Crowdloan and read current contributions as they come to my crowdloan to offer a special reward mechanism for early contributors. What's the best way to get the information on what addresses are contributing? I'd like to know the block height and the amount." ContentLicense="CC BY-SA 4.0" />
  <row Id="8434" PostHistoryTypeId="1" PostId="2259" RevisionGUID="f2f9188f-f280-4a13-9232-f90297c6d27a" CreationDate="2022-04-29T08:04:19.400" UserId="179" Text="Read current Crowdloan Contributions" ContentLicense="CC BY-SA 4.0" />
  <row Id="8435" PostHistoryTypeId="3" PostId="2259" RevisionGUID="f2f9188f-f280-4a13-9232-f90297c6d27a" CreationDate="2022-04-29T08:04:19.400" UserId="179" Text="|polkadot|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8436" PostHistoryTypeId="2" PostId="2260" RevisionGUID="afcffee1-bd7e-4ee3-b806-f02ab8a86a4f" CreationDate="2022-04-29T08:24:05.063" UserId="45" Text="The transaction fees are charged by the [`ChargeTransactionPayment`](https://crates.parity.io/pallet_transaction_payment/struct.ChargeTransactionPayment.html) [signed extension](https://docs.substrate.io/v3/concepts/tx-pool/#signed-extensions). I don't believe you could configure that thing to &quot;charge&quot; negative amounts. But I think you can just reimplement your own `SignedExtension`, maybe potentially based on top of that, that will reward each transactor and replace/add to your signed extras (like [here](https://github.com/paritytech/polkadot/blob/44e2616153caca7a16e148159ebd66cdeb702310/runtime/polkadot/src/lib.rs#L1480)).&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8438" PostHistoryTypeId="2" PostId="2261" RevisionGUID="edbea657-3f8e-407e-9b85-f477c7532be5" CreationDate="2022-04-29T08:58:47.847" UserId="28" Text="The best thing for this would be to track events in previous blocks on your chain.&#xD;&#xA;&#xD;&#xA;From the [Crowdloan Pallet](https://github.com/paritytech/polkadot/blob/master/runtime/common/src/crowdloan/mod.rs#L813):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Contributed to a crowd sale. `[who, fund_index, amount]`&#xD;&#xA;Contributed(T::AccountId, ParaId, BalanceOf&lt;T&gt;),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The pseudo code:&#xD;&#xA;&#xD;&#xA;1. For each block&#xD;&#xA;2. Get all events for that block&#xD;&#xA;3. Find all `Crowdloan.Contributed` events for that block&#xD;&#xA;4. From those events, extract:&#xD;&#xA;    * The block number&#xD;&#xA;    * The user contributing&#xD;&#xA;    * The parachain being contributed to&#xD;&#xA;    * the amount being contributed&#xD;&#xA;5. Accumulate your data.&#xD;&#xA;&#xD;&#xA;You could also make a service which tracks this live by listening for new blocks and events." ContentLicense="CC BY-SA 4.0" />
  <row Id="8440" PostHistoryTypeId="6" PostId="2256" RevisionGUID="2d5fd73a-f1f9-4903-af9e-af94238c0aa3" CreationDate="2022-04-29T09:22:08.110" UserId="85" Comment="edited tags" Text="|collator|game-theory|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8441" PostHistoryTypeId="52" PostId="2248" RevisionGUID="f02d4017-a917-4cf4-a9e9-80347e475ae9" CreationDate="2022-04-29T09:26:50.267" />
  <row Id="8442" PostHistoryTypeId="2" PostId="2262" RevisionGUID="6d2e0109-440b-48d9-bc2b-c4f92a267da5" CreationDate="2022-04-29T09:32:52.840" UserId="2163" Text="I am curious about the way substrate is written. Let's take for example the assets pallet. Most of the functions in the lib.rs file don't reveal too much detail, but enough to understand what each function does. Most of them call the &quot;do&quot; methods in the function.rs file where most of the logic is placed, hence some of them are pretty long and reveal a lot of detail. I am interested in why don't some of these functions get separated into multiple smaller functions. I believe that it would be much easier to follow and read the code that way. This is just my opinion, but there might be a good reason for writing code like this." ContentLicense="CC BY-SA 4.0" />
  <row Id="8444" PostHistoryTypeId="1" PostId="2262" RevisionGUID="6d2e0109-440b-48d9-bc2b-c4f92a267da5" CreationDate="2022-04-29T09:32:52.840" UserId="2163" Text="Why is substrate written like this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8445" PostHistoryTypeId="3" PostId="2262" RevisionGUID="6d2e0109-440b-48d9-bc2b-c4f92a267da5" CreationDate="2022-04-29T09:32:52.840" UserId="2163" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8446" PostHistoryTypeId="2" PostId="2263" RevisionGUID="96765ea7-e93c-4682-a0ad-f5ca275fb30b" CreationDate="2022-04-29T09:43:03.433" UserId="85" Text="You can match on `tx.function`:&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;			match tx.function {&#xD;&#xA;				Call::Balances(..) =&gt; {&#xD;&#xA;					Executive::validate_transaction(source, tx, block_hash)&#xD;&#xA;				}&#xD;&#xA;				_ =&gt; {&#xD;&#xA;					todo!(&quot;&quot;);&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8448" PostHistoryTypeId="2" PostId="2264" RevisionGUID="08e40851-5ad8-4228-a49c-6f30d088658a" CreationDate="2022-04-29T09:51:00.970" UserId="2451" Text="I listened to a talk zksummit7 titled &quot;Web3 Foundation &#xD;&#xA;Accountable light clients via BLS multisignature rollup&quot; given by Alistair from web3f.  My interpretation of the talk is that Alistair and his team have developed a zkp + BLS multisig mechanism for building accountable light clients.  The zkp circuit is used to keep track of the active validator set and the BLS multisig is used to aggregate finality vote sigs.  I think this is the most promising approach I have seen to date for building a trustless substrate / polkadot  light client.  I am very keen to learn more about this.  I have reached out to Alistair via his web3f email but no success.  I wonder if anyone has any additional resources / insights that they could share on this topic? " ContentLicense="CC BY-SA 4.0" />
  <row Id="8450" PostHistoryTypeId="1" PostId="2264" RevisionGUID="08e40851-5ad8-4228-a49c-6f30d088658a" CreationDate="2022-04-29T09:51:00.970" UserId="2451" Text="Web3 Foundation - Accountable light clients via BLS multisignature rollup" ContentLicense="CC BY-SA 4.0" />
  <row Id="8451" PostHistoryTypeId="3" PostId="2264" RevisionGUID="08e40851-5ad8-4228-a49c-6f30d088658a" CreationDate="2022-04-29T09:51:00.970" UserId="2451" Text="|polkadot|finality|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8452" PostHistoryTypeId="2" PostId="2265" RevisionGUID="b65944c8-1642-4998-8de4-aca4408197cc" CreationDate="2022-04-29T09:59:47.910" UserId="85" Text="PRs welcome. There's a lot going on in substrate and as Ethereum's successor it's designed to be a lot more generic than Ethereum was (as it will be used in many more different contexts). Sometimes if you split a function too fine  it can be hard to see what's going on. There's a balance, and everyone's view of what 'right' looks like is different. With as big a codebase as substrate's, there is always room for improvement - if you can refactor any small part of the code to be more readable then happy to review the PR." ContentLicense="CC BY-SA 4.0" />
  <row Id="8454" PostHistoryTypeId="6" PostId="1122" RevisionGUID="404882bb-f27c-4502-a405-c0b85aaa62ee" CreationDate="2022-04-29T10:05:55.070" UserId="85" Comment="edited tags" Text="|cryptography|zk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8455" PostHistoryTypeId="6" PostId="2264" RevisionGUID="94950f7a-5e4e-4f7d-ab69-a28b736d56b6" CreationDate="2022-04-29T10:06:32.530" UserId="85" Comment="edited tags" Text="|polkadot|finality|light-client|zk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8456" PostHistoryTypeId="5" PostId="2264" RevisionGUID="be446627-002e-49e8-a412-06a74bf106e7" CreationDate="2022-04-29T10:07:24.337" UserId="2451" Comment="added 3 characters in body" Text="I listened to a talk at zksummit7 titled &quot;Web3 Foundation &#xD;&#xA;Accountable light clients via BLS multisignature rollup&quot; given by Alistair from web3f.  My interpretation of the talk is that Alistair and his team have developed a zkp + BLS multisig mechanism for building accountable light clients.  The zkp circuit is used to keep track of the active validator set and the BLS multisig is used to aggregate finality vote sigs.  I think this is the most promising approach I have seen to date for building a trustless substrate / polkadot  light client.  I am very keen to learn more about this.  I have reached out to Alistair via his web3f email but no success.  I wonder if anyone has any additional resources / insights that they could share on this topic? " ContentLicense="CC BY-SA 4.0" />
  <row Id="8457" PostHistoryTypeId="2" PostId="2266" RevisionGUID="218fd128-c70b-4913-8ab9-fa1f0ecf9f23" CreationDate="2022-04-29T10:14:25.323" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="8459" PostHistoryTypeId="1" PostId="2266" RevisionGUID="218fd128-c70b-4913-8ab9-fa1f0ecf9f23" CreationDate="2022-04-29T10:14:25.323" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8460" PostHistoryTypeId="1" PostId="2267" RevisionGUID="2857c1be-7797-483c-9da9-bfb4eedae8c0" CreationDate="2022-04-29T10:14:25.323" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="8462" PostHistoryTypeId="2" PostId="2267" RevisionGUID="2857c1be-7797-483c-9da9-bfb4eedae8c0" CreationDate="2022-04-29T10:14:25.323" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="8463" PostHistoryTypeId="2" PostId="2268" RevisionGUID="d5002026-8e60-4ce4-95ba-798d6ff95704" CreationDate="2022-04-29T10:17:47.550" UserId="152" Text="We had this same issue with our Polymesh chain.  To fix it you need to enable the `arbitrary_precision` feature on `serde_json` and `jsonrpc-core` crates.&#xD;&#xA;&#xD;&#xA;Check your `Cargo.toml` files (there might be more than one) for those two crates and make sure the feature is enabled like this:&#xD;&#xA;```&#xD;&#xA;jsonrpc-core = { version = &quot;15.0&quot;, features = [&quot;arbitrary_precision&quot;] }&#xD;&#xA;serde_json = { version = &quot;1.0&quot;, features = [&quot;arbitrary_precision&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see the commit where we fixed it here:&#xD;&#xA;https://github.com/PolymathNetwork/Polymesh/commit/5ee2801fcf9f34b7efa78e909782bf77154c0b0f" ContentLicense="CC BY-SA 4.0" />
  <row Id="8465" PostHistoryTypeId="5" PostId="2265" RevisionGUID="f6088028-87b1-4c36-907b-8e4a6bb97861" CreationDate="2022-04-29T10:19:07.887" UserId="85" Comment="substrate may create multiple ethereum successors" Text="PRs welcome. There's a lot going on in substrate and as Ethereum's successor(s) it's designed to be a lot more generic than Ethereum was (as it will be used in many more different contexts). Sometimes if you split a function too fine  it can be hard to see what's going on. There's a balance, and everyone's view of what 'right' looks like is different. With as big a codebase as substrate's, there is always room for improvement - if you can refactor any small part of the code to be more readable then happy to review the PR." ContentLicense="CC BY-SA 4.0" />
  <row Id="8466" PostHistoryTypeId="2" PostId="2269" RevisionGUID="0da1db56-e9bf-4075-9eff-8594c415cacf" CreationDate="2022-04-29T10:32:03.640" UserId="2451" Text="It appears to me that we find ourselves at a trade off between parachain STF generality vs trustless XCM interoperability.  At the current point in time parachains can define how XCM messages will be interpreted and executed.  This introduces a requirement of trust between parachains, parachain A must trust that parachain B will execute a message sensibly.  To achieve trustless interoperability parachains need some guarantees about how messages will be executed.  I have seen mentions of SPREE which appears to be a promising approach that will provide a sandbox with standardised logic for execution of messages.  There is very little information provided about it.  I understand it is still a work in progress but it would be good to understand and potentially contribute to.  I have seen mention that SPREE would be &quot;opt-in&quot; which leads to a bit of fuzzyness regarding interoperability.  Those parachains which do not opt-in could still execute malicious / faulty code meaning that users / parachain devs have to be savvy about which destination parachains they support for XCM.  I'm entertaining the idea of an interoperability-centric relay chain which constrains the generality of the parachain STF such that core pallets such as asset pallets, maybe VM choice, etc are standardised via SPREE.  This way parachains require less trust for interop.  Could this be achieved and if so how?  I'm guessing there would be a SPREE wasm blob on the relay chain which stores the shared logic and then maybe some validation of parachain STF would be required when registering and upgrading?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8468" PostHistoryTypeId="1" PostId="2269" RevisionGUID="0da1db56-e9bf-4075-9eff-8594c415cacf" CreationDate="2022-04-29T10:32:03.640" UserId="2451" Text="Interoperability vs generality trade off (SPREE / XCM)" ContentLicense="CC BY-SA 4.0" />
  <row Id="8469" PostHistoryTypeId="3" PostId="2269" RevisionGUID="0da1db56-e9bf-4075-9eff-8594c415cacf" CreationDate="2022-04-29T10:32:03.640" UserId="2451" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8470" PostHistoryTypeId="2" PostId="2270" RevisionGUID="ebe7a6e3-7f16-45e9-a0d6-7e724c2a9781" CreationDate="2022-04-29T10:32:23.973" UserId="2146" Text="I've recently been playing around with making and deploying my own squid. I keep getting a deploy_error on the website after deploying my squid via CLI. Visiting my URL I get the message below.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA; I've attached my `package.json`, `docker file`, and the `docker build . `&#xD;&#xA;&#xD;&#xA;I'm using a Raspberry Pi4 and running node v16.14.2 and npm v8.6.0&#xD;&#xA;&#xD;&#xA;Running the command npx sqd squid tail app-name@one returns the message:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      name: Error,&#xD;&#xA;      message: HTTP request failed,&#xD;&#xA;      errors: [],&#xD;&#xA;      label: SERVER_ERROR&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Package.json**&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;kusama-balances&quot;,&#xD;&#xA;      &quot;private&quot;: true,&#xD;&#xA;      &quot;scripts&quot;: {&#xD;&#xA;        &quot;build&quot;: &quot;rm -rf lib &amp;&amp; tsc&quot;,&#xD;&#xA;        &quot;init&quot;: &quot;node db/init.js&quot;,&#xD;&#xA;        &quot;db:migrate&quot;: &quot;npx sqd db migrate&quot;,&#xD;&#xA;        &quot;schema:reset&quot;: &quot;&quot;,&#xD;&#xA;        &quot;processor:migrate&quot;: &quot;echo skip&quot;,&#xD;&#xA;        &quot;processor:start&quot;: &quot;node lib/processor.js&quot;,&#xD;&#xA;            &quot;processor:docker-run&quot;: &quot;bash scripts/docker-run.sh&quot;,&#xD;&#xA;            &quot;query-node:start&quot;: &quot;squid-graphql-server&quot;,&#xD;&#xA;            &quot;lint&quot;: &quot;npm run lint:prod -- --fix&quot;,&#xD;&#xA;            &quot;lint:prod&quot;: &quot;eslint . --ext .ts --ignore-path .gitignore --max-warnings 0&quot;&#xD;&#xA;          },&#xD;&#xA;          &quot;dependencies&quot;: {&#xD;&#xA;            &quot;@subsquid/archive-registry&quot;: &quot;^0.0.5&quot;,&#xD;&#xA;            &quot;@subsquid/cli&quot;: &quot;^0.2.1&quot;,&#xD;&#xA;            &quot;@subsquid/graphql-server&quot;: &quot;^0.1.5&quot;,&#xD;&#xA;            &quot;@subsquid/ss58&quot;: &quot;^0.1.0&quot;,&#xD;&#xA;            &quot;@subsquid/substrate-processor&quot;: &quot;^0.6.1&quot;,&#xD;&#xA;            &quot;dotenv&quot;: &quot;^16.0.0&quot;,&#xD;&#xA;            &quot;pg&quot;: &quot;^8.7.3&quot;,&#xD;&#xA;            &quot;typeorm&quot;: &quot;^0.2.41&quot;&#xD;&#xA;          },&#xD;&#xA;          &quot;devDependencies&quot;: {&#xD;&#xA;            &quot;@subsquid/substrate-metadata-explorer&quot;: &quot;^0.0.7&quot;,&#xD;&#xA;            &quot;@subsquid/substrate-typegen&quot;: &quot;^0.4.1&quot;,&#xD;&#xA;            &quot;@types/node&quot;: &quot;^17.0.23&quot;,&#xD;&#xA;            &quot;typescript&quot;: &quot;~4.6.2&quot;,&#xD;&#xA;            &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^4.33.0&quot;,&#xD;&#xA;            &quot;eslint&quot;: &quot;^7.32.0&quot;,&#xD;&#xA;            &quot;eslint-config-airbnb-typescript&quot;: &quot;^12.3.1&quot;,&#xD;&#xA;            &quot;eslint-config-prettier&quot;: &quot;^8.3.0&quot;,&#xD;&#xA;            &quot;eslint-plugin-eslint-comments&quot;: &quot;^3.2.0&quot;,&#xD;&#xA;            &quot;eslint-plugin-import&quot;: &quot;^2.25.3&quot;,&#xD;&#xA;            &quot;eslint-plugin-prettier&quot;: &quot;^4.0.0&quot;,&#xD;&#xA;            &quot;eslint-plugin-type-graphql&quot;: &quot;^0.3.2&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;**DOCKER FILE**&#xD;&#xA;&#xD;&#xA;    FROM node:16-alpine AS node&#xD;&#xA;    &#xD;&#xA;    FROM node AS node-with-gyp&#xD;&#xA;    RUN apk add g++ make python3&#xD;&#xA;    &#xD;&#xA;    FROM node-with-gyp AS builder&#xD;&#xA;    WORKDIR /squid&#xD;&#xA;    ADD package.json .&#xD;&#xA;    ADD package-lock.json .&#xD;&#xA;    RUN npm ci&#xD;&#xA;    ADD tsconfig.json .&#xD;&#xA;    ADD src src&#xD;&#xA;    RUN npm run build&#xD;&#xA;    &#xD;&#xA;    FROM node-with-gyp AS deps&#xD;&#xA;    WORKDIR /squid&#xD;&#xA;    ADD package.json .&#xD;&#xA;    ADD package-lock.json .&#xD;&#xA;    RUN npm ci --production&#xD;&#xA;    &#xD;&#xA;    FROM node AS squid&#xD;&#xA;    WORKDIR /squid&#xD;&#xA;    COPY --from=deps /squid/package.json .&#xD;&#xA;    COPY --from=deps /squid/package-lock.json .&#xD;&#xA;    COPY --from=deps /squid/node_modules node_modules&#xD;&#xA;    COPY --from=builder /squid/lib lib&#xD;&#xA;    ADD db db&#xD;&#xA;    ADD schema.graphql .&#xD;&#xA;    # TODO: use shorter PROMETHEUS_PORT&#xD;&#xA;    ENV PROCESSOR_PROMETHEUS_PORT 3000&#xD;&#xA;    EXPOSE 3000&#xD;&#xA;    EXPOSE 4000&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    FROM squid AS processor&#xD;&#xA;    CMD [&quot;npm&quot;, &quot;run&quot;, &quot;processor:start&quot;]&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    FROM squid AS query-node&#xD;&#xA;    CMD [&quot;npm&quot;, &quot;run&quot;, &quot;query-node:start&quot;]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**running the terminal command:**&#xD;&#xA;&#xD;&#xA;    sudo docker build . -t squid-template:latest --no-cache&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Sending build context to Docker daemon  4.088MB&#xD;&#xA;    Step 1/31 : FROM node:16-alpine AS node&#xD;&#xA;     ---&gt; 230f2ea7123d&#xD;&#xA;    Step 2/31 : FROM node AS node-with-gyp&#xD;&#xA;     ---&gt; 230f2ea7123d&#xD;&#xA;    Step 3/31 : RUN apk add g++ make python3&#xD;&#xA;     ---&gt; Running in 2432453f6554&#xD;&#xA;    fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/aarch64/APKINDEX.tar.gz&#xD;&#xA;    fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/aarch64/APKINDEX.tar.gz&#xD;&#xA;    (1/24) Installing binutils (2.37-r3)&#xD;&#xA;    (2/24) Installing libgomp (10.3.1_git20211027-r0)&#xD;&#xA;    (3/24) Installing libatomic (10.3.1_git20211027-r0)&#xD;&#xA;    (4/24) Installing libgphobos (10.3.1_git20211027-r0)&#xD;&#xA;    (5/24) Installing gmp (6.2.1-r1)&#xD;&#xA;    (6/24) Installing isl22 (0.22-r0)&#xD;&#xA;    (7/24) Installing mpfr4 (4.1.0-r0)&#xD;&#xA;    (8/24) Installing mpc1 (1.2.1-r0)&#xD;&#xA;    (9/24) Installing gcc (10.3.1_git20211027-r0)&#xD;&#xA;    (10/24) Installing musl-dev (1.2.2-r7)&#xD;&#xA;    (11/24) Installing libc-dev (0.7.2-r3)&#xD;&#xA;    (12/24) Installing g++ (10.3.1_git20211027-r0)&#xD;&#xA;    (13/24) Installing make (4.3-r0)&#xD;&#xA;    (14/24) Installing libbz2 (1.0.8-r1)&#xD;&#xA;    (15/24) Installing expat (2.4.7-r0)&#xD;&#xA;    (16/24) Installing libffi (3.4.2-r1)&#xD;&#xA;    (17/24) Installing gdbm (1.22-r0)&#xD;&#xA;    (18/24) Installing xz-libs (5.2.5-r1)&#xD;&#xA;    (19/24) Installing mpdecimal (2.5.1-r1)&#xD;&#xA;    (20/24) Installing ncurses-terminfo-base (6.3_p20211120-r0)&#xD;&#xA;    (21/24) Installing ncurses-libs (6.3_p20211120-r0)&#xD;&#xA;    (22/24) Installing readline (8.1.1-r0)&#xD;&#xA;    (23/24) Installing sqlite-libs (3.36.0-r0)&#xD;&#xA;    (24/24) Installing python3 (3.9.7-r4)&#xD;&#xA;    Executing busybox-1.34.1-r5.trigger&#xD;&#xA;    OK: 237 MiB in 40 packages&#xD;&#xA;    Removing intermediate container 2432453f6554&#xD;&#xA;     ---&gt; 53a776507944&#xD;&#xA;    Step 4/31 : FROM node-with-gyp AS builder&#xD;&#xA;     ---&gt; 53a776507944&#xD;&#xA;    Step 5/31 : WORKDIR /squid&#xD;&#xA;     ---&gt; Running in 73a44b66c69b&#xD;&#xA;    Removing intermediate container 73a44b66c69b&#xD;&#xA;     ---&gt; b48edef8654c&#xD;&#xA;    Step 6/31 : ADD package.json .&#xD;&#xA;     ---&gt; ccf828502935&#xD;&#xA;    Step 7/31 : ADD package-lock.json .&#xD;&#xA;     ---&gt; e7e6e0c0ff7e&#xD;&#xA;    Step 8/31 : RUN npm ci&#xD;&#xA;     ---&gt; Running in c187bfd9b9aa&#xD;&#xA;    npm WARN old lockfile&#xD;&#xA;    npm WARN old lockfile The package-lock.json file was created with an old version of npm,&#xD;&#xA;    npm WARN old lockfile so supplemental metadata must be fetched from the registry.&#xD;&#xA;    npm WARN old lockfile&#xD;&#xA;    npm WARN old lockfile This is a one-time fix-up, please be patient...&#xD;&#xA;    npm WARN old lockfile&#xD;&#xA;    npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.&#xD;&#xA;    npm WARN deprecated cli-ux@5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.&#xD;&#xA;    npm WARN deprecated lru-cache@7.7.1: Please update to latest patch version to fix memory leak https://github.com/isaacs/node-lru-cache/issues/227&#xD;&#xA;    npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.&#xD;&#xA;    &#xD;&#xA;    added 930 packages, and audited 931 packages in 4m&#xD;&#xA;    &#xD;&#xA;    111 packages are looking for funding&#xD;&#xA;      run `npm fund` for details&#xD;&#xA;    &#xD;&#xA;    8 vulnerabilities (3 moderate, 5 high)&#xD;&#xA;    &#xD;&#xA;    To address issues that do not require attention, run:&#xD;&#xA;      npm audit fix&#xD;&#xA;    &#xD;&#xA;    Some issues need review, and may require choosing&#xD;&#xA;    a different dependency.&#xD;&#xA;    &#xD;&#xA;    Run `npm audit` for details.&#xD;&#xA;    npm notice&#xD;&#xA;    npm notice New minor version of npm available! 8.5.5 -&gt; 8.8.0&#xD;&#xA;    npm notice Changelog: &lt;https://github.com/npm/cli/releases/tag/v8.8.0&gt;&#xD;&#xA;    npm notice Run `npm install -g npm@8.8.0` to update!&#xD;&#xA;    npm notice&#xD;&#xA;    Removing intermediate container c187bfd9b9aa&#xD;&#xA;     ---&gt; 75a6aa00a9dd&#xD;&#xA;    Step 9/31 : ADD tsconfig.json .&#xD;&#xA;     ---&gt; 5df2d8ef6b7c&#xD;&#xA;    Step 10/31 : ADD src src&#xD;&#xA;     ---&gt; 729f5b825ab6&#xD;&#xA;    Step 11/31 : RUN npm run build&#xD;&#xA;     ---&gt; Running in a56e1580dfcb&#xD;&#xA;    &#xD;&#xA;    &gt; build&#xD;&#xA;    &gt; rm -rf lib &amp;&amp; tsc&#xD;&#xA;    &#xD;&#xA;    Removing intermediate container a56e1580dfcb&#xD;&#xA;     ---&gt; 246de23625c8&#xD;&#xA;    Step 12/31 : FROM node-with-gyp AS deps&#xD;&#xA;     ---&gt; 53a776507944&#xD;&#xA;    Step 13/31 : WORKDIR /squid&#xD;&#xA;     ---&gt; Running in a35c3b2212d8&#xD;&#xA;    Removing intermediate container a35c3b2212d8&#xD;&#xA;     ---&gt; df213bd4e7e4&#xD;&#xA;    Step 14/31 : ADD package.json .&#xD;&#xA;     ---&gt; ec17482b4f85&#xD;&#xA;    Step 15/31 : ADD package-lock.json .&#xD;&#xA;     ---&gt; 00523b03480a&#xD;&#xA;    Step 16/31 : RUN npm ci --production&#xD;&#xA;     ---&gt; Running in 694971c7c74b&#xD;&#xA;    npm WARN old lockfile&#xD;&#xA;    npm WARN old lockfile The package-lock.json file was created with an old version of npm,&#xD;&#xA;    npm WARN old lockfile so supplemental metadata must be fetched from the registry.&#xD;&#xA;    npm WARN old lockfile&#xD;&#xA;    npm WARN old lockfile This is a one-time fix-up, please be patient...&#xD;&#xA;    npm WARN old lockfile&#xD;&#xA;    npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.&#xD;&#xA;    npm WARN deprecated cli-ux@5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.&#xD;&#xA;    npm WARN deprecated lru-cache@7.7.1: Please update to latest patch version to fix memory leak https://github.com/isaacs/node-lru-cache/issues/227&#xD;&#xA;    npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.&#xD;&#xA;    &#xD;&#xA;    added 793 packages, and audited 794 packages in 4m&#xD;&#xA;    &#xD;&#xA;    63 packages are looking for funding&#xD;&#xA;      run `npm fund` for details&#xD;&#xA;    &#xD;&#xA;    8 vulnerabilities (3 moderate, 5 high)&#xD;&#xA;    &#xD;&#xA;    To address issues that do not require attention, run:&#xD;&#xA;      npm audit fix&#xD;&#xA;    &#xD;&#xA;    Some issues need review, and may require choosing&#xD;&#xA;    a different dependency.&#xD;&#xA;    &#xD;&#xA;    Run `npm audit` for details.&#xD;&#xA;    npm notice&#xD;&#xA;    npm notice New minor version of npm available! 8.5.5 -&gt; 8.8.0&#xD;&#xA;    npm notice Changelog: &lt;https://github.com/npm/cli/releases/tag/v8.8.0&gt;&#xD;&#xA;    npm notice Run `npm install -g npm@8.8.0` to update!&#xD;&#xA;    npm notice&#xD;&#xA;    Removing intermediate container 694971c7c74b&#xD;&#xA;     ---&gt; 1c0b3fefeecc&#xD;&#xA;    Step 17/31 : FROM node AS squid&#xD;&#xA;     ---&gt; 230f2ea7123d&#xD;&#xA;    Step 18/31 : WORKDIR /squid&#xD;&#xA;     ---&gt; Running in 6f56090d20b0&#xD;&#xA;    Removing intermediate container 6f56090d20b0&#xD;&#xA;     ---&gt; df951ee65111&#xD;&#xA;    Step 19/31 : COPY --from=deps /squid/package.json .&#xD;&#xA;     ---&gt; 1531926eb9a2&#xD;&#xA;    Step 20/31 : COPY --from=deps /squid/package-lock.json .&#xD;&#xA;     ---&gt; 8815d07f5a5a&#xD;&#xA;    Step 21/31 : COPY --from=deps /squid/node_modules node_modules&#xD;&#xA;     ---&gt; 94bcc6b6783b&#xD;&#xA;    Step 22/31 : COPY --from=builder /squid/lib lib&#xD;&#xA;     ---&gt; f9e2c03f90b6&#xD;&#xA;    Step 23/31 : ADD db db&#xD;&#xA;     ---&gt; e66cc42f967c&#xD;&#xA;    Step 24/31 : ADD schema.graphql .&#xD;&#xA;     ---&gt; 52dd9bfab5a0&#xD;&#xA;    Step 25/31 : ENV PROCESSOR_PROMETHEUS_PORT 3000&#xD;&#xA;     ---&gt; Running in 43e8f9fb49fa&#xD;&#xA;    Removing intermediate container 43e8f9fb49fa&#xD;&#xA;     ---&gt; 0e002c90bad2&#xD;&#xA;    Step 26/31 : EXPOSE 3000&#xD;&#xA;     ---&gt; Running in c09884e86e87&#xD;&#xA;    Removing intermediate container c09884e86e87&#xD;&#xA;     ---&gt; 6b2911209368&#xD;&#xA;    Step 27/31 : EXPOSE 4000&#xD;&#xA;     ---&gt; Running in 222ec7dfffd4&#xD;&#xA;    Removing intermediate container 222ec7dfffd4&#xD;&#xA;     ---&gt; 68c23cc3c950&#xD;&#xA;    Step 28/31 : FROM squid AS processor&#xD;&#xA;     ---&gt; 68c23cc3c950&#xD;&#xA;    Step 29/31 : CMD [&quot;npm&quot;, &quot;run&quot;, &quot;processor:start&quot;]&#xD;&#xA;     ---&gt; Running in 6c6dfd10b961&#xD;&#xA;    Removing intermediate container 6c6dfd10b961&#xD;&#xA;     ---&gt; db98e6f855df&#xD;&#xA;    Step 30/31 : FROM squid AS query-node&#xD;&#xA;     ---&gt; 68c23cc3c950&#xD;&#xA;    Step 31/31 : CMD [&quot;npm&quot;, &quot;run&quot;, &quot;query-node:start&quot;]&#xD;&#xA;     ---&gt; Running in 7d278cef25e7&#xD;&#xA;    Removing intermediate container 7d278cef25e7&#xD;&#xA;     ---&gt; 064d789f2255&#xD;&#xA;    Successfully built 064d789f2255&#xD;&#xA;    Successfully tagged squid-template:latest&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/o97LT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8472" PostHistoryTypeId="1" PostId="2270" RevisionGUID="ebe7a6e3-7f16-45e9-a0d6-7e724c2a9781" CreationDate="2022-04-29T10:32:23.973" UserId="2146" Text="Cannot deploy squid to Subsquid dashboard" ContentLicense="CC BY-SA 4.0" />
  <row Id="8473" PostHistoryTypeId="3" PostId="2270" RevisionGUID="ebe7a6e3-7f16-45e9-a0d6-7e724c2a9781" CreationDate="2022-04-29T10:32:23.973" UserId="2146" Text="|subsquid|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8474" PostHistoryTypeId="5" PostId="2240" RevisionGUID="c56dff41-981f-400d-9a54-7d80e19e7381" CreationDate="2022-04-29T11:23:15.580" UserId="3" Comment="Clarify question" Text="I can't find anything on how to use the compact encoding of integers with `Option&lt;...&gt;`. Is this possible?&#xD;&#xA;&#xD;&#xA;And to elaborate, if I do something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call]&#xD;&#xA;... {&#xD;&#xA;    fn my_dispatchable(origin: OriginFor&lt;T&gt;, #[pallet::compact] my_option: Option&lt;u128&gt;) -&gt; DispatchResult {&#xD;&#xA;        // ...&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I get the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;the trait `From&lt;parity_scale_codec::Compact&lt;std::option::Option&lt;u128&gt;&gt;&gt;` is not implemented for `std::option::Option&lt;u128&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This sounds like it's not possible to compactly encode options of integers. Why?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8475" PostHistoryTypeId="4" PostId="2240" RevisionGUID="c56dff41-981f-400d-9a54-7d80e19e7381" CreationDate="2022-04-29T11:23:15.580" UserId="3" Comment="Clarify question" Text="Can SCALE compact encoding be used with `Option&lt;T&gt;`? If so, how exactly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8476" PostHistoryTypeId="2" PostId="2271" RevisionGUID="24f84422-850c-4c11-988f-6759bc9fcf1a" CreationDate="2022-04-29T11:37:32.140" UserId="2452" Text="I need to gain some developer perspective on this if possible.&#xD;&#xA;&#xD;&#xA;Essentially I'm trying to understand the following:&#xD;&#xA;&#xD;&#xA;1. Are there any barriers to entry to use either of these? Or can any developer familiar with understanding of DLT fundamentals pick them up to kickstart their own blockchain?&#xD;&#xA;&#xD;&#xA;2. Can you launch an independent project? Question specific to Substrate. In Cosmos you don't really need to enable IBC to connect to the larger ecosystem. Is this possible for chains developed using Substrate as well?&#xD;&#xA;&#xD;&#xA;3. Will there be support for additional programming languages? Question specific to Cosmos SDK. IIRC Substrate pretty much supports all WASM languages.&#xD;&#xA;&#xD;&#xA;4. As a developer, why do most people go with Cosmos SDK? Asking because I see more projects with it. Is it simply because of a first mover advantage?&#xD;&#xA;&#xD;&#xA;5. What degree of flexibility is offered by both? That is to say, can a developer choose any consensus mechanism? Can one develop a POW chain? Can one develop a DAG? Naturally nether can support too much deviation and that's fine, what I'm curious about is whether you have enough tools to hit the ground running even when you take a non-conventional approach.&#xD;&#xA;&#xD;&#xA;6. Can you develop a sovereign chain that doesn't need Polkadot's shared security? Question specific to Substrate.&#xD;&#xA;&#xD;&#xA;7. If one launches a project and decides that they want to be part of the respective larger ecosystem. What are the barriers to entry for that.&#xD;&#xA;&#xD;&#xA;8. How do both of these compare to SDK offerings from Horizen or Lisk?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8478" PostHistoryTypeId="1" PostId="2271" RevisionGUID="24f84422-850c-4c11-988f-6759bc9fcf1a" CreationDate="2022-04-29T11:37:32.140" UserId="2452" Text="Question: Substrate vs Cosmos SDK" ContentLicense="CC BY-SA 4.0" />
  <row Id="8479" PostHistoryTypeId="3" PostId="2271" RevisionGUID="24f84422-850c-4c11-988f-6759bc9fcf1a" CreationDate="2022-04-29T11:37:32.140" UserId="2452" Text="|substrate-node-template|sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8480" PostHistoryTypeId="2" PostId="2272" RevisionGUID="3a44afca-17d2-4849-b58d-082fcd53e574" CreationDate="2022-04-29T12:17:01.153" UserId="172" Text="The transaction queue in Substrate has client side APIs that check for the validity of transactions and sorts them into two queues: the **ready** and **future** queues. Transactions in the *ready* queue are used to build the next block. And transactions end up in the *future* queue if they didn't satisfy some requirements to get added to the block but are still valid for the next block.&#xD;&#xA;&#xD;&#xA;&gt; When a transaction is submitted to the network, it is validated by a node and then gossiped to its peers and they will also validate the transaction and so on.&#xD;&#xA;&#xD;&#xA;Any transaction that's sent to a non-authoring node will just be gossiped to other nodes in the network and enter their transaction pool until it is received by an authoring node. Then, it will check if the transaction is valid and place it in order of transaction priority to include it in the block it broadcasts to the rest of the network. The other nodes receiving this block will then verify that it's properly constructed and once a majority reach consensus, the block is executed and state transitions are applied in the runtime.&#xD;&#xA;&#xD;&#xA;&gt; What is the process of a transaction being removed or dropped from a transaction pool.&#xD;&#xA;&#xD;&#xA;I'll take the opportunity here to provide a more detailed answer. &#xD;&#xA;&#xD;&#xA;## How transactions are validated&#xD;&#xA;&#xD;&#xA;Rules defined in the runtime helps the transaction pool determine whether a transaction is valid or not (using the [`transaction_validity` interface](https://docs.substrate.io/rustdocs/latest/sp_runtime/transaction_validity/index.html)). Basically, the client then checks if a transaction is properly &quot;tagged&quot; with some validity characteristics, returning a `Result`. You can see what these look like from the `Ok()` case [`ValidTransaction`](https://docs.substrate.io/rustdocs/latest/sp_runtime/transaction_validity/struct.ValidTransaction.html).&#xD;&#xA;To help perform these checks, Substrate uses a concept called **signed extensions**. They attach additional data to a transaction in the runtime side (see the existing [`SignedExtensions` in FRAME](https://github.com/paritytech/substrate/tree/master/frame/system/src/extensions)), which could really be thought of as a way to enforce the expected behaviour of a transaction. With them, the client can easily verify whatever these requirements are and accept or drop the transaction accordingly.&#xD;&#xA;&#xD;&#xA;### Transaction checks&#xD;&#xA;&#xD;&#xA;Any given transaction is &quot;tagged&quot; with a bunch of information that a transaction **requires** (i.e. properties that _must_ be satisfied before the transaction is added to a block, for example the nonce, the weight) and that it may **provide** (i.e. properties that will be satisfied once the transaction is added to a block, like a tip). &#xD;&#xA;&#xD;&#xA;The transaction queue has a runtime API, called [`TaggedTransactionQueue`](https://docs.substrate.io/rustdocs/latest/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html) that makes regular calls to these signed extensions to *keep checking* that a transaction is valid before it gets put in the ready queue. Valid just means &quot;*everything that the runtime says that this transaction *requires* to be valid is there*&quot;. &#xD;&#xA;&#xD;&#xA;The mechanism of making repeated calls into the runtime is a useful safeguard for verifying that transactions won't fail in a block and to add anti-spam and replay protection logic.&#xD;&#xA;With this, a transaction is either accepted (returning [`ValidTransaction`](https://docs.substrate.io/rustdocs/latest/sp_runtime/transaction_validity/struct.ValidTransaction.html)) or rejected (returning [`TransactionValidityError`](https://docs.substrate.io/rustdocs/latest/sp_runtime/transaction_validity/enum.TransactionValidityError.html)).&#xD;&#xA;&#xD;&#xA;The flow from when a user connects to an application and submits a transaction, to when the `validate_transaction` interface is hit looks like this:&#xD;&#xA;&#xD;&#xA;[![transaction-process-1][1]][1]&#xD;&#xA;&#xD;&#xA;### Invalid transactions&#xD;&#xA;&#xD;&#xA;A transaction can be invalidated or dropped at different stages in the queue (its not so black and white though).&#xD;&#xA;For instance:&#xD;&#xA;* When a transaction is too large for a block and has exceeded the its required  era (it will be dropped from the future queue).&#xD;&#xA;* When a transaction doesn't contain a valid signature (it will be dropped immediately).&#xD;&#xA;* When a transaction in the queue is stale (as it's already been included in a block) it will be dropped from the verifying queue.&#xD;&#xA;* When a transaction is too large to fit in the current block, it will be put back in a queue for a new verification round.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Now that all has been checked, assuming the transaction is valid the [`ValidTransactionBuilder`](https://docs.substrate.io/rustdocs/latest/sp_runtime/transaction_validity/struct.ValidTransactionBuilder.html) bundles the information previously verified and the transaction gets added to the _ready_ queue, where it's sorted by priority among other transactions in the queue for block authors to build the next block. Transactions get put in the _future_ queue if they haven't met all their requirements but still have valid longevity, so they can be revalidated.&#xD;&#xA;&#xD;&#xA;Have a look at the [API documentation](https://github.com/paritytech/substrate/tree/master/client/transaction-pool) for more details. Acknowledgements: huge thanks to Joyce for the helpful diagrams.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XgDxn.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZJ6Ik.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8482" PostHistoryTypeId="2" PostId="2273" RevisionGUID="be727c50-cdfe-40bd-b291-5aa644014e17" CreationDate="2022-04-29T12:24:00.203" UserId="2348" Text="I was reading about ink smart contracts and was curious is it possible to make bridge using ink, as there is already parity-common-bridges present. It would be very helpful if someone knows about this or can point to any documentation for the same." ContentLicense="CC BY-SA 4.0" />
  <row Id="8484" PostHistoryTypeId="1" PostId="2273" RevisionGUID="be727c50-cdfe-40bd-b291-5aa644014e17" CreationDate="2022-04-29T12:24:00.203" UserId="2348" Text="Can we write bridge smart contract using ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8485" PostHistoryTypeId="3" PostId="2273" RevisionGUID="be727c50-cdfe-40bd-b291-5aa644014e17" CreationDate="2022-04-29T12:24:00.203" UserId="2348" Text="|substrate-node|polkadot|rust|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8487" PostHistoryTypeId="6" PostId="2193" RevisionGUID="733b08ca-139e-4744-8693-f2944c1e2767" CreationDate="2022-04-29T12:37:40.950" UserId="34" Comment="versions matter" Text="|error|compilation|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8488" PostHistoryTypeId="24" PostId="2193" RevisionGUID="733b08ca-139e-4744-8693-f2944c1e2767" CreationDate="2022-04-29T12:37:40.950" Comment="Proposed by 34 approved by -1 edit id of 180" ContentLicense="CC BY-SA 4.0" />
  <row Id="8489" PostHistoryTypeId="6" PostId="2193" RevisionGUID="e45ab509-972b-4d2e-9c32-a6103521915d" CreationDate="2022-04-29T12:37:40.950" UserId="85" Comment="versions matter" Text="|error|compilation|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8490" PostHistoryTypeId="6" PostId="1033" RevisionGUID="5e6c87e2-fe15-4dfd-ac91-12d41ebad463" CreationDate="2022-04-29T12:39:41.293" UserId="85" Comment="edited tags" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8491" PostHistoryTypeId="2" PostId="2274" RevisionGUID="7540532e-665c-4f94-9849-9734f6f1ba7d" CreationDate="2022-04-29T12:52:40.137" UserId="351" Text="Answering question 1,2,4,5,6.&#xD;&#xA;1. Concerning barriers in substrate , one must know Rust (pretty advanced Rust) for easier start. But you can work with substrate using any other wasm compiled lang but thats bringing another layer of complexity because you need to implement the runtime logic and other low level types on your own language.&#xD;&#xA;&#xD;&#xA;2. Yes you can launch an independent project (completely independent as you start with your own validators)&#xD;&#xA;&#xD;&#xA;4. Why do most people go to cosmos sdk well there are over 200 projects building in substrate, and other pre deployed projects. And I dont know the number on Cosmos side.&#xD;&#xA;&#xD;&#xA;5.Degree of flexibility, First you need to know substrate offers highest degree of fexibility. Every part is customizable (Consensus, runtime, transaction pool, networking) It just depends on your level of skills. But parts such as runtime and consensus are mostly customized. (Even the database layer and blocksize).&#xD;&#xA;&#xD;&#xA;6. YES&#xD;&#xA;&#xD;&#xA;7. Did not understand the question, (which larger ecosystem?) If you mean bridges yes and with the help of XCMP and XCM you can tap in any other ecosystem." ContentLicense="CC BY-SA 4.0" />
  <row Id="8493" PostHistoryTypeId="5" PostId="2254" RevisionGUID="4255c5b4-bd0d-4a46-9e48-d4098bfc35ff" CreationDate="2022-04-29T13:26:52.267" UserId="1809" Comment="added edit note" Text="I'm pretty new with Substrate and Rust, but I was trying to generate a key pair using the `from_string` function of `sp_core::crypto::Pair` . I haven't had any luck and kept getting either `InvalidHexString` or `InvalidPhrase` errors when I try to pass valid key items generated from the `subkey` tool. &#xD;&#xA;&#xD;&#xA;For instance, I generated these key items from subkey tool by running the cmd `subkey generate`:&#xD;&#xA;```&#xD;&#xA;Secret phrase:       endorse doctor arch helmet master dragon wild favorite property mercy vault maze&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x78b8fbbbea218509c00d3531e72128d4eae54089f15deb24d721e30b351733ad&#xD;&#xA;  Public key (hex):  0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Account ID:        0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Public key (SS58): 5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;  SS58 Address:      5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I pass in the secret phrase I got from subkey tool to the `from_string` function, I get an `InvalidPhrase` error when submitting the composed extrinsic, even tho it was generated from subkey. This is sample code below:&#xD;&#xA;```rust&#xD;&#xA;  let priv_key: String = &quot;endorse/doctor/arch/helmet/master/dragon/wild/favorite/property/mercy/vault/maze&quot;.to_owned();&#xD;&#xA;  let from = Pair::from_string(&amp;priv_key[..], None).unwrap();&#xD;&#xA;  //let from = AccountKeyring::Bob.pair();&#xD;&#xA;  let api = Api::new(client).map(|api| api.set_signer(from)).unwrap();&#xD;&#xA;  ....&#xD;&#xA;  extrinsic_submitters::submit_to_save_item(api, incoming_item, now, datetime);&#xD;&#xA;```&#xD;&#xA;This is the error I get upon submission of extrinsic:&#xD;&#xA;```&#xD;&#xA;thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidPhrase', src/services/route_actions/mod.rs:76:53&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get similar error when using the secret seed as argument for `from_string`, only difference is I get `InvalidHexString` error when submitting the composed extrinsic. I was trying to follow the documentation of `from_string` usage in this link: https://docs.substrate.io/rustdocs/latest/sp_core/crypto/trait.Pair.html &#xD;&#xA;&#xD;&#xA;Any tips on this on how to make this work? I was thinking the items I generated were valid. My goal was to be able to pass in a valid secret phrase or secret seed in this code to generate a key pair. I would then like to be able to sign an extrinsic using the generated key pair before passing the extrinsic to the chain. Thanks, all!&#xD;&#xA;&#xD;&#xA;EDIT: &#xD;&#xA;I just want to note that the secret phrases and secret seeds I added here aren't used in production... " ContentLicense="CC BY-SA 4.0" />
  <row Id="8494" PostHistoryTypeId="2" PostId="2275" RevisionGUID="5f51d5da-38c5-48d4-95fd-9aa3f94d820b" CreationDate="2022-04-29T13:32:07.560" UserId="2408" Text="My current toolchains and targets look like this&#xD;&#xA;```&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-2022-01-01-x86_64-unknown-linux-gnu&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-pc-windows-gnu&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.60.0 (7737e0b5c 2022-04-04)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Should I use `stable` or `nightly`? " ContentLicense="CC BY-SA 4.0" />
  <row Id="8496" PostHistoryTypeId="1" PostId="2275" RevisionGUID="5f51d5da-38c5-48d4-95fd-9aa3f94d820b" CreationDate="2022-04-29T13:32:07.560" UserId="2408" Text="Which toolchain should I use to build Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="8497" PostHistoryTypeId="3" PostId="2275" RevisionGUID="5f51d5da-38c5-48d4-95fd-9aa3f94d820b" CreationDate="2022-04-29T13:32:07.560" UserId="2408" Text="|rust|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8498" PostHistoryTypeId="2" PostId="2276" RevisionGUID="0a6fe61b-3bcc-4dfc-a6a0-355439af4f2c" CreationDate="2022-04-29T13:37:22.277" UserId="1789" Text="I was following this tutorial all the way up to registering a parachain ID.&#xD;&#xA;https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/#registration-transaction&#xD;&#xA;&#xD;&#xA;My parachain is based on polkadot-v0.9.18, a little old, with the latest(I think) Polkadot browser app v0.113.1.&#xD;&#xA;&#xD;&#xA;I chose Option 1: paraSudoWrapper.sudoScheduleParaInitialize&#xD;&#xA;&#xD;&#xA;Polkadot browser app -&gt; Developer -&gt; Extrinsics &gt; submission tab&#xD;&#xA;-&gt; paraSudoWrapper -&gt; sudoScheduleParaInitialize(id, genesis)&#xD;&#xA;&#xD;&#xA;In the extrinsics parameters, specify:&#xD;&#xA;- Account = ALICE&#xD;&#xA;- Set the id: ParaId to 2000&#xD;&#xA;- genesisHead: upload the file para-2000-genesis (from the previous step)&#xD;&#xA;- validationCode: upload the file para-2000-wasm (from the previous step)&#xD;&#xA;- Set the parachain: Bool option to Yes&#xD;&#xA;- click on &quot;Submit Transaction&quot;&#xD;&#xA;&#xD;&#xA;Green tick: parasSudoWrapper.sudoScheduleParaInitialize inblock&#xD;&#xA;&#xD;&#xA;Red error: System.ExtrinsicFailed: Bad Origin&#xD;&#xA;&#xD;&#xA;Blue light bulb: balances.Withdraw, balances.Deposit, extrinsic event&#xD;&#xA;&#xD;&#xA;It seems the tutorial is a little out of date, not mentioning about which account to use... but what did I do wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8500" PostHistoryTypeId="1" PostId="2276" RevisionGUID="0a6fe61b-3bcc-4dfc-a6a0-355439af4f2c" CreationDate="2022-04-29T13:37:22.277" UserId="1789" Text="Cannot register parachain ID: System Extrinsic Failed: Bad Origin" ContentLicense="CC BY-SA 4.0" />
  <row Id="8501" PostHistoryTypeId="3" PostId="2276" RevisionGUID="0a6fe61b-3bcc-4dfc-a6a0-355439af4f2c" CreationDate="2022-04-29T13:37:22.277" UserId="1789" Text="|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8502" PostHistoryTypeId="2" PostId="2277" RevisionGUID="725dc96b-1bcf-4d70-915e-fc59855cadf1" CreationDate="2022-04-29T13:40:12.793" UserId="2451" Text="I have found the slides from zksummit7:&#xD;&#xA;https://drive.google.com/file/d/1BrKuqib5msj_M_kiCorSYWBFvP9VlTCg/view?usp=sharing&#xD;&#xA;&#xD;&#xA;The slides reference the github repo:&#xD;&#xA;https://github.com/w3f/apk-proofs&#xD;&#xA;&#xD;&#xA;Of relevance is the application of this construction for a light client example:&#xD;&#xA;https://github.com/w3f/apk-proofs/blob/main/bw6/examples/recursive.rs&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8504" PostHistoryTypeId="2" PostId="2278" RevisionGUID="e616450c-b658-4e93-b0b6-0f5518420c89" CreationDate="2022-04-29T13:51:30.723" UserId="3" Text="How can I query the length of a block used for normal transactions?&#xD;&#xA;&#xD;&#xA;After seeing [check_block_length](https://github.com/paritytech/substrate/blob/95067ccc3a7683768f8a10036785cde8d5f8a098/frame/system/src/extensions/check_weight.rs#L68-L84), I would have expected to be able to use `allExtrinsicsLen`, but this _always_ returns `None`, even if the block contains transactions. Is that expected behavior?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8506" PostHistoryTypeId="1" PostId="2278" RevisionGUID="e616450c-b658-4e93-b0b6-0f5518420c89" CreationDate="2022-04-29T13:51:30.723" UserId="3" Text="How to query block length using polkadot-js" ContentLicense="CC BY-SA 4.0" />
  <row Id="8507" PostHistoryTypeId="3" PostId="2278" RevisionGUID="e616450c-b658-4e93-b0b6-0f5518420c89" CreationDate="2022-04-29T13:51:30.723" UserId="3" Text="|polkadot-js|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8508" PostHistoryTypeId="5" PostId="2249" RevisionGUID="9a35408a-f8be-4053-85db-b89da0f4c972" CreationDate="2022-04-29T13:54:56.757" UserId="29" Comment="deleted 83 characters in body" Text="Broadly speaking an extrinsic is data that is external to the blockchain that is included in a block - think of the extrinsic root in a block with all its children ([example](https://explorer.polkascan.io/kusama/block/12457588)). You can think of an extrinsic as a broader term to encompass, as the definition says, [inherents](https://docs.substrate.io/v3/concepts/extrinsics/#inherents), signed transactions, and unsigned transactions - these are all types of extrinsics - these are all external *proposed* runtime calls.&#xD;&#xA;&#xD;&#xA;**Is a transaction an extrinsic?**&#xD;&#xA;&#xD;&#xA;&gt; Yes, in the same sense that a rose is a flower.&#xD;&#xA;&#xD;&#xA;A transaction is a type of extrinsic.&#xD;&#xA;&#xD;&#xA;**Bonus: Why is it called transaction pool and not extrinsic pool?**&#xD;&#xA;&#xD;&#xA;Inherents, which are another type of extrinsic, are not included in the transaction pool and instead are inserted into the block by the block authors." ContentLicense="CC BY-SA 4.0" />
  <row Id="8509" PostHistoryTypeId="2" PostId="2279" RevisionGUID="3ccb5ba1-83f9-4a56-9075-fc996e7e1e0f" CreationDate="2022-04-29T13:59:14.573" UserId="73" Text="You need to wrap the call into `sudo.Sudo`. The call `sudoScheduleParaInitialize` requires that the origin is `sudo`." ContentLicense="CC BY-SA 4.0" />
  <row Id="8511" PostHistoryTypeId="2" PostId="2280" RevisionGUID="3cbb53eb-c07c-457f-ad75-073ca2423fae" CreationDate="2022-04-29T14:00:08.487" UserId="464" Text="We want to perform a large migration on a chain composed with standard pallets ( balance, babe, ... ) to a most recent substrate tag which is polkadot-v0.9.18. &#xD;&#xA;&#xD;&#xA;Is there a way to call all the migrations at once or do we need to upgrade version by version until we are at the desired one ? &#xD;&#xA;&#xD;&#xA;If yes how do we trigger all those updates at once in our runtime directly ? ( not like nick pallet one )" ContentLicense="CC BY-SA 4.0" />
  <row Id="8513" PostHistoryTypeId="1" PostId="2280" RevisionGUID="3cbb53eb-c07c-457f-ad75-073ca2423fae" CreationDate="2022-04-29T14:00:08.487" UserId="464" Text="Perform large migration between substrate versions" ContentLicense="CC BY-SA 4.0" />
  <row Id="8514" PostHistoryTypeId="3" PostId="2280" RevisionGUID="3cbb53eb-c07c-457f-ad75-073ca2423fae" CreationDate="2022-04-29T14:00:08.487" UserId="464" Text="|substrate-node|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8515" PostHistoryTypeId="2" PostId="2281" RevisionGUID="0e7a5a18-8f90-4311-89a3-df53654da1e3" CreationDate="2022-04-29T14:19:07.330" UserId="608" Text="I've seen in multiple online networks(chains) that they do not use the pallet ```sudo```. We're trying to figure out how to take the pallet out of our network in order to leave everything to Governance. &#xD;&#xA;&#xD;&#xA;For example, how are they doing Runtime Upgrades without the SUDO pallet? Or how do they increase the validator count?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8517" PostHistoryTypeId="1" PostId="2281" RevisionGUID="0e7a5a18-8f90-4311-89a3-df53654da1e3" CreationDate="2022-04-29T14:19:07.330" UserId="608" Text="How would someone go without the SUDO pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8518" PostHistoryTypeId="3" PostId="2281" RevisionGUID="0e7a5a18-8f90-4311-89a3-df53654da1e3" CreationDate="2022-04-29T14:19:07.330" UserId="608" Text="|runtime-upgrade|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8519" PostHistoryTypeId="2" PostId="2282" RevisionGUID="9ee736c5-796f-4089-a28f-14ff6deb9b66" CreationDate="2022-04-29T14:20:49.240" UserId="1809" Text="This is how I do it in an external Rust project.&#xD;&#xA;&#xD;&#xA;In this example, I have a pallet called `Auditor` in my node, and a dispatchable function called `claim_log` that can accept extrinsics. &#xD;&#xA;&#xD;&#xA;I generate a signer first so that my extrinsic can be signed:&#xD;&#xA;```rust&#xD;&#xA;use substrate_api_client::{Api, compose_extrinsic, UncheckedExtrinsicV4, XtStatus};&#xD;&#xA;use substrate_api_client::rpc::WsRpcClient;&#xD;&#xA;.....&#xD;&#xA;// Get the private key of the sender here&#xD;&#xA;  let from = AccountKeyring::Charlie.pair();&#xD;&#xA;  let api = Api::new(client).map(|api| api.set_signer(from)).unwrap();&#xD;&#xA;```&#xD;&#xA;Compose the extrinsic and sign it&#xD;&#xA;```rust&#xD;&#xA;let xt: UncheckedExtrinsicV4&lt;_&gt; = compose_extrinsic!(&#xD;&#xA;      api.clone(),&#xD;&#xA;      &quot;Auditor&quot;,&#xD;&#xA;      &quot;claim_log&quot;,&#xD;&#xA;      log_to_be_claimed.filename.to_string().into_bytes()&#xD;&#xA;      // TODO: maybe get the date here&#xD;&#xA;    );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I then submit the extrinsic to the node using this&#xD;&#xA;```&#xD;&#xA;let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;I am utilizing this substrate project to perform my dispatchable functions that accept extrinsics: https://github.com/scs/substrate-api-client" ContentLicense="CC BY-SA 4.0" />
  <row Id="8521" PostHistoryTypeId="2" PostId="2283" RevisionGUID="5ed4c3bd-7f42-4d42-a302-134d95798479" CreationDate="2022-04-29T14:25:22.480" UserId="73" Text="The use the `Democracy` pallet. This pallet also offers you the possibility to execute sudo calls.&#xD;&#xA;&#xD;&#xA;See [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/rgafiyatullin/substrate/blob/4d45aca38d7799bab2c85d45aee1ab1dd22d7b1d/frame/democracy/src/lib.rs#L1682-L1686" ContentLicense="CC BY-SA 4.0" />
  <row Id="8523" PostHistoryTypeId="5" PostId="2283" RevisionGUID="732058de-407f-41cf-aa95-0ce94cd0c8ac" CreationDate="2022-04-29T14:33:09.937" UserId="29" Comment="added 1 character in body" Text="They use the `Democracy` pallet. This pallet also offers you the possibility to execute sudo calls.&#xD;&#xA;&#xD;&#xA;See [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/rgafiyatullin/substrate/blob/4d45aca38d7799bab2c85d45aee1ab1dd22d7b1d/frame/democracy/src/lib.rs#L1682-L1686" ContentLicense="CC BY-SA 4.0" />
  <row Id="8524" PostHistoryTypeId="2" PostId="2284" RevisionGUID="eefe1706-c595-43c8-b750-387c13873d1e" CreationDate="2022-04-29T14:35:44.307" UserId="627" Text="`AllExtrinsicsLen` is one of the temporary environment storage entries that are only used in the block-building, not needed for the processing of subsequent blocks and therefore cleared in the [finalize step](https://github.com/paritytech/substrate/blob/95067ccc3a7683768f8a10036785cde8d5f8a098/frame/system/src/lib.rs#L1273). &#xD;&#xA;&#xD;&#xA;The specific entry is [cleared here](https://github.com/paritytech/substrate/blob/95067ccc3a7683768f8a10036785cde8d5f8a098/frame/system/src/lib.rs#L1309). &#xD;&#xA;&#xD;&#xA;Only some environment variables survive to be cleared at the start of the next block, they are [listed here](https://github.com/paritytech/substrate/blob/95067ccc3a7683768f8a10036785cde8d5f8a098/frame/system/src/lib.rs#L1311-L1320). The basics of this is that if something is not needed for the processing of future blocks, they just add bloat to the state, so are not committed.&#xD;&#xA;&#xD;&#xA;If you wish to get the length of all extrinsic in a block, the best approach is to read the block and add up all the individual extrinsic lengths." ContentLicense="CC BY-SA 4.0" />
  <row Id="8526" PostHistoryTypeId="2" PostId="2285" RevisionGUID="f18d41c6-3a81-44dc-a241-e306998ddfec" CreationDate="2022-04-29T14:42:05.540" UserId="94" Text="You have to use a concrete `Pair` implementation, since the `Pair` from `sp_core::crypto` is just a trait.  &#xD;&#xA;`sr25519` is the default of subkey. By using that it produces the same address that you saw in the console.  &#xD;&#xA;No need for `/` or anything, just the `from_string` method and `None` as password.  &#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn test_from_string() {&#xD;&#xA;	use sp_core::{sr25519, Pair};&#xD;&#xA;	let pair = sr25519::Pair::from_string(&quot;endorse doctor arch helmet master dragon wild favorite property mercy vault maze&quot;, None).unwrap();&#xD;&#xA;	&#xD;&#xA;	let want = &quot;14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510 (5CY5hAGk...)&quot;;&#xD;&#xA;	let got = format!(&quot;{:?}&quot;, pair.public());&#xD;&#xA;	assert_eq!(want, got);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8528" PostHistoryTypeId="2" PostId="2286" RevisionGUID="e0eaf188-97be-4984-be57-40105707d3fa" CreationDate="2022-04-29T14:46:33.403" UserId="172" Text="Yes, in Substrate, transactions can generally be thought of as any piece of data that's intended for the transaction pool (and consequently, could potentially be included in a block). But there are technical nuances needed to be spelled out: the term &quot;transaction&quot; is in fact quite misleading, although does have merit from a user friendliness perspective (yes, technically *extrinsic pool* would be more accurate). &#xD;&#xA; &#xD;&#xA;## Extrinsics (a.k.a. Types of Transactions)&#xD;&#xA;&#xD;&#xA;In Substrate, a &quot;*thing that could exist in the transaction pool*&quot; &amp;mdash; more commonly known as &quot;a transaction&quot; in the non-Substrate world &amp;mdash; can be one of 3 distinct types, all of which fall under a broader category called  &quot;**extrinsics**&quot;. Extrinsics is just a general term to mean *&quot;any information that originates from _outside_ a runtime&quot;*. These are:&#xD;&#xA;&#xD;&#xA;* **Signed transactions**: these must contain the signature of the account sending the inbound request to the runtime.&#xD;&#xA;  With signed transactions, the account used to submit the request typically pays a transaction fee and must sign it using the account's private key.&#xD;&#xA;* **Unsigned transactions**: these don't carry any information about who submitted the transaction, since the format of this type of transaction doesn't require a signature.&#xD;&#xA;You can define what conditions must be met for such a transaction to be valid (FRAME has an [attribute macro](https://docs.substrate.io/rustdocs/latest/frame_support/attr.pallet.html#validate-unsigned-palletvalidate_unsigned-optional) to do this).&#xD;&#xA;* **Inherents**: are a special type of unsigned transaction made by block authors which carry information required to build a block such as timestamps, storage proofs and uncle blocks.&#xD;&#xA;&#xD;&#xA;## Key differences&#xD;&#xA;&#xD;&#xA;Here are some key differences between the different types of extrinsics:&#xD;&#xA;&#xD;&#xA;* Unsigned transaction types consume more resources because some custom validation logic must be checked to validate the request.&#xD;&#xA;* Unsigned transactions have no economic deterrent to prevent spam or replay attacks, so custom logic is required to protect the network from these types of transactions being misused.&#xD;&#xA;* Inherents exist to address the need of adding some data to a block, whereas signed or unsigned transactions exist to potentially change the state of the blockchain.&#xD;&#xA;&#xD;&#xA;## Examples&#xD;&#xA;&#xD;&#xA;Here are some examples of each type of extrinsic being used in different scenarios:&#xD;&#xA;&#xD;&#xA;| Scenario | Function call example | Type | Reason |&#xD;&#xA;| -------- | ---- | -------------- | ----------- &#xD;&#xA;| Bob wants to send some tokens to Alice and tip the block author to give this transaction more priority, using the Balances pallet. | `pallet_balances::Call::transfer` in [Polkadot](https://polkadot.subscan.io/extrinsic/8749664-2) | Signed transaction | This function can be called by any account, so we must ensure that the caller signs the transaction and pays a fee for it to be processed.&#xD;&#xA;| Charlie proposes a tip to reward Dave using the Tipping pallet. | `pallet_tips::Call::report_awesome` in [Polkadot](https://polkadot.subscan.io/extrinsic/8818237-2) | Signed transaction | This function is designed so that any account can call it, by depositing some amount and giving a reason for the tip which will be stored on-chain.&#xD;&#xA;| The on-chain council passes some motion that includes submitting a batch of valid transactions to be executed. | `pallet_utility::Call::batch` in [Polkadot](https://polkadot.subscan.io/council/131) | Unsigned transaction | This type of extrinsic can only be submitted if a majority of the council approves it and cannot be executed by any single account.&#xD;&#xA;| A validator node sends a signal to the network to indicate it's online. | `pallet_im_online::Call::heartbeat` in [Kusama](https://kusama.subscan.io/extrinsic/11232100-5) | Unsigned transaction | This can only be called by a node that's registered as a validator in the network, which is verified as part of an internal check of the function's logic and allows the node to call it without paying any fees. &#xD;&#xA;| The network wants block authoring nodes to include the current timestamp into the blocks they produce. | `pallet_timestamp::Call::now` in [Kusama](https://kusama.subscan.io/extrinsic/11232115-0) | Inherent | This is a special extrinsic that can only be included in a block by an authoring node. &#xD;&#xA;| A parachain needs to send its relay chain the validation data the relay chain expects. | `paras_inherent::Call::enter` in [Kusama](https://kusama.subscan.io/extrinsic/11232398-1) | Inherent | This is a special type of extrinsic that can only be sent by a collator node. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8530" PostHistoryTypeId="2" PostId="2287" RevisionGUID="31ad2a4a-8237-4035-8c4b-e36a3ca0fcf0" CreationDate="2022-04-29T14:48:11.730" UserId="34" Text="The primary thing that nodes look for is a common `ProtocolID`, this is what peers at the LibP2P layer your node will try and communicate with at all. &#xD;&#xA;&#xD;&#xA;This is best outlined in [this issue](https://github.com/paritytech/substrate/issues/7746) to replace `protocolId` with the genesis hash, where failure to set a unique ID can lead to nodes of different networks (even IPFS nodes) start to communicate but because they are incompatible protocols above this, just case noise and bloat your node's bandwidth.&#xD;&#xA;&#xD;&#xA;One mitigation here is traditional: use firewalls to ensure that you are screening out connections you do not want. Substrate in itself only protects what happens once it receives messages, and should not be tasked with more resource intensive tasks like DOS protection. Also a good firewall and opsec will make it much harder for your node to be compromised in general, where you likely store your keys for nodes' network ID and possibly validator associated signing keys. " ContentLicense="CC BY-SA 4.0" />
  <row Id="8532" PostHistoryTypeId="52" PostId="2256" RevisionGUID="56af49b7-a952-4974-adc2-462981cf9a98" CreationDate="2022-04-29T14:53:18.823" />
  <row Id="8533" PostHistoryTypeId="2" PostId="2288" RevisionGUID="30b447c1-4325-4fbc-8c06-6cc6cbbb07fe" CreationDate="2022-04-29T14:56:34.743" UserId="2452" Text="Just one question.&#xD;&#xA;Wny do we see more projects using the Cosmos SDK?&#xD;&#xA;&#xD;&#xA;Does it have any particular advantages besides the first mover advantage?&#xD;&#xA;As a developer, if you do prefer Substrate then what made you pick it over Cosmos SDK. " ContentLicense="CC BY-SA 4.0" />
  <row Id="8535" PostHistoryTypeId="1" PostId="2288" RevisionGUID="30b447c1-4325-4fbc-8c06-6cc6cbbb07fe" CreationDate="2022-04-29T14:56:34.743" UserId="2452" Text="Substrate vs Cosmos Tendiemint SDK" ContentLicense="CC BY-SA 4.0" />
  <row Id="8536" PostHistoryTypeId="3" PostId="2288" RevisionGUID="30b447c1-4325-4fbc-8c06-6cc6cbbb07fe" CreationDate="2022-04-29T14:56:34.743" UserId="2452" Text="|sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8537" PostHistoryTypeId="5" PostId="2249" RevisionGUID="06a595bd-10d4-4232-92c8-ba543345eb0a" CreationDate="2022-04-29T15:13:32.890" UserId="29" Comment="Inherents aren't runtime calls. Time stamps are a good example." Text="Broadly speaking an extrinsic is data that is external to the blockchain that is included in a block - think of the extrinsic root in a block with all its children ([example](https://explorer.polkascan.io/kusama/block/12457588)). You can think of an extrinsic as a broader term to encompass, as the definition says, [inherents](https://docs.substrate.io/v3/concepts/extrinsics/#inherents), signed transactions, and unsigned transactions - these are all types of extrinsics.&#xD;&#xA;&#xD;&#xA;**Is a transaction an extrinsic?**&#xD;&#xA;&#xD;&#xA;&gt; Yes, in the same sense that a rose is a flower.&#xD;&#xA;&#xD;&#xA;A transaction is a type of extrinsic.&#xD;&#xA;&#xD;&#xA;**Bonus: Why is it called transaction pool and not extrinsic pool?**&#xD;&#xA;&#xD;&#xA;Inherents, which are another type of extrinsic, are not included in the transaction pool and instead are inserted into the block by the block authors." ContentLicense="CC BY-SA 4.0" />
  <row Id="8538" PostHistoryTypeId="5" PostId="2249" RevisionGUID="595a8e19-ce69-418b-82ea-126058b23ea9" CreationDate="2022-04-29T15:34:41.497" UserId="29" Comment="Edited it according to @bkchr's comment" Text="Broadly speaking an extrinsic is data that is external to the blockchain that is included in a block - think of the extrinsic root in a block with all its children ([example](https://explorer.polkascan.io/kusama/block/12457588)). You can think of an extrinsic as a broader term to encompass, as the definition says, [inherents](https://docs.substrate.io/v3/concepts/extrinsics/#inherents), signed transactions, and unsigned transactions - these are all types of extrinsics.&#xD;&#xA;&#xD;&#xA;**Is a transaction an extrinsic?**&#xD;&#xA;&#xD;&#xA;&gt; Yes, in the same sense that a rose is a flower.&#xD;&#xA;&#xD;&#xA;A transaction is a type of extrinsic.&#xD;&#xA;&#xD;&#xA;**Bonus: Why is it called transaction pool and not extrinsic pool?**&#xD;&#xA;&#xD;&#xA;It is called transaction pool because it works directly with `signed` and `unsigned` transactions. Technically, it could also work with inherents since they are `unsigned` transactions." ContentLicense="CC BY-SA 4.0" />
  <row Id="8539" PostHistoryTypeId="5" PostId="2242" RevisionGUID="c9138024-afa3-463e-9ff8-1aa8d2bef1a8" CreationDate="2022-04-29T17:17:09.437" UserId="45" Comment="Change the answer to the updated question" Text="This happens because you apply `#[pallet::compact]` attribute to the type `Option&lt;u128&gt;`. `u128` can be represented as compact. `Option&lt;u128&gt;` can't though, since it's an option.&#xD;&#xA;&#xD;&#xA;In this case, to make it work you will need to remove the `#[pallet::compact]` attribute and then change the type to `Option&lt;Compact&lt;u128&gt;&gt;`. [`Compact`](https://docs.rs/parity-scale-codec/3.1.2/parity_scale_codec/struct.Compact.html) is a usual tuple struct and you can extract the value by the reading `.0`.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8540" PostHistoryTypeId="2" PostId="2289" RevisionGUID="a3654525-5b95-4db4-9c8b-25c557792bb1" CreationDate="2022-04-29T17:34:41.807" UserId="351" Text="1.Maximum flexibility&#xD;&#xA;&#xD;&#xA;2.Rust lang&#xD;&#xA;&#xD;&#xA;3.Ecosystem of senior devs&#xD;&#xA;&#xD;&#xA;4.Cosmos has fewer modules and mostly they focus on Assets, but Substrate I can get the light if I want to build other than asset oriented protocal such as Phala network.&#xD;&#xA;&#xD;&#xA;5.Gavin wood" ContentLicense="CC BY-SA 4.0" />
  <row Id="8542" PostHistoryTypeId="52" PostId="2262" RevisionGUID="8fab0b3f-cff3-4833-95d1-9df1fae4be1b" CreationDate="2022-04-29T17:37:41.903" />
  <row Id="8543" PostHistoryTypeId="34" PostId="1871" RevisionGUID="c0718439-72fe-461c-b89b-add779247d1f" CreationDate="2022-04-29T18:00:25.053" UserId="-1" Comment="5" />
  <row Id="8544" PostHistoryTypeId="2" PostId="2290" RevisionGUID="adb8c213-f3c1-465f-9cbb-e4716b9455ad" CreationDate="2022-04-29T18:14:56.893" UserId="227" Text="&gt;but `serde` is not able to be used when writing these contracts due to a float being used in the library &#xD;&#xA;&#xD;&#xA;Yes, this is intentional. Floating point numbers should not be used directly in a blockchain context ‒ the tl;dr is that floating point arithmetic is non-deterministic which means that different processors compute (slightly) different results for the same operation.&#xD;&#xA;&#xD;&#xA;See the ink! FAQ on [Why is it not possible to use floating point data types in ink!?](https://paritytech.github.io/ink-docs/faq/#why-is-it-not-possible-to-use-floating-point-data-types-in-ink-how-do-i-implement-returning-a-decimal-number) for more details.&#xD;&#xA;&#xD;&#xA;&gt;My question is if there is an alternative to `serde` that will allow me to parse the JSON response from my HTTP request to be able to load into my `RmrkNft` struct?&#xD;&#xA;&#xD;&#xA;I know too little about Phala, but in general the idea for smart contracts is that parsing of any kind should not happen in a smart contract. Smart contracts charge users fees for their execution and hence a user would pay every time something needs to be parsed. It's better to put the parsing outside ‒ in the frontend, the Dapp, or in your case the runtime ‒ and submit just the result of this parsing to the smart contract.&#xD;&#xA;&#xD;&#xA;Unfortunately this doesn't really answer your question how this can be done in a FAT contract in the Phala TEE, but maybe someone from Phala can answer this? I'll forward the question to some people as well.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8546" PostHistoryTypeId="2" PostId="2291" RevisionGUID="51af737d-4018-4a86-8a71-a934eebf2a8a" CreationDate="2022-04-29T18:25:47.573" UserId="676" Text="What makes me confused about the runtime is the Externalities. I found the definition in `sp_externalities`, moreever I found that the `pub fn set_and_run_with_externalities(ext: &amp;mut dyn Externalities, f: F)` will supply an approach to work with the externalities mutable reference. So like the `TextExternalities` which makes us to run some runtime code in a test environment. And the global variables `environmental::environmental!(ext: trait Externalities);` supplies the Externalities register on Substrate. &#xD;&#xA;&#xD;&#xA;Due to befor explained I can write thie code as below &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;TestExternalities.execute_with(||{&#xD;&#xA;     Balances::deposit_creating(&amp;ALICE, 100_000_000);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My question is that if the pallet like balances will be handled by the pallet marcos, and auto carry the reference named `ext`? Or at somewhere the substrate client side code could call the `sp_externalities::set_and_run_with_externalities(&amp;mut some_ext, ||{ // really code })` . &#xD;&#xA;&#xD;&#xA;In short I wanna know if there some methods to add my new runtime interface or externalities into the runtime to replace some behaviors of the substrate native storage implementation&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="8548" PostHistoryTypeId="1" PostId="2291" RevisionGUID="51af737d-4018-4a86-8a71-a934eebf2a8a" CreationDate="2022-04-29T18:25:47.573" UserId="676" Text="How externalities work in runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8549" PostHistoryTypeId="3" PostId="2291" RevisionGUID="51af737d-4018-4a86-8a71-a934eebf2a8a" CreationDate="2022-04-29T18:25:47.573" UserId="676" Text="|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8550" PostHistoryTypeId="2" PostId="2292" RevisionGUID="07dec053-99e6-4aa3-96fd-b30b9411ce85" CreationDate="2022-04-29T18:37:00.800" UserId="34" Text="**TL;DR: you likely should use the latest of both stable and nightly when building Substrate chains at any given time. Update regularly with `rustup update`.**&#xD;&#xA;&#xD;&#xA;It is quite likely the toolchain you _should_ use for a given tag/release of Substrate (like `polkadot-v0.9.19`) is best discovered in the:&#xD;&#xA; - [release notes of Polkadot](https://github.com/paritytech/polkadot/releases/tag/v0.9.19),&#xD;&#xA; - Polkadot release _branch_ [`nix.sh`&#xD;&#xA;   configuration](https://github.com/paritytech/substrate/blob/polkadot-v0.9.19/shell.nix#L8) in the Substrate,&#xD;&#xA; - or the [`.gitlab-ci.yml`](https://github.com/paritytech/substrate/blob/master/.gitlab-ci.yml#L41) target&#xD;&#xA;   [image](https://hub.docker.com/r/paritytech/ci-linux/tags?page=1&amp;name=production) used to do regular builds (matching the Substrate version you are using to the version of the image) and inspect it's nightly version.&#xD;&#xA;&#xD;&#xA;You need _both_ the stable and nightly, specifically nightly for the Wasm build, that is required for now (but [not forever](https://github.com/paritytech/substrate/issues/1252) we expect)." ContentLicense="CC BY-SA 4.0" />
  <row Id="8552" PostHistoryTypeId="2" PostId="2293" RevisionGUID="b5002b6c-2d6f-4286-ad9e-e3576d3b1a94" CreationDate="2022-04-29T18:55:58.863" UserId="227" Text="I'm not sure if I understand correctly what you mean with &quot;to make bridge using ink!&quot;, so I'll try to answer what I guess you mean.&#xD;&#xA;&#xD;&#xA;So in the Substrate universe you would build a bridge to another chain as a _Substrate runtime module_ and not as a smart contract. Those are two different things in Substrate. `parity-common-bridges` is a collection of Substrate modules (those are called &quot;pallets&quot; in Substrate terminology) to build a bridge.&#xD;&#xA;&#xD;&#xA;Substrate has a number of other pallets, one of them is called `pallet-contracts`. It's a module that you can add to your Substrate runtime to give it smart contract capabilities. In ink! you can write smart contracts for this `pallet-contracts`.&#xD;&#xA;&#xD;&#xA;Not every chain needs smart contracts, on Polkadot/Kusama many actually don't have a need for smart contracts because they realize this functionality in a different way.&#xD;&#xA;&#xD;&#xA;I suspect that your questions stems from a confusion that people learning about Substrate often run into: that most things are implemented as a Substrate runtime and not as a smart contract.&#xD;&#xA;&#xD;&#xA;There is a great answer to Smart Contracts vs. Runtimes on Substrate here: [When should I build a Substrate Runtime Module versus a Substrate Smart Contract?](https://stackoverflow.com/questions/56040779/when-should-i-build-a-substrate-runtime-module-versus-a-substrate-smart-contract).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8554" PostHistoryTypeId="2" PostId="2294" RevisionGUID="071e5706-556d-42a8-a74d-80e3e9bc10f5" CreationDate="2022-04-29T19:14:17.480" UserId="227" Text="&gt;The `Encode`, `Decode` allows serialization, deserialization of a struct into single bytes as we know, which also means that if we don't derive `SpreadLayout` for that custom struct, the default storage layout for that struct is `PackedLayout` and the struct data is packed into one single cell.&#xD;&#xA;&#xD;&#xA;`Encode`/`Decode` does not influence the storage layout ink! uses. By default the struct is `SpreadLayout` ‒ so every struct field is put into its own single storage cell. &#xD;&#xA;&#xD;&#xA;This page from the ink! docs has some more details: https://paritytech.github.io/ink-docs/datastructures/spread-storage-layout.&#xD;&#xA;&#xD;&#xA;We're currently working on ink! 4.0 which will greatly simplify the concepts of `SpreadLayout` and `PackedLayout`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="8556" PostHistoryTypeId="2" PostId="2295" RevisionGUID="0ad752d5-22d5-43e7-965d-a8487c8526b3" CreationDate="2022-04-29T19:15:38.033" UserId="1809" Text="I was trying to use the key pair I generated using `from_string` function from `sp_core::crypto::Pair`, but the extrinsics I signed using this key pair does not get submitted to the chain. I get this error:&#xD;&#xA;```&#xD;&#xA;thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidHexString(InvalidStringLength)', src/services/route_actions/extrinsic_submitters.rs:25:73&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The secret phrase I provided to the `from_string` function are valid since this is generated from `subkey tool` (NOT USED IN PROD). This is my code snippet&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  let priv_key: String = &quot;endorse doctor arch helmet master dragon wild favorite property mercy vault maze&quot;.to_owned();&#xD;&#xA;  let from = Pair::from_string(&amp;priv_key[..], None).unwrap();&#xD;&#xA;  //let from = AccountKeyring::Bob.pair();&#xD;&#xA;  let api = Api::new(client).map(|api| api.set_signer(from)).unwrap();&#xD;&#xA;  ....&#xD;&#xA;  extrinsic_submitters::submit_to_save_item(api, incoming_item, now, datetime);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the code for the submission of the extrinsic I have:&#xD;&#xA;```rust&#xD;&#xA;#[allow(clippy::redundant_clone)]&#xD;&#xA;    let xt: UncheckedExtrinsicV4&lt;_&gt; = compose_extrinsic!(&#xD;&#xA;      api.clone(),&#xD;&#xA;      &quot;Auditor&quot;,&#xD;&#xA;      &quot;save_audit_item&quot;,&#xD;&#xA;      now.to_rfc3339().to_string().into_bytes()&#xD;&#xA;    );&#xD;&#xA;  &#xD;&#xA;    println!(&quot;[+] Composed Extrinsic:\n {:?}\n&quot;, xt);&#xD;&#xA;    &#xD;&#xA;    // send and watch extrinsic until finalized&#xD;&#xA;    let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the error is thrown at:&#xD;&#xA;```rust&#xD;&#xA;let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I was able submit extrinsics signed by `AccountKeyring::Bob.pair()`. I'm pretty sure the Key Pair I generated is the same type as `AccountKeyring::Bob.pair()`, but its not working for me for some reason. Any tips on this? &#xD;&#xA;&#xD;&#xA;Also, this is the subkey tool cmd I used: `subkey generate`&#xD;&#xA;```&#xD;&#xA;Secret phrase:       endorse doctor arch helmet master dragon wild favorite property mercy vault maze&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x78b8fbbbea218509c00d3531e72128d4eae54089f15deb24d721e30b351733ad&#xD;&#xA;  Public key (hex):  0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Account ID:        0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Public key (SS58): 5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;  SS58 Address:      5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8558" PostHistoryTypeId="1" PostId="2295" RevisionGUID="0ad752d5-22d5-43e7-965d-a8487c8526b3" CreationDate="2022-04-29T19:15:38.033" UserId="1809" Text="Cant submit an extrinsic signed by generated key pair" ContentLicense="CC BY-SA 4.0" />
  <row Id="8559" PostHistoryTypeId="3" PostId="2295" RevisionGUID="0ad752d5-22d5-43e7-965d-a8487c8526b3" CreationDate="2022-04-29T19:15:38.033" UserId="1809" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8560" PostHistoryTypeId="5" PostId="2295" RevisionGUID="c7875cf2-8256-4bef-b898-3613b25f6bf5" CreationDate="2022-04-29T20:22:57.323" UserId="1809" Comment="made the question clearer" Text="I was trying to submit a items (extrinsics) to my Substrate blockchain instance, but it keeps getting rejected. I use the key pair I generate using `from_string` function from `sp_core::crypto::Pair`, but the extrinsics I signed using this key pair does not get submitted to the chain. The key pair that gets generated is the same type from Substrate's/Parity's `AccountKeyRing` module, but I keep getting `InvalidHexString` error. I was able to submit extrinsics signed by `AccountKeyring::Bob.pair()`. I'm confident the Key Pair I generated is the same type as `AccountKeyring::Bob.pair()`, but its not working for me for some reason. Any tips on this? &#xD;&#xA;&#xD;&#xA;I currently don't know where to go next to make this work, or don't know if this will actually work (seems like it should work)&#xD;&#xA;&#xD;&#xA;Anyways, I get this error:&#xD;&#xA;```&#xD;&#xA;thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidHexString(InvalidStringLength)', src/services/route_actions/extrinsic_submitters.rs:25:73&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The secret phrase I provided to the `from_string` function are valid since this is generated from `subkey tool` (NOT USED IN PROD). This is my code snippet&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  let priv_key: String = &quot;endorse doctor arch helmet master dragon wild favorite property mercy vault maze&quot;.to_owned();&#xD;&#xA;  let from = Pair::from_string(&amp;priv_key[..], None).unwrap();&#xD;&#xA;  //let from = AccountKeyring::Bob.pair();&#xD;&#xA;  let api = Api::new(client).map(|api| api.set_signer(from)).unwrap();&#xD;&#xA;  ....&#xD;&#xA;  extrinsic_submitters::submit_to_save_item(api, incoming_item, now, datetime);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the code for the submission of the extrinsic I have:&#xD;&#xA;```rust&#xD;&#xA;#[allow(clippy::redundant_clone)]&#xD;&#xA;    let xt: UncheckedExtrinsicV4&lt;_&gt; = compose_extrinsic!(&#xD;&#xA;      api.clone(),&#xD;&#xA;      &quot;Auditor&quot;,&#xD;&#xA;      &quot;save_audit_item&quot;,&#xD;&#xA;      now.to_rfc3339().to_string().into_bytes()&#xD;&#xA;    );&#xD;&#xA;  &#xD;&#xA;    println!(&quot;[+] Composed Extrinsic:\n {:?}\n&quot;, xt);&#xD;&#xA;    &#xD;&#xA;    // send and watch extrinsic until finalized&#xD;&#xA;    let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the error is thrown at:&#xD;&#xA;```rust&#xD;&#xA;let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also, this is the subkey tool cmd I used: `subkey generate`&#xD;&#xA;```&#xD;&#xA;Secret phrase:       endorse doctor arch helmet master dragon wild favorite property mercy vault maze&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x78b8fbbbea218509c00d3531e72128d4eae54089f15deb24d721e30b351733ad&#xD;&#xA;  Public key (hex):  0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Account ID:        0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Public key (SS58): 5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;  SS58 Address:      5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8561" PostHistoryTypeId="5" PostId="2295" RevisionGUID="8bafabb6-6e12-4577-80b1-cee1f066e33a" CreationDate="2022-04-29T20:28:27.080" UserId="1809" Comment="made the question clearer" Text="I was trying to submit a items (extrinsics) to my Substrate blockchain instance, but it keeps getting rejected. I use the key pair I generate using `from_string` function from `sp_core::crypto::Pair`, but the extrinsics I signed using this key pair does not get submitted to the chain. The key pair that gets generated is the same type from Substrate's/Parity's `AccountKeyRing` module, but I keep getting `InvalidHexString` error. &#xD;&#xA;&#xD;&#xA;I was able to submit extrinsics signed by `AccountKeyring::Bob.pair()`. I'm confident the Key Pair I generated is the same type as `AccountKeyring::Bob.pair()`, but its not working for me for some reason. The `secret phrase` I provide to the `from_string` should be valid because it came from `subkey tool`. Any tips on this? &#xD;&#xA;&#xD;&#xA;I currently don't know where to go next to make this work, or don't know if this will actually work (seems like it should work)&#xD;&#xA;&#xD;&#xA;Anyways, I get this error:&#xD;&#xA;```&#xD;&#xA;thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidHexString(InvalidStringLength)', src/services/route_actions/extrinsic_submitters.rs:25:73&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The secret phrase I provided to the `from_string` function are valid since this is generated from `subkey tool` (NOT USED IN PROD). This is my code snippet&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  let priv_key: String = &quot;endorse doctor arch helmet master dragon wild favorite property mercy vault maze&quot;.to_owned();&#xD;&#xA;  let from = Pair::from_string(&amp;priv_key[..], None).unwrap();&#xD;&#xA;  //let from = AccountKeyring::Bob.pair();&#xD;&#xA;  let api = Api::new(client).map(|api| api.set_signer(from)).unwrap();&#xD;&#xA;  ....&#xD;&#xA;  extrinsic_submitters::submit_to_save_item(api, incoming_item, now, datetime);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the code for the submission of the extrinsic I have:&#xD;&#xA;```rust&#xD;&#xA;#[allow(clippy::redundant_clone)]&#xD;&#xA;    let xt: UncheckedExtrinsicV4&lt;_&gt; = compose_extrinsic!(&#xD;&#xA;      api.clone(),&#xD;&#xA;      &quot;Auditor&quot;,&#xD;&#xA;      &quot;save_audit_item&quot;,&#xD;&#xA;      now.to_rfc3339().to_string().into_bytes()&#xD;&#xA;    );&#xD;&#xA;  &#xD;&#xA;    println!(&quot;[+] Composed Extrinsic:\n {:?}\n&quot;, xt);&#xD;&#xA;    &#xD;&#xA;    // send and watch extrinsic until finalized&#xD;&#xA;    let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the error is thrown at:&#xD;&#xA;```rust&#xD;&#xA;let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also, this is the subkey tool cmd I used: `subkey generate`&#xD;&#xA;```&#xD;&#xA;Secret phrase:       endorse doctor arch helmet master dragon wild favorite property mercy vault maze&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x78b8fbbbea218509c00d3531e72128d4eae54089f15deb24d721e30b351733ad&#xD;&#xA;  Public key (hex):  0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Account ID:        0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Public key (SS58): 5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;  SS58 Address:      5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8562" PostHistoryTypeId="5" PostId="2269" RevisionGUID="fcdd52bf-a959-462a-b0bf-3ae40294d498" CreationDate="2022-04-29T20:37:58.593" UserId="34" Comment="make more clear and title as a question" Text="It appears to me that we find ourselves at a trade off between parachain state transition function (STF) generality vs trustless XCM interoperability.  At the current point in time parachains can define how XCM messages will be interpreted and executed.  This introduces a requirement of trust between parachains, parachain A must trust that parachain B will execute a message sensibly.  To achieve trustless interoperability parachains need some guarantees about how messages will be executed.&#xD;&#xA;&#xD;&#xA;I have seen mentions of Shared Protected Runtime Execution Enclaves ([SPREE](https://wiki.polkadot.network/docs/learn-spree)) which appears to be a promising approach that will provide a sandbox with standardised logic for execution of messages.  I have seen mention that SPREE would be &quot;opt-in&quot; which leads to a bit of fuzzyness regarding interoperability.  Those parachains which do not opt-in could still execute malicious / faulty code meaning that users / parachain devs have to be savvy about which destination parachains they support for XCM.&#xD;&#xA;&#xD;&#xA;**I'm entertaining the idea of an interoperability-centric relay chain which constrains the generality of the parachain STF such that core pallets such as asset pallets, maybe VM choice, etc are standardised via SPREE.  This way parachains require less trust for interop. Could this be achieved and if so how?**&#xD;&#xA;&#xD;&#xA;I'm guessing there would be a SPREE Wasm blob on the relay chain which stores the shared logic and then maybe some validation of parachain STF would be required when registering and upgrading?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8563" PostHistoryTypeId="4" PostId="2269" RevisionGUID="fcdd52bf-a959-462a-b0bf-3ae40294d498" CreationDate="2022-04-29T20:37:58.593" UserId="34" Comment="make more clear and title as a question" Text="What ways can parachains improve interoperability and increase trust using SPREE?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8564" PostHistoryTypeId="6" PostId="2269" RevisionGUID="fcdd52bf-a959-462a-b0bf-3ae40294d498" CreationDate="2022-04-29T20:37:58.593" UserId="34" Comment="make more clear and title as a question" Text="|parachain|xcm|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8565" PostHistoryTypeId="24" PostId="2269" RevisionGUID="fcdd52bf-a959-462a-b0bf-3ae40294d498" CreationDate="2022-04-29T20:37:58.593" Comment="Proposed by 34 approved by -1 edit id of 186" ContentLicense="CC BY-SA 4.0" />
  <row Id="8566" PostHistoryTypeId="5" PostId="2269" RevisionGUID="76977bcc-cdb4-4708-951f-901d5e2f8747" CreationDate="2022-04-29T20:37:58.593" UserId="104" Comment="make more clear and title as a question" Text="It appears to me that we find ourselves at a trade off between parachain state transition function (STF) generality vs trustless XCM interoperability.  At the current point in time parachains can define how XCM messages will be interpreted and executed.  This introduces a requirement of trust between parachains, parachain A must trust that parachain B will execute a message sensibly.  To achieve trustless interoperability parachains need some guarantees about how messages will be executed.&#xD;&#xA;&#xD;&#xA;I have seen mentions of Shared Protected Runtime Execution Enclaves ([SPREE](https://wiki.polkadot.network/docs/learn-spree)) which appears to be a promising approach that will provide a sandbox with standardised logic for execution of messages.  I have seen mention that SPREE would be &quot;opt-in&quot; which leads to a bit of fuzzyness regarding interoperability.  Those parachains which do not opt-in could still execute malicious / faulty code meaning that users / parachain devs have to be savvy about which destination parachains they support for XCM.&#xD;&#xA;&#xD;&#xA;**I'm entertaining the idea of an interoperability-centric relay chain which constrains the generality of the parachain STF such that core pallets such as asset pallets, maybe VM choice, etc are standardised via SPREE.  This way parachains require less trust for interop. Could this be achieved and if so how?**&#xD;&#xA;&#xD;&#xA;I'm guessing there would be a SPREE WASM blob on the relay chain which stores the shared logic and then maybe some validation of parachain STF would be required when registering and upgrading?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8567" PostHistoryTypeId="5" PostId="2295" RevisionGUID="cb0a25f6-089d-439b-aa03-3a17db79e274" CreationDate="2022-04-29T20:40:21.200" UserId="1809" Comment="added 72 characters in body" Text="I was trying to submit a items (extrinsics) to my Substrate blockchain instance, but it keeps getting rejected. I use the key pair I generate using `from_string` function from `sp_core::crypto::Pair`, but the extrinsics I signed using this key pair does not get submitted to the chain. The key pair that gets generated is the same type from Substrate's/Parity's `AccountKeyRing` module, but I keep getting `InvalidHexString` error. &#xD;&#xA;&#xD;&#xA;I was able to submit extrinsics signed by `AccountKeyring::Bob.pair()`. I'm confident the Key Pair I generated is the same type as `AccountKeyring::Bob.pair()`, but its not working for me for some reason. The `secret phrase` I provide to the `from_string` should be valid because it came from `subkey tool`. Any tips on what was wrong? (Why the extrinsic signed by this key pair isn't acceptable?) &#xD;&#xA;&#xD;&#xA;I currently don't know where to go next to make this work, or don't know if this will actually work (seems like it should work)&#xD;&#xA;&#xD;&#xA;Anyways, I get this error:&#xD;&#xA;```&#xD;&#xA;thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidHexString(InvalidStringLength)', src/services/route_actions/extrinsic_submitters.rs:25:73&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The secret phrase I provided to the `from_string` function are valid since this is generated from `subkey tool` (NOT USED IN PROD). This is my code snippet&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  let priv_key: String = &quot;endorse doctor arch helmet master dragon wild favorite property mercy vault maze&quot;.to_owned();&#xD;&#xA;  let from = Pair::from_string(&amp;priv_key[..], None).unwrap();&#xD;&#xA;  //let from = AccountKeyring::Bob.pair();&#xD;&#xA;  let api = Api::new(client).map(|api| api.set_signer(from)).unwrap();&#xD;&#xA;  ....&#xD;&#xA;  extrinsic_submitters::submit_to_save_item(api, incoming_item, now, datetime);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the code for the submission of the extrinsic I have:&#xD;&#xA;```rust&#xD;&#xA;#[allow(clippy::redundant_clone)]&#xD;&#xA;    let xt: UncheckedExtrinsicV4&lt;_&gt; = compose_extrinsic!(&#xD;&#xA;      api.clone(),&#xD;&#xA;      &quot;Auditor&quot;,&#xD;&#xA;      &quot;save_audit_item&quot;,&#xD;&#xA;      now.to_rfc3339().to_string().into_bytes()&#xD;&#xA;    );&#xD;&#xA;  &#xD;&#xA;    println!(&quot;[+] Composed Extrinsic:\n {:?}\n&quot;, xt);&#xD;&#xA;    &#xD;&#xA;    // send and watch extrinsic until finalized&#xD;&#xA;    let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the error is thrown at:&#xD;&#xA;```rust&#xD;&#xA;let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also, this is the subkey tool cmd I used: `subkey generate`&#xD;&#xA;```&#xD;&#xA;Secret phrase:       endorse doctor arch helmet master dragon wild favorite property mercy vault maze&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x78b8fbbbea218509c00d3531e72128d4eae54089f15deb24d721e30b351733ad&#xD;&#xA;  Public key (hex):  0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Account ID:        0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Public key (SS58): 5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;  SS58 Address:      5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8568" PostHistoryTypeId="5" PostId="2291" RevisionGUID="51496b33-3fd4-4362-9e43-dfd4161270df" CreationDate="2022-04-29T20:47:29.543" UserId="104" Comment="Fixed grammar" Text="What makes me confused about the runtime is the Externalities. I found the definition in `sp_externalities`, moreover I found that the `pub fn set_and_run_with_externalities(ext: &amp;mut dyn Externalities, f: F)` function will supply an approach to work with the externalities mutable reference. So like the `TextExternalities` which makes us run some runtime code in a test environment. And the global variables `environmental::environmental!(ext: trait Externalities);` supplies the Externalities register on Substrate. &#xD;&#xA;&#xD;&#xA;Due to the explanation above, I can write the following code: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;TestExternalities.execute_with(||{&#xD;&#xA;     Balances::deposit_creating(&amp;ALICE, 100_000_000);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My question is that whether the pallet like balances will be handled by the pallet macros, and auto carry the reference named `ext`? Or at somewhere the substrate client side code could call the `sp_externalities::set_and_run_with_externalities(&amp;mut some_ext, ||{ // really code })` . &#xD;&#xA;&#xD;&#xA;In short, I want to know if there are some methods to add my new runtime interface or externalities into the runtime that replaces some behaviors of the substrate native storage implementation&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="8569" PostHistoryTypeId="4" PostId="2291" RevisionGUID="51496b33-3fd4-4362-9e43-dfd4161270df" CreationDate="2022-04-29T20:47:29.543" UserId="104" Comment="Fixed grammar" Text="How do externalities work in runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8570" PostHistoryTypeId="5" PostId="2174" RevisionGUID="56402de7-1752-4911-884f-f6f091d980ae" CreationDate="2022-04-29T20:58:49.187" UserId="299" Comment="It should be called a weight fee" Text="It just approximates `p/q` (in this line, `(p % q) / q`) as a `PerBill`: https://github.com/paritytech/substrate/blob/2195448d01fc935912d8cf543be6d609f5899652/primitives/arithmetic/src/per_things.rs#L265L283&#xD;&#xA;&#xD;&#xA;--------------&#xD;&#xA;&#xD;&#xA;EDIT: I see the question is more about the polynomial than the `from_rational` function.&#xD;&#xA;&#xD;&#xA;The polynomial is just of the form `a*x^n + b*x^(n-1) + ...` where `x` is the independent variable, `{a, b, ...}` are coefficients and the exponent of each term is its degree. You see that the polynomial actually returns a `vec` of `WeightToFeeCoefficient` structs. The `degree` tells you the exponent, `negative` tells you if it's positive or negative, and `coeff_integer + coeff_frac` tells you the constant coefficient on the term.&#xD;&#xA;&#xD;&#xA;Since there is only one term in this polynomial, and `Weight` is the independent variable, it would be the function:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;weight fee: Balance = (p / q + (p % q) / q) * Weight;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This isn't the _final_ fee, as the length fee will also be added and then the weight fee will be adjusted based on the `NextFeeMultiplier`." ContentLicense="CC BY-SA 4.0" />
  <row Id="8571" PostHistoryTypeId="24" PostId="2174" RevisionGUID="56402de7-1752-4911-884f-f6f091d980ae" CreationDate="2022-04-29T20:58:49.187" Comment="Proposed by 299 approved by 85, 104 edit id of 181" ContentLicense="CC BY-SA 4.0" />
  <row Id="8572" PostHistoryTypeId="6" PostId="2275" RevisionGUID="218c7649-6983-4340-b044-511ae8473bb5" CreationDate="2022-04-29T20:59:35.267" UserId="34" Comment="tag update" Text="|rust|cargo|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8573" PostHistoryTypeId="24" PostId="2275" RevisionGUID="218c7649-6983-4340-b044-511ae8473bb5" CreationDate="2022-04-29T20:59:35.267" Comment="Proposed by 34 approved by 104, 2408 edit id of 187" ContentLicense="CC BY-SA 4.0" />
  <row Id="8574" PostHistoryTypeId="52" PostId="2281" RevisionGUID="4907294c-bf0f-48cd-aa6d-f06a4affeb1d" CreationDate="2022-04-29T22:23:03.397" />
  <row Id="8575" PostHistoryTypeId="2" PostId="2296" RevisionGUID="ec8f83e0-f8e5-47aa-9bf7-5d2265bf1598" CreationDate="2022-04-30T03:32:47.460" UserId="2146" Text="I made a mistake in not pushing all files to github. There were some `.model` files which prevented the build from completing outside of my local environment.&#xD;&#xA;-_-&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8577" PostHistoryTypeId="2" PostId="2297" RevisionGUID="5d42623d-35ec-4268-a593-2c7ae072ba8d" CreationDate="2022-04-30T04:27:03.413" UserId="710" Text="I need to be able to query the addresses of the active nominators of a validator in a past era (eg 695).&#xD;&#xA;&#xD;&#xA;Thanks in advance. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8579" PostHistoryTypeId="1" PostId="2297" RevisionGUID="5d42623d-35ec-4268-a593-2c7ae072ba8d" CreationDate="2022-04-30T04:27:03.413" UserId="710" Text="How to query the active nominators of X validator in past eras?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8580" PostHistoryTypeId="3" PostId="2297" RevisionGUID="5d42623d-35ec-4268-a593-2c7ae072ba8d" CreationDate="2022-04-30T04:27:03.413" UserId="710" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8581" PostHistoryTypeId="2" PostId="2298" RevisionGUID="7a5ed4ae-e74b-4bc1-ad34-59499e6be8ac" CreationDate="2022-04-30T04:28:46.587" UserId="2146" Text="I'm slowly making my way to deploying a squid. Earlier I had some issues with a deploy error due to lack of an up-to-date repo.&#xD;&#xA;I'm currently facing a new challenge. When releasing the squid to the site, the original `deploy_error` has gone away, but it is still not finalizing the sync.&#xD;&#xA;&#xD;&#xA;Running the `npx sqd squid tail ` command to see what happens just sends an html Server Error:  502  &#xD;&#xA;&#xD;&#xA;The Subsquid App shows &quot;Deploying&quot; in a constant hang for &gt;30 minutes.&#xD;&#xA;&#xD;&#xA;![hang1](https://user-images.githubusercontent.com/72553021/166089952-a6dbb3ca-7dae-40d4-ae7f-668ef03a0bae.jpg)&#xD;&#xA;&#xD;&#xA;![deploy hang II](https://user-images.githubusercontent.com/72553021/166090002-4dbf4eed-8ec2-4bb1-a80b-3c9b5c7c6b72.PNG)&#xD;&#xA;&#xD;&#xA;It appears that when deploying, the constant hang could be due to my db not initializing.  When I go to the Query node playground, I get the following errors when trying to query.&#xD;&#xA;&#xD;&#xA;![image](https://user-images.githubusercontent.com/72553021/166090046-02065776-7dc9-493c-b3f9-5de5eda3ca50.png)&#xD;&#xA;&#xD;&#xA;Running my squid locally, and executing cmd: `docker build . -t squid-template:latest --no-cache` I'm getting: `Successfully tagged squid-template:latest build before deploying.` message." ContentLicense="CC BY-SA 4.0" />
  <row Id="8583" PostHistoryTypeId="1" PostId="2298" RevisionGUID="7a5ed4ae-e74b-4bc1-ad34-59499e6be8ac" CreationDate="2022-04-30T04:28:46.587" UserId="2146" Text="Squid deployment not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="8584" PostHistoryTypeId="3" PostId="2298" RevisionGUID="7a5ed4ae-e74b-4bc1-ad34-59499e6be8ac" CreationDate="2022-04-30T04:28:46.587" UserId="2146" Text="|subsquid|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8585" PostHistoryTypeId="2" PostId="2299" RevisionGUID="321108fb-42ed-428a-a82a-77d4161eab67" CreationDate="2022-04-30T05:10:12.980" UserId="28" Text="You should query the `ErasStakers` storage item in the Staking Pallet:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Exposure of validator at era.&#xD;&#xA;///&#xD;&#xA;/// This is keyed first by the era index to allow bulk deletion and then the stash account.&#xD;&#xA;///&#xD;&#xA;/// Is it removed after `HISTORY_DEPTH` eras.&#xD;&#xA;/// If stakers hasn't been set or has been removed then empty exposure is returned.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn eras_stakers)]&#xD;&#xA;pub type ErasStakers&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;	_,&#xD;&#xA;	Twox64Concat,&#xD;&#xA;	EraIndex,&#xD;&#xA;	Twox64Concat,&#xD;&#xA;	T::AccountId,&#xD;&#xA;	Exposure&lt;T::AccountId, BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;	ValueQuery,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `Exposure` struct contains the vector of nominators in `other`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// A snapshot of the stake backing a single validator in the system.&#xD;&#xA;#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;pub struct Exposure&lt;AccountId, Balance: HasCompact&gt; {&#xD;&#xA;	/// The total balance backing this validator.&#xD;&#xA;	#[codec(compact)]&#xD;&#xA;	pub total: Balance,&#xD;&#xA;	/// The validator's own stash that is exposed.&#xD;&#xA;	#[codec(compact)]&#xD;&#xA;	pub own: Balance,&#xD;&#xA;	/// The portions of nominators stashes that are exposed.&#xD;&#xA;	pub others: Vec&lt;IndividualExposure&lt;AccountId, Balance&gt;&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you query is beyond the history of this storage item on the current block, you will simply need to query the storage in a past block on an archive node." ContentLicense="CC BY-SA 4.0" />
  <row Id="8587" PostHistoryTypeId="2" PostId="2300" RevisionGUID="b8880a70-aa7d-4435-9735-0919444d8cef" CreationDate="2022-04-30T05:30:38.683" UserId="28" Text="&gt; NOTE: I am not a SPREE expert, this is just my high level understanding of the space.&#xD;&#xA;&#xD;&#xA;The challenge between coordinating any two consensus systems is ensuring that they behave only in ways that the other system expects.&#xD;&#xA;&#xD;&#xA;This is especially challenging in the Substrate / Polkadot ecosystem since we have prioritized the flexibility of chains freely upgrading their state transition function, and thus potentially changing those underlying expectations.&#xD;&#xA;&#xD;&#xA;SPREE, at a high level, tries to solve this by creating isolated pieces of code (likely independent Wasm blobs), which will maintain their own state and be non-upgradable. Additionally, SPREE could provide proofs of execution or of the final state root to ensure that all expectations are being met between the different blockchains.&#xD;&#xA;&#xD;&#xA;This kind of functionality will require an additional set of features and APIs on top of what exists today. For example, being able to interface between the runtime and SPREE modules, having separate state trees for the SPREE modules, and even a set of XCM APIs specific for cross-chain SPREE interactions.&#xD;&#xA;&#xD;&#xA;While you can make constraints like the ones mentioned above, and try to maintain an ecosystem of chains which only use a specific set of pallets, it does not seem like the tools are available which will be able to enforce that logic. In which case, you are not actually better off than today where different parachains simply need to coordinate to ensure that the end to end scenarios of those chains are working.&#xD;&#xA;&#xD;&#xA;While this situation is not ideal in the long term, it seems perfectly reasonable for now, especially given the fact that we do have a long term plan. As with any bleeding edge software development, you cannot simply wait to release code until everything is &quot;perfect&quot;. The current state of parachain coordination is a reasonable milestone on our way to truly trustless multi-chain systems. Given the large parachains deposits and limit slots available, chains are socially and economically incentivized to behave well. Even if they don't, Polkadot governance can jump in an make things right again.&#xD;&#xA;&#xD;&#xA;So in summary, SPREE will certainly solve some of the issues with parachain coordination and trust that currently exists today on Polkadot, but there is quite a bit of work needed to make SPREE a reality. As with any backlog, we need to prioritize items based on needs, and scaling the performance of parachains is the key focus at this time, since coordination is a problem that can be solved off-chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="8589" PostHistoryTypeId="2" PostId="2301" RevisionGUID="9f559ccd-3fd7-4ea0-b37e-663dc0ea89ea" CreationDate="2022-04-30T05:43:12.100" UserId="28" Text="In general the complexity of your migration depends on how old your current Substrate instance is from the current Substrate instance.&#xD;&#xA;&#xD;&#xA;Substrate / Polkadot provides migration logic for each new Polkadot release, however, these migrations are not necessarily designed to be merged into one super-migration, nor are they really indexed in a way for users from arbitrary version A to migrate to arbitrary version B.&#xD;&#xA;&#xD;&#xA;The best example of a hardcore migration can be found with Edgeware:&#xD;&#xA;&#xD;&#xA;https://github.com/hicommonwealth/edgeware-node/issues/164&#xD;&#xA;&#xD;&#xA;Where all migrations from point A to B were reviewed, evaluated, and re-executed on the chain to get them fully up to date. This would require multiple different runtime upgrades and migrations, basically re-executing all the historical upgrades one by one.&#xD;&#xA;&#xD;&#xA;My suggestion:&#xD;&#xA;&#xD;&#xA;* If you have launched a live chain, you should be upgrading that chain at the same cadence as Polkadot launches upgrades, making sure to make the appropriate migrations each time.&#xD;&#xA;&#xD;&#xA;* If your chain is just a testnet, probably the best thing to do is just reset your chain, and migrate any specific data you want manually onto the new chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="8591" PostHistoryTypeId="10" PostId="2288" RevisionGUID="78f2209e-e65f-4e2e-990e-69c128b5c2ed" CreationDate="2022-04-30T05:43:43.353" UserId="-1" Comment="105" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:627,&quot;DisplayName&quot;:&quot;Jaco&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="8592" PostHistoryTypeId="4" PostId="2288" RevisionGUID="a242d352-bc75-4625-868c-9fb0aeb182ab" CreationDate="2022-04-30T05:44:13.053" UserId="28" Comment="edited title" Text="Substrate vs Cosmos / Tendermint SDK" ContentLicense="CC BY-SA 4.0" />
  <row Id="8593" PostHistoryTypeId="2" PostId="2302" RevisionGUID="5b9011a8-d510-4691-9a0b-1a2ff1f22be6" CreationDate="2022-04-30T05:52:13.483" UserId="28" Text="Take a look at code snippets in Substrate like this one:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn test_blocks(&#xD;&#xA;	genesis_config: &amp;GenesisConfig,&#xD;&#xA;	executor: &amp;NativeElseWasmExecutor&lt;ExecutorDispatch&gt;,&#xD;&#xA;) -&gt; Vec&lt;(Vec&lt;u8&gt;, Hash)&gt; {&#xD;&#xA;	let mut test_ext = new_test_ext(genesis_config);&#xD;&#xA;	let mut block1_extrinsics = vec![CheckedExtrinsic {&#xD;&#xA;		signed: None,&#xD;&#xA;		function: Call::Timestamp(pallet_timestamp::Call::set { now: 0 }),&#xD;&#xA;	}];&#xD;&#xA;	block1_extrinsics.extend((0..20).map(|i| CheckedExtrinsic {&#xD;&#xA;		signed: Some((alice(), signed_extra(i, 0))),&#xD;&#xA;		function: Call::Balances(pallet_balances::Call::transfer {&#xD;&#xA;			dest: bob().into(),&#xD;&#xA;			value: 1 * DOLLARS,&#xD;&#xA;		}),&#xD;&#xA;	}));&#xD;&#xA;	let block1 =&#xD;&#xA;		construct_block(executor, &amp;mut test_ext.ext(), 1, GENESIS_HASH.into(), block1_extrinsics);&#xD;&#xA;&#xD;&#xA;	vec![block1]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Basically the onion should look like this:&#xD;&#xA;&#xD;&#xA;1. The &quot;runtime Call&quot; enum will have an item `Call::PalletName`&#xD;&#xA;2. That item will have entries which match the &quot;pallet Call&quot; enum, which will have items like `Call::extrinsic_name`. You can differentiate the runtime and pallet call by accessing the pallet call like: `pallet_name::Call::extrinsic_name`.&#xD;&#xA;3. From there you have access to the parameters of the call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So, here is some pseudo code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn extract_content_from_call(call: Call) -&gt; Option&lt;ContentType&gt; {&#xD;&#xA;    let pallet_call: pallet_name::Call = match call {&#xD;&#xA;        Call::MyPallet(pallet_call) =&gt; pallet_call,&#xD;&#xA;        _ =&gt; return None,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let content: ContentType = match pallet_call {&#xD;&#xA;        pallet_name::Call::my_custom_function { content } =&gt; content,&#xD;&#xA;        _ =&gt; return None,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    Some(content)&#xD;&#xA;}" ContentLicense="CC BY-SA 4.0" />
  <row Id="8595" PostHistoryTypeId="2" PostId="2303" RevisionGUID="e7c81492-6eb6-4eb4-a6c0-b2542acaaf28" CreationDate="2022-04-30T06:21:09.930" UserId="28" Text="Swappable consensus was a potential solution to the lifecycle of parachains when they lose their parachain slot, allowing them to swap their consensus to some solo-chain system, and then back to a parachain if they won another auction.&#xD;&#xA;&#xD;&#xA;However, given the introduction of parathreads as a much better solution to this problem, I believe swappable consensus is not a feature being worked on anymore. Obviously the expert in this case is [@rob](https://substrate.stackexchange.com/users/283/rob).&#xD;&#xA;&#xD;&#xA;I am not sure about the specific state or thinking around re-genesis. Best to keep [multiple questions to multiple posts](https://meta.stackexchange.com/questions/39223/one-post-with-multiple-questions-or-multiple-posts).&#xD;&#xA;&#xD;&#xA;However, it seems at a high level, the process of re-genesis can be done with tools like [`fork-off-substrate`](https://github.com/maxsam4/fork-off-substrate). Beyond that, halting one chain and starting another seems like a coordination issue that is solved off-chain or with some custom client logic." ContentLicense="CC BY-SA 4.0" />
  <row Id="8597" PostHistoryTypeId="6" PostId="2228" RevisionGUID="40269037-da83-4332-a20a-0b418bc52688" CreationDate="2022-04-30T06:59:39.643" UserId="28" Comment="edited tags" Text="|generics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8598" PostHistoryTypeId="2" PostId="2304" RevisionGUID="cb8b182a-90ca-49bc-9d01-19d6881fe7e2" CreationDate="2022-04-30T07:03:06.460" UserId="28" Text="`&lt;T as Config&gt;` is just a generic bound.&#xD;&#xA;&#xD;&#xA;`type BalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;&#xD;&#xA;Is just a type alias, because typing out the right side is just annoying, when  compared to `BalanceOf&lt;T&gt;`.&#xD;&#xA;&#xD;&#xA;This kind of type alias appears when we are trying to extract a concrete associated type from some trait. In this case the `type Balance` is an associated type of `trait Currency`, and we want to easily access this type." ContentLicense="CC BY-SA 4.0" />
  <row Id="8600" PostHistoryTypeId="2" PostId="2305" RevisionGUID="2df6d8f6-ebce-4768-91c4-10a1287ffaae" CreationDate="2022-04-30T07:20:40.100" UserId="28" Text="The only decision you need to make here is whether you want these funds to be usable by other pallets / logic.&#xD;&#xA;&#xD;&#xA;Reserved balances are independent of one another, that is if you ask to reserve 10 DOT, it will always take a new 10 DOT of balance from the free balance and move it to the reserved balance.&#xD;&#xA;&#xD;&#xA;On the other hand, locked balances are overlapping, such that if one user already has 100 DOT locked, and you have a different pallet ask to lock 10 DOT, nothing new will be locked, since 100 DOT are already locked, and that is already enough to satisfy the 10 DOT we wish to lock. But do note that the 10 DOT lock will still exist in storage, for tracking purposes.&#xD;&#xA;&#xD;&#xA;So in this case, if you want a user to use this balance for things like Staking or Voting in governance, then you should use a locked balance.&#xD;&#xA;&#xD;&#xA;If you don't want that, then you should use a reserved balance." ContentLicense="CC BY-SA 4.0" />
  <row Id="8602" PostHistoryTypeId="6" PostId="2264" RevisionGUID="10f4ad5c-7025-4342-83e8-9b36ad72be2e" CreationDate="2022-04-30T07:25:09.520" UserId="34" Comment="tags for search" Text="|polkadot|finality|cryptography|light-client|zero-knowlage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8603" PostHistoryTypeId="24" PostId="2264" RevisionGUID="10f4ad5c-7025-4342-83e8-9b36ad72be2e" CreationDate="2022-04-30T07:25:09.520" Comment="Proposed by 34 approved by 104, 28 edit id of 185" ContentLicense="CC BY-SA 4.0" />
  <row Id="8604" PostHistoryTypeId="6" PostId="2273" RevisionGUID="3e05efdd-7085-41a5-ba20-d676e19f73a4" CreationDate="2022-04-30T07:25:13.913" UserId="227" Comment="Updated tags: smart-contract, bridge." Text="|polkadot|rust|ink|smart-contract|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8605" PostHistoryTypeId="24" PostId="2273" RevisionGUID="3e05efdd-7085-41a5-ba20-d676e19f73a4" CreationDate="2022-04-30T07:25:13.913" Comment="Proposed by 227 approved by 104, 28 edit id of 188" ContentLicense="CC BY-SA 4.0" />
  <row Id="8606" PostHistoryTypeId="2" PostId="2306" RevisionGUID="187a24d7-ebf5-47ea-a39d-d30fc96c7f00" CreationDate="2022-04-30T08:57:28.233" UserId="28" Text="Why not just use `construct_runtime!`?&#xD;&#xA;&#xD;&#xA;In every pallet, we write tests which mock a runtime environment like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use crate as pallet_template;&#xD;&#xA;use frame_support::traits::{ConstU16, ConstU64};&#xD;&#xA;use frame_system as system;&#xD;&#xA;use sp_core::H256;&#xD;&#xA;use sp_runtime::{&#xD;&#xA;	testing::Header,&#xD;&#xA;	traits::{BlakeTwo256, IdentityLookup},&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic&lt;Test&gt;;&#xD;&#xA;type Block = frame_system::mocking::MockBlock&lt;Test&gt;;&#xD;&#xA;&#xD;&#xA;// Configure a mock runtime to test the pallet.&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;},&#xD;&#xA;		TemplateModule: pallet_template::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl system::Config for Test {&#xD;&#xA;	type BaseCallFilter = frame_support::traits::Everything;&#xD;&#xA;	type BlockWeights = ();&#xD;&#xA;	type BlockLength = ();&#xD;&#xA;	type DbWeight = ();&#xD;&#xA;	type Origin = Origin;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type Index = u64;&#xD;&#xA;	type BlockNumber = u64;&#xD;&#xA;	type Hash = H256;&#xD;&#xA;	type Hashing = BlakeTwo256;&#xD;&#xA;	type AccountId = u64;&#xD;&#xA;	type Lookup = IdentityLookup&lt;Self::AccountId&gt;;&#xD;&#xA;	type Header = Header;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type BlockHashCount = ConstU64&lt;250&gt;;&#xD;&#xA;	type Version = ();&#xD;&#xA;	type PalletInfo = PalletInfo;&#xD;&#xA;	type AccountData = ();&#xD;&#xA;	type OnNewAccount = ();&#xD;&#xA;	type OnKilledAccount = ();&#xD;&#xA;	type SystemWeightInfo = ();&#xD;&#xA;	type SS58Prefix = ConstU16&lt;42&gt;;&#xD;&#xA;	type OnSetCode = ();&#xD;&#xA;	type MaxConsumers = frame_support::traits::ConstU32&lt;16&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_template::Config for Test {&#xD;&#xA;	type Event = Event;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Build genesis storage according to the mock runtime.&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;	system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap().into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and then tests like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use crate::{mock::*, Error};&#xD;&#xA;use frame_support::{assert_noop, assert_ok};&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn it_works_for_default_value() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Dispatch a signed extrinsic.&#xD;&#xA;		assert_ok!(TemplateModule::do_something(Origin::signed(1), 42));&#xD;&#xA;		// Read pallet storage and assert an expected result.&#xD;&#xA;		assert_eq!(TemplateModule::something(), Some(42));&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn correct_error_for_none_value() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Ensure the expected error is thrown when no value is present.&#xD;&#xA;		assert_noop!(TemplateModule::cause_error(Origin::signed(1)), Error::&lt;Test&gt;::NoneValue);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These are from the `node-template`, but should be doable in whatever context you want." ContentLicense="CC BY-SA 4.0" />
  <row Id="8608" PostHistoryTypeId="6" PostId="1658" RevisionGUID="4e7dd7d8-6c3f-41fb-9d26-e18e6a9cdc5e" CreationDate="2022-04-30T10:41:52.557" UserId="34" Comment="tags for search" Text="|networking|peers|security|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8609" PostHistoryTypeId="24" PostId="1658" RevisionGUID="4e7dd7d8-6c3f-41fb-9d26-e18e6a9cdc5e" CreationDate="2022-04-30T10:41:52.557" Comment="Proposed by 34 approved by 104, 139 edit id of 184" ContentLicense="CC BY-SA 4.0" />
  <row Id="8610" PostHistoryTypeId="2" PostId="2307" RevisionGUID="72d88102-bc39-4c4a-9c7a-6de9d5b48811" CreationDate="2022-04-30T11:25:07.777" UserId="2458" Text="**I am working on figuring out an efficient way to run an ELF binary after successful transaction. I also want to pass arguments along the execution.**&#xD;&#xA;&#xD;&#xA;Example: */bin/ping 1.1.1.1*&#xD;&#xA;&#xD;&#xA;OCW might be a solution, but because of the no_std environment required for WASM, it is not straightforward to:&#xD;&#xA;&#xD;&#xA;1. Execute the elf binary (eg. no std::Command available)&#xD;&#xA;2. Pass arguments&#xD;&#xA;&#xD;&#xA;I saw some project fighting with similar questions (eg. Phala, DeeperNetwork) and thought about asking here. Problem is we can't access many things like std::Command under no_std.&#xD;&#xA;&#xD;&#xA;To keep it simple and demo level, lets say we are using the template pallet and when someone transacts doSomething() we just execute the ping binary with ip address passed to it.&#xD;&#xA;&#xD;&#xA;**Code:** https://github.com/substrate-developer-hub/substrate-pallet-template/blob/dbe0a44e7cb985a2a10f47cc58cb4591f92eeb83/src/lib.rs#L69&#xD;&#xA;&#xD;&#xA;This is where the execution would start, inside doSomething().&#xD;&#xA;&#xD;&#xA;Do we have a solution for that already? It also helps if we figure out that there is &quot;no solution yet&quot; and this needs to be solved." ContentLicense="CC BY-SA 4.0" />
  <row Id="8612" PostHistoryTypeId="1" PostId="2307" RevisionGUID="72d88102-bc39-4c4a-9c7a-6de9d5b48811" CreationDate="2022-04-30T11:25:07.777" UserId="2458" Text="Execute ELF binary after successful transaction from WASM compiled pallet with no_std" ContentLicense="CC BY-SA 4.0" />
  <row Id="8613" PostHistoryTypeId="3" PostId="2307" RevisionGUID="72d88102-bc39-4c4a-9c7a-6de9d5b48811" CreationDate="2022-04-30T11:25:07.777" UserId="2458" Text="|substrate-node|pallet|frame|wasm|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8614" PostHistoryTypeId="2" PostId="2308" RevisionGUID="d5effddd-bab3-44d1-b75a-e84f5a26502f" CreationDate="2022-04-30T11:48:23.180" UserId="2408" Text="I am currently facing this Error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  Using rustc version: rustc 1.62.0-nightly (e85edd9a8 2022-04-28)&#xD;&#xA;&#xD;&#xA;     Compiling frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea)&#xD;&#xA;  error: cannot find macro `vec` in this scope&#xD;&#xA;    --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/174735e/frame/support/src/traits/storage.rs:77:17&#xD;&#xA;     |&#xD;&#xA;  77 |         let mut res = vec![];&#xD;&#xA;     |                       ^^^&#xD;&#xA;     |&#xD;&#xA;     = note: consider importing one of these items:&#xD;&#xA;             codec::alloc::vec&#xD;&#xA;             crate::sp_std::vec&#xD;&#xA;             scale_info::prelude::vec&#xD;&#xA;             sp_std::vec&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;(it says that `std` macro is used when building for `no-std`)  &#xD;&#xA;The `frame-support` import in my `Cargo.toml` looks like this:&#xD;&#xA;```&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;&#xD;&#xA;***snip***&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;parity-scale-codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking/std&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;So I __did not__ modify any code of that pallet. It __is not__ some kind of custom pallet. This code above is __from__ substrate-node-template.&#xD;&#xA;&#xD;&#xA;To build a node I use ```cargo build --release``` command.&#xD;&#xA;&#xD;&#xA;I know that runtime builds in `no-std`. But I haven't had such error with that pallet before. &#xD;&#xA;&#xD;&#xA;Please assist. I've been trying to fix this for several days now." ContentLicense="CC BY-SA 4.0" />
  <row Id="8616" PostHistoryTypeId="1" PostId="2308" RevisionGUID="d5effddd-bab3-44d1-b75a-e84f5a26502f" CreationDate="2022-04-30T11:48:23.180" UserId="2408" Text="Pallet Fails to Build Because of `std` Macros" ContentLicense="CC BY-SA 4.0" />
  <row Id="8617" PostHistoryTypeId="3" PostId="2308" RevisionGUID="d5effddd-bab3-44d1-b75a-e84f5a26502f" CreationDate="2022-04-30T11:48:23.180" UserId="2408" Text="|pallet|frame|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8618" PostHistoryTypeId="10" PostId="1882" RevisionGUID="16502aa7-0c90-4278-88db-66983e23ab3c" CreationDate="2022-04-30T12:51:33.610" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[1079],&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:11,&quot;DisplayName&quot;:&quot;Henry WH Hack v3.0b&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:83,&quot;DisplayName&quot;:&quot;Luke Schoen&quot;}]}" />
  <row Id="8619" PostHistoryTypeId="10" PostId="2203" RevisionGUID="3d857eab-6c5b-4686-ab93-84f9daa0d45d" CreationDate="2022-04-30T13:53:40.220" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[536],&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="8620" PostHistoryTypeId="5" PostId="2308" RevisionGUID="d4e6737a-f92a-45d3-8789-26d6d43e45d8" CreationDate="2022-04-30T14:07:02.723" UserId="2408" Comment="added 622 characters in body" Text="I am currently facing this Error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  Using rustc version: rustc 1.62.0-nightly (e85edd9a8 2022-04-28)&#xD;&#xA;&#xD;&#xA;     Compiling frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea)&#xD;&#xA;  error: cannot find macro `vec` in this scope&#xD;&#xA;    --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/174735e/frame/support/src/traits/storage.rs:77:17&#xD;&#xA;     |&#xD;&#xA;  77 |         let mut res = vec![];&#xD;&#xA;     |                       ^^^&#xD;&#xA;     |&#xD;&#xA;     = note: consider importing one of these items:&#xD;&#xA;             codec::alloc::vec&#xD;&#xA;             crate::sp_std::vec&#xD;&#xA;             scale_info::prelude::vec&#xD;&#xA;             sp_std::vec&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;(it says that `std` macro is used when building for `no-std`)  &#xD;&#xA;The `frame-support` import in my `Cargo.toml` looks like this:&#xD;&#xA;```&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;&#xD;&#xA;***snip***&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;parity-scale-codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking/std&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;So I __did not__ modify any code of that pallet. It __is not__ some kind of custom pallet. This code above is __from__ substrate-node-template.&#xD;&#xA;&#xD;&#xA;To build a node I use ```cargo build --release``` command.&#xD;&#xA;&#xD;&#xA;I know that runtime builds in `no-std`. But I haven't had such error with that pallet before. &#xD;&#xA;&#xD;&#xA;**[UPD]** I get the same error with finality-grandpa as well&#xD;&#xA;```&#xD;&#xA;error: cannot find macro `format` in this scope&#xD;&#xA;    --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/174735e/primitives/finality-grandpa/src/lib.rs:43:2&#xD;&#xA;     |&#xD;&#xA;  43 |     app_crypto!(ed25519, GRANDPA);&#xD;&#xA;     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: consider importing one of these items:&#xD;&#xA;             alloc::format&#xD;&#xA;             scale_info::prelude::format&#xD;&#xA;     = note: this error originates in the macro `$crate::app_crypto_public_common_if_std` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;```&#xD;&#xA;Please assist. I've been trying to fix this for several days now." ContentLicense="CC BY-SA 4.0" />
  <row Id="8621" PostHistoryTypeId="6" PostId="2308" RevisionGUID="d4e6737a-f92a-45d3-8789-26d6d43e45d8" CreationDate="2022-04-30T14:07:02.723" UserId="2408" Comment="added 622 characters in body" Text="|pallet|frame|substrate-node-template|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8622" PostHistoryTypeId="2" PostId="2309" RevisionGUID="814127db-bb78-4440-a63c-3713fd35d084" CreationDate="2022-04-30T15:21:04.267" UserId="2379" Text="Follow this doc: https://docs.substrate.io/tutorials/v3/forkless-upgrades/#upgrade-the-runtime-1.&#xD;&#xA;&#xD;&#xA;Scheduled and set_code show an error: ValidationDataNotAvailable. &#xD;&#xA;&#xD;&#xA;Do I miss something? How to fix this error?&#xD;&#xA;&#xD;&#xA;Try sudo schedule, sudoUncheckedWeight schedule, also ValidationDataNotAvailable too!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Ps: set_code without a schedule is a success.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8624" PostHistoryTypeId="1" PostId="2309" RevisionGUID="814127db-bb78-4440-a63c-3713fd35d084" CreationDate="2022-04-30T15:21:04.267" UserId="2379" Text="Runtime upgrade error: parachainSystem.ValidationDataNotAvailable" ContentLicense="CC BY-SA 4.0" />
  <row Id="8625" PostHistoryTypeId="3" PostId="2309" RevisionGUID="814127db-bb78-4440-a63c-3713fd35d084" CreationDate="2022-04-30T15:21:04.267" UserId="2379" Text="|runtime|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8627" PostHistoryTypeId="5" PostId="2295" RevisionGUID="31730d52-5207-4dbb-b08d-10e9bf774c92" CreationDate="2022-04-30T16:19:47.180" UserId="1809" Comment="improved question" Text="I was trying to submit items (extrinsics) to my Substrate blockchain instance, but it keeps getting rejected. I use the key pair I generate using `from_string` function from `sp_core::crypto::Pair`, but the extrinsics I signed using this key pair does not get submitted to the chain. The key pair that gets generated is the same type from Substrate's/Parity's `AccountKeyRing` module, but I keep getting `InvalidHexString` error. &#xD;&#xA;&#xD;&#xA;I was able to submit extrinsics signed by `AccountKeyring::Bob.pair()`. I'm confident the Key Pair I generated is the same type as `AccountKeyring::Bob.pair()`, but its not working for me for some reason. The `secret phrase` I provide to the `from_string` should be valid because it came from `subkey tool`&#xD;&#xA;&#xD;&#xA;Anyways, I get this error in my external client:&#xD;&#xA;```&#xD;&#xA;thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidHexString(InvalidStringLength)', src/services/route_actions/extrinsic_submitters.rs:25:73&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The secret phrase I provided to the `from_string` function are valid since this is generated from `subkey tool` (NOT USED IN PROD). This is my code snippet&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  let priv_key: String = &quot;endorse doctor arch helmet master dragon wild favorite property mercy vault maze&quot;.to_owned();&#xD;&#xA;  let from = Pair::from_string(&amp;priv_key[..], None).unwrap();&#xD;&#xA;  //let from = AccountKeyring::Bob.pair();&#xD;&#xA;  let api = Api::new(client).map(|api| api.set_signer(from)).unwrap();&#xD;&#xA;  ....&#xD;&#xA;  extrinsic_submitters::submit_to_save_item(api, incoming_item, now, datetime);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the code for the submission of the extrinsic I have:&#xD;&#xA;```rust&#xD;&#xA;#[allow(clippy::redundant_clone)]&#xD;&#xA;    let xt: UncheckedExtrinsicV4&lt;_&gt; = compose_extrinsic!(&#xD;&#xA;      api.clone(),&#xD;&#xA;      &quot;Auditor&quot;,&#xD;&#xA;      &quot;save_audit_item&quot;,&#xD;&#xA;      now.to_rfc3339().to_string().into_bytes()&#xD;&#xA;    );&#xD;&#xA;  &#xD;&#xA;    println!(&quot;[+] Composed Extrinsic:\n {:?}\n&quot;, xt);&#xD;&#xA;    &#xD;&#xA;    // send and watch extrinsic until finalized&#xD;&#xA;    let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the error is thrown at:&#xD;&#xA;```rust&#xD;&#xA;let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the subkey tool cmd I used: `subkey generate`&#xD;&#xA;```&#xD;&#xA;Secret phrase:       endorse doctor arch helmet master dragon wild favorite property mercy vault maze&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x78b8fbbbea218509c00d3531e72128d4eae54089f15deb24d721e30b351733ad&#xD;&#xA;  Public key (hex):  0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Account ID:        0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Public key (SS58): 5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;  SS58 Address:      5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the error I get from my node:&#xD;&#xA;```&#xD;&#xA;Failed to submit extrinsic: Transaction pool error: Invalid transaction validity: InvalidTransaction::Payment&#xD;&#xA;```&#xD;&#xA;It looks like there may be multiple reasons why the transaction is invalid, such as too high nonce, not enough funds in the account, and signature is invalid. I generated the keypair item via the info provided by subkey, and the signature should be valid, but I am not certain for sure since the error message is pretty general. My dispatchable function shouldn't cost anything because it has `#[pallet::weight(0)]`. Any tips how to expand on this `InvalidTransaction::Payment` error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8628" PostHistoryTypeId="2" PostId="2310" RevisionGUID="70e42446-390f-423d-8927-72c95a1ed74e" CreationDate="2022-04-30T16:23:47.047" UserId="139" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;So I have a `validator_count` of 2, and 1 as `minimum_validator_count`. My validator is always online. I had my friend make another validator, had it enter the active validator set, and then join in as a validator, but they had to shut down their machine. To my surprise, I see that now my chain has stopped finalizing blocks but it goes on producing blocks normally. All functions work.&#xD;&#xA;&#xD;&#xA;I have 2 questions:&#xD;&#xA;1. why does this happen?&#xD;&#xA;2. And how can we fix this? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cIiSn.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8630" PostHistoryTypeId="1" PostId="2310" RevisionGUID="70e42446-390f-423d-8927-72c95a1ed74e" CreationDate="2022-04-30T16:23:47.047" UserId="139" Text="Why has finalization stopped?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8631" PostHistoryTypeId="3" PostId="2310" RevisionGUID="70e42446-390f-423d-8927-72c95a1ed74e" CreationDate="2022-04-30T16:23:47.047" UserId="139" Text="|grandpa|validator|finality|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8632" PostHistoryTypeId="5" PostId="2310" RevisionGUID="1499169b-d4b0-43b9-b8ba-69dd35330280" CreationDate="2022-04-30T17:06:26.130" UserId="139" Comment="added 394 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;So I have a `validator_count` of 2, and 1 as `minimum_validator_count`. My validator is always online. I had my friend make another validator, had it enter the active validator set, and then join in as a validator, but they had to shut down their machine. To my surprise, I see that now my chain has stopped finalizing blocks but it goes on producing blocks normally. All functions work.&#xD;&#xA;&#xD;&#xA;I have 2 questions:&#xD;&#xA;1. why does this happen?&#xD;&#xA;2. And how can we fix this? &#xD;&#xA;&#xD;&#xA;Edit: &#xD;&#xA;Looking around I've found this : https://polkadot.js.org/docs/substrate/extrinsics/#grandpa&#xD;&#xA;as a way to reinitialize the grandpa authority set (if I understand correctly), which might have been corrupted by 1/2 validators leaving.&#xD;&#xA;&#xD;&#xA;I've also noted that the `roundState()` rpc call errors out with :  `GRANDPA RPC endpoint not ready`. An explanation for this would be welcome.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cIiSn.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8633" PostHistoryTypeId="2" PostId="2311" RevisionGUID="476ff2c9-e918-42e2-8f71-938fec168327" CreationDate="2022-04-30T18:47:51.650" UserId="245" Text="I know that networks can add their SS58 address format to [SS58 Registry][1].&#xD;&#xA;&#xD;&#xA;Polkadot addresses always start with `1` and Crust Network addresses start with `c`.&#xD;&#xA;&#xD;&#xA;Does a unique prefix determine how the addresses start? If so, (or not) how can one create an SS58 address format starting with the letter `e`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ss58-registry" ContentLicense="CC BY-SA 4.0" />
  <row Id="8635" PostHistoryTypeId="1" PostId="2311" RevisionGUID="476ff2c9-e918-42e2-8f71-938fec168327" CreationDate="2022-04-30T18:47:51.650" UserId="245" Text="How to create custom SS58 address format?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8636" PostHistoryTypeId="3" PostId="2311" RevisionGUID="476ff2c9-e918-42e2-8f71-938fec168327" CreationDate="2022-04-30T18:47:51.650" UserId="245" Text="|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8637" PostHistoryTypeId="2" PostId="2312" RevisionGUID="5a227b73-dae0-4942-966c-6f3081fd27b1" CreationDate="2022-04-30T20:54:51.317" UserId="2107" Text="I'm currently trying to deploy a private blockchain and I'm having problems trying to have nodes running on different machines but still communicating with each other. &#xD;&#xA;I've created a docker image which can be easily reused, it is simply the substrate contracts node template. Using this image I have set up a docker compose file that looks as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;version: '3'&#xD;&#xA;&#xD;&#xA;services:&#xD;&#xA;  bootnode:&#xD;&#xA;    image: {my_image}&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30333:30333&quot;&#xD;&#xA;      - &quot;9933:9933&quot;&#xD;&#xA;      - &quot;9944:9944&quot;&#xD;&#xA;      - &quot;9615:9615&quot;&#xD;&#xA;    volumes:&#xD;&#xA;      - bootnode:/tmp/node&#xD;&#xA;    command: --ws-external --rpc-external --rpc-cors all --name &quot;Bootnode 1&quot; --pruning archive --allow-private-ipv4&#xD;&#xA;    restart: always&#xD;&#xA;&#xD;&#xA;  validator-1:&#xD;&#xA;    image: {my_image}&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30334:30333&quot;&#xD;&#xA;      - &quot;9934:9933&quot;&#xD;&#xA;      - &quot;9945:9944&quot;&#xD;&#xA;      - &quot;9616:9615&quot;&#xD;&#xA;    volumes:&#xD;&#xA;      - validator-1:/tmp/node&#xD;&#xA;    command: --validator --name &quot;Validator Node 1&quot; --allow-private-ipv4&#xD;&#xA;    restart: always&#xD;&#xA;&#xD;&#xA;  validator-2:&#xD;&#xA;    image: {my_image}&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30335:30333&quot;&#xD;&#xA;      - &quot;9935:9933&quot;&#xD;&#xA;      - &quot;9946:9944&quot;&#xD;&#xA;      - &quot;9617:9615&quot;&#xD;&#xA;    volumes:&#xD;&#xA;      - validator-2:/tmp/node&#xD;&#xA;    command: --validator --name &quot;Validator Node 2&quot; --allow-private-ipv4&#xD;&#xA;    restart: always&#xD;&#xA;&#xD;&#xA;volumes:&#xD;&#xA;  bootnode:&#xD;&#xA;  validator-1:&#xD;&#xA;  validator-2:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All the containers refer to the same raw chain specification file, and that looks like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;My Chain&quot;,&#xD;&#xA;  &quot;id&quot;: &quot;my_chain&quot;,&#xD;&#xA;  &quot;chainType&quot;: &quot;Live&quot;,&#xD;&#xA;  &quot;bootNodes&quot;: [&#xD;&#xA;    &quot;/ip4/{cloud_machine_ip}/tcp/30333/p2p/{boot_node_peer_id}&quot;&#xD;&#xA;  ],&#xD;&#xA;  &quot;telemetryEndpoints&quot;: [&#xD;&#xA;    [&#xD;&#xA;      &quot;/dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F&quot;,&#xD;&#xA;      0&#xD;&#xA;    ]&#xD;&#xA;  ],&#xD;&#xA;  &quot;protocolId&quot;: &quot;my_chain&quot;,&#xD;&#xA;  &quot;properties&quot;: null,&#xD;&#xA;  &quot;codeSubstitutes&quot;: {},&#xD;&#xA;  &quot;genesis&quot;: {&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm running all the containers on a cloud hosted machine but when I try to run another node locally, or on another machine, using the same `chainSpec` file, it is unable to find any peers.&#xD;&#xA;&#xD;&#xA;Does my setup make sense? How can I make it so nodes running on different machines can communicate with each other?&#xD;&#xA;&#xD;&#xA;**Side question**&#xD;&#xA;&#xD;&#xA;I also would like to not need to use the `allow-private-ipv4` option, but if I don't use that, and the chain is set to 'Live', I cannot figure out a way to make the nodes communicate with each other locally either. Is that maybe related to my main issue? Is there something explanation that would help me understand why this happens?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8639" PostHistoryTypeId="1" PostId="2312" RevisionGUID="5a227b73-dae0-4942-966c-6f3081fd27b1" CreationDate="2022-04-30T20:54:51.317" UserId="2107" Text="How to connect two nodes running different computers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8640" PostHistoryTypeId="3" PostId="2312" RevisionGUID="5a227b73-dae0-4942-966c-6f3081fd27b1" CreationDate="2022-04-30T20:54:51.317" UserId="2107" Text="|substrate-node|substrate-node-template|nodes|private-network|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8641" PostHistoryTypeId="2" PostId="2313" RevisionGUID="708b7906-6277-4e52-8de7-1a359f639079" CreationDate="2022-04-30T21:28:31.747" UserId="45" Text="OCW could theoretically help, but Substrate does not provide a way to launch a program in response to some event. However, OCW can send HTTP requests. When OCW discover the transaction of interest it can send an HTTP request to already running HTTP server by side. That obviously requires the node operator  who enables OCW will also run the companion HTTP server program side-by-side with the Substrate node.&#xD;&#xA;&#xD;&#xA;Perhaps, though, in your case you might be able just to modify a Substrate node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8643" PostHistoryTypeId="4" PostId="2312" RevisionGUID="55429a02-81e3-43b8-baf8-3d20fa7d6997" CreationDate="2022-04-30T21:54:59.640" UserId="2107" Comment="edited title" Text="How to connect two nodes running on different computers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8644" PostHistoryTypeId="5" PostId="2201" RevisionGUID="874f2bae-2398-438e-93c1-91f8f4ac15be" CreationDate="2022-05-01T00:26:16.370" UserId="2443" Comment="added 319 characters in body" Text="**Problem**&#xD;&#xA;&#xD;&#xA;Keys cannot be added to keystore.&#xD;&#xA;&#xD;&#xA;**Situation description**&#xD;&#xA;&#xD;&#xA;To launch the private network, the boot node was first started and succeeded.[❶]&#xD;&#xA;The next time I tried to add a keys to the keystore I got the following error.[❷]&#xD;&#xA;  &#xD;&#xA;Tutorial URL&#xD;&#xA;  [enter link description here][1]&#xD;&#xA;&#xD;&#xA;**Error**&#xD;&#xA;  &#xD;&#xA;-bash: version: No such file or directory&#xD;&#xA;&#xD;&#xA;**Execution environment**&#xD;&#xA;&#xD;&#xA;mamOS Big Sur version 11.3.1&#xD;&#xA;Macbook Air（M1, 2020）&#xD;&#xA;&#xD;&#xA;**Commands executed in the terminal**&#xD;&#xA;&#xD;&#xA;❶Start the first node&#xD;&#xA;&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name MyNode01&#xD;&#xA;&#xD;&#xA;❷Add keys to the keystore&#xD;&#xA;&#xD;&#xA;./target/release/node-template key insert &#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain customSpecRaw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri your-secret-seed \&#xD;&#xA;--password-interactive \&#xD;&#xA;--key-type aura&#xD;&#xA;&#xD;&#xA;※The your-secret-seed section has been changed.&#xD;&#xA;&#xD;&#xA;**Research**&#xD;&#xA;&#xD;&#xA;■Location where the command was executed&#xD;&#xA;&#xD;&#xA;/Users/username/Substrate/substrate-node-template&#xD;&#xA;&#xD;&#xA;■Path to Key Store&#xD;&#xA;&#xD;&#xA;/private/tmp/node01/chains/local_testnet/keystore&#xD;&#xA;&#xD;&#xA;**Questionable points.**&#xD;&#xA; &#xD;&#xA; 【--base-path /tmp/node01 \】&#xD;&#xA;&#xD;&#xA;Even though the boot node was able to run[❶], why does it show no files or directories when I add a keys[❷], as the above error indicates?&#xD;&#xA;Is there a problem with the path that prevents adding keys? If so, why was the boot node able to run?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/private-network/#Start-the-blockchain-using-predefined-accounts" ContentLicense="CC BY-SA 4.0" />
  <row Id="8645" PostHistoryTypeId="5" PostId="2201" RevisionGUID="f48c6f7c-43a5-4a76-8163-c45919e7886d" CreationDate="2022-05-01T00:48:21.257" UserId="2443" Comment="added 18 characters in body" Text="**Problem**&#xD;&#xA;&#xD;&#xA;Keys cannot be added to keystore.&#xD;&#xA;&#xD;&#xA;**Situation description**&#xD;&#xA;&#xD;&#xA;To launch the private network, the boot node was first started and succeeded.[❶]&#xD;&#xA;The next time I tried to add a keys to the keystore I got the following error.[❷]&#xD;&#xA;  &#xD;&#xA;Tutorial URL&#xD;&#xA;  [enter link description here][1]&#xD;&#xA;&#xD;&#xA;**Error**&#xD;&#xA;  &#xD;&#xA;-bash: version: No such file or directory&#xD;&#xA;&#xD;&#xA;**Execution environment**&#xD;&#xA;&#xD;&#xA;mamOS Big Sur version 11.3.1&#xD;&#xA;Macbook Air（M1, 2020）&#xD;&#xA;&#xD;&#xA;**Commands executed in the terminal**&#xD;&#xA;&#xD;&#xA;❶Start the first node[succeeded]&#xD;&#xA;&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name MyNode01&#xD;&#xA;&#xD;&#xA;❷Add keys to the keystore[error]&#xD;&#xA;&#xD;&#xA;./target/release/node-template key insert &#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain customSpecRaw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri your-secret-seed \&#xD;&#xA;--password-interactive \&#xD;&#xA;--key-type aura&#xD;&#xA;&#xD;&#xA;※The your-secret-seed section has been changed.&#xD;&#xA;&#xD;&#xA;**Research**&#xD;&#xA;&#xD;&#xA;■Location where the command was executed&#xD;&#xA;&#xD;&#xA;/Users/username/Substrate/substrate-node-template&#xD;&#xA;&#xD;&#xA;■Path to Key Store&#xD;&#xA;&#xD;&#xA;/private/tmp/node01/chains/local_testnet/keystore&#xD;&#xA;&#xD;&#xA;**Questionable points.**&#xD;&#xA; &#xD;&#xA; 【--base-path /tmp/node01 \】&#xD;&#xA;&#xD;&#xA;Even though the boot node was able to run[❶], why does it show no files or directories when I add a keys[❷], as the above error indicates?&#xD;&#xA;Is there a problem with the path that prevents adding keys? If so, why was the boot node able to run?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/private-network/#Start-the-blockchain-using-predefined-accounts" ContentLicense="CC BY-SA 4.0" />
  <row Id="8646" PostHistoryTypeId="2" PostId="2314" RevisionGUID="22bbbb76-27c4-4c5c-aa41-39fda56250cb" CreationDate="2022-05-01T08:44:12.650" UserId="2146" Text="Solved it. I pulled and tried running the files on a Windows OS, and saw that I kept getting the following error&#xD;&#xA;&#xD;&#xA;    TypeORM: QueryFailedError: relation 'remarks' does not exist&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Going into the db/init.js file I changed the `synchronize`: option to `true`&#xD;&#xA;&#xD;&#xA;    const ormconfig = {&#xD;&#xA;      type: 'postgres',&#xD;&#xA;      // entities: [require.resolve('../lib/model')],&#xD;&#xA;      entities: [],&#xD;&#xA;      migrations: [__dirname + '/migrations/*.js'],&#xD;&#xA;      synchronize: true,&#xD;&#xA;      migrationsRun: false,&#xD;&#xA;      dropSchema: false,&#xD;&#xA;       //....&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/AdJK5.png&#xD;&#xA;&#xD;&#xA;Now works!" ContentLicense="CC BY-SA 4.0" />
  <row Id="8648" PostHistoryTypeId="5" PostId="2310" RevisionGUID="340daa4b-a36f-4720-aa2f-df32fb6fc1a0" CreationDate="2022-05-01T09:01:09.943" UserId="139" Comment="added 204 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;So I have a `validator_count` of 2, and 1 as `minimum_validator_count`. My validator is always online. I had my friend make another validator, had it enter the active validator set, and then join in as a validator, but they had to shut down their machine. To my surprise, I see that now my chain has stopped finalizing blocks but it goes on producing blocks normally. All functions work.&#xD;&#xA;&#xD;&#xA;I have 2 questions:&#xD;&#xA;1. why does this happen?&#xD;&#xA;2. And how can we fix this?&#xD;&#xA;&#xD;&#xA;Edit: &#xD;&#xA;Looking around I've found this : https://polkadot.js.org/docs/substrate/extrinsics/#grandpa&#xD;&#xA;as a way to reinitialize the grandpa authority set (if I understand correctly), which might have been corrupted by 1/2 validators leaving.&#xD;&#xA;&#xD;&#xA;I've also noted that the `roundState()` rpc call errors out with :  `GRANDPA RPC endpoint not ready`. An explanation for this would be welcome.&#xD;&#xA;&#xD;&#xA;Edit #2 : I've already fixed this using the tx.noteStalled. However I'd still like an answer to the first question. i.e why does this happen? Is it because of BFT and 1/2 validators turning out faulty?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cIiSn.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8649" PostHistoryTypeId="2" PostId="2315" RevisionGUID="80ee8b76-e0d6-4106-a60d-29f5be537784" CreationDate="2022-05-01T09:07:58.973" UserId="139" Text="It's clear that we must include the IP addresses to our validators on our chainspec if we are starting a solo-chain (Correct me if I am wrong here, does it need to be a validator IP or can it be any IP as in the case of a sync node?) and on the other hand, a block producer like BABE which randomizes the next block producer sells itself by shielding validators from DoS attacks by randomizing the next block producer. &#xD;&#xA;&#xD;&#xA;My question stems from these two points, if our validators are known (their IPs are on the chainspec OR maybe it is possible to find out the peer ID ip addresses?) and the network is relatively small (which is true at the beginning of every network), how or if is it even possible to prevent a DoS attack? &#xD;&#xA;&#xD;&#xA;Moreover, since Babe has a hard requirement of seeing at least one block per epoch, otherwise the chain stalls, it could very well be possible that the network sees an `epoch` seconds long DoS attack from adversaries and effectively stall the chain. &#xD;&#xA;&#xD;&#xA;Am I correct to understand this situation here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8651" PostHistoryTypeId="1" PostId="2315" RevisionGUID="80ee8b76-e0d6-4106-a60d-29f5be537784" CreationDate="2022-05-01T09:07:58.973" UserId="139" Text="How are solo chain validators protected against DoS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8652" PostHistoryTypeId="3" PostId="2315" RevisionGUID="80ee8b76-e0d6-4106-a60d-29f5be537784" CreationDate="2022-05-01T09:07:58.973" UserId="139" Text="|networking|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8653" PostHistoryTypeId="2" PostId="2316" RevisionGUID="bd023f84-3979-4c81-b708-043ca0e84a19" CreationDate="2022-05-01T09:58:27.493" UserId="2463" Text="I'm using `subxt` with the aim to handle bursts of transactions concurrently through a single account. I understand the nonce must be incremented, however I'm unsure of the exact lifecycle of a tx and at what stage the next nonce is expected. &#xD;&#xA;&#xD;&#xA;I have tested with a simple atomic counter that I manually increment, however it seems if increment and submit too fast the tx's never make it into the block. &#xD;&#xA;&#xD;&#xA;Do I need to ensure that `tx A (nonce 21)` has made it into the block before `tx B (nonce 22)` can be submitted? &#xD;&#xA;&#xD;&#xA;I'm wondering if there are any typical strategies to handle this, whether some sort of queue is required, or I if can achieve this with a simple counter." ContentLicense="CC BY-SA 4.0" />
  <row Id="8655" PostHistoryTypeId="1" PostId="2316" RevisionGUID="bd023f84-3979-4c81-b708-043ca0e84a19" CreationDate="2022-05-01T09:58:27.493" UserId="2463" Text="High transaction throughput - single acccount" ContentLicense="CC BY-SA 4.0" />
  <row Id="8656" PostHistoryTypeId="3" PostId="2316" RevisionGUID="bd023f84-3979-4c81-b708-043ca0e84a19" CreationDate="2022-05-01T09:58:27.493" UserId="2463" Text="|extrinsic|transactions|subxt|nonce|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8657" PostHistoryTypeId="5" PostId="2310" RevisionGUID="7672431b-9f82-4b41-a799-fa8942ea4bc1" CreationDate="2022-05-01T10:24:00.680" UserId="139" Comment="added 8 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;So I have a `validator_count` of 2, and 1 as `minimum_validator_count`. My validator is always online. I had my friend make another validator, had it enter the active validator set, and then join in as a validator, but they had to shut down their machine. To my surprise, I see that now my chain has stopped finalizing blocks but it goes on producing blocks normally. All functions work.&#xD;&#xA;&#xD;&#xA;I have 2 questions:&#xD;&#xA;1. why does this happen?&#xD;&#xA;2. And how can we fix this?&#xD;&#xA;&#xD;&#xA;**Edit**: &#xD;&#xA;Looking around I've found this : https://polkadot.js.org/docs/substrate/extrinsics/#grandpa&#xD;&#xA;as a way to reinitialize the grandpa authority set (if I understand correctly), which might have been corrupted by 1/2 validators leaving.&#xD;&#xA;&#xD;&#xA;I've also noted that the `roundState()` rpc call errors out with :  **`GRANDPA RPC endpoint not ready`**. An explanation for this would be welcome.&#xD;&#xA;&#xD;&#xA;**Edit #2** : I've already fixed this using the tx.noteStalled. However I'd still like an answer to the first question. i.e why does this happen? Is it because of BFT and 1/2 validators turning out faulty? &#xD;&#xA;&#xD;&#xA;**Edit #3** : And why is my **`GRANDPA RPC endpoint not ready`**?&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cIiSn.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Xg7cx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8660" PostHistoryTypeId="2" PostId="2317" RevisionGUID="3c2c3619-df58-49ad-a7e3-b76bd0664c71" CreationDate="2022-05-01T11:46:31.687" UserId="83" Text="Yes, the unique prefix is used to determine how a SS58 Address starts.&#xD;&#xA;It may be generated by this [`encodeAddress`](https://github.com/polkadot-js/common/blob/master/packages/util-crypto/src/address/encode.ts) function from the Polkadot.js API. The function shows that the unique SS58 Address Prefix is provided as the `ss58Format` argument along with the public key, and then uses it to generate and return a base58 encoded string. It shows that SS58 Address Prefixes 46 and 47 are reserved, and there may only be a maximum of 16383 SS58 Address Prefixes.&#xD;&#xA;&#xD;&#xA;If you want to create SS58 addresses with a format starting with the letter `e`, then you could write a script like below that finds all the possible SS58 address prefixes that would do that. If you wanted to choose an SS58 address prefix for your chain that does that, then you would filter out the SS58 address prefixes that have already been assigned to another chain that are listed in the SS58 Registry, since multiple SS58 address prefixes are able to create SS58 address that start with the letter 'e'.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const { encodeAddress } = require(&quot;@polkadot/util-crypto&quot;);&#xD;&#xA;&#xD;&#xA;// Public Key of Alice `subkey inspect //Alice`&#xD;&#xA;const address = &quot;0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;;&#xD;&#xA;const maxSS58AddressPrefixesCount = 16383;&#xD;&#xA;&#xD;&#xA;// Find SS58 Address Prefixes that generate an SS58 Address Format that starts with the letter 'e'&#xD;&#xA;// Optionally add a filter to this function if you only want to return those not listed in the&#xD;&#xA;// the SS58 Registry https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json&#xD;&#xA;function findSS58AddressPrefixes(address) {&#xD;&#xA;  let foundSS58AddressPrefixes = []; &#xD;&#xA;  let reservedSS58Formats = [46, 47];&#xD;&#xA;&#xD;&#xA;  // &#xD;&#xA;  for (let prefix = 0; prefix &lt;= maxSS58AddressPrefixesCount; prefix++) {&#xD;&#xA;    if (!reservedSS58Formats.includes(prefix)) {&#xD;&#xA;      let ss58Address = encodeAddress(address, prefix);&#xD;&#xA;      console.log(`${prefix}`, ss58Address);&#xD;&#xA;      if (ss58Address.charAt(0) == 'e') {&#xD;&#xA;        foundSS58AddressPrefixes.push(prefix);&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  return foundSS58AddressPrefixes;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;let foundSS58AddressPrefixes = findSS58AddressPrefixes(address);&#xD;&#xA;console.log('count: ', foundSS58AddressPrefixes.length);&#xD;&#xA;console.log('foundSS58AddressPrefixes: ', foundSS58AddressPrefixes);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you run that script it outputs the following, which shows that there are 581 SS58 Address Prefixes that would create an SS58 Address Format starting with the letter 'e':&#xD;&#xA;```&#xD;&#xA;count: 581&#xD;&#xA;foundSS58AddressPrefixes: [&#xD;&#xA;    81,   82,   83,   84,   85,   86,   87,   88,   89,  337,&#xD;&#xA;   338,  339,  340,  341,  342,  343,  344,  345,  593,  594,&#xD;&#xA;   595,  596,  597,  598,  599,  600,  601,  848,  849,  850,&#xD;&#xA;   851,  852,  853,  854,  855,  856,  857, 1104, 1105, 1106,&#xD;&#xA;  1107, 1108, 1109, 1110, 1111, 1112, 1113, 1360, 1361, 1362,&#xD;&#xA;  1363, 1364, 1365, 1366, 1367, 1368, 1369, 1616, 1617, 1618,&#xD;&#xA;  1619, 1620, 1621, 1622, 1623, 1624, 1625, 1872, 1873, 1874,&#xD;&#xA;  1875, 1876, 1877, 1878, 1879, 1880, 1881, 2128, 2129, 2130,&#xD;&#xA;  2131, 2132, 2133, 2134, 2135, 2136, 2384, 2385, 2386, 2387,&#xD;&#xA;  2388, 2389, 2390, 2391, 2392, 2640, 2641, 2642, 2643, 2644,&#xD;&#xA;  ... 481 more items&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8662" PostHistoryTypeId="4" PostId="2307" RevisionGUID="a52e6f07-6f4c-411b-ba8c-32f8d90d1f5e" CreationDate="2022-05-01T13:02:53.670" UserId="53" Comment="edited title" Text="How to execute an ELF binary after a successful transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="8663" PostHistoryTypeId="2" PostId="2318" RevisionGUID="3b9874f9-f8dc-4e37-a4d2-488e317e5484" CreationDate="2022-05-01T13:07:44.353" UserId="53" Text="There is no solution for this (yet). An API for executing binaries from the OCW could be introduces, but allowing a runtime to execute arbitrary binary code on essentially any node on the network is a systemic security risk. Realistically, it would need to be put behind some CLI option to make the danger very clear (e.g. `--enable-ocw-binary-execution-DANGEROUS`).&#xD;&#xA;&#xD;&#xA;An alternative would be to create a secondary binary which connects to the node over RPC and watches the chain state for events and then executes the code itself." ContentLicense="CC BY-SA 4.0" />
  <row Id="8665" PostHistoryTypeId="2" PostId="2319" RevisionGUID="41d86f04-0ad2-488e-a713-d8f4655db700" CreationDate="2022-05-01T16:25:23.990" UserId="377" Text="I need to implement governance on my chain.&#xD;&#xA;Do we have any references which guide me in development?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8667" PostHistoryTypeId="1" PostId="2319" RevisionGUID="41d86f04-0ad2-488e-a713-d8f4655db700" CreationDate="2022-05-01T16:25:23.990" UserId="377" Text="How we can implement Governance in a chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8668" PostHistoryTypeId="3" PostId="2319" RevisionGUID="41d86f04-0ad2-488e-a713-d8f4655db700" CreationDate="2022-05-01T16:25:23.990" UserId="377" Text="|pallet|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8669" PostHistoryTypeId="2" PostId="2320" RevisionGUID="c0940208-ea8f-4f0f-8479-2b8cd2df9d51" CreationDate="2022-05-01T17:33:00.207" UserId="464" Text="You have to implement the pallet democracy [pallet democracy][1] , you can follow how it is implemented in the dev node,[the github repository is a good start][2] . &#xD;&#xA;&#xD;&#xA;You will also need to implement the pallet_collective, except if you have your own way to handle the proposal execution. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/democracy&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L832" ContentLicense="CC BY-SA 4.0" />
  <row Id="8671" PostHistoryTypeId="2" PostId="2321" RevisionGUID="8be88a25-d347-43b7-b905-47674b197074" CreationDate="2022-05-01T17:49:01.447" UserId="74" Text="# Overview&#xD;&#xA;I'm interested to understand how to use `sc-network-gossip`'s `GossipEngine` to receive P2P messages specifically, not gossip messages. The motivation is that I would like to send specific peers specific messages rather than gossiping all messages to all peers. So far, I haven't found examples for doing so and so am posting here.&#xD;&#xA;&#xD;&#xA;## Example of gossiping&#xD;&#xA;&#xD;&#xA;The BEEFY client receives gossip messages over its provided topic using the following snippet:&#xD;&#xA;```&#xD;&#xA;let mut votes = Box::pin(self.gossip_engine.lock().messages_for(topic::&lt;B&gt;()).filter_map(&#xD;&#xA;    |notification| async move {&#xD;&#xA;        trace!(target: &quot;beefy&quot;, &quot; Got vote message: {:?}&quot;, notification);&#xD;&#xA;&#xD;&#xA;        VoteMessage::&lt;NumberFor&lt;B&gt;, AuthorityId, Signature&gt;::decode(&#xD;&#xA;            &amp;mut &amp;notification.message[..],&#xD;&#xA;        )&#xD;&#xA;        .ok()&#xD;&#xA;    },&#xD;&#xA;));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The messages are sent using:&#xD;&#xA;```&#xD;&#xA;self.gossip_engine.lock().gossip_message(topic::&lt;B&gt;(), encoded_message, false);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# API&#xD;&#xA;The `GossipEngine` API supports this method and another `send_message`&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/client/network-gossip/src/bridge.rs#L143-L146&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/client/network-gossip/src/bridge.rs#L148-L154&#xD;&#xA;&#xD;&#xA;# Questions&#xD;&#xA;It is clear where messages received over a given topic are able to be processed and consumed using examples from BEEFY. However, it is unclear how to consume messages that are sent P2P using `send_message`.&#xD;&#xA;1. If we send a message to a peer, how does one receive it and process it.&#xD;&#xA;2. Assuming the message is simply sent without a topic, what structs would I need to access?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8673" PostHistoryTypeId="1" PostId="2321" RevisionGUID="8be88a25-d347-43b7-b905-47674b197074" CreationDate="2022-05-01T17:49:01.447" UserId="74" Text="How to receive P2P messages using `sc-network-gossip`" ContentLicense="CC BY-SA 4.0" />
  <row Id="8674" PostHistoryTypeId="3" PostId="2321" RevisionGUID="8be88a25-d347-43b7-b905-47674b197074" CreationDate="2022-05-01T17:49:01.447" UserId="74" Text="|networking|client|gossip|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8675" PostHistoryTypeId="2" PostId="2322" RevisionGUID="6f0da5c7-379d-4fce-8a4b-6e44bcf206f7" CreationDate="2022-05-01T20:22:34.393" UserId="2107" Text="I'm currently running a node on a cloud machine and I'm running into several issues when trying to connect to it using the Polkadot Portal.&#xD;&#xA;&#xD;&#xA;I've tried doing it in two ways, the first is by running the node using a docker image I've created and binding its ports. I have set up a reverse-proxy as per Polkadot's documentation ([here](https://wiki.polkadot.network/docs/maintain-wss)). When I try accessing the node using the [Polkadot Explorer](https://polkadot.js.org/apps/#/explorer), I get the following error in the console: `WebSocket connection to 'wss://{cloud_ip_address}/' failed`.&#xD;&#xA;&#xD;&#xA;This made me think it could be a problem with docker, so I tried running the node natively in the machine without using it. This proved to go at least one step further, since the node was able to receive the connection attempt, but then it says the following in the node's output:&#xD;&#xA;```&#xD;&#xA;Accepted a new tcp connection from {my_ip_address:random_port}.&#xD;&#xA;WS Error &lt;Http(Token)&gt;: Invalid byte where token is required.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could someone please help me understand what I am doing wrong and how I can connect to the cloud hosted node?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8677" PostHistoryTypeId="1" PostId="2322" RevisionGUID="6f0da5c7-379d-4fce-8a4b-6e44bcf206f7" CreationDate="2022-05-01T20:22:34.393" UserId="2107" Text="How to connect to cloud hosted node using WebSocket?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8678" PostHistoryTypeId="3" PostId="2322" RevisionGUID="6f0da5c7-379d-4fce-8a4b-6e44bcf206f7" CreationDate="2022-05-01T20:22:34.393" UserId="2107" Text="|substrate-node|nodes|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8679" PostHistoryTypeId="5" PostId="2321" RevisionGUID="0b7b383d-52ab-4375-b8e7-1e3d3ad52433" CreationDate="2022-05-01T23:16:47.650" UserId="74" Comment="deleted 8 characters in body" Text="# Overview&#xD;&#xA;I'm interested to understand how to use `sc-network-gossip`'s `GossipEngine` to receive P2P messages, not just gossip messages. The motivation is that I would like to send specific peers specific messages rather than gossiping all messages to all peers. So far, I haven't found examples for doing so and so am posting here.&#xD;&#xA;&#xD;&#xA;## Example of gossiping&#xD;&#xA;&#xD;&#xA;The BEEFY client receives gossip messages over its provided topic using the following snippet:&#xD;&#xA;```&#xD;&#xA;let mut votes = Box::pin(self.gossip_engine.lock().messages_for(topic::&lt;B&gt;()).filter_map(&#xD;&#xA;    |notification| async move {&#xD;&#xA;        trace!(target: &quot;beefy&quot;, &quot; Got vote message: {:?}&quot;, notification);&#xD;&#xA;&#xD;&#xA;        VoteMessage::&lt;NumberFor&lt;B&gt;, AuthorityId, Signature&gt;::decode(&#xD;&#xA;            &amp;mut &amp;notification.message[..],&#xD;&#xA;        )&#xD;&#xA;        .ok()&#xD;&#xA;    },&#xD;&#xA;));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The messages are sent using:&#xD;&#xA;```&#xD;&#xA;self.gossip_engine.lock().gossip_message(topic::&lt;B&gt;(), encoded_message, false);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# API&#xD;&#xA;The `GossipEngine` API supports this method and another `send_message`&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/client/network-gossip/src/bridge.rs#L143-L146&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/client/network-gossip/src/bridge.rs#L148-L154&#xD;&#xA;&#xD;&#xA;# Questions&#xD;&#xA;It is clear where messages received over a given topic are able to be processed and consumed using examples from BEEFY. However, it is unclear how to consume messages that are sent P2P using `send_message`.&#xD;&#xA;1. If we send a message to a peer, how does one receive it and process it.&#xD;&#xA;2. Assuming the message is simply sent without a topic, what structs would I need to access?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8680" PostHistoryTypeId="4" PostId="2321" RevisionGUID="0b7b383d-52ab-4375-b8e7-1e3d3ad52433" CreationDate="2022-05-01T23:16:47.650" UserId="74" Comment="deleted 8 characters in body" Text="How to receive P2P messages using sc-network-gossip" ContentLicense="CC BY-SA 4.0" />
  <row Id="8681" PostHistoryTypeId="5" PostId="2293" RevisionGUID="b0b2e801-edc2-422f-8eab-d0ffd7d724b1" CreationDate="2022-05-02T01:05:04.080" UserId="227" Comment="added 218 characters in body" Text="I'm not sure if I understand correctly what you mean with &quot;to make bridge using ink!&quot;, so I'll try to answer what I guess you mean.&#xD;&#xA;&#xD;&#xA;So in the Substrate universe you would build a bridge to another chain as a _Substrate runtime module_ and not as a smart contract. Those are two different things in Substrate. `parity-common-bridges` is a collection of Substrate modules (those are called &quot;pallets&quot; in Substrate terminology) to build a bridge.&#xD;&#xA;&#xD;&#xA;Substrate has a number of other pallets, one of them is called `pallet-contracts`. It's a module that you can add to your Substrate runtime to give it smart contract capabilities. With ink! you can write smart contracts for this `pallet-contracts`.&#xD;&#xA;&#xD;&#xA;Not every chain needs smart contracts, on Polkadot/Kusama many actually don't have a need for smart contracts because they realize this functionality purely within their Substrate runtime. For example, some chains don't have a need for users to execute programs which make use of the chain business logic (which is one reason why a chain would want to add smart contract capabilities).&#xD;&#xA;&#xD;&#xA;I suspect that your questions stems from a confusion that people learning about Substrate often run into: that most things are implemented as a Substrate runtime and not as a smart contract.&#xD;&#xA;&#xD;&#xA;There is a great answer to Smart Contracts vs. Runtimes on Substrate here: [When should I build a Substrate Runtime Module versus a Substrate Smart Contract?](https://stackoverflow.com/questions/56040779/when-should-i-build-a-substrate-runtime-module-versus-a-substrate-smart-contract).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8682" PostHistoryTypeId="2" PostId="2323" RevisionGUID="a041d261-422c-46a3-9ef8-d2816256ba5f" CreationDate="2022-05-02T01:37:55.930" UserId="34" Text="# Dan Shields&#xD;&#xA;&#xD;&#xA;Hey all! I am a Parity Support, turned Developer Experience Engineer committed to the Substrate and Polkadot developer community. I work to maintain the [Substrate Developer Hub](https://github.com/substrate-developer-hub/) docs, tutorials, templates, and how-to guides. As a mod here I will have the best &quot;front line&quot; view of what new materials should exist to help prevent common problems and clarify poorly understood aspects of Substrate and Polkadot.&#xD;&#xA;&#xD;&#xA;Outside of my day job, I have relevant experience I will leverage to **steward** this community:&#xD;&#xA;&#xD;&#xA;- I am a community moderator of the Polkadot, Kusama, [Radical Exchange](https://www.radicalxchange.org/), and [Cryptorado](https://cryptorado.org/) discords, and through Cryptorado host in person social and educational events often. I know how to resolve conflict and encourage fun, engaging discussion.&#xD;&#xA;- I teach courses on blockchain fundamentals at UC Berkeley and Denver University. I know how to curate questions and answers to maximize their utility to the broadest audience possible.&#xD;&#xA;&#xD;&#xA;I pledge, as a mod, to foster a welcoming, collaborative culture develops amongst us here.&#xD;&#xA;&#xD;&#xA;I would be honored to have your vote!" ContentLicense="CC BY-SA 4.0" />
  <row Id="8684" PostHistoryTypeId="2" PostId="2324" RevisionGUID="6cd25ac6-7637-44c8-aedd-ae2b0ac35762" CreationDate="2022-05-02T04:26:34.617" UserId="464" Text="As you are connecting from outside to your node you probably have to pass the inscure flags too `--rpc-methods unsafe --ws-external --rpc-external` the last one is only if you need rpc external access, in your case `--ws-external` would be ok." ContentLicense="CC BY-SA 4.0" />
  <row Id="8686" PostHistoryTypeId="2" PostId="2325" RevisionGUID="03dbf744-e7c6-4222-8c1e-6aa10b3ea54c" CreationDate="2022-05-02T04:36:24.123" UserId="2394" Text="I'm trying to use `chrono` crate from [substrate chrono docs](https://docs.substrate.io/rustdocs/latest/chrono/struct.DateTime.html#) when implementing a ink! smart contract.&#xD;&#xA;&#xD;&#xA;I've just imported `chrono::DateTime` and `chrono::Utc` from the crate and can compile and run test. &#xD;&#xA;&#xD;&#xA;However I get errors when trying to build the contract with `cargo +nightly contract build`:&#xD;&#xA;&#xD;&#xA;```doesn't have a size known at compile-time```&#xD;&#xA;&#xD;&#xA;Do you know what I'm missing?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8688" PostHistoryTypeId="1" PostId="2325" RevisionGUID="03dbf744-e7c6-4222-8c1e-6aa10b3ea54c" CreationDate="2022-05-02T04:36:24.123" UserId="2394" Text="Ink! chrono DateTime" ContentLicense="CC BY-SA 4.0" />
  <row Id="8689" PostHistoryTypeId="3" PostId="2325" RevisionGUID="03dbf744-e7c6-4222-8c1e-6aa10b3ea54c" CreationDate="2022-05-02T04:36:24.123" UserId="2394" Text="|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8690" PostHistoryTypeId="5" PostId="2325" RevisionGUID="cfd7bab9-94d5-47ea-8ada-715d21952eeb" CreationDate="2022-05-02T04:42:52.993" UserId="2394" Comment="added 63 characters in body" Text="I'm trying to use `chrono` crate from [substrate chrono docs](https://docs.substrate.io/rustdocs/latest/chrono/struct.DateTime.html#) when implementing a ink! smart contract.&#xD;&#xA;&#xD;&#xA;I've just imported `chrono::DateTime` and `chrono::Utc` from the crate and can compile and run test. &#xD;&#xA;&#xD;&#xA;However I get errors when trying to build the contract with `cargo +nightly contract build`:&#xD;&#xA;&#xD;&#xA;```doesn't have a size known at compile-time```&#xD;&#xA;&#xD;&#xA;Do you know what I'm missing? Is there a better/standard way to handle dates and timestamps?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8691" PostHistoryTypeId="5" PostId="2135" RevisionGUID="22e2d54e-c7ca-4b35-8fe4-935a887fb4e9" CreationDate="2022-05-02T05:31:38.487" UserId="83" Comment="added 986 characters in body; added 5 characters in body" Text="# &#xD;&#xA;&#xD;&#xA;# Luke Schoen&#xD;&#xA;&#xD;&#xA;I think I would be a good moderator because:&#xD;&#xA;&#xD;&#xA;- I have enjoyed hacking on Substrate and Polkadot for 3+ years in Rust and JavaScript&#xD;&#xA;&#xD;&#xA;- I love learning and meeting the community at Substrate and Polkadot hackathons and conferences. I was at Amsterdot in 2022. 2nd place at Build Polkadot in 2020. I presented at Polkadot Encoded in 2021&#xD;&#xA;&#xD;&#xA;- I contributed to Substrate and Polkadot source code, and in-depth docs&#xD;&#xA;&#xD;&#xA;- I actively contributed to Q&amp;A in this Substrate Stack Exchange since inception. Previously active in Stack Overflow, Ethereum Stack Exchange, and Substrate Technical&#xD;&#xA;&#xD;&#xA;- I moderate the Ethereum community r/ethdev&#xD;&#xA;&#xD;&#xA;- I briefly worked with core devs building Polkadot.js at Parity Tech&#xD;&#xA;&#xD;&#xA;- I built custom Substrate runtime modules, deployed a standalone mainnet, migrated to parachain testnet on Rococo, and launched a project on Kusama&#xD;&#xA;&#xD;&#xA;- I am a Polkadot Ambassador&#xD;&#xA;&#xD;&#xA;- I use Substrate products. I provide feedback, participate in live governance, run validator nodes, nominate, and participate in crowdloans&#xD;&#xA;&#xD;&#xA;- I am patient and empathetic toward new learners. I was previously an assistant educator at an in-person coding bootcamp" ContentLicense="CC BY-SA 4.0" />
  <row Id="8692" PostHistoryTypeId="2" PostId="2326" RevisionGUID="f0b7bbc5-4d0d-40cf-b1a6-4831d8e3d7aa" CreationDate="2022-05-02T05:51:02.177" UserId="1950" Text="Okay Im Writing the answer here&#xD;&#xA;&#xD;&#xA;The issue was that I haven't followed the dependencies declared order in node template. Once I implement the same on that , it worked " ContentLicense="CC BY-SA 4.0" />
  <row Id="8694" PostHistoryTypeId="5" PostId="2135" RevisionGUID="25b96747-81bf-4d97-8b8a-38b3e0ae2321" CreationDate="2022-05-02T05:51:48.527" UserId="83" Comment="added 19 characters in body" Text="# &#xD;&#xA;&#xD;&#xA;# Luke Schoen&#xD;&#xA;&#xD;&#xA;I think I would be a good moderator because:&#xD;&#xA;&#xD;&#xA;- I have enjoyed hacking on Substrate and Polkadot for 3+ years in Rust and JavaScript&#xD;&#xA;&#xD;&#xA;- I love learning and meeting the community at Substrate and Polkadot hackathons and conferences. I was at Amsterdot in 2022. 2nd place at Build Polkadot in 2020. I presented at Polkadot Encoded in 2021&#xD;&#xA;&#xD;&#xA;- I contributed to Substrate and Polkadot source code, and in-depth docs&#xD;&#xA;&#xD;&#xA;- I actively contributed to Q&amp;A in this Substrate Stack Exchange since inception. Previously active in Stack Overflow, Ethereum Stack Exchange, and Substrate Technical&#xD;&#xA;&#xD;&#xA;- I moderate the Ethereum community r/ethdev&#xD;&#xA;&#xD;&#xA;- I briefly worked with core devs building Polkadot.js at Parity Tech&#xD;&#xA;&#xD;&#xA;- I built custom Substrate runtime modules, deployed a standalone mainnet, migrated to parachain testnet on Rococo, and launched a project on Kusama&#xD;&#xA;&#xD;&#xA;- I am a Polkadot Ambassador&#xD;&#xA;&#xD;&#xA;- I use Substrate products. I provide feedback, participate in live governance, run validator nodes, nominate, participate in crowdloans, and use DeFi and NFTs&#xD;&#xA;&#xD;&#xA;- I am patient and empathetic toward new learners. I was previously an assistant educator at an in-person coding bootcamp" ContentLicense="CC BY-SA 4.0" />
  <row Id="8695" PostHistoryTypeId="5" PostId="2135" RevisionGUID="d1adaf98-3602-414e-977e-e60b946fb2dc" CreationDate="2022-05-02T06:07:45.890" UserId="83" Comment="deleted 25 characters in body" Text="# &#xD;&#xA;&#xD;&#xA;# Luke Schoen&#xD;&#xA;&#xD;&#xA;I am passionate about Polkadot and the Web3 vision. I have a long-term vested interest in its success:&#xD;&#xA;&#xD;&#xA;- I have enjoyed hacking on Substrate and Polkadot for 3+ years in Rust and JavaScript&#xD;&#xA;&#xD;&#xA;- I love learning and meeting the community at Substrate and Polkadot hackathons and conferences. I was at Amsterdot in 2022. 2nd place at Build Polkadot in 2020. I presented at Polkadot Encoded in 2021&#xD;&#xA;&#xD;&#xA;- I contributed to Substrate and Polkadot source code, and in-depth docs&#xD;&#xA;&#xD;&#xA;- I actively contributed Q&amp;A in this Substrate Stack Exchange. Previously active in Stack Overflow, Ethereum Stack Exchange, and Substrate Technical&#xD;&#xA;&#xD;&#xA;- I moderate Ethereum community r/ethdev&#xD;&#xA;&#xD;&#xA;- I briefly worked with core devs building Polkadot.js at Parity Tech&#xD;&#xA;&#xD;&#xA;- I built custom Substrate runtime modules, deployed a standalone mainnet, migrated to parachain testnet on Rococo, launched a project on Kusama&#xD;&#xA;&#xD;&#xA;- I am a Polkadot Ambassador&#xD;&#xA;&#xD;&#xA;- I use Substrate products. I provide feedback, participate in live governance, staking, defi, and NFTs&#xD;&#xA;&#xD;&#xA;- I am patient and empathetic toward new learners. I was previously an assistant educator at an in-person coding bootcamp" ContentLicense="CC BY-SA 4.0" />
  <row Id="8697" PostHistoryTypeId="2" PostId="2327" RevisionGUID="cee9921f-4be1-4647-980d-2818907eda51" CreationDate="2022-05-02T07:04:26.363" UserId="299" Text="And, can I continue to run independently after my `parachain` goes offline and I leave the `relaychain`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8699" PostHistoryTypeId="1" PostId="2327" RevisionGUID="cee9921f-4be1-4647-980d-2818907eda51" CreationDate="2022-05-02T07:04:26.363" UserId="299" Text="Do not want to clean up the data of the independent chain, how to seamlessly connect to the parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8700" PostHistoryTypeId="3" PostId="2327" RevisionGUID="cee9921f-4be1-4647-980d-2818907eda51" CreationDate="2022-05-02T07:04:26.363" UserId="299" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8701" PostHistoryTypeId="2" PostId="2328" RevisionGUID="2d353684-d2e3-4b8a-a5a1-105cf8928754" CreationDate="2022-05-02T08:06:39.270" UserId="2466" Text="My goal is to create an interoperable NFT collection in the Polkadot native ecosystem and allow its holders to interact with it on a parachain's smart contract. In that smart contract, the holder can burn their NFT and mint another NFT in return.&#xD;&#xA;&#xD;&#xA;Is this possible in the future from a technical point of view?&#xD;&#xA;&#xD;&#xA;We can create non-fungible assets with Statemint/Statemine `pallet-uniques`. I think that those NFTs will be able to be transferred to smart contract parachains via XCM reserve-backed transfer.&#xD;&#xA;&#xD;&#xA;However, my understanding is that this is not a trusted teleport, so only transfers are allowed on the smart contract parachain. Similarly, I guess the asset instance's metadata/attributes must be immutable.&#xD;&#xA;&#xD;&#xA;Hence, my goal &quot;when burnt then mint&quot; is not feasible? Any ideas to realize this?&#xD;&#xA;&#xD;&#xA;It can be achieved by maintaining external servers with an admin account that monitors chains and submit transactions, but that cannot be decentralized.&#xD;&#xA;&#xD;&#xA;References:&#xD;&#xA;- https://substrate.stackexchange.com/questions/1448/how-to-import-a-token-from-parachain-x-to-my-parachain-y&#xD;&#xA;- https://substrate.stackexchange.com/questions/988/non-fungible-token-xcm-transfer-documentation" ContentLicense="CC BY-SA 4.0" />
  <row Id="8703" PostHistoryTypeId="1" PostId="2328" RevisionGUID="2d353684-d2e3-4b8a-a5a1-105cf8928754" CreationDate="2022-05-02T08:06:39.270" UserId="2466" Text="Can we mint/burn Statemint assets on other parachains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8704" PostHistoryTypeId="3" PostId="2328" RevisionGUID="2d353684-d2e3-4b8a-a5a1-105cf8928754" CreationDate="2022-05-02T08:06:39.270" UserId="2466" Text="|parachain|smart-contract|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8705" PostHistoryTypeId="5" PostId="1395" RevisionGUID="1e98c233-4e7f-460c-974e-00f9feba18fc" CreationDate="2022-05-02T08:16:01.873" UserId="360" Comment="added 168 characters in body" Text="The following checklist should help avoiding the most common reasons why a parachain won't produce blocks. The most common reasons on top, the more advanced trouble further down&#xD;&#xA;&#xD;&#xA; 0. Is your parachain unboarded with the correct paraid? If it is still a parathread, you won't be able to produce blocks. check js/apps https://polkadot.js.org/apps/&#xD;&#xA; 1. Is your collator in sync with the latest block on the correct relay chain?&#xD;&#xA;    * check collator log. look for `[Relaychain] ✨ Imported #216436 (0x149a…96fe)`&#xD;&#xA;       * This would indicate you're still synching: `[Relaychain] ⚙️  Syncing 77.3 bps, target=#216367 (28 peers), best: #213071 (0x7d38…04f3), finalized #212992 (0x505d…c7e5), ⬇ 3.6kiB/s ⬆ 3.8kiB/s`&#xD;&#xA; 2. Are you running at least 2 authority collators? Are they peering up?&#xD;&#xA;    * check collator logs: `Role: AUTHORITY` / &#xD;&#xA;    `Is collating: yes` / `[Parachain]  Idle (3 peers)`&#xD;&#xA; 3. Are authority keys injected (rpc `author.insertKey`)? (If your parachain runtime uses Aura)&#xD;&#xA;    * verify with collator rpc: `author.hasKey`&#xD;&#xA; 4. Is your collator set up with the correct Paraid?&#xD;&#xA;    * check collator log `Parachain id: Id(1003)`&#xD;&#xA;    * check if your state has the same paraid. with js/apps, query `parachainInfo.parachainId` (a mismatch here can also cause trouble with XCM)&#xD;&#xA; 5. Does parachain genesis match what is registered on the relay chain?&#xD;&#xA;    * check collator logs `Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000236b98be9f06700ff1618e1f9cbb43bc006571517d`&#xD;&#xA;    * compare to relaychain `paras.heads(&lt;paraid&gt;)` if you are at block 0, this should be the same as your genesis state above&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then you should at least see `[Parachain] Starting collation`&#xD;&#xA;&#xD;&#xA;Still not producing blocks?&#xD;&#xA;&#xD;&#xA; 6. Does the runtime which the relaychain validators use for PoV validation match the runtime your collator uses to produce blocks? (this can be different if your genesis state and submitted wasm do not match)&#xD;&#xA;    * on the relaychain, query `paras.currentCodeHash(&lt;paraid&gt;)`&#xD;&#xA;    * does that match with a runtime with the same `specVersion` your collator shows in js/apps?&#xD;&#xA;      * otherwise, the relaychain validator may fail to include the block with `panicked at 'Transaction has a bad signature'`&#xD;&#xA;    * if you're unsure, you can calculate the hash of any runtime wasm file by using js/apps extrinsic `parachainSystem.authorizeUpgrade` and compare the hash with the one registered on the relachain&#xD;&#xA;    " ContentLicense="CC BY-SA 4.0" />
  <row Id="8706" PostHistoryTypeId="5" PostId="2322" RevisionGUID="974f377d-5c6a-4d11-b905-80256b24e5aa" CreationDate="2022-05-02T08:16:52.233" UserId="2107" Comment="added 229 characters in body" Text="I'm currently running a node on a cloud machine and I'm running into several issues when trying to connect to it using the Polkadot Portal.&#xD;&#xA;&#xD;&#xA;I've tried doing it in two ways, the first is by running the node using a docker image I've created and binding its ports. I have set up a reverse-proxy as per Polkadot's documentation ([here](https://wiki.polkadot.network/docs/maintain-wss)). When I try accessing the node using the [Polkadot Explorer](https://polkadot.js.org/apps/#/explorer), I get the following error in the console: `WebSocket connection to 'wss://{cloud_ip_address}/' failed`.&#xD;&#xA;&#xD;&#xA;This made me think it could be a problem with docker, so I tried running the node natively in the machine without using it. This proved to go at least one step further, since the node was able to receive the connection attempt, but then it says the following in the node's output:&#xD;&#xA;```&#xD;&#xA;Accepted a new tcp connection from {my_ip_address:random_port}.&#xD;&#xA;WS Error &lt;Http(Token)&gt;: Invalid byte where token is required.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could someone please help me understand what I am doing wrong and how I can connect to the cloud hosted node?&#xD;&#xA;&#xD;&#xA;PS. The command used to run the node was:&#xD;&#xA;```&#xD;&#xA;./path/to/binary --chain ./chainSpecRaw.json --force-authoring --base-path /tmp/node \&#xD;&#xA; --name &quot;Test Node&quot; --ws-external --rpc-external --rpc-cors all --allow-private-ipv4&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8707" PostHistoryTypeId="2" PostId="2329" RevisionGUID="2f507db6-8ce8-400d-b2fd-692cd05cd626" CreationDate="2022-05-02T08:18:45.487" UserId="280" Text="I am currently writing a migration to remove a pallet and all its memory from our runtime. Unfortunately, I cannot manage to check for the existence of the pallet's prefix in the pre- and post upgrade `try-runtime` hooks as all of my tried check function return false, even if the storage exists, e.g. `frame_support::storage::unhashed::kill_prefix(&amp;prefix, None)` returns `AllRemoved(5)`. &#xD;&#xA;&#xD;&#xA;I have tried the following functions which internally use `sp_io::storage` API:&#xD;&#xA;```rust&#xD;&#xA;frame_support::storage::unhashed::exists(&amp;prefix);&#xD;&#xA;frame_support::storage::get_raw::exists(&amp;prefix);&#xD;&#xA;frame_support::storage::migration::have_storage_value(&amp;prefix, &amp;[]);&#xD;&#xA;frame_support::storage::migration::have_storage_value(&amp;prefix, &amp;some_storage_entry);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Moreover, after removing all entries with `kill_prefix` in the `on_runtime_upgrade_hook`, the same call results in `SomeRemaining(1)` when checking in `post_upgrade` hook. Does this happen because one storage entry persists in the in-memory overlay of the `try-runtime` execution?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8709" PostHistoryTypeId="1" PostId="2329" RevisionGUID="2f507db6-8ce8-400d-b2fd-692cd05cd626" CreationDate="2022-05-02T08:18:45.487" UserId="280" Text="Removal of storage prefix from database" ContentLicense="CC BY-SA 4.0" />
  <row Id="8710" PostHistoryTypeId="3" PostId="2329" RevisionGUID="2f507db6-8ce8-400d-b2fd-692cd05cd626" CreationDate="2022-05-02T08:18:45.487" UserId="280" Text="|migration|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8711" PostHistoryTypeId="2" PostId="2330" RevisionGUID="01883aa3-e263-4518-a19a-22b6449ea063" CreationDate="2022-05-02T08:54:37.690" UserId="225" Text="Using the frame support iterators on pallet maps when available could be the better approach.&#xD;&#xA;&#xD;&#xA;If not using frame support (or storage structure do not allow iteration), one can use sp_io primitives (similar to support raw api).&#xD;&#xA;First check existence of prefix key, then call `sp_io::storage::next_key(prefix)` until the resulting key does no start with the prefix.&#xD;&#xA;That's pretty low level but does not need to assume anything from the pallet (just its prefix and that it never did write outside of it).&#xD;&#xA;&#xD;&#xA;`kill_prefix` always apply from the prefix (there is no persistence of previous calls progress), so it only make sense to call it multiple time if the limit of removed items is increased (generally calling it only once per block is better)." ContentLicense="CC BY-SA 4.0" />
  <row Id="8713" PostHistoryTypeId="5" PostId="2135" RevisionGUID="4eebe4f6-9cb6-42bd-8c17-1314dfffa167" CreationDate="2022-05-02T08:55:25.313" UserId="83" Comment="added 14 characters in body; added 18 characters in body; added 11 characters in body" Text="# &#xD;&#xA;&#xD;&#xA;# Luke Schoen&#xD;&#xA;&#xD;&#xA;I am passionate about Polkadot and the Web3 vision. I have a long-term interest in its success:&#xD;&#xA;&#xD;&#xA;- I enjoy hacking on Substrate and Polkadot for 3+ years in Rust and JavaScript&#xD;&#xA;&#xD;&#xA;- I learn and meet the community at Substrate and Polkadot hackathons and conferences. I was at Amsterdot in 2022. 2nd place at Build Polkadot in 2020. I presented at Polkadot Encoded in 2021&#xD;&#xA;&#xD;&#xA;- I contribute to Substrate and Polkadot source code and in-depth docs&#xD;&#xA;&#xD;&#xA;- I actively contributed Q&amp;A in this Substrate Stack Exchange. Previously active in Stack Overflow, Ethereum Stack Exchange, and Substrate Technical&#xD;&#xA;&#xD;&#xA;- I moderate Ethereum community r/ethdev&#xD;&#xA;&#xD;&#xA;- I briefly worked with core devs building Polkadot.js at Parity Tech&#xD;&#xA;&#xD;&#xA;- I **build** custom Substrate runtime modules, deployed a standalone mainnet, migrated to parachain testnet on Rococo, launched a project on Kusama&#xD;&#xA;&#xD;&#xA;- I am a **member** of Polkadot Ambassador and in Substrate Builders Program&#xD;&#xA;&#xD;&#xA;- I am an **end-user** of Substrate products. I provide feedback, participate in live governance, staking, defi, and NFTs&#xD;&#xA;&#xD;&#xA;- I am patient and empathetic toward new learners. I was previously an assistant educator at an in-person coding bootcamp" ContentLicense="CC BY-SA 4.0" />
  <row Id="8714" PostHistoryTypeId="5" PostId="2135" RevisionGUID="52a528e7-5426-46d5-95ac-dc2e3d73acb0" CreationDate="2022-05-02T09:02:30.320" UserId="83" Comment="deleted 9 characters in body" Text="# &#xD;&#xA;&#xD;&#xA;# Luke Schoen&#xD;&#xA;&#xD;&#xA;I am passionate about Polkadot and the Web3 vision. I have a long-term interest in its success:&#xD;&#xA;&#xD;&#xA;- I enjoy hacking on Substrate and Polkadot for 3+ years in Rust and JavaScript&#xD;&#xA;&#xD;&#xA;- I interact at Substrate and Polkadot community hackathons and conferences. I was at Amsterdot 2022. 2nd place at Build Polkadot 2020. I presented at Polkadot Encoded 2021&#xD;&#xA;&#xD;&#xA;- I contribute **code** to Substrate and Polkadot source code and in-depth docs&#xD;&#xA;&#xD;&#xA;- I actively **post** Q&amp;A in this Substrate Stack Exchange. Previously active in Stack Overflow, Ethereum Stack Exchange, and Substrate Technical&#xD;&#xA;&#xD;&#xA;- I moderate Ethereum community r/ethdev&#xD;&#xA;&#xD;&#xA;- I briefly **worked** with core devs building Polkadot.js at Parity Tech&#xD;&#xA;&#xD;&#xA;- I **build** custom Substrate runtime modules, deployed a standalone mainnet, migrated to parachain testnet on Rococo, launched a project on Kusama&#xD;&#xA;&#xD;&#xA;- I am a **member** of Polkadot Ambassador and in Substrate Builders Program&#xD;&#xA;&#xD;&#xA;- I am an **end-user** of Substrate products. I provide feedback, participate in live governance, staking, defi, and NFTs&#xD;&#xA;&#xD;&#xA;- I am patient and empathetic toward new learners. I was previously an assistant educator at an in-person coding bootcamp" ContentLicense="CC BY-SA 4.0" />
  <row Id="8715" PostHistoryTypeId="5" PostId="2135" RevisionGUID="81045511-219b-4b90-ac1b-edb280c5be67" CreationDate="2022-05-02T09:14:25.747" UserId="83" Comment="deleted 12 characters in body" Text="# &#xD;&#xA;&#xD;&#xA;# Luke Schoen&#xD;&#xA;&#xD;&#xA;I am passionate about Polkadot and the Web3 vision. I have a long-term interest in its success:&#xD;&#xA;&#xD;&#xA;- I enjoy hacking on Substrate and Polkadot for 3+ years in Rust and JavaScript&#xD;&#xA;&#xD;&#xA;- I interact at Substrate and Polkadot community hackathons and conferences. I was at Amsterdot 2022. 2nd place at Build Polkadot 2020. I presented at Polkadot Encoded 2021&#xD;&#xA;&#xD;&#xA;- I contribute code to Substrate and Polkadot source code and in-depth docs&#xD;&#xA;&#xD;&#xA;- I actively post Q&amp;A in this Substrate Stack Exchange. Previously active in Stack Overflow, Ethereum Stack Exchange, and Substrate Technical&#xD;&#xA;&#xD;&#xA;- I moderate Ethereum community r/ethdev&#xD;&#xA;&#xD;&#xA;- I briefly worked with core devs building Polkadot.js at Parity Tech&#xD;&#xA;&#xD;&#xA;- I **build** custom Substrate runtime modules, deployed a standalone mainnet, migrated to parachain testnet on Rococo, launched a project on Kusama&#xD;&#xA;&#xD;&#xA;- I am a **member** of Polkadot Ambassador and in Substrate Builders Program&#xD;&#xA;&#xD;&#xA;- I am an **end-user** of Substrate products. I provide feedback, participate in live governance, staking, defi, and NFTs&#xD;&#xA;&#xD;&#xA;- I am patient and empathetic toward new learners. I was previously an assistant educator at an in-person coding bootcamp" ContentLicense="CC BY-SA 4.0" />
  <row Id="8716" PostHistoryTypeId="2" PostId="2331" RevisionGUID="0f1b4895-d249-4fe1-ba57-e2456687b58f" CreationDate="2022-05-02T09:37:36.613" UserId="2107" Text="I've managed to fix my issue by setting up a proper certificate instead of using the self signed one. Once that was done, everything worked as expected." ContentLicense="CC BY-SA 4.0" />
  <row Id="8718" PostHistoryTypeId="2" PostId="2332" RevisionGUID="f77c2dbf-b3b4-4fe6-869e-43c735030627" CreationDate="2022-05-02T09:45:36.410" UserId="172" Text="# Sacha Lansky&#xD;&#xA;&#xD;&#xA;Hi I'm Sacha - my day job involves doing developer advocacy for Substrate as well as writing and maintaining documentation for Substrate's developer hub. &#xD;&#xA;&#xD;&#xA;Throughout the beta phase of this site's launch I've been actively engaging with various developers working with Substrate, beyond Parity, to ensure they find their place in our StackExchange community. It's important to me that we help bring developers together, especially with a tech stack that touches so many different areas. There's so much to learn from one another in a place where tags act as virtual lecture halls.&#xD;&#xA;&#xD;&#xA;My goal is to help this initiative evolve into a place that fosters relevant, accurate and high quality resources for any person or team building with Substrate. I also want it to continue to welcome expert contributors and for them to set the standards for quality questions and answers, helping new contributors to improve their questions where needed. As your moderator, I will be sure to act in line with the code of conduct laid out by our [guidelines](https://substrate.stackexchange.com/help/how-to-answer) and act on things discussed in the meta threads, firmly but friendly. ❤️" ContentLicense="CC BY-SA 4.0" />
  <row Id="8720" PostHistoryTypeId="2" PostId="2333" RevisionGUID="30f9c6b8-06e2-4a41-814b-b158ef6ff97f" CreationDate="2022-05-02T09:48:45.593" UserId="2394" Text="changing from &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;chrono = &quot;0.4&quot; &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;to&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;chrono = { version = &quot;0.4&quot;, default-features = false }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;in Cargo.toml solved the issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="8723" PostHistoryTypeId="10" PostId="2094" RevisionGUID="a9aff3f8-c8c2-4967-9c4c-517893767f89" CreationDate="2022-05-02T09:51:50.580" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:83,&quot;DisplayName&quot;:&quot;Luke Schoen&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;}]}" />
  <row Id="8724" PostHistoryTypeId="5" PostId="2053" RevisionGUID="b8e35a5e-7cfe-4129-b440-177751e2591c" CreationDate="2022-05-02T09:57:43.483" UserId="172" Comment="Clarified post and tags." Text="I am querying extrinsic data and I am able to fetch `gasLimit` and `gasPrice` out of `Extrinsic.method.args`. But how do I fetch the amount of gas used from an extrinsic? " ContentLicense="CC BY-SA 4.0" />
  <row Id="8725" PostHistoryTypeId="6" PostId="2053" RevisionGUID="b8e35a5e-7cfe-4129-b440-177751e2591c" CreationDate="2022-05-02T09:57:43.483" UserId="172" Comment="Clarified post and tags." Text="|smart-contract|weight|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8726" PostHistoryTypeId="2" PostId="2334" RevisionGUID="42df1f93-e5d5-41bd-a6a8-1d30823c9b95" CreationDate="2022-05-02T10:06:42.140" UserId="165" Text="Going from a solo chain to a parachain accepts different approaches, but you will have to check that the different types you are using on your chain will be compatible with /understood by (call it whatever you please) by the ecosystem that you are about to connect to. This translates to you might have to migrate some part of your state.&#xD;&#xA;As an example I know this tool https://github.com/centrifuge/centrifuge-cli/tree/main/packages/plugins/migration that was used by Centrifuge team to do this migration. So a similar scenario.&#xD;&#xA;&#xD;&#xA;On you follow up question, my two cents are, if you are connecting as a parachain you are getting finality from the relay chain, then why running on solo again where finality is granted by your own chain. The flow for a parachain that off boards from its slot is to become a parathread from which state is possible to on board again as a parachain, though different ways of tackling this have been seen already in the ecosystem, for instance getting a another slot when the first lease is close to finish.&#xD;&#xA;&#xD;&#xA;I still would like to know more of your motivations from going back to solo after being a parachain. Take into account that what this means is that your chain must have some mechanism to know where to provide finality and when not to. And if that is managed, building the system in a way that going throw all the state is still verifiable.&#xD;&#xA;&#xD;&#xA;Don't get me wrong here, I would say this is possible, but fairly complex to maintain over time. And for sure there is a bunch of details that I am missing in what I have written in this message, but seeing such a capable system going live would be amazing. " ContentLicense="CC BY-SA 4.0" />
  <row Id="8728" PostHistoryTypeId="10" PostId="1912" RevisionGUID="ee3b362a-85de-42fa-bfa2-6ad9421c90ff" CreationDate="2022-05-02T10:07:00.263" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[1659],&quot;Voters&quot;:[{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:83,&quot;DisplayName&quot;:&quot;Luke Schoen&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;}]}" />
  <row Id="8730" PostHistoryTypeId="5" PostId="2135" RevisionGUID="b1b28389-8356-4c3d-bd98-b00cba64ac5a" CreationDate="2022-05-02T11:26:56.163" UserId="83" Comment="deleted 29 characters in body" Text="# &#xD;&#xA;&#xD;&#xA;# Luke Schoen&#xD;&#xA;&#xD;&#xA;I am passionate about Polkadot and the Web3 vision. I have a long-term interest in its success:&#xD;&#xA;&#xD;&#xA;- I enjoy hacking on Substrate and Polkadot for 3+ years in Rust and JavaScript. I have been in the Substrate Builders Program and built custom Substrate runtime modules, deployed a standalone mainnet, migrated to parachain testnet on Rococo, launched a project on Kusama. I am a Polkadot Ambassador and have authored in-depth walk-throughs&#xD;&#xA;&#xD;&#xA;- I actively post Q&amp;A in this Substrate Stack Exchange. Previously active in Stack Overflow, Ethereum Stack Exchange, Substrate Technical&#xD;&#xA;&#xD;&#xA;- I interact at Substrate and Polkadot community hackathons and conferences. I was at Amsterdot 2022. 2nd place at Build Polkadot 2020. I presented at Polkadot Encoded 2021&#xD;&#xA;&#xD;&#xA;- I am an end-user of Substrate products. I provide feedback, participate with live governance, staking, DeFi, and NFTs&#xD;&#xA;&#xD;&#xA;- I contribute open-source code and docs to Substrate and Polkadot. I also briefly worked with core devs building Polkadot.js at Parity Tech&#xD;&#xA;&#xD;&#xA;- I am patient and empathetic toward new learners. I was previously an assistant educator at an in-person coding bootcamp" ContentLicense="CC BY-SA 4.0" />
  <row Id="8731" PostHistoryTypeId="5" PostId="2135" RevisionGUID="71f2cd9a-c660-430e-9658-d774647b7cdd" CreationDate="2022-05-02T11:33:40.930" UserId="83" Comment="added 31 characters in body; edited body" Text="# &#xD;&#xA;&#xD;&#xA;# Luke Schoen&#xD;&#xA;&#xD;&#xA;I am passionate about Polkadot and the Web3 vision. I have a long-term interest in its success:&#xD;&#xA;&#xD;&#xA;- I enjoy hacking on Substrate and Polkadot in Rust and JavaScript for 3+ years&#xD;&#xA;&#xD;&#xA;- I built custom Substrate runtime modules, deployed a standalone mainnet, migrated to parachain testnet on Rococo, and launched on Kusama with support from Substrate Builders Program&#xD;&#xA;&#xD;&#xA;- I am a proud Polkadot Ambassador and often author in-depth walk-throughs&#xD;&#xA;&#xD;&#xA;- I actively post Q&amp;A in this Substrate Stack Exchange. Previously active in Stack Overflow, Ethereum Stack Exchange, Substrate Technical&#xD;&#xA;&#xD;&#xA;- I interact at Substrate and Polkadot community hackathons and conferences. I was at Amsterdot 2022. 2nd place at Build Polkadot 2020. I presented at Polkadot Decoded 2021&#xD;&#xA;&#xD;&#xA;- I am an end-user of Substrate products. I provide feedback, participate with live governance, staking, DeFi, and NFTs&#xD;&#xA;&#xD;&#xA;- I contribute open-source code and docs to Substrate and Polkadot. I also briefly had the privilege of working alongside core devs building Polkadot.js at Parity Tech&#xD;&#xA;&#xD;&#xA;- I am patient and empathetic toward new learners. I was previously an assistant educator at an in-person coding bootcamp" ContentLicense="CC BY-SA 4.0" />
  <row Id="8732" PostHistoryTypeId="2" PostId="2335" RevisionGUID="5ba80239-6cf5-495a-a32d-41449705a2f8" CreationDate="2022-05-02T11:40:18.527" UserId="362" Text="# Question&#xD;&#xA;&#xD;&#xA;Is there some some way to configure a parachain to produce blocks in a way which&#xD;&#xA;&#xD;&#xA;1. has high finalization rate (not PoA though)&#xD;&#xA;2. predictable finalization rate, yielding a clear optimistic processing policy&#xD;&#xA;3. has small reorgs. this is similar to 1, but with an emphasis on avoiding large numbers of blocks getting dicarded, even infrequently.&#xD;&#xA;&#xD;&#xA;# Premise&#xD;&#xA;&#xD;&#xA;A Polkadot parachain is powering some DApp where transaction latency is quite important, say like some social use case, and you'd like the vast majority of user actions to be settled in a few seconds. The DApp is also using a caching layer to efficiently query the parachain state/history, sort of like &quot;The Graph&quot; from the Ethereum ecosystem, meaning that this infrastructure is processing parachain events/txs of interest to build it's on queryable state.&#xD;&#xA;&#xD;&#xA;# Problem&#xD;&#xA;&#xD;&#xA;Polkadot itself has a block finalization time of roughly 1 min, when things are going well, when they are not, I understand it can take many minutes to finalize parachain blocks. This means that the query infrastructure would have to wait for at least 1 minute before parachain blocks can be processed, and thus the DApp user experience would have very large latency on updating the UI to reflect some user transaction.&#xD;&#xA;&#xD;&#xA;# Solution&#xD;&#xA;&#xD;&#xA;A possible solution is to have the query infrastructure by some reasonable policy attempt to process unfinalized blocks earlier optimistically, and then on the rare a occasion that the block is not finalized, the infrastructure has to be able to reverse any side-effects of such processed blocks.&#xD;&#xA;&#xD;&#xA;# Problem with the Solution&#xD;&#xA;&#xD;&#xA;This only really works if there is some way to configure a parachain to produce blocks in a way which is described in the question, hence the question." ContentLicense="CC BY-SA 4.0" />
  <row Id="8734" PostHistoryTypeId="1" PostId="2335" RevisionGUID="5ba80239-6cf5-495a-a32d-41449705a2f8" CreationDate="2022-05-02T11:40:18.527" UserId="362" Text="Optimistic parachain block finalization" ContentLicense="CC BY-SA 4.0" />
  <row Id="8735" PostHistoryTypeId="3" PostId="2335" RevisionGUID="5ba80239-6cf5-495a-a32d-41449705a2f8" CreationDate="2022-05-02T11:40:18.527" UserId="362" Text="|parachain|block-production|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8736" PostHistoryTypeId="5" PostId="2316" RevisionGUID="a34ca511-d991-4068-8cac-8ae87348fb32" CreationDate="2022-05-02T12:33:31.320" UserId="2463" Comment="added code example" Text="I'm using `subxt` with the aim to handle bursts of transactions concurrently through a single account. I understand the nonce must be incremented, however I'm unsure of the exact lifecycle of a tx and at what stage the next nonce is expected. &#xD;&#xA;&#xD;&#xA;I have tested with a simple atomic counter that I manually increment, however it seems if increment and submit too fast the tx's never make it into the block. &#xD;&#xA;&#xD;&#xA;Do I need to ensure that `tx A (nonce 21)` has made it into the block before `tx B (nonce 22)` can be submitted? &#xD;&#xA;&#xD;&#xA;I'm wondering if there are any typical strategies to handle this, whether some sort of queue is required, or I if can achieve this with a simple counter.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Example &#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;        let mut signer = PairSigner::new(pair);&#xD;&#xA;        if let Some(nonce) = nonce {&#xD;&#xA;            signer.set_nonce(nonce.inc_next());&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        let api = ClientBuilder::new()&#xD;&#xA;            .set_url(env.rpc.url.clone())&#xD;&#xA;            .build()&#xD;&#xA;            .await&#xD;&#xA;            .to()?&#xD;&#xA;            .to_runtime_api::&lt;RuntimeApi&lt;DefaultConfig, PolkadotExtrinsicParams&lt;DefaultConfig&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;        let submitted = api&#xD;&#xA;            .tx()&#xD;&#xA;            .system()&#xD;&#xA;            .remark(self.0.as_bytes().to_vec())&#xD;&#xA;            .sign_and_submit_then_watch_default(&amp;signer)&#xD;&#xA;            .await&#xD;&#xA;            .to()?;&#xD;&#xA;&#xD;&#xA;        let tx = submitted.wait_for_in_block().await?;&#xD;&#xA;        let events = tx.wait_for_success().await.to()?;&#xD;&#xA;        let hash = events.block_hash();&#xD;&#xA;        let header = api&#xD;&#xA;            .client&#xD;&#xA;            .rpc()&#xD;&#xA;            .header(Some(hash))&#xD;&#xA;            .await&#xD;&#xA;            .to()?&#xD;&#xA;            .ok_or_else(|| Error::Generic(&quot;extrinsic header is None&quot;.into()))?;&#xD;&#xA;&#xD;&#xA;        Ok(header.number)" ContentLicense="CC BY-SA 4.0" />
  <row Id="8737" PostHistoryTypeId="2" PostId="2336" RevisionGUID="29b28f4c-2e2e-4919-9f48-c9b07cde4a3e" CreationDate="2022-05-02T13:07:54.860" UserId="172" Text="Although your question is rather general and wouldn't usually make for a good StackExchange question, I see merit in providing a general answer that could serve as a broad entry point for others interested in implementing their chain's governance with Substrate. &#xD;&#xA;&#xD;&#xA;## Governance design&#xD;&#xA;&#xD;&#xA;To begin, it's important to remind yourself that as a runtime engineer, you have complete control on the design and governance rules you're building. Models based on democratic systems are conscious design decisions for optimizing whatever the needs are of the system, such as with Polkadot's initial tri-cameral system. Other systems may better be modelled by alternative forms of governance depending on their scale and target participants. For example, corporate vs. non-profit governance models (possibly more suitable for smaller scales, like project based initiatives) or different [types of democracy](https://en.wikipedia.org/wiki/Types_of_democracy) (possibly more suitable for larger scales, like sovereign nations).&#xD;&#xA;&#xD;&#xA;## Building out systems of governance&#xD;&#xA;&#xD;&#xA;Once you've got a grasp of the type of system you're looking to build, there's a number of routes you could take, neither of which are necessarily mutually exclusive.&#xD;&#xA;&#xD;&#xA;### Use and modify existing pallets&#xD;&#xA;&#xD;&#xA;There's a number of pallets you can use to compose your chain's system of governance, whether building out its core design (i.e. the underlying system) or adding functionality to it or refactoring existing components into more modular ones that suit your chain's needs (similar to how FRAME has [seen a refactor in the democracy pallet](https://github.com/paritytech/substrate/pull/10195)). &#xD;&#xA;&#xD;&#xA;Here are some examples of some existing building blocks used to compose systems of governance in Substrate chains:&#xD;&#xA;&#xD;&#xA;- [`pallet_sudo`](https://github.com/paritytech/substrate/tree/master/frame/sudo): to designate a super-user that has control over the entire system.&#xD;&#xA;- [`pallet_democracy`](https://github.com/paritytech/substrate/tree/master/frame/democracy): to handle stakeholder voting, including delegation and proposals.&#xD;&#xA;- [`pallet_conviction_voting`](https://github.com/paritytech/substrate/tree/master/frame/conviction-voting): to manage voting in polls and for referenda, containing voting data types.&#xD;&#xA;- [`pallet_referenda`](https://github.com/paritytech/substrate/tree/master/frame/referenda): to execute referenda.&#xD;&#xA;- [`pallet_preimage`](https://github.com/paritytech/substrate/tree/master/frame/preimage): for storing and managing the pre-image of a proposal, such as a runtime upgrade.&#xD;&#xA;- [`pallet_collective`](https://github.com/paritytech/substrate/tree/master/frame/collective): to form councils made of sets of account IDs that can be used as custom origins to dispatch otherwise gated runtime calls.&#xD;&#xA;- [`pallet_membership`](https://github.com/paritytech/substrate/tree/master/frame/membership): a way to manage memberships of account IDs inside a collective.&#xD;&#xA;- [`pallet_schedular`](https://github.com/paritytech/substrate/tree/master/frame/scheduler): to schedule the enactment of a proposal.&#xD;&#xA;&#xD;&#xA;From this, there are a number of things built that use the core governance logic to meet certain system requirements or end-users' needs, such as with:&#xD;&#xA; &#xD;&#xA;- [`pallet_treasury`](https://github.com/paritytech/substrate/tree/master/frame/treasury): a pot of funds that act as a central piece to making spending proposals to an on-chain council.&#xD;&#xA;- [`pallet_bounties`](https://github.com/paritytech/substrate/tree/master/frame/bounties): a way to manage treasury spends specific for on-chain bounty work.&#xD;&#xA;- [`pallet_society`](https://github.com/paritytech/substrate/tree/master/frame/society): an economic game to incentivize a set of members to maintain their membership in a society.&#xD;&#xA;&#xD;&#xA;### Implementing custom mechanisms&#xD;&#xA;&#xD;&#xA;Within FRAME, there are a number of existing governance primitives that you can use to create your own custom pallets to meet your application specific needs. The pallets referred to above are all built using these (using custom data types and algorithms). At a high level, you can use these to create custom mechanisms such as:&#xD;&#xA;&#xD;&#xA;- Voting mechanisms (using conviction, votes, delegation, locks, a simple majority implementation, quadratic voting algorithm).&#xD;&#xA;- Reward mechanisms (slashing logic, rewards, tipping logic, treasury, bounty and payout logic).&#xD;&#xA;- Mechanisms for proposals and enacting them (lock deposit logic, custom origin logic, scheduling).&#xD;&#xA;- Forming councils and committees (using voting, memberships and origins).&#xD;&#xA;&#xD;&#xA;## Things to think about&#xD;&#xA;&#xD;&#xA;Governance implementations should consider the problems that could arise depending on what is being governed and whatever the desired/undesired outcomes could be. The useful thing in Substrate is that anything can be upgraded, by design. Systems can evolve with changing end-user needs, inviting developer experimentation.&#xD;&#xA;&#xD;&#xA;Some things to think about that come to mind:&#xD;&#xA;&#xD;&#xA;**Participation and fragmentation** &#xD;&#xA; - Whatever the democratic system you devise will only be as good as how active your target participants are. There are ways to address this with different mechanisms, such as tipping bots, signalling and off-chain verification mechanisms (oracles). But not necessarily all on-chain, such as attractive web and mobile applications, engaging UX.&#xD;&#xA; - From a multi-chain and anti blockchain maximalist view, participatory systems should probably strive to avoid building walls around communities. Solutions that could fit the bill include multi-asset stake weighted voting or multi-chain UIs with a single user experience.&#xD;&#xA;&#xD;&#xA;**Collusion**&#xD;&#xA;- How to build systems that are resistant to whales or other forms of collusion, where more privileged accounts may game the system. &#xD;&#xA;&#xD;&#xA;There is no single path to implementing your chain's system of governance. Each chain should implement a system of governance to meet their needs. As Substrate developers, we can stand on the shoulders of the battle tested FRAME pallets already in production. But we should be mindful that, out of the box, these are built to address the specific needs of application specific chains (i.e. Polkadot and Kusama) and may not necessarily be those we're looking to address.&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="8740" PostHistoryTypeId="2" PostId="2337" RevisionGUID="9e74b22b-5cfa-4d5f-8099-3d78fd6663d1" CreationDate="2022-05-02T13:21:45.957" UserId="165" Text="A few things here, I see you are testing this upgrade from a parachain. Runtime upgrades on parachains should follow the authorize + enact flow, as specified in here https://docs.substrate.io/how-to-guides/v3/parachains/runtime-upgrades/&#xD;&#xA;&#xD;&#xA;Per my understanding what you are hitting is no surprise, as the relay must signal this upgrade - [error triggered here][1]. So what would make more sense in terms of scheduling an upgrade from the parachain side, would be scheduling the authorization of the upgrade, and enactment afterwards, not necessarily scheduled this one. &#xD;&#xA;&#xD;&#xA;I haven't check tho why scheduling this set_code is messing with the signaling.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/68b4da78d079e110cd616b937ed2de738d32a2bf/pallets/parachain-system/src/lib.rs#L901-L902" ContentLicense="CC BY-SA 4.0" />
  <row Id="8742" PostHistoryTypeId="6" PostId="2319" RevisionGUID="7a2e2785-3c0a-44ef-aa30-a30a1e846cfa" CreationDate="2022-05-02T14:38:07.750" UserId="172" Comment="Improve tag." Text="|frame|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8743" PostHistoryTypeId="52" PostId="2329" RevisionGUID="ae4a7e10-fc0c-4af7-abb0-8d39a1f5c3d8" CreationDate="2022-05-02T16:18:50.140" />
  <row Id="8744" PostHistoryTypeId="2" PostId="2338" RevisionGUID="caeadda2-7e45-40c3-a55c-5de8c39c2ddf" CreationDate="2022-05-02T16:43:27.463" UserId="165" Text="# Alejandro Martínez&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;Hello,  &#xD;&#xA;  &#xD;&#xA;Asking questions, reading code, understanding decisions, try and repeat until getting things right. Those are things that I have gone through while learning Substrate, that have brought me to the point where I now stand and that I will keep on doing to get better every time in all Substrate related.  &#xD;&#xA;  &#xD;&#xA;This forum is the perfect place for doing that, and I cannot help but feel like helping this community of passionate hackers to have a home for all sort of discussions, knowledge sharing and bringing devs together, where answers are informative and questions are on point.  &#xD;&#xA;  &#xD;&#xA;With highly respect for those learning and building, I propose myself as a mod for this stack exchange." ContentLicense="CC BY-SA 4.0" />
  <row Id="8746" PostHistoryTypeId="2" PostId="2339" RevisionGUID="ca2949b3-a8ea-4e02-a7e9-9d5c87d3305e" CreationDate="2022-05-02T16:54:14.890" UserId="45" Text="This can happen in case you try to call the `schedule_upgrade` function during  the `on_initialize` phase.&#xD;&#xA;&#xD;&#xA;Unfortunately, this does not work since scheduling an upgrade requires parachain validation data be present. Validation data is submitted by the collator via an inherent. An inherent always comes after the `on_initialize` phase. This leads to the fact that an upgrade attempt made from the `on_initialize` phase will never succeed." ContentLicense="CC BY-SA 4.0" />
  <row Id="8748" PostHistoryTypeId="2" PostId="2340" RevisionGUID="7e2ab9dd-fc99-42df-846c-e8caaf846cde" CreationDate="2022-05-02T16:55:53.180" UserId="372" Text="# Joshy Orndorff &#xD;&#xA;&#xD;&#xA;I've contributed to Substrate, the substrate developer hub, and Moonbeam. I have hands-on experience with most parts of Substrate including those outside of Frame and the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="8750" PostHistoryTypeId="2" PostId="2341" RevisionGUID="03ed887e-f885-4255-97dd-c95068809484" CreationDate="2022-05-02T17:13:47.363" UserId="94" Text="Your code looks reasonable, but i would rather send the extrinsics in serial and not concurrently. Otherwise you will create a lot of RPC connections and DOS your node.  &#xD;&#xA;I am working on something similar where I need to send a large number of extrinsics to a node. It uses `transfer_keep_alive` and is send in batches of 50.  &#xD;&#xA;Some things that I noticed:&#xD;&#xA;- Sending extrinsics to the node can sometimes get stuck right away. I don't know why, but retrying makes it work. In this case it somehow does not submit the first batch of extrinsics.&#xD;&#xA;- Sending too large batches can break the RPC or overload the transaction pool. You can adjust the pool options via arguments `--pool-limit 10000000` and `--pool-kbytes 100000000`.&#xD;&#xA;- The speed that needs to be archived is capped by the maximal number of TPS that the chain can reach. If you chain can only do 1000TPS, then there is not much use to optimize the sender script for 4000.&#xD;&#xA;- Watching an extrinsic takes up a lot of RPC resources. It is faster to first send all extrinsics and then later on verify their success by querying the blocks and searching for events.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let mut signer = PairSigner::new(AccountKeyring::Alice.pair());&#xD;&#xA;&#xD;&#xA;let api = ClientBuilder::new()&#xD;&#xA;	.set_url(&amp;url)&#xD;&#xA;	.build()&#xD;&#xA;	.await?&#xD;&#xA;	.to_runtime_api::&lt;runtime::RuntimeApi&lt;DefaultConfig, PolkadotExtrinsicParams&lt;DefaultConfig&gt;&gt;&gt;(&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;let ext_deposit = api.constants().balances().existential_deposit().unwrap();&#xD;&#xA;&#xD;&#xA;// Pre-sign the extrinsics for more speed.&#xD;&#xA;// This is probably not needed since rust is already very fast with this.&#xD;&#xA;let mut txs = Vec::new();&#xD;&#xA;info!(&quot;Signing {} transactions&quot;, num_ext);&#xD;&#xA;for i in 0..num_ext {&#xD;&#xA;	let receiver = AccountKeyring::Bob.to_account_id().into();&#xD;&#xA;	signer.set_nonce(i as u32);&#xD;&#xA;	let tx_params = Params::new().era(Era::Immortal, *api.client.genesis());&#xD;&#xA;	let tx = api&#xD;&#xA;		.tx()&#xD;&#xA;		.balances()&#xD;&#xA;		.transfer(receiver, ext_deposit)&#xD;&#xA;		.create_signed(&amp;signer, tx_params)&#xD;&#xA;		.await?;&#xD;&#xA;	txs.push(tx);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Send the transactions in chunks.&#xD;&#xA;const CHUNK_SIZE: usize = 50;&#xD;&#xA;&#xD;&#xA;info!(&quot;Sending {} transactions in chunks of {}&quot;, num_ext, CHUNK_SIZE);&#xD;&#xA;for chunk in txs.chunks(CHUNK_SIZE) {&#xD;&#xA;	let mut hashes = Vec::new();&#xD;&#xA;	for tx in chunk {&#xD;&#xA;		let hash = api.client.rpc().submit_extrinsic(tx);&#xD;&#xA;		hashes.push(hash);&#xD;&#xA;	}&#xD;&#xA;	try_join_all(hashes).await?;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Hope this helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="8752" PostHistoryTypeId="2" PostId="2342" RevisionGUID="f3cb2b7e-6cb2-4359-9e87-053410f88df3" CreationDate="2022-05-02T17:53:16.253" UserId="2394" Text="Adding `#[ink(payable)]` to a `#[ink(message)]` prevents `ink_env::debug_println!` messages to be logged in console when executing the smart contract call.&#xD;&#xA;&#xD;&#xA;Any additional config needed in this case to have `ink_env::debug_println!` in console?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8754" PostHistoryTypeId="1" PostId="2342" RevisionGUID="f3cb2b7e-6cb2-4359-9e87-053410f88df3" CreationDate="2022-05-02T17:53:16.253" UserId="2394" Text="Ink! ink_env::debug_println! does not work if message is payable" ContentLicense="CC BY-SA 4.0" />
  <row Id="8755" PostHistoryTypeId="3" PostId="2342" RevisionGUID="f3cb2b7e-6cb2-4359-9e87-053410f88df3" CreationDate="2022-05-02T17:53:16.253" UserId="2394" Text="|ink|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8756" PostHistoryTypeId="2" PostId="2343" RevisionGUID="4a10d26a-0ef1-4edc-b610-12224eafa966" CreationDate="2022-05-02T18:37:51.643" UserId="234" Text="I read the documentation in the [wiki](https://wiki.polkadot.network/docs/build-protocol-info#transaction-mortality) and the [support docs](https://support.polkadot.network/support/solutions/articles/65000168050-what-is-an-era-) so I know that in Polkadot I can set any value bigger than zero and smaller/equal to 2400 to create a valid mortal transaction. &#xD;&#xA;&#xD;&#xA;However I was wondering if there is an appropriate/suggested value for this parameter? Do I have to change this value based on each specific situation or use case ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8758" PostHistoryTypeId="1" PostId="2343" RevisionGUID="4a10d26a-0ef1-4edc-b610-12224eafa966" CreationDate="2022-05-02T18:37:51.643" UserId="234" Text="When I sign a transaction or generate a payload, what is the appropriate/suggested value for the field called “Era Period”?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8759" PostHistoryTypeId="3" PostId="2343" RevisionGUID="4a10d26a-0ef1-4edc-b610-12224eafa966" CreationDate="2022-05-02T18:37:51.643" UserId="234" Text="|transactions|era|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8761" PostHistoryTypeId="2" PostId="2344" RevisionGUID="209ed9eb-05a1-47fc-95ac-66bc7d7a3d2e" CreationDate="2022-05-02T18:37:51.643" UserId="234" Text="The value for the “Era Period” field will generally depend on how many blocks you expect between construction (when the checkpoint block is chosen) and broadcast. If you expect it to take one hour, then you could set it to 600 (600 blocks/hour).&#xD;&#xA;&#xD;&#xA;Note that it rounds up to the next power of 2, so setting 600 would actually be 1024." ContentLicense="CC BY-SA 4.0" />
  <row Id="8762" PostHistoryTypeId="2" PostId="2345" RevisionGUID="fda58745-bf89-49ca-80da-1b806ac5d6a1" CreationDate="2022-05-02T20:11:59.930" UserId="2107" Text="I currently have a node running on the cloud and I've set its websocket port to a custom domain following Polkadot's Nginx config ([here](https://wiki.polkadot.network/docs/maintain-wss)). I would like to be able to use this node as a bootnode for other nodes in the future. Ideally, I would like to use my custom domain instead of the node's IP. While following yet another Polkadot tutorial ([here](https://wiki.polkadot.network/docs/maintain-guides-how-to-setup-a-validator-with-reverse-proxy)) I modified my nginx configuration to the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;server {&#xD;&#xA;&#xD;&#xA;        server_name {CUSTOM_DOMAIN};&#xD;&#xA;&#xD;&#xA;        root /var/www/html;&#xD;&#xA;        index index.html;&#xD;&#xA;&#xD;&#xA;        location / {&#xD;&#xA;          proxy_buffering off;&#xD;&#xA;          proxy_pass http://localhost:30333;&#xD;&#xA;          proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;          proxy_set_header Host $host;&#xD;&#xA;          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        location /ws {&#xD;&#xA;          proxy_buffering off;&#xD;&#xA;          proxy_pass http://localhost:9944;&#xD;&#xA;          proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;          proxy_set_header Host $host;&#xD;&#xA;          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;&#xD;&#xA;          proxy_http_version 1.1;&#xD;&#xA;          proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;          proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        listen [::]:443 ssl ipv6only=on;&#xD;&#xA;        listen 443 ssl;&#xD;&#xA;        ssl_certificate /etc/ssl/certs/cloudflare.crt;&#xD;&#xA;        ssl_certificate_key /etc/ssl/certs/cloudflare.pem;&#xD;&#xA;&#xD;&#xA;        ssl_session_cache shared:cache_nginx_SSL:1m;&#xD;&#xA;        ssl_session_timeout 1440m;&#xD;&#xA;&#xD;&#xA;        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;&#xD;&#xA;        ssl_prefer_server_ciphers on;&#xD;&#xA;&#xD;&#xA;        ssl_ciphers &quot;ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS&quot;;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can successfully use my custom domain to access the WebSocket stuff, but when trying to use it for the p2p stuff it does not work.&#xD;&#xA;&#xD;&#xA;I've tried setting the `--public-addr` parameter to my custom domain, running the bootnode like:&#xD;&#xA;```&#xD;&#xA;./path/to/binary --chain ./chainSpecRaw.json --base-path /tmp/node \&#xD;&#xA;--ws-external --rpc-external --rpc-cors all --name &quot;Bootnode 1&quot; --pruning archive \&#xD;&#xA;--public-addr=&quot;/dns/{CUSTOM_DOMAIN}/tcp/443/p2p/{PEER_ID}&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I try to run a new node as:&#xD;&#xA;```&#xD;&#xA;./target/release/contractuo-chain-node --chain ./chainSpecRaw.json --base-path /tmp/node \&#xD;&#xA;    --name &quot;Test Node&quot; --ws-external --rpc-external --rpc-cors all \&#xD;&#xA;    --bootnodes &quot;/dns/{CUSTOM_DOMAIN}/tcp/443/p2p/{PEER_ID}&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It does not manage to find the bootnode. But if I swap the param to `--bootnodes &quot;/ip4/{CLOUD_IP}/tcp/30333/ws/p2p/{PEER_ID}&quot;` then it connects successfully.&#xD;&#xA;&#xD;&#xA;Anyway, I don't know if I'm missing something on the nginx side, or on the node configuration, but I would like to be able to connect the nodes using my custom domain rather than the ip address." ContentLicense="CC BY-SA 4.0" />
  <row Id="8764" PostHistoryTypeId="1" PostId="2345" RevisionGUID="fda58745-bf89-49ca-80da-1b806ac5d6a1" CreationDate="2022-05-02T20:11:59.930" UserId="2107" Text="How to setup bootnode to use DNS address instead of IP4?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8765" PostHistoryTypeId="3" PostId="2345" RevisionGUID="fda58745-bf89-49ca-80da-1b806ac5d6a1" CreationDate="2022-05-02T20:11:59.930" UserId="2107" Text="|substrate-node|nodes|networking|network|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8766" PostHistoryTypeId="2" PostId="2346" RevisionGUID="03bffe19-2a5e-4bfc-b92e-99b0e2867a1a" CreationDate="2022-05-02T20:52:45.340" UserId="245" Text="As mentioned in the comments, Signed Transactions require transaction fees. &#xD;&#xA;&#xD;&#xA;[Substrate docs][1] also mentions this.&#xD;&#xA;&#xD;&#xA;&gt; The transaction pool checks for transaction validity. Note that validity of the transaction is not hard-wired to the transaction pool, but is defined by the runtime. Example validity checks are:&#xD;&#xA;&gt; - Checking if the Transaction Index (nonce) is correct.&#xD;&#xA;&gt; - **Checking if the account has enough funds to pay for the associated&#xD;&#xA;   fees.**&#xD;&#xA;&gt; - Checking if the signature is valid.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/tx-pool/" ContentLicense="CC BY-SA 4.0" />
  <row Id="8768" PostHistoryTypeId="2" PostId="2347" RevisionGUID="51582768-6570-424c-b288-6a43f577cf0a" CreationDate="2022-05-02T21:14:02.477" UserId="2470" Text="I am creating an application and signing an extrinsic with a keypair using the keyring. I was wondering if I can receive the transaction hash somehow after it has been signed" ContentLicense="CC BY-SA 4.0" />
  <row Id="8770" PostHistoryTypeId="1" PostId="2347" RevisionGUID="51582768-6570-424c-b288-6a43f577cf0a" CreationDate="2022-05-02T21:14:02.477" UserId="2470" Text="Is there anyway to receive a transaction hash from a transaction that was signed by the keyring?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8771" PostHistoryTypeId="3" PostId="2347" RevisionGUID="51582768-6570-424c-b288-6a43f577cf0a" CreationDate="2022-05-02T21:14:02.477" UserId="2470" Text="|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8772" PostHistoryTypeId="2" PostId="2348" RevisionGUID="c7f7529c-2d4f-4ad8-84c7-cb8bb39954e3" CreationDate="2022-05-02T22:11:48.013" UserId="34" Text="You need to modify your chain specification, best place being in the source itself, secondarily in the `plain` chain spec generated from that source, you can modify it and then convert it to `raw`. This is outlined in the [Custom Chain Specifications How-to Guide](https://docs.substrate.io/how-to-guides/v3/basics/custom-chain-spec/).&#xD;&#xA;&#xD;&#xA;Polkadot for example sets bootnodes in the [`node/service/res/polkadot.json` file](https://raw.githubusercontent.com/paritytech/polkadot/master/node/service/res/polkadot.json):&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;Polkadot&quot;,&#xD;&#xA;  &quot;id&quot;: &quot;polkadot&quot;,&#xD;&#xA;  &quot;chainType&quot;: &quot;Live&quot;,&#xD;&#xA;  &quot;bootNodes&quot;: [&#xD;&#xA;    &quot;/dns/polkadot-connect-0.parity.io/tcp/443/wss/p2p/12D3KooWEPmjoRpDSUuiTjvyNDd8fejZ9eNWH5bE965nyBMDrB4o&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-1.parity.io/tcp/443/wss/p2p/12D3KooWLvcA24g6sT9YTaQyinwowMbLF5z7iMLoxZpEiV9pSmNf&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-2.parity.io/tcp/443/wss/p2p/12D3KooWDhp18HYzJuVX2jLhtjQgAhT1XWGqah42StoUJpkLvh2o&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-3.parity.io/tcp/443/wss/p2p/12D3KooWEsPEadSjLAPyxckqVJkp54aVdPuX3DD6a1FTL2y5cB9x&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-4.parity.io/tcp/443/wss/p2p/12D3KooWFfG1SQvcPoUK2N41cx7r52KYXKpRtZxfLZk8xtVzpp4d&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-5.parity.io/tcp/443/wss/p2p/12D3KooWDmQPkBvQGg9wjBdFThtWj3QCDVQyHJ1apfWrHvjwbYS8&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-6.parity.io/tcp/443/wss/p2p/12D3KooWBKtPpCnVTTzD7fPpCdFsrsYZ5K8fwmsLabb1JBuCycYs&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-7.parity.io/tcp/443/wss/p2p/12D3KooWP3BsFY6UaiLjEJ3YbDp6q6SMQgAHB15qKj41DUZQLMqD&quot;,&#xD;&#xA;    &quot;/dns/p2p.0.polkadot.network/tcp/30333/p2p/12D3KooWHsvEicXjWWraktbZ4MQBizuyADQtuEGr3NbDvtm5rFA5&quot;,&#xD;&#xA;    &quot;/dns/p2p.1.polkadot.network/tcp/30333/p2p/12D3KooWQz2q2UWVCiy9cFX1hHYEmhSKQB2hjEZCccScHLGUPjcc&quot;,&#xD;&#xA;    &quot;/dns/p2p.2.polkadot.network/tcp/30333/p2p/12D3KooWNHxjYbDLLbDNZ2tq1kXgif5MSiLTUWJKcDdedKu4KaG8&quot;,&#xD;&#xA;    &quot;/dns/p2p.3.polkadot.network/tcp/30333/p2p/12D3KooWGJQysxrQcSvUWWNw88RkqYvJhH3ZcDpWJ8zrXKhLP5Vr&quot;,&#xD;&#xA;    &quot;/dns/p2p.4.polkadot.network/tcp/30333/p2p/12D3KooWKer8bYqpYjwurVABu13mkELpX2X7mSpEicpjShLeg7D6&quot;,&#xD;&#xA;    &quot;/dns/p2p.5.polkadot.network/tcp/30333/p2p/12D3KooWSRjL9LcEQd5u2fQTbyLxTEHq1tUFgQ6amXSp8Eu7TfKP&quot;,&#xD;&#xA;    &quot;/dns/cc1-0.parity.tech/tcp/30333/p2p/12D3KooWSz8r2WyCdsfWHgPyvD8GKQdJ1UAiRmrcrs8sQB3fe2KU&quot;,&#xD;&#xA;    &quot;/dns/cc1-1.parity.tech/tcp/30333/p2p/12D3KooWFN2mhgpkJsDBuNuE5427AcDrsib8EoqGMZmkxWwx3Md4&quot;&#xD;&#xA;  ],&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&lt;details&gt;&#xD;&#xA;   &lt;summary&gt; For reference,The source from How-to Guides &lt;/summary&gt;&#xD;&#xA;&#xD;&#xA;### 1. Create a plain chain specification&#xD;&#xA;&#xD;&#xA;Starting in the working directory of your node's working directory, and assuming the bin is `node-template`:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template build-spec &gt; chain-spec-plain.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We have just generated a **plain chain spec** file for the _default_ network set in your&#xD;&#xA;`chain_spec.rs` file. This file can be passed to other nodes&#xD;&#xA;&#xD;&#xA;### 2. Modify the plain chain specification (optional)&#xD;&#xA;&#xD;&#xA;This optional step we can leverage an _existing_ plain chain specification for a network that otherwise would require modification of the _source_ of the node to run on a _new network_.&#xD;&#xA;For example, this can be quite useful in the [Cumulus Tutorial](/tutorials/v3/cumulus/start-relay) where we want to create a custom _relay chain_ without customizing Polkadot's source.&#xD;&#xA;&#xD;&#xA;Here we use the _same_ chain spec, but pass a flag to disable bootnodes, as we want a _new_ network where these nodes will be different.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template build-spec --chain chain-spec-plain.json --raw --disable-default-bootnode &gt; no-bootnodes-chain-spec-plain.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This `no-bootnodes-chain-spec-plain.json` can be used to generate a SCALE storage encoded, distributable raw chain spec.&#xD;&#xA;&#xD;&#xA;### 3. Generate the raw chain specification&#xD;&#xA;&#xD;&#xA;With a plain spec available, you generate a final raw chain spec by:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template build-spec --chain chain-spec-plain.json --raw &gt; chain-spec.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### 4. Publish the chain specification&#xD;&#xA;&#xD;&#xA;&gt; Note: Non-Determinism in Wasm &amp; chain specs: Because Rust -&gt; Wasm optimized builds aren't reproducible, each person will get a slightly different Wasm blob which will break consensus if each participant generates the file themselves. For the curious, learn more about this issue in [this blog post](https://dev.to/gnunicorn/hunting-down-a-non-determinism-bug-in-our-rust-wasm-build-4fk1).&#xD;&#xA;&#xD;&#xA;It is _conventional_ to include the chain specification files for your node _within the source code itself_ so that anyone can build your node in the same way, whereby it becomes easy to check for non-determinism by comparing a genesis blob with another.&#xD;&#xA;Polkadot, Kusama, Rococo, and more network chain spec files are found [in the source here](https://github.com/paritytech/polkadot/tree/master/node/service/res) along with a `.gitignore` file to ensure that you don't accidentally change these `!/*.json` files as you build further on your node's software and do [runtime upgrades](/tutorials/v3/forkless-upgrades).&#xD;&#xA;&#xD;&#xA;### 5. Start a new node&#xD;&#xA;&#xD;&#xA;If you publish a node binary, or have users build their own and then they want to join your network, all then need is the _same_ chain spec file and to run your binary with:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;# binary named `node-template`&#xD;&#xA;# `chain-spec.json` obtained from canonical common source&#xD;&#xA;node-template --chain chain-spec.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This can also simply be configured to be the _default_ network.&#xD;&#xA;For reference, you can see how [Polkadot implements](https://github.com/paritytech/polkadot/commits/master/cli/src/command.rs) a default command that uses the chain specs for various networks [in the source here](https://github.com/paritytech/polkadot/tree/master/node/service/res)&#xD;&#xA;&#xD;&#xA;&lt;/details&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8774" PostHistoryTypeId="2" PostId="2349" RevisionGUID="3b036bed-f9f6-4671-b6a8-1f93f220aea8" CreationDate="2022-05-02T23:23:33.617" UserId="2471" Text="I would like to know what are the possible values for  &#xD;&#xA;&#xD;&#xA; `&quot;chainType&quot;: &quot;Live&quot;` in the custom spec file, and what is the meaning of each one of them.&#xD;&#xA;&#xD;&#xA;Also how to use `Custom`?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8776" PostHistoryTypeId="1" PostId="2349" RevisionGUID="3b036bed-f9f6-4671-b6a8-1f93f220aea8" CreationDate="2022-05-02T23:23:33.617" UserId="2471" Text="chainType in custom spec" ContentLicense="CC BY-SA 4.0" />
  <row Id="8777" PostHistoryTypeId="3" PostId="2349" RevisionGUID="3b036bed-f9f6-4671-b6a8-1f93f220aea8" CreationDate="2022-05-02T23:23:33.617" UserId="2471" Text="|configuration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8778" PostHistoryTypeId="2" PostId="2350" RevisionGUID="3d2fc9f6-269b-485a-96aa-d7c70149473d" CreationDate="2022-05-02T23:38:46.527" UserId="2107" Text="The possible values can be seen [here](https://docs.substrate.io/rustdocs/latest/sc_service/enum.ChainType.html#variants). They are: Development, Local, Live and Custom.&#xD;&#xA;&#xD;&#xA;As to the meaning of each, as far as I know, there isn't much difference from local and dev. Live is a bit different, as there are some default configurations which change if that's your chain type. For example, if your chain is set to Live, by default it will have the `--no-private-ipv4` parameter set.&#xD;&#xA;&#xD;&#xA;Unfortunately I'm not aware of all the exact changes and the documentation is very poor in that regard. My recommendation (and what I've been doing) as of now is to dig through the substrate source code." ContentLicense="CC BY-SA 4.0" />
  <row Id="8780" PostHistoryTypeId="2" PostId="2351" RevisionGUID="f157db17-4378-4e46-82ca-d9858b605ad3" CreationDate="2022-05-03T00:59:30.690" UserId="2470" Text="Just wanted to know at what stage the transaction hashes are created in polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="8782" PostHistoryTypeId="1" PostId="2351" RevisionGUID="f157db17-4378-4e46-82ca-d9858b605ad3" CreationDate="2022-05-03T00:59:30.690" UserId="2470" Text="Is the transaction hash created before or after it is signed and sent?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8783" PostHistoryTypeId="3" PostId="2351" RevisionGUID="f157db17-4378-4e46-82ca-d9858b605ad3" CreationDate="2022-05-03T00:59:30.690" UserId="2470" Text="|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8784" PostHistoryTypeId="2" PostId="2352" RevisionGUID="9b24bb51-92f6-441b-989e-c79de2c260fb" CreationDate="2022-05-03T03:45:06.237" UserId="450" Text="Based on the note about storage compatibility https://paritytech.github.io/ink/ink_env/fn.set_code_hash.html:&#xD;&#xA;&#xD;&#xA;`The storage at the code hash will remain untouched. This means that contract developers must ensure that the storage layout of the new code is compatible with that of the old code.`&#xD;&#xA;&#xD;&#xA;My question is:&#xD;&#xA; 1. How exactly storage compatibility is defined? There are rules for upgrading a contract with openzeppelin https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#modifying-your-contracts. Do the exactly same rules apply for this `set_code_hash`&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8786" PostHistoryTypeId="1" PostId="2352" RevisionGUID="9b24bb51-92f6-441b-989e-c79de2c260fb" CreationDate="2022-05-03T03:45:06.237" UserId="450" Text="Old and new storage compatibility ink!::env::set_code_hash()" ContentLicense="CC BY-SA 4.0" />
  <row Id="8787" PostHistoryTypeId="3" PostId="2352" RevisionGUID="9b24bb51-92f6-441b-989e-c79de2c260fb" CreationDate="2022-05-03T03:45:06.237" UserId="450" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8788" PostHistoryTypeId="2" PostId="2353" RevisionGUID="30bdb114-2587-41a3-9747-eaec01c24ea2" CreationDate="2022-05-03T04:20:09.370" UserId="658" Text="Is it possible to update all metadata for all chains on Polkadot.js by signing only one transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8790" PostHistoryTypeId="1" PostId="2353" RevisionGUID="30bdb114-2587-41a3-9747-eaec01c24ea2" CreationDate="2022-05-03T04:20:09.370" UserId="658" Text="Updating metadata with a single transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="8791" PostHistoryTypeId="3" PostId="2353" RevisionGUID="30bdb114-2587-41a3-9747-eaec01c24ea2" CreationDate="2022-05-03T04:20:09.370" UserId="658" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8792" PostHistoryTypeId="2" PostId="2354" RevisionGUID="2f4b4406-dfd8-4563-9530-e48822c850a8" CreationDate="2022-05-03T04:58:25.223" UserId="627" Text="It is the hash of the transaction, so it is over the fully signed data. &#xD;&#xA;&#xD;&#xA;This also means that when you receive a block with extrinsics, the same full extrinsic data can be used to re-contruct the hash (without having to decode the extrinsic first)." ContentLicense="CC BY-SA 4.0" />
  <row Id="8794" PostHistoryTypeId="2" PostId="2355" RevisionGUID="dd3c4799-c1b7-4d76-808a-7e269cc52003" CreationDate="2022-05-03T05:19:10.140" UserId="620" Text="```js&#xD;&#xA;import { blake2AsHex } from '@polkadot/util-crypto';&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * Derive the tx hash of a signed transaction offline.&#xD;&#xA; *&#xD;&#xA; * @param signedTx - The hex encoding of a signed transaction.&#xD;&#xA; */&#xD;&#xA;export function getTxHash(signedTx: string): string {&#xD;&#xA;	return blake2AsHex(signedTx, 256);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8796" PostHistoryTypeId="2" PostId="2356" RevisionGUID="de66a158-dcac-4131-bcf6-c35682cbf2a2" CreationDate="2022-05-03T06:10:48.470" UserId="496" Text="as the title suggest, Im trying to call PSP22 token contract and read balanceOf() function, but i get error that im passing a too big of a input (27 instead of 8)&#xD;&#xA;Im trying to invoke balanceOf() PSP22 ink! contract.&#xD;&#xA;&#xD;&#xA;When i initializing the token it works correctly and i can see the abi:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;alanceOf: function createQuery(origin, options)&#xD;&#xA;​​​​​&#xD;&#xA;length: 2&#xD;&#xA;​​​​​&#xD;&#xA;meta: Object { isMutating: false, isPayable: false, identifier: &quot;balance_of&quot;, … }&#xD;&#xA;​​​​​​&#xD;&#xA;args: Array [ {…} ]&#xD;&#xA;​​​​​​​&#xD;&#xA;0: Object { name: &quot;owner&quot;, type: {…} }&#xD;&#xA;​​​​​​​​&#xD;&#xA;name: &quot;owner&quot;&#xD;&#xA;​​​​​​​​&#xD;&#xA;type: Object { info: 10, type: &quot;AccountId&quot; }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    const tokenContract = new ContractPromise(api, abiToken, &quot;5FmJDyLBoYKfiaoPUcfR3WKh13HkwvXr2CYTNg5RLykNXY3A&quot;);&#xD;&#xA;    dispatch(set_token_contract(tokenContract));&#xD;&#xA;    const value = 0; // only useful on isPayable messages&#xD;&#xA;    // NOTE the apps UI specified these in mega units&#xD;&#xA;    const gasLimit = 3000n * 1000000n;&#xD;&#xA;&#xD;&#xA;    // (We perform the send from an account, here using Alice's address)&#xD;&#xA;    let alice = &quot;5DaYseV9GSrGKrJYmKU5yymF9izPM2ZzG8f93xQK6hectHuo&quot;&#xD;&#xA;    const { gasConsumed, result, output } = await tokenContract.query.balanceOf(alice, { gasLimit }alice); &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;here is the error: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  RPC-CORE: call(callRequest: ContractCallRequest, at?: BlockHash): ContractExecResult:: createType(ContractExecResult):: Struct: failed on result: {&quot;_enum&quot;:{&quot;Ok&quot;:&quot;ContractExecResultOk&quot;,&quot;Err&quot;:&quot;ContractExecResultErr&quot;}}:: Enum(Err):: Enum(Module):: Struct: failed on error: u8:: u8: Input too large. Found input with 28 bits, expected 8&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8798" PostHistoryTypeId="1" PostId="2356" RevisionGUID="de66a158-dcac-4131-bcf6-c35682cbf2a2" CreationDate="2022-05-03T06:10:48.470" UserId="496" Text="Contract call returns error &quot;Found input with 28 bits, expected 8&quot;. Polkadot.js and ink contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="8799" PostHistoryTypeId="3" PostId="2356" RevisionGUID="de66a158-dcac-4131-bcf6-c35682cbf2a2" CreationDate="2022-05-03T06:10:48.470" UserId="496" Text="|rust|ink|smart-contract|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8800" PostHistoryTypeId="5" PostId="2224" RevisionGUID="8ddf126f-de1c-47d0-bc60-7531a11884f6" CreationDate="2022-05-03T06:47:19.410" UserId="2102" Comment="Updated question with more detailed information" Text="I'm trying to return an item that is within a storageMap. Its key is a Vec(u8), but I don't know how to send this type using a curl call. I tried using the id as string and using its hex version and I receive de following message:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;~ % curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;items_getItemById&quot;, &quot;params&quot;: [1234321] }' http://localhost:9933&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid type: integer `1234321`, expected a (both 0x-prefixed or not) hex string with length of 64.&quot;},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;~ % curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;items_getItemById&quot;, &quot;params&quot;: [0x31323334333231] }' http://localhost:9933&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32700,&quot;message&quot;:&quot;Parse error&quot;},&quot;id&quot;:null}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the item stored on chain:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      1234321&#xD;&#xA;    ]&#xD;&#xA;    {&#xD;&#xA;      id: 1234321&#xD;&#xA;      summary: 12341234&#xD;&#xA;      owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      state: ForSale&#xD;&#xA;      price: 23&#xD;&#xA;      lastUpdate: 1234123&#xD;&#xA;      creationBlock: 4&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The main issue is that I'm not able to query the item from the following function:&#xD;&#xA;```rs&#xD;&#xA;pub fn get_item(id: ProductId) -&gt; Option&lt;ItemRpc&gt; {&#xD;&#xA;	Self::get_item_by_id(&amp;id)&#xD;&#xA;} &#xD;&#xA;&#xD;&#xA;fn get_item_by_id(id: &amp;[u8]) -&gt; Option&lt;ItemRpc&gt; {&#xD;&#xA;	if let Some(value) = Self::items(id) {&#xD;&#xA;		Some(value.to_rpc())&#xD;&#xA;	} else {&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This is how I create items for the pallet:&#xD;&#xA;[![Creation entry point][1]][1]&#xD;&#xA;&#xD;&#xA;**UPDATE**&#xD;&#xA;&#xD;&#xA;This is my rpc and my runtime api for the items pallet:&#xD;&#xA;&#xD;&#xA;rpc:&#xD;&#xA;```rs&#xD;&#xA;fn get_item(&#xD;&#xA;		&amp;self,&#xD;&#xA;		at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;,&#xD;&#xA;		id: ProductId&#xD;&#xA;	) -&gt; Result&lt;Option&lt;ItemRpc&gt;&gt; {&#xD;&#xA;		let api = self.client.runtime_api();&#xD;&#xA;		let at = BlockId::hash(at.unwrap_or_else(||&#xD;&#xA;			// If the block hash is not supplied assume the best block.&#xD;&#xA;			self.client.info().best_hash));&#xD;&#xA;&#xD;&#xA;		let runtime_api_result = api.get_item(&amp;at, id);&#xD;&#xA;		runtime_api_result.map_err(|e| RpcError {&#xD;&#xA;			code: ErrorCode::ServerError(9876), // No real reason for this value&#xD;&#xA;			message: &quot;Something wrong&quot;.into(),&#xD;&#xA;			data: Some(format!(&quot;{:?}&quot;, e).into()),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;runtime-api:&#xD;&#xA;```rs&#xD;&#xA;fn get_item(id: ProductId) -&gt; Option&lt;ItemRpc&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;node runtime:&#xD;&#xA;```rs&#xD;&#xA;impl_runtime_apis! {&#xD;&#xA;    fn get_item(id: ProductId) -&gt; Option&lt;ItemRpc&gt; {&#xD;&#xA;	    Items::get_item(id)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;ItemRpc struct:&#xD;&#xA;```rs&#xD;&#xA;pub struct ItemRpc {&#xD;&#xA;		pub id: ProductId, // Vec&lt;u8&gt;&#xD;&#xA;		pub summary: H256, // Vec&lt;u8&gt;&#xD;&#xA;		pub owner: [u8; 32],&#xD;&#xA;		pub state: State,&#xD;&#xA;		pub price: Option&lt;u32&gt;,&#xD;&#xA;		pub last_update: Timestamp, // Vec&lt;u8&gt;&#xD;&#xA;		pub creation_block: u32,&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;  [1]: https://i.stack.imgur.com/eYRWV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8801" PostHistoryTypeId="2" PostId="2357" RevisionGUID="30358e83-776a-4715-a80f-cd58c77d5e20" CreationDate="2022-05-03T07:44:14.113" UserId="1789" Text="Regarding Substrate's Zombienet https://github.com/paritytech/zombienet&#xD;&#xA;&#xD;&#xA;I setup a folder with the following file structure:&#xD;&#xA;- zombienet-linux ... this is downloaded from the Zombienet repo release page, then made into executable&#xD;&#xA;&#xD;&#xA;- 001-small-network.toml ... this is copied from https://github.com/paritytech/zombienet#configuration-files-and-examples -&gt; A minimal configuration example with two validators and one parachain:&#xD;&#xA;&#xD;&#xA;    [settings]&#xD;&#xA;    timeout = 1000&#xD;&#xA;    &#xD;&#xA;    [relaychain]&#xD;&#xA;    default_image = &quot;paritypr/polkadot-debug:master&quot;&#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;      [[relaychain.nodes]]&#xD;&#xA;      name = &quot;alice&quot;&#xD;&#xA;    &#xD;&#xA;      [[relaychain.nodes]]&#xD;&#xA;      name = &quot;bob&quot;&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 100&#xD;&#xA;    &#xD;&#xA;      [parachains.collator]&#xD;&#xA;      name = &quot;collator01&quot;&#xD;&#xA;      image = &quot;paritypr/colander:4131-ccd09bbf&quot;&#xD;&#xA;      command = &quot;adder-collator&quot;&#xD;&#xA;&#xD;&#xA;Then I ran it according to their Github repo readme:&#xD;&#xA;&#xD;&#xA;    minikube start&#xD;&#xA;    ./zombienet-linux spawn ./001-small-network.toml &#xD;&#xA;&#xD;&#xA;Then I received a error message along with other terminal output: `Err: Can not create the forwarding to the tracing collator`&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image paritypr/colander:4131-ccd09bbf&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh adder-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --bootnodes /ip4/172.17.0.7/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01&#xD;&#xA;child process exited&#xD;&#xA;&#xD;&#xA;	 Err: Can not create the forwarding to the tracing collator&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-d24c33d968bc53980b678efe8f82f35c with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A33239#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:38401/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A35105#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:44355/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 100&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A35531#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:33107/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Is that error normal or How can I solve that error?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8803" PostHistoryTypeId="1" PostId="2357" RevisionGUID="30358e83-776a-4715-a80f-cd58c77d5e20" CreationDate="2022-05-03T07:44:14.113" UserId="1789" Text="zombienet: Err: Can not create the forwarding to the tracing collator" ContentLicense="CC BY-SA 4.0" />
  <row Id="8804" PostHistoryTypeId="3" PostId="2357" RevisionGUID="30358e83-776a-4715-a80f-cd58c77d5e20" CreationDate="2022-05-03T07:44:14.113" UserId="1789" Text="|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8805" PostHistoryTypeId="2" PostId="2358" RevisionGUID="1985c971-6c35-4870-8bd6-fdccb7169731" CreationDate="2022-05-03T09:17:23.360" UserId="28" Text="All of those RPCs can be found here: https://github.com/paritytech/substrate/blob/master/client/rpc/src/system/mod.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;B: traits::Block&gt; SystemApi&lt;B::Hash, &lt;B::Header as HeaderT&gt;::Number&gt; for System&lt;B&gt; {&#xD;&#xA;&#xD;&#xA;    // -- snip --&#xD;&#xA;&#xD;&#xA;	fn system_properties(&amp;self) -&gt; Result&lt;sc_chain_spec::Properties&gt; {&#xD;&#xA;		Ok(self.info.properties.clone())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    // -- snip --&#xD;&#xA;&#xD;&#xA;	fn system_sync_state(&amp;self) -&gt; Receiver&lt;SyncState&lt;&lt;B::Header as HeaderT&gt;::Number&gt;&gt; {&#xD;&#xA;		let (tx, rx) = oneshot::channel();&#xD;&#xA;		let _ = self.send_back.unbounded_send(Request::SyncState(tx));&#xD;&#xA;		Receiver(rx)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    // -- snip --&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These are then implemented in the node's RPC configuration:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/bin/node/rpc/src/lib.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;io.extend_with(SystemApi::to_delegate(FullSystem::new(client.clone(), pool, deny_unsafe)));&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8807" PostHistoryTypeId="5" PostId="2326" RevisionGUID="52c53721-3a88-4d60-bc44-9acc11efc929" CreationDate="2022-05-03T10:50:11.673" UserId="1950" Comment="added 49 characters in body" Text="Okay Im Writing the answer here&#xD;&#xA;&#xD;&#xA;The issue was that I haven't followed the dependencies declared order in node template. Once I implement the same on that , it worked &#xD;&#xA;&#xD;&#xA;Not sure why I got down voted&#xD;&#xA;Not ethical ! " ContentLicense="CC BY-SA 4.0" />
  <row Id="8808" PostHistoryTypeId="2" PostId="2359" RevisionGUID="bf93b4d8-3679-4e89-acd4-25eb809609f8" CreationDate="2022-05-03T10:51:54.780" UserId="380" Text="Debug messages are only emitted during a dry run (`query`), not during the actual transaction (`tx`)([Source](https://github.com/paritytech/substrate-contracts-node/issues/13#issuecomment-1020798193)).&#xD;&#xA;&#xD;&#xA;When you're calling the contract, first query it. Then perform your transaction if there are no error messages.&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;```  &#xD;&#xA;public async transaction(signer: Signer, method: string, args: any[]): Promise&lt;Partial&lt;TransactionResponse&gt;&gt; {&#xD;&#xA;&#xD;&#xA;    // View any debug in substrate logs and catch any errors here&#xD;&#xA;    const queryBeforeTx = await this.query(method, args);&#xD;&#xA;&#xD;&#xA;    // Then run your transaction&#xD;&#xA;    const extrinsic = this.contract.tx[method]({}, ...args);" ContentLicense="CC BY-SA 4.0" />
  <row Id="8810" PostHistoryTypeId="2" PostId="2360" RevisionGUID="a7de8700-731c-428e-b0dd-da9cf5d5217b" CreationDate="2022-05-03T12:55:04.897" UserId="2107" Text="I'm trying to set up my own public blockchain and have been running into issues when setting up a bootnode to be accessible over DNS rather than IP4. Based on the Polkadot chain specification, their bootnodes are all set up using DNS, like:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;Polkadot&quot;,&#xD;&#xA;  &quot;id&quot;: &quot;polkadot&quot;,&#xD;&#xA;  &quot;chainType&quot;: &quot;Live&quot;,&#xD;&#xA;  &quot;bootNodes&quot;: [&#xD;&#xA;    &quot;/dns/polkadot-connect-0.parity.io/tcp/443/wss/p2p/12D3KooWEPmjoRpDSUuiTjvyNDd8fejZ9eNWH5bE965nyBMDrB4o&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-1.parity.io/tcp/443/wss/p2p/12D3KooWLvcA24g6sT9YTaQyinwowMbLF5z7iMLoxZpEiV9pSmNf&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-2.parity.io/tcp/443/wss/p2p/12D3KooWDhp18HYzJuVX2jLhtjQgAhT1XWGqah42StoUJpkLvh2o&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-3.parity.io/tcp/443/wss/p2p/12D3KooWEsPEadSjLAPyxckqVJkp54aVdPuX3DD6a1FTL2y5cB9x&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-4.parity.io/tcp/443/wss/p2p/12D3KooWFfG1SQvcPoUK2N41cx7r52KYXKpRtZxfLZk8xtVzpp4d&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-5.parity.io/tcp/443/wss/p2p/12D3KooWDmQPkBvQGg9wjBdFThtWj3QCDVQyHJ1apfWrHvjwbYS8&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-6.parity.io/tcp/443/wss/p2p/12D3KooWBKtPpCnVTTzD7fPpCdFsrsYZ5K8fwmsLabb1JBuCycYs&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-7.parity.io/tcp/443/wss/p2p/12D3KooWP3BsFY6UaiLjEJ3YbDp6q6SMQgAHB15qKj41DUZQLMqD&quot;,&#xD;&#xA;    &quot;/dns/p2p.0.polkadot.network/tcp/30333/p2p/12D3KooWHsvEicXjWWraktbZ4MQBizuyADQtuEGr3NbDvtm5rFA5&quot;,&#xD;&#xA;    &quot;/dns/p2p.1.polkadot.network/tcp/30333/p2p/12D3KooWQz2q2UWVCiy9cFX1hHYEmhSKQB2hjEZCccScHLGUPjcc&quot;,&#xD;&#xA;    &quot;/dns/p2p.2.polkadot.network/tcp/30333/p2p/12D3KooWNHxjYbDLLbDNZ2tq1kXgif5MSiLTUWJKcDdedKu4KaG8&quot;,&#xD;&#xA;    &quot;/dns/p2p.3.polkadot.network/tcp/30333/p2p/12D3KooWGJQysxrQcSvUWWNw88RkqYvJhH3ZcDpWJ8zrXKhLP5Vr&quot;,&#xD;&#xA;    &quot;/dns/p2p.4.polkadot.network/tcp/30333/p2p/12D3KooWKer8bYqpYjwurVABu13mkELpX2X7mSpEicpjShLeg7D6&quot;,&#xD;&#xA;    &quot;/dns/p2p.5.polkadot.network/tcp/30333/p2p/12D3KooWSRjL9LcEQd5u2fQTbyLxTEHq1tUFgQ6amXSp8Eu7TfKP&quot;,&#xD;&#xA;    &quot;/dns/cc1-0.parity.tech/tcp/30333/p2p/12D3KooWSz8r2WyCdsfWHgPyvD8GKQdJ1UAiRmrcrs8sQB3fe2KU&quot;,&#xD;&#xA;    &quot;/dns/cc1-1.parity.tech/tcp/30333/p2p/12D3KooWFN2mhgpkJsDBuNuE5427AcDrsib8EoqGMZmkxWwx3Md4&quot;&#xD;&#xA;  ],&#xD;&#xA;  &quot;...&quot;: &quot;...&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My question is, how do they set up these bootnodes to listen on a custom domain? How does that look like on the nginx side?&#xD;&#xA;&#xD;&#xA;I've tried setting mine up by running the node with the params:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--ws-external --rpc-external --rpc-cors all --name &quot;Bootnode 1&quot; --pruning archive --public-addr=&quot;/dns/{CUSTOM_DOMAIN}/tcp/443&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and my nginx config like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;server {&#xD;&#xA;&#xD;&#xA;  server_name {CUSTOM_DOMAIN};&#xD;&#xA;&#xD;&#xA;  root /var/www/html;&#xD;&#xA;  index index.html;&#xD;&#xA;&#xD;&#xA;  location / {&#xD;&#xA;    proxy_buffering off;&#xD;&#xA;    proxy_pass http://localhost:30333;&#xD;&#xA;    proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;    proxy_set_header Host $host;&#xD;&#xA;    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  location /ws {&#xD;&#xA;    proxy_buffering off;&#xD;&#xA;    proxy_pass http://localhost:9944;&#xD;&#xA;    proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;    proxy_set_header Host $host;&#xD;&#xA;    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;&#xD;&#xA;    proxy_http_version 1.1;&#xD;&#xA;    proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;    proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  listen [::]:443 ssl ipv6only=on;&#xD;&#xA;  listen 443 ssl;&#xD;&#xA;  ssl_certificate /etc/ssl/certs/cloudflare.crt;&#xD;&#xA;  ssl_certificate_key /etc/ssl/certs/cloudflare.pem;&#xD;&#xA;&#xD;&#xA;  ssl_session_cache shared:cache_nginx_SSL:1m;&#xD;&#xA;  ssl_session_timeout 1440m;&#xD;&#xA;&#xD;&#xA;  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;&#xD;&#xA;  ssl_prefer_server_ciphers on;&#xD;&#xA;&#xD;&#xA;  ssl_ciphers &quot;ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS&quot;;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I try to run other nodes and connect to the bootnode, they are unable to. I am completely clueless whether the problem I have is on my nginx or node configuration or both.  If you know something about how Polkadot hosts their bootnodes or know how to do it, I'd appreciate it.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8812" PostHistoryTypeId="1" PostId="2360" RevisionGUID="a7de8700-731c-428e-b0dd-da9cf5d5217b" CreationDate="2022-05-03T12:55:04.897" UserId="2107" Text="How are polkadot bootnodes set up?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8813" PostHistoryTypeId="3" PostId="2360" RevisionGUID="a7de8700-731c-428e-b0dd-da9cf5d5217b" CreationDate="2022-05-03T12:55:04.897" UserId="2107" Text="|substrate-node|polkadot|nodes|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8814" PostHistoryTypeId="2" PostId="2361" RevisionGUID="88cb1d6b-1c38-40ad-9961-1d096152e66b" CreationDate="2022-05-03T13:17:36.597" UserId="2355" Text="I'm trying to use the &quot;let i in x..y&quot; notation while benchmarking, and ran into a problem:&#xD;&#xA;&#xD;&#xA;the line `let i in 10_000_000_000 .. 100_000_000_000` throw an error, as i is a u32, and my numbers doesn't fit.&#xD;&#xA;How can i set i as a u128 ? I tried `let i: u128 in...`, `let i as u128 in...` every notation that came to my mind, and didn't manage to find a solution" ContentLicense="CC BY-SA 4.0" />
  <row Id="8816" PostHistoryTypeId="1" PostId="2361" RevisionGUID="88cb1d6b-1c38-40ad-9961-1d096152e66b" CreationDate="2022-05-03T13:17:36.597" UserId="2355" Text="benchmark: &quot;let i in x...y&quot; notation - How to set i as u128?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8817" PostHistoryTypeId="3" PostId="2361" RevisionGUID="88cb1d6b-1c38-40ad-9961-1d096152e66b" CreationDate="2022-05-03T13:17:36.597" UserId="2355" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8818" PostHistoryTypeId="2" PostId="2362" RevisionGUID="e8feea8a-41c5-4aad-afa0-13fbd2b672d3" CreationDate="2022-05-03T13:31:39.490" UserId="429" Text="I'm trying to set some off-chain storage through a different terminal using a custom subcommand after starting up the node.&#xD;&#xA;&#xD;&#xA;Question here is:&#xD;&#xA;Is there any way to call the custom CLI subcommand in the same context in which I've started my node?&#xD;&#xA;&#xD;&#xA;In my opinion, if we start a node in the terminal and if we trigger a CLI subcommand in another terminal then they both will be executed in a different context(means the custom CLI will not be able to modify anything on the context in which the node is running).&#xD;&#xA;&#xD;&#xA;So can we achieve this scenario? Do we need to wrap our custom CLI logic in the node startup logic or is there any other way?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8820" PostHistoryTypeId="1" PostId="2362" RevisionGUID="e8feea8a-41c5-4aad-afa0-13fbd2b672d3" CreationDate="2022-05-03T13:31:39.490" UserId="429" Text="Calling CLI subcommand thorugh different terminal after running the node" ContentLicense="CC BY-SA 4.0" />
  <row Id="8821" PostHistoryTypeId="3" PostId="2362" RevisionGUID="e8feea8a-41c5-4aad-afa0-13fbd2b672d3" CreationDate="2022-05-03T13:31:39.490" UserId="429" Text="|offchain-worker|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8822" PostHistoryTypeId="6" PostId="2217" RevisionGUID="2da4e363-e64d-45d6-a60e-ee2e211686f3" CreationDate="2022-05-03T13:59:52.677" UserId="85" Comment="edited tags" Text="|rpc|u128|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8823" PostHistoryTypeId="6" PostId="2361" RevisionGUID="52b49d51-ab79-4aad-839d-744ee66cdbf5" CreationDate="2022-05-03T14:00:05.950" UserId="85" Comment="edited tags" Text="|benchmarking|u128|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8824" PostHistoryTypeId="6" PostId="1463" RevisionGUID="2cbf3d37-b57e-409d-ac2c-27cc61a1e313" CreationDate="2022-05-03T14:00:23.367" UserId="85" Comment="edited tags" Text="|rust|polkadot-js|u128|serialization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8825" PostHistoryTypeId="5" PostId="2337" RevisionGUID="34bb946f-e7f1-45d2-92d8-1a477c33f9d1" CreationDate="2022-05-03T15:00:43.993" UserId="165" Comment="added 44 characters in body" Text="A few things here, I see you are testing this upgrade from a parachain. Runtime upgrades on parachains should follow the authorize + enact flow, as specified in here https://docs.substrate.io/how-to-guides/v3/parachains/runtime-upgrades/&#xD;&#xA;&#xD;&#xA;Per my understanding what you are hitting is no surprise, as the relay must signal this upgrade - [error triggered here][1]. So what would make more sense in terms of scheduling an upgrade from the parachain side, would be scheduling the authorization of the upgrade, and enactment afterwards, not necessarily scheduled this one. &#xD;&#xA;&#xD;&#xA;See @pepyakin [answer](https://substrate.stackexchange.com/a/2339/165) to check why scheduler is messing with the signaling&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/68b4da78d079e110cd616b937ed2de738d32a2bf/pallets/parachain-system/src/lib.rs#L901-L902" ContentLicense="CC BY-SA 4.0" />
  <row Id="8826" PostHistoryTypeId="2" PostId="2363" RevisionGUID="db7e567c-2d4e-434c-8d7b-82afcf2ae3b0" CreationDate="2022-05-03T15:08:49.207" UserId="73" Text="&gt; Is there some some way to configure a parachain to produce blocks in a way which&#xD;&#xA;&gt; 1. has high finalization rate (not PoA though)&#xD;&#xA;&#xD;&#xA;No&#xD;&#xA;&#xD;&#xA;&gt; 2. predictable finalization rate, yielding a clear optimistic processing policy&#xD;&#xA;&#xD;&#xA;No&#xD;&#xA;   &#xD;&#xA;&gt; 3. has small reorgs. this is similar to 1, but with an emphasis on avoiding large numbers of blocks getting discarded, even infrequently.&#xD;&#xA;&#xD;&#xA;Reorgs depend on the relay chain. So, that is nothing you could currently really prevent. In the future with Sassafras that will not be a problem anymore, because there will be no more forks. &#xD;&#xA;&#xD;&#xA;For your general problem, you could work on un-finalized blocks? You would just need to make the user aware that some data is not yet finalized and thus, still can change." ContentLicense="CC BY-SA 4.0" />
  <row Id="8828" PostHistoryTypeId="2" PostId="2364" RevisionGUID="6070d743-d195-4224-9afb-7edc41fa688e" CreationDate="2022-05-03T15:09:26.310" UserId="627" Text="The short answer is &quot;no&quot;. For each chain the apps UI would need to connect to, get the metadata and then check against the extension. &#xD;&#xA;&#xD;&#xA;The apps UI has quite a number of chains... 234 by my count. Due to this, it only does the actual connected chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="8830" PostHistoryTypeId="5" PostId="2359" RevisionGUID="e50477cb-e3dc-484f-bc85-7582905c6ff0" CreationDate="2022-05-03T15:18:53.513" UserId="380" Comment="fixed query call" Text="Debug messages are only emitted during a dry run (`query`), not during the actual transaction (`tx`)([Source](https://github.com/paritytech/substrate-contracts-node/issues/13#issuecomment-1020798193)).&#xD;&#xA;&#xD;&#xA;When you're calling the contract, first query it. Then perform your transaction if there are no error messages.&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;```  &#xD;&#xA;public async transaction(signer: Signer, method: string, args: any[]): Promise&lt;Partial&lt;TransactionResponse&gt;&gt; {&#xD;&#xA;&#xD;&#xA;    // View any debug in substrate logs and catch any errors here&#xD;&#xA;    const queryBeforeTx = await await this.contract.query[method](this.account.address, {}, ...args);&#xD;&#xA;&#xD;&#xA;    // Then run your transaction&#xD;&#xA;    const extrinsic = this.contract.tx[method]({}, ...args);" ContentLicense="CC BY-SA 4.0" />
  <row Id="8835" PostHistoryTypeId="5" PostId="2135" RevisionGUID="a9c34e39-fbcf-4314-be3a-c859554bcb84" CreationDate="2022-05-03T17:09:39.333" UserId="83" Comment="[Edit removed during grace period]" Text="# &#xD;&#xA;&#xD;&#xA;# Luke Schoen&#xD;&#xA;&#xD;&#xA;I am passionate about Polkadot and the Web3 vision. I have a long-term interest in its success:&#xD;&#xA;&#xD;&#xA;- I enjoy hacking on Substrate and Polkadot in Rust and JavaScript for 3+ years&#xD;&#xA;&#xD;&#xA;- I built custom Substrate runtime modules, deployed a standalone mainnet, migrated to parachain testnet on Rococo, and launched on Kusama with support from Substrate Builders Program&#xD;&#xA;&#xD;&#xA;- I am a proud Polkadot Ambassador and often author in-depth walk-throughs&#xD;&#xA;&#xD;&#xA;- I actively post Q&amp;A in this Substrate Stack Exchange. Previously active in Stack Overflow, Ethereum Stack Exchange, Substrate Technical&#xD;&#xA;&#xD;&#xA;- I interact at Substrate and Polkadot community hackathons and conferences. I was at Amsterdot 2022. 2nd place at Build Polkadot 2020. I presented at Polkadot Decoded 2021&#xD;&#xA;&#xD;&#xA;- I am an end-user of Substrate products. I provide feedback, participate with live governance, staking, DeFi, and NFTs&#xD;&#xA;&#xD;&#xA;- I contribute open-source code and docs to Substrate and Polkadot. I also briefly had the privilege of working alongside core devs building Polkadot.js at Parity Tech&#xD;&#xA;&#xD;&#xA;- I am patient and empathetic toward new learners. I was previously an assistant educator at an in-person coding bootcamp" ContentLicense="CC BY-SA 4.0" />
  <row Id="8836" PostHistoryTypeId="2" PostId="2366" RevisionGUID="5a849405-db6a-45e5-933e-1952aa7ad735" CreationDate="2022-05-03T17:14:44.137" UserId="1820" Text="Can you try the following?&#xD;&#xA; 1. Open the extension in a new window (it's under the Settings menu with the gear icon)&#xD;&#xA; 2. Try to make a transaction from your Ledger account. This time you should get an &quot;Unable to claim interface&quot; error.&#xD;&#xA; 3. Close the extension window and try the transaction again. This time it should work.&#xD;&#xA;&#xD;&#xA;I tried several things after reproducing this on my Nano X, so perhaps I've missed a step, but it seems it's an extension issue and what got the extension going again was opening it in a new window.&#xD;&#xA;&#xD;&#xA;Let me know if this worked." ContentLicense="CC BY-SA 4.0" />
  <row Id="8838" PostHistoryTypeId="2" PostId="2367" RevisionGUID="9c256296-3416-4840-a9c7-0527fa520b8f" CreationDate="2022-05-03T17:15:00.760" UserId="45" Text="I have a public key in HEX into. How do I get the SS58 representation of it? Is there a command line tool?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8840" PostHistoryTypeId="1" PostId="2367" RevisionGUID="9c256296-3416-4840-a9c7-0527fa520b8f" CreationDate="2022-05-03T17:15:00.760" UserId="45" Text="How to convert HEX public key into SS58" ContentLicense="CC BY-SA 4.0" />
  <row Id="8841" PostHistoryTypeId="3" PostId="2367" RevisionGUID="9c256296-3416-4840-a9c7-0527fa520b8f" CreationDate="2022-05-03T17:15:00.760" UserId="45" Text="|subkey|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8843" PostHistoryTypeId="2" PostId="2368" RevisionGUID="22987cb6-0d1f-4f61-a6c2-b66bf25e137b" CreationDate="2022-05-03T17:15:00.760" UserId="45" Text="The easiest way is to use the `subkey` tool. You can [install](https://github.com/paritytech/substrate/blob/master/bin/utils/subkey/README.md#usage) it from the substrate repo.&#xD;&#xA;&#xD;&#xA;Then, you can use:&#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;$ subkey inspect --public 0xec7c1c10c73a2d90c6a4fc92a5212caaff849a65193db3a2b2aa1ffdadb99f06&#xD;&#xA;&#xD;&#xA;Network ID/version: substrate&#xD;&#xA;  Public key (hex):   0xec7c1c10c73a2d90c6a4fc92a5212caaff849a65193db3a2b2aa1ffdadb99f06&#xD;&#xA;  Account ID:         0xec7c1c10c73a2d90c6a4fc92a5212caaff849a65193db3a2b2aa1ffdadb99f06&#xD;&#xA;  Public key (SS58):  5HQn2URwTz6CPsZzbtPzm93KEza881uQ92rLRhtRzSLoA7ws&#xD;&#xA;  SS58 Address:       5HQn2URwTz6CPsZzbtPzm93KEza881uQ92rLRhtRzSLoA7ws&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Be aware, that the SS58 depends on the network, so it might be possible that you need to specify it via the `--network` command line argument." ContentLicense="CC BY-SA 4.0" />
  <row Id="8844" PostHistoryTypeId="2" PostId="2369" RevisionGUID="a78e78a1-8763-4853-a05f-be7bb1db90ff" CreationDate="2022-05-03T18:42:45.303" UserId="205" Text="I recommend using Shawn Tabrizi [Substrate-js utilities][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;or either coding using the [hex_literal][2] crate.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub const Bob: AccountId = AccountId::from(&#xD;&#xA;	hex_literal::hex!(&quot;8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48&quot;)&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;However, while coding in Substrate, I advice trying to migrate your logic directly to `ss58` instead of working with `hex` keys. Will make your days easier. e.g. below:&#xD;&#xA;```&#xD;&#xA;pub const Bob: AccountId = AccountId::from_ss58check(&quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate-js-utilities/&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/hex_literal/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="8846" PostHistoryTypeId="2" PostId="2370" RevisionGUID="b7391e0b-fd4b-4339-9cde-ddcdd9978f7d" CreationDate="2022-05-03T23:00:18.843" UserId="181" Text="How can I create a custom origin that executes some arbitrary logic on any transaction? The use case here is some identity check that fails a transaction, if the check fails.&#xD;&#xA;&#xD;&#xA;In addition, I want to execute some custom logic on transactions coming from any transactions in my runtime, not just from extrinsics in custom pallets that I maintain.&#xD;&#xA;&#xD;&#xA;Is this possible to do using just custom origins?&#xD;&#xA;&#xD;&#xA;I am aware of Signed Extensions and their ability to extend transactions. Is there a reason I should not use Signed Extensions for such a case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8848" PostHistoryTypeId="1" PostId="2370" RevisionGUID="b7391e0b-fd4b-4339-9cde-ddcdd9978f7d" CreationDate="2022-05-03T23:00:18.843" UserId="181" Text="How to create custom origin that executes abritrary code on transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="8849" PostHistoryTypeId="3" PostId="2370" RevisionGUID="b7391e0b-fd4b-4339-9cde-ddcdd9978f7d" CreationDate="2022-05-03T23:00:18.843" UserId="181" Text="|extrinsic|transactions|origin|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8850" PostHistoryTypeId="2" PostId="2371" RevisionGUID="c24ae863-035b-4e73-a27e-f1b6237d145c" CreationDate="2022-05-03T23:06:08.823" UserId="2107" Text="Is there a way to verify that an endpoint is properly set up to receive p2p connections using `ping`, `curl` or some other tool?&#xD;&#xA;&#xD;&#xA;The reason I ask this is because I'd like to set up a proxy to use a custom domain name for the p2p endpoint of my node, but at the moment it does not work with my configuration and I'd like to know whether the endpoint is properly set up." ContentLicense="CC BY-SA 4.0" />
  <row Id="8852" PostHistoryTypeId="1" PostId="2371" RevisionGUID="c24ae863-035b-4e73-a27e-f1b6237d145c" CreationDate="2022-05-03T23:06:08.823" UserId="2107" Text="How to check if a node's p2p endpoint is working properly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8853" PostHistoryTypeId="3" PostId="2371" RevisionGUID="c24ae863-035b-4e73-a27e-f1b6237d145c" CreationDate="2022-05-03T23:06:08.823" UserId="2107" Text="|substrate-node|networking|proxy|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8854" PostHistoryTypeId="52" PostId="2367" RevisionGUID="74687cf2-46b7-45f7-b155-a48ca3d8dba7" CreationDate="2022-05-04T01:19:04.293" />
  <row Id="8855" PostHistoryTypeId="2" PostId="2372" RevisionGUID="ace0a785-b957-4796-a283-169f8ce8a09b" CreationDate="2022-05-04T03:43:08.937" UserId="1789" Text="https://github.com/paritytech/zombienet/issues/178&#xD;&#xA;This is a bug since ZombieNet is trying to get the forwarding-port for the tracing collector service without validate if the service is available.  &#xD;&#xA;...will be fixed asap, but shouldn't cause issues to both spawn or test networks." ContentLicense="CC BY-SA 4.0" />
  <row Id="8857" PostHistoryTypeId="2" PostId="2373" RevisionGUID="fb6766e7-cbc2-4e22-91af-5f19e2118f68" CreationDate="2022-05-04T04:04:20.143" UserId="566" Text="I have a contract which uses `ink_env::ecdsa_recover()` for signature verification. Though all the tests are passing, I am unable to deploy it on the local node using contracts-ui. &#xD;&#xA;&#xD;&#xA;This is the error it's throwing:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;module imports a non-existent function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8859" PostHistoryTypeId="1" PostId="2373" RevisionGUID="fb6766e7-cbc2-4e22-91af-5f19e2118f68" CreationDate="2022-05-04T04:04:20.143" UserId="566" Text="Unable to deploy an ink! contract with ecdsa_recover" ContentLicense="CC BY-SA 4.0" />
  <row Id="8860" PostHistoryTypeId="3" PostId="2373" RevisionGUID="fb6766e7-cbc2-4e22-91af-5f19e2118f68" CreationDate="2022-05-04T04:04:20.143" UserId="566" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8861" PostHistoryTypeId="5" PostId="2372" RevisionGUID="c6ca754c-5a07-4131-9cad-cdbc57dad46c" CreationDate="2022-05-04T04:20:48.500" UserId="1789" Comment="added 9 characters in body" Text="https://github.com/paritytech/zombienet/issues/178&#xD;&#xA;This is a bug since ZombieNet is trying to get the forwarding-port for the tracing collector service without validate if the service is available.  &#xD;&#xA;but this shouldn't cause issues to both spawn or test networks.&#xD;&#xA;&#xD;&#xA;fixed in newer releases" ContentLicense="CC BY-SA 4.0" />
  <row Id="8862" PostHistoryTypeId="2" PostId="2374" RevisionGUID="da9fc439-488d-43b2-a588-1554183be802" CreationDate="2022-05-04T06:21:28.907" UserId="2363" Text="Are there some standard attributes to use for URLs for images and other meta-information on PSP-34?&#xD;&#xA;I see that RMRK has that but it is only on Kusama. " ContentLicense="CC BY-SA 4.0" />
  <row Id="8864" PostHistoryTypeId="1" PostId="2374" RevisionGUID="da9fc439-488d-43b2-a588-1554183be802" CreationDate="2022-05-04T06:21:28.907" UserId="2363" Text="Standards for PSP34 thumbnail/image and resource url?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8865" PostHistoryTypeId="3" PostId="2374" RevisionGUID="da9fc439-488d-43b2-a588-1554183be802" CreationDate="2022-05-04T06:21:28.907" UserId="2363" Text="|ink|smart-contract|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8866" PostHistoryTypeId="2" PostId="2375" RevisionGUID="83bdd872-49f1-4a15-9b8e-a06f48ad610a" CreationDate="2022-05-04T06:47:53.357" UserId="2481" Text="Getblock through RPC method. I can only see the block hash. But I want a hash for each transaction. What should I do?[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JzeuA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8868" PostHistoryTypeId="1" PostId="2375" RevisionGUID="83bdd872-49f1-4a15-9b8e-a06f48ad610a" CreationDate="2022-05-04T06:47:53.357" UserId="2481" Text="How to obtain the transaction hash of each transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="8869" PostHistoryTypeId="3" PostId="2375" RevisionGUID="83bdd872-49f1-4a15-9b8e-a06f48ad610a" CreationDate="2022-05-04T06:47:53.357" UserId="2481" Text="|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8870" PostHistoryTypeId="2" PostId="2376" RevisionGUID="562725e3-8e39-4af5-8fc7-b9a33b76cd7e" CreationDate="2022-05-04T07:53:44.403" UserId="567" Text="[PSP34][1] is a standard at the contract level targeting `contracts-pallets`.&#xD;&#xA;&#xD;&#xA;As mentioned in the standard:&#xD;&#xA;&#xD;&#xA;&gt; Attributes are more flexible than single tokenURI function like in `Erc721`. The list of required attributes for NFT should be defined in a separate proposal based on the scope of the usage.&#xD;&#xA;&#xD;&#xA;There is no standard set for attributes for PSP34 yet, because it might be more restrictive rather than convenient.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/w3f/PSPs/blob/master/PSPs/psp-34.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="8872" PostHistoryTypeId="2" PostId="2377" RevisionGUID="349fe011-a3c5-4229-9f6d-f522465945d3" CreationDate="2022-05-04T08:18:50.977" UserId="627" Text="The transaction hash is a blake2b-256 of the SCALE-encoded extrinsic data. &#xD;&#xA;&#xD;&#xA;This should be consistent, no matter which middleware API is used, the process is the same to get to that point. For instance, in the polkadot-js API, each extrinsic will have a `.hash` exposed that does exactly this, i.e. it runs a blake2b-256 over the encoded data as received." ContentLicense="CC BY-SA 4.0" />
  <row Id="8874" PostHistoryTypeId="2" PostId="2378" RevisionGUID="c07d664f-a84c-4fea-ae62-b7e52b98ccd1" CreationDate="2022-05-04T08:56:01.640" UserId="2417" Text="I want to build a *delegator contract* to an **deployed** *callee contract* without knowing the details of the *callee contract*.&#xD;&#xA;&#xD;&#xA;Related part of my *delegator contract* is as below:&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn call_to_contracts(&amp;self, callee_account: AccountId, msg: ink_prelude::string::String) -&gt; ink_prelude::string::String{&#xD;&#xA;            &#xD;&#xA;            let my_return_value: ink_prelude::string::String =  ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(&#xD;&#xA;                    ink_env::call::Call::new()&#xD;&#xA;                        .callee(callee_account)&#xD;&#xA;                        .gas_limit(0)&#xD;&#xA;                        .transferred_value(0))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0xa9, 0x45, 0xce, 0xc7]))&#xD;&#xA;                    .push_arg(msg.into_bytes())&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;ink_prelude::string::String&gt;()&#xD;&#xA;                .fire()&#xD;&#xA;                .unwrap();&#xD;&#xA;            my_return_value&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Related part of my *callee contract* is as below:&#xD;&#xA;```&#xD;&#xA;#[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(::scale_info::TypeInfo))]&#xD;&#xA;    pub struct MessageDetail{&#xD;&#xA;        name: ink_prelude::string::String,&#xD;&#xA;        age: u32,&#xD;&#xA;        phones: ink_prelude::vec::Vec&lt;ink_prelude::string::String&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;/// test cross contract call&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn encode_user_defined_struct(&amp;self, msg: MessageDetail) -&gt; ink_prelude::string::String{&#xD;&#xA;            ink_prelude::format!(&quot;{:?}&quot;, msg)&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;First, I use [ContractUI](https://paritytech.github.io/contracts-ui) to make a test. I have tried the following input of the parameter `msg` when calling `call_to_contracts`:&#xD;&#xA;* `{{\&quot;name\&quot;:\&quot;nika\&quot;,\&quot;age\&quot;:18,\&quot;phones\&quot;:[\&quot;hello\&quot;,\&quot;nika\&quot;]}}`&#xD;&#xA;* `{\&quot;name\&quot;:\&quot;nika\&quot;,\&quot;age\&quot;:18,\&quot;phones\&quot;:[\&quot;hello\&quot;,\&quot;nika\&quot;]}`&#xD;&#xA;* `{&quot;name&quot;:&quot;nika&quot;,&quot;age&quot;:18,&quot;phones&quot;:[&quot;hello&quot;,&quot;nika&quot;]}`&#xD;&#xA;&#xD;&#xA;Besides, I have tried to replace the `.push_arg(msg.into_bytes())` with `.push_arg(msg)`.&#xD;&#xA;&#xD;&#xA;But it's not working, I cannot see any error messages through *ContractUI*.&#xD;&#xA;&#xD;&#xA;I'm sure if I defined the same `MessageDetail` in *delegator contract*, and change the parameter `msg` from `String` to `MessageDetail`, everything's OK.&#xD;&#xA;&#xD;&#xA;But my purpose is to build a general delegator contract **without** knowing the details of the **callee**, is there any way I can try in `ink!`?&#xD;&#xA;&#xD;&#xA;In solidity it's very easy to implement this with `ABIEncode`.&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="8876" PostHistoryTypeId="1" PostId="2378" RevisionGUID="c07d664f-a84c-4fea-ae62-b7e52b98ccd1" CreationDate="2022-05-04T08:56:01.640" UserId="2417" Text="[ink!]How to make cross contract calls with user defined parameters?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8877" PostHistoryTypeId="3" PostId="2378" RevisionGUID="c07d664f-a84c-4fea-ae62-b7e52b98ccd1" CreationDate="2022-05-04T08:56:01.640" UserId="2417" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8878" PostHistoryTypeId="5" PostId="2378" RevisionGUID="461d2ed9-6bf0-443c-b1bb-3f8576555b49" CreationDate="2022-05-04T09:02:28.847" UserId="2417" Comment="deleted 66 characters in body" Text="I want to build a *delegator contract* to an **deployed** *callee contract* without knowing the source code details of the *callee contract*.&#xD;&#xA;&#xD;&#xA;Related part of my *delegator contract* is as below:&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn call_to_contracts(&amp;self, callee_account: AccountId, msg: ink_prelude::string::String) -&gt; ink_prelude::string::String{&#xD;&#xA;            &#xD;&#xA;            let my_return_value: ink_prelude::string::String =  ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(&#xD;&#xA;                    ink_env::call::Call::new()&#xD;&#xA;                        .callee(callee_account)&#xD;&#xA;                        .gas_limit(0)&#xD;&#xA;                        .transferred_value(0))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0xa9, 0x45, 0xce, 0xc7]))&#xD;&#xA;                    .push_arg(msg.into_bytes())&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;ink_prelude::string::String&gt;()&#xD;&#xA;                .fire()&#xD;&#xA;                .unwrap();&#xD;&#xA;            my_return_value&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Related part of my *callee contract* is as below:&#xD;&#xA;```&#xD;&#xA;#[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(::scale_info::TypeInfo))]&#xD;&#xA;    pub struct MessageDetail{&#xD;&#xA;        name: ink_prelude::string::String,&#xD;&#xA;        age: u32,&#xD;&#xA;        phones: ink_prelude::vec::Vec&lt;ink_prelude::string::String&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;/// test cross contract call&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn encode_user_defined_struct(&amp;self, msg: MessageDetail) -&gt; ink_prelude::string::String{&#xD;&#xA;            ink_prelude::format!(&quot;{:?}&quot;, msg)&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;First, I use [ContractUI](https://paritytech.github.io/contracts-ui) to make a test. I have tried the following input of the parameter `msg` when calling `call_to_contracts`:&#xD;&#xA;* `{{\&quot;name\&quot;:\&quot;nika\&quot;,\&quot;age\&quot;:18,\&quot;phones\&quot;:[\&quot;hello\&quot;,\&quot;nika\&quot;]}}`&#xD;&#xA;* `{\&quot;name\&quot;:\&quot;nika\&quot;,\&quot;age\&quot;:18,\&quot;phones\&quot;:[\&quot;hello\&quot;,\&quot;nika\&quot;]}`&#xD;&#xA;* `{&quot;name&quot;:&quot;nika&quot;,&quot;age&quot;:18,&quot;phones&quot;:[&quot;hello&quot;,&quot;nika&quot;]}`&#xD;&#xA;&#xD;&#xA;Besides, I have tried to replace the `.push_arg(msg.into_bytes())` with `.push_arg(msg)`.&#xD;&#xA;&#xD;&#xA;But it's not working, I cannot see any error messages through *ContractUI*.&#xD;&#xA;&#xD;&#xA;I'm sure if I defined the same `MessageDetail` in *delegator contract*, and change the parameter `msg` from `String` to `MessageDetail`, everything's OK.&#xD;&#xA;&#xD;&#xA;But my purpose is to build a general delegator contract **without** knowing the source code details of the **callee**, is there any way I can try in `ink!`?&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="8879" PostHistoryTypeId="2" PostId="2379" RevisionGUID="7d45c2de-9195-4e87-b054-b4079dc34733" CreationDate="2022-05-04T09:19:00.070" UserId="489" Text="# Background&#xD;&#xA;when reading the code about `pallet balance` and some low-level code.I notice some `terminology` about balance.&#xD;&#xA;&#xD;&#xA;# terminology&#xD;&#xA;- Burn&#xD;&#xA;- Slash&#xD;&#xA;- Reserve&#xD;&#xA;- Lock&#xD;&#xA;- Withdraw&#xD;&#xA;- deposit&#xD;&#xA;&#xD;&#xA;What is the meaning and specific difference of the above terminology, I have some doubts about this&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8881" PostHistoryTypeId="1" PostId="2379" RevisionGUID="7d45c2de-9195-4e87-b054-b4079dc34733" CreationDate="2022-05-04T09:19:00.070" UserId="489" Text="About some balance terminology" ContentLicense="CC BY-SA 4.0" />
  <row Id="8882" PostHistoryTypeId="3" PostId="2379" RevisionGUID="7d45c2de-9195-4e87-b054-b4079dc34733" CreationDate="2022-05-04T09:19:00.070" UserId="489" Text="|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8883" PostHistoryTypeId="2" PostId="2380" RevisionGUID="2fde19ee-82d4-4d0d-9f39-2eaca27a3807" CreationDate="2022-05-04T10:42:25.517" UserId="351" Text="Getting `error: failed to run custom build command for `jemalloc-sys v0.3.2 error` when compiling substrate-node-template in wsl environment." ContentLicense="CC BY-SA 4.0" />
  <row Id="8885" PostHistoryTypeId="1" PostId="2380" RevisionGUID="2fde19ee-82d4-4d0d-9f39-2eaca27a3807" CreationDate="2022-05-04T10:42:25.517" UserId="351" Text="Problem compiling substrate node in WSL ( windows )" ContentLicense="CC BY-SA 4.0" />
  <row Id="8886" PostHistoryTypeId="3" PostId="2380" RevisionGUID="2fde19ee-82d4-4d0d-9f39-2eaca27a3807" CreationDate="2022-05-04T10:42:25.517" UserId="351" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8888" PostHistoryTypeId="2" PostId="2381" RevisionGUID="2c5242c0-eebe-4d0b-b37f-9c26f401c408" CreationDate="2022-05-04T10:42:25.517" UserId="351" Text="If you get this kinda error when compiling you substrate-node-template make sure you have all these installed&#xD;&#xA;&#xD;&#xA;    mrisholukamba@mrisholukamba:~$ rustup show&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /home/mrisholukamba/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.60.0 (7737e0b5c 2022-04-04)&#xD;&#xA;--------------------------------------------&#xD;&#xA;&#xD;&#xA;after that and it does not compile , make sure you install&#xD;&#xA;&#xD;&#xA;    apt-get install make&#xD;&#xA;----------------------------------------------------&#xD;&#xA;Note: This applies if the substrate-node-template is fresh&#xD;&#xA;But after playing around with it and you get error when compiling then make sure you read the error message and tackle it accordingly. This problem occurred to me and it was wise sharing the solution to any beginner." ContentLicense="CC BY-SA 4.0" />
  <row Id="8889" PostHistoryTypeId="2" PostId="2382" RevisionGUID="aad7dfbd-1286-4f5d-a4df-ae5c1c18c80b" CreationDate="2022-05-04T10:49:41.790" UserId="53" Text="- _Burn_: To remove some balance or asset from issuance.&#xD;&#xA;- _Slash_: The reduce an account's balance as punishment.&#xD;&#xA;- _Reserve_: To set aside some account's balance so it cannot be used in any other way but is still associated with the owner.&#xD;&#xA;- _Lock_: To set a lower-limit on the account balance so a transfer or other elective balance-reducing operation cannot reduce it below this amount. Unlike with reserving, multiple locks on the same account &quot;overlap&quot;.&#xD;&#xA;- _Withdraw_: To reduce the balance of an account. There is an expectation that this is a counterpart to some other operation(s) which will leave a deficit of tokens and thus that by doing both/all operations, the _total issuance_ across the system will be correctly accounted.&#xD;&#xA;- _Deposit_: To increase the balance of an account. There is an expectation that this is a counterpart to some previous operation(s) which left a surplus of tokens and thus that by doing both/all operations, the _total issuance_ across the system will be correctly accounted." ContentLicense="CC BY-SA 4.0" />
  <row Id="8891" PostHistoryTypeId="2" PostId="2383" RevisionGUID="5a5812f7-d5ff-4dac-9edd-03828393607f" CreationDate="2022-05-04T10:55:55.517" UserId="53" Text="If you wish to execute custom logic on all transactions in your system, then a `SignedExtension` is the way to go. It can be used to introduce both new data into your chain's transactions, as well as checks, prioritisation, payment, ordering and more.&#xD;&#xA;&#xD;&#xA;Introducing a new Origin is not needed for this, nor could it be used to alter the effective logic of any pallets you are not authoring to recognise this new Origin." ContentLicense="CC BY-SA 4.0" />
  <row Id="8893" PostHistoryTypeId="2" PostId="2384" RevisionGUID="91659889-546d-4d7b-8179-966d74764e77" CreationDate="2022-05-04T11:00:15.080" UserId="53" Text="Benchmark complexity parameters are always `u32`. Making them more than `u32` wouldn't make sense since they're designed to be iterated over to collect timing data for a linear regression algorithm, and you're never going to want to do more than 4 billion iterations of a timing algorithm. &#xD;&#xA;&#xD;&#xA;But you can easily take a `u32` and turn it into a `u128` with a multiplier:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let x in 10_000 .. 100_000;&#xD;&#xA;let i = x as u128 * 1_000_000u128;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8895" PostHistoryTypeId="2" PostId="2385" RevisionGUID="6f0a12e0-771a-4257-97f2-a405043de42a" CreationDate="2022-05-04T11:33:19.537" UserId="53" Text="XCM can certainly be used to burn an asset controlled by the XCM origin. This is fairly easy and amounts to a `WithdrawAsset` instruction followed by `BurnAsset` (new in XCMv3). A well-written XCM should work in a &quot;fire-and-forget&quot; mode, but confirmation is possible with the `QueryHolding` instruction.&#xD;&#xA;&#xD;&#xA;The bigger question is creating a new asset. XCM doesn't yet has a specific instruction for creating a new asset remotely. This could be designed and added in a later version, though given the divergence of features between NFT systems, it's not clear to me that this would be an easy job.&#xD;&#xA;&#xD;&#xA;In the meantime, you could send an XCM `Transact` instruction to the Uniques pallet in Statemint/e to &quot;manually&quot; create the new asset and assign it to the relevant owner. This is a little tricky as you'll need to calculate the relevant `AccountId` value for the owner, but it should be doable.&#xD;&#xA;&#xD;&#xA;Alternatively, you could create the asset somewhere locally instead of Statemint/e." ContentLicense="CC BY-SA 4.0" />
  <row Id="8897" PostHistoryTypeId="2" PostId="2386" RevisionGUID="185ca021-9cd3-4495-9aec-25db0dc2fe07" CreationDate="2022-05-04T11:47:27.553" UserId="53" Text="In general, DoS attacks are non-trivial to prevent entirely. They're mitigated by the fact that they're technically non-trivial to execute (it requires substantial knowledge of the codebase and sysadmin/devops skill) and they're costly to maintain. Substrate networking code is written with quite an advanced peer reputation and evaluation system, which should take care of ejecting bad/malfunctioning/DoSing peers early on.&#xD;&#xA;&#xD;&#xA;BABE does indeed have a requirement that blocks be produced every session and if this requirement is not met it will stall. Sessions are typically between 1 hour and 4 hours, with 6 sessions per era. At present there is no reason to believe that even a moderately well-funded attacker could DoS several reasonably performant nodes to the point that they would be unable to produce a single block over the course of multiple hours. Nevertheless, the more validator/collator nodes which are involved in your network the better, as this makes an effective attack harder to execute and provides some redundancy.&#xD;&#xA;&#xD;&#xA;Any networks which are at risk from well-funded and capable attackers should take precautions, including: &#xD;&#xA;- a large number of validators (perhaps up to 1,000);&#xD;&#xA;- have a large number of reserved peer slots between validators;&#xD;&#xA;- minimise the number of untrusted peer slots available for attackers;&#xD;&#xA;- avoid exposing RPC services on validators; and&#xD;&#xA;- maximise the session length (at least 1 hour).&#xD;&#xA;&#xD;&#xA;If you're really worried, then you could also allow validators to connect only to each other and a set of additional full-nodes which you run, and only allow untrusted nodes to connect to those full-nodes. But this is probably overkill." ContentLicense="CC BY-SA 4.0" />
  <row Id="8899" PostHistoryTypeId="5" PostId="2318" RevisionGUID="503466dc-54c7-46b8-8c30-6e5f7328141f" CreationDate="2022-05-04T11:49:32.163" UserId="53" Comment="edited body" Text="There is no solution for this (yet). An API for executing binaries from the OCW could be introduced, but allowing a runtime to execute arbitrary binary code on essentially any node on the network is a systemic security risk. Realistically, it would need to be put behind some CLI option to make the danger very clear (e.g. `--enable-ocw-binary-execution-DANGEROUS`).&#xD;&#xA;&#xD;&#xA;An alternative would be to create a secondary binary which connects to the node over RPC and watches the chain state for events and then executes the code itself." ContentLicense="CC BY-SA 4.0" />
  <row Id="8900" PostHistoryTypeId="2" PostId="2387" RevisionGUID="f5503572-5fca-4ab4-b039-baf155178164" CreationDate="2022-05-04T12:16:38.577" UserId="496" Text="as the title suggests. &#xD;&#xA;I imported chrono 0.4 just like in the documentation [Here](https://docs.rs/chrono/0.4.0/chrono/index.html)&#xD;&#xA;&#xD;&#xA;And when i ever i call Utc::now() to get current UTC time, i get error that the function now() doesn't not exists.&#xD;&#xA;&#xD;&#xA;Here is my Cargo import:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;chrono =  { version = &quot;0.4&quot;, default-features = false}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the code snippet to get current UTC time:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        use chrono::prelude::*;&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_todays_date(&amp;self) -&gt;  String{&#xD;&#xA;            //let local= Local::now();&#xD;&#xA;            let utc= Utc::now();&#xD;&#xA;            utc.to_string()&#xD;&#xA;        }&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;When i ever i try to compile this code, i get the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    |&#xD;&#xA;335 |             let utc= Utc::now();&#xD;&#xA;    |                           ^^^ function or associated item not found in `chrono::Utc`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8902" PostHistoryTypeId="1" PostId="2387" RevisionGUID="f5503572-5fca-4ab4-b039-baf155178164" CreationDate="2022-05-04T12:16:38.577" UserId="496" Text="Rust ink! Utc::now() from chrono libary returns : function or associated item not found in `chrono::Utc'" ContentLicense="CC BY-SA 4.0" />
  <row Id="8903" PostHistoryTypeId="3" PostId="2387" RevisionGUID="f5503572-5fca-4ab4-b039-baf155178164" CreationDate="2022-05-04T12:16:38.577" UserId="496" Text="|ink|rust|smart-contract|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8904" PostHistoryTypeId="2" PostId="2388" RevisionGUID="2e3696a0-8146-4828-b3d3-e7161847e32b" CreationDate="2022-05-04T12:47:43.823" UserId="599" Text="I guess you can't use `chrono::Utc::now` in WASM=) Because it requires `std` to get the local time of the machine. If you want to get the current time then you need to get the timestamp of the block `ink_env::block_timestamp`. After you can convert it into `Date` or `Utc` and so on." ContentLicense="CC BY-SA 4.0" />
  <row Id="8906" PostHistoryTypeId="2" PostId="2389" RevisionGUID="4799267a-f87f-4617-b90d-633fe0cdcdb1" CreationDate="2022-05-04T13:35:31.323" UserId="2485" Text="I am trying to calculate how many transactions can fit into a single block. I have a block limit of 5mb. How can i learn the byte size of a single submitted transaction so i can estimate how many transactions can fit into a single block. Is there a way to do it from a polkadot js api?&#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="8908" PostHistoryTypeId="1" PostId="2389" RevisionGUID="4799267a-f87f-4617-b90d-633fe0cdcdb1" CreationDate="2022-05-04T13:35:31.323" UserId="2485" Text="Get a byte size of single extrinsic/transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="8909" PostHistoryTypeId="3" PostId="2389" RevisionGUID="4799267a-f87f-4617-b90d-633fe0cdcdb1" CreationDate="2022-05-04T13:35:31.323" UserId="2485" Text="|extrinsic|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8910" PostHistoryTypeId="2" PostId="2390" RevisionGUID="683db8c8-fa33-4407-b1b8-9ec02b40377d" CreationDate="2022-05-04T14:16:36.760" UserId="2485" Text="Could you please help me to understand how much space in a node does an empty block with no extrinsics/transactions take up? Is it the full size of a block size(say 1 mb if block size is 1 mb), or is block size a maximum byte size and if there are less transactions the less size of the block is going to be?&#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="8912" PostHistoryTypeId="1" PostId="2390" RevisionGUID="683db8c8-fa33-4407-b1b8-9ec02b40377d" CreationDate="2022-05-04T14:16:36.760" UserId="2485" Text="block byte size with no extrinsics/transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="8913" PostHistoryTypeId="3" PostId="2390" RevisionGUID="683db8c8-fa33-4407-b1b8-9ec02b40377d" CreationDate="2022-05-04T14:16:36.760" UserId="2485" Text="|block|blockchain-size|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8914" PostHistoryTypeId="2" PostId="2391" RevisionGUID="d285528f-efb0-4188-b884-6bec0b242701" CreationDate="2022-05-04T15:25:49.600" UserId="450" Text="I want to find out how exactly &quot;revert&quot; works in ink! smart contracts:&#xD;&#xA;&#xD;&#xA;1. What happen if we `panic!()` in ink! contracts? IIRC we shouldn't use `panic!()` in runtime.&#xD;&#xA;2. Is there any difference between `panic!()` and `Result`?&#xD;&#xA;3. I don't find any documentation regarding this. Am I missing something? Can anybody give me a link." ContentLicense="CC BY-SA 4.0" />
  <row Id="8916" PostHistoryTypeId="1" PostId="2391" RevisionGUID="d285528f-efb0-4188-b884-6bec0b242701" CreationDate="2022-05-04T15:25:49.600" UserId="450" Text="Panic in Ink! Smart Contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="8917" PostHistoryTypeId="3" PostId="2391" RevisionGUID="d285528f-efb0-4188-b884-6bec0b242701" CreationDate="2022-05-04T15:25:49.600" UserId="450" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8922" PostHistoryTypeId="5" PostId="2391" RevisionGUID="b2aff7e2-844f-46d1-b63e-d6c2d3c4e33a" CreationDate="2022-05-04T15:36:22.537" UserId="450" Comment="added 35 characters in body" Text="I want to find out how exactly &quot;revert&quot; works in ink! smart contracts:&#xD;&#xA;&#xD;&#xA;1. What happen if we `panic!()` in ink! contracts? IIRC we shouldn't use `panic!()` in runtime.&#xD;&#xA;2. Is there any difference between `panic!()` and returning `Result::Error` in ink! contracts?&#xD;&#xA;3. I don't find any documentation regarding this. Am I missing something? Can anybody give me a link." ContentLicense="CC BY-SA 4.0" />
  <row Id="8924" PostHistoryTypeId="2" PostId="2394" RevisionGUID="7468e72f-713d-4ca8-86d4-1f41c2e96822" CreationDate="2022-05-04T15:41:05.680" UserId="599" Text="1. `panic!` reverts the state but it also ends the execution of the current contract call. If your method was called by another contract, that contract will receive a `CalleeTrapped` error instead of the `Result`. If that method was called by the user, then he will receive `ContractTrapped`.&#xD;&#xA;2. `Result` can contain more descriptive errors than `CalleeTrapped`. The `Result` can be handled by the caller contract or can be shown better on the UI side. `CalleeTrapped` means that something was wrong during execution.&#xD;&#xA;3. Returning the `Result` means that the code was executed predictable way. The language(ink! or ask!) encodes the `Result` into bytes and returns it back to the caller. If the result was an error, the code raises the `REVERT` flag at the end of the execution so the state will be reverted(That means that revert of state was initiated by the callee contract). On the caller side, the code decoded the bytes into `Result` and provided a descriptive error.&#xD;&#xA;&#xD;&#xA;   If `panic!` or `assert!` was called that ends the execution of the contract immediately. And it is `CalleeTrapped` on `contract-pallet` level. `contract-pallet` reverts the state because the contract failed. That error is returned to the caller.&#xD;&#xA;&#xD;&#xA;   More about it you can read in [the discussion](https://github.com/paritytech/ink/issues/641)." ContentLicense="CC BY-SA 4.0" />
  <row Id="8927" PostHistoryTypeId="2" PostId="2395" RevisionGUID="0ebd798f-3796-4149-8a15-02edfcfd0b60" CreationDate="2022-05-04T16:31:39.057" UserId="627" Text="For any `Codec` object (the base of any object returned in the API), there is an `.encodedLength` getter that returns the length. So assuming the extrinsic is signed, `tx.encodedLength` will have the information. &#xD;&#xA;&#xD;&#xA;(Unsigned transactions, since they are missing the signature, etc. info, would be shorter)" ContentLicense="CC BY-SA 4.0" />
  <row Id="8929" PostHistoryTypeId="5" PostId="2395" RevisionGUID="e7db300b-6493-4272-961d-5c1e336adc5c" CreationDate="2022-05-04T16:33:33.357" UserId="45" Comment="clarify that polkadot-js is meant" Text="In polkadot-js, for any `Codec` object (the base of any object returned in the API), there is an `.encodedLength` getter that returns the length. So assuming the extrinsic is signed, `tx.encodedLength` will have the information. &#xD;&#xA;&#xD;&#xA;(Unsigned transactions, since they are missing the signature, etc. info, would be shorter)" ContentLicense="CC BY-SA 4.0" />
  <row Id="8930" PostHistoryTypeId="52" PostId="2379" RevisionGUID="917332e0-aa88-44ce-abdb-5063f1854e35" CreationDate="2022-05-04T17:19:25.583" />
  <row Id="8931" PostHistoryTypeId="2" PostId="2396" RevisionGUID="8debedc2-4333-4d3c-880f-e1b5f01f771a" CreationDate="2022-05-04T17:24:00.937" UserId="74" Text="You can optionally expose RPC methods with your node and then call those using  `curl`.&#xD;&#xA;&#xD;&#xA;An example of this which is provided in the link below:&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;}' http://localhost:9933/&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Details about the RPC system are below. Ensure at the very least that you run your node with the `--rpc-external` command and take into account the commands you're calling as they might be unsafe, requiring an extra word in your command `--unsafe-rpc-external`.&#xD;&#xA;- https://docs.substrate.io/v3/runtime/custom-rpcs/#:~:text=Remote%20Procedure%20Calls%2C%20or%20RPCs,comes%20with%20several%20default%20RPCs%20.&#xD;&#xA;&#xD;&#xA;Then if you are forwarding your data through the proxy correctly, you should receive a response. Namely, you should forward data to the right port on your Substrate node (the port where RPC commands are received)." ContentLicense="CC BY-SA 4.0" />
  <row Id="8933" PostHistoryTypeId="2" PostId="2397" RevisionGUID="c1e0e53e-03b3-427d-9305-a7b0ec53c516" CreationDate="2022-05-04T17:27:08.800" UserId="74" Text="The empty block with a maximum block size of 1MB is not going to be 1MB in most cases (unless you have custom runtime logic which is adding data, which I doubt is the case).&#xD;&#xA;&#xD;&#xA;Therefore, the empty block is likely to be small in size, maybe something around a hundred or few hundred bytes.&#xD;&#xA;&#xD;&#xA;We are running a testnet and this is the data it print below. Most of our blocks are empty at the moment so hopefully this helps.&#xD;&#xA;&#xD;&#xA;[![Block size from PolkadotApps UI/ Explorer / Latency][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LGCo2.png&#xD;&#xA;&#xD;&#xA;You can find similar charts like this by going to the Apps UI and clicking on &quot;Explorer&quot; and then &quot;Latency&quot;. One of the diagrams should show the blocksize of the last X many blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="8935" PostHistoryTypeId="2" PostId="2398" RevisionGUID="1c7acf6a-4476-4b42-b083-da9b24c1fe85" CreationDate="2022-05-04T17:49:49.483" UserId="588" Text="I am trying to write a rust function that will call the transfer extrinsic function from pallet orml_xtokens. &#xD;&#xA;I am looking for help in translating the destination described in the image below.&#xD;&#xA;dest: XcmVersionedMultiLocation = V1&#xD;&#xA;   V1: XcmV1MultiLocation = &#xD;&#xA;       junction of &#xD;&#xA;         parents 1&#xD;&#xA;         interior X1&#xD;&#xA;             X1 Junction = AccountID &#xD;&#xA;                Network = Any&#xD;&#xA;                AccountID32 = an address &#xD;&#xA;         &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Ok54V.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="8937" PostHistoryTypeId="1" PostId="2398" RevisionGUID="1c7acf6a-4476-4b42-b083-da9b24c1fe85" CreationDate="2022-05-04T17:49:49.483" UserId="588" Text="Looking for help to express an xcm destination oftype VersionedMultiLocation" ContentLicense="CC BY-SA 4.0" />
  <row Id="8938" PostHistoryTypeId="3" PostId="2398" RevisionGUID="1c7acf6a-4476-4b42-b083-da9b24c1fe85" CreationDate="2022-05-04T17:49:49.483" UserId="588" Text="|xcm|transfer|orml-xtokens|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8939" PostHistoryTypeId="2" PostId="2399" RevisionGUID="25dfd6db-842e-4bf4-b73b-31400f5fb652" CreationDate="2022-05-04T19:38:30.153" UserId="716" Text="I am still learning TypeScript and I have some code that is working, but it returns a lot of messages about multiple versions of modules and conflicting packages.  What is the best way to fix these messages?  Also, based on my readings yarn supposedly automatically dedupes when you use `yarn add`, but that is not my experience based on these messages.  I know the package.json lists the dependencies and version numbers, but I don't know enough to know how to modify that file to fix this problem.  Any and all suggestions are appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;@polkadot/util has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 9.1.1       node_modules/@polkadot/api/node_modules/@polkadot/util/cjs&#xD;&#xA;        cjs 9.1.1       node_modules/@polkadot/types/node_modules/@polkadot/util/cjs&#xD;&#xA;@polkadot/util-crypto has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 9.1.1       node_modules/@polkadot/api/node_modules/@polkadot/util-crypto/cjs&#xD;&#xA;        cjs 9.1.1       node_modules/@polkadot/types/node_modules/@polkadot/util-crypto/cjs&#xD;&#xA;@polkadot/wasm-crypto has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 6.0.1       node_modules/@polkadot/api/node_modules/@polkadot/wasm-crypto/cjs&#xD;&#xA;        cjs 6.0.1       node_modules/@polkadot/types/node_modules/@polkadot/wasm-crypto/cjs&#xD;&#xA;@polkadot/wasm-crypto-wasm has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 6.0.1       node_modules/@polkadot/api/node_modules/@polkadot/wasm-crypto-wasm/cjs&#xD;&#xA;        cjs 6.0.1       node_modules/@polkadot/types/node_modules/@polkadot/wasm-crypto-wasm/cjs&#xD;&#xA;@polkadot/util has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 9.1.1       node_modules/@polkadot/api/node_modules/@polkadot/util/cjs&#xD;&#xA;        cjs 9.1.1       node_modules/@polkadot/types/node_modules/@polkadot/util/cjs&#xD;&#xA;        cjs 9.1.1       node_modules/@polkadot/types-known/node_modules/@polkadot/util/cjs&#xD;&#xA;@polkadot/types-create has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 8.3.1       node_modules/@polkadot/types/node_modules/@polkadot/types-create/cjs&#xD;&#xA;        cjs 8.3.1       node_modules/@polkadot/types-known/node_modules/@polkadot/types-create/cjs&#xD;&#xA;@polkadot/types-codec has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 8.3.1       node_modules/@polkadot/types/node_modules/@polkadot/types-codec/cjs&#xD;&#xA;        cjs 8.3.1       node_modules/@polkadot/types-known/node_modules/@polkadot/types-codec/cjs&#xD;&#xA;@polkadot/util has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 9.1.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/api/node_modules/@polkadot/util/cjs&#xD;&#xA;        cjs 9.1.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types/node_modules/@polkadot/util/cjs&#xD;&#xA;        cjs 9.1.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types-known/node_modules/@polkadot/util/cjs&#xD;&#xA;        cjs 8.7.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/util&#xD;&#xA;@polkadot/rpc-core has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 8.3.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/api/node_modules/@polkadot/rpc-core/cjs&#xD;&#xA;        cjs 7.15.1      /Users/rogerbos/subquery/pulse/node_modules/@polkadot/rpc-core&#xD;&#xA;@polkadot/types has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 8.3.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types/cjs&#xD;&#xA;        cjs 7.15.1      /Users/rogerbos/subquery/pulse/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types&#xD;&#xA;@polkadot/types-create has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 8.3.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types/node_modules/@polkadot/types-create/cjs&#xD;&#xA;        cjs 8.3.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types-known/node_modules/@polkadot/types-create/cjs&#xD;&#xA;        cjs 7.15.1      /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types-create&#xD;&#xA;@polkadot/types-codec has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 8.3.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types/node_modules/@polkadot/types-codec/cjs&#xD;&#xA;        cjs 8.3.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types-known/node_modules/@polkadot/types-codec/cjs&#xD;&#xA;        cjs 7.15.1      /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types-codec&#xD;&#xA;@polkadot/util-crypto has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 9.1.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/api/node_modules/@polkadot/util-crypto/cjs&#xD;&#xA;        cjs 9.1.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types/node_modules/@polkadot/util-crypto/cjs&#xD;&#xA;        cjs 8.7.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/util-crypto&#xD;&#xA;@polkadot/wasm-crypto has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 6.0.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/api/node_modules/@polkadot/wasm-crypto/cjs&#xD;&#xA;        cjs 6.0.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types/node_modules/@polkadot/wasm-crypto/cjs&#xD;&#xA;        cjs 5.1.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/wasm-crypto&#xD;&#xA;@polkadot/wasm-crypto-wasm has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 6.0.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/api/node_modules/@polkadot/wasm-crypto-wasm/cjs&#xD;&#xA;        cjs 6.0.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/types/node_modules/@polkadot/wasm-crypto-wasm/cjs&#xD;&#xA;        cjs 5.1.1       /Users/rogerbos/subquery/pulse/node_modules/@polkadot/wasm-crypto-wasm&#xD;&#xA;karura&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="8941" PostHistoryTypeId="1" PostId="2399" RevisionGUID="25dfd6db-842e-4bf4-b73b-31400f5fb652" CreationDate="2022-05-04T19:38:30.153" UserId="716" Text="How to prevent / remove duplicate modules and mismatched version numbers (i.e. @polkdadot/types)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8942" PostHistoryTypeId="3" PostId="2399" RevisionGUID="25dfd6db-842e-4bf4-b73b-31400f5fb652" CreationDate="2022-05-04T19:38:30.153" UserId="716" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8943" PostHistoryTypeId="2" PostId="2400" RevisionGUID="9e1af615-0633-4900-a7a2-abfbfe8a0af7" CreationDate="2022-05-04T23:43:02.727" UserId="2489" Text="I am currently working on trying to add a token to Karura. In order to ensure I am doing it correctly I need to run Karura and my chain on a local relay chain. To do this I am using following the instructions in the Acala README for [parachain-launch][1]. I am doing this off the [latest master][2]. The only change I have made is updating the [launch config][3] to only use two validators and one collator. When following the instructions I end up the Karura chain not producing blocks. I see that is correctly registered to the local relay chain both in the relay chain's UI and the logs for the Karura node. Unfortunately the Karura node keeps attempting to build blocks but it always seems to fail. See below for logs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Collator Logs Start&#xD;&#xA;&#xD;&#xA;```2022-05-04 23:33:47.723  INFO main sc_cli: Acala Node&#xD;&#xA;2022-05-04 23:33:47.728  INFO main sc_cli: ✌️  version 2.5.0-2.5.0-x86_64-linux-gnu&#xD;&#xA;2022-05-04 23:33:47.728  INFO main sc_cli: ❤️  by Acala Developers, 2019-2022&#xD;&#xA;2022-05-04 23:33:47.728  INFO main sc_cli:  Chain specification: Acala Karura Dev&#xD;&#xA;2022-05-04 23:33:47.728  INFO main sc_cli: ️  Node name: parachain-2000-0&#xD;&#xA;2022-05-04 23:33:47.729  INFO main sc_cli:  Role: AUTHORITY&#xD;&#xA;2022-05-04 23:33:47.729  INFO main sc_cli:  Database: RocksDb at /acala/data/chains/karura-dev/db/full&#xD;&#xA;2022-05-04 23:33:47.729  INFO main sc_cli: ⛓️  Native runtime: karura-2050 (karura-0.tx1.au1)&#xD;&#xA;2022-05-04 23:33:47.808  INFO main acala_cli::command: Parachain id: Id(2000)&#xD;&#xA;2022-05-04 23:33:47.809  INFO main acala_cli::command: Is collating: yes&#xD;&#xA;2022-05-04 23:34:30.443  INFO main sc_service::client::client: [Parachain]  Initializing Genesis block/state (state: 0x3d44…df34, header-hash: 0x8e83…f947)&#xD;&#xA;2022-05-04 23:35:10.662  INFO main sc_service::client::client: [Relaychain]  Initializing Genesis block/state (state: 0x24c2…a60d, header-hash: 0x4736…c070)&#xD;&#xA;2022-05-04 23:35:10.719  INFO main afg: [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.&#xD;&#xA;2022-05-04 23:35:20.855  INFO main babe: [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.&#xD;&#xA;2022-05-04 23:35:20.871  INFO main sub-libp2p: [Relaychain] ️  Local node identity is: 12D3KooWK1NUo4T9a8VwnjCG1ZwsHRJepNs9gkrzXtKDXs3Qukrn&#xD;&#xA;2022-05-04 23:35:21.056  INFO main sc_service::builder: [Relaychain]  Highest known block at #0&#xD;&#xA;2022-05-04 23:35:21.066  INFO tokio-runtime-worker substrate_prometheus_endpoint: [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616&#xD;&#xA;2022-05-04 23:35:21.105  INFO                 main parity_ws: [Relaychain] Listening for new connections on 127.0.0.1:9945.&#xD;&#xA;2022-05-04 23:35:21.216  WARN                 main sc_service::config: [Parachain] Using default protocol ID &quot;sup&quot; because none is configured in the chain specs&#xD;&#xA;2022-05-04 23:35:21.233  INFO                 main sub-libp2p: [Parachain] ️  Local node identity is: 12D3KooWKesAVJR1yFzYACPhF2F4QfUirGcdxqAerbVvKiv91QaW&#xD;&#xA;2022-05-04 23:35:21.618  INFO                 main sc_service::builder: [Parachain]  Highest known block at #0&#xD;&#xA;2022-05-04 23:35:21.624  INFO tokio-runtime-worker substrate_prometheus_endpoint: [Parachain] 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;2022-05-04 23:35:21.686  INFO                 main parity_ws: [Parachain] Listening for new connections on 0.0.0.0:9944.&#xD;&#xA;2022-05-04 23:35:24.096 DEBUG tokio-runtime-worker cumulus-consensus: [Parachain] Skipping set new best block, because block is already the best. block_hash=0x8e83e7653b902aefbc21b0694d07e2a19307a5990068b26c73af58887f63f947&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Collator attempted block production&#xD;&#xA;```&#xD;&#xA;2022-05-04 23:36:12.076 DEBUG tokio-runtime-worker cumulus-consensus: [Parachain] Skipping set new best block, because block is already the best. block_hash=0x8e83e7653b902aefbc21b0694d07e2a19307a5990068b26c73af58887f63f947&#xD;&#xA;2022-05-04 23:36:12.083 TRACE tokio-runtime-worker cumulus-collator: [Parachain] Producing candidate relay_parent=0x6e83886256679d86001d616ca794d15b0c4d546133624413bf0e9d9580a63627&#xD;&#xA;2022-05-04 23:36:12.083  INFO tokio-runtime-worker cumulus-collator: [Parachain] Starting collation. relay_parent=0x6e83886256679d86001d616ca794d15b0c4d546133624413bf0e9d9580a63627 at=0x8e83e7653b902aefbc21b0694d07e2a19307a5990068b26c73af58887f63f947&#xD;&#xA;2022-05-04 23:36:12.152 DEBUG tokio-runtime-worker aura: [Parachain] Starting authorship at slot 137642281; timestamp = 1651707372084&#xD;&#xA;2022-05-04 23:36:12.152  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x8e83e7653b902aefbc21b0694d07e2a19307a5990068b26c73af58887f63f947&#xD;&#xA;2022-05-04 23:36:12.419 DEBUG tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] Attempting to push transactions from the pool.&#xD;&#xA;2022-05-04 23:36:12.419 DEBUG tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] Pool status: PoolStatus { ready: 0, ready_bytes: 0, future: 0, future_bytes: 0 }&#xD;&#xA;2022-05-04 23:36:12.509  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1 (89 ms) [hash: 0x1a5af63eb88df3727df391be8306ada1d2e97d0cb20e983c85aca7019b80edcc; parent_hash: 0x8e83…f947; extrinsics (2): [0xe0eb…6719, 0x6eab…96d4]]&#xD;&#xA;2022-05-04 23:36:12.516  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 1. Hash now 0x205101cb85700eb10f63873a801f471baca0afeb1a45991928efd57da510c472, previously 0x1a5af63eb88df3727df391be8306ada1d2e97d0cb20e983c85aca7019b80edcc.&#xD;&#xA;2022-05-04 23:36:12.518  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0x2051…c472)&#xD;&#xA;2022-05-04 23:36:12.519  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.27734375kb, storage_proof: 3.21484375kb }&#xD;&#xA;2022-05-04 23:36:12.521  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 4.8154296875kb&#xD;&#xA;2022-05-04 23:36:12.607  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x205101cb85700eb10f63873a801f471baca0afeb1a45991928efd57da510c472&#xD;&#xA;2022-05-04 23:36:16.162  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (2 peers), best: #15 (0x6e83…3627), finalized #12 (0xb990…4b21), ⬇️ 0.7kiB/s ⬆️ 1.5kiB/s&#xD;&#xA;2022-05-04 23:36:16.751  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x8e83…f947), finalized #0 (0x8e83…f947), ⬇️ 0 ⬆️ 0&#xD;&#xA;2022-05-04 23:36:18.065  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #16 (0xb8c5…122f)&#xD;&#xA;2022-05-04 23:36:18.066 DEBUG tokio-runtime-worker cumulus-consensus: [Parachain] Skipping set new best block, because block is already the best. block_hash=0x8e83e7653b902aefbc21b0694d07e2a19307a5990068b26c73af58887f63f947&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/open-web3-stack/parachain-launch&#xD;&#xA;  [2]: https://github.com/AcalaNetwork/Acala/commit/200e6531aa2a01516890fc37b984198dc6015dd0&#xD;&#xA;  [3]: https://github.com/AcalaNetwork/Acala/blob/master/launch/config.yml" ContentLicense="CC BY-SA 4.0" />
  <row Id="8945" PostHistoryTypeId="1" PostId="2400" RevisionGUID="9e1af615-0633-4900-a7a2-abfbfe8a0af7" CreationDate="2022-05-04T23:43:02.727" UserId="2489" Text="Acala local testnet with parachain-launch not producing blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="8946" PostHistoryTypeId="3" PostId="2400" RevisionGUID="9e1af615-0633-4900-a7a2-abfbfe8a0af7" CreationDate="2022-05-04T23:43:02.727" UserId="2489" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8947" PostHistoryTypeId="2" PostId="2401" RevisionGUID="72c7d478-65e7-448f-b6d7-c97b4b0411ed" CreationDate="2022-05-05T00:21:15.553" UserId="710" Text="I'm looking in the Developers&gt;Storage&gt;hrmp tab but I can't find the option to check the current minimum to create an HRMP channel. Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8949" PostHistoryTypeId="1" PostId="2401" RevisionGUID="72c7d478-65e7-448f-b6d7-c97b4b0411ed" CreationDate="2022-05-05T00:21:15.553" UserId="710" Text="How can I query the deposit in DOT to create an HRMP channel?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8950" PostHistoryTypeId="3" PostId="2401" RevisionGUID="72c7d478-65e7-448f-b6d7-c97b4b0411ed" CreationDate="2022-05-05T00:21:15.553" UserId="710" Text="|xcm|xcmp|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8951" PostHistoryTypeId="2" PostId="2402" RevisionGUID="e13bf1cb-cdaa-48c0-9c93-2e4fe8e95760" CreationDate="2022-05-05T00:44:44.543" UserId="104" Text="You actually need to go to &quot;Developer&quot; &gt; &quot;Chain State&quot; to check for the HRMP deposit. The function to call is `activeConfig()` under the `configuration` pallet. You'll see the `hrmpSenderDeposit` and the `hrmpRecipientDeposit` there, all in plancks:&#xD;&#xA;&#xD;&#xA;[![Picture of the chain state tab on Polkadot.js][1]][1]&#xD;&#xA;&#xD;&#xA;Do note that there is an [ongoing referendum][2] now to lower the deposit substantially.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SAyq8.png&#xD;&#xA;  [2]: https://polkadot.polkassembly.io/referendum/61" ContentLicense="CC BY-SA 4.0" />
  <row Id="8955" PostHistoryTypeId="2" PostId="2404" RevisionGUID="b036277b-25ca-40e7-915a-46e90cd7aad2" CreationDate="2022-05-05T06:06:31.267" UserId="2132" Text="The message does suggest `npm dedupe` or `yarn dedupe`. In my experience the package managers don't apply it consistently, especially when upgrading.&#xD;&#xA;&#xD;&#xA;There does seem to be an issue with your deps however, some seem to require 9.1.1 and other 8.7.1 of the util dependencies.&#xD;&#xA;&#xD;&#xA;In the worst-case, when using yarn, you can always resort to `resolutions`, but that would assume that you really have the latest of all required. (Which as per the point above doesn't seem to be the case here)" ContentLicense="CC BY-SA 4.0" />
  <row Id="8957" PostHistoryTypeId="2" PostId="2405" RevisionGUID="2506f2c9-7c6f-4b60-aeb9-337fb56a6f2e" CreationDate="2022-05-05T06:12:08.833" UserId="2132" Text="The `do_*` functions are generally re-used in some pallets from inside the extrinsics. So it is sharable logic." ContentLicense="CC BY-SA 4.0" />
  <row Id="8960" PostHistoryTypeId="2" PostId="2406" RevisionGUID="6c857cc8-f0ed-423b-870b-30c9a1665993" CreationDate="2022-05-05T06:15:46.350" UserId="2132" Text="The `toHuman()` output is not configurable. Bear in mind that this is a convenience function, not really meant to be used for anything but simple inspection." ContentLicense="CC BY-SA 4.0" />
  <row Id="8965" PostHistoryTypeId="2" PostId="2408" RevisionGUID="882de2d8-385f-4b0c-91c6-163627c69c0f" CreationDate="2022-05-05T08:03:51.763" UserId="2481" Text="After calling the RPC method getblock. How can I get the confirmation time of this block in the genblock method?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8967" PostHistoryTypeId="1" PostId="2408" RevisionGUID="882de2d8-385f-4b0c-91c6-163627c69c0f" CreationDate="2022-05-05T08:03:51.763" UserId="2481" Text="How does RPC getblock get the confirmation time of the block" ContentLicense="CC BY-SA 4.0" />
  <row Id="8968" PostHistoryTypeId="3" PostId="2408" RevisionGUID="882de2d8-385f-4b0c-91c6-163627c69c0f" CreationDate="2022-05-05T08:03:51.763" UserId="2481" Text="|time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8970" PostHistoryTypeId="5" PostId="2390" RevisionGUID="3e0060ad-74ff-44f0-8e97-0e8ca50d99b5" CreationDate="2022-05-05T09:43:40.297" UserId="53" Comment="deleted 196 characters in body; edited title" Text="Could you please help me to understand how much space in a node does an empty block with no extrinsics/transactions take up?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8971" PostHistoryTypeId="4" PostId="2390" RevisionGUID="3e0060ad-74ff-44f0-8e97-0e8ca50d99b5" CreationDate="2022-05-05T09:43:40.297" UserId="53" Comment="deleted 196 characters in body; edited title" Text="What is an empty block's size?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8972" PostHistoryTypeId="2" PostId="2409" RevisionGUID="26f04f71-cf55-438b-9dcd-2260116311df" CreationDate="2022-05-05T09:45:00.180" UserId="1813" Text="How to calculate the code hash for `fn authorize_upgrade` of `cumulus_pallet_parachain_system`?&#xD;&#xA;&#xD;&#xA;As per crate `substrate-runtime-proposal-hash` been trying `BLAKE2B32(0x0103 | BLAKE2B32(wasm_bytes))` with no luck, i.e. `Error::Unauthorized`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="8974" PostHistoryTypeId="1" PostId="2409" RevisionGUID="26f04f71-cf55-438b-9dcd-2260116311df" CreationDate="2022-05-05T09:45:00.180" UserId="1813" Text="Calculating code hash for an authorize-enact style runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8975" PostHistoryTypeId="3" PostId="2409" RevisionGUID="26f04f71-cf55-438b-9dcd-2260116311df" CreationDate="2022-05-05T09:45:00.180" UserId="1813" Text="|runtime|upgrade|codehash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8976" PostHistoryTypeId="10" PostId="2262" RevisionGUID="3d69be0c-d06f-45dd-8a36-160efed17d4a" CreationDate="2022-05-05T09:50:12.060" UserId="-1" Comment="105" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:53,&quot;DisplayName&quot;:&quot;Gav&quot;}]}" />
  <row Id="8977" PostHistoryTypeId="2" PostId="2410" RevisionGUID="416a915e-b2b7-418a-9bf1-b706190bce72" CreationDate="2022-05-05T09:55:16.180" UserId="2355" Text="**Context**: &#xD;&#xA;&#xD;&#xA;i'm building a &quot;sub-treasury&quot; pallet, and for it, i'd like to start from the existing substrate's pallet_treasury.&#xD;&#xA;&#xD;&#xA;**Problem**:&#xD;&#xA;&#xD;&#xA;In Cargo.toml, there is relative paths (like `sp-io = {version=...... path=&quot;../../sp-io&quot;}`&#xD;&#xA;Obviously had to change it, but then in lib.rs, i had a loooooot of errors.&#xD;&#xA;&#xD;&#xA;**Question**:&#xD;&#xA;&#xD;&#xA;I'd like to know if there is a proper way to fork a pallet. Is there a specific branch to fork from ? A specific repo ? Is there a place where the procedure is documented ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8979" PostHistoryTypeId="1" PostId="2410" RevisionGUID="416a915e-b2b7-418a-9bf1-b706190bce72" CreationDate="2022-05-05T09:55:16.180" UserId="2355" Text="What is a best way to fork a substrate pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8980" PostHistoryTypeId="3" PostId="2410" RevisionGUID="416a915e-b2b7-418a-9bf1-b706190bce72" CreationDate="2022-05-05T09:55:16.180" UserId="2355" Text="|pallet|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8981" PostHistoryTypeId="2" PostId="2411" RevisionGUID="d5fa3e78-527b-49e0-b159-cb970703417f" CreationDate="2022-05-05T10:14:28.993" UserId="351" Text="Okey follow this steps&#xD;&#xA;1. in the src/cargo.toml include the pallet ( its repo and which version you want to use)&#xD;&#xA;&#xD;&#xA;2. Then include the pallet into workspace project/ cargo.toml -&gt; There is workspace vector , include the path to your pallet&#xD;&#xA;&#xD;&#xA;3. Then include it in the runtime/cargo.toml&#xD;&#xA;&#xD;&#xA;4. Then import it in the runtime/src -&gt; Then implement the neccessary trait require by the pallet. You can see example from balances pallet how its implemented in the runtime and Then Include it in the construct_runtime!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="8983" PostHistoryTypeId="2" PostId="2412" RevisionGUID="63fffdd2-ad52-4a89-a5c1-a711642c5345" CreationDate="2022-05-05T10:18:15.733" UserId="712" Text="So we can replicate this issue locally with a brand new mac m1. The docker-compose i use works 100% of the time when on Linux, but fails to produce blocks when running on mac (tested on two different machines) &#xD;&#xA;&#xD;&#xA;We suspect it is performance related due to running x86 image on m1. It does seem throttled in some way. It is known qemu x86 docker is slow.&#xD;&#xA;&#xD;&#xA;We could build arm docker images but it is almost always easier to ask people to use linux server for testing.&#xD;&#xA;&#xD;&#xA;A lot of devs use MBPs, but I suppose the official advice we can give is don't run networks with relay nodes if you're doing dApp development.&#xD;&#xA;&#xD;&#xA;People can always build it locally and run without issue, it is just docker simply don’t play nicely with m1 yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="8985" PostHistoryTypeId="5" PostId="2410" RevisionGUID="5018c9cc-fdd1-47dd-bf79-c8dd0418fa19" CreationDate="2022-05-05T10:57:35.753" UserId="2355" Comment="explaining what errors i ecnounters" Text="**Context**: &#xD;&#xA;&#xD;&#xA;i'm building a &quot;sub-treasury&quot; pallet, and for it, i'd like to start from the existing substrate's pallet_treasury.&#xD;&#xA;&#xD;&#xA;**Problem**:&#xD;&#xA;&#xD;&#xA;In Cargo.toml, there is relative paths (like `sp-io = {version=...... path=&quot;../../sp-io&quot;}`&#xD;&#xA;Obviously had to change it, but then in lib.rs, i had a loooooot of errors.&#xD;&#xA;&#xD;&#xA;those errors are mainly &quot;the trait frame_support::[something i can't `use`]::[the trait] is not implemented for [Proposal&lt;...&gt; or #[pallet::call]]&#xD;&#xA;&#xD;&#xA;**Question**:&#xD;&#xA;&#xD;&#xA;I'd like to know if there is a proper way to fork a pallet. Is there a specific branch to fork from ? A specific repo ? Is there a place where the procedure is documented ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8986" PostHistoryTypeId="5" PostId="2410" RevisionGUID="aa9a730f-dd3e-4839-bc4c-3220197584ab" CreationDate="2022-05-05T11:29:41.713" UserId="2355" Comment="added the first error" Text="**Context**: &#xD;&#xA;&#xD;&#xA;i'm building a &quot;sub-treasury&quot; pallet, and for it, i'd like to start from the existing substrate's pallet_treasury.&#xD;&#xA;&#xD;&#xA;**Problem**:&#xD;&#xA;&#xD;&#xA;In Cargo.toml, there is relative paths (like `sp-io = {version=...... path=&quot;../../sp-io&quot;}`&#xD;&#xA;Obviously had to change it, but then in lib.rs, i had a loooooot of errors.&#xD;&#xA;&#xD;&#xA;those errors are mainly &quot;the trait frame_support::[something i can't `use`]::[the trait] is not implemented for [Proposal&lt;...&gt; or #[pallet::call]]&#xD;&#xA;&#xD;&#xA;for example purpose, here is the first error given by cargo:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `pallet::Call&lt;T, I&gt;: frame_support::parity_scale_codec::WrapperTypeEncode` is not satisfied&#xD;&#xA;   --&gt; pallets/sub_treasury/src/lib.rs:296:12&#xD;&#xA;    |&#xD;&#xA;296 |     #[pallet::call]&#xD;&#xA;    |               ^^^^ the trait `frame_support::parity_scale_codec::WrapperTypeEncode` is not implemented for `pallet::Call&lt;T, I&gt;`&#xD;&#xA;    |&#xD;&#xA;...&#xD;&#xA;note: required by a bound in `frame_support::Callable::Call`&#xD;&#xA;   --&gt; /home/erudyx/.cargo/git/checkouts/substrate-7e08433d4c370a21/19162e4/frame/support/src/dispatch.rs:56:38&#xD;&#xA;    |&#xD;&#xA;56  |     type Call: UnfilteredDispatchable + Codec + Clone + PartialEq + Eq;&#xD;&#xA;    |                                         ^^^^^ required by this bound in `frame_support::Callable::Call`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Question**:&#xD;&#xA;&#xD;&#xA;I'd like to know if there is a proper way to fork a pallet. Is there a specific branch to fork from ? A specific repo ? Is there a place where the procedure is documented ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8987" PostHistoryTypeId="5" PostId="2132" RevisionGUID="beb184c1-1763-45ea-87c3-d9aaf1bc2304" CreationDate="2022-05-05T11:36:36.150" UserId="380" Comment="Added alternative solution" Text="I think this was because I was calling a mutable function from a non-mutable function using a read. I changed the definition of `external_function` to be non-mutating, ran `cargo clean` in the cross calling contract, redeployed, and then it started to work.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn external_function(&#xD;&#xA;            &amp;self, // mut is gone&#xD;&#xA;        ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;EDIT: This can also happen if your cached version of the contract from github is out of date. In this case, delete the cached version of the contract so that it is downloaded again.&#xD;&#xA;&#xD;&#xA;e.g. delete this `/usr/local/cargo/git/checkouts/THE-CONTRACT-9b59cb28149dd121/c56b619/contracts/lib.rs`" ContentLicense="CC BY-SA 4.0" />
  <row Id="8988" PostHistoryTypeId="2" PostId="2413" RevisionGUID="3f440d6a-1126-48c3-8aca-d2c5570ab289" CreationDate="2022-05-05T12:03:07.103" UserId="139" Text="I have a chain which has 131330 blocks as of this writing, 99% empty, and takes up 3.3 G of space. That calculates to about 0.0251275413 MB per block." ContentLicense="CC BY-SA 4.0" />
  <row Id="8990" PostHistoryTypeId="2" PostId="2414" RevisionGUID="9f2cd5f0-54dd-4684-ac1c-7631d853f4e8" CreationDate="2022-05-05T12:45:59.500" UserId="28" Text="I tested these steps and they work just fine:&#xD;&#xA;&#xD;&#xA;1. Copy the pallet folder you want to a new location. (I used my desktop)&#xD;&#xA;2. Navigate to the copied pallet folder.&#xD;&#xA;3. Modify `Cargo.toml` replacing `path = &quot;...&quot;` with `git = &quot;https://github.com/paritytech/substrate.git&quot;`&#xD;&#xA;    * You can use the regular expression `path = &quot;[\S]+&quot;` to match on the path string.&#xD;&#xA;4. Run `cargo build` in the folder.&#xD;&#xA;&#xD;&#xA;If you run into any compiler issues, make sure to update your rust compiler:&#xD;&#xA;&#xD;&#xA; * `rustup update`" ContentLicense="CC BY-SA 4.0" />
  <row Id="8992" PostHistoryTypeId="10" PostId="2271" RevisionGUID="01aa20e5-3c98-48f2-8f6c-2127e63dc05c" CreationDate="2022-05-05T12:50:09.263" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:627,&quot;DisplayName&quot;:&quot;Jaco&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="8993" PostHistoryTypeId="5" PostId="2049" RevisionGUID="445ae04d-fef2-47e7-ae82-61f18f0834b7" CreationDate="2022-05-05T12:53:13.123" UserId="28" Comment="added 43 characters in body; edited title" Text="What does `limitTeleportAssets` do?&#xD;&#xA;&#xD;&#xA;How is it different than `reserverTransferAssets`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8994" PostHistoryTypeId="4" PostId="2049" RevisionGUID="445ae04d-fef2-47e7-ae82-61f18f0834b7" CreationDate="2022-05-05T12:53:13.123" UserId="28" Comment="added 43 characters in body; edited title" Text="What is the difference between `limitTeleportAssets` and `reserverTransferAssets`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="8995" PostHistoryTypeId="2" PostId="2415" RevisionGUID="b3a7baaa-6916-4b87-ad92-3c0f936b445d" CreationDate="2022-05-05T12:58:49.637" UserId="183" Text="We had a runtime upgrade on kusama-parachain recently (9050 -&gt; 9060), where the parachain stalled for 20min. Eventually, it self healed, but I find it abnormal as I have never seen such a big delay in the past runtime upgrades.&#xD;&#xA;&#xD;&#xA;Therefore I want to post it here to see if we potentially did something wrong and/or other people have had similar situations.&#xD;&#xA;&#xD;&#xA;I understand there's a 600 blocks upgrade delay on Kusama (which is ~1hr), but:&#xD;&#xA;- here's [the block][1] where `ValidationFunctionStored` was emitted&#xD;&#xA;- here's [the block][2] where `ValidationFunctionApplied` was emitted&#xD;&#xA;&#xD;&#xA;It's 1hr25min in between, which is obviously more than 600 Kusama blocks.&#xD;&#xA;&#xD;&#xA;From collator logs it just keeps importing the next block and managed to prepare it within 10ms, but it couldn't get it produced somehow (maybe blocked by relaychain verification?) The PoV that contains the new wasm is just 1,5MB.&#xD;&#xA;&#xD;&#xA;For the full logs please check [here][3].&#xD;&#xA;&#xD;&#xA;We had a very similar issue on rococo-parachain not long ago, but we never understood the root cause. The problem disappeared after the hard rococo restart, see https://github.com/litentry/litentry-parachain/issues/544&#xD;&#xA;&#xD;&#xA;Some extra information about our setup:&#xD;&#xA;- the new runtime was built with `polkadot-v0.9.19` branch, with srtools&#xD;&#xA;- our collators are all located in Singapore right now, is this related?&#xD;&#xA;- we have 4core CPU and 16G for collator hardware, I hope that's enough..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://litmus.subscan.io/block/273331?tab=event&#xD;&#xA;  [2]: https://litmus.subscan.io/block/273405?tab=event&#xD;&#xA;  [3]: https://github.com/litentry/litentry-parachain/issues/546#issuecomment-1118514438" ContentLicense="CC BY-SA 4.0" />
  <row Id="8997" PostHistoryTypeId="1" PostId="2415" RevisionGUID="b3a7baaa-6916-4b87-ad92-3c0f936b445d" CreationDate="2022-05-05T12:58:49.637" UserId="183" Text="Abnormal large delays between wasm-code gets stored and applied" ContentLicense="CC BY-SA 4.0" />
  <row Id="8998" PostHistoryTypeId="3" PostId="2415" RevisionGUID="b3a7baaa-6916-4b87-ad92-3c0f936b445d" CreationDate="2022-05-05T12:58:49.637" UserId="183" Text="|parachain|kusama|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="8999" PostHistoryTypeId="2" PostId="2416" RevisionGUID="f5018ee5-ca5a-4c84-9482-87ae751715f8" CreationDate="2022-05-05T13:15:06.283" UserId="205" Text="I'm looking for a how-to-guide, or a running example that implements `parity-db` instead of `rockdb` as an on-chain database." ContentLicense="CC BY-SA 4.0" />
  <row Id="9001" PostHistoryTypeId="1" PostId="2416" RevisionGUID="f5018ee5-ca5a-4c84-9482-87ae751715f8" CreationDate="2022-05-05T13:15:06.283" UserId="205" Text="What are the steps to replace rockdb with parity-db for the substrate-node-template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9002" PostHistoryTypeId="3" PostId="2416" RevisionGUID="f5018ee5-ca5a-4c84-9482-87ae751715f8" CreationDate="2022-05-05T13:15:06.283" UserId="205" Text="|database|rockdb|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9003" PostHistoryTypeId="2" PostId="2417" RevisionGUID="f1900295-9d2e-4f1b-a34a-db40ac98c512" CreationDate="2022-05-05T13:17:52.257" UserId="73" Text="You only need to run the node with `--database paritydb` and that's it." ContentLicense="CC BY-SA 4.0" />
  <row Id="9005" PostHistoryTypeId="5" PostId="2414" RevisionGUID="7731fb84-3940-40be-a30e-7a0d97c2fc02" CreationDate="2022-05-05T13:47:30.760" UserId="28" Comment="added 334 characters in body" Text="I tested these steps and they work just fine:&#xD;&#xA;&#xD;&#xA;1. Copy the pallet folder you want to a new location. (I used my desktop)&#xD;&#xA;2. Navigate to the copied pallet folder.&#xD;&#xA;3. Modify `Cargo.toml` replacing `path = &quot;...&quot;` with `git = &quot;https://github.com/paritytech/substrate.git&quot;`&#xD;&#xA;    * You can use the regular expression `path = &quot;[\S]+&quot;` to match on the path string.&#xD;&#xA;4. Run `cargo build` in the folder.&#xD;&#xA;&#xD;&#xA;If you run into any compiler issues, make sure to update your rust compiler:&#xD;&#xA;&#xD;&#xA; * `rustup update`&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;As noted by the author, it is critical if you are building a forked crate in a larger Substrate project, that all versions / references to Substrate must be the same. You can quickly run into compiler errors if you have one crate which depends on one version of Substrate, and another crate depend on a different version." ContentLicense="CC BY-SA 4.0" />
  <row Id="9006" PostHistoryTypeId="5" PostId="2416" RevisionGUID="1f2f5f13-5725-47bc-b253-69fa01c5bcf4" CreationDate="2022-05-05T13:55:51.943" UserId="205" Comment="deleted 1 character in body; edited title" Text="I'm looking for a how-to-guide, or an example that runs the `substrate-node-template` using `parity-db` instead of `rockdb`." ContentLicense="CC BY-SA 4.0" />
  <row Id="9007" PostHistoryTypeId="4" PostId="2416" RevisionGUID="1f2f5f13-5725-47bc-b253-69fa01c5bcf4" CreationDate="2022-05-05T13:55:51.943" UserId="205" Comment="deleted 1 character in body; edited title" Text="What are the steps to run the substrate-node-template with parity-db instead of rockdb?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9008" PostHistoryTypeId="4" PostId="2416" RevisionGUID="3197e434-964a-45f8-beaa-3ce77ac4a624" CreationDate="2022-05-05T15:11:56.157" UserId="205" Comment="edited title" Text="How to to run the substrate-node-template with parity-db instead of rockdb?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9014" PostHistoryTypeId="5" PostId="2415" RevisionGUID="7f33d05b-26ba-42b6-be96-e728e7ef96d0" CreationDate="2022-05-05T16:56:45.653" UserId="183" Comment="added 207 characters in body" Text="We had a runtime upgrade on kusama-parachain recently (9050 -&gt; 9060), where the parachain stalled for 20min. Eventually, it self healed, but I find it abnormal as I have never seen such a big delay in the past runtime upgrades.&#xD;&#xA;&#xD;&#xA;Therefore I want to post it here to see if we potentially did something wrong and/or other people have had similar situations.&#xD;&#xA;&#xD;&#xA;I understand there's a 600 blocks upgrade delay on Kusama (which is ~1hr), but:&#xD;&#xA;- here's [the block][1] where `ValidationFunctionStored` was emitted&#xD;&#xA;- here's [the block][2] where `ValidationFunctionApplied` was emitted&#xD;&#xA;&#xD;&#xA;It's 1hr25min in between, which is obviously more than 600 Kusama blocks.&#xD;&#xA;&#xD;&#xA;Here's a screenshot of kusama parachain panel. I believe the &quot;+10 mins&quot; sign shows the upgrade went beyond scheduled blocks.&#xD;&#xA;&#xD;&#xA;[![screenshot on litmus][3]][3]&#xD;&#xA;&#xD;&#xA;From collator logs it just keeps importing the next block and managed to prepare it within 10ms, but it couldn't get it produced somehow (maybe blocked by relaychain verification?) The PoV that contains the new wasm is just 1,5MB.&#xD;&#xA;&#xD;&#xA;For the full logs please check [here][4].&#xD;&#xA;&#xD;&#xA;We had a very similar issue on rococo-parachain not long ago, but we never understood the root cause. The problem disappeared after the hard rococo restart, see https://github.com/litentry/litentry-parachain/issues/544&#xD;&#xA;&#xD;&#xA;Some extra information about our setup:&#xD;&#xA;- the new runtime was built with `polkadot-v0.9.19` branch, with srtools&#xD;&#xA;- our collators are all located in Singapore right now, is this related?&#xD;&#xA;- we have 4core CPU and 16G for collator hardware, I hope that's enough..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://litmus.subscan.io/block/273331?tab=event&#xD;&#xA;  [2]: https://litmus.subscan.io/block/273405?tab=event&#xD;&#xA;  [3]: https://i.stack.imgur.com/FOXsG.png&#xD;&#xA;  [4]: https://github.com/litentry/litentry-parachain/issues/546#issuecomment-1118514438" ContentLicense="CC BY-SA 4.0" />
  <row Id="9015" PostHistoryTypeId="5" PostId="1541" RevisionGUID="d939d706-e754-4971-9cbb-b6916ef38b5e" CreationDate="2022-05-05T17:11:26.990" UserId="499" Comment="deleted 60 characters in body" Text="We've had a test network running for about 3.5 months with regularly-rotating sets of Aura / Grandpa Validators.&#xD;&#xA;&#xD;&#xA;Suddenly, we have run into an issue whereby the vast majority (~2/3) of the network has crashed due to an error in the node software which references equivocation:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-04-03 01:57:10 ⛓  Native runtime: chainflip-node-111 (chainflip-node-1.tx1.au1)&#xD;&#xA;2022-04-03 01:57:10 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs&#xD;&#xA;2022-04-03 01:57:10  Local node identity is: 12D3KooWQbTk1xVSvp8YM3p8uoJrjSa3LKL2UBt11Excd1i11spW&#xD;&#xA;2022-04-03 01:57:10  Highest known block at #1502697&#xD;&#xA;2022-04-03 01:57:10 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;2022-04-03 01:57:10 Listening for new connections on 127.0.0.1:9944.&#xD;&#xA;2022-04-03 01:57:10 Detected precommit equivocation in the finality worker: Equivocation { round_number: 16286, identity: Public(72198707e967f3eafcc44437c15feaacfee9c29059958559ae85fdf7a2b5a854 (5EeJu7Mc...)), first: (Precommit { target_hash: 0xdebdc23f58d523fc1030ed688ed08aaf252dc71b298b024ba254e39c1713c9fd, target_number: 1502695 }, Signature(718a0d6598ae2467fd8b14cdf45862de76cb312b451653573bc8878cd617a99fe87ee3acb20391aa1aaae95b3ca5c22064e33b68e1ddf33e5732e2aa2cc7f905)), second: (Precommit { target_hash: 0x455b67971ddd25a36f132d1b8cf283147f9250c4c0aaf657b538142bf08cc88b, target_number: 1502694 }, Signature(9e9fa86949ccd8e0b909c0e573f494ce2fd3e1794c1d3adacb426d9393ced247b51e9686f455676ecaf6cfd4f58759cf7366f193f8e1d0579268f033aa17eb00)) }&#xD;&#xA;2022-04-03 01:57:11 GRANDPA voter error: Client(BadJustification(&quot;invalid precommits for target commit&quot;))&#xD;&#xA;2022-04-03 01:57:11 Essential task `grandpa-voter` failed. Shutting down service.&#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I understand that this might happen if 1/3 of the Authority Set had misconfigured Validators sending duplicate Grandpa votes. I find that hard to believe but I'm willing to investigate further if this is the most likely cause. &#xD;&#xA;&#xD;&#xA;I have a few more questions though:&#xD;&#xA;&#xD;&#xA;- What is the Public identity which is reported in this log message? I can't find it in any of our logs, which would indicate that it is not a public identifier that we're ever referencing (ie, it doesn't show up in the Polkajs interface). Is it referring to a particular Session key? How would I find the Aura ID of this identifier such that I can ask for the logs from this machine?&#xD;&#xA;- Does Aura have different equivocation conditions to Babe?&#xD;&#xA;- How can we recover from this scenario? We're currently attempting to re-sync our nodes from one of the Validators which is still online, is this the correct approach? Finality is stalled but it looks like block production is still ongoing." ContentLicense="CC BY-SA 4.0" />
  <row Id="9016" PostHistoryTypeId="52" PostId="2410" RevisionGUID="7b68ad11-14f8-4380-a171-f744335ac628" CreationDate="2022-05-05T17:59:13.267" />
  <row Id="9017" PostHistoryTypeId="2" PostId="2419" RevisionGUID="3c89d4ed-bdea-4326-ad8c-da98c0928a9c" CreationDate="2022-05-05T19:17:54.513" UserId="85" Text="I would like to associate paraIds with particular parachains as is done in [polkadot-js parachains tab][1]. I notice that they [hardcode all the paraIds][2]. I can get a list of parachain ids from the relay chain but all I can find is linkage to accounts ( `slots / leases` ). I can see that if I query each individual parachain and ask it for `parachaininfo / parachainId()` they will tell me their paraIds but I am wondering if there's a slicker solution? Or is the decentralised nature such that querying the parachains individually is the best option?&#xD;&#xA;&#xD;&#xA;(I tag this as xcmp as when you see an xcmp message going to 2012 you need to understand which chain is paraId 2012 for it to make sense.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.api.onfinality.io%2Fpublic-ws#/parachains&#xD;&#xA;  [2]: https://github.com/polkadot-js/apps/pull/7325/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="9019" PostHistoryTypeId="1" PostId="2419" RevisionGUID="3c89d4ed-bdea-4326-ad8c-da98c0928a9c" CreationDate="2022-05-05T19:17:54.513" UserId="85" Text="paraId to chain name mappings?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9020" PostHistoryTypeId="3" PostId="2419" RevisionGUID="3c89d4ed-bdea-4326-ad8c-da98c0928a9c" CreationDate="2022-05-05T19:17:54.513" UserId="85" Text="|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9022" PostHistoryTypeId="2" PostId="2420" RevisionGUID="04a9ecfe-32c8-48ef-b7d0-4bcb63e0b2cb" CreationDate="2022-05-05T20:18:55.927" UserId="2470" Text="I'm trying to get the associated KSM address for a generic address. I was wondering if there was a simple way to do this using polkadot-js library" ContentLicense="CC BY-SA 4.0" />
  <row Id="9024" PostHistoryTypeId="1" PostId="2420" RevisionGUID="04a9ecfe-32c8-48ef-b7d0-4bcb63e0b2cb" CreationDate="2022-05-05T20:18:55.927" UserId="2470" Text="Is there a simple way to get the KSM address associated with a generic address using polkadot-js library?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9025" PostHistoryTypeId="3" PostId="2420" RevisionGUID="04a9ecfe-32c8-48ef-b7d0-4bcb63e0b2cb" CreationDate="2022-05-05T20:18:55.927" UserId="2470" Text="|multiaddress|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9026" PostHistoryTypeId="2" PostId="2421" RevisionGUID="885988f7-5e9d-44ce-823a-1abf0d0ed8a7" CreationDate="2022-05-05T20:56:04.637" UserId="29" Text="These are not in Polkadot{.js} apps however they are simple to use:&#xD;&#xA;- https://polkadot.subscan.io/tools/ss58_transform&#xD;&#xA;- https://polkadot-address-convertor.netlify.app" ContentLicense="CC BY-SA 4.0" />
  <row Id="9028" PostHistoryTypeId="2" PostId="2422" RevisionGUID="277a15d7-e101-4093-bd02-4dad595cd8f1" CreationDate="2022-05-05T20:57:54.033" UserId="28" Text="```javascript&#xD;&#xA;const { encodeAddress } = polkadotUtilCrypto;&#xD;&#xA;let kusama_prefix = 2;&#xD;&#xA;let kusama_address = encodeAddress(generic_address, prefix);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;polkadotUtilCrypto.encodeAddress(&quot;5DksjtJER6oLDWkWKCWcL3f1swPWeNNFsS9zHxa2rPa7LsH9&quot;, 2)&#xD;&#xA;&#xD;&#xA;&gt; &quot;EGVQCe73TpFyAZx5uKfE1222XfkT3BSKozjgcqzLBnc5eYo&quot; &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9030" PostHistoryTypeId="2" PostId="2423" RevisionGUID="2ef6ab72-9afd-46fe-92c3-4f71c15c581f" CreationDate="2022-05-05T20:58:17.953" UserId="588" Text="I figured out how to express the above call:&#xD;&#xA;&#xD;&#xA;use crate::metadata::runtime_types::xcm::{&#xD;&#xA;    v1::junction::Junction,&#xD;&#xA;    v0::junction::NetworkId,&#xD;&#xA;    v1::multilocation::Junctions::X1,&#xD;&#xA;    v1::multilocation::MultiLocation as V1MultiLocation,&#xD;&#xA;    VersionedMultiLocation as VersionedMultiLocation,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;let dest : &amp;VersionedMultiLocation = &amp;VersionedMultiLocation::V1(&#xD;&#xA;                V1MultiLocation {&#xD;&#xA;                    parents: 1,&#xD;&#xA;                    interior: X1(&#xD;&#xA;                        Junction::AccountId32 {&#xD;&#xA;                            network: NetworkId::Any,&#xD;&#xA;                            id: dest_account.into(),&#xD;&#xA;                        }&#xD;&#xA;                    ),&#xD;&#xA;                }&#xD;&#xA;            ); " ContentLicense="CC BY-SA 4.0" />
  <row Id="9032" PostHistoryTypeId="5" PostId="2422" RevisionGUID="93f1be10-f568-45f7-991f-419fac8ec766" CreationDate="2022-05-05T21:19:06.447" UserId="28" Comment="added 7 characters in body" Text="```javascript&#xD;&#xA;const { encodeAddress } = polkadotUtilCrypto;&#xD;&#xA;let kusama_prefix = 2;&#xD;&#xA;let kusama_address = encodeAddress(generic_address, kusama_prefix);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;polkadotUtilCrypto.encodeAddress(&quot;5DksjtJER6oLDWkWKCWcL3f1swPWeNNFsS9zHxa2rPa7LsH9&quot;, 2)&#xD;&#xA;&#xD;&#xA;&gt; &quot;EGVQCe73TpFyAZx5uKfE1222XfkT3BSKozjgcqzLBnc5eYo&quot; &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9033" PostHistoryTypeId="2" PostId="2424" RevisionGUID="df38ed3a-5891-4334-8cd3-54f52fdf235c" CreationDate="2022-05-05T22:22:10.223" UserId="2494" Text="While following the installation tutorial available at: https://docs.substrate.io/v3/getting-started/installation/&#xD;&#xA;&#xD;&#xA;I ended up with cloning the node-template repository and running the build command as shown below which thrown an codegen error.&#xD;&#xA;&#xD;&#xA;I tried avoiding this error by providing the misconfigured flag in the release profile section of the Cargo.toml config without any luck. Any ideas?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹fbe735e*› % cargo build --release                     &#xD;&#xA;   Compiling libc v0.2.125&#xD;&#xA;   Compiling proc-macro2 v1.0.37&#xD;&#xA;   Compiling unicode-xid v0.2.3&#xD;&#xA;   Compiling syn v1.0.92&#xD;&#xA;   Compiling version_check v0.9.4&#xD;&#xA;   Compiling cfg-if v1.0.0&#xD;&#xA;   Compiling serde v1.0.137&#xD;&#xA;   Compiling serde_derive v1.0.137&#xD;&#xA;   Compiling autocfg v1.1.0&#xD;&#xA;   Compiling memchr v2.5.0&#xD;&#xA;error: incorrect value `...` for codegen option `split-debuginfo` - one of supported split-debuginfo modes (`off`, `packed`, or `unpacked`) was expected&#xD;&#xA;&#xD;&#xA;error: could not compile `unicode-xid` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: could not compile `version_check` due to previous error&#xD;&#xA;error: could not compile `cfg-if` due to previous error&#xD;&#xA;error: could not compile `autocfg` due to previous error&#xD;&#xA;error: could not compile `syn` due to previous error&#xD;&#xA;error: could not compile `serde_derive` due to previous error&#xD;&#xA;error: could not compile `libc` due to previous error&#xD;&#xA;error: could not compile `memchr` due to previous error&#xD;&#xA;error: could not compile `serde` due to previous error&#xD;&#xA;error: could not compile `proc-macro2` due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am trying to build this under osx with an m1 pro cpu and the following software packages:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % gcc -v                                  &#xD;&#xA;Apple clang version 13.1.6 (clang-1316.0.21.2.3)&#xD;&#xA;Target: arm64-apple-darwin21.4.0&#xD;&#xA;Thread model: posix&#xD;&#xA;InstalledDir: /Library/Developer/CommandLineTools/usr/bin&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % g++ -v                                       &#xD;&#xA;Apple clang version 13.1.6 (clang-1316.0.21.2.3)&#xD;&#xA;Target: arm64-apple-darwin21.4.0&#xD;&#xA;Thread model: posix&#xD;&#xA;InstalledDir: /Library/Developer/CommandLineTools/usr/bin&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % make -v                                      &#xD;&#xA;GNU Make 3.81&#xD;&#xA;Copyright (C) 2006  Free Software Foundation, Inc.&#xD;&#xA;This is free software; see the source for copying conditions.&#xD;&#xA;There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A&#xD;&#xA;PARTICULAR PURPOSE.&#xD;&#xA;This program built for i386-apple-darwin11.3.0&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % uname -a                                     &#xD;&#xA;Darwin Marco-Polo.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % rustup +nightly show                         &#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/lucio/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin (default)&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.62.0-nightly (4c60a0ea5 2022-05-04)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9035" PostHistoryTypeId="1" PostId="2424" RevisionGUID="df38ed3a-5891-4334-8cd3-54f52fdf235c" CreationDate="2022-05-05T22:22:10.223" UserId="2494" Text="Error when building the substrate node on mac M1: incorrect value `...` for codegen option `split-debuginfo" ContentLicense="CC BY-SA 4.0" />
  <row Id="9036" PostHistoryTypeId="3" PostId="2424" RevisionGUID="df38ed3a-5891-4334-8cd3-54f52fdf235c" CreationDate="2022-05-05T22:22:10.223" UserId="2494" Text="|substrate-node-template|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9037" PostHistoryTypeId="2" PostId="2425" RevisionGUID="93f79bad-f504-4d8c-9ea3-a96b23efa587" CreationDate="2022-05-06T04:02:57.030" UserId="16" Text="This error is emitted when the the **address** you specified is not callable. It has nothing to do with the messages defined within the contract. This usually means that either the address you specified is a tombstone or no contract at all (plain account).&#xD;&#xA;&#xD;&#xA;That said, `NotCallable` is only used in older versions of the contracts pallet. New versions use the `ContractNotFound` error for this as tombstones are no longer a thing there." ContentLicense="CC BY-SA 4.0" />
  <row Id="9039" PostHistoryTypeId="2" PostId="2426" RevisionGUID="93aed572-7fbe-4b59-9631-f8ecbf339747" CreationDate="2022-05-06T04:14:33.670" UserId="16" Text="The difference is whether you want to encode additional information for the caller in case of an error happening. In both cases all state is reverted.&#xD;&#xA;&#xD;&#xA;If you panic (no matter through which means you emit the panic) then no output is emitted. Pretty logical as there is no way to return anything in case of a panic. Please note that the panic message is written to the debug buffer in case of a debug-contract and can be read by an RPC client during a dry run.&#xD;&#xA;&#xD;&#xA;If you return a `Result::Err` from your message then all state is reverted but the the caller decode this `Result::Err` and act on it.&#xD;&#xA;&#xD;&#xA;It is important to understand panics between cross contract calls are caught by default. The panic of a callee is returned as an error (`CalleeTrapped`) to the caller and doesn't bubble up by default. So both errors are hand-able. Panics just don't convey any information to the caller about the reason for the error." ContentLicense="CC BY-SA 4.0" />
  <row Id="9041" PostHistoryTypeId="2" PostId="2427" RevisionGUID="edd09e60-f18b-4dc3-a8f2-0701727a7239" CreationDate="2022-05-06T04:21:18.137" UserId="16" Text="`ink_env::ecdsa_recover()` uses an [unstable interface][1] of the contracts pallet. Make sure to use the [substrate-contracts-node][2] which has unstable interfaces enabled by default.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/contracts#unstable-interfaces&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="9043" PostHistoryTypeId="6" PostId="2391" RevisionGUID="311dc528-1ce8-4da7-8b9b-8d628be9b6a8" CreationDate="2022-05-06T06:33:05.040" UserId="567" Comment="Added smart-contract tag" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9044" PostHistoryTypeId="24" PostId="2391" RevisionGUID="311dc528-1ce8-4da7-8b9b-8d628be9b6a8" CreationDate="2022-05-06T06:33:05.040" Comment="Proposed by 567 approved by 450 edit id of 190" ContentLicense="CC BY-SA 4.0" />
  <row Id="9045" PostHistoryTypeId="2" PostId="2428" RevisionGUID="4a8340ed-3fe5-48cb-9ecf-235127345fe7" CreationDate="2022-05-06T06:48:29.537" UserId="560" Text="I'm trying to use the environmental crate (link: https://docs.rs/environmental/1.1.3/src/environmental/lib.rs.html#64) to work with EVM and ethereum transactions. But it seems like adding either features=[&quot;std&quot;] or environmental/std does'nt work :/&#xD;&#xA;&#xD;&#xA;```yaml&#xD;&#xA;[dependencies]&#xD;&#xA;environmental = { version = &quot;1.1.3&quot;, features=[&quot;std&quot;] }&#xD;&#xA;```&#xD;&#xA;Link:&#xD;&#xA;https://github.com/edgeware-network/edgeware-node/blob/erup-5-latest/primitives/rpc/evm-tracing-events/Cargo.toml#L11&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;tracelog:&#xD;&#xA;```rust&#xD;&#xA;     Compiling evm-tracing-events v0.1.0 (/home/runner/work/edgeware-node/edgeware-node/primitives/rpc/evm-tracing-events)&#xD;&#xA;  error: cannot find macro `thread_local` in this scope&#xD;&#xA;    --&gt; /home/runner/work/edgeware-node/edgeware-node/primitives/rpc/evm-tracing-events/src/lib.rs:51:1&#xD;&#xA;     |&#xD;&#xA;  51 | environmental::environmental!(listener: dyn Listener + 'static);&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`&#xD;&#xA;     = note: this error originates in the macro `$crate::thread_local_impl` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0425]: cannot find value `GLOBAL` in this scope&#xD;&#xA;    --&gt; /home/runner/work/edgeware-node/edgeware-node/primitives/rpc/evm-tracing-events/src/lib.rs:51:1&#xD;&#xA;     |&#xD;&#xA;  51 | environmental::environmental!(listener: dyn Listener + 'static);&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0425`.&#xD;&#xA;  error: could not compile `evm-tracing-events` due to 3 previous errors&#xD;&#xA;  warning: build failed, waiting for other jobs to finish...&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;Error: Process completed with exit code 101.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It complains due to missing code parts that needs a feature flag to be added.&#xD;&#xA;&#xD;&#xA;Links:&#xD;&#xA;https://docs.rs/environmental/1.1.3/src/environmental/lib.rs.html#66&#xD;&#xA;https://github.com/edgeware-network/edgeware-node/runs/6208406289?check_suite_focus=true#step:8:1538&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Does anyone know how I can enable the std features?&#xD;&#xA;&#xD;&#xA;Code for pallet:&#xD;&#xA;https://docs.rs/environmental/1.1.3/src/environmental/lib.rs.html#64" ContentLicense="CC BY-SA 4.0" />
  <row Id="9047" PostHistoryTypeId="1" PostId="2428" RevisionGUID="4a8340ed-3fe5-48cb-9ecf-235127345fe7" CreationDate="2022-05-06T06:48:29.537" UserId="560" Text="Enabling the std feature on environmental crate" ContentLicense="CC BY-SA 4.0" />
  <row Id="9048" PostHistoryTypeId="3" PostId="2428" RevisionGUID="4a8340ed-3fe5-48cb-9ecf-235127345fe7" CreationDate="2022-05-06T06:48:29.537" UserId="560" Text="|evm|frontier|cargo|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9049" PostHistoryTypeId="2" PostId="2429" RevisionGUID="c6c87cba-d542-4abd-921e-a3efb035cb6a" CreationDate="2022-05-06T07:27:09.793" UserId="2481" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/B6uwp.png&#xD;&#xA;&#xD;&#xA;How can I pass the externalics ID in the picture. Get the details of the deal. Through RPC method." ContentLicense="CC BY-SA 4.0" />
  <row Id="9051" PostHistoryTypeId="1" PostId="2429" RevisionGUID="c6c87cba-d542-4abd-921e-a3efb035cb6a" CreationDate="2022-05-06T07:27:09.793" UserId="2481" Text="Which RPC can get the details of the transaction through the externalics ID?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9052" PostHistoryTypeId="3" PostId="2429" RevisionGUID="c6c87cba-d542-4abd-921e-a3efb035cb6a" CreationDate="2022-05-06T07:27:09.793" UserId="2481" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9053" PostHistoryTypeId="2" PostId="2430" RevisionGUID="57ffbd3c-fff7-4fb4-a936-be424c6edd34" CreationDate="2022-05-06T07:57:01.710" UserId="85" Text="I can get a parachain's name and a parachain's id from the RPC system calls, but how can I get it to hint at which relay chain it is connected to? (The genesis hash of the relay would do)" ContentLicense="CC BY-SA 4.0" />
  <row Id="9055" PostHistoryTypeId="1" PostId="2430" RevisionGUID="57ffbd3c-fff7-4fb4-a936-be424c6edd34" CreationDate="2022-05-06T07:57:01.710" UserId="85" Text="How can I ask a parachain which relay it is connected to?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9056" PostHistoryTypeId="3" PostId="2430" RevisionGUID="57ffbd3c-fff7-4fb4-a936-be424c6edd34" CreationDate="2022-05-06T07:57:01.710" UserId="85" Text="|untagged|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9057" PostHistoryTypeId="2" PostId="2431" RevisionGUID="9b144163-e48c-424b-a71d-c40cd43d8dc2" CreationDate="2022-05-06T08:21:30.730" UserId="380" Text="Set your **polkadot** resolutions to the same values as [polkadot apps](https://github.com/polkadot-js/apps/blob/master/package.json) and you should be good to go. This is what they're currently set to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  &quot;resolutions&quot;: {&#xD;&#xA;    &quot;@polkadot/api&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/api-augment&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/api-base&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/api-contract&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/api-derive&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/hw-ledger&quot;: &quot;^9.1.1&quot;,&#xD;&#xA;    &quot;@polkadot/keyring&quot;: &quot;^9.1.1&quot;,&#xD;&#xA;    &quot;@polkadot/networks&quot;: &quot;^9.1.1&quot;,&#xD;&#xA;    &quot;@polkadot/phishing&quot;: &quot;^0.12.1&quot;,&#xD;&#xA;    &quot;@polkadot/rpc-augment&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/rpc-core&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/rpc-provider&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/types&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/types-augment&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/types-codec&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/types-create&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/types-known&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/types-support&quot;: &quot;^8.3.1&quot;,&#xD;&#xA;    &quot;@polkadot/util&quot;: &quot;^9.1.1&quot;,&#xD;&#xA;    &quot;@polkadot/util-crypto&quot;: &quot;^9.1.1&quot;,&#xD;&#xA;    &quot;@polkadot/wasm-crypto&quot;: &quot;^6.0.1&quot;,&#xD;&#xA;    &quot;typescript&quot;: &quot;^4.6.4&quot;&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you still hit issues after this, try removing the hats (`^`) from the resolutions to force a specific version. The `^` indicates that you are willing to take further increments but not move to a new major version&#xD;&#xA;&#xD;&#xA;&gt; ^1.2.3 will match any 1.x.x release including 1.3.0, but will hold off on 2.0.0&#xD;&#xA;&#xD;&#xA;[Source](https://stackoverflow.com/questions/22565344/in-package-json-dependency-version#22565385)" ContentLicense="CC BY-SA 4.0" />
  <row Id="9063" PostHistoryTypeId="2" PostId="2433" RevisionGUID="956663a4-b57b-45e2-8e09-2e235988700d" CreationDate="2022-05-06T10:50:40.033" UserId="234" Text="I am running an application that relies heavily on Sidecar to get all the information from the node already decoded (as mentioned [here][1]). So, it is quite critical for me to know as fast as possible when there is a new release in Sidecar since a possible omission of an update might disrupt the functionalities of my application.&#xD;&#xA;Hence, I was wondering if there a way to automatically check / monitor whenever a new version of Sidecar is released.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/build-node-interaction#substrate-api-sidecar" ContentLicense="CC BY-SA 4.0" />
  <row Id="9065" PostHistoryTypeId="1" PostId="2433" RevisionGUID="956663a4-b57b-45e2-8e09-2e235988700d" CreationDate="2022-05-06T10:50:40.033" UserId="234" Text="Is there a way to automatically detect/monitor when new releases happen in Sidecar?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9066" PostHistoryTypeId="3" PostId="2433" RevisionGUID="956663a4-b57b-45e2-8e09-2e235988700d" CreationDate="2022-05-06T10:50:40.033" UserId="234" Text="|monitoring|versioning|sidecar|releases|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9067" PostHistoryTypeId="2" PostId="2434" RevisionGUID="d03a0849-b74f-43ec-a776-3d5f545a30ab" CreationDate="2022-05-06T11:23:09.660" UserId="515" Text="I want to get some 'trustful' on-chain data on the pallet, for example, get transaction data by transaction hash. I found Offchain Workers might do that job but does it really trustful because API can fail or incorrect data." ContentLicense="CC BY-SA 4.0" />
  <row Id="9069" PostHistoryTypeId="1" PostId="2434" RevisionGUID="d03a0849-b74f-43ec-a776-3d5f545a30ab" CreationDate="2022-05-06T11:23:09.660" UserId="515" Text="How to get on-chain data on pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9070" PostHistoryTypeId="3" PostId="2434" RevisionGUID="d03a0849-b74f-43ec-a776-3d5f545a30ab" CreationDate="2022-05-06T11:23:09.660" UserId="515" Text="|substrate-node|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9071" PostHistoryTypeId="2" PostId="2435" RevisionGUID="0ecaf0bf-ce1c-4c4a-b5d9-88a7419bb96a" CreationDate="2022-05-06T12:55:29.293" UserId="213" Text="I am writing runtime rpc with multiple parameters:&#xD;&#xA;&#xD;&#xA;    #[rpc]&#xD;&#xA;    pub trait ShivarthuApi&lt;BlockHash&gt; {&#xD;&#xA;    	#[rpc(name = &quot;shivarthu_challengerevidence&quot;)]&#xD;&#xA;    	fn get_challengers_evidence(&#xD;&#xA;    		&amp;self,&#xD;&#xA;    		at: Option&lt;BlockHash&gt;,&#xD;&#xA;    		profile_citizenid: u128,&#xD;&#xA;    		offset: u64,&#xD;&#xA;    		limit: u16,&#xD;&#xA;    	) -&gt; Result&lt;Vec&lt;Vec&lt;u8&gt;&gt;&gt;;&#xD;&#xA;    }&#xD;&#xA;It successfully compiled, but gives invalid params error when called through curl&#xD;&#xA;&#xD;&#xA;    curl http://localhost:9933 -H &quot;Content-Type:application/json;charset=utf-8&quot; -d   '{&#xD;&#xA;         &quot;jsonrpc&quot;:&quot;2.0&quot;,&#xD;&#xA;          &quot;id&quot;:1,&#xD;&#xA;          &quot;method&quot;:&quot;shivarthu_challengerevidence&quot;,&#xD;&#xA;          &quot;params&quot;: [0, 3, 5]&#xD;&#xA;        }'&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid type: number, expected a (both 0x-prefixed or not) hex string with length of 64.&quot;},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;rpc call with named parameters&#xD;&#xA;&#xD;&#xA;    curl http://localhost:9933 -H &quot;Content-Type:application/json;charset=utf-8&quot; -d   '{&#xD;&#xA;         &quot;jsonrpc&quot;:&quot;2.0&quot;,&#xD;&#xA;          &quot;id&quot;:1,&#xD;&#xA;          &quot;method&quot;:&quot;shivarthu_challengerevidence&quot;,&#xD;&#xA;          &quot;params&quot;: {&quot;profile_citizenid&quot; :0, &quot;offset&quot;: 2, &quot;limit&quot;:5}&#xD;&#xA;        }'&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid type: map, expected a tuple of size 4.&quot;},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9073" PostHistoryTypeId="1" PostId="2435" RevisionGUID="0ecaf0bf-ce1c-4c4a-b5d9-88a7419bb96a" CreationDate="2022-05-06T12:55:29.293" UserId="213" Text="Invalid params for rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="9074" PostHistoryTypeId="3" PostId="2435" RevisionGUID="0ecaf0bf-ce1c-4c4a-b5d9-88a7419bb96a" CreationDate="2022-05-06T12:55:29.293" UserId="213" Text="|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9075" PostHistoryTypeId="2" PostId="2436" RevisionGUID="4e3c1cb3-c041-4be9-a511-5288bd87a475" CreationDate="2022-05-06T13:16:32.893" UserId="474" Text="Here are some endpoints that might be useful:&#xD;&#xA;&#xD;&#xA;- [https://registry.npmjs.org/@substrate/api-sidecar](https://registry.npmjs.org/@substrate/api-sidecar) (gives back JSON that contains all of the versions of the package that have been published; could be pulled periodically to check for updates).&#xD;&#xA;- [https://api.github.com/repos/paritytech/substrate-api-sidecar/releases](https://api.github.com/repos/paritytech/substrate-api-sidecar/releases) (on github rather than npm, gives back JSON describing the releases of sidecar to date that it knows about).&#xD;&#xA;&#xD;&#xA;npm is probably the better source of truth, since if you can spot a new release there, it's actually ready to download. Potentially, there could be a slight gap between a release being mentioned on Github and it being available for download on npm.&#xD;&#xA;&#xD;&#xA;So, if you're interested in monitoring for new releases, you could write a small script that periodicall&#xD;&#xA;&#xD;&#xA;So if you are interested in monitoring, you could pull for example that npm endpoint and quite easily see whether a newer version has been released." ContentLicense="CC BY-SA 4.0" />
  <row Id="9077" PostHistoryTypeId="2" PostId="2437" RevisionGUID="330b5fcb-b254-4295-ba52-31547aa42871" CreationDate="2022-05-06T13:23:29.550" UserId="14" Text="Is there a need to really use RPC directly?&#xD;&#xA;If so, you can start by:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;chain_getBlockHash&quot;, &quot;params&quot;: [10463935]}' https://kusama-rpc.polkadot.io&#xD;&#xA;&gt;&gt;&gt;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x87bf173b7c6edfe811e5e584ce50c9a6056b62c7b87472d8ecb23ae9a706c5e5&quot;,&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;And then:&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;chain_getBlock&quot;, &quot;params&quot;: [&quot;0x87bf173b7c6edfe811e5e584ce50c9a6056b62c7b87472d8ecb23ae9a706c5e5&quot;]}' https://kusama-rpc.polkadot.io&#xD;&#xA;```&#xD;&#xA;Here you will get a bunch of data that you'll have to decode to get what you want.&#xD;&#xA;&#xD;&#xA;But you don't have to bother about that and just use `PolkadotJS` or `py-substrate-interface`, eg:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;def get_extrinsic_by_id(substrate, block_number, extrinsic_id):&#xD;&#xA;	result = substrate.get_block(block_number=block_number)&#xD;&#xA;	if result and len(result['extrinsics']) &gt; extrinsic_id:&#xD;&#xA;		return result['extrinsics'][extrinsic_id]&#xD;&#xA;	else:&#xD;&#xA;		print('Extrinsic ID: {extrinsic_id} not found.')&#xD;&#xA;&#xD;&#xA;substrate = SubstrateInterface(url=&quot;wss://kusama-rpc.polkadot.io&quot;)&#xD;&#xA;ext = get_extrinsic_by_id(substrate, block_number=10463935, extrinsic_id=2)&#xD;&#xA;&#xD;&#xA;ext:&#xD;&#xA;&#xD;&#xA;&lt;GenericExtrinsic(value={'extrinsic_hash': '0x624efb20b7aac1ba4666f9396f5b051443f8e809ab6cc8988c62b977b63bb388', 'extrinsic_length': 147, 'address': 'Cb2QccEAM38pjwmcHHTTuTukUobTHwhakKH4kBo4k8Vur8o', 'signature': {'Ed25519': '0x191a8c70f984732d9fbf7eb18f362a2c179ec8c687dfcda9ae0654390f6c605b259d8597bb3d21efa95c46e0e0970843ed2a238a85c0d64c8bca18efdc144100'}, 'era': (64, 59), 'nonce': 41569, 'tip': 0, 'call': {'call_index': '0x0400', 'call_function': 'transfer', 'call_module': 'Balances', 'call_args': [{'name': 'dest', 'type': 'LookupSource', 'value': 'EaXAkn5ZwmMdnQa8vQx5rU9YZN8XAsACTUTCssGX5XvC22b'}, {'name': 'value', 'type': 'Balance', 'value': 230100000000}], 'call_hash': '0xb58c1473c8556163167d1c4fad6d0811a40d56e50912468a8444e774c7f85d10'}})&gt;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9079" PostHistoryTypeId="10" PostId="2079" RevisionGUID="c8c12a0d-da98-4199-b269-e4a1e239e93b" CreationDate="2022-05-06T13:33:28.553" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:83,&quot;DisplayName&quot;:&quot;Luke Schoen&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;}]}" />
  <row Id="9080" PostHistoryTypeId="5" PostId="2436" RevisionGUID="d1e73aaf-445b-4939-9f60-8f8ef885e7f4" CreationDate="2022-05-06T13:48:32.260" UserId="474" Comment="deleted 108 characters in body" Text="Here are some endpoints that might be useful:&#xD;&#xA;&#xD;&#xA;- [https://registry.npmjs.org/@substrate/api-sidecar](https://registry.npmjs.org/@substrate/api-sidecar) (gives back JSON that contains all of the versions of the package that have been published; could be pulled periodically to check for updates).&#xD;&#xA;- [https://api.github.com/repos/paritytech/substrate-api-sidecar/releases](https://api.github.com/repos/paritytech/substrate-api-sidecar/releases) (on github rather than npm, gives back JSON describing the releases of sidecar to date that it knows about).&#xD;&#xA;&#xD;&#xA;npm is probably the better source of truth, since if you can spot a new release there, it's actually ready to download. Potentially, there could be a slight gap between a release being mentioned on Github and it being available for download on npm.&#xD;&#xA;&#xD;&#xA;So if you are interested in monitoring, you could pull for example that npm endpoint and quite easily see whether a newer version has been released." ContentLicense="CC BY-SA 4.0" />
  <row Id="9081" PostHistoryTypeId="2" PostId="2438" RevisionGUID="139f9c28-b551-47c6-8da1-6be68800cde8" CreationDate="2022-05-06T14:35:58.843" UserId="418" Text="Trying to benchmark an extrinsic, but I keep getting error:&#xD;&#xA;```&#xD;&#xA;./target/release/rmrk-substrate benchmark --pallet pallet-rmrk-core --extrinsic 'create_collection'&#xD;&#xA;Error: Input(&quot;InsufficientBalance&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here's the code:&#xD;&#xA;```&#xD;&#xA;benchmarks! {&#xD;&#xA;	create_collection {&#xD;&#xA;		let origin: T::AccountId = whitelisted_caller();&#xD;&#xA;        T::Currency::make_free_balance_be(&amp;origin, T::Currency::minimum_balance() * 20_000_000u32.into());&#xD;&#xA;	}: _(RawOrigin::Signed(origin), bvec![0u8; 20], Some(5), bvec![0u8; 15])&#xD;&#xA;	verify {&#xD;&#xA;	}&#xD;&#xA;	impl_benchmark_test_suite!(Template, crate::mock::ExtBuilder::default().build(whitelisted_caller()), crate::mock::Test);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've tried various manipulations of the `T::Currency::make_free_balance_be` line, without success.  The code compiles successfully with `cargo build --release --features runtime-benchmarks`, but still fails on this extrinsic.&#xD;&#xA;&#xD;&#xA;This is my first attempt at benchmarking.  Likely something simple." ContentLicense="CC BY-SA 4.0" />
  <row Id="9083" PostHistoryTypeId="1" PostId="2438" RevisionGUID="139f9c28-b551-47c6-8da1-6be68800cde8" CreationDate="2022-05-06T14:35:58.843" UserId="418" Text="Error: Input(&quot;InsufficientBalance&quot;) when running benchmark" ContentLicense="CC BY-SA 4.0" />
  <row Id="9084" PostHistoryTypeId="3" PostId="2438" RevisionGUID="139f9c28-b551-47c6-8da1-6be68800cde8" CreationDate="2022-05-06T14:35:58.843" UserId="418" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9085" PostHistoryTypeId="5" PostId="2421" RevisionGUID="6b552aa8-d754-4eaf-a4e0-c1e1b30150e7" CreationDate="2022-05-06T15:28:40.947" UserId="29" Comment="API not Apps" Text="These are not in Polkadot{.js} API, however they are simple to use:&#xD;&#xA;- https://polkadot.subscan.io/tools/ss58_transform&#xD;&#xA;- https://polkadot-address-convertor.netlify.app" ContentLicense="CC BY-SA 4.0" />
  <row Id="9086" PostHistoryTypeId="2" PostId="2439" RevisionGUID="e0cbaa5f-a404-4d69-905c-8b581ac353eb" CreationDate="2022-05-06T15:52:08.123" UserId="87" Text="This question is somewhat similar to [this question][1] about configuring for testing but it is for an already live chain.&#xD;&#xA;&#xD;&#xA;In this scenario a new pallet will be added to an existing chain's runtime. The storage would need to be pre-filled with values - for example a list of `AccountId`s so that when the chain is upgraded the storage will already be populated.&#xD;&#xA;&#xD;&#xA;Prior to genesis, this would be carried out by setting the storage:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		pub some_accounts: Vec&lt;T::AccountId&gt;,&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This would then in turn allow you to configure the `chain-spec.json` to include a list of those accounts and when the chain launches for the first time it includes this information.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;&quot;pallet&quot;: {&#xD;&#xA;        &quot;someAccounts&quot;: [&#xD;&#xA;            &quot;5DscB8vToteyG9w3KPpmVti6SrsDttd9MjDFqWA8kGoicPpi&quot;,&#xD;&#xA;            &quot;5CAmNGhvuFcyL2fUpewQR8PJ3LSmhcarkPntyR77zCGTQoMN&quot;,&#xD;&#xA;            &quot;5GZ9KwDiFGgnVAVThYpHwtttzKZefxb74TMsc19qrAATU55A&quot;,&#xD;&#xA;        ]&#xD;&#xA;      }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, once the chain has already launched, the chain spec file can no longer be updated without in effect creating a new chain, I think.&#xD;&#xA;&#xD;&#xA;If this is the case what is the method for creating a new pallet with pre-filled storage, without changing the original spec file?&#xD;&#xA;&#xD;&#xA;Perhaps this is a misunderstand about the spec file, but it would be helpful to clarify this case. &#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1160/how-can-i-configure-genesis-state-for-my-pallets-tests-without-hardcoding-it" ContentLicense="CC BY-SA 4.0" />
  <row Id="9088" PostHistoryTypeId="1" PostId="2439" RevisionGUID="e0cbaa5f-a404-4d69-905c-8b581ac353eb" CreationDate="2022-05-06T15:52:08.123" UserId="87" Text="After genesis has occurred how do I configure new pallet with pre-filled storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9089" PostHistoryTypeId="3" PostId="2439" RevisionGUID="e0cbaa5f-a404-4d69-905c-8b581ac353eb" CreationDate="2022-05-06T15:52:08.123" UserId="87" Text="|pallet|storage|genesis|configuration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9090" PostHistoryTypeId="2" PostId="2440" RevisionGUID="7761fc5a-22e5-4bbc-b87f-f30e25bfae28" CreationDate="2022-05-06T16:14:37.797" UserId="45" Text="The chainspec cannot be updated, that's right. The storage in the chainspec only specifies the contents of the block 0, the genesis block. That in turns, gives the common starting point for all clients to sync the chain. Anyone working (syncing/block producing) with a different genesis block will be on a different chain.&#xD;&#xA;&#xD;&#xA;There is no canonical way to solve this problem. You will have to get the new storage into the state machine somehow.&#xD;&#xA;&#xD;&#xA;One option is to do it through extrinsics: you engineer your upgrade to be performed in stages. The first stage would be updating the runtime code. The second stage would be getting the storage in via the extrinsics.&#xD;&#xA;&#xD;&#xA;The second option, is to embed the data into the new runtime wasm code and perform the storage population in the first block. This approach is similar to a runtime storage migration. The limitation is that there is not so much storage you can pass into the state machine like that. An upgrade should go through a block in one or another, and the limit is ≈ 4 MiB by default for a standalone Substrate chain. For Cumulus/Polkadot it will be even smaller due to the overhead that comes with PoV." ContentLicense="CC BY-SA 4.0" />
  <row Id="9092" PostHistoryTypeId="5" PostId="2424" RevisionGUID="3f079e72-4f8d-4910-afe9-b84273f54233" CreationDate="2022-05-06T16:38:33.760" UserId="2494" Comment="added 602 characters in body" Text="While following the installation tutorial available at: https://docs.substrate.io/v3/getting-started/installation/&#xD;&#xA;&#xD;&#xA;I ended up with cloning the node-template repository and running the build command as shown below which thrown an codegen error.&#xD;&#xA;&#xD;&#xA;I tried avoiding this error by providing the misconfigured flag in the release profile section of the Cargo.toml config without any luck. Any ideas?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹fbe735e*› % cargo build --release                     &#xD;&#xA;   Compiling libc v0.2.125&#xD;&#xA;   Compiling proc-macro2 v1.0.37&#xD;&#xA;   Compiling unicode-xid v0.2.3&#xD;&#xA;   Compiling syn v1.0.92&#xD;&#xA;   Compiling version_check v0.9.4&#xD;&#xA;   Compiling cfg-if v1.0.0&#xD;&#xA;   Compiling serde v1.0.137&#xD;&#xA;   Compiling serde_derive v1.0.137&#xD;&#xA;   Compiling autocfg v1.1.0&#xD;&#xA;   Compiling memchr v2.5.0&#xD;&#xA;error: incorrect value `...` for codegen option `split-debuginfo` - one of supported split-debuginfo modes (`off`, `packed`, or `unpacked`) was expected&#xD;&#xA;&#xD;&#xA;error: could not compile `unicode-xid` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: could not compile `version_check` due to previous error&#xD;&#xA;error: could not compile `cfg-if` due to previous error&#xD;&#xA;error: could not compile `autocfg` due to previous error&#xD;&#xA;error: could not compile `syn` due to previous error&#xD;&#xA;error: could not compile `serde_derive` due to previous error&#xD;&#xA;error: could not compile `libc` due to previous error&#xD;&#xA;error: could not compile `memchr` due to previous error&#xD;&#xA;error: could not compile `serde` due to previous error&#xD;&#xA;error: could not compile `proc-macro2` due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am trying to build this under osx with an m1 pro cpu and the following software packages:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % gcc -v                                  &#xD;&#xA;Apple clang version 13.1.6 (clang-1316.0.21.2.3)&#xD;&#xA;Target: arm64-apple-darwin21.4.0&#xD;&#xA;Thread model: posix&#xD;&#xA;InstalledDir: /Library/Developer/CommandLineTools/usr/bin&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % g++ -v                                       &#xD;&#xA;Apple clang version 13.1.6 (clang-1316.0.21.2.3)&#xD;&#xA;Target: arm64-apple-darwin21.4.0&#xD;&#xA;Thread model: posix&#xD;&#xA;InstalledDir: /Library/Developer/CommandLineTools/usr/bin&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % make -v                                      &#xD;&#xA;GNU Make 3.81&#xD;&#xA;Copyright (C) 2006  Free Software Foundation, Inc.&#xD;&#xA;This is free software; see the source for copying conditions.&#xD;&#xA;There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A&#xD;&#xA;PARTICULAR PURPOSE.&#xD;&#xA;This program built for i386-apple-darwin11.3.0&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % uname -a                                     &#xD;&#xA;Darwin Marco-Polo.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % rustup +nightly show                         &#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/lucio/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin (default)&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.62.0-nightly (4c60a0ea5 2022-05-04)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Update: regarding opening a github issue, I have initially tried doing so but it seems the issue page redirects me to stackexchange:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/issues/new/choose&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Support &amp; Troubleshooting with the Substrate Stack Exchange Community&#xD;&#xA;For general problems with Substrate or related technologies, please search here first for solutions, by keyword and tags. If you discover no solution, please then ask and questions in our community! We highly encourage everyone also share their understanding by answering questions for others.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9094" PostHistoryTypeId="2" PostId="2441" RevisionGUID="3527e013-ff4a-4b84-844b-2f6d10147a8a" CreationDate="2022-05-06T17:22:27.753" UserId="418" Text="Turns out it was insufficient balance.&#xD;&#xA;I needed to change code to&#xD;&#xA;```&#xD;&#xA;T::Currency::make_free_balance_be(&amp;origin, DepositBalanceOf::&lt;T&gt;::max_value());&#xD;&#xA;```&#xD;&#xA;where `DepositBalanceOf` is (for me at least):&#xD;&#xA;```&#xD;&#xA;type DepositBalanceOf&lt;T&gt; = &lt;&lt;T as pallet_uniques::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9096" PostHistoryTypeId="2" PostId="2442" RevisionGUID="d086102b-4761-4d4f-8fc9-9187303b86d5" CreationDate="2022-05-06T18:31:09.540" UserId="2033" Text="On cargo build --release in my substrate project I am getting&#xD;&#xA;&#xD;&#xA;    error[E0282]: type annotations needed&#xD;&#xA;       --&gt; /home/asmita-mfs/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-noise-0.32.0/src/protocol/x25519.rs:221:45&#xD;&#xA;        |&#xD;&#xA;    221 |         curve25519_sk.copy_from_slice(&amp;hash.as_ref()[..32]);&#xD;&#xA;        |                                        -----^^^^^^--&#xD;&#xA;        |                                        |    |&#xD;&#xA;        |                                        |    cannot infer type for type parameter `T` declared on the trait `AsRef`&#xD;&#xA;        |                                        this method call resolves to `&amp;T`&#xD;&#xA;        |&#xD;&#xA;        = note: type must be known at this point&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0282`.&#xD;&#xA;    error: could not compile `libp2p-noise` due to previous error&#xD;&#xA;   What can be the reason for the above error.&#xD;&#xA;The above error is coming when I tried to integrate eth-light-client pallet in my substrate project created from  **monthly-2021-09+1 tag**  &#xD;&#xA;https://github.com/webb-tools/substrate-eth-light-client/tree/drew/update-to-recent-substrate/pallets/light-client" ContentLicense="CC BY-SA 4.0" />
  <row Id="9098" PostHistoryTypeId="1" PostId="2442" RevisionGUID="d086102b-4761-4d4f-8fc9-9187303b86d5" CreationDate="2022-05-06T18:31:09.540" UserId="2033" Text="type annotations needed in libp2p-noise" ContentLicense="CC BY-SA 4.0" />
  <row Id="9099" PostHistoryTypeId="3" PostId="2442" RevisionGUID="d086102b-4761-4d4f-8fc9-9187303b86d5" CreationDate="2022-05-06T18:31:09.540" UserId="2033" Text="|substrate-node|substrate-node-template|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9100" PostHistoryTypeId="2" PostId="2443" RevisionGUID="eed2b29b-1d41-4aed-9e4f-1f4f3c89c6dc" CreationDate="2022-05-06T18:33:55.727" UserId="2495" Text="I'm trying to connect to my local node using the --unsafe-rpc-external --unsafe-ws-external flags when running the node. I can connect to the node through a node.js script, but not from a browser because the connection keeps getting refused.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HcXyq.jpg&#xD;&#xA;&#xD;&#xA;Am I missing something here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9102" PostHistoryTypeId="1" PostId="2443" RevisionGUID="eed2b29b-1d41-4aed-9e4f-1f4f3c89c6dc" CreationDate="2022-05-06T18:33:55.727" UserId="2495" Text="Connection refused using --unsafe-rpc-external --unsafe-ws-external" ContentLicense="CC BY-SA 4.0" />
  <row Id="9103" PostHistoryTypeId="3" PostId="2443" RevisionGUID="eed2b29b-1d41-4aed-9e4f-1f4f3c89c6dc" CreationDate="2022-05-06T18:33:55.727" UserId="2495" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9104" PostHistoryTypeId="52" PostId="2433" RevisionGUID="4c228920-d0ba-4642-a556-b0fed5a4ad3d" CreationDate="2022-05-06T18:56:47.220" />
  <row Id="9105" PostHistoryTypeId="2" PostId="2444" RevisionGUID="682e08ac-af20-431b-9f75-8c39bbe3dcd0" CreationDate="2022-05-06T19:11:30.907" UserId="227" Text="&gt;How exactly storage compatibility is defined? There are rules for upgrading a contract with openzeppelin https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#modifying-your-contracts. Do the exactly same rules apply for this `set_code_hash`&#xD;&#xA;&#xD;&#xA;It's exactly as described in the docs which you linked.&#xD;&#xA;&#xD;&#xA;I've created a GitHub issue for us to document this better. Thanks for bringing this up, our documentation is written by us core developers and it's sometimes hard to see those non-obvious things." ContentLicense="CC BY-SA 4.0" />
  <row Id="9107" PostHistoryTypeId="2" PostId="2445" RevisionGUID="ceaec246-45ff-4c8d-9375-d0ee2615d474" CreationDate="2022-05-06T19:53:20.787" UserId="245" Text="There are a couple of packages that are outdated or do not have the features I need for Dart-lang. So, I decided to code my own. There are really good implementations coded in various languages that are mentioned in the [Substrate Docs][1]. &#xD;&#xA;&#xD;&#xA;My plan is to understand how it's coded and try to migrate it into Dart. One of the limitations of the Dart is the lack of unsigned integers.&#xD;&#xA;&#xD;&#xA;I can Encode and Decode basic values for now. However, I don't really understand how to decode metadata. &#xD;&#xA;&#xD;&#xA;Where should I look for metadata decoding in `@polkadot/api` or in any other languages?&#xD;&#xA;&#xD;&#xA;Any suggestions or ideas would be great!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/advanced/scale-codec/#implementations" ContentLicense="CC BY-SA 4.0" />
  <row Id="9109" PostHistoryTypeId="1" PostId="2445" RevisionGUID="ceaec246-45ff-4c8d-9375-d0ee2615d474" CreationDate="2022-05-06T19:53:20.787" UserId="245" Text="Scale Codec for Dart" ContentLicense="CC BY-SA 4.0" />
  <row Id="9110" PostHistoryTypeId="3" PostId="2445" RevisionGUID="ceaec246-45ff-4c8d-9375-d0ee2615d474" CreationDate="2022-05-06T19:53:20.787" UserId="245" Text="|polkadot-js|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9111" PostHistoryTypeId="2" PostId="2446" RevisionGUID="8420063b-d7fc-4cbe-8b20-696a7866e74a" CreationDate="2022-05-06T20:28:33.020" UserId="1836" Text="https://docs.substrate.io/v3/advanced/scale-codec/ is really enough to implement it completely.&#xD;&#xA;&#xD;&#xA;Otherwise, here is [TypeScript implementation](https://github.com/subsquid/squid/tree/master/scale-codec) we use at [subsquid.io](https://subsquid.io), which will be probably easier to understand than the one from [polkadot.js](https://github.com/polkadot-js/api/tree/master/packages/types-codec)." ContentLicense="CC BY-SA 4.0" />
  <row Id="9113" PostHistoryTypeId="5" PostId="2446" RevisionGUID="a58a1e0e-6171-49ef-8fef-5fc51ea5b391" CreationDate="2022-05-06T20:44:02.623" UserId="1836" Comment="added 579 characters in body" Text="https://docs.substrate.io/v3/advanced/scale-codec/ is really enough to implement it completely.&#xD;&#xA;&#xD;&#xA;Otherwise, here is [TypeScript implementation](https://github.com/subsquid/squid/tree/master/scale-codec) we use at [subsquid.io](https://subsquid.io), which will be probably easier to understand than the one from [polkadot.js](https://github.com/polkadot-js/api/tree/master/packages/types-codec).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Somehow missed the metadata part of the question.&#xD;&#xA;&#xD;&#xA;Metadata is a regular scale-encodable data-structure, which is supposed to be well known. You can have a look at its definition [here](https://github.com/subsquid/squid/blob/49e3c9e72e9f1d7bc267b1174139fc92b5defd15/substrate-metadata/src/old/definitions/metadata/index.ts#L20). Its canonical encoding beside &quot;regular bytes serialised by scale&quot; also includes a [special magic number](https://github.com/subsquid/squid/blob/49e3c9e72e9f1d7bc267b1174139fc92b5defd15/substrate-metadata/src/codec.ts#L18) prefix.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9114" PostHistoryTypeId="2" PostId="2447" RevisionGUID="a0c2d79a-9c9e-4120-8481-02c1b4b8324d" CreationDate="2022-05-06T20:55:24.413" UserId="494" Text="Statemint has an [Existential Deposit][1] threshold of 0.1 DOT.&#xD;&#xA;&#xD;&#xA;Say an account holds some amount of asset X, and transfers away all its DOT so that it goes below the ED.&#xD;&#xA;&#xD;&#xA;What happens to its holdings of asset X? Are they lost forever?&#xD;&#xA;&#xD;&#xA;What if a new DOT transaction (above ED) brings the same account back to life? Does it still hold the same amount of asset X, or is it 0 now?&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/build-protocol-info#existential-deposit" ContentLicense="CC BY-SA 4.0" />
  <row Id="9116" PostHistoryTypeId="1" PostId="2447" RevisionGUID="a0c2d79a-9c9e-4120-8481-02c1b4b8324d" CreationDate="2022-05-06T20:55:24.413" UserId="494" Text="Influence of Existential Deposits on account assets" ContentLicense="CC BY-SA 4.0" />
  <row Id="9117" PostHistoryTypeId="3" PostId="2447" RevisionGUID="a0c2d79a-9c9e-4120-8481-02c1b4b8324d" CreationDate="2022-05-06T20:55:24.413" UserId="494" Text="|balances|existential-deposit|statemint|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9118" PostHistoryTypeId="5" PostId="2424" RevisionGUID="474c0bc4-a07b-41ee-bcc8-0046b04e6453" CreationDate="2022-05-06T20:58:16.150" UserId="2494" Comment="added 627 characters in body" Text="While following the installation tutorial available at: https://docs.substrate.io/v3/getting-started/installation/&#xD;&#xA;&#xD;&#xA;I ended up with cloning the node-template repository and running the build command as shown below which thrown an codegen error.&#xD;&#xA;&#xD;&#xA;I tried avoiding this error by providing the misconfigured flag in the release profile section of the Cargo.toml config without any luck. Any ideas?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹fbe735e*› % cargo build --release                     &#xD;&#xA;   Compiling libc v0.2.125&#xD;&#xA;   Compiling proc-macro2 v1.0.37&#xD;&#xA;   Compiling unicode-xid v0.2.3&#xD;&#xA;   Compiling syn v1.0.92&#xD;&#xA;   Compiling version_check v0.9.4&#xD;&#xA;   Compiling cfg-if v1.0.0&#xD;&#xA;   Compiling serde v1.0.137&#xD;&#xA;   Compiling serde_derive v1.0.137&#xD;&#xA;   Compiling autocfg v1.1.0&#xD;&#xA;   Compiling memchr v2.5.0&#xD;&#xA;error: incorrect value `...` for codegen option `split-debuginfo` - one of supported split-debuginfo modes (`off`, `packed`, or `unpacked`) was expected&#xD;&#xA;&#xD;&#xA;error: could not compile `unicode-xid` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: could not compile `version_check` due to previous error&#xD;&#xA;error: could not compile `cfg-if` due to previous error&#xD;&#xA;error: could not compile `autocfg` due to previous error&#xD;&#xA;error: could not compile `syn` due to previous error&#xD;&#xA;error: could not compile `serde_derive` due to previous error&#xD;&#xA;error: could not compile `libc` due to previous error&#xD;&#xA;error: could not compile `memchr` due to previous error&#xD;&#xA;error: could not compile `serde` due to previous error&#xD;&#xA;error: could not compile `proc-macro2` due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am trying to build this under osx with an m1 pro cpu and the following software packages:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % gcc -v                                  &#xD;&#xA;Apple clang version 13.1.6 (clang-1316.0.21.2.3)&#xD;&#xA;Target: arm64-apple-darwin21.4.0&#xD;&#xA;Thread model: posix&#xD;&#xA;InstalledDir: /Library/Developer/CommandLineTools/usr/bin&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % g++ -v                                       &#xD;&#xA;Apple clang version 13.1.6 (clang-1316.0.21.2.3)&#xD;&#xA;Target: arm64-apple-darwin21.4.0&#xD;&#xA;Thread model: posix&#xD;&#xA;InstalledDir: /Library/Developer/CommandLineTools/usr/bin&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % make -v                                      &#xD;&#xA;GNU Make 3.81&#xD;&#xA;Copyright (C) 2006  Free Software Foundation, Inc.&#xD;&#xA;This is free software; see the source for copying conditions.&#xD;&#xA;There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A&#xD;&#xA;PARTICULAR PURPOSE.&#xD;&#xA;This program built for i386-apple-darwin11.3.0&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % uname -a                                     &#xD;&#xA;Darwin Marco-Polo.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64&#xD;&#xA;&#xD;&#xA;Marco-Polo :: workspace/substrate/substrate-node-template ‹main*› % rustup +nightly show                         &#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/lucio/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin (default)&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.62.0-nightly (4c60a0ea5 2022-05-04)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Update1: regarding opening a github issue, I have initially tried doing so but it seems the issue page redirects me to stackexchange:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/issues/new/choose&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Support &amp; Troubleshooting with the Substrate Stack Exchange Community&#xD;&#xA;For general problems with Substrate or related technologies, please search here first for solutions, by keyword and tags. If you discover no solution, please then ask and questions in our community! We highly encourage everyone also share their understanding by answering questions for others.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Update2:&#xD;&#xA;&#xD;&#xA;Regarding `rustup show` this is the output I get:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;:: ~ % rustup show                                                                                     &#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/lucio/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin (default)&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.62.0-nightly (4c60a0ea5 2022-05-04)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9119" PostHistoryTypeId="2" PostId="2448" RevisionGUID="2ed22904-85be-47e2-bb02-ee2ce6f14723" CreationDate="2022-05-06T21:47:57.133" UserId="2331" Text="You should probably listen to Evm.ContractDeployed events to track all contracts ever deployed. However, you’d need then to filter ERC2-like contracts among those, which is a non-trivial task to do (but one can try looking at the methods implemented bu the contract to “duck-guess”)" ContentLicense="CC BY-SA 4.0" />
  <row Id="9122" PostHistoryTypeId="2" PostId="2449" RevisionGUID="589d66c7-9632-442c-a0a6-4b45228da4e7" CreationDate="2022-05-07T05:59:30.000" UserId="620" Text="The DOT transfer will simply fail.&#xD;&#xA;&#xD;&#xA;First, an asset [places a consumer reference](https://github.com/paritytech/substrate/blob/f9f0b08273c41beabf5ad5f3d6262d96c947b8d9/frame/assets/src/functions.rs#L79) on an account:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;frame_system::Pallet::&lt;T&gt;::inc_consumers(who).map_err(|_| Error::&lt;T, I&gt;::NoProvider)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When one tries to transfer DOT, the Balances pallet checks if it can [remove a provider reference](https://github.com/paritytech/substrate/blob/f9f0b08273c41beabf5ad5f3d6262d96c947b8d9/frame/balances/src/lib.rs#L1525):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let allow_death = allow_death &amp;&amp; system::Pallet::&lt;T&gt;::can_dec_provider(transactor);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally, [that function](https://github.com/paritytech/substrate/blob/f9f0b08273c41beabf5ad5f3d6262d96c947b8d9/frame/system/src/lib.rs#L1172) ensures there are no remaining consumers of the account's existance:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;a.consumers == 0 || a.providers &gt; 1 // &lt;- returns bool&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9124" PostHistoryTypeId="2" PostId="2450" RevisionGUID="ed772d11-037f-46da-99ce-09d84d28c3f5" CreationDate="2022-05-07T07:02:45.490" UserId="32" Text="For context: there are proposals to make RMRK https://kusama.polkassembly.io/post/1482 and USDT https://kusama.polkassembly.io/motion/470 as Sufficient assets. The existential deposit requirement is waived for accounts to hold a Sufficient asset on Statemine/Statemint (no need to hold any KSM/DOT).&#xD;&#xA;&#xD;&#xA;There could be situations where sufficiency of an asset may have to be removed through the governance. With the current implementation of Statemine/Statemint, what would happen to the accounts that only hold the Sufficient assets, whose Sufficiency is revoked?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9126" PostHistoryTypeId="1" PostId="2450" RevisionGUID="ed772d11-037f-46da-99ce-09d84d28c3f5" CreationDate="2022-05-07T07:02:45.490" UserId="32" Text="If Sufficiency of a Statemint asset is revoked, what happens to the accounts holding only that asset?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9127" PostHistoryTypeId="3" PostId="2450" RevisionGUID="ed772d11-037f-46da-99ce-09d84d28c3f5" CreationDate="2022-05-07T07:02:45.490" UserId="32" Text="|assets|statemine|statemint|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9128" PostHistoryTypeId="2" PostId="2451" RevisionGUID="9d8472c9-88fa-477b-88c7-65180b8d0b5e" CreationDate="2022-05-07T07:09:50.363" UserId="620" Text="Nothing would happen to the accounts holding the assets (it would be a potentially huge storage op to iterate through all accounts on chain and check which ones only exist due to a sufficient asset). The effects would be felt though when those accounts try to take advantage of sufficiency (e.g. to pay transaction fees with the sufficient asset) or send those assets to a non-existent account." ContentLicense="CC BY-SA 4.0" />
  <row Id="9130" PostHistoryTypeId="2" PostId="2452" RevisionGUID="c243a01d-2004-4710-a671-834ff773f461" CreationDate="2022-05-07T08:00:33.970" UserId="2408" Text="I've fixed it.&#xD;&#xA;The reason for the bug was that I've included&#xD;&#xA;```&#xD;&#xA;getrandom = {version = &quot;0.2&quot;, features= [&quot;js&quot;] }  &#xD;&#xA;```&#xD;&#xA;in `Cargo.toml` of one of my crates. And that caused some inner conflicts. After I removed that dependency - everything was OK" ContentLicense="CC BY-SA 4.0" />
  <row Id="9132" PostHistoryTypeId="2" PostId="2453" RevisionGUID="2ad527c2-c798-4730-a2f7-0f521479c6bf" CreationDate="2022-05-07T08:12:13.370" UserId="2408" Text="I've fixed it. &#xD;&#xA;First let me explain how I got this error.  &#xD;&#xA;I've cloned Kulupu's [difficulty](https://github.com/kulupu/kulupu/tree/master/frame/difficulty) pallet. And it required Kulupu's [primitives](https://github.com/kulupu/kulupu/tree/master/primitives) as one of the dependencies. So I cloned them as well. `Cargo.toml` of `primitives&#xD;&#xA;The reason for the bug was that `Cargo.toml` of one of my crates looked like this:&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;parity-scale-codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;getrandom = {version = &quot;0.2&quot;, features= [&quot;js&quot;] } &#xD;&#xA;```   &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9134" PostHistoryTypeId="5" PostId="2453" RevisionGUID="f3193e5a-b001-4041-9d18-a0b36faaedd9" CreationDate="2022-05-07T08:26:55.223" UserId="2408" Comment="added 1647 characters in body" Text="I've fixed it. &#xD;&#xA;First let me explain how I got this error.  &#xD;&#xA;I've cloned Kulupu's [difficulty](https://github.com/kulupu/kulupu/tree/master/frame/difficulty) pallet. And it required Kulupu's [primitives](https://github.com/kulupu/kulupu/tree/master/primitives) as one of the dependencies. So I cloned them as well. `Cargo.toml` dependencies section of `primitives` looked like this:&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;parity-scale-codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; } &#xD;&#xA;```   &#xD;&#xA;But building the runtime failed with [this](https://github.com/paritytech/substrate/issues/10767) `wasm32` kind of error. First to fix this error I added&#xD;&#xA;```&#xD;&#xA;getrandom = {version = &quot;0.2&quot;, features= [&quot;js&quot;] }&#xD;&#xA;```&#xD;&#xA;to my `primitives` `Cargo.toml` so it's dependencies section looked like this:&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;parity-scale-codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;getrandom = {version = &quot;0.2&quot;, features= [&quot;js&quot;] }&#xD;&#xA;```  &#xD;&#xA;And I tried to build runtime again. At __this__ point I got this `std` macros bug described in my question above.&#xD;&#xA;&#xD;&#xA;The __solution__ was pretty simple (even though I've spent a _week_ to figure it out):&#xD;&#xA; - Delete all unused dependencies from crate's `Cargo.toml`. It fixed the `wasm32` error and thus made the `getrandom = {version = &quot;0.2&quot;, features= [&quot;js&quot;] }` line useless as well.  &#xD;&#xA;To be more specific - the `sp-api = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; } ` line was causing some inner conflict. So I could have deleted only this one, but I've decided to get rid of everything that was unused. After that runtime _built fine_.&#xD;&#xA;Final contents of `Cargo.toml`:&#xD;&#xA;```&#xD;&#xA;***snip***&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;sp-core/std&quot;, &#xD;&#xA;	]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9135" PostHistoryTypeId="5" PostId="2415" RevisionGUID="4a66a4f5-c8bd-48ac-b738-66454f35dbd7" CreationDate="2022-05-07T15:10:15.033" UserId="183" Comment="added 34 characters in body" Text="We had a runtime upgrade on kusama-parachain recently (9050 -&gt; 9060), where the parachain stalled for 20min. Eventually, it self healed, but I find it abnormal as I have never seen such a big delay in the past runtime upgrades.&#xD;&#xA;&#xD;&#xA;Therefore I want to post it here to see if we potentially did something wrong and/or other people have had similar situations.&#xD;&#xA;&#xD;&#xA;I understand there's a 600 blocks upgrade delay on Kusama (which is ~1hr), but:&#xD;&#xA;- here's [the block][1] where `ValidationFunctionStored` was emitted&#xD;&#xA;- here's [the block][2] where `ValidationFunctionApplied` was emitted&#xD;&#xA;&#xD;&#xA;It's 1hr25min in between, which is obviously more than 600 Kusama blocks.&#xD;&#xA;&#xD;&#xA;Here's a screenshot of kusama parachain panel. I believe the &quot;+10 mins&quot; sign shows the upgrade went beyond scheduled blocks.&#xD;&#xA;&#xD;&#xA;[![screenshot on litmus][3]][3]&#xD;&#xA;&#xD;&#xA;From collator logs it just keeps importing the next block and managed to prepare it within 10ms, but it couldn't get it produced somehow (maybe blocked by relaychain verification?) The PoV that contains the new wasm is just 1,5MB.&#xD;&#xA;&#xD;&#xA;For the full logs please check [here][4].&#xD;&#xA;&#xD;&#xA;We had a very similar issue on rococo-parachain not long ago, but it wasn't able to heal itself and we never understood the root cause. The problem disappeared after the hard rococo restart, see https://github.com/litentry/litentry-parachain/issues/544&#xD;&#xA;&#xD;&#xA;Some extra information about our setup:&#xD;&#xA;- the new runtime was built with `polkadot-v0.9.19` branch, with srtools&#xD;&#xA;- our collators are all located in Singapore right now, is this related?&#xD;&#xA;- we have 4core CPU and 16G for collator hardware, I hope that's enough..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://litmus.subscan.io/block/273331?tab=event&#xD;&#xA;  [2]: https://litmus.subscan.io/block/273405?tab=event&#xD;&#xA;  [3]: https://i.stack.imgur.com/FOXsG.png&#xD;&#xA;  [4]: https://github.com/litentry/litentry-parachain/issues/546#issuecomment-1118514438" ContentLicense="CC BY-SA 4.0" />
  <row Id="9136" PostHistoryTypeId="2" PostId="2454" RevisionGUID="955ac01b-22d5-4ef2-a10f-0eccacfcf576" CreationDate="2022-05-07T19:15:56.683" UserId="1925" Text="A bit more comprehensive example for people struggling with this one:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;voting = {&#xD;&#xA;  &quot;stash&quot;:&quot;publickey of stash wallet here&quot;,&#xD;&#xA;  &quot;proxy&quot;:&quot;secret key or pass phrase here of proxy account that has Governance right to control the stash address&quot;,&#xD;&#xA;  &quot;amount&quot;:&quot;1 000 000 000 000&quot;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;let stashAccount = voting.stash;&#xD;&#xA;let voteAccount = keyring.addFromUri(voting.proxy);&#xD;&#xA;let balance = voting.amount;&#xD;&#xA;let ref_index = 195;&#xD;&#xA;&#xD;&#xA;let vote = {&#xD;&#xA;		Standard: {&#xD;&#xA;			vote: {&#xD;&#xA;				aye: true,&#xD;&#xA;				conviction: 'None',&#xD;&#xA;			},&#xD;&#xA;			balance: balance,&#xD;&#xA;		}&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;const voting = await api.tx.proxy&#xD;&#xA;    	.proxy(&#xD;&#xA;			stashAccount,&#xD;&#xA;			'Governance',&#xD;&#xA;			api.tx.democracy&#xD;&#xA;			.vote(&#xD;&#xA;				ref_index, vote&#xD;&#xA;			),&#xD;&#xA;		)&#xD;&#xA;		.signAndSend(voteAccount, (result) =&gt; {&#xD;&#xA;  			console.log(`Status: ${result.status}`);&#xD;&#xA;	 });&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9138" PostHistoryTypeId="5" PostId="2386" RevisionGUID="20f4004f-1f2c-4cfc-8e95-d87beb635fe1" CreationDate="2022-05-07T21:44:12.217" UserId="83" Comment="mention sentry nodes since that was the name used to refer to those full nodes" Text="In general, DoS attacks are non-trivial to prevent entirely. They're mitigated by the fact that they're technically non-trivial to execute (it requires substantial knowledge of the codebase and sysadmin/devops skill) and they're costly to maintain. Substrate networking code is written with quite an advanced peer reputation and evaluation system, which should take care of ejecting bad/malfunctioning/DoSing peers early on.&#xD;&#xA;&#xD;&#xA;BABE does indeed have a requirement that blocks be produced every session and if this requirement is not met it will stall. Sessions are typically between 1 hour and 4 hours, with 6 sessions per era. At present there is no reason to believe that even a moderately well-funded attacker could DoS several reasonably performant nodes to the point that they would be unable to produce a single block over the course of multiple hours. Nevertheless, the more validator/collator nodes which are involved in your network the better, as this makes an effective attack harder to execute and provides some redundancy.&#xD;&#xA;&#xD;&#xA;Any networks which are at risk from well-funded and capable attackers should take precautions, including: &#xD;&#xA;- a large number of validators (perhaps up to 1,000);&#xD;&#xA;- have a large number of reserved peer slots between validators;&#xD;&#xA;- minimise the number of untrusted peer slots available for attackers;&#xD;&#xA;- avoid exposing RPC services on validators; and&#xD;&#xA;- maximise the session length (at least 1 hour).&#xD;&#xA;&#xD;&#xA;If you're really worried, then you could also allow validators to connect only to each other and a set of additional full-nodes (sentry nodes) which you run, and only allow untrusted nodes to connect to those full-nodes. But this is probably overkill." ContentLicense="CC BY-SA 4.0" />
  <row Id="9139" PostHistoryTypeId="2" PostId="2455" RevisionGUID="c41086b0-d935-42f9-aa16-d0c76d804994" CreationDate="2022-05-07T22:01:24.097" UserId="2505" Text="I am running a few tests using Jest and Polkadot.js, and I need to reset the state before each test. Should I do that or spawn a new node each time? And if so, what's the best way to do it? I am using the substrate node template.&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="9141" PostHistoryTypeId="1" PostId="2455" RevisionGUID="c41086b0-d935-42f9-aa16-d0c76d804994" CreationDate="2022-05-07T22:01:24.097" UserId="2505" Text="Purging chain between tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="9142" PostHistoryTypeId="3" PostId="2455" RevisionGUID="c41086b0-d935-42f9-aa16-d0c76d804994" CreationDate="2022-05-07T22:01:24.097" UserId="2505" Text="|substrate-node|polkadot|substrate-node-template|polkadot.js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9143" PostHistoryTypeId="2" PostId="2456" RevisionGUID="c55ef086-413f-4f90-9c35-4ba0d0a3ae75" CreationDate="2022-05-07T22:25:09.390" UserId="2506" Text="I am trying to **calculate the total number of turns** of a vehicle over time to be a feature in the prediction of accident likelihood. Unfortunately, I am having issues solving the problem of crossing the 360/0 axis that comes from the nature of the problem. My original thought was - the unit circle - and changed all my degree data to the sin of itself. This creates a new problem of not being able to tell the difference between a large turn from 0 to 180 degrees or vice versa, from 2 turns one 90 degrees from 0 or 180 and back to the original location. &#xD;&#xA;&#xD;&#xA;To put a picture of what I am trying to create here. This is a plot of degrees over time of one of the experiments. This should have 9 turns. 8 which are early turns followed by immediate ones in the opposite direction and a 9th turn which crosses the 360 axis. **I am trying to consider any turn of more than 60 degrees within a short period as a &quot;turn&quot;.** Please help!![![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TKH99.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9145" PostHistoryTypeId="1" PostId="2456" RevisionGUID="c55ef086-413f-4f90-9c35-4ba0d0a3ae75" CreationDate="2022-05-07T22:25:09.390" UserId="2506" Text="How do I best calculate angle differences when crossing the 360 axis? (Python)" ContentLicense="CC BY-SA 4.0" />
  <row Id="9146" PostHistoryTypeId="3" PostId="2456" RevisionGUID="c55ef086-413f-4f90-9c35-4ba0d0a3ae75" CreationDate="2022-05-07T22:25:09.390" UserId="2506" Text="|python|math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9147" PostHistoryTypeId="2" PostId="2457" RevisionGUID="69fd1d1a-4bf9-446d-b2c1-eb615ecc009a" CreationDate="2022-05-08T04:02:28.233" UserId="2379" Text="development env: one relaychain, two parachain&#xD;&#xA;1. relaychain rococo-local, tokenSymbol: ROC, Alice 1MROC&#xD;&#xA;2. parachain local 2000, tokenSymbol: KK, Alice 1MKK&#xD;&#xA;3. parachain local 2102, tokenSymbol: DD, Alice 1MDD&#xD;&#xA;4. HRMP bi-direction channel opened between 2000 and 2102&#xD;&#xA;&#xD;&#xA;both parachain has orml pallets:&#xD;&#xA;- xcm&#xD;&#xA;- xcm-support&#xD;&#xA;- xtokens&#xD;&#xA;- tokens&#xD;&#xA;- currencies&#xD;&#xA;&#xD;&#xA;This error FailedToTransactAsset(&quot;InsufficientBalance&quot;) occurs when para2000 transfer relaychain ROC to para2102(also error para2000 transfer native KK to para2102). XCM execute detail as follows:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8NJ6f.png&#xD;&#xA;&#xD;&#xA;Did I miss something? &#xD;&#xA;The &quot;InsufficientBalance&quot; means Alice's relaychain account ROC is not enough or Alice's parachain account ROC not enough?&#xD;&#xA;Should I config the orml tokens balances in spec?&#xD;&#xA;&#xD;&#xA;Reference:&#xD;&#xA;- https://wiki.acala.network/build/development-guide/composable-chains/open-hrmp-channel&#xD;&#xA;- https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm/38#38&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9149" PostHistoryTypeId="1" PostId="2457" RevisionGUID="69fd1d1a-4bf9-446d-b2c1-eb615ecc009a" CreationDate="2022-05-08T04:02:28.233" UserId="2379" Text="XCM cross-chain transfer error FailedToTransactAsset(&quot;InsufficientBalance&quot;)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9150" PostHistoryTypeId="3" PostId="2457" RevisionGUID="69fd1d1a-4bf9-446d-b2c1-eb615ecc009a" CreationDate="2022-05-08T04:02:28.233" UserId="2379" Text="|xcm|orml-xtokens|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9151" PostHistoryTypeId="5" PostId="1697" RevisionGUID="23eed744-da0e-4ddd-ab4e-b19088b8d590" CreationDate="2022-05-08T04:13:19.587" UserId="494" Comment="improved contextualisation" Text="Substrate Storage reads and writes are expensive and the runtime should always be optimized around minimizing such cost, which is quantified in terms of runtime computation for traversing the Merkle Trie.&#xD;&#xA;&#xD;&#xA;When a light client needs to access some storage item, there's an extra networking cost, given that the Merkle Trie traversal happens over the network connection with its peers.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;There's a [Sub0 workshop](https://www.youtube.com/watch?v=sfwg2aMz66I) about building a parachain, called the [Adz chain](https://github.com/paritytech/adz), and front-end application using [Substrate Connect](https://github.com/paritytech/substrate-connect) &amp;mdash; the library and browser extension designed to build applications that generate and use their own in-browser light client.&#xD;&#xA;&#xD;&#xA;In the workshop, Martin [goes through the different storage items of the parachain](https://youtu.be/sfwg2aMz66I?t=996) he's built, implying careful decisions he's made about the way he's designed the storage for it to be optimized for light client users.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Assuming a runtime has taken care of all possible storage optimizations in terms of runtime computation, are there any extra factors that would influence potential optimizations in the context of the networking round trips for a light client?&#xD;&#xA;&#xD;&#xA;Or in other words, if storage access is already optimized to its fullest, can such runtime be also considered _light-client friendly_?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9152" PostHistoryTypeId="24" PostId="1697" RevisionGUID="23eed744-da0e-4ddd-ab4e-b19088b8d590" CreationDate="2022-05-08T04:13:19.587" Comment="Proposed by 494 approved by -1 edit id of 191" ContentLicense="CC BY-SA 4.0" />
  <row Id="9153" PostHistoryTypeId="5" PostId="1697" RevisionGUID="13ca81b1-a8f1-46da-8d26-3ee2414ec6cb" CreationDate="2022-05-08T04:13:19.587" UserId="83" Comment="improved contextualisation" Text="Substrate Storage reads and writes are expensive and the runtime should always be optimized around minimizing such cost, which is quantified in terms of runtime computation for traversing the Merkle Trie.&#xD;&#xA;&#xD;&#xA;When a light client needs to access some storage item, there's an extra networking cost, given that the Merkle Trie traversal happens over the network connection with its peers.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;There's a [Sub0 workshop](https://www.youtube.com/watch?v=sfwg2aMz66I) about building a parachain, called the [Adz chain](https://github.com/paritytech/adz), and front-end application using [Substrate Connect](https://github.com/paritytech/substrate-connect) &amp;mdash; the library and browser extension designed to build applications that generate and use their own in-browser light client.&#xD;&#xA;&#xD;&#xA;In the workshop, Martin [goes through the different storage items of the parachain](https://youtu.be/sfwg2aMz66I?t=996) he's built, implying careful decisions he's made about the way he's designed the storage for it to be optimized for light client users.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Assuming a runtime has taken care of all possible storage access optimizations in terms of runtime computation to its fullest, are there any extra factors that would influence potential optimizations in the context of the networking round trips to make it as _light-client friendly_ as possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9154" PostHistoryTypeId="2" PostId="2458" RevisionGUID="0f924bbb-c15b-46ea-b887-103eb3c0b41a" CreationDate="2022-05-08T08:50:27.440" UserId="1813" Text="I am expecting `result.status.isFinalized` for a `balances.transfer` call but within the result callback I get `status: 'Future'` and nothing else. What does it mean?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9156" PostHistoryTypeId="1" PostId="2458" RevisionGUID="0f924bbb-c15b-46ea-b887-103eb3c0b41a" CreationDate="2022-05-08T08:50:27.440" UserId="1813" Text="What does 'Future' mean as an extrinsic's result status?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9157" PostHistoryTypeId="3" PostId="2458" RevisionGUID="0f924bbb-c15b-46ea-b887-103eb3c0b41a" CreationDate="2022-05-08T08:50:27.440" UserId="1813" Text="|polkadot-js|extrinsicstatus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9158" PostHistoryTypeId="2" PostId="2459" RevisionGUID="28f42356-bbc2-4fd5-8d68-57f317f553cf" CreationDate="2022-05-08T09:52:25.413" UserId="45" Text="According to [the documentation](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/primitives/runtime/src/transaction_validity.rs#L44-L45), this transaction validity status is returned when the nonce of the transaction is higher than the expected one taken from the current storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="9161" PostHistoryTypeId="5" PostId="2415" RevisionGUID="9501c8e9-ba09-4f21-be26-6f38ffb4e383" CreationDate="2022-05-08T10:05:25.753" UserId="2" Comment="typos corrected" Text="We had a runtime upgrade on kusama-parachain recently (9050 -&gt; 9060), where the parachain stalled for 20min. Eventually, it self healed, but I find it abnormal as I have never seen such a big delay in the past runtime upgrades.&#xD;&#xA;&#xD;&#xA;Therefore I want to post it here to see if we potentially did something wrong and/or other people have had similar situations.&#xD;&#xA;&#xD;&#xA;I understand there's a 600 blocks upgrade delay on Kusama (which is ~1hr), but:&#xD;&#xA;- here's [the block][1] where `ValidationFunctionStored` was emitted&#xD;&#xA;- here's [the block][2] where `ValidationFunctionApplied` was emitted&#xD;&#xA;&#xD;&#xA;It's 1hr25min in between, which is obviously more than 600 Kusama blocks.&#xD;&#xA;&#xD;&#xA;Here's a screenshot of kusama parachain panel. I believe the &quot;+10 mins&quot; sign shows the upgrade went beyond scheduled blocks.&#xD;&#xA;&#xD;&#xA;[![screenshot on litmus][3]][3]&#xD;&#xA;&#xD;&#xA;From collator logs it just keeps importing the next block and managed to prepare it within 10ms, but it couldn't get it produced somehow (maybe blocked by relaychain verification?) The PoV that contains the new wasm is just 1,5MB.&#xD;&#xA;&#xD;&#xA;For the full logs please check [here][4].&#xD;&#xA;&#xD;&#xA;We had a very similar issue on rococo-parachain not long ago, but it wasn't able to heal itself and we never understood the root cause. The problem disappeared after a hard rococo restart, see https://github.com/litentry/litentry-parachain/issues/544&#xD;&#xA;&#xD;&#xA;Some extra information about our setup:&#xD;&#xA;- the new runtime was built with `polkadot-v0.9.19` branch, with srtools&#xD;&#xA;- our collators are all located in Singapore right now, is this related?&#xD;&#xA;- we have 4core CPU and 16G for collator hardware, I hope that's enough.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://litmus.subscan.io/block/273331?tab=event&#xD;&#xA;  [2]: https://litmus.subscan.io/block/273405?tab=event&#xD;&#xA;  [3]: https://i.stack.imgur.com/FOXsG.png&#xD;&#xA;  [4]: https://github.com/litentry/litentry-parachain/issues/546#issuecomment-1118514438" ContentLicense="CC BY-SA 4.0" />
  <row Id="9162" PostHistoryTypeId="4" PostId="2415" RevisionGUID="9501c8e9-ba09-4f21-be26-6f38ffb4e383" CreationDate="2022-05-08T10:05:25.753" UserId="2" Comment="typos corrected" Text="Abnormal large delays between wasm-code getting stored and applied" ContentLicense="CC BY-SA 4.0" />
  <row Id="9163" PostHistoryTypeId="24" PostId="2415" RevisionGUID="9501c8e9-ba09-4f21-be26-6f38ffb4e383" CreationDate="2022-05-08T10:05:25.753" Comment="Proposed by 2 approved by 83, 45 edit id of 192" ContentLicense="CC BY-SA 4.0" />
  <row Id="9164" PostHistoryTypeId="5" PostId="2434" RevisionGUID="a7c61f5c-47a3-4334-8d8f-a2d6c1c754a0" CreationDate="2022-05-08T10:15:37.873" UserId="83" Comment="fix grammar" Text="I want to get some 'trustful' on-chain data on the pallet, for example, get transaction data by transaction hash. I found Offchain Workers might do that job but is it really trustful because the API can fail or return incorrect data." ContentLicense="CC BY-SA 4.0" />
  <row Id="9165" PostHistoryTypeId="2" PostId="2460" RevisionGUID="0c7243af-3146-470c-a399-a8675c96f2b9" CreationDate="2022-05-08T13:36:30.520" UserId="620" Text="OK, I see what you are trying to do. You don't need the hash of the `authorize_upgrade` call, you need it encoded and wrapped with sudo. Then, _anyone_ (i.e. not just sudo) can submit `enact_authorized_upgrade` as an _unsigned_ transaction.&#xD;&#xA;&#xD;&#xA;You are getting the `Unauthorized` error because in sudo you are only providing the hash of the call, not `authorize_upgrade(&lt;code_hash&gt;)`.&#xD;&#xA;&#xD;&#xA;Here's your solution (with examples taken from the latest Statemint upgrade):&#xD;&#xA;&#xD;&#xA;First, you need the `authorize_upgrade` _call data,_ not call hash:&#xD;&#xA;&#xD;&#xA;[![authorize-upgrade-call][1]][1]&#xD;&#xA;&#xD;&#xA;As in, you want: `0x01023ef62993199d2253ec1f49508e4cff7e6d293555e405ab024a0c87db5c5008c0`&#xD;&#xA;&#xD;&#xA;Now you need to submit this as sudo. Statemint doesn't have sudo, so you can't copy this exactly, but it would be like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;npx @polkadot/api-cli@beta --ws $provider --sudo --seed &quot;$phrase&quot; tx.parachainSystem.authorizeUpgrade &quot;0x01023ef62993199d2253ec1f49508e4cff7e6d293555e405ab024a0c87db5c5008c0&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If this is successful, you will see an `UpgradeAuthorized(code_hash)` event on the parachain.&#xD;&#xA;&#xD;&#xA;Now that it's authorized, you can do the `enact_authorized_upgrade` part. Again, you do not need sudo for this.&#xD;&#xA;&#xD;&#xA;[![enact-authorized-upgrade][2]][2]&#xD;&#xA;&#xD;&#xA;I'm not super familiar with the CLI you are using, but you want to submit this as an _unsigned transaction._ In the screenshot, that would be the &quot;Submit Unsigned&quot; button.&#xD;&#xA;&#xD;&#xA;If that is successful, you will see a `ValidationFunctionStored` event. Note that depending on your Relay Chain configuration (`config.validation_upgrade_delay`), the upgrade won't take place right away, but after the number of Relay Chain blocks in the config.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eRzU7.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/A1ipa.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9167" PostHistoryTypeId="2" PostId="2461" RevisionGUID="e3bf3727-ce99-43ef-bd9a-a6afa9ec32e7" CreationDate="2022-05-08T13:56:57.200" UserId="620" Text="I think you are in the wrong Stack Exchange :)&#xD;&#xA;&#xD;&#xA;But I don't think it's possible for anyone to answer without knowing the data source, e.g. is it a lateral inertial sensor that senses side-to-side forces, or is it taken from accelerometer data, etc.?&#xD;&#xA;&#xD;&#xA;Personally, I'd go about this with a two-dimensional matrix with velocity as a 2x1 vector (first for latitudinal with positive being N and negative being S, and second for longitudinal (+ E, - W)). You could also use polar coordinates for this, speed and azimuth. The other dimension would simply be time slices.&#xD;&#xA;&#xD;&#xA;Then you can check if the azimuth changes by 60 deg in some time period and call it a turn.&#xD;&#xA;&#xD;&#xA;Then to plot turns, you could use a [stem plot](https://www.mathworks.com/help/matlab/ref/stem.html) to show turns of some degree (stem height) at each time point, always returning to 0 (the car going in a straight line). Of course, positive could be left turns and negative could be right turns (using right hand rule...). The heading of the car at any point in time would be the sum of all turns up to that point.&#xD;&#xA;&#xD;&#xA;Anyway, I haven't done this type of engineering in a LONG time, and think you should ask in a mechanical engineering/python focused Stack Exchange area. But hope I could help or give you some ideas." ContentLicense="CC BY-SA 4.0" />
  <row Id="9169" PostHistoryTypeId="2" PostId="2462" RevisionGUID="95fdbc29-ea58-4845-b54a-68038f593ae6" CreationDate="2022-05-08T17:46:19.647" UserId="140" Text="I have opened a crowdload to get enough fund to win the parachain slot on Kusama. I just want to know if I don't get enough fund and I don't win the slot, &#xD;&#xA;&#xD;&#xA;1) do I need to resubmit the crowdloan?&#xD;&#xA;2) Or it will be automatically resubmitted and keep running for the next auction until my chain becomes parachain?&#xD;&#xA;&#xD;&#xA;3) If we don't win the slot and crowdloan get canceled, what would happen to the fund, which Kusama reserved for crowdload submission and the fund, which is contributed by community members?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9171" PostHistoryTypeId="1" PostId="2462" RevisionGUID="95fdbc29-ea58-4845-b54a-68038f593ae6" CreationDate="2022-05-08T17:46:19.647" UserId="140" Text="Do we need to resubmit Crowdloan, if we don't win the slot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9172" PostHistoryTypeId="3" PostId="2462" RevisionGUID="95fdbc29-ea58-4845-b54a-68038f593ae6" CreationDate="2022-05-08T17:46:19.647" UserId="140" Text="|substrate-node|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9173" PostHistoryTypeId="5" PostId="2449" RevisionGUID="64390cf4-14f9-4438-9b69-7e181b263d7e" CreationDate="2022-05-08T19:12:06.550" UserId="494" Comment="improved contextualisation" Text="The DOT transfer that empties the account will simply fail.&#xD;&#xA;&#xD;&#xA;First, an asset [places a consumer reference](https://github.com/paritytech/substrate/blob/f9f0b08273c41beabf5ad5f3d6262d96c947b8d9/frame/assets/src/functions.rs#L79) on an account:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;frame_system::Pallet::&lt;T&gt;::inc_consumers(who).map_err(|_| Error::&lt;T, I&gt;::NoProvider)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When one tries to transfer DOT, the Balances pallet checks if it can [remove a provider reference](https://github.com/paritytech/substrate/blob/f9f0b08273c41beabf5ad5f3d6262d96c947b8d9/frame/balances/src/lib.rs#L1525):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let allow_death = allow_death &amp;&amp; system::Pallet::&lt;T&gt;::can_dec_provider(transactor);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally, [that function](https://github.com/paritytech/substrate/blob/f9f0b08273c41beabf5ad5f3d6262d96c947b8d9/frame/system/src/lib.rs#L1172) ensures there are no remaining consumers of the account's existance:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;a.consumers == 0 || a.providers &gt; 1 // &lt;- returns bool&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9174" PostHistoryTypeId="24" PostId="2449" RevisionGUID="64390cf4-14f9-4438-9b69-7e181b263d7e" CreationDate="2022-05-08T19:12:06.550" Comment="Proposed by 494 approved by 83, 620 edit id of 193" ContentLicense="CC BY-SA 4.0" />
  <row Id="9175" PostHistoryTypeId="5" PostId="2461" RevisionGUID="371a5801-1bc6-4eeb-adb3-af2bd5893f43" CreationDate="2022-05-08T19:16:30.870" UserId="620" Comment="added 40 characters in body" Text="I think you are in the wrong Stack Exchange :)&#xD;&#xA;&#xD;&#xA;But I don't think it's possible for anyone to answer without knowing the data source, e.g. is it a lateral inertial sensor that senses side-to-side forces, or is it taken from accelerometer data, etc.?&#xD;&#xA;&#xD;&#xA;Personally, I'd go about this with a `2 x len(time_series)` matrix with each column as a velocity timepoint (first row for latitudinal with positive being N and negative being S, and second row for longitudinal (+ E, - W)). You could also use polar coordinates for this, speed and azimuth. The other dimension (each column) would simply be time slices.&#xD;&#xA;&#xD;&#xA;Then you can check if the azimuth changes by 60 deg in some time period and call it a turn.&#xD;&#xA;&#xD;&#xA;Then to plot turns, you could use a [stem plot](https://www.mathworks.com/help/matlab/ref/stem.html) to show turns of some degree (stem height) at each time point, always returning to 0 (the car going in a straight line). Of course, positive could be left turns and negative could be right turns (using right hand rule...). The heading of the car at any point in time would be the sum of all turns up to that point.&#xD;&#xA;&#xD;&#xA;Anyway, I haven't done this type of engineering in a LONG time, and think you should ask in a mechanical engineering/python focused Stack Exchange area. But hope I could help or give you some ideas." ContentLicense="CC BY-SA 4.0" />
  <row Id="9176" PostHistoryTypeId="2" PostId="2463" RevisionGUID="11985746-9b9e-49a4-a23b-de895b8f69b9" CreationDate="2022-05-08T22:16:49.147" UserId="716" Text="I am trying to run one of the examples in the [Polkadot{.js} documentation](https://polkadot.js.org/docs/api/start/api.query) and it is not working for me in TypeScript.  This much works&#xD;&#xA;```&#xD;&#xA;  const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;  console.log(api.genesisHash.toHex());&#xD;&#xA;&#xD;&#xA;  const ADDR = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFabHE';&#xD;&#xA;  const now = await api.query.timestamp.now();&#xD;&#xA;  console.log(`${now}`);&#xD;&#xA;```&#xD;&#xA;However, this line does not work:&#xD;&#xA;```&#xD;&#xA;  const { nonce, data: balance } = await api.query.system.account(ADDR);&#xD;&#xA;```&#xD;&#xA;Here is the error returned:&#xD;&#xA;```&#xD;&#xA;   return new TSError(diagnosticText, diagnosticCodes);&#xD;&#xA;           ^&#xD;&#xA;TSError: ⨯ Unable to compile TypeScript:&#xD;&#xA;src/scripts/index.ts:110:11 - error TS2339: Property 'nonce' does not exist on type 'Codec'.&#xD;&#xA;&#xD;&#xA;110   const { nonce, data: balance } = await api.query.system.account(ADDR);&#xD;&#xA;              ~~~~~&#xD;&#xA;src/scripts/index.ts:110:18 - error TS2339: Property 'data' does not exist on type 'Codec'.&#xD;&#xA;&#xD;&#xA;110   const { nonce, data: balance } = await api.query.system.account(ADDR);&#xD;&#xA;                     ~~~~&#xD;&#xA;```&#xD;&#xA;I don't know if the problem is that I am running it in TypeScript or something else, but does anyone have any suggestions to make this work or see something that I am doing wrong?  Thanks.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9178" PostHistoryTypeId="1" PostId="2463" RevisionGUID="11985746-9b9e-49a4-a23b-de895b8f69b9" CreationDate="2022-05-08T22:16:49.147" UserId="716" Text="Polkadot{js} state queryies example not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="9179" PostHistoryTypeId="3" PostId="2463" RevisionGUID="11985746-9b9e-49a4-a23b-de895b8f69b9" CreationDate="2022-05-08T22:16:49.147" UserId="716" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9180" PostHistoryTypeId="2" PostId="2464" RevisionGUID="8e73810c-49f7-4c7d-b937-20c43f8a886d" CreationDate="2022-05-08T23:45:02.910" UserId="716" Text="As a workaround, I was able to use the following code to get the nonce and free balance: &#xD;&#xA;```&#xD;&#xA;  const data = await api.query.system.account(ADDR);&#xD;&#xA;  console.log(JSON.stringify(data));&#xD;&#xA;  console.log(data['nonce'].toHuman());&#xD;&#xA;  console.log(data['data']['free'].toHuman());&#xD;&#xA;```&#xD;&#xA;Do you think the online example is outdated?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9182" PostHistoryTypeId="2" PostId="2465" RevisionGUID="30b0d8f7-4c88-497c-9664-f401e2f16bfc" CreationDate="2022-05-09T00:31:37.077" UserId="543" Text="I've recently upgraded my chain to the latest substrate master, however, I'm unable to deploy contracts that use a chain extension. When I try to use a chain extension, the contract fails to deploy with the `CodeRejected` error. Are there any breaking changes in the chain extension configuration that I may have missed when upgrading? &#xD;&#xA;&#xD;&#xA;My contract code is here: https://github.com/ideal-lab5/contracts/blob/main/iris_asset_exchange/lib.rs&#xD;&#xA;&#xD;&#xA;And my chain extension is defined here: https://github.com/driemworks/substrate/blob/f73557b96ef8c7cc1e428a78ea4106b66c165d64/bin/node-template/runtime/src/lib.rs#L920&#xD;&#xA;&#xD;&#xA;As you can see, I have defined that the chain extension should be enabled:&#xD;&#xA;&#xD;&#xA;    fn enabled() -&gt; bool {&#xD;&#xA;        true&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I encountered the same issue when trying to use the rand-extension example too: https://github.com/paritytech/ink/tree/master/examples/rand-extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="9184" PostHistoryTypeId="1" PostId="2465" RevisionGUID="30b0d8f7-4c88-497c-9664-f401e2f16bfc" CreationDate="2022-05-09T00:31:37.077" UserId="543" Text="Contract CodeRejected when using chain extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="9185" PostHistoryTypeId="3" PostId="2465" RevisionGUID="30b0d8f7-4c88-497c-9664-f401e2f16bfc" CreationDate="2022-05-09T00:31:37.077" UserId="543" Text="|ink|pallet-contracts|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9186" PostHistoryTypeId="5" PostId="2462" RevisionGUID="05f93633-3f30-4443-aaee-cbfbdfb46192" CreationDate="2022-05-09T04:47:02.233" UserId="83" Comment="grammar and spelling" Text="I have opened a crowdloan to get enough funds to win a parachain slot on Kusama. I just want to know what to do if I don't get enough funds and I don't win the slot: &#xD;&#xA;&#xD;&#xA;1) Do I need to resubmit the crowdloan?&#xD;&#xA;2) Or will it be automatically resubmitted and keep running for the next auction until my chain becomes parachain?&#xD;&#xA;3) If we don't win the slot and the crowdloan gets canceled, what happens to the funds (both those that Kusama reserved for the crowdloan submission, and funds that were contributed by community members)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9187" PostHistoryTypeId="4" PostId="2462" RevisionGUID="05f93633-3f30-4443-aaee-cbfbdfb46192" CreationDate="2022-05-09T04:47:02.233" UserId="83" Comment="grammar and spelling" Text="Do we need to resubmit a crowdloan, if we don't win the slot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9188" PostHistoryTypeId="5" PostId="2441" RevisionGUID="37abed94-faea-4c7f-8859-347a3e651589" CreationDate="2022-05-09T04:51:25.147" UserId="83" Comment="fix grammar" Text="Turns out it was due to insufficient balance.&#xD;&#xA;I needed to change the code to:&#xD;&#xA;```rust&#xD;&#xA;T::Currency::make_free_balance_be(&amp;origin, DepositBalanceOf::&lt;T&gt;::max_value());&#xD;&#xA;```&#xD;&#xA;Where `DepositBalanceOf` is (for me at least):&#xD;&#xA;```rust&#xD;&#xA;type DepositBalanceOf&lt;T&gt; = &lt;&lt;T as pallet_uniques::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9189" PostHistoryTypeId="5" PostId="2453" RevisionGUID="f1636d56-7349-4d15-93a9-4595be0e0319" CreationDate="2022-05-09T05:19:11.177" UserId="83" Comment="grammar and spacing" Text="I fixed it. First let me explain how I got this error. I cloned Kulupu's [difficulty](https://github.com/kulupu/kulupu/tree/master/frame/difficulty) pallet. And it required Kulupu's [primitives](https://github.com/kulupu/kulupu/tree/master/primitives) as one of the dependencies. So I cloned them as well so the Cargo.toml dependencies section of my `primitives` crate looked like this:&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;parity-scale-codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; } &#xD;&#xA;```   &#xD;&#xA;But building the runtime failed with [this](https://github.com/paritytech/substrate/issues/10767) `wasm32` kind of error. First to fix this error I added the following to the Cargo.toml of my `primitives` crate:&#xD;&#xA;```&#xD;&#xA;getrandom = {version = &quot;0.2&quot;, features= [&quot;js&quot;] }&#xD;&#xA;```&#xD;&#xA;So it's dependencies section looked like this:&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;parity-scale-codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;getrandom = {version = &quot;0.2&quot;, features= [&quot;js&quot;] }&#xD;&#xA;```  &#xD;&#xA;Then I tried to build runtime again. At __this__ point I got the `std` macros bug described in my question above.&#xD;&#xA;&#xD;&#xA;The __solution__ was pretty simple (even though I spent a _week_ figuring it out):&#xD;&#xA; - Deleted all unused dependencies from the Cargo.toml of my `primitives` crate. That fixed the `wasm32` error and thus made the `getrandom = {version = &quot;0.2&quot;, features= [&quot;js&quot;] }` line useless as well. To be more specific, the `sp-api = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }` line was causing some inner conflict. So I could have deleted only this one, but I decided to get rid of everything that was unused. After that the runtime _built fine_.&#xD;&#xA;Final contents of Cargo.toml of my primitives crate:&#xD;&#xA;```&#xD;&#xA;***snip***&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;sp-core/std&quot;, &#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9190" PostHistoryTypeId="5" PostId="2122" RevisionGUID="e57cfb67-eb16-49ca-8a84-256e2c77d86e" CreationDate="2022-05-09T05:21:48.353" UserId="83" Comment="grammar" Text="I'm trying to index the names and decimals of tokens in moonbeam, I think I should listen for a contract instantiation event to get that data. Which event and module should I listen for? Or is there any other straight forward way to get the data that i'm looking for?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9191" PostHistoryTypeId="4" PostId="2122" RevisionGUID="e57cfb67-eb16-49ca-8a84-256e2c77d86e" CreationDate="2022-05-09T05:21:48.353" UserId="83" Comment="grammar" Text="Which event should I listen to in order to get contract instantiation data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9192" PostHistoryTypeId="5" PostId="2448" RevisionGUID="b3e69ccd-361f-45fd-9549-f770dec055a2" CreationDate="2022-05-09T05:26:19.950" UserId="83" Comment="backticks and grammar" Text="You should probably listen to `Evm.ContractDeployed` events to track all contracts ever deployed. However, you'd then need to filter ERC20-like contracts among those, which is a non-trivial task to do (but one can try looking at the methods implemented by the contract to &quot;duck-guess&quot;)." ContentLicense="CC BY-SA 4.0" />
  <row Id="9193" PostHistoryTypeId="4" PostId="2362" RevisionGUID="6f0d138a-3355-47c9-9fcc-263424f094a1" CreationDate="2022-05-09T05:49:11.933" UserId="429" Comment="edited title" Text="Calling CLI subcommand through different terminal after running the node" ContentLicense="CC BY-SA 4.0" />
  <row Id="9194" PostHistoryTypeId="2" PostId="2466" RevisionGUID="871b3427-0ed4-4db6-b387-ed937b9faa89" CreationDate="2022-05-09T07:26:46.900" UserId="2481" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/oTaYX.png&#xD;&#xA;&#xD;&#xA;Can I get this timestamp through RPC getblock? What are you going to do?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9196" PostHistoryTypeId="1" PostId="2466" RevisionGUID="871b3427-0ed4-4db6-b387-ed937b9faa89" CreationDate="2022-05-09T07:26:46.900" UserId="2481" Text="Can I get this timestamp through RPC getblock? What are you going to do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9197" PostHistoryTypeId="3" PostId="2466" RevisionGUID="871b3427-0ed4-4db6-b387-ed937b9faa89" CreationDate="2022-05-09T07:26:46.900" UserId="2481" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9202" PostHistoryTypeId="2" PostId="2468" RevisionGUID="158b1cb3-8074-4577-8f87-3646abaf67a7" CreationDate="2022-05-09T08:35:36.137" UserId="2355" Text="i was wondering why, in treasury_pallet, there is a recurrent `I` generic parameter along with `T`, almost always used to specify lifetime:&#xD;&#xA;```&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T, I = ()&gt;(PhantomData&lt;(T, I)&gt;);&#xD;&#xA;```&#xD;&#xA;ex for lifetime:&#xD;&#xA;```&#xD;&#xA;	pub(crate) type ProposalCount&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageMap&lt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Other pallets doesn't have it, so why ? Does it have a specific use ? Can i remove it if I'm making a different pallet forked from Treasury ? I'd like some enlightenment on this" ContentLicense="CC BY-SA 4.0" />
  <row Id="9204" PostHistoryTypeId="1" PostId="2468" RevisionGUID="158b1cb3-8074-4577-8f87-3646abaf67a7" CreationDate="2022-05-09T08:35:36.137" UserId="2355" Text="Why is there a &quot;lifetime&quot; generic parameter in pallet_treasury?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9205" PostHistoryTypeId="3" PostId="2468" RevisionGUID="158b1cb3-8074-4577-8f87-3646abaf67a7" CreationDate="2022-05-09T08:35:36.137" UserId="2355" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9206" PostHistoryTypeId="2" PostId="2469" RevisionGUID="4ac04ec3-ebd5-4a81-8f77-4851eb3509c2" CreationDate="2022-05-09T08:37:42.147" UserId="2481" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BqJpx.png&#xD;&#xA;&#xD;&#xA;Request RPC via http. How to obtain trading results and trading time.&#xD;&#xA;&#xD;&#xA;Is there a friend who can give me some advice? thank you very much indeed&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9208" PostHistoryTypeId="1" PostId="2469" RevisionGUID="4ac04ec3-ebd5-4a81-8f77-4851eb3509c2" CreationDate="2022-05-09T08:37:42.147" UserId="2481" Text="Trading result and trading time" ContentLicense="CC BY-SA 4.0" />
  <row Id="9209" PostHistoryTypeId="3" PostId="2469" RevisionGUID="4ac04ec3-ebd5-4a81-8f77-4851eb3509c2" CreationDate="2022-05-09T08:37:42.147" UserId="2481" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9210" PostHistoryTypeId="2" PostId="2470" RevisionGUID="06a12a6c-4458-4258-aac1-83f2faa3d344" CreationDate="2022-05-09T08:52:03.593" UserId="620" Text="Lots of pallets have this, for example [Collective](https://github.com/paritytech/substrate/blob/39a634d/frame/collective/src/lib.rs#L246). It represents &quot;instance&quot; and means the pallet can exist multiple times within a runtime with different configs.&#xD;&#xA;&#xD;&#xA;Collective is indeed used twice in Polkadot, once for the [Council](https://github.com/paritytech/polkadot/blob/71660689b4cbbea31bd1d52be70dac4687f19ba5/runtime/polkadot/src/lib.rs#L703), and again for the [Technical Committee](https://github.com/paritytech/polkadot/blob/71660689b4cbbea31bd1d52be70dac4687f19ba5/runtime/polkadot/src/lib.rs#L755)&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub type CouncilCollective = pallet_collective::Instance1;&#xD;&#xA;impl pallet_collective::Config&lt;CouncilCollective&gt; for Runtime {&#xD;&#xA;	type Origin = Origin;&#xD;&#xA;	type Proposal = Call;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type MotionDuration = CouncilMotionDuration;&#xD;&#xA;	type MaxProposals = CouncilMaxProposals;&#xD;&#xA;	type MaxMembers = CouncilMaxMembers;&#xD;&#xA;	type DefaultVote = pallet_collective::PrimeDefaultVote;&#xD;&#xA;	type WeightInfo = weights::pallet_collective_council::WeightInfo&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub type TechnicalCollective = pallet_collective::Instance2;&#xD;&#xA;impl pallet_collective::Config&lt;TechnicalCollective&gt; for Runtime {&#xD;&#xA;	type Origin = Origin;&#xD;&#xA;	type Proposal = Call;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type MotionDuration = TechnicalMotionDuration;&#xD;&#xA;	type MaxProposals = TechnicalMaxProposals;&#xD;&#xA;	type MaxMembers = TechnicalMaxMembers;&#xD;&#xA;	type DefaultVote = pallet_collective::PrimeDefaultVote;&#xD;&#xA;	type WeightInfo = weights::pallet_collective_technical_committee::WeightInfo&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9212" PostHistoryTypeId="2" PostId="2471" RevisionGUID="6de6224a-24d1-4ead-8323-10076b004986" CreationDate="2022-05-09T08:59:08.953" UserId="16" Text="You forgot to tell `pallet-contracts` about your chain extensions [here](https://github.com/driemworks/substrate/blob/f73557b96ef8c7cc1e428a78ea4106b66c165d64/bin/node-template/runtime/src/lib.rs#L314).&#xD;&#xA;&#xD;&#xA;You need to do this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type ChainExtension = IrisExtension;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9214" PostHistoryTypeId="2" PostId="2472" RevisionGUID="68eaa377-292d-45dc-b4f6-023b05f69a49" CreationDate="2022-05-09T09:20:48.713" UserId="2355" Text="I learnt that in storage, we can only have a fixed size for data structures, we cannot have a String, an array... So how, in democracy_pallet, they store a Vec&lt;&gt; and not a BoundedVec&lt;&gt; ?&#xD;&#xA;&#xD;&#xA;for more precision, they have an enum containing a `Vec&lt;u8&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;pub enum PreimageStatus&lt;AccountId, Balance, BlockNumber&gt; {&#xD;&#xA;	/// The preimage is imminently needed at the argument.&#xD;&#xA;	Missing(BlockNumber),&#xD;&#xA;	/// The preimage is available.&#xD;&#xA;	Available {&#xD;&#xA;		data: Vec&lt;u8&gt;, // &lt;-------------- here&#xD;&#xA;		provider: AccountId,&#xD;&#xA;		deposit: Balance,&#xD;&#xA;		since: BlockNumber,&#xD;&#xA;		/// None if it's not imminent.&#xD;&#xA;		expiry: Option&lt;BlockNumber&gt;,&#xD;&#xA;	},&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;that is stored in the pallet's storage&#xD;&#xA;```&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Preimages&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Identity,&#xD;&#xA;		T::Hash,&#xD;&#xA;		PreimageStatus&lt;T::AccountId, BalanceOf&lt;T&gt;, T::BlockNumber&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So how, and why ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="9216" PostHistoryTypeId="1" PostId="2472" RevisionGUID="68eaa377-292d-45dc-b4f6-023b05f69a49" CreationDate="2022-05-09T09:20:48.713" UserId="2355" Text="How does the democracy_pallet store a Vec&lt;&gt; in its storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9217" PostHistoryTypeId="3" PostId="2472" RevisionGUID="68eaa377-292d-45dc-b4f6-023b05f69a49" CreationDate="2022-05-09T09:20:48.713" UserId="2355" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9218" PostHistoryTypeId="2" PostId="2473" RevisionGUID="9e404fc7-b3a7-4988-9969-e208549a9013" CreationDate="2022-05-09T09:30:27.200" UserId="94" Text="You can get the block time of a specific block like this.  &#xD;&#xA;Keep in mind that this only works on an archive node since a pruning node does not have the state of ancient blocks. You can use an indexer for more performance here.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;const blockNum = 10227995;&#xD;&#xA;const hash = await api.rpc.chain.getBlockHash(blockNum);&#xD;&#xA;const header = await api.rpc.chain.getHeader(hash);&#xD;&#xA;const timestamp = await api.query.timestamp.now.at(hash);&#xD;&#xA;const date = new Date(timestamp.toNumber());&#xD;&#xA;&#xD;&#xA;console.log(`Block time for block ${blockNum}: ${date}`)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9224" PostHistoryTypeId="2" PostId="2475" RevisionGUID="fa0acfb6-d460-4964-a84f-58aa152db82d" CreationDate="2022-05-09T09:56:19.117" UserId="2366" Text="You can use the `#[pallet::without_storage_info]` macro to escape the Bounded storage check, and its used by democracy pallet (https://github.com/paritytech/substrate/blob/6e5ee5155aaf8f9c25a1a2292f73a041ab501ed7/frame/democracy/src/lib.rs#L250)" ContentLicense="CC BY-SA 4.0" />
  <row Id="9228" PostHistoryTypeId="5" PostId="2462" RevisionGUID="33aec83b-d7b9-4b8b-9d6f-1cfed5f7e24a" CreationDate="2022-05-09T10:48:48.553" UserId="140" Comment="added 110 characters in body" Text="I have opened a crowdloan to get enough funds to win a parachain slot on Kusama. I just want to know what to do if I don't get enough funds and I don't win the slot: &#xD;&#xA;&#xD;&#xA;1) Do I need to resubmit the crowdloan?&#xD;&#xA;2) Or will it be automatically resubmitted and keep running for the next auction until my chain becomes parachain?&#xD;&#xA;3) If we don't win the slot and the crowdloan gets canceled, what happens to the funds (both those that Kusama reserved for the crowdloan submission, and funds that were contributed by community members)?&#xD;&#xA;4) Can we start a new campaign along with existing one? or we have to wait for the current one to get finished?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9229" PostHistoryTypeId="2" PostId="2477" RevisionGUID="9b349328-f7a0-4855-875e-7d6b44a88b16" CreationDate="2022-05-09T10:50:46.903" UserId="427" Text="type mismatch resolving &lt;sp_core::sr25519::Public as IdentifyAccount&gt;::AccountId == u64&#xD;&#xA;--&gt; pallets/src/mock.rs:76:2&#xD;&#xA;|&#xD;&#xA;76 | type Public = &lt;Signature as Verify&gt;::Signer;&#xD;&#xA;| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found struct" ContentLicense="CC BY-SA 4.0" />
  <row Id="9231" PostHistoryTypeId="1" PostId="2477" RevisionGUID="9b349328-f7a0-4855-875e-7d6b44a88b16" CreationDate="2022-05-09T10:50:46.903" UserId="427" Text="Error facing while mocking runtime for unit testing" ContentLicense="CC BY-SA 4.0" />
  <row Id="9232" PostHistoryTypeId="3" PostId="2477" RevisionGUID="9b349328-f7a0-4855-875e-7d6b44a88b16" CreationDate="2022-05-09T10:50:46.903" UserId="427" Text="|substrate-node-template|unit-tests|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9239" PostHistoryTypeId="2" PostId="2478" RevisionGUID="65462238-aca1-49f2-b0da-3bd2e8338ae9" CreationDate="2022-05-09T12:44:59.933" UserId="2478" Text="We are using [frontier][1] https://github.com/paritytech/frontier for evm support in our substrate chain. EIP 1559 transactions is not enabled for our chain. How to enable EIP 1559 transactions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/frontier" ContentLicense="CC BY-SA 4.0" />
  <row Id="9241" PostHistoryTypeId="1" PostId="2478" RevisionGUID="65462238-aca1-49f2-b0da-3bd2e8338ae9" CreationDate="2022-05-09T12:44:59.933" UserId="2478" Text="How to enable EIP 1559 transactions for EVM with frontier" ContentLicense="CC BY-SA 4.0" />
  <row Id="9242" PostHistoryTypeId="3" PostId="2478" RevisionGUID="65462238-aca1-49f2-b0da-3bd2e8338ae9" CreationDate="2022-05-09T12:44:59.933" UserId="2478" Text="|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9244" PostHistoryTypeId="5" PostId="2477" RevisionGUID="d5bf2e33-dd85-4dac-8d88-6a2c768f6a5c" CreationDate="2022-05-09T13:06:58.873" UserId="28" Comment="added 48 characters in body" Text="Here is the error I am seeing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type mismatch resolving &lt;sp_core::sr25519::Public as IdentifyAccount&gt;::AccountId == u64&#xD;&#xA;--&gt; pallets/src/mock.rs:76:2&#xD;&#xA;|&#xD;&#xA;76 | type Public = &lt;Signature as Verify&gt;::Signer;&#xD;&#xA;| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found struct&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9245" PostHistoryTypeId="2" PostId="2479" RevisionGUID="349f4216-5e0b-4bac-b4c0-32813ad90d46" CreationDate="2022-05-09T13:14:51.243" UserId="28" Text="It seems you have a type mis-configuration here. As the compiler is hinting at you, in one place, you have said that the `AccountId` type should be `u64`, whereas somewhere else, you are using a more complex signature structure.&#xD;&#xA;&#xD;&#xA;You must pick and use just one of these types for your `AccountId`.&#xD;&#xA;&#xD;&#xA;If you want to use a `u64`, I suggest you look at the simple `mock.rs` file generated for the `substrate-node-template` example:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/bin/node-template/pallets/template/src/mock.rs&#xD;&#xA;&#xD;&#xA;If you want to use a more complex public key for the `AccountId`, you can look at the `parallel` example:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/examples/parallel/src/tests.rs#L55" ContentLicense="CC BY-SA 4.0" />
  <row Id="9247" PostHistoryTypeId="2" PostId="2480" RevisionGUID="a64940d2-ee99-4796-bc87-7ae4fff52c83" CreationDate="2022-05-09T13:17:50.623" UserId="28" Text="1. Yes, if you fail to win a slot with your crowdloan after it expires, you will need to start a new campaign. Each crowdloan has a expiration date, so that is when your crowdloan will end.&#xD;&#xA;&#xD;&#xA;2. As long as your crowdloan has not expired, it can keep trying to bid into valid auctions, but as mentioned, once it expires, then you must start a new one.&#xD;&#xA;&#xD;&#xA;3. All funds are returned to the users.&#xD;&#xA;&#xD;&#xA;4. You must wait for the existing one to end before you can start a new crowdloan." ContentLicense="CC BY-SA 4.0" />
  <row Id="9249" PostHistoryTypeId="2" PostId="2481" RevisionGUID="4c6f310a-9d2d-4bcf-a3de-1e0e2a82ed18" CreationDate="2022-05-09T13:28:07.353" UserId="28" Text="This is not a lifetime generic, but a second generic parameter used to specify the instance of a pallet, as @joepetrowski mentioned.&#xD;&#xA;&#xD;&#xA;What an &quot;instance&quot; means is basically we can use all the same pallet logic, but just create a new instance of storage items by changing the storage prefix used.&#xD;&#xA;&#xD;&#xA;You can read [here](https://substrate.stackexchange.com/questions/903/generating-a-storage-key-when-making-an-rpc-request/915#915) for more context on how storage key generation happens in the background.&#xD;&#xA;&#xD;&#xA;But at a high level, every storage key is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;hash(pallet_name) + hash(storage_name)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So this second generic modifies the `pallet_name` to be unique by adding a prefix to the pallet name, and modifying the storage key like so:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;hash(&quot;Instance1&quot; + pallet_name) + hash(storage_name)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;End of the day this is half Substrate magic, in the way that instances modify the behavior of storage key generation, but this is also just normal Rust generics too.&#xD;&#xA;&#xD;&#xA;If we had two structs that were `my_pallet::Pallet&lt;T&gt;`, they would not be different types. However, `my_pallet::Pallet&lt;T, Instance1&gt;` and `my_pallet::Pallet&lt;T, Instance2&gt;` are completely different types in the Rust type system, and would prevent many errors that could occur otherwise." ContentLicense="CC BY-SA 4.0" />
  <row Id="9251" PostHistoryTypeId="4" PostId="2466" RevisionGUID="1314ca3f-8d6d-43a3-b675-441d677fabfc" CreationDate="2022-05-09T13:31:04.370" UserId="28" Comment="edited title" Text="Can I get this timestamp through RPC getblock?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9252" PostHistoryTypeId="5" PostId="2466" RevisionGUID="1314ca3f-8d6d-43a3-b675-441d677fabfc" CreationDate="2022-05-09T13:31:04.370" UserId="28" Comment="edited title" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/oTaYX.png&#xD;&#xA;&#xD;&#xA;Can I get this timestamp through RPC getblock?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9253" PostHistoryTypeId="2" PostId="2482" RevisionGUID="1a24d10b-7b59-486e-87cc-ec86cbd2d77e" CreationDate="2022-05-09T13:40:26.980" UserId="28" Text="Substrate does not directly provide an RPC for these kinds of queries. The Substrate RPC is kept minimal and generic.&#xD;&#xA;&#xD;&#xA;Instead, we provide a tool called [Substrate Sidecar](https://github.com/paritytech/substrate-api-sidecar) which you can run alongside your node, and that provides a REST api for many of the common queries you would expect for a Substrate blockchain.&#xD;&#xA;&#xD;&#xA;With this, you can access the same storage item that Oliver mentioned above:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/pallets/timestamp/storage/now" ContentLicense="CC BY-SA 4.0" />
  <row Id="9255" PostHistoryTypeId="10" PostId="2456" RevisionGUID="a1228886-77cb-4579-9222-e96e7d979ded" CreationDate="2022-05-09T13:45:15.963" UserId="-1" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:627,&quot;DisplayName&quot;:&quot;Jaco&quot;},{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[1]}" />
  <row Id="9256" PostHistoryTypeId="2" PostId="2483" RevisionGUID="7150fd39-dd19-48de-82fd-ecc94f5cf2e7" CreationDate="2022-05-09T14:29:50.023" UserId="489" Text="# Background&#xD;&#xA;our parachain has won the slot and will launch in the future.So,we fistly face that how many collators should be setup in our parachain.Here are some of my questions.&#xD;&#xA;&#xD;&#xA;# confusing question&#xD;&#xA;1. In our fist stage, we use the simple `POA` consensus.Also, we need to setup our own collators.how many collators should we setup can we ensure our parachain network's security?&#xD;&#xA;2. In the second stage, we may launch `POS` mechanism.So, we need to open some seats for &#xD;&#xA;the public collators to produce block.The next two question is that how many public collators seats should we provide?  Is there a quantitative relationship between the number of our own collators and the number of public collators?&#xD;&#xA;3. About the `latency` in parachain, the scene is below:   &#xD;&#xA;  we set a `fixed number` of collators accounts in the chainspec.if i setup one collator to mantain the parachain, the latency is very big.But if i setup the whole fix number of collators, the latency will be small.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;So why that? And another is that, if one collator has dropped，my parachain's network will be affected? Also, After we open some public collators seats,if some public collators dropped, it will affect our network?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ONxNB.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9258" PostHistoryTypeId="1" PostId="2483" RevisionGUID="7150fd39-dd19-48de-82fd-ecc94f5cf2e7" CreationDate="2022-05-09T14:29:50.023" UserId="489" Text="How many collators need to be set on the parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9259" PostHistoryTypeId="3" PostId="2483" RevisionGUID="7150fd39-dd19-48de-82fd-ecc94f5cf2e7" CreationDate="2022-05-09T14:29:50.023" UserId="489" Text="|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9260" PostHistoryTypeId="2" PostId="2484" RevisionGUID="96f2d420-c2ef-433b-9536-8717f90c97c2" CreationDate="2022-05-09T14:35:18.160" UserId="2408" Text="In [this](https://substrate.recipes/basic-pow.html#:~:text=spawn_blocking(%22pow%22%2C%20worker_task)%3B-,The%20Light%20Client,-The%20last%20thing) part of Substrate Recipe it says that I have to create a `new_light` function to build a light client. But there are no details at all. So I took a look at [node template](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/service.rs) and found that there is _no_ `new_light` function there as well (only `new_full`).  &#xD;&#xA;&#xD;&#xA;After that I found this function in Kulupu's [repo](https://github.com/kulupu/kulupu/blob/0f89b1306803e4c7822f332dcdfeaeca7ccc6c6c/src/service.rs#L408). __But__ as I can see, this code is outdated. For example it uses [sc_service::new_light_parts()](https://github.com/kulupu/kulupu/blob/0f89b1306803e4c7822f332dcdfeaeca7ccc6c6c/src/service.rs#L431) function but there is no such function in up-to-date `sc-service` [crate](https://paritytech.github.io/substrate/master/sc_service/index.html?search=sc_service%3A%3Anew_light_parts).&#xD;&#xA;&#xD;&#xA;So I have 2 questions:&#xD;&#xA;- Is it necessary to build a light client? Can a blockchain run normally without it?  &#xD;&#xA;- Are there any other guides to create a light client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9262" PostHistoryTypeId="1" PostId="2484" RevisionGUID="96f2d420-c2ef-433b-9536-8717f90c97c2" CreationDate="2022-05-09T14:35:18.160" UserId="2408" Text="How to Build a Light Client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9263" PostHistoryTypeId="3" PostId="2484" RevisionGUID="96f2d420-c2ef-433b-9536-8717f90c97c2" CreationDate="2022-05-09T14:35:18.160" UserId="2408" Text="|substrate-node-template|client|service|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9264" PostHistoryTypeId="2" PostId="2485" RevisionGUID="d2db4983-129b-4361-8345-876a5d342cf4" CreationDate="2022-05-09T15:34:08.537" UserId="34" Text="Light clients are not explicitly needed for a chain to operate. They can be very useful to compliment a network of full nodes that are preferable in many cases over a full node, especially for end user facing dApps.&#xD;&#xA;&#xD;&#xA;The light client in Substrate itself has been deprecated that you are seeing in those examples, but this is not forgotten! Now there is a stand-alone project that is being worked on by primarily by Parity in the **[smoldot](https://github.com/paritytech/smoldot) light client**. &#xD;&#xA;&#xD;&#xA;For reference to learn more, taken from the READMEs at the time of writting: &#xD;&#xA;&#xD;&#xA;## [Smoldot](https://github.com/paritytech/smoldot)&#xD;&#xA;&#xD;&#xA;smoldot is a prototype of an alternative client of Substrate-based chains, including Polkadot.&#xD;&#xA;&#xD;&#xA;In order to simplify the code, two main design decisions have been made compared to Substrate:&#xD;&#xA;&#xD;&#xA;- No native runtime. The execution time of the wasmtime library is satisfying enough that having a native runtime isn't critical anymore.&#xD;&#xA;&#xD;&#xA;- No pluggable architecture. smoldot supports a certain hard coded list of consensus algorithms, at the moment Babe, Aura, and GrandPa. Support for other algorithms can only be added by modifying the code of smoldot, and it is not possible to plug a custom algorithm from outside.&#xD;&#xA;&#xD;&#xA;There exists two clients: the full client and the wasm light node.&#xD;&#xA;&#xD;&#xA;## [Substrate Connect](https://github.com/paritytech/substrate-connect)&#xD;&#xA;&#xD;&#xA;Substrate connect provides a way to interact with substrate based blockchains in the browser without using an RPC server. Substrate connect uses a smoldot WASM light client to securely connect to the blockchain network without relying on specific 3rd parties.&#xD;&#xA;&#xD;&#xA;## [Smoldot Ads uApp](https://github.com/paritytech/smoldot-ads)&#xD;&#xA;A demo dApp of classified ads using smoldot and substrate-connect." ContentLicense="CC BY-SA 4.0" />
  <row Id="9266" PostHistoryTypeId="2" PostId="2486" RevisionGUID="f9a427b7-8445-433d-b816-57ba6f58e5a6" CreationDate="2022-05-09T15:36:25.370" UserId="380" Text="Currently, we use &quot;live&quot; versions of our contracts running on a substrate contracts node in our JavaScript tests. This makes them integration tests and difficult to include in simple GitHub actions. It would be ideal if we could somehow run the contract as a mock inside our JS environment. Is it possible to run the contract wasm from within our JS/TS environment as a mock contract? Does anyone have any experience of this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9268" PostHistoryTypeId="1" PostId="2486" RevisionGUID="f9a427b7-8445-433d-b816-57ba6f58e5a6" CreationDate="2022-05-09T15:36:25.370" UserId="380" Text="Are there any tools available for creating a mock version of a contract in JS/TS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9269" PostHistoryTypeId="3" PostId="2486" RevisionGUID="f9a427b7-8445-433d-b816-57ba6f58e5a6" CreationDate="2022-05-09T15:36:25.370" UserId="380" Text="|wasm|testing|javascript|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9270" PostHistoryTypeId="6" PostId="2443" RevisionGUID="0304c4bd-878b-4bf1-a02e-d22a91eee103" CreationDate="2022-05-09T15:45:26.840" UserId="34" Comment="tags for serach" Text="|polkadot-js|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9271" PostHistoryTypeId="2" PostId="2487" RevisionGUID="3dcbc559-b1ee-47e6-9640-e47b1511aa47" CreationDate="2022-05-09T15:53:31.797" UserId="34" Text="You can use `--dev` on almost any node, each time you start/restart a node, this will get a random `/tmp/substrateXXXX` folder to contain all the DB and keys for the single session, so you don't need to worry about resetting the DB or anything like that. &#xD;&#xA;&#xD;&#xA;Example assuming you are using the [node template](https://github.com/substrate-developer-hub/substrate-node-template), as illustrated in the [Create your first Substrate blockchain](https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/) tutorial&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;# Starting in the working directory of the node template&#xD;&#xA;cargo b -r&#xD;&#xA;# Build takes a while...&#xD;&#xA;# Once completed, run:&#xD;&#xA;./target/release/node-template --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;# Output looks like:&#xD;&#xA;2021-11-24 15:36:35 Running in --dev mode, RPC CORS has been disabled.&#xD;&#xA;2021-11-24 15:36:35 Substrate Node&#xD;&#xA;2021-11-24 15:36:35 ✌️  version 4.0.0-dev-82b7c2c-aarch64-macos&#xD;&#xA;2021-11-24 15:36:35 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2021&#xD;&#xA;2021-11-24 15:36:35  Chain specification: Development&#xD;&#xA;2021-11-24 15:36:35  Node name: six-wash-9274&#xD;&#xA;2021-11-24 15:36:35  Role: AUTHORITY&#xD;&#xA;2021-11-24 15:36:35  Database: RocksDb at /tmp/substrateP1jD7H/chains/dev/db&#xD;&#xA;2021-11-24 15:36:35 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)&#xD;&#xA;2021-11-24 15:36:35  Initializing Genesis block/state (state: 0xa59b…5331, header-hash: 0xc5d2…37f3)&#xD;&#xA;2021-11-24 15:36:35  Loading GRANDPA authority set from genesis on what appears to be first startup.&#xD;&#xA;2021-11-24 15:36:35 ⏱  Loaded block-time = 6s from block 0xc5d2fdad35e14684753f087c1a20f022274e154d39add4f7efe34e95476a37f3&#xD;&#xA;2021-11-24 15:36:35 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs&#xD;&#xA;2021-11-24 15:36:35  Local node identity is: 12D3KooWG5niQF5bjsFao3D8DZRpUUB6uWZC2pK8hCDZ94zsr8Sc&#xD;&#xA;2021-11-24 15:36:35  Highest known block at #0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Notice: `/tmp/substrateP1jD7H/chains/dev/db` is the DB directory, and each time you start with `--dev`, a random string will be used for the DB. You can restart using that same DB with the `--base-path /tmp/substrateP1jD7H/` flag if you did for some reason want to restart a previous test DB, and override the `--dev` behavior to start a new one. " ContentLicense="CC BY-SA 4.0" />
  <row Id="9273" PostHistoryTypeId="4" PostId="2455" RevisionGUID="70168e31-347c-47a4-8da2-1c99279cb261" CreationDate="2022-05-09T15:54:59.143" UserId="34" Comment="Better tittle for search" Text="How can I purging chain database between tests of a development testnet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9274" PostHistoryTypeId="6" PostId="2455" RevisionGUID="70168e31-347c-47a4-8da2-1c99279cb261" CreationDate="2022-05-09T15:54:59.143" UserId="34" Comment="Better tittle for search" Text="|polkadot|substrate-node-template|database|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9275" PostHistoryTypeId="5" PostId="2487" RevisionGUID="b62b40de-d044-4f0b-b5f3-6db2476f3e28" CreationDate="2022-05-09T15:59:18.087" UserId="34" Comment="added 316 characters in body" Text="You can use `--dev` on almost any node, each time you start/restart a node, this will get a random `/tmp/substrateXXXX` folder to contain all the DB and keys for the single session, so you don't need to worry about resetting the DB or anything like that. &#xD;&#xA;&#xD;&#xA;Example assuming you are using the [node template](https://github.com/substrate-developer-hub/substrate-node-template), as illustrated in the [Create your first Substrate blockchain](https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/) tutorial&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;# Starting in the working directory of the node template&#xD;&#xA;cargo b -r&#xD;&#xA;# Build takes a while...&#xD;&#xA;# Once completed, run:&#xD;&#xA;./target/release/node-template --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;# Output looks like:&#xD;&#xA;2021-11-24 15:36:35 Running in --dev mode, RPC CORS has been disabled.&#xD;&#xA;2021-11-24 15:36:35 Substrate Node&#xD;&#xA;2021-11-24 15:36:35 ✌️  version 4.0.0-dev-82b7c2c-aarch64-macos&#xD;&#xA;2021-11-24 15:36:35 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2021&#xD;&#xA;2021-11-24 15:36:35  Chain specification: Development&#xD;&#xA;2021-11-24 15:36:35  Node name: six-wash-9274&#xD;&#xA;2021-11-24 15:36:35  Role: AUTHORITY&#xD;&#xA;2021-11-24 15:36:35  Database: RocksDb at /tmp/substrateP1jD7H/chains/dev/db&#xD;&#xA;2021-11-24 15:36:35 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)&#xD;&#xA;2021-11-24 15:36:35  Initializing Genesis block/state (state: 0xa59b…5331, header-hash: 0xc5d2…37f3)&#xD;&#xA;2021-11-24 15:36:35  Loading GRANDPA authority set from genesis on what appears to be first startup.&#xD;&#xA;2021-11-24 15:36:35 ⏱  Loaded block-time = 6s from block 0xc5d2fdad35e14684753f087c1a20f022274e154d39add4f7efe34e95476a37f3&#xD;&#xA;2021-11-24 15:36:35 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs&#xD;&#xA;2021-11-24 15:36:35  Local node identity is: 12D3KooWG5niQF5bjsFao3D8DZRpUUB6uWZC2pK8hCDZ94zsr8Sc&#xD;&#xA;2021-11-24 15:36:35  Highest known block at #0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Notice: `/tmp/substrateP1jD7H/chains/dev/db` is the DB directory, and each time you start with `--dev`, a random string will be used for the DB. You can restart using that same DB with the `--base-path /tmp/substrateP1jD7H/` flag if you did for some reason want to restart a previous test DB, and override the `--dev` behavior to start a new one. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You can manually purge the DB only for a chain with the `purge-chain` subcommand on most nodes as well:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;# Clear a specific base path specified chain&#xD;&#xA;./target/release/node-template purge-chain --base-path /tmp/substrateP1jD7H/&#xD;&#xA;&#xD;&#xA;# Clear &#xD;&#xA;./target/release/node-template purge-chain --local&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9276" PostHistoryTypeId="6" PostId="2484" RevisionGUID="aeea804d-2128-4f5c-8661-d45b7c3f4f89" CreationDate="2022-05-09T16:14:34.180" UserId="34" Comment="edited tags" Text="|light-client|substrate-recipies|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9277" PostHistoryTypeId="52" PostId="2468" RevisionGUID="c42024de-9ac1-4f36-b35d-664f33c643ba" CreationDate="2022-05-09T16:38:44.800" />
  <row Id="9278" PostHistoryTypeId="2" PostId="2488" RevisionGUID="3fe63993-b31f-4ab8-bdc2-17b30c393ebd" CreationDate="2022-05-09T16:38:51.973" UserId="2519" Text="I am developing the tool to create and sign a transaction, but I find nothing about the format of a transaction before signing. Could you please help me to find out the document about this issue. Thank you so much." ContentLicense="CC BY-SA 4.0" />
  <row Id="9280" PostHistoryTypeId="1" PostId="2488" RevisionGUID="3fe63993-b31f-4ab8-bdc2-17b30c393ebd" CreationDate="2022-05-09T16:38:51.973" UserId="2519" Text="How to create and sign a transaction by myself" ContentLicense="CC BY-SA 4.0" />
  <row Id="9281" PostHistoryTypeId="3" PostId="2488" RevisionGUID="3fe63993-b31f-4ab8-bdc2-17b30c393ebd" CreationDate="2022-05-09T16:38:51.973" UserId="2519" Text="|polkadot-js|extrinsic|transactions|signing|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9282" PostHistoryTypeId="2" PostId="2489" RevisionGUID="7d2394f0-31d6-4a4d-88f6-7c0eec948604" CreationDate="2022-05-09T17:19:35.673" UserId="620" Text="There is a guide here:&#xD;&#xA;https://wiki.polkadot.network/docs/build-transaction-construction&#xD;&#xA;&#xD;&#xA;////////////////////////////////&#xD;&#xA;...must have more characters..." ContentLicense="CC BY-SA 4.0" />
  <row Id="9284" PostHistoryTypeId="2" PostId="2490" RevisionGUID="30cadf2a-f807-4f07-8aac-3ebc2ff44a3c" CreationDate="2022-05-09T18:03:33.423" UserId="716" Text="I know that you can use the Polkadot.js API to find the balance for the native token from the system constants like so&#xD;&#xA;```&#xD;&#xA;const { nonce, data: balance } = await api.query.system.account(ADDR);&#xD;&#xA;```&#xD;&#xA;Is there a way to find the balance for other tokens on a chain, for example Moonriver or Karura will have many tokens and I would like to find the balance for each token held on that parachain.  Thanks in advance.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9286" PostHistoryTypeId="1" PostId="2490" RevisionGUID="30cadf2a-f807-4f07-8aac-3ebc2ff44a3c" CreationDate="2022-05-09T18:03:33.423" UserId="716" Text="How to use API to find balances for all different tokens on a chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9287" PostHistoryTypeId="3" PostId="2490" RevisionGUID="30cadf2a-f807-4f07-8aac-3ebc2ff44a3c" CreationDate="2022-05-09T18:03:33.423" UserId="716" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9288" PostHistoryTypeId="2" PostId="2491" RevisionGUID="575cc328-cb5c-4d50-bd83-4dd32072c525" CreationDate="2022-05-09T18:09:01.397" UserId="245" Text="Try adding `--rpc-cors all`. If you are running in `--dev` mode the default is to allow all origins.&#xD;&#xA;&#xD;&#xA;*./target/release/node-template --help*&#xD;&#xA;```&#xD;&#xA;--rpc-cors &lt;ORIGINS&gt;&#xD;&#xA;  Specify browser Origins allowed to access the HTTP &amp; WS RPC servers.&#xD;&#xA;            &#xD;&#xA;  A comma-separated list of origins (protocol://domain or special `null` value). Value of&#xD;&#xA;  `all` will disable origin validation. Default is to allow localhost and&#xD;&#xA;  &lt;https://polkadot.js.org&gt; origins. When running in --dev mode the default &#xD;&#xA;  is to allow all origins.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9290" PostHistoryTypeId="2" PostId="2492" RevisionGUID="7ab6748f-7ea6-4757-8fb9-2f97f128d19f" CreationDate="2022-05-09T21:58:44.303" UserId="477" Text="*Disc: I know about the existence of `ChainExtension` feature. Here I would like to ask about the other way.*&#xD;&#xA;&#xD;&#xA;There is this `CallFilter` thing in `Config` for `pallet-contracts` and IIUC it defines what kind of runtime calls I can do from within the contract. In all examples I saw, it is set to `Nothing`. Let's suppose I set it to `Everything` - what kind of runtime calls I can then do from within a smart contract and where can I find an example how to do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9292" PostHistoryTypeId="1" PostId="2492" RevisionGUID="7ab6748f-7ea6-4757-8fb9-2f97f128d19f" CreationDate="2022-05-09T21:58:44.303" UserId="477" Text="Dispatching a runtime call from an ink! smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="9293" PostHistoryTypeId="3" PostId="2492" RevisionGUID="7ab6748f-7ea6-4757-8fb9-2f97f128d19f" CreationDate="2022-05-09T21:58:44.303" UserId="477" Text="|ink|runtime|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9294" PostHistoryTypeId="52" PostId="2484" RevisionGUID="1e88b7e1-e7d4-4db1-8369-3fcaaec97493" CreationDate="2022-05-09T22:36:34.850" />
  <row Id="9295" PostHistoryTypeId="5" PostId="2492" RevisionGUID="8f463cb3-c109-4fd2-91dd-b024b88ed96a" CreationDate="2022-05-09T22:53:21.860" UserId="477" Comment="deleted 16 characters in body" Text="*Disc: I know about the existence of `ChainExtension` feature. Here I would like to ask about the other way.*&#xD;&#xA;&#xD;&#xA;There is this `CallFilter` thing in `Config` for `pallet-contracts` and IIUC it defines what kind of runtime calls I can do from within the contract. In all examples I saw, it is set to `Nothing`. Let's suppose I set it to `Everything` - what kind of runtime calls I can then do from a contract? Where can I find an example how to do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9296" PostHistoryTypeId="2" PostId="2493" RevisionGUID="62ab5d62-5187-4a6e-a965-8c81343d9058" CreationDate="2022-05-10T03:05:53.793" UserId="590" Text="When running benchmarks do the result consider that multiple reads to the same value per block are cached as mentioned in the documentation referenced below?&#xD;&#xA;&#xD;&#xA;If caching is not considered in the benchmarks:&#xD;&#xA;- Is it possible to run benchmarks with cache and how?&#xD;&#xA;- Is it recommended to run benchmarks with cache?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Runtime storage allows you to store data in your blockchain that is persisted between blocks and can be accessed from within your runtime logic&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/v3/runtime/storage/&#xD;&#xA;&#xD;&#xA;&gt;Multiple reads of the same value count as one read.&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/v3/runtime/weights-and-fees/#parameterizing-over-database-accesses" ContentLicense="CC BY-SA 4.0" />
  <row Id="9298" PostHistoryTypeId="1" PostId="2493" RevisionGUID="62ab5d62-5187-4a6e-a965-8c81343d9058" CreationDate="2022-05-10T03:05:53.793" UserId="590" Text="Do benchmarks consider cached reads?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9299" PostHistoryTypeId="3" PostId="2493" RevisionGUID="62ab5d62-5187-4a6e-a965-8c81343d9058" CreationDate="2022-05-10T03:05:53.793" UserId="590" Text="|extrinsic|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9300" PostHistoryTypeId="6" PostId="2483" RevisionGUID="9e7f4d5d-b571-4453-b280-72855ea30ddb" CreationDate="2022-05-10T04:41:10.780" UserId="489" Comment="edited tags" Text="|consensus|collator|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9301" PostHistoryTypeId="5" PostId="1297" RevisionGUID="bd758f97-db81-42c1-9785-7555bb224dfe" CreationDate="2022-05-10T05:59:00.927" UserId="627" Comment="Add missing &quot;Governance&quot; type" Text="To wrap something in a proxy, just pass the `api.tx.&lt;module&gt;.&lt;method&gt;(...)` as-is. &#xD;&#xA;&#xD;&#xA;In code it would be -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;function proxyVoting(address, type, ref_index, vote) { &#xD;&#xA;  return api.tx.proxy.proxy(&#xD;&#xA;    address,&#xD;&#xA;    'Governance',&#xD;&#xA;    api.tx.democracy.vote(ref_index, vote)&#xD;&#xA;  );&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The same applies everywhere you need to pass a `Call` e.g. batch transactions, sudo, etc." ContentLicense="CC BY-SA 4.0" />
  <row Id="9302" PostHistoryTypeId="2" PostId="2494" RevisionGUID="7f9db7b3-3869-4e9d-8114-49221cae1b94" CreationDate="2022-05-10T06:42:39.873" UserId="627" Text="If you just use `chain_getBlock`, one of the extrinsics would be `timestamp.set` as applied by the block author. &#xD;&#xA;&#xD;&#xA;This contains the `Compact&lt;u64&gt;` value of the current timestamp, i.e. milliseconds since epoch. It will match with the `timestamp.now` in the state. &#xD;&#xA;&#xD;&#xA;Since it is an extrinsic, it is available in all nodes, even those where the state has been pruned - assuming obviously that the chain runtime logic adds these `timestamp.set` extrinsics, which most do." ContentLicense="CC BY-SA 4.0" />
  <row Id="9304" PostHistoryTypeId="2" PostId="2495" RevisionGUID="b38b7f16-3d25-41ab-bcc1-98972ebe62f3" CreationDate="2022-05-10T06:54:26.810" UserId="1838" Text="When I go to add a validator to a parachain, using the snapshot(https://ksm-rocksdb.polkashots.io/) does tell me that the db version is wrong:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Service(Client(Backend(&quot;Database version comes from future version of the client: 4&quot;))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9306" PostHistoryTypeId="1" PostId="2495" RevisionGUID="b38b7f16-3d25-41ab-bcc1-98972ebe62f3" CreationDate="2022-05-10T06:54:26.810" UserId="1838" Text="snapshot error: Database version comes from future version of the client: 4" ContentLicense="CC BY-SA 4.0" />
  <row Id="9307" PostHistoryTypeId="3" PostId="2495" RevisionGUID="b38b7f16-3d25-41ab-bcc1-98972ebe62f3" CreationDate="2022-05-10T06:54:26.810" UserId="1838" Text="|snapshot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9308" PostHistoryTypeId="2" PostId="2496" RevisionGUID="e8ceecda-b26b-478b-b4e7-5c94b72f635a" CreationDate="2022-05-10T07:06:14.307" UserId="94" Text="Benchmarking does always take caching into account.  &#xD;&#xA;The [BenchmarkingState](https://github.com/paritytech/substrate/blob/6e5ee5155aaf8f9c25a1a2292f73a041ab501ed7/client/db/src/bench.rs#L78) which is used by the Pallet benchmarking counts storage Reads/Writes per key.  &#xD;&#xA;It then only takes at most one of each, therefore assuming that a key cannot be Read/Written more than once per block [here](https://github.com/paritytech/substrate/blob/6e5ee5155aaf8f9c25a1a2292f73a041ab501ed7/client/db/src/bench.rs#L571).  &#xD;&#xA;This works since all storage modifications are cached until the whole block gets written back to storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="9310" PostHistoryTypeId="2" PostId="2497" RevisionGUID="a72e43cb-f9ff-42f3-9405-b121c46fbc4f" CreationDate="2022-05-10T07:13:19.473" UserId="2102" Text="After a few attempts, the only way to make it work was to supply an array of bytes but using ASCII encoding.&#xD;&#xA;&#xD;&#xA;Example to query item with id '1234':&#xD;&#xA;```&#xD;&#xA;~ % curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;items_getItemById&quot;, &quot;params&quot;: [null, [49, 50, 51, 52]] }' http://localhost:9933&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After making this work, I was able to query multiple items (1234, 1762) providing a vector of bytes like &#xD;&#xA;```&#xD;&#xA;&quot;params&quot;: [null, [[49, 50, 51, 52], [49, 55, 54, 50]]]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9312" PostHistoryTypeId="2" PostId="2498" RevisionGUID="08deacf2-454a-40e6-a5da-3d6a64b8a29a" CreationDate="2022-05-10T08:30:15.600" UserId="2379" Text="Fix. Parachain account needs ROC on rococo-local Relaychain." ContentLicense="CC BY-SA 4.0" />
  <row Id="9314" PostHistoryTypeId="2" PostId="2499" RevisionGUID="3081e083-3b20-42e5-a80a-f681f27d113c" CreationDate="2022-05-10T08:30:22.080" UserId="2481" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BAcI8.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Why do I use HTTP to request the RPC method getblock. Don't you see the return message (timestamp. Now)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9316" PostHistoryTypeId="5" PostId="2491" RevisionGUID="a6f301d1-bb16-4053-b9d3-6835c1120d4d" CreationDate="2022-05-10T10:31:37.780" UserId="83" Comment="make it clear what the command does" Text="Try adding `--rpc-cors all`. If you are running in `--dev` mode the default is to allow all origins.&#xD;&#xA;&#xD;&#xA;If you view the node executable help (i.e. `./target/release/node-template --help`) the output includes:&#xD;&#xA;```&#xD;&#xA;--rpc-cors &lt;ORIGINS&gt;&#xD;&#xA;  Specify browser Origins allowed to access the HTTP &amp; WS RPC servers.&#xD;&#xA;            &#xD;&#xA;  A comma-separated list of origins (protocol://domain or special `null` value). Value of&#xD;&#xA;  `all` will disable origin validation. Default is to allow localhost and&#xD;&#xA;  &lt;https://polkadot.js.org&gt; origins. When running in --dev mode the default &#xD;&#xA;  is to allow all origins.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9317" PostHistoryTypeId="2" PostId="2500" RevisionGUID="c8135a92-e320-4b0d-84e6-60bf313f0e6e" CreationDate="2022-05-10T10:35:34.633" UserId="1789" Text="I have tested the Zombienet example network definition and feature files with default images.&#xD;&#xA;How can I test my custom parachain? &#xD;&#xA;&#xD;&#xA;I have an existing docker-compose yaml file&#xD;&#xA;```&#xD;&#xA;version: &quot;3.2&quot;&#xD;&#xA;&#xD;&#xA;services:&#xD;&#xA;  collator:&#xD;&#xA;    container_name: collator&#xD;&#xA;    image: paidnetwork/collator&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30343:30343&quot;&#xD;&#xA;      - &quot;40333:40333&quot;&#xD;&#xA;      - &quot;6969:6969&quot;&#xD;&#xA;      - &quot;8844:8844&quot;&#xD;&#xA;      - &quot;9977:9977&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;    depends_on:&#xD;&#xA;      - charlie-relay&#xD;&#xA;  alice-relay:&#xD;&#xA;    container_name: alice-relay&#xD;&#xA;    image: paidnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30333:30333&quot;&#xD;&#xA;      - &quot;9944:9944&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;&#xD;&#xA;  bob-relay:&#xD;&#xA;    container_name: bob-relay&#xD;&#xA;    image: paidnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30334:30334&quot;&#xD;&#xA;      - &quot;9945:9945&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --bob --validator --base-path /tmp/relay/bob --chain rococo-custom-2-raw.json --port 30334 --ws-port 9945 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; bob.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;&#xD;&#xA;  charlie-relay:&#xD;&#xA;    container_name: charlie-relay&#xD;&#xA;    image: paidnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30335:30335&quot;&#xD;&#xA;      - &quot;9946:9946&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --charlie --validator --base-path /tmp/relay/charlie --chain rococo-custom-2-raw.json --port 30335 --ws-port 9946 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; charlie.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;&#xD;&#xA;  frontend:&#xD;&#xA;    container_name: frontend&#xD;&#xA;    image: jacogr/polkadot-js-apps:latest&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;80:80&quot;&#xD;&#xA;    depends_on:&#xD;&#xA;      - collator&#xD;&#xA;```&#xD;&#xA;From the example 0001-small-network.toml file, I keep default_command and default_args the same, but override them in each relay chain node via `commandWithArgs`&#xD;&#xA;&#xD;&#xA;Then I copied alice relay chain node command from above and pasted them into my 0001-small-network.toml as&#xD;&#xA;```&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  commandWithArgs = 'bash -c... &quot;...&quot; '&#xD;&#xA;```&#xD;&#xA;But how about alice node's ports from the docker-compose yaml file? the copied command has ports in it...&#xD;&#xA;&#xD;&#xA;About parachain collator, I copied its command from the docker-compose yaml file. but how about the ports again?&#xD;&#xA;My parachain command has port values in it, too... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  commandWithArgs = 'bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null&quot;'&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  commandWithArgs = 'bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --bob --validator --base-path /tmp/relay/bob --chain rococo-custom-2-raw.json --port 30334 --ws-port 9945 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; bob.out 2&gt;&amp;1; tail -f /dev/null&quot;'&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 100&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;...&quot;&#xD;&#xA;  command = 'bash -c &quot;apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null&quot;'&#xD;&#xA;&#xD;&#xA;[types.Heade2r]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;Is that the correct way to do it? Thank you&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9319" PostHistoryTypeId="1" PostId="2500" RevisionGUID="c8135a92-e320-4b0d-84e6-60bf313f0e6e" CreationDate="2022-05-10T10:35:34.633" UserId="1789" Text="How to make Zombienet test files from a docker-compose yaml file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9320" PostHistoryTypeId="3" PostId="2500" RevisionGUID="c8135a92-e320-4b0d-84e6-60bf313f0e6e" CreationDate="2022-05-10T10:35:34.633" UserId="1789" Text="|docker|zombienet|kubernetes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9321" PostHistoryTypeId="2" PostId="2501" RevisionGUID="cf2a3482-99aa-4173-b9cd-eb001bac1285" CreationDate="2022-05-10T11:27:38.297" UserId="16" Text="This will allow a contract to call every dispatchable of every pallet just as any off chain actor could do by submitting an extrinsic. See the [documentation of `seal_call_runtime`](https://github.com/paritytech/substrate/blob/e0ccd008fe8bfaf29357ea87561e60f3baaae08c/frame/contracts/src/wasm/runtime.rs#L1924-L1960) for more information.&#xD;&#xA;&#xD;&#xA;Please note that this functionality is currently flagged [unstable](https://github.com/paritytech/substrate/tree/master/frame/contracts#unstable-interfaces) and therefore not to be used in production, yet. It is unclear whether the functionality is actually useful it its current form. There is also no support within ink!, yet. Hence I don't know of any example." ContentLicense="CC BY-SA 4.0" />
  <row Id="9323" PostHistoryTypeId="2" PostId="2502" RevisionGUID="7cc58083-8072-4f0b-9a9c-6e57e89add08" CreationDate="2022-05-10T11:45:26.897" UserId="73" Text="You can run your node with `--tmp`. This will put the database into a temporary directory that is deleted when the node is closed. Thus, every time you will start again from genesis." ContentLicense="CC BY-SA 4.0" />
  <row Id="9325" PostHistoryTypeId="2" PostId="2503" RevisionGUID="2d412c70-ffcc-4035-bfbc-a0b442a0caf3" CreationDate="2022-05-10T12:03:42.517" UserId="1861" Text="There are a few things that jumped at me looking at those configurations:&#xD;&#xA;&#xD;&#xA;* `apt-get install -y wget;` should be done as part of the container setup, if you need this, derive another container from `docker.io/parity/polkadot:v0.9.18`&#xD;&#xA;* `nohup` is not necessary and not useful in this context. One usually wants all the logs.&#xD;&#xA;* `bash -c` is not really needed for a single command&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA; Generally one should not provide the port arguments unless explicitly needed and let zombienet figure those out as much as possible." ContentLicense="CC BY-SA 4.0" />
  <row Id="9327" PostHistoryTypeId="5" PostId="2503" RevisionGUID="07329f09-ca04-43ac-80ad-589730904338" CreationDate="2022-05-10T12:15:22.690" UserId="1861" Comment="added 102 characters in body" Text="There are a few things that jumped at me looking at those configurations:&#xD;&#xA;&#xD;&#xA;* `apt-get install -y wget;` should be done as part of the container setup, if you need this, derive another container from `docker.io/parity/polkadot:v0.9.18`&#xD;&#xA;* `nohup` is not necessary and not useful in this context. One usually wants all the logs.&#xD;&#xA;* `bash -c` is not really needed for a single command&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA; Generally one should not provide the port arguments unless explicitly needed and let zombienet figure those out as much as possible. Zombienet will add cli flags, and expectes the `command` specified to understand substrate cli flags." ContentLicense="CC BY-SA 4.0" />
  <row Id="9328" PostHistoryTypeId="5" PostId="2503" RevisionGUID="c55ef913-da64-49f5-965b-11670a0247b1" CreationDate="2022-05-10T12:41:13.590" UserId="1861" Comment="added 126 characters in body" Text="There are a few things that jumped at me looking at those configurations:&#xD;&#xA;&#xD;&#xA;* `apt-get install -y wget;` should be done as part of the container setup, if you need this, derive another container from `docker.io/parity/polkadot:v0.9.18`&#xD;&#xA;* `nohup` is not necessary and not useful in this context. One usually wants all the logs.&#xD;&#xA;* `bash -c` is not really needed for a single command&#xD;&#xA;&#xD;&#xA;* redirecting output to files in the container is not recommended, it's best to use dedicated logging infra for kubernetes&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA; Generally one should not provide the port arguments unless explicitly needed and let zombienet figure those out as much as possible. Zombienet will add cli flags, and expectes the `command` specified to understand substrate cli flags." ContentLicense="CC BY-SA 4.0" />
  <row Id="9329" PostHistoryTypeId="2" PostId="2504" RevisionGUID="b723ece5-5a57-4fc5-8ec7-b2459a1f0944" CreationDate="2022-05-10T12:43:31.253" UserId="2502" Text="I am a beginner at learning Rust/substrate/Polkadot.&#xD;&#xA;I am trying to build my custom substrate pallet&#xD;&#xA;&#xD;&#xA;My goal is,&#xD;&#xA;Create a custom Substrate pallet that allows only the `Root` origin account to control the list of group members to a set of accounts for at least two different groups, where&#xD;&#xA;* Only the `Root` origin account can add an account as a member of a group in on-chain storage&#xD;&#xA;* Only the `Root` origin account can remove an account from being a member of a group in on-chain storage&#xD;&#xA;&#xD;&#xA;There are many Rust errors.&#xD;&#xA;Anyone who can teach me.&#xD;&#xA;I attached my working source code.&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;// The pallet's runtime storage items.&#xD;&#xA;// https://substrate.dev/docs/en/knowledgebase/runtime/storage&#xD;&#xA;decl_storage! {&#xD;&#xA;	trait Store for Module&lt;T: Config&gt; as GroupModule {&#xD;&#xA;		pub Group get(fn get_group): map hasher(blake2_128_concat) T::AccountId =&gt; Vec&lt;u8&gt;;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;// Errors inform users that something went wrong.&#xD;&#xA;decl_error! {&#xD;&#xA;	pub enum Error for Module&lt;T: Config&gt; {&#xD;&#xA;		AccountAlreadyAdded,&#xD;&#xA;		AccountAlreadyRemoved,&#xD;&#xA;		AccountNotFound,&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;decl_module! {&#xD;&#xA;	pub struct Module&lt;T: Config&gt; for enum Call where origin: T::Origin {&#xD;&#xA;		// Errors must be initialized if they are used by the pallet.&#xD;&#xA;		type Error = Error&lt;T&gt;;&#xD;&#xA;&#xD;&#xA;		// Events must be initialized if they are used by the pallet.&#xD;&#xA;		fn deposit_event() = default;&#xD;&#xA;&#xD;&#xA;		#[weight = 10_000 + T::DbWeight::get().reads_writes(1, 1)]&#xD;&#xA;		pub fn add_group_member(&#xD;&#xA;			origin, &#xD;&#xA;			new_account: T::AccountId,			&#xD;&#xA;			group_no: u8,&#xD;&#xA;		) -&gt; dispatch::DispatchResult {&#xD;&#xA;&#xD;&#xA;			// Can only be called by the root.&#xD;&#xA;			ensure_root(origin)?;&#xD;&#xA;&#xD;&#xA;			// Read a vector value from storage.&#xD;&#xA;			let mut groups = &lt;Group&lt;T&gt;&gt;::get(&amp;new_account);&#xD;&#xA;			//match &lt;Group&lt;T&gt;&gt;::get(&amp;new_account) {  //error: mismatched types&#xD;&#xA;				//None =&gt; Err(Error::&lt;T&gt;::AccountNotFound)?, //error&#xD;&#xA;			//	groups =&gt; {&#xD;&#xA;					if groups.contains(&amp;group_no) {   //error[E0308]: mismatched types&#xD;&#xA;						//Err(Error::&lt;T&gt;::AccountAlreadyAdded)?&#xD;&#xA;					} else {  //error: expected enum `Result`, found `()`&#xD;&#xA;						// Update storage.&#xD;&#xA;						groups.push(group_no);&#xD;&#xA;						&lt;Group&lt;T&gt;&gt;::insert(&amp;new_account, &amp;groups);&#xD;&#xA;						// Emit an event.&#xD;&#xA;						Self::deposit_event(RawEvent::GroupMemberAdded(new_account, groups));&#xD;&#xA;						// Return a successful DispatchResult&#xD;&#xA;						Ok(())&#xD;&#xA;					}&#xD;&#xA;				//},&#xD;&#xA;			//}			&#xD;&#xA;		}&#xD;&#xA;...&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="9331" PostHistoryTypeId="1" PostId="2504" RevisionGUID="b723ece5-5a57-4fc5-8ec7-b2459a1f0944" CreationDate="2022-05-10T12:43:31.253" UserId="2502" Text="Building my substrate pallet - Rust errors" ContentLicense="CC BY-SA 4.0" />
  <row Id="9332" PostHistoryTypeId="3" PostId="2504" RevisionGUID="b723ece5-5a57-4fc5-8ec7-b2459a1f0944" CreationDate="2022-05-10T12:43:31.253" UserId="2502" Text="|pallet|rust|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9333" PostHistoryTypeId="5" PostId="2500" RevisionGUID="b76caf17-28f1-4a4d-90e7-f961591bba1f" CreationDate="2022-05-10T13:12:25.657" UserId="1789" Comment="deleted 12 characters in body" Text="I have tested the Zombienet example network definition and feature files with default images.&#xD;&#xA;How can I test my custom parachain? &#xD;&#xA;&#xD;&#xA;I have an existing docker-compose yaml file&#xD;&#xA;```&#xD;&#xA;version: &quot;3.2&quot;&#xD;&#xA;&#xD;&#xA;services:&#xD;&#xA;  collator:&#xD;&#xA;    container_name: collator&#xD;&#xA;    image: pnetwork/collator&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30343:30343&quot;&#xD;&#xA;      - &quot;40333:40333&quot;&#xD;&#xA;      - &quot;6969:6969&quot;&#xD;&#xA;      - &quot;8844:8844&quot;&#xD;&#xA;      - &quot;9977:9977&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;    depends_on:&#xD;&#xA;      - charlie-relay&#xD;&#xA;  alice-relay:&#xD;&#xA;    container_name: alice-relay&#xD;&#xA;    image: pnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30333:30333&quot;&#xD;&#xA;      - &quot;9944:9944&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;&#xD;&#xA;  bob-relay:&#xD;&#xA;    container_name: bob-relay&#xD;&#xA;    image: pnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30334:30334&quot;&#xD;&#xA;      - &quot;9945:9945&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --bob --validator --base-path /tmp/relay/bob --chain rococo-custom-2-raw.json --port 30334 --ws-port 9945 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; bob.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;&#xD;&#xA;  charlie-relay:&#xD;&#xA;    container_name: charlie-relay&#xD;&#xA;    image: pnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30335:30335&quot;&#xD;&#xA;      - &quot;9946:9946&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --charlie --validator --base-path /tmp/relay/charlie --chain rococo-custom-2-raw.json --port 30335 --ws-port 9946 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; charlie.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;&#xD;&#xA;  frontend:&#xD;&#xA;    container_name: frontend&#xD;&#xA;    image: jacogr/polkadot-js-apps:latest&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;80:80&quot;&#xD;&#xA;    depends_on:&#xD;&#xA;      - collator&#xD;&#xA;```&#xD;&#xA;From the example 0001-small-network.toml file, I keep default_command and default_args the same, but override them in each relay chain node via `commandWithArgs`&#xD;&#xA;&#xD;&#xA;Then I copied alice relay chain node command from above and pasted them into my 0001-small-network.toml as&#xD;&#xA;```&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  commandWithArgs = 'bash -c... &quot;...&quot; '&#xD;&#xA;```&#xD;&#xA;But how about alice node's ports from the docker-compose yaml file? the copied command has ports in it...&#xD;&#xA;&#xD;&#xA;About parachain collator, I copied its command from the docker-compose yaml file. but how about the ports again?&#xD;&#xA;My parachain command has port values in it, too... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  commandWithArgs = 'bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null&quot;'&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  commandWithArgs = 'bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --bob --validator --base-path /tmp/relay/bob --chain rococo-custom-2-raw.json --port 30334 --ws-port 9945 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; bob.out 2&gt;&amp;1; tail -f /dev/null&quot;'&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 100&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;...&quot;&#xD;&#xA;  command = 'bash -c &quot;apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null&quot;'&#xD;&#xA;&#xD;&#xA;[types.Heade2r]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;Is that the correct way to do it? Thank you&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9334" PostHistoryTypeId="2" PostId="2505" RevisionGUID="b962cfe9-ef7f-4879-bd2b-28bb3cbab48b" CreationDate="2022-05-10T13:21:04.837" UserId="1803" Text="I'm running a migration, and I'd like to understand if `on_runtime_upgrade` exceeds block time, Substrate still can handle this correctly or not? What are the consequences?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9336" PostHistoryTypeId="1" PostId="2505" RevisionGUID="b962cfe9-ef7f-4879-bd2b-28bb3cbab48b" CreationDate="2022-05-10T13:21:04.837" UserId="1803" Text="If on_runtime_upgrade exceeds block time" ContentLicense="CC BY-SA 4.0" />
  <row Id="9337" PostHistoryTypeId="3" PostId="2505" RevisionGUID="b962cfe9-ef7f-4879-bd2b-28bb3cbab48b" CreationDate="2022-05-10T13:21:04.837" UserId="1803" Text="|runtime-upgrade|on-runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9338" PostHistoryTypeId="2" PostId="2506" RevisionGUID="2e445f7a-d009-4ccb-a118-5a53de1ae439" CreationDate="2022-05-10T13:24:33.450" UserId="1803" Text="We've managed to upgrade the runtime and save the block history.&#xD;&#xA;It's still not clear what was the exact root cause, but we've created a runtime from scratch and added all of the FRAME pallets. After upgrading the node in the first place, the runtime was upgraded successfully." ContentLicense="CC BY-SA 4.0" />
  <row Id="9340" PostHistoryTypeId="5" PostId="2500" RevisionGUID="603eb265-35b9-4d9a-b15c-4f6d0e8bdec5" CreationDate="2022-05-10T15:01:38.930" UserId="1789" Comment="deleted 1 character in body" Text="I have tested the Zombienet example network definition and feature files with default images.&#xD;&#xA;How can I test my custom parachain? &#xD;&#xA;&#xD;&#xA;I have an existing docker-compose yaml file&#xD;&#xA;```&#xD;&#xA;version: &quot;3.2&quot;&#xD;&#xA;&#xD;&#xA;services:&#xD;&#xA;  collator:&#xD;&#xA;    container_name: collator&#xD;&#xA;    image: pnetwork/collator&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30343:30343&quot;&#xD;&#xA;      - &quot;40333:40333&quot;&#xD;&#xA;      - &quot;6969:6969&quot;&#xD;&#xA;      - &quot;8844:8844&quot;&#xD;&#xA;      - &quot;9977:9977&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;    depends_on:&#xD;&#xA;      - charlie-relay&#xD;&#xA;  alice-relay:&#xD;&#xA;    container_name: alice-relay&#xD;&#xA;    image: pnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30333:30333&quot;&#xD;&#xA;      - &quot;9944:9944&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;&#xD;&#xA;  bob-relay:&#xD;&#xA;    container_name: bob-relay&#xD;&#xA;    image: pnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30334:30334&quot;&#xD;&#xA;      - &quot;9945:9945&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --bob --validator --base-path /tmp/relay/bob --chain rococo-custom-2-raw.json --port 30334 --ws-port 9945 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; bob.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;&#xD;&#xA;  charlie-relay:&#xD;&#xA;    container_name: charlie-relay&#xD;&#xA;    image: pnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30335:30335&quot;&#xD;&#xA;      - &quot;9946:9946&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --charlie --validator --base-path /tmp/relay/charlie --chain rococo-custom-2-raw.json --port 30335 --ws-port 9946 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; charlie.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;&#xD;&#xA;  frontend:&#xD;&#xA;    container_name: frontend&#xD;&#xA;    image: jacogr/polkadot-js-apps:latest&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;80:80&quot;&#xD;&#xA;    depends_on:&#xD;&#xA;      - collator&#xD;&#xA;```&#xD;&#xA;From the example 0001-small-network.toml file, I keep default_command and default_args the same, but override them in each relay chain node via `commandWithArgs`&#xD;&#xA;&#xD;&#xA;Then I copied alice relay chain node command from above and pasted them into my 0001-small-network.toml as&#xD;&#xA;```&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  commandWithArgs = 'bash -c... &quot;...&quot; '&#xD;&#xA;```&#xD;&#xA;But how about alice node's ports from the docker-compose yaml file? the copied command has ports in it...&#xD;&#xA;&#xD;&#xA;About parachain collator, I copied its command from the docker-compose yaml file. but how about the ports again?&#xD;&#xA;My parachain command has port values in it, too... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  commandWithArgs = 'bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null&quot;'&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  commandWithArgs = 'bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --bob --validator --base-path /tmp/relay/bob --chain rococo-custom-2-raw.json --port 30334 --ws-port 9945 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; bob.out 2&gt;&amp;1; tail -f /dev/null&quot;'&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 100&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;...&quot;&#xD;&#xA;  command = 'bash -c &quot;apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null&quot;'&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;Is that the correct way to do it? Thank you&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9341" PostHistoryTypeId="2" PostId="2507" RevisionGUID="d8140ef1-f15d-48c0-96e8-b23c70db7a57" CreationDate="2022-05-10T15:06:47.577" UserId="1789" Text="My network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/p-network-202104/collator:latest&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  &#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I tried to run that network:&#xD;&#xA;```&#xD;&#xA;$ ./zombienet-linux1232 -p kubernetes spawn zombienet/0001-small-network.toml&#xD;&#xA;{&#xD;&#xA;  name: 'alice',&#xD;&#xA;  key: '2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90',&#xD;&#xA;  accounts: {&#xD;&#xA;    seed: '0xa9e19ee39ecb24b7be164e6d0fef2e90de607f380c4e7591feff539bbadf5cb9',&#xD;&#xA;    sr_account: {&#xD;&#xA;      address: '5HnGdsS8zYozLApMaHxDn2eeKujz38mWzqQnspstFtKyBxLi',&#xD;&#xA;      publicKey: '0xfce092ed3296c4285c9bf6eb365e098231878a67337633381c517722a83c1508'&#xD;&#xA;    },&#xD;&#xA;    sr_stash: {&#xD;&#xA;      address: '5GKMjxQCKiJFgvu6UJdjdAjkVtRw8EiffdA7K8i17Fjfq1j9',&#xD;&#xA;      publicKey: '0xbc1de63683a13c534954aa4481f2618d20550a64b9f890797a849274b17f5014'&#xD;&#xA;    },&#xD;&#xA;    ed_account: {&#xD;&#xA;      address: '5FBjn9VWAeTP8fVUGa9JJznRYVWAppkFUGSVvZ7CeUgPFqK1',&#xD;&#xA;      publicKey: '0x8a11e36ba8eda17f9a5c62fce3098aaaebd1080d0d89b15d3c8f0fb432a1deda'&#xD;&#xA;    },&#xD;&#xA;    ec_account: { publicKey: [Uint8Array] }&#xD;&#xA;  },&#xD;&#xA;  command: 'polkadot',&#xD;&#xA;  commandWithArgs: undefined,&#xD;&#xA;  image: 'docker.io/parity/polkadot:v0.9.18',&#xD;&#xA;  chain: 'rococo-local',&#xD;&#xA;  validator: true,&#xD;&#xA;  args: [ '-lparachain=debug' ],&#xD;&#xA;  env: [&#xD;&#xA;    { name: 'COLORBT_SHOW_HIDDEN', value: '1' },&#xD;&#xA;    { name: 'RUST_BACKTRACE', value: 'FULL' }&#xD;&#xA;  ],&#xD;&#xA;  bootnodes: [],&#xD;&#xA;  telemetryUrl: '',&#xD;&#xA;  telemetry: false,&#xD;&#xA;  prometheus: true,&#xD;&#xA;  overrides: [],&#xD;&#xA;  addToBootnodes: false,&#xD;&#xA;  resources: undefined,&#xD;&#xA;  zombieRole: 'node',&#xD;&#xA;  group: 'alice'&#xD;&#xA;}&#xD;&#xA;{&#xD;&#xA;  name: 'bob',&#xD;&#xA;  key: '81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9',&#xD;&#xA;  accounts: {&#xD;&#xA;    seed: '0x37b832313162309329437ce00e18f93c952fb27ec123da882091515d78b67965',&#xD;&#xA;    sr_account: {&#xD;&#xA;      address: '5FhfT9HUqdBS2tSqNugHJEKmyrUYuJzTrQvhiakLbb8FHYHm',&#xD;&#xA;      publicKey: '0xa0e4aead4127aa67e8612d840a27e1b78f8fe42855f0999a65a82db2761bb90b'&#xD;&#xA;    },&#xD;&#xA;    sr_stash: {&#xD;&#xA;      address: '5ECnDLoU7e6RP4NNKonA27i7sGXSj43J5dcAvyr86MuTgziP',&#xD;&#xA;      publicKey: '0x5ea1186076be44587524d22c84c39aaf4ae1c4c47369b1e04eabb6658e07a50f'&#xD;&#xA;    },&#xD;&#xA;    ed_account: {&#xD;&#xA;      address: '5DoTVfs8SqxQmDDSYZjWFPyp7CNY6edcXmaBVcqfDwzPaC77',&#xD;&#xA;      publicKey: '0x4cd7705dc5551ec3f5e1f5b4d08d7a4adb97a021cf8348f17b91d1d03152bef4'&#xD;&#xA;    },&#xD;&#xA;    ec_account: { publicKey: [Uint8Array] }&#xD;&#xA;  },&#xD;&#xA;  command: 'polkadot',&#xD;&#xA;  commandWithArgs: undefined,&#xD;&#xA;  image: 'docker.io/parity/polkadot:v0.9.18',&#xD;&#xA;  chain: 'rococo-local',&#xD;&#xA;  validator: true,&#xD;&#xA;  args: [ '-lparachain=debug' ],&#xD;&#xA;  env: [&#xD;&#xA;    { name: 'COLORBT_SHOW_HIDDEN', value: '1' },&#xD;&#xA;    { name: 'RUST_BACKTRACE', value: 'FULL' }&#xD;&#xA;  ],&#xD;&#xA;  bootnodes: [],&#xD;&#xA;  telemetryUrl: '',&#xD;&#xA;  telemetry: false,&#xD;&#xA;  prometheus: true,&#xD;&#xA;  overrides: [],&#xD;&#xA;  addToBootnodes: false,&#xD;&#xA;  resources: undefined,&#xD;&#xA;  zombieRole: 'node',&#xD;&#xA;  group: 'bob'&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-f081cefea6b6ef81e4c104376994654b&#xD;&#xA;		 Using temporary directory: /tmp/zombie-f081cefea6b6ef81e4c104376994654b_-32386-La9yjKBxWV2a&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GKMjxQCKiJFgvu6UJdjdAjkVtRw8EiffdA7K8i17Fjfq1j9&#xD;&#xA;			   Added Genesis Authority bob - 5ECnDLoU7e6RP4NNKonA27i7sGXSj43J5dcAvyr86MuTgziP&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/p-network-202104/collator:latest&#xD;&#xA;		 with command: bash -c adder-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; adder-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;Error: Command failed with exit code 1: kubectl --kubeconfig /home/user2038/.kube/config --namespace zombie-f081cefea6b6ef81e4c104376994654b cp temp-collator:/cfg/genesis-state /tmp/zombie-f081cefea6b6ef81e4c104376994654b_-32386-La9yjKBxWV2a/2000/genesis-state&#xD;&#xA;error: cannot exec into a container in a completed pod; current phase is Succeeded&#xD;&#xA;    at makeError (/snapshot/zombienet/node_modules/execa/lib/error.js:60:11)&#xD;&#xA;    at handlePromise (/snapshot/zombienet/node_modules/execa/index.js:118:26)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5) {&#xD;&#xA;  shortMessage: 'Command failed with exit code 1: kubectl --kubeconfig /home/user2038/.kube/config --namespace zombie-f081cefea6b6ef81e4c104376994654b cp temp-collator:/cfg/genesis-state /tmp/zombie-f081cefea6b6ef81e4c104376994654b_-32386-La9yjKBxWV2a/2000/genesis-state',&#xD;&#xA;  command: 'kubectl --kubeconfig /home/user2038/.kube/config --namespace zombie-f081cefea6b6ef81e4c104376994654b cp temp-collator:/cfg/genesis-state /tmp/zombie-f081cefea6b6ef81e4c104376994654b_-32386-La9yjKBxWV2a/2000/genesis-state',&#xD;&#xA;  escapedCommand: 'kubectl --kubeconfig &quot;/home/user2038/.kube/config&quot; --namespace zombie-f081cefea6b6ef81e4c104376994654b cp &quot;temp-collator:/cfg/genesis-state&quot; &quot;/tmp/zombie-f081cefea6b6ef81e4c104376994654b_-32386-La9yjKBxWV2a/2000/genesis-state&quot;',&#xD;&#xA;  exitCode: 1,&#xD;&#xA;  signal: undefined,&#xD;&#xA;  signalDescription: undefined,&#xD;&#xA;  stdout: '',&#xD;&#xA;  stderr: 'error: cannot exec into a container in a completed pod; current phase is Succeeded',&#xD;&#xA;  failed: true,&#xD;&#xA;  timedOut: false,&#xD;&#xA;  isCanceled: false,&#xD;&#xA;  killed: false&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-f081cefea6b6ef81e4c104376994654b_-32386-La9yjKBxWV2a/logs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;It seems there is no process running and that causes the &quot;cannot exec&quot; error...&#xD;&#xA;but why???  &#xD;&#xA;What is wrong in my network definition? &#xD;&#xA;&#xD;&#xA;I suspect the relaychain.nodes command should be:&#xD;&#xA;```&#xD;&#xA;commandWithArgs = './target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or my parachains.collator command should be:&#xD;&#xA;```&#xD;&#xA;command = './target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null'&#xD;&#xA;```&#xD;&#xA;any idea? Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="9343" PostHistoryTypeId="1" PostId="2507" RevisionGUID="d8140ef1-f15d-48c0-96e8-b23c70db7a57" CreationDate="2022-05-10T15:06:47.577" UserId="1789" Text="Zombienet: cannot exec into a container in a completed pod; current phase is Succeeded" ContentLicense="CC BY-SA 4.0" />
  <row Id="9344" PostHistoryTypeId="3" PostId="2507" RevisionGUID="d8140ef1-f15d-48c0-96e8-b23c70db7a57" CreationDate="2022-05-10T15:06:47.577" UserId="1789" Text="|docker|zombienet|kubernetes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9345" PostHistoryTypeId="2" PostId="2508" RevisionGUID="6f0b20a6-2951-49aa-bcc7-38620122e944" CreationDate="2022-05-10T15:25:14.877" UserId="380" Text="The [docs state](https://docs.substrate.io/v3/runtime/custom-rpcs/) that the RPC comes with a few `defaultRPCs` and then links to polkadotJS documentation on the available API calls. This doesn't help me if I want to call a method using `curl`.&#xD;&#xA;&#xD;&#xA;Does anyone know how to call [`contractInfoOf`](https://polkadot.js.org/docs/substrate/storage/#contractinfoofaccountid32-optionpalletcontractsstoragerawcontractinfo) using `curl`?&#xD;&#xA;&#xD;&#xA;e.g. like this&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;}' http://localhost:9933/&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've tried `storage_contract_info_of`, `storage_contractInfoOf`, and various other combinations using `contract` as the prefix.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;storage_contract_info_of&quot;, [&quot;5CYKEXWU3L4zWregopd2bTjoZLH9yHBpfXaqkFaTfxacaSA1&quot;]}' http://substrate-node:9933/&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, none of these seem valid. I've used `grep` to look for a list of rpc calls in [substrate](https://github.com/paritytech/substrate) and I got the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&gt; grep -rPo '#\[rpc\(name\s=\s&quot;([A-Za-z_]*)' | sort | uniq | awk -F '&quot;' '{print $2}'&#xD;&#xA;babe_epochAuthorship&#xD;&#xA;engine_createBlock&#xD;&#xA;engine_finalizeBlock&#xD;&#xA;grandpa_proveFinality&#xD;&#xA;grandpa_roundState&#xD;&#xA;author_hasKey&#xD;&#xA;author_hasSessionKeys&#xD;&#xA;author_insertKey&#xD;&#xA;author_pendingExtrinsics&#xD;&#xA;author_removeExtrinsic&#xD;&#xA;author_rotateKeys&#xD;&#xA;author_submitExtrinsic&#xD;&#xA;chain_getBlock&#xD;&#xA;chain_getBlockHash&#xD;&#xA;chain_getFinalizedHead&#xD;&#xA;chain_getHeader&#xD;&#xA;childstate_getKeys&#xD;&#xA;childstate_getKeysPaged&#xD;&#xA;childstate_getStorage&#xD;&#xA;childstate_getStorageEntries&#xD;&#xA;childstate_getStorageHash&#xD;&#xA;childstate_getStorageSize&#xD;&#xA;state_getChildReadProof&#xD;&#xA;offchain_localStorageGet&#xD;&#xA;offchain_localStorageSet&#xD;&#xA;state_call&#xD;&#xA;state_getKeys&#xD;&#xA;state_getKeysPaged&#xD;&#xA;state_getMetadata&#xD;&#xA;state_getPairs&#xD;&#xA;state_getReadProof&#xD;&#xA;state_getRuntimeVersion&#xD;&#xA;state_getStorage&#xD;&#xA;state_getStorageHash&#xD;&#xA;state_getStorageSize&#xD;&#xA;state_queryStorage&#xD;&#xA;state_queryStorageAt&#xD;&#xA;state_traceBlock&#xD;&#xA;system_addLogFilter&#xD;&#xA;system_addReservedPeer&#xD;&#xA;system_chain&#xD;&#xA;system_chainType&#xD;&#xA;system_health&#xD;&#xA;system_localListenAddresses&#xD;&#xA;system_localPeerId&#xD;&#xA;system_name&#xD;&#xA;system_nodeRoles&#xD;&#xA;system_peers&#xD;&#xA;system_properties&#xD;&#xA;system_removeReservedPeer&#xD;&#xA;system_reservedPeers&#xD;&#xA;system_resetLogFilter&#xD;&#xA;system_syncState&#xD;&#xA;system_unstable_networkState&#xD;&#xA;system_version&#xD;&#xA;sync_state_genSyncSpec&#xD;&#xA;contracts_call&#xD;&#xA;contracts_getStorage&#xD;&#xA;contracts_instantiate&#xD;&#xA;contracts_upload_code&#xD;&#xA;mmr_generateProof&#xD;&#xA;payment_queryFeeDetails&#xD;&#xA;payment_queryInfo&#xD;&#xA;system_accountNextIndex&#xD;&#xA;system_dryRun&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;No mention of `contractInfoOf`. Where is it located and how do I call it?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9347" PostHistoryTypeId="1" PostId="2508" RevisionGUID="6f0b20a6-2951-49aa-bcc7-38620122e944" CreationDate="2022-05-10T15:25:14.877" UserId="380" Text="How do I call the RPC method `contractInfoOf` using curl?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9348" PostHistoryTypeId="3" PostId="2508" RevisionGUID="6f0b20a6-2951-49aa-bcc7-38620122e944" CreationDate="2022-05-10T15:25:14.877" UserId="380" Text="|rpc|contracts|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9349" PostHistoryTypeId="2" PostId="2509" RevisionGUID="df3b2f3f-ec43-4fbe-a1ba-f4deeec0caa3" CreationDate="2022-05-10T15:26:47.157" UserId="73" Text="Substrate doesn't abort block production or block import. It requires that the runtime has sane limits and that it ensures that there for example isn't any infinite loop. However, for block production there is still some time out and if this is hit, the produced block is thrown away. If a block producer is observing skipped slots (aka skipped blocks), it will allocate more time for the proposing. Block producers will increase the time for creating a proposal until the block could be produced in the provided time. On import the nodes will execute the block until it is finished.&#xD;&#xA;&#xD;&#xA;So, this means that a `on_runtime_upgrade` that exceeds the block time will be handled properly. However, this only applies for standalone chains. For Parachains this doesn't work. Parachains currently have 2 seconds to build a PoV, send the PoV to the relay chain validators and get its PoV validated. So, when the `on_runtime_upgrade` exceeds the block time, it could happen that all this doesn't fit into the 2 seconds and the parachain gets stuck." ContentLicense="CC BY-SA 4.0" />
  <row Id="9351" PostHistoryTypeId="5" PostId="2508" RevisionGUID="aff12dd5-ef6a-49fa-9676-f99bde95e5f6" CreationDate="2022-05-10T15:51:43.670" UserId="380" Comment="deleted 144 characters in body" Text="The [docs state](https://docs.substrate.io/v3/runtime/custom-rpcs/) that the RPC comes with a few `defaultRPCs` and then links to polkadotJS documentation on the available API calls. This doesn't help me if I want to call a method using `curl`.&#xD;&#xA;&#xD;&#xA;Does anyone know how to call [`contractInfoOf`](https://polkadot.js.org/docs/substrate/storage/#contractinfoofaccountid32-optionpalletcontractsstoragerawcontractinfo) using `curl`?&#xD;&#xA;&#xD;&#xA;I've tried `storage_contract_info_of`, `storage_contractInfoOf`, and various other combinations using `contracts` as the prefix.&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;contracts_contractInfoOf&quot;, [&quot;5CYKEXWU3L4zWregopd2bTjoZLH9yHBpfXaqkFaTfxacaSA1&quot;]}' http://substrate-node:9933/&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, none of these seem valid. I've used `grep` to look for a list of rpc calls in [substrate](https://github.com/paritytech/substrate) and I got the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&gt; grep -rPo '#\[rpc\(name\s=\s&quot;([A-Za-z_]*)' | sort | uniq | awk -F '&quot;' '{print $2}'&#xD;&#xA;babe_epochAuthorship&#xD;&#xA;engine_createBlock&#xD;&#xA;engine_finalizeBlock&#xD;&#xA;grandpa_proveFinality&#xD;&#xA;grandpa_roundState&#xD;&#xA;author_hasKey&#xD;&#xA;author_hasSessionKeys&#xD;&#xA;author_insertKey&#xD;&#xA;author_pendingExtrinsics&#xD;&#xA;author_removeExtrinsic&#xD;&#xA;author_rotateKeys&#xD;&#xA;author_submitExtrinsic&#xD;&#xA;chain_getBlock&#xD;&#xA;chain_getBlockHash&#xD;&#xA;chain_getFinalizedHead&#xD;&#xA;chain_getHeader&#xD;&#xA;childstate_getKeys&#xD;&#xA;childstate_getKeysPaged&#xD;&#xA;childstate_getStorage&#xD;&#xA;childstate_getStorageEntries&#xD;&#xA;childstate_getStorageHash&#xD;&#xA;childstate_getStorageSize&#xD;&#xA;state_getChildReadProof&#xD;&#xA;offchain_localStorageGet&#xD;&#xA;offchain_localStorageSet&#xD;&#xA;state_call&#xD;&#xA;state_getKeys&#xD;&#xA;state_getKeysPaged&#xD;&#xA;state_getMetadata&#xD;&#xA;state_getPairs&#xD;&#xA;state_getReadProof&#xD;&#xA;state_getRuntimeVersion&#xD;&#xA;state_getStorage&#xD;&#xA;state_getStorageHash&#xD;&#xA;state_getStorageSize&#xD;&#xA;state_queryStorage&#xD;&#xA;state_queryStorageAt&#xD;&#xA;state_traceBlock&#xD;&#xA;system_addLogFilter&#xD;&#xA;system_addReservedPeer&#xD;&#xA;system_chain&#xD;&#xA;system_chainType&#xD;&#xA;system_health&#xD;&#xA;system_localListenAddresses&#xD;&#xA;system_localPeerId&#xD;&#xA;system_name&#xD;&#xA;system_nodeRoles&#xD;&#xA;system_peers&#xD;&#xA;system_properties&#xD;&#xA;system_removeReservedPeer&#xD;&#xA;system_reservedPeers&#xD;&#xA;system_resetLogFilter&#xD;&#xA;system_syncState&#xD;&#xA;system_unstable_networkState&#xD;&#xA;system_version&#xD;&#xA;sync_state_genSyncSpec&#xD;&#xA;contracts_call&#xD;&#xA;contracts_getStorage&#xD;&#xA;contracts_instantiate&#xD;&#xA;contracts_upload_code&#xD;&#xA;mmr_generateProof&#xD;&#xA;payment_queryFeeDetails&#xD;&#xA;payment_queryInfo&#xD;&#xA;system_accountNextIndex&#xD;&#xA;system_dryRun&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;No mention of `contractInfoOf`. Where is it located and how do I call it?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9352" PostHistoryTypeId="6" PostId="2508" RevisionGUID="670dbbe3-7821-4147-bbe5-ed4827496cde" CreationDate="2022-05-10T16:04:10.817" UserId="380" Comment="edited tags" Text="|polkadot-js|rpc|contracts|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9353" PostHistoryTypeId="2" PostId="2510" RevisionGUID="9487150e-b6ef-40a6-beaa-3d81123469dc" CreationDate="2022-05-10T16:43:45.390" UserId="1792" Text="Is there any example of how to use [MockValidationDataInherentDataProvider][1] to run a parachain with mock validation? I've been locking all over and can't seem to find any documentation or example of it's usage, any resource on this would be appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/master/primitives/parachain-inherent/src/mock.rs#L45" ContentLicense="CC BY-SA 4.0" />
  <row Id="9355" PostHistoryTypeId="1" PostId="2510" RevisionGUID="9487150e-b6ef-40a6-beaa-3d81123469dc" CreationDate="2022-05-10T16:43:45.390" UserId="1792" Text="Example of MockValidationDataInherentDataProvider usage​" ContentLicense="CC BY-SA 4.0" />
  <row Id="9356" PostHistoryTypeId="3" PostId="2510" RevisionGUID="9487150e-b6ef-40a6-beaa-3d81123469dc" CreationDate="2022-05-10T16:43:45.390" UserId="1792" Text="|parachain|cumulus|documentation|mock|validation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9357" PostHistoryTypeId="2" PostId="2511" RevisionGUID="07f3503d-e34f-4ef9-a183-589dda816bb4" CreationDate="2022-05-10T17:19:40.030" UserId="279" Text="the issue here is the command for exporting the genesis-state / genesis-wasm.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;launching temp-collator pod with image gcr.io/p-network-202104/collator:latest&#xD;&#xA;         with command: bash -c adder-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; adder-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does this image `gcr.io/p-network-202104/collator:latest` have the `adder-collator` binary? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9359" PostHistoryTypeId="2" PostId="2512" RevisionGUID="1089eeca-0264-4080-be00-4e1659e61e5e" CreationDate="2022-05-10T17:43:37.633" UserId="1923" Text="I’m looking for resources on how to implement a front end load balancing mechanism for splitting traffic across RPCs.&#xD;&#xA;&#xD;&#xA;I know polkadot.js.org has something running that does this and I think it might be in this code (https://github.com/polkadot-js/apps/blob/master/packages/apps-config/src/endpoints/util.ts) &#xD;&#xA;&#xD;&#xA;Is this the right piece of code to get ideas from?&#xD;&#xA;&#xD;&#xA;If anyone wants to collaborate on this let me know. Basically every project in the ecosystem needs this piece of code." ContentLicense="CC BY-SA 4.0" />
  <row Id="9361" PostHistoryTypeId="1" PostId="2512" RevisionGUID="1089eeca-0264-4080-be00-4e1659e61e5e" CreationDate="2022-05-10T17:43:37.633" UserId="1923" Text="Load balancing across RPCs" ContentLicense="CC BY-SA 4.0" />
  <row Id="9362" PostHistoryTypeId="3" PostId="2512" RevisionGUID="1089eeca-0264-4080-be00-4e1659e61e5e" CreationDate="2022-05-10T17:43:37.633" UserId="1923" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9363" PostHistoryTypeId="6" PostId="2486" RevisionGUID="d0af0b14-e16b-4680-b4ec-24842962970a" CreationDate="2022-05-10T18:16:08.680" UserId="28" Comment="edited tags" Text="|smart-contract|wasm|testing|javascript|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9365" PostHistoryTypeId="5" PostId="2468" RevisionGUID="492b01c9-e6c7-4ce6-aee0-6b77f0b0adde" CreationDate="2022-05-10T18:33:25.033" UserId="85" Comment="capitalisation" Text="I was wondering why, in treasury_pallet, there is a recurrent `I` generic parameter along with `T`, almost always used to specify lifetime:&#xD;&#xA;```&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T, I = ()&gt;(PhantomData&lt;(T, I)&gt;);&#xD;&#xA;```&#xD;&#xA;ex for lifetime:&#xD;&#xA;```&#xD;&#xA;	pub(crate) type ProposalCount&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageMap&lt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Other pallets doesn't have it, so why? Does it have a specific use? Can I remove it if I'm making a different pallet forked from Treasury? I'd like some enlightenment on this" ContentLicense="CC BY-SA 4.0" />
  <row Id="9367" PostHistoryTypeId="52" PostId="2500" RevisionGUID="bb2411fc-5315-4365-8261-36d7eb739b88" CreationDate="2022-05-10T18:35:53.367" />
  <row Id="9372" PostHistoryTypeId="2" PostId="2514" RevisionGUID="ece0fa94-38c6-4b2f-90db-a93274aba4e9" CreationDate="2022-05-10T22:38:01.803" UserId="28" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="9374" PostHistoryTypeId="1" PostId="2514" RevisionGUID="ece0fa94-38c6-4b2f-90db-a93274aba4e9" CreationDate="2022-05-10T22:38:01.803" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="9375" PostHistoryTypeId="1" PostId="2515" RevisionGUID="64c19996-1484-4152-9f1c-5e2e9d2bfd56" CreationDate="2022-05-10T22:38:01.803" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="9377" PostHistoryTypeId="2" PostId="2515" RevisionGUID="64c19996-1484-4152-9f1c-5e2e9d2bfd56" CreationDate="2022-05-10T22:38:01.803" UserId="28" Text="Questions about the JavaScript programming language related to Substrate and or Polkadot." ContentLicense="CC BY-SA 4.0" />
  <row Id="9378" PostHistoryTypeId="6" PostId="1940" RevisionGUID="0c7b9511-6aa7-4626-972b-5ba0b2913c33" CreationDate="2022-05-10T22:42:45.690" UserId="28" Comment="edited tags" Text="|substrate-node|ink|pallet-contracts|code-hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9379" PostHistoryTypeId="6" PostId="2409" RevisionGUID="7ed99116-5074-4b06-9749-046c7951300d" CreationDate="2022-05-10T22:43:03.723" UserId="28" Comment="edited tags" Text="|runtime|upgrade|code-hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9380" PostHistoryTypeId="6" PostId="2484" RevisionGUID="e99ec447-6e99-404c-bb5b-c4c1a56c5c80" CreationDate="2022-05-10T22:43:52.530" UserId="28" Comment="edited tags" Text="|light-client|substrate-recipes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9381" PostHistoryTypeId="6" PostId="2416" RevisionGUID="153ee6d7-bf4f-49f0-9322-eb52f5aecdcd" CreationDate="2022-05-10T22:44:19.347" UserId="28" Comment="edited tags" Text="|database|rocks-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9382" PostHistoryTypeId="6" PostId="2130" RevisionGUID="b7785934-2240-452a-bc02-bc452c5ef65a" CreationDate="2022-05-10T22:44:45.077" UserId="28" Comment="edited tags" Text="|build|rocks-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9383" PostHistoryTypeId="6" PostId="1995" RevisionGUID="46d3422c-b206-42a6-a526-f12f095db760" CreationDate="2022-05-10T22:45:20.500" UserId="28" Comment="edited tags" Text="|rpc|api|websocket|dev|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9384" PostHistoryTypeId="2" PostId="2516" RevisionGUID="eec73172-c44b-462a-b2fc-42bd6b0b6915" CreationDate="2022-05-10T22:48:46.753" UserId="28" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="9386" PostHistoryTypeId="1" PostId="2516" RevisionGUID="eec73172-c44b-462a-b2fc-42bd6b0b6915" CreationDate="2022-05-10T22:48:46.753" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="9387" PostHistoryTypeId="1" PostId="2517" RevisionGUID="3dadb612-515c-45ce-b45a-bfc2f5539d20" CreationDate="2022-05-10T22:48:46.753" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="9389" PostHistoryTypeId="2" PostId="2517" RevisionGUID="3dadb612-515c-45ce-b45a-bfc2f5539d20" CreationDate="2022-05-10T22:48:46.753" UserId="28" Text="Questions about JavaScript in the context of Substrate and Polkadot." ContentLicense="CC BY-SA 4.0" />
  <row Id="9390" PostHistoryTypeId="2" PostId="2518" RevisionGUID="88cf8af4-e0d6-4625-9b33-b02f41df5c23" CreationDate="2022-05-10T22:50:00.353" UserId="28" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="9392" PostHistoryTypeId="1" PostId="2518" RevisionGUID="88cf8af4-e0d6-4625-9b33-b02f41df5c23" CreationDate="2022-05-10T22:50:00.353" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="9393" PostHistoryTypeId="1" PostId="2519" RevisionGUID="856e3054-406d-4685-a48c-450a5b773995" CreationDate="2022-05-10T22:50:00.353" UserId="28" ContentLicense="CC BY-SA 4.0" />
  <row Id="9395" PostHistoryTypeId="2" PostId="2519" RevisionGUID="856e3054-406d-4685-a48c-450a5b773995" CreationDate="2022-05-10T22:50:00.353" UserId="28" Text="Questions about the Java programming language related to Substrate and Polkadot." ContentLicense="CC BY-SA 4.0" />
  <row Id="9398" PostHistoryTypeId="2" PostId="2520" RevisionGUID="5c56a878-7e78-43d2-a2a4-e2d5217ad23e" CreationDate="2022-05-11T01:31:46.300" UserId="359" Text="You just need to return it alone with other inherents. This is how Acala is using it.&#xD;&#xA;&#xD;&#xA;https://github.com/AcalaNetwork/Acala/blob/e9a0f70efd341911bc6ccedd84411c1f9ab1d890/node/service/src/lib.rs#L290&#xD;&#xA;&#xD;&#xA;			sc_consensus_aura::import_queue::&lt;AuraPair, _, _, _, _, _, _&gt;(ImportQueueParams {&#xD;&#xA;				block_import: client.clone(),&#xD;&#xA;				justification_import: None,&#xD;&#xA;				client: client.clone(),&#xD;&#xA;				create_inherent_data_providers: move |block: Hash, ()| {&#xD;&#xA;					let current_para_block = client_for_cidp&#xD;&#xA;						.number(block)&#xD;&#xA;						.expect(&quot;Header lookup should succeed&quot;)&#xD;&#xA;						.expect(&quot;Header passed in as parent should be present in backend.&quot;);&#xD;&#xA;					let client_for_xcm = client_for_cidp.clone();&#xD;&#xA;&#xD;&#xA;					async move {&#xD;&#xA;						let timestamp = sp_timestamp::InherentDataProvider::from_system_time();&#xD;&#xA;&#xD;&#xA;						let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(&#xD;&#xA;							*timestamp,&#xD;&#xA;							slot_duration,&#xD;&#xA;						);&#xD;&#xA;&#xD;&#xA;						let mocked_parachain = MockValidationDataInherentDataProvider {&#xD;&#xA;							current_para_block,&#xD;&#xA;							relay_offset: 1000,&#xD;&#xA;							relay_blocks_per_para_block: 2,&#xD;&#xA;							xcm_config: MockXcmConfig::new(&#xD;&#xA;								&amp;*client_for_xcm,&#xD;&#xA;								block,&#xD;&#xA;								Default::default(),&#xD;&#xA;								Default::default(),&#xD;&#xA;							),&#xD;&#xA;							raw_downward_messages: vec![],&#xD;&#xA;							raw_horizontal_messages: vec![],&#xD;&#xA;						};&#xD;&#xA;&#xD;&#xA;						Ok((timestamp, slot, mocked_parachain))&#xD;&#xA;					}&#xD;&#xA;				}," ContentLicense="CC BY-SA 4.0" />
  <row Id="9400" PostHistoryTypeId="2" PostId="2521" RevisionGUID="1c514e01-853c-42cf-aac0-4b1c705cccf0" CreationDate="2022-05-11T04:54:28.890" UserId="1950" Text="I have a data structure as follows &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use primitives::{AccountId, Balance, Price};&#xD;&#xA;&#xD;&#xA;#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;pub struct Alpha{&#xD;&#xA;    pub alpha: AccountId,&#xD;&#xA;    pub cost: Price,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, Default)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;pub struct Wallet{&#xD;&#xA;    pub avg: Price,&#xD;&#xA;    pub alphas: Vec&lt;Alpha&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and Storage Declaration &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn get_big_wallet)]&#xD;&#xA;    pub type BigWallet&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;        _,&#xD;&#xA;        Blake2_128Concat,&#xD;&#xA;        CurrencyId,&#xD;&#xA;        Blake2_128Concat,&#xD;&#xA;        RoundNumber,&#xD;&#xA;        Wallet,&#xD;&#xA;        OptionQuery,&#xD;&#xA;    &gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I tried to save data um getting the following error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let who = ensure_signed(origin)?; // this works&#xD;&#xA;let mut record= Self::get_big_wallet(asset_id, round).unwrap_or_default(); // this works&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;let mut members= record.alpha;&#xD;&#xA;let sub_len = members.len() as u128;&#xD;&#xA;&#xD;&#xA;            let data= Alpha{&#xD;&#xA;                alpa: who.clone(),&#xD;&#xA;                price,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Error: alpa: who.clone(),&#xD;&#xA;    |                            ^^^^^^^^^^^ expected struct `AccountId32`, found associated type&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How to fix this error above? How to save an account ( who ) ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9402" PostHistoryTypeId="1" PostId="2521" RevisionGUID="1c514e01-853c-42cf-aac0-4b1c705cccf0" CreationDate="2022-05-11T04:54:28.890" UserId="1950" Text="Error expected struct `AccountId32`, found associated type when saving an AccountId who" ContentLicense="CC BY-SA 4.0" />
  <row Id="9403" PostHistoryTypeId="3" PostId="2521" RevisionGUID="1c514e01-853c-42cf-aac0-4b1c705cccf0" CreationDate="2022-05-11T04:54:28.890" UserId="1950" Text="|substrate-node|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9404" PostHistoryTypeId="5" PostId="2521" RevisionGUID="3a6b9038-aaea-472a-b216-67f1562a488d" CreationDate="2022-05-11T05:00:10.537" UserId="1950" Comment="added 124 characters in body" Text="I have a data structure as follows &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// definition for account id is &#xD;&#xA;// pub type AccountId = &lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;&#xD;&#xA;&#xD;&#xA;use primitives::{AccountId, Balance, Price};&#xD;&#xA;&#xD;&#xA;#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;pub struct Alpha{&#xD;&#xA;    pub alpha: AccountId,&#xD;&#xA;    pub cost: Price,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, Default)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;pub struct Wallet{&#xD;&#xA;    pub avg: Price,&#xD;&#xA;    pub alphas: Vec&lt;Alpha&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and Storage Declaration &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn get_big_wallet)]&#xD;&#xA;    pub type BigWallet&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;        _,&#xD;&#xA;        Blake2_128Concat,&#xD;&#xA;        CurrencyId,&#xD;&#xA;        Blake2_128Concat,&#xD;&#xA;        RoundNumber,&#xD;&#xA;        Wallet,&#xD;&#xA;        OptionQuery,&#xD;&#xA;    &gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I tried to save data um getting the following error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let who = ensure_signed(origin)?; // this works&#xD;&#xA;let mut record= Self::get_big_wallet(asset_id, round).unwrap_or_default(); // this works&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;let mut members= record.alpha;&#xD;&#xA;let sub_len = members.len() as u128;&#xD;&#xA;&#xD;&#xA;            let data= Alpha{&#xD;&#xA;                alpa: who.clone(),&#xD;&#xA;                price,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Error: alpa: who.clone(),&#xD;&#xA;    |                            ^^^^^^^^^^^ expected struct `AccountId32`, found associated type&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How to fix this error above? How to save an account ( who ) ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9412" PostHistoryTypeId="2" PostId="2523" RevisionGUID="9ff9c730-6f3e-41d2-9f02-d671bef328d8" CreationDate="2022-05-11T07:16:29.830" UserId="1789" Text="In my Zombienet example network definition file, I have replaced :&#xD;&#xA;&#xD;&#xA;    docker.io/paritypr/polkadot-debug:master&#xD;&#xA;&#xD;&#xA;with&#xD;&#xA;&#xD;&#xA;    docker.io/parity/polkadot:v0.9.18&#xD;&#xA;so now my Zombienet example network definition file is the following:&#xD;&#xA;&#xD;&#xA;    [relaychain]&#xD;&#xA;    default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;    default_command = &quot;polkadot&quot;&#xD;&#xA;    default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;    &#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;      [[relaychain.nodes]]&#xD;&#xA;      name = &quot;alice&quot;&#xD;&#xA;      validator = true&#xD;&#xA;    &#xD;&#xA;      [[relaychain.nodes]]&#xD;&#xA;      name = &quot;bob&quot;&#xD;&#xA;      validator = true&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 2000&#xD;&#xA;    &#xD;&#xA;      [parachains.collator]&#xD;&#xA;      name = &quot;collator01&quot;&#xD;&#xA;      image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;      command = &quot;adder-collator&quot;&#xD;&#xA;      &#xD;&#xA;    [types.Header]&#xD;&#xA;    number = &quot;u64&quot;&#xD;&#xA;    parent_hash = &quot;Hash&quot;&#xD;&#xA;    post_state = &quot;Hash&quot;&#xD;&#xA;&#xD;&#xA;Now. I need to make a docker image to replace &#xD;&#xA;&#xD;&#xA;    docker.io/paritypr/colander:master&#xD;&#xA;&#xD;&#xA;But my new image should have adder-collator binary for adder-collator command to work.&#xD;&#xA;&#xD;&#xA;So how can I build a docker image based on &quot;docker.io/paritypr/colander:master&quot;? &#xD;&#xA;&#xD;&#xA;That colander image is hosted here https://hub.docker.com/layers/colander/paritypr/colander/master/images/sha256-3c76e13d988aec875150e024d027af45aefc12f2de98f97db686e558a3d30513?context=explore&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9414" PostHistoryTypeId="1" PostId="2523" RevisionGUID="9ff9c730-6f3e-41d2-9f02-d671bef328d8" CreationDate="2022-05-11T07:16:29.830" UserId="1789" Text="Zombienet: how to build a docker image with my parachain and adder-collator binary?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9415" PostHistoryTypeId="3" PostId="2523" RevisionGUID="9ff9c730-6f3e-41d2-9f02-d671bef328d8" CreationDate="2022-05-11T07:16:29.830" UserId="1789" Text="|docker|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9416" PostHistoryTypeId="2" PostId="2524" RevisionGUID="e842b70a-0fa2-4313-a446-0a7b04bd263c" CreationDate="2022-05-11T07:56:57.060" UserId="484" Text="I am trying to run `statemine` in `polkalaunch`. I have get 0.9.18 versions of `polkadot` and `polkadot-collator`. And trying to run like next:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;  &quot;relaychain&quot;: {&#xD;&#xA;    &quot;bin&quot;: &quot;../../../polkadot/target/release/polkadot&quot;,&#xD;&#xA;    &quot;chain&quot;: &quot;kusama-local&quot;,&#xD;&#xA;    &quot;genesis&quot;: {&#xD;&#xA;      &quot;runtime&quot;: {&#xD;&#xA;        &quot;runtime_genesis_config&quot;: {&#xD;&#xA;          &quot;configuration&quot;: {&#xD;&#xA;            &quot;config&quot;: {&#xD;&#xA;              &quot;validation_upgrade_frequency&quot;: 2,&#xD;&#xA;              &quot;validation_upgrade_delay&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    &quot;nodes&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9944,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/alice&quot;,&#xD;&#xA;        &quot;port&quot;: 30444,&#xD;&#xA;        &quot;flags&quot;: [&quot;--rpc-cors=all&quot;, &quot;--beefy&quot;, &quot;--enable-offchain-indexing=true&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9955,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/bob&quot;,&#xD;&#xA;        &quot;port&quot;: 30555,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9966,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/charlie&quot;,&#xD;&#xA;        &quot;port&quot;: 30666,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;dave&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9977,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/dave&quot;,&#xD;&#xA;        &quot;port&quot;: 30777,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;ferdie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9978,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/ferdie&quot;,&#xD;&#xA;        &quot;port&quot;: 30778,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;parachains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;bin&quot;: &quot;../../../cumulus/target/release/polkadot-collator&quot;,&#xD;&#xA;      &quot;chain&quot;: &quot;statemine-local&quot;,&#xD;&#xA;      &quot;nodes&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9988,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/alice&quot;,&#xD;&#xA;          &quot;port&quot;: 31100,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9997,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/bob&quot;,&#xD;&#xA;          &quot;port&quot;: 31200,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9996,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/charlie&quot;,&#xD;&#xA;          &quot;port&quot;: 31300,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  &quot;types&quot;: {},&#xD;&#xA;  &quot;finalization&quot;: false,&#xD;&#xA;  &quot;simpleParachains&quot;: []&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I see relay blocks produced but not statemine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I able to produce blocks on my parachain network. And also tried rococo for relay and statemine-dev/local in above config, no results." ContentLicense="CC BY-SA 4.0" />
  <row Id="9418" PostHistoryTypeId="1" PostId="2524" RevisionGUID="e842b70a-0fa2-4313-a446-0a7b04bd263c" CreationDate="2022-05-11T07:56:57.060" UserId="484" Text="How to polkalaunch statemine?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9419" PostHistoryTypeId="3" PostId="2524" RevisionGUID="e842b70a-0fa2-4313-a446-0a7b04bd263c" CreationDate="2022-05-11T07:56:57.060" UserId="484" Text="|statemine|polkadot-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9420" PostHistoryTypeId="5" PostId="2524" RevisionGUID="0e31eb47-3bb3-42a8-a2db-3b98294945b0" CreationDate="2022-05-11T08:37:01.147" UserId="484" Comment="added 247 characters in body" Text="I am trying to run `statemine` in `polkalaunch`. I have get 0.9.18 versions of `polkadot` and `polkadot-collator`. And trying to run like next:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;  &quot;relaychain&quot;: {&#xD;&#xA;    &quot;bin&quot;: &quot;../../../polkadot/target/release/polkadot&quot;,&#xD;&#xA;    &quot;chain&quot;: &quot;kusama-local&quot;,&#xD;&#xA;    &quot;genesis&quot;: {&#xD;&#xA;      &quot;runtime&quot;: {&#xD;&#xA;        &quot;runtime_genesis_config&quot;: {&#xD;&#xA;          &quot;configuration&quot;: {&#xD;&#xA;            &quot;config&quot;: {&#xD;&#xA;              &quot;validation_upgrade_frequency&quot;: 2,&#xD;&#xA;              &quot;validation_upgrade_delay&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    &quot;nodes&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9944,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/alice&quot;,&#xD;&#xA;        &quot;port&quot;: 30444,&#xD;&#xA;        &quot;flags&quot;: [&quot;--rpc-cors=all&quot;, &quot;--beefy&quot;, &quot;--enable-offchain-indexing=true&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9955,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/bob&quot;,&#xD;&#xA;        &quot;port&quot;: 30555,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9966,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/charlie&quot;,&#xD;&#xA;        &quot;port&quot;: 30666,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;dave&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9977,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/dave&quot;,&#xD;&#xA;        &quot;port&quot;: 30777,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;ferdie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9978,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/ferdie&quot;,&#xD;&#xA;        &quot;port&quot;: 30778,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;parachains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;bin&quot;: &quot;../../../cumulus/target/release/polkadot-collator&quot;,&#xD;&#xA;      &quot;chain&quot;: &quot;statemine-local&quot;,&#xD;&#xA;      &quot;nodes&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9988,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/alice&quot;,&#xD;&#xA;          &quot;port&quot;: 31100,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9997,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/bob&quot;,&#xD;&#xA;          &quot;port&quot;: 31200,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9996,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/charlie&quot;,&#xD;&#xA;          &quot;port&quot;: 31300,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  &quot;types&quot;: {},&#xD;&#xA;  &quot;finalization&quot;: false,&#xD;&#xA;  &quot;simpleParachains&quot;: []&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I see relay blocks produced but not statemine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I able to produce blocks on my parachain network. And also tried rococo for relay and statemine-dev/local in above config, no results.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Statemine several collators][1]][1]&#xD;&#xA;[![Statemine no blocks][2]][2]&#xD;&#xA;[![Statemine is parachain][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cfqjg.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZLdOk.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/YrYIN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9421" PostHistoryTypeId="2" PostId="2525" RevisionGUID="66e914a7-0642-4302-85c7-a72fd70df9b5" CreationDate="2022-05-11T09:29:57.003" UserId="2033" Text="I am using&#xD;&#xA; ethereum-type version = &quot;0.12&quot;,&#xD;&#xA; codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;]}&#xD;&#xA;scale-info = { version = &quot;2.0.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;And latest substrate-node-template of branch = &quot;polkadot-v0.9.19&quot; &#xD;&#xA;So I am trying to build the code , and for the above ethereum_types, getting WrapperTypeEncode error.&#xD;&#xA;Can you help me to resolve the above error&#xD;&#xA;&#xD;&#xA;Complete error list:&#xD;&#xA;&#xD;&#xA;    the trait bound `ethereum_types::U256: WrapperTypeEncode` is not satisfied&#xD;&#xA;   --&gt; pallets/light-client/src/lib.rs:101:1&#xD;&#xA;    |&#xD;&#xA;101 | #[frame_support::pallet]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `ethereum_types::U256`&#xD;&#xA;    |&#xD;&#xA;    = note: required because of the requirements on the impl of `parity_scale_codec::Encode` for `ethereum_types::U256`&#xD;&#xA;note: required by a bound in `EncodeLike`&#xD;&#xA;   --&gt; /home/asmita-mfs/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.2/src/encode_like.rs:73:25&#xD;&#xA;    |&#xD;&#xA;73  | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;    |                         ^^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;    = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `ethereum_types::H256: WrapperTypeEncode` is not satisfied&#xD;&#xA;   --&gt; pallets/light-client/src/lib.rs:101:1&#xD;&#xA;    |&#xD;&#xA;101 | #[frame_support::pallet]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `ethereum_types::H256`&#xD;&#xA;    |&#xD;&#xA;    = note: required because of the requirements on the impl of `parity_scale_codec::Encode` for `ethereum_types::H256`&#xD;&#xA;note: required by a bound in `EncodeLike`&#xD;&#xA;   --&gt; /home/asmita-mfs/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.2/src/encode_like.rs:73:25&#xD;&#xA;    |&#xD;&#xA;73  | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;    |                         ^^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;    = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;warning: `pallet-eth-light-client` (lib) generated 7 warnings&#xD;&#xA;error: could not compile `pallet-eth-light-client` due to 2 previous errors; 7 warnings emitted&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9423" PostHistoryTypeId="1" PostId="2525" RevisionGUID="66e914a7-0642-4302-85c7-a72fd70df9b5" CreationDate="2022-05-11T09:29:57.003" UserId="2033" Text="the trait `WrapperTypeEncode` is not implemented for `ethereum_types::H256` &amp; `ethereum_types::U256`" ContentLicense="CC BY-SA 4.0" />
  <row Id="9424" PostHistoryTypeId="3" PostId="2525" RevisionGUID="66e914a7-0642-4302-85c7-a72fd70df9b5" CreationDate="2022-05-11T09:29:57.003" UserId="2033" Text="|substrate-node|substrate-node-template|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9425" PostHistoryTypeId="5" PostId="2523" RevisionGUID="af7ba69c-69ba-4c39-aa0e-b6118f4f4161" CreationDate="2022-05-11T10:19:07.950" UserId="1789" Comment="deleted 25 characters in body" Text="In my Zombienet example network definition file, I have replaced :&#xD;&#xA;&#xD;&#xA;    docker.io/paritypr/polkadot-debug:master&#xD;&#xA;&#xD;&#xA;with&#xD;&#xA;&#xD;&#xA;    docker.io/parity/polkadot:v0.9.18&#xD;&#xA;so now my Zombienet example network definition file is the following:&#xD;&#xA;&#xD;&#xA;    [relaychain]&#xD;&#xA;    default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;    default_command = &quot;polkadot&quot;&#xD;&#xA;    default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;    &#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;      [[relaychain.nodes]]&#xD;&#xA;      name = &quot;alice&quot;&#xD;&#xA;      validator = true&#xD;&#xA;    &#xD;&#xA;      [[relaychain.nodes]]&#xD;&#xA;      name = &quot;bob&quot;&#xD;&#xA;      validator = true&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 2000&#xD;&#xA;    &#xD;&#xA;      [parachains.collator]&#xD;&#xA;      name = &quot;collator01&quot;&#xD;&#xA;      image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;      command = &quot;adder-collator&quot;&#xD;&#xA;      &#xD;&#xA;    [types.Header]&#xD;&#xA;    number = &quot;u64&quot;&#xD;&#xA;    parent_hash = &quot;Hash&quot;&#xD;&#xA;    post_state = &quot;Hash&quot;&#xD;&#xA;&#xD;&#xA;Now. I need to make a docker image to replace &#xD;&#xA;&#xD;&#xA;    docker.io/paritypr/colander:master&#xD;&#xA;&#xD;&#xA;But my new image should have adder-collator binary for adder-collator command to work.&#xD;&#xA;&#xD;&#xA;So how can I add that adder-collator to my docker image?&#xD;&#xA;&#xD;&#xA;That colander image is hosted here https://hub.docker.com/layers/colander/paritypr/colander/master/images/sha256-3c76e13d988aec875150e024d027af45aefc12f2de98f97db686e558a3d30513?context=explore&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9426" PostHistoryTypeId="2" PostId="2526" RevisionGUID="c7fc5ebd-eee2-4384-bf34-b7dc052165ba" CreationDate="2022-05-11T10:33:46.447" UserId="94" Text="You are using the `AccountId` type from `sp_primitives`.  &#xD;&#xA;What you rather want to do is to use the `AccountId` from your pallet configuration which is accessible as `T::AccountId` or something like `&lt;T as frame_system::Config&gt;` depending on your pallet config. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use primitives::{Balance, Price};&#xD;&#xA;&#xD;&#xA;type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;&#xD;&#xA;#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;pub struct Alpha&lt;AccountId&gt;{&#xD;&#xA;    pub alpha: AccountId,&#xD;&#xA;    pub cost: Price,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, Default)]&#xD;&#xA;pub struct Wallet&lt;AccountId&gt;{&#xD;&#xA;    pub avg: Price,&#xD;&#xA;    pub alphas: Vec&lt;Alpha&lt;AccountId&gt;&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Use the wallet as:&#xD;&#xA;Wallet&lt;AccountIdOf&lt;T&gt;&gt;&#xD;&#xA;```  &#xD;&#xA;You can also pass in `T::AccountId` as generic type instead of the complete Config." ContentLicense="CC BY-SA 4.0" />
  <row Id="9428" PostHistoryTypeId="2" PostId="2527" RevisionGUID="1665768f-44c2-465c-9e47-a83d6ac70955" CreationDate="2022-05-11T10:34:53.943" UserId="2471" Text="I was wondering how to speed up the substrate build? &#xD;&#xA;it takes me about half an hour to get the binaries (without cache)&#xD;&#xA;any leads are welcome other than changing my laptop!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9430" PostHistoryTypeId="1" PostId="2527" RevisionGUID="1665768f-44c2-465c-9e47-a83d6ac70955" CreationDate="2022-05-11T10:34:53.943" UserId="2471" Text="How to speed up compilation" ContentLicense="CC BY-SA 4.0" />
  <row Id="9431" PostHistoryTypeId="3" PostId="2527" RevisionGUID="1665768f-44c2-465c-9e47-a83d6ac70955" CreationDate="2022-05-11T10:34:53.943" UserId="2471" Text="|substrate-node|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9432" PostHistoryTypeId="5" PostId="2503" RevisionGUID="812b7a81-c40c-44a0-8a42-283db90eaa1a" CreationDate="2022-05-11T10:49:14.693" UserId="1861" Comment="added 115 characters in body" Text="There are a few things that jumped at me looking at those configurations:&#xD;&#xA;&#xD;&#xA;* `apt-get install -y wget;` should be done as part of the container setup, if you need this, derive another container from `docker.io/parity/polkadot:v0.9.18`&#xD;&#xA;* `nohup` is not necessary and not useful in this context. One usually wants all the logs.&#xD;&#xA;* `bash -c` is not really needed for a single command&#xD;&#xA;&#xD;&#xA;* redirecting output to files in the container is not recommended, it's best to use dedicated logging infra for kubernetes&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA; Generally one should not provide the port arguments unless explicitly needed and let zombienet figure those out as much as possible. Zombienet will add cli flags, and expectes the `command` specified to understand substrate cli flags, so either a `substrate` based chain, `polkadot`, or in the case of liveness/sec tests `malus` based nemesis nodes." ContentLicense="CC BY-SA 4.0" />
  <row Id="9433" PostHistoryTypeId="2" PostId="2528" RevisionGUID="cc8716f5-9540-4d54-b10e-df234ddc5003" CreationDate="2022-05-11T10:50:10.667" UserId="279" Text="the `adder-collator` is very simple collator used for testing purposes and is compiled from the polkadot repo&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo build --profile testnet --verbose -p test-parachain-adder-collator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then *injected*  into the image using this [Dokerfile](https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/collator_injected.Dockerfile) and published under `paritypr`.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9435" PostHistoryTypeId="2" PostId="2529" RevisionGUID="a82e24fe-2920-4bab-9a12-8d7a613a2983" CreationDate="2022-05-11T10:57:44.283" UserId="1892" Text="you can use `cargo remote` with a cloud server to significantly reduce the build time (few minutes depending on the server power). &#xD;&#xA;&#xD;&#xA;there is a detailed post about this topic :&#xD;&#xA;https://www.chevdor.com/post/2019/12/23/cargo-remote/&#xD;&#xA;&#xD;&#xA;another post described the process using Google cloud :&#xD;&#xA;https://medium.com/commonwealth-labs/build-substrate-in-few-minutes-with-fraction-costs-26fce6aa5066" ContentLicense="CC BY-SA 4.0" />
  <row Id="9441" PostHistoryTypeId="5" PostId="2494" RevisionGUID="e9fd4ba0-1c05-4dfa-b7ef-130aa56d2bde" CreationDate="2022-05-11T11:19:18.210" UserId="627" Comment="Expand with SCALE-decoder requirement." Text="If you just use `chain_getBlock`, one of the extrinsics would be `timestamp.set` as applied by the block author. &#xD;&#xA;&#xD;&#xA;This contains the `Compact&lt;u64&gt;` value of the current timestamp, i.e. milliseconds since epoch. It will match with the `timestamp.now` in the state. &#xD;&#xA;&#xD;&#xA;Since it is an extrinsic, it is available in all nodes, even those where the state has been pruned - assuming obviously that the chain runtime logic adds these `timestamp.set` extrinsics, which most do.&#xD;&#xA;&#xD;&#xA;As explained in a comment from mine below, this approach (like another retrieving the storage) assumes that you have access to a SCALE-decoder for your environment which is able to decode Substrate-supplied data based on the on-chain metadata. If you do not have one, your best only-via-RPC option is to use Sidecar which performs the decoding on your behalf." ContentLicense="CC BY-SA 4.0" />
  <row Id="9442" PostHistoryTypeId="2" PostId="2531" RevisionGUID="5cc83fd1-7a6a-4537-93d0-75b6f25ab1a8" CreationDate="2022-05-11T11:20:23.017" UserId="1803" Text="I wondered how to create multiple instances of the pallet Treasury and couldn't find any examples so far.&#xD;&#xA;One example is pallet Membership, which doesn't have any dependencies, while the Treasury pallet has: Balances and Bounties.&#xD;&#xA;Looking into the compilation errors and trying different ways to do it, I assume that I should create one Balances instance and one Bounties instance per each Treasury, which is weird. Also, it seems Bounties pallet doesn't have the possibility of creating instances.&#xD;&#xA;&#xD;&#xA;Is it possible to create multiple instances of Treasury pallet, and if yes, how to deal with dependencies? Examples?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9444" PostHistoryTypeId="1" PostId="2531" RevisionGUID="5cc83fd1-7a6a-4537-93d0-75b6f25ab1a8" CreationDate="2022-05-11T11:20:23.017" UserId="1803" Text="Multiple instances of Treasury pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="9445" PostHistoryTypeId="3" PostId="2531" RevisionGUID="5cc83fd1-7a6a-4537-93d0-75b6f25ab1a8" CreationDate="2022-05-11T11:20:23.017" UserId="1803" Text="|runtime|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9446" PostHistoryTypeId="2" PostId="2532" RevisionGUID="1b11277c-0106-4661-aaae-457379696567" CreationDate="2022-05-11T11:22:15.040" UserId="227" Text="I've written another answer on the general topic [here](https://substrate.stackexchange.com/questions/1407/how-to-increase-performance-of-building-substrate-by-cargo-build-release-com/1444#1444), this might already help you further.&#xD;&#xA;&#xD;&#xA;But since you specifically tagged for `substrate-contracts-node`: There are binary releases available at [the GitHub releases page](https://github.com/paritytech/substrate-contracts-node/releases), this might already solve your problem if you don't want to do more modifications." ContentLicense="CC BY-SA 4.0" />
  <row Id="9448" PostHistoryTypeId="2" PostId="2533" RevisionGUID="b9a82e23-9c93-4e31-b170-dd5fef80c21c" CreationDate="2022-05-11T11:23:59.570" UserId="14" Text="You can also give [Fleet](https://github.com/dimensionhq/fleet) a try." ContentLicense="CC BY-SA 4.0" />
  <row Id="9454" PostHistoryTypeId="5" PostId="1444" RevisionGUID="ecd8ca70-12f4-4321-9125-65f0015fbcfc" CreationDate="2022-05-11T11:37:21.717" UserId="29" Comment="edited body" Text="Some answers recommend to build with `--release` or with a production profile. But this misses the point of the original question. If you do this the build will actually take longer due to a number of additional optimizations that are applied!&#xD;&#xA;&#xD;&#xA;You should consider the difference between using `cargo build` and `cargo check`: &#xD;&#xA;&#xD;&#xA;&gt;This will essentially compile the packages without performing the final step of code generation, which is faster than running cargo build.&#xD;&#xA;&#xD;&#xA;(from the [`cargo-check`](https://doc.rust-lang.org/cargo/commands/cargo-check.html) docs)&#xD;&#xA;&#xD;&#xA;So if you e.g. just want to check for compiler errors `cargo check` is already sufficient.&#xD;&#xA;&#xD;&#xA;If you're really in need for faster binary builds then having a beefy remote machine on which you execute the build via [`cargo-remote`](https://github.com/sgeisler/cargo-remote) can be an option. There are also reports that using a local [`sccache`](https://github.com/mozilla/sccache) installation + setting the environment variable `RUSTC_WRAPPER=&quot;sccache&quot;` speeds this process up due to the additional caching done through `sccache`." ContentLicense="CC BY-SA 4.0" />
  <row Id="9458" PostHistoryTypeId="2" PostId="2535" RevisionGUID="6fd9fbcd-fb8f-4221-bf0f-adfeefc32cad" CreationDate="2022-05-11T12:12:26.657" UserId="2025" Text="Here you have a comprehensive guide to get the required (and other related) information by using Polkadot-js API:&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/docs/api/cookbook/blocks/&#xD;&#xA;&#xD;&#xA;In that guide, you have a section to see all the extrinsic information and another section to determine if an extrinsic succeeded/failed." ContentLicense="CC BY-SA 4.0" />
  <row Id="9460" PostHistoryTypeId="2" PostId="2536" RevisionGUID="5867ca1c-6d9b-43d8-bd00-46b860c1ae87" CreationDate="2022-05-11T12:23:36.253" UserId="234" Text="We found that this transaction &#xD;&#xA;0xf35238b1ef440e2a04576c8264ca8288100091a3d4c71069f0336c72078f366b was included into the following three different blocks :&#xD;&#xA;&#xD;&#xA;- [10219793](https://polkadot.subscan.io/block/10219793)&#xD;&#xA;- [10219254](https://polkadot.subscan.io/block/10219254)&#xD;&#xA;- [10218427](https://polkadot.subscan.io/block/10218427)&#xD;&#xA;&#xD;&#xA;Could you explain the reason why this happened ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9462" PostHistoryTypeId="1" PostId="2536" RevisionGUID="5867ca1c-6d9b-43d8-bd00-46b860c1ae87" CreationDate="2022-05-11T12:23:36.253" UserId="234" Text="Why could we find the same transaction hash in 3 different blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9463" PostHistoryTypeId="3" PostId="2536" RevisionGUID="5867ca1c-6d9b-43d8-bd00-46b860c1ae87" CreationDate="2022-05-11T12:23:36.253" UserId="234" Text="|extrinsic|transactions|block|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9464" PostHistoryTypeId="5" PostId="2525" RevisionGUID="9e5ffa13-0f43-4d2b-a66c-f4cfa9497d0d" CreationDate="2022-05-11T12:23:45.887" UserId="2033" Comment="deleted 34 characters in body" Text="I am using&#xD;&#xA; ethereum-type version = &quot;0.12&quot;,&#xD;&#xA; codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;]}&#xD;&#xA;scale-info = { version = &quot;2.0.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;And latest substrate-node-template of branch = &quot;polkadot-v0.9.19&quot; &#xD;&#xA;So I am trying to build the code , and for the above ethereum_types, getting WrapperTypeEncode error.&#xD;&#xA;Can you help me to resolve the above error&#xD;&#xA;&#xD;&#xA;Complete error list:&#xD;&#xA;&#xD;&#xA;    the trait bound `ethereum_types::U256: WrapperTypeEncode` is not satisfied&#xD;&#xA;   --&gt; pallets/light-client/src/lib.rs:101:1&#xD;&#xA;    |&#xD;&#xA;101 | #[frame_support::pallet]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `ethereum_types::U256`&#xD;&#xA;    |&#xD;&#xA;    = note: required because of the requirements on the impl of `parity_scale_codec::Encode` for `ethereum_types::U256`&#xD;&#xA;note: required by a bound in `EncodeLike`&#xD;&#xA;   --&gt; .cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.2/src/encode_like.rs:73:25&#xD;&#xA;    |&#xD;&#xA;73  | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;    |                         ^^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;    = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `ethereum_types::H256: WrapperTypeEncode` is not satisfied&#xD;&#xA;   --&gt; pallets/light-client/src/lib.rs:101:1&#xD;&#xA;    |&#xD;&#xA;101 | #[frame_support::pallet]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `ethereum_types::H256`&#xD;&#xA;    |&#xD;&#xA;    = note: required because of the requirements on the impl of `parity_scale_codec::Encode` for `ethereum_types::H256`&#xD;&#xA;note: required by a bound in `EncodeLike`&#xD;&#xA;   --&gt; .cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.2/src/encode_like.rs:73:25&#xD;&#xA;    |&#xD;&#xA;73  | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;    |                         ^^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;    = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;warning: `pallet-eth-light-client` (lib) generated 7 warnings&#xD;&#xA;error: could not compile `pallet-eth-light-client` due to 2 previous errors; 7 warnings emitted&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9465" PostHistoryTypeId="5" PostId="2528" RevisionGUID="6fb1d36d-f658-43dd-8547-f8038e765fa9" CreationDate="2022-05-11T12:31:47.233" UserId="29" Comment="added 1 character in body" Text="the `adder-collator` is very simple collator used for testing purposes and is compiled from the polkadot repo&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo build --profile testnet --verbose -p test-parachain-adder-collator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then *injected*  into the image using this [Dockerfile](https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/collator_injected.Dockerfile) and published under `paritypr`.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9466" PostHistoryTypeId="5" PostId="2525" RevisionGUID="78d1140b-cdc4-4c61-b6a0-f2e8321a9000" CreationDate="2022-05-11T12:38:10.987" UserId="29" Comment="format" Text="I am using:&#xD;&#xA;```toml&#xD;&#xA;ethereum-type version = &quot;0.12&quot;, codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;]}&#xD;&#xA;scale-info = { version = &quot;2.0.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;```&#xD;&#xA;And latest `substrate-node-template` of branch `polkadot-v0.9.19`. &#xD;&#xA;So I am trying to build the code , and for the above ethereum_types, getting `WrapperTypeEncode` error.&#xD;&#xA;Can you help me to resolve the above error?&#xD;&#xA;&#xD;&#xA;Complete error list:&#xD;&#xA;```&#xD;&#xA;    the trait bound `ethereum_types::U256: WrapperTypeEncode` is not satisfied&#xD;&#xA;   --&gt; pallets/light-client/src/lib.rs:101:1&#xD;&#xA;    |&#xD;&#xA;101 | #[frame_support::pallet]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `ethereum_types::U256`&#xD;&#xA;    |&#xD;&#xA;    = note: required because of the requirements on the impl of `parity_scale_codec::Encode` for `ethereum_types::U256`&#xD;&#xA;note: required by a bound in `EncodeLike`&#xD;&#xA;   --&gt; .cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.2/src/encode_like.rs:73:25&#xD;&#xA;    |&#xD;&#xA;73  | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;    |                         ^^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;    = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `ethereum_types::H256: WrapperTypeEncode` is not satisfied&#xD;&#xA;   --&gt; pallets/light-client/src/lib.rs:101:1&#xD;&#xA;    |&#xD;&#xA;101 | #[frame_support::pallet]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `ethereum_types::H256`&#xD;&#xA;    |&#xD;&#xA;    = note: required because of the requirements on the impl of `parity_scale_codec::Encode` for `ethereum_types::H256`&#xD;&#xA;note: required by a bound in `EncodeLike`&#xD;&#xA;   --&gt; .cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.2/src/encode_like.rs:73:25&#xD;&#xA;    |&#xD;&#xA;73  | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;    |                         ^^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;    = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;warning: `pallet-eth-light-client` (lib) generated 7 warnings&#xD;&#xA;error: could not compile `pallet-eth-light-client` due to 2 previous errors; 7 warnings emitted&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9468" PostHistoryTypeId="2" PostId="2537" RevisionGUID="2ea3b5be-5f3a-47ec-941d-2535f8d6f6e4" CreationDate="2022-05-11T12:52:52.057" UserId="522" Text="We have been attempting an xcm reserve asset transfer of ROC (native token) from Rococo to our parachain. It fails with a cryptic FailedToTransactAsset.&#xD;&#xA;It works on our local testnet just fine. The only difference I can spot is that in our local tests, we set the SafeXcmVersion to 1 via force_default_xcm_version.&#xD;&#xA;Could this be a xcm version issue? If yes, then can we have the relay chain use xcm v1 for our parachain perhaps with force_xcm_version which is a root call. Will this have to be done on Kusama as well?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9470" PostHistoryTypeId="1" PostId="2537" RevisionGUID="2ea3b5be-5f3a-47ec-941d-2535f8d6f6e4" CreationDate="2022-05-11T12:52:52.057" UserId="522" Text="XCM FailedToTransactAsset, maybe xcm version error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9471" PostHistoryTypeId="3" PostId="2537" RevisionGUID="2ea3b5be-5f3a-47ec-941d-2535f8d6f6e4" CreationDate="2022-05-11T12:52:52.057" UserId="522" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9472" PostHistoryTypeId="2" PostId="2538" RevisionGUID="23a53c59-b8dc-4d5d-9db2-10cfb763a495" CreationDate="2022-05-11T13:09:16.127" UserId="165" Text="In substrate what uniquely identifies an extrinsic is the block# + its index in that block, not the call hash.&#xD;&#xA;&#xD;&#xA;So in this case, the call you are referring to would be identified by &#xD;&#xA; - 10219793-2, for block #10219793&#xD;&#xA; - 10219254-2, for block #10219254&#xD;&#xA; - 10218427-2, for block #10218427&#xD;&#xA;&#xD;&#xA;(note that the index here are the same just by chance)&#xD;&#xA;&#xD;&#xA;The hash is the same in all those blocks because is the same extrinsic with the very same arguments in all of them." ContentLicense="CC BY-SA 4.0" />
  <row Id="9474" PostHistoryTypeId="5" PostId="2510" RevisionGUID="b147fa0d-37db-4b6d-ae1f-d7a2f3a9c537" CreationDate="2022-05-11T13:39:06.647" UserId="29" Comment="corrected spelling" Text="Is there any example of how to use [MockValidationDataInherentDataProvider][1] to run a parachain with mock validation? I've been looking all over and can't seem to find any documentation or example of it's usage, any resource on this would be appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/master/primitives/parachain-inherent/src/mock.rs#L45" ContentLicense="CC BY-SA 4.0" />
  <row Id="9475" PostHistoryTypeId="2" PostId="2539" RevisionGUID="e8e4f3f3-4af0-4453-b85a-b804a37dee17" CreationDate="2022-05-11T14:09:39.427" UserId="2089" Text="I want to know the implementation of `http://127.0.0.1:8080/blocks/head` endpoint from (https://github.com/paritytech/substrate-api-sidecar)&#xD;&#xA;&#xD;&#xA;I found some interface here https://github.com/polkadot-js/api/blob/master/packages/rpc-augment/src/augment/jsonrpc.ts#L85&#xD;&#xA;and some implementation https://github.com/polkadot-js/api/blob/master/packages/api-derive/src/chain/getHeader.ts&#xD;&#xA;&#xD;&#xA;but this function doesn't makes sense to me. lack of RxJS understanding I guess. can anyone give me a good direction? I want to see the actual implementation of that particular API...&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9477" PostHistoryTypeId="1" PostId="2539" RevisionGUID="e8e4f3f3-4af0-4453-b85a-b804a37dee17" CreationDate="2022-05-11T14:09:39.427" UserId="2089" Text="understand the implementation of substrate-api-sidecar" ContentLicense="CC BY-SA 4.0" />
  <row Id="9478" PostHistoryTypeId="3" PostId="2539" RevisionGUID="e8e4f3f3-4af0-4453-b85a-b804a37dee17" CreationDate="2022-05-11T14:09:39.427" UserId="2089" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9479" PostHistoryTypeId="2" PostId="2540" RevisionGUID="a6b91770-574b-40b2-851d-576ba48e16b2" CreationDate="2022-05-11T14:09:44.633" UserId="522" Text="The issue was not enough funds were being sent to cover costs.&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="9481" PostHistoryTypeId="2" PostId="2541" RevisionGUID="ecd8211f-6a56-4f28-93f9-c86b93ba4d97" CreationDate="2022-05-11T14:18:22.780" UserId="234" Text="These are 3 different transactions. The hash that you shared does not uniquely identify a transaction. &#xD;&#xA;&#xD;&#xA;As Alejandro mentioned, the unique identifier of a transaction is what you see in the column Extrinsic ID which includes the Block number and the Extrinsic Index. If you check the blocks that you shared you will see that the extrinsic IDs are different (10218427-2, 10219254-2, 10219793-2) even though the hash (0xf352....8f366b) is the same.&#xD;&#xA;&#xD;&#xA;You can also check that there were 3 different transactions by looking at the &#xD;&#xA;[transfers of the destination address](https://polkadot.subscan.io/transfer?address=13FxSVLSrXYmTqkb3Qre6Nf5ZD6sKVBA4VsZeuAfoBwMHFes)&#xD;&#xA;and confirm that there were 3 different transfers of 10 DOT to this account.&#xD;&#xA;&#xD;&#xA;So, in general to retrieve details of an extrinsic you need the extrinsic hash but also the block number in which it was included.&#xD;&#xA;&#xD;&#xA;This is a common misunderstanding so that is why we have a dedicated section (Jaco already mentioned it in the comment) that clarifies it on our wiki page [here](https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics)&#xD;&#xA;&#xD;&#xA;An example that shows that you have to get first the block number and iterate through the indices to retrieve the info of an extrinsic is shown [here](https://polkadot.js.org/docs/api/cookbook/blocks/#how-do-i-view-extrinsic-information)&#xD;&#xA;Another example (very similar) can be found in this SE [answer](https://substrate.stackexchange.com/a/653/234)&#xD;&#xA;Also another resource / issue that mentions the same is [here](https://github.com/polkadot-js/api/issues/2326#issuecomment-637963329)" ContentLicense="CC BY-SA 4.0" />
  <row Id="9483" PostHistoryTypeId="5" PostId="2541" RevisionGUID="7c3e5c35-f66d-43af-b131-5b205740cf4c" CreationDate="2022-05-11T14:23:29.097" UserId="234" Comment="added 65 characters in body" Text="These are 3 different transactions. The hash that you shared does not uniquely identify a transaction. &#xD;&#xA;&#xD;&#xA;As Alejandro mentioned, the unique identifier of a transaction is what you see in the column Extrinsic ID which includes the Block number and the Extrinsic Index. If you check the blocks that you shared you will see that the extrinsic IDs are different (10218427-2, 10219254-2, 10219793-2) even though the hash (0xf352....8f366b) is the same.&#xD;&#xA;&#xD;&#xA;You can also check that there were 3 different transactions by looking at the &#xD;&#xA;[transfers of the destination address](https://polkadot.subscan.io/transfer?address=13FxSVLSrXYmTqkb3Qre6Nf5ZD6sKVBA4VsZeuAfoBwMHFes)&#xD;&#xA;and confirm that there were 3 different transfers of 10 DOT to this account.&#xD;&#xA;&#xD;&#xA;So, in general to retrieve details of an extrinsic you need the extrinsic hash but also the block number in which it was included.&#xD;&#xA;&#xD;&#xA;This is a common misunderstanding so that is why we have a dedicated section (*Jaco already mentioned it in the comment*) that clarifies it in our wiki page [Unique Identifiers for Extrinsics](https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics)&#xD;&#xA;&#xD;&#xA;**Adding here some extra resources that can be helpful**&#xD;&#xA;- [How do I view extrinsic information?](https://polkadot.js.org/docs/api/cookbook/blocks/#how-do-i-view-extrinsic-information) : example that first gets the block number and iterates through the indices to retrieve the info of an extrinsic&#xD;&#xA;- Another example (very similar) can be found in this SE [answer](https://substrate.stackexchange.com/a/653/234)&#xD;&#xA;- [Issue](https://github.com/polkadot-js/api/issues/2326#issuecomment-637963329) that describes the same" ContentLicense="CC BY-SA 4.0" />
  <row Id="9484" PostHistoryTypeId="2" PostId="2542" RevisionGUID="88d508d7-8824-4236-ba98-5908d8f4a1fa" CreationDate="2022-05-11T14:40:52.213" UserId="620" Text="Sure, the entry to the API is [here](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/controllers/blocks/BlocksController.ts). Then, the actual logic of it is [here](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/services/blocks/BlocksService.ts)." ContentLicense="CC BY-SA 4.0" />
  <row Id="9486" PostHistoryTypeId="6" PostId="2539" RevisionGUID="9d600f7c-4dac-4be2-971e-6ffc29d33ceb" CreationDate="2022-05-11T14:48:34.563" UserId="29" Comment="edited tags" Text="|polkadot-js|substrate-api-sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9487" PostHistoryTypeId="5" PostId="2524" RevisionGUID="76dcb4e8-7803-4c4a-b2f4-16147f9a3305" CreationDate="2022-05-11T15:06:27.903" UserId="484" Comment="added 4919 characters in body" Text="I am trying to run `statemine` in `polkalaunch`. I have get 0.9.18 versions of `polkadot` and `polkadot-collator`. And trying to run like next:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;  &quot;relaychain&quot;: {&#xD;&#xA;    &quot;bin&quot;: &quot;../../../polkadot/target/release/polkadot&quot;,&#xD;&#xA;    &quot;chain&quot;: &quot;kusama-local&quot;,&#xD;&#xA;    &quot;genesis&quot;: {&#xD;&#xA;      &quot;runtime&quot;: {&#xD;&#xA;        &quot;runtime_genesis_config&quot;: {&#xD;&#xA;          &quot;configuration&quot;: {&#xD;&#xA;            &quot;config&quot;: {&#xD;&#xA;              &quot;validation_upgrade_frequency&quot;: 2,&#xD;&#xA;              &quot;validation_upgrade_delay&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    &quot;nodes&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9944,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/alice&quot;,&#xD;&#xA;        &quot;port&quot;: 30444,&#xD;&#xA;        &quot;flags&quot;: [&quot;--rpc-cors=all&quot;, &quot;--beefy&quot;, &quot;--enable-offchain-indexing=true&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9955,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/bob&quot;,&#xD;&#xA;        &quot;port&quot;: 30555,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9966,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/charlie&quot;,&#xD;&#xA;        &quot;port&quot;: 30666,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;dave&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9977,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/dave&quot;,&#xD;&#xA;        &quot;port&quot;: 30777,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;ferdie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9978,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/ferdie&quot;,&#xD;&#xA;        &quot;port&quot;: 30778,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;parachains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;bin&quot;: &quot;../../../cumulus/target/release/polkadot-collator&quot;,&#xD;&#xA;      &quot;chain&quot;: &quot;statemine-local&quot;,&#xD;&#xA;      &quot;nodes&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9988,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/alice&quot;,&#xD;&#xA;          &quot;port&quot;: 31100,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9997,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/bob&quot;,&#xD;&#xA;          &quot;port&quot;: 31200,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9996,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/charlie&quot;,&#xD;&#xA;          &quot;port&quot;: 31300,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  &quot;types&quot;: {},&#xD;&#xA;  &quot;finalization&quot;: false,&#xD;&#xA;  &quot;simpleParachains&quot;: []&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I see relay blocks produced but not statemine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I able to produce blocks on my parachain network. And also tried rococo for relay and statemine-dev/local in above config, no results.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Statemine several collators][1]][1]&#xD;&#xA;[![Statemine no blocks][2]][2]&#xD;&#xA;[![Statemine is parachain][3]][3]&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;Logs seems fine &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-05-11 15:55:10 Polkadot collator    &#xD;&#xA;2022-05-11 15:55:10 ✌️  version 5.3.0-b1e91afb7-x86_64-linux-gnu    &#xD;&#xA;2022-05-11 15:55:10 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2022    &#xD;&#xA;2022-05-11 15:55:10  Chain specification: Statemine Local    &#xD;&#xA;2022-05-11 15:55:10   Node name: Alice    &#xD;&#xA;2022-05-11 15:55:10  Role: AUTHORITY    &#xD;&#xA;2022-05-11 15:55:10  Database: RocksDb at /tmp/substratejHBiJi/chains/statemine_local/db/full    &#xD;&#xA;2022-05-11 15:55:10 ⛓  Native runtime: statemine-800 (statemine-0.tx5.au1)    &#xD;&#xA;2022-05-11 15:55:10 assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-11 15:55:10 assembling new collators for new session 1 at #0    &#xD;&#xA;2022-05-11 15:55:10 Parachain id: Id(1000)    &#xD;&#xA;2022-05-11 15:55:10 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    &#xD;&#xA;2022-05-11 15:55:10 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000c167e2803b46f80dace0bc13481465390c9011b17b8403845d606361c197495703170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2022-05-11 15:55:10 Is collating: yes    &#xD;&#xA;2022-05-11 15:55:10 [Parachain] assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-11 15:55:10 [Parachain] assembling new collators for new session 1 at #0    &#xD;&#xA;2022-05-11 15:55:11 [Parachain]  Initializing Genesis block/state (state: 0xc167…4957, header-hash: 0xb8cd…390b)    &#xD;&#xA;2022-05-11 15:55:13 [Relaychain]  Initializing Genesis block/state (state: 0xeb9f…680a, header-hash: 0x69b2…082e)    &#xD;&#xA;2022-05-11 15:55:13 [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]   Local node identity is: 12D3KooWHx7EaXTHvQQJ9zqdAwreArUaiCjQEeZxd5VDUqKXo9uE    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Highest known block at #0    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] Listening for new connections on 127.0.0.1:9945.    &#xD;&#xA;2022-05-11 15:55:14 [Parachain] Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2022-05-11 15:55:14 [Parachain]   Local node identity is: 12D3KooWLPW6TyqXc8mGJTuARXCbMR3WLvPkDjPcvPyTFZpn5s76    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  New epoch 0 launching at block 0x1da5…73bc (block slot 275380152 &gt;= start slot 275380152).    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Next epoch starts at slot 275380752    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] ✨ Imported #1 (0x1da5…73bc)    &#xD;&#xA;2022-05-11 15:55:15 Accepted a new tcp connection from 127.0.0.1:39826.    &#xD;&#xA;2022-05-11 15:55:15 [Parachain]  Highest known block at #0    &#xD;&#xA;2022-05-11 15:55:15 [Parachain] Unable to bind RPC server to 127.0.0.1:9933. Trying random port.    &#xD;&#xA;2022-05-11 15:55:15 [Parachain] Listening for new connections on 127.0.0.1:9988.    &#xD;&#xA;2022-05-11 15:55:17 Accepted a new tcp connection from 127.0.0.1:39852.    &#xD;&#xA;2022-05-11 15:55:18 [Relaychain] ✨ Imported #2 (0x2cd9…2123)    &#xD;&#xA;2022-05-11 15:55:18 Accepted a new tcp connection from 127.0.0.1:50682.    &#xD;&#xA;2022-05-11 15:55:19 [Relaychain]  Idle (5 peers), best: #2 (0x2cd9…2123), finalized #0 (0x69b2…082e), ⬇ 9.3kiB/s ⬆ 6.1kiB/s    &#xD;&#xA;2022-05-11 15:55:20 [Parachain]  Idle (0 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 4.0kiB/s ⬆ 3.2kiB/s    &#xD;&#xA;2022-05-11 15:55:24 [Relaychain] ✨ Imported #3 (0x0ed5…a7c0)    &#xD;&#xA;2022-05-11 15:55:24 [Relaychain]  Idle (6 peers), best: #3 (0x0ed5…a7c0), finalized #0 (0x69b2…082e), ⬇ 5.2kiB/s ⬆ 5.0kiB/s    &#xD;&#xA;2022-05-11 15:55:25 [Parachain]  Idle (1 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 1.3kiB/s ⬆ 1.3kiB/s    &#xD;&#xA;2022-05-11 15:55:29 [Relaychain]  Idle (7 peers), best: #3 (0x0ed5…a7c0), finalized #1 (0x1da5…73bc), ⬇ 2.8kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2022-05-11 15:55:30 [Relaychain] ✨ Imported #4 (0x6ace…4244)    &#xD;&#xA;2022-05-11 15:55:30 [Relaychain] ✨ Imported #4 (0xb656…7bcc)    &#xD;&#xA;2022-05-11 15:55:30 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 1.1kiB/s ⬆ 1.0kiB/s    &#xD;&#xA;2022-05-11 15:55:34 [Relaychain]  Idle (7 peers), best: #4 (0x6ace…4244), finalized #1 (0x1da5…73bc), ⬇ 3.5kiB/s ⬆ 2.3kiB/s    &#xD;&#xA;2022-05-11 15:55:35 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 0.5kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-11 15:55:36 [Relaychain] ✨ Imported #5 (0x483e…686f)    &#xD;&#xA;2022-05-11 15:55:36 [Relaychain] ✨ Imported #5 (0x3375…4531)    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;```&#xD;&#xA;2022-05-11 16:05:52 [Relaychain]  Idle (6 peers), best: #21 (0x7c26…8c8f), finalized #19 (0xf4da…23f4), ⬇ 2.2kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-05-11 16:05:53 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 74 B/s ⬆ 74 B/s    &#xD;&#xA;```&#xD;&#xA;things look like good, but no block production.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cfqjg.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZLdOk.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/YrYIN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9488" PostHistoryTypeId="52" PostId="2523" RevisionGUID="40493840-71e8-49d0-966a-bd22720d6ffc" CreationDate="2022-05-11T15:17:54.683" />
  <row Id="9489" PostHistoryTypeId="5" PostId="2524" RevisionGUID="33d78f30-fd42-4ba0-8424-ebe90450705d" CreationDate="2022-05-11T15:24:14.623" UserId="484" Comment="added 4273 characters in body" Text="I am trying to run `statemine` in `polkalaunch`. I have get 0.9.18 versions of `polkadot` and `polkadot-collator`. And trying to run like next:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;  &quot;relaychain&quot;: {&#xD;&#xA;    &quot;bin&quot;: &quot;../../../polkadot/target/release/polkadot&quot;,&#xD;&#xA;    &quot;chain&quot;: &quot;kusama-local&quot;,&#xD;&#xA;    &quot;genesis&quot;: {&#xD;&#xA;      &quot;runtime&quot;: {&#xD;&#xA;        &quot;runtime_genesis_config&quot;: {&#xD;&#xA;          &quot;configuration&quot;: {&#xD;&#xA;            &quot;config&quot;: {&#xD;&#xA;              &quot;validation_upgrade_frequency&quot;: 2,&#xD;&#xA;              &quot;validation_upgrade_delay&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    &quot;nodes&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9944,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/alice&quot;,&#xD;&#xA;        &quot;port&quot;: 30444,&#xD;&#xA;        &quot;flags&quot;: [&quot;--rpc-cors=all&quot;, &quot;--beefy&quot;, &quot;--enable-offchain-indexing=true&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9955,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/bob&quot;,&#xD;&#xA;        &quot;port&quot;: 30555,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9966,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/charlie&quot;,&#xD;&#xA;        &quot;port&quot;: 30666,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;dave&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9977,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/dave&quot;,&#xD;&#xA;        &quot;port&quot;: 30777,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;ferdie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9978,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/ferdie&quot;,&#xD;&#xA;        &quot;port&quot;: 30778,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;parachains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;bin&quot;: &quot;../../../cumulus/target/release/polkadot-collator&quot;,&#xD;&#xA;      &quot;chain&quot;: &quot;statemine-local&quot;,&#xD;&#xA;      &quot;nodes&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9988,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/alice&quot;,&#xD;&#xA;          &quot;port&quot;: 31100,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9997,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/bob&quot;,&#xD;&#xA;          &quot;port&quot;: 31200,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9996,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/charlie&quot;,&#xD;&#xA;          &quot;port&quot;: 31300,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  &quot;types&quot;: {},&#xD;&#xA;  &quot;finalization&quot;: false,&#xD;&#xA;  &quot;simpleParachains&quot;: []&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I see relay blocks produced but not statemine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I able to produce blocks on my parachain network. And also tried rococo for relay and statemine-dev/local in above config, no results.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Statemine several collators][1]][1]&#xD;&#xA;[![Statemine no blocks][2]][2]&#xD;&#xA;[![Statemine is parachain][3]][3]&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;Logs seems fine &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-05-11 15:55:10 Polkadot collator    &#xD;&#xA;2022-05-11 15:55:10 ✌️  version 5.3.0-b1e91afb7-x86_64-linux-gnu    &#xD;&#xA;2022-05-11 15:55:10 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2022    &#xD;&#xA;2022-05-11 15:55:10  Chain specification: Statemine Local    &#xD;&#xA;2022-05-11 15:55:10   Node name: Alice    &#xD;&#xA;2022-05-11 15:55:10  Role: AUTHORITY    &#xD;&#xA;2022-05-11 15:55:10  Database: RocksDb at /tmp/substratejHBiJi/chains/statemine_local/db/full    &#xD;&#xA;2022-05-11 15:55:10 ⛓  Native runtime: statemine-800 (statemine-0.tx5.au1)    &#xD;&#xA;2022-05-11 15:55:10 assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-11 15:55:10 assembling new collators for new session 1 at #0    &#xD;&#xA;2022-05-11 15:55:10 Parachain id: Id(1000)    &#xD;&#xA;2022-05-11 15:55:10 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    &#xD;&#xA;2022-05-11 15:55:10 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000c167e2803b46f80dace0bc13481465390c9011b17b8403845d606361c197495703170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2022-05-11 15:55:10 Is collating: yes    &#xD;&#xA;2022-05-11 15:55:10 [Parachain] assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-11 15:55:10 [Parachain] assembling new collators for new session 1 at #0    &#xD;&#xA;2022-05-11 15:55:11 [Parachain]  Initializing Genesis block/state (state: 0xc167…4957, header-hash: 0xb8cd…390b)    &#xD;&#xA;2022-05-11 15:55:13 [Relaychain]  Initializing Genesis block/state (state: 0xeb9f…680a, header-hash: 0x69b2…082e)    &#xD;&#xA;2022-05-11 15:55:13 [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]   Local node identity is: 12D3KooWHx7EaXTHvQQJ9zqdAwreArUaiCjQEeZxd5VDUqKXo9uE    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Highest known block at #0    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] Listening for new connections on 127.0.0.1:9945.    &#xD;&#xA;2022-05-11 15:55:14 [Parachain] Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2022-05-11 15:55:14 [Parachain]   Local node identity is: 12D3KooWLPW6TyqXc8mGJTuARXCbMR3WLvPkDjPcvPyTFZpn5s76    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  New epoch 0 launching at block 0x1da5…73bc (block slot 275380152 &gt;= start slot 275380152).    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Next epoch starts at slot 275380752    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] ✨ Imported #1 (0x1da5…73bc)    &#xD;&#xA;2022-05-11 15:55:15 Accepted a new tcp connection from 127.0.0.1:39826.    &#xD;&#xA;2022-05-11 15:55:15 [Parachain]  Highest known block at #0    &#xD;&#xA;2022-05-11 15:55:15 [Parachain] Unable to bind RPC server to 127.0.0.1:9933. Trying random port.    &#xD;&#xA;2022-05-11 15:55:15 [Parachain] Listening for new connections on 127.0.0.1:9988.    &#xD;&#xA;2022-05-11 15:55:17 Accepted a new tcp connection from 127.0.0.1:39852.    &#xD;&#xA;2022-05-11 15:55:18 [Relaychain] ✨ Imported #2 (0x2cd9…2123)    &#xD;&#xA;2022-05-11 15:55:18 Accepted a new tcp connection from 127.0.0.1:50682.    &#xD;&#xA;2022-05-11 15:55:19 [Relaychain]  Idle (5 peers), best: #2 (0x2cd9…2123), finalized #0 (0x69b2…082e), ⬇ 9.3kiB/s ⬆ 6.1kiB/s    &#xD;&#xA;2022-05-11 15:55:20 [Parachain]  Idle (0 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 4.0kiB/s ⬆ 3.2kiB/s    &#xD;&#xA;2022-05-11 15:55:24 [Relaychain] ✨ Imported #3 (0x0ed5…a7c0)    &#xD;&#xA;2022-05-11 15:55:24 [Relaychain]  Idle (6 peers), best: #3 (0x0ed5…a7c0), finalized #0 (0x69b2…082e), ⬇ 5.2kiB/s ⬆ 5.0kiB/s    &#xD;&#xA;2022-05-11 15:55:25 [Parachain]  Idle (1 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 1.3kiB/s ⬆ 1.3kiB/s    &#xD;&#xA;2022-05-11 15:55:29 [Relaychain]  Idle (7 peers), best: #3 (0x0ed5…a7c0), finalized #1 (0x1da5…73bc), ⬇ 2.8kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2022-05-11 15:55:30 [Relaychain] ✨ Imported #4 (0x6ace…4244)    &#xD;&#xA;2022-05-11 15:55:30 [Relaychain] ✨ Imported #4 (0xb656…7bcc)    &#xD;&#xA;2022-05-11 15:55:30 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 1.1kiB/s ⬆ 1.0kiB/s    &#xD;&#xA;2022-05-11 15:55:34 [Relaychain]  Idle (7 peers), best: #4 (0x6ace…4244), finalized #1 (0x1da5…73bc), ⬇ 3.5kiB/s ⬆ 2.3kiB/s    &#xD;&#xA;2022-05-11 15:55:35 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 0.5kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-11 15:55:36 [Relaychain] ✨ Imported #5 (0x483e…686f)    &#xD;&#xA;2022-05-11 15:55:36 [Relaychain] ✨ Imported #5 (0x3375…4531)    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;```&#xD;&#xA;2022-05-11 16:05:52 [Relaychain]  Idle (6 peers), best: #21 (0x7c26…8c8f), finalized #19 (0xf4da…23f4), ⬇ 2.2kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-05-11 16:05:53 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 74 B/s ⬆ 74 B/s    &#xD;&#xA;```&#xD;&#xA;things look like good, but no block production.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Resolving parachain id...&#xD;&#xA;2022-05-11 16:10:11 Building chain spec    &#xD;&#xA;  ✓ Read parachain id for ../../../cumulus/target/release/polkadot-collator: 1000&#xD;&#xA;2022-05-11 16:10:11 Building chain spec    &#xD;&#xA;&#xD;&#xA; Starting with a fresh authority set...&#xD;&#xA;   Added Genesis Authority alice&#xD;&#xA;   Added Genesis Authority bob&#xD;&#xA;   Added Genesis Authority charlie&#xD;&#xA;   Added Genesis Authority dave&#xD;&#xA;   Added Genesis Authority eve&#xD;&#xA;   Added Genesis Authority ferdie&#xD;&#xA;&#xD;&#xA;⚙ Updating Relay Chain Genesis Configuration&#xD;&#xA;  ⚠ Bad Genesis Configuration [ runtime_genesis_config: [object Object] ]&#xD;&#xA;&#xD;&#xA;⛓ Adding Genesis Parachains&#xD;&#xA;  ✓ Added Genesis Parachain 1000&#xD;&#xA;Added Boot Nodes: /ip4/127.0.0.1/tcp/30444/p2p/12D3KooWBpXHFGqv6Cn4fecVkoZog5AwKpo4srLCh82hRLCREyqQ,/ip4/127.0.0.1/tcp/30555/p2p/12D3KooWL2Trz3SHdj69KE4u1rs8L4dNiiSVWHvPgghH5cruHpdi,/ip4/127.0.0.1/tcp/30666/p2p/12D3KooWSRubBEXi2mepS977hbAtwcqajiuiBc4DsY12aAGBiQGt,/ip4/127.0.0.1/tcp/30777/p2p/12D3KooWCmF9w2hKHwyjYmfBHGE4PT4yDoiv8zMtTHFXdiXQQ9GU,/ip4/127.0.0.1/tcp/30778/p2p/12D3KooWNYx15tFrmeVk9Q768bZTby1eAo7vYJMg7W6hG7bzFQ9F,/ip4/127.0.0.1/tcp/30779/p2p/12D3KooWAzjYTQC2rhrfq1vUgcQ9u4EtLtc2qVckArSdg5BVn9i4&#xD;&#xA;&#xD;&#xA;2022-05-11 16:10:12 Building chain spec    &#xD;&#xA;2022-05-11 16:10:13 [0]  generated 2 npos voters, 2 from validators and 0 nominators    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size.    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size    &#xD;&#xA;Starting Relaychain Node alice... wsPort: 9944 rpcPort: undefined port: 30444 nodeKey: c2932f775f2342b04e99242358542a4184b67fe83a7f084afc69dba8bbafd50b&#xD;&#xA;Added --rpc-cors=all,--beefy,--enable-offchain-indexing=true&#xD;&#xA;Starting Relaychain Node bob... wsPort: 9955 rpcPort: undefined port: 30555 nodeKey: 47913ebe0a697d07aeecbae0c0c440cbb3d3ad04947707be5853115d504d160a&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node charlie... wsPort: 9966 rpcPort: undefined port: 30666 nodeKey: 1393cc7ad66e836d152b2385793243c19f9f86a6bda209ca0fd3b7c473a04977&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node dave... wsPort: 9977 rpcPort: undefined port: 30777 nodeKey: f39b4dba76fc9262b239b49eb0327496faea6cdbef865227d9b10c63107ce04a&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node eve... wsPort: 9978 rpcPort: undefined port: 30778 nodeKey: 83ad2741d3f342da242adfddb5f4a12c0b76c8e0944ea7532cc26fb327f2a684&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node ferdie... wsPort: 9979 rpcPort: undefined port: 30779 nodeKey: 5cebfc00fb88231f57264c4925ad09fcb30a398f9b4b086a396e275841e84751&#xD;&#xA;Added --beefy&#xD;&#xA;2022-05-11 16:10:13          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:15          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:18          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:20          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:23          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:25          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:28          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:30          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:33          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:35          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:38        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;Starting a Collator for parachain 1000: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ, Collator port : 31100 wsPort : 9988 rpcPort : undefined&#xD;&#xA;Added --alice&#xD;&#xA;Added --force-authoring&#xD;&#xA;Added --chain=statemine-local&#xD;&#xA;Added  to parachain&#xD;&#xA;Added --execution=wasm to collator&#xD;&#xA;Starting a Collator for parachain 1000: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ, Collator port : 31200 wsPort : 9997 rpcPort : undefined&#xD;&#xA;Added --bob&#xD;&#xA;Added --force-authoring&#xD;&#xA;Added --chain=statemine-local&#xD;&#xA;Added  to parachain&#xD;&#xA;Added --execution=wasm to collator&#xD;&#xA; POLKADOT LAUNCH COMPLETE &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cfqjg.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZLdOk.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/YrYIN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9490" PostHistoryTypeId="5" PostId="2524" RevisionGUID="559e5c90-7a0a-4eb3-a9c8-85fbc4524611" CreationDate="2022-05-11T15:48:20.430" UserId="484" Comment="added 140 characters in body" Text="I am trying to run `statemine` in `polkalaunch`. I have get 0.9.18 versions of `polkadot` and `polkadot-collator`. And trying to run like next:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;  &quot;relaychain&quot;: {&#xD;&#xA;    &quot;bin&quot;: &quot;../../../polkadot/target/release/polkadot&quot;,&#xD;&#xA;    &quot;chain&quot;: &quot;kusama-local&quot;,&#xD;&#xA;    &quot;genesis&quot;: {&#xD;&#xA;      &quot;runtime&quot;: {&#xD;&#xA;        &quot;runtime_genesis_config&quot;: {&#xD;&#xA;          &quot;configuration&quot;: {&#xD;&#xA;            &quot;config&quot;: {&#xD;&#xA;              &quot;validation_upgrade_frequency&quot;: 2,&#xD;&#xA;              &quot;validation_upgrade_delay&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    &quot;nodes&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9944,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/alice&quot;,&#xD;&#xA;        &quot;port&quot;: 30444,&#xD;&#xA;        &quot;flags&quot;: [&quot;--rpc-cors=all&quot;, &quot;--beefy&quot;, &quot;--enable-offchain-indexing=true&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9955,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/bob&quot;,&#xD;&#xA;        &quot;port&quot;: 30555,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9966,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/charlie&quot;,&#xD;&#xA;        &quot;port&quot;: 30666,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;dave&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9977,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/dave&quot;,&#xD;&#xA;        &quot;port&quot;: 30777,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;ferdie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9978,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/ferdie&quot;,&#xD;&#xA;        &quot;port&quot;: 30778,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;parachains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;bin&quot;: &quot;../../../cumulus/target/release/polkadot-collator&quot;,&#xD;&#xA;      &quot;chain&quot;: &quot;statemine-local&quot;,&#xD;&#xA;      &quot;nodes&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9988,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/alice&quot;,&#xD;&#xA;          &quot;port&quot;: 31100,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9997,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/bob&quot;,&#xD;&#xA;          &quot;port&quot;: 31200,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9996,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/charlie&quot;,&#xD;&#xA;          &quot;port&quot;: 31300,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  &quot;types&quot;: {},&#xD;&#xA;  &quot;finalization&quot;: false,&#xD;&#xA;  &quot;simpleParachains&quot;: []&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I see relay blocks produced but not statemine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I able to produce blocks on my parachain network. And also tried rococo for relay and statemine-dev/local in above config, no results.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Statemine several collators][1]][1]&#xD;&#xA;[![Statemine no blocks][2]][2]&#xD;&#xA;[![Statemine is parachain][3]][3]&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;Logs seems fine &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-05-11 15:55:10 Polkadot collator    &#xD;&#xA;2022-05-11 15:55:10 ✌️  version 5.3.0-b1e91afb7-x86_64-linux-gnu    &#xD;&#xA;2022-05-11 15:55:10 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2022    &#xD;&#xA;2022-05-11 15:55:10  Chain specification: Statemine Local    &#xD;&#xA;2022-05-11 15:55:10   Node name: Alice    &#xD;&#xA;2022-05-11 15:55:10  Role: AUTHORITY    &#xD;&#xA;2022-05-11 15:55:10  Database: RocksDb at /tmp/substratejHBiJi/chains/statemine_local/db/full    &#xD;&#xA;2022-05-11 15:55:10 ⛓  Native runtime: statemine-800 (statemine-0.tx5.au1)    &#xD;&#xA;2022-05-11 15:55:10 assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-11 15:55:10 assembling new collators for new session 1 at #0    &#xD;&#xA;2022-05-11 15:55:10 Parachain id: Id(1000)    &#xD;&#xA;2022-05-11 15:55:10 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    &#xD;&#xA;2022-05-11 15:55:10 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000c167e2803b46f80dace0bc13481465390c9011b17b8403845d606361c197495703170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2022-05-11 15:55:10 Is collating: yes    &#xD;&#xA;2022-05-11 15:55:10 [Parachain] assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-11 15:55:10 [Parachain] assembling new collators for new session 1 at #0    &#xD;&#xA;2022-05-11 15:55:11 [Parachain]  Initializing Genesis block/state (state: 0xc167…4957, header-hash: 0xb8cd…390b)    &#xD;&#xA;2022-05-11 15:55:13 [Relaychain]  Initializing Genesis block/state (state: 0xeb9f…680a, header-hash: 0x69b2…082e)    &#xD;&#xA;2022-05-11 15:55:13 [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]   Local node identity is: 12D3KooWHx7EaXTHvQQJ9zqdAwreArUaiCjQEeZxd5VDUqKXo9uE    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Highest known block at #0    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] Listening for new connections on 127.0.0.1:9945.    &#xD;&#xA;2022-05-11 15:55:14 [Parachain] Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2022-05-11 15:55:14 [Parachain]   Local node identity is: 12D3KooWLPW6TyqXc8mGJTuARXCbMR3WLvPkDjPcvPyTFZpn5s76    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  New epoch 0 launching at block 0x1da5…73bc (block slot 275380152 &gt;= start slot 275380152).    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Next epoch starts at slot 275380752    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] ✨ Imported #1 (0x1da5…73bc)    &#xD;&#xA;2022-05-11 15:55:15 Accepted a new tcp connection from 127.0.0.1:39826.    &#xD;&#xA;2022-05-11 15:55:15 [Parachain]  Highest known block at #0    &#xD;&#xA;2022-05-11 15:55:15 [Parachain] Unable to bind RPC server to 127.0.0.1:9933. Trying random port.    &#xD;&#xA;2022-05-11 15:55:15 [Parachain] Listening for new connections on 127.0.0.1:9988.    &#xD;&#xA;2022-05-11 15:55:17 Accepted a new tcp connection from 127.0.0.1:39852.    &#xD;&#xA;2022-05-11 15:55:18 [Relaychain] ✨ Imported #2 (0x2cd9…2123)    &#xD;&#xA;2022-05-11 15:55:18 Accepted a new tcp connection from 127.0.0.1:50682.    &#xD;&#xA;2022-05-11 15:55:19 [Relaychain]  Idle (5 peers), best: #2 (0x2cd9…2123), finalized #0 (0x69b2…082e), ⬇ 9.3kiB/s ⬆ 6.1kiB/s    &#xD;&#xA;2022-05-11 15:55:20 [Parachain]  Idle (0 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 4.0kiB/s ⬆ 3.2kiB/s    &#xD;&#xA;2022-05-11 15:55:24 [Relaychain] ✨ Imported #3 (0x0ed5…a7c0)    &#xD;&#xA;2022-05-11 15:55:24 [Relaychain]  Idle (6 peers), best: #3 (0x0ed5…a7c0), finalized #0 (0x69b2…082e), ⬇ 5.2kiB/s ⬆ 5.0kiB/s    &#xD;&#xA;2022-05-11 15:55:25 [Parachain]  Idle (1 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 1.3kiB/s ⬆ 1.3kiB/s    &#xD;&#xA;2022-05-11 15:55:29 [Relaychain]  Idle (7 peers), best: #3 (0x0ed5…a7c0), finalized #1 (0x1da5…73bc), ⬇ 2.8kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2022-05-11 15:55:30 [Relaychain] ✨ Imported #4 (0x6ace…4244)    &#xD;&#xA;2022-05-11 15:55:30 [Relaychain] ✨ Imported #4 (0xb656…7bcc)    &#xD;&#xA;2022-05-11 15:55:30 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 1.1kiB/s ⬆ 1.0kiB/s    &#xD;&#xA;2022-05-11 15:55:34 [Relaychain]  Idle (7 peers), best: #4 (0x6ace…4244), finalized #1 (0x1da5…73bc), ⬇ 3.5kiB/s ⬆ 2.3kiB/s    &#xD;&#xA;2022-05-11 15:55:35 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 0.5kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-11 15:55:36 [Relaychain] ✨ Imported #5 (0x483e…686f)    &#xD;&#xA;2022-05-11 15:55:36 [Relaychain] ✨ Imported #5 (0x3375…4531)    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;```&#xD;&#xA;2022-05-11 16:05:52 [Relaychain]  Idle (6 peers), best: #21 (0x7c26…8c8f), finalized #19 (0xf4da…23f4), ⬇ 2.2kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-05-11 16:05:53 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 74 B/s ⬆ 74 B/s    &#xD;&#xA;```&#xD;&#xA;things look like good, but no block production.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Resolving parachain id...&#xD;&#xA;2022-05-11 16:10:11 Building chain spec    &#xD;&#xA;  ✓ Read parachain id for ../../../cumulus/target/release/polkadot-collator: 1000&#xD;&#xA;2022-05-11 16:10:11 Building chain spec    &#xD;&#xA;&#xD;&#xA; Starting with a fresh authority set...&#xD;&#xA;   Added Genesis Authority alice&#xD;&#xA;   Added Genesis Authority bob&#xD;&#xA;   Added Genesis Authority charlie&#xD;&#xA;   Added Genesis Authority dave&#xD;&#xA;   Added Genesis Authority eve&#xD;&#xA;   Added Genesis Authority ferdie&#xD;&#xA;&#xD;&#xA;⚙ Updating Relay Chain Genesis Configuration&#xD;&#xA;  ⚠ Bad Genesis Configuration [ runtime_genesis_config: [object Object] ]&#xD;&#xA;&#xD;&#xA;⛓ Adding Genesis Parachains&#xD;&#xA;  ✓ Added Genesis Parachain 1000&#xD;&#xA;Added Boot Nodes: /ip4/127.0.0.1/tcp/30444/p2p/12D3KooWBpXHFGqv6Cn4fecVkoZog5AwKpo4srLCh82hRLCREyqQ,/ip4/127.0.0.1/tcp/30555/p2p/12D3KooWL2Trz3SHdj69KE4u1rs8L4dNiiSVWHvPgghH5cruHpdi,/ip4/127.0.0.1/tcp/30666/p2p/12D3KooWSRubBEXi2mepS977hbAtwcqajiuiBc4DsY12aAGBiQGt,/ip4/127.0.0.1/tcp/30777/p2p/12D3KooWCmF9w2hKHwyjYmfBHGE4PT4yDoiv8zMtTHFXdiXQQ9GU,/ip4/127.0.0.1/tcp/30778/p2p/12D3KooWNYx15tFrmeVk9Q768bZTby1eAo7vYJMg7W6hG7bzFQ9F,/ip4/127.0.0.1/tcp/30779/p2p/12D3KooWAzjYTQC2rhrfq1vUgcQ9u4EtLtc2qVckArSdg5BVn9i4&#xD;&#xA;&#xD;&#xA;2022-05-11 16:10:12 Building chain spec    &#xD;&#xA;2022-05-11 16:10:13 [0]  generated 2 npos voters, 2 from validators and 0 nominators    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size.    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size    &#xD;&#xA;Starting Relaychain Node alice... wsPort: 9944 rpcPort: undefined port: 30444 nodeKey: c2932f775f2342b04e99242358542a4184b67fe83a7f084afc69dba8bbafd50b&#xD;&#xA;Added --rpc-cors=all,--beefy,--enable-offchain-indexing=true&#xD;&#xA;Starting Relaychain Node bob... wsPort: 9955 rpcPort: undefined port: 30555 nodeKey: 47913ebe0a697d07aeecbae0c0c440cbb3d3ad04947707be5853115d504d160a&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node charlie... wsPort: 9966 rpcPort: undefined port: 30666 nodeKey: 1393cc7ad66e836d152b2385793243c19f9f86a6bda209ca0fd3b7c473a04977&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node dave... wsPort: 9977 rpcPort: undefined port: 30777 nodeKey: f39b4dba76fc9262b239b49eb0327496faea6cdbef865227d9b10c63107ce04a&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node eve... wsPort: 9978 rpcPort: undefined port: 30778 nodeKey: 83ad2741d3f342da242adfddb5f4a12c0b76c8e0944ea7532cc26fb327f2a684&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node ferdie... wsPort: 9979 rpcPort: undefined port: 30779 nodeKey: 5cebfc00fb88231f57264c4925ad09fcb30a398f9b4b086a396e275841e84751&#xD;&#xA;Added --beefy&#xD;&#xA;2022-05-11 16:10:13          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:15          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:18          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:20          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:23          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:25          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:28          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:30          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:33          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:35          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:38        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;Starting a Collator for parachain 1000: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ, Collator port : 31100 wsPort : 9988 rpcPort : undefined&#xD;&#xA;Added --alice&#xD;&#xA;Added --force-authoring&#xD;&#xA;Added --chain=statemine-local&#xD;&#xA;Added  to parachain&#xD;&#xA;Added --execution=wasm to collator&#xD;&#xA;Starting a Collator for parachain 1000: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ, Collator port : 31200 wsPort : 9997 rpcPort : undefined&#xD;&#xA;Added --bob&#xD;&#xA;Added --force-authoring&#xD;&#xA;Added --chain=statemine-local&#xD;&#xA;Added  to parachain&#xD;&#xA;Added --execution=wasm to collator&#xD;&#xA; POLKADOT LAUNCH COMPLETE &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;versions used are 0.9.18 tags:&#xD;&#xA;```&#xD;&#xA;polkadot-collator 5.3.0-b1e91afb7-x86_64-linux-gnu&#xD;&#xA;polkadot 0.9.18-99cd17ddb2-x86_64-linux-gnu&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cfqjg.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZLdOk.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/YrYIN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9491" PostHistoryTypeId="5" PostId="1953" RevisionGUID="2597f2cc-7b17-448f-be25-d86f22ab84dc" CreationDate="2022-05-11T17:58:09.753" UserId="16" Comment="edited body" Text="As you mentioned, according to the [ink! docs](https://paritytech.github.io/ink-docs/basics/environment-functions), you should have access to [code_hash](https://paritytech.github.io/ink/ink_env/fn.code_hash.html).&#xD;&#xA;&#xD;&#xA;Make sure you're using the correct syntax. In an `#[ink(constructor)]` use `Self::env().code_hash()` or if you're trying to access the `code_hash` in an `#[ink(message)]` then use `self.env().code_hash()`.&#xD;&#xA;&#xD;&#xA;You can see a list of all the functions available to you [here](https://paritytech.github.io/ink/ink_env/#functions).&#xD;&#xA;&#xD;&#xA;If you're asking from the `contracts-pallet` side, you can also access the code hash via:&#xD;&#xA;&gt; Chain state &gt; Storage &gt; contracts &gt; codeStorage" ContentLicense="CC BY-SA 4.0" />
  <row Id="9492" PostHistoryTypeId="2" PostId="2543" RevisionGUID="aa92adbd-7b73-45f0-a176-cd26d39882fb" CreationDate="2022-05-11T18:02:39.540" UserId="16" Text="In order to do an integration test you would need to spawn a [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node) and then use the polkadot.js javscript library in order to interact with it. Another way would be to use the [cargo-contract](https://github.com/paritytech/cargo-contract/blob/master/docs/extrinsics.md) command line tool in order to interact with the node. That way you could even script it with some shell script." ContentLicense="CC BY-SA 4.0" />
  <row Id="9494" PostHistoryTypeId="2" PostId="2544" RevisionGUID="4b565f87-7292-4e19-b489-e2d32beece2e" CreationDate="2022-05-11T18:07:21.063" UserId="2295" Text="Is it feasible to modify the contracts pallet to integrate it into a non-substrate rust-based blockchain? Say one that runs on Tendermint..." ContentLicense="CC BY-SA 4.0" />
  <row Id="9496" PostHistoryTypeId="1" PostId="2544" RevisionGUID="4b565f87-7292-4e19-b489-e2d32beece2e" CreationDate="2022-05-11T18:07:21.063" UserId="2295" Text="Is it feasible to modify the contracts pallet to integrate it into a non-substrate rust-based blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9497" PostHistoryTypeId="3" PostId="2544" RevisionGUID="4b565f87-7292-4e19-b489-e2d32beece2e" CreationDate="2022-05-11T18:07:21.063" UserId="2295" Text="|pallet|smart-contract|wasm|pallet-contracts|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9498" PostHistoryTypeId="52" PostId="2527" RevisionGUID="d18d0184-ab5e-4f2d-a19d-80c3b74ed6b4" CreationDate="2022-05-11T18:34:59.113" />
  <row Id="9499" PostHistoryTypeId="5" PostId="2485" RevisionGUID="c3691d81-6d30-4e6e-a04d-f7877932fa1a" CreationDate="2022-05-11T20:13:36.550" UserId="29" Comment="deleted 4 characters in body" Text="Light clients are not explicitly needed for a chain to operate. They can be very useful to compliment a network of full nodes that are preferable in many cases over a full node, especially for end user facing dApps.&#xD;&#xA;&#xD;&#xA;The light client in Substrate itself has been deprecated that you are seeing in those examples, but this is not forgotten! Now there is a stand-alone project that is being worked on primarily by Parity in the **[smoldot](https://github.com/paritytech/smoldot) light client**. &#xD;&#xA;&#xD;&#xA;For reference to learn more, taken from the READMEs at the time of writing: &#xD;&#xA;&#xD;&#xA;## [Smoldot](https://github.com/paritytech/smoldot)&#xD;&#xA;&#xD;&#xA;smoldot is a prototype of an alternative client of Substrate-based chains, including Polkadot.&#xD;&#xA;&#xD;&#xA;In order to simplify the code, two main design decisions have been made compared to Substrate:&#xD;&#xA;&#xD;&#xA;- No native runtime. The execution time of the wasmtime library is satisfying enough that having a native runtime isn't critical anymore.&#xD;&#xA;&#xD;&#xA;- No pluggable architecture. smoldot supports a certain hard coded list of consensus algorithms, at the moment Babe, Aura, and GrandPa. Support for other algorithms can only be added by modifying the code of smoldot, and it is not possible to plug a custom algorithm from outside.&#xD;&#xA;&#xD;&#xA;There exists two clients: the full client and the wasm light node.&#xD;&#xA;&#xD;&#xA;## [Substrate Connect](https://github.com/paritytech/substrate-connect)&#xD;&#xA;&#xD;&#xA;Substrate connect provides a way to interact with substrate based blockchains in the browser without using an RPC server. Substrate connect uses a smoldot WASM light client to securely connect to the blockchain network without relying on specific 3rd parties.&#xD;&#xA;&#xD;&#xA;## [Smoldot Ads uApp](https://github.com/paritytech/smoldot-ads)&#xD;&#xA;A demo dApp of classified ads using smoldot and substrate-connect." ContentLicense="CC BY-SA 4.0" />
  <row Id="9500" PostHistoryTypeId="52" PostId="2536" RevisionGUID="b7322018-7000-4c30-99ff-085a7f03f987" CreationDate="2022-05-11T20:24:46.503" />
  <row Id="9501" PostHistoryTypeId="5" PostId="2524" RevisionGUID="9be70bba-3126-4b73-9842-d011bbb6177c" CreationDate="2022-05-11T20:28:33.813" UserId="28" Comment="added 4 characters in body; edited title" Text="I am trying to run `statemine` in `polkadot-launch`. I have get 0.9.18 versions of `polkadot` and `polkadot-collator`. And trying to run like next:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;  &quot;relaychain&quot;: {&#xD;&#xA;    &quot;bin&quot;: &quot;../../../polkadot/target/release/polkadot&quot;,&#xD;&#xA;    &quot;chain&quot;: &quot;kusama-local&quot;,&#xD;&#xA;    &quot;genesis&quot;: {&#xD;&#xA;      &quot;runtime&quot;: {&#xD;&#xA;        &quot;runtime_genesis_config&quot;: {&#xD;&#xA;          &quot;configuration&quot;: {&#xD;&#xA;            &quot;config&quot;: {&#xD;&#xA;              &quot;validation_upgrade_frequency&quot;: 2,&#xD;&#xA;              &quot;validation_upgrade_delay&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    &quot;nodes&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9944,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/alice&quot;,&#xD;&#xA;        &quot;port&quot;: 30444,&#xD;&#xA;        &quot;flags&quot;: [&quot;--rpc-cors=all&quot;, &quot;--beefy&quot;, &quot;--enable-offchain-indexing=true&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9955,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/bob&quot;,&#xD;&#xA;        &quot;port&quot;: 30555,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9966,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/charlie&quot;,&#xD;&#xA;        &quot;port&quot;: 30666,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;dave&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9977,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/dave&quot;,&#xD;&#xA;        &quot;port&quot;: 30777,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;ferdie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9978,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/ferdie&quot;,&#xD;&#xA;        &quot;port&quot;: 30778,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;parachains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;bin&quot;: &quot;../../../cumulus/target/release/polkadot-collator&quot;,&#xD;&#xA;      &quot;chain&quot;: &quot;statemine-local&quot;,&#xD;&#xA;      &quot;nodes&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9988,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/alice&quot;,&#xD;&#xA;          &quot;port&quot;: 31100,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9997,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/bob&quot;,&#xD;&#xA;          &quot;port&quot;: 31200,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9996,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/charlie&quot;,&#xD;&#xA;          &quot;port&quot;: 31300,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  &quot;types&quot;: {},&#xD;&#xA;  &quot;finalization&quot;: false,&#xD;&#xA;  &quot;simpleParachains&quot;: []&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I see relay blocks produced but not statemine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I able to produce blocks on my parachain network. And also tried rococo for relay and statemine-dev/local in above config, no results.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Statemine several collators][1]][1]&#xD;&#xA;[![Statemine no blocks][2]][2]&#xD;&#xA;[![Statemine is parachain][3]][3]&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;Logs seems fine &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-05-11 15:55:10 Polkadot collator    &#xD;&#xA;2022-05-11 15:55:10 ✌️  version 5.3.0-b1e91afb7-x86_64-linux-gnu    &#xD;&#xA;2022-05-11 15:55:10 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2022    &#xD;&#xA;2022-05-11 15:55:10  Chain specification: Statemine Local    &#xD;&#xA;2022-05-11 15:55:10   Node name: Alice    &#xD;&#xA;2022-05-11 15:55:10  Role: AUTHORITY    &#xD;&#xA;2022-05-11 15:55:10  Database: RocksDb at /tmp/substratejHBiJi/chains/statemine_local/db/full    &#xD;&#xA;2022-05-11 15:55:10 ⛓  Native runtime: statemine-800 (statemine-0.tx5.au1)    &#xD;&#xA;2022-05-11 15:55:10 assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-11 15:55:10 assembling new collators for new session 1 at #0    &#xD;&#xA;2022-05-11 15:55:10 Parachain id: Id(1000)    &#xD;&#xA;2022-05-11 15:55:10 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    &#xD;&#xA;2022-05-11 15:55:10 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000c167e2803b46f80dace0bc13481465390c9011b17b8403845d606361c197495703170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2022-05-11 15:55:10 Is collating: yes    &#xD;&#xA;2022-05-11 15:55:10 [Parachain] assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-11 15:55:10 [Parachain] assembling new collators for new session 1 at #0    &#xD;&#xA;2022-05-11 15:55:11 [Parachain]  Initializing Genesis block/state (state: 0xc167…4957, header-hash: 0xb8cd…390b)    &#xD;&#xA;2022-05-11 15:55:13 [Relaychain]  Initializing Genesis block/state (state: 0xeb9f…680a, header-hash: 0x69b2…082e)    &#xD;&#xA;2022-05-11 15:55:13 [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]   Local node identity is: 12D3KooWHx7EaXTHvQQJ9zqdAwreArUaiCjQEeZxd5VDUqKXo9uE    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Highest known block at #0    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] Listening for new connections on 127.0.0.1:9945.    &#xD;&#xA;2022-05-11 15:55:14 [Parachain] Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2022-05-11 15:55:14 [Parachain]   Local node identity is: 12D3KooWLPW6TyqXc8mGJTuARXCbMR3WLvPkDjPcvPyTFZpn5s76    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  New epoch 0 launching at block 0x1da5…73bc (block slot 275380152 &gt;= start slot 275380152).    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Next epoch starts at slot 275380752    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] ✨ Imported #1 (0x1da5…73bc)    &#xD;&#xA;2022-05-11 15:55:15 Accepted a new tcp connection from 127.0.0.1:39826.    &#xD;&#xA;2022-05-11 15:55:15 [Parachain]  Highest known block at #0    &#xD;&#xA;2022-05-11 15:55:15 [Parachain] Unable to bind RPC server to 127.0.0.1:9933. Trying random port.    &#xD;&#xA;2022-05-11 15:55:15 [Parachain] Listening for new connections on 127.0.0.1:9988.    &#xD;&#xA;2022-05-11 15:55:17 Accepted a new tcp connection from 127.0.0.1:39852.    &#xD;&#xA;2022-05-11 15:55:18 [Relaychain] ✨ Imported #2 (0x2cd9…2123)    &#xD;&#xA;2022-05-11 15:55:18 Accepted a new tcp connection from 127.0.0.1:50682.    &#xD;&#xA;2022-05-11 15:55:19 [Relaychain]  Idle (5 peers), best: #2 (0x2cd9…2123), finalized #0 (0x69b2…082e), ⬇ 9.3kiB/s ⬆ 6.1kiB/s    &#xD;&#xA;2022-05-11 15:55:20 [Parachain]  Idle (0 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 4.0kiB/s ⬆ 3.2kiB/s    &#xD;&#xA;2022-05-11 15:55:24 [Relaychain] ✨ Imported #3 (0x0ed5…a7c0)    &#xD;&#xA;2022-05-11 15:55:24 [Relaychain]  Idle (6 peers), best: #3 (0x0ed5…a7c0), finalized #0 (0x69b2…082e), ⬇ 5.2kiB/s ⬆ 5.0kiB/s    &#xD;&#xA;2022-05-11 15:55:25 [Parachain]  Idle (1 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 1.3kiB/s ⬆ 1.3kiB/s    &#xD;&#xA;2022-05-11 15:55:29 [Relaychain]  Idle (7 peers), best: #3 (0x0ed5…a7c0), finalized #1 (0x1da5…73bc), ⬇ 2.8kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2022-05-11 15:55:30 [Relaychain] ✨ Imported #4 (0x6ace…4244)    &#xD;&#xA;2022-05-11 15:55:30 [Relaychain] ✨ Imported #4 (0xb656…7bcc)    &#xD;&#xA;2022-05-11 15:55:30 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 1.1kiB/s ⬆ 1.0kiB/s    &#xD;&#xA;2022-05-11 15:55:34 [Relaychain]  Idle (7 peers), best: #4 (0x6ace…4244), finalized #1 (0x1da5…73bc), ⬇ 3.5kiB/s ⬆ 2.3kiB/s    &#xD;&#xA;2022-05-11 15:55:35 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 0.5kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-11 15:55:36 [Relaychain] ✨ Imported #5 (0x483e…686f)    &#xD;&#xA;2022-05-11 15:55:36 [Relaychain] ✨ Imported #5 (0x3375…4531)    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;```&#xD;&#xA;2022-05-11 16:05:52 [Relaychain]  Idle (6 peers), best: #21 (0x7c26…8c8f), finalized #19 (0xf4da…23f4), ⬇ 2.2kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-05-11 16:05:53 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 74 B/s ⬆ 74 B/s    &#xD;&#xA;```&#xD;&#xA;things look like good, but no block production.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Resolving parachain id...&#xD;&#xA;2022-05-11 16:10:11 Building chain spec    &#xD;&#xA;  ✓ Read parachain id for ../../../cumulus/target/release/polkadot-collator: 1000&#xD;&#xA;2022-05-11 16:10:11 Building chain spec    &#xD;&#xA;&#xD;&#xA; Starting with a fresh authority set...&#xD;&#xA;   Added Genesis Authority alice&#xD;&#xA;   Added Genesis Authority bob&#xD;&#xA;   Added Genesis Authority charlie&#xD;&#xA;   Added Genesis Authority dave&#xD;&#xA;   Added Genesis Authority eve&#xD;&#xA;   Added Genesis Authority ferdie&#xD;&#xA;&#xD;&#xA;⚙ Updating Relay Chain Genesis Configuration&#xD;&#xA;  ⚠ Bad Genesis Configuration [ runtime_genesis_config: [object Object] ]&#xD;&#xA;&#xD;&#xA;⛓ Adding Genesis Parachains&#xD;&#xA;  ✓ Added Genesis Parachain 1000&#xD;&#xA;Added Boot Nodes: /ip4/127.0.0.1/tcp/30444/p2p/12D3KooWBpXHFGqv6Cn4fecVkoZog5AwKpo4srLCh82hRLCREyqQ,/ip4/127.0.0.1/tcp/30555/p2p/12D3KooWL2Trz3SHdj69KE4u1rs8L4dNiiSVWHvPgghH5cruHpdi,/ip4/127.0.0.1/tcp/30666/p2p/12D3KooWSRubBEXi2mepS977hbAtwcqajiuiBc4DsY12aAGBiQGt,/ip4/127.0.0.1/tcp/30777/p2p/12D3KooWCmF9w2hKHwyjYmfBHGE4PT4yDoiv8zMtTHFXdiXQQ9GU,/ip4/127.0.0.1/tcp/30778/p2p/12D3KooWNYx15tFrmeVk9Q768bZTby1eAo7vYJMg7W6hG7bzFQ9F,/ip4/127.0.0.1/tcp/30779/p2p/12D3KooWAzjYTQC2rhrfq1vUgcQ9u4EtLtc2qVckArSdg5BVn9i4&#xD;&#xA;&#xD;&#xA;2022-05-11 16:10:12 Building chain spec    &#xD;&#xA;2022-05-11 16:10:13 [0]  generated 2 npos voters, 2 from validators and 0 nominators    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size.    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size    &#xD;&#xA;Starting Relaychain Node alice... wsPort: 9944 rpcPort: undefined port: 30444 nodeKey: c2932f775f2342b04e99242358542a4184b67fe83a7f084afc69dba8bbafd50b&#xD;&#xA;Added --rpc-cors=all,--beefy,--enable-offchain-indexing=true&#xD;&#xA;Starting Relaychain Node bob... wsPort: 9955 rpcPort: undefined port: 30555 nodeKey: 47913ebe0a697d07aeecbae0c0c440cbb3d3ad04947707be5853115d504d160a&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node charlie... wsPort: 9966 rpcPort: undefined port: 30666 nodeKey: 1393cc7ad66e836d152b2385793243c19f9f86a6bda209ca0fd3b7c473a04977&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node dave... wsPort: 9977 rpcPort: undefined port: 30777 nodeKey: f39b4dba76fc9262b239b49eb0327496faea6cdbef865227d9b10c63107ce04a&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node eve... wsPort: 9978 rpcPort: undefined port: 30778 nodeKey: 83ad2741d3f342da242adfddb5f4a12c0b76c8e0944ea7532cc26fb327f2a684&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node ferdie... wsPort: 9979 rpcPort: undefined port: 30779 nodeKey: 5cebfc00fb88231f57264c4925ad09fcb30a398f9b4b086a396e275841e84751&#xD;&#xA;Added --beefy&#xD;&#xA;2022-05-11 16:10:13          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:15          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:18          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:20          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:23          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:25          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:28          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:30          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:33          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:35          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:38        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;Starting a Collator for parachain 1000: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ, Collator port : 31100 wsPort : 9988 rpcPort : undefined&#xD;&#xA;Added --alice&#xD;&#xA;Added --force-authoring&#xD;&#xA;Added --chain=statemine-local&#xD;&#xA;Added  to parachain&#xD;&#xA;Added --execution=wasm to collator&#xD;&#xA;Starting a Collator for parachain 1000: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ, Collator port : 31200 wsPort : 9997 rpcPort : undefined&#xD;&#xA;Added --bob&#xD;&#xA;Added --force-authoring&#xD;&#xA;Added --chain=statemine-local&#xD;&#xA;Added  to parachain&#xD;&#xA;Added --execution=wasm to collator&#xD;&#xA; POLKADOT LAUNCH COMPLETE &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;versions used are 0.9.18 tags:&#xD;&#xA;```&#xD;&#xA;polkadot-collator 5.3.0-b1e91afb7-x86_64-linux-gnu&#xD;&#xA;polkadot 0.9.18-99cd17ddb2-x86_64-linux-gnu&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cfqjg.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZLdOk.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/YrYIN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9502" PostHistoryTypeId="4" PostId="2524" RevisionGUID="9be70bba-3126-4b73-9842-d011bbb6177c" CreationDate="2022-05-11T20:28:33.813" UserId="28" Comment="added 4 characters in body; edited title" Text="How to run statemine with polkadot-launch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9503" PostHistoryTypeId="8" PostId="2386" RevisionGUID="1862d7bd-8de7-4a42-b4de-b1dcb0f65554" CreationDate="2022-05-11T21:00:33.497" UserId="53" Comment="Rollback to [185ca021-9cd3-4495-9aec-25db0dc2fe07]" Text="In general, DoS attacks are non-trivial to prevent entirely. They're mitigated by the fact that they're technically non-trivial to execute (it requires substantial knowledge of the codebase and sysadmin/devops skill) and they're costly to maintain. Substrate networking code is written with quite an advanced peer reputation and evaluation system, which should take care of ejecting bad/malfunctioning/DoSing peers early on.&#xD;&#xA;&#xD;&#xA;BABE does indeed have a requirement that blocks be produced every session and if this requirement is not met it will stall. Sessions are typically between 1 hour and 4 hours, with 6 sessions per era. At present there is no reason to believe that even a moderately well-funded attacker could DoS several reasonably performant nodes to the point that they would be unable to produce a single block over the course of multiple hours. Nevertheless, the more validator/collator nodes which are involved in your network the better, as this makes an effective attack harder to execute and provides some redundancy.&#xD;&#xA;&#xD;&#xA;Any networks which are at risk from well-funded and capable attackers should take precautions, including: &#xD;&#xA;- a large number of validators (perhaps up to 1,000);&#xD;&#xA;- have a large number of reserved peer slots between validators;&#xD;&#xA;- minimise the number of untrusted peer slots available for attackers;&#xD;&#xA;- avoid exposing RPC services on validators; and&#xD;&#xA;- maximise the session length (at least 1 hour).&#xD;&#xA;&#xD;&#xA;If you're really worried, then you could also allow validators to connect only to each other and a set of additional full-nodes which you run, and only allow untrusted nodes to connect to those full-nodes. But this is probably overkill." ContentLicense="CC BY-SA 4.0" />
  <row Id="9504" PostHistoryTypeId="2" PostId="2545" RevisionGUID="d3ba77a5-877f-4e5c-86b0-c1331e909eb6" CreationDate="2022-05-12T02:10:09.647" UserId="2529" Text="how to create nft in statemint in javascript.and how to set the nft images. can any one provide the example. my test code go wrong.&#xD;&#xA;```&#xD;&#xA; const wsProvider = new polkadot.WsProvider(&quot;wss://westmint-rpc.polkadot.io&quot;);&#xD;&#xA; const api = await polkadot.ApiPromise.create({provider:wsProvider});&#xD;&#xA;&#xD;&#xA;let tx = api.tx.utility.batchAll([&#xD;&#xA;  api.tx.uniques.create(classId, ADDR_1);&#xD;&#xA;  api.tx.uniques.setAttribute(classId, null,&quot;Link&quot;,&quot;https://cloudflare-ipfs.com/ipfs/QmRdpVRCLxN51vNnYCRr2is1w6UVpT3mR8YDov9ktPmKub&quot;), // this tx will crash&#xD;&#xA;    ]);&#xD;&#xA;tx.signAndSend(pair);&#xD;&#xA;  &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9506" PostHistoryTypeId="1" PostId="2545" RevisionGUID="d3ba77a5-877f-4e5c-86b0-c1331e909eb6" CreationDate="2022-05-12T02:10:09.647" UserId="2529" Text="how to create nft in statemint" ContentLicense="CC BY-SA 4.0" />
  <row Id="9507" PostHistoryTypeId="3" PostId="2545" RevisionGUID="d3ba77a5-877f-4e5c-86b0-c1331e909eb6" CreationDate="2022-05-12T02:10:09.647" UserId="2529" Text="|statemint|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9509" PostHistoryTypeId="2" PostId="2546" RevisionGUID="fc10742c-89e2-4588-abf6-80a20a6627f4" CreationDate="2022-05-12T04:11:58.617" UserId="1789" Text="You need to add your collator command, which is `target/release/parachain-collator` if your parachain is based on substrate-parachain-template.&#xD;&#xA;Notice there is no DOT &quot;.&quot; before the command!&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/x-network/collator:latest&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9511" PostHistoryTypeId="2" PostId="2547" RevisionGUID="1f9a55f0-b079-48bf-91ad-2f33697abd9b" CreationDate="2022-05-12T04:35:29.217" UserId="1789" Text="&#xD;&#xA;&#xD;&#xA;You need to add your collator command, which is target/release/parachain-collator if your parachain is based on substrate-parachain-template. Notice there is no DOT &quot;.&quot; before the command!&#xD;&#xA;```&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/x-network/collator:latest&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9513" PostHistoryTypeId="2" PostId="2548" RevisionGUID="917a0cb8-cf44-48f5-8a9e-b52324dd976f" CreationDate="2022-05-12T04:38:36.170" UserId="1789" Text="You need to keep the default command in polkadot relaychain, but add your collator command, which is target/release/parachain-collator if your parachain is based on substrate-parachain-template. Notice there is no DOT &quot;.&quot; before the command!&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/p-network/collator:latest&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;  &#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9515" PostHistoryTypeId="2" PostId="2549" RevisionGUID="bbc08a6d-a791-44a5-845c-996a196f6ef7" CreationDate="2022-05-12T07:16:45.040" UserId="85" Text="If I want to work with substrate and this awesome community for a living, which websites are good places to look for substrate based roles?&#xD;&#xA;&#xD;&#xA;(The corollary of this, if I want to hire someone, where should I be putting my job posting?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="9517" PostHistoryTypeId="1" PostId="2549" RevisionGUID="bbc08a6d-a791-44a5-845c-996a196f6ef7" CreationDate="2022-05-12T07:16:45.040" UserId="85" Text="What are the best websites to use to look for a job in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9518" PostHistoryTypeId="3" PostId="2549" RevisionGUID="bbc08a6d-a791-44a5-845c-996a196f6ef7" CreationDate="2022-05-12T07:16:45.040" UserId="85" Text="|untagged|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9520" PostHistoryTypeId="2" PostId="2550" RevisionGUID="134879c4-8bbf-4a65-ab86-4b0bea857cb0" CreationDate="2022-05-12T07:20:39.497" UserId="85" Text="Kraken's parachain auction podcasts are pretty good listens too: &#xD;&#xA;https://podcasts.apple.com/ie/podcast/parachain-auctions/id1567923627" ContentLicense="CC BY-SA 4.0" />
  <row Id="9522" PostHistoryTypeId="2" PostId="2551" RevisionGUID="870ec350-41bb-4a37-a2f6-64bedd732efb" CreationDate="2022-05-12T08:09:41.333" UserId="1789" Text="I ran my Zombienet network(it is like a Docker + Kubernetes network)&#xD;&#xA;&#xD;&#xA;then I got:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  name: 'alice',&#xD;&#xA;  key: '2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90',&#xD;&#xA;  accounts: {&#xD;&#xA;    seed: '0xd869434a3250ac5335282ebb066439bebcba7083ecc4c43ba05be7c3f6698e66',&#xD;&#xA;    sr_account: {&#xD;&#xA;      address: '5HMYBmVcRGdYMRkVjcmxX5YZpLVzE8ZmP3xCoZYXNaVbRsZq',&#xD;&#xA;      publicKey: '0xea03c8debdaa066df36a735a5dd5717dbb2faab28230f7b054332e67feaafb71'&#xD;&#xA;    },&#xD;&#xA;    sr_stash: {&#xD;&#xA;      address: '5HEGXSoZGCkj1dYC1VLKEfd1tU7c9SyyiDcT7HHC4n9AWfnh',&#xD;&#xA;      publicKey: '0xe478591d869859a831b8512a77ab460ebdce1f616eb1cb980ffa969adf02e74e'&#xD;&#xA;    },&#xD;&#xA;    ed_account: {&#xD;&#xA;      address: '5GV4ZA5AEPGMgCsLw2TQsLWGPFPhvT1kcDaB1VMiZDVJpL4N',&#xD;&#xA;      publicKey: '0xc3847fdc4bf1de208fc17bb28b306a0cb2ce89b5a0fcf2534dedab5829e2a38e'&#xD;&#xA;    },&#xD;&#xA;    ec_account: { publicKey: [Uint8Array] }&#xD;&#xA;  },&#xD;&#xA;  command: 'polkadot',&#xD;&#xA;  commandWithArgs: undefined,&#xD;&#xA;  image: 'docker.io/paritypr/polkadot-debug:master',&#xD;&#xA;  chain: 'rococo-local',&#xD;&#xA;  validator: true,&#xD;&#xA;  args: [ '-lparachain=debug' ],&#xD;&#xA;  env: [&#xD;&#xA;    { name: 'COLORBT_SHOW_HIDDEN', value: '1' },&#xD;&#xA;    { name: 'RUST_BACKTRACE', value: 'FULL' }&#xD;&#xA;  ],&#xD;&#xA;  bootnodes: [],&#xD;&#xA;  telemetryUrl: '',&#xD;&#xA;  telemetry: false,&#xD;&#xA;  prometheus: true,&#xD;&#xA;  overrides: [],&#xD;&#xA;  addToBootnodes: false,&#xD;&#xA;  resources: undefined,&#xD;&#xA;  zombieRole: 'node',&#xD;&#xA;  group: 'alice'&#xD;&#xA;}&#xD;&#xA;{&#xD;&#xA;  name: 'bob',&#xD;&#xA;  key: '81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9',&#xD;&#xA;  accounts: {&#xD;&#xA;    seed: '0x443d46a876ce317f69d2bbf49c5e255ce6cb43e6e232bc02035e9c34def27ec4',&#xD;&#xA;    sr_account: {&#xD;&#xA;      address: '5DM6hvELqvDjxCLLX6hQAn9scZp7dMfz4WDurdXLHP1j9JLh',&#xD;&#xA;      publicKey: '0x38bd13b42103a39b6a336026528477496e0ddf0174efcf58fadf67271b85ff4d'&#xD;&#xA;    },&#xD;&#xA;    sr_stash: {&#xD;&#xA;      address: '5GKbySSE8rm1QE5XPYgK1ewFM4nKQCrW1RWUnXdGReDQBe64',&#xD;&#xA;      publicKey: '0xbc4dcf5ec9aebce67682272c7c3a44fb26b767081e9cf399544cd06ec8c8b837'&#xD;&#xA;    },&#xD;&#xA;    ed_account: {&#xD;&#xA;      address: '5CqGupTU73eR3qvwocZuG1oQiqNdrUE7Rqfmc3MGCTG2FnNy',&#xD;&#xA;      publicKey: '0x21fe118b89a8271d4e4843cb82063271a3cd1e297bd40f95c92f44a6414c1353'&#xD;&#xA;    },&#xD;&#xA;    ec_account: { publicKey: [Uint8Array] }&#xD;&#xA;  },&#xD;&#xA;  command: 'polkadot',&#xD;&#xA;  commandWithArgs: undefined,&#xD;&#xA;  image: 'docker.io/paritypr/polkadot-debug:master',&#xD;&#xA;  chain: 'rococo-local',&#xD;&#xA;  validator: true,&#xD;&#xA;  args: [ '-lparachain=debug' ],&#xD;&#xA;  env: [&#xD;&#xA;    { name: 'COLORBT_SHOW_HIDDEN', value: '1' },&#xD;&#xA;    { name: 'RUST_BACKTRACE', value: 'FULL' }&#xD;&#xA;  ],&#xD;&#xA;  bootnodes: [],&#xD;&#xA;  telemetryUrl: '',&#xD;&#xA;  telemetry: false,&#xD;&#xA;  prometheus: true,&#xD;&#xA;  overrides: [],&#xD;&#xA;  addToBootnodes: false,&#xD;&#xA;  resources: undefined,&#xD;&#xA;  zombieRole: 'node',&#xD;&#xA;  group: 'bob'&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-aa3f81ef14a3fc7592ca0cc07309f72c&#xD;&#xA;		 Using temporary directory: /tmp/zombie-aa3f81ef14a3fc7592ca0cc07309f72c_-102217-SLT1Ct5M9Foj&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/paritypr/polkadot-debug:master&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5HEGXSoZGCkj1dYC1VLKEfd1tU7c9SyyiDcT7HHC4n9AWfnh&#xD;&#xA;			   Added Genesis Authority bob - 5GKbySSE8rm1QE5XPYgK1ewFM4nKQCrW1RWUnXdGReDQBe64&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image docker.io/paritypr/colander:master&#xD;&#xA;		 with command: bash -c adder-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; adder-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image docker.io/paritypr/polkadot-debug:master&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-aa3f81ef14a3fc7592ca0cc07309f72c_-102217-SLT1Ct5M9Foj/rococo-local-plain.json as:e31d2cda9a8785e584c5b0bed336da58618176307b3bb53b0c241b3e80544a36&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/paritypr/polkadot-debug:master&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-aa3f81ef14a3fc7592ca0cc07309f72c_-102217-SLT1Ct5M9Foj/rococo-local.json as:081528097115e26a72d41d35423d9744ffe250e4eef578ed5452644ba707919e&#xD;&#xA;uploading to fileserver: /tmp/zombie-aa3f81ef14a3fc7592ca0cc07309f72c_-102217-SLT1Ct5M9Foj/zombie-wrapper.sh as:8b5c6315d5cdcb7c3ead670c78cdc3f54046241497b55b16177aae09b22a10b7&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/paritypr/polkadot-debug:master&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image docker.io/paritypr/colander:master&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh adder-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA; You can follow the logs of the node by running this command: &#xD;&#xA;			 kubectl logs -f collator01&#xD;&#xA;Warn: Tracing collator service doesn't exist&#xD;&#xA;---------------------------&#xD;&#xA;Network launched &#xD;&#xA;	 In namespace zombie-aa3f81ef14a3fc7592ca0cc07309f72c with kubernetes provider&#xD;&#xA;	 Node name: alice&#xD;&#xA;	 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A36465#/explorer&#xD;&#xA;	 Node prometheus link: http://127.0.0.1:40949/metrics&#xD;&#xA;---&#xD;&#xA;	 Node name: bob&#xD;&#xA;	 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A44789#/explorer&#xD;&#xA;	 Node prometheus link: http://127.0.0.1:40163/metrics&#xD;&#xA;---&#xD;&#xA;Parachain ID: 2000&#xD;&#xA;	 Node name: collator01&#xD;&#xA;	 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46485#/explorer&#xD;&#xA;	 Node prometheus link: http://127.0.0.1:38445/metrics&#xD;&#xA;```&#xD;&#xA;I tried `kubectl logs -f collator01` in another terminal, then I got `Error from server (NotFound): pods &quot;collator01&quot; not found`&#xD;&#xA;&#xD;&#xA;How can I get this collator01's logs?&#xD;&#xA;&#xD;&#xA;When I clicked on the Parachain collator link https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46485#/explorer&#xD;&#xA;&#xD;&#xA;under Network &gt; Explorer &gt; Node Info: I saw 2 peers&#xD;&#xA;```&#xD;&#xA;12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby	authority	130	0xad3a492a22e12ff865fea93f3e3e44df8dbb8ffd9559749f8a0569062cd2a7bf&#xD;&#xA;12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm	authority	130	0xad3a492a22e12ff865fea93f3e3e44df8dbb8ffd9559749f8a0569062cd2a7bf&#xD;&#xA;```&#xD;&#xA;`12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm` matches relaychain node Alice as Added Boot Nodes:  `/ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm`&#xD;&#xA;&#xD;&#xA;under Network &gt; Parachains:&#xD;&#xA;```&#xD;&#xA;parachains		          lifecycle		included	backed	timeout	chain	in/out	leases&#xD;&#xA;2,000                                 Parachain&#xD;&#xA;Val. Group 0 (1)&#xD;&#xA;5HEGXS…9AWfnh (0)&#xD;&#xA;Non-voters (0)&#xD;&#xA;```&#xD;&#xA;Does this prove my parachain 2000 is properly registered ?&#xD;&#xA;&#xD;&#xA;under Network &gt; Explorer &gt; ChainInfo, I saw many blocks were being produced:&#xD;&#xA;```&#xD;&#xA;recent blocks&#xD;&#xA;397  0xf5c6e28b506171ea78940d1708ea37c5624f64a997f3fd5f3341f11034345fb1	 5HEGXS…9AWfnh&#xD;&#xA;396  0x2249d6ba127e3369c21c58e56e6b1f4dff385eb6f908e0ba7c4c415f1958b50d	 5GKbyS…DQBe64&#xD;&#xA;```&#xD;&#xA;5HEGXS…9AWfnh and 5GKbyS…DQBe64 match what I had in my command line logs:&#xD;&#xA;```&#xD;&#xA; Starting with a fresh authority set...&#xD;&#xA;	   Added Genesis Authority alice - 5HEGXSoZGCkj1dYC1VLKEfd1tU7c9SyyiDcT7HHC4n9AWfnh&#xD;&#xA;	   Added Genesis Authority bob - 5GKbySSE8rm1QE5XPYgK1ewFM4nKQCrW1RWUnXdGReDQBe64&#xD;&#xA;```&#xD;&#xA;Does this prove my parachain is producing blocks ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9524" PostHistoryTypeId="1" PostId="2551" RevisionGUID="870ec350-41bb-4a37-a2f6-64bedd732efb" CreationDate="2022-05-12T08:09:41.333" UserId="1789" Text="How to confirm if my parachain is producing blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9525" PostHistoryTypeId="3" PostId="2551" RevisionGUID="870ec350-41bb-4a37-a2f6-64bedd732efb" CreationDate="2022-05-12T08:09:41.333" UserId="1789" Text="|parachain|docker|parachain-collator|zombienet|kubernetes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9526" PostHistoryTypeId="2" PostId="2552" RevisionGUID="018a8d89-c89e-4094-8156-bb9c5c6930b4" CreationDate="2022-05-12T08:26:20.717" UserId="693" Text="Currently, Astar network's transaction volume has increased drastically and we are having some trouble prioritizing the tx queue.&#xD;&#xA;&#xD;&#xA;With EVM, there are many RPCs like `eth_gasPrice`,`eth_feeHistory`, and EIP-1159 to understand more or less what is the optimal gas price for the transaction to pass within a large tx queue. However, from what I understand, Substrate does not have this kind of RPC for native transaction tips, meaning that the tip value is completely up to the user's arbitrary input. And if we consider that the EVM transaction also has its own gas value with transaction priorities, how well will this work with the native transaction pool?&#xD;&#xA;&#xD;&#xA;So my questions are as the following:&#xD;&#xA;&#xD;&#xA;1. Is there a way to calculate the optimal way to calculate the ideal tip value?&#xD;&#xA;2. Will the EVM transaction affect the tx priority for native transactions (I assume it does)? If so, will the EIP-1159 method of calculating the gas cost affect the required tip value for native transactions?&#xD;&#xA;3. Would it be reasonable to directly use the EIP-1159 gas station and use the optimal gas price as the tip value for the native transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9528" PostHistoryTypeId="1" PostId="2552" RevisionGUID="018a8d89-c89e-4094-8156-bb9c5c6930b4" CreationDate="2022-05-12T08:26:20.717" UserId="693" Text="How to calculate the optimal tip for Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="9529" PostHistoryTypeId="3" PostId="2552" RevisionGUID="018a8d89-c89e-4094-8156-bb9c5c6930b4" CreationDate="2022-05-12T08:26:20.717" UserId="693" Text="|evm|astar|tips|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9530" PostHistoryTypeId="2" PostId="2553" RevisionGUID="9139468a-160d-4b61-8bb1-77f67778f334" CreationDate="2022-05-12T08:34:42.173" UserId="2033" Text="Resolved after updating the version below two crates as &#xD;&#xA;ethereum = { version = &quot;0.12&quot;, default-features = false, features = [&quot;with-codec&quot;] } &#xD;&#xA;ethereum-types = { version = &quot;0.13.1&quot;, default-features = false, features = [&quot;rlp&quot;, &quot;codec&quot;] } – " ContentLicense="CC BY-SA 4.0" />
  <row Id="9532" PostHistoryTypeId="2" PostId="2554" RevisionGUID="8f38f3f5-c0aa-4503-9fa8-50e8bac3d452" CreationDate="2022-05-12T08:57:02.743" UserId="2033" Text="Our goal is to migrate code to the newer substrate version and keep the block history.&#xD;&#xA;My old running node substrate version is tag = 'monthly-2021-09+1' -&gt; New substrate version  is branch = &quot;polkadot-v0.9.19&quot;&#xD;&#xA;So for this updated the entire code as per the requrement of branch = &quot;polkadot-v0.9.19&quot;.&#xD;&#xA;In local it is working fine, on upgrade on local new instance there is no issue.&#xD;&#xA;&#xD;&#xA;But when I have tried to upgrade the running runtime, node with (tag = 'monthly-2021-09+1' ) following command System-&gt;setcode, &#xD;&#xA;Got the event Sudo -&gt; DispatchResult -&gt; Ok.&#xD;&#xA;But when I have checked the log following error are present.&#xD;&#xA;&#xD;&#xA;    **Unknown error: Client(Application(VersionInvalid(&quot;RuntimeConstruction(Other(\&quot;host doesn't provide such function: env:ext_storage_root_version_2\&quot;))&quot;))) &#xD;&#xA;       &#xD;&#xA;    &#xD;&#xA;    2022-05-12 08:08:40  Idle (2 peers), best: #447165 (0x0432…f858), finalized #419084 (0x8e60…80d9), ⬇ 293.4kiB/s ⬆ 0.1kiB/s    &#xD;&#xA;    2022-05-12 08:08:40 Unsupported Offchain Worker API version: (Err(Application(VersionInvalid(&quot;RuntimeConstruction(Other(\&quot;host doesn't provide such function: env:ext_storage_root_version_2\&quot;))&quot;))), Err(Application(VersionInvalid(&quot;RuntimeConstruction(Other(\&quot;host doesn't provide such function: env:ext_storage_root_version_2\&quot;))&quot;)))). Consider turning off offchain workers if they are not part of your runtime..**   &#xD;&#xA;&#xD;&#xA;Got the above error in log, and the node are not producing the blocks.      &#xD;&#xA;Can anyone tell me what is the difference in upgrade, what mistake I have done.&#xD;&#xA;&#xD;&#xA;Or After changing the version of substrate need to upgarde in a different way?." ContentLicense="CC BY-SA 4.0" />
  <row Id="9534" PostHistoryTypeId="1" PostId="2554" RevisionGUID="8f38f3f5-c0aa-4503-9fa8-50e8bac3d452" CreationDate="2022-05-12T08:57:02.743" UserId="2033" Text="Runtime upgrade error: host doesn't provide such function: env:ext_storage_root_version_2" ContentLicense="CC BY-SA 4.0" />
  <row Id="9535" PostHistoryTypeId="3" PostId="2554" RevisionGUID="8f38f3f5-c0aa-4503-9fa8-50e8bac3d452" CreationDate="2022-05-12T08:57:02.743" UserId="2033" Text="|substrate-node|substrate-node-template|runtime-upgrade|on-runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9536" PostHistoryTypeId="5" PostId="2551" RevisionGUID="7229a381-dc9e-412e-b418-c2257a55ba17" CreationDate="2022-05-12T09:02:13.210" UserId="1789" Comment="added 540 characters in body; edited title" Text="I ran my Zombienet network(it is like a Docker + Kubernetes network)&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/paritypr/polkadot-debug:master&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;then I got:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  name: 'alice',&#xD;&#xA;  key: '2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90',&#xD;&#xA;  accounts: {&#xD;&#xA;    seed: '0xd869434a3250ac5335282ebb066439bebcba7083ecc4c43ba05be7c3f6698e66',&#xD;&#xA;    sr_account: {&#xD;&#xA;      address: '5HMYBmVcRGdYMRkVjcmxX5YZpLVzE8ZmP3xCoZYXNaVbRsZq',&#xD;&#xA;      publicKey: '0xea03c8debdaa066df36a735a5dd5717dbb2faab28230f7b054332e67feaafb71'&#xD;&#xA;    },&#xD;&#xA;    sr_stash: {&#xD;&#xA;      address: '5HEGXSoZGCkj1dYC1VLKEfd1tU7c9SyyiDcT7HHC4n9AWfnh',&#xD;&#xA;      publicKey: '0xe478591d869859a831b8512a77ab460ebdce1f616eb1cb980ffa969adf02e74e'&#xD;&#xA;    },&#xD;&#xA;    ed_account: {&#xD;&#xA;      address: '5GV4ZA5AEPGMgCsLw2TQsLWGPFPhvT1kcDaB1VMiZDVJpL4N',&#xD;&#xA;      publicKey: '0xc3847fdc4bf1de208fc17bb28b306a0cb2ce89b5a0fcf2534dedab5829e2a38e'&#xD;&#xA;    },&#xD;&#xA;    ec_account: { publicKey: [Uint8Array] }&#xD;&#xA;  },&#xD;&#xA;  command: 'polkadot',&#xD;&#xA;  commandWithArgs: undefined,&#xD;&#xA;  image: 'docker.io/paritypr/polkadot-debug:master',&#xD;&#xA;  chain: 'rococo-local',&#xD;&#xA;  validator: true,&#xD;&#xA;  args: [ '-lparachain=debug' ],&#xD;&#xA;  env: [&#xD;&#xA;    { name: 'COLORBT_SHOW_HIDDEN', value: '1' },&#xD;&#xA;    { name: 'RUST_BACKTRACE', value: 'FULL' }&#xD;&#xA;  ],&#xD;&#xA;  bootnodes: [],&#xD;&#xA;  telemetryUrl: '',&#xD;&#xA;  telemetry: false,&#xD;&#xA;  prometheus: true,&#xD;&#xA;  overrides: [],&#xD;&#xA;  addToBootnodes: false,&#xD;&#xA;  resources: undefined,&#xD;&#xA;  zombieRole: 'node',&#xD;&#xA;  group: 'alice'&#xD;&#xA;}&#xD;&#xA;{&#xD;&#xA;  name: 'bob',&#xD;&#xA;  key: '81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9',&#xD;&#xA;  accounts: {&#xD;&#xA;    seed: '0x443d46a876ce317f69d2bbf49c5e255ce6cb43e6e232bc02035e9c34def27ec4',&#xD;&#xA;    sr_account: {&#xD;&#xA;      address: '5DM6hvELqvDjxCLLX6hQAn9scZp7dMfz4WDurdXLHP1j9JLh',&#xD;&#xA;      publicKey: '0x38bd13b42103a39b6a336026528477496e0ddf0174efcf58fadf67271b85ff4d'&#xD;&#xA;    },&#xD;&#xA;    sr_stash: {&#xD;&#xA;      address: '5GKbySSE8rm1QE5XPYgK1ewFM4nKQCrW1RWUnXdGReDQBe64',&#xD;&#xA;      publicKey: '0xbc4dcf5ec9aebce67682272c7c3a44fb26b767081e9cf399544cd06ec8c8b837'&#xD;&#xA;    },&#xD;&#xA;    ed_account: {&#xD;&#xA;      address: '5CqGupTU73eR3qvwocZuG1oQiqNdrUE7Rqfmc3MGCTG2FnNy',&#xD;&#xA;      publicKey: '0x21fe118b89a8271d4e4843cb82063271a3cd1e297bd40f95c92f44a6414c1353'&#xD;&#xA;    },&#xD;&#xA;    ec_account: { publicKey: [Uint8Array] }&#xD;&#xA;  },&#xD;&#xA;  command: 'polkadot',&#xD;&#xA;  commandWithArgs: undefined,&#xD;&#xA;  image: 'docker.io/paritypr/polkadot-debug:master',&#xD;&#xA;  chain: 'rococo-local',&#xD;&#xA;  validator: true,&#xD;&#xA;  args: [ '-lparachain=debug' ],&#xD;&#xA;  env: [&#xD;&#xA;    { name: 'COLORBT_SHOW_HIDDEN', value: '1' },&#xD;&#xA;    { name: 'RUST_BACKTRACE', value: 'FULL' }&#xD;&#xA;  ],&#xD;&#xA;  bootnodes: [],&#xD;&#xA;  telemetryUrl: '',&#xD;&#xA;  telemetry: false,&#xD;&#xA;  prometheus: true,&#xD;&#xA;  overrides: [],&#xD;&#xA;  addToBootnodes: false,&#xD;&#xA;  resources: undefined,&#xD;&#xA;  zombieRole: 'node',&#xD;&#xA;  group: 'bob'&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-aa3f81ef14a3fc7592ca0cc07309f72c&#xD;&#xA;		 Using temporary directory: /tmp/zombie-aa3f81ef14a3fc7592ca0cc07309f72c_-102217-SLT1Ct5M9Foj&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/paritypr/polkadot-debug:master&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5HEGXSoZGCkj1dYC1VLKEfd1tU7c9SyyiDcT7HHC4n9AWfnh&#xD;&#xA;			   Added Genesis Authority bob - 5GKbySSE8rm1QE5XPYgK1ewFM4nKQCrW1RWUnXdGReDQBe64&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image docker.io/paritypr/colander:master&#xD;&#xA;		 with command: bash -c adder-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; adder-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image docker.io/paritypr/polkadot-debug:master&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-aa3f81ef14a3fc7592ca0cc07309f72c_-102217-SLT1Ct5M9Foj/rococo-local-plain.json as:e31d2cda9a8785e584c5b0bed336da58618176307b3bb53b0c241b3e80544a36&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/paritypr/polkadot-debug:master&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-aa3f81ef14a3fc7592ca0cc07309f72c_-102217-SLT1Ct5M9Foj/rococo-local.json as:081528097115e26a72d41d35423d9744ffe250e4eef578ed5452644ba707919e&#xD;&#xA;uploading to fileserver: /tmp/zombie-aa3f81ef14a3fc7592ca0cc07309f72c_-102217-SLT1Ct5M9Foj/zombie-wrapper.sh as:8b5c6315d5cdcb7c3ead670c78cdc3f54046241497b55b16177aae09b22a10b7&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/paritypr/polkadot-debug:master&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image docker.io/paritypr/colander:master&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh adder-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA; You can follow the logs of the node by running this command: &#xD;&#xA;			 kubectl logs -f collator01&#xD;&#xA;Warn: Tracing collator service doesn't exist&#xD;&#xA;---------------------------&#xD;&#xA;Network launched &#xD;&#xA;	 In namespace zombie-aa3f81ef14a3fc7592ca0cc07309f72c with kubernetes provider&#xD;&#xA;	 Node name: alice&#xD;&#xA;	 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A36465#/explorer&#xD;&#xA;	 Node prometheus link: http://127.0.0.1:40949/metrics&#xD;&#xA;---&#xD;&#xA;	 Node name: bob&#xD;&#xA;	 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A44789#/explorer&#xD;&#xA;	 Node prometheus link: http://127.0.0.1:40163/metrics&#xD;&#xA;---&#xD;&#xA;Parachain ID: 2000&#xD;&#xA;	 Node name: collator01&#xD;&#xA;	 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46485#/explorer&#xD;&#xA;	 Node prometheus link: http://127.0.0.1:38445/metrics&#xD;&#xA;```&#xD;&#xA;I tried `kubectl logs -f collator01` in another terminal, then I got `Error from server (NotFound): pods &quot;collator01&quot; not found`&#xD;&#xA;&#xD;&#xA;How can I get this collator01's logs?&#xD;&#xA;&#xD;&#xA;When I clicked on the Parachain collator link https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46485#/explorer&#xD;&#xA;&#xD;&#xA;under Network &gt; Explorer &gt; Node Info: I saw 2 peers&#xD;&#xA;```&#xD;&#xA;12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby	authority	130	0xad3a492a22e12ff865fea93f3e3e44df8dbb8ffd9559749f8a0569062cd2a7bf&#xD;&#xA;12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm	authority	130	0xad3a492a22e12ff865fea93f3e3e44df8dbb8ffd9559749f8a0569062cd2a7bf&#xD;&#xA;```&#xD;&#xA;`12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm` matches relaychain node Alice as Added Boot Nodes:  `/ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm`&#xD;&#xA;&#xD;&#xA;under Network &gt; Parachains:&#xD;&#xA;```&#xD;&#xA;parachains		          lifecycle		included	backed	timeout	chain	in/out	leases&#xD;&#xA;2,000                                 Parachain&#xD;&#xA;Val. Group 0 (1)&#xD;&#xA;5HEGXS…9AWfnh (0)&#xD;&#xA;Non-voters (0)&#xD;&#xA;```&#xD;&#xA;Does this prove my parachain 2000 is properly registered ?&#xD;&#xA;&#xD;&#xA;under Network &gt; Explorer &gt; ChainInfo, I saw many blocks were being produced:&#xD;&#xA;```&#xD;&#xA;recent blocks&#xD;&#xA;397  0xf5c6e28b506171ea78940d1708ea37c5624f64a997f3fd5f3341f11034345fb1	 5HEGXS…9AWfnh&#xD;&#xA;396  0x2249d6ba127e3369c21c58e56e6b1f4dff385eb6f908e0ba7c4c415f1958b50d	 5GKbyS…DQBe64&#xD;&#xA;```&#xD;&#xA;5HEGXS…9AWfnh and 5GKbyS…DQBe64 match what I had in my command line logs:&#xD;&#xA;```&#xD;&#xA; Starting with a fresh authority set...&#xD;&#xA;	   Added Genesis Authority alice - 5HEGXSoZGCkj1dYC1VLKEfd1tU7c9SyyiDcT7HHC4n9AWfnh&#xD;&#xA;	   Added Genesis Authority bob - 5GKbySSE8rm1QE5XPYgK1ewFM4nKQCrW1RWUnXdGReDQBe64&#xD;&#xA;```&#xD;&#xA;Does this prove my parachain is producing blocks ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9537" PostHistoryTypeId="4" PostId="2551" RevisionGUID="7229a381-dc9e-412e-b418-c2257a55ba17" CreationDate="2022-05-12T09:02:13.210" UserId="1789" Comment="added 540 characters in body; edited title" Text="ZombieNet: How to confirm if my parachain is producing blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9538" PostHistoryTypeId="5" PostId="2552" RevisionGUID="285b2505-6c5b-4c80-ba64-4662ea1c041f" CreationDate="2022-05-12T09:13:33.593" UserId="693" Comment="deleted 5 characters in body" Text="Currently, Astar network's transaction volume has increased drastically and we are having some trouble prioritizing the tx queue.&#xD;&#xA;&#xD;&#xA;With EVM, there are many RPCs like `eth_gasPrice`,`eth_feeHistory`, and EIP-1159 to understand more or less what is the optimal gas price for the transaction to pass within a large tx queue. However, from what I understand, Substrate does not have this kind of RPC for native transaction tips, meaning that the tip value is completely up to the user's arbitrary input. And if we consider that the EVM transaction also has its own gas value with transaction priorities, how will this work with the native transaction pool?&#xD;&#xA;&#xD;&#xA;So my questions are as the following:&#xD;&#xA;&#xD;&#xA;1. Is there a way to calculate the optimal way to calculate the ideal tip value?&#xD;&#xA;2. Will the EVM transaction affect the tx priority for native transactions (I assume it does)? If so, will the EIP-1159 method of calculating the gas cost affect the required tip value for native transactions?&#xD;&#xA;3. Would it be reasonable to directly use the EIP-1159 gas station and use the optimal gas price as the tip value for the native transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9539" PostHistoryTypeId="5" PostId="2552" RevisionGUID="e75cf2d9-0b30-44da-bfe6-def30c2d052e" CreationDate="2022-05-12T09:56:26.457" UserId="693" Comment="added 181 characters in body" Text="Currently, Astar network's transaction volume has increased drastically and we are having some trouble prioritizing the tx queue.&#xD;&#xA;&#xD;&#xA;With EVM, there are many RPCs like `eth_gasPrice`,`eth_feeHistory`, and EIP-1159 to understand more or less what is the optimal gas price for the transaction to pass within a large tx queue. However, from what I understand, Substrate does not have this kind of RPC for native transaction tips, meaning that the tip value is completely up to the user's arbitrary input. And if we consider that the EVM transaction also has its own gas value with transaction priorities, how will this work with the native transaction pool?&#xD;&#xA;&#xD;&#xA;So my questions are as the following:&#xD;&#xA;&#xD;&#xA;1. Is there a way to calculate the optimal way to calculate the ideal tip value?&#xD;&#xA;2. Will the EVM transaction affect the tx priority for native transactions (I assume it does)? If so, will the EIP-1159 method of calculating the gas cost affect the required tip value for native transactions?&#xD;&#xA;3. Would it be reasonable to directly use the EIP-1159 gas station and use the optimal gas price as the tip value for the native transaction?&#xD;&#xA;&#xD;&#xA;Edit: I noticed that there is a function called `get_priority` and storage called `NextFeeMultiplier` in the `transaction-payment` pallet. Could this be related to the solution?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9540" PostHistoryTypeId="2" PostId="2555" RevisionGUID="40c3b4c1-7aa2-427c-9275-101e77fd8822" CreationDate="2022-05-12T10:09:23.847" UserId="2532" Text="I am making a new UI for substrate based blockchain, and found the code [here][1] to upload contract but was unable to understand how to differentiate between `metadata.json &amp;&amp; cont.wasm || cont.contract` file, while uploading the file on UI.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github1s.com/polkadot-js/apps/blob/master/packages/page-contracts/src/Codes/Upload.tsx#L105" ContentLicense="CC BY-SA 4.0" />
  <row Id="9542" PostHistoryTypeId="1" PostId="2555" RevisionGUID="40c3b4c1-7aa2-427c-9275-101e77fd8822" CreationDate="2022-05-12T10:09:23.847" UserId="2532" Text="How to upload contract using a custom made frontend?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9543" PostHistoryTypeId="3" PostId="2555" RevisionGUID="40c3b4c1-7aa2-427c-9275-101e77fd8822" CreationDate="2022-05-12T10:09:23.847" UserId="2532" Text="|polkadot-js|ink|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9544" PostHistoryTypeId="2" PostId="2556" RevisionGUID="4c2369b3-befe-456d-ac91-a5d2b1d7e72a" CreationDate="2022-05-12T10:15:41.147" UserId="2102" Text="I guess you can start looking here https://careers.substrate.io/jobs where most of the jobs are related to communities, parity also has some job offers https://www.parity.io/jobs/#jobboard.&#xD;&#xA;&#xD;&#xA;Besides that, if you are not looking for open source projects, it is a little bit harder and I don't know any portal or hub for that." ContentLicense="CC BY-SA 4.0" />
  <row Id="9546" PostHistoryTypeId="2" PostId="2557" RevisionGUID="9ef25287-c762-4d36-bf5a-d76b5a957a85" CreationDate="2022-05-12T10:43:26.213" UserId="2281" Text="I am trying to add the staking pallet with other dependencies in node-template and getting this error during compiling, I will be thankful if someone help me to resolve this issue &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1VjoU.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9548" PostHistoryTypeId="1" PostId="2557" RevisionGUID="9ef25287-c762-4d36-bf5a-d76b5a957a85" CreationDate="2022-05-12T10:43:26.213" UserId="2281" Text="Getting error in rust while compiling substrate node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="9549" PostHistoryTypeId="3" PostId="2557" RevisionGUID="9ef25287-c762-4d36-bf5a-d76b5a957a85" CreationDate="2022-05-12T10:43:26.213" UserId="2281" Text="|substrate-node|polkadot|rust|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9550" PostHistoryTypeId="2" PostId="2558" RevisionGUID="717eb801-fff4-4ff8-99a3-29d324cff4d3" CreationDate="2022-05-12T11:14:33.180" UserId="53" Text="The Substrate transaction queue uses solely the transaction priority passed via the `SignedExtension` API to prioritise which transactions make it into a block.&#xD;&#xA;&#xD;&#xA;I'm not at all familiar with EIP-1159 and the Ethereum transaction queue. However this really shouldn't impact Substrate: you are presumably using a `SignedExtension` impl which understands the concept of gas and gas-price for your transactions which result in an EVM execution. This impl would calculate a priority based on gas/gas-price. You'll need to analyse how this priority is determined based on gas/gas-price, and then compare to how priority is determined based on tip (which can be found in `ChargeTransactionPayment`). By combining these two equations, you can calculate a tip which provides (approximately) the same priority as any given gas/gas-price.&#xD;&#xA;&#xD;&#xA;For what it's worth, the regarding the tips, the `priority` is calculated as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;priority := max_fitting_in_a_block * (tip + 1)&#xD;&#xA;&#xD;&#xA;max_fitting_in_a_block := min(tx_weight_per_block, tx_size_per_block)&#xD;&#xA;&#xD;&#xA;tx_weight_per_block := max_block_weight / tx_weight&#xD;&#xA;tx_size_per_block := max_block_size / tx_size&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a little complex, but basically increasing the tip by `1` will increase the priority by the maximum number of these transactions which will fit in a block (limited by either the maximum block weight or size). I'd not be against revising this in order to play better with alternative prioritisation systems." ContentLicense="CC BY-SA 4.0" />
  <row Id="9552" PostHistoryTypeId="2" PostId="2559" RevisionGUID="d090e37d-6053-4718-9572-0ecf0a27da56" CreationDate="2022-05-12T11:15:06.773" UserId="2534" Text="I am exposing some external functions to ink! contracts via a chain-extension in pallet-contracts. I am essentially passing a vector of bytes as a parameter to a contract method and directly forwarding it to the chain-extension method that also accepts a vector. The return value is also a vector of bytes that I encode via the SCALE codec when I write it to the environment.&#xD;&#xA;&#xD;&#xA;What I am wondering is how I can increase the maximum allowed input/output sizes such that I can pass in/return bigger vectors. As I increase the vectors, at some point I get ```OutputBufferTooSmall``` and I can trace it to:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/contracts/src/wasm/runtime.rs#L614&#xD;&#xA;&#xD;&#xA;I tried changing ```Schedule``` limits (such as parameter count, memory pages, etc.), but it doesn't have an impact. As far as I see, it is a runtime limitation that is not related to chain-extension (but I might be wrong). How can I increase the sandbox memory size and what is the preferred way of doing so? Maybe via config and not changing code. I couldn't find where the value pointed to by ```out_len_ptr``` is set. Any significant side effects of increasing it?&#xD;&#xA;&#xD;&#xA;Thank you!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9554" PostHistoryTypeId="1" PostId="2559" RevisionGUID="d090e37d-6053-4718-9572-0ecf0a27da56" CreationDate="2022-05-12T11:15:06.773" UserId="2534" Text="How can I increase contract memory in pallet-contracts + chain extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9555" PostHistoryTypeId="3" PostId="2559" RevisionGUID="d090e37d-6053-4718-9572-0ecf0a27da56" CreationDate="2022-05-12T11:15:06.773" UserId="2534" Text="|ink|substrate-node-template|wasm|pallet-contracts|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9556" PostHistoryTypeId="4" PostId="2559" RevisionGUID="62468a8c-6b56-4120-8cc5-7db348f7a980" CreationDate="2022-05-12T11:21:12.833" UserId="2534" Comment="edited title" Text="How can I increase contract memory in pallet-contracts + chain-extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9557" PostHistoryTypeId="2" PostId="2560" RevisionGUID="24240e69-d282-4d10-85cd-742876342137" CreationDate="2022-05-12T11:37:26.553" UserId="279" Text="yes looks like the parachain is producing blocks. Also, I will fix the `tail logs command` asap and draft a new release.&#xD;&#xA;&#xD;&#xA;For reference, in this case should be&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;kubectl logs -f collator01 -c collator01 -n zombie-aa3f81ef14a3fc7592ca0cc07309f72c&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="9559" PostHistoryTypeId="2" PostId="2561" RevisionGUID="d81a35c4-6a34-4c7b-8c8f-3f924f76f8c3" CreationDate="2022-05-12T12:08:01.810" UserId="2338" Text="let's say we have a contract which calls other contract's function that emits an event. What is the approach to emit the event coming from the inner contract's message?&#xD;&#xA;&#xD;&#xA;Currently, there is only an event inside the inner contract&#xD;&#xA;&#xD;&#xA;e.g: we have a LendingPool contract and inside one of its functions we have the following call ```lending_pool.mint_token()``` and inside the ```mint_token()``` token function, there is a call to a separate contract ```erc_token.mint()``` and within this mint function inside the ERC20 contract, we have ```self.env().emit_event(Mint {...})```.&#xD;&#xA;So the question is, how to emit this event from within the ```LendingPool``` contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9561" PostHistoryTypeId="1" PostId="2561" RevisionGUID="d81a35c4-6a34-4c7b-8c8f-3f924f76f8c3" CreationDate="2022-05-12T12:08:01.810" UserId="2338" Text="How to emit events from inner contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="9562" PostHistoryTypeId="3" PostId="2561" RevisionGUID="d81a35c4-6a34-4c7b-8c8f-3f924f76f8c3" CreationDate="2022-05-12T12:08:01.810" UserId="2338" Text="|ink|events|substrate-contracts-node|blockchaincross-contract|blockchain-events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9563" PostHistoryTypeId="2" PostId="2562" RevisionGUID="c985b34c-63bb-425d-845c-f0ce31e3436a" CreationDate="2022-05-12T12:33:16.630" UserId="425" Text="I have a very basic question - ink! now has a [Mapping][1] struct for key-value pairs. It seems it does not implement the *Iterator* trait?  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/ink/ink_storage/struct.Mapping.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="9565" PostHistoryTypeId="1" PostId="2562" RevisionGUID="c985b34c-63bb-425d-845c-f0ce31e3436a" CreationDate="2022-05-12T12:33:16.630" UserId="425" Text="How to iterate over Mapping&lt;K,V&gt;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9566" PostHistoryTypeId="3" PostId="2562" RevisionGUID="c985b34c-63bb-425d-845c-f0ce31e3436a" CreationDate="2022-05-12T12:33:16.630" UserId="425" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9567" PostHistoryTypeId="4" PostId="2551" RevisionGUID="d43a6b39-6e97-4b2e-b7cf-6d2d37cbbdc5" CreationDate="2022-05-12T12:37:20.493" UserId="1789" Comment="edited title" Text="Zombienet: How to confirm if my parachain is producing blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9568" PostHistoryTypeId="2" PostId="2563" RevisionGUID="acca6c22-1d20-46ae-818c-5db499ad9a33" CreationDate="2022-05-12T12:50:35.600" UserId="34" Text="- https://www.zeroknowledge.fm/ - One of the best in the web3 industry: it's on ZK Proofs, but much more and a highly technical podcast. Anna Rose is a Parity alumni and as such has guests from the Polkadot ecosystem fairly often. &#xD;&#xA;&#xD;&#xA;- https://lexfridman.com/podcast - while the guests are very wide ranging, these discussions are commonly focused on web3, cryptocurrency, blockchain, and various other neg-gen technology innovators talking shop and vision. Illustrious guests as well are in the show list that open up for hours on great topics." ContentLicense="CC BY-SA 4.0" />
  <row Id="9570" PostHistoryTypeId="5" PostId="2558" RevisionGUID="1f848e1c-0c14-4f81-8f12-7a7e4c8e3e7b" CreationDate="2022-05-12T12:53:51.950" UserId="53" Comment="added 79 characters in body" Text="The Substrate transaction queue uses solely the transaction priority passed via the `SignedExtension` API to prioritise which transactions make it into a block.&#xD;&#xA;&#xD;&#xA;I'm not at all familiar with EIP-1159 and the Ethereum transaction queue. However this really shouldn't impact Substrate: you are presumably using a `SignedExtension` impl which understands the concept of gas and gas-price for your transactions which result in an EVM execution. This impl would calculate a priority based on gas/gas-price. You'll need to analyse how this priority is determined based on gas/gas-price, and then compare to how priority is determined based on tip (which can be found in `ChargeTransactionPayment`). By combining these two equations, you can calculate a tip which provides (approximately) the same priority as any given gas/gas-price.&#xD;&#xA;&#xD;&#xA;For what it's worth, the regarding the tips, the `priority` is calculated as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;priority := max_fitting_in_a_block * (tip + 1)&#xD;&#xA;&#xD;&#xA;max_fitting_in_a_block := min(tx_weight_per_block, tx_size_per_block)&#xD;&#xA;&#xD;&#xA;tx_weight_per_block := max_block_weight / tx_weight&#xD;&#xA;tx_size_per_block := max_block_size / tx_size&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a little complex, but basically increasing the tip by `1` will increase the priority by the maximum number of these transactions which will fit in a block (limited by either the maximum block weight or size). I'm not against revising this in order to play better with alternative prioritisation systems. See https://github.com/paritytech/substrate/issues/11405 for my current thinking." ContentLicense="CC BY-SA 4.0" />
  <row Id="9571" PostHistoryTypeId="2" PostId="2564" RevisionGUID="1497b622-a8db-41e5-a36e-66fbce6185e0" CreationDate="2022-05-12T13:03:24.980" UserId="34" Text="One community pairing of websites that are free to post in are:&#xD;&#xA;&#xD;&#xA;- https://dotjobs.net for Polkadot (primary site)&#xD;&#xA;- https://ksmjobs.net for Kusama (secondary, mostly the same as dotjobs)&#xD;&#xA;&#xD;&#xA;These are maintained by [Stateless Money](https://stateless.money/)" ContentLicense="CC BY-SA 4.0" />
  <row Id="9573" PostHistoryTypeId="2" PostId="2565" RevisionGUID="e6f26179-e450-42d7-a63b-550b2ec0c914" CreationDate="2022-05-12T14:04:42.577" UserId="1789" Text="Originally I had this network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/paritypr/polkadot-debug:master&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 100&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;and my test file:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z01-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 100 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 100 block height is at least 6 within 150 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# histogram&#xD;&#xA;#alice: reports histogram polkadot_pvf_execution_time has at least 2 samples in buckets [&quot;0.1&quot;, &quot;0.25&quot;, &quot;0.5&quot;, &quot;+Inf&quot;] within 100 seconds&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;The test ran successfully.&#xD;&#xA;&#xD;&#xA;Then I changed the parachain id from 100 to 2000 in my network definition file:&#xD;&#xA;```&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;```&#xD;&#xA;and changed it in my test file&#xD;&#xA;```&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;```&#xD;&#xA;then block height test failed !!!??? What happened?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    ✔ alice: is up (159ms)&#xD;&#xA;    ✔ bob: is up (93ms)&#xD;&#xA;2022-05-12 21:43:44        API/INIT: RPC methods not decorated: beefy_getFinalizedHead, mmr_generateBatchProof, state_trieMigrationStatus&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (3035ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (194ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (195ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (123ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-12 21:46:18        API/INIT: RPC methods not decorated: beefy_getFinalizedHead, mmr_generateBatchProof, state_trieMigrationStatus&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-12 21:46:38        API/INIT: RPC methods not decorated: beefy_getFinalizedHead, mmr_generateBatchProof, state_trieMigrationStatus&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-540455ef8ad2e803ca8f34df7aba359c_-267460-xyaOcnkB7UwG/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-12 21:46:48        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:41881: 1000:: Normal connection closure&#xD;&#xA;2022-05-12 21:46:55        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: disconnected from ws://127.0.0.1:41881: 1006:: Connection dropped by remote peer.&#xD;&#xA;2022-05-12 21:46:55        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:41881: 1006:: Connection dropped by remote peer.&#xD;&#xA;child process exited&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  8 passing (6m)&#xD;&#xA;  3 failing&#xD;&#xA;&#xD;&#xA;  1) small network( Small Network test )&#xD;&#xA;       alice: parachain 2000 block height is at least 6 within 150 seconds:&#xD;&#xA;&#xD;&#xA;      AssertionError: expected 0 to be at least 6&#xD;&#xA;      + expected - actual&#xD;&#xA;&#xD;&#xA;      -0&#xD;&#xA;      +6&#xD;&#xA;      &#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:265:37&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  2) small network( Small Network test )&#xD;&#xA;       bob: system event contains &quot;A candidate was included&quot; within 20 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;      at runNextTicks (node:internal/process/task_queues:61:5)&#xD;&#xA;      at processTimers (node:internal/timers:497:9)&#xD;&#xA;&#xD;&#xA;  3) small network( Small Network test )&#xD;&#xA;       alice: system event matches glob &quot;*was backed*&quot; within 10 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is wrong?&#xD;&#xA;&#xD;&#xA;I think I got some clues from the collor01 log:&#xD;&#xA;```&#xD;&#xA;kubectl logs -f collator01 -c collator01 -n zombie-540455ef8...&#xD;&#xA;```&#xD;&#xA;The collator logs:&#xD;&#xA;```&#xD;&#xA;2022-05-12 13:43:53  Highest known block at #0    &#xD;&#xA;2022-05-12 13:43:53 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-05-12 13:43:53 Running JSON-RPC HTTP server: addr=0.0.0.0:9933, allowed origins=None    &#xD;&#xA;2022-05-12 13:43:53 Running JSON-RPC WS server: addr=0.0.0.0:9944, allowed origins=None    &#xD;&#xA;2022-05-12 13:43:53 Running adder collator for parachain id: 100    &#xD;&#xA;2022-05-12 13:43:53 Genesis state: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000011b4d03dd8c01f1049143cf9c4c817e4b167f1d1b83e5c6f0f10d89ba1e7bce    &#xD;&#xA;2022-05-12 13:43:53 Validation code: 0x52bc537646db8e0528b52ffd&#xD;&#xA;```&#xD;&#xA;Can you see `parachain id: 100` from above log? ... That is not correct! It should have been 2000!&#xD;&#xA;&#xD;&#xA;Then the logs continue:&#xD;&#xA;```&#xD;&#xA;2022-05-12 13:43:53  New epoch 0 launching at block 0x71a4…bf72 (block slot 275393835 &gt;= start slot 275393835).    &#xD;&#xA;2022-05-12 13:43:53  Next epoch starts at slot 275393845    &#xD;&#xA;2022-05-12 13:43:53 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #1 (0x71a4…bf72)    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #2 (0xbdb6…88d8)    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #3 (0xd762…e188)    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #4 (0x3d10…f120)    &#xD;&#xA;2022-05-12 13:43:54 ✨ Imported #5 (0x829d…0813)    &#xD;&#xA;2022-05-12 13:43:58  Idle (2 peers), best: #5 (0x829d…0813), finalized #2 (0xbdb6…88d8), ⬇ 4.1kiB/s ⬆ 3.1kiB/s    &#xD;&#xA;2022-05-12 13:44:00 ✨ Imported #6 (0xf678…876a)    &#xD;&#xA;2022-05-12 13:44:03  Idle (2 peers), best: #6 (0xf678…876a), finalized #2 (0xbdb6…88d8), ⬇ 0.6kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:06 ✨ Imported #7 (0x52b3…2894)    &#xD;&#xA;2022-05-12 13:44:08  Idle (2 peers), best: #7 (0x52b3…2894), finalized #4 (0x3d10…f120), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:44:12 ✨ Imported #8 (0x67d0…b6ea)    &#xD;&#xA;2022-05-12 13:44:13  Idle (2 peers), best: #8 (0x67d0…b6ea), finalized #4 (0x3d10…f120), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:44:18 ✨ Imported #9 (0x3fa7…f515)    &#xD;&#xA;2022-05-12 13:44:18 ✨ Imported #9 (0x802e…c090)    &#xD;&#xA;2022-05-12 13:44:18  Idle (2 peers), best: #9 (0x3fa7…f515), finalized #5 (0x829d…0813), ⬇ 1.1kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:23  Idle (2 peers), best: #9 (0x3fa7…f515), finalized #6 (0xf678…876a), ⬇ 0.3kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-05-12 13:44:24 ✨ Imported #10 (0x2141…a0f2)    &#xD;&#xA;2022-05-12 13:44:28  Idle (2 peers), best: #10 (0x2141…a0f2), finalized #6 (0xf678…876a), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:44:30  New epoch 1 launching at block 0x79b1…6fe6 (block slot 275393845 &gt;= start slot 275393845).    &#xD;&#xA;2022-05-12 13:44:30  Next epoch starts at slot 275393855    &#xD;&#xA;2022-05-12 13:44:30 ✨ Imported #11 (0x79b1…6fe6)    &#xD;&#xA;2022-05-12 13:44:30 Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 0, new_window_start: 0, new_window_end: 1 }&#xD;&#xA;2022-05-12 13:44:33  Idle (2 peers), best: #11 (0x79b1…6fe6), finalized #8 (0x67d0…b6ea), ⬇ 0.8kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:36 ✨ Imported #12 (0x5d1b…193a)    &#xD;&#xA;2022-05-12 13:44:38  Idle (2 peers), best: #12 (0x5d1b…193a), finalized #9 (0x3fa7…f515), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:42 ✨ Imported #13 (0x2bbe…b677)    &#xD;&#xA;2022-05-12 13:44:43  Idle (2 peers), best: #13 (0x2bbe…b677), finalized #9 (0x3fa7…f515), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:48 ✨ Imported #14 (0xe1fd…55f4)    &#xD;&#xA;2022-05-12 13:44:48  Idle (2 peers), best: #14 (0xe1fd…55f4), finalized #10 (0x2141…a0f2), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:44:53  Idle (2 peers), best: #14 (0xe1fd…55f4), finalized #10 (0x2141…a0f2), ⬇ 0.1kiB/s ⬆ 0.1kiB/s    &#xD;&#xA;2022-05-12 13:44:54 ✨ Imported #15 (0xef73…58aa)    &#xD;&#xA;2022-05-12 13:44:58  Idle (2 peers), best: #15 (0xef73…58aa), finalized #12 (0x5d1b…193a), ⬇ 1.0kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-05-12 13:45:00 ✨ Imported #16 (0xe38e…e485)    &#xD;&#xA;2022-05-12 13:45:03  Idle (2 peers), best: #16 (0xe38e…e485), finalized #13 (0x2bbe…b677), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:06 ✨ Imported #17 (0xa379…9ad5)    &#xD;&#xA;2022-05-12 13:45:08  Idle (2 peers), best: #17 (0xa379…9ad5), finalized #13 (0x2bbe…b677), ⬇ 0.5kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:45:12 ✨ Imported #18 (0x6eaf…c841)    &#xD;&#xA;2022-05-12 13:45:13  Idle (2 peers), best: #18 (0x6eaf…c841), finalized #14 (0xe1fd…55f4), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:45:18 ✨ Imported #19 (0x0359…55b3)    &#xD;&#xA;2022-05-12 13:45:18  Idle (2 peers), best: #19 (0x0359…55b3), finalized #16 (0xe38e…e485), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:23  Idle (2 peers), best: #19 (0x0359…55b3), finalized #16 (0xe38e…e485), ⬇ 0.1kiB/s ⬆ 0.1kiB/s    &#xD;&#xA;2022-05-12 13:45:24 ✨ Imported #20 (0x247a…3829)    &#xD;&#xA;2022-05-12 13:45:28  Idle (2 peers), best: #20 (0x247a…3829), finalized #17 (0xa379…9ad5), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:45:30  New epoch 2 launching at block 0xa37b…ff93 (block slot 275393855 &gt;= start slot 275393855).    &#xD;&#xA;2022-05-12 13:45:30  Next epoch starts at slot 275393865    &#xD;&#xA;2022-05-12 13:45:30 ✨ Imported #21 (0xa37b…ff93)    &#xD;&#xA;2022-05-12 13:45:30 Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 1, new_window_start: 0, new_window_end: 2 }&#xD;&#xA;2022-05-12 13:45:33  Idle (2 peers), best: #21 (0xa37b…ff93), finalized #17 (0xa379…9ad5), ⬇ 0.9kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-05-12 13:45:36 ✨ Imported #22 (0xa43c…2cac)    &#xD;&#xA;2022-05-12 13:45:38  Idle (2 peers), best: #22 (0xa43c…2cac), finalized #18 (0x6eaf…c841), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:42 ✨ Imported #23 (0x4cfd…b4da)    &#xD;&#xA;2022-05-12 13:45:42 ✨ Imported #23 (0x068d…70fe)    &#xD;&#xA;2022-05-12 13:45:43  Idle (2 peers), best: #23 (0x4cfd…b4da), finalized #20 (0x247a…3829), ⬇ 1.2kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:48 ✨ Imported #24 (0xb9b6…778e)    &#xD;&#xA;2022-05-12 13:45:48  Idle (2 peers), best: #24 (0xb9b6…778e), finalized #20 (0x247a…3829), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:45:49  Applying authority set change scheduled at block #21    &#xD;&#xA;2022-05-12 13:45:49  Applying GRANDPA set change to new set [(Public(a40f9c22185e85da8b7bd994b4305dbdab004da2288cc77061cb216bb264f0cc (5FmpM6me...)), 1), (Public(e922806258d9c1257d168f05bdbaa87e33c0e90bc38803c9af6c56dbf0206898 (5HLPGEGr...)), 1)]    &#xD;&#xA;2022-05-12 13:45:53  Idle (2 peers), best: #24 (0xb9b6…778e), finalized #21 (0xa37b…ff93), ⬇ 0.2kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-05-12 13:45:54 ✨ Imported #25 (0x4d0f…3ccb)    &#xD;&#xA;2022-05-12 13:45:58  Idle (2 peers), best: #25 (0x4d0f…3ccb), finalized #22 (0xa43c…2cac), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:46:00 ✨ Imported #26 (0xc6a3…c6cf)    &#xD;&#xA;2022-05-12 13:46:03  Idle (2 peers), best: #26 (0xc6a3…c6cf), finalized #22 (0xa43c…2cac), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:46:06 ✨ Imported #27 (0xae85…8571)    &#xD;&#xA;2022-05-12 13:46:08  Idle (2 peers), best: #27 (0xae85…8571), finalized #24 (0xb9b6…778e), ⬇ 0.5kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:12 ✨ Imported #28 (0x9d19…13c4)    &#xD;&#xA;2022-05-12 13:46:13  Idle (2 peers), best: #28 (0x9d19…13c4), finalized #24 (0xb9b6…778e), ⬇ 0.7kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:18 ✨ Imported #29 (0xf8c2…4e06)    &#xD;&#xA;2022-05-12 13:46:18 ✨ Imported #29 (0x59aa…25c4)    &#xD;&#xA;2022-05-12 13:46:18  Idle (2 peers), best: #29 (0xf8c2…4e06), finalized #25 (0x4d0f…3ccb), ⬇ 1.3kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:46:23  Idle (2 peers), best: #29 (0xf8c2…4e06), finalized #26 (0xc6a3…c6cf), ⬇ 0.3kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-05-12 13:46:24 ✨ Imported #30 (0x1299…4771)    &#xD;&#xA;2022-05-12 13:46:28  Idle (2 peers), best: #30 (0x1299…4771), finalized #26 (0xc6a3…c6cf), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:30  New epoch 3 launching at block 0x0c6a…262c (block slot 275393865 &gt;= start slot 275393865).    &#xD;&#xA;2022-05-12 13:46:30  Next epoch starts at slot 275393875    &#xD;&#xA;2022-05-12 13:46:30 ✨ Imported #31 (0x0c6a…262c)    &#xD;&#xA;2022-05-12 13:46:30 Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 2, new_window_start: 0, new_window_end: 3 }&#xD;&#xA;2022-05-12 13:46:33  Idle (2 peers), best: #31 (0x0c6a…262c), finalized #28 (0x9d19…13c4), ⬇ 1.0kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-05-12 13:46:36 ✨ Imported #32 (0x0e5a…2db8)    &#xD;&#xA;2022-05-12 13:46:38  Idle (2 peers), best: #32 (0x0e5a…2db8), finalized #29 (0xf8c2…4e06), ⬇ 1.0kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:46:42 ✨ Imported #33 (0x9cd3…0317)    &#xD;&#xA;2022-05-12 13:46:42 ✨ Imported #33 (0x0f64…393a)    &#xD;&#xA;2022-05-12 13:46:43  Idle (2 peers), best: #33 (0x9cd3…0317), finalized #29 (0xf8c2…4e06), ⬇ 1.2kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:46:48 ♻️  Reorg on #33,0x9cd3…0317 to #34,0x8365…1cb9, common ancestor #32,0x0e5a…2db8    &#xD;&#xA;2022-05-12 13:46:48 ✨ Imported #34 (0x8365…1cb9)    &#xD;&#xA;2022-05-12 13:46:48  Idle (2 peers), best: #34 (0x8365…1cb9), finalized #30 (0x1299…4771), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:53  Idle (2 peers), best: #34 (0x8365…1cb9), finalized #30 (0x1299…4771), ⬇ 0.3kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:53  Applying authority set change scheduled at block #31    &#xD;&#xA;```&#xD;&#xA;I can see `Imported #33` so the parachain collator had been producing many blocks.&#xD;&#xA;&#xD;&#xA;So why the block height test failed???&#xD;&#xA;&#xD;&#xA;I am using the latest zombienet-linux  v1.2.32" ContentLicense="CC BY-SA 4.0" />
  <row Id="9575" PostHistoryTypeId="1" PostId="2565" RevisionGUID="e6f26179-e450-42d7-a63b-550b2ec0c914" CreationDate="2022-05-12T14:04:42.577" UserId="1789" Text="Zombienet: test fails after changing parachain id" ContentLicense="CC BY-SA 4.0" />
  <row Id="9576" PostHistoryTypeId="3" PostId="2565" RevisionGUID="e6f26179-e450-42d7-a63b-550b2ec0c914" CreationDate="2022-05-12T14:04:42.577" UserId="1789" Text="|parachain|collator|parachain-collator|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9577" PostHistoryTypeId="52" PostId="2549" RevisionGUID="b4e3c0e5-0c37-42ec-91f5-2a691329b909" CreationDate="2022-05-12T15:16:56.517" />
  <row Id="9579" PostHistoryTypeId="2" PostId="2566" RevisionGUID="c1142acb-3119-4a30-b790-75d192f7b0c8" CreationDate="2022-05-12T15:30:23.317" UserId="1861" Text="https://github.com/paritytech/polkadot/blob/decdbedea6d49b0604fee3241970a7ff383fe1db/parachain/test-parachains/adder/collator/src/main.rs#L87&#xD;&#xA;&#xD;&#xA;If there is none provided via the CLI, the adder collator will assume `100` as default.&#xD;&#xA;&#xD;&#xA;Note that `adder-collator` is the utmost basic collator one can imagine, it should only be used for basic smoke tests." ContentLicense="CC BY-SA 4.0" />
  <row Id="9581" PostHistoryTypeId="52" PostId="2552" RevisionGUID="acdd1974-8dcd-4624-96d3-6159d7c1db53" CreationDate="2022-05-12T16:29:19.373" />
  <row Id="9582" PostHistoryTypeId="5" PostId="2524" RevisionGUID="99c9e0a2-cbb6-4af8-8331-6253d0f4f03b" CreationDate="2022-05-12T16:39:06.787" UserId="484" Comment="added 1006 characters in body" Text="I am trying to run `statemine` in `polkadot-launch`. I have get 0.9.18 versions of `polkadot` and `polkadot-collator`. And trying to run like next:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;  &quot;relaychain&quot;: {&#xD;&#xA;    &quot;bin&quot;: &quot;../../../polkadot/target/release/polkadot&quot;,&#xD;&#xA;    &quot;chain&quot;: &quot;kusama-local&quot;,&#xD;&#xA;    &quot;genesis&quot;: {&#xD;&#xA;      &quot;runtime&quot;: {&#xD;&#xA;        &quot;runtime_genesis_config&quot;: {&#xD;&#xA;          &quot;configuration&quot;: {&#xD;&#xA;            &quot;config&quot;: {&#xD;&#xA;              &quot;validation_upgrade_frequency&quot;: 2,&#xD;&#xA;              &quot;validation_upgrade_delay&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    &quot;nodes&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9944,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/alice&quot;,&#xD;&#xA;        &quot;port&quot;: 30444,&#xD;&#xA;        &quot;flags&quot;: [&quot;--rpc-cors=all&quot;, &quot;--beefy&quot;, &quot;--enable-offchain-indexing=true&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9955,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/bob&quot;,&#xD;&#xA;        &quot;port&quot;: 30555,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9966,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/charlie&quot;,&#xD;&#xA;        &quot;port&quot;: 30666,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;dave&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9977,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/dave&quot;,&#xD;&#xA;        &quot;port&quot;: 30777,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;name&quot;: &quot;ferdie&quot;,&#xD;&#xA;        &quot;wsPort&quot;: 9978,&#xD;&#xA;        &quot;basePath&quot;: &quot;/tmp/polkadot-launch/relaychains/ferdie&quot;,&#xD;&#xA;        &quot;port&quot;: 30778,&#xD;&#xA;        &quot;flags&quot;: [&quot;--beefy&quot;]&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;parachains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;bin&quot;: &quot;../../../cumulus/target/release/polkadot-collator&quot;,&#xD;&#xA;      &quot;chain&quot;: &quot;statemine-local&quot;,&#xD;&#xA;      &quot;nodes&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;alice&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9988,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/alice&quot;,&#xD;&#xA;          &quot;port&quot;: 31100,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;bob&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9997,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/bob&quot;,&#xD;&#xA;          &quot;port&quot;: 31200,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;charlie&quot;,&#xD;&#xA;          &quot;wsPort&quot;: 9996,&#xD;&#xA;          &quot;basePath&quot;: &quot;/tmp/polkadot-launch/parachains/charlie&quot;,&#xD;&#xA;          &quot;port&quot;: 31300,&#xD;&#xA;          &quot;flags&quot;: [&quot;--&quot;, &quot;--execution=wasm&quot;]&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  &quot;types&quot;: {},&#xD;&#xA;  &quot;finalization&quot;: false,&#xD;&#xA;  &quot;simpleParachains&quot;: []&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I see relay blocks produced but not statemine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I able to produce blocks on my parachain network. And also tried rococo for relay and statemine-dev/local in above config, no results.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Statemine several collators][1]][1]&#xD;&#xA;[![Statemine no blocks][2]][2]&#xD;&#xA;[![Statemine is parachain][3]][3]&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;Logs seems fine &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-05-11 15:55:10 Polkadot collator    &#xD;&#xA;2022-05-11 15:55:10 ✌️  version 5.3.0-b1e91afb7-x86_64-linux-gnu    &#xD;&#xA;2022-05-11 15:55:10 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2022    &#xD;&#xA;2022-05-11 15:55:10  Chain specification: Statemine Local    &#xD;&#xA;2022-05-11 15:55:10   Node name: Alice    &#xD;&#xA;2022-05-11 15:55:10  Role: AUTHORITY    &#xD;&#xA;2022-05-11 15:55:10  Database: RocksDb at /tmp/substratejHBiJi/chains/statemine_local/db/full    &#xD;&#xA;2022-05-11 15:55:10 ⛓  Native runtime: statemine-800 (statemine-0.tx5.au1)    &#xD;&#xA;2022-05-11 15:55:10 assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-11 15:55:10 assembling new collators for new session 1 at #0    &#xD;&#xA;2022-05-11 15:55:10 Parachain id: Id(1000)    &#xD;&#xA;2022-05-11 15:55:10 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    &#xD;&#xA;2022-05-11 15:55:10 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000c167e2803b46f80dace0bc13481465390c9011b17b8403845d606361c197495703170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2022-05-11 15:55:10 Is collating: yes    &#xD;&#xA;2022-05-11 15:55:10 [Parachain] assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-11 15:55:10 [Parachain] assembling new collators for new session 1 at #0    &#xD;&#xA;2022-05-11 15:55:11 [Parachain]  Initializing Genesis block/state (state: 0xc167…4957, header-hash: 0xb8cd…390b)    &#xD;&#xA;2022-05-11 15:55:13 [Relaychain]  Initializing Genesis block/state (state: 0xeb9f…680a, header-hash: 0x69b2…082e)    &#xD;&#xA;2022-05-11 15:55:13 [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]   Local node identity is: 12D3KooWHx7EaXTHvQQJ9zqdAwreArUaiCjQEeZxd5VDUqKXo9uE    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Highest known block at #0    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] Listening for new connections on 127.0.0.1:9945.    &#xD;&#xA;2022-05-11 15:55:14 [Parachain] Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2022-05-11 15:55:14 [Parachain]   Local node identity is: 12D3KooWLPW6TyqXc8mGJTuARXCbMR3WLvPkDjPcvPyTFZpn5s76    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  New epoch 0 launching at block 0x1da5…73bc (block slot 275380152 &gt;= start slot 275380152).    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain]  Next epoch starts at slot 275380752    &#xD;&#xA;2022-05-11 15:55:14 [Relaychain] ✨ Imported #1 (0x1da5…73bc)    &#xD;&#xA;2022-05-11 15:55:15 Accepted a new tcp connection from 127.0.0.1:39826.    &#xD;&#xA;2022-05-11 15:55:15 [Parachain]  Highest known block at #0    &#xD;&#xA;2022-05-11 15:55:15 [Parachain] Unable to bind RPC server to 127.0.0.1:9933. Trying random port.    &#xD;&#xA;2022-05-11 15:55:15 [Parachain] Listening for new connections on 127.0.0.1:9988.    &#xD;&#xA;2022-05-11 15:55:17 Accepted a new tcp connection from 127.0.0.1:39852.    &#xD;&#xA;2022-05-11 15:55:18 [Relaychain] ✨ Imported #2 (0x2cd9…2123)    &#xD;&#xA;2022-05-11 15:55:18 Accepted a new tcp connection from 127.0.0.1:50682.    &#xD;&#xA;2022-05-11 15:55:19 [Relaychain]  Idle (5 peers), best: #2 (0x2cd9…2123), finalized #0 (0x69b2…082e), ⬇ 9.3kiB/s ⬆ 6.1kiB/s    &#xD;&#xA;2022-05-11 15:55:20 [Parachain]  Idle (0 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 4.0kiB/s ⬆ 3.2kiB/s    &#xD;&#xA;2022-05-11 15:55:24 [Relaychain] ✨ Imported #3 (0x0ed5…a7c0)    &#xD;&#xA;2022-05-11 15:55:24 [Relaychain]  Idle (6 peers), best: #3 (0x0ed5…a7c0), finalized #0 (0x69b2…082e), ⬇ 5.2kiB/s ⬆ 5.0kiB/s    &#xD;&#xA;2022-05-11 15:55:25 [Parachain]  Idle (1 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 1.3kiB/s ⬆ 1.3kiB/s    &#xD;&#xA;2022-05-11 15:55:29 [Relaychain]  Idle (7 peers), best: #3 (0x0ed5…a7c0), finalized #1 (0x1da5…73bc), ⬇ 2.8kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2022-05-11 15:55:30 [Relaychain] ✨ Imported #4 (0x6ace…4244)    &#xD;&#xA;2022-05-11 15:55:30 [Relaychain] ✨ Imported #4 (0xb656…7bcc)    &#xD;&#xA;2022-05-11 15:55:30 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 1.1kiB/s ⬆ 1.0kiB/s    &#xD;&#xA;2022-05-11 15:55:34 [Relaychain]  Idle (7 peers), best: #4 (0x6ace…4244), finalized #1 (0x1da5…73bc), ⬇ 3.5kiB/s ⬆ 2.3kiB/s    &#xD;&#xA;2022-05-11 15:55:35 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 0.5kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-11 15:55:36 [Relaychain] ✨ Imported #5 (0x483e…686f)    &#xD;&#xA;2022-05-11 15:55:36 [Relaychain] ✨ Imported #5 (0x3375…4531)    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;```&#xD;&#xA;2022-05-11 16:05:52 [Relaychain]  Idle (6 peers), best: #21 (0x7c26…8c8f), finalized #19 (0xf4da…23f4), ⬇ 2.2kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-05-11 16:05:53 [Parachain]  Idle (2 peers), best: #0 (0xb8cd…390b), finalized #0 (0xb8cd…390b), ⬇ 74 B/s ⬆ 74 B/s    &#xD;&#xA;```&#xD;&#xA;things look like good, but no block production.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Resolving parachain id...&#xD;&#xA;2022-05-11 16:10:11 Building chain spec    &#xD;&#xA;  ✓ Read parachain id for ../../../cumulus/target/release/polkadot-collator: 1000&#xD;&#xA;2022-05-11 16:10:11 Building chain spec    &#xD;&#xA;&#xD;&#xA; Starting with a fresh authority set...&#xD;&#xA;   Added Genesis Authority alice&#xD;&#xA;   Added Genesis Authority bob&#xD;&#xA;   Added Genesis Authority charlie&#xD;&#xA;   Added Genesis Authority dave&#xD;&#xA;   Added Genesis Authority eve&#xD;&#xA;   Added Genesis Authority ferdie&#xD;&#xA;&#xD;&#xA;⚙ Updating Relay Chain Genesis Configuration&#xD;&#xA;  ⚠ Bad Genesis Configuration [ runtime_genesis_config: [object Object] ]&#xD;&#xA;&#xD;&#xA;⛓ Adding Genesis Parachains&#xD;&#xA;  ✓ Added Genesis Parachain 1000&#xD;&#xA;Added Boot Nodes: /ip4/127.0.0.1/tcp/30444/p2p/12D3KooWBpXHFGqv6Cn4fecVkoZog5AwKpo4srLCh82hRLCREyqQ,/ip4/127.0.0.1/tcp/30555/p2p/12D3KooWL2Trz3SHdj69KE4u1rs8L4dNiiSVWHvPgghH5cruHpdi,/ip4/127.0.0.1/tcp/30666/p2p/12D3KooWSRubBEXi2mepS977hbAtwcqajiuiBc4DsY12aAGBiQGt,/ip4/127.0.0.1/tcp/30777/p2p/12D3KooWCmF9w2hKHwyjYmfBHGE4PT4yDoiv8zMtTHFXdiXQQ9GU,/ip4/127.0.0.1/tcp/30778/p2p/12D3KooWNYx15tFrmeVk9Q768bZTby1eAo7vYJMg7W6hG7bzFQ9F,/ip4/127.0.0.1/tcp/30779/p2p/12D3KooWAzjYTQC2rhrfq1vUgcQ9u4EtLtc2qVckArSdg5BVn9i4&#xD;&#xA;&#xD;&#xA;2022-05-11 16:10:12 Building chain spec    &#xD;&#xA;2022-05-11 16:10:13 [0]  generated 2 npos voters, 2 from validators and 0 nominators    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size.    &#xD;&#xA;2022-05-11 16:10:13 Took active validators from set with wrong size    &#xD;&#xA;Starting Relaychain Node alice... wsPort: 9944 rpcPort: undefined port: 30444 nodeKey: c2932f775f2342b04e99242358542a4184b67fe83a7f084afc69dba8bbafd50b&#xD;&#xA;Added --rpc-cors=all,--beefy,--enable-offchain-indexing=true&#xD;&#xA;Starting Relaychain Node bob... wsPort: 9955 rpcPort: undefined port: 30555 nodeKey: 47913ebe0a697d07aeecbae0c0c440cbb3d3ad04947707be5853115d504d160a&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node charlie... wsPort: 9966 rpcPort: undefined port: 30666 nodeKey: 1393cc7ad66e836d152b2385793243c19f9f86a6bda209ca0fd3b7c473a04977&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node dave... wsPort: 9977 rpcPort: undefined port: 30777 nodeKey: f39b4dba76fc9262b239b49eb0327496faea6cdbef865227d9b10c63107ce04a&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node eve... wsPort: 9978 rpcPort: undefined port: 30778 nodeKey: 83ad2741d3f342da242adfddb5f4a12c0b76c8e0944ea7532cc26fb327f2a684&#xD;&#xA;Added --beefy&#xD;&#xA;Starting Relaychain Node ferdie... wsPort: 9979 rpcPort: undefined port: 30779 nodeKey: 5cebfc00fb88231f57264c4925ad09fcb30a398f9b4b086a396e275841e84751&#xD;&#xA;Added --beefy&#xD;&#xA;2022-05-11 16:10:13          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:15          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:18          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:20          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:23          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:25          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:28          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:30          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:33          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:35          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;2022-05-11 16:10:38        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;Starting a Collator for parachain 1000: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ, Collator port : 31100 wsPort : 9988 rpcPort : undefined&#xD;&#xA;Added --alice&#xD;&#xA;Added --force-authoring&#xD;&#xA;Added --chain=statemine-local&#xD;&#xA;Added  to parachain&#xD;&#xA;Added --execution=wasm to collator&#xD;&#xA;Starting a Collator for parachain 1000: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ, Collator port : 31200 wsPort : 9997 rpcPort : undefined&#xD;&#xA;Added --bob&#xD;&#xA;Added --force-authoring&#xD;&#xA;Added --chain=statemine-local&#xD;&#xA;Added  to parachain&#xD;&#xA;Added --execution=wasm to collator&#xD;&#xA; POLKADOT LAUNCH COMPLETE &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;versions used are 0.9.18 tags:&#xD;&#xA;```&#xD;&#xA;polkadot-collator 5.3.0-b1e91afb7-x86_64-linux-gnu&#xD;&#xA;polkadot 0.9.18-99cd17ddb2-x86_64-linux-gnu&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;UPDATE2:&#xD;&#xA;&#xD;&#xA;Tried to run `statemine` out of console, failed with&#xD;&#xA;```&#xD;&#xA;../../../cumulus/target/release/polkadot-collator --chain &quot;statemine-local&quot; --port 30888 --ws-port 9988 --tmp&#xD;&#xA;Error: Input(&quot;Relay chain argument error: Invalid input: `kusama-local` only supported with `kusama-native` feature enabled.&quot;)&#xD;&#xA;2022-05-12 17:38:19 Polkadot collator    &#xD;&#xA;2022-05-12 17:38:19 ✌️  version 5.3.0-b1e91afb7-x86_64-linux-gnu    &#xD;&#xA;2022-05-12 17:38:19 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2022    &#xD;&#xA;2022-05-12 17:38:19  Chain specification: Statemine Local    &#xD;&#xA;2022-05-12 17:38:19   Node name: enormous-manager-8101    &#xD;&#xA;2022-05-12 17:38:19  Role: FULL    &#xD;&#xA;2022-05-12 17:38:19  Database: RocksDb at /tmp/substratebAUh6O/chains/statemine_local/db/full    &#xD;&#xA;2022-05-12 17:38:19 ⛓  Native runtime: statemine-800 (statemine-0.tx5.au1)    &#xD;&#xA;2022-05-12 17:38:19 assembling new collators for new session 0 at #0    &#xD;&#xA;2022-05-12 17:38:19 assembling new collators for new session 1 at #0   &#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cfqjg.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZLdOk.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/YrYIN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9583" PostHistoryTypeId="2" PostId="2567" RevisionGUID="97250d80-e5b0-4761-b675-4ded9eb54582" CreationDate="2022-05-12T18:54:57.330" UserId="351" Text=" I was contributing on pallet-assets and I find it hard to understand this syntax, Care to explain in details and examples" ContentLicense="CC BY-SA 4.0" />
  <row Id="9585" PostHistoryTypeId="1" PostId="2567" RevisionGUID="97250d80-e5b0-4761-b675-4ded9eb54582" CreationDate="2022-05-12T18:54:57.330" UserId="351" Text="Explanation on this syntax: pub trait Config&lt;I: 'static = ()&gt;: frame_system::Config" ContentLicense="CC BY-SA 4.0" />
  <row Id="9586" PostHistoryTypeId="3" PostId="2567" RevisionGUID="97250d80-e5b0-4761-b675-4ded9eb54582" CreationDate="2022-05-12T18:54:57.330" UserId="351" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9587" PostHistoryTypeId="2" PostId="2568" RevisionGUID="e17fdf29-c3f0-4e49-941d-7f52db9accbf" CreationDate="2022-05-12T19:47:38.227" UserId="464" Text="We are performing upgrade on a chain, in the dev side just to ensure all is OK we do step by step using a forked state of the live chain, we got corrupted state log which we want to debug in order to solve it (example bellow), what is the best way to decode the array, is there a way to make it human readable directly in the log of the node ?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Corrupted state at [38, 170, 57, 78, 234, 86, 48, 224, 124, 72, 174, 12, 149, 88, 206, 247, 185, 157, 136, 14, 198, 129, 121, 156, 12, 243, 14, 136, 134, 55, 29, 169, 222, 30, 134, 169, 168, 199, 57, 134, 76, 243, 204, 94, 194, 190, 165, 159, 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9589" PostHistoryTypeId="1" PostId="2568" RevisionGUID="e17fdf29-c3f0-4e49-941d-7f52db9accbf" CreationDate="2022-05-12T19:47:38.227" UserId="464" Text="Debug corrupted on dev update" ContentLicense="CC BY-SA 4.0" />
  <row Id="9590" PostHistoryTypeId="3" PostId="2568" RevisionGUID="e17fdf29-c3f0-4e49-941d-7f52db9accbf" CreationDate="2022-05-12T19:47:38.227" UserId="464" Text="|runtime-upgrade|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9591" PostHistoryTypeId="5" PostId="2567" RevisionGUID="b9a72bba-ea7e-4843-86db-657015f7513e" CreationDate="2022-05-12T20:12:37.013" UserId="29" Comment="added 75 characters in body" Text="I was contributing on pallet-assets and I found it hard to understand this syntax:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub trait Config&lt;I: 'static = ()&gt;: frame_system::Config&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Care to explain in details and examples?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9592" PostHistoryTypeId="2" PostId="2569" RevisionGUID="d5883fc8-d508-44aa-939a-e8fe1558bfdd" CreationDate="2022-05-12T20:18:25.097" UserId="73" Text="You can not make it readable in the logs of the node, because Frame uses concatenated hashes to build the final key. However, as you know the scheme and your runtime, you can start reverse engineer the key. Each Frame storage key is `twox_128(PALLET_NAME) ++ twox_128(STORAGE_NAME)`. Where `PALLET_NAME` being the name of your pallet as configured in your construct runtime. `STORAGE_NAME` is the name of the storage type in your pallet `type Xy = Value&lt;..&gt;` where `Xy` being this name. I think there exists some example in polakdot js somewhere to generate you a list of all of these &quot;key prefixes&quot;. Then you just need to match these prefixes against the key from your log. " ContentLicense="CC BY-SA 4.0" />
  <row Id="9594" PostHistoryTypeId="2" PostId="2570" RevisionGUID="49c38ab5-3ab3-4bf7-8de7-ec5194610ba0" CreationDate="2022-05-12T20:25:39.177" UserId="28" Text="This error message comes from: https://github.com/paritytech/substrate/blob/master/frame/support/src/storage/unhashed.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Return the value of the item in storage under `key`, or `None` if there is no explicit entry.&#xD;&#xA;pub fn get&lt;T: Decode + Sized&gt;(key: &amp;[u8]) -&gt; Option&lt;T&gt; {&#xD;&#xA;	sp_io::storage::get(key).and_then(|val| {&#xD;&#xA;		Decode::decode(&amp;mut &amp;val[..]).map(Some).unwrap_or_else(|_| {&#xD;&#xA;			// TODO #3700: error should be handleable.&#xD;&#xA;			log::error!(&#xD;&#xA;				target: &quot;runtime::storage&quot;,&#xD;&#xA;				&quot;Corrupted state at {:?}&quot;,&#xD;&#xA;				key,&#xD;&#xA;			);&#xD;&#xA;			None&#xD;&#xA;		})&#xD;&#xA;	})&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;That hex is the storage key with the corrupted state.&#xD;&#xA;&#xD;&#xA;Turning the [array into a hex](https://www.shawntabrizi.com/substrate-js-utilities/) gives you:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9de1e86a9a8c739864cf3cc5ec2bea59fd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can then use an [index of storage keys](https://github.com/shawntabrizi/substrate-known-keys/blob/master/known-keys.json) to find a match.&#xD;&#xA;&#xD;&#xA;You may not find an exact match, but you can keep trimming the key from the end to see if a the prefix matches anything.&#xD;&#xA;&#xD;&#xA;From that you will find it matches:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;system account&quot;,&#xD;&#xA;  &quot;key&quot;: &quot;0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9&quot;&#xD;&#xA;},&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So this tells you that one of the accounts on your chain is not encoded correctly. Probably you did not migrate some change to the storage structure of an account.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9596" PostHistoryTypeId="2" PostId="2571" RevisionGUID="0eb21156-9dad-4b22-8a89-26bd22c58e81" CreationDate="2022-05-12T20:39:10.333" UserId="28" Text="Let's break it down:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub trait Config&lt;I: 'static = ()&gt;: frame_system::Config&#xD;&#xA;---------------- +++++++++++++++   xxxxxxxxxxxxxxxxxxxx&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 1. Every pallet has a `trait Config` which allows you to configure the requirements of that pallet. This should not be new to you, as every pallet has this.&#xD;&#xA;&#xD;&#xA; 2. Some pallets are configured to be [Instantiable](https://github.com/paritytech/substrate/blob/6c92fc317bb9dd0b11f4c436fae972bff4d58c66/frame/support/procedural/src/lib.rs#L241). This allows the same Pallet to be used multiple times in the same runtime. The extra `I` trait allows the user to do this, and by default, if the user does not implement `I`, it will automatically be implemented to `()` which is default.&#xD;&#xA;&#xD;&#xA;3. All pallets also require that they [inherit](https://users.rust-lang.org/t/extending-traits/1802) the `frame_system::Config` trait. This is also not new and something you will see in every pallet.&#xD;&#xA;&#xD;&#xA;You can see usage of instances in Polkadot, where the Collective Pallet is used twice for two different collectives:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub type CouncilCollective = pallet_collective::Instance1;&#xD;&#xA;impl pallet_collective::Config&lt;CouncilCollective&gt; for Runtime { ... }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;pub type TechnicalCollective = pallet_collective::Instance2;&#xD;&#xA;impl pallet_collective::Config&lt;TechnicalCollective&gt; for Runtime { ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the case of default these two forms of syntax are the same:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// these two lines are the same, and having both in&#xD;&#xA;// your code would trigger an duplication error.&#xD;&#xA;impl pallet_collective::Config for Runtime { ... }&#xD;&#xA;impl pallet_collective::Config&lt;()&gt; for Runtime { ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;See also: https://substrate.stackexchange.com/questions/2468/why-is-there-a-lifetime-generic-parameter-in-pallet-treasury/2481#2481" ContentLicense="CC BY-SA 4.0" />
  <row Id="9598" PostHistoryTypeId="6" PostId="2567" RevisionGUID="4306a315-2d38-4b04-852e-b933d2f48417" CreationDate="2022-05-12T20:41:40.413" UserId="28" Comment="edited tags" Text="|pallet|instantiable|trait|config|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9599" PostHistoryTypeId="2" PostId="2572" RevisionGUID="27a8b31f-8e67-4128-a4e3-337269ff8269" CreationDate="2022-05-12T21:38:46.637" UserId="590" Text="I will like to play with limiting the max size of transactions? I cannot find in substrate where those configurations go.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9601" PostHistoryTypeId="1" PostId="2572" RevisionGUID="27a8b31f-8e67-4128-a4e3-337269ff8269" CreationDate="2022-05-12T21:38:46.637" UserId="590" Text="How can I set the max byte size extrinsic/transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9602" PostHistoryTypeId="3" PostId="2572" RevisionGUID="27a8b31f-8e67-4128-a4e3-337269ff8269" CreationDate="2022-05-12T21:38:46.637" UserId="590" Text="|substrate-node|runtime|extrinsic|configuration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9603" PostHistoryTypeId="6" PostId="2572" RevisionGUID="42fe2027-14f2-4624-90e0-3786bca0342f" CreationDate="2022-05-12T21:48:49.517" UserId="28" Comment="edited tags" Text="|runtime|extrinsic|configuration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9604" PostHistoryTypeId="2" PostId="2573" RevisionGUID="0fc17297-d198-463e-962b-c058b7cf65d6" CreationDate="2022-05-12T22:04:16.357" UserId="28" Text="FRAME does not have a limit on a single transaction, but does have a limit for a single block. Then any transaction would be limited to the size limit of that block.&#xD;&#xA;&#xD;&#xA;You can find those settings in the `frame_system::Config` configuration, specifically the `BlockLength` configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// System configuration trait. Implemented by runtime.&#xD;&#xA;#[pallet::config]&#xD;&#xA;#[pallet::disable_frame_system_supertrait_check]&#xD;&#xA;pub trait Config: 'static + Eq + Clone {&#xD;&#xA;	/// The basic call filter to use in Origin. All origins are built with this filter as base,&#xD;&#xA;	/// except Root.&#xD;&#xA;	type BaseCallFilter: Contains&lt;Self::Call&gt;;&#xD;&#xA;&#xD;&#xA;	/// Block &amp; extrinsics weights: base values and limits.&#xD;&#xA;	#[pallet::constant]&#xD;&#xA;	type BlockWeights: Get&lt;limits::BlockWeights&gt;;&#xD;&#xA;&#xD;&#xA;	/// The maximum length of a block (in bytes).&#xD;&#xA;	#[pallet::constant]&#xD;&#xA;	type BlockLength: Get&lt;limits::BlockLength&gt;;&#xD;&#xA;&#xD;&#xA;    /// -- snip --&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The structure here: https://github.com/paritytech/substrate/blob/master/frame/system/src/limits.rs&#xD;&#xA;&#xD;&#xA;If you wanted to create some logic which rejects transactions based on their individual length, you could create a `SignedExtension`.&#xD;&#xA;&#xD;&#xA;An example of that can be found in the `example` pallet: https://github.com/paritytech/substrate/blob/master/frame/examples/basic/src/lib.rs#L674" ContentLicense="CC BY-SA 4.0" />
  <row Id="9606" PostHistoryTypeId="10" PostId="2555" RevisionGUID="5b1cf1dc-e93f-4af8-a1a0-2b329f652d66" CreationDate="2022-05-12T23:26:34.790" UserId="28" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="9607" PostHistoryTypeId="2" PostId="2574" RevisionGUID="2e6d7d31-0868-48f6-93d5-c568b7487a85" CreationDate="2022-05-12T23:56:28.397" UserId="590" Text="I came across the following substrate recipe [Cache Multiple Calls][1]&#xD;&#xA;&#xD;&#xA;that explains how we can cache multiple reads by cloning the value or copying. Is this still a valid recipe?&#xD;&#xA;&#xD;&#xA;My understanding is that multiple reads are cached as described in the [documentation][1]:&#xD;&#xA;&#xD;&#xA;&gt;Multiple reads of the same value count as one read.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To drive the point home how many reads and writes are below?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;    ...&#xD;&#xA;   &#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn get_account)]&#xD;&#xA;	pub type AccountOf&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Blake2_128Concat, T::AccountId, Details&lt;T::BlockNumber&gt;, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   #[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;       fn no_cache(origin: OriginFor&lt;T&gt;, other: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;          let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;          let mut account_call_1 = Self::get_account(who).ok_or(Error::&lt;T&gt;::DoesNoExist)?;&#xD;&#xA;          account_call_1.count.checked_add(1).ok_or(Error::&lt;T&gt;::Overflow)?;&#xD;&#xA;          AccountOf::&lt;T&gt;::insert(account_call_1);&#xD;&#xA;    &#xD;&#xA;          let mut other_call_1 = Self::get_account(other).ok_or(Error::&lt;T&gt;::DoesNoExist);&#xD;&#xA;          other_call_1.count.checked_add(1).ok_or(Error::&lt;T&gt;::Overflow)?;&#xD;&#xA;          AccountOf::&lt;T&gt;::insert(other_call_1);&#xD;&#xA;&#xD;&#xA;          let account_call_2 = Self::get_account(who).ok_or(Error::&lt;T&gt;::DoesNoExist);&#xD;&#xA;          let other_call_2 = Self::get_account(other).ok_or(Error::&lt;T&gt;::DoesNoExist);          &#xD;&#xA;     }    &#xD;&#xA;&#xD;&#xA;   }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.recipes/cache.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="9609" PostHistoryTypeId="1" PostId="2574" RevisionGUID="2e6d7d31-0868-48f6-93d5-c568b7487a85" CreationDate="2022-05-12T23:56:28.397" UserId="590" Text="Clarity on storage read/write caching" ContentLicense="CC BY-SA 4.0" />
  <row Id="9610" PostHistoryTypeId="3" PostId="2574" RevisionGUID="2e6d7d31-0868-48f6-93d5-c568b7487a85" CreationDate="2022-05-12T23:56:28.397" UserId="590" Text="|substrate-node|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9611" PostHistoryTypeId="6" PostId="2545" RevisionGUID="3e67d29d-d1fb-46a3-aa3e-a1aa2e391056" CreationDate="2022-05-13T00:22:02.987" UserId="29" Comment="edited tags" Text="|statemint|uniques|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9612" PostHistoryTypeId="5" PostId="2545" RevisionGUID="3e67d29d-d1fb-46a3-aa3e-a1aa2e391056" CreationDate="2022-05-13T00:22:02.987" UserId="29" Comment="edited tags" Text="How to create nft in statemint in javascript.and how to set the nft images. can any one provide the example. my test code go wrong.&#xD;&#xA;```&#xD;&#xA; const wsProvider = new polkadot.WsProvider(&quot;wss://westmint-rpc.polkadot.io&quot;);&#xD;&#xA; const api = await polkadot.ApiPromise.create({provider:wsProvider});&#xD;&#xA;&#xD;&#xA;let tx = api.tx.utility.batchAll([&#xD;&#xA;  api.tx.uniques.create(classId, ADDR_1);&#xD;&#xA;  api.tx.uniques.setAttribute(classId, null,&quot;Link&quot;,&quot;https://cloudflare-ipfs.com/ipfs/QmRdpVRCLxN51vNnYCRr2is1w6UVpT3mR8YDov9ktPmKub&quot;), // this tx will crash&#xD;&#xA;    ]);&#xD;&#xA;tx.signAndSend(pair);&#xD;&#xA;  &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9613" PostHistoryTypeId="4" PostId="2545" RevisionGUID="3e67d29d-d1fb-46a3-aa3e-a1aa2e391056" CreationDate="2022-05-13T00:22:02.987" UserId="29" Comment="edited tags" Text="How to create NFT in Statemint?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9614" PostHistoryTypeId="2" PostId="2575" RevisionGUID="1aef43c4-ff51-4417-b219-7a2375cae172" CreationDate="2022-05-13T00:22:57.607" UserId="29" Text="You are hitting the [`ValueLimit`](https://github.com/paritytech/cumulus/blob/master/polkadot-parachains/westmint/src/lib.rs#L498):&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub const ValueLimit: u32 = 64;	// Max 64 bytes per value&#xD;&#xA;```&#xD;&#xA;Try shortening the URL and see if it works." ContentLicense="CC BY-SA 4.0" />
  <row Id="9616" PostHistoryTypeId="2" PostId="2576" RevisionGUID="a1c85727-248e-42cb-8e25-a92ce9611dac" CreationDate="2022-05-13T02:14:11.490" UserId="2529" Text="i have not found the examples to teleport between statemint and polkadot. is ther any one can give some examples in javascript.what i use is &#xD;&#xA;```&#xD;&#xA;@polkadot/api&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9618" PostHistoryTypeId="1" PostId="2576" RevisionGUID="a1c85727-248e-42cb-8e25-a92ce9611dac" CreationDate="2022-05-13T02:14:11.490" UserId="2529" Text="how to teleport assets between statemint and polkadot in javascript" ContentLicense="CC BY-SA 4.0" />
  <row Id="9619" PostHistoryTypeId="3" PostId="2576" RevisionGUID="a1c85727-248e-42cb-8e25-a92ce9611dac" CreationDate="2022-05-13T02:14:11.490" UserId="2529" Text="|polkadot-js|statemint|teleport|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9620" PostHistoryTypeId="5" PostId="2565" RevisionGUID="83967e30-5af4-435d-8fff-a090595ec199" CreationDate="2022-05-13T03:45:10.453" UserId="1789" Comment="added 287 characters in body" Text="Originally I had this network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/paritypr/polkadot-debug:master&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 100&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;and my test file:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z01-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 100 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 100 block height is at least 6 within 150 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# histogram&#xD;&#xA;#alice: reports histogram polkadot_pvf_execution_time has at least 2 samples in buckets [&quot;0.1&quot;, &quot;0.25&quot;, &quot;0.5&quot;, &quot;+Inf&quot;] within 100 seconds&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;The test ran successfully.&#xD;&#xA;&#xD;&#xA;Then I changed the parachain id from 100 to 2000 in my network definition file:&#xD;&#xA;```&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;```&#xD;&#xA;and changed it in my test file&#xD;&#xA;```&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;```&#xD;&#xA;then block height test failed !!!??? What happened?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    ✔ alice: is up (159ms)&#xD;&#xA;    ✔ bob: is up (93ms)&#xD;&#xA;2022-05-12 21:43:44        API/INIT: RPC methods not decorated: beefy_getFinalizedHead, mmr_generateBatchProof, state_trieMigrationStatus&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (3035ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (194ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (195ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (123ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-12 21:46:18        API/INIT: RPC methods not decorated: beefy_getFinalizedHead, mmr_generateBatchProof, state_trieMigrationStatus&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-12 21:46:38        API/INIT: RPC methods not decorated: beefy_getFinalizedHead, mmr_generateBatchProof, state_trieMigrationStatus&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-540455ef8ad2e803ca8f34df7aba359c_-267460-xyaOcnkB7UwG/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-12 21:46:48        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:41881: 1000:: Normal connection closure&#xD;&#xA;2022-05-12 21:46:55        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: disconnected from ws://127.0.0.1:41881: 1006:: Connection dropped by remote peer.&#xD;&#xA;2022-05-12 21:46:55        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:41881: 1006:: Connection dropped by remote peer.&#xD;&#xA;child process exited&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  8 passing (6m)&#xD;&#xA;  3 failing&#xD;&#xA;&#xD;&#xA;  1) small network( Small Network test )&#xD;&#xA;       alice: parachain 2000 block height is at least 6 within 150 seconds:&#xD;&#xA;&#xD;&#xA;      AssertionError: expected 0 to be at least 6&#xD;&#xA;      + expected - actual&#xD;&#xA;&#xD;&#xA;      -0&#xD;&#xA;      +6&#xD;&#xA;      &#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:265:37&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  2) small network( Small Network test )&#xD;&#xA;       bob: system event contains &quot;A candidate was included&quot; within 20 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;      at runNextTicks (node:internal/process/task_queues:61:5)&#xD;&#xA;      at processTimers (node:internal/timers:497:9)&#xD;&#xA;&#xD;&#xA;  3) small network( Small Network test )&#xD;&#xA;       alice: system event matches glob &quot;*was backed*&quot; within 10 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is wrong?&#xD;&#xA;&#xD;&#xA;I think I got some clues from the collor01 log:&#xD;&#xA;```&#xD;&#xA;kubectl logs -f collator01 -c collator01 -n zombie-540455ef8...&#xD;&#xA;```&#xD;&#xA;The collator logs:&#xD;&#xA;```&#xD;&#xA;2022-05-12 13:43:53  Highest known block at #0    &#xD;&#xA;2022-05-12 13:43:53 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-05-12 13:43:53 Running JSON-RPC HTTP server: addr=0.0.0.0:9933, allowed origins=None    &#xD;&#xA;2022-05-12 13:43:53 Running JSON-RPC WS server: addr=0.0.0.0:9944, allowed origins=None    &#xD;&#xA;2022-05-12 13:43:53 Running adder collator for parachain id: 100    &#xD;&#xA;2022-05-12 13:43:53 Genesis state: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000011b4d03dd8c01f1049143cf9c4c817e4b167f1d1b83e5c6f0f10d89ba1e7bce    &#xD;&#xA;2022-05-12 13:43:53 Validation code: 0x52bc537646db8e0528b52ffd&#xD;&#xA;```&#xD;&#xA;Can you see `parachain id: 100` from above log? ... That is not correct! It should have been 2000!&#xD;&#xA;&#xD;&#xA;Then the logs continue:&#xD;&#xA;```&#xD;&#xA;2022-05-12 13:43:53  New epoch 0 launching at block 0x71a4…bf72 (block slot 275393835 &gt;= start slot 275393835).    &#xD;&#xA;2022-05-12 13:43:53  Next epoch starts at slot 275393845    &#xD;&#xA;2022-05-12 13:43:53 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #1 (0x71a4…bf72)    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #2 (0xbdb6…88d8)    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #3 (0xd762…e188)    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #4 (0x3d10…f120)    &#xD;&#xA;2022-05-12 13:43:54 ✨ Imported #5 (0x829d…0813)    &#xD;&#xA;2022-05-12 13:43:58  Idle (2 peers), best: #5 (0x829d…0813), finalized #2 (0xbdb6…88d8), ⬇ 4.1kiB/s ⬆ 3.1kiB/s    &#xD;&#xA;2022-05-12 13:44:00 ✨ Imported #6 (0xf678…876a)    &#xD;&#xA;2022-05-12 13:44:03  Idle (2 peers), best: #6 (0xf678…876a), finalized #2 (0xbdb6…88d8), ⬇ 0.6kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:06 ✨ Imported #7 (0x52b3…2894)    &#xD;&#xA;2022-05-12 13:44:08  Idle (2 peers), best: #7 (0x52b3…2894), finalized #4 (0x3d10…f120), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:44:12 ✨ Imported #8 (0x67d0…b6ea)    &#xD;&#xA;2022-05-12 13:44:13  Idle (2 peers), best: #8 (0x67d0…b6ea), finalized #4 (0x3d10…f120), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:44:18 ✨ Imported #9 (0x3fa7…f515)    &#xD;&#xA;2022-05-12 13:44:18 ✨ Imported #9 (0x802e…c090)    &#xD;&#xA;2022-05-12 13:44:18  Idle (2 peers), best: #9 (0x3fa7…f515), finalized #5 (0x829d…0813), ⬇ 1.1kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:23  Idle (2 peers), best: #9 (0x3fa7…f515), finalized #6 (0xf678…876a), ⬇ 0.3kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-05-12 13:44:24 ✨ Imported #10 (0x2141…a0f2)    &#xD;&#xA;2022-05-12 13:44:28  Idle (2 peers), best: #10 (0x2141…a0f2), finalized #6 (0xf678…876a), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:44:30  New epoch 1 launching at block 0x79b1…6fe6 (block slot 275393845 &gt;= start slot 275393845).    &#xD;&#xA;2022-05-12 13:44:30  Next epoch starts at slot 275393855    &#xD;&#xA;2022-05-12 13:44:30 ✨ Imported #11 (0x79b1…6fe6)    &#xD;&#xA;2022-05-12 13:44:30 Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 0, new_window_start: 0, new_window_end: 1 }&#xD;&#xA;2022-05-12 13:44:33  Idle (2 peers), best: #11 (0x79b1…6fe6), finalized #8 (0x67d0…b6ea), ⬇ 0.8kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:36 ✨ Imported #12 (0x5d1b…193a)    &#xD;&#xA;2022-05-12 13:44:38  Idle (2 peers), best: #12 (0x5d1b…193a), finalized #9 (0x3fa7…f515), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:42 ✨ Imported #13 (0x2bbe…b677)    &#xD;&#xA;2022-05-12 13:44:43  Idle (2 peers), best: #13 (0x2bbe…b677), finalized #9 (0x3fa7…f515), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:48 ✨ Imported #14 (0xe1fd…55f4)    &#xD;&#xA;2022-05-12 13:44:48  Idle (2 peers), best: #14 (0xe1fd…55f4), finalized #10 (0x2141…a0f2), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:44:53  Idle (2 peers), best: #14 (0xe1fd…55f4), finalized #10 (0x2141…a0f2), ⬇ 0.1kiB/s ⬆ 0.1kiB/s    &#xD;&#xA;2022-05-12 13:44:54 ✨ Imported #15 (0xef73…58aa)    &#xD;&#xA;2022-05-12 13:44:58  Idle (2 peers), best: #15 (0xef73…58aa), finalized #12 (0x5d1b…193a), ⬇ 1.0kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-05-12 13:45:00 ✨ Imported #16 (0xe38e…e485)    &#xD;&#xA;2022-05-12 13:45:03  Idle (2 peers), best: #16 (0xe38e…e485), finalized #13 (0x2bbe…b677), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:06 ✨ Imported #17 (0xa379…9ad5)    &#xD;&#xA;2022-05-12 13:45:08  Idle (2 peers), best: #17 (0xa379…9ad5), finalized #13 (0x2bbe…b677), ⬇ 0.5kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:45:12 ✨ Imported #18 (0x6eaf…c841)    &#xD;&#xA;2022-05-12 13:45:13  Idle (2 peers), best: #18 (0x6eaf…c841), finalized #14 (0xe1fd…55f4), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:45:18 ✨ Imported #19 (0x0359…55b3)    &#xD;&#xA;2022-05-12 13:45:18  Idle (2 peers), best: #19 (0x0359…55b3), finalized #16 (0xe38e…e485), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:23  Idle (2 peers), best: #19 (0x0359…55b3), finalized #16 (0xe38e…e485), ⬇ 0.1kiB/s ⬆ 0.1kiB/s    &#xD;&#xA;2022-05-12 13:45:24 ✨ Imported #20 (0x247a…3829)    &#xD;&#xA;2022-05-12 13:45:28  Idle (2 peers), best: #20 (0x247a…3829), finalized #17 (0xa379…9ad5), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:45:30  New epoch 2 launching at block 0xa37b…ff93 (block slot 275393855 &gt;= start slot 275393855).    &#xD;&#xA;2022-05-12 13:45:30  Next epoch starts at slot 275393865    &#xD;&#xA;2022-05-12 13:45:30 ✨ Imported #21 (0xa37b…ff93)    &#xD;&#xA;2022-05-12 13:45:30 Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 1, new_window_start: 0, new_window_end: 2 }&#xD;&#xA;2022-05-12 13:45:33  Idle (2 peers), best: #21 (0xa37b…ff93), finalized #17 (0xa379…9ad5), ⬇ 0.9kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-05-12 13:45:36 ✨ Imported #22 (0xa43c…2cac)    &#xD;&#xA;2022-05-12 13:45:38  Idle (2 peers), best: #22 (0xa43c…2cac), finalized #18 (0x6eaf…c841), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:42 ✨ Imported #23 (0x4cfd…b4da)    &#xD;&#xA;2022-05-12 13:45:42 ✨ Imported #23 (0x068d…70fe)    &#xD;&#xA;2022-05-12 13:45:43  Idle (2 peers), best: #23 (0x4cfd…b4da), finalized #20 (0x247a…3829), ⬇ 1.2kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:48 ✨ Imported #24 (0xb9b6…778e)    &#xD;&#xA;2022-05-12 13:45:48  Idle (2 peers), best: #24 (0xb9b6…778e), finalized #20 (0x247a…3829), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:45:49  Applying authority set change scheduled at block #21    &#xD;&#xA;2022-05-12 13:45:49  Applying GRANDPA set change to new set [(Public(a40f9c22185e85da8b7bd994b4305dbdab004da2288cc77061cb216bb264f0cc (5FmpM6me...)), 1), (Public(e922806258d9c1257d168f05bdbaa87e33c0e90bc38803c9af6c56dbf0206898 (5HLPGEGr...)), 1)]    &#xD;&#xA;2022-05-12 13:45:53  Idle (2 peers), best: #24 (0xb9b6…778e), finalized #21 (0xa37b…ff93), ⬇ 0.2kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-05-12 13:45:54 ✨ Imported #25 (0x4d0f…3ccb)    &#xD;&#xA;2022-05-12 13:45:58  Idle (2 peers), best: #25 (0x4d0f…3ccb), finalized #22 (0xa43c…2cac), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:46:00 ✨ Imported #26 (0xc6a3…c6cf)    &#xD;&#xA;2022-05-12 13:46:03  Idle (2 peers), best: #26 (0xc6a3…c6cf), finalized #22 (0xa43c…2cac), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:46:06 ✨ Imported #27 (0xae85…8571)    &#xD;&#xA;2022-05-12 13:46:08  Idle (2 peers), best: #27 (0xae85…8571), finalized #24 (0xb9b6…778e), ⬇ 0.5kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:12 ✨ Imported #28 (0x9d19…13c4)    &#xD;&#xA;2022-05-12 13:46:13  Idle (2 peers), best: #28 (0x9d19…13c4), finalized #24 (0xb9b6…778e), ⬇ 0.7kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:18 ✨ Imported #29 (0xf8c2…4e06)    &#xD;&#xA;2022-05-12 13:46:18 ✨ Imported #29 (0x59aa…25c4)    &#xD;&#xA;2022-05-12 13:46:18  Idle (2 peers), best: #29 (0xf8c2…4e06), finalized #25 (0x4d0f…3ccb), ⬇ 1.3kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:46:23  Idle (2 peers), best: #29 (0xf8c2…4e06), finalized #26 (0xc6a3…c6cf), ⬇ 0.3kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-05-12 13:46:24 ✨ Imported #30 (0x1299…4771)    &#xD;&#xA;2022-05-12 13:46:28  Idle (2 peers), best: #30 (0x1299…4771), finalized #26 (0xc6a3…c6cf), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:30  New epoch 3 launching at block 0x0c6a…262c (block slot 275393865 &gt;= start slot 275393865).    &#xD;&#xA;2022-05-12 13:46:30  Next epoch starts at slot 275393875    &#xD;&#xA;2022-05-12 13:46:30 ✨ Imported #31 (0x0c6a…262c)    &#xD;&#xA;2022-05-12 13:46:30 Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 2, new_window_start: 0, new_window_end: 3 }&#xD;&#xA;2022-05-12 13:46:33  Idle (2 peers), best: #31 (0x0c6a…262c), finalized #28 (0x9d19…13c4), ⬇ 1.0kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-05-12 13:46:36 ✨ Imported #32 (0x0e5a…2db8)    &#xD;&#xA;2022-05-12 13:46:38  Idle (2 peers), best: #32 (0x0e5a…2db8), finalized #29 (0xf8c2…4e06), ⬇ 1.0kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:46:42 ✨ Imported #33 (0x9cd3…0317)    &#xD;&#xA;2022-05-12 13:46:42 ✨ Imported #33 (0x0f64…393a)    &#xD;&#xA;2022-05-12 13:46:43  Idle (2 peers), best: #33 (0x9cd3…0317), finalized #29 (0xf8c2…4e06), ⬇ 1.2kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:46:48 ♻️  Reorg on #33,0x9cd3…0317 to #34,0x8365…1cb9, common ancestor #32,0x0e5a…2db8    &#xD;&#xA;2022-05-12 13:46:48 ✨ Imported #34 (0x8365…1cb9)    &#xD;&#xA;2022-05-12 13:46:48  Idle (2 peers), best: #34 (0x8365…1cb9), finalized #30 (0x1299…4771), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:53  Idle (2 peers), best: #34 (0x8365…1cb9), finalized #30 (0x1299…4771), ⬇ 0.3kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:53  Applying authority set change scheduled at block #31    &#xD;&#xA;```&#xD;&#xA;I can see `Imported #33` so the parachain collator had been producing many blocks.&#xD;&#xA;&#xD;&#xA;So why the block height test failed???&#xD;&#xA;&#xD;&#xA;I am using the latest zombienet-linux  v1.2.32&#xD;&#xA;&#xD;&#xA;[Solution] add this line: `args = [&quot;--parachain-id 2000&quot;]` so parachain setting is:&#xD;&#xA;```&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="9621" PostHistoryTypeId="5" PostId="2565" RevisionGUID="e3c62836-9ccd-4488-b4e0-8f25360efea3" CreationDate="2022-05-13T06:35:25.447" UserId="1789" Comment="deleted 287 characters in body" Text="Originally I had this network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/paritypr/polkadot-debug:master&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 100&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;and my test file:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z01-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 100 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 100 block height is at least 6 within 150 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# histogram&#xD;&#xA;#alice: reports histogram polkadot_pvf_execution_time has at least 2 samples in buckets [&quot;0.1&quot;, &quot;0.25&quot;, &quot;0.5&quot;, &quot;+Inf&quot;] within 100 seconds&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;The test ran successfully.&#xD;&#xA;&#xD;&#xA;Then I changed the parachain id from 100 to 2000 in my network definition file:&#xD;&#xA;```&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;```&#xD;&#xA;and changed it in my test file&#xD;&#xA;```&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;```&#xD;&#xA;then block height test failed !!!??? What happened?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    ✔ alice: is up (159ms)&#xD;&#xA;    ✔ bob: is up (93ms)&#xD;&#xA;2022-05-12 21:43:44        API/INIT: RPC methods not decorated: beefy_getFinalizedHead, mmr_generateBatchProof, state_trieMigrationStatus&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (3035ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (194ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (195ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (123ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-12 21:46:18        API/INIT: RPC methods not decorated: beefy_getFinalizedHead, mmr_generateBatchProof, state_trieMigrationStatus&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-12 21:46:38        API/INIT: RPC methods not decorated: beefy_getFinalizedHead, mmr_generateBatchProof, state_trieMigrationStatus&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-540455ef8ad2e803ca8f34df7aba359c_-267460-xyaOcnkB7UwG/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-12 21:46:48        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:41881: 1000:: Normal connection closure&#xD;&#xA;2022-05-12 21:46:55        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: disconnected from ws://127.0.0.1:41881: 1006:: Connection dropped by remote peer.&#xD;&#xA;2022-05-12 21:46:55        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:41881: 1006:: Connection dropped by remote peer.&#xD;&#xA;child process exited&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  8 passing (6m)&#xD;&#xA;  3 failing&#xD;&#xA;&#xD;&#xA;  1) small network( Small Network test )&#xD;&#xA;       alice: parachain 2000 block height is at least 6 within 150 seconds:&#xD;&#xA;&#xD;&#xA;      AssertionError: expected 0 to be at least 6&#xD;&#xA;      + expected - actual&#xD;&#xA;&#xD;&#xA;      -0&#xD;&#xA;      +6&#xD;&#xA;      &#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:265:37&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  2) small network( Small Network test )&#xD;&#xA;       bob: system event contains &quot;A candidate was included&quot; within 20 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;      at runNextTicks (node:internal/process/task_queues:61:5)&#xD;&#xA;      at processTimers (node:internal/timers:497:9)&#xD;&#xA;&#xD;&#xA;  3) small network( Small Network test )&#xD;&#xA;       alice: system event matches glob &quot;*was backed*&quot; within 10 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is wrong?&#xD;&#xA;&#xD;&#xA;I think I got some clues from the collor01 log:&#xD;&#xA;```&#xD;&#xA;kubectl logs -f collator01 -c collator01 -n zombie-540455ef8...&#xD;&#xA;```&#xD;&#xA;The collator logs:&#xD;&#xA;```&#xD;&#xA;2022-05-12 13:43:53  Highest known block at #0    &#xD;&#xA;2022-05-12 13:43:53 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-05-12 13:43:53 Running JSON-RPC HTTP server: addr=0.0.0.0:9933, allowed origins=None    &#xD;&#xA;2022-05-12 13:43:53 Running JSON-RPC WS server: addr=0.0.0.0:9944, allowed origins=None    &#xD;&#xA;2022-05-12 13:43:53 Running adder collator for parachain id: 100    &#xD;&#xA;2022-05-12 13:43:53 Genesis state: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000011b4d03dd8c01f1049143cf9c4c817e4b167f1d1b83e5c6f0f10d89ba1e7bce    &#xD;&#xA;2022-05-12 13:43:53 Validation code: 0x52bc537646db8e0528b52ffd&#xD;&#xA;```&#xD;&#xA;Can you see `parachain id: 100` from above log? ... That is not correct! It should have been 2000!&#xD;&#xA;&#xD;&#xA;Then the logs continue:&#xD;&#xA;```&#xD;&#xA;2022-05-12 13:43:53  New epoch 0 launching at block 0x71a4…bf72 (block slot 275393835 &gt;= start slot 275393835).    &#xD;&#xA;2022-05-12 13:43:53  Next epoch starts at slot 275393845    &#xD;&#xA;2022-05-12 13:43:53 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #1 (0x71a4…bf72)    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #2 (0xbdb6…88d8)    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #3 (0xd762…e188)    &#xD;&#xA;2022-05-12 13:43:53 ✨ Imported #4 (0x3d10…f120)    &#xD;&#xA;2022-05-12 13:43:54 ✨ Imported #5 (0x829d…0813)    &#xD;&#xA;2022-05-12 13:43:58  Idle (2 peers), best: #5 (0x829d…0813), finalized #2 (0xbdb6…88d8), ⬇ 4.1kiB/s ⬆ 3.1kiB/s    &#xD;&#xA;2022-05-12 13:44:00 ✨ Imported #6 (0xf678…876a)    &#xD;&#xA;2022-05-12 13:44:03  Idle (2 peers), best: #6 (0xf678…876a), finalized #2 (0xbdb6…88d8), ⬇ 0.6kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:06 ✨ Imported #7 (0x52b3…2894)    &#xD;&#xA;2022-05-12 13:44:08  Idle (2 peers), best: #7 (0x52b3…2894), finalized #4 (0x3d10…f120), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:44:12 ✨ Imported #8 (0x67d0…b6ea)    &#xD;&#xA;2022-05-12 13:44:13  Idle (2 peers), best: #8 (0x67d0…b6ea), finalized #4 (0x3d10…f120), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:44:18 ✨ Imported #9 (0x3fa7…f515)    &#xD;&#xA;2022-05-12 13:44:18 ✨ Imported #9 (0x802e…c090)    &#xD;&#xA;2022-05-12 13:44:18  Idle (2 peers), best: #9 (0x3fa7…f515), finalized #5 (0x829d…0813), ⬇ 1.1kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:23  Idle (2 peers), best: #9 (0x3fa7…f515), finalized #6 (0xf678…876a), ⬇ 0.3kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-05-12 13:44:24 ✨ Imported #10 (0x2141…a0f2)    &#xD;&#xA;2022-05-12 13:44:28  Idle (2 peers), best: #10 (0x2141…a0f2), finalized #6 (0xf678…876a), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:44:30  New epoch 1 launching at block 0x79b1…6fe6 (block slot 275393845 &gt;= start slot 275393845).    &#xD;&#xA;2022-05-12 13:44:30  Next epoch starts at slot 275393855    &#xD;&#xA;2022-05-12 13:44:30 ✨ Imported #11 (0x79b1…6fe6)    &#xD;&#xA;2022-05-12 13:44:30 Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 0, new_window_start: 0, new_window_end: 1 }&#xD;&#xA;2022-05-12 13:44:33  Idle (2 peers), best: #11 (0x79b1…6fe6), finalized #8 (0x67d0…b6ea), ⬇ 0.8kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:36 ✨ Imported #12 (0x5d1b…193a)    &#xD;&#xA;2022-05-12 13:44:38  Idle (2 peers), best: #12 (0x5d1b…193a), finalized #9 (0x3fa7…f515), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:42 ✨ Imported #13 (0x2bbe…b677)    &#xD;&#xA;2022-05-12 13:44:43  Idle (2 peers), best: #13 (0x2bbe…b677), finalized #9 (0x3fa7…f515), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:44:48 ✨ Imported #14 (0xe1fd…55f4)    &#xD;&#xA;2022-05-12 13:44:48  Idle (2 peers), best: #14 (0xe1fd…55f4), finalized #10 (0x2141…a0f2), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:44:53  Idle (2 peers), best: #14 (0xe1fd…55f4), finalized #10 (0x2141…a0f2), ⬇ 0.1kiB/s ⬆ 0.1kiB/s    &#xD;&#xA;2022-05-12 13:44:54 ✨ Imported #15 (0xef73…58aa)    &#xD;&#xA;2022-05-12 13:44:58  Idle (2 peers), best: #15 (0xef73…58aa), finalized #12 (0x5d1b…193a), ⬇ 1.0kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-05-12 13:45:00 ✨ Imported #16 (0xe38e…e485)    &#xD;&#xA;2022-05-12 13:45:03  Idle (2 peers), best: #16 (0xe38e…e485), finalized #13 (0x2bbe…b677), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:06 ✨ Imported #17 (0xa379…9ad5)    &#xD;&#xA;2022-05-12 13:45:08  Idle (2 peers), best: #17 (0xa379…9ad5), finalized #13 (0x2bbe…b677), ⬇ 0.5kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:45:12 ✨ Imported #18 (0x6eaf…c841)    &#xD;&#xA;2022-05-12 13:45:13  Idle (2 peers), best: #18 (0x6eaf…c841), finalized #14 (0xe1fd…55f4), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:45:18 ✨ Imported #19 (0x0359…55b3)    &#xD;&#xA;2022-05-12 13:45:18  Idle (2 peers), best: #19 (0x0359…55b3), finalized #16 (0xe38e…e485), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:23  Idle (2 peers), best: #19 (0x0359…55b3), finalized #16 (0xe38e…e485), ⬇ 0.1kiB/s ⬆ 0.1kiB/s    &#xD;&#xA;2022-05-12 13:45:24 ✨ Imported #20 (0x247a…3829)    &#xD;&#xA;2022-05-12 13:45:28  Idle (2 peers), best: #20 (0x247a…3829), finalized #17 (0xa379…9ad5), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:45:30  New epoch 2 launching at block 0xa37b…ff93 (block slot 275393855 &gt;= start slot 275393855).    &#xD;&#xA;2022-05-12 13:45:30  Next epoch starts at slot 275393865    &#xD;&#xA;2022-05-12 13:45:30 ✨ Imported #21 (0xa37b…ff93)    &#xD;&#xA;2022-05-12 13:45:30 Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 1, new_window_start: 0, new_window_end: 2 }&#xD;&#xA;2022-05-12 13:45:33  Idle (2 peers), best: #21 (0xa37b…ff93), finalized #17 (0xa379…9ad5), ⬇ 0.9kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-05-12 13:45:36 ✨ Imported #22 (0xa43c…2cac)    &#xD;&#xA;2022-05-12 13:45:38  Idle (2 peers), best: #22 (0xa43c…2cac), finalized #18 (0x6eaf…c841), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:42 ✨ Imported #23 (0x4cfd…b4da)    &#xD;&#xA;2022-05-12 13:45:42 ✨ Imported #23 (0x068d…70fe)    &#xD;&#xA;2022-05-12 13:45:43  Idle (2 peers), best: #23 (0x4cfd…b4da), finalized #20 (0x247a…3829), ⬇ 1.2kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:45:48 ✨ Imported #24 (0xb9b6…778e)    &#xD;&#xA;2022-05-12 13:45:48  Idle (2 peers), best: #24 (0xb9b6…778e), finalized #20 (0x247a…3829), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:45:49  Applying authority set change scheduled at block #21    &#xD;&#xA;2022-05-12 13:45:49  Applying GRANDPA set change to new set [(Public(a40f9c22185e85da8b7bd994b4305dbdab004da2288cc77061cb216bb264f0cc (5FmpM6me...)), 1), (Public(e922806258d9c1257d168f05bdbaa87e33c0e90bc38803c9af6c56dbf0206898 (5HLPGEGr...)), 1)]    &#xD;&#xA;2022-05-12 13:45:53  Idle (2 peers), best: #24 (0xb9b6…778e), finalized #21 (0xa37b…ff93), ⬇ 0.2kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-05-12 13:45:54 ✨ Imported #25 (0x4d0f…3ccb)    &#xD;&#xA;2022-05-12 13:45:58  Idle (2 peers), best: #25 (0x4d0f…3ccb), finalized #22 (0xa43c…2cac), ⬇ 0.8kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:46:00 ✨ Imported #26 (0xc6a3…c6cf)    &#xD;&#xA;2022-05-12 13:46:03  Idle (2 peers), best: #26 (0xc6a3…c6cf), finalized #22 (0xa43c…2cac), ⬇ 0.7kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:46:06 ✨ Imported #27 (0xae85…8571)    &#xD;&#xA;2022-05-12 13:46:08  Idle (2 peers), best: #27 (0xae85…8571), finalized #24 (0xb9b6…778e), ⬇ 0.5kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:12 ✨ Imported #28 (0x9d19…13c4)    &#xD;&#xA;2022-05-12 13:46:13  Idle (2 peers), best: #28 (0x9d19…13c4), finalized #24 (0xb9b6…778e), ⬇ 0.7kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:18 ✨ Imported #29 (0xf8c2…4e06)    &#xD;&#xA;2022-05-12 13:46:18 ✨ Imported #29 (0x59aa…25c4)    &#xD;&#xA;2022-05-12 13:46:18  Idle (2 peers), best: #29 (0xf8c2…4e06), finalized #25 (0x4d0f…3ccb), ⬇ 1.3kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:46:23  Idle (2 peers), best: #29 (0xf8c2…4e06), finalized #26 (0xc6a3…c6cf), ⬇ 0.3kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-05-12 13:46:24 ✨ Imported #30 (0x1299…4771)    &#xD;&#xA;2022-05-12 13:46:28  Idle (2 peers), best: #30 (0x1299…4771), finalized #26 (0xc6a3…c6cf), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:30  New epoch 3 launching at block 0x0c6a…262c (block slot 275393865 &gt;= start slot 275393865).    &#xD;&#xA;2022-05-12 13:46:30  Next epoch starts at slot 275393875    &#xD;&#xA;2022-05-12 13:46:30 ✨ Imported #31 (0x0c6a…262c)    &#xD;&#xA;2022-05-12 13:46:30 Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 2, new_window_start: 0, new_window_end: 3 }&#xD;&#xA;2022-05-12 13:46:33  Idle (2 peers), best: #31 (0x0c6a…262c), finalized #28 (0x9d19…13c4), ⬇ 1.0kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-05-12 13:46:36 ✨ Imported #32 (0x0e5a…2db8)    &#xD;&#xA;2022-05-12 13:46:38  Idle (2 peers), best: #32 (0x0e5a…2db8), finalized #29 (0xf8c2…4e06), ⬇ 1.0kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-05-12 13:46:42 ✨ Imported #33 (0x9cd3…0317)    &#xD;&#xA;2022-05-12 13:46:42 ✨ Imported #33 (0x0f64…393a)    &#xD;&#xA;2022-05-12 13:46:43  Idle (2 peers), best: #33 (0x9cd3…0317), finalized #29 (0xf8c2…4e06), ⬇ 1.2kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-05-12 13:46:48 ♻️  Reorg on #33,0x9cd3…0317 to #34,0x8365…1cb9, common ancestor #32,0x0e5a…2db8    &#xD;&#xA;2022-05-12 13:46:48 ✨ Imported #34 (0x8365…1cb9)    &#xD;&#xA;2022-05-12 13:46:48  Idle (2 peers), best: #34 (0x8365…1cb9), finalized #30 (0x1299…4771), ⬇ 0.6kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:53  Idle (2 peers), best: #34 (0x8365…1cb9), finalized #30 (0x1299…4771), ⬇ 0.3kiB/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-05-12 13:46:53  Applying authority set change scheduled at block #31    &#xD;&#xA;```&#xD;&#xA;I can see `Imported #33` so the parachain collator had been producing many blocks.&#xD;&#xA;&#xD;&#xA;So why the block height test failed???&#xD;&#xA;&#xD;&#xA;I am using the latest zombienet-linux  v1.2.32" ContentLicense="CC BY-SA 4.0" />
  <row Id="9623" PostHistoryTypeId="2" PostId="2577" RevisionGUID="0ca358ad-9b50-459e-b164-3df3801627d8" CreationDate="2022-05-13T06:50:14.197" UserId="1789" Text="add this line: `args = [&quot;--parachain-id 2000&quot;]` so network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="9625" PostHistoryTypeId="2" PostId="2578" RevisionGUID="f23a4399-d58c-4b67-af1a-080b7e4498d6" CreationDate="2022-05-13T07:49:49.627" UserId="1789" Text="previously I could run my tests including colander parachain with polkadot:v0.9.18 or polkadot-debug...&#xD;&#xA;my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I changed that colander image to my own parachain image:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/p-network/collator:latest&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And my tests:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z05-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z05-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I got this command output:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;		 Using temporary directory: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local-plain.json as:83f26480055f9cab6e46b477b9e66db48dc0e892d950ed0df817e05aefd69d9e&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local.json as:c0730c2292ead75d4240c7c7623db1c40082c97ff4960ae8b0974597fc5c3498&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/zombie-wrapper.sh as:640715d32ec3b23a0330febe7af0b9f37a6ffc8675cf88ecfdee1fa5b2b59b09&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --chain res/dev/rococo-custom-2-raw.json --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-8a529a22b7767d93655b4bb89b74e034 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A42683#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:43531/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46627#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41273/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41621/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-13 15:22:39        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2734ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (76ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (60ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (61ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-13 15:25:11        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-13 15:25:32        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-13 15:25:42        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1000:: Normal connection closure&#xD;&#xA;2022-05-13 15:25:49        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1006:: Connection dropped by remote peer.&#xD;&#xA;2022-05-13 15:25:50        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;```&#xD;&#xA;From above you can see the &#xD;&#xA;- relaychain alice node test: ok&#xD;&#xA;- relaychain bob node test: ok&#xD;&#xA;- parachain 2000 is registered: ok&#xD;&#xA;- 3 log tests: ok&#xD;&#xA;- parachain 2000 block height test: failed!!?? Why did that fail? &#xD;&#xA;&#xD;&#xA;When I was using `docker.io/paritypr/colander:master`, the block height test was successful... &#xD;&#xA;&#xD;&#xA;What is wrong? Is there any argument missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9627" PostHistoryTypeId="1" PostId="2578" RevisionGUID="f23a4399-d58c-4b67-af1a-080b7e4498d6" CreationDate="2022-05-13T07:49:49.627" UserId="1789" Text="Zombienet: how to test custom parachain collator - block height(producing blocks) test" ContentLicense="CC BY-SA 4.0" />
  <row Id="9628" PostHistoryTypeId="3" PostId="2578" RevisionGUID="f23a4399-d58c-4b67-af1a-080b7e4498d6" CreationDate="2022-05-13T07:49:49.627" UserId="1789" Text="|parachain|parachain-collator|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9629" PostHistoryTypeId="5" PostId="2576" RevisionGUID="142c9a4f-5cc3-400b-8023-8825224e22dc" CreationDate="2022-05-13T08:00:27.813" UserId="2529" Comment="added 1195 characters in body" Text="i have not found the examples to teleport between statemint and polkadot. is ther any one can give some examples in javascript.what i use is &#xD;&#xA;```&#xD;&#xA;@polkadot/api&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;this is my code:&#xD;&#xA;&#xD;&#xA;i have found the teleport function.but there is some error&#xD;&#xA;````&#xD;&#xA;async function teleport() {&#xD;&#xA;    let api = await getConn();&#xD;&#xA;    &#xD;&#xA;    let fromAddr = ADDR_1;&#xD;&#xA;    let mnemonic = MNEMONIC_1;&#xD;&#xA;    let toAddr=ADDR_2;&#xD;&#xA;    let amount = new BigNumber(5).multipliedBy(westendDecimal).toString(10);&#xD;&#xA;    let tx = api.tx.polkadotXcm.limitedTeleportAssets(toAddr,toAddr,amount,0,100000);&#xD;&#xA;    await sendTransaction(mnemonic,fromAddr,tx);&#xD;&#xA;}&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;but it execute error:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;xecute error: Error: createType(Call):: Call: failed decoding polkadotXcm.limitedTeleportAssets:: Struct: failed on args: {&quot;dest&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;V0\&quot;:\&quot;XcmV0MultiLocation\&quot;,\&quot;V1\&quot;:\&quot;XcmV1MultiLocation\&quot;}}&quot;,&quot;beneficiary&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;V0\&quot;:\&quot;XcmV0MultiLocation\&quot;,\&quot;V1\&quot;:\&quot;XcmV1MultiLocation\&quot;}}&quot;,&quot;assets&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;V0\&quot;:\&quot;Vec&lt;XcmV0MultiAsset&gt;\&quot;,\&quot;V1\&quot;:\&quot;XcmV1MultiassetMultiAssets\&quot;}}&quot;,&quot;fee_asset_item&quot;:&quot;u32&quot;,&quot;weight_limit&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Unlimited\&quot;:\&quot;Null\&quot;,\&quot;Limited\&quot;:\&quot;Compact&lt;u64&gt;\&quot;}}&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;V0&quot;:&quot;XcmV0MultiLocation&quot;,&quot;V1&quot;:&quot;XcmV1MultiLocation&quot;}}:: Cannot map Enum JSON, unable to find '5EWFCfvUqSkUVbsPSJNAkfGVqVTVwfc1c5XAg3qomDUR5eiR' in v0, v1&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9630" PostHistoryTypeId="5" PostId="2578" RevisionGUID="94de32ff-b959-4d7e-b903-94483d9ff467" CreationDate="2022-05-13T08:01:36.990" UserId="1789" Comment="added 1185 characters in body" Text="previously I could run my tests including colander parachain with polkadot:v0.9.18 or polkadot-debug...&#xD;&#xA;my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I changed that colander image to my own parachain image:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/p-network/collator:latest&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And my tests:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z05-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z05-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I got this command output:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;		 Using temporary directory: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local-plain.json as:83f26480055f9cab6e46b477b9e66db48dc0e892d950ed0df817e05aefd69d9e&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local.json as:c0730c2292ead75d4240c7c7623db1c40082c97ff4960ae8b0974597fc5c3498&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/zombie-wrapper.sh as:640715d32ec3b23a0330febe7af0b9f37a6ffc8675cf88ecfdee1fa5b2b59b09&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --chain res/dev/rococo-custom-2-raw.json --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-8a529a22b7767d93655b4bb89b74e034 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A42683#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:43531/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46627#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41273/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41621/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-13 15:22:39        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2734ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (76ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (60ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (61ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-13 15:25:11        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-13 15:25:32        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-13 15:25:42        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1000:: Normal connection closure&#xD;&#xA;2022-05-13 15:25:49        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1006:: Connection dropped by remote peer.&#xD;&#xA;2022-05-13 15:25:50        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;```&#xD;&#xA;From above you can see the &#xD;&#xA;- relaychain alice node test: ok&#xD;&#xA;- relaychain bob node test: ok&#xD;&#xA;- parachain 2000 is registered: ok&#xD;&#xA;- 3 log tests: ok&#xD;&#xA;- parachain 2000 block height test: failed!!?? Why did that fail? &#xD;&#xA;&#xD;&#xA;When I was using `docker.io/paritypr/colander:master`, the block height test was successful... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Especially when I checked the collator logs via&#xD;&#xA;`kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034`&#xD;&#xA;I got:&#xD;&#xA;```&#xD;&#xA;+ export PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ pipe=/tmp/zombiepipe&#xD;&#xA;+ trap 'rm -f /tmp/zombiepipe' EXIT&#xD;&#xA;+ [[ ! -p /tmp/zombiepipe ]]&#xD;&#xA;+ mkfifo /tmp/zombiepipe&#xD;&#xA;+ child_pid=&#xD;&#xA;+ CMD=($@)&#xD;&#xA;+ child_pid=8&#xD;&#xA;+ ls /proc/8&#xD;&#xA;+ target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;+ read line&#xD;&#xA;Error: Input(&quot;Error parsing spec file: missing field `relay_chain` at line 155 column 1&quot;)&#xD;&#xA;```&#xD;&#xA;Also the Polkadot.js link did not work as well&#xD;&#xA;`Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer`&#xD;&#xA;&#xD;&#xA;What is wrong? Is there any argument missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9635" PostHistoryTypeId="2" PostId="2580" RevisionGUID="1cc6ea14-38de-45e0-8247-034a332eaa74" CreationDate="2022-05-13T08:16:56.510" UserId="627" Text="For the extraction of the timestamp, this has been [answered elsewhere](https://substrate.stackexchange.com/questions/2466/can-i-get-this-timestamp-through-rpc-getblock), aka it would the the timestamp of the block that the extrinsic was included in.&#xD;&#xA;&#xD;&#xA;To check the status of the execution, you need to map the extrinsic to the events. &#xD;&#xA;&#xD;&#xA;Like everything is Substrate (extrinsics, storage, errors) this all hangs off SCALE encoding and the information in the on-chain metadata, as retrieved via [state_getMetadata](https://polkadot.js.org/docs/substrate/rpc/#getmetadataat-blockhash-metadata). The metadata explicitly defines all the indexes, arguments and types for all of these.&#xD;&#xA;&#xD;&#xA;The steps would be -&#xD;&#xA;&#xD;&#xA; - Get the storage for the events at the blockHash (on RPC this would be via [state_getStorage](https://polkadot.js.org/docs/substrate/rpc/#getstoragekey-storagekey-at-blockhash-storagedata) with the encoded key for the system.events storage item)&#xD;&#xA; - Decode this SCALE result based on the event indexes and types in the metadata&#xD;&#xA; - Map the decoded events to the extrinsic - to do this, check the phase in the `EventRecord`, it should be `ApplyExtrinsic(u32)` where the `u32` is the index of the extrinsic in the block&#xD;&#xA; - On these filtered events check for either `System.ExtrinsicSuccess` or `System.ExtrinsicFailed`&#xD;&#xA; - On failed extrinsics, the `DispatchError -&gt; Module` will have the error indexes. You can map these using the error indexes from the on-chain metadata&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9637" PostHistoryTypeId="2" PostId="2581" RevisionGUID="1bdd6083-152f-4085-8c3c-b2100cabc282" CreationDate="2022-05-13T08:23:14.403" UserId="2355" Text="here is a simplified example of what i encounter:&#xD;&#xA;&#xD;&#xA;i have this function in my pallet:&#xD;&#xA;&#xD;&#xA;    fn(...) -&gt; ... {&#xD;&#xA;        let idx = get_index(); //&#xD;&#xA;        let address = T::PalletId::get().into_sub_account(idx);&#xD;&#xA;        transfer(address, 1000); //i transfer the existential deposit on my new address, its 1000&#xD;&#xA;        index::T::put(idx + 1);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and this test:&#xD;&#xA;&#xD;&#xA;    fn test_fn {&#xD;&#xA;        assert_eq(Pallet::index(), 0) // pass&#xD;&#xA;        assert_ok(Pallet::fn(...));   // pass&#xD;&#xA;        assert_eq(Pallet::index(), 1) // pass&#xD;&#xA;        assert_ok(Pallet::fn(...));   // pass&#xD;&#xA;        assert_eq(Pallet::index(), 2) // pass&#xD;&#xA;        assert_ok(Pallet::fn(...));   // pass&#xD;&#xA;    &#xD;&#xA;        assert_ok(Balances::free_balance(get_acc_id(0), 1000) // error: left = 3000, right = 1000&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fn get_acc_id(index) -&gt; AccountId {&#xD;&#xA;        Pallet::get().into_sub_account(index)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;i dont understand why i have this `error: left = 3000, right = 1000`, unless into_sub_account(0) and into_sub_account(2) give me the same output. Am i doing something wrong ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9639" PostHistoryTypeId="1" PostId="2581" RevisionGUID="1bdd6083-152f-4085-8c3c-b2100cabc282" CreationDate="2022-05-13T08:23:14.403" UserId="2355" Text="into_sub_account(sub) encode the SAME adress for different sub" ContentLicense="CC BY-SA 4.0" />
  <row Id="9640" PostHistoryTypeId="3" PostId="2581" RevisionGUID="1bdd6083-152f-4085-8c3c-b2100cabc282" CreationDate="2022-05-13T08:23:14.403" UserId="2355" Text="|pallet|account|sub-account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9643" PostHistoryTypeId="5" PostId="2578" RevisionGUID="dcc727fb-ab6e-4a44-aa0e-fe6142d07e8d" CreationDate="2022-05-13T08:37:53.123" UserId="1789" Comment="added 10 characters in body" Text="previously I could run my tests including colander parachain with polkadot:v0.9.18 or polkadot-debug...&#xD;&#xA;my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I changed that colander image to my own parachain image:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/collator:latest&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And my tests:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z05-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z05-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I got this command output:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;		 Using temporary directory: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local-plain.json as:83f26480055f9cab6e46b477b9e66db48dc0e892d950ed0df817e05aefd69d9e&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local.json as:c0730c2292ead75d4240c7c7623db1c40082c97ff4960ae8b0974597fc5c3498&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/zombie-wrapper.sh as:640715d32ec3b23a0330febe7af0b9f37a6ffc8675cf88ecfdee1fa5b2b59b09&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --chain res/dev/rococo-custom-2-raw.json --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-8a529a22b7767d93655b4bb89b74e034 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A42683#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:43531/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46627#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41273/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41621/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-13 15:22:39        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2734ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (76ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (60ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (61ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-13 15:25:11        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-13 15:25:32        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-13 15:25:42        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1000:: Normal connection closure&#xD;&#xA;2022-05-13 15:25:49        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1006:: Connection dropped by remote peer.&#xD;&#xA;2022-05-13 15:25:50        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;```&#xD;&#xA;From above you can see the &#xD;&#xA;- relaychain alice node test: ok&#xD;&#xA;- relaychain bob node test: ok&#xD;&#xA;- parachain 2000 is registered: ok&#xD;&#xA;- 3 log tests: ok&#xD;&#xA;- parachain 2000 block height test: failed!!?? Why did that fail? &#xD;&#xA;&#xD;&#xA;When I was using `docker.io/paritypr/colander:master`, the block height test was successful... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Especially when I checked the collator logs via&#xD;&#xA;`kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034`&#xD;&#xA;I got:&#xD;&#xA;```&#xD;&#xA;+ export PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ pipe=/tmp/zombiepipe&#xD;&#xA;+ trap 'rm -f /tmp/zombiepipe' EXIT&#xD;&#xA;+ [[ ! -p /tmp/zombiepipe ]]&#xD;&#xA;+ mkfifo /tmp/zombiepipe&#xD;&#xA;+ child_pid=&#xD;&#xA;+ CMD=($@)&#xD;&#xA;+ child_pid=8&#xD;&#xA;+ ls /proc/8&#xD;&#xA;+ target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;+ read line&#xD;&#xA;Error: Input(&quot;Error parsing spec file: missing field `relay_chain` at line 155 column 1&quot;)&#xD;&#xA;```&#xD;&#xA;Also the Polkadot.js link did not work as well&#xD;&#xA;`Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer`&#xD;&#xA;&#xD;&#xA;What is wrong? Is there any argument missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9644" PostHistoryTypeId="2" PostId="2583" RevisionGUID="324651d9-59ec-4bea-8758-909fcdaf9b3d" CreationDate="2022-05-13T08:40:24.863" UserId="279" Text="looks like your parachain collator is based on cumulus (and not on one of the testnet like adder-collator), in that case you need to use the flag `cumulus_based` in the parachain definition.&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/p-network/collator:latest&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="9646" PostHistoryTypeId="5" PostId="2578" RevisionGUID="eee96383-fe6a-46fe-888b-7778d304f4f5" CreationDate="2022-05-13T08:43:38.873" UserId="1789" Comment="added 1277 characters in body" Text="previously I could run my tests including colander parachain with polkadot:v0.9.18 or polkadot-debug...&#xD;&#xA;my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I changed that colander image to my own parachain image:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/collator:latest&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And my tests:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z05-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z05-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I got this command output:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;		 Using temporary directory: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local-plain.json as:83f26480055f9cab6e46b477b9e66db48dc0e892d950ed0df817e05aefd69d9e&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local.json as:c0730c2292ead75d4240c7c7623db1c40082c97ff4960ae8b0974597fc5c3498&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/zombie-wrapper.sh as:640715d32ec3b23a0330febe7af0b9f37a6ffc8675cf88ecfdee1fa5b2b59b09&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --chain res/dev/rococo-custom-2-raw.json --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-8a529a22b7767d93655b4bb89b74e034 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A42683#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:43531/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46627#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41273/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41621/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-13 15:22:39        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2734ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (76ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (60ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (61ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-13 15:25:11        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-13 15:25:32        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-13 15:25:42        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1000:: Normal connection closure&#xD;&#xA;2022-05-13 15:25:49        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1006:: Connection dropped by remote peer.&#xD;&#xA;2022-05-13 15:25:50        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;```&#xD;&#xA;From above you can see the &#xD;&#xA;- relaychain alice node test: ok&#xD;&#xA;- relaychain bob node test: ok&#xD;&#xA;- parachain 2000 is registered: ok&#xD;&#xA;- 3 log tests: ok&#xD;&#xA;- parachain 2000 block height test: failed!!?? Why did that fail? &#xD;&#xA;&#xD;&#xA;When I was using `docker.io/paritypr/colander:master`, the block height test was successful... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Especially when I checked the collator logs via&#xD;&#xA;`kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034`&#xD;&#xA;I got:&#xD;&#xA;```&#xD;&#xA;+ export PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ pipe=/tmp/zombiepipe&#xD;&#xA;+ trap 'rm -f /tmp/zombiepipe' EXIT&#xD;&#xA;+ [[ ! -p /tmp/zombiepipe ]]&#xD;&#xA;+ mkfifo /tmp/zombiepipe&#xD;&#xA;+ child_pid=&#xD;&#xA;+ CMD=($@)&#xD;&#xA;+ child_pid=8&#xD;&#xA;+ ls /proc/8&#xD;&#xA;+ target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;+ read line&#xD;&#xA;Error: Input(&quot;Error parsing spec file: missing field `relay_chain` at line 155 column 1&quot;)&#xD;&#xA;```&#xD;&#xA;Also the Polkadot.js link did not work as well&#xD;&#xA;`Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer`&#xD;&#xA;&#xD;&#xA;What is wrong? &#xD;&#xA;&#xD;&#xA;My repo's docker-compose file:&#xD;&#xA;```&#xD;&#xA;  collator:&#xD;&#xA;    container_name: collator&#xD;&#xA;    image: paidnetwork/collator&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30343:30343&quot;&#xD;&#xA;      - &quot;40333:40333&quot;&#xD;&#xA;      - &quot;6969:6969&quot;&#xD;&#xA;      - &quot;8844:8844&quot;&#xD;&#xA;      - &quot;9977:9977&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;    depends_on:&#xD;&#xA;      - charlie-relay&#xD;&#xA;  alice-relay:&#xD;&#xA;    container_name: alice-relay&#xD;&#xA;    image: paidnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30333:30333&quot;&#xD;&#xA;      - &quot;9944:9944&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;```&#xD;&#xA;Is there any argument missing in my Zombienet network definition file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9647" PostHistoryTypeId="5" PostId="2581" RevisionGUID="0ccc0d88-47f1-4be6-8335-1d250c671e9a" CreationDate="2022-05-13T08:50:18.883" UserId="2355" Comment="added bonus" Text="here is a simplified example of what i encounter:&#xD;&#xA;&#xD;&#xA;i have this function in my pallet:&#xD;&#xA;&#xD;&#xA;    fn(...) -&gt; ... {&#xD;&#xA;        let idx = get_index(); //&#xD;&#xA;        let address = T::PalletId::get().into_sub_account(idx);&#xD;&#xA;        transfer(address, 1000); //i transfer the existential deposit on my new address, its 1000&#xD;&#xA;        index::T::put(idx + 1);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and this test:&#xD;&#xA;&#xD;&#xA;    fn test_fn {&#xD;&#xA;        assert_eq(Pallet::index(), 0) // pass&#xD;&#xA;        assert_ok(Pallet::fn(...));   // pass&#xD;&#xA;        assert_eq(Pallet::index(), 1) // pass&#xD;&#xA;        assert_ok(Pallet::fn(...));   // pass&#xD;&#xA;        assert_eq(Pallet::index(), 2) // pass&#xD;&#xA;        assert_ok(Pallet::fn(...));   // pass&#xD;&#xA;    &#xD;&#xA;        assert_ok(Balances::free_balance(get_acc_id(0), 1000) // error: left = 3000, right = 1000&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fn get_acc_id(index) -&gt; AccountId {&#xD;&#xA;        Pallet::get().into_sub_account(index)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;i dont understand why i have this `error: left = 3000, right = 1000`, unless into_sub_account(0) and into_sub_account(2) give me the same output. Am i doing something wrong ?&#xD;&#xA;&#xD;&#xA;bonus: this test pass:&#xD;&#xA;&#xD;&#xA;    assert_eq!(get_account_id(0), get_account_id(100000));&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9648" PostHistoryTypeId="2" PostId="2584" RevisionGUID="6a9bef13-7506-4d5d-a18c-109cd7582cef" CreationDate="2022-05-13T09:07:07.803" UserId="1744" Text="Run the commond of windows Power shell for update nightly:&#xD;&#xA;&#xD;&#xA;  1.rustup update nightly&#xD;&#xA;&#xD;&#xA;  2.rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;  3.rustup update&#xD;&#xA;  4.after that run build commond:&#xD;&#xA;     cargo build --release" ContentLicense="CC BY-SA 4.0" />
  <row Id="9650" PostHistoryTypeId="2" PostId="2585" RevisionGUID="72db44eb-4230-4455-b450-c1777c90caf8" CreationDate="2022-05-13T09:35:15.893" UserId="2538" Text="Can someone tell me how can I generate a secret/privateKey/miniSecretKey, publicKey without subkey the tool from a mnemonic?&#xD;&#xA;&#xD;&#xA;I am working on a c# implementation of the wallet generation and I'd appreciate any help :)&#xD;&#xA;The goal is: using the schnorrkel signature and generate the same private/pubkey as the subkey does.(the address generation is working, but i can't derive the correct seed, and i even need it in 64byte version)&#xD;&#xA;&#xD;&#xA;The mnemonic i am trying to use and get the results are these:&#xD;&#xA;&#xD;&#xA;`$ cargo run -- generate&#xD;&#xA;    Finished dev [unoptimized + debuginfo] target(s) in 0.78s&#xD;&#xA;     Running `/home/greg/Development/src/polkadot/substrate_ut/target/debug/subkey generate`&#xD;&#xA;Secret phrase `maple rather inject cage food unable enter economy adapt mandate novel start` is account:&#xD;&#xA;  Network ID/version: substrate&#xD;&#xA;  Secret seed:        0xce456c3f305bf2c31868b1f51eb297e8b304551f1e456758cfa555d0040b31f7&#xD;&#xA;  64-byte secret:     0x1B04EA5667F6D63B7D405503651F56129B64ED148336F35EECCA53716B872B0B542E9D846415B636BB1741C22C8BCA827CEF9D170B9E671E36B60345D18B3894&#xD;&#xA;  Public key (hex):   0xa805c199eaa3d4d3f0865691e94b3ce4a508ee68aef6d7b42642d0d5d389667d&#xD;&#xA;  Account ID:         0xa805c199eaa3d4d3f0865691e94b3ce4a508ee68aef6d7b42642d0d5d389667d&#xD;&#xA;  SS58 Address:       5Fs1cSCX2ZDvtfC6wvrWWFoQDRdcESLuoTyYofdE1AM7LVhD`&#xD;&#xA;&#xD;&#xA;so the 64-byte secret how can be generated from this mnemonic &quot;manually&quot;? (i can't really read rust yet btw)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9652" PostHistoryTypeId="1" PostId="2585" RevisionGUID="72db44eb-4230-4455-b450-c1777c90caf8" CreationDate="2022-05-13T09:35:15.893" UserId="2538" Text="How can manually generate same address from mnemonic as subkey without it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9653" PostHistoryTypeId="3" PostId="2585" RevisionGUID="72db44eb-4230-4455-b450-c1777c90caf8" CreationDate="2022-05-13T09:35:15.893" UserId="2538" Text="|rust|key|subkey|keyring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9654" PostHistoryTypeId="5" PostId="2585" RevisionGUID="5c720270-3b9a-41e0-bed6-bbd430a18942" CreationDate="2022-05-13T09:40:45.037" UserId="2538" Comment="deleted 200 characters in body" Text="Can someone tell me how can I generate a secret/privateKey/miniSecretKey, publicKey without subkey the tool from a mnemonic?&#xD;&#xA;&#xD;&#xA;I am working on a c# implementation of the wallet generation and I'd appreciate any help :)&#xD;&#xA;The goal is: using the schnorrkel signature and generate the same private/pubkey as the subkey does.(the address generation is working, but i can't derive the correct seed, and i even need it in 64byte version)&#xD;&#xA;&#xD;&#xA;The mnemonic i am trying to use and get the results are these:&#xD;&#xA;```maple rather inject cage food unable enter economy adapt mandate novel start```&#xD;&#xA;```&#xD;&#xA;  Network ID/version: substrate&#xD;&#xA;  Secret seed:        0xce456c3f305bf2c31868b1f51eb297e8b304551f1e456758cfa555d0040b31f7&#xD;&#xA;  64-byte secret:     0x1B04EA5667F6D63B7D405503651F56129B64ED148336F35EECCA53716B872B0B542E9D846415B636BB1741C22C8BCA827CEF9D170B9E671E36B60345D18B3894&#xD;&#xA;  Public key (hex):   0xa805c199eaa3d4d3f0865691e94b3ce4a508ee68aef6d7b42642d0d5d389667d&#xD;&#xA;  Account ID:         0xa805c199eaa3d4d3f0865691e94b3ce4a508ee68aef6d7b42642d0d5d389667d&#xD;&#xA;  SS58 Address:       5Fs1cSCX2ZDvtfC6wvrWWFoQDRdcESLuoTyYofdE1AM7LVhD&#xD;&#xA;```&#xD;&#xA;so the 64-byte secret how can be generated from this mnemonic &quot;manually&quot;? (i can't really read rust yet btw)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9656" PostHistoryTypeId="2" PostId="2586" RevisionGUID="fee08753-36e1-4a8b-aca7-f81facd03552" CreationDate="2022-05-13T09:51:02.033" UserId="2529" Text="well~.i have found the result finaly.any one has the question can see https://github.com/polkadot-js/apps/blob/master/packages/page-parachains/src/Teleport.tsx#L77-L126 &#xD;&#xA;&#xD;&#xA;my test code is as follows:&#xD;&#xA;https://github.com/polariseye/polka_statemint_test" ContentLicense="CC BY-SA 4.0" />
  <row Id="9658" PostHistoryTypeId="2" PostId="2587" RevisionGUID="b193e72f-beea-45a9-be3b-6d54d6aa44ba" CreationDate="2022-05-13T09:59:52.203" UserId="576" Text="I want to understand this code.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub trait Trait: balances::Trait {&#xD;&#xA;    type Event: From&lt;Event&lt;Self&gt;&gt; + Into&lt;&lt;Self as system::Trait&gt;::Event&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could you please explain in detail one word code at a time?&#xD;&#xA;&#xD;&#xA;```pub trait Trait ``` means, define trait named Trait?&#xD;&#xA;&#xD;&#xA;```balances::Trait``` what's this? Is this for ```Trait```? &#xD;&#xA;&#xD;&#xA;```type Event: ``` ?&#xD;&#xA;&#xD;&#xA;```From&lt;Event&lt;Self&gt;&gt;``` ....?&#xD;&#xA;&#xD;&#xA;```+ Into&lt;&lt;Self as system::Trait&gt;::Event&gt;``` ....?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9660" PostHistoryTypeId="1" PostId="2587" RevisionGUID="b193e72f-beea-45a9-be3b-6d54d6aa44ba" CreationDate="2022-05-13T09:59:52.203" UserId="576" Text="I want to understand this trait syntax" ContentLicense="CC BY-SA 4.0" />
  <row Id="9661" PostHistoryTypeId="3" PostId="2587" RevisionGUID="b193e72f-beea-45a9-be3b-6d54d6aa44ba" CreationDate="2022-05-13T09:59:52.203" UserId="576" Text="|syntax|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9662" PostHistoryTypeId="2" PostId="2588" RevisionGUID="2fb1f6dc-fa5b-4992-afcc-ae55e6afb3ca" CreationDate="2022-05-13T10:11:34.867" UserId="16" Text="There is no way to iterate over a `Mapping` from a contract. We intent to implement this functionality soon. For more information check out this issue: https://github.com/paritytech/substrate/issues/11410&#xD;&#xA;&#xD;&#xA;If you try to iterate over a mapping off chain (from a UI for example) you could use the `childState_getKeys` RPC to list the keys of the child trie used by the contract in question." ContentLicense="CC BY-SA 4.0" />
  <row Id="9664" PostHistoryTypeId="2" PostId="2589" RevisionGUID="11c51029-e00f-4aa6-b0a1-a681b5a8b891" CreationDate="2022-05-13T10:16:58.313" UserId="16" Text="The contracts pallet is not written in a way that makes it easily integrate able into another code base. It is specifically written against FRAME (substrate's runtime authoring framework). However, there is no reason why it couldn't be decoupled. With some effort it could be restructured in a way to make it integrate able into different environments by making every I/O access abstract.&#xD;&#xA;&#xD;&#xA;However, as there was no need for it nobody really is looking into that given that it would add a lot of complexity." ContentLicense="CC BY-SA 4.0" />
  <row Id="9666" PostHistoryTypeId="5" PostId="2544" RevisionGUID="22d77d03-a022-47c7-a6c7-5d0905850708" CreationDate="2022-05-13T10:18:05.730" UserId="16" Comment="deleted 2 characters in body" Text="Is it feasible to modify the contracts pallet to integrate it into a non-substrate rust-based blockchain? Say one that runs on Tendermint." ContentLicense="CC BY-SA 4.0" />
  <row Id="9667" PostHistoryTypeId="2" PostId="2590" RevisionGUID="afdf0ae5-0983-4c17-b92b-0b5890c10703" CreationDate="2022-05-13T10:27:26.600" UserId="16" Text="The size of the output buffer is defined by the contract calling the chain extension. It passes a pointer to the length of the buffer in the `out_len_ptr` parameter. The contracts pallet doesn't enforce any limit on this buffer except for the maximum amount of linear memory a contract can have.&#xD;&#xA;&#xD;&#xA;[ink! uses 16KiB for this buffer](https://github.com/paritytech/ink/blob/90c7327c9f668bd88eee139a42ad800393b06523/crates/env/src/engine/on_chain/buffer.rs#L23). What you probably want is a way to have this buffer configurable in ink!." ContentLicense="CC BY-SA 4.0" />
  <row Id="9669" PostHistoryTypeId="2" PostId="2591" RevisionGUID="ac1c98ad-4331-45e4-bf1e-c3544999afbd" CreationDate="2022-05-13T11:02:31.723" UserId="576" Text="```&#xD;&#xA;decl_storage! {&#xD;&#xA;    trait Store for Module&lt;T: Trait&gt; as KittyStorage {&#xD;&#xA;        Kitties get(kitty): map T::Hash =&gt; Kitty&lt;T::Hash, T::Balance&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;1. What is this ```for``` use?&#xD;&#xA;&#xD;&#xA;2. What is ```Store``` ? is this a trait?&#xD;&#xA;3. then ```Module``` is what?&#xD;&#xA;&#xD;&#xA;4. ```decl_storage!``` macro is for what purpose? create multiple storage object suites?&#xD;&#xA;&#xD;&#xA;5. what is ```&lt;T: Trait&gt; as KittyStorage``` ?&#xD;&#xA;you give name Module as ```KittyStorage```?&#xD;&#xA;&#xD;&#xA;6. &#xD;&#xA;```&#xD;&#xA;Kitties get(kitty): map T::Hash =&gt; Kitty&lt;T::Hash, T::Balance&gt;;&#xD;&#xA;```&#xD;&#xA;```Kitties``` object has ```get``` method, attribute is ```kitty```, then map iterate T::Hash ,&#xD;&#xA;return Kitty object which has T::Hash and T::Balance trait.&#xD;&#xA;&#xD;&#xA;is it right...? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9671" PostHistoryTypeId="1" PostId="2591" RevisionGUID="ac1c98ad-4331-45e4-bf1e-c3544999afbd" CreationDate="2022-05-13T11:02:31.723" UserId="576" Text="decl_storage macro syntax" ContentLicense="CC BY-SA 4.0" />
  <row Id="9672" PostHistoryTypeId="3" PostId="2591" RevisionGUID="ac1c98ad-4331-45e4-bf1e-c3544999afbd" CreationDate="2022-05-13T11:02:31.723" UserId="576" Text="|syntax|trait|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9673" PostHistoryTypeId="5" PostId="2578" RevisionGUID="bb19417d-815f-4df4-b4fd-3d208af587d1" CreationDate="2022-05-13T11:35:47.863" UserId="1789" Comment="added 862 characters in body; edited tags" Text="previously I could run my tests including colander parachain with polkadot:v0.9.18 or polkadot-debug...&#xD;&#xA;my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I changed that colander image to my own parachain image:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/collator:latest&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And my tests:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z05-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z05-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I got this command output:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;		 Using temporary directory: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local-plain.json as:83f26480055f9cab6e46b477b9e66db48dc0e892d950ed0df817e05aefd69d9e&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local.json as:c0730c2292ead75d4240c7c7623db1c40082c97ff4960ae8b0974597fc5c3498&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/zombie-wrapper.sh as:640715d32ec3b23a0330febe7af0b9f37a6ffc8675cf88ecfdee1fa5b2b59b09&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --chain res/dev/rococo-custom-2-raw.json --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-8a529a22b7767d93655b4bb89b74e034 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A42683#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:43531/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46627#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41273/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41621/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-13 15:22:39        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2734ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (76ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (60ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (61ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-13 15:25:11        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-13 15:25:32        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-13 15:25:42        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1000:: Normal connection closure&#xD;&#xA;2022-05-13 15:25:49        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1006:: Connection dropped by remote peer.&#xD;&#xA;2022-05-13 15:25:50        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;```&#xD;&#xA;From above you can see the &#xD;&#xA;- relaychain alice node test: ok&#xD;&#xA;- relaychain bob node test: ok&#xD;&#xA;- parachain 2000 is registered: ok&#xD;&#xA;- 3 log tests: ok&#xD;&#xA;- parachain 2000 block height test: failed!!?? Why did that fail? &#xD;&#xA;&#xD;&#xA;When I was using `docker.io/paritypr/colander:master`, the block height test was successful... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Especially when I checked the collator logs via&#xD;&#xA;`kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034`&#xD;&#xA;I got:&#xD;&#xA;```&#xD;&#xA;+ export PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ pipe=/tmp/zombiepipe&#xD;&#xA;+ trap 'rm -f /tmp/zombiepipe' EXIT&#xD;&#xA;+ [[ ! -p /tmp/zombiepipe ]]&#xD;&#xA;+ mkfifo /tmp/zombiepipe&#xD;&#xA;+ child_pid=&#xD;&#xA;+ CMD=($@)&#xD;&#xA;+ child_pid=8&#xD;&#xA;+ ls /proc/8&#xD;&#xA;+ target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;+ read line&#xD;&#xA;Error: Input(&quot;Error parsing spec file: missing field `relay_chain` at line 155 column 1&quot;)&#xD;&#xA;```&#xD;&#xA;Also the Polkadot.js link did not work as well&#xD;&#xA;`Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer`&#xD;&#xA;&#xD;&#xA;What is wrong? &#xD;&#xA;&#xD;&#xA;My repo's docker-compose file:&#xD;&#xA;```&#xD;&#xA;  collator:&#xD;&#xA;    container_name: collator&#xD;&#xA;    image: paidnetwork/collator&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30343:30343&quot;&#xD;&#xA;      - &quot;40333:40333&quot;&#xD;&#xA;      - &quot;6969:6969&quot;&#xD;&#xA;      - &quot;8844:8844&quot;&#xD;&#xA;      - &quot;9977:9977&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;    depends_on:&#xD;&#xA;      - charlie-relay&#xD;&#xA;  alice-relay:&#xD;&#xA;    container_name: alice-relay&#xD;&#xA;    image: paidnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30333:30333&quot;&#xD;&#xA;      - &quot;9944:9944&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My Dockerfile.base:&#xD;&#xA;```&#xD;&#xA;FROM debian:latest&#xD;&#xA;RUN apt update &amp;&amp; apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential&#xD;&#xA;RUN curl https://sh.rustup.rs -sSf &gt;&gt; install-rust.sh&#xD;&#xA;RUN chmod u+x install-rust.sh&#xD;&#xA;RUN ./install-rust.sh -y&#xD;&#xA;RUN PATH=$PATH:$HOME/.cargo/env&#xD;&#xA;SHELL [&quot;bash&quot;, &quot;-lc&quot;]&#xD;&#xA;RUN rustup update&#xD;&#xA;RUN rustup update nightly&#xD;&#xA;RUN rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;&#xD;&#xA;CMD [ &quot;tail&quot;, &quot;-f&quot;, &quot;/dev/null&quot; ]&#xD;&#xA;```&#xD;&#xA;And my Dockerfile:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/rust as builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;&#xD;&#xA;COPY . .&#xD;&#xA;&#xD;&#xA;RUN . $HOME/.cargo/env &amp;&amp; cargo build --${PROFILE}&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there any argument missing in my Zombienet network definition file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9674" PostHistoryTypeId="6" PostId="2578" RevisionGUID="bb19417d-815f-4df4-b4fd-3d208af587d1" CreationDate="2022-05-13T11:35:47.863" UserId="1789" Comment="added 862 characters in body; edited tags" Text="|parachain|parachain-collator|docker|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9675" PostHistoryTypeId="2" PostId="2592" RevisionGUID="21607ea5-cdd9-4cb2-a4d0-704af694870a" CreationDate="2022-05-13T11:45:23.070" UserId="620" Text="Just a little bit of Rust :)&#xD;&#xA;https://github.com/paritytech/substrate-bip39/blob/eef2f86/src/lib.rs#L44L61&#xD;&#xA;&#xD;&#xA;See the README for rationale behind this entropy to seed method." ContentLicense="CC BY-SA 4.0" />
  <row Id="9677" PostHistoryTypeId="2" PostId="2593" RevisionGUID="fa99219b-dcc8-47de-a93a-89195352749a" CreationDate="2022-05-13T12:09:04.297" UserId="14" Text="Besides Joe's Rust implementation, you can also check how it is implemented in [PolkadotJS#keyring](https://polkadot.js.org/docs/keyring/start/ss58) and `py-substrate-interface#Keypair`:&#xD;&#xA;```&#xD;&#xA;from substrateinterface import Keypair&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;mnemonic = 'maple rather inject cage food unable enter economy adapt mandate novel start'&#xD;&#xA;keypair = Keypair.create_from_mnemonic(mnemonic)&#xD;&#xA;&#xD;&#xA;print(&#xD;&#xA;	f'Secret seed:\t\t0x{keypair.seed_hex}\n' + \&#xD;&#xA;	f'64-byte secret\t\t0x{keypair.private_key.hex()}\n' + \&#xD;&#xA;	f'Public key (hex):\t0x{keypair.public_key.hex()}\n' + \&#xD;&#xA;	f'Account ID:\t\t0x{keypair.public_key.hex()}\n' + \&#xD;&#xA;	f'SS58 Address:\t\t{keypair.ss58_address}'&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9679" PostHistoryTypeId="5" PostId="2593" RevisionGUID="13c1c8ed-fcbf-45c3-9a66-938a946776ce" CreationDate="2022-05-13T12:29:52.260" UserId="14" Comment="added 98 characters in body" Text="Besides Joe's Rust implementation, you can also check how it is implemented in [PolkadotJS#keyring](https://polkadot.js.org/docs/keyring/start/ss58) and `py-substrate-interface`[#Keypair](https://github.com/polkascan/py-substrate-interface/blob/master/substrateinterface/base.py#L73):&#xD;&#xA;```&#xD;&#xA;from substrateinterface import Keypair&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;mnemonic = 'maple rather inject cage food unable enter economy adapt mandate novel start'&#xD;&#xA;keypair = Keypair.create_from_mnemonic(mnemonic)&#xD;&#xA;&#xD;&#xA;print(&#xD;&#xA;	f'Secret seed:\t\t0x{keypair.seed_hex}\n' + \&#xD;&#xA;	f'64-byte secret\t\t0x{keypair.private_key.hex()}\n' + \&#xD;&#xA;	f'Public key (hex):\t0x{keypair.public_key.hex()}\n' + \&#xD;&#xA;	f'Account ID:\t\t0x{keypair.public_key.hex()}\n' + \&#xD;&#xA;	f'SS58 Address:\t\t{keypair.ss58_address}'&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9680" PostHistoryTypeId="10" PostId="2095" RevisionGUID="c3218fc7-d9f8-4ceb-9ebd-eb26fc451e87" CreationDate="2022-05-13T12:37:59.947" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[1]}" />
  <row Id="9681" PostHistoryTypeId="10" PostId="2049" RevisionGUID="272dbc01-6bee-408e-9dd0-db964e318a86" CreationDate="2022-05-13T12:39:03.930" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[37],&quot;Voters&quot;:[{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:53,&quot;DisplayName&quot;:&quot;Gav&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;}]}" />
  <row Id="9682" PostHistoryTypeId="5" PostId="2553" RevisionGUID="9b0a3340-e358-4772-90b9-bf44b08e89d5" CreationDate="2022-05-13T12:41:39.037" UserId="45" Comment="code formatting" Text="Resolved after updating the version below two crates as&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;ethereum = { version = &quot;0.12&quot;, default-features = false, features = [&quot;with-codec&quot;] } &#xD;&#xA;ethereum-types = { version = &quot;0.13.1&quot;, default-features = false, features = [&quot;rlp&quot;, &quot;codec&quot;] }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9683" PostHistoryTypeId="5" PostId="2584" RevisionGUID="645e7abf-728d-4289-bb67-db1d379fc07a" CreationDate="2022-05-13T12:42:48.100" UserId="45" Comment="improve formatting, fix typos" Text="Run the command of windows Power shell for update nightly:&#xD;&#xA;&#xD;&#xA;  1. `rustup update nightly`&#xD;&#xA;&#xD;&#xA;  2. `rustup target add wasm32-unknown-unknown --toolchain nightly`&#xD;&#xA;&#xD;&#xA;  3. `rustup update`&#xD;&#xA;&#xD;&#xA;  4. after that run build command:&#xD;&#xA;     `cargo build --release`" ContentLicense="CC BY-SA 4.0" />
  <row Id="9684" PostHistoryTypeId="12" PostId="2575" RevisionGUID="81215aff-413c-45c6-b52b-e2c0c2249901" CreationDate="2022-05-13T12:44:42.613" UserId="29" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="9685" PostHistoryTypeId="13" PostId="2575" RevisionGUID="30e27fb7-047b-4520-8b24-3c599cf0b68a" CreationDate="2022-05-13T12:45:04.417" UserId="29" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="9687" PostHistoryTypeId="12" PostId="2575" RevisionGUID="5f1025ab-ae6f-41e6-a1cb-1b690efca03e" CreationDate="2022-05-13T12:45:29.343" UserId="29" Comment="Converted to Comment" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="9688" PostHistoryTypeId="2" PostId="2594" RevisionGUID="8be3d11f-8696-450c-9d76-784999fde29d" CreationDate="2022-05-13T13:57:26.243" UserId="2099" Text="&#xD;&#xA;I eventually solved it by removing the AuthorityDiscovery pallet, which I had integrated as well and was most likely just misconfigured." ContentLicense="CC BY-SA 4.0" />
  <row Id="9690" PostHistoryTypeId="52" PostId="2568" RevisionGUID="a973e92d-254b-4d8d-b696-03dbf3b83355" CreationDate="2022-05-13T14:55:02.783" />
  <row Id="9691" PostHistoryTypeId="2" PostId="2595" RevisionGUID="98dd75a6-bf9b-46c2-844d-484dc08198cc" CreationDate="2022-05-13T15:19:41.827" UserId="351" Text="Well , I really dont think there is a need for you to keep hustling FRAME V1 syntax. Because The declarative macros used there dont follow rust syntax. &#xD;&#xA;So I think you should focus on V2. And It will be hard for u to get further help in your journey if you keep using V1 as now V2 is used officially and it is easy to debug " ContentLicense="CC BY-SA 4.0" />
  <row Id="9695" PostHistoryTypeId="2" PostId="2596" RevisionGUID="4730e262-d560-4474-8252-20aa1f30a5af" CreationDate="2022-05-13T15:46:58.363" UserId="28" Text="The `decl_*!` macros were deprecated specifically for the confusion they cause, and as illustrated in this question.&#xD;&#xA;&#xD;&#xA;Because they define their own syntax, which is not Rust, you basically need to understand how the macro parses the code block to understand what is going on.&#xD;&#xA;&#xD;&#xA;I do not suggest you keep moving forward with FRAME V1, and instead suggest you use the [FRAME V2](https://github.com/paritytech/substrate/discussions/7788) macros.&#xD;&#xA;&#xD;&#xA;Anyway, to answer your question:&#xD;&#xA;&#xD;&#xA; 1. `trait Store for Module` is trying to look like the `impl Trait for Struct` syntax, and it is doing the same thing. There is a trait `Store` which is being implemented for `Module`.&#xD;&#xA;&#xD;&#xA; 2. Yes it is a trait which is generated on the fly for each pallet. It lists the storage items available in the pallet.&#xD;&#xA;&#xD;&#xA; 3. `Module` is a struct which represents the whole pallet. In all the latest pallets, this is renamed to `Pallet`.&#xD;&#xA;&#xD;&#xA; 4. `decl_storage!` is used to define storage items which can be used in your runtime logic, and store data on the blockchain. It provides access between your pallet code, and the Substrate database.&#xD;&#xA;&#xD;&#xA; 5. `&lt;T: Trait&gt;` is part of `Module&lt;T: Trait&gt;`, and it is a [generic parameter](https://doc.rust-lang.org/book/ch10-01-syntax.html). `KittyStorage` is the [storage prefix](https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc/) name used when generating storage for the pallet.&#xD;&#xA;&#xD;&#xA; 6. is not a question." ContentLicense="CC BY-SA 4.0" />
  <row Id="9698" PostHistoryTypeId="2" PostId="2597" RevisionGUID="df67af0b-c5e2-48c5-a484-f8e7c7ace20d" CreationDate="2022-05-13T15:52:26.447" UserId="48" Text="On a parachain (Substrate polkadot-v0.9.20 branch), I am trying to trigger some offchain tasks using an offchain worker in my pallet, but the task is not triggered. I checked that the `on_finalize` hook is correctly triggered, but not the `offchain_worker`...  &#xD;&#xA;I also tried the ̀--offchain-worker always` command line flag, without any success.  &#xD;&#xA;&#xD;&#xA;Is this supposed to work on parachain nodes ?  &#xD;&#xA;&#xD;&#xA;Thanks for your help." ContentLicense="CC BY-SA 4.0" />
  <row Id="9700" PostHistoryTypeId="1" PostId="2597" RevisionGUID="df67af0b-c5e2-48c5-a484-f8e7c7ace20d" CreationDate="2022-05-13T15:52:26.447" UserId="48" Text="Offchain workers in parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="9701" PostHistoryTypeId="3" PostId="2597" RevisionGUID="df67af0b-c5e2-48c5-a484-f8e7c7ace20d" CreationDate="2022-05-13T15:52:26.447" UserId="48" Text="|parachain|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9702" PostHistoryTypeId="5" PostId="2597" RevisionGUID="ff1880cf-535c-4d32-81ed-25d50ad17ebe" CreationDate="2022-05-13T16:26:37.767" UserId="48" Comment="edited body" Text="On a parachain (Substrate polkadot-v0.9.20 branch), I am trying to trigger some offchain tasks using an offchain worker in my pallet, but the task is not triggered. I checked that the `on_finalize` hook is correctly triggered, but not the `offchain_worker`...  &#xD;&#xA;I also tried the `--offchain-worker always` command line flag, without any success.  &#xD;&#xA;&#xD;&#xA;Is this supposed to work on parachain nodes ?  &#xD;&#xA;&#xD;&#xA;Thanks for your help." ContentLicense="CC BY-SA 4.0" />
  <row Id="9708" PostHistoryTypeId="2" PostId="2599" RevisionGUID="be96ff95-8559-4282-83f3-bb6add86515d" CreationDate="2022-05-13T18:04:50.903" UserId="213" Text="I have an rpc&#xD;&#xA;&#xD;&#xA;    #[rpc]&#xD;&#xA;    pub trait ShivarthuApi&lt;BlockHash&gt; {&#xD;&#xA;    	#[rpc(name = &quot;shivarthu_challengerevidence&quot;)]&#xD;&#xA;    	fn get_challengers_evidence(&#xD;&#xA;    		&amp;self,&#xD;&#xA;    		at: Option&lt;BlockHash&gt;,&#xD;&#xA;    		profile_citizenid: u128,&#xD;&#xA;    		offset: u64,&#xD;&#xA;    		limit: u16,&#xD;&#xA;    	) -&gt; Result&lt;Vec&lt;u128&gt;&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;With curl when I pass null it gives results&#xD;&#xA;&#xD;&#xA;    curl http://localhost:9933 -H &quot;Content-Type:application/json;charset=utf-8&quot; -d   '{&#xD;&#xA;         &quot;jsonrpc&quot;:&quot;2.0&quot;,&#xD;&#xA;          &quot;id&quot;:1,&#xD;&#xA;          &quot;method&quot;:&quot;shivarthu_challengerevidence&quot;,&#xD;&#xA;          &quot;params&quot;: [null, 0, 0, 5]&#xD;&#xA;        }'&#xD;&#xA;&#xD;&#xA;But without null, it gives error:&#xD;&#xA;&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;Invalid params: invalid type: number, expected a (both 0x-prefixed or not) hex string with length of 64.&quot;},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But with my front end code using polkadot js it gives error with null or undefined:&#xD;&#xA;&#xD;&#xA;     const api2 = await ApiPromise.create({&#xD;&#xA;            provider: wsProvider,&#xD;&#xA;            rpc: {&#xD;&#xA;              shivarthu: {&#xD;&#xA;                challengerevidence: {&#xD;&#xA;                  description: 'Challenger Evidence',&#xD;&#xA;                  params: [&#xD;&#xA;                    {&#xD;&#xA;                      name: 'at',&#xD;&#xA;                      type: 'Hash',&#xD;&#xA;                      isOptional: true,&#xD;&#xA;                    },&#xD;&#xA;                    {&#xD;&#xA;                      name: 'profile_citizenid',&#xD;&#xA;                      type: 'u128',&#xD;&#xA;                    },&#xD;&#xA;                    {&#xD;&#xA;                      name: 'offset',&#xD;&#xA;                      type: 'u64',&#xD;&#xA;                    },&#xD;&#xA;                    {&#xD;&#xA;                      name: 'limit',&#xD;&#xA;                      type: 'u16',&#xD;&#xA;                    },&#xD;&#xA;                  ],&#xD;&#xA;                  type: 'Vec&lt;u128&gt;',&#xD;&#xA;                },&#xD;&#xA;              },&#xD;&#xA;            },&#xD;&#xA;          })&#xD;&#xA;       &#xD;&#xA;    &#xD;&#xA;          let data = await api2.rpc.shivarthu.challengerevidence(null, 0, 0, 5)&#xD;&#xA;          console.log(data)&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;&#xD;&#xA;    index.js:73 Uncaught (in promise) Error: 9876: Something wrong: Application, UnknownBlock, Header was not found in the database: 0x0000000000000000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9710" PostHistoryTypeId="1" PostId="2599" RevisionGUID="be96ff95-8559-4282-83f3-bb6add86515d" CreationDate="2022-05-13T18:04:50.903" UserId="213" Text="runtime custom rpc is not taking &quot;at&quot; params as optional" ContentLicense="CC BY-SA 4.0" />
  <row Id="9711" PostHistoryTypeId="3" PostId="2599" RevisionGUID="be96ff95-8559-4282-83f3-bb6add86515d" CreationDate="2022-05-13T18:04:50.903" UserId="213" Text="|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9712" PostHistoryTypeId="5" PostId="2574" RevisionGUID="818fdcd5-1eb5-4568-b7ac-60c3b1c38864" CreationDate="2022-05-13T18:10:17.227" UserId="590" Comment="deleted 1198 characters in body" Text="I came across the following substrate recipe [Cache Multiple Calls][1]&#xD;&#xA;&#xD;&#xA;that explains how we can cache multiple reads by cloning the value or copying. Is this still a valid recipe?&#xD;&#xA;&#xD;&#xA;My understanding is that multiple reads are cached as described in the [documentation][1]:&#xD;&#xA;&#xD;&#xA;&gt;Multiple reads of the same value count as one read.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9713" PostHistoryTypeId="2" PostId="2600" RevisionGUID="bf783773-e004-4746-a8ed-ef29736c09f7" CreationDate="2022-05-13T18:14:20.090" UserId="283" Text="You're defining a trait called `Trait`, which will idiomatically be referred to in other places as `your_pallet_name::Trait`.&#xD;&#xA;&#xD;&#xA;It descends from `balances::Trait`, which means that this functionality is dependent on the balances functionality and can make use of it.&#xD;&#xA;&#xD;&#xA;The `Event` type would be fulfilled by the actual top-level `Event` type when the runtime is put together (and your pallet is combined with other pallets to produce an event type that encompasses events from all the pallets together). The bounds indicate that it's convertible `From` the local events declared by your pallet, and that it's convertible `Into` the low-level event type that actually gets placed in the event storage at the end of the block." ContentLicense="CC BY-SA 4.0" />
  <row Id="9715" PostHistoryTypeId="5" PostId="2575" RevisionGUID="b2433d18-2205-446e-9ef6-3805651a6c57" CreationDate="2022-05-13T18:19:59.907" UserId="29" Comment="Improved solution." Text="Here is an example of using the [`uniques`](https://paritytech.github.io/substrate/latest/pallet_uniques/pallet/index.html) pallet to create non-fungible assets:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;export const createNonFungibleAssets = async () =&gt; {&#xD;&#xA;    let tx = api.tx.utility.batchAll([&#xD;&#xA;        api.tx.uniques.create(classId, admin),&#xD;&#xA;        api.tx.uniques.setAttribute(classId, 1, &quot;cid&quot;, &quot;FgsChd2hVdrJ6bfo3WBcTW4iZnpHm8TEzWkLHmLpXhF68k&quot;),&#xD;&#xA;        api.tx.uniques.setAttribute(classId, 2, &quot;cid&quot;, &quot;JrqChd2hKbrJ6bfo3WBcTW4iZnpHm8TEzWkLHmLpXhF68d&quot;),&#xD;&#xA;        api.tx.uniques.setAttribute(classId, 3, &quot;cid&quot;, &quot;LxmChd2hSsrJ6bfo3WBcTW4iZnpHm8TEzWkLHmLpXhF68a&quot;),&#xD;&#xA;        api.tx.uniques.mint(classId, 1, owner),&#xD;&#xA;        api.tx.uniques.mint(classId, 2, owner),&#xD;&#xA;        api.tx.uniques.mint(classId, 3, owner)&#xD;&#xA;    ])&#xD;&#xA;    tx.signAndSend(pair, ({ status }) =&gt; {&#xD;&#xA;        if (status.isInBlock) {&#xD;&#xA;          console.log(`included in ${status.asInBlock}`);&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Typically you will not store the image on-chain. You would use a third-party service to store the images and store the hash on-chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="9716" PostHistoryTypeId="13" PostId="2575" RevisionGUID="d5d3f710-b879-4aa3-b206-2a33521a76cf" CreationDate="2022-05-13T18:20:03.583" UserId="29" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="9717" PostHistoryTypeId="2" PostId="2601" RevisionGUID="7688c220-8115-40d2-85c7-ecb504451719" CreationDate="2022-05-13T18:43:05.953" UserId="18" Text="If it helps you need to check if you have a health check running, sometimes that causes an influx of connection requests which overloads your connection limit&#xD;&#xA;&#xD;&#xA;I am not sure closing the window disconnects the connection, perhaps someone else can confirm " ContentLicense="CC BY-SA 4.0" />
  <row Id="9719" PostHistoryTypeId="12" PostId="2601" RevisionGUID="7309306b-f683-4b28-9da3-f952680169b9" CreationDate="2022-05-13T18:44:19.893" UserId="18" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:18,&quot;DisplayName&quot;:&quot;Sam Elamin&quot;}]}" />
  <row Id="9724" PostHistoryTypeId="2" PostId="2603" RevisionGUID="d6545ebd-10ac-4de3-994c-223142111d00" CreationDate="2022-05-13T22:36:40.593" UserId="373" Text="I have been looking deep dive into Substrate and trying to understand things behind the hood, especially storage API. &#xD;&#xA;&#xD;&#xA;I am really keen to explore more in the Merkel abstraction between Storage API and KV database. &#xD;&#xA;&#xD;&#xA;For example: &#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    pub(super) type SomeComplexValue&lt;T: Config&gt; = StorageValue&lt;_, T::AccountId, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;`SomeComplexValue` will have prefix in kv database when we query it through Storage RPC. But how Merkel transform block transaction into these kv and save to database. Does state proof of each block will save on kv database too?&#xD;&#xA;&#xD;&#xA;Looking forward to some great insights and documentation that explains these concepts in depth so as Substrate Builder, I can fully understand these concepts to best use of storage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="9726" PostHistoryTypeId="1" PostId="2603" RevisionGUID="d6545ebd-10ac-4de3-994c-223142111d00" CreationDate="2022-05-13T22:36:40.593" UserId="373" Text="How key-values database and Merkel Tree works together on Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="9727" PostHistoryTypeId="3" PostId="2603" RevisionGUID="d6545ebd-10ac-4de3-994c-223142111d00" CreationDate="2022-05-13T22:36:40.593" UserId="373" Text="|runtime|storage|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9728" PostHistoryTypeId="2" PostId="2604" RevisionGUID="2c66352c-e65c-4e7d-83d7-2caf880949e4" CreationDate="2022-05-14T01:34:25.927" UserId="28" Text="You should check out the Storage Deep Dive here:&#xD;&#xA;&#xD;&#xA;https://www.shawntabrizi.com/substrate/substrate-storage-deep-dive/&#xD;&#xA;&#xD;&#xA;If you have more specific questions, feel free to open another post." ContentLicense="CC BY-SA 4.0" />
  <row Id="9730" PostHistoryTypeId="5" PostId="2604" RevisionGUID="4ceba05d-7ec2-4bc7-b962-9cfdaa34c7f9" CreationDate="2022-05-14T01:39:28.250" UserId="28" Comment="added 176 characters in body" Text="You should check out the Storage Deep Dive here:&#xD;&#xA;&#xD;&#xA;https://www.shawntabrizi.com/substrate/substrate-storage-deep-dive/&#xD;&#xA;&#xD;&#xA;If you have more specific questions, feel free to open another post.&#xD;&#xA;&#xD;&#xA;Some Highlights:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hEojl.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZJJ2s.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="9731" PostHistoryTypeId="2" PostId="2605" RevisionGUID="9d61a9e5-7c11-4e61-a480-1534f75f0e00" CreationDate="2022-05-14T01:40:45.597" UserId="34" Text="One of the best in class resources for an overview IMHO is the [Sub0 storage deep dive by Shawn Tabrizi](https://www.youtube.com/watch?v=kKKOL20FdII) and the presentation created [here](https://www.shawntabrizi.com/substrate/substrate-storage-deep-dive/).&#xD;&#xA;&#xD;&#xA;The primary [advanced docs on storage](https://docs.substrate.io/v3/advanced/storage/) are also good to get more context. " ContentLicense="CC BY-SA 4.0" />
  <row Id="9734" PostHistoryTypeId="5" PostId="2555" RevisionGUID="a4ca72be-4251-4d16-a2c2-c990f5c6e62c" CreationDate="2022-05-14T01:48:31.627" UserId="1867" Comment="Fix grammar, clearify intent" Text="I am making a new UI for substrate based blockchain, and found the code [here][1] to upload a Smart Contract.&#xD;&#xA;&#xD;&#xA;The code allows you to either upload `metadata.json &amp;&amp; cont.wasm` files or a `cont.contract` file.&#xD;&#xA;&#xD;&#xA;What is the difference between the usage of a .json &amp;&amp; .wasm file and a .contract file for instantiation?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github1s.com/polkadot-js/apps/blob/master/packages/page-contracts/src/Codes/Upload.tsx#L105" ContentLicense="CC BY-SA 4.0" />
  <row Id="9735" PostHistoryTypeId="24" PostId="2555" RevisionGUID="a4ca72be-4251-4d16-a2c2-c990f5c6e62c" CreationDate="2022-05-14T01:48:31.627" Comment="Proposed by 1867 approved by 34 edit id of 194" ContentLicense="CC BY-SA 4.0" />
  <row Id="9736" PostHistoryTypeId="5" PostId="2222" RevisionGUID="2df07cca-207f-4d25-899e-0324717439aa" CreationDate="2022-05-14T01:48:47.593" UserId="85" Comment="added 237 characters in body" Text="Maximal Extractable Value (MEV) on polkadot could be called CEV (Collator Extracted Value) or VEV (Validator Extracted Value), but best thought of as BAEV (Block Author Extracted Value), since it applies equally to all consensus methods." ContentLicense="CC BY-SA 4.0" />
  <row Id="9737" PostHistoryTypeId="24" PostId="2222" RevisionGUID="2df07cca-207f-4d25-899e-0324717439aa" CreationDate="2022-05-14T01:48:47.593" Comment="Proposed by 85 approved by 28, 34 edit id of 178" ContentLicense="CC BY-SA 4.0" />
  <row Id="9738" PostHistoryTypeId="5" PostId="2266" RevisionGUID="77865b41-5834-46fc-8017-b808786de449" CreationDate="2022-05-14T01:48:52.657" UserId="85" Comment="added 202 characters in body" Text="Here's ZK proofs explained in ways everyone can understand:&#xD;&#xA;&#xD;&#xA;https://www.youtube.com/watch?v=fOGdb1CTu5c&#xD;&#xA;&#xD;&#xA;For news on ZK there is the excellent [zk podcast][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://zeroknowledge.fm/" ContentLicense="CC BY-SA 4.0" />
  <row Id="9739" PostHistoryTypeId="24" PostId="2266" RevisionGUID="77865b41-5834-46fc-8017-b808786de449" CreationDate="2022-05-14T01:48:52.657" Comment="Proposed by 85 approved by 28, 34 edit id of 182" ContentLicense="CC BY-SA 4.0" />
  <row Id="9740" PostHistoryTypeId="5" PostId="2469" RevisionGUID="21469a58-87fd-4f0d-9f58-964f5c128920" CreationDate="2022-05-14T01:49:14.743" UserId="88" Comment="Fixed grammar to portray what I think is the intended meaning," Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BqJpx.png&#xD;&#xA;&#xD;&#xA;Request RPC via http. How to obtain transaction results and transaction time.&#xD;&#xA;&#xD;&#xA;Is there a friend who can give me some advice? thank you very much indeed&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9741" PostHistoryTypeId="24" PostId="2469" RevisionGUID="21469a58-87fd-4f0d-9f58-964f5c128920" CreationDate="2022-05-14T01:49:14.743" Comment="Proposed by 88 approved by 34 edit id of 195" ContentLicense="CC BY-SA 4.0" />
  <row Id="9742" PostHistoryTypeId="5" PostId="2267" RevisionGUID="c46c346b-cda9-4b12-a835-0e30928b6025" CreationDate="2022-05-14T01:49:23.210" UserId="85" Comment="added 88 characters in body" Text="Zero Knowledge. Being able to prove you know something without disclosing what you know." ContentLicense="CC BY-SA 4.0" />
  <row Id="9743" PostHistoryTypeId="24" PostId="2267" RevisionGUID="c46c346b-cda9-4b12-a835-0e30928b6025" CreationDate="2022-05-14T01:49:23.210" Comment="Proposed by 85 approved by 28, 34 edit id of 183" ContentLicense="CC BY-SA 4.0" />
  <row Id="9744" PostHistoryTypeId="5" PostId="2223" RevisionGUID="b3b14c6e-aef6-4049-a6ad-557dc76f4140" CreationDate="2022-05-14T01:49:27.097" UserId="85" Comment="added 153 characters in body" Text="Maximal Extractable Value is the value gained from re-ordering transactions or specifically selecting transactions that should be in the candidate block." ContentLicense="CC BY-SA 4.0" />
  <row Id="9745" PostHistoryTypeId="24" PostId="2223" RevisionGUID="b3b14c6e-aef6-4049-a6ad-557dc76f4140" CreationDate="2022-05-14T01:49:27.097" Comment="Proposed by 85 approved by 28, 34 edit id of 179" ContentLicense="CC BY-SA 4.0" />
  <row Id="9747" PostHistoryTypeId="10" PostId="2537" RevisionGUID="a6f877ab-2727-4a2c-8541-4c63bf1ed5ec" CreationDate="2022-05-14T01:50:43.307" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:53,&quot;DisplayName&quot;:&quot;Gav&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="9748" PostHistoryTypeId="10" PostId="2469" RevisionGUID="cfa1d641-fb04-4c54-943c-69dbae618c31" CreationDate="2022-05-14T01:51:03.173" UserId="28" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;},{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Alejandro Martínez&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="9749" PostHistoryTypeId="6" PostId="2599" RevisionGUID="7a2cc950-cf27-4242-b137-e1f57535b6d1" CreationDate="2022-05-14T05:16:34.647" UserId="213" Comment="edited tags" Text="|polkadot-js|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9750" PostHistoryTypeId="2" PostId="2606" RevisionGUID="cd17fe93-392c-4940-9773-270223da5e33" CreationDate="2022-05-14T05:16:39.517" UserId="627" Text="I believe there is an issue where the JS API only expects the optional `at` param as the very last one - basically the de-facto standard order of RPC params in  Substrate itself.&#xD;&#xA;&#xD;&#xA;So basically the form it is used to dealing with and caters for is the following -&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[rpc]&#xD;&#xA;pub trait ShivarthuApi&lt;BlockHash&gt; {&#xD;&#xA;    #[rpc(name = &quot;shivarthu_challengerevidence&quot;)]&#xD;&#xA;    fn get_challengers_evidence(&#xD;&#xA;        &amp;self,&#xD;&#xA;        profile_citizenid: u128,&#xD;&#xA;        offset: u64,&#xD;&#xA;        limit: u16,&#xD;&#xA;        at: Option&lt;BlockHash&gt;,&#xD;&#xA;    ) -&gt; Result&lt;Vec&lt;u128&gt;&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;An additional tip, for the `at` params, also add the `isHistoric: true` (in adition to the existing `isOptional`) flag to the JS API definition. It indicates to the API that this param may be indicate results from older blocks with different runtime/types." ContentLicense="CC BY-SA 4.0" />
  <row Id="9752" PostHistoryTypeId="5" PostId="2606" RevisionGUID="1b893b7f-9fdb-4cc3-9f96-d0cb59dadd9f" CreationDate="2022-05-14T05:29:35.290" UserId="627" Comment="added 283 characters in body" Text="I believe there is an issue where the JS API only expects the optional `at` param as the very last one - basically the de-facto standard order of RPC params in  Substrate itself.&#xD;&#xA;&#xD;&#xA;So basically the form it is used to dealing with and caters for is the following -&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[rpc]&#xD;&#xA;pub trait ShivarthuApi&lt;BlockHash&gt; {&#xD;&#xA;    #[rpc(name = &quot;shivarthu_challengerevidence&quot;)]&#xD;&#xA;    fn get_challengers_evidence(&#xD;&#xA;        &amp;self,&#xD;&#xA;        profile_citizenid: u128,&#xD;&#xA;        offset: u64,&#xD;&#xA;        limit: u16,&#xD;&#xA;        at: Option&lt;BlockHash&gt;,&#xD;&#xA;    ) -&gt; Result&lt;Vec&lt;u128&gt;&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;An additional tip, for the `at` params, also add the `isHistoric: true` (in adition to the existing `isOptional`) flag to the JS API definition. It indicates to the API that this param may be indicate results from older blocks with different runtime/types.&#xD;&#xA;&#xD;&#xA;Once defined for calling, it means it should be completely omitted when not needed -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// no hash, no param&#xD;&#xA;let data = await api2.rpc.shivarthu.challengerevidence(0, 0, 5)&#xD;&#xA;&#xD;&#xA;// hash, add param&#xD;&#xA;let data = await api2.rpc.shivarthu.challengerevidence(0, 0, 5, 0x...)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9753" PostHistoryTypeId="52" PostId="2603" RevisionGUID="9ee4412b-f97a-40b0-86f5-4ba183b201b7" CreationDate="2022-05-14T06:40:05.223" />
  <row Id="9754" PostHistoryTypeId="2" PostId="2607" RevisionGUID="5e8d7bc1-86aa-4b75-ab49-80076ba7b941" CreationDate="2022-05-14T06:44:57.143" UserId="213" Text="Here are changes to be made, moving `at` to the last:&#xD;&#xA;&#xD;&#xA;    #[rpc]&#xD;&#xA;    pub trait ShivarthuApi&lt;BlockHash&gt; {&#xD;&#xA;    	#[rpc(name = &quot;shivarthu_challengerevidence&quot;)]&#xD;&#xA;    	fn get_challengers_evidence(&#xD;&#xA;    		&amp;self,&#xD;&#xA;    		profile_citizenid: u128,&#xD;&#xA;    		offset: u64,&#xD;&#xA;    		limit: u16,&#xD;&#xA;    		at: Option&lt;BlockHash&gt;,&#xD;&#xA;    	) -&gt; Result&lt;Vec&lt;u128&gt;&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Similarly, keep `at` as last argument here in `get_challengers_evidence`:&#xD;&#xA;&#xD;&#xA;    impl&lt;C, Block&gt; ShivarthuApi&lt;&lt;Block as BlockT&gt;::Hash&gt; for Shivarthu&lt;C, Block&gt;&#xD;&#xA;    where&#xD;&#xA;    	Block: BlockT,&#xD;&#xA;    	C: Send + Sync + 'static,&#xD;&#xA;    	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;    	C: HeaderBackend&lt;Block&gt;,&#xD;&#xA;    	C::Api: ShivarthuRuntimeApi&lt;Block&gt;,&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    	fn get_challengers_evidence(&#xD;&#xA;    		&amp;self,		&#xD;&#xA;    		profile_citizenid: u128,&#xD;&#xA;    		offset: u64,&#xD;&#xA;    		limit: u16,&#xD;&#xA;    		at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;,&#xD;&#xA;    	) -&gt; Result&lt;Vec&lt;u128&gt;&gt; {&#xD;&#xA;    		let api = self.client.runtime_api();&#xD;&#xA;    		let at = BlockId::hash(at.unwrap_or_else(||&#xD;&#xA;    			// If the block hash is not supplied assume the best block.&#xD;&#xA;    			self.client.info().best_hash));&#xD;&#xA;    &#xD;&#xA;    		let runtime_api_result =&#xD;&#xA;    			api.get_challengers_evidence(&amp;at, profile_citizenid, offset, limit);&#xD;&#xA;    		runtime_api_result.map_err(|e| RpcError {&#xD;&#xA;    			code: ErrorCode::ServerError(9876), // No real reason for this value&#xD;&#xA;    			message: &quot;Something wrong&quot;.into(),&#xD;&#xA;    			data: Some(format!(&quot;{:?}&quot;, e).into()),&#xD;&#xA;    		})&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But `&amp;at` should be first argument in `let runtime_api_result = api.get_challengers_evidence(&amp;at, profile_citizenid, offset, limit)`, otherwise it gives compilation error. &#xD;&#xA;&#xD;&#xA;And move `at` to the last in params in polkadotjs, otherwise it gives error,&#xD;&#xA;&#xD;&#xA;    const api2 = await ApiPromise.create({&#xD;&#xA;            provider: wsProvider,&#xD;&#xA;            rpc: {&#xD;&#xA;              shivarthu: {&#xD;&#xA;                challengerevidence: {&#xD;&#xA;                  description: 'Challenger Evidence',&#xD;&#xA;                  params: [&#xD;&#xA;                    {&#xD;&#xA;                      name: 'profile_citizenid',&#xD;&#xA;                      type: 'u128',&#xD;&#xA;                    },&#xD;&#xA;                    {&#xD;&#xA;                      name: 'offset',&#xD;&#xA;                      type: 'u64',&#xD;&#xA;                    },&#xD;&#xA;                    {&#xD;&#xA;                      name: 'limit',&#xD;&#xA;                      type: 'u16',&#xD;&#xA;                    },&#xD;&#xA;                    {&#xD;&#xA;                      name: 'at',&#xD;&#xA;                      type: 'Hash',&#xD;&#xA;                      isOptional: true,&#xD;&#xA;                      isHistoric: true,&#xD;&#xA;                    },&#xD;&#xA;                  ],&#xD;&#xA;                  type: 'Vec&lt;u128&gt;',&#xD;&#xA;                },&#xD;&#xA;              },&#xD;&#xA;            },&#xD;&#xA;          }) &#xD;&#xA;&#xD;&#xA;Then `at` becomes optional and gives no error:&#xD;&#xA;&#xD;&#xA;     let data = await api2.rpc.shivarthu.challengerevidence(0, 0, 5)&#xD;&#xA;     console.log(data.toString())" ContentLicense="CC BY-SA 4.0" />
  <row Id="9756" PostHistoryTypeId="6" PostId="2587" RevisionGUID="e6a29e57-5700-4828-a7f2-e714a225ab82" CreationDate="2022-05-14T08:51:08.863" UserId="45" Comment="change tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9760" PostHistoryTypeId="5" PostId="2603" RevisionGUID="81f1729d-1b23-4581-9a5b-d545d4adf772" CreationDate="2022-05-14T15:30:53.757" UserId="2542" Comment="Merkel -&gt; Merkle" Text="I have been looking deep dive into Substrate and trying to understand things behind the hood, especially storage API. &#xD;&#xA;&#xD;&#xA;I am really keen to explore more in the Merkle abstraction between Storage API and KV database. &#xD;&#xA;&#xD;&#xA;For example: &#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    pub(super) type SomeComplexValue&lt;T: Config&gt; = StorageValue&lt;_, T::AccountId, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;`SomeComplexValue` will have prefix in kv database when we query it through Storage RPC. But how Merkle transform block transaction into these kv and save to database. Does state proof of each block will save on kv database too?&#xD;&#xA;&#xD;&#xA;Looking forward to some great insights and documentation that explains these concepts in depth so as Substrate Builder, I can fully understand these concepts to best use of storage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="9761" PostHistoryTypeId="4" PostId="2603" RevisionGUID="81f1729d-1b23-4581-9a5b-d545d4adf772" CreationDate="2022-05-14T15:30:53.757" UserId="2542" Comment="Merkel -&gt; Merkle" Text="How key-values database and Merkle Tree works together on Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="9762" PostHistoryTypeId="24" PostId="2603" RevisionGUID="81f1729d-1b23-4581-9a5b-d545d4adf772" CreationDate="2022-05-14T15:30:53.757" Comment="Proposed by 2542 approved by 34 edit id of 196" ContentLicense="CC BY-SA 4.0" />
  <row Id="9763" PostHistoryTypeId="2" PostId="2609" RevisionGUID="c51aa6c2-1038-4c12-9784-81e1d8c8ddff" CreationDate="2022-05-14T17:46:47.477" UserId="166" Text="Otherwise you also have the `bounded_vec!` macro which is similar to the `vec!` macro." ContentLicense="CC BY-SA 4.0" />
  <row Id="9778" PostHistoryTypeId="2" PostId="2613" RevisionGUID="dd8c3bcb-7a40-4c98-8f8e-362df7a564eb" CreationDate="2022-05-15T05:27:01.927" UserId="2394" Text="When developing Ink! smart contracts I found that `SpreadLayout` and `SpreadAllocate` cannot be derived for simple structs or enums that are members variables of the contract and I have to implement the traits manually.&#xD;&#xA;&#xD;&#xA;The compilation error occurs only when building the contract ( `cargo +nightly contract build`) but not when running test (`cargo +nightly test`)  &#xD;&#xA;&#xD;&#xA;for instance for the simple struct:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug, scale_info::TypeInfo, StorageLayout))]&#xD;&#xA;pub struct Data {&#xD;&#xA;    pub a: u64,&#xD;&#xA;    pub b: u64,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;adding `SpreadLayout` and `SpreadAllocate` to the derive macro fails.&#xD;&#xA;Same for the enum&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug, Clone, Copy, Encode, Decode, scale_info::TypeInfo, StorageLayout, SpreadLayout))]&#xD;&#xA;pub enum Type {&#xD;&#xA;    Unknown,&#xD;&#xA;    A,&#xD;&#xA;    B,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;what am I missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9780" PostHistoryTypeId="1" PostId="2613" RevisionGUID="dd8c3bcb-7a40-4c98-8f8e-362df7a564eb" CreationDate="2022-05-15T05:27:01.927" UserId="2394" Text="Ink cannot derive SpreadLayout and SpreadAllocate for simple struct and enum" ContentLicense="CC BY-SA 4.0" />
  <row Id="9781" PostHistoryTypeId="3" PostId="2613" RevisionGUID="dd8c3bcb-7a40-4c98-8f8e-362df7a564eb" CreationDate="2022-05-15T05:27:01.927" UserId="2394" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9786" PostHistoryTypeId="6" PostId="2613" RevisionGUID="4b4c67b0-4966-4536-b0db-5ae79bda1bfe" CreationDate="2022-05-15T06:13:11.917" UserId="2394" Comment="edited tags" Text="|ink|smart-contract|scale-codec|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9789" PostHistoryTypeId="5" PostId="2613" RevisionGUID="30c7c018-9336-4076-89d6-2bae8f3197f3" CreationDate="2022-05-15T09:31:51.127" UserId="2394" Comment="added 750 characters in body" Text="When developing Ink! smart contracts I found that `SpreadLayout` and `SpreadAllocate` cannot be derived for simple structs or enums that are members variables of the contract and I have to implement the traits manually.&#xD;&#xA;&#xD;&#xA;The compilation error occurs only when building the contract ( `cargo +nightly contract build`) but not when running test (`cargo +nightly test`)  &#xD;&#xA;&#xD;&#xA;for instance for the simple struct:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug, scale_info::TypeInfo, StorageLayout, SpreadAllocate))]&#xD;&#xA;pub struct Data {&#xD;&#xA;    pub a: u64,&#xD;&#xA;    pub b: u64,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;fails with:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `Data: SpreadAllocate` is not satisfied&#xD;&#xA;  --&gt; /../lib.rs:23:14&#xD;&#xA;   |&#xD;&#xA;23 |     #[derive(SpreadAllocate)]&#xD;&#xA;   |              ^^^^^^^^^^^^^^ the trait `SpreadAllocate` is not implemented for `Data`&#xD;&#xA;   |&#xD;&#xA;   = help: the following other types implement trait `SpreadAllocate`:&#xD;&#xA;             ()&#xD;&#xA;             (A, B)&#xD;&#xA;             (A, B, C)&#xD;&#xA;             (A, B, C, D)&#xD;&#xA;             (A, B, C, D, E)&#xD;&#xA;             (A, B, C, D, E, F)&#xD;&#xA;             (A, B, C, D, E, F, G)&#xD;&#xA;             (A, B, C, D, E, F, G, H)&#xD;&#xA;           and 47 others&#xD;&#xA;   = note: this error originates in the derive macro `SpreadAllocate` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;adding `SpreadLayout` and `SpreadAllocate` to the derive macro fails.&#xD;&#xA;Same for the enum&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug, Clone, Copy, Encode, Decode, scale_info::TypeInfo, StorageLayout, SpreadLayout))]&#xD;&#xA;pub enum Type {&#xD;&#xA;    Unknown,&#xD;&#xA;    A,&#xD;&#xA;    B,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;what am I missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9792" PostHistoryTypeId="2" PostId="2615" RevisionGUID="8010580a-6aec-4ff7-b92b-a1bb5eec231e" CreationDate="2022-05-15T12:42:27.723" UserId="2394" Text="When deploying a smart contract on local-net, polkadot.js fails with:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;system.ExtrinsicFailed, contracts.OutOfGas&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This seems to be due to having the following `enum` in the contract storage:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug, scale_info::TypeInfo, StorageLayout))]&#xD;&#xA;#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode)]&#xD;&#xA;pub enum Type {&#xD;&#xA;    A = 0,&#xD;&#xA;    B = 1,&#xD;&#xA;    C = 2,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Contract struct:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Contract {&#xD;&#xA;        [...]&#xD;&#xA;        account: ink_env::AccountId,&#xD;&#xA;        size: Balance,&#xD;&#xA;        deposits: Mapping&lt;ink_env::AccountId, Balance&gt;,&#xD;&#xA;        data: Data,&#xD;&#xA;        type: Type,  &lt;----&#xD;&#xA;        [...]&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Increasing max_gas_allowed to the max value does not help.&#xD;&#xA;Removing `type: Type` from the contract struct leads to successful deployment.&#xD;&#xA;&#xD;&#xA;Is this an issue with how I encoded the enum (I had to implement `SpreadAllocate` and `SpreadLayout` myself as the derive macro does not work, see [here][1]) or to limitation in max_gas_allowed in local setup?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2613/ink-cannot-derive-spreadlayout-and-spreadallocate-for-simple-struct-and-enum" ContentLicense="CC BY-SA 4.0" />
  <row Id="9794" PostHistoryTypeId="1" PostId="2615" RevisionGUID="8010580a-6aec-4ff7-b92b-a1bb5eec231e" CreationDate="2022-05-15T12:42:27.723" UserId="2394" Text="Ink contract deployment out of gas" ContentLicense="CC BY-SA 4.0" />
  <row Id="9795" PostHistoryTypeId="3" PostId="2615" RevisionGUID="8010580a-6aec-4ff7-b92b-a1bb5eec231e" CreationDate="2022-05-15T12:42:27.723" UserId="2394" Text="|polkadot-js|ink|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9804" PostHistoryTypeId="2" PostId="2618" RevisionGUID="b49abd28-7c01-42d4-b8bc-3dc507e9e83e" CreationDate="2022-05-15T15:02:50.087" UserId="599" Text="`SpreadAllocate` can't be derived for the enums([issue](https://github.com/paritytech/ink/issues/1042)), so you should implement it manually.&#xD;&#xA;&#xD;&#xA;You are deriving `SpreadLayout` wrong=) `#[cfg_attr(feature = &quot;std&quot;, derive(...)]` means - derive it only if the `std` feature is enabled.&#xD;&#xA;&#xD;&#xA;But the contract build has two phases:&#xD;&#xA;1. Build the contract's WASM in `no_std` mode.&#xD;&#xA;2. Build fo the contract's metadata in `std` mode.&#xD;&#xA;&#xD;&#xA;`SpreadLayout` and `SpreadAllocate` should be derived for both phases. `StorageLayout` only for `std` because it is required to generate metadata.&#xD;&#xA;&#xD;&#xA;The right deriving:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(SpreadLayout, SpreadAllocate)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug, scale_info::TypeInfo, StorageLayout))]&#xD;&#xA;pub struct Data {&#xD;&#xA;    pub a: u64,&#xD;&#xA;    pub b: u64,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(SpreadLayout)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug, Clone, Copy, Encode, Decode, scale_info::TypeInfo, StorageLayout))]&#xD;&#xA;pub enum Type {&#xD;&#xA;    Unknown,&#xD;&#xA;    A,&#xD;&#xA;    B,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl SpreadAllocate for Type {&#xD;&#xA;...&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9806" PostHistoryTypeId="2" PostId="2619" RevisionGUID="ce2614c4-063c-46a3-b049-1e61eef3efe4" CreationDate="2022-05-15T15:29:36.103" UserId="599" Text="Each contract can emit events. If you don't see the events in ABI, that doesn't mean that events are not emitted. It means that you don't know right now how to decode those events.&#xD;&#xA;&#xD;&#xA;Currently, only events defined in the root contract are included in the ABI. [The issue](https://github.com/paritytech/ink/pull/1243) will change the behavior and all events that are emitted by the **root** contract will be included. But that doesn't include the events that can be potentially emitted by **not root** contracts during cross-contract calls. But the issue is in progress and you can participate in the design=)&#xD;&#xA;&#xD;&#xA;I remember the `cargo-contract` team plan to support the merging of metadata from several contracts. But I can't find the issue=( Maybe @cmichi knows&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9809" PostHistoryTypeId="2" PostId="2620" RevisionGUID="f31ff85d-8d91-462d-a7de-e07477860f54" CreationDate="2022-05-15T18:04:33.963" UserId="2525" Text="I'm using an InkLang implementation for 721Light/1155 (undecided)&#xD;&#xA;For my purpose, the contract is offering domain-like NFTs. So an infinite amount of IDs, but a max balance of 1 for any ID.&#xD;&#xA;From what I'm seeing for Solidity, the type has to be uint256 to comply with IERCs and the general market.&#xD;&#xA;&#xD;&#xA;Would the same go for the InkLang implementations?&#xD;&#xA;Should I encode string-&gt;uint256 or otherwise have to create my own interface?&#xD;&#xA;General market considerations are desired but not explicitly necessary." ContentLicense="CC BY-SA 4.0" />
  <row Id="9811" PostHistoryTypeId="1" PostId="2620" RevisionGUID="f31ff85d-8d91-462d-a7de-e07477860f54" CreationDate="2022-05-15T18:04:33.963" UserId="2525" Text="Non-uint256 TokenID for 721/1155 NFTs? (arbitrary var types)" ContentLicense="CC BY-SA 4.0" />
  <row Id="9812" PostHistoryTypeId="3" PostId="2620" RevisionGUID="f31ff85d-8d91-462d-a7de-e07477860f54" CreationDate="2022-05-15T18:04:33.963" UserId="2525" Text="|ink|smart-contract|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9813" PostHistoryTypeId="5" PostId="2620" RevisionGUID="68a9388e-d5b5-47ec-ac6f-0e6e88bf79d5" CreationDate="2022-05-15T18:07:35.793" UserId="2525" Comment="added 8 characters in body" Text="I'm using an InkLang implementation for 721Light/1155 (undecided)&#xD;&#xA;For my purpose, the contract is offering domain-like NFTs. So an infinite amount of IDs, but a max balance of 1 for any ID.&#xD;&#xA;From what I'm seeing for Solidity, the tokenID type has to be uint256 to comply with IERCs and the general market.&#xD;&#xA;&#xD;&#xA;Would the same go for the InkLang implementations?&#xD;&#xA;Should I encode string-&gt;uint256 or otherwise have to create my own interface?&#xD;&#xA;General market considerations are desired but not explicitly necessary." ContentLicense="CC BY-SA 4.0" />
  <row Id="9814" PostHistoryTypeId="5" PostId="2620" RevisionGUID="03f12e2c-69a6-4c65-ba57-72511f1eda16" CreationDate="2022-05-15T18:08:21.093" UserId="2525" Comment="added 9 characters in body" Text="I'm using an InkLang implementation for 721Light/1155 (undecided)&#xD;&#xA;For my purpose, the contract is offering domain-like NFTs. So an infinite amount of IDs, but a max balance of 1 for any ID.&#xD;&#xA;From what I'm seeing for Solidity, the tokenID type has to be uint256 to comply with IERCs and the general market.&#xD;&#xA;&#xD;&#xA;Would the same go for the InkLang implementations?&#xD;&#xA;Should I encode string-&gt;uint256 offchain or otherwise have to create my own interface?&#xD;&#xA;General market considerations are desired but not explicitly necessary." ContentLicense="CC BY-SA 4.0" />
  <row Id="9815" PostHistoryTypeId="5" PostId="2620" RevisionGUID="1a6846b9-05f8-481b-b5f5-d27a998f1d40" CreationDate="2022-05-15T18:08:41.360" UserId="2525" Comment="edited body" Text="I'm using an InkLang implementation for 721Light/1155 (undecided)&#xD;&#xA;For my purpose, the contract is offering domain-like NFTs. So an infinite amount of IDs, but a max balance of 1 for any ID.&#xD;&#xA;From what I'm seeing for Solidity, the tokenID type has to be uint256 to comply with IERCs and the general market.&#xD;&#xA;&#xD;&#xA;Would the same go for the InkLang implementations?&#xD;&#xA;Should I encode string-&gt;uint256 offchain or otherwise have to create my own interface?&#xD;&#xA;Market support considerations are desired but not explicitly necessary." ContentLicense="CC BY-SA 4.0" />
  <row Id="9816" PostHistoryTypeId="5" PostId="2620" RevisionGUID="c5bb751d-5d46-40ff-8353-99cddb8c6ac7" CreationDate="2022-05-15T18:08:58.103" UserId="2525" Comment="deleted 16 characters in body" Text="I'm using an InkLang implementation for 721Light/1155 (undecided)&#xD;&#xA;For my purpose, the contract is offering domain-like NFTs. So an infinite amount of IDs, but a max balance of 1 for any ID.&#xD;&#xA;From what I'm seeing for Solidity, the tokenID type has to be uint256 to comply with IERCs and the general market.&#xD;&#xA;&#xD;&#xA;Would the same go for the InkLang implementations?&#xD;&#xA;Should I encode string-&gt;uint256 offchain or otherwise have to create my own interface?&#xD;&#xA;Market support is desired but not explicitly necessary." ContentLicense="CC BY-SA 4.0" />
  <row Id="9817" PostHistoryTypeId="2" PostId="2621" RevisionGUID="7ec8910e-4c76-4701-a8d0-a3018233f933" CreationDate="2022-05-15T18:25:21.377" UserId="599" Text="For WASM implementation of Fungible(Erc20), Non-Fungible(Erc721), and Multi tokens(Erc1155) were created own standards.&#xD;&#xA;- [PSP22 - Fungible token](https://github.com/w3f/PSPs/blob/master/PSPs/psp-22.md)&#xD;&#xA;- [PSP34 - Non-fungible token](https://github.com/w3f/PSPs/blob/master/PSPs/psp-34.md)&#xD;&#xA;- [PSP35 - Multi token](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-35.md)" ContentLicense="CC BY-SA 4.0" />
  <row Id="9823" PostHistoryTypeId="2" PostId="2623" RevisionGUID="916b6b54-efef-4b16-97db-4077816dbf47" CreationDate="2022-05-15T19:32:44.793" UserId="2540" Text="Is it technically possible to upgrade Ethereum to be Substrate compatible blockchain?&#xD;&#xA;&#xD;&#xA;I understand there is likely to be strong resistance toward such idea in ETH community but I am interested only theoretically about technical possibilities.&#xD;&#xA;&#xD;&#xA;Will the upgrade like that result in issues for ETH ecosystem or it can be smooth transition like ordinary hard fork that is happening in ETH in case of any bigger upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9825" PostHistoryTypeId="1" PostId="2623" RevisionGUID="916b6b54-efef-4b16-97db-4077816dbf47" CreationDate="2022-05-15T19:32:44.793" UserId="2540" Text="Ethereum chain as a Substrate chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="9826" PostHistoryTypeId="3" PostId="2623" RevisionGUID="916b6b54-efef-4b16-97db-4077816dbf47" CreationDate="2022-05-15T19:32:44.793" UserId="2540" Text="|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9832" PostHistoryTypeId="2" PostId="2625" RevisionGUID="bbe11ac1-82cc-4f8f-bc05-82665777a9f9" CreationDate="2022-05-16T02:58:26.543" UserId="28" Text="The first thing that needs to be understood is the existence of a Storage Overlay, which caches values which have been read or written to inside of a block. This means, if you read a storage item, the first time, it will need to navigate through the whole merkle trie, and fetch that storage item. But the second time, it just reads from the storage overlay, since that value has been cached by the client.&#xD;&#xA;&#xD;&#xA;Now reading from this storage overlay is quite fast compared to reading from the database, but still will never be as fast as using an in-memory value, since reading from storage overlay.&#xD;&#xA;&#xD;&#xA;So you should absolutely optimize this kind of behavior by using `Clone` or `Copy` where possible. For example:&#xD;&#xA;&#xD;&#xA;**This is bad:**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// This is strictly less efficient.&#xD;&#xA;let my_value = MyStorage::&lt;T&gt;::get();&#xD;&#xA;let my_value_again = MyStorage::&lt;T&gt;::get();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**This is good:**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// This is strictly more efficient.&#xD;&#xA;let my_value = MyStorage::&lt;T&gt;::get();&#xD;&#xA;let my_value_again = my_value.clone();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where such optimizations can happen, they should. Hopefully this is pretty obvious in retrospect." ContentLicense="CC BY-SA 4.0" />
  <row Id="9835" PostHistoryTypeId="2" PostId="2626" RevisionGUID="331b87ed-bbf0-41d6-9fe4-fd3ed181d3ba" CreationDate="2022-05-16T03:14:45.047" UserId="28" Text="It looks like you are running into an issue which is noted here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/10719&#xD;&#xA;&#xD;&#xA;Specifically, `AccountIdConversion` is potentially truncating and can be non-unique. In this case, your tests probably uses an `AccountId` type with very few bytes, and in this case, your accounts are overlapping due to this flaw.&#xD;&#xA;&#xD;&#xA;The solution is to update your tests to use a type with more bytes, like `AccountId32`, rather than something like `u64`.&#xD;&#xA;&#xD;&#xA;Hopefully, by the time others find this issue, the PR resolving this will be merged." ContentLicense="CC BY-SA 4.0" />
  <row Id="9837" PostHistoryTypeId="5" PostId="2546" RevisionGUID="167c2b30-1558-4b29-8f69-45d78719174e" CreationDate="2022-05-16T03:43:34.003" UserId="1789" Comment="added 34 characters in body" Text="You need to add your collator command, which is `target/release/parachain-collator` if your parachain is based on substrate-parachain-template.&#xD;&#xA;Notice there is no DOT &quot;.&quot; before the command!&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/x-network/collator:latest&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9839" PostHistoryTypeId="2" PostId="2627" RevisionGUID="14ecb67c-a0c6-4767-a674-94316e89d583" CreationDate="2022-05-16T06:38:42.223" UserId="85" Text="I sought to find xcm extrinsics sent from the moonriver/moonbeam parachains but it seems to do things a little differently. Where can I find the sent message or at least the message hash so that I can correlate it with the UMP message id that I can see on the relay chain?&#xD;&#xA;&#xD;&#xA;Are the messages inside the `ethereum.Executed` extrinsic? Would decoding the `eth.Log` events show some of this? Is there a good moonscan link that can show some of this decoded?&#xD;&#xA;&#xD;&#xA;With kind regards,&#xD;&#xA;&#xD;&#xA;Giles" ContentLicense="CC BY-SA 4.0" />
  <row Id="9841" PostHistoryTypeId="1" PostId="2627" RevisionGUID="14ecb67c-a0c6-4767-a674-94316e89d583" CreationDate="2022-05-16T06:38:42.223" UserId="85" Text="How can I see what xcm message the moonbeam/river parachain has sent?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9842" PostHistoryTypeId="3" PostId="2627" RevisionGUID="14ecb67c-a0c6-4767-a674-94316e89d583" CreationDate="2022-05-16T06:38:42.223" UserId="85" Text="|xcm|moonbeam|moonriver|xcm-message-correlation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9843" PostHistoryTypeId="2" PostId="2628" RevisionGUID="c07d9dc5-fd09-4740-b0c3-c59b51f2721d" CreationDate="2022-05-16T06:45:57.773" UserId="2246" Text="Here are the details, I need to do a storage migration for a pallet. I can read the storage item from the [polkadot.js.app](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frhala-api.phala.network%2Fws#/chainstate), as shown below:&#xD;&#xA;[![register info of KSM][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/IMzrI.png&#xD;&#xA;&#xD;&#xA;however, I can not read it from migration script(**returned None**), code is:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;let reg_info = RegistryInfoByIds::&lt;T&gt;::get(asset_id).ok_or(Error::&lt;T&gt;::AssetNotRegistered)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I assume the storage item must exist if we can query from the polkadot.js.app. Don't know what the problem is.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9845" PostHistoryTypeId="1" PostId="2628" RevisionGUID="c07d9dc5-fd09-4740-b0c3-c59b51f2721d" CreationDate="2022-05-16T06:45:57.773" UserId="2246" Text="Can't read storage item from migration script, however can read from polkadot.js.app" ContentLicense="CC BY-SA 4.0" />
  <row Id="9846" PostHistoryTypeId="3" PostId="2628" RevisionGUID="c07d9dc5-fd09-4740-b0c3-c59b51f2721d" CreationDate="2022-05-16T06:45:57.773" UserId="2246" Text="|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9848" PostHistoryTypeId="2" PostId="2629" RevisionGUID="5055727b-cfa9-457b-9274-cec4e26081ba" CreationDate="2022-05-16T10:37:45.637" UserId="2269" Text="I'm using pallet-assets for my pallet, let's say custom-assets. In ```custom_assets::transfer``` I make some additional business logic and call ```pallet_assets::transfer```. I want to make pallet_assets calls private so that logic wouldn't fail because no one can call ```pallet_assets::transfer``` with my custom asset directly.&#xD;&#xA;&#xD;&#xA;What I intend to do: just modify pallet-assets and move extrinsic ```pallet_assets::transfer``` from ```#[pallet::call] impl&lt;T: Config&gt; Pallet&lt;T&gt; {``` to  ```impl&lt;T: Config&gt; Pallet&lt;T&gt; { ``` - but this removes any info about weights, and maybe has another conciquencies.&#xD;&#xA;&#xD;&#xA;Is it a good idea to do so? what can I do with weights? are there any other conciquencies? and maybe there is another better option to forbid direct ```pallet_assets::transfer``` extrinsic call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9850" PostHistoryTypeId="1" PostId="2629" RevisionGUID="5055727b-cfa9-457b-9274-cec4e26081ba" CreationDate="2022-05-16T10:37:45.637" UserId="2269" Text="When using pallet-assets in another pallet: how to make pallet-assets calls private?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9851" PostHistoryTypeId="3" PostId="2629" RevisionGUID="5055727b-cfa9-457b-9274-cec4e26081ba" CreationDate="2022-05-16T10:37:45.637" UserId="2269" Text="|pallet|extrinsic|assets|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9852" PostHistoryTypeId="2" PostId="2630" RevisionGUID="e788cbac-c07e-4461-9fbb-727f0e3b062d" CreationDate="2022-05-16T10:45:44.550" UserId="2471" Text="I am looking for the application of ZKP protocols in substrate.&#xD;&#xA;&#xD;&#xA;By looking around I've found a project called [ZeroChain][1] but it seems to be deprecated and no longer maintained.&#xD;&#xA;Is there any substrate projects or pallets that enables using Zkp fo protecting user's privacy and sensitive data stored on chain?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/LayerXcom/zero-chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="9854" PostHistoryTypeId="1" PostId="2630" RevisionGUID="e788cbac-c07e-4461-9fbb-727f0e3b062d" CreationDate="2022-05-16T10:45:44.550" UserId="2471" Text="Is there a Zkp pallet? or implementation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9855" PostHistoryTypeId="3" PostId="2630" RevisionGUID="e788cbac-c07e-4461-9fbb-727f0e3b062d" CreationDate="2022-05-16T10:45:44.550" UserId="2471" Text="|substrate-node|pallet|zero-knowlage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9856" PostHistoryTypeId="2" PostId="2631" RevisionGUID="daf24215-1e27-418d-a06d-07acd9a35895" CreationDate="2022-05-16T10:48:01.757" UserId="45" Text="Check out [Manta Network](https://www.manta.network/) and their Kusama counterpart Calimari." ContentLicense="CC BY-SA 4.0" />
  <row Id="9858" PostHistoryTypeId="5" PostId="2630" RevisionGUID="735bd89e-9db3-4078-b0d3-9d7b349bc0cc" CreationDate="2022-05-16T10:58:50.003" UserId="2471" Comment="added 8 characters in body" Text="I am looking for the application of ZKP protocols in substrate. &#xD;&#xA;&#xD;&#xA;By looking around I've found a project called [ZeroChain][1] but it seems to be deprecated and no longer maintained.&#xD;&#xA;Is there any substrate projects or pallets **that enables me** using Zkp fo protecting user's privacy and sensitive data stored on chain?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/LayerXcom/zero-chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="9859" PostHistoryTypeId="2" PostId="2632" RevisionGUID="8a09139a-b90d-4436-9c42-773efdca2894" CreationDate="2022-05-16T11:05:32.463" UserId="172" Text="Having a Wasm runtime is a key design decision in Substrate's architecture. It's clear that it's a key part of Substrate's forkless upgradability feature, but I'm still curious to understand what other motivations exist behind this decision.&#xD;&#xA;&#xD;&#xA;Why does Substrate have a Wasm runtime? What advantages does using a Wasm execution environment provide and with what tradeoffs?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9861" PostHistoryTypeId="1" PostId="2632" RevisionGUID="8a09139a-b90d-4436-9c42-773efdca2894" CreationDate="2022-05-16T11:05:32.463" UserId="172" Text="Why does Substrate have a Wasm runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9862" PostHistoryTypeId="3" PostId="2632" RevisionGUID="8a09139a-b90d-4436-9c42-773efdca2894" CreationDate="2022-05-16T11:05:32.463" UserId="172" Text="|wasm|design|architecture|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9863" PostHistoryTypeId="2" PostId="2633" RevisionGUID="f5219e5b-f805-4f55-b604-efdb1d78c593" CreationDate="2022-05-16T11:21:32.577" UserId="393" Text="I think on-chain ZKP pallet is not so easy to provide, because the zkp algorithms is a trade-off between proof size and proof generation time, both of storage and calculation time is so expensive for on-chain transaction.&#xD;&#xA;&#xD;&#xA;So, it's a good idea to try OCW.&#xD;&#xA;&#xD;&#xA;You can also refer to [parami's ZKP feature][1], use OCW and IPFS to achieve feasibility. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/parami-protocol/parami-blockchain/pull/35" ContentLicense="CC BY-SA 4.0" />
  <row Id="9865" PostHistoryTypeId="2" PostId="2634" RevisionGUID="58803b15-d8d2-4739-a513-ff0df30dc801" CreationDate="2022-05-16T11:27:37.987" UserId="393" Text="WASM runtime provides more architecture flexibility, for eg. OCW's implementation is more neat on WASM runtime pattern.&#xD;&#xA;&#xD;&#xA;Also, forkless upgrade itself is so important that illustrate WASM's worth. When go through BTC/BTH, ETC/ETH, and eth2.0, will find that upgrading itself needs miners consensus, and blockchain itself is very familiar with this problem, so why not just take it into WASM runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="9867" PostHistoryTypeId="2" PostId="2635" RevisionGUID="d5dd3b32-d0a1-4cda-a3a2-3ff336d2b100" CreationDate="2022-05-16T11:43:22.137" UserId="172" Text="Every blockchain has different implementations of a transaction pool, which does the job of checking transaction validity before transactions are included by block authors. In Substrate it is possible to implement custom transaction validation logic as well as how transaction priority is defined. &#xD;&#xA;&#xD;&#xA;I understand that this is possible by implementing runtime APIs that check for certain requirements defined in the runtime. But I wonder what on the client side makes Substrate's transaction pool modular and extensible ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9869" PostHistoryTypeId="1" PostId="2635" RevisionGUID="d5dd3b32-d0a1-4cda-a3a2-3ff336d2b100" CreationDate="2022-05-16T11:43:22.137" UserId="172" Text="What is unique about Substrate's transaction pool?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9870" PostHistoryTypeId="3" PostId="2635" RevisionGUID="d5dd3b32-d0a1-4cda-a3a2-3ff336d2b100" CreationDate="2022-05-16T11:43:22.137" UserId="172" Text="|transactions|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9873" PostHistoryTypeId="2" PostId="2637" RevisionGUID="40f4f812-7e49-43cc-8ab2-4b4f9b5b081d" CreationDate="2022-05-16T12:31:21.343" UserId="1990" Text="Is there a way to check the exact `final_fee` that the signer of an extrinsic was charged? I'd like to do so from `subxt` for monitoring purposes, but could not find this info in the `TransactionProgress` struct. If this can't be read from events, what would I have to query given the blockhash of the finalized extrinsic?&#xD;&#xA;&#xD;&#xA;For reference, I asked the same question in the subxt repo: https://github.com/paritytech/subxt/issues/527" ContentLicense="CC BY-SA 4.0" />
  <row Id="9875" PostHistoryTypeId="1" PostId="2637" RevisionGUID="40f4f812-7e49-43cc-8ab2-4b4f9b5b081d" CreationDate="2022-05-16T12:31:21.343" UserId="1990" Text="Determining the final fee from a client" ContentLicense="CC BY-SA 4.0" />
  <row Id="9876" PostHistoryTypeId="3" PostId="2637" RevisionGUID="40f4f812-7e49-43cc-8ab2-4b4f9b5b081d" CreationDate="2022-05-16T12:31:21.343" UserId="1990" Text="|fee|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9877" PostHistoryTypeId="2" PostId="2638" RevisionGUID="e11c0002-4306-4560-b0a2-70bb8b5f2285" CreationDate="2022-05-16T12:42:46.620" UserId="2552" Text="Currently the ump queue does not show an event with the message hash. We aim at solving that in this PR: https://github.com/paritytech/cumulus/pull/1228. Right now there is no clear way to correlate for any chain using the xtokens or the pallet-xcm pallets, since non of them (except for the ***send*** extrinsic in pallet-xcm), since none of them (at least that I know of) deposit an event with the message nor the messageId" ContentLicense="CC BY-SA 4.0" />
  <row Id="9879" PostHistoryTypeId="2" PostId="2639" RevisionGUID="86ca36db-082d-4c3c-9964-ce72d7357c55" CreationDate="2022-05-16T13:09:40.003" UserId="620" Text="There is no event for the final fee, but you can calculate it either using the runtime API for `transaction_payment.query_info` or by executing the fee calculation from weight/length yourself. Sidecar does the latter [here](https://github.com/paritytech/substrate-api-sidecar/blob/992b458/src/services/blocks/BlocksService.ts#L276L280) (note that this is an imported Rust package, just linking to its use to see the context)." ContentLicense="CC BY-SA 4.0" />
  <row Id="9881" PostHistoryTypeId="2" PostId="2640" RevisionGUID="abaeec83-769d-4951-9887-71077955f059" CreationDate="2022-05-16T13:27:32.500" UserId="2025" Text="In my opinion, what makes the implementation of Substrate's transaction pool unique is the concept of [Signed Extensions][1]. Developers can use the signed extensions to add any custom logic prior to including or dispatching a specific transaction/extrinsic in their Substrate based chains. You can refer to [this doc][2] to learn about what functions this trait exposes in order to do this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/tx-pool/#signed-extensions&#xD;&#xA;  [2]: https://docs.substrate.io/rustdocs/latest/sp_runtime/traits/trait.SignedExtension.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="9883" PostHistoryTypeId="6" PostId="2627" RevisionGUID="dbd434ca-1948-4918-aa60-ca1602d9ab82" CreationDate="2022-05-16T13:47:41.603" UserId="85" Comment="edited tags" Text="|xcm|moonbeam|moonriver|cross-chain-explorers|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9884" PostHistoryTypeId="2" PostId="2641" RevisionGUID="6dfc6407-f5d0-44a2-ab93-c82282edca35" CreationDate="2022-05-16T13:53:14.683" UserId="412" Text="I am trying to send all the available funds using polkadot.js how does one do that?&#xD;&#xA;&#xD;&#xA;I have seen in the polkadot-ui one can purge the sender account or send all available funds and am wondering how can i translate that into code so I don't have little funds leftover and burned due to minimal extrinsic deposits." ContentLicense="CC BY-SA 4.0" />
  <row Id="9886" PostHistoryTypeId="1" PostId="2641" RevisionGUID="6dfc6407-f5d0-44a2-ab93-c82282edca35" CreationDate="2022-05-16T13:53:14.683" UserId="412" Text="polkadot js how to send all the funds" ContentLicense="CC BY-SA 4.0" />
  <row Id="9887" PostHistoryTypeId="3" PostId="2641" RevisionGUID="6dfc6407-f5d0-44a2-ab93-c82282edca35" CreationDate="2022-05-16T13:53:14.683" UserId="412" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9888" PostHistoryTypeId="2" PostId="2642" RevisionGUID="c9b59d1e-76d0-4cfe-a4ec-998734ba492d" CreationDate="2022-05-16T13:55:45.587" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="9890" PostHistoryTypeId="1" PostId="2642" RevisionGUID="c9b59d1e-76d0-4cfe-a4ec-998734ba492d" CreationDate="2022-05-16T13:55:45.587" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="9891" PostHistoryTypeId="1" PostId="2643" RevisionGUID="d9e5b970-64e4-4466-95d2-de07cdb06800" CreationDate="2022-05-16T13:55:45.587" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="9893" PostHistoryTypeId="2" PostId="2643" RevisionGUID="d9e5b970-64e4-4466-95d2-de07cdb06800" CreationDate="2022-05-16T13:55:45.587" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="9894" PostHistoryTypeId="6" PostId="1122" RevisionGUID="842119b1-f890-40b5-aaf4-cc7a8f8acc6f" CreationDate="2022-05-16T13:56:11.397" UserId="85" Comment="edited tags" Text="|cryptography|zero-knowlage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9895" PostHistoryTypeId="2" PostId="2644" RevisionGUID="c7c0b101-91b3-49e6-a582-2cd2052e04af" CreationDate="2022-05-16T14:11:39.690" UserId="67" Text="You have  the [`balances.transferAll`](https://polkadot.js.org/docs/substrate/extrinsics#transferalldest-multiaddress-keep_alive-bool) method that you should call with a `keep_alive = false` so it doesn't leave the existential deposit." ContentLicense="CC BY-SA 4.0" />
  <row Id="9897" PostHistoryTypeId="2" PostId="2645" RevisionGUID="ac073b0b-0f0b-4f70-97a6-3d77fb6a1e8f" CreationDate="2022-05-16T14:16:15.903" UserId="34" Text="Substrate plus [Frontier](https://github.com/paritytech/frontier) enables Ethereum compatibility. Substrate also has various Proof of Work implementations and tweaks to the default node template that one could configure to be compliant with Ethereum. Thus **you can use Substrate to create an Ethereum node**.&#xD;&#xA;&#xD;&#xA;But what you are asking is more &quot;can Ethereum do runtime upgrades?&quot; And the answer here is not without a hard fork to enable this functionality. With a substrate based node, this is possible, but all other nodes (like Open Ethereum) would need to be updated as well to enable such functionality. This is no simple task.&#xD;&#xA;&#xD;&#xA;Lastly, Ethereum has no notion of governance to enact such upgrades. So this social structure and mechanisms to do it would need to be designed and implemented. This IMHO is very unlikely.&#xD;&#xA;&#xD;&#xA;With the merge and general roadmap for Ethereum, major changes would be required to support PoS and the beacon chain. Again, a hard task to manage but not impossibly with substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="9899" PostHistoryTypeId="6" PostId="2623" RevisionGUID="ded231cf-7ff5-4d5c-ba15-c95d690d6ee3" CreationDate="2022-05-16T14:17:32.573" UserId="34" Comment="edited tags" Text="|runtime-upgrade|frontier|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9901" PostHistoryTypeId="5" PostId="2643" RevisionGUID="aa836d73-7391-457b-89d6-88864a6189df" CreationDate="2022-05-16T14:41:24.397" UserId="85" Comment="added 88 characters in body" Text="Zero Knowledge. Being able to prove you know something without disclosing what you know." ContentLicense="CC BY-SA 4.0" />
  <row Id="9902" PostHistoryTypeId="24" PostId="2643" RevisionGUID="aa836d73-7391-457b-89d6-88864a6189df" CreationDate="2022-05-16T14:41:24.397" Comment="Proposed by 85 approved by 34 edit id of 198" ContentLicense="CC BY-SA 4.0" />
  <row Id="9903" PostHistoryTypeId="2" PostId="2646" RevisionGUID="3c6d0754-cf0e-486f-a60a-f665757adcf7" CreationDate="2022-05-16T14:45:21.280" UserId="85" Text="If you look at any block there's usually a `timestamp.set` extrinsic that contains the time that the block was proposed by the collator.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.calamari.systems%2F#/explorer/query/0x7906c21c83542b2cd3ee27d889ac2f208c97ac1d81ad5e5cb0594dea3f2505b5&#xD;&#xA;&#xD;&#xA;The time is in unix epoc time (seconds since 1/1/1970). You can translate it manually using a [website][1], but all programming languages will convert from that format too. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.unixtimestamp.com/index.php" ContentLicense="CC BY-SA 4.0" />
  <row Id="9905" PostHistoryTypeId="2" PostId="2647" RevisionGUID="f616373b-e9bd-4f03-95dd-fc67abce55e0" CreationDate="2022-05-16T15:10:05.607" UserId="2543" Text="I am following the tutorial on substrate playground, and when I run the cargo check, I get the following compilation error:&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;     error: failed to select a version for `impl-trait-for-tuples`.&#xD;&#xA;        ... required by package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.20#563f4820)`&#xD;&#xA;        ... which satisfies git dependency `frame-support` of package `pallet-nicks v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.20#563f4820)`&#xD;&#xA;        ... which satisfies git dependency `pallet-nicks` of package `node-template-runtime v4.0.0-dev (/home/playground/workspace/runtime)`&#xD;&#xA;        ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/playground/workspace/node)`&#xD;&#xA;    versions that meet the requirements `^0.2.2` are: 0.2.2&#xD;&#xA;    &#xD;&#xA;    all possible versions conflict with previously selected packages.&#xD;&#xA;    &#xD;&#xA;      previously selected package `impl-trait-for-tuples v0.2.1`&#xD;&#xA;        ... which satisfies dependency `impl-trait-for-tuples = &quot;^0.2.1&quot;` (locked to 0.2.1) of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#e6fbbd5c)`&#xD;&#xA;        ... which satisfies git dependency `frame-support` (locked to 4.0.0-dev) of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#e6fbbd5c)`&#xD;&#xA;        ... which satisfies git dependency `frame-benchmarking` (locked to 4.0.0-dev) of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#e6fbbd5c)`&#xD;&#xA;        ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/playground/workspace/node)`&#xD;&#xA;    &#xD;&#xA;    failed to select a version for `impl-trait-for-tuples` which could resolve this conflict" ContentLicense="CC BY-SA 4.0" />
  <row Id="9907" PostHistoryTypeId="1" PostId="2647" RevisionGUID="f616373b-e9bd-4f03-95dd-fc67abce55e0" CreationDate="2022-05-16T15:10:05.607" UserId="2543" Text="How to resovle the conflict in impl-trait-for-tuple version | nicks pallet tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="9908" PostHistoryTypeId="3" PostId="2647" RevisionGUID="f616373b-e9bd-4f03-95dd-fc67abce55e0" CreationDate="2022-05-16T15:10:05.607" UserId="2543" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9909" PostHistoryTypeId="2" PostId="2648" RevisionGUID="979d403f-4c48-4fa6-85ab-2fc5c1382502" CreationDate="2022-05-16T16:28:39.543" UserId="1868" Text="Besides what has already been said, there was indeed a related thought experiment in the past exploring the flexibility of Substrate framework. We know Ethereum block structures vs Polkadot/Substrate are vastly different. There are different encoding strategies, different block processing rules and different consensus. Still, would it be possible to write an Ethereum node using purely the Substrate framework? Once we have that, then upgrading Ethereum mainnet to Substrate would just be a simple hard fork away (which is no more complicated than just a Substrate runtime upgrade), and we have accomplished our goals.&#xD;&#xA;&#xD;&#xA;We find this possible, using a design called [wrapper block](https://corepaper.org/substrate/wrapper/). What we're doing is basically to re-group an Ethereum data structure while maintaining the original sealing. In this particular case for Ethereum, all Ethereum transactions are mapped onto Substrate extrinsics. We map one or several additional inherent extrinsics for the uncle headers, receipts, coinbase, miner seals, as well as other information in the original block. The block processing strategy is then as follows:&#xD;&#xA;&#xD;&#xA;* In runtime, we validate transactions using `pallet-evm` and `pallet-ethereum`, and check information such as gas limits, receipts, uncles.&#xD;&#xA;* In consensus, we re-build the original Ethereum block from the Substrate block (because information are one-to-one mapped), and using that Ethereum block to verify the miner seal.&#xD;&#xA;&#xD;&#xA;The deployment then becomes unobtrusive. This new Substrate node will be built just as another Ethereum client. In the beginning, we run another Ethereum client alongside of this Substrate node so that we don't need to re-create the devp2p networking protocol. This Ethereum node is then responsible for feeding all the past block data into the Substrate node, which it will happily convert into the wrapper block discussed above (using the one-to-one mapping). The Substrate node will contain its own, newly developed genesis code, with all Substrate-specific modules disabled. This allows it to sync together with the mainnet, and even exposing Ethereum-specific RPCs. Once the time comes and the community reaches consensus, only a runtime upgrade is due to enable those Substrate-specific modules. This will cause the Substrate node to de-sync from Ethereum client in the activation block, and enable access to things like on-chain governance. The upgrade is then complete.&#xD;&#xA;&#xD;&#xA;Due to obvious reasons, the full wrapper block strategy was never (not yet?) fully developed. This does not mean it's abandoned, but just there are currently not enough interest in it. In [Frontier](https://github.com/paritytech/frontier/), you can find those &quot;architectural holes&quot; we left in the code (for example, pre-runtime transaction processing) allowing us to quickly extend it if one day we decide to support a full wrapper block design." ContentLicense="CC BY-SA 4.0" />
  <row Id="9911" PostHistoryTypeId="5" PostId="2629" RevisionGUID="baa07df4-93aa-40b8-9463-921ca9fae7e6" CreationDate="2022-05-16T16:46:01.993" UserId="29" Comment="deleted 2 characters in body" Text="I'm using pallet-assets for my pallet, let's say custom-assets. In ```custom_assets::transfer``` I make some additional business logic and call ```pallet_assets::transfer```. I want to make pallet_assets calls private so that logic wouldn't fail because no one can call ```pallet_assets::transfer``` with my custom asset directly.&#xD;&#xA;&#xD;&#xA;What I intend to do: just modify pallet-assets and move extrinsic ```pallet_assets::transfer``` from ```#[pallet::call] impl&lt;T: Config&gt; Pallet&lt;T&gt; {``` to  ```impl&lt;T: Config&gt; Pallet&lt;T&gt; { ``` - but this removes any info about weights, and maybe has another consequences.&#xD;&#xA;&#xD;&#xA;Is it a good idea to do so? what can I do with weights? are there any other consequences? and maybe there is another better option to forbid direct ```pallet_assets::transfer``` extrinsic call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9912" PostHistoryTypeId="5" PostId="2630" RevisionGUID="6ca251a8-c6e3-4ae8-8ce9-07f4436b76aa" CreationDate="2022-05-16T16:47:49.420" UserId="29" Comment="added 4 characters in body; edited tags" Text="I am looking for the application of ZKP protocols in Substrate. &#xD;&#xA;&#xD;&#xA;By looking around I've found a project called [ZeroChain][1] but it seems to be deprecated and no longer maintained.&#xD;&#xA;Are there any Substrate projects or pallets **that enables me** using ZKP for protecting a user's privacy and sensitive data stored on chain?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/LayerXcom/zero-chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="9913" PostHistoryTypeId="6" PostId="2630" RevisionGUID="6ca251a8-c6e3-4ae8-8ce9-07f4436b76aa" CreationDate="2022-05-16T16:47:49.420" UserId="29" Comment="added 4 characters in body; edited tags" Text="|pallet|zero-knowlage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9915" PostHistoryTypeId="52" PostId="2630" RevisionGUID="80580422-8081-42a1-ada8-f27f97f2ffa3" CreationDate="2022-05-16T18:49:10.147" />
  <row Id="9919" PostHistoryTypeId="52" PostId="2635" RevisionGUID="536d59a8-b835-4291-8756-ed15726c969e" CreationDate="2022-05-16T19:43:23.547" />
  <row Id="9920" PostHistoryTypeId="2" PostId="2650" RevisionGUID="f1eab635-b87a-4254-8bde-be31f1347921" CreationDate="2022-05-16T19:58:00.803" UserId="28" Text="You can create a call filter in your runtime which prevents any calls to your pallet:&#xD;&#xA;&#xD;&#xA;See a similar question here: https://substrate.stackexchange.com/questions/140/is-it-possible-to-disable-new-validators-from-joining/141#141&#xD;&#xA;&#xD;&#xA;Something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Use this filter to block users from calling any function in Assets pallet.&#xD;&#xA;pub struct DontAllowAssets;&#xD;&#xA;impl Contains&lt;Call&gt; for DontAllowAssets {&#xD;&#xA;    fn contains(c: &amp;Call) -&gt; bool {&#xD;&#xA;        match c {&#xD;&#xA;            Call::Assets(_) =&gt; false,&#xD;&#xA;            _ =&gt; true,&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9922" PostHistoryTypeId="52" PostId="2637" RevisionGUID="03fd96da-02e7-46f2-9bf2-0cbff824c39a" CreationDate="2022-05-16T20:34:14.340" />
  <row Id="9923" PostHistoryTypeId="2" PostId="2651" RevisionGUID="deeb3177-1c5a-4178-a97a-f2ccfcb2fbea" CreationDate="2022-05-16T21:13:53.493" UserId="2555" Text="I'm testing with Westend network and it seems like the current era hasn't change for almost 4 days when it's supposed to change every 6h - is that normal / to be expected? And if that's normal how this affects the un-bonding periods since they expressed in &quot;eras&quot;?&#xD;&#xA;&#xD;&#xA;Attaching a screenshot below:&#xD;&#xA;&#xD;&#xA;[![westend era longer than normal][1]][1]&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/07sG4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9925" PostHistoryTypeId="1" PostId="2651" RevisionGUID="deeb3177-1c5a-4178-a97a-f2ccfcb2fbea" CreationDate="2022-05-16T21:13:53.493" UserId="2555" Text="Era taking longer than expected on Westend?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9926" PostHistoryTypeId="3" PostId="2651" RevisionGUID="deeb3177-1c5a-4178-a97a-f2ccfcb2fbea" CreationDate="2022-05-16T21:13:53.493" UserId="2555" Text="|polkadot|era|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9928" PostHistoryTypeId="2" PostId="2652" RevisionGUID="7565e202-534e-470d-a665-38ad1a756792" CreationDate="2022-05-16T23:32:29.103" UserId="29" Text="hmm just checked it now and looks fine to me:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/m9Y8C.png)&#xD;&#xA;&#xD;&#xA;Consider reloading." ContentLicense="CC BY-SA 4.0" />
  <row Id="9930" PostHistoryTypeId="2" PostId="2653" RevisionGUID="83f6caa7-f0a4-4c71-82b1-e33f46b183cc" CreationDate="2022-05-16T23:41:06.263" UserId="716" Text="Is there a way to the RCP call output of system.properties() using the py-substrate-interface?  I want to access the token name and decimals as shown below (based on this&#xD;&#xA;[link][1])&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  ss58Format: 2&#xD;&#xA;  tokenDecimals: [&#xD;&#xA;    12&#xD;&#xA;  ]&#xD;&#xA;  tokenSymbol: [&#xD;&#xA;    KSM&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fstatemine-rpc.polkadot.io#/rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="9932" PostHistoryTypeId="1" PostId="2653" RevisionGUID="83f6caa7-f0a4-4c71-82b1-e33f46b183cc" CreationDate="2022-05-16T23:41:06.263" UserId="716" Text="How to perform RCP call system.properties() using py-substrate-interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9933" PostHistoryTypeId="3" PostId="2653" RevisionGUID="83f6caa7-f0a4-4c71-82b1-e33f46b183cc" CreationDate="2022-05-16T23:41:06.263" UserId="716" Text="|rpc|python|systemmodule|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9934" PostHistoryTypeId="5" PostId="2653" RevisionGUID="3ddb330c-588f-439f-8ae1-124173ded2b4" CreationDate="2022-05-16T23:43:34.343" UserId="29" Comment="edited body; edited title" Text="Is there a way to the RPC call output of `system.properties()` using the py-substrate-interface?  I want to access the token name and decimals as shown below (based on this&#xD;&#xA;[link][1])&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  ss58Format: 2&#xD;&#xA;  tokenDecimals: [&#xD;&#xA;    12&#xD;&#xA;  ]&#xD;&#xA;  tokenSymbol: [&#xD;&#xA;    KSM&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fstatemine-rpc.polkadot.io#/rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="9935" PostHistoryTypeId="4" PostId="2653" RevisionGUID="3ddb330c-588f-439f-8ae1-124173ded2b4" CreationDate="2022-05-16T23:43:34.343" UserId="29" Comment="edited body; edited title" Text="How to perform RPC call system.properties() using py-substrate-interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9936" PostHistoryTypeId="5" PostId="2631" RevisionGUID="46dbbc67-0a4a-486b-8e9f-6ad84474d288" CreationDate="2022-05-17T03:27:13.847" UserId="83" Comment="Add link to calamari and fix typo" Text="Check out [Manta Network](https://www.manta.network/) and their Kusama counterpart [Calamari Network][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://calamari.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="9937" PostHistoryTypeId="2" PostId="2654" RevisionGUID="dd12aff6-9730-4b58-9eb8-0be547cf2064" CreationDate="2022-05-17T05:57:54.653" UserId="1760" Text="There is also an option to call extrinsics natively without using libraries.&#xD;&#xA;[Here](https://substrate.stackexchange.com/a/1263/1760) is a working example." ContentLicense="CC BY-SA 4.0" />
  <row Id="9939" PostHistoryTypeId="2" PostId="2655" RevisionGUID="011317e5-1f35-4b68-8493-3e7f79654e3e" CreationDate="2022-05-17T06:18:04.597" UserId="2556" Text="Getting this error while building substrate-node-template, &#xD;&#xA;Command uses: cargo build --release &#xD;&#xA; &#xD;&#xA;error: failed to run custom build command for `librocksdb-sys v0.6.1+6.28.2`&#xD;&#xA;&#xD;&#xA;MacBook Air 2017, MacOS Monterey 12.3.1, Processor:  1.8 GHz Dual-Core Intel Core i5,Memory: 8 GB 1600 MHz DDR3" ContentLicense="CC BY-SA 4.0" />
  <row Id="9941" PostHistoryTypeId="1" PostId="2655" RevisionGUID="011317e5-1f35-4b68-8493-3e7f79654e3e" CreationDate="2022-05-17T06:18:04.597" UserId="2556" Text="Not able to build librocksdb-sys library for substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="9942" PostHistoryTypeId="3" PostId="2655" RevisionGUID="011317e5-1f35-4b68-8493-3e7f79654e3e" CreationDate="2022-05-17T06:18:04.597" UserId="2556" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9943" PostHistoryTypeId="2" PostId="2656" RevisionGUID="ed0997d8-e185-430b-bd01-888ffa0f1c44" CreationDate="2022-05-17T06:19:52.900" UserId="1760" Text="If I make a request to get events in a particular block using web UI, I get a nice human-readable response:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've made an RPC call to get the same data&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;id&quot;: 1,&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;state_getStorageAt&quot;, &#xD;&#xA;    &quot;params&quot;: [&quot;0x26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7&quot;,&quot;0x5056c4cb701e192962e5a76c895273e69188edea1badf9b145b884a9416c8443&quot;]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;... and I got an output&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;result&quot;: &quot;0x1000000000000000585f8f090000000002000000010000000508ba6ef6480a2c4173bbbf0c27355c0e3c6d7a874a21cc2464e97d3fd5d92e245b1b5a7307000000000000000000000000000001000000080380eb30ca364f5c349d573b62cfadadba95af2e94f62fd8af4e15b90b971a4da633803b0648373051a1e2158c547112dcf63802d0d52b301a33dae8b9c6114e90f012b8516d57525358775a7476385956586574346e43424a396776646d4a6e3564364b34385a6a6148704763515a75676300000100000000001027000000000000000000&quot;,&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I understand that it is a set of data encrypted with SCALE codec.&#xD;&#xA;&#xD;&#xA;For example `0803` is a pallet and method indexes and &#xD;&#xA;`eb30ca364f5c349d573b62cfadadba95af2e94f62fd8af4e15b90b971a4da633` is attached data.&#xD;&#xA;&#xD;&#xA;What is the best way to decode the complete result with Rust? Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/k9WWV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9945" PostHistoryTypeId="1" PostId="2656" RevisionGUID="ed0997d8-e185-430b-bd01-888ffa0f1c44" CreationDate="2022-05-17T06:19:52.900" UserId="1760" Text="Decoding events with Rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="9946" PostHistoryTypeId="3" PostId="2656" RevisionGUID="ed0997d8-e185-430b-bd01-888ffa0f1c44" CreationDate="2022-05-17T06:19:52.900" UserId="1760" Text="|rpc|events|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9947" PostHistoryTypeId="2" PostId="2657" RevisionGUID="3c41bcc9-63f7-4b48-af31-517a74f5be08" CreationDate="2022-05-17T06:41:03.550" UserId="85" Text="There's two ways of decoding events in rust: statically typed and dynamically typed.&#xD;&#xA;&#xD;&#xA;Statically you can use subxt to decode events from this SCALE encoding - it's done [here][1] for example. &#xD;&#xA;&#xD;&#xA;Dynamically the tooling needs generalising, but [it is possible][2] and has been done by cargo-contract.&#xD;&#xA;&#xD;&#xA;If you need to interpret all events across all parachains then go dynamic. If you are focused on a few particular parachains then static typing is a lot safer and easier.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt/blob/master/examples/examples/subscribe_all_events.rs&#xD;&#xA;  [2]: https://github.com/paritytech/cargo-contract/blob/1dab046b73bb06425962435bc1d397fc480c4b89/src/cmd/extrinsics/events.rs#L61" ContentLicense="CC BY-SA 4.0" />
  <row Id="9950" PostHistoryTypeId="5" PostId="2657" RevisionGUID="a5438d47-201c-41c5-b565-0b3b5dbb74fa" CreationDate="2022-05-17T07:01:45.893" UserId="85" Comment="added code snippits" Text="There's two ways of decoding events in rust: statically typed and dynamically typed.&#xD;&#xA;&#xD;&#xA;Statically you can use subxt to decode events from this SCALE encoding - it's done [here][1] for example. Basically every runtime has a concrete Event type and that's what you're decoding into.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let event_bytes = hex::decode(&quot;0x1000000000000000585f8f090000000002000000010000000508ba6ef6480a2c4173bbbf0c27355c0e3c6d7a874a21cc2464e97d3fd5d92e245b1b5a7307000000000000000000000000000001000000080380eb30ca364f5c349d573b62cfadadba95af2e94f62fd8af4e15b90b971a4da633803b0648373051a1e2158c547112dcf63802d0d52b301a33dae8b9c6114e90f012b8516d57525358775a7476385956586574346e43424a396776646d4a6e3564364b34385a6a6148704763515a75676300000100000000001027000000000000000000&quot;).unwrap();&#xD;&#xA;let event = &lt;polkadot::Event as Decode&gt;::decode(&amp;mut event_bytes.as_slice()).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and I have polkadot defined as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;polkadot_metadata.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;```&#xD;&#xA;(rather than pointing it at a metadata file you can download it by giving it a url `#[subxt::subxt(runtime_metadata_path = &quot;wss://kusama-rpc.polkadot.io:443&quot;)]`)&#xD;&#xA;&#xD;&#xA;Dynamically the tooling needs generalising, but [it is possible][2] and has been done by cargo-contract.&#xD;&#xA;&#xD;&#xA;If you need to interpret all events across all parachains then go dynamic. If you are focused on a few particular parachains then static typing is a lot safer and easier.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt/blob/master/examples/examples/subscribe_all_events.rs&#xD;&#xA;  [2]: https://github.com/paritytech/cargo-contract/blob/1dab046b73bb06425962435bc1d397fc480c4b89/src/cmd/extrinsics/events.rs#L61" ContentLicense="CC BY-SA 4.0" />
  <row Id="9951" PostHistoryTypeId="5" PostId="2657" RevisionGUID="e7196882-27ec-4385-ae8c-5653b15dbd02" CreationDate="2022-05-17T07:10:08.420" UserId="85" Comment="added 72 characters in body" Text="There's two ways of decoding events in rust: statically typed and dynamically typed.&#xD;&#xA;&#xD;&#xA;Statically you can use subxt to decode events from this SCALE encoding - it's done [here][1] for example. Basically every runtime has a concrete Event type and that's what you're decoding into.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let event_bytes = hex::decode(&quot;0x1000000000000000585f8f090000000002000000010000000508ba6ef6480a2c4173bbbf0c27355c0e3c6d7a874a21cc2464e97d3fd5d92e245b1b5a7307000000000000000000000000000001000000080380eb30ca364f5c349d573b62cfadadba95af2e94f62fd8af4e15b90b971a4da633803b0648373051a1e2158c547112dcf63802d0d52b301a33dae8b9c6114e90f012b8516d57525358775a7476385956586574346e43424a396776646d4a6e3564364b34385a6a6148704763515a75676300000100000000001027000000000000000000&quot;).unwrap();&#xD;&#xA;let event = &lt;polkadot::Event as Decode&gt;::decode(&amp;mut event_bytes.as_slice()).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and I have polkadot defined as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;polkadot_metadata.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;```&#xD;&#xA;(rather than pointing it at a metadata file you can download it by giving it a url `#[subxt::subxt(runtime_metadata_path = &quot;wss://kusama-rpc.polkadot.io:443&quot;)]`. If you point that at your node's url then it should decode your event.)&#xD;&#xA;&#xD;&#xA;Dynamically the tooling needs generalising, but [it is possible][2] and has been done by cargo-contract.&#xD;&#xA;&#xD;&#xA;If you need to interpret all events across all parachains then go dynamic. If you are focused on a few particular parachains then static typing is a lot safer and easier.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt/blob/master/examples/examples/subscribe_all_events.rs&#xD;&#xA;  [2]: https://github.com/paritytech/cargo-contract/blob/1dab046b73bb06425962435bc1d397fc480c4b89/src/cmd/extrinsics/events.rs#L61" ContentLicense="CC BY-SA 4.0" />
  <row Id="9952" PostHistoryTypeId="2" PostId="2658" RevisionGUID="41995c6c-c795-471b-9f1f-7f7dfdd07496" CreationDate="2022-05-17T07:23:56.270" UserId="169" Text="Using scale, an enum can be written like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Debug, Clone, PartialEq, Eq, Encode, Decode)]&#xD;&#xA;pub enum Block {&#xD;&#xA;    #[codec(index = 101)]&#xD;&#xA;    V1(BlockV1),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `#[codec(index = 101)]`, the `101` part, represents the `u8` value that will be encoded in the serialization to represent the current enum arm. When this enum gets serialized, the first byte of that serialization will have the value `101`.&#xD;&#xA;&#xD;&#xA;Given that this whole mechanism is built-in into the scale-codec, and given that making assumptions about serialization is wrong to respect encapsulation, is there a way to retrieve that `101` through a method call to the enum?&#xD;&#xA;&#xD;&#xA;So I'm hoping for something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn make_block() -&gt; Block {&#xD;&#xA;    // some implementation&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn get_that_version() -&gt; u8 {&#xD;&#xA;    let block = make_block();&#xD;&#xA;    assert_eq!(block.codec_arm_index(), 101u8); // notice 101 is the same from the enum&#xD;&#xA;    block.codec_arm_index()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is such functionality available in scale?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9954" PostHistoryTypeId="1" PostId="2658" RevisionGUID="41995c6c-c795-471b-9f1f-7f7dfdd07496" CreationDate="2022-05-17T07:23:56.270" UserId="169" Text="Scale codec: Is there a way to extract an enum's arm's codec index value?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9955" PostHistoryTypeId="3" PostId="2658" RevisionGUID="41995c6c-c795-471b-9f1f-7f7dfdd07496" CreationDate="2022-05-17T07:23:56.270" UserId="169" Text="|rust|storage|scale-codec|serialization|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9956" PostHistoryTypeId="2" PostId="2659" RevisionGUID="7917586c-8937-441e-8722-29549ec73c8d" CreationDate="2022-05-17T08:06:26.880" UserId="2558" Text="I want to make token/nft transfer inside smart contracts.&#xD;&#xA;I saw some examples of token transfers and taking that reference, I tried to replicate something similar to that. here is the code.&#xD;&#xA;```rust&#xD;&#xA;#![no_std]&#xD;&#xA;&#xD;&#xA;pub use erc721::Erc721;&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod erc721{&#xD;&#xA;    use scale::{Encode, Decode};&#xD;&#xA;    pub type TokenId = u32;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Erc721{}&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, PartialEq, Eq, Copy, Clone)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        NotOwner,&#xD;&#xA;        NotApproved,&#xD;&#xA;        TokenExists,&#xD;&#xA;        TokenNotFound,&#xD;&#xA;        CannotInsert,&#xD;&#xA;        CannotFetchValue,&#xD;&#xA;        NotAllowed,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Erc721{&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self{&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn balance_of(&amp;self, _owner: AccountId) -&gt; u32 {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Returns the owner of the token.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn owner_of(&amp;self, _id: TokenId) -&gt; Option&lt;AccountId&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Returns the approved account ID for this token if any.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_approved(&amp;self, _id: TokenId) -&gt; Option&lt;AccountId&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Returns `true` if the operator is approved by the owner.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn is_approved_for_all(&amp;self, _owner: AccountId, _operator: AccountId) -&gt; bool {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Approves or disapproves the operator for all tokens of the caller.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn set_approval_for_all(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            _to: AccountId,&#xD;&#xA;            _approved: bool,&#xD;&#xA;        ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Approves the account to transfer the specified token on behalf of the caller.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn approve(&amp;mut self, _to: AccountId, _id: TokenId) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Transfers the token from the caller to the given destination.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn transfer(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            _destination: AccountId,&#xD;&#xA;            _id: TokenId,&#xD;&#xA;        ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Transfer approved or owned token.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn transfer_from(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            _from: AccountId,&#xD;&#xA;            _to: AccountId,&#xD;&#xA;            _id: TokenId,&#xD;&#xA;        ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Creates a new token.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mint(&amp;mut self, _id: TokenId) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Deletes an existing token. Only the owner can burn the token.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn burn(&amp;mut self, _id: TokenId) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I'm getting error on this part&#xD;&#xA;`let token: Erc721 = FromAccountId::from_account_id(contract);`&#xD;&#xA;&#xD;&#xA;here is the error&#xD;&#xA;```&#xD;&#xA;the trait bound `Erc721: FromAccountId&lt;_&gt;` is not satisfied&#xD;&#xA;the trait `FromAccountId&lt;_&gt;` is not implemented for `Erc721`&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9958" PostHistoryTypeId="1" PostId="2659" RevisionGUID="7917586c-8937-441e-8722-29549ec73c8d" CreationDate="2022-05-17T08:06:26.880" UserId="2558" Text="Make token/nft transfer within smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="9959" PostHistoryTypeId="3" PostId="2659" RevisionGUID="7917586c-8937-441e-8722-29549ec73c8d" CreationDate="2022-05-17T08:06:26.880" UserId="2558" Text="|nft|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9960" PostHistoryTypeId="6" PostId="2659" RevisionGUID="4e537ea1-290e-461f-a649-bf965931f8ab" CreationDate="2022-05-17T08:10:09.380" UserId="2558" Comment="edited tags" Text="|ink|smart-contract|transfer|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9961" PostHistoryTypeId="2" PostId="2660" RevisionGUID="578b5076-b570-459e-ab92-72b42cad8b6e" CreationDate="2022-05-17T08:40:38.870" UserId="2560" Text="I'm referring to this doc: https://docs.substrate.io/how-to-guides/v3/testing/basics/&#xD;&#xA;&#xD;&#xA;Is it just me or are the steps incomplete? For instance, it expects an add_value extrinsic to be implemented somewhere. Also, do we need to create a Cargo.toml for this, or else how would &quot;cargo test&quot; be able to locate it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9963" PostHistoryTypeId="1" PostId="2660" RevisionGUID="578b5076-b570-459e-ab92-72b42cad8b6e" CreationDate="2022-05-17T08:40:38.870" UserId="2560" Text="Confused by the &quot;Setting up tests for your pallet&quot; doc" ContentLicense="CC BY-SA 4.0" />
  <row Id="9964" PostHistoryTypeId="3" PostId="2660" RevisionGUID="578b5076-b570-459e-ab92-72b42cad8b6e" CreationDate="2022-05-17T08:40:38.870" UserId="2560" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9965" PostHistoryTypeId="5" PostId="2483" RevisionGUID="d2035d75-2b5b-4ac7-a45e-c15aa161bbcf" CreationDate="2022-05-17T08:48:30.857" UserId="85" Comment="tightened up grammar" Text="# Background&#xD;&#xA;our parachain has won the slot and will launch in the future. So, we firstly face the question of how many collators should be setup in our parachain. Here are some of my questions:&#xD;&#xA;&#xD;&#xA;# Confusing questions:&#xD;&#xA;1. In our fist stage, we use the simple `POA` consensus. Also, we need to setup our own collators. How many collators should we setup can we ensure our parachain network's security?&#xD;&#xA;2. In the second stage, we may launch a `POS` mechanism. So, we need to open some seats for the public collators to produce block. The next two question is that how many public collators seats should we provide? Is there a quantitative relationship between the number of our own collators and the number of public collators?&#xD;&#xA;3. About the `latency` in parachain, the scene is below:   &#xD;&#xA;  we set a `fixed number` of collators accounts in the chainspec. If I setup one collator to maintain the parachain, the latency is very big. But if I setup the whole fix number of collators, the latency will be small.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;So why is that? And another is that, if one collator has dropped, will my parachain's network will be affected? Also, After we open some public collators seats, if some public collators dropped, will it will affect our network?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ONxNB.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="9966" PostHistoryTypeId="5" PostId="2659" RevisionGUID="42c34b81-53ff-44e6-b1b6-d968ef28fd0d" CreationDate="2022-05-17T09:23:12.040" UserId="2558" Comment="added 791 characters in body" Text="I want to make token/nft transfer inside smart contracts.&#xD;&#xA;I saw some examples of token transfers and taking that reference, I tried to replicate something similar to that. here is the code.&#xD;&#xA;```rust&#xD;&#xA;#![no_std]&#xD;&#xA;&#xD;&#xA;pub use erc721::Erc721;&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod erc721{&#xD;&#xA;    use scale::{Encode, Decode};&#xD;&#xA;    pub type TokenId = u32;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Erc721{}&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, PartialEq, Eq, Copy, Clone)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        NotOwner,&#xD;&#xA;        NotApproved,&#xD;&#xA;        TokenExists,&#xD;&#xA;        TokenNotFound,&#xD;&#xA;        CannotInsert,&#xD;&#xA;        CannotFetchValue,&#xD;&#xA;        NotAllowed,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Erc721{&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self{&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn balance_of(&amp;self, _owner: AccountId) -&gt; u32 {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Returns the owner of the token.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn owner_of(&amp;self, _id: TokenId) -&gt; Option&lt;AccountId&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Returns the approved account ID for this token if any.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_approved(&amp;self, _id: TokenId) -&gt; Option&lt;AccountId&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Returns `true` if the operator is approved by the owner.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn is_approved_for_all(&amp;self, _owner: AccountId, _operator: AccountId) -&gt; bool {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Approves or disapproves the operator for all tokens of the caller.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn set_approval_for_all(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            _to: AccountId,&#xD;&#xA;            _approved: bool,&#xD;&#xA;        ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Approves the account to transfer the specified token on behalf of the caller.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn approve(&amp;mut self, _to: AccountId, _id: TokenId) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Transfers the token from the caller to the given destination.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn transfer(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            _destination: AccountId,&#xD;&#xA;            _id: TokenId,&#xD;&#xA;        ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Transfer approved or owned token.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn transfer_from(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            _from: AccountId,&#xD;&#xA;            _to: AccountId,&#xD;&#xA;            _id: TokenId,&#xD;&#xA;        ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Creates a new token.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mint(&amp;mut self, _id: TokenId) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// Deletes an existing token. Only the owner can burn the token.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn burn(&amp;mut self, _id: TokenId) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            unimplemented!()&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I'm getting error on this part&#xD;&#xA;`let token: Erc721 = FromAccountId::from_account_id(contract);`&#xD;&#xA;&#xD;&#xA;here is the error&#xD;&#xA;```&#xD;&#xA;the trait bound `Erc721: FromAccountId&lt;_&gt;` is not satisfied&#xD;&#xA;the trait `FromAccountId&lt;_&gt;` is not implemented for `Erc721`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;here is my contract that is calling the function.&#xD;&#xA;```&#xD;&#xA;#![no_std]&#xD;&#xA;&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod ebisu {&#xD;&#xA;    use erc721::Erc721;&#xD;&#xA;    use ink_env::call::FromAccountId;&#xD;&#xA;    use ink_storage::{Mapping, traits::SpreadAllocate};&#xD;&#xA;    type TokenId = u32;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Ebisu{&#xD;&#xA;        assets: Mapping&lt;(AccountId, TokenId), AccountId&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Ebisu{&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn init() -&gt; Self{&#xD;&#xA;            ink_lang::utils::initialize_contract(|_|{&#xD;&#xA;&#xD;&#xA;            })&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn check(&amp;self, contract: AccountId) -&gt; AccountId{&#xD;&#xA;            let token: Erc721 = FromAccountId::from_account_id(contract);&#xD;&#xA;            contract&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9967" PostHistoryTypeId="2" PostId="2661" RevisionGUID="06db4fe4-578d-4def-a9d1-f409bbe4ffb7" CreationDate="2022-05-17T10:06:41.310" UserId="279" Text="From version `v1.2.34`, `parachain-id` argument is handled automatically by zombienet so this configuration should works as expected.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9969" PostHistoryTypeId="2" PostId="2662" RevisionGUID="1f1b049d-2045-4caa-95a5-3b64af1a8333" CreationDate="2022-05-17T10:23:53.443" UserId="599" Text="The answer to your question:&#xD;&#xA;&#xD;&#xA;Right now ink! generates a separate structure for cross-contract calls. It has the name `{}Ref` where `{}` is the name of the contract struct. To use it, you need to export that:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;...&#xD;&#xA;pub use erc721::{ Erc721, Erc721Ref };&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod erc721{&#xD;&#xA;...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And use it:&#xD;&#xA;```rust&#xD;&#xA;...&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod ebisu {&#xD;&#xA;    use erc721::Erc721Ref;&#xD;&#xA;    use ink_env::call::FromAccountId;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Ebisu{&#xD;&#xA;        assets: Mapping&lt;(AccountId, TokenId), AccountId&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Ebisu{&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn check(&amp;self, contract: AccountId) -&gt; AccountId{&#xD;&#xA;            let token: Erc721Ref = FromAccountId::from_account_id(contract);&#xD;&#xA;            ...&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;But I suggest you use the [`PSP34`](https://github.com/w3f/PSPs/blob/master/PSPs/psp-34.md) standard for non-fungible tokens to be compatible with other NFT in the network. If all NFT implements the same interface anyone can work with a pre-defined API.&#xD;&#xA;&#xD;&#xA;As a variant, you can use compatible to PSP the [trait from OpenBrush](https://github.com/Supercolony-net/openbrush-contracts/blob/cbb07ba03b9cdd1f0eb897a16a9d6c0d20cf2fa6/contracts/traits/psp34/psp34.rs#L71). You can implements the trait manually, or you can reuse the implementation, or you can use that trait for cross contract calls.&#xD;&#xA;&#xD;&#xA;With [wapper feature](https://github.com/Supercolony-net/openbrush-contracts#wrapper-around-traits) you can do cross-contract calls to any NFT:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod ebisu {&#xD;&#xA;    use brush::contracts::traits::psp34::PSP34Ref;&#xD;&#xA;    use ink_env::call::FromAccountId;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Ebisu{&#xD;&#xA;        assets: Mapping&lt;(AccountId, TokenId), AccountId&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Ebisu{&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn check_balance(&amp;self, nft: AccountId, some_account: AccountId) -&gt; AccountId{&#xD;&#xA;            let balance = PSP34Ref::balance_of(&amp;nft, some_account);&#xD;&#xA;            ...&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9971" PostHistoryTypeId="2" PostId="2663" RevisionGUID="cbd96e39-377e-42be-ba91-2e915e8a78a6" CreationDate="2022-05-17T10:28:02.760" UserId="2025" Text="(*This question was originally asked here:* https://stackoverflow.com/questions/72056703/substrate-forkless-upgrade-tutorial-pallet-scheduler-has-breaking-changes)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am following the Substrate [forkless upgrade tutorial](https://docs.substrate.io/tutorials/v3/forkless-upgrades/) and have added&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-scheduler = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;```&#xD;&#xA;to my Cargo.toml. However, when I try to build the runtime with the command&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo build --release -p node-template-runtime&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the process fails and I get the following error message:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0046]: not all trait items implemented, missing: PreimageProvider, NoPreimagePostponement&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems that this appears to be a newer version and requires me to specify `NoPreimagePostponement` and `PreimageProvider` types in `pallet_scheduler::Config`.&#xD;&#xA;&#xD;&#xA;How can I set those parameters? https://docs.rs/pallet-scheduler/latest/pallet_scheduler/trait.Config.html doesn't seem to have those properties." ContentLicense="CC BY-SA 4.0" />
  <row Id="9973" PostHistoryTypeId="1" PostId="2663" RevisionGUID="cbd96e39-377e-42be-ba91-2e915e8a78a6" CreationDate="2022-05-17T10:28:02.760" UserId="2025" Text="Substrate forkless upgrade tutorial: pallet_scheduler has breaking changes" ContentLicense="CC BY-SA 4.0" />
  <row Id="9974" PostHistoryTypeId="3" PostId="2663" RevisionGUID="cbd96e39-377e-42be-ba91-2e915e8a78a6" CreationDate="2022-05-17T10:28:02.760" UserId="2025" Text="|rust|runtime-upgrade|error|config|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9976" PostHistoryTypeId="2" PostId="2664" RevisionGUID="80eb0c20-fbe9-4afc-bda8-11ec0cb71683" CreationDate="2022-05-17T10:28:02.760" UserId="2025" Text="Indeed, there is a new version for the Scheduler pallet and the tutorial needs to be updated according to it.  [This pull request](https://github.com/paritytech/substrate/pull/10356) mentions the necessary changes. In the meantime, just set the following to imitate the desired behavior:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type PreimageProvider = ();&#xD;&#xA;type NoPreimagePostponement = ();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9978" PostHistoryTypeId="2" PostId="2665" RevisionGUID="9117eb4f-4fed-449a-a3cb-4d0da36e9097" CreationDate="2022-05-17T11:50:12.953" UserId="2561" Text=" 1. What is the best way to perform an upgrade to the latest version of substrate for a node with some custom modifications?&#xD;&#xA; 2. Is there a way to test that the upgrade hasn't modified the blockchain state in any way? " ContentLicense="CC BY-SA 4.0" />
  <row Id="9980" PostHistoryTypeId="1" PostId="2665" RevisionGUID="9117eb4f-4fed-449a-a3cb-4d0da36e9097" CreationDate="2022-05-17T11:50:12.953" UserId="2561" Text="Node Upgrade to Latest Version" ContentLicense="CC BY-SA 4.0" />
  <row Id="9981" PostHistoryTypeId="3" PostId="2665" RevisionGUID="9117eb4f-4fed-449a-a3cb-4d0da36e9097" CreationDate="2022-05-17T11:50:12.953" UserId="2561" Text="|substrate-node|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9982" PostHistoryTypeId="2" PostId="2666" RevisionGUID="72ec2e0f-f31e-4fe1-832c-113afaefddfe" CreationDate="2022-05-17T11:57:24.057" UserId="94" Text="The python interface provides convenience functions for this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```lang-py&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;&#xD;&#xA;client = SubstrateInterface(&#xD;&#xA;    url=&quot;wss://kusama-rpc.polkadot.io/&quot;,&#xD;&#xA;    ss58_format=2,&#xD;&#xA;    type_registry_preset='kusama'&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;# Prints: {'ss58Format': 2, 'tokenDecimals': 12, 'tokenSymbol': 'KSM'}&#xD;&#xA;print(client.properties)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;If there is a method missing, you can manually use `client.rpc_request(&quot;system_properties&quot;, []).get('result')` instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="9984" PostHistoryTypeId="2" PostId="2667" RevisionGUID="c738219d-4459-44f8-9881-4d12db490fdb" CreationDate="2022-05-17T12:03:17.190" UserId="523" Text="with `try-runtime` in `pre` and `post` check&#xD;&#xA;https://docs.substrate.io/v3/tools/try-runtime/" ContentLicense="CC BY-SA 4.0" />
  <row Id="9986" PostHistoryTypeId="5" PostId="2652" RevisionGUID="a9bd40ce-1bc0-4b6a-afb7-3ec3c3f020a8" CreationDate="2022-05-17T12:17:06.203" UserId="29" Comment="added 80 characters in body" Text="hmm just checked it now and looks fine to me:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/m9Y8C.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Network &gt; Staking &gt; Overview&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/WvTK6.png)&#xD;&#xA;&#xD;&#xA;Consider reloading.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="9987" PostHistoryTypeId="2" PostId="2668" RevisionGUID="7560edca-fb18-4f51-90d8-8a37ef9e069e" CreationDate="2022-05-17T12:32:53.043" UserId="2562" Text="I want to build a nearly real blockchain system based on Substrate for academic study.&#xD;&#xA;&#xD;&#xA;I have scan the tutorials and guides, but those materials are all application level content.&#xD;&#xA;Where can I find the materials for custom architecture? &#xD;&#xA;&#xD;&#xA;For example, I want runtime and consensus work parallelly, so do we have methods to adjust interaction of these modules? Besides, how to learn the critical interface/trait of module, such as storage, consensus and execution.Thx!" ContentLicense="CC BY-SA 4.0" />
  <row Id="9989" PostHistoryTypeId="1" PostId="2668" RevisionGUID="7560edca-fb18-4f51-90d8-8a37ef9e069e" CreationDate="2022-05-17T12:32:53.043" UserId="2562" Text="What materials can we learn for Custom Architecture?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9990" PostHistoryTypeId="3" PostId="2668" RevisionGUID="7560edca-fb18-4f51-90d8-8a37ef9e069e" CreationDate="2022-05-17T12:32:53.043" UserId="2562" Text="|architecture|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9991" PostHistoryTypeId="2" PostId="2669" RevisionGUID="9c2dd67b-23f2-4db1-acce-4937e9f61026" CreationDate="2022-05-17T13:48:59.027" UserId="425" Text="Most recent version of cargo-contracts doesn not parse a valid WS url: &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cargo +nightly contract upload --suri '//Alice' --url 'wss://ws-smartnet.test.azero.dev:443'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;ERROR: Rpc error: Networking or low-level protocol error: Invalid URL: No port number in URL (default port is not supported)&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Networking or low-level protocol error: Invalid URL: No port number in URL (default port is not supported)&#xD;&#xA;    1: Invalid URL: No port number in URL (default port is not supported)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Connecting with wscat proceeds as expected:&#xD;&#xA;```&#xD;&#xA;wscat -c wss://ws-smartnet.test.azero.dev:443 -p 13&#xD;&#xA;Connected (press CTRL+C to quit)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="9993" PostHistoryTypeId="1" PostId="2669" RevisionGUID="9c2dd67b-23f2-4db1-acce-4937e9f61026" CreationDate="2022-05-17T13:48:59.027" UserId="425" Text="cargo-contracts throws on a valid WS URl" ContentLicense="CC BY-SA 4.0" />
  <row Id="9994" PostHistoryTypeId="3" PostId="2669" RevisionGUID="9c2dd67b-23f2-4db1-acce-4937e9f61026" CreationDate="2022-05-17T13:48:59.027" UserId="425" Text="|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9995" PostHistoryTypeId="2" PostId="2670" RevisionGUID="b414698b-a337-4c07-8d9d-28170004eecc" CreationDate="2022-05-17T13:54:26.853" UserId="2192" Text="In our runtime we have a custom implementation of offence reporting. I want to write an adapter for grandpa equivocation offences (implementing the [`ReportOffence`](https://paritytech.github.io/substrate/master/sp_staking/offence/trait.ReportOffence.html) trait), and have been using the offences pallet as a guide for how to do this. &#xD;&#xA;&#xD;&#xA;In the Offences pallet, offence details are stored in a map of (effectively) `(Offence::ID, Slot, Offender) =&gt; OffenceDetails` (see [here](https://paritytech.github.io/substrate/master/pallet_offences/pallet/type.Reports.html)). This allows efficient lookup of reports that have already been submitted via `HandleEquivocations::is_known_offence`.&#xD;&#xA;&#xD;&#xA;The downside seems to be that we can never prune any reports, since otherwise the offence report could (presumably) be replayed by some malicious party, causing an offender to be [slashed twice for the same offence](https://www.imdb.com/title/tt0150377/). Indeed, checking the chain state of `offence.reports()` on polkadot, my browser slows noticeably while downloading and parsing the huge number of accumulated reports. So it appears these are never (or rarely?) pruned. &#xD;&#xA;&#xD;&#xA;In my implementation of [`ReportOffence`], I would like to to avoid the abovementioned storage bloat if possible. Thus my plan would be to take advantage of the `Ord` property of [`Offence::TimeSlot`](https://paritytech.github.io/substrate/master/sp_staking/offence/trait.Offence.html#associatedtype.TimeSlot). Instead of storing a map of `(Offence::ID, Slot, Offender) =&gt; OffenceDetails`, I would store `(Offence::ID, Offender) =&gt; Slot` and then reject any equivocation report for a slot older than slot of the last reported offence. &#xD;&#xA;&#xD;&#xA;So, a couple of concrete questions:&#xD;&#xA;&#xD;&#xA;- Is there any fundamental reason that offence reports are (or seem to be) stored indefinitely in polkadot, apart from checking for dupliate reports? &#xD;&#xA;- Similarly: Is there any fundamental reason that frame's offences pallet does *not* implement double-slashing prevention through the `TimeSlot: Ord` trait rather than a hash? " ContentLicense="CC BY-SA 4.0" />
  <row Id="9997" PostHistoryTypeId="1" PostId="2670" RevisionGUID="b414698b-a337-4c07-8d9d-28170004eecc" CreationDate="2022-05-17T13:54:26.853" UserId="2192" Text="Are Offences ever pruned?" ContentLicense="CC BY-SA 4.0" />
  <row Id="9998" PostHistoryTypeId="3" PostId="2670" RevisionGUID="b414698b-a337-4c07-8d9d-28170004eecc" CreationDate="2022-05-17T13:54:26.853" UserId="2192" Text="|substrate-node|polkadot|frame|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="9999" PostHistoryTypeId="6" PostId="2669" RevisionGUID="3181af30-1498-4d3b-b6a0-0b93ad7f7a71" CreationDate="2022-05-17T13:55:32.043" UserId="29" Comment="edited tags" Text="|smart-contract|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10000" PostHistoryTypeId="2" PostId="2671" RevisionGUID="3f93cc1f-c867-49b5-baaf-823c378bf730" CreationDate="2022-05-17T14:17:13.063" UserId="351" Text="Well, I dont quite get you, But in substrate the framework is very flexible and Sustrate enables you to build your own blockchain system. But it removes the bottleneck of writing your own consensus algo , networking, ddatabase, txn pool and it gives you FRAME runtime framework to write custom logic for your chain.&#xD;&#xA;&#xD;&#xA;So if you want deeper flexibility, you can change the underlying consensus and other low level architecture.  Just clone the parity/substrate repo and change whatever you want and even if you don't want to use the existing Frame framework you can change that too ( just depends on your skills level ). &#xD;&#xA;&#xD;&#xA;So the tutorials present right now shows you how you can create your own real blockchain with custom runtime on it. You want to work on critical infrastructure no worries just read the docs carefully. And also you can check discussion on substrate repo. " ContentLicense="CC BY-SA 4.0" />
  <row Id="10002" PostHistoryTypeId="5" PostId="2669" RevisionGUID="81d87392-eabc-4b9a-977b-d48475613974" CreationDate="2022-05-17T14:17:22.917" UserId="425" Comment="deleted 1 character in body" Text="Most recent version (v1.3.0) of cargo-contract does not parse a valid WS url: &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cargo +nightly contract upload --suri '//Alice' --url 'wss://ws-smartnet.test.azero.dev:443'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;ERROR: Rpc error: Networking or low-level protocol error: Invalid URL: No port number in URL (default port is not supported)&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Networking or low-level protocol error: Invalid URL: No port number in URL (default port is not supported)&#xD;&#xA;    1: Invalid URL: No port number in URL (default port is not supported)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Connecting with wscat proceeds as expected:&#xD;&#xA;```&#xD;&#xA;wscat -c wss://ws-smartnet.test.azero.dev:443 -p 13&#xD;&#xA;Connected (press CTRL+C to quit)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10003" PostHistoryTypeId="4" PostId="2669" RevisionGUID="81d87392-eabc-4b9a-977b-d48475613974" CreationDate="2022-05-17T14:17:22.917" UserId="425" Comment="deleted 1 character in body" Text="cargo-contract throws on a valid WS URl" ContentLicense="CC BY-SA 4.0" />
  <row Id="10004" PostHistoryTypeId="52" PostId="2656" RevisionGUID="ac2c38f3-9d1c-465f-b838-5a87eaa1e426" CreationDate="2022-05-17T14:20:00.123" />
  <row Id="10005" PostHistoryTypeId="2" PostId="2672" RevisionGUID="9d6e6000-de06-41a1-b75d-549a0c494bb7" CreationDate="2022-05-17T14:27:50.737" UserId="45" Text="I'd divide the question further into two parts.&#xD;&#xA;&#xD;&#xA;## Does Substrate Really Need a Virtual Machine?&#xD;&#xA;&#xD;&#xA;Historically, Substrate was split from Polkadot early on. So we will have to bring Polkadot into the context. Polkadot had two problems to solve.&#xD;&#xA;&#xD;&#xA;1. Polkadot is meant to be upgradable and governed on-chain.&#xD;&#xA;2. Polkadot's parachains need a way of verifying the correctness of state transitions.&#xD;&#xA;&#xD;&#xA;It is possible to solve those two without involving a virtual machine.&#xD;&#xA;&#xD;&#xA;Wrt upgrading, for example, ethereum is still leaning on hard-forks as their upgrade mechanism. This stuff works but is not perfect. One reason is that it conflates technical upgrading and governance. For a successful upgrade, a significant portion of users must upgrade their nodes in time. Not upgraded users will stay on the existing fork. Therefore the voting process is biased towards not upgrading.&#xD;&#xA;&#xD;&#xA;When the state-transition logic is bytecode stored on the chain itself, voting is separate. In many cases, operators don't have to do anything for an upgrade.&#xD;&#xA;&#xD;&#xA;Now, sometimes forkless code upgrades require intervention by node operators, such as when the code starts using functionality introduced by newer versions of the node software. In this case, though, the correct state transition is always on the chain. It's just that the older nodes cannot follow the canonical chain because they cannot execute its state transition function.&#xD;&#xA;&#xD;&#xA;Hard forking is reserved only for more complicated situations, like social recovery. Upgrade becomes a routine.&#xD;&#xA;&#xD;&#xA;You might say, &quot;wait a minute, that does not require a VM&quot;, and you will be correct. E.g., Tendermint employs a rigid state machine by default. A tendermint-based chain can store a version number in the on-chain state. If a node does not have the logic for handling state transitions of that version, it can stop.&#xD;&#xA;&#xD;&#xA;A VM allows abstracting from the specifics of the platform. In your language of choice, there are typically things that may produce slightly different results on different platforms. Those things are usually not significant, and regular programmers don't care about them. &#xD;&#xA;&#xD;&#xA;However, in the case of blockchains, they do matter. Each observed bit of non-determinism leads to consensus divergence.&#xD;&#xA;&#xD;&#xA;Take even undefined behavior. You don't want to invoke it in your code. If you did, anything could happen, including `rm -rf /`. That anything can be different depending on the platform and the compiler. On the other hand, if that happened inside a VM, the machine the node was running would &#xD;&#xA;certainly be fine. The behavior will be the same on each machine.&#xD;&#xA;&#xD;&#xA;One of the costs is performance. Using a virtual machine most likely will lead to a performance loss compared to the native code.&#xD;&#xA;&#xD;&#xA;Another cost is complexity. Using a VM requires another big component in your node software. A VM is often a quite complicated piece of machinery. However, this complexity is not systemic and is isolated in the execution engine.&#xD;&#xA;&#xD;&#xA;## Why was Wasm picked as the virtual machine?&#xD;&#xA;&#xD;&#xA;WebAssembly has unique properties that make it a perfect fit for this use case.&#xD;&#xA;&#xD;&#xA;1. Performance. Wasm operations could be mapped to machine code quite directly. The performance is consistent without cliffs.&#xD;&#xA;1. Safe. Wasm programs do not have access to anything by default. The capabilities have to be exposed explicitly to the wasm environment. Wasm also has relatively simple semantics, which makes holes less probable.&#xD;&#xA;1. Determinstic-ish. Wasm instruction set has a small and well-defined number of non-deterministic operations. A not deterministic in this context means an operation can have different outputs given the same inputs. Making it deterministic is a matter of defining the actual output for those operations.&#xD;&#xA;1. Open standard. There is no single company that owns Wasm.&#xD;&#xA; &#xD;&#xA;It would take a lot of effort to make a platform like .NET or JVM work for our use-cases. They have too much surface. Making them safe and deterministic would be a problem.&#xD;&#xA;&#xD;&#xA;I don't even know what the tradeoffs are here. Not much comes to mind. It generally feels like a perfect fit for this particular use case. Here I will try to leave my thoughts on this and might update if I remember something else.&#xD;&#xA;&#xD;&#xA;- Early in Polkadot's lifecycle Wasm and tooling around it were under heavy development. It wasn't good. But now it is almost perfect.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10011" PostHistoryTypeId="2" PostId="2674" RevisionGUID="3af71b06-e545-4efa-b97d-ac205f5269fa" CreationDate="2022-05-17T15:08:26.247" UserId="2563" Text="0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am trying to generate an extrinsic proof that can in turn be used to generate a partial trie and then extract the actual extrinsic for which the proof was generated from the trie, but I've not been able to figure it out yet.&#xD;&#xA;&#xD;&#xA;Currently I'm using the trie_db::proof::generate_proof to generate the proof&#xD;&#xA;&#xD;&#xA;This is what I've done so far https://github.com/Wizdave97/extrinsic-from-proof/blob/master/src/main.rs&#xD;&#xA;&#xD;&#xA;The issue is the second line of this snippet returns an error 'InvalidStateRoot'&#xD;&#xA;&#xD;&#xA;    let db = sp_trie::storage_proof::StorageProof::new(proof.to_vec()).into_memory_db::&lt;BlakeTwo256&gt;();&#xD;&#xA;    let trie = sp_trie::TrieDB::&lt;sp_trie::LayoutV0&lt;BlakeTwo256&gt;&gt;::new(&amp;db, root).unwrap();" ContentLicense="CC BY-SA 4.0" />
  <row Id="10013" PostHistoryTypeId="1" PostId="2674" RevisionGUID="3af71b06-e545-4efa-b97d-ac205f5269fa" CreationDate="2022-05-17T15:08:26.247" UserId="2563" Text="How do I generate an extrinsic proof that encodes the actual extrinsic for which the proof was generated" ContentLicense="CC BY-SA 4.0" />
  <row Id="10014" PostHistoryTypeId="3" PostId="2674" RevisionGUID="3af71b06-e545-4efa-b97d-ac205f5269fa" CreationDate="2022-05-17T15:08:26.247" UserId="2563" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10015" PostHistoryTypeId="2" PostId="2675" RevisionGUID="50e8bf03-4446-4754-9038-3dc280719315" CreationDate="2022-05-17T15:40:25.217" UserId="225" Text="Proofs created with  `let extrinsic_proof  = generate_proof::&lt;_, sp_trie::LayoutV0&lt;BlakeTwo256&gt;, _, _ &gt;(&amp;trie, vec![&amp;key]).unwrap();` (generate_proof) cannot be loaded directly with `StorageProof::new`, they need to use https://github.com/paritytech/trie/blob/f64e1b0a8ced1b4b574d2b705202bf790d4394e4/trie-db/src/proof/verify.rs#L394, because the encoded node are incomplete (some hash are ommitted as they can be calculated from child nodes).&#xD;&#xA;&#xD;&#xA;Sadly I do not know of an implementation that rebuild the full memorydb. If you look at the verify method, you can see where the hash are calculated ('L::Hash::hash') over the full encoded node, inserted in memorydb there should work." ContentLicense="CC BY-SA 4.0" />
  <row Id="10017" PostHistoryTypeId="2" PostId="2676" RevisionGUID="c6392f0d-b38f-4e12-ab1e-0fef3bf33513" CreationDate="2022-05-17T15:52:30.853" UserId="2264" Text="I'm involved in a .NET substrate-based project and I started working towards an implementation for making balance transfers on Substrate. &#xD;&#xA;&#xD;&#xA;I would swear that I'm doing everything exactly the same way that the `@polkadot/*` packages do, but in the end, when I submit my transaction, I get an error `1010` back, which means the signature verification failed, and I'm running out of ideas.&#xD;&#xA;&#xD;&#xA;I have verified that:&#xD;&#xA;- The unsigned payload matches that of the polkadot packages.&#xD;&#xA;- The mnemonic is converted to the same public/secret pair.&#xD;&#xA;- That the signature can be verified by my code.&#xD;&#xA;- That the signature can be verified by `@polkadot/*` (!).&#xD;&#xA;- That the final payload matches one generated by `@polkadot/*`, minus the signature itself which is different every time, and the era, where I use an immortal era (`[0]`).&#xD;&#xA;&#xD;&#xA;[This][1] is a gist containing all the values leading up to the final submission. At the time of writing, the sender's nonce is 44.&#xD;&#xA;&#xD;&#xA;Eternally grateful to anyone who can shed some light.&#xD;&#xA;&#xD;&#xA;  [1]: https://gist.github.com/georgiosd/83b0dfcde4c5f6bbb4f2c29118b3bd87" ContentLicense="CC BY-SA 4.0" />
  <row Id="10019" PostHistoryTypeId="1" PostId="2676" RevisionGUID="c6392f0d-b38f-4e12-ab1e-0fef3bf33513" CreationDate="2022-05-17T15:52:30.853" UserId="2264" Text="Signature getting rejected by node when submitting a balance transfer on Westend" ContentLicense="CC BY-SA 4.0" />
  <row Id="10020" PostHistoryTypeId="3" PostId="2676" RevisionGUID="c6392f0d-b38f-4e12-ab1e-0fef3bf33513" CreationDate="2022-05-17T15:52:30.853" UserId="2264" Text="|substrate-node|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10021" PostHistoryTypeId="5" PostId="2672" RevisionGUID="f205497d-ce8e-4a2d-8c77-785aab5a8347" CreationDate="2022-05-17T16:59:07.197" UserId="28" Comment="improve" Text="I'd divide the question further into two parts.&#xD;&#xA;&#xD;&#xA;## Does Substrate Really Need a Virtual Machine?&#xD;&#xA;&#xD;&#xA;Historically, Substrate was split from Polkadot early on. So we will have to bring Polkadot into the context. Polkadot had two problems to solve.&#xD;&#xA;&#xD;&#xA;1. Polkadot is meant to be upgradable and governed on-chain.&#xD;&#xA;2. Polkadot's relay chain needs a way of verifying the correctness of parachain state transitions.&#xD;&#xA;&#xD;&#xA;It is possible to solve those two without involving a virtual machine.&#xD;&#xA;&#xD;&#xA;With regard to upgrading, for example, Ethereum is still leaning on hard-forks as their upgrade mechanism. This stuff works but is not perfect. One reason is that it conflates technical upgrading and governance. For a successful upgrade, a significant portion of users must upgrade their nodes in time. Not upgraded users will stay on the existing fork. Therefore the voting process is biased towards not upgrading.&#xD;&#xA;&#xD;&#xA;When the state-transition logic is bytecode stored on the chain itself, voting is separate. In many cases, operators don't have to do anything for an upgrade.&#xD;&#xA;&#xD;&#xA;Now, sometimes forkless code upgrades require intervention by node operators, such as when the code starts using functionality introduced by newer versions of the node software. In this case, though, the correct state transition is always on the chain. It's just that the older nodes cannot follow the canonical chain because they cannot execute its state transition function.&#xD;&#xA;&#xD;&#xA;Hard forking is reserved only for more complicated situations, like social recovery. Upgrade becomes a routine.&#xD;&#xA;&#xD;&#xA;You might say, &quot;wait a minute, that does not require a VM&quot;, and you will be correct. E.g., Tendermint employs a rigid state machine by default. A tendermint-based chain can store a version number in the on-chain state. If a node does not have the logic for handling state transitions of that version, it can stop.&#xD;&#xA;&#xD;&#xA;A VM allows abstracting from the specifics of the platform. In your language of choice, there are typically things that may produce slightly different results on different platforms. Those things are usually not significant, and regular programmers don't care about them. &#xD;&#xA;&#xD;&#xA;However, in the case of blockchains, they do matter. Each observed bit of non-determinism leads to consensus divergence.&#xD;&#xA;&#xD;&#xA;Take even undefined behavior. You don't want to invoke it in your code. If you did, anything could happen, including `rm -rf /`. That anything can be different depending on the platform and the compiler. On the other hand, if that happened inside a VM, the machine the node was running would &#xD;&#xA;certainly be fine. The behavior will be the same on each machine.&#xD;&#xA;&#xD;&#xA;One of the costs is performance. Using a virtual machine most likely will lead to a performance loss compared to the native code.&#xD;&#xA;&#xD;&#xA;Another cost is complexity. Using a VM requires another big component in your node software. A VM is often a quite complicated piece of machinery. However, this complexity is not systemic and is isolated in the execution engine.&#xD;&#xA;&#xD;&#xA;## Why was Wasm picked as the virtual machine?&#xD;&#xA;&#xD;&#xA;WebAssembly has unique properties that make it a perfect fit for this use case.&#xD;&#xA;&#xD;&#xA;1. Performance. Wasm operations could be mapped to machine code quite directly. The performance is consistent without cliffs.&#xD;&#xA;1. Safe. Wasm programs do not have access to anything by default. The capabilities have to be exposed explicitly to the wasm environment. Wasm also has relatively simple semantics, which makes holes less probable.&#xD;&#xA;1. Determinstic-ish. Wasm instruction set has a small and well-defined number of non-deterministic operations. A not deterministic in this context means an operation can have different outputs given the same inputs. Making it deterministic is a matter of defining the actual output for those operations.&#xD;&#xA;1. Open standard. There is no single company that owns Wasm.&#xD;&#xA; &#xD;&#xA;It would take a lot of effort to make a platform like .NET or JVM work for our use-cases. They have too much surface. Making them safe and deterministic would be a problem.&#xD;&#xA;&#xD;&#xA;I don't even know what the tradeoffs are here. Not much comes to mind. It generally feels like a perfect fit for this particular use case. Here I will try to leave my thoughts on this and might update if I remember something else.&#xD;&#xA;&#xD;&#xA;- Early in Polkadot's lifecycle Wasm and tooling around it were under heavy development. It wasn't good. But now it is almost perfect.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10022" PostHistoryTypeId="11" PostId="2555" RevisionGUID="af9b2262-a909-4c38-9037-4b960e8570f9" CreationDate="2022-05-17T17:50:34.333" UserId="28" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="10023" PostHistoryTypeId="2" PostId="2677" RevisionGUID="d913373d-6602-4cdf-8633-6d39e1abc296" CreationDate="2022-05-17T18:11:40.190" UserId="227" Text="&gt;The code allows you to either upload `metadata.json` &amp;&amp; `cont.wasm` files or a `cont.contract` file.&#xD;&#xA;&#xD;&#xA;The difference between the files is as follows:&#xD;&#xA;&#xD;&#xA;### `hello-world.wasm`&#xD;&#xA;Just the WebAssembly bytecode. You can look at this in a somehow human readable form by executing `wasm2wat my_contract.wasm &gt; my_contract.wat` and viewing the file in an editor.&#xD;&#xA;&#xD;&#xA;_This file will be stored on-chain._&#xD;&#xA;&#xD;&#xA;### `metadata.json`&#xD;&#xA;Contains the contracts metadata. You might also know this under the term &quot;ABI&quot; from other blockchain projects. This file contains a multitude of information about the contract ‒ none which is stored in the `.wasm`.&#xD;&#xA;&#xD;&#xA;You can execute `cat metadata.json | jq .` to get a pretty print of the file. You'll see that it contains information such as: which functions can be invoked on the contract, which compiler was used for it (important for reproducible builds), the storage layout of the contract, etc..&#xD;&#xA;&#xD;&#xA;_It's important that this file is not stored on the blockchain._ &#xD;&#xA;&#xD;&#xA;This file is needed if you build e.g. a user interface, a Dapp, a client, something along those lines. Than that application would read the metadata to find out how to interact with the contract. For example, each function on the contract has a selector. This selector is a unique sequence of bytes that can be used to identify the function which is called. So in order to interact with the contract you need to know how the selectors are defined.&#xD;&#xA;&#xD;&#xA;### `hello-world.contract`&#xD;&#xA;&#xD;&#xA;This file is just the `metadata.json` with an additional field `.source.wasm`. This field contains the Wasm bytecode in hex encoding. You can pretty print this file and look at it by executing `cat flipper.contract | jq .`. It really only has this one field more.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And then for your second question:&#xD;&#xA;&#xD;&#xA;&gt;What is the difference between the usage of a `.json` &amp;&amp; `.wasm` file and a `.contract` file for instantiation?&#xD;&#xA;&#xD;&#xA;It's still in the UI's for two reasons:&#xD;&#xA;* For legacy reasons, we only introduced the `.contract` format later on.&#xD;&#xA;* If you want to work with upgradeable contracts you need an option to set a different `metadata.json` for a contract that already exists on-chain. This is because the originally uploaded `.contract` file might have been updated and now you want to interact with it using the metadata format from the contract to which it was upgraded. You can find more details on this in our readme for an example of such an upgradeable contract ([here](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contracts/forward-calls))." ContentLicense="CC BY-SA 4.0" />
  <row Id="10025" PostHistoryTypeId="5" PostId="2677" RevisionGUID="85ed64f7-ca42-47ab-bafd-d4782ea8d584" CreationDate="2022-05-17T18:17:11.347" UserId="227" Comment="added 4 characters in body" Text="&gt;The code allows you to either upload `metadata.json` &amp;&amp; `cont.wasm` files or a `cont.contract` file.&#xD;&#xA;&#xD;&#xA;The difference between the files is as follows:&#xD;&#xA;&#xD;&#xA;### `hello-world.wasm`&#xD;&#xA;Just the WebAssembly bytecode. You can look at this in a somehow human readable form by executing `wasm2wat hello-world.wasm &gt; hello-world.wat` and viewing the file in an editor.&#xD;&#xA;&#xD;&#xA;_This file will be stored on-chain._&#xD;&#xA;&#xD;&#xA;### `metadata.json`&#xD;&#xA;Contains the contracts metadata. You might also know this under the term &quot;ABI&quot; from other blockchain projects. This file contains a multitude of information about the contract ‒ none which is stored in the `.wasm`.&#xD;&#xA;&#xD;&#xA;You can execute `cat metadata.json | jq .` to get a pretty print of the file. You'll see that it contains information such as: which functions can be invoked on the contract, which compiler was used for it (important for reproducible builds), the storage layout of the contract, etc..&#xD;&#xA;&#xD;&#xA;_It's important that this file is not stored on the blockchain._ &#xD;&#xA;&#xD;&#xA;This file is needed if you build e.g. a user interface, a Dapp, a client, something along those lines. Than that application would read the metadata to find out how to interact with the contract. For example, each function on the contract has a selector. This selector is a unique sequence of bytes that can be used to identify the function which is called. So in order to interact with the contract you need to know how the selectors are defined.&#xD;&#xA;&#xD;&#xA;### `hello-world.contract`&#xD;&#xA;&#xD;&#xA;This file is just the `metadata.json` with an additional field `.source.wasm`. This field contains the Wasm bytecode in hex encoding. You can pretty print this file and look at it by executing `cat hello-world.contract | jq .`. It really only has this one field more.&#xD;&#xA;&#xD;&#xA;_This file is used if you upload a contract to a chain, e.g. via Contracts UI or polkadot-js. It's Wasm bytecode part will be stored on-chain, it's metadata part will be used by the UI to display information and interaction possibilities for the contract._ &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And then for your second question:&#xD;&#xA;&#xD;&#xA;&gt;What is the difference between the usage of a `.json` &amp;&amp; `.wasm` file and a `.contract` file for instantiation?&#xD;&#xA;&#xD;&#xA;It's still in the UI's for two reasons:&#xD;&#xA;* For legacy reasons, we only introduced the `.contract` format later on.&#xD;&#xA;* If you want to work with upgradeable contracts you need an option to set a different `metadata.json` for a contract that already exists on-chain. This is because the originally uploaded `.contract` file might have been updated and now you want to interact with it using the metadata format from the contract to which it was upgraded. You can find more details on this in our readme for an example of such an upgradeable contract ([here](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contracts/forward-calls))." ContentLicense="CC BY-SA 4.0" />
  <row Id="10026" PostHistoryTypeId="10" PostId="2238" RevisionGUID="010852c2-d1ef-4dac-9c14-f9be6c5e907d" CreationDate="2022-05-17T18:58:45.300" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[1469],&quot;Voters&quot;:[{&quot;Id&quot;:227,&quot;DisplayName&quot;:&quot;cmichi&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="10027" PostHistoryTypeId="5" PostId="2574" RevisionGUID="6655347a-e639-4ed9-8c0b-de73d8cff9c7" CreationDate="2022-05-17T19:14:53.100" UserId="590" Comment="added 45 characters in body" Text="I came across the following substrate recipe [Cache Multiple Calls][1]&#xD;&#xA;&#xD;&#xA;that explains how we can cache multiple reads by cloning the value or copying. Is this still a valid recipe?&#xD;&#xA;&#xD;&#xA;My understanding is that multiple reads are cached as described in the [documentation][1]:&#xD;&#xA;&#xD;&#xA;&gt;Multiple reads of the same value count as one read.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.recipes/cache.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="10028" PostHistoryTypeId="2" PostId="2678" RevisionGUID="fd2a3e71-b83f-4560-8136-3ba498143a06" CreationDate="2022-05-17T19:21:15.833" UserId="282" Text="Currently, we have a local test net with 4 substrate nodes using [this runtime][1] which has the staking and session pallets. 2 nodes (Alice and Bob) are validators, placed in the chain spec json file and the other 2 (Charlie and Dave) were added as waiting validators while the chain was running with the goal to be chosen to the next session, but this never occurs. In each new epoch, the same validators (Alice and Bob) take place and I did not notice any session change event on polkadot JS UI. I would like to know if I'm missing some configuration or action to add new validators in a running network?&#xD;&#xA;&#xD;&#xA;In the beginning of the first epoch I notice this event but I'm not sure if it is related to the session change&#xD;&#xA;[![election provider multi phase event][2]][2]&#xD;&#xA;&#xD;&#xA;The active validator set. It keeps the same as the through the epochs&#xD;&#xA;[![active validator set][3]][3]&#xD;&#xA;&#xD;&#xA;I've added two more validators using their respective session keys and I did not notice any validator set change (I've waited for more than 30 epochs)&#xD;&#xA;[![waiting validator set][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking&#xD;&#xA;  [2]: https://i.stack.imgur.com/qzjPo.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/KAfEH.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/P2c85.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10030" PostHistoryTypeId="1" PostId="2678" RevisionGUID="fd2a3e71-b83f-4560-8136-3ba498143a06" CreationDate="2022-05-17T19:21:15.833" UserId="282" Text="Local network does not change validator set" ContentLicense="CC BY-SA 4.0" />
  <row Id="10031" PostHistoryTypeId="3" PostId="2678" RevisionGUID="fd2a3e71-b83f-4560-8136-3ba498143a06" CreationDate="2022-05-17T19:21:15.833" UserId="282" Text="|substrate-node-template|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10032" PostHistoryTypeId="2" PostId="2679" RevisionGUID="deadd52f-8747-4f53-853a-a9f25c95071f" CreationDate="2022-05-17T20:25:27.757" UserId="555" Text="I think this is solved by installing LLVM : https://releases.llvm.org/download.html. &#xD;&#xA;when you open this link you will find macOs option inside LLVM 11.0.0&#xD;&#xA;Just install it." ContentLicense="CC BY-SA 4.0" />
  <row Id="10034" PostHistoryTypeId="2" PostId="2680" RevisionGUID="075ddc0d-fe39-4792-b142-1375dffbb57d" CreationDate="2022-05-17T20:25:53.913" UserId="73" Text="No there is no way to extract these information from a type. I think in your case you should just add a function to `Block` `get_version`." ContentLicense="CC BY-SA 4.0" />
  <row Id="10036" PostHistoryTypeId="6" PostId="2665" RevisionGUID="78a5171c-c311-41c7-bfa5-1862034d3cbc" CreationDate="2022-05-17T21:58:53.527" UserId="34" Comment="edited tags" Text="|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10037" PostHistoryTypeId="2" PostId="2681" RevisionGUID="28ffc6f0-e12c-4d44-af8b-1e6df70d7f85" CreationDate="2022-05-17T22:14:53.623" UserId="34" Text=" 1. If you based your project on a version of the [node template](https://github.com/substrate-developer-hub/substrate-node-template), you can look at the code diff between some tagged releases there to see what logic changes needed to happen. For example, [this rather large leap from `3.0.0` to `polkadot-v0.9.20`](https://github.com/substrate-developer-hub/substrate-node-template/compare/v3.0.0...polkadot-v0.9.20#diff-0ec06ea58bd455f09ce6b3bb4c2c1c0d37bda51c1e1be2151c560c9c973959ecL1).&#xD;&#xA;&#xD;&#xA;    &gt; Do keep in mind that if you want to be a _parachain_ then at the&#xD;&#xA;    time of writing, you will often need to stay up to date with the&#xD;&#xA;    relay chain version you are trying to connect to in real-time.&#xD;&#xA;&#xD;&#xA;    If you are intending on updating a _running chain_ then you likely have a much more involved job of looking through [storage migrations](https://docs.substrate.io/v3/runtime/upgrades/#storage-migrations) that could be required per the pallets you are using from Substrate or other libraries like [ORML](https://github.com/open-web3-stack/open-runtime-module-library).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;2. As mentioned in another answer, [`try-runtime`](https://docs.substrate.io/v3/tools/try-runtime/) in `pre` and `post` check can be quite helpful in testing. These is also thinks like [`fork-off-runtime`](https://github.com/maxsam4/fork-off-substrate) that you could consider too.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10039" PostHistoryTypeId="2" PostId="2682" RevisionGUID="112f3e0b-35a1-44c9-b378-6820becc8bf5" CreationDate="2022-05-17T22:43:50.427" UserId="205" Text="I believe the following resolved issue may answer you question. Cheers!&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/issues/338#issuecomment-1118007694" ContentLicense="CC BY-SA 4.0" />
  <row Id="10041" PostHistoryTypeId="2" PostId="2683" RevisionGUID="009f5c62-b8a9-4d07-9944-530ba8f5f0b8" CreationDate="2022-05-17T22:53:24.807" UserId="285" Text="If I have a storage item defined as:&#xD;&#xA;```&#xD;&#xA;pub Foo get(fn foo): map hasher(twox_64_concat) u32 =&gt; Vec&lt;T::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;Do I always need to check if Foo contains the key before deciding to `insert` or `mutate`?&#xD;&#xA; &#xD;&#xA;In other words, if I call insert when the key exists will it overwrite the value or append to it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10043" PostHistoryTypeId="1" PostId="2683" RevisionGUID="009f5c62-b8a9-4d07-9944-530ba8f5f0b8" CreationDate="2022-05-17T22:53:24.807" UserId="285" Text="Inserting into a map of vectors" ContentLicense="CC BY-SA 4.0" />
  <row Id="10044" PostHistoryTypeId="3" PostId="2683" RevisionGUID="009f5c62-b8a9-4d07-9944-530ba8f5f0b8" CreationDate="2022-05-17T22:53:24.807" UserId="285" Text="|storage|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10045" PostHistoryTypeId="6" PostId="2655" RevisionGUID="8d9fadb4-42bf-40da-9772-06d4b087a51f" CreationDate="2022-05-18T02:47:16.510" UserId="205" Comment="Added a more specific tag." Text="|substrate-node-template|rocks-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10046" PostHistoryTypeId="24" PostId="2655" RevisionGUID="8d9fadb4-42bf-40da-9772-06d4b087a51f" CreationDate="2022-05-18T02:47:16.510" Comment="Proposed by 205 approved by 28 edit id of 199" ContentLicense="CC BY-SA 4.0" />
  <row Id="10047" PostHistoryTypeId="2" PostId="2684" RevisionGUID="5f12d519-3ffa-40a0-8d4a-01fe2a9db8ea" CreationDate="2022-05-18T03:04:46.360" UserId="244" Text="I have a blockchain running a version of Frontier from september 2021, and want to upgrade it to the latest commits.&#xD;&#xA;I'm prepared to do a forkless upgrade, but who do I know if I will need storage migration as well?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10049" PostHistoryTypeId="1" PostId="2684" RevisionGUID="5f12d519-3ffa-40a0-8d4a-01fe2a9db8ea" CreationDate="2022-05-18T03:04:46.360" UserId="244" Text="How do I know if I will need a storage migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10050" PostHistoryTypeId="3" PostId="2684" RevisionGUID="5f12d519-3ffa-40a0-8d4a-01fe2a9db8ea" CreationDate="2022-05-18T03:04:46.360" UserId="244" Text="|runtime|runtime-upgrade|frontier|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10051" PostHistoryTypeId="5" PostId="2684" RevisionGUID="622c1247-be6d-4978-87cd-588195d21a7d" CreationDate="2022-05-18T03:10:02.550" UserId="244" Comment="adding info, adding links to commits" Text="I have a blockchain running a version of Frontier from [september 2021][1], and want to upgrade it to the [latest commits][2].&#xD;&#xA;I'm prepared to do a forkless upgrade, but who do I know if I will need storage migration as well?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/frontier-node-template/commit/3c23a72d33137455feca250225c87d504ef11a40&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/frontier-node-template/commit/bec24212467192203459cb500f23daad8182f815" ContentLicense="CC BY-SA 4.0" />
  <row Id="10052" PostHistoryTypeId="4" PostId="2684" RevisionGUID="622c1247-be6d-4978-87cd-588195d21a7d" CreationDate="2022-05-18T03:10:02.550" UserId="244" Comment="adding info, adding links to commits" Text="How do I know if I will need a storage migration along a forkless upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10053" PostHistoryTypeId="2" PostId="2685" RevisionGUID="60ff189b-bd60-4c9a-9906-4852f5b8679a" CreationDate="2022-05-18T04:08:04.540" UserId="135" Text="I’m trying to run benchmarks on the latest commit in this PR https://github.com/InvArch/InvArch-Node/pull/87 The pallet library pallet library is separate so the runtime depends on this latest commit in this PR https://github.com/InvArch/InvArch-Frames/pull/152 &#xD;&#xA;&#xD;&#xA;I am able to compile without errors with cargo ```build --release```&#xD;&#xA;&#xD;&#xA;But when I run ```cargo build --release --features runtime-benchmarks```, it produce some errors for 2 out of 4 pallets that was being benchmarked, as shown below:&#xD;&#xA;```&#xD;&#xA;error[E0599]: the function or associated item `run_benchmark` exists for struct `pallet_ips::Pallet&lt;Runtime&gt;`, but its trait bounds were not satisfied&#xD;&#xA;      --&gt; /home/sha888/invarch/InvArch-Node/runtime/src/lib.rs:1079:13&#xD;&#xA;       |&#xD;&#xA;  797  | / construct_runtime!(&#xD;&#xA;  798  | |     pub enum Runtime where&#xD;&#xA;  799  | |         Block = Block,&#xD;&#xA;  800  | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...    |&#xD;&#xA;  841  | |     }&#xD;&#xA;  842  | | );&#xD;&#xA;       | |_- doesn't satisfy `&lt;_ as pallet_ipl::Config&gt;::Licenses = pallet_ips::benchmarking::InvArchLicenses`&#xD;&#xA;  ...&#xD;&#xA;  1079 |               add_benchmark!(params, batches, pallet_ips, Ips);&#xD;&#xA;       |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item cannot be called on `pallet_ips::Pallet&lt;Runtime&gt;` due to unsatisfied trait bounds&#xD;&#xA;       |&#xD;&#xA;      ::: /home/sha888/.cargo/git/checkouts/invarch-frames-d642bcfed68b46a3/c3c9d40/INV4/pallet-ips/src/lib.rs:125:5&#xD;&#xA;       |&#xD;&#xA;  125  |       pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;       |       ------------------------ doesn't satisfy `pallet_ips::Pallet&lt;Runtime&gt;: Benchmarking`&#xD;&#xA;       |&#xD;&#xA;       = note: the following trait bounds were not satisfied:&#xD;&#xA;               `&lt;Runtime as pallet_ipl::Config&gt;::Licenses = pallet_ips::benchmarking::InvArchLicenses`&#xD;&#xA;               which is required by `pallet_ips::Pallet&lt;Runtime&gt;: Benchmarking`&#xD;&#xA;       = note: this error originates in the macro `add_benchmark` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0599]: the function or associated item `run_benchmark` exists for struct `pallet_ipt::Pallet&lt;Runtime&gt;`, but its trait bounds were not satisfied&#xD;&#xA;      --&gt; /home/sha888/invarch/InvArch-Node/runtime/src/lib.rs:1080:13&#xD;&#xA;       |&#xD;&#xA;  797  | / construct_runtime!(&#xD;&#xA;  798  | |     pub enum Runtime where&#xD;&#xA;  799  | |         Block = Block,&#xD;&#xA;  800  | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...    |&#xD;&#xA;  841  | |     }&#xD;&#xA;  842  | | );&#xD;&#xA;       | |_- doesn't satisfy `&lt;_ as pallet_ipt::Config&gt;::Call = pallet_ipt::Call&lt;Runtime&gt;`&#xD;&#xA;  ...&#xD;&#xA;  1080 |               add_benchmark!(params, batches, pallet_ipt, Ipt);&#xD;&#xA;       |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item cannot be called on `pallet_ipt::Pallet&lt;Runtime&gt;` due to unsatisfied trait bounds&#xD;&#xA;       |&#xD;&#xA;      ::: /home/sha888/.cargo/git/checkouts/invarch-frames-d642bcfed68b46a3/c3c9d40/INV4/pallet-ipt/src/lib.rs:121:5&#xD;&#xA;       |&#xD;&#xA;  121  |       pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;       |       ------------------------ doesn't satisfy `pallet_ipt::Pallet&lt;Runtime&gt;: Benchmarking`&#xD;&#xA;       |&#xD;&#xA;       = note: the following trait bounds were not satisfied:&#xD;&#xA;               `&lt;Runtime as pallet_ipt::Config&gt;::Call = pallet_ipt::Call&lt;Runtime&gt;`&#xD;&#xA;               which is required by `pallet_ipt::Pallet&lt;Runtime&gt;: Benchmarking`&#xD;&#xA;       = note: this error originates in the macro `add_benchmark` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10055" PostHistoryTypeId="1" PostId="2685" RevisionGUID="60ff189b-bd60-4c9a-9906-4852f5b8679a" CreationDate="2022-05-18T04:08:04.540" UserId="135" Text="Function or associated item cannot be called upon benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="10056" PostHistoryTypeId="3" PostId="2685" RevisionGUID="60ff189b-bd60-4c9a-9906-4852f5b8679a" CreationDate="2022-05-18T04:08:04.540" UserId="135" Text="|parachain|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10057" PostHistoryTypeId="2" PostId="2686" RevisionGUID="e4c5576b-6f42-443b-89e5-31c194d2916e" CreationDate="2022-05-18T04:30:20.080" UserId="2567" Text="I am trying to modify the kitties pallet(https://docs.substrate.io/tutorials/v3/kitties/pt1/) in order to read some json data from an already existing file.&#xD;&#xA;So, I need to read the contents of the file and parse json from it. For this I am following https://github.com/nightraiser/daily-code-rust/blob/master/json-reading/src/main.rs &#xD;&#xA;But this code is only compiling when I am running `SKIP_WASM_BUILD=1 cargo build --release`. On running `cargo build --release` I am getting the below error[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I am a beginner in Rust. Can someone please guide me how can I make this run or is there any other package for this task that I can use?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/f7rZN.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="10059" PostHistoryTypeId="1" PostId="2686" RevisionGUID="e4c5576b-6f42-443b-89e5-31c194d2916e" CreationDate="2022-05-18T04:30:20.080" UserId="2567" Text="How can I read JSON files in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="10060" PostHistoryTypeId="3" PostId="2686" RevisionGUID="e4c5576b-6f42-443b-89e5-31c194d2916e" CreationDate="2022-05-18T04:30:20.080" UserId="2567" Text="|substrate-node-template|wasm|no-std|json|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10061" PostHistoryTypeId="2" PostId="2687" RevisionGUID="85e062ba-4f54-4a48-b33a-b6127ac3dc03" CreationDate="2022-05-18T04:34:14.000" UserId="1789" Text="I have built my parachain release.&#xD;&#xA;&#xD;&#xA;Here are the files/folders I have inside my target/release:&#xD;&#xA;```&#xD;&#xA;11G	.&#xD;&#xA;5.9G	./deps&#xD;&#xA;3.2G	./wbuild&#xD;&#xA;1.6G	./build&#xD;&#xA;134M	./parachain-collator&#xD;&#xA;49M	    ./.fingerprint&#xD;&#xA;30M	    ./libp_chain_runtime.rlib&#xD;&#xA;784K	./libpallet_erc721.rlib&#xD;&#xA;760K	./libpallet_crowdloan_rewards.rlib&#xD;&#xA;540K	./parachain-collator.d&#xD;&#xA;540K	./libp_chain_runtime.d&#xD;&#xA;240K	./libpallet_template.rlib&#xD;&#xA;4.0K	./libpallet_template.d&#xD;&#xA;4.0K	./libpallet_erc721.d&#xD;&#xA;4.0K	./libpallet_crowdloan_rewards.d&#xD;&#xA;4.0K	./incremental&#xD;&#xA;4.0K	./examples&#xD;&#xA;0	./.cargo-lock&#xD;&#xA;```&#xD;&#xA;You can see the total size target/release is 11GB, which is quite large.&#xD;&#xA;&#xD;&#xA;Now I need to wrap them into a docker image as part of a CI/CD testing process.&#xD;&#xA;&#xD;&#xA;Which files/folders do I need to copy into my docker image so my docker parachain image can perform some simple Zombienet tests below? &#xD;&#xA;- check the parachain is registered within certain time&#xD;&#xA;- check the parachain can produce blocks(block height is x within certain time)&#xD;&#xA;&#xD;&#xA;Particularly, do I really need deps, wbuild, and build folders?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10063" PostHistoryTypeId="1" PostId="2687" RevisionGUID="85e062ba-4f54-4a48-b33a-b6127ac3dc03" CreationDate="2022-05-18T04:34:14.000" UserId="1789" Text="What files do I need to make a docker image for running Zombienet tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10064" PostHistoryTypeId="3" PostId="2687" RevisionGUID="85e062ba-4f54-4a48-b33a-b6127ac3dc03" CreationDate="2022-05-18T04:34:14.000" UserId="1789" Text="|parachain|docker|substrate-parachain-template|zombiene|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10065" PostHistoryTypeId="2" PostId="2688" RevisionGUID="2c16de8e-7595-4e6e-8181-3a6903dcb4f9" CreationDate="2022-05-18T04:47:18.773" UserId="251" Text="Here is my call:&#xD;&#xA;&#xD;&#xA;https://crab-parachain.subscan.io/extrinsic/284069-2&#xD;&#xA;&#xD;&#xA;With the same params, I can send the message to Rococo through XCM.&#xD;&#xA;&#xD;&#xA;The error's description is:&#xD;&#xA;```&#xD;&#xA;/// There was some other issue (i.e. not to do with routing) in sending the &#xD;&#xA;message. Perhaps&#xD;&#xA;/// a lack of space for buffering the message.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, what the other issue could be? And I don't have too much knowledge about the `lack of space for buffering the message`. What does that mean?&#xD;&#xA;&#xD;&#xA;Btw, I'm on `polkadot-v0.9.16`." ContentLicense="CC BY-SA 4.0" />
  <row Id="10067" PostHistoryTypeId="1" PostId="2688" RevisionGUID="2c16de8e-7595-4e6e-8181-3a6903dcb4f9" CreationDate="2022-05-18T04:47:18.773" UserId="251" Text="Why I get `SendFailure` on Kusama?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10068" PostHistoryTypeId="3" PostId="2688" RevisionGUID="2c16de8e-7595-4e6e-8181-3a6903dcb4f9" CreationDate="2022-05-18T04:47:18.773" UserId="251" Text="|kusama|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10069" PostHistoryTypeId="2" PostId="2689" RevisionGUID="082fe4fd-80f9-4cbc-a859-693e944cd6f6" CreationDate="2022-05-18T05:06:16.830" UserId="2568" Text="I noticed that a lot of low level packages used by substrate have names that are prefixed with “sc, sp, fc” etc, I’m wondering what the meanings are for these prefixes. For example sp-std, sc-consensus, etc." ContentLicense="CC BY-SA 4.0" />
  <row Id="10071" PostHistoryTypeId="1" PostId="2689" RevisionGUID="082fe4fd-80f9-4cbc-a859-693e944cd6f6" CreationDate="2022-05-18T05:06:16.830" UserId="2568" Text="package prefix meaning" ContentLicense="CC BY-SA 4.0" />
  <row Id="10072" PostHistoryTypeId="3" PostId="2689" RevisionGUID="082fe4fd-80f9-4cbc-a859-693e944cd6f6" CreationDate="2022-05-18T05:06:16.830" UserId="2568" Text="|substrate-node|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10073" PostHistoryTypeId="2" PostId="2690" RevisionGUID="2ab413ae-7313-47d6-8f82-c9dcd16038fe" CreationDate="2022-05-18T06:01:46.793" UserId="28" Text="* `sc_*` - Substrate Client Crates (`./substrate/client/`)&#xD;&#xA;* `sp_*` - Substrate Primitives Crates (`./substrate/primitives/`)&#xD;&#xA;* `frame_*` - Substrate FRAME Crates (`./substrate/frame/`)&#xD;&#xA;* `pallet_*` - Substrate Pallet Crates, made with FRAME (`./substrate/frame/`)&#xD;&#xA;&#xD;&#xA;There is no `fc` as far as I can see, so not sure what you mean there." ContentLicense="CC BY-SA 4.0" />
  <row Id="10075" PostHistoryTypeId="6" PostId="2689" RevisionGUID="025e403b-0637-4ead-b75e-25c88a095908" CreationDate="2022-05-18T06:04:10.130" UserId="28" Comment="edited tags" Text="|crates|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10076" PostHistoryTypeId="2" PostId="2691" RevisionGUID="7f95bebe-1aab-4d83-8a75-308a440e6036" CreationDate="2022-05-18T06:10:33.103" UserId="28" Text="You definitely should not do this.&#xD;&#xA;&#xD;&#xA;1. You cannot use `std` inside the runtime. The Substrate runtime does not have access to the file system of the computer, so any kind of `File::open` stuff is definitely not allowed; and it does not make sense in the context of blockchains anyway. Do you expect that everyone on your whole network will have some specific file on their computer, or else, what will happen when that file doesn't exist with nodes on your network?&#xD;&#xA;&#xD;&#xA;2. You should not be using JSON inside the runtime. The language of Substrate is [SCALE](https://docs.substrate.io/v3/advanced/scale-codec/). Whereas JSON wastes many bytes by being a self-descriptive format, on the blockchain we have no need for a format like this. Instead we should use well known type structures encoded by SCALE. Any front-end can take a JSON file, turn it into SCALE, and then submit those bytes to the chain. This will save the chain from bloat, which adds up over the history of a chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="10078" PostHistoryTypeId="5" PostId="2687" RevisionGUID="ec1fcfe8-2e45-4cc8-b8b4-c58f3a1c23b0" CreationDate="2022-05-18T06:48:59.943" UserId="1789" Comment="added 74 characters in body" Text="I have built my parachain release.&#xD;&#xA;&#xD;&#xA;Here are the files/folders I have inside my target/release:&#xD;&#xA;```&#xD;&#xA;11G	.&#xD;&#xA;5.9G	./deps&#xD;&#xA;3.2G	./wbuild&#xD;&#xA;1.6G	./build&#xD;&#xA;134M	./parachain-collator&#xD;&#xA;49M	    ./.fingerprint&#xD;&#xA;30M	    ./libp_chain_runtime.rlib&#xD;&#xA;784K	./libpallet_erc721.rlib&#xD;&#xA;760K	./libpallet_crowdloan_rewards.rlib&#xD;&#xA;540K	./parachain-collator.d&#xD;&#xA;540K	./libp_chain_runtime.d&#xD;&#xA;240K	./libpallet_template.rlib&#xD;&#xA;4.0K	./libpallet_template.d&#xD;&#xA;4.0K	./libpallet_erc721.d&#xD;&#xA;4.0K	./libpallet_crowdloan_rewards.d&#xD;&#xA;4.0K	./incremental&#xD;&#xA;4.0K	./examples&#xD;&#xA;0	./.cargo-lock&#xD;&#xA;```&#xD;&#xA;You can see the total size target/release is 11GB, which is quite large.&#xD;&#xA;&#xD;&#xA;Now I need to wrap them into a docker image as part of a CI/CD testing process.&#xD;&#xA;&#xD;&#xA;Which files/folders do I need to copy into my docker image so my docker parachain image can perform some simple Zombienet tests below? &#xD;&#xA;- check the parachain is registered within certain time&#xD;&#xA;- check the parachain can produce blocks(block height is x within certain time)&#xD;&#xA;&#xD;&#xA;Specifically, do I really need deps, wbuild, and build folders?&#xD;&#xA;&#xD;&#xA;Do I also need CACHEDIR.TAG, and debug folder under project/target ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10079" PostHistoryTypeId="2" PostId="2692" RevisionGUID="5cc4ffdb-198a-487a-becd-7aeefc5dfce5" CreationDate="2022-05-18T06:49:21.133" UserId="2102" Text="You are using a map, so if your key exists and you call `insert` without checking if the key already exists, it will return the current value and overwrite it with the new value. If you use `mutate` it won't overwrite the key value unless you are doing so.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub fn update_foo(foo_key: u32, new_account: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;    // You can't do this, it will overwrite whatever you had&#xD;&#xA;    // and set the value of the key to the new Account&#xD;&#xA;    &lt;Foo&lt;T&gt;&gt;::insert(foo_key, new_account);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'll provide some examples, but keep in mind that I use FRAME v2 notation.&#xD;&#xA;&#xD;&#xA;Using `insert`, if you want to append an `AccountId` to the value of your key, you should first retrieve the current vector as mutable, push your new `AccountId` and then `insert` the new vector on your key. &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub fn update_foo(foo_key: u32, new_account: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;    let mut vector =&#xD;&#xA;	    &lt;Foo&lt;T&gt;&gt;::get(foo_key).ok_or(&lt;Error&lt;T&gt;&gt;::KeyNotFound)?;&#xD;&#xA;    // Here im just pushing the value to the vector, but you can &#xD;&#xA;    // add any logic.&#xD;&#xA;    vector.push(new_account);&#xD;&#xA;    &lt;Foo&lt;T&gt;&gt;::insert(foo_key, vector);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Using `mutate` is pretty much the same but you will push your new `AccountId` on a closure and in a single line perform the update.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub fn update_foo(foo_key: u32, new_account: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;    &lt;Foo&lt;T&gt;&gt;::mutate(foo_key, |vector| vector.push(new_account));&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Notice that using mutate I'm not controlling any possible error, but you can use `try_mutate` and handle errors.&#xD;&#xA;&#xD;&#xA;Hope it helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="10081" PostHistoryTypeId="2" PostId="2693" RevisionGUID="cea7cecb-1f9c-434b-b75a-ceee1ca3f708" CreationDate="2022-05-18T07:14:35.893" UserId="251" Text="I don't know why the `SafeXCMVersion` is empty. I have already set it in the genesis.&#xD;&#xA;&#xD;&#xA;Never mind, use `force_xcm_version` and `force_default_xcm_version` to fix this." ContentLicense="CC BY-SA 4.0" />
  <row Id="10083" PostHistoryTypeId="2" PostId="2694" RevisionGUID="9f0a4067-3cbc-42ec-bb81-89892861f636" CreationDate="2022-05-18T07:32:02.920" UserId="450" Text="We're running a private chain with substrate version `polkadot-v0.9.18`. Is it safe to use `ink_env::ecdsa_recover` for production contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10085" PostHistoryTypeId="1" PostId="2694" RevisionGUID="9f0a4067-3cbc-42ec-bb81-89892861f636" CreationDate="2022-05-18T07:32:02.920" UserId="450" Text="Is `ink_env::ecdsa_recover` safe to use in production-ready contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10086" PostHistoryTypeId="3" PostId="2694" RevisionGUID="9f0a4067-3cbc-42ec-bb81-89892861f636" CreationDate="2022-05-18T07:32:02.920" UserId="450" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10087" PostHistoryTypeId="4" PostId="2663" RevisionGUID="1437ded2-d901-475f-b1d5-c035696d3ca3" CreationDate="2022-05-18T07:32:14.237" UserId="2025" Comment="edited title" Text="(FIXED) Substrate forkless upgrade tutorial: pallet_scheduler has breaking changes" ContentLicense="CC BY-SA 4.0" />
  <row Id="10088" PostHistoryTypeId="2" PostId="2695" RevisionGUID="15c06e99-54dc-45ce-b415-c248afe304d9" CreationDate="2022-05-18T07:55:45.017" UserId="16" Text="Not yet: The feature is still [flagged unstable](https://github.com/paritytech/substrate/tree/master/frame/contracts#unstable-interfaces) and can be changed in new versions of pallet-contracts if necessary. This will break already deployed contracts which is a big no-no for production chains. This is why all unstable features are guarded behind a cargo feature flag so that they are only used for development.&#xD;&#xA;&#xD;&#xA;However, it is unlikely that this function will change when it is stabilized. You can start writing contracts against it knowing that some version of it will be available on production chains." ContentLicense="CC BY-SA 4.0" />
  <row Id="10090" PostHistoryTypeId="2" PostId="2696" RevisionGUID="6b0ba699-edf4-4c8d-936b-f60470905f99" CreationDate="2022-05-18T08:06:18.193" UserId="2481" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How to use the scale decoder to parse externalics?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/djvIX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/snVDc.png&#xD;&#xA;&#xD;&#xA;I tried to get the timestamp of this block in this way, but the result was not correct.&#xD;&#xA;&#xD;&#xA;Which friend has a specific example of analysis for me? thank you&#xD;&#xA;&#xD;&#xA;If you just tell me to use the scale parser or JS method. It's no use to me. Please don't answer.&#xD;&#xA;&#xD;&#xA;I want detailed examples!!!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10092" PostHistoryTypeId="1" PostId="2696" RevisionGUID="6b0ba699-edf4-4c8d-936b-f60470905f99" CreationDate="2022-05-18T08:06:18.193" UserId="2481" Text="How to use the scale decoder to parse externalics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10093" PostHistoryTypeId="3" PostId="2696" RevisionGUID="6b0ba699-edf4-4c8d-936b-f60470905f99" CreationDate="2022-05-18T08:06:18.193" UserId="2481" Text="|time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10094" PostHistoryTypeId="6" PostId="2696" RevisionGUID="def63b53-89f3-4b2d-bd1a-9156a79b6afa" CreationDate="2022-05-18T08:12:30.380" UserId="85" Comment="edited tags" Text="|time|c-sharp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10095" PostHistoryTypeId="2" PostId="2697" RevisionGUID="c842ead2-6ef7-41a6-86b1-3898b9773ee2" CreationDate="2022-05-18T08:16:13.183" UserId="2569" Text="Suppose we want to create a chain which has a native oracle &quot;module&quot; - is it possible to customize the validators to provide the information, or do we develop a pallet for this? &#xD;&#xA;&#xD;&#xA;In either case, we need some kind of affirmative data on-chain that provides data for applications to easily use. &#xD;&#xA;&#xD;&#xA;Would be super grateful if someone pointed me to the right direction here!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10097" PostHistoryTypeId="1" PostId="2697" RevisionGUID="c842ead2-6ef7-41a6-86b1-3898b9773ee2" CreationDate="2022-05-18T08:16:13.183" UserId="2569" Text="How do validators pass in custom data sets that is available for all applications to easily use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10098" PostHistoryTypeId="3" PostId="2697" RevisionGUID="c842ead2-6ef7-41a6-86b1-3898b9773ee2" CreationDate="2022-05-18T08:16:13.183" UserId="2569" Text="|pallet|validator|oracles|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10099" PostHistoryTypeId="2" PostId="2698" RevisionGUID="1aa15adf-583c-460f-9006-10823bd4a430" CreationDate="2022-05-18T08:30:37.970" UserId="85" Text="The input your looking at is hexadecimal so as well as taking the 0x off the front you need to convert it to binary. Something like [this][1] would do the trick.&#xD;&#xA;&#xD;&#xA;Once you've got it as binary you need to decode it from the SCALE encoding. You could use something like this: https://github.com/usetech-llc/polkadot_api_dotnet/blob/2b0021f8403525358d1f4721c9a64f838a74cd90/Polkadot/src/Utils/Scale.cs&#xD;&#xA;&#xD;&#xA;but that project looks a tad out of date. I would probably compile the rust libs to a dll and then call them from c# using the [c ffi pinvoke][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.microsoft.com/en-us/dotnet/api/system.convert.fromhexstring?view=net-6.0&#xD;&#xA;  [2]: https://github.com/reifujimura/monorepo-with-csharp-rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="10102" PostHistoryTypeId="2" PostId="2699" RevisionGUID="11a3628d-795c-4970-86d9-2405806eaaef" CreationDate="2022-05-18T09:10:34.473" UserId="2417" Text="I define a user-defied data struct in contract A(named `Payload`):&#xD;&#xA;```&#xD;&#xA;#[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode, Clone)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(::scale_info::TypeInfo))]&#xD;&#xA;pub struct TestData{&#xD;&#xA;    pub n: u128,&#xD;&#xA;    pub s: ink_prelude::string::String,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then, I define a user-defined data struct in contract B, based on `TestData` in contract B&#xD;&#xA;```&#xD;&#xA;#[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(::scale_info::TypeInfo))]&#xD;&#xA;pub struct MyData {&#xD;&#xA;    td: Payload::TestData,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Contract A is compiled successfully. But contract B is not.&#xD;&#xA;&#xD;&#xA;The error is as below:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kYjV5.png&#xD;&#xA;&#xD;&#xA;How can I fix it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10104" PostHistoryTypeId="1" PostId="2699" RevisionGUID="11a3628d-795c-4970-86d9-2405806eaaef" CreationDate="2022-05-18T09:10:34.473" UserId="2417" Text="the trait `scale_info::TypeInfo` is not implemented for" ContentLicense="CC BY-SA 4.0" />
  <row Id="10105" PostHistoryTypeId="3" PostId="2699" RevisionGUID="11a3628d-795c-4970-86d9-2405806eaaef" CreationDate="2022-05-18T09:10:34.473" UserId="2417" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10106" PostHistoryTypeId="2" PostId="2700" RevisionGUID="4505324a-bce6-411e-9ad1-1b709b02e41b" CreationDate="2022-05-18T09:28:36.337" UserId="2492" Text="I am new to Substrate and would like to view or define custom metrics on Substrate node. More specifically, I would also like to access the alert rules as currently it returns [PAGE NOT FOUND:][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://%20https://github.com/paritytech/substrate/blob/master/.maintain/monitoring/alerting-rules/alerting-rules.yaml" ContentLicense="CC BY-SA 4.0" />
  <row Id="10108" PostHistoryTypeId="1" PostId="2700" RevisionGUID="4505324a-bce6-411e-9ad1-1b709b02e41b" CreationDate="2022-05-18T09:28:36.337" UserId="2492" Text="How do I customize or view all the available Substrate-Prometheus metrics" ContentLicense="CC BY-SA 4.0" />
  <row Id="10109" PostHistoryTypeId="3" PostId="2700" RevisionGUID="4505324a-bce6-411e-9ad1-1b709b02e41b" CreationDate="2022-05-18T09:28:36.337" UserId="2492" Text="|substrate-node|monitoring|metrics|prometheus|alerts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10110" PostHistoryTypeId="5" PostId="2700" RevisionGUID="272aecec-0408-4a17-8047-1751b8c44481" CreationDate="2022-05-18T09:30:34.437" UserId="2492" Comment="deleted 36 characters in body" Text="I would like to view or define custom metrics on Substrate node.&#xD;&#xA;Also, I would also like to access the alert rules as currently it returns [PAGE NOT FOUND:][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://%20https://github.com/paritytech/substrate/blob/master/.maintain/monitoring/alerting-rules/alerting-rules.yaml" ContentLicense="CC BY-SA 4.0" />
  <row Id="10111" PostHistoryTypeId="2" PostId="2701" RevisionGUID="406c056d-e18f-430a-bf76-1de9c7e63ba0" CreationDate="2022-05-18T09:42:20.173" UserId="523" Text="normally you will need `ocw` to achieve that and with `sp_io::offchain::is_validator()` to feed oracle only by validators.&#xD;&#xA;&#xD;&#xA;Just take `im-online` for reference" ContentLicense="CC BY-SA 4.0" />
  <row Id="10113" PostHistoryTypeId="2" PostId="2702" RevisionGUID="56691d5e-3bc1-4d5d-92d0-050e9d6044b7" CreationDate="2022-05-18T09:48:38.487" UserId="393" Text="You can do the check or pattern matching in mutate closure. &#xD;&#xA;For eg.&#xD;&#xA;&#xD;&#xA;    &lt;Foo&lt;T&gt;&gt;::mutate(key, |maybe| {&#xD;&#xA;        if let Some(value) = maybe {&#xD;&#xA;            value.push(input);&#xD;&#xA;        } else {&#xD;&#xA;            *maybe = vec![input];&#xD;&#xA;        }&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;Another suggestion is to use BoundedVec instead of Vector when possible." ContentLicense="CC BY-SA 4.0" />
  <row Id="10116" PostHistoryTypeId="2" PostId="2703" RevisionGUID="3bce936d-cadb-4793-9c80-fa2dbade9b3f" CreationDate="2022-05-18T10:00:14.543" UserId="393" Text="As far as I know, you have two ways to do this.&#xD;&#xA;&#xD;&#xA;First: you can check [these pull-requests include runtime upgrade][1], and then pick pull requests between your old version and your new version, check those pull requests carefully to see whether there is a pull request introduced storage migration.&#xD;&#xA;&#xD;&#xA;Second: you can use [try-runtime][2] to see if there are on-runtime-upgrade logs appear. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues?q=label%3AE1-runtimemigration%20&#xD;&#xA;  [2]: https://docs.substrate.io/how-to-guides/v3/tools/try-runtime/" ContentLicense="CC BY-SA 4.0" />
  <row Id="10118" PostHistoryTypeId="2" PostId="2704" RevisionGUID="4d4bebf1-da94-4d5a-b69f-b3d812f04c91" CreationDate="2022-05-18T10:12:19.927" UserId="340" Text="I want to test validator/nominate scenarios, like how to stake and earn rewards and get slashed! &#xD;&#xA;&#xD;&#xA;However I want to increase the pace at which these events occur, so that as engineers we can iterate over these tests in hours and not days.&#xD;&#xA;&#xD;&#xA;Is there already a chainspec for this else how should I accomplish increasing the pace of a local test chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10120" PostHistoryTypeId="1" PostId="2704" RevisionGUID="4d4bebf1-da94-4d5a-b69f-b3d812f04c91" CreationDate="2022-05-18T10:12:19.927" UserId="340" Text="How can I speed up a local test chain or Customize session | era | epoch values" ContentLicense="CC BY-SA 4.0" />
  <row Id="10121" PostHistoryTypeId="3" PostId="2704" RevisionGUID="4d4bebf1-da94-4d5a-b69f-b3d812f04c91" CreationDate="2022-05-18T10:12:19.927" UserId="340" Text="|validator|specs|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10122" PostHistoryTypeId="2" PostId="2705" RevisionGUID="90ed9605-b4f0-4e67-b9d4-f33d9b90d16b" CreationDate="2022-05-18T10:40:09.347" UserId="2192" Text="If you want to append to the Vec, the most efficient way is to take advantage of the [StorageAppend](https://paritytech.github.io/substrate/master/frame_support/storage/trait.StorageAppend.html) trait, and simply [append](https://paritytech.github.io/substrate/master/frame_support/storage/trait.StorageValue.html#tymethod.append) the item. &#xD;&#xA;&#xD;&#xA;Using your map example, you could append to one of the `Vec`s like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn append_account&lt;T: Config&gt;(map_id: u32, account_id: T::AccountId) {&#xD;&#xA;    Foo::&lt;T&gt;::append(map_id, account_id)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Doing it this way avoids having to decode and encode the whole Vec just to push a new value. " ContentLicense="CC BY-SA 4.0" />
  <row Id="10124" PostHistoryTypeId="2" PostId="2706" RevisionGUID="aa480137-57ee-464a-97e3-8a08eb40612d" CreationDate="2022-05-18T10:44:06.393" UserId="627" Text="The general format for extrinsics are -&#xD;&#xA;&#xD;&#xA;- length of extrinsic as a `Compact&lt;u32&gt;`&#xD;&#xA;- version byte + signed flag&#xD;&#xA;- sender address (only included if signed, as per flag above)&#xD;&#xA;- sender signature (only included if signed, as per flag above)&#xD;&#xA;- additional signed extension values as per metadata (only included if signed, as per flag above)&#xD;&#xA;- pallet index for call (as per metadata)&#xD;&#xA;- method index for call (as per metadata)&#xD;&#xA;- call data (as per metadata types)&#xD;&#xA;&#xD;&#xA;Decoding the extrinsic manually, i.e. with a manual lookup against what we know the metadata to be -&#xD;&#xA;&#xD;&#xA;- `28` first byte. Since lower 2 bits are `0b00`, we know the data here is contained in a single byte. So in this case `40 &gt;&gt; 2` (decimal, shifting as per rules for `0b00`) yields 10 bytes in length for the extrinsic (this excludes the length prefix, only the data bytes are counted)&#xD;&#xA;- `04` the top-most bit is unset, this means the transaction is unsigned. In this case `04` determines the extrinsic version&#xD;&#xA;&#xD;&#xA;Since we now determined it is unsigned with the version byte, here we skip the decoding of address, signature &amp; signed extensions, and jump straight into the call part -&#xD;&#xA;&#xD;&#xA;- `02` the pallet index (on Kusama this is `timestamp`, it will be different for other chains and could possibly change between upgrades)&#xD;&#xA;- `00` the call index inside the pallet (on Kusama this points to `timestamp.set` for the current metadata, can also change when upgraded)&#xD;&#xA;&#xD;&#xA;The variable call data therefore is the remaining `0b919bbc3b8001`. As per the metadata for this call on the current Kusama runtime, this is a single `Compact&lt;u64&gt;` representing `now`. Looking at the first byte, `0b` (hex), this is `0b0000_1011` in binary, the lower two bits are both set, which means this byte contains the length of the data to follow. (`00`, `01` and `10` has different rules) &#xD;&#xA;&#xD;&#xA;Converting this, we know `0b` (hex) is `11` in decimal, where the length of the data would therefore be `(11 &gt;&gt; 2) + 4` bytes following for this type of flag, i.e. a calculated 6 bytes data should follow this indicator, all containing the data.&#xD;&#xA;&#xD;&#xA;So this is a simple form of compact encoding, no additional shifting is needed and we can simply convert the remaining 6 bytes into LE `u64`. The next 6 bytes `919bbc3b8001` (all the remaining data) is `[145, 155, 188, 59, 128, 1]` in base-10 array form. Converting this to LE (once again manually, sticking with the approach followed thus far) -&#xD;&#xA;&#xD;&#xA;`(((((((((1 * 256) + 128) * 256) + 59) * 256) + 188) * 256) + 155) * 256) + 145 = 1650269658001`&#xD;&#xA;&#xD;&#xA;Converting to to unix epoch time this represents `Mon Apr 18 2022 08:14:18 GMT+0000`" ContentLicense="CC BY-SA 4.0" />
  <row Id="10126" PostHistoryTypeId="2" PostId="2707" RevisionGUID="44cfaaf6-44a7-44c1-a646-280a5befea6d" CreationDate="2022-05-18T11:28:33.323" UserId="340" Text="You can find a list of built-in chain specs in this source file, https://github.com/paritytech/polkadot/blob/master/cli/src/command.rs#L84&#xD;&#xA;&#xD;&#xA;By compiling polkadot with the fast-runtime feature flag, you can reduce the timings to a 2 min epoch and 12 min Era.&#xD;&#xA;&#xD;&#xA;'cargo build --release --features fast-runtime'&#xD;&#xA;&#xD;&#xA;Both --chain polkadot-local and kusama-local had the 2min/12min timings." ContentLicense="CC BY-SA 4.0" />
  <row Id="10128" PostHistoryTypeId="2" PostId="2708" RevisionGUID="e8012711-144f-466e-850e-197caff26fb7" CreationDate="2022-05-18T11:34:20.270" UserId="1731" Text="Trying to run transaction in Polkadot.js.org UI&#xD;&#xA;&#xD;&#xA;This method in UI&#xD;&#xA;&#xD;&#xA;      const insertKeys = async (api: ApiPromise, seed: string, publicKey: string) =&gt; {&#xD;&#xA;      const insert = await api.rpc.author.insertKey(&quot;orac&quot;, seed, publicKey);&#xD;&#xA;      console.log(&quot;  Insert Keys  &quot;);&#xD;&#xA;      console.log(` ${publicKey}`);&#xD;&#xA;      console.log(&quot; Successful&quot;);&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;with this parameters &#xD;&#xA;&#xD;&#xA;    api.rpc.author.insertKey(&quot;orac&quot;, &quot;recall inhale trick wasp core hat problem season february buzz juice cloth&quot;, &quot;0x4cc5f1b01d843ede8cca27dd4b9be4408ca9459aca36d2240666a2479a900a1d&quot;)&#xD;&#xA;&#xD;&#xA;But getting error&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Mbv0P.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10130" PostHistoryTypeId="1" PostId="2708" RevisionGUID="e8012711-144f-466e-850e-197caff26fb7" CreationDate="2022-05-18T11:34:20.270" UserId="1731" Text="Transaction would exhaust the block limits" ContentLicense="CC BY-SA 4.0" />
  <row Id="10131" PostHistoryTypeId="3" PostId="2708" RevisionGUID="e8012711-144f-466e-850e-197caff26fb7" CreationDate="2022-05-18T11:34:20.270" UserId="1731" Text="|weight|polkadot-launch|ui|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10132" PostHistoryTypeId="2" PostId="2709" RevisionGUID="b19ea500-c40e-4d5d-b145-efa6e0aa9988" CreationDate="2022-05-18T12:25:04.260" UserId="279" Text="you only need to add copy the `parachain-collator` binary to the image to use in `CI`. You can check the [collator_injected.Dockerfile](https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/collator_injected.Dockerfile) from the polkadot repo.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10134" PostHistoryTypeId="5" PostId="2672" RevisionGUID="b3766d04-10fe-4047-9899-4600bb7e6ce8" CreationDate="2022-05-18T12:39:29.700" UserId="45" Comment="Added Jan's excerpt" Text="I'd divide the question further into two parts.&#xD;&#xA;&#xD;&#xA;## Does Substrate Really Need a Virtual Machine?&#xD;&#xA;&#xD;&#xA;Historically, Substrate was split from Polkadot early on. So we will have to bring Polkadot into the context. Polkadot had two problems to solve.&#xD;&#xA;&#xD;&#xA;1. Polkadot is meant to be upgradable and governed on-chain.&#xD;&#xA;2. Polkadot's relay chain needs a way of verifying the correctness of parachain state transitions.&#xD;&#xA;&#xD;&#xA;It is possible to solve those two without involving a virtual machine.&#xD;&#xA;&#xD;&#xA;With regard to upgrading, for example, Ethereum is still leaning on hard-forks as their upgrade mechanism. This stuff works but is not perfect. One reason is that it conflates technical upgrading and governance. For a successful upgrade, a significant portion of users must upgrade their nodes in time. Not upgraded users will stay on the existing fork. Therefore the voting process is biased towards not upgrading.&#xD;&#xA;&#xD;&#xA;When the state-transition logic is bytecode stored on the chain itself, voting is separate. In many cases, operators don't have to do anything for an upgrade.&#xD;&#xA;&#xD;&#xA;Now, sometimes forkless code upgrades require intervention by node operators, such as when the code starts using functionality introduced by newer versions of the node software. In this case, though, the correct state transition is always on the chain. It's just that the older nodes cannot follow the canonical chain because they cannot execute its state transition function.&#xD;&#xA;&#xD;&#xA;Hard forking is reserved only for more complicated situations, like social recovery. Upgrade becomes a routine.&#xD;&#xA;&#xD;&#xA;You might say, &quot;wait a minute, that does not require a VM&quot;, and you will be correct. E.g., Tendermint employs a rigid state machine by default. A tendermint-based chain can store a version number in the on-chain state. If a node does not have the logic for handling state transitions of that version, it can stop.&#xD;&#xA;&#xD;&#xA;A VM allows abstracting from the specifics of the platform. In your language of choice, there are typically things that may produce slightly different results on different platforms. Those things are usually not significant, and regular programmers don't care about them. &#xD;&#xA;&#xD;&#xA;However, in the case of blockchains, they do matter. Each observed bit of non-determinism leads to consensus divergence.&#xD;&#xA;&#xD;&#xA;Take even undefined behavior. You don't want to invoke it in your code. If you did, anything could happen, including `rm -rf /`. That anything can be different depending on the platform and the compiler. On the other hand, if that happened inside a VM, the machine the node was running would &#xD;&#xA;certainly be fine. The behavior will be the same on each machine.&#xD;&#xA;&#xD;&#xA;One of the costs is performance. Using a virtual machine most likely will lead to a performance loss compared to the native code.&#xD;&#xA;&#xD;&#xA;Another cost is complexity. Using a VM requires another big component in your node software. A VM is often a quite complicated piece of machinery. However, this complexity is not systemic and is isolated in the execution engine.&#xD;&#xA;&#xD;&#xA;## Why was Wasm picked as the virtual machine?&#xD;&#xA;&#xD;&#xA;WebAssembly has unique properties that make it a perfect fit for this use case.&#xD;&#xA;&#xD;&#xA;1. Performance. Wasm operations could be mapped to machine code quite directly. The performance is consistent without cliffs.&#xD;&#xA;1. Safe. Wasm programs do not have access to anything by default. The capabilities have to be exposed explicitly to the wasm environment. Wasm also has relatively simple semantics, which makes holes less probable.&#xD;&#xA;1. Determinstic-ish. Wasm instruction set has a small and well-defined number of non-deterministic operations. A not deterministic in this context means an operation can have different outputs given the same inputs. Making it deterministic is a matter of defining the actual output for those operations.&#xD;&#xA;1. Open standard. There is no single company that owns Wasm.&#xD;&#xA;1. Wide support. WASM has a lot of industry buy-in and wide support, so we can take advantage of all of the work that's being done in the ecosystem. Hitting a codegen bug in the compiler is a lot less likely when there are thousands of other people besides you compiling their code to WASM. The ecosystem also has a big incentive to make WASM faster, since it's a part of the web platform. The reason why JavaScript is essentially the fastest &quot;scripting&quot; language out there is not because it's particularly easy to optimize, but because it's a core component of a critical piece of software which every Internet-connected human being on the planet uses - the web browser - so an enormous amount of resources is poured into making JavaScript fast. WASM is on its way to similarly become a core component of the web, just like JavaScript is, and we want to take advantage of that.&#xD;&#xA; &#xD;&#xA;It would take a lot of effort to make a platform like .NET or JVM work for our use-cases. They have too much surface. Making them safe and deterministic would be a problem.&#xD;&#xA;&#xD;&#xA;I don't even know what the tradeoffs are here. Not much comes to mind. It generally feels like a perfect fit for this particular use case. Here I will try to leave my thoughts on this and might update if I remember something else.&#xD;&#xA;&#xD;&#xA;- Early in Polkadot's lifecycle Wasm and tooling around it were under heavy development. It wasn't good. But now it is almost perfect.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10135" PostHistoryTypeId="5" PostId="2696" RevisionGUID="e572263f-4cf4-4a74-996d-fe9dfe392e32" CreationDate="2022-05-18T12:54:14.117" UserId="234" Comment="replaced &quot;externalics&quot; word with &quot;extrinsics&quot;" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How to use the scale decoder to parse extrinsics?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/djvIX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/snVDc.png&#xD;&#xA;&#xD;&#xA;I tried to get the timestamp of this block in this way, but the result was not correct.&#xD;&#xA;&#xD;&#xA;Which friend has a specific example of analysis for me? thank you&#xD;&#xA;&#xD;&#xA;If you just tell me to use the scale parser or JS method. It's no use to me. Please don't answer.&#xD;&#xA;&#xD;&#xA;I want detailed examples!!!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10136" PostHistoryTypeId="4" PostId="2696" RevisionGUID="e572263f-4cf4-4a74-996d-fe9dfe392e32" CreationDate="2022-05-18T12:54:14.117" UserId="234" Comment="replaced &quot;externalics&quot; word with &quot;extrinsics&quot;" Text="How to use the scale decoder to parse extrinsics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10137" PostHistoryTypeId="24" PostId="2696" RevisionGUID="e572263f-4cf4-4a74-996d-fe9dfe392e32" CreationDate="2022-05-18T12:54:14.117" Comment="Proposed by 234 approved by 28 edit id of 201" ContentLicense="CC BY-SA 4.0" />
  <row Id="10138" PostHistoryTypeId="2" PostId="2710" RevisionGUID="877b247c-a012-4158-9968-9ad8c6271452" CreationDate="2022-05-18T13:00:40.273" UserId="480" Text="For example:&#xD;&#xA;We have a storage item: `Counter` that is set to 0. An extrinsic `increment` in block 11 adds 1 to `Counter`.&#xD;&#xA;&#xD;&#xA;If we query for the value of Counter at block 11, do we get 0 or 1?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10140" PostHistoryTypeId="1" PostId="2710" RevisionGUID="877b247c-a012-4158-9968-9ad8c6271452" CreationDate="2022-05-18T13:00:40.273" UserId="480" Text="When querying storage at a particular block, are the values returned those before or after the execution of the extrinsics in that block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10141" PostHistoryTypeId="3" PostId="2710" RevisionGUID="877b247c-a012-4158-9968-9ad8c6271452" CreationDate="2022-05-18T13:00:40.273" UserId="480" Text="|storage|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10142" PostHistoryTypeId="52" PostId="2689" RevisionGUID="ad16c202-331b-432e-903b-aa0e330abeb9" CreationDate="2022-05-18T13:10:24.457" />
  <row Id="10143" PostHistoryTypeId="2" PostId="2711" RevisionGUID="e69d6461-8fc0-4a50-a9bc-f838e6b29def" CreationDate="2022-05-18T13:22:15.917" UserId="2571" Text="I'm currently working on opening an HRMP Channel on Rococo with another parachain. In order to do this, I need to send an XCM to the relay chain. One of the items within this message requires a parameter which is the Sovereign Account Address on the Relay.&#xD;&#xA;&#xD;&#xA;I was wondering if anyone could provide a link or guide on how to get a Sovereign Account Address?&#xD;&#xA;&#xD;&#xA;Thank you in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="10145" PostHistoryTypeId="1" PostId="2711" RevisionGUID="e69d6461-8fc0-4a50-a9bc-f838e6b29def" CreationDate="2022-05-18T13:22:15.917" UserId="2571" Text="Is there a link or guide on how to get a Sovereign Account Address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10146" PostHistoryTypeId="3" PostId="2711" RevisionGUID="e69d6461-8fc0-4a50-a9bc-f838e6b29def" CreationDate="2022-05-18T13:22:15.917" UserId="2571" Text="|parachain|xcm|account|rococo|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10147" PostHistoryTypeId="2" PostId="2712" RevisionGUID="6e02c639-983c-404c-a566-1bfc1944f2b8" CreationDate="2022-05-18T13:25:18.563" UserId="620" Text="It queries the state _after_ execution of the block. So, 1." ContentLicense="CC BY-SA 4.0" />
  <row Id="10149" PostHistoryTypeId="6" PostId="2687" RevisionGUID="dc0501c5-69f0-4686-a44a-70718eda415f" CreationDate="2022-05-18T13:46:07.407" UserId="279" Comment="change tag to zombienet" Text="|parachain|docker|zombienet|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10150" PostHistoryTypeId="24" PostId="2687" RevisionGUID="dc0501c5-69f0-4686-a44a-70718eda415f" CreationDate="2022-05-18T13:46:07.407" Comment="Proposed by 279 approved by 1789 edit id of 200" ContentLicense="CC BY-SA 4.0" />
  <row Id="10151" PostHistoryTypeId="5" PostId="2706" RevisionGUID="26e3b442-7f2e-466b-a294-9c798b1df094" CreationDate="2022-05-18T14:31:41.787" UserId="627" Comment="typo" Text="The general format for extrinsics are -&#xD;&#xA;&#xD;&#xA;- length of extrinsic as a `Compact&lt;u32&gt;`&#xD;&#xA;- version byte + signed flag&#xD;&#xA;- sender address (only included if signed, as per flag above)&#xD;&#xA;- sender signature (only included if signed, as per flag above)&#xD;&#xA;- additional signed extension values as per metadata (only included if signed, as per flag above)&#xD;&#xA;- pallet index for call (as per metadata)&#xD;&#xA;- method index for call (as per metadata)&#xD;&#xA;- call data (as per metadata types)&#xD;&#xA;&#xD;&#xA;Decoding the `0x280402000b919bbc3b8001` extrinsic manually, i.e. with a manual lookup against what we know the metadata to be -&#xD;&#xA;&#xD;&#xA;- `28` first byte, as per the format above it is the compact length. Since lower 2 bits are `0b00`, we know the data here is contained in a single byte. So in this case `40 &gt;&gt; 2` (decimal, shifting as per rules for `0b00`) yields 10 bytes in length for the extrinsic (this excludes the length prefix, only the data bytes are counted)&#xD;&#xA;- `04` is next, containing the version byte + signed flag. The top-most bit is unset, this means the transaction is unsigned. In this case `04` determines the extrinsic version&#xD;&#xA;&#xD;&#xA;Since we now determined it is unsigned with the version byte, here we skip the decoding of address, signature &amp; signed extensions, and jump straight into the call part -&#xD;&#xA;&#xD;&#xA;- `02` the pallet index (on Kusama this is `timestamp`, it will be different for other chains and could possibly change between upgrades)&#xD;&#xA;- `00` the call index inside the pallet (on Kusama this points to `timestamp.set` for the current metadata, can also change when upgraded)&#xD;&#xA;&#xD;&#xA;The variable call data therefore is the remaining `0b919bbc3b8001`. As per the metadata for this call on the current Kusama runtime, this is a single `Compact&lt;u64&gt;` representing `now`. Looking at the first byte, `0b` (hex), this is `0b0000_1011` in binary, the lower two bits are both set, which means this byte contains the length of the data to follow. (`00`, `01` and `10` has different rules) &#xD;&#xA;&#xD;&#xA;Converting this, we know `0b` (hex) is `11` in decimal, where the length of the data would therefore be `(11 &gt;&gt; 2) + 4` bytes following for this type of flag, i.e. a calculated 6 bytes data should follow this indicator, all containing the data.&#xD;&#xA;&#xD;&#xA;So this is a simple form of compact encoding, no additional shifting is needed and we can simply convert the remaining 6 bytes into LE `u64`. The next 6 bytes `919bbc3b8001` (all the remaining data) is `[145, 155, 188, 59, 128, 1]` in base-10 array form. Converting this to LE (once again manually, sticking with the approach followed thus far) -&#xD;&#xA;&#xD;&#xA;`(((((((((1 * 256) + 128) * 256) + 59) * 256) + 188) * 256) + 155) * 256) + 145 = 1650269658001`&#xD;&#xA;&#xD;&#xA;Converting to to unix epoch time this represents `Mon Apr 18 2022 08:14:18 GMT+0000`" ContentLicense="CC BY-SA 4.0" />
  <row Id="10152" PostHistoryTypeId="2" PostId="2713" RevisionGUID="55625164-986b-43ab-9021-ee97c9e1aae7" CreationDate="2022-05-18T14:35:17.977" UserId="172" Text="Introducing new host functions means that all nodes must update to include it. In the future, some parachain teams may require some custom host functions for their needs.&#xD;&#xA;&#xD;&#xA;What would the approval process of adding a new host function look like and to what expense? " ContentLicense="CC BY-SA 4.0" />
  <row Id="10154" PostHistoryTypeId="1" PostId="2713" RevisionGUID="55625164-986b-43ab-9021-ee97c9e1aae7" CreationDate="2022-05-18T14:35:17.977" UserId="172" Text="How might we introduce a new host function into the Polkadot ecosystem?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10155" PostHistoryTypeId="3" PostId="2713" RevisionGUID="55625164-986b-43ab-9021-ee97c9e1aae7" CreationDate="2022-05-18T14:35:17.977" UserId="172" Text="|polkadot|governance|host-functions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10156" PostHistoryTypeId="5" PostId="2578" RevisionGUID="54a80a9b-806d-4ba3-abe7-a38a726484c2" CreationDate="2022-05-18T14:53:31.720" UserId="1789" Comment="deleted 2 characters in body" Text="previously I could run my tests including colander parachain with polkadot:v0.9.18 or polkadot-debug...&#xD;&#xA;my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I changed that colander image to my own parachain image:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/collator:v4&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And my tests:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z05-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z05-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I got this command output:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;		 Using temporary directory: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local-plain.json as:83f26480055f9cab6e46b477b9e66db48dc0e892d950ed0df817e05aefd69d9e&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local.json as:c0730c2292ead75d4240c7c7623db1c40082c97ff4960ae8b0974597fc5c3498&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/zombie-wrapper.sh as:640715d32ec3b23a0330febe7af0b9f37a6ffc8675cf88ecfdee1fa5b2b59b09&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --chain res/dev/rococo-custom-2-raw.json --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-8a529a22b7767d93655b4bb89b74e034 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A42683#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:43531/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46627#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41273/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41621/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-13 15:22:39        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2734ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (76ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (60ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (61ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-13 15:25:11        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-13 15:25:32        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-13 15:25:42        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1000:: Normal connection closure&#xD;&#xA;2022-05-13 15:25:49        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1006:: Connection dropped by remote peer.&#xD;&#xA;2022-05-13 15:25:50        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;```&#xD;&#xA;From above you can see the &#xD;&#xA;- relaychain alice node test: ok&#xD;&#xA;- relaychain bob node test: ok&#xD;&#xA;- parachain 2000 is registered: ok&#xD;&#xA;- 3 log tests: ok&#xD;&#xA;- parachain 2000 block height test: failed!!?? Why did that fail? &#xD;&#xA;&#xD;&#xA;When I was using `docker.io/paritypr/colander:master`, the block height test was successful... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Especially when I checked the collator logs via&#xD;&#xA;`kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034`&#xD;&#xA;I got:&#xD;&#xA;```&#xD;&#xA;+ export PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ pipe=/tmp/zombiepipe&#xD;&#xA;+ trap 'rm -f /tmp/zombiepipe' EXIT&#xD;&#xA;+ [[ ! -p /tmp/zombiepipe ]]&#xD;&#xA;+ mkfifo /tmp/zombiepipe&#xD;&#xA;+ child_pid=&#xD;&#xA;+ CMD=($@)&#xD;&#xA;+ child_pid=8&#xD;&#xA;+ ls /proc/8&#xD;&#xA;+ target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;+ read line&#xD;&#xA;Error: Input(&quot;Error parsing spec file: missing field `relay_chain` at line 155 column 1&quot;)&#xD;&#xA;```&#xD;&#xA;Also the Polkadot.js link did not work as well&#xD;&#xA;`Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer`&#xD;&#xA;&#xD;&#xA;What is wrong? &#xD;&#xA;&#xD;&#xA;My repo's docker-compose file:&#xD;&#xA;```&#xD;&#xA;  collator:&#xD;&#xA;    container_name: collator&#xD;&#xA;    image: paidnetwork/collator&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30343:30343&quot;&#xD;&#xA;      - &quot;40333:40333&quot;&#xD;&#xA;      - &quot;6969:6969&quot;&#xD;&#xA;      - &quot;8844:8844&quot;&#xD;&#xA;      - &quot;9977:9977&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;    depends_on:&#xD;&#xA;      - charlie-relay&#xD;&#xA;  alice-relay:&#xD;&#xA;    container_name: alice-relay&#xD;&#xA;    image: paidnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30333:30333&quot;&#xD;&#xA;      - &quot;9944:9944&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My Dockerfile.base:&#xD;&#xA;```&#xD;&#xA;FROM debian:latest&#xD;&#xA;RUN apt update &amp;&amp; apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential&#xD;&#xA;RUN curl https://sh.rustup.rs -sSf &gt;&gt; install-rust.sh&#xD;&#xA;RUN chmod u+x install-rust.sh&#xD;&#xA;RUN ./install-rust.sh -y&#xD;&#xA;RUN PATH=$PATH:$HOME/.cargo/env&#xD;&#xA;SHELL [&quot;bash&quot;, &quot;-lc&quot;]&#xD;&#xA;RUN rustup update&#xD;&#xA;RUN rustup update nightly&#xD;&#xA;RUN rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;&#xD;&#xA;CMD [ &quot;tail&quot;, &quot;-f&quot;, &quot;/dev/null&quot; ]&#xD;&#xA;```&#xD;&#xA;And my Dockerfile:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/rust as builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;&#xD;&#xA;COPY . .&#xD;&#xA;&#xD;&#xA;RUN . $HOME/.cargo/env &amp;&amp; cargo build --${PROFILE}&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there any argument missing in my Zombienet network definition file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10157" PostHistoryTypeId="2" PostId="2714" RevisionGUID="a1e66e3d-03e3-408c-8817-810390418dcc" CreationDate="2022-05-18T14:55:23.427" UserId="2538" Text="Does anyone know that is there a difference between DOT / KSM / Westend transactions?&#xD;&#xA;&#xD;&#xA;**Context:** &lt;br&gt;&#xD;&#xA;A common send/transfer transaction...&#xD;&#xA;I can generate same pk and address for Dot and KSm and WST chains as the js tool does. Also can create and sign the ExtrinsicPayloadV4 for dot, and create the ExtringicTV4&#xD;&#xA;And the only transaction is working is DOT... &lt;br&gt;The payload's differ a bit, e.g.:&lt;br&gt;&#xD;&#xA;specversion, transactionversion, genesis == blockhash (it comes from the chain's api) &#xD;&#xA;&#xD;&#xA;the method is in both cases: section 5, index: 0&#xD;&#xA;&#xD;&#xA;**The problem:** &lt;br&gt;&#xD;&#xA;when i try to submit the signed tx i got error stg like this from the node in case of KSM or WST chains:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&quot;code&quot;:1002,&quot;message&quot;:&quot;Verification Error: Runtime error: &#xD;&#xA;Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\n&#xD;&#xA;WASM backtrace:\n\n&#xD;&#xA;    0: 0x506d90 - &lt;unknown&gt;!rust_begin_unwind\n    &#xD;&#xA;    1: 0x42c4 - &lt;unknown&gt;!core::panicking::panic_fmt::h6314b5c91abe7349\n   &#xD;&#xA;     2: 0x8cb3d - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\n&quot;,&#xD;&#xA;     &quot;data&quot;:&quot;Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n    &#xD;&#xA;     0: 0x506d90 - &lt;unknown&gt;!rust_begin_unwind\n    &#xD;&#xA;     1: 0x42c4 - &lt;unknown&gt;!core::panicking::panic_fmt::h6314b5c91abe7349\n    &#xD;&#xA;     2: 0x8cb3d - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\n&quot;&#xD;&#xA;     }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any help would be appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="10159" PostHistoryTypeId="1" PostId="2714" RevisionGUID="a1e66e3d-03e3-408c-8817-810390418dcc" CreationDate="2022-05-18T14:55:23.427" UserId="2538" Text="KSM DOT Extrinsic difference?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10160" PostHistoryTypeId="3" PostId="2714" RevisionGUID="a1e66e3d-03e3-408c-8817-810390418dcc" CreationDate="2022-05-18T14:55:23.427" UserId="2538" Text="|extrinsic|transactions|transfer|c-sharp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10161" PostHistoryTypeId="2" PostId="2715" RevisionGUID="042af16d-cea2-454c-940e-a67fb0c01851" CreationDate="2022-05-18T14:56:28.790" UserId="2538" Text="Thanks for the answers, i was kinda aware of these repos, but still thx :)&#xD;&#xA;&#xD;&#xA;Since i used NBitcoin lib in c# to genereate pk pairs and it uses a different algo the derive seed, i had to calculate the entropy first, then use the &#xD;&#xA;```&#xD;&#xA;var pbkdf2 = new NBitcoin.Crypto.Pbkdf2(new System.Security.Cryptography.HMACSHA512(entropy), salt2, 2048);&#xD;&#xA;var seed = pbkdf2.Read(32);&#xD;&#xA;var minis = new Schnorrkel.MiniSecret(seed, ExpandMode.Ed25519);&#xD;&#xA;```&#xD;&#xA;take the first 32 byte, then create a Schnorrkel.MiniSecret and use the public key to generate the address...&#xD;&#xA;stg like this (syntax err, i know...):&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;var ss58Prefixed = new List&lt;byte&gt; { 0x53, 0x53, 0x35, 0x38, 0x50, 0x52, 0x45, networkprefix, publickeybytes };&#xD;&#xA;var blake2bHashed = HashAlgorithm.Blake2b_512.Hash(ss58Prefixed.ToArray());&#xD;&#xA;var addressBytes = [prefix, publickeybytes, blake2bHashed[..2]]&#xD;&#xA;var address = Encoders.Base58.EncodeData(addressBytes);&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;ofc now i have an another issue:&#xD;&#xA;[transaction fails in case of kusama and westend chains][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2714/ksm-dot-extrinsic-difference" ContentLicense="CC BY-SA 4.0" />
  <row Id="10163" PostHistoryTypeId="2" PostId="2716" RevisionGUID="3882ecd9-0340-4f37-b8ab-366270ff5bcc" CreationDate="2022-05-18T15:25:34.093" UserId="352" Text="We using sidecar, And we want a fast transaction even if we pay a high fee.&#xD;&#xA;&#xD;&#xA;Do you happen to have statistics on the appropriate fees for transfer?&#xD;&#xA;&#xD;&#xA;If not, is there a way to know the appropriate fee for runtime in real time?&#xD;&#xA;&lt;br&gt;&#xD;&#xA;I know that the sidecar will know the fee for the completed transaction. &#xD;&#xA;But we have to figure out fee at the stage where the transaction is being made.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10165" PostHistoryTypeId="1" PostId="2716" RevisionGUID="3882ecd9-0340-4f37-b8ab-366270ff5bcc" CreationDate="2022-05-18T15:25:34.093" UserId="352" Text="Is there a way to find out the appropriate fee when generate tx?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10166" PostHistoryTypeId="3" PostId="2716" RevisionGUID="3882ecd9-0340-4f37-b8ab-366270ff5bcc" CreationDate="2022-05-18T15:25:34.093" UserId="352" Text="|fee|sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10167" PostHistoryTypeId="10" PostId="2663" RevisionGUID="2ccd04d8-3e88-47ad-b711-e9af0130a035" CreationDate="2022-05-18T16:02:31.027" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="10169" PostHistoryTypeId="2" PostId="2717" RevisionGUID="4659b0f5-1217-4f07-89d2-2ba5ba25d7e0" CreationDate="2022-05-18T16:08:17.370" UserId="620" Text="Sidecar also has a `POST /transaction/fee-estimate` endpoint where you can submit the transaction and get the current fee rate (sans tip). Then you can add a tip to get increased priority." ContentLicense="CC BY-SA 4.0" />
  <row Id="10171" PostHistoryTypeId="2" PostId="2718" RevisionGUID="a38e232d-c1c6-4265-ab6a-6d22bd4a7e9b" CreationDate="2022-05-18T17:01:29.483" UserId="2574" Text="How do nomination pools work in the system, what are the mechanics and who controls the direction of those nominations? what are their mechanics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10173" PostHistoryTypeId="1" PostId="2718" RevisionGUID="a38e232d-c1c6-4265-ab6a-6d22bd4a7e9b" CreationDate="2022-05-18T17:01:29.483" UserId="2574" Text="Staking Pools, How do they work? what are their machanics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10174" PostHistoryTypeId="3" PostId="2718" RevisionGUID="a38e232d-c1c6-4265-ab6a-6d22bd4a7e9b" CreationDate="2022-05-18T17:01:29.483" UserId="2574" Text="|staking|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10175" PostHistoryTypeId="2" PostId="2719" RevisionGUID="73e7c324-b158-473d-a20f-c0e084bdf98c" CreationDate="2022-05-18T17:10:38.960" UserId="2574" Text="Found information about pools in the website for those asking same question.&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-staking#4-rewards-mechanism" ContentLicense="CC BY-SA 4.0" />
  <row Id="10177" PostHistoryTypeId="2" PostId="2720" RevisionGUID="8d4a366c-b863-4615-976a-de64c98cee48" CreationDate="2022-05-18T18:57:36.593" UserId="282" Text="While reading the spec `polkadot-host-spec_v0.1.1.pdf` is not clear if the host should track multiple or just one `GRANDPA Pause/Resume` consensus message per fork until the target block is finalized/imported. Another related question is, should we consider the `GRANDPA Pause/Resume` messages in the [`next change`][1] rule where we return the [`effective_number`][2] to never vote on chains with a number higher than the earliest handoff block number?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/b75a253f148aa36fa17cf795b9f2fc2f22d0fcc5/client/finality-grandpa/src/authorities.rs#L268&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/b75a253f148aa36fa17cf795b9f2fc2f22d0fcc5/client/finality-grandpa/src/authorities.rs#L677" ContentLicense="CC BY-SA 4.0" />
  <row Id="10179" PostHistoryTypeId="1" PostId="2720" RevisionGUID="8d4a366c-b863-4615-976a-de64c98cee48" CreationDate="2022-05-18T18:57:36.593" UserId="282" Text="Is it possible to have multiple GRANDPA Pause/Resume for one fork?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10180" PostHistoryTypeId="3" PostId="2720" RevisionGUID="8d4a366c-b863-4615-976a-de64c98cee48" CreationDate="2022-05-18T18:57:36.593" UserId="282" Text="|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10181" PostHistoryTypeId="2" PostId="2721" RevisionGUID="172081a8-fb08-4790-a0a2-f777b90d464a" CreationDate="2022-05-18T20:36:31.207" UserId="48" Text="Ink! 3.1.0 has been released today, and it seems that it has been automatically embed/used in the cargo-contract command.&#xD;&#xA;The result is that newly compiled contract are no more compatible with node that run 3.0 contracts pallet.&#xD;&#xA;&#xD;&#xA;Is there a way to keep version 3.0.1 when compiling ink! contracts ?&#xD;&#xA;&#xD;&#xA;Thanks for your help !&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="10183" PostHistoryTypeId="1" PostId="2721" RevisionGUID="172081a8-fb08-4790-a0a2-f777b90d464a" CreationDate="2022-05-18T20:36:31.207" UserId="48" Text="Cargo contract 3.0.1" ContentLicense="CC BY-SA 4.0" />
  <row Id="10184" PostHistoryTypeId="3" PostId="2721" RevisionGUID="172081a8-fb08-4790-a0a2-f777b90d464a" CreationDate="2022-05-18T20:36:31.207" UserId="48" Text="|ink|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10185" PostHistoryTypeId="2" PostId="2722" RevisionGUID="de469394-5152-43c5-9e4e-d228c7e311a8" CreationDate="2022-05-18T20:49:48.067" UserId="14" Text="Have you tried to hardcode `version = &quot;3.0.1&quot;` in all `ind_*` dependencies in your contract's `Cargo.toml` file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10187" PostHistoryTypeId="2" PostId="2723" RevisionGUID="7fa9c6f7-763d-497f-a789-fe483de29731" CreationDate="2022-05-18T20:57:20.160" UserId="2408" Text="In [this](https://substrate.recipes/basic-pow.html) tutorial it is explained how to create a PoW node. Neither AURA nor GRANDPA are used throughout the tutorial. Also [here](https://substrate.recipes/basic-pow.html#:~:text=is%20never%20truly%20finalized%20and%20can%20always%20be%20reverted.) it's stated that such node will not finalize produced blocks.  &#xD;&#xA;The question is: Can I just delete AURA and GRANDPA from substrate node template and add my custom PoW implementation to get the same result? Will the node be running without finality?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10189" PostHistoryTypeId="1" PostId="2723" RevisionGUID="7fa9c6f7-763d-497f-a789-fe483de29731" CreationDate="2022-05-18T20:57:20.160" UserId="2408" Text="Can I Delete AURA and GRANDPA?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10190" PostHistoryTypeId="3" PostId="2723" RevisionGUID="7fa9c6f7-763d-497f-a789-fe483de29731" CreationDate="2022-05-18T20:57:20.160" UserId="2408" Text="|substrate-node-template|grandpa|finality|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10191" PostHistoryTypeId="5" PostId="2722" RevisionGUID="6fd55b54-cc6b-4ac9-8487-964d3ab0eb7e" CreationDate="2022-05-18T20:57:36.210" UserId="14" Comment="edited body" Text="Have you tried to hardcode `version = &quot;3.0.1&quot;` in all `ink_*` dependencies in your contract's `Cargo.toml` file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10192" PostHistoryTypeId="5" PostId="2721" RevisionGUID="e37c9742-78d3-4c90-9d33-3ef5461dfc24" CreationDate="2022-05-18T21:18:14.070" UserId="48" Comment="Add '-Z original-manifest'" Text="Ink! 3.1.0 has been released today, and it seems that it has been automatically embed/used in the cargo-contract command.&#xD;&#xA;The result is that newly compiled contract are no more compatible with node that run 3.0 contracts pallet.&#xD;&#xA;&#xD;&#xA;Is there a way to keep version 3.0.1 when compiling ink! contracts ?&#xD;&#xA;&#xD;&#xA;Thanks for your help !&#xD;&#xA;&#xD;&#xA;Edit : found the `-Z original-manifest` cargo-contract option that preserves `cargo.toml` versions values :)  &#xD;&#xA;But the build failed at the metadata generation...&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="10193" PostHistoryTypeId="2" PostId="2724" RevisionGUID="45ae1d44-91da-4c32-8564-79835a85cd53" CreationDate="2022-05-18T22:54:18.937" UserId="285" Text="I would like to run a non-validator node (listener node) and prevent it from accepting and broadcasting transactions (ReadOnly mode). Except for accepting transactions, I would like it to behave like a regular node, with the ability to sync with the network and store new blocks.&#xD;&#xA;&#xD;&#xA;I checked all the flags that can be passed when running a node but none seem to do what I was after. &#xD;&#xA;&#xD;&#xA;I was also thinking to disable the port (like 9944) but that would prevent apps like polkadotJS from reading data from the node.&#xD;&#xA;&#xD;&#xA;Is this even possible? Are there any workarounds I can try (like disabling the mempool)?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10195" PostHistoryTypeId="1" PostId="2724" RevisionGUID="45ae1d44-91da-4c32-8564-79835a85cd53" CreationDate="2022-05-18T22:54:18.937" UserId="285" Text="Running a listener node in ReadOnly mode" ContentLicense="CC BY-SA 4.0" />
  <row Id="10196" PostHistoryTypeId="3" PostId="2724" RevisionGUID="45ae1d44-91da-4c32-8564-79835a85cd53" CreationDate="2022-05-18T22:54:18.937" UserId="285" Text="|polkadot-js|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10201" PostHistoryTypeId="5" PostId="2721" RevisionGUID="c4acadde-f7b4-46a5-80ff-d8a1aefcf2ca" CreationDate="2022-05-18T22:59:36.057" UserId="48" Comment="Add steps to reproduce" Text="Ink! 3.1.0 has been released today, and it seems that it has been automatically embed/used in the cargo-contract command.&#xD;&#xA;The result is that newly compiled contract are no more compatible with node that run 3.0 contracts pallet.&#xD;&#xA;&#xD;&#xA;Is there a way to keep version 3.0.1 when compiling ink! contracts ?&#xD;&#xA;&#xD;&#xA;Thanks for your help !&#xD;&#xA;&#xD;&#xA;Edit : found the `-Z original-manifest` cargo-contract option that preserves `cargo.toml` versions values :)  &#xD;&#xA;But the build failed at the metadata generation...&#xD;&#xA;&#xD;&#xA;**Steps to reproduce:**&#xD;&#xA; - Download and uncompress precompile contract node [v0.13](https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.13.0)&#xD;&#xA; - Launch dev node :&#xD;&#xA;```&#xD;&#xA;./substrate-contracts-node-v0.13 --dev&#xD;&#xA;```&#xD;&#xA; - Build flipper contract sample :&#xD;&#xA;```&#xD;&#xA;cargo contract new flipper&#xD;&#xA;cd flipper&#xD;&#xA;cargo +nightly contract build&#xD;&#xA;```&#xD;&#xA; - Use [Contracts UI](https://paritytech.github.io/contracts-ui/#/instantiate) to instantiate the flipper contract&#xD;&#xA; - Instantiation failed with 'ExtrinsicFailed'&#xD;&#xA; - Debug log shows : &#xD;&#xA; ```&#xD;&#xA;DEBUG ThreadId(46) runtime::contracts: CodeRejected: module imports a&#xD;&#xA;   non-existent function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Same contract is instantiated correctly on recent contracts node v0.14 and v0.15.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Same flipper contract built a few days before (using ink! 3.0.1), instantiation is correct on v0.13.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10202" PostHistoryTypeId="5" PostId="2721" RevisionGUID="9b01d850-afa3-4632-afb6-7f2371cbb686" CreationDate="2022-05-18T23:08:24.127" UserId="48" Comment="added 279 characters in body" Text="Ink! 3.1.0 has been released today, and it seems that it has been automatically embed/used in the cargo-contract command.&#xD;&#xA;The result is that newly compiled contract are no more compatible with node that run 3.0 contracts pallet.&#xD;&#xA;&#xD;&#xA;Is there a way to keep version 3.0.1 when compiling ink! contracts ?&#xD;&#xA;&#xD;&#xA;Thanks for your help !&#xD;&#xA;&#xD;&#xA;Edit : found the `-Z original-manifest` cargo-contract option that preserves `cargo.toml` versions values :)  &#xD;&#xA;But the build failed at the metadata generation...&#xD;&#xA;&#xD;&#xA;**Steps to reproduce:**&#xD;&#xA; - Download and uncompress precompile contract node [v0.13](https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.13.0)&#xD;&#xA; - Launch dev node :&#xD;&#xA;```&#xD;&#xA;./substrate-contracts-node-v0.13 --dev&#xD;&#xA;```&#xD;&#xA; - Build flipper contract sample :&#xD;&#xA;```&#xD;&#xA;cargo contract new flipper&#xD;&#xA;cd flipper&#xD;&#xA;cargo +nightly contract build&#xD;&#xA;```&#xD;&#xA; - Use [Contracts UI](https://paritytech.github.io/contracts-ui/#/instantiate) to instantiate the flipper contract&#xD;&#xA; - Instantiation failed with 'ExtrinsicFailed'&#xD;&#xA; - Debug log shows : &#xD;&#xA; ```&#xD;&#xA;DEBUG ThreadId(46) runtime::contracts: CodeRejected: module imports a&#xD;&#xA;   non-existent function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Same contract is instantiated correctly on recent contracts node v0.14 and v0.15.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Same flipper contract built a few days before (using ink! 3.0.1), instantiation is correct on v0.13.&#xD;&#xA;&#xD;&#xA;I saw that upgrading my [node version to polkadot v0.9.22](https://github.com/paritytech/ink/releases/tag/v3.1.0) should resolve this issue. But the cumulus pallet is still on polkadot v0.9.20.&#xD;&#xA;&#xD;&#xA;That's why I asked initially how to stick to ink! 3.0.1 when compiling contract.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10203" PostHistoryTypeId="2" PostId="2726" RevisionGUID="bf04dbc2-c71b-4e35-ad00-51273daa639d" CreationDate="2022-05-19T01:35:41.973" UserId="205" Text="I believe the following resolved issue may answer you question. Cheers! https://github.com/substrate-developer-hub/substrate-node-template/issues/338#issuecomment-1118007694&#xD;&#xA;&#xD;&#xA;NB: Probably same issue as: [question][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2655/not-able-to-build-librocksdb-sys-library-for-substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="10205" PostHistoryTypeId="2" PostId="2727" RevisionGUID="efb2ff7b-479e-4754-8ee9-917cc736f467" CreationDate="2022-05-19T05:44:44.113" UserId="227" Text="Could you try hardcoding `version = &quot;=3.0.1&quot;`?&#xD;&#xA;&#xD;&#xA;The `&quot;=x.x.x&quot;` will pin this very version." ContentLicense="CC BY-SA 4.0" />
  <row Id="10211" PostHistoryTypeId="2" PostId="2729" RevisionGUID="aebb880d-091a-423a-8baf-b43870451c62" CreationDate="2022-05-19T08:10:43.407" UserId="1789" Text="Previously, I have already made a Rust docker image:&#xD;&#xA;```&#xD;&#xA;FROM debian:latest&#xD;&#xA;RUN apt update &amp;&amp; apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential&#xD;&#xA;RUN curl https://sh.rustup.rs -sSf &gt;&gt; install-rust.sh&#xD;&#xA;RUN chmod u+x install-rust.sh&#xD;&#xA;RUN ./install-rust.sh -y&#xD;&#xA;RUN PATH=$PATH:$HOME/.cargo/env&#xD;&#xA;SHELL [&quot;bash&quot;, &quot;-lc&quot;]&#xD;&#xA;RUN rustup update&#xD;&#xA;RUN rustup update nightly&#xD;&#xA;RUN rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;&#xD;&#xA;CMD [ &quot;tail&quot;, &quot;-f&quot;, &quot;/dev/null&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I cloned Substrate-Parachain-Template repo: https://github.com/substrate-developer-hub/substrate-parachain-template and checked out its polkadot-v0.9.18 branch,&#xD;&#xA;&#xD;&#xA;Then after adding my own Dockerfile.template in the cloned repo above:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/rust:1.60.0 as builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;#older rust made collator:v4&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;&#xD;&#xA;COPY . .&#xD;&#xA;&#xD;&#xA;RUN . $HOME/.cargo/env &amp;&amp; cargo build --${PROFILE}&#xD;&#xA;&#xD;&#xA;# here I made a mistake copying files from an incorrect path so the docker build process was stopped here&#xD;&#xA;# the resulted local docker image was built up to here... &#xD;&#xA;# That is okay because I tagged it to be used in other docker files below...&#xD;&#xA;# but I should add the EXPOSE and CMD commands below for a normal scenario&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;Also with a .dockerignore file below...&#xD;&#xA;&#xD;&#xA;**[Notice]** I added `target` folder below into the original .dockerignore file from the repo because this can avoid `Sending build context to Docker daemon` sending huge size context data!&#xD;&#xA;```&#xD;&#xA;.git&#xD;&#xA;target&#xD;&#xA;**/target/&#xD;&#xA;**/*.txt&#xD;&#xA;**/*.md&#xD;&#xA;/docker/&#xD;&#xA;!/target/release/polkadot-collator&#xD;&#xA;&#xD;&#xA;# dotfiles in the repo root&#xD;&#xA;/.*&#xD;&#xA;```&#xD;&#xA;Then I built another docker image:&#xD;&#xA;`docker build -f Dockerfile.template -t gcr.io/paid-network-202104/template:v1 .`&#xD;&#xA;&#xD;&#xA;because this template:v1 image is huge(11.3GB), it is okay to use it locally in my docker files without pushing it to the cloud.&#xD;&#xA;&#xD;&#xA;My third docker image should be slim:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/template:v1 as builder&#xD;&#xA;&#xD;&#xA;FROM debian:latest&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slim&#xD;&#xA;&#xD;&#xA;# v1&#xD;&#xA;# compiled binaries are in ./builds/collator&#xD;&#xA;COPY --from=builder ./builds/collator/target/release/parachain-collator ./target/release/&#xD;&#xA;&#xD;&#xA;COPY ./polkadot-launch ./polkadot-launch&#xD;&#xA;RUN ls&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;then I built it: `docker build -f Dockerfile.slim -t gcr.io/paid-network-202104/template:slim1 .`&#xD;&#xA;&#xD;&#xA;and pushed the new template:slim1 image to the cloud.&#xD;&#xA;&#xD;&#xA;Now I am ready for Zombienet...&#xD;&#xA;&#xD;&#xA;My network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/template:slim1&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;With the test file:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z04-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;#alice: parachain 2000 block height is at least 10 within 250 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# histogram&#xD;&#xA;#alice: reports histogram polkadot_pvf_execution_time has at least 2 samples in buckets [&quot;0.1&quot;, &quot;0.25&quot;, &quot;0.5&quot;, &quot;+Inf&quot;] within 100 seconds&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With the latest zombienet-linux v1.2.34, I ran it: `./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature`&#xD;&#xA;&#xD;&#xA;The result:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;		 Using temporary directory: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec  --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-2 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec --chain /cfg/rococo-local-2000-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-2000-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000-plain.json as:cdf720a7997f3f77d6e2509edff0820ba3af8eafaf59de281eabe9aa79e5dfac&#xD;&#xA;		temp-2 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json as:60698b4418761572cdb18c86cbd4ea87fe643ba8e77ffc38965b822f5c50d952&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-plain.json as:00de39b17f790e9209b5ca034e123711974a556cad8b2519269e00965b5ceb8c&#xD;&#xA;		temp-3 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local.json as:74e1ac30e59861832272c2925e9d22c7bb63f47ae10e8010d8bd3b59e24996ce&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/zombie-wrapper.sh as:80d9cdcda7802f9a0fbab8739bf5ab65556f4d6606dd81606529f8b3dc141768&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --name collator01 --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --chain /cfg/rococo-local-2000.json --base-path /data --listen-addr /ip4/0.0.0.0/tcp/37663/ws --ws-port 39025 --prometheus-external --prometheus-port 44123 --alice --collator --force-authoring --jaeger-agent localhost:6831 -- --chain /cfg/rococo-local.json --execution wasm --port 45187 --ws-port 44467 --rpc-port 40445&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.8/tcp/30333/ws/p2p/12D3KooWAieokPB4zt3dJJokhVZw8KoQuTgXEEyempJtr6pGkhrd&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-c1812f6eb712223f7cdb3e97384732a7 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A38615#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:46855/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A36869#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:34721/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;	 Parachain chainSpecPath path: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41975/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-19 15:02:07        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2702ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (69ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (64ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (60ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-19 15:04:40        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-19 15:05:01        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-19 15:05:11        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:38615: 1000:: Normal connection closure&#xD;&#xA;2022-05-19 15:05:19        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  8 passing (6m)&#xD;&#xA;  3 failing&#xD;&#xA;&#xD;&#xA;  1) small network( Small Network test )&#xD;&#xA;       alice: parachain 2000 block height is at least 6 within 150 seconds:&#xD;&#xA;&#xD;&#xA;      AssertionError: expected 0 to be at least 6&#xD;&#xA;      + expected - actual&#xD;&#xA;&#xD;&#xA;      -0&#xD;&#xA;      +6&#xD;&#xA;      &#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:265:37&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  2) small network( Small Network test )&#xD;&#xA;       bob: system event contains &quot;A candidate was included&quot; within 20 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  3) small network( Small Network test )&#xD;&#xA;       alice: system event matches glob &quot;*was backed*&quot; within 10 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;```&#xD;&#xA;From above you can see the&#xD;&#xA;&#xD;&#xA; - relaychain alice node test: ok&#xD;&#xA; - relaychain bob node test: ok&#xD;&#xA; - parachain 2000 is registered: ok&#xD;&#xA; - 3 log tests: ok&#xD;&#xA; - parachain 2000 block height test: failed!!?? Why did that fail?&#xD;&#xA;&#xD;&#xA;I know the error 2) and 3) are caused by error 1), the block height test failure.&#xD;&#xA;&#xD;&#xA;Why was the parachain collator not producing blocks? &#xD;&#xA;&#xD;&#xA;When I checked the collator logs via `kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7`, the terminal returned nothing just like nothing happened!!??&#xD;&#xA;&#xD;&#xA;When clicking on the Collator Node direct link: `https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer `, my browser could not connect to that collator node at all...&#xD;&#xA;&#xD;&#xA;Please advise" ContentLicense="CC BY-SA 4.0" />
  <row Id="10213" PostHistoryTypeId="1" PostId="2729" RevisionGUID="aebb880d-091a-423a-8baf-b43870451c62" CreationDate="2022-05-19T08:10:43.407" UserId="1789" Text="Zombienet: Substrate-Parachain-Template ... block height(block producing) test failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="10214" PostHistoryTypeId="3" PostId="2729" RevisionGUID="aebb880d-091a-423a-8baf-b43870451c62" CreationDate="2022-05-19T08:10:43.407" UserId="1789" Text="|parachain|docker|parachain-collator|zombienet|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10215" PostHistoryTypeId="5" PostId="2729" RevisionGUID="bc8f91bc-48c6-4b08-9bb9-c19351f46c39" CreationDate="2022-05-19T08:20:34.137" UserId="1789" Comment="deleted 5 characters in body" Text="Previously, I have already made a Rust docker image:&#xD;&#xA;```&#xD;&#xA;FROM debian:latest&#xD;&#xA;RUN apt update &amp;&amp; apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential&#xD;&#xA;RUN curl https://sh.rustup.rs -sSf &gt;&gt; install-rust.sh&#xD;&#xA;RUN chmod u+x install-rust.sh&#xD;&#xA;RUN ./install-rust.sh -y&#xD;&#xA;RUN PATH=$PATH:$HOME/.cargo/env&#xD;&#xA;SHELL [&quot;bash&quot;, &quot;-lc&quot;]&#xD;&#xA;RUN rustup update&#xD;&#xA;RUN rustup update nightly&#xD;&#xA;RUN rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;&#xD;&#xA;CMD [ &quot;tail&quot;, &quot;-f&quot;, &quot;/dev/null&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I cloned Substrate-Parachain-Template repo: https://github.com/substrate-developer-hub/substrate-parachain-template and checked out its polkadot-v0.9.18 branch,&#xD;&#xA;&#xD;&#xA;Then after adding my own Dockerfile.template in the cloned repo above:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/rust:1.60.0 as builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;#older rust made collator:v4&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;&#xD;&#xA;COPY . .&#xD;&#xA;&#xD;&#xA;RUN . $HOME/.cargo/env &amp;&amp; cargo build --${PROFILE}&#xD;&#xA;&#xD;&#xA;# here I made a mistake copying files from an incorrect path so the docker build process was stopped here&#xD;&#xA;# the resulted local docker image was built up to here... &#xD;&#xA;# That is okay because I tagged it to be used in other docker files below...&#xD;&#xA;# but I should add the EXPOSE and CMD commands below for a normal scenario&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;Also with a .dockerignore file below...&#xD;&#xA;&#xD;&#xA;**[Notice]** I added `target` folder below into the original .dockerignore file from the repo because this can avoid `Sending build context to Docker daemon` sending huge size context data!&#xD;&#xA;```&#xD;&#xA;.git&#xD;&#xA;target&#xD;&#xA;**/target/&#xD;&#xA;**/*.txt&#xD;&#xA;**/*.md&#xD;&#xA;/docker/&#xD;&#xA;!/target/release/polkadot-collator&#xD;&#xA;&#xD;&#xA;# dotfiles in the repo root&#xD;&#xA;/.*&#xD;&#xA;```&#xD;&#xA;Then I built template:v1 docker image:&#xD;&#xA;`docker build -f Dockerfile.template -t gcr.io/paid-network-202104/template:v1 .`&#xD;&#xA;&#xD;&#xA;because this template:v1 image is huge(11.3GB), it is okay to use it locally without pushing it to the cloud.&#xD;&#xA;&#xD;&#xA;My third and final docker image should be slim:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/template:v1 as builder&#xD;&#xA;&#xD;&#xA;FROM debian:latest&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slim&#xD;&#xA;&#xD;&#xA;# v1&#xD;&#xA;# compiled binaries are in ./builds/collator&#xD;&#xA;COPY --from=builder ./builds/collator/target/release/parachain-collator ./target/release/&#xD;&#xA;&#xD;&#xA;COPY ./polkadot-launch ./polkadot-launch&#xD;&#xA;RUN ls&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;then I built it: `docker build -f Dockerfile.slim -t gcr.io/paid-network-202104/template:slim1 .`&#xD;&#xA;&#xD;&#xA;and pushed the new template:slim1 image to the cloud.&#xD;&#xA;&#xD;&#xA;Now I am ready for Zombienet...&#xD;&#xA;&#xD;&#xA;My network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/template:slim1&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;With the test file:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z04-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;#alice: parachain 2000 block height is at least 10 within 250 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# histogram&#xD;&#xA;#alice: reports histogram polkadot_pvf_execution_time has at least 2 samples in buckets [&quot;0.1&quot;, &quot;0.25&quot;, &quot;0.5&quot;, &quot;+Inf&quot;] within 100 seconds&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With the latest zombienet-linux v1.2.34, I ran it: `./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature`&#xD;&#xA;&#xD;&#xA;The result:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;		 Using temporary directory: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec  --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-2 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec --chain /cfg/rococo-local-2000-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-2000-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000-plain.json as:cdf720a7997f3f77d6e2509edff0820ba3af8eafaf59de281eabe9aa79e5dfac&#xD;&#xA;		temp-2 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json as:60698b4418761572cdb18c86cbd4ea87fe643ba8e77ffc38965b822f5c50d952&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-plain.json as:00de39b17f790e9209b5ca034e123711974a556cad8b2519269e00965b5ceb8c&#xD;&#xA;		temp-3 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local.json as:74e1ac30e59861832272c2925e9d22c7bb63f47ae10e8010d8bd3b59e24996ce&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/zombie-wrapper.sh as:80d9cdcda7802f9a0fbab8739bf5ab65556f4d6606dd81606529f8b3dc141768&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --name collator01 --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --chain /cfg/rococo-local-2000.json --base-path /data --listen-addr /ip4/0.0.0.0/tcp/37663/ws --ws-port 39025 --prometheus-external --prometheus-port 44123 --alice --collator --force-authoring --jaeger-agent localhost:6831 -- --chain /cfg/rococo-local.json --execution wasm --port 45187 --ws-port 44467 --rpc-port 40445&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.8/tcp/30333/ws/p2p/12D3KooWAieokPB4zt3dJJokhVZw8KoQuTgXEEyempJtr6pGkhrd&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-c1812f6eb712223f7cdb3e97384732a7 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A38615#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:46855/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A36869#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:34721/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;	 Parachain chainSpecPath path: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41975/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-19 15:02:07        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2702ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (69ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (64ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (60ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-19 15:04:40        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-19 15:05:01        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-19 15:05:11        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:38615: 1000:: Normal connection closure&#xD;&#xA;2022-05-19 15:05:19        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  8 passing (6m)&#xD;&#xA;  3 failing&#xD;&#xA;&#xD;&#xA;  1) small network( Small Network test )&#xD;&#xA;       alice: parachain 2000 block height is at least 6 within 150 seconds:&#xD;&#xA;&#xD;&#xA;      AssertionError: expected 0 to be at least 6&#xD;&#xA;      + expected - actual&#xD;&#xA;&#xD;&#xA;      -0&#xD;&#xA;      +6&#xD;&#xA;      &#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:265:37&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  2) small network( Small Network test )&#xD;&#xA;       bob: system event contains &quot;A candidate was included&quot; within 20 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  3) small network( Small Network test )&#xD;&#xA;       alice: system event matches glob &quot;*was backed*&quot; within 10 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;```&#xD;&#xA;From above you can see the&#xD;&#xA;&#xD;&#xA; - relaychain alice node test: ok&#xD;&#xA; - relaychain bob node test: ok&#xD;&#xA; - parachain 2000 is registered: ok&#xD;&#xA; - 3 log tests: ok&#xD;&#xA; - parachain 2000 block height test: failed!!?? Why did that fail?&#xD;&#xA;&#xD;&#xA;I know the error 2) and 3) are caused by error 1), the block height test failure.&#xD;&#xA;&#xD;&#xA;Why was the parachain collator not producing blocks? &#xD;&#xA;&#xD;&#xA;When I checked the collator logs via `kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7`, the terminal returned nothing just like nothing happened!!??&#xD;&#xA;&#xD;&#xA;When clicking on the Collator Node direct link: `https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer `, my browser could not connect to that collator node at all...&#xD;&#xA;&#xD;&#xA;Please advise" ContentLicense="CC BY-SA 4.0" />
  <row Id="10216" PostHistoryTypeId="5" PostId="2729" RevisionGUID="263804dd-54b3-4f78-8b3b-d415354af346" CreationDate="2022-05-19T08:30:04.553" UserId="1789" Comment="added 85 characters in body" Text="Previously, I have already made a Rust docker image:&#xD;&#xA;```&#xD;&#xA;FROM debian:latest&#xD;&#xA;RUN apt update &amp;&amp; apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential&#xD;&#xA;RUN curl https://sh.rustup.rs -sSf &gt;&gt; install-rust.sh&#xD;&#xA;RUN chmod u+x install-rust.sh&#xD;&#xA;RUN ./install-rust.sh -y&#xD;&#xA;RUN PATH=$PATH:$HOME/.cargo/env&#xD;&#xA;SHELL [&quot;bash&quot;, &quot;-lc&quot;]&#xD;&#xA;RUN rustup update&#xD;&#xA;RUN rustup update nightly&#xD;&#xA;RUN rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;&#xD;&#xA;CMD [ &quot;tail&quot;, &quot;-f&quot;, &quot;/dev/null&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I cloned Substrate-Parachain-Template repo: https://github.com/substrate-developer-hub/substrate-parachain-template and checked out its polkadot-v0.9.18 branch,&#xD;&#xA;&#xD;&#xA;Then after adding my own Dockerfile.template in the cloned repo above:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/rust:1.60.0 as builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;#older rust made collator:v4&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;&#xD;&#xA;COPY . .&#xD;&#xA;&#xD;&#xA;RUN . $HOME/.cargo/env &amp;&amp; cargo build --${PROFILE}&#xD;&#xA;&#xD;&#xA;# here I made a mistake copying files from an incorrect path so the docker build process was stopped here&#xD;&#xA;# the resulted local docker image was built up to here... &#xD;&#xA;# That is okay because I tagged it to be used in other docker files below...&#xD;&#xA;# but I should add the EXPOSE and CMD commands below for a normal scenario&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;Also with a .dockerignore file below...&#xD;&#xA;&#xD;&#xA;**[Notice]** I added `target` folder below into the original .dockerignore file from the repo because this can avoid `Sending build context to Docker daemon` sending huge size context data!&#xD;&#xA;```&#xD;&#xA;.git&#xD;&#xA;target&#xD;&#xA;**/target/&#xD;&#xA;**/*.txt&#xD;&#xA;**/*.md&#xD;&#xA;/docker/&#xD;&#xA;!/target/release/polkadot-collator&#xD;&#xA;&#xD;&#xA;# dotfiles in the repo root&#xD;&#xA;/.*&#xD;&#xA;```&#xD;&#xA;Then I built template:v1 docker image:&#xD;&#xA;`docker build -f Dockerfile.template -t gcr.io/paid-network-202104/template:v1 .`&#xD;&#xA;&#xD;&#xA;because this template:v1 image is huge(11.3GB), it is okay to use it locally without pushing it to the cloud.&#xD;&#xA;&#xD;&#xA;My third and final docker image should be slim:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/template:v1 as builder&#xD;&#xA;&#xD;&#xA;FROM debian:latest&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slim&#xD;&#xA;&#xD;&#xA;# v1&#xD;&#xA;# compiled binaries are in ./builds/collator&#xD;&#xA;COPY --from=builder ./builds/collator/target/release/parachain-collator ./target/release/&#xD;&#xA;&#xD;&#xA;COPY ./polkadot-launch ./polkadot-launch&#xD;&#xA;RUN ls&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;then I built it: `docker build -f Dockerfile.slim -t gcr.io/paid-network-202104/template:slim1 .`&#xD;&#xA;&#xD;&#xA;and pushed the new template:slim1 image to the cloud.&#xD;&#xA;&#xD;&#xA;Now I am ready for Zombienet...&#xD;&#xA;&#xD;&#xA;This Substrate-Parachain-Template uses Cumulus, so I set:&#xD;&#xA;`cumulus_based = true` in my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/template:slim1&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;With the test file:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z04-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;#alice: parachain 2000 block height is at least 10 within 250 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# histogram&#xD;&#xA;#alice: reports histogram polkadot_pvf_execution_time has at least 2 samples in buckets [&quot;0.1&quot;, &quot;0.25&quot;, &quot;0.5&quot;, &quot;+Inf&quot;] within 100 seconds&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With the latest zombienet-linux v1.2.34, I ran it: `./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature`&#xD;&#xA;&#xD;&#xA;The result:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;		 Using temporary directory: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec  --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-2 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec --chain /cfg/rococo-local-2000-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-2000-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000-plain.json as:cdf720a7997f3f77d6e2509edff0820ba3af8eafaf59de281eabe9aa79e5dfac&#xD;&#xA;		temp-2 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json as:60698b4418761572cdb18c86cbd4ea87fe643ba8e77ffc38965b822f5c50d952&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-plain.json as:00de39b17f790e9209b5ca034e123711974a556cad8b2519269e00965b5ceb8c&#xD;&#xA;		temp-3 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local.json as:74e1ac30e59861832272c2925e9d22c7bb63f47ae10e8010d8bd3b59e24996ce&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/zombie-wrapper.sh as:80d9cdcda7802f9a0fbab8739bf5ab65556f4d6606dd81606529f8b3dc141768&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --name collator01 --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --chain /cfg/rococo-local-2000.json --base-path /data --listen-addr /ip4/0.0.0.0/tcp/37663/ws --ws-port 39025 --prometheus-external --prometheus-port 44123 --alice --collator --force-authoring --jaeger-agent localhost:6831 -- --chain /cfg/rococo-local.json --execution wasm --port 45187 --ws-port 44467 --rpc-port 40445&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.8/tcp/30333/ws/p2p/12D3KooWAieokPB4zt3dJJokhVZw8KoQuTgXEEyempJtr6pGkhrd&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-c1812f6eb712223f7cdb3e97384732a7 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A38615#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:46855/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A36869#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:34721/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;	 Parachain chainSpecPath path: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41975/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-19 15:02:07        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2702ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (69ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (64ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (60ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-19 15:04:40        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-19 15:05:01        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-19 15:05:11        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:38615: 1000:: Normal connection closure&#xD;&#xA;2022-05-19 15:05:19        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  8 passing (6m)&#xD;&#xA;  3 failing&#xD;&#xA;&#xD;&#xA;  1) small network( Small Network test )&#xD;&#xA;       alice: parachain 2000 block height is at least 6 within 150 seconds:&#xD;&#xA;&#xD;&#xA;      AssertionError: expected 0 to be at least 6&#xD;&#xA;      + expected - actual&#xD;&#xA;&#xD;&#xA;      -0&#xD;&#xA;      +6&#xD;&#xA;      &#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:265:37&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  2) small network( Small Network test )&#xD;&#xA;       bob: system event contains &quot;A candidate was included&quot; within 20 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  3) small network( Small Network test )&#xD;&#xA;       alice: system event matches glob &quot;*was backed*&quot; within 10 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;```&#xD;&#xA;From above you can see the&#xD;&#xA;&#xD;&#xA; - relaychain alice node test: ok&#xD;&#xA; - relaychain bob node test: ok&#xD;&#xA; - parachain 2000 is registered: ok&#xD;&#xA; - 3 log tests: ok&#xD;&#xA; - parachain 2000 block height test: failed!!?? Why did that fail?&#xD;&#xA;&#xD;&#xA;I know the error 2) and 3) are caused by error 1), the block height test failure.&#xD;&#xA;&#xD;&#xA;Why was the parachain collator not producing blocks? &#xD;&#xA;&#xD;&#xA;When I checked the collator logs via `kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7`, the terminal returned nothing just like nothing happened!!??&#xD;&#xA;&#xD;&#xA;When clicking on the Collator Node direct link: `https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer `, my browser could not connect to that collator node at all...&#xD;&#xA;&#xD;&#xA;Please advise" ContentLicense="CC BY-SA 4.0" />
  <row Id="10217" PostHistoryTypeId="6" PostId="2724" RevisionGUID="d8d6c0d9-9b7d-4038-aabf-75990a597c46" CreationDate="2022-05-19T08:43:35.703" UserId="285" Comment="edited tags" Text="|substrate-node|polkadot-js|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10218" PostHistoryTypeId="2" PostId="2730" RevisionGUID="d1723442-649c-4ee0-ba1a-da6ef6e9eaaf" CreationDate="2022-05-19T08:57:07.733" UserId="139" Text="I am interested in measuring/estimating the transaction throughput of my chain. How should I start?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10220" PostHistoryTypeId="1" PostId="2730" RevisionGUID="d1723442-649c-4ee0-ba1a-da6ef6e9eaaf" CreationDate="2022-05-19T08:57:07.733" UserId="139" Text="How can one estimate the transaction throughput of a substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10221" PostHistoryTypeId="3" PostId="2730" RevisionGUID="d1723442-649c-4ee0-ba1a-da6ef6e9eaaf" CreationDate="2022-05-19T08:57:07.733" UserId="139" Text="|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10222" PostHistoryTypeId="2" PostId="2731" RevisionGUID="0f58c294-8f7d-4a5d-b663-3fa958be4024" CreationDate="2022-05-19T09:08:42.823" UserId="2581" Text="I am trying to call api.query.staking.erasTotalStake in polkadot.js.&#xD;&#xA;&#xD;&#xA;Docs: https://polkadot.js.org/docs/substrate/storage/#erastotalstakeu32-u128&#xD;&#xA;&#xD;&#xA;Which value can be parameter? Docs says u32. Is it block height?&#xD;&#xA;&#xD;&#xA;https://codesandbox.io/s/keen-leakey-6jzrz9?file=/index.js&#xD;&#xA;This is my working code sandbox, I am just getting response 0.&#xD;&#xA;&#xD;&#xA;How can I get another response beyond 0, and check if this api works correctly?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10224" PostHistoryTypeId="1" PostId="2731" RevisionGUID="0f58c294-8f7d-4a5d-b663-3fa958be4024" CreationDate="2022-05-19T09:08:42.823" UserId="2581" Text="Want support in polkadot.js/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="10225" PostHistoryTypeId="3" PostId="2731" RevisionGUID="0f58c294-8f7d-4a5d-b663-3fa958be4024" CreationDate="2022-05-19T09:08:42.823" UserId="2581" Text="|kusama|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10227" PostHistoryTypeId="2" PostId="2732" RevisionGUID="7a49c1aa-73b9-4816-85be-6fddab8e7903" CreationDate="2022-05-19T09:34:24.953" UserId="48" Text="The parameter is the era you want to query.  &#xD;&#xA;The current value is 3728.&#xD;&#xA;&#xD;&#xA;You can check values directly with https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/chainstate.&#xD;&#xA;&#xD;&#xA;Hope it helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="10229" PostHistoryTypeId="5" PostId="2729" RevisionGUID="ce144b8d-8329-4eae-ac82-93cec5a3c175" CreationDate="2022-05-19T09:50:41.740" UserId="1789" Comment="added 326 characters in body" Text="Previously, I have already made a Rust docker image:&#xD;&#xA;```&#xD;&#xA;FROM debian:latest&#xD;&#xA;RUN apt update &amp;&amp; apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential&#xD;&#xA;RUN curl https://sh.rustup.rs -sSf &gt;&gt; install-rust.sh&#xD;&#xA;RUN chmod u+x install-rust.sh&#xD;&#xA;RUN ./install-rust.sh -y&#xD;&#xA;RUN PATH=$PATH:$HOME/.cargo/env&#xD;&#xA;SHELL [&quot;bash&quot;, &quot;-lc&quot;]&#xD;&#xA;RUN rustup update&#xD;&#xA;RUN rustup update nightly&#xD;&#xA;RUN rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;&#xD;&#xA;CMD [ &quot;tail&quot;, &quot;-f&quot;, &quot;/dev/null&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I cloned Substrate-Parachain-Template repo: https://github.com/substrate-developer-hub/substrate-parachain-template and checked out its polkadot-v0.9.18 branch,&#xD;&#xA;&#xD;&#xA;Then after adding my own Dockerfile.template in the cloned repo above:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/rust:1.60.0 as builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;#older rust made collator:v4&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;&#xD;&#xA;COPY . .&#xD;&#xA;&#xD;&#xA;RUN . $HOME/.cargo/env &amp;&amp; cargo build --${PROFILE}&#xD;&#xA;&#xD;&#xA;# here I made a mistake copying files from an incorrect path so the docker build process was stopped here&#xD;&#xA;# the resulted local docker image was built up to here... &#xD;&#xA;# That is okay because I tagged it to be used in other docker files below...&#xD;&#xA;# but I should add the EXPOSE and CMD commands below for a normal scenario&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;Also with a .dockerignore file below...&#xD;&#xA;&#xD;&#xA;**[Notice]** I added `target` folder below into the original .dockerignore file from the repo because this can avoid `Sending build context to Docker daemon` sending huge size context data!&#xD;&#xA;```&#xD;&#xA;.git&#xD;&#xA;target&#xD;&#xA;**/target/&#xD;&#xA;**/*.txt&#xD;&#xA;**/*.md&#xD;&#xA;/docker/&#xD;&#xA;!/target/release/polkadot-collator&#xD;&#xA;&#xD;&#xA;# dotfiles in the repo root&#xD;&#xA;/.*&#xD;&#xA;```&#xD;&#xA;Then I built template:v1 docker image:&#xD;&#xA;`docker build -f Dockerfile.template -t gcr.io/paid-network-202104/template:v1 .`&#xD;&#xA;&#xD;&#xA;because this template:v1 image is huge(11.3GB), it is okay to use it locally without pushing it to the cloud.&#xD;&#xA;&#xD;&#xA;My third and final docker image should be slim:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/template:v1 as builder&#xD;&#xA;&#xD;&#xA;FROM debian:latest&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slim&#xD;&#xA;&#xD;&#xA;# v1&#xD;&#xA;# compiled binaries are in ./builds/collator&#xD;&#xA;COPY --from=builder ./builds/collator/target/release/parachain-collator ./target/release/&#xD;&#xA;&#xD;&#xA;COPY ./polkadot-launch ./polkadot-launch&#xD;&#xA;RUN ls&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;then I built it: `docker build -f Dockerfile.slim -t gcr.io/paid-network-202104/template:slim1 .`&#xD;&#xA;&#xD;&#xA;and pushed the new template:slim1 image to the cloud.&#xD;&#xA;&#xD;&#xA;Now I am ready for Zombienet...&#xD;&#xA;&#xD;&#xA;This Substrate-Parachain-Template uses Cumulus, so I set:&#xD;&#xA;`cumulus_based = true` in my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/template:slim1&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;With the test file:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z04-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;#alice: parachain 2000 block height is at least 10 within 250 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# histogram&#xD;&#xA;#alice: reports histogram polkadot_pvf_execution_time has at least 2 samples in buckets [&quot;0.1&quot;, &quot;0.25&quot;, &quot;0.5&quot;, &quot;+Inf&quot;] within 100 seconds&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With the latest zombienet-linux v1.2.34, I ran it: `./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature`&#xD;&#xA;&#xD;&#xA;The result:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;		 Using temporary directory: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec  --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-2 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec --chain /cfg/rococo-local-2000-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-2000-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000-plain.json as:cdf720a7997f3f77d6e2509edff0820ba3af8eafaf59de281eabe9aa79e5dfac&#xD;&#xA;		temp-2 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json as:60698b4418761572cdb18c86cbd4ea87fe643ba8e77ffc38965b822f5c50d952&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-plain.json as:00de39b17f790e9209b5ca034e123711974a556cad8b2519269e00965b5ceb8c&#xD;&#xA;		temp-3 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local.json as:74e1ac30e59861832272c2925e9d22c7bb63f47ae10e8010d8bd3b59e24996ce&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/zombie-wrapper.sh as:80d9cdcda7802f9a0fbab8739bf5ab65556f4d6606dd81606529f8b3dc141768&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --name collator01 --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --chain /cfg/rococo-local-2000.json --base-path /data --listen-addr /ip4/0.0.0.0/tcp/37663/ws --ws-port 39025 --prometheus-external --prometheus-port 44123 --alice --collator --force-authoring --jaeger-agent localhost:6831 -- --chain /cfg/rococo-local.json --execution wasm --port 45187 --ws-port 44467 --rpc-port 40445&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.8/tcp/30333/ws/p2p/12D3KooWAieokPB4zt3dJJokhVZw8KoQuTgXEEyempJtr6pGkhrd&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;---------------------------------------https://docs.docker.com/engine/reference/builder/#expose--&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-c1812f6eb712223f7cdb3e97384732a7 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A38615#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:46855/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A36869#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:34721/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;	 Parachain chainSpecPath path: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41975/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-19 15:02:07        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2702ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (69ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (64ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (60ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-19 15:04:40        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-19 15:05:01        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-19 15:05:11        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:38615: 1000:: Normal connection closure&#xD;&#xA;2022-05-19 15:05:19        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  8 passing (6m)&#xD;&#xA;  3 failing&#xD;&#xA;&#xD;&#xA;  1) small network( Small Network test )&#xD;&#xA;       alice: parachain 2000 block height is at least 6 within 150 seconds:&#xD;&#xA;&#xD;&#xA;      AssertionError: expected 0 to be at least 6&#xD;&#xA;      + expected - actual&#xD;&#xA;&#xD;&#xA;      -0&#xD;&#xA;      +6&#xD;&#xA;      &#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:265:37&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  2) small network( Small Network test )&#xD;&#xA;       bob: system event contains &quot;A candidate was included&quot; within 20 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  3) small network( Small Network test )&#xD;&#xA;       alice: system event matches glob &quot;*was backed*&quot; within 10 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;```&#xD;&#xA;From above you can see the&#xD;&#xA;&#xD;&#xA; - relaychain alice node test: ok&#xD;&#xA; - relaychain bob node test: ok&#xD;&#xA; - parachain 2000 is registered: ok&#xD;&#xA; - 3 log tests: ok&#xD;&#xA; - parachain 2000 block height test: failed!!?? Why did that fail?&#xD;&#xA;&#xD;&#xA;I know the error 2) and 3) are caused by error 1), the block height test failure.&#xD;&#xA;&#xD;&#xA;Why was the parachain collator not producing blocks? &#xD;&#xA;&#xD;&#xA;When I checked the collator logs via `kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7`, the terminal returned nothing just like nothing happened!!??&#xD;&#xA;&#xD;&#xA;When clicking on the Collator Node direct link: `https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer `, my browser could not connect to that collator node at all...&#xD;&#xA;&#xD;&#xA;The docker &quot;EXPOSE&quot; does not actually publish the port according to &#xD;&#xA;https://docs.docker.com/engine/reference/builder/#expose&#xD;&#xA;And adding this to the network definition file didn't work:&#xD;&#xA;```&#xD;&#xA;args = [&quot;-p 30333:30333/tcp&quot;, &quot;-p 9933:9933/tcp&quot;, &quot;-p 9944:9944/tcp&quot;]&#xD;&#xA;```&#xD;&#xA;Please advise" ContentLicense="CC BY-SA 4.0" />
  <row Id="10235" PostHistoryTypeId="2" PostId="2734" RevisionGUID="d4aa6af3-d7e5-41a0-b082-b6cc822c181d" CreationDate="2022-05-19T11:26:00.170" UserId="2192" Text="You should start by benchmarking the extrinsics defined in your runtime. See [here](https://docs.substrate.io/v3/runtime/benchmarking/) to learn how to do this. &#xD;&#xA;&#xD;&#xA;The benchmarks will give you an execution weight in units of picoseconds, ie. `1_000_000_000_000` weight units ~ 1 second of execution time. Note the result of this depends on the hardware you run the benchmarks on - you should benchmark on a machine that matches your recommended validator hardware specs.&#xD;&#xA;&#xD;&#xA;A typical extrinsic executed on typical hardware might weigh `200_000_000` units, equivalent to 200 microseconds. So in this case you could estimate a transaction throughput of `1_000_000 ms / 200 ms per tx ~ 5000 tx`.&#xD;&#xA;&#xD;&#xA;There are other considerations, for example this rough estimation doesn't take into account the pallet hooks and other work that needs to be performed to process a block (see [here](https://docs.substrate.io/v3/runtime/benchmarking/#minimize-usage-of-on_finalize-and-transition-logic-to-on_initialize)). So the value calculated above should be considered an upper bound. &#xD;&#xA;&#xD;&#xA;Also your runtime likely defines more than a single extrinsic, so you would also need to estimate the relative frequency of each extrinsic to get a more accurate picture. " ContentLicense="CC BY-SA 4.0" />
  <row Id="10237" PostHistoryTypeId="5" PostId="2729" RevisionGUID="8eb10527-1cd7-4f45-91dc-2b749b202f8f" CreationDate="2022-05-19T11:42:35.360" UserId="1789" Comment="added 2095 characters in body" Text="Previously, I have already made a Rust docker image:&#xD;&#xA;```&#xD;&#xA;FROM debian:latest&#xD;&#xA;RUN apt update &amp;&amp; apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential&#xD;&#xA;RUN curl https://sh.rustup.rs -sSf &gt;&gt; install-rust.sh&#xD;&#xA;RUN chmod u+x install-rust.sh&#xD;&#xA;RUN ./install-rust.sh -y&#xD;&#xA;RUN PATH=$PATH:$HOME/.cargo/env&#xD;&#xA;SHELL [&quot;bash&quot;, &quot;-lc&quot;]&#xD;&#xA;RUN rustup update&#xD;&#xA;RUN rustup update nightly&#xD;&#xA;RUN rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;&#xD;&#xA;CMD [ &quot;tail&quot;, &quot;-f&quot;, &quot;/dev/null&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I cloned Substrate-Parachain-Template repo: https://github.com/substrate-developer-hub/substrate-parachain-template and checked out its polkadot-v0.9.18 branch,&#xD;&#xA;&#xD;&#xA;Then after adding my own Dockerfile.template in the cloned repo above:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/rust:1.60.0 as builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;#older rust made collator:v4&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;&#xD;&#xA;COPY . .&#xD;&#xA;&#xD;&#xA;RUN . $HOME/.cargo/env &amp;&amp; cargo build --${PROFILE}&#xD;&#xA;&#xD;&#xA;# here I made a mistake copying files from an incorrect path so the docker build process was stopped here&#xD;&#xA;# the resulted local docker image was built up to here... &#xD;&#xA;# That is okay because I tagged it to be used in other docker files below...&#xD;&#xA;# but I should add the EXPOSE and CMD commands below for a normal scenario&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;Also with a .dockerignore file below...&#xD;&#xA;&#xD;&#xA;**[Notice]** I added `target` folder below into the original .dockerignore file from the repo because this can avoid `Sending build context to Docker daemon` sending huge size context data!&#xD;&#xA;```&#xD;&#xA;.git&#xD;&#xA;target&#xD;&#xA;**/target/&#xD;&#xA;**/*.txt&#xD;&#xA;**/*.md&#xD;&#xA;/docker/&#xD;&#xA;!/target/release/polkadot-collator&#xD;&#xA;&#xD;&#xA;# dotfiles in the repo root&#xD;&#xA;/.*&#xD;&#xA;```&#xD;&#xA;Then I built template:v1 docker image:&#xD;&#xA;`docker build -f Dockerfile.template -t gcr.io/paid-network-202104/template:v1 .`&#xD;&#xA;&#xD;&#xA;because this template:v1 image is huge(11.3GB), it is okay to use it locally without pushing it to the cloud.&#xD;&#xA;&#xD;&#xA;My third and final docker image should be slim:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/template:v1 as builder&#xD;&#xA;&#xD;&#xA;FROM debian:latest&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slimHi @pepoviola, I logged into that image then ran&#xD;&#xA;&#xD;&#xA;root@23006a9e7a5d:/# /target/release/parachain-collator&#xD;&#xA;Error: Input(&quot;Relay chain argument error: Invalid input: `rococo-local` only supported with `rococo-native` feature enabled.&quot;)&#xD;&#xA;2022-05-19 11:31:21 Parachain Collator Template&#xD;&#xA;2022-05-19 11:31:21 ✌️  version 0.1.0-unknown-x86_64-linux-gnu&#xD;&#xA;2022-05-19 11:31:21 ❤️  by Anonymous, 2020-2022&#xD;&#xA;2022-05-19 11:31:21  Chain specification: Local Testnet&#xD;&#xA;2022-05-19 11:31:21   Node name: hypnotic-glue-7138&#xD;&#xA;2022-05-19 11:31:21  Role: FULL&#xD;&#xA;2022-05-19 11:31:21  Database: RocksDb at /root/.local/share/parachain-collator/chains/local_testnet/db/full&#xD;&#xA;2022-05-19 11:31:21 ⛓  Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)&#xD;&#xA;2022-05-19 11:31:21 assembling new collators for new session 0 at #0&#xD;&#xA;2022-05-19 11:31:21 assembling new collators for new session 1 at #0&#xD;&#xA;root@23006a9e7a5d:/# ls&#xD;&#xA;&#xD;&#xA;# v1&#xD;&#xA;# compiled binaries are in ./builds/collator&#xD;&#xA;COPY --from=builder ./builds/collator/target/release/parachain-collator ./target/release/&#xD;&#xA;&#xD;&#xA;COPY ./polkadot-launch ./polkadot-launch&#xD;&#xA;RUN ls&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;then I built it: `docker build -f Dockerfile.slim -t gcr.io/paid-network-202104/template:slim1 .`&#xD;&#xA;&#xD;&#xA;and pushed the new template:slim1 image to the cloud.&#xD;&#xA;&#xD;&#xA;Now I am ready for Zombienet...&#xD;&#xA;&#xD;&#xA;This Substrate-Parachain-Template uses Cumulus, so I set:&#xD;&#xA;`cumulus_based = true` in my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/template:slim1&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;With the test file:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z04-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;#alice: parachain 2000 block height is at least 10 within 250 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# histogram&#xD;&#xA;#alice: reports histogram polkadot_pvf_execution_time has at least 2 samples in buckets [&quot;0.1&quot;, &quot;0.25&quot;, &quot;0.5&quot;, &quot;+Inf&quot;] within 100 seconds&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With the latest zombienet-linux v1.2.34, I ran it: `./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature`&#xD;&#xA;&#xD;&#xA;The result:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;		 Using temporary directory: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec  --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-2 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec --chain /cfg/rococo-local-2000-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-2000-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000-plain.json as:cdf720a7997f3f77d6e2509edff0820ba3af8eafaf59de281eabe9aa79e5dfac&#xD;&#xA;		temp-2 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json as:60698b4418761572cdb18c86cbd4ea87fe643ba8e77ffc38965b822f5c50d952&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-plain.json as:00de39b17f790e9209b5ca034e123711974a556cad8b2519269e00965b5ceb8c&#xD;&#xA;		temp-3 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local.json as:74e1ac30e59861832272c2925e9d22c7bb63f47ae10e8010d8bd3b59e24996ce&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/zombie-wrapper.sh as:80d9cdcda7802f9a0fbab8739bf5ab65556f4d6606dd81606529f8b3dc141768&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/paid-network-202104/template:slim1&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --name collator01 --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --chain /cfg/rococo-local-2000.json --base-path /data --listen-addr /ip4/0.0.0.0/tcp/37663/ws --ws-port 39025 --prometheus-external --prometheus-port 44123 --alice --collator --force-authoring --jaeger-agent localhost:6831 -- --chain /cfg/rococo-local.json --execution wasm --port 45187 --ws-port 44467 --rpc-port 40445&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.8/tcp/30333/ws/p2p/12D3KooWAieokPB4zt3dJJokhVZw8KoQuTgXEEyempJtr6pGkhrd&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;---------------------------------------https://docs.docker.com/engine/reference/builder/#expose--&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-c1812f6eb712223f7cdb3e97384732a7 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A38615#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:46855/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A36869#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:34721/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;	 Parachain chainSpecPath path: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41975/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-19 15:02:07        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2702ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (69ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (64ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (60ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-19 15:04:40        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-19 15:05:01        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-19 15:05:11        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:38615: 1000:: Normal connection closure&#xD;&#xA;2022-05-19 15:05:19        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  8 passing (6m)&#xD;&#xA;  3 failing&#xD;&#xA;&#xD;&#xA;  1) small network( Small Network test )&#xD;&#xA;       alice: parachain 2000 block height is at least 6 within 150 seconds:&#xD;&#xA;&#xD;&#xA;      AssertionError: expected 0 to be at least 6&#xD;&#xA;      + expected - actual&#xD;&#xA;&#xD;&#xA;      -0&#xD;&#xA;      +6&#xD;&#xA;      &#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:265:37&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  2) small network( Small Network test )&#xD;&#xA;       bob: system event contains &quot;A candidate was included&quot; within 20 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  3) small network( Small Network test )&#xD;&#xA;       alice: system event matches glob &quot;*was backed*&quot; within 10 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;```&#xD;&#xA;From above you can see the&#xD;&#xA;&#xD;&#xA; - relaychain alice node test: ok&#xD;&#xA; - relaychain bob node test: ok&#xD;&#xA; - parachain 2000 is registered: ok&#xD;&#xA; - 3 log tests: ok&#xD;&#xA; - parachain 2000 block height test: failed!!?? Why did that fail?&#xD;&#xA;&#xD;&#xA;I know the error 2) and 3) are caused by error 1), the block height test failure.&#xD;&#xA;&#xD;&#xA;Why was the parachain collator not producing blocks? &#xD;&#xA;&#xD;&#xA;When I checked the collator logs via `kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7`, the terminal returned nothing just like nothing happened!!??&#xD;&#xA;&#xD;&#xA;When clicking on the Collator Node direct link: `https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer `, my browser could not connect to that collator node at all...&#xD;&#xA;&#xD;&#xA;The docker &quot;EXPOSE&quot; does not actually publish the port according to &#xD;&#xA;https://docs.docker.com/engine/reference/builder/#expose&#xD;&#xA;And adding this to the network definition file didn't work:&#xD;&#xA;```&#xD;&#xA;args = [&quot;-p 30333:30333/tcp&quot;, &quot;-p 9933:9933/tcp&quot;, &quot;-p 9944:9944/tcp&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I logged into that image via `docker run -it 2647e63e75ee /bin/bash`, then ran `/target/release/parachain-collator`, I got this error: &#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;Relay chain argument error: Invalid input: `rococo-local` only supported with `rococo-native` feature enabled.&quot;)&#xD;&#xA;```&#xD;&#xA;See the whole terminal:&#xD;&#xA;```&#xD;&#xA;root@23006a9e7a5d:/# /target/release/parachain-collator&#xD;&#xA;Error: Input('Relay chain argument error: Invalid input: &quot;rococo-local&quot; only supported with &quot;rococo-native&quot; feature enabled.')&#xD;&#xA;2022-05-19 11:31:21 Parachain Collator Template&#xD;&#xA;2022-05-19 11:31:21 ✌️  version 0.1.0-unknown-x86_64-linux-gnu&#xD;&#xA;2022-05-19 11:31:21 ❤️  by Anonymous, 2020-2022&#xD;&#xA;2022-05-19 11:31:21  Chain specification: Local Testnet&#xD;&#xA;2022-05-19 11:31:21   Node name: hypnotic-glue-7138&#xD;&#xA;2022-05-19 11:31:21  Role: FULL&#xD;&#xA;2022-05-19 11:31:21  Database: RocksDb at /root/.local/share/parachain-collator/chains/local_testnet/db/full&#xD;&#xA;2022-05-19 11:31:21 ⛓  Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)&#xD;&#xA;2022-05-19 11:31:21 assembling new collators for new session 0 at #0&#xD;&#xA;2022-05-19 11:31:21 assembling new collators for new session 1 at #0&#xD;&#xA;root@23006a9e7a5d:/#&#xD;&#xA;``` &#xD;&#xA;Please advise" ContentLicense="CC BY-SA 4.0" />
  <row Id="10238" PostHistoryTypeId="2" PostId="2735" RevisionGUID="d4414245-b01d-46b4-b0cf-7d3e2309b586" CreationDate="2022-05-19T12:08:24.900" UserId="464" Text="What is the best practice for upgrading boot nodes on a live chain ( if we don't have the node id file ) ? &#xD;&#xA;Just change the node id in the genesis file, recompile and upgrade all the bins ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10240" PostHistoryTypeId="1" PostId="2735" RevisionGUID="d4414245-b01d-46b4-b0cf-7d3e2309b586" CreationDate="2022-05-19T12:08:24.900" UserId="464" Text="Best practice upgrading bootnodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="10241" PostHistoryTypeId="3" PostId="2735" RevisionGUID="d4414245-b01d-46b4-b0cf-7d3e2309b586" CreationDate="2022-05-19T12:08:24.900" UserId="464" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10243" PostHistoryTypeId="2" PostId="2736" RevisionGUID="839ae5cd-dd34-4e10-90cb-23b97a383f15" CreationDate="2022-05-19T12:47:21.403" UserId="300" Text="I'm planning out next tier of testing a parachain after local testing. There is both Westend and Rococo testnets, but I'm not 100% sure what the differences are between the two of them.&#xD;&#xA;&#xD;&#xA;Which one (or perhaps which order?) is suggested for post-local parachain testing?&#xD;&#xA;&#xD;&#xA;Any other differences between Westend and Rococo that would be good to know?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10245" PostHistoryTypeId="1" PostId="2736" RevisionGUID="839ae5cd-dd34-4e10-90cb-23b97a383f15" CreationDate="2022-05-19T12:47:21.403" UserId="300" Text="Wider Parachain Testing: Westend or Rococo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10246" PostHistoryTypeId="3" PostId="2736" RevisionGUID="839ae5cd-dd34-4e10-90cb-23b97a383f15" CreationDate="2022-05-19T12:47:21.403" UserId="300" Text="|rococo|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10247" PostHistoryTypeId="2" PostId="2737" RevisionGUID="b4189697-df96-4c46-ab8c-56820f410a9c" CreationDate="2022-05-19T13:58:26.867" UserId="2187" Text="So from polkadot js (UI) while creating treasury proposal and want to make it recurring per cycle, you do you achieve that? Say set the segment input in the picture attached to any positive integer, the proposal will reoccur for that number of time per cycle[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Yuspo.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10249" PostHistoryTypeId="1" PostId="2737" RevisionGUID="b4189697-df96-4c46-ab8c-56820f410a9c" CreationDate="2022-05-19T13:58:26.867" UserId="2187" Text="Recurring Proposal on Substrate Frontend" ContentLicense="CC BY-SA 4.0" />
  <row Id="10250" PostHistoryTypeId="3" PostId="2737" RevisionGUID="b4189697-df96-4c46-ab8c-56820f410a9c" CreationDate="2022-05-19T13:58:26.867" UserId="2187" Text="|substrate-node|polkadot-js|transactions|substrate-front-end|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10251" PostHistoryTypeId="2" PostId="2738" RevisionGUID="f3221dcb-98ec-418b-b111-336a47077139" CreationDate="2022-05-19T14:17:48.033" UserId="2414" Text="I am working on connecting grafana to prometheus server for visualising node metrics&#xD;&#xA;I have been following the substrate docs https://docs.substrate.io/tutorials/v3/node-metrics/#configure-prometheus-to-&#xD;&#xA;&#xD;&#xA;I followed each step in docs as is but I am facing issue while connecting the Grafana to prometheus&#xD;&#xA;the error is &quot;Error reading Prometheus: Post &quot;https://localhost:9090/api/v1/query&quot;: dial tcp [::1]:9090: connect: connection refused&quot;&#xD;&#xA;&#xD;&#xA;I tried searching this issue but could not get anything relevant ,  has anyone done this before or can help me in understand If I am doing anything wrong or missing anything.  As I am following the above docs ,  I run the substrate node first, than prometheus server and than try to connect Grafana https://localhost:9090/&#xD;&#xA;I tried grafana local and cloud both for this[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/04Css.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10253" PostHistoryTypeId="1" PostId="2738" RevisionGUID="f3221dcb-98ec-418b-b111-336a47077139" CreationDate="2022-05-19T14:17:48.033" UserId="2414" Text="Error reading Prometheus: Post &quot;https://localhost:9090/api/v1/query&quot;: dial tcp [::1]:9090: connect: connection refused" ContentLicense="CC BY-SA 4.0" />
  <row Id="10254" PostHistoryTypeId="3" PostId="2738" RevisionGUID="f3221dcb-98ec-418b-b111-336a47077139" CreationDate="2022-05-19T14:17:48.033" UserId="2414" Text="|substrate-node|nodes|metrics|prometheus|telemetry|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10255" PostHistoryTypeId="2" PostId="2739" RevisionGUID="25069c12-3afc-47f1-bc4c-0c0cfd213d5f" CreationDate="2022-05-19T14:29:55.353" UserId="2408" Text="I have the following error while building:&#xD;&#xA;```&#xD;&#xA;error[E0599]: no function or associated item named `generate_with_phrase` found for struct `crain_pow::app::Pair` in the current scope&#xD;&#xA;   --&gt; node/src/service.rs:211:49&#xD;&#xA;    |&#xD;&#xA;211 |         let (pair, phrase, _) = crain_pow::app::Pair::generate_with_phrase(None);&#xD;&#xA;    |                                                       ^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `crain_pow::app::Pair`&#xD;&#xA;    |&#xD;&#xA;    = help: items from traits can only be used if the trait is in scope&#xD;&#xA;```&#xD;&#xA;A `Pair` type is declared using `app_crypto!` macro in another file:&#xD;&#xA;```&#xD;&#xA;pub mod app {&#xD;&#xA;	use sp_application_crypto::{app_crypto, sr25519};&#xD;&#xA;	use sp_core::crypto::KeyTypeId;&#xD;&#xA;&#xD;&#xA;	pub const ID: KeyTypeId = KeyTypeId(*b&quot;crn1&quot;);&#xD;&#xA;	app_crypto!(sr25519, ID);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Which enables another macro which implements the `generate_with_phrase` function (_code from substrate's github repo_):&#xD;&#xA;```&#xD;&#xA;/// Implements functions for the `Pair` trait when `feature = &quot;std&quot;` is enabled.&#xD;&#xA;#[doc(hidden)]&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;#[macro_export]&#xD;&#xA;macro_rules! app_crypto_pair_functions_if_std {&#xD;&#xA;	($pair:ty) =&gt; {&#xD;&#xA;		fn generate_with_phrase(password: Option&lt;&amp;str&gt;) -&gt; (Self, String, Self::Seed) {&#xD;&#xA;			let r = &lt;$pair&gt;::generate_with_phrase(password);&#xD;&#xA;			(Self(r.0), r.1, r.2)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn from_phrase(&#xD;&#xA;			phrase: &amp;str,&#xD;&#xA;			password: Option&lt;&amp;str&gt;,&#xD;&#xA;		) -&gt; Result&lt;(Self, Self::Seed), $crate::SecretStringError&gt; {&#xD;&#xA;			&lt;$pair&gt;::from_phrase(phrase, password).map(|r| (Self(r.0), r.1))&#xD;&#xA;		}&#xD;&#xA;	};&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I see that is requires `sp-application-crypto`'s `std` feature to be enabled (#[cfg(feature = &quot;std&quot;)]). So I enable it in my package's `Cargo.toml`:&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;sp-application-crypto = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;***snip***&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;sp-application-crypto/std&quot;, # enables sp-application-crypto/full_crypto as well&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;So the `std` (and `full_crypto` as well) feature requirement is satisfied. But I still get the error saying that `generate_with_phrase` function is not implemented.&#xD;&#xA;&#xD;&#xA;What might be the problem?&#xD;&#xA;&#xD;&#xA;(P.S. [This](https://github.com/paritytech/substrate/pull/5558/commits/ad83ed52f862357383f2d62f0202ed1277632fdb) is a MR adding that function long time ago into primitives)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10257" PostHistoryTypeId="1" PostId="2739" RevisionGUID="25069c12-3afc-47f1-bc4c-0c0cfd213d5f" CreationDate="2022-05-19T14:29:55.353" UserId="2408" Text="Problems With `app_crypto!` Macro" ContentLicense="CC BY-SA 4.0" />
  <row Id="10258" PostHistoryTypeId="3" PostId="2739" RevisionGUID="25069c12-3afc-47f1-bc4c-0c0cfd213d5f" CreationDate="2022-05-19T14:29:55.353" UserId="2408" Text="|cryptography|key|macro|coreprimitives|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10260" PostHistoryTypeId="2" PostId="2740" RevisionGUID="45517e6d-d3ad-4ebd-97b2-0361edef2df1" CreationDate="2022-05-19T15:37:26.097" UserId="28" Text="This kind of behavior is not available from the Treasury Pallet directly, but is something you could create using the Scheduler Pallet.&#xD;&#xA;&#xD;&#xA;On Kusama and Polkadot, the Scheduler is only accessible by governance, so to start, you would need to open a new Democracy proposal that looks like this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can see in this example, I have scheduled a **periodic** call, which will trigger every 1000 blocks a total of 10 times.&#xD;&#xA;&#xD;&#xA;That periodic call will be the treasury proposal you have in mind.&#xD;&#xA;&#xD;&#xA;Now this does not seem like a smart thing to do here, since this will simply trigger a new proposal, which will need to be approved and all that again.&#xD;&#xA;&#xD;&#xA;Instead, you may want to open something like a [Bounty](https://medium.com/polkadot-network/introducing-bounties-ahoy-d6aa18dce92b), where you can allocate all the funds needed up front, and the bounty curator can deliver payments on a regular schedule for work completed.&#xD;&#xA;&#xD;&#xA;But in general, for scheduling repeating tasks, the Scheduler Pallet is what you are looking for.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LXsZ6.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10262" PostHistoryTypeId="2" PostId="2741" RevisionGUID="ea936b8d-c1b7-4c8c-9604-520960c1533b" CreationDate="2022-05-19T16:57:47.880" UserId="29" Text="Below are some steps you can take to get the tests working **similar** to [the tutorial referenced](https://docs.substrate.io/how-to-guides/v3/testing/basics).&#xD;&#xA;&#xD;&#xA;1. Clone down the [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template):&#xD;&#xA;```sh&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Create a `MaxValue` constant in your pallet's runtime:&#xD;&#xA;&#xD;&#xA;pallets/template/src/lib.rs&#xD;&#xA;```rs&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;	/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;	type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;	#[pallet::constant]&#xD;&#xA;	type MaxValue: Get&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Create a `Total` storage item:&#xD;&#xA;&#xD;&#xA;pallets/template/src/lib.rs&#xD;&#xA;```rs&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn total)]&#xD;&#xA;pub type Total&lt;T&gt; = StorageValue&lt;_, u32&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;4. Create a `TotalUpdated` event:&#xD;&#xA;&#xD;&#xA;pallets/template/src/lib.rs&#xD;&#xA;```rs&#xD;&#xA;#[pallet::event]&#xD;&#xA;#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;pub enum Event&lt;T: Config&gt; {&#xD;&#xA;	/// Event documentation should end with an array that provides descriptive names for event&#xD;&#xA;	/// parameters. [something, who]&#xD;&#xA;	TotalUpdated(u32, T::AccountId),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;5. Create a `ValueBiggerThanMax` error:&#xD;&#xA;&#xD;&#xA;pallets/template/src/lib.rs&#xD;&#xA;```rs&#xD;&#xA;#[pallet::error]&#xD;&#xA;pub enum Error&lt;T&gt; {&#xD;&#xA;	/// Errors should have helpful documentation associated with them.&#xD;&#xA;	StorageOverflow,&#xD;&#xA;	/// Value must be &lt;= MaxValue constant&#xD;&#xA;	ValueBiggerThanMax&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;6. Create the `add_value` function:&#xD;&#xA;&#xD;&#xA;pallets/template/src/lib.rs&#xD;&#xA;```rs&#xD;&#xA;#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;pub fn add_value(origin: OriginFor&lt;T&gt;, value: u32) -&gt; DispatchResult {&#xD;&#xA;	let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;	ensure!(value &lt;= T::MaxValue::get(), Error::&lt;T&gt;::ValueBiggerThanMax);&#xD;&#xA;&#xD;&#xA;	// Read the total from storage.&#xD;&#xA;	match &lt;Total&lt;T&gt;&gt;::get() {&#xD;&#xA;		// Return an error if there is no total.&#xD;&#xA;		None =&gt; {&#xD;&#xA;			// If None, set storage to value&#xD;&#xA;			&lt;Total&lt;T&gt;&gt;::put(value);&#xD;&#xA;			// Emit an event.&#xD;&#xA;			Self::deposit_event(Event::TotalUpdated(value, who));&#xD;&#xA;			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;			Ok(())&#xD;&#xA;		},&#xD;&#xA;		// If total already exists, then get sum of value and total&#xD;&#xA;		Some(curr_total) =&gt; {&#xD;&#xA;			// Add the value to total&#xD;&#xA;			let new_total = curr_total.checked_add(value).ok_or(Error::&lt;T&gt;::StorageOverflow)?;&#xD;&#xA;			// Update the total in storage&#xD;&#xA;			&lt;Total&lt;T&gt;&gt;::put(new_total);&#xD;&#xA;			// Emit an event.&#xD;&#xA;			Self::deposit_event(Event::TotalUpdated(new_total, who));&#xD;&#xA;			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;			Ok(())&#xD;&#xA;		},&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;7. Okay now let's setup the mock for our tests. Let's give our pallet a name so we can reference it in our mock file. Add this to line 1 of our mock file:&#xD;&#xA;&#xD;&#xA;pallets/template/src/mock.rs&#xD;&#xA;```rs&#xD;&#xA;use crate as pallet_template;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;8. Next let's configure our pallet to work with our mock:&#xD;&#xA;&#xD;&#xA;pallets/template/src/mock.rs&#xD;&#xA;```rs&#xD;&#xA;frame_support::parameter_types! {&#xD;&#xA;    pub const MaxValue: u32 = 50;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_template::Config for Test {&#xD;&#xA;    type Event = Event;&#xD;&#xA;    type MaxValue = MaxValue;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;9. And configure the mock runtime to work with our pallet:&#xD;&#xA;&#xD;&#xA;pallets/template/src/mock.rs&#xD;&#xA;```rs&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;},&#xD;&#xA;		TemplateModule: pallet_template::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;10. Create the tests!&#xD;&#xA;&#xD;&#xA;pallets/template/src/tests.rs&#xD;&#xA;```rs&#xD;&#xA;use crate::{mock::*, Error};&#xD;&#xA;use frame_support::{assert_ok, assert_err};&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn test_add_value() {&#xD;&#xA;    new_test_ext().execute_with(|| {&#xD;&#xA;        assert_ok!(TestingPallet::add_value(Origin::signed(1), 10));&#xD;&#xA;		assert_eq!(TestingPallet::total(), Some(10));&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn test_multiple_add_value() {&#xD;&#xA;    new_test_ext().execute_with(|| {&#xD;&#xA;        assert_ok!(TestingPallet::add_value(Origin::signed(1), 10));&#xD;&#xA;		assert_ok!(TestingPallet::add_value(Origin::signed(1), 20));&#xD;&#xA;		assert_eq!(TestingPallet::total(), Some(30));&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn test_max_value() {&#xD;&#xA;    new_test_ext().execute_with(|| {&#xD;&#xA;        assert_err!(&#xD;&#xA;            TestingPallet::add_value(Origin::signed(1), 51), &#xD;&#xA;			Error::&lt;Test&gt;::ValueBiggerThanMax&#xD;&#xA;        );&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;11. Finally, in our runtime let's make sure we support the `MaxValue` that we created in our config earlier.&#xD;&#xA;&#xD;&#xA;runtime/src/lib.rs&#xD;&#xA;```rs&#xD;&#xA;parameter_types! {&#xD;&#xA;    pub const MaxValue: u32 = 50;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Configure the pallet-template in pallets/template.&#xD;&#xA;impl pallet_template::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type MaxValue = MaxValue;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We can now test by running the following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo test&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should get some green like this:&#xD;&#xA;```sh&#xD;&#xA;test tests::test_max_value ... ok&#xD;&#xA;test tests::test_add_value ... ok&#xD;&#xA;test tests::test_multiple_add_value ... ok&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Full working code [here](https://github.com/brunopgalvao/substrate-node-template-testing-001)." ContentLicense="CC BY-SA 4.0" />
  <row Id="10264" PostHistoryTypeId="52" PostId="2730" RevisionGUID="6196a6dc-09b8-48a5-85cb-020bac34ccc4" CreationDate="2022-05-19T17:02:21.117" />
  <row Id="10265" PostHistoryTypeId="2" PostId="2742" RevisionGUID="5c1d8d7f-e794-4281-a843-20c6f4e8b791" CreationDate="2022-05-19T17:05:52.863" UserId="494" Text="In the context of runtime, merkle tree traversal is costly because of the multiple database read/write operations that need to happen.&#xD;&#xA;&#xD;&#xA;In the context of a light client, each database read is accompanied by a networking round trip.&#xD;&#xA;&#xD;&#xA;If the runtime is optimized for storage read/write, it can also be considered optimized for light clients." ContentLicense="CC BY-SA 4.0" />
  <row Id="10267" PostHistoryTypeId="2" PostId="2743" RevisionGUID="42f6ef36-2f29-4cc6-84aa-b58eb06d89e2" CreationDate="2022-05-19T17:18:46.107" UserId="2581" Text="I am trying to call api.events.staking.Withdrawn.is in polkadot.js/api.&#xD;&#xA;&#xD;&#xA;Docs: https://polkadot.js.org/docs/substrate/events#withdrawnaccountid32-u128&#xD;&#xA;&#xD;&#xA;Code sandbox: https://codesandbox.io/s/hardcore-architecture-vrhyqm?file=/index.js&#xD;&#xA;&#xD;&#xA;It is not working and causing isssue." ContentLicense="CC BY-SA 4.0" />
  <row Id="10269" PostHistoryTypeId="1" PostId="2743" RevisionGUID="42f6ef36-2f29-4cc6-84aa-b58eb06d89e2" CreationDate="2022-05-19T17:18:46.107" UserId="2581" Text="Events in Polkadot.js/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="10270" PostHistoryTypeId="3" PostId="2743" RevisionGUID="42f6ef36-2f29-4cc6-84aa-b58eb06d89e2" CreationDate="2022-05-19T17:18:46.107" UserId="2581" Text="|polkadot|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10271" PostHistoryTypeId="2" PostId="2744" RevisionGUID="f26ace90-547c-4e8e-aa73-5e2138d76ccc" CreationDate="2022-05-19T17:34:36.480" UserId="28" Text="The issue here seems to be with how you are importing this crate.&#xD;&#xA;&#xD;&#xA;Rust's feature system is quite strange in behavior, and if there is any situation where you try to use the `app_crypto!` macro outside of `std`, you will hit this kind of error.&#xD;&#xA;&#xD;&#xA;I suggest that you simply import this crate like so:&#xD;&#xA;&#xD;&#xA;```lang-toml&#xD;&#xA;[dependencies]&#xD;&#xA;sp-application-crypto = { version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.19&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which involves no features at all, and due to the [configuration of the `sp-application-crypto`](https://github.com/paritytech/substrate/blob/master/primitives/application-crypto/Cargo.toml), this will imply `std` by default." ContentLicense="CC BY-SA 4.0" />
  <row Id="10273" PostHistoryTypeId="6" PostId="2743" RevisionGUID="ab516ddd-3a22-4676-919b-43f9acb29587" CreationDate="2022-05-19T17:36:36.620" UserId="28" Comment="edited tags" Text="|polkadot-js|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10274" PostHistoryTypeId="5" PostId="2743" RevisionGUID="9d6f3bf5-473d-4428-aeef-d06d623996d4" CreationDate="2022-05-19T17:42:19.420" UserId="2581" Comment="added 1412 characters in body" Text="I am trying to call api.events.staking.Withdrawn.is in polkadot.js/api.&#xD;&#xA;&#xD;&#xA;Docs: https://polkadot.js.org/docs/substrate/events#withdrawnaccountid32-u128&#xD;&#xA;&#xD;&#xA;Code sandbox: https://codesandbox.io/s/hardcore-architecture-vrhyqm?file=/index.js&#xD;&#xA;&#xD;&#xA;It is not working and causing isssue.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const provider = new WsProvider(&quot;wss://kusama-rpc.polkadot.io&quot;);&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;const validator = &quot;CaKh7HmPMXxv22GnLgjEZxWHBUu7y7Twf2k8mP3mxpLYTH4&quot;;&#xD;&#xA;const response = await api.events.staking.Withdrawn.is(validator, &quot;50&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error&#xD;&#xA;```&#xD;&#xA;2022-05-19 17:41:35        API/INIT: RPC methods not decorated: mmr_generateBatchProof&#xD;&#xA;(node:2206) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined&#xD;&#xA;    at Object.is (/sandbox/node_modules/@polkadot/types/cjs/metadata/decorate/events/index.js:44:60)&#xD;&#xA;    at Server.&lt;anonymous&gt; (/sandbox/index.js:10:57)&#xD;&#xA;    at processTicksAndRejections (internal/process/task_queues.js:95:5)&#xD;&#xA;(Use `node --trace-warnings ...` to show where the warning was created)&#xD;&#xA;(node:2206) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)&#xD;&#xA;(node:2206) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10275" PostHistoryTypeId="2" PostId="2745" RevisionGUID="9708fcf1-cd28-47b7-ae35-c471ae9f1e6e" CreationDate="2022-05-19T17:57:25.833" UserId="609" Text="Could it be that you are passing the &quot;amount&quot; argument as a 'string' in api.events.staking.Withdrawn.is(validator, &quot;50&quot;) ?&#xD;&#xA;&#xD;&#xA;According to the docs it should be a u128, or in js, I think it a 'number'." ContentLicense="CC BY-SA 4.0" />
  <row Id="10277" PostHistoryTypeId="2" PostId="2746" RevisionGUID="0a6d3163-2113-4242-9b5a-c1279019cf9d" CreationDate="2022-05-19T17:59:46.093" UserId="627" Text="The `api.event.&lt;pallet&gt;.&lt;event&gt;.is(Event)` is not used to create an event, rather it is used to check if an emitted event is of a specific type, returning true if this is the case. Additionally the `api.event.&lt;pallet&gt;.&lt;event&gt;` exposed the metadata for the event, so the signature [looks like this](https://github.com/polkadot-js/api/blob/baa2caae686b725a9c71cd147bdb138dd3c390f2/packages/types/src/metadata/decorate/types.ts#L19-L23) -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;interface IsEvent &lt;T extends AnyTuple&gt; {&#xD;&#xA;  readonly meta: EventMetadataLatest;&#xD;&#xA;&#xD;&#xA;  is: (event: IEvent&lt;AnyTuple&gt;) =&gt; event is IEvent&lt;T&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Assuming you have read `query.system.events` and you have an `Vec&lt;EventRecord&gt;`, you can use this to iterate through and check if an event is a specific type. (Alternatively you can always look for the `section` &amp; `method` on this event and do string matching)&#xD;&#xA;&#xD;&#xA;On the middleware/API side, you never need to create events - these are only emitted by the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="10283" PostHistoryTypeId="2" PostId="2748" RevisionGUID="afd2d77e-6ddb-44a8-ba7c-a542571d99bc" CreationDate="2022-05-19T21:42:26.713" UserId="172" Text="The guide you're referencing assumes you have some pallet with that dispatchable to test. Bruno's response gives all the context you need but this may help others too. &#xD;&#xA;&#xD;&#xA;As the guide specifies, it assumes that:&#xD;&#xA;&gt; there's some arbitrary pallet — called `pallet-testing` — that takes an `origin` and a `u32` and returns `Ok(())` if the value is less than or equal to a constant called `MaxValue` [... and contains] a single function called `add_value`.&#xD;&#xA;&#xD;&#xA;The point of this guide is to show the basic pattern of setting up a test for any dispatchable call.&#xD;&#xA;So in order to mirror the guide, this &quot;arbitrary&quot; function `add_function` would look like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    #[pallet::weight(0)]&#xD;&#xA;&#xD;&#xA;    pub fn add_value(origin: OriginFor&lt;T&gt;, val_to_add: u32) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;        let _ = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;        ensure!(&#xD;&#xA;            val_to_add &lt;= T::MaxAddend::get(),&#xD;&#xA;            &quot;value must be &lt;= maximum add amount constant&quot;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        // previous value got&#xD;&#xA;        let c_val = SingleValue::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;        // checks for overflow when new value added&#xD;&#xA;        let result = c_val.checked_add(val_to_add).ok_or(Error::&lt;T&gt;::Overflow)?;&#xD;&#xA;&#xD;&#xA;        // update storage&#xD;&#xA;        &lt;SingleValue&lt;T&gt;&gt;::put(result);&#xD;&#xA;&#xD;&#xA;        // deposit event&#xD;&#xA;        Self::deposit_event(Event::Added(c_val, val_to_add, result));&#xD;&#xA;        Ok(().into())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Further, for it to work exactly as the guide shows, you'd also need to: &#xD;&#xA;* Update your pallet's configuration trait to include `type MaxAddend: Get&lt;u32&gt;;`&#xD;&#xA;* Rename the pallet to `pallet_testing`&#xD;&#xA;* Update your runtime configuration" ContentLicense="CC BY-SA 4.0" />
  <row Id="10286" PostHistoryTypeId="2" PostId="2749" RevisionGUID="dfe1cc45-f32a-4559-881f-b0fe272069f5" CreationDate="2022-05-20T00:55:25.690" UserId="344" Text="This is how to get the free balance of an account:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.query.system.account(stash_account_address).data.free.toBigInt()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to get the bonded balance instead?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10288" PostHistoryTypeId="1" PostId="2749" RevisionGUID="dfe1cc45-f32a-4559-881f-b0fe272069f5" CreationDate="2022-05-20T00:55:25.690" UserId="344" Text="get bonded balance using API" ContentLicense="CC BY-SA 4.0" />
  <row Id="10289" PostHistoryTypeId="3" PostId="2749" RevisionGUID="dfe1cc45-f32a-4559-881f-b0fe272069f5" CreationDate="2022-05-20T00:55:25.690" UserId="344" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10290" PostHistoryTypeId="2" PostId="2750" RevisionGUID="cc397077-5121-43ca-979c-5f1462398ef5" CreationDate="2022-05-20T01:16:06.327" UserId="2584" Text="Get &quot;Contract.ContractTrapped&quot; erro when call new &quot;xxx&quot; contract from inside an depolyed contract in substrate of Shibuya testnet, bellow is my detailed operation:&#xD;&#xA;&#xD;&#xA;1、Here are two related Contracts compiled by solang compiler scheduled to run in subsrate wasm of Shiybuya testnet&#xD;&#xA;2、Contract B can be created by a specific interface of Contract A via new ContractB&#xD;&#xA;3、Call the said interface shall be failed end up with 'Contract.ContractTrapped' error&#xD;&#xA;&#xD;&#xA;I'm not sure if the error is caused by solang or the substarte runtime in Shibuya network, so could anyone konw that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10292" PostHistoryTypeId="1" PostId="2750" RevisionGUID="cc397077-5121-43ca-979c-5f1462398ef5" CreationDate="2022-05-20T01:16:06.327" UserId="2584" Text="Get &quot;Contract.ContractTrapped&quot; error in Shibuya wasm" ContentLicense="CC BY-SA 4.0" />
  <row Id="10293" PostHistoryTypeId="3" PostId="2750" RevisionGUID="cc397077-5121-43ca-979c-5f1462398ef5" CreationDate="2022-05-20T01:16:06.327" UserId="2584" Text="|wasm|solang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10294" PostHistoryTypeId="52" PostId="2743" RevisionGUID="54ba3537-d9db-43e0-b603-2119e6190e8e" CreationDate="2022-05-20T01:19:03.687" />
  <row Id="10295" PostHistoryTypeId="6" PostId="2684" RevisionGUID="39957ae8-c357-4745-85c1-d447fea916ee" CreationDate="2022-05-20T01:26:53.857" UserId="244" Comment="add new tag: migration" Text="|runtime|runtime-upgrade|frontier|migration|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10296" PostHistoryTypeId="2" PostId="2751" RevisionGUID="3f545cb6-64cb-46b2-9767-87032ac1206b" CreationDate="2022-05-20T01:40:11.740" UserId="28" Text="To get a bunch of metadata about the a users staking configuration, you can do:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.derive.staking.account(stash_account_address)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This returns an object like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;{&#xD;&#xA;  \&quot;nextSessionIds\&quot;: [],&#xD;&#xA;  \&quot;sessionIds\&quot;: [],&#xD;&#xA;  \&quot;accountId\&quot;: \&quot;..\&quot;,&#xD;&#xA;  \&quot;controllerId\&quot;: \&quot;..\&quot;,&#xD;&#xA;  \&quot;exposure\&quot;: {&#xD;&#xA;    \&quot;total\&quot;: 0,&#xD;&#xA;    \&quot;own\&quot;: 0,&#xD;&#xA;    \&quot;others\&quot;: []&#xD;&#xA;  },&#xD;&#xA;  \&quot;nominators\&quot;: [ ... ],&#xD;&#xA;  \&quot;rewardDestination\&quot;: {&#xD;&#xA;    \&quot;staked\&quot;: null&#xD;&#xA;  },&#xD;&#xA;  \&quot;stakingLedger\&quot;: {&#xD;&#xA;    \&quot;stash\&quot;: \&quot;...\&quot;,&#xD;&#xA;    \&quot;total\&quot;: 223370014049,&#xD;&#xA;    \&quot;active\&quot;: 223370014049,&#xD;&#xA;    \&quot;unlocking\&quot;: [],&#xD;&#xA;    \&quot;claimedRewards\&quot;: []&#xD;&#xA;  },&#xD;&#xA;  \&quot;stashId\&quot;: \&quot;...\&quot;,&#xD;&#xA;  \&quot;validatorPrefs\&quot;: {&#xD;&#xA;    \&quot;commission\&quot;: 0,&#xD;&#xA;    \&quot;blocked\&quot;: false&#xD;&#xA;  },&#xD;&#xA;  \&quot;redeemable\&quot;: \&quot;0x00000000000000000000000000000000\&quot;&#xD;&#xA;}&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this case `stakingLedger.total` will be the total balance bonded in Staking. `stakingLedger.active` will be the amount actively bonded, and `stakingLedger.unlocking` will note whatever amounts are waiting to be unbonded.&#xD;&#xA;&#xD;&#xA;If you want to query this stuff directly, you need to look inside the `staking` pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.query.staking.ledger(stash_account_address)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where you will get just:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;{&#xD;&#xA;  \&quot;stash\&quot;: \&quot;EGVQCe73TpFyAZx5uKfE1222XfkT3BSKozjgcqzLBnc5eYo\&quot;,&#xD;&#xA;  \&quot;total\&quot;: 1899823370014049,&#xD;&#xA;  \&quot;active\&quot;: 1899823370014049,&#xD;&#xA;  \&quot;unlocking\&quot;: [],&#xD;&#xA;  \&quot;claimedRewards\&quot;: [ ... ]&#xD;&#xA;}&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10298" PostHistoryTypeId="5" PostId="2642" RevisionGUID="10bdd24d-6566-4d00-b1e4-e106e4e6ad11" CreationDate="2022-05-20T02:04:21.237" UserId="85" Comment="added 202 characters in body" Text="Here's ZK proofs explained in ways everyone can understand:&#xD;&#xA;&#xD;&#xA;https://www.youtube.com/watch?v=fOGdb1CTu5c&#xD;&#xA;&#xD;&#xA;For news on ZK there is the excellent [zk podcast][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://zeroknowledge.fm/" ContentLicense="CC BY-SA 4.0" />
  <row Id="10299" PostHistoryTypeId="24" PostId="2642" RevisionGUID="10bdd24d-6566-4d00-b1e4-e106e4e6ad11" CreationDate="2022-05-20T02:04:21.237" Comment="Proposed by 85 approved by 34 edit id of 197" ContentLicense="CC BY-SA 4.0" />
  <row Id="10300" PostHistoryTypeId="6" PostId="2738" RevisionGUID="ffd6a4fc-0d9a-44d3-98f3-ba9fe9968b8e" CreationDate="2022-05-20T02:07:05.637" UserId="34" Comment="edited tags" Text="|metrics|prometheus|telemetry|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10301" PostHistoryTypeId="2" PostId="2752" RevisionGUID="db90a1a7-8991-4fad-9789-ddede4ce8c52" CreationDate="2022-05-20T02:47:02.557" UserId="34" Text="Use http://localhost:9090 for graphana settings is what you need, I can reproduce the error you are seeing with the https endpoint as described in the tutorial. Here is it working:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9T54K.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/iUSKU.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10303" PostHistoryTypeId="10" PostId="2738" RevisionGUID="ce310752-fc07-4d55-a56b-11fbc312db02" CreationDate="2022-05-20T02:56:46.773" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="10305" PostHistoryTypeId="2" PostId="2753" RevisionGUID="98fe3835-8d9b-45fa-a5d8-0a5d1504fb0f" CreationDate="2022-05-20T03:41:26.870" UserId="2581" Text="I want to get events list by using polkadot.js/api.&#xD;&#xA;&#xD;&#xA;I can see api.query.system.events() in docs.&#xD;&#xA;&#xD;&#xA;Docs: https://polkadot.js.org/docs/substrate/storage#eventcount-u32&#xD;&#xA;&#xD;&#xA;However, this api lists events for current block only.&#xD;&#xA;&#xD;&#xA;Is there any api to get list of events for specific block height? or range of blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10307" PostHistoryTypeId="1" PostId="2753" RevisionGUID="98fe3835-8d9b-45fa-a5d8-0a5d1504fb0f" CreationDate="2022-05-20T03:41:26.870" UserId="2581" Text="Browse events in Polkadot.js/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="10308" PostHistoryTypeId="3" PostId="2753" RevisionGUID="98fe3835-8d9b-45fa-a5d8-0a5d1504fb0f" CreationDate="2022-05-20T03:41:26.870" UserId="2581" Text="|polkadot-js|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10309" PostHistoryTypeId="2" PostId="2754" RevisionGUID="5f9fcb8e-2ec0-41ba-84fe-02873591edab" CreationDate="2022-05-20T04:01:35.883" UserId="627" Text="For events (or any queries) at a specific point in the chain -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// Get an API decorated at a specific point. This will -&#xD;&#xA;//   - connect&#xD;&#xA;//.  - retrieve the metadata&#xD;&#xA;//.  - decorate the API based on what is available&#xD;&#xA;//.  - make any state queries at that point&#xD;&#xA;const at = await api.at(blockHash);&#xD;&#xA;&#xD;&#xA;// any queries now made will be at that point&#xD;&#xA;const events = at.query.system.events();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Previously (it is now deprecated, but still available, i.e. not removed), you could also do `await api.query.syste.events.at(blockHash)`. Internally this form would also use the `api.at(blockHash)` detailed above. The `api.at` form is preferred since it re-decorates the API at that runtime point, while the older form would assume the state endpoints are the same." ContentLicense="CC BY-SA 4.0" />
  <row Id="10311" PostHistoryTypeId="2" PostId="2755" RevisionGUID="88f391f2-248e-4744-b4d5-f8101171b114" CreationDate="2022-05-20T04:11:27.820" UserId="2578" Text="Setting up [Substrate-Archive](https://github.com/paritytech/substrate-archive) for the first time. Tutorial/Wiki is a bit outdated. Following [this](https://github.com/paritytech/substrate-archive/issues/423) solution that I found in the issues. Compiled and ran; however, I got an issue that I believe is MAC related.&#xD;&#xA;&#xD;&#xA;Solution:&#xD;&#xA;&#xD;&#xA;`1. Run docker-compose up -d to start postgres and pgadmin`&#xD;&#xA;&#xD;&#xA;`2. Run DATABASE_URL=postgres://postgres:123@localhost:6432/local_chain_db sqlx database create in substrate-archive/src to create the database.`&#xD;&#xA;&#xD;&#xA;```3. Run DATABASE_URL=postgres://postgres:123@localhost:6432/local_chain_db sqlx migrate run in substrate-archive/src` to create the tables.```&#xD;&#xA;&#xD;&#xA;`4. Run cargo run --release -- -c archive.toml in bin/node-template-archive/ to start indexing. Keep in mind to modify the archive.toml configs.`&#xD;&#xA;&#xD;&#xA;Ran step 4 and received the following error:&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;&#xD;&#xA;```Error: Failed to create RocksDB directory: `Os { code: 30, kind: ReadOnlyFilesystem, message: &quot;Read-only file system&quot; }`.```&#xD;&#xA;&#xD;&#xA;Is there a workaround? Thank you.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10313" PostHistoryTypeId="1" PostId="2755" RevisionGUID="88f391f2-248e-4744-b4d5-f8101171b114" CreationDate="2022-05-20T04:11:27.820" UserId="2578" Text="Substrate-Archive, workaround for MAC?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10314" PostHistoryTypeId="3" PostId="2755" RevisionGUID="88f391f2-248e-4744-b4d5-f8101171b114" CreationDate="2022-05-20T04:11:27.820" UserId="2578" Text="|substrate-archive|indexing|archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10315" PostHistoryTypeId="5" PostId="2755" RevisionGUID="d02d7271-d121-45c0-bca5-fac747b53cbe" CreationDate="2022-05-20T04:11:59.363" UserId="2578" Comment="deleted 2 characters in body" Text="Setting up [Substrate-Archive](https://github.com/paritytech/substrate-archive) for the first time. Tutorial/Wiki is a bit outdated. Following [this](https://github.com/paritytech/substrate-archive/issues/423) solution that I found in &quot;issues&quot;. Compiled and ran; however, I got an issue that I believe is MAC related.&#xD;&#xA;&#xD;&#xA;Solution:&#xD;&#xA;&#xD;&#xA;`1. Run docker-compose up -d to start postgres and pgadmin`&#xD;&#xA;&#xD;&#xA;`2. Run DATABASE_URL=postgres://postgres:123@localhost:6432/local_chain_db sqlx database create in substrate-archive/src to create the database.`&#xD;&#xA;&#xD;&#xA;```3. Run DATABASE_URL=postgres://postgres:123@localhost:6432/local_chain_db sqlx migrate run in substrate-archive/src` to create the tables.```&#xD;&#xA;&#xD;&#xA;`4. Run cargo run --release -- -c archive.toml in bin/node-template-archive/ to start indexing. Keep in mind to modify the archive.toml configs.`&#xD;&#xA;&#xD;&#xA;Ran step 4 and received the following error:&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;&#xD;&#xA;```Error: Failed to create RocksDB directory: `Os { code: 30, kind: ReadOnlyFilesystem, message: &quot;Read-only file system&quot; }`.```&#xD;&#xA;&#xD;&#xA;Is there a workaround? Thank you.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10321" PostHistoryTypeId="2" PostId="2757" RevisionGUID="4688388f-c84b-435c-9511-71490d4ad152" CreationDate="2022-05-20T05:39:18.957" UserId="2585" Text="I have an account created with ParitySigner.&#xD;&#xA;I am trying to add an account with a QR code to Polkadot.js and transfer money from that account with ParitySigner.&#xD;&#xA;&#xD;&#xA;However, when I read the QR code in ParitySigner for signing, I get the following error: `Bad input data.&#xD;&#xA;&#xD;&#xA;Bad input data. input generated within unknown network and could not be processed add network with genesis hash xxxx and encryption sr25519`.&#xD;&#xA;&#xD;&#xA;What do I need to do to transfer money with Polkadot.js?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10323" PostHistoryTypeId="1" PostId="2757" RevisionGUID="4688388f-c84b-435c-9511-71490d4ad152" CreationDate="2022-05-20T05:39:18.957" UserId="2585" Text="Parity signer fails to sign transaction with polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="10324" PostHistoryTypeId="3" PostId="2757" RevisionGUID="4688388f-c84b-435c-9511-71490d4ad152" CreationDate="2022-05-20T05:39:18.957" UserId="2585" Text="|polkadot-js|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10325" PostHistoryTypeId="5" PostId="2757" RevisionGUID="456b8d83-cca9-48f2-b3c7-dcae264a90eb" CreationDate="2022-05-20T05:40:49.950" UserId="2585" Comment="added 10 characters in body" Text="I have an account created with ParitySigner.&#xD;&#xA;I am trying to add an account with a QR code to Polkadot.js and transfer money from that account with ParitySigner.&#xD;&#xA;&#xD;&#xA;However, when I read the QR code in ParitySigner for signing, I get the following error: `Bad input data.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Bad input data. input generated within unknown network and could not be processed add network with genesis hash xxxx and encryption sr25519`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What do I need to do to transfer money with Polkadot.js?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10326" PostHistoryTypeId="5" PostId="2757" RevisionGUID="208858d2-445d-4aa7-881f-54297f93286a" CreationDate="2022-05-20T05:41:12.177" UserId="2585" Comment="added 1 character in body" Text="I have an account created with ParitySigner.&#xD;&#xA;I am trying to add an account with a QR code to Polkadot.js and transfer money from that account with ParitySigner.&#xD;&#xA;&#xD;&#xA;However, when I read the QR code in ParitySigner for signing, I get the following error: `Bad input data.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Bad input data. input generated within unknown network and could not be processed&#xD;&#xA;add network with genesis hash xxxx and encryption sr25519`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What do I need to do to transfer money with Polkadot.js?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10327" PostHistoryTypeId="10" PostId="2179" RevisionGUID="8cd26784-54f2-4c9f-8de0-1906e3ac20f7" CreationDate="2022-05-20T06:32:27.363" UserId="34" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:83,&quot;DisplayName&quot;:&quot;Luke Schoen&quot;}]}" />
  <row Id="10328" PostHistoryTypeId="2" PostId="2758" RevisionGUID="286ebaf4-5191-4c7b-bace-32c1c27ee656" CreationDate="2022-05-20T07:50:28.747" UserId="705" Text="As error message suggests, you need to add a network to Signer. Please follow the tutorial:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="10330" PostHistoryTypeId="2" PostId="2759" RevisionGUID="cf6f7128-9079-42bc-9345-2671f2c7726a" CreationDate="2022-05-20T08:45:28.397" UserId="179" Text="This is indeed a very good question.&#xD;&#xA;&#xD;&#xA;Rococo is the testnet for all parachains in the Ecosystem ([as announced on last Sub0 Conference][1]), and all teams that want to try out being a Parachain, or building on Polkadot, should connect to Rococo.&#xD;&#xA;&#xD;&#xA;**Rococo's objective**&#xD;&#xA;&#xD;&#xA;Polkadot has a different infrastructure than what legacy blockchains offer. Builders can build infrastructure, pallets, d(u)apps and parachains, so Rococo aims to be the place where all these builders come to test their builds. For that, it has all the features available on both Kusama and Polkadot (like HRMP and XCM), and even some experimental features, like Beefy.&#xD;&#xA;&#xD;&#xA;**How to connect to Rococo**&#xD;&#xA;&#xD;&#xA;Rococo has a special pallet called `assigned_slots` that works providing either long-lasting slots or short-lasting slots. As long as a team has a production network live (either Polkadot or Kusama), they will have a permanent slot on Rococo. This helps them build their ecosystems and fosters collaboration with other teams as well. On the other hand, if a team is not yet live, it will go to a pool of short-lasting slots, where at any moment in time 5 teams will be connected and they will onboard and offboard on a round-robin fashion.&#xD;&#xA;&#xD;&#xA;To connect to Rococo, you can [create an issue here][2]. If you are aiming for a short-lasting slot, you need to register your wasm and genesis on chain, then open an issue and have the team connect you. Otherwise, if you are aiming for a long-lasting slot, you will need to create the issue directly so that the team can force you to a specific paraID.&#xD;&#xA;&#xD;&#xA;**Westend**&#xD;&#xA;&#xD;&#xA;Finally, as a remark, Westend is a network where releases are finally tested before being launched on a production network. It was previously used to onboard parachains just before them being registered as parathreads on either Kusama/Polkadot, but with Rococo this is not being used anymore.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/blog/rococo-revamp-becoming-a-community-parachain-testbed/&#xD;&#xA;  [2]: https://github.com/paritytech/subport/issues/new/choose" ContentLicense="CC BY-SA 4.0" />
  <row Id="10332" PostHistoryTypeId="10" PostId="1801" RevisionGUID="b47d84e0-620c-40d5-b49c-27880a791f5f" CreationDate="2022-05-20T08:49:01.097" UserId="34" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;},{&quot;Id&quot;:104,&quot;DisplayName&quot;:&quot;Keith Yeung&quot;},{&quot;Id&quot;:172,&quot;DisplayName&quot;:&quot;Sacha Lansky&quot;},{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:83,&quot;DisplayName&quot;:&quot;Luke Schoen&quot;}]}" />
  <row Id="10333" PostHistoryTypeId="5" PostId="2754" RevisionGUID="fba90a85-a012-4eb0-b0af-144d842d675d" CreationDate="2022-05-20T08:59:03.527" UserId="627" Comment="Add missing await" Text="For events (or any queries) at a specific point in the chain -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// Get an API decorated at a specific point. This will -&#xD;&#xA;//   - connect&#xD;&#xA;//   - retrieve the metadata&#xD;&#xA;//   - decorate the API based on what is available&#xD;&#xA;//   - make any state queries at that point&#xD;&#xA;const at = await api.at(blockHash);&#xD;&#xA;&#xD;&#xA;// any queries now made will be at that point&#xD;&#xA;const events = await at.query.system.events();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Previously (it is now deprecated, but still available, i.e. not removed), you could also do `await api.query.syste.events.at(blockHash)`. Internally this form would also use the `api.at(blockHash)` detailed above. The `api.at` form is preferred since it re-decorates the API at that runtime point, while the older form would assume the state endpoints are the same." ContentLicense="CC BY-SA 4.0" />
  <row Id="10334" PostHistoryTypeId="5" PostId="1388" RevisionGUID="c6243227-35e5-4ebb-b3c4-feb88e20c81c" CreationDate="2022-05-20T08:59:15.127" UserId="83" Comment="Add backticks, capitalise, make more readable" Text="I want to integrate DOT into app based on React Native. There is a problem with a connection to the browser environment: `ReferenceError: Can't find variable: document`.&#xD;&#xA;A few more details:&#xD;&#xA;- The issues with the WebAssembly were solved using asm.js&#xD;&#xA;- The issue that remains is the linking to the browser environment: `ReferenceError: Can’t find variable: document`. &#xD;&#xA;There were also problems with the environment for other coins but they have been successfully mocked with rn-nodeify. &#xD;&#xA;This is the list of Dot libraries required for the browser environment:&#xD;&#xA;```&#xD;&#xA;&quot;@polkadot/api&quot;: &quot;7.4.1&quot;,&#xD;&#xA;&quot;@polkadot/until-crypto&quot;: “8.3.2&quot;,&#xD;&#xA;&quot;@polkadot/x-randomvalues&quot;: “8.3.2&quot;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What should I do?&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10335" PostHistoryTypeId="2" PostId="2760" RevisionGUID="df227f0c-0d37-48d0-8f91-4756ad74fb65" CreationDate="2022-05-20T09:46:38.187" UserId="2588" Text="I'd like to get transaction info like sender and receiver address etc. by sending transaction hash as a parameter.&#xD;&#xA;&#xD;&#xA;I did found &quot;api.rpc.eth.getTransactionByHash&quot; and tried to pass the hash but it was giving me ```&quot;TypeError: api.rpc.eth.getTransactionByHash is not a function&quot;``` error.&#xD;&#xA;&#xD;&#xA;Here is my code:&#xD;&#xA;```&#xD;&#xA;const dotAddress = async () =&gt; {&#xD;&#xA;  const wsProvider = new WsProvider(&quot;wss://rpc.polkadot.io&quot;);&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;  const result = api.rpc.eth.getTransactionByHash(&#xD;&#xA;    &quot;0x334cdf788cd4449139ce7dc83bf448b5ef2addb88bf6b642ac43880137e75387&quot;&#xD;&#xA;  );&#xD;&#xA;  console.log(result);&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;Any help appreciated, thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10337" PostHistoryTypeId="1" PostId="2760" RevisionGUID="df227f0c-0d37-48d0-8f91-4756ad74fb65" CreationDate="2022-05-20T09:46:38.187" UserId="2588" Text="Get Transaction by Hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="10338" PostHistoryTypeId="3" PostId="2760" RevisionGUID="df227f0c-0d37-48d0-8f91-4756ad74fb65" CreationDate="2022-05-20T09:46:38.187" UserId="2588" Text="|polkadot-js|rpc|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10339" PostHistoryTypeId="2" PostId="2761" RevisionGUID="55317644-aba9-402f-8b2d-4cc37e77908b" CreationDate="2022-05-20T11:41:50.197" UserId="620" Text="The node itself doesn't index all transactions, it just stores blocks and states. You should fetch all blocks yourself and index transactions if you want to look them up that way.&#xD;&#xA;&#xD;&#xA;Also note that transaction hash is [not a unique identifier](https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics) for a state transition (although is a unique identifier for a specific set of instructions and account context)." ContentLicense="CC BY-SA 4.0" />
  <row Id="10341" PostHistoryTypeId="52" PostId="2753" RevisionGUID="c1270a61-b102-406b-b790-25f37aa700b8" CreationDate="2022-05-20T11:42:26.403" />
  <row Id="10342" PostHistoryTypeId="2" PostId="2762" RevisionGUID="09ca853d-7d78-40cc-8288-4909d4944d58" CreationDate="2022-05-20T13:33:34.437" UserId="140" Text="I have my substrate blockchain application based on Polkadotv0.9.16. I want to upgrade it to latest Polkadot version v.0.9.21. I will be doing this step by step, version by version to avoid big conflicts.&#xD;&#xA;&#xD;&#xA;There might be chances that some upstream pallet's storage have been modified. Do I need to write any migration script to support them or fixing only compilation error would work? " ContentLicense="CC BY-SA 4.0" />
  <row Id="10344" PostHistoryTypeId="1" PostId="2762" RevisionGUID="09ca853d-7d78-40cc-8288-4909d4944d58" CreationDate="2022-05-20T13:33:34.437" UserId="140" Text="Do I need to write migration script if upstream pallet's storage has been changed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10345" PostHistoryTypeId="3" PostId="2762" RevisionGUID="09ca853d-7d78-40cc-8288-4909d4944d58" CreationDate="2022-05-20T13:33:34.437" UserId="140" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10348" PostHistoryTypeId="2" PostId="2764" RevisionGUID="e6900bea-8cb1-4ee3-8ed6-79b3cffb0aec" CreationDate="2022-05-20T14:40:52.153" UserId="2581" Text="I am trying to get list events by filter for specific account(validator, nominator).&#xD;&#xA;&#xD;&#xA;I can get list of events using api.query.system.events(). However, if I get events for a day, there &#xD;&#xA;will be much events.&#xD;&#xA;&#xD;&#xA;So, I want to filter events by specific account.&#xD;&#xA;&#xD;&#xA;How can I do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10350" PostHistoryTypeId="1" PostId="2764" RevisionGUID="e6900bea-8cb1-4ee3-8ed6-79b3cffb0aec" CreationDate="2022-05-20T14:40:52.153" UserId="2581" Text="Filter events for specific account in Polkadot.js/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="10351" PostHistoryTypeId="3" PostId="2764" RevisionGUID="e6900bea-8cb1-4ee3-8ed6-79b3cffb0aec" CreationDate="2022-05-20T14:40:52.153" UserId="2581" Text="|polkadot-js|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10352" PostHistoryTypeId="2" PostId="2765" RevisionGUID="be59fb17-bfce-4694-b22e-ce6a7b196e7c" CreationDate="2022-05-20T15:23:32.840" UserId="29" Text="Each parachain may have a different configuration for how they store their assets, how to query the account balances of these assets, and what one would consider an account balance for an asset. In the future we may see a Polkadot standard like [this](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-3.md).&#xD;&#xA;&#xD;&#xA;Furthermore, there may be a difference in how specific assets are stored depending on use cases within the underlying parachain. Take Karura for example, which uses the [ORML Tokens pallet](https://github.com/AcalaNetwork/Acala/blob/master/runtime/karura/src/lib.rs#L1638). If you want to query the balance of an account in the tokens pallet storage on Karura you will need to pass in the `account` and the `AcalaPrimitivesCurrencyCurrencyId` along with some additional information:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/LFJDU.png)&#xD;&#xA;&#xD;&#xA;For Karura, you can see the different assets that are available by querying the `assetRegistry` metadata like so:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Qx7TE.png)&#xD;&#xA;&#xD;&#xA;Knowing the asset you want to query on the tokens pallet, you can write some code:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { options } from &quot;@acala-network/api&quot;;&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const fetchKaruraTokens = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const api = new ApiPromise(options({ provider }));&#xD;&#xA;    await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    // BNC Balance on tokens pallet&#xD;&#xA;    const address = &quot;qoo1mYQvGXLmGkhKM7PcJXdWcHeu9vo9K7xe2gYQZAxXUQ2&quot;;&#xD;&#xA;    const { free } = await api.query.tokens.accounts(address, { Token: 'BNC' })&#xD;&#xA;    console.log(&quot;BNC:&quot;, free.toHuman());&#xD;&#xA;&#xD;&#xA;    // TAI Balance on tokens pallet&#xD;&#xA;    const TAI = await api.query.tokens.accounts(address, { Token: 'TAI' })&#xD;&#xA;    console.log(&quot;TAI:&quot;, account.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // LKSM Balance on tokens pallet&#xD;&#xA;    const LKSM = await api.query.tokens.accounts(address, { Token: 'LKSM' })&#xD;&#xA;    console.log(&quot;LKSM:&quot;, LKSM.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // Native Karura Tokens&#xD;&#xA;    const { data } = await api.query.system.account(address)&#xD;&#xA;    console.log(&quot;KAR:&quot;,data.free.toHuman());&#xD;&#xA;    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;    // Generic way to get tokens associated with an account&#xD;&#xA;    const entries = await api.query.tokens.accounts.entries(address)&#xD;&#xA;    entries.forEach(entry =&gt; console.log(entry[0].toHuman()[1]['Token']))&#xD;&#xA;    // Example Output: TAI, LKSM, KUSD, BNC&#xD;&#xA;    // You can then query the balance for each token for that account&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Keep in mind, for the examples above, these are balances of the account on the tokens pallet and may not necessarily be the overall &quot;portfolio&quot; balance that you may be looking for - meaning, as a simple example, if an asset on Karura has an option to be collateralized (e.g. Collateral Staking), then the asset in the Collateral Staking will not appear in the token balance: `api.query.tokens.accounts(address, { Token: 'LKSM' })` - which makes sense because that account is collateralizing that asset. For the amount of an asset that is being collateralized, you will have to look in the `loans` pallet:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// LKSM Collateralized&#xD;&#xA;const collateralizedLKSM = await api.query.loans.positions({ Token: 'LKSM' }, address)&#xD;&#xA;console.log(&quot;LKSM Collateral Staking:&quot;, collateralizedLKSM.collateral.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a good example of understanding how it is important to understand how the underlying parachain may have different use cases for the token and therefore **querying the &quot;total&quot; balance of an asset for an account requires that you either understand what the parachain considers the total balance (see example image below) or that you have your own definition of what you consider to be the total balance for an asset for an account and for that requires an understanding of how the token can be used within that parachain**.&#xD;&#xA;&#xD;&#xA;Karura Dapp &gt; &quot;Portfolio&quot; Balance (LKSM)&#xD;&#xA;![](https://i.stack.imgur.com/oKOrn.png)&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://github.com/AcalaNetwork/acala.js/wiki#account-balances&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10354" PostHistoryTypeId="5" PostId="2765" RevisionGUID="c14106fc-f5f5-45a8-8c01-4f1ea34a4eb2" CreationDate="2022-05-20T15:30:02.447" UserId="29" Comment="added 21 characters in body" Text="Each parachain may have a different configuration for how they store their assets, how to query the account balances of these assets, and what one would consider an account balance for an asset. In the future we may see a Polkadot standard like [this](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-3.md).&#xD;&#xA;&#xD;&#xA;Furthermore, there may be a difference in how specific assets are stored depending on use cases within the underlying parachain. Take Karura for example, which uses the [ORML Tokens pallet](https://github.com/AcalaNetwork/Acala/blob/master/runtime/karura/src/lib.rs#L1638). If you want to query the balance of an account in the tokens pallet storage on Karura you will need to pass in the `account` and the `AcalaPrimitivesCurrencyCurrencyId` along with some additional information:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/LFJDU.png)&#xD;&#xA;&#xD;&#xA;For Karura, you can see the different assets that are available by querying the `assetRegistry` metadata like so:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Qx7TE.png)&#xD;&#xA;&#xD;&#xA;Knowing the asset you want to query on the tokens pallet, you can write some code:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { options } from &quot;@acala-network/api&quot;;&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const fetchKaruraTokens = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const api = new ApiPromise(options({ provider }));&#xD;&#xA;    await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    // BNC Balance on tokens pallet&#xD;&#xA;    const address = &quot;qoo1mYQvGXLmGkhKM7PcJXdWcHeu9vo9K7xe2gYQZAxXUQ2&quot;;&#xD;&#xA;    const { free } = await api.query.tokens.accounts(address, { Token: 'BNC' })&#xD;&#xA;    console.log(&quot;BNC:&quot;, free.toHuman());&#xD;&#xA;&#xD;&#xA;    // TAI Balance on tokens pallet&#xD;&#xA;    const TAI = await api.query.tokens.accounts(address, { Token: 'TAI' })&#xD;&#xA;    console.log(&quot;TAI:&quot;, account.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // LKSM Balance on tokens pallet&#xD;&#xA;    const LKSM = await api.query.tokens.accounts(address, { Token: 'LKSM' })&#xD;&#xA;    console.log(&quot;LKSM:&quot;, LKSM.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // Native Karura Tokens&#xD;&#xA;    const { data } = await api.query.system.account(address)&#xD;&#xA;    console.log(&quot;KAR:&quot;,data.free.toHuman());&#xD;&#xA;    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;    // Generic way to get tokens associated with an account&#xD;&#xA;    const entries = await api.query.tokens.accounts.entries(address)&#xD;&#xA;    entries.forEach(entry =&gt; console.log(entry[0].toHuman()[1]['Token']))&#xD;&#xA;    // Example Output: TAI, LKSM, KUSD, BNC&#xD;&#xA;    // You can then query the balance for each token for that account&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Keep in mind, for the examples above, these are balances of the account on the tokens pallet and may not necessarily be the overall &quot;portfolio&quot; balance that you may be looking for - meaning, as a simple example, if an asset on Karura has an option to be collateralized (e.g. Collateral Staking), then the asset in the Collateral Staking will not appear in the token balance: `api.query.tokens.accounts(address, { Token: 'LKSM' })` - which makes sense because that account is collateralizing that asset. For the amount of an asset that is being collateralized, you will have to look in the `loans` pallet:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// LKSM Collateralized&#xD;&#xA;const collateralizedLKSM = await api.query.loans.positions({ Token: 'LKSM' }, address)&#xD;&#xA;console.log(&quot;LKSM Collateral Staking:&quot;, collateralizedLKSM.collateral.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a good example of understanding how it is important to understand how the underlying parachain may have different use cases for the token and therefore **querying the &quot;total&quot; balance of an asset for an account requires that you either understand what the parachain considers the total balance (see example image below) or that you have your own definition of what you consider to be the total balance for an asset for an account and for that requires an understanding of how the token is stored and how it can be used within that parachain**.&#xD;&#xA;&#xD;&#xA;Karura Dapp &gt; &quot;Portfolio&quot; Balance (LKSM)&#xD;&#xA;![](https://i.stack.imgur.com/oKOrn.png)&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://github.com/AcalaNetwork/acala.js/wiki#account-balances&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10355" PostHistoryTypeId="5" PostId="2765" RevisionGUID="989d62f2-fc7f-4c2a-a9f4-f2b90549d085" CreationDate="2022-05-20T15:36:10.637" UserId="29" Comment="added 19 characters in body" Text="Each parachain may have a different configuration for how they store their assets, how to query the account balances of these assets, and from a high-level, what one would consider an account balance for an asset. In the future we may see a Polkadot standard like [this](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-3.md).&#xD;&#xA;&#xD;&#xA;Furthermore, there may be a difference in how specific assets are stored depending on use cases within the underlying parachain. Take Karura for example, which uses the [ORML Tokens pallet](https://github.com/AcalaNetwork/Acala/blob/master/runtime/karura/src/lib.rs#L1638). If you want to query the balance of an account in the tokens pallet storage on Karura you will need to pass in the `account` and the `AcalaPrimitivesCurrencyCurrencyId` along with some additional information:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/LFJDU.png)&#xD;&#xA;&#xD;&#xA;For Karura, you can see the different assets that are available by querying the `assetRegistry` metadata like so:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Qx7TE.png)&#xD;&#xA;&#xD;&#xA;Knowing the asset you want to query on the tokens pallet, you can write some code:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { options } from &quot;@acala-network/api&quot;;&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const fetchKaruraTokens = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const api = new ApiPromise(options({ provider }));&#xD;&#xA;    await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    // BNC Balance on tokens pallet&#xD;&#xA;    const address = &quot;qoo1mYQvGXLmGkhKM7PcJXdWcHeu9vo9K7xe2gYQZAxXUQ2&quot;;&#xD;&#xA;    const { free } = await api.query.tokens.accounts(address, { Token: 'BNC' })&#xD;&#xA;    console.log(&quot;BNC:&quot;, free.toHuman());&#xD;&#xA;&#xD;&#xA;    // TAI Balance on tokens pallet&#xD;&#xA;    const TAI = await api.query.tokens.accounts(address, { Token: 'TAI' })&#xD;&#xA;    console.log(&quot;TAI:&quot;, account.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // LKSM Balance on tokens pallet&#xD;&#xA;    const LKSM = await api.query.tokens.accounts(address, { Token: 'LKSM' })&#xD;&#xA;    console.log(&quot;LKSM:&quot;, LKSM.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // Native Karura Tokens&#xD;&#xA;    const { data } = await api.query.system.account(address)&#xD;&#xA;    console.log(&quot;KAR:&quot;,data.free.toHuman());&#xD;&#xA;    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;    // Generic way to get tokens associated with an account&#xD;&#xA;    const entries = await api.query.tokens.accounts.entries(address)&#xD;&#xA;    entries.forEach(entry =&gt; console.log(entry[0].toHuman()[1]['Token']))&#xD;&#xA;    // Example Output: TAI, LKSM, KUSD, BNC&#xD;&#xA;    // You can then query the balance for each token for that account&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Keep in mind, for the examples above, these are balances of the account on the tokens pallet and may not necessarily be the overall &quot;portfolio&quot; balance that you may be looking for - meaning, as a simple example, if an asset on Karura has an option to be collateralized (e.g. Collateral Staking), then the asset in the Collateral Staking will not appear in the token balance: `api.query.tokens.accounts(address, { Token: 'LKSM' })` - which makes sense because that account is collateralizing that asset. For the amount of an asset that is being collateralized, you will have to look in the `loans` pallet:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// LKSM Collateralized&#xD;&#xA;const collateralizedLKSM = await api.query.loans.positions({ Token: 'LKSM' }, address)&#xD;&#xA;console.log(&quot;LKSM Collateral Staking:&quot;, collateralizedLKSM.collateral.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a good example of understanding how it is important to understand how the underlying parachain may have different use cases for the token and therefore **querying the &quot;total&quot; balance of an asset for an account requires that you either understand what the parachain considers the total balance (see example image below) or that you have your own definition of what you consider to be the total balance for an asset for an account and for that requires an understanding of how the token is stored and how it can be used within that parachain**.&#xD;&#xA;&#xD;&#xA;Karura Dapp &gt; &quot;Portfolio&quot; Balance (LKSM)&#xD;&#xA;![](https://i.stack.imgur.com/oKOrn.png)&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://github.com/AcalaNetwork/acala.js/wiki#account-balances&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10356" PostHistoryTypeId="5" PostId="2765" RevisionGUID="72575bc4-9924-4a88-a5fd-b0c6d0230f0c" CreationDate="2022-05-20T15:41:28.603" UserId="29" Comment="added 19 characters in body" Text="Each parachain may have a different configuration for how they store their assets, how to query the account balances of these assets, and from a high-level, what one would consider an account balance for an asset. In the future we may see a Polkadot standard like [this](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-3.md).&#xD;&#xA;&#xD;&#xA;Furthermore, there may be a difference in how specific assets are stored depending on use cases within the underlying parachain. Take Karura for example, which uses the [ORML Tokens pallet](https://github.com/AcalaNetwork/Acala/blob/master/runtime/karura/src/lib.rs#L1638). If you want to query the balance of an account in the tokens pallet storage on Karura you will need to pass in the `account` and the `AcalaPrimitivesCurrencyCurrencyId` along with some additional information:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/LFJDU.png)&#xD;&#xA;&#xD;&#xA;For Karura, you can see the different assets that are available by querying the `assetRegistry` metadata like so:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Qx7TE.png)&#xD;&#xA;&#xD;&#xA;Knowing the asset you want to query on the tokens pallet, you can write some code:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { options } from &quot;@acala-network/api&quot;;&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const fetchKaruraTokens = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const api = new ApiPromise(options({ provider }));&#xD;&#xA;    await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    // BNC Balance on tokens pallet&#xD;&#xA;    const address = &quot;qoo1mYQvGXLmGkhKM7PcJXdWcHeu9vo9K7xe2gYQZAxXUQ2&quot;;&#xD;&#xA;    const { free } = await api.query.tokens.accounts(address, { Token: 'BNC' })&#xD;&#xA;    console.log(&quot;BNC:&quot;, free.toHuman());&#xD;&#xA;&#xD;&#xA;    // TAI Balance on tokens pallet&#xD;&#xA;    const TAI = await api.query.tokens.accounts(address, { Token: 'TAI' })&#xD;&#xA;    console.log(&quot;TAI:&quot;, account.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // LKSM Balance on tokens pallet&#xD;&#xA;    const LKSM = await api.query.tokens.accounts(address, { Token: 'LKSM' })&#xD;&#xA;    console.log(&quot;LKSM:&quot;, LKSM.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // Native Karura Tokens&#xD;&#xA;    const { data } = await api.query.system.account(address)&#xD;&#xA;    console.log(&quot;KAR:&quot;,data.free.toHuman());&#xD;&#xA;    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;    // Generic way to get ['Token']'s associated with an account&#xD;&#xA;    const entries = await api.query.tokens.accounts.entries(address)&#xD;&#xA;    entries.forEach(entry =&gt; console.log(entry[0].toHuman()[1]['Token']))&#xD;&#xA;    // Example Output: TAI, LKSM, KUSD, BNC&#xD;&#xA;    // You can then query the balance for each token for that account&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Keep in mind, for the examples above, these are balances of the account on the tokens pallet and may not necessarily be the overall &quot;portfolio&quot; balance that you may be looking for - meaning, as a simple example, if an asset on Karura has an option to be collateralized (e.g. Collateral Staking), then the asset in the Collateral Staking will not appear in the token balance: `api.query.tokens.accounts(address, { Token: 'LKSM' })` - which makes sense because that account is collateralizing that asset. For the amount of an asset that is being collateralized, you will have to look in the `loans` pallet:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// LKSM Collateralized&#xD;&#xA;const collateralizedLKSM = await api.query.loans.positions({ Token: 'LKSM' }, address)&#xD;&#xA;console.log(&quot;LKSM Collateral Staking:&quot;, collateralizedLKSM.collateral.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a good example of understanding how it is important to understand how the underlying parachain may have different use cases for the token and therefore **querying the &quot;total&quot; balance of an asset for an account requires that you either understand what the parachain considers the total balance (see example image below) or that you have your own definition of what you consider to be the total balance for an asset for an account and for that requires an understanding of how the token is stored and how it can be used within that parachain**.&#xD;&#xA;&#xD;&#xA;Karura Dapp &gt; &quot;Portfolio&quot; Balance (LKSM)&#xD;&#xA;![](https://i.stack.imgur.com/oKOrn.png)&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://github.com/AcalaNetwork/acala.js/wiki#account-balances&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10357" PostHistoryTypeId="5" PostId="2765" RevisionGUID="81197afd-155b-4a7d-8ef1-bf6052131ea6" CreationDate="2022-05-20T15:46:59.143" UserId="29" Comment="added 19 characters in body" Text="Each parachain may have a different configuration for how they store their assets, how to query the account balances of these assets, and from a high-level, what one would consider an account balance for an asset. In the future we may see a Polkadot standard like [this](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-3.md).&#xD;&#xA;&#xD;&#xA;Furthermore, there may be a difference in how specific assets are stored depending on use cases within the underlying parachain. Take Karura for example, which uses the [ORML Tokens pallet](https://github.com/AcalaNetwork/Acala/blob/master/runtime/karura/src/lib.rs#L1638). If you want to query the balance of an account in the tokens pallet storage on Karura you will need to pass in the `account` and the `AcalaPrimitivesCurrencyCurrencyId` along with some additional information:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/LFJDU.png)&#xD;&#xA;&#xD;&#xA;For Karura, you can see the different assets that are available by querying the `assetRegistry` metadata like so:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Qx7TE.png)&#xD;&#xA;&#xD;&#xA;Knowing the asset you want to query on the tokens pallet, you can write some code:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { options } from &quot;@acala-network/api&quot;;&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const fetchKaruraTokens = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const api = new ApiPromise(options({ provider }));&#xD;&#xA;    await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    // BNC Balance on tokens pallet&#xD;&#xA;    const address = &quot;qoo1mYQvGXLmGkhKM7PcJXdWcHeu9vo9K7xe2gYQZAxXUQ2&quot;;&#xD;&#xA;    const { free } = await api.query.tokens.accounts(address, { Token: 'BNC' })&#xD;&#xA;    console.log(&quot;BNC:&quot;, free.toHuman());&#xD;&#xA;&#xD;&#xA;    // TAI Balance on tokens pallet&#xD;&#xA;    const TAI = await api.query.tokens.accounts(address, { Token: 'TAI' })&#xD;&#xA;    console.log(&quot;TAI:&quot;, account.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // LKSM Balance on tokens pallet&#xD;&#xA;    const LKSM = await api.query.tokens.accounts(address, { Token: 'LKSM' })&#xD;&#xA;    console.log(&quot;LKSM:&quot;, LKSM.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // Native Karura Tokens&#xD;&#xA;    const { data } = await api.query.system.account(address)&#xD;&#xA;    console.log(&quot;KAR:&quot;,data.free.toHuman());&#xD;&#xA;    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;    // Generic way to get tokens associated with an account&#xD;&#xA;    const entries = await api.query.tokens.accounts.entries(address)&#xD;&#xA;    entries.forEach(entry =&gt; console.log(entry[0].toHuman()))&#xD;&#xA;    // Example Output: { Token: 'TAI' }, { Token: 'LKSM' }, { Token: 'KUSD' }, { Token: 'BNC' }&#xD;&#xA;    // You can then query the balance for each of these tokens for that account&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Keep in mind, for the examples above, these are balances of the account on the tokens pallet and may not necessarily be the overall &quot;portfolio&quot; balance that you may be looking for - meaning, as a simple example, if an asset on Karura has an option to be collateralized (e.g. Collateral Staking), then the asset in the Collateral Staking will not appear in the token balance: `api.query.tokens.accounts(address, { Token: 'LKSM' })` - which makes sense because that account is collateralizing that asset. For the amount of an asset that is being collateralized, you will have to look in the `loans` pallet:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// LKSM Collateralized&#xD;&#xA;const collateralizedLKSM = await api.query.loans.positions({ Token: 'LKSM' }, address)&#xD;&#xA;console.log(&quot;LKSM Collateral Staking:&quot;, collateralizedLKSM.collateral.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a good example of understanding how it is important to understand how the underlying parachain may have different use cases for the token and therefore **querying the &quot;total&quot; balance of an asset for an account requires that you either understand what the parachain considers the total balance (see example image below) or that you have your own definition of what you consider to be the total balance for an asset for an account and for that requires an understanding of how the token is stored and how it can be used within that parachain**.&#xD;&#xA;&#xD;&#xA;Karura Dapp &gt; &quot;Portfolio&quot; Balance (LKSM)&#xD;&#xA;![](https://i.stack.imgur.com/oKOrn.png)&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://github.com/AcalaNetwork/acala.js/wiki#account-balances&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10358" PostHistoryTypeId="5" PostId="2765" RevisionGUID="b8ddb992-4bf9-4f36-858b-dd7b185c74cd" CreationDate="2022-05-20T15:53:24.993" UserId="29" Comment="added 11 characters in body" Text="Each parachain may have a different configuration for how they store their assets, how to query the account balances of these assets, and from a high-level, what one would consider an account balance for an asset. In the future we may see a Polkadot standard like [this](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-3.md).&#xD;&#xA;&#xD;&#xA;Furthermore, there may be a difference in how specific assets are stored depending on use cases within the underlying parachain. Take Karura for example, which uses the [ORML Tokens pallet](https://github.com/AcalaNetwork/Acala/blob/master/runtime/karura/src/lib.rs#L1638). If you want to query the balance of an account in the tokens pallet storage on Karura you will need to pass in the `account` and the `AcalaPrimitivesCurrencyCurrencyId` along with some additional information:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/LFJDU.png)&#xD;&#xA;&#xD;&#xA;For Karura, you can see the different assets that are available by querying the `assetRegistry` metadata like so:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Qx7TE.png)&#xD;&#xA;&#xD;&#xA;Knowing the asset you want to query on the tokens pallet, you can write some code:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { options } from &quot;@acala-network/api&quot;;&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const fetchKaruraTokens = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const api = new ApiPromise(options({ provider }));&#xD;&#xA;    await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    // BNC Balance on tokens pallet&#xD;&#xA;    const address = &quot;qoo1mYQvGXLmGkhKM7PcJXdWcHeu9vo9K7xe2gYQZAxXUQ2&quot;;&#xD;&#xA;    const { free } = await api.query.tokens.accounts(address, { Token: 'BNC' })&#xD;&#xA;    console.log(&quot;BNC:&quot;, free.toHuman());&#xD;&#xA;&#xD;&#xA;    // TAI Balance on tokens pallet&#xD;&#xA;    const TAI = await api.query.tokens.accounts(address, { Token: 'TAI' })&#xD;&#xA;    console.log(&quot;TAI:&quot;, account.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // LKSM Balance on tokens pallet&#xD;&#xA;    const LKSM = await api.query.tokens.accounts(address, { Token: 'LKSM' })&#xD;&#xA;    console.log(&quot;LKSM:&quot;, LKSM.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // Native Karura Tokens&#xD;&#xA;    const { data } = await api.query.system.account(address)&#xD;&#xA;    console.log(&quot;KAR:&quot;,data.free.toHuman());&#xD;&#xA;    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;    // Generic way to get tokens associated with an account&#xD;&#xA;    const entries = await api.query.tokens.accounts.entries(address)&#xD;&#xA;    entries.forEach(entry =&gt; console.log(entry[0].toHuman()))&#xD;&#xA;    // Example Output: { Token: 'TAI' }, { Token: 'LKSM' }, { Token: 'KUSD' }, { Token: 'BNC' }&#xD;&#xA;    // You can then query the balance for each of these tokens for that account&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Keep in mind, for the examples above, these are balances of the account on the tokens pallet and may not necessarily be the overall &quot;portfolio&quot; balance that you may be looking for - meaning, as a simple example, if an asset on Karura has an option to be collateralized (e.g. Collateral Staking), then the asset in the Collateral Staking will not appear in the token balance: `api.query.tokens.accounts(address, { Token: 'LKSM' })` - which makes sense because that account is collateralizing that asset. For the amount of an asset that is being collateralized, you will have to look in the `loans` pallet:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// LKSM Collateralized&#xD;&#xA;const collateralizedLKSM = await api.query.loans.positions({ Token: 'LKSM' }, address)&#xD;&#xA;console.log(&quot;LKSM Collateral Staking:&quot;, collateralizedLKSM.collateral.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a good example of understanding how it is important to understand how the underlying parachain may have different use cases for the token and therefore **querying the &quot;total&quot; balance of an asset for an account requires that you either understand, from a high-level, what is considered as the total balance (see example image below) or that you have your own definition of what you consider to be the total balance for an asset for an account and for that requires an understanding of how the token is stored and how it can be used within the parachain's ecosystem**.&#xD;&#xA;&#xD;&#xA;Karura Dapp &gt; &quot;Portfolio&quot; Balance (LKSM)&#xD;&#xA;![](https://i.stack.imgur.com/oKOrn.png)&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://github.com/AcalaNetwork/acala.js/wiki#account-balances&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10359" PostHistoryTypeId="5" PostId="2765" RevisionGUID="b3ba5a40-8533-4006-8226-bcd2e89a4438" CreationDate="2022-05-20T16:05:24.210" UserId="29" Comment="added 133 characters in body" Text="Each parachain may have a different configuration for how they store their assets, how to query the account balances of these assets, and from a high-level, what one would consider an account balance for an asset. In the future we may see a Polkadot standard like [this](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-3.md).&#xD;&#xA;&#xD;&#xA;Furthermore, there may be a difference in how specific assets are stored depending on use cases within the underlying parachain. Take Karura for example, which uses the [ORML Tokens pallet](https://github.com/AcalaNetwork/Acala/blob/master/runtime/karura/src/lib.rs#L1638). If you want to query the balance of an account in the tokens pallet storage on Karura you will need to pass in the `account` and the `AcalaPrimitivesCurrencyCurrencyId` along with some additional information:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/LFJDU.png)&#xD;&#xA;&#xD;&#xA;For Karura, you can see the different assets that are available by querying the `assetRegistry` metadata like so:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Qx7TE.png)&#xD;&#xA;&#xD;&#xA;Knowing the asset you want to query on the tokens pallet, you can write some code:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { options } from &quot;@acala-network/api&quot;;&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const fetchKaruraTokens = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const api = new ApiPromise(options({ provider }));&#xD;&#xA;    await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    // BNC Balance on tokens pallet&#xD;&#xA;    const address = &quot;qoo1mYQvGXLmGkhKM7PcJXdWcHeu9vo9K7xe2gYQZAxXUQ2&quot;;&#xD;&#xA;    const { free } = await api.query.tokens.accounts(address, { Token: 'BNC' })&#xD;&#xA;    console.log(&quot;BNC:&quot;, free.toHuman());&#xD;&#xA;&#xD;&#xA;    // TAI Balance on tokens pallet&#xD;&#xA;    const TAI = await api.query.tokens.accounts(address, { Token: 'TAI' })&#xD;&#xA;    console.log(&quot;TAI:&quot;, account.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // LKSM Balance on tokens pallet&#xD;&#xA;    const LKSM = await api.query.tokens.accounts(address, { Token: 'LKSM' })&#xD;&#xA;    console.log(&quot;LKSM:&quot;, LKSM.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // Native Karura Tokens&#xD;&#xA;    const { data } = await api.query.system.account(address)&#xD;&#xA;    console.log(&quot;KAR:&quot;,data.free.toHuman());&#xD;&#xA;    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;    // Generic way to get tokens associated with an account&#xD;&#xA;    const entries = await api.query.tokens.accounts.entries(address)&#xD;&#xA;    entries.forEach(entry =&gt; console.log(entry[0].toHuman()))&#xD;&#xA;    // Example Output: { Token: 'TAI' }, { Token: 'LKSM' }, { Token: 'KUSD' }, { Token: 'BNC' }&#xD;&#xA;    // You can then query the balance for each of these tokens for that account&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Keep in mind, for the examples above, these are balances of the account on the tokens pallet and may not necessarily be the overall &quot;portfolio&quot; balance that you may be looking for - meaning, as a simple example, if an asset on Karura has an option to be collateralized (e.g. Collateral Staking), then the asset in the Collateral Staking will not appear in the token balance: `api.query.tokens.accounts(address, { Token: 'LKSM' })` - which makes sense because that account is collateralizing that asset. For the amount of an asset that is being collateralized, you will have to look in the `loans` pallet:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// LKSM Collateralized&#xD;&#xA;const collateralizedLKSM = await api.query.loans.positions({ Token: 'LKSM' }, address)&#xD;&#xA;console.log(&quot;LKSM Collateral Staking:&quot;, collateralizedLKSM.collateral.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a good example of understanding how it is important to understand how the underlying parachain may have different use cases for the token and therefore if you want to query the &quot;total&quot; balance of an asset for an account requires that you either take it as verbatim - the balance of the asset in the tokens pallet is the total balance for that assest for that account OR understand, from a high-level, what is considered as the total balance (see example image below) OR that you have your own definition of what you consider to be the total balance for an asset for an account and for that requires an understanding of how the token is stored and how it can be used within the parachain's ecosystem.&#xD;&#xA;&#xD;&#xA;Karura Dapp &gt; &quot;Portfolio&quot; Balance (LKSM)&#xD;&#xA;![](https://i.stack.imgur.com/oKOrn.png)&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://github.com/AcalaNetwork/acala.js/wiki#account-balances&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10360" PostHistoryTypeId="2" PostId="2766" RevisionGUID="88642d5d-2410-4424-b87c-cc695826cb93" CreationDate="2022-05-20T16:15:27.713" UserId="165" Text="You should rise the `validatorCount`, that sets a target for the ideal number of validators.&#xD;&#xA;&#xD;&#xA;You can do that in different ways:&#xD;&#xA; - [`set_validator_count`](https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/mod.rs#L1208)&#xD;&#xA; - [`increase_validator_count`](https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/mod.rs#L1225)&#xD;&#xA; - [`scale_validator_count`](https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/mod.rs#L1242)&#xD;&#xA;&#xD;&#xA;After that target is risen I would expect new validators being active." ContentLicense="CC BY-SA 4.0" />
  <row Id="10362" PostHistoryTypeId="5" PostId="2765" RevisionGUID="08aacf44-7e8d-4616-a33b-17b0c598f9d5" CreationDate="2022-05-20T16:15:48.533" UserId="29" Comment="added 21 characters in body" Text="Each parachain may have a different configuration for how they store their assets, how to query the account balances of these assets, and from a high-level, what one would consider an account balance for an asset. In the future we may see a Polkadot standard like [this](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-3.md).&#xD;&#xA;&#xD;&#xA;Furthermore, there may be a difference in how specific assets are stored depending on use cases within the underlying parachain. Take Karura for example, which uses the [ORML Tokens pallet](https://github.com/AcalaNetwork/Acala/blob/master/runtime/karura/src/lib.rs#L1638). If you want to query the balance of an account in the tokens pallet storage on Karura you will need to pass in the `account` and the `AcalaPrimitivesCurrencyCurrencyId` along with some additional information:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/LFJDU.png)&#xD;&#xA;&#xD;&#xA;For Karura, you can see the different assets that are available by querying the `assetRegistry` metadata like so:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Qx7TE.png)&#xD;&#xA;&#xD;&#xA;Knowing the asset you want to query on the tokens pallet, you can write some code:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { options } from &quot;@acala-network/api&quot;;&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const fetchKaruraTokens = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const api = new ApiPromise(options({ provider }));&#xD;&#xA;    await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    // BNC Balance on tokens pallet&#xD;&#xA;    const address = &quot;qoo1mYQvGXLmGkhKM7PcJXdWcHeu9vo9K7xe2gYQZAxXUQ2&quot;;&#xD;&#xA;    const { free } = await api.query.tokens.accounts(address, { Token: 'BNC' })&#xD;&#xA;    console.log(&quot;BNC:&quot;, free.toHuman());&#xD;&#xA;&#xD;&#xA;    // TAI Balance on tokens pallet&#xD;&#xA;    const TAI = await api.query.tokens.accounts(address, { Token: 'TAI' })&#xD;&#xA;    console.log(&quot;TAI:&quot;, account.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // LKSM Balance on tokens pallet&#xD;&#xA;    const LKSM = await api.query.tokens.accounts(address, { Token: 'LKSM' })&#xD;&#xA;    console.log(&quot;LKSM:&quot;, LKSM.free.toHuman());&#xD;&#xA;&#xD;&#xA;    // Native Karura Tokens&#xD;&#xA;    const { data } = await api.query.system.account(address)&#xD;&#xA;    console.log(&quot;KAR:&quot;,data.free.toHuman());&#xD;&#xA;    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;    // Generic way to get tokens associated with an account&#xD;&#xA;    const entries = await api.query.tokens.accounts.entries(address)&#xD;&#xA;    entries.forEach(entry =&gt; console.log(entry[0].toHuman()))&#xD;&#xA;    // Example Output: { Token: 'TAI' }, { Token: 'LKSM' }, { Token: 'KUSD' }, { Token: 'BNC' }&#xD;&#xA;    // You can then query the balance for each of these tokens for that account&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Keep in mind, for the examples above, these are balances of the account on the tokens pallet and may not necessarily be the overall &quot;portfolio&quot; balance that you may be looking for - meaning, as a simple example, if an asset on Karura has an option to be collateralized (e.g. Collateral Staking), then the asset in the Collateral Staking will not appear in the token balance: `api.query.tokens.accounts(address, { Token: 'LKSM' })` - which makes sense because that account is collateralizing that asset. For the amount of an asset that is being collateralized, you will have to look in the `loans` pallet:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// LKSM Collateralized&#xD;&#xA;const collateralizedLKSM = await api.query.loans.positions({ Token: 'LKSM' }, address)&#xD;&#xA;console.log(&quot;LKSM Collateral Staking:&quot;, collateralizedLKSM.collateral.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a good example of understanding how it is important to understand how the underlying parachain may have different use cases for the token and therefore if you want to query the &quot;portfolio&quot; balance of an asset for an account requires that you either take it as verbatim - the balance of the asset in the tokens pallet is the &quot;portfolio&quot; balance for that asset for that account OR understand, from a high-level, what is considered as the &quot;portfolio&quot; balance (see example image below) OR that you have your own definition of what you consider to be the &quot;portfolio&quot; balance for an asset for an account and for that requires an understanding of how the asset is stored and how it can be used within the parachain's ecosystem.&#xD;&#xA;&#xD;&#xA;Karura Dapp &gt; &quot;Portfolio&quot; Balance (LKSM)&#xD;&#xA;![](https://i.stack.imgur.com/oKOrn.png)&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://github.com/AcalaNetwork/acala.js/wiki#account-balances&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10363" PostHistoryTypeId="2" PostId="2767" RevisionGUID="77cec20f-9da5-4201-b231-d19db982d0a4" CreationDate="2022-05-20T17:05:48.133" UserId="418" Text="I have a [StorageNMap](https://crates.parity.io/frame_support/storage/trait.StorageNMap.html)&#xD;&#xA;```&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn resources)]&#xD;&#xA;	/// Stores resource info&#xD;&#xA;	pub type Resources&lt;T: Config&gt; = StorageNMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		(&#xD;&#xA;			NMapKey&lt;Blake2_128Concat, CollectionId&gt;,&#xD;&#xA;			NMapKey&lt;Blake2_128Concat, NftId&gt;,&#xD;&#xA;			NMapKey&lt;Blake2_128Concat, ResourceId&gt;,&#xD;&#xA;		),&#xD;&#xA;		ResourceOf&lt;T, T::PartsLimit&gt;,&#xD;&#xA;		OptionQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have a function that iterates through (CollectionId, NftId) with [`iter_prefix_values`](https://crates.parity.io/frame_support/storage/trait.StorageNMap.html#tymethod.iter_prefix_values) where I need to find a matching condition.  But once I match, I need the ResourceId itself (not the contents of the Resource).  The Id isn't stored in the ResourceOf/Resource struct, though I could add it (though I'd rather not if I can get this key otherwise).&#xD;&#xA;&#xD;&#xA;Here's the basic iteration matching&#xD;&#xA;```&#xD;&#xA;let resources_matching_base_iter =&#xD;&#xA;	pallet_rmrk_core::Resources::&lt;T&gt;::iter_prefix_values((item_collection_id, item_nft_id));&#xD;&#xA;&#xD;&#xA;for resource in resources_matching_base_iter {&#xD;&#xA;	if &lt;logic&gt; {&#xD;&#xA;		&lt;value_i_need&gt; = resource.id;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This only works if I put the .id in the struct, which I could avoid if I could figure out how to get the keys itself from the `iter_prefix_values`.  Any ideas how, or if this would be possible?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10365" PostHistoryTypeId="1" PostId="2767" RevisionGUID="77cec20f-9da5-4201-b231-d19db982d0a4" CreationDate="2022-05-20T17:05:48.133" UserId="418" Text="Get value *AND KEY* from iter_prefix_values" ContentLicense="CC BY-SA 4.0" />
  <row Id="10366" PostHistoryTypeId="3" PostId="2767" RevisionGUID="77cec20f-9da5-4201-b231-d19db982d0a4" CreationDate="2022-05-20T17:05:48.133" UserId="418" Text="|pallet|storage|storagenmap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10367" PostHistoryTypeId="5" PostId="2678" RevisionGUID="e5d44f2b-f7d3-4ebd-bc9a-f411d8ef4e57" CreationDate="2022-05-20T17:47:33.050" UserId="12" Comment="add new picture" Text="Currently, we have a local test net with 4 substrate nodes using [this runtime][2] which has the staking and session pallets. 2 nodes (Alice and Bob) are validators, placed in the chain spec json file and the other 2 (Charlie and Dave) were added as waiting validators while the chain was running with the goal to be chosen to the next session, but this never occurs. In each new epoch, the same validators (Alice and Bob) take place and I did not notice any session change event on polkadot JS UI. I would like to know if I'm missing some configuration or action to add new validators in a running network?&#xD;&#xA;&#xD;&#xA;In the beginning of the first epoch I notice this event but I'm not sure if it is related to the session change&#xD;&#xA;[![election provider multi phase event][3]][3]&#xD;&#xA;&#xD;&#xA;The active validator set. It keeps the same as the through the epochs&#xD;&#xA;[![active validator set][4]][4]&#xD;&#xA;&#xD;&#xA;I've added two more validators using their respective session keys and I did not notice any validator set change (I've waited for more than 30 epochs)&#xD;&#xA;[![waiting validator set][5]][5]&#xD;&#xA;&#xD;&#xA;Edit: still not working after increasing the validator count (notice 3/4 validators, with 1 waiting)&#xD;&#xA;[![3/4 validators, with 1 waiting][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/tRqDb.png&#xD;&#xA;  [2]: https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking&#xD;&#xA;  [3]: https://i.stack.imgur.com/qzjPo.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/KAfEH.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/P2c85.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10368" PostHistoryTypeId="6" PostId="2678" RevisionGUID="e5d44f2b-f7d3-4ebd-bc9a-f411d8ef4e57" CreationDate="2022-05-20T17:47:33.050" UserId="12" Comment="add new picture" Text="|substrate-node-template|staking|validator|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10369" PostHistoryTypeId="24" PostId="2678" RevisionGUID="e5d44f2b-f7d3-4ebd-bc9a-f411d8ef4e57" CreationDate="2022-05-20T17:47:33.050" Comment="Proposed by 12 approved by 29 edit id of 202" ContentLicense="CC BY-SA 4.0" />
  <row Id="10370" PostHistoryTypeId="2" PostId="2768" RevisionGUID="fd7d04be-c128-42de-a18e-05b5e79a7311" CreationDate="2022-05-20T17:58:55.307" UserId="227" Text="`ContractTrapped` typically occurs when there is an error in your contract. I suspect that in your case this might be because of the cross-contract calls.&#xD;&#xA;&#xD;&#xA;What would really help is if you can post some minimal code example that reproduces your error.&#xD;&#xA;&#xD;&#xA;Are you sure the contract you want to call has been deployed and that it's address is correct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10372" PostHistoryTypeId="2" PostId="2769" RevisionGUID="a6233749-006f-4148-a77e-be56fe5d3f0c" CreationDate="2022-05-20T18:48:06.350" UserId="28" Text="`StorageNMap` also exposes a bunch of APIs which provider an iterator over the key and value under the trait `IterableStorageNMap`:&#xD;&#xA;&#xD;&#xA;https://crates.parity.io/frame_support/storage/trait.IterableStorageNMap.html#tymethod.iter_prefix&#xD;&#xA;&#xD;&#xA;In general, you probably should not be doing any kind of Storage Map iteration on chain. It is EXTREMELY expensive, and probably will end up being an attack on your chain, where the map contains many items, and a user triggers you to iterate over that large map.&#xD;&#xA;&#xD;&#xA;Instead, if you would do any kind of iteration like this, you probably want to store things as a `BoundedVec`. You can learn more about those tradeoffs here:&#xD;&#xA;&#xD;&#xA;https://youtu.be/9S8rmW8LD5o?t=1266" ContentLicense="CC BY-SA 4.0" />
  <row Id="10374" PostHistoryTypeId="2" PostId="2770" RevisionGUID="104cb8f4-2e1d-46aa-ac2c-dff625b317e5" CreationDate="2022-05-20T18:50:58.590" UserId="28" Text="Yes, you will need to perform storage migrations for any changes in the storage of upstream pallets. However, for Substrate, most of these migrations are already written, and just need to be included in your runtime.&#xD;&#xA;&#xD;&#xA;You can find examples of that here: https://github.com/paritytech/polkadot/pulls?q=is%3Apr+label%3AE1-runtimemigration+is%3Aclosed" ContentLicense="CC BY-SA 4.0" />
  <row Id="10376" PostHistoryTypeId="2" PostId="2771" RevisionGUID="cbf08ca6-05ba-4197-a9e3-50ff50e9d694" CreationDate="2022-05-20T19:29:26.350" UserId="377" Text="I have integrated the democracy, collective, scheduler, and treasury pallet into my chain.&#xD;&#xA;Everything is working fine just during the end step when the proposal is executing it is giving me the bad origin error. Please let me know if you can suggest something?[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/FsASc.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10378" PostHistoryTypeId="1" PostId="2771" RevisionGUID="cbf08ca6-05ba-4197-a9e3-50ff50e9d694" CreationDate="2022-05-20T19:29:26.350" UserId="377" Text="Getting Bad origin error in execution of the proposal?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10379" PostHistoryTypeId="3" PostId="2771" RevisionGUID="cbf08ca6-05ba-4197-a9e3-50ff50e9d694" CreationDate="2022-05-20T19:29:26.350" UserId="377" Text="|pallet|governance|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10380" PostHistoryTypeId="2" PostId="2772" RevisionGUID="1e09ef8d-44c0-486d-a0ae-3f198169c719" CreationDate="2022-05-20T23:42:01.630" UserId="466" Text="I am making my way through the ink! &quot;First Contract&quot; tutorial:&#xD;&#xA;https://docs.substrate.io/tutorials/v3/ink-workshop/pt1/&#xD;&#xA;&#xD;&#xA;When trying to download the precompiled node:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag &lt;latest-tag&gt; --force --locked&#xD;&#xA;```&#xD;&#xA;I get the following errors:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `MaxCodeLen`, `RelaxedMaxCodeLen`&#xD;&#xA;     --&gt; /Users/keeganquigley/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/254342f/runtime/src/lib.rs:302:1&#xD;&#xA;      |&#xD;&#xA;  302 | impl pallet_contracts::Config for Runtime {&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MaxCodeLen`, `RelaxedMaxCodeLen` in implementation&#xD;&#xA;      |&#xD;&#xA;      = help: implement the missing item: `type MaxCodeLen = Type;`&#xD;&#xA;      = help: implement the missing item: `type RelaxedMaxCodeLen = Type;`&#xD;&#xA;&#xD;&#xA;  error[E0609]: no field `code_len` on type `Limits`&#xD;&#xA;     --&gt; /Users/keeganquigley/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/254342f/runtime/src/lib.rs:297:19&#xD;&#xA;      |&#xD;&#xA;  297 |         schedule.limits.code_len = 256 * 1024;&#xD;&#xA;      |                         ^^^^^^^^ unknown field&#xD;&#xA;      |&#xD;&#xA;      = note: available fields are: `event_topics`, `stack_height`, `globals`, `parameters`, `memory_pages` ... and 5 others&#xD;&#xA;```&#xD;&#xA;Regardless of what release I use. substrate-node-template compiles fine and I can run a local node - any ideas on what I am missing here? Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/ink-workshop/pt1/" ContentLicense="CC BY-SA 4.0" />
  <row Id="10382" PostHistoryTypeId="1" PostId="2772" RevisionGUID="1e09ef8d-44c0-486d-a0ae-3f198169c719" CreationDate="2022-05-20T23:42:01.630" UserId="466" Text="ink! tutorial: substrate-contracts-node is throwing exceptions" ContentLicense="CC BY-SA 4.0" />
  <row Id="10383" PostHistoryTypeId="3" PostId="2772" RevisionGUID="1e09ef8d-44c0-486d-a0ae-3f198169c719" CreationDate="2022-05-20T23:42:01.630" UserId="466" Text="|ink|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10385" PostHistoryTypeId="5" PostId="2750" RevisionGUID="a017d32e-4019-417d-a506-092cb83c70d0" CreationDate="2022-05-21T05:43:17.587" UserId="2584" Comment="added 561 characters in body" Text="Get &quot;Contract.ContractTrapped&quot; erro when call new &quot;xxx&quot; contract from inside an depolyed contract in substrate of Shibuya testnet, bellow is my detailed operation:&#xD;&#xA;&#xD;&#xA;1、Here are two related Contracts compiled by solang compiler scheduled to run in subsrate wasm of Shiybuya testnet&#xD;&#xA;2、Contract B can be created by a specific interface of Contract A via new ContractB&#xD;&#xA;3、Call the said interface shall be failed end up with 'Contract.ContractTrapped' error&#xD;&#xA;&#xD;&#xA;I'm not sure if the error is caused by solang or the substarte runtime in Shibuya network, so could anyone konw that?&#xD;&#xA;&#xD;&#xA;================Compile with solang=====================&#xD;&#xA;&#xD;&#xA;Solang version v0.1.10-84-g233920a1&#xD;&#xA;docker run --rm -it -v $(pwd):/sources Package solang · GitHub -v -o /sources --target substrate /sources/test.sol&#xD;&#xA;&#xD;&#xA;=============codes===========================&#xD;&#xA;&#xD;&#xA;pragma solidity &gt;=0.6.0;&#xD;&#xA;&#xD;&#xA;contract Base{&#xD;&#xA;constructor() payable{}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;contract Test{&#xD;&#xA;&#xD;&#xA;    constructor() payable{}&#xD;&#xA;&#xD;&#xA;    function createNew() public  {&#xD;&#xA;            new Base();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;===========================&#xD;&#xA;exec createNew via PolkadotUI shall raise “Contract.ContractTrapped”" ContentLicense="CC BY-SA 4.0" />
  <row Id="10386" PostHistoryTypeId="5" PostId="2750" RevisionGUID="0480e1ba-8c17-496b-97a6-e267ec126e0e" CreationDate="2022-05-21T05:44:54.147" UserId="2584" Comment="added 26 characters in body" Text="Get &quot;Contract.ContractTrapped&quot; erro when call new &quot;xxx&quot; contract from inside an depolyed contract in substrate of Shibuya testnet, bellow is my detailed operation:&#xD;&#xA;&#xD;&#xA;1、Here are two related Contracts compiled by solang compiler scheduled to run in subsrate wasm of Shiybuya testnet&#xD;&#xA;2、Contract B can be created by a specific interface of Contract A via new ContractB&#xD;&#xA;3、Call the said interface shall be failed end up with 'Contract.ContractTrapped' error&#xD;&#xA;&#xD;&#xA;I'm not sure if the error is caused by solang or the substarte runtime in Shibuya network, so could anyone konw that?&#xD;&#xA;&#xD;&#xA;Bellow is what i done:&#xD;&#xA;&#xD;&#xA;================Compile with solang=====================&#xD;&#xA;&#xD;&#xA;Solang version v0.1.10-84-g233920a1&#xD;&#xA;docker run --rm -it -v $(pwd):/sources Package solang · GitHub -v -o /sources --target substrate /sources/test.sol&#xD;&#xA;&#xD;&#xA;=============codes===========================&#xD;&#xA;&#xD;&#xA;pragma solidity &gt;=0.6.0;&#xD;&#xA;&#xD;&#xA;contract Base{&#xD;&#xA;constructor() payable{}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;contract Test{&#xD;&#xA;&#xD;&#xA;    constructor() payable{}&#xD;&#xA;&#xD;&#xA;    function createNew() public  {&#xD;&#xA;            new Base();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;===========================&#xD;&#xA;exec createNew via PolkadotUI shall raise “Contract.ContractTrapped”" ContentLicense="CC BY-SA 4.0" />
  <row Id="10387" PostHistoryTypeId="5" PostId="2750" RevisionGUID="fad91354-7b5a-4f8c-9155-7eb7734ad6d1" CreationDate="2022-05-21T05:45:39.060" UserId="2584" Comment="added 23 characters in body" Text="Get &quot;Contract.ContractTrapped&quot; erro when call new &quot;xxx&quot; contract from inside an depolyed contract in substrate of Shibuya testnet, bellow is my detailed operation:&#xD;&#xA;&#xD;&#xA;1、Here are two related Contracts compiled by solang compiler scheduled to run in subsrate wasm of Shiybuya testnet&#xD;&#xA;2、Contract B can be created by a specific interface of Contract A via new ContractB&#xD;&#xA;3、Call the said interface shall be failed end up with 'Contract.ContractTrapped' error&#xD;&#xA;&#xD;&#xA;I'm not sure if the error is caused by solang or the substarte runtime in Shibuya network, so could anyone konw that?&#xD;&#xA;&#xD;&#xA;Bellow is what i done:&#xD;&#xA;&#xD;&#xA;================Compile with solang=====================&#xD;&#xA;&#xD;&#xA;#Solang version v0.1.10-84-g233920a1&#xD;&#xA;#compiling command&#xD;&#xA;&#xD;&#xA;docker run --rm -it -v $(pwd):/sources Package solang · GitHub -v -o /sources --target substrate /sources/test.sol&#xD;&#xA;&#xD;&#xA;=============codes===========================&#xD;&#xA;&#xD;&#xA;pragma solidity &gt;=0.6.0;&#xD;&#xA;&#xD;&#xA;contract Base{&#xD;&#xA;constructor() payable{}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;contract Test{&#xD;&#xA;&#xD;&#xA;    constructor() payable{}&#xD;&#xA;&#xD;&#xA;    function createNew() public  {&#xD;&#xA;            new Base();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;===========================&#xD;&#xA;exec createNew via PolkadotUI shall raise “Contract.ContractTrapped”" ContentLicense="CC BY-SA 4.0" />
  <row Id="10388" PostHistoryTypeId="5" PostId="2750" RevisionGUID="d9a49578-ecbf-4099-a67d-aabba2c1abca" CreationDate="2022-05-21T05:45:55.717" UserId="2584" Comment="added 2 characters in body" Text="Get &quot;Contract.ContractTrapped&quot; erro when call new &quot;xxx&quot; contract from inside an depolyed contract in substrate of Shibuya testnet, bellow is my detailed operation:&#xD;&#xA;&#xD;&#xA;1、Here are two related Contracts compiled by solang compiler scheduled to run in subsrate wasm of Shiybuya testnet&#xD;&#xA;2、Contract B can be created by a specific interface of Contract A via new ContractB&#xD;&#xA;3、Call the said interface shall be failed end up with 'Contract.ContractTrapped' error&#xD;&#xA;&#xD;&#xA;I'm not sure if the error is caused by solang or the substarte runtime in Shibuya network, so could anyone konw that?&#xD;&#xA;&#xD;&#xA;Bellow is what i done:&#xD;&#xA;&#xD;&#xA;================Compile with solang=====================&#xD;&#xA;&#xD;&#xA;#Solang version v0.1.10-84-g233920a1&#xD;&#xA;&#xD;&#xA;#compiling command&#xD;&#xA;&#xD;&#xA;docker run --rm -it -v $(pwd):/sources Package solang · GitHub -v -o /sources --target substrate /sources/test.sol&#xD;&#xA;&#xD;&#xA;=============codes===========================&#xD;&#xA;&#xD;&#xA;pragma solidity &gt;=0.6.0;&#xD;&#xA;&#xD;&#xA;contract Base{&#xD;&#xA;constructor() payable{}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;contract Test{&#xD;&#xA;&#xD;&#xA;    constructor() payable{}&#xD;&#xA;&#xD;&#xA;    function createNew() public  {&#xD;&#xA;            new Base();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;===========================&#xD;&#xA;exec createNew via PolkadotUI shall raise “Contract.ContractTrapped”" ContentLicense="CC BY-SA 4.0" />
  <row Id="10389" PostHistoryTypeId="5" PostId="2750" RevisionGUID="1ee9bb52-7793-4ad6-83d5-78419bf11707" CreationDate="2022-05-21T05:47:28.003" UserId="2584" Comment="added 100 characters in body" Text="Get &quot;Contract.ContractTrapped&quot; erro when call new &quot;xxx&quot; contract from inside an depolyed contract in substrate of Shibuya testnet, bellow is my detailed operation:&#xD;&#xA;&#xD;&#xA;1、Here are two related Contracts compiled by solang compiler scheduled to run in subsrate wasm of Shiybuya testnet&#xD;&#xA;2、Contract B can be created by a specific interface of Contract A via new ContractB&#xD;&#xA;3、Call the said interface shall be failed end up with 'Contract.ContractTrapped' error&#xD;&#xA;&#xD;&#xA;I'm not sure if the error is caused by solang or the substarte runtime in Shibuya network, so could anyone konw that?&#xD;&#xA;&#xD;&#xA;Bellow is what i done:&#xD;&#xA;&#xD;&#xA;================Compile with solang=====================&#xD;&#xA;&#xD;&#xA;#Solang version v0.1.10-84-g233920a1&#xD;&#xA;&#xD;&#xA;#compiling command&#xD;&#xA;&#xD;&#xA;docker run --rm -it -v $(pwd):/sources Package solang · GitHub -v -o /sources --target substrate /sources/test.sol&#xD;&#xA;&#xD;&#xA;=============codes===========================&#xD;&#xA;&#xD;&#xA;pragma solidity &gt;=0.6.0;&#xD;&#xA;&#xD;&#xA;contract Base{&#xD;&#xA;constructor() payable{}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;contract Test{&#xD;&#xA;&#xD;&#xA;    constructor() payable{}&#xD;&#xA;&#xD;&#xA;    function createNew() public  {&#xD;&#xA;            new Base();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;===========================&#xD;&#xA;&#xD;&#xA;exec createNew via PolkadotUI(https://cloudflare-ipfs.com/ipns/dotapps.io/?rpc=wss%3A%2F%2Frpc.shibuya.astar.network#/accounts) shall raise “Contract.ContractTrapped”" ContentLicense="CC BY-SA 4.0" />
  <row Id="10390" PostHistoryTypeId="2" PostId="2773" RevisionGUID="6b89f9b5-dea0-47bf-b6fb-0c1994be9844" CreationDate="2022-05-21T05:47:29.470" UserId="2163" Text="I am trying to run all of the tests in the substrate codebase. When the pc gets to the 1670th dependency it freezes. All of my RAM is being used and the pc won't respond. I have 16GB of RAM, Ryzen 5 2600x and I am running ubuntu 20.04." ContentLicense="CC BY-SA 4.0" />
  <row Id="10392" PostHistoryTypeId="1" PostId="2773" RevisionGUID="6b89f9b5-dea0-47bf-b6fb-0c1994be9844" CreationDate="2022-05-21T05:47:29.470" UserId="2163" Text="Computer freezes when compiling substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="10393" PostHistoryTypeId="3" PostId="2773" RevisionGUID="6b89f9b5-dea0-47bf-b6fb-0c1994be9844" CreationDate="2022-05-21T05:47:29.470" UserId="2163" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10394" PostHistoryTypeId="2" PostId="2774" RevisionGUID="0f74b43e-f399-4f3a-942a-b9e981aa9f64" CreationDate="2022-05-21T06:13:07.003" UserId="2557" Text="Currently dealing with an issue building my chain where parity-util-mem is conflicting with parity-util-mem-ban duplicates and I dont know the exact way to specify a certain version for all dependencies to use as I installed alot of pallets. here is the full error just for reference&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/substrate-developer-hub/pallet-did`&#xD;&#xA;error: failed to select a version for `parity-util-mem`.&#xD;&#xA;&#xD;&#xA;    ... required by package `sp-core v3.0.0`&#xD;&#xA;    ... which satisfies dependency `sp-core = &quot;^3.0.0&quot;` of package `frame-support v3.0.0`&#xD;&#xA;    ... which satisfies dependency `frame-support = &quot;^3.0.0&quot;` of package `frame-system v3.0.0`&#xD;&#xA;    ... which satisfies dependency `frame-system = &quot;^3.0.0&quot;` of package `pallet-did v3.0.0 (https://github.com/substrate-developer-hub/pallet-did#8510c92b)`&#xD;&#xA;    ... which satisfies git dependency `did` of package `node-template-runtime v2.0.0 (C:\Users\throwaway\Documents\GitHub\Argonaut-Chain\runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 2.0.0) of package `node-template v2.0.0 (C:\Users\throwaway\Documents\GitHub\Argonaut-Chain\node)`&#xD;&#xA;versions that meet the requirements `^0.9.0` are: 0.9.0&#xD;&#xA;&#xD;&#xA;the package `parity-util-mem` links to the native library `parity-util-mem-ban-duplicates`, but it conflicts with a previous package which links to `parity-util-mem-ban-duplicates` as well:&#xD;&#xA;package `parity-util-mem v0.7.0`&#xD;&#xA;&#xD;&#xA;    ... which satisfies dependency `parity-util-mem = &quot;^0.7&quot;` of package `kvdb v0.7.0`&#xD;&#xA;    ... which satisfies dependency `kvdb = &quot;^0.7.0&quot;` (locked to 0.7.0) of package `sc-client-api v2.0.0`&#xD;&#xA;    ... which satisfies dependency `sc-client-api = &quot;^2.0.0&quot;` (locked to 2.0.0) of package `node-template v2.0.0 (C:\Users\throwaway)\Documents\GitHub\Argonaut-Chain\node)`&#xD;&#xA;Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='parity-util-mem' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.&#xD;&#xA;&#xD;&#xA;failed to select a version for `parity-util-mem` which could resolve this conflict" ContentLicense="CC BY-SA 4.0" />
  <row Id="10396" PostHistoryTypeId="1" PostId="2774" RevisionGUID="0f74b43e-f399-4f3a-942a-b9e981aa9f64" CreationDate="2022-05-21T06:13:07.003" UserId="2557" Text="&quot;error: failed to select a version for `parity-util-mem`&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10397" PostHistoryTypeId="3" PostId="2774" RevisionGUID="0f74b43e-f399-4f3a-942a-b9e981aa9f64" CreationDate="2022-05-21T06:13:07.003" UserId="2557" Text="|substrate-node-template|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10398" PostHistoryTypeId="2" PostId="2775" RevisionGUID="30699232-519a-4723-b3ee-262fcf47f9b1" CreationDate="2022-05-21T06:44:53.887" UserId="560" Text="Checkout cargo tree, then you can easier see what versions are being used&#xD;&#xA;https://doc.rust-lang.org/cargo/commands/cargo-tree.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="10400" PostHistoryTypeId="2" PostId="2776" RevisionGUID="84ca8fb5-13a7-4b21-b6b8-7bf6b38ed927" CreationDate="2022-05-21T07:31:08.717" UserId="2163" Text="I am new to open source and I would like to contribute to substrate. When creating a pull request I should add labels(A, B, C, and D label). How can I do so? Do the repo maintainers add these labels?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10402" PostHistoryTypeId="1" PostId="2776" RevisionGUID="84ca8fb5-13a7-4b21-b6b8-7bf6b38ed927" CreationDate="2022-05-21T07:31:08.717" UserId="2163" Text="How to add labels to a pull request on substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="10403" PostHistoryTypeId="3" PostId="2776" RevisionGUID="84ca8fb5-13a7-4b21-b6b8-7bf6b38ed927" CreationDate="2022-05-21T07:31:08.717" UserId="2163" Text="|learning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10404" PostHistoryTypeId="2" PostId="2777" RevisionGUID="ba177ad2-684b-4d3a-91af-37744913d5d2" CreationDate="2022-05-21T08:48:38.307" UserId="340" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-05-21 09:25:54  Starting consensus session on top of parent 0xc5a1eca5753c3513550364b882d0be1ab4955dd883d0ab65b25ad1dc5268f9f5&#xD;&#xA;2022-05-21 09:25:54 [#690]   Failed to finalize election round. reason ElectionError::Fallback(&quot;NoFallback.&quot;)&#xD;&#xA;2022-05-21 09:25:54 [#690]   Entering emergency mode: ElectionError::Fallback(&quot;NoFallback.&quot;)&#xD;&#xA;2022-05-21 09:25:54 [690]  election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)&#xD;&#xA;2022-05-21 09:25:54  Prepared block for proposing at 690 (1 ms) [hash: 0xd827bb2b3ede09499adc80542aa2a0bf2bec2a08c5bfa62d85d607aa7ab71b82; parent_hash: 0xc5a1…f9f5; extrinsics (2): [0x7480…f745, 0x27ed…60f3]]&#xD;&#xA;2022-05-21 09:25:54  Pre-sealed block for proposal at 690. Hash now 0x8554362fbdf7bdefa131a554a5e54f280c8156b056797f41586e77806151e9ff, previously 0xd827bb2b3ede09499adc80542aa2a0bf2bec2a08c5bfa62d85d607aa7ab71b82.&#xD;&#xA;2022-05-21 09:25:54 Error with block built on 0xc5a1eca5753c3513550364b882d0be1ab4955dd883d0ab65b25ad1dc5268f9f5: Import failed: Unexpected epoch change&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running with fast-runtime polkadot 0.9.22-dfd09150a03:&#xD;&#xA;&#xD;&#xA;polkadot \&#xD;&#xA;    --base-path /tmp/alice \&#xD;&#xA;    --chain polkadot-local \&#xD;&#xA;    --alice \&#xD;&#xA;    --validator \&#xD;&#xA;    --wasm-execution Compiled \&#xD;&#xA;    --prometheus-external \&#xD;&#xA;    --out-peers=10 \&#xD;&#xA;    --rpc-external \&#xD;&#xA;    --rpc-cors=all \&#xD;&#xA;    --rpc-methods=unsafe \&#xD;&#xA;    --unsafe-rpc-external \&#xD;&#xA;    --unsafe-ws-external \&#xD;&#xA;    --name &quot;Alice&quot;&#xD;&#xA;&#xD;&#xA;On multiple occasions (after wiping data) my local chain stops producing blocks sometimes after a few hours otherwise within an era or two.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/X0jl0.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="10406" PostHistoryTypeId="1" PostId="2777" RevisionGUID="ba177ad2-684b-4d3a-91af-37744913d5d2" CreationDate="2022-05-21T08:48:38.307" UserId="340" Text="Help my polkadot-local test chain stops producing blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="10407" PostHistoryTypeId="3" PostId="2777" RevisionGUID="ba177ad2-684b-4d3a-91af-37744913d5d2" CreationDate="2022-05-21T08:48:38.307" UserId="340" Text="|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10408" PostHistoryTypeId="2" PostId="2778" RevisionGUID="d04c5a4d-f88b-479a-91e1-1499d1b830ca" CreationDate="2022-05-21T09:03:16.130" UserId="340" Text="I tried the extrinsic.staking. increaseValidatorCount &amp; setValidatorCount&#xD;&#xA;&#xD;&#xA;and sign with one of the builtin dev accounts but nothing happens. &#xD;&#xA;&#xD;&#xA;How long should it take! one epoch or an era?&#xD;&#xA;&#xD;&#xA;What is the correct way to increase validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10410" PostHistoryTypeId="1" PostId="2778" RevisionGUID="d04c5a4d-f88b-479a-91e1-1499d1b830ca" CreationDate="2022-05-21T09:03:16.130" UserId="340" Text="How can I increase the validators with polkadot-local" ContentLicense="CC BY-SA 4.0" />
  <row Id="10411" PostHistoryTypeId="3" PostId="2778" RevisionGUID="d04c5a4d-f88b-479a-91e1-1499d1b830ca" CreationDate="2022-05-21T09:03:16.130" UserId="340" Text="|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10412" PostHistoryTypeId="2" PostId="2779" RevisionGUID="f4fa260f-6d25-4c3b-9b47-5765e8acc5d9" CreationDate="2022-05-21T11:03:55.967" UserId="16" Text="I believe that this is a bug in `cargo install --git &lt;URL&gt; --locked` which ignores the `--locked` part and updates the substrate dependencies. You can workaround this by cloning the `substrate-contracts-node` and running the following command there:&#xD;&#xA;```&#xD;&#xA;git checkout &lt;LATEST_TAG&gt;&#xD;&#xA;cargo install --path . --locked&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10414" PostHistoryTypeId="4" PostId="2772" RevisionGUID="e9f2bd25-a77f-4717-9959-6ff2fc424a9d" CreationDate="2022-05-21T11:04:16.330" UserId="16" Comment="edited title" Text="ink! tutorial: substrate-contracts-node build fails" ContentLicense="CC BY-SA 4.0" />
  <row Id="10415" PostHistoryTypeId="2" PostId="2780" RevisionGUID="8c435f79-e12f-492f-bd13-29c31f9b069b" CreationDate="2022-05-21T11:26:34.140" UserId="2414" Text="I am using the latest substrate-node-template few weeks back it was building fine.&#xD;&#xA;But the same project isn't building now, I did not do any changes. Error is occurring in runtime interface. I am getting[![enter image description here][1]][1] error[E0512]: cannot transmute between types of different sizes, or dependently-sized types.&#xD;&#xA;&#xD;&#xA;PFA screenshot for detail error.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Ts7xY.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10417" PostHistoryTypeId="1" PostId="2780" RevisionGUID="8c435f79-e12f-492f-bd13-29c31f9b069b" CreationDate="2022-05-21T11:26:34.140" UserId="2414" Text="error[E0512]: cannot transmute between types of different sizes, or dependently-sized types" ContentLicense="CC BY-SA 4.0" />
  <row Id="10418" PostHistoryTypeId="3" PostId="2780" RevisionGUID="8c435f79-e12f-492f-bd13-29c31f9b069b" CreationDate="2022-05-21T11:26:34.140" UserId="2414" Text="|substrate-node|substrate-node-template|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10419" PostHistoryTypeId="6" PostId="2780" RevisionGUID="3ac14727-b1a5-4d79-b1ae-d5290649be61" CreationDate="2022-05-21T12:28:19.840" UserId="45" Comment="fix tags" Text="|substrate-node|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10420" PostHistoryTypeId="6" PostId="2778" RevisionGUID="bcc3a367-5bc5-46b1-b086-458c7e8365ea" CreationDate="2022-05-21T12:29:46.130" UserId="45" Comment="tags" Text="|consensus|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10421" PostHistoryTypeId="2" PostId="2781" RevisionGUID="b2edfb57-01b6-49d5-a793-d6d7b943d6ce" CreationDate="2022-05-21T13:06:26.043" UserId="406" Text="I have deployed my blockchain sometime ago and just checked that the era time is stuck, i have tried to `forceNewEra()` using sudo command, i have also tried `forceNewEraAlways()` but it changes the era time to 10 minutes. Than i tried to runtime upgrade the blockchian and it was upgraded successfully but era time was still not updated. Some please help me asap.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qTrmr.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10423" PostHistoryTypeId="1" PostId="2781" RevisionGUID="b2edfb57-01b6-49d5-a793-d6d7b943d6ce" CreationDate="2022-05-21T13:06:26.043" UserId="406" Text="Era time is not completing" ContentLicense="CC BY-SA 4.0" />
  <row Id="10424" PostHistoryTypeId="3" PostId="2781" RevisionGUID="b2edfb57-01b6-49d5-a793-d6d7b943d6ce" CreationDate="2022-05-21T13:06:26.043" UserId="406" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10425" PostHistoryTypeId="4" PostId="2060" RevisionGUID="69a60a0c-ac91-4a22-96ef-3b854d709837" CreationDate="2022-05-21T15:01:28.380" UserId="34" Comment="edited tags; edited title" Text="How to deploy a hardended, secure, production-ready Substrate node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10426" PostHistoryTypeId="6" PostId="2060" RevisionGUID="69a60a0c-ac91-4a22-96ef-3b854d709837" CreationDate="2022-05-21T15:01:28.380" UserId="34" Comment="edited tags; edited title" Text="|nodes|subkey|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10427" PostHistoryTypeId="5" PostId="2768" RevisionGUID="2f2bd079-b33d-4df1-b3ee-7bc4f904b578" CreationDate="2022-05-21T15:02:22.667" UserId="34" Comment="added 63 characters in body" Text="`ContractTrapped` typically occurs when there is an error in your contract. I suspect that in your case this might be because of the cross-contract calls.&#xD;&#xA;&#xD;&#xA;What would really help is if you can post some [minimal code example that reproduces your error](https://stackoverflow.com/help/minimal-reproducible-example).&#xD;&#xA;&#xD;&#xA;Are you sure the contract you want to call has been deployed and that it's address is correct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10428" PostHistoryTypeId="10" PostId="1128" RevisionGUID="866d4310-116e-43ac-956b-6bd32bc23b53" CreationDate="2022-05-21T15:04:18.493" UserId="34" Comment="105" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:83,&quot;DisplayName&quot;:&quot;Luke Schoen&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="10429" PostHistoryTypeId="50" PostId="1979" RevisionGUID="dbd89563-183c-498c-abfe-0f3cd8636ec9" CreationDate="2022-05-21T15:04:25.503" UserId="-1" />
  <row Id="10430" PostHistoryTypeId="2" PostId="2782" RevisionGUID="5437f95f-dd61-4e1c-817d-70cd9944d94b" CreationDate="2022-05-21T17:29:33.630" UserId="2379" Text="What is sudo invalid mean? This error happened when I did a parachain authorizeUpgrade. I had upgrade success many times in some way. But this is the first time I got this error.&#xD;&#xA;&#xD;&#xA;Is it mean code invalid or sign invalid or else?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;More details below&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;**console**&#xD;&#xA;&#xD;&#xA;signAndSend: status :: {&quot;events&quot;:[],&quot;status&quot;:{&quot;invalid&quot;:null},&quot;txHash&quot;:&quot;0xd0a70f19e64fe8748459eb0e4b5630a98ab73210742c74ca09c192c7f0032eeb&quot;}&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/i3SDN.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/iDGyr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10432" PostHistoryTypeId="1" PostId="2782" RevisionGUID="5437f95f-dd61-4e1c-817d-70cd9944d94b" CreationDate="2022-05-21T17:29:33.630" UserId="2379" Text="sudo authorizeUpgrade return invalid?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10433" PostHistoryTypeId="3" PostId="2782" RevisionGUID="5437f95f-dd61-4e1c-817d-70cd9944d94b" CreationDate="2022-05-21T17:29:33.630" UserId="2379" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10434" PostHistoryTypeId="5" PostId="2782" RevisionGUID="75599a51-828a-41df-8642-78ff9cfb4c8f" CreationDate="2022-05-21T17:36:40.560" UserId="2379" Comment="added 5314 characters in body" Text="What is sudo invalid mean? This error happened when I did a parachain authorizeUpgrade. I had upgrade success many times in some way. But this is the first time I got this error.&#xD;&#xA;&#xD;&#xA;Is it mean code invalid or sign invalid or else?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;More details below&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;**console**&#xD;&#xA;&#xD;&#xA;signAndSend: status :: {&quot;events&quot;:[],&quot;status&quot;:{&quot;invalid&quot;:null},&quot;txHash&quot;:&quot;0xd0a70f19e64fe8748459eb0e4b5630a98ab73210742c74ca09c192c7f0032eeb&quot;}&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/i3SDN.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/iDGyr.png&#xD;&#xA;&#xD;&#xA;Trace log report **Invalid transaction: Extrinsic is not valid: TransactionValidityError::Invalid(InvalidTransaction::Stale)**&#xD;&#xA;```&#xD;&#xA;/data/logs/collator-01.log.3:2022-05-21 17:33:36.716 TRACE tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] Pushing to the block.&#xD;&#xA;/data/logs/collator-01.log.3:2022-05-21 17:33:36.723 DEBUG tokio-runtime-worker txpool: [Parachain] [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] Reported as invalid. Will skip sub-chains while iterating.&#xD;&#xA;/data/logs/collator-01.log.3:2022-05-21 17:33:36.725 DEBUG tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] Invalid transaction: Extrinsic is not valid: TransactionValidityError::Invalid(InvalidTransaction::Stale)&#xD;&#xA;/data/logs/collator-01.log.3:2022-05-21 17:33:36.728 DEBUG tokio-runtime-worker txpool: [Parachain] Removing invalid transactions: [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628]&#xD;&#xA;/data/logs/collator-01.log.3:2022-05-21 17:33:36.728 TRACE tokio-runtime-worker txpool: [Parachain] [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] Removed as part of the subtree.&#xD;&#xA;/data/logs/collator-01.log.3:2022-05-21 17:33:36.728 DEBUG tokio-runtime-worker txpool: [Parachain] Removed invalid transactions: [Transaction { hash: 0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628, priority: 262162175625036921, valid_till: 101592, bytes: 142, propagate: true, source: TransactionSource::External, requires: [], provides: [56d94ef121f261199437d186da47e5c335db65907cb556842d31c9fe6907034259000000], data: 840056d94ef121f261199437d186da47e5c335db65907cb556842d31c9fe69070342016412f04bfa069ee674c8f311ffa1e735c01138329773ef8eaab64b1d61cf426a32f7bbcaab5cca9fd8686656b46c7fe014c9a59bb5ef6193a13dfcaf80070280940165010004000102e2a1130413b2c6d0cf89e0f8d1c0383bc8a26350d359267ef957a613ba4889f0}]&#xD;&#xA;/data/logs/collator-01.log.3:2022-05-21 17:33:36.728 DEBUG tokio-runtime-worker txpool: [Parachain] [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] Extrinsic invalid&#xD;&#xA;/data/logs/collator-01.log.4:2022-05-21 17:33:24.686 DEBUG tokio-runtime-worker txpool: [Parachain] Updated revalidation queue at 101563. Transactions: {0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628: 101563}&#xD;&#xA;/data/logs/collator-01.log.4:2022-05-21 17:33:25.141 TRACE tokio-runtime-worker txpool: [Parachain] [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] Removed as part of the subtree.&#xD;&#xA;/data/logs/collator-01.log.4:2022-05-21 17:33:25.202 TRACE tokio-runtime-worker txpool: [Parachain] [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] WaitingTransaction { imported_at: Instant { tv_sec: 3121250, tv_nsec: 456894293 }, transaction: Transaction { hash: 0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628, priority: 262162175625036921, valid_till: 101592, bytes: 142, propagate: true, source: TransactionSource::External, requires: [], provides: [56d94ef121f261199437d186da47e5c335db65907cb556842d31c9fe6907034259000000], data: 840056d94ef121f261199437d186da47e5c335db65907cb556842d31c9fe69070342016412f04bfa069ee674c8f311ffa1e735c01138329773ef8eaab64b1d61cf426a32f7bbcaab5cca9fd8686656b46c7fe014c9a59bb5ef6193a13dfcaf80070280940165010004000102e2a1130413b2c6d0cf89e0f8d1c0383bc8a26350d359267ef957a613ba4889f0}, missing_tags: {}}&#xD;&#xA;/data/logs/collator-01.log.4:2022-05-21 17:33:25.202 DEBUG tokio-runtime-worker txpool: [Parachain] [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] Importing to ready&#xD;&#xA;/data/logs/collator-01.log.5:2022-05-21 17:33:15.390 TRACE tokio-runtime-worker txpool: [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] WaitingTransaction { imported_at: Instant { tv_sec: 3121240, tv_nsec: 645564877 }, transaction: Transaction { hash: 0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628, priority: 262162175625036921, valid_till: 101592, bytes: 142, propagate: true, source: TransactionSource::External, requires: [], provides: [56d94ef121f261199437d186da47e5c335db65907cb556842d31c9fe6907034259000000], data: 840056d94ef121f261199437d186da47e5c335db65907cb556842d31c9fe69070342016412f04bfa069ee674c8f311ffa1e735c01138329773ef8eaab64b1d61cf426a32f7bbcaab5cca9fd8686656b46c7fe014c9a59bb5ef6193a13dfcaf80070280940165010004000102e2a1130413b2c6d0cf89e0f8d1c0383bc8a26350d359267ef957a613ba4889f0}, missing_tags: {}}&#xD;&#xA;/data/logs/collator-01.log.5:2022-05-21 17:33:15.391 DEBUG tokio-runtime-worker txpool: [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] Importing to ready&#xD;&#xA;/data/logs/collator-01.log.5:2022-05-21 17:33:15.391 TRACE tokio-runtime-worker txpool: [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] Ready (replaced with None)&#xD;&#xA;/data/logs/collator-01.log.5:2022-05-21 17:33:15.391 DEBUG tokio-runtime-worker sync: [Parachain] Propagating transaction [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628]&#xD;&#xA;/data/logs/collator-01.log.5:2022-05-21 17:33:15.391 TRACE tokio-runtime-worker txpool: [Parachain] [0x64fb84d0108e9afffdb9a33834002ba5c083091bfbead8ff3699216220df1628] Broadcasted&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10435" PostHistoryTypeId="2" PostId="2783" RevisionGUID="b0287900-d30e-4a4b-a19e-00ed7a741ccf" CreationDate="2022-05-21T17:59:10.960" UserId="711" Text="Yeah only the maintainers can add the labels to a PR. " ContentLicense="CC BY-SA 4.0" />
  <row Id="10437" PostHistoryTypeId="2" PostId="2784" RevisionGUID="6749242f-6899-4853-84ab-6d09a1443f4b" CreationDate="2022-05-22T07:51:03.117" UserId="2484" Text="I would like to divide a `Balance` into two parts. One is 10% of `value` and another part is 90% of the `value`. `BalanceOf&lt;T&gt;` is the `Balance` of a pallet.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	type Balance: AtLeast32BitUnsigned&#xD;&#xA;		+ FullCodec&#xD;&#xA;		+ Copy&#xD;&#xA;		+ MaybeSerializeDeserialize&#xD;&#xA;		+ Debug&#xD;&#xA;		+ Default&#xD;&#xA;		+ scale_info::TypeInfo&#xD;&#xA;		+ MaxEncodedLen;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let value: BalanceOf&lt;T&gt; = some_balance;&#xD;&#xA;let deposit: BalanceOf&lt;T&gt; = 0.1 * value;&#xD;&#xA;let actual: BalanceOf&lt;T&gt; = value - deposit;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error message is the following.&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;cannot multiply `{float}` by `&lt;&lt;T as pallet::Config&gt;::Currencies as orml_traits::MultiCurrency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;the trait `Mul&lt;&lt;&lt;T as pallet::Config&gt;::Currencies as orml_traits::MultiCurrency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;` is not implemented for `{float}`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the best possible way to approach this safely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10439" PostHistoryTypeId="1" PostId="2784" RevisionGUID="6749242f-6899-4853-84ab-6d09a1443f4b" CreationDate="2022-05-22T07:51:03.117" UserId="2484" Text="How to get a percent portion of a balance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10440" PostHistoryTypeId="3" PostId="2784" RevisionGUID="6749242f-6899-4853-84ab-6d09a1443f4b" CreationDate="2022-05-22T07:51:03.117" UserId="2484" Text="|balances|percent|floating-point-math|safe-math|float|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10441" PostHistoryTypeId="5" PostId="2784" RevisionGUID="e63b4ad2-5065-4e0e-b10c-5a037949a77f" CreationDate="2022-05-22T08:19:25.367" UserId="2484" Comment="add another approach" Text="I would like to divide a `Balance` into two parts. One is 10% of `value` and another part is 90% of the `value`. `BalanceOf&lt;T&gt;` is the `Balance` of a pallet.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	type Balance: AtLeast32BitUnsigned&#xD;&#xA;		+ FullCodec&#xD;&#xA;		+ Copy&#xD;&#xA;		+ MaybeSerializeDeserialize&#xD;&#xA;		+ Debug&#xD;&#xA;		+ Default&#xD;&#xA;		+ scale_info::TypeInfo&#xD;&#xA;		+ MaxEncodedLen;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let value: BalanceOf&lt;T&gt; = some_balance;&#xD;&#xA;let deposit: BalanceOf&lt;T&gt; = 0.1 * value;&#xD;&#xA;let actual: BalanceOf&lt;T&gt; = value - deposit;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error message is the following.&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;cannot multiply `{float}` by `&lt;&lt;T as pallet::Config&gt;::Currencies as orml_traits::MultiCurrency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;the trait `Mul&lt;&lt;&lt;T as pallet::Config&gt;::Currencies as orml_traits::MultiCurrency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;` is not implemented for `{float}`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Another approach is to use sp_runtime::traits::CheckedDiv &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let value: BalanceOf&lt;T&gt; = some_balance;&#xD;&#xA;let deposit = value&#xD;&#xA;	.checked_div(&amp;10u128.into())&#xD;&#xA;	.ok_or(DispatchError::Other(&quot;Arithmetic error&quot;))?;&#xD;&#xA;let actual = value - deposit;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There I get this error.&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;the trait `From&lt;u128&gt;` is not implemented for `&lt;&lt;T as pallet::Config&gt;::Currencies as orml_traits::MultiCurrency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the best possible way to approach this safely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10442" PostHistoryTypeId="2" PostId="2785" RevisionGUID="dd732946-4c6d-4e6c-82f6-871e0f36e74f" CreationDate="2022-05-22T10:01:09.160" UserId="620" Text="There is actually a function as part of the `Imbalance` trait to handle exactly this: [ration](https://github.com/paritytech/substrate/blob/0f6b5734e8ff52199987b496b2ef7bfd51655198/frame/support/src/traits/tokens/imbalance.rs#L80).&#xD;&#xA;&#xD;&#xA;You can see an example of its use to [split transaction fees](https://github.com/paritytech/polkadot/blob/88d66ac/runtime/common/src/impls.rs#L49L57) between the Treasury and block author in Polkadot." ContentLicense="CC BY-SA 4.0" />
  <row Id="10444" PostHistoryTypeId="2" PostId="2786" RevisionGUID="7f3eed1a-0d6f-4030-aa55-15ef0d41daf7" CreationDate="2022-05-22T11:18:07.193" UserId="2136" Text="I find myself needing to do two things with the contracts pallet, which each raise a question:&#xD;&#xA;&#xD;&#xA;1/ I want to call the instantiate_with_code extrinsic from another rust function. What is the correct way to build the `code: Vec&lt;u8&gt;` input? Is it as simple as passing my wasm, created via Ink!, as a byte array?&#xD;&#xA;&#xD;&#xA;2/ I want to call the call function from another rust function. How to I properly build the `data: Vec&lt;u8&gt;` input? The function in the smart contract is defined as `pub fn set_admin(&amp;mut self, account: AccountId)`. I suspect I need to do something like: convert the selector value for 'set_admin' from my metadata.json to Vec&lt;u8&gt;, then convert the relevant AccountId to Vec&lt;u8&gt; and append it. Is this the correct way to build data inputs for the contracts pallet?&#xD;&#xA;&#xD;&#xA;Are there any resources that define the correct format of the inputs for the contracts pallet? I've searched but not been successful " ContentLicense="CC BY-SA 4.0" />
  <row Id="10446" PostHistoryTypeId="1" PostId="2786" RevisionGUID="7f3eed1a-0d6f-4030-aa55-15ef0d41daf7" CreationDate="2022-05-22T11:18:07.193" UserId="2136" Text="Contracts Pallet Inner Workings" ContentLicense="CC BY-SA 4.0" />
  <row Id="10447" PostHistoryTypeId="3" PostId="2786" RevisionGUID="7f3eed1a-0d6f-4030-aa55-15ef0d41daf7" CreationDate="2022-05-22T11:18:07.193" UserId="2136" Text="|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10448" PostHistoryTypeId="2" PostId="2787" RevisionGUID="e43b403a-0dc8-4452-8109-78375986c595" CreationDate="2022-05-22T11:20:18.433" UserId="2408" Text="Ok. I've found the solution.&#xD;&#xA;&#xD;&#xA;Rust has quite a weird behavior of traits. Let's say we have:  &#xD;&#xA;`libA` with `traitA` (which hash `show()` function),  &#xD;&#xA;`libB` with `struct structB` and `impl traitA for structB`  &#xD;&#xA;`libC` with code: `structB::show()`  &#xD;&#xA; &#xD;&#xA;The last line won't compile. Because, as it turns out, you have to first import `traitA` __into__ `libC` with `use libA::traitA`.&#xD;&#xA;&#xD;&#xA;In my case:  &#xD;&#xA;`libA` was `sp_core`,  &#xD;&#xA;`libB` was `pow` crate,  &#xD;&#xA;`libC` was `node` crate,  &#xD;&#xA;&#xD;&#xA;The solution:  &#xD;&#xA;(in the beginning of `node/src/service.rs`)  &#xD;&#xA;__`use sp_core::Pair;`__  &#xD;&#xA;That's it! It had nothing to do with `Cargo.toml`'s at all!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10450" PostHistoryTypeId="2" PostId="2788" RevisionGUID="473e495c-4404-4f80-8205-dd2407c69974" CreationDate="2022-05-22T11:38:43.843" UserId="94" Text="You probably need more RAM, 32GB should be good.  &#xD;&#xA;Otherwise you can reduce the number of threads that it compiles on with:  &#xD;&#xA;`cargo test -j 4`.  &#xD;&#xA;It is also possible to only test one create:  &#xD;&#xA;`cargo test -p sp-arithmetic`.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="10452" PostHistoryTypeId="2" PostId="2789" RevisionGUID="bc893627-ff1f-4acb-88a5-0d5b3f84c326" CreationDate="2022-05-22T12:34:58.590" UserId="1837" Text="I am new to ink and trying to run a smartcontract which gets build successfully but fails on deploying giving error: system.extrensic failed `contracts.OutOfGas`.&#xD;&#xA;&#xD;&#xA;This is Mixer contract which has 2 ContractRef `PoseidonRef` and `MixerVerifierRef`, following are the structure details about smartcontract for reference:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Mixer {&#xD;&#xA;        deposit_size: Balance,&#xD;&#xA;        merkle_tree: merkle_tree::MerkleTree,&#xD;&#xA;        used_nullifiers: Mapping&lt;[u8; 32], bool&gt;,&#xD;&#xA;        poseidon: PoseidonRef,&#xD;&#xA;        verifier: MixerVerifierRef,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;//MixerVerifer Inner Contract &#xD;&#xA;&#xD;&#xA;#[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct MixerVerifier {&#xD;&#xA;        vk_bytes: Vec&lt;u8&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;// Poseidon Inner Contract&#xD;&#xA;&#xD;&#xA;#[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Poseidon {&#xD;&#xA;        hasher_params_width_3_bytes: Vec&lt;u8&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;// Merkel Tree Struct&#xD;&#xA;&#xD;&#xA;#[derive(Default, Debug, SpreadLayout, SpreadAllocate )]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(StorageLayout))]&#xD;&#xA;pub struct MerkleTree {&#xD;&#xA;    pub levels: u32,&#xD;&#xA;    pub current_root_index: u32,&#xD;&#xA;    pub next_index: u32,&#xD;&#xA;    pub filled_subtrees: Mapping&lt;u32, [u8; 32]&gt;,&#xD;&#xA;    pub roots: Mapping&lt;u32, [u8; 32]&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am not sure where should I start to look for the root cause of the problem.&#xD;&#xA;I went through some posts and found that, there is no default implementation of `SpreadAllocate` for some custom structures and need to implement it manually. &#xD;&#xA;&#xD;&#xA;If this is relevant to problem, It would be great if you could provide some information or an example on how one should implement this traits.&#xD;&#xA;&#xD;&#xA;Any advice or help is much appreciated. Thank you!&#xD;&#xA;&#xD;&#xA;I am using ink! v3.0.0-rc9 and redspot for testing&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10454" PostHistoryTypeId="1" PostId="2789" RevisionGUID="bc893627-ff1f-4acb-88a5-0d5b3f84c326" CreationDate="2022-05-22T12:34:58.590" UserId="1837" Text="Contract out of gas on deployment" ContentLicense="CC BY-SA 4.0" />
  <row Id="10455" PostHistoryTypeId="3" PostId="2789" RevisionGUID="bc893627-ff1f-4acb-88a5-0d5b3f84c326" CreationDate="2022-05-22T12:34:58.590" UserId="1837" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10456" PostHistoryTypeId="2" PostId="2790" RevisionGUID="631a1170-0591-4828-8929-0682af0ec143" CreationDate="2022-05-23T02:07:46.963" UserId="712" Text="The quick way for Kusama and Polkadot is to check subscan for the proper parachain: https://kusama.subscan.io/parachain/2023&#xD;&#xA;&#xD;&#xA;In the case of most parachains on Rococo, the `Owner` is also the `Sovereign Account`.&#xD;&#xA;https://rococo.subscan.io/parachain/2000&#xD;&#xA;&#xD;&#xA;You can also directly specify the parachain and it will be automatically converted!&#xD;&#xA;&#xD;&#xA;    X1: {&#xD;&#xA;     Parachain: &lt;parachain-id&gt;&#xD;&#xA;     }" ContentLicense="CC BY-SA 4.0" />
  <row Id="10459" PostHistoryTypeId="5" PostId="2779" RevisionGUID="86863b6b-c5c6-4bd3-8c35-0eca5f48d1ce" CreationDate="2022-05-23T03:06:03.890" UserId="599" Comment="Fixed the install command and added example" Text="I believe that this is a bug in `cargo install --git &lt;URL&gt; --locked` which ignores the `--locked` part and updates the substrate dependencies. You can workaround this by cloning the `substrate-contracts-node` and running the following command there:&#xD;&#xA;```&#xD;&#xA;git checkout &lt;LATEST_TAG&gt;&#xD;&#xA;cargo install --path ./node/ --locked&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For release v0.15.1`:&#xD;&#xA;```shell&#xD;&#xA;git clone https://github.com/paritytech/substrate-contracts-node.git&#xD;&#xA;cd substrate-contracts-node&#xD;&#xA;git checkout v0.15.1&#xD;&#xA;cargo install --path ./node/ --locked&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10460" PostHistoryTypeId="24" PostId="2779" RevisionGUID="86863b6b-c5c6-4bd3-8c35-0eca5f48d1ce" CreationDate="2022-05-23T03:06:03.890" Comment="Proposed by 599 approved by 34 edit id of 203" ContentLicense="CC BY-SA 4.0" />
  <row Id="10461" PostHistoryTypeId="5" PostId="1490" RevisionGUID="e9f31af4-1ad5-475a-b272-0eec617183e6" CreationDate="2022-05-23T03:45:33.043" UserId="2057" Comment="added 18 characters in body; edited title" Text="In my application, I need to fire multiple transactions from same address, and want to create `statusCheck()` function, which will let me know how many transactions of total are still pending to be added to block. Is it possible?&#xD;&#xA;&#xD;&#xA;In my usecase, there is need to fire multiple transactions signed by same stash. There are lots of transactions, and they take lots of blocks before all of them are finalized. (As each transaction is a batch transaction, I see only one transaction getting added in one block at a time. Hence N transaction takes N blocks to complete all transactions).&#xD;&#xA; &#xD;&#xA;For simplicity at Javascript side, I can not make JS code to wait for events from each transaction to return &quot;status.isFinalized&quot;. Instead, after firing all N transactions, I want to write statusCheck() function, which when called will find how many transactions are yet pending to be finalized. That way, top level APP can call this statusCheck() again and again to find % completion (number of transactions pending / all transactions). &#xD;&#xA;&#xD;&#xA;I am firing transactions by calling `api.tx.utility.batch(txs).signAndSend`. I tried using `api.query.system.account` and `api.rpc.system.accountNextIndex`, but they give `nonce` which include &quot;pending transactions&quot; as well. Is there way to find out when a specific transaction/nonce gets confirmed/finalized? Thanks for help guys." ContentLicense="CC BY-SA 4.0" />
  <row Id="10462" PostHistoryTypeId="4" PostId="1490" RevisionGUID="e9f31af4-1ad5-475a-b272-0eec617183e6" CreationDate="2022-05-23T03:45:33.043" UserId="2057" Comment="added 18 characters in body; edited title" Text="How to find how many transactions are pending from address to be added to block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10463" PostHistoryTypeId="2" PostId="2791" RevisionGUID="d51e1f9c-202d-4ae4-80c3-72154c71c61b" CreationDate="2022-05-23T04:01:25.263" UserId="2057" Text="thanks guys for offering answers. I got partial answer from @Luna. Here is solution I came up with. &#xD;&#xA;Problem: After firing n number of transactions in burst, from same address, I wanted api which will help me know how many %transactions have been committed to blockchain. &#xD;&#xA;Solution: While firing transitions in burst, I keep note of `startNonce`, `endingNonce` as nonce of first and last transaction I fired. Then I implemented `statusCheck()` function which gives me % of committed transactions as below.&#xD;&#xA;&#xD;&#xA;    statusCheck() {&#xD;&#xA;      blockHash = await api.rpc.chain.getBlockHash(); //get # of latest block&#xD;&#xA;      lastCommitedNonce = await api.query.system.account.at(blockHash, stashId); // get latest committed nonce &#xD;&#xA;      percentTransactionsCompleted = based on startNonce, endingNonce and lastCommitedNonce &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My web app is happy to call `statusCheck()` periodically to know latest committed transaction status.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10465" PostHistoryTypeId="2" PostId="2792" RevisionGUID="3e2a0daa-500b-4f60-bb31-ff2c1d258584" CreationDate="2022-05-23T04:27:15.390" UserId="2057" Text="I am adding substrate based payment mechanism to my web app. App would provide substrate address to end user, where he/she will send required funds by some external means. Now I want my app to find out if payment is done and confirmed. To identify transactions from end user, I will ask him/her to provide address from where he/she plans to send funds from.&#xD;&#xA;&#xD;&#xA;App would know destination substrate address balance before and after transaction, but how to confirm how many funds came from which address? One crude way would be to go through each transactions of new block(since transaction is kicked on) and check if funds came from end user's address. But that would be exhaustive. Any simple and elegant way to find fund transfers from specific address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10467" PostHistoryTypeId="1" PostId="2792" RevisionGUID="3e2a0daa-500b-4f60-bb31-ff2c1d258584" CreationDate="2022-05-23T04:27:15.390" UserId="2057" Text="how to confirm payment from specific address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10468" PostHistoryTypeId="3" PostId="2792" RevisionGUID="3e2a0daa-500b-4f60-bb31-ff2c1d258584" CreationDate="2022-05-23T04:27:15.390" UserId="2057" Text="|transactions|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10469" PostHistoryTypeId="2" PostId="2793" RevisionGUID="b320b30f-3f13-430a-8464-b16eac9f6830" CreationDate="2022-05-23T05:03:28.687" UserId="28" Text="You should listen for chain events, which would announce the transfer has occurred between the two accounts, and the amount.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::event]&#xD;&#xA;#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;pub enum Event&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;	// -- snip --&#xD;&#xA;	/// Transfer succeeded.&#xD;&#xA;	Transfer { from: T::AccountId, to: T::AccountId, amount: T::Balance },&#xD;&#xA;	// -- snip --&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You'd only need to search on the block where the receiving account's balance has changed to confirm the funds came from where you expected.&#xD;&#xA;&#xD;&#xA;If you are using Polkadot JS API in particular, there are even better options like [Transaction Subscriptions](https://polkadot.js.org/docs/api/start/api.tx.subs), which even includes hooks specific for events." ContentLicense="CC BY-SA 4.0" />
  <row Id="10471" PostHistoryTypeId="5" PostId="2785" RevisionGUID="7635a35d-1078-48f5-8814-a50975475848" CreationDate="2022-05-23T05:24:53.073" UserId="620" Comment="added 1439 characters in body" Text="There is actually a function as part of the `Imbalance` trait to handle exactly this: [ration](https://github.com/paritytech/substrate/blob/0f6b5734e8ff52199987b496b2ef7bfd51655198/frame/support/src/traits/tokens/imbalance.rs#L80).&#xD;&#xA;&#xD;&#xA;You can see an example of its use to [split transaction fees](https://github.com/paritytech/polkadot/blob/88d66ac/runtime/common/src/impls.rs#L49L57) between the Treasury and block author in Polkadot.&#xD;&#xA;&#xD;&#xA;--------------&#xD;&#xA;&#xD;&#xA;EDIT: Update to do without an `Imbalance`.&#xD;&#xA;&#xD;&#xA;There is a better pattern to use if you're not dealing with an imbalance (e.g. a transaction fee that's already been deducted from an account). It is [`from_percent`](https://github.com/paritytech/substrate/blob/8bc45ed/primitives/arithmetic/src/per_things.rs#L94).&#xD;&#xA;&#xD;&#xA;This should work (including the option to make it configurable):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_runtime::Percent;&#xD;&#xA;&#xD;&#xA;pub type BalanceOf&lt;T&gt; = &#xD;&#xA;  &lt;&lt;T as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;&#xD;&#xA;		// Only needed if you want it configurable:&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type DepositFee: Get&lt;Percent&gt;;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  fn my_function(value: BalanceOf&lt;T&gt;) {&#xD;&#xA;    // To hard code in a value, you can just use `Percent` directly:&#xD;&#xA;    let deposit = Percent::from_percent(10) * value;&#xD;&#xA;&#xD;&#xA;    // If you want it configurable, you can just `Get` the percentage from the config:&#xD;&#xA;    let deposit = T::DepositFee::get() * value;&#xD;&#xA;&#xD;&#xA;    let actual = value - deposit;&#xD;&#xA;&#xD;&#xA;    /* do your thing... */&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then, if configurable, you would configure your runtime like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DepositFee: Percent = Percent::from_percent(10);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl my_pallet::Config for Runtime {&#xD;&#xA;	type DepositFee = DepositFee;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10472" PostHistoryTypeId="6" PostId="2792" RevisionGUID="5041dbd3-599f-4b30-b35c-77d698711882" CreationDate="2022-05-23T06:00:16.533" UserId="2057" Comment="edited tags" Text="|polkadot-js|transactions|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10473" PostHistoryTypeId="2" PostId="2794" RevisionGUID="936abc05-85fc-414a-9cb1-ccb63fdc8bca" CreationDate="2022-05-23T07:40:40.283" UserId="395" Text="Unfortunately, right now, any runtime errors are not surfaced will just result in `ContractTrapped`. This makes debugging very hard.'&#xD;&#xA;&#xD;&#xA;Having said that, `new Base()` instantiates a new contract. &#xD;&#xA;&#xD;&#xA; - The code for contract `Base` will need to be uploaded else it will fail. &#xD;&#xA; - The transaction needs enough value to be sent for creating a new contract.       &#xD;&#xA; - Since `value` is not specified, the minimum deposit will be given as the initial balance for the contract. The actual value can be set with e.g. `new Base{value: 10e6}()`." ContentLicense="CC BY-SA 4.0" />
  <row Id="10475" PostHistoryTypeId="2" PostId="2795" RevisionGUID="1ef08d6d-233f-4b67-bbfd-d507e123c01d" CreationDate="2022-05-23T09:05:50.790" UserId="2581" Text="I can get account information by passing address in api.query.system.account in Polkadot.js/api.&#xD;&#xA;&#xD;&#xA;However, if I pass empty address(```''```), then I can get still response.&#xD;&#xA;&#xD;&#xA;For example free balance data in response shows 42400000000.&#xD;&#xA;&#xD;&#xA;I want to know whose account data response is." ContentLicense="CC BY-SA 4.0" />
  <row Id="10477" PostHistoryTypeId="1" PostId="2795" RevisionGUID="1ef08d6d-233f-4b67-bbfd-d507e123c01d" CreationDate="2022-05-23T09:05:50.790" UserId="2581" Text="Empty address in api.query.system.account in Polkadot.js/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="10478" PostHistoryTypeId="3" PostId="2795" RevisionGUID="1ef08d6d-233f-4b67-bbfd-d507e123c01d" CreationDate="2022-05-23T09:05:50.790" UserId="2581" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10479" PostHistoryTypeId="2" PostId="2796" RevisionGUID="fd09f53f-5686-4acb-b2c9-a669a2df739e" CreationDate="2022-05-23T09:29:42.520" UserId="166" Text="Also, please note, that if you use the latest version of substrate, there are 2 newly introduced structs [`onchain::BoundedExecution` ](https://github.com/paritytech/substrate/blob/6386eea9ecf33bd43e6ea319cfae27e18d32fdf3/frame/election-provider-support/src/onchain.rs#L62), and [`onchain::UnboundedExecution`](https://github.com/paritytech/substrate/blob/6386eea9ecf33bd43e6ea319cfae27e18d32fdf3/frame/election-provider-support/src/onchain.rs#L69).&#xD;&#xA;&#xD;&#xA;As its name implies, `UnboundedExecution` is not statically bounded, while `BoundedExecution` is. For on chain use, it's better to use `BoundedExecution` to make sure it does not go out of hand.&#xD;&#xA;&#xD;&#xA;`UnboundedExecution` is generic over [`onchain::Config`](https://github.com/paritytech/substrate/blob/6386eea9ecf33bd43e6ea319cfae27e18d32fdf3/frame/election-provider-support/src/onchain.rs#L72) which can be used to configure the `Solver` and the `DataProvider`.&#xD;&#xA;&#xD;&#xA;`BoundedExecution` is generic over [`onchain::BoundedConfig`](https://github.com/paritytech/substrate/blob/6386eea9ecf33bd43e6ea319cfae27e18d32fdf3/frame/election-provider-support/src/onchain.rs#L89) that offers the extra bounds to bound the execution.&#xD;&#xA;&#xD;&#xA;You can see examples of their usage in the testing section or in the `pallet-election-provider-multi-phase`.&#xD;&#xA;&#xD;&#xA;Please bear in mind that this is work in progress, and implementation may differ in the future, however this can be a handy wrapper to use for elections." ContentLicense="CC BY-SA 4.0" />
  <row Id="10481" PostHistoryTypeId="2" PostId="2797" RevisionGUID="585ef688-c8c8-458f-8057-72fa7d576de4" CreationDate="2022-05-23T11:36:54.363" UserId="258" Text="I found 2 ways to make cross contract calls on ink!.&#xD;&#xA;&#xD;&#xA; 1. The first is in this link [here][1] where another contract is called directly, &#xD;&#xA; 2. The second is in this link [here][2] where a reference(ref) is being used.&#xD;&#xA;&#xD;&#xA;I am curious to know which is the best practice or is there any other better way?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://ink.substrate.io/basics/cross-contract-calling/&#xD;&#xA;  [2]: https://github.com/paritytech/ink/blob/master/examples/delegator/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="10483" PostHistoryTypeId="1" PostId="2797" RevisionGUID="585ef688-c8c8-458f-8057-72fa7d576de4" CreationDate="2022-05-23T11:36:54.363" UserId="258" Text="What is the best way to make a cross contract call on Ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10484" PostHistoryTypeId="3" PostId="2797" RevisionGUID="585ef688-c8c8-458f-8057-72fa7d576de4" CreationDate="2022-05-23T11:36:54.363" UserId="258" Text="|substrate-node|ink|smart-contract|substrate-contracts-node|blockchaincross-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10485" PostHistoryTypeId="2" PostId="2798" RevisionGUID="959be32e-b8da-47aa-bd81-89c1e7880341" CreationDate="2022-05-23T11:41:17.693" UserId="2130" Text="The error I see in the browser console is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;VEC: Unable to decode on index 0 createType(Lookup9):: Expected at least 32 bytes (256 bits), found 16 bytes&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Offending code snippet (from Kitties.js):&#xD;&#xA;```&#xD;&#xA;  // Subscription function to construct all kitty objects&#xD;&#xA;  const subscribeKitties = () =&gt; {&#xD;&#xA;    let unsub = null&#xD;&#xA;    const asyncFetch = async () =&gt; {&#xD;&#xA;      console.log('Fetching kitties with ids: ' + kittyIds)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;      // ***************************************************************&#xD;&#xA;      // The following line throws an error&#xD;&#xA;      unsub = await api.query.substrateKitties.kitties.multi(&#xD;&#xA;        kittyIds,&#xD;&#xA;        kitties =&gt; {&#xD;&#xA;          console.log('kitties: ' + kitties)&#xD;&#xA;          const kittiesMap = kitties.map(kitty =&gt; parseKitty(kitty.unwrap()))&#xD;&#xA;          console.log(kittiesMap)&#xD;&#xA;          setKitties(kittiesMap)&#xD;&#xA;        }&#xD;&#xA;      )&#xD;&#xA;    }&#xD;&#xA;    asyncFetch()&#xD;&#xA;    return () =&gt; {&#xD;&#xA;      unsub &amp;&amp; unsub()&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Full stack trace:&#xD;&#xA;```&#xD;&#xA;2022-05-23 05:24:04             VEC: Unable to decode on index 0 createType(Lookup9):: Expected at least 32 bytes (256 bits), found 16 bytes&#xD;&#xA;apply @ logger.js:62&#xD;&#xA;error @ logger.js:116&#xD;&#xA;decodeVec @ Vec.js:18&#xD;&#xA;Vec @ Vec.js:51&#xD;&#xA;(anonymous) @ Vec.js:59&#xD;&#xA;Type @ registry.js:333&#xD;&#xA;initType @ type.js:35&#xD;&#xA;createTypeUnsafe @ type.js:54&#xD;&#xA;createTypeUnsafe @ registry.js:288&#xD;&#xA;(anonymous) @ bundle.js:334&#xD;&#xA;_formatInputs @ bundle.js:334&#xD;&#xA;(anonymous) @ bundle.js:278&#xD;&#xA;Observable._trySubscribe @ Observable.ts:245&#xD;&#xA;(anonymous) @ Observable.ts:223&#xD;&#xA;errorContext @ errorContext.ts:29&#xD;&#xA;Observable.subscribe @ Observable.ts:221&#xD;&#xA;(anonymous) @ catchError.ts:115&#xD;&#xA;(anonymous) @ lift.ts:24&#xD;&#xA;(anonymous) @ Observable.ts:223&#xD;&#xA;errorContext @ errorContext.ts:29&#xD;&#xA;Observable.subscribe @ Observable.ts:221&#xD;&#xA;(anonymous) @ distinctUntilChanged.ts:157&#xD;&#xA;(anonymous) @ lift.ts:24&#xD;&#xA;(anonymous) @ Observable.ts:223&#xD;&#xA;errorContext @ errorContext.ts:29&#xD;&#xA;Observable.subscribe @ Observable.ts:221&#xD;&#xA;ConnectableObservable.connect @ ConnectableObservable.ts:71&#xD;&#xA;(anonymous) @ refCountDelay.js:17&#xD;&#xA;Observable._trySubscribe @ Observable.ts:245&#xD;&#xA;(anonymous) @ Observable.ts:223&#xD;&#xA;errorContext @ errorContext.ts:29&#xD;&#xA;Observable.subscribe @ Observable.ts:221&#xD;&#xA;(anonymous) @ combineLatest.ts:258&#xD;&#xA;maybeSchedule @ combineLatest.ts:302&#xD;&#xA;_loop_1 @ combineLatest.ts:253&#xD;&#xA;(anonymous) @ combineLatest.ts:252&#xD;&#xA;maybeSchedule @ combineLatest.ts:302&#xD;&#xA;(anonymous) @ combineLatest.ts:237&#xD;&#xA;Observable._trySubscribe @ Observable.ts:245&#xD;&#xA;(anonymous) @ Observable.ts:223&#xD;&#xA;errorContext @ errorContext.ts:29&#xD;&#xA;Observable.subscribe @ Observable.ts:221&#xD;&#xA;(anonymous) @ map.ts:54&#xD;&#xA;(anonymous) @ lift.ts:24&#xD;&#xA;(anonymous) @ Observable.ts:223&#xD;&#xA;errorContext @ errorContext.ts:29&#xD;&#xA;Observable.subscribe @ Observable.ts:221&#xD;&#xA;(anonymous) @ catchError.ts:115&#xD;&#xA;(anonymous) @ lift.ts:24&#xD;&#xA;(anonymous) @ Observable.ts:223&#xD;&#xA;errorContext @ errorContext.ts:29&#xD;&#xA;Observable.subscribe @ Observable.ts:221&#xD;&#xA;(anonymous) @ tap.ts:125&#xD;&#xA;(anonymous) @ lift.ts:24&#xD;&#xA;(anonymous) @ Observable.ts:223&#xD;&#xA;errorContext @ errorContext.ts:29&#xD;&#xA;Observable.subscribe @ Observable.ts:221&#xD;&#xA;(anonymous) @ decorateMethod.js:59&#xD;&#xA;decorateSubscribe @ decorateMethod.js:55&#xD;&#xA;(anonymous) @ decorateMethod.js:74&#xD;&#xA;asyncFetch @ Kitties.js:52&#xD;&#xA;subscribeKitties @ Kitties.js:62&#xD;&#xA;invokePassiveEffectCreate @ react-dom.development.js:23487&#xD;&#xA;callCallback @ react-dom.development.js:3945&#xD;&#xA;invokeGuardedCallbackDev @ react-dom.development.js:3994&#xD;&#xA;invokeGuardedCallback @ react-dom.development.js:4056&#xD;&#xA;flushPassiveEffectsImpl @ react-dom.development.js:23574&#xD;&#xA;unstable_runWithPriority @ scheduler.development.js:468&#xD;&#xA;runWithPriority$1 @ react-dom.development.js:11276&#xD;&#xA;flushPassiveEffects @ react-dom.development.js:23447&#xD;&#xA;(anonymous) @ react-dom.development.js:23324&#xD;&#xA;workLoop @ scheduler.development.js:417&#xD;&#xA;flushWork @ scheduler.development.js:390&#xD;&#xA;performWorkUntilDeadline @ scheduler.development.js:157&#xD;&#xA;Show 44 more frames&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;package.json&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;substrate-front-end-template&quot;,&#xD;&#xA;  &quot;version&quot;: &quot;monthly-2022-01&quot;,&#xD;&#xA;  &quot;private&quot;: true,&#xD;&#xA;  &quot;author&quot;: &quot;Parity Technologies &lt;admin@parity.io&gt;&quot;,&#xD;&#xA;  &quot;license&quot;: &quot;Unlicense&quot;,&#xD;&#xA;  &quot;homepage&quot;: &quot;https://substrate-developer-hub.github.io/substrate-front-end-template&quot;,&#xD;&#xA;  &quot;bugs&quot;: {&#xD;&#xA;    &quot;url&quot;: &quot;https://github.com/substrate-developer-hub/substrate-front-end-template/issues&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;keywords&quot;: [&#xD;&#xA;    &quot;substrate&quot;,&#xD;&#xA;    &quot;substrate-ui&quot;,&#xD;&#xA;    &quot;polkadot-js&quot;&#xD;&#xA;  ],&#xD;&#xA;  &quot;scripts&quot;: {&#xD;&#xA;    &quot;start&quot;: &quot;react-app-rewired start&quot;,&#xD;&#xA;    &quot;build&quot;: &quot;react-app-rewired build&quot;,&#xD;&#xA;    &quot;test&quot;: &quot;CI=true react-app-rewired test&quot;,&#xD;&#xA;    &quot;eject&quot;: &quot;react-scripts eject&quot;,&#xD;&#xA;    &quot;eslint:check&quot;: &quot;eslint --ext .jsx,.js src/&quot;,&#xD;&#xA;    &quot;eslint:write&quot;: &quot;eslint --fix --ext .jsx,.js src/&quot;,&#xD;&#xA;    &quot;prettier:check&quot;: &quot;prettier -c src/*&quot;,&#xD;&#xA;    &quot;prettier:write&quot;: &quot;prettier -w src/*&quot;,&#xD;&#xA;    &quot;deploy&quot;: &quot;gh-pages -d build -m '[ci skip] Updates'&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;dependencies&quot;: {&#xD;&#xA;    &quot;@polkadot/api&quot;: &quot;^7.10.1&quot;,&#xD;&#xA;    &quot;@polkadot/extension-dapp&quot;: &quot;^0.42.7&quot;,&#xD;&#xA;    &quot;@polkadot/keyring&quot;: &quot;^8.4.1&quot;,&#xD;&#xA;    &quot;@polkadot/networks&quot;: &quot;^8.4.1&quot;,&#xD;&#xA;    &quot;@polkadot/types&quot;: &quot;^7.10.1&quot;,&#xD;&#xA;    &quot;@polkadot/ui-keyring&quot;: &quot;^1.1.1&quot;,&#xD;&#xA;    &quot;@polkadot/ui-settings&quot;: &quot;^1.1.1&quot;,&#xD;&#xA;    &quot;@polkadot/util&quot;: &quot;^8.4.1&quot;,&#xD;&#xA;    &quot;@polkadot/util-crypto&quot;: &quot;^8.4.1&quot;,&#xD;&#xA;    &quot;node-polyfill-webpack-plugin&quot;: &quot;^1.1.4&quot;,&#xD;&#xA;    &quot;prop-types&quot;: &quot;^15.8.1&quot;,&#xD;&#xA;    &quot;react&quot;: &quot;^17.0.2&quot;,&#xD;&#xA;    &quot;react-copy-to-clipboard&quot;: &quot;^5.0.4&quot;,&#xD;&#xA;    &quot;react-dom&quot;: &quot;^17.0.2&quot;,&#xD;&#xA;    &quot;react-scripts&quot;: &quot;^5.0.0&quot;,&#xD;&#xA;    &quot;semantic-ui-css&quot;: &quot;Semantic-Org/Semantic-UI-CSS#master&quot;,&#xD;&#xA;    &quot;semantic-ui-react&quot;: &quot;^2.1.2&quot;,&#xD;&#xA;    &quot;stream-browserify&quot;: &quot;^3.0.0&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;devDependencies&quot;: {&#xD;&#xA;    &quot;eslint&quot;: &quot;^8.10.0&quot;,&#xD;&#xA;    &quot;eslint-config-prettier&quot;: &quot;^8.4.0&quot;,&#xD;&#xA;    &quot;eslint-config-react-app&quot;: &quot;^7.0.0&quot;,&#xD;&#xA;    &quot;gh-pages&quot;: &quot;^3.2.3&quot;,&#xD;&#xA;    &quot;prettier&quot;: &quot;2.5.1&quot;,&#xD;&#xA;    &quot;react-app-rewired&quot;: &quot;^2.2.1&quot;,&#xD;&#xA;    &quot;semistandard&quot;: &quot;^16.0.1&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;resolutions&quot;: {&#xD;&#xA;    &quot;eslint-plugin-jsx-a11y&quot;: &quot;6.5.1&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;eslintConfig&quot;: {&#xD;&#xA;    &quot;extends&quot;: [&#xD;&#xA;      &quot;react-app&quot;,&#xD;&#xA;      &quot;eslint:recommended&quot;,&#xD;&#xA;      &quot;prettier&quot;&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;engines&quot;: {&#xD;&#xA;    &quot;node&quot;: &quot;&gt;=16&quot;,&#xD;&#xA;    &quot;npm&quot;: &quot;&gt;=8&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;browserslist&quot;: {&#xD;&#xA;    &quot;production&quot;: [&#xD;&#xA;      &quot;&gt;0.2%&quot;,&#xD;&#xA;      &quot;not ie &lt;= 99&quot;,&#xD;&#xA;      &quot;not android &lt;= 4.4.4&quot;,&#xD;&#xA;      &quot;not dead&quot;,&#xD;&#xA;      &quot;not op_mini all&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;development&quot;: [&#xD;&#xA;      &quot;last 1 chrome version&quot;,&#xD;&#xA;      &quot;last 1 firefox version&quot;,&#xD;&#xA;      &quot;last 1 safari version&quot;&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;packageManager&quot;: &quot;yarn@3.1.1&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10487" PostHistoryTypeId="1" PostId="2798" RevisionGUID="959be32e-b8da-47aa-bd81-89c1e7880341" CreationDate="2022-05-23T11:41:17.693" UserId="2130" Text="Error making .multi subscription call (Kitties Tutorial)" ContentLicense="CC BY-SA 4.0" />
  <row Id="10488" PostHistoryTypeId="3" PostId="2798" RevisionGUID="959be32e-b8da-47aa-bd81-89c1e7880341" CreationDate="2022-05-23T11:41:17.693" UserId="2130" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10489" PostHistoryTypeId="2" PostId="2799" RevisionGUID="a69accc5-0bfd-49be-a18b-dea497d3faf1" CreationDate="2022-05-23T11:48:55.893" UserId="452" Text="`GRANDPA Pause/Resume` have not been implemented in the substrate client code, therefore I would hold on implementing those for now.&#xD;&#xA;&#xD;&#xA;To answer your question though I think that only a single `Pause / Resume` message would need to be tracked per fork since these would be enacted based on block depth (similar to forced changes) rather than based on finality. Since these would be enacted based on block depth I think they wouldn't affect the `next_change` rule, e.g. by the time we should be voting to finalize that block we would have already enacted the pause." ContentLicense="CC BY-SA 4.0" />
  <row Id="10491" PostHistoryTypeId="2" PostId="2800" RevisionGUID="827c6a86-3d2b-4ce0-84ee-e1f3337b6097" CreationDate="2022-05-23T11:49:19.263" UserId="73" Text="This means that you are trying to compile `sp-io` or just `sp-runtime-interface` without the `std` enabled. They currently assume that if `std` is not enabled, you are compiling for Wasm. There are checks to ensure that certain assumptions are correct and these checks are failing for you." ContentLicense="CC BY-SA 4.0" />
  <row Id="10493" PostHistoryTypeId="2" PostId="2801" RevisionGUID="150612fb-be55-4ef5-bc2a-425ce6f7113f" CreationDate="2022-05-23T12:55:05.330" UserId="427" Text="what are the guidelines to create a standalone substrate blockchain with POS consensus mechanism and people can join the network as validators and get rewards?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10495" PostHistoryTypeId="1" PostId="2801" RevisionGUID="150612fb-be55-4ef5-bc2a-425ce6f7113f" CreationDate="2022-05-23T12:55:05.330" UserId="427" Text="Guidelines for Substrate based standalone blockchain with POS consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="10496" PostHistoryTypeId="3" PostId="2801" RevisionGUID="150612fb-be55-4ef5-bc2a-425ce6f7113f" CreationDate="2022-05-23T12:55:05.330" UserId="427" Text="|substrate-node|blockchain|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10497" PostHistoryTypeId="2" PostId="2802" RevisionGUID="f01b5199-b431-47f9-a239-a509ab5948eb" CreationDate="2022-05-23T12:56:50.157" UserId="1837" Text="I am trying to create structure for ink smart contract but it fails on build giving error &#xD;&#xA;&#xD;&#xA;Error msg&#xD;&#xA;&#xD;&#xA;-the trait `parity_scale_codec::WrapperTypeEncode` is not implemented for `ink_storage::Mapping&lt;u32, [u8; 32]`&#xD;&#xA;&#xD;&#xA;-required because of the requirements on the impl of `parity_scale_codec::Encode` for `ink_storage::Mapping&lt;u32, [u8; 32]&gt;`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Struct details &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Default, Encode, Decode, Debug, SpreadLayout, SpreadAllocate)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(StorageLayout))]&#xD;&#xA;pub struct Sample {&#xD;&#xA;    pub roots: Mapping&lt;u32, [u8; 32]&gt;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Do I need to implement `parity_scale_codec::Encode`? Any advice or help here is much appreciated.&#xD;&#xA;&#xD;&#xA;Thank you!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10499" PostHistoryTypeId="1" PostId="2802" RevisionGUID="f01b5199-b431-47f9-a239-a509ab5948eb" CreationDate="2022-05-23T12:56:50.157" UserId="1837" Text="parity_scale_codec::Encode is not implemented for ink_storage::Mapping&lt;u32, [u8; 32]&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10500" PostHistoryTypeId="3" PostId="2802" RevisionGUID="f01b5199-b431-47f9-a239-a509ab5948eb" CreationDate="2022-05-23T12:56:50.157" UserId="1837" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10501" PostHistoryTypeId="2" PostId="2803" RevisionGUID="c67ce671-25a3-4c65-a5c8-83e74e539e3a" CreationDate="2022-05-23T13:23:07.760" UserId="2600" Text="env：parity/polkadot:v0.9.22&#xD;&#xA;```&#xD;&#xA;network: polkadot&#xD;&#xA;  p2pPort: 30333&#xD;&#xA;  validator: false&#xD;&#xA;  syncMode: fast&#xD;&#xA;  pruning: true&#xD;&#xA;  retainedBlocks: 1024&#xD;&#xA;  logging: info&#xD;&#xA;  telemetry: false&#xD;&#xA;  telemetryURL: wss://telemetry.polkadot.io/submit/0&#xD;&#xA;  prometheus: true&#xD;&#xA;  prometheusPort: 9615&#xD;&#xA;  rpc: true&#xD;&#xA;  rpcPort: 9933&#xD;&#xA;  rpcMethods: unsafe&#xD;&#xA;  ws: true&#xD;&#xA;  wsPort: 9944&#xD;&#xA;  corsDomains:&#xD;&#xA;    - '*'&#xD;&#xA;  resources:&#xD;&#xA;    cpu: &quot;4&quot;&#xD;&#xA;    cpuLimit: &quot;8&quot;&#xD;&#xA;    memory: 4Gi&#xD;&#xA;    memoryLimit: 8Gi&#xD;&#xA;    storage: 80Gi&#xD;&#xA;    storageClass: gp2&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;execute code:&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;net_peerCount&quot;, &quot;params&quot;:[]}' http://localhost:9933&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error:&#xD;&#xA;```&#xD;&#xA;{&quot;code&quot;:-32601,&quot;message&quot;:&quot;Method not found&quot;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10503" PostHistoryTypeId="1" PostId="2803" RevisionGUID="c67ce671-25a3-4c65-a5c8-83e74e539e3a" CreationDate="2022-05-23T13:23:07.760" UserId="2600" Text="JSON-RPC method not found. code:-32601" ContentLicense="CC BY-SA 4.0" />
  <row Id="10504" PostHistoryTypeId="3" PostId="2803" RevisionGUID="c67ce671-25a3-4c65-a5c8-83e74e539e3a" CreationDate="2022-05-23T13:23:07.760" UserId="2600" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10509" PostHistoryTypeId="5" PostId="2601" RevisionGUID="13d0381a-c1ca-4ee3-adc0-759f4446a149" CreationDate="2022-05-23T13:40:24.607" UserId="18" Comment="added 220 characters in body" Text="As @Shawn mentioned you can try `--ws-max-out-buffer-capacity=99999`&#xD;&#xA;&#xD;&#xA;That worked for us&#xD;&#xA;&#xD;&#xA;Also, I confirmed that the ws connection disconnects at either refresh or if you navigate away from the tab&#xD;&#xA;&#xD;&#xA;You can see my discussion with Jago [here](https://github.com/polkadot-js/api/issues/4829)&#xD;&#xA;&#xD;&#xA;As noted, there has been a lot of work done on the `0.9.22` release to use the new `jsonrpsee` client that improves connections&#xD;&#xA;&#xD;&#xA;Some nodes are already running this client&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10510" PostHistoryTypeId="13" PostId="2601" RevisionGUID="e224fef7-aaaf-46b0-acac-644527551085" CreationDate="2022-05-23T13:40:31.613" UserId="18" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:18,&quot;DisplayName&quot;:&quot;Sam Elamin&quot;}]}" />
  <row Id="10511" PostHistoryTypeId="2" PostId="2805" RevisionGUID="1141afc9-f165-4be7-a798-533fff431028" CreationDate="2022-05-23T13:50:28.513" UserId="2601" Text="I am trying to install subkey, but this command does not work:&#xD;&#xA;&#xD;&#xA;```cargo install --force subkey --git https://github.com/paritytech/substrate --version 3.0 --locked```&#xD;&#xA;&#xD;&#xA;What am I doing wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10513" PostHistoryTypeId="1" PostId="2805" RevisionGUID="1141afc9-f165-4be7-a798-533fff431028" CreationDate="2022-05-23T13:50:28.513" UserId="2601" Text="Using subkey but cannot install" ContentLicense="CC BY-SA 4.0" />
  <row Id="10514" PostHistoryTypeId="3" PostId="2805" RevisionGUID="1141afc9-f165-4be7-a798-533fff431028" CreationDate="2022-05-23T13:50:28.513" UserId="2601" Text="|substrate-node|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10515" PostHistoryTypeId="2" PostId="2806" RevisionGUID="c76f6462-507b-4610-bb6f-0500171ac939" CreationDate="2022-05-23T14:36:20.837" UserId="34" Text="https://github.com/paritytech/substrate/blob/master/bin/utils/subkey/Cargo.toml#L3&#xD;&#xA;&#xD;&#xA;At the time of writing, the latest version is `2.0.1`. Use that one. &#xD;&#xA;```sh&#xD;&#xA;cargo install --force subkey --git https://github.com/paritytech/substrate --version 2.0.1 --locked&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;More info: https://docs.substrate.io/v3/tools/subkey/" ContentLicense="CC BY-SA 4.0" />
  <row Id="10517" PostHistoryTypeId="6" PostId="2805" RevisionGUID="e09918ec-265a-41de-83c2-67e1fe38384b" CreationDate="2022-05-23T14:36:33.173" UserId="34" Comment="edited tags" Text="|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10518" PostHistoryTypeId="5" PostId="2805" RevisionGUID="e09918ec-265a-41de-83c2-67e1fe38384b" CreationDate="2022-05-23T14:36:33.173" UserId="34" Comment="edited tags" Text="I am trying to install subkey, but this command does not work:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo install --force subkey --git https://github.com/paritytech/substrate --version 3.0 --locked&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I doing wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10519" PostHistoryTypeId="4" PostId="2805" RevisionGUID="e09918ec-265a-41de-83c2-67e1fe38384b" CreationDate="2022-05-23T14:36:33.173" UserId="34" Comment="edited tags" Text="Cannot install subkey 3.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="10520" PostHistoryTypeId="5" PostId="2799" RevisionGUID="3b7e8d73-be5b-433c-ba5a-0da47c6e3a72" CreationDate="2022-05-23T14:41:07.230" UserId="452" Comment="added 436 characters in body" Text="`GRANDPA Pause/Resume` have not been implemented in the substrate client code, therefore I would hold on implementing those for now.&#xD;&#xA;&#xD;&#xA;We need to track multiple pending `Pause / Resume` signals per-fork, like we do for standard changes. Otherwise if finality is halted and there's a pending `Pause / Resume` signal, a further one being issued would make it impossible to import such a block and halt block production as well. We might be able to get away with just refusing to import a block that triggers a `Pause` while there is still a pending one, but e.g. if the pause is being triggered by an automated process (governance), then this could lead to the death loop explained earlier. It's also important to make sure we don't enact a `Resume` (on block depth) before the corresponding `Pause` been enacted (on finality). In that case `next_change` should also consider the earliest pending `Pause` when voting to finalize.&#xD;&#xA;&#xD;&#xA;(Edited my original response significantly in light of your comment.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="10522" PostHistoryTypeId="6" PostId="2375" RevisionGUID="4a403f8b-6480-481d-b9ea-a07989e3347f" CreationDate="2022-05-23T16:29:08.323" UserId="28" Comment="edited tags" Text="|transactions|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10523" PostHistoryTypeId="2" PostId="2807" RevisionGUID="8ca18404-0108-408b-b652-591e99f8943f" CreationDate="2022-05-23T18:52:30.810" UserId="227" Text="You can derive this trait implementation automatically:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(scale::Encode, scale::Decode)]&#xD;&#xA;struct my_struct {&#xD;&#xA;  // …&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If it still doesn't work it would be great if you could create a minimal contract that produces this error on https://ink-playground.substrate.io/ and share a link to that code." ContentLicense="CC BY-SA 4.0" />
  <row Id="10525" PostHistoryTypeId="2" PostId="2808" RevisionGUID="8e6a8961-a3a0-4448-ba35-85558b50746f" CreationDate="2022-05-23T19:03:28.263" UserId="472" Text="*Update*: we have covered `ecdsa_recover` and `ecdsa_to_eth_address` functions with tests and now have them stabilized. So the next **ink!** release is going to have them ready for production contracts. You can always go ahead and build your contract with cutting edge **ink!** crates taken from the *[master][1]* branch if you just can't wait for the next release.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="10528" PostHistoryTypeId="2" PostId="2809" RevisionGUID="ae221ec6-5613-431d-b06e-1ae3d75a9db2" CreationDate="2022-05-23T20:03:34.377" UserId="425" Text="Trying to follow these examples:&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/docs/api-contract/start/code#create-a-blueprint&#xD;&#xA;&#xD;&#xA;which fails with:&#xD;&#xA;```&#xD;&#xA;createBlueprint is not a function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Seems like the examples in the documentation are diverged from the implementation? Is there a more up-to-date example, or better yet API documentation? " ContentLicense="CC BY-SA 4.0" />
  <row Id="10530" PostHistoryTypeId="1" PostId="2809" RevisionGUID="ae221ec6-5613-431d-b06e-1ae3d75a9db2" CreationDate="2022-05-23T20:03:34.377" UserId="425" Text="Outdated contract-api documentation" ContentLicense="CC BY-SA 4.0" />
  <row Id="10531" PostHistoryTypeId="3" PostId="2809" RevisionGUID="ae221ec6-5613-431d-b06e-1ae3d75a9db2" CreationDate="2022-05-23T20:03:34.377" UserId="425" Text="|polkadot-js|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10533" PostHistoryTypeId="2" PostId="2810" RevisionGUID="382fbfe7-59a2-437f-9abf-676d944ec950" CreationDate="2022-05-23T22:40:06.147" UserId="599" Text="Why do you want to `Encode` and `Decode` for a structure that contains `Mapping`? If you're going to implement `PackedLayout` - you can't. If you want to accept it as input - you can't. If you're going to return it - you can't=)&#xD;&#xA;&#xD;&#xA;`Encode` and `Decode` are not implemented for `Mapping` because `Mapping` doesn't contain any information inside. " ContentLicense="CC BY-SA 4.0" />
  <row Id="10535" PostHistoryTypeId="5" PostId="2810" RevisionGUID="5c7b4581-e7c3-43d6-838e-506283ede099" CreationDate="2022-05-23T23:07:41.997" UserId="599" Comment="added 70 characters in body" Text="Why do you want to `Encode` and `Decode` for a structure that contains `Mapping`? If you're going to implement `PackedLayout` - you can't. If you want to accept it as input - you can't. If you're going to return it - you can't=)&#xD;&#xA;&#xD;&#xA;`Encode` and `Decode` are not implemented for `Mapping` because `Mapping` doesn't contain any information inside. It only provides `get` and `insert` methods to manipulate the storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="10536" PostHistoryTypeId="2" PostId="2811" RevisionGUID="2ed3f204-9d86-45d6-a5c4-0dd7b7d68cc2" CreationDate="2022-05-24T00:28:02.247" UserId="299" Text="```bash&#xD;&#xA;2022-05-24 08:13:38.060  INFO                 main sc_service::builder: [Parachain]  Highest known block at #0    &#xD;&#xA;2022-05-24 08:13:38.060  INFO tokio-runtime-worker substrate_prometheus_endpoint: [Parachain] 〽️ Prometheus exporter started at 0.0.0.0:9779    &#xD;&#xA;2022-05-24 08:13:38.062  WARN tokio-runtime-worker parachain::bitfield-distribution: [Relaychain] Failed to fetch basics from runtime API relay_parent=0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe err=Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }&#xD;&#xA;2022-05-24 08:13:38.062  WARN tokio-runtime-worker parachain::dispute-coordinator: [Relaychain] error=RollingSessionWindow(SessionsUnavailable { kind: RuntimeApi(Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }), info: None })&#xD;&#xA;2022-05-24 08:13:38.062 ERROR tokio-runtime-worker parachain::bitfield-distribution: [Relaychain] Our view contains 0xb0a8…dafe, but not in active heads added=0xb0a8…dafe&#xD;&#xA;2022-05-24 08:13:38.063  INFO                 main parity_ws: [Parachain] Listening for new connections on 0.0.0.0:8847.    &#xD;&#xA;2022-05-24 08:13:38.071  WARN tokio-runtime-worker parachain::candidate-backing: [Relaychain] Failed to fetch runtime API data for job err=Execution { runtime_api_name: &quot;validator_groups&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_validator_groups is not found&quot;))) }&#xD;&#xA;2022-05-24 08:13:38.073  WARN tokio-runtime-worker parachain::dispute-distribution: [Relaychain] error=Sender(Runtime(RuntimeRequest(Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }))) ctx=&quot;on FromOverseer&quot;&#xD;&#xA;2022-05-24 08:13:38.076 ERROR tokio-runtime-worker polkadot_node_subsystem_util: [Relaychain] job finished with an error job=&quot;bitfield-signing-job&quot; parent_hash=0xb0a8…dafe err=Util(RuntimeApi(Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }))&#xD;&#xA;2022-05-24 08:13:38.572  INFO tokio-runtime-worker sub-libp2p: [Parachain]  Discovered new external address for our node: /ip6/240e:390:e57:f950:4a6:6409:91fb:8040/tcp/40336/p2p/12D3KooWHJ8XuP92wAG5qgoUTiDbGvgwFbB1WAQpvKxCp77Km5ZN    &#xD;&#xA;2022-05-24 08:13:38.572  INFO tokio-runtime-worker sub-libp2p: [Relaychain]  Discovered new external address for our node: /ip6/240e:390:e57:f950:4a6:6409:91fb:8040/tcp/30346/ws/p2p/12D3KooWJA8i7TCgjBZKcZWnchrMsKN7dFJvrtRSfoE86dPgAPjc    &#xD;&#xA;2022-05-24 08:13:39.085  INFO tokio-runtime-worker sub-libp2p: [Relaychain]  Discovered new external address for our node: /ip4/115.198.90.209/tcp/30346/ws/p2p/12D3KooWJA8i7TCgjBZKcZWnchrMsKN7dFJvrtRSfoE86dPgAPjc    &#xD;&#xA;2022-05-24 08:13:41.105  WARN tokio-runtime-worker parachain::dispute-coordinator: [Relaychain] Received msg before first active leaves update. This is not expected - message will be dropped. msg=ActiveDisputes(Sender { complete: false })&#xD;&#xA;2022-05-24 08:13:41.105  WARN tokio-runtime-worker parachain::dispute-distribution: [Relaychain] error=Sender(AskActiveDisputesCanceled) ctx=&quot;on FromOverseer&quot;&#xD;&#xA;2022-05-24 08:13:43.047  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing, target=#12816475 (17 peers), best: #2826 (0xd05d…92e7), finalized #2560 (0x95cd…876e), ⬇ 362.8kiB/s ⬆ 34.9kiB/s    &#xD;&#xA;2022-05-24 08:13:43.063  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x1cf1…a1b9), finalized #0 (0x1cf1…a1b9), ⬇ 0.7kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2022-05-24 08:13:48.048  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 1073.2 bps, target=#12816475 (25 peers), best: #8192 (0x4b7e…af70), finalized #8192 (0x4b7e…af70), ⬇ 477.8kiB/s ⬆ 26.5kiB/s    &#xD;&#xA;2022-05-24 08:13:48.066  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x1cf1…a1b9), finalized #0 (0x1cf1…a1b9), ⬇ 58 B/s ⬆ 60 B/s    &#xD;&#xA;2022-05-24 08:13:53.049  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 843.2 bps, target=#12816476 (25 peers), best: #12408 (0x79e4…c0ff), finalized #12288 (0xe1b8…1b9f), ⬇ 347.5kiB/s ⬆ 17.2kiB/s    &#xD;&#xA;2022-05-24 08:13:53.066  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x1cf1…a1b9), finalized #0 (0x1cf1…a1b9), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-24 08:13:58.049  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 611.2 bps, target=#12816477 (26 peers), best: #15464 (0xe8e1…660d), finalized #14849 (0x7ad6…e8e7), ⬇ 409.8kiB/s ⬆ 46.4kiB/s    &#xD;&#xA;2022-05-24 08:13:58.066  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x1cf1…a1b9), finalized #0 (0x1cf1…a1b9), ⬇ 61 B/s ⬆ 61 B/s    &#xD;&#xA;2022-05-24 08:14:03.049  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 1154.2 bps, target=#12816478 (27 peers), best: #21235 (0x16bb…7f18), finalized #20480 (0xa143…9640), ⬇ 405.2kiB/s ⬆ 22.2kiB/s    &#xD;&#xA;2022-05-24 08:14:03.067  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x1cf1…a1b9), finalized #0 (0x1cf1…a1b9), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-24 08:14:08.051  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 856.8 bps, target=#12816479 (28 peers), best: #25520 (0x311a…0fbf), finalized #25088 (0xbb53…2395), ⬇ 418.9kiB/s ⬆ 27.3kiB/s    &#xD;&#xA;2022-05-24 08:14:08.070  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x1cf1…a1b9), finalized #0 (0x1cf1…a1b9), ⬇ 0 ⬆ 0    &#xD;&#xA;......etc&#xD;&#xA;```&#xD;&#xA;I don't know if this affects the operation of parallel chains.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10538" PostHistoryTypeId="1" PostId="2811" RevisionGUID="2ed3f204-9d86-45d6-a5c4-0dd7b7d68cc2" CreationDate="2022-05-24T00:28:02.247" UserId="299" Text="ERROR reports occur when parallelchain synchronize KSM blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="10539" PostHistoryTypeId="3" PostId="2811" RevisionGUID="2ed3f204-9d86-45d6-a5c4-0dd7b7d68cc2" CreationDate="2022-05-24T00:28:02.247" UserId="299" Text="|parachain|kusama|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10540" PostHistoryTypeId="2" PostId="2812" RevisionGUID="2744fd33-5293-4fc1-b88d-5a07ea913d8a" CreationDate="2022-05-24T01:41:14.720" UserId="372" Text="I know for a while after Substrate 2.0 came out, there were occasional releases on crates.io. I thought that practice had stopped and been replaced with git annotations of two different varieties&#xD;&#xA;&#xD;&#xA;* Monthly Substrate release tags like: https://github.com/paritytech/substrate/releases/tag/monthly-2022-05&#xD;&#xA;* Substrate releases branches to Polkadot releases like: https://github.com/paritytech/substrate/tree/polkadot-v0.9.22&#xD;&#xA;&#xD;&#xA;But today I noticed, some of the crate published on crates.io are up to higher version numbers. For example [sp-core](https://crates.io/crates/sp-core) is up to 6.0.0.&#xD;&#xA;&#xD;&#xA;So is Substrate still being published on crates.io? And if so, can I use the latest version of each package and expect them to be compatible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10542" PostHistoryTypeId="1" PostId="2812" RevisionGUID="2744fd33-5293-4fc1-b88d-5a07ea913d8a" CreationDate="2022-05-24T01:41:14.720" UserId="372" Text="Is Substrate actively published on crates.io" ContentLicense="CC BY-SA 4.0" />
  <row Id="10543" PostHistoryTypeId="3" PostId="2812" RevisionGUID="2744fd33-5293-4fc1-b88d-5a07ea913d8a" CreationDate="2022-05-24T01:41:14.720" UserId="372" Text="|releases|crates-io|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10544" PostHistoryTypeId="2" PostId="2813" RevisionGUID="efec2a3f-44d9-4939-b69f-3445988114d4" CreationDate="2022-05-24T01:41:51.623" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="10546" PostHistoryTypeId="1" PostId="2813" RevisionGUID="efec2a3f-44d9-4939-b69f-3445988114d4" CreationDate="2022-05-24T01:41:51.623" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="10547" PostHistoryTypeId="2" PostId="2814" RevisionGUID="3f14990a-d653-4e9e-835b-462300abeb80" CreationDate="2022-05-24T01:41:51.623" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="10549" PostHistoryTypeId="1" PostId="2814" RevisionGUID="3f14990a-d653-4e9e-835b-462300abeb80" CreationDate="2022-05-24T01:41:51.623" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="10550" PostHistoryTypeId="2" PostId="2815" RevisionGUID="00f81c1b-2c32-4fe2-9ee2-f971aa8959bc" CreationDate="2022-05-24T05:19:03.607" UserId="85" Text="I understand that every so often the metadata version gets changed with runtime upgrades over time. What I'm not clear about is how does this affect trying to access the older blocks?&#xD;&#xA;&#xD;&#xA;Today, will one version of the metadata decode all blocks from genesis to the head on a single parachain? Or do I need to have all the metadata versions that were used to be able to go back in time all the way to genesis? (If this is the case, is there a way to know at which blocks the metadata version transitions occur?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="10552" PostHistoryTypeId="1" PostId="2815" RevisionGUID="00f81c1b-2c32-4fe2-9ee2-f971aa8959bc" CreationDate="2022-05-24T05:19:03.607" UserId="85" Text="At this point in time will one version of the metadata decode all blocks from genesis to the latest on a single parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10553" PostHistoryTypeId="3" PostId="2815" RevisionGUID="00f81c1b-2c32-4fe2-9ee2-f971aa8959bc" CreationDate="2022-05-24T05:19:03.607" UserId="85" Text="|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10554" PostHistoryTypeId="2" PostId="2816" RevisionGUID="46118a94-01b9-42a6-b9ec-816e8d9578b9" CreationDate="2022-05-24T05:38:38.367" UserId="627" Text="You need to decode events/extrinsics/errors/etc. with the metadata at that point in the runtime. With different upgrades types change, indexes move around, pallets are added, etc. There is no one-size-fits-all.&#xD;&#xA;&#xD;&#xA;So you would effectively need to query the runtime version for the point at which you would like the values and then, if you don't have metadata corresponding to this, retrieve it and use it for decoding. (On relays the `system.CodeUpdated` event also shows when an upgrade has been applied, in addition to the change in runtime version)&#xD;&#xA;&#xD;&#xA;It is slightly more tricky to retrieve the specific metadata, since the version update already shows at the end of the block processing, but using the new update only kicks in at the start of the next. &#xD;&#xA;&#xD;&#xA;So if an upgrade happens at block X, the extrinsics in that block is processed with the metadata from block X-1, however the new metadata will be used to process anything at X+1. So basically the metadata that is to be used for decoding (and what was used for block processing) is what is available on the block parent." ContentLicense="CC BY-SA 4.0" />
  <row Id="10556" PostHistoryTypeId="2" PostId="2817" RevisionGUID="8617675c-4a5c-4cb0-96a8-5fe9882575f9" CreationDate="2022-05-24T06:38:13.743" UserId="85" Text="Not at the moment. There's _a lot_ of crates in substrate. For now monthly branches are created and branches for each polkadot version as you have observed. I think using those are the best option. That said a small subset of crates are published on a regular basis, for example https://crates.io/crates/ss58-registry ." ContentLicense="CC BY-SA 4.0" />
  <row Id="10558" PostHistoryTypeId="2" PostId="2818" RevisionGUID="3d2ab5a5-0baa-4d3e-af3b-b118c6c30655" CreationDate="2022-05-24T06:44:56.717" UserId="125" Text="I feel a little confused about the usage of `mem::forget(...)` when reading `impl Imbalance&lt;T::Balance&gt; for PositiveImbalance&lt;T, I&gt;` in `pallet-balances` pallet.&#xD;&#xA;&#xD;&#xA;Accord the `forget` docs:&#xD;&#xA;&#xD;&#xA;&gt; Takes ownership and “forgets” about the value without running its destructor.&#xD;&#xA;&#xD;&#xA;Why not use `drop` to dispose of the value forever, any specific reason for this?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;fn split(self, amount: T::Balance) -&gt; (Self, Self) {&#xD;&#xA;	let first = self.0.min(amount);&#xD;&#xA;	let second = self.0 - first;&#xD;&#xA;&#xD;&#xA;	mem::forget(self); // here&#xD;&#xA;	(Self(first), Self(second))&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10560" PostHistoryTypeId="1" PostId="2818" RevisionGUID="3d2ab5a5-0baa-4d3e-af3b-b118c6c30655" CreationDate="2022-05-24T06:44:56.717" UserId="125" Text="Why not `mem::drop(self)` here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10561" PostHistoryTypeId="3" PostId="2818" RevisionGUID="3d2ab5a5-0baa-4d3e-af3b-b118c6c30655" CreationDate="2022-05-24T06:44:56.717" UserId="125" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10562" PostHistoryTypeId="2" PostId="2819" RevisionGUID="5ed5e0f9-9ce8-4abb-9185-c7b7e4a6393a" CreationDate="2022-05-24T07:02:56.510" UserId="2132" Text="Thank you @Jaco!!! It was entertaining following along with the description! Retrieved both the block you linked and a new one and checked it against Subscan based on [the answer](https://substrate.stackexchange.com/questions/2696/how-to-use-the-scale-decoder-to-parse-extrinsics/2706#2706).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// https://westend.subscan.io/block/0x3a0ab3cfddfed654683749546ddc7c4d71e73ee46b32f7575aca314f164d32b8&#xD;&#xA;// https://westend.subscan.io/extrinsic/10463935-0&#xD;&#xA;// ms=1650269658001 timestamp=2022-04-18T08:14:18.001Z&#xD;&#xA;decode('0x280402000b919bbc3b8001')&#xD;&#xA;&#xD;&#xA;// https://westend.subscan.io/block/0xdbde06feb935a5b1734e5d8af455511bfb577cd9c790b92aada6d0518a68a7e1&#xD;&#xA;// https://westend.subscan.io/extrinsic/10978912-0&#xD;&#xA;// ms=1653374694003 timestamp=2022-05-24T06:44:54.003Z&#xD;&#xA;decode('0x280402000b73b2cff48001')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Probably not the best approach ever, but coded up as described.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;function read_compact (bin) {&#xD;&#xA;	// retrieve the compact flag to determine logic&#xD;&#xA;	const flag = bin[0] &amp; 0b00000011&#xD;&#xA;&#xD;&#xA;	if (flag === 0b00000000) {&#xD;&#xA;		// this is only a single byte&#xD;&#xA;		return [bin[0] &gt;&gt;&gt; 2, 1]&#xD;&#xA;	} else if (flag === 0b00000011) {&#xD;&#xA;		// the number of bytes we need to use&#xD;&#xA;		const index = (bin[0] &gt;&gt;&gt; 2) + 4&#xD;&#xA;		let result = 0&#xD;&#xA;&#xD;&#xA;		// this is LE, so we start from the back&#xD;&#xA;		for (let i = index; i &gt; 0; i--) {&#xD;&#xA;			result = (result * 256) + bin[i]&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		return [result, index + 1]&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// TODO we need to handle 0b00000001 &amp; 0x00000010&#xD;&#xA;	throw new Error(&quot;FATAL: Unhandled compact flag &quot; + flag)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function read_version (bin) {&#xD;&#xA;	// one byte only, the signed flag is the top-most bit&#xD;&#xA;	return [(bin[0] &amp; 0b1000000) === 0b1000000, bin[0] &amp; 0b01111111];&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function read_tx_index (bin) {&#xD;&#xA;	// the first byte is the moodule index, the second byte is the&#xD;&#xA;	// method index inside the module&#xD;&#xA;	return [bin[0], bin[1]];&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function decode (hex) {&#xD;&#xA;	// ppor man's version of hex to bytes&#xD;&#xA;	let bin = hex.split(/(?=(?:..)*$)/).slice(1).map((x) =&gt; parseInt(x, 16))&#xD;&#xA;&#xD;&#xA;	// read the overall length of the extrinsic&#xD;&#xA;	const [ex_length, offset] = read_compact(bin)&#xD;&#xA;&#xD;&#xA;	console.log(&quot;extrinsic length=&quot; + ex_length)&#xD;&#xA;&#xD;&#xA;	// we are done with these bytes, next&#xD;&#xA;	bin = bin.slice(offset)&#xD;&#xA;&#xD;&#xA;	// read the version and signed flag&#xD;&#xA;	const [signed, version] = read_version(bin)&#xD;&#xA;&#xD;&#xA;	console.log(&quot;version=&quot; + version + &quot; signed=&quot; + signed)&#xD;&#xA;&#xD;&#xA;	// we only handle decoding of unsigned extrinsics&#xD;&#xA;	if (signed) {&#xD;&#xA;		throw new Error(&quot;FATAL: Currently only dealing with unsigned transactions&quot;)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// we are done with the version, next&#xD;&#xA;	bin = bin.slice(1)&#xD;&#xA;&#xD;&#xA;	// read the transaction index&#xD;&#xA;	const [mod_idx, met_idx] = read_tx_index(bin)&#xD;&#xA;&#xD;&#xA;	console.log(&quot;Module=&quot; + mod_idx + &quot; method=&quot; + met_idx)&#xD;&#xA;&#xD;&#xA;	// yes, I know these should come from metadata&#xD;&#xA;	if (mod_idx !== 2 || met_idx !== 0) {&#xD;&#xA;		throw new Error(&quot;FATAL: We can only deal with timestamp.set&quot;)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// we are done with the method indexes, next&#xD;&#xA;	bin = bin.slice(2)&#xD;&#xA;&#xD;&#xA;	// read the timestamp compact&#xD;&#xA;	const [ts_ms] = read_compact(bin)&#xD;&#xA;&#xD;&#xA;	console.log(&quot;ms=&quot; + ts_ms + &quot; timestamp=&quot; + new Date(ts_ms).toISOString())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// https://westend.subscan.io/block/0x3a0ab3cfddfed654683749546ddc7c4d71e73ee46b32f7575aca314f164d32b8&#xD;&#xA;// https://westend.subscan.io/extrinsic/10463935-0&#xD;&#xA;// ms=1650269658001 timestamp=2022-04-18T08:14:18.001Z&#xD;&#xA;decode('0x280402000b919bbc3b8001')&#xD;&#xA;&#xD;&#xA;// https://westend.subscan.io/block/0xdbde06feb935a5b1734e5d8af455511bfb577cd9c790b92aada6d0518a68a7e1&#xD;&#xA;// https://westend.subscan.io/extrinsic/10978912-0&#xD;&#xA;// ms=1653374694003 timestamp=2022-05-24T06:44:54.003Z&#xD;&#xA;decode('0x280402000b73b2cff48001')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Will have to post another question around the other 2 flags in compact as of now I'm sure there will be compacts the above cannot read as of yet. This is purely for entertainment purposes, at least I learned a bit of what makes up the transactions here" ContentLicense="CC BY-SA 4.0" />
  <row Id="10568" PostHistoryTypeId="2" PostId="2821" RevisionGUID="567c4f52-8329-45cc-809c-7fab1eb775d5" CreationDate="2022-05-24T07:24:45.857" UserId="340" Text="So using the --chain option and by reading https://github.com/paritytech/polkadot/blob/master/cli/src/command.rs#L84&#xD;&#xA;&#xD;&#xA;I was able to figure out some key differences between each chain spec and sub type(environment).&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;&#xD;&#xA;**Sudo enabled chains:**&#xD;&#xA;&#xD;&#xA;| ChainName | Sudo |&#xD;&#xA;|---|---|&#xD;&#xA;|Kusama| no |&#xD;&#xA;|Polkadot|no|&#xD;&#xA;|Westend|yes|&#xD;&#xA;|Rococo|Yes|&#xD;&#xA;|Wococo|Yes|&#xD;&#xA;|Versi|Yes|&#xD;&#xA;&#xD;&#xA;When using a chain with sudo, the extrinsic (With Alice extrinsic.sudo.sudo(call) .staking. setValidatorCount :u32) was applied immediately into the chain and took effect the same.&#xD;&#xA;&#xD;&#xA;Now looking at the chain spec subtypes only Kusama, Polkadot and Westend have validators with the others having only parachain components (no staking).&#xD;&#xA;&#xD;&#xA;&lt;br&gt;&#xD;&#xA;&#xD;&#xA;**Validator setup &amp; keys:**&#xD;&#xA;&#xD;&#xA;|--chain|Description|&#xD;&#xA;|---|---|&#xD;&#xA;|polkadot| Production Spec |&#xD;&#xA;|polkadot-dev|Single node validator (Alice) /1 slot|&#xD;&#xA;|polkadot-local|Dual node validators (Alice &amp; Bob) /2 slots|&#xD;&#xA;|polkadot-staging| 4 nodes set (not using built in dev accounts) /50 slots|&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So what I want is a blend of local and staging! So I used `polkadot build-spec --chain $CHAINNAME &gt; $CHAINNAME.json` to write the two specs of interest and compared them to find that I could set the validator slots and keys and balances etc.&#xD;&#xA;Once modifications have been made and saved into new file, simply update --chain to reference the new file and you have your custom chain spec to use for testing." ContentLicense="CC BY-SA 4.0" />
  <row Id="10570" PostHistoryTypeId="2" PostId="2822" RevisionGUID="b1aea9b0-8927-45d6-bd9c-c32c4103b9b3" CreationDate="2022-05-24T07:27:00.637" UserId="620" Text="Take a look at the [trait docs](https://github.com/paritytech/substrate/blob/0f6b5734e8ff52199987b496b2ef7bfd51655198/frame/support/src/traits/tokens/imbalance.rs#L71) - `fn split` is meant to return two more instances of `Self` that still need to be handled. You cannot `drop` an `Imbalance` that's yet to be handled because it has a [custom `Drop` impl](https://github.com/paritytech/substrate/blob/0f6b5734e8ff52199987b496b2ef7bfd51655198/frame/balances/src/lib.rs#L1101L111) that adjusts `TotalIssuance` when an imbalance gets dropped from memory:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&lt;I&gt;, I: 'static&gt; Drop for PositiveImbalance&lt;T, I&gt; {&#xD;&#xA;	/// Basic drop handler will just square up the total issuance.&#xD;&#xA;	fn drop(&amp;mut self) {&#xD;&#xA;		&lt;super::TotalIssuance&lt;T, I&gt;&gt;::mutate(&#xD;&#xA;			|v| *v = v.saturating_add(self.0)&#xD;&#xA;		);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&lt;I&gt;, I: 'static&gt; Drop for NegativeImbalance&lt;T, I&gt; {&#xD;&#xA;	/// Basic drop handler will just square up the total issuance.&#xD;&#xA;	fn drop(&amp;mut self) {&#xD;&#xA;		&lt;super::TotalIssuance&lt;T, I&gt;&gt;::mutate(&#xD;&#xA;			|v| *v = v.saturating_sub(self.0)&#xD;&#xA;		);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10572" PostHistoryTypeId="2" PostId="2823" RevisionGUID="7eab6a7e-427f-46bd-857b-26ce0649ff9b" CreationDate="2022-05-24T07:49:20.033" UserId="100" Text="The current `api-contract` documentation is very outdated. We are working on updating it as we speak.&#xD;&#xA;&#xD;&#xA;The `createBlueprint` is no longer available. You can use `CodePromise` to upload and instantiate new code and `BlueprintPromise` to instantiate code that is already on-chain. &#xD;&#xA;&#xD;&#xA;The 2 classes respectively map to the `instantiate_with_code` and `instantiate` dispatchables in the Substrate FRAME contracts pallet&#xD;&#xA;&#xD;&#xA;In both cases you would instantiate by calling `tx[constructorName]` on the resulting object (code or blueprint) with the right arguments. &#xD;&#xA;&#xD;&#xA;You can read more about the arguments in the [metadata section][1]&#xD;&#xA;and also refer to the implementation in Polkadot.js Apps for [Blueprint][2] and [Code][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/extrinsics#instantiatevalue-compactu128-gas_limit-compactu64-storage_deposit_limit-optioncompactu128-code_hash-h256-data-bytes-salt-bytes&#xD;&#xA;  [2]: https://github.com/polkadot-js/apps/blob/e9bb234b1fa9f4d7f227808fc0c9ff6a00db0b40/packages/page-contracts/src/Contracts/Deploy.tsx#L57&#xD;&#xA;  [3]: https://github.com/polkadot-js/apps/blob/e9bb234b1fa9f4d7f227808fc0c9ff6a00db0b40/packages/page-contracts/src/Codes/Upload.tsx#L44" ContentLicense="CC BY-SA 4.0" />
  <row Id="10574" PostHistoryTypeId="2" PostId="2824" RevisionGUID="5c66a0cd-8ce9-409f-86eb-04625c524425" CreationDate="2022-05-24T08:32:46.327" UserId="529" Text="The contract's source code is provided during the contract verification on a block explorer (or some other source verifier).&#xD;&#xA;The block explorer needs to compile that source and verify if the generated code is the same as the one deployed on the blockchain.&#xD;&#xA;Is it reasonable to expect that cargo-contract will build the same blob regardless the compile environment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10576" PostHistoryTypeId="1" PostId="2824" RevisionGUID="5c66a0cd-8ce9-409f-86eb-04625c524425" CreationDate="2022-05-24T08:32:46.327" UserId="529" Text="Is the WASM blob created from ink! contract always deterministic" ContentLicense="CC BY-SA 4.0" />
  <row Id="10577" PostHistoryTypeId="3" PostId="2824" RevisionGUID="5c66a0cd-8ce9-409f-86eb-04625c524425" CreationDate="2022-05-24T08:32:46.327" UserId="529" Text="|ink|smart-contract|wasm|wasmi|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10578" PostHistoryTypeId="2" PostId="2825" RevisionGUID="a743ef18-4389-4b0b-bb44-723247d1a193" CreationDate="2022-05-24T08:38:43.900" UserId="301" Text="This rpc is in [frontier][1], not substrate. If you want this rpc, plz add frontier to your node, follow this [guide][2] to integrate frontier.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/frontier/blob/master/client/rpc-core/src/net.rs&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/v3/frontier/" ContentLicense="CC BY-SA 4.0" />
  <row Id="10580" PostHistoryTypeId="2" PostId="2826" RevisionGUID="045ef1f9-e1b2-4323-8e84-724c7c3708bd" CreationDate="2022-05-24T08:38:55.183" UserId="2481" Text="Because of the error (unsupported metadata version: 14). I see that version v.4.0.0 already supports metadata 14. But I can't find the link of GitHub in Java. I hope to get help" ContentLicense="CC BY-SA 4.0" />
  <row Id="10582" PostHistoryTypeId="1" PostId="2826" RevisionGUID="045ef1f9-e1b2-4323-8e84-724c7c3708bd" CreationDate="2022-05-24T08:38:55.183" UserId="2481" Text="What is the GitHub address of Java polkaj v.4.0.0? Is there a friend who can tell me?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10583" PostHistoryTypeId="3" PostId="2826" RevisionGUID="045ef1f9-e1b2-4323-8e84-724c7c3708bd" CreationDate="2022-05-24T08:38:55.183" UserId="2481" Text="|java|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10584" PostHistoryTypeId="2" PostId="2827" RevisionGUID="997b6042-0914-4931-84e2-248606b2028e" CreationDate="2022-05-24T08:49:00.843" UserId="368" Text="PolkaJ is not maintained actively anymore, so Metadata v14 is not supported. See https://github.com/emeraldpay/polkaj/issues/88." ContentLicense="CC BY-SA 4.0" />
  <row Id="10586" PostHistoryTypeId="2" PostId="2828" RevisionGUID="f8d21db7-e053-4fd4-a6dd-08fe93dd4d8c" CreationDate="2022-05-24T09:09:25.943" UserId="2561" Text="The error described below is produced when attempting to compile the node upgraded to v3. The Cargo.toml files indeed specify the js feature; the issue occurs when compiling packages within Cargo.lock, which include the getrandom package. As getrandom is the direct dependency of those packages, I am not sure how to specify js feature for them as well. &#xD;&#xA;Please let me know what can be done to resolve this issue. &#xD;&#xA;&#xD;&#xA;Compiling getrandom v0.2.6&#xD;&#xA;  error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /Users/raid/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.6/src/lib.rs:235:9&#xD;&#xA;      |&#xD;&#xA;  235 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  236 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  237 | |                         For more information see: \&#xD;&#xA;  238 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^" ContentLicense="CC BY-SA 4.0" />
  <row Id="10588" PostHistoryTypeId="1" PostId="2828" RevisionGUID="f8d21db7-e053-4fd4-a6dd-08fe93dd4d8c" CreationDate="2022-05-24T09:09:25.943" UserId="2561" Text="Substrate Node v3 Compilation error" ContentLicense="CC BY-SA 4.0" />
  <row Id="10589" PostHistoryTypeId="3" PostId="2828" RevisionGUID="f8d21db7-e053-4fd4-a6dd-08fe93dd4d8c" CreationDate="2022-05-24T09:09:25.943" UserId="2561" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10590" PostHistoryTypeId="5" PostId="2824" RevisionGUID="e5229d61-f19b-41a1-ad30-5c2f3971ca96" CreationDate="2022-05-24T10:03:12.473" UserId="529" Comment="added 5 characters in body" Text="The contract's source code is provided during the contract verification on a block explorer (or some other source verifier).&#xD;&#xA;The block explorer needs to compile that source and verify if the generated code is the same as the one deployed on the blockchain.&#xD;&#xA;Is it reasonable to expect that cargo-contract will build the same wasm blob regardless the compile environment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10591" PostHistoryTypeId="2" PostId="2829" RevisionGUID="cad78589-5666-4b3f-a53a-243972da5fa7" CreationDate="2022-05-24T10:33:53.497" UserId="506" Text="While this might not be the most practical immediate solution, highly recommend getting Apple M1. Builds drastically reduced to a few minutes." ContentLicense="CC BY-SA 4.0" />
  <row Id="10594" PostHistoryTypeId="4" PostId="2828" RevisionGUID="270c1bdd-2121-4198-aaa3-8b4cf7b864c2" CreationDate="2022-05-24T11:54:17.107" UserId="2561" Comment="edited title" Text="Substrate Node v3.0 getrandom Compilation error" ContentLicense="CC BY-SA 4.0" />
  <row Id="10595" PostHistoryTypeId="2" PostId="2830" RevisionGUID="f3c12734-e09f-4831-885a-25d6455fd105" CreationDate="2022-05-24T12:05:48.963" UserId="2132" Text="In this [answer](https://substrate.stackexchange.com/a/2706/2132) the compact decoding for 1 byte and multi-byte versions have been detailed. I [did a sample implementation](https://substrate.stackexchange.com/a/2819/2132) based on that information and it does what it is supposed to, at least for the specific usecase. (My toy obviously has holes, but it is more for my understanding as opposed to be production hardened)&#xD;&#xA;&#xD;&#xA;However, the original answer didn't quite detail the decoding of the `0b01` and `0b10` flags as the last 2 bits of a compact first byte, based on that I have a gap in my knowledge which I really want to close out. &#xD;&#xA;&#xD;&#xA;I would appreciate a full run-through answer, basically a &quot;this is how to decode all compact numbers (for dummies)&quot;.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10597" PostHistoryTypeId="1" PostId="2830" RevisionGUID="f3c12734-e09f-4831-885a-25d6455fd105" CreationDate="2022-05-24T12:05:48.963" UserId="2132" Text="Compact SCALE decoding" ContentLicense="CC BY-SA 4.0" />
  <row Id="10598" PostHistoryTypeId="3" PostId="2830" RevisionGUID="f3c12734-e09f-4831-885a-25d6455fd105" CreationDate="2022-05-24T12:05:48.963" UserId="2132" Text="|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10599" PostHistoryTypeId="2" PostId="2831" RevisionGUID="2f527133-ef29-42ff-a8a6-08cb6ccc3cf5" CreationDate="2022-05-24T12:50:33.913" UserId="258" Text="I am trying to implement the PSP22 token standard but getting errors when building my contract.&#xD;&#xA;The errors are:&#xD;&#xA;&#xD;&#xA;`#[brush::contract]`&#xD;&#xA;&#xD;&#xA;`| ^^^^^^^^^^^^^^^^^^ use of undeclared crate or module psp22metadata_external`&#xD;&#xA;&#xD;&#xA;`impl PSP22 for MyPSP22 {}`&#xD;&#xA;&#xD;&#xA;`| ^^^^^ use of undeclared type PSP22`&#xD;&#xA;&#xD;&#xA;`impl PSP22Metadata for MyPSP22 {}`&#xD;&#xA;&#xD;&#xA;`| ^^^^^^^^^^^^^ use of undeclared type PSP22Metadata`&#xD;&#xA;&#xD;&#xA;`#[derive(Default, SpreadAllocate, PSP22Storage, PSP22MetadataStorage)]&#xD;&#xA;   | `                                                    ^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;`error: cannot find attribute `PSP22StorageField` in this scope`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am following this tutorial put up [here][1] via [here][2].&#xD;&#xA;&#xD;&#xA;My brush crate version is v1.6.1&#xD;&#xA;&#xD;&#xA;I noticed the import statement which is &#xD;&#xA;&#xD;&#xA;`use brush::contracts::psp22::extensions::metadata::*;` is not resolving at all.&#xD;&#xA;&#xD;&#xA;How can i go about this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Supercolony-net/openbrush-contracts/blob/main/examples/psp22_extensions/metadata/lib.rs&#xD;&#xA;  [2]: https://docs.openbrush.io/smart-contracts/PSP22/Extensions/metadata/" ContentLicense="CC BY-SA 4.0" />
  <row Id="10601" PostHistoryTypeId="1" PostId="2831" RevisionGUID="2f527133-ef29-42ff-a8a6-08cb6ccc3cf5" CreationDate="2022-05-24T12:50:33.913" UserId="258" Text="Build Issues when implementing PSP22 token standard for ink! contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="10602" PostHistoryTypeId="3" PostId="2831" RevisionGUID="2f527133-ef29-42ff-a8a6-08cb6ccc3cf5" CreationDate="2022-05-24T12:50:33.913" UserId="258" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10603" PostHistoryTypeId="2" PostId="2832" RevisionGUID="e9abd2c9-a49b-450e-aa32-589fc717312c" CreationDate="2022-05-24T13:47:34.680" UserId="258" Text="Turns out i was missing a features flag on my brush dependency.&#xD;&#xA;This solved it for me &#xD;&#xA;&#xD;&#xA;&gt; brush = { tag = &quot;v1.6.1&quot;, git =&#xD;&#xA;&gt; &quot;https://github.com/Supercolony-net/openbrush-contracts&quot;,&#xD;&#xA;&gt; default-features = false, features = [&quot;psp22&quot;] }" ContentLicense="CC BY-SA 4.0" />
  <row Id="10605" PostHistoryTypeId="52" PostId="2818" RevisionGUID="d38da282-876f-4df0-b189-e1a1ec946e91" CreationDate="2022-05-24T14:47:52.960" />
  <row Id="10606" PostHistoryTypeId="2" PostId="2833" RevisionGUID="e4d906c2-f89a-40bd-80dd-7b8e0bce6ce8" CreationDate="2022-05-24T14:48:39.303" UserId="140" Text="A few months ago, we worked on a parachain and have been trying to integrate into Kusama but we couldn't win the slot.&#xD;&#xA;&#xD;&#xA;This is affecting our business. Would it be possible to have a single code base for both solochain and parachain so that we can switch to either parachain or solochain according to the requirement?&#xD;&#xA;&#xD;&#xA;Or if we build a separate solochain, would it be easy to migrate storage into parachain, if we get slot in future for our parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10608" PostHistoryTypeId="1" PostId="2833" RevisionGUID="e4d906c2-f89a-40bd-80dd-7b8e0bce6ce8" CreationDate="2022-05-24T14:48:39.303" UserId="140" Text="Would it be possible to run solochain and parachain from single code base?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10609" PostHistoryTypeId="3" PostId="2833" RevisionGUID="e4d906c2-f89a-40bd-80dd-7b8e0bce6ce8" CreationDate="2022-05-24T14:48:39.303" UserId="140" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10610" PostHistoryTypeId="2" PostId="2834" RevisionGUID="475761d6-c0c5-429d-8bde-c350e441fe80" CreationDate="2022-05-24T15:42:32.443" UserId="2607" Text="I'm trying to write an off-chain test for an ink! smart-contract that uses chain extensions. The [example][1] showing how to mock an extension for tests is never using the supplied `_input` argument.&#xD;&#xA;&#xD;&#xA;The functions of my chain extension have the following signatures:&#xD;&#xA;```&#xD;&#xA;#[ink::chain_extension]&#xD;&#xA;pub trait BalanceExtension {&#xD;&#xA;    type ErrorCode = BalanceReadErr;&#xD;&#xA;&#xD;&#xA;    #[ink(extension = 1101, returns_result = false)]&#xD;&#xA;    fn fetch_balance(owner: ink_env::AccountId, asset: Asset) -&gt; u128;&#xD;&#xA;&#xD;&#xA;    #[ink(extension = 1102, returns_result = false, handle_status = false)]&#xD;&#xA;    fn transfer_balance(&#xD;&#xA;        from: ink_env::AccountId,&#xD;&#xA;        to: ink_env::AccountId,&#xD;&#xA;        asset: Asset,&#xD;&#xA;        amount: u128,&#xD;&#xA;    ) -&gt; ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;.&#xD;&#xA;&#xD;&#xA;For the tests I created a mock as follows:&#xD;&#xA;```&#xD;&#xA;        type FetchBalanceInput = [u8; 32 + 32 + 12]; // 1-&gt; owner:AccountId, 2-&gt; asset_issuer: [u8;32], 3-&gt; asset_code: [u8;12]&#xD;&#xA;&#xD;&#xA;        struct MockedBalanceExtension {&#xD;&#xA;            balances: Rc&lt;RefCell&lt;BalanceMapping&gt;&gt;,&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        impl ink_env::test::ChainExtension for MockedBalanceExtension {&#xD;&#xA;            /// The static function id of the chain extension.&#xD;&#xA;            fn func_id(&amp;self) -&gt; u32 {&#xD;&#xA;                1101&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            fn call(&amp;mut self, mut _input: &amp;[u8], output: &amp;mut Vec&lt;u8&gt;) -&gt; u32 {&#xD;&#xA;                // log input by panicking&#xD;&#xA;                // panic!(&quot;input: {:?}, length: {:?}&quot;, input, input.len(),);&#xD;&#xA;                let input: FetchBalanceInput =&#xD;&#xA;                    &lt;FetchBalanceInput as scale::Decode&gt;::decode(&amp;mut input).unwrap();&#xD;&#xA;&#xD;&#xA;                let mut account_array: [u8; 32] = Default::default();&#xD;&#xA;                account_array.copy_from_slice(&amp;input[0..32]);&#xD;&#xA;                let account_id = AccountId::from(account_array);&#xD;&#xA;&#xD;&#xA;                let mut issuer_array: [u8; 32] = Default::default();&#xD;&#xA;                issuer_array.copy_from_slice(&amp;input[32..64]);&#xD;&#xA;&#xD;&#xA;                let mut asset_code_array: [u8; 12] = Default::default();&#xD;&#xA;                asset_code_array.copy_from_slice(&amp;input[64..]);&#xD;&#xA;&#xD;&#xA;                let asset: Asset = (issuer_array, asset_code_array);&#xD;&#xA;&#xD;&#xA;                let map = self.balances.borrow_mut();&#xD;&#xA;                let balance = map.get(&amp;(account_id, asset)).unwrap_or_else(|| {&#xD;&#xA;                    panic!(&#xD;&#xA;                        &quot;No entry found for account_id: {:?}, asset: {:?}&quot;,&#xD;&#xA;                        account_id, asset,&#xD;&#xA;                    )&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;                scale::Encode::encode_to(&amp;balance, output);&#xD;&#xA;&#xD;&#xA;                0 // 0 is error code&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;Now when I test my smart contract and call the `fetch_balance` function with the following arguments: &#xD;&#xA;```&#xD;&#xA;let account_id = AccountId::from([0x01; 32]);&#xD;&#xA;let asset = ([0x02; 32], [0x03; 12]);&#xD;&#xA;fetch_balance(account_id, asset);&#xD;&#xA;```&#xD;&#xA;the panic! logs an input of ` [49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]` and I don't understand why. The 32x `1`s are obviously from the account_id but the passed `asset` argument is completely ignored and also what does the leading `49` mean?&#xD;&#xA;&#xD;&#xA;I looked a bit into the implementation of the chain extension and it seems that the `_input` that is passed to the `call()` is encoded beforehand, so I tried to decode it. But I logged both the passed `_input` without decoding it and with decoding (like shown in the snippet) and it does not change much. &#xD;&#xA;&#xD;&#xA;Has someone experience with testing a chain extension of ink! smart contracts while using the provided input argument? Am I missing something here? I'd appreciate any help. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/examples/rand-extension/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="10612" PostHistoryTypeId="1" PostId="2834" RevisionGUID="475761d6-c0c5-429d-8bde-c350e441fe80" CreationDate="2022-05-24T15:42:32.443" UserId="2607" Text="How to receive input for mocked ink_env::test::ChainExtension" ContentLicense="CC BY-SA 4.0" />
  <row Id="10613" PostHistoryTypeId="3" PostId="2834" RevisionGUID="475761d6-c0c5-429d-8bde-c350e441fe80" CreationDate="2022-05-24T15:42:32.443" UserId="2607" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10614" PostHistoryTypeId="5" PostId="2834" RevisionGUID="70ea2505-f2a0-4290-bbcc-8f6daa74b121" CreationDate="2022-05-24T15:45:30.850" UserId="2607" Comment="added 2 characters in body" Text="I'm trying to write an off-chain test for an ink! smart-contract that uses chain extensions. The [example][1] showing how to mock an extension for tests is never using the supplied `_input` argument.&#xD;&#xA;&#xD;&#xA;The functions of my chain extension have the following signatures:&#xD;&#xA;```&#xD;&#xA;#[ink::chain_extension]&#xD;&#xA;pub trait BalanceExtension {&#xD;&#xA;    type ErrorCode = BalanceReadErr;&#xD;&#xA;&#xD;&#xA;    #[ink(extension = 1101, returns_result = false)]&#xD;&#xA;    fn fetch_balance(owner: ink_env::AccountId, asset: Asset) -&gt; u128;&#xD;&#xA;&#xD;&#xA;    #[ink(extension = 1102, returns_result = false, handle_status = false)]&#xD;&#xA;    fn transfer_balance(&#xD;&#xA;        from: ink_env::AccountId,&#xD;&#xA;        to: ink_env::AccountId,&#xD;&#xA;        asset: Asset,&#xD;&#xA;        amount: u128,&#xD;&#xA;    ) -&gt; ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;.&#xD;&#xA;&#xD;&#xA;For the tests I created a mock as follows:&#xD;&#xA;```&#xD;&#xA;        type FetchBalanceInput = [u8; 32 + 32 + 12]; // 1-&gt; owner:AccountId, 2-&gt; asset_issuer: [u8;32], 3-&gt; asset_code: [u8;12]&#xD;&#xA;&#xD;&#xA;        struct MockedBalanceExtension {&#xD;&#xA;            balances: Rc&lt;RefCell&lt;BalanceMapping&gt;&gt;,&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        impl ink_env::test::ChainExtension for MockedBalanceExtension {&#xD;&#xA;            /// The static function id of the chain extension.&#xD;&#xA;            fn func_id(&amp;self) -&gt; u32 {&#xD;&#xA;                1101&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            fn call(&amp;mut self, mut _input: &amp;[u8], output: &amp;mut Vec&lt;u8&gt;) -&gt; u32 {&#xD;&#xA;                // log input by panicking&#xD;&#xA;                // panic!(&quot;input: {:?}, length: {:?}&quot;, _input, _input.len(),);&#xD;&#xA;                let input: FetchBalanceInput =&#xD;&#xA;                    &lt;FetchBalanceInput as scale::Decode&gt;::decode(&amp;mut input).unwrap();&#xD;&#xA;&#xD;&#xA;                let mut account_array: [u8; 32] = Default::default();&#xD;&#xA;                account_array.copy_from_slice(&amp;input[0..32]);&#xD;&#xA;                let account_id = AccountId::from(account_array);&#xD;&#xA;&#xD;&#xA;                let mut issuer_array: [u8; 32] = Default::default();&#xD;&#xA;                issuer_array.copy_from_slice(&amp;input[32..64]);&#xD;&#xA;&#xD;&#xA;                let mut asset_code_array: [u8; 12] = Default::default();&#xD;&#xA;                asset_code_array.copy_from_slice(&amp;input[64..]);&#xD;&#xA;&#xD;&#xA;                let asset: Asset = (issuer_array, asset_code_array);&#xD;&#xA;&#xD;&#xA;                let map = self.balances.borrow_mut();&#xD;&#xA;                let balance = map.get(&amp;(account_id, asset)).unwrap_or_else(|| {&#xD;&#xA;                    panic!(&#xD;&#xA;                        &quot;No entry found for account_id: {:?}, asset: {:?}&quot;,&#xD;&#xA;                        account_id, asset,&#xD;&#xA;                    )&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;                scale::Encode::encode_to(&amp;balance, output);&#xD;&#xA;&#xD;&#xA;                0 // 0 is error code&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;Now when I test my smart contract and call the `fetch_balance` function with the following arguments: &#xD;&#xA;```&#xD;&#xA;let account_id = AccountId::from([0x01; 32]);&#xD;&#xA;let asset = ([0x02; 32], [0x03; 12]);&#xD;&#xA;fetch_balance(account_id, asset);&#xD;&#xA;```&#xD;&#xA;the panic! logs an input of ` [49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]` and I don't understand why. The 32x `1`s are obviously from the account_id but the passed `asset` argument is completely ignored and also what does the leading `49` mean?&#xD;&#xA;&#xD;&#xA;I looked a bit into the implementation of the chain extension and it seems that the `_input` that is passed to the `call()` is encoded beforehand, so I tried to decode it. But I logged both the passed `_input` without decoding it and with decoding (like shown in the snippet) and it does not change much. &#xD;&#xA;&#xD;&#xA;Has someone experience with testing a chain extension of ink! smart contracts while using the provided input argument? Am I missing something here? I'd appreciate any help. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/examples/rand-extension/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="10619" PostHistoryTypeId="2" PostId="2836" RevisionGUID="6c281d61-bd53-4270-9400-700e5b77a1d1" CreationDate="2022-05-24T19:34:35.683" UserId="2484" Text="I would assume, that this error comes from the new try-runtime feature, which wasn't correctly added to the substrate node template.&#xD;&#xA;&#xD;&#xA;At least when I run `cargo check --all-features` on a fresh substrate node template then it returns &quot;cannot find trait TryRuntime in crate frame_try_runtime&quot;.&#xD;&#xA;&#xD;&#xA;I fixed this with going into `runtime/Cargo.toml` and added the following.&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;std = [&#xD;&#xA;	...&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;    ...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Please double check if you have the following package in your `runtime/Cargo.toml` with `default-features = false`:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;frame-try-runtime = { ... default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Make sure, that you haven't the `try-runtime-cli` dependency in `runtime/Cargo.toml`.&#xD;&#xA;&#xD;&#xA;When this doesn't help, then please try to give additional information how to reproduce the error. Which substrate-node-template version did you run?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10621" PostHistoryTypeId="5" PostId="2836" RevisionGUID="8bf8a0ec-df59-4bca-8500-d44e4b41b8b7" CreationDate="2022-05-24T19:58:22.370" UserId="2484" Comment="additional information" Text="I would assume, that this error comes from the new try-runtime feature, which wasn't correctly added to the substrate node template.&#xD;&#xA;&#xD;&#xA;At least when I run `cargo check --all-features` on a fresh substrate node template then it returns &quot;cannot find trait TryRuntime in crate frame_try_runtime&quot;.&#xD;&#xA;&#xD;&#xA;I fixed this with going into `runtime/Cargo.toml` and added the following. This would exclude the standard library to properly work with WASM.&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;std = [&#xD;&#xA;	...&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;    ...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Please double check if you have the following package in your `runtime/Cargo.toml` with `default-features = false`:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;frame-try-runtime = { ... default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Make sure, that you haven't the `try-runtime-cli` dependency in `runtime/Cargo.toml`.&#xD;&#xA;&#xD;&#xA;When this doesn't help, then please try to give additional information how to reproduce the error. Which substrate-node-template version did you run?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10622" PostHistoryTypeId="2" PostId="2837" RevisionGUID="42c4f62a-dc79-44ed-ba72-770687c99638" CreationDate="2022-05-24T20:22:29.703" UserId="2484" Text="This mostly happens when updating the polkadot version and you have still an old conflicting polkadot dependency.&#xD;&#xA;&#xD;&#xA;Try to stay consistent for each `my-pallet/Cargo.toml` version&#xD;&#xA;&#xD;&#xA;For example when you use the following.&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;frame-support = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.22&quot;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you should always stay with the branch `polkadot-v0.9.22`.&#xD;&#xA;&#xD;&#xA;It seams, that your node-template-runtime is `v2.0.0`, which has conflicting dependencies to your pallet `pallet-did`." ContentLicense="CC BY-SA 4.0" />
  <row Id="10624" PostHistoryTypeId="50" PostId="2097" RevisionGUID="a679e9ed-4554-4808-a2a4-0df484cf7b53" CreationDate="2022-05-24T21:08:15.787" UserId="-1" />
  <row Id="10625" PostHistoryTypeId="2" PostId="2838" RevisionGUID="f39a93d7-8038-4e40-b2d6-04edb2237b48" CreationDate="2022-05-24T21:20:58.303" UserId="2578" Text="Resolved. Incorrectly modified the archive.toml file." ContentLicense="CC BY-SA 4.0" />
  <row Id="10627" PostHistoryTypeId="2" PostId="2839" RevisionGUID="a74c09fc-81a5-4746-a870-fe3f70e4e8db" CreationDate="2022-05-24T22:20:35.567" UserId="2578" Text="How can I generate transaction history of a wallet?&#xD;&#xA;&#xD;&#xA;I was able to run [substrate-archive](https://github.com/paritytech/substrate-archive) alongside polkadot and a template node in archive node. I stored onto postgres: state_traces, blocks, extrinsics, metadata, and storage. Additionally, is there an easier way to do this?&#xD;&#xA;&#xD;&#xA;I thank this community for their support." ContentLicense="CC BY-SA 4.0" />
  <row Id="10629" PostHistoryTypeId="1" PostId="2839" RevisionGUID="a74c09fc-81a5-4746-a870-fe3f70e4e8db" CreationDate="2022-05-24T22:20:35.567" UserId="2578" Text="Substrate - Generating Transaction History of a Wallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="10630" PostHistoryTypeId="3" PostId="2839" RevisionGUID="a74c09fc-81a5-4746-a870-fe3f70e4e8db" CreationDate="2022-05-24T22:20:35.567" UserId="2578" Text="|extrinsic|transactions|substrate-archive|archive|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10632" PostHistoryTypeId="2" PostId="2840" RevisionGUID="34c4c2f1-393d-4b98-9524-a504c7967754" CreationDate="2022-05-25T01:13:40.300" UserId="590" Text="My understanding is that there is a configurable base fee which is the minimum amount that a user pays for ANY transaction.&#xD;&#xA;&#xD;&#xA;Is there a way to add an additional base fee per extrinsic? This fee should be unrelated to the weight fee of the extrinsic.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10634" PostHistoryTypeId="1" PostId="2840" RevisionGUID="34c4c2f1-393d-4b98-9524-a504c7967754" CreationDate="2022-05-25T01:13:40.300" UserId="590" Text="Can I add a base fee per extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10635" PostHistoryTypeId="3" PostId="2840" RevisionGUID="34c4c2f1-393d-4b98-9524-a504c7967754" CreationDate="2022-05-25T01:13:40.300" UserId="590" Text="|weight|fee|weighttofee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10636" PostHistoryTypeId="2" PostId="2841" RevisionGUID="88872788-2397-4bac-8c46-7844f18cf285" CreationDate="2022-05-25T02:29:18.690" UserId="590" Text="My understand in substrate is that there are three types of dispatches, normal, operational, and mandatory.&#xD;&#xA;&#xD;&#xA;This types of dispatch classes can consume a portion of the total weight in a block.&#xD;&#xA;I can use `AvailableBlockRatio` set the percentage that normal transactions can consume in a block.&#xD;&#xA;&#xD;&#xA;Is there a way to extend that so that certain type of extrinsic (ex feeless tx) can only take a portion of the allocated weight for normal dispatch classes?&#xD;&#xA;&#xD;&#xA;So when adding transaction in a block once the limit has been reach no more of those type of transactions can be added." ContentLicense="CC BY-SA 4.0" />
  <row Id="10638" PostHistoryTypeId="1" PostId="2841" RevisionGUID="88872788-2397-4bac-8c46-7844f18cf285" CreationDate="2022-05-25T02:29:18.690" UserId="590" Text="Is there a way to cap the amount of weight that a type of extrinsic can consume in a block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10639" PostHistoryTypeId="3" PostId="2841" RevisionGUID="88872788-2397-4bac-8c46-7844f18cf285" CreationDate="2022-05-25T02:29:18.690" UserId="590" Text="|substrate-node|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10641" PostHistoryTypeId="2" PostId="2842" RevisionGUID="74f482a4-d6d4-441a-8638-c9a75c84af4e" CreationDate="2022-05-25T04:34:34.580" UserId="28" Text="A transaction being &quot;feeless&quot; is not something that is tracked in the pipeline, and thus not something that can be tracked using the same primitives and tools as we use to limit the weight of a block.&#xD;&#xA;&#xD;&#xA;Instead, you will need to build your own set of custom logic to handle this.&#xD;&#xA;&#xD;&#xA;For example, you can build a pallet, through which users can submit free transactions, and that pallet keeps track of how much weight it has used so far that block, and starts returning an error if too much weight is used in a single block." ContentLicense="CC BY-SA 4.0" />
  <row Id="10643" PostHistoryTypeId="2" PostId="2843" RevisionGUID="d3db62dc-1659-4ca7-a812-8a3ec9103440" CreationDate="2022-05-25T04:36:53.527" UserId="1768" Text="Staking pallet allows one chain to elect validators/collators with respect to their stake. There are multiple ways to implement ElectionProvider both on-chain and off-chain; copying the Staking/ElectionProvider configuration of Polkadot/Kusama is not ideal for parachains.&#xD;&#xA;&#xD;&#xA;What ideal configuration of the ElectionProvider and Staking pallet will work for parachains and solo chains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10645" PostHistoryTypeId="1" PostId="2843" RevisionGUID="d3db62dc-1659-4ca7-a812-8a3ec9103440" CreationDate="2022-05-25T04:36:53.527" UserId="1768" Text="How can the Substrate staking pallet be used in a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10646" PostHistoryTypeId="3" PostId="2843" RevisionGUID="d3db62dc-1659-4ca7-a812-8a3ec9103440" CreationDate="2022-05-25T04:36:53.527" UserId="1768" Text="|parachain|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10647" PostHistoryTypeId="2" PostId="2844" RevisionGUID="4ff9b58f-7161-454f-bd2b-865501e7cfa4" CreationDate="2022-05-25T04:45:10.500" UserId="28" Text="The easiest way to achieve this would be to modify your `WeightToFee` implementation.&#xD;&#xA;&#xD;&#xA;&gt; Note, you will probably depend on [this PR](https://github.com/paritytech/substrate/pull/11415/files) being merged before you can easily do this.&#xD;&#xA;&#xD;&#xA;But in general, there is a function which we expect the user to implement which describes how we convert some `Weight` of an extrinsic into a &quot;free&quot; which is some `Balance`.&#xD;&#xA;&#xD;&#xA;In this case, you can create a custom `WeightToFee` function which always adds an additional amount of fee on top of any inputted Weight.&#xD;&#xA;&#xD;&#xA;So something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Implementor of `WeightToFee` that maps one unit of weight&#xD;&#xA;/// to one unit of fee, and always adds an extra `E` fee on top.&#xD;&#xA;pub struct IdentityFeeWithConstantExtra&lt;T, E&gt;(sp_std::marker::PhantomData&lt;(T, E)&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;T, E&gt; WeightToFee for IdentityFeeWithConstantExtra&lt;T, E&gt;&#xD;&#xA;where&#xD;&#xA;	T: BaseArithmetic + From&lt;u32&gt; + Copy + Unsigned,&#xD;&#xA;	E: Get&lt;T&gt;,&#xD;&#xA;{&#xD;&#xA;	type Balance = T;&#xD;&#xA;&#xD;&#xA;	fn weight_to_fee(weight: &amp;Weight) -&gt; Self::Balance {&#xD;&#xA;		let base = Self::Balance::saturated_from(*weight);&#xD;&#xA;		base.saturating_add(E::get())&#xD;&#xA;	}&#xD;&#xA;}" ContentLicense="CC BY-SA 4.0" />
  <row Id="10649" PostHistoryTypeId="5" PostId="2843" RevisionGUID="76296dfb-442e-4459-bb43-c2342f310899" CreationDate="2022-05-25T05:04:28.910" UserId="1768" Comment="deleted 2 characters in body" Text="Staking pallet allows a chain to elect validators/collators with respect to their stake. There are multiple ways in staking pallet to implement ElectionProvider (both on-chain and off-chain) which decides the next validator and nominator list based on stake; copying the Staking/ElectionProvider configuration of Polkadot/Kusama is not ideal for parachains.&#xD;&#xA;&#xD;&#xA;What ideal configuration of the ElectionProvider and Staking pallet will work for parachains and solo chains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10650" PostHistoryTypeId="2" PostId="2845" RevisionGUID="6e932ac3-9a07-40ff-b96f-8627c0a2a76e" CreationDate="2022-05-25T06:19:35.020" UserId="2414" Text="I am unable to populate substrate node metrics data in Grafana dashboard. I was following the instructions as shared in substrate doc [Visualise Node Metrics][1]&#xD;&#xA;I am able to establish the connection between Grafana and Prometheus after [this fix][2] I am importing the basic [json template for metrics][3] in grafana which is shared as part of the documentation above. I am reporting this issue to understand if everything provided in substrate doc is correct.[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/node-metrics/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/2738/error-reading-prometheus-post-https-localhost9090-api-v1-query-dial-tcp?noredirect=1#comment2597_2738&#xD;&#xA;  [3]: https://docs.substrate.io/assets/tutorials/node-metrics/substrate-node-template-metrics.json&#xD;&#xA;  [4]: https://i.stack.imgur.com/y2MpK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10652" PostHistoryTypeId="1" PostId="2845" RevisionGUID="6e932ac3-9a07-40ff-b96f-8627c0a2a76e" CreationDate="2022-05-25T06:19:35.020" UserId="2414" Text="Grafana Dashboard not populating the basic node metrics data" ContentLicense="CC BY-SA 4.0" />
  <row Id="10653" PostHistoryTypeId="3" PostId="2845" RevisionGUID="6e932ac3-9a07-40ff-b96f-8627c0a2a76e" CreationDate="2022-05-25T06:19:35.020" UserId="2414" Text="|substrate-node|nodes|metrics|prometheus|telemetry|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10654" PostHistoryTypeId="2" PostId="2846" RevisionGUID="9f2c567e-2a5f-41d6-9c1a-f98d342f25a8" CreationDate="2022-05-25T07:12:13.437" UserId="523" Text="  `substrate-archive` is very raw to iterate chain's kv db and generate block/extrinsics, need some processor/etl tool to extract info you want.   except for `subscan` the api service Shawn mentioned, you may also consider `subquery` which is a framework allow you customize the process flow" ContentLicense="CC BY-SA 4.0" />
  <row Id="10656" PostHistoryTypeId="2" PostId="2847" RevisionGUID="cfdcea53-6243-4891-a0b8-652f7487fd4d" CreationDate="2022-05-25T07:19:56.547" UserId="2625" Text="I'm looking to collect Extrinsic transfers as images on https://polkadot.subscan.io/&#xD;&#xA;&#xD;&#xA;Maybe use api sidecar or rpc to collect this data? Please help me!!!&#xD;&#xA;&#xD;&#xA;Thank you so much!!!&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sYmyB.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10658" PostHistoryTypeId="1" PostId="2847" RevisionGUID="cfdcea53-6243-4891-a0b8-652f7487fd4d" CreationDate="2022-05-25T07:19:56.547" UserId="2625" Text="Is there a way to collect fee of transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10659" PostHistoryTypeId="3" PostId="2847" RevisionGUID="cfdcea53-6243-4891-a0b8-652f7487fd4d" CreationDate="2022-05-25T07:19:56.547" UserId="2625" Text="|rpc|fee|sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10660" PostHistoryTypeId="2" PostId="2848" RevisionGUID="72147a47-1f15-4b95-86e6-8df68e753eb8" CreationDate="2022-05-25T07:26:32.303" UserId="521" Text="Currently, the transaction pool in Astar network is full with a lot of unsigned EVM transactions, which cause user transactions sent without a tip to be stuck.&#xD;&#xA;&#xD;&#xA;We are currently researching a way to push user tx and prioritize it in the pool for fast inclusion. We see tipping mechanism to fit our needs. However, we are currently struggled with how to calculate an optimal tip.&#xD;&#xA;&#xD;&#xA;Things I've already tried:&#xD;&#xA;* Find min tip in the pending extrinsics (`author_pendingExtrinsics`) and add 1 or 10000 planks to it.&#xD;&#xA;&#xD;&#xA;What is strange is that when adding 1 plank to the minimum tip, the node accepts transaction but it does not lately appear in transaction pool. However, with 10000 planks added, node immediately rejects transaction with the message &quot;Cannot add extrinsic to the pool since it is full&quot;.&#xD;&#xA;&#xD;&#xA;I've also checked https://substrate.stackexchange.com/questions/2552/how-to-calculate-the-optimal-tip-for-substrate where Gav shows that adding +1 increase the priority by the max number of these transactions per block. So in order to find an optimal tip, we need to check weights of all pending transactions to find out their priorities. However, doing so via `payment_queryExtrinsicInfo` will require 8092 requests to the node for each fee calculation. Maybe there is a way to do it more efficiently?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10662" PostHistoryTypeId="1" PostId="2848" RevisionGUID="72147a47-1f15-4b95-86e6-8df68e753eb8" CreationDate="2022-05-25T07:26:32.303" UserId="521" Text="Transaction pool extrinsic prioritization" ContentLicense="CC BY-SA 4.0" />
  <row Id="10663" PostHistoryTypeId="3" PostId="2848" RevisionGUID="72147a47-1f15-4b95-86e6-8df68e753eb8" CreationDate="2022-05-25T07:26:32.303" UserId="521" Text="|transactions|astar|tips|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10664" PostHistoryTypeId="2" PostId="2849" RevisionGUID="9509ebda-8330-450d-bdf0-9af1e2b02a82" CreationDate="2022-05-25T07:38:08.063" UserId="2025" Text="In Substrate based chains, like Polkadot, when an extrinsic is included in a block, it emits certain events to notify external entities about changes or conditions in the runtime. &#xD;&#xA;&#xD;&#xA;Polkadot-JS API supports a WebSocket subscription on runtime events, for your case, you are interested in [events related to balances](https://polkadot.js.org/docs/substrate/events/#balances). In particular for fees in balance transfers, a `Withdraw` event will tell us the fee amount the sender account paid whereas `Deposit` events will tell us the amount of that fee that was deposited to the Treasury account and the amount that was deposited as tip to the block validator account.&#xD;&#xA;&#xD;&#xA;You can have a look to [this section in the Polkadot Integrations guide](https://wiki.polkadot.network/docs/build-node-interaction#substrate-api-sidecar) to learn about about how to query blocks with Sidecar and get the events related to fees paid by the extrinsics included in that block." ContentLicense="CC BY-SA 4.0" />
  <row Id="10666" PostHistoryTypeId="2" PostId="2850" RevisionGUID="b08b18ac-a177-4803-9732-8e840a3b1edc" CreationDate="2022-05-25T07:56:52.820" UserId="340" Text="The great thing about MacOS is it's very efficient, It is not obvious that it sleeps! however this is something it does seamlessly and to which will have negative effects on anything time bound such as blockchains.&#xD;&#xA;&#xD;&#xA;I suspect that as the process is suspended at Time X it wakes in Time Z and has warped through time, thus causing an unexpected epoch in BABE. &#xD;&#xA;I also suspect this can impact GRANDPA in a similar way both these consensus components can be halted due to unexpected time warps.&#xD;&#xA;&#xD;&#xA;Moral of the story turn off power saving features or run caffeinate or some other tool to keep your development workspace alive." ContentLicense="CC BY-SA 4.0" />
  <row Id="10668" PostHistoryTypeId="2" PostId="2851" RevisionGUID="45081620-ab62-4025-b385-170165886ef6" CreationDate="2022-05-25T08:48:12.097" UserId="632" Text="a function like we have in ethereum : ```eth_call```  exists for substrate ? &#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="10670" PostHistoryTypeId="1" PostId="2851" RevisionGUID="45081620-ab62-4025-b385-170165886ef6" CreationDate="2022-05-25T08:48:12.097" UserId="632" Text="Similar eth_call for substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="10671" PostHistoryTypeId="3" PostId="2851" RevisionGUID="45081620-ab62-4025-b385-170165886ef6" CreationDate="2022-05-25T08:48:12.097" UserId="632" Text="|substrate-node|rpc|evm|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10672" PostHistoryTypeId="2" PostId="2852" RevisionGUID="5a235ef9-63b0-4879-9400-eb4230875cd8" CreationDate="2022-05-25T09:17:18.497" UserId="2099" Text="What is the reason that the SCALE codec does not support Encode and Decode of f64 types?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10674" PostHistoryTypeId="1" PostId="2852" RevisionGUID="5a235ef9-63b0-4879-9400-eb4230875cd8" CreationDate="2022-05-25T09:17:18.497" UserId="2099" Text="Scale codec f64 support" ContentLicense="CC BY-SA 4.0" />
  <row Id="10675" PostHistoryTypeId="3" PostId="2852" RevisionGUID="5a235ef9-63b0-4879-9400-eb4230875cd8" CreationDate="2022-05-25T09:17:18.497" UserId="2099" Text="|scale-codec|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10676" PostHistoryTypeId="5" PostId="2758" RevisionGUID="4b7d1491-7d57-4392-9b24-cca73fffa87c" CreationDate="2022-05-25T09:25:27.090" UserId="83" Comment="use full name" Text="As the error message suggests, you need to add a network to Parity Signer. Please follow this tutorial: &#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="10677" PostHistoryTypeId="5" PostId="2836" RevisionGUID="d010eae3-1777-4a27-bc64-781db5e15a42" CreationDate="2022-05-25T09:30:23.373" UserId="83" Comment="grammar" Text="I would assume that this error comes from the new try-runtime feature, which wasn't correctly added to the substrate-node-template.&#xD;&#xA;&#xD;&#xA;At least when I run `cargo check --all-features` on a fresh substrate-node-template then it returns `cannot find trait TryRuntime in crate frame_try_runtime`.&#xD;&#xA;&#xD;&#xA;I fixed this by going into `runtime/Cargo.toml` and adding the following. This would exclude the standard library to properly work with WASM.&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;std = [&#xD;&#xA;	...&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;    ...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Please double check if you have the following package in your `runtime/Cargo.toml` with `default-features = false`:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;frame-try-runtime = { ..., default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Make sure that you don't have the `try-runtime-cli` dependency in `runtime/Cargo.toml`.&#xD;&#xA;&#xD;&#xA;If this doesn't help, then please try to give additional information about how to reproduce the error. Which substrate-node-template version did you run?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10678" PostHistoryTypeId="5" PostId="2832" RevisionGUID="96acba62-9fa7-4ab6-bd7e-532c2c08a518" CreationDate="2022-05-25T09:31:56.870" UserId="83" Comment="backticks" Text="Turns out i was missing a features flag on my brush dependency. This solved it for me:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;brush = { tag = &quot;v1.6.1&quot;, git = &quot;https://github.com/Supercolony-net/openbrush-contracts&quot;, default-features = false, features = [&quot;psp22&quot;] }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10684" PostHistoryTypeId="2" PostId="2854" RevisionGUID="87a320da-5e28-40b5-8e23-ce7a16f1a530" CreationDate="2022-05-25T11:10:08.037" UserId="85" Text="Basically this question boils down to: https://substrate.stackexchange.com/questions/146/can-you-use-floating-point-numbers-or-math-in-the-runtime&#xD;&#xA;&#xD;&#xA;While SCALE could deterministically encode and decode floating point types, the runtime can't deterministically do compute on them. Interestingly to do some benchmarks of SCALE f64/f32 support was hacked in to allow like for like comparison of serialisation benchmarks: https://github.com/paritytech/parity-scale-codec/issues/341" ContentLicense="CC BY-SA 4.0" />
  <row Id="10686" PostHistoryTypeId="2" PostId="2855" RevisionGUID="4cf0f304-a144-4586-9c9b-2be5db0ac625" CreationDate="2022-05-25T11:55:30.780" UserId="19" Text="I have exactly the same error `ContractTrapped` having code like below:    &#xD;&#xA;&#xD;&#xA;    pragma solidity 0.8.0;&#xD;&#xA;    &#xD;&#xA;    contract Base{&#xD;&#xA;        string state; //added a state var&#xD;&#xA;        constructor() payable {}&#xD;&#xA;    &#xD;&#xA;        function sum(uint256 a, uint256 b) public pure returns (uint256) {&#xD;&#xA;            uint256 c = a + b;&#xD;&#xA;            require(c &gt;= a);&#xD;&#xA;            return c;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    contract Test{&#xD;&#xA;        Base base;&#xD;&#xA;        function createNew() payable public  {&#xD;&#xA;            base = new Base();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Any idea how to solve it? Or even any tips how to debug runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10688" PostHistoryTypeId="50" PostId="1915" RevisionGUID="0b1cd711-1f38-46d9-aaef-f7c275c6f3b8" CreationDate="2022-05-25T12:02:05.627" UserId="-1" />
  <row Id="10689" PostHistoryTypeId="2" PostId="2856" RevisionGUID="c25e63dd-bc2f-4b25-b894-b05b329ec717" CreationDate="2022-05-25T14:47:24.887" UserId="1789" Text="This question follows those questions below:&#xD;&#xA;&#xD;&#xA;Q1 https://substrate.stackexchange.com/questions/2578/zombienet-how-to-test-custom-parachain-collator-block-heightproducing-blocks/2583&#xD;&#xA;&#xD;&#xA;Q2 https://substrate.stackexchange.com/questions/2729/zombienet-substrate-parachain-template-block-heightblock-producing-test-f&#xD;&#xA;&#xD;&#xA;Regarding this Docker template: https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/collator_injected.Dockerfile, I got this answer from Q2 is &quot;yes you can that one and add the build phase to inject then the binary.&quot;&#xD;&#xA;&#xD;&#xA;That Dockerfile for making adder-collator image:&#xD;&#xA;```&#xD;&#xA;# this file copies from scripts/ci/dockerfiles/Dockerfile and changes only the binary name&#xD;&#xA;FROM docker.io/library/ubuntu:20.04&#xD;&#xA;&#xD;&#xA;# metadata&#xD;&#xA;ARG VCS_REF&#xD;&#xA;ARG BUILD_DATE&#xD;&#xA;ARG IMAGE_NAME&#xD;&#xA;&#xD;&#xA;LABEL io.parity.image.authors=&quot;devops-team@parity.io&quot; \&#xD;&#xA;	io.parity.image.vendor=&quot;Parity Technologies&quot; \&#xD;&#xA;	io.parity.image.title=&quot;${IMAGE_NAME}&quot; \&#xD;&#xA;	io.parity.image.description=&quot;Injected adder-collator Docker image&quot; \&#xD;&#xA;	io.parity.image.source=&quot;https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/ci/dockerfiles/collator_injected.Dockerfile&quot; \&#xD;&#xA;	io.parity.image.revision=&quot;${VCS_REF}&quot; \&#xD;&#xA;	io.parity.image.created=&quot;${BUILD_DATE}&quot; \&#xD;&#xA;	io.parity.image.documentation=&quot;https://github.com/paritytech/polkadot/&quot;&#xD;&#xA;&#xD;&#xA;# show backtraces&#xD;&#xA;ENV RUST_BACKTRACE 1&#xD;&#xA;&#xD;&#xA;# install tools and dependencies&#xD;&#xA;RUN apt-get update &amp;&amp; \&#xD;&#xA;	DEBIAN_FRONTEND=noninteractive apt-get install -y \&#xD;&#xA;		libssl1.1 \&#xD;&#xA;		ca-certificates &amp;&amp; \&#xD;&#xA;# apt cleanup&#xD;&#xA;	apt-get autoremove -y &amp;&amp; \&#xD;&#xA;	apt-get clean &amp;&amp; \&#xD;&#xA;	find /var/lib/apt/lists/ -type f -not -name lock -delete; \&#xD;&#xA;# add user and link ~/.local/share/adder-collator to /data&#xD;&#xA;	useradd -m -u 1000 -U -s /bin/sh -d /adder-collator adder-collator &amp;&amp; \&#xD;&#xA;	mkdir -p /data /adder-collator/.local/share &amp;&amp; \&#xD;&#xA;	chown -R adder-collator:adder-collator /data &amp;&amp; \&#xD;&#xA;	ln -s /data /adder-collator/.local/share/polkadot&#xD;&#xA;&#xD;&#xA;# add adder-collator binary to docker image&#xD;&#xA;COPY ./adder-collator /usr/local/bin&#xD;&#xA;COPY ./undying-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;USER adder-collator&#xD;&#xA;&#xD;&#xA;# check if executable works in this container&#xD;&#xA;RUN /usr/local/bin/adder-collator --version&#xD;&#xA;RUN /usr/local/bin/undying-collator --version&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944&#xD;&#xA;VOLUME [&quot;/adder-collator&quot;]&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/adder-collator&quot;]&#xD;&#xA;```&#xD;&#xA;Then I used that to make my parachain collator image:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/collator:c1 AS builder&#xD;&#xA;# This c1 image has all the substrate-parachain-template code compiled&#xD;&#xA;&#xD;&#xA;FROM debian@sha256:6ef4731388c03b38e58ea77aef9396c216095e1843742fc7cf5038901cc1f081&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slim&#xD;&#xA;&#xD;&#xA;COPY --from=builder ./builds/collator/target/release/parachain-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;# show backtraces&#xD;&#xA;ENV RUST_BACKTRACE 1&#xD;&#xA;&#xD;&#xA;# install tools and dependencies&#xD;&#xA;RUN apt-get update &amp;&amp; \&#xD;&#xA;  DEBIAN_FRONTEND=noninteractive apt-get install -y \&#xD;&#xA;  libssl1.1 \&#xD;&#xA;  ca-certificates &amp;&amp; \&#xD;&#xA;  # apt cleanup&#xD;&#xA;  apt-get autoremove -y &amp;&amp; \&#xD;&#xA;  apt-get clean &amp;&amp; \&#xD;&#xA;  find /var/lib/apt/lists/ -type f -not -name lock -delete; \&#xD;&#xA;  # add user and link ~/.local/share/adder-collator to /data&#xD;&#xA;  useradd -m -u 1000 -U -s /bin/sh -d /adder-collator adder-collator &amp;&amp; \&#xD;&#xA;  mkdir -p /data /adder-collator/.local/share &amp;&amp; \&#xD;&#xA;  chown -R adder-collator:adder-collator /data &amp;&amp; \&#xD;&#xA;  ln -s /data /adder-collator/.local/share/polkadot&#xD;&#xA;&#xD;&#xA;# adder-collator and undying-collator are not found. do I need them?&#xD;&#xA;#COPY ./adder-collator /usr/local/bin&#xD;&#xA;#COPY ./undying-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;USER adder-collator&#xD;&#xA;&#xD;&#xA;# adder-collator and undying-collator are not found&#xD;&#xA;#RUN /usr/local/bin/adder-collator --version&#xD;&#xA;#RUN /usr/local/bin/undying-collator --version&#xD;&#xA;&#xD;&#xA;# adding code for new parachain collator&#xD;&#xA;RUN /usr/local/bin/parachain-collator --version&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944&#xD;&#xA;VOLUME [&quot;/adder-collator&quot;]&#xD;&#xA;&#xD;&#xA;#ENTRYPOINT [&quot;/usr/local/bin/adder-collator&quot;]  ... files not found&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/parachain-collator&quot;]&#xD;&#xA;```&#xD;&#xA;In above Dockerfile, I removed `adder-collator` and `undying-collator` because they are not in the Substrate-Parachain-template repo. Do I need them?&#xD;&#xA;&#xD;&#xA;About ENTRYPOINT, what executable should I put there?&#xD;&#xA;&#xD;&#xA;Should I use `parachain-collator` in ENTRYPOINT?&#xD;&#xA;&#xD;&#xA;`ENTRYPOINT [&quot;/usr/local/bin/parachain-collator&quot;]`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10691" PostHistoryTypeId="1" PostId="2856" RevisionGUID="c25e63dd-bc2f-4b25-b894-b05b329ec717" CreationDate="2022-05-25T14:47:24.887" UserId="1789" Text="Zombienet: Substrate-Parachain-Template ... How to write the Dockerfile?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10692" PostHistoryTypeId="3" PostId="2856" RevisionGUID="c25e63dd-bc2f-4b25-b894-b05b329ec717" CreationDate="2022-05-25T14:47:24.887" UserId="1789" Text="|parachain|substrate-node-template|parachain-collator|docker|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10693" PostHistoryTypeId="5" PostId="2856" RevisionGUID="3d039577-dcc0-4388-9942-32216722d59c" CreationDate="2022-05-25T14:53:13.817" UserId="1789" Comment="added 785 characters in body" Text="This question follows those questions below:&#xD;&#xA;&#xD;&#xA;Q1 https://substrate.stackexchange.com/questions/2578/zombienet-how-to-test-custom-parachain-collator-block-heightproducing-blocks/2583&#xD;&#xA;&#xD;&#xA;Q2 https://substrate.stackexchange.com/questions/2729/zombienet-substrate-parachain-template-block-heightblock-producing-test-f&#xD;&#xA;&#xD;&#xA;Regarding this Docker template: https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/collator_injected.Dockerfile, I got this answer from Q2 is &quot;yes you can that one and add the build phase to inject then the binary.&quot;&#xD;&#xA;&#xD;&#xA;That Dockerfile for making adder-collator image:&#xD;&#xA;```&#xD;&#xA;# this file copies from scripts/ci/dockerfiles/Dockerfile and changes only the binary name&#xD;&#xA;FROM docker.io/library/ubuntu:20.04&#xD;&#xA;&#xD;&#xA;# metadata&#xD;&#xA;ARG VCS_REF&#xD;&#xA;ARG BUILD_DATE&#xD;&#xA;ARG IMAGE_NAME&#xD;&#xA;&#xD;&#xA;LABEL io.parity.image.authors=&quot;devops-team@parity.io&quot; \&#xD;&#xA;	io.parity.image.vendor=&quot;Parity Technologies&quot; \&#xD;&#xA;	io.parity.image.title=&quot;${IMAGE_NAME}&quot; \&#xD;&#xA;	io.parity.image.description=&quot;Injected adder-collator Docker image&quot; \&#xD;&#xA;	io.parity.image.source=&quot;https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/ci/dockerfiles/collator_injected.Dockerfile&quot; \&#xD;&#xA;	io.parity.image.revision=&quot;${VCS_REF}&quot; \&#xD;&#xA;	io.parity.image.created=&quot;${BUILD_DATE}&quot; \&#xD;&#xA;	io.parity.image.documentation=&quot;https://github.com/paritytech/polkadot/&quot;&#xD;&#xA;&#xD;&#xA;# show backtraces&#xD;&#xA;ENV RUST_BACKTRACE 1&#xD;&#xA;&#xD;&#xA;# install tools and dependencies&#xD;&#xA;RUN apt-get update &amp;&amp; \&#xD;&#xA;	DEBIAN_FRONTEND=noninteractive apt-get install -y \&#xD;&#xA;		libssl1.1 \&#xD;&#xA;		ca-certificates &amp;&amp; \&#xD;&#xA;# apt cleanup&#xD;&#xA;	apt-get autoremove -y &amp;&amp; \&#xD;&#xA;	apt-get clean &amp;&amp; \&#xD;&#xA;	find /var/lib/apt/lists/ -type f -not -name lock -delete; \&#xD;&#xA;# add user and link ~/.local/share/adder-collator to /data&#xD;&#xA;	useradd -m -u 1000 -U -s /bin/sh -d /adder-collator adder-collator &amp;&amp; \&#xD;&#xA;	mkdir -p /data /adder-collator/.local/share &amp;&amp; \&#xD;&#xA;	chown -R adder-collator:adder-collator /data &amp;&amp; \&#xD;&#xA;	ln -s /data /adder-collator/.local/share/polkadot&#xD;&#xA;&#xD;&#xA;# add adder-collator binary to docker image&#xD;&#xA;COPY ./adder-collator /usr/local/bin&#xD;&#xA;COPY ./undying-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;USER adder-collator&#xD;&#xA;&#xD;&#xA;# check if executable works in this container&#xD;&#xA;RUN /usr/local/bin/adder-collator --version&#xD;&#xA;RUN /usr/local/bin/undying-collator --version&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944&#xD;&#xA;VOLUME [&quot;/adder-collator&quot;]&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/adder-collator&quot;]&#xD;&#xA;```&#xD;&#xA;Then I used that to make my parachain collator image:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/collator:c1 AS builder&#xD;&#xA;# This c1 image has all the substrate-parachain-template code compiled&#xD;&#xA;&#xD;&#xA;FROM debian@sha256:6ef4731388c03b38e58ea77aef9396c216095e1843742fc7cf5038901cc1f081&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slim&#xD;&#xA;&#xD;&#xA;COPY --from=builder ./builds/collator/target/release/parachain-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;# show backtraces&#xD;&#xA;ENV RUST_BACKTRACE 1&#xD;&#xA;&#xD;&#xA;# install tools and dependencies&#xD;&#xA;RUN apt-get update &amp;&amp; \&#xD;&#xA;  DEBIAN_FRONTEND=noninteractive apt-get install -y \&#xD;&#xA;  libssl1.1 \&#xD;&#xA;  ca-certificates &amp;&amp; \&#xD;&#xA;  # apt cleanup&#xD;&#xA;  apt-get autoremove -y &amp;&amp; \&#xD;&#xA;  apt-get clean &amp;&amp; \&#xD;&#xA;  find /var/lib/apt/lists/ -type f -not -name lock -delete; \&#xD;&#xA;  # add user and link ~/.local/share/adder-collator to /data&#xD;&#xA;  useradd -m -u 1000 -U -s /bin/sh -d /adder-collator adder-collator &amp;&amp; \&#xD;&#xA;  mkdir -p /data /adder-collator/.local/share &amp;&amp; \&#xD;&#xA;  chown -R adder-collator:adder-collator /data &amp;&amp; \&#xD;&#xA;  ln -s /data /adder-collator/.local/share/polkadot&#xD;&#xA;&#xD;&#xA;# adder-collator and undying-collator are not found. do I need them?&#xD;&#xA;#COPY ./adder-collator /usr/local/bin&#xD;&#xA;#COPY ./undying-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;USER adder-collator&#xD;&#xA;&#xD;&#xA;# adder-collator and undying-collator are not found&#xD;&#xA;#RUN /usr/local/bin/adder-collator --version&#xD;&#xA;#RUN /usr/local/bin/undying-collator --version&#xD;&#xA;&#xD;&#xA;# adding code for new parachain collator&#xD;&#xA;RUN /usr/local/bin/parachain-collator --version&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944&#xD;&#xA;VOLUME [&quot;/adder-collator&quot;]&#xD;&#xA;&#xD;&#xA;#ENTRYPOINT [&quot;/usr/local/bin/adder-collator&quot;]  ... files not found&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/parachain-collator&quot;]&#xD;&#xA;```&#xD;&#xA;In above Dockerfile, I removed `adder-collator` and `undying-collator` because they are not in the Substrate-Parachain-template repo. Do I need them?&#xD;&#xA;&#xD;&#xA;My Zombienet network definition:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/collator:t5&quot;&#xD;&#xA;  command = &quot;parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;I made an image from the above Dockerfile, then ran the same Zombienet tests as those in my previous posts. But the test failed for the same error: parachain block height is still zero&#xD;&#xA;&#xD;&#xA;About ENTRYPOINT, what executable should I put there?&#xD;&#xA;&#xD;&#xA;Should I use `parachain-collator` in ENTRYPOINT?&#xD;&#xA;&#xD;&#xA;`ENTRYPOINT [&quot;/usr/local/bin/parachain-collator&quot;]`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10694" PostHistoryTypeId="5" PostId="2856" RevisionGUID="e4819135-27a2-49ed-a6cd-97a9b7a59f3a" CreationDate="2022-05-25T14:58:58.553" UserId="1789" Comment="added 785 characters in body" Text="This question follows those questions below:&#xD;&#xA;&#xD;&#xA;Q1 https://substrate.stackexchange.com/questions/2578/zombienet-how-to-test-custom-parachain-collator-block-heightproducing-blocks/2583&#xD;&#xA;&#xD;&#xA;Q2 https://substrate.stackexchange.com/questions/2729/zombienet-substrate-parachain-template-block-heightblock-producing-test-f&#xD;&#xA;&#xD;&#xA;Regarding this Docker template: https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/collator_injected.Dockerfile, I got this answer from Q2 is &quot;yes you can that one and add the build phase to inject then the binary.&quot;&#xD;&#xA;&#xD;&#xA;That Dockerfile for making adder-collator image:&#xD;&#xA;```&#xD;&#xA;# this file copies from scripts/ci/dockerfiles/Dockerfile and changes only the binary name&#xD;&#xA;FROM docker.io/library/ubuntu:20.04&#xD;&#xA;&#xD;&#xA;# metadata&#xD;&#xA;ARG VCS_REF&#xD;&#xA;ARG BUILD_DATE&#xD;&#xA;ARG IMAGE_NAME&#xD;&#xA;&#xD;&#xA;LABEL io.parity.image.authors=&quot;devops-team@parity.io&quot; \&#xD;&#xA;	io.parity.image.vendor=&quot;Parity Technologies&quot; \&#xD;&#xA;	io.parity.image.title=&quot;${IMAGE_NAME}&quot; \&#xD;&#xA;	io.parity.image.description=&quot;Injected adder-collator Docker image&quot; \&#xD;&#xA;	io.parity.image.source=&quot;https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/ci/dockerfiles/collator_injected.Dockerfile&quot; \&#xD;&#xA;	io.parity.image.revision=&quot;${VCS_REF}&quot; \&#xD;&#xA;	io.parity.image.created=&quot;${BUILD_DATE}&quot; \&#xD;&#xA;	io.parity.image.documentation=&quot;https://github.com/paritytech/polkadot/&quot;&#xD;&#xA;&#xD;&#xA;# show backtraces&#xD;&#xA;ENV RUST_BACKTRACE 1&#xD;&#xA;&#xD;&#xA;# install tools and dependencies&#xD;&#xA;RUN apt-get update &amp;&amp; \&#xD;&#xA;	DEBIAN_FRONTEND=noninteractive apt-get install -y \&#xD;&#xA;		libssl1.1 \&#xD;&#xA;		ca-certificates &amp;&amp; \&#xD;&#xA;# apt cleanup&#xD;&#xA;	apt-get autoremove -y &amp;&amp; \&#xD;&#xA;	apt-get clean &amp;&amp; \&#xD;&#xA;	find /var/lib/apt/lists/ -type f -not -name lock -delete; \&#xD;&#xA;# add user and link ~/.local/share/adder-collator to /data&#xD;&#xA;	useradd -m -u 1000 -U -s /bin/sh -d /adder-collator adder-collator &amp;&amp; \&#xD;&#xA;	mkdir -p /data /adder-collator/.local/share &amp;&amp; \&#xD;&#xA;	chown -R adder-collator:adder-collator /data &amp;&amp; \&#xD;&#xA;	ln -s /data /adder-collator/.local/share/polkadot&#xD;&#xA;&#xD;&#xA;# add adder-collator binary to docker image&#xD;&#xA;COPY ./adder-collator /usr/local/bin&#xD;&#xA;COPY ./undying-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;USER adder-collator&#xD;&#xA;&#xD;&#xA;# check if executable works in this container&#xD;&#xA;RUN /usr/local/bin/adder-collator --version&#xD;&#xA;RUN /usr/local/bin/undying-collator --version&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944&#xD;&#xA;VOLUME [&quot;/adder-collator&quot;]&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/adder-collator&quot;]&#xD;&#xA;```&#xD;&#xA;Then I used that to make my parachain collator image:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/paid-network-202104/collator:c1 AS builder&#xD;&#xA;# This c1 image has all the substrate-parachain-template code compiled&#xD;&#xA;&#xD;&#xA;FROM debian@sha256:6ef4731388c03b38e58ea77aef9396c216095e1843742fc7cf5038901cc1f081&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slim&#xD;&#xA;&#xD;&#xA;COPY --from=builder ./builds/collator/target/release/parachain-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;# show backtraces&#xD;&#xA;ENV RUST_BACKTRACE 1&#xD;&#xA;&#xD;&#xA;# install tools and dependencies&#xD;&#xA;RUN apt-get update &amp;&amp; \&#xD;&#xA;  DEBIAN_FRONTEND=noninteractive apt-get install -y \&#xD;&#xA;  libssl1.1 \&#xD;&#xA;  ca-certificates &amp;&amp; \&#xD;&#xA;  # apt cleanup&#xD;&#xA;  apt-get autoremove -y &amp;&amp; \&#xD;&#xA;  apt-get clean &amp;&amp; \&#xD;&#xA;  find /var/lib/apt/lists/ -type f -not -name lock -delete; \&#xD;&#xA;  # add user and link ~/.local/share/adder-collator to /data&#xD;&#xA;  useradd -m -u 1000 -U -s /bin/sh -d /adder-collator adder-collator &amp;&amp; \&#xD;&#xA;  mkdir -p /data /adder-collator/.local/share &amp;&amp; \&#xD;&#xA;  chown -R adder-collator:adder-collator /data &amp;&amp; \&#xD;&#xA;  ln -s /data /adder-collator/.local/share/polkadot&#xD;&#xA;&#xD;&#xA;# adder-collator and undying-collator are not found. do I need them?&#xD;&#xA;#COPY ./adder-collator /usr/local/bin&#xD;&#xA;#COPY ./undying-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;USER adder-collator&#xD;&#xA;&#xD;&#xA;# adder-collator and undying-collator are not found&#xD;&#xA;#RUN /usr/local/bin/adder-collator --version&#xD;&#xA;#RUN /usr/local/bin/undying-collator --version&#xD;&#xA;&#xD;&#xA;# adding code for new parachain collator&#xD;&#xA;RUN /usr/local/bin/parachain-collator --version&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944&#xD;&#xA;VOLUME [&quot;/adder-collator&quot;]&#xD;&#xA;&#xD;&#xA;#ENTRYPOINT [&quot;/usr/local/bin/adder-collator&quot;]  ... files not found&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/parachain-collator&quot;]&#xD;&#xA;```&#xD;&#xA;In above Dockerfile, I removed `adder-collator` and `undying-collator` because they are not in the Substrate-Parachain-template repo. Do I need them?&#xD;&#xA;&#xD;&#xA;My Zombienet network definition:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/paid-network-202104/collator:t5&quot;&#xD;&#xA;  command = &quot;parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;I made an image from the above Dockerfile, then ran the same Zombienet tests as those in my previous posts. But the test failed for the same error: parachain block height is still zero&#xD;&#xA;&#xD;&#xA;About ENTRYPOINT, what executable should I put there?&#xD;&#xA;&#xD;&#xA;Should I use `parachain-collator` in ENTRYPOINT?&#xD;&#xA;&#xD;&#xA;`ENTRYPOINT [&quot;/usr/local/bin/parachain-collator&quot;]`&#xD;&#xA;&#xD;&#xA;The code repo: https://github.com/AuroraLantean/-substrate-parachain-template0918" ContentLicense="CC BY-SA 4.0" />
  <row Id="10695" PostHistoryTypeId="2" PostId="2857" RevisionGUID="319755d0-dbd2-4b9a-8ca1-ef0aee473b74" CreationDate="2022-05-25T15:14:31.730" UserId="560" Text="Using pallet-assets, how do I create a pallet that has hardcoded (pallet-)asset id's for it's on-chain assets that the pallet handles?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I wasnt able to find a good documented way to do this" ContentLicense="CC BY-SA 4.0" />
  <row Id="10697" PostHistoryTypeId="1" PostId="2857" RevisionGUID="319755d0-dbd2-4b9a-8ca1-ef0aee473b74" CreationDate="2022-05-25T15:14:31.730" UserId="560" Text="How do I hardcode asset id's?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10698" PostHistoryTypeId="3" PostId="2857" RevisionGUID="319755d0-dbd2-4b9a-8ca1-ef0aee473b74" CreationDate="2022-05-25T15:14:31.730" UserId="560" Text="|substrate-node|pallet|assets|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10699" PostHistoryTypeId="2" PostId="2858" RevisionGUID="05a5f04f-498f-4099-ad78-8d5d0bae7cda" CreationDate="2022-05-25T15:14:31.730" UserId="560" Text="Because AssetId's are mostly a fancy way of saying u32, It's as simple as:&#xD;&#xA;&#xD;&#xA;    let first_asset_id: T::AssetId = 1u32.into();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10701" PostHistoryTypeId="33" PostId="1987" RevisionGUID="a8b787ae-db31-4d43-a844-ebbc5a3daf5c" CreationDate="2022-05-25T15:43:02.293" UserId="85" Comment="6" />
  <row Id="10706" PostHistoryTypeId="2" PostId="2860" RevisionGUID="e737a1de-4d2c-4e07-aa64-7166c22b3c7f" CreationDate="2022-05-25T17:10:48.900" UserId="555" Text="**How to add Staking rewards for collator services for Node operators ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="10708" PostHistoryTypeId="1" PostId="2860" RevisionGUID="e737a1de-4d2c-4e07-aa64-7166c22b3c7f" CreationDate="2022-05-25T17:10:48.900" UserId="555" Text="Staking rewards for collator services" ContentLicense="CC BY-SA 4.0" />
  <row Id="10709" PostHistoryTypeId="3" PostId="2860" RevisionGUID="e737a1de-4d2c-4e07-aa64-7166c22b3c7f" CreationDate="2022-05-25T17:10:48.900" UserId="555" Text="|staking|collator|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10714" PostHistoryTypeId="50" PostId="2091" RevisionGUID="df5bd91d-dd76-4389-84f9-6396d0fc37b0" CreationDate="2022-05-25T18:05:25.620" UserId="-1" />
  <row Id="10715" PostHistoryTypeId="2" PostId="2862" RevisionGUID="ce9448ea-7e27-47bd-a6cb-b56a28631caf" CreationDate="2022-05-25T18:22:55.580" UserId="710" Text="For example, DOT has 10 but can I check it in Polkadot JS Apps? I want to apply it to all parachain assets." ContentLicense="CC BY-SA 4.0" />
  <row Id="10717" PostHistoryTypeId="1" PostId="2862" RevisionGUID="ce9448ea-7e27-47bd-a6cb-b56a28631caf" CreationDate="2022-05-25T18:22:55.580" UserId="710" Text="How can I query how many decimal places does a Substrate asset have?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10718" PostHistoryTypeId="3" PostId="2862" RevisionGUID="ce9448ea-7e27-47bd-a6cb-b56a28631caf" CreationDate="2022-05-25T18:22:55.580" UserId="710" Text="|polkadot-js|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10719" PostHistoryTypeId="2" PostId="2863" RevisionGUID="b81c9e16-21fe-44ce-b54d-6b041a4be3ac" CreationDate="2022-05-25T18:50:51.720" UserId="14" Text="Here it seems to be working as expected:&#xD;&#xA;```&#xD;&#xA;2022-05-25 15:28:59 Parachain Collator Template    &#xD;&#xA;2022-05-25 15:28:59 ✌️  version 0.1.0-1f2ddea-x86_64-linux-gnu    &#xD;&#xA;2022-05-25 15:28:59 ❤️  by Anonymous, 2020-2022    &#xD;&#xA;2022-05-25 15:28:59  Chain specification: Local Testnet    &#xD;&#xA;2022-05-25 15:28:59   Node name: Alice    &#xD;&#xA;2022-05-25 15:28:59  Role: AUTHORITY    &#xD;&#xA;2022-05-25 15:28:59  Database: RocksDb at /tmp/parachain-alice/chains/local_testnet/db/full    &#xD;&#xA;2022-05-25 15:28:59 ⛓  Native runtime: kabocha-parachain-2 (kabocha-parachain-0.tx0.au2)    &#xD;&#xA;2022-05-25 15:29:00 Parachain id: Id(300)    &#xD;&#xA;2022-05-25 15:29:00 Parachain Account: 5Ec4AhNv5ArwGxtngtW8qcVgzpCAu8nokvnh6vhtvvFkJtpq    &#xD;&#xA;2022-05-25 15:29:00 Parachain genesis state: 0x0000000000000000000000000000000000000000000000000000000000000000007f652f1ea5d75856b74f719e426ef84289cee857a01cd70aaaf772459af0962d03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2022-05-25 15:29:00 Is collating: yes    &#xD;&#xA;2022-05-25 15:29:03 [Parachain]  Initializing Genesis block/state (state: 0x7f65…962d, header-hash: 0x3501…b9b1)    &#xD;&#xA;2022-05-25 15:29:09 [Relaychain]  Initializing Genesis block/state (state: 0x94ce…fddf, header-hash: 0xc95b…4f10)    &#xD;&#xA;2022-05-25 15:29:09 [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-05-25 15:29:11 [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-05-25 15:29:11 [Relaychain]   Local node identity is: 12D3KooWEaZC6jzGQEsC3spM78jsErShpret8uVM5MdB5vLbXmqQ    &#xD;&#xA;2022-05-25 15:29:11 [Relaychain]  Highest known block at #0    &#xD;&#xA;2022-05-25 15:29:11 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    &#xD;&#xA;2022-05-25 15:29:11 [Relaychain] Listening for new connections on 127.0.0.1:9977.    &#xD;&#xA;2022-05-25 15:29:11 [Parachain]   Local node identity is: 12D3KooWM2cszzpUBRNowNkw5GuVbhB96fGHyqyxxyrzkwS5yTNn    &#xD;&#xA;2022-05-25 15:29:11 [Parachain]  Highest known block at #0    &#xD;&#xA;2022-05-25 15:29:11 [Parachain] Unable to bind RPC server to 127.0.0.1:9933. Trying random port.    &#xD;&#xA;2022-05-25 15:29:11 [Parachain] Listening for new connections on 127.0.0.1:8844.&#xD;&#xA;...&#xD;&#xA;2022-05-25 15:34:24 [Relaychain] Advanced session window for approvals update=Advanced { prev_window_start: 7, prev_window_end: 12, new_window_start: 8, new_window_end: 13 }&#xD;&#xA;2022-05-25 15:34:24 [Parachain] Starting collation. relay_parent=0x17b10f2f525bb2db816fddee08a8a6a50ecb46d4bf758620b2b23c8d52645fb9 at=0x23466a083653ebd2b5ea3bacb660055932a04e4c93b0a65a8c5d1ca6a886cfb8&#xD;&#xA;2022-05-25 15:34:24 [Parachain]  Starting consensus session on top of parent 0x23466a083653ebd2b5ea3bacb660055932a04e4c93b0a65a8c5d1ca6a886cfb8    &#xD;&#xA;2022-05-25 15:34:24 [Parachain]  Prepared block for proposing at 3 (0 ms) [hash: 0x652d53db52372cefdef9f643454ff85491e6f5efc851713a9f327ff1215cb8ed; parent_hash: 0x2346…cfb8; extrinsics (2): [0xf879…57a3, 0x6755…fe76]]    &#xD;&#xA;2022-05-25 15:34:24 [Parachain]  Pre-sealed block for proposal at 3. Hash now 0x5877fba02f4e95f806e08143a34016ca564593d0c67f840e964f67e4519ad10d, previously 0x652d53db52372cefdef9f643454ff85491e6f5efc851713a9f327ff1215cb8ed.    &#xD;&#xA;2022-05-25 15:34:24 [Parachain] ✨ Imported #3 (0x5877…d10d)    &#xD;&#xA;2022-05-25 15:34:24 [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.4931640625kb, storage_proof: 2.7177734375kb }&#xD;&#xA;2022-05-25 15:34:24 [Parachain] Produced proof-of-validity candidate. block_hash=0x5877fba02f4e95f806e08143a34016ca564593d0c67f840e964f67e4519ad10d&#xD;&#xA;2022-05-25 15:34:26 [Relaychain]  Idle (2 peers), best: #131 (0x17b1…5fb9), finalized #128 (0x6386…9762), ⬇ 1.5kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-05-25 15:34:26 [Parachain]  Idle (0 peers), best: #2 (0x2346…cfb8), finalized #1 (0x5d48…e64a), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-25 15:34:30 [Relaychain] ✨ Imported #132 (0xd1ba…edd9)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What I did so far:&#xD;&#xA;```&#xD;&#xA;cd /tmp&#xD;&#xA;wget https://github.com/paritytech/polkadot/releases/download/v0.9.20/polkadot&#xD;&#xA;chmod a+x polkadot&#xD;&#xA;&#xD;&#xA;wget https://docs.substrate.io/assets/tutorials/cumulus/chain-specs/rococo-custom-2-raw.json&#xD;&#xA;&#xD;&#xA;# Starting Validator Alice&#xD;&#xA;./polkadot \&#xD;&#xA;  --alice \&#xD;&#xA;  --validator \&#xD;&#xA;  --base-path /tmp/alice \&#xD;&#xA;  --chain rococo-custom-2-raw.json \&#xD;&#xA;  --port 30333 \&#xD;&#xA;  --ws-port 9944&#xD;&#xA;&#xD;&#xA;# Starting Validator Bob&#xD;&#xA;./polkadot \&#xD;&#xA;  --bob \&#xD;&#xA;  --validator \&#xD;&#xA;  --base-path /tmp/bob \&#xD;&#xA;  --chain rococo-custom-2-raw.json \&#xD;&#xA;  --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/&lt;Alice Node ID&gt; \&#xD;&#xA;  --port 30334 \&#xD;&#xA;  --ws-port 9945&#xD;&#xA;&#xD;&#xA;git clone https://github.com/kabocha-network/parachain.git&#xD;&#xA;cd parachain&#xD;&#xA;cargo build --release&#xD;&#xA;&#xD;&#xA;./target/release/parachain-collator build-spec --disable-default-bootnode &gt; kabocha-local-parachain-plain.json&#xD;&#xA;&#xD;&#xA;# Edit kabocha-local-parachain-plain.json:&#xD;&#xA;# &quot;para_id&quot;: 2000, -&gt; &quot;para_id&quot;: 300,&#xD;&#xA;# &quot;parachainId&quot;: 2000 -&gt; &quot;parachainId&quot;: 300&#xD;&#xA;&#xD;&#xA;./target/release/parachain-collator build-spec --chain kabocha-local-parachain-plain.json --raw --disable-default-bootnode &gt; kabocha-local-parachain-300-raw.json&#xD;&#xA;&#xD;&#xA;./target/release/parachain-collator export-genesis-wasm --chain kabocha-local-parachain-300-raw.json &gt; para-300-wasm&#xD;&#xA;&#xD;&#xA;./target/release/parachain-collator export-genesis-state --chain kabocha-local-parachain-300-raw.json &gt; para-300-genesis&#xD;&#xA;&#xD;&#xA;./target/release/parachain-collator \&#xD;&#xA;  --alice \&#xD;&#xA;  --collator \&#xD;&#xA;  --force-authoring \&#xD;&#xA;  --chain kabocha-local-parachain-300-raw.json \&#xD;&#xA;  --base-path /tmp/parachain-alice \&#xD;&#xA;  --port 40333 \&#xD;&#xA;  --ws-port 8844 \&#xD;&#xA;  -- \&#xD;&#xA;  --execution wasm \&#xD;&#xA;  --chain /tmp/rococo-custom-2-raw.json \&#xD;&#xA;  --port 30343 \&#xD;&#xA;  --ws-port 9977&#xD;&#xA;&#xD;&#xA;# Go to the PolkadotJS UI:&#xD;&#xA;# Developer -&gt; sudo -&gt; paraSudoWrapper -&gt; sudoScheduleParaInitialize(id, genesis)&#xD;&#xA;# id must be 300&#xD;&#xA;# upload the para-300-genesis file&#xD;&#xA;# upload the para-300-wasm file&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Let us know where it breaks for you." ContentLicense="CC BY-SA 4.0" />
  <row Id="10723" PostHistoryTypeId="2" PostId="2864" RevisionGUID="9cfa04b1-4fcd-4f1a-b208-736c5fdf1a48" CreationDate="2022-05-25T22:41:34.177" UserId="702" Text="I'm having trouble using subxt to query for an event at specific block. Not sure what casts/conversions are necessary to filter for the events I want.&#xD;&#xA;&#xD;&#xA;In my case, I want to query for a 'BasicOutboundChannel.Committed' event at block X.&#xD;&#xA;&#xD;&#xA;None of the examples in the subxt repo show how to do this, as they only read events using subscriptions.&#xD;&#xA;&#xD;&#xA;My client code so far:&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime { }&#xD;&#xA;&#xD;&#xA;use subxt::{ClientBuilder, DefaultConfig, SubstrateExtrinsicParams};&#xD;&#xA;use subxt::sp_core::H256;&#xD;&#xA;use hex_literal::hex;&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;	let api = ClientBuilder::new()&#xD;&#xA;    .set_url(&quot;ws://localhost:11144&quot;)&#xD;&#xA;    .build()&#xD;&#xA;    .await?&#xD;&#xA;    .to_runtime_api::&lt;runtime::RuntimeApi&lt;DefaultConfig, SubstrateExtrinsicParams&lt;DefaultConfig&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let hash: Option&lt;H256&gt; = Some(hex!(&quot;4f1a8ead12dc09b449e8a4b37fb1de21b3a2b1841a1df037194bf0e1bc156285&quot;).into());&#xD;&#xA;&#xD;&#xA;	let events = api.storage().system().events(hash).await?;&#xD;&#xA;&#xD;&#xA;	// NOTE: This fails to compile. How can I test that events[0] is a 'Committed' event?&#xD;&#xA;	let event: runtime::basic_outbound_channel::events::Committed = events[0].event.try_into()?;&#xD;&#xA;&#xD;&#xA;	println!(&quot;{:?}&quot;, event);&#xD;&#xA;&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error message:&#xD;&#xA;```&#xD;&#xA;the trait bound `basic_outbound_channel::events::Committed: From&lt;snowbase_runtime::Event&gt;` is not satisfied&#xD;&#xA;required because of the requirements on the impl of `Into&lt;basic_outbound_channel::events::Committed&gt;` for `snowbase_runtime::Event`&#xD;&#xA;required because of the requirements on the impl of `TryFrom&lt;snowbase_runtime::Event&gt;` for `basic_outbound_channel::events::Committed`&#xD;&#xA;required because of the requirements on the impl of `TryInto&lt;basic_outbound_channel::events::Committed&gt;` for `snowbase_runtime::Event`rustcE0277&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10725" PostHistoryTypeId="1" PostId="2864" RevisionGUID="9cfa04b1-4fcd-4f1a-b208-736c5fdf1a48" CreationDate="2022-05-25T22:41:34.177" UserId="702" Text="How to use subxt to query for a specific event at a specific block" ContentLicense="CC BY-SA 4.0" />
  <row Id="10726" PostHistoryTypeId="3" PostId="2864" RevisionGUID="9cfa04b1-4fcd-4f1a-b208-736c5fdf1a48" CreationDate="2022-05-25T22:41:34.177" UserId="702" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10727" PostHistoryTypeId="4" PostId="2864" RevisionGUID="7dbc8caa-167a-48ee-85c8-143580890edb" CreationDate="2022-05-25T22:47:01.410" UserId="702" Comment="edited title" Text="How to use subxt to query for a historical event" ContentLicense="CC BY-SA 4.0" />
  <row Id="10728" PostHistoryTypeId="5" PostId="2864" RevisionGUID="e004800b-9558-4ba0-ad3c-b9153aff540e" CreationDate="2022-05-25T22:54:57.437" UserId="702" Comment="added 10 characters in body" Text="I'm having trouble using subxt to query for an historical event. Not sure what manipulation is necessary to filter for the specific events I want.&#xD;&#xA;&#xD;&#xA;In my case, I want to query for a 'BasicOutboundChannel.Committed' event at block X.&#xD;&#xA;&#xD;&#xA;None of the examples in the subxt repo show how to do this, as they only read events emitted by subscriptions (a different code path).&#xD;&#xA;&#xD;&#xA;My client code so far:&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime { }&#xD;&#xA;&#xD;&#xA;use subxt::{ClientBuilder, DefaultConfig, SubstrateExtrinsicParams};&#xD;&#xA;use subxt::sp_core::H256;&#xD;&#xA;use hex_literal::hex;&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;	let api = ClientBuilder::new()&#xD;&#xA;    .set_url(&quot;ws://localhost:11144&quot;)&#xD;&#xA;    .build()&#xD;&#xA;    .await?&#xD;&#xA;    .to_runtime_api::&lt;runtime::RuntimeApi&lt;DefaultConfig, SubstrateExtrinsicParams&lt;DefaultConfig&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let hash: Option&lt;H256&gt; = Some(hex!(&quot;4f1a8ead12dc09b449e8a4b37fb1de21b3a2b1841a1df037194bf0e1bc156285&quot;).into());&#xD;&#xA;&#xD;&#xA;	let events = api.storage().system().events(hash).await?;&#xD;&#xA;&#xD;&#xA;	// NOTE: This fails to compile. How can I test that events[0] is a 'Committed' event?&#xD;&#xA;	let event: runtime::basic_outbound_channel::events::Committed = events[0].event.try_into()?;&#xD;&#xA;&#xD;&#xA;	println!(&quot;{:?}&quot;, event);&#xD;&#xA;&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error message:&#xD;&#xA;```&#xD;&#xA;the trait bound `basic_outbound_channel::events::Committed: From&lt;snowbase_runtime::Event&gt;` is not satisfied&#xD;&#xA;required because of the requirements on the impl of `Into&lt;basic_outbound_channel::events::Committed&gt;` for `snowbase_runtime::Event`&#xD;&#xA;required because of the requirements on the impl of `TryFrom&lt;snowbase_runtime::Event&gt;` for `basic_outbound_channel::events::Committed`&#xD;&#xA;required because of the requirements on the impl of `TryInto&lt;basic_outbound_channel::events::Committed&gt;` for `snowbase_runtime::Event`rustcE0277&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10729" PostHistoryTypeId="4" PostId="2864" RevisionGUID="e004800b-9558-4ba0-ad3c-b9153aff540e" CreationDate="2022-05-25T22:54:57.437" UserId="702" Comment="added 10 characters in body" Text="How to use subxt to query for an historical event" ContentLicense="CC BY-SA 4.0" />
  <row Id="10730" PostHistoryTypeId="5" PostId="2864" RevisionGUID="c11737ed-f41b-4ac9-848c-cbb2435071a8" CreationDate="2022-05-25T23:25:25.497" UserId="702" Comment="edited body" Text="I'm having trouble using subxt to query for an historical event. Not sure what manipulation is necessary to filter for the specific events I want.&#xD;&#xA;&#xD;&#xA;In my case, I want to query for a `BasicOutboundChannel.Committed` event at block X.&#xD;&#xA;&#xD;&#xA;None of the examples in the subxt repo show how to do this, as they only read events emitted by subscriptions (a different code path).&#xD;&#xA;&#xD;&#xA;My client code so far:&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime { }&#xD;&#xA;&#xD;&#xA;use subxt::{ClientBuilder, DefaultConfig, SubstrateExtrinsicParams};&#xD;&#xA;use subxt::sp_core::H256;&#xD;&#xA;use hex_literal::hex;&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;	let api = ClientBuilder::new()&#xD;&#xA;    .set_url(&quot;ws://localhost:11144&quot;)&#xD;&#xA;    .build()&#xD;&#xA;    .await?&#xD;&#xA;    .to_runtime_api::&lt;runtime::RuntimeApi&lt;DefaultConfig, SubstrateExtrinsicParams&lt;DefaultConfig&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let hash: Option&lt;H256&gt; = Some(hex!(&quot;4f1a8ead12dc09b449e8a4b37fb1de21b3a2b1841a1df037194bf0e1bc156285&quot;).into());&#xD;&#xA;&#xD;&#xA;	let events = api.storage().system().events(hash).await?;&#xD;&#xA;&#xD;&#xA;	// NOTE: This fails to compile. How can I test that events[0] is a 'Committed' event?&#xD;&#xA;	let event: runtime::basic_outbound_channel::events::Committed = events[0].event.try_into()?;&#xD;&#xA;&#xD;&#xA;	println!(&quot;{:?}&quot;, event);&#xD;&#xA;&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error message:&#xD;&#xA;```&#xD;&#xA;the trait bound `basic_outbound_channel::events::Committed: From&lt;snowbase_runtime::Event&gt;` is not satisfied&#xD;&#xA;required because of the requirements on the impl of `Into&lt;basic_outbound_channel::events::Committed&gt;` for `snowbase_runtime::Event`&#xD;&#xA;required because of the requirements on the impl of `TryFrom&lt;snowbase_runtime::Event&gt;` for `basic_outbound_channel::events::Committed`&#xD;&#xA;required because of the requirements on the impl of `TryInto&lt;basic_outbound_channel::events::Committed&gt;` for `snowbase_runtime::Event`rustcE0277&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10731" PostHistoryTypeId="2" PostId="2865" RevisionGUID="efb26638-84ba-4840-a5b7-b747cdfd8be8" CreationDate="2022-05-25T23:26:05.117" UserId="1950" Text="I want to create a new Asset names PET in Substrate. What I did is from the PolkadotJS App Created and Minted the asset using the account Alice&#xD;&#xA;I want to make this assetid to use as Freee Balance and make it default &#xD;&#xA;How to accomplish that using Substrate " ContentLicense="CC BY-SA 4.0" />
  <row Id="10733" PostHistoryTypeId="1" PostId="2865" RevisionGUID="efb26638-84ba-4840-a5b7-b747cdfd8be8" CreationDate="2022-05-25T23:26:05.117" UserId="1950" Text="How to use the created asset as Free Balance" ContentLicense="CC BY-SA 4.0" />
  <row Id="10734" PostHistoryTypeId="3" PostId="2865" RevisionGUID="efb26638-84ba-4840-a5b7-b747cdfd8be8" CreationDate="2022-05-25T23:26:05.117" UserId="1950" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10735" PostHistoryTypeId="2" PostId="2866" RevisionGUID="d335a90a-a493-4206-a871-f06bdd5a367b" CreationDate="2022-05-25T23:52:43.327" UserId="702" Text="Eventually found the solution for querying a specific historical event:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime { }&#xD;&#xA;&#xD;&#xA;use subxt::{ClientBuilder, DefaultConfig, SubstrateExtrinsicParams};&#xD;&#xA;use subxt::sp_core::H256;&#xD;&#xA;use hex_literal::hex;&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;	let api = ClientBuilder::new()&#xD;&#xA;    .set_url(&quot;ws://localhost:11144&quot;)&#xD;&#xA;    .build()&#xD;&#xA;    .await?&#xD;&#xA;    .to_runtime_api::&lt;runtime::RuntimeApi&lt;DefaultConfig, SubstrateExtrinsicParams&lt;DefaultConfig&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let hash: Option&lt;H256&gt; = Some(hex!(&quot;4f1a8ead12dc09b449e8a4b37fb1de21b3a2b1841a1df037194bf0e1bc156285&quot;).into());&#xD;&#xA;&#xD;&#xA;	let events = api.storage().system().events(hash).await?;&#xD;&#xA;&#xD;&#xA;	if let runtime::runtime_types::snowbase_runtime::Event::BasicOutboundChannel(ev) = &amp;events[0].event {&#xD;&#xA;		if let runtime::runtime_types::snowbridge_basic_channel::outbound::pallet::Event::Committed { .. }  = ev {&#xD;&#xA;			println!(&quot;found Committed event&quot;);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10737" PostHistoryTypeId="5" PostId="2866" RevisionGUID="44b1ceac-995e-4795-8833-10340edbaf87" CreationDate="2022-05-25T23:59:13.173" UserId="702" Comment="added 11 characters in body" Text="Eventually found the solution for querying whether a historical event was emitted:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime { }&#xD;&#xA;&#xD;&#xA;use subxt::{ClientBuilder, DefaultConfig, SubstrateExtrinsicParams};&#xD;&#xA;use subxt::sp_core::H256;&#xD;&#xA;use hex_literal::hex;&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;	let api = ClientBuilder::new()&#xD;&#xA;    .set_url(&quot;ws://localhost:11144&quot;)&#xD;&#xA;    .build()&#xD;&#xA;    .await?&#xD;&#xA;    .to_runtime_api::&lt;runtime::RuntimeApi&lt;DefaultConfig, SubstrateExtrinsicParams&lt;DefaultConfig&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let hash: Option&lt;H256&gt; = Some(hex!(&quot;4f1a8ead12dc09b449e8a4b37fb1de21b3a2b1841a1df037194bf0e1bc156285&quot;).into());&#xD;&#xA;&#xD;&#xA;	let events = api.storage().system().events(hash).await?;&#xD;&#xA;&#xD;&#xA;	if let runtime::runtime_types::snowbase_runtime::Event::BasicOutboundChannel(ev) = &amp;events[0].event {&#xD;&#xA;		if let runtime::runtime_types::snowbridge_basic_channel::outbound::pallet::Event::Committed { .. }  = ev {&#xD;&#xA;			println!(&quot;found Committed event&quot;);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10738" PostHistoryTypeId="5" PostId="2866" RevisionGUID="d750cc26-2139-4974-8d12-b93b5be1f931" CreationDate="2022-05-26T00:51:30.403" UserId="702" Comment="added 9 characters in body" Text="Eventually found the right incantation for querying whether a historical event was emitted:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime { }&#xD;&#xA;&#xD;&#xA;use subxt::{ClientBuilder, DefaultConfig, SubstrateExtrinsicParams};&#xD;&#xA;use subxt::sp_core::H256;&#xD;&#xA;use hex_literal::hex;&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;	let api = ClientBuilder::new()&#xD;&#xA;    .set_url(&quot;ws://localhost:11144&quot;)&#xD;&#xA;    .build()&#xD;&#xA;    .await?&#xD;&#xA;    .to_runtime_api::&lt;runtime::RuntimeApi&lt;DefaultConfig, SubstrateExtrinsicParams&lt;DefaultConfig&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;	let hash: Option&lt;H256&gt; = Some(hex!(&quot;4f1a8ead12dc09b449e8a4b37fb1de21b3a2b1841a1df037194bf0e1bc156285&quot;).into());&#xD;&#xA;&#xD;&#xA;	let events = api.storage().system().events(hash).await?;&#xD;&#xA;&#xD;&#xA;	if let runtime::runtime_types::snowbase_runtime::Event::BasicOutboundChannel(ev) = &amp;events[0].event {&#xD;&#xA;		if let runtime::runtime_types::snowbridge_basic_channel::outbound::pallet::Event::Committed { .. }  = ev {&#xD;&#xA;			println!(&quot;found Committed event&quot;);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10739" PostHistoryTypeId="2" PostId="2867" RevisionGUID="ebc8e65f-5a0b-4749-be26-7b136f41c1a4" CreationDate="2022-05-26T02:27:26.397" UserId="523" Text="for native asset like `DOT` in polkadot is defined in chain spec and you can check here https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.api.onfinality.io%2Fpublic-ws#/settings/metadata&#xD;&#xA;&#xD;&#xA;for multiple fungible asset chain like `statemine` you may check it from storage in `asset` module" ContentLicense="CC BY-SA 4.0" />
  <row Id="10741" PostHistoryTypeId="2" PostId="2868" RevisionGUID="44d9257e-2680-4c88-b6f4-1b8c0b28d83f" CreationDate="2022-05-26T02:47:01.340" UserId="251" Text="We use https://github.com/maxsam4/fork-off-substrate and try-runtime before.&#xD;&#xA;&#xD;&#xA;As the chain state goes larger and larger, it was hard to export/fetch the chain state." ContentLicense="CC BY-SA 4.0" />
  <row Id="10743" PostHistoryTypeId="1" PostId="2868" RevisionGUID="44d9257e-2680-4c88-b6f4-1b8c0b28d83f" CreationDate="2022-05-26T02:47:01.340" UserId="251" Text="What's the best practice to do the tests before runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10744" PostHistoryTypeId="3" PostId="2868" RevisionGUID="44d9257e-2680-4c88-b6f4-1b8c0b28d83f" CreationDate="2022-05-26T02:47:01.340" UserId="251" Text="|runtime-upgrade|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10746" PostHistoryTypeId="2" PostId="2869" RevisionGUID="5c2d2d9e-ca5c-45b9-8f81-545f4fc873db" CreationDate="2022-05-26T03:57:30.617" UserId="627" Text="The `system_properties` RPC call returns the on-chain properties for the connected chain. &#xD;&#xA;&#xD;&#xA;Additionally, if using the JS API, it is also extracted and available on `api.registry.chainDecimals`, `api.registry.chainSS58` and `api.registry.chainTokens`. (For each parachain, you need to get it from the chain itself)" ContentLicense="CC BY-SA 4.0" />
  <row Id="10748" PostHistoryTypeId="50" PostId="2129" RevisionGUID="10088cba-bee2-45bb-b185-e444ba8d750b" CreationDate="2022-05-26T05:01:45.180" UserId="-1" />
  <row Id="10749" PostHistoryTypeId="2" PostId="2870" RevisionGUID="290c9650-632f-4213-9bf2-e79617bef706" CreationDate="2022-05-26T07:26:31.577" UserId="2473" Text="In my smart contract, all the ink dependencies are set to **`=3.0.1`** because of this issue:&#xD;&#xA;https://substrate.stackexchange.com/questions/2721/cargo-contract-3-0-1&#xD;&#xA;&#xD;&#xA;When I tried to execute the `cargo contract build` to the flipper project, it results into this error: &#xD;&#xA;```&#xD;&#xA;error[E0061]: this function takes 2 arguments but 1 argument was supplied&#xD;&#xA;  --&gt; lib.rs:18:9&#xD;&#xA;   |&#xD;&#xA;18 | /         /// Constructor that initializes the `bool` value to the given `init_value`.&#xD;&#xA;19 | |         #[ink(constructor)]&#xD;&#xA;20 | |         pub fn new(init_value: bool) -&gt; Self {&#xD;&#xA;21 | |             Self { value: init_value }&#xD;&#xA;22 | |         }&#xD;&#xA;   | |         ^&#xD;&#xA;   | |         |&#xD;&#xA;   | |_________supplied 1 argument&#xD;&#xA;   |           expected 2 arguments&#xD;&#xA;   |&#xD;&#xA;note: function defined here&#xD;&#xA;  --&gt; /home/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_lang-3.0.1/src/codegen/dispatch/execution.rs:81:8&#xD;&#xA;   |&#xD;&#xA;81 | pub fn execute_constructor&lt;Contract, F, R&gt;(&#xD;&#xA;   |        ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0061]: this function takes 2 arguments but 1 argument was supplied&#xD;&#xA;  --&gt; lib.rs:24:9&#xD;&#xA;   |&#xD;&#xA;24 | /         /// Constructor that initializes the `bool` value to `false`.&#xD;&#xA;25 | |         ///&#xD;&#xA;26 | |         /// Constructors can delegate to other constructors.&#xD;&#xA;27 | |         #[ink(constructor)]&#xD;&#xA;28 | |         pub fn default() -&gt; Self {&#xD;&#xA;29 | |             Self::new(Default::default())&#xD;&#xA;30 | |         }&#xD;&#xA;   | |         ^&#xD;&#xA;   | |         |&#xD;&#xA;   | |_________supplied 1 argument&#xD;&#xA;   |           expected 2 arguments&#xD;&#xA;   |&#xD;&#xA;note: function defined here&#xD;&#xA;  --&gt; /home/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_lang-3.0.1/src/codegen/dispatch/execution.rs:81:8&#xD;&#xA;   |&#xD;&#xA;81 | pub fn execute_constructor&lt;Contract, F, R&gt;(&#xD;&#xA;   |        ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0061`.&#xD;&#xA;error: could not compile `flipper` due to 2 previous errors&#xD;&#xA;Error: Compilation failed with toolchain `nightly-2022-03-14-x86_64-unknown-linux-gnu`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    command failed: &quot;cargo&quot; &quot;check&quot; &quot;--target-dir&quot; &quot;/home/projects/flipper/target/dylint/target/nightly-2022-03-14-x86_64-unknown-linux-gnu&quot; &quot;--manifest-path&quot; &quot;/home/projects/flipper/Cargo.toml&quot;&#xD;&#xA;ERROR: `&quot;/home/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;dylint&quot; &quot;--lib&quot; &quot;ink_linting&quot; &quot;--manifest-path=/home/projects/flipper/Cargo.toml&quot;` failed with exit code: Some(1)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm at my wit's end. &#xD;&#xA;(I would like to specify that the substrate runtime is for ***`polkadot-v0.9.18`***) " ContentLicense="CC BY-SA 4.0" />
  <row Id="10751" PostHistoryTypeId="1" PostId="2870" RevisionGUID="290c9650-632f-4213-9bf2-e79617bef706" CreationDate="2022-05-26T07:26:31.577" UserId="2473" Text="cargo contract throws error about supplied arguments in ` #[ink(constructor)]` for version 3.0.1" ContentLicense="CC BY-SA 4.0" />
  <row Id="10752" PostHistoryTypeId="3" PostId="2870" RevisionGUID="290c9650-632f-4213-9bf2-e79617bef706" CreationDate="2022-05-26T07:26:31.577" UserId="2473" Text="|ink|smart-contract|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10753" PostHistoryTypeId="2" PostId="2871" RevisionGUID="5e65daa8-226a-49d6-82ea-1003f47749e6" CreationDate="2022-05-26T07:56:20.570" UserId="2379" Text="The forkless runtime upgrade is an excellent feature!&#xD;&#xA;I have searched many documents on *runtime upgrade*, but no guide found for handling upgrade exceptions or rollback.&#xD;&#xA;&#xD;&#xA;The most exception often happens is &quot;Block producing stuck&quot; OR &quot;Same Block Imported again and again&quot;! I know there are many reasons for it.&#xD;&#xA;1. &quot;build block took too long&quot;&#xD;&#xA;2. &quot;trouble sending the block&quot;&#xD;&#xA;3. &quot;Invalid parachain code in the relay&quot;&#xD;&#xA;4. &quot;trouble verifying the block in time&quot;&#xD;&#xA;&#xD;&#xA;So the core question is: How to fix no new block-producing issue caused by **runtime upgrade**?&#xD;&#xA;&#xD;&#xA;Ps. &quot;Took too long&quot; exception case, Our chain block target 12s. Imported #110016 again and again!&#xD;&#xA;```&#xD;&#xA;2022-05-25 14:35:36.537  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 110016 (28 ms) [hash: 0x51e4bcb83f34a48a0cc05fe79b59fad058736bc2f6e32f90979d2f68eb79762e; parent_hash: 0x4877…ba84; extrinsics (3): [0x371a…3f3b, 0x5696…2d07, 0x3992…fc98]]&#xD;&#xA;2022-05-25 14:35:36.540  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 110016. Hash now 0xd73766b154601ccf8d3cb95c32cda7327e5dbb1473f340acd5aeef530aec34b6, previously 0x51e4bcb83f34a48a0cc05fe79b59fad058736bc2f6e32f90979d2f68eb79762e.&#xD;&#xA;2022-05-25 14:35:36.547  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #110016 (0xd737…34b6)&#xD;&#xA;2022-05-25 14:35:36.549  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.181640625kb, extrinsics: 729.6669921875kb, storage_proof: 732.60546875kb }&#xD;&#xA;2022-05-25 14:35:36.551  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 738.232421875kb&#xD;&#xA;2022-05-25 14:35:36.561  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0xd73766b154601ccf8d3cb95c32cda7327e5dbb1473f340acd5aeef530aec34b6&#xD;&#xA;2022-05-25 14:35:36.794  INFO tokio-runtime-worker substrate: [Parachain]  Idle (1 peers), best: #110015 (0x4877…ba84), finalized #110015 (0x4877…ba84), ⬇ 0 ⬆ 0&#xD;&#xA;2022-05-25 14:35:38.065  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (50 peers), best: #387863 (0xf564…a777), finalized #387859 (0x38af…d76e), ⬇ 196.2kiB/s ⬆ 413.2kiB/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/questions/859/my-parachain-has-not-been-able-to-issue-a-block-after-submitting-the-upgrade-tra/876#876&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/forkless-upgrades/&#xD;&#xA;- https://docs.substrate.io/v3/runtime/upgrades/&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-runtime-upgrades&#xD;&#xA;- https://docs.substrate.io/how-to-guides/v3/parachains/runtime-upgrades/&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10755" PostHistoryTypeId="1" PostId="2871" RevisionGUID="5e65daa8-226a-49d6-82ea-1003f47749e6" CreationDate="2022-05-26T07:56:20.570" UserId="2379" Text="Guide or Best practice for parachain Runtime Upgrade(Exception handle or rollback)!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10756" PostHistoryTypeId="3" PostId="2871" RevisionGUID="5e65daa8-226a-49d6-82ea-1003f47749e6" CreationDate="2022-05-26T07:56:20.570" UserId="2379" Text="|runtime-upgrade|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10757" PostHistoryTypeId="2" PostId="2872" RevisionGUID="fe430492-ace8-4dfc-bcb3-8c0e7e98a7cf" CreationDate="2022-05-26T08:25:41.990" UserId="85" Text="parachaininfo / parachainId() is the only way at the moment. It works well enough." ContentLicense="CC BY-SA 4.0" />
  <row Id="10759" PostHistoryTypeId="6" PostId="2870" RevisionGUID="7be545eb-965c-4232-a462-9f4cee45c1cc" CreationDate="2022-05-26T09:25:28.330" UserId="2473" Comment="edited tags" Text="|ink|smart-contract|cargo|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10761" PostHistoryTypeId="2" PostId="2873" RevisionGUID="e50c2399-6d19-4acf-89a0-04751db0db8f" CreationDate="2022-05-26T10:31:20.323" UserId="1789" Text="Install cb-sol-cli&#xD;&#xA;https://github.com/ChainSafe/chainbridge-deploy/blob/master/cb-sol-cli/README.md&#xD;&#xA;&#xD;&#xA;`$ make install`&#xD;&#xA;&#xD;&#xA;Then try to run the ChainBridge following this guide &#xD;&#xA;https://chainbridge.chainsafe.io/local/&#xD;&#xA;```&#xD;&#xA;On-Chain Setup &#xD;&#xA;Deploy Contracts&#xD;&#xA;&#xD;&#xA;To deploy the contracts on to the Ethereum chain, run the following:&#xD;&#xA;Deploy Contracts:&#xD;&#xA;$ cb-sol-cli deploy --all --relayerThreshold 1&#xD;&#xA;```&#xD;&#xA;Then I got:&#xD;&#xA;```&#xD;&#xA;node:internal/modules/cjs/loader:936&#xD;&#xA;  throw err;&#xD;&#xA;  ^&#xD;&#xA;Error: Cannot find module 'commander'&#xD;&#xA;Require stack:&#xD;&#xA;- /mnt/sda3/polkadot/chainbridge-deploy/cb-sol-cli/index.js&#xD;&#xA;    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)&#xD;&#xA;    at Function.Module._load (node:internal/modules/cjs/loader:778:27)&#xD;&#xA;    at Module.require (node:internal/modules/cjs/loader:1005:19)&#xD;&#xA;    at require (node:internal/modules/cjs/helpers:102:18)&#xD;&#xA;    at Object.&lt;anonymous&gt; (/mnt/sda3/polkadot/chainbridge-deploy/cb-sol-cli/index.js:3:19)&#xD;&#xA;    at Module._compile (node:internal/modules/cjs/loader:1105:14)&#xD;&#xA;    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)&#xD;&#xA;    at Module.load (node:internal/modules/cjs/loader:981:32)&#xD;&#xA;    at Function.Module._load (node:internal/modules/cjs/loader:822:12)&#xD;&#xA;    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {&#xD;&#xA;  code: 'MODULE_NOT_FOUND',&#xD;&#xA;  requireStack: [ '/mnt/sda3/polkadot/chainbridge-deploy/cb-sol-cli/index.js' ]&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10763" PostHistoryTypeId="1" PostId="2873" RevisionGUID="e50c2399-6d19-4acf-89a0-04751db0db8f" CreationDate="2022-05-26T10:31:20.323" UserId="1789" Text="ChainBridge: cb-sol-cli cannot deploy Eth contracts... Cannot find module 'commander'" ContentLicense="CC BY-SA 4.0" />
  <row Id="10764" PostHistoryTypeId="3" PostId="2873" RevisionGUID="e50c2399-6d19-4acf-89a0-04751db0db8f" CreationDate="2022-05-26T10:31:20.323" UserId="1789" Text="|chainbridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10765" PostHistoryTypeId="2" PostId="2874" RevisionGUID="f6854d92-d7be-4fff-8e83-82b6b21e48b9" CreationDate="2022-05-26T10:31:24.247" UserId="2632" Text="I believe, some of the Kusama based projects have done that already. What exactly did they do and what are the options if a project wants to prolong or renew the parachain slot? " ContentLicense="CC BY-SA 4.0" />
  <row Id="10767" PostHistoryTypeId="1" PostId="2874" RevisionGUID="f6854d92-d7be-4fff-8e83-82b6b21e48b9" CreationDate="2022-05-26T10:31:24.247" UserId="2632" Text="How can a project prolong a parachain slot lease in Kusama?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10768" PostHistoryTypeId="3" PostId="2874" RevisionGUID="f6854d92-d7be-4fff-8e83-82b6b21e48b9" CreationDate="2022-05-26T10:31:24.247" UserId="2632" Text="|parachain|crowdloan|slot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10773" PostHistoryTypeId="5" PostId="2870" RevisionGUID="8a348073-8217-41b0-b1d4-0d432082fe98" CreationDate="2022-05-26T11:13:33.953" UserId="2473" Comment="added 1266 characters in body" Text="In my smart contract, all the ink dependencies are set to **`=3.0.1`** because of this issue:&#xD;&#xA;https://substrate.stackexchange.com/questions/2721/cargo-contract-3-0-1&#xD;&#xA;&#xD;&#xA;When I tried to execute the `cargo contract build` or even `cargo +nightly contract build` to the flipper project, it results into this error: &#xD;&#xA;```&#xD;&#xA;error[E0061]: this function takes 2 arguments but 1 argument was supplied&#xD;&#xA;  --&gt; lib.rs:18:9&#xD;&#xA;   |&#xD;&#xA;18 | /         /// Constructor that initializes the `bool` value to the given `init_value`.&#xD;&#xA;19 | |         #[ink(constructor)]&#xD;&#xA;20 | |         pub fn new(init_value: bool) -&gt; Self {&#xD;&#xA;21 | |             Self { value: init_value }&#xD;&#xA;22 | |         }&#xD;&#xA;   | |         ^&#xD;&#xA;   | |         |&#xD;&#xA;   | |_________supplied 1 argument&#xD;&#xA;   |           expected 2 arguments&#xD;&#xA;   |&#xD;&#xA;note: function defined here&#xD;&#xA;  --&gt; /home/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_lang-3.0.1/src/codegen/dispatch/execution.rs:81:8&#xD;&#xA;   |&#xD;&#xA;81 | pub fn execute_constructor&lt;Contract, F, R&gt;(&#xD;&#xA;   |        ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0061]: this function takes 2 arguments but 1 argument was supplied&#xD;&#xA;  --&gt; lib.rs:24:9&#xD;&#xA;   |&#xD;&#xA;24 | /         /// Constructor that initializes the `bool` value to `false`.&#xD;&#xA;25 | |         ///&#xD;&#xA;26 | |         /// Constructors can delegate to other constructors.&#xD;&#xA;27 | |         #[ink(constructor)]&#xD;&#xA;28 | |         pub fn default() -&gt; Self {&#xD;&#xA;29 | |             Self::new(Default::default())&#xD;&#xA;30 | |         }&#xD;&#xA;   | |         ^&#xD;&#xA;   | |         |&#xD;&#xA;   | |_________supplied 1 argument&#xD;&#xA;   |           expected 2 arguments&#xD;&#xA;   |&#xD;&#xA;note: function defined here&#xD;&#xA;  --&gt; /home/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_lang-3.0.1/src/codegen/dispatch/execution.rs:81:8&#xD;&#xA;   |&#xD;&#xA;81 | pub fn execute_constructor&lt;Contract, F, R&gt;(&#xD;&#xA;   |        ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0061`.&#xD;&#xA;error: could not compile `flipper` due to 2 previous errors&#xD;&#xA;Error: Compilation failed with toolchain `nightly-2022-03-14-x86_64-unknown-linux-gnu`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    command failed: &quot;cargo&quot; &quot;check&quot; &quot;--target-dir&quot; &quot;/home/projects/flipper/target/dylint/target/nightly-2022-03-14-x86_64-unknown-linux-gnu&quot; &quot;--manifest-path&quot; &quot;/home/projects/flipper/Cargo.toml&quot;&#xD;&#xA;ERROR: `&quot;/home/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;dylint&quot; &quot;--lib&quot; &quot;ink_linting&quot; &quot;--manifest-path=/home/projects/flipper/Cargo.toml&quot;` failed with exit code: Some(1)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm at my wit's end. &#xD;&#xA;(I would like to specify that the substrate runtime is for ***`polkadot-v0.9.18`***) &#xD;&#xA;&#xD;&#xA;-----&#xD;&#xA;&#xD;&#xA;To replicate:&#xD;&#xA;&#xD;&#xA; - I am using `rustc 1.63.0-nightly (4cbaac699 2022-05-25)`&#xD;&#xA; - The `cargo contract` version is ***1.4***.&#xD;&#xA; - The smart contract is the flipper:`cargo contract new flipper`&#xD;&#xA; - And then in the ***.toml*** file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;flipper&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;[your_name] &lt;[your_email]&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink_primitives = { version = &quot;=3.0.1&quot;, default-features = false }&#xD;&#xA;ink_metadata = { version = &quot;=3.0.1&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;ink_env = { version = &quot;=3.0.1&quot;, default-features = false }&#xD;&#xA;ink_storage = { version = &quot;=3.0.1&quot;, default-features = false }&#xD;&#xA;ink_lang = { version = &quot;=3.0.1&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;name = &quot;flipper&quot;&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;crate-type = [&#xD;&#xA;	# Used for normal contract Wasm blobs.&#xD;&#xA;	&quot;cdylib&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink_metadata/std&quot;,&#xD;&#xA;    &quot;ink_env/std&quot;,&#xD;&#xA;    &quot;ink_storage/std&quot;,&#xD;&#xA;    &quot;ink_primitives/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10774" PostHistoryTypeId="2" PostId="2876" RevisionGUID="6fafe3bc-1841-48cd-890a-663de3cca8fd" CreationDate="2022-05-26T11:27:23.950" UserId="380" Text="I received this error and was able to get rid of it by upgrading the [substrate contracts node](https://github.com/paritytech/substrate-contracts-node) from `0.12.0` to `0.14.0`.&#xD;&#xA;&#xD;&#xA;Here's a more detailed view of my setup in an issue [on github&#xD;&#xA;](https://github.com/paritytech/ink/issues/1253#issuecomment-1124958646)" ContentLicense="CC BY-SA 4.0" />
  <row Id="10776" PostHistoryTypeId="2" PostId="2877" RevisionGUID="4cff9ba2-7890-4eb0-8d94-f082d8102053" CreationDate="2022-05-26T11:32:26.847" UserId="2565" Text="Is there a way to add a pallet-contracts to substrate-node-template? " ContentLicense="CC BY-SA 4.0" />
  <row Id="10778" PostHistoryTypeId="1" PostId="2877" RevisionGUID="4cff9ba2-7890-4eb0-8d94-f082d8102053" CreationDate="2022-05-26T11:32:26.847" UserId="2565" Text="Can I add pallet-contracts in substrate-node-template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10779" PostHistoryTypeId="3" PostId="2877" RevisionGUID="4cff9ba2-7890-4eb0-8d94-f082d8102053" CreationDate="2022-05-26T11:32:26.847" UserId="2565" Text="|substrate-node-template|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10780" PostHistoryTypeId="2" PostId="2878" RevisionGUID="81ce39ce-a29c-4ecc-bd86-737b36f1e968" CreationDate="2022-05-26T11:56:26.647" UserId="477" Text="This is caused by a peculiar behavior of Rust `url` library, which insists to store port as `None` in case that is the default port for a particular protocol. This is your case (443 for wss)&#xD;&#xA;&#xD;&#xA;`cargo-contract` uses `url` to parse the command line argument to `url::Url` and then converts it back to `String` while passing to `subxt::ClientBuilder`. That string -&gt; url -&gt; string conversion results in the port value being lost in case the default port was used. This is a bug in `cargo-contract`." ContentLicense="CC BY-SA 4.0" />
  <row Id="10782" PostHistoryTypeId="2" PostId="2879" RevisionGUID="f1a0d676-69ce-4612-b20c-046cc0bc5f36" CreationDate="2022-05-26T12:07:38.243" UserId="2633" Text="I would like to ask you how to subscribe events from Polkadot blockchain? &#xD;&#xA;I am writing a rust application and I need this functionality there. &#xD;&#xA;&#xD;&#xA;Is the using Substrate  the right direction to achieve that?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10784" PostHistoryTypeId="1" PostId="2879" RevisionGUID="f1a0d676-69ce-4612-b20c-046cc0bc5f36" CreationDate="2022-05-26T12:07:38.243" UserId="2633" Text="Subscribing events from Polkadot blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="10785" PostHistoryTypeId="3" PostId="2879" RevisionGUID="f1a0d676-69ce-4612-b20c-046cc0bc5f36" CreationDate="2022-05-26T12:07:38.243" UserId="2633" Text="|substrate-node|polkadot|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10791" PostHistoryTypeId="2" PostId="2881" RevisionGUID="7516f55a-dc2b-46e0-82ab-7a941f1059d4" CreationDate="2022-05-26T12:25:33.220" UserId="2308" Text="I know that the payload and extrinsics are dynamic, and even different between parachains/base chains(kusama,polkadot,rococo,westend). But I am struggling to find good documentation on how these payloads/extrinsics are constrcuted from the metadata. I am trying to get a C# code working with the RPC, basing it on the Ajuna.NetApi, but I have so far only managed to write a simple method call.&#xD;&#xA;&#xD;&#xA;Now I am trying to write a transaction call, and I am getting &quot;Invalid signature&quot; error. I am very convinced that I have something wrong/missing from my payload generation code. This is the code for the payload construction:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public byte[] Encode()&#xD;&#xA;        {&#xD;&#xA;            var bytes = new List&lt;byte&gt;();&#xD;&#xA;&#xD;&#xA;            SignedExtensionMetadataStruct[] extensions = Globals.LatestMetadata.RuntimeMetadataData.Extrinsic.SignedExtensions.Value;&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckMortality&quot;))&#xD;&#xA;                bytes.AddRange(_mortality.Encode()); &#xD;&#xA;&#xD;&#xA;                if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckNonce&quot;))&#xD;&#xA;                bytes.AddRange(_nonce.Encode());&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;ChargeTransactionPayment&quot;))&#xD;&#xA;                bytes.AddRange(_assetTxPayment.Encode());&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckSpecVersion&quot;))&#xD;&#xA;                bytes.AddRange(Utils.Value2Bytes(_specVersion));&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckTxVersion&quot;))&#xD;&#xA;                bytes.AddRange(Utils.Value2Bytes(_txVersion));&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckGenesis&quot;))&#xD;&#xA;                bytes.AddRange(_genesis.Encode());&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckGenesis&quot;))&#xD;&#xA;                bytes.AddRange(_genesis.Bytes);&#xD;&#xA;&#xD;&#xA;            // CheckMortality, Additional Blockhash check. Immortal = genesis_hash, Mortal = logic&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckMortality&quot;))&#xD;&#xA;                bytes.AddRange(_startEra.Bytes);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            return bytes.ToArray();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Is there a good example/documentation on the payload/extrinsic construction other than the text on the wiki page (which is good but barely scratched the issue of reading the metadata and constructing the payload from it) ?&#xD;&#xA;&#xD;&#xA;Im also a bit confused as in what order these parameters should be included in the payload.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10793" PostHistoryTypeId="1" PostId="2881" RevisionGUID="7516f55a-dc2b-46e0-82ab-7a941f1059d4" CreationDate="2022-05-26T12:25:33.220" UserId="2308" Text="A good overview of payloads and extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="10794" PostHistoryTypeId="3" PostId="2881" RevisionGUID="7516f55a-dc2b-46e0-82ab-7a941f1059d4" CreationDate="2022-05-26T12:25:33.220" UserId="2308" Text="|rpc|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10795" PostHistoryTypeId="5" PostId="2881" RevisionGUID="a215886a-d3ae-4cae-8e0a-03e00854c828" CreationDate="2022-05-26T12:26:38.603" UserId="2308" Comment="fixing spelling errors and giving a better title" Text="I know that the payload and extrinsics are dynamic, and even different between parachains/base chains(kusama,polkadot,rococo,westend). But I am struggling to find good documentation on how these payloads/extrinsics are constrcuted from the metadata. I am trying to get a C# code working with the RPC, basing it on the Ajuna.NetApi, but I have so far only managed to write a simple method call.&#xD;&#xA;&#xD;&#xA;Now I am trying to write a transaction call, and I am getting &quot;Invalid signature&quot; error. I am very convinced that I have something wrong/missing from my payload generation code. This is the code for the payload construction:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        public byte[] Encode()&#xD;&#xA;        {&#xD;&#xA;            var bytes = new List&lt;byte&gt;();&#xD;&#xA;&#xD;&#xA;            SignedExtensionMetadataStruct[] extensions = Globals.LatestMetadata.RuntimeMetadataData.Extrinsic.SignedExtensions.Value;&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckMortality&quot;))&#xD;&#xA;                bytes.AddRange(_mortality.Encode()); &#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckNonce&quot;))&#xD;&#xA;                bytes.AddRange(_nonce.Encode());&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;ChargeTransactionPayment&quot;))&#xD;&#xA;                bytes.AddRange(_assetTxPayment.Encode());&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckSpecVersion&quot;))&#xD;&#xA;                bytes.AddRange(Utils.Value2Bytes(_specVersion));&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckTxVersion&quot;))&#xD;&#xA;                bytes.AddRange(Utils.Value2Bytes(_txVersion));&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckGenesis&quot;))&#xD;&#xA;                bytes.AddRange(_genesis.Encode());&#xD;&#xA;&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckGenesis&quot;))&#xD;&#xA;                bytes.AddRange(_genesis.Bytes);&#xD;&#xA;&#xD;&#xA;            // CheckMortality, Additional Blockhash check. Immortal = genesis_hash, Mortal = logic&#xD;&#xA;            if (extensions.Any(e =&gt; e.SignedIdentifier.Value == &quot;CheckMortality&quot;))&#xD;&#xA;                bytes.AddRange(_startEra.Bytes);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            return bytes.ToArray();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Is there a good example/documentation on the payload/extrinsic construction other than the text on the wiki page (which is good but barely scratched the issue of reading the metadata and constructing the payload from it) ?&#xD;&#xA;&#xD;&#xA;Im also a bit confused as in what order these parameters should be included in the payload.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10796" PostHistoryTypeId="4" PostId="2881" RevisionGUID="a215886a-d3ae-4cae-8e0a-03e00854c828" CreationDate="2022-05-26T12:26:38.603" UserId="2308" Comment="fixing spelling errors and giving a better title" Text="Help needed with payloads and extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="10797" PostHistoryTypeId="2" PostId="2882" RevisionGUID="857a9fbe-9dc9-4518-9712-4daf06132d77" CreationDate="2022-05-26T12:59:33.083" UserId="16" Text="Yes. You can find a guide on how to do that [here](https://docs.substrate.io/how-to-guides/v3/pallet-design/contracts-pallet/). If you only want to play around with contracts locally I recommend using [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node)." ContentLicense="CC BY-SA 4.0" />
  <row Id="10799" PostHistoryTypeId="2" PostId="2883" RevisionGUID="5d8dcf1f-f8f9-4714-822f-9e58f85b510b" CreationDate="2022-05-26T13:09:19.007" UserId="555" Text="Can anyone please explain what is the relation between collator and staking rewards ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10801" PostHistoryTypeId="1" PostId="2883" RevisionGUID="5d8dcf1f-f8f9-4714-822f-9e58f85b510b" CreationDate="2022-05-26T13:09:19.007" UserId="555" Text="Relation between Collator and staking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10802" PostHistoryTypeId="3" PostId="2883" RevisionGUID="5d8dcf1f-f8f9-4714-822f-9e58f85b510b" CreationDate="2022-05-26T13:09:19.007" UserId="555" Text="|parachain-collator|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10803" PostHistoryTypeId="2" PostId="2884" RevisionGUID="0bb5b829-54bd-4161-a17b-5515fbaf6131" CreationDate="2022-05-26T13:49:48.873" UserId="45" Text="For a parachain to advance, the chain collators have to assemble blocks.&#xD;&#xA;&#xD;&#xA;The collators are people or entities that have some hardware. To motivate those collators to participate in block collation, they need to be incentivized. They need to be paid.&#xD;&#xA;&#xD;&#xA;The idea of parachain staking is that anybody with enough deposit can join as a collator. Then, we introduce a lottery. In each slot, one or several collators can win. The winning collators earned a chance to submit a parachain block. Whoever ends up submitting a block earns some reward. On average, all collators will win in that lottery. Those rewards (hopefully) make up for the costs of running the collators' hardware. &#xD;&#xA;&#xD;&#xA;This is a bit oversimplified, but I hope it helps understand the basic principle.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10805" PostHistoryTypeId="2" PostId="2885" RevisionGUID="9c2cbe06-cbe6-424f-a366-b4523ef15dde" CreationDate="2022-05-26T13:54:32.733" UserId="45" Text="There is actually. There is a JSONRPC endpoint named `state_call`. It works in a similar way to `eth_call`.&#xD;&#xA;&#xD;&#xA;You can see the definition [here](https://polkadot.js.org/docs/substrate/rpc/#callmethod-text-data-bytes-at-blockhash-bytes)." ContentLicense="CC BY-SA 4.0" />
  <row Id="10807" PostHistoryTypeId="5" PostId="2871" RevisionGUID="404abc41-d8c3-4d4c-b528-4b8c78a6cf3f" CreationDate="2022-05-26T14:17:10.200" UserId="2379" Comment="added 58 characters in body" Text="The forkless runtime upgrade is an excellent feature!&#xD;&#xA;I have searched many documents on *runtime upgrade*, but no guide found for handling upgrade exceptions or rollback.&#xD;&#xA;&#xD;&#xA;The most exception often happens is &quot;Block producing stuck&quot; OR &quot;Same Block Imported again and again&quot;! I know there are many reasons for it.&#xD;&#xA;1. &quot;build block took too long&quot;&#xD;&#xA;2. &quot;trouble sending the block&quot;&#xD;&#xA;3. &quot;Invalid parachain code in the relay&quot;&#xD;&#xA;4. &quot;trouble verifying the block in time&quot;&#xD;&#xA;&#xD;&#xA;So the core question is: How to fix no new block-producing issue caused by **runtime upgrade**?&#xD;&#xA;&#xD;&#xA;Ps. &quot;Took too long&quot; exception case, Our chain block target 12s. Imported #110016 again and again! (use authorizeUpgrade&amp;enactAuthorizedUpgrade for upgrade)&#xD;&#xA;```&#xD;&#xA;2022-05-25 14:35:36.537  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 110016 (28 ms) [hash: 0x51e4bcb83f34a48a0cc05fe79b59fad058736bc2f6e32f90979d2f68eb79762e; parent_hash: 0x4877…ba84; extrinsics (3): [0x371a…3f3b, 0x5696…2d07, 0x3992…fc98]]&#xD;&#xA;2022-05-25 14:35:36.540  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 110016. Hash now 0xd73766b154601ccf8d3cb95c32cda7327e5dbb1473f340acd5aeef530aec34b6, previously 0x51e4bcb83f34a48a0cc05fe79b59fad058736bc2f6e32f90979d2f68eb79762e.&#xD;&#xA;2022-05-25 14:35:36.547  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #110016 (0xd737…34b6)&#xD;&#xA;2022-05-25 14:35:36.549  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.181640625kb, extrinsics: 729.6669921875kb, storage_proof: 732.60546875kb }&#xD;&#xA;2022-05-25 14:35:36.551  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 738.232421875kb&#xD;&#xA;2022-05-25 14:35:36.561  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0xd73766b154601ccf8d3cb95c32cda7327e5dbb1473f340acd5aeef530aec34b6&#xD;&#xA;2022-05-25 14:35:36.794  INFO tokio-runtime-worker substrate: [Parachain]  Idle (1 peers), best: #110015 (0x4877…ba84), finalized #110015 (0x4877…ba84), ⬇ 0 ⬆ 0&#xD;&#xA;2022-05-25 14:35:38.065  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (50 peers), best: #387863 (0xf564…a777), finalized #387859 (0x38af…d76e), ⬇ 196.2kiB/s ⬆ 413.2kiB/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/questions/859/my-parachain-has-not-been-able-to-issue-a-block-after-submitting-the-upgrade-tra/876#876&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/forkless-upgrades/&#xD;&#xA;- https://docs.substrate.io/v3/runtime/upgrades/&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-runtime-upgrades&#xD;&#xA;- https://docs.substrate.io/how-to-guides/v3/parachains/runtime-upgrades/&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10808" PostHistoryTypeId="5" PostId="2871" RevisionGUID="548f86d4-7dd1-4b9e-80a4-2fce063a7d40" CreationDate="2022-05-26T14:22:25.483" UserId="2379" Comment="added 58 characters in body" Text="The forkless runtime upgrade is an excellent feature!&#xD;&#xA;I have searched many documents on *runtime upgrade*, but no guide found for handling upgrade exceptions or rollback.&#xD;&#xA;&#xD;&#xA;The most exception often happens is &quot;Block producing stuck&quot; OR &quot;Same Block Imported again and again&quot;! I know there are many reasons for it.&#xD;&#xA;1. &quot;build block took too long&quot;&#xD;&#xA;2. &quot;trouble sending the block&quot;&#xD;&#xA;3. &quot;Invalid parachain code in the relay&quot;&#xD;&#xA;4. &quot;trouble verifying the block in time&quot;&#xD;&#xA;&#xD;&#xA;So the core question is: How to fix no new block-producing issue caused by **runtime upgrade**?&#xD;&#xA;&#xD;&#xA;Ps. &quot;Took too long&quot; exception case, Our chain block target 12s. Imported #110016 again and again! (use authorizeUpgrade&amp;enactAuthorizedUpgrade for upgrade)&#xD;&#xA;```&#xD;&#xA;2022-05-25 14:35:36.537  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 110016 (28 ms) [hash: 0x51e4bcb83f34a48a0cc05fe79b59fad058736bc2f6e32f90979d2f68eb79762e; parent_hash: 0x4877…ba84; extrinsics (3): [0x371a…3f3b, 0x5696…2d07, 0x3992…fc98]]&#xD;&#xA;2022-05-25 14:35:36.540  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 110016. Hash now 0xd73766b154601ccf8d3cb95c32cda7327e5dbb1473f340acd5aeef530aec34b6, previously 0x51e4bcb83f34a48a0cc05fe79b59fad058736bc2f6e32f90979d2f68eb79762e.&#xD;&#xA;2022-05-25 14:35:36.547  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #110016 (0xd737…34b6)&#xD;&#xA;2022-05-25 14:35:36.549  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.181640625kb, extrinsics: 729.6669921875kb, storage_proof: 732.60546875kb }&#xD;&#xA;2022-05-25 14:35:36.551  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 738.232421875kb&#xD;&#xA;2022-05-25 14:35:36.561  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0xd73766b154601ccf8d3cb95c32cda7327e5dbb1473f340acd5aeef530aec34b6&#xD;&#xA;2022-05-25 14:35:36.794  INFO tokio-runtime-worker substrate: [Parachain]  Idle (1 peers), best: #110015 (0x4877…ba84), finalized #110015 (0x4877…ba84), ⬇ 0 ⬆ 0&#xD;&#xA;2022-05-25 14:35:38.065  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (50 peers), best: #387863 (0xf564…a777), finalized #387859 (0x38af…d76e), ⬇ 196.2kiB/s ⬆ 413.2kiB/s&#xD;&#xA;```&#xD;&#xA;CodeHash:&#xD;&#xA;[![code hash info][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Reference:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/questions/859/my-parachain-has-not-been-able-to-issue-a-block-after-submitting-the-upgrade-tra/876#876&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/forkless-upgrades/&#xD;&#xA;- https://docs.substrate.io/v3/runtime/upgrades/&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-runtime-upgrades&#xD;&#xA;- https://docs.substrate.io/how-to-guides/v3/parachains/runtime-upgrades/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/t6kps.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10809" PostHistoryTypeId="5" PostId="2871" RevisionGUID="8aade492-5424-42e2-8500-920979c29e55" CreationDate="2022-05-26T14:39:08.023" UserId="2379" Comment="added 12 characters in body" Text="The forkless runtime upgrade is an excellent feature!&#xD;&#xA;I have searched many documents on *runtime upgrade*, but no guide found for handling upgrade exceptions or rollback.&#xD;&#xA;&#xD;&#xA;The most exception often happens is &quot;Block producing stuck&quot; OR &quot;Same Block Imported again and again&quot;! I know there are many reasons for it.&#xD;&#xA;1. &quot;build block took too long&quot;&#xD;&#xA;2. &quot;trouble sending the block&quot;&#xD;&#xA;3. &quot;Invalid parachain code in the relay&quot;&#xD;&#xA;4. &quot;trouble verifying the block in time&quot;&#xD;&#xA;&#xD;&#xA;So the core question is: How to fix no new block-producing issue caused by **runtime upgrade**?&#xD;&#xA;&#xD;&#xA;Ps. &quot;Took too long&quot; exception case, Our chain block target 12s. Imported #110016 again and again! (use authorizeUpgrade&amp;enactAuthorizedUpgrade for upgrade)&#xD;&#xA;```&#xD;&#xA;2022-05-25 14:35:36.537  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 110016 (28 ms) [hash: 0x51e4bcb83f34a48a0cc05fe79b59fad058736bc2f6e32f90979d2f68eb79762e; parent_hash: 0x4877…ba84; extrinsics (3): [0x371a…3f3b, 0x5696…2d07, 0x3992…fc98]]&#xD;&#xA;2022-05-25 14:35:36.540  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 110016. Hash now 0xd73766b154601ccf8d3cb95c32cda7327e5dbb1473f340acd5aeef530aec34b6, previously 0x51e4bcb83f34a48a0cc05fe79b59fad058736bc2f6e32f90979d2f68eb79762e.&#xD;&#xA;2022-05-25 14:35:36.547  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #110016 (0xd737…34b6)&#xD;&#xA;2022-05-25 14:35:36.549  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.181640625kb, extrinsics: 729.6669921875kb, storage_proof: 732.60546875kb }&#xD;&#xA;2022-05-25 14:35:36.551  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 738.232421875kb&#xD;&#xA;2022-05-25 14:35:36.561  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0xd73766b154601ccf8d3cb95c32cda7327e5dbb1473f340acd5aeef530aec34b6&#xD;&#xA;2022-05-25 14:35:36.794  INFO tokio-runtime-worker substrate: [Parachain]  Idle (1 peers), best: #110015 (0x4877…ba84), finalized #110015 (0x4877…ba84), ⬇ 0 ⬆ 0&#xD;&#xA;2022-05-25 14:35:38.065  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (50 peers), best: #387863 (0xf564…a777), finalized #387859 (0x38af…d76e), ⬇ 196.2kiB/s ⬆ 413.2kiB/s&#xD;&#xA;```&#xD;&#xA;CodeHash:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Reference:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/questions/859/my-parachain-has-not-been-able-to-issue-a-block-after-submitting-the-upgrade-tra/876#876&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/forkless-upgrades/&#xD;&#xA;- https://docs.substrate.io/v3/runtime/upgrades/&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-runtime-upgrades&#xD;&#xA;- https://docs.substrate.io/how-to-guides/v3/parachains/runtime-upgrades/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/B8mTr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10810" PostHistoryTypeId="2" PostId="2886" RevisionGUID="8ce6e329-a05d-492d-9da5-11ddff76b088" CreationDate="2022-05-26T14:40:56.413" UserId="301" Text="CheckMortality `additional_signed` seems variant between blocks(I add some log to check_mortality.rs):&#xD;&#xA;[![era mortal][1]][1]&#xD;&#xA;&#xD;&#xA;I have a usecase that need `additional_signed` result of Era invariant between some adjacent blocks(in Era period). I know that the signature depend on Era,TxVersion etc. &#xD;&#xA;&#xD;&#xA;i.e. I generate a signature#1 based on payload in block#1. then I want to validate this signature#1 in block#2. When in block#2, I generate another signature#2 with the same payload, and compare it with signature#1. But because signature#2 use different Era's addition signed, those two signature is different.&#xD;&#xA;&#xD;&#xA;So how to make sure signature invariant between blocks, and also use Era as addition signed?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/l30zk.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10812" PostHistoryTypeId="1" PostId="2886" RevisionGUID="8ce6e329-a05d-492d-9da5-11ddff76b088" CreationDate="2022-05-26T14:40:56.413" UserId="301" Text="How to make sure Mortal Era addition signed invariant?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10813" PostHistoryTypeId="3" PostId="2886" RevisionGUID="8ce6e329-a05d-492d-9da5-11ddff76b088" CreationDate="2022-05-26T14:40:56.413" UserId="301" Text="|era|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10814" PostHistoryTypeId="33" PostId="2169" RevisionGUID="ae230552-7058-48a4-8d46-040b9107c0ff" CreationDate="2022-05-26T14:46:36.723" UserId="1838" Comment="7" />
  <row Id="10815" PostHistoryTypeId="2" PostId="2887" RevisionGUID="f7765e10-c6ae-4b7f-92c6-2969e1d33a2b" CreationDate="2022-05-26T14:53:38.877" UserId="179" Text="Parachains connect to Polkadot or Kusama for the matter (will be using only one going forward as the mechanism is the similar) by acquiring a slot through an auction. Each slot can be at most 8 [lease periods (LP)](https://wiki.polkadot.network/docs/glossary#lease-period). If a team wants to extend their connection to Polkadot, they need to acquire a new slot that covers a new set of lease periods. &#xD;&#xA;&#xD;&#xA;Independently of the mechanisms discussed below, there are two things that will always happen:&#xD;&#xA;1. A team will always need to win an auction to extend their connection.&#xD;&#xA;2. Teams will want a new slot that has as an LP immediately after the end of the last LP of their current slot to avoid downtime. This would ideally be the first LP of the new slot, but it does not necessary need to be. &#xD;&#xA;&#xD;&#xA;Potential strategies:&#xD;&#xA;&#xD;&#xA;1. **A team can get a new slot which first LP is before the end of the last LP of their current slot**. To achieve this, the team will need to register a new paraID on chain, and win an auction for a new slot with the new paraID. At this moment in time, the team will have two slots on Polkadot: one that will end soon, and one that has started; both slots will have at least one LP in common. When the old slot is transition their last LP, [the team will need to swap](https://github.com/paritytech/polkadot/pull/4772/files#diff-f1ae1a23635234bb5ccb29c37b5a8ae4f6f47ecc604c0df24878fe5113b017d3R908) their parachains slots (old and new) so that the old paraID can benefit from the slot of the new paraID. At the moment of writing, this needs to be done with the help of the on chain governance ([example](https://kusama.polkassembly.io/post/1491)), but [there are discussions going on](https://github.com/paritytech/polkadot/pull/5451), on allowing this to be done without the need of governance.&#xD;&#xA;&#xD;&#xA;   This method has the benefit of giving flexibility to the team on when to bid for a slot, however it has the disadvantage of having more than one slot with the active during the same LPs.&#xD;&#xA;2. **A team can get a new slot which first LP starts right after the end of the last LP of their current slot**. In this case, the team can bid directly with their current paraID, and it will be automatically extended without the need of swapping.&#xD;&#xA;&#xD;&#xA;   This method has the advantage of not having superposing LP's on different slots owned by the same team, however it has the disadvantage of losing flexibility on when to win a new slot: if the team does not win the exact slot, then it will suffer some downtime until it wins a new slot.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10817" PostHistoryTypeId="5" PostId="2886" RevisionGUID="0d135919-6fbb-4196-b302-fea60a417dad" CreationDate="2022-05-26T15:13:23.437" UserId="301" Comment="added 77 characters in body" Text="CheckMortality `additional_signed` seems variant between blocks(I add some log to check_mortality.rs):&#xD;&#xA;[![era mortal][1]][1]&#xD;&#xA;&#xD;&#xA;I have a usecase that need `additional_signed` result of Era invariant between some adjacent blocks(in Era period). I know that the signature depend on Era,TxVersion etc. &#xD;&#xA;&#xD;&#xA;i.e. I generate a signature#1 based on payload in block#1. then I want to validate this signature#1 in block#2. When in block#2, I generate another signature#2 with the same payload, and compare it with signature#1. But because signature#2 use different Era's addition signed, those two signature is different.&#xD;&#xA;[![verification signature][2]][2]&#xD;&#xA;So how to make sure signature invariant between blocks, and also use Era as addition signed?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/l30zk.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/NjlaS.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10818" PostHistoryTypeId="2" PostId="2888" RevisionGUID="9bf8bd59-10c1-4620-a5bc-f6a8a0362f9b" CreationDate="2022-05-26T15:52:03.830" UserId="2033" Text="&#xD;&#xA;    I tried to declare storage as private as below&#xD;&#xA;&#xD;&#xA;    #[pallet::pallet]&#xD;&#xA;    #[pallet::generate_store(trait Store)]&#xD;&#xA;    pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter( fn running_status)]&#xD;&#xA;    type SystemRunnig&lt;T&gt; = StorageValue&lt;_, bool, ValueQuery&gt;;&#xD;&#xA;    &#xD;&#xA;It compiles fine and even I am able to access and see the status of the SystemRunnig from polkadotJs explorer.&#xD;&#xA;&#xD;&#xA;So here what is meant via declaring it private.&#xD;&#xA;can you explain" ContentLicense="CC BY-SA 4.0" />
  <row Id="10820" PostHistoryTypeId="2" PostId="2889" RevisionGUID="84101b76-707c-4f45-a296-d04f68934088" CreationDate="2022-05-26T17:15:14.003" UserId="85" Text="subxt has your back. Here's an example:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/subxt/blob/master/examples/examples/subscribe_all_events.rs&#xD;&#xA;&#xD;&#xA;(Events are just the `system.events` state at a certain block, so if you know the block hash you're after you can retrieve them by via a storage query)&#xD;&#xA;&#xD;&#xA;(if you want to subscribe to blocks there's an example in the PRs)" ContentLicense="CC BY-SA 4.0" />
  <row Id="10822" PostHistoryTypeId="2" PostId="2890" RevisionGUID="dddcd5e6-27f8-4028-9347-b8779ba74f95" CreationDate="2022-05-26T17:19:19.370" UserId="85" Text="Probably not the answer you want to here, but the [desub][1] project can do dynamic decoding. You could build and link to that. I'm not aware of something similar in c# yet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/desub" ContentLicense="CC BY-SA 4.0" />
  <row Id="10824" PostHistoryTypeId="6" PostId="2881" RevisionGUID="ce7d18c2-35ff-433b-a38b-eb10d3f03b66" CreationDate="2022-05-26T17:19:33.720" UserId="85" Comment="edited tags" Text="|rpc|api|c-sharp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10825" PostHistoryTypeId="2" PostId="2891" RevisionGUID="199e9934-4457-41a3-84ab-49d9016fcc80" CreationDate="2022-05-26T18:11:42.220" UserId="2634" Text="OS : centos stream 9  &#xD;&#xA;Rust : 1.61  &#xD;&#xA;substrate : 2022-05  3.0   &#xD;&#xA;polkdadot : 0.9.20  &#xD;&#xA;substrate-front-end : 2022-02  &#xD;&#xA;&#xD;&#xA;success : Start the local Substrate node&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;when i  Start the front-end template&#xD;&#xA;yarn start  , it show error&#xD;&#xA;```&#xD;&#xA;Failed to compile.&#xD;&#xA;&#xD;&#xA;Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at new Promise (&lt;anonymous&gt;)&#xD;&#xA;asset static/js/bundle.js 46.7 KiB [emitted] (name: main) 1 related asset&#xD;&#xA;asset index.html 2.27 KiB [emitted]&#xD;&#xA;asset asset-manifest.json 277 bytes [emitted]&#xD;&#xA;cached modules 27.2 KiB [cached] 9 modules&#xD;&#xA;modules with errors 156 bytes [errors]&#xD;&#xA;  ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js 39 bytes [built] [1 error]&#xD;&#xA;  ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&amp;hostname=0.0.0.0&amp;port=8000&amp;pathname=%2Fws&amp;logging=none&amp;reconnect=10 39 bytes [built] [1 error]&#xD;&#xA;  ./node_modules/webpack/hot/dev-server.js 39 bytes [built] [1 error]&#xD;&#xA;  ./src/index.js 39 bytes [built] [1 error]&#xD;&#xA;&#xD;&#xA;ERROR in ./src/index.js&#xD;&#xA;Module build failed (from ./node_modules/babel-loader/lib/index.js):&#xD;&#xA;Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at new Hash (node:internal/crypto/hash:67:19)&#xD;&#xA;    at Object.createHash (node:crypto:130:10)&#xD;&#xA;    at filename (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:102:23)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:128:39&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at asyncGeneratorStep (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:3:103)&#xD;&#xA;    at _next (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:194)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:364&#xD;&#xA;    at new Promise (&lt;anonymous&gt;)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:97&#xD;&#xA;&#xD;&#xA;ERROR in ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&amp;hostname=0.0.0.0&amp;port=8000&amp;pathname=%2Fws&amp;logging=none&amp;reconnect=10&#xD;&#xA;Module build failed (from ./node_modules/babel-loader/lib/index.js):&#xD;&#xA;Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at new Hash (node:internal/crypto/hash:67:19)&#xD;&#xA;    at Object.createHash (node:crypto:130:10)&#xD;&#xA;    at filename (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:102:23)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:128:39&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at asyncGeneratorStep (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:3:103)&#xD;&#xA;    at _next (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:194)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:364&#xD;&#xA;    at new Promise (&lt;anonymous&gt;)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:97&#xD;&#xA;&#xD;&#xA;ERROR in ./node_modules/webpack/hot/dev-server.js&#xD;&#xA;Module build failed (from ./node_modules/babel-loader/lib/index.js):&#xD;&#xA;Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at new Hash (node:internal/crypto/hash:67:19)&#xD;&#xA;    at Object.createHash (node:crypto:130:10)&#xD;&#xA;    at filename (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:102:23)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:128:39&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at asyncGeneratorStep (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:3:103)&#xD;&#xA;    at _next (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:194)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:364&#xD;&#xA;    at new Promise (&lt;anonymous&gt;)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:97&#xD;&#xA;&#xD;&#xA;ERROR in ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js&#xD;&#xA;Module build failed (from ./node_modules/babel-loader/lib/index.js):&#xD;&#xA;Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at new Hash (node:internal/crypto/hash:67:19)&#xD;&#xA;    at Object.createHash (node:crypto:130:10)&#xD;&#xA;    at filename (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:102:23)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:128:39&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at asyncGeneratorStep (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:3:103)&#xD;&#xA;    at _next (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:194)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:364&#xD;&#xA;    at new Promise (&lt;anonymous&gt;)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:97&#xD;&#xA;&#xD;&#xA;webpack 5.70.0 compiled with 4 errors in 1753 ms&#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/KitkQ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/28QZD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10827" PostHistoryTypeId="1" PostId="2891" RevisionGUID="199e9934-4457-41a3-84ab-49d9016fcc80" CreationDate="2022-05-26T18:11:42.220" UserId="2634" Text="Start the front-end template : error:0308010C:digital envelope routines::unsupported" ContentLicense="CC BY-SA 4.0" />
  <row Id="10828" PostHistoryTypeId="3" PostId="2891" RevisionGUID="199e9934-4457-41a3-84ab-49d9016fcc80" CreationDate="2022-05-26T18:11:42.220" UserId="2634" Text="|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10829" PostHistoryTypeId="2" PostId="2892" RevisionGUID="4798ffa0-6238-4c79-871e-57f30c4444b5" CreationDate="2022-05-26T18:20:39.057" UserId="219" Text="Does the **order of the Merkle proof encoded nodes matter for the state trie**?&#xD;&#xA;&#xD;&#xA;I am working on Gossamer and for now we produce proofs *without considering order* of encoded nodes in Gossamer.&#xD;&#xA;Now I am wondering if this can be problematic since the root node has its hash always as its encoding 32 bytes digest, unlike other trie nodes which can have their hash as their encoding if this one is less than 32 bytes.&#xD;&#xA;&#xD;&#xA;Should we have (at least) the proof root node as the first encoded node in generated proofs?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="10831" PostHistoryTypeId="1" PostId="2892" RevisionGUID="4798ffa0-6238-4c79-871e-57f30c4444b5" CreationDate="2022-05-26T18:20:39.057" UserId="219" Text="Proof order of proof encoded nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="10832" PostHistoryTypeId="3" PostId="2892" RevisionGUID="4798ffa0-6238-4c79-871e-57f30c4444b5" CreationDate="2022-05-26T18:20:39.057" UserId="219" Text="|trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10833" PostHistoryTypeId="2" PostId="2893" RevisionGUID="6409eea4-44c9-4e98-9f8b-10bc97ad3e59" CreationDate="2022-05-26T18:24:57.003" UserId="627" Text="This is an issue with Node 17+ - see [some other answers on SO](https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported) with possible solutions.&#xD;&#xA;&#xD;&#xA;You can tweak the Webpack config as well to only use xxhash, we actually did that in [the apps UI](https://github.com/polkadot-js/apps/pull/7056) to work around this issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="10835" PostHistoryTypeId="5" PostId="2891" RevisionGUID="0283b698-dd4a-4f03-b3b8-eb464a71ded6" CreationDate="2022-05-26T18:30:45.733" UserId="2634" Comment="added 29 characters in body" Text="OS : centos stream 9  &#xD;&#xA;Rust : 1.61  &#xD;&#xA;substrate : 2022-05  3.0   &#xD;&#xA;polkdadot : 0.9.20  &#xD;&#xA;substrate-front-end : 2022-02  &#xD;&#xA;nvm node nodejs : 16.14.0  &#xD;&#xA;&#xD;&#xA;success : Start the local Substrate node&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;when i  Start the front-end template&#xD;&#xA;yarn start  , it show error&#xD;&#xA;```&#xD;&#xA;Failed to compile.&#xD;&#xA;&#xD;&#xA;Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at new Promise (&lt;anonymous&gt;)&#xD;&#xA;asset static/js/bundle.js 46.7 KiB [emitted] (name: main) 1 related asset&#xD;&#xA;asset index.html 2.27 KiB [emitted]&#xD;&#xA;asset asset-manifest.json 277 bytes [emitted]&#xD;&#xA;cached modules 27.2 KiB [cached] 9 modules&#xD;&#xA;modules with errors 156 bytes [errors]&#xD;&#xA;  ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js 39 bytes [built] [1 error]&#xD;&#xA;  ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&amp;hostname=0.0.0.0&amp;port=8000&amp;pathname=%2Fws&amp;logging=none&amp;reconnect=10 39 bytes [built] [1 error]&#xD;&#xA;  ./node_modules/webpack/hot/dev-server.js 39 bytes [built] [1 error]&#xD;&#xA;  ./src/index.js 39 bytes [built] [1 error]&#xD;&#xA;&#xD;&#xA;ERROR in ./src/index.js&#xD;&#xA;Module build failed (from ./node_modules/babel-loader/lib/index.js):&#xD;&#xA;Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at new Hash (node:internal/crypto/hash:67:19)&#xD;&#xA;    at Object.createHash (node:crypto:130:10)&#xD;&#xA;    at filename (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:102:23)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:128:39&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at asyncGeneratorStep (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:3:103)&#xD;&#xA;    at _next (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:194)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:364&#xD;&#xA;    at new Promise (&lt;anonymous&gt;)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:97&#xD;&#xA;&#xD;&#xA;ERROR in ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&amp;hostname=0.0.0.0&amp;port=8000&amp;pathname=%2Fws&amp;logging=none&amp;reconnect=10&#xD;&#xA;Module build failed (from ./node_modules/babel-loader/lib/index.js):&#xD;&#xA;Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at new Hash (node:internal/crypto/hash:67:19)&#xD;&#xA;    at Object.createHash (node:crypto:130:10)&#xD;&#xA;    at filename (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:102:23)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:128:39&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at asyncGeneratorStep (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:3:103)&#xD;&#xA;    at _next (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:194)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:364&#xD;&#xA;    at new Promise (&lt;anonymous&gt;)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:97&#xD;&#xA;&#xD;&#xA;ERROR in ./node_modules/webpack/hot/dev-server.js&#xD;&#xA;Module build failed (from ./node_modules/babel-loader/lib/index.js):&#xD;&#xA;Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at new Hash (node:internal/crypto/hash:67:19)&#xD;&#xA;    at Object.createHash (node:crypto:130:10)&#xD;&#xA;    at filename (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:102:23)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:128:39&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at asyncGeneratorStep (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:3:103)&#xD;&#xA;    at _next (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:194)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:364&#xD;&#xA;    at new Promise (&lt;anonymous&gt;)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:97&#xD;&#xA;&#xD;&#xA;ERROR in ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js&#xD;&#xA;Module build failed (from ./node_modules/babel-loader/lib/index.js):&#xD;&#xA;Error: error:0308010C:digital envelope routines::unsupported&#xD;&#xA;    at new Hash (node:internal/crypto/hash:67:19)&#xD;&#xA;    at Object.createHash (node:crypto:130:10)&#xD;&#xA;    at filename (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:102:23)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:128:39&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at asyncGeneratorStep (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:3:103)&#xD;&#xA;    at _next (/home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:194)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:364&#xD;&#xA;    at new Promise (&lt;anonymous&gt;)&#xD;&#xA;    at /home/lzh/substrate-node-template/substrate-front-end-template/node_modules/babel-loader/lib/cache.js:5:97&#xD;&#xA;&#xD;&#xA;webpack 5.70.0 compiled with 4 errors in 1753 ms&#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/KitkQ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/28QZD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10836" PostHistoryTypeId="2" PostId="2894" RevisionGUID="9940f15f-88a4-4c48-b3eb-3d0232946f32" CreationDate="2022-05-26T19:16:35.650" UserId="2635" Text="I was wondering how to add a validator to a substrate chain using the API. I want to replicate the steps in the polkadot.js app:&#xD;&#xA;1. Network -&gt; Stash -&gt; Account Actions&#xD;&#xA;2. Click on validator (+)&#xD;&#xA;3. Set the stash account, controller account, value bonded and &#xD;&#xA;4. Set the keys from rotateKeys and the reward.&#xD;&#xA;&#xD;&#xA;I can not find how the UI (what APIs) does it call to do steps 3 and 4.&#xD;&#xA;&#xD;&#xA;Thanks very much&#xD;&#xA;Regards" ContentLicense="CC BY-SA 4.0" />
  <row Id="10838" PostHistoryTypeId="1" PostId="2894" RevisionGUID="9940f15f-88a4-4c48-b3eb-3d0232946f32" CreationDate="2022-05-26T19:16:35.650" UserId="2635" Text="Script to setup a validator using a .js and api" ContentLicense="CC BY-SA 4.0" />
  <row Id="10839" PostHistoryTypeId="3" PostId="2894" RevisionGUID="9940f15f-88a4-4c48-b3eb-3d0232946f32" CreationDate="2022-05-26T19:16:35.650" UserId="2635" Text="|substrate-node|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10840" PostHistoryTypeId="2" PostId="2895" RevisionGUID="320ee87d-e4a9-4bb3-9d49-05cd12a60e65" CreationDate="2022-05-26T19:17:25.457" UserId="351" Text="Most of return types are result with a success of a unit tuple, Like In rustic perspective, what is the significance of this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10842" PostHistoryTypeId="1" PostId="2895" RevisionGUID="320ee87d-e4a9-4bb3-9d49-05cd12a60e65" CreationDate="2022-05-26T19:17:25.457" UserId="351" Text="Why does substrate extrinsic return a unit tuple ? What is the significance of that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10843" PostHistoryTypeId="3" PostId="2895" RevisionGUID="320ee87d-e4a9-4bb3-9d49-05cd12a60e65" CreationDate="2022-05-26T19:17:25.457" UserId="351" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10844" PostHistoryTypeId="2" PostId="2896" RevisionGUID="9d2abeac-a2d7-4f03-a2f3-11ed30683321" CreationDate="2022-05-26T19:48:44.733" UserId="85" Text="It's effectively void - it takes up no bytes, so the only memory used is the enum discriminator and the size of the error side of the enum. It's quite common in rust that you signal success and failure with a Result but if you have nothing to return then you put the empty tuple in there. If you don't need an error then you can use an `Option&lt;T&gt;` in rust to represent this but there's not a more specialised type that represents something that could error but returns nothing." ContentLicense="CC BY-SA 4.0" />
  <row Id="10846" PostHistoryTypeId="6" PostId="2895" RevisionGUID="8a5ae179-dc86-473d-8c8e-a57a04cd6083" CreationDate="2022-05-26T19:49:44.877" UserId="85" Comment="edited tags" Text="|rust|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10847" PostHistoryTypeId="2" PostId="2897" RevisionGUID="84360a0b-58c6-4c89-8820-73203cd9e858" CreationDate="2022-05-26T20:32:36.503" UserId="2636" Text="I was trying to build the substrate-node-template (https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/) for the first time. I am using WSL2 with Ubuntu 22.04 LTS.&#xD;&#xA;&#xD;&#xA;I came to the step of  `cargo build --release` and I got the following error: &#xD;&#xA;&#xD;&#xA;    Compiling tikv-jemalloc-sys v0.4.3+5.2.1-patched.2&#xD;&#xA;    error: failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/mnt/c/Users/ggodf/Documents/Programming tests/Parachain project/substrate-node-template/target/release/build/tikv-jemalloc-sys-fd6a5adda1344782/build-script-build` (exit status: 101)&#xD;&#xA;      --- stdout&#xD;&#xA;      TARGET=x86_64-unknown-linux-gnu&#xD;&#xA;      HOST=x86_64-unknown-linux-gnu&#xD;&#xA;      NUM_JOBS=16&#xD;&#xA;      OUT_DIR=&quot;/mnt/c/Users/ggodf/Documents/Programming tests/Parachain project/substrate-node-template/target/release/build/tikv-jemalloc-sys-27a9467e997ef107/out&quot;     &#xD;&#xA;      BUILD_DIR=&quot;/mnt/c/Users/ggodf/Documents/Programming tests/Parachain project/substrate-node-template/target/release/build/tikv-jemalloc-sys-27a9467e997ef107/out/build&quot;&#xD;&#xA;      SRC_DIR=&quot;/home/g/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.4.3+5.2.1-patched.2&quot;&#xD;&#xA;      OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;      TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;      HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;      CC_x86_64-unknown-linux-gnu = None&#xD;&#xA;      CC_x86_64_unknown_linux_gnu = None&#xD;&#xA;      HOST_CC = None&#xD;&#xA;      CC = None&#xD;&#xA;      CFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;      CFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;      HOST_CFLAGS = None&#xD;&#xA;      CFLAGS = None&#xD;&#xA;      CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;      DEBUG = Some(&quot;false&quot;)&#xD;&#xA;      CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;      CC=&quot;cc&quot;&#xD;&#xA;      CFLAGS=&quot;-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall&quot;&#xD;&#xA;      JEMALLOC_REPO_DIR=&quot;jemalloc&quot;&#xD;&#xA;      running: &quot;sh&quot; &quot;/mnt/c/Users/ggodf/Documents/Programming tests/Parachain project/substrate-node-template/target/release/build/tikv-jemalloc-sys-27a9467e997ef107/out/build/configure&quot; &quot;--disable-cxx&quot; &quot;--with-private-namespace=_rjem_&quot; &quot;--host=x86_64-unknown-linux-gnu&quot; &quot;--build=x86_64-unknown-linux-gnu&quot; &quot;--prefix=/mnt/c/Users/ggodf/Documents/Programming tests/Parachain project/substrate-node-template/target/release/build/tikv-jemalloc-sys-27a9467e997ef107/out&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I already tried the solutions proposed https://github.com/gnzlbg/jemallocator/issues/148 and https://blog.csdn.net/weixin_36941283/article/details/124361536 but no luck. &#xD;&#xA;&#xD;&#xA;The issue has resulted in me not being able to proceed with the command ./target/release/node-template --dev because it fails and cannot find the directoy /node-template.&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;P.s first time stack exchange poster, please let me know if my formatting is incorrect." ContentLicense="CC BY-SA 4.0" />
  <row Id="10849" PostHistoryTypeId="1" PostId="2897" RevisionGUID="84360a0b-58c6-4c89-8820-73203cd9e858" CreationDate="2022-05-26T20:32:36.503" UserId="2636" Text="Error: failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`" ContentLicense="CC BY-SA 4.0" />
  <row Id="10850" PostHistoryTypeId="3" PostId="2897" RevisionGUID="84360a0b-58c6-4c89-8820-73203cd9e858" CreationDate="2022-05-26T20:32:36.503" UserId="2636" Text="|substrate-node-template|cargo|wsl|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10851" PostHistoryTypeId="2" PostId="2898" RevisionGUID="c527d396-5d49-4aab-b9dc-22591813013f" CreationDate="2022-05-26T20:59:26.147" UserId="39" Text="There is a lot of transitive dependencies (pallets that ink pallets themselves depend on), as you can check by inspecting Cargo.lock - it will pull the most recent versions (3.2.0 as of bow). I wish those were locked too by Parity when releasing newer ink! versions. For now you might try to lock ink_lang_codegen too." ContentLicense="CC BY-SA 4.0" />
  <row Id="10853" PostHistoryTypeId="5" PostId="2898" RevisionGUID="49037782-1751-484f-9049-f1381a810e47" CreationDate="2022-05-26T21:00:04.393" UserId="39" Comment="edited body" Text="There is a lot of transitive dependencies (pallets that ink pallets themselves depend on), as you can check by inspecting Cargo.lock - it will pull the most recent versions (3.2.0 as of now). I wish those were locked too by Parity when releasing newer ink! versions. For now you might try to lock ink_lang_codegen too." ContentLicense="CC BY-SA 4.0" />
  <row Id="10854" PostHistoryTypeId="5" PostId="2898" RevisionGUID="94ecc86a-a245-4599-9dab-7a345eba2b74" CreationDate="2022-05-26T21:03:44.233" UserId="39" Comment="added 10 characters in body" Text="There is a lot of transitive dependencies (pallets that ink pallets themselves depend on), as you can check by inspecting Cargo.lock - it will pull the most recent versions for those (3.2.0 as of now). I wish those were locked too by Parity when releasing newer ink! versions. For now you might try to lock ink_lang_codegen too." ContentLicense="CC BY-SA 4.0" />
  <row Id="10855" PostHistoryTypeId="5" PostId="2898" RevisionGUID="bfd6e104-b2c3-45af-a550-5e8529ac2f0a" CreationDate="2022-05-26T21:13:24.197" UserId="39" Comment="added 75 characters in body" Text="There is a lot of transitive dependencies (pallets that ink pallets themselves depend on), as you can check by inspecting Cargo.lock - it will pull the most recent versions for those (3.2.0 as of now). That is because for Cargo resolver these are within the semver compatibility range (when in fact they are not compatible).&#xD;&#xA;&#xD;&#xA;For now you might try to explicitely lock the version ink_lang_codegen too." ContentLicense="CC BY-SA 4.0" />
  <row Id="10856" PostHistoryTypeId="5" PostId="2898" RevisionGUID="f2868d9f-e464-4a7e-ae2d-86b454788d3c" CreationDate="2022-05-26T21:14:28.983" UserId="39" Comment="added 47 characters in body" Text="There is a lot of transitive dependencies (pallets that ink pallets themselves depend on), as you can check by inspecting Cargo.lock - it will pull the most recent versions for those (3.2.0 as of now). That is because for Cargo resolver these are within the semver compatibility range (when in fact they are not compatible, they contain non-compatible, breaking changes).&#xD;&#xA;&#xD;&#xA;For now you might try to explicitely lock the version ink_lang_codegen too." ContentLicense="CC BY-SA 4.0" />
  <row Id="10857" PostHistoryTypeId="5" PostId="2898" RevisionGUID="7edd8898-a54d-40d8-a5bc-c51d2b30343e" CreationDate="2022-05-26T21:18:27.367" UserId="39" Comment="added 4 characters in body" Text="There is a lot of transitive dependencies (pallets that ink pallets themselves depend on), as you can check by inspecting Cargo.lock - it will pull the most recent versions for those (3.2.0 as of now). That is because for the Cargo resolver these are within the semver compatibility range (when in fact they are not compatible, they contain non-compatible, breaking changes).&#xD;&#xA;&#xD;&#xA;For now you might try to explicitely lock the version ink_lang_codegen too." ContentLicense="CC BY-SA 4.0" />
  <row Id="10858" PostHistoryTypeId="2" PostId="2899" RevisionGUID="7cfe2b4f-a9e3-4a81-aecf-a9182380a528" CreationDate="2022-05-26T22:25:40.563" UserId="583" Text="I am trying to build a node using the node template and this Dockerfile.&#xD;&#xA;&#xD;&#xA;```docker&#xD;&#xA;FROM ubuntu:20.04 as builder &#xD;&#xA;&#xD;&#xA;ARG RUSTC_VERSION=nightly-2022-05-16&#xD;&#xA;ARG PROFILE=production&#xD;&#xA;# Workaround for https://github.com/rust-lang/cargo/issues/10583&#xD;&#xA;ENV CARGO_NET_GIT_FETCH_WITH_CLI=true&#xD;&#xA;# Incremental compilation here isn't helpful&#xD;&#xA;ENV CARGO_INCREMENTAL=0&#xD;&#xA;&#xD;&#xA;WORKDIR /code&#xD;&#xA;&#xD;&#xA;RUN \&#xD;&#xA;    apt-get update &amp;&amp; \&#xD;&#xA;    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \&#xD;&#xA;    ca-certificates \&#xD;&#xA;    curl \&#xD;&#xA;    git \&#xD;&#xA;    llvm \&#xD;&#xA;    clang \&#xD;&#xA;    make &amp;&amp; \&#xD;&#xA;    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION&#xD;&#xA;&#xD;&#xA;RUN /root/.cargo/bin/rustup target add wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;COPY Cargo.lock /code/Cargo.lock&#xD;&#xA;COPY Cargo.toml /code/Cargo.toml&#xD;&#xA;# COPY rust-toolchain.toml /code/rust-toolchain.toml&#xD;&#xA;&#xD;&#xA;COPY node /code/node&#xD;&#xA;COPY runtime /code/runtime&#xD;&#xA;COPY pallets /code/pallets&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ARG SUBSTRATE_CLI_GIT_COMMIT_HASH&#xD;&#xA;&#xD;&#xA;RUN \&#xD;&#xA;    /root/.cargo/bin/cargo build --profile $PROFILE --bin node-template &amp;&amp; \&#xD;&#xA;    mv target/$PROFILE/node-template node-template &amp;&amp; \&#xD;&#xA;    rm -rf target&#xD;&#xA;&#xD;&#xA;FROM ubuntu:20.04&#xD;&#xA;&#xD;&#xA;RUN \&#xD;&#xA;    apt-get update &amp;&amp; \&#xD;&#xA;    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl &amp;&amp; \&#xD;&#xA;    apt-get clean &amp;&amp; \&#xD;&#xA;    rm -rf /var/lib/apt/lists/*&#xD;&#xA;&#xD;&#xA;# Use for running the node in Kubernetes&#xD;&#xA;HEALTHCHECK CMD curl \&#xD;&#xA;    -H &quot;Content-Type: application/json&quot; \&#xD;&#xA;    -d '{ &quot;id&quot;: 1, &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;method&quot;: &quot;system_health&quot;, &quot;params&quot;: [] }' \&#xD;&#xA;    -f &quot;http://localhost:9933&quot;&#xD;&#xA;&#xD;&#xA;COPY --from=builder /code/node-template /node-template&#xD;&#xA;&#xD;&#xA;RUN mkdir /var/substrate &amp;&amp; chown nobody:nogroup /var/substrate&#xD;&#xA;&#xD;&#xA;VOLUME /var/substrate&#xD;&#xA;&#xD;&#xA;USER nobody:nogroup&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/node-template&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However , when I try to run the image, I get the following error.&#xD;&#xA;&#xD;&#xA;```basg&#xD;&#xA;Error: Service(Keystore(Io(Os { code: 13, kind: PermissionDenied, message: &quot;Permission denied&quot; })))&#xD;&#xA;2022-05-26 22:20:54 Substrate Node    &#xD;&#xA;2022-05-26 22:20:54 ✌️  version 4.0.0-dev-unknown    &#xD;&#xA;2022-05-26 22:20:54 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2022    &#xD;&#xA;2022-05-26 22:20:54  Chain specification: Local Testnet    &#xD;&#xA;2022-05-26 22:20:54   Node name: willing-leather-5592    &#xD;&#xA;2022-05-26 22:20:54  Role: FULL    &#xD;&#xA;2022-05-26 22:20:54  Database: RocksDb at /nonexistent/.local/share/node-template/chains/local_testnet/db/full    &#xD;&#xA;2022-05-26 22:20:54 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I will appreciate guidance on what I am doing wrong" ContentLicense="CC BY-SA 4.0" />
  <row Id="10860" PostHistoryTypeId="1" PostId="2899" RevisionGUID="7cfe2b4f-a9e3-4a81-aecf-a9182380a528" CreationDate="2022-05-26T22:25:40.563" UserId="583" Text="Permission denied while starting node" ContentLicense="CC BY-SA 4.0" />
  <row Id="10861" PostHistoryTypeId="3" PostId="2899" RevisionGUID="7cfe2b4f-a9e3-4a81-aecf-a9182380a528" CreationDate="2022-05-26T22:25:40.563" UserId="583" Text="|substrate-node-template|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10864" PostHistoryTypeId="5" PostId="2868" RevisionGUID="61f3f91a-ed30-47bf-8f82-9ede2fb46871" CreationDate="2022-05-27T03:12:57.870" UserId="494" Comment="make question more readable and easy to understand" Text="As the chain state goes larger and larger, it gets hard to export/fetch the chain state.&#xD;&#xA;&#xD;&#xA;Are there any other tools aside from [fork-off-substrate][1] and try-runtime for performing a runtime migration?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/maxsam4/fork-off-substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="10865" PostHistoryTypeId="4" PostId="2868" RevisionGUID="61f3f91a-ed30-47bf-8f82-9ede2fb46871" CreationDate="2022-05-27T03:12:57.870" UserId="494" Comment="make question more readable and easy to understand" Text="best practice to test a runtime with large chain state before runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10866" PostHistoryTypeId="6" PostId="2868" RevisionGUID="61f3f91a-ed30-47bf-8f82-9ede2fb46871" CreationDate="2022-05-27T03:12:57.870" UserId="494" Comment="make question more readable and easy to understand" Text="|runtime-upgrade|testing|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10867" PostHistoryTypeId="24" PostId="2868" RevisionGUID="61f3f91a-ed30-47bf-8f82-9ede2fb46871" CreationDate="2022-05-27T03:12:57.870" Comment="Proposed by 494 approved by 34 edit id of 206" ContentLicense="CC BY-SA 4.0" />
  <row Id="10868" PostHistoryTypeId="5" PostId="2814" RevisionGUID="9fc3397c-a779-4b9f-9db9-420eac98f75f" CreationDate="2022-05-27T03:13:02.750" UserId="372" Comment="added 74 characters in body" Text="For questions related to the Rust ecosystem repository hosted at crates.io" ContentLicense="CC BY-SA 4.0" />
  <row Id="10869" PostHistoryTypeId="24" PostId="2814" RevisionGUID="9fc3397c-a779-4b9f-9db9-420eac98f75f" CreationDate="2022-05-27T03:13:02.750" Comment="Proposed by 372 approved by 34 edit id of 204" ContentLicense="CC BY-SA 4.0" />
  <row Id="10870" PostHistoryTypeId="5" PostId="2678" RevisionGUID="13229f38-9f5f-4249-ab8a-ebd16196809e" CreationDate="2022-05-27T03:13:09.310" UserId="12" Comment="add screenshot showing events" Text="Currently, we have a local test net with 4 substrate nodes using [this runtime][1] which has the staking and session pallets. 2 nodes (Alice and Bob) are validators, placed in the chain spec json file and the other 2 (Charlie and Dave) were added as waiting validators while the chain was running with the goal to be chosen to the next session, but this never occurs. In each new epoch, the same validators (Alice and Bob) take place and I did not notice any session change event on polkadot JS UI. I would like to know if I'm missing some configuration or action to add new validators in a running network?&#xD;&#xA;&#xD;&#xA;In the beginning of the first epoch I notice this event but I'm not sure if it is related to the session change&#xD;&#xA;[![election provider multi phase event][2]][2]&#xD;&#xA;&#xD;&#xA;The active validator set. It keeps the same as the through the epochs&#xD;&#xA;[![active validator set][3]][3]&#xD;&#xA;&#xD;&#xA;I've added two more validators using their respective session keys and I did not notice any validator set change (I've waited for more than 30 epochs)&#xD;&#xA;[![waiting validator set][4]][4]&#xD;&#xA;&#xD;&#xA;Edit: still not working after increasing the validator count (notice 3/4 validators, with 1 waiting)&#xD;&#xA;[![3/4 validators, with 1 waiting][5]][5]&#xD;&#xA;&#xD;&#xA;Edit: adding event log&#xD;&#xA;[![events][6]][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking&#xD;&#xA;  [2]: https://i.stack.imgur.com/qzjPo.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/KAfEH.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/P2c85.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/tRqDb.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/H30kJ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10871" PostHistoryTypeId="24" PostId="2678" RevisionGUID="13229f38-9f5f-4249-ab8a-ebd16196809e" CreationDate="2022-05-27T03:13:09.310" Comment="Proposed by 12 approved by 34 edit id of 205" ContentLicense="CC BY-SA 4.0" />
  <row Id="10872" PostHistoryTypeId="2" PostId="2900" RevisionGUID="9524b16b-ea54-4e6b-aa66-2bac5151747e" CreationDate="2022-05-27T04:08:34.957" UserId="1789" Text="Go into `chainbridge-deploy/cb-sol-cli`  &#xD;&#xA;&#xD;&#xA;then run `npm install`&#xD;&#xA;&#xD;&#xA;then `cb-sol-cli deploy --all --relayerThreshold 1`" ContentLicense="CC BY-SA 4.0" />
  <row Id="10875" PostHistoryTypeId="5" PostId="2898" RevisionGUID="35661566-0cf5-45de-84ac-e01b689cfe6d" CreationDate="2022-05-27T07:21:13.370" UserId="39" Comment="added 3 characters in body" Text="There is a lot of transitive dependencies (pallets that ink pallets themselves depend on), as you can check by inspecting Cargo.lock - it will pull the most recent versions for those (3.2.0 as of now). That is because for the Cargo resolver these are within the semver compatibility range (when in fact they are not compatible, they contain non-compatible, breaking changes).&#xD;&#xA;&#xD;&#xA;For now you might try to explicitely lock the version of ink_lang_codegen too." ContentLicense="CC BY-SA 4.0" />
  <row Id="10876" PostHistoryTypeId="2" PostId="2901" RevisionGUID="2b3d9a48-146a-42d2-a7b9-d36c267244ab" CreationDate="2022-05-27T08:00:48.667" UserId="627" Text="The UI just calls the extrinsics as exposed by [the staking module](https://polkadot.js.org/docs/substrate/extrinsics#staking). Specifically -&#xD;&#xA;&#xD;&#xA; - bonding via [api.tx.staking.bond(...)](https://polkadot.js.org/docs/substrate/extrinsics#bondcontroller-multiaddress-value-compactu128-payee-palletstakingrewarddestination) setting the controller, value bonded and payee from the stash account&#xD;&#xA; - keys via [api.tx.session.setKeys(...)](https://polkadot.js.org/docs/substrate/extrinsics#bondcontroller-multiaddress-value-compactu128-payee-palletstakingrewarddestination) setting the keys from the controller account (proof is empty, not yet implemented on Substrate)&#xD;&#xA; - validate via [api.tx.staking.validate(...)](https://polkadot.js.org/docs/substrate/extrinsics#bondcontroller-multiaddress-value-compactu128-payee-palletstakingrewarddestination) from the controller with the validator preferences (e.g. commission, blocking status)&#xD;&#xA;&#xD;&#xA;Additional stuff of interest may be [setController](https://polkadot.js.org/docs/substrate/extrinsics#setcontrollercontroller-multiaddress) to change a controller, [setPayee](https://polkadot.js.org/docs/substrate/extrinsics#setpayeepayee-palletstakingrewarddestination) to adjust the reward destination and [bondExtra](https://polkadot.js.org/docs/substrate/extrinsics#bondextramax_additional-compactu128) should additional funds be bonded. These are all for management of the validator." ContentLicense="CC BY-SA 4.0" />
  <row Id="10878" PostHistoryTypeId="2" PostId="2902" RevisionGUID="8a0d03c0-03c1-46bd-8317-5b219f914e42" CreationDate="2022-05-27T09:05:20.370" UserId="83" Text="Review the code of how existing parachains have already added that feature or are in the process of doing so and then abide by their licensing requirements if you make use of their code or the approach they took, such as:&#xD;&#xA;&#xD;&#xA; - Moonbeam's parachain-staking pallet [here][1]&#xD;&#xA; - Nodle's parachain-staking pallet (pull request) [here][2]&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/PureStake/moonbeam/tree/master/pallets/parachain-staking&#xD;&#xA;  [2]: https://github.com/NodleCode/chain/pull/585/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="10880" PostHistoryTypeId="2" PostId="2903" RevisionGUID="86c37b3a-d0a9-494d-9579-4d6e72838076" CreationDate="2022-05-27T09:28:12.287" UserId="2102" Text="I'm trying to avoid using tight coupling for my pallets as it seems to be a bad idea for later enhancements. I'm also facing issues when trying to create a tests.rs file for, but that's another issue and probably related to my inexperience with rust.&#xD;&#xA;&#xD;&#xA;The thing is, I have two pallets (pallet1 and pallet2). Pallet1 models an item and pallet2 is another 'object' but it is expected to be attached to the item on pallet1. So for example, when I create an item on pallet1, it creates a call on pallet2 that creates an Object with the Item id, using its trait like:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Pallet1 lib.rs&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config + pallet_pallet1::Config {&#xD;&#xA;	type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;	type Pallet2: Pallet2Provider&lt;Self&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::weight(0)]&#xD;&#xA;pub fn create_item(origin: OriginFor&lt;T&gt;, id: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;    // Do some stuff&#xD;&#xA;    T::Pallet2::create_object(id);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Pallet2 lib.rs&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type Objects&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Twox64Concat, id, Object&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;impl Pallet2Provider&lt;T&gt; for Pallet&lt;T&gt; {&#xD;&#xA;   fn create_object(id: Vec&lt;u8&gt;) {&#xD;&#xA;      &lt;Objects&lt;T&gt;&gt;::insert(id, Object::new(id));&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The code above is just an example, and it doesn't have to be correct, but it's just to illustrate the issue. There is another function within the Pallet2 that modifies the object, but at the same time modifies some value of the Pallet1 item, so I'm tight coupling Pallet1 to Pallet2 so thats why I'm adding the `pallet_pallet1:Config` dependency to the Pallet2 Config.&#xD;&#xA;&#xD;&#xA;If both pallets have to interact with each other, they can be merged on a single pallet right? but it will be a large lib.rs and make it hard to read and maintain. Splitting this logic is what im trying to achieve but I don't know if I'm supposed to do tight or loose coupling.&#xD;&#xA;&#xD;&#xA;Besides this issue, is there any real example where two pallets interact with each other and the first one modifies the second storage and viceversa in a loose way? I think using tight coupling is the easiest way to do so.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10882" PostHistoryTypeId="1" PostId="2903" RevisionGUID="86c37b3a-d0a9-494d-9579-4d6e72838076" CreationDate="2022-05-27T09:28:12.287" UserId="2102" Text="How to properly use pallet coupling" ContentLicense="CC BY-SA 4.0" />
  <row Id="10883" PostHistoryTypeId="3" PostId="2903" RevisionGUID="86c37b3a-d0a9-494d-9579-4d6e72838076" CreationDate="2022-05-27T09:28:12.287" UserId="2102" Text="|pallet|tight-coupling|loose-coupling|coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10884" PostHistoryTypeId="2" PostId="2904" RevisionGUID="9a3d1646-d356-48dd-bcdb-59eb848a3049" CreationDate="2022-05-27T09:34:38.697" UserId="627" Text="If I look at the above, if it is meant to be a full payload there is certainly seems to be information missing, most notable the actual call.&#xD;&#xA;&#xD;&#xA;So first the basics - some of the signed extension information appear in the extrinsic itself (something like &quot;nonce&quot; applies here) and some only appear (additionally) in the data being signed (something like &quot;genesisHash&quot; applies here). &#xD;&#xA;&#xD;&#xA;Assuming &quot;normal&quot; signed extensions, your the data being signed should end up looking more-or-less like the following (from memory, since all this is dynamic from the metadata I could have missed a beat...) -&#xD;&#xA;&#xD;&#xA; - call data (indexes &amp; params)&#xD;&#xA; - era information&#xD;&#xA; - nonce &#xD;&#xA; - tip&#xD;&#xA; - (everything above is included in the submitted extrinsic, everything below is not)&#xD;&#xA; - specVersion&#xD;&#xA; - transactionVersion&#xD;&#xA; - genesisHash&#xD;&#xA; - blockHash (same as genesis for immortal)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10886" PostHistoryTypeId="2" PostId="2905" RevisionGUID="b6b6c629-b1ae-4b93-919a-ce6e6cf83bd1" CreationDate="2022-05-27T09:44:09.423" UserId="165" Text="I would say that once a para is in the process of upgrading, the new validation function will eventually be set, and that should be without any action from your side.&#xD;&#xA;&#xD;&#xA;Seems that your para ended up updating the validation code after some extra waiting time - Also I don't see anymore any scheduled upgrade for your para.&#xD;&#xA;&#xD;&#xA;As you point out, it can happen that an upgrade takes longer because of the issues listed [in this issue](https://substrate.stackexchange.com/a/876/165), which you have linked too.&#xD;&#xA;&#xD;&#xA;&gt; #1: trouble sending the block&#xD;&#xA;&gt; &#xD;&#xA;&gt; #2: trouble verifying the block in time&#xD;&#xA;&gt;&#xD;&#xA;&gt; #3: Invalid parachain code in the relay&#xD;&#xA;&#xD;&#xA;Seeing that your parachain did upgrade, then I will discard you where hitting issue #3, and if this is due to not sending the block in time or validators don't verifying the code in time I am afraid there is nothing you can do on your side rather than waiting for it to happen.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10888" PostHistoryTypeId="2" PostId="2906" RevisionGUID="4942c7f0-f88b-45ef-b278-674304d8ef05" CreationDate="2022-05-27T09:55:19.330" UserId="2102" Text="I've a couple of questions:&#xD;&#xA;&#xD;&#xA;I'm running a the node-template on a machine that has 8 cores and 64GB of RAM and its using an SSD. I have some pallets working there and I'm using the python client to submit multiple transactions and check how the node is performing. Running the substrate `sub-flood` service, I got around 94 TPS and registered around 600 tx per block (but not filled it completely). The first question is, how many extrinsics can a single node handle? Does it depend on the machine specs (checking machine cpu usage it didn't reach even half of the max)? Am I getting a reasonable amount of TPS? &#xD;&#xA;&#xD;&#xA;I'm able to submit something between 3000~5000 tx with no issue on the first run, but as time goes by, if I continue to submit this number of transactions, the node tends to slow block production (which is not what anyone would want), and its only able to keep the block production rate constant if I go down to 1000 extrinsics per batch (a single batch per block). At the time, I'm estimating the extrinsic weights using this approach [Parameterizing over database accesses][1] as I'm unable to create benchmarks for now.&#xD;&#xA;&#xD;&#xA;I'm using the `utility pallet` to submit batches.&#xD;&#xA;&#xD;&#xA;This is an example of what I'm getting.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;The second question would be, are nodes prepared to receive this amount of transactions per block? I know blocks can only store a certain amount of extrinsics based on their weight, but If a set the extrinsic weight to 0, I can store any number tbh.&#xD;&#xA;&#xD;&#xA;I guess block production is slowed because I'm not setting the right weights, but are there any other possibilities that make the block production rate slow besides that?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/weights-and-fees/#parameterizing-over-database-accesses&#xD;&#xA;  [2]: https://i.stack.imgur.com/EsY0g.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="10890" PostHistoryTypeId="1" PostId="2906" RevisionGUID="4942c7f0-f88b-45ef-b278-674304d8ef05" CreationDate="2022-05-27T09:55:19.330" UserId="2102" Text="Single node performance" ContentLicense="CC BY-SA 4.0" />
  <row Id="10891" PostHistoryTypeId="3" PostId="2906" RevisionGUID="4942c7f0-f88b-45ef-b278-674304d8ef05" CreationDate="2022-05-27T09:55:19.330" UserId="2102" Text="|substrate-node-template|transactions|benchmarking|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10892" PostHistoryTypeId="5" PostId="2334" RevisionGUID="8725a090-319a-4577-9b83-ec743d4fa1ee" CreationDate="2022-05-27T09:57:08.243" UserId="165" Comment="added 1 character in body" Text="Going from a solo chain to a parachain accepts different approaches, but you will have to check that the different types you are using on your chain will be compatible with /understood by (call it whatever you please) by the ecosystem that you are about to connect to. This translates to you might have to migrate some part of your state.&#xD;&#xA;As an example I know this tool https://github.com/centrifuge/centrifuge-cli/tree/main/packages/plugins/migration that was used by Centrifuge team to do this migration. So a similar scenario.&#xD;&#xA;&#xD;&#xA;On your follow up question, my two cents are, if you are connecting as a parachain you are getting finality from the relay chain, then why running on solo again where finality is granted by your own chain. The flow for a parachain that off boards from its slot is to become a parathread from which state is possible to on board again as a parachain, though different ways of tackling this have been seen already in the ecosystem, for instance getting a another slot when the first lease is close to finish.&#xD;&#xA;&#xD;&#xA;I still would like to know more of your motivations from going back to solo after being a parachain. Take into account that what this means is that your chain must have some mechanism to know where to provide finality and when not to. And if that is managed, building the system in a way that going throw all the state is still verifiable.&#xD;&#xA;&#xD;&#xA;Don't get me wrong here, I would say this is possible, but fairly complex to maintain over time. And for sure there is a bunch of details that I am missing in what I have written in this message, but seeing such a capable system going live would be amazing. " ContentLicense="CC BY-SA 4.0" />
  <row Id="10893" PostHistoryTypeId="2" PostId="2907" RevisionGUID="06daab3b-37cb-48f0-9f31-4667083ace13" CreationDate="2022-05-27T10:20:38.123" UserId="213" Text="I want to reduce the balance of everyone say by 5% after say every 10 million blocks. It's not possible to loop over all balances, as that will be inefficient. AMPL solves it with using [Gons][1]&#xD;&#xA;&#xD;&#xA;    tokens= gonsBalance[account]/gonsPerToken&#xD;&#xA;I am using [balance pallet][2]. What is the best way of doing using balance pallet? Will I have to fork it and modify it or it can be done by calling some functions in it. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://medium.com/@marcilgen_70414/rebasing-tokens-with-oracles-and-liquidity-mining-the-ampleforth-approach-as-a-precursor-to-fdec8f83a0bb&#xD;&#xA;  [2]: https://docs.substrate.io/rustdocs/latest/pallet_balances/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="10895" PostHistoryTypeId="1" PostId="2907" RevisionGUID="06daab3b-37cb-48f0-9f31-4667083ace13" CreationDate="2022-05-27T10:20:38.123" UserId="213" Text="How to rebase tokens using balance pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10896" PostHistoryTypeId="3" PostId="2907" RevisionGUID="06daab3b-37cb-48f0-9f31-4667083ace13" CreationDate="2022-05-27T10:20:38.123" UserId="213" Text="|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10901" PostHistoryTypeId="2" PostId="2909" RevisionGUID="5ebaef86-fc8a-42a4-b3b9-0cb837bc3285" CreationDate="2022-05-27T10:37:14.087" UserId="627" Text="This was caused by the testing (pre-release) versions of the RPC nodes running the new [jsonrpsee server](https://github.com/paritytech/jsonrpsee). The best way to test RPC nodes is under load... &#xD;&#xA;&#xD;&#xA;It has been addressed since this was raised, i.e. the [Polkadot 0.9.22 version](https://github.com/paritytech/polkadot/releases/tag/v0.9.22) that went out did contain a version of jsonrpsee a fix for this issue. (Here I could point directly to a release containing it, however the actual fix went in very quickly when this was uncovered and was subsequently deployed on the nodes running the burn-in testing versions)&#xD;&#xA;&#xD;&#xA;TL;DR It should not occur anymore." ContentLicense="CC BY-SA 4.0" />
  <row Id="10903" PostHistoryTypeId="2" PostId="2910" RevisionGUID="9709d1fb-3679-4dab-8523-0a2cce6ae87b" CreationDate="2022-05-27T11:43:01.187" UserId="2485" Text="Is there a way in polkadot js api to be able to get the state of an object after a transaction if it is applied in the future? Is there a way in Substrate to apply a transaction(or its past implementation) to test the result?&#xD;&#xA;&#xD;&#xA;My goal is given a current state of an object(account, balance, or any pallet), to apply a transaction as it is in Substrate, without duplicating implementation on js client, to get the resulting state of an object without actually submitting transaction to the blockchain so that we can test the transaction's result. Is there a way to apply an older version of a transaction(if there were past changes) in order to see the difference between current and past results?&#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="10905" PostHistoryTypeId="1" PostId="2910" RevisionGUID="9709d1fb-3679-4dab-8523-0a2cce6ae87b" CreationDate="2022-05-27T11:43:01.187" UserId="2485" Text="get object's state after a potential transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="10906" PostHistoryTypeId="3" PostId="2910" RevisionGUID="9709d1fb-3679-4dab-8523-0a2cce6ae87b" CreationDate="2022-05-27T11:43:01.187" UserId="2485" Text="|extrinsic|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10907" PostHistoryTypeId="2" PostId="2911" RevisionGUID="e26bf36c-af36-4ee4-a1ff-c8d0bb6a1bb3" CreationDate="2022-05-27T12:07:32.057" UserId="85" Text="Definitely. If you look at cumulus repo that's got several runtimes that are sharing pallets and some common configuration. There's also the parachain-template that is a different node and yet still shares some crates with the the polkadot-parachain node." ContentLicense="CC BY-SA 4.0" />
  <row Id="10909" PostHistoryTypeId="5" PostId="2911" RevisionGUID="4f58933b-8fb4-4016-923f-9dbe29996bba" CreationDate="2022-05-27T12:13:15.427" UserId="85" Comment="added 19 characters in body" Text="Definitely. If you look at cumulus repo that's got several runtimes that are sharing pallets and some common configuration. There's also the parachain-template that is a different node (different binary) and yet still shares some crates with the the polkadot-parachain node." ContentLicense="CC BY-SA 4.0" />
  <row Id="10910" PostHistoryTypeId="5" PostId="2904" RevisionGUID="0d292490-3e81-410c-b5c6-6627ddba6858" CreationDate="2022-05-27T12:15:42.250" UserId="627" Comment="typo" Text="If I look at the above, if it is meant to be a full payload there is certainly seems to be information missing, most notable the actual call.&#xD;&#xA;&#xD;&#xA;So first the basics - some of the signed extension information appear in the extrinsic itself (something like &quot;nonce&quot; applies here) and some only appear (additionally) in the data being signed (something like &quot;genesisHash&quot; applies here). &#xD;&#xA;&#xD;&#xA;Assuming &quot;normal&quot; signed extensions, the data being signed should end up looking more-or-less like the following (from memory, since all this is dynamic from the metadata I could have missed a beat...) -&#xD;&#xA;&#xD;&#xA; - call data (indexes &amp; params)&#xD;&#xA; - era information&#xD;&#xA; - nonce &#xD;&#xA; - tip&#xD;&#xA; - (everything above is included in the submitted extrinsic, everything below is not)&#xD;&#xA; - specVersion&#xD;&#xA; - transactionVersion&#xD;&#xA; - genesisHash&#xD;&#xA; - blockHash (same as genesis for immortal)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10911" PostHistoryTypeId="2" PostId="2912" RevisionGUID="41d7c919-33c3-4489-ad9c-c4234f238c9c" CreationDate="2022-05-27T12:18:55.893" UserId="2025" Text="Substrate API Sidecar has a POST endpoint to dry run a extrinsic (transaction):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;POST /transaction/dry-run&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And in the body of the POST request you add the serialized (and signed) byte array of the transaction.&#xD;&#xA;&#xD;&#xA;Moreover, you can check the state of an account with the `GET /accounts/` series of endpoints. Check [this reference](https://paritytech.github.io/substrate-api-sidecar/dist/) for details about these endpoints.&#xD;&#xA;&#xD;&#xA;Also check [this link](https://github.com/paritytech/substrate-api-sidecar) to know how to run Substrate API Sidecar in your local machine and connect it to your local node or any other external node." ContentLicense="CC BY-SA 4.0" />
  <row Id="10913" PostHistoryTypeId="2" PostId="2913" RevisionGUID="f8a65358-aed6-4761-8047-2a5688edf4c0" CreationDate="2022-05-27T12:27:11.323" UserId="627" Text="The JS API wraps the [system_dryRun](https://polkadot.js.org/docs/substrate/rpc#dryrunextrinsic-bytes-at-blockhash-applyextrinsicresult) RPC and makes it accessible on the transaction object.&#xD;&#xA;&#xD;&#xA;To access, use the following -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// create a transaction&#xD;&#xA;const tx = api.tx.balances.transfer(...)&#xD;&#xA;&#xD;&#xA;// dry-run it (same options as signAndSend)&#xD;&#xA;await tx.dryRun(signingPair, { ...options }, (...) =&gt; { ... });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you have old transactions which are already signed, &#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// construct a transaction from the actual signed data&#xD;&#xA;const tx = api.tx(0x...extrinsic hex...);&#xD;&#xA;&#xD;&#xA;// alternatively construct the tx as above and then&#xD;&#xA;// await tx.signAsync(....) to get it signed&#xD;&#xA;&#xD;&#xA;// dry run it&#xD;&#xA;await tx.dryRun(signerPair, '0x...blockHash...');&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10915" PostHistoryTypeId="10" PostId="2669" RevisionGUID="0f072ac2-8b5b-4c8c-bf19-3ade7f421e3a" CreationDate="2022-05-27T13:33:44.627" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="10916" PostHistoryTypeId="11" PostId="2669" RevisionGUID="cf74b3b2-5548-414c-881c-a08d1e98ae27" CreationDate="2022-05-27T13:34:21.633" UserId="34" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="10917" PostHistoryTypeId="2" PostId="2914" RevisionGUID="d313eb1f-37a0-4d1b-b49e-47848f786b0a" CreationDate="2022-05-27T14:53:48.270" UserId="2644" Text="My purpose is to transfer stable coin BUSD (BEP20) / USN (NEAR) / USDT (TRC20) to the other wallet address on the target BEP20, NEAR, TRC20 network&#xD;&#xA;&#xD;&#xA;Is there any existing bridge that already supports it or do I need to build one?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10919" PostHistoryTypeId="1" PostId="2914" RevisionGUID="d313eb1f-37a0-4d1b-b49e-47848f786b0a" CreationDate="2022-05-27T14:53:48.270" UserId="2644" Text="Which bridge should I use to transfer stable coin in other chain for solo chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10920" PostHistoryTypeId="3" PostId="2914" RevisionGUID="d313eb1f-37a0-4d1b-b49e-47848f786b0a" CreationDate="2022-05-27T14:53:48.270" UserId="2644" Text="|token|bridge|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10921" PostHistoryTypeId="2" PostId="2915" RevisionGUID="e86cd0dd-bad8-469e-b4f4-7f5bdf6553fb" CreationDate="2022-05-27T15:00:38.700" UserId="2102" Text="I've recently posted a question about this topic, but I want to make it more general, as people might have the same issue as me.&#xD;&#xA;&#xD;&#xA;I've checked some substrate based repositories like [subsocial][1] or [debio][2], and I was wondering when should I create a different pallet to model certain behaviour. For example, let's say I have a pallet composed of two items somewhat related:&#xD;&#xA;```rs&#xD;&#xA;pub struct Item1 {&#xD;&#xA;   pub id: u32,&#xD;&#xA;   pub value: u32,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct Item1_History {&#xD;&#xA;   pub item1_id: u32,&#xD;&#xA;   pub values: Vec&lt;u32&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Pallet storage&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type Items1&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, u32, Item1&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type Items2&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, u32, Item2&lt;T&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When creating an `item` of type `Item1`, I want to also generate another `item` of type `Item2`. This `Item2` stores a vector of values, and if a new value is inserted, then it should also update the `Item1` with the latest value.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;   #[pallet::weight(0)]&#xD;&#xA;   pub fn create_item1(origin: OriginFor&lt;T&gt;, id: u32, value: u32) -&gt; DispatchResult {&#xD;&#xA;      let who = ensure_signed(origin)?;&#xD;&#xA;      &lt;Items1&lt;T&gt;&gt;::insert(&amp;id, Item1 {id, value});&#xD;&#xA;&#xD;&#xA;      // Create new vector with the first value provided&#xD;&#xA;      let mut values = Vec::new();&#xD;&#xA;      values.push(value);&#xD;&#xA;      &lt;items2&lt;T&gt;&gt;::insert(&amp;id, Item2 {id, values};&#xD;&#xA;   }&#xD;&#xA;&#xD;&#xA;   #[pallet::weight(0)]&#xD;&#xA;   pub fn add_new_value_to_item2(origin: OriginFor&lt;T&gt;, id: u32, new_value: u32) -&gt; DispatchResult {&#xD;&#xA;      let who = ensure_signed(origin)?;&#xD;&#xA;      // Get the item2 and push a new value&#xD;&#xA;      let mut item2 = &lt;Items2&lt;T&gt;&gt;::get(id).ok_or(&lt;AnyError&gt;);&#xD;&#xA;      item2.values.push(new_value);&#xD;&#xA;	  &lt;Items2&lt;T&gt;&gt;::insert(id, item2);&#xD;&#xA;      &#xD;&#xA;      // Get the item1 and update the value&#xD;&#xA;      let mut item = &lt;Items1&lt;T&gt;&gt;::get(id).ok_or(&lt;AnyError&gt;);&#xD;&#xA;      item.value = new_value;&#xD;&#xA;	  &lt;Items1&lt;T&gt;&gt;::insert(id, item);&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can this logic be split into two pallets? or because both items interact in a close way it's better to keep them both on the same pallet?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dappforce/subsocial-node/tree/master/pallets&#xD;&#xA;  [2]: https://github.com/debionetwork/debio-node/tree/main/pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="10923" PostHistoryTypeId="1" PostId="2915" RevisionGUID="e86cd0dd-bad8-469e-b4f4-7f5bdf6553fb" CreationDate="2022-05-27T15:00:38.700" UserId="2102" Text="When should I split a pallet in two or more?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10924" PostHistoryTypeId="3" PostId="2915" RevisionGUID="e86cd0dd-bad8-469e-b4f4-7f5bdf6553fb" CreationDate="2022-05-27T15:00:38.700" UserId="2102" Text="|pallet|substrate-node-template|loose-coupling|tight-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10925" PostHistoryTypeId="2" PostId="2916" RevisionGUID="70ad78fe-f90b-4a11-a2b5-4d92d2c47024" CreationDate="2022-05-27T15:20:36.290" UserId="227" Text="Currently we don't persist the information necessary to have a deterministic build. There is this GitHub issue for it: https://github.com/paritytech/cargo-contract/issues/525.&#xD;&#xA;&#xD;&#xA;The underlying issue is that for deterministic builds you need to set up your build environment exactly as it was during the original build.&#xD;&#xA;&#xD;&#xA;In order to always get the same Wasm blob as a result of `cargo contract build` you need to know:&#xD;&#xA;&#xD;&#xA;* The Rust version which was used for the build.&#xD;&#xA;* The `cargo-contract` version.&#xD;&#xA;* If it was a release or a debug build (i.e. if `--release` was submitted to `cargo-contract` or not).&#xD;&#xA;* The supplied cargo features.&#xD;&#xA;* The `wasm-opt` version, this tool is used to optimized the resulting Wasm blob.&#xD;&#xA;&#xD;&#xA;If you have all this information + the contract with its `Cargo.toml` you can re-execute `cargo contract build` with those settings. You can the compare the result of &#xD;&#xA;`cat target/ink/flipper.contract | jq -r .source.hash` with the hash of the Wasm blob that you have.&#xD;&#xA;&#xD;&#xA;We're actively working on the issue I linked above and it should be done somewhen in the first two weeks of June. &#xD;&#xA;&#xD;&#xA;After this issue has been implemented all of this information will be stored in a custom section of the Wasm. This means the information will be available on-chain and a block explorer can extract this info from the Wasm contract blob. If someone then uploads e.g. a `lib.rs` and `Cargo.toml` to the block explorer with the claim that this is the source code, the block explorer can build this contract with the environmental information stored in this custom Wasm section." ContentLicense="CC BY-SA 4.0" />
  <row Id="10927" PostHistoryTypeId="2" PostId="2917" RevisionGUID="ccaee239-8d1b-4bdb-9305-ea19f86e775d" CreationDate="2022-05-27T15:26:46.730" UserId="560" Text="this was because #![cfg_attr(not(feature = &quot;std&quot;), no_std)] was enabled on the pallet.." ContentLicense="CC BY-SA 4.0" />
  <row Id="10929" PostHistoryTypeId="4" PostId="2060" RevisionGUID="4734f0c7-50fa-498d-a4db-004619205c4d" CreationDate="2022-05-27T16:58:28.497" UserId="29" Comment="edited title" Text="How to deploy a hardened, secure, production-ready Substrate node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10930" PostHistoryTypeId="2" PostId="2918" RevisionGUID="013b22fe-5a22-4699-a9dd-384e30f10123" CreationDate="2022-05-27T17:13:06.870" UserId="279" Text="I have pushed a new version of `zombienet` (v1.2.36) and created this demo repo [substrate-parachain-template-zombienet](https://github.com/pepoviola/substrate-parachain-template-zombienet) from the parachain-template and I added two dockerfile options (one injecting the binary and the other compiling and injecting into the final image).&#xD;&#xA;&#xD;&#xA;Also, in this repo there is a simple `zombienet` test case with the network configuration using the image from this repo.&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[settings]&#xD;&#xA;enable_tracing = false&#xD;&#xA;&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.22&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/pepoviola/substrate-parachain-template-zombienet:v0.0.0&quot;&#xD;&#xA;  command = &quot;parachain-collator&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Tests works as expected using kubernetes provider.&#xD;&#xA;```&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-8f6d290a60ae265e022663c1cd09719d with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A51063#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:51068/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A51143#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:51148/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;	 Parachain chainSpecPath path: /var/folders/rz/1cyx7hfj31qgb98d8_cg7jwh0000gn/T/zombie-8f6d290a60ae265e022663c1cd09719d_-62735-7Y6C8XAuiuLx/rococo-local-2000.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A51215#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:51220/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (1837ms)&#xD;&#xA;    ✔ bob: is up (1786ms)&#xD;&#xA;2022-05-27 13:44:58        API/INIT: RPC methods not decorated: beefy_getFinalizedHead, mmr_generateBatchProof, state_trieMigrationStatus&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (4742ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (1678ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (1662ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (1620ms)&#xD;&#xA;    ✔ alice: parachain 2000 block height is at least 6 within 250 seconds (138055ms)&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /var/folders/rz/1cyx7hfj31qgb98d8_cg7jwh0000gn/T/zombie-8f6d290a60ae265e022663c1cd09719d_-62735-7Y6C8XAuiuLx/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  9 passing (9m)&#xD;&#xA;```&#xD;&#xA;Can you use try the new version of zombienet and use this approach to build your image?&#xD;&#xA;&#xD;&#xA;Thanks for your feedback!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10932" PostHistoryTypeId="2" PostId="2919" RevisionGUID="86fff65d-4f3b-4d38-a890-04e7eecc73e7" CreationDate="2022-05-27T17:14:31.440" UserId="2408" Text="I've been trying to implement a PoW consensus for my node. It was based on node template, the [recipe](https://substrate.recipes/basic-pow.html) and Kulupu's implementation of PoW. So I did quite a lot of changes to the node template and thus I'm unable to fully explain all of them in this post for you to get more details. But one important thing to mention is that I do not use Aura or GRANDPA in the node. So no finality of the blocks.  &#xD;&#xA;After a successful build of the node I ran it with `cargo run -r -- --dev` and saw that _no blocks are produced_:&#xD;&#xA;```&#xD;&#xA;Running `target/release/node-template --dev`&#xD;&#xA;2022-05-27 19:23:49 Substrate Node    &#xD;&#xA;2022-05-27 19:23:49 ✌️  version 4.0.0-dev-475e060-x86_64-linux-gnu    &#xD;&#xA;2022-05-27 19:23:49 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2022    &#xD;&#xA;2022-05-27 19:23:49  Chain specification: Development    &#xD;&#xA;2022-05-27 19:23:49   Node name: abhorrent-army-7617    &#xD;&#xA;2022-05-27 19:23:49  Role: AUTHORITY    &#xD;&#xA;2022-05-27 19:23:49  Database: RocksDb at /tmp/substrateMmNJR7/chains/dev/db/full    &#xD;&#xA;2022-05-27 19:23:49 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)    &#xD;&#xA;2022-05-27 19:23:50  Initializing Genesis block/state (state: 0x3c8f…1081, header-hash: 0x3b45…00e8)    &#xD;&#xA;2022-05-27 19:23:50 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2022-05-27 19:23:50   Local node identity is: 12D3KooWF47RZJUama9TabHbtq8dv6q2Xr15AvWvSQ97uzi6qNSp    &#xD;&#xA;2022-05-27 19:23:50  Highest known block at #0    &#xD;&#xA;2022-05-27 19:23:50 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-05-27 19:23:50 Listening for new connections on 127.0.0.1:9944.    &#xD;&#xA;2022-05-27 19:23:50 The node is configured for mining, but no author key is provided.    &#xD;&#xA;2022-05-27 19:23:50 Generated a mining key with address: A9oqjNLkQ4L2SHQAbAmwGKAr1nEewCiM6nVtrrVSEebpa26    &#xD;&#xA;2022-05-27 19:23:50 You can go to &quot;/tmp/substrateMmNJR7/chains/dev/keystore&quot; to find the seed phrase of the mining key.    &#xD;&#xA;2022-05-27 19:23:55  Idle (0 peers), best: #0 (0x3b45…00e8), finalized #0 (0x3b45…00e8), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-27 19:24:00  Idle (0 peers), best: #0 (0x3b45…00e8), finalized #0 (0x3b45…00e8), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-27 19:24:00  Starting consensus session on top of parent 0x3b45c3480168e05b5eb37268ff0de05d3558d22978c72918e48eab86ca6600e8    &#xD;&#xA;2022-05-27 19:24:00  Prepared block for proposing at 1 (3 ms) [hash: 0xb05921caf1a325d79417083c265ff46e64b7c2f02b2d3d2cc7b4bed52dc00236; parent_hash: 0x3b45…00e8; extrinsics (1): [0x22d7…efe3]]    &#xD;&#xA;2022-05-27 19:24:05  Idle (0 peers), best: #0 (0x3b45…00e8), finalized #0 (0x3b45…00e8), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-27 19:24:10  Idle (0 peers), best: #0 (0x3b45…00e8), finalized #0 (0x3b45…00e8), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-27 19:24:15  Idle (0 peers), best: #0 (0x3b45…00e8), finalized #0 (0x3b45…00e8), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-27 19:24:20  Idle (0 peers), best: #0 (0x3b45…00e8), finalized #0 (0x3b45…00e8), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-27 19:24:25  Idle (0 peers), best: #0 (0x3b45…00e8), finalized #0 (0x3b45…00e8), ⬇ 0 ⬆ 0&#xD;&#xA;```  &#xD;&#xA;For comparison here is an output of an _unchanged_ node template:&#xD;&#xA;```&#xD;&#xA;     Running `target/release/node-template --dev`&#xD;&#xA;2022-05-27 19:54:17 Substrate Node    &#xD;&#xA;2022-05-27 19:54:17 ✌️  version 4.0.0-dev-596285a-x86_64-linux-gnu    &#xD;&#xA;2022-05-27 19:54:17 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2022    &#xD;&#xA;2022-05-27 19:54:17  Chain specification: Development    &#xD;&#xA;2022-05-27 19:54:17   Node name: shrill-angle-1096    &#xD;&#xA;2022-05-27 19:54:17  Role: AUTHORITY    &#xD;&#xA;2022-05-27 19:54:17  Database: RocksDb at /tmp/substrate2stTwU/chains/dev/db/full    &#xD;&#xA;2022-05-27 19:54:17 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)    &#xD;&#xA;2022-05-27 19:54:18  Initializing Genesis block/state (state: 0x3175…351a, header-hash: 0xc066…5faa)    &#xD;&#xA;2022-05-27 19:54:18  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-05-27 19:54:19 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2022-05-27 19:54:19   Local node identity is: 12D3KooWRTwHVqzU79bmYe3iU8xdBZvT5s1rmB27tYU8A7R4fyFB    &#xD;&#xA;2022-05-27 19:54:19  Highest known block at #0    &#xD;&#xA;2022-05-27 19:54:19 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-05-27 19:54:19 Listening for new connections on 127.0.0.1:9944.    &#xD;&#xA;2022-05-27 19:54:24  Starting consensus session on top of parent 0xc066a81dfd21fe12f9de736d82a3be0bb07f2d8bdbab3194d640c8cf90b65faa    &#xD;&#xA;2022-05-27 19:54:24  Prepared block for proposing at 1 (2 ms) [hash: 0x9bdc3457f4eff54374f48ee81fa1f8cb517d316d839aeed89f644d33848a3081; parent_hash: 0xc066…5faa; extrinsics (1): [0xaee5…4dfb]]    &#xD;&#xA;2022-05-27 19:54:24  Pre-sealed block for proposal at 1. Hash now 0x7d733a0dd007003fd6f47e8a21cb9a3ae75f78193fc950765094f40b0eba78ee, previously 0x9bdc3457f4eff54374f48ee81fa1f8cb517d316d839aeed89f644d33848a3081.    &#xD;&#xA;2022-05-27 19:54:24 ✨ Imported #1 (0x7d73…78ee)    &#xD;&#xA;2022-05-27 19:54:24  Idle (0 peers), best: #1 (0x7d73…78ee), finalized #0 (0xc066…5faa), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-27 19:54:29  Idle (0 peers), best: #1 (0x7d73…78ee), finalized #0 (0xc066…5faa), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-27 19:54:30  Starting consensus session on top of parent 0x7d733a0dd007003fd6f47e8a21cb9a3ae75f78193fc950765094f40b0eba78ee    &#xD;&#xA;2022-05-27 19:54:30  Prepared block for proposing at 2 (0 ms) [hash: 0x2d3bcdcbca3e532335a4432ad0b09a8ac43b013c3ff1c7b21cf3a4c2828f4093; parent_hash: 0x7d73…78ee; extrinsics (1): [0x2b98…1eba]]    &#xD;&#xA;2022-05-27 19:54:30  Pre-sealed block for proposal at 2. Hash now 0x0b8c6f146d82aad9a91fc9ddba2ca3564b64e19de6af71ff6fc28ce403bbd192, previously 0x2d3bcdcbca3e532335a4432ad0b09a8ac43b013c3ff1c7b21cf3a4c2828f4093.    &#xD;&#xA;2022-05-27 19:54:30 ✨ Imported #2 (0x0b8c…d192)    &#xD;&#xA;2022-05-27 19:54:34  Idle (0 peers), best: #2 (0x0b8c…d192), finalized #0 (0xc066…5faa), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-05-27 19:54:36  Starting consensus session on top of parent 0x0b8c6f146d82aad9a91fc9ddba2ca3564b64e19de6af71ff6fc28ce403bbd192    &#xD;&#xA;2022-05-27 19:54:36  Prepared block for proposing at 3 (0 ms) [hash: 0x58f1c1353be2dbc743c4f815578a3bfde111f9a183b16e988cb6fc6fab7f0cf3; parent_hash: 0x0b8c…d192; extrinsics (1): [0xc94c…4b2b]]    &#xD;&#xA;2022-05-27 19:54:36  Pre-sealed block for proposal at 3. Hash now 0x11f06abace5630ccfd2f021644f2ea23e8503783b7d2ccce5356e5920f9dec2f, previously 0x58f1c1353be2dbc743c4f815578a3bfde111f9a183b16e988cb6fc6fab7f0cf3.    &#xD;&#xA;2022-05-27 19:54:36 ✨ Imported #3 (0x11f0…ec2f)    &#xD;&#xA;2022-05-27 19:54:39  Idle (0 peers), best: #3 (0x11f0…ec2f), finalized #1 (0x7d73…78ee), ⬇ 0 ⬆ 0 &#xD;&#xA;```&#xD;&#xA;The differences I see are:&#xD;&#xA; - No `GRANDPA` loaded. Which is fine because I deleted it.&#xD;&#xA; - No `Imported` blocks in the first case&#xD;&#xA; - No `Pre-sealed` blocks in the first case&#xD;&#xA; - Number of `best` blocks does not grow in the first case&#xD;&#xA;&#xD;&#xA;The question is:  &#xD;&#xA;What __might__ be the problem? Please note, that I __do not__ ask for a complete solution, just an advise on what I should take a look at first.&#xD;&#xA;&#xD;&#xA;I suppose that it's something wrong about the consensus block configuration in my [chain_spec.rs](https://github.com/CREESTL/Crain/blob/main/node/src/chain_spec.rs) file. Again, I used a combination of chain specs from Josh Orndorff`s [recipe](https://github.com/JoshOrndorff/recipes/blob/master/nodes/basic-pow/src/chain_spec.rs), [node template](https://github.com/substrate-developer-hub/substrate-node-template/blob/v3.0.0/node/src/chain_spec.rs) and [Kulupu](https://github.com/kulupu/kulupu/blob/master/src/chain_spec.rs)" ContentLicense="CC BY-SA 4.0" />
  <row Id="10934" PostHistoryTypeId="1" PostId="2919" RevisionGUID="86fff65d-4f3b-4d38-a890-04e7eecc73e7" CreationDate="2022-05-27T17:14:31.440" UserId="2408" Text="Node Does not Produce Blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="10935" PostHistoryTypeId="3" PostId="2919" RevisionGUID="86fff65d-4f3b-4d38-a890-04e7eecc73e7" CreationDate="2022-05-27T17:14:31.440" UserId="2408" Text="|genesis|block-production|substrate-recipes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10936" PostHistoryTypeId="5" PostId="2848" RevisionGUID="c543c7e9-ac23-48e9-bd0b-d283958743b4" CreationDate="2022-05-27T17:17:21.857" UserId="29" Comment="added 1 character in body" Text="Currently, the transaction pool in Astar network is full with a lot of unsigned EVM transactions, which cause user transactions sent without a tip to be stuck.&#xD;&#xA;&#xD;&#xA;We are currently researching a way to push user tx and prioritize it in the pool for fast inclusion. We see tipping mechanism to fit our needs. However, we are currently struggling with how to calculate an optimal tip.&#xD;&#xA;&#xD;&#xA;Things I've already tried:&#xD;&#xA;* Find min tip in the pending extrinsics (`author_pendingExtrinsics`) and add 1 or 10000 planks to it.&#xD;&#xA;&#xD;&#xA;What is strange is that when adding 1 plank to the minimum tip, the node accepts transaction but it does not lately appear in transaction pool. However, with 10000 planks added, node immediately rejects transaction with the message &quot;Cannot add extrinsic to the pool since it is full&quot;.&#xD;&#xA;&#xD;&#xA;I've also checked https://substrate.stackexchange.com/questions/2552/how-to-calculate-the-optimal-tip-for-substrate where Gav shows that adding +1 increase the priority by the max number of these transactions per block. So in order to find an optimal tip, we need to check weights of all pending transactions to find out their priorities. However, doing so via `payment_queryExtrinsicInfo` will require 8092 requests to the node for each fee calculation. Maybe there is a way to do it more efficiently?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10937" PostHistoryTypeId="2" PostId="2920" RevisionGUID="fdcf14b6-5e5d-4845-a47a-c698bea00608" CreationDate="2022-05-27T17:32:45.257" UserId="2408" Text="In [this](https://substrate.recipes/basic-pow.html) Substrate Recipe it says nothing about the rewards miners get for including blocks into the chain in the PoW consensus. &#xD;&#xA;But I found that Kulupu uses a [rewards](https://github.com/kulupu/kulupu/tree/master/frame/rewards) pallet which, at first glance, manages the rewards for the miners.  &#xD;&#xA;The questions are:&#xD;&#xA; - Is it necessary to implement a similar pallet to give miners rewards? Will the PoW chain reach consensus and function normally (produce blocks) without it? (as per recipe)&#xD;&#xA; - Are there any other (maybe Parity's) implementations of such reward mechanism?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10939" PostHistoryTypeId="1" PostId="2920" RevisionGUID="fdcf14b6-5e5d-4845-a47a-c698bea00608" CreationDate="2022-05-27T17:32:45.257" UserId="2408" Text="PoW Rewards for Mining" ContentLicense="CC BY-SA 4.0" />
  <row Id="10940" PostHistoryTypeId="3" PostId="2920" RevisionGUID="fdcf14b6-5e5d-4845-a47a-c698bea00608" CreationDate="2022-05-27T17:32:45.257" UserId="2408" Text="|consensus|validator|substrate-recipes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10941" PostHistoryTypeId="2" PostId="2921" RevisionGUID="e1dd3b32-f065-4dd5-ab9b-bd307524f6e5" CreationDate="2022-05-27T18:05:37.417" UserId="29" Text="Use this one instead:&#xD;&#xA;- https://grafana.com/grafana/dashboards/13759&#xD;&#xA;&#xD;&#xA;It works for me.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/gpI2m.png)&#xD;&#xA;&#xD;&#xA;Here is the JSON for convenience:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;annotations&quot;: {&#xD;&#xA;    &quot;list&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;builtIn&quot;: 1,&#xD;&#xA;        &quot;datasource&quot;: {&#xD;&#xA;          &quot;type&quot;: &quot;datasource&quot;,&#xD;&#xA;          &quot;uid&quot;: &quot;grafana&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;enable&quot;: true,&#xD;&#xA;        &quot;hide&quot;: true,&#xD;&#xA;        &quot;iconColor&quot;: &quot;rgba(0, 211, 255, 1)&quot;,&#xD;&#xA;        &quot;name&quot;: &quot;Annotations &amp; Alerts&quot;,&#xD;&#xA;        &quot;target&quot;: {&#xD;&#xA;          &quot;limit&quot;: 100,&#xD;&#xA;          &quot;matchAny&quot;: false,&#xD;&#xA;          &quot;tags&quot;: [],&#xD;&#xA;          &quot;type&quot;: &quot;dashboard&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;type&quot;: &quot;dashboard&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;description&quot;: &quot;Grafana dashboard for substrate template metrics. Instructions on use: https://substrate.dev/docs/en/tutorials/visualize-node-metrics/&quot;,&#xD;&#xA;  &quot;editable&quot;: true,&#xD;&#xA;  &quot;fiscalYearStartMonth&quot;: 0,&#xD;&#xA;  &quot;gnetId&quot;: 13759,&#xD;&#xA;  &quot;graphTooltip&quot;: 0,&#xD;&#xA;  &quot;id&quot;: 6,&#xD;&#xA;  &quot;links&quot;: [],&#xD;&#xA;  &quot;liveNow&quot;: false,&#xD;&#xA;  &quot;panels&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;datasource&quot;: {&#xD;&#xA;        &quot;type&quot;: &quot;prometheus&quot;,&#xD;&#xA;        &quot;uid&quot;: &quot;tSoTyKbnk&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;description&quot;: &quot;What your node sees as the highest block (NOT finalized)&quot;,&#xD;&#xA;      &quot;fieldConfig&quot;: {&#xD;&#xA;        &quot;defaults&quot;: {&#xD;&#xA;          &quot;mappings&quot;: [],&#xD;&#xA;          &quot;thresholds&quot;: {&#xD;&#xA;            &quot;mode&quot;: &quot;absolute&quot;,&#xD;&#xA;            &quot;steps&quot;: [&#xD;&#xA;              {&#xD;&#xA;                &quot;color&quot;: &quot;super-light-yellow&quot;,&#xD;&#xA;                &quot;value&quot;: null&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;overrides&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;id&quot;: 12,&#xD;&#xA;      &quot;options&quot;: {&#xD;&#xA;        &quot;colorMode&quot;: &quot;value&quot;,&#xD;&#xA;        &quot;graphMode&quot;: &quot;none&quot;,&#xD;&#xA;        &quot;justifyMode&quot;: &quot;auto&quot;,&#xD;&#xA;        &quot;orientation&quot;: &quot;auto&quot;,&#xD;&#xA;        &quot;reduceOptions&quot;: {&#xD;&#xA;          &quot;calcs&quot;: [&#xD;&#xA;            &quot;last&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;fields&quot;: &quot;/^Height\\(best\\)$/&quot;,&#xD;&#xA;          &quot;values&quot;: false&#xD;&#xA;        },&#xD;&#xA;        &quot;textMode&quot;: &quot;auto&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;pluginVersion&quot;: &quot;8.5.3&quot;,&#xD;&#xA;      &quot;targets&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;expr&quot;: &quot;substrate_block_height{status=\&quot;best\&quot;}&quot;,&#xD;&#xA;          &quot;interval&quot;: &quot;&quot;,&#xD;&#xA;          &quot;legendFormat&quot;: &quot;Height(best)&quot;,&#xD;&#xA;          &quot;refId&quot;: &quot;A&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;title&quot;: &quot;Block Height (best)&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;stat&quot;&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;datasource&quot;: {&#xD;&#xA;        &quot;type&quot;: &quot;prometheus&quot;,&#xD;&#xA;        &quot;uid&quot;: &quot;tSoTyKbnk&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;description&quot;: &quot;What your node sees as the highest finalized block ( less than or equal to best)&quot;,&#xD;&#xA;      &quot;fieldConfig&quot;: {&#xD;&#xA;        &quot;defaults&quot;: {&#xD;&#xA;          &quot;mappings&quot;: [],&#xD;&#xA;          &quot;thresholds&quot;: {&#xD;&#xA;            &quot;mode&quot;: &quot;absolute&quot;,&#xD;&#xA;            &quot;steps&quot;: [&#xD;&#xA;              {&#xD;&#xA;                &quot;color&quot;: &quot;green&quot;,&#xD;&#xA;                &quot;value&quot;: null&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;overrides&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;gridPos&quot;: {&#xD;&#xA;        &quot;h&quot;: 3,&#xD;&#xA;        &quot;w&quot;: 6,&#xD;&#xA;        &quot;x&quot;: 6,&#xD;&#xA;        &quot;y&quot;: 0&#xD;&#xA;      },&#xD;&#xA;      &quot;id&quot;: 13,&#xD;&#xA;      &quot;options&quot;: {&#xD;&#xA;        &quot;colorMode&quot;: &quot;value&quot;,&#xD;&#xA;        &quot;graphMode&quot;: &quot;none&quot;,&#xD;&#xA;        &quot;justifyMode&quot;: &quot;auto&quot;,&#xD;&#xA;        &quot;orientation&quot;: &quot;auto&quot;,&#xD;&#xA;        &quot;reduceOptions&quot;: {&#xD;&#xA;          &quot;calcs&quot;: [&#xD;&#xA;            &quot;last&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;fields&quot;: &quot;&quot;,&#xD;&#xA;          &quot;values&quot;: false&#xD;&#xA;        },&#xD;&#xA;        &quot;textMode&quot;: &quot;value&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;pluginVersion&quot;: &quot;8.5.3&quot;,&#xD;&#xA;      &quot;targets&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;expr&quot;: &quot;substrate_block_height{status=\&quot;finalized\&quot;}&quot;,&#xD;&#xA;          &quot;interval&quot;: &quot;&quot;,&#xD;&#xA;          &quot;legendFormat&quot;: &quot;Height(finalized)&quot;,&#xD;&#xA;          &quot;refId&quot;: &quot;A&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;title&quot;: &quot;Block Height (finalized)&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;stat&quot;&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;datasource&quot;: {&#xD;&#xA;        &quot;type&quot;: &quot;prometheus&quot;,&#xD;&#xA;        &quot;uid&quot;: &quot;tSoTyKbnk&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;description&quot;: &quot;Total transactions in best block&quot;,&#xD;&#xA;      &quot;fieldConfig&quot;: {&#xD;&#xA;        &quot;defaults&quot;: {&#xD;&#xA;          &quot;mappings&quot;: [],&#xD;&#xA;          &quot;thresholds&quot;: {&#xD;&#xA;            &quot;mode&quot;: &quot;absolute&quot;,&#xD;&#xA;            &quot;steps&quot;: [&#xD;&#xA;              {&#xD;&#xA;                &quot;color&quot;: &quot;green&quot;,&#xD;&#xA;                &quot;value&quot;: null&#xD;&#xA;              },&#xD;&#xA;              {&#xD;&#xA;                &quot;color&quot;: &quot;yellow&quot;,&#xD;&#xA;                &quot;value&quot;: 100&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;overrides&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;gridPos&quot;: {&#xD;&#xA;        &quot;h&quot;: 3,&#xD;&#xA;        &quot;w&quot;: 6,&#xD;&#xA;        &quot;x&quot;: 0,&#xD;&#xA;        &quot;y&quot;: 3&#xD;&#xA;      },&#xD;&#xA;      &quot;id&quot;: 16,&#xD;&#xA;      &quot;options&quot;: {&#xD;&#xA;        &quot;colorMode&quot;: &quot;value&quot;,&#xD;&#xA;        &quot;graphMode&quot;: &quot;area&quot;,&#xD;&#xA;        &quot;justifyMode&quot;: &quot;auto&quot;,&#xD;&#xA;        &quot;orientation&quot;: &quot;auto&quot;,&#xD;&#xA;        &quot;reduceOptions&quot;: {&#xD;&#xA;          &quot;calcs&quot;: [&#xD;&#xA;            &quot;last&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;fields&quot;: &quot;&quot;,&#xD;&#xA;          &quot;values&quot;: false&#xD;&#xA;        },&#xD;&#xA;        &quot;textMode&quot;: &quot;auto&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;pluginVersion&quot;: &quot;8.5.3&quot;,&#xD;&#xA;      &quot;targets&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;expr&quot;: &quot;substrate_proposer_number_of_transactions&quot;,&#xD;&#xA;          &quot;interval&quot;: &quot;&quot;,&#xD;&#xA;          &quot;legendFormat&quot;: &quot;Height(best)&quot;,&#xD;&#xA;          &quot;refId&quot;: &quot;A&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;title&quot;: &quot;Block Total Tx&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;stat&quot;&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;datasource&quot;: {&#xD;&#xA;        &quot;type&quot;: &quot;prometheus&quot;,&#xD;&#xA;        &quot;uid&quot;: &quot;tSoTyKbnk&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;description&quot;: &quot;What your node sees as the highest finalized block ( less than or equal to best)&quot;,&#xD;&#xA;      &quot;fieldConfig&quot;: {&#xD;&#xA;        &quot;defaults&quot;: {&#xD;&#xA;          &quot;mappings&quot;: [],&#xD;&#xA;          &quot;thresholds&quot;: {&#xD;&#xA;            &quot;mode&quot;: &quot;absolute&quot;,&#xD;&#xA;            &quot;steps&quot;: [&#xD;&#xA;              {&#xD;&#xA;                &quot;color&quot;: &quot;green&quot;,&#xD;&#xA;                &quot;value&quot;: null&#xD;&#xA;              },&#xD;&#xA;              {&#xD;&#xA;                &quot;color&quot;: &quot;yellow&quot;,&#xD;&#xA;                &quot;value&quot;: 500000&#xD;&#xA;              },&#xD;&#xA;              {&#xD;&#xA;                &quot;color&quot;: &quot;red&quot;,&#xD;&#xA;                &quot;value&quot;: 1000000&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;unit&quot;: &quot;decbytes&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;overrides&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;gridPos&quot;: {&#xD;&#xA;        &quot;h&quot;: 3,&#xD;&#xA;        &quot;w&quot;: 6,&#xD;&#xA;        &quot;x&quot;: 6,&#xD;&#xA;        &quot;y&quot;: 3&#xD;&#xA;      },&#xD;&#xA;      &quot;id&quot;: 17,&#xD;&#xA;      &quot;options&quot;: {&#xD;&#xA;        &quot;colorMode&quot;: &quot;value&quot;,&#xD;&#xA;        &quot;graphMode&quot;: &quot;area&quot;,&#xD;&#xA;        &quot;justifyMode&quot;: &quot;auto&quot;,&#xD;&#xA;        &quot;orientation&quot;: &quot;auto&quot;,&#xD;&#xA;        &quot;reduceOptions&quot;: {&#xD;&#xA;          &quot;calcs&quot;: [&#xD;&#xA;            &quot;last&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;fields&quot;: &quot;&quot;,&#xD;&#xA;          &quot;values&quot;: false&#xD;&#xA;        },&#xD;&#xA;        &quot;textMode&quot;: &quot;value&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;pluginVersion&quot;: &quot;8.5.3&quot;,&#xD;&#xA;      &quot;targets&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;expr&quot;: &quot;substrate_state_cache_bytes&quot;,&#xD;&#xA;          &quot;format&quot;: &quot;time_series&quot;,&#xD;&#xA;          &quot;interval&quot;: &quot;&quot;,&#xD;&#xA;          &quot;legendFormat&quot;: &quot;Size (bytes)&quot;,&#xD;&#xA;          &quot;refId&quot;: &quot;A&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;title&quot;: &quot;State Cashe (bytes)&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;stat&quot;&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;aliasColors&quot;: {},&#xD;&#xA;      &quot;bars&quot;: true,&#xD;&#xA;      &quot;dashLength&quot;: 10,&#xD;&#xA;      &quot;dashes&quot;: false,&#xD;&#xA;      &quot;datasource&quot;: {&#xD;&#xA;        &quot;type&quot;: &quot;prometheus&quot;,&#xD;&#xA;        &quot;uid&quot;: &quot;tSoTyKbnk&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;description&quot;: &quot;Number of connected peers&quot;,&#xD;&#xA;      &quot;fieldConfig&quot;: {&#xD;&#xA;        &quot;defaults&quot;: {&#xD;&#xA;          &quot;links&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;overrides&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;fill&quot;: 1,&#xD;&#xA;      &quot;fillGradient&quot;: 0,&#xD;&#xA;      &quot;gridPos&quot;: {&#xD;&#xA;        &quot;h&quot;: 8,&#xD;&#xA;        &quot;w&quot;: 12,&#xD;&#xA;        &quot;x&quot;: 0,&#xD;&#xA;        &quot;y&quot;: 6&#xD;&#xA;      },&#xD;&#xA;      &quot;hiddenSeries&quot;: false,&#xD;&#xA;      &quot;id&quot;: 10,&#xD;&#xA;      &quot;legend&quot;: {&#xD;&#xA;        &quot;alignAsTable&quot;: true,&#xD;&#xA;        &quot;avg&quot;: true,&#xD;&#xA;        &quot;current&quot;: true,&#xD;&#xA;        &quot;max&quot;: true,&#xD;&#xA;        &quot;min&quot;: true,&#xD;&#xA;        &quot;show&quot;: true,&#xD;&#xA;        &quot;total&quot;: false,&#xD;&#xA;        &quot;values&quot;: true&#xD;&#xA;      },&#xD;&#xA;      &quot;lines&quot;: true,&#xD;&#xA;      &quot;linewidth&quot;: 1,&#xD;&#xA;      &quot;nullPointMode&quot;: &quot;null&quot;,&#xD;&#xA;      &quot;options&quot;: {&#xD;&#xA;        &quot;alertThreshold&quot;: true&#xD;&#xA;      },&#xD;&#xA;      &quot;percentage&quot;: false,&#xD;&#xA;      &quot;pluginVersion&quot;: &quot;8.5.3&quot;,&#xD;&#xA;      &quot;pointradius&quot;: 2,&#xD;&#xA;      &quot;points&quot;: true,&#xD;&#xA;      &quot;renderer&quot;: &quot;flot&quot;,&#xD;&#xA;      &quot;seriesOverrides&quot;: [],&#xD;&#xA;      &quot;spaceLength&quot;: 10,&#xD;&#xA;      &quot;stack&quot;: false,&#xD;&#xA;      &quot;steppedLine&quot;: false,&#xD;&#xA;      &quot;targets&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;expr&quot;: &quot;substrate_sub_libp2p_peers_count&quot;,&#xD;&#xA;          &quot;instant&quot;: false,&#xD;&#xA;          &quot;interval&quot;: &quot;&quot;,&#xD;&#xA;          &quot;legendFormat&quot;: &quot;Number of network gossip peers&quot;,&#xD;&#xA;          &quot;refId&quot;: &quot;A&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;thresholds&quot;: [],&#xD;&#xA;      &quot;timeRegions&quot;: [],&#xD;&#xA;      &quot;title&quot;: &quot;LibP2P peers&quot;,&#xD;&#xA;      &quot;tooltip&quot;: {&#xD;&#xA;        &quot;shared&quot;: true,&#xD;&#xA;        &quot;sort&quot;: 0,&#xD;&#xA;        &quot;value_type&quot;: &quot;individual&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;type&quot;: &quot;graph&quot;,&#xD;&#xA;      &quot;xaxis&quot;: {&#xD;&#xA;        &quot;mode&quot;: &quot;time&quot;,&#xD;&#xA;        &quot;show&quot;: true,&#xD;&#xA;        &quot;values&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;yaxes&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;$$hashKey&quot;: &quot;object:673&quot;,&#xD;&#xA;          &quot;decimals&quot;: 0,&#xD;&#xA;          &quot;format&quot;: &quot;none&quot;,&#xD;&#xA;          &quot;label&quot;: &quot;Peers&quot;,&#xD;&#xA;          &quot;logBase&quot;: 1,&#xD;&#xA;          &quot;min&quot;: &quot;0&quot;,&#xD;&#xA;          &quot;show&quot;: true&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;$$hashKey&quot;: &quot;object:674&quot;,&#xD;&#xA;          &quot;format&quot;: &quot;short&quot;,&#xD;&#xA;          &quot;logBase&quot;: 1,&#xD;&#xA;          &quot;show&quot;: true&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;yaxis&quot;: {&#xD;&#xA;        &quot;align&quot;: false&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;aliasColors&quot;: {},&#xD;&#xA;      &quot;bars&quot;: false,&#xD;&#xA;      &quot;dashLength&quot;: 10,&#xD;&#xA;      &quot;dashes&quot;: false,&#xD;&#xA;      &quot;datasource&quot;: {&#xD;&#xA;        &quot;type&quot;: &quot;prometheus&quot;,&#xD;&#xA;        &quot;uid&quot;: &quot;tSoTyKbnk&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;description&quot;: &quot;histogram 90th quantiles for time to construct a block (seconds) More info: https://prometheus.io/docs/prometheus/latest/querying/functions/#histogram_quantile&quot;,&#xD;&#xA;      &quot;fill&quot;: 1,&#xD;&#xA;      &quot;fillGradient&quot;: 8,&#xD;&#xA;      &quot;gridPos&quot;: {&#xD;&#xA;        &quot;h&quot;: 8,&#xD;&#xA;        &quot;w&quot;: 12,&#xD;&#xA;        &quot;x&quot;: 0,&#xD;&#xA;        &quot;y&quot;: 14&#xD;&#xA;      },&#xD;&#xA;      &quot;hiddenSeries&quot;: false,&#xD;&#xA;      &quot;id&quot;: 15,&#xD;&#xA;      &quot;legend&quot;: {&#xD;&#xA;        &quot;avg&quot;: false,&#xD;&#xA;        &quot;current&quot;: false,&#xD;&#xA;        &quot;max&quot;: false,&#xD;&#xA;        &quot;min&quot;: false,&#xD;&#xA;        &quot;show&quot;: true,&#xD;&#xA;        &quot;total&quot;: false,&#xD;&#xA;        &quot;values&quot;: false&#xD;&#xA;      },&#xD;&#xA;      &quot;lines&quot;: true,&#xD;&#xA;      &quot;linewidth&quot;: 1,&#xD;&#xA;      &quot;nullPointMode&quot;: &quot;null&quot;,&#xD;&#xA;      &quot;options&quot;: {&#xD;&#xA;        &quot;alertThreshold&quot;: true&#xD;&#xA;      },&#xD;&#xA;      &quot;percentage&quot;: false,&#xD;&#xA;      &quot;pluginVersion&quot;: &quot;8.5.3&quot;,&#xD;&#xA;      &quot;pointradius&quot;: 2,&#xD;&#xA;      &quot;points&quot;: false,&#xD;&#xA;      &quot;renderer&quot;: &quot;flot&quot;,&#xD;&#xA;      &quot;seriesOverrides&quot;: [],&#xD;&#xA;      &quot;spaceLength&quot;: 10,&#xD;&#xA;      &quot;stack&quot;: false,&#xD;&#xA;      &quot;steppedLine&quot;: false,&#xD;&#xA;      &quot;targets&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;expr&quot;: &quot;histogram_quantile(0.90, sum(rate(substrate_proposer_block_constructed_bucket[5m])) by (le))&quot;,&#xD;&#xA;          &quot;format&quot;: &quot;time_series&quot;,&#xD;&#xA;          &quot;instant&quot;: false,&#xD;&#xA;          &quot;interval&quot;: &quot;&quot;,&#xD;&#xA;          &quot;legendFormat&quot;: &quot;90th quantile for block construction time (s)&quot;,&#xD;&#xA;          &quot;refId&quot;: &quot;A&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;thresholds&quot;: [],&#xD;&#xA;      &quot;timeRegions&quot;: [],&#xD;&#xA;      &quot;title&quot;: &quot;Proposer Block Construction Time&quot;,&#xD;&#xA;      &quot;tooltip&quot;: {&#xD;&#xA;        &quot;shared&quot;: true,&#xD;&#xA;        &quot;sort&quot;: 0,&#xD;&#xA;        &quot;value_type&quot;: &quot;individual&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;type&quot;: &quot;graph&quot;,&#xD;&#xA;      &quot;xaxis&quot;: {&#xD;&#xA;        &quot;mode&quot;: &quot;time&quot;,&#xD;&#xA;        &quot;show&quot;: true,&#xD;&#xA;        &quot;values&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;yaxes&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;$$hashKey&quot;: &quot;object:517&quot;,&#xD;&#xA;          &quot;format&quot;: &quot;short&quot;,&#xD;&#xA;          &quot;label&quot;: &quot;Time (s)&quot;,&#xD;&#xA;          &quot;logBase&quot;: 1,&#xD;&#xA;          &quot;show&quot;: true&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;$$hashKey&quot;: &quot;object:518&quot;,&#xD;&#xA;          &quot;format&quot;: &quot;short&quot;,&#xD;&#xA;          &quot;logBase&quot;: 1,&#xD;&#xA;          &quot;show&quot;: true&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;yaxis&quot;: {&#xD;&#xA;        &quot;align&quot;: false&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  &quot;refresh&quot;: &quot;&quot;,&#xD;&#xA;  &quot;schemaVersion&quot;: 36,&#xD;&#xA;  &quot;style&quot;: &quot;dark&quot;,&#xD;&#xA;  &quot;tags&quot;: [&#xD;&#xA;    &quot;substrate&quot;,&#xD;&#xA;    &quot;blockchain&quot;,&#xD;&#xA;    &quot;node&quot;,&#xD;&#xA;    &quot;template&quot;,&#xD;&#xA;    &quot;polkadot&quot;,&#xD;&#xA;    &quot;kusama&quot;&#xD;&#xA;  ],&#xD;&#xA;  &quot;templating&quot;: {&#xD;&#xA;    &quot;list&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;time&quot;: {&#xD;&#xA;    &quot;from&quot;: &quot;now-5m&quot;,&#xD;&#xA;    &quot;to&quot;: &quot;now&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;timepicker&quot;: {&#xD;&#xA;    &quot;refresh_intervals&quot;: [&#xD;&#xA;      &quot;5s&quot;,&#xD;&#xA;      &quot;10s&quot;,&#xD;&#xA;      &quot;30s&quot;,&#xD;&#xA;      &quot;1m&quot;,&#xD;&#xA;      &quot;5m&quot;,&#xD;&#xA;      &quot;15m&quot;,&#xD;&#xA;      &quot;30m&quot;,&#xD;&#xA;      &quot;1h&quot;,&#xD;&#xA;      &quot;2h&quot;,&#xD;&#xA;      &quot;1d&quot;&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;timezone&quot;: &quot;&quot;,&#xD;&#xA;  &quot;title&quot;: &quot;Substrate Node Template Metrics&quot;,&#xD;&#xA;  &quot;uid&quot;: &quot;PUYzGbwWa&quot;,&#xD;&#xA;  &quot;version&quot;: 4,&#xD;&#xA;  &quot;weekStart&quot;: &quot;&quot;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10943" PostHistoryTypeId="2" PostId="2922" RevisionGUID="5f64720f-b704-4db3-873b-5b19532ec64c" CreationDate="2022-05-27T19:48:11.337" UserId="2646" Text="I'd like to know if there's a chain that smart contract is being in mainnet use of it.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10945" PostHistoryTypeId="1" PostId="2922" RevisionGUID="5f64720f-b704-4db3-873b-5b19532ec64c" CreationDate="2022-05-27T19:48:11.337" UserId="2646" Text="Are there blockchains based on substrates that use smart contracts and are on mainnet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10946" PostHistoryTypeId="3" PostId="2922" RevisionGUID="5f64720f-b704-4db3-873b-5b19532ec64c" CreationDate="2022-05-27T19:48:11.337" UserId="2646" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10947" PostHistoryTypeId="2" PostId="2923" RevisionGUID="e5478af0-f380-47f5-874e-ac9e735ff63c" CreationDate="2022-05-27T20:54:10.267" UserId="590" Text="I noticed that signed extensions do not have weights associated to them.&#xD;&#xA;&#xD;&#xA;Pallets like transaction-payment pallet use signed extension to withdraw fees but we do not apply weights to them. Why?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10949" PostHistoryTypeId="1" PostId="2923" RevisionGUID="e5478af0-f380-47f5-874e-ac9e735ff63c" CreationDate="2022-05-27T20:54:10.267" UserId="590" Text="Signed Extensions and Weights" ContentLicense="CC BY-SA 4.0" />
  <row Id="10950" PostHistoryTypeId="3" PostId="2923" RevisionGUID="e5478af0-f380-47f5-874e-ac9e735ff63c" CreationDate="2022-05-27T20:54:10.267" UserId="590" Text="|substrate-node|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10951" PostHistoryTypeId="2" PostId="2924" RevisionGUID="2e00a47c-a160-4aa5-a290-7bae638b5edc" CreationDate="2022-05-28T04:13:37.860" UserId="2648" Text="Check out Moonbeam and Astar! &#xD;&#xA;https://moonbeam.network/&#xD;&#xA;https://astar.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="10958" PostHistoryTypeId="2" PostId="2926" RevisionGUID="4d191daf-1b11-4938-ba4a-3e27cf610667" CreationDate="2022-05-28T08:35:04.563" UserId="627" Text="I'll give a bit of history and what you can do about it. The reality is that Jest (until version 28, more on that later) has been lagging quite a bit on both ESM and export maps (introduced in Node 12). Not due to importance (especially if you look at their issue trackers), but rather that they were held ransom a tiny bit with the resolutions package from browserify.&#xD;&#xA;&#xD;&#xA;In all honesty, this &quot;lack of support&quot; has been quite (to put it mildly) a major PITA for the polkadot-js libs. As you linked, there are workarounds involving the transforms, but it was still not quite working out of the box.&#xD;&#xA;&#xD;&#xA;With Jest 27 things improved a lot, but not perfect. However with the API 8.x series and util 9.x we actually found a build workaround doing the same thing in a slightly different form and that means that all transforms could be removed. (In all the polkadot-js repos we did exactly that) Basically since this version range it works out of the box with Jest, no extra config needed.&#xD;&#xA;&#xD;&#xA;Meanwhile in Jest-land things have also not been standing still - Jest 28 has proper export map support and now handles ESM much better as well.&#xD;&#xA;&#xD;&#xA;I clicked through on the template and it is still on older versions of the API as well as Jest. So in this case I would recommend either one of the following -&#xD;&#xA;&#xD;&#xA; - follow the approach woss suggested and add the exports (this is known working)&#xD;&#xA; - Bump the `@polkadot/*` versions to latest&#xD;&#xA; - Bump the `jest` dependencies&#xD;&#xA;&#xD;&#xA;Since I'm always advocating for people to be relatively recent on `@polkadot` deps since things are moving forward and the world is not static, I would probably shoot for that option." ContentLicense="CC BY-SA 4.0" />
  <row Id="10965" PostHistoryTypeId="2" PostId="2928" RevisionGUID="d77a2b78-78a3-4d9a-bc29-2151a22dd589" CreationDate="2022-05-28T14:43:31.823" UserId="2650" Text="Thank you for your question. This is Sota, founder of Astar Network. Astar is a multichain smart contract hub on Polakdot supporting WASM and EVM. Polkadot doesn't support smart contracts by design and this is the reason why the ecosystem needs smart contract Parachains like Astar and Moonbeam. &#xD;&#xA;&#xD;&#xA;When it comes to smart contracts on Polkadot, there are 2 types of contracts, EVM and WASM. EVM on mainnets are already ready today and Moonbeam and Astar are supporting EVM. WASM is also going to be supported by Astar in the early Q3. Currently, we are testing WASM on our testnet and measuring the network stability and performance. Hope we can support WASM as soon as possible on Astar so that the Polkadot ecosystem can explore the new smart contract landscape. " ContentLicense="CC BY-SA 4.0" />
  <row Id="10967" PostHistoryTypeId="5" PostId="2928" RevisionGUID="5d8c549b-339c-4975-93f6-4a5fb43f4ad9" CreationDate="2022-05-28T14:45:09.883" UserId="2650" Comment="added 38 characters in body" Text="Thank you for your question. This is Sota, founder of Astar Network. Astar is a multichain smart contract hub on Polakdot supporting WASM and EVM. Polkadot doesn't support smart contracts by design and this is the reason why the ecosystem needs smart contract Parachains like Astar and Moonbeam. &#xD;&#xA;&#xD;&#xA;When it comes to smart contracts on Polkadot, there are 2 types of contracts, smart contracts on EVM and smart contracts on WASM. EVM on mainnets are already ready today and Moonbeam and Astar are supporting EVM. WASM is also going to be supported by Astar in the early Q3. Currently, we are testing WASM on our testnet and measuring the network stability and performance. Hope we can support WASM as soon as possible on Astar so that the Polkadot ecosystem can explore the new smart contract landscape. " ContentLicense="CC BY-SA 4.0" />
  <row Id="10968" PostHistoryTypeId="52" PostId="2922" RevisionGUID="c6942527-0af5-4c2b-9625-d95bea3199d7" CreationDate="2022-05-28T15:14:24.513" />
  <row Id="10969" PostHistoryTypeId="2" PostId="2929" RevisionGUID="ee6f7035-c4bc-4df0-9ad8-68b7f6d8c962" CreationDate="2022-05-28T17:38:10.373" UserId="245" Text="I'm developing a client library for Dart. I wonder how can I send transactions using RPC.&#xD;&#xA;&#xD;&#xA;If I wanted to send a balance transfer only using RPC how could I do it? What are the steps?&#xD;&#xA;&#xD;&#xA;I know that I should encode the data before sending it, but I couldn't figure out what to encode and what RPC method to send." ContentLicense="CC BY-SA 4.0" />
  <row Id="10971" PostHistoryTypeId="1" PostId="2929" RevisionGUID="ee6f7035-c4bc-4df0-9ad8-68b7f6d8c962" CreationDate="2022-05-28T17:38:10.373" UserId="245" Text="How to send transactions using RPC?" ContentLicense="CC BY-SA 4.0" />
  <row Id="10972" PostHistoryTypeId="3" PostId="2929" RevisionGUID="ee6f7035-c4bc-4df0-9ad8-68b7f6d8c962" CreationDate="2022-05-28T17:38:10.373" UserId="245" Text="|rpc|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10973" PostHistoryTypeId="5" PostId="2924" RevisionGUID="4daf2d8b-a7a5-4f45-8eba-c6579d181801" CreationDate="2022-05-28T20:22:51.683" UserId="29" Comment="added 2 characters in body" Text="Check out Moonbeam and Astar! &#xD;&#xA;- https://moonbeam.network&#xD;&#xA;- https://astar.network" ContentLicense="CC BY-SA 4.0" />
  <row Id="10974" PostHistoryTypeId="2" PostId="2930" RevisionGUID="8b49c390-49d7-42a9-a345-5a441d2a8c29" CreationDate="2022-05-29T01:17:53.823" UserId="25" Text="Yes, you need to implement a pallet if you want to issue rewards, but it isn't required for PoW chain as such to operate.&#xD;&#xA;&#xD;&#xA;The pallet Kulupu uses isn't very minimal, something simpler like what [we used in Subspace](https://github.com/subspace/subspace/blob/3f4c8367c86f9851ef2ebb8b12b098d31a0df5b3/crates/pallet-rewards/src/lib.rs) can already be sufficient depending on the use case." ContentLicense="CC BY-SA 4.0" />
  <row Id="10976" PostHistoryTypeId="6" PostId="2874" RevisionGUID="e730e868-9c05-4bcc-b383-32e59ccf85d2" CreationDate="2022-05-29T03:53:27.300" UserId="34" Comment="edited tags" Text="|parachain|kusama|crowdloan|slot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10978" PostHistoryTypeId="2" PostId="2931" RevisionGUID="c2eabe8a-6586-4e1d-a062-2e72c180a52e" CreationDate="2022-05-29T03:56:22.753" UserId="2417" Text="The first thing is encoding the user-defined struct in off-chain node.js, it will be like this:&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;/// encode user-defined data with ink api.&#xD;&#xA;/// the `{&quot;name&quot;: &quot;Nika&quot;, &quot;age&quot;: 18, &quot;phones&quot;: [&quot;123&quot;, &quot;456&quot;]}, &quot;someone&quot;, 666` is user-defined parameters, there're three here&#xD;&#xA;const calleeEncode = calleeABI.findMessage('encode_user_multi_params').toU8a([{&quot;name&quot;: &quot;Nika&quot;, &quot;age&quot;: 18, &quot;phones&quot;: [&quot;123&quot;, &quot;456&quot;]}, &quot;someone&quot;, 666]);&#xD;&#xA;&#xD;&#xA;// it cannot be used until now, we should make more encoding manually&#xD;&#xA;let ecdStr = '0x';&#xD;&#xA;for (let i = 1; i &lt; calleeEncode.length; ++i){&#xD;&#xA;  let stemp = calleeEncode[i].toString(16);&#xD;&#xA;  if (stemp.length &lt; 2){&#xD;&#xA;    stemp = '0' + stemp;&#xD;&#xA;  }&#xD;&#xA;  ecdStr += stemp;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;/// Next, we can call *delegator contract* to make a delegate call to any callee contract.&#xD;&#xA;/// the `contract` is the *delegator contract* instance&#xD;&#xA;/// the `callToContracts` is the proxy call method&#xD;&#xA;/// `5CgMjHnZm7VAi8x9HrB4b8FXYytnUj1pqNUH92yUmY9A7g8C` is the callee contract address&#xD;&#xA;/// `ecdStr` is the encoded parameters and related method selector of the user-defined *callee contract*&#xD;&#xA;const { gasConsumed, result, output } = await contract.query['callToContracts'](sender.address, {value, gasLimit }, &#xD;&#xA;                                       &quot;5CgMjHnZm7VAi8x9HrB4b8FXYytnUj1pqNUH92yUmY9A7g8C&quot;, ecdStr);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The second thing is the related *delegator contract* method&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;/// because in our case we have more than one parameters for callee, so we need a `Wrapper` manually:&#xD;&#xA; struct Wrapper {&#xD;&#xA;        data: ink_prelude::vec::Vec::&lt;u8&gt;,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl Wrapper {&#xD;&#xA;        pub fn new(data: ink_prelude::vec::Vec::&lt;u8&gt;) -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                data,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl scale::Encode for Wrapper {&#xD;&#xA;        #[inline]&#xD;&#xA;        fn size_hint(&amp;self) -&gt; usize {&#xD;&#xA;            scale::Encode::size_hint(&amp;self.data)&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        #[inline]&#xD;&#xA;        fn encode_to&lt;O: scale::Output + ?Sized&gt;(&amp;self, output: &amp;mut O) {&#xD;&#xA;            output.write(&amp;self.data);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;/// this is the delegate call&#xD;&#xA;fn call_to_contracts(&amp; self, callee_account: AccountId, msg: ink_prelude::vec::Vec::&lt;u8&gt;) -&gt; ink_prelude::string::String{&#xD;&#xA;            let data: ink_prelude::vec::Vec::&lt;u8&gt; = msg.clone().drain(4..).collect();&#xD;&#xA;            let wrapped_data = Wrapper::new(data);&#xD;&#xA;            &#xD;&#xA;            let my_return_value: ink_prelude::string::String =  ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(&#xD;&#xA;                    ink_env::call::Call::new()&#xD;&#xA;                        .callee(callee_account)&#xD;&#xA;                        .gas_limit(0)&#xD;&#xA;                        .transferred_value(0))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([msg[0], msg[1], msg[2], msg[3]]))&#xD;&#xA;                    .push_arg(wrapped_data)&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;ink_prelude::string::String&gt;()&#xD;&#xA;                .fire()&#xD;&#xA;                .unwrap();&#xD;&#xA;            my_return_value&#xD;&#xA;        }&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="10980" PostHistoryTypeId="2" PostId="2932" RevisionGUID="1f4505ab-0798-4c5a-90b4-ccf0cc820529" CreationDate="2022-05-29T04:16:31.603" UserId="34" Text="https://github.com/substrate-developer-hub/awesome-substrate#mobile lists at least one option: https://github.com/Pocket4D/Polkadot-Dart&#xD;&#xA;&#xD;&#xA;Although at the time I am writing it looks stale and unfinished, sadly. But it can perhaps give you a head start to build what you need. There are a few more here to review too https://github.com/search?q=dart+substrate .&#xD;&#xA;&#xD;&#xA;The canonical way to submit transactions aka extrinsics is via the Polkadot.js API, one tool that you may reference for how to do this could be best exemplified in the [substrate-api-sidecar](https://github.com/paritytech/substrate-api-sidecar/blob/8906816934b8e6bd5bf98393f83d55a6711d296e/src/services/transaction/TransactionSubmitService.ts#L28). &#xD;&#xA;&#xD;&#xA;In rust there is also https://github.com/paritytech/subxt that is worth a look. &#xD;&#xA;&#xD;&#xA;Hope these help! " ContentLicense="CC BY-SA 4.0" />
  <row Id="10982" PostHistoryTypeId="2" PostId="2933" RevisionGUID="62e38690-0b8d-427b-99ab-48b8d9d2f197" CreationDate="2022-05-29T05:42:10.137" UserId="627" Text="To send the transaction look at the [author_submitExtrinsic](https://polkadot.js.org/docs/substrate/rpc#submitextrinsicextrinsic-extrinsic-hash) and [author_submitAndWatchExtrinsic](https://polkadot.js.org/docs/substrate/rpc#submitandwatchextrinsicextrinsic-extrinsic-extrinsicstatus), the latter when using subscriptions and wanting to have access to the processing status.&#xD;&#xA;&#xD;&#xA;As to the format, it really depends on the on-chain metadata and the signed extensions that are applied on the extrinsic. However generally, assuming Polkadot/Kusama it would in the following format -&#xD;&#xA;&#xD;&#xA; - compact encoded length&#xD;&#xA; - version + signing bit (as per metadata, currently `0x84` when signed - version 4, high bit indicates that is it signed)&#xD;&#xA; - address of sender (generally MultiAddress, so 33 bytes in length)&#xD;&#xA; - signature of [extrinsic payload](https://substrate.stackexchange.com/a/2904/627) (generally MultiSignature type, so 65 bytes in length)&#xD;&#xA; - mortal era&#xD;&#xA; - nonce&#xD;&#xA; - tip&#xD;&#xA; - call (indexes and params)" ContentLicense="CC BY-SA 4.0" />
  <row Id="10984" PostHistoryTypeId="5" PostId="2933" RevisionGUID="989fa2c5-0194-40ea-adcb-12bb5cca4d02" CreationDate="2022-05-29T05:54:29.677" UserId="627" Comment="typo." Text="To send the transaction look at the [author_submitExtrinsic](https://polkadot.js.org/docs/substrate/rpc#submitextrinsicextrinsic-extrinsic-hash) and [author_submitAndWatchExtrinsic](https://polkadot.js.org/docs/substrate/rpc#submitandwatchextrinsicextrinsic-extrinsic-extrinsicstatus), the latter when using subscriptions and wanting to have access to the processing status.&#xD;&#xA;&#xD;&#xA;As to the format, it really depends on the on-chain metadata and the signed extensions that are applied on the extrinsic. However generally, assuming Polkadot/Kusama it would be in the following format -&#xD;&#xA;&#xD;&#xA; - compact encoded length&#xD;&#xA; - version + signing bit (as per metadata, currently `0x84` when signed - version 4, high bit indicates that is it signed)&#xD;&#xA; - address of sender (generally MultiAddress, so 33 bytes in length)&#xD;&#xA; - signature of [extrinsic payload](https://substrate.stackexchange.com/a/2904/627) (generally MultiSignature type, so 65 bytes in length)&#xD;&#xA; - mortal era&#xD;&#xA; - nonce&#xD;&#xA; - tip&#xD;&#xA; - call (indexes and params)" ContentLicense="CC BY-SA 4.0" />
  <row Id="10985" PostHistoryTypeId="5" PostId="2674" RevisionGUID="8b198bb4-28c8-407b-a1c1-dff18bfddb45" CreationDate="2022-05-29T06:00:28.190" UserId="627" Comment="Remove leading 0\n\n in text that adds no value." Text="I am trying to generate an extrinsic proof that can in turn be used to generate a partial trie and then extract the actual extrinsic for which the proof was generated from the trie, but I've not been able to figure it out yet.&#xD;&#xA;&#xD;&#xA;Currently I'm using the trie_db::proof::generate_proof to generate the proof&#xD;&#xA;&#xD;&#xA;This is what I've done so far https://github.com/Wizdave97/extrinsic-from-proof/blob/master/src/main.rs&#xD;&#xA;&#xD;&#xA;The issue is the second line of this snippet returns an error 'InvalidStateRoot'&#xD;&#xA;&#xD;&#xA;    let db = sp_trie::storage_proof::StorageProof::new(proof.to_vec()).into_memory_db::&lt;BlakeTwo256&gt;();&#xD;&#xA;    let trie = sp_trie::TrieDB::&lt;sp_trie::LayoutV0&lt;BlakeTwo256&gt;&gt;::new(&amp;db, root).unwrap();" ContentLicense="CC BY-SA 4.0" />
  <row Id="10989" PostHistoryTypeId="2" PostId="2934" RevisionGUID="59d0258f-3727-4786-a388-48773e4d9f49" CreationDate="2022-05-29T07:55:48.350" UserId="642" Text="In kusama account recovery, you have to have your lost account's id (address) to initiate the recovery process, but when you lost an account, in most cases it's id is forgotten too. If we can kind of find our lost id using its identity it would be very helpful. Hence, my question is:&#xD;&#xA;&#xD;&#xA;Is it possible to fetch an account's id using its identity (i.e., name, twitter, riot, etc.)?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="10991" PostHistoryTypeId="1" PostId="2934" RevisionGUID="59d0258f-3727-4786-a388-48773e4d9f49" CreationDate="2022-05-29T07:55:48.350" UserId="642" Text="Fetch an account's id using its Identity" ContentLicense="CC BY-SA 4.0" />
  <row Id="10992" PostHistoryTypeId="3" PostId="2934" RevisionGUID="59d0258f-3727-4786-a388-48773e4d9f49" CreationDate="2022-05-29T07:55:48.350" UserId="642" Text="|account|identity|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="10993" PostHistoryTypeId="2" PostId="2935" RevisionGUID="34235262-2141-4109-b741-5c14e92b13fc" CreationDate="2022-05-29T09:32:43.357" UserId="627" Text="Not quite the answer you were looking for, however current the only way to do it -&#xD;&#xA;&#xD;&#xA; - get all identities via [identity.identityOf](https://polkadot.js.org/docs/substrate/storage#identityofaccountid32-optionpalletidentityregistration) (If using the JS API, this would mean a `.entries()` query to get the full map)&#xD;&#xA; - loop through, matching to what you expect (with the accountId extracted as part of the key)&#xD;&#xA; - present list to the user (there will most probably be multiples here, i.e. name, riot, etc. is not guaranteed to be unique - it is user supplied)&#xD;&#xA;&#xD;&#xA;The last point is generally why where is no name -&gt; accountId mapping -&#xD;&#xA;&#xD;&#xA; - this information is certainly non-unique and user supplied&#xD;&#xA; - it is not really needed for on-chain logic, hence not stored since it would bloat the state&#xD;&#xA;&#xD;&#xA;Alternatively, the best non-RPC solution would be to index this offline. (It may already be available in one of the explorers)" ContentLicense="CC BY-SA 4.0" />
  <row Id="10995" PostHistoryTypeId="2" PostId="2936" RevisionGUID="5806bebf-b8f2-4037-ae12-dabe1cad0807" CreationDate="2022-05-29T11:23:28.510" UserId="1867" Text="If you are interested in WASM Smart Contracts which are executed by `pallet-contracts`, these are primarily Smart Contracts which are written in the [Rust based edsl ink!](https://github.com/paritytech/ink) and which are compiled to WASM.&#xD;&#xA;&#xD;&#xA;You might want to take a look at the [awesome-ink Repo](https://github.com/paritytech/awesome-ink), which collects info on all avaible projects building with ink!.&#xD;&#xA;&#xD;&#xA;So there is a testnet support available on currently 5 different Parachain testnets and hopefully the first deployment on a mainnet soon." ContentLicense="CC BY-SA 4.0" />
  <row Id="11002" PostHistoryTypeId="2" PostId="2938" RevisionGUID="9fdb01b8-9e43-4a17-957d-f674b5838df6" CreationDate="2022-05-29T14:40:33.423" UserId="285" Text="I am using Substrate V3 (using decl_storage) and have an existing storage defined like this:&#xD;&#xA;```rust&#xD;&#xA;pub Foo get(fn get_foo) config(): map hasher(blake2_128_concat) u32 =&gt; H160;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would like to change this into:&#xD;&#xA;```rust&#xD;&#xA;pub Foo get(fn get_foo) config(): map hasher(blake2_128_concat) H160 =&gt; u32;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After reading about storage migration, I am planning to use `StorageKeyIterator` to iterate over the old values and `drain` it:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    for (idx, address) in StorageKeyIterator::&lt;u32, H160, Blake2_128Concat&gt;::&#xD;&#xA;            new(b&quot;PalletName&quot;, b&quot;Foo&quot;).drain() {&#xD;&#xA;&#xD;&#xA;        &lt;Foo&gt;::insert(address, index);&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA; - Is this the correct approach?&#xD;&#xA; - Can I reuse the same storage name for old and new value (`Foo`)?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="11004" PostHistoryTypeId="1" PostId="2938" RevisionGUID="9fdb01b8-9e43-4a17-957d-f674b5838df6" CreationDate="2022-05-29T14:40:33.423" UserId="285" Text="Migrating storage without creating a new storage item" ContentLicense="CC BY-SA 4.0" />
  <row Id="11005" PostHistoryTypeId="3" PostId="2938" RevisionGUID="9fdb01b8-9e43-4a17-957d-f674b5838df6" CreationDate="2022-05-29T14:40:33.423" UserId="285" Text="|pallet|storage|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11006" PostHistoryTypeId="2" PostId="2939" RevisionGUID="e661bd16-7508-49da-b4b8-7eda6952269f" CreationDate="2022-05-29T16:28:37.280" UserId="2548" Text="As the title is descriptive, I would like to create a subscription pallet. A user needs to subscribe first and the receiver can receive the payment every month.&#xD;&#xA;Any idea how to design this pallet? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11008" PostHistoryTypeId="1" PostId="2939" RevisionGUID="e661bd16-7508-49da-b4b8-7eda6952269f" CreationDate="2022-05-29T16:28:37.280" UserId="2548" Text="How to create a subscription pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11009" PostHistoryTypeId="3" PostId="2939" RevisionGUID="e661bd16-7508-49da-b4b8-7eda6952269f" CreationDate="2022-05-29T16:28:37.280" UserId="2548" Text="|pallet|polkadot|frame|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11011" PostHistoryTypeId="2" PostId="2940" RevisionGUID="d44cfa64-c6d0-4e7c-8441-b7c95e79c4ea" CreationDate="2022-05-29T18:35:52.270" UserId="1846" Text="This can be solved in various ways. Depending on the duration also aspects like building a reserve can be relevant. E.g. one time payment is simple but recurring payments, maybe collected in a map with blocktime to execute the subscription payment `on_finalize`, could also raise questions, when the subscriber has insufficient funds. Otoh, if they would pay e.g. one year in advance you could build a reserve in the subscriber account or transfer to the service provider account and release through something like a vesting scheduler.&#xD;&#xA;&#xD;&#xA;hth" ContentLicense="CC BY-SA 4.0" />
  <row Id="11013" PostHistoryTypeId="2" PostId="2941" RevisionGUID="2613262a-4782-4ebf-9a5c-55ed81be019f" CreationDate="2022-05-29T18:50:47.907" UserId="627" Text="The events are stored on chain as a `Vec&lt;EventRecord&gt;` - this means that when you make a query (either for latest or for a specific blockHash), that you would get set for that specific block. The RPCs itself has no filtering mechanism, it simply returns what is available in the state.&#xD;&#xA;&#xD;&#xA;With this in mind, any filtering would need to be performed once the `Vec` is returned, which mean on the client side. Additionally, since each runtime is different and events are specific to a pallet, specific per-account filtering is also left up to the client. The RPC returns really views this as &quot;opaque&quot;, it just returns the data in the state, specific records are only understandable alongside the metadata.&#xD;&#xA;&#xD;&#xA;With this in mind, what you can do is to filter for the specific [events](https://polkadot.js.org/docs/substrate/events) you are interested in. As an example using the JS API and looking at [balances.Deposit](https://polkadot.js.org/docs/substrate/events#depositaccountid32-u128) events -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// retrieve all events&#xD;&#xA;const all = await api.query.system.events();&#xD;&#xA;&#xD;&#xA;// filter the balances.Deposit events&#xD;&#xA;const deposits = all.filter(({ event }) =&gt;&#xD;&#xA;  api.events.balances.Deposit.is(event)&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;// display the recipient &amp; amounts&#xD;&#xA;for (let i = 0; i &lt; deposits.length; i++) {&#xD;&#xA;  const [recipient, amount] = deposits.event.data;&#xD;&#xA;&#xD;&#xA;  console.log(recipient.toString() + ' received ' + amount.toString());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For each specific event type you are interested in, you would need to -&#xD;&#xA;&#xD;&#xA; - check for the specific event&#xD;&#xA; - extract the parameters as per the event specification" ContentLicense="CC BY-SA 4.0" />
  <row Id="11019" PostHistoryTypeId="2" PostId="2943" RevisionGUID="77de99ae-10eb-4d71-85bc-11bd67038ba4" CreationDate="2022-05-30T05:24:33.893" UserId="627" Text="Here is a description of [SCALE compact-encoding](https://docs.substrate.io/v3/advanced/scale-codec/#compactgeneral-integers). As you mentioned in your question, there are basically 4 variants indicated by the flags from the 2 least-significant bits. &#xD;&#xA;&#xD;&#xA;Effectively when decoding the first byte of SCALE compact, it would be in the form `0bxxxxxxyy` where `yy` are the flags and the most-significant 6 `xxxxxx` are the bits containing the value in the first byte.&#xD;&#xA;&#xD;&#xA;Interpreting the lest-significant binary flags you can have lengths of 1, 2, 4 &amp; n (where n is at least 5) bytes -&#xD;&#xA;&#xD;&#xA;`00` This is a single-byte version. To extract the value, you would do `byte1 &gt;&gt; 2`. As an example `0b00000100` would be `4 &gt;&gt; 2 = 1`&#xD;&#xA;&#xD;&#xA;`01` This is a double-byte version. To extract the value, you would do `(byte1 + (byte2 &lt;&lt; 8)) &gt;&gt; 2`. As an example `0b11111101 0b00000111` would be `(253 + (7 &lt;&lt; 8)) &gt;&gt; 2 = 511`&#xD;&#xA;&#xD;&#xA;`10` This is the 4 byte version. For extracting the value, it ends up being `(byte1 + (byte2 &lt;&lt; 8) + (byte3 &lt;&lt; 16) + (byte4 &lt;&lt; 24)) &gt;&gt; 2`. An example would be `0b11111110 0b11111111 0b11111111 0b11111111` which would be `(254 + (255 &lt;&lt; 8) + (255 &lt;&lt; 16) + (255 &lt;&lt; 24)) &gt;&gt; 2 = 1073741823`&#xD;&#xA;&#xD;&#xA;`11` This is the n-byte version. The first byte + 4 details the number of bytes following. So Assuming a first byte of `0b00000111` it would yield 5 bytes, i.e. `(7 &gt;&gt; 2) + 4 = 5`. The next 5 bytes would therefore be the LE encoded value.&#xD;&#xA;&#xD;&#xA;Depending on your toolset and language, be aware that some of these are very large numbers and could overflow the &quot;normal&quot; representation. So it is recommended to use big integer support for your environment especially when converting the very large values. &#xD;&#xA;&#xD;&#xA;(And example of this is JS where the [maximum integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) is 2^53 - 1. So in this specific case you may want to use [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) or alternatives when converting. Other languages would have other limits, bear those in mind.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11022" PostHistoryTypeId="2" PostId="2944" RevisionGUID="54dc3204-8998-41ce-a300-a5963e65e662" CreationDate="2022-05-30T06:53:35.830" UserId="555" Text="Can anyone please explain what are the different types of pallets we need to add in runtime in order to integrate staking in our runtime ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11024" PostHistoryTypeId="1" PostId="2944" RevisionGUID="54dc3204-8998-41ce-a300-a5963e65e662" CreationDate="2022-05-30T06:53:35.830" UserId="555" Text="Pallets needed for staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="11025" PostHistoryTypeId="3" PostId="2944" RevisionGUID="54dc3204-8998-41ce-a300-a5963e65e662" CreationDate="2022-05-30T06:53:35.830" UserId="555" Text="|staking|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11026" PostHistoryTypeId="5" PostId="2943" RevisionGUID="f5e9432d-6c4d-4339-8cf5-3d9d865c121e" CreationDate="2022-05-30T08:25:25.900" UserId="627" Comment="4+" Text="Here is a description of [SCALE compact-encoding](https://docs.substrate.io/v3/advanced/scale-codec/#compactgeneral-integers). As you mentioned in your question, there are basically 4 variants indicated by the flags from the 2 least-significant bits. &#xD;&#xA;&#xD;&#xA;Effectively when decoding the first byte of SCALE compact, it would be in the form `0bxxxxxxyy` where `yy` are the flags and the most-significant 6 `xxxxxx` are the bits containing the value in the first byte.&#xD;&#xA;&#xD;&#xA;Interpreting the lest-significant binary flags you can have lengths of 1, 2, 4 &amp; 4+ bytes -&#xD;&#xA;&#xD;&#xA;`00` This is a single-byte version. To extract the value, you would do `byte1 &gt;&gt; 2`. As an example `0b00000100` would be `4 &gt;&gt; 2 = 1`&#xD;&#xA;&#xD;&#xA;`01` This is a double-byte version. To extract the value, you would do `(byte1 + (byte2 &lt;&lt; 8)) &gt;&gt; 2`. As an example `0b11111101 0b00000111` would be `(253 + (7 &lt;&lt; 8)) &gt;&gt; 2 = 511`&#xD;&#xA;&#xD;&#xA;`10` This is the 4 byte version. For extracting the value, it ends up being `(byte1 + (byte2 &lt;&lt; 8) + (byte3 &lt;&lt; 16) + (byte4 &lt;&lt; 24)) &gt;&gt; 2`. An example would be `0b11111110 0b11111111 0b11111111 0b11111111` which would be `(254 + (255 &lt;&lt; 8) + (255 &lt;&lt; 16) + (255 &lt;&lt; 24)) &gt;&gt; 2 = 1073741823`&#xD;&#xA;&#xD;&#xA;`11` This is the n-byte version. The first byte + 4 details the number of bytes following. So Assuming a first byte of `0b00000111` it would yield 5 bytes, i.e. `(7 &gt;&gt; 2) + 4 = 5`. The next 5 bytes would therefore be the LE encoded value.&#xD;&#xA;&#xD;&#xA;Depending on your toolset and language, be aware that some of these are very large numbers and could overflow the &quot;normal&quot; representation. So it is recommended to use big integer support for your environment especially when converting the very large values. &#xD;&#xA;&#xD;&#xA;(And example of this is JS where the [maximum integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) is 2^53 - 1. So in this specific case you may want to use [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) or alternatives when converting. Other languages would have other limits, bear those in mind.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11027" PostHistoryTypeId="2" PostId="2945" RevisionGUID="51bc0a56-3955-416f-aa42-208fb7b4761a" CreationDate="2022-05-30T08:45:37.210" UserId="393" Text="Yeah, there are couple ways to do it. Maybe you can clarify your requirement exactly, so we can cut off many ways that is inappropriate." ContentLicense="CC BY-SA 4.0" />
  <row Id="11029" PostHistoryTypeId="2" PostId="2946" RevisionGUID="57750687-8065-4300-b227-0c73f718eb6b" CreationDate="2022-05-30T08:56:48.910" UserId="1949" Text="@Iker has the right answer above (as a comment). So I wrote this small script to check on some chains -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;&#xD;&#xA;&#xD;&#xA;const HOSTS = [&#xD;&#xA;	&quot;wss://rpc.polkadot.io&quot;,&#xD;&#xA;	&quot;wss://kusama-rpc.polkadot.io&quot;,&#xD;&#xA;	&quot;wss://rococo-rpc.polkadot.io&quot;,&#xD;&#xA;	&quot;wss://westend-rpc.polkadot.io&quot;&#xD;&#xA;]&#xD;&#xA;const EMPTY = new Uint8Array(32)&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;	for (let i = 0; i &lt; HOSTS.length; i++) {&#xD;&#xA;		const host = HOSTS[i]&#xD;&#xA;		const provider = new WsProvider(host)&#xD;&#xA;		const api = await ApiPromise.create({ provider })&#xD;&#xA;		const val = await api.query.system.account(EMPTY)&#xD;&#xA;&#xD;&#xA;		console.log(&#xD;&#xA;			host,&#xD;&#xA;			api.createType(&quot;AccountId&quot;, EMPTY).toString(),&#xD;&#xA;			JSON.stringify(val.toHuman(), null, 2)&#xD;&#xA;		)&#xD;&#xA;&#xD;&#xA;		provider.disconnect()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On the list of hosts, I found 2 non-empty: Kusama &amp; Westend. Since I logged the actual empty accountId, I also checked this against Subscan for the transfers -&#xD;&#xA;&#xD;&#xA; - [Westend](https://westend.subscan.io/account/5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM?tab=transfer) 62 transfers into this address&#xD;&#xA; - [Kusama](https://kusama.subscan.io/account/CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp?tab=transfer) 4 transfers into this address&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11031" PostHistoryTypeId="50" PostId="2188" RevisionGUID="404dc878-709d-4340-b3ff-080f0a0f1823" CreationDate="2022-05-30T09:02:55.287" UserId="-1" />
  <row Id="11033" PostHistoryTypeId="2" PostId="2947" RevisionGUID="99836d20-e84b-4005-80a8-3065f3f06e41" CreationDate="2022-05-30T09:15:14.633" UserId="2662" Text="I have a base smart contract in `rust` with package manager `cargo`. In that smart contract I have some events which I'm emitting while function calling. For listing that events I have a service in `java script` but I'm not sure how to decode that event that trigger by contract while there is a transaction happened in a blockchain using that smartcontract. I have a link from where I can decode that `https://github.com/polkadot-js/api/blob/f701c398c349159d5afd7344ea38c1d52e4aab56/packages/api-contract/src/Abi/index.ts#L111` but I have implement that but not able to decode the events. I'm pasting my contract and service here let me know if you got something or suggest something.&#xD;&#xA;&#xD;&#xA;**Contract**&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    use ink_lang as ink;&#xD;&#xA;    &#xD;&#xA;    #[ink::contract]&#xD;&#xA;    mod test {&#xD;&#xA;    &#xD;&#xA;        /// Defines the storage of your contract.&#xD;&#xA;        /// Add new fields to the below struct in order&#xD;&#xA;        /// to add new static storage fields to your contract.&#xD;&#xA;        #[ink(storage)]&#xD;&#xA;        pub struct Test {&#xD;&#xA;            /// Stores a single `bool` value on the storage.&#xD;&#xA;            value: bool,&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        /// Event emitted when a token transfer occurs.&#xD;&#xA;        #[ink(event)]&#xD;&#xA;        pub struct Transfer {&#xD;&#xA;            #[ink(topic)]&#xD;&#xA;            from: Option&lt;AccountId&gt;,&#xD;&#xA;            #[ink(topic)]&#xD;&#xA;            to: Option&lt;AccountId&gt;,&#xD;&#xA;            value: Balance,&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        impl Test {&#xD;&#xA;            /// Constructor that initializes the `bool` value to the given `init_value`.&#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn new(init_value: bool) -&gt; Self {&#xD;&#xA;                Self { value: init_value }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// Constructor that initializes the `bool` value to `false`.&#xD;&#xA;            ///&#xD;&#xA;            /// Constructors can delegate to other constructors.&#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn default() -&gt; Self {&#xD;&#xA;                Self::new(Default::default())&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// A message that can be called on instantiated contracts.&#xD;&#xA;            /// This one flips the value of the stored `bool` from `true`&#xD;&#xA;            /// to `false` and vice versa.&#xD;&#xA;            #[ink(message)]&#xD;&#xA;            pub fn flip(&amp;mut self) {&#xD;&#xA;                self.value = !self.value;&#xD;&#xA;                Self::env().emit_event(Transfer {&#xD;&#xA;                    from: None,&#xD;&#xA;                    to: None,&#xD;&#xA;                    value: 10000,&#xD;&#xA;                });&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// Simply returns the current value of our `bool`.&#xD;&#xA;            #[ink(message)]&#xD;&#xA;            pub fn get(&amp;self) {&#xD;&#xA;                Self::env().emit_event(Transfer {&#xD;&#xA;                    from: None,&#xD;&#xA;                    to: None,&#xD;&#xA;                    value: 10000,&#xD;&#xA;                });&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        /// Unit tests in Rust are normally defined within such a `#[cfg(test)]`&#xD;&#xA;        /// module and test functions are marked with a `#[test]` attribute.&#xD;&#xA;        /// The below code is technically just normal Rust code.&#xD;&#xA;        #[cfg(test)]&#xD;&#xA;        mod tests {&#xD;&#xA;            /// Imports all the definitions from the outer scope so we can use them here.&#xD;&#xA;            use super::*;&#xD;&#xA;    &#xD;&#xA;            /// Imports `ink_lang` so we can use `#[ink::test]`.&#xD;&#xA;            use ink_lang as ink;&#xD;&#xA;    &#xD;&#xA;            /// We test if the default constructor does its job.&#xD;&#xA;            #[ink::test]&#xD;&#xA;            fn default_works() {&#xD;&#xA;                let test = Test::default();&#xD;&#xA;                assert_eq!(test.get(), false);&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// We test a simple use case of our contract.&#xD;&#xA;            #[ink::test]&#xD;&#xA;            fn it_works() {&#xD;&#xA;                let mut test = Test::new(false);&#xD;&#xA;                assert_eq!(test.get(), false);&#xD;&#xA;                test.flip();&#xD;&#xA;                assert_eq!(test.get(), true);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Service.js**&#xD;&#xA;&#xD;&#xA;    const { ApiPromise, WsProvider } = require('@polkadot/api')&#xD;&#xA;    const { ContractPromise, Abi } = require('@polkadot/api-contract')&#xD;&#xA;    const {&#xD;&#xA;      assert,&#xD;&#xA;      assertReturn,&#xD;&#xA;      compactAddLength,&#xD;&#xA;      compactStripLength,&#xD;&#xA;      isNumber,&#xD;&#xA;      isObject,&#xD;&#xA;      isString,&#xD;&#xA;      logger,&#xD;&#xA;      stringCamelCase,&#xD;&#xA;      stringify,&#xD;&#xA;      u8aConcat,&#xD;&#xA;      u8aToHex,&#xD;&#xA;    } = require('@polkadot/util')&#xD;&#xA;    &#xD;&#xA;    // Import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve &amp; Ferdie)&#xD;&#xA;    const { Keyring } = require('@polkadot/keyring')&#xD;&#xA;    &#xD;&#xA;    const bridgePerr = require('./flipper/examples/test/target/ink/metadata.json')&#xD;&#xA;    &#xD;&#xA;    const Contract_Address_Peer = '5FfwrjcXmWsCZCtzRJPwtPBS3AEnPKJy9c2yEi17mFa5hhS3'&#xD;&#xA;    &#xD;&#xA;    // Acc :- 30 may 11:33&#xD;&#xA;    const Peer_Private_key =&#xD;&#xA;      '0xb0969cc635d807e6d6bfcb05cad88758c64df2da338050ce2103815653d05606'&#xD;&#xA;    &#xD;&#xA;    const PeerProvider = new WsProvider('ws://127.0.0.1:9944')&#xD;&#xA;    &#xD;&#xA;    // const self = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'&#xD;&#xA;    const to = '5Gue2tLHMZrfaeX6gDNs8EAPm64mpAnHsWWw5TWhGsb3Fkxo'&#xD;&#xA;    const AMOUNT = 1000000000000&#xD;&#xA;    &#xD;&#xA;    async function main() {&#xD;&#xA;      const api = await ApiPromise.create({ PeerProvider })&#xD;&#xA;    &#xD;&#xA;      //ed25519 edwards&#xD;&#xA;      const keyring = new Keyring({ type: 'ed25519' })&#xD;&#xA;    &#xD;&#xA;      const PeerBridge = new ContractPromise(api, bridgePerr, Contract_Address_Peer)&#xD;&#xA;      // the address we are going to query&#xD;&#xA;    &#xD;&#xA;      // Find the actual keypair in the keyring&#xD;&#xA;      // const alicePair = keyring.getPair(target)&#xD;&#xA;      const userPair = keyring.addFromUri(Peer_Private_key)&#xD;&#xA;    &#xD;&#xA;      console.log('Sending', AMOUNT, 'from', userPair.address, 'to', to)&#xD;&#xA;    &#xD;&#xA;      PeerBridge.tx&#xD;&#xA;        .get({&#xD;&#xA;          value: 0,&#xD;&#xA;          gasLimit: -1,&#xD;&#xA;        })&#xD;&#xA;        .signAndSend(userPair, ({ events = [], status }) =&gt; {&#xD;&#xA;          console.log('Transaction status:', status.type)&#xD;&#xA;    &#xD;&#xA;          if (status.isInBlock) {&#xD;&#xA;            console.log('Included at block hash', status.asInBlock.toHex())&#xD;&#xA;            console.log('Events:')&#xD;&#xA;    &#xD;&#xA;            events.forEach(({ event: { data, method, section }, phase }) =&gt; {&#xD;&#xA;              console.log(&#xD;&#xA;                '\t',&#xD;&#xA;                phase.toString(),&#xD;&#xA;                `: ${section}.${method}`,&#xD;&#xA;                data.toString(),&#xD;&#xA;              )&#xD;&#xA;            })&#xD;&#xA;          } else if (status.isFinalized) {&#xD;&#xA;            console.log('Finalized block hash', status.asFinalized.toHex())&#xD;&#xA;    &#xD;&#xA;            process.exit(0)&#xD;&#xA;          }&#xD;&#xA;        })&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    main()&#xD;&#xA;&#xD;&#xA;**logs**&#xD;&#xA;&#xD;&#xA;        Transaction status: Ready&#xD;&#xA;        Transaction status: InBlock&#xD;&#xA;        Included at block hash 0x20da51303e5e1518e90844be6823f85e51666cc27ee652960d25b65902a97e59&#xD;&#xA;        Events:&#xD;&#xA;                 {&quot;applyExtrinsic&quot;:1} : balances.Withdraw [&quot;5Cht6EkuACEXLrF8XBywqZPDCL9AEgSQXS4MB6dwgZAeqCVc&quot;,2828033563974]&#xD;&#xA;                 {&quot;applyExtrinsic&quot;:1} : contracts.ContractEmitted [&quot;5DskQxeMsqqueJzauUsbh8xYiiDKR4x7e5Kz29pkCJ1EKmwZ&quot;,&quot;0x00000010270000000000000000000000000000&quot;]&#xD;&#xA;                 {&quot;applyExtrinsic&quot;:1} : balances.Deposit [&quot;5Cht6EkuACEXLrF8XBywqZPDCL9AEgSQXS4MB6dwgZAeqCVc&quot;,1268853627292]&#xD;&#xA;                 {&quot;applyExtrinsic&quot;:1} : balances.Deposit [&quot;5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z&quot;,1247343949345]&#xD;&#xA;                 {&quot;applyExtrinsic&quot;:1} : treasury.Deposit [1247343949345]&#xD;&#xA;                 {&quot;applyExtrinsic&quot;:1} : balances.Deposit [&quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,311835987337]&#xD;&#xA;                 {&quot;applyExtrinsic&quot;:1} : system.ExtrinsicSuccess [{&quot;weight&quot;:9072880260,&quot;class&quot;:&quot;Normal&quot;,&quot;paysFee&quot;:&quot;Yes&quot;}]&#xD;&#xA;        Transaction status: Finalized&#xD;&#xA;        Finalized &#xD;&#xA;    &#xD;&#xA;    block hash 0x20da51303e5e1518e90844be6823f85e51666cc27ee652960d25b65902a97e59&#xD;&#xA;&#xD;&#xA;Anyone please suggest something or help me in this.&#xD;&#xA;&#xD;&#xA;     " ContentLicense="CC BY-SA 4.0" />
  <row Id="11035" PostHistoryTypeId="1" PostId="2947" RevisionGUID="99836d20-e84b-4005-80a8-3065f3f06e41" CreationDate="2022-05-30T09:15:14.633" UserId="2662" Text="How to decode events help on substrate using polkadot.js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11036" PostHistoryTypeId="3" PostId="2947" RevisionGUID="99836d20-e84b-4005-80a8-3065f3f06e41" CreationDate="2022-05-30T09:15:14.633" UserId="2662" Text="|polkadot-js|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11037" PostHistoryTypeId="2" PostId="2948" RevisionGUID="9dc6840d-c8d9-4ed8-a8de-d78b9d26839c" CreationDate="2022-05-30T09:31:55.303" UserId="2129" Text="You want to decode the data from [ContractEmitted](https://polkadot.js.org/docs/substrate/events#contractemittedaccountid32-bytes). So you are half-way there in known that you can pass the `Bytes` to the [decodeEvent](https://github.com/polkadot-js/api/blob/master/packages/api-contract/src/Abi/index.ts#L111) on the API.&#xD;&#xA;&#xD;&#xA;In mostly pseudo-code, you would need to adjust your event check loop -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;events.forEach(({ event, phase }) =&gt; {&#xD;&#xA;  if (api.events.contracts.ContractEmitted.is(event)) {&#xD;&#xA;    // we are dealing with a contract event&#xD;&#xA;    const [account_id, contract_evt] = event.data&#xD;&#xA;&#xD;&#xA;    // find out ABI based on the accountId for the contract&#xD;&#xA;    // here we assume we have stored ABIs for our known addresses&#xD;&#xA;    const abi = abis[account_id.toString()]&#xD;&#xA;&#xD;&#xA;    // decode&#xD;&#xA;    const decoded = abi.decodeEvent(contract_evt)&#xD;&#xA;&#xD;&#xA;    // display results, etc.&#xD;&#xA;    ...&#xD;&#xA;  } else {&#xD;&#xA;    // normal/other event logic&#xD;&#xA;  }&#xD;&#xA;})&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11039" PostHistoryTypeId="2" PostId="2949" RevisionGUID="418bc9b4-81da-4201-bfa8-44dfebf2b551" CreationDate="2022-05-30T09:35:50.703" UserId="2129" Text="From my understanding the signed extensions are applied in the transaction pool, i.e. on evaluation of the message before it is executed. Should the signed extensions pass, the transaction can be included in a block.&#xD;&#xA;&#xD;&#xA;So at the point of evaluation, since it is not included (only validated to be included), there is no fee associated with it. Fees are only applied when it is included." ContentLicense="CC BY-SA 4.0" />
  <row Id="11042" PostHistoryTypeId="2" PostId="2950" RevisionGUID="59ef96bc-b77a-4c4c-9893-ab015e4dd519" CreationDate="2022-05-30T10:33:47.260" UserId="94" Text="There is an [`ExtrinsicBaseWeight`](https://github.com/paritytech/substrate/blob/158cdfd1a43a122f8cfbf70473fcd54a3b418f3d/frame/support/src/weights/extrinsic_weights.rs#L56) which is added to the weight of all extrinsics.  &#xD;&#xA;This is done to account for any weight that is not measured by the pallet benchmarks, like inherents or signature verification.  &#xD;&#xA;&#xD;&#xA;It is measured by executing many [`System::Remark`](https://github.com/paritytech/substrate/blob/158cdfd1a43a122f8cfbf70473fcd54a3b418f3d/frame/system/src/lib.rs#L382) extrinsics in a block and dividing by the number of extrinsics. Remark extrinsics do nothing and are therefore a good pick.  &#xD;&#xA;All inherents are applied in this measurement, otherwise the runtime would reject them.  &#xD;&#xA;More in-depth explanation is in the [README](https://github.com/paritytech/substrate/tree/master/utils/frame/benchmarking-cli/src/overhead) of the sub-folder.  &#xD;&#xA;&#xD;&#xA;Analogous to this there is also a [`BlockExecutionweight`](https://github.com/paritytech/substrate/blob/158cdfd1a43a122f8cfbf70473fcd54a3b418f3d/frame/support/src/weights/block_weights.rs#L56), which does the same thing for blocks.  &#xD;&#xA;&#xD;&#xA;PS: Polkadot has its own constants, these Substrate constants are just as explanation." ContentLicense="CC BY-SA 4.0" />
  <row Id="11044" PostHistoryTypeId="2" PostId="2951" RevisionGUID="7e05b7c8-f441-4857-8f07-942233af09a4" CreationDate="2022-05-30T10:58:30.590" UserId="1756" Text="Is it correct to be typing `queryMulti` return types such as in the following example, proving the types at the function call rather than inside the callback params? (For brevity I have used `any` for concrete return types):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const unsub: () =&gt; void = await api.queryMulti&lt;&#xD;&#xA;      [any, Option&lt;any&gt;, Option&lt;any&gt;]&#xD;&#xA;    &gt;(&#xD;&#xA;      [&#xD;&#xA;        [api.query.system.account, address],&#xD;&#xA;        [api.query.staking.bonded, address],&#xD;&#xA;        [api.query.staking.nominators, address],&#xD;&#xA;      ],&#xD;&#xA;      async ([{ data }, bonded, nominations]): Promise&lt;void&gt; =&gt; {&#xD;&#xA;        const _account: any = {&#xD;&#xA;          address,&#xD;&#xA;        };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: An awesome update to the [Polkadot JS API][1] docs would be to be able to toggle between JavaScript and TypeScript for each of the examples, providing fully typed use cases and prevent developers from having to browse the PJS Apps codebase.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/start/api.rpc/" ContentLicense="CC BY-SA 4.0" />
  <row Id="11046" PostHistoryTypeId="1" PostId="2951" RevisionGUID="7e05b7c8-f441-4857-8f07-942233af09a4" CreationDate="2022-05-30T10:58:30.590" UserId="1756" Text="PJS: What is the correct way to type queryMulti?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11047" PostHistoryTypeId="3" PostId="2951" RevisionGUID="7e05b7c8-f441-4857-8f07-942233af09a4" CreationDate="2022-05-30T10:58:30.590" UserId="1756" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11048" PostHistoryTypeId="2" PostId="2952" RevisionGUID="4aed256b-96de-45bb-81af-aaf7e7094daa" CreationDate="2022-05-30T10:58:52.820" UserId="1959" Text="```rust&#xD;&#xA;let message_call = call.take_decoded().map_err(|_| XcmError::FailedToDecode)?;&#xD;&#xA;```&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/xcm/xcm-executor/src/lib.rs#L342&#xD;&#xA;&#xD;&#xA;I got this code above and tried to find the specific decoding code but failed.&#xD;&#xA;&#xD;&#xA;So what is the specific decoding process? How does the **encoded transaction** in `Transact` turn into `call`?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11050" PostHistoryTypeId="1" PostId="2952" RevisionGUID="4aed256b-96de-45bb-81af-aaf7e7094daa" CreationDate="2022-05-30T10:58:52.820" UserId="1959" Text="How does the encoded transaction in `Transact` turn into `call` when executing instructions in XCM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11051" PostHistoryTypeId="3" PostId="2952" RevisionGUID="4aed256b-96de-45bb-81af-aaf7e7094daa" CreationDate="2022-05-30T10:58:52.820" UserId="1959" Text="|xcm|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11052" PostHistoryTypeId="5" PostId="2951" RevisionGUID="52a0bb13-a393-4572-af0d-df1878d3d75c" CreationDate="2022-05-30T10:59:00.990" UserId="1756" Comment="added 2 characters in body" Text="Is it correct to be typing `queryMulti` return types such as in the following example, providing the types at the function call rather than inside the callback params? (For brevity I have used `any` for concrete return types):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const unsub: () =&gt; void = await api.queryMulti&lt;&#xD;&#xA;      [any, Option&lt;any&gt;, Option&lt;any&gt;]&#xD;&#xA;    &gt;(&#xD;&#xA;      [&#xD;&#xA;        [api.query.system.account, address],&#xD;&#xA;        [api.query.staking.bonded, address],&#xD;&#xA;        [api.query.staking.nominators, address],&#xD;&#xA;      ],&#xD;&#xA;      async ([{ data }, bonded, nominations]): Promise&lt;void&gt; =&gt; {&#xD;&#xA;        const _account: any = {&#xD;&#xA;          address,&#xD;&#xA;        };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: An awesome update to the [Polkadot JS API][1] docs would be to be able to toggle between JavaScript and TypeScript for each of the examples, providing fully typed use cases and prevent developers from having to browse the PJS Apps codebase.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/start/api.rpc/" ContentLicense="CC BY-SA 4.0" />
  <row Id="11053" PostHistoryTypeId="50" PostId="1658" RevisionGUID="65c5d7ee-30f3-4df3-86c3-ee50b6041481" CreationDate="2022-05-30T11:08:30.913" UserId="-1" />
  <row Id="11054" PostHistoryTypeId="2" PostId="2953" RevisionGUID="d35e30d7-0b7d-4a5d-9a98-e12a703e79fa" CreationDate="2022-05-30T11:40:11.960" UserId="104" Text="Every XCM contains a type parameter `Call` that allows you to specify exactly what the type of the `Call` is. Thus, if you want to turn into a specific `Call` type, you have to ensure that your XCM type properly contains the `Call` type that you want to decode into. The way it then gets decoded is then determined by your `Call` type's `Decode` implementation.&#xD;&#xA;&#xD;&#xA;You can utilize the [`Xcm::&lt;Call&gt;::from` method][1] to change from a `Call` type to another, like so:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use runtime::Call;&#xD;&#xA;&#xD;&#xA;let foo = Xcm::&lt;()&gt;::ClearOrigin;&#xD;&#xA;let bar = Xcm::&lt;Call&gt;::from(foo);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/2c285771342a84e13dab696ef86902f73d4fbd4c/xcm/src/v2/mod.rs#L654" ContentLicense="CC BY-SA 4.0" />
  <row Id="11056" PostHistoryTypeId="2" PostId="2954" RevisionGUID="e67dd9f1-017b-4494-b8f2-69e929194a79" CreationDate="2022-05-30T12:04:08.370" UserId="1789" Text="The correct Dockerfile should look like this:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/p-network-202104/rust:2004ubuntu220530 AS builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;COPY . /builds/collator&#xD;&#xA;&#xD;&#xA;RUN cargo build --locked --${PROFILE}&#xD;&#xA;&#xD;&#xA;# This image has to be the same as the base image for the builder above &#xD;&#xA;FROM --platform=linux/amd64 docker.io/library/ubuntu:20.04&#xD;&#xA;#debian:10-slim&#xD;&#xA;#FROM debian@sha256:6ef4731388c03b38e58ea77aef9396c216095e1843742fc7cf5038901cc1f081&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slim&#xD;&#xA;&#xD;&#xA;# show backtraces&#xD;&#xA;ENV RUST_BACKTRACE 1&#xD;&#xA;&#xD;&#xA;# install tools and dependencies&#xD;&#xA;RUN apt-get update &amp;&amp; \&#xD;&#xA;  DEBIAN_FRONTEND=noninteractive apt-get install -y \&#xD;&#xA;  libssl1.1 \&#xD;&#xA;  ca-certificates &amp;&amp; \&#xD;&#xA;  # apt cleanup&#xD;&#xA;  apt-get autoremove -y &amp;&amp; \&#xD;&#xA;  apt-get clean &amp;&amp; \&#xD;&#xA;  find /var/lib/apt/lists/ -type f -not -name lock -delete; \&#xD;&#xA;  # add user and link ~/.local/share/polkadot to /data&#xD;&#xA;  useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot &amp;&amp; \&#xD;&#xA;  mkdir -p /data /polkadot/.local/share &amp;&amp; \&#xD;&#xA;  chown -R polkadot:polkadot /data &amp;&amp; \&#xD;&#xA;  ln -s /data /polkadot/.local/share/polkadot&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;COPY --from=builder /builds/collator/target/release/parachain-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;USER polkadot&#xD;&#xA;&#xD;&#xA;# check if executable works in this container&#xD;&#xA;RUN /usr/local/bin/parachain-collator --version&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944 9615&#xD;&#xA;VOLUME [&quot;/polkadot&quot;]&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/parachain-collator&quot;]&#xD;&#xA;# docker build -f zombienet/Dockerfile -t gcr.io/p-network-202104/collator:v6 .&#xD;&#xA;# docker push gcr.io/p-network-202104/collator:v6&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11058" PostHistoryTypeId="2" PostId="2955" RevisionGUID="bcd61d82-779b-45a5-9159-162bf24e8d1b" CreationDate="2022-05-30T12:05:07.597" UserId="2132" Text="The correct way is certainly to pass the generic params as you indicated and as appears in the signature. (That should be available in your editor, obviously if it does that kind of thing ala VSCode and friends). &#xD;&#xA;&#xD;&#xA;The following signatures are available -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&lt;T extends Codec[]&gt;(calls: QueryableStorageMultiArg&lt;ApiType&gt;[], callback: Callback&lt;T&gt;): UnsubscribePromise;&#xD;&#xA;&lt;T extends Codec[]&gt;(calls: QueryableStorageMultiArg&lt;ApiType&gt;[]): Promise&lt;T&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in the example you've listed, it would be akin to the following on a Kusama node -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;api.queryMulti&lt;[&#xD;&#xA;  FrameSystemAccountInfo,&#xD;&#xA;  Option&lt;AccountId32&gt;,&#xD;&#xA;  Option&lt;PalletStakingNominations&gt;&#xD;&#xA;]&gt;([&#xD;&#xA;  [api.query.system.account, address],&#xD;&#xA;  [api.query.staking.bonded, address],&#xD;&#xA;  [api.query.staking.nominators, address]&#xD;&#xA;], ... // rest goes here&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think there would be a way to actually use TS to extract these from the parameters passed as the calls, it feels like a &quot;simpler&quot; problem to solve than what was done already with the [strings from createType](https://github.com/polkadot-js/api/blob/master/packages/types/src/types/detect.ts). Been thinking about it and have not quite put my hands on the keyboard to attempt it (it would be my first foray into extracting-stuff-from-args in TS), but it is something I actually want to contribute." ContentLicense="CC BY-SA 4.0" />
  <row Id="11060" PostHistoryTypeId="5" PostId="2856" RevisionGUID="9450ddd1-2a20-4f0f-a5f3-f41afd960455" CreationDate="2022-05-30T12:05:47.447" UserId="1789" Comment="deleted 6 characters in body" Text="This question follows those questions below:&#xD;&#xA;&#xD;&#xA;Q1 https://substrate.stackexchange.com/questions/2578/zombienet-how-to-test-custom-parachain-collator-block-heightproducing-blocks/2583&#xD;&#xA;&#xD;&#xA;Q2 https://substrate.stackexchange.com/questions/2729/zombienet-substrate-parachain-template-block-heightblock-producing-test-f&#xD;&#xA;&#xD;&#xA;Regarding this Docker template: https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/collator_injected.Dockerfile, I got this answer from Q2 is &quot;yes you can that one and add the build phase to inject then the binary.&quot;&#xD;&#xA;&#xD;&#xA;That Dockerfile for making adder-collator image:&#xD;&#xA;```&#xD;&#xA;# this file copies from scripts/ci/dockerfiles/Dockerfile and changes only the binary name&#xD;&#xA;FROM docker.io/library/ubuntu:20.04&#xD;&#xA;&#xD;&#xA;# metadata&#xD;&#xA;ARG VCS_REF&#xD;&#xA;ARG BUILD_DATE&#xD;&#xA;ARG IMAGE_NAME&#xD;&#xA;&#xD;&#xA;LABEL io.parity.image.authors=&quot;devops-team@parity.io&quot; \&#xD;&#xA;	io.parity.image.vendor=&quot;Parity Technologies&quot; \&#xD;&#xA;	io.parity.image.title=&quot;${IMAGE_NAME}&quot; \&#xD;&#xA;	io.parity.image.description=&quot;Injected adder-collator Docker image&quot; \&#xD;&#xA;	io.parity.image.source=&quot;https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/ci/dockerfiles/collator_injected.Dockerfile&quot; \&#xD;&#xA;	io.parity.image.revision=&quot;${VCS_REF}&quot; \&#xD;&#xA;	io.parity.image.created=&quot;${BUILD_DATE}&quot; \&#xD;&#xA;	io.parity.image.documentation=&quot;https://github.com/paritytech/polkadot/&quot;&#xD;&#xA;&#xD;&#xA;# show backtraces&#xD;&#xA;ENV RUST_BACKTRACE 1&#xD;&#xA;&#xD;&#xA;# install tools and dependencies&#xD;&#xA;RUN apt-get update &amp;&amp; \&#xD;&#xA;	DEBIAN_FRONTEND=noninteractive apt-get install -y \&#xD;&#xA;		libssl1.1 \&#xD;&#xA;		ca-certificates &amp;&amp; \&#xD;&#xA;# apt cleanup&#xD;&#xA;	apt-get autoremove -y &amp;&amp; \&#xD;&#xA;	apt-get clean &amp;&amp; \&#xD;&#xA;	find /var/lib/apt/lists/ -type f -not -name lock -delete; \&#xD;&#xA;# add user and link ~/.local/share/adder-collator to /data&#xD;&#xA;	useradd -m -u 1000 -U -s /bin/sh -d /adder-collator adder-collator &amp;&amp; \&#xD;&#xA;	mkdir -p /data /adder-collator/.local/share &amp;&amp; \&#xD;&#xA;	chown -R adder-collator:adder-collator /data &amp;&amp; \&#xD;&#xA;	ln -s /data /adder-collator/.local/share/polkadot&#xD;&#xA;&#xD;&#xA;# add adder-collator binary to docker image&#xD;&#xA;COPY ./adder-collator /usr/local/bin&#xD;&#xA;COPY ./undying-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;USER adder-collator&#xD;&#xA;&#xD;&#xA;# check if executable works in this container&#xD;&#xA;RUN /usr/local/bin/adder-collator --version&#xD;&#xA;RUN /usr/local/bin/undying-collator --version&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944&#xD;&#xA;VOLUME [&quot;/adder-collator&quot;]&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/adder-collator&quot;]&#xD;&#xA;```&#xD;&#xA;Then I used that to make my parachain collator image:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/p-network-202104/collator:c1 AS builder&#xD;&#xA;# This c1 image has all the substrate-parachain-template code compiled&#xD;&#xA;&#xD;&#xA;FROM debian@sha256:6ef4731388c03b38e58ea77aef9396c216095e1843742fc7cf5038901cc1f081&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slim&#xD;&#xA;&#xD;&#xA;COPY --from=builder ./builds/collator/target/release/parachain-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;# show backtraces&#xD;&#xA;ENV RUST_BACKTRACE 1&#xD;&#xA;&#xD;&#xA;# install tools and dependencies&#xD;&#xA;RUN apt-get update &amp;&amp; \&#xD;&#xA;  DEBIAN_FRONTEND=noninteractive apt-get install -y \&#xD;&#xA;  libssl1.1 \&#xD;&#xA;  ca-certificates &amp;&amp; \&#xD;&#xA;  # apt cleanup&#xD;&#xA;  apt-get autoremove -y &amp;&amp; \&#xD;&#xA;  apt-get clean &amp;&amp; \&#xD;&#xA;  find /var/lib/apt/lists/ -type f -not -name lock -delete; \&#xD;&#xA;  # add user and link ~/.local/share/adder-collator to /data&#xD;&#xA;  useradd -m -u 1000 -U -s /bin/sh -d /adder-collator adder-collator &amp;&amp; \&#xD;&#xA;  mkdir -p /data /adder-collator/.local/share &amp;&amp; \&#xD;&#xA;  chown -R adder-collator:adder-collator /data &amp;&amp; \&#xD;&#xA;  ln -s /data /adder-collator/.local/share/polkadot&#xD;&#xA;&#xD;&#xA;# adder-collator and undying-collator are not found. do I need them?&#xD;&#xA;#COPY ./adder-collator /usr/local/bin&#xD;&#xA;#COPY ./undying-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;USER adder-collator&#xD;&#xA;&#xD;&#xA;# adder-collator and undying-collator are not found&#xD;&#xA;#RUN /usr/local/bin/adder-collator --version&#xD;&#xA;#RUN /usr/local/bin/undying-collator --version&#xD;&#xA;&#xD;&#xA;# adding code for new parachain collator&#xD;&#xA;RUN /usr/local/bin/parachain-collator --version&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944&#xD;&#xA;VOLUME [&quot;/adder-collator&quot;]&#xD;&#xA;&#xD;&#xA;#ENTRYPOINT [&quot;/usr/local/bin/adder-collator&quot;]  ... files not found&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/parachain-collator&quot;]&#xD;&#xA;```&#xD;&#xA;In above Dockerfile, I removed `adder-collator` and `undying-collator` because they are not in the Substrate-Parachain-template repo. Do I need them?&#xD;&#xA;&#xD;&#xA;My Zombienet network definition:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/p-network-202104/collator:t5&quot;&#xD;&#xA;  command = &quot;parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;I made an image from the above Dockerfile, then ran the same Zombienet tests as those in my previous posts. But the test failed for the same error: parachain block height is still zero&#xD;&#xA;&#xD;&#xA;About ENTRYPOINT, what executable should I put there?&#xD;&#xA;&#xD;&#xA;Should I use `parachain-collator` in ENTRYPOINT?&#xD;&#xA;&#xD;&#xA;`ENTRYPOINT [&quot;/usr/local/bin/parachain-collator&quot;]`&#xD;&#xA;&#xD;&#xA;The code repo: https://github.com/AuroraLantean/-substrate-parachain-template0918" ContentLicense="CC BY-SA 4.0" />
  <row Id="11061" PostHistoryTypeId="2" PostId="2956" RevisionGUID="f87590e9-c4e9-4802-bc0b-f9243b38db31" CreationDate="2022-05-30T12:08:13.820" UserId="1789" Text="See the correct Dockerfile and Zombienet network definition file at https://substrate.stackexchange.com/questions/2856/zombienet-substrate-parachain-template-how-to-write-the-dockerfile" ContentLicense="CC BY-SA 4.0" />
  <row Id="11063" PostHistoryTypeId="2" PostId="2957" RevisionGUID="eb968190-fdac-405f-b57b-b2d355ee6507" CreationDate="2022-05-30T12:09:28.440" UserId="1789" Text="See the correct Dockerfile and Zombienet network definition file at https://substrate.stackexchange.com/questions/2856/zombienet-substrate-parachain-template-how-to-write-the-dockerfile" ContentLicense="CC BY-SA 4.0" />
  <row Id="11065" PostHistoryTypeId="5" PostId="2578" RevisionGUID="3870fdca-05c4-4d9a-bcf1-acbd99937a22" CreationDate="2022-05-30T12:11:04.680" UserId="1789" Comment="deleted 12 characters in body" Text="previously I could run my tests including colander parachain with polkadot:v0.9.18 or polkadot-debug...&#xD;&#xA;my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  args = [&quot;--parachain-id 2000&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I changed that colander image to my own parachain image:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/p-network-202104/collator:v4&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And my tests:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z05-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z05-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I got this command output:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;		 Using temporary directory: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local-plain.json as:83f26480055f9cab6e46b477b9e66db48dc0e892d950ed0df817e05aefd69d9e&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/rococo-local.json as:c0730c2292ead75d4240c7c7623db1c40082c97ff4960ae8b0974597fc5c3498&#xD;&#xA;uploading to fileserver: /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/zombie-wrapper.sh as:640715d32ec3b23a0330febe7af0b9f37a6ffc8675cf88ecfdee1fa5b2b59b09&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/p-network/collator:latest&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --chain res/dev/rococo-custom-2-raw.json --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;-----------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-8a529a22b7767d93655b4bb89b74e034 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A42683#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:43531/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46627#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41273/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41621/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-13 15:22:39        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2734ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (76ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (60ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (61ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-13 15:25:11        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-13 15:25:32        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-8a529a22b7767d93655b4bb89b74e034_-144848-V9hN482nVZ36/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-13 15:25:42        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1000:: Normal connection closure&#xD;&#xA;2022-05-13 15:25:49        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:42683: 1006:: Connection dropped by remote peer.&#xD;&#xA;2022-05-13 15:25:50        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;```&#xD;&#xA;From above you can see the &#xD;&#xA;- relaychain alice node test: ok&#xD;&#xA;- relaychain bob node test: ok&#xD;&#xA;- parachain 2000 is registered: ok&#xD;&#xA;- 3 log tests: ok&#xD;&#xA;- parachain 2000 block height test: failed!!?? Why did that fail? &#xD;&#xA;&#xD;&#xA;When I was using `docker.io/paritypr/colander:master`, the block height test was successful... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Especially when I checked the collator logs via&#xD;&#xA;`kubectl logs -f collator01 -c collator01 -n zombie-8a529a22b7767d93655b4bb89b74e034`&#xD;&#xA;I got:&#xD;&#xA;```&#xD;&#xA;+ export PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ PATH=/cfg:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#xD;&#xA;+ pipe=/tmp/zombiepipe&#xD;&#xA;+ trap 'rm -f /tmp/zombiepipe' EXIT&#xD;&#xA;+ [[ ! -p /tmp/zombiepipe ]]&#xD;&#xA;+ mkfifo /tmp/zombiepipe&#xD;&#xA;+ child_pid=&#xD;&#xA;+ CMD=($@)&#xD;&#xA;+ child_pid=8&#xD;&#xA;+ ls /proc/8&#xD;&#xA;+ target/release/parachain-collator --chain /cfg/rococo-local.json --name collator01 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --parachain-id 2000 --no-mdns --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --no-telemetry --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;+ read line&#xD;&#xA;Error: Input(&quot;Error parsing spec file: missing field `relay_chain` at line 155 column 1&quot;)&#xD;&#xA;```&#xD;&#xA;Also the Polkadot.js link did not work as well&#xD;&#xA;`Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A46135#/explorer`&#xD;&#xA;&#xD;&#xA;What is wrong? &#xD;&#xA;&#xD;&#xA;My repo's docker-compose file:&#xD;&#xA;```&#xD;&#xA;  collator:&#xD;&#xA;    container_name: collator&#xD;&#xA;    image: pnetwork/collator&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30343:30343&quot;&#xD;&#xA;      - &quot;40333:40333&quot;&#xD;&#xA;      - &quot;6969:6969&quot;&#xD;&#xA;      - &quot;8844:8844&quot;&#xD;&#xA;      - &quot;9977:9977&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/parachain-collator --alice --collator --force-authoring --chain rococo-local --unsafe-ws-external --parachain-id 2000 --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe --base-path /tmp/parachain/alice --port 40333 --ws-port 8844 --rpc-port 6969 --rpc-cors all -- --execution wasm --chain res/dev/rococo-custom-2-raw.json --port 30343 --ws-port 9977 &gt; collator.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;    depends_on:&#xD;&#xA;      - charlie-relay&#xD;&#xA;  alice-relay:&#xD;&#xA;    container_name: alice-relay&#xD;&#xA;    image: pnetwork/relay&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;30333:30333&quot;&#xD;&#xA;      - &quot;9944:9944&quot;&#xD;&#xA;    command: bash -c &quot;apt-get install -y wget; nohup ./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain rococo-custom-2-raw.json --port 30333 --ws-port 9944 --unsafe-ws-external --rpc-cors all --rpc-external --allow-private-ipv4 --discover-local --rpc-methods Unsafe &gt; alice.out 2&gt;&amp;1; tail -f /dev/null&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My Dockerfile.base:&#xD;&#xA;```&#xD;&#xA;FROM debian:latest&#xD;&#xA;RUN apt update &amp;&amp; apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential&#xD;&#xA;RUN curl https://sh.rustup.rs -sSf &gt;&gt; install-rust.sh&#xD;&#xA;RUN chmod u+x install-rust.sh&#xD;&#xA;RUN ./install-rust.sh -y&#xD;&#xA;RUN PATH=$PATH:$HOME/.cargo/env&#xD;&#xA;SHELL [&quot;bash&quot;, &quot;-lc&quot;]&#xD;&#xA;RUN rustup update&#xD;&#xA;RUN rustup update nightly&#xD;&#xA;RUN rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;&#xD;&#xA;CMD [ &quot;tail&quot;, &quot;-f&quot;, &quot;/dev/null&quot; ]&#xD;&#xA;```&#xD;&#xA;And my Dockerfile:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/p-network-202104/rust as builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;&#xD;&#xA;COPY . .&#xD;&#xA;&#xD;&#xA;RUN . $HOME/.cargo/env &amp;&amp; cargo build --${PROFILE}&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there any argument missing in my Zombienet network definition file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11066" PostHistoryTypeId="5" PostId="2729" RevisionGUID="a6e61261-e59c-4c90-a5a8-981d3f28c0e5" CreationDate="2022-05-30T12:12:14.780" UserId="1789" Comment="deleted 27 characters in body" Text="Previously, I have already made a Rust docker image:&#xD;&#xA;```&#xD;&#xA;FROM debian:latest&#xD;&#xA;RUN apt update &amp;&amp; apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential&#xD;&#xA;RUN curl https://sh.rustup.rs -sSf &gt;&gt; install-rust.sh&#xD;&#xA;RUN chmod u+x install-rust.sh&#xD;&#xA;RUN ./install-rust.sh -y&#xD;&#xA;RUN PATH=$PATH:$HOME/.cargo/env&#xD;&#xA;SHELL [&quot;bash&quot;, &quot;-lc&quot;]&#xD;&#xA;RUN rustup update&#xD;&#xA;RUN rustup update nightly&#xD;&#xA;RUN rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;&#xD;&#xA;CMD [ &quot;tail&quot;, &quot;-f&quot;, &quot;/dev/null&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I cloned Substrate-Parachain-Template repo: https://github.com/substrate-developer-hub/substrate-parachain-template and checked out its polkadot-v0.9.18 branch,&#xD;&#xA;&#xD;&#xA;Then after adding my own Dockerfile.template in the cloned repo above:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/p-network-202104/rust:1.60.0 as builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;#older rust made collator:v4&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;&#xD;&#xA;COPY . .&#xD;&#xA;&#xD;&#xA;RUN . $HOME/.cargo/env &amp;&amp; cargo build --${PROFILE}&#xD;&#xA;&#xD;&#xA;# here I made a mistake copying files from an incorrect path so the docker build process was stopped here&#xD;&#xA;# the resulted local docker image was built up to here... &#xD;&#xA;# That is okay because I tagged it to be used in other docker files below...&#xD;&#xA;# but I should add the EXPOSE and CMD commands below for a normal scenario&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;Also with a .dockerignore file below...&#xD;&#xA;&#xD;&#xA;**[Notice]** I added `target` folder below into the original .dockerignore file from the repo because this can avoid `Sending build context to Docker daemon` sending huge size context data!&#xD;&#xA;```&#xD;&#xA;.git&#xD;&#xA;target&#xD;&#xA;**/target/&#xD;&#xA;**/*.txt&#xD;&#xA;**/*.md&#xD;&#xA;/docker/&#xD;&#xA;!/target/release/polkadot-collator&#xD;&#xA;&#xD;&#xA;# dotfiles in the repo root&#xD;&#xA;/.*&#xD;&#xA;```&#xD;&#xA;Then I built template:v1 docker image:&#xD;&#xA;`docker build -f Dockerfile.template -t gcr.io/p-network-202104/template:v1 .`&#xD;&#xA;&#xD;&#xA;because this template:v1 image is huge(11.3GB), it is okay to use it locally without pushing it to the cloud.&#xD;&#xA;&#xD;&#xA;My third and final docker image should be slim:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/p-network-202104/template:v1 as builder&#xD;&#xA;&#xD;&#xA;FROM debian:latest&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slimHi @pepoviola, I logged into that image then ran&#xD;&#xA;&#xD;&#xA;root@23006a9e7a5d:/# /target/release/parachain-collator&#xD;&#xA;Error: Input(&quot;Relay chain argument error: Invalid input: `rococo-local` only supported with `rococo-native` feature enabled.&quot;)&#xD;&#xA;2022-05-19 11:31:21 Parachain Collator Template&#xD;&#xA;2022-05-19 11:31:21 ✌️  version 0.1.0-unknown-x86_64-linux-gnu&#xD;&#xA;2022-05-19 11:31:21 ❤️  by Anonymous, 2020-2022&#xD;&#xA;2022-05-19 11:31:21  Chain specification: Local Testnet&#xD;&#xA;2022-05-19 11:31:21   Node name: hypnotic-glue-7138&#xD;&#xA;2022-05-19 11:31:21  Role: FULL&#xD;&#xA;2022-05-19 11:31:21  Database: RocksDb at /root/.local/share/parachain-collator/chains/local_testnet/db/full&#xD;&#xA;2022-05-19 11:31:21 ⛓  Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)&#xD;&#xA;2022-05-19 11:31:21 assembling new collators for new session 0 at #0&#xD;&#xA;2022-05-19 11:31:21 assembling new collators for new session 1 at #0&#xD;&#xA;root@23006a9e7a5d:/# ls&#xD;&#xA;&#xD;&#xA;# v1&#xD;&#xA;# compiled binaries are in ./builds/collator&#xD;&#xA;COPY --from=builder ./builds/collator/target/release/parachain-collator ./target/release/&#xD;&#xA;&#xD;&#xA;COPY ./polkadot-launch ./polkadot-launch&#xD;&#xA;RUN ls&#xD;&#xA;&#xD;&#xA;EXPOSE 40333-40335 8844-8848 6965-6969 30343-30345 9977-9979 30333 9933 9944&#xD;&#xA;&#xD;&#xA;# TODO: Make this run the CMD used in the docker-compose-collator.yaml&#xD;&#xA;CMD tail -f /dev/null&#xD;&#xA;```&#xD;&#xA;then I built it: `docker build -f Dockerfile.slim -t gcr.io/p-network-202104/template:slim1 .`&#xD;&#xA;&#xD;&#xA;and pushed the new template:slim1 image to the cloud.&#xD;&#xA;&#xD;&#xA;Now I am ready for Zombienet...&#xD;&#xA;&#xD;&#xA;This Substrate-Parachain-Template uses Cumulus, so I set:&#xD;&#xA;`cumulus_based = true` in my network definition file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:v0.9.18&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;gcr.io/p-network-202104/template:slim1&quot;&#xD;&#xA;  command = &quot;target/release/parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;With the test file:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z04-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# to run this file: ./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;# logs&#xD;&#xA;bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds&#xD;&#xA;bob: log line matches &quot;Imported new block.&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;#alice: parachain 2000 block height is at least 10 within 250 seconds&#xD;&#xA;&#xD;&#xA;# Tracing&#xD;&#xA;# alice: trace with traceID 94c1501a78a0d83c498cc92deec264d9 contains [&quot;answer-chunk-request&quot;, &quot;answer-chunk-request&quot;]&#xD;&#xA;&#xD;&#xA;# metrics&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;&#xD;&#xA;# histogram&#xD;&#xA;#alice: reports histogram polkadot_pvf_execution_time has at least 2 samples in buckets [&quot;0.1&quot;, &quot;0.25&quot;, &quot;0.5&quot;, &quot;+Inf&quot;] within 100 seconds&#xD;&#xA;&#xD;&#xA;# system events&#xD;&#xA;bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With the latest zombienet-linux v1.2.34, I ran it: `./zombienet-linux -p kubernetes test zombienet/z04-small-network.feature`&#xD;&#xA;&#xD;&#xA;The result:&#xD;&#xA;```&#xD;&#xA;  small network( Small Network test )&#xD;&#xA;runningNetworkSpecPath undefined&#xD;&#xA;	 Launching network... this can take a while.&#xD;&#xA;&#xD;&#xA;	 Using provider: kubernetes&#xD;&#xA;&#xD;&#xA;	 Launching network under namespace: zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;		 Using temporary directory: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt&#xD;&#xA;&#xD;&#xA;	launching temp pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain rococo-local --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp pod is ready!&#xD;&#xA;&#xD;&#xA;		 Starting with a fresh authority set...&#xD;&#xA;			   Added Genesis Authority alice - 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;			   Added Genesis Authority bob - 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&#xD;&#xA;&#xD;&#xA;	launching temp-1 pod with image gcr.io/p-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec  --disable-default-bootnode &gt; /cfg/rococo-local-plain.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;		temp-1 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-2 pod with image gcr.io/p-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator build-spec --chain /cfg/rococo-local-2000-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-2000-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000-plain.json as:cdf720a7997f3f77d6e2509edff0820ba3af8eafaf59de281eabe9aa79e5dfac&#xD;&#xA;		temp-2 pod is ready!&#xD;&#xA;&#xD;&#xA;	launching temp-collator pod with image gcr.io/p-network-202104/template:slim1&#xD;&#xA;		 with command: bash -c target/release/parachain-collator export-genesis-state --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-state &amp;&amp; target/release/parachain-collator export-genesis-wasm --chain /cfg/rococo-local-2000.json &gt; /cfg/genesis-wasm &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json as:60698b4418761572cdb18c86cbd4ea87fe643ba8e77ffc38965b822f5c50d952&#xD;&#xA;		temp-collator pod is ready!&#xD;&#xA;&#xD;&#xA;		  ✓ Added Genesis Parachain 2000&#xD;&#xA;&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-plain.json as:00de39b17f790e9209b5ca034e123711974a556cad8b2519269e00965b5ceb8c&#xD;&#xA;		temp-3 pod is ready!&#xD;&#xA;&#xD;&#xA;		 Chain name: Rococo Local Testnet&#xD;&#xA;&#xD;&#xA;		 ⚙ Clear Boot Nodes&#xD;&#xA;&#xD;&#xA;	launching alice pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local.json as:74e1ac30e59861832272c2925e9d22c7bb63f47ae10e8010d8bd3b59e24996ce&#xD;&#xA;uploading to fileserver: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/zombie-wrapper.sh as:80d9cdcda7802f9a0fbab8739bf5ab65556f4d6606dd81606529f8b3dc141768&#xD;&#xA;		alice pod is ready!&#xD;&#xA;	alice running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f alice -c alice -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;&#xD;&#xA;	launching bob pod with image docker.io/parity/polkadot:v0.9.18&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh polkadot --chain /cfg/rococo-local.json --name bob --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lparachain=debug --no-mdns --node-key 81b637d8fcd2c6da6359e6963113a1170de795e4b725b84d1e0b4cfd9ec58ce9 --no-telemetry --prometheus-external --jaeger-agent localhost:6831 --validator --bootnodes /ip4/172.17.0.6/tcp/30333/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm --listen-addr /ip4/0.0.0.0/tcp/30333/ws --base-path /data&#xD;&#xA;		bob pod is ready!&#xD;&#xA;	bob running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f bob -c bob -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;	 All relay chain nodes spawned...&#xD;&#xA;&#xD;&#xA;	launching collator01 pod with image gcr.io/p-network-202104/template:slim1&#xD;&#xA;		 with command: /cfg/zombie-wrapper.sh target/release/parachain-collator --name collator01 --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --chain /cfg/rococo-local-2000.json --base-path /data --listen-addr /ip4/0.0.0.0/tcp/37663/ws --ws-port 39025 --prometheus-external --prometheus-port 44123 --alice --collator --force-authoring --jaeger-agent localhost:6831 -- --chain /cfg/rococo-local.json --execution wasm --port 45187 --ws-port 44467 --rpc-port 40445&#xD;&#xA;		collator01 pod is ready!&#xD;&#xA;	collator01 running&#xD;&#xA;&#xD;&#xA;		 You can follow the logs of the node by running this command: &#xD;&#xA;&#xD;&#xA;			 kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7&#xD;&#xA;&#xD;&#xA;		 ⚙ Added Boot Nodes:  /ip4/172.17.0.8/tcp/30333/ws/p2p/12D3KooWAieokPB4zt3dJJokhVZw8KoQuTgXEEyempJtr6pGkhrd&#xD;&#xA;&#xD;&#xA;	 Warn: Tracing collator service doesn't exist&#xD;&#xA;&#xD;&#xA;---------------------------------------https://docs.docker.com/engine/reference/builder/#expose--&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Network launched &#xD;&#xA;&#xD;&#xA;		 In namespace zombie-c1812f6eb712223f7cdb3e97384732a7 with kubernetes provider&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: alice&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A38615#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:46855/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: bob&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A36869#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:34721/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	 Parachain ID: 2000&#xD;&#xA;&#xD;&#xA;	 Parachain chainSpecPath path: /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/rococo-local-2000.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		 Node name: collator01&#xD;&#xA;&#xD;&#xA;		 Node direct link: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer&#xD;&#xA;&#xD;&#xA;		 Node prometheus link: http://127.0.0.1:41975/metrics&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;    ✔ alice: is up (66ms)&#xD;&#xA;    ✔ bob: is up&#xD;&#xA;2022-05-19 15:02:07        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2702ms)&#xD;&#xA;    ✔ bob: log line matches glob &quot;*rted #1*&quot; within 10 seconds (69ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported #[0-9]+&quot; within 10 seconds (64ms)&#xD;&#xA;    ✔ bob: log line matches &quot;Imported new block.&quot; within 10 seconds (60ms)&#xD;&#xA;&#xD;&#xA;	 Error:  &#xD;&#xA;		 Timeout(150), &quot;getting desired parachain block height 6 within 150 secs&quot;.&#xD;&#xA;&#xD;&#xA;    1) alice: parachain 2000 block height is at least 6 within 150 seconds&#xD;&#xA;    ✔ alice: reports node_roles is 4&#xD;&#xA;    ✔ alice: reports sub_libp2p_is_major_syncing is 0&#xD;&#xA;2022-05-19 15:04:40        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    2) bob: system event contains &quot;A candidate was included&quot; within 20 seconds&#xD;&#xA;2022-05-19 15:05:01        API/INIT: RPC methods not decorated: beefy_getFinalizedHead&#xD;&#xA;    3) alice: system event matches glob &quot;*was backed*&quot; within 10 seconds&#xD;&#xA;&#xD;&#xA;	 Node's logs are available in /tmp/zombie-c1812f6eb712223f7cdb3e97384732a7_-188488-K4McZ572Plmt/logs&#xD;&#xA;&#xD;&#xA;	 Deleting network&#xD;&#xA;2022-05-19 15:05:11        RPC-CORE: health(): Health:: disconnected from ws://127.0.0.1:38615: 1000:: Normal connection closure&#xD;&#xA;2022-05-19 15:05:19        RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: WebSocket is not connected&#xD;&#xA;child process exited&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  8 passing (6m)&#xD;&#xA;  3 failing&#xD;&#xA;&#xD;&#xA;  1) small network( Small Network test )&#xD;&#xA;       alice: parachain 2000 block height is at least 6 within 150 seconds:&#xD;&#xA;&#xD;&#xA;      AssertionError: expected 0 to be at least 6&#xD;&#xA;      + expected - actual&#xD;&#xA;&#xD;&#xA;      -0&#xD;&#xA;      +6&#xD;&#xA;      &#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:265:37&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  2) small network( Small Network test )&#xD;&#xA;       bob: system event contains &quot;A candidate was included&quot; within 20 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;&#xD;&#xA;  3) small network( Small Network test )&#xD;&#xA;       alice: system event matches glob &quot;*was backed*&quot; within 10 seconds:&#xD;&#xA;     AssertionError: expected false to be truthy&#xD;&#xA;      at /snapshot/zombienet/dist/test-runner/index.js:367:32&#xD;&#xA;      at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;      at fulfilled (/snapshot/zombienet/dist/test-runner/index.js:24:58)&#xD;&#xA;```&#xD;&#xA;From above you can see the&#xD;&#xA;&#xD;&#xA; - relaychain alice node test: ok&#xD;&#xA; - relaychain bob node test: ok&#xD;&#xA; - parachain 2000 is registered: ok&#xD;&#xA; - 3 log tests: ok&#xD;&#xA; - parachain 2000 block height test: failed!!?? Why did that fail?&#xD;&#xA;&#xD;&#xA;I know the error 2) and 3) are caused by error 1), the block height test failure.&#xD;&#xA;&#xD;&#xA;Why was the parachain collator not producing blocks? &#xD;&#xA;&#xD;&#xA;When I checked the collator logs via `kubectl logs -f collator01 -c collator01 -n zombie-c1812f6eb712223f7cdb3e97384732a7`, the terminal returned nothing just like nothing happened!!??&#xD;&#xA;&#xD;&#xA;When clicking on the Collator Node direct link: `https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A43009#/explorer `, my browser could not connect to that collator node at all...&#xD;&#xA;&#xD;&#xA;The docker &quot;EXPOSE&quot; does not actually publish the port according to &#xD;&#xA;https://docs.docker.com/engine/reference/builder/#expose&#xD;&#xA;And adding this to the network definition file didn't work:&#xD;&#xA;```&#xD;&#xA;args = [&quot;-p 30333:30333/tcp&quot;, &quot;-p 9933:9933/tcp&quot;, &quot;-p 9944:9944/tcp&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I logged into that image via `docker run -it 2647e63e75ee /bin/bash`, then ran `/target/release/parachain-collator`, I got this error: &#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;Relay chain argument error: Invalid input: `rococo-local` only supported with `rococo-native` feature enabled.&quot;)&#xD;&#xA;```&#xD;&#xA;See the whole terminal:&#xD;&#xA;```&#xD;&#xA;root@23006a9e7a5d:/# /target/release/parachain-collator&#xD;&#xA;Error: Input('Relay chain argument error: Invalid input: &quot;rococo-local&quot; only supported with &quot;rococo-native&quot; feature enabled.')&#xD;&#xA;2022-05-19 11:31:21 Parachain Collator Template&#xD;&#xA;2022-05-19 11:31:21 ✌️  version 0.1.0-unknown-x86_64-linux-gnu&#xD;&#xA;2022-05-19 11:31:21 ❤️  by Anonymous, 2020-2022&#xD;&#xA;2022-05-19 11:31:21  Chain specification: Local Testnet&#xD;&#xA;2022-05-19 11:31:21   Node name: hypnotic-glue-7138&#xD;&#xA;2022-05-19 11:31:21  Role: FULL&#xD;&#xA;2022-05-19 11:31:21  Database: RocksDb at /root/.local/share/parachain-collator/chains/local_testnet/db/full&#xD;&#xA;2022-05-19 11:31:21 ⛓  Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)&#xD;&#xA;2022-05-19 11:31:21 assembling new collators for new session 0 at #0&#xD;&#xA;2022-05-19 11:31:21 assembling new collators for new session 1 at #0&#xD;&#xA;root@23006a9e7a5d:/#&#xD;&#xA;``` &#xD;&#xA;Please advise" ContentLicense="CC BY-SA 4.0" />
  <row Id="11067" PostHistoryTypeId="5" PostId="2954" RevisionGUID="3fc1136f-b3f4-4f98-acb8-f998ea3489a9" CreationDate="2022-05-30T12:14:08.377" UserId="1789" Comment="added 786 characters in body" Text="The Docker base file:&#xD;&#xA;```&#xD;&#xA;#debian:10-slim&#xD;&#xA;#FROM debian@sha256:6ef4731388c03b38e58ea77aef9396c216095e1843742fc7cf5038901cc1f081&#xD;&#xA;FROM --platform=linux/amd64 docker.io/library/ubuntu:20.04&#xD;&#xA;&#xD;&#xA;RUN apt update &amp;&amp; apt install -y git clang curl libssl-dev llvm libudev-dev procps vim make wget build-essential&#xD;&#xA;RUN curl https://sh.rustup.rs -sSf &gt;&gt; install-rust.sh&#xD;&#xA;RUN chmod u+x install-rust.sh&#xD;&#xA;RUN ./install-rust.sh -y&#xD;&#xA;RUN PATH=$PATH:$HOME/.cargo/env&#xD;&#xA;SHELL [&quot;bash&quot;, &quot;-lc&quot;]&#xD;&#xA;RUN rustup update&#xD;&#xA;RUN rustup update nightly&#xD;&#xA;RUN rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;&#xD;&#xA;CMD [ &quot;tail&quot;, &quot;-f&quot;, &quot;/dev/null&quot; ]&#xD;&#xA;# docker build -f zombienet/Dockerfile.base -t gcr.io/p-network-202104/rust:2004ubuntu220530 .&#xD;&#xA;# docker push gcr.io/p-network-202104/rust:2004ubuntu220530&#xD;&#xA;```&#xD;&#xA;The correct Dockerfile should look like this:&#xD;&#xA;```&#xD;&#xA;FROM gcr.io/p-network-202104/rust:2004ubuntu220530 AS builder&#xD;&#xA;ARG PROFILE=release&#xD;&#xA;&#xD;&#xA;WORKDIR /builds/collator&#xD;&#xA;COPY . /builds/collator&#xD;&#xA;&#xD;&#xA;RUN cargo build --locked --${PROFILE}&#xD;&#xA;&#xD;&#xA;# This image has to be the same as the base image for the builder above &#xD;&#xA;FROM --platform=linux/amd64 docker.io/library/ubuntu:20.04&#xD;&#xA;#debian:10-slim&#xD;&#xA;#FROM debian@sha256:6ef4731388c03b38e58ea77aef9396c216095e1843742fc7cf5038901cc1f081&#xD;&#xA;#FROM debian:stretch-slim&#xD;&#xA;#buster-slim&#xD;&#xA;&#xD;&#xA;# show backtraces&#xD;&#xA;ENV RUST_BACKTRACE 1&#xD;&#xA;&#xD;&#xA;# install tools and dependencies&#xD;&#xA;RUN apt-get update &amp;&amp; \&#xD;&#xA;  DEBIAN_FRONTEND=noninteractive apt-get install -y \&#xD;&#xA;  libssl1.1 \&#xD;&#xA;  ca-certificates &amp;&amp; \&#xD;&#xA;  # apt cleanup&#xD;&#xA;  apt-get autoremove -y &amp;&amp; \&#xD;&#xA;  apt-get clean &amp;&amp; \&#xD;&#xA;  find /var/lib/apt/lists/ -type f -not -name lock -delete; \&#xD;&#xA;  # add user and link ~/.local/share/polkadot to /data&#xD;&#xA;  useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot &amp;&amp; \&#xD;&#xA;  mkdir -p /data /polkadot/.local/share &amp;&amp; \&#xD;&#xA;  chown -R polkadot:polkadot /data &amp;&amp; \&#xD;&#xA;  ln -s /data /polkadot/.local/share/polkadot&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;COPY --from=builder /builds/collator/target/release/parachain-collator /usr/local/bin&#xD;&#xA;&#xD;&#xA;USER polkadot&#xD;&#xA;&#xD;&#xA;# check if executable works in this container&#xD;&#xA;RUN /usr/local/bin/parachain-collator --version&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944 9615&#xD;&#xA;VOLUME [&quot;/polkadot&quot;]&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/parachain-collator&quot;]&#xD;&#xA;# docker build -f zombienet/Dockerfile -t gcr.io/p-network-202104/collator:v6 .&#xD;&#xA;# docker push gcr.io/p-network-202104/collator:v6&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11073" PostHistoryTypeId="5" PostId="2952" RevisionGUID="13d89de4-e0b2-4350-8604-e5b98ceed103" CreationDate="2022-05-30T12:48:52.427" UserId="1959" Comment="added 20 characters in body; edited title" Text="```rust&#xD;&#xA;let message_call = call.take_decoded().map_err(|_| XcmError::FailedToDecode)?;&#xD;&#xA;```&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/xcm/xcm-executor/src/lib.rs#L342&#xD;&#xA;&#xD;&#xA;I got this code above and tried to find the specific decoding code but failed.&#xD;&#xA;&#xD;&#xA;So what is the specific decoding process? How does the **encoded transaction** in `Transact` turn into decoded transaction `call`?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11074" PostHistoryTypeId="4" PostId="2952" RevisionGUID="13d89de4-e0b2-4350-8604-e5b98ceed103" CreationDate="2022-05-30T12:48:52.427" UserId="1959" Comment="added 20 characters in body; edited title" Text="How does the encoded transaction in `Transact` turn into decoded transaction `call` when executing instructions in XCM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11075" PostHistoryTypeId="2" PostId="2959" RevisionGUID="52a883e5-e24b-4dc6-ac53-8a43968efbef" CreationDate="2022-05-30T13:22:43.790" UserId="1970" Text="As others have commented, you seem to be looking at 2 different results. &#xD;&#xA;&#xD;&#xA;On the error - this generally happens when you don't specify enough weight on the runtime upgrade, i.e. `setCode` transaction. There are actually a couple of existing questions that deal with this: &#xD;&#xA;&#xD;&#xA; - [setting the weight programatically](https://substrate.stackexchange.com/questions/1253/how-to-provide-unchecked-weight-to-a-call-using-polkadot-js/1324#1324) and &#xD;&#xA; - [setting the weight via the&#xD;&#xA;   UI](https://substrate.stackexchange.com/questions/1639/upgrade-rococo-fork-error-would-exhaust-block-limits-no-pallet-scheduler/1640#1640) (unchecked sudo checkbox)&#xD;&#xA;&#xD;&#xA;Doing either of these will get around the error message." ContentLicense="CC BY-SA 4.0" />
  <row Id="11077" PostHistoryTypeId="2" PostId="2960" RevisionGUID="18e3951d-04d5-4de1-ac0d-6b9619fc1353" CreationDate="2022-05-30T13:26:59.743" UserId="1970" Text="Making a PR will certainly help others in the same position, we were actually discussing it this week. It seems like it would be possible since you only need to pass the payload to the Ledger to get it signed. The payload generation is already in the Python interface. &#xD;&#xA;&#xD;&#xA;The harder bits would be to communicate with the Ledger itself. (Although this should be standard, so if done somewhere in the wiser blockchain space already, it should be adaptable)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11079" PostHistoryTypeId="2" PostId="2961" RevisionGUID="7677b24e-a7bd-4d1f-bc89-238d56648b21" CreationDate="2022-05-30T13:31:31.190" UserId="2163" Text="Is there a way to send XCM messages from ink! contract?&#xD;&#xA;&#xD;&#xA;If it is not possible, what are the other options for sending XCM messages(I suppose you can send XCM messages from a substrate pallet but is there another way)? " ContentLicense="CC BY-SA 4.0" />
  <row Id="11081" PostHistoryTypeId="1" PostId="2961" RevisionGUID="7677b24e-a7bd-4d1f-bc89-238d56648b21" CreationDate="2022-05-30T13:31:31.190" UserId="2163" Text="Sending XCM messages" ContentLicense="CC BY-SA 4.0" />
  <row Id="11082" PostHistoryTypeId="3" PostId="2961" RevisionGUID="7677b24e-a7bd-4d1f-bc89-238d56648b21" CreationDate="2022-05-30T13:31:31.190" UserId="2163" Text="|ink|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11083" PostHistoryTypeId="2" PostId="2962" RevisionGUID="9866dfbc-4671-45c1-bd33-82d3cdc019d0" CreationDate="2022-05-30T14:05:28.513" UserId="275" Text="I had the same situation above.&#xD;&#xA;After specify indirect dependencies' version declaratively, I succeded to compile and deploy contracts to node with pallet-contracts polkadot-v0.9.19.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please try to use as dependencies&#xD;&#xA;&#xD;&#xA;    ink_lang_codegen = { version = &quot;=3.0.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;I don't know exactly why and what was the breaking change." ContentLicense="CC BY-SA 4.0" />
  <row Id="11085" PostHistoryTypeId="5" PostId="2962" RevisionGUID="0088f55c-08e7-463d-92b4-f39c03e08e92" CreationDate="2022-05-30T14:07:14.347" UserId="275" Comment="added 92 characters in body" Text="I had the same situation above.&#xD;&#xA;After specify indirect dependencies' version declaratively, I succeded to compile and deploy contracts to the local node with pallet-contracts polkadot-v0.9.19 support.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please try to add below to Cargo.toml dependencies section.&#xD;&#xA;&#xD;&#xA;    ink_lang_codegen = { version = &quot;=3.0.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;I don't know exactly why and what was the breaking change. I'd like to know if someone knows it in detail." ContentLicense="CC BY-SA 4.0" />
  <row Id="11086" PostHistoryTypeId="2" PostId="2963" RevisionGUID="c1613fc0-ca71-4671-83e7-98a7b0cdb2ea" CreationDate="2022-05-30T14:47:17.527" UserId="2635" Text="I would like to determine the number of blocks produced in a given era index. &#xD;&#xA;&#xD;&#xA;In polkadot.app there is a query to get reward points in an era:&#xD;&#xA;&#xD;&#xA;Staking Query: erasRewardsPoints(EraIndex).&#xD;&#xA;&#xD;&#xA;How can I determine the number of blocks produced in one specific Era? Is there any query for that? If not, if I traverse the blocks, is the Era index included in the block data? I can not find it.&#xD;&#xA;&#xD;&#xA;Thanks very much.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/63cnz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11088" PostHistoryTypeId="1" PostId="2963" RevisionGUID="c1613fc0-ca71-4671-83e7-98a7b0cdb2ea" CreationDate="2022-05-30T14:47:17.527" UserId="2635" Text="Substrate - Get the blocks (or # of blocks) produced in a given era" ContentLicense="CC BY-SA 4.0" />
  <row Id="11089" PostHistoryTypeId="3" PostId="2963" RevisionGUID="c1613fc0-ca71-4671-83e7-98a7b0cdb2ea" CreationDate="2022-05-30T14:47:17.527" UserId="2635" Text="|substrate-node|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11090" PostHistoryTypeId="2" PostId="2964" RevisionGUID="07b546a2-0f7b-4f29-be79-419c93c11628" CreationDate="2022-05-30T14:51:50.217" UserId="48" Text="You can use [ink! extension](https://ink.substrate.io/macros-attributes/chain-extension/) to call any pallet, which itself can send XCM messages.  &#xD;&#xA;You can have a look at [these pallets](https://github.com/LaurentTrk/sublink-pallets) as an example, but please be aware that this is just a crappy hackathon code :)  " ContentLicense="CC BY-SA 4.0" />
  <row Id="11092" PostHistoryTypeId="2" PostId="2965" RevisionGUID="af6e15bf-e103-46f4-bef0-2d8442c39b69" CreationDate="2022-05-30T15:33:44.463" UserId="620" Text="&gt; If not, if I traverse the blocks, is the Era index included in the block data?&#xD;&#xA;&#xD;&#xA;Right, the era is not in the block data itself, so you'd have to fetch each block. At the end of each era, `end_era` gets called and [emits an `EraPaid` event](https://github.com/paritytech/substrate/blob/c8653447fc8ef8d95a92fe164c96dffb37919e85/frame/staking/src/pallet/impls.rs#L388). You can use this as the boundary between eras, and if you check the block height of the event for era `N` against `N - 1` then you get the number of blocks in era `N`." ContentLicense="CC BY-SA 4.0" />
  <row Id="11094" PostHistoryTypeId="5" PostId="2962" RevisionGUID="166543df-db8e-4e33-b311-6f05699e1e15" CreationDate="2022-05-30T16:11:20.350" UserId="275" Comment="added 32 characters in body" Text="I had the same situation above.&#xD;&#xA;After specify indirect dependencies' version declaratively, I succeded to compile and deploy contracts to the local node with pallet-contracts polkadot-v0.9.19 support.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please try to add below to Cargo.toml dependencies section.&#xD;&#xA;&#xD;&#xA;    ink_lang_codegen = { version = &quot;=3.0.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;I don't know exactly why and what was the breaking change. I'd like to know if someone knows it in detail. and other potential workarounds." ContentLicense="CC BY-SA 4.0" />
  <row Id="11095" PostHistoryTypeId="2" PostId="2966" RevisionGUID="54cecf5d-dda4-4776-b611-db47e6ffbccc" CreationDate="2022-05-30T17:05:33.377" UserId="450" Text="I'm using redspot for integration tests. I have some contracts features involving with block timestamp. How can I manipulate the block timestamp in `substrate-contracts-node`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11097" PostHistoryTypeId="1" PostId="2966" RevisionGUID="54cecf5d-dda4-4776-b611-db47e6ffbccc" CreationDate="2022-05-30T17:05:33.377" UserId="450" Text="Manipulate block timestamp for integration tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11098" PostHistoryTypeId="3" PostId="2966" RevisionGUID="54cecf5d-dda4-4776-b611-db47e6ffbccc" CreationDate="2022-05-30T17:05:33.377" UserId="450" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11099" PostHistoryTypeId="2" PostId="2967" RevisionGUID="fd529886-2a4e-47b4-861c-31c319ada323" CreationDate="2022-05-30T17:28:33.537" UserId="2636" Text="https://substrate.stackexchange.com/questions/2380/problem-compiling-substrate-node-in-wsl-windows&#xD;&#xA;&#xD;&#xA;Following solved the issue.&#xD;&#xA;&#xD;&#xA;Was missing wasm32 as installation target." ContentLicense="CC BY-SA 4.0" />
  <row Id="11102" PostHistoryTypeId="2" PostId="2968" RevisionGUID="110b2214-293e-42bf-9afb-64ecf2a2378e" CreationDate="2022-05-30T17:44:20.073" UserId="246" Text="Is there a way to know whether the node you are querying is a full or an archive node? For example, assume you want to query the chain state at block 1000 for analytical purposes, to do this you need an archive node rather than a full node.  &#xD;&#xA;&#xD;&#xA;One differentiating characteristic I can see is [database size](https://paranodes.io/DBSize). But I am unsure of a practical way to do this when writing code to query the chain state at a particular block. " ContentLicense="CC BY-SA 4.0" />
  <row Id="11104" PostHistoryTypeId="1" PostId="2968" RevisionGUID="110b2214-293e-42bf-9afb-64ecf2a2378e" CreationDate="2022-05-30T17:44:20.073" UserId="246" Text="How to differentiate between a full node and an archive node while querying chain state?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11105" PostHistoryTypeId="3" PostId="2968" RevisionGUID="110b2214-293e-42bf-9afb-64ecf2a2378e" CreationDate="2022-05-30T17:44:20.073" UserId="246" Text="|storage|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11106" PostHistoryTypeId="52" PostId="2951" RevisionGUID="014adfee-d736-4bf8-ae85-1d40010fee95" CreationDate="2022-05-30T18:58:32.933" />
  <row Id="11107" PostHistoryTypeId="52" PostId="2952" RevisionGUID="684ff68c-dfc3-42a4-afc4-d9a373c0836d" CreationDate="2022-05-30T18:58:55.920" />
  <row Id="11108" PostHistoryTypeId="2" PostId="2969" RevisionGUID="f215883e-a11d-4308-a00b-c8b82b9a4d1c" CreationDate="2022-05-30T19:52:44.567" UserId="380" Text="You can't do this via an existing method as none exists.&#xD;&#xA;&#xD;&#xA;The [test environment increases the block timestamp by a known amount each block](https://github.com/paritytech/ink/blob/34bd952e3a632f26d7c946e537c3947e2327b3fc/crates/engine/src/test_api.rs#L223-L227):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    /// Advances the chain by a single block.&#xD;&#xA;    pub fn advance_block(&amp;mut self) {&#xD;&#xA;        self.exec_context.block_number += 1;&#xD;&#xA;        self.exec_context.block_timestamp += self.chain_spec.block_time;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This means you will be able to determine the `block_timestamp` if you know the number of blocks that have passed. The `substrate-contracts-node` does not auto produce blocks in its default setup. It only produces blocks when it receives a transaction (this is known as [instant seal](https://substrate.stackexchange.com/a/1830/380)). Therefore, if you begin your test at block `X` and you have issued `5` transactions by the end of your test, the `block_timtestamp` could be calculated by something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;block_timestamp_end = block_timestamp_start + 5 * chain_spec.block_time&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Block timestamp could therefore be manipulated to a known value using the same process." ContentLicense="CC BY-SA 4.0" />
  <row Id="11110" PostHistoryTypeId="5" PostId="2969" RevisionGUID="aee8de18-6c59-4f64-853e-6073a1266cb1" CreationDate="2022-05-30T19:58:17.160" UserId="380" Comment="added 37 characters in body" Text="You can't do this via an existing method as none exists.&#xD;&#xA;&#xD;&#xA;The [test environment increases the block timestamp by a known amount each block](https://github.com/paritytech/ink/blob/34bd952e3a632f26d7c946e537c3947e2327b3fc/crates/engine/src/test_api.rs#L223-L227):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    /// Advances the chain by a single block.&#xD;&#xA;    pub fn advance_block(&amp;mut self) {&#xD;&#xA;        self.exec_context.block_number += 1;&#xD;&#xA;        self.exec_context.block_timestamp += self.chain_spec.block_time;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This means you will be able to determine the `block_timestamp` if you know the number of blocks that have passed. The `substrate-contracts-node` does not auto produce blocks in its default setup. It only produces blocks when it receives a transaction (this is known as [instant seal](https://substrate.stackexchange.com/a/1830/380)). Therefore, if you begin your test at block `X` at `block_timestamp_start` and you have issued `5` transactions by the end of your test, the `block_timtestamp_end` could be calculated by something similar to this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;block_timestamp_end = block_timestamp_start + 5 * chain_spec.block_time&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Block timestamp could therefore be manipulated to a known value using the same process." ContentLicense="CC BY-SA 4.0" />
  <row Id="11111" PostHistoryTypeId="52" PostId="2963" RevisionGUID="5dfb8de6-a815-4bc8-8515-c72e01c4f2f4" CreationDate="2022-05-30T22:47:23.140" />
  <row Id="11112" PostHistoryTypeId="2" PostId="2970" RevisionGUID="940a8faf-228c-404b-b71f-fc2894caf7be" CreationDate="2022-05-30T23:26:03.880" UserId="2665" Text="I have created my parathread [here][1], it is number 3020. It doesn't have a link or name to click to the right of it like the ones at the top do. Clicking those brings me to the page where I can interact with the parathread and call extrinsic functions. How do I do that for my parathread?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains/parathreads" ContentLicense="CC BY-SA 4.0" />
  <row Id="11114" PostHistoryTypeId="1" PostId="2970" RevisionGUID="940a8faf-228c-404b-b71f-fc2894caf7be" CreationDate="2022-05-30T23:26:03.880" UserId="2665" Text="How do I access my parathread?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11115" PostHistoryTypeId="3" PostId="2970" RevisionGUID="940a8faf-228c-404b-b71f-fc2894caf7be" CreationDate="2022-05-30T23:26:03.880" UserId="2665" Text="|substrate-node|polkadot-js|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11116" PostHistoryTypeId="2" PostId="2971" RevisionGUID="400141a8-2146-4673-b88a-59b7666fd524" CreationDate="2022-05-30T23:32:34.767" UserId="14" Text="You have to switch to you parathread's collator websocket endpoint (upper left menu), if it is running on your local machine, maybe that endpoint is (`127.0.0.1:9944`):&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YrLJT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11118" PostHistoryTypeId="2" PostId="2972" RevisionGUID="0611283d-8be0-43b0-8e10-553a65a815c7" CreationDate="2022-05-31T02:38:18.123" UserId="34" Text="You must register for a Rococo temporary slot, described here: https://docs.substrate.io/how-to-guides/v3/parachains/rococo/&#xD;&#xA;&#xD;&#xA;This requires a request here:&#xD;&#xA;https://github.com/paritytech/subport/issues/new?assignees=&amp;labels=Rococo&amp;template=rococo.yaml&#xD;&#xA;Then wait for the sudo holder (presently the support team at parity) to get you into the slot rotation. &#xD;&#xA;&#xD;&#xA;More details and explanation of Rococo operations are here: https://www.youtube.com/watch?v=Pa12WrFkltc" ContentLicense="CC BY-SA 4.0" />
  <row Id="11120" PostHistoryTypeId="6" PostId="2970" RevisionGUID="e1dabb72-26b4-4bd8-835c-155feb1e974e" CreationDate="2022-05-31T02:40:33.557" UserId="34" Comment="edited tags" Text="|polkadot-js|rococo|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11121" PostHistoryTypeId="5" PostId="2970" RevisionGUID="e1dabb72-26b4-4bd8-835c-155feb1e974e" CreationDate="2022-05-31T02:40:33.557" UserId="34" Comment="edited tags" Text="I have created a parathread on Rococo [here][1], it is number 3020. It doesn't have a link or name to click to the right of it like the ones at the top do. Clicking those brings me to the page where I can interact with the parathread and call extrinsic functions. How do I do that for my parathread?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains/parathreads" ContentLicense="CC BY-SA 4.0" />
  <row Id="11124" PostHistoryTypeId="11" PostId="1356" RevisionGUID="06acce74-8395-4cb2-9013-aed7be91fdfe" CreationDate="2022-05-31T02:46:50.820" UserId="34" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="11125" PostHistoryTypeId="2" PostId="2973" RevisionGUID="4deabbd7-ee6d-463e-a890-76d0d17a53f8" CreationDate="2022-05-31T03:10:25.033" UserId="2600" Text="Blockchain syncing mode. [default: full] [possible values: **full, fast, fast-unsafe,warp**]&#xD;&#xA;&#xD;&#xA;What is the difference between these four attribute values?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11127" PostHistoryTypeId="1" PostId="2973" RevisionGUID="4deabbd7-ee6d-463e-a890-76d0d17a53f8" CreationDate="2022-05-31T03:10:25.033" UserId="2600" Text="What is the difference between the four attribute values between full, fast, fast-unsafe,warp for --sync?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11128" PostHistoryTypeId="3" PostId="2973" RevisionGUID="4deabbd7-ee6d-463e-a890-76d0d17a53f8" CreationDate="2022-05-31T03:10:25.033" UserId="2600" Text="|polkadot|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11129" PostHistoryTypeId="5" PostId="2973" RevisionGUID="c4deaff3-01a6-4147-917a-f25fcfbd0db1" CreationDate="2022-05-31T03:19:53.593" UserId="2600" Comment="added 39 characters in body" Text="polkadot network sync mode: --sync &#xD;&#xA;&#xD;&#xA;Blockchain syncing mode. [default: full] [possible values: **full, fast, fast-unsafe,warp**]&#xD;&#xA;&#xD;&#xA;What is the difference between these four attribute values?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11130" PostHistoryTypeId="5" PostId="2973" RevisionGUID="703adc64-f004-40dc-a6c6-416144490426" CreationDate="2022-05-31T03:20:09.997" UserId="2600" Comment="added 2 characters in body" Text="polkadot network sync mode: `--sync `&#xD;&#xA;&#xD;&#xA;Blockchain syncing mode. [default: full] [possible values: **full, fast, fast-unsafe,warp**]&#xD;&#xA;&#xD;&#xA;What is the difference between these four attribute values?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11131" PostHistoryTypeId="2" PostId="2974" RevisionGUID="f2279098-8ea8-4798-8b28-f04166628964" CreationDate="2022-05-31T03:23:38.297" UserId="2668" Text="I haven't found the custom type JSON file on GitHub,  where can I download it&#xD;&#xA;&#xD;&#xA;&gt; " ContentLicense="CC BY-SA 4.0" />
  <row Id="11133" PostHistoryTypeId="1" PostId="2974" RevisionGUID="f2279098-8ea8-4798-8b28-f04166628964" CreationDate="2022-05-31T03:23:38.297" UserId="2668" Text="help: when update the substrate 4.0 custom type json file" ContentLicense="CC BY-SA 4.0" />
  <row Id="11134" PostHistoryTypeId="3" PostId="2974" RevisionGUID="f2279098-8ea8-4798-8b28-f04166628964" CreationDate="2022-05-31T03:23:38.297" UserId="2668" Text="|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11135" PostHistoryTypeId="5" PostId="2973" RevisionGUID="335753ad-c81a-4660-8595-c33674f40262" CreationDate="2022-05-31T03:27:59.527" UserId="2600" Comment="added 69 characters in body" Text="polkadot network sync mode: `--sync `&#xD;&#xA;&#xD;&#xA;Blockchain syncing mode. [default: full] [possible values: **full, fast, fast-unsafe,warp**]&#xD;&#xA;&#xD;&#xA;1. What is the difference between these four attribute values?&#xD;&#xA;&#xD;&#xA;2. What is the difference between their synchronization speed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11136" PostHistoryTypeId="2" PostId="2975" RevisionGUID="4969e71f-f21b-4ee4-a68f-c98f941bd047" CreationDate="2022-05-31T04:20:18.680" UserId="1970" Text="With the current master Substrate versions (and all chains that are recent **), there is no need for specific type injections, nor are there any specific external type bundles.&#xD;&#xA;&#xD;&#xA;Since metadata v14 was introduced, the metadata itself exposes all the specific type definitions. this means that when any API queries the metadata, it retrieves the full information of all the call interfaces as well as a full specification of the types used in those interfaces.&#xD;&#xA;&#xD;&#xA;** Most chains have no adopted Metadata v14, this includes most of the parachains, the relay chains, etc." ContentLicense="CC BY-SA 4.0" />
  <row Id="11138" PostHistoryTypeId="2" PostId="2976" RevisionGUID="0337e932-8480-42db-8778-7513aa2e72d8" CreationDate="2022-05-31T04:22:12.290" UserId="1970" Text="I don't believe there is a specific RPC that exposes this config information as to RPC pruning state." ContentLicense="CC BY-SA 4.0" />
  <row Id="11140" PostHistoryTypeId="2" PostId="2977" RevisionGUID="6504df6d-32f4-417c-848d-9cded5ab4d28" CreationDate="2022-05-31T05:09:20.623" UserId="2669" Text="I’m currently using VSCode to develop a chain based on substrate, and wanna switch to CLion or IntelliJ IDEA, but after setting up all the required stuff on theses IDE, the inspection report me more than 90 errors in my project…&#xD;&#xA;&#xD;&#xA;Errors are mostly import errors and misc false positive rust errors.&#xD;&#xA;&#xD;&#xA;Im using cargo check as external linter.&#xD;&#xA;&#xD;&#xA;Cargo check and cargo build manually doesn’t report any errors and all is compiling with success, and I doesn’t have any of theses errors in my VSCode + Rust-analyzer setup.&#xD;&#xA;&#xD;&#xA;Does anyone had this problem ? Thanks in advance :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11142" PostHistoryTypeId="1" PostId="2977" RevisionGUID="6504df6d-32f4-417c-848d-9cded5ab4d28" CreationDate="2022-05-31T05:09:20.623" UserId="2669" Text="False positive Errors on Jetbrains IDEs" ContentLicense="CC BY-SA 4.0" />
  <row Id="11143" PostHistoryTypeId="3" PostId="2977" RevisionGUID="6504df6d-32f4-417c-848d-9cded5ab4d28" CreationDate="2022-05-31T05:09:20.623" UserId="2669" Text="|error|dev|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11144" PostHistoryTypeId="5" PostId="2975" RevisionGUID="dffbf270-672b-4b0a-93dd-b445c1288edf" CreationDate="2022-05-31T06:31:30.030" UserId="627" Comment="s/no/now/" Text="With the current master Substrate versions (and all chains that are recent **), there is no need for specific type injections, nor are there any specific external type bundles.&#xD;&#xA;&#xD;&#xA;Since metadata v14 was introduced, the metadata itself exposes all the specific type definitions. this means that when any API queries the metadata, it retrieves the full information of all the call interfaces as well as a full specification of the types used in those interfaces.&#xD;&#xA;&#xD;&#xA;** Most chains have now adopted Metadata v14, this includes most of the parachains, the relay chains, etc." ContentLicense="CC BY-SA 4.0" />
  <row Id="11145" PostHistoryTypeId="2" PostId="2978" RevisionGUID="d6bd2cc1-c7b8-4fbb-9494-f95e568f443e" CreationDate="2022-05-31T07:39:26.497" UserId="393" Text="Maybe, there are several ways to achieve this target.&#xD;&#xA;&#xD;&#xA;First, you can define a new Storage(or prefix) which we call it tmp, after you write all the data into this tmp storage, you can use `move_prefix` to rename tmp to your original storage name.&#xD;&#xA;&#xD;&#xA;Second, you can use the unhash api to do more dangerous business, ref to [unhash][1]. Use unhash, you just construct the storage key, and storage value and put_raw.&#xD;&#xA;&#xD;&#xA;As, you can see, above two approach have their own benefits and drawbacks, choose one and test seriously.&#xD;&#xA;&#xD;&#xA;At last, no matter when you want to do storage migration, make sure you have test it with try-runtime thoroughly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/frame-support/latest/frame_support/storage/unhashed/fn.put_raw.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="11147" PostHistoryTypeId="2" PostId="2979" RevisionGUID="d8519c88-5dc2-47b3-badf-ec26b43bdc2c" CreationDate="2022-05-31T08:51:58.170" UserId="83" Text="If you want nominated proof of stake (**NPoS**) for validator staking of a standalone chain then you may extend the [substrate-node-template][1] by adding these further pallets from the Substrate repository:&#xD;&#xA;&#xD;&#xA; - **pallet-staking**, **pallet-staking-reward-curve**, and **pallet-session** to configure bonding, inflation, and frequency of validator staking reward distribution to nominators&#xD;&#xA; - **pallet-treasury** to send slashed funds to&#xD;&#xA; - **pallet-collective** and **pallet-membership** so the super-majority of the council may cancel slashing&#xD;&#xA;&#xD;&#xA;If you want delegated proof of stake (**DPoS**) for collator staking of a parachain then extend the Cumulus-based [substrate-parachain-template][2], see the answer [here][3], which shows parachains that have implemented custom solutions using:&#xD;&#xA;&#xD;&#xA; - **parachain-staking** pallet that improves upon the functionality of the Cumulus **collator-selection** pallet by allowing delegation of stake to a list of collator candidates&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/2902/83" ContentLicense="CC BY-SA 4.0" />
  <row Id="11149" PostHistoryTypeId="5" PostId="2977" RevisionGUID="587c07e1-f93d-4d63-90fb-42284a967a24" CreationDate="2022-05-31T08:58:09.757" UserId="83" Comment="fix grammar" Text="I’m currently using VSCode to develop a chain based on Substrate, and want to switch to CLion or IntelliJ IDEA, but after setting up these IDEs, the inspection reports more than 90 errors in my project…&#xD;&#xA;&#xD;&#xA;Errors are mostly import errors and misc false positive rust errors.&#xD;&#xA;&#xD;&#xA;I'm using cargo check as external linter.&#xD;&#xA;&#xD;&#xA;Cargo check and cargo build manually don’t report any errors and all is compiling with success, and I don’t have any of theses errors in my VSCode + Rust-analyzer setup.&#xD;&#xA;&#xD;&#xA;Does anyone had this problem ? Thanks in advance :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11150" PostHistoryTypeId="5" PostId="2969" RevisionGUID="e750a6cd-f31d-4234-afc5-4aae492d956c" CreationDate="2022-05-31T09:15:36.273" UserId="380" Comment="added 26 characters in body" Text="You can't do this via an existing method as none exists but there is a workaround.&#xD;&#xA;&#xD;&#xA;The [test environment increases the block timestamp by a known amount each block](https://github.com/paritytech/ink/blob/34bd952e3a632f26d7c946e537c3947e2327b3fc/crates/engine/src/test_api.rs#L223-L227):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    /// Advances the chain by a single block.&#xD;&#xA;    pub fn advance_block(&amp;mut self) {&#xD;&#xA;        self.exec_context.block_number += 1;&#xD;&#xA;        self.exec_context.block_timestamp += self.chain_spec.block_time;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This means you will be able to determine the `block_timestamp` if you know the number of blocks that have passed. The `substrate-contracts-node` does not auto produce blocks in its default setup. It only produces blocks when it receives a transaction (this is known as [instant seal](https://substrate.stackexchange.com/a/1830/380)). Therefore, if you begin your test at block `X` at `block_timestamp_start` and you have issued `5` transactions by the end of your test, the `block_timtestamp_end` could be calculated by something similar to this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;block_timestamp_end = block_timestamp_start + 5 * chain_spec.block_time&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Block timestamp could therefore be manipulated to a known value using the same process." ContentLicense="CC BY-SA 4.0" />
  <row Id="11151" PostHistoryTypeId="2" PostId="2980" RevisionGUID="daef7724-f915-4011-b6a3-48e04c83fae4" CreationDate="2022-05-31T09:56:16.520" UserId="2673" Text="I'm trying to build the latest substrate node template (without any modifications so far) and I'm getting the following error:&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/home/adam/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/adam/substrate-node-template/target/release/build/node-template-runtime-ad88fbc205f4690c/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/home/adam/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.63.0-nightly (c35035cef 2022-05-30)&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;  error: could not write output to /home/adam/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/node_template_runtime.pallet_transaction_payment_rpc_runtime_api-437328d54dff4516.pallet_transaction_payment_rpc_runtime_api.abf1d522-cgu.0.rcgu.o.rcgu.o: File name too long&#xD;&#xA;&#xD;&#xA;  error: could not compile `node-template-runtime-wasm` due to previous error&#xD;&#xA;```&#xD;&#xA;**Environment:**&#xD;&#xA;```&#xD;&#xA;$ git rev-parse HEAD&#xD;&#xA;77580317443b1b66a110d2a547e4c9f8bdca4d73&#xD;&#xA;$ cargo -V&#xD;&#xA;cargo 1.61.0 (a028ae4 2022-04-29)&#xD;&#xA;$ rustc -V&#xD;&#xA;rustc 1.61.0 (fe5b13d68 2022-05-18)&#xD;&#xA;$ lsb_release -d&#xD;&#xA;Description:	Ubuntu 22.04 LTS" ContentLicense="CC BY-SA 4.0" />
  <row Id="11153" PostHistoryTypeId="1" PostId="2980" RevisionGUID="daef7724-f915-4011-b6a3-48e04c83fae4" CreationDate="2022-05-31T09:56:16.520" UserId="2673" Text="Error building node template: file name too long" ContentLicense="CC BY-SA 4.0" />
  <row Id="11154" PostHistoryTypeId="3" PostId="2980" RevisionGUID="daef7724-f915-4011-b6a3-48e04c83fae4" CreationDate="2022-05-31T09:56:16.520" UserId="2673" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11155" PostHistoryTypeId="2" PostId="2981" RevisionGUID="ed2850c5-5ac6-4ab5-aaee-3dada138397b" CreationDate="2022-05-31T09:57:18.103" UserId="2408" Text="Are there any public Substrate-based running PoW chains out there except Kulupu?  &#xD;&#xA;If you know, please share some links." ContentLicense="CC BY-SA 4.0" />
  <row Id="11157" PostHistoryTypeId="1" PostId="2981" RevisionGUID="ed2850c5-5ac6-4ab5-aaee-3dada138397b" CreationDate="2022-05-31T09:57:18.103" UserId="2408" Text="Substrate-based PoW Public Blockchains" ContentLicense="CC BY-SA 4.0" />
  <row Id="11158" PostHistoryTypeId="3" PostId="2981" RevisionGUID="ed2850c5-5ac6-4ab5-aaee-3dada138397b" CreationDate="2022-05-31T09:57:18.103" UserId="2408" Text="|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11159" PostHistoryTypeId="2" PostId="2982" RevisionGUID="4428a944-3a2b-47d3-977b-7799dee83cb8" CreationDate="2022-05-31T10:38:54.300" UserId="444" Text="I am making an application in C# unity and trying to integrate polkadot wallet in the application. I want to know whether it's possible to use the polkadot wallet browser extension to sign personal transactions." ContentLicense="CC BY-SA 4.0" />
  <row Id="11161" PostHistoryTypeId="1" PostId="2982" RevisionGUID="4428a944-3a2b-47d3-977b-7799dee83cb8" CreationDate="2022-05-31T10:38:54.300" UserId="444" Text="Is there a way to integrate polkadot wallet with unity?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11162" PostHistoryTypeId="3" PostId="2982" RevisionGUID="4428a944-3a2b-47d3-977b-7799dee83cb8" CreationDate="2022-05-31T10:38:54.300" UserId="444" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11167" PostHistoryTypeId="2" PostId="2984" RevisionGUID="a0447f55-f419-4632-9d14-21639b5233b0" CreationDate="2022-05-31T11:42:05.053" UserId="2673" Text="Turned out it was caused by `ecryptfs` file name length limit which is only 143 characters (compared to 255 in most filesystems). I applied a (kinda ugly) workaround described [here](https://unix.stackexchange.com/a/156392) and mounted a new ext4 filesystem for the `target` directory.&#xD;&#xA;```&#xD;&#xA;$ df -Th&#xD;&#xA;...&#xD;&#xA;/home/adam/.Private ecryptfs  432G   34G  377G   9% /home/adam&#xD;&#xA;/dev/loop18         ext4      9,8G  3,5G  5,8G  38% /home/adam/substrate-node-template/target&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11169" PostHistoryTypeId="10" PostId="2974" RevisionGUID="7759f8e6-4fdc-4cbf-bb6c-b08d51742d95" CreationDate="2022-05-31T14:14:12.690" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="11170" PostHistoryTypeId="2" PostId="2985" RevisionGUID="b6a2771c-4f44-43c4-ae82-84edef445f44" CreationDate="2022-05-31T14:59:22.290" UserId="2676" Text="Yes I do have the same problem, I suppose the [Rust plugin](https://plugins.jetbrains.com/plugin/8182-rust) can still be improved.&#xD;&#xA;&#xD;&#xA;In my case I only have `Unresolved reference` errors.&#xD;&#xA;&#xD;&#xA;The inspections settings can be configured to skip one or more specific errors:&#xD;&#xA;&#xD;&#xA;Go to Settings &gt; Editor &gt; Inspections, then you can uncheck the error `Unresolved reference`, or any false positive error.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Another option is to convert the error into a (weak) warning.&#xD;&#xA;&#xD;&#xA;Note that this change might also affects real errors.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/U44j6.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11172" PostHistoryTypeId="2" PostId="2986" RevisionGUID="de902088-f392-495c-a68f-6f276f428eec" CreationDate="2022-05-31T15:41:15.047" UserId="1813" Text="I need to know my node's peer identity to use it as a boot node. Didn't start the node with `--node-key`. Also, the node has been running for so long that I can no longer access the startup logs containing `2021-03-10 17:34:27   Local node identity is: 12D3KooWEyopp...`. Is there any other way to obtain my node's peer identity?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11174" PostHistoryTypeId="1" PostId="2986" RevisionGUID="de902088-f392-495c-a68f-6f276f428eec" CreationDate="2022-05-31T15:41:15.047" UserId="1813" Text="Get a local node identity / peer id" ContentLicense="CC BY-SA 4.0" />
  <row Id="11175" PostHistoryTypeId="3" PostId="2986" RevisionGUID="de902088-f392-495c-a68f-6f276f428eec" CreationDate="2022-05-31T15:41:15.047" UserId="1813" Text="|key|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11176" PostHistoryTypeId="2" PostId="2987" RevisionGUID="8dab4fce-fe8f-41ef-b9af-b80f80b2ba0d" CreationDate="2022-05-31T16:09:18.187" UserId="279" Text="you can query the local peerId through and rpc call. For example using polkadotjs&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iONsH.png&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="11178" PostHistoryTypeId="2" PostId="2988" RevisionGUID="3fd42335-6a31-4f02-a887-52214d13f792" CreationDate="2022-05-31T17:10:34.597" UserId="2674" Text="I'm writing a script using the polkadot.js API. I want to find the minimum active stake for a certain epoch. I.e. the minimum amount of DOTs staked by a nominator that also got a reward for that epoch. Where can I find this value or how can I calculate it? Any help appreciated!" ContentLicense="CC BY-SA 4.0" />
  <row Id="11180" PostHistoryTypeId="1" PostId="2988" RevisionGUID="3fd42335-6a31-4f02-a887-52214d13f792" CreationDate="2022-05-31T17:10:34.597" UserId="2674" Text="Where can I find minimum active stake for a certain epoch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11181" PostHistoryTypeId="3" PostId="2988" RevisionGUID="3fd42335-6a31-4f02-a887-52214d13f792" CreationDate="2022-05-31T17:10:34.597" UserId="2674" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11183" PostHistoryTypeId="5" PostId="2988" RevisionGUID="1ffc5153-11e8-46e3-a369-113a1ed2bfb4" CreationDate="2022-05-31T18:41:21.310" UserId="2674" Comment="added 51 characters in body; edited title" Text="I'm writing a script using the polkadot.js API. I want to find the minimum active stake for a certain era. I.e. the minimum amount of DOTs staked by a nominator that also got a reward for that era. Where can I find this value or how can I calculate it? Any help appreciated!&#xD;&#xA;&#xD;&#xA;EDIT1: I accidentally wrote epoch when I meant era." ContentLicense="CC BY-SA 4.0" />
  <row Id="11184" PostHistoryTypeId="4" PostId="2988" RevisionGUID="1ffc5153-11e8-46e3-a369-113a1ed2bfb4" CreationDate="2022-05-31T18:41:21.310" UserId="2674" Comment="added 51 characters in body; edited title" Text="Where can I find minimum active stake for a certain era?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11185" PostHistoryTypeId="12" PostId="2988" RevisionGUID="ef4c7bcf-8ffb-4831-afbe-a7681ddf3b74" CreationDate="2022-05-31T18:41:44.937" UserId="2674" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2674,&quot;DisplayName&quot;:&quot;sith&quot;}]}" />
  <row Id="11186" PostHistoryTypeId="13" PostId="2988" RevisionGUID="2571069e-339b-4f40-887f-0157c71eb0aa" CreationDate="2022-05-31T18:42:11.997" UserId="2674" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2674,&quot;DisplayName&quot;:&quot;sith&quot;}]}" />
  <row Id="11187" PostHistoryTypeId="2" PostId="2989" RevisionGUID="b912489e-73e0-4ac0-bdb3-8c380d9a7dd6" CreationDate="2022-05-31T20:40:57.123" UserId="29" Text="When I run Alice and Bob validators:&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot --alice --validator --base-path /tmp/relay/alice --chain chainspec-raw.json --port 30333 --ws-port 9944&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot --bob --validator --base-path /tmp/relay/bob --chain chainspec-raw.json --port 30334 --ws-port 9945&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;They cannot find each other and no blocks are produced.&#xD;&#xA;&#xD;&#xA;However, if I run the second validator node (Bob) **specifying the bootnode** of Alice like so:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot --bob --validator --base-path /tmp/relay/bob --chain chainspec-raw.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWP2XSK96JraZ5PxK6uC33ae8fMRfmugP5DtuwxhrbGPUH --port 30334 --ws-port 9945&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;then it works and blocks are produced and finalized.&#xD;&#xA;&#xD;&#xA;Why aren't the nodes finding each other via peer discovery?&#xD;&#xA;&#xD;&#xA;&gt; I am on macOS." ContentLicense="CC BY-SA 4.0" />
  <row Id="11189" PostHistoryTypeId="1" PostId="2989" RevisionGUID="b912489e-73e0-4ac0-bdb3-8c380d9a7dd6" CreationDate="2022-05-31T20:40:57.123" UserId="29" Text="How do I get my nodes to find each other?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11190" PostHistoryTypeId="3" PostId="2989" RevisionGUID="b912489e-73e0-4ac0-bdb3-8c380d9a7dd6" CreationDate="2022-05-31T20:40:57.123" UserId="29" Text="|networking|peers|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11191" PostHistoryTypeId="2" PostId="2990" RevisionGUID="15f10285-090f-4b75-935f-772a972b4a74" CreationDate="2022-05-31T20:40:57.123" UserId="29" Text="My firewall was blocking the peer discovery.&#xD;&#xA;&#xD;&#xA;&gt; System Preferences &gt; Security &amp; Privacy &gt; Firewall&#xD;&#xA;&#xD;&#xA;This was my setup:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/mvnDi.png)&#xD;&#xA;&#xD;&#xA;This means my nodes will not be able to auto-discover because incoming connections are blocked (I would have to specify the bootnodes manually).&#xD;&#xA;&#xD;&#xA;Unchecking &quot;Block all incoming connections&quot; and checking &quot;Enable stealth mode&quot;:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/aY7Ge.png)&#xD;&#xA;&#xD;&#xA;Then re-running the Alice and Bob validators, I get this pop-up to approve incoming connections:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/n4QXJ.png)&#xD;&#xA;&#xD;&#xA;This will add &quot;polkadot&quot; to the approved list of software:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/lLITP.png)&#xD;&#xA;&#xD;&#xA;And finally Bob will find Alice.&#xD;&#xA;&#xD;&#xA;&gt; Note: I ended up opting for leaving the &quot;Block all incoming connections&quot; checked and manually specifying the bootnode as this sufficed for my node testing and allowed me to keep a more secure configuration for my firewall." ContentLicense="CC BY-SA 4.0" />
  <row Id="11193" PostHistoryTypeId="52" PostId="2986" RevisionGUID="549dad98-439d-485e-a351-a222127a2d2a" CreationDate="2022-05-31T23:45:09.897" />
  <row Id="11194" PostHistoryTypeId="6" PostId="2989" RevisionGUID="75a98dfb-5e56-4319-8ea2-926d82aca761" CreationDate="2022-06-01T03:46:24.710" UserId="34" Comment="edited tags" Text="|networking|peers|macos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11195" PostHistoryTypeId="4" PostId="2989" RevisionGUID="75a98dfb-5e56-4319-8ea2-926d82aca761" CreationDate="2022-06-01T03:46:24.710" UserId="34" Comment="edited tags" Text="How do I get my nodes to find each other on macOS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11196" PostHistoryTypeId="5" PostId="2789" RevisionGUID="da0c1ecf-ca73-4356-b07f-3156fa5c1828" CreationDate="2022-06-01T05:53:32.350" UserId="1837" Comment="added 525 characters in body" Text="I am new to ink and trying to run a smartcontract that gets built and deployed correctly but on executing the `deposit()` method from the contract, it terminates with `Contract.Out.Of.Gas`after doing some computation in `insert()` method given below.&#xD;&#xA;&#xD;&#xA;In debug logs, I cannot find any reason why the contract limit gets exhausted. I did try to set the gas limit to the max value it can accept but it just did a few more computations and exhausted the gas limit.&#xD;&#xA;&#xD;&#xA;I am not sure where should I start to look for the root cause of the problem.&#xD;&#xA;&#xD;&#xA;This is Mixer contract which has 2 ContractRef `PoseidonRef` and `MixerVerifierRef`, following are the structure details about smartcontract for reference:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Mixer {&#xD;&#xA;        deposit_size: Balance,&#xD;&#xA;        merkle_tree: merkle_tree::MerkleTree,&#xD;&#xA;        used_nullifiers: Mapping&lt;[u8; 32], bool&gt;,&#xD;&#xA;        poseidon: PoseidonRef,&#xD;&#xA;        verifier: MixerVerifierRef,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;#[ink(message, payable)]&#xD;&#xA;pub fn deposit(&amp;mut self, commitment: [u8; 32]) -&gt; Result&lt;u32&gt; {&#xD;&#xA;    assert!(&#xD;&#xA;        self.env().transferred_value() == self.deposit_size,&#xD;&#xA;        &quot;Deposit size is not correct&quot;&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    self.merkle_tree.insert(self.poseidon.clone(), commitment)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// merkle_tree.insert&#xD;&#xA;pub fn insert(&amp;mut self, hasher: PoseidonRef, leaf: [u8; 32]) -&gt; Result&lt;u32&gt; {&#xD;&#xA;    ...&#xD;&#xA;    for i in 0..self.levels {&#xD;&#xA;        if current_index % 2 == 0 {&#xD;&#xA;            left = current_level_hash;&#xD;&#xA;            right = zeroes::zeroes(i);&#xD;&#xA;            self.filled_subtrees.insert(i, &amp;current_level_hash);&#xD;&#xA;        } else {&#xD;&#xA;            left = self.filled_subtrees.get(&amp;i).unwrap_or_default();&#xD;&#xA;            right = current_level_hash;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        current_level_hash = self.hash_left_right(hasher.clone(), left, right)?;&#xD;&#xA;        current_index = current_index / 2;&#xD;&#xA;     }&#xD;&#xA;   ....&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// hash_left_right&#xD;&#xA;fn hash_left_right(&#xD;&#xA;        &amp;self,&#xD;&#xA;        hasher: PoseidonRef,&#xD;&#xA;        left: [u8; 32],&#xD;&#xA;        right: [u8; 32],&#xD;&#xA;    ) -&gt; Result&lt;[u8; 32]&gt; {&#xD;&#xA;        let inputs = vec![left, right];&#xD;&#xA;        hasher.hash(inputs).map_err(|_| mixer::Error::HashError)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any advice or help is much appreciated. Thank you!&#xD;&#xA;&#xD;&#xA;I am using ink! v3.0.0-rc9 and redspot for testing&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11197" PostHistoryTypeId="2" PostId="2991" RevisionGUID="f5ad7d17-62b7-406d-97d3-5ddd86f45e68" CreationDate="2022-06-01T07:00:02.707" UserId="2680" Text="I am trying to call a contract read which is deployed on the Azero smartnet using @polkadot/api-contract following https://polkadot.js.org/docs/api-contract. Here is my current code.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { ApiPromise, HttpProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;import { ContractPromise } from &quot;@polkadot/api-contract&quot;;&#xD;&#xA;&#xD;&#xA;import { abi } from &quot;./psp34-metadata&quot;;&#xD;&#xA;&#xD;&#xA;const main = async () =&gt; {&#xD;&#xA;  const wsProvider = new HttpProvider(&quot;https://rpc-smartnet.test.azero.dev/&quot;);&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;  const nftCollectionAddress = `5FoLoL5mYXpBwxJUMDo3tcwh5VTrzaz3LvbA4B7LiivjXV7C`;&#xD;&#xA;&#xD;&#xA;  // Construct our Code helper. The abi is an Abi object, an unparsed JSON string&#xD;&#xA;  // or the raw JSON data (after doing a JSON.parse). The wasm is either a hex&#xD;&#xA;  // string (0x prefixed), an Uint8Array or a Node.js Buffer object&#xD;&#xA;  const contract = new ContractPromise(api, abi, nftCollectionAddress);&#xD;&#xA;  &#xD;&#xA;  const value = 0; // only useful on isPayable messages&#xD;&#xA;&#xD;&#xA;  const gasLimit = 3000n * 1000000n;&#xD;&#xA;&#xD;&#xA;  const senderAddress = `5CXCzYooepihLkWNbFQ9VJieLSWgguTEPe6eWrDM8wAytCea`; // * My SubWallet address&#xD;&#xA;&#xD;&#xA;  const tokenId = 1; // Token ID of NFT Im trying to read&#xD;&#xA;&#xD;&#xA;  const { gasConsumed, result, output } = await contract.query[&#xD;&#xA;    &quot;psp34Traits::tokenUri&quot;&#xD;&#xA;  ](senderAddress, { value, gasLimit }, value);&#xD;&#xA;&#xD;&#xA;  console.log({ gasConsumed, result, output });&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;main();&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I create the ContractPromise and can console.log the various methods on contract.query, but when i try to call psp34Traits::tokenUri I receive the error `Enum(Err):: Enum(Module):: Struct: failed on error: u8:: u8: Input too large. Found input with 26 bits, expected 8`&#xD;&#xA;&#xD;&#xA;Here is the exact message method from the deployed contract in ink! I am calling from Node&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;fn token_uri(&#xD;&#xA;    &amp;self,&#xD;&#xA;    token_id: u64&#xD;&#xA;) -&gt; String {&#xD;&#xA;    let value = self.get_attribute(Id::U8(0), String::from(&quot;baseURI&quot;).into_bytes());&#xD;&#xA;    let mut token_uri = String::from_utf8(value.unwrap()).unwrap();&#xD;&#xA;    token_uri = token_uri + &amp;token_id.to_string() + &amp;String::from(&quot;.json&quot;);&#xD;&#xA;    return token_uri;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is also the full error log. Any tips to point me in the right direction would be greatly appreciated&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-06-01 01:12:05        RPC-CORE: call(callRequest: ContractCallRequest, at?: BlockHash): ContractExecResult:: createType(ContractExecResult):: Struct: failed on result: {&quot;_enum&quot;:{&quot;Ok&quot;:&quot;ContractExecResultOk&quot;,&quot;Err&quot;:&quot;ContractExecResultErr&quot;}}:: Enum(Err):: Enum(Module):: Struct: failed on error: u8:: u8: Input too large. Found input with 26 bits, expected 8&#xD;&#xA;/Users/user/Work/azero/polkadotjs/node_modules/@polkadot/types-create/cjs/create/type.js:70&#xD;&#xA;    firstError = new Error(`createType(${type}):: ${error.message}`);&#xD;&#xA;                 ^&#xD;&#xA;Error: createType(ContractExecResult):: Struct: failed on result: {&quot;_enum&quot;:{&quot;Ok&quot;:&quot;ContractExecResultOk&quot;,&quot;Err&quot;:&quot;ContractExecResultErr&quot;}}:: Enum(Err):: Enum(Module):: Struct: failed on error: u8:: u8: Input too large. Found input with 26 bits, expected 8&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11199" PostHistoryTypeId="1" PostId="2991" RevisionGUID="f5ad7d17-62b7-406d-97d3-5ddd86f45e68" CreationDate="2022-06-01T07:00:02.707" UserId="2680" Text="Trying to call contract.query read using @polkadot/api-contract results in value bit error" ContentLicense="CC BY-SA 4.0" />
  <row Id="11200" PostHistoryTypeId="3" PostId="2991" RevisionGUID="f5ad7d17-62b7-406d-97d3-5ddd86f45e68" CreationDate="2022-06-01T07:00:02.707" UserId="2680" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11201" PostHistoryTypeId="2" PostId="2992" RevisionGUID="67bfac1b-ad86-469f-bf6b-1a42533a5f95" CreationDate="2022-06-01T07:31:53.627" UserId="2395" Text="Is it possible to retrieve the locked balance of an account from the account data queried from `api.query.system.account`? If not, what is the right way to do so? I'm looking for the stash locked in bonds, democracy, election and vesting. " ContentLicense="CC BY-SA 4.0" />
  <row Id="11203" PostHistoryTypeId="1" PostId="2992" RevisionGUID="67bfac1b-ad86-469f-bf6b-1a42533a5f95" CreationDate="2022-06-01T07:31:53.627" UserId="2395" Text="Locked Balance of an Account in Acala" ContentLicense="CC BY-SA 4.0" />
  <row Id="11204" PostHistoryTypeId="3" PostId="2992" RevisionGUID="67bfac1b-ad86-469f-bf6b-1a42533a5f95" CreationDate="2022-06-01T07:31:53.627" UserId="2395" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11205" PostHistoryTypeId="6" PostId="2992" RevisionGUID="bdc7330a-5bbf-4a41-b91b-6bafab16d1df" CreationDate="2022-06-01T07:41:21.657" UserId="28" Comment="edited tags" Text="|balances|acala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11206" PostHistoryTypeId="2" PostId="2993" RevisionGUID="f20c7211-3193-453a-81ff-c7bb9c043df2" CreationDate="2022-06-01T07:53:06.430" UserId="2417" Text="Is there any way to get the latest block hash in ink! smart contracts?&#xD;&#xA;&#xD;&#xA;I'm wondering if the `ink_env::random(subject: &amp;[u8])` can do it if I pass an empty `subject` to it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11208" PostHistoryTypeId="1" PostId="2993" RevisionGUID="f20c7211-3193-453a-81ff-c7bb9c043df2" CreationDate="2022-06-01T07:53:06.430" UserId="2417" Text="[ink!]How to get the latest confirmed block hash?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11209" PostHistoryTypeId="3" PostId="2993" RevisionGUID="f20c7211-3193-453a-81ff-c7bb9c043df2" CreationDate="2022-06-01T07:53:06.430" UserId="2417" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11220" PostHistoryTypeId="2" PostId="2996" RevisionGUID="ad82b176-eff7-4018-8938-bc359d42336c" CreationDate="2022-06-01T09:18:16.457" UserId="1793" Text="We have local testnet with our parachain and we successfully sent KSM from relay to parachain. We have however the problem when we want to withdraw KSM back from parachain to relay chain. We always receive the error **UntrustedReserveLocation**&#xD;&#xA;&#xD;&#xA;Steps:&#xD;&#xA;On the relay chain we set the default xcm version to 1. &#xD;&#xA;&#xD;&#xA;**xcmPallet -&gt; forceDefaultXcmVersion**, set the **maybeXcmVersion** field to **1**&#xD;&#xA;&#xD;&#xA;We construct the extrinsic in this form&#xD;&#xA;&#xD;&#xA;    const hexAccount = api.createType('AccountId32', 'some address here').toHex()&#xD;&#xA;&#xD;&#xA;    const dest = {&#xD;&#xA;        V1: {&#xD;&#xA;          parents: 1,&#xD;&#xA;          interior: 'Here',&#xD;&#xA;        },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    const beneficiary = {&#xD;&#xA;          V1: {&#xD;&#xA;            parents: 1,&#xD;&#xA;            interior: {&#xD;&#xA;              X1: {&#xD;&#xA;                AccountId32: {&#xD;&#xA;                  network: 'Any',&#xD;&#xA;                  id: hexAccount,&#xD;&#xA;                },&#xD;&#xA;              },&#xD;&#xA;            },&#xD;&#xA;          },&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    const assets = {&#xD;&#xA;          V1: [&#xD;&#xA;            {&#xD;&#xA;              id: {&#xD;&#xA;                Concrete: {&#xD;&#xA;                  parents: 1,&#xD;&#xA;                  interior: 'Here',&#xD;&#xA;                },&#xD;&#xA;              },&#xD;&#xA;              fun: {&#xD;&#xA;                Fungible: HERE_IS_THE_AMOUNT,&#xD;&#xA;              },&#xD;&#xA;            },&#xD;&#xA;          ],&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;and then we execute tx&#xD;&#xA;&#xD;&#xA;    api.tx.polkadotXcm&#xD;&#xA;        .reserveTransferAssets(dest, beneficiary, assets, '0')&#xD;&#xA;        .signAndSend('some address here')&#xD;&#xA;&#xD;&#xA;Can someone tells what could be the problem ? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="11222" PostHistoryTypeId="1" PostId="2996" RevisionGUID="ad82b176-eff7-4018-8938-bc359d42336c" CreationDate="2022-06-01T09:18:16.457" UserId="1793" Text="Withdraw from parachain to relay chain (XCM)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11223" PostHistoryTypeId="3" PostId="2996" RevisionGUID="ad82b176-eff7-4018-8938-bc359d42336c" CreationDate="2022-06-01T09:18:16.457" UserId="1793" Text="|polkadot-js|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11224" PostHistoryTypeId="2" PostId="2997" RevisionGUID="84351fd8-8657-4b3f-add0-8a10dae7f723" CreationDate="2022-06-01T10:27:58.117" UserId="1793" Text="I would like to ask question about free balance on Kusama&#xD;&#xA;&#xD;&#xA;when we execute the query&#xD;&#xA;&#xD;&#xA;    await api.query.system.account('some address')&#xD;&#xA;then the output is this&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      nonce: 1&#xD;&#xA;      consumers: 0&#xD;&#xA;      providers: 1&#xD;&#xA;      sufficients: 0&#xD;&#xA;      data: {&#xD;&#xA;        free: 899,973,503,629,159&#xD;&#xA;        reserved: 0&#xD;&#xA;        miscFrozen: 0&#xD;&#xA;        feeFrozen: 0&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My question is what is the true FREE balance ? &#xD;&#xA;&#xD;&#xA;Because when the user have some frozen .. it means he/she cannot go below the frozen limit&#xD;&#xA;So the true FREE balance is `FREE - MISCFROZEN - FEEFROZEN` ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="11226" PostHistoryTypeId="1" PostId="2997" RevisionGUID="84351fd8-8657-4b3f-add0-8a10dae7f723" CreationDate="2022-06-01T10:27:58.117" UserId="1793" Text="What is the correct FREE balance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11227" PostHistoryTypeId="3" PostId="2997" RevisionGUID="84351fd8-8657-4b3f-add0-8a10dae7f723" CreationDate="2022-06-01T10:27:58.117" UserId="1793" Text="|polkadot-js|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11228" PostHistoryTypeId="2" PostId="2998" RevisionGUID="38c1b0ee-c2d5-4255-987a-2ab1fda08976" CreationDate="2022-06-01T10:37:07.217" UserId="1816" Text="I'm currently looking to verify ethereum transaction merkle-proofs in runtime. As Ethereum also uses a patricia-trie, I was wondering if the two implementations are generally compatible. Is it possible to use sp-trie to recreate the transaction root of an ethereum header?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11230" PostHistoryTypeId="1" PostId="2998" RevisionGUID="38c1b0ee-c2d5-4255-987a-2ab1fda08976" CreationDate="2022-06-01T10:37:07.217" UserId="1816" Text="Polkadot Patrica Trie compatible with Ethereum implementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="11231" PostHistoryTypeId="3" PostId="2998" RevisionGUID="38c1b0ee-c2d5-4255-987a-2ab1fda08976" CreationDate="2022-06-01T10:37:07.217" UserId="1816" Text="|ethereum|trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11236" PostHistoryTypeId="2" PostId="3000" RevisionGUID="2aea79ce-61b4-4c92-ad40-b2f6bd2c9cd2" CreationDate="2022-06-01T15:03:54.307" UserId="1824" Text="I've reproduced your issue and I believe it was an error on our end which caused this. It&#xD;&#xA;looks like we introduced a breaking change in the codegen as part of ink! 3.2, sorry!&#xD;&#xA;&#xD;&#xA;This change was related to the `execute_constructor` method of the `ink_lang` crate. In [#1264](https://github.com/paritytech/ink/pull/1267/files#diff-80ef02562d51e36365db131b242217f4ea2f5b4542df737f46950fafb442b2dbL81)&#xD;&#xA;we removed one of the arguments, which is what's causing this error.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now, to break it down a little more. Let's consider the error you're getting:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0061]: this function takes 2 arguments but 1 argument was supplied&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The dependency graph looks something like this (taken from the `Cargo.lock`):&#xD;&#xA;- name = &quot;ink_lang&quot;, version = &quot;3.0.1&quot;&#xD;&#xA;- name = &quot;ink_lang_codegen&quot;,  version = &quot;3.2.0&quot;&#xD;&#xA;&#xD;&#xA;The `ink_lang_codegen@3.2.0` crate gets pulled in transitively by the `ink_lang_macro@3.0.1`&#xD;&#xA;crate (you can use `cargo tree` to more easily spot this) because according to SemVer&#xD;&#xA;3.2.0 is compatible with 3.0.1.&#xD;&#xA;&#xD;&#xA;The `ink_lang_codegen@3.2.0` crate [generates code as follows](https://github.com/paritytech/ink/blob/809a113a03868688da7258f7ba6f460507b097dd/crates/lang/codegen/src/generator/dispatch.rs#L556):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;quote_spanned!(constructor_span=&gt;&#xD;&#xA;    Self::#constructor_ident(input) =&gt; {&#xD;&#xA;        if #any_constructor_accept_payment &amp;&amp; #deny_payment {&#xD;&#xA;            ::ink_lang::codegen::deny_payment::&lt;&#xD;&#xA;                &lt;#storage_ident as ::ink_lang::reflect::ContractEnv&gt;::Env&gt;()?;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        ::ink_lang::codegen::execute_constructor::&lt;#storage_ident, _, _&gt;(&#xD;&#xA;            move || { #constructor_callable(input) }&#xD;&#xA;        )&#xD;&#xA;    }&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, `ink_lang@3.0.1` (and also anything `&lt;3.2`) exposes [the following function](https://github.com/paritytech/ink/blob/905caa4170c79225139fc9ad00262c68393d883f/crates/lang/src/codegen/dispatch/execution.rs#L81):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn execute_constructor&lt;Contract, F, R&gt;(&#xD;&#xA;    config: ExecuteConstructorConfig,&#xD;&#xA;    f: F,&#xD;&#xA;) -&gt; Result&lt;(), DispatchError&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When the Rust compiler tries to build the expanded macro code it fails because the&#xD;&#xA;function from `ink_lang` doesn't match the generated code, resulting in the error you are&#xD;&#xA;seeing!&#xD;&#xA;&#xD;&#xA;By locking in the codegen at `3.0.1` you end up compiling code which is using the [correct function signature](https://github.com/paritytech/ink/blob/905caa4170c79225139fc9ad00262c68393d883f/crates/lang/codegen/src/generator/dispatch.rs#L567).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;quote_spanned!(constructor_span=&gt;&#xD;&#xA;    Self::#constructor_ident(input) =&gt; {&#xD;&#xA;        ::ink_lang::codegen::execute_constructor::&lt;#storage_ident, _, _&gt;(&#xD;&#xA;            ::ink_lang::codegen::ExecuteConstructorConfig {&#xD;&#xA;                payable: #accepts_payment,&#xD;&#xA;            },&#xD;&#xA;            move || { #constructor_callable(input) }&#xD;&#xA;        )&#xD;&#xA;    }&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11238" PostHistoryTypeId="2" PostId="3001" RevisionGUID="61c58702-0903-4390-9b1a-6d31833090eb" CreationDate="2022-06-01T15:36:54.167" UserId="258" Text="One can know the contract's native balance by using `ink_env::balance()`&#xD;&#xA;&#xD;&#xA;But, How can one know the native balance of a particular address/account in ink?&#xD;&#xA;For example, knowing the native balance of Alice, Bob, Charlie e.t.c?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11240" PostHistoryTypeId="1" PostId="3001" RevisionGUID="61c58702-0903-4390-9b1a-6d31833090eb" CreationDate="2022-06-01T15:36:54.167" UserId="258" Text="How can I determine the native Balance of an Account/Address in Ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="11241" PostHistoryTypeId="3" PostId="3001" RevisionGUID="61c58702-0903-4390-9b1a-6d31833090eb" CreationDate="2022-06-01T15:36:54.167" UserId="258" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11242" PostHistoryTypeId="2" PostId="3002" RevisionGUID="56c16fd0-5040-48db-815d-3bb9417454a8" CreationDate="2022-06-01T15:44:59.940" UserId="74" Text="We are reaching an out-of-gas error in one of our Ink contracts and are interested to investigate the gas used throughout the execution. Is there a way to query for the gas consumed throughout the execution of a contract or for a specific method?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11244" PostHistoryTypeId="1" PostId="3002" RevisionGUID="56c16fd0-5040-48db-815d-3bb9417454a8" CreationDate="2022-06-01T15:44:59.940" UserId="74" Text="How to analyze the gas used throughout the execution of an Ink! transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11245" PostHistoryTypeId="3" PostId="3002" RevisionGUID="56c16fd0-5040-48db-815d-3bb9417454a8" CreationDate="2022-06-01T15:44:59.940" UserId="74" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11246" PostHistoryTypeId="2" PostId="3003" RevisionGUID="fab99f0a-859a-4c53-a5cd-e583d6fd28fb" CreationDate="2022-06-01T15:54:11.290" UserId="225" Text="Openethereum did use the same dependency but with a different node codec (https://github.com/openethereum/openethereum/tree/d8305c52ea805e62d7532c3ac76386873984d326/crates/db/patricia-trie-ethereum).&#xD;&#xA;So not compatible.&#xD;&#xA;&#xD;&#xA;Also openethereum uses a version of the trie crate and rlp codec that are not no_std compatible, so using the code in a runtime will not be straightforward." ContentLicense="CC BY-SA 4.0" />
  <row Id="11248" PostHistoryTypeId="5" PostId="2969" RevisionGUID="641b9ea2-a7e3-4c25-a21a-7b1e2e16ebc7" CreationDate="2022-06-01T16:15:03.053" UserId="380" Comment="added 46 characters in body" Text="You can't do this via an existing method in an *integration test* as none exists but there is a workaround for *ink unit tests*.&#xD;&#xA;&#xD;&#xA;The [test environment increases the block timestamp by a known amount each block](https://github.com/paritytech/ink/blob/34bd952e3a632f26d7c946e537c3947e2327b3fc/crates/engine/src/test_api.rs#L223-L227):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    /// Advances the chain by a single block.&#xD;&#xA;    pub fn advance_block(&amp;mut self) {&#xD;&#xA;        self.exec_context.block_number += 1;&#xD;&#xA;        self.exec_context.block_timestamp += self.chain_spec.block_time;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This means you will be able to determine the `block_timestamp` if you know the number of blocks that have passed. The `substrate-contracts-node` does not auto produce blocks in its default setup. It only produces blocks when it receives a transaction (this is known as [instant seal](https://substrate.stackexchange.com/a/1830/380)). Therefore, if you begin your test at block `X` at `block_timestamp_start` and you have issued `5` transactions by the end of your test, the `block_timtestamp_end` could be calculated by something similar to this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;block_timestamp_end = block_timestamp_start + 5 * chain_spec.block_time&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Block timestamp could therefore be manipulated to a known value using the same process." ContentLicense="CC BY-SA 4.0" />
  <row Id="11249" PostHistoryTypeId="2" PostId="3004" RevisionGUID="551d8f27-006d-49dd-9f73-3d91e9b8bf70" CreationDate="2022-06-01T16:31:24.713" UserId="170" Text="I am not aware of some gas used function, but I would suggest using `ink_env::gas_left` function to see how much gas is left in between the calls and then analyze.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11251" PostHistoryTypeId="2" PostId="3005" RevisionGUID="a8daf77b-930f-4096-b8b0-6543d8d76208" CreationDate="2022-06-01T16:52:28.670" UserId="220" Text="What are the options for Bitcoin integration on Polkadot / with Substrate?&#xD;&#xA;&#xD;&#xA;Is there a way to allow users to deposit BTC, have smart contract / runtime rules that adjust balances (based on signed app specific transactions), whilst also allowing users to withdraw their balance? Does a simple example exist anywhere?&#xD;&#xA;&#xD;&#xA;I've [noticed interBTC][1], which looks great, though I haven't found an example along the lines of above... perhaps I am misunderstanding something though. Are there other options?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/q/1427/220" ContentLicense="CC BY-SA 4.0" />
  <row Id="11253" PostHistoryTypeId="1" PostId="3005" RevisionGUID="a8daf77b-930f-4096-b8b0-6543d8d76208" CreationDate="2022-06-01T16:52:28.670" UserId="220" Text="What are the options for Bitcoin integration on Polkadot / with Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11254" PostHistoryTypeId="3" PostId="3005" RevisionGUID="a8daf77b-930f-4096-b8b0-6543d8d76208" CreationDate="2022-06-01T16:52:28.670" UserId="220" Text="|polkadot|bridge|interbtc|bitcoin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11255" PostHistoryTypeId="2" PostId="3006" RevisionGUID="8488c07d-d9e0-4451-91a9-1faedb877cf5" CreationDate="2022-06-01T17:29:49.623" UserId="2634" Text="OS : centos stream 9  &#xD;&#xA;CPU : x86_64  &#xD;&#xA;Rust : 1.61  &#xD;&#xA;substrate : 2022-05 3.0  &#xD;&#xA;polkdadot : 0.9.20  &#xD;&#xA;substrate-front-end : 2022-02  &#xD;&#xA;node : 16.14  &#xD;&#xA;&#xD;&#xA;when i study  &#xD;&#xA;substrate Tutorials - Add the Nicks Pallet to your Runtime&#xD;&#xA;[https://docs.substrate.io/tutorials/v3/add-a-pallet/](https://docs.substrate.io/tutorials/v3/add-a-pallet/)  &#xD;&#xA;&#xD;&#xA;when i cargo check -p node-template-runtime  , it show error  &#xD;&#xA;how install package which satisfies dependency&#xD;&#xA;```&#xD;&#xA;[lzh@c9 substrate-node-template]cargo check -p node-template-runtime&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;    Updating crates.io index&#xD;&#xA;error: failed to select a version for `signature`.&#xD;&#xA;    ... required by package `ecdsa v0.13.3`&#xD;&#xA;    ... which satisfies dependency `ecdsa-core = &quot;^0.13&quot;` of package `k256 v0.10.4`&#xD;&#xA;    ... which satisfies dependency `k256 = &quot;^0.10.4&quot;` of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.22#616d33ea)`&#xD;&#xA;    ... which satisfies git dependency `frame-support` of package `frame-system v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.22#616d33ea)`&#xD;&#xA;    ... which satisfies git dependency `frame-system` of package `pallet-nicks v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.22#616d33ea)`&#xD;&#xA;    ... which satisfies git dependency `pallet-nicks` of package `node-template-runtime v4.0.0-dev (/home/lzh/substrate-node-template/runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/lzh/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `&gt;=1.3.1, &lt;1.5` are: 1.4.0, 1.3.2, 1.3.1&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `signature v1.5.0`&#xD;&#xA;    ... which satisfies dependency `signature = &quot;&gt;=1.3.1&quot;` (locked to 1.5.0) of package `ed25519 v1.4.1`&#xD;&#xA;    ... which satisfies dependency `ed25519 = &quot;^1&quot;` (locked to 1.4.1) of package `ed25519-dalek v1.0.1`&#xD;&#xA;    ... which satisfies dependency `ed25519-dalek = &quot;^1.0.1&quot;` (locked to 1.0.1) of package `libp2p-core v0.30.2`&#xD;&#xA;    ... which satisfies dependency `libp2p-core = &quot;^0.30.0&quot;` (locked to 0.30.2) of package `libp2p v0.40.0`&#xD;&#xA;    ... which satisfies dependency `libp2p = &quot;^0.40.0&quot;` (locked to 0.40.0) of package `sc-cli v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.20#563f4820)`&#xD;&#xA;    ... which satisfies git dependency `sc-cli` (locked to 0.10.0-dev) of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.20#563f4820)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/lzh/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `signature` which could resolve this conflict&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11257" PostHistoryTypeId="1" PostId="3006" RevisionGUID="8488c07d-d9e0-4451-91a9-1faedb877cf5" CreationDate="2022-06-01T17:29:49.623" UserId="2634" Text="how install package which satisfies dependency when cargo check" ContentLicense="CC BY-SA 4.0" />
  <row Id="11258" PostHistoryTypeId="3" PostId="3006" RevisionGUID="8488c07d-d9e0-4451-91a9-1faedb877cf5" CreationDate="2022-06-01T17:29:49.623" UserId="2634" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11259" PostHistoryTypeId="2" PostId="3007" RevisionGUID="5032ee74-9efd-4380-a421-87e2564df188" CreationDate="2022-06-01T18:23:32.320" UserId="29" Text="If there are changes not only to the runtime but also to the node, then this issue is normally caused by upgrading the runtime before upgrading the client. &#xD;&#xA;&#xD;&#xA;Try upgrading the client, then the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="11261" PostHistoryTypeId="52" PostId="2998" RevisionGUID="36367118-785a-41e7-b59d-06012b23871d" CreationDate="2022-06-01T19:13:25.927" />
  <row Id="11262" PostHistoryTypeId="4" PostId="2997" RevisionGUID="d115af45-8b53-4081-85f7-e300634186b7" CreationDate="2022-06-01T21:02:09.267" UserId="28" Comment="edited title" Text="How to calculate the transferable balance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11263" PostHistoryTypeId="2" PostId="3008" RevisionGUID="ba5e8f12-f075-44db-a6a5-acd4add6502c" CreationDate="2022-06-01T21:19:33.197" UserId="244" Text="As Bruno says in his answer, this error is thrown because there were changes not only to the runtime, but to the &quot;host&quot; as well (everything but the runtime). When you submit the upgrade transaction, it only updates the runtime, but not the rest of the node, and that's why the host doesn't understand this new function.&#xD;&#xA;&#xD;&#xA;The way I was able to do is the following:&#xD;&#xA;- Build your new node (runtime + host) in a separate place&#xD;&#xA;- Submit the upgrade transaction to the current chain, it will &quot;brick&quot;, showing the error you got before&#xD;&#xA;- Stop the chain and substitute the binary file of the old chain for the binary file of the upgraded one&#xD;&#xA;- Run the new binary pointing to the database of the (old) chain.&#xD;&#xA;&#xD;&#xA;It should work, since the new runtime is now on storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="11265" PostHistoryTypeId="2" PostId="3009" RevisionGUID="6330bc20-5248-4985-838c-a5a1b1a3e7da" CreationDate="2022-06-01T21:32:10.517" UserId="28" Text="Seems like you are looking to calculate the current &quot;reducible&quot; balance of a user, which has a function defined in the Balances Pallet:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn reducible_balance(who: &amp;T::AccountId, keep_alive: bool) -&gt; Self::Balance {&#xD;&#xA;	let a = Self::account(who);&#xD;&#xA;	// Liquid balance is what is neither reserved nor locked/frozen.&#xD;&#xA;	let liquid = a.free.saturating_sub(a.fee_frozen.max(a.misc_frozen));&#xD;&#xA;	if frame_system::Pallet::&lt;T&gt;::can_dec_provider(who) &amp;&amp; !keep_alive {&#xD;&#xA;		liquid&#xD;&#xA;	} else {&#xD;&#xA;		// `must_remain_to_exist` is the part of liquid balance which must remain to keep total&#xD;&#xA;		// over ED.&#xD;&#xA;		let must_remain_to_exist =&#xD;&#xA;			T::ExistentialDeposit::get().saturating_sub(a.total() - liquid);&#xD;&#xA;		liquid.saturating_sub(must_remain_to_exist)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So this is the logic you want to use." ContentLicense="CC BY-SA 4.0" />
  <row Id="11267" PostHistoryTypeId="4" PostId="2997" RevisionGUID="6b5b3608-a03d-4826-a282-ad397c7458e8" CreationDate="2022-06-01T21:35:41.053" UserId="28" Comment="edited title" Text="How to calculate the reducible balance of a user?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11268" PostHistoryTypeId="5" PostId="3009" RevisionGUID="5e841a06-3ef9-4d84-b3e1-00299f0e318e" CreationDate="2022-06-01T21:37:29.383" UserId="28" Comment="added 272 characters in body" Text="Seems like you are looking to calculate the current &quot;reducible&quot; balance of a user, which has a function defined in the Balances Pallet:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn reducible_balance(who: &amp;T::AccountId, keep_alive: bool) -&gt; Self::Balance {&#xD;&#xA;	let a = Self::account(who);&#xD;&#xA;	// Liquid balance is what is neither reserved nor locked/frozen.&#xD;&#xA;	let liquid = a.free.saturating_sub(a.fee_frozen.max(a.misc_frozen));&#xD;&#xA;	if frame_system::Pallet::&lt;T&gt;::can_dec_provider(who) &amp;&amp; !keep_alive {&#xD;&#xA;		liquid&#xD;&#xA;	} else {&#xD;&#xA;		// `must_remain_to_exist` is the part of liquid balance which must remain to keep total&#xD;&#xA;		// over ED.&#xD;&#xA;		let must_remain_to_exist =&#xD;&#xA;			T::ExistentialDeposit::get().saturating_sub(a.total() - liquid);&#xD;&#xA;		liquid.saturating_sub(must_remain_to_exist)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So this is the logic you want to use.&#xD;&#xA;&#xD;&#xA;It is important to note that FROZEN funds are not cummulative, so the simple calculation would be:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;FREE - max(MISCFROZEN, FEEFROZEN)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;as seen in the `liquid` calculation. But you should also take into account whether you allow the account to die or not." ContentLicense="CC BY-SA 4.0" />
  <row Id="11270" PostHistoryTypeId="5" PostId="3008" RevisionGUID="20f7703a-a5cb-4004-93f3-5f9771b64974" CreationDate="2022-06-01T21:42:22.370" UserId="244" Comment="add more info and sources" Text="As Bruno says in his answer, this error is thrown because there were changes not only to the runtime, but to the &quot;host&quot; as well (everything but the runtime). When you submit the upgrade transaction, it only updates the runtime, but not the rest of the node, and that's why the host doesn't understand this new function.&#xD;&#xA;&#xD;&#xA;The way I was able to do is the following:&#xD;&#xA;- Build your new node (runtime + host) in a separate place&#xD;&#xA;- Submit the upgrade transaction to the current chain, it will &quot;brick&quot;, showing the error you got before&#xD;&#xA;- Stop the chain and substitute the binary file of the old chain for the binary file of the upgraded one&#xD;&#xA;- Run the new binary pointing to the database of the (old) chain.&#xD;&#xA;&#xD;&#xA;It should work, since the new runtime is now on storage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**edit**:&#xD;&#xA;I also found the same solution from the KILT protocol team, as you can see [here](https://medium.com/kilt-protocol/runtime-upgrades-an-experience-report-d388fe283ff6) in the last session &quot;**Update All of the Node**&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11271" PostHistoryTypeId="2" PostId="3010" RevisionGUID="d220bae8-2e2a-4395-99aa-58907874d9b7" CreationDate="2022-06-01T21:44:54.813" UserId="28" Text="The Timestamp pallet has a helper function for tests and benchmarks called `set_timestamp`:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/timestamp/src/lib.rs#L283&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Set the timestamp to something in particular. Only used for tests.&#xD;&#xA;#[cfg(any(feature = &quot;runtime-benchmarks&quot;, feature = &quot;std&quot;))]&#xD;&#xA;pub fn set_timestamp(now: T::Moment) {&#xD;&#xA;	Now::&lt;T&gt;::put(now);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This may be what you are looking for, at least within writing integration tests on a Substrate node." ContentLicense="CC BY-SA 4.0" />
  <row Id="11273" PostHistoryTypeId="2" PostId="3011" RevisionGUID="c54d5128-dd0c-4818-9eec-a9f8e033f146" CreationDate="2022-06-01T22:06:57.490" UserId="557" Text="If I have some unsigned transaction, eg `0x040300865ea...` and I wanted to decode it into a format like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;method: &quot;balances&quot;,&#xD;&#xA;section: &quot;transfer&quot;:&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there a way to do that using polkadot.js or similar library? Most of the information I've come across describes the SCALE codec itself." ContentLicense="CC BY-SA 4.0" />
  <row Id="11275" PostHistoryTypeId="1" PostId="3011" RevisionGUID="c54d5128-dd0c-4818-9eec-a9f8e033f146" CreationDate="2022-06-01T22:06:57.490" UserId="557" Text="How to decode an unsigned transaction using polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="11276" PostHistoryTypeId="3" PostId="3011" RevisionGUID="c54d5128-dd0c-4818-9eec-a9f8e033f146" CreationDate="2022-06-01T22:06:57.490" UserId="557" Text="|polkadot-js|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11277" PostHistoryTypeId="5" PostId="3008" RevisionGUID="a58e41eb-2f43-494f-aacc-af97895aafc1" CreationDate="2022-06-01T23:20:39.110" UserId="244" Comment="update answer not to refer to the other answer, because our approaches are different (opposites, actually)" Text="This error is thrown because there were changes not only to the runtime, but to the &quot;host&quot; as well (everything but the runtime). When you submit the upgrade transaction, it only updates the runtime, but not the rest of the node, and that's why the host doesn't understand this new function.&#xD;&#xA;&#xD;&#xA;The way I was able to do is the following:&#xD;&#xA;- Build your new node (runtime + host) in a separate place&#xD;&#xA;- Submit the upgrade transaction to the current chain, it will &quot;brick&quot;, showing the error you got before&#xD;&#xA;- Stop the chain and substitute the binary file of the old chain for the binary file of the upgraded one&#xD;&#xA;- Run the new binary pointing to the database of the (old) chain.&#xD;&#xA;&#xD;&#xA;It should work, since the new runtime is now on storage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**edit**:&#xD;&#xA;I also found the same solution from the KILT protocol team, as you can see [here](https://medium.com/kilt-protocol/runtime-upgrades-an-experience-report-d388fe283ff6) in the last session &quot;**Update All of the Node**&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11278" PostHistoryTypeId="5" PostId="3008" RevisionGUID="f1b6b71d-4903-400f-876b-ae5e1fc8524f" CreationDate="2022-06-02T03:10:59.930" UserId="244" Comment="gramar, spelling, explanation" Text="This error is thrown because there were changes not only to the runtime, but to the &quot;host&quot; (everything but the runtime) as well. &#xD;&#xA;When you submit the upgrade transaction, it only affects the runtime, but not the rest of the node. It looks like the runtime is trying to call a function that is new, and the host doesn't have it.&#xD;&#xA;&#xD;&#xA;The way I was able to do it is the following:&#xD;&#xA;- Build your new node (runtime + host) in a separate place&#xD;&#xA;- Get the WASM blob and submit it to the current chain. It will &quot;brick&quot;, showing the error you got before&#xD;&#xA;- Stop the chain and replace the binary file of the current chain with the new binary file from the new build&#xD;&#xA;- Re-start the chain, pointing to the same `--base_path &lt;PATH&gt;` as before.&#xD;&#xA;&#xD;&#xA;It should work, since the new runtime is now on storage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**edit**:&#xD;&#xA;I also found the same solution from the KILT protocol team, as you can see [here](https://medium.com/kilt-protocol/runtime-upgrades-an-experience-report-d388fe283ff6) in the last session &quot;**Update All of the Node**&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11279" PostHistoryTypeId="2" PostId="3012" RevisionGUID="8a3fadf5-e52a-4700-8cc0-aaf0278bb1ca" CreationDate="2022-06-02T03:57:41.537" UserId="627" Text="The api provides a shortcut helper for this - `api.tx(&lt;hex bytes&gt;)` will decode/reconstruct it." ContentLicense="CC BY-SA 4.0" />
  <row Id="11281" PostHistoryTypeId="2" PostId="3013" RevisionGUID="19d35eb0-10f1-48fe-b83d-6c0e45d65128" CreationDate="2022-06-02T06:02:32.233" UserId="28" Text="Polkadot JS is written with JavaScript, so your ability to integrate it into a C# application is the same as being able to integrate any JavaScript library into a C# project. (probably not very good)&#xD;&#xA;&#xD;&#xA;What you want is a library written in C# like: https://github.com/usetech-llc/polkadot_api_dotnet&#xD;&#xA;&#xD;&#xA;However this project does not seem to be well maintained at the time of writing this, so probably you will need to reach out to the contributors or fork it if you want to use it in a modern Substrate application." ContentLicense="CC BY-SA 4.0" />
  <row Id="11283" PostHistoryTypeId="6" PostId="2982" RevisionGUID="ecd0abd9-a28c-4346-883f-f2598b40a0aa" CreationDate="2022-06-02T06:03:00.887" UserId="28" Comment="edited tags" Text="|polkadot|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11284" PostHistoryTypeId="2" PostId="3014" RevisionGUID="3190fa02-491a-4d00-8a87-4a18b3007b03" CreationDate="2022-06-02T06:24:12.143" UserId="28" Text="As of the writing this post, Kulupu is the only public running PoW Substrate chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="11286" PostHistoryTypeId="2" PostId="3015" RevisionGUID="8860f964-577c-4e21-bae0-d8886a722761" CreationDate="2022-06-02T07:06:44.663" UserId="2395" Text="How do I get the amount locked in vesting using [this][1] method.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage#vestingaccountid32-optionvecpalletvestingvestinginfo" ContentLicense="CC BY-SA 4.0" />
  <row Id="11288" PostHistoryTypeId="1" PostId="3015" RevisionGUID="8860f964-577c-4e21-bae0-d8886a722761" CreationDate="2022-06-02T07:06:44.663" UserId="2395" Text="Amount locked in vesting" ContentLicense="CC BY-SA 4.0" />
  <row Id="11289" PostHistoryTypeId="3" PostId="3015" RevisionGUID="8860f964-577c-4e21-bae0-d8886a722761" CreationDate="2022-06-02T07:06:44.663" UserId="2395" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11290" PostHistoryTypeId="4" PostId="2966" RevisionGUID="710168c3-ed36-47ce-ba89-bb684c8d0c2b" CreationDate="2022-06-02T07:58:22.243" UserId="450" Comment="edited title" Text="Manipulate block timestamp for ink! integration tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11291" PostHistoryTypeId="5" PostId="2966" RevisionGUID="710168c3-ed36-47ce-ba89-bb684c8d0c2b" CreationDate="2022-06-02T07:58:22.243" UserId="450" Comment="edited title" Text="I'm using `redspot` for integration tests. I have some contracts features involving with block timestamp. How can I manipulate the block timestamp in `substrate-contracts-node`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11292" PostHistoryTypeId="50" PostId="2177" RevisionGUID="95975d2d-a2d7-4aec-b17b-8e1fd7f3a49b" CreationDate="2022-06-02T10:04:40.860" UserId="-1" />
  <row Id="11293" PostHistoryTypeId="2" PostId="3016" RevisionGUID="00ce0893-4249-43b4-964c-e47562e993d0" CreationDate="2022-06-02T11:47:10.303" UserId="94" Text="The function return an `Option&lt;Vec&lt;PalletVestingVestingInfo&gt;&gt;` and therefore needs to be unwrapped. It is explained [here](https://polkadot.js.org/docs/api/start/types.basics/#working-with-optiontype).  &#xD;&#xA;The following snipped prints the vesting info for a specific account on Polkadot.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;// Put your address here&#xD;&#xA;const addr = '...';&#xD;&#xA;const response = await api.query.vesting.vesting(addr)&#xD;&#xA;&#xD;&#xA;response.unwrapOrDefault().forEach(vesting =&gt;&#xD;&#xA;	console.log(`Address ${addr} has ${vesting.locked} locked since starting block ${vesting.startingBlock} and unlocking ${vesting.perBlock} per block.`)&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will print:  &#xD;&#xA;`Address ... has ... locked since starting block ... and unlocking ... per block.`" ContentLicense="CC BY-SA 4.0" />
  <row Id="11295" PostHistoryTypeId="2" PostId="3017" RevisionGUID="c119538b-c44a-4a92-b336-d61a8ff28aeb" CreationDate="2022-06-02T12:04:08.680" UserId="393" Text="Before this `setCode` upgrade, our parachain works well.&#xD;&#xA;After `setCode` upgrade, we get the following error log.&#xD;&#xA;&#xD;&#xA;    Jun 02 09:39:36 Parami-AWS-SFO-DANA-01 parami[490]: 2022-06-02 09:39:36 ⚠️ ParachainSystem declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(1)`&#xD;&#xA;    Jun 02 09:39:36 Parami-AWS-SFO-DANA-01 parami[490]: 2022-06-02 09:39:36 panicked at 'validation function params are always injected into inherent data; qed', /Users/right/.cargo/git/checkouts/cumulus-59522f43471fa161/05cc5f0/pallets/parachain-system/src/lib.rs:579:74&#xD;&#xA;    Jun 02 09:39:36 Parami-AWS-SFO-DANA-01 parami[490]: 2022-06-02 09:39:36 Proposing failed: ClientImport(&quot;Application(Application(Execution(Other(\&quot;Wasm execution trapped: wasm trap: unreachable\\nwasm backtrace:\\n    0: 0x4610 - &lt;unknown&gt;!rust_begin_unwind\\n    1: 0x28c2 - &lt;unknown&gt;!core::panicking::panic_fmt::h8566c1c199f4b1e9\\n    2: 0x5550 - &lt;unknown&gt;!core::panicking::panic_display::h03e149d96a13e8f5\\n    3: 0x5508 - &lt;unknown&gt;!core::panicking::panic_str::h2aae451d464e75d2\\n    4: 0x54e2 - &lt;unknown&gt;!core::option::expect_failed::h6512e249c1770a7a\\n    5: 0x37716a - &lt;unknown&gt;!BlockBuilder_inherent_extrinsics\\n\&quot;))))&quot;)&#xD;&#xA;&#xD;&#xA;When go to the source code, we see the following code in parachain-system:&#xD;&#xA;&#xD;&#xA;    fn create_inherent(data: &amp;InherentData) -&gt; Option&lt;Self::Call&gt; {&#xD;&#xA;			let data: ParachainInherentData =&#xD;&#xA;				data.get_data(&amp;Self::INHERENT_IDENTIFIER).ok().flatten().expect(&#xD;&#xA;					&quot;validation function params are always injected into inherent data; qed&quot;,&#xD;&#xA;				);&#xD;&#xA;     Some(Call::set_validation_data { data })&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;Our dependency of Substrate and Cumulus are as following:&#xD;&#xA;&#xD;&#xA;    sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false }&#xD;&#xA;     &#xD;&#xA;    cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.13' }&#xD;&#xA;&#xD;&#xA;We believe the most significant change in our upgrade is this one: https://github.com/parami-protocol/parami-blockchain/commit/41be91cfeb2aad91bed40bd4135af1a3809bda17&#xD;&#xA;&#xD;&#xA;In our updated commits, there are no substrate or polkadot relative dependency upgrade. So we are lost in this problem. Any help or direction is preciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="11297" PostHistoryTypeId="1" PostId="3017" RevisionGUID="c119538b-c44a-4a92-b336-d61a8ff28aeb" CreationDate="2022-06-02T12:04:08.680" UserId="393" Text="parachain-system can not get ParachainInherentData After runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="11298" PostHistoryTypeId="3" PostId="3017" RevisionGUID="c119538b-c44a-4a92-b336-d61a8ff28aeb" CreationDate="2022-06-02T12:04:08.680" UserId="393" Text="|runtime-upgrade|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11299" PostHistoryTypeId="5" PostId="2981" RevisionGUID="27610cb5-4de4-4de5-89da-1b9660788ca0" CreationDate="2022-06-02T12:42:44.037" UserId="34" Comment="added 50 characters in body; edited tags" Text="Are there any public Substrate-based running PoW chains out there except [Kulupu][1]?  &#xD;&#xA;If you know, please share some links.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kulupu/kulupu" ContentLicense="CC BY-SA 4.0" />
  <row Id="11300" PostHistoryTypeId="6" PostId="2981" RevisionGUID="27610cb5-4de4-4de5-89da-1b9660788ca0" CreationDate="2022-06-02T12:42:44.037" UserId="34" Comment="added 50 characters in body; edited tags" Text="|blockchain|public|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11301" PostHistoryTypeId="10" PostId="2973" RevisionGUID="1337ce89-d2f0-4209-8e3a-64a6e487b6f2" CreationDate="2022-06-02T12:48:23.307" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[334],&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="11302" PostHistoryTypeId="6" PostId="2988" RevisionGUID="2317f4e1-5e2f-443c-adc4-6058f246302c" CreationDate="2022-06-02T12:51:18.693" UserId="34" Comment="edited tags" Text="|polkadot-js|rpc|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11303" PostHistoryTypeId="6" PostId="2991" RevisionGUID="f77b3d11-3fda-4bec-ad97-760d99d3f471" CreationDate="2022-06-02T12:53:34.427" UserId="34" Comment="edited tags" Text="|polkadot-js|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11304" PostHistoryTypeId="2" PostId="3018" RevisionGUID="6ca03c23-a61a-4228-a094-4ddc2ea0efd9" CreationDate="2022-06-02T13:08:00.223" UserId="34" Text="You must use uniform dependencies for all crates! Using the tutorial suggests `latest` tag or explicitly calls out the correct to use tag for the template that is tagged latest at anytime. &#xD;&#xA;&#xD;&#xA;You should update to use `latest` throughout. And you may need to update your Cargo.lock file  to remove any confusion for cargo on deps. " ContentLicense="CC BY-SA 4.0" />
  <row Id="11306" PostHistoryTypeId="6" PostId="3006" RevisionGUID="9d01b394-5bee-4830-bd26-81255f10a306" CreationDate="2022-06-02T13:08:15.360" UserId="34" Comment="edited tags" Text="|substrate-node-template|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11307" PostHistoryTypeId="10" PostId="3006" RevisionGUID="d7bc006d-7606-4298-8c25-cdd085a13039" CreationDate="2022-06-02T13:10:32.100" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[2774],&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="11308" PostHistoryTypeId="4" PostId="3006" RevisionGUID="32986668-1cdd-4c6e-affa-8377d046ddac" CreationDate="2022-06-02T13:11:24.737" UserId="34" Comment="edited title" Text="error: failed to select a version with cargo check" ContentLicense="CC BY-SA 4.0" />
  <row Id="11309" PostHistoryTypeId="5" PostId="3017" RevisionGUID="21dc75ea-ca97-4831-a224-b93e83ab6cd4" CreationDate="2022-06-02T13:21:40.420" UserId="393" Comment="added 57 characters in body" Text="Before this `setCode` upgrade, our parachain works well.&#xD;&#xA;After `setCode` upgrade, we get the following error log.&#xD;&#xA;&#xD;&#xA;    Jun 02 09:39:36 Parami-AWS-SFO-DANA-01 parami[490]: 2022-06-02 09:39:36 ⚠️ ParachainSystem declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(1)`&#xD;&#xA;    Jun 02 09:39:36 Parami-AWS-SFO-DANA-01 parami[490]: 2022-06-02 09:39:36 panicked at 'validation function params are always injected into inherent data; qed', /Users/right/.cargo/git/checkouts/cumulus-59522f43471fa161/05cc5f0/pallets/parachain-system/src/lib.rs:579:74&#xD;&#xA;    Jun 02 09:39:36 Parami-AWS-SFO-DANA-01 parami[490]: 2022-06-02 09:39:36 Proposing failed: ClientImport(&quot;Application(Application(Execution(Other(\&quot;Wasm execution trapped: wasm trap: unreachable\\nwasm backtrace:\\n    0: 0x4610 - &lt;unknown&gt;!rust_begin_unwind\\n    1: 0x28c2 - &lt;unknown&gt;!core::panicking::panic_fmt::h8566c1c199f4b1e9\\n    2: 0x5550 - &lt;unknown&gt;!core::panicking::panic_display::h03e149d96a13e8f5\\n    3: 0x5508 - &lt;unknown&gt;!core::panicking::panic_str::h2aae451d464e75d2\\n    4: 0x54e2 - &lt;unknown&gt;!core::option::expect_failed::h6512e249c1770a7a\\n    5: 0x37716a - &lt;unknown&gt;!BlockBuilder_inherent_extrinsics\\n\&quot;))))&quot;)&#xD;&#xA;&#xD;&#xA;When go to the source code, we see the following code in parachain-system:&#xD;&#xA;&#xD;&#xA;    fn create_inherent(data: &amp;InherentData) -&gt; Option&lt;Self::Call&gt; {&#xD;&#xA;			let data: ParachainInherentData =&#xD;&#xA;				data.get_data(&amp;Self::INHERENT_IDENTIFIER).ok().flatten().expect(&#xD;&#xA;					&quot;validation function params are always injected into inherent data; qed&quot;,&#xD;&#xA;				);&#xD;&#xA;     Some(Call::set_validation_data { data })&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;Our dependency of Substrate and Cumulus are as following:&#xD;&#xA;&#xD;&#xA;    sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.13', default-features = false }&#xD;&#xA;     &#xD;&#xA;    cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.13' }&#xD;&#xA;&#xD;&#xA;And, our local rococo's version is also&#xD;&#xA;&#xD;&#xA;    0.9.13&#xD;&#xA;&#xD;&#xA;We believe the most significant change in our upgrade is this one: https://github.com/parami-protocol/parami-blockchain/commit/41be91cfeb2aad91bed40bd4135af1a3809bda17&#xD;&#xA;&#xD;&#xA;In our updated commits, there are no substrate or polkadot relative dependency upgrade. So we are lost in this problem. Any help or direction is preciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="11310" PostHistoryTypeId="2" PostId="3019" RevisionGUID="20f1f562-6a66-44a2-b8b7-733e8bdc918d" CreationDate="2022-06-02T14:50:59.683" UserId="2163" Text="I am curious if there is a way to access the runtime pallet functions from javascript. Is there such ability in the polkadot npm package?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11312" PostHistoryTypeId="1" PostId="3019" RevisionGUID="20f1f562-6a66-44a2-b8b7-733e8bdc918d" CreationDate="2022-06-02T14:50:59.683" UserId="2163" Text="How can I call substrate pallet functions from js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11313" PostHistoryTypeId="3" PostId="3019" RevisionGUID="20f1f562-6a66-44a2-b8b7-733e8bdc918d" CreationDate="2022-06-02T14:50:59.683" UserId="2163" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11314" PostHistoryTypeId="2" PostId="3020" RevisionGUID="c599ca3e-a051-48d2-8b00-2f84b8d04573" CreationDate="2022-06-02T15:42:59.567" UserId="28" Text="I think you are asking how to submit a transaction to your chain using Polkadot JS, which is outlined in their documentation here:&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/docs/api/start/api.tx&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/docs/api/examples/promise/make-transfer&#xD;&#xA;&#xD;&#xA;Here is a copy of the example from the page above:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// Import the API, Keyring and some utility functions&#xD;&#xA;const { ApiPromise } = require('@polkadot/api');&#xD;&#xA;const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;&#xD;&#xA;const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  // Instantiate the API&#xD;&#xA;  const api = await ApiPromise.create();&#xD;&#xA;&#xD;&#xA;  // Constuct the keyring after the API (crypto has an async init)&#xD;&#xA;  const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;&#xD;&#xA;  // Add Alice to our keyring with a hard-deived path (empty phrase, so uses dev)&#xD;&#xA;  const alice = keyring.addFromUri('//Alice');&#xD;&#xA;&#xD;&#xA;  // Create a extrinsic, transferring 12345 units to Bob&#xD;&#xA;  const transfer = api.tx.balances.transfer(BOB, 12345);&#xD;&#xA;&#xD;&#xA;  // Sign and send the transaction using our account&#xD;&#xA;  const hash = await transfer.signAndSend(alice);&#xD;&#xA;&#xD;&#xA;  console.log('Transfer sent with hash', hash.toHex());&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These transactions are ultimately generated by:&#xD;&#xA;&#xD;&#xA;1. Using metadata to understand how to compose a transaction message&#xD;&#xA;2. Submitting the transaction to the node's RPC endpoint&#xD;&#xA;&#xD;&#xA;If you want to call other internal functionalities of your runtime, you may want to expose custom RPCs.&#xD;&#xA;&#xD;&#xA;See: https://substrate.stackexchange.com/questions/1317/how-do-i-include-a-new-rpc-that-uses-a-networkworker-in-the-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="11316" PostHistoryTypeId="2" PostId="3021" RevisionGUID="83b4f05d-92d4-4132-a788-bfcebe521215" CreationDate="2022-06-02T15:43:14.853" UserId="29" Text="Couple things to make sure:&#xD;&#xA;&#xD;&#xA;- bump the [spec_version](https://docs.substrate.io/v3/runtime/upgrades/#runtime-versioning)&#xD;&#xA;- use [`authorize_upgrade`](https://docs.substrate.io/how-to-guides/v3/parachains/runtime-upgrades/#2-authorize---enact-an-upgrade-flow) and [`enact_authorized_upgrade`](https://docs.substrate.io/how-to-guides/v3/parachains/runtime-upgrades/#2-authorize---enact-an-upgrade-flow)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11318" PostHistoryTypeId="2" PostId="3022" RevisionGUID="b0213c4f-0e49-4eda-b099-7020f5696608" CreationDate="2022-06-02T15:43:18.813" UserId="12" Text="This is documented here https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event&#xD;&#xA;&#xD;&#xA;You can also find an example here https://github.com/danforbes/parachain-demo/blob/main/start-collator.mjs#L165" ContentLicense="CC BY-SA 4.0" />
  <row Id="11320" PostHistoryTypeId="5" PostId="3019" RevisionGUID="0d9a0db2-c099-47f2-ab96-ed4af427f6b4" CreationDate="2022-06-02T15:55:07.717" UserId="2163" Comment="added 8 characters in body" Text="I am curious if there is a way to access some internal runtime pallet functions from javascript. Is there such ability in the polkadot npm package?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11321" PostHistoryTypeId="2" PostId="3023" RevisionGUID="1ebd6191-ec79-49fc-9d96-f643ab365d8e" CreationDate="2022-06-02T16:06:45.490" UserId="1987" Text="&#xD;&#xA;I had setup the relay chain and parachain (collator-1) in a local testnet enviornment on different servers and blocks was finalizing for both.&#xD;&#xA;But after 1 month I tried adding another collator(collator-2) on same relaychain but its not finalizing blocks and also the previous collator(collator-1) stopped finalizing the blocks and showing an error &quot;Collation wasn't advertised to any validator&quot;&#xD;&#xA;&#xD;&#xA;collator-1 error logs-&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     2022-06-01 17:18:36 [Parachain] PoV size { header: 0.220703125kb, extrinsics: 2.5576171875kb, storage_proof: 9.318359375kb }&#xD;&#xA;     2022-06-01 17:18:36 [Parachain] Compressed PoV size: 11.1484375kb&#xD;&#xA;     2022-06-01 17:18:36 [Parachain] Produced proof-of-validity candidate. block_hash=0x11aec83abc1246d85d64a05733f478fa26999beb971a2b6675a57c414c8945fe&#xD;&#xA;     2022-06-01 17:18:36 [Relaychain]  Idle (4 peers), best: #580555 (0x4903…0aa0), finalized #580552 (0x6b19…196d), ⬇ 2.2kiB/s ⬆ 2.2kiB/s&#xD;&#xA;     2022-06-01 17:18:36 [Parachain]  Idle (0 peers), best: #274796 (0x494f…61e7), finalized #274794 (0xd062…e40c), ⬇ 65 B/s ⬆ 86 B/s&#xD;&#xA;     2022-06-01 17:18:37 Accepted a new tcp connection from 127.0.0.1:45496.&#xD;&#xA;     2022-06-01 17:18:37 Accepted a new tcp connection from 127.0.0.1:45506.&#xD;&#xA;     2022-06-01 17:18:41 Accepted a new tcp connection from 127.0.0.1:47060.&#xD;&#xA;     2022-06-01 17:18:41 [Relaychain]  Idle (4 peers), best: #580555 (0x4903…0aa0), finalized #580553 (0xac92…2a37), ⬇ 1.4kiB/s ⬆ 1.3kiB/s&#xD;&#xA;     2022-06-01 17:18:41 [Parachain]  Idle (0 peers), best: #274796 (0x494f…61e7), finalized #274795 (0x2544…788e), ⬇ 0 ⬆ 0&#xD;&#xA;     2022-06-01 17:18:42 [Relaychain] ✨ Imported #580556 (0xb739…d8ff)&#xD;&#xA;     2022-06-01 17:18:42 [Parachain] Starting collation. relay_parent=0xb739e12c0e91e6516b90a73929c765f2c66e67aed239c420cfdffe7013b8d8ff at=0x494f4f6b232e8221e3aa56a0f44592eba04a5249ff058f5ae85872010b8861e7&#xD;&#xA;     2022-06-01 17:18:42 [Relaychain] ♻️  Reorg on #580556,0xb739…d8ff to #580556,0x8fba…d379, common ancestor #580555,0x4903…0aa0&#xD;&#xA;     2022-06-01 17:18:42 [Relaychain] ✨ Imported #580556 (0x8fba…d379)&#xD;&#xA;     2022-06-01 17:18:42 [Parachain] Starting collation. relay_parent=0x8fbae1f1bb8694d22492b9fa2b14c9d2b698800152d1aa556dc2e63ef499d379 at=0x494f4f6b232e8221e3aa56a0f44592eba04a5249ff058f5ae85872010b8861e7&#xD;&#xA;     2022-06-01 17:18:46 [Relaychain]  Idle (4 peers), best: #580556 (0x8fba…d379), finalized #580554 (0xe7ed…2446), ⬇ 2.7kiB/s ⬆ 2.6kiB/s&#xD;&#xA;     2022-06-01 17:18:46 [Parachain]  Idle (0 peers), best: #274796 (0x494f…61e7), finalized #274795 (0x2544…788e), ⬇ 0 ⬆ 0&#xD;&#xA;     2022-06-01 17:18:48 [Relaychain] ✨ Imported #580557 (0x28a7…4722)&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] Starting collation. relay_parent=0x28a75a8ec01b2d1c0c3c5217565490a476ff9b4f890e5f62c163cb153e3a4722 at=0x494f4f6b232e8221e3aa56a0f44592eba04a5249ff058f5ae85872010b8861e7&#xD;&#xA;     2022-06-01 17:18:48 [Parachain]  Starting consensus session on top of parent 0x494f4f6b232e8221e3aa56a0f44592eba04a5249ff058f5ae85872010b8861e7&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] on_timestamp_set called&#xD;&#xA;     2022-06-01 17:18:48 [Parachain]  Prepared block for proposing at 274797 (1 ms) [hash: 0x0947a20046b254b258429c165b7d216d0b33bb0294e3b7f52634384a25c681a9; parent_hash: 0x494f…61e7; extrinsics (2): [0x2636…0777, 0x430c…2fc5]]&#xD;&#xA;     2022-06-01 17:18:48 [Parachain]  Pre-sealed block for proposal at 274797. Hash now 0xc41c88a611b28e289b5b816e32040c5324a3e8072a4537d8b173674655aa57cc, previously 0x0947a20046b254b258429c165b7d216d0b33bb0294e3b7f52634384a25c681a9.&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] ✨ Imported #274797 (0xc41c…57cc)&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] PoV size { header: 0.220703125kb, extrinsics: 2.5576171875kb, storage_proof: 9.318359375kb }&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] Compressed PoV size: 11.1484375kb&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] Produced proof-of-validity candidate. block_hash=0xc41c88a611b28e289b5b816e32040c5324a3e8072a4537d8b173674655aa57cc&#xD;&#xA;     2022-06-01 17:18:51 [Relaychain]  Idle (4 peers), best: #580557 (0x28a7…4722), finalized #580554 (0xe7ed…2446), ⬇ 1.3kiB/s ⬆ 1.5kiB/s&#xD;&#xA;     2022-06-01 17:18:51 [Parachain]  Idle (0 peers), best: #274796 (0x494f…61e7), finalized #274795 (0x2544…788e), ⬇ 0 ⬆ 0&#xD;&#xA;     2022-06-01 17:18:52 [Relaychain]  Applying authority set change scheduled at block #580555&#xD;&#xA;     2022-06-01 17:18:52 [Relaychain]  Applying GRANDPA set change to new set [(Public(88dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee (5FA9nQDV...)), 1), (Public(d17c2d7823ebf260fd138f2d7e27d114c0145d968b5ff5006125f2414fadae69 (5GoNkf6W...)), 1)]&#xD;&#xA;     2022-06-01 17:18:54 [Relaychain] ✨ Imported #580558 (0xd49f…8314)&#xD;&#xA;     2022-06-01 17:18:54 [Relaychain] Collation wasn't advertised to any validator. candidate_hash=0x5edc61513bdcfb7b82d2e891252362bd16b54d6ee55e5e88c7404da0000a736c pov_hash=0xa0e6b151f64d8ef00997c806c5bffedb0773ef5be0e576bd0601193ebfca6425&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Steps I had done to add both the collators-&#xD;&#xA;&#xD;&#xA;Collator-1 Steps-&#xD;&#xA;&#xD;&#xA;1.Generated plain spec and updated ParaID&#xD;&#xA;./node build-spec --disable-default-bootnode --chain test &gt; test-parachain-plain.json&#xD;&#xA;&#xD;&#xA;2.Generated raw chain spec&#xD;&#xA;./node build-spec --chain test-parachain-plain.json --raw --disable-default-bootnode &gt; test-parachain-2000-raw.json&#xD;&#xA;&#xD;&#xA;3.Obtained Wasm runtime &#xD;&#xA;./node export-genesis-wasm --chain test-parachain-2000-raw.json &gt; para-2000-wasm&#xD;&#xA;&#xD;&#xA;4.Generated genesis state&#xD;&#xA;./node export-genesis-state --chain test-parachain-2000-raw.json &gt; para-2000-genesis&#xD;&#xA;&#xD;&#xA;5.Added keys to the keystore&#xD;&#xA;./node key insert --base-path /data/parachain/test --chain test-parachain-2000-raw.json --scheme Sr25519 --suri &lt;1st-account-secret-seed-key&gt; --key-type aura&#xD;&#xA;&#xD;&#xA;6.Started the collator node&#xD;&#xA;./node --collator --force-authoring --chain test-parachain-2000-raw.json --base-path /data/parachain/test --name &quot;Test-Collator-1&quot; --pruning archive --port 40343  --ws-external --ws-port 9955 --rpc-external --rpc-port 9943 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --rpc-methods=unsafe --rpc-cors all -- --execution wasm --chain rococo-local.json --port 30343 --ws-port 9977 --bootnodes /ip4/&lt;relaychain-IP&gt;/tcp/30333/p2p/&lt;local-node-identity&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Collator-2 Steps-&#xD;&#xA;&#xD;&#xA;1.Copied raw spec file from collator-1 node to collecter-2 node&#xD;&#xA;&#xD;&#xA;2.Added keys to the keystore&#xD;&#xA;./node key insert --base-path /data/parachain/test --chain test-parachain-2000-raw.json --scheme Sr25519 --suri &lt;2nd-account-secret-seed-key&gt; --key-type aura&#xD;&#xA;&#xD;&#xA;3.Started the collator node&#xD;&#xA;./node --collator --force-authoring --chain test-parachain-2000-raw.json --base-path /data/parachain/test --name &quot;Test-Collator-2&quot; --pruning archive --port 40344  --ws-external --ws-port 9956 --rpc-external --rpc-port 9944 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --rpc-methods=unsafe --rpc-cors all -- --execution wasm --chain rococo-local.json --port 30344 --ws-port 9978 --bootnodes /ip4/&lt;relaychain-IP&gt;/tcp/30333/p2p/&lt;local-node-identity&gt;&#xD;&#xA;&#xD;&#xA;Does somebody have any idea how to resolve this issue?&#xD;&#xA;Is collator-1 will start finalizing blocks from where it stopped? If yes how can I restore back please" ContentLicense="CC BY-SA 4.0" />
  <row Id="11323" PostHistoryTypeId="1" PostId="3023" RevisionGUID="1ebd6191-ec79-49fc-9d96-f643ab365d8e" CreationDate="2022-06-02T16:06:45.490" UserId="1987" Text="Parachain blocks stopped finalizing after adding another collator" ContentLicense="CC BY-SA 4.0" />
  <row Id="11324" PostHistoryTypeId="3" PostId="3023" RevisionGUID="1ebd6191-ec79-49fc-9d96-f643ab365d8e" CreationDate="2022-06-02T16:06:45.490" UserId="1987" Text="|parachain|collator|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11325" PostHistoryTypeId="34" PostId="1987" RevisionGUID="78cf8c99-9795-4764-ab69-674ccdd7c8b4" CreationDate="2022-06-02T17:04:55.483" UserId="-1" Comment="6" />
  <row Id="11326" PostHistoryTypeId="2" PostId="3024" RevisionGUID="ef6e31a2-0555-44de-991b-e755c7318c9c" CreationDate="2022-06-02T18:23:31.410" UserId="372" Text="Runtime APIs are declared using the [`decl_runtime_api!` macro](https://crates.parity.io/sp_api/macro.decl_runtime_apis.html). This is typically in a primitives crate. For example:&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;decl_runtime_apis! {&#xD;&#xA;	pub trait ExampleApi {&#xD;&#xA;		fn get_info(param1: u32, param2: u32) -&gt; bool;&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then they are implemented with the [`impl_runtime_api!` macro](https://crates.parity.io/sp_api/macro.impl_runtime_apis.html). This is in the Runtime. Continuing the example:&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;impl_runtime_apis! {&#xD;&#xA;	impl ExampleApi&lt;Block&gt; for Runtime {&#xD;&#xA;		fn get_info(param1: u32, param2: u32) -&gt; bool {&#xD;&#xA;			param1 == param2&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally, they can be called from client side. Here there are no macros used, but there is an additional parameter for the block at which the call should be made. Completing the example:&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;let block_to_call_at = BlockId::Hash(parent.hash());&#xD;&#xA;client.runtime_api().get_info(&amp;block_to_call_at, 5, 10)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Question**: Where is the machinery that handles the block height parameter, and passes the remaining parameters into the wasm runtime? Is this handled in the macros? When writing a runtime in a non-Rust language, does one need to reproduce any logic from the macros?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11328" PostHistoryTypeId="1" PostId="3024" RevisionGUID="ef6e31a2-0555-44de-991b-e755c7318c9c" CreationDate="2022-06-02T18:23:31.410" UserId="372" Text="Why do runtime APIs have a block_height parameter on the client side but not on the runtime side?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11329" PostHistoryTypeId="3" PostId="3024" RevisionGUID="ef6e31a2-0555-44de-991b-e755c7318c9c" CreationDate="2022-06-02T18:23:31.410" UserId="372" Text="|macro|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11330" PostHistoryTypeId="2" PostId="3025" RevisionGUID="c01fb805-92a6-4087-84d3-4316bf5b5264" CreationDate="2022-06-02T19:04:34.737" UserId="283" Text="The block hash is for client-side rather than the runtime itself - it tells the client to invoke the runtime API using the post-state of the given block hash. The way this manifests is in how the client, which hosts the runtime, answers host functions called by the runtime Wasm as it executes. Most notably, it affects the host functions pertaining to storage. The client also selects and executes the runtime Wasm code which was available as-of the post-state of the given block.&#xD;&#xA;&#xD;&#xA;The actual generated Wasm ABI for the runtime API functions doesn't accept the block hash as a parameter. This means that if you write a runtime without using FRAME, it will still be compatible with the Substrate client's runtime API system as long as the ABI of the exposed functions is consistent.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The `impl_runtime_apis` macro also implements [`ProvideRuntimeApis`](https://crates.parity.io/sp_api/trait.ProvideRuntimeApi.html) for the Client, when the runtime is compiled for native and linked into the node binary itself. This internal implementation detail is likely to change when the native runtime is no longer required by Substrate. Currently, it [generates a wrapper](https://crates.parity.io/src/sp_api_proc_macro/impl_runtime_apis.rs.html#331) around anything which implements [`CallApiAt`](https://crates.parity.io/sp_api/trait.CallApiAt.html), which is a trait implemented for every `Client`." ContentLicense="CC BY-SA 4.0" />
  <row Id="11332" PostHistoryTypeId="2" PostId="3026" RevisionGUID="86d6563f-d82e-43fe-8aff-fd879e7f3f04" CreationDate="2022-06-02T21:06:23.910" UserId="12" Text="The only runtime functions you can access from Javascript are &quot;dispatchable&quot; functions, which are usually accessed by way of signed transactions. By definition, you cannot access &quot;internal&quot; runtime functions from outside of the runtime, e.g. Javascript." ContentLicense="CC BY-SA 4.0" />
  <row Id="11334" PostHistoryTypeId="2" PostId="3027" RevisionGUID="5b337d64-b109-49c3-b7d3-76922f0108a9" CreationDate="2022-06-02T22:18:42.787" UserId="2686" Text="I see the node provides a metrics port to be used with prometheus, just want to check whether can add a new metrics to provide the current ws connection number" ContentLicense="CC BY-SA 4.0" />
  <row Id="11336" PostHistoryTypeId="1" PostId="3027" RevisionGUID="5b337d64-b109-49c3-b7d3-76922f0108a9" CreationDate="2022-06-02T22:18:42.787" UserId="2686" Text="Add `current WS connection number` metric" ContentLicense="CC BY-SA 4.0" />
  <row Id="11337" PostHistoryTypeId="3" PostId="3027" RevisionGUID="5b337d64-b109-49c3-b7d3-76922f0108a9" CreationDate="2022-06-02T22:18:42.787" UserId="2686" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11338" PostHistoryTypeId="52" PostId="3019" RevisionGUID="ea5ea602-8380-41c4-b5b9-25fd91a57aa0" CreationDate="2022-06-02T22:51:03.067" />
  <row Id="11339" PostHistoryTypeId="6" PostId="3027" RevisionGUID="084f9537-41cd-4f2d-8760-8a2d763d8cb9" CreationDate="2022-06-03T00:55:08.993" UserId="34" Comment="edited tags" Text="|prometheus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11340" PostHistoryTypeId="2" PostId="3028" RevisionGUID="88d8aa48-69ce-4a0a-b39c-918e9bbd5302" CreationDate="2022-06-03T01:03:53.330" UserId="245" Text="Is there a way to determine/calculate what the minimum block time would be? If not, what could we consider before lowering the block time, and how to monitor the side effects of small block time?&#xD;&#xA;&#xD;&#xA;I know that there are lots of things to consider before doing this, but I just wonder about the possibility of the lower block times." ContentLicense="CC BY-SA 4.0" />
  <row Id="11342" PostHistoryTypeId="1" PostId="3028" RevisionGUID="88d8aa48-69ce-4a0a-b39c-918e9bbd5302" CreationDate="2022-06-03T01:03:53.330" UserId="245" Text="What is the possible minimum block time?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11343" PostHistoryTypeId="3" PostId="3028" RevisionGUID="88d8aa48-69ce-4a0a-b39c-918e9bbd5302" CreationDate="2022-06-03T01:03:53.330" UserId="245" Text="|block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11344" PostHistoryTypeId="2" PostId="3029" RevisionGUID="6dbb3af7-7853-412a-a14a-0d4e36d28686" CreationDate="2022-06-03T01:33:30.423" UserId="34" Text="**TLDR: the snippet of the `curl` below I think has the specific metrics to look at. I _think_ what you want is `substrate_rpc_sessions_opened - substrate_rpc_sessions_closed`**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can see all metrics included following [the data viz tutorial](https://github.com/substrate-developer-hub/substrate-docs/edit/main/v3/tutorials/06-node-metrics/index.mdx):&#xD;&#xA;&#xD;&#xA;- Install Prometheus [here](https://prometheus.io/docs/prometheus/latest/installation/).&#xD;&#xA;- Install OSS Grafana [here](https://grafana.com/grafana/download?edition=oss).&#xD;&#xA;&#xD;&#xA;Substrate exposes an endpoint which serves metrics in the [Prometheus exposition&#xD;&#xA;format](https://prometheus.io/docs/concepts/data_model/) available on port&#xD;&#xA;`9615`. You can change the port with `--prometheus-port &lt;PORT&gt;` and enable it to&#xD;&#xA;be accessed over an interface other than local host with&#xD;&#xA;`--prometheus-external`.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;# Optionally add the `--prometheus-port &lt;PORT&gt;`&#xD;&#xA;# or `--prometheus-external` flags&#xD;&#xA;./target/release/node-template --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Configure Prometheus to scrape your Substrate node&#xD;&#xA;&#xD;&#xA;In the working directory where you installed Prometheus, you will find a `prometheus.yml` configuration file.&#xD;&#xA;Let's modify this (or create a custom new on) to configure Prometheus to scrape the exposed endpoint by adding&#xD;&#xA;it to the targets array. If you modify the default, here is what will be different:&#xD;&#xA;&#xD;&#xA;```yml&#xD;&#xA;# --snip--&#xD;&#xA;&#xD;&#xA;# A scrape configuration containing exactly one endpoint to scrape:&#xD;&#xA;# Here it's Prometheus itself.&#xD;&#xA;scrape_configs:&#xD;&#xA;  # The job name is added as a label `job=&lt;job_name&gt;` to any timeseries scraped from this config.&#xD;&#xA;  - job_name: 'substrate_node'&#xD;&#xA;&#xD;&#xA;    # metrics_path defaults to '/metrics'&#xD;&#xA;    # scheme defaults to 'http'.&#xD;&#xA;&#xD;&#xA;    # Override the global default and scrape targets from this job every 5 seconds.&#xD;&#xA;    # ** NOTE: you want to have this *LESS THAN* the block time in order to ensure&#xD;&#xA;    # ** that you have a data point for every block!&#xD;&#xA;    scrape_interval: 5s&#xD;&#xA;&#xD;&#xA;    static_configs:&#xD;&#xA;      - targets: ['localhost:9615']&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&lt;br /&gt;&#xD;&#xA;&lt;Message&#xD;&#xA;  type={`gray`}&#xD;&#xA;  title={`Note`}&#xD;&#xA;  text=&quot;You want to have `scrape_interval` _less than_ the block time in order to ensure that you have a data point for every block!&quot;&#xD;&#xA;/&gt;&#xD;&#xA;&#xD;&#xA;Now we can start a Prometheus instance with the prometheus.yml config file. Presuming you downloaded the binary,&#xD;&#xA;`cd` into the install directory and run:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;# specify a custom config file instead if you made one here:&#xD;&#xA;./prometheus --config.file prometheus.yml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;leave this process running.&#xD;&#xA;&#xD;&#xA;### Check All Prometheus Metrics&#xD;&#xA;&#xD;&#xA;In a new terminal, we can do a quick status check on prometheus:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;curl localhost:9615/metrics&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which should return a similar output to:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;# HELP substrate_rpc_requests_finished Number of RPC requests (not calls) processed by the server.&#xD;&#xA;# TYPE substrate_rpc_requests_finished counter&#xD;&#xA;substrate_rpc_requests_finished{protocol=&quot;ws&quot;,chain=&quot;dev&quot;} 36&#xD;&#xA;# HELP substrate_rpc_requests_started Number of RPC requests (not calls) received by the server.&#xD;&#xA;# TYPE substrate_rpc_requests_started counter&#xD;&#xA;substrate_rpc_requests_started{protocol=&quot;ws&quot;,chain=&quot;dev&quot;} 36&#xD;&#xA;# HELP substrate_rpc_sessions_closed Number of persistent RPC sessions closed&#xD;&#xA;# TYPE substrate_rpc_sessions_closed counter&#xD;&#xA;substrate_rpc_sessions_closed{chain=&quot;dev&quot;} 1&#xD;&#xA;# HELP substrate_rpc_sessions_opened Number of persistent RPC sessions opened&#xD;&#xA;# TYPE substrate_rpc_sessions_opened counter&#xD;&#xA;substrate_rpc_sessions_opened{chain=&quot;dev&quot;} 2&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Alternatively in a browser open that same URL (http://localhost:9615/metrics) to view&#xD;&#xA;all available metric data.&#xD;&#xA;&#xD;&#xA;&gt; Here you can see the `HELP` fields for each metric that is exposed for monitoring via Grafana.&#xD;&#xA;&gt;Visualizing Prometheus Metrics with Grafana is not required, but quite powerful!" ContentLicense="CC BY-SA 4.0" />
  <row Id="11346" PostHistoryTypeId="2" PostId="3030" RevisionGUID="caf94b0e-5d17-463a-8989-137109d7891e" CreationDate="2022-06-03T02:10:12.733" UserId="28" Text="There is not a way to deterministically calculate a minimum block time, since it is ultimately a soft metric.&#xD;&#xA;&#xD;&#xA;To help with your decision process, you should understand the breakdown of the current default Substrate block time of 6 seconds:&#xD;&#xA;&#xD;&#xA;* 2 seconds allocated to block production by a validator&#xD;&#xA;* 2 seconds allocated to block import by all syncing nodes, including other validators&#xD;&#xA;    * Note: this is where the Weight limit for a block comes from.&#xD;&#xA;* 2 seconds allocated for network propagation of new blocks&#xD;&#xA;&#xD;&#xA;If you reduce the block time of your chain, you must reduce some of the assumptions above.&#xD;&#xA;&#xD;&#xA;You can always reduce the amount of weight available per block, for example only allocating .5 seconds for block production and block import. However, you will reduce the amount of transactions you are able to do in a single block by 4x in this scenario.&#xD;&#xA;&#xD;&#xA;It is not clear to me that you can similarly just reduce the overhead for network propagation, but it should also be clear that this metric seems incredibly hard to robustly benchmark. Nodes can be spun up anywhere in the world, with varying network capabilities and bandwidth.&#xD;&#xA;&#xD;&#xA;By lowering the allocated network propagation time, you risk your network forking more often and likely create delays in finalization. Beyond that, in the extreme scenarios, it is unlikely your distributed network would be able to keep up with some milli-second block times.&#xD;&#xA;&#xD;&#xA;Additionally, there are likely some overheads within the runtime / blockchain environment that we ignore due to how small they are relative to the block time. For example, there may be some processes which have a cumulative 100 ms delay that we are not currently measuring. Relative to the 6 second block time, this is only ~1.7% error, which is probably within any reasonable margin for error for these kinds of systems. However, if your block time was just 1 second, then this constant overhead now becomes 10%. This would probably be beyond what is acceptable margins for error. I am unaware of any such overhead that we are not tracking, but it is worth considering these kinds of non-scaling effects.&#xD;&#xA;&#xD;&#xA;Finally, there is an optimization problem. Assume that you do reduce the network propagation to 1 second, while keeping computation at .5 seconds. That means for a 2 second block, you will get a total of .5 seconds of weight to work with. So 1/4th of your block time will be used for actual runtime logic. On the other hand, the default configuration gives 2 seconds of computation for 6 second blocks, which is 1/3rd of your block used for runtime logic.&#xD;&#xA;&#xD;&#xA;Since it is not clear how aggressive you can get with the networking propagation delay, likely driving lower and lower numbers will actually be a negative return on how much your blockchain will actually be able to process.&#xD;&#xA;&#xD;&#xA;That being said, all of these things are completely customizable on Substrate, and if you are working in certain controlled environments, like all nodes on a local network, you probably can push these numbers pretty hard. Testing and benchmarking of your Substrate network will be the only way to really determine how low you can safely get your block time." ContentLicense="CC BY-SA 4.0" />
  <row Id="11348" PostHistoryTypeId="6" PostId="3028" RevisionGUID="f1ecd57f-a381-4b68-88e4-8e57d466f4fc" CreationDate="2022-06-03T02:13:38.100" UserId="28" Comment="edited tags" Text="|benchmarking|block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11349" PostHistoryTypeId="52" PostId="3024" RevisionGUID="acf31204-1602-48ce-97ad-f3b13084ba0a" CreationDate="2022-06-03T02:27:04.407" />
  <row Id="11350" PostHistoryTypeId="5" PostId="2791" RevisionGUID="cc708a54-8891-4c87-8118-6d3add11c115" CreationDate="2022-06-03T04:02:29.923" UserId="2057" Comment="added 4 characters in body" Text="thanks guys for offering answers. I got partial answer from @Luna. Here is solution I came up with.&#xD;&#xA; &#xD;&#xA;Problem: After firing n number of transactions in burst, from same address, I wanted api which will help me know how many %transactions have been committed to blockchain.&#xD;&#xA; &#xD;&#xA;Solution: While firing transitions in burst, I keep note of `startNonce`, `endingNonce` as nonce of first and last transaction I fired. Then I implemented `statusCheck()` function which gives me % of committed transactions as below.&#xD;&#xA;&#xD;&#xA;    statusCheck() {&#xD;&#xA;      blockHash = await api.rpc.chain.getBlockHash(); //get # of latest block&#xD;&#xA;      lastCommitedNonce = await api.query.system.account.at(blockHash, stashId); // get latest committed nonce &#xD;&#xA;      percentTransactionsCompleted = based on startNonce, endingNonce and lastCommitedNonce &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My web app is happy to call `statusCheck()` periodically to know latest committed transaction status.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11355" PostHistoryTypeId="2" PostId="3032" RevisionGUID="02b63131-e720-4716-a1d1-1ba53aaf7a40" CreationDate="2022-06-03T04:45:04.580" UserId="180" Text="I am testing Kitties [example][1]. Substrate template code is on Machine 1, Nodejs template  code is on Machine 2. And I encounted this error(when start nodejs template):&#xD;&#xA;&#xD;&#xA;`Error Connecting to Substrate&#xD;&#xA;Connection to websocket 'ws://192.168.1.108:9944/' failed.`&#xD;&#xA;&#xD;&#xA;Is there anyway to Substrate code listen from LAN network?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/kitties/pt1/" ContentLicense="CC BY-SA 4.0" />
  <row Id="11357" PostHistoryTypeId="1" PostId="3032" RevisionGUID="02b63131-e720-4716-a1d1-1ba53aaf7a40" CreationDate="2022-06-03T04:45:04.580" UserId="180" Text="Can not access Substrate from LAN network" ContentLicense="CC BY-SA 4.0" />
  <row Id="11358" PostHistoryTypeId="3" PostId="3032" RevisionGUID="02b63131-e720-4716-a1d1-1ba53aaf7a40" CreationDate="2022-06-03T04:45:04.580" UserId="180" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11359" PostHistoryTypeId="2" PostId="3033" RevisionGUID="0112ebfd-ecf0-45e5-96b0-ea71a7e82711" CreationDate="2022-06-03T06:24:19.733" UserId="2689" Text="I tried to incorporate the simple-map pallet from the substrate.recipes to the substrate-node-template with the updated mocks.rs and tests.rs.&#xD;&#xA;&#xD;&#xA;When I run with `cargo test`, I see the following test results:&#xD;&#xA;```&#xD;&#xA;running 7 tests&#xD;&#xA;test mock::__construct_runtime_integrity_test::runtime_integrity_tests ... ok&#xD;&#xA;test tests::get_throws ... ok&#xD;&#xA;test tests::get_works ... FAILED&#xD;&#xA;test tests::increase_works ... FAILED&#xD;&#xA;test tests::set_works ... FAILED&#xD;&#xA;test tests::take_throws ... ok&#xD;&#xA;test tests::take_works ... FAILED&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The 4 failed tests have the error message similar to the following:&#xD;&#xA;```&#xD;&#xA;thread 'tests::set_works' panicked at 'events expected', &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems to me that the test failed at the following line of code:&#xD;&#xA;```&#xD;&#xA;System::assert_last_event(expected_event);&#xD;&#xA;```&#xD;&#xA;At https://github.com/limcheekin/substrate-tutorials/blob/recipes/pallets/simple-map/src/tests.rs#L14&#xD;&#xA;&#xD;&#xA;Any clue/idea on how to fix the tests and make it pass? &#xD;&#xA;Appreciate your advice and kindly let me know if you need more information.&#xD;&#xA;&#xD;&#xA;Feel free to clone the repo and check out the `recipes` branch to re-produce the error locally.&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="11361" PostHistoryTypeId="1" PostId="3033" RevisionGUID="0112ebfd-ecf0-45e5-96b0-ea71a7e82711" CreationDate="2022-06-03T06:24:19.733" UserId="2689" Text="Tests failed on expected event for simple-map pallet in the substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="11362" PostHistoryTypeId="3" PostId="3033" RevisionGUID="0112ebfd-ecf0-45e5-96b0-ea71a7e82711" CreationDate="2022-06-03T06:24:19.733" UserId="2689" Text="|substrate-node-template|testing|substrate-recipes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11363" PostHistoryTypeId="2" PostId="3034" RevisionGUID="79f6ff55-5f08-44c7-a3de-b563cd919b35" CreationDate="2022-06-03T06:25:05.727" UserId="2103" Text="I have used a storage map on the backend with a key of type T::Hash but now if I want to query the storage I need the specific key. I can create the key by using a hash function but I don't know which algorithm is being used in the T::Hashing::hash_of() function." ContentLicense="CC BY-SA 4.0" />
  <row Id="11365" PostHistoryTypeId="1" PostId="3034" RevisionGUID="79f6ff55-5f08-44c7-a3de-b563cd919b35" CreationDate="2022-06-03T06:25:05.727" UserId="2103" Text="which algorithm does T::Hashing::hash_of() uses?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11366" PostHistoryTypeId="3" PostId="3034" RevisionGUID="79f6ff55-5f08-44c7-a3de-b563cd919b35" CreationDate="2022-06-03T06:25:05.727" UserId="2103" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11371" PostHistoryTypeId="2" PostId="3036" RevisionGUID="f56eb9ee-2a47-4d0e-9cd1-aa3f6b81fb02" CreationDate="2022-06-03T08:39:55.777" UserId="527" Text="Relay Chain does not recognize any other chain as a reserve: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/xcm_config.rs#L137&#xD;&#xA;&#xD;&#xA;Therefore, when it receives a `ReserveAssetDeposited`, it will fail with `UntrustedReserveLocation`: https://github.com/paritytech/polkadot/blob/master/xcm/xcm-executor/src/lib.rs#L288-L291&#xD;&#xA;&#xD;&#xA;If you want to reserve transfer back you shouldn't send a `ReserveAssetDeposited`, you should make use of `InitiateReserveWithdraw`. Unfortunately, there is not yet any dispatchable in `pallet-xcm` to perform it, but you can find an example in `xTokens`: https://github.com/open-web3-stack/open-runtime-module-library/blob/c439a50e01944aedeef33231e0824a17ed1813bc/xtokens/src/lib.rs#L659-L677" ContentLicense="CC BY-SA 4.0" />
  <row Id="11377" PostHistoryTypeId="2" PostId="3038" RevisionGUID="0e4104f3-8a86-4a46-a21d-14ad07693bcc" CreationDate="2022-06-03T10:02:09.780" UserId="2649" Text="i try to import fc-rpc on fronter.&#xD;&#xA;but got some error message&#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;Compiling fc-rpc v2.0.0-dev (https://github.com/paritytech/frontier.git#9d4ccba8)&#xD;&#xA;error[E0432]: unresolved import `sc_rpc::Metadata`&#xD;&#xA;  --&gt; /home/kula/.cargo/git/checkouts/frontier-b4643f17507d3282/9d4ccba/client/rpc/src/eth_pubsub.rs:38:5&#xD;&#xA;   |&#xD;&#xA;38 | use sc_rpc::Metadata;&#xD;&#xA;   |     ^^^^^^^^^^^^^^^^ no `Metadata` in the root&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0432`.&#xD;&#xA;error: could not compile `fc-rpc` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;what's wrong with this?&#xD;&#xA;&#xD;&#xA;my rust toolcain&#xD;&#xA;```toml&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;nightly&quot;&#xD;&#xA;components = [ &quot;rustfmt&quot;, &quot;clippy&quot; ]&#xD;&#xA;targets = [ &quot;wasm32-unknown-unknown&quot; ]&#xD;&#xA;profile = &quot;minimal&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11379" PostHistoryTypeId="1" PostId="3038" RevisionGUID="0e4104f3-8a86-4a46-a21d-14ad07693bcc" CreationDate="2022-06-03T10:02:09.780" UserId="2649" Text="unresolved import sc_rpc::Metadata" ContentLicense="CC BY-SA 4.0" />
  <row Id="11380" PostHistoryTypeId="3" PostId="3038" RevisionGUID="0e4104f3-8a86-4a46-a21d-14ad07693bcc" CreationDate="2022-06-03T10:02:09.780" UserId="2649" Text="|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11381" PostHistoryTypeId="2" PostId="3039" RevisionGUID="5d015c6c-1f84-4d6b-9e5a-44450e439ed7" CreationDate="2022-06-03T10:32:43.217" UserId="14" Text="Try running your node like:&#xD;&#xA;&#xD;&#xA;`./target/release/node-kitties --dev --unsafe-ws-external --unsafe-rpc-external --rpc-cors all`" ContentLicense="CC BY-SA 4.0" />
  <row Id="11387" PostHistoryTypeId="5" PostId="760" RevisionGUID="715f33df-31e2-4d3e-b47c-a9c264d43464" CreationDate="2022-06-03T13:09:19.860" UserId="234" Comment="Replaced the &quot;node-authorization&quot; url because it was pointing to a broken link." Text="The bootnodes are configured in the chain spec. When you launch additional nodes, you can add bootnodes for that node.&#xD;&#xA;&#xD;&#xA;Have you taken a look at the [node-authorization](https://paritytech.github.io/substrate/master/pallet_node_authorization/index.html) pallet? It has a concept of normal nodes, **well-known** nodes, and **sub-nodes** which could fit your use-case.&#xD;&#xA;&#xD;&#xA;If you haven't already take a look at the permissioned network tutorial:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/permissioned-network/&#xD;&#xA;&#xD;&#xA;![](https://docs.substrate.io/static/394b550f1155ef3c2c4e79d48b028d69/97a96/dave_claim_node.png)&#xD;&#xA;&#xD;&#xA;In your use-case, you could set it up so that anyone can claim a peerId and hence a node.&#xD;&#xA;&#xD;&#xA;![](https://docs.substrate.io/static/c97b078a8c85c05733b79aa3c1cf915c/97a96/add_well_known_node.png)&#xD;&#xA;&#xD;&#xA;You can add additional well-known nodes via an extrinsic which can come from sudo **or** governance.&#xD;&#xA;&#xD;&#xA;If you want to integrate governance into your chain, I would start by looking into [pallet_collective](https://paritytech.github.io/substrate/latest/pallet_collective/index.html) and [pallet_democracy](https://paritytech.github.io/substrate/latest/pallet_democracy/index.html).&#xD;&#xA;&#xD;&#xA;For example, you can see the governance pallets Kusama is using here:&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L1391&#xD;&#xA;&#xD;&#xA;... in your case you would not need `PhragmenElection` pallet.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11388" PostHistoryTypeId="24" PostId="760" RevisionGUID="715f33df-31e2-4d3e-b47c-a9c264d43464" CreationDate="2022-06-03T13:09:19.860" Comment="Proposed by 234 approved by 29 edit id of 207" ContentLicense="CC BY-SA 4.0" />
  <row Id="11389" PostHistoryTypeId="2" PostId="3041" RevisionGUID="2fd0eaad-b214-405c-994a-29aff6d4d2ed" CreationDate="2022-06-03T13:53:57.520" UserId="2423" Text="I'm building a Golang client that interfaces with Polkadot and I want to better understand lookup errors.&#xD;&#xA;&#xD;&#xA;In Polkadot block 10572717 the extrinsic at index 2 ([subscan link 10572712-2][1]) has failed with the Result &quot;Failed (CannotLookup)&quot;.&#xD;&#xA;&#xD;&#xA;It appears that the Extrinsic (which has the call `Balances.Transfer_keep_alive`) fails because of an invalid Destination identity: `0xE31Ad96c37604983899861ff171D7F51Ae074D81`. It looks like the sender tried (and failed) repeatedly to send to this invalid account ID.&#xD;&#xA;&#xD;&#xA;1. Is `0xE31Ad96c37604983899861ff171D7F51Ae074D81` an invalid Destination identifier in Polkadot/Substrate?&#xD;&#xA;2. Is this the reason why the Extrinsic 10572717-2 failed?&#xD;&#xA;3. If I'm interested in balance transfer Extrinsics - I want to track account balances in our system - is it safe to ignore Failed results like this?&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;&#xD;&#xA;[1]:https://polkadot.subscan.io/extrinsic/10572717-2" ContentLicense="CC BY-SA 4.0" />
  <row Id="11391" PostHistoryTypeId="1" PostId="3041" RevisionGUID="2fd0eaad-b214-405c-994a-29aff6d4d2ed" CreationDate="2022-06-03T13:53:57.520" UserId="2423" Text="Failed Extrinsic &quot;CannotLookup&quot; - Invalid Account ID?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11392" PostHistoryTypeId="3" PostId="3041" RevisionGUID="2fd0eaad-b214-405c-994a-29aff6d4d2ed" CreationDate="2022-06-03T13:53:57.520" UserId="2423" Text="|polkadot|extrinsic|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11393" PostHistoryTypeId="2" PostId="3042" RevisionGUID="bc53abab-7e46-4cab-9892-8f0048a6f558" CreationDate="2022-06-03T14:52:29.333" UserId="28" Text="1. Yes, `0xE31Ad96c37604983899861ff171D7F51Ae074D81` is not a valid Substrate / Polkadot address. It seems to be an [Ethereum address](https://etherscan.io/address/0xE31Ad96c37604983899861ff171D7F51Ae074D81).&#xD;&#xA;&#xD;&#xA;2. Yes, if you don't give a valid destination address, the transfer will certainly fail.&#xD;&#xA;&#xD;&#xA;3. To track the balance of accounts, you should not use the extrinsics, but instead the events which manifest from the extrinsics. All balance changes to accounts in Substrate will emit some events, for example the `Transfer` event. This event will only be emitted if the transfer completed successfully." ContentLicense="CC BY-SA 4.0" />
  <row Id="11395" PostHistoryTypeId="2" PostId="3043" RevisionGUID="bc6b631d-b1d6-4cc9-9189-199eefd7f18d" CreationDate="2022-06-03T14:57:42.153" UserId="28" Text="`T::Hash` and `T::Hashing` are abstract types defined in FRAME System.&#xD;&#xA;&#xD;&#xA;This allows the runtime developer to configure which hashing algorithm they would like to use.&#xD;&#xA;&#xD;&#xA;So to answer to your question, you need to look at the configuration of these types in your runtime.&#xD;&#xA;&#xD;&#xA;For a default Substrate chain (including Polkadot and probably most Parachains), this is configured to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// A hash of some data used by the chain.&#xD;&#xA;pub type Hash = sp_core::H256;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;    // -- snip --&#xD;&#xA;	type Hash = Hash;&#xD;&#xA;	type Hashing = BlakeTwo256;&#xD;&#xA;    // -- snip --&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11397" PostHistoryTypeId="10" PostId="3032" RevisionGUID="cc3925b8-f5c3-4e61-a6ae-6a23fc206b12" CreationDate="2022-06-03T14:58:14.753" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[2443],&quot;Voters&quot;:[{&quot;Id&quot;:380,&quot;DisplayName&quot;:&quot;forgetso&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="11399" PostHistoryTypeId="2" PostId="3044" RevisionGUID="219a20fd-33f8-458c-b3e4-ca07aa9c7902" CreationDate="2022-06-03T15:01:27.707" UserId="703" Text="In a newer release of the sc-rpc, the Metadata struct was removed. Unfortunately, fc-rpc (Frontier's rpc pallet) is not yet compatible with this change.&#xD;&#xA;&#xD;&#xA;When adding an additional pallet(s) to Frontier, it causes the other substrate dependencies to use the newest (incompatible) commit version.&#xD;&#xA;&#xD;&#xA;The simplest fix right now is to run `cargo update -p &lt;the-imported-pallet&gt; --precise 1e0807fb477b21edd373eb88778336d5ff23d3a7`&#xD;&#xA;&#xD;&#xA;This will set the pallet you are importing to use the commit (`1e0807fb477b21edd373eb88778336d5ff23d3a7`). This commit is compatible with sc-rpc. &#xD;&#xA;&#xD;&#xA;Unfortunately, adding `rev = 1e0807fb477b21edd373eb88778336d5ff23d3a7` into your Cargo.toml will not work. Cargo has a [bug][1] right now that duplicates dependencies (with the exact same code, Cargo just does not recognize it).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/rust-lang/cargo/issues/10256" ContentLicense="CC BY-SA 4.0" />
  <row Id="11403" PostHistoryTypeId="5" PostId="3044" RevisionGUID="3deb127e-697e-4061-873d-83dc8df82ca0" CreationDate="2022-06-03T15:02:53.000" UserId="703" Comment="deleted 2 characters in body" Text="In a newer release of the sc-rpc, the Metadata struct was removed. Unfortunately, fc-rpc (Frontier's rpc pallet) is not yet compatible with this change.&#xD;&#xA;&#xD;&#xA;When adding an additional pallet(s) to Frontier, it causes the other substrate dependencies to use the newest (incompatible) commit version.&#xD;&#xA;&#xD;&#xA;The simplest fix right now is to run `cargo update -p &lt;the-imported-pallet&gt; --precise 1e0807fb477b21edd373eb88778336d5ff23d3a7`&#xD;&#xA;&#xD;&#xA;This will set the pallet you are importing to use the commit `1e0807fb477b21edd373eb88778336d5ff23d3a7`. This commit is compatible with sc-rpc. &#xD;&#xA;&#xD;&#xA;Unfortunately, adding `rev = 1e0807fb477b21edd373eb88778336d5ff23d3a7` into your Cargo.toml will not work. Cargo has a [bug][1] right now that duplicates dependencies (with the exact same code, Cargo just does not recognize it).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/rust-lang/cargo/issues/10256" ContentLicense="CC BY-SA 4.0" />
  <row Id="11405" PostHistoryTypeId="2" PostId="3045" RevisionGUID="e4910cf9-7502-400b-86ac-5dae2764d9a3" CreationDate="2022-06-03T15:20:09.657" UserId="1813" Text="I am attempting to submit `tx.scheduler.schedule` as follows:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const wasm = await readFile(file)&#xD;&#xA;const call = api.tx.parachainSystem.enactAuthorizedUpgrade(wasm)&#xD;&#xA;await api.tx.scheduler&#xD;&#xA;  .schedule(&#xD;&#xA;    53, &#xD;&#xA;    null, &#xD;&#xA;    1, &#xD;&#xA;    call&#xD;&#xA;  )&#xD;&#xA;  .signAndSend(sudo)&#xD;&#xA;```&#xD;&#xA;When I `console.debug` the `call` it looks like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Submittable { initialU8aLength: undefined }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Submitting the extrinsic fails with:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: createType(Call):: Call: failed decoding scheduler.schedule&#xD;&#xA;:: Struct: failed on args:{&quot;when&quot;:&quot;u32&quot;,&quot;maybe_periodic&quot;:&quot;Option&lt;(u32,u32)&gt;&quot;,&quot;priority&quot;:&quot;u8&quot;,&quot;call&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Value\&quot;:\&quot;Call\&quot;,\&quot;Hash\&quot;:\&quot;H256\&quot;}}&quot;}&#xD;&#xA;:: Struct: failed on call: {&quot;_enum&quot;:{&quot;Value&quot;:&quot;Call&quot;,&quot;Hash&quot;:&quot;H256&quot;}}&#xD;&#xA;:: Cannot map Enum JSON, unable to find 'initialU8aLength' in value, hash&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What do I need to do to the embedded call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11407" PostHistoryTypeId="1" PostId="3045" RevisionGUID="e4910cf9-7502-400b-86ac-5dae2764d9a3" CreationDate="2022-06-03T15:20:09.657" UserId="1813" Text="How to pass a call to tx.scheduler.schedule?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11408" PostHistoryTypeId="3" PostId="3045" RevisionGUID="e4910cf9-7502-400b-86ac-5dae2764d9a3" CreationDate="2022-06-03T15:20:09.657" UserId="1813" Text="|polkadot-js|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11409" PostHistoryTypeId="5" PostId="2793" RevisionGUID="2de51675-6fd3-469f-9dd4-117abb40f704" CreationDate="2022-06-03T15:21:26.180" UserId="28" Comment="added 1281 characters in body" Text="You should listen for chain events, which would announce the transfer has occurred between the two accounts, and the amount.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::event]&#xD;&#xA;#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;pub enum Event&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;	// -- snip --&#xD;&#xA;	/// Transfer succeeded.&#xD;&#xA;	Transfer { from: T::AccountId, to: T::AccountId, amount: T::Balance },&#xD;&#xA;	// -- snip --&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You'd only need to search on the block where the receiving account's balance has changed to confirm the funds came from where you expected.&#xD;&#xA;&#xD;&#xA;If you are using Polkadot JS API in particular, there are even better options like [Transaction Subscriptions](https://polkadot.js.org/docs/api/start/api.tx.subs), which even includes hooks specific for events.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;EDIT&#xD;&#xA;&#xD;&#xA;Scanning all blocks is the only solution here. The chain does not store live metadata about each user and when all transfers happened. This would be a complete waste of on-chain data.&#xD;&#xA;&#xD;&#xA;This is exactly what indexing services and block explorers are for.&#xD;&#xA;&#xD;&#xA;In the case where a block explorer is not set up for your network, you should consider setting one up using the open source projects like:&#xD;&#xA;&#xD;&#xA; * https://github.com/polkascan&#xD;&#xA; * https://github.com/subscan-explorer&#xD;&#xA;&#xD;&#xA;In the case you want to do some short term JS solution, you can query the balance of a user at all blocks like so:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const provider = new WsProvider(endpoint);&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;for (let i = 0; i &lt; last_block; i++) {&#xD;&#xA;	// Get the api in the context of the current block.&#xD;&#xA;	const blockHash = await api.rpc.chain.getBlockHash(i);&#xD;&#xA;	const block = await api.derive.chain.getBlock(blockHash);&#xD;&#xA;	const aa = await api.at(blockHash);&#xD;&#xA;&#xD;&#xA;    // Get the account's balance.&#xD;&#xA;	const balance = await aa.query.system.account(address);&#xD;&#xA;	let free = balance.data.free;&#xD;&#xA;	let reserved = balance.data.reserved;&#xD;&#xA;&#xD;&#xA;    // Do stuff...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can find similar logic in projects like:&#xD;&#xA;&#xD;&#xA;https://github.com/shawntabrizi/substrate-balance-graph/&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11410" PostHistoryTypeId="34" PostId="2169" RevisionGUID="372f03cf-7f97-4251-9a0d-4d514193a287" CreationDate="2022-06-03T16:04:45.620" UserId="-1" Comment="7" />
  <row Id="11411" PostHistoryTypeId="2" PostId="3046" RevisionGUID="570b2821-eaf6-4652-8996-083fb4fdf632" CreationDate="2022-06-03T16:39:15.927" UserId="28" Text="This is a question that is hard to give a specific answer to.&#xD;&#xA;&#xD;&#xA;In general, splitting up pallets is useful when you expect the pallets to be modular, reusable, and potentially interchangeable.&#xD;&#xA;&#xD;&#xA;In the case you are developing some specific logic for your blockchain, creating a single pallet will probably be easier in every way.&#xD;&#xA;&#xD;&#xA;However, if you plan to create a pallet which you want to share with the community, the more monolithic it is, the less likely it will be used." ContentLicense="CC BY-SA 4.0" />
  <row Id="11413" PostHistoryTypeId="2" PostId="3047" RevisionGUID="2a62e9db-7e5f-4a8a-863c-a9ee47a5c192" CreationDate="2022-06-03T16:47:50.477" UserId="28" Text="In your minimal example, making a single pallet makes sense.&#xD;&#xA;&#xD;&#xA;To be honest, it is not clear what question you are asking, or what problem you are running into.&#xD;&#xA;&#xD;&#xA;Loose coupling makes sense when there are specific kinds of APIs which you expect to be switched out or configured.&#xD;&#xA;&#xD;&#xA;For example, imagine some kind of `VoteOutcome` interface. There a bunch of different ways someone could design a voting system, but your pallet only cares about the outcome of the vote. In this case, you keep the underlying voting system as a separate pallet, and just expose the one API you care about.&#xD;&#xA;&#xD;&#xA;This would then allow you to seperate something like `Treasury` where a proposal is suggested from the underlying `Democracy` system where users vote to accept or reject that proposal.&#xD;&#xA;&#xD;&#xA;If two pallets are exactly depending on the underlying logic and behavior of the other, then tight coupling, or even just making one pallet makes sense, and will be easier to maintain.&#xD;&#xA;&#xD;&#xA;As for when you would want to do tight coupling vs a single pallet, the only reason I would see to do tight coupling is either to minimize how large a single pallet gets to maintain, or to enable you to explicitly disable some one way tight coupled dependency.&#xD;&#xA;&#xD;&#xA;In general, development is simplified when a single pallet is used." ContentLicense="CC BY-SA 4.0" />
  <row Id="11415" PostHistoryTypeId="2" PostId="3048" RevisionGUID="46564ecb-6cd2-4440-9e40-0d471081916e" CreationDate="2022-06-03T16:53:23.883" UserId="28" Text="The balances pallet does not have a feature like this, nor do I think it should introduce this.&#xD;&#xA;&#xD;&#xA;So yes, I think the best thing would be for you to write or fork your own solution for this kind of behavior." ContentLicense="CC BY-SA 4.0" />
  <row Id="11417" PostHistoryTypeId="2" PostId="3049" RevisionGUID="d81c2ebc-5ce0-4843-9ede-9ca6553475af" CreationDate="2022-06-03T17:15:27.863" UserId="28" Text="When updating types in a runtime migration, you must read the &quot;old&quot; storage using the old storage type.&#xD;&#xA;&#xD;&#xA;Imagine you have an item originally stored as:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct Item {&#xD;&#xA;    id: u32,&#xD;&#xA;    field1: Field,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then imagine you update the item to be:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct Item {&#xD;&#xA;    id: u32,&#xD;&#xA;    field1: Field,&#xD;&#xA;    field2: Field,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you were to try to read this storage item after updating the `struct Item`, you will get the &quot;corrupt state&quot; error because on your blockchain, there is no `field2`, and thus, when trying to read from state to create the new `Item`, it will fail.&#xD;&#xA;&#xD;&#xA;Instead, a common pattern for migrations is to write a special type which acts as a way to read the old storage, and then re-write the storage with the new updated struct.&#xD;&#xA;&#xD;&#xA;That pattern looks like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;mod old {&#xD;&#xA;    pub struct OldItem {&#xD;&#xA;        id: u32,&#xD;&#xA;        field1: Field,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;	#[frame_support::storage_alias]&#xD;&#xA;	pub type ItemMap&lt;T&gt; = StorageMap&lt;&#xD;&#xA;		crate::Pallet&lt;T&gt;,&#xD;&#xA;		Twox64Concat,&#xD;&#xA;		u32,&#xD;&#xA;		OldItem&lt;T&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn migration() {&#xD;&#xA;    // Note here we are reading from `old`, which has our old type.&#xD;&#xA;	for (_key, old_item) in old::ListNodes::&lt;T, I&gt;::iter() {&#xD;&#xA;        // Note here we are using the `crate::Item`, which has the updated object.&#xD;&#xA;		let new_item = crate::Item {&#xD;&#xA;             id: old_item.id,&#xD;&#xA;             field1: old_item.field1,&#xD;&#xA;             // Here we just duplicate field1, but you may have your own logic...&#xD;&#xA;             field2: old_item.field1,&#xD;&#xA;        };&#xD;&#xA;&#xD;&#xA;        // Note that we write back to `crate::ItemMap` which uses the new type.&#xD;&#xA;		crate::ItemMap::&lt;T&gt;::insert(old_item.id, new_item);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There are plenty of examples in Substrate, but here is one:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/bags-list/src/migrations.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="11419" PostHistoryTypeId="2" PostId="3050" RevisionGUID="fdb95c69-5a8f-43ab-aed8-1cdea3c13357" CreationDate="2022-06-03T17:31:36.250" UserId="245" Text="I forked the [Substrate Stencil][1] node to kickstart from Governance and Staking. I've followed the steps from both the repo and [Substrate docs][2]. I tried to run a staging node but it's idling with 4 validator peers.&#xD;&#xA;&#xD;&#xA;Steps I've done;&#xD;&#xA;&#xD;&#xA;- Build a custom spec file with created keys.&#xD;&#xA;- Start the nodes&#xD;&#xA;- Insert keys to each node&#xD;&#xA;- Restart the nodes to see if it makes it any different&#xD;&#xA;&#xD;&#xA;The commands I use can be found in this [GitHub Gist][3].&#xD;&#xA;&#xD;&#xA;I suspect that I'm doing something wrong with the keys but can't figure out what's that exactly.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kaichaosun/substrate-stencil&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/v3/private-network&#xD;&#xA;  [3]: https://gist.github.com/buraktabn/17f26f8dd83117710fbb670f9dacb136" ContentLicense="CC BY-SA 4.0" />
  <row Id="11421" PostHistoryTypeId="1" PostId="3050" RevisionGUID="fdb95c69-5a8f-43ab-aed8-1cdea3c13357" CreationDate="2022-06-03T17:31:36.250" UserId="245" Text="Substrate Stencil node not producing blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="11422" PostHistoryTypeId="3" PostId="3050" RevisionGUID="fdb95c69-5a8f-43ab-aed8-1cdea3c13357" CreationDate="2022-06-03T17:31:36.250" UserId="245" Text="|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11423" PostHistoryTypeId="2" PostId="3051" RevisionGUID="f2182146-05f5-430e-ab6b-8721d43cfe63" CreationDate="2022-06-03T17:39:39.367" UserId="28" Text="There is not a concrete answer to this question since new host functions are changes in the client, which cannot be upgraded on-chain.&#xD;&#xA;&#xD;&#xA;There will be three main steps needed to get a new host function onto the Polkadot network:&#xD;&#xA;&#xD;&#xA;1. Agreement about the host function specification.&#xD;&#xA;&#xD;&#xA;    Adding a new host function is a big change, and importantly is something that must be supported for all time once it has been added, even if it becomes deprecated, since it would be required to sync old blocks on a chain that used it. Thus the most important part of the process is to clearly define what the host function should do.&#xD;&#xA;&#xD;&#xA;    The best place for this is an issue in Substrate / Polkadot or in the PSP repository: https://github.com/w3f/PSPs&#xD;&#xA;&#xD;&#xA;2. Implementation of the host function.&#xD;&#xA;&#xD;&#xA;    After an agreement is made, all Polkadot clients will need to update their codebase to support it. This is an important step to call out because there may be different client implementations in the future, and before a node can use this new host function, all of the implementations will need to be updated. This is also a point where developers who may really be against some idea would choose not to implement this function, and that could of course cause problems on its own.&#xD;&#xA;&#xD;&#xA;3. The network needs to update their client.&#xD;&#xA;&#xD;&#xA;    Finally, once the host function is implemented for all the different Polkadot client implementations, then all of the node operators will need to update their software. Again, this is an opportunity where node operators who are really against some idea may choose not to upgrade their client in protest.&#xD;&#xA;&#xD;&#xA;Hopefully this also paints a picture about what on-chain governance and on-chain runtime really simplifies the concrete way to do upgrades. Unfortunately, this is not something that can be safely done for blockchain clients.&#xD;&#xA;&#xD;&#xA;In most cases, steps 2 and 3 are not usually a contentious problem, and usually the community works together to implement new features, however there have been examples in the past (like Bitcoin Cash and ETH Classic) which has shown this is not always the case." ContentLicense="CC BY-SA 4.0" />
  <row Id="11425" PostHistoryTypeId="6" PostId="2360" RevisionGUID="3f5ebb6c-3fb9-4a1a-a818-4daf20d1057e" CreationDate="2022-06-03T17:45:15.890" UserId="28" Comment="edited tags" Text="|polkadot|nodes|networking|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11426" PostHistoryTypeId="2" PostId="3052" RevisionGUID="6e48a82f-2d44-4b66-ad68-fbb3b9fb0cd6" CreationDate="2022-06-03T18:14:38.493" UserId="28" Text="The issue here might be that you are just missing `/wss`&#xD;&#xA;&#xD;&#xA;So it should be `--bootnodes &quot;/dns/{CUSTOM_DOMAIN}/tcp/443/wss/p2p/{PEER_ID}&quot;`&#xD;&#xA;&#xD;&#xA;Let us know if this solved your problem!" ContentLicense="CC BY-SA 4.0" />
  <row Id="11428" PostHistoryTypeId="10" PostId="2360" RevisionGUID="591e0201-cd8d-4d1c-8fe0-0a2a62e8da7f" CreationDate="2022-06-03T18:16:34.640" UserId="28" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[2345],&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="11429" PostHistoryTypeId="5" PostId="3044" RevisionGUID="63c1bf59-8a7c-4d1e-a91a-496d79550ba3" CreationDate="2022-06-03T18:46:27.947" UserId="703" Comment="removed unnecessary paragraph." Text="In a newer release of the sc-rpc, the Metadata struct was removed. Unfortunately, fc-rpc (Frontier's rpc pallet) is not yet compatible with this change.&#xD;&#xA;&#xD;&#xA;The simplest fix right now is to run `cargo update -p &lt;the-imported-pallet&gt; --precise 1e0807fb477b21edd373eb88778336d5ff23d3a7`&#xD;&#xA;&#xD;&#xA;This will set the pallet you are importing to use the commit `1e0807fb477b21edd373eb88778336d5ff23d3a7`. This commit is compatible with sc-rpc. &#xD;&#xA;&#xD;&#xA;Unfortunately, adding `rev = 1e0807fb477b21edd373eb88778336d5ff23d3a7` into your Cargo.toml will not work. Cargo has a [bug][1] right now that duplicates dependencies (with the exact same code, Cargo just does not recognize it).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/rust-lang/cargo/issues/10256" ContentLicense="CC BY-SA 4.0" />
  <row Id="11430" PostHistoryTypeId="24" PostId="3044" RevisionGUID="63c1bf59-8a7c-4d1e-a91a-496d79550ba3" CreationDate="2022-06-03T18:46:27.947" Comment="Proposed by 703 approved by 2696 edit id of 208" ContentLicense="CC BY-SA 4.0" />
  <row Id="11431" PostHistoryTypeId="2" PostId="3053" RevisionGUID="b9bfa6b6-2678-48cd-8136-cf0049417269" CreationDate="2022-06-03T19:33:17.100" UserId="245" Text="Found out that using derive when creating keys for authoring and finalization doesn't go well together.&#xD;&#xA;&#xD;&#xA;What I've been doing:&#xD;&#xA;```&#xD;&#xA;./target/release/substrate-stencil key inspect --password-interactive --scheme Sr25519 &quot;&lt;secret&gt;//1//babe&quot;&#xD;&#xA;&#xD;&#xA;./target/release/substrate-stencil key inspect --password-interactive --scheme Ed25519 &quot;&lt;secret&gt;//1//grandpa&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What's working:&#xD;&#xA;```&#xD;&#xA;./target/release/substrate-stencil key generate --scheme Sr25519 --password-interactive&#xD;&#xA;&#xD;&#xA;./target/release/realm3 key inspect --password-interactive --scheme Ed25519 &lt;secret-from-above&gt;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11433" PostHistoryTypeId="5" PostId="3053" RevisionGUID="09056c7c-10f5-46e9-900b-e032fb345264" CreationDate="2022-06-03T19:42:56.210" UserId="245" Comment="added 11 characters in body" Text="Found out that using derive when creating keys for authoring and finalization doesn't go well together.&#xD;&#xA;&#xD;&#xA;What I've been doing:&#xD;&#xA;```&#xD;&#xA;./target/release/substrate-stencil key inspect --password-interactive --scheme Sr25519 &quot;&lt;secret&gt;//1//babe&quot;&#xD;&#xA;&#xD;&#xA;./target/release/substrate-stencil key inspect --password-interactive --scheme Ed25519 &quot;&lt;secret&gt;//1//grandpa&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What's working:&#xD;&#xA;```&#xD;&#xA;./target/release/substrate-stencil key generate --scheme Sr25519 --password-interactive&#xD;&#xA;&#xD;&#xA;./target/release/substrate-stencil key inspect --password-interactive --scheme Ed25519 &lt;secret-from-above&gt;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11434" PostHistoryTypeId="2" PostId="3054" RevisionGUID="1b49d0aa-5429-476c-b4d9-6ac742c0d280" CreationDate="2022-06-03T19:52:01.277" UserId="699" Text="Testing some behaviors on a collator, I often end-up with `[] Block import error: State Database error: Too many sibling blocks inserted`&#xD;&#xA;&#xD;&#xA;Is there way to remove those siblings from the database ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11436" PostHistoryTypeId="1" PostId="3054" RevisionGUID="1b49d0aa-5429-476c-b4d9-6ac742c0d280" CreationDate="2022-06-03T19:52:01.277" UserId="699" Text="How to prune sibling blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11437" PostHistoryTypeId="3" PostId="3054" RevisionGUID="1b49d0aa-5429-476c-b4d9-6ac742c0d280" CreationDate="2022-06-03T19:52:01.277" UserId="699" Text="|database|pruning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11438" PostHistoryTypeId="2" PostId="3055" RevisionGUID="35176ff8-0c2d-4ed7-b1d2-3231a2ec323d" CreationDate="2022-06-03T20:24:16.593" UserId="2678" Text="I am developing a pallet that uses an off-chain worker to aggregate and store transaction fees on a per-block basis.&#xD;&#xA;&#xD;&#xA;To do this, the most reasonable implementation looks to be using [Withdraw events][1] in a given block. However, there is no clear way to differentiate between Withdraw events for transaction fees and Withdraw events for other reasons.&#xD;&#xA;&#xD;&#xA;Is it possible to expose the [Event Reason][2] in the Balances Event? If not, is there a feasible workaround to filter Withdraw events by type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L1706&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L630" ContentLicense="CC BY-SA 4.0" />
  <row Id="11440" PostHistoryTypeId="1" PostId="3055" RevisionGUID="35176ff8-0c2d-4ed7-b1d2-3231a2ec323d" CreationDate="2022-06-03T20:24:16.593" UserId="2678" Text="Access To Withdrawal Reason in Withdraw Event" ContentLicense="CC BY-SA 4.0" />
  <row Id="11441" PostHistoryTypeId="3" PostId="3055" RevisionGUID="35176ff8-0c2d-4ed7-b1d2-3231a2ec323d" CreationDate="2022-06-03T20:24:16.593" UserId="2678" Text="|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11442" PostHistoryTypeId="5" PostId="3055" RevisionGUID="71b65051-258c-452e-8982-a6d3f48cfdbc" CreationDate="2022-06-03T20:25:48.403" UserId="2678" Comment="added 39 characters in body" Text="I am developing a pallet that uses an off-chain worker to aggregate and store transaction fees on a per-block basis.&#xD;&#xA;&#xD;&#xA;To do this, the most reasonable implementation looks to be using [Withdraw events][1] (and any extra fees that are refunded) in a given block. However, there is no clear way to differentiate between Withdraw events for transaction fees and Withdraw events for other reasons.&#xD;&#xA;&#xD;&#xA;Is it possible to expose the [Event Reason][2] in the Balances Event? If not, is there a feasible workaround to filter Withdraw events by type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L1706&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L630" ContentLicense="CC BY-SA 4.0" />
  <row Id="11443" PostHistoryTypeId="5" PostId="3055" RevisionGUID="3bfdea6b-1365-4a22-b65d-ee5b7db6ffcf" CreationDate="2022-06-03T20:26:01.247" UserId="2678" Comment="added 10 characters in body" Text="I am developing a pallet that uses an off-chain worker to aggregate and store transaction fees on a per-block basis.&#xD;&#xA;&#xD;&#xA;To do this, the most reasonable implementation looks to be using [Withdraw events][1] (and crediting any extra fees that are refunded) in a given block. However, there is no clear way to differentiate between Withdraw events for transaction fees and Withdraw events for other reasons.&#xD;&#xA;&#xD;&#xA;Is it possible to expose the [Event Reason][2] in the Balances Event? If not, is there a feasible workaround to filter Withdraw events by type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L1706&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L630" ContentLicense="CC BY-SA 4.0" />
  <row Id="11444" PostHistoryTypeId="5" PostId="3055" RevisionGUID="ac6b4986-bc79-4e94-a982-55f3d5682d14" CreationDate="2022-06-03T20:30:59.277" UserId="2678" Comment="added 1 character in body" Text="I am developing a pallet that uses an off-chain worker to aggregate and store transaction fees on a per-block basis.&#xD;&#xA;&#xD;&#xA;To do this, the most reasonable implementation looks to be using [Withdraw events][1] (and crediting any extra fees that are refunded) in a given block. However, there is no clear way to differentiate between Withdraw events for transaction fees and Withdraw events for other reasons.&#xD;&#xA;&#xD;&#xA;Is it reason not to expose the [Event Reason][2] in the Balances Event? If so, is there a feasible workaround to filter Withdraw events by type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L1706&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L630" ContentLicense="CC BY-SA 4.0" />
  <row Id="11445" PostHistoryTypeId="5" PostId="3055" RevisionGUID="ed75d874-8a45-4ef8-a785-e7d22528baff" CreationDate="2022-06-03T20:31:09.890" UserId="2678" Comment="added 5 characters in body" Text="I am developing a pallet that uses an off-chain worker to aggregate and store transaction fees on a per-block basis.&#xD;&#xA;&#xD;&#xA;To do this, the most reasonable implementation looks to be using [Withdraw events][1] (and crediting any extra fees that are refunded) in a given block. However, there is no clear way to differentiate between Withdraw events for transaction fees and Withdraw events for other reasons.&#xD;&#xA;&#xD;&#xA;Is there a reason not to expose the [Event Reason][2] in the Balances Event? If so, is there a feasible workaround to filter Withdraw events by type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L1706&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L630" ContentLicense="CC BY-SA 4.0" />
  <row Id="11446" PostHistoryTypeId="5" PostId="3055" RevisionGUID="79948cd5-c3ab-45f8-8411-9491c9afb1b1" CreationDate="2022-06-03T20:38:43.543" UserId="2678" Comment="added 4 characters in body" Text="I am developing a pallet that uses an off-chain worker to aggregate and store transaction fee data on a per-block basis.&#xD;&#xA;&#xD;&#xA;To do this, the most reasonable implementation looks to be using [Withdraw events][1] (and crediting any extra fees that are refunded) in a given block. However, there is no clear way to differentiate between Withdraw events for transaction fees and Withdraw events for other reasons.&#xD;&#xA;&#xD;&#xA;Is there a reason not to expose the [Event Reason][2] in the Balances Event? If so, is there a feasible workaround to filter Withdraw events by type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L1706&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L630" ContentLicense="CC BY-SA 4.0" />
  <row Id="11447" PostHistoryTypeId="5" PostId="3055" RevisionGUID="bcf15e37-6db7-4880-bf43-6deb0f9edcfc" CreationDate="2022-06-03T20:39:12.177" UserId="2678" Comment="added 2 characters in body" Text="I am developing a pallet that uses an off-chain worker to aggregate and store transaction fee data on a per-block basis.&#xD;&#xA;&#xD;&#xA;To do this, the most reasonable implementation looks to be using [Withdraw events][1] (and crediting any extra fees that are refunded) in a given block. However, there is no clear way to differentiate between Withdraw events for transaction fees and Withdraw events for other reasons.&#xD;&#xA;&#xD;&#xA;Would it be reasonable to expose the [Event Reason][2] in the Balances Event? If not, is there a feasible workaround to filter Withdraw events by type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L1706&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L630" ContentLicense="CC BY-SA 4.0" />
  <row Id="11448" PostHistoryTypeId="5" PostId="3055" RevisionGUID="8c95c028-0297-4194-a144-bbe6f1a7f9eb" CreationDate="2022-06-03T20:52:21.193" UserId="2678" Comment="added 10 characters in body" Text="I am developing a pallet that uses an off-chain worker to aggregate and store transaction fee data on a per-block basis.&#xD;&#xA;&#xD;&#xA;To do this, the most reasonable implementation looks to be using [Withdraw events][1] (and crediting any extra withdrawn fees that are refunded) in a given block. However, there is no clear way to differentiate between Withdraw events for transaction fees and Withdraw events for other reasons.&#xD;&#xA;&#xD;&#xA;Would it be reasonable to expose the [Event Reason][2] in the Balances Event? If not, is there a feasible workaround to filter Withdraw events by type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L1706&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/balances/src/lib.rs#L630" ContentLicense="CC BY-SA 4.0" />
  <row Id="11450" PostHistoryTypeId="2" PostId="3056" RevisionGUID="6390667b-32ec-4945-a9d5-65765e2a9d7b" CreationDate="2022-06-03T22:07:20.400" UserId="490" Text="To truly verify it trustlessly, yes, you would have to consolidate all remarks ever made by using the [Consolidator](https://github.com/rmrk-team/rmrk-tools/blob/master/cli/consolidate.ts). You can fetch the remarks with the [fetcher](https://github.com/rmrk-team/rmrk-tools/blob/master/cli/fetch.ts).&#xD;&#xA;&#xD;&#xA;We do provide [ready-made dumps](https://docs.rmrk.app/syncing) of remarks so you do not have to fetch them all, and can run the consolidator on those instead, this saves a few days. However, it does imply trust in the dumps.&#xD;&#xA;&#xD;&#xA;Other than that there is no other way to verify ownership trustlessly on the &quot;colored coins&quot; implementation of RMRK (using remarks on Kusama or Statemine)." ContentLicense="CC BY-SA 4.0" />
  <row Id="11452" PostHistoryTypeId="2" PostId="3057" RevisionGUID="6206045a-97f3-4088-a04c-69f505d2a09c" CreationDate="2022-06-03T22:14:23.070" UserId="490" Text="That is exactly how it works.&#xD;&#xA;&#xD;&#xA;There is a back end which stores all the consolidated remarks from the chain into a final state of NFTs. These are rendered for you as you log in. Due to the nature of remark-based NFTs, a full sync of the chain or a consolidation of the whole remark set is necessary to verify ownership - this is costly and slow. So we rely on an optimization in the form of our back end which speeds things up dramatically.&#xD;&#xA;&#xD;&#xA;You can still reproduce the entire back end and full state by syncing the state yourself, as answered here: https://substrate.stackexchange.com/questions/1614/how-can-users-trustlessly-verify-ownership-of-rmrk-nfts/3056#3056" ContentLicense="CC BY-SA 4.0" />
  <row Id="11454" PostHistoryTypeId="5" PostId="3044" RevisionGUID="84a93faa-2913-41db-a2cc-29c360081893" CreationDate="2022-06-03T23:22:51.277" UserId="703" Comment="added 10 characters in body" Text="In a newer release of the sc-rpc, the Metadata struct was removed. Unfortunately, fc-rpc (Frontier's rpc pallet) is not yet compatible with this change.&#xD;&#xA;&#xD;&#xA;The simplest fix right now is to run `cargo update -p &lt;the-imported-pallet&gt; --precise 1e0807fb477b21edd373eb88778336d5ff23d3a7`&#xD;&#xA;&#xD;&#xA;This will set the pallet you are importing to use the commit `1e0807fb477b21edd373eb88778336d5ff23d3a7`. This commit uses a compatible version of sc-rpc. &#xD;&#xA;&#xD;&#xA;Unfortunately, adding `rev = 1e0807fb477b21edd373eb88778336d5ff23d3a7` into your Cargo.toml will not work. Cargo has a [bug][1] right now that duplicates dependencies (with the exact same code, Cargo just does not recognize it).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/rust-lang/cargo/issues/10256" ContentLicense="CC BY-SA 4.0" />
  <row Id="11460" PostHistoryTypeId="2" PostId="3059" RevisionGUID="5d5bdd09-b191-4766-b494-31bea05f762f" CreationDate="2022-06-04T08:31:09.507" UserId="85" Text="We can do better than a binary search through block numbers to find the nearest timestamp.&#xD;&#xA;&#xD;&#xA;If we have a starting timestamp A from the chain in question then we can use the estimation techniques listed in this question to tell us how many blocks forward or backwards we likely need to go (request blocks by block number not by block hash):&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/1026/how-to-estimate-the-timestamp-of-a-future-block-in-substrate&#xD;&#xA;&#xD;&#xA;Our first guess gets us timestamp B. If we diff A and B them we get a much more realistic value of how long blocks take over that period, and from that we can make a more accurate prediction than our initial prediction.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11467" PostHistoryTypeId="2" PostId="3061" RevisionGUID="bad478f6-e50b-4ba3-869b-ff401b0c3025" CreationDate="2022-06-04T19:46:39.327" UserId="2408" Text="When I run a node template with `cargo run -r -- --dev` I get a whole bunch of debug info in the terminal.  &#xD;&#xA;Is it possible to change colors of some words (phrases) in the terminal output? For example: color of `best` and `finalized` blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="11469" PostHistoryTypeId="1" PostId="3061" RevisionGUID="bad478f6-e50b-4ba3-869b-ff401b0c3025" CreationDate="2022-06-04T19:46:39.327" UserId="2408" Text="How to Change Colors of Node Terminal Output?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11470" PostHistoryTypeId="3" PostId="3061" RevisionGUID="bad478f6-e50b-4ba3-869b-ff401b0c3025" CreationDate="2022-06-04T19:46:39.327" UserId="2408" Text="|substrate-node-template|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11471" PostHistoryTypeId="2" PostId="3062" RevisionGUID="129ee9d4-9069-4e97-9280-09b114105042" CreationDate="2022-06-04T20:01:57.450" UserId="2408" Text="I need to send a string of a digit and a letter like &quot;2F&quot; to a contract deployed on a running contracts node. This payload is to be processed in the contract then.&#xD;&#xA;&#xD;&#xA;How can I include additional data to the transaction?  &#xD;&#xA;(I'm using Contracts UI node to send transactions) " ContentLicense="CC BY-SA 4.0" />
  <row Id="11473" PostHistoryTypeId="1" PostId="3062" RevisionGUID="129ee9d4-9069-4e97-9280-09b114105042" CreationDate="2022-06-04T20:01:57.450" UserId="2408" Text="How to Send Additional Text Payload to Contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11474" PostHistoryTypeId="3" PostId="3062" RevisionGUID="129ee9d4-9069-4e97-9280-09b114105042" CreationDate="2022-06-04T20:01:57.450" UserId="2408" Text="|extrinsic|transactions|string|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11475" PostHistoryTypeId="6" PostId="3062" RevisionGUID="a2f6c2bf-8794-47e4-afa0-df4570dcd668" CreationDate="2022-06-04T22:27:02.707" UserId="34" Comment="edited tags" Text="|ink|smart-contract|extrinsic|string|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11476" PostHistoryTypeId="6" PostId="3017" RevisionGUID="95a8f61c-651d-4d06-9024-6e9d88485a97" CreationDate="2022-06-05T07:26:05.853" UserId="393" Comment="edited tags" Text="|runtime-upgrade|cumulus|block-production|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11480" PostHistoryTypeId="2" PostId="3064" RevisionGUID="f750924b-f063-4439-bcd3-ca41120ced39" CreationDate="2022-06-05T13:00:39.387" UserId="2701" Text="Could you tell me what is wrong with this code? Is there a way to achieve multiple query? &#xD;&#xA;&#xD;&#xA;&lt;index.mjs&gt;&#xD;&#xA;```&#xD;&#xA;const heightToTimestamp = async (height1, height2, height3) =&gt; {&#xD;&#xA;    await api.rpc.chain.getBlockHash([&#xD;&#xA;        height1, height2, height3&#xD;&#xA;    ], (results) =&gt; { console.log(results) });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;heightToTimestamp(10000000, 9999999, 9999998);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11482" PostHistoryTypeId="1" PostId="3064" RevisionGUID="f750924b-f063-4439-bcd3-ca41120ced39" CreationDate="2022-06-05T13:00:39.387" UserId="2701" Text="multi method for api.rpc.chain.getBlockHash does not seem to exist" ContentLicense="CC BY-SA 4.0" />
  <row Id="11483" PostHistoryTypeId="3" PostId="3064" RevisionGUID="f750924b-f063-4439-bcd3-ca41120ced39" CreationDate="2022-06-05T13:00:39.387" UserId="2701" Text="|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11484" PostHistoryTypeId="5" PostId="3064" RevisionGUID="d9d28d10-bf5e-41eb-be2b-814b13f40a1b" CreationDate="2022-06-05T13:02:28.430" UserId="2701" Comment="added 206 characters in body" Text="Could you tell me what is wrong with this code?&#xD;&#xA;Is there a way to achieve multiple query? &#xD;&#xA;&#xD;&#xA;&lt;index.mjs&gt;&#xD;&#xA;```&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;const wsProvider = new WsProvider('ws://localhost:9944'); //running archive node&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;const heightToTimestamp = async (height1, height2, height3) =&gt; {&#xD;&#xA;    await api.rpc.chain.getBlockHash([&#xD;&#xA;        height1, height2, height3&#xD;&#xA;    ], (results) =&gt; { console.log(results) });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;heightToTimestamp(10000000, 9999999, 9999998);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11485" PostHistoryTypeId="5" PostId="3064" RevisionGUID="2a5b66a9-9bbe-4ec2-99ac-7378093ef090" CreationDate="2022-06-05T13:15:13.937" UserId="2701" Comment="added 6 characters in body" Text="Could you tell me what is wrong with this code?&#xD;&#xA;Is there a way to achieve multiple query? &#xD;&#xA;&#xD;&#xA;&lt;index.mjs&gt;&#xD;&#xA;```&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;const wsProvider = new WsProvider('ws://localhost:9944'); //running archive node&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;const heightToTimestamp = async (height1, height2, height3) =&gt; {&#xD;&#xA;    await api.rpc.chain.getBlockHash.multi([&#xD;&#xA;        height1, height2, height3&#xD;&#xA;    ], (results) =&gt; { console.log(results) });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;heightToTimestamp(10000000, 9999999, 9999998);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11486" PostHistoryTypeId="2" PostId="3065" RevisionGUID="52750cba-d389-4e53-9967-070297c94be7" CreationDate="2022-06-05T13:35:52.423" UserId="627" Text="`.multi` is only available on [storage queries](https://polkadot.js.org/docs/api/start/api.query.multi), i.e. via `api.query.*` endpoints. &#xD;&#xA;&#xD;&#xA;There are RPCs available to query over multiple storage keys at once (for both subscriptions and one-shot results), when `.multi` is used the API uses these RPCs under the hood, instead of the single-key versions.&#xD;&#xA;&#xD;&#xA;RPCs themselves, i.e. those on `api.rpc.*` are only available in the form the node exposes them." ContentLicense="CC BY-SA 4.0" />
  <row Id="11488" PostHistoryTypeId="5" PostId="3065" RevisionGUID="34c579e7-0d2b-4de1-881a-a3b56030b5eb" CreationDate="2022-06-05T13:42:04.617" UserId="627" Comment="Example using Promise.all" Text="`.multi` is only available on [storage queries](https://polkadot.js.org/docs/api/start/api.query.multi), i.e. via `api.query.*` endpoints. &#xD;&#xA;&#xD;&#xA;There are RPCs available to query over multiple storage keys at once (for both subscriptions and one-shot results), when `.multi` is used the API uses these RPCs under the hood, instead of the single-key versions.&#xD;&#xA;&#xD;&#xA;RPCs themselves, i.e. those on `api.rpc.*` are only available in the form the node exposes them.&#xD;&#xA;&#xD;&#xA;For you use-case, you would use the following form, making the RPC queries in parallel using the available RPC -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const results = await Promise.all([&#xD;&#xA;  api.rpc.chain.getBlockHash(height1),&#xD;&#xA;  api.rpc.chain.getBlockHash(height2),&#xD;&#xA;  api.rpc.chain.getBlockHash(height3)&#xD;&#xA;]);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11494" PostHistoryTypeId="6" PostId="3061" RevisionGUID="043de63d-425e-47bd-a553-b21229d3790c" CreationDate="2022-06-05T20:24:08.883" UserId="34" Comment="edited tags; edited tags" Text="|debugging|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11495" PostHistoryTypeId="52" PostId="3064" RevisionGUID="25aa1887-0ea1-4d07-b024-3bf74cef288c" CreationDate="2022-06-05T21:00:55.507" />
  <row Id="11496" PostHistoryTypeId="2" PostId="3067" RevisionGUID="681c3f2c-0c33-49b7-8ac1-4312f7c1b189" CreationDate="2022-06-05T21:05:28.880" UserId="34" Text="TL;DR: see https://stackoverflow.com/questions/4267400/colour-highlighting-output-based-on-regex-in-shell&#xD;&#xA;It is quite likely you just want to highlight within the terminal when operating.&#xD;&#xA;&#xD;&#xA;I you want to build this _into_ your node's logic, read on.&#xD;&#xA;&#xD;&#xA;To start, the [`log` crate](https://docs.rs/log/0.4.17/log/) is used in AFAIK all places `stdout/stderr` logging is enabled in Substrate. Substrate provides a minimal Wasm ready logger implementation: [`runtime_logger`](https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/runtime_logger.rs) that is used in the runtime API [described here](https://github.com/paritytech/substrate/blob/master/primitives/api/src/lib.rs#L44-L54).&#xD;&#xA;&#xD;&#xA;But the meat of your question relates to the [logging crates, specifically `EventFormat.enable_color`](https://github.com/paritytech/substrate/blob/master/client/tracing/src/logging/event_format.rs#L42-L43) and the associated logic that stems from it. See the [`/client/tracing/src/logging/*` implementation in Substrate](https://github.com/paritytech/substrate/blob/master/client/tracing/src/logging/event_format.rs#L166-L175) for trace-level logging color schmeme.&#xD;&#xA;&#xD;&#xA;For a _custom logger_ that had such nuanced coloring built in, IIUC you would need to implement this are replace the present logic. Perhaps as stated to start, you simply want to _highlight keywords_ rather than chage logic o the node." ContentLicense="CC BY-SA 4.0" />
  <row Id="11498" PostHistoryTypeId="2" PostId="3068" RevisionGUID="73f2661d-7900-4c92-aed8-5ce7ebd0612b" CreationDate="2022-06-05T22:54:00.887" UserId="245" Text="I've created a local live staging network with 1 bootnode and 3 validators. They all run in separate VMs.&#xD;&#xA;&#xD;&#xA;After block #52 I saw `Backing off claiming new slot for block authorship: finality is lagging.` and block times got higher and higher.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-06-05 22:28:48  Starting consensus session on top of parent 0x64ac48b3695c3c02f2d55619e4411e1eaa4f9b5a930e989859fd309052d5b64c    &#xD;&#xA;2022-06-05 22:28:48  Prepared block for proposing at 49 (0 ms) [hash: 0xa82832ce9f009ec9e4c35651bf2da7b2b9de0ff70c3096abf78356f5f76f781b; parent_hash: 0x64ac…b64c; extrinsics (1): [0xf93c…d576]]    &#xD;&#xA;2022-06-05 22:28:48  Pre-sealed block for proposal at 49. Hash now 0x2847d747ad23a609aaf0215c8256e4b120618d587fcd542b98258e8b121f5e7c, previously 0xa82832ce9f009ec9e4c35651bf2da7b2b9de0ff70c3096abf78356f5f76f781b.    &#xD;&#xA;2022-06-05 22:28:48 ✨ Imported #49 (0x2847…5e7c)    &#xD;&#xA;2022-06-05 22:28:52  Idle (2 peers), best: #49 (0x2847…5e7c), finalized #0 (0x69ab…327a), ⬇ 80 B/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-06-05 22:28:54  Starting consensus session on top of parent 0x2847d747ad23a609aaf0215c8256e4b120618d587fcd542b98258e8b121f5e7c    &#xD;&#xA;2022-06-05 22:28:54  Prepared block for proposing at 50 (1 ms) [hash: 0x9c2c820ac61ec988f009d5bd6d6142db07b4ec7f331ced941d7339df1e96e445; parent_hash: 0x2847…5e7c; extrinsics (1): [0x3fbc…f968]]    &#xD;&#xA;2022-06-05 22:28:54  Pre-sealed block for proposal at 50. Hash now 0xa9318da838d6709c21102680b92b672ef3631157fc9c2e25dcef8f727c835307, previously 0x9c2c820ac61ec988f009d5bd6d6142db07b4ec7f331ced941d7339df1e96e445.    &#xD;&#xA;2022-06-05 22:28:54 ✨ Imported #50 (0xa931…5307)    &#xD;&#xA;2022-06-05 22:28:57  Idle (2 peers), best: #50 (0xa931…5307), finalized #0 (0x69ab…327a), ⬇ 80 B/s ⬆ 0.3kiB/s    &#xD;&#xA;2022-06-05 22:29:00 ✨ Imported #51 (0x2ced…0ed1)    &#xD;&#xA;2022-06-05 22:29:02  Idle (2 peers), best: #51 (0x2ced…0ed1), finalized #0 (0x69ab…327a), ⬇ 0.3kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-06-05 22:29:06 ✨ Imported #52 (0xf9b2…43e6)    &#xD;&#xA;2022-06-05 22:29:07  Idle (2 peers), best: #52 (0xf9b2…43e6), finalized #0 (0x69ab…327a), ⬇ 0.3kiB/s ⬆ 86 B/s    &#xD;&#xA;2022-06-05 22:29:12 Backing off claiming new slot for block authorship: finality is lagging.  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Steps I've followed&#xD;&#xA;&#xD;&#xA;#### 1. Start the bootnode&#xD;&#xA;```&#xD;&#xA;./target/release/realm3 \&#xD;&#xA;--node-key 6c7285131dbf7367e10e30d960c57177ca43844cefe7a49d80a63916bebce9d7 \&#xD;&#xA;--base-path /tmp/bootnode1 \&#xD;&#xA;--chain node/specs/customSpecRaw.json \&#xD;&#xA;--name bootnode1&#xD;&#xA;```&#xD;&#xA;#### 2. Start the validators&#xD;&#xA;```&#xD;&#xA;./target/release/realm3 --base-path /tmp/validator1 \&#xD;&#xA;--chain node/specs/customSpecRaw.json \&#xD;&#xA;--ws-port 9922 \&#xD;&#xA;--port 30333 \&#xD;&#xA;--rpc-port 9934 \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--ws-external \&#xD;&#xA;--rpc-external \&#xD;&#xA;--rpc-cors all \&#xD;&#xA;--name &quot;Realm3 Validator 1&quot; \&#xD;&#xA;--bootnodes /ip4/10.0.0.22/tcp/30333/p2p/12D3KooWCurm4ieJvkiVPPMzVNXzSMkceRfbTVJQUvhzJHkFTF2t&#xD;&#xA;```&#xD;&#xA;#### 3. Insert the keys&#xD;&#xA;```&#xD;&#xA;./target/release/realm3 key insert --base-path /tmp/validator1 \&#xD;&#xA;--chain node/specs/customSpecRaw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri &lt;suri&gt; \&#xD;&#xA;--password-interactive \&#xD;&#xA;--key-type babe&#xD;&#xA;&#xD;&#xA;./target/release/realm3 key insert --base-path /tmp/validator1 \&#xD;&#xA;--chain node/specs/customSpecRaw.json \&#xD;&#xA;--scheme Ed25519 \&#xD;&#xA;--suri &lt;suri&gt; \&#xD;&#xA;--password-interactive \&#xD;&#xA;--key-type gran&#xD;&#xA;&#xD;&#xA;./target/release/realm3 key insert --base-path /tmp/validator1 \&#xD;&#xA;--chain node/specs/customSpecRaw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri &lt;suri&gt; \&#xD;&#xA;--password-interactive \&#xD;&#xA;--key-type imon&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've followed steps #2 and #3 for each validator. I inserted the keys after the node is started.&#xD;&#xA;&#xD;&#xA;[chainSpec.json][2]&#xD;&#xA;&#xD;&#xA;**PS:** I'm running the 2 nodes with different DNS than the other 2. The bootnode and validator node that has the same DNS with it have 3 peers. However, the other 2 nodes have 2 peers.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aPFWq.png&#xD;&#xA;  [2]: https://gist.github.com/buraktabn/3397c76151b7c1fbabf6750014604fab" ContentLicense="CC BY-SA 4.0" />
  <row Id="11500" PostHistoryTypeId="1" PostId="3068" RevisionGUID="73f2661d-7900-4c92-aed8-5ce7ebd0612b" CreationDate="2022-06-05T22:54:00.887" UserId="245" Text="Why finalized blocks is zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11501" PostHistoryTypeId="3" PostId="3068" RevisionGUID="73f2661d-7900-4c92-aed8-5ce7ebd0612b" CreationDate="2022-06-05T22:54:00.887" UserId="245" Text="|validator|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11502" PostHistoryTypeId="2" PostId="3069" RevisionGUID="a48d59d3-1a8c-4f73-b75c-0bf8f70787d7" CreationDate="2022-06-06T02:44:10.363" UserId="515" Text="I'm going through Substrate and see some places implement integrity_test as Hooks function to check some variables values.&#xD;&#xA;My question is what is integrity_test? and when we should implement it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11504" PostHistoryTypeId="1" PostId="3069" RevisionGUID="a48d59d3-1a8c-4f73-b75c-0bf8f70787d7" CreationDate="2022-06-06T02:44:10.363" UserId="515" Text="What is integrity_test?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11505" PostHistoryTypeId="3" PostId="3069" RevisionGUID="a48d59d3-1a8c-4f73-b75c-0bf8f70787d7" CreationDate="2022-06-06T02:44:10.363" UserId="515" Text="|substrate-node|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11507" PostHistoryTypeId="2" PostId="3070" RevisionGUID="bdbaae4b-2bfd-4ace-a9a0-1894971e5d09" CreationDate="2022-06-06T05:36:25.923" UserId="1970" Text="The call parameter is [an enum, MaybeHashed](https://github.com/paritytech/substrate/blob/50176e1b57bdf6168d9bf3764d1cce9ed8bcf611/frame/scheduler/src/lib.rs#L85) for either a `Call` or a `Hash`, as the error message suggests which provides the type -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;&quot;call&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Value\&quot;:\&quot;Call\&quot;,\&quot;Hash\&quot;:\&quot;H256\&quot;}}&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To call it, you need to explicitly indicate the fact that you are making a call by passing the enum with a value instead of the call itself.&#xD;&#xA;&#xD;&#xA;Adjust your code to the following -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;await api.tx.scheduler&#xD;&#xA;  .schedule(&#xD;&#xA;    53, &#xD;&#xA;    null, &#xD;&#xA;    1, &#xD;&#xA;    // pass an enum here - `call` as the type &#xD;&#xA;    { value: call }&#xD;&#xA;  )&#xD;&#xA;  .signAndSend(...)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the same way when passing a hash you would do `{ hash: '0x...' }`" ContentLicense="CC BY-SA 4.0" />
  <row Id="11509" PostHistoryTypeId="2" PostId="3071" RevisionGUID="9ef590dd-e80e-46ce-8a8c-c18c21f7ba7a" CreationDate="2022-06-06T05:56:03.267" UserId="2050" Text="Currently my consensus engine is Babe, and my finality gadget is Grandpa.&#xD;&#xA;But for testing environments I'm wondering if that there is a way to manually force the engine to produce a new block when I request.&#xD;&#xA;&#xD;&#xA;Is there a way to implement this? or is it impossible for now?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11511" PostHistoryTypeId="1" PostId="3071" RevisionGUID="9ef590dd-e80e-46ce-8a8c-c18c21f7ba7a" CreationDate="2022-06-06T05:56:03.267" UserId="2050" Text="manually creating new blocks with Babe" ContentLicense="CC BY-SA 4.0" />
  <row Id="11512" PostHistoryTypeId="3" PostId="3071" RevisionGUID="9ef590dd-e80e-46ce-8a8c-c18c21f7ba7a" CreationDate="2022-06-06T05:56:03.267" UserId="2050" Text="|grandpa|babe|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11513" PostHistoryTypeId="2" PostId="3072" RevisionGUID="37fe416c-82be-45e9-930b-76d7de2dc2bd" CreationDate="2022-06-06T06:21:47.377" UserId="2701" Text="&#xD;&#xA;[This answer][1] told me how to query balance info of all accounts. Now I would like to query the [Identity Module][2]'s information of all accounts on Kusama chain (such as Legal Name, Twitter handle and so on).&#xD;&#xA;&#xD;&#xA;I thought there must be some way to access registered information using polkadot-api, not web UI. The information seems to be inserted by [line 364][3]&#xD;&#xA;&#xD;&#xA;    			&lt;IdentityOf&lt;T&gt;&gt;::insert(&amp;sender, id);&#xD;&#xA;But I could not dig deeper. Thank you for your help in advance.&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/66228220/how-to-query-all-current-polkadot-accounts-with-polkadot-js&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/frame/identity&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/identity/src/lib.rs#L364" ContentLicense="CC BY-SA 4.0" />
  <row Id="11515" PostHistoryTypeId="1" PostId="3072" RevisionGUID="37fe416c-82be-45e9-930b-76d7de2dc2bd" CreationDate="2022-06-06T06:21:47.377" UserId="2701" Text="How to query all Identity Module's registered info?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11516" PostHistoryTypeId="3" PostId="3072" RevisionGUID="37fe416c-82be-45e9-930b-76d7de2dc2bd" CreationDate="2022-06-06T06:21:47.377" UserId="2701" Text="|identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11518" PostHistoryTypeId="2" PostId="3073" RevisionGUID="2f5b1a86-f627-49cb-a902-a2ae491351b6" CreationDate="2022-06-06T07:34:23.617" UserId="1949" Text="There is no difference between retrieving the [entries for any map](https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries), the format is exactly the same as in the answer you linked.&#xD;&#xA;&#xD;&#xA;In this case, use [identityOf](https://polkadot.js.org/docs/substrate/storage#identityofaccountid32-optionpalletidentityregistration) which is a map -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const all = await api.query.idendity.identityOf.entries()&#xD;&#xA;&#xD;&#xA;for (let i = 0; i &lt; all.length; i++) {&#xD;&#xA;  const [key, value] = all[i]&#xD;&#xA;&#xD;&#xA;  console.log(&#xD;&#xA;    &quot;accountId=&quot; + key.args[0].toHuman() + &#xD;&#xA;    &quot;, value=&quot; + value.toHuman()&#xD;&#xA;  )&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11527" PostHistoryTypeId="12" PostId="2917" RevisionGUID="2b919eea-1684-4d13-ad6b-834c1194657a" CreationDate="2022-06-06T11:15:31.383" UserId="560" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:560,&quot;DisplayName&quot;:&quot;flipchan&quot;}]}" />
  <row Id="11528" PostHistoryTypeId="13" PostId="2917" RevisionGUID="6f890e61-a82e-44b0-bb1d-007a1d27eb2c" CreationDate="2022-06-06T14:46:33.820" UserId="560" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:560,&quot;DisplayName&quot;:&quot;flipchan&quot;}]}" />
  <row Id="11529" PostHistoryTypeId="5" PostId="2917" RevisionGUID="26f71de6-7e0e-458b-a990-bbcc216099d5" CreationDate="2022-06-06T14:47:19.670" UserId="560" Comment="added 12 characters in body" Text="non answer: this was because #![cfg_attr(not(feature = &quot;std&quot;), no_std)] was enabled on the pallet.." ContentLicense="CC BY-SA 4.0" />
  <row Id="11530" PostHistoryTypeId="5" PostId="3073" RevisionGUID="566ee252-7527-4709-8d23-980113948729" CreationDate="2022-06-06T15:50:02.607" UserId="1949" Comment="Updated with stringify on value (+ removal of string cooercion)" Text="There is no difference between retrieving the [entries for any map](https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries), the format is exactly the same as in the answer you linked.&#xD;&#xA;&#xD;&#xA;In this case, use [identityOf](https://polkadot.js.org/docs/substrate/storage#identityofaccountid32-optionpalletidentityregistration) which is a map -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const all = await api.query.idendity.identityOf.entries()&#xD;&#xA;&#xD;&#xA;for (let i = 0; i &lt; all.length; i++) {&#xD;&#xA;  const [key, value] = all[i]&#xD;&#xA;&#xD;&#xA;  console.log(&#xD;&#xA;    &quot;accountId=&quot;, key.args[0].toHuman(), &#xD;&#xA;    &quot;, value=&quot;, JSON.stringify(value.toHuman(), null, 2)&#xD;&#xA;  )&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11531" PostHistoryTypeId="52" PostId="3072" RevisionGUID="92f65885-bd65-47d2-a2d8-67794c4c0497" CreationDate="2022-06-06T16:59:23.110" />
  <row Id="11532" PostHistoryTypeId="4" PostId="3068" RevisionGUID="801ee956-6958-4eba-b39d-d6213f599b6d" CreationDate="2022-06-06T17:05:39.360" UserId="85" Comment="grammar" Text="Why are finalized blocks zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11533" PostHistoryTypeId="2" PostId="3075" RevisionGUID="57dc9f59-13b5-45e8-a4d9-6c491e943a71" CreationDate="2022-06-06T17:21:51.057" UserId="85" Text="The answer is you don't (or should not) care. If you can get hold of a `T: Config` then you can use the &#xD;&#xA;`T::Hasher::hash(slice)` ( which implements the [Hasher][1] trait ) to hash data that you'd like hashed in a similar fashion.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_core/trait.Hasher.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="11539" PostHistoryTypeId="2" PostId="3077" RevisionGUID="4d615c9d-6742-41b5-a2f8-324c4f458b66" CreationDate="2022-06-06T17:31:06.547" UserId="555" Text="what are the commands to remove both **validators** (Alice and bob) from Relay-chain in Linux OS ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11541" PostHistoryTypeId="1" PostId="3077" RevisionGUID="4d615c9d-6742-41b5-a2f8-324c4f458b66" CreationDate="2022-06-06T17:31:06.547" UserId="555" Text="Remove validators from relay chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="11542" PostHistoryTypeId="3" PostId="3077" RevisionGUID="4d615c9d-6742-41b5-a2f8-324c4f458b66" CreationDate="2022-06-06T17:31:06.547" UserId="555" Text="|polkadot-js|validator|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11543" PostHistoryTypeId="2" PostId="3078" RevisionGUID="39a2ffb8-d69c-4206-9e8b-55b4ded4c9ba" CreationDate="2022-06-06T18:33:29.650" UserId="2704" Text="I've just completed the Substrate Kitties tutorial. Since I've created my own chain in my own local environment, I was wondering if it's possible for me to deploy my Substrate Kitties chain on to the Westend or Rococo test networks. I've tried looking online for information, but there doesn't seem to be much. Would really appreciate any help that points me in the right direction. &#xD;&#xA;&#xD;&#xA;I've looked up https://wiki.polkadot.network/docs/maintain-sync but when I try to start my node, I get an error that the file does not exist. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11545" PostHistoryTypeId="1" PostId="3078" RevisionGUID="39a2ffb8-d69c-4206-9e8b-55b4ded4c9ba" CreationDate="2022-06-06T18:33:29.650" UserId="2704" Text="Possibility of Deploying Substrate Kitties to Testnet" ContentLicense="CC BY-SA 4.0" />
  <row Id="11546" PostHistoryTypeId="3" PostId="3078" RevisionGUID="39a2ffb8-d69c-4206-9e8b-55b4ded4c9ba" CreationDate="2022-06-06T18:33:29.650" UserId="2704" Text="|rococo|westend|substrate-kitties-chain|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11556" PostHistoryTypeId="2" PostId="3081" RevisionGUID="25e94a10-8652-4ac8-9dbc-3bbd2d546258" CreationDate="2022-06-06T21:13:13.660" UserId="2408" Text="I would like to create a contract (something like an ICO) with an opening and a closing time. The storage stuct looks like this:&#xD;&#xA;```&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Postbox {&#xD;&#xA;        **snip**&#xD;&#xA;        open_time: ink_env::Environment::Timestamp,&#xD;&#xA;        close_time: ink_env::Environment::Timestamp,&#xD;&#xA;        **snip**&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;and I get the &#xD;&#xA;```&#xD;&#xA;error[E0223]: ambiguous associated type&#xD;&#xA;  --&gt; lib.rs:14:20&#xD;&#xA;   |&#xD;&#xA;14 |         open_time: ink_env::Environment::Timestamp,&#xD;&#xA;   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `&lt;Type as ink_env::Environment&gt;::Timestamp`&#xD;&#xA;```&#xD;&#xA;error while building it.&#xD;&#xA;&#xD;&#xA;__First question__:  &#xD;&#xA;How can I store a timestamp in the storage?  &#xD;&#xA;&#xD;&#xA;Also I would like to close the ICO in 1 week after opening.  &#xD;&#xA;&#xD;&#xA;__Second question__:  &#xD;&#xA;In Solidity I can use `block.timestamp() + 7 days `. Is there anything like that in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11558" PostHistoryTypeId="1" PostId="3081" RevisionGUID="25e94a10-8652-4ac8-9dbc-3bbd2d546258" CreationDate="2022-06-06T21:13:13.660" UserId="2408" Text="Managing Time Periods in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="11559" PostHistoryTypeId="3" PostId="3081" RevisionGUID="25e94a10-8652-4ac8-9dbc-3bbd2d546258" CreationDate="2022-06-06T21:13:13.660" UserId="2408" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11560" PostHistoryTypeId="2" PostId="3082" RevisionGUID="e96309e4-2933-4acb-8b42-32032dfb5dd5" CreationDate="2022-06-06T22:54:07.213" UserId="2698" Text="I am attempting to use a custom struct in a map which needs to be stored.&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, Default, Clone, PartialEq, TypeInfo)]&#xD;&#xA;	#[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;	pub(super) struct Amendment&lt;AccountId&gt; {&#xD;&#xA;			pub statement: Vec&lt;u8&gt;,&#xD;&#xA;			pub owners: Vec&lt;AccountId&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn declaration_map)]&#xD;&#xA;	pub(super) type Declarations&lt;T: Config&gt; = StorageMap&#xD;&#xA;	&lt;&#xD;&#xA;	_,&#xD;&#xA;	Blake2_128Concat,&#xD;&#xA;	&lt;T as Config&gt;::AccountId,&#xD;&#xA;	Amendment&lt;&lt;T as pallet::Config&gt;::AccountId&gt;,&#xD;&#xA;	ValueQuery&#xD;&#xA;	&gt;;&#xD;&#xA;It is giving me this error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JZlIu.png&#xD;&#xA;&#xD;&#xA;Is there a way to make it public?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11562" PostHistoryTypeId="1" PostId="3082" RevisionGUID="e96309e4-2933-4acb-8b42-32032dfb5dd5" CreationDate="2022-06-06T22:54:07.213" UserId="2698" Text="Why does using a struct in Pallet storage create a crate-private leak?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11563" PostHistoryTypeId="3" PostId="3082" RevisionGUID="e96309e4-2933-4acb-8b42-32032dfb5dd5" CreationDate="2022-06-06T22:54:07.213" UserId="2698" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11565" PostHistoryTypeId="2" PostId="3083" RevisionGUID="174b87b1-6306-45a2-a2da-654aaf338950" CreationDate="2022-06-06T23:24:39.277" UserId="1861" Text="`#[pallet::storage]` creaes a `pub fn amendment() -&gt; Amendment&lt;_&gt; { .. }` which leaks `Amendment&lt;_&gt;` which is according to your definition a narrower public scope.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/support/procedural/src/pallet/expand/storage.rs#L288&#xD;&#xA;&#xD;&#xA;`pub(super) Amendment` must become `pub Amendment` to resolve this." ContentLicense="CC BY-SA 4.0" />
  <row Id="11576" PostHistoryTypeId="52" PostId="3082" RevisionGUID="810d5943-44a7-429e-a0e1-86d653369952" CreationDate="2022-06-07T06:57:18.603" />
  <row Id="11578" PostHistoryTypeId="2" PostId="3085" RevisionGUID="c961eeb5-ec89-409e-bc29-d8f1a3ae4901" CreationDate="2022-06-07T07:27:48.050" UserId="2481" Text="https://github.com/emeraldpay/polkaj[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I request the RPC method state through the method provided by the SDK linked above_ GetMetadata, but metadata cannot be resolved. There will be an error (unsupported metadata version: 14). How can I solve it? Preferably Java. Thank you in advance for helping my friends&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OnGoC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11580" PostHistoryTypeId="1" PostId="3085" RevisionGUID="c961eeb5-ec89-409e-bc29-d8f1a3ae4901" CreationDate="2022-06-07T07:27:48.050" UserId="2481" Text="How to parse the data returned by the HTTP request RPC (state_getmetadata)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11581" PostHistoryTypeId="3" PostId="3085" RevisionGUID="c961eeb5-ec89-409e-bc29-d8f1a3ae4901" CreationDate="2022-06-07T07:27:48.050" UserId="2481" Text="|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11582" PostHistoryTypeId="5" PostId="3085" RevisionGUID="0573c6a7-eebb-4938-a4f3-9551184ca18b" CreationDate="2022-06-07T07:37:49.220" UserId="2481" Comment="added 4 characters in body" Text="https://github.com/emeraldpay/polkaj&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I request the RPC method state through the method provided by the SDK linked above_ GetMetadata, but metadata cannot be resolved. There will be an error (unsupported metadata version: 14). How can I solve it? Preferably Java. Thank you in advance for helping my friends&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OnGoC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11583" PostHistoryTypeId="2" PostId="3086" RevisionGUID="d6db9de4-2447-4bcf-8dc3-84aa7718bb21" CreationDate="2022-06-07T08:07:44.903" UserId="140" Text="@alejandro-martínez&#xD;&#xA;&#xD;&#xA;Is there any such system built where it is possible to switch between solochain and parachain whenever we want?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11589" PostHistoryTypeId="2" PostId="3088" RevisionGUID="580052f7-c75e-4951-b7be-b9129b824c6f" CreationDate="2022-06-07T09:04:25.640" UserId="2344" Text="Under Network &gt; Staking &gt; Targets we can see some validators are selected for the `next session / active set.`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/staking/targets&#xD;&#xA;&#xD;&#xA;What event is this on the blockchain? &#xD;&#xA;&#xD;&#xA;Can I listen for this, e.g. using rpc/js api?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I developed a bot to monitor validator `active` and `valid` for Kusama 1KV. You can join the bot here: https://discord.gg/2FutW37x Any feedback is welcome!&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/k1DdK.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/u5sv8.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11591" PostHistoryTypeId="1" PostId="3088" RevisionGUID="580052f7-c75e-4951-b7be-b9129b824c6f" CreationDate="2022-06-07T09:04:25.640" UserId="2344" Text="What event marks a Validator as selected for next session" ContentLicense="CC BY-SA 4.0" />
  <row Id="11592" PostHistoryTypeId="3" PostId="3088" RevisionGUID="580052f7-c75e-4951-b7be-b9129b824c6f" CreationDate="2022-06-07T09:04:25.640" UserId="2344" Text="|polkadot-js|kusama|validator|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11593" PostHistoryTypeId="2" PostId="3089" RevisionGUID="6baab209-f893-4726-8661-e56cd0bf2faa" CreationDate="2022-06-07T09:14:15.013" UserId="2565" Text="I want to deploy my substrate-node-template to a server in AWS.  How can I do that? " ContentLicense="CC BY-SA 4.0" />
  <row Id="11595" PostHistoryTypeId="1" PostId="3089" RevisionGUID="6baab209-f893-4726-8661-e56cd0bf2faa" CreationDate="2022-06-07T09:14:15.013" UserId="2565" Text="How can you deploy your substrate-node-template in AWS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11596" PostHistoryTypeId="3" PostId="3089" RevisionGUID="6baab209-f893-4726-8661-e56cd0bf2faa" CreationDate="2022-06-07T09:14:15.013" UserId="2565" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11598" PostHistoryTypeId="2" PostId="3090" RevisionGUID="9a6b9fd0-1aef-4215-b774-f5068063b5c9" CreationDate="2022-06-07T10:32:03.107" UserId="165" Text="At the moment of writing Westend is not available for public testing. Though you should be able to request a temporary slot for Rococo by opening an issue [here](https://github.com/paritytech/subport/issues/new/choose).&#xD;&#xA;Although, I believe you won't leverage Rococo that much. It provides a good environment for testing as you are building something that will end up being production material, for testing the outcome of a tutorial my take is that the ux you will get is not going to be that different from what you can experience by running your own relay." ContentLicense="CC BY-SA 4.0" />
  <row Id="11600" PostHistoryTypeId="5" PostId="3077" RevisionGUID="f8d37b43-8743-4d13-915b-258fe1346bc4" CreationDate="2022-06-07T11:11:59.553" UserId="555" Comment="deleted 3 characters in body; edited title" Text="what are the commands to remove both **collators** (Alice and bob) from parachain in Linux OS ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11601" PostHistoryTypeId="4" PostId="3077" RevisionGUID="f8d37b43-8743-4d13-915b-258fe1346bc4" CreationDate="2022-06-07T11:11:59.553" UserId="555" Comment="deleted 3 characters in body; edited title" Text="Remove collator from parachain chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="11602" PostHistoryTypeId="2" PostId="3091" RevisionGUID="74acb190-1c6d-4550-aeb3-a7927bec5a32" CreationDate="2022-06-07T11:22:35.903" UserId="165" Text="The library that you are using seems to be outdated. For what I have seen there is an open issue for this, I would just suggest you to track it there - https://github.com/emeraldpay/polkaj/issues/88" ContentLicense="CC BY-SA 4.0" />
  <row Id="11604" PostHistoryTypeId="8" PostId="3077" RevisionGUID="1f2fe4f6-be5b-4491-8d8f-ac54b5a13395" CreationDate="2022-06-07T11:37:11.703" UserId="555" Comment="Rollback to [4d615c9d-6742-41b5-a2f8-324c4f458b66]" Text="what are the commands to remove both **validators** (Alice and bob) from Relay-chain in Linux OS ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11605" PostHistoryTypeId="7" PostId="3077" RevisionGUID="1f2fe4f6-be5b-4491-8d8f-ac54b5a13395" CreationDate="2022-06-07T11:37:11.703" UserId="555" Comment="Rollback to [4d615c9d-6742-41b5-a2f8-324c4f458b66]" Text="Remove validators from relay chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="11606" PostHistoryTypeId="2" PostId="3092" RevisionGUID="6d30039d-6a98-4ca4-bde8-b3e34fbe6a9c" CreationDate="2022-06-07T12:58:31.107" UserId="258" Text="I am currently writing integration tests for my contracts using redspot, I can't seem to run all my integration tests at once, I can only run integration test by using the keyword `it.only`. Anytime I try running all tests, only the first test works fine and then i get this error when the next integration test tries to run.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;         Error: the object {&#xD;&#xA;      &quot;error&quot;: {&#xD;&#xA;        &quot;message&quot;: &quot;1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low&quot;&#xD;&#xA;      }&#xD;&#xA;      &quot;from&quot;: &quot;5F2DEdhqyaDvPpasrhSLv8KxjdnVG1MZTAkHPA5doArnvQj4&quot;&#xD;&#xA;      &quot;txHash&quot;: &quot;0xd6f1a3d8fdf7bc94a162a5d777ccf91863dbc8a8bbfcad7ee343016423adbea8&quot;&#xD;&#xA;    } was thrown, throw an Error :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6ui8g.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11608" PostHistoryTypeId="1" PostId="3092" RevisionGUID="6d30039d-6a98-4ca4-bde8-b3e34fbe6a9c" CreationDate="2022-06-07T12:58:31.107" UserId="258" Text="How to run multiple Integration tests at once in Redspot Ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="11609" PostHistoryTypeId="3" PostId="3092" RevisionGUID="6d30039d-6a98-4ca4-bde8-b3e34fbe6a9c" CreationDate="2022-06-07T12:58:31.107" UserId="258" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11610" PostHistoryTypeId="2" PostId="3093" RevisionGUID="c79ab8db-2094-415e-b93f-345617058963" CreationDate="2022-06-07T13:21:21.253" UserId="560" Text="I'm having the same problem.&#xD;&#xA;&#xD;&#xA;It's due to some std leak somewhere, no_std not being used properly, enabled:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --&gt; /home/flipchan/.cargo/git/checkouts/substrate-7e08433d4c370a21/fc3fd07/primitives/runtime-interface/src/impls.rs:45:1  45 | assert_eq_size!(usize, u32); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: usize (64 bits) = note: target type: u32 (32 bits) = note: this error originates in the macro assert_eq_size (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Have you double checked the no_std flags?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11618" PostHistoryTypeId="2" PostId="3096" RevisionGUID="76590613-bd97-480c-ba31-c13a0cc9ac3f" CreationDate="2022-06-07T14:00:14.067" UserId="1789" Text="it seems to be a Github environment setup problem for running Zombienet test with my custom parachain. &#xD;&#xA;&#xD;&#xA;I have made a template repo trying to reproduce this problem. &#xD;&#xA;&#xD;&#xA;When I used my template repo to run Zombienet tests with its own docker image, it passed. My settings in .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.22&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z1template&quot;&#xD;&#xA;```&#xD;&#xA;when I changed the images to my custom image with corresponding Polkadot image, it failed...&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.21&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z21&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But that z21 collator image can pass all Zombienet tests in my local machine, but the same image cannot run properly in Github's kubectl &amp; minikube environment for unknown reason...&#xD;&#xA;&#xD;&#xA;Here are the error message... I use this repo to run the same Zombienet tests with different collator and polkadot images:&#xD;&#xA;https://github.com/AuroraLantean/substrate-parachain-template-zombienet2/runs/6772959979?check_suite_focus=true&#xD;&#xA;&#xD;&#xA;The image is the same. The tests are the same.  the only difference is the kubectl and minikube setup. I can think of no other possible reason for failure...&#xD;&#xA;&#xD;&#xA;So I think some setting is missing in .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;      - name: Start minikube&#xD;&#xA;        uses: medyagh/setup-minikube@master&#xD;&#xA;```&#xD;&#xA;please advise." ContentLicense="CC BY-SA 4.0" />
  <row Id="11620" PostHistoryTypeId="1" PostId="3096" RevisionGUID="76590613-bd97-480c-ba31-c13a0cc9ac3f" CreationDate="2022-06-07T14:00:14.067" UserId="1789" Text="How to setup Kubectl, Minikube &amp; Zombienet tests in Github CICD" ContentLicense="CC BY-SA 4.0" />
  <row Id="11621" PostHistoryTypeId="3" PostId="3096" RevisionGUID="76590613-bd97-480c-ba31-c13a0cc9ac3f" CreationDate="2022-06-07T14:00:14.067" UserId="1789" Text="|zombienet|cicd|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11624" PostHistoryTypeId="2" PostId="3097" RevisionGUID="4bf75d26-860f-45ca-8b40-5f25cb31bd69" CreationDate="2022-06-07T14:39:59.117" UserId="2588" Text="I have few transactions and I'd like to get the from addresses of these transactions. I couldn't found anything like an API or RPC endpoint which returns from addresses. Any advice or help appreciated, thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="11626" PostHistoryTypeId="1" PostId="3097" RevisionGUID="4bf75d26-860f-45ca-8b40-5f25cb31bd69" CreationDate="2022-06-07T14:39:59.117" UserId="2588" Text="Getting from addresses by passion transaction id or hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="11627" PostHistoryTypeId="3" PostId="3097" RevisionGUID="4bf75d26-860f-45ca-8b40-5f25cb31bd69" CreationDate="2022-06-07T14:39:59.117" UserId="2588" Text="|polkadot-js|polkadot|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11628" PostHistoryTypeId="4" PostId="3097" RevisionGUID="84fd03f7-471f-42b3-bba8-9851a4ec3df9" CreationDate="2022-06-07T14:40:14.627" UserId="2588" Comment="edited title" Text="Getting from addresses by passing transaction id or hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="11629" PostHistoryTypeId="4" PostId="3097" RevisionGUID="e995b41e-aadf-420b-9830-46cf56f781dc" CreationDate="2022-06-07T14:40:20.340" UserId="2588" Comment="edited title" Text="Getting from addresses by passing transaction id or hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="11630" PostHistoryTypeId="2" PostId="3098" RevisionGUID="66512721-0f75-4e55-8bbe-3cf064deadd1" CreationDate="2022-06-07T15:06:15.490" UserId="2025" Text="If you are referring to transactions that were included already in the blockchain, please note that the transaction hash is [not a unique identifier](https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics) for a transaction in Polkadot. Hence you can't expect to simply query them by their hash.&#xD;&#xA;&#xD;&#xA;However, if, apart from the transaction hash, you have the block number in which it was included, you can do something similar to what was proposed in [this answer](https://substrate.stackexchange.com/questions/626/to-get-the-extrinsic-data-from-the-extrinsic-hash?rq=1). In this case, the sender address is showed as in the signer field as as a [SS58 formatted](https://docs.substrate.io/v3/advanced/ss58/) address." ContentLicense="CC BY-SA 4.0" />
  <row Id="11632" PostHistoryTypeId="2" PostId="3099" RevisionGUID="c29b6ae7-9798-404f-85f9-baf9b45744b3" CreationDate="2022-06-07T16:53:20.633" UserId="2708" Text="While testing the council functionality, I ran into an error with `BadOrigin`.&#xD;&#xA;&#xD;&#xA;Where is the mistake?&#xD;&#xA;&#xD;&#xA;Below are my steps:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;[![enter image description here][6]][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Jy9lI.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/NrUtt.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/XERY5.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/Su4xY.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/qGJbA.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/Yxc1P.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="11634" PostHistoryTypeId="1" PostId="3099" RevisionGUID="c29b6ae7-9798-404f-85f9-baf9b45744b3" CreationDate="2022-06-07T16:53:20.633" UserId="2708" Text="How to use council's external proposal correctly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11635" PostHistoryTypeId="3" PostId="3099" RevisionGUID="c29b6ae7-9798-404f-85f9-baf9b45744b3" CreationDate="2022-06-07T16:53:20.633" UserId="2708" Text="|council|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11636" PostHistoryTypeId="2" PostId="3100" RevisionGUID="490ccde9-f85e-4ba4-a39c-7a517cd0a286" CreationDate="2022-06-07T17:47:18.010" UserId="2635" Text="When a node if offline, ImOnLine reports something like this:&#xD;&#xA;&#xD;&#xA;Someoffline:&#xD;&#xA;[&#xD;&#xA;  5EFRkbkfT6Sxjmkb6MiSyG8TAnVwV4KBk1BWfZnQ3XL14uxq,&#xD;&#xA;  {&#xD;&#xA;    total: 79.2000 kTOK,&#xD;&#xA;    own: 79.2000 kkTOK,&#xD;&#xA;    others: []&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;How can I know which node or account 5EFRkbkfT6Sxjmkb6MiSyG8TAnVwV4KBk1BWfZnQ3XL14uxq is referring to? I mean, how can I find the physical node (IP/DNS for example)?&#xD;&#xA;&#xD;&#xA;Thanks very much.&#xD;&#xA;regards;&#xD;&#xA;fernando" ContentLicense="CC BY-SA 4.0" />
  <row Id="11638" PostHistoryTypeId="1" PostId="3100" RevisionGUID="490ccde9-f85e-4ba4-a39c-7a517cd0a286" CreationDate="2022-06-07T17:47:18.010" UserId="2635" Text="Identify offending nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="11639" PostHistoryTypeId="3" PostId="3100" RevisionGUID="490ccde9-f85e-4ba4-a39c-7a517cd0a286" CreationDate="2022-06-07T17:47:18.010" UserId="2635" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11640" PostHistoryTypeId="2" PostId="3101" RevisionGUID="6a3b15c0-9d6a-46be-9991-b6ae850888f3" CreationDate="2022-06-07T18:45:36.773" UserId="590" Text="We’re trying to do the exact thing as referenced in https://substrate.stackexchange.com/questions/1106/how-to-mock-trait-in-benchmarking/3058#3058, and we have implemented the struct + trait we need in our mocks, however, the benchmarks are calling the runtime config version and not the mock config version of the trait implementation. The mock pallet config uses `T::AccountHandler`, as defined inside mock.rs, for a defined `AccountProvider` trait.&#xD;&#xA;NB: this was converted from an answer to a comment in the linked question, but all the code I included was cut off and I can’t edit the comment.&#xD;&#xA;&#xD;&#xA;mock.rs:&#xD;&#xA;```&#xD;&#xA;pub struct AccountHandler;&#xD;&#xA;impl AccountProvider&lt;AccountId, BlockNumber&gt; for AccountHandler {&#xD;&#xA;	fn get_msa_id(key: &amp;AccountId) -&gt; Option&lt;MessageSenderId&gt; {&#xD;&#xA;      // etc.&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;impl pallet_messages::Config for Test {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type AccountProvider = AccountHandler;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type MaxMessagesPerBlock = MaxMessagesPerBlock;&#xD;&#xA;	type MaxMessageSizeInBytes = MaxMessageSizeInBytes;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Inside the pallet, it uses `AccountProvider` like so:&#xD;&#xA;```&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		&#xD;&#xA;		type AccountProvider: AccountProvider&lt;Self::AccountId, Self::BlockNumber&gt;;&#xD;&#xA;       /// etc.&#xD;&#xA;    }&#xD;&#xA;    // inside the extrinsic we want to benchmark, the trait function is called like so:&#xD;&#xA;		#[pallet::weight(T::WeightInfo::add(message.len() as u32, 1_000))]&#xD;&#xA;		pub fn add(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			message: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;            // etc.&#xD;&#xA;            let msa_id = T::AccountProvider::get_msa_id(&amp;who);&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We’re building the benchmarks with --runtime, and we are using substrate polkadot-v0.9.18 substrate.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11642" PostHistoryTypeId="1" PostId="3101" RevisionGUID="6a3b15c0-9d6a-46be-9991-b6ae850888f3" CreationDate="2022-06-07T18:45:36.773" UserId="590" Text="Benchmarking Mock" ContentLicense="CC BY-SA 4.0" />
  <row Id="11643" PostHistoryTypeId="3" PostId="3101" RevisionGUID="6a3b15c0-9d6a-46be-9991-b6ae850888f3" CreationDate="2022-06-07T18:45:36.773" UserId="590" Text="|benchmarking|benchmark|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11644" PostHistoryTypeId="12" PostId="3099" RevisionGUID="0f55cb13-a96a-4bd9-a108-62314c2fdd70" CreationDate="2022-06-07T19:18:24.557" UserId="2708" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2708,&quot;DisplayName&quot;:&quot;Star&quot;}]}" />
  <row Id="11645" PostHistoryTypeId="2" PostId="3102" RevisionGUID="58708379-3e16-4fa7-8e0b-73391cf24dc8" CreationDate="2022-06-07T20:03:26.757" UserId="351" Text="As for now it supports rest request, and some duration limitation due to valid reasons. So my question is can we enable or work with web sockets for monitoring data changes , as for now we are only doing on and off connections to the outside world" ContentLicense="CC BY-SA 4.0" />
  <row Id="11647" PostHistoryTypeId="1" PostId="3102" RevisionGUID="58708379-3e16-4fa7-8e0b-73391cf24dc8" CreationDate="2022-06-07T20:03:26.757" UserId="351" Text="Can we enable off-chain workers http client to support web-sockets request?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11648" PostHistoryTypeId="3" PostId="3102" RevisionGUID="58708379-3e16-4fa7-8e0b-73391cf24dc8" CreationDate="2022-06-07T20:03:26.757" UserId="351" Text="|offchain-worker|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11649" PostHistoryTypeId="2" PostId="3103" RevisionGUID="60d20dbc-3e17-457b-a1cf-7c5a5f17cff9" CreationDate="2022-06-07T21:15:04.943" UserId="543" Text="I setup a node on an EC2 running Amazon Linux. It was exactly the same approach as needed to setup a node in any linux environment. The only thing different is that you'll need to modify the security groups to expose the proper ports to call RPC endpoints, connect to other nodes, etc. &#xD;&#xA;&#xD;&#xA;i.e. if you're running a node with a command like:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template --tmp --dev --alice --port 30333&#xD;&#xA;    --ws-port 9944 --rpc-port 9933 --rpc-cors all --ws-external --rpc-external --rpc-methods=unsafe --validator&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then you want to expose ports 9944 and 9933 through your security group." ContentLicense="CC BY-SA 4.0" />
  <row Id="11651" PostHistoryTypeId="2" PostId="3104" RevisionGUID="8980333c-9009-4e89-b330-155027f23ade" CreationDate="2022-06-07T21:16:58.570" UserId="2709" Text="I am trying to send assets from parachain to relaychain from polkadotXcm extrinsic `reserveTransferAssets` and `teleportAssets` in polkadotjs app, but it is giving me Asset Not Found error, I am not sure how to fix it, I have tried creating asset also from the UI and tried passing the asset ID in those extrinsic, but getting the same error.&#xD;&#xA;&#xD;&#xA;[![Image showing extrinsic call in polkadotjs app][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Block details][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1XEY6.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/HpO21.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="11653" PostHistoryTypeId="1" PostId="3104" RevisionGUID="8980333c-9009-4e89-b330-155027f23ade" CreationDate="2022-06-07T21:16:58.570" UserId="2709" Text="Sending assets from parachain to relaychain resulting in asset not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="11654" PostHistoryTypeId="3" PostId="3104" RevisionGUID="8980333c-9009-4e89-b330-155027f23ade" CreationDate="2022-06-07T21:16:58.570" UserId="2709" Text="|polkadot-js|xcm|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11655" PostHistoryTypeId="2" PostId="3105" RevisionGUID="f29e6c36-b005-4edc-93f3-7a9d52ccb550" CreationDate="2022-06-07T21:20:40.673" UserId="543" Text="I'm not sure of any specific command in ink! to fetch the native balance, but it sounds like you want to build a [chain extension][1] that can return the user's balances from the runtime. You would add the chain extension in the runtime configuration, for example: https://github.com/paritytech/ink/blob/80d302eb9b9cddb726200a9a86c71ae344d1b042/examples/rand-extension/runtime/chain-extension-example.rs#L20&#xD;&#xA;&#xD;&#xA;Then you can configure the chain extension in your contract and call the function.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://ink.substrate.io/macros-attributes/chain-extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="11665" PostHistoryTypeId="13" PostId="3099" RevisionGUID="5df0d655-131f-41d1-9913-63bd9a2c4bac" CreationDate="2022-06-08T03:07:32.860" UserId="2708" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2708,&quot;DisplayName&quot;:&quot;Star&quot;}]}" />
  <row Id="11666" PostHistoryTypeId="2" PostId="3108" RevisionGUID="cdd30852-a0e0-4c26-890c-e6ec00b1a86f" CreationDate="2022-06-08T03:13:06.403" UserId="2708" Text="I found the reason.&#xD;&#xA;&#xD;&#xA;The threshold is set to 3 on the polkadot.js apps interface, but in fact, according to the origin rule in the substrate code, it cannot be executed.&#xD;&#xA;&#xD;&#xA;runtime.lib&#xD;&#xA;```&#xD;&#xA;type ExternalMajorityOrigin =&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 3, 4&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frame/collective/src/lib.rs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct EnsureProportionAtLeast&lt;AccountId, I: 'static, const N: u32, const D: u32&gt;(&#xD;&#xA;	PhantomData&lt;(AccountId, I)&gt;,&#xD;&#xA;);&#xD;&#xA;impl&lt;&#xD;&#xA;		O: Into&lt;Result&lt;RawOrigin&lt;AccountId, I&gt;, O&gt;&gt; + From&lt;RawOrigin&lt;AccountId, I&gt;&gt;,&#xD;&#xA;		AccountId,&#xD;&#xA;		I,&#xD;&#xA;		const N: u32,&#xD;&#xA;		const D: u32,&#xD;&#xA;	&gt; EnsureOrigin&lt;O&gt; for EnsureProportionAtLeast&lt;AccountId, I, N, D&gt;&#xD;&#xA;{&#xD;&#xA;	type Success = ();&#xD;&#xA;	fn try_origin(o: O) -&gt; Result&lt;Self::Success, O&gt; {&#xD;&#xA;		o.into().and_then(|o| match o {&#xD;&#xA;			RawOrigin::Members(n, m) if n * D &gt;= N * m =&gt; Ok(()),&#xD;&#xA;			r =&gt; Err(O::from(r)),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	fn try_successful_origin() -&gt; Result&lt;O, ()&gt; {&#xD;&#xA;		Ok(O::from(RawOrigin::Members(0u32, 0u32)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We can change the origin rule or go to develop - extrinsic to set the threshold.&#xD;&#xA;&#xD;&#xA;All in all, the rules of threshold and origin need to be consistent.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11668" PostHistoryTypeId="5" PostId="3108" RevisionGUID="8eb7ccd0-3da6-461a-9825-03a3b31d97cf" CreationDate="2022-06-08T03:21:27.413" UserId="2708" Comment="deleted 7 characters in body" Text="I found the reason.&#xD;&#xA;&#xD;&#xA;The threshold is set to 3 on the polkadot.js apps UI, but in fact, according to the origin rule in the substrate code, it cannot be executed.&#xD;&#xA;&#xD;&#xA;runtime.lib&#xD;&#xA;```&#xD;&#xA;type ExternalMajorityOrigin =&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 3, 4&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frame/collective/src/lib.rs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct EnsureProportionAtLeast&lt;AccountId, I: 'static, const N: u32, const D: u32&gt;(&#xD;&#xA;	PhantomData&lt;(AccountId, I)&gt;,&#xD;&#xA;);&#xD;&#xA;impl&lt;&#xD;&#xA;		O: Into&lt;Result&lt;RawOrigin&lt;AccountId, I&gt;, O&gt;&gt; + From&lt;RawOrigin&lt;AccountId, I&gt;&gt;,&#xD;&#xA;		AccountId,&#xD;&#xA;		I,&#xD;&#xA;		const N: u32,&#xD;&#xA;		const D: u32,&#xD;&#xA;	&gt; EnsureOrigin&lt;O&gt; for EnsureProportionAtLeast&lt;AccountId, I, N, D&gt;&#xD;&#xA;{&#xD;&#xA;	type Success = ();&#xD;&#xA;	fn try_origin(o: O) -&gt; Result&lt;Self::Success, O&gt; {&#xD;&#xA;		o.into().and_then(|o| match o {&#xD;&#xA;			RawOrigin::Members(n, m) if n * D &gt;= N * m =&gt; Ok(()),&#xD;&#xA;			r =&gt; Err(O::from(r)),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	fn try_successful_origin() -&gt; Result&lt;O, ()&gt; {&#xD;&#xA;		Ok(O::from(RawOrigin::Members(0u32, 0u32)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We can change the origin rule or go to develop - extrinsic to set the threshold.&#xD;&#xA;&#xD;&#xA;All in all, the rules of threshold and origin need to be consistent.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11669" PostHistoryTypeId="5" PostId="3108" RevisionGUID="92cea69b-68c1-4bb7-ae0d-c1a57ac4f32c" CreationDate="2022-06-08T03:23:44.453" UserId="2708" Comment="added 161 characters in body" Text="I found the reason.&#xD;&#xA;&#xD;&#xA;The threshold is set to 3 on the polkadot.js apps UI, but in fact, according to the origin rule in the substrate code, it cannot be executed.&#xD;&#xA;&#xD;&#xA;runtime.lib&#xD;&#xA;```&#xD;&#xA;type ExternalMajorityOrigin =&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 3, 4&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frame/collective/src/lib.rs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct EnsureProportionAtLeast&lt;AccountId, I: 'static, const N: u32, const D: u32&gt;(&#xD;&#xA;	PhantomData&lt;(AccountId, I)&gt;,&#xD;&#xA;);&#xD;&#xA;impl&lt;&#xD;&#xA;		O: Into&lt;Result&lt;RawOrigin&lt;AccountId, I&gt;, O&gt;&gt; + From&lt;RawOrigin&lt;AccountId, I&gt;&gt;,&#xD;&#xA;		AccountId,&#xD;&#xA;		I,&#xD;&#xA;		const N: u32,&#xD;&#xA;		const D: u32,&#xD;&#xA;	&gt; EnsureOrigin&lt;O&gt; for EnsureProportionAtLeast&lt;AccountId, I, N, D&gt;&#xD;&#xA;{&#xD;&#xA;	type Success = ();&#xD;&#xA;	fn try_origin(o: O) -&gt; Result&lt;Self::Success, O&gt; {&#xD;&#xA;		o.into().and_then(|o| match o {&#xD;&#xA;			RawOrigin::Members(n, m) if n * D &gt;= N * m =&gt; Ok(()),&#xD;&#xA;			r =&gt; Err(O::from(r)),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	fn try_successful_origin() -&gt; Result&lt;O, ()&gt; {&#xD;&#xA;		Ok(O::from(RawOrigin::Members(0u32, 0u32)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We can solve it by the two ways:&#xD;&#xA; 1. change the origin rule.&#xD;&#xA; 2. go to develop - extrinsic to set the threshold.&#xD;&#xA;&#xD;&#xA;For 1, &#xD;&#xA;type ExternalMajorityOrigin =&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 1, 2&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All in all, the rules of threshold and origin need to be consistent.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11670" PostHistoryTypeId="5" PostId="3108" RevisionGUID="19310fed-fa21-45e0-942e-18b4a0059c4e" CreationDate="2022-06-08T03:24:03.267" UserId="2708" Comment="added 10 characters in body" Text="I found the reason.&#xD;&#xA;&#xD;&#xA;The threshold is set to 3 on the polkadot.js apps UI, but in fact, according to the origin rule in the substrate code, it cannot be executed.&#xD;&#xA;&#xD;&#xA;runtime.lib&#xD;&#xA;```&#xD;&#xA;type ExternalMajorityOrigin =&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 3, 4&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frame/collective/src/lib.rs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct EnsureProportionAtLeast&lt;AccountId, I: 'static, const N: u32, const D: u32&gt;(&#xD;&#xA;	PhantomData&lt;(AccountId, I)&gt;,&#xD;&#xA;);&#xD;&#xA;impl&lt;&#xD;&#xA;		O: Into&lt;Result&lt;RawOrigin&lt;AccountId, I&gt;, O&gt;&gt; + From&lt;RawOrigin&lt;AccountId, I&gt;&gt;,&#xD;&#xA;		AccountId,&#xD;&#xA;		I,&#xD;&#xA;		const N: u32,&#xD;&#xA;		const D: u32,&#xD;&#xA;	&gt; EnsureOrigin&lt;O&gt; for EnsureProportionAtLeast&lt;AccountId, I, N, D&gt;&#xD;&#xA;{&#xD;&#xA;	type Success = ();&#xD;&#xA;	fn try_origin(o: O) -&gt; Result&lt;Self::Success, O&gt; {&#xD;&#xA;		o.into().and_then(|o| match o {&#xD;&#xA;			RawOrigin::Members(n, m) if n * D &gt;= N * m =&gt; Ok(()),&#xD;&#xA;			r =&gt; Err(O::from(r)),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	fn try_successful_origin() -&gt; Result&lt;O, ()&gt; {&#xD;&#xA;		Ok(O::from(RawOrigin::Members(0u32, 0u32)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We can solve it by the two ways:&#xD;&#xA; 1. change the origin rule.&#xD;&#xA; 2. go to develop - extrinsic to set the threshold.&#xD;&#xA;&#xD;&#xA;For 1, &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type ExternalMajorityOrigin =&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 1, 2&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All in all, the rules of threshold and origin need to be consistent.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11671" PostHistoryTypeId="5" PostId="3108" RevisionGUID="87b20abc-15c0-4a7c-bf92-a1ade76c061b" CreationDate="2022-06-08T03:28:20.567" UserId="2708" Comment="added 184 characters in body" Text="I found the reason.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;The threshold is set to 3 on the polkadot.js apps UI, but in fact, according to the origin rule in the substrate code, it cannot be executed.&#xD;&#xA;&#xD;&#xA;runtime.lib&#xD;&#xA;```&#xD;&#xA;type ExternalMajorityOrigin =&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 3, 4&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frame/collective/src/lib.rs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct EnsureProportionAtLeast&lt;AccountId, I: 'static, const N: u32, const D: u32&gt;(&#xD;&#xA;	PhantomData&lt;(AccountId, I)&gt;,&#xD;&#xA;);&#xD;&#xA;impl&lt;&#xD;&#xA;		O: Into&lt;Result&lt;RawOrigin&lt;AccountId, I&gt;, O&gt;&gt; + From&lt;RawOrigin&lt;AccountId, I&gt;&gt;,&#xD;&#xA;		AccountId,&#xD;&#xA;		I,&#xD;&#xA;		const N: u32,&#xD;&#xA;		const D: u32,&#xD;&#xA;	&gt; EnsureOrigin&lt;O&gt; for EnsureProportionAtLeast&lt;AccountId, I, N, D&gt;&#xD;&#xA;{&#xD;&#xA;	type Success = ();&#xD;&#xA;	fn try_origin(o: O) -&gt; Result&lt;Self::Success, O&gt; {&#xD;&#xA;		o.into().and_then(|o| match o {&#xD;&#xA;			RawOrigin::Members(n, m) if n * D &gt;= N * m =&gt; Ok(()),&#xD;&#xA;			r =&gt; Err(O::from(r)),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	fn try_successful_origin() -&gt; Result&lt;O, ()&gt; {&#xD;&#xA;		Ok(O::from(RawOrigin::Members(0u32, 0u32)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We can solve it by the two ways:&#xD;&#xA; 1. change the origin rule.&#xD;&#xA; 2. go to develop - extrinsic to set the threshold.&#xD;&#xA;&#xD;&#xA;For 1, &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type ExternalMajorityOrigin =&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 1, 2&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For 2.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;All in all, the rules of threshold and origin need to be consistent.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hdNuQ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/pXezO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11672" PostHistoryTypeId="5" PostId="3108" RevisionGUID="fdaaac67-3642-4e23-9714-2f24b9258bd2" CreationDate="2022-06-08T03:29:20.313" UserId="2708" Comment="edited body" Text="I found the reason.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;The threshold is set to 3 on the polkadot.js apps UI, but in fact, according to the origin rule in the substrate code, it cannot be executed.&#xD;&#xA;&#xD;&#xA;runtime.lib&#xD;&#xA;```&#xD;&#xA;type ExternalMajorityOrigin =&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 3, 4&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frame/collective/src/lib.rs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct EnsureProportionAtLeast&lt;AccountId, I: 'static, const N: u32, const D: u32&gt;(&#xD;&#xA;	PhantomData&lt;(AccountId, I)&gt;,&#xD;&#xA;);&#xD;&#xA;impl&lt;&#xD;&#xA;		O: Into&lt;Result&lt;RawOrigin&lt;AccountId, I&gt;, O&gt;&gt; + From&lt;RawOrigin&lt;AccountId, I&gt;&gt;,&#xD;&#xA;		AccountId,&#xD;&#xA;		I,&#xD;&#xA;		const N: u32,&#xD;&#xA;		const D: u32,&#xD;&#xA;	&gt; EnsureOrigin&lt;O&gt; for EnsureProportionAtLeast&lt;AccountId, I, N, D&gt;&#xD;&#xA;{&#xD;&#xA;	type Success = ();&#xD;&#xA;	fn try_origin(o: O) -&gt; Result&lt;Self::Success, O&gt; {&#xD;&#xA;		o.into().and_then(|o| match o {&#xD;&#xA;			RawOrigin::Members(n, m) if n * D &gt;= N * m =&gt; Ok(()),&#xD;&#xA;			r =&gt; Err(O::from(r)),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	fn try_successful_origin() -&gt; Result&lt;O, ()&gt; {&#xD;&#xA;		Ok(O::from(RawOrigin::Members(0u32, 0u32)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We can solve it by the two ways:&#xD;&#xA; 1. change the origin rule.&#xD;&#xA; 2. go to develop - extrinsic to set the threshold.&#xD;&#xA;&#xD;&#xA;For 1, &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type ExternalMajorityOrigin =&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 1, 2&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For 2.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;All in all, the rules of threshold and origin need to be consistent.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hdNuQ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/3kK6Z.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11673" PostHistoryTypeId="5" PostId="3096" RevisionGUID="2380c758-30d5-47e2-9710-3a12cde28656" CreationDate="2022-06-08T04:22:45.660" UserId="1789" Comment="added 58 characters in body" Text="it seems to be a Github environment setup problem for running Zombienet test with my custom parachain. &#xD;&#xA;&#xD;&#xA;I have made a template repo trying to reproduce this problem. &#xD;&#xA;&#xD;&#xA;When I used my template repo to run Zombienet tests with its own docker image, it passed. My settings in .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.22&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z1template&quot;&#xD;&#xA;```&#xD;&#xA;when I changed the images to my custom image with corresponding Polkadot image, it failed...&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.21&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z21&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But that z21 collator image can pass all Zombienet tests in my local machine, but the same image cannot run properly in Github's kubectl &amp; minikube environment for unknown reason...&#xD;&#xA;&#xD;&#xA;Here are the error message... I use this repo to run the same Zombienet tests with different collator and polkadot images:&#xD;&#xA;https://github.com/AuroraLantean/substrate-parachain-template-zombienet2/runs/6772959979?check_suite_focus=true&#xD;&#xA;&#xD;&#xA;Regarding the kubectl and minikube setup in the workflow .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;      - name: Start minikube&#xD;&#xA;        uses: medyagh/setup-minikube@master&#xD;&#xA;```&#xD;&#xA;This was working until changing &quot;parachain-collator&quot; and &quot;parachain&quot; to our custom name.&#xD;&#xA;I think that is causing this problem. What setting do I need to do in the Zombienet config file to fix this?&#xD;&#xA;please advise." ContentLicense="CC BY-SA 4.0" />
  <row Id="11674" PostHistoryTypeId="4" PostId="3096" RevisionGUID="2380c758-30d5-47e2-9710-3a12cde28656" CreationDate="2022-06-08T04:22:45.660" UserId="1789" Comment="added 58 characters in body" Text="How to setup custom parachain name, Kubectl, Minikube in Zombienet tests in Github CICD" ContentLicense="CC BY-SA 4.0" />
  <row Id="11676" PostHistoryTypeId="2" PostId="3109" RevisionGUID="04f19f22-9dbe-4927-9ac9-2f08c01e567d" CreationDate="2022-06-08T05:58:23.483" UserId="1950" Text="when I tried to get a logarithm of a number Im getting following erros in Substrate how to fix this ?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  437 |         let cc = f32::log10(4 as f32);&#xD;&#xA;      |                       ^^^^^ function or associated item not found in `f32`&#xD;&#xA;&#xD;&#xA;  error[E0599]: no method named `log10` found for type `f32` in the current scope&#xD;&#xA;     --&gt; /home/dev/Desktop/projects/GIANT/pallets/provider/src/lib.rs:439:20&#xD;&#xA;      |&#xD;&#xA;  439 |         let x =  1.0_f32.log10() -  2.0_f32.log10();&#xD;&#xA;      |                          ^^^^^ method not found in `f32`&#xD;&#xA;&#xD;&#xA;  error[E0599]: no method named `log10` found for type `f32` in the current scope&#xD;&#xA;     --&gt; /home/dev/Desktop/projects/GIANT/pallets/provider/src/lib.rs:439:39&#xD;&#xA;      |&#xD;&#xA;  439 |         let x =  1.0_f32.log10() -  2.0_f32.log10();&#xD;&#xA;      |                                             ^^^^^ method not found in `f32`&#xD;&#xA;&#xD;&#xA;|         let e = ln(1.0 / 2.0);&#xD;&#xA;      |                 ^^ not found in this scope&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11678" PostHistoryTypeId="1" PostId="3109" RevisionGUID="04f19f22-9dbe-4927-9ac9-2f08c01e567d" CreationDate="2022-06-08T05:58:23.483" UserId="1950" Text="Unable to calculate logarithm of a number error method log10 ln" ContentLicense="CC BY-SA 4.0" />
  <row Id="11679" PostHistoryTypeId="3" PostId="3109" RevisionGUID="04f19f22-9dbe-4927-9ac9-2f08c01e567d" CreationDate="2022-06-08T05:58:23.483" UserId="1950" Text="|substrate-node|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11680" PostHistoryTypeId="5" PostId="3088" RevisionGUID="480442a4-cce8-41d8-84aa-07f2c9781ec0" CreationDate="2022-06-08T06:29:38.413" UserId="87" Comment="No self-promotion" Text="Under Network &gt; Staking &gt; Targets we can see some validators are selected for the `next session / active set.`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/staking/targets&#xD;&#xA;&#xD;&#xA;What event is this on the blockchain? &#xD;&#xA;&#xD;&#xA;Can I listen for this, e.g. using rpc/js api?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/k1DdK.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/u5sv8.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11681" PostHistoryTypeId="24" PostId="3088" RevisionGUID="480442a4-cce8-41d8-84aa-07f2c9781ec0" CreationDate="2022-06-08T06:29:38.413" Comment="Proposed by 87 approved by 34 edit id of 211" ContentLicense="CC BY-SA 4.0" />
  <row Id="11682" PostHistoryTypeId="10" PostId="3077" RevisionGUID="d2d22a36-a0d2-47f1-b683-71a15cc070a0" CreationDate="2022-06-08T06:33:52.447" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[707],&quot;Voters&quot;:[{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Alejandro Martínez&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="11683" PostHistoryTypeId="10" PostId="3097" RevisionGUID="b085d543-c4a8-41cf-acf3-cb91dcb354e0" CreationDate="2022-06-08T06:38:41.890" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[1393],&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="11684" PostHistoryTypeId="5" PostId="3096" RevisionGUID="431a721f-e909-4303-b71f-8a84bde3ce96" CreationDate="2022-06-08T06:54:04.533" UserId="1789" Comment="added 2205 characters in body" Text="it seems to be a Github environment setup problem for running Zombienet test with my custom parachain. &#xD;&#xA;&#xD;&#xA;I have made a template repo trying to reproduce this problem. &#xD;&#xA;&#xD;&#xA;When I used my template repo to run Zombienet tests with its own docker image, it passed. My settings in .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.22&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z1template&quot;&#xD;&#xA;```&#xD;&#xA;when I changed the images to my custom image with corresponding Polkadot image, it failed...&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.21&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z21&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But that z21 collator image can pass all Zombienet tests in my local machine, but the same image cannot run properly in Github's kubectl &amp; minikube environment for unknown reason...&#xD;&#xA;&#xD;&#xA;Here are the error message... I use this repo to run the same Zombienet tests with different collator and polkadot images:&#xD;&#xA;https://github.com/AuroraLantean/substrate-parachain-template-zombienet2/runs/6772959979?check_suite_focus=true&#xD;&#xA;&#xD;&#xA;Regarding the kubectl and minikube setup in the workflow .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;      - name: Start minikube&#xD;&#xA;        uses: medyagh/setup-minikube@master&#xD;&#xA;```&#xD;&#xA;This was working until changing &quot;parachain-collator&quot; and &quot;parachain&quot; to our custom name.&#xD;&#xA;&#xD;&#xA;my error message:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;✓ Added Genesis Parachain 2000&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.21&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local-plain.json as:4a888a6781a58f346fa733098c0ae468338b8690d4b74f97473f6b191579d3d4&#xD;&#xA;temp-3 pod is ready!&#xD;&#xA;Error: Command failed with exit code 1: kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3&#xD;&#xA;error: unable to upgrade connection: container not found (&quot;temp-3&quot;)&#xD;&#xA;    at makeError (/snapshot/zombienet/node_modules/execa/lib/error.js:60:11)&#xD;&#xA;    at handlePromise (/snapshot/zombienet/node_modules/execa/index.js:118:26)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5) {&#xD;&#xA;  shortMessage: 'Command failed with exit code 1: kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3',&#xD;&#xA;  command: 'kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3',&#xD;&#xA;  escapedCommand: 'kubectl --kubeconfig &quot;/home/runner/.kube/config&quot; --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp &quot;temp-3:/cfg/rococo-local-raw.json&quot; &quot;/tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json&quot; -c temp-3',&#xD;&#xA;  exitCode: 1,&#xD;&#xA;  signal: undefined,&#xD;&#xA;  signalDescription: undefined,&#xD;&#xA;  stdout: '',&#xD;&#xA;  stderr: 'error: unable to upgrade connection: container not found (&quot;temp-3&quot;)',&#xD;&#xA;  failed: true,&#xD;&#xA;  timedOut: false,&#xD;&#xA;  isCanceled: false,&#xD;&#xA;  killed: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I think that something is missing in kubectl, minikube, or the custom parachain name is causing this problem. &#xD;&#xA;please advise." ContentLicense="CC BY-SA 4.0" />
  <row Id="11685" PostHistoryTypeId="5" PostId="3096" RevisionGUID="8e26b68a-e800-4877-84d5-5ff8e02e2d8f" CreationDate="2022-06-08T07:01:05.023" UserId="1789" Comment="added 2205 characters in body" Text="it seems to be a Github environment setup problem for running Zombienet test with my custom parachain. &#xD;&#xA;&#xD;&#xA;I have made a template repo trying to reproduce this problem. &#xD;&#xA;&#xD;&#xA;When I used my template repo to run Zombienet tests with its own docker image, it passed. My settings in .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.22&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z1template&quot;&#xD;&#xA;```&#xD;&#xA;when I changed the images to my custom image with corresponding Polkadot image, it failed...&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.21&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z21&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But that z21 collator image can pass all Zombienet tests in my local machine, but the same image cannot run properly in Github's kubectl &amp; minikube environment for unknown reason...&#xD;&#xA;&#xD;&#xA;Here are the error message... I use this repo to run the same Zombienet tests with different collator and polkadot images:&#xD;&#xA;https://github.com/AuroraLantean/substrate-parachain-template-zombienet2/runs/6772959979?check_suite_focus=true&#xD;&#xA;&#xD;&#xA;Regarding the kubectl and minikube setup in the workflow .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;      - name: Start minikube&#xD;&#xA;        uses: medyagh/setup-minikube@master&#xD;&#xA;```&#xD;&#xA;This was working until changing &quot;parachain-collator&quot; and &quot;parachain&quot; to our custom name.&#xD;&#xA;&#xD;&#xA;my error message:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;✓ Added Genesis Parachain 2000&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.21&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local-plain.json as:4a888a6781a58f346fa733098c0ae468338b8690d4b74f97473f6b191579d3d4&#xD;&#xA;temp-3 pod is ready!&#xD;&#xA;Error: Command failed with exit code 1: kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3&#xD;&#xA;error: unable to upgrade connection: container not found (&quot;temp-3&quot;)&#xD;&#xA;    at makeError (/snapshot/zombienet/node_modules/execa/lib/error.js:60:11)&#xD;&#xA;    at handlePromise (/snapshot/zombienet/node_modules/execa/index.js:118:26)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5) {&#xD;&#xA;  shortMessage: 'Command failed with exit code 1: kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3',&#xD;&#xA;  command: 'kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3',&#xD;&#xA;  escapedCommand: 'kubectl --kubeconfig &quot;/home/runner/.kube/config&quot; --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp &quot;temp-3:/cfg/rococo-local-raw.json&quot; &quot;/tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json&quot; -c temp-3',&#xD;&#xA;  exitCode: 1,&#xD;&#xA;  signal: undefined,&#xD;&#xA;  signalDescription: undefined,&#xD;&#xA;  stdout: '',&#xD;&#xA;  stderr: 'error: unable to upgrade connection: container not found (&quot;temp-3&quot;)',&#xD;&#xA;  failed: true,&#xD;&#xA;  timedOut: false,&#xD;&#xA;  isCanceled: false,&#xD;&#xA;  killed: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I reverted my repo to the commit before using custom parachain name... error message:&#xD;&#xA;```&#xD;&#xA;✓ Added Genesis Parachain 2000&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.20&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-a05726da326756e3d08fc7b074628325_-5931-GI5IM7Cfo2Qi/rococo-local-plain.json as:9a5d73ac877a90feef59aa30ada40121958c41c0feb8180cb548fd69aca0cb92&#xD;&#xA;temp-3 pod is ready!&#xD;&#xA;Error: Invalid chain spec raw file generated.&#xD;&#xA;    at /snapshot/zombienet/dist/providers/k8s/chain-spec.js:102:19&#xD;&#xA;    at Generator.throw (&lt;anonymous&gt;)&#xD;&#xA;    at rejected (/snapshot/zombienet/dist/providers/k8s/chain-spec.js:6:65)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;```&#xD;&#xA;But all those images I made locally or in Github's cicd, they ALL can run the same Zombienet tests in my local machine!&#xD;&#xA;&#xD;&#xA;I think that something is missing in kubectl, minikube.&#xD;&#xA;please advise." ContentLicense="CC BY-SA 4.0" />
  <row Id="11686" PostHistoryTypeId="5" PostId="3096" RevisionGUID="6e1d85ca-082d-4cc2-a361-c45038e739e3" CreationDate="2022-06-08T09:41:44.260" UserId="1789" Comment="added 970 characters in body" Text="it seems to be a Github environment setup problem for running Zombienet test with my custom parachain. &#xD;&#xA;&#xD;&#xA;I have made a template repo trying to reproduce this problem. &#xD;&#xA;&#xD;&#xA;When I used my template repo to run Zombienet tests with its own docker image, it passed. My settings in .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.22&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z1template&quot;&#xD;&#xA;```&#xD;&#xA;when I changed the images to my custom image with corresponding Polkadot image, it failed...&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.21&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z21&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But that z21 collator image can pass all Zombienet tests in my local machine, but the same image cannot run properly in Github's kubectl &amp; minikube environment for unknown reason...&#xD;&#xA;&#xD;&#xA;Here are the error message... I use this repo to run the same Zombienet tests with different collator and polkadot images:&#xD;&#xA;https://github.com/AuroraLantean/substrate-parachain-template-zombienet2/runs/6772959979?check_suite_focus=true&#xD;&#xA;&#xD;&#xA;Regarding the kubectl and minikube setup in the workflow .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;      - name: Start minikube&#xD;&#xA;        uses: medyagh/setup-minikube@master&#xD;&#xA;```&#xD;&#xA;This was working until changing &quot;parachain-collator&quot; and &quot;parachain&quot; to our custom name.&#xD;&#xA;&#xD;&#xA;my error message:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;✓ Added Genesis Parachain 2000&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.21&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local-plain.json as:4a888a6781a58f346fa733098c0ae468338b8690d4b74f97473f6b191579d3d4&#xD;&#xA;temp-3 pod is ready!&#xD;&#xA;Error: Command failed with exit code 1: kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3&#xD;&#xA;error: unable to upgrade connection: container not found (&quot;temp-3&quot;)&#xD;&#xA;    at makeError (/snapshot/zombienet/node_modules/execa/lib/error.js:60:11)&#xD;&#xA;    at handlePromise (/snapshot/zombienet/node_modules/execa/index.js:118:26)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5) {&#xD;&#xA;  shortMessage: 'Command failed with exit code 1: kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3',&#xD;&#xA;  command: 'kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3',&#xD;&#xA;  escapedCommand: 'kubectl --kubeconfig &quot;/home/runner/.kube/config&quot; --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp &quot;temp-3:/cfg/rococo-local-raw.json&quot; &quot;/tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json&quot; -c temp-3',&#xD;&#xA;  exitCode: 1,&#xD;&#xA;  signal: undefined,&#xD;&#xA;  signalDescription: undefined,&#xD;&#xA;  stdout: '',&#xD;&#xA;  stderr: 'error: unable to upgrade connection: container not found (&quot;temp-3&quot;)',&#xD;&#xA;  failed: true,&#xD;&#xA;  timedOut: false,&#xD;&#xA;  isCanceled: false,&#xD;&#xA;  killed: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I reverted my repo to the commit before using custom parachain name... error message:&#xD;&#xA;```&#xD;&#xA;✓ Added Genesis Parachain 2000&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.20&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-a05726da326756e3d08fc7b074628325_-5931-GI5IM7Cfo2Qi/rococo-local-plain.json as:9a5d73ac877a90feef59aa30ada40121958c41c0feb8180cb548fd69aca0cb92&#xD;&#xA;temp-3 pod is ready!&#xD;&#xA;Error: Invalid chain spec raw file generated.&#xD;&#xA;    at /snapshot/zombienet/dist/providers/k8s/chain-spec.js:102:19&#xD;&#xA;    at Generator.throw (&lt;anonymous&gt;)&#xD;&#xA;    at rejected (/snapshot/zombienet/dist/providers/k8s/chain-spec.js:6:65)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Not sure if this is causing issues, but noticed this in Zombienet code&#xD;&#xA;https://github.com/paritytech/zombienet/blob/main/src/providers/k8s/chain-spec.ts#L20&#xD;&#xA;chain-spec.ts&#xD;&#xA;```&#xD;&#xA;//We have two options to get the chain-spec file, neither should use the `raw` file/argument&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I see &quot;--raw&quot; in the log:&#xD;&#xA;```&#xD;&#xA;with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This function was triggered by something else, not by me directly. So there must be a setting somewhere. Do I need to change the chainName argument in chain-spec.ts#L17 ?&#xD;&#xA;```&#xD;&#xA;export async function setupChainSpec(    namespace: string,    networkSpec: ComputedNetwork,    chainName: string,     chainFullPath: string){...}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But still, for all the same images I made locally or in Github's cicd, why all Zombienet tests run successfully in my local machine but failed in Github action cicd ???&#xD;&#xA;&#xD;&#xA;perhaps something is missing in Github's kubectl, minikube?&#xD;&#xA;please advise." ContentLicense="CC BY-SA 4.0" />
  <row Id="11687" PostHistoryTypeId="2" PostId="3110" RevisionGUID="31328e42-2284-4108-bb88-f345a3cc5724" CreationDate="2022-06-08T09:42:13.570" UserId="28" Text="You really cannot use floating point numbers in the runtime since floating point numbers are not deterministic. You can learn a lot more why with other online resources like [this](https://www.youtube.com/watch?v=PZRI1IfStY0).&#xD;&#xA;&#xD;&#xA;Instead you should be looking to use the primitives provided by [`sp_arithmetic`](https://crates.parity.io/sp_arithmetic/index.html), which uses fixed point numbers to ensure determinism and safety in the runtime.&#xD;&#xA;&#xD;&#xA;It does not seem there is a log10 currently implemented, but you can implement it yourself and make a PR to Substrate using a taylor series like noted here:&#xD;&#xA;&#xD;&#xA;https://ethereum.stackexchange.com/questions/8086/logarithm-math-operation-in-solidity" ContentLicense="CC BY-SA 4.0" />
  <row Id="11689" PostHistoryTypeId="2" PostId="3111" RevisionGUID="04f723cc-e4e6-45f8-b094-b1a3c0f89634" CreationDate="2022-06-08T09:57:14.853" UserId="28" Text="There is an even in the Staking pallet: `StakersElected`, however this event does not itself contain all the new stakers that were selected since that list can be large, and just as easily queried if needed.&#xD;&#xA;&#xD;&#xA;So once you see the `StakersElected` event, you can simply do the following query `electionsPhragmen &gt; Members` to get the list of the new validators:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XezJW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11691" PostHistoryTypeId="2" PostId="3112" RevisionGUID="5da0416a-81ec-4835-a69b-0e4f839da626" CreationDate="2022-06-08T10:03:04.090" UserId="28" Text="If I understand what you are doing correctly, then the Polkadot relay chain only knows about and supports the DOT token. So you cannot transfer other tokens to the relay chain, and as you have seen, the relay chain will reject those messages." ContentLicense="CC BY-SA 4.0" />
  <row Id="11693" PostHistoryTypeId="2" PostId="3113" RevisionGUID="18001cab-cc83-4f3c-b5d3-70e515d99dde" CreationDate="2022-06-08T10:16:15.710" UserId="28" Text="The integrity test function is some logic that you can place in your pallet, that will then be executed in the `construct_runtime!` in your final runtime configuration.&#xD;&#xA;&#xD;&#xA;Note that this function does not have access to storage, since it is happening at compile time, where there is no chain state.&#xD;&#xA;&#xD;&#xA;You can use this function to make assertions about how your runtime is configured to ensure that it makes sense. For example, if you have some configurations like `T::MinValue` and `T::MaxValue`, then you can make an assertion like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::hooks]&#xD;&#xA;impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	fn integrity_test() {&#xD;&#xA;		// Some code that will run in a test in the `construct_runtime!`.&#xD;&#xA;		assert!(T::MinValue::get() &lt;= T::MaxValue::get())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then, if a user configured things wrong in their final runtime, the overall integrity test would fail." ContentLicense="CC BY-SA 4.0" />
  <row Id="11695" PostHistoryTypeId="5" PostId="3096" RevisionGUID="85ee6a05-54ce-473a-89df-7dba7b9288e3" CreationDate="2022-06-08T10:24:01.197" UserId="1789" Comment="added 88 characters in body" Text="it seems to be a Github environment setup problem for running Zombienet test with my custom parachain. &#xD;&#xA;&#xD;&#xA;I have made a template repo trying to reproduce this problem. &#xD;&#xA;&#xD;&#xA;When I used my template repo to run Zombienet tests with its own docker image, it passed. My settings in .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.22&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z1template&quot;&#xD;&#xA;```&#xD;&#xA;when I changed the images to my custom image with corresponding Polkadot image, it failed...&#xD;&#xA;```&#xD;&#xA;  POLKADOT_VERSION: &quot;v0.9.21&quot;&#xD;&#xA;  COLLATOR_VERSION: &quot;z21&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But that z21 collator image can pass all Zombienet tests in my local machine, but the same image cannot run properly in Github's kubectl &amp; minikube environment for unknown reason...&#xD;&#xA;&#xD;&#xA;Here are the error message... I use this repo to run the same Zombienet tests with different collator and polkadot images:&#xD;&#xA;https://github.com/AuroraLantean/substrate-parachain-template-zombienet2/runs/6772959979?check_suite_focus=true&#xD;&#xA;&#xD;&#xA;Regarding the kubectl and minikube setup in the workflow .github/workflow/test-code.yml&#xD;&#xA;```&#xD;&#xA;      - name: Start minikube&#xD;&#xA;        uses: medyagh/setup-minikube@master&#xD;&#xA;```&#xD;&#xA;This was working until changing &quot;parachain-collator&quot; and &quot;parachain&quot; to our custom name.&#xD;&#xA;&#xD;&#xA;my error message:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;✓ Added Genesis Parachain 2000&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.21&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local-plain.json as:4a888a6781a58f346fa733098c0ae468338b8690d4b74f97473f6b191579d3d4&#xD;&#xA;temp-3 pod is ready!&#xD;&#xA;Error: Command failed with exit code 1: kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3&#xD;&#xA;error: unable to upgrade connection: container not found (&quot;temp-3&quot;)&#xD;&#xA;    at makeError (/snapshot/zombienet/node_modules/execa/lib/error.js:60:11)&#xD;&#xA;    at handlePromise (/snapshot/zombienet/node_modules/execa/index.js:118:26)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5) {&#xD;&#xA;  shortMessage: 'Command failed with exit code 1: kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3',&#xD;&#xA;  command: 'kubectl --kubeconfig /home/runner/.kube/config --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp temp-3:/cfg/rococo-local-raw.json /tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json -c temp-3',&#xD;&#xA;  escapedCommand: 'kubectl --kubeconfig &quot;/home/runner/.kube/config&quot; --namespace zombie-1e58b1b5b91023abb10deeeb5f6a16ec cp &quot;temp-3:/cfg/rococo-local-raw.json&quot; &quot;/tmp/zombie-1e58b1b5b91023abb10deeeb5f6a16ec_-8674-VFF15057SbAm/rococo-local.json&quot; -c temp-3',&#xD;&#xA;  exitCode: 1,&#xD;&#xA;  signal: undefined,&#xD;&#xA;  signalDescription: undefined,&#xD;&#xA;  stdout: '',&#xD;&#xA;  stderr: 'error: unable to upgrade connection: container not found (&quot;temp-3&quot;)',&#xD;&#xA;  failed: true,&#xD;&#xA;  timedOut: false,&#xD;&#xA;  isCanceled: false,&#xD;&#xA;  killed: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I reverted my repo to the commit before using custom parachain name... error message:&#xD;&#xA;```&#xD;&#xA;✓ Added Genesis Parachain 2000&#xD;&#xA;	launching temp-3 pod with image docker.io/parity/polkadot:v0.9.20&#xD;&#xA;		 with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;uploading to fileserver: /tmp/zombie-a05726da326756e3d08fc7b074628325_-5931-GI5IM7Cfo2Qi/rococo-local-plain.json as:9a5d73ac877a90feef59aa30ada40121958c41c0feb8180cb548fd69aca0cb92&#xD;&#xA;temp-3 pod is ready!&#xD;&#xA;Error: Invalid chain spec raw file generated.&#xD;&#xA;    at /snapshot/zombienet/dist/providers/k8s/chain-spec.js:102:19&#xD;&#xA;    at Generator.throw (&lt;anonymous&gt;)&#xD;&#xA;    at rejected (/snapshot/zombienet/dist/providers/k8s/chain-spec.js:6:65)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Not sure if this is causing issues, but noticed this in Zombienet code&#xD;&#xA;https://github.com/paritytech/zombienet/blob/main/src/providers/k8s/chain-spec.ts#L20&#xD;&#xA;chain-spec.ts&#xD;&#xA;```&#xD;&#xA;//We have two options to get the chain-spec file, neither should use the `raw` file/argument&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I see &quot;--raw&quot; in the log:&#xD;&#xA;```&#xD;&#xA;with command: bash -c polkadot build-spec --chain /cfg/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /cfg/rococo-local-raw.json &amp;&amp; until [ -f /tmp/finished.txt ]; do echo waiting for copy files to finish; sleep 1; done; echo copy files has finished&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This function was triggered by something else, not by me directly. So there must be a setting somewhere. Do I need to change the chainName argument in chain-spec.ts#L17 ?&#xD;&#xA;```&#xD;&#xA;export async function setupChainSpec(    namespace: string,    networkSpec: ComputedNetwork,    chainName: string,     chainFullPath: string){...}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found out that one commit from last week can run Zombienet tests in cicd... I just used the commit to run the tests and it passed! &#xD;&#xA;but after that commit, the new codes all failed the tests(although they can pass tests in my local machine)&#xD;&#xA;&#xD;&#xA;So what part of the code could affect Zombienet tests in Github's CICD?&#xD;&#xA;&#xD;&#xA;please advise." ContentLicense="CC BY-SA 4.0" />
  <row Id="11697" PostHistoryTypeId="2" PostId="3114" RevisionGUID="0a04a722-3281-4bde-9afe-85dc5ca8052e" CreationDate="2022-06-08T13:33:20.217" UserId="2408" Text="I'm creating a contract that holds users' funds and sends them back in a week.   &#xD;&#xA;I've created a `retrieve()` function (message) which does that.  &#xD;&#xA;Is there a way in ink! to postpone function execation for a period of time? (1 week)  &#xD;&#xA;Is there a way in ink! to call function on each block? (if the first option does not work)  &#xD;&#xA;How can I trigger that function except for explicitely calling it?   " ContentLicense="CC BY-SA 4.0" />
  <row Id="11699" PostHistoryTypeId="1" PostId="3114" RevisionGUID="0a04a722-3281-4bde-9afe-85dc5ca8052e" CreationDate="2022-06-08T13:33:20.217" UserId="2408" Text="ink! How to Execute Function in a Specific Period of Time?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11700" PostHistoryTypeId="3" PostId="3114" RevisionGUID="0a04a722-3281-4bde-9afe-85dc5ca8052e" CreationDate="2022-06-08T13:33:20.217" UserId="2408" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11701" PostHistoryTypeId="2" PostId="3115" RevisionGUID="43d05ae1-7559-4e41-9ad6-5a3fb07f8ce8" CreationDate="2022-06-08T14:07:34.710" UserId="275" Text="Parachain collator cannot produce blocks after acquiring a Relaychian slot.&#xD;&#xA;It is getting some error below, parachain nodes fails to decode `parent_head` passed by Relaychain.&#xD;&#xA;https://github.com/paritytech/cumulus/blob/0c779d926beeb6e1f3f2aa777d9bcec792c0bdac/client/collator/src/lib.rs#L223&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Jun 07 08:36:26 astar-alphanet-collator-node-0 astar-collator[64308]: 2022-06-07 08:36:26.675 ERROR tokio-runtime-worker cumulus-collator: [Parachain] Could not decode the head data. error=Error { cause: Some(Error { cause: Some(Error { cause: None, desc: &quot;Could not decode `DigestItemType`, variant doesn't exist&quot; }), desc: &quot;Could not decode `Digest::logs`&quot; }), desc: &quot;Could not decode `Header::digest`&quot; }&#xD;&#xA;Jun 07 08:36:26 astar-alphanet-collator-node-0 astar-collator[64308]: 2022-06-07 08:36:26.675 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] collator returned no collation on collate para_id=2006&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could you teach me why this happens and how to avoid such issue?&#xD;&#xA;&#xD;&#xA;Unlike this similar question (https://substrate.stackexchange.com/questions/1081/parachain-not-producing-blocks-error-could-not-decode-the-head-data), On-chain state of genesis-state (genesis head) &amp; genesis-wasm (validationCode) properly starts with `0x`. &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9pei1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11703" PostHistoryTypeId="1" PostId="3115" RevisionGUID="43d05ae1-7559-4e41-9ad6-5a3fb07f8ce8" CreationDate="2022-06-08T14:07:34.710" UserId="275" Text="Parachain cannot produce blocks due to error &quot;Could not decode the head data&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11704" PostHistoryTypeId="3" PostId="3115" RevisionGUID="43d05ae1-7559-4e41-9ad6-5a3fb07f8ce8" CreationDate="2022-06-08T14:07:34.710" UserId="275" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11705" PostHistoryTypeId="5" PostId="3115" RevisionGUID="2b9d1363-2364-4900-bec9-2ec50766f213" CreationDate="2022-06-08T14:14:12.297" UserId="275" Comment="added 12 characters in body" Text="Parachain collator cannot produce blocks after acquiring a Relaychian slot.&#xD;&#xA;It is getting some error below, parachain nodes fails to decode `parent_head` passed by Relaychain.&#xD;&#xA;https://github.com/paritytech/cumulus/blob/0c779d926beeb6e1f3f2aa777d9bcec792c0bdac/client/collator/src/lib.rs#L223&#xD;&#xA;&#xD;&#xA;Debug log:&#xD;&#xA;```&#xD;&#xA;Jun 07 08:36:26 astar-alphanet-collator-node-0 astar-collator[64308]: 2022-06-07 08:36:26.675 ERROR tokio-runtime-worker cumulus-collator: [Parachain] Could not decode the head data. error=Error { cause: Some(Error { cause: Some(Error { cause: None, desc: &quot;Could not decode `DigestItemType`, variant doesn't exist&quot; }), desc: &quot;Could not decode `Digest::logs`&quot; }), desc: &quot;Could not decode `Header::digest`&quot; }&#xD;&#xA;Jun 07 08:36:26 astar-alphanet-collator-node-0 astar-collator[64308]: 2022-06-07 08:36:26.675 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] collator returned no collation on collate para_id=2006&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could you teach me what could be the issue and how to avoid that?&#xD;&#xA;&#xD;&#xA;Unlike this similar question (https://substrate.stackexchange.com/questions/1081/parachain-not-producing-blocks-error-could-not-decode-the-head-data), On-chain state of genesis-state (genesis head) &amp; genesis-wasm (validationCode) properly starts with `0x`. &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9pei1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11706" PostHistoryTypeId="5" PostId="3115" RevisionGUID="74834e88-52a8-468b-9a6b-e919cf5b0530" CreationDate="2022-06-08T14:22:11.787" UserId="275" Comment="added 119 characters in body" Text="Parachain collator cannot produce blocks after acquiring a Relaychian slot. (best block #0, cannot author the 1st block from gensis)&#xD;&#xA;It is getting some error below, parachain nodes fails to decode `parent_head` passed by Relaychain.&#xD;&#xA;https://github.com/paritytech/cumulus/blob/0c779d926beeb6e1f3f2aa777d9bcec792c0bdac/client/collator/src/lib.rs#L223&#xD;&#xA;&#xD;&#xA;Debug log:&#xD;&#xA;```&#xD;&#xA;Jun 07 08:36:26 astar-alphanet-collator-node-0 astar-collator[64308]: 2022-06-07 08:36:26.675 ERROR tokio-runtime-worker cumulus-collator: [Parachain] Could not decode the head data. error=Error { cause: Some(Error { cause: Some(Error { cause: None, desc: &quot;Could not decode `DigestItemType`, variant doesn't exist&quot; }), desc: &quot;Could not decode `Digest::logs`&quot; }), desc: &quot;Could not decode `Header::digest`&quot; }&#xD;&#xA;Jun 07 08:36:26 astar-alphanet-collator-node-0 astar-collator[64308]: 2022-06-07 08:36:26.675 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] collator returned no collation on collate para_id=2006&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could you teach me what could be the issue and how to avoid that?&#xD;&#xA;Parachain: polkadot-0.9.19&#xD;&#xA;Relaychain: westend based v0.9.23&#xD;&#xA;&#xD;&#xA;Unlike this similar question (https://substrate.stackexchange.com/questions/1081/parachain-not-producing-blocks-error-could-not-decode-the-head-data), On-chain state of genesis-state (genesis head) &amp; genesis-wasm (validationCode) properly starts with `0x`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9pei1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11707" PostHistoryTypeId="5" PostId="3115" RevisionGUID="6d198a22-df46-433f-b13d-0842f81d2a42" CreationDate="2022-06-08T14:31:33.607" UserId="275" Comment="added 2 characters in body" Text="Parachain collator cannot produce blocks after acquiring a Relaychian slot. (best block #0, cannot author the 1st block from gensis)&#xD;&#xA;It is getting some error below, parachain nodes fails to decode `parent_head` passed by Relaychain.&#xD;&#xA;https://github.com/paritytech/cumulus/blob/0c779d926beeb6e1f3f2aa777d9bcec792c0bdac/client/collator/src/lib.rs#L223&#xD;&#xA;&#xD;&#xA;Debug log:&#xD;&#xA;```&#xD;&#xA;Jun 07 08:36:26 astar-alphanet-collator-node-0 astar-collator[64308]: 2022-06-07 08:36:26.675 ERROR tokio-runtime-worker cumulus-collator: [Parachain] Could not decode the head data. error=Error { cause: Some(Error { cause: Some(Error { cause: None, desc: &quot;Could not decode `DigestItemType`, variant doesn't exist&quot; }), desc: &quot;Could not decode `Digest::logs`&quot; }), desc: &quot;Could not decode `Header::digest`&quot; }&#xD;&#xA;Jun 07 08:36:26 astar-alphanet-collator-node-0 astar-collator[64308]: 2022-06-07 08:36:26.675 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] collator returned no collation on collate para_id=2006&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could you teach me what could be the issue and how to avoid that?&#xD;&#xA;&#xD;&#xA;Parachain: polkadot-0.9.19&#xD;&#xA;Relaychain: westend based v0.9.23&#xD;&#xA;&#xD;&#xA;Unlike this similar question (https://substrate.stackexchange.com/questions/1081/parachain-not-producing-blocks-error-could-not-decode-the-head-data), On-chain state of genesis-state (genesis head) &amp; genesis-wasm (validationCode) properly starts with `0x`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9pei1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11708" PostHistoryTypeId="6" PostId="3115" RevisionGUID="6d198a22-df46-433f-b13d-0842f81d2a42" CreationDate="2022-06-08T14:31:33.607" UserId="275" Comment="added 2 characters in body" Text="|substrate-node|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11709" PostHistoryTypeId="2" PostId="3116" RevisionGUID="c3af3b76-190c-4ec6-978f-0e0499ed8c80" CreationDate="2022-06-08T14:53:23.743" UserId="380" Text="Contract logic runs on nodes in the network and each set of contract instructions are part of a single block. You cannot execute smart contract logic indefinitely like a cron job. Otherwise nodes could very quickly be overwhelmed by the number of continuous jobs running and the network would grind to a halt.&#xD;&#xA;&#xD;&#xA;In your example, you will need to trigger the `retrieve` function after a specified amount of time from *outside* the contract. When you lock up funds, store the `block_timestamp` at which they were locked.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    pub struct LockedFunds {&#xD;&#xA;        locked_at: Timestamp // use self.env().block_timestamp() here&#xD;&#xA;        value: Balance&#xD;&#xA;        account: AccountId&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then in the `retrieve` function do something like&#xD;&#xA;```rust&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn retrieve(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            locked_id: Hash&#xD;&#xA;        ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            let mut locked = self.get_locked_funds(locked_id)?;&#xD;&#xA;            if caller == locked.account {&#xD;&#xA;                if self.env().transfer(caller, locked.value).is_err() {&#xD;&#xA;                    return Err(Error::ContractTransferFailed);&#xD;&#xA;                }&#xD;&#xA;                locked.value = 0&#xD;&#xA;                self.update_locked_funds(locked);&#xD;&#xA;                &#xD;&#xA;            }&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11711" PostHistoryTypeId="2" PostId="3117" RevisionGUID="488a6e5a-e1f8-4370-836f-2001f1965bb0" CreationDate="2022-06-08T14:58:43.493" UserId="426" Text="lately Rococo has been producing blocks very slowly.&#xD;&#xA;Not sure if this is the best place to ask, but where can we find more information about this? Or where to ask about this if this isn't the correct place?&#xD;&#xA;&#xD;&#xA;Not sure if this is completely related but our parachain started getting the following error:&#xD;&#xA;&gt;2022-06-08 14:39:36 [Relaychain] Skipping chain: unable to gather info about imported block (0xbfeac39ed4511880c6a831bf5eb911ba4756afc93b722b78c41057e44a4afd48, 545029): block is from an ancient session&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11713" PostHistoryTypeId="1" PostId="3117" RevisionGUID="488a6e5a-e1f8-4370-836f-2001f1965bb0" CreationDate="2022-06-08T14:58:43.493" UserId="426" Text="Rococo Status &amp; Issues" ContentLicense="CC BY-SA 4.0" />
  <row Id="11714" PostHistoryTypeId="3" PostId="3117" RevisionGUID="488a6e5a-e1f8-4370-836f-2001f1965bb0" CreationDate="2022-06-08T14:58:43.493" UserId="426" Text="|parachain|rococo|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11715" PostHistoryTypeId="5" PostId="3114" RevisionGUID="8f70981f-a1e0-4746-9932-91ad09dc951d" CreationDate="2022-06-08T15:48:30.027" UserId="2408" Comment="edited body" Text="I'm creating a contract that holds users' funds and sends them back in a week.   &#xD;&#xA;I've created a `retrieve()` function (message) which does that.  &#xD;&#xA;Is there a way in ink! to postpone function execution for a period of time? (1 week)  &#xD;&#xA;Is there a way in ink! to call function on each block? (if the first option does not work)  &#xD;&#xA;How can I trigger that function except for explicitely calling it?   " ContentLicense="CC BY-SA 4.0" />
  <row Id="11716" PostHistoryTypeId="2" PostId="3118" RevisionGUID="2a63eb33-eb53-4db9-9ccc-2c1aa6b79916" CreationDate="2022-06-08T16:30:02.113" UserId="2140" Text="I believed that Substrate-based tokens have its own assetId&#xD;&#xA;Question is, does relay chain tokens like &quot;DOT&quot; and &quot;KSM&quot; have their assetId too?&#xD;&#xA;I tried to find out where it is implemented through parity-tech/polkadot github code, I can't find it...&#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="11718" PostHistoryTypeId="1" PostId="3118" RevisionGUID="2a63eb33-eb53-4db9-9ccc-2c1aa6b79916" CreationDate="2022-06-08T16:30:02.113" UserId="2140" Text="Does DOT and KSM have Currency AssetId?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11719" PostHistoryTypeId="3" PostId="3118" RevisionGUID="2a63eb33-eb53-4db9-9ccc-2c1aa6b79916" CreationDate="2022-06-08T16:30:02.113" UserId="2140" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11720" PostHistoryTypeId="2" PostId="3119" RevisionGUID="7230e38c-eec4-4412-ab87-7800e88347b8" CreationDate="2022-06-08T16:45:19.603" UserId="1789" Text="The cause of the problem: git rebase did not work properly!&#xD;&#xA;&#xD;&#xA;Solution: overwrite the code with your latest main branch code, then add your Zombienet &amp; docker files:&#xD;&#xA;&#xD;&#xA;add new files:  `.dockerignore, docker/, zombienet/`&#xD;&#xA;&#xD;&#xA;modify files:   `.github/workflows/ci.yml, .gitignore`&#xD;&#xA;&#xD;&#xA;For custom parachain name, just copy the compiled binary into the regular `parachain-collator` in your new images:&#xD;&#xA;```&#xD;&#xA;COPY --from=builder /builds/collator/target/release/customName /usr/local/bin/parachain-collator&#xD;&#xA;```&#xD;&#xA;This cicd code works in Github action:&#xD;&#xA;```&#xD;&#xA;      - name: Start minikube&#xD;&#xA;        uses: medyagh/setup-minikube@master&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11722" PostHistoryTypeId="6" PostId="3118" RevisionGUID="a76cf442-9dec-4f84-b3d6-e61c22e49a31" CreationDate="2022-06-08T16:52:45.690" UserId="34" Comment="edited tags" Text="|polkadot|kusama|balances|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11724" PostHistoryTypeId="2" PostId="3120" RevisionGUID="b4d06759-9f94-47a6-91f5-5f265950d896" CreationDate="2022-06-08T17:59:51.030" UserId="2408" Text="I'm developing a contract that should have some type of a map from `AccountId` to `Balance` __and__ I should be able to __iterate__ over it.  &#xD;&#xA;Using `ink_storage::Mapping` I can't iterate over the collection. But using `ink_prelude::collections::HashMap` gives me the iterator methods I need but it consumes more gas.  &#xD;&#xA;&#xD;&#xA;So what is the best way to iterate over such a collection? " ContentLicense="CC BY-SA 4.0" />
  <row Id="11726" PostHistoryTypeId="1" PostId="3120" RevisionGUID="b4d06759-9f94-47a6-91f5-5f265950d896" CreationDate="2022-06-08T17:59:51.030" UserId="2408" Text="ink! Does It Make Sence to Use HashMap Instead of Mapping?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11727" PostHistoryTypeId="3" PostId="3120" RevisionGUID="b4d06759-9f94-47a6-91f5-5f265950d896" CreationDate="2022-06-08T17:59:51.030" UserId="2408" Text="|ink|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11728" PostHistoryTypeId="5" PostId="3101" RevisionGUID="c0087aff-ef81-4d75-826a-203d1e45c04d" CreationDate="2022-06-08T18:03:54.987" UserId="590" Comment="added 51 characters in body" Text="We’re trying to do the exact thing as referenced in https://substrate.stackexchange.com/questions/1106/how-to-mock-trait-in-benchmarking/3058#3058, and we have implemented the struct + trait we need in our mocks, however, the benchmarks are calling the runtime config version and not the mock config version of the trait implementation. The mock pallet config uses `T::AccountHandler`, as defined inside mock.rs, for a defined `AccountProvider` trait.&#xD;&#xA;NB: this was converted from an answer to a comment in the linked question, but all the code I included was cut off and I can’t edit the comment.&#xD;&#xA;&#xD;&#xA;mock.rs:&#xD;&#xA;```&#xD;&#xA;pub struct AccountHandler;&#xD;&#xA;impl AccountProvider&lt;AccountId, BlockNumber&gt; for AccountHandler {&#xD;&#xA;	fn get_msa_id(key: &amp;AccountId) -&gt; Option&lt;MessageSenderId&gt; {&#xD;&#xA;      // etc.&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;impl pallet_messages::Config for Test {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type AccountProvider = AccountHandler;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type MaxMessagesPerBlock = MaxMessagesPerBlock;&#xD;&#xA;	type MaxMessageSizeInBytes = MaxMessageSizeInBytes;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Inside the pallet, it uses `AccountProvider` like so:&#xD;&#xA;```&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		&#xD;&#xA;		type AccountProvider: AccountProvider&lt;Self::AccountId, Self::BlockNumber&gt;;&#xD;&#xA;       /// etc.&#xD;&#xA;    }&#xD;&#xA;    // inside the extrinsic we want to benchmark, the trait function is called like so:&#xD;&#xA;		#[pallet::weight(T::WeightInfo::add(message.len() as u32, 1_000))]&#xD;&#xA;		pub fn add(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			message: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;            // etc.&#xD;&#xA;            let msa_id = T::AccountProvider::get_msa_id(&amp;who);&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We’re building the benchmarks with --runtime, and we are using substrate polkadot-v0.9.18 substrate.&#xD;&#xA;&#xD;&#xA;why is our benchmark not using the mocked trait&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11729" PostHistoryTypeId="2" PostId="3121" RevisionGUID="27960254-58a5-4c17-b3c5-f237508c0939" CreationDate="2022-06-08T18:43:31.830" UserId="380" Text="As far as I understand, the ink prelude types are not optimised for contract usage and should be avoided if possible. `ink_prelude::collections::HashMap` increases the contract size compared with `ink_storage::Mapping`.&#xD;&#xA;&#xD;&#xA;You can implement your [own indexes for Mapping](https://substrate.stackexchange.com/a/870/380) although there are [plans to create an iterator for it in future](https://github.com/paritytech/substrate/issues/11410)." ContentLicense="CC BY-SA 4.0" />
  <row Id="11731" PostHistoryTypeId="2" PostId="3122" RevisionGUID="c61573e1-f0f2-47e6-948d-3962ef8fc072" CreationDate="2022-06-08T19:59:56.750" UserId="2408" Text="I'm getting a very weird error for all functions and structs of my ink! contract:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the size for values of type `DefaultEnvironment` cannot be known at compilation time&#xD;&#xA;6 |         pub fn get_bid(&amp;self) -&gt; Option&lt;Balance&gt; {&#xD;&#xA;    |                                  ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time&#xD;&#xA;    |&#xD;&#xA;    = help: the trait `Sized` is not implemented for `DefaultEnvironment`  &#xD;&#xA;&#xD;&#xA;note: required by a bound in `ink_env::call::CallBuilder`&#xD;&#xA; |&#xD;&#xA;346 | pub struct CallBuilder&lt;E, CallType, Args, RetType&gt;&#xD;&#xA;    |                        ^ required by this bound in `ink_env::call::CallBuilder`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;error[E0277]: the size for values of type `Set&lt;Call&lt;DefaultEnvironment&gt;&gt;` cannot be known at compilation time&#xD;&#xA;pub fn get_bid(&amp;self) -&gt; Option&lt;Balance&gt; {&#xD;&#xA;    |                                  ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time&#xD;&#xA;    |&#xD;&#xA;    = help: the trait `Sized` is not implemented for `Set&lt;Call&lt;DefaultEnvironment&gt;&gt;`&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;error[E0277]: the size for values of type `Set&lt;Call&lt;DefaultEnvironment&gt;&gt;` cannot be known at compilation time&#xD;&#xA;    |&#xD;&#xA;113 |         pub fn get_bids_made(&amp;self) -&gt; u32 {&#xD;&#xA;    |                                        ^^^ doesn't have a size known at compile-time&#xD;&#xA;    |&#xD;&#xA;    = help: the trait `Sized` is not implemented for `DefaultEnvironment`&#xD;&#xA;```&#xD;&#xA;and so on... (about 30 errors like this)&#xD;&#xA;&#xD;&#xA;I'm sure that's something global that I'm missing but I can't figure it out using error messages. What might be the problem? " ContentLicense="CC BY-SA 4.0" />
  <row Id="11733" PostHistoryTypeId="1" PostId="3122" RevisionGUID="c61573e1-f0f2-47e6-948d-3962ef8fc072" CreationDate="2022-06-08T19:59:56.750" UserId="2408" Text="ink! Size of Values Not Known at Compile Time" ContentLicense="CC BY-SA 4.0" />
  <row Id="11734" PostHistoryTypeId="3" PostId="3122" RevisionGUID="c61573e1-f0f2-47e6-948d-3962ef8fc072" CreationDate="2022-06-08T19:59:56.750" UserId="2408" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11735" PostHistoryTypeId="52" PostId="3114" RevisionGUID="272ec429-0831-4420-a21e-0f28fc279c6b" CreationDate="2022-06-08T21:33:34.137" />
  <row Id="11736" PostHistoryTypeId="2" PostId="3123" RevisionGUID="cc655928-bd10-4afe-b821-b3b709d6db91" CreationDate="2022-06-08T22:58:11.600" UserId="244" Text="After a runtime upgrade, these warnings are logged:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UrRxO.png&#xD;&#xA;&#xD;&#xA;Does anything need to be done regarding these? Do they mean some kind of storage migration is necessary?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11738" PostHistoryTypeId="1" PostId="3123" RevisionGUID="cc655928-bd10-4afe-b821-b3b709d6db91" CreationDate="2022-06-08T22:58:11.600" UserId="244" Text="Pallet declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`" ContentLicense="CC BY-SA 4.0" />
  <row Id="11739" PostHistoryTypeId="3" PostId="3123" RevisionGUID="cc655928-bd10-4afe-b821-b3b709d6db91" CreationDate="2022-06-08T22:58:11.600" UserId="244" Text="|runtime-upgrade|frontier|migration|on-runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11740" PostHistoryTypeId="2" PostId="3124" RevisionGUID="c2bf8a62-24d8-4fc1-8ef9-241e7c0a7849" CreationDate="2022-06-09T01:27:27.843" UserId="2292" Text="As ink chain-extension example [https://github.com/paritytech/ink/blob/master/examples/rand-extension/runtime/chain-extension-example.rs#L32](https://github.com/paritytech/ink/blob/master/examples/rand-extension/runtime/chain-extension-example.rs#L32) .&#xD;&#xA;It show how to receive one param.&#xD;&#xA;&#xD;&#xA;But if I want receive multiple param. How to handler it ?&#xD;&#xA;&#xD;&#xA;such as &#xD;&#xA;```&#xD;&#xA;#[ink::chain_extension]&#xD;&#xA;pub trait FetchRandom {&#xD;&#xA;    type ErrorCode = RandomReadErr;&#xD;&#xA;&#xD;&#xA;    /// Note: this gives the operation a corresponding `func_id` (1101 in this case),&#xD;&#xA;    /// and the chain-side chain extension will get the `func_id` to do further operations.&#xD;&#xA;    #[ink(extension = 1101, returns_result = false)]&#xD;&#xA;    fn fetch_random(subject: [u8; 32], another: Vec&lt;u8&gt; ) -&gt; [u8; 32];&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can I receive `anther` param as above？" ContentLicense="CC BY-SA 4.0" />
  <row Id="11742" PostHistoryTypeId="1" PostId="3124" RevisionGUID="c2bf8a62-24d8-4fc1-8ef9-241e7c0a7849" CreationDate="2022-06-09T01:27:27.843" UserId="2292" Text="How to receive multiple parameters of different types" ContentLicense="CC BY-SA 4.0" />
  <row Id="11743" PostHistoryTypeId="3" PostId="3124" RevisionGUID="c2bf8a62-24d8-4fc1-8ef9-241e7c0a7849" CreationDate="2022-06-09T01:27:27.843" UserId="2292" Text="|ink|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11744" PostHistoryTypeId="5" PostId="3124" RevisionGUID="0dd2450d-29c3-400e-aad5-f75d61bcffc6" CreationDate="2022-06-09T01:30:53.983" UserId="2292" Comment="added 1 character in body" Text="As ink chain-extension example [https://github.com/paritytech/ink/blob/master/examples/rand-extension/runtime/chain-extension-example.rs#L32](https://github.com/paritytech/ink/blob/master/examples/rand-extension/runtime/chain-extension-example.rs#L32) .&#xD;&#xA;It show how to receive one param.&#xD;&#xA;&#xD;&#xA;But if I want receive multiple param. How to handler it ?&#xD;&#xA;&#xD;&#xA;such as &#xD;&#xA;```&#xD;&#xA;#[ink::chain_extension]&#xD;&#xA;pub trait FetchRandom {&#xD;&#xA;    type ErrorCode = RandomReadErr;&#xD;&#xA;&#xD;&#xA;    /// Note: this gives the operation a corresponding `func_id` (1101 in this case),&#xD;&#xA;    /// and the chain-side chain extension will get the `func_id` to do further operations.&#xD;&#xA;    #[ink(extension = 1101, returns_result = false)]&#xD;&#xA;    fn fetch_random(subject: [u8; 32], another: Vec&lt;u8&gt; ) -&gt; [u8; 32];&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can I receive `another` param as above？" ContentLicense="CC BY-SA 4.0" />
  <row Id="11745" PostHistoryTypeId="4" PostId="3124" RevisionGUID="d53bbd73-5a6e-4768-b3a2-8403600ff45c" CreationDate="2022-06-09T01:31:54.913" UserId="2292" Comment="edited title" Text="How to receive multiple parameters of different types in chain extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="11746" PostHistoryTypeId="2" PostId="3125" RevisionGUID="56ddafdf-2da8-43e2-98f9-8ae76e60c638" CreationDate="2022-06-09T02:02:29.370" UserId="244" Text="To activate and set the `BaseFee` in your Frontier-based chain, you can simply change [these runtime parameters][1]:&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;frame_support::parameter_types! {&#xD;&#xA;	pub IsActive: bool = true;&#xD;&#xA;	pub DefaultBaseFeePerGas: U256 = U256::from(1_000_000_000);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/frontier-node-template/blob/1b6bff4e88e6d0345887c0ecbd63401f9474aa91/runtime/src/lib.rs#L341" ContentLicense="CC BY-SA 4.0" />
  <row Id="11748" PostHistoryTypeId="2" PostId="3126" RevisionGUID="fca2a42c-7231-4ecc-b317-82c01a7e4812" CreationDate="2022-06-09T04:02:31.740" UserId="515" Text="Its likely web3.js has a great difference on gas_price with your own, you should add ```gasPrice``` to your transaction's option:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   gasPrice: await web3.eth.getGasPrice()&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11750" PostHistoryTypeId="2" PostId="3127" RevisionGUID="fa72ab25-9f69-437e-80cd-c7480d49a01c" CreationDate="2022-06-09T04:20:30.417" UserId="245" Text="I'm trying to create a basic HTTP server that authorizes users with `Authorization Pubkey:Sig` like what Crust explained [here](https://wiki.crust.network/docs/en/buildIPFSWeb3AuthGW#solution).&#xD;&#xA;&#xD;&#xA;However, creating a `Signature` from `&amp;str` with `Signature::fromSlice()` failing. How can I convert the `&amp;str` to a `Signature`?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub type Signature = subxt::sp_core::sr25519::Signature;&#xD;&#xA;pub type PublicKey = subxt::sp_core::sr25519::Public;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let pub_key = value.get(0).unwrap(); // 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;let sig = value.get(1).unwrap(); // f2f7211fcc2204dc3fa50cf1aca98b7c49c82510efbc84fd808b46c459069017db7a47acf4040d1cc0363eb5e3416c197e15fd2439e70a69dcdfa2eb8b520280&#xD;&#xA;let public_key = PublicKey::from_str(pub_key);&#xD;&#xA;let signature = Signature::from_slice(sig.as_bytes());&#xD;&#xA;&#xD;&#xA;if public_key.is_err() {&#xD;&#xA;    return Err(actix_web::error::ErrorUnauthorized(&quot;Invalid Public Key&quot;));&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;if signature.is_none() {&#xD;&#xA;    return Err(actix_web::error::ErrorUnauthorized(&quot;Invalid Signature&quot;));&#xD;&#xA;}&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11752" PostHistoryTypeId="1" PostId="3127" RevisionGUID="fa72ab25-9f69-437e-80cd-c7480d49a01c" CreationDate="2022-06-09T04:20:30.417" UserId="245" Text="How to create Signature from &amp;str?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11753" PostHistoryTypeId="3" PostId="3127" RevisionGUID="fa72ab25-9f69-437e-80cd-c7480d49a01c" CreationDate="2022-06-09T04:20:30.417" UserId="245" Text="|subxt|keyring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11754" PostHistoryTypeId="2" PostId="3128" RevisionGUID="3be793df-bf1a-4620-958b-bad0beb78f0e" CreationDate="2022-06-09T04:41:49.643" UserId="372" Text="Every Substrate runtime implements several Runtime APIs. Two essential ones are the `Core` and `BlockBuilder` APIs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The [`Core` API](https://crates.parity.io/sp_api/trait.Core.html) is for executing blocks, a task that will be performed by all nodes. A simplification of its definition is as follows:&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;pub trait Core {&#xD;&#xA;  fn initialize_block(header: &amp;Header);&#xD;&#xA;&#xD;&#xA;  fn execute_block(block: Block);&#xD;&#xA;&#xD;&#xA;  // Less relevant functions elided&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The [`BlockBuilder` API](https://crates.parity.io/sp_block_builder/trait.BlockBuilder.html) is for constructing blocks, a task that only a validator or miner would perform. To summarize its definition:&#xD;&#xA;```Rust&#xD;&#xA;pub trait BlockBuilder: Core {&#xD;&#xA;  fn apply_extrinsic(extrinsic: Extrinsic) -&gt; ApplyExtrinsicResult;&#xD;&#xA;&#xD;&#xA;  fn finalize_block() -&gt; Header;&#xD;&#xA;&#xD;&#xA;  // Less relevant functions elided&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems to me that building a block should involve initializing, applying several extrinsics, and then finalizing. It also seems natural that executing an already built block should be a single task with any initialization being part of the execution.&#xD;&#xA;&#xD;&#xA;This is the approach taken by the [rust-blockchain project](https://github.com/rust-blockchain/blockchain/blob/master/core/src/traits.rs#L66-L117)&#xD;&#xA;&#xD;&#xA;Cumulus also seems to take this approach for validating parachain blocks with its single [`validate_block` function](https://github.com/paritytech/cumulus/blob/8befd605b6a29210cb47c74ed484e90f90ebaaac/pallets/parachain-system/src/validate_block/implementation.rs#L43).&#xD;&#xA;&#xD;&#xA;Finally, even Substrate hints at this design with its requirement `trait BlockBuilder: Core`&#xD;&#xA;&#xD;&#xA;So why does Substrate include `initialize_block` along with the Core API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11756" PostHistoryTypeId="1" PostId="3128" RevisionGUID="3be793df-bf1a-4620-958b-bad0beb78f0e" CreationDate="2022-06-09T04:41:49.643" UserId="372" Text="Why is `initialize_block` in the `Core` runtime API (as opposed to `BlockBuilder`)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11757" PostHistoryTypeId="3" PostId="3128" RevisionGUID="3be793df-bf1a-4620-958b-bad0beb78f0e" CreationDate="2022-06-09T04:41:49.643" UserId="372" Text="|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11758" PostHistoryTypeId="2" PostId="3129" RevisionGUID="10791dce-40b1-417f-82a0-2c2465eae9b9" CreationDate="2022-06-09T04:48:43.340" UserId="73" Text="These are historical reasons. As I implemented the runtime api in the current form as traits, we always called `initialize_block` before every runtime api function call. Thus, I moved the call to the `Core` api. We removed this requirement on calling `initialize_block` for every runtime api function call and now it would make more sense to move it to the `BlockBuilder` api. " ContentLicense="CC BY-SA 4.0" />
  <row Id="11760" PostHistoryTypeId="2" PostId="3130" RevisionGUID="09923dab-6c2d-48d7-ac88-e83ac1ffb2d5" CreationDate="2022-06-09T04:54:28.920" UserId="73" Text="For grandpa the keys need to exist before starting grandpa. As you have inserted the keys after you have started the node, grandpa isn't picking them up. So, restarting the node will make finality work." ContentLicense="CC BY-SA 4.0" />
  <row Id="11762" PostHistoryTypeId="2" PostId="3131" RevisionGUID="686b3160-8d18-41f3-8619-e8f99e30464c" CreationDate="2022-06-09T06:03:26.667" UserId="1970" Text="Here is a [previous answer](https://substrate.stackexchange.com/questions/711/when-should-i-use-balances-pallet-and-when-should-i-use-assets-pallet) that details the differences between `assets` and `balances`.&#xD;&#xA;&#xD;&#xA;At this point a currency is not the same as an asset, so doesn't have an assetid inside the assets environment." ContentLicense="CC BY-SA 4.0" />
  <row Id="11764" PostHistoryTypeId="2" PostId="3132" RevisionGUID="ef9831d7-5eaf-46e8-b5f7-c8bddea503a7" CreationDate="2022-06-09T06:05:28.747" UserId="1970" Text="As per the [linked answer](https://substrate.stackexchange.com/questions/711/when-should-i-use-balances-pallet-and-when-should-i-use-assets-pallet) from Bruno, an asset is not the same as a native currency so at this point is not used for payments.&#xD;&#xA;&#xD;&#xA;In your own chain you can however name the native currency anything you want and change the decimals/supply, etc." ContentLicense="CC BY-SA 4.0" />
  <row Id="11766" PostHistoryTypeId="2" PostId="3133" RevisionGUID="daf85313-b6a4-4982-8553-d62743101b1a" CreationDate="2022-06-09T06:12:27.940" UserId="1970" Text="As per a comment above, to iterate over a map, you need to use the [entries methods](https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries), for double maps there is also a [cookbook example](https://polkadot.js.org/docs/api/cookbook/storage/#how-do-i-use-entrieskeys-on-double-maps).&#xD;&#xA;&#xD;&#xA;In the case of `api.query.staking.erasStakers(...)` it returns a specific entry, and only the value. In the case of `api.query.staking.erasStakers.entries(...)` it returns the full map, will all keys &amp; values for each entry. &#xD;&#xA;&#xD;&#xA;(This is obviously a much heavier operation, apart from the fact that the return type is different, since it needs to chunk the values and iterate on the Node RPC side)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11768" PostHistoryTypeId="2" PostId="3134" RevisionGUID="3a5cf3f7-5b09-45ea-9868-cef5c6a41abb" CreationDate="2022-06-09T06:17:11.780" UserId="1970" Text="As per the error message above, &#xD;&#xA;&#xD;&#xA;`Invalid params: invalid type: number, expected a (both 0x-prefixed or not) hex string with length of 64.`&#xD;&#xA;&#xD;&#xA;This is for the `BlockHash` parameter, you need to pass an actual hash, i.e. `0x123...def` would be applicable. Or `null` if the `Option` is empty, any non-null value needs to be a valid `BlockHash`.&#xD;&#xA;&#xD;&#xA;(Generally you most-probably would like to move the `Option` parameters to the end, or at least that is the pattern followed in Substrate)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11770" PostHistoryTypeId="2" PostId="3135" RevisionGUID="37ab7abc-743d-4198-bcb2-b1a8961c0a77" CreationDate="2022-06-09T06:21:08.970" UserId="1970" Text="`Stale` means that another/newer transaction with a higher nonce has already been processed. &#xD;&#xA;&#xD;&#xA;You can find the explicit enum [entry here](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/primitives/runtime/src/transaction_validity.rs#L46-L47) in the actual transaction pool code." ContentLicense="CC BY-SA 4.0" />
  <row Id="11772" PostHistoryTypeId="2" PostId="3136" RevisionGUID="778c0ca6-1fcc-4c05-b3e8-c6f901dd4d85" CreationDate="2022-06-09T06:26:52.627" UserId="445" Text="I can not use **HashMap** in scale_info packages, but when I search in Substrate docs https://paritytech.github.io/substrate/latest/scale_info/prelude/collections/struct.HashMap.html. we can use **HashMap**&#xD;&#xA;&#xD;&#xA;My current scale_info package:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;scale-info = { version = &quot;2.0.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;```&#xD;&#xA;When i **cargo build --release** -&gt; **no `HashMap` in `collections`**&#xD;&#xA;&#xD;&#xA;Is it eliminated?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11774" PostHistoryTypeId="1" PostId="3136" RevisionGUID="778c0ca6-1fcc-4c05-b3e8-c6f901dd4d85" CreationDate="2022-06-09T06:26:52.627" UserId="445" Text="no `HashMap` in `collections` in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="11775" PostHistoryTypeId="3" PostId="3136" RevisionGUID="778c0ca6-1fcc-4c05-b3e8-c6f901dd4d85" CreationDate="2022-06-09T06:26:52.627" UserId="445" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11776" PostHistoryTypeId="2" PostId="3137" RevisionGUID="c73eec8f-1df3-4710-b644-030911101562" CreationDate="2022-06-09T06:27:14.143" UserId="1970" Text="The locked values are stored in [balances.locks](https://polkadot.js.org/docs/substrate/storage#locksaccountid32-vecpalletbalancesbalancelock) and the vesting information in [vesting.vesting](https://polkadot.js.org/docs/substrate/storage#vestingaccountid32-optionvecpalletvestingvestinginfo).&#xD;&#xA;&#xD;&#xA;The locks has identifiers that point to the specific pallets that performed the locks." ContentLicense="CC BY-SA 4.0" />
  <row Id="11778" PostHistoryTypeId="2" PostId="3138" RevisionGUID="29ad1255-9879-4906-bc15-2f1c97f11eba" CreationDate="2022-06-09T06:28:47.817" UserId="265" Text="i did not find a good metric exposed by substrate-node with which ws connections can be monitored.&#xD;&#xA;i did find that [prometheus node-exporter](https://github.com/prometheus/node_exporter) provides a *good enough* metric in `node_netstat_Tcp_CurrEstab` which monitors the total number of *established* tcp connections being handled by the node host/instance. while this metric includes more than just the ws connections, in practice, the resolution is good enough to provide the information required on a host dedicated to running a single substrate node, since ws accounts for pretty much all of the tcp connections beyond the first 100 or so.&#xD;&#xA;&#xD;&#xA;node-exporter can be installed like so:&#xD;&#xA;```bash&#xD;&#xA;version=1.3.1&#xD;&#xA;&#xD;&#xA;# download&#xD;&#xA;curl -L \&#xD;&#xA;  -o /tmp/node_exporter-${version}.linux-amd64.tar.gz \&#xD;&#xA;  https://github.com/prometheus/node_exporter/releases/download/v${version}/node_exporter-${version}.linux-amd64.tar.gz&#xD;&#xA;&#xD;&#xA;# extract&#xD;&#xA;sudo tar xvfz \&#xD;&#xA;  /tmp/node_exporter-${version}.linux-amd64.tar.gz \&#xD;&#xA;  -C /usr/local/bin \&#xD;&#xA;  --strip-components=1 \&#xD;&#xA;  node_exporter-${version}.linux-amd64/node_exporter&#xD;&#xA;&#xD;&#xA;# clean up&#xD;&#xA;rm /tmp/node_exporter-${version}.linux-amd64.tar.gz&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it can be run as a systemd service by creating a unit file at&#xD;&#xA;&#xD;&#xA;`/etc/systemd/system/prometheus-node-exporter.service`:&#xD;&#xA;```ini&#xD;&#xA;[Unit]&#xD;&#xA;Description=prometheus node exporter&#xD;&#xA;Wants=network-online.target&#xD;&#xA;After=network-online.target&#xD;&#xA;&#xD;&#xA;[Service]&#xD;&#xA;Type=simple&#xD;&#xA;ExecStart=/usr/local/bin/node_exporter&#xD;&#xA;Restart=always&#xD;&#xA;RestartSec=10&#xD;&#xA;&#xD;&#xA;[Install]&#xD;&#xA;WantedBy=multi-user.target&#xD;&#xA;```&#xD;&#xA;and then enabled and started with:&#xD;&#xA;```bash&#xD;&#xA;sudo systemctl enable --now prometheus-node-exporter.service&#xD;&#xA;```&#xD;&#xA;when its metrics url is added to prometheus server configuration, the tcp metrics can be [visualised](https://pulse.pelagos.systems/graph?g0.expr=node_netstat_Tcp_CurrEstab%7Bjob%3D~%22.*dolphin.*%22%7D&amp;g0.tab=0&amp;g0.stacked=0&amp;g0.show_exemplars=0&amp;g0.range_input=1d), monitored and alerted on.&#xD;&#xA;[![tcp connections][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/AAKEd.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11780" PostHistoryTypeId="2" PostId="3139" RevisionGUID="098949ae-4fd9-46a9-8eff-3e2cd89c27d1" CreationDate="2022-06-09T06:29:51.247" UserId="1970" Text="As Shawn suggested, for proposals that do transfers, you would need to use [forceTransfer](https://polkadot.js.org/docs/substrate/extrinsics#forcetransfersource-multiaddress-dest-multiaddress-value-compactu128) which executes from the root origin.&#xD;&#xA;&#xD;&#xA;(The normal [transfer](https://polkadot.js.org/docs/substrate/extrinsics#transferdest-multiaddress-value-compactu128) operates from the signer account and is not meant for these operations)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11782" PostHistoryTypeId="2" PostId="3140" RevisionGUID="17f720e5-b078-4808-8556-5b7c72ef40cf" CreationDate="2022-06-09T06:56:15.397" UserId="1732" Text="the rate function is actually what you need, increase is required in the context of a time serie db like Prometheus with a metric only increasing.&#xD;&#xA;&#xD;&#xA;What makes you think your nodes are handling million or requests per second? The scale I see on your graph is 0-25 which makes sense.&#xD;&#xA;&#xD;&#xA;Here is an example of this query `rate(substrate_rpc_requests_started{job=&quot;astar-public-node&quot;}[$__rate_interval])`:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can consider stacking series to have an overall usage of the network:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6SVqI.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/poatg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11784" PostHistoryTypeId="5" PostId="3140" RevisionGUID="919603ea-c164-4ab9-85d3-6e74f3c78880" CreationDate="2022-06-09T06:56:30.210" UserId="1732" Comment="edited body" Text="The rate function is actually what you need, increase is required in the context of a time serie db like Prometheus with a metric only increasing.&#xD;&#xA;&#xD;&#xA;What makes you think your nodes are handling million or requests per second? The scale I see on your graph is 0-25 which makes sense.&#xD;&#xA;&#xD;&#xA;Here is an example of this query `rate(substrate_rpc_requests_started{job=&quot;astar-public-node&quot;}[$__rate_interval])`:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can consider stacking series to have an overall usage of the network:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6SVqI.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/poatg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11785" PostHistoryTypeId="6" PostId="2782" RevisionGUID="50e8c62c-8998-4506-be5f-ee59f8213de9" CreationDate="2022-06-09T07:01:08.233" UserId="34" Comment="edited tags" Text="|parachain|extrinsic|runtime-upgrade|extrinsicstatus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11786" PostHistoryTypeId="2" PostId="3141" RevisionGUID="dfbf5bc3-6744-4bf4-87c3-9862915a37f6" CreationDate="2022-06-09T07:03:21.450" UserId="1949" Text="There seems to be a mismatch with the [adjusted DispatchError enum](https://github.com/paritytech/substrate/pull/10242) resulting in a non-decodable result when errors are emitted on calls.&#xD;&#xA;&#xD;&#xA;I believe the API only catered for it on the contracts side [this week](https://github.com/polkadot-js/api/pull/4894), so the fix should already be available in the the apps UI (the team generally seems to follow the latest API betas there). Judging by normal release cadance (which is generally [weekly](https://github.com/polkadot-js/api/releases)), the next API version should have the adjustments in." ContentLicense="CC BY-SA 4.0" />
  <row Id="11788" PostHistoryTypeId="2" PostId="3142" RevisionGUID="107fbf5b-17c4-40b7-940c-f642bb063ae7" CreationDate="2022-06-09T07:15:54.223" UserId="34" Text="Unfortunately at this time, the `latest` tag on the rustdocs is not pointing to a recent version of substrate source upstream. Please use `master`:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/scale_info/prelude/collections/struct.HashMap.html&#xD;&#xA;&#xD;&#xA;And if in doubt, the source on github master branch is best to reference as the source of truth.&#xD;&#xA;&#xD;&#xA;The scale-info crate now lives in a separate repository, and is at this time using [version 2.1.2](https://github.com/paritytech/scale-info/blob/master/Cargo.toml#L3). I see no HashMap implementation.&#xD;&#xA;&#xD;&#xA;You should very likely not be using the crates.io versions of Substrate and SCALE info. Instead, it is best now to use the most recent release of Polkadot tagged versions of things in your projects, like the devhub node template `latest` tag uses:&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/tree/latest&#xD;&#xA;&#xD;&#xA;All docs.substrate.io examples use this as a reference." ContentLicense="CC BY-SA 4.0" />
  <row Id="11790" PostHistoryTypeId="5" PostId="2423" RevisionGUID="706d5083-0bf0-4090-8bcc-55d4a6336629" CreationDate="2022-06-09T07:18:50.617" UserId="1949" Comment="Code formatting with ticks" Text="I figured out how to express the above call:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use crate::metadata::runtime_types::xcm::{&#xD;&#xA;    v1::junction::Junction,&#xD;&#xA;    v0::junction::NetworkId,&#xD;&#xA;    v1::multilocation::Junctions::X1,&#xD;&#xA;    v1::multilocation::MultiLocation as V1MultiLocation,&#xD;&#xA;    VersionedMultiLocation as VersionedMultiLocation,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;let dest : &amp;VersionedMultiLocation = &amp;VersionedMultiLocation::V1(&#xD;&#xA;                V1MultiLocation {&#xD;&#xA;                    parents: 1,&#xD;&#xA;                    interior: X1(&#xD;&#xA;                        Junction::AccountId32 {&#xD;&#xA;                            network: NetworkId::Any,&#xD;&#xA;                            id: dest_account.into(),&#xD;&#xA;                        }&#xD;&#xA;                    ),&#xD;&#xA;                }&#xD;&#xA;            ); &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11791" PostHistoryTypeId="24" PostId="2423" RevisionGUID="706d5083-0bf0-4090-8bcc-55d4a6336629" CreationDate="2022-06-09T07:18:50.617" Comment="Proposed by 1949 approved by 34 edit id of 212" ContentLicense="CC BY-SA 4.0" />
  <row Id="11803" PostHistoryTypeId="2" PostId="3145" RevisionGUID="a612d095-2303-45fe-be6d-296ba78f0485" CreationDate="2022-06-09T10:51:24.657" UserId="28" Text="Benchmarks will use the &quot;mock&quot; when running tests, since that is the runtime environment set up for tests.&#xD;&#xA;&#xD;&#xA;However, for benchmarks to be accurate in production, when they are actually run, they are executed against the real runtime environment. You can imagine your mock and your real runtime can be configured completely differently, and this can cause differences in the performance and results of your benchmarks.&#xD;&#xA;&#xD;&#xA;When writing benchmarks, you must make sure to write them generally, so that they would work across your mock and production environment. For example, if there is some logic which needs to transfer balance between two users, you should not say: `transfer(100, alice, bob)`, since &quot;100&quot; is an arbitrary number, and may work in your mock, but may not work on a chain where the minimum balance is more like `1_000_000_000_000`. So instead, doing something like: `transfer(T::Currency::ExistentialDeposit::get(), alice, bob)` is correct, since this will always read from your runtime configuration and execute the appropriate logic needed." ContentLicense="CC BY-SA 4.0" />
  <row Id="11805" PostHistoryTypeId="4" PostId="3120" RevisionGUID="8092176a-1bb2-49e5-82f3-b562c8be855f" CreationDate="2022-06-09T11:52:27.787" UserId="380" Comment="Fixing title to remove capitalised words and spell checking" Text="Does it make sense to use HashMap instead of Mapping in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11806" PostHistoryTypeId="24" PostId="3120" RevisionGUID="8092176a-1bb2-49e5-82f3-b562c8be855f" CreationDate="2022-06-09T11:52:27.787" Comment="Proposed by 380 approved by 2408 edit id of 213" ContentLicense="CC BY-SA 4.0" />
  <row Id="11807" PostHistoryTypeId="2" PostId="3146" RevisionGUID="ecb698ba-5334-41b5-b1ff-39c004abb917" CreationDate="2022-06-09T12:34:39.210" UserId="3" Text="I modified the template pallet from the substrate node template [681a9d8e3e8becf99aabf1cc76e1c08016db2e1a](https://github.com/substrate-developer-hub/substrate-node-template/tree/polkadot-v0.9.23) to contain a storage version:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;const STORAGE_VERSION: StorageVersion = StorageVersion::new(123);&#xD;&#xA;&#xD;&#xA;// -- snip --&#xD;&#xA;&#xD;&#xA;#[pallet::pallet]&#xD;&#xA;#[pallet::storage_version(STORAGE_VERSION)]&#xD;&#xA;#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I wrote the following test:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn storage_version_is_correct() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		assert_eq!(&lt;Pallet&lt;Test&gt; as GetStorageVersion&gt;::current_storage_version(), 123);&#xD;&#xA;		assert_eq!(&lt;Pallet&lt;Test&gt; as GetStorageVersion&gt;::on_chain_storage_version(), 123);&#xD;&#xA;		assert_eq!(StorageVersion::get::&lt;Pallet&lt;Test&gt;&gt;(), 123);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The first `assert_eq!` succeeds, the other two fail. Is this expected behavior? I would have expected the storage version of the pallet to be written to storage at genesis. If this is expected behavior, why is this the case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11809" PostHistoryTypeId="1" PostId="3146" RevisionGUID="ecb698ba-5334-41b5-b1ff-39c004abb917" CreationDate="2022-06-09T12:34:39.210" UserId="3" Text="Unexpectedly storage version of pallet is zero at genesis" ContentLicense="CC BY-SA 4.0" />
  <row Id="11810" PostHistoryTypeId="3" PostId="3146" RevisionGUID="ecb698ba-5334-41b5-b1ff-39c004abb917" CreationDate="2022-06-09T12:34:39.210" UserId="3" Text="|storage|genesis|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11811" PostHistoryTypeId="2" PostId="3147" RevisionGUID="d8816008-7f8c-47c4-a7b4-441c64aac144" CreationDate="2022-06-09T13:02:34.877" UserId="2713" Text="After upgrading to Polkadot v0.9.23 from v0.9.16, I am missing the default &quot;start up&quot; message (WS/RPC connections, hardware, para-id etc, see below) when initiating the node client, both for the parachain as well as the standalone clients.&#xD;&#xA;&#xD;&#xA;Exemplary command&#xD;&#xA;```&#xD;&#xA;cargo run --release --bin my-runtime -- --dev --tmp --validator  --ws-port=9944 --port 30044 --alice --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --unsafe-rpc-external&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;First, I thought I would need to add something to my command, e.g. enabling a non-default log-level for `sc-service` or similar pallets. Unfortunately, that did not succeed. However, my default command (without any non-default logs) produces the missing log message for all Substrate/Polkadot/Cumulus repositories.&#xD;&#xA;&#xD;&#xA;I triple-checked the differences between my client and the templates and could not find any unexpected divergences. I was hoping that someone here had a similar issue or could provide me with any kind of hint. Thanks in advance!&#xD;&#xA;&#xD;&#xA;Heres an exemplary message from the Polkadot binary when executing the above command with `bin=polkadot` in the Polkadot repository:&#xD;&#xA;```&#xD;&#xA;2022-06-09 14:00:05  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-06-09 14:00:05   Local node identity is: 12D3KooWLtiot9DJov5WMKRbiTxRY9r5CvZCiePsAUmRJXFnnmis    &#xD;&#xA;2022-06-09 14:00:05  Operating system: linux    &#xD;&#xA;2022-06-09 14:00:05  CPU architecture: x86_64    &#xD;&#xA;2022-06-09 14:00:05  Target environment: gnu    &#xD;&#xA;2022-06-09 14:00:05  CPU: 12th Gen Intel(R) Core(TM) i9-12900K    &#xD;&#xA;2022-06-09 14:00:05  CPU cores: 16    &#xD;&#xA;2022-06-09 14:00:05  Memory: 128628MB    &#xD;&#xA;2022-06-09 14:00:05  Kernel: 5.13.0-35-generic    &#xD;&#xA;2022-06-09 14:00:05  Linux distribution: Ubuntu 20.04.4 LTS    &#xD;&#xA;2022-06-09 14:00:05  Virtual machine: no    &#xD;&#xA;2022-06-09 14:00:05  Highest known block at #0    &#xD;&#xA;2022-06-09 14:00:05 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-06-09 14:00:05 Running JSON-RPC HTTP server: addr=0.0.0.0:9933, allowed origins=None    &#xD;&#xA;2022-06-09 14:00:05 Running JSON-RPC WS server: addr=0.0.0.0:40044, allowed origins=None    &#xD;&#xA;2022-06-09 14:00:05  CPU score: 1375MB/s    &#xD;&#xA;2022-06-09 14:00:05  Memory score: 14784MB/s    &#xD;&#xA;2022-06-09 14:00:05  Disk score (seq. writes): 2515MB/s    &#xD;&#xA;2022-06-09 14:00:05  Disk score (rand. writes): 968MB/s    &#xD;&#xA;2022-06-09 14:00:05  Starting BABE Authorship worker    &#xD;&#xA;2022-06-09 14:00:07  Starting consensus session on top of parent 0xd2d8af4849031dacb13979ea8ad0d84ce97e5395df6bc6df6bbea0791bc16a0d    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy   &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11813" PostHistoryTypeId="1" PostId="3147" RevisionGUID="d8816008-7f8c-47c4-a7b4-441c64aac144" CreationDate="2022-06-09T13:02:34.877" UserId="2713" Text="Node startup message missing after upgrade to Polkadot v0.9.23" ContentLicense="CC BY-SA 4.0" />
  <row Id="11814" PostHistoryTypeId="3" PostId="3147" RevisionGUID="d8816008-7f8c-47c4-a7b4-441c64aac144" CreationDate="2022-06-09T13:02:34.877" UserId="2713" Text="|client|upgrade|log|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11815" PostHistoryTypeId="5" PostId="3147" RevisionGUID="149df0ba-6b3c-4ee3-ad4e-865efba3e0bc" CreationDate="2022-06-09T13:05:55.257" UserId="2713" Comment="add context" Text="After upgrading to Polkadot v0.9.23 from v0.9.16, I am missing the default &quot;start up&quot; message (WS/RPC connections, hardware, para-id etc, see below) when initiating the node client, both for the parachain as well as the standalone clients.&#xD;&#xA;&#xD;&#xA;Exemplary command&#xD;&#xA;```&#xD;&#xA;cargo run --release --bin my-runtime -- --dev --tmp --validator  --ws-port=9944 --port 30044 --alice --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --unsafe-rpc-external&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;First, I thought I would need to add something to my command, e.g. enabling a non-default log-level for `sc-service` or similar pallets. Unfortunately, that did not succeed. However, my default command (without any non-default logs) produces the missing log message for all Substrate/Polkadot/Cumulus repositories.&#xD;&#xA;&#xD;&#xA;I triple-checked the differences between my client and the templates and could not find any unexpected divergences. I was hoping that someone here had a similar issue or could provide me with any kind of hint. Thanks in advance!&#xD;&#xA;&#xD;&#xA;_Expectation_:Heres an exemplary message from the Polkadot binary when executing the above command with `bin=polkadot` in the Polkadot repository:&#xD;&#xA;```&#xD;&#xA;2022-06-09 14:00:05  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-06-09 14:00:05   Local node identity is: 12D3KooWLtiot9DJov5WMKRbiTxRY9r5CvZCiePsAUmRJXFnnmis    &#xD;&#xA;2022-06-09 14:00:05  Operating system: linux    &#xD;&#xA;2022-06-09 14:00:05  CPU architecture: x86_64    &#xD;&#xA;2022-06-09 14:00:05  Target environment: gnu    &#xD;&#xA;2022-06-09 14:00:05  CPU: 12th Gen Intel(R) Core(TM) i9-12900K    &#xD;&#xA;2022-06-09 14:00:05  CPU cores: 16    &#xD;&#xA;2022-06-09 14:00:05  Memory: 128628MB    &#xD;&#xA;2022-06-09 14:00:05  Kernel: 5.13.0-35-generic    &#xD;&#xA;2022-06-09 14:00:05  Linux distribution: Ubuntu 20.04.4 LTS    &#xD;&#xA;2022-06-09 14:00:05  Virtual machine: no    &#xD;&#xA;2022-06-09 14:00:05  Highest known block at #0    &#xD;&#xA;2022-06-09 14:00:05 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-06-09 14:00:05 Running JSON-RPC HTTP server: addr=0.0.0.0:9933, allowed origins=None    &#xD;&#xA;2022-06-09 14:00:05 Running JSON-RPC WS server: addr=0.0.0.0:40044, allowed origins=None    &#xD;&#xA;2022-06-09 14:00:05  CPU score: 1375MB/s    &#xD;&#xA;2022-06-09 14:00:05  Memory score: 14784MB/s    &#xD;&#xA;2022-06-09 14:00:05  Disk score (seq. writes): 2515MB/s    &#xD;&#xA;2022-06-09 14:00:05  Disk score (rand. writes): 968MB/s    &#xD;&#xA;2022-06-09 14:00:05  Starting BABE Authorship worker    &#xD;&#xA;2022-06-09 14:00:07  Starting consensus session on top of parent 0xd2d8af4849031dacb13979ea8ad0d84ce97e5395df6bc6df6bbea0791bc16a0d    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;_Reality_&#xD;&#xA;```&#xD;&#xA;2022-06-09 14:55:20 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-06-09 14:55:24  Starting consensus session on top of parent 0x9a91c757c54d50b9717263ce02540704ff89b609c1d92905cb697b4f3790f012    &#xD;&#xA;2022-06-09 14:55:24  Prepared block for proposing at 1 (1 ms) [hash: 0xac75a665ebcfca9ace85eb92ae36dc4fa3a4643903f5afc89888c11ccc8059d7; parent_hash: 0x9a91…f012; extrinsics (1): [0x64eb…f8b3]]    &#xD;&#xA;2022-06-09 14:55:24  Pre-sealed block for proposal at 1. Hash now 0x9c716b73f6767e192ee642108f51225d7fa042cad0fdb0291027c301a973c716, previously 0xac75a665ebcfca9ace85eb92ae36dc4fa3a4643903f5afc89888c11ccc8059d7.    &#xD;&#xA;2022-06-09 14:55:24 ✨ Imported #1 (0x9c71…c716)    &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11816" PostHistoryTypeId="5" PostId="3147" RevisionGUID="1a58945c-b488-433f-9b76-5667de603d5b" CreationDate="2022-06-09T13:06:17.033" UserId="2713" Comment="added 1 character in body" Text="After upgrading to Polkadot v0.9.23 from v0.9.16, I am missing the default &quot;start up&quot; message (WS/RPC connections, hardware, para-id etc, see below) when initiating the node client, both for the parachain as well as the standalone clients.&#xD;&#xA;&#xD;&#xA;Exemplary command&#xD;&#xA;```&#xD;&#xA;cargo run --release --bin my-runtime -- --dev --tmp --validator  --ws-port=9944 --port 30044 --alice --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --unsafe-rpc-external&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;First, I thought I would need to add something to my command, e.g. enabling a non-default log-level for `sc-service` or similar pallets. Unfortunately, that did not succeed. However, my default command (without any non-default logs) produces the missing log message for all Substrate/Polkadot/Cumulus repositories.&#xD;&#xA;&#xD;&#xA;I triple-checked the differences between my client and the templates and could not find any unexpected divergences. I was hoping that someone here had a similar issue or could provide me with any kind of hint. Thanks in advance!&#xD;&#xA;&#xD;&#xA;_Expectation_: Heres an exemplary message from the Polkadot binary when executing the above command with `bin=polkadot` in the Polkadot repository:&#xD;&#xA;```&#xD;&#xA;2022-06-09 14:00:05  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-06-09 14:00:05   Local node identity is: 12D3KooWLtiot9DJov5WMKRbiTxRY9r5CvZCiePsAUmRJXFnnmis    &#xD;&#xA;2022-06-09 14:00:05  Operating system: linux    &#xD;&#xA;2022-06-09 14:00:05  CPU architecture: x86_64    &#xD;&#xA;2022-06-09 14:00:05  Target environment: gnu    &#xD;&#xA;2022-06-09 14:00:05  CPU: 12th Gen Intel(R) Core(TM) i9-12900K    &#xD;&#xA;2022-06-09 14:00:05  CPU cores: 16    &#xD;&#xA;2022-06-09 14:00:05  Memory: 128628MB    &#xD;&#xA;2022-06-09 14:00:05  Kernel: 5.13.0-35-generic    &#xD;&#xA;2022-06-09 14:00:05  Linux distribution: Ubuntu 20.04.4 LTS    &#xD;&#xA;2022-06-09 14:00:05  Virtual machine: no    &#xD;&#xA;2022-06-09 14:00:05  Highest known block at #0    &#xD;&#xA;2022-06-09 14:00:05 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-06-09 14:00:05 Running JSON-RPC HTTP server: addr=0.0.0.0:9933, allowed origins=None    &#xD;&#xA;2022-06-09 14:00:05 Running JSON-RPC WS server: addr=0.0.0.0:40044, allowed origins=None    &#xD;&#xA;2022-06-09 14:00:05  CPU score: 1375MB/s    &#xD;&#xA;2022-06-09 14:00:05  Memory score: 14784MB/s    &#xD;&#xA;2022-06-09 14:00:05  Disk score (seq. writes): 2515MB/s    &#xD;&#xA;2022-06-09 14:00:05  Disk score (rand. writes): 968MB/s    &#xD;&#xA;2022-06-09 14:00:05  Starting BABE Authorship worker    &#xD;&#xA;2022-06-09 14:00:07  Starting consensus session on top of parent 0xd2d8af4849031dacb13979ea8ad0d84ce97e5395df6bc6df6bbea0791bc16a0d    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;_Reality_&#xD;&#xA;```&#xD;&#xA;2022-06-09 14:55:20 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-06-09 14:55:24  Starting consensus session on top of parent 0x9a91c757c54d50b9717263ce02540704ff89b609c1d92905cb697b4f3790f012    &#xD;&#xA;2022-06-09 14:55:24  Prepared block for proposing at 1 (1 ms) [hash: 0xac75a665ebcfca9ace85eb92ae36dc4fa3a4643903f5afc89888c11ccc8059d7; parent_hash: 0x9a91…f012; extrinsics (1): [0x64eb…f8b3]]    &#xD;&#xA;2022-06-09 14:55:24  Pre-sealed block for proposal at 1. Hash now 0x9c716b73f6767e192ee642108f51225d7fa042cad0fdb0291027c301a973c716, previously 0xac75a665ebcfca9ace85eb92ae36dc4fa3a4643903f5afc89888c11ccc8059d7.    &#xD;&#xA;2022-06-09 14:55:24 ✨ Imported #1 (0x9c71…c716)    &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11817" PostHistoryTypeId="5" PostId="3147" RevisionGUID="1aef6d6b-630b-43ba-a23a-fe2dfe7ac34c" CreationDate="2022-06-09T13:09:37.303" UserId="2713" Comment="added 373 characters in body" Text="After upgrading to Polkadot v0.9.23 from v0.9.16, I am missing the default &quot;start up&quot; message (WS/RPC connections, hardware, para-id etc, see below) when initiating the node client, both for the parachain as well as the standalone clients.&#xD;&#xA;&#xD;&#xA;Exemplary command&#xD;&#xA;```&#xD;&#xA;cargo run --release --bin my-runtime -- --dev --tmp --validator  --ws-port=9944 --port 30044 --alice --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --unsafe-rpc-external&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;First, I thought I would need to add something to my command, e.g. enabling a non-default log-level for `sc-service` or similar pallets. Unfortunately, that did not succeed. However, my default command (without any non-default logs) produces the missing log message for all Substrate/Polkadot/Cumulus repositories.&#xD;&#xA;&#xD;&#xA;I triple-checked the differences between my client and the templates and could not find any unexpected divergences. I was hoping that someone here had a similar issue or could provide me with any kind of hint. Thanks in advance!&#xD;&#xA;&#xD;&#xA;_Expectation_: Heres an exemplary message from the Polkadot binary when executing the above command with `bin=polkadot` in the Polkadot repository:&#xD;&#xA;```&#xD;&#xA;     Running `target/release/polkadot --dev --tmp --validator --ws-port=9944 --port 30033 --alice --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --unsafe-rpc-external&#xD;&#xA;2022-06-09 14:00:05  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-06-09 14:00:05   Local node identity is: 12D3KooWLtiot9DJov5WMKRbiTxRY9r5CvZCiePsAUmRJXFnnmis    &#xD;&#xA;2022-06-09 14:00:05  Operating system: linux    &#xD;&#xA;2022-06-09 14:00:05  CPU architecture: x86_64    &#xD;&#xA;2022-06-09 14:00:05  Target environment: gnu    &#xD;&#xA;2022-06-09 14:00:05  CPU: 12th Gen Intel(R) Core(TM) i9-12900K    &#xD;&#xA;2022-06-09 14:00:05  CPU cores: 16    &#xD;&#xA;2022-06-09 14:00:05  Memory: 128628MB    &#xD;&#xA;2022-06-09 14:00:05  Kernel: 5.13.0-35-generic    &#xD;&#xA;2022-06-09 14:00:05  Linux distribution: Ubuntu 20.04.4 LTS    &#xD;&#xA;2022-06-09 14:00:05  Virtual machine: no    &#xD;&#xA;2022-06-09 14:00:05  Highest known block at #0    &#xD;&#xA;2022-06-09 14:00:05 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-06-09 14:00:05 Running JSON-RPC HTTP server: addr=0.0.0.0:9933, allowed origins=None    &#xD;&#xA;2022-06-09 14:00:05 Running JSON-RPC WS server: addr=0.0.0.0:40044, allowed origins=None    &#xD;&#xA;2022-06-09 14:00:05  CPU score: 1375MB/s    &#xD;&#xA;2022-06-09 14:00:05  Memory score: 14784MB/s    &#xD;&#xA;2022-06-09 14:00:05  Disk score (seq. writes): 2515MB/s    &#xD;&#xA;2022-06-09 14:00:05  Disk score (rand. writes): 968MB/s    &#xD;&#xA;2022-06-09 14:00:05  Starting BABE Authorship worker    &#xD;&#xA;2022-06-09 14:00:07  Starting consensus session on top of parent 0xd2d8af4849031dacb13979ea8ad0d84ce97e5395df6bc6df6bbea0791bc16a0d    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-06-09 14:00:07 ParentBlockRandomness did not provide entropy   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;_Reality_&#xD;&#xA;```&#xD;&#xA;     Running `target/release/helloworld --dev --tmp --validator --ws-port=9944 --port 30033 --alice --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --unsafe-rpc-external`&#xD;&#xA;2022-06-09 14:55:20 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-06-09 14:55:24  Starting consensus session on top of parent 0x9a91c757c54d50b9717263ce02540704ff89b609c1d92905cb697b4f3790f012    &#xD;&#xA;2022-06-09 14:55:24  Prepared block for proposing at 1 (1 ms) [hash: 0xac75a665ebcfca9ace85eb92ae36dc4fa3a4643903f5afc89888c11ccc8059d7; parent_hash: 0x9a91…f012; extrinsics (1): [0x64eb…f8b3]]    &#xD;&#xA;2022-06-09 14:55:24  Pre-sealed block for proposal at 1. Hash now 0x9c716b73f6767e192ee642108f51225d7fa042cad0fdb0291027c301a973c716, previously 0xac75a665ebcfca9ace85eb92ae36dc4fa3a4643903f5afc89888c11ccc8059d7.    &#xD;&#xA;2022-06-09 14:55:24 ✨ Imported #1 (0x9c71…c716)  &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11819" PostHistoryTypeId="5" PostId="3123" RevisionGUID="9de540ad-4067-4b14-b4c4-3181b82932be" CreationDate="2022-06-09T14:32:26.477" UserId="494" Comment="improved contextualisation" Text="After a runtime upgrade on Frontier, these warnings are logged:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UrRxO.png&#xD;&#xA;&#xD;&#xA;Does anything need to be done regarding these? Do they mean some kind of storage migration is necessary?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11820" PostHistoryTypeId="24" PostId="3123" RevisionGUID="9de540ad-4067-4b14-b4c4-3181b82932be" CreationDate="2022-06-09T14:32:26.477" Comment="Proposed by 494 approved by -1 edit id of 214" ContentLicense="CC BY-SA 4.0" />
  <row Id="11821" PostHistoryTypeId="5" PostId="3123" RevisionGUID="d983fd38-bd9e-45a5-9895-37494160f537" CreationDate="2022-06-09T14:32:26.477" UserId="244" Comment="improved contextualisation" Text="After a runtime upgrade on Frontier, these warnings are logged:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UrRxO.png&#xD;&#xA;&#xD;&#xA;In this case, the pallets are related to Frontier only, but that seems possible for any FRAME pallets.&#xD;&#xA;&#xD;&#xA;Does anything need to be done regarding these warnings? Do they mean some kind of storage migration is necessary?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11822" PostHistoryTypeId="2" PostId="3148" RevisionGUID="d5e7f2c2-13a2-423e-9a3c-f1de5579c455" CreationDate="2022-06-09T14:45:41.973" UserId="2713" Text="I was wondering why the Polkadot JS Apps are not displaying a remark when executed via Root (e.g., sudo) origin?&#xD;&#xA;&#xD;&#xA;Is there any way to view the remark this way? I am interested for the case of voting on a remark in a referendum.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11824" PostHistoryTypeId="1" PostId="3148" RevisionGUID="d5e7f2c2-13a2-423e-9a3c-f1de5579c455" CreationDate="2022-06-09T14:45:41.973" UserId="2713" Text="Why is remark not shown when executed with Root?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11825" PostHistoryTypeId="3" PostId="3148" RevisionGUID="d5e7f2c2-13a2-423e-9a3c-f1de5579c455" CreationDate="2022-06-09T14:45:41.973" UserId="2713" Text="|polkadot-js|sudo|root|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11826" PostHistoryTypeId="2" PostId="3149" RevisionGUID="cddd5dec-c47c-4cb5-bca9-bf883d2e4bcc" CreationDate="2022-06-09T15:05:44.190" UserId="251" Text="I think you should use `remark_with_event`. Otherwise, you can not see the event.&#xD;&#xA;&#xD;&#xA;Can this answer your question?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11828" PostHistoryTypeId="2" PostId="3150" RevisionGUID="784a2b1d-8ae9-448f-a4ec-f523b89dc84d" CreationDate="2022-06-09T15:14:51.860" UserId="2634" Text="when i study  substrate-docs/v3/tutorials/03-permissioned-network  &#xD;&#xA;https://github.com/substrate-developer-hub/substrate-docs/blob/main/v3/tutorials/03-permissioned-network/index.mdx&#xD;&#xA;&#xD;&#xA;success : start Alice node&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--chain=local \&#xD;&#xA;--base-path /tmp/validator1 \&#xD;&#xA;--alice \&#xD;&#xA;--node-key=c12b6d18942f5ee8528c8e2baf4e147b5c5c18710926ea492d09cbd9f6c9f82a \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9944  &#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;but when i switch from polkadot to Local Node - 127.0.0.1:9944 by chrome&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Alice node terminal generate an error : Origin denied: http://localhost:3000&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;so can't switch to local node forever !!&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6qcsO.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/TrytL.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/msA9L.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/WEySn.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="11830" PostHistoryTypeId="1" PostId="3150" RevisionGUID="784a2b1d-8ae9-448f-a4ec-f523b89dc84d" CreationDate="2022-06-09T15:14:51.860" UserId="2634" Text="error : Origin denied: http://localhost:3000 , when i switch to local Alice node by chrome" ContentLicense="CC BY-SA 4.0" />
  <row Id="11831" PostHistoryTypeId="3" PostId="3150" RevisionGUID="784a2b1d-8ae9-448f-a4ec-f523b89dc84d" CreationDate="2022-06-09T15:14:51.860" UserId="2634" Text="|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11832" PostHistoryTypeId="5" PostId="3083" RevisionGUID="e5c26227-2fd0-4046-90d7-619edb74e5c0" CreationDate="2022-06-09T15:33:16.693" UserId="1861" Comment="added 1 character in body" Text="`#[pallet::storage]` creates a `pub fn amendment() -&gt; Amendment&lt;_&gt; { .. }` which leaks `Amendment&lt;_&gt;` which is according to your definition a narrower public scope.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/support/procedural/src/pallet/expand/storage.rs#L288&#xD;&#xA;&#xD;&#xA;`pub(super) Amendment` must become `pub Amendment` to resolve this." ContentLicense="CC BY-SA 4.0" />
  <row Id="11833" PostHistoryTypeId="2" PostId="3151" RevisionGUID="48a2b12a-d281-4341-9fb6-fc67f4211829" CreationDate="2022-06-09T16:03:25.097" UserId="2408" Text="In my contract I want to store addresses of all users who called a specific function of the contract. For that purpose I use &#xD;&#xA;```&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Postbox {&#xD;&#xA;        --snip--&#xD;&#xA;        // Accounts of members;&#xD;&#xA;        members: Vec&lt;AccountId&gt;,&#xD;&#xA;        --snip--&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;storage struct.&#xD;&#xA;&#xD;&#xA;But at compile time it throws about 30 errors like:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the size for values of type `__ink_EventBase` cannot be known at compilation time&#xD;&#xA;&#xD;&#xA;   |&#xD;&#xA;8  | #[ink::contract]&#xD;&#xA;   | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time&#xD;&#xA;   |&#xD;&#xA;   = help: the trait `Sized` is not implemented for `__ink_EventBase`&#xD;&#xA;```&#xD;&#xA;I figured out that this `members` vector was causing it. Ok, maybe `AccountId` does not have a fixed size at compile time.  &#xD;&#xA;But what other data collection should I use _instead of `Vec`_ to simply store a bunch of Addresses? " ContentLicense="CC BY-SA 4.0" />
  <row Id="11835" PostHistoryTypeId="1" PostId="3151" RevisionGUID="48a2b12a-d281-4341-9fb6-fc67f4211829" CreationDate="2022-06-09T16:03:25.097" UserId="2408" Text="Vec&lt;AccountId&gt; breaks compilation of ink! contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="11836" PostHistoryTypeId="3" PostId="3151" RevisionGUID="48a2b12a-d281-4341-9fb6-fc67f4211829" CreationDate="2022-06-09T16:03:25.097" UserId="2408" Text="|ink|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11837" PostHistoryTypeId="10" PostId="3150" RevisionGUID="d82de8b2-55d4-4f9f-8eec-432faf4609c2" CreationDate="2022-06-09T16:03:48.293" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[2443],&quot;Voters&quot;:[{&quot;Id&quot;:380,&quot;DisplayName&quot;:&quot;forgetso&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="11838" PostHistoryTypeId="5" PostId="3151" RevisionGUID="a6ad8983-ce8a-4af7-b417-cb968c5a9492" CreationDate="2022-06-09T16:08:56.803" UserId="2408" Comment="added 10 characters in body" Text="In my contract I want to store addresses of all users who called a specific function of the contract. For that purpose I use &#xD;&#xA;```&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Postbox {&#xD;&#xA;        --snip--&#xD;&#xA;        // Accounts of members;&#xD;&#xA;        members: Vec&lt;AccountId&gt;,&#xD;&#xA;        --snip--&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;storage struct.&#xD;&#xA;&#xD;&#xA;But at compile time it throws about 30 errors like:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the size for values of type `__ink_EventBase` cannot be known at compilation time&#xD;&#xA;&#xD;&#xA;   |&#xD;&#xA;8  | #[ink::contract]&#xD;&#xA;   | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time&#xD;&#xA;   |&#xD;&#xA;   = help: the trait `Sized` is not implemented for `__ink_EventBase`&#xD;&#xA;```&#xD;&#xA;I figured out that this `members` vector was causing it. I've changed contained type from `AccountId` to just `i32` and the error was still there.  &#xD;&#xA;Does it mean that I can't use `Vec` in storage? Why?  &#xD;&#xA;What should I use instead then?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11839" PostHistoryTypeId="2" PostId="3152" RevisionGUID="70c21bba-f938-4090-a1ff-2471dc8cba88" CreationDate="2022-06-09T16:40:09.913" UserId="2408" Text="I've been trying to use most common&#xD;&#xA;```&#xD;&#xA;let mut rng = rand::thread_rng();&#xD;&#xA;let winner_pos = rng.gen_range(0..10);&#xD;&#xA;```&#xD;&#xA;way to get a random number and use it in one of the contract's messages. But it throws a bunch of errors like:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the size for values of type `u128` cannot be known at compilation time&#xD;&#xA;   |&#xD;&#xA;26 |         bids: ink_storage::Mapping&lt;AccountId, Balance&gt;,&#xD;&#xA;   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time&#xD;&#xA;```&#xD;&#xA;which are pretty misleading.&#xD;&#xA;&#xD;&#xA;What is an alternative way to generate a random number then?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11841" PostHistoryTypeId="1" PostId="3152" RevisionGUID="70c21bba-f938-4090-a1ff-2471dc8cba88" CreationDate="2022-06-09T16:40:09.913" UserId="2408" Text="Generating random numbers in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="11842" PostHistoryTypeId="3" PostId="3152" RevisionGUID="70c21bba-f938-4090-a1ff-2471dc8cba88" CreationDate="2022-06-09T16:40:09.913" UserId="2408" Text="|ink|random|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11843" PostHistoryTypeId="2" PostId="3153" RevisionGUID="09dbbea1-4424-413b-8f96-633349247e77" CreationDate="2022-06-09T16:41:31.643" UserId="2408" Text="Ah, I just had to explicitely import `ink_prelude::vec::Vec` for that." ContentLicense="CC BY-SA 4.0" />
  <row Id="11845" PostHistoryTypeId="4" PostId="3146" RevisionGUID="62c93745-5e17-4010-8b1f-2cf9dc65c54a" CreationDate="2022-06-09T16:44:01.163" UserId="3" Comment="edited title" Text="On-chain storage version on new chain seems to be incorrect" ContentLicense="CC BY-SA 4.0" />
  <row Id="11846" PostHistoryTypeId="2" PostId="3154" RevisionGUID="05c2ec8c-809c-43fb-8701-4ed3a99c1a93" CreationDate="2022-06-09T17:04:58.790" UserId="450" Text="We're running the NPoS chain with Aura, Grandpa instead of Babe.&#xD;&#xA;&#xD;&#xA;We've just upgraded our solochain. In this upgrade, we changed `pallet_election_provider_multi_phase::Config::Fallback=BoundedExecution` instead of `NoFallback`. &#xD;&#xA;&#xD;&#xA;Due to unfortunate incident while upgrading, the chain stopped producing blocks. However, after solving the incident, the chain continues as normal (thanks to Aura, this is the reason why we choose Aura instead of Babe in the first place). And we know for sure that the staking election will fail because we've encountered this problem before because of the same incident. Back then `NoFallback` is used, the chain stopped working until we solve it by submit election solution through `setEmergencyElectionResult` (thanks to the documentation [here][1]).&#xD;&#xA;&#xD;&#xA;In the new upgrade, we use `BoundedExecution` as in this [pull request][2]. `BoundedExecution` fallback helps the chain to continue to function even when the `staking.StakingElectionFailed`.&#xD;&#xA;&#xD;&#xA;My question is: Can we bring the staking election back to normal instead of relying on `BoundedExecution` fallback?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/index.html#emergency-phase&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/pull/10905" ContentLicense="CC BY-SA 4.0" />
  <row Id="11848" PostHistoryTypeId="1" PostId="3154" RevisionGUID="05c2ec8c-809c-43fb-8701-4ed3a99c1a93" CreationDate="2022-06-09T17:04:58.790" UserId="450" Text="How to recover to normal election from `staking.StakingElectionFailed` with `Fallback = BoundedExecution`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11849" PostHistoryTypeId="3" PostId="3154" RevisionGUID="05c2ec8c-809c-43fb-8701-4ed3a99c1a93" CreationDate="2022-06-09T17:04:58.790" UserId="450" Text="|substrate-node|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11850" PostHistoryTypeId="5" PostId="3154" RevisionGUID="54152e9a-1b50-492f-9c11-a369275b082a" CreationDate="2022-06-09T17:53:01.250" UserId="450" Comment="added 265 characters in body" Text="We're running the NPoS chain with Aura, Grandpa instead of Babe.&#xD;&#xA;&#xD;&#xA;We've just upgraded our solochain. In this upgrade, we changed `pallet_election_provider_multi_phase::Config::Fallback=BoundedExecution` instead of `NoFallback`. &#xD;&#xA;&#xD;&#xA;Due to unfortunate incident while upgrading, the chain stopped producing blocks. However, after solving the incident, the chain continues as normal (thanks to Aura, this is the reason why we choose Aura instead of Babe in the first place). And we know for sure that the staking election will fail because we've encountered this problem before because of the same incident. Back then `NoFallback` is used, the chain stopped working until we solve it by submit election solution through `setEmergencyElectionResult` (thanks to the documentation [here][1]).&#xD;&#xA;&#xD;&#xA;In the new upgrade, we use `BoundedExecution` as in this [pull request][2]. `BoundedExecution` fallback helps the chain to continue to function even when the `staking.StakingElectionFailed`.&#xD;&#xA;&#xD;&#xA;My question is: Can we bring the staking election back to normal instead of relying on `BoundedExecution` fallback?&#xD;&#xA;&#xD;&#xA;Logs&#xD;&#xA;```&#xD;&#xA;[1840200]  generated 0 npos voters, 0 from validators and 0 nominators&#xD;&#xA;[#1840200]  Finalized election round with compute Fallback.&#xD;&#xA;[1840200]  chain does not have enough staking candidates to operate for era 1530 (0 elected, minimum is 3)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/pallet_election_provider_multi_phase/index.html#emergency-phase&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/pull/10905" ContentLicense="CC BY-SA 4.0" />
  <row Id="11851" PostHistoryTypeId="2" PostId="3155" RevisionGUID="77d3ce9b-246a-42f4-a2ed-34f6202dba88" CreationDate="2022-06-09T18:02:26.300" UserId="450" Text="I got a problem with upgrading my chain&#xD;&#xA;&#xD;&#xA;I've upgraded my chain from version A (Client+runtime) to version B (Client+runtime). I remove some host functions in client version B because runtime version B don't need that anymore.&#xD;&#xA;&#xD;&#xA;The upgrade proceeds as follows:&#xD;&#xA;&#xD;&#xA;1. I upgrade the runtime first and there is no problem. The chain continues to function.&#xD;&#xA;2. I upgrade the client later and the problem happened.&#xD;&#xA;&#xD;&#xA;I have 4 nodes: 3 validator nodes and 1 public RPC node.&#xD;&#xA;After upgrading the client, 3 validators still function normally. Blocks are still being produced. However, it's RPC node the problem.&#xD;&#xA;&#xD;&#xA;The RPC node runs with this message in the log `Cannot create a runtime error=Other(\&quot;runtime requires function imports which are not present on the host: (the list of host functions I already removed)`. After some time, the RPC node stops to receive external websocket connections, and after some time, it automatically restarts. And the loop continues. the RPC node still able to import blocks from the network while it's running.&#xD;&#xA;&#xD;&#xA;I upgrade the substrate version from polkadot-v0.9.18 to polkadot-v0.9.22. And it's a solochain only.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11853" PostHistoryTypeId="1" PostId="3155" RevisionGUID="77d3ce9b-246a-42f4-a2ed-34f6202dba88" CreationDate="2022-06-09T18:02:26.300" UserId="450" Text="RPC node encounter `Cannot create a runtime error=Other(\&quot;runtime requires function imports which are not present on the host:` after upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="11854" PostHistoryTypeId="3" PostId="3155" RevisionGUID="77d3ce9b-246a-42f4-a2ed-34f6202dba88" CreationDate="2022-06-09T18:02:26.300" UserId="450" Text="|substrate-node|runtime-upgrade|client|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11855" PostHistoryTypeId="2" PostId="3156" RevisionGUID="a5da3f5d-5d2f-446d-b2d1-eca599d8039e" CreationDate="2022-06-09T18:58:49.817" UserId="380" Text="You can call `self.env.random()` to get the random seed associated with the block. However, any commitments using this [must be implemented in previous blocks](https://github.com/paritytech/ink/issues/868#issuecomment-886151547).&#xD;&#xA;&#xD;&#xA;For example, if you're contract offered betting on the outcome of a dice roll, you would need to ask the bettors to bet at block `n`. The outcome of the bet is then calculated at block `n+2` using `self.env.random()` to generate the dice roll outcome. The value of `self.env.random()` at block `n+2` can be used because it was unknown at block `n`.&#xD;&#xA;&#xD;&#xA;If you're trying to generate a random number between a min and a max, you can use something [like this](https://github.com/prosopo-io/protocol/blob/c56b61987be7a6929e81dcd1eaa182b522d2248e/contracts/lib.rs#L1315-L13220). In this example, the user account is passed to `self.env.random()` to create additional randomness." ContentLicense="CC BY-SA 4.0" />
  <row Id="11857" PostHistoryTypeId="2" PostId="3157" RevisionGUID="1333e66a-33ec-49d1-86c9-3ea1f43bcecb" CreationDate="2022-06-09T18:59:06.173" UserId="711" Text="Currently across the substrate code base, there are a lot of PRs updating storage items to bounded forms, example: https://github.com/paritytech/substrate/pull/11591/&#xD;&#xA;&#xD;&#xA;I am wondering what is the behavior if say a we are changing storage of ```Vec&lt;T&gt;``` that has 11 items into a ```BoundedVec&lt;T, I&gt;``` that only allows ten items? Does ```BoundedVec&lt;T,I&gt;``` truncate the value leaving the last value inaccessible via the high level storage abstraction? Does there need to be a runtime migration for cases such as this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11859" PostHistoryTypeId="1" PostId="3157" RevisionGUID="1333e66a-33ec-49d1-86c9-3ea1f43bcecb" CreationDate="2022-06-09T18:59:06.173" UserId="711" Text="Do changes from unbounded to bounded storage need runtime migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11860" PostHistoryTypeId="3" PostId="3157" RevisionGUID="1333e66a-33ec-49d1-86c9-3ea1f43bcecb" CreationDate="2022-06-09T18:59:06.173" UserId="711" Text="|runtime|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11861" PostHistoryTypeId="2" PostId="3158" RevisionGUID="5f68a146-c0e0-4a4a-8591-2a16cb9c09d7" CreationDate="2022-06-09T19:40:48.250" UserId="711" Text="There has been a long time goal to move all storage to bounded forms in runtime. I can see that having bounded size limits of all the storage items can be useful to give some guarantees for storage related operations. I am curious what are the specifics of the motivation behind this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11863" PostHistoryTypeId="1" PostId="3158" RevisionGUID="5f68a146-c0e0-4a4a-8591-2a16cb9c09d7" CreationDate="2022-06-09T19:40:48.250" UserId="711" Text="What is the point of making all storage explicitly bounded?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11864" PostHistoryTypeId="3" PostId="3158" RevisionGUID="5f68a146-c0e0-4a4a-8591-2a16cb9c09d7" CreationDate="2022-06-09T19:40:48.250" UserId="711" Text="|runtime|pov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11865" PostHistoryTypeId="2" PostId="3159" RevisionGUID="29b9709c-e438-470a-87e0-c249c0c7b404" CreationDate="2022-06-09T19:41:58.487" UserId="167" Text="In short, if the bounds being introduced are all known to be respected, they don't. &#xD;&#xA;&#xD;&#xA;`BoundedVec` encodes exactly the same as a normal `Vec` (namely based on [being derived](https://github.com/paritytech/substrate/blob/81c3d9e594668a32935a5eb7ce546912251aced6/frame/support/src/storage/bounded_vec.rs#L46)). TO go a bit deeper, the bound is encoded in the type, as an associated `Get` type, which only a compile-time matter.&#xD;&#xA;&#xD;&#xA;That being said, if any of the values that already exist in storage violate the bound, then bound, then the `Decode` implementation of `BoundedVec` [fails](https://github.com/paritytech/substrate/blob/81c3d9e594668a32935a5eb7ce546912251aced6/frame/support/src/storage/bounded_vec.rs#L160), and the storage item cannot be accessed. In these cases, `None` or `Default::default()` are returned. For these values, a migration is needed. " ContentLicense="CC BY-SA 4.0" />
  <row Id="11867" PostHistoryTypeId="2" PostId="3160" RevisionGUID="61ef9f9f-3cbd-4bbe-8294-b98f6478d082" CreationDate="2022-06-09T19:44:24.730" UserId="494" Text="Are you sure that `sig` you're getting from `value.get(1).unwrap()` is correct?&#xD;&#xA;&#xD;&#xA;[documentation](https://docs.rs/sp-runtime/6.0.0/sp_runtime/testing/sr25519/struct.Signature.html) on `from_slice` says the following:&#xD;&#xA;&gt; A new instance from the given slice that should be 64 bytes long.&#xD;&#xA;&gt; NOTE: No checking goes on to ensure this is a real signature. Only use it if you are certain that the array actually is a signature. GIGO!&#xD;&#xA;&#xD;&#xA;also, checking your code:&#xD;&#xA;```&#xD;&#xA;let sig = &quot;f2f7211fcc2204dc3fa50cf1aca98b7c49c82510efbc84fd808b46c459069017db7a47acf4040d1cc0363eb5e3416c197e15fd2439e70a69dcdfa2eb8b520280&quot;;&#xD;&#xA;println!(&quot;{}&quot;, sig.as_bytes().len());&#xD;&#xA;```&#xD;&#xA;prints out `128`, which is 2x the expected.&#xD;&#xA;&#xD;&#xA;if I cut it down to half:&#xD;&#xA;```&#xD;&#xA;    let sig = &quot;f2f7211fcc2204dc3fa50cf1aca98b7c49c82510efbc84fd808b46c459069017&quot;;&#xD;&#xA;    let signature = Signature::from_slice(sig.as_bytes());&#xD;&#xA;    println!(&quot;{:?}&quot;, signature);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get:&#xD;&#xA;&#xD;&#xA;`Some(66326637323131666363323230346463336661353063663161636139386237633439633832353130656662633834666438303862343663343539303639303137)&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;Which doesn't necessarily mean that you should also cut down in half whatever is coming from `value.get(1).unwrap()`. But it does mean that for some reason, this value is 2x bigger than a correct signature would be." ContentLicense="CC BY-SA 4.0" />
  <row Id="11869" PostHistoryTypeId="5" PostId="3160" RevisionGUID="e67dad1a-158a-4713-8dd7-f54804a797c7" CreationDate="2022-06-09T19:51:18.557" UserId="494" Comment="deleted 12 characters in body" Text="Are you sure that `sig` you're getting from `value.get(1).unwrap()` is correct?&#xD;&#xA;&#xD;&#xA;[documentation](https://docs.rs/sp-runtime/6.0.0/sp_runtime/testing/sr25519/struct.Signature.html) on `from_slice` says the following:&#xD;&#xA;&gt; A new instance from the given slice that should be 64 bytes long.&#xD;&#xA;&gt; NOTE: No checking goes on to ensure this is a real signature. Only use it if you are certain that the array actually is a signature. GIGO!&#xD;&#xA;&#xD;&#xA;also, checking your code:&#xD;&#xA;```&#xD;&#xA;let sig = &quot;f2f7211fcc2204dc3fa50cf1aca98b7c49c82510efbc84fd808b46c459069017db7a47acf4040d1cc0363eb5e3416c197e15fd2439e70a69dcdfa2eb8b520280&quot;;&#xD;&#xA;println!(&quot;{}&quot;, sig.as_bytes().len());&#xD;&#xA;```&#xD;&#xA;prints out `128`, which is 2x the expected.&#xD;&#xA;&#xD;&#xA;if I cut it down to half:&#xD;&#xA;```&#xD;&#xA;let sig = &quot;f2f7211fcc2204dc3fa50cf1aca98b7c49c82510efbc84fd808b46c459069017&quot;;&#xD;&#xA;let signature = Signature::from_slice(sig.as_bytes());&#xD;&#xA;println!(&quot;{:?}&quot;, signature);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get:&#xD;&#xA;&#xD;&#xA;`Some(66326637323131666363323230346463336661353063663161636139386237633439633832353130656662633834666438303862343663343539303639303137)&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;Which doesn't necessarily mean that you should also cut down in half whatever is coming from `value.get(1).unwrap()`. But it does mean that for some reason, this value is 2x bigger than a correct signature would be." ContentLicense="CC BY-SA 4.0" />
  <row Id="11870" PostHistoryTypeId="2" PostId="3161" RevisionGUID="b786893f-c150-4b6e-814f-b3bf7df64959" CreationDate="2022-06-09T19:51:46.487" UserId="73" Text="For standalone chains making the storage bounded isn't that important. However, for Parachains it is really important. When building a PoV, you always need to take the PoV size into account to not run over the allowed maximum. By making the storage items bounded, you can estimate the worst case size of the PoV after applying a transaction. So, you can reject a transaction early that wouldn't fit anymore into the current block." ContentLicense="CC BY-SA 4.0" />
  <row Id="11872" PostHistoryTypeId="2" PostId="3162" RevisionGUID="d9ab9cc7-61f6-4247-9145-a95ab4d17f92" CreationDate="2022-06-09T19:54:25.593" UserId="73" Text="After you have once introduced a host function that was used by any runtime, you can not remove it. For future blocks that are using the new runtime, this isn't a problem, because as you already said you will not use the host functions anymore. However, for all nodes that want to sync from genesis or that need to answer runtime api requests of older blocks (like a RPC node), they still need the old host functions." ContentLicense="CC BY-SA 4.0" />
  <row Id="11874" PostHistoryTypeId="2" PostId="3163" RevisionGUID="fe10493c-754e-46bd-ac69-b51f477b118c" CreationDate="2022-06-09T20:08:13.957" UserId="494" Text="Whenever a runtime upgrade happens, if the runtime contains some pallet that implements `on_runtime_upgrade` (like `ethereum` pallet [does](https://github.com/paritytech/frontier/blob/c2b56a8f3097826c85f23a16b744cec99335530d/frame/ethereum/src/lib.rs#L273)), these warnings will show up.&#xD;&#xA;&#xD;&#xA;These warnings can be safely ignored. They do not mean a storage migration is needed." ContentLicense="CC BY-SA 4.0" />
  <row Id="11876" PostHistoryTypeId="2" PostId="3164" RevisionGUID="7b9706c2-4280-45c8-be78-b3f1593d8f9e" CreationDate="2022-06-09T23:35:44.427" UserId="2714" Text="I'm pretty new to substrate + polkadot and I am trying to develop my own super simple relay chain from the node template (https://github.com/substrate-developer-hub/substrate-node-template). Right now, I am just trying to implement the hrmp protocol for xcm messaging between relay chain and future parachains. Anyone with any ideas how to approach this? I am currently looking at polkadot source code and trying to add the &#xD;&#xA;&#xD;&#xA;```Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event&lt;T&gt;, Config} = 60,``` &#xD;&#xA;&#xD;&#xA;line from ```polkadot/runtime/polkadot/src/lib.rs``` to my ```substrate-node-template/runtime/lib.rs```. I tried to add all the dependencies but I just get too many dependency errors to manage." ContentLicense="CC BY-SA 4.0" />
  <row Id="11878" PostHistoryTypeId="1" PostId="3164" RevisionGUID="7b9706c2-4280-45c8-be78-b3f1593d8f9e" CreationDate="2022-06-09T23:35:44.427" UserId="2714" Text="How to write super simple custom relay chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="11879" PostHistoryTypeId="3" PostId="3164" RevisionGUID="7b9706c2-4280-45c8-be78-b3f1593d8f9e" CreationDate="2022-06-09T23:35:44.427" UserId="2714" Text="|polkadot|xcmp|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11880" PostHistoryTypeId="2" PostId="3165" RevisionGUID="404be445-1856-47c4-98ac-4846ce986426" CreationDate="2022-06-10T02:32:17.963" UserId="590" Text="My understanding is that when a transaction arrives it gets validated against all signed extensions. If the transaction is valid it then moves into the ready queue or future queue depending on the result, [ValidTransaction][1], after executing [validate][2].&#xD;&#xA;&#xD;&#xA;Transactions that get put in the ready queue are gossiped and are used to build a block.&#xD;&#xA;&#xD;&#xA;When building the block, the transaction runs all pre-dispatch functions. This [pre-dispatch][3] function also re-validates the transaction before executing it.&#xD;&#xA;&#xD;&#xA;Can you please explain the lifecycle after a transaction becomes invalid in pre-dispatch? &#xD;&#xA; - Does it get put back in the future queue, verifying queue, or get dropped?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_runtime/transaction_validity/struct.ValidTransaction.html&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/a200cdb93c6af5763b9c7bf313fa708764ac88ca/primitives/runtime/src/traits.rs#L720&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/monthly-2021-09+1/sp_runtime/traits/trait.SignedExtension.html#method.pre_dispatch" ContentLicense="CC BY-SA 4.0" />
  <row Id="11882" PostHistoryTypeId="1" PostId="3165" RevisionGUID="404be445-1856-47c4-98ac-4846ce986426" CreationDate="2022-06-10T02:32:17.963" UserId="590" Text="Transaction pool and Signed Extension Pre dispatch" ContentLicense="CC BY-SA 4.0" />
  <row Id="11883" PostHistoryTypeId="3" PostId="3165" RevisionGUID="404be445-1856-47c4-98ac-4846ce986426" CreationDate="2022-06-10T02:32:17.963" UserId="590" Text="|transactions|weight|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11884" PostHistoryTypeId="5" PostId="3165" RevisionGUID="c2bf3ef2-7eec-4962-a2d0-38f1fb26b56b" CreationDate="2022-06-10T02:39:26.237" UserId="590" Comment="added 179 characters in body" Text="My understanding is that when a transaction arrives it gets validated against all signed extensions. If the transaction is valid it then moves into the ready queue or future queue depending on the result, [ValidTransaction][1], after executing [validate][2].&#xD;&#xA;&#xD;&#xA;Transactions that get put in the ready queue are gossiped and are used to build a block.&#xD;&#xA;&#xD;&#xA;When building the block, the transaction runs all pre-dispatch functions. This [pre-dispatch][3] function also re-validates the transaction before executing it.&#xD;&#xA;&#xD;&#xA;Can you please explain the lifecycle after a transaction becomes invalid in pre-dispatch? &#xD;&#xA; - Does it get put back in the future queue, verifying queue, or get dropped?&#xD;&#xA; &#xD;&#xA;I think the check weight extension puts it back into the queue when block cannot fit the transaction but I cannot find any documentation on I can put something back into a queue if it become invalid.&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_runtime/transaction_validity/struct.ValidTransaction.html&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/a200cdb93c6af5763b9c7bf313fa708764ac88ca/primitives/runtime/src/traits.rs#L720&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/monthly-2021-09+1/sp_runtime/traits/trait.SignedExtension.html#method.pre_dispatch" ContentLicense="CC BY-SA 4.0" />
  <row Id="11885" PostHistoryTypeId="2" PostId="3166" RevisionGUID="0e7b350b-c9ce-4d2d-bfe3-241206a7ef94" CreationDate="2022-06-10T04:04:32.820" UserId="2711" Text="I want to use the following ConvertOrigin. It converts a sibling account into the native account.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct SiblingSignedAccountId32AsNative&lt;Origin&gt;(PhantomData&lt;Origin&gt;);&#xD;&#xA;impl&lt;Origin: OriginTrait&gt; ConvertOrigin&lt;Origin&gt;&#xD;&#xA;	for SiblingSignedAccountId32AsNative&lt;Origin&gt;&#xD;&#xA;where&#xD;&#xA;	Origin::AccountId: From&lt;[u8; 32]&gt;,&#xD;&#xA;{&#xD;&#xA;	fn convert_origin(&#xD;&#xA;		origin: impl Into&lt;MultiLocation&gt;,&#xD;&#xA;		kind: OriginKind,&#xD;&#xA;	) -&gt; Result&lt;Origin, MultiLocation&gt; {&#xD;&#xA;		let origin = origin.into();&#xD;&#xA;		log::trace!(&#xD;&#xA;			target: &quot;xcm::origin_conversion&quot;,&#xD;&#xA;			&quot;SiblingSignedAccountId32AsNative origin: {:?}, kind: {:?}&quot;,&#xD;&#xA;			origin, kind,&#xD;&#xA;		);&#xD;&#xA;		match (kind, origin) {&#xD;&#xA;			(&#xD;&#xA;				OriginKind::Native,&#xD;&#xA;				MultiLocation { parents: 1, interior: Junctions::X2(Parachain(_), AccountId32 { id, _ })},&#xD;&#xA;			) =&gt;&#xD;&#xA;				Ok(Origin::signed(id.into())),&#xD;&#xA;			(_, origin) =&gt; Err(origin),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}```&#xD;&#xA;&#xD;&#xA;I think it's safe and won't bring any asset security issue. However I don't find similar ConvertOrigin in polkadot's repo. &#xD;&#xA;&#xD;&#xA;Is there any reason behind or this ConvertOrigin could cause some issues?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11887" PostHistoryTypeId="1" PostId="3166" RevisionGUID="0e7b350b-c9ce-4d2d-bfe3-241206a7ef94" CreationDate="2022-06-10T04:04:32.820" UserId="2711" Text="Any potential bug or issue in this ConvertOrigin?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11888" PostHistoryTypeId="3" PostId="3166" RevisionGUID="0e7b350b-c9ce-4d2d-bfe3-241206a7ef94" CreationDate="2022-06-10T04:04:32.820" UserId="2711" Text="|xcm|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11889" PostHistoryTypeId="5" PostId="3164" RevisionGUID="14b3e22e-0a9f-4ad1-91fb-cb9f741bf800" CreationDate="2022-06-10T04:13:59.747" UserId="2714" Comment="added 2063 characters in body" Text="I'm pretty new to substrate + polkadot and I am trying to develop my own super simple relay chain from the node template (https://github.com/substrate-developer-hub/substrate-node-template). Right now, I am just trying to implement the hrmp protocol for xcm messaging between relay chain and future parachains. Anyone with any ideas how to approach this? I am currently looking at polkadot source code and trying to add the &#xD;&#xA;&#xD;&#xA;```Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event&lt;T&gt;, Config} = 60,``` &#xD;&#xA;&#xD;&#xA;line from ```polkadot/runtime/polkadot/src/lib.rs``` to my ```substrate-node-template/runtime/lib.rs```. I tried to add all the dependencies but I just get too many dependency errors to manage.&#xD;&#xA;&#xD;&#xA;EDIT: The specific error I am getting is this&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to select a version for `zstd`.&#xD;&#xA;    ... required by package `sp-maybe-compressed-blob v4.1.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `sp-maybe-compressed-blob` of package `sc-executor-common v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `sc-executor-common` of package `sc-executor v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `sc-executor` of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking-cli` of package `node-template v4.0.0-dev (/Users/stevenyao/Development/learning/substrate/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `^0.9.0` are: 0.9.2+zstd.1.5.1, 0.9.1+zstd.1.5.1, 0.9.0+zstd.1.5.0&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `zstd v0.10.0+zstd.1.5.2`&#xD;&#xA;    ... which satisfies dependency `zstd = &quot;^0.10.0&quot;` of package `sp-maybe-compressed-blob v4.1.0-dev (https://github.com/paritytech/substrate?branch=master#4aec7b4d)`&#xD;&#xA;    ... which satisfies git dependency `sp-maybe-compressed-blob` (locked to 4.1.0-dev) of package `substrate-wasm-builder v5.0.0-dev (https://github.com/paritytech/substrate?branch=master#4aec7b4d)`&#xD;&#xA;    ... which satisfies git dependency `substrate-wasm-builder` (locked to 5.0.0-dev) of package `node-template-runtime v4.0.0-dev (/Users/stevenyao/Development/learning/substrate/substrate-node-template/runtime/relay)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` of package `node-template v4.0.0-dev (/Users/stevenyao/Development/learning/substrate/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `zstd` which could resolve this conflict&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11890" PostHistoryTypeId="5" PostId="3164" RevisionGUID="1f7e72b4-820b-470e-96b0-c9cc3b29fabb" CreationDate="2022-06-10T04:14:40.183" UserId="2714" Comment="added 88 characters in body" Text="I'm pretty new to substrate + polkadot and I am trying to develop my own super simple relay chain from the node template (https://github.com/substrate-developer-hub/substrate-node-template). Right now, I am just trying to implement the hrmp protocol for xcm messaging between relay chain and future parachains. Anyone with any ideas how to approach this? I am currently looking at polkadot source code and trying to add the &#xD;&#xA;&#xD;&#xA;```Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event&lt;T&gt;, Config} = 60,``` &#xD;&#xA;&#xD;&#xA;line from ```polkadot/runtime/polkadot/src/lib.rs``` to my ```substrate-node-template/runtime/lib.rs```. I tried to add all the dependencies but I just get too many dependency errors to manage.&#xD;&#xA;&#xD;&#xA;EDIT: The specific error I am getting is this, looks like the versions for zstd is messed up, no idea how I got this or how to fix it&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to select a version for `zstd`.&#xD;&#xA;    ... required by package `sp-maybe-compressed-blob v4.1.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `sp-maybe-compressed-blob` of package `sc-executor-common v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `sc-executor-common` of package `sc-executor v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `sc-executor` of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking-cli` of package `node-template v4.0.0-dev (/Users/stevenyao/Development/learning/substrate/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `^0.9.0` are: 0.9.2+zstd.1.5.1, 0.9.1+zstd.1.5.1, 0.9.0+zstd.1.5.0&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `zstd v0.10.0+zstd.1.5.2`&#xD;&#xA;    ... which satisfies dependency `zstd = &quot;^0.10.0&quot;` of package `sp-maybe-compressed-blob v4.1.0-dev (https://github.com/paritytech/substrate?branch=master#4aec7b4d)`&#xD;&#xA;    ... which satisfies git dependency `sp-maybe-compressed-blob` (locked to 4.1.0-dev) of package `substrate-wasm-builder v5.0.0-dev (https://github.com/paritytech/substrate?branch=master#4aec7b4d)`&#xD;&#xA;    ... which satisfies git dependency `substrate-wasm-builder` (locked to 5.0.0-dev) of package `node-template-runtime v4.0.0-dev (/Users/stevenyao/Development/learning/substrate/substrate-node-template/runtime/relay)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` of package `node-template v4.0.0-dev (/Users/stevenyao/Development/learning/substrate/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `zstd` which could resolve this conflict&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11891" PostHistoryTypeId="2" PostId="3167" RevisionGUID="58f4a88b-9932-4efc-808b-fbab1291b48a" CreationDate="2022-06-10T04:41:02.013" UserId="393" Text="After you update the ethereum's version in cargo dependency, maybe this will be removed (if the latest code has updated the storage version in code.)." ContentLicense="CC BY-SA 4.0" />
  <row Id="11893" PostHistoryTypeId="2" PostId="3168" RevisionGUID="ef660bfb-479a-4651-b934-452a1e76d461" CreationDate="2022-06-10T04:44:36.297" UserId="2146" Text="I don't think I have a utility pallet on my substrate template which I installed via the substrate docs.  Here is the issue in github.  https://github.com/polkadot-js/api/issues/4801&#xD;&#xA;&#xD;&#xA;I get a similar error message like this when using batch() and batchAll()&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const ext = api.tx.utility.batchAll([ext1,ext2]);&#xD;&#xA;                           ^&#xD;&#xA;&#xD;&#xA;TypeError: Cannot read properties of undefined (reading 'batchAll')&#xD;&#xA;    at file:///home/examples/mintAsset.js:19:28&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How do I fix this? I re-installed a substrate-template on WSL and I can't seem to get my scripts to work after the new install.&#xD;&#xA;&#xD;&#xA;Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="11895" PostHistoryTypeId="1" PostId="3168" RevisionGUID="ef660bfb-479a-4651-b934-452a1e76d461" CreationDate="2022-06-10T04:44:36.297" UserId="2146" Text="TypeError: Cannot read property 'batchAll' of undefined" ContentLicense="CC BY-SA 4.0" />
  <row Id="11896" PostHistoryTypeId="3" PostId="3168" RevisionGUID="ef660bfb-479a-4651-b934-452a1e76d461" CreationDate="2022-06-10T04:44:36.297" UserId="2146" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11897" PostHistoryTypeId="2" PostId="3169" RevisionGUID="38e52853-0a69-4a60-88f0-03d30f720a39" CreationDate="2022-06-10T04:45:58.727" UserId="393" Text=" 1. on_chain_storage_version is the version number saved in the DB. &#xD;&#xA; 2. And the current_storage_version's real meaning is the number which is annotated in the  pallet's pallet::storage_version macro." ContentLicense="CC BY-SA 4.0" />
  <row Id="11899" PostHistoryTypeId="2" PostId="3170" RevisionGUID="c0296555-85d2-4195-9dfe-bcb140047747" CreationDate="2022-06-10T05:14:18.833" UserId="393" Text="I think the real problem is that you should not only build the binary with --release, but also you should enable the runtime-benchmarks feature.&#xD;&#xA;&#xD;&#xA;For eg.&#xD;&#xA;&#xD;&#xA;    cargo build --release --features=runtime-benchmarks&#xD;&#xA;&#xD;&#xA;Pay attention to the &quot;--features...&quot; part." ContentLicense="CC BY-SA 4.0" />
  <row Id="11901" PostHistoryTypeId="2" PostId="3171" RevisionGUID="305a510c-1344-4806-8505-7e96a4561234" CreationDate="2022-06-10T05:33:59.947" UserId="2146" Text="So, I downloaded the substrate-node-template from substrate. &#xD;&#xA;&#xD;&#xA;I went to https://wiki.polkadot.network/docs/maintain-sync and followed the article to install the polkadot specific chain.&#xD;&#xA;&#xD;&#xA;Solved my issue. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11903" PostHistoryTypeId="2" PostId="3172" RevisionGUID="71cf1453-9f46-42ed-bb7b-52b252ab3349" CreationDate="2022-06-10T05:57:02.523" UserId="398" Text="I have set up my blockchain with 5 validator nodes. Node01 is bootnode and Nodes 2,3,4,5 are working as validator nodes connected with bootnode. Now I have to expose WSS URL for my chain. I have read on Polkadot docs that validators should not be exposed in any case. Only sync nodes can be used as a backend for dApps. How can I connect the sync node to validator nodes to sync all data and can expose WSS port. or is there any best way to expose block chain wss port. " ContentLicense="CC BY-SA 4.0" />
  <row Id="11905" PostHistoryTypeId="1" PostId="3172" RevisionGUID="71cf1453-9f46-42ed-bb7b-52b252ab3349" CreationDate="2022-06-10T05:57:02.523" UserId="398" Text="Setting up sync node as backend for dApps connected with validator nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="11906" PostHistoryTypeId="3" PostId="3172" RevisionGUID="71cf1453-9f46-42ed-bb7b-52b252ab3349" CreationDate="2022-06-10T05:57:02.523" UserId="398" Text="|substrate-node|polkadot|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11912" PostHistoryTypeId="2" PostId="3174" RevisionGUID="0fa453a3-a838-4ef8-a9a8-2e685bb8e0a2" CreationDate="2022-06-10T07:58:52.670" UserId="567" Text="All your args will be passed as a SCALE encoded message param.&#xD;&#xA;That's why on the runtime you should decode it using a struct that derive Scale Encode + Decode + MaxEncodedLen and have the exact same field names &amp; types&#xD;&#xA;&#xD;&#xA;In your contract:&#xD;&#xA;&#xD;&#xA;        // PSP22 transfer&#xD;&#xA;    #[ink(extension = 0xdb20f9f5)]&#xD;&#xA;    fn transfer(&#xD;&#xA;        asset_id: u32,&#xD;&#xA;        to: &lt;ink_env::DefaultEnvironment as Environment&gt;::AccountId,&#xD;&#xA;        value: &lt;ink_env::DefaultEnvironment as Environment&gt;::Balance,&#xD;&#xA;    ) -&gt; Result&lt;(), Psp22Error&gt;;&#xD;&#xA;&#xD;&#xA;In the runtime:&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Encode, Decode, MaxEncodedLen)]&#xD;&#xA;    pub struct Psp22TransferInput&lt;AssetId, AccountId, Balance&gt; {&#xD;&#xA;    	pub asset_id: AssetId,&#xD;&#xA;    	pub to: AccountId,&#xD;&#xA;    	pub value: Balance,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    let input: Psp22TransferInput&lt;T::AssetId, T::AccountId, T::Balance&gt; =&#xD;&#xA;    					env.read_as()?;&#xD;&#xA;&#xD;&#xA;You can check [Parity ink! example](https://github.com/paritytech/ink/pull/1244/files) of PSP22 implementation (more basic as it will serve as an example)&#xD;&#xA;&#xD;&#xA;And [OpenBrush example](https://github.com/Supercolony-net/openbrush-contracts/pull/104/files) PSP22 implementation (more advanced as it targets to be production-ready)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11914" PostHistoryTypeId="2" PostId="3175" RevisionGUID="26d06871-4b14-4ef5-b74f-3072e5fa7eff" CreationDate="2022-06-10T08:26:17.310" UserId="2264" Text="After going down a rabbit hole with signatures and different implementations, I managed to get it working using the official `schnorrkel` crate.&#xD;&#xA;&#xD;&#xA;I also had a bug where if I defined an immortal era, my code would use the runtime version of the genesis block, instead of the latest one." ContentLicense="CC BY-SA 4.0" />
  <row Id="11916" PostHistoryTypeId="2" PostId="3176" RevisionGUID="08cd2c61-6ade-45a8-9d79-ad7e8bf9e3c3" CreationDate="2022-06-10T08:34:57.857" UserId="2337" Text="I am trying to write a decoder for data which generates by `contracts` pallet.&#xD;&#xA;For this purpose i have to convert metadata types to types which are supported by scale decoder which i use. Where i can found information about types available in contract's metadata?&#xD;&#xA;&#xD;&#xA;Now i have this code but i am not sure that it will cover all possible types in contract's metadata:&#xD;&#xA;```ts&#xD;&#xA;import {Type, TypeKind} from &quot;@subsquid/scale-codec&quot;&#xD;&#xA;import {TypeDef} from &quot;./interfaces&quot;&#xD;&#xA;import assert from &quot;assert&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;export function normalizeTypes(types: TypeDef[]): Type[] {&#xD;&#xA;    return types.map(type =&gt; {&#xD;&#xA;        let keys = Object.keys(type.type.def)&#xD;&#xA;        assert(keys.length == 1)&#xD;&#xA;        switch(keys[0]) {&#xD;&#xA;            case 'primitive':&#xD;&#xA;                return {&#xD;&#xA;                    kind: TypeKind.Primitive,&#xD;&#xA;                    primitive: type.type.def.primitive.toUpperCase(),&#xD;&#xA;                }&#xD;&#xA;            case 'composite':&#xD;&#xA;                return {&#xD;&#xA;                    kind: TypeKind.Composite,&#xD;&#xA;                    fields: type.type.def.composite.fields,&#xD;&#xA;                }&#xD;&#xA;            case 'array':&#xD;&#xA;                return {&#xD;&#xA;                    kind: TypeKind.Array,&#xD;&#xA;                    len: type.type.def.array.len,&#xD;&#xA;                    type: type.type.def.array.type,&#xD;&#xA;                }&#xD;&#xA;            case 'tuple':&#xD;&#xA;                return {&#xD;&#xA;                    kind: TypeKind.Tuple,&#xD;&#xA;                    tuple: type.type.def.tuple,&#xD;&#xA;                }&#xD;&#xA;            case 'variant':&#xD;&#xA;                return {&#xD;&#xA;                    kind: TypeKind.Variant,&#xD;&#xA;                    variants: type.type.def.variant.variants.map((variant: any) =&gt; {&#xD;&#xA;                        return {&#xD;&#xA;                            ...variant,&#xD;&#xA;                            fields: variant.fields || [],&#xD;&#xA;                        }&#xD;&#xA;                    }),&#xD;&#xA;                }&#xD;&#xA;            default:&#xD;&#xA;                throw new Error(`Unexpected type '${keys[0]}'`)&#xD;&#xA;        }&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11918" PostHistoryTypeId="1" PostId="3176" RevisionGUID="08cd2c61-6ade-45a8-9d79-ad7e8bf9e3c3" CreationDate="2022-06-10T08:34:57.857" UserId="2337" Text="Which scale types are available in ink contract metadata" ContentLicense="CC BY-SA 4.0" />
  <row Id="11919" PostHistoryTypeId="3" PostId="3176" RevisionGUID="08cd2c61-6ade-45a8-9d79-ad7e8bf9e3c3" CreationDate="2022-06-10T08:34:57.857" UserId="2337" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11920" PostHistoryTypeId="2" PostId="3177" RevisionGUID="b4b63012-22f6-4bf6-9bbc-5b273c663c6c" CreationDate="2022-06-10T08:38:59.347" UserId="2264" Text="I am playing around with `ink!` and invoking contract pallets. After uploading the contract to the chain from the polkadot extension, I get a JSON file back describing the metadata for the contract, especially the method calls and arguments.&#xD;&#xA;&#xD;&#xA;This would presume that I need to externally manage the metadata for the contract.&#xD;&#xA;&#xD;&#xA;Is there no way to get this from the chain directly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11922" PostHistoryTypeId="1" PostId="3177" RevisionGUID="b4b63012-22f6-4bf6-9bbc-5b273c663c6c" CreationDate="2022-06-10T08:38:59.347" UserId="2264" Text="Getting ink! contract metadata from the chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="11923" PostHistoryTypeId="3" PostId="3177" RevisionGUID="b4b63012-22f6-4bf6-9bbc-5b273c663c6c" CreationDate="2022-06-10T08:38:59.347" UserId="2264" Text="|ink|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11924" PostHistoryTypeId="2" PostId="3178" RevisionGUID="748db2ac-52e7-445a-bb71-5cef09e31ea4" CreationDate="2022-06-10T08:49:12.540" UserId="627" Text="When you wrap a call, only the root is displayed, this means -&#xD;&#xA;&#xD;&#xA; - `utility.batch([ system.remark(...), ... ])` will show the batch transaction under extrinsics&#xD;&#xA; - `sudo.sudo(system.remark(...))` will show the sudo transaction under extrinsics&#xD;&#xA;&#xD;&#xA;In all case it will display the extrinsic as retrieved from the block and as submitted to the chain. Wrapping shows the wrapper.&#xD;&#xA;&#xD;&#xA;Obviously when you expand the wrapper, be it `batch/sudo/sub`/etc it will show the information contained in the tx - in this case the remark." ContentLicense="CC BY-SA 4.0" />
  <row Id="11926" PostHistoryTypeId="2" PostId="3179" RevisionGUID="519ba67a-9aeb-4d37-ba18-1db8c50d10fc" CreationDate="2022-06-10T08:55:40.810" UserId="380" Text="Metadata is not stored on chain to avoid bloat. Only the compiled wasm is uploaded to the chain. This is the same way it works on Ethereum [with compiled solidity being stored on-chain](https://www.alchemy.com/overviews/what-is-an-abi-of-a-smart-contract-examples-and-usage). As pointed out in the article, you can generate the ABI if you have the contract source.&#xD;&#xA;&#xD;&#xA;Therefore, if you have the `ink!` contract sources you can generate the `ABI` using `cargo-contract build ...`. In future, [it may also be possible using the crate `contract-metadata`](https://github.com/paritytech/ink/issues/1229)." ContentLicense="CC BY-SA 4.0" />
  <row Id="11928" PostHistoryTypeId="5" PostId="3146" RevisionGUID="fbe778dd-cca0-4dc2-af69-0b48bc0aa7f6" CreationDate="2022-06-10T09:47:06.167" UserId="3" Comment="Add new info regarding storage version on genesis" Text="I modified the template pallet from the substrate node template [681a9d8e3e8becf99aabf1cc76e1c08016db2e1a](https://github.com/substrate-developer-hub/substrate-node-template/tree/polkadot-v0.9.23) to contain a storage version:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;const STORAGE_VERSION: StorageVersion = StorageVersion::new(123);&#xD;&#xA;&#xD;&#xA;// -- snip --&#xD;&#xA;&#xD;&#xA;#[pallet::pallet]&#xD;&#xA;#[pallet::storage_version(STORAGE_VERSION)]&#xD;&#xA;#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I wrote the following test:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn storage_version_is_correct() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		assert_eq!(&lt;Pallet&lt;Test&gt; as GetStorageVersion&gt;::current_storage_version(), 123);&#xD;&#xA;		assert_eq!(&lt;Pallet&lt;Test&gt; as GetStorageVersion&gt;::on_chain_storage_version(), 123);&#xD;&#xA;		assert_eq!(StorageVersion::get::&lt;Pallet&lt;Test&gt;&gt;(), 123);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The first `assert_eq!` succeeds, the other two fail. Is this expected behavior? I would have expected the storage version of the pallet to be written to storage at genesis. If this is expected behavior, why is this the case?&#xD;&#xA;&#xD;&#xA;I expanded `lib.rs` and found the following snippet:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; frame_support::traits::OnGenesis for Pallet&lt;T&gt; {&#xD;&#xA;    fn on_genesis() {&#xD;&#xA;        let storage_version = STORAGE_VERSION;&#xD;&#xA;        storage_version.put::&lt;Self&gt;();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So it appears that the storage version is supposed to be written to the on-chain storage on genesis, right? Why didn't it happen in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11929" PostHistoryTypeId="6" PostId="2676" RevisionGUID="496835c6-cc5e-43cd-ac79-19f821395608" CreationDate="2022-06-10T10:43:29.040" UserId="34" Comment="edited tags" Text="|polkadot-js|transactions|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11930" PostHistoryTypeId="2" PostId="3180" RevisionGUID="79ef9eb0-58e4-4b56-bede-6be7536e66f2" CreationDate="2022-06-10T11:01:06.007" UserId="1789" Text="after following the tutorial[https://chainbridge.chainsafe.io/local/] of running Chainbridge locally, &#xD;&#xA;&#xD;&#xA;I can send 1 Substrate Native Token to ERC20&#xD;&#xA;&#xD;&#xA;But when I sent 1, 100, and 1000000 ERC20 tokens to 0xd4359..da27d, the ALICE Polkadot account balance does not increase after waiting 10 blocks...&#xD;&#xA;```&#xD;&#xA;ALICE  5Grwva…GKutQY    type=sr25519    2.1529 MUnit&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From this command: `subkey inspect //Alice`&#xD;&#xA;```&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a&#xD;&#xA;  Public key (hex):  0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Account ID:        0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Public key (SS58): 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;  SS58 Address:      5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;```&#xD;&#xA;This confirms Alice 5Grwva is 0xd4359..da27d on Ethereum side&#xD;&#xA;&#xD;&#xA;Some logs from running the ChainBridge:&#xD;&#xA;```&#xD;&#xA;INFO[06-10|17:57:50] Starting ChainBridge... &#xD;&#xA;INFO[06-10|17:57:50] Connecting to ethereum chain...          chain=eth url=ws://localhost:8545&#xD;&#xA;INFO[06-10|17:57:50] Connecting to substrate chain...         chain=sub url=ws://localhost:9944&#xD;&#xA;2022/06/10 17:57:50 Connecting to ws://localhost:9944...&#xD;&#xA;INFO[06-10|17:57:50] Started eth chain                        system=core&#xD;&#xA;INFO[06-10|17:57:50] Started sub chain                        system=core&#xD;&#xA;INFO[06-10|17:57:50] Polling Blocks...                        chain=eth block=14856&#xD;&#xA;INFO[06-10|18:38:33] Got fungible transfer event!             chain=sub destination=0 resourceId=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00 amount=1000&#xD;&#xA;INFO[06-10|18:38:33] Attempting to resolve message            chain=eth type=FungibleTransfer src=1 dst=0 nonce=1 rId=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00&#xD;&#xA;INFO[06-10|18:38:33] Creating erc20 proposal                  chain=eth src=1 nonce=1&#xD;&#xA;INFO[06-10|18:38:33] Watching for finalization event          chain=eth src=1 nonce=1&#xD;&#xA;INFO[06-10|18:38:33] Submitted proposal vote                  chain=eth tx=0xbdc73d76fb45ed29b194afc6208785b37f38dd6851869fb95fab28673611f5bb src=1 depositNonce=1 gasPrice=20000000&#xD;&#xA;INFO[06-10|18:38:48] Submitted proposal execution             chain=eth tx=0x366ce097f45b10e25d5047f366d08dc12d8b185e4c6deae49df1d58bea26cf97 src=1 dst=0 nonce=1 gasPrice=20000000&#xD;&#xA;INFO[06-10|18:43:17] Handling fungible deposit event          chain=eth dest=1 nonce=7&#xD;&#xA;INFO[06-10|18:43:17] Acknowledging proposal on chain          chain=sub nonce=7 source=0 resource=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00 method=Example.transfer&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I show transferred amount from ERC20 to Substrate parachain?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11932" PostHistoryTypeId="1" PostId="3180" RevisionGUID="79ef9eb0-58e4-4b56-bede-6be7536e66f2" CreationDate="2022-06-10T11:01:06.007" UserId="1789" Text="ChainBridge: how to show transferred amount from ERC20 to Substrate parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11933" PostHistoryTypeId="3" PostId="3180" RevisionGUID="79ef9eb0-58e4-4b56-bede-6be7536e66f2" CreationDate="2022-06-10T11:01:06.007" UserId="1789" Text="|polkadot-js|chainbridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11934" PostHistoryTypeId="2" PostId="3181" RevisionGUID="c1ca38db-cdb1-438c-b7c0-4f0bdc4a3e39" CreationDate="2022-06-10T11:02:20.527" UserId="425" Text="Can the information about the owner of the actual contract code blob (the account that deployed the actual code) be accessed from the contract environment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11936" PostHistoryTypeId="1" PostId="3181" RevisionGUID="c1ca38db-cdb1-438c-b7c0-4f0bdc4a3e39" CreationDate="2022-06-10T11:02:20.527" UserId="425" Text="How to get contract's code owner" ContentLicense="CC BY-SA 4.0" />
  <row Id="11937" PostHistoryTypeId="3" PostId="3181" RevisionGUID="c1ca38db-cdb1-438c-b7c0-4f0bdc4a3e39" CreationDate="2022-06-10T11:02:20.527" UserId="425" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11938" PostHistoryTypeId="5" PostId="3180" RevisionGUID="f5739e96-9277-47ab-8a80-585a6bbfe0d5" CreationDate="2022-06-10T11:08:34.817" UserId="1789" Comment="added 749 characters in body" Text="after following the tutorial[https://chainbridge.chainsafe.io/local/] of running Chainbridge locally, &#xD;&#xA;&#xD;&#xA;I can send 1 Substrate Native Token to ERC20&#xD;&#xA;&#xD;&#xA;But when I sent 1, 100, and 1000000 ERC20 tokens to 0xd4359..da27d, the ALICE Polkadot account balance does not increase after waiting 10 blocks...&#xD;&#xA;```&#xD;&#xA;ALICE  5Grwva…GKutQY    type=sr25519    2.1529 MUnit&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From this command: `subkey inspect //Alice`&#xD;&#xA;```&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a&#xD;&#xA;  Public key (hex):  0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Account ID:        0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Public key (SS58): 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;  SS58 Address:      5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;```&#xD;&#xA;This confirms Alice 5Grwva is 0xd4359..da27d on Ethereum side&#xD;&#xA;&#xD;&#xA;Logs from `cb-sol-cli erc20 ...` command sending tokens:&#xD;&#xA;```&#xD;&#xA;[erc20/deposit] Constructed deposit:&#xD;&#xA;[erc20/deposit]   Resource Id: 0x000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00&#xD;&#xA;[erc20/deposit]   Amount: 0xd3c21bcecceda1000000&#xD;&#xA;[erc20/deposit]   len(recipient): 32&#xD;&#xA;[erc20/deposit]   Recipient: 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;[erc20/deposit]   Raw: 0x00000000000000000000000000000000000000000000d3c21bcecceda10000000000000000000000000000000000000000000000000000000000000000000020d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;[erc20/deposit] Creating deposit to initiate transfer!&#xD;&#xA;Waiting for tx: 0x43f50cebc459b1d959a515250be28a861639f8983ddc730ad8f464f9448cf58a...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Logs from running the ChainBridge:&#xD;&#xA;```&#xD;&#xA;INFO[06-10|17:57:50] Starting ChainBridge... &#xD;&#xA;INFO[06-10|17:57:50] Connecting to ethereum chain...          chain=eth url=ws://localhost:8545&#xD;&#xA;INFO[06-10|17:57:50] Connecting to substrate chain...         chain=sub url=ws://localhost:9944&#xD;&#xA;2022/06/10 17:57:50 Connecting to ws://localhost:9944...&#xD;&#xA;INFO[06-10|17:57:50] Started eth chain                        system=core&#xD;&#xA;INFO[06-10|17:57:50] Started sub chain                        system=core&#xD;&#xA;INFO[06-10|17:57:50] Polling Blocks...                        chain=eth block=14856&#xD;&#xA;INFO[06-10|18:38:33] Got fungible transfer event!             chain=sub destination=0 resourceId=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00 amount=1000&#xD;&#xA;INFO[06-10|18:38:33] Attempting to resolve message            chain=eth type=FungibleTransfer src=1 dst=0 nonce=1 rId=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00&#xD;&#xA;INFO[06-10|18:38:33] Creating erc20 proposal                  chain=eth src=1 nonce=1&#xD;&#xA;INFO[06-10|18:38:33] Watching for finalization event          chain=eth src=1 nonce=1&#xD;&#xA;INFO[06-10|18:38:33] Submitted proposal vote                  chain=eth tx=0xbdc73d76fb45ed29b194afc6208785b37f38dd6851869fb95fab28673611f5bb src=1 depositNonce=1 gasPrice=20000000&#xD;&#xA;INFO[06-10|18:38:48] Submitted proposal execution             chain=eth tx=0x366ce097f45b10e25d5047f366d08dc12d8b185e4c6deae49df1d58bea26cf97 src=1 dst=0 nonce=1 gasPrice=20000000&#xD;&#xA;INFO[06-10|18:43:17] Handling fungible deposit event          chain=eth dest=1 nonce=7&#xD;&#xA;INFO[06-10|18:43:17] Acknowledging proposal on chain          chain=sub nonce=7 source=0 resource=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00 method=Example.transfer&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I show transferred amount from ERC20 to Substrate parachain?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11939" PostHistoryTypeId="2" PostId="3182" RevisionGUID="aa8f3dc0-a710-4f1a-bf22-ada291f221e9" CreationDate="2022-06-10T11:15:33.133" UserId="34" Text="The [log source in substrate](https://github.com/paritytech/substrate/blob/4d3d480d8149fbca2834d05cc050a01f9a25afbf/client/sysinfo/src/lib.rs#L95) still exists at this time, and I believe [this PR](https://github.com/paritytech/substrate/pull/11062) was the last modification to this logging. If I understand correctly, [this comment](https://github.com/paritytech/substrate/pull/11062#issuecomment-1074024705) indicates there are not run for `--dev` mode, as it drastically slows down the &quot;boot&quot; time for nodes when you are trying things out.&#xD;&#xA;&#xD;&#xA;At this time I don't know how to override the `--dev` flag to run these. I will update when I do here.&#xD;&#xA;&#xD;&#xA;Note also `--dev` no implies/includes `--tmp`, you don't need both flags." ContentLicense="CC BY-SA 4.0" />
  <row Id="11941" PostHistoryTypeId="2" PostId="3183" RevisionGUID="f2d2c60a-989f-4ef8-aea1-27ed18c89fd5" CreationDate="2022-06-10T11:32:51.603" UserId="246" Text="*Context*: Specifically trying to measure user behaviour data on substrate chains. &#xD;&#xA;&#xD;&#xA;*Questions:*&#xD;&#xA;&#xD;&#xA; 1. Is there any specific data that indicates whether a user triggered an extrinsic or an event?&#xD;&#xA;&#xD;&#xA; 2. Do only signed extrinsics need to be checked to get user triggered transactions? Do unsigned extrinsics have any useful user transaction data?&#xD;&#xA;&#xD;&#xA; 3. Is there a unified way to identify user transactions in any module?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11943" PostHistoryTypeId="1" PostId="3183" RevisionGUID="f2d2c60a-989f-4ef8-aea1-27ed18c89fd5" CreationDate="2022-06-10T11:32:51.603" UserId="246" Text="How to recognise user behaviour data on substrate chains? (Events + Extrinsics)" ContentLicense="CC BY-SA 4.0" />
  <row Id="11944" PostHistoryTypeId="3" PostId="3183" RevisionGUID="f2d2c60a-989f-4ef8-aea1-27ed18c89fd5" CreationDate="2022-06-10T11:32:51.603" UserId="246" Text="|extrinsic|events|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11945" PostHistoryTypeId="5" PostId="3180" RevisionGUID="c186fa85-dde1-44da-9898-6895bce461c7" CreationDate="2022-06-10T11:34:29.770" UserId="1789" Comment="added 169 characters in body" Text="after following the tutorial[https://chainbridge.chainsafe.io/local/] of running Chainbridge locally, &#xD;&#xA;&#xD;&#xA;I can send 1 Substrate Native Token to ERC20&#xD;&#xA;&#xD;&#xA;But when I sent 1, 100, 1000000, even 1000000000000000000 ERC20 tokens to 0xd4359..da27d, the ALICE Polkadot account balance does not increase after waiting 10 blocks...&#xD;&#xA;```&#xD;&#xA;accounts	                type	  transactions	balances	&#xD;&#xA;ALICE  5Grwva…GKutQY    type=sr25519       28      2.1529 MUnit&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From this command: `subkey inspect //Alice`&#xD;&#xA;```&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a&#xD;&#xA;  Public key (hex):  0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Account ID:        0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Public key (SS58): 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;  SS58 Address:      5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;```&#xD;&#xA;This confirms Alice 5Grwva is 0xd4359..da27d on Ethereum side&#xD;&#xA;&#xD;&#xA;Logs from `cb-sol-cli erc20 ...` command sending tokens:&#xD;&#xA;```&#xD;&#xA;[erc20/deposit] Constructed deposit:&#xD;&#xA;[erc20/deposit]   Resource Id: 0x000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00&#xD;&#xA;[erc20/deposit]   Amount: 0xd3c21bcecceda1000000&#xD;&#xA;[erc20/deposit]   len(recipient): 32&#xD;&#xA;[erc20/deposit]   Recipient: 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;[erc20/deposit]   Raw: 0x00000000000000000000000000000000000000000000d3c21bcecceda10000000000000000000000000000000000000000000000000000000000000000000020d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;[erc20/deposit] Creating deposit to initiate transfer!&#xD;&#xA;Waiting for tx: 0x43f50cebc459b1d959a515250be28a861639f8983ddc730ad8f464f9448cf58a...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Logs from running the ChainBridge:&#xD;&#xA;```&#xD;&#xA;INFO[06-10|17:57:50] Starting ChainBridge... &#xD;&#xA;INFO[06-10|17:57:50] Connecting to ethereum chain...          chain=eth url=ws://localhost:8545&#xD;&#xA;INFO[06-10|17:57:50] Connecting to substrate chain...         chain=sub url=ws://localhost:9944&#xD;&#xA;2022/06/10 17:57:50 Connecting to ws://localhost:9944...&#xD;&#xA;INFO[06-10|17:57:50] Started eth chain                        system=core&#xD;&#xA;INFO[06-10|17:57:50] Started sub chain                        system=core&#xD;&#xA;INFO[06-10|17:57:50] Polling Blocks...                        chain=eth block=14856&#xD;&#xA;INFO[06-10|18:38:33] Got fungible transfer event!             chain=sub destination=0 resourceId=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00 amount=1000&#xD;&#xA;INFO[06-10|18:38:33] Attempting to resolve message            chain=eth type=FungibleTransfer src=1 dst=0 nonce=1 rId=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00&#xD;&#xA;INFO[06-10|18:38:33] Creating erc20 proposal                  chain=eth src=1 nonce=1&#xD;&#xA;INFO[06-10|18:38:33] Watching for finalization event          chain=eth src=1 nonce=1&#xD;&#xA;INFO[06-10|18:38:33] Submitted proposal vote                  chain=eth tx=0xbdc73d76fb45ed29b194afc6208785b37f38dd6851869fb95fab28673611f5bb src=1 depositNonce=1 gasPrice=20000000&#xD;&#xA;INFO[06-10|18:38:48] Submitted proposal execution             chain=eth tx=0x366ce097f45b10e25d5047f366d08dc12d8b185e4c6deae49df1d58bea26cf97 src=1 dst=0 nonce=1 gasPrice=20000000&#xD;&#xA;INFO[06-10|18:43:17] Handling fungible deposit event          chain=eth dest=1 nonce=7&#xD;&#xA;INFO[06-10|18:43:17] Acknowledging proposal on chain          chain=sub nonce=7 source=0 resource=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00 method=Example.transfer&#xD;&#xA;```&#xD;&#xA;I can see ALICE transactions is increasing, but that balance never increases!?&#xD;&#xA;&#xD;&#xA;How can I show transferred amount from ERC20 to Substrate parachain?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11947" PostHistoryTypeId="2" PostId="3184" RevisionGUID="c4ea643b-5fea-4718-ad4e-073e159c5223" CreationDate="2022-06-10T12:22:15.887" UserId="567" Text="There is no way to get the owner of the actual contract without adding specific logic for ownership inside your contract. &#xD;&#xA;But you can still get this info at `pallet-contract` level with the event `contracts.Instantiated` that will provide you AccountId of the deployer &amp; AccountId of the contract.&#xD;&#xA;&#xD;&#xA;To add ownership logic to your contract, have a look at [OpenBrush][1]&#xD;&#xA;&#xD;&#xA;Full list of functions exposed by ink! &amp; usable in your contract [here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Supercolony-net/openbrush-contracts/tree/main/contracts/src/access&#xD;&#xA;  [2]: https://docs.rs/ink_env/latest/ink_env/#functions" ContentLicense="CC BY-SA 4.0" />
  <row Id="11949" PostHistoryTypeId="2" PostId="3185" RevisionGUID="9a899992-339b-4498-be7f-6de3c3d62fc1" CreationDate="2022-06-10T12:58:12.827" UserId="716" Text="The following code will return the balance for a few random accounts?  How would I pass in a specific account that I am interested in?&#xD;&#xA;&#xD;&#xA;```     &#xD;&#xA;url = 'wss://karura.polkawallet.io'&#xD;&#xA;substrate = SubstrateInterface(url)&#xD;&#xA;hash = substrate.get_chain_finalised_head()&#xD;&#xA;result = substrate.query_map('System', 'Account', block_hash = hash, max_results=2)&#xD;&#xA;for account, account_info in result:&#xD;&#xA;     print(f&quot;Free balance of account '{account.value}': {account_info.value['data']['free']}&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The [docs][1] mention that you can pass a list in the params argument, but I tried various ways to pass in a list and I can't get it to work.  Here is one way I tried:&#xD;&#xA;```&#xD;&#xA;result = substrate.query_map('System', 'Account', params = [&quot;account=qhYSTHXnF19w3ahxdyxWbrz4kuRm5R5S61RbzFed5LATc86&quot;], block_hash = hash, max_results=2)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkascan.github.io/py-substrate-interface/#substrateinterface.SubstrateInterface.query" ContentLicense="CC BY-SA 4.0" />
  <row Id="11951" PostHistoryTypeId="1" PostId="3185" RevisionGUID="9a899992-339b-4498-be7f-6de3c3d62fc1" CreationDate="2022-06-10T12:58:12.827" UserId="716" Text="How to get the balance for a specific account using py-substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="11952" PostHistoryTypeId="3" PostId="3185" RevisionGUID="9a899992-339b-4498-be7f-6de3c3d62fc1" CreationDate="2022-06-10T12:58:12.827" UserId="716" Text="|python|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11953" PostHistoryTypeId="2" PostId="3186" RevisionGUID="cb82e5e2-ab9b-43c7-9a89-e953cb1de888" CreationDate="2022-06-10T13:14:08.827" UserId="599" Text="Point one is deprecated, and you can use only the second right now.&#xD;&#xA;&#xD;&#xA;In the future ink! will [support `dyn Trait` notation](https://github.com/paritytech/ink/issues/631). So you will be enough to have a trait to do cross-contract calls. Right now `OpenBrush` provides that feature via [wrapper](https://github.com/Supercolony-net/openbrush-contracts#wrapper-around-traits).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11955" PostHistoryTypeId="2" PostId="3187" RevisionGUID="3103d852-113c-4dc4-9517-dfdcd17b87b4" CreationDate="2022-06-10T13:16:44.920" UserId="2662" Text="I'm trying to connect local node running on my pc using `polkadot.js` library in react.js(browser). I'm pasting my code in below snippet and error that I'm facing in chrome console&#xD;&#xA;&#xD;&#xA;**Code**&#xD;&#xA;&#xD;&#xA;    // ************************Polkadot****************************&#xD;&#xA;    import {WsProvider, ApiPromise} from '@polkadot/api';&#xD;&#xA;    import { ContractPromise } from '@polkadot/api-contract';&#xD;&#xA;    import { Keyring } from '@polkadot/keyring';&#xD;&#xA;    // ************************************************************&#xD;&#xA;    import bridgePeer from './MetaData/DevErc20Metadata.json';&#xD;&#xA;    import bridgeTxt from './MetaData/PrivErc20Metadata.json';&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    //Keyring for finding the private and public key pair&#xD;&#xA;    const keyring = new Keyring({ type: 'ed25519' });&#xD;&#xA;    &#xD;&#xA;    // Contract address and its host&#xD;&#xA;    const txtNode = new WsProvider('ws://127.0.0.1:9944');&#xD;&#xA;     const PeerNode = new WsProvider('ws://127.0.0.1:9946');&#xD;&#xA;    &#xD;&#xA;    const ContractAddressGxt = '5GDxmhbSFqoBbsdWC4qd7LLHMZNmW3xX4rLKA7Ucdgb6un4z';&#xD;&#xA;    const ContractAddressPeer = '5D6z8T8rWZW1Uy7RwPburZv4wo5tjhCtG8CbfR5pbgxSEY37';&#xD;&#xA;    let api1, api2;&#xD;&#xA;    &#xD;&#xA;    (async () =&gt; {&#xD;&#xA;    &#xD;&#xA;      api1 = await ApiPromise.create({ provider:txtNode});&#xD;&#xA;      api2 = await ApiPromise.create({ provider: PeerNode});&#xD;&#xA;    &#xD;&#xA;    })();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Console**&#xD;&#xA;&#xD;&#xA;    index.js:465 WebSocket connection to 'ws://127.0.0.1:9946/' failed: &#xD;&#xA;    connect @ index.js:465&#xD;&#xA;    connectWithRetry @ index.js:499&#xD;&#xA;    WsProvider @ index.js:411&#xD;&#xA;    ./src/Common/WasmWasmHelper.js @ WasmWasmHelper.js:15&#xD;&#xA;    options.factory @ react refresh:6&#xD;&#xA;    _webpack_require_ @ bootstrap:24&#xD;&#xA;    fn @ hot module replacement:62&#xD;&#xA;    ./src/Componets/Swap/Swap.js @ loader.js:10&#xD;&#xA;    options.factory @ react refresh:6&#xD;&#xA;    _webpack_require_ @ bootstrap:24&#xD;&#xA;    fn @ hot module replacement:62&#xD;&#xA;    ./src/App.js @ classPrivateFieldLooseKey.js:4&#xD;&#xA;    options.factory @ react refresh:6&#xD;&#xA;    _webpack_require_ @ bootstrap:24&#xD;&#xA;    fn @ hot module replacement:62&#xD;&#xA;    ./src/index.js @ Swap.js:191&#xD;&#xA;    options.factory @ react refresh:6&#xD;&#xA;    _webpack_require_ @ bootstrap:24&#xD;&#xA;    (anonymous) @ startup:7&#xD;&#xA;    (anonymous) @ startup:7&#xD;&#xA;    logger.js:62 2022-06-10 18:36:55          API-WS: disconnected from ws://127.0.0.1:9946: 1006:: Abnormal Closure&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can anyone tell me why I'm facing this error any suggestion most welcome." ContentLicense="CC BY-SA 4.0" />
  <row Id="11957" PostHistoryTypeId="1" PostId="3187" RevisionGUID="3103d852-113c-4dc4-9517-dfdcd17b87b4" CreationDate="2022-06-10T13:16:44.920" UserId="2662" Text="API-WS: disconnected from ws://127.0.0.1:9946: 1006:: Abnormal Closure" ContentLicense="CC BY-SA 4.0" />
  <row Id="11958" PostHistoryTypeId="3" PostId="3187" RevisionGUID="3103d852-113c-4dc4-9517-dfdcd17b87b4" CreationDate="2022-06-10T13:16:44.920" UserId="2662" Text="|polkadot-js|polkadot|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11959" PostHistoryTypeId="2" PostId="3188" RevisionGUID="38f29f7a-c72b-4b85-8df5-7f2a8a2c2922" CreationDate="2022-06-10T13:18:45.540" UserId="599" Text="The problem was with the setup, we resolved that via chatting in the [OpenBrush channel](https://matrix.to/#/!utTuYglskDvqRRMQta:matrix.org/$myo5nXGJVtMaJP6hBtdBWkcHR_BgBTfxXuDrv5UO8SQ?via=matrix.org&amp;via=t2bot.io&amp;via=matrix.parity.io).&#xD;&#xA;&#xD;&#xA;The problem was that only Alice's account from Redspot has many tokens. Other accounts had only several units." ContentLicense="CC BY-SA 4.0" />
  <row Id="11961" PostHistoryTypeId="6" PostId="3092" RevisionGUID="b75fa014-53bd-42b6-8711-001b09784f10" CreationDate="2022-06-10T13:53:43.577" UserId="34" Comment="edited tags" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11962" PostHistoryTypeId="5" PostId="3165" RevisionGUID="805e6df1-b741-41ee-8028-05c993513a2c" CreationDate="2022-06-10T14:02:40.397" UserId="590" Comment="deleted 62 characters in body" Text="My understanding is that when a transaction arrives it gets validated against all signed extensions. If the transaction is valid it then moves into the ready queue or future queue depending on the result, [ValidTransaction][1], after executing [validate][2].&#xD;&#xA;&#xD;&#xA;Transactions that get put in the ready queue are gossiped and are used to build a block.&#xD;&#xA;&#xD;&#xA;When building the block, the transaction runs all pre-dispatch functions. This [pre-dispatch][3] function also re-validates the transaction before executing it.&#xD;&#xA;&#xD;&#xA;Can you please explain the lifecycle after a transaction becomes invalid in pre-dispatch? &#xD;&#xA; - Does it get put back in the future queue, verifying queue, or get dropped?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_runtime/transaction_validity/struct.ValidTransaction.html&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/a200cdb93c6af5763b9c7bf313fa708764ac88ca/primitives/runtime/src/traits.rs#L720&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/monthly-2021-09+1/sp_runtime/traits/trait.SignedExtension.html#method.pre_dispatch" ContentLicense="CC BY-SA 4.0" />
  <row Id="11963" PostHistoryTypeId="2" PostId="3189" RevisionGUID="3d905e14-bb4f-4fd8-aa8e-8fcb75dda96b" CreationDate="2022-06-10T14:14:45.763" UserId="2717" Text="How can i get fetch the list of all collators with their names?&#xD;&#xA;For example here I can get the count of collators&#xD;&#xA;&#xD;&#xA;    const totalCollators = await api.query.parachainStaking.totalSelected();&#xD;&#xA;&#xD;&#xA;Furthermore, where can I find the documentation of these queries? for example what objects api.query.parachainStaking returns.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="11965" PostHistoryTypeId="1" PostId="3189" RevisionGUID="3d905e14-bb4f-4fd8-aa8e-8fcb75dda96b" CreationDate="2022-06-10T14:14:45.763" UserId="2717" Text="How to fetch the name of collators using Polkadost.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="11966" PostHistoryTypeId="3" PostId="3189" RevisionGUID="3d905e14-bb4f-4fd8-aa8e-8fcb75dda96b" CreationDate="2022-06-10T14:14:45.763" UserId="2717" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11967" PostHistoryTypeId="5" PostId="3189" RevisionGUID="56bfce81-4103-4a0c-be25-8b0eace3479e" CreationDate="2022-06-10T14:17:02.493" UserId="2717" Comment="deleted 4 characters in body" Text="How can i fetch the list of all collators with their names?&#xD;&#xA;For example here I can get the count of collators&#xD;&#xA;&#xD;&#xA;    const totalCollators = await api.query.parachainStaking.totalSelected();&#xD;&#xA;&#xD;&#xA;Furthermore, where can I find the documentation of these queries? for example what objects api.query.parachainStaking returns.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="11968" PostHistoryTypeId="5" PostId="3140" RevisionGUID="7c0c5527-13d0-493a-8671-20f5c5e51aef" CreationDate="2022-06-10T14:46:37.420" UserId="1732" Comment="added 329 characters in body" Text="The rate function is actually what you need, increase is required in the context of a time serie db like Prometheus with a metric only increasing.&#xD;&#xA;&#xD;&#xA;What makes you think your nodes are handling million or requests per second? The scale I see on your graph is 0-25 which makes sense.&#xD;&#xA;&#xD;&#xA;Here is an example of this query `rate(substrate_rpc_requests_started{job=&quot;astar-public-node&quot;}[$__rate_interval])`:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can consider stacking series to have an overall usage of the network:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;EDIT: `rate` will only give you average number of requests per second.&#xD;&#xA;For a different time scale to estimate whole load, better use `increase` instead:&#xD;&#xA;&#xD;&#xA;    increase(substrate_rpc_requests_started{}[5m])&#xD;&#xA;&#xD;&#xA;For open connections, this makes it easily:&#xD;&#xA;&#xD;&#xA;    substrate_rpc_sessions_opened{}-substrate_rpc_sessions_closed{}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6SVqI.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/poatg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11969" PostHistoryTypeId="5" PostId="3140" RevisionGUID="10c9a83f-e60f-4394-b0e1-ccfacc069bb5" CreationDate="2022-06-10T14:48:24.563" UserId="1732" Comment="added 87 characters in body" Text="The rate function is actually what you need, increase is required in the context of a time serie db like Prometheus with a metric only increasing.&#xD;&#xA;&#xD;&#xA;What makes you think your nodes are handling million or requests per second? The scale I see on your graph is 0-25 which makes sense.&#xD;&#xA;&#xD;&#xA;Here is an example of this query `rate(substrate_rpc_requests_started{job=&quot;astar-public-node&quot;}[$__rate_interval])`:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can consider stacking series to have an overall usage of the network:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;EDIT: `rate` will only give you average number of requests per second.&#xD;&#xA;For a different time scale to estimate whole load, better use `increase` instead:&#xD;&#xA;&#xD;&#xA;    increase(substrate_rpc_requests_started{}[5m])&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;For open connections, this makes it easily:&#xD;&#xA;&#xD;&#xA;    substrate_rpc_sessions_opened{}-substrate_rpc_sessions_closed{}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6SVqI.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/poatg.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/Zo9VD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11970" PostHistoryTypeId="5" PostId="3140" RevisionGUID="fa569d94-fd13-42fd-9b28-7589becddb29" CreationDate="2022-06-10T14:48:46.713" UserId="1732" Comment="edited body" Text="The rate function is actually what you need, increase is required in the context of a time serie db like Prometheus with a metric only increasing.&#xD;&#xA;&#xD;&#xA;What makes you think your nodes are handling million or requests per second? The scale I see on your graph is 0-25 which makes sense.&#xD;&#xA;&#xD;&#xA;Here is an example of this query `rate(substrate_rpc_requests_started{job=&quot;astar-public-node&quot;}[$__rate_interval])`:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can consider stacking series to have an overall usage of the network:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;EDIT: `rate` will only give you average number of requests per second.&#xD;&#xA;For a different time scale to estimate whole load, better use `increase` instead:&#xD;&#xA;&#xD;&#xA;    increase(substrate_rpc_requests_started{}[1m])&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;For open connections, this makes it easily:&#xD;&#xA;&#xD;&#xA;    substrate_rpc_sessions_opened{}-substrate_rpc_sessions_closed{}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6SVqI.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/poatg.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/Zo9VD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11971" PostHistoryTypeId="2" PostId="3190" RevisionGUID="504823e2-18ba-4653-bd2f-573f3fa93328" CreationDate="2022-06-10T14:50:40.847" UserId="552" Text="Hey so I was running a local node and trying explorer/polkadot.js-scripts to submit some extrinsic and from what I have seen from the data log, I have seen that something is being appended before the original data. Like I have seen that its scale enocoded and the length of vector is there, but there's more to it! Not sure what all being inside the extrinsic struct. &#xD;&#xA;I have got a struct from gsrpc [extrinsic struct][1]. I don't know if this is what I'm looking for. So can I have some reference on what struct of extrinsic is being used in polkadot-js or what is being added to the original data. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/centrifuge/go-substrate-rpc-client/blob/e00160ba0bd929b32b62a05a43a689d38d646ea9/types/extrinsic.go#L46" ContentLicense="CC BY-SA 4.0" />
  <row Id="11973" PostHistoryTypeId="1" PostId="3190" RevisionGUID="504823e2-18ba-4653-bd2f-573f3fa93328" CreationDate="2022-06-10T14:50:40.847" UserId="552" Text="Extrinsic Struct" ContentLicense="CC BY-SA 4.0" />
  <row Id="11974" PostHistoryTypeId="3" PostId="3190" RevisionGUID="504823e2-18ba-4653-bd2f-573f3fa93328" CreationDate="2022-06-10T14:50:40.847" UserId="552" Text="|substrate-node|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11975" PostHistoryTypeId="2" PostId="3191" RevisionGUID="381ff58e-8aa9-4ffa-8408-ef40ed5a28c7" CreationDate="2022-06-10T16:23:06.927" UserId="94" Text="The `query_map` function queries multiple entries of a map.  &#xD;&#xA;If you just want a single value, you can use `query` instead.  &#xD;&#xA;Try the following on a local Substrate or Polkadot development node to see how it works:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Connect to a local `polkadot --dev` or `substrate --dev` node.&#xD;&#xA;url = 'ws://127.0.0.1:9944'&#xD;&#xA;substrate = SubstrateInterface(url)&#xD;&#xA;&#xD;&#xA;# Alice' development address from https://docs.substrate.io/v3/tools/subkey/#well-known-keys&#xD;&#xA;address = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'&#xD;&#xA;&#xD;&#xA;block = substrate.get_chain_finalised_head()&#xD;&#xA;result = substrate.query('System', 'Account', params = [address], block_hash = block)&#xD;&#xA;free = result.value['data']['free']&#xD;&#xA;&#xD;&#xA;print(f'Account {address} has {free} planks free balance')&#xD;&#xA;```&#xD;&#xA;Output:&#xD;&#xA;```pre&#xD;&#xA;Account 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY has 1000000000000000000000 planks free balance&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11977" PostHistoryTypeId="5" PostId="3166" RevisionGUID="dadbd88f-af22-4121-9c7b-1e0552ab374d" CreationDate="2022-06-10T16:41:00.500" UserId="104" Comment="fix formatting" Text="I want to use the following ConvertOrigin. It converts a sibling account into the native account.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct SiblingSignedAccountId32AsNative&lt;Origin&gt;(PhantomData&lt;Origin&gt;);&#xD;&#xA;impl&lt;Origin: OriginTrait&gt; ConvertOrigin&lt;Origin&gt;&#xD;&#xA;	for SiblingSignedAccountId32AsNative&lt;Origin&gt;&#xD;&#xA;where&#xD;&#xA;	Origin::AccountId: From&lt;[u8; 32]&gt;,&#xD;&#xA;{&#xD;&#xA;	fn convert_origin(&#xD;&#xA;		origin: impl Into&lt;MultiLocation&gt;,&#xD;&#xA;		kind: OriginKind,&#xD;&#xA;	) -&gt; Result&lt;Origin, MultiLocation&gt; {&#xD;&#xA;		let origin = origin.into();&#xD;&#xA;		log::trace!(&#xD;&#xA;			target: &quot;xcm::origin_conversion&quot;,&#xD;&#xA;			&quot;SiblingSignedAccountId32AsNative origin: {:?}, kind: {:?}&quot;,&#xD;&#xA;			origin, kind,&#xD;&#xA;		);&#xD;&#xA;		match (kind, origin) {&#xD;&#xA;			(&#xD;&#xA;				OriginKind::Native,&#xD;&#xA;				MultiLocation { parents: 1, interior: Junctions::X2(Parachain(_), AccountId32 { id, _ })},&#xD;&#xA;			) =&gt;&#xD;&#xA;				Ok(Origin::signed(id.into())),&#xD;&#xA;			(_, origin) =&gt; Err(origin),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think it's safe and won't bring any asset security issue. However I don't find similar ConvertOrigin in polkadot's repo. &#xD;&#xA;&#xD;&#xA;Is there any reason behind or this ConvertOrigin could cause some issues?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="11978" PostHistoryTypeId="2" PostId="3192" RevisionGUID="04f00464-9a6d-4cff-8477-51df3feeacd4" CreationDate="2022-06-10T16:44:10.253" UserId="85" Text="Generally if the [Phase][1] is ApplyExtrisic then it's user activity, but also the user can for example send an xcm message upwards to the relay chain and that will get executed in ParachainSystem set_validation_data and so those may also contain user activity (You can probably see whether it does or not by which events are associated with that extrinsic).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_system/enum.Phase.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="11980" PostHistoryTypeId="5" PostId="3164" RevisionGUID="70c67c3d-277c-436e-bd14-9fdc2aec85de" CreationDate="2022-06-10T17:12:03.327" UserId="2714" Comment="added 318 characters in body" Text="EDIT #2: TLDR Is it possible to write a bare bones version of polkadot relay chain that only has cross chain communication (HRMP) + consensus (BABE+Grandpa) but doesn't have anything else (no governance, etc)?&#xD;&#xA;&#xD;&#xA;I'm pretty new to substrate + polkadot and I am trying to develop my own super simple relay chain from the node template (https://github.com/substrate-developer-hub/substrate-node-template). Right now, I am just trying to implement the hrmp protocol for xcm messaging between relay chain and future parachains. Anyone with any ideas how to approach this? I am currently looking at polkadot source code and trying to add the &#xD;&#xA;&#xD;&#xA;```Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event&lt;T&gt;, Config} = 60,``` &#xD;&#xA;&#xD;&#xA;line from ```polkadot/runtime/polkadot/src/lib.rs``` to my ```substrate-node-template/runtime/lib.rs```. I tried to add all the dependencies by cloning the ```/runtime/parachains```, ```/primitives```, ```/core-primitives```, and a couple others but I just get too many dependency errors to manage.&#xD;&#xA;&#xD;&#xA;EDIT: The specific error I am getting is this, looks like the versions for zstd is messed up, no idea how I got this or how to fix it&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to select a version for `zstd`.&#xD;&#xA;    ... required by package `sp-maybe-compressed-blob v4.1.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `sp-maybe-compressed-blob` of package `sc-executor-common v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `sc-executor-common` of package `sc-executor v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `sc-executor` of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking-cli` of package `node-template v4.0.0-dev (/Users/stevenyao/Development/learning/substrate/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `^0.9.0` are: 0.9.2+zstd.1.5.1, 0.9.1+zstd.1.5.1, 0.9.0+zstd.1.5.0&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `zstd v0.10.0+zstd.1.5.2`&#xD;&#xA;    ... which satisfies dependency `zstd = &quot;^0.10.0&quot;` of package `sp-maybe-compressed-blob v4.1.0-dev (https://github.com/paritytech/substrate?branch=master#4aec7b4d)`&#xD;&#xA;    ... which satisfies git dependency `sp-maybe-compressed-blob` (locked to 4.1.0-dev) of package `substrate-wasm-builder v5.0.0-dev (https://github.com/paritytech/substrate?branch=master#4aec7b4d)`&#xD;&#xA;    ... which satisfies git dependency `substrate-wasm-builder` (locked to 5.0.0-dev) of package `node-template-runtime v4.0.0-dev (/Users/stevenyao/Development/learning/substrate/substrate-node-template/runtime/relay)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` of package `node-template v4.0.0-dev (/Users/stevenyao/Development/learning/substrate/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `zstd` which could resolve this conflict&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="11985" PostHistoryTypeId="2" PostId="3194" RevisionGUID="ad8b9295-beb8-4235-b513-d7dd5468fa7c" CreationDate="2022-06-10T18:30:27.237" UserId="627" Text="Here is a previous [answer with a full breakdown](https://substrate.stackexchange.com/a/2933/627) of an extrinsic.&#xD;&#xA;&#xD;&#xA;Additionally you can also paste encoded data into the apps UI, and decode it into the parts to see what goes where (encoding details pane on the bottom right). Here is an example [of a recent transfer](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/extrinsics/decode/0x4102840012a0c156613317ad2693d5e8803d9f2876aedf664a854839aee08e4d7d4e54e30062a35b6de0416283ef97940d66421a2d0a7cde23acaaea3e12517f6dc402c2a435e5dc2b333203f0afb22aaae9bdba9f85f7406983c8778525911fe6ab3f9d0a26000000050300fc2bd36384a182977a5c888bb06039fa9af413399a35345b4222dd53046aed4107c0b4532526) on Polkadot." ContentLicense="CC BY-SA 4.0" />
  <row Id="11987" PostHistoryTypeId="2" PostId="3195" RevisionGUID="020a8348-0fdf-4249-a98e-04c9df4f285d" CreationDate="2022-06-10T18:48:39.033" UserId="627" Text="From the on-chain data, you can map to the actual stash.&#xD;&#xA;&#xD;&#xA;The key reported by ImOnline is part of the session keys, i.e. [session.nextKeys](https://polkadot.js.org/docs/substrate/storage#nextkeysaccountid32-optionnoderuntimesessionkeys). You have 2 options -&#xD;&#xA;&#xD;&#xA; - retrieve all the entries of the session.nextKeys map and check the above for the specific ImOnline key (expensive)&#xD;&#xA; - query the [keyOwner](https://polkadot.js.org/docs/substrate/storage#keyownerspcorecryptokeytypeidbytes-optionaccountid32) for the specific key&#xD;&#xA;&#xD;&#xA;Both will trace you back to the actual stash. There is no specific mapping from stash -&gt; IP in the online runtime storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="11989" PostHistoryTypeId="2" PostId="3196" RevisionGUID="6ba6bc0d-f951-4aa1-9229-d7fb22730842" CreationDate="2022-06-10T19:38:10.287" UserId="74" Text="# Overview&#xD;&#xA;We are trying to test Ink! functions that leverage optional function arguments. Yet, it seems that the typescript tests don't play nicely with optional types. The encoding system is not resolving this and instead giving us errors around the length of these types.&#xD;&#xA;&#xD;&#xA;## Example&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Used to unwrap/burn the wrapper token on behalf of a sender.&#xD;&#xA;///&#xD;&#xA;/// * `token_address` - is the optional address of PSP22 to unwrap into,&#xD;&#xA;/// * `amount` - is the amount of tokens to burn&#xD;&#xA;/// * `recipient` is the address to transfer to&#xD;&#xA;#[ink(message, payable)]&#xD;&#xA;pub fn unwrap_and_send_to(&#xD;&#xA;    &amp;mut self,&#xD;&#xA;    token_address: Option&lt;AccountId&gt;,&#xD;&#xA;    amount: Balance,&#xD;&#xA;    recipient: AccountId,&#xD;&#xA;) -&gt; Result&lt;()&gt; {&#xD;&#xA;    self.is_valid_unwrapping(token_address, amount)?;&#xD;&#xA;&#xD;&#xA;    self.do_unwrap(&#xD;&#xA;        token_address.clone(),&#xD;&#xA;        recipient,&#xD;&#xA;        self.env().caller(),&#xD;&#xA;        amount,&#xD;&#xA;    )?;&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We want to test this using redspot, using the flow.&#xD;&#xA;```&#xD;&#xA;const optionalAddress = api.createType('Option&lt;AccountId&gt;', tokenContract.address);&#xD;&#xA;// now do unwrapping&#xD;&#xA;let unwrapFunction =&#xD;&#xA;  await tokenWrapperContract.tx.unwrapAndSendTo(&#xD;&#xA;    optionalAddress,&#xD;&#xA;    1,&#xD;&#xA;    FerdieSigner.address,&#xD;&#xA;    { value: 10 }&#xD;&#xA;  );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Yet we hit the error:&#xD;&#xA;```&#xD;&#xA;     Error: createType(Option&lt;AccountId&gt;):: Invalid AccountId provided, expected 32 bytes, found 31&#xD;&#xA;```&#xD;&#xA;The error persists even if we don't use `api.createType('Option&lt;AccountId&gt;', ...)` and if we pass the address in directly. If we remove optional types from the Ink! function and pass in directly, the test succeeds. Any insight into how to handle optional types or should we avoid this entirely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="11991" PostHistoryTypeId="1" PostId="3196" RevisionGUID="6ba6bc0d-f951-4aa1-9229-d7fb22730842" CreationDate="2022-06-10T19:38:10.287" UserId="74" Text="Using optional types in Ink! smart contracts and how to resolve in tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="11992" PostHistoryTypeId="3" PostId="3196" RevisionGUID="6ba6bc0d-f951-4aa1-9229-d7fb22730842" CreationDate="2022-06-10T19:38:10.287" UserId="74" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11993" PostHistoryTypeId="2" PostId="3197" RevisionGUID="c889620c-8797-41af-8084-e849d2dedb15" CreationDate="2022-06-10T20:22:11.150" UserId="2408" Text="I have only 2 tests in my ink! contract yet and one of them fails with&#xD;&#xA;```&#xD;&#xA;ERROR: `&quot;/home/creestl/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;test&quot; &quot;&quot;` failed with exit code: Some(101)&#xD;&#xA;```&#xD;&#xA;error message. I know which one it is, but it's not clear from the error message.  &#xD;&#xA;I suppose the `&quot;test&quot; &quot;&quot;` part must include test name in quotes but it does not.  &#xD;&#xA;&#xD;&#xA;Is there any way to distinguish one failed test from another? " ContentLicense="CC BY-SA 4.0" />
  <row Id="11995" PostHistoryTypeId="1" PostId="3197" RevisionGUID="c889620c-8797-41af-8084-e849d2dedb15" CreationDate="2022-06-10T20:22:11.150" UserId="2408" Text="How to understand which test failed in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="11996" PostHistoryTypeId="3" PostId="3197" RevisionGUID="c889620c-8797-41af-8084-e849d2dedb15" CreationDate="2022-06-10T20:22:11.150" UserId="2408" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="11997" PostHistoryTypeId="2" PostId="3198" RevisionGUID="25792de0-f033-47b4-aba9-0b55af236083" CreationDate="2022-06-10T20:48:17.577" UserId="570" Text="could someone help me with this please.&#xD;&#xA;I am using the polkadot.js explorer to add a collection of NFT's to a chain. I can add the collection using this.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Does anyone know how to add the name of an Item? So it will show up here.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/G3aWZ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/9cTAR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="11999" PostHistoryTypeId="1" PostId="3198" RevisionGUID="25792de0-f033-47b4-aba9-0b55af236083" CreationDate="2022-06-10T20:48:17.577" UserId="570" Text="Polkadot.js API how to add the name of an item and collection of NFT's using uniques" ContentLicense="CC BY-SA 4.0" />
  <row Id="12000" PostHistoryTypeId="3" PostId="3198" RevisionGUID="25792de0-f033-47b4-aba9-0b55af236083" CreationDate="2022-06-10T20:48:17.577" UserId="570" Text="|polkadot-js|api|nft|uniques|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12001" PostHistoryTypeId="2" PostId="3199" RevisionGUID="5c3ac12c-e94a-4b56-81ff-6aab396a71a1" CreationDate="2022-06-10T22:20:08.957" UserId="507" Text="name comes from ipfs JSON object that you can add using setMetadata call&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-js/apps/blob/master/packages/page-nfts/src/Overview/Collection.tsx#L21" ContentLicense="CC BY-SA 4.0" />
  <row Id="12003" PostHistoryTypeId="5" PostId="3199" RevisionGUID="70e0bc7e-382c-45ea-84b9-70e47f3dbec4" CreationDate="2022-06-10T22:27:00.660" UserId="507" Comment="added 263 characters in body" Text="`name` comes from ipfs JSON object that you can add using setMetadata call.&#xD;&#xA;&#xD;&#xA;Let's say you have an object like &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA; name: 'My NFT #1',&#xD;&#xA; description: 'My first NFT on pallet uniques',&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You then pin this object to ipfs first, then you get back ipfs CID, that you set as metadata on your uniques NFT using setMetadata&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-js/apps/blob/master/packages/page-nfts/src/Overview/Collection.tsx#L21" ContentLicense="CC BY-SA 4.0" />
  <row Id="12004" PostHistoryTypeId="2" PostId="3200" RevisionGUID="7d01ed38-89bf-40a8-92a7-ea4f1b4d063c" CreationDate="2022-06-11T09:40:40.127" UserId="555" Text="I just clone the Polkadot repo v0.9.20 and build. When I run the chain sudo option is not showing in developer section.&#xD;&#xA;Running chain on 127.0.0.1:9944.&#xD;&#xA;Can anyone please tell why this thing happen?&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12006" PostHistoryTypeId="1" PostId="3200" RevisionGUID="7d01ed38-89bf-40a8-92a7-ea4f1b4d063c" CreationDate="2022-06-11T09:40:40.127" UserId="555" Text="Sudo option is missing" ContentLicense="CC BY-SA 4.0" />
  <row Id="12007" PostHistoryTypeId="3" PostId="3200" RevisionGUID="7d01ed38-89bf-40a8-92a7-ea4f1b4d063c" CreationDate="2022-06-11T09:40:40.127" UserId="555" Text="|polkadot-js|rococo|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12009" PostHistoryTypeId="2" PostId="3201" RevisionGUID="caeaf93f-41fa-48d1-a010-0dd97af35310" CreationDate="2022-06-11T10:06:40.987" UserId="627" Text="When the pallet doesn't show, it means it is not included in the runtime.&#xD;&#xA;&#xD;&#xA;Since the Polkadot repo is meant to support the live/production Polkadot network, this module is not included in the [runtime config](https://github.com/paritytech/polkadot/blob/016dc7297101710db0483ab6ef199e244dff711d/runtime/polkadot/src/lib.rs#L1391-L1484). Polkadot is deployed with democracy to take care of all root operations. &#xD;&#xA;&#xD;&#xA;This is unlike Substrate itself which is a sample node and therefore does have [sudo in the runtime](https://github.com/paritytech/substrate/blob/bc310fdd1040af8a3d2901b5d6f4cf8d5250aeb7/bin/node/runtime/src/lib.rs#L1600)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12011" PostHistoryTypeId="2" PostId="3202" RevisionGUID="36132c01-337d-4696-a33f-543d79c7ae8f" CreationDate="2022-06-11T13:01:47.073" UserId="354" Text="I am building a blockchain using substrate framework and after adding the required pallets, and compiling them successfully getting a runtime error `Unable to author block in slot 413737816,. can_author_with returned: spec_name does not match node vs Test Probably a node update is required!`, i was trying to solve this issue and bumped to [this github issue][1]  but was still not able to resolve the error, i am attaching the screenshot of the error, can someone help me with this.[![runtime error][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/issues/731&#xD;&#xA;  [2]: https://i.stack.imgur.com/MV3qd.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12013" PostHistoryTypeId="1" PostId="3202" RevisionGUID="36132c01-337d-4696-a33f-543d79c7ae8f" CreationDate="2022-06-11T13:01:47.073" UserId="354" Text="Getting error unable to author blocks while starting blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="12014" PostHistoryTypeId="3" PostId="3202" RevisionGUID="36132c01-337d-4696-a33f-543d79c7ae8f" CreationDate="2022-06-11T13:01:47.073" UserId="354" Text="|substrate-node|polkadot|kusama|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12015" PostHistoryTypeId="2" PostId="3203" RevisionGUID="0077b07f-7b2a-4b20-a882-085b56a376ae" CreationDate="2022-06-11T14:38:57.843" UserId="85" Text="git cherrypick this commit and read the commit comment for the step to fixup the Cargo.toml after:&#xD;&#xA;https://github.com/paritytech/polkadot/commit/791c8b8f9e6fe00b631f2cace0d6d65151487eb4&#xD;&#xA;&#xD;&#xA;That will quickly add sudo to polkadot (for testing purposes)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12017" PostHistoryTypeId="52" PostId="3200" RevisionGUID="9f5250ce-53eb-41ce-ae9b-5770c34ed16e" CreationDate="2022-06-11T17:47:27.640" />
  <row Id="12022" PostHistoryTypeId="2" PostId="3205" RevisionGUID="84a33886-a777-4128-a726-1653b5627638" CreationDate="2022-06-11T19:20:39.257" UserId="2340" Text="I'm writing a hook that will pop `Calls` out of storage and dispatch them.&#xD;&#xA;I want to dispatch as many of those calls as possible in the limits of `max_block`.  &#xD;&#xA;My approach was to store the cumulated weight of thoses calls in a variable, and check before each new dispatch that `cumulated_weight + next_call.get_dispatch_info().weight &lt; max_block`. This way I make sure that even in the worst case scenario, dispatching this call won't lead to an excess of weigh in the block.&#xD;&#xA;&#xD;&#xA;My question is:   &#xD;&#xA;Should I use `cumulated_weight + next_call.get_dispatch_info().weight &lt; max_block - base_block` instead ?&#xD;&#xA;It's not clear in the [documentation][1] if `max_block` exist on top of `base_block` or if `base_block` is to take into account as consuming part of `max_block`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/monthly-2021-09+1/frame_system/limits/struct.BlockWeights.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="12024" PostHistoryTypeId="1" PostId="3205" RevisionGUID="84a33886-a777-4128-a726-1653b5627638" CreationDate="2022-06-11T19:20:39.257" UserId="2340" Text="Does `max_block` take into account `base_block`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12025" PostHistoryTypeId="3" PostId="3205" RevisionGUID="84a33886-a777-4128-a726-1653b5627638" CreationDate="2022-06-11T19:20:39.257" UserId="2340" Text="|weight|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12026" PostHistoryTypeId="5" PostId="3197" RevisionGUID="5d04c9de-25a7-4787-a9f2-e0aa22bc2ab8" CreationDate="2022-06-11T20:00:08.063" UserId="2408" Comment="added 897 characters in body" Text="I've been testing my ink! contract and one of the tests failed.  &#xD;&#xA;The test that failed:&#xD;&#xA;```&#xD;&#xA;#[ink::test]&#xD;&#xA;fn get_bids_made_works() {&#xD;&#xA;    let bid = 100u128;&#xD;&#xA;    let mut bag = Moneybag::new(bid);&#xD;&#xA;    let accounts = default_accounts::&lt;DefaultEnvironment&gt;();&#xD;&#xA;    let bob: AccountId = accounts.bob;&#xD;&#xA;    set_caller::&lt;DefaultEnvironment&gt;(bob);&#xD;&#xA;    bag.add_bid(bid).unwrap();&#xD;&#xA;    assert_eq!(bag.get_bids_made(), 3);       &#xD;&#xA;}  &#xD;&#xA;```  &#xD;&#xA;The Error message:&#xD;&#xA;```&#xD;&#xA; Finished test [unoptimized + debuginfo] target(s) in 2.76s&#xD;&#xA;     Running unittests src/lib.rs (target/debug/deps/moneybag-1ffd8ca9ab27f17f)&#xD;&#xA;error: test failed, to rerun pass '--lib'&#xD;&#xA;ERROR: `&quot;/home/creestl/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;test&quot; &quot;&quot;` failed with exit code: Some(101)&#xD;&#xA;```&#xD;&#xA;From the error message it is _not_ clear which test function that was. But to me it was just obvious that it was the `get_bids_made_works` that I've provided above. But what if it was not so obvious? And what if instead of 6 tests I had 50?  &#xD;&#xA;I see that in the error message there is a `&quot;test&quot; &quot;&quot;` part. And I suppose that it should include the name of the test function, but it does not. Should I use some macro to define test's name? e.g.:&#xD;&#xA;```&#xD;&#xA;#[ink::test]&#xD;&#xA;#[ink::test_name(&quot;NiceTest&quot;)]&#xD;&#xA;. &#xD;&#xA;.&#xD;&#xA;.&#xD;&#xA;```&#xD;&#xA;How do I distinguish one failed test from another?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12027" PostHistoryTypeId="2" PostId="3206" RevisionGUID="a7c2bc8b-c14c-48cc-8643-171cb9676a15" CreationDate="2022-06-11T20:09:17.627" UserId="2340" Text="I used to think that each read/write access to storage account for the same `weight`. But does it ? Or is there a linear relation between the (encoded) size of the data accessed and the price to pay ?&#xD;&#xA;&#xD;&#xA;Does a read on a huge `struct` account for for the same as a read of a simple `u8` ? What about vectors, does it cost more to read/write a huge vector that a small one ?&#xD;&#xA;&#xD;&#xA;In the same vein, does removing a value, a key or an entire suffix from count as a write ? We are freeing space their so I expect it not to, but I couldn't find a clear explanation." ContentLicense="CC BY-SA 4.0" />
  <row Id="12029" PostHistoryTypeId="1" PostId="3206" RevisionGUID="a7c2bc8b-c14c-48cc-8643-171cb9676a15" CreationDate="2022-06-11T20:09:17.627" UserId="2340" Text="Are read/write weight propotional to the size of the data manipulated?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12030" PostHistoryTypeId="3" PostId="3206" RevisionGUID="a7c2bc8b-c14c-48cc-8643-171cb9676a15" CreationDate="2022-06-11T20:09:17.627" UserId="2340" Text="|storage|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12031" PostHistoryTypeId="2" PostId="3207" RevisionGUID="08fea203-1725-43d5-aeae-3ab09dc61d98" CreationDate="2022-06-11T20:30:55.300" UserId="298" Text="I’d like to see if I can speed up block time rapidly with empty blocks to get to a target block number, before slow block time to 6 seconds. How fast could I feasibly go? Can I do 10 blocks per second, or is there a limit? &#xD;&#xA;&#xD;&#xA;And are there considerations with BABE vs AURA? Is it easier with Aura so I can use just one node making selection trivial? " ContentLicense="CC BY-SA 4.0" />
  <row Id="12033" PostHistoryTypeId="1" PostId="3207" RevisionGUID="08fea203-1725-43d5-aeae-3ab09dc61d98" CreationDate="2022-06-11T20:30:55.300" UserId="298" Text="How fast can you feasibly speed up blocktime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12034" PostHistoryTypeId="3" PostId="3207" RevisionGUID="08fea203-1725-43d5-aeae-3ab09dc61d98" CreationDate="2022-06-11T20:30:55.300" UserId="298" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12037" PostHistoryTypeId="2" PostId="3209" RevisionGUID="c5f666e6-95e4-4a32-9096-c6a4cbff37b7" CreationDate="2022-06-11T22:18:44.760" UserId="2340" Text="I'm writing a hook for a pallet, this hook pop `Call` out of storage and execute them in behalf of a specified user through `call.dispatch(origin)`.&#xD;&#xA; &#xD;&#xA;My question is:  &#xD;&#xA;Does `dispatch` will make `origin` pay the fees associated with this `Call` ?  &#xD;&#xA;If yes the call may fail due to not having enough funds. &#xD;&#xA;If so I should either reserve the amount before pushing the call in the queue. Or push it back to the queue if it failed for this specific reason, and retry later.&#xD;&#xA;&#xD;&#xA;And how does this work when a extrinsic signed by an account trigger a `call.dispatch`, for another account. Who is paying the fees for the dispatched call ?  &#xD;&#xA;And can I have confirmation that nobody pay fees for the code executed inside hooks ?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12039" PostHistoryTypeId="1" PostId="3209" RevisionGUID="c5f666e6-95e4-4a32-9096-c6a4cbff37b7" CreationDate="2022-06-11T22:18:44.760" UserId="2340" Text="Does call.dispatch make `origin` pay the fees to the network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12040" PostHistoryTypeId="3" PostId="3209" RevisionGUID="c5f666e6-95e4-4a32-9096-c6a4cbff37b7" CreationDate="2022-06-11T22:18:44.760" UserId="2340" Text="|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12041" PostHistoryTypeId="5" PostId="3209" RevisionGUID="fee2ceec-deeb-4e73-b2f6-20c6627ecf07" CreationDate="2022-06-11T22:24:40.823" UserId="2340" Comment="added 89 characters in body" Text="I'm writing a hook for a pallet, this hook pop `Call` out of storage and execute them in behalf of a specified user through `call.dispatch(origin)`.&#xD;&#xA; &#xD;&#xA;My question is:  &#xD;&#xA;Does `dispatch` will make `origin` pay the fees associated with this `Call`?  &#xD;&#xA;If yes the call may fail due to not having enough funds. &#xD;&#xA;If so I should either reserve the amount before pushing the call in the queue. Or push it back to the queue if it failed for this specific reason, and retry later.&#xD;&#xA;&#xD;&#xA;And how does this work when a extrinsic signed by an account trigger a `call.dispatch`, for another account. Who is paying the fees for the dispatched call? The account signing the original call ? Or the `origin` specified in the `call.dispatch`?  &#xD;&#xA;And can I have confirmation that nobody pays fees for the code executed inside hooks? The `-&gt; Weight` returned by those hooks is only used to increment `BlockWeights` field `max_block`.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12042" PostHistoryTypeId="5" PostId="3209" RevisionGUID="3dac0a95-c53d-4cc5-8b97-445ccf08192d" CreationDate="2022-06-11T22:39:48.030" UserId="2340" Comment="added 77 characters in body" Text="I'm writing a hook for a pallet, this hook pop `Call` out of storage and execute them on behalf of a specified user through `call.dispatch(origin)`.&#xD;&#xA; &#xD;&#xA;My question is:  &#xD;&#xA;Does `dispatch` will make `origin` pay the fees associated with this `Call`?  &#xD;&#xA;If yes is that true both in a the context of a `hook` and in the context of a regular user triggered call causing a `call.dispatch` to be issued? Even if that inner call have a different `origin`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12043" PostHistoryTypeId="5" PostId="3209" RevisionGUID="5c20b1e9-0c02-4c4a-aa66-d40e5a3d36ce" CreationDate="2022-06-11T22:45:34.143" UserId="2340" Comment="added 77 characters in body" Text="I'm writing a hook for a pallet, this hook pop `Call` out of storage and execute them on behalf of a specified user through `call.dispatch(origin)`.&#xD;&#xA; &#xD;&#xA;My question is:  &#xD;&#xA;Will `dispatch` will make `origin` pay the fees associated with this `Call`?  &#xD;&#xA;If yes is that true both in a the context of a `hook` and in the context of a regular user triggered call causing a `call.dispatch` to be issued? Who pay for what if the `origin` of the dispatched call is different from the origin of the original call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12044" PostHistoryTypeId="2" PostId="3210" RevisionGUID="eb30d871-ed1a-415c-a479-7a766c0828c1" CreationDate="2022-06-12T00:09:22.800" UserId="2340" Text="Hooks can do computation and read/write storage. Operations that usually comes at price.&#xD;&#xA;Those hooks return a `-&gt; Weight` value, but from my understanding nobody is paying for this. It's just used to increment `BlockWeights` a counter that must not go above `base_block`.&#xD;&#xA;&#xD;&#xA;This given while reading `FRAME` pallets it's unclear for me what part of the hook computation should be taken into account into this returned `Weight`.&#xD;&#xA;&#xD;&#xA;I more or less found two cases:&#xD;&#xA; - small hooks with few computation (eg: https://paritytech.github.io/substrate/latest/src/pallet_aura/lib.rs.html#88-115), where only cost of the read and write operations are taken into account&#xD;&#xA; - more complex ones (eg: https://paritytech.github.io/substrate/monthly-2021-09+1/src/pallet_elections_phragmen/lib.rs.html#253), where a benchmark have been trained and it's output is returned. Seems to take both computation and storage operation into account.&#xD;&#xA;&#xD;&#xA;But in some pallets, part of the operation seems to be not taken into account: https://paritytech.github.io/substrate/latest/src/pallet_election_provider_multi_phase/lib.rs.html#700. The `let current_phase = Self::current_phase();` is a read that I don't see being added to the weight.&#xD;&#xA;&#xD;&#xA;And the last category is hooks that return 0, such as `autorship`, `babe`.&#xD;&#xA;&#xD;&#xA;I would greatly appreciate to have at least a rule of thumb on what I am suppose to do with my `on_initialize` hooks, and if that exist a clear guide on what to do and list of the different cases I can face. " ContentLicense="CC BY-SA 4.0" />
  <row Id="12046" PostHistoryTypeId="1" PostId="3210" RevisionGUID="eb30d871-ed1a-415c-a479-7a766c0828c1" CreationDate="2022-06-12T00:09:22.800" UserId="2340" Text="Does anybody pays for computation inside hooks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12047" PostHistoryTypeId="3" PostId="3210" RevisionGUID="eb30d871-ed1a-415c-a479-7a766c0828c1" CreationDate="2022-06-12T00:09:22.800" UserId="2340" Text="|pallet|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12048" PostHistoryTypeId="6" PostId="3210" RevisionGUID="878acef9-d126-444e-8e9b-0acd6763ccd5" CreationDate="2022-06-12T00:29:48.640" UserId="2340" Comment="edited tags" Text="|substrate-node|pallet|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12049" PostHistoryTypeId="6" PostId="3205" RevisionGUID="2d93a9d2-7e65-4735-b1a5-485164790ccf" CreationDate="2022-06-12T00:30:16.927" UserId="2340" Comment="edited tags" Text="|substrate-node|weight|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12050" PostHistoryTypeId="6" PostId="3206" RevisionGUID="a676c6c6-1874-4c23-9648-45b6e8cac9f4" CreationDate="2022-06-12T00:30:35.870" UserId="2340" Comment="edited tags" Text="|substrate-node|storage|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12051" PostHistoryTypeId="6" PostId="3209" RevisionGUID="ac9ef8da-b240-4ca5-a32b-d42e0ac5ab73" CreationDate="2022-06-12T00:30:49.650" UserId="2340" Comment="edited tags" Text="|substrate-node|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12056" PostHistoryTypeId="2" PostId="3212" RevisionGUID="2994bfe5-43a7-4b8d-a6ef-2af41da90e1b" CreationDate="2022-06-12T06:26:33.833" UserId="2721" Text="it wont let us register a parachain id on rococo the nextFreeId is &quot;3,026&quot; and its already taken from Bajun Network&#xD;&#xA;&#xD;&#xA;&quot;system.ExtrinsicFailed&#xD;&#xA;registrar.AlreadyRegistered&quot; when tx is submitted&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains/parathreads&#xD;&#xA;&#xD;&#xA;the chain would need sudo intervention to fix the slots and we can't post a issue on subport. See here for a previous occurrence of the same issue - https://substrate.stackexchange.com/questions/1418/provided-next-available-para-id-is-already-registered&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12058" PostHistoryTypeId="1" PostId="3212" RevisionGUID="2994bfe5-43a7-4b8d-a6ef-2af41da90e1b" CreationDate="2022-06-12T06:26:33.833" UserId="2721" Text="next available para id is already registered" ContentLicense="CC BY-SA 4.0" />
  <row Id="12059" PostHistoryTypeId="3" PostId="3212" RevisionGUID="2994bfe5-43a7-4b8d-a6ef-2af41da90e1b" CreationDate="2022-06-12T06:26:33.833" UserId="2721" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12060" PostHistoryTypeId="2" PostId="3213" RevisionGUID="72efc41b-858d-475e-8a85-12c9edb868e1" CreationDate="2022-06-12T06:29:27.527" UserId="2720" Text="I want to build an ink! contract where some functions need to verify messages signed by the caller. &#xD;&#xA;&#xD;&#xA;In ink! contract there is a helper function named `ink_env::ecdsa_recover()`, which seems helpful in my use case. However, I am not sure how to sign ecdsa messages using polkadot.{js}. I can only generate sr25519 signatures.&#xD;&#xA;&#xD;&#xA;An alternative is to verify sr25519 signatures in the contract instead of ecdsa signatures. However, it seems that verifying sr25519 signatures requires the caller's public key, but I only have the caller's `AccountId` (or address). Is there a way to convert the address to the public key in ink! contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12062" PostHistoryTypeId="1" PostId="3213" RevisionGUID="72efc41b-858d-475e-8a85-12c9edb868e1" CreationDate="2022-06-12T06:29:27.527" UserId="2720" Text="How to sign a message using ECDSA key pairs in Polkadot.js so it can be verified in the ink! contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="12063" PostHistoryTypeId="3" PostId="3213" RevisionGUID="72efc41b-858d-475e-8a85-12c9edb868e1" CreationDate="2022-06-12T06:29:27.527" UserId="2720" Text="|substrate-node|polkadot-js|ink|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12064" PostHistoryTypeId="33" PostId="3146" RevisionGUID="5255d19b-a3eb-4114-892d-203aeaa2338c" CreationDate="2022-06-12T07:55:51.113" UserId="3" Comment="8" />
  <row Id="12065" PostHistoryTypeId="2" PostId="3214" RevisionGUID="a747a0f6-e87f-46b0-aaa4-f5514c0b51e5" CreationDate="2022-06-12T07:56:19.947" UserId="620" Text="&gt; Will dispatch will make origin pay the fees associated with this Call?&#xD;&#xA;&#xD;&#xA;No, only the signer of a transaction will pay fees for it (although there are some PRs in Substrate to make that a bit more flexible, so this answer may change).&#xD;&#xA;&#xD;&#xA;When executing a transaction, it goes through a few phases: pre-dispatch, dispatch, and post-dispatch. The fee for the given length/weight is taken in the pre-dispatch phase, and it won't even dispatch if the account cannot pay the fees. Then dispatch happens, and any fee refund/change, if there is some, would happen in post-dispatch. So, `dispatch` assumes that whatever conditions for dispatch (e.g. a fee, or scheduling by referendum) have already taken place." ContentLicense="CC BY-SA 4.0" />
  <row Id="12067" PostHistoryTypeId="2" PostId="3215" RevisionGUID="45eb130a-e0b9-465b-83ec-d4a3ae1fc6ca" CreationDate="2022-06-12T10:22:07.007" UserId="2006" Text="When trying to transfer a parachain's native token to an asset on Statemint, i am having issues in figuring out the conversion of the asset's `MultiLocation = (Here, 1_000_000_000).into()`  into the `MultiLocation` of the assets pallet `X2(PalletInstance(1), GeneralIndex(1))` on statemint. &#xD;&#xA;&#xD;&#xA;I m using xcm-simulator with Statemint's xcm-configs copied into the simulated parachain:&#xD;&#xA;```rust&#xD;&#xA;/// Means for transacting the native currency on this chain.&#xD;&#xA;pub type CurrencyTransactor = XcmCurrencyAdapter&lt;&#xD;&#xA;	// Use this currency:&#xD;&#xA;	Balances,&#xD;&#xA;	// Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;	IsConcrete&lt;DotLocation&gt;,&#xD;&#xA;	// Convert an XCM MultiLocation into a local account id:&#xD;&#xA;	LocationToAccountId,&#xD;&#xA;	// Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;	AccountId,&#xD;&#xA;	// We don't track any teleports of `Balances`.&#xD;&#xA;	(),&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;/// Means for transacting assets besides the native currency on this chain.&#xD;&#xA;pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;	// Use this fungibles implementation:&#xD;&#xA;	Assets,&#xD;&#xA;	// Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;	ConvertedConcreteAssetId&lt;&#xD;&#xA;		StatemintAssetId,&#xD;&#xA;		Balance,&#xD;&#xA;		AsPrefixedGeneralIndex&lt;AssetsPalletLocation, StatemintAssetId, JustTry&gt;,&#xD;&#xA;		JustTry,&#xD;&#xA;	&gt;,&#xD;&#xA;	// Convert an XCM MultiLocation into a local account id:&#xD;&#xA;	LocationToAccountId,&#xD;&#xA;	// Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;	AccountId,&#xD;&#xA;	// We only want to allow teleports of known assets. We use non-zero issuance as an indication&#xD;&#xA;	// that this asset is known.&#xD;&#xA;	parachains_common::impls::NonZeroIssuance&lt;AccountId, Assets&gt;,&#xD;&#xA;	// The account to use for tracking teleports.&#xD;&#xA;	CheckingAccount,&#xD;&#xA;&gt;;&#xD;&#xA;/// Means for transacting assets on this chain.&#xD;&#xA;pub type AssetTransactors = (CurrencyTransactor, FungiblesTransactor);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where the `AssetTransactors` is set in the `XcmConfig` struct.&#xD;&#xA;&#xD;&#xA;In the simulator, the parachains are configured such that:&#xD;&#xA;- Parachain 1 is the native asset parachain&#xD;&#xA;- Parachain 2 is statemint&#xD;&#xA;&#xD;&#xA;Trying to reserve transfer asset as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert_ok!(Parachain1PalletXcm::reserve_transfer_assets(&#xD;&#xA;	parachain1::Origin::signed(ALICE), // Origin&#xD;&#xA;	Box::new((1, Parachain(2)).into()), // Destination&#xD;&#xA;	Box::new(X1(AccountId32 { network: Any, id: ALICE.into() }).into().into()), // Beneficiary&#xD;&#xA;	Box::new((Here, 1_000_000_000).into()), // Asset&#xD;&#xA;	0,&#xD;&#xA;));&#xD;&#xA;```&#xD;&#xA;i can see that:&#xD;&#xA;```&#xD;&#xA;ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X1(Parachain(1)) }), fun: Fungible(1000000000) }]))&#xD;&#xA;Asset: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X1(Parachain(1)) }), fun: Fungible(1000000000) }&#xD;&#xA;```&#xD;&#xA;And results in:&#xD;&#xA;```&#xD;&#xA;Error FailedToTransactAsset(&quot;AssetIdConversionFailed&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which is the expected behavior from the statemint parachain config, as the code does not specify the target pallet to which the assets are transferred. However, the construction of the message should redirect the native asset from Parachain 1 to Statemint's asset pallet, so the alternative approach i took was:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let target_multiasset: MultiAssets = vec![MultiAsset {&#xD;&#xA;	id: Concrete(MultiLocation {&#xD;&#xA;		parents: 0,&#xD;&#xA;		interior: X2(PalletInstance(1), GeneralIndex(1)),&#xD;&#xA;	}),&#xD;&#xA;	fun: Fungible(amount),&#xD;&#xA;}]&#xD;&#xA;.into();&#xD;&#xA;let local_location: MultiLocation = (0, Here).into();&#xD;&#xA;let parachain_1_location_for_statemint: MultiLocation = (1, Parachain(1)).into();&#xD;&#xA;assert_ok!(Parachain1PalletXcm::execute(&#xD;&#xA;	parachain1::Origin::signed(ALICE),&#xD;&#xA;	Box::new(VersionedXcm::V2(Xcm(vec![TransferReserveAsset {&#xD;&#xA;		assets: (local, amount).into(),&#xD;&#xA;		dest: (1, Parachain(2)).into(),&#xD;&#xA;		xcm: Xcm(vec![&#xD;&#xA;			BuyExecution {&#xD;&#xA;				fees: (parachain_1_location_for_statemint, amount).into(),&#xD;&#xA;				weight_limit: Limited(4)&#xD;&#xA;			},&#xD;&#xA;			DepositAsset {&#xD;&#xA;				assets: Definite(target_multiasset),&#xD;&#xA;				max_assets: 1,&#xD;&#xA;				beneficiary: X1(AccountId32 { network: Any, id: ALICE.into() })&#xD;&#xA;					.into()&#xD;&#xA;					.into(),&#xD;&#xA;			}&#xD;&#xA;		])&#xD;&#xA;	}]))),&#xD;&#xA;	1000u64, // Weight&#xD;&#xA;));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which results in a trace as follows:&#xD;&#xA;```&#xD;&#xA;DepositAsset { assets: Definite(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(1), GeneralIndex(1)) }), fun: Fungible(1000000000) }])), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) } }&#xD;&#xA;RESULT: Ok(())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this case, neither of the `FungibleTransactor` nor the `CurrencyTransactor` are called which i imagine is caused by the fact that the asset is not recognized when received by the statemint simulated parachain.&#xD;&#xA;&#xD;&#xA;One noteworthy observation to make here is that changing the `what: &amp;MultiAsset` parameter in `deposit_asset` in xcm-builder's `FungibleAdapter` to:&#xD;&#xA;```rustlet what = MultiAsset {&#xD;&#xA;	id: Concrete(MultiLocation {&#xD;&#xA;		parents: 0,&#xD;&#xA;		interior: Junctions::X2(Junction::PalletInstance(1), Junction::GeneralIndex(1)),&#xD;&#xA;	}),&#xD;&#xA;	fun: Fungible(1_000_000_000),&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;In the first approach calling `reserve_transfer_assets` would work. But this would mean that changes on the statemint parachain are required to make such a transfer happen.&#xD;&#xA;&#xD;&#xA;Is there a way to make this work without having to change the statemint parachain in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12069" PostHistoryTypeId="1" PostId="3215" RevisionGUID="45eb130a-e0b9-465b-83ec-d4a3ae1fc6ca" CreationDate="2022-06-12T10:22:07.007" UserId="2006" Text="XCM: Reserve transfer MultiLocation mapping" ContentLicense="CC BY-SA 4.0" />
  <row Id="12070" PostHistoryTypeId="3" PostId="3215" RevisionGUID="45eb130a-e0b9-465b-83ec-d4a3ae1fc6ca" CreationDate="2022-06-12T10:22:07.007" UserId="2006" Text="|parachain|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12071" PostHistoryTypeId="5" PostId="3215" RevisionGUID="84ea9c6d-5c4c-4645-a07a-eb93eaf8f13a" CreationDate="2022-06-12T10:22:43.250" UserId="2006" Comment="added 2 characters in body" Text="When trying to transfer a parachain's native token to an asset on Statemint, i am having issues in figuring out the conversion of the asset's `MultiLocation = (Here, 1_000_000_000).into()`  into the `MultiLocation` of the assets pallet `X2(PalletInstance(1), GeneralIndex(1))` on statemint. &#xD;&#xA;&#xD;&#xA;I m using xcm-simulator with Statemint's xcm-configs copied into the simulated parachain:&#xD;&#xA;```rust&#xD;&#xA;/// Means for transacting the native currency on this chain.&#xD;&#xA;pub type CurrencyTransactor = XcmCurrencyAdapter&lt;&#xD;&#xA;	// Use this currency:&#xD;&#xA;	Balances,&#xD;&#xA;	// Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;	IsConcrete&lt;DotLocation&gt;,&#xD;&#xA;	// Convert an XCM MultiLocation into a local account id:&#xD;&#xA;	LocationToAccountId,&#xD;&#xA;	// Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;	AccountId,&#xD;&#xA;	// We don't track any teleports of `Balances`.&#xD;&#xA;	(),&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;/// Means for transacting assets besides the native currency on this chain.&#xD;&#xA;pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;	// Use this fungibles implementation:&#xD;&#xA;	Assets,&#xD;&#xA;	// Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;	ConvertedConcreteAssetId&lt;&#xD;&#xA;		StatemintAssetId,&#xD;&#xA;		Balance,&#xD;&#xA;		AsPrefixedGeneralIndex&lt;AssetsPalletLocation, StatemintAssetId, JustTry&gt;,&#xD;&#xA;		JustTry,&#xD;&#xA;	&gt;,&#xD;&#xA;	// Convert an XCM MultiLocation into a local account id:&#xD;&#xA;	LocationToAccountId,&#xD;&#xA;	// Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;	AccountId,&#xD;&#xA;	// We only want to allow teleports of known assets. We use non-zero issuance as an indication&#xD;&#xA;	// that this asset is known.&#xD;&#xA;	parachains_common::impls::NonZeroIssuance&lt;AccountId, Assets&gt;,&#xD;&#xA;	// The account to use for tracking teleports.&#xD;&#xA;	CheckingAccount,&#xD;&#xA;&gt;;&#xD;&#xA;/// Means for transacting assets on this chain.&#xD;&#xA;pub type AssetTransactors = (CurrencyTransactor, FungiblesTransactor);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where the `AssetTransactors` is set in the `XcmConfig` struct.&#xD;&#xA;&#xD;&#xA;In the simulator, the parachains are configured such that:&#xD;&#xA;- Parachain 1 is the native asset parachain&#xD;&#xA;- Parachain 2 is statemint&#xD;&#xA;&#xD;&#xA;Trying to reserve transfer asset as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert_ok!(Parachain1PalletXcm::reserve_transfer_assets(&#xD;&#xA;	parachain1::Origin::signed(ALICE), // Origin&#xD;&#xA;	Box::new((1, Parachain(2)).into()), // Destination&#xD;&#xA;	Box::new(X1(AccountId32 { network: Any, id: ALICE.into() }).into().into()), // Beneficiary&#xD;&#xA;	Box::new((Here, 1_000_000_000).into()), // Asset&#xD;&#xA;	0,&#xD;&#xA;));&#xD;&#xA;```&#xD;&#xA;i can see that:&#xD;&#xA;```&#xD;&#xA;ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X1(Parachain(1)) }), fun: Fungible(1000000000) }]))&#xD;&#xA;Asset: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X1(Parachain(1)) }), fun: Fungible(1000000000) }&#xD;&#xA;```&#xD;&#xA;And results in:&#xD;&#xA;```&#xD;&#xA;Error FailedToTransactAsset(&quot;AssetIdConversionFailed&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which is the expected behavior from the statemint parachain config, as the code does not specify the target pallet to which the assets are transferred. However, the construction of the message should redirect the native asset from Parachain 1 to Statemint's asset pallet, so the alternative approach i took was:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let target_multiasset: MultiAssets = vec![MultiAsset {&#xD;&#xA;	id: Concrete(MultiLocation {&#xD;&#xA;		parents: 0,&#xD;&#xA;		interior: X2(PalletInstance(1), GeneralIndex(1)),&#xD;&#xA;	}),&#xD;&#xA;	fun: Fungible(amount),&#xD;&#xA;}]&#xD;&#xA;.into();&#xD;&#xA;let local_location: MultiLocation = (0, Here).into();&#xD;&#xA;let parachain_1_location_for_statemint: MultiLocation = (1, Parachain(1)).into();&#xD;&#xA;assert_ok!(Parachain1PalletXcm::execute(&#xD;&#xA;	parachain1::Origin::signed(ALICE),&#xD;&#xA;	Box::new(VersionedXcm::V2(Xcm(vec![TransferReserveAsset {&#xD;&#xA;		assets: (local, amount).into(),&#xD;&#xA;		dest: (1, Parachain(2)).into(),&#xD;&#xA;		xcm: Xcm(vec![&#xD;&#xA;			BuyExecution {&#xD;&#xA;				fees: (parachain_1_location_for_statemint, amount).into(),&#xD;&#xA;				weight_limit: Limited(4)&#xD;&#xA;			},&#xD;&#xA;			DepositAsset {&#xD;&#xA;				assets: Definite(target_multiasset),&#xD;&#xA;				max_assets: 1,&#xD;&#xA;				beneficiary: X1(AccountId32 { network: Any, id: ALICE.into() })&#xD;&#xA;					.into()&#xD;&#xA;					.into(),&#xD;&#xA;			}&#xD;&#xA;		])&#xD;&#xA;	}]))),&#xD;&#xA;	1000u64, // Weight&#xD;&#xA;));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which results in a trace as follows:&#xD;&#xA;```&#xD;&#xA;DepositAsset { assets: Definite(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(1), GeneralIndex(1)) }), fun: Fungible(1000000000) }])), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) } }&#xD;&#xA;RESULT: Ok(())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this case, neither of the `FungibleTransactor` nor the `CurrencyTransactor` are called which i imagine is caused by the fact that the asset is not recognized when received by the statemint simulated parachain.&#xD;&#xA;&#xD;&#xA;One noteworthy observation to make here is that changing the `what: &amp;MultiAsset` parameter in `deposit_asset` in xcm-builder's `FungibleAdapter` to:&#xD;&#xA;```rust&#xD;&#xA;let what = MultiAsset {&#xD;&#xA;	id: Concrete(MultiLocation {&#xD;&#xA;		parents: 0,&#xD;&#xA;		interior: Junctions::X2(Junction::PalletInstance(1), Junction::GeneralIndex(1)),&#xD;&#xA;	}),&#xD;&#xA;	fun: Fungible(1_000_000_000),&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;In the first approach calling `reserve_transfer_assets` would work. But this would mean that changes on the statemint parachain are required to make such a transfer happen.&#xD;&#xA;&#xD;&#xA;Is there a way to make this work without having to change the statemint parachain in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12072" PostHistoryTypeId="5" PostId="3215" RevisionGUID="f011c9d7-f99d-4285-abfa-a41ca674bceb" CreationDate="2022-06-12T10:35:03.193" UserId="2006" Comment="added 118 characters in body" Text="When trying to transfer a parachain's native token to an asset on Statemint, i am having issues in figuring out the conversion of the asset's `MultiLocation = (Here, 1_000_000_000).into()`  into the `MultiLocation` of the assets pallet `X2(PalletInstance(1), GeneralIndex(1))` on statemint. That is, provided that the `Assets` pallet is configured in the statemint parachain and asset ID 1 is already created.&#xD;&#xA;&#xD;&#xA;I m using xcm-simulator with Statemint's xcm-configs copied into the simulated parachain:&#xD;&#xA;```rust&#xD;&#xA;/// Means for transacting the native currency on this chain.&#xD;&#xA;pub type CurrencyTransactor = XcmCurrencyAdapter&lt;&#xD;&#xA;	// Use this currency:&#xD;&#xA;	Balances,&#xD;&#xA;	// Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;	IsConcrete&lt;DotLocation&gt;,&#xD;&#xA;	// Convert an XCM MultiLocation into a local account id:&#xD;&#xA;	LocationToAccountId,&#xD;&#xA;	// Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;	AccountId,&#xD;&#xA;	// We don't track any teleports of `Balances`.&#xD;&#xA;	(),&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;/// Means for transacting assets besides the native currency on this chain.&#xD;&#xA;pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;	// Use this fungibles implementation:&#xD;&#xA;	Assets,&#xD;&#xA;	// Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;	ConvertedConcreteAssetId&lt;&#xD;&#xA;		StatemintAssetId,&#xD;&#xA;		Balance,&#xD;&#xA;		AsPrefixedGeneralIndex&lt;AssetsPalletLocation, StatemintAssetId, JustTry&gt;,&#xD;&#xA;		JustTry,&#xD;&#xA;	&gt;,&#xD;&#xA;	// Convert an XCM MultiLocation into a local account id:&#xD;&#xA;	LocationToAccountId,&#xD;&#xA;	// Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;	AccountId,&#xD;&#xA;	// We only want to allow teleports of known assets. We use non-zero issuance as an indication&#xD;&#xA;	// that this asset is known.&#xD;&#xA;	parachains_common::impls::NonZeroIssuance&lt;AccountId, Assets&gt;,&#xD;&#xA;	// The account to use for tracking teleports.&#xD;&#xA;	CheckingAccount,&#xD;&#xA;&gt;;&#xD;&#xA;/// Means for transacting assets on this chain.&#xD;&#xA;pub type AssetTransactors = (CurrencyTransactor, FungiblesTransactor);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where the `AssetTransactors` is set in the `XcmConfig` struct.&#xD;&#xA;&#xD;&#xA;In the simulator, the parachains are configured such that:&#xD;&#xA;- Parachain 1 is the native asset parachain&#xD;&#xA;- Parachain 2 is statemint&#xD;&#xA;&#xD;&#xA;Trying to reserve transfer asset as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert_ok!(Parachain1PalletXcm::reserve_transfer_assets(&#xD;&#xA;	parachain1::Origin::signed(ALICE), // Origin&#xD;&#xA;	Box::new((1, Parachain(2)).into()), // Destination&#xD;&#xA;	Box::new(X1(AccountId32 { network: Any, id: ALICE.into() }).into().into()), // Beneficiary&#xD;&#xA;	Box::new((Here, 1_000_000_000).into()), // Asset&#xD;&#xA;	0,&#xD;&#xA;));&#xD;&#xA;```&#xD;&#xA;i can see that:&#xD;&#xA;```&#xD;&#xA;ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X1(Parachain(1)) }), fun: Fungible(1000000000) }]))&#xD;&#xA;Asset: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X1(Parachain(1)) }), fun: Fungible(1000000000) }&#xD;&#xA;```&#xD;&#xA;And results in:&#xD;&#xA;```&#xD;&#xA;Error FailedToTransactAsset(&quot;AssetIdConversionFailed&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which is the expected behavior from the statemint parachain config, as the code does not specify the target pallet to which the assets are transferred. However, the construction of the message should redirect the native asset from Parachain 1 to Statemint's asset pallet, so the alternative approach i took was:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let target_multiasset: MultiAssets = vec![MultiAsset {&#xD;&#xA;	id: Concrete(MultiLocation {&#xD;&#xA;		parents: 0,&#xD;&#xA;		interior: X2(PalletInstance(1), GeneralIndex(1)),&#xD;&#xA;	}),&#xD;&#xA;	fun: Fungible(amount),&#xD;&#xA;}]&#xD;&#xA;.into();&#xD;&#xA;let local_location: MultiLocation = (0, Here).into();&#xD;&#xA;let parachain_1_location_for_statemint: MultiLocation = (1, Parachain(1)).into();&#xD;&#xA;assert_ok!(Parachain1PalletXcm::execute(&#xD;&#xA;	parachain1::Origin::signed(ALICE),&#xD;&#xA;	Box::new(VersionedXcm::V2(Xcm(vec![TransferReserveAsset {&#xD;&#xA;		assets: (local, amount).into(),&#xD;&#xA;		dest: (1, Parachain(2)).into(),&#xD;&#xA;		xcm: Xcm(vec![&#xD;&#xA;			BuyExecution {&#xD;&#xA;				fees: (parachain_1_location_for_statemint, amount).into(),&#xD;&#xA;				weight_limit: Limited(4)&#xD;&#xA;			},&#xD;&#xA;			DepositAsset {&#xD;&#xA;				assets: Definite(target_multiasset),&#xD;&#xA;				max_assets: 1,&#xD;&#xA;				beneficiary: X1(AccountId32 { network: Any, id: ALICE.into() })&#xD;&#xA;					.into()&#xD;&#xA;					.into(),&#xD;&#xA;			}&#xD;&#xA;		])&#xD;&#xA;	}]))),&#xD;&#xA;	1000u64, // Weight&#xD;&#xA;));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which results in a trace as follows:&#xD;&#xA;```&#xD;&#xA;DepositAsset { assets: Definite(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(1), GeneralIndex(1)) }), fun: Fungible(1000000000) }])), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) } }&#xD;&#xA;RESULT: Ok(())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this case, neither of the `FungibleTransactor` nor the `CurrencyTransactor` are called which i imagine is caused by the fact that the asset is not recognized when received by the statemint simulated parachain.&#xD;&#xA;&#xD;&#xA;One noteworthy observation to make here is that changing the `what: &amp;MultiAsset` parameter in `deposit_asset` in xcm-builder's `FungibleAdapter` to:&#xD;&#xA;```rust&#xD;&#xA;let what = MultiAsset {&#xD;&#xA;	id: Concrete(MultiLocation {&#xD;&#xA;		parents: 0,&#xD;&#xA;		interior: Junctions::X2(Junction::PalletInstance(1), Junction::GeneralIndex(1)),&#xD;&#xA;	}),&#xD;&#xA;	fun: Fungible(1_000_000_000),&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;In the first approach calling `reserve_transfer_assets` would work. But this would mean that changes on the statemint parachain are required to make such a transfer happen.&#xD;&#xA;&#xD;&#xA;Is there a way to make this work without having to change the statemint parachain in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12073" PostHistoryTypeId="5" PostId="3215" RevisionGUID="c82ced40-7f58-4277-a428-2fda8a2b8df6" CreationDate="2022-06-12T10:38:07.517" UserId="2006" Comment="added 11 characters in body" Text="When trying to transfer a parachain's native token to an asset on Statemint, i am having issues in figuring out the conversion of the asset's `MultiLocation = (Here, 1_000_000_000).into()`  into the `MultiLocation` of the assets pallet `X2(PalletInstance(1), GeneralIndex(1))` on statemint. That is, provided that the `Assets` pallet is configured in the statemint parachain and asset ID 1 is already created.&#xD;&#xA;&#xD;&#xA;I m using xcm-simulator with Statemint's xcm-configs copied into the simulated parachain:&#xD;&#xA;```rust&#xD;&#xA;/// Means for transacting the native currency on this chain.&#xD;&#xA;pub type CurrencyTransactor = XcmCurrencyAdapter&lt;&#xD;&#xA;	// Use this currency:&#xD;&#xA;	Balances,&#xD;&#xA;	// Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;	IsConcrete&lt;DotLocation&gt;,&#xD;&#xA;	// Convert an XCM MultiLocation into a local account id:&#xD;&#xA;	LocationToAccountId,&#xD;&#xA;	// Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;	AccountId,&#xD;&#xA;	// We don't track any teleports of `Balances`.&#xD;&#xA;	(),&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;/// Means for transacting assets besides the native currency on this chain.&#xD;&#xA;pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;	// Use this fungibles implementation:&#xD;&#xA;	Assets,&#xD;&#xA;	// Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;	ConvertedConcreteAssetId&lt;&#xD;&#xA;		StatemintAssetId,&#xD;&#xA;		Balance,&#xD;&#xA;		AsPrefixedGeneralIndex&lt;AssetsPalletLocation, StatemintAssetId, JustTry&gt;,&#xD;&#xA;		JustTry,&#xD;&#xA;	&gt;,&#xD;&#xA;	// Convert an XCM MultiLocation into a local account id:&#xD;&#xA;	LocationToAccountId,&#xD;&#xA;	// Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;	AccountId,&#xD;&#xA;	// We only want to allow teleports of known assets. We use non-zero issuance as an indication&#xD;&#xA;	// that this asset is known.&#xD;&#xA;	parachains_common::impls::NonZeroIssuance&lt;AccountId, Assets&gt;,&#xD;&#xA;	// The account to use for tracking teleports.&#xD;&#xA;	CheckingAccount,&#xD;&#xA;&gt;;&#xD;&#xA;/// Means for transacting assets on this chain.&#xD;&#xA;pub type AssetTransactors = (CurrencyTransactor, FungiblesTransactor);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where the `AssetTransactors` is set in the `XcmConfig` struct.&#xD;&#xA;&#xD;&#xA;In the simulator, the parachains are configured such that:&#xD;&#xA;- Parachain 1 is the native asset parachain&#xD;&#xA;- Parachain 2 is statemint&#xD;&#xA;&#xD;&#xA;Trying to reserve transfer asset as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert_ok!(Parachain1PalletXcm::reserve_transfer_assets(&#xD;&#xA;	parachain1::Origin::signed(ALICE), // Origin&#xD;&#xA;	Box::new((1, Parachain(2)).into()), // Destination&#xD;&#xA;	Box::new(X1(AccountId32 { network: Any, id: ALICE.into() }).into().into()), // Beneficiary&#xD;&#xA;	Box::new((Here, 1_000_000_000).into()), // Asset&#xD;&#xA;	0,&#xD;&#xA;));&#xD;&#xA;```&#xD;&#xA;i can see that:&#xD;&#xA;```&#xD;&#xA;ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X1(Parachain(1)) }), fun: Fungible(1000000000) }]))&#xD;&#xA;Asset: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X1(Parachain(1)) }), fun: Fungible(1000000000) }&#xD;&#xA;```&#xD;&#xA;And results in:&#xD;&#xA;```&#xD;&#xA;Error FailedToTransactAsset(&quot;AssetIdConversionFailed&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which is the expected behavior from the statemint parachain config, as the code does not specify the target pallet to which the assets are transferred. However, the construction of the message should redirect the native asset from Parachain 1 to Statemint's asset pallet, so the alternative approach i took was:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let target_multiasset: MultiAssets = vec![MultiAsset {&#xD;&#xA;	id: Concrete(MultiLocation {&#xD;&#xA;		parents: 0,&#xD;&#xA;		interior: X2(PalletInstance(1), GeneralIndex(1)),&#xD;&#xA;	}),&#xD;&#xA;	fun: Fungible(amount),&#xD;&#xA;}]&#xD;&#xA;.into();&#xD;&#xA;let local_location: MultiLocation = (0, Here).into();&#xD;&#xA;let parachain_1_location_for_statemint: MultiLocation = (1, Parachain(1)).into();&#xD;&#xA;assert_ok!(Parachain1PalletXcm::execute(&#xD;&#xA;	parachain1::Origin::signed(ALICE),&#xD;&#xA;	Box::new(VersionedXcm::V2(Xcm(vec![TransferReserveAsset {&#xD;&#xA;		assets: (local, amount).into(),&#xD;&#xA;		dest: (1, Parachain(2)).into(),&#xD;&#xA;		xcm: Xcm(vec![&#xD;&#xA;			BuyExecution {&#xD;&#xA;				fees: (parachain_1_location_for_statemint, amount).into(),&#xD;&#xA;				weight_limit: Limited(4)&#xD;&#xA;			},&#xD;&#xA;			DepositAsset {&#xD;&#xA;				assets: Definite(target_multiasset),&#xD;&#xA;				max_assets: 1,&#xD;&#xA;				beneficiary: X1(AccountId32 { network: Any, id: ALICE.into() })&#xD;&#xA;					.into()&#xD;&#xA;					.into(),&#xD;&#xA;			}&#xD;&#xA;		])&#xD;&#xA;	}]))),&#xD;&#xA;	1000u64, // Weight&#xD;&#xA;));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which results in a trace as follows:&#xD;&#xA;```&#xD;&#xA;DepositAsset { assets: Definite(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(1), GeneralIndex(1)) }), fun: Fungible(1000000000) }])), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) } }&#xD;&#xA;RESULT: Ok(())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this case, neither of the `FungibleTransactor` nor the `CurrencyTransactor` are called which i imagine is caused by the fact that the asset is not recognized when received by the statemint simulated parachain.&#xD;&#xA;&#xD;&#xA;One noteworthy observation to make here is that changing the `what: &amp;MultiAsset` parameter in `deposit_asset` in xcm-builder's `FungibleAdapter` to:&#xD;&#xA;```rust&#xD;&#xA;let what = MultiAsset {&#xD;&#xA;	id: Concrete(MultiLocation {&#xD;&#xA;		parents: 0,&#xD;&#xA;		interior: Junctions::X2(Junction::PalletInstance(1), Junction::GeneralIndex(1)),&#xD;&#xA;	}),&#xD;&#xA;	fun: Fungible(1_000_000_000),&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;In the first approach calling `reserve_transfer_assets` would work. But this would mean that a custom conversion on the statemint parachain is required to make such a transfer happen.&#xD;&#xA;&#xD;&#xA;Is there a way to make this work without having to change the statemint parachain in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12074" PostHistoryTypeId="5" PostId="2944" RevisionGUID="9ea51a33-7bc6-485e-8c8f-5c0ceca9e57e" CreationDate="2022-06-12T11:03:51.537" UserId="83" Comment="grammar" Text="Can anyone please explain what are the different types of pallets we need to add to a runtime in order to integrate staking into our runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12075" PostHistoryTypeId="2" PostId="3216" RevisionGUID="e816ca16-80aa-4daa-8caf-0f835ba85c35" CreationDate="2022-06-12T11:12:03.160" UserId="34" Text="This will be resolved on Rococo shortly by moving to give out IDs of higher number than already registered ones, likely in the 4000s. I will also [opened up blank issues](https://github.com/paritytech/subport/commit/15249b284327ed5d516fd4f09b07ee9b1a9cc9e8) on subport for Rococo specifically." ContentLicense="CC BY-SA 4.0" />
  <row Id="12077" PostHistoryTypeId="2" PostId="3217" RevisionGUID="efc050b7-d5f1-4a58-8386-15aaa576544c" CreationDate="2022-06-12T12:27:38.860" UserId="2722" Text="I need to make a new substrate project with this command : &#xD;&#xA;&#xD;&#xA;`substrate-node-new &lt;project name&gt; &lt;author name&gt;`&#xD;&#xA;&#xD;&#xA;but when i need to run this command `cargo build --release` but it show me this error :&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Error :**&#xD;&#xA;&#xD;&#xA;    &gt; Compiling toml v0.5.3&#xD;&#xA;       Compiling impl-serde v0.2.0&#xD;&#xA;       Compiling impl-serde v0.1.1&#xD;&#xA;       Compiling serde_json v1.0.40&#xD;&#xA;       Compiling parity-multiaddr v0.4.1&#xD;&#xA;       Compiling openssl-sys v0.9.49&#xD;&#xA;       Compiling ring v0.14.6&#xD;&#xA;       Compiling secp256k1 v0.12.2&#xD;&#xA;       Compiling snow v0.5.2&#xD;&#xA;       Compiling backtrace v0.3.35&#xD;&#xA;       Compiling clang-sys v0.26.4&#xD;&#xA;       Compiling curve25519-dalek v1.2.3&#xD;&#xA;       Compiling failure v0.1.5&#xD;&#xA;       Compiling substrate-panic-handler v1.0.0 (https://github.com/paritytech/substrate.git?rev=cc1d67e973fd02c0c997b164ba516cf041bf21f1#cc1d67e9)&#xD;&#xA;       Compiling error-chain v0.12.1&#xD;&#xA;       Compiling which v2.0.1&#xD;&#xA;       Compiling vergen v3.0.4&#xD;&#xA;    The following warnings were emitted during compilation:&#xD;&#xA;    &#xD;&#xA;    warning: build/expando.c:4:24: error: pasting &quot;RUST_VERSION_OPENSSL_&quot; and &quot;(&quot; does not give a valid preprocessing token&#xD;&#xA;    warning:     4 | #define VERSION2(n, v) RUST_VERSION_##n##_##v&#xD;&#xA;    warning:       |                        ^~~~~~~~~~~~~&#xD;&#xA;    warning: build/expando.c:5:23: note: in expansion of macro ‘VERSION2’&#xD;&#xA;    warning:     5 | #define VERSION(n, v) VERSION2(n, v)&#xD;&#xA;    warning:       |                       ^~~~~~~~&#xD;&#xA;    warning: build/expando.c:10:1: note: in expansion of macro ‘VERSION’&#xD;&#xA;    warning:    10 | VERSION(OPENSSL, OPENSSL_VERSION_NUMBER)&#xD;&#xA;    warning:       | ^~~~~~~&#xD;&#xA;    &#xD;&#xA;    error: failed to run custom build command for `openssl-sys v0.9.49`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/home/kianoush/projects/blockchain/substrate-demo/target/release/build/openssl-sys-bba5ccb43b387629/build-script-main` (exit status: 101)&#xD;&#xA;      --- stdout&#xD;&#xA;      cargo:rustc-cfg=const_fn&#xD;&#xA;      cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR&#xD;&#xA;      X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset&#xD;&#xA;      cargo:rerun-if-env-changed=OPENSSL_LIB_DIR&#xD;&#xA;      OPENSSL_LIB_DIR unset&#xD;&#xA;      cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR&#xD;&#xA;      X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset&#xD;&#xA;      cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR&#xD;&#xA;      OPENSSL_INCLUDE_DIR unset&#xD;&#xA;      cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR&#xD;&#xA;      X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset&#xD;&#xA;      cargo:rerun-if-env-changed=OPENSSL_DIR&#xD;&#xA;      OPENSSL_DIR unset&#xD;&#xA;      cargo:rustc-link-lib=ssl&#xD;&#xA;      cargo:rustc-link-lib=crypto&#xD;&#xA;      OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;      TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;      HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;      CC_x86_64-unknown-linux-gnu = None&#xD;&#xA;      CC_x86_64_unknown_linux_gnu = None&#xD;&#xA;      HOST_CC = None&#xD;&#xA;      CC = None&#xD;&#xA;      CFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;      CFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;      HOST_CFLAGS = None&#xD;&#xA;      CFLAGS = None&#xD;&#xA;      DEBUG = Some(&quot;false&quot;)&#xD;&#xA;      running: &quot;cc&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-E&quot; &quot;build/expando.c&quot;&#xD;&#xA;      cargo:warning=build/expando.c:4:24: error: pasting &quot;RUST_VERSION_OPENSSL_&quot; and &quot;(&quot; does not give a valid preprocessing token&#xD;&#xA;      cargo:warning=    4 | #define VERSION2(n, v) RUST_VERSION_##n##_##v&#xD;&#xA;      cargo:warning=      |                        ^~~~~~~~~~~~~&#xD;&#xA;      cargo:warning=build/expando.c:5:23: note: in expansion of macro ‘VERSION2’&#xD;&#xA;      cargo:warning=    5 | #define VERSION(n, v) VERSION2(n, v)&#xD;&#xA;      cargo:warning=      |                       ^~~~~~~~&#xD;&#xA;      cargo:warning=build/expando.c:10:1: note: in expansion of macro ‘VERSION’&#xD;&#xA;      cargo:warning=   10 | VERSION(OPENSSL, OPENSSL_VERSION_NUMBER)&#xD;&#xA;      cargo:warning=      | ^~~~~~~&#xD;&#xA;      exit status: 1&#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;      thread 'main' panicked at '&#xD;&#xA;      Header expansion error:&#xD;&#xA;      Error { kind: ToolExecError, message: &quot;Command \&quot;cc\&quot; \&quot;-O3\&quot; \&quot;-ffunction-sections\&quot; \&quot;-fdata-sections\&quot; \&quot;-fPIC\&quot; \&quot;-m64\&quot; \&quot;-Wall\&quot; \&quot;-Wextra\&quot; \&quot;-E\&quot; \&quot;build/expando.c\&quot; with args \&quot;cc\&quot; did not execute successfully (status code exit status: 1).&quot; }&#xD;&#xA;    &#xD;&#xA;      Failed to find OpenSSL development headers.&#xD;&#xA;    &#xD;&#xA;      You can try fixing this setting the `OPENSSL_DIR` environment variable&#xD;&#xA;      pointing to your OpenSSL installation or installing OpenSSL headers package&#xD;&#xA;      specific to your distribution:&#xD;&#xA;    &#xD;&#xA;          # On Ubuntu&#xD;&#xA;          sudo apt-get install libssl-dev&#xD;&#xA;          # On Arch Linux&#xD;&#xA;          sudo pacman -S openssl&#xD;&#xA;          # On Fedora&#xD;&#xA;          sudo dnf install openssl-devel&#xD;&#xA;    &#xD;&#xA;      See rust-openssl README for more information:&#xD;&#xA;    &#xD;&#xA;          https://github.com/sfackler/rust-openssl#linux&#xD;&#xA;      ', /home/kianoush/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.49/build/main.rs:126:13&#xD;&#xA;      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**How can I Solve this Error ????**&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12079" PostHistoryTypeId="1" PostId="3217" RevisionGUID="efc050b7-d5f1-4a58-8386-15aaa576544c" CreationDate="2022-06-12T12:27:38.860" UserId="2722" Text="error: failed to run custom build command for `openssl-sys v0.9.49`" ContentLicense="CC BY-SA 4.0" />
  <row Id="12080" PostHistoryTypeId="3" PostId="3217" RevisionGUID="efc050b7-d5f1-4a58-8386-15aaa576544c" CreationDate="2022-06-12T12:27:38.860" UserId="2722" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12085" PostHistoryTypeId="2" PostId="3219" RevisionGUID="979d8256-bf14-4390-8202-2ca6ca079d42" CreationDate="2022-06-12T15:58:05.983" UserId="94" Text="In Substrate we make some assumptions and simplifications to keep the equations simple.  &#xD;&#xA;It does not take longer to read a larger value *in general*. This is due to the database backend chunking the data. There are *jumps* in the timing as described in the answer that I already [linked above](https://substrate.stackexchange.com/questions/525/how-expensive-is-it-to-access-storage-items). There is a correlation between item size and access time, but its not linear. &#xD;&#xA;&#xD;&#xA;Our observation was that most of the values that are currently being read/written on-chain are account data structs with 80 byte in them.  &#xD;&#xA;We then developed a benchmarking system which reads and writes the complete chain snapshot and collects the time that it takes for each value. The usage is documented [here](https://github.com/paritytech/substrate/tree/master/utils/frame/benchmarking-cli/src/storage#the-benchmark-storage-command).  &#xD;&#xA;The average results are calculated and used as constants for reading or writing a single value.  &#xD;&#xA;This has the advantage of being very simple to calculate. You have to keep in mind that every formula for calculating the weight needs to be *really* cheap, a constant is therefore perfect.  &#xD;&#xA;&#xD;&#xA;The downside is that it needs to be regularly updated to represent the average read and write weight. We currently add 15% to the calculated constants to adjust for a lag of updating them.  &#xD;&#xA;&#xD;&#xA;If you want to optimize the weight of your Pallet, you have to find the sweet spot between number of storage accesses and item size.  &#xD;&#xA;The item size is not important *right now*, but will be important once [Weights V2](https://github.com/paritytech/substrate/pull/10918) hits.  &#xD;&#xA;This effectively prevents you from putting all the data in one huge storage item because of the huge PoV size this would inflict." ContentLicense="CC BY-SA 4.0" />
  <row Id="12087" PostHistoryTypeId="2" PostId="3220" RevisionGUID="34fed06b-43e3-469a-af42-ff64ae6d8c82" CreationDate="2022-06-12T19:44:14.247" UserId="16" Text="Schnorr signatures as for example sr25519 do not communicate their public key. So you either supply the public key separately in addition to the signature or you use ECDSA over the secp256k1 curve. In the latter case you can then use `ink_env::ecdsa_recover()`. However, Polkadot.js does not support ECDSA and you need to use other libraries to produce such a signature." ContentLicense="CC BY-SA 4.0" />
  <row Id="12094" PostHistoryTypeId="10" PostId="3212" RevisionGUID="346f2bab-4c40-47a4-926d-884372f4dd6e" CreationDate="2022-06-12T22:46:25.590" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="12096" PostHistoryTypeId="2" PostId="3222" RevisionGUID="deb31d5b-9c7a-4113-a320-4b6c878cce25" CreationDate="2022-06-13T04:46:15.067" UserId="1866" Text="The js libs supports the following [crypto types &amp; signatures](https://github.com/polkadot-js/common/blob/22aa8d7adb89739477b56917ad35a8d1f983d343/packages/keyring/src/keyring.ts#L53) - sr25519, ed25519, ecdsa (Substrate 32-byte public) &amp; ethereum (Moonbeam-like, 20-byte public).&#xD;&#xA;&#xD;&#xA;So you can add a pair to the keyring using the specified type and then sign the data. A contrived example below.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;/* create a keyring */&#xD;&#xA;const keyring = new Keyring()&#xD;&#xA;&#xD;&#xA;/* create a pair on the keyring */&#xD;&#xA;const pair = keyring.addFromMnemonic(&#xD;&#xA;  /* mnemonic */&#xD;&#xA;  &quot;abandon ...&quot;, &#xD;&#xA;  /* any metadata, user-specified */&#xD;&#xA;  { name: &quot;test&quot; }, &#xD;&#xA;  /* pair type - needs to be specified, otherwise keyring default */&#xD;&#xA;  { type: &quot;ecdsa&quot; }&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;/* sign some data */&#xD;&#xA;const sig_uint8array = pair.sign(&quot;message&quot;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12100" PostHistoryTypeId="2" PostId="3223" RevisionGUID="903cd1ad-cfee-47c4-9f4a-afa0eddb720d" CreationDate="2022-06-13T07:51:04.380" UserId="560" Text="Does anyone know if there is a way to freeze (pallet-)asset's similar to how you can &quot;lock&quot;/freeze regular balance with T::Currency::freeze(AccountId, Balance)? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;seems like there is no easy way to freeze 10 of asset X for account Y,  the default freeze functions only freezes the entire account balance or entire asset class&#xD;&#xA;&#xD;&#xA;The use case that I have one pallet that mints X amount of a certain asset(like a token) then transfers it using the regular pallet-asset's transfer assetid, amount(T::Balance).&#xD;&#xA;&#xD;&#xA;But all built in pallet-assets freeze functions is created for freezing the entire asset class. is there some way around this? &#xD;&#xA;&#xD;&#xA;Link to pallet-assets:&#xD;&#xA;https://paritytech.github.io/substrate/master/pallet_assets/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="12102" PostHistoryTypeId="1" PostId="3223" RevisionGUID="903cd1ad-cfee-47c4-9f4a-afa0eddb720d" CreationDate="2022-06-13T07:51:04.380" UserId="560" Text="freeze(account, balance) for pallet-assets, how do I freeze X amount of a certain asset?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12103" PostHistoryTypeId="3" PostId="3223" RevisionGUID="903cd1ad-cfee-47c4-9f4a-afa0eddb720d" CreationDate="2022-06-13T07:51:04.380" UserId="560" Text="|pallet|balances|assets|lockable-currency|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12108" PostHistoryTypeId="5" PostId="3180" RevisionGUID="6505a10d-e3e8-4a94-8b78-63b6bf6a7316" CreationDate="2022-06-13T08:24:07.777" UserId="1789" Comment="added 728 characters in body" Text="after following the tutorial[https://chainbridge.chainsafe.io/local/] of running Chainbridge locally, &#xD;&#xA;&#xD;&#xA;I can send 1 Substrate Native Token to ERC20&#xD;&#xA;&#xD;&#xA;But when I sent 1, 100, 1000000, even 1000000000000000000 ERC20 tokens to 0xd4359..da27d, the ALICE Polkadot account balance does not increase after waiting 10 blocks...&#xD;&#xA;```&#xD;&#xA;accounts	                type	  transactions	balances	&#xD;&#xA;ALICE  5Grwva…GKutQY    type=sr25519       28      2.1529 MUnit&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From this command: `subkey inspect //Alice`&#xD;&#xA;```&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a&#xD;&#xA;  Public key (hex):  0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Account ID:        0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Public key (SS58): 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;  SS58 Address:      5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;```&#xD;&#xA;This confirms Alice 5Grwva is 0xd4359..da27d on Ethereum side&#xD;&#xA;&#xD;&#xA;Logs from `cb-sol-cli erc20 ...` command sending tokens:&#xD;&#xA;```&#xD;&#xA;[erc20/deposit] Constructed deposit:&#xD;&#xA;[erc20/deposit]   Resource Id: 0x000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00&#xD;&#xA;[erc20/deposit]   Amount: 0xd3c21bcecceda1000000&#xD;&#xA;[erc20/deposit]   len(recipient): 32&#xD;&#xA;[erc20/deposit]   Recipient: 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;[erc20/deposit]   Raw: 0x00000000000000000000000000000000000000000000d3c21bcecceda10000000000000000000000000000000000000000000000000000000000000000000020d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;[erc20/deposit] Creating deposit to initiate transfer!&#xD;&#xA;Waiting for tx: 0x43f50cebc459b1d959a515250be28a861639f8983ddc730ad8f464f9448cf58a...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Logs from running the ChainBridge:&#xD;&#xA;```&#xD;&#xA;INFO[06-10|17:57:50] Starting ChainBridge... &#xD;&#xA;INFO[06-10|17:57:50] Connecting to ethereum chain...          chain=eth url=ws://localhost:8545&#xD;&#xA;INFO[06-10|17:57:50] Connecting to substrate chain...         chain=sub url=ws://localhost:9944&#xD;&#xA;2022/06/10 17:57:50 Connecting to ws://localhost:9944...&#xD;&#xA;INFO[06-10|17:57:50] Started eth chain                        system=core&#xD;&#xA;INFO[06-10|17:57:50] Started sub chain                        system=core&#xD;&#xA;INFO[06-10|17:57:50] Polling Blocks...                        chain=eth block=14856&#xD;&#xA;INFO[06-10|18:38:33] Got fungible transfer event!             chain=sub destination=0 resourceId=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00 amount=1000&#xD;&#xA;INFO[06-10|18:38:33] Attempting to resolve message            chain=eth type=FungibleTransfer src=1 dst=0 nonce=1 rId=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00&#xD;&#xA;INFO[06-10|18:38:33] Creating erc20 proposal                  chain=eth src=1 nonce=1&#xD;&#xA;INFO[06-10|18:38:33] Watching for finalization event          chain=eth src=1 nonce=1&#xD;&#xA;INFO[06-10|18:38:33] Submitted proposal vote                  chain=eth tx=0xbdc73d76fb45ed29b194afc6208785b37f38dd6851869fb95fab28673611f5bb src=1 depositNonce=1 gasPrice=20000000&#xD;&#xA;INFO[06-10|18:38:48] Submitted proposal execution             chain=eth tx=0x366ce097f45b10e25d5047f366d08dc12d8b185e4c6deae49df1d58bea26cf97 src=1 dst=0 nonce=1 gasPrice=20000000&#xD;&#xA;INFO[06-10|18:43:17] Handling fungible deposit event          chain=eth dest=1 nonce=7&#xD;&#xA;INFO[06-10|18:43:17] Acknowledging proposal on chain          chain=sub nonce=7 source=0 resource=000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00 method=Example.transfer&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think there is something missing in Polkadot JS Apps -&gt;  definitions to the developer settings:&#xD;&#xA;https://github.com/ChainSafe/chainbridge-Substrate-chain#polkadot-js-apps&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;chainbridge::ChainId&quot;: &quot;u8&quot;,&#xD;&#xA;  &quot;ChainId&quot;: &quot;u8&quot;,&#xD;&#xA;  &quot;ResourceId&quot;: &quot;[u8; 32]&quot;,&#xD;&#xA;  &quot;DepositNonce&quot;: &quot;u64&quot;,&#xD;&#xA;  &quot;ProposalVotes&quot;: {&#xD;&#xA;    &quot;votes_for&quot;: &quot;Vec&lt;AccountId&gt;&quot;,&#xD;&#xA;    &quot;votes_against&quot;: &quot;Vec&lt;AccountId&gt;&quot;,&#xD;&#xA;    &quot;status&quot;: &quot;enum&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;Erc721Token&quot;: {&#xD;&#xA;    &quot;id&quot;: &quot;TokenId&quot;,&#xD;&#xA;    &quot;metadata&quot;: &quot;Vec&lt;u8&gt;&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;TokenId&quot;: &quot;U256&quot;,&#xD;&#xA;  &quot;Address&quot;: &quot;AccountId&quot;,&#xD;&#xA;  &quot;LookupSource&quot;: &quot;AccountId&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I have to add `&quot;AccountInfo&quot;: &quot;AccountInfoWithDualRefCount&quot;` on top of above settings to see the account balances.&#xD;&#xA;&#xD;&#xA;And I can see ALICE transactions is increasing, but ALICE's balance has never increased after the transfer!&#xD;&#xA;&#xD;&#xA;How can I show transferred amount from ERC20 to Substrate parachain?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12115" PostHistoryTypeId="5" PostId="3220" RevisionGUID="19b2b5d8-5f17-46bd-80a1-e759b0241465" CreationDate="2022-06-13T09:27:44.107" UserId="16" Comment="deleted 109 characters in body" Text="Schnorr signatures as for example sr25519 do not communicate their public key. So you either supply the public key separately in addition to the signature or you use ECDSA over the secp256k1 curve. In the latter case you can then use `ink_env::ecdsa_recover()`." ContentLicense="CC BY-SA 4.0" />
  <row Id="12116" PostHistoryTypeId="6" PostId="3124" RevisionGUID="7a9202ee-6517-4b14-9808-4476f49428de" CreationDate="2022-06-13T10:26:26.173" UserId="567" Comment="Added smart-contract tag" Text="|ink|smart-contract|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12117" PostHistoryTypeId="24" PostId="3124" RevisionGUID="7a9202ee-6517-4b14-9808-4476f49428de" CreationDate="2022-06-13T10:26:26.173" Comment="Proposed by 567 approved by 627, 34 edit id of 215" ContentLicense="CC BY-SA 4.0" />
  <row Id="12119" PostHistoryTypeId="2" PostId="3227" RevisionGUID="12d7c269-cba6-4aff-8eaf-23990b5b0c0a" CreationDate="2022-06-13T11:19:51.343" UserId="1789" Text="How can I make ChainBridge to work with my parachain collator? Is there a documentation for such process? &#xD;&#xA;&#xD;&#xA;all the settings are inside the chainbridge/config.json file(https://github.com/ChainSafe/ChainBridge#chain-implementations):&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;chains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;eth&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;ethereum&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;0&quot;,&#xD;&#xA;      &quot;endpoint&quot;: &quot;ws://localhost:8545&quot;,&#xD;&#xA;      &quot;from&quot;: &quot;0xff93B45308FD417dF303D6515aB04D9e89a750Ca&quot;,&#xD;&#xA;      &quot;opts&quot;: {&#xD;&#xA;        &quot;bridge&quot;: &quot;0x62877dDCd49aD22f5eDfc6ac108e9a4b5D2bD88B&quot;,&#xD;&#xA;        &quot;erc20Handler&quot;: &quot;0x3167776db165D8eA0f51790CA2bbf44Db5105ADF&quot;,&#xD;&#xA;        &quot;erc721Handler&quot;: &quot;0x3f709398808af36ADBA86ACC617FeB7F5B7B193E&quot;,&#xD;&#xA;        &quot;genericHandler&quot;: &quot;0x2B6Ab4b880A45a07d83Cf4d664Df4Ab85705Bc07&quot;,&#xD;&#xA;        &quot;gasLimit&quot;: &quot;1000000&quot;,&#xD;&#xA;        &quot;maxGasPrice&quot;: &quot;20000000&quot;&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;sub&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;substrate&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;1&quot;,&#xD;&#xA;      &quot;endpoint&quot;: &quot;ws://localhost:9944&quot;,&#xD;&#xA;      &quot;from&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;      &quot;opts&quot;: {&#xD;&#xA;          &quot;useExtendedCall&quot;:&quot;true&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;cb-sol.cli can deploy and setup Ethereum contracts: chainbridge-deploy/cb-sol-cli/chainbridge-solidity/contracts&#xD;&#xA;https://github.com/ChainSafe/chainbridge-deploy/tree/master/cb-sol-cli&#xD;&#xA;&#xD;&#xA;- how to deploy Ethereum contracts to a real network like Kovan using cb-sol-cli ? ... Do I make up new contract addresses -&gt; replace old contract addresses with new  addresses in the repository chainbridge-deploy/cb-sol-cli ?&#xD;&#xA;&#xD;&#xA;- add chainbridge-substrate's example-pallet into my parachain&#xD;&#xA;... I need to upgrade that pallet's code to newer syntax&#xD;&#xA;&#xD;&#xA;- run relayers with updated config.json with new Ethereum addresses, new endpoints&#xD;&#xA;&#xD;&#xA;- How to get/make those resource Ids in the &quot;Register Resources Substrate&quot; step? &#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="12121" PostHistoryTypeId="1" PostId="3227" RevisionGUID="12d7c269-cba6-4aff-8eaf-23990b5b0c0a" CreationDate="2022-06-13T11:19:51.343" UserId="1789" Text="How to connect my Parachain and Ethereum to ChainBridge?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12122" PostHistoryTypeId="3" PostId="3227" RevisionGUID="12d7c269-cba6-4aff-8eaf-23990b5b0c0a" CreationDate="2022-06-13T11:19:51.343" UserId="1789" Text="|parachain|ethereum|bridge|chainbridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12123" PostHistoryTypeId="2" PostId="3228" RevisionGUID="c8ba1315-50aa-4e16-b7d8-d1d5b0397482" CreationDate="2022-06-13T11:58:06.550" UserId="165" Text="This is a very interesting question.&#xD;&#xA;&#xD;&#xA;My two cents here, it is true that hooks can do some computation, more or less complex, and so it will take some of the weight available.&#xD;&#xA;But this is some logic that the system is executing under certain conditions, this is not someone (an origin, external to the system) requesting for some storage modification or some execution. So, the weight used related to this hooks is something native to the design of the system itself, and not something you can make any other entity accountable for." ContentLicense="CC BY-SA 4.0" />
  <row Id="12125" PostHistoryTypeId="5" PostId="3227" RevisionGUID="ec446285-15c9-44c1-a970-1863df42eb84" CreationDate="2022-06-13T13:58:00.530" UserId="1789" Comment="added 230 characters in body" Text="How can I make ChainBridge to work with my parachain collator? Is there a documentation for such process? &#xD;&#xA;&#xD;&#xA;all the settings are inside the chainbridge/config.json file(https://github.com/ChainSafe/ChainBridge#chain-implementations):&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;chains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;eth&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;ethereum&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;0&quot;,&#xD;&#xA;      &quot;endpoint&quot;: &quot;ws://localhost:8545&quot;,&#xD;&#xA;      &quot;from&quot;: &quot;0xff93B45308FD417dF303D6515aB04D9e89a750Ca&quot;,&#xD;&#xA;      &quot;opts&quot;: {&#xD;&#xA;        &quot;bridge&quot;: &quot;0x62877dDCd49aD22f5eDfc6ac108e9a4b5D2bD88B&quot;,&#xD;&#xA;        &quot;erc20Handler&quot;: &quot;0x3167776db165D8eA0f51790CA2bbf44Db5105ADF&quot;,&#xD;&#xA;        &quot;erc721Handler&quot;: &quot;0x3f709398808af36ADBA86ACC617FeB7F5B7B193E&quot;,&#xD;&#xA;        &quot;genericHandler&quot;: &quot;0x2B6Ab4b880A45a07d83Cf4d664Df4Ab85705Bc07&quot;,&#xD;&#xA;        &quot;gasLimit&quot;: &quot;1000000&quot;,&#xD;&#xA;        &quot;maxGasPrice&quot;: &quot;20000000&quot;&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;sub&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;substrate&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;1&quot;,&#xD;&#xA;      &quot;endpoint&quot;: &quot;ws://localhost:9944&quot;,&#xD;&#xA;      &quot;from&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;      &quot;opts&quot;: {&#xD;&#xA;          &quot;useExtendedCall&quot;:&quot;true&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;cb-sol.cli can deploy and setup Ethereum contracts: chainbridge-deploy/cb-sol-cli/chainbridge-solidity/contracts&#xD;&#xA;https://github.com/ChainSafe/chainbridge-deploy/tree/master/cb-sol-cli&#xD;&#xA;&#xD;&#xA;- how to deploy Ethereum contracts using cb-sol-cli ?&#xD;&#xA;... do addresses in constants.js determine what the deployed contracts' addresses will be?&#xD;&#xA;&#xD;&#xA;https://github.com/ChainSafe/chainbridge-deploy/tree/master/cb-sol-cli&#xD;&#xA;cb-sol.cli can deploy and setup Ethereum contracts: chainbridge-deploy/cb-sol-cli/chainbridge-solidity/contracts&#xD;&#xA;... using --url &lt;value&gt; to set URL to connect to&#xD;&#xA;... using --networkId &lt;value&gt;  to set the destination Network id&#xD;&#xA;correct?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- add chainbridge-substrate's example-pallet into my parachain&#xD;&#xA;... I need to upgrade that pallet's code to newer syntax&#xD;&#xA;&#xD;&#xA;- run relayers with updated config.json with new Ethereum addresses, new endpoints&#xD;&#xA;&#xD;&#xA;- How to get/make those resource Ids in the &quot;Register Resources Substrate&quot; step? &#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="12126" PostHistoryTypeId="2" PostId="3229" RevisionGUID="b45802a2-5465-4125-8292-56bad3548543" CreationDate="2022-06-13T14:07:43.683" UserId="479" Text="Hello Substrate Experts,&#xD;&#xA;&#xD;&#xA;at the moment I try to figure out how to benchmark FRAME pallets for our runtime and I have basically three points that are not 100% clear to me.&#xD;&#xA;&#xD;&#xA;1. Based on my understanding it's necessary to benchmark FRAME pallets if the hardware spec is not 100% what the recommendation is for Polkadot or Substrate?&#xD;&#xA;&#xD;&#xA;2. If we would use the same hardware Polkadot is using we should be good to go with just the default weights from the pallets?&#xD;&#xA;&#xD;&#xA;3. If not we have to run the benchmark tool against our runtime and generate a custom weights file for the FRAME pallets we use?&#xD;&#xA;&#xD;&#xA;Thanks in advance for your support!" ContentLicense="CC BY-SA 4.0" />
  <row Id="12128" PostHistoryTypeId="1" PostId="3229" RevisionGUID="b45802a2-5465-4125-8292-56bad3548543" CreationDate="2022-06-13T14:07:43.683" UserId="479" Text="Benchmark FRAME pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="12129" PostHistoryTypeId="3" PostId="3229" RevisionGUID="b45802a2-5465-4125-8292-56bad3548543" CreationDate="2022-06-13T14:07:43.683" UserId="479" Text="|weight|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12130" PostHistoryTypeId="2" PostId="3230" RevisionGUID="122a5c02-552c-4c91-911f-a2e17df212eb" CreationDate="2022-06-13T14:08:18.940" UserId="494" Text="`polkadot-launch` is about to be deprecated. See&#xD;&#xA;https://github.com/paritytech/polkadot-launch/issues/189&#xD;&#xA;&#xD;&#xA;You should check one of the following alternatives:&#xD;&#xA;- [zombienet](https://github.com/paritytech/zombienet)&#xD;&#xA;- [parachain-launch](https://github.com/open-web3-stack/parachain-launch)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12132" PostHistoryTypeId="5" PostId="3227" RevisionGUID="f9840edd-8ce9-4574-b68f-5e908ece1947" CreationDate="2022-06-13T14:49:13.633" UserId="1789" Comment="added 162 characters in body" Text="How can I make ChainBridge to work with my parachain collator? Is there a documentation for such process? &#xD;&#xA;&#xD;&#xA;all the settings are inside the chainbridge/config.json file(https://github.com/ChainSafe/ChainBridge#chain-implementations):&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;chains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;eth&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;ethereum&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;0&quot;,&#xD;&#xA;      &quot;endpoint&quot;: &quot;ws://localhost:8545&quot;,&#xD;&#xA;      &quot;from&quot;: &quot;0xff93B45308FD417dF303D6515aB04D9e89a750Ca&quot;,&#xD;&#xA;      &quot;opts&quot;: {&#xD;&#xA;        &quot;bridge&quot;: &quot;0x62877dDCd49aD22f5eDfc6ac108e9a4b5D2bD88B&quot;,&#xD;&#xA;        &quot;erc20Handler&quot;: &quot;0x3167776db165D8eA0f51790CA2bbf44Db5105ADF&quot;,&#xD;&#xA;        &quot;erc721Handler&quot;: &quot;0x3f709398808af36ADBA86ACC617FeB7F5B7B193E&quot;,&#xD;&#xA;        &quot;genericHandler&quot;: &quot;0x2B6Ab4b880A45a07d83Cf4d664Df4Ab85705Bc07&quot;,&#xD;&#xA;        &quot;gasLimit&quot;: &quot;1000000&quot;,&#xD;&#xA;        &quot;maxGasPrice&quot;: &quot;20000000&quot;&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;sub&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;substrate&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;1&quot;,&#xD;&#xA;      &quot;endpoint&quot;: &quot;ws://localhost:9944&quot;,&#xD;&#xA;      &quot;from&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;      &quot;opts&quot;: {&#xD;&#xA;          &quot;useExtendedCall&quot;:&quot;true&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;cb-sol.cli can deploy and setup Ethereum contracts: chainbridge-deploy/cb-sol-cli/chainbridge-solidity/contracts&#xD;&#xA;https://github.com/ChainSafe/chainbridge-deploy/tree/master/cb-sol-cli&#xD;&#xA;&#xD;&#xA;- how to deploy Ethereum contracts using cb-sol-cli ?&#xD;&#xA;... do addresses in constants.js determine what the deployed contracts' addresses will be?&#xD;&#xA;&#xD;&#xA;https://github.com/ChainSafe/chainbridge-deploy/tree/master/cb-sol-cli&#xD;&#xA;cb-sol.cli can deploy and setup Ethereum contracts from chainbridge-deploy/cb-sol-cli/chainbridge-solidity/contracts&#xD;&#xA;&#xD;&#xA;`$ cb-sol-cli deploy --all --relayerThreshold 1 --url https://kovan.infura.io/v3/123abc...xxx --networkId 42 --privateKey 1234...yyy`&#xD;&#xA;... this command was stuck at &quot;Deploying contracts...&quot; for quite a few minutes...&#xD;&#xA;Is that the way to deploy contracts or if yes, does that work?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- add chainbridge-substrate's example-pallet into my parachain&#xD;&#xA;... I need to upgrade that pallet's code to newer syntax&#xD;&#xA;&#xD;&#xA;- run relayers with updated config.json with new Ethereum addresses, new endpoints&#xD;&#xA;&#xD;&#xA;- How to get/make those resource Ids in the &quot;Register Resources Substrate&quot; step? &#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="12133" PostHistoryTypeId="2" PostId="3231" RevisionGUID="7efc9171-71f4-451f-a2f5-ace8cd528241" CreationDate="2022-06-13T15:00:16.110" UserId="620" Text="Currently it's not possible but it is in the roadmap to add lockable assets the way that you described (which also enables other things like vesting). The high level tokens roadmap is here: https://github.com/paritytech/substrate/issues/8453" ContentLicense="CC BY-SA 4.0" />
  <row Id="12135" PostHistoryTypeId="2" PostId="3232" RevisionGUID="e1fbc282-c571-4cee-b05b-d17dd8dc1a59" CreationDate="2022-06-13T15:44:12.157" UserId="94" Text="`on_initialize` has the advantage of being in the `Mandatory` dispatch class.  &#xD;&#xA;It can consume an unlimited amount of weight; even stall the chain if necessary.  &#xD;&#xA;This is what often happens for large runtime migrations that do not fit in one block.  &#xD;&#xA;&#xD;&#xA;In your case you want to stay within `max_block` as not to stall the chain.  &#xD;&#xA;Good examples for this are the [scheduler](https://github.com/paritytech/substrate/blob/8fe464b8636803dea45f5e6506d56eae309942ba/frame/scheduler/src/lib.rs#L297) and [state-trie-migration](https://github.com/paritytech/substrate/blob/26026d36a51c9f1c69b4f4e1503589b28e2019c6/frame/state-trie-migration/src/lib.rs#L839) pallets.  &#xD;&#xA;The scheduler has a pallet constant to configure a limit. Currently set to [80%](https://github.com/paritytech/polkadot/blob/016dc7297101710db0483ab6ef199e244dff711d/runtime/polkadot/src/lib.rs#L231) of `max_block`:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) *&#xD;&#xA;		BlockWeights::get().max_block;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To analyze what is a good value here, you can directly look at the [BlockWeights](https://paritytech.github.io/substrate/latest/frame_system/limits/struct.BlockWeights.html) of your runtime. Just print it in a test. For Polkadot this print:  &#xD;&#xA;```pre&#xD;&#xA;base_block: 53_99_176_000&#xD;&#xA;max_block: 2_000_000_000_000&#xD;&#xA;&#xD;&#xA;per_class:&#xD;&#xA;	normal:&#xD;&#xA;		base_extrinsic: 85_212_000&#xD;&#xA;		max_extrinsic: Some(1_479_914_788_000)&#xD;&#xA;		max_total: Some(1_500_000_000_000)&#xD;&#xA;		reserved: Some(0)&#xD;&#xA;&#xD;&#xA;	operational:&#xD;&#xA;		base_extrinsic: 85_212_000&#xD;&#xA;		max_extrinsic: Some(1_979_914_788_000)&#xD;&#xA;		max_total: Some(2_000_000_000_000)&#xD;&#xA;		reserved: Some(500_000_000_000)&#xD;&#xA;&#xD;&#xA;	mandatory:&#xD;&#xA;		base_extrinsic: 85_212_000&#xD;&#xA;		max_extrinsic: None&#xD;&#xA;		max_total: None&#xD;&#xA;		reserved: None&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Personally I am not sure if it makes sense to aim for a perfect value here, since you either:  &#xD;&#xA;1. Want to get it done ASAP: don't track the weight and just stall the chain. This may or may not be a good idea depending on your needs.&#xD;&#xA;2. Have a preemptable task: Pick some limit like 80% and leave some room for other important extrinsics.&#xD;&#xA;&#xD;&#xA;Hopefully this answers your question. For completeness I will still try to find out what the theoretical maximum value would be and update this answer." ContentLicense="CC BY-SA 4.0" />
  <row Id="12138" PostHistoryTypeId="2" PostId="3233" RevisionGUID="613d0ef9-35e2-4313-9956-d9ab069670ad" CreationDate="2022-06-13T17:52:35.227" UserId="213" Text="Floating-point arithmetic are [not allowed in substrate runtime][1].&#xD;&#xA;&#xD;&#xA;[f64][2] has an `pub fn ln(self) -&gt; f64` to calculate natural log. How can I do that in substrate without using floating points. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/147/213&#xD;&#xA;  [2]: https://doc.rust-lang.org/std/primitive.f64.html#method.ln" ContentLicense="CC BY-SA 4.0" />
  <row Id="12140" PostHistoryTypeId="1" PostId="3233" RevisionGUID="613d0ef9-35e2-4313-9956-d9ab069670ad" CreationDate="2022-06-13T17:52:35.227" UserId="213" Text="How can I calculate natural log of a number?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12141" PostHistoryTypeId="3" PostId="3233" RevisionGUID="613d0ef9-35e2-4313-9956-d9ab069670ad" CreationDate="2022-06-13T17:52:35.227" UserId="213" Text="|fixed-point-math|floating-point-math|float|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12142" PostHistoryTypeId="2" PostId="3234" RevisionGUID="89924915-19c4-47bb-ab97-b91c65e3995b" CreationDate="2022-06-13T19:10:23.400" UserId="590" Text="I took a look at the check-weight SignedExtention to see what happens when a block is full. It appears that it returns an error `InvalidTransaction::ExhaustsResources`. It think it puts it back into the transaction pool but cannot find any documentation around this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What happens when an error occurs in pre-dispatch?&#xD;&#xA;&#xD;&#xA;I would like the ability to put something back into the transaction pool and reprioritize. Perhaps, using like [ValidTransaction][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/pallet_prelude/struct.ValidTransaction.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="12144" PostHistoryTypeId="1" PostId="3234" RevisionGUID="89924915-19c4-47bb-ab97-b91c65e3995b" CreationDate="2022-06-13T19:10:23.400" UserId="590" Text="Pre-dispatch Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="12145" PostHistoryTypeId="3" PostId="3234" RevisionGUID="89924915-19c4-47bb-ab97-b91c65e3995b" CreationDate="2022-06-13T19:10:23.400" UserId="590" Text="|substrate-node-template|transactions|weight|error|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12146" PostHistoryTypeId="5" PostId="3234" RevisionGUID="ccdd5e94-a20b-4227-a46f-e4d9b3ca33ea" CreationDate="2022-06-13T19:15:30.543" UserId="590" Comment="added 10 characters in body" Text="I took a look at the check-weight SignedExtention to see what happens when a block is full. It appears that it returns an error `InvalidTransaction::ExhaustsResources`. It think it puts it back into the transaction pool but cannot find any documentation around this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What happens when an error occurs in pre-dispatch?&#xD;&#xA;&#xD;&#xA;I would like the ability to put something back into the transaction pool and reprioritize. Perhaps, using something like [ValidTransaction][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/pallet_prelude/struct.ValidTransaction.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="12147" PostHistoryTypeId="2" PostId="3235" RevisionGUID="9d72d0af-0a2e-4270-975d-9f3e7d3c8872" CreationDate="2022-06-13T19:33:11.903" UserId="1824" Text="The available types come from the&#xD;&#xA;[`scale-info`](https://github.com/paritytech/scale-info) crate. The types get broken down&#xD;&#xA;into one of eight categories, as you can see&#xD;&#xA;[here](https://github.com/paritytech/scale-info/blob/e4de349a3f1088280a1266c860db72f204d0bba8/src/ty/mod.rs#L247).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub enum TypeDef {&#xD;&#xA;    /// A composite type (e.g. a struct or a tuple)&#xD;&#xA;    Composite,&#xD;&#xA;    /// A variant type (e.g. an enum)&#xD;&#xA;    Variant,&#xD;&#xA;    /// A sequence type with runtime known length.&#xD;&#xA;    Sequence,&#xD;&#xA;    /// An array type with compile-time known length.&#xD;&#xA;    Array,&#xD;&#xA;    /// A tuple type.&#xD;&#xA;    Tuple,&#xD;&#xA;    /// A Rust primitive type.&#xD;&#xA;    Primitive,&#xD;&#xA;    /// A type using the [`Compact`] encoding&#xD;&#xA;    Compact,&#xD;&#xA;    /// A type representing a sequence of bits.&#xD;&#xA;    BitSequence,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, we realize that it sucks to have to hardcode this validation in your code. We've&#xD;&#xA;recently started working on a JSON Schema for the ink! metadata so that things like types&#xD;&#xA;can be programatically verified. [Here's a preview](https://gist.github.com/HCastano/6fe5103c7bac2a7d7f9853dc78e93889) of the schema for ink!'s metadata.&#xD;&#xA;&#xD;&#xA;If you dig in there you can see that types are described by `PortableType` and&#xD;&#xA;`TypeDef_for_PortableForm`. You should be able to use those to decode the given types.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;&quot;TypeDef_for_PortableForm&quot;: {&#xD;&#xA;  &quot;description&quot;: &quot;The possible types a SCALE encodable Rust value could have....&quot;,&#xD;&#xA;  &quot;oneOf&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;description&quot;: &quot;A composite type (e.g. a struct or a tuple)&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;object&quot;,&#xD;&#xA;      &quot;required&quot;: [&#xD;&#xA;        &quot;composite&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;composite&quot;: {&#xD;&#xA;          &quot;$ref&quot;: &quot;#/definitions/TypeDefComposite_for_PortableForm&quot;&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;additionalProperties&quot;: false&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;description&quot;: &quot;A variant type (e.g. an enum)&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;object&quot;,&#xD;&#xA;      &quot;required&quot;: [&#xD;&#xA;        &quot;variant&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;variant&quot;: {&#xD;&#xA;          &quot;$ref&quot;: &quot;#/definitions/TypeDefVariant_for_PortableForm&quot;&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;additionalProperties&quot;: false&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;description&quot;: &quot;A sequence type with runtime known length.&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;object&quot;,&#xD;&#xA;      &quot;required&quot;: [&#xD;&#xA;        &quot;sequence&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;sequence&quot;: {&#xD;&#xA;          &quot;$ref&quot;: &quot;#/definitions/TypeDefSequence_for_PortableForm&quot;&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;additionalProperties&quot;: false&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;description&quot;: &quot;An array type with compile-time known length.&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;object&quot;,&#xD;&#xA;      &quot;required&quot;: [&#xD;&#xA;        &quot;array&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;array&quot;: {&#xD;&#xA;          &quot;$ref&quot;: &quot;#/definitions/TypeDefArray_for_PortableForm&quot;&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;additionalProperties&quot;: false&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;description&quot;: &quot;A tuple type.&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;object&quot;,&#xD;&#xA;      &quot;required&quot;: [&#xD;&#xA;        &quot;tuple&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;tuple&quot;: {&#xD;&#xA;          &quot;type&quot;: &quot;array&quot;,&#xD;&#xA;          &quot;items&quot;: {&#xD;&#xA;            &quot;type&quot;: &quot;integer&quot;,&#xD;&#xA;            &quot;format&quot;: &quot;uint32&quot;,&#xD;&#xA;            &quot;minimum&quot;: 0.0&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;additionalProperties&quot;: false&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;description&quot;: &quot;A Rust primitive type.&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;object&quot;,&#xD;&#xA;      &quot;required&quot;: [&#xD;&#xA;        &quot;primitive&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;primitive&quot;: {&#xD;&#xA;          &quot;$ref&quot;: &quot;#/definitions/TypeDefPrimitive&quot;&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;additionalProperties&quot;: false&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;description&quot;: &quot;A type using the [`Compact`] encoding&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;object&quot;,&#xD;&#xA;      &quot;required&quot;: [&#xD;&#xA;        &quot;compact&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;compact&quot;: {&#xD;&#xA;          &quot;$ref&quot;: &quot;#/definitions/TypeDefCompact_for_PortableForm&quot;&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;additionalProperties&quot;: false&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;description&quot;: &quot;A type representing a sequence of bits.&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;object&quot;,&#xD;&#xA;      &quot;required&quot;: [&#xD;&#xA;        &quot;bitsequence&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;bitsequence&quot;: {&#xD;&#xA;          &quot;$ref&quot;: &quot;#/definitions/TypeDefBitSequence_for_PortableForm&quot;&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;additionalProperties&quot;: false&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12149" PostHistoryTypeId="5" PostId="3234" RevisionGUID="79613a62-4561-4e11-978a-55c293514f96" CreationDate="2022-06-13T19:41:01.530" UserId="590" Comment="[Edit removed during grace period]" Text="I took a look at the check-weight SignedExtention to see what happens when a block is full. It appears that it returns an error `InvalidTransaction::ExhaustsResources`. It think it puts it back into the transaction pool but cannot find any documentation around this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What happens when an error occurs in pre-dispatch?&#xD;&#xA;&#xD;&#xA;I would like the ability to put something back into the transaction pool and reprioritize. Perhaps, using something like [ValidTransaction][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/pallet_prelude/struct.ValidTransaction.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="12150" PostHistoryTypeId="2" PostId="3236" RevisionGUID="3afe8f41-265c-4c95-80c4-09b9b7bd1567" CreationDate="2022-06-13T19:54:52.740" UserId="1824" Text="Pierre is right, your arguments need to be encodeable/decodeable (`T: Encode + Decode`).&#xD;&#xA;By doing this you'll be able to use the&#xD;&#xA;[`read_as`](https://crates.parity.io/pallet_contracts/chain_extension/struct.Environment.html#method.read_as)&#xD;&#xA;method in your chain extension implementation which will try and correctly decode the&#xD;&#xA;bytes in the memory buffer into the specified Rust types.&#xD;&#xA;&#xD;&#xA;You can then do something like this&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let (type_a, type_b): (TypeA, TypeB) = env.read_as()?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don't believe having the same field names matters, but having the exact same types definitely does.&#xD;&#xA;&#xD;&#xA;Also, as another resource take a look at the [Runtime-Contract-Interactions](https://github.com/justinFrevert/Runtime-Contract-Interactions) repository.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12152" PostHistoryTypeId="2" PostId="3237" RevisionGUID="88961883-c5c5-475f-b06b-d5f03b4049de" CreationDate="2022-06-13T20:16:15.023" UserId="94" Text="Answering your questions one by one:  &#xD;&#xA;&#xD;&#xA;1. Benchmarking the Pallets is always necessary since the results depend on your runtime configuration. &#xD;&#xA;Each variable that you change in the runtime config can lead to different results for that Pallet.  &#xD;&#xA;The benchmarking results are only useful when they were acquired on reference hardware (assuming that you want to run a para-chain). You can obviously use any hardware for debugging and testing how the benchmarks work. &#xD;&#xA;&#xD;&#xA;2. If you just want to try things out or for a test-net: most likely yes. Unless you completely changed the default runtime settings.  &#xD;&#xA;For a real deployment it is advised to actually benchmark and use the correct weights. This is a responsibility to your users and validators. Otherwise &#xD;&#xA;users could pay too much fees (bad for the user) or too little (bad for the validator).&#xD;&#xA;&#xD;&#xA;3. Yes. You probably already saw the documentation in the [Wiki](https://docs.substrate.io/v3/runtime/benchmarking/). A more complete example that we use in Polkadot is [this script](https://github.com/paritytech/polkadot/blob/master/scripts/ci/run_benches_for_runtime.sh) which is a shorter version of [this one](https://github.com/paritytech/substrate/blob/master/scripts/run_all_benchmarks.sh). You can call it with the name of your runtime and it will then generate weight files for each pallet. The `benchmark overhead` command that it additionally runs is explained [here](https://github.com/paritytech/substrate/tree/master/utils/frame/benchmarking-cli).&#xD;&#xA;&#xD;&#xA;Thanks for asking these Questions!  &#xD;&#xA;I noticed that we should extend the documentation for a complete &quot;how to benchmark my runtime&quot; example.  &#xD;&#xA;&#xD;&#xA;Best Regards" ContentLicense="CC BY-SA 4.0" />
  <row Id="12158" PostHistoryTypeId="2" PostId="3239" RevisionGUID="1bbd735b-2cda-4426-968c-a30b2af0ab58" CreationDate="2022-06-13T20:48:21.257" UserId="94" Text="That project looks like its not being maintained anymore.  I asked to archive it to prevent further confusion.  &#xD;&#xA;&#xD;&#xA;The current procedure for creating a new Substrate project is to fork the [node template](https://github.com/substrate-developer-hub/substrate-node-template) as explained in the [Docs](https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12160" PostHistoryTypeId="2" PostId="3240" RevisionGUID="60bb18b3-4ac8-465e-90ed-f4189c3d0df1" CreationDate="2022-06-14T00:06:37.493" UserId="2730" Text="I am writing a web app that shows current info about bounties and child bounties. From what i understand if there is a bounty with a value of 5 DOT, I can create N child bounties which values sum up to 5 DOT (assuming curators fee 0). Now let's say that I create a child bounty of value 0.5 DOT and this child bounty was already paid to some beneficiary. &#xD;&#xA;&#xD;&#xA;How can check how much DOTs is left to spend for next child bounties? (4.5 DOT in my example)&#xD;&#xA;&#xD;&#xA;Thank you! :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12162" PostHistoryTypeId="1" PostId="3240" RevisionGUID="60bb18b3-4ac8-465e-90ed-f4189c3d0df1" CreationDate="2022-06-14T00:06:37.493" UserId="2730" Text="Get remaining value of bounty after child bounty" ContentLicense="CC BY-SA 4.0" />
  <row Id="12163" PostHistoryTypeId="3" PostId="3240" RevisionGUID="60bb18b3-4ac8-465e-90ed-f4189c3d0df1" CreationDate="2022-06-14T00:06:37.493" UserId="2730" Text="|polkadot-js|javascript|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12164" PostHistoryTypeId="2" PostId="3241" RevisionGUID="02b2ab53-6cdd-4a11-9ecb-b9e45a9deb71" CreationDate="2022-06-14T00:23:49.680" UserId="1950" Text="I have currency configuration as follows&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use frame_support::traits::{Currency};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and in frame config&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type Currency: Currency&lt;Self::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then in an extrincis function, I am trying to do a transfer&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&lt;T as Config&gt;::Currency::transfer(&#xD;&#xA;				&amp;who,&#xD;&#xA;				&amp;validators_account,&#xD;&#xA;				transaction_fee,&#xD;&#xA;				ExistenceRequirement::KeepAlive&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This throws an error &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;     --&gt; /home/dev/Desktop/projects/GIANT/pallets/provider/src/lib.rs:281:5&#xD;&#xA;      |&#xD;&#xA;  278 |             &lt;T as Config&gt;::Currency::transfer(&#xD;&#xA;      |             --------------------------------- arguments to this function are incorrect&#xD;&#xA;  ...&#xD;&#xA;  281 |                 transaction_fee,&#xD;&#xA;      |                 ^^^^^^^^^^^^^^^ expected associated type, found `u128`&#xD;&#xA;      |&#xD;&#xA;      = note: expected associated type `&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;                            found type `u128`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I explore tests for transfer function in the substrate it uses integer values &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;				assert_noop!(&#xD;&#xA;					&lt;Balances as Currency&lt;_&gt;&gt;::transfer(&amp;1, &amp;2, 3, AllowDeath),&#xD;&#xA;					Error::&lt;$test, _&gt;::LiquidityRestrictions&#xD;&#xA;				);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This throws an error as well&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;			&lt;T as Config&gt;::Currency::transfer(&#xD;&#xA;				&amp;who,&#xD;&#xA;				&amp;validators_account,&#xD;&#xA;				100,&#xD;&#xA;				ExistenceRequirement::KeepAlive&#xD;&#xA;			)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error&#xD;&#xA;```&#xD;&#xA;            &lt;T as Config&gt;::Currency::transfer(&#xD;&#xA;      |             --------------------------------- arguments to this function are incorrect&#xD;&#xA;  ...&#xD;&#xA;  281 |                 100,&#xD;&#xA;      |                 ^^^ expected associated type, found integer&#xD;&#xA;      |&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12166" PostHistoryTypeId="1" PostId="3241" RevisionGUID="02b2ab53-6cdd-4a11-9ecb-b9e45a9deb71" CreationDate="2022-06-14T00:23:49.680" UserId="1950" Text="Error in currency transfer" ContentLicense="CC BY-SA 4.0" />
  <row Id="12167" PostHistoryTypeId="3" PostId="3241" RevisionGUID="02b2ab53-6cdd-4a11-9ecb-b9e45a9deb71" CreationDate="2022-06-14T00:23:49.680" UserId="1950" Text="|balances|tcurrency|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12168" PostHistoryTypeId="2" PostId="3242" RevisionGUID="efafd361-8845-471d-a9ca-8fb1cab9ef0f" CreationDate="2022-06-14T01:39:26.883" UserId="28" Text="As the error is noting, the it expects an associated type `Balance`, not a concrete type.&#xD;&#xA;&#xD;&#xA;While your runtime may use the u128 type, your pallet does not know that, and instead uses a generic type which you must take into account.&#xD;&#xA;&#xD;&#xA;The easiest thing would be to `use sp_runtime::traits::UniqueSaturatedInto;`, then add `.unique_saturated_into()` to your value.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Just like `From` except that if the source value is too big to fit into the destination type&#xD;&#xA;/// then it'll saturate the destination.&#xD;&#xA;pub trait UniqueSaturatedFrom&lt;T: Sized&gt;: Sized {&#xD;&#xA;	/// Convert from a value of `T` into an equivalent instance of `Self`.&#xD;&#xA;	fn unique_saturated_from(t: T) -&gt; Self;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So something like this compiles:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_runtime::traits::UniqueSaturatedInto;&#xD;&#xA;let source = T::Lookup::lookup(source)?;&#xD;&#xA;let dest = T::Lookup::lookup(dest)?;&#xD;&#xA;&lt;Self as Currency&lt;_&gt;&gt;::transfer(&#xD;&#xA;	&amp;source,&#xD;&#xA;	&amp;dest,&#xD;&#xA;	100u128.unique_saturated_into(),&#xD;&#xA;	ExistenceRequirement::AllowDeath,&#xD;&#xA;)?;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12170" PostHistoryTypeId="2" PostId="3243" RevisionGUID="89aeac9a-98bf-4e1b-ae6f-eb7d4c22442c" CreationDate="2022-06-14T03:11:50.443" UserId="2565" Text="Where could I find a sample simple chain spec for substrate ready for production?  " ContentLicense="CC BY-SA 4.0" />
  <row Id="12172" PostHistoryTypeId="1" PostId="3243" RevisionGUID="89aeac9a-98bf-4e1b-ae6f-eb7d4c22442c" CreationDate="2022-06-14T03:11:50.443" UserId="2565" Text="Where could I find a sample simple chain spec for substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12173" PostHistoryTypeId="3" PostId="3243" RevisionGUID="89aeac9a-98bf-4e1b-ae6f-eb7d4c22442c" CreationDate="2022-06-14T03:11:50.443" UserId="2565" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12174" PostHistoryTypeId="2" PostId="3244" RevisionGUID="0950da90-f98b-4dff-bd38-35d181b46040" CreationDate="2022-06-14T04:41:57.943" UserId="2731" Text="I am trying to use the @polkadot/api-contract ContractPromise to interact with a published smart contract on the moonriver network but when I try and create a new ContractPromise object I get the error &quot;Error: createType(ContractProjectInfo):: Struct: Unable to map&quot; + abi string + &quot;array to object with known keys source, contract&quot;. I'm not entirely sure why this is because the abi and contract address seem to be correct.&#xD;&#xA;&#xD;&#xA;the code I am using to test it out is here &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;import { ContractPromise } from &quot;@polkadot/api-contract&quot;;&#xD;&#xA;import { ksmContractABI } from &quot;./consts&quot;;&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;  console.log(&quot;start&quot;);&#xD;&#xA;  const ksmContractAddress = &quot;0xFfc7780C34B450d917d557E728f033033CB4fA8C&quot;;&#xD;&#xA;  const wsProvider = new WsProvider(&quot;wss://kusama-rpc.polkadot.io&quot;);&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;  const contract = new ContractPromise(&#xD;&#xA;    api,&#xD;&#xA;    JSON.stringify(ksmContractABI),&#xD;&#xA;    ksmContractAddress&#xD;&#xA;  );&#xD;&#xA;  console.log(&quot;done&quot;);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;the contract can be seen here: https://moonriver.moonscan.io/address/0xFfc7780C34B450d917d557E728f033033CB4fA8C&#xD;&#xA;&#xD;&#xA;and the code from which I generated my abi can be found here: https://github.com/mixbytes/lido-dot-ksm/blob/main/contracts/Lido.sol" ContentLicense="CC BY-SA 4.0" />
  <row Id="12176" PostHistoryTypeId="1" PostId="3244" RevisionGUID="0950da90-f98b-4dff-bd38-35d181b46040" CreationDate="2022-06-14T04:41:57.943" UserId="2731" Text="unable to map abi string to array to object with known keys source, contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="12177" PostHistoryTypeId="3" PostId="3244" RevisionGUID="0950da90-f98b-4dff-bd38-35d181b46040" CreationDate="2022-06-14T04:41:57.943" UserId="2731" Text="|polkadot-js|smart-contract|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12178" PostHistoryTypeId="2" PostId="3245" RevisionGUID="5feef3dd-1913-45cf-afeb-599d5890eaf9" CreationDate="2022-06-14T06:06:39.113" UserId="2155" Text="When I read the code of the [wasmtime executor](https://github.com/paritytech/substrate/tree/master/client/executor/wasmtime), I can't understand the way to register the HostFunction to the wasm module. What is the role of the [```sp_wasm_interface::HostFunctionRegistry```](https://github.com/paritytech/substrate/blob/master/client/executor/wasmtime/src/imports.rs#L95) trait? How is the parameter ```func``` of the function [```register_static```](https://github.com/paritytech/substrate/blob/master/client/executor/wasmtime/src/imports.rs#L107) passed in? &#xD;&#xA;&#xD;&#xA;I have to solve this problem when I want to use a different wasm runtime instead of wasmtime or wasmi. However, I can't find a way to get the HostFunction's function body." ContentLicense="CC BY-SA 4.0" />
  <row Id="12180" PostHistoryTypeId="1" PostId="3245" RevisionGUID="5feef3dd-1913-45cf-afeb-599d5890eaf9" CreationDate="2022-06-14T06:06:39.113" UserId="2155" Text="How to register HostFunction into WASM Runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12181" PostHistoryTypeId="3" PostId="3245" RevisionGUID="5feef3dd-1913-45cf-afeb-599d5890eaf9" CreationDate="2022-06-14T06:06:39.113" UserId="2155" Text="|runtime|wasm|wasmtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12182" PostHistoryTypeId="5" PostId="3174" RevisionGUID="57df6f7a-e9c4-4121-a63c-924d6666444f" CreationDate="2022-06-14T07:35:57.020" UserId="567" Comment="removed &quot;name&quot;" Text="All your args will be passed as a SCALE encoded message param.&#xD;&#xA;That's why on the runtime you should decode it using a struct that derive Scale Encode + Decode + MaxEncodedLen and have the exact same types.&#xD;&#xA;&#xD;&#xA;In your contract:&#xD;&#xA;&#xD;&#xA;        // PSP22 transfer&#xD;&#xA;    #[ink(extension = 0xdb20f9f5)]&#xD;&#xA;    fn transfer(&#xD;&#xA;        asset_id: u32,&#xD;&#xA;        to: &lt;ink_env::DefaultEnvironment as Environment&gt;::AccountId,&#xD;&#xA;        value: &lt;ink_env::DefaultEnvironment as Environment&gt;::Balance,&#xD;&#xA;    ) -&gt; Result&lt;(), Psp22Error&gt;;&#xD;&#xA;&#xD;&#xA;In the runtime:&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Encode, Decode, MaxEncodedLen)]&#xD;&#xA;    pub struct Psp22TransferInput&lt;AssetId, AccountId, Balance&gt; {&#xD;&#xA;    	pub asset_id: AssetId,&#xD;&#xA;    	pub to: AccountId,&#xD;&#xA;    	pub value: Balance,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    let input: Psp22TransferInput&lt;T::AssetId, T::AccountId, T::Balance&gt; =&#xD;&#xA;    					env.read_as()?;&#xD;&#xA;&#xD;&#xA;You can check [Parity ink! example](https://github.com/paritytech/ink/pull/1244/files) of PSP22 implementation (more basic as it will serve as an example)&#xD;&#xA;&#xD;&#xA;And [OpenBrush example](https://github.com/Supercolony-net/openbrush-contracts/pull/104/files) PSP22 implementation (more advanced as it targets to be production-ready)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12183" PostHistoryTypeId="2" PostId="3246" RevisionGUID="8218dfdf-54f0-413d-b32c-c52db8be82bb" CreationDate="2022-06-14T07:51:29.553" UserId="393" Text="Why not just export one from substrate-node-template ? You can run the following cmd: &#xD;&#xA;&#xD;&#xA;    ${path-to-substrate-template-binary} build-spec" ContentLicense="CC BY-SA 4.0" />
  <row Id="12185" PostHistoryTypeId="2" PostId="3247" RevisionGUID="2dc37798-ceae-4423-ba21-a985005cf8c7" CreationDate="2022-06-14T07:53:31.700" UserId="1732" Text="I don't think your problem comes from DNS but from archive mode.&#xD;&#xA;We just faced the same problem with other nodes not syncing in archive mode, using `--validator` and removing `--pruning archive` solved the problem.&#xD;&#xA;I also thought bootnodes were supposed to run in archive mode, not sure this is the expected behavior.&#xD;&#xA;&#xD;&#xA;As per DNS config, you have a simpler alternative than proxy with nginx: &#xD;&#xA;- Create a TXT record in DNS `_dnsaddr.{SUB_DOMAIN}` pointing to `&quot;dnsaddr=/ip4/{BOOTNODE_IP}/tcp/30333/p2p/{PEER_ID}&quot;`. &#xD;&#xA;- Add `&quot;/dnsaddr/{SUB_DOMAIN}/p2p/{PEER_ID}&quot;` in chain specs." ContentLicense="CC BY-SA 4.0" />
  <row Id="12187" PostHistoryTypeId="2" PostId="3248" RevisionGUID="cd7fb0d6-7968-484f-a30e-7f4a3c89bd0c" CreationDate="2022-06-14T08:33:08.120" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="12189" PostHistoryTypeId="1" PostId="3248" RevisionGUID="cd7fb0d6-7968-484f-a30e-7f4a3c89bd0c" CreationDate="2022-06-14T08:33:08.120" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="12190" PostHistoryTypeId="2" PostId="3249" RevisionGUID="f9058ceb-7470-40fa-9206-101d3f6c1022" CreationDate="2022-06-14T08:33:08.120" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="12192" PostHistoryTypeId="1" PostId="3249" RevisionGUID="f9058ceb-7470-40fa-9206-101d3f6c1022" CreationDate="2022-06-14T08:33:08.120" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="12193" PostHistoryTypeId="2" PostId="3250" RevisionGUID="3a2d100f-1a28-4a9e-a63b-f8b4b685b2ec" CreationDate="2022-06-14T08:33:47.020" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="12195" PostHistoryTypeId="1" PostId="3250" RevisionGUID="3a2d100f-1a28-4a9e-a63b-f8b4b685b2ec" CreationDate="2022-06-14T08:33:47.020" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="12196" PostHistoryTypeId="2" PostId="3251" RevisionGUID="74f7092c-3508-45c5-b10c-d8976887c6ff" CreationDate="2022-06-14T08:33:47.020" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="12198" PostHistoryTypeId="1" PostId="3251" RevisionGUID="74f7092c-3508-45c5-b10c-d8976887c6ff" CreationDate="2022-06-14T08:33:47.020" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="12199" PostHistoryTypeId="5" PostId="3247" RevisionGUID="c855acf7-a348-4829-84bf-f77e963cfa8f" CreationDate="2022-06-14T08:52:12.813" UserId="1732" Comment="added 146 characters in body" Text="I don't think your problem comes from DNS but from archive mode.&#xD;&#xA;We just faced the same problem with other nodes not syncing in archive mode, using `--validator` and removing `--pruning archive` solved the problem.&#xD;&#xA;Not sure this is the expected behavior.&#xD;&#xA;&#xD;&#xA;The difference is that in archive mode, the node will listen on `ws/p2p` URI while in collator mode it listens only on `p2p`.&#xD;&#xA;But simply adding `ws` or `wss` into bootnode URI doesn't help reaching peers.&#xD;&#xA;&#xD;&#xA;As per DNS config, you have a simpler alternative than proxy with nginx: &#xD;&#xA;- Create a TXT record in DNS `_dnsaddr.{SUB_DOMAIN}` pointing to `&quot;dnsaddr=/ip4/{BOOTNODE_IP}/tcp/30333/p2p/{PEER_ID}&quot;`. &#xD;&#xA;- Add `&quot;/dnsaddr/{SUB_DOMAIN}/p2p/{PEER_ID}&quot;` in chain specs." ContentLicense="CC BY-SA 4.0" />
  <row Id="12200" PostHistoryTypeId="2" PostId="3252" RevisionGUID="e0bbcee6-c8c4-470c-abae-0de6320cc8aa" CreationDate="2022-06-14T09:29:27.023" UserId="280" Text="Assume we have a StorageMap MyMap of which we want to extend the type of the decoded keys from KeyTypeOld to an enum including the old type as well as a new one.&#xD;&#xA;&#xD;&#xA;Before&#xD;&#xA;```rust&#xD;&#xA;pub type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After&#xD;&#xA;```rust&#xD;&#xA;pub enum MyEnum&lt;A, B&gt; {&#xD;&#xA;	Old(A),&#xD;&#xA;	New(B),&#xD;&#xA;}&#xD;&#xA;pub type MyMap = StorageMap&lt;_, Blake2_128Concat, MyEnum&lt;KeyTypeOld, KeyTypeAddition&gt;, V&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;1. Is it possible to migrate from the old map to the new one without keeping the definition of the old one in the WASM blob, e.g., only in-memory in the migration? This would keep the API of this storage entry consistent. &#xD;&#xA;&#xD;&#xA;Unfortunately, my attempt (see below) fails to decode the keys when iterating over the in-memory created `MyMapOld`. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;mod migration {&#xD;&#xA;	use crate::MyMap as MyMapNew;&#xD;&#xA;&#xD;&#xA;	#[storage_alias]&#xD;&#xA;	type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;	#[storage_alias]&#xD;&#xA;	type MyMapTmp = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;&#xD;&#xA;	pub struct MyMigration(PhantomData&lt;P&gt;);&#xD;&#xA;	impl&lt;P: crate::pallet::Config&gt; OnRuntimeUpgrade for MyMigration&lt;P&gt;{&#xD;&#xA;		fn on_runtime_upgrade() -&gt; frame_support::weights::Weight {&#xD;&#xA;			// Should not write to same storage item during drain &#xD;&#xA;			// Thus, write to temporary storage and move at the end&#xD;&#xA;			MyMap::&lt;P&gt;::drain().for_each(|(key_old, value)| {&#xD;&#xA;				let key_new = MyEnum::&lt;KeyTypeOld, KeyTypeAddition&gt;::Old(key_old);&#xD;&#xA;				MyMapTmp::&lt;R&gt;::insert(key_new, value);&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			// Move items from MyMapTmp to MyMapNew similar to &#xD;&#xA;			// frame_support::storage::migration::move_storage_from_pallet&#xD;&#xA;			...&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The only solution I have found so far is to keep the old definition of `MyMap` and have a co-existing `MyMapNew`. However, that would break the API for services which I would like to avoid.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// inside pallet macro&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type MyMapNew = StorageMap&lt;_, Blake2_128Concat, MyEnum&lt;KeyTypeOld, KeyTypeAddition&gt;, V&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Moreover, is my assumption correct that we can we expect services, which periodically connect to my chain and query MyMap storage via Polkadot-JS, to be able to automatically understand the correct decoding by the provided post-upgrade metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12202" PostHistoryTypeId="1" PostId="3252" RevisionGUID="e0bbcee6-c8c4-470c-abae-0de6320cc8aa" CreationDate="2022-06-14T09:29:27.023" UserId="280" Text="Migrate keytype of StorageMap without breakin API" ContentLicense="CC BY-SA 4.0" />
  <row Id="12203" PostHistoryTypeId="3" PostId="3252" RevisionGUID="e0bbcee6-c8c4-470c-abae-0de6320cc8aa" CreationDate="2022-06-14T09:29:27.023" UserId="280" Text="|storage|migration|metadata|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12204" PostHistoryTypeId="2" PostId="3253" RevisionGUID="6eaa48e7-8384-48ac-a0b4-db6fa49ae61b" CreationDate="2022-06-14T09:32:42.200" UserId="2735" Text="I'm new to polkadot. I am working on checking received transactions to my wallets.&#xD;&#xA;I have used below code &amp; able to get hash, from, to &amp; amount etc. but I am not able to get result &amp; fee of received balance transfer in ex in below code&#xD;&#xA;```&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;    signedBlock.block.extrinsics.forEach((**ex**, index) =&gt; {&#xD;&#xA;        if(ex.method.section === 'balances' &amp;&amp; ex.method.method === 'transfer'){&#xD;&#xA;            console.log(`Tx[${ex.hash.toString()}] : Amount[${ex.args[1].toString()}] sent from[${ex.signer.toString()}] to[${ex.args[0].toString()}]`);&#xD;&#xA;        }&#xD;&#xA;   });&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Please help me. Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="12206" PostHistoryTypeId="1" PostId="3253" RevisionGUID="6eaa48e7-8384-48ac-a0b4-db6fa49ae61b" CreationDate="2022-06-14T09:32:42.200" UserId="2735" Text="Get result of extrinsics balance transfer using block's extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="12207" PostHistoryTypeId="3" PostId="3253" RevisionGUID="6eaa48e7-8384-48ac-a0b4-db6fa49ae61b" CreationDate="2022-06-14T09:32:42.200" UserId="2735" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12208" PostHistoryTypeId="2" PostId="3254" RevisionGUID="29d72c71-6cc7-447f-b90f-87d97b71c4d7" CreationDate="2022-06-14T09:35:27.720" UserId="2734" Text="How does one fetch the balance and nonce for a given address without using the polkadot.js client? &#xD;&#xA;&#xD;&#xA;This is how you do it with the client but I can't seem to find the rpc methods or tutorials to do it without..&#xD;&#xA;``` javascript&#xD;&#xA;const Alice = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';&#xD;&#xA;let { data: { free: previousFree }, nonce: previousNonce } = await api.query.system.account(Alice);&#xD;&#xA;&#xD;&#xA;console.log(`${Alice} has a balance of ${previousFree}, nonce ${previousNonce}`);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12210" PostHistoryTypeId="1" PostId="3254" RevisionGUID="29d72c71-6cc7-447f-b90f-87d97b71c4d7" CreationDate="2022-06-14T09:35:27.720" UserId="2734" Text="Is it possible to fetch balance and nonce without using Polkadot.js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12211" PostHistoryTypeId="3" PostId="3254" RevisionGUID="29d72c71-6cc7-447f-b90f-87d97b71c4d7" CreationDate="2022-06-14T09:35:27.720" UserId="2734" Text="|polkadot|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12216" PostHistoryTypeId="2" PostId="3256" RevisionGUID="49f6b23d-d588-4f81-a18a-856a2626e457" CreationDate="2022-06-14T10:12:04.367" UserId="620" Text="The block body itself is just an array of extrinsics (in this context, function calls), but since the block is constructed prior to its execution, it cannot include the results of calling those functions. For that, you need to look into events, which get written to state at the end of block execution.&#xD;&#xA;&#xD;&#xA;If you're monitoring a wallet's deposits, we have a [special guide to that](https://wiki.polkadot.network/docs/build-protocol-info#extrinsics-and-events) on the Polkadot Wiki.&#xD;&#xA;&#xD;&#xA;Further, I'd recommend that you not implement this yourself, and just use [Substrate API Sidecar](https://github.com/paritytech/substrate-api-sidecar). Calling `GET block` will give you all the info you are looking for. However, if you do want to go for it, I'd still use Sidecar as a reference, e.g. [how it gets blocks](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/services/blocks/BlocksService.ts)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12222" PostHistoryTypeId="2" PostId="3258" RevisionGUID="a399fc04-0b0a-487e-89c8-beeda091b740" CreationDate="2022-06-14T10:39:55.160" UserId="2736" Text="There are many ways to read these values, so you can adjust approach to your use-case.&#xD;&#xA;&#xD;&#xA;## 1. Read from UI&#xD;&#xA;&#xD;&#xA;Go to `Developer` tab, then `Chain state` and `Storage`. On this page you should query about `system: account` with Alice as parameter (see the screenshot below). As a response you will get a small object describing account data, including nonce and free balances.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7wlUo.png&#xD;&#xA;&#xD;&#xA;## 2. With json RPC call&#xD;&#xA;&#xD;&#xA;You can use `curl` command like:&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getStorage&quot;, &quot;params&quot;:[&quot;0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9de1e86a9a8c739864cf3cc5ec2bea59fd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;]}' localhost:9933&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Two things here:&#xD;&#xA; - `params` array should contain storage key, which is a long hex string, which you can compute on your own or read from e.g. UI (see the &quot;encoded storage key&quot; entry in the screenshot above). Basically, it consists of three pieces concatenated together: first two encode where the corresponding storage map for all accounts resides. The last one is the target account ID hashed with Blake2_128Concat algorithm.&#xD;&#xA; - change `localhost:9933` to your RPC port&#xD;&#xA;&#xD;&#xA;The problem is that you will get encoded data here:&#xD;&#xA;```&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x000000000000000001000000000000000000703b1bd2aa400300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&quot;,&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This should decode to the same structure you get in the previous step, but for that you will have to use e.g. parity scale codec library.&#xD;&#xA;&#xD;&#xA;## 3. Use library&#xD;&#xA;&#xD;&#xA;You can check one of these libraries for interacting with Substrate-based chain:&#xD;&#xA; - https://github.com/paritytech/subxt&#xD;&#xA; - https://github.com/scs/substrate-api-client&#xD;&#xA;&#xD;&#xA;**Note:** Depending how you configured `frame_system::Config::AccountData` for you runtime, these values might be stored somewhere else / in other form. The steps I presented are applicable for `pallet_balances::AccountData&lt;Balance&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="12227" PostHistoryTypeId="2" PostId="3259" RevisionGUID="635360e3-50e8-4af3-ac2c-63018ee17b93" CreationDate="2022-06-14T11:19:47.983" UserId="2736" Text="I need to interact with `pallet_session`, in particular to read validator set for the next session. As far as I understand, this data is stored in two places:&#xD;&#xA; - `QueuedKeys`, which is just `Vec&lt;(T::ValidatorId, T::Keys)&gt;`&#xD;&#xA; - `NextKeys`, which is a mapping from `T::ValidatorId` to `T::Keys`&#xD;&#xA;&#xD;&#xA;After scrolling pallet code, it seems to me that these two containers are kinda equivalent and it is not clear for me why there is a need for both of them. Hence, I do not know whether I'm guaranteed that they always contain the same data and I can use any of them or I'm missing something.&#xD;&#xA;&#xD;&#xA;So the question is: is there any difference between `QueuedKeys` and `NextKeys`, of course apart from the lookup/access interface (vector vs map)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12229" PostHistoryTypeId="1" PostId="3259" RevisionGUID="635360e3-50e8-4af3-ac2c-63018ee17b93" CreationDate="2022-06-14T11:19:47.983" UserId="2736" Text="Pallet session: QueuedKeys vs NextKeys" ContentLicense="CC BY-SA 4.0" />
  <row Id="12230" PostHistoryTypeId="3" PostId="3259" RevisionGUID="635360e3-50e8-4af3-ac2c-63018ee17b93" CreationDate="2022-06-14T11:19:47.983" UserId="2736" Text="|storage|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12231" PostHistoryTypeId="6" PostId="3259" RevisionGUID="b9f7b86e-f3c0-4abf-9aa6-c1c7120e1fa4" CreationDate="2022-06-14T11:22:44.443" UserId="2736" Comment="edited tags" Text="|pallet|storage|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12232" PostHistoryTypeId="5" PostId="3181" RevisionGUID="984d385a-ef4c-4353-95cb-89277d061aa8" CreationDate="2022-06-14T13:03:10.790" UserId="425" Comment="deleted 7 characters in body" Text="Can the information about the owner of the actual contract code blob (the account that deployed the code) be accessed from the contract environment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12233" PostHistoryTypeId="5" PostId="3252" RevisionGUID="0800f87d-f5cb-44a8-beac-072526be6f51" CreationDate="2022-06-14T13:18:16.093" UserId="280" Comment="Fix: MyMapTmp keytype" Text="Assume we have a StorageMap MyMap of which we want to extend the type of the decoded keys from KeyTypeOld to an enum including the old type as well as a new one.&#xD;&#xA;&#xD;&#xA;Before&#xD;&#xA;```rust&#xD;&#xA;pub type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After&#xD;&#xA;```rust&#xD;&#xA;pub enum MyEnum&lt;A, B&gt; {&#xD;&#xA;	Old(A),&#xD;&#xA;	New(B),&#xD;&#xA;}&#xD;&#xA;pub type MyMap = StorageMap&lt;_, Blake2_128Concat, MyEnum&lt;KeyTypeOld, KeyTypeAddition&gt;, V&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;1. Is it possible to migrate from the old map to the new one without keeping the definition of the old one in the WASM blob, e.g., only in-memory in the migration? This would keep the API of this storage entry consistent. &#xD;&#xA;&#xD;&#xA;Unfortunately, my attempt (see below) fails to decode the keys when iterating over the in-memory created `MyMapOld`, at least when testing with the `try-runtime` feature.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;mod migration {&#xD;&#xA;	use crate::MyMap as MyMapNew;&#xD;&#xA;&#xD;&#xA;	#[storage_alias]&#xD;&#xA;	type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;	#[storage_alias]&#xD;&#xA;	type MyMapTmp = StorageMap&lt;_, Blake2_128Concat, MyEnum&lt;KeyTypeOld, KeyTypeAddition&gt;, V&gt;;&#xD;&#xA;&#xD;&#xA;	pub struct MyMigration(PhantomData&lt;P&gt;);&#xD;&#xA;	impl&lt;P: crate::pallet::Config&gt; OnRuntimeUpgrade for MyMigration&lt;P&gt;{&#xD;&#xA;		fn on_runtime_upgrade() -&gt; frame_support::weights::Weight {&#xD;&#xA;			// Should not write to same storage item during drain &#xD;&#xA;			// Thus, write to temporary storage and move at the end&#xD;&#xA;			MyMap::&lt;P&gt;::drain().for_each(|(key_old, value)| {&#xD;&#xA;				let key_new = MyEnum::&lt;KeyTypeOld, KeyTypeAddition&gt;::Old(key_old);&#xD;&#xA;				MyMapTmp::&lt;R&gt;::insert(key_new, value);&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			// Move items from MyMapTmp to MyMapNew similar to &#xD;&#xA;			// frame_support::storage::migration::move_storage_from_pallet&#xD;&#xA;			...&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The only solution I have found so far is to keep the old definition of `MyMap` and have a co-existing `MyMapNew`. However, that would break the API for services which I would like to avoid.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// inside pallet macro&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type MyMapNew = StorageMap&lt;_, Blake2_128Concat, MyEnum&lt;KeyTypeOld, KeyTypeAddition&gt;, V&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Moreover, is my assumption correct that we can we expect services, which periodically connect to my chain and query MyMap storage via Polkadot-JS, to be able to automatically understand the correct decoding by the provided post-upgrade metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12234" PostHistoryTypeId="2" PostId="3260" RevisionGUID="17002a6d-96cf-43e0-875f-dbd89f7098c9" CreationDate="2022-06-14T14:04:55.950" UserId="627" Text="The polkadot-js API docs has some cookbook examples of this -&#xD;&#xA;&#xD;&#xA; - [mapping extrinsics to their events](https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-map-extrinsics-to-their-events)&#xD;&#xA; - [checking success/failure of extrinsics](https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-determine-if-an-extrinsic-succeededfailed)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12236" PostHistoryTypeId="2" PostId="3261" RevisionGUID="b3bad2ce-f18c-479f-8842-617bb3f779dc" CreationDate="2022-06-14T14:20:51.973" UserId="2408" Text="Use `cargo +nightly test` instead of `cargo +nightly contract test`" ContentLicense="CC BY-SA 4.0" />
  <row Id="12238" PostHistoryTypeId="2" PostId="3262" RevisionGUID="16419cca-c7a0-4409-aebc-1f77490235d7" CreationDate="2022-06-14T14:56:15.250" UserId="29" Text="Some parachain teams commit them to their Github (so poke around in their Substrate repos).&#xD;&#xA;&#xD;&#xA;You can see Polkadot's chain spec here:&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/master/node/service/chain-specs/polkadot.json&#xD;&#xA;&#xD;&#xA;There are several others from the ecosystem:&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/master/node/service/chain-specs" ContentLicense="CC BY-SA 4.0" />
  <row Id="12240" PostHistoryTypeId="5" PostId="3228" RevisionGUID="8705a160-44c1-4265-9291-86300e5ff55f" CreationDate="2022-06-14T16:02:59.440" UserId="165" Comment="added 1 character in body" Text="This is a very interesting question.&#xD;&#xA;&#xD;&#xA;My two cents here, it is true that hooks can do some computation, more or less complex, and so it will take some of the weight available.&#xD;&#xA;But this is some logic that the system is executing under certain conditions, this is not someone (an origin, external to the system) requesting for some storage modification or some execution. So, the weight used related to these hooks is something native to the design of the system itself, and not something you can make any other entity accountable for." ContentLicense="CC BY-SA 4.0" />
  <row Id="12241" PostHistoryTypeId="2" PostId="3263" RevisionGUID="0d739666-5a25-4948-94b5-e7382a0c1eb6" CreationDate="2022-06-14T17:50:54.163" UserId="2698" Text="When building I am running into this error:&#xD;&#xA;```&#xD;&#xA;error: cannot find macro `format` in this scope&#xD;&#xA;    --&gt; /Users/jackson/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/finality-grandpa/src/lib.rs:43:2&#xD;&#xA;     |&#xD;&#xA;  43 |     app_crypto!(ed25519, GRANDPA);&#xD;&#xA;     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: consider importing one of these items:&#xD;&#xA;             alloc::format&#xD;&#xA;             scale_info::prelude::format&#xD;&#xA;     = note: this error originates in the macro `$crate::app_crypto_public_common_if_std` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `std`&#xD;&#xA;    --&gt; /Users/jackson/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/finality-grandpa/src/lib.rs:43:2&#xD;&#xA;     |&#xD;&#xA;  43 |     app_crypto!(ed25519, GRANDPA);&#xD;&#xA;     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `std`&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `$crate::app_crypto_public_common_if_std` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared type `String`&#xD;&#xA;    --&gt; /Users/jackson/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/finality-grandpa/src/lib.rs:43:2&#xD;&#xA;     |&#xD;&#xA;  43 |     app_crypto!(ed25519, GRANDPA);&#xD;&#xA;     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `$crate::app_crypto_public_common_if_std` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;  help: consider importing one of these items&#xD;&#xA;     |&#xD;&#xA;  42 |     use alloc::string::String;&#xD;&#xA;     |&#xD;&#xA;  42 |     use codec::alloc::string::String;&#xD;&#xA;     |&#xD;&#xA;  42 |     use scale_info::prelude::string::String;&#xD;&#xA;     |&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `String` in this scope&#xD;&#xA;    --&gt; /Users/jackson/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/finality-grandpa/src/lib.rs:43:2&#xD;&#xA;     |&#xD;&#xA;  43 |     app_crypto!(ed25519, GRANDPA);&#xD;&#xA;     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `$crate::app_crypto_pair_functions_if_std` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;  help: consider importing one of these items&#xD;&#xA;     |&#xD;&#xA;  42 |     use alloc::string::String;&#xD;&#xA;     |&#xD;&#xA;  42 |     use codec::alloc::string::String;&#xD;&#xA;     |&#xD;&#xA;  42 |     use scale_info::prelude::string::String;&#xD;&#xA;     |&#xD;&#xA;```&#xD;&#xA;From first glance it looks like these errors are resulting from the same problem. However since I don't know where the error is occurring I am not sure where to test solutions. I have seen other posts about this here, but they all have different root causes and different solutions. Has anyone come across this before?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12243" PostHistoryTypeId="1" PostId="3263" RevisionGUID="0d739666-5a25-4948-94b5-e7382a0c1eb6" CreationDate="2022-06-14T17:50:54.163" UserId="2698" Text="Why is App_Crypto not building in frame system runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="12244" PostHistoryTypeId="3" PostId="3263" RevisionGUID="0d739666-5a25-4948-94b5-e7382a0c1eb6" CreationDate="2022-06-14T17:50:54.163" UserId="2698" Text="|pallet|runtime|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12245" PostHistoryTypeId="5" PostId="3234" RevisionGUID="97c0d3e1-04c5-444b-8af0-94621bf49383" CreationDate="2022-06-14T22:20:36.793" UserId="590" Comment="deleted 18 characters in body" Text="I took a look at the check-weight SignedExtention to see what happens when a block is full. It appears that it returns an error `InvalidTransaction::ExhaustsResources`. It think it puts it back into the transaction pool but cannot find any documentation around this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What happens when an error occurs in pre-dispatch?&#xD;&#xA;&#xD;&#xA;How can I put something back into the transaction pool and reprioritize if in pre-dispatch? Perhaps, using something like [ValidTransaction][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/pallet_prelude/struct.ValidTransaction.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="12246" PostHistoryTypeId="2" PostId="3264" RevisionGUID="4ec9296a-4487-4827-bb65-c0ec2a8310fc" CreationDate="2022-06-15T00:36:41.450" UserId="2011" Text="What would be the recommended approach to introduce inflation for block production/collator reward?&#xD;&#xA;&#xD;&#xA;Is NegativeImbalance a good place for this, or implementing a separate pallet that schedules increments in a given treasury account balance is a better approach? &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct DealWithFees;&#xD;&#xA;impl OnUnbalanced&lt;NegativeImbalance&gt; for DealWithFees {&#xD;&#xA;	fn on_unbalanceds&lt;B&gt;(mut fees_then_tips: impl Iterator&lt;Item = NegativeImbalance&gt;) {&#xD;&#xA;		if let Some(fees) = fees_then_tips.next() {&#xD;&#xA;			let mut split = fees.ration(80, 20);&#xD;&#xA;			if let Some(tips) = fees_then_tips.next() {&#xD;&#xA;				// for tips, if any, 80% to treasury, 20% to block author (though this can be anything)&#xD;&#xA;				tips.ration_merge_into(80, 20, &amp;mut split);&#xD;&#xA;			}&#xD;&#xA;			Treasury::on_unbalanced(split.0);&#xD;&#xA;			Author::on_unbalanced(split.1);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;} &#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12248" PostHistoryTypeId="1" PostId="3264" RevisionGUID="4ec9296a-4487-4827-bb65-c0ec2a8310fc" CreationDate="2022-06-15T00:36:41.450" UserId="2011" Text="Collator reward and inflation" ContentLicense="CC BY-SA 4.0" />
  <row Id="12249" PostHistoryTypeId="3" PostId="3264" RevisionGUID="4ec9296a-4487-4827-bb65-c0ec2a8310fc" CreationDate="2022-06-15T00:36:41.450" UserId="2011" Text="|balances|fee|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12250" PostHistoryTypeId="5" PostId="3264" RevisionGUID="70eb460a-52b0-494b-862e-40d83c5a3a5c" CreationDate="2022-06-15T00:38:07.520" UserId="2011" Comment="added 29 characters in body" Text="What would be the recommended approach to introduce inflation for block production/collator reward?&#xD;&#xA;&#xD;&#xA;Is NegativeImbalance a good place for this, or implementing a separate pallet that schedules increments per block to a given destination account balance (e.g. treasury) is a better approach? &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct DealWithFees;&#xD;&#xA;impl OnUnbalanced&lt;NegativeImbalance&gt; for DealWithFees {&#xD;&#xA;	fn on_unbalanceds&lt;B&gt;(mut fees_then_tips: impl Iterator&lt;Item = NegativeImbalance&gt;) {&#xD;&#xA;		if let Some(fees) = fees_then_tips.next() {&#xD;&#xA;			let mut split = fees.ration(80, 20);&#xD;&#xA;			if let Some(tips) = fees_then_tips.next() {&#xD;&#xA;				// for tips, if any, 80% to treasury, 20% to block author (though this can be anything)&#xD;&#xA;				tips.ration_merge_into(80, 20, &amp;mut split);&#xD;&#xA;			}&#xD;&#xA;			Treasury::on_unbalanced(split.0);&#xD;&#xA;			Author::on_unbalanced(split.1);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;} &#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12251" PostHistoryTypeId="2" PostId="3265" RevisionGUID="74c08bc0-2c65-4b5d-b234-2f6c203c832c" CreationDate="2022-06-15T02:24:46.460" UserId="2635" Text="I'm debugging a substrate based blockchain. I found that at each election this are logged:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;...  WARN ThreadId(17) txpool: (offchain call) Error submitting a transaction t&#xD;&#xA;o the pool: Pool(UnknownTransaction(UnknownTransaction::NoUnsignedValidator))    &#xD;&#xA;2&#xD;&#xA;... ERROR ThreadId(17) staking:  Error in election offchain worker: OffchainE&#xD;&#xA;lectionError::PoolSubmissionFailed&#xD;&#xA;```&#xD;&#xA;Seems that something is missing but I can not find where should I look for the problem. If it is related to a misconfiguration or custom code is submitting invalid transaction.&#xD;&#xA;&#xD;&#xA;If anyone saw this error before any hint will be helpful.&#xD;&#xA;&#xD;&#xA;Thanks very much&#xD;&#xA;Regards" ContentLicense="CC BY-SA 4.0" />
  <row Id="12253" PostHistoryTypeId="1" PostId="3265" RevisionGUID="74c08bc0-2c65-4b5d-b234-2f6c203c832c" CreationDate="2022-06-15T02:24:46.460" UserId="2635" Text="Error submitting transaction (NoUnsignedValidator)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12254" PostHistoryTypeId="3" PostId="3265" RevisionGUID="74c08bc0-2c65-4b5d-b234-2f6c203c832c" CreationDate="2022-06-15T02:24:46.460" UserId="2635" Text="|substrate-node-template|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12255" PostHistoryTypeId="2" PostId="3266" RevisionGUID="dbcd1b5b-575d-458e-8544-8e89727fc3b6" CreationDate="2022-06-15T02:52:25.833" UserId="393" Text="Take a look at the ocw doc's unsigned transaction part: https://docs.substrate.io/how-to-guides/v3/ocw/transactions/&#xD;&#xA;&#xD;&#xA;Because there's no code revealed, so I can just guess you don't implement ValidateUnsigned trait for your Pallet.&#xD;&#xA;&#xD;&#xA;The trait and implementation are all in the above doc, try it.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12258" PostHistoryTypeId="2" PostId="3267" RevisionGUID="1b2e9fb1-bfb4-4d99-8ad1-c198f51ded68" CreationDate="2022-06-15T07:30:07.930" UserId="167" Text="First of all, there's a misunderstanding here. Defining something like&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type MyMapNew = StorageMap&lt;_, Blake2_128Concat, MyEnum&lt;KeyTypeOld, KeyTypeAddition&gt;, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;if not used, has no overhead. A `[#pallet::storage]` generates a some alias types for you to work with storage, but having the definition around does not actually write anything to any storage. To compare, it is almost the same as &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[storage_alias]&#xD;&#xA;type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which you define in `mod migration`.&#xD;&#xA;&#xD;&#xA;As for your migration:&#xD;&#xA;&#xD;&#xA;1. As noted, you don't need `MyMapTmp`.&#xD;&#xA;2. Your usage of `#[storage_alias]` seems to be incorrect. You arebasically telling it that `_` (when hashed) is the prefix that it should find the map, which is certainly wrong. You either have to pass the correct one, like&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[storage_alias]&#xD;&#xA;type MyMap = StorageMap&lt;NameOfThePalletInYourRuntime, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or make it generic over `&lt;P: Config&gt;` and let it be derived via `PalletInfoAccess`. See [here](https://github.com/paritytech/substrate/blob/26026d36a51c9f1c69b4f4e1503589b28e2019c6/frame/support/src/lib.rs#L190) for an example.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="12260" PostHistoryTypeId="2" PostId="3268" RevisionGUID="e5d92b07-e251-4a05-9569-0a0fa3a04c13" CreationDate="2022-06-15T09:12:35.007" UserId="479" Text="I think what is important to understand as well is that weight and transaction fees are two different things. The transaction fee is defined based on the weight, but this doesn't mean that computing always has to be paid by someone. The concept of weight is nothing more than the measurement of computational effort and the reason why we annotate extrinsic with it is to make sure that we are safe against DDOS attacks. Long story short: No one directly pays for the computation in a hook, but the weight used is still relevant for the entire system (for e.x: avoiding long block times). Coming to your question about what to do with the `on_initialize` hook. I think the answer is you have to write a benchmark for it that is as accurate as possible as you would do it for an extrinsic. The reason is simply that the weight returned by this hook is taken into account into the total weight you can use in a block and if this value is wrong you will end up either wasting the computational power of your block chain or block time will be longer then 6 seconds (or whatever you block time is)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12262" PostHistoryTypeId="5" PostId="3268" RevisionGUID="d29d08d0-0ad7-455a-b6d0-582cebd8a5ce" CreationDate="2022-06-15T09:17:46.483" UserId="479" Comment="edited body" Text="I think what is important to understand as well is that weight and transaction fees are two different things. The transaction fee is defined based on the weight, but this doesn't mean that computing always has to be paid by someone. The concept of weight is nothing more than the measurement of computational effort and the reason why we annotate extrinsic with it is to make sure that we are safe against DDOS attacks. Long story short: No one directly pays for the computation in a hook, but the weight used is still relevant for the entire system (for e.x: avoiding long block times). Coming to your question about what to do with the `on_initialize` hook. I think the answer is you have to write a benchmark for it that is as accurate as possible as you would do it for an extrinsic. The reason is simply that the weight returned by this hook is taken into account into the total weight you can use in a block and if this value is wrong you will end up either wasting the computational power of your blockchain or block time will be longer than 6 seconds (or whatever your block time is)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12263" PostHistoryTypeId="2" PostId="3269" RevisionGUID="92871808-6b8b-4b2a-9c86-5fdc36487fa0" CreationDate="2022-06-15T11:27:45.383" UserId="527" Text="The transaction is not really put back if verification fails with `InvalidTransaction::ExhaustsResources`, it is just kept in the transaction pool.&#xD;&#xA;&#xD;&#xA;You can find some notes about it here: https://github.com/paritytech/substrate/tree/master/client/transaction-pool#invalid-transaction&#xD;&#xA;&#xD;&#xA;And also look at the code where it happens here: https://github.com/paritytech/substrate/blob/master/client/basic-authorship/src/basic_authorship.rs#L466-L496&#xD;&#xA;&#xD;&#xA;The invalid txs that are not `InvalidTransaction::ExhaustsResources` are pushed to `unqueue_invalid`: https://github.com/paritytech/substrate/blob/master/client/basic-authorship/src/basic_authorship.rs#L495&#xD;&#xA;&#xD;&#xA;to be removed afterwards from the transaction pool: https://github.com/paritytech/substrate/blob/master/client/basic-authorship/src/basic_authorship.rs#L507&#xD;&#xA;&#xD;&#xA;About how to give them a higher priority after being invalid... I am afraid that it might not be possible without modifying the client since `validate()` can only return either `ValidTransaction` or `TransactionValidityError`. Might be a workaround I am not able to think about right now. You could solve your issue resending the tx with a higher `priority` though. If 2 transactions are received from the same sender with an identical `nonce`, only one transaction can be included on-chain. The client will choose the transaction with a higher `priority` to be stored in the transaction pool." ContentLicense="CC BY-SA 4.0" />
  <row Id="12265" PostHistoryTypeId="2" PostId="3270" RevisionGUID="8bbd9013-4d82-4455-96a6-490476a2a373" CreationDate="2022-06-15T12:11:02.387" UserId="167" Text="The main point that you are missing is that `NextKeys` can only be set via the `set_keys` transaction. &#xD;&#xA;&#xD;&#xA;Once a new session is being enacted, if the validator set has changed, `QueuedKeys` is formed from the list of new authorities (coming from `SessionManager`), amalgamated with keys that have already been provided by potential validators via `set_keys`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="12267" PostHistoryTypeId="5" PostId="3251" RevisionGUID="e291e966-c755-483b-a9b9-3a51de9dda88" CreationDate="2022-06-15T12:20:19.870" UserId="2724" Comment="added 69 characters in body" Text="Questions inquiring about using and developing on the Karura network." ContentLicense="CC BY-SA 4.0" />
  <row Id="12268" PostHistoryTypeId="24" PostId="3251" RevisionGUID="e291e966-c755-483b-a9b9-3a51de9dda88" CreationDate="2022-06-15T12:20:19.870" Comment="Proposed by 2724 approved by 34 edit id of 217" ContentLicense="CC BY-SA 4.0" />
  <row Id="12269" PostHistoryTypeId="5" PostId="3249" RevisionGUID="f64954cd-8174-4a5a-b581-623573c5ce6e" CreationDate="2022-06-15T12:20:40.910" UserId="2724" Comment="added 68 characters in body" Text="Questions inquiring about using and developing on the Acala network." ContentLicense="CC BY-SA 4.0" />
  <row Id="12270" PostHistoryTypeId="24" PostId="3249" RevisionGUID="f64954cd-8174-4a5a-b581-623573c5ce6e" CreationDate="2022-06-15T12:20:40.910" Comment="Proposed by 2724 approved by 34 edit id of 216" ContentLicense="CC BY-SA 4.0" />
  <row Id="12271" PostHistoryTypeId="2" PostId="3271" RevisionGUID="2d463ca2-71f9-479f-b4e9-91c10eb92440" CreationDate="2022-06-15T12:52:51.507" UserId="73" Text="The following patch will make it work:&#xD;&#xA;```&#xD;&#xA;diff --git a/pallets/template/src/tests.rs b/pallets/template/src/tests.rs&#xD;&#xA;index 550ffad..6ca03f1 100644&#xD;&#xA;--- a/pallets/template/src/tests.rs&#xD;&#xA;+++ b/pallets/template/src/tests.rs&#xD;&#xA;@@ -3,7 +3,7 @@ use frame_support::{&#xD;&#xA;        assert_noop, assert_ok,&#xD;&#xA;        pallet_prelude::*,&#xD;&#xA;        storage::storage_prefix,&#xD;&#xA;-       traits::{GetStorageVersion, StorageVersion},&#xD;&#xA;+       traits::{GetStorageVersion, StorageVersion, OnGenesis},&#xD;&#xA; };&#xD;&#xA; &#xD;&#xA; #[test]&#xD;&#xA;@@ -27,6 +27,7 @@ fn correct_error_for_none_value() {&#xD;&#xA; #[test]&#xD;&#xA; fn storage_version_is_correct() {&#xD;&#xA;        new_test_ext().execute_with(|| {&#xD;&#xA;+        Pallet::&lt;Test&gt;::on_genesis();&#xD;&#xA;                println!(&#xD;&#xA;                        &quot;{:?}&quot;,&#xD;&#xA;                        storage_prefix(&lt;Pallet&lt;Test&gt;&gt;::name().as_bytes(), b&quot;:__STORAGE_VERSION__:&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The problem here being that `on_genesis` is not being called magically and you don't call it in your code anywhere. `StorageVersion` defaults to `0` when it is not present in the storage. &#xD;&#xA;&#xD;&#xA;Normally `on_genesis` being called as part of the runtime `GenesisConfig`. [Here][1] you see the code that is being generated that will then call this method.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/a9d055d55b310373b17076b9ed079a5a9b878bdb/frame/support/procedural/src/construct_runtime/expand/config.rs#L80-L82&#xD;&#xA;&#xD;&#xA;When you want to test migrations, I would just put the expected `StorageVersion` into the storage, before calling the migration code." ContentLicense="CC BY-SA 4.0" />
  <row Id="12273" PostHistoryTypeId="5" PostId="3119" RevisionGUID="fc0a3201-082f-408c-a243-40f8de79cc12" CreationDate="2022-06-15T13:27:02.813" UserId="1789" Comment="added 419 characters in body" Text="The cause 1: git rebase did not work properly!&#xD;&#xA;&#xD;&#xA;Solution: overwrite the code with your latest main branch code, then add your Zombienet &amp; docker files:&#xD;&#xA;&#xD;&#xA;add new files:  `.dockerignore, docker/, zombienet/`&#xD;&#xA;&#xD;&#xA;modify files:   `.github/workflows/ci.yml, .gitignore`&#xD;&#xA;&#xD;&#xA;For custom parachain name, just copy the compiled binary into the regular `parachain-collator` in your new images:&#xD;&#xA;```&#xD;&#xA;COPY --from=builder /builds/collator/target/release/customName /usr/local/bin/parachain-collator&#xD;&#xA;```&#xD;&#xA;This cicd code works in Github action:&#xD;&#xA;```&#xD;&#xA;      - name: Start minikube&#xD;&#xA;        uses: medyagh/setup-minikube@master&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The cause 2: git cicd environment is not good for such high disk, high memory, and high bandwidth process!&#xD;&#xA;&#xD;&#xA;Solution: use Google cloud or other cloud virtual machines to run your Github's cicd with Zombienet&#xD;&#xA;&#xD;&#xA;See here about hosting your own (CICD) runners and customize the environment used to run jobs in your GitHub Actions workflows. https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12274" PostHistoryTypeId="2" PostId="3272" RevisionGUID="d7353673-4c79-44e9-8b46-c30dfe2e11d7" CreationDate="2022-06-15T13:46:15.147" UserId="1789" Text="How to Ropsten, Rinkeby, Kovan, Goerli, and Kiln&#xD;&#xA;&#xD;&#xA;From cb-sol-cli doc page https://github.com/ChainSafe/chainbridge-deploy/blob/master/cb-sol-cli/docs/deploy.md&#xD;&#xA;It is not very clear or easy to use this cb-sol-cli tool.&#xD;&#xA;&#xD;&#xA;I made one config file with all the public keys, private keys, and network RPC URLs, etc...&#xD;&#xA;```&#xD;&#xA;SRC_GATEWAY=https://rinkeby.infura.io/v3/61c499d4d8ce4d7390c6fdcf623c460c&#xD;&#xA;DST_GATEWAY=http://34.77.219.227/?rpc=ws%3A%2F%2F34.77.219.227%3A8844&#xD;&#xA;&#xD;&#xA;SRC_ADDR=&quot;0xBB09...&quot;&#xD;&#xA;SRC_PK=&quot;7668fxxxxxxxxx....&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;another bash script to run commands&#xD;&#xA;```&#xD;&#xA;cb-sol-cli --url $SRC_GATEWAY --privateKey $SRC_PK --gasPrice $GAS_PRICE deploy --bridge --erc20Handler --erc20 \&#xD;&#xA;    --relayers $SRC_ADDR \&#xD;&#xA;    --relayerThreshold 1 \&#xD;&#xA;    --expiry 1000 \&#xD;&#xA;    --chainId 0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when I ran those:&#xD;&#xA;```&#xD;&#xA;source ./configFile&#xD;&#xA;./bashscript.sh  &#xD;&#xA;```&#xD;&#xA;I got this error message&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  e: Error: invalid response - 0&#xD;&#xA;      at exports.XMLHttpRequest.request.onreadystatechange (/mnt/sda3/polkadot/chainbridge-deploy/cb-sol-cli/node_modules/ethers/utils/web.js:84:29)&#xD;&#xA;      at exports.XMLHttpRequest.dispatchEvent (/mnt/sda3/polkadot/chainbridge-deploy/cb-sol-cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)&#xD;&#xA;      at setState (/mnt/sda3/polkadot/chainbridge-deploy/cb-sol-cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)&#xD;&#xA;      at exports.XMLHttpRequest.handleError (/mnt/sda3/polkadot/chainbridge-deploy/cb-sol-cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:532:5)&#xD;&#xA;      at ClientRequest.errorHandler (/mnt/sda3/polkadot/chainbridge-deploy/cb-sol-cli/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:459:14)&#xD;&#xA;      at ClientRequest.emit (node:events:527:28)&#xD;&#xA;      at Socket.socketErrorListener (node:_http_client:454:9)&#xD;&#xA;      at Socket.emit (node:events:527:28)&#xD;&#xA;      at emitErrorNT (node:internal/streams/destroy:157:8)&#xD;&#xA;      at emitErrorCloseNT (node:internal/streams/destroy:122:3) {&#xD;&#xA;    statusCode: 0,&#xD;&#xA;    responseText: 'Error: connect ECONNREFUSED 127.0.0.1:80\n' +&#xD;&#xA;      '    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)'&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Is it okay to use Infura's URL as the cb-sol-cli --url &lt;Infura's URL&gt; ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12276" PostHistoryTypeId="1" PostId="3272" RevisionGUID="d7353673-4c79-44e9-8b46-c30dfe2e11d7" CreationDate="2022-06-15T13:46:15.147" UserId="1789" Text="ChainBridge: how to use their CLI tool to deploy smart contracts on Ethereum networks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12277" PostHistoryTypeId="3" PostId="3272" RevisionGUID="d7353673-4c79-44e9-8b46-c30dfe2e11d7" CreationDate="2022-06-15T13:46:15.147" UserId="1789" Text="|smart-contract|ethereum|chainbridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12278" PostHistoryTypeId="2" PostId="3273" RevisionGUID="175b8cb2-3c76-49fe-bbe6-3119d6de699e" CreationDate="2022-06-15T14:19:01.830" UserId="479" Text="my lovely Substrate-Heros,&#xD;&#xA;&#xD;&#xA;at the moment I try to benchmark the FRAME pallets of our custom runtime. Unfortunately, I ran into an error while benchmarking the session pallet. I copied the implementation from the Polkadot runtime and integrated the benchmark crate in the same way. When I try to compile I get the following error:&#xD;&#xA;```&#xD;&#xA;impl pallet_session_benchmarking::Config for Runtime {}&#xD;&#xA;      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;pallet_staking::pallet::pallet::Call&lt;Runtime&gt;&gt;` is not implemented for `Call`&#xD;&#xA;```&#xD;&#xA;I checked [the benchmark of the session pallet](https://github.com/paritytech/substrate/blob/master/frame/session/benchmarking/src/lib.rs) and I saw that they have a reference to pallet_staking even though this is not a reference to the session pallet itself. As it seems the problem is that we don't use the staking pallet at all in our runtime - we have our own implementation of staking. Let's come to my actual question: **Is it possible to benchmark the session pallet for a custom runtime if I do not use the staking pallet and if yes how?**&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12280" PostHistoryTypeId="1" PostId="3273" RevisionGUID="175b8cb2-3c76-49fe-bbe6-3119d6de699e" CreationDate="2022-06-15T14:19:01.830" UserId="479" Text="Benchmark session pallet fails without pallet_staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="12281" PostHistoryTypeId="3" PostId="3273" RevisionGUID="175b8cb2-3c76-49fe-bbe6-3119d6de699e" CreationDate="2022-06-15T14:19:01.830" UserId="479" Text="|benchmarking|session|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12282" PostHistoryTypeId="5" PostId="3267" RevisionGUID="bee45f16-1069-4e7e-bab5-c7f2a2e8f430" CreationDate="2022-06-15T14:22:28.790" UserId="167" Comment="added 1 character in body" Text="First of all, there's a misunderstanding here. Defining something like&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type MyMapNew = StorageMap&lt;_, Blake2_128Concat, MyEnum&lt;KeyTypeOld, KeyTypeAddition&gt;, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;if not used, has no overhead. A `[#pallet::storage]` generates a some alias types for you to work with storage, but having the definition around does not actually write anything to any storage. To compare, it is almost the same as &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[storage_alias]&#xD;&#xA;type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which you define in `mod migration`.&#xD;&#xA;&#xD;&#xA;As for your migration:&#xD;&#xA;&#xD;&#xA;1. As noted, you don't need `MyMapTmp`.&#xD;&#xA;2. Your usage of `#[storage_alias]` seems to be incorrect. You are basically telling it that `_` (when hashed) is the prefix that it should find the map, which is certainly wrong. You either have to pass the correct one, like&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[storage_alias]&#xD;&#xA;type MyMap = StorageMap&lt;NameOfThePalletInYourRuntime, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or make it generic over `&lt;P: Config&gt;` and let it be derived via `PalletInfoAccess`. See [here](https://github.com/paritytech/substrate/blob/26026d36a51c9f1c69b4f4e1503589b28e2019c6/frame/support/src/lib.rs#L190) for an example.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="12287" PostHistoryTypeId="2" PostId="3275" RevisionGUID="f9a1f7f6-36f4-4815-bd1f-9d1cb36271aa" CreationDate="2022-06-15T18:30:06.063" UserId="716" Text="I am trying to use py-substrate-interface to query the acalaOracle.value for Acala/Karura.  Below I show a screenshot of how to get the data using polkadot{js}.  Here is the python code I am trying:&#xD;&#xA;```&#xD;&#xA;url = 'wss://acala-rpc-0.aca-api.network'&#xD;&#xA;substrate = SubstrateInterface(url)&#xD;&#xA;hash = substrate.get_chain_finalised_head()&#xD;&#xA;timestamp = substrate.query(module='Timestamp',storage_function='Now',block_hash=hash).value&#xD;&#xA;block = substrate.get_block_number(hash)&#xD;&#xA;result = substrate.query('AcalaOracle', 'Values', params = [{'Token': 'KSM'}], block_hash = block)&#xD;&#xA;```&#xD;&#xA;I am getting an error `substrateinterface.exceptions.SubstrateRequestException: {'code': -32602, 'message': 'invalid type: integer `1234601`, expected a (both 0x-prefixed or not) hex string with length of 64 at line 1 column 7'}`, so I am not defining the parameter correctly.  Would anyone know how to do that?  &#xD;&#xA;&#xD;&#xA;I tried to following the examples given in [this][1] question, but I still can't figure it out.  The following code:&#xD;&#xA;```&#xD;&#xA;result_map = substrate.query_map('AcalaOracle', 'Values')&#xD;&#xA;print(list(result_map))&#xD;&#xA;```&#xD;&#xA;returns&#xD;&#xA;```&#xD;&#xA;[[&lt;scale_info::50(value={'Token': 'ACA'})&gt;, &lt;scale_info::495(value={'value': 264510000000000000, 'timestamp': 1655316318429})&gt;], [&lt;scale_info::50(value={'Token': 'DOT'})&gt;, &lt;scale_info::495(value={'value': 7051400000000000000, 'timestamp': 1655316318429})&gt;]]&#xD;&#xA;```&#xD;&#xA;but I still don't know what to pass as the parameter.&#xD;&#xA;&#xD;&#xA;[![acalaOracle.value][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/107/how-to-determine-which-parameters-are-required-when-using-substrate-query-to-q&#xD;&#xA;  [2]: https://i.stack.imgur.com/WQgPf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12289" PostHistoryTypeId="1" PostId="3275" RevisionGUID="f9a1f7f6-36f4-4815-bd1f-9d1cb36271aa" CreationDate="2022-06-15T18:30:06.063" UserId="716" Text="How to determine what parameter to pass into substrate.query() to query a storage_function from polkascan's py-substrate-interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12290" PostHistoryTypeId="3" PostId="3275" RevisionGUID="f9a1f7f6-36f4-4815-bd1f-9d1cb36271aa" CreationDate="2022-06-15T18:30:06.063" UserId="716" Text="|python|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12295" PostHistoryTypeId="2" PostId="3277" RevisionGUID="8b03ae7d-5acf-4811-81ce-c68b38f0a5e0" CreationDate="2022-06-15T19:07:23.343" UserId="2713" Text="In my case, this issue was introduced by some sub-dependency. Seems like one should still not upgrade blindly using `cargo update` and rather just update a couple of dependencies across the Polkadot, Substrate and Cumulus repositories.&#xD;&#xA;&#xD;&#xA;After resetting my `Cargo.lock` to the post-upgrade state and updating  randomly selected Dotsama pallets, the logs were back!&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo update -p sp-io -p cumulus-client-cli -p cumulus-relay-chain-interface -p polkadot-service -p polkadot-parachain&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12297" PostHistoryTypeId="2" PostId="3278" RevisionGUID="1ad14218-4e13-4ba0-883c-87170337b51e" CreationDate="2022-06-15T19:26:34.920" UserId="2738" Text="I had the same problem after upgrading my custom node code to Polkadot 0.9.22. After checking the differences between my code and the node template, I found no relevant difference. I then had a look at `Cargo.lock` and that's where the problem was.&#xD;&#xA;&#xD;&#xA;To make the &quot;startup messages&quot; show again, I had to fix the dependency of `tracing-core`. The dependency section of the node (not the one of the runtime) looks like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;...&#xD;&#xA;tracing-core = &quot;=0.1.26&quot;&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For the record, the version `0.1.27` (which causes the problem) is out since 8 days (June 15th 2022)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12301" PostHistoryTypeId="2" PostId="3279" RevisionGUID="53c3dc37-6a9c-4ac5-96dc-6f13dcb5d20f" CreationDate="2022-06-15T19:47:30.747" UserId="28" Text="You are correct that the benchmarking for the Session pallet depends on the Substrate Staking pallet also be used. If you do not use the Substrate staking pallet, you cannot (and should not) use the benchmarking included in the Session pallet.&#xD;&#xA;&#xD;&#xA;Instead, you should write your own custom benchmark which handles benchmarking here.&#xD;&#xA;&#xD;&#xA;You can already see that the benchmarks for session are in their own crate: [`pallet-session-benchmarking`](https://github.com/paritytech/substrate/tree/master/frame/session/benchmarking). In this case, you should write your own crate which does something similar to this crate, but uses the appropriate dependencies.&#xD;&#xA;&#xD;&#xA;Specifically, the Session pallet expects someone to implement a `SessionManager` and `SessionHandler`. The behavior and overhead of these hooks is hard to setup for benchmarks in general, so instead, we programmed the benchmarks to be for a specific scenario.&#xD;&#xA;&#xD;&#xA;If you have created your own staking pallet, then you should consider how your pallet interacts with the Session pallet, and create custom benchmarks which test these two behaving together in a worst case scenario.&#xD;&#xA;&#xD;&#xA;Once you have created your benchmarking crate, all you need to do is include that benchmarking crate into your runtime:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benches {&#xD;&#xA;	define_benchmarks!(&#xD;&#xA;		[pallet_session, SessionBench::&lt;Runtime&gt;]&#xD;&#xA;        // -- snip --&#xD;&#xA;    );&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// -- snip --&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	impl frame_benchmarking::Benchmark&lt;Block&gt; for Runtime {&#xD;&#xA;		fn benchmark_metadata(extra: bool) -&gt; (&#xD;&#xA;			Vec&lt;frame_benchmarking::BenchmarkList&gt;,&#xD;&#xA;			Vec&lt;frame_support::traits::StorageInfo&gt;,&#xD;&#xA;		) {&#xD;&#xA;			use frame_benchmarking::{baseline, Benchmarking, BenchmarkList};&#xD;&#xA;			use frame_support::traits::StorageInfoTrait;&#xD;&#xA;&#xD;&#xA;			// Trying to add benchmarks directly to the Session Pallet caused cyclic dependency&#xD;&#xA;			// issues. To get around that, we separated the Session benchmarks into its own crate,&#xD;&#xA;			// which is why we need these two lines below.&#xD;&#xA;			use pallet_session_benchmarking::Pallet as SessionBench;&#xD;&#xA;&#xD;&#xA;            // -- snip --&#xD;&#xA;&#xD;&#xA;			let mut list = Vec::&lt;BenchmarkList&gt;::new();&#xD;&#xA;			list_benchmarks!(list, extra);&#xD;&#xA;&#xD;&#xA;			let storage_info = AllPalletsWithSystem::storage_info();&#xD;&#xA;&#xD;&#xA;			(list, storage_info)&#xD;&#xA;		}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12303" PostHistoryTypeId="2" PostId="3280" RevisionGUID="d2f3bd69-e5eb-42ab-96d2-df6bb5b02a2f" CreationDate="2022-06-15T19:53:12.227" UserId="28" Text="As Oliver mentioned above, the issue seems to be that you are leaking `std` features into the `no_std` environment.&#xD;&#xA;&#xD;&#xA;You can use a tool like this to try and detect issues like this for you: &#xD;&#xA;&#xD;&#xA;https://github.com/shawntabrizi/substrate-toml-lint&#xD;&#xA;&#xD;&#xA;Otherwise, go through the Cargo.toml files you changed, and make sure that everything is being imported correctly with the appropriate feature flags being enabled." ContentLicense="CC BY-SA 4.0" />
  <row Id="12305" PostHistoryTypeId="2" PostId="3281" RevisionGUID="e218f507-2c50-4d5f-8c38-0111103ce5a1" CreationDate="2022-06-15T20:04:05.047" UserId="28" Text="Doing any kind of inflation on a Substrate chain can be broken up cleanly into two parts:&#xD;&#xA;&#xD;&#xA;1. Minting some new tokens (creating a negative imbalance)&#xD;&#xA;2. Assigning those new tokens to some source (handling the imbalance)&#xD;&#xA;&#xD;&#xA;So, when you call a very generic function like `issue`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Create new funds into the total issuance, returning a negative imbalance&#xD;&#xA;// for the amount issued.&#xD;&#xA;// Is a no-op if amount to be issued it zero.&#xD;&#xA;fn issue(mut amount: Self::Balance) -&gt; Self::NegativeImbalance { ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can arbitrarily create more of your token, then as shown in your post, some `on_unbalanced` handler can use that value to then increase some user's balance:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct Author;&#xD;&#xA;impl OnUnbalanced&lt;NegativeImbalance&gt; for Author {&#xD;&#xA;	fn on_nonzero_unbalanced(amount: NegativeImbalance) {&#xD;&#xA;		if let Some(author) = Authorship::author() {&#xD;&#xA;			Balances::resolve_creating(&amp;author, amount);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can also simplify this process by wrapping both steps into a single call with a function like `deposit_creating`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Deposit some `value` into the free balance of `who`, possibly creating a new account.&#xD;&#xA;///&#xD;&#xA;/// This function is a no-op if:&#xD;&#xA;/// - the `value` to be deposited is zero; or&#xD;&#xA;/// - the `value` to be deposited is less than the required ED and the account does not yet&#xD;&#xA;///   exist; or&#xD;&#xA;/// - the deposit would necessitate the account to exist and there are no provider references;&#xD;&#xA;///   or&#xD;&#xA;/// - `value` is so large it would cause the balance of `who` to overflow.&#xD;&#xA;fn deposit_creating(who: &amp;T::AccountId, value: Self::Balance) -&gt; Self::PositiveImbalance { ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;End of the day, there are a million ways to do this kind of thing. Just increasing the value of some number. How exactly you implement it depends on how modular or customizable you want things to be." ContentLicense="CC BY-SA 4.0" />
  <row Id="12307" PostHistoryTypeId="52" PostId="3273" RevisionGUID="8ed4c888-e688-454b-9173-90b619fedb06" CreationDate="2022-06-15T22:25:33.807" />
  <row Id="12308" PostHistoryTypeId="2" PostId="3282" RevisionGUID="ba754564-574d-4a81-a519-7107f9f4e1b4" CreationDate="2022-06-16T01:24:12.960" UserId="2745" Text="Is there any documentation/tutorials covering the technical details behind the Polkadot relay chain source code, specifically the runtime where all the special logic of the relay chain occurs? I am referring to the code in this repo: https://github.com/paritytech/polkadot. So far, the tutorials I have found mainly deal with creating new blockchains with Substrate.&#xD;&#xA;&#xD;&#xA;For instance, if I was trying to change the relay chain such that parachains don't need to be auctioned off and can only be used by people with the admin (sudo) key, I would need to understand how the relay chain source code works and is organized. Any resources are greatly appreciated!" ContentLicense="CC BY-SA 4.0" />
  <row Id="12310" PostHistoryTypeId="1" PostId="3282" RevisionGUID="ba754564-574d-4a81-a519-7107f9f4e1b4" CreationDate="2022-06-16T01:24:12.960" UserId="2745" Text="Polkadot relay chain node source code walkthrough/explanation" ContentLicense="CC BY-SA 4.0" />
  <row Id="12311" PostHistoryTypeId="3" PostId="3282" RevisionGUID="ba754564-574d-4a81-a519-7107f9f4e1b4" CreationDate="2022-06-16T01:24:12.960" UserId="2745" Text="|polkadot|relay-chain|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12312" PostHistoryTypeId="2" PostId="3283" RevisionGUID="676a9f7e-88e8-4769-a5ad-f36bb4aad5e3" CreationDate="2022-06-16T03:58:40.917" UserId="1789" Text="Should run `source ./configFile` inside the bashscript.sh every time! Otherwise those variables cannot be read from the bash script for some reason." ContentLicense="CC BY-SA 4.0" />
  <row Id="12314" PostHistoryTypeId="5" PostId="3227" RevisionGUID="53ff4836-88f1-4a57-83ea-3fda00579d75" CreationDate="2022-06-16T04:02:30.030" UserId="1789" Comment="deleted 619 characters in body" Text="How can I make ChainBridge to work with my parachain collator? Is there a documentation for such process? &#xD;&#xA;&#xD;&#xA;all the settings are inside the chainbridge/config.json file(https://github.com/ChainSafe/ChainBridge#chain-implementations):&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;chains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;eth&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;ethereum&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;0&quot;,&#xD;&#xA;      &quot;endpoint&quot;: &quot;ws://localhost:8545&quot;,&#xD;&#xA;      &quot;from&quot;: &quot;0xff93B45308FD417dF303D6515aB04D9e89a750Ca&quot;,&#xD;&#xA;      &quot;opts&quot;: {&#xD;&#xA;        &quot;bridge&quot;: &quot;0x62877dDCd49aD22f5eDfc6ac108e9a4b5D2bD88B&quot;,&#xD;&#xA;        &quot;erc20Handler&quot;: &quot;0x3167776db165D8eA0f51790CA2bbf44Db5105ADF&quot;,&#xD;&#xA;        &quot;erc721Handler&quot;: &quot;0x3f709398808af36ADBA86ACC617FeB7F5B7B193E&quot;,&#xD;&#xA;        &quot;genericHandler&quot;: &quot;0x2B6Ab4b880A45a07d83Cf4d664Df4Ab85705Bc07&quot;,&#xD;&#xA;        &quot;gasLimit&quot;: &quot;1000000&quot;,&#xD;&#xA;        &quot;maxGasPrice&quot;: &quot;20000000&quot;&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;sub&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;substrate&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;1&quot;,&#xD;&#xA;      &quot;endpoint&quot;: &quot;ws://localhost:9944&quot;,&#xD;&#xA;      &quot;from&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;      &quot;opts&quot;: {&#xD;&#xA;          &quot;useExtendedCall&quot;:&quot;true&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;cb-sol.cli can deploy and setup Ethereum contracts: https://substrate.stackexchange.com/questions/3272/chainbridge-how-to-use-their-cli-tool-to-deploy-smart-contracts-on-ethereum-net/&#xD;&#xA;&#xD;&#xA;Then...&#xD;&#xA;- add chainbridge-substrate's example-pallet into my parachain&#xD;&#xA;... I need to upgrade that pallet's code to newer syntax&#xD;&#xA;&#xD;&#xA;- run relayers with updated config.json with new Ethereum addresses, new endpoints&#xD;&#xA;&#xD;&#xA;- How to get/make those resource Ids in the &quot;Register Resources Substrate&quot; step? &#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="12315" PostHistoryTypeId="5" PostId="3278" RevisionGUID="057bdfbd-ffad-4075-9492-ca6b56d9fb1a" CreationDate="2022-06-16T08:03:45.420" UserId="2738" Comment="Add links to issue and PR." Text="I had the same problem after upgrading my custom node code to Polkadot 0.9.22. After checking the differences between my code and the node template, I found no relevant difference. I then had a look at `Cargo.lock` and that's where the problem was.&#xD;&#xA;&#xD;&#xA;To make the &quot;startup messages&quot; show again, I had to fix the dependency of `tracing-core`. The dependency section of the node (not the one of the runtime) looks like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;...&#xD;&#xA;tracing-core = &quot;=0.1.26&quot;&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For the record, the version `0.1.27` (which causes the problem) is out since 8 days (June 15th 2022).&#xD;&#xA;&#xD;&#xA;**Note:** an [issue](https://github.com/paritytech/substrate/issues/11684) and a [PR](https://github.com/paritytech/substrate/pull/11685) were submitted." ContentLicense="CC BY-SA 4.0" />
  <row Id="12316" PostHistoryTypeId="2" PostId="3284" RevisionGUID="2ef165c9-5e73-48ff-943e-cae4780ee290" CreationDate="2022-06-16T08:45:59.060" UserId="2519" Text="I am using PolkadotJS, I can sign the message, and get the public key, but I don't know the way to get the private key. Could you please let me know how to get the private key?&#xD;&#xA;Thank you so much." ContentLicense="CC BY-SA 4.0" />
  <row Id="12318" PostHistoryTypeId="1" PostId="3284" RevisionGUID="2ef165c9-5e73-48ff-943e-cae4780ee290" CreationDate="2022-06-16T08:45:59.060" UserId="2519" Text="How to get the private key using polkadot js" ContentLicense="CC BY-SA 4.0" />
  <row Id="12319" PostHistoryTypeId="3" PostId="3284" RevisionGUID="2ef165c9-5e73-48ff-943e-cae4780ee290" CreationDate="2022-06-16T08:45:59.060" UserId="2519" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12320" PostHistoryTypeId="2" PostId="3285" RevisionGUID="eec18292-9cef-4179-9e49-6eba74bb5382" CreationDate="2022-06-16T09:46:29.977" UserId="2025" Text="The Web3 foundation maintains a detailed specification doc of both the [polkadot host](https://wiki.polkadot.network/docs/learn-polkadot-host) and the runtime, you can it find it [here](https://spec.polkadot.network/#_runtime_specification). However, note that this document may be outdated in certain sections, the source of truth is always found in [the current release of the runtime](https://github.com/paritytech/polkadot/releases/tag/v0.9.24).&#xD;&#xA;&#xD;&#xA;Moreover, note that Polkadot is built with Substrate, hence Substrate tutorials and doc covering the Sudo pallet will be relevant to your concrete example." ContentLicense="CC BY-SA 4.0" />
  <row Id="12322" PostHistoryTypeId="34" PostId="3146" RevisionGUID="3c7e070e-5bdf-448e-a5a3-91675d6be760" CreationDate="2022-06-16T09:59:51.620" UserId="3" Comment="8" />
  <row Id="12323" PostHistoryTypeId="2" PostId="3286" RevisionGUID="987aec95-ee14-4268-8ee4-84fb6195382b" CreationDate="2022-06-16T10:59:45.473" UserId="167" Text="Polkadot js apps does not support this. The only instance where you can have access to the private key is when generating the account. Once generated, you are asked to save a json in a safe place. In this file, you can find the private key, encoded by the password that you set for your account. &#xD;&#xA;&#xD;&#xA;Perhaps this feature can be added, although my guess is that currently Polakdot js apps is doing this to protect the users and prevents them from leaking their private key. Storing and displaying the private key in online web app sounds like the last thing you want to do. " ContentLicense="CC BY-SA 4.0" />
  <row Id="12325" PostHistoryTypeId="5" PostId="3267" RevisionGUID="68d3e1b6-fb09-4606-b155-ab5badace9d6" CreationDate="2022-06-16T11:02:36.533" UserId="167" Comment="added 522 characters in body" Text="First of all, there's a misunderstanding here. Defining something like&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type MyMapNew = StorageMap&lt;_, Blake2_128Concat, MyEnum&lt;KeyTypeOld, KeyTypeAddition&gt;, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;if not used, has no overhead. A `[#pallet::storage]` generates a some alias types for you to work with storage, but having the definition around does not actually write anything to any storage. To compare, it is almost the same as &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[storage_alias]&#xD;&#xA;type MyMap = StorageMap&lt;_, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which you define in `mod migration`.&#xD;&#xA;&#xD;&#xA;As for your migration:&#xD;&#xA;&#xD;&#xA;1. As noted, you don't need `MyMapTmp`.&#xD;&#xA;2. Your usage of `#[storage_alias]` seems to be incorrect. You are basically telling it that `_` (when hashed) is the prefix that it should find the map, which is certainly wrong. You either have to pass the correct one, like&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[storage_alias]&#xD;&#xA;type MyMap = StorageMap&lt;NameOfThePalletInYourRuntime, Blake2_128Concat, KeyTypeOld, V&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or make it generic over `&lt;P: Config&gt;` and let it be derived via `PalletInfoAccess`. See [here](https://github.com/paritytech/substrate/blob/26026d36a51c9f1c69b4f4e1503589b28e2019c6/frame/support/src/lib.rs#L190) for an example.  &#xD;&#xA;&#xD;&#xA;--- &#xD;&#xA;&#xD;&#xA;&gt; Moreover, is my assumption correct that we can we expect services, which periodically connect to my chain and query MyMap storage via Polkadot-JS, to be able to automatically understand the correct decoding by the provided post-upgrade metadata?&#xD;&#xA;&#xD;&#xA;This entirely depends on that service, and how it is implemented. The existential purpose of having a dynamic metadata that changes per-rutnime-upgrade is to *enable* offchain services to do that. Whether they do it or not is beyond the scope of substrate. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12326" PostHistoryTypeId="2" PostId="3287" RevisionGUID="58b95a83-d6a9-4215-861f-7141b4f25f7b" CreationDate="2022-06-16T11:24:41.000" UserId="380" Text="&#xD;&#xA;The call is complaining about you sending an integer. You will be getting an integer from `get_block_number` which you're passing in a `block_hash` field:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;block = substrate.get_block_number(hash) # this is an integer&#xD;&#xA;&#xD;&#xA;result = substrate.query('AcalaOracle', 'Values', params = [{'Token': 'KSM'}], block_hash = block)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Since you already appear to have the `hash`, simply pass that instead of the block number.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;result = substrate.query('AcalaOracle', 'Values', params = [{'Token': 'KSM'}], block_hash = hash) # pass hash here instead&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12328" PostHistoryTypeId="2" PostId="3288" RevisionGUID="f8204210-2d97-49eb-97bd-9d38fc0c30a1" CreationDate="2022-06-16T11:59:17.210" UserId="2747" Text="There are a few other questions related to this topic:&#xD;&#xA;1. [removal of storage prefix][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2. [clearing the storage][2]&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2329/removal-of-storage-prefix-from-database&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/506/forked-parity-pallet-didnt-migrate-storage-deployed-to-chain-how-to-clear-or&#xD;&#xA;&#xD;&#xA;In terms of functions related to these actions, I found the following:&#xD;&#xA; 1. remove_storage_prefix&#xD;&#xA; 2. kill_storage&#xD;&#xA; 3. kill_prefix&#xD;&#xA;&#xD;&#xA;Also, I wanted to note that the overall goal is to upgrade from v2.0.1 to v3.0.&#xD;&#xA;&#xD;&#xA;What would be the best way to remove an existing pallet from the storage? &#xD;&#xA;Do we have to kill_storage first, and then kill_prefix?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12330" PostHistoryTypeId="1" PostId="3288" RevisionGUID="f8204210-2d97-49eb-97bd-9d38fc0c30a1" CreationDate="2022-06-16T11:59:17.210" UserId="2747" Text="Proper removal of Substrate Pallet, including storage / prefix" ContentLicense="CC BY-SA 4.0" />
  <row Id="12331" PostHistoryTypeId="3" PostId="3288" RevisionGUID="f8204210-2d97-49eb-97bd-9d38fc0c30a1" CreationDate="2022-06-16T11:59:17.210" UserId="2747" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12332" PostHistoryTypeId="2" PostId="3289" RevisionGUID="92b89eef-8b73-4ebe-b44e-041e44967459" CreationDate="2022-06-16T12:00:41.733" UserId="167" Text="Finally, the first draft of my write up about this complicated topic is done. This document would likely change, find the latest version [here](https://hackmd.io/KQLaAnOJTMS3xmet3Gle_g).&#xD;&#xA;&#xD;&#xA;The following is the version as of June 2022. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# In depth guide about configuring the Staking/Election pallet, targeting Substrate builders, and parachain teams.&#xD;&#xA;&#xD;&#xA;&gt; Written by [@kianenigma](@kianenigma:matrix.parity.io). Feel free to reach out for further questions, or ask them in [Substrate stack exchange](https://substrate.stackexchange.com/). &#xD;&#xA;&#xD;&#xA;This is guide to help various teams building on top of substrate configure the staking system properly. &#xD;&#xA;&#xD;&#xA;Before diving in any further, let's make sure two facts are known:&#xD;&#xA;&#xD;&#xA;1.  The staking system in Substrate is quite complex, and deploying it recklessly can have severe consequences.&#xD;&#xA;2.  The staking system in Substrate is not yet *parachain-ready* **by default**. Nonetheless, you can configure it such that it can work in a parachain as well.&#xD;&#xA;&#xD;&#xA;* * *&#xD;&#xA;&#xD;&#xA;The staking pallet can be roughly broken down into 4 parts:&#xD;&#xA;&#xD;&#xA;1.  Staking roles: the simplest part. Handles staker roles (validator, nominators, etc) and allows these roles to be set.&#xD;&#xA;2.  Rewards&#xD;&#xA;3.  Slashes&#xD;&#xA;4.  Validator selection, i.e. the **Elections**.&#xD;&#xA;&#xD;&#xA;The most important (and error-prone) part to configure here is the last one. This is mainly done through implementing [`type ElectionProvider: ElectionProvider`](https://github.com/paritytech/substrate/blob/cfb5bc6f1a92207785a0bdd321039096685623c8/frame/staking/src/pallet/mod.rs#L109) for the staking pallet.&#xD;&#xA;&#xD;&#xA;To run any type of election, staking pallet needs to know how to select a subset of its validator and nominators as the election **voters** and **targets** (i.e. candidate). Initially the answer might seem trivial: All nominators are voters and all validators are candidates. But this does not always work: The staking pallet does not put any limit on the number of validators and nominators, and no election algorithm can work on an unbounded input. So the question remains: Between all nominators, which subset should we consider for elections (and similarly for validators). Answering this is done through `type VoterList` and type `TargetList`*. Both of these types should satisfy [`SortedListPorivider`](https://github.com/paritytech/substrate/blob/5ab1a2790b65747ab7ec1d3a24dabad9282d42ae/frame/election-provider-support/src/lib.rs#L434).&#xD;&#xA;&#xD;&#xA;First, let's look at the latter.&#xD;&#xA;&#xD;&#xA;## `VoterList` and `TargetList`&#xD;&#xA;&#xD;&#xA;As noted, the staking system can have a potentially unbounded number of nominators and validators, and by default it has no meaningful way of sorting them. You can either add this sorting mechanism, or leave it as is&#xD;&#xA;&#xD;&#xA;### 1\. NOT Sorting Staking Validators and Nominators&#xD;&#xA;&#xD;&#xA;If you intend to use all of these validators and nominators for election, then there is no need to care about sorting them. In this case, you can use these two simple types. They basically iterate over the underlying maps in an unordered way.&#xD;&#xA;&#xD;&#xA;1.  [`UseNominatorsAndValidatorsMap`](https://github.com/paritytech/substrate/blob/323eecd2de38b9631d9c162997261e43c886828c/frame/staking/src/pallet/impls.rs#L1314), which should be used for `type VoterList`&#xD;&#xA;2.  `UseValidatorsMap`, which should be used for `type TargetList`.&#xD;&#xA;&#xD;&#xA;&gt; \* The `TargetList` interface is still in development and is being added in this [PR](https://github.com/paritytech/substrate/pull/11013/files#diff-67684005af418e25ff88c2ae5b520f0c040371f1d817e03a3652e76b9485224aR563). Everything said about `VoterList` is already implemented in substrate master.&#xD;&#xA;&#xD;&#xA;The VERY IMPORTANT consequence of this is that now, the staking pallet would need to **iterate over all nominators and validators at certain blocks**. This clearly means that the number of validators and nominators **MUST be bounded**.&#xD;&#xA;&#xD;&#xA;#### 1.2 Bounding Validators and Nominators&#xD;&#xA;&#xD;&#xA;There are 4 storage items, and 2 transactions, all of which together can help a chain put a cap on its validators and nominators, and maintain it. All of these live in `pallet-staking`.&#xD;&#xA;&#xD;&#xA;1.  [`MinValidatorBond`](https://github.com/paritytech/substrate/blob/cfb5bc6f1a92207785a0bdd321039096685623c8/frame/staking/src/pallet/mod.rs#L249) and [`MinNominatorBond`](https://github.com/paritytech/substrate/blob/cfb5bc6f1a92207785a0bdd321039096685623c8/frame/staking/src/pallet/mod.rs#L245). As the name suggests, these dictate the amount of tokens that are needed to become a validator or nominator. By setting them to non-zero values, the influx of nominators and validators can be regulated. The higher the value is, the less influx is expected. These values can also be set such that the cost of any type of sybil attack (a whale spawning a million nominator accounts to mess with you) becomes more expensive.&#xD;&#xA;2.  [`MaxValidatorCount`](https://github.com/paritytech/substrate/blob/cfb5bc6f1a92207785a0bdd321039096685623c8/frame/staking/src/pallet/mod.rs#L278) and [`MaxNominatorCount`](https://github.com/paritytech/substrate/blob/cfb5bc6f1a92207785a0bdd321039096685623c8/frame/staking/src/pallet/mod.rs#L305). The aforementioned limits don't actually *restrict* the count of nominators or validators, they just make it *more expensive* to create a very large number of them. Nonetheless, you might know that your system cannot, under any condition, tolerate more than 5000 nominator. In that case, these two storage items can be used. If either of the limits are reached, no new nominator/validator can be created.&#xD;&#xA;3.  The last two are enough to ensure system safety, but you could still have the situation where all of the e.g. nominator slots are filled, and this makes it impossible for any other account to become a nominator, even if they have a lot of tokens. To combat this, the permissionless [`chill_other`](https://github.com/paritytech/substrate/blob/cfb5bc6f1a92207785a0bdd321039096685623c8/frame/staking/src/pallet/mod.rs#L1638) transaction can be used. This transaction makes it possible to chill any validator/nominator who has less stake bonded than the corresponding limit, namely `MinValidatorBond` and `MinNominatorBond`. If no account is eligible for this, then the corresponding limit can be raised.&#xD;&#xA;4.  Lastly, `set_staking_configs` can be used to control all of the above through the `root` origin.&#xD;&#xA;&#xD;&#xA;&gt; This method was used in Polkadot for a few months and [this script](https://github.com/paritytech/polkadot-scripts/blob/5e4611a2564aa591103d0ae8d1ec5932e1181e88/src/services/chill_other.ts) was used to determine who could be chilled and do it.&#xD;&#xA;&#xD;&#xA;&gt; I omitted a minor details called [`ChillThreshold`](https://github.com/paritytech/substrate/blob/cfb5bc6f1a92207785a0bdd321039096685623c8/frame/staking/src/pallet/mod.rs#L515) here for the sake of simplicity.&#xD;&#xA;&#xD;&#xA;### 2\. Sorting Staking Validators and Nominators&#xD;&#xA;&#xD;&#xA;If you need to sort the staking validators and nominators, then you need to use an instance of the [`bags-list`](https://github.com/paritytech/substrate/blob/57c420ca1873ebf68ca12d5194c16b1f9100fb8d/frame/bags-list/src/lib.rs#L18) pallet as the `SortedListPorivider`. `bags-list` is essentially an *onchain sorted linked list* that's kept up to date in a lazy manner. The staking pallet is configured to use `bags-list`, if it is provided, with the following rules:&#xD;&#xA;&#xD;&#xA;1.  The nominators and validators are both reported to the `VoterList` as a voter, and their active stake determines their position in the list. This means that each validator's self stake is analogous to a them nominating themselves.&#xD;&#xA;2.  All validators's are considered as targets, and their approval stake* determines their position in the list.&#xD;&#xA;&#xD;&#xA;&gt; The **approval stake** of a validator is the sum of the entire stake all all nominators who nominated them.&#xD;&#xA;&#xD;&#xA;With these two interfaces in place, the staking pallet essentially becomes capable of sorting its validators and nominators. Therefore, in principle, it can let them both grow to infinity in terms of count, but only consider a top subset for election when the time comes. For example, a system could consider the top 10,000 nominators and top 1000 validators, and let the bags-list take care of the sorting.&#xD;&#xA;&#xD;&#xA;&gt; There is a LOT more detail to bags-list that we are not covering here. See the [Polkadot wiki](https://wiki.polkadot.network/docs/learn-nominator#bags-list) to learn more about them.&#xD;&#xA;&#xD;&#xA;&gt; Note that if you start with the former approach and want to migrate to the latter, the bags-list needs to be migrated. Old migration codes used in Polkadot should be reusable for all other chains as well. See the [`v8`](https://github.com/paritytech/substrate/blob/19b44f087b30e7730cf037518ec921c336fcbb0f/frame/staking/src/migrations.rs#L92) and [`v9`](https://github.com/paritytech/substrate/blob/19b44f087b30e7730cf037518ec921c336fcbb0f/frame/staking/src/migrations.rs#L23) migration modules in `pallet-staking`.&#xD;&#xA;&#xD;&#xA;### 3\. Putting it All Together: `ElectionDataProvider`&#xD;&#xA;&#xD;&#xA;Everything that I said so far was a prelude to reach to this last section: Staking implements the [`ElectionDataProvider`](https://github.com/paritytech/substrate/blob/5ab1a2790b65747ab7ec1d3a24dabad9282d42ae/frame/election-provider-support/src/lib.rs#L265) trait with the help of its `VoterList` and `TargetList`.&#xD;&#xA;&#xD;&#xA;The very important aspect of this trait is that the functions that are used to fetch the voters and targets, both have an optional `maybe_max_len: Option&lt;usize&gt;` argument. This is basically how the user of the `ElectionDataProvider` tells staking how many voters it wants. See [`fn electable_targets`](https://github.com/paritytech/substrate/blob/5ab1a2790b65747ab7ec1d3a24dabad9282d42ae/frame/election-provider-support/src/lib.rs#L283) and [`fn electing_voters`](https://github.com/paritytech/substrate/blob/5ab1a2790b65747ab7ec1d3a24dabad9282d42ae/frame/election-provider-support/src/lib.rs#L296). &#xD;&#xA;&#xD;&#xA;Who will decided what value is passed as this `maybe_max_len`? that will be the user of `ElectionDataProvider`, which is most often something that itself implements `ElectionProvider`. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;                                         ElectionDataProvider&#xD;&#xA;                          &lt;------------------------------------------+&#xD;&#xA;                          |                                          |&#xD;&#xA;                          v                                          |&#xD;&#xA;                    +-----+----+                              +------+---+&#xD;&#xA;                    |          |                              |          |&#xD;&#xA; pallet-do-election |          |                              |          | pallet-needs-election&#xD;&#xA;                    |          |                              |          |&#xD;&#xA;                    |          |                              |          |&#xD;&#xA;                    +-----+----+                              +------+---+&#xD;&#xA;                          |                                          ^&#xD;&#xA;                          |                                          |&#xD;&#xA;                          +------------------------------------------+&#xD;&#xA;                                         ElectionProvider&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## `ElectionProvider`&#xD;&#xA;&#xD;&#xA;The main user of `ElectionDataProvider` is, as the name lamely suggests, something that wants to implement `ElectionProvider`. After all, if you want to provide an election service, you need to know its data.&#xD;&#xA;&#xD;&#xA;There are generally two types of election providers, as explained further.&#xD;&#xA;&#xD;&#xA;#### Onchain execution&#xD;&#xA;&#xD;&#xA;This is the simpler type of election, and performs everything needed onchain, in a single block. The implication of this should be obvious: The number of voters and targets cannot be unbounded.&#xD;&#xA;&#xD;&#xA;If this approach is used, a great deal of care should be given to making sure that either the stakers are well bounded, or that they are sorted and the onchain execution election that you configure is only selecting a small subset of them.&#xD;&#xA;All onchain executions are configured with two wrapper types that implement `ElectionProvider`:&#xD;&#xA;&#xD;&#xA;1.  [`BoundedExecution`](https://github.com/paritytech/substrate/blob/c9af3c6ae49c3720f4320ebbd6c5f936951dfdcf/frame/election-provider-support/src/onchain.rs#L62)&#xD;&#xA;2.  `UnboundedExecution`.&#xD;&#xA;&#xD;&#xA;They both accept a [number of configuration parameters](https://github.com/paritytech/substrate/blob/c9af3c6ae49c3720f4320ebbd6c5f936951dfdcf/frame/election-provider-support/src/onchain.rs#L72), such as which election algorithm to use, and which data provider to communicate with. But, the most important one (that also differentiates them) is that `BoundedExecution` also accepts two bounds for the number of voters and targets that it asks from its `ElectionDataProvider` via: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub trait BoundedConfig: Config {&#xD;&#xA;	/// Bounds the number of voters.&#xD;&#xA;	type VotersBound: Get&lt;u32&gt;;&#xD;&#xA;	/// Bounds the number of targets.&#xD;&#xA;	type TargetsBound: Get&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In other words, these two values are later on passed to `fn electing_voters` and `fn electable_targets`. &#xD;&#xA;&#xD;&#xA;#### Offchain execution&#xD;&#xA;&#xD;&#xA;The bounded executions are probably enough for an election in the order of a few dozed candidates, and a few hundred voters.&#xD;&#xA;&#xD;&#xA;&gt; To figure out the exact values, check the [benchmarks](https://github.com/paritytech/substrate/blob/c9af3c6ae49c3720f4320ebbd6c5f936951dfdcf/frame/election-provider-support/benchmarking/src/lib.rs#L18) of the onchain execution types, and match them against your block type. Moreover, you should also know that there is a maximum memory limit of 128 MiB in wasm, and a maximum allocation of 32 MiB. The whole election process should not violate these.&#xD;&#xA;&#xD;&#xA;For anything beyond this, the election process needs to be moved offchain. This is done though the `election-provider-multi-phase` pallet, which also eventually implements `ElectionProvider`. The details of this pallet are quite complicated, but luckily [its documentation](https://github.com/paritytech/substrate/blob/5ab1a2790b65747ab7ec1d3a24dabad9282d42ae/frame/election-provider-multi-phase/src/lib.rs#L18) is also extensive. Knowing the context provided in this document, reading that should clear a lot of things up for you. In this document, we only skim some of the more important aspects. &#xD;&#xA;&#xD;&#xA;The main aspect of this pallet that correlate with what we have talked about here, is two type parameters, namely [`MaxElectingVoters`](https://github.com/paritytech/substrate/blob/5ab1a2790b65747ab7ec1d3a24dabad9282d42ae/frame/election-provider-multi-phase/src/lib.rs#L661) and [`MaxElectableTargets`](https://github.com/paritytech/substrate/blob/5ab1a2790b65747ab7ec1d3a24dabad9282d42ae/frame/election-provider-multi-phase/src/lib.rs#L665). Similar to `BoundedExecution` above, these two values dictate how many voters and targets are fetched from the `ElectionDataProvider`, aka. `pallet-staking` in most cases.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;With all of that said, either the ochain election, or the offchain election can be used in a parachain, as long as the number of voters and targets are bounded properly, either by sorting and taking the top portion, or by limiting them from the get go. " ContentLicense="CC BY-SA 4.0" />
  <row Id="12334" PostHistoryTypeId="2" PostId="3290" RevisionGUID="f96b2004-da35-48bf-8e5f-016eb684956c" CreationDate="2022-06-16T12:02:20.503" UserId="1987" Text="I have set up a PoA parachain network with predefined 2 authorities which are assigned to the two collators joining the network. So far I've figured out how to manually update the chain-spec collatorSelection section to add new collator keys, however, this requires network reset.&#xD;&#xA;&#xD;&#xA;I've been trying to use &quot;sudo&quot; from the PolkadotJS app to add new collator keys, but I keep receiving error error: collatorSelection.ValidatorNotRegistered when performing sudo &gt; collatorSelection &gt; setInvulerbales  -- also received the same error when executing registerAsCandidate extrinsic for the target collator account.&#xD;&#xA;&#xD;&#xA;So far I didn't find an explicit document that explains the above, any help here would be highly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="12336" PostHistoryTypeId="1" PostId="3290" RevisionGUID="f96b2004-da35-48bf-8e5f-016eb684956c" CreationDate="2022-06-16T12:02:20.503" UserId="1987" Text="Onboarding new collator to live network" ContentLicense="CC BY-SA 4.0" />
  <row Id="12337" PostHistoryTypeId="3" PostId="3290" RevisionGUID="f96b2004-da35-48bf-8e5f-016eb684956c" CreationDate="2022-06-16T12:02:20.503" UserId="1987" Text="|parachain-collator|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12338" PostHistoryTypeId="2" PostId="3291" RevisionGUID="0bf961e9-44df-45c0-b38e-d39580a4c3ef" CreationDate="2022-06-16T12:27:29.480" UserId="167" Text="The staking pallet has two storage items to configure this:&#xD;&#xA;&#xD;&#xA;1. [`ValidatorCount`](https://github.com/paritytech/substrate/blob/cfb5bc6f1a92207785a0bdd321039096685623c8/frame/staking/src/pallet/mod.rs#L224). This is the desired number of validators that staking tries to elect via its [`ElectionProvider`](https://github.com/paritytech/substrate/blob/cfb5bc6f1a92207785a0bdd321039096685623c8/frame/staking/src/pallet/mod.rs#L109). All of the transactions you named alter this value. &#xD;&#xA;2. [`MinimumValidatorCount`](https://github.com/paritytech/substrate/blob/cfb5bc6f1a92207785a0bdd321039096685623c8/frame/staking/src/pallet/mod.rs#L229), as its documents clearly dictate, is the minimum acceptable number of validators that staking can work with. If the number of validators falls below this, then new eras are not triggered, meaning that the chain remains with the old validator set. See [here](https://github.com/paritytech/substrate/blob/323eecd2de38b9631d9c162997261e43c886828c/frame/staking/src/pallet/impls.rs#L451)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12340" PostHistoryTypeId="2" PostId="3292" RevisionGUID="b1e41da6-eb71-4453-827e-556fdc34cdaf" CreationDate="2022-06-16T12:32:15.880" UserId="472" Text="Thanks for the issue reporting! Its origin is that with ink! `3.1.0` a number of backwards incompatible changes were introduced. That unpleasant mistake is now [fixed][1] and with ink! `3.3.0` release being published everything should work smoothly again even for contracts using ink! `3.0.1`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/pull/1284" ContentLicense="CC BY-SA 4.0" />
  <row Id="12342" PostHistoryTypeId="2" PostId="3293" RevisionGUID="1ca90cbf-a220-4314-9715-ddd13611e993" CreationDate="2022-06-16T12:47:03.873" UserId="472" Text="Thanks for the issue reporting! Its origin is described in detail in @HCastano's answer, and is now [fixed][1] in the upcoming **ink! `3.3.0` release** along with other backwards compatibility breaking issues. Once the release is published, your ink! contracts (no matter on what `3.x.x` version they depend upon) should being built smoothly again (no version overrides in `Cargo.toml` required). Stay tuned and have fun!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/pull/1284" ContentLicense="CC BY-SA 4.0" />
  <row Id="12344" PostHistoryTypeId="2" PostId="3294" RevisionGUID="d29eb14f-fa4e-4ef4-a944-5d84361c8c4d" CreationDate="2022-06-16T13:01:25.867" UserId="167" Text="&gt; `generated 0 npos voters, 0 from validators and 0 nominators`&#xD;&#xA;&#xD;&#xA;Your logs are indicating that your chain has no nominators (voters), and no validators either, this is the root cause of the issue. &#xD;&#xA;&#xD;&#xA;Otherwise, your steps in using a proper fallback is correct. " ContentLicense="CC BY-SA 4.0" />
  <row Id="12346" PostHistoryTypeId="2" PostId="3295" RevisionGUID="64a8a503-c120-426e-8c08-31e281357b4d" CreationDate="2022-06-16T13:02:05.300" UserId="1837" Text="I am trying to execute a simple extrinsic but for some reason, it gives the error `Unable to retrieve header and parent from supplied hash`.&#xD;&#xA;&#xD;&#xA;I don't think my problem has anything to with the extrinsic, but here is an example of extrinsic which I was executing&#xD;&#xA;```&#xD;&#xA;fn update_resource(resource:[u8; 32]){&#xD;&#xA;  ....&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would like to understand what exactly the above error msg means. &#xD;&#xA;&#xD;&#xA;Any feedback or help is most appreciated. Thank you..!" ContentLicense="CC BY-SA 4.0" />
  <row Id="12348" PostHistoryTypeId="1" PostId="3295" RevisionGUID="64a8a503-c120-426e-8c08-31e281357b4d" CreationDate="2022-06-16T13:02:05.300" UserId="1837" Text="Unable to retrieve header and parent from supplied hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="12349" PostHistoryTypeId="3" PostId="3295" RevisionGUID="64a8a503-c120-426e-8c08-31e281357b4d" CreationDate="2022-06-16T13:02:05.300" UserId="1837" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12350" PostHistoryTypeId="2" PostId="3296" RevisionGUID="2dfe0ee0-db7d-44c5-9c36-bb577b37e723" CreationDate="2022-06-16T13:07:40.150" UserId="167" Text="What you are asking is basically `MinActiveThreshold` as defined [here](https://github.com/paritytech/polkadot-scripts/blob/f997ccc2ad6b5812d93acba863c43a3781e663e8/src/services/index.ts#L84). &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// the ere in which you are interested.&#xD;&#xA;const currentEra = ...&#xD;&#xA;// mapping from nominators, to the sum backing that they are providing to different validators.&#xD;&#xA;const assignments: Map&lt;string, BN&gt; = new Map();&#xD;&#xA;&#xD;&#xA;// use erasStakersClipped if you want to take into account oversubscription as well. &#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries(currentEra);&#xD;&#xA;stakers.sort((a, b) =&gt; a[1].total.toBn().cmp(b[1].total.toBn()))&#xD;&#xA;&#xD;&#xA;stakers.map((x) =&gt; x[1].others).flat(1).forEach((x) =&gt; {&#xD;&#xA;	const nominator = (x as PalletStakingIndividualExposure).who.toString();&#xD;&#xA;	const amount = (x as PalletStakingIndividualExposure).value;&#xD;&#xA;	const val = assignments.get(nominator);&#xD;&#xA;	assignments.set(nominator, val ? amount.toBn().add(val) : amount.toBn())&#xD;&#xA;})&#xD;&#xA;&#xD;&#xA;/// transform the map to a flat array..&#xD;&#xA;const nominatorStakes = Array.from(assignments);&#xD;&#xA;// .. and sort it..&#xD;&#xA;nominatorStakes.sort((a, b) =&gt; a[1].cmp(b[1]));&#xD;&#xA;// .. where the first item will be minimum rewarded.&#xD;&#xA;const minActiveThreshold = nominatorStakes[0][1];&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12352" PostHistoryTypeId="2" PostId="3297" RevisionGUID="33cdd339-b008-4713-87f0-00e63bdefc3a" CreationDate="2022-06-16T13:27:55.920" UserId="555" Text="I have added parachain staking and moonbeam-orbiters of moonbeam in our project. When I test it, all the extrensics are performing well except staking part. I gone through this https://docs.moonbeam.network/tokens/staking/stake/#staking-your-tokens&#xD;&#xA;Here, It is mentioned that &quot;**To access staking features, you need to import/create an Ethereum-style account first (H160 address),**&quot;&#xD;&#xA;Can we access staking features with normal account ? Like I have perform the deligate extrensics with normal account but As mentioned in above tutorial that the staking tokens reflect in reserve amount of delegator account(**BOB**). but In my case, reserve amount remains 0.[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;However If I check **deligatorstate** in  chainstate then I find this: [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;What should I do to perform staking features in our chain ?&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/FrQ6r.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Gpmov.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12354" PostHistoryTypeId="1" PostId="3297" RevisionGUID="33cdd339-b008-4713-87f0-00e63bdefc3a" CreationDate="2022-06-16T13:27:55.920" UserId="555" Text="Moonbeam Parachain staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="12355" PostHistoryTypeId="3" PostId="3297" RevisionGUID="33cdd339-b008-4713-87f0-00e63bdefc3a" CreationDate="2022-06-16T13:27:55.920" UserId="555" Text="|polkadot-js|parachain|parachain-collator|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12356" PostHistoryTypeId="2" PostId="3298" RevisionGUID="646fb9b0-e0ec-41a2-9348-afe6f9b9c5d5" CreationDate="2022-06-16T13:44:37.370" UserId="2565" Text="Now that the PoA is running with multiple Aura validators in my substrate-node-template. How could I configure that reward amount or value for my validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12358" PostHistoryTypeId="1" PostId="3298" RevisionGUID="646fb9b0-e0ec-41a2-9348-afe6f9b9c5d5" CreationDate="2022-06-16T13:44:37.370" UserId="2565" Text="How could I configure that reward amount or value for my Aura validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12359" PostHistoryTypeId="3" PostId="3298" RevisionGUID="646fb9b0-e0ec-41a2-9348-afe6f9b9c5d5" CreationDate="2022-06-16T13:44:37.370" UserId="2565" Text="|substrate-node-template|aura|poa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12360" PostHistoryTypeId="2" PostId="3299" RevisionGUID="2e78bbd5-28e7-49c4-9a8f-9873b16d05a6" CreationDate="2022-06-16T14:31:06.777" UserId="1996" Text="I would like to know if when signing messages through Polkadot-JS it adds a prefix to the message before the signing to avoid signing transactions.&#xD;&#xA;&#xD;&#xA;Do we have different functions for signing messages and transactions? Or they are the same and the validation of whether it is a transaction or not should be done on client-side?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12362" PostHistoryTypeId="1" PostId="3299" RevisionGUID="2e78bbd5-28e7-49c4-9a8f-9873b16d05a6" CreationDate="2022-06-16T14:31:06.777" UserId="1996" Text="Signing message have prefix?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12363" PostHistoryTypeId="3" PostId="3299" RevisionGUID="2e78bbd5-28e7-49c4-9a8f-9873b16d05a6" CreationDate="2022-06-16T14:31:06.777" UserId="1996" Text="|polkadot-js|signing|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12364" PostHistoryTypeId="2" PostId="3300" RevisionGUID="b888207d-cde0-4d93-9fae-d5ce9b6e5a67" CreationDate="2022-06-16T14:39:22.880" UserId="419" Text="When a child bounty is created, the amount is already deducted for it from the parent bounty's balance. At any time, the parent bounty's balance would show only the remaining amount for any new child bounties. You only need to query the balance of the parent bounty account. &#xD;&#xA;&#xD;&#xA;This would be different from the `value` of the parent bounty, just to be clear. The value is the initial amount, and the balance of the bounty account is the remaining amount.&#xD;&#xA;&#xD;&#xA;Here is where we deduct the balance from parent bounty - https://github.com/paritytech/substrate/blob/master/frame/child-bounties/src/lib.rs#L282&#xD;&#xA;&#xD;&#xA;And this is how we get the `AccountId` for a `BountyIndex` - https://github.com/paritytech/substrate/blob/master/frame/bounties/src/lib.rs#L806&#xD;&#xA;&#xD;&#xA;You'll probably need to do this `BountyIndex` to `AccountId` conversion at the client side. And then just query the balance." ContentLicense="CC BY-SA 4.0" />
  <row Id="12366" PostHistoryTypeId="2" PostId="3301" RevisionGUID="61f13319-80b1-4935-ad41-154b6be3850f" CreationDate="2022-06-16T14:45:47.703" UserId="2749" Text="I am updating the Substrate node from [v2.0.1](https://github.com/paritytech/substrate/tree/v2.0.1) to [v3.0.0](https://github.com/paritytech/substrate/tree/v3.0.0) in live network*.&#xD;&#xA;&#xD;&#xA;The initial plan was to merge the v3 code by following the [official guidelines](https://github.com/paritytech/substrate/blob/master/docs/Upgrading-2.0-to-3.0.md), build the new wasm and use a [forkless runtime upgrade](https://docs.substrate.io/v3/runtime/upgrades/#forkless-runtime-upgrades) to deliver it to all nodes in the network. But with this approach the following error appears on nodes: `WARN Cannot create a runtime: Instantiation(“Instantiation: Export ext_default_child_storage_storage_kill_version_2 not found”)`. After [research](https://github.com/paritytech/substrate/issues/8016#issuecomment-773185796), I found that clients should be updated first. &#xD;&#xA;&#xD;&#xA;I've started experiments around the clients' updates. I've up a cluster with 7 validator nodes on v2.0.1 and started 1 by 1 update clients to v3.0.0. The result is the following:&#xD;&#xA;1. Updated Node-1. The network is producing and finalizing blocks. Node-1 is not finalizing blocks but sometimes producing them.&#xD;&#xA;2. Updated Node-2. The same behaviour as after the Node-1 update.&#xD;&#xA;3. Updated Node-3. The network is producing blocks. The network is **not** finalizing blocks. Node-3 is sometimes producing blocks. The reason for the finalization stop looks clear - less than 2/3 of nodes are finalizing blocks.&#xD;&#xA;4. Updated Node-4. The same behaviour as after the Node-3 update.&#xD;&#xA;5. Updated Node-5. The network is producing blocks. Network finalization recovered and now is working as expected.&#xD;&#xA;6. Delivered the v3.0.0 with a forkless upgrade. It applied successfully to the nodes with updated clients (1-5).&#xD;&#xA;&#xD;&#xA;Questions:&#xD;&#xA;1. Is it the correct way to update the clients in the live network*?&#xD;&#xA;2. Is it any way to avoid stopping finalization in the live network* during clients update?&#xD;&#xA;&#xD;&#xA;\* A live network is a network with 50+ validators." ContentLicense="CC BY-SA 4.0" />
  <row Id="12368" PostHistoryTypeId="1" PostId="3301" RevisionGUID="61f13319-80b1-4935-ad41-154b6be3850f" CreationDate="2022-06-16T14:45:47.703" UserId="2749" Text="Update Substrate node from v2.0.1 to v3.0.0 in live network" ContentLicense="CC BY-SA 4.0" />
  <row Id="12369" PostHistoryTypeId="3" PostId="3301" RevisionGUID="61f13319-80b1-4935-ad41-154b6be3850f" CreationDate="2022-06-16T14:45:47.703" UserId="2749" Text="|substrate-node|runtime-upgrade|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12370" PostHistoryTypeId="2" PostId="3302" RevisionGUID="7341a594-26dc-441b-80c2-4e51c37a9055" CreationDate="2022-06-16T15:12:12.313" UserId="450" Text="I have an ink! contract project and I'm doing stress test to benchmark the performance of this ink! contract project in a production chain.&#xD;&#xA;&#xD;&#xA;My stress test includes these steps:&#xD;&#xA; 1. Deploy ink! projects&#xD;&#xA; 2. Execute the contract from multiple accounts and manually tracking the account nonce to obtain parallel execution for each account.&#xD;&#xA; 3. Observe result&#xD;&#xA;&#xD;&#xA;I ran stress test on 2 chains: Substrate node (2s block weight, 3s slot duration) and My standalone node (1s block weight, 3s slot duration). Both chains use maximum block length of 5 Mib.&#xD;&#xA;&#xD;&#xA;Observation: &#xD;&#xA; 1. For each block, extrinsics only takes 10-11% block weight.&#xD;&#xA; 2. There are still many pending extrinsics in the transaction pool and are gradually included in later blocks.&#xD;&#xA; 3. Block length reaches only 2.5 KiB for these cases, implying the cause is not from the block length.&#xD;&#xA;&#xD;&#xA;I don't know if in general, this is also the problem for other pallets or is it just because of `pallet-contracts` or something related to `pallet-contracts`.&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="12372" PostHistoryTypeId="1" PostId="3302" RevisionGUID="7341a594-26dc-441b-80c2-4e51c37a9055" CreationDate="2022-06-16T15:12:12.313" UserId="450" Text="ink! contract extrinsics only take 10-11% block weights when stress test" ContentLicense="CC BY-SA 4.0" />
  <row Id="12373" PostHistoryTypeId="3" PostId="3302" RevisionGUID="7341a594-26dc-441b-80c2-4e51c37a9055" CreationDate="2022-06-16T15:12:12.313" UserId="450" Text="|substrate-node|pallet|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12374" PostHistoryTypeId="2" PostId="3303" RevisionGUID="e6789801-9484-4a46-a52e-0f64d428aadb" CreationDate="2022-06-16T15:40:31.880" UserId="2011" Text="This can be handled with OnUnbalanced on NegativeImbalance event when a fee is charged, [here is sample code][1]&#xD;&#xA;&#xD;&#xA;You will also need to integrate authorship pallet to pass the author (validator) information, [here is a snippet for this][2]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/web3labs/ice-substrate/blob/main/runtime/arctic/src/impls.rs#L22&#xD;&#xA;  [2]: https://github.com/web3labs/ice-substrate/blob/main/runtime/arctic/src/lib.rs#L402" ContentLicense="CC BY-SA 4.0" />
  <row Id="12376" PostHistoryTypeId="13" PostId="24" RevisionGUID="b3e24710-1048-4d66-b877-4c47d6210855" CreationDate="2022-06-16T15:59:04.553" UserId="28" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="12377" PostHistoryTypeId="2" PostId="3304" RevisionGUID="03c89419-19ba-4a05-8775-c17d4e30c5b1" CreationDate="2022-06-16T16:09:16.620" UserId="276" Text="To get more information how to format the paramaters of a specific storage function, you can check out: https://github.com/polkascan/py-substrate-interface#type-information-about-how-to-format-parameters" ContentLicense="CC BY-SA 4.0" />
  <row Id="12379" PostHistoryTypeId="52" PostId="3284" RevisionGUID="6f2ad2b0-3d7b-4c49-864f-a35e6b33f9c2" CreationDate="2022-06-16T16:47:08.240" />
  <row Id="12380" PostHistoryTypeId="2" PostId="3305" RevisionGUID="cff92d7e-cee8-4c05-b389-79609545414a" CreationDate="2022-06-16T17:34:35.853" UserId="2698" Text="I would like to map T::AccountId to a custom struct I have Amendments &lt;AccountId:&#xD;&#xA;```&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn declaration_map)]&#xD;&#xA;	pub(super) type Declarations&lt;T: Config&gt; = StorageMap&#xD;&#xA;	&lt;&#xD;&#xA;	_,&#xD;&#xA;	Blake2_128Concat,&#xD;&#xA;	T::AccountId,&#xD;&#xA;	Amendment&lt;T::AccountId&gt;,&#xD;&#xA;	ValueQuery&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;However when I try to use T::AccountId in this context I get this error:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `&lt;T as frame_system::Config&gt;::AccountId: std::default::Default` is not satisfied&#xD;&#xA;   --&gt; pallets/template/src/lib.rs:243:12&#xD;&#xA;    |&#xD;&#xA;243 |     #[pallet::storage]&#xD;&#xA;    |               ^^^^^^^ the trait `std::default::Default` is not implemented for `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;```&#xD;&#xA;It makes sense that T::AccountId doesn't have a default since it wouldn't make sense for it to have one. However I understand that a map in this context probably can't take a AccountId without having a default value for it. Is there a way for me to get around this so I can still map the AccountIds?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12382" PostHistoryTypeId="1" PostId="3305" RevisionGUID="cff92d7e-cee8-4c05-b389-79609545414a" CreationDate="2022-06-16T17:34:35.853" UserId="2698" Text="Using T::AccountId in a custom map" ContentLicense="CC BY-SA 4.0" />
  <row Id="12383" PostHistoryTypeId="3" PostId="3305" RevisionGUID="cff92d7e-cee8-4c05-b389-79609545414a" CreationDate="2022-06-16T17:34:35.853" UserId="2698" Text="|pallet|frame|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12384" PostHistoryTypeId="2" PostId="3306" RevisionGUID="562faa97-95ab-4c25-8ca4-eca3dd49b37d" CreationDate="2022-06-16T17:39:49.677" UserId="94" Text="As you specify to it to use a `ValueQuery`, a default has to exist.  &#xD;&#xA;The solution is to use an `OptionQuery` instead which then returns `None`:  &#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn declaration_map)]&#xD;&#xA;pub(super) type Declarations&lt;T: Config&gt; = StorageMap&#xD;&#xA;	&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		Amendment&lt;T::AccountId&gt;,&#xD;&#xA;		OptionQuery // &lt;- HERE&#xD;&#xA;	&gt;;&#xD;&#xA;```  &#xD;&#xA;A `ResultQuery` should probably also work." ContentLicense="CC BY-SA 4.0" />
  <row Id="12390" PostHistoryTypeId="2" PostId="3307" RevisionGUID="e7b42922-17fd-49dc-9335-8130a6365e1e" CreationDate="2022-06-16T19:28:55.070" UserId="2752" Text="I want to use the [bytes][1] crate in an ink! smart contract of mine.&#xD;&#xA;Also I want to declare a Byte value in the ink_storage struct.&#xD;&#xA;However, I cannot figure out how to do this. &#xD;&#xA;After hours of trying and not finding a solution. Is there some documentation&#xD;&#xA;which could help me, or a predefined way?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/bytes/1.1.0/bytes/" ContentLicense="CC BY-SA 4.0" />
  <row Id="12392" PostHistoryTypeId="1" PostId="3307" RevisionGUID="e7b42922-17fd-49dc-9335-8130a6365e1e" CreationDate="2022-06-16T19:28:55.070" UserId="2752" Text="How to add and use a crate in an ink smart contract/ ink storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12393" PostHistoryTypeId="3" PostId="3307" RevisionGUID="e7b42922-17fd-49dc-9335-8130a6365e1e" CreationDate="2022-06-16T19:28:55.070" UserId="2752" Text="|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12394" PostHistoryTypeId="5" PostId="3295" RevisionGUID="ce1ae907-c9d7-4973-9342-18c764c7c274" CreationDate="2022-06-16T19:44:24.847" UserId="1837" Comment="added 130 characters in body" Text="I am trying to execute a simple extrinsic but for some reason, it gives the error `Unable to retrieve header and parent from supplied hash`.&#xD;&#xA;&#xD;&#xA;I don't think my problem has anything to with the extrinsic, but here is an example of extrinsic which I was executing. My end goal is to call this extrinsic through polkadot.js API, but since it was failing I tried to test it through Polkadot UI. &#xD;&#xA;```&#xD;&#xA;fn update_resource(resource:[u8; 32]){&#xD;&#xA;  ....&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would like to understand what exactly the above error msg means. &#xD;&#xA;&#xD;&#xA;Any feedback or help is most appreciated. Thank you..!" ContentLicense="CC BY-SA 4.0" />
  <row Id="12395" PostHistoryTypeId="2" PostId="3308" RevisionGUID="e2b596f9-8c0f-4e22-94df-c319e665ebae" CreationDate="2022-06-16T21:03:28.587" UserId="29" Text="If you pass an empty subject: `self.env().random(&amp;[])` you will get back a hash and the block number &quot;since which it was determinable by chain observers&quot;. So something like this:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;(Hash([14, 226, 146, 230, 25, 164, 171, 91, 28, 230, 150, 50, 244, 69, 169, 102, 18, 186, 225, 160, 102, 54, 167, 68, 43, 11, 153, 41, 122, 155, 26, 103]), 55672)&#xD;&#xA;```&#xD;&#xA;- https://paritytech.github.io/ink/ink_env/fn.random.html&#xD;&#xA;&#xD;&#xA;The block hash is not currently exposed.&#xD;&#xA;&#xD;&#xA;You do have access however to the [block number](https://paritytech.github.io/ink/ink_env/fn.block_number.html) e.g. `self.env().block_number()`, you can also use a chain extension to grab the block hash if you really need it, or take the block number and deduce the block hash from that..&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12397" PostHistoryTypeId="2" PostId="3309" RevisionGUID="17406566-28e5-4644-a9f5-51386fad5af2" CreationDate="2022-06-16T22:16:20.780" UserId="2698" Text="I am working on creating a custom map which takes T::AccountId as a perimeter:&#xD;&#xA;```&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn declaration_map)]&#xD;&#xA;	pub(super) type Declarations&lt;T: Config&gt; = StorageMap&#xD;&#xA;	&lt;&#xD;&#xA;	_,&#xD;&#xA;	Blake2_128Concat,&#xD;&#xA;	T::AccountId,&#xD;&#xA;	Amendment&lt;T::AccountId&gt;,&#xD;&#xA;	OptionQuery&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;I pass it as an OptionQuery since AccountId does not have a default value implemented and therefore could be none value. However in my calls: (Example)&#xD;&#xA;```&#xD;&#xA;		#[pallet::weight(100_000)]&#xD;&#xA;		pub fn add_amendment(origin: OriginFor&lt;T&gt;, statement: Vec&lt;u8&gt;, owners: Vec&lt;T::AccountId&gt;) -&gt; DispatchResult {&#xD;&#xA;			use crate::pallet::Event::AmendmentAdded;&#xD;&#xA;			ensure_root(origin)?;&#xD;&#xA;			let amendment = Amendment {&#xD;&#xA;				statement: statement.clone(), &#xD;&#xA;				owners: owners&#xD;&#xA;			};&#xD;&#xA;			let next_id = Self::next_amendment();&#xD;&#xA;			Declarations::&lt;T&gt;::insert(next_id, amendment);&#xD;&#xA;			Self::deposit_event(AmendmentAdded(next_id.unwrap(), statement));&#xD;&#xA;			NextAmendmentID::&lt;T&gt;::put(&amp;next_id.unwrap() + 1);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;When I get a value from the map there is a potential that the value will be none and can not be used as a key. The simplest way to fix this in my mind is to implement a default value to accountId. My question is how do I implement that? This is an artical: &#xD;&#xA;https://substrate.stackexchange.com/questions/1812/why-is-there-no-default-implementation-for-taccountid&#xD;&#xA;The OP however doesn't go into detail about how they implemented a default value. If anyone has any insight on this it would be very helpful." ContentLicense="CC BY-SA 4.0" />
  <row Id="12399" PostHistoryTypeId="1" PostId="3309" RevisionGUID="17406566-28e5-4644-a9f5-51386fad5af2" CreationDate="2022-06-16T22:16:20.780" UserId="2698" Text="How to do a manual implementation for 'AccountId'" ContentLicense="CC BY-SA 4.0" />
  <row Id="12400" PostHistoryTypeId="3" PostId="3309" RevisionGUID="17406566-28e5-4644-a9f5-51386fad5af2" CreationDate="2022-06-16T22:16:20.780" UserId="2698" Text="|pallet|frame|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12403" PostHistoryTypeId="2" PostId="3311" RevisionGUID="11c4b2d5-e5ac-4a18-bf4e-3095bc91f191" CreationDate="2022-06-17T00:03:06.343" UserId="2714" Text="I'm following the tutorial from here: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/#parachain-registration&#xD;&#xA;&#xD;&#xA;On the parachain registration step, I go to the Polkadot apps UI &gt; Developer &gt; Extrinsics. However, I don't see the option listed in the tutorial for paraSudoWrapper -&gt; sudoScheduleParaInitialize(id, genesis).&#xD;&#xA;&#xD;&#xA;I tried the Option 2 in the tutorial for slots-&gt;forceLease(para, leaser, amount, period_begin, period_end), but it always fails with Bad Origin. &#xD;&#xA;&#xD;&#xA;[![Bad Origin][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lZSn0.png&#xD;&#xA;&#xD;&#xA;I looked at https://substrate.stackexchange.com/questions/2276/cannot-register-parachain-id-system-extrinsic-failed-bad-origin but I don't have a tab for ```paraSudoWrapper```. I also don't have ```sudo```.&#xD;&#xA;&#xD;&#xA;For context, I'm actually using this (github.com/buraktabn/relay-chain) as my relay node, which should have the same functionality as polkadot. I am running on kusama-dev network. &#xD;&#xA;&#xD;&#xA;How would I register a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12405" PostHistoryTypeId="1" PostId="3311" RevisionGUID="11c4b2d5-e5ac-4a18-bf4e-3095bc91f191" CreationDate="2022-06-17T00:03:06.343" UserId="2714" Text="Connect a Parachain tutorial parachain registration not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="12406" PostHistoryTypeId="3" PostId="3311" RevisionGUID="11c4b2d5-e5ac-4a18-bf4e-3095bc91f191" CreationDate="2022-06-17T00:03:06.343" UserId="2714" Text="|parachain-collator|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12407" PostHistoryTypeId="52" PostId="3305" RevisionGUID="dac636d2-5784-4100-bf61-53108ea1c478" CreationDate="2022-06-17T01:34:43.363" />
  <row Id="12408" PostHistoryTypeId="2" PostId="3312" RevisionGUID="72d285de-9041-415c-b35d-0f591801381d" CreationDate="2022-06-17T02:21:43.273" UserId="28" Text="The tutorial says &quot;using the sudo pallet&quot;.&#xD;&#xA;&#xD;&#xA;If you don't have the sudo pallet, you need to add it, or create a different pallet which allows for parachains to be registered in a way that works for you.&#xD;&#xA;&#xD;&#xA;Obviously parachain registration is a very high permission function, and so it is not exposed through normal user flows. On Polkadot it requires governance to start parachain auctions which can then be won to upgrade a parathread to a parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="12410" PostHistoryTypeId="2" PostId="3313" RevisionGUID="a2bea131-46c0-44a0-b6e3-f29dbc4143e0" CreationDate="2022-06-17T02:36:01.807" UserId="34" Text="That tutorial uses Rococo (specifically `rococo-local` and as Shawn said, this relay chain [has the sudo pallet](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs#L224) at the time of writing. Depending on your use case, you may consider adding alternative runtimes as Polkadot does to enable testing or local and public test networks that have things like sudo enabled, but not for your production networks, unless that is the intention explicitly." ContentLicense="CC BY-SA 4.0" />
  <row Id="12412" PostHistoryTypeId="4" PostId="3311" RevisionGUID="5e91c235-5e99-4dd8-bdfa-82e8620178f7" CreationDate="2022-06-17T02:37:54.237" UserId="34" Comment="edited tags; edited title" Text="Connect a parachain to a custom relay chain without sudo" ContentLicense="CC BY-SA 4.0" />
  <row Id="12413" PostHistoryTypeId="6" PostId="3311" RevisionGUID="5e91c235-5e99-4dd8-bdfa-82e8620178f7" CreationDate="2022-06-17T02:37:54.237" UserId="34" Comment="edited tags; edited title" Text="|relay-chain|sudo|slot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12414" PostHistoryTypeId="2" PostId="3314" RevisionGUID="59e7fd93-04a8-4d62-8ce6-dbba51de3303" CreationDate="2022-06-17T04:57:52.440" UserId="1959" Text="Such a scenario: cross-chain transfer from chain A to chain B, XCM fails to execute in chain B, and chain A can be rolled back." ContentLicense="CC BY-SA 4.0" />
  <row Id="12416" PostHistoryTypeId="1" PostId="3314" RevisionGUID="59e7fd93-04a8-4d62-8ce6-dbba51de3303" CreationDate="2022-06-17T04:57:52.440" UserId="1959" Text="Will XCM have a transaction mechanism in the future?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12417" PostHistoryTypeId="3" PostId="3314" RevisionGUID="59e7fd93-04a8-4d62-8ce6-dbba51de3303" CreationDate="2022-06-17T04:57:52.440" UserId="1959" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12418" PostHistoryTypeId="5" PostId="3314" RevisionGUID="d35843a1-80ba-440d-808d-a81706e3391a" CreationDate="2022-06-17T05:42:32.750" UserId="1959" Comment="added 21 characters in body" Text="Such a scenario: cross-chain transfer from chain A to chain B, XCM fails to execute in chain B, and chain A can be rolled back.&#xD;&#xA;&#xD;&#xA;Is this possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12419" PostHistoryTypeId="2" PostId="3315" RevisionGUID="d1b8ed52-4509-48fa-8dbc-e9f8e12b4731" CreationDate="2022-06-17T05:45:10.090" UserId="1728" Text="I'm trying to get the chain state information from substrate using RPC for IdentityOf of any Accountid&#xD;&#xA;Upon succesfull request, I get the following result: &#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;result&quot;: &quot;0x040200000002000c9924370e00000000000000000000000e4272696768746c797374616b65001a68747470733a2f2f6272696768746c797374616b652e636f6d00157374616b696e6737706340676d61696c2e636f6d00000f406272696768746c797374616b65&quot;,&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;How can I decode the `result` specifically using Python's scale library? " ContentLicense="CC BY-SA 4.0" />
  <row Id="12421" PostHistoryTypeId="1" PostId="3315" RevisionGUID="d1b8ed52-4509-48fa-8dbc-e9f8e12b4731" CreationDate="2022-06-17T05:45:10.090" UserId="1728" Text="How to decode RPC results using Python's Scale library" ContentLicense="CC BY-SA 4.0" />
  <row Id="12422" PostHistoryTypeId="3" PostId="3315" RevisionGUID="d1b8ed52-4509-48fa-8dbc-e9f8e12b4731" CreationDate="2022-06-17T05:45:10.090" UserId="1728" Text="|rpc|python|scale|pallet-identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12423" PostHistoryTypeId="2" PostId="3316" RevisionGUID="0471d78c-9407-4ef1-9924-325c48ee4e04" CreationDate="2022-06-17T07:43:31.843" UserId="450" Text="For anyone who may encounter this problem here is the solution and also the explanation.&#xD;&#xA;&#xD;&#xA;## Explanation&#xD;&#xA;You may encounter this problem when update older substrate version to the newer one. In my case, it is from `substrate polkadot-v0.9.18` to `substrate polkadot-v0.9.23`.&#xD;&#xA;&#xD;&#xA;Tks to @kianenigma suggestion, I've looked into the implementation of `pallet_staking::get_npos_voters()` and found that there is a difference in implementation between older and newer version.&#xD;&#xA;&#xD;&#xA;In older version, `pallet_staking::get_npos_voters()` use its `Validators` and `Nominators` storage items to return the voters. While in newer version, `pallet_staking::get_npos_voters()` use `T::VoterList` (which is usually configured to be `pallet_bags_list`) to return the voters.&#xD;&#xA;&#xD;&#xA;When we validate/nominate, our votes are not recorded in `T::VoterList` in older implementation while newer implementation already does. And when we switch to the new version, `T::VoterList` is empty. That's why staking election always failed.&#xD;&#xA;&#xD;&#xA;## Solution&#xD;&#xA;The solution is to chill your nominators/validators, and validate/nominate again so that new implementation will record your votes in `T::VoterList`. And maybe `forceNewEra()` using `sudo` account. Maybe re-try a couple of times until you see `staking.Elected`." ContentLicense="CC BY-SA 4.0" />
  <row Id="12425" PostHistoryTypeId="5" PostId="3227" RevisionGUID="d022f155-2788-45d6-88fd-0f240a9dcc5e" CreationDate="2022-06-17T09:06:18.400" UserId="1789" Comment="added 383 characters in body" Text="How can I make ChainBridge to work with my parachain collator? Is there a documentation for such process? &#xD;&#xA;&#xD;&#xA;all the settings are inside the chainbridge/config.json file(https://github.com/ChainSafe/ChainBridge#chain-implementations):&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;chains&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;eth&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;ethereum&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;0&quot;,&#xD;&#xA;      &quot;endpoint&quot;: &quot;ws://localhost:8545&quot;,&#xD;&#xA;      &quot;from&quot;: &quot;0xff93B45308FD417dF303D6515aB04D9e89a750Ca&quot;,&#xD;&#xA;      &quot;opts&quot;: {&#xD;&#xA;        &quot;bridge&quot;: &quot;0x62877dDCd49aD22f5eDfc6ac108e9a4b5D2bD88B&quot;,&#xD;&#xA;        &quot;erc20Handler&quot;: &quot;0x3167776db165D8eA0f51790CA2bbf44Db5105ADF&quot;,&#xD;&#xA;        &quot;erc721Handler&quot;: &quot;0x3f709398808af36ADBA86ACC617FeB7F5B7B193E&quot;,&#xD;&#xA;        &quot;genericHandler&quot;: &quot;0x2B6Ab4b880A45a07d83Cf4d664Df4Ab85705Bc07&quot;,&#xD;&#xA;        &quot;gasLimit&quot;: &quot;1000000&quot;,&#xD;&#xA;        &quot;maxGasPrice&quot;: &quot;20000000&quot;&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;sub&quot;,&#xD;&#xA;      &quot;type&quot;: &quot;substrate&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;1&quot;,&#xD;&#xA;      &quot;endpoint&quot;: &quot;ws://localhost:9944&quot;,&#xD;&#xA;      &quot;from&quot;: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;      &quot;opts&quot;: {&#xD;&#xA;          &quot;useExtendedCall&quot;:&quot;true&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- cb-sol.cli can deploy and setup Ethereum contracts that can receive incoming tokens: https://substrate.stackexchange.com/questions/3272/chainbridge-how-to-use-their-cli-tool-to-deploy-smart-contracts-on-ethereum-net/&#xD;&#xA;&#xD;&#xA;- How to get/make those resource Ids in the &quot;Register Resources Substrate&quot; step:&#xD;&#xA;A Resource ID must be a 32-byte unique value to the resource. The Resource IDs are arbitrary, but they may have the originated from chain ID in the last byte. For example, this is a valid id if it is unique: &quot;0x000000000000000000000000000000c76ebe4a02bbc34786d860b355f5a5ce00&quot;. The last &quot;00&quot; represents the chain ID this token was originated from.&#xD;&#xA;&#xD;&#xA;Then...&#xD;&#xA;- add chainbridge-substrate's example-pallet into my parachain&#xD;&#xA;... I need to upgrade that pallet's code to newer syntax&#xD;&#xA;&#xD;&#xA;- run relayers with updated config.json with new Ethereum addresses, new endpoints&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="12426" PostHistoryTypeId="2" PostId="3317" RevisionGUID="e0abcb62-1b1a-4eb4-a711-b3f58161a249" CreationDate="2022-06-17T09:33:49.440" UserId="393" Text="You can take a look at this [documentation][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://chainbridge.chainsafe.io/local/" ContentLicense="CC BY-SA 4.0" />
  <row Id="12430" PostHistoryTypeId="5" PostId="3283" RevisionGUID="51f94489-0f5e-45ae-8a92-5e0ff9c360c3" CreationDate="2022-06-17T13:35:00.623" UserId="1789" Comment="added 302 characters in body" Text="Should run `source ./configFile` inside the bashscript.sh every time! Otherwise those variables cannot be read from the bash script for some reason.&#xD;&#xA;&#xD;&#xA;Also check out those tutorials because the official tutorial does not cover public testnets like Ethereum Rinkeby:&#xD;&#xA;&#xD;&#xA;https://docs.avax.network/subnets/deploying-cross-chain-evm-bridge#deploy-contracts&#xD;&#xA;  &#xD;&#xA;https://edge-docs.polygon.technology/docs/additional-features/chainbridge/deploy-contracts/" ContentLicense="CC BY-SA 4.0" />
  <row Id="12431" PostHistoryTypeId="5" PostId="3309" RevisionGUID="c30a4273-2d50-444c-adea-c5ced721e8ef" CreationDate="2022-06-17T13:47:15.807" UserId="29" Comment="added 16 characters in body" Text="I am working on creating a custom map which takes `T::AccountId` as a perimeter:&#xD;&#xA;```rs&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn declaration_map)]&#xD;&#xA;pub(super) type Declarations&lt;T: Config&gt; = StorageMap&#xD;&#xA;&lt;&#xD;&#xA;_,&#xD;&#xA;Blake2_128Concat,&#xD;&#xA;T::AccountId,&#xD;&#xA;Amendment&lt;T::AccountId&gt;,&#xD;&#xA;OptionQuery&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I pass it as an `OptionQuery` since `AccountId` does not have a default value implemented and therefore could be `None` value. However in my calls: (Example)&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::weight(100_000)]&#xD;&#xA;pub fn add_amendment(origin: OriginFor&lt;T&gt;, statement: Vec&lt;u8&gt;, owners: Vec&lt;T::AccountId&gt;) -&gt; DispatchResult {&#xD;&#xA;    use crate::pallet::Event::AmendmentAdded;&#xD;&#xA;    ensure_root(origin)?;&#xD;&#xA;    let amendment = Amendment {&#xD;&#xA;				  statement: statement.clone(), &#xD;&#xA;				  owners: owners&#xD;&#xA;  			    };&#xD;&#xA;    let next_id = Self::next_amendment();&#xD;&#xA;	Declarations::&lt;T&gt;::insert(next_id, amendment);&#xD;&#xA;	Self::deposit_event(AmendmentAdded(next_id.unwrap(), statement));&#xD;&#xA;	NextAmendmentID::&lt;T&gt;::put(&amp;next_id.unwrap() + 1);&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;When I get a value from the map there is a potential that the value will be `None` and can not be used as a key. The simplest way to fix this in my mind is to implement a default value to `AccountId`. My question is how do I implement that? There is an this article: &#xD;&#xA;https://substrate.stackexchange.com/questions/1812/why-is-there-no-default-implementation-for-taccountid&#xD;&#xA;The OP however doesn't go into detail about how they implemented a default value. If anyone has any insight on this it would be very helpful." ContentLicense="CC BY-SA 4.0" />
  <row Id="12432" PostHistoryTypeId="5" PostId="3311" RevisionGUID="6f946333-4633-4d6b-9e82-e8c28e049aed" CreationDate="2022-06-17T13:55:27.373" UserId="29" Comment="added 8 characters in body" Text="I'm following the tutorial from here: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/#parachain-registration&#xD;&#xA;&#xD;&#xA;On the parachain registration step, I go to the Polkadot apps UI &gt; Developer &gt; Extrinsics. However, I don't see the option listed in the tutorial for paraSudoWrapper -&gt; sudoScheduleParaInitialize(id, genesis).&#xD;&#xA;&#xD;&#xA;I tried the Option 2 in the tutorial for slots-&gt;forceLease(para, leaser, amount, period_begin, period_end), but it always fails with Bad Origin. &#xD;&#xA;&#xD;&#xA;[![Bad Origin][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lZSn0.png&#xD;&#xA;&#xD;&#xA;I looked at https://substrate.stackexchange.com/questions/2276/cannot-register-parachain-id-system-extrinsic-failed-bad-origin but I don't have a tab for ```paraSudoWrapper```. I also don't have ```sudo```.&#xD;&#xA;&#xD;&#xA;For context, I'm actually using this (https://github.com/buraktabn/relay-chain) as my relay node, which should have the same functionality as polkadot. I am running on kusama-dev network. &#xD;&#xA;&#xD;&#xA;How would I register a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12433" PostHistoryTypeId="2" PostId="3318" RevisionGUID="80cf280e-130f-488c-99ea-602e2fba4d65" CreationDate="2022-06-17T13:55:31.913" UserId="527" Text="I am afraid that what you are trying to achieve is currently not possible for Statemint v9230.&#xD;&#xA;&#xD;&#xA;This recent change: https://github.com/paritytech/cumulus/pull/1318/files will make your test to fail in Statemint with a `UntrastedReseveLocation` error.&#xD;&#xA;&#xD;&#xA;Until this issue is solved: https://github.com/paritytech/cumulus/issues/1317 there is not a proper way of reserve transferring a parachain's native token to Statemint.&#xD;&#xA;&#xD;&#xA;The most similar approach would be the following:&#xD;&#xA;&#xD;&#xA;Creating a derivative of the native asset in Statemint under `pallet-assets`, kind of `wrappedAsset`. Manually mint some assets in your sovereign account in Statemint, manually burn them from your Parachain (in case they want to keep the total issuance). Then, you will be only able of making use of `InitiateReserveWithdraw` from your Parachain to Statemint. It would only work if you are able to reanchor properly your native asset to the corresponding `GeneralIndex(id)` in Statemint's `pallet-assets`.&#xD;&#xA;&#xD;&#xA;I think that even if you recognise Statemine as a reserve in your Parachain, it will be pointless. The reanchoring for `TransferReserveAsset` happens in the origin (aka Statemint). Instead of doing this hack, I think it is worth it to wait until Statemint allows what you want." ContentLicense="CC BY-SA 4.0" />
  <row Id="12435" PostHistoryTypeId="2" PostId="3319" RevisionGUID="0a1e9267-f297-4ae6-b7d8-d60964508c33" CreationDate="2022-06-17T15:19:08.897" UserId="2754" Text="How to do XCM transaction via polkadot.js/api?&#xD;&#xA;I just need to do something like that: https://apps.karura.network/bridge." ContentLicense="CC BY-SA 4.0" />
  <row Id="12437" PostHistoryTypeId="1" PostId="3319" RevisionGUID="0a1e9267-f297-4ae6-b7d8-d60964508c33" CreationDate="2022-06-17T15:19:08.897" UserId="2754" Text="XSM transaction via polkadot.js/api possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12438" PostHistoryTypeId="3" PostId="3319" RevisionGUID="0a1e9267-f297-4ae6-b7d8-d60964508c33" CreationDate="2022-06-17T15:19:08.897" UserId="2754" Text="|polkadot-js|xcm|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12440" PostHistoryTypeId="4" PostId="3319" RevisionGUID="b68042df-d188-4744-a07f-cb7c29d00cfd" CreationDate="2022-06-17T16:56:01.810" UserId="2025" Comment="fix a typo in title" Text="XCM transaction via polkadot.js/api possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12441" PostHistoryTypeId="24" PostId="3319" RevisionGUID="b68042df-d188-4744-a07f-cb7c29d00cfd" CreationDate="2022-06-17T16:56:01.810" Comment="Proposed by 2025 approved by 29 edit id of 219" ContentLicense="CC BY-SA 4.0" />
  <row Id="12442" PostHistoryTypeId="2" PostId="3320" RevisionGUID="ba068888-7d3a-4dc7-9f17-39009744c205" CreationDate="2022-06-17T17:02:52.587" UserId="408" Text="Since you didn't mention what chain you were asking about. I'm assuming the chain is Moonbeam network.&#xD;&#xA;&#xD;&#xA;According to https://docs.moonbeam.network/node-operators/networks/collators/activities/, you need `api.query.parachainStaking.candidatePool` to get the list of collator addresses. Additionally you need to pass each address to `api.query.identity.identityOf` and extract the name info. Here is the full script:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// get list of collator addrs&#xD;&#xA;let collatorAddrs = (await api.query.parachainStaking.candidatePool()).map(([x])=&gt;x[1].toString());&#xD;&#xA;&#xD;&#xA;// get list of collator names&#xD;&#xA;let collatorNames = (await Promise.all(collatorAddrs.map((c)=&gt;api.query.identity.identityOf(c)))).map(x=&gt;x.toHuman()?.info.display.Raw);&#xD;&#xA;&#xD;&#xA;// zip two lists and construct a mapping from addr to it's name&#xD;&#xA;let result = Object.fromEntries(collatorAddrs.map((c, i)=&gt;[c, collatorNames[i]]));&#xD;&#xA;&#xD;&#xA;// print result&#xD;&#xA;console.log(result)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the output&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  '0x0198D3053a69C3f977bB1943bc95A0fFA7777474': '0xf09f9099205374616b655371756964',&#xD;&#xA;  '0x01bB6ce8b88F09A7D0BFB40eFf7f2aD5e0DF2e98': 'Foundation-02',&#xD;&#xA;  '0x021cd61168a50b3b0252A251878e8f81F8f9cb37': 'LetzBake!',&#xD;&#xA;  '0x02B8d54a9a7b4F408A5d46d7f9fF1B5f1D370504': 'ACV &amp; ORANGE | GIVEAWAY!',&#xD;&#xA;  '0x0663AA7BEb6a9229Fc5A016ffc81C0F133442A54': 'bitcoinsuisse.com 2',&#xD;&#xA;  '0x068c67fa2c877B8EB0CE37a0f77617330eB04e72': 'Staker Space',&#xD;&#xA;  '0x0a0952E7d58817C40473D57a7E37f188DdB81ff9': 'luckyve',&#xD;&#xA;  '0x10023fA70Ed528E4F28915bf210f6e87b057c08E': 'Sik | crifferent.de',&#xD;&#xA;  '0x111141269142D8A1BC8F949bFFf7dF227EE8d76A': 'MoonEntropy',&#xD;&#xA;  '0x13a61daC75e2F66721dcaEdA726be1E636928800': '0xf09f94b14d61737465726e6f646532342e6465',&#xD;&#xA;  '0x19A33caD2d311830550B41165d5faBf578347f3A': 'Blockdaemon',&#xD;&#xA;  '0x1Ade25b8679c39a755DB598b2Cf98c36EE86f4fD': 'Bogosort',&#xD;&#xA;  '0x1C86E56007FCBF759348dcF0479596a9857Ba105': 'PureStake-03',&#xD;&#xA;  '0x1d4dD1bd8D1F26B631b69396a9cbF7BF7c373073': 'pathrocknetwork',&#xD;&#xA;  '0x1Dc2Ae28998dcBcD496a96883552bd0fEBC4af32': 'DarkWing',&#xD;&#xA;  '0x2185e7531A57C45416C78D2cC3B1C768Df6395F0': 'The Milky Way Gang',&#xD;&#xA;  '0x293d1253b07c8bEB88A3a0758f8E9CCE299841B8': undefined,&#xD;&#xA;  '0x3431e0dE19a9eB54d71bE71a2FDdB7e7b3225643': 'CertHum Inc.',&#xD;&#xA;  '0x35ac93AeDb902440154Cd90d6c1c25884775bF46': 'High Stakes',&#xD;&#xA;  '0x3f0937BdEF510fd1D39F76CF41a7A4CFbf8ab876': 'Polkadotters',&#xD;&#xA;  '0x4FAdbd3A6E6Ff1cd17aDa64EB79Be168Ce32cF7c': 'Simply Staking 03',&#xD;&#xA;  '0x564E8464A616baE3c366467eD572C3d2Ae8b9E63': 'Simply Staking',&#xD;&#xA;  '0x579279366aF138CA8b8A467F8aa8bc7e03D314f9': 'Source',&#xD;&#xA;  '0x58587E945c161f5c98c20BF2e7eec135f0a5D676': 'Ondin',&#xD;&#xA;  '0x5C68Ce6100f980Ced708bD89CCE028840Ac6bDA9': 'LEGEND',&#xD;&#xA;  '0x5d6D1a59Fd3E6cf325FACCbEA4d1265b15d34aCB': 'bitcoinsuisse.com 3',&#xD;&#xA;  '0x5D9Bc481749420CFFB2BF5aeF5c5e2A0fFe04e88': '0xe29c88efb88f2055544f5049412026204d6f6f6e506574732e617070',&#xD;&#xA;  '0x64265707F81633Fb7b871083DddBb5d04f5c7af7': 'PureStake-04',&#xD;&#xA;  '0x6Ac4b6725eFD8a1CB397884769730094e854efd4': '0xf09f9bb8205a6f6f70657220436f727020f09f9bb8',&#xD;&#xA;  '0x6F21E1C5234eC2DA8019632d4836fFCC2379DbA7': undefined,&#xD;&#xA;  '0x6faf9F07D12D68A3685d34F3262383df40Bd35Cd': '255 DAO 02 | 2555 GLMR GIVEAWAY',&#xD;&#xA;  '0x703dF467FE6Ef01868D16fD7230C8E72fe2F7fEF': 'moonli.me',&#xD;&#xA;  '0x73Fd06aBCa1669725CE4ecA539bf55393B228f23': 'ZKValidator',&#xD;&#xA;  '0x7A6a051d542040155c41eB599e995427bf672b4d': 'DomiNodes',&#xD;&#xA;  '0x7f1f9A444A22d8d39EfdFdD9c441070F36a20750': 'Simply Staking 02',&#xD;&#xA;  '0x7fA2033272db2E4116CE314fd789A3A148F2Ed55': 'Brightlystake',&#xD;&#xA;  '0x834e4E90718673CbC3508a29877b20C5C2bA2417': undefined,&#xD;&#xA;  '0x84F94DA49C63596Cb9a465b02e65F43CA2315041': 'bitcoinsuisse.com 1',&#xD;&#xA;  '0x8730b791EE9Fd8abF80Caa654f4E4c5626dDbeee': '0x4c45542753204e4f444520262043525950544f52f09f9589',&#xD;&#xA;  '0x88848d6A768adfaE32C9aef05D70C522893efa1C': 'SmartMoney',&#xD;&#xA;  '0x890fF0DD8e4cA7141482b4b20D277bb9051c1477': undefined,&#xD;&#xA;  '0x8C599E8f9B5d15d3Adf89D856f34fFEC8De0B2c6': 'bitcoinsuisse.com 4',&#xD;&#xA;  '0x9436CF1090cA39e38FEc1F78C01Ac9F936e36965': 'Figment',&#xD;&#xA;  '0x95a4fB297433C78D0De956CE7eda4CF9EFf9AaF3': undefined,&#xD;&#xA;  '0x9CED08E436a468668Caa25E0A7907aCF5588d595': 'BloClick',&#xD;&#xA;  '0x9eEA5Bc566031840743E3eFc8f7919fC393E1573': 'Cosmoon | Stake &amp; Giveaway',&#xD;&#xA;  '0xa1e5E3C161Bceb944b655364a6848F47c6e93b56': '0x4561726e5820f09f929720426f6e75732052657761726473',&#xD;&#xA;  '0xA345728816d83533a24BF1d980009F3B01CeC2fe': 'MoonWorld',&#xD;&#xA;  '0xaA795bB2c69B1419c4e0b56706777e9a68bac42b': undefined,&#xD;&#xA;  '0xAb4B115b2D23EF8DA7b0aa54FC074fB4C6886441': '0xf09f91b6205374616b6542616279207c204469766572732056616c204e6574',&#xD;&#xA;  '0xABbed75d32F138E6B3366613dcd01a96E8B61B58': '0x53656e644974205374616b696e67f09f9a80',&#xD;&#xA;  '0xb15F8D5c222C5998451f34882e3dA4Ad5C2B3165': 'binance-staking-1',&#xD;&#xA;  '0xb3E64EF8Fc9dF438c9A54f4B189EDdC1807b55a5': 'Foundation-01',&#xD;&#xA;  '0xb6758E748F5D76B8b1264F9B907D8675DA52c97C': 'Binary Holdings',&#xD;&#xA;  '0xB9662Aa0aDBF57d5B74Cf39b621e90e45982749e': 'GPvalidator',&#xD;&#xA;  '0xbA360F50Eb4B68F384C5d4eE4fD1bFbe50D5208b': '0x4d6f6f6e6265616d20f09f8c9420426f6e75732052657761726420313025',&#xD;&#xA;  '0xbb43c8F298ddB8094529b9708C53b732B3eDbB6a': '0xe29c88efb88f2055544f504941202620544620414c504841',&#xD;&#xA;  '0xbD8027E8463843911Ed5503f339C992E728BD471': 'Moonbean',&#xD;&#xA;  '0xC26694a78039548b9AeE363b1e12dEb0F98f44Dc': 'Bware Labs',&#xD;&#xA;  '0xC38bCF2eed198E072a92E66435Dd1157364C3e7c': 'BerryStake',&#xD;&#xA;  '0xc54f704CeC71381097341B213939c73a63af1b6e': 'Moon Landing',&#xD;&#xA;  '0xCA98D4378393040408100f490bF98b03F5E7DeB7': '0xf09fa78a2049636562657267204e6f64657320f09fa78a',&#xD;&#xA;  '0xCb4B3bf2D527f42368C0b4e17Aa894E348Fc1806': 'Sio34',&#xD;&#xA;  '0xD3dfa1Fc4e5BB0a268cE149F6c5c2dEc5a4083Ce': 'Simply Staking 04',&#xD;&#xA;  '0xd53f505dD7C6775b86C98998D4ff18EbBbe0c430': '0x4d41582041495244524f50f09f9a8036303030474c4d52204749564541574159',&#xD;&#xA;  '0xD7d1E0593c437aBf982e297aF27e42ABffc072B4': 'Mission Control - Polka Haus',&#xD;&#xA;  '0xd9FFaB42F9a2De10C2c920eB8D333e01CD5FB4a6': 'TrueStaking',&#xD;&#xA;  '0xdD760A8f8ce5E4B5f9Ff436EE7790c603D6294d0': 'Hetavalidation',&#xD;&#xA;  '0xe22d73F5dcCCb31a994Ad4E7AD265Cf69B4E725A': 'PureStake-02',&#xD;&#xA;  '0xE596665a52D9Bb37865b3a9264fFE038Be08F28d': '255 DAO 01 | 2555 GLMR GIVEAWAY',&#xD;&#xA;  '0xe751B9EA560A200161d1B70249495E3d22Ec5b00': 'Foundation-03',&#xD;&#xA;  '0xeA9Bf34D0294e1008C0D22F59e095Eae63a53155': 'DeYure',&#xD;&#xA;  '0xeCca07badBd38937122B82ec8AfCf86b1E2b7939': 'TECH NINJA',&#xD;&#xA;  '0xF02ddb48EdA520C915c0dABADC70BA12D1b49ad2': 'Foundation-04',&#xD;&#xA;  '0xf5fE1e0f92A2d7a8e0d848E8327e24fFfD2718a3': 'PureStake-01',&#xD;&#xA;  '0xFBB4f5E6649bF46177728F6aEA048EfEE640a706': undefined,&#xD;&#xA;  '0xFc1084962DE75E1480bbbb5a0909fE8e1498977d': 'ALFASTAKE'&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The result may change as time passes. You should rerun the snippet in order to get the latest result.&#xD;&#xA;&#xD;&#xA;Answering the second part of the question. The polkadot.js library has many undocumented parts. However you can always manually inspect the api's metadata and see a list of all methods along with their descriptions. Another tip is to use the node.js repl when you are exploring an unfamiliar library. For polkadot.js there's a specific tool made for that purpose called [SubShell](https://subshell.xyz). " ContentLicense="CC BY-SA 4.0" />
  <row Id="12444" PostHistoryTypeId="2" PostId="3321" RevisionGUID="d55cd929-74c4-4703-9908-eb64696dcec3" CreationDate="2022-06-17T18:30:45.553" UserId="28" Text="As far as I know, it is not really possible since parachains are entirely sovereign systems.&#xD;&#xA;&#xD;&#xA;You should not think of XCM messages the same as internal chain transactions since they are asynchronous and between two different blockchains." ContentLicense="CC BY-SA 4.0" />
  <row Id="12446" PostHistoryTypeId="2" PostId="3322" RevisionGUID="8cc6f805-ec02-49df-bc15-8ac73e09d528" CreationDate="2022-06-17T18:54:04.210" UserId="29" Text="The ink! docs state:&#xD;&#xA;&gt; In general, you should think twice if you really need String. Smart contracts usually don't use strings; those are typically used for user interactions and should live in your UI and not on the chain.&#xD;&#xA;&#xD;&#xA;You could use the @polkadot/api-contract and do the following:&#xD;&#xA;```js&#xD;&#xA;const wsContractsProvider = new WsProvider('ws://localhost:9944');&#xD;&#xA;const contractsApi = await ApiPromise.create({ provider: wsContractsProvider });&#xD;&#xA;const address = &quot;5EYtidretW1FmUjA6hisdq1AZ2GfsDUanDtSEuLghGzvdWau&quot;;&#xD;&#xA;const contract = new ContractPromise(contractsApi, abi, address);&#xD;&#xA;&#xD;&#xA;const value = 0; // only useful on isPayable messages&#xD;&#xA;const gasLimit = -1;&#xD;&#xA;const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;const alicePair = keyring.createFromUri(&quot;//Alice&quot;);&#xD;&#xA;&#xD;&#xA;const value1 = 54;&#xD;&#xA;const value2 = 88;&#xD;&#xA;&#xD;&#xA;await contract.query.processSomething(alicePair.address, { value, gasLimit }, value1, value2);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this case `processSomething` is an ink! message...:&#xD;&#xA;```rs&#xD;&#xA;/// Do some processing...&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn process_something(&amp;self, first: u32, second: u32) {&#xD;&#xA;    ink_env::debug_println!(&quot;Do some processing... {}, {}&quot;, first, second);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12448" PostHistoryTypeId="2" PostId="3323" RevisionGUID="5884684f-e9a5-4b83-9c6e-bb355819844e" CreationDate="2022-06-17T19:25:30.770" UserId="29" Text="It is not that simple as ink! is an embedded Domain Specific Language (eDSL). Also note that ink! works in a `no_std` environment so not everything that is `std` is compatible. You can find the available ink! data structures in the [ink_prelude](https://github.com/paritytech/ink/blob/master/crates/prelude/src/lib.rs) and in the [ink_prelude docs](https://docs.rs/ink_prelude/latest/ink_prelude/index.html) it clearly states: &#xD;&#xA;&gt; These definitions are useful since we are operating in a no_std environment and should be used by all ink! crates instead of directly using std or alloc crates. **If needed we shall instead enhance the exposed types here.**&#xD;&#xA;&#xD;&#xA;So if you do see a use case for `Bytes` in ink! you can create an issue or PR in their repo to extend the ink! eDSL.&#xD;&#xA;&#xD;&#xA;Also note that you can use vectors to store UTF-8 bytes: &#xD;&#xA;- https://docs.rs/ink_prelude/latest/ink_prelude/vec/index.html&#xD;&#xA;```rs&#xD;&#xA;data: Vec&lt;u8&gt;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12454" PostHistoryTypeId="2" PostId="3325" RevisionGUID="16a453b4-397d-4d71-87d6-5e4f5acf2267" CreationDate="2022-06-17T19:45:58.857" UserId="549" Text="We were able to figure this out by using the `serde_json_core` library. An example can be seen here [subgraph-nouns Fat Contract](https://github.com/HashWarlock/phat-contract-examples/tree/master/examples/subgraph-nouns).&#xD;&#xA;&#xD;&#xA;In this example, we make an HTTPS requests to Subgraph Endpoint for NounsDAO and retrieve the current data on the top bid of a NounsDAO auction. Here is the HTTPS POST request using `curl`&#xD;&#xA;```&#xD;&#xA;curl -X POST 'https://api.thegraph.com/subgraphs/name/nounsdao/nouns-subgraph' --data '{&quot;query&quot;:&quot;query MyQuery {\n  auctions(orderBy: endTime, orderDirection: desc, first: 1) {\n    amount\n    id\n  settled\n}\n}\n&quot;,&quot;variables&quot;:null,&quot;operationName&quot;:&quot;MyQuery&quot;}'&#xD;&#xA;```&#xD;&#xA;This then will return a result response with body data like this:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;	&quot;data&quot;: {&#xD;&#xA;		&quot;auctions&quot;: [{&#xD;&#xA;		    &quot;amount&quot;: &quot;81600000000000000000&quot;,&#xD;&#xA;		    &quot;id&quot;: &quot;335&quot;,&#xD;&#xA;		    &quot;settled&quot;: false&#xD;&#xA;		}]&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Next, we take this body of data and parse it into the following structs:&#xD;&#xA;```&#xD;&#xA;#[derive(Deserialize, Debug)]&#xD;&#xA;pub struct Data&lt;'a&gt; {&#xD;&#xA;    #[serde(borrow)]&#xD;&#xA;    data: DataInfo&lt;'a&gt;,&#xD;&#xA;}&#xD;&#xA;#[derive(Deserialize, Debug)]&#xD;&#xA;#[serde(bound(deserialize = &quot;alloc::vec::Vec&lt;NounsInfo&lt;'a&gt;&gt;: Deserialize&lt;'de&gt;&quot;))]&#xD;&#xA;pub struct DataInfo&lt;'a&gt; {&#xD;&#xA;    #[serde(borrow)]&#xD;&#xA;    auctions: Vec&lt;NounsInfo&lt;'a&gt;&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(Deserialize, Encode, Clone, Debug, PartialEq)]&#xD;&#xA;pub struct NounsInfo&lt;'a&gt; {&#xD;&#xA;    id: &amp;'a str,&#xD;&#xA;    amount: &amp;'a str,&#xD;&#xA;    settled: bool,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is shown in this snippet of code where we use the `serde_json_core::from_slice(&amp;body)` to parse the data into the `Data&lt;'a&gt;` struct.&#xD;&#xA;```&#xD;&#xA;// Get the latest nouns info through http_post&#xD;&#xA;let response = http_post!(NOUNS_HTTP_ENDPOINT, HTTP_POST_DATA.as_bytes().to_vec());&#xD;&#xA;if response.status_code != 200 {&#xD;&#xA;    return Err(Error::RequestFailed);&#xD;&#xA;}&#xD;&#xA;let body = response.body;&#xD;&#xA;// Extract Nouns Info&#xD;&#xA;let (data, _): (Data, usize) =&#xD;&#xA;    serde_json_core::from_slice(&amp;body).or(Err(Error::InvalidBody))?;&#xD;&#xA;let nouns_info = data.data.auctions[0].clone();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you want to see the boilerplate frontend demoing this functionality, you can check out this little video I created [Fat Contracts Cross-Chain Use Case][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://www.youtube.com/watch?v=THeM8E-3lec" ContentLicense="CC BY-SA 4.0" />
  <row Id="12459" PostHistoryTypeId="2" PostId="3327" RevisionGUID="501d3baa-e165-4138-9a2d-147f3cc3160c" CreationDate="2022-06-17T21:09:08.843" UserId="549" Text="Phala Network has a design for Fat Contracts called the SideVM (requires deploying local testnet to use for now). You can check out some examples here [Fat Contract Examples][1]. We also enable HTTPS requests from our Secure Off-Chain Workers so there are many use cases to build.&#xD;&#xA;&#xD;&#xA;If you’d like to build on our platform please reach out and I can get you in contact with core team to go into deeper detail on the SideVM implementation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Phala-Network/fat-contract-examples" ContentLicense="CC BY-SA 4.0" />
  <row Id="12461" PostHistoryTypeId="2" PostId="3328" RevisionGUID="22bbf46d-bb42-43d7-8ae9-fb4de6725bed" CreationDate="2022-06-17T21:39:43.430" UserId="29" Text="You could have something like this..&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub struct PostBox {&#xD;&#xA;    open_time: Timestamp,&#xD;&#xA;    close_time: Timestamp,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl PostBox {&#xD;&#xA;    #[ink(constructor)]&#xD;&#xA;    pub fn new() -&gt; Self {&#xD;&#xA;        Self { &#xD;&#xA;            open_time: Self::env().block_timestamp(),&#xD;&#xA;            close_time: Self::env().block_timestamp()&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;/// get open_time&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn get_open_time(&amp;self) -&gt; Timestamp {&#xD;&#xA;    self.open_time&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// get close_time&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn get_close_time(&amp;self) -&gt; Timestamp {&#xD;&#xA;    self.close_time&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// add 7 days to close_time&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn add_seven_days(&amp;mut self) -&gt; Timestamp {&#xD;&#xA;    // https://www.unixtimestamp.com&#xD;&#xA;    // 7 days = 604800000 in Unix time&#xD;&#xA;    let day = 86400000;&#xD;&#xA;    let week = day * 7;&#xD;&#xA;    self.close_time = self.close_time + week;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12464" PostHistoryTypeId="4" PostId="3314" RevisionGUID="43e5f96c-7778-4a7e-ac69-73c1104a6574" CreationDate="2022-06-17T23:36:48.130" UserId="34" Comment="edited title" Text="Can XCM demand roll back of another chain's state if it fails?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12465" PostHistoryTypeId="6" PostId="3302" RevisionGUID="166ab180-5d1d-4bdf-a284-1031c58d275a" CreationDate="2022-06-18T02:35:27.397" UserId="29" Comment="edited tags" Text="|substrate-node|pallet|weight|benchmarking|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12467" PostHistoryTypeId="2" PostId="3329" RevisionGUID="4f70f529-b305-4c18-9240-816cd70418f2" CreationDate="2022-06-18T07:11:49.043" UserId="85" Text="While you could not force a rollback, you could do an xcm callback:&#xD;&#xA;&#xD;&#xA; 1. Commit to doing something in parachain A (but not actually do it yet - maybe transfer things to a holding account), &#xD;&#xA; 1. Send the xcm message to to parachain B with a parameter of an xcm message to send on success.&#xD;&#xA; 1. When you receive the success message you could complete the action in parachain A.&#xD;&#xA;&#xD;&#xA;*At each step of the way you know that you will get rolled back if your input message gets rolled back.*&#xD;&#xA;&#xD;&#xA;One of the cute features here is that parachain B does not necessarily need to know anything about the success xcm message that it is sending." ContentLicense="CC BY-SA 4.0" />
  <row Id="12469" PostHistoryTypeId="2" PostId="3330" RevisionGUID="4c3c7a97-43a3-49f8-be51-268200ffd469" CreationDate="2022-06-18T07:48:21.017" UserId="167" Text="You can send XCMs via the [`xcm-pallet`](https://paritytech.github.io/polkadot/pallet_xcm/pallet/enum.Call.html) interface, using both polkadot.js apps and api, in the same was as you would send any other transaction." ContentLicense="CC BY-SA 4.0" />
  <row Id="12471" PostHistoryTypeId="2" PostId="3331" RevisionGUID="51822f53-8203-4036-a9ac-473629175382" CreationDate="2022-06-18T09:18:39.537" UserId="2551" Text="# Background&#xD;&#xA;&#xD;&#xA;I have two contracts A and B, I can do cross-contract call from A to B, or from B to A. But it failed when I try to do cross-contract call like this: A -&gt; B -&gt; A.&#xD;&#xA;&#xD;&#xA;# Test code&#xD;&#xA;&#xD;&#xA;I developed a contract for test, repo is https://github.com/hthuang996/test/tree/main/ink/flipper.&#xD;&#xA;There are four methods.&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn send_message(&amp;mut self, addr1: AccountId, addr2: AccountId, m: u8) {&#xD;&#xA;            ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(&#xD;&#xA;                    ink_env::call::Call::new()&#xD;&#xA;                        .callee(addr1)&#xD;&#xA;                        .gas_limit(0)&#xD;&#xA;                        .transferred_value(0))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    // call receive_message&#xD;&#xA;                    ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0x3a, 0x6e, 0x96, 0x96]))&#xD;&#xA;                    .push_arg(addr2)&#xD;&#xA;                    .push_arg(m)&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;()&gt;()&#xD;&#xA;                .fire().&#xD;&#xA;                unwrap();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn receive_message(&amp;mut self, addr: AccountId, i: u8) {&#xD;&#xA;            self.message = i;&#xD;&#xA;            ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(&#xD;&#xA;                    ink_env::call::Call::new()&#xD;&#xA;                        .callee(addr)&#xD;&#xA;                        .gas_limit(0)&#xD;&#xA;                        .transferred_value(0))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    // call receive_message2&#xD;&#xA;                    ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0x03, 0x0e, 0x11, 0xd0]))&#xD;&#xA;                    .push_arg(i)&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;()&gt;()&#xD;&#xA;                .fire().&#xD;&#xA;                unwrap();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn receive_message2(&amp;mut self, i: u8) {&#xD;&#xA;            self.message = i;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_message(&amp; self) -&gt; u8 {&#xD;&#xA;            self.message&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# Test step&#xD;&#xA;&#xD;&#xA;Here I use **substrate-contracts-node**.&#xD;&#xA;&#xD;&#xA;## Step 1&#xD;&#xA;Build the contract.&#xD;&#xA;&#xD;&#xA;## Step 2&#xD;&#xA;Deploy three contracts named A, B, C with the same wasm file.&#xD;&#xA;&#xD;&#xA;## Step 3&#xD;&#xA;Call `send_message` of A, params are `B, A, 8`.&#xD;&#xA;&#xD;&#xA;## Result&#xD;&#xA;The transaction failed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But If I change 3 as shown below:  &#xD;&#xA;Call `send_message` of A, params are `B, C, 8`.&#xD;&#xA;&#xD;&#xA;The transaction was successful, and `get_message` of B, C were both `8`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Question&#xD;&#xA;&#xD;&#xA;Is there any error in my code, or the circular call between multi contracts is impossible in ink!?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12473" PostHistoryTypeId="1" PostId="3331" RevisionGUID="51822f53-8203-4036-a9ac-473629175382" CreationDate="2022-06-18T09:18:39.537" UserId="2551" Text="Is circular call between multi contracts possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12474" PostHistoryTypeId="3" PostId="3331" RevisionGUID="51822f53-8203-4036-a9ac-473629175382" CreationDate="2022-06-18T09:18:39.537" UserId="2551" Text="|ink|blockchaincross-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12475" PostHistoryTypeId="2" PostId="3332" RevisionGUID="51196170-56fc-4142-bf38-110057445b0d" CreationDate="2022-06-18T11:37:31.273" UserId="16" Text="What you call &quot;circular&quot; is usually called &quot;reentrant&quot;: The control flow enters `A` a second time in the same call stack. This is disallowed by default for [security reasons][1]. In order to make your code work you need to explicitly allow it:&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn send_message(&amp;mut self, addr1: AccountId, addr2: AccountId, m: u8) {&#xD;&#xA;	ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;		.call_type(&#xD;&#xA;			ink_env::call::Call::new()&#xD;&#xA;				.callee(addr1)&#xD;&#xA;				.gas_limit(0)&#xD;&#xA;				.transferred_value(0))&#xD;&#xA;		.exec_input(&#xD;&#xA;			// call receive_message&#xD;&#xA;			ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0x3a, 0x6e, 0x96, 0x96]))&#xD;&#xA;			.push_arg(addr2)&#xD;&#xA;			.push_arg(m)&#xD;&#xA;		)&#xD;&#xA;		.call_flags(CallFlags::default().set_allow_reentry(true))&#xD;&#xA;		.returns::&lt;()&gt;()&#xD;&#xA;		.fire().&#xD;&#xA;		unwrap();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://medium.com/coinmonks/protect-your-solidity-smart-contracts-from-reentrancy-attacks-9972c3af7c21" ContentLicense="CC BY-SA 4.0" />
  <row Id="12477" PostHistoryTypeId="5" PostId="3331" RevisionGUID="4c6a9d47-32e0-4c1b-8f4d-f4188873b208" CreationDate="2022-06-18T11:38:45.100" UserId="16" Comment="fix code block" Text="# Background&#xD;&#xA;&#xD;&#xA;I have two contracts A and B, I can do cross-contract call from A to B, or from B to A. But it failed when I try to do cross-contract call like this: A -&gt; B -&gt; A.&#xD;&#xA;&#xD;&#xA;# Test code&#xD;&#xA;&#xD;&#xA;I developed a contract for test, repo is https://github.com/hthuang996/test/tree/main/ink/flipper.&#xD;&#xA;There are four methods.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn send_message(&amp;mut self, addr1: AccountId, addr2: AccountId, m: u8) {&#xD;&#xA;	ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;		.call_type(&#xD;&#xA;			ink_env::call::Call::new()&#xD;&#xA;				.callee(addr1)&#xD;&#xA;				.gas_limit(0)&#xD;&#xA;				.transferred_value(0))&#xD;&#xA;		.exec_input(&#xD;&#xA;			// call receive_message&#xD;&#xA;			ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0x3a, 0x6e, 0x96, 0x96]))&#xD;&#xA;			.push_arg(addr2)&#xD;&#xA;			.push_arg(m)&#xD;&#xA;		)&#xD;&#xA;		.returns::&lt;()&gt;()&#xD;&#xA;		.fire().&#xD;&#xA;		unwrap();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn receive_message(&amp;mut self, addr: AccountId, i: u8) {&#xD;&#xA;	self.message = i;&#xD;&#xA;	ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;		.call_type(&#xD;&#xA;			ink_env::call::Call::new()&#xD;&#xA;				.callee(addr)&#xD;&#xA;				.gas_limit(0)&#xD;&#xA;				.transferred_value(0))&#xD;&#xA;		.exec_input(&#xD;&#xA;			// call receive_message2&#xD;&#xA;			ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0x03, 0x0e, 0x11, 0xd0]))&#xD;&#xA;			.push_arg(i)&#xD;&#xA;		)&#xD;&#xA;		.returns::&lt;()&gt;()&#xD;&#xA;		.fire().&#xD;&#xA;		unwrap();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn receive_message2(&amp;mut self, i: u8) {&#xD;&#xA;	self.message = i;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn get_message(&amp; self) -&gt; u8 {&#xD;&#xA;	self.message&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# Test step&#xD;&#xA;&#xD;&#xA;Here I use **substrate-contracts-node**.&#xD;&#xA;&#xD;&#xA;## Step 1&#xD;&#xA;Build the contract.&#xD;&#xA;&#xD;&#xA;## Step 2&#xD;&#xA;Deploy three contracts named A, B, C with the same wasm file.&#xD;&#xA;&#xD;&#xA;## Step 3&#xD;&#xA;Call `send_message` of A, params are `B, A, 8`.&#xD;&#xA;&#xD;&#xA;## Result&#xD;&#xA;The transaction failed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But If I change 3 as shown below:  &#xD;&#xA;Call `send_message` of A, params are `B, C, 8`.&#xD;&#xA;&#xD;&#xA;The transaction was successful, and `get_message` of B, C were both `8`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Question&#xD;&#xA;&#xD;&#xA;Is there any error in my code, or the circular call between multi contracts is impossible in ink!?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12478" PostHistoryTypeId="6" PostId="3331" RevisionGUID="4c6a9d47-32e0-4c1b-8f4d-f4188873b208" CreationDate="2022-06-18T11:38:45.100" UserId="16" Comment="fix code block" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12479" PostHistoryTypeId="33" PostId="3297" RevisionGUID="7c267594-c0cf-4483-8f76-29878f55f137" CreationDate="2022-06-18T16:41:44.027" UserId="555" Comment="9" />
  <row Id="12480" PostHistoryTypeId="2" PostId="3333" RevisionGUID="b606a372-373f-499e-adf7-879f03121d6f" CreationDate="2022-06-18T17:50:26.320" UserId="2408" Text="Is there a way to download presentation slides from Sub0 [2020](https://www.youtube.com/watch?v=MCJBPAZIAdQ&amp;list=PLp0_ueXY_enUZk1RuEAU9ly5h0wy5FuLs&amp;index=2) &amp; [2021](https://www.youtube.com/watch?v=Bp41Y_AHym4&amp;list=PLp0_ueXY_enX6S5sogeo7GHD1BXTLj5Xr)?  &#xD;&#xA;I would like to use them to present Substrate to my coworkers." ContentLicense="CC BY-SA 4.0" />
  <row Id="12482" PostHistoryTypeId="1" PostId="3333" RevisionGUID="b606a372-373f-499e-adf7-879f03121d6f" CreationDate="2022-06-18T17:50:26.320" UserId="2408" Text="Sub0 Presentation Slides" ContentLicense="CC BY-SA 4.0" />
  <row Id="12483" PostHistoryTypeId="3" PostId="3333" RevisionGUID="b606a372-373f-499e-adf7-879f03121d6f" CreationDate="2022-06-18T17:50:26.320" UserId="2408" Text="|general|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12484" PostHistoryTypeId="5" PostId="3297" RevisionGUID="048edfac-447a-4682-a0e5-743720ce5e1e" CreationDate="2022-06-18T21:31:26.157" UserId="83" Comment="fix spelling and grammar" Text="I have added parachain staking and moonbeam-orbiters of moonbeam in our project. When I test it, all the extrinsics are performing well except the staking part. I have gone through this https://docs.moonbeam.network/tokens/staking/stake/#staking-your-tokens&#xD;&#xA;Here, it is mentioned that &quot;**To access staking features, you need to import/create an Ethereum-style account first (H160 address),**&quot;&#xD;&#xA;Can we access staking features with a normal account? Like I have to perform the delegate extrinsics with a normal account, but it mentioned in the above tutorial that the staking tokens should be reflected in the reserve amount of the delegator account(**BOB**). But in my case the reserve amount remains 0.[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;However, if I check **delegatorState** in chainstate then I find this: [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;What should I do to perform staking features in our chain?&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/FrQ6r.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Gpmov.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12485" PostHistoryTypeId="2" PostId="3334" RevisionGUID="de325275-40c4-4c54-b6cb-4c99d19f8728" CreationDate="2022-06-19T00:14:52.700" UserId="28" Text="You can find &quot;Anatomy of a Substrate Node&quot; here:&#xD;&#xA;&#xD;&#xA;https://docs.google.com/presentation/d/1bOn6nsf60LGUwPnRz3zIac1eTPz4EOuX/edit?usp=sharing&amp;ouid=106359707660635712012&amp;rtpof=true&amp;sd=true" ContentLicense="CC BY-SA 4.0" />
  <row Id="12487" PostHistoryTypeId="2" PostId="3335" RevisionGUID="41c2e234-2e9c-428d-8997-6f6250f49236" CreationDate="2022-06-19T09:53:10.347" UserId="2417" Text="I found that if we use `call_flags(CallFlags::default().set_allow_reentry(true))` we can make our smart contract called as the cross contract call. The related code is as following:&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn receive_message(&amp;mut self, addr: AccountId, i: u32) {&#xD;&#xA;&#xD;&#xA;            ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(&#xD;&#xA;                    ink_env::call::Call::new()&#xD;&#xA;                        .callee(addr)&#xD;&#xA;                        .gas_limit(0)&#xD;&#xA;                        .transferred_value(0))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    // call `update_message` of contract `addr`&#xD;&#xA;                    ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0x03, 0x2a, 0x6f, 0x29]))&#xD;&#xA;                    .push_arg(i)&#xD;&#xA;                )&#xD;&#xA;                .call_flags(ink_env::CallFlags::default().set_allow_reentry(true))&#xD;&#xA;                .returns::&lt;()&gt;()&#xD;&#xA;                .fire().&#xD;&#xA;                unwrap();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn update_message(&amp;mut self, i: u32) {&#xD;&#xA;            Self::env().emit_event(EventRecv2{&#xD;&#xA;                triggered: true,&#xD;&#xA;            });&#xD;&#xA;            self.message = i;&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I call `receive_message` but the input parameter `addr` is just the same smart contract, that is, I use `set_allow_reentry(true)` to make my smart contract be able to call itself by a cross-contract call way. Of course this is meaningless, but maybe the same reason causes @george huang's problem.&#xD;&#xA;&#xD;&#xA;The result is the same as @george huang met, we cannot update the status of the smart contract in `update_message`.&#xD;&#xA;&#xD;&#xA;So is this a bug? Or should we make some special settings to solve this problem?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12489" PostHistoryTypeId="5" PostId="3335" RevisionGUID="73480140-1e81-47f4-b477-63bca95dd93d" CreationDate="2022-06-19T09:58:20.057" UserId="2417" Comment="added 79 characters in body" Text="I found that if we use `call_flags(CallFlags::default().set_allow_reentry(true))` we can make our smart contract be called in the way of cross contract call by itself. Of course this is meaningless, but maybe it's the same reason causes @george huang's problem. The related code is as following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn receive_message(&amp;mut self, addr: AccountId, i: u32) {&#xD;&#xA;&#xD;&#xA;            ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(&#xD;&#xA;                    ink_env::call::Call::new()&#xD;&#xA;                        .callee(addr)&#xD;&#xA;                        .gas_limit(0)&#xD;&#xA;                        .transferred_value(0))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    // call `update_message` of contract `addr`&#xD;&#xA;                    ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0x03, 0x2a, 0x6f, 0x29]))&#xD;&#xA;                    .push_arg(i)&#xD;&#xA;                )&#xD;&#xA;                .call_flags(ink_env::CallFlags::default().set_allow_reentry(true))&#xD;&#xA;                .returns::&lt;()&gt;()&#xD;&#xA;                .fire().&#xD;&#xA;                unwrap();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn update_message(&amp;mut self, i: u32) {&#xD;&#xA;            Self::env().emit_event(EventRecv2{&#xD;&#xA;                triggered: true,&#xD;&#xA;            });&#xD;&#xA;            self.message = i;&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I call `receive_message` but the input parameter `addr` is just the same smart contract, that is, I use `set_allow_reentry(true)` to make my smart contract be able to call itself in a cross-contract call way. &#xD;&#xA;&#xD;&#xA;The result is the same as @george huang met, we cannot update the status of the smart contract in `update_message`. I'm sure `update_message` is executed because the event `EventRecv2` is caught.&#xD;&#xA;&#xD;&#xA;So is this a bug? Or should we make some special settings to solve this problem?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12490" PostHistoryTypeId="2" PostId="3336" RevisionGUID="e620894e-32f7-42bb-a76e-33f191c8d331" CreationDate="2022-06-19T10:13:01.003" UserId="2417" Text="I found that if we use `call_flags(CallFlags::default().set_allow_reentry(true))` we can make our smart contract be called in the cross-contract-call way by itself. Of course this is meaningless, but maybe it's the same reason causes [@george huang's](https://substrate.stackexchange.com/questions/3331/is-circular-call-between-multi-contracts-possible) problem. &#xD;&#xA;&#xD;&#xA;The problem is that we cannot update the status of the reentry smart contract.&#xD;&#xA;&#xD;&#xA;The related code is as following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn receive_message(&amp;mut self, addr: AccountId, i: u32) {&#xD;&#xA;&#xD;&#xA;            ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(&#xD;&#xA;                    ink_env::call::Call::new()&#xD;&#xA;                        .callee(addr)&#xD;&#xA;                        .gas_limit(0)&#xD;&#xA;                        .transferred_value(0))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    // call `update_message` of contract `addr`&#xD;&#xA;                    ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0x03, 0x2a, 0x6f, 0x29]))&#xD;&#xA;                    .push_arg(i)&#xD;&#xA;                )&#xD;&#xA;                .call_flags(ink_env::CallFlags::default().set_allow_reentry(true))&#xD;&#xA;                .returns::&lt;()&gt;()&#xD;&#xA;                .fire().&#xD;&#xA;                unwrap();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn update_message(&amp;mut self, i: u32) {&#xD;&#xA;            Self::env().emit_event(EventRecv2{&#xD;&#xA;                triggered: true,&#xD;&#xA;            });&#xD;&#xA;            self.message = i;&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I call `receive_message` but the input parameter `addr` is just the same smart contract, that is, I use `set_allow_reentry(true)` to make my smart contract be able to call itself in a cross-contract call way. &#xD;&#xA;&#xD;&#xA;The result is the same as [@george huang](https://substrate.stackexchange.com/questions/3331/is-circular-call-between-multi-contracts-possible) met, we cannot update the status of the smart contract in `update_message`. I'm sure `update_message` is executed because the event `EventRecv2` is caught.&#xD;&#xA;&#xD;&#xA;So is this a bug? Or should we make some special settings to solve this problem?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12492" PostHistoryTypeId="1" PostId="3336" RevisionGUID="e620894e-32f7-42bb-a76e-33f191c8d331" CreationDate="2022-06-19T10:13:01.003" UserId="2417" Text="I found `set_allow_reentry` may have some problems" ContentLicense="CC BY-SA 4.0" />
  <row Id="12493" PostHistoryTypeId="3" PostId="3336" RevisionGUID="e620894e-32f7-42bb-a76e-33f191c8d331" CreationDate="2022-06-19T10:13:01.003" UserId="2417" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12494" PostHistoryTypeId="2" PostId="3337" RevisionGUID="c73e4cf4-3b35-4937-981b-a585fad20cc3" CreationDate="2022-06-19T10:48:50.800" UserId="2319" Text="Add Scheduler pallet&#xD;&#xA;&#xD;&#xA;1- Clone the repo &#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;&#xD;&#xA;2- cd substrate-node-template&#xD;&#xA;3- cargo build --release&#xD;&#xA;&#xD;&#xA;4- Add scheduler-pallet &#xD;&#xA;Add this line in runtime cargo.toml&#xD;&#xA;&#xD;&#xA;pallet-scheduler = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;&#xD;&#xA;'pallet-scheduler/std',&#xD;&#xA;&#xD;&#xA;5- Check that the new dependencies resolve correctly by running the following command:&#xD;&#xA;&#xD;&#xA;cargo check -p node-template-runtime&#xD;&#xA;6- error show below&#xD;&#xA;&#xD;&#xA;impl pallet_scheduler::Config for Runtime {}&#xD;&#xA;      |      ^^^^^^^^^^^^^^^^^^^^^^^^ the trait frame_system::pallet::Config is not implemented for Runtime&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12496" PostHistoryTypeId="1" PostId="3337" RevisionGUID="c73e4cf4-3b35-4937-981b-a585fad20cc3" CreationDate="2022-06-19T10:48:50.800" UserId="2319" Text="Add scheduler pallet in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="12497" PostHistoryTypeId="3" PostId="3337" RevisionGUID="c73e4cf4-3b35-4937-981b-a585fad20cc3" CreationDate="2022-06-19T10:48:50.800" UserId="2319" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12498" PostHistoryTypeId="5" PostId="3290" RevisionGUID="060e71e5-b8bb-42d3-bb34-0502cdcdb95e" CreationDate="2022-06-19T12:34:02.897" UserId="83" Comment="Grammar" Text="I have set up a PoA parachain network with predefined 2 authorities which are assigned to the two collators joining the network. So far I've figured out how to manually update the chain-spec collatorSelection section to add new collator keys, however, this requires network reset.&#xD;&#xA;&#xD;&#xA;I've been trying to use &quot;sudo&quot; from the PolkadotJS app to add new collator keys, but I keep receiving error error: collatorSelection.ValidatorNotRegistered when performing sudo &gt; collatorSelection &gt; setInvulnerables  -- also received the same error when executing registerAsCandidate extrinsic for the target collator account.&#xD;&#xA;&#xD;&#xA;So far I didn't find an explicit document that explains the above, any help here would be highly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="12499" PostHistoryTypeId="5" PostId="3297" RevisionGUID="df9b7bdd-7f35-4ba8-8a03-bcf7d63c65e0" CreationDate="2022-06-19T12:51:22.520" UserId="555" Comment="deleted 203 characters in body" Text="I have added parachain staking and moonbeam-orbiters of moonbeam in our project. When I test it, all the extrinsics are performing well except the staking part. I have gone through this https://docs.moonbeam.network/tokens/staking/stake/#staking-your-tokens&#xD;&#xA;Here, it is mentioned that &quot;**To access staking features, you need to import/create an Ethereum-style account first (H160 address),**&quot;&#xD;&#xA;Can we access staking features with a normal account? Like If I perform delegate extrinsics with a normal account, staking tokens reflected in the reserve amount of the delegator account(**EVE**)(As mentioned in above tutorial). But in my case the Eve account is not getting any reward.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;What should I do to get reward ?&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OyCvc.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12500" PostHistoryTypeId="2" PostId="3338" RevisionGUID="e3ba353c-0b1d-4d67-a865-8740ad4f4d37" CreationDate="2022-06-19T14:11:09.627" UserId="2748" Text="I have added Moonbeam parachain staking in our code.Can anyone please provide the full step to test it. I'm following this tutorial: https://docs.moonbeam.network/tokens/staking/stake/#staking-your-tokens for testing, But I'm not getting any rewards, but all other extrinsics are doing well.&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="12502" PostHistoryTypeId="1" PostId="3338" RevisionGUID="e3ba353c-0b1d-4d67-a865-8740ad4f4d37" CreationDate="2022-06-19T14:11:09.627" UserId="2748" Text="Testing Moonbeam parachain staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="12503" PostHistoryTypeId="3" PostId="3338" RevisionGUID="e3ba353c-0b1d-4d67-a865-8740ad4f4d37" CreationDate="2022-06-19T14:11:09.627" UserId="2748" Text="|parachain|staking|parachain-collator|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12504" PostHistoryTypeId="5" PostId="3337" RevisionGUID="57d5d747-f573-4d43-a76f-303379571935" CreationDate="2022-06-19T17:10:03.247" UserId="28" Comment="added 135 characters in body" Text="I am running into issues adding the scheduler pallet to my Substrate chain. Here are the steps I followed:&#xD;&#xA;&#xD;&#xA;1. Clone the repo&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. cd substrate-node-template&#xD;&#xA;3. cargo build --release&#xD;&#xA;&#xD;&#xA;4. Add scheduler-pallet &#xD;&#xA;Add this line in runtime cargo.toml&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;pallet-scheduler = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;&#xD;&#xA;'pallet-scheduler/std',&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;5. Check that the new dependencies resolve correctly by running the following command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo check -p node-template-runtime&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;6. error show below&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_scheduler::Config for Runtime {}&#xD;&#xA;      |      ^^^^^^^^^^^^^^^^^^^^^^^^ the trait frame_system::pallet::Config is not implemented for Runtime&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12505" PostHistoryTypeId="2" PostId="3339" RevisionGUID="d25136c8-fc7b-495d-8489-55e014608c4e" CreationDate="2022-06-19T17:12:19.050" UserId="28" Text="The error is saying you have not implemented the `frame_system::Config` for your runtime. So you are missing some code block like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;	type BaseCallFilter = Everything;&#xD;&#xA;	type BlockWeights = RuntimeBlockWeights;&#xD;&#xA;	type BlockLength = RuntimeBlockLength;&#xD;&#xA;	type DbWeight = RocksDbWeight;&#xD;&#xA;	type Origin = Origin;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type Index = Index;&#xD;&#xA;	type BlockNumber = BlockNumber;&#xD;&#xA;	type Hash = Hash;&#xD;&#xA;	type Hashing = BlakeTwo256;&#xD;&#xA;	type AccountId = AccountId;&#xD;&#xA;	type Lookup = Indices;&#xD;&#xA;	type Header = generic::Header&lt;BlockNumber, BlakeTwo256&gt;;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type BlockHashCount = BlockHashCount;&#xD;&#xA;	type Version = Version;&#xD;&#xA;	type PalletInfo = PalletInfo;&#xD;&#xA;	type AccountData = pallet_balances::AccountData&lt;Balance&gt;;&#xD;&#xA;	type OnNewAccount = ();&#xD;&#xA;	type OnKilledAccount = ();&#xD;&#xA;	type SystemWeightInfo = frame_system::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;	type SS58Prefix = ConstU16&lt;42&gt;;&#xD;&#xA;	type OnSetCode = ();&#xD;&#xA;	type MaxConsumers = ConstU32&lt;16&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L203&#xD;&#xA;&#xD;&#xA;Also your `pallet_scheduler::Config` looks empty when it should be something like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_scheduler::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Origin = Origin;&#xD;&#xA;	type PalletsOrigin = OriginCaller;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type MaximumWeight = MaximumSchedulerWeight;&#xD;&#xA;	type ScheduleOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type MaxScheduledPerBlock = ConstU32&lt;50&gt;;&#xD;&#xA;	type WeightInfo = pallet_scheduler::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;	type OriginPrivilegeCmp = EqualPrivilegeOnly;&#xD;&#xA;	type PreimageProvider = Preimage;&#xD;&#xA;	type NoPreimagePostponement = NoPreimagePostponement;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;End of the day, you have not followed all the correct steps to add a pallet to your runtime, and I suggest you look at the code inside the included Substrate node." ContentLicense="CC BY-SA 4.0" />
  <row Id="12507" PostHistoryTypeId="6" PostId="3337" RevisionGUID="0345f625-2a8b-4e83-bd60-1679f45b6b55" CreationDate="2022-06-19T17:14:00.860" UserId="28" Comment="edited tags" Text="|pallet|config|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12508" PostHistoryTypeId="2" PostId="3340" RevisionGUID="00eafe51-548d-44ae-82bc-0329afd24e43" CreationDate="2022-06-19T18:31:32.987" UserId="2759" Text="Without knowing much about the setup, this is how Delegator **Eve** ends up getting a reward, when a candidate **Alice** creates a block:&#xD;&#xA;&#xD;&#xA;To receive a reward, the following parameters are important:&#xD;&#xA;`defaultBlocksPerRound` (default 600) and `rewardPaymentDelay` (default 2). &#xD;&#xA;&#xD;&#xA;Using the above values, a single round goes on for `600` blocks, where **Alice** may create N (of total) number of blocks and gets points awarded for it accordingly. The storage items `round` and `points` can be used to observe the current round, and the total points that are rewarded currently to all candidates.&#xD;&#xA;&#xD;&#xA;Once a round is complete, `rewardPaymentDelay` comes into play, so **Eve** will be awarded after `2` rounds, i.e. after `1200` (2 * 600) blocks once the current round has ended. The reward will only be awarded to the candidate and their delegators that are present in the `topDelegations` storage item." ContentLicense="CC BY-SA 4.0" />
  <row Id="12510" PostHistoryTypeId="5" PostId="3297" RevisionGUID="e2e22ff4-9bda-460b-993d-dd917a65621b" CreationDate="2022-06-19T19:57:56.080" UserId="555" Comment="added 107 characters in body" Text="I have added parachain staking and moonbeam-orbiters of moonbeam in our project. When I test it, all the extrinsics are performing well except the staking part. I have gone through this https://docs.moonbeam.network/tokens/staking/stake/#staking-your-tokens&#xD;&#xA;Here, it is mentioned that &quot;**To access staking features, you need to import/create an Ethereum-style account first (H160 address),**&quot;&#xD;&#xA;Can we access staking features with a normal account? Like If I perform delegate extrinsics with a normal account, staking tokens reflected in the reserve amount of the delegator account(**EVE**)(As mentioned in above tutorial). But in my case the Eve account is not getting any reward.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Some Setup details: [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;What should I do to get reward ?&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OyCvc.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Rf4on.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12511" PostHistoryTypeId="5" PostId="3297" RevisionGUID="1d51590a-c063-42af-a314-8cb40acf585e" CreationDate="2022-06-19T20:17:41.050" UserId="555" Comment="added 275 characters in body" Text="I have added parachain staking and moonbeam-orbiters of moonbeam in our project. When I test it, all the extrinsics are performing well except the staking part. I have gone through this https://docs.moonbeam.network/tokens/staking/stake/#staking-your-tokens&#xD;&#xA;Here, it is mentioned that &quot;**To access staking features, you need to import/create an Ethereum-style account first (H160 address),**&quot;&#xD;&#xA;Can we access staking features with a normal account? Like If I perform delegate extrinsics with a normal account, staking tokens reflected in the reserve amount of the delegator account(**EVE**)(As mentioned in above tutorial). But in my case the Eve account is not getting any reward.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Some Setup details: 1. [![enter image description here][2]][2]&#xD;&#xA;2. [![enter image description here][3]][3]&#xD;&#xA;3. [![enter image description here][4]][4]&#xD;&#xA;------&#xD;&#xA;4. [![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;What should I do to get reward ?&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OyCvc.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Rf4on.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/5aoO9.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/yUDFX.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/NOQB1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12512" PostHistoryTypeId="12" PostId="3338" RevisionGUID="123378df-77e4-4e0e-be67-f6abdd5dcc7a" CreationDate="2022-06-19T20:31:48.520" UserId="2748" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2748,&quot;DisplayName&quot;:&quot;Vitthal agarwal&quot;}]}" />
  <row Id="12513" PostHistoryTypeId="13" PostId="3338" RevisionGUID="2f339d43-7245-4fb2-9741-3045073760df" CreationDate="2022-06-19T20:36:59.917" UserId="2748" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2748,&quot;DisplayName&quot;:&quot;Vitthal agarwal&quot;}]}" />
  <row Id="12514" PostHistoryTypeId="2" PostId="3341" RevisionGUID="333c07b9-407f-41f6-89d6-c4deb8dfaf5c" CreationDate="2022-06-19T20:50:44.047" UserId="2408" Text="I had a _fully functioning_ node that was built about 4 day ago and I was using it. Today I've decided to _rebuild_ it with `cargo build -r` and for some reason if failed to build with absolutely weird error message saying:&#xD;&#xA;```&#xD;&#xA;   Compiling libp2p-floodsub v0.31.0&#xD;&#xA;   Compiling libp2p-relay v0.4.0&#xD;&#xA;   Compiling libp2p-rendezvous v0.1.0&#xD;&#xA;   Compiling libp2p-noise v0.33.0&#xD;&#xA;   Compiling soketto v0.7.1&#xD;&#xA;   Compiling sc-network v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea)&#xD;&#xA;   Compiling librocksdb-sys v0.6.1+6.28.2&#xD;&#xA;   Compiling multihash v0.14.0&#xD;&#xA;error[E0603]: module `group` is private&#xD;&#xA;   --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/174735e/frame/support/procedural/tools/src/syn_ext.rs:50:53&#xD;&#xA;    |&#xD;&#xA;50  |                 let syn::group::$name { token, content } = syn::group::$parse(input)?;&#xD;&#xA;    |                                                                 ^^^^^ private module&#xD;&#xA;    |&#xD;&#xA;note: the module `group` is defined here&#xD;&#xA;   --&gt; /home/creestl/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.98/src/lib.rs:304:1&#xD;&#xA;    |&#xD;&#xA;304 | mod group;&#xD;&#xA;    | ^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0603]: module `group` is private&#xD;&#xA;   --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/174735e/frame/support/procedural/tools/src/syn_ext.rs:50:14&#xD;&#xA;    |&#xD;&#xA;50  |                 let syn::group::$name { token, content } = syn::group::$parse(input)?;&#xD;&#xA;    |                          ^^^^^ private module&#xD;&#xA;    |&#xD;&#xA;note: the module `group` is defined here&#xD;&#xA;   --&gt; /home/creestl/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.98/src/lib.rs:304:1&#xD;&#xA;    |&#xD;&#xA;304 | mod group;&#xD;&#xA;    | ^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0603`.&#xD;&#xA;error: could not compile `frame-support-procedural-tools` due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Once again, I __did not__ modify anything in the code. I did not update cargo or rustup.  &#xD;&#xA;I've tried building on the other computer and the result is the same.  &#xD;&#xA;I've tried to checkout one of the previous commits that was 100% working and the build failed again&#xD;&#xA;Also I'm explicitly specifying `branch = &quot;polkadot-v0.9.19&quot;` in my .toml files to keep all versions the same.&#xD;&#xA;&#xD;&#xA;I literally have no idea why that could happen. For several months everything was fine.&#xD;&#xA;&#xD;&#xA;What might be the reason for such an error? " ContentLicense="CC BY-SA 4.0" />
  <row Id="12516" PostHistoryTypeId="1" PostId="3341" RevisionGUID="333c07b9-407f-41f6-89d6-c4deb8dfaf5c" CreationDate="2022-06-19T20:50:44.047" UserId="2408" Text="Node that was not modified fails to build" ContentLicense="CC BY-SA 4.0" />
  <row Id="12517" PostHistoryTypeId="3" PostId="3341" RevisionGUID="333c07b9-407f-41f6-89d6-c4deb8dfaf5c" CreationDate="2022-06-19T20:50:44.047" UserId="2408" Text="|substrate-node|frame|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12518" PostHistoryTypeId="5" PostId="3341" RevisionGUID="dcd9344e-61a2-4a76-b896-4fc916edc22d" CreationDate="2022-06-19T20:57:25.850" UserId="2408" Comment="added 88 characters in body" Text="I had a _fully functioning_ node that was built about 4 day ago and I was using it. Today I've decided to _rebuild_ it with `cargo build -r` and for some reason if failed to build with absolutely weird error message saying:&#xD;&#xA;```&#xD;&#xA;   Compiling libp2p-floodsub v0.31.0&#xD;&#xA;   Compiling libp2p-relay v0.4.0&#xD;&#xA;   Compiling libp2p-rendezvous v0.1.0&#xD;&#xA;   Compiling libp2p-noise v0.33.0&#xD;&#xA;   Compiling soketto v0.7.1&#xD;&#xA;   Compiling sc-network v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea)&#xD;&#xA;   Compiling librocksdb-sys v0.6.1+6.28.2&#xD;&#xA;   Compiling multihash v0.14.0&#xD;&#xA;error[E0603]: module `group` is private&#xD;&#xA;   --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/174735e/frame/support/procedural/tools/src/syn_ext.rs:50:53&#xD;&#xA;    |&#xD;&#xA;50  |                 let syn::group::$name { token, content } = syn::group::$parse(input)?;&#xD;&#xA;    |                                                                 ^^^^^ private module&#xD;&#xA;    |&#xD;&#xA;note: the module `group` is defined here&#xD;&#xA;   --&gt; /home/creestl/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.98/src/lib.rs:304:1&#xD;&#xA;    |&#xD;&#xA;304 | mod group;&#xD;&#xA;    | ^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0603]: module `group` is private&#xD;&#xA;   --&gt; /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/174735e/frame/support/procedural/tools/src/syn_ext.rs:50:14&#xD;&#xA;    |&#xD;&#xA;50  |                 let syn::group::$name { token, content } = syn::group::$parse(input)?;&#xD;&#xA;    |                          ^^^^^ private module&#xD;&#xA;    |&#xD;&#xA;note: the module `group` is defined here&#xD;&#xA;   --&gt; /home/creestl/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.98/src/lib.rs:304:1&#xD;&#xA;    |&#xD;&#xA;304 | mod group;&#xD;&#xA;    | ^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0603`.&#xD;&#xA;error: could not compile `frame-support-procedural-tools` due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Once again, I __did not__ modify anything in the code. I did not update cargo or rustup.  &#xD;&#xA;I've tried building on the other computer and the result is the same.  &#xD;&#xA;I've tried to checkout one of the previous commits that was 100% working and the build failed again&#xD;&#xA;Also I'm explicitly specifying `branch = &quot;polkadot-v0.9.19&quot;` in my .toml files to keep all versions the same.&#xD;&#xA;&#xD;&#xA;I literally have no idea why that could happen. For several months everything was fine.&#xD;&#xA;&#xD;&#xA;You can try to reproduce the error using [my code](https://github.com/CREESTL/Crain)&#xD;&#xA;&#xD;&#xA;What might be the reason for such an error? " ContentLicense="CC BY-SA 4.0" />
  <row Id="12519" PostHistoryTypeId="2" PostId="3342" RevisionGUID="096172a9-7622-467f-b73c-240513f3c646" CreationDate="2022-06-19T22:05:32.910" UserId="2729" Text="Everyone.&#xD;&#xA;I am getting this error.&#xD;&#xA;Here is my Codebase: https://github.com/WB-Expert5007/Poa_to_Pos&#xD;&#xA;Please help me.&#xD;&#xA;&#xD;&#xA;Compiling node-template v4.0.0-dev (/home/mersaid/Documents/HARRY/Task/Climacoin/node)&#xD;&#xA;error[E0432]: unresolved import substrate_frame_rpc_system::LightSystem&#xD;&#xA;--&gt; node/src/rpc.rs:196:35&#xD;&#xA;|&#xD;&#xA;196 | use substrate_frame_rpc_system::{LightSystem, SystemApi};&#xD;&#xA;| ^^^^^^^^^^^ no LightSystem in the root&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: could not find light in sc_client_api&#xD;&#xA;--&gt; node/src/rpc.rs:61:48&#xD;&#xA;|&#xD;&#xA;61 | pub remote_blockchain: Arc&lt;dyn sc_client_api::light::RemoteBlockchain&gt;,&#xD;&#xA;| ^^^^^ could not find light in sc_client_api&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: could not find light in sc_client_api&#xD;&#xA;--&gt; node/src/rpc.rs:192:20&#xD;&#xA;|&#xD;&#xA;192 | F: sc_client_api::light::Fetcher + 'static,&#xD;&#xA;| ^^^^^ could not find light in sc_client_api&#xD;&#xA;&#xD;&#xA;Here is Error Image.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DSHAZ.png&#xD;&#xA;&#xD;&#xA;Please help me.&#xD;&#xA;Best Regards." ContentLicense="CC BY-SA 4.0" />
  <row Id="12521" PostHistoryTypeId="1" PostId="3342" RevisionGUID="096172a9-7622-467f-b73c-240513f3c646" CreationDate="2022-06-19T22:05:32.910" UserId="2729" Text="How can I use substrate_frame_rpc_system &amp; sc_client_api modules on substrate-node-template project?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12522" PostHistoryTypeId="3" PostId="3342" RevisionGUID="096172a9-7622-467f-b73c-240513f3c646" CreationDate="2022-06-19T22:05:32.910" UserId="2729" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12523" PostHistoryTypeId="10" PostId="3319" RevisionGUID="cd1d5e43-3e4d-48d0-8b62-89efff57c505" CreationDate="2022-06-20T02:47:56.670" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="12524" PostHistoryTypeId="5" PostId="3073" RevisionGUID="1257f595-434d-4776-b857-e7fda2b94c3e" CreationDate="2022-06-20T03:01:23.370" UserId="408" Comment="fix typo to make code runnable" Text="There is no difference between retrieving the [entries for any map](https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries), the format is exactly the same as in the answer you linked.&#xD;&#xA;&#xD;&#xA;In this case, use [identityOf](https://polkadot.js.org/docs/substrate/storage#identityofaccountid32-optionpalletidentityregistration) which is a map -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const all = await api.query.identity.identityOf.entries()&#xD;&#xA;&#xD;&#xA;for (let i = 0; i &lt; all.length; i++) {&#xD;&#xA;  const [key, value] = all[i]&#xD;&#xA;&#xD;&#xA;  console.log(&#xD;&#xA;    &quot;accountId=&quot;, key.args[0].toHuman(), &#xD;&#xA;    &quot;, value=&quot;, JSON.stringify(value.toHuman(), null, 2)&#xD;&#xA;  )&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can paste the code on the [Polkadot.js Playground](https://polkadot.js.org/apps/#/js) or [SubShell](https://subshell.xyz) to verify the result." ContentLicense="CC BY-SA 4.0" />
  <row Id="12525" PostHistoryTypeId="24" PostId="3073" RevisionGUID="1257f595-434d-4776-b857-e7fda2b94c3e" CreationDate="2022-06-20T03:01:23.370" Comment="Proposed by 408 approved by 34 edit id of 218" ContentLicense="CC BY-SA 4.0" />
  <row Id="12529" PostHistoryTypeId="10" PostId="3263" RevisionGUID="2b9a24f0-f994-4acf-bd62-440bc8e36dbc" CreationDate="2022-06-20T03:04:54.780" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="12530" PostHistoryTypeId="2" PostId="3343" RevisionGUID="f121e23d-2483-48c1-9b09-7a0810ddaf90" CreationDate="2022-06-20T05:31:14.467" UserId="2565" Text="Please correct me if I am wrong on this Mo Elshami.  These are the step on how to provide reward to your PoA validators in the substrate-node-template.&#xD;&#xA;&#xD;&#xA;1. Import the pallet_session (runtime/Cargo.toml)&#xD;&#xA;```&#xD;&#xA;pallet-session = { version = &quot;4.0.0-dev&quot;, features = [ &quot;historical&quot; ], path = &quot;../../../frame/session&quot;, default-features = false }`&#xD;&#xA;```&#xD;&#xA;2. Import the pallet_authorship (runtime/Cargo.toml)&#xD;&#xA;```&#xD;&#xA;pallet-authorship = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../../../frame/authorship&quot; }`&#xD;&#xA;```&#xD;&#xA;3. Implement both pallet in the /runtime/lib.rs&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const Period: u32 = 6 * HOURS;&#xD;&#xA;	pub const Offset: u32 = 0;&#xD;&#xA;	pub const MaxAuthorities: u32 = 100_000;&#xD;&#xA;}&#xD;&#xA;impl pallet_session::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type ValidatorId = &lt;Self as frame_system::Config&gt;::AccountId;&#xD;&#xA;	// we don't have stash and controller, thus we don't need the convert as well.&#xD;&#xA;	type ValidatorIdOf = pallet_collator_selection::IdentityCollator;&#xD;&#xA;	type ShouldEndSession = pallet_session::PeriodicSessions&lt;Period, Offset&gt;;&#xD;&#xA;	type NextSessionRotation = pallet_session::PeriodicSessions&lt;Period, Offset&gt;;&#xD;&#xA;	type SessionManager = CollatorSelection;&#xD;&#xA;	// Essentially just Aura, but lets be pedantic.&#xD;&#xA;	type SessionHandler = &lt;SessionKeys as sp_runtime::traits::OpaqueKeys&gt;::KeyTypeIdProviders;&#xD;&#xA;	type Keys = SessionKeys;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const UncleGenerations: u32 = 0;&#xD;&#xA;}&#xD;&#xA;impl pallet_authorship::Config for Runtime {&#xD;&#xA;	type FindAuthor = pallet_session::FindAccountFromAuthorIndex&lt;Self, Aura&gt;;&#xD;&#xA;	type UncleGenerations = UncleGenerations;&#xD;&#xA;	type FilterUncle = ();&#xD;&#xA;	type EventHandler = (CollatorSelection,);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;4. Implement OnUnbalanced event for Author and DealtWithFees struct&#xD;&#xA;```&#xD;&#xA;use crate::{Authorship, Balances, NegativeImbalance, Treasury};&#xD;&#xA;use frame_support::traits::{Currency, Imbalance, OnUnbalanced};&#xD;&#xA;&#xD;&#xA;pub struct Author;&#xD;&#xA;impl OnUnbalanced&lt;NegativeImbalance&gt; for Author {&#xD;&#xA;	fn on_nonzero_unbalanced(amount: NegativeImbalance) {&#xD;&#xA;		if let Some(author) = Authorship::author() {&#xD;&#xA;			Balances::resolve_creating(&amp;author, amount);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct DealWithFees;&#xD;&#xA;impl OnUnbalanced&lt;NegativeImbalance&gt; for DealWithFees {&#xD;&#xA;	fn on_unbalanceds&lt;B&gt;(mut fees_then_tips: impl Iterator&lt;Item = NegativeImbalance&gt;) {&#xD;&#xA;		if let Some(fees) = fees_then_tips.next() {&#xD;&#xA;			let mut split = fees.ration(80, 20);&#xD;&#xA;			if let Some(tips) = fees_then_tips.next() {&#xD;&#xA;				// for tips, if any, 80% to treasury, 20% to block author (though this can be anything)&#xD;&#xA;				tips.ration_merge_into(80, 20, &amp;mut split);&#xD;&#xA;			}&#xD;&#xA;			Treasury::on_unbalanced(split.0);&#xD;&#xA;			Author::on_unbalanced(split.1);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12532" PostHistoryTypeId="5" PostId="3073" RevisionGUID="04e2428e-1406-4b04-b372-6e4c91f21783" CreationDate="2022-06-20T05:47:27.827" UserId="1949" Comment="Remove advertisement for additional playground from my answer, as edited in. This could be added as a comment, it was not the intent here in my answer." Text="There is no difference between retrieving the [entries for any map](https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries), the format is exactly the same as in the answer you linked.&#xD;&#xA;&#xD;&#xA;In this case, use [identityOf](https://polkadot.js.org/docs/substrate/storage#identityofaccountid32-optionpalletidentityregistration) which is a map -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const all = await api.query.identity.identityOf.entries()&#xD;&#xA;&#xD;&#xA;for (let i = 0; i &lt; all.length; i++) {&#xD;&#xA;  const [key, value] = all[i]&#xD;&#xA;&#xD;&#xA;  console.log(&#xD;&#xA;    &quot;accountId=&quot;, key.args[0].toHuman(), &#xD;&#xA;    &quot;, value=&quot;, JSON.stringify(value.toHuman(), null, 2)&#xD;&#xA;  )&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can paste the code on the [Polkadot.js Playground](https://polkadot.js.org/apps/#/js) to verify the result." ContentLicense="CC BY-SA 4.0" />
  <row Id="12537" PostHistoryTypeId="2" PostId="3346" RevisionGUID="b79f0146-9948-4e8c-bd8d-02433c725a5b" CreationDate="2022-06-20T07:46:13.727" UserId="167" Text="The above is about allowing the transaction fees to be split between validators. If you want inflation as well, this can currently only be done if you use `pallet-staking`. Inflationary rewards are minted in `pallet-staking`, and can configured via the `type EraPayout`. See [`EraPayout`](https://paritytech.github.io/substrate/master/pallet_staking/trait.EraPayout.html)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12539" PostHistoryTypeId="2" PostId="3347" RevisionGUID="d238cc16-a0bd-4300-83cf-330fcd7e3466" CreationDate="2022-06-20T08:53:47.117" UserId="285" Text="According to [this documentation][1], the mempool can add transactions to the `future queue`. Is there a way to see this list programmatically (via rpc, api...) or manually (polkadotJs)? And do we know how long these transactions stay there and if there is a way to flush them?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/tx-pool/" ContentLicense="CC BY-SA 4.0" />
  <row Id="12541" PostHistoryTypeId="1" PostId="3347" RevisionGUID="d238cc16-a0bd-4300-83cf-330fcd7e3466" CreationDate="2022-06-20T08:53:47.117" UserId="285" Text="How to see a list of transactions on the Future queue" ContentLicense="CC BY-SA 4.0" />
  <row Id="12542" PostHistoryTypeId="3" PostId="3347" RevisionGUID="d238cc16-a0bd-4300-83cf-330fcd7e3466" CreationDate="2022-06-20T08:53:47.117" UserId="285" Text="|substrate-node|polkadot|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12543" PostHistoryTypeId="2" PostId="3348" RevisionGUID="03645df8-25d9-4417-b0dd-a68200483432" CreationDate="2022-06-20T09:14:04.827" UserId="2758" Text="```&#xD;&#xA;cargo run --features try-runtime try-runtime \ &#xD;&#xA;    --execution Native \&#xD;&#xA;    --chain dev \&#xD;&#xA;    on-runtime-upgrade \&#xD;&#xA;    live \&#xD;&#xA;    --uri ws://xxxxxxxx&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I implemented try-runtime according to the standard, but the following error keeps appearing, what is the reason for this?&#xD;&#xA;error info&#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;failed to execute TryRuntime_on_runtime_upgrade: Other: Exported method TryRuntime_on_runtime_upgrade is not found&quot;)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12545" PostHistoryTypeId="1" PostId="3348" RevisionGUID="03645df8-25d9-4417-b0dd-a68200483432" CreationDate="2022-06-20T09:14:04.827" UserId="2758" Text="Exported method `TryRuntime_on_runtime_upgrade` is not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="12546" PostHistoryTypeId="3" PostId="3348" RevisionGUID="03645df8-25d9-4417-b0dd-a68200483432" CreationDate="2022-06-20T09:14:04.827" UserId="2758" Text="|runtime-upgrade|parachain-collator|migration|error|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12547" PostHistoryTypeId="2" PostId="3349" RevisionGUID="4246ed09-b6b9-4765-96cd-0734817aa146" CreationDate="2022-06-20T09:47:48.210" UserId="2408" Text="See [this issue](https://github.com/paritytech/substrate/issues/11706)  &#xD;&#xA;That was fixed in [this PR](https://github.com/paritytech/substrate/pull/11707)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12549" PostHistoryTypeId="2" PostId="3350" RevisionGUID="dc6c2a16-5bc8-4798-8892-18844929d49d" CreationDate="2022-06-20T09:55:30.277" UserId="544" Text="Is it possible to get data with float point numbers from exchange api in Phala's Fat Contract?&#xD;&#xA;&#xD;&#xA;I have been trying to parse a json object from [this API](https://min-api.cryptocompare.com/data/price?fsym=PHA&amp;tsyms=USD):&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&quot;USD&quot;:0.106}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However the price field is a float point. Whenever I use `f64` in the ink code, the deployment will fail with error.&#xD;&#xA;&#xD;&#xA;(This is a community question asked by @binston. I re-posted it because it looks useful for the public.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12551" PostHistoryTypeId="1" PostId="3350" RevisionGUID="dc6c2a16-5bc8-4798-8892-18844929d49d" CreationDate="2022-06-20T09:55:30.277" UserId="544" Text="Parsing float numbers in Phala Fat Contract causes deployment failure" ContentLicense="CC BY-SA 4.0" />
  <row Id="12552" PostHistoryTypeId="3" PostId="3350" RevisionGUID="dc6c2a16-5bc8-4798-8892-18844929d49d" CreationDate="2022-06-20T09:55:30.277" UserId="544" Text="|ink|float|phala|fat-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12553" PostHistoryTypeId="2" PostId="3351" RevisionGUID="9d1d3948-d0f7-4708-a51c-423639ab611a" CreationDate="2022-06-20T09:55:30.277" UserId="544" Text="It's a [well-known problem](https://github.com/paritytech/substrate/issues/11367).&#xD;&#xA;&#xD;&#xA;For your specific use case, we can walk-around like this:&#xD;&#xA;&#xD;&#xA;- You can use [`fixed` crate](https://docs.rs/fixed/1.15.0/fixed/) to process real numbers, including parsing, to string, and arithmetic ops&#xD;&#xA;- To parse the json, you cannot use `serde_json` because it always introduce float points. Theoretically `serde_json_core` can be used, as long as you don't touch any type with float points. However, the API value is actually a float point, I don't know if you can give it a fixed point type or write your own serde parser.&#xD;&#xA;   - [This is a good answer](https://substrate.stackexchange.com/a/3325/544) to learn about `serde_json_core`&#xD;&#xA;- In the worst case, you can try to manually parse the string (thinking about string processing in C), and combine with `fixed` to further work with real numbers&#xD;&#xA;&#xD;&#xA;An additional information. We have SideVM without all these annoying limitations. It supports float points, std, sockets, and even async runtime (AsyncStd, partial tokio, Hyper, etc). The only caveat is that it's too powerful that we still haven't implement any resource rate-limiter to ensure the fair usage. So it's kinda like the parachain in 2019... We do have some ideas, and hopefully we can release it as a discussion to the public soon." ContentLicense="CC BY-SA 4.0" />
  <row Id="12555" PostHistoryTypeId="5" PostId="3350" RevisionGUID="48ee5912-dbb8-4818-9085-c3caf1527f26" CreationDate="2022-06-20T10:18:25.100" UserId="45" Comment="fix grammar and remove redundant notice" Text="Is it possible to get data with float point numbers from the exchange API in Phala's Fat Contract?&#xD;&#xA;&#xD;&#xA;I have been trying to parse a json object from [this API](https://min-api.cryptocompare.com/data/price?fsym=PHA&amp;tsyms=USD):&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&quot;USD&quot;:0.106}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, the price field is a floating point. Whenever I use `f64` in the ink code, the deployment will fail with an error." ContentLicense="CC BY-SA 4.0" />
  <row Id="12556" PostHistoryTypeId="2" PostId="3352" RevisionGUID="098fbb0c-777b-4e39-a479-3f819af91915" CreationDate="2022-06-20T10:33:25.320" UserId="599" Text="The problem is related to ink!'s storage management(and it is why reentrancy is disallowed by default).&#xD;&#xA;&#xD;&#xA;ink! pulls the storage at the beginning of the call execution and pushes it back at the **ending** of the call execution. &#xD;&#xA;&#xD;&#xA;If you allow reentrancy, you allow cases where someone interacts with your contract where the state is not updated yet.&#xD;&#xA;&#xD;&#xA;Pseudo code:&#xD;&#xA;```&#xD;&#xA;call A::method {&#xD;&#xA;    let state = load state A; // here&#xD;&#xA;    ...&#xD;&#xA;    call B::method {&#xD;&#xA;        let state = load state B;&#xD;&#xA;        ...&#xD;&#xA;        call A::method {&#xD;&#xA;            let state = load state A; // &lt;- It is the same as state above, because it was not flushed yet&#xD;&#xA;            ...&#xD;&#xA;            flush state; // Flushing(pushing) new state of A into storage that will be overridden later in that example&#xD;&#xA;        }&#xD;&#xA;        ...&#xD;&#xA;        flush state; // Flushing state B&#xD;&#xA;    }&#xD;&#xA;    ...&#xD;&#xA;    flush state; // Flushing old state A -&gt; overrides new state A from the middle call.&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see that contract A overrides his state in the case of self-call.&#xD;&#xA;If you allow reentrancy, you also need to worry about the storage state. If you want to do a cross-contract call with reentrancy, flush the state before that call and load it after.&#xD;&#xA;&#xD;&#xA;Pseudo code:&#xD;&#xA;```&#xD;&#xA;call A::method {&#xD;&#xA;    let state = load state A;&#xD;&#xA;    ...&#xD;&#xA;    flush state; // Flush here&#xD;&#xA;    call B::method {&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;    state = load State A; // Load again here&#xD;&#xA;    ...&#xD;&#xA;    flush state;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To flush/load the state you need to know how to do that via ink!. Or you can use `flush` and `load` functions from [OpenBrush](https://github.com/Supercolony-net/openbrush-contracts/blob/main/lang/src/traits.rs#L57) of `Flush` trait. You only need to import that trait and you can do `self.flush()` and `self.load()` like here:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;default fn _do_safe_transfer_check(&#xD;&#xA;    &amp;mut self,&#xD;&#xA;    operator: &amp;AccountId,&#xD;&#xA;    from: &amp;AccountId,&#xD;&#xA;    to: &amp;AccountId,&#xD;&#xA;    ids_amounts: &amp;Vec&lt;(Id, Balance)&gt;,&#xD;&#xA;    data: &amp;Vec&lt;u8&gt;,&#xD;&#xA;) -&gt; Result&lt;(), PSP35Error&gt; {&#xD;&#xA;    self.flush();&#xD;&#xA;    let builder = PSP35ReceiverRef::before_received_builder(&#xD;&#xA;        to,&#xD;&#xA;        operator.clone(),&#xD;&#xA;        from.clone(),&#xD;&#xA;        ids_amounts.clone(),&#xD;&#xA;        data.clone(),&#xD;&#xA;    )&#xD;&#xA;    .call_flags(CallFlags::default().set_allow_reentry(true));&#xD;&#xA;    let result = match builder.fire() {&#xD;&#xA;        Ok(result) =&gt; {&#xD;&#xA;            match result {&#xD;&#xA;                Ok(_) =&gt; Ok(()),&#xD;&#xA;                Err(e) =&gt; Err(e.into()),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        Err(e) =&gt; {&#xD;&#xA;            match e {&#xD;&#xA;                // `NotCallable` means that the receiver is not a contract.&#xD;&#xA;&#xD;&#xA;                // `CalleeTrapped` means that the receiver has no method called `before_received` or it failed inside.&#xD;&#xA;                // First case is expected. Second - not. But we can't tell them apart so it is a positive case for now.&#xD;&#xA;                // https://github.com/paritytech/ink/issues/1002&#xD;&#xA;                EnvError::NotCallable | EnvError::CalleeTrapped =&gt; Ok(()),&#xD;&#xA;                _ =&gt; {&#xD;&#xA;                    Err(PSP35Error::SafeTransferCheckFailed(String::from(&#xD;&#xA;                        &quot;Error during call to receiver&quot;,&#xD;&#xA;                    )))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;    self.load();&#xD;&#xA;    result&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;BTW, better to not use raw `CallBuilder` for cross-contract calls. If you need a tip you can ask in [OpenBrush element channel](https://matrix.to/#/!utTuYglskDvqRRMQta:matrix.org?via=matrix.org&amp;via=t2bot.io&amp;via=matrix.parity.io).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12558" PostHistoryTypeId="2" PostId="3353" RevisionGUID="eab40db6-5590-4bee-9942-ab5abb179cef" CreationDate="2022-06-20T10:37:19.630" UserId="627" Text="You can retrieve the pending transactions for any RPC node via the [author_pendingExtrinsics](https://polkadot.js.org/docs/substrate/rpc#pendingextrinsics-vecextrinsic) call.&#xD;&#xA;&#xD;&#xA;So your options are -&#xD;&#xA;&#xD;&#xA; - curl it (it will return the encoded extrinsics)&#xD;&#xA; - via JS or Python or any other APIs, just call the RPC and it will return the decoded versions&#xD;&#xA; - the information is visible in the polkadot-js apps UI as well via Explorer -&gt; Node info" ContentLicense="CC BY-SA 4.0" />
  <row Id="12560" PostHistoryTypeId="2" PostId="3354" RevisionGUID="4824d894-9caa-49f6-be14-69209a80e658" CreationDate="2022-06-20T11:09:42.200" UserId="560" Text="Is there a way to Query a storage map in another pallet without adding new_pallet::Config to the config trait ? Is there a way to get around this?&#xD;&#xA;&#xD;&#xA;I need the democracy pallet to query a storage map from another pallet but adding `+ LLM_Pallet::Config` in the trait config for the pallet just introduce a lot of bugs.&#xD;&#xA;&#xD;&#xA;Is there a way to query storage maps that other pallets have without the pallet's config? manually adding a trait for it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Code:&#xD;&#xA;&#xD;&#xA;from pallet:&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::storage] // allocated in politics&#xD;&#xA;	#[pallet::getter(fn get_politics_balance)]&#xD;&#xA;	pub(super) type LLMPolitics&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Blake2_128Concat, T::AccountId, T::Balance, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;democracy:&#xD;&#xA;			ensure!(Self::has_pooled_lm(who.clone()), Error::&lt;T&gt;::NoPolLLM);&#xD;&#xA;...&#xD;&#xA;impl&lt;T: Config + LLM_Pallet::Config&gt; Pallet&lt;T&gt;{&#xD;&#xA;&#xD;&#xA;	pub fn has_pooled_lm(account: T::AccountId) -&gt; bool {&#xD;&#xA;		let out: bool = LLM_Pallet::Pallet::&lt;T&gt;::get_politics_balance(account);//&lt;LLM_Pallet::Store::&lt;T&gt; as T&gt;::get_politics_lock(account) //LLMPolitics::&lt;T&gt;::contains_key::&lt;T::AccountId&gt;(account)&#xD;&#xA;		out&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Trace log:&#xD;&#xA;```rust&#xD;&#xA;  error[E0599]: the function or associated item `has_pooled_lm` exists for struct `pallet::Pallet&lt;T&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /tmp/liberland_substrate/frame/democracy/src/lib.rs:636:18&#xD;&#xA;      |&#xD;&#xA;  253 |     pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;      |     ------------------------ function or associated item `has_pooled_lm` not found for this&#xD;&#xA;  ...&#xD;&#xA;  636 |             ensure!(Self::has_pooled_lm(who.clone()), Error::&lt;T&gt;::NoPolLLM);&#xD;&#xA;      |                           ^^^^^^^^^^^^^ function or associated item cannot be called on `pallet::Pallet&lt;T&gt;` due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `T: LLM_Pallet::Config`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0599`.&#xD;&#xA;  warning: `pallet-democracy` (lib) generated 1 warning&#xD;&#xA;  error: could not compile `pallet-democracy` due to 2 previous errors; 1 warning emitted&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12562" PostHistoryTypeId="1" PostId="3354" RevisionGUID="4824d894-9caa-49f6-be14-69209a80e658" CreationDate="2022-06-20T11:09:42.200" UserId="560" Text="access storage map from another pallet without trait pallet Config" ContentLicense="CC BY-SA 4.0" />
  <row Id="12563" PostHistoryTypeId="3" PostId="3354" RevisionGUID="4824d894-9caa-49f6-be14-69209a80e658" CreationDate="2022-06-20T11:09:42.200" UserId="560" Text="|pallet|runtime|substrateinterface|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12564" PostHistoryTypeId="5" PostId="3347" RevisionGUID="444c3e9b-61db-48dd-8e2b-7cc2f679c749" CreationDate="2022-06-20T11:29:04.093" UserId="285" Comment="Added tests done" Text="According to [this documentation][1], the mempool can add transactions to the `future queue`. Is there a way to see this list programmatically (via rpc, api...) or manually (polkadotJs)? And do we know how long these transactions stay there and if there is a way to flush them?&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;To experiment, I sent a remark transaction with a higher nonce and examined the `pending transactions`:&#xD;&#xA;```&#xD;&#xA;let tx = await api.tx.system.remark(`Future queue test: ${senderNonce}`);&#xD;&#xA;await tx.signAsync(sender, { nonce: senderNonce + 1, tip: 0, era: 64 });&#xD;&#xA;await tx.send();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/tx-pool/" ContentLicense="CC BY-SA 4.0" />
  <row Id="12565" PostHistoryTypeId="2" PostId="3355" RevisionGUID="b60b3033-f954-432a-b211-e530a1ea355a" CreationDate="2022-06-20T11:32:19.403" UserId="354" Text="You have to add pallet_scheduler in runtime-benchmarks, try-runtime in cargo.toml and also in construct_runtime and benchmarks in runtime/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="12567" PostHistoryTypeId="5" PostId="3349" RevisionGUID="bdb3c6d8-87d6-4735-96a8-c05e34c8996a" CreationDate="2022-06-20T11:58:34.570" UserId="2408" Comment="added 111 characters in body" Text="See [this issue](https://github.com/paritytech/substrate/issues/11706)  &#xD;&#xA;That was fixed in [this PR](https://github.com/paritytech/substrate/pull/11707)&#xD;&#xA;&#xD;&#xA;For easy fix just add&#xD;&#xA;```&#xD;&#xA;syn = { version = &quot;=1.0.82&quot; }&#xD;&#xA;``` &#xD;&#xA;to your runtime's `Cargo.toml` and rebuild" ContentLicense="CC BY-SA 4.0" />
  <row Id="12568" PostHistoryTypeId="2" PostId="3356" RevisionGUID="054023bf-d976-478e-968c-ba071888402b" CreationDate="2022-06-20T12:21:57.540" UserId="140" Text="How many minimum validators are needed to run a substrate solochain? Is single validator enough to run a Substarte solochain, if we are not parachain?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12570" PostHistoryTypeId="1" PostId="3356" RevisionGUID="054023bf-d976-478e-968c-ba071888402b" CreationDate="2022-06-20T12:21:57.540" UserId="140" Text="How many minimum validators are needed to run a substrate solochain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12571" PostHistoryTypeId="3" PostId="3356" RevisionGUID="054023bf-d976-478e-968c-ba071888402b" CreationDate="2022-06-20T12:21:57.540" UserId="140" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12576" PostHistoryTypeId="2" PostId="3358" RevisionGUID="99dfe797-84b3-4070-a03b-fdcced996c80" CreationDate="2022-06-20T12:54:19.727" UserId="169" Text="What problem do epochs in staking solve? Why don't stakers win stakes by something as simple as generating data from history + the latest block (so that precomputing stakes is not possible), and then the longest chain wins (something like [peercoin][1] with stake-modifier).&#xD;&#xA;&#xD;&#xA;I'm having trouble understanding how epochs (the idea that leaders/producers are elected in sections of times using some VRF). Can someone please explain the security benefit to doing this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://dl.acm.org/doi/10.1145/3460537.3460547" ContentLicense="CC BY-SA 4.0" />
  <row Id="12578" PostHistoryTypeId="1" PostId="3358" RevisionGUID="99dfe797-84b3-4070-a03b-fdcced996c80" CreationDate="2022-06-20T12:54:19.727" UserId="169" Text="The purpose of epochs in staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="12579" PostHistoryTypeId="3" PostId="3358" RevisionGUID="99dfe797-84b3-4070-a03b-fdcced996c80" CreationDate="2022-06-20T12:54:19.727" UserId="169" Text="|staking|blockchain|block-production|epoch|proof-of-stake|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12580" PostHistoryTypeId="2" PostId="3359" RevisionGUID="2edc3052-f6a0-49b1-8cbe-f49177db6cd9" CreationDate="2022-06-20T13:24:15.840" UserId="2673" Text="I've just checked out the latest frontier version from `master` branch (`28c4bce`). When I'm trying to run `./node-template-release.sh` I'm getting the following error. How to fix this?&#xD;&#xA;```&#xD;&#xA;Compiling pallet-grandpa v4.0.0-dev (https://github.com/paritytech/substrate?branch=master#6001b59f)&#xD;&#xA;  error[E0046]: not all trait items implemented, missing: `Event`&#xD;&#xA;     --&gt; /tmp/.tmp9bl8nQ/template/runtime/src/lib.rs:286:1&#xD;&#xA;      |&#xD;&#xA;  286 | impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Event` in implementation&#xD;&#xA;      |&#xD;&#xA;      = help: implement the missing item: `type Event = Type;`&#xD;&#xA;&#xD;&#xA;  error[E0599]: no variant or associated item named `max_encoded_len` found for enum `pallet_ethereum::RawOrigin` in the current scope&#xD;&#xA;     --&gt; /tmp/.tmp9bl8nQ/template/runtime/src/lib.rs:391:1&#xD;&#xA;      |&#xD;&#xA;  391 | / construct_runtime!(&#xD;&#xA;  392 | |     pub enum Runtime where&#xD;&#xA;  393 | |         Block = Block,&#xD;&#xA;  394 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  409 | |     }&#xD;&#xA;  410 | | );&#xD;&#xA;      | |_^ variant or associated item not found in `pallet_ethereum::RawOrigin`&#xD;&#xA;      |&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  Some errors have detailed explanations: E0046, E0599.&#xD;&#xA;  For more information about an error, try `rustc --explain E0046`.&#xD;&#xA;  error: could not compile `frontier-template-runtime` due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;thread 'main' panicked at 'assertion failed: Command::new(\&quot;cargo\&quot;).args(&amp;[\&quot;build\&quot;,\n                                \&quot;--all\&quot;]).current_dir(path).status().expect(\&quot;Compiles node\&quot;).success()', src/main.rs:188:5&#xD;&#xA;note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;**My environment:**&#xD;&#xA; * `Ubuntu 22.04 LTS`&#xD;&#xA; * `rustc 1.61.0 (fe5b13d68 2022-05-18)`&#xD;&#xA; * `rustc 1.63.0-nightly (bb8c2f411 2022-06-19)`" ContentLicense="CC BY-SA 4.0" />
  <row Id="12582" PostHistoryTypeId="1" PostId="3359" RevisionGUID="2edc3052-f6a0-49b1-8cbe-f49177db6cd9" CreationDate="2022-06-20T13:24:15.840" UserId="2673" Text="Frontier node template fails to build" ContentLicense="CC BY-SA 4.0" />
  <row Id="12583" PostHistoryTypeId="3" PostId="3359" RevisionGUID="2edc3052-f6a0-49b1-8cbe-f49177db6cd9" CreationDate="2022-06-20T13:24:15.840" UserId="2673" Text="|frontier|frontier-node-template|frontier-workshop|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12584" PostHistoryTypeId="2" PostId="3360" RevisionGUID="34919389-61a3-4068-b5c3-dc4018510950" CreationDate="2022-06-20T13:37:46.610" UserId="1824" Text="I'm trying to use the Scheduler pallet to schedule a call to the Contracts pallet as part&#xD;&#xA;of a chain extension implementation.&#xD;&#xA;&#xD;&#xA;I've managed to get the following to compile and execute:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let call: &lt;T as pallet_scheduler::Config&gt;::Call =&#xD;&#xA;    frame_system::Call::remark {&#xD;&#xA;        remark: 0u32.encode(),&#xD;&#xA;    }&#xD;&#xA;    .into();&#xD;&#xA;&#xD;&#xA;pallet_scheduler::Pallet::&lt;T&gt;::schedule(&#xD;&#xA;    RawOrigin::Signed(caller).into(),&#xD;&#xA;    at.into(),&#xD;&#xA;    None,&#xD;&#xA;    Default::default(),&#xD;&#xA;    call,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, when I try and craft a `Call` to the Contracts pallet like so:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let call = pallet_contracts::Call::remove_code {&#xD;&#xA;    code_hash: Default::default(),&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;let call = crate::Box::new(MaybeHashed::Value(call));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It fails with the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;     Compiling contracts-node-runtime v0.16.0 (/home/hernando/remote-builds/17766829191224950667/runtime)&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;     --&gt; /home/hernando/remote-builds/17766829191224950667/runtime/src/chain_extension.rs:151:21&#xD;&#xA;      |&#xD;&#xA;  146 |                 pallet_scheduler::Pallet::&lt;T&gt;::schedule(&#xD;&#xA;      |                 --------------------------------------- arguments to this function are incorrect&#xD;&#xA;  ...&#xD;&#xA;  151 |                     call,&#xD;&#xA;      |                     ^^^^ expected associated type, found enum `pallet_contracts::Call`&#xD;&#xA;      |&#xD;&#xA;      = note: expected struct `sp_std::prelude::Box&lt;MaybeHashed&lt;&lt;T as pallet_scheduler::Config&gt;::Call, &lt;T as SysConfig&gt;::Hash&gt;&gt;`&#xD;&#xA;                 found struct `sp_std::prelude::Box&lt;MaybeHashed&lt;pallet_contracts::Call&lt;_&gt;, _&gt;&gt;`&#xD;&#xA;      = help: consider constraining the associated type `&lt;T as pallet_scheduler::Config&gt;::Call` to `pallet_contracts::Call&lt;_&gt;` or calling a method that returns `&lt;T as pallet_scheduler::Config&gt;::Call`&#xD;&#xA;      = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html&#xD;&#xA;  note: associated function defined here&#xD;&#xA;     --&gt; /home/hernando/.cargo/git/checkouts/substrate-7e08433d4c370a21/c0ee2ad/frame/scheduler/src/lib.rs:425:10&#xD;&#xA;      |&#xD;&#xA;  425 |         pub fn schedule(&#xD;&#xA;      |                ^^^^^^^^&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0308`.&#xD;&#xA;  error: could not compile `contracts-node-runtime` due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Under the hood the [`Scheduler::schedule`](https://github.com/paritytech/substrate/blob/6001b59f9f64a133d55fc13a495acc76eb4b532f/frame/scheduler/src/lib.rs#L425) extrinsic is expecting a `&lt;T as pallet_scheduler::Config&gt;::Call`, which from&#xD;&#xA;the `Config` definition is the following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type Call: Parameter&#xD;&#xA;	+ Dispatchable&lt;Origin = &lt;Self as Config&gt;::Origin, PostInfo = PostDispatchInfo&gt;&#xD;&#xA;	+ GetDispatchInfo&#xD;&#xA;	+ From&lt;system::Call&lt;Self&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So the error makes sense. According to the `From` implementation we can only turn system&#xD;&#xA;`Call`s into Scheduler `Call`s, which is why `remark` worked and `remove_code` didn't.&#xD;&#xA;&#xD;&#xA;### Successful Dispatches of non-system Calls&#xD;&#xA;&#xD;&#xA;I've tried manually scheduling a Contracts call using the Polkadot JS UI and I'm able to&#xD;&#xA;schedule and execute it successfully. Below is the extrinsic it built:&#xD;&#xA;&#xD;&#xA;[![polkadot-js-apps-contract-call][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There's also the [Referenda pallet which implements some scheduler related traits](https://github.com/paritytech/substrate/blob/6001b59f9f64a133d55fc13a495acc76eb4b532f/frame/referenda/src/lib.rs#L131) and that allows it to specify its own `Call` type.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config&lt;I: 'static = ()&gt;: frame_system::Config + Sized {&#xD;&#xA;	/// The Scheduler.&#xD;&#xA;	type Scheduler: ScheduleAnon&lt;&#xD;&#xA;			Self::BlockNumber,&#xD;&#xA;			CallOf&lt;Self, I&gt;,&#xD;&#xA;			PalletsOriginOf&lt;Self&gt;,&#xD;&#xA;			Hash = Self::Hash,&#xD;&#xA;		&gt; + ScheduleNamed&lt;&#xD;&#xA;			Self::BlockNumber,&#xD;&#xA;			CallOf&lt;Self, I&gt;,&#xD;&#xA;			PalletsOriginOf&lt;Self&gt;,&#xD;&#xA;			Hash = Self::Hash,&#xD;&#xA;		&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;### Questions&#xD;&#xA;- How is Polkadot JS Apps able to successfully build a Contract `Call` and schedule it?&#xD;&#xA;- How am I able to replicate this in Rust without building a wrapper pallet a la&#xD;&#xA;  `pallet-referenda`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/krhbo.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="12586" PostHistoryTypeId="1" PostId="3360" RevisionGUID="34919389-61a3-4068-b5c3-dc4018510950" CreationDate="2022-06-20T13:37:46.610" UserId="1824" Text="Using Scheduler Pallet to schedule Contract pallet call" ContentLicense="CC BY-SA 4.0" />
  <row Id="12587" PostHistoryTypeId="3" PostId="3360" RevisionGUID="34919389-61a3-4068-b5c3-dc4018510950" CreationDate="2022-06-20T13:37:46.610" UserId="1824" Text="|runtime|extrinsic|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12592" PostHistoryTypeId="2" PostId="3362" RevisionGUID="7f24e3db-51ba-4384-bb27-910caa7e9de8" CreationDate="2022-06-20T14:55:26.743" UserId="1824" Text="It's possible to store custom types in your smart contract as long as they meet all the right requirements.&#xD;&#xA;&#xD;&#xA;For ink! this means that your type must at minimum implement the [`SpreadLayout`](https://paritytech.github.io/ink/ink_storage/traits/trait.SpreadLayout.html)&#xD;&#xA;and [`StorageLayout`](https://paritytech.github.io/ink/ink_storage/traits/trait.StorageLayout.html) traits.&#xD;&#xA;&#xD;&#xA;This gets slightly tricky when the type comes from an external crate due to Rust's Orphan Rules which don't let you implement foreign traits for foreign types.&#xD;&#xA;&#xD;&#xA;One way to work around this is to create a wrapper type and implement the traits on that:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;//! In your smart contract&#xD;&#xA;&#xD;&#xA;use some_crate::SomeType;&#xD;&#xA;&#xD;&#xA;// This is what you'll end up putting in your #[ink(storage)] struct&#xD;&#xA;pub struct Wrapper(SomeType);&#xD;&#xA;&#xD;&#xA;impl SpreadLayout for Wrapper { ... }&#xD;&#xA;&#xD;&#xA;// We only need this during metadata generation, which happens in an environment where we&#xD;&#xA;// have access to the standard library and OS.&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;const _: () = {&#xD;&#xA;    impl StorageLayout for Wrapper { ... }&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Another, as Bruno mentioned, is to open a PR in the ink! repo and implement the traits&#xD;&#xA;directly for that type.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12594" PostHistoryTypeId="5" PostId="3362" RevisionGUID="613bffd4-cc2c-4bb8-a010-6b13880b3393" CreationDate="2022-06-20T15:00:27.920" UserId="1824" Comment="added 104 characters in body" Text="It's possible to store custom types in your smart contract as long as they meet all the right requirements.&#xD;&#xA;&#xD;&#xA;For ink! this means that your type must at minimum implement the [`SpreadLayout`](https://paritytech.github.io/ink/ink_storage/traits/trait.SpreadLayout.html)&#xD;&#xA;and [`StorageLayout`](https://paritytech.github.io/ink/ink_storage/traits/trait.StorageLayout.html) traits.&#xD;&#xA;&#xD;&#xA;This gets slightly tricky when the type comes from an external crate due to Rust's Orphan Rules which don't let you implement foreign traits for foreign types.&#xD;&#xA;&#xD;&#xA;One way to work around this is to create a wrapper type and implement the traits on that:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;//! In your smart contract&#xD;&#xA;&#xD;&#xA;use some_crate::SomeType;&#xD;&#xA;&#xD;&#xA;// This is what you'll end up putting in your #[ink(storage)] struct&#xD;&#xA;pub struct Wrapper(SomeType);&#xD;&#xA;&#xD;&#xA;// Note, this may end up being hard to implement manually depending on the&#xD;&#xA;// complexity of your type&#xD;&#xA;impl SpreadLayout for Wrapper { ... }&#xD;&#xA;&#xD;&#xA;// We only need this during metadata generation, which happens in an environment where we&#xD;&#xA;// have access to the standard library and OS.&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;const _: () = {&#xD;&#xA;    impl StorageLayout for Wrapper { ... }&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Another, as Bruno mentioned, is to open a PR in the ink! repo and implement the traits&#xD;&#xA;directly for that type.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12595" PostHistoryTypeId="2" PostId="3363" RevisionGUID="236e6dda-7e6a-4ae0-add1-35f6515c87e0" CreationDate="2022-06-20T15:18:45.893" UserId="298" Text="Looking at the best way to upload ~20,000 balances to a live parachain. Assuming will need to upload these balances across multiple blocks. Are there any examples I can of this been done already?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12597" PostHistoryTypeId="1" PostId="3363" RevisionGUID="236e6dda-7e6a-4ae0-add1-35f6515c87e0" CreationDate="2022-06-20T15:18:45.893" UserId="298" Text="What the best way to upload 20,000 balances to a live parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="12598" PostHistoryTypeId="3" PostId="3363" RevisionGUID="236e6dda-7e6a-4ae0-add1-35f6515c87e0" CreationDate="2022-06-20T15:18:45.893" UserId="298" Text="|substrate-node|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12601" PostHistoryTypeId="2" PostId="3364" RevisionGUID="d23bbeb3-efe7-4607-ac9a-37597a1f5cc2" CreationDate="2022-06-20T15:58:20.707" UserId="2146" Text="I'm trying to allow users on the client side send an `api.tx.system.remark( 'message' );` with PolkadotJS. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I run into issues on signing and sending the transaction, as I will not have their secret key. I've read through the docs and I have a hugeeeeeee knowledge gap here on what should be done. My next steps are to sift through the PolkadotJS API but it's pretty lean code and will take some time....StackExchange heroes help me!&#xD;&#xA;&#xD;&#xA;How do I 'pass' my transaction to the PolkadotJS extension to validate the transaction (if that makes sense).&#xD;&#xA;&#xD;&#xA;Below is an image of my (semi-completed) code, `addFromUri(${MNEMONIC})` is not an option (as the client is any user and their secret key is inaccessible. &#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hYGv5.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12603" PostHistoryTypeId="1" PostId="3364" RevisionGUID="d23bbeb3-efe7-4607-ac9a-37597a1f5cc2" CreationDate="2022-06-20T15:58:20.707" UserId="2146" Text="How to signAndSend() without a MNEMONIC" ContentLicense="CC BY-SA 4.0" />
  <row Id="12604" PostHistoryTypeId="3" PostId="3364" RevisionGUID="d23bbeb3-efe7-4607-ac9a-37597a1f5cc2" CreationDate="2022-06-20T15:58:20.707" UserId="2146" Text="|kusama|javascript|rmrk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12605" PostHistoryTypeId="2" PostId="3365" RevisionGUID="140f9025-7142-4a54-a5b2-c6a2e3b4c97e" CreationDate="2022-06-20T16:50:10.617" UserId="140" Text="I am running 4 collator nodes V1, V2, V3, and V4. &#xD;&#xA;&#xD;&#xA;V2 and V3 look good and connected perfectly with V1. I am getting the below logs for V2 and V3.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Jun 20 16:44:40 testnet-2: 2022-06-20 16:44:40 [Relaychain]  Idle (46 peers), best: #13214589 (0x7c36…37e2), finalized #13214585 (0x2836…f7ff), ⬇ 288.7kiB/s ⬆ 320.0kiB/s&#xD;&#xA;Jun 20 16:44:42 testnet-2: 2022-06-20 16:44:42 [Relaychain] ✨ Imported #13214590 (0xfd88…e30b)&#xD;&#xA;Jun 20 16:44:42 testnet-2: 2022-06-20 16:44:42 [Parachain]  Idle (3 peers), best: #0 (0xeacd…ec21), finalized #0 (0xeacd…ec21), ⬇ 24 B/s ⬆ 24 B/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But on V4, I am getting different logs. However, it has the same setup as V2 and V3&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Jun 20 16:40:31 testnet-4: 2022-06-20 16:40:31 [Relaychain] ⚙️  Syncing 313.4 bps, target=#13214548 (48 peers), best: #96064 (0x4ea4…c54d), finalized #95744 (0x0456…d603), ⬇ 252.4kiB/s ⬆ 42.0kiB/s&#xD;&#xA;Jun 20 16:40:32 testnet-4: 2022-06-20 16:40:32 [Relaychain]  The bootnode you want to connect provided a different peer ID than the one you expect: `12D3KooWMVXPbqWRqwertySWDVPjcAQ9XtxqLTVzV4ccox9Y8KNL`.&#xD;&#xA;Jun 20 16:40:35 testnet-4: 2022-06-20 16:40:35 [Parachain]  Idle (3 peers), best: #0 (0xeacd…ec21), finalized #0 (0xeacd…ec21), ⬇ 58 B/s ⬆ 49 B/s&#xD;&#xA;Jun 20 16:40:36 testnet-4: 2022-06-20 16:40:36 [Relaychain] ⚙️  Syncing  0.0 bps, target=#13214548 (48 peers), best: #96064 (0x4ea4…c54d), finalized #95744 (0x0456…d603), ⬇ 72.9kiB/s ⬆ 37.3kiB/s&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can someone please help me to fix this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12607" PostHistoryTypeId="1" PostId="3365" RevisionGUID="140f9025-7142-4a54-a5b2-c6a2e3b4c97e" CreationDate="2022-06-20T16:50:10.617" UserId="140" Text="Getting error `The bootnode you want to connect provided a different peer ID than the one you expect` while connecting with main validator" ContentLicense="CC BY-SA 4.0" />
  <row Id="12608" PostHistoryTypeId="3" PostId="3365" RevisionGUID="140f9025-7142-4a54-a5b2-c6a2e3b4c97e" CreationDate="2022-06-20T16:50:10.617" UserId="140" Text="|substrate-node|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12609" PostHistoryTypeId="2" PostId="3366" RevisionGUID="8e1406ed-1917-46fb-b21a-ed4567adcf29" CreationDate="2022-06-20T16:57:00.107" UserId="627" Text="To integrate with the extension, [see this usage info](https://polkadot.js.org/docs/extension/usage) as well as a slightly [different sample](https://polkadot.js.org/docs/extension/cookbook#sign-and-send-a-transaction) in the cookbook. &#xD;&#xA;&#xD;&#xA;Basically you get a list of accounts from the extension and then attach a signer, from the extension, when doing the signAndSend." ContentLicense="CC BY-SA 4.0" />
  <row Id="12612" PostHistoryTypeId="5" PostId="3297" RevisionGUID="13f2174f-45de-4df0-8ddb-1aae53bc4d38" CreationDate="2022-06-20T17:28:01.110" UserId="555" Comment="added 352 characters in body" Text="I have added parachain staking and moonbeam-orbiters of moonbeam in our project. When I test it, all the extrinsics are performing well except the staking part. I have gone through this https://docs.moonbeam.network/tokens/staking/stake/#staking-your-tokens&#xD;&#xA;Here, it is mentioned that &quot;**To access staking features, you need to import/create an Ethereum-style account first (H160 address),**&quot;&#xD;&#xA;Can we access staking features with a normal account? Like If I perform delegate extrinsics with a normal account, staking tokens reflected in the reserve amount of the delegator account(**EVE**)(As mentioned in above tutorial). But in my case the Eve account is not getting any reward.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Some Setup details: 1. [![enter image description here][2]][2]&#xD;&#xA;2. [![enter image description here][3]][3]&#xD;&#xA;3. [![enter image description here][4]][4]&#xD;&#xA;------&#xD;&#xA;4. [![enter image description here][5]][5]&#xD;&#xA;5. [![enter image description here][6]][6]&#xD;&#xA;6. [![enter image description here][7]][7]&#xD;&#xA;7. [![enter image description here][8]][8]&#xD;&#xA;8. [![enter image description here][9]][9]&#xD;&#xA;&#xD;&#xA;What should I do to get reward ?&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OyCvc.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Rf4on.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/5aoO9.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/yUDFX.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/NOQB1.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/ocptj.png&#xD;&#xA;  [7]: https://i.stack.imgur.com/y3Paw.png&#xD;&#xA;  [8]: https://i.stack.imgur.com/sLqvW.png&#xD;&#xA;  [9]: https://i.stack.imgur.com/KB2Wh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12613" PostHistoryTypeId="2" PostId="3367" RevisionGUID="6181d9c2-edfc-4016-9538-8b121c11b808" CreationDate="2022-06-20T17:30:42.733" UserId="28" Text="I don't think there are any tricks here once you have started a live chain.&#xD;&#xA;&#xD;&#xA;Generally speaking, you shouldn't mint new funds onto a chain once tokens have been allowed to be transferred. If you have already enabled token transfers, I would not suggest minting new tokens into your economy.&#xD;&#xA;&#xD;&#xA;Assuming you already have an account with the funds you want to distribute, you can simply create and submit batches of transfers to move funds to the appropriate accounts." ContentLicense="CC BY-SA 4.0" />
  <row Id="12615" PostHistoryTypeId="52" PostId="3350" RevisionGUID="e255447b-a837-4851-9e0a-2c763cd7fec2" CreationDate="2022-06-20T17:55:32.157" />
  <row Id="12617" PostHistoryTypeId="2" PostId="3368" RevisionGUID="2a5d048b-580d-4864-9174-b0ce865e1106" CreationDate="2022-06-20T18:44:49.577" UserId="2714" Text="I am curious if anyone made a rococo relay chain using node-template? Similar to this (https://github.com/buraktabn/relay-chain) but using rococo instead of kusama." ContentLicense="CC BY-SA 4.0" />
  <row Id="12619" PostHistoryTypeId="1" PostId="3368" RevisionGUID="2a5d048b-580d-4864-9174-b0ce865e1106" CreationDate="2022-06-20T18:44:49.577" UserId="2714" Text="Has anyone made a barebones rococo relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12620" PostHistoryTypeId="3" PostId="3368" RevisionGUID="2a5d048b-580d-4864-9174-b0ce865e1106" CreationDate="2022-06-20T18:44:49.577" UserId="2714" Text="|substrate-node-template|rococo|relay-chain|rococo-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12621" PostHistoryTypeId="2" PostId="3369" RevisionGUID="47493b3f-057d-4410-b20a-22a131a1ffac" CreationDate="2022-06-20T19:47:43.257" UserId="276" Text="Is there a specific reason why you manually want to decode raw SCALE-data? Because SCALE is without context, you need the exact type definition of the storage function and even specific runtime where you got that result from.. The type definitions are contained in the metadata of the runtime, where you can find the type definition of that storage function.&#xD;&#xA;&#xD;&#xA;So the easiest way would be for example:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;result = substrate.query(&quot;Identity&quot;, &quot;IdentityOf&quot;, [&quot;DWUAQt9zcpnQt5dT48NwWbJuxQ78vKRK9PRkHDkGDn9TJ1j&quot;])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This function will take care of all that. You can even query historic values (state at `block_hash`):&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;result = substrate.query(&quot;Identity&quot;, &quot;IdentityOf&quot;, [&quot;DWUAQt9zcpnQt5dT48NwWbJuxQ78vKRK9PRkHDkGDn9TJ1j&quot;], block_hash=&quot;0x21b90597ae8dba9b2bfcbedc2b94bf709172477d47bb845bfe4e23af9ecc87af&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But if you insist on decoding manually, what you can try is:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;storage_function = substrate.get_metadata_storage_function(&quot;Identity&quot;, &quot;IdentityOf&quot;)&#xD;&#xA;value = substrate.decode_scale(storage_function.get_value_type_string(), ScaleBytes(&quot;0x040200000002000c9924370e00000000000000000000000e4272696768746c797374616b65001a68747470733a2f2f6272696768746c797374616b652e636f6d00157374616b696e6737706340676d61696c2e636f6d00000f406272696768746c797374616b65&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12623" PostHistoryTypeId="6" PostId="2247" RevisionGUID="b963206d-18a9-4fd0-a577-1481c4d2bb57" CreationDate="2022-06-20T20:18:11.843" UserId="544" Comment="Add related tags" Text="|ink|smart-contract|phala|fat-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12624" PostHistoryTypeId="24" PostId="2247" RevisionGUID="b963206d-18a9-4fd0-a577-1481c4d2bb57" CreationDate="2022-06-20T20:18:11.843" Comment="Proposed by 544 approved by 549 edit id of 220" ContentLicense="CC BY-SA 4.0" />
  <row Id="12625" PostHistoryTypeId="2" PostId="3370" RevisionGUID="0f502ee6-8643-4994-a2c6-8ac22eb07a17" CreationDate="2022-06-20T20:50:27.857" UserId="28" Text="It is such a bad idea in general to do things like JSON parsing in the runtime, not only are you bloating your contract size by including a huge library like `serde` into it, but you are also bloating your contract, fees, and the blockchain hosting your contract by including tons of dead data which is included in JSON.&#xD;&#xA;&#xD;&#xA;JSON is not a blockchain friendly format, and is usually used when fields are unknown and should be variably parsed.&#xD;&#xA;&#xD;&#xA;Contracts on the other hand are mostly constant, have well known and expected types, and publicly available APIs for the data they understand.&#xD;&#xA;&#xD;&#xA;This is why formats like [SCALE](https://docs.substrate.io/v3/advanced/scale-codec/) have no fields, because it is ultimately wasted data. Instead both the sender and the receiver (the contract) understand what exactly should be sent across the wire, and the contract spends the least amount of resources needed to parse that data.&#xD;&#xA;&#xD;&#xA;So if you are using JSON in your smart contract, you are doing something wrong." ContentLicense="CC BY-SA 4.0" />
  <row Id="12627" PostHistoryTypeId="2" PostId="3371" RevisionGUID="c94f4269-9d54-4b7a-b527-95ffc9235ecc" CreationDate="2022-06-20T21:30:06.020" UserId="2019" Text="When going through [this tutorial][1] for adding contracts to the default node template, adding `pallets-contracts-rpc`, the 4th recommended crate to install, I receive various errors. Things compile fine when only the first 3 crates are installed.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# causes compilation errors&#xD;&#xA;# pallet-contracts-rpc = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/socket.rs:1777:25&#xD;&#xA;       |&#xD;&#xA;  1777 | from!(net::TcpListener, Socket);&#xD;&#xA;       |                         ^^^^^^ expected struct `Socket`, found `()`&#xD;&#xA;       |&#xD;&#xA;      ::: /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:104:16&#xD;&#xA;       |&#xD;&#xA;  104  |             fn from(socket: $from) -&gt; $for {&#xD;&#xA;       |                ---- implicitly returns `()` as its body has no tail or `return` expression&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/socket.rs:1778:23&#xD;&#xA;       |&#xD;&#xA;  1778 | from!(net::UdpSocket, Socket);&#xD;&#xA;       |                       ^^^^^^ expected struct `Socket`, found `()`&#xD;&#xA;       |&#xD;&#xA;      ::: /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:104:16&#xD;&#xA;       |&#xD;&#xA;  104  |             fn from(socket: $from) -&gt; $for {&#xD;&#xA;       |                ---- implicitly returns `()` as its body has no tail or `return` expression&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/socket.rs:1779:15&#xD;&#xA;       |&#xD;&#xA;  1779 | from!(Socket, net::TcpStream);&#xD;&#xA;       |               ^^^^^^^^^^^^^^ expected struct `TcpStream`, found `()`&#xD;&#xA;       |&#xD;&#xA;      ::: /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:104:16&#xD;&#xA;       |&#xD;&#xA;  104  |             fn from(socket: $from) -&gt; $for {&#xD;&#xA;       |                ---- implicitly returns `()` as its body has no tail or `return` expression&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/socket.rs:1780:15&#xD;&#xA;       |&#xD;&#xA;  1780 | from!(Socket, net::TcpListener);&#xD;&#xA;       |               ^^^^^^^^^^^^^^^^ expected struct `TcpListener`, found `()`&#xD;&#xA;       |&#xD;&#xA;      ::: /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:104:16&#xD;&#xA;       |&#xD;&#xA;  104  |             fn from(socket: $from) -&gt; $for {&#xD;&#xA;       |                ---- implicitly returns `()` as its body has no tail or `return` expression&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/socket.rs:1781:15&#xD;&#xA;       |&#xD;&#xA;  1781 | from!(Socket, net::UdpSocket);&#xD;&#xA;       |               ^^^^^^^^^^^^^^ expected struct `UdpSocket`, found `()`&#xD;&#xA;       |&#xD;&#xA;      ::: /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:104:16&#xD;&#xA;       |&#xD;&#xA;  104  |             fn from(socket: $from) -&gt; $for {&#xD;&#xA;       |                ---- implicitly returns `()` as its body has no tail or `return` expression&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems on the contracts node template that crate is not installed. https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/Cargo.toml&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/how-to-guides/v3/pallet-design/contracts-pallet/#import-the-dependencies" ContentLicense="CC BY-SA 4.0" />
  <row Id="12629" PostHistoryTypeId="1" PostId="3371" RevisionGUID="c94f4269-9d54-4b7a-b527-95ffc9235ecc" CreationDate="2022-06-20T21:30:06.020" UserId="2019" Text="Unable to add pallets-contracts-rpc crate" ContentLicense="CC BY-SA 4.0" />
  <row Id="12630" PostHistoryTypeId="3" PostId="3371" RevisionGUID="c94f4269-9d54-4b7a-b527-95ffc9235ecc" CreationDate="2022-06-20T21:30:06.020" UserId="2019" Text="|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12632" PostHistoryTypeId="2" PostId="3372" RevisionGUID="517c1c6f-5b67-4d97-a359-a98925acf35f" CreationDate="2022-06-21T02:24:44.760" UserId="132" Text="To make a PoS chain based on node template, you need to make these changes step by step,&#xD;&#xA;- use BABE to produce blocks, since Aura is for test purpose or permissioned network.&#xD;&#xA;- use staking, session, authorship, offences, utility, im-online pallets to enable staking, rewards and punish operations.&#xD;&#xA;- use governance, treasury, democracy, membership, election pallets to make your own governance process, this is not required if you don't need onchain governance.&#xD;&#xA;- initialize your chain spec to include your bootnodes, genesis validators and so on.&#xD;&#xA;- use BabeCallFilter to open/close functions as you launch goes different stage.&#xD;&#xA;- similarly, use governance and sudo to enable functions slowly to reduce risks.&#xD;&#xA;&#xD;&#xA;You could use my practice by following these recent [commits](https://hackmd.io/@2dHpJQYgQrCqfxqXMtJTFQ/rkS0WmVY9/edit)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12634" PostHistoryTypeId="5" PostId="3372" RevisionGUID="24b2c1fb-4c80-4037-b91b-6f8e3968772b" CreationDate="2022-06-21T02:25:28.143" UserId="132" Comment="added 6 characters in body" Text="To make a PoS chain based on node template, you need to make these changes step by step,&#xD;&#xA;- use BABE to produce blocks, since Aura is for test purpose or permissioned network.&#xD;&#xA;- use staking, session, authorship, offences, utility, im-online pallets to enable staking, rewards and punish operations.&#xD;&#xA;- use governance, treasury, democracy, membership, election pallets to make your own governance process, this is not required if you don't need onchain governance.&#xD;&#xA;- initialize your chain spec to include your bootnodes, genesis validators and so on.&#xD;&#xA;- use BabeCallFilter to open/close functions as you launch goes different stage.&#xD;&#xA;- similarly, use governance and sudo to enable functions slowly to reduce risks.&#xD;&#xA;&#xD;&#xA;You could use my practice by following these recent [commits](https://github.com/kaichaosun/substrate-stencil/commits/master)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12635" PostHistoryTypeId="2" PostId="3373" RevisionGUID="b4a327f3-e093-4017-8159-75b9867d98d9" CreationDate="2022-06-21T02:44:24.130" UserId="2146" Text=":S &#xD;&#xA;&#xD;&#xA;It was right in front of me, in the docs. Jeez, I'm getting old. Thanks Jaco, &#xD;&#xA;From the docs linked above, this is what I ended up using.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;const account = allAccounts[0];&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;const transferExtrinsic = api.tx.balances.transfer('5C5555yEXUcmEJ5kkcCMvdZjUo7NGJiQJMS7vZXEeoMhj3VQ', 123456)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;const injector = await web3FromSource(account.meta.source);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;transferExtrinsic.signAndSend(account.address, { signer: injector.signer }, ({ status }) =&gt; {&#xD;&#xA;    if (status.isInBlock) {&#xD;&#xA;        console.log(`Completed at block hash #${status.asInBlock.toString()}`);&#xD;&#xA;    } else {&#xD;&#xA;        console.log(`Current status: ${status.type}`);&#xD;&#xA;    }&#xD;&#xA;}).catch((error: any) =&gt; {&#xD;&#xA;    console.log(':( transaction failed', error);&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12638" PostHistoryTypeId="2" PostId="3374" RevisionGUID="1a78bf96-5e07-4720-bff8-79e0e517c9db" CreationDate="2022-06-21T05:33:42.373" UserId="2565" Text="I got it working, PoA will reward the validator who created the block using the tip as the sample value for the fees, here are the steps:&#xD;&#xA;&#xD;&#xA;1. Install the pallet_authorship&#xD;&#xA;```&#xD;&#xA;pallet-authorship = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;```&#xD;&#xA;2. Configure the pallet to get the current author of the block&#xD;&#xA;```&#xD;&#xA;pub struct AuraAccountAdapter;&#xD;&#xA;impl frame_support::traits::FindAuthor&lt;AccountId&gt; for AuraAccountAdapter {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;AccountId&gt;&#xD;&#xA;		where I: 'a + IntoIterator&lt;Item=(frame_support::ConsensusEngineId, &amp;'a [u8])&gt;&#xD;&#xA;	{&#xD;&#xA;		pallet_aura::AuraAuthorId::&lt;Runtime&gt;::find_author(digests).and_then(|k| {&#xD;&#xA;			AccountId::try_from(k.as_ref()).ok()&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;impl pallet_authorship::Config for Runtime {&#xD;&#xA;	type FindAuthor = AuraAccountAdapter;&#xD;&#xA;	type UncleGenerations = ();&#xD;&#xA;	type FilterUncle = ();&#xD;&#xA;	type EventHandler =  ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;3. Create OnUnbalanced implementation of Author and DealWithFees&#xD;&#xA;```&#xD;&#xA;use crate::{Authorship, Balances};&#xD;&#xA;use frame_support::traits::{Imbalance, OnUnbalanced};&#xD;&#xA;use crate::sp_api_hidden_includes_construct_runtime::hidden_include::traits::Currency;&#xD;&#xA;use crate::AccountId;&#xD;&#xA;&#xD;&#xA;type NegativeImbalance = &lt;Balances as Currency&lt;AccountId&gt;&gt;::NegativeImbalance;&#xD;&#xA;&#xD;&#xA;pub struct Author;&#xD;&#xA;impl OnUnbalanced&lt;NegativeImbalance&gt; for Author {&#xD;&#xA;	fn on_nonzero_unbalanced(amount: NegativeImbalance) {&#xD;&#xA;		if let Some(author) = Authorship::author() {&#xD;&#xA;			Balances::resolve_creating(&amp;author, amount);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct DealWithFees;&#xD;&#xA;impl OnUnbalanced&lt;NegativeImbalance&gt; for DealWithFees {&#xD;&#xA;	fn on_unbalanceds&lt;B&gt;(mut fees_then_tips: impl Iterator&lt;Item = NegativeImbalance&gt;) {&#xD;&#xA;		if let Some(fees) = fees_then_tips.next() {&#xD;&#xA;			let mut split = fees.ration(80, 20);&#xD;&#xA;			if let Some(tips) = fees_then_tips.next() {&#xD;&#xA;				// for tips, if any, 80% to treasury, 20% to block author (though this can be anything)&#xD;&#xA;				tips.ration_merge_into(80, 20, &amp;mut split);&#xD;&#xA;			}&#xD;&#xA;			//Treasury::on_unbalanced(split.0);&#xD;&#xA;			Author::on_unbalanced(split.1);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;} &#xD;&#xA;```&#xD;&#xA;4. Call the implementation in the pallet_transaction_payment tuple OnChargeTransaction&#xD;&#xA;```&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, crate::impls::DealWithFees&gt;;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;5&gt;;&#xD;&#xA;	type WeightToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Also added in my blog: https://hgminerva.wordpress.com/2022/06/21/how-to-pay-the-block-author-validator-on-a-proof-of-authority-poa-consensus-in-substrate/&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12640" PostHistoryTypeId="2" PostId="3375" RevisionGUID="876e2d05-447d-496a-a677-49cc1e67ff46" CreationDate="2022-06-21T07:44:37.287" UserId="354" Text="It depends what kind of solochain you are making, for a system to be known as a network there should at least be 3 nodes and all should be validators. If you want to make a network with only a single validator than I would say it is not a blockchain as all the power of the network is in hands of a single validator, that is the property of a centralized system.&#xD;&#xA;As for your question you can run a solochain with single validator and also there is no minimum validators required to run a solochain." ContentLicense="CC BY-SA 4.0" />
  <row Id="12642" PostHistoryTypeId="5" PostId="3336" RevisionGUID="ba2d6c70-5cf5-4db2-9733-63fb21148b43" CreationDate="2022-06-21T08:13:21.370" UserId="16" Comment="deleted 324 characters in body" Text="I found that if we use `call_flags(CallFlags::default().set_allow_reentry(true))` we can make our smart contract be called in the cross-contract-call way by itself. Of course this is meaningless, but maybe it's the same reason causes [@george huang's](https://substrate.stackexchange.com/questions/3331/is-circular-call-between-multi-contracts-possible) problem. &#xD;&#xA;&#xD;&#xA;The problem is that we cannot update the status of the reentry smart contract.&#xD;&#xA;&#xD;&#xA;The related code is as following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn receive_message(&amp;mut self, addr: AccountId, i: u32) {&#xD;&#xA;&#xD;&#xA;	ink_env::call::build_call::&lt;ink_env::DefaultEnvironment&gt;()&#xD;&#xA;		.call_type(&#xD;&#xA;			ink_env::call::Call::new()&#xD;&#xA;				.callee(addr)&#xD;&#xA;				.gas_limit(0)&#xD;&#xA;				.transferred_value(0))&#xD;&#xA;		.exec_input(&#xD;&#xA;			// call `update_message` of contract `addr`&#xD;&#xA;			ink_env::call::ExecutionInput::new(ink_env::call::Selector::new([0x03, 0x2a, 0x6f, 0x29]))&#xD;&#xA;			.push_arg(i)&#xD;&#xA;		)&#xD;&#xA;		.call_flags(ink_env::CallFlags::default().set_allow_reentry(true))&#xD;&#xA;		.returns::&lt;()&gt;()&#xD;&#xA;		.fire().&#xD;&#xA;		unwrap();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn update_message(&amp;mut self, i: u32) {&#xD;&#xA;	Self::env().emit_event(EventRecv2{&#xD;&#xA;		triggered: true,&#xD;&#xA;	});&#xD;&#xA;	self.message = i;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I call `receive_message` but the input parameter `addr` is just the same smart contract, that is, I use `set_allow_reentry(true)` to make my smart contract be able to call itself in a cross-contract call way. &#xD;&#xA;&#xD;&#xA;The result is the same as [@george huang](https://substrate.stackexchange.com/questions/3331/is-circular-call-between-multi-contracts-possible) met, we cannot update the status of the smart contract in `update_message`. I'm sure `update_message` is executed because the event `EventRecv2` is caught.&#xD;&#xA;&#xD;&#xA;So is this a bug? Or should we make some special settings to solve this problem?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12643" PostHistoryTypeId="2" PostId="3376" RevisionGUID="a8c37da4-3015-4e5c-b465-c81cd328dd5c" CreationDate="2022-06-21T08:17:51.443" UserId="234" Text="Since I upgraded my 3 KSM nodes :&#xD;&#xA;- to 0.9.21 on May 11 and&#xD;&#xA;- 0.9.22 on June 1&#xD;&#xA;&#xD;&#xA;my era points dropped almost to zero.&#xD;&#xA;&#xD;&#xA;My Polkadot node was also upgraded on May 11 but rewards were not affected until June 16th when we noticed that rewards were almost gone.&#xD;&#xA;&#xD;&#xA;The KSM node uses the same IP, but the ports are different.&#xD;&#xA;&#xD;&#xA;I know how [era points are distributed][1] among validators but I cannot seem to pinpoint which of those actions my nodes are not performing correctly hence missing rewards.&#xD;&#xA;&#xD;&#xA;I had various different errors in my nodes which I list below : &#xD;&#xA;&#xD;&#xA;- `=FetchPoV(NetworkError(Network(Timeout)))`&#xD;&#xA;  which looks like it means that my node is timing out when validating parachain blocks, hence decreased rewards. However, I do not know what I can do to solve it.&#xD;&#xA;    &#xD;&#xA;- `The bootnode you want to connect provided a different peer ID than the one you expect:`&#xD;&#xA;  which is also mentioned in this [issue][2] So, as they suggest, I verified that all bootnodes have the peer ID as defined in the chainspec. However, I did not see any change in my era points.  &#xD;&#xA;- The only down time that my nodes had were when we shut some of them down for a while to restart them.&#xD;&#xA;- I also checked the specs of my hardware. My machine is running on Kubernetes with CPU limit of 3 and memory limit of 8. We have three machines and 16 nodes.&#xD;&#xA;I compared with the [recommended hardware specs][3] mentioned in this SE question/answers &#xD;&#xA;    which points to another related answer [here][4] and it looks like our specs are insufficient. So I will also try to update the specs of our 3 machines.&#xD;&#xA;    &#xD;&#xA;- Other errors from the logs are the following :&#xD;&#xA;    - `failed to associate send_message response to the sender` but not sure how relevant is this one.&#xD;&#xA;    - `Incoming substream exceeding maximum number of negotiating inbound streams. Dropping.`&#xD;&#xA;- I also checked my session keys in Polkadot-JS Apps as well (`Developer`&#xD;&#xA; tab &gt; `Chain State:` `session &gt; nextKeys(AccountId32)`) to see if the return value is consistent with the Session keys I have set. For the validator accountIDs that I checked, it showed 6 keys in p-js apps.&#xD;&#xA;- However, I saw that in some nodes I have 5 session keys and in others I have 6 keys. I checked the keystore because based on this [wiki page][5] it can also affect the availability.&#xD;&#xA;- I also checked one of the metrics shown in subscan and there is one called &quot;Grandpa Vote”. It is a metric for checking validators grandpa online rate and this rate is also much lower than usual.&#xD;&#xA;&#xD;&#xA;So, I suppose that the problem is multiple things since I have so many different errors. Even though I tried different things, it is still not clear to me what is the root cause and what are the necessary steps that I need to do to solve the issue of my decreased era points. Can you recommend a clear list of possible reasons and solutions to my problem ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-validator-payout#era-points&#xD;&#xA;  [2]: https://github.com/paritytech/devops/issues/1588&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/1014/what-are-the-latest-minimum-specs-for-running-a-polkadot-kusama-node-full-node/1018#1018&#xD;&#xA;  [4]: https://substrate.stackexchange.com/a/1859/234&#xD;&#xA;  [5]: https://wiki.polkadot.network/docs/maintain-guides-secure-validator#high-availability" ContentLicense="CC BY-SA 4.0" />
  <row Id="12645" PostHistoryTypeId="1" PostId="3376" RevisionGUID="a8c37da4-3015-4e5c-b465-c81cd328dd5c" CreationDate="2022-06-21T08:17:51.443" UserId="234" Text="What might be the reasons that my validator nodes are receiving significant less era points at the moment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12646" PostHistoryTypeId="3" PostId="3376" RevisionGUID="a8c37da4-3015-4e5c-b465-c81cd328dd5c" CreationDate="2022-06-21T08:17:51.443" UserId="234" Text="|validator|era|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12647" PostHistoryTypeId="2" PostId="3377" RevisionGUID="adc3fb1c-c783-4d11-96c6-47ff58350ce2" CreationDate="2022-06-21T08:20:44.027" UserId="234" Text="For rewards, most points are gotten from validating parachains - if your nodes aren't properly set up to validate parachains, you will be missing out on a lot of rewards.&#xD;&#xA;&#xD;&#xA;There's a handful of requirements for parachains:&#xD;&#xA;&#xD;&#xA;- Each node must have all the session keys required for parachains (which should be 6 keys)&#xD;&#xA;- Each node must have at least the single threaded performance of the Standard Hardware machines (which at the moment is is an Intel 7700k)&#xD;&#xA;- Each node must use/have disk speeds on par with NVME Drives&#xD;&#xA;- Each node must have network traffic open for ingress and egress on the p2p port (which by default is 30333)&#xD;&#xA;- Each node must have network bandwidth of at least 300-500 mbps&#xD;&#xA;&#xD;&#xA;Running in Kubernetes is not really recommended, unless you really know what you're doing and understand the requirements. Ideally each node is hosted on a bare metal machine, with only 1 node per machine. Running in Kubernetes will cut a lot of performance, especially if you do not tune the resources right.&#xD;&#xA;&#xD;&#xA;You can see if a machine has enough power by running:&#xD;&#xA;&#xD;&#xA;`./polkadot benchmark machine`&#xD;&#xA;&#xD;&#xA;as it's sort of described [here][1]&#xD;&#xA;&#xD;&#xA;This will output a green checkmark or not if the cpu, disk and memory is on par with the Standard Hardware that is required for Parachains.&#xD;&#xA;&#xD;&#xA;It looks like in general the loss of rewards for you is based on your setup - you can roughly see how different infrastructure providers and regions compare from this [snapshot][2] of missed parachain votes.&#xD;&#xA;&#xD;&#xA;Implicit and Explicit votes are pretty much the same and are good. Missed votes are not good, and result in not getting rewards.&#xD;&#xA;&#xD;&#xA;I would migrate your nodes to bare metal machines, with 1 node per machine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/11270&#xD;&#xA;  [2]: https://gist.github.com/wpank/4b83f5cc776768d61830bbd449f2acc4" ContentLicense="CC BY-SA 4.0" />
  <row Id="12650" PostHistoryTypeId="2" PostId="3378" RevisionGUID="76d98e86-567a-4528-a1c1-04644669d2f2" CreationDate="2022-06-21T11:38:56.007" UserId="2767" Text="I have created a transaction by @substrate/txwrapper-orml &#xD;&#xA;&#xD;&#xA;    const metadataRpc = await rpcToLocalNode(&quot;state_getMetadata&quot;)&#xD;&#xA;&#xD;&#xA;    // Create [TODO CHAIN NAME] type registry.&#xD;&#xA;    const registry = getNewRegistry({&#xD;&#xA;        chainName: &quot;Acala&quot;,&#xD;&#xA;        specName: &quot;aca&quot;,&#xD;&#xA;        specVersion: payload.info.specVersion,&#xD;&#xA;        metadataRpc&#xD;&#xA;      }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    const unsigned = methods.currencies.transfer(&#xD;&#xA;      {&#xD;&#xA;        amount: payload.args.amount,&#xD;&#xA;        currencyId: payload.args.currencyId,&#xD;&#xA;        dest: payload.args.dest&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        address: payload.info.address,&#xD;&#xA;        blockHash: payload.info.blockHash,&#xD;&#xA;        blockNumber: payload.info.blockNumber,&#xD;&#xA;        eraPeriod: payload.info.eraPeriod,&#xD;&#xA;        genesisHash: payload.info.genesisHash,&#xD;&#xA;        metadataRpc: metadataRpc,&#xD;&#xA;        nonce: payload.info.nonce, // Assuming this is Alice's first tx on the chain&#xD;&#xA;        specVersion: payload.info.specVersion,&#xD;&#xA;        tip: payload.info.tip,&#xD;&#xA;        transactionVersion: payload.info.transactionVersion&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry&#xD;&#xA;      }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;But when I call the interface with rpc request&#xD;&#xA;&#xD;&#xA;request&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;key&quot;: &quot;abcdefg&quot;,&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;        &quot;dest&quot;: &quot;1234&quot;,&#xD;&#xA;        &quot;amount&quot;: &quot;1.0000&quot;,&#xD;&#xA;        &quot;currencyId&quot;: &quot;ACALA&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;info&quot;: {&#xD;&#xA;        &quot;adddress&quot;: &quot;4321&quot;,&#xD;&#xA;        &quot;specVersion&quot;: &quot;2070&quot;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;there is some error info in the response&#xD;&#xA;```bash&#xD;&#xA;2022-06-21 19:23:06 error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum &#xD;&#xA; Error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum&#xD;&#xA;    at createTypeUnsafe (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)&#xD;&#xA;    at TypeRegistry.createTypeUnsafe (/Users/lilin/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/create/registry.js:333:46)&#xD;&#xA;    at extrinsicFn (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/metadata/decorate/extrinsics/createUnchecked.js:31:21)&#xD;&#xA;    at defineMethod (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/lib/core/method/defineMethod.js:92:20)&#xD;&#xA;    at Object.transfer (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-orml/lib/methods/currencies/transfer.js:6:46)&#xD;&#xA;    at SignService.sign (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/services/sign/SignService.js:46:53)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;    at async SignTransactionController.signTx (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/sign/SignTransactionController.js:15:22)&#xD;&#xA;    at async /Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/AbstractController.js:183:9&#xD;&#xA;2022-06-21 19:23:06 error: POST /tx/sign 500 985ms&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please help to see the reason for the error, thank you very much." ContentLicense="CC BY-SA 4.0" />
  <row Id="12652" PostHistoryTypeId="1" PostId="3378" RevisionGUID="76d98e86-567a-4528-a1c1-04644669d2f2" CreationDate="2022-06-21T11:38:56.007" UserId="2767" Text="How can I create a currencies transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12653" PostHistoryTypeId="3" PostId="3378" RevisionGUID="76d98e86-567a-4528-a1c1-04644669d2f2" CreationDate="2022-06-21T11:38:56.007" UserId="2767" Text="|substrateinterface|acala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12654" PostHistoryTypeId="4" PostId="3378" RevisionGUID="52a3d56c-cad5-4ada-be0d-fb4400534f36" CreationDate="2022-06-21T11:39:20.020" UserId="2767" Comment="edited title" Text="How can I create a currencies.transfer transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12655" PostHistoryTypeId="5" PostId="3378" RevisionGUID="37c0a061-36ee-47fb-9a47-ddea173d8bef" CreationDate="2022-06-21T11:41:49.177" UserId="2767" Comment="added 168 characters in body" Text="I have created a transaction by @substrate/txwrapper-orml &#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import {methods as substrateMethods} from &quot;@substrate/txwrapper-orml&quot;;&#xD;&#xA;&#xD;&#xA;export const methods = {&#xD;&#xA;    currencies: substrateMethods.currencies&#xD;&#xA;};   &#xD;&#xA;const metadataRpc = await rpcToLocalNode(&quot;state_getMetadata&quot;)&#xD;&#xA;&#xD;&#xA;    // Create [TODO CHAIN NAME] type registry.&#xD;&#xA;    const registry = getNewRegistry({&#xD;&#xA;        chainName: &quot;Acala&quot;,&#xD;&#xA;        specName: &quot;aca&quot;,&#xD;&#xA;        specVersion: payload.info.specVersion,&#xD;&#xA;        metadataRpc&#xD;&#xA;      }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    const unsigned = methods.currencies.transfer(&#xD;&#xA;      {&#xD;&#xA;        amount: payload.args.amount,&#xD;&#xA;        currencyId: payload.args.currencyId,&#xD;&#xA;        dest: payload.args.dest&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        address: payload.info.address,&#xD;&#xA;        blockHash: payload.info.blockHash,&#xD;&#xA;        blockNumber: payload.info.blockNumber,&#xD;&#xA;        eraPeriod: payload.info.eraPeriod,&#xD;&#xA;        genesisHash: payload.info.genesisHash,&#xD;&#xA;        metadataRpc: metadataRpc,&#xD;&#xA;        nonce: payload.info.nonce, // Assuming this is Alice's first tx on the chain&#xD;&#xA;        specVersion: payload.info.specVersion,&#xD;&#xA;        tip: payload.info.tip,&#xD;&#xA;        transactionVersion: payload.info.transactionVersion&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry&#xD;&#xA;      }&#xD;&#xA;    );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I call the interface with rpc request&#xD;&#xA;&#xD;&#xA;request&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;key&quot;: &quot;abcdefg&quot;,&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;        &quot;dest&quot;: &quot;1234&quot;,&#xD;&#xA;        &quot;amount&quot;: &quot;1.0000&quot;,&#xD;&#xA;        &quot;currencyId&quot;: &quot;ACALA&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;info&quot;: {&#xD;&#xA;        &quot;adddress&quot;: &quot;4321&quot;,&#xD;&#xA;        &quot;specVersion&quot;: &quot;2070&quot;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;there is some error info in the response&#xD;&#xA;```bash&#xD;&#xA;2022-06-21 19:23:06 error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum &#xD;&#xA; Error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum&#xD;&#xA;    at createTypeUnsafe (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)&#xD;&#xA;    at TypeRegistry.createTypeUnsafe (/Users/lilin/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/create/registry.js:333:46)&#xD;&#xA;    at extrinsicFn (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/metadata/decorate/extrinsics/createUnchecked.js:31:21)&#xD;&#xA;    at defineMethod (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/lib/core/method/defineMethod.js:92:20)&#xD;&#xA;    at Object.transfer (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-orml/lib/methods/currencies/transfer.js:6:46)&#xD;&#xA;    at SignService.sign (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/services/sign/SignService.js:46:53)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;    at async SignTransactionController.signTx (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/sign/SignTransactionController.js:15:22)&#xD;&#xA;    at async /Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/AbstractController.js:183:9&#xD;&#xA;2022-06-21 19:23:06 error: POST /tx/sign 500 985ms&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please help to see the reason for the error, thank you very much." ContentLicense="CC BY-SA 4.0" />
  <row Id="12656" PostHistoryTypeId="5" PostId="3378" RevisionGUID="e73b1eee-5ef2-4801-b33c-c11d3d2183aa" CreationDate="2022-06-21T11:42:53.310" UserId="2767" Comment="deleted 124 characters in body" Text="I have created a transaction by @substrate/txwrapper-orml &#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import {methods as substrateMethods} from &quot;@substrate/txwrapper-orml&quot;;&#xD;&#xA;&#xD;&#xA;export const methods = {&#xD;&#xA;    currencies: substrateMethods.currencies&#xD;&#xA;};   &#xD;&#xA;const metadataRpc = await rpcToLocalNode(&quot;state_getMetadata&quot;)&#xD;&#xA;&#xD;&#xA;// Create [TODO CHAIN NAME] type registry.&#xD;&#xA;const registry = getNewRegistry({&#xD;&#xA;    chainName: &quot;Acala&quot;,&#xD;&#xA;    specName: &quot;aca&quot;,&#xD;&#xA;    specVersion: payload.info.specVersion,&#xD;&#xA;    metadataRpc&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;const unsigned = methods.currencies.transfer(&#xD;&#xA;  {&#xD;&#xA;    amount: payload.args.amount,&#xD;&#xA;    currencyId: payload.args.currencyId,&#xD;&#xA;    dest: payload.args.dest&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    address: payload.info.address,&#xD;&#xA;    blockHash: payload.info.blockHash,&#xD;&#xA;    blockNumber: payload.info.blockNumber,&#xD;&#xA;    eraPeriod: payload.info.eraPeriod,&#xD;&#xA;    genesisHash: payload.info.genesisHash,&#xD;&#xA;    metadataRpc: metadataRpc,&#xD;&#xA;    nonce: payload.info.nonce, // Assuming this is Alice's first tx on the chain&#xD;&#xA;    specVersion: payload.info.specVersion,&#xD;&#xA;    tip: payload.info.tip,&#xD;&#xA;    transactionVersion: payload.info.transactionVersion&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    metadataRpc,&#xD;&#xA;    registry&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I call the interface with rpc request&#xD;&#xA;&#xD;&#xA;request&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;key&quot;: &quot;abcdefg&quot;,&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;        &quot;dest&quot;: &quot;1234&quot;,&#xD;&#xA;        &quot;amount&quot;: &quot;1.0000&quot;,&#xD;&#xA;        &quot;currencyId&quot;: &quot;ACALA&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;info&quot;: {&#xD;&#xA;        &quot;adddress&quot;: &quot;4321&quot;,&#xD;&#xA;        &quot;specVersion&quot;: &quot;2070&quot;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;there is some error info in the response&#xD;&#xA;```bash&#xD;&#xA;2022-06-21 19:23:06 error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum &#xD;&#xA; Error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum&#xD;&#xA;    at createTypeUnsafe (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)&#xD;&#xA;    at TypeRegistry.createTypeUnsafe (/Users/lilin/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/create/registry.js:333:46)&#xD;&#xA;    at extrinsicFn (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/metadata/decorate/extrinsics/createUnchecked.js:31:21)&#xD;&#xA;    at defineMethod (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/lib/core/method/defineMethod.js:92:20)&#xD;&#xA;    at Object.transfer (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-orml/lib/methods/currencies/transfer.js:6:46)&#xD;&#xA;    at SignService.sign (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/services/sign/SignService.js:46:53)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;    at async SignTransactionController.signTx (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/sign/SignTransactionController.js:15:22)&#xD;&#xA;    at async /Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/AbstractController.js:183:9&#xD;&#xA;2022-06-21 19:23:06 error: POST /tx/sign 500 985ms&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please help to see the reason for the error, thank you very much." ContentLicense="CC BY-SA 4.0" />
  <row Id="12657" PostHistoryTypeId="5" PostId="3378" RevisionGUID="54d464ba-92a6-44d3-972f-ac3a794c4101" CreationDate="2022-06-21T11:43:28.020" UserId="2767" Comment="deleted 94 characters in body" Text="I have created a transaction by @substrate/txwrapper-orml &#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import {methods as substrateMethods} from &quot;@substrate/txwrapper-orml&quot;;&#xD;&#xA;&#xD;&#xA;export const methods = {&#xD;&#xA;    currencies: substrateMethods.currencies&#xD;&#xA;};   &#xD;&#xA;const metadataRpc = await rpcToLocalNode(&quot;state_getMetadata&quot;)&#xD;&#xA;&#xD;&#xA;const registry = getNewRegistry({&#xD;&#xA;    chainName: &quot;Acala&quot;,&#xD;&#xA;    specName: &quot;aca&quot;,&#xD;&#xA;    specVersion: payload.info.specVersion,&#xD;&#xA;    metadataRpc&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;const unsigned = methods.currencies.transfer(&#xD;&#xA;  {&#xD;&#xA;    amount: payload.args.amount,&#xD;&#xA;    currencyId: payload.args.currencyId,&#xD;&#xA;    dest: payload.args.dest&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    address: payload.info.address,&#xD;&#xA;    blockHash: payload.info.blockHash,&#xD;&#xA;    blockNumber: payload.info.blockNumber,&#xD;&#xA;    eraPeriod: payload.info.eraPeriod,&#xD;&#xA;    genesisHash: payload.info.genesisHash,&#xD;&#xA;    metadataRpc: metadataRpc,&#xD;&#xA;    nonce: payload.info.nonce,&#xD;&#xA;    specVersion: payload.info.specVersion,&#xD;&#xA;    tip: payload.info.tip,&#xD;&#xA;    transactionVersion: payload.info.transactionVersion&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    metadataRpc,&#xD;&#xA;    registry&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I call the interface with rpc request&#xD;&#xA;&#xD;&#xA;request&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;key&quot;: &quot;abcdefg&quot;,&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;        &quot;dest&quot;: &quot;1234&quot;,&#xD;&#xA;        &quot;amount&quot;: &quot;1.0000&quot;,&#xD;&#xA;        &quot;currencyId&quot;: &quot;ACALA&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;info&quot;: {&#xD;&#xA;        &quot;adddress&quot;: &quot;4321&quot;,&#xD;&#xA;        &quot;specVersion&quot;: &quot;2070&quot;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;there is some error info in the response&#xD;&#xA;```bash&#xD;&#xA;2022-06-21 19:23:06 error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum &#xD;&#xA; Error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum&#xD;&#xA;    at createTypeUnsafe (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)&#xD;&#xA;    at TypeRegistry.createTypeUnsafe (/Users/lilin/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/create/registry.js:333:46)&#xD;&#xA;    at extrinsicFn (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/metadata/decorate/extrinsics/createUnchecked.js:31:21)&#xD;&#xA;    at defineMethod (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/lib/core/method/defineMethod.js:92:20)&#xD;&#xA;    at Object.transfer (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-orml/lib/methods/currencies/transfer.js:6:46)&#xD;&#xA;    at SignService.sign (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/services/sign/SignService.js:46:53)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;    at async SignTransactionController.signTx (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/sign/SignTransactionController.js:15:22)&#xD;&#xA;    at async /Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/AbstractController.js:183:9&#xD;&#xA;2022-06-21 19:23:06 error: POST /tx/sign 500 985ms&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please help to see the reason for the error, thank you very much." ContentLicense="CC BY-SA 4.0" />
  <row Id="12658" PostHistoryTypeId="5" PostId="3378" RevisionGUID="21416a4a-cad5-4499-82ca-3bcdfdd55065" CreationDate="2022-06-21T11:44:49.593" UserId="2767" Comment="deleted 2 characters in body" Text="I have created a transaction by @substrate/txwrapper-orml &#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import {methods as substrateMethods} from &quot;@substrate/txwrapper-orml&quot;;&#xD;&#xA;&#xD;&#xA;export const methods = {&#xD;&#xA;    currencies: substrateMethods.currencies&#xD;&#xA;};   &#xD;&#xA;const metadataRpc = await rpcToLocalNode(&quot;state_getMetadata&quot;)&#xD;&#xA;&#xD;&#xA;const registry = getNewRegistry({&#xD;&#xA;    chainName: &quot;Acala&quot;,&#xD;&#xA;    specName: &quot;aca&quot;,&#xD;&#xA;    specVersion: payload.info.specVersion,&#xD;&#xA;    metadataRpc&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;const unsigned = methods.currencies.transfer(&#xD;&#xA;  {&#xD;&#xA;    amount: payload.args.amount,&#xD;&#xA;    currencyId: payload.args.currencyId,&#xD;&#xA;    dest: payload.args.dest&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    address: payload.info.address,&#xD;&#xA;    blockHash: payload.info.blockHash,&#xD;&#xA;    blockNumber: payload.info.blockNumber,&#xD;&#xA;    eraPeriod: payload.info.eraPeriod,&#xD;&#xA;    genesisHash: payload.info.genesisHash,&#xD;&#xA;    metadataRpc: metadataRpc,&#xD;&#xA;    nonce: payload.info.nonce,&#xD;&#xA;    specVersion: payload.info.specVersion,&#xD;&#xA;    tip: payload.info.tip,&#xD;&#xA;    transactionVersion: payload.info.transactionVersion&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    metadataRpc,&#xD;&#xA;    registry&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I call the interface with rpc request&#xD;&#xA;&#xD;&#xA;request&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;key&quot;: &quot;abcdefg&quot;,&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;        &quot;dest&quot;: &quot;1234&quot;,&#xD;&#xA;        &quot;amount&quot;: &quot;1.0000&quot;,&#xD;&#xA;        &quot;currencyId&quot;: &quot;aca&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;info&quot;: {&#xD;&#xA;        &quot;adddress&quot;: &quot;4321&quot;,&#xD;&#xA;        &quot;specVersion&quot;: &quot;2070&quot;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;there is some error info in the response&#xD;&#xA;```bash&#xD;&#xA;2022-06-21 19:23:06 error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum &#xD;&#xA; Error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum&#xD;&#xA;    at createTypeUnsafe (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)&#xD;&#xA;    at TypeRegistry.createTypeUnsafe (/Users/lilin/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/create/registry.js:333:46)&#xD;&#xA;    at extrinsicFn (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/metadata/decorate/extrinsics/createUnchecked.js:31:21)&#xD;&#xA;    at defineMethod (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/lib/core/method/defineMethod.js:92:20)&#xD;&#xA;    at Object.transfer (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-orml/lib/methods/currencies/transfer.js:6:46)&#xD;&#xA;    at SignService.sign (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/services/sign/SignService.js:46:53)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;    at async SignTransactionController.signTx (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/sign/SignTransactionController.js:15:22)&#xD;&#xA;    at async /Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/AbstractController.js:183:9&#xD;&#xA;2022-06-21 19:23:06 error: POST /tx/sign 500 985ms&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please help to see the reason for the error, thank you very much." ContentLicense="CC BY-SA 4.0" />
  <row Id="12659" PostHistoryTypeId="5" PostId="3378" RevisionGUID="a3759cc1-03a8-49a4-a0f4-a1fd5dec0bb2" CreationDate="2022-06-21T12:07:32.713" UserId="2767" Comment="deleted 1 character in body" Text="I have created a transaction by @substrate/txwrapper-orml &#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import {methods as substrateMethods} from &quot;@substrate/txwrapper-orml&quot;;&#xD;&#xA;&#xD;&#xA;export const methods = {&#xD;&#xA;    currencies: substrateMethods.currencies&#xD;&#xA;};   &#xD;&#xA;const metadataRpc = await rpcToLocalNode(&quot;state_getMetadata&quot;)&#xD;&#xA;&#xD;&#xA;const registry = getNewRegistry({&#xD;&#xA;    chainName: &quot;Acala&quot;,&#xD;&#xA;    specName: &quot;aca&quot;,&#xD;&#xA;    specVersion: payload.info.specVersion,&#xD;&#xA;    metadataRpc&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;const unsigned = methods.currencies.transfer(&#xD;&#xA;  {&#xD;&#xA;    amount: payload.args.amount,&#xD;&#xA;    currencyId: payload.args.currencyId,&#xD;&#xA;    dest: payload.args.dest&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    address: payload.info.address,&#xD;&#xA;    blockHash: payload.info.blockHash,&#xD;&#xA;    blockNumber: payload.info.blockNumber,&#xD;&#xA;    eraPeriod: payload.info.eraPeriod,&#xD;&#xA;    genesisHash: payload.info.genesisHash,&#xD;&#xA;    metadataRpc: metadataRpc,&#xD;&#xA;    nonce: payload.info.nonce,&#xD;&#xA;    specVersion: payload.info.specVersion,&#xD;&#xA;    tip: payload.info.tip,&#xD;&#xA;    transactionVersion: payload.info.transactionVersion&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    metadataRpc,&#xD;&#xA;    registry&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I call the interface with rpc request&#xD;&#xA;&#xD;&#xA;request&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;key&quot;: &quot;abcdefg&quot;,&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;        &quot;dest&quot;: &quot;1234&quot;,&#xD;&#xA;        &quot;amount&quot;: &quot;1.0000&quot;,&#xD;&#xA;        &quot;currencyId&quot;: &quot;aca&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;info&quot;: {&#xD;&#xA;        &quot;adddress&quot;: &quot;4321&quot;,&#xD;&#xA;        &quot;specVersion&quot;: &quot;2070&quot;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;there is some error info in the response&#xD;&#xA;```bash&#xD;&#xA;2022-06-21 19:23:06 error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum &#xD;&#xA; Error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup57&quot;}:: Struct: failed on dest: {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Decoding 1234: Invalid decoded address checksum&#xD;&#xA;    at createTypeUnsafe (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)&#xD;&#xA;    at TypeRegistry.createTypeUnsafe (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/create/registry.js:333:46)&#xD;&#xA;    at extrinsicFn (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/node_modules/@polkadot/types/cjs/metadata/decorate/extrinsics/createUnchecked.js:31:21)&#xD;&#xA;    at defineMethod (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-core/lib/core/method/defineMethod.js:92:20)&#xD;&#xA;    at Object.transfer (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/node_modules/@substrate/txwrapper-orml/lib/methods/currencies/transfer.js:6:46)&#xD;&#xA;    at SignService.sign (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/services/sign/SignService.js:46:53)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;    at async SignTransactionController.signTx (/Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/sign/SignTransactionController.js:15:22)&#xD;&#xA;    at async /Users/root/Desktop/work/src/blockchain-managers/aca-manager/libs/substrate-api-sidecar/build/src/controllers/AbstractController.js:183:9&#xD;&#xA;2022-06-21 19:23:06 error: POST /tx/sign 500 985ms&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please help to see the reason for the error, thank you very much." ContentLicense="CC BY-SA 4.0" />
  <row Id="12660" PostHistoryTypeId="2" PostId="3379" RevisionGUID="faf7eb7e-e4c8-457a-ba36-96f79869cd82" CreationDate="2022-06-21T13:53:43.967" UserId="571" Text="I was recently wondering what kind of performance tuning options can be specified while building a Substrate node. Motivation for doing this is based on the benchmark I ran on machines that utilize AMD Ryzen CPUs - performance of benchmarked CPU functions were 10-15% better when running a binary compiled specifically for Ryzen CPU (with `-C target-cpu=znver3` flag).&#xD;&#xA;&#xD;&#xA;This is the command I ran&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;polkadot benchmark machine --chain polkadot --verify-duration 60&#xD;&#xA;```&#xD;&#xA;So I started to wonder what other compiler options can be applied in order to tune node performance to max and this is where a lot of Substrate developers hangs out so it seems like a good place to ask. Basically I have two questions regarding this topic&#xD;&#xA;1) How exactly node performance affects collecting points for activities in the active set (say on Kusama or Polkadot)? Especially when being a parachain validator&#xD;&#xA;2) What can be done to get the maximum out of your node performance aside from having dedicated hardware* and good network latency?&#xD;&#xA;&#xD;&#xA;*dedicated hardware obviously means bare metal machine with CPU having a good single-thread performance, NVMe drives and so on" ContentLicense="CC BY-SA 4.0" />
  <row Id="12662" PostHistoryTypeId="1" PostId="3379" RevisionGUID="faf7eb7e-e4c8-457a-ba36-96f79869cd82" CreationDate="2022-06-21T13:53:43.967" UserId="571" Text="Peformance tuning of Substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="12663" PostHistoryTypeId="3" PostId="3379" RevisionGUID="faf7eb7e-e4c8-457a-ba36-96f79869cd82" CreationDate="2022-06-21T13:53:43.967" UserId="571" Text="|substrate-node|benchmarking|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12664" PostHistoryTypeId="2" PostId="3380" RevisionGUID="dd1419f5-dc42-4c8a-82b2-ea58939da24a" CreationDate="2022-06-21T14:03:49.257" UserId="85" Text="Are there examples of using subsquid archive to retrieve a raw block (Vec&lt;u8&gt;) based on a block hash or number? It's very cool that one can query it at the graphql level (E.g. https://app.subsquid.io/aquarium/archives/parallel/subsquid ) but would be nice to be able to ask for the scale encoded block too. (If one's going back in time the normal nodes won't store all the data, and one needs something like subsquid or archive nodes.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12666" PostHistoryTypeId="1" PostId="3380" RevisionGUID="dd1419f5-dc42-4c8a-82b2-ea58939da24a" CreationDate="2022-06-21T14:03:49.257" UserId="85" Text="Are there examples of using subsquid archive to retrieve a raw block based on a blockhash?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12667" PostHistoryTypeId="3" PostId="3380" RevisionGUID="dd1419f5-dc42-4c8a-82b2-ea58939da24a" CreationDate="2022-06-21T14:03:49.257" UserId="85" Text="|subsquid|archive|historical|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12672" PostHistoryTypeId="2" PostId="3382" RevisionGUID="bfb82ee4-a32d-4932-8f0f-042f10d460f5" CreationDate="2022-06-21T14:12:29.680" UserId="1786" Text="So the root of the problem is directly in the error. The `dest: 1234` points to `Decoding 1234: Invalid decoded address checksum` which is alluding to the fact that the address is in an incorrect format. It requires a valid ss58 format address which `1234` is not.&#xD;&#xA;&#xD;&#xA;Example of a valid address: 23M5ttkmR6KcnvsNJdmYTpLo9xfc54g8uCk55buDfiJPon69&#xD;&#xA;&#xD;&#xA;If you have the ability I would suggest trying to run a valid transaction against an Acala dev node (setup can be found [here](https://github.com/AcalaNetwork/Acala#3-building)). You can also reference these examples we have built out in [txwrapper-core](https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-examples) which don't use the orml package but they have very similar functionality and are built out to work with dev nodes. &#xD;&#xA;&#xD;&#xA;But again, to recap, the core of the problem here is the destination address you are using to submit the transaction. Hope that helps" ContentLicense="CC BY-SA 4.0" />
  <row Id="12676" PostHistoryTypeId="2" PostId="3384" RevisionGUID="325adbb2-f5c8-4dce-95fc-e0ac5eb95336" CreationDate="2022-06-21T15:10:35.373" UserId="2019" Text="In testing my pallet, I have some function that stores something and deposits an event.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		ThingStored(thing&lt;T&gt;, T::AccountId),&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;	pub fn create_thing(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;		let creator = ensure_signed(origin)?;&#xD;&#xA;        let id = 1;&#xD;&#xA;&#xD;&#xA;        let thing = Thing {&#xD;&#xA;            id,&#xD;&#xA;            creator: creator.clone()&#xD;&#xA;        };&#xD;&#xA;&#xD;&#xA;	    // Update storage.&#xD;&#xA;		&lt;Things&lt;T&gt;&gt;::insert(id, thing.clone());&#xD;&#xA;&#xD;&#xA;		// Emit an event.&#xD;&#xA;		Self::deposit_event(Event::ThingStored(thing, creator.clone()));&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my pallet tests, I am calling the function and would like to assert that the event deposited contains the correct data.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn it_works_for_default_value() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Dispatch a signed extrinsic.&#xD;&#xA;		assert_ok!(ThingsModule::create_thing(Origin::signed(1)));&#xD;&#xA;        let event = &lt;frame_system::Pallet&lt;Test&gt;&gt;::events().pop()&#xD;&#xA;            .expect(&quot;Expected at least one EventRecord to be found&quot;).event;&#xD;&#xA;        // How can I access the `Thing` object from the event? I'll also then use it to read from storage&#xD;&#xA;		// assert_eq!(ThingsModule::things(thing.creator).unwrap().creator, 1);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12678" PostHistoryTypeId="1" PostId="3384" RevisionGUID="325adbb2-f5c8-4dce-95fc-e0ac5eb95336" CreationDate="2022-06-21T15:10:35.373" UserId="2019" Text="How to assert deposited event in pallet call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12679" PostHistoryTypeId="3" PostId="3384" RevisionGUID="325adbb2-f5c8-4dce-95fc-e0ac5eb95336" CreationDate="2022-06-21T15:10:35.373" UserId="2019" Text="|events|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12680" PostHistoryTypeId="2" PostId="3385" RevisionGUID="48ad38d1-895a-4ece-944e-1b469b52024d" CreationDate="2022-06-21T15:24:14.000" UserId="2752" Text="When using cross contract calling on another contract which also emits&#xD;&#xA;events the events of the original contract do not work anymore.&#xD;&#xA;I get the following error. &#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;error[E0283]&lt;/b&gt;&lt;/font&gt;&lt;b&gt;: type annotations needed&lt;/b&gt;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;--&amp;gt; &lt;/b&gt;&lt;/font&gt;lib.rs:109:24&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;109&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;            self.env().emit_event(EventName {&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                       &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;^^^^^^^^^^&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;cannot infer type for type parameter `C` declared on the trait `EmitEvent`&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#73C48F&quot;&gt;&lt;b&gt;note&lt;/b&gt;&lt;/font&gt;: multiple `impl`s satisfying `ink_lang::EnvAccess&amp;lt;&amp;apos;_, ink_env::DefaultEnvironment&amp;gt;: ink_lang::codegen::EmitEvent&amp;lt;_&amp;gt;` found&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;--&amp;gt; &lt;/b&gt;&lt;/font&gt;lib.rs:5:1&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;5&lt;/b&gt;&lt;/font&gt;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;#[ink::contract]&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#73C48F&quot;&gt;&lt;b&gt;^^^^^^^^^^^^^^^^&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;= &lt;/b&gt;&lt;/font&gt;&lt;b&gt;note&lt;/b&gt;: and another `impl` found in the `other_contract` crate: `impl&amp;lt;&amp;apos;a&amp;gt; ink_lang::codegen::EmitEvent&amp;lt;other_contract::OtherContract&amp;gt; for ink_lang::EnvAccess&amp;lt;&amp;apos;a, &amp;lt;other_contract::OtherContract as ink_lang::reflect::ContractEnv&amp;gt;::Env&amp;gt;;`&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;How can I cross call contracts and emit events in both of them, without them interfering with each other?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12682" PostHistoryTypeId="1" PostId="3385" RevisionGUID="48ad38d1-895a-4ece-944e-1b469b52024d" CreationDate="2022-06-21T15:24:14.000" UserId="2752" Text="Emiting events does not work with cross contract calling" ContentLicense="CC BY-SA 4.0" />
  <row Id="12683" PostHistoryTypeId="3" PostId="3385" RevisionGUID="48ad38d1-895a-4ece-944e-1b469b52024d" CreationDate="2022-06-21T15:24:14.000" UserId="2752" Text="|ink|rust|events|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12684" PostHistoryTypeId="2" PostId="3386" RevisionGUID="53f31ae2-9260-4ef2-964b-7bb4b8b3a130" CreationDate="2022-06-21T15:27:51.007" UserId="28" Text="The FRAME System pallet has two helper functions for this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Assert the given `event` exists.&#xD;&#xA;#[cfg(any(feature = &quot;std&quot;, feature = &quot;runtime-benchmarks&quot;, test))]&#xD;&#xA;pub fn assert_has_event(event: T::Event) {&#xD;&#xA;	assert!(Self::events().iter().any(|record| record.event == event))&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Assert the last event equal to the given `event`.&#xD;&#xA;#[cfg(any(feature = &quot;std&quot;, feature = &quot;runtime-benchmarks&quot;, test))]&#xD;&#xA;pub fn assert_last_event(event: T::Event) {&#xD;&#xA;	assert_eq!(Self::events().last().expect(&quot;events expected&quot;).event, event);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see a lot of examples of these functions being used by searching the Substrate codebase, but here is one simple example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;System::assert_last_event(ProxyEvent::ProxyExecuted { result: Ok(()) }.into());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note the `.into()` at the end which converts a Pallet specific event to a more general `T::Event`." ContentLicense="CC BY-SA 4.0" />
  <row Id="12687" PostHistoryTypeId="5" PostId="3371" RevisionGUID="05186d23-a39c-465c-ae6b-948aaa1e076b" CreationDate="2022-06-21T15:49:29.363" UserId="2019" Comment="added 7142 characters in body" Text="When going through [this tutorial][1] for adding contracts to the default node template, adding `pallets-contracts-rpc`, the 4th recommended crate to install, I receive various errors. Things compile fine when only the first 3 crates are installed.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate runtime, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;Unlicense&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;pallet-randomness-collective-flip = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot;, optional = true }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;sp-block-builder = {  version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot;}&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot;}&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;sp-runtime = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;sp-std = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;sp-version = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot;, optional = true }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot;, optional = true }&#xD;&#xA;hex-literal = { version = &quot;0.3.4&quot;, optional = true }&#xD;&#xA;&#xD;&#xA;pallet-contracts = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;pallet-contracts-primitives = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;pallet-contracts-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;pallet-contracts-rpc = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;pallet-contracts/std&quot;,&#xD;&#xA;	&quot;pallet-contracts-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;hex-literal&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-template/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/socket.rs:1777:25&#xD;&#xA;       |&#xD;&#xA;  1777 | from!(net::TcpListener, Socket);&#xD;&#xA;       |                         ^^^^^^ expected struct `Socket`, found `()`&#xD;&#xA;       |&#xD;&#xA;      ::: /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:104:16&#xD;&#xA;       |&#xD;&#xA;  104  |             fn from(socket: $from) -&gt; $for {&#xD;&#xA;       |                ---- implicitly returns `()` as its body has no tail or `return` expression&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/socket.rs:1778:23&#xD;&#xA;       |&#xD;&#xA;  1778 | from!(net::UdpSocket, Socket);&#xD;&#xA;       |                       ^^^^^^ expected struct `Socket`, found `()`&#xD;&#xA;       |&#xD;&#xA;      ::: /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:104:16&#xD;&#xA;       |&#xD;&#xA;  104  |             fn from(socket: $from) -&gt; $for {&#xD;&#xA;       |                ---- implicitly returns `()` as its body has no tail or `return` expression&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/socket.rs:1779:15&#xD;&#xA;       |&#xD;&#xA;  1779 | from!(Socket, net::TcpStream);&#xD;&#xA;       |               ^^^^^^^^^^^^^^ expected struct `TcpStream`, found `()`&#xD;&#xA;       |&#xD;&#xA;      ::: /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:104:16&#xD;&#xA;       |&#xD;&#xA;  104  |             fn from(socket: $from) -&gt; $for {&#xD;&#xA;       |                ---- implicitly returns `()` as its body has no tail or `return` expression&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/socket.rs:1780:15&#xD;&#xA;       |&#xD;&#xA;  1780 | from!(Socket, net::TcpListener);&#xD;&#xA;       |               ^^^^^^^^^^^^^^^^ expected struct `TcpListener`, found `()`&#xD;&#xA;       |&#xD;&#xA;      ::: /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:104:16&#xD;&#xA;       |&#xD;&#xA;  104  |             fn from(socket: $from) -&gt; $for {&#xD;&#xA;       |                ---- implicitly returns `()` as its body has no tail or `return` expression&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/socket.rs:1781:15&#xD;&#xA;       |&#xD;&#xA;  1781 | from!(Socket, net::UdpSocket);&#xD;&#xA;       |               ^^^^^^^^^^^^^^ expected struct `UdpSocket`, found `()`&#xD;&#xA;       |&#xD;&#xA;      ::: /Users/g/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/lib.rs:104:16&#xD;&#xA;       |&#xD;&#xA;  104  |             fn from(socket: $from) -&gt; $for {&#xD;&#xA;       |                ---- implicitly returns `()` as its body has no tail or `return` expression&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems on the contracts node template that crate is not installed. https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/Cargo.toml&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/how-to-guides/v3/pallet-design/contracts-pallet/#import-the-dependencies" ContentLicense="CC BY-SA 4.0" />
  <row Id="12689" PostHistoryTypeId="2" PostId="3387" RevisionGUID="47f56c79-b486-4cee-8e63-5c58b20e9a7f" CreationDate="2022-06-21T16:04:11.737" UserId="2019" Text="I have an Event (`ThingStored`) that is deposited in a public function in my custom pallet.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, PartialEq, Clone, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;#[codec(mel_bound())]&#xD;&#xA;pub struct Thing&lt;T: Config&gt; {&#xD;&#xA;    pub id: u64,&#xD;&#xA;    // pub creator: AccountOf&lt;T&gt;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::event]&#xD;&#xA;#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    ThingStored(Thing&lt;T&gt;, T::AccountId),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`Thing` contains data that is generated by the pallet (`id`). In my tests, I call the pallet function that stores a thing and emits the event if successful. How can I read the data of the event that was emited?&#xD;&#xA;&#xD;&#xA;In this case, I will read the generated `id` from the event in order to make a subsequent call to the pallet's storage (by id).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn it_works_for_default_value() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Dispatch a signed extrinsic.&#xD;&#xA;		assert_ok!(ThingsModule::create_thing(Origin::signed(1)));&#xD;&#xA;        let emitted_stored_thing_event: Event&lt;Test&gt; = &lt;frame_system::Pallet&lt;Test&gt;&gt;::events().pop().expect(&quot;Expected at least one EventRecord to be found&quot;).event;&#xD;&#xA;        // let stored_thing: Thing;&#xD;&#xA;		// Read pallet storage and assert an expected result.&#xD;&#xA;		assert_eq!(ThingModule::things(thing.id).unwrap().creator, 1);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12691" PostHistoryTypeId="1" PostId="3387" RevisionGUID="47f56c79-b486-4cee-8e63-5c58b20e9a7f" CreationDate="2022-06-21T16:04:11.737" UserId="2019" Text="How can I access custom pallet Event data in a test?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12692" PostHistoryTypeId="3" PostId="3387" RevisionGUID="47f56c79-b486-4cee-8e63-5c58b20e9a7f" CreationDate="2022-06-21T16:04:11.737" UserId="2019" Text="|pallet|events|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12693" PostHistoryTypeId="2" PostId="3388" RevisionGUID="67f7fdb2-b2ed-4286-8dc9-bcc7cda3070f" CreationDate="2022-06-21T16:40:29.087" UserId="372" Text="## Substrate is generic over the notion of &quot;Priority&quot;&#xD;&#xA;&#xD;&#xA;The first thing to understand is that the transaction pool itself does not determine whether a transaction is valid or what a transactions priority is. The transaction pool calls into the runtime (an off-chain call) through the [`TaggedTransactionQueue` Runtime Api](https://crates.parity.io/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html) for that information.&#xD;&#xA;&#xD;&#xA;If the runtime determines that the transaction is valid it returns a [`ValidTransaction`](https://crates.parity.io/sp_runtime/transaction_validity/struct.ValidTransaction.html) struct which contains a priority.&#xD;&#xA;&#xD;&#xA;Runtime engineers can implement the priority any way they see fit, and a few standards have emerged.&#xD;&#xA;&#xD;&#xA;## FRAME's pallet_transaction_payment&#xD;&#xA;The defacto standard way to prioritize transactions in Substrate runtimes is to use [Pallet Transaction Payment](https://crates.parity.io/pallet_transaction_payment/index.html). In this pallet, fees are calculated based on resources consumed. The pallet provides a [`SignedExtension` implementation](https://crates.parity.io/pallet_transaction_payment/struct.ChargeTransactionPayment.html) which calculates priority from the fees as well as an optional flat tip amount that the user can add.&#xD;&#xA;&#xD;&#xA;This pallet is used in every chain from the Substrate node template to Polkadot itself. Typically Substrate runtimes should use this default option unless they have a reason to do otherwise.&#xD;&#xA;&#xD;&#xA;## Ethereum's Gas metering model&#xD;&#xA;In Ethereum and other smart contract blockchains resources are metered during execution, and the total resources consumed is not known until after execution. In such systems users typically specify a price _per unit of gas_ and some kind of cap is imposed to bound the computation.&#xD;&#xA;&#xD;&#xA;## EVM compatible Substrate chains are at a crossroads&#xD;&#xA;Chains like Moonbeam and Astar that are built on Substrate but support the EVM need to address the fact that while both of these systems are sound, they are not identical. Generally there are three paths you can go.&#xD;&#xA;&#xD;&#xA;#### Use the FRAME model&#xD;&#xA;&#xD;&#xA;This is not realistic because the gas metering is inherent to the EVM. Even if you hack the EVM to make it work, smart contract developers will need to target your modified EVM specifically which defeats the purpose of choosing the EVM to begin with (presuming you chose the evm to attract the existing dev ecosystem.&#xD;&#xA;&#xD;&#xA;#### Use the Ethereum model&#xD;&#xA;&#xD;&#xA;Substrate is generic enough that this could be practical especially if the EVM is the primary source of interest on your chain. You would need to remove pallet transaction payment, implement the `TaggedTransactionQueue` api appropriately, and make sure there is some reasonable way to charge for any out-of-evm transaction types your chain supports.&#xD;&#xA;&#xD;&#xA;#### Use both, but smooth the rough edge&#xD;&#xA;&#xD;&#xA;If your chain features the EVM prominently, but also has many non-evm transaction types, you could choose to use both systems together. Let's explore a potential approach below&#xD;&#xA;&#xD;&#xA;## Combining Substrate and Ethereum's native Approaches&#xD;&#xA;&#xD;&#xA;When going this route there are two key challenges to overcome&#xD;&#xA;&#xD;&#xA;1. Pallet transaction payment's tips are a single flat tip amount and are known before transaction execution. Ethereum's tips are _per gas unit_.&#xD;&#xA;&#xD;&#xA;2. Substrate's notion of [`TransactionPriority`](https://crates.parity.io/sp_runtime/transaction_validity/type.TransactionPriority.html) is just a `u64`. So the two systems we are patching together may use different orders of magnitude for their priority.&#xD;&#xA;&#xD;&#xA;The Moonbeam team chose to take this route, and I implemented the solution in https://github.com/PureStake/moonbeam/pull/581. The current code lives at https://github.com/PureStake/moonbeam/blob/81d69ac71da536bb41c98475ea0dcf0634d81198/runtime/moonbeam/src/lib.rs#L1200-L1262.&#xD;&#xA;&#xD;&#xA;The algorithm is basically like this:&#xD;&#xA;1. Let frame executive prioritize the transactions the normal way.&#xD;&#xA;2. If it is a evm transaction, that's it; return. Otherwise, overwrite the priority:&#xD;&#xA;3. Check the transaction's weight&#xD;&#xA;4. Convert the weight to an effective gas using eg. [Frontier's `GasWeightMapping`](https://paritytech.github.io/frontier/rustdocs/pallet_evm/trait.GasWeightMapping.html). This conversion itself is another place where FRAME and Ethereum differ, and additional care must be taken.&#xD;&#xA;5. Check the transaction's fee from pallet_transaction_payment.&#xD;&#xA;6. Divide to get an effective gas price.&#xD;&#xA;7. This effective gas price is the new priority - same as it is done in the evm&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12695" PostHistoryTypeId="2" PostId="3389" RevisionGUID="0b690379-5621-4c74-8afa-b4ce74db4b54" CreationDate="2022-06-21T17:17:40.143" UserId="599" Text="It is known [issue](https://github.com/paritytech/ink/issues/1000), should be fixed with [refactored events](https://github.com/paritytech/ink/pull/1243)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12698" PostHistoryTypeId="2" PostId="3390" RevisionGUID="91f584ca-622e-4973-b816-e83851979492" CreationDate="2022-06-21T18:31:19.730" UserId="28" Text="Here is a working example of a test using the `pallet-template` from the `substrate-node-template`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn stackexchange_question() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		System::set_block_number(1);&#xD;&#xA;		// Dispatch a signed extrinsic.&#xD;&#xA;		assert_ok!(TemplateModule::do_something(Origin::signed(1), 42));&#xD;&#xA;		System::assert_last_event(crate::Event::SomethingStored(42, 1).into());&#xD;&#xA;&#xD;&#xA;		let event_record: frame_system::EventRecord&lt;_, _&gt; = System::events().pop().unwrap();&#xD;&#xA;		let generic_event: crate::mock::Event = event_record.event;&#xD;&#xA;		let pallet_event: crate::Event&lt;Test&gt; = generic_event.try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		let (something, who) = match pallet_event {&#xD;&#xA;			crate::Event::SomethingStored(something, who) =&gt; (something, who),&#xD;&#xA;			_ =&gt; panic!(&quot;unexpected error&quot;)&#xD;&#xA;		};&#xD;&#xA;&#xD;&#xA;		assert_eq!(who, 1);&#xD;&#xA;		// Read pallet storage and assert an expected result.&#xD;&#xA;		assert_eq!(TemplateModule::something(), Some(something));&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Basically, by the time it gets into storage, it is manipulated in a bunch of ways, and I show you how to do all those un-manipulations above." ContentLicense="CC BY-SA 4.0" />
  <row Id="12700" PostHistoryTypeId="19" PostId="368" RevisionGUID="7adfded2-0d7f-489d-91d8-f94deed78a7c" CreationDate="2022-06-21T19:17:35.337" UserId="-1" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;}]}" />
  <row Id="12702" PostHistoryTypeId="2" PostId="3391" RevisionGUID="1420b23c-831c-42f3-8d32-82e4c1e0194d" CreationDate="2022-06-21T20:45:58.830" UserId="2019" Text="I'm using a [CountedStorageMap][1] in my custom pallet to store a map of created `Thing`s.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn things)]&#xD;&#xA;pub type Things&lt;T&gt; = CountedStorageMap&lt;Hasher = Blake2_128Concat, Key = u64, Value = Thing&lt;T&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm able to call the getter, `things(THING_ID)`, fine in my tests.&#xD;&#xA;&#xD;&#xA;`let _ = ThingsModule::things(THING_ID);`&#xD;&#xA;&#xD;&#xA;How do I call the `count` function on my pallet to assert stored totals?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.CountedStorageMap.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="12704" PostHistoryTypeId="1" PostId="3391" RevisionGUID="1420b23c-831c-42f3-8d32-82e4c1e0194d" CreationDate="2022-06-21T20:45:58.830" UserId="2019" Text="How do I call `count()` when testing my pallets `CountedStorageMap`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12705" PostHistoryTypeId="3" PostId="3391" RevisionGUID="1420b23c-831c-42f3-8d32-82e4c1e0194d" CreationDate="2022-06-21T20:45:58.830" UserId="2019" Text="|pallet|storage|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12706" PostHistoryTypeId="2" PostId="3392" RevisionGUID="5977f96b-0948-49dc-919b-04f76411f33a" CreationDate="2022-06-21T21:39:59.030" UserId="28" Text="The `count` function is on the `Things&lt;T&gt;` type so:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let count = Things::&lt;T&gt;::count();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also note that:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let _ = ThingsModule::things(THING_ID);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;is the same as:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let _ = Things::&lt;T&gt;::get();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And IMO the second syntax is preferable as it is easier to audit the different uses of `Things&lt;T&gt;`, versus some simple getter function which hides that behind some macro magic." ContentLicense="CC BY-SA 4.0" />
  <row Id="12708" PostHistoryTypeId="5" PostId="3390" RevisionGUID="dc8068b1-120c-4785-b29a-a7e908480db1" CreationDate="2022-06-21T22:36:14.453" UserId="28" Comment="added 49 characters in body" Text="Here is a working example of a test using the `pallet-template` from the `substrate-node-template`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn stackexchange_question() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// To emit events, we need to be past block 0&#xD;&#xA;		System::set_block_number(1);&#xD;&#xA;		// Dispatch a signed extrinsic.&#xD;&#xA;		assert_ok!(TemplateModule::do_something(Origin::signed(1), 42));&#xD;&#xA;		System::assert_last_event(crate::Event::SomethingStored(42, 1).into());&#xD;&#xA;&#xD;&#xA;		let event_record: frame_system::EventRecord&lt;_, _&gt; = System::events().pop().unwrap();&#xD;&#xA;		let generic_event: crate::mock::Event = event_record.event;&#xD;&#xA;		let pallet_event: crate::Event&lt;Test&gt; = generic_event.try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		let (something, who) = match pallet_event {&#xD;&#xA;			crate::Event::SomethingStored(something, who) =&gt; (something, who),&#xD;&#xA;			_ =&gt; panic!(&quot;unexpected error&quot;)&#xD;&#xA;		};&#xD;&#xA;&#xD;&#xA;		assert_eq!(who, 1);&#xD;&#xA;		// Read pallet storage and assert an expected result.&#xD;&#xA;		assert_eq!(TemplateModule::something(), Some(something));&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Basically, by the time it gets into storage, it is manipulated in a bunch of ways, and I show you how to do all those un-manipulations above." ContentLicense="CC BY-SA 4.0" />
  <row Id="12709" PostHistoryTypeId="2" PostId="3393" RevisionGUID="28749f67-2399-4404-aa87-b8d6509f194c" CreationDate="2022-06-22T01:29:44.257" UserId="2019" Text="I am using the [balances pallet][1] while testing my runtime and custom pallet(s).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;/pallets&#xD;&#xA;  /things&#xD;&#xA;    /src&#xD;&#xA;      lib.rs&#xD;&#xA;      mock.rs&#xD;&#xA;      tests.rs&#xD;&#xA;/runtime&#xD;&#xA;  /src&#xD;&#xA;    lib.rs&#xD;&#xA;    mock.rs&#xD;&#xA;    tests.rs&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// runtime/src/tests.rs&#xD;&#xA;use crate::{&#xD;&#xA;    mock::*,&#xD;&#xA;    sp_api_hidden_includes_construct_runtime::hidden_include::traits::Currency,&#xD;&#xA;};&#xD;&#xA;use frame_support::{assert_noop, assert_ok};&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn balance_pallet_works() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;        let _ = Balances::deposit_creating(&amp;1, 10);&#xD;&#xA;		assert_eq!(Balances::free_balance(1), 10);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This works. I was warned to add ` use crate::sp_api_hidden_includes_construct_runtime::hidden_include::traits::Currency` to implement (within scope) the trait requiring `deposit_creating`.&#xD;&#xA;&#xD;&#xA;However, the same pattern in `pallets/jobs/src/tests.rs` is recommending that I import from its runtime implementation mock.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// pallets/things/src/tests.rs&#xD;&#xA;use crate::{&#xD;&#xA;    mock::*,&#xD;&#xA;};&#xD;&#xA;use frame_support::{assert_err, assert_ok};&#xD;&#xA;// use crate::*mock::*sp_api_hidden_includes_construct_runtime::hidden_include::traits::Currency;&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn things_pallet_works() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;        let _ = Balances::deposit_creating(&amp;1, 100);&#xD;&#xA;		assert_eq!(Things::&lt;Test&gt;::count(), 0);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`let _ = Balances::deposit_creating(&amp;1, 100);` reports the error `use crate::mock::sp_api_hidden_includes_construct_runtime::hidden_include::traits::Currency;` which, when I `use` as suggested, errors with `error[E0603]: module sp_api_hidden_includes_construct_runtime is private`.&#xD;&#xA;&#xD;&#xA;I'm confused as to why the import recommendation is for the `crate` in my runtime tests yet `crate::mocks` for my pallet tests clearly due to a gap in my understanding of Rust's module system.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/balances/src" ContentLicense="CC BY-SA 4.0" />
  <row Id="12711" PostHistoryTypeId="1" PostId="3393" RevisionGUID="28749f67-2399-4404-aa87-b8d6509f194c" CreationDate="2022-06-22T01:29:44.257" UserId="2019" Text="How can I use `Balances::deposit_creating` in pallet tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12712" PostHistoryTypeId="3" PostId="3393" RevisionGUID="28749f67-2399-4404-aa87-b8d6509f194c" CreationDate="2022-06-22T01:29:44.257" UserId="2019" Text="|pallet|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12713" PostHistoryTypeId="2" PostId="3394" RevisionGUID="03a11ee3-96f4-471a-ac6e-918cf032c605" CreationDate="2022-06-22T01:52:29.273" UserId="523" Text="maybe you can try `mint_into` instead which is a trait method from `frame_support::traits::tokens::fungible::Mutate&lt;AccountId&gt;` if recall correct" ContentLicense="CC BY-SA 4.0" />
  <row Id="12715" PostHistoryTypeId="2" PostId="3395" RevisionGUID="14c7b692-9db9-46d5-ab84-0d070f3c40dd" CreationDate="2022-06-22T03:52:02.163" UserId="2767" Text="Thank you all and I have create the unsinged transaction successfully.&#xD;&#xA;&#xD;&#xA;The 'currencyId' parameter in the rpc request should start with &quot;Token:&quot;&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;thank you for your answer, I sent a wrong formay parameter.&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;key&quot;: &quot;//1234567890&quot;,&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;        &quot;amount&quot;: &quot;100000000&quot;,&#xD;&#xA;        &quot;dest&quot;: &quot;21WSTidgZsBVsXuoj18sErrUWfPwaoeQQsiYAuTVgm6gfDPc&quot;,&#xD;&#xA;        &quot;currencyId&quot;: {&quot;Token&quot;:&quot;ACA&quot;}&#xD;&#xA;    },&#xD;&#xA;    &quot;info&quot;: {&#xD;&#xA;        &quot;address&quot;: &quot;21WSTidgZsBVsXuoj18sErrUWfPwaoeQQsiYAuTVgm6gfDPc&quot;,&#xD;&#xA;        &quot;blockHash&quot;: &quot;0x3685800f72df765896d3149045fb878ffe04a348f671facf2af1571d90f9b5c6&quot;,&#xD;&#xA;        &quot;blockNumber&quot;: 3896290,&#xD;&#xA;        &quot;eraPeriod&quot;: 64,&#xD;&#xA;        &quot;genesisHash&quot;: &quot;0xce24ecf534daea9cd46e425659ef4950a57dd29d07272b423220129c323a64b7&quot;,&#xD;&#xA;        &quot;nonce&quot;: 34,&#xD;&#xA;        &quot;specVersion&quot;: 5004,&#xD;&#xA;        &quot;tip&quot;: 0,&#xD;&#xA;        &quot;transactionVersion&quot;: 1&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12717" PostHistoryTypeId="5" PostId="3395" RevisionGUID="3e8ed6ef-77ec-413f-86aa-1b4e21352898" CreationDate="2022-06-22T03:54:07.567" UserId="2767" Comment="deleted 70 characters in body" Text="Thank you all and I have create the unsinged transaction successfully.&#xD;&#xA;&#xD;&#xA;The 'currencyId' parameter in the rpc request should start with &quot;Token:&quot;&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;key&quot;: &quot;//1234567890&quot;,&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;        &quot;amount&quot;: &quot;100000000&quot;,&#xD;&#xA;        &quot;dest&quot;: &quot;21WSTidgZsBVsXuoj18sErrUWfPwaoeQQsiYAuTVgm6gfDPc&quot;,&#xD;&#xA;        &quot;currencyId&quot;: {&quot;Token&quot;:&quot;ACA&quot;}&#xD;&#xA;    },&#xD;&#xA;    &quot;info&quot;: {&#xD;&#xA;        &quot;address&quot;: &quot;21WSTidgZsBVsXuoj18sErrUWfPwaoeQQsiYAuTVgm6gfDPc&quot;,&#xD;&#xA;        &quot;blockHash&quot;: &quot;0x3685800f72df765896d3149045fb878ffe04a348f671facf2af1571d90f9b5c6&quot;,&#xD;&#xA;        &quot;blockNumber&quot;: 3896290,&#xD;&#xA;        &quot;eraPeriod&quot;: 64,&#xD;&#xA;        &quot;genesisHash&quot;: &quot;0xce24ecf534daea9cd46e425659ef4950a57dd29d07272b423220129c323a64b7&quot;,&#xD;&#xA;        &quot;nonce&quot;: 34,&#xD;&#xA;        &quot;specVersion&quot;: 5004,&#xD;&#xA;        &quot;tip&quot;: 0,&#xD;&#xA;        &quot;transactionVersion&quot;: 1&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12718" PostHistoryTypeId="2" PostId="3396" RevisionGUID="f3e07ff9-459c-40b5-b210-5c7eeed0f597" CreationDate="2022-06-22T04:36:58.293" UserId="2565" Text="So now that I can already capture the transaction_fees+tip and into the Author of the block.  I want to modify my transaction_fees so that I can charge for example 0.4% of whatever being transferred.  &#xD;&#xA;&#xD;&#xA;I debug the fees:&#xD;&#xA;&#xD;&#xA;    tokio-runtime-worker runtime::system: [18] length: 11 (normal 0%, op: 0%, mandatory 0%) / normal weight: 0 (0%) / op weight 0 (0%) / mandatory weight 5862211000 (0%)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12720" PostHistoryTypeId="1" PostId="3396" RevisionGUID="f3e07ff9-459c-40b5-b210-5c7eeed0f597" CreationDate="2022-06-22T04:36:58.293" UserId="2565" Text="How to modify and implement transaction fees?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12721" PostHistoryTypeId="3" PostId="3396" RevisionGUID="f3e07ff9-459c-40b5-b210-5c7eeed0f597" CreationDate="2022-06-22T04:36:58.293" UserId="2565" Text="|substrate-node-template|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12722" PostHistoryTypeId="2" PostId="3397" RevisionGUID="4ce6973f-6311-4864-9c0c-dafd6642cbcf" CreationDate="2022-06-22T07:44:37.710" UserId="2634" Text="when i study    05-private-network  &#xD;&#xA;https://github.com/substrate-developer-hub/substrate-docs/blob/main/v3/tutorials/05-private-network/index.mdx&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;success : node01&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name node01 \&#xD;&#xA;--rpc-cors all&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when i start node02 in another PC   &#xD;&#xA;Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Timeout }    &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node02 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30334 \&#xD;&#xA;--ws-port 9946 \&#xD;&#xA;--rpc-port 9934 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name node02 \&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWRsvHgi52m6jfcQ9vi7323NsfPmBUU4YA7RoQWz7ec6AT \&#xD;&#xA;--password-interactive \&#xD;&#xA;--rpc-cors all&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-06-22 15:04:18 Substrate Node    &#xD;&#xA;2022-06-22 15:04:18 ✌️  version 4.0.0-dev-681a9d8e3e8    &#xD;&#xA;2022-06-22 15:04:18 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2022    &#xD;&#xA;2022-06-22 15:04:18  Chain specification: Local Testnet    &#xD;&#xA;2022-06-22 15:04:18   Node name: node02    &#xD;&#xA;2022-06-22 15:04:18  Role: AUTHORITY    &#xD;&#xA;2022-06-22 15:04:18  Database: RocksDb at /tmp/node02/chains/local_testnet/db/full    &#xD;&#xA;2022-06-22 15:04:18 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)    &#xD;&#xA;2022-06-22 15:04:18 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2022-06-22 15:04:18   Local node identity is: 12D3KooWAhV7Hcji9w59rNyhaY3rKufNJczWrazsTYj6haTwDTAG    &#xD;&#xA;2022-06-22 15:04:18  Operating system: linux    &#xD;&#xA;2022-06-22 15:04:18  CPU architecture: x86_64    &#xD;&#xA;2022-06-22 15:04:18  Target environment: gnu    &#xD;&#xA;2022-06-22 15:04:18  CPU: AMD Ryzen 5 1600X Six-Core Processor    &#xD;&#xA;2022-06-22 15:04:18  CPU cores: 2    &#xD;&#xA;2022-06-22 15:04:18  Memory: 4550MB    &#xD;&#xA;2022-06-22 15:04:18  Kernel: 5.14.0-109.el9.x86_64    &#xD;&#xA;2022-06-22 15:04:18  Linux distribution: CentOS Stream 9    &#xD;&#xA;2022-06-22 15:04:18  Virtual machine: yes    &#xD;&#xA;2022-06-22 15:04:18  Highest known block at #0    &#xD;&#xA;2022-06-22 15:04:18 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-06-22 15:04:18 Running JSON-RPC HTTP server: addr=127.0.0.1:9934, allowed origins=None    &#xD;&#xA;2022-06-22 15:04:18 Running JSON-RPC WS server: addr=127.0.0.1:9946, allowed origins=None    &#xD;&#xA;2022-06-22 15:04:18 creating instance on iface 192.168.31.22    &#xD;&#xA;2022-06-22 15:04:18 discovered: 12D3KooWRsvHgi52m6jfcQ9vi7323NsfPmBUU4YA7RoQWz7ec6AT /ip4/192.168.31.5/tcp/30333    &#xD;&#xA;2022-06-22 15:04:18 discovered: 12D3KooWRsvHgi52m6jfcQ9vi7323NsfPmBUU4YA7RoQWz7ec6AT /ip4/127.0.0.1/tcp/30333    &#xD;&#xA;2022-06-22 15:04:18 discovered: 12D3KooWRsvHgi52m6jfcQ9vi7323NsfPmBUU4YA7RoQWz7ec6AT /ip6/::1/tcp/30333    &#xD;&#xA;2022-06-22 15:04:18 discovered: 12D3KooWRsvHgi52m6jfcQ9vi7323NsfPmBUU4YA7RoQWz7ec6AT /ip6/fe80::feaa:14ff:fe04:f3fb/tcp/30333    &#xD;&#xA;2022-06-22 15:04:23  Idle (1 peers), best: #0 (0x1fa9…6a05), finalized #0 (0x1fa9…6a05), ⬇ 0.4kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-06-22 15:04:28  Idle (1 peers), best: #0 (0x1fa9…6a05), finalized #0 (0x1fa9…6a05), ⬇ 0.2kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-06-22 15:04:33  Idle (1 peers), best: #0 (0x1fa9…6a05), finalized #0 (0x1fa9…6a05), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-06-22 15:04:38  Idle (1 peers), best: #0 (0x1fa9…6a05), finalized #0 (0x1fa9…6a05), ⬇ 58 B/s ⬆ 57 B/s    &#xD;&#xA;2022-06-22 15:04:38 ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Timeout }    &#xD;&#xA;2022-06-22 15:04:43  Idle (1 peers), best: #0 (0x1fa9…6a05), finalized #0 (0x1fa9…6a05), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-06-22 15:04:48  Idle (1 peers), best: #0 (0x1fa9…6a05), finalized #0 (0x1fa9…6a05), ⬇ 0 ⬆ 0    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/i0ham.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="12724" PostHistoryTypeId="1" PostId="3397" RevisionGUID="4ce6973f-6311-4864-9c0c-dafd6642cbcf" CreationDate="2022-06-22T07:44:37.710" UserId="2634" Text="Substrate , private network : Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F" ContentLicense="CC BY-SA 4.0" />
  <row Id="12725" PostHistoryTypeId="3" PostId="3397" RevisionGUID="4ce6973f-6311-4864-9c0c-dafd6642cbcf" CreationDate="2022-06-22T07:44:37.710" UserId="2634" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12726" PostHistoryTypeId="2" PostId="3398" RevisionGUID="a21b8aa4-a80b-4420-9419-61dd24bde5d8" CreationDate="2022-06-22T09:03:24.037" UserId="379" Text="Trying to compile a V3 macro style pallet against the latest polkadot (0.9.24) dependencies fails with error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `&lt;T as frame_system::Config&gt;::AccountId: std::default::Default` is not satisfied&#xD;&#xA;   --&gt; pallet-tft-bridge/src/lib.rs:138:1&#xD;&#xA;    |&#xD;&#xA;138 | / decl_storage! {&#xD;&#xA;139 | |     trait Store for Module&lt;T: Config&gt; as TFTBridgeModule {&#xD;&#xA;140 | |         pub Validators get(fn validator_accounts): Vec&lt;T::AccountId&gt;;&#xD;&#xA;141 | |         pub FeeAccount get(fn fee_account): T::AccountId;&#xD;&#xA;...   |&#xD;&#xA;180 | |     }&#xD;&#xA;181 | | }&#xD;&#xA;    | |_^ the trait `std::default::Default` is not implemented for `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;    |&#xD;&#xA;    = note: this error originates in the macro `decl_storage` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Do I need to rewrite my pallet using the new syntax style in 4.0.0-dev?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12728" PostHistoryTypeId="1" PostId="3398" RevisionGUID="a21b8aa4-a80b-4420-9419-61dd24bde5d8" CreationDate="2022-06-22T09:03:24.037" UserId="379" Text="V3 macro style pallet failed to compile against latest polkadot release" ContentLicense="CC BY-SA 4.0" />
  <row Id="12729" PostHistoryTypeId="3" PostId="3398" RevisionGUID="a21b8aa4-a80b-4420-9419-61dd24bde5d8" CreationDate="2022-06-22T09:03:24.037" UserId="379" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12730" PostHistoryTypeId="2" PostId="3399" RevisionGUID="c471a5c9-af78-4973-a55f-361760f9ab8b" CreationDate="2022-06-22T09:18:45.003" UserId="380" Text="We are looking to deploy a demo dapp to a live test net. Do any of these exist or are we better using a service like [onfinality](https://onfinality.io/api-service) or deploying our own test net?&#xD;&#xA;&#xD;&#xA;Data persistence is not that important. As long as we could monitor when the network restarted and redeploy and populate our contract when this happened." ContentLicense="CC BY-SA 4.0" />
  <row Id="12732" PostHistoryTypeId="1" PostId="3399" RevisionGUID="c471a5c9-af78-4973-a55f-361760f9ab8b" CreationDate="2022-06-22T09:18:45.003" UserId="380" Text="Are there any publicly available test nets that run pallet contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12733" PostHistoryTypeId="3" PostId="3399" RevisionGUID="c471a5c9-af78-4973-a55f-361760f9ab8b" CreationDate="2022-06-22T09:18:45.003" UserId="380" Text="|pallet-contracts|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12734" PostHistoryTypeId="2" PostId="3400" RevisionGUID="f3433fe4-9a43-4a99-b212-6060e5081ffb" CreationDate="2022-06-22T09:40:14.630" UserId="16" Text="[There is a rococo parachain](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-contracts-rpc.polkadot.io#/explorer) which is maintained by Parity. Instructions for its faucet can be found [along with its source code](https://github.com/paritytech/cumulus/tree/master/parachains/runtimes/contracts/contracts-rococo#rococo-deployment).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12740" PostHistoryTypeId="2" PostId="3402" RevisionGUID="f02d80b2-3f97-4b7c-b2dd-4258762e364a" CreationDate="2022-06-22T10:58:17.320" UserId="599" Text="We described available networks in the [documentation](https://docs.openbrush.io/deployment). It contains instructions on how to use each network. If something is not precise, outdated, or a new network is born, you can create an issue in [repository](https://github.com/Supercolony-net/openbrush-contracts). We will fix it=)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12742" PostHistoryTypeId="2" PostId="3403" RevisionGUID="75f0da5b-e25f-47d8-9b00-6562c77b517e" CreationDate="2022-06-22T11:37:40.720" UserId="87" Text="We've been getting some intermittent websocket connection issues on our production polkadot UI node since the upgrade to `jsonrpsee`. &#xD;&#xA;&#xD;&#xA;We are running a single Polkadot 0.9.24 container image on our K8s cluster but this has occurred with an unexpected low number of connections and this only appears to have manifested itself since the upgrade.&#xD;&#xA;&#xD;&#xA;The error message in the polkadot logs is:&#xD;&#xA;&#xD;&#xA;`WS error: i/o error: Transport endpoint is not connected (os error 107); and terminate connection 1056`&#xD;&#xA;&#xD;&#xA;the message in the k8s node is:&#xD;&#xA;&#xD;&#xA;`upstream prematurely closed connection while reading response header from upstream`&#xD;&#xA;&#xD;&#xA;Questions are:&#xD;&#xA;&#xD;&#xA;1. Do we need to configure connection limits for websockets now? In anycase how would we do that if we did want to do that - so that we can test?&#xD;&#xA;&#xD;&#xA;2. What is the default maximum number of connections that a single ui node can handle simultaneously?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12744" PostHistoryTypeId="1" PostId="3403" RevisionGUID="75f0da5b-e25f-47d8-9b00-6562c77b517e" CreationDate="2022-06-22T11:37:40.720" UserId="87" Text="Intermittent errors with jsonrpsee: WS error: i/o error: Transport endpoint is not connected (os error 107); terminate connection 1056" ContentLicense="CC BY-SA 4.0" />
  <row Id="12745" PostHistoryTypeId="3" PostId="3403" RevisionGUID="75f0da5b-e25f-47d8-9b00-6562c77b517e" CreationDate="2022-06-22T11:37:40.720" UserId="87" Text="|polkadot|json-rpc|websocket|kubernetes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12747" PostHistoryTypeId="5" PostId="3403" RevisionGUID="5fb71308-bb1c-40b3-b76b-82016927ca86" CreationDate="2022-06-22T12:13:33.843" UserId="87" Comment="SPELLING" Text="We've been getting some intermitent websocket connection issues on our production polkadot UI node since the upgrade to `jsonrpsee`. &#xD;&#xA;&#xD;&#xA;We are running a single Polkadot 0.9.24 container image on our K8s cluster but this has occurred with an unexpected low number of connections and this only appears to have manifested itself since the upgrade.&#xD;&#xA;&#xD;&#xA;The error message in the polkadot logs is:&#xD;&#xA;&#xD;&#xA;`WS error: i/o error: Transport endpoint is not connected (os error 107); and terminate connection 1056`&#xD;&#xA;&#xD;&#xA;the message in the k8s node is:&#xD;&#xA;&#xD;&#xA;`upstream prematurely closed connection while reading response header from upstream`&#xD;&#xA;&#xD;&#xA;Questions are:&#xD;&#xA;&#xD;&#xA;1. Do we need to configure connection limits for websockets now? In anycase how would we do that if we did want to do that - so that we can test?&#xD;&#xA;&#xD;&#xA;2. What is the default maximum number of connections that a single ui node can handle simultaneously?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12748" PostHistoryTypeId="4" PostId="3403" RevisionGUID="5fb71308-bb1c-40b3-b76b-82016927ca86" CreationDate="2022-06-22T12:13:33.843" UserId="87" Comment="SPELLING" Text="Intermitent errors with jsonrpsee: WS error: i/o error: Transport endpoint is not connected (os error 107); terminate connection 1056" ContentLicense="CC BY-SA 4.0" />
  <row Id="12749" PostHistoryTypeId="2" PostId="3404" RevisionGUID="0e70c7f6-beb6-461f-ad46-94eba1f4294e" CreationDate="2022-06-22T14:47:06.067" UserId="571" Text="I will try to respond with my findings and hopefully others will join with their tips &amp; tricks as well&#xD;&#xA;&#xD;&#xA; 1. Compile for concrete CPU - you can find out type of CPU of your target machine via `rustc --print target-cpus --target=x86_64-unknown-linux-gnu` (assuming x86_64 stanard CPU architecture) and then run compilation with `RUSTFLAGS=&quot;-C target-cpu=skylake&quot; cargo build --release` (for Intel Skylake series of CPUs). This results in a significant peformance gain on AMD processors, not so much on Intel.&#xD;&#xA; 2. `codegen-units = 1` - this tells Rust compiler to compile everything as a single crate (default is to compile crates in parallel to speed up the process). This allows for more optimizations to be done by compiler&#xD;&#xA; 3. `lto = fat` - this flag optimizes inter-binary linking process across all crates while increasing the compile time&#xD;&#xA;&#xD;&#xA;Also it's worth noting that makes sense to build your node on the latest nightly releases of Rust to include all potential optimizations that can come with a new `rustc` version. " ContentLicense="CC BY-SA 4.0" />
  <row Id="12751" PostHistoryTypeId="2" PostId="3405" RevisionGUID="975594cd-e0b1-4984-acfa-d678032b358f" CreationDate="2022-06-22T15:21:10.233" UserId="2065" Text="After upgrading our chain and its relevant dependencies to polkadot-v0.9.2.2 I am getting the following build error for 'tikv-jemalloc-sys v0.4.3+5.2.1-patched.2' [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is also my current rust configuration &#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;I have tried applying the solutions suggested in  https://substrate.stackexchange.com/questions/2380/problem-compiling-substrate-node-in-wsl-windows and  https://substrate.stackexchange.com/questions/2897/error-failed-to-run-custom-build-command-for-tikv-jemalloc-sys-v0-4-35-2-1-pa but still seems to get the same error. Furthermore, the problem does not seem to occur on non-WSL machines&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/U5SHA.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/4ueWs.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/xdlIO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12753" PostHistoryTypeId="1" PostId="3405" RevisionGUID="975594cd-e0b1-4984-acfa-d678032b358f" CreationDate="2022-06-22T15:21:10.233" UserId="2065" Text="Error: 'tikv-jemalloc-sys v0.4.3+5.2.1-patched.2' fails to build after upgrading substrate-based chain to polkadot-v0.9.22 on WSL2" ContentLicense="CC BY-SA 4.0" />
  <row Id="12754" PostHistoryTypeId="3" PostId="3405" RevisionGUID="975594cd-e0b1-4984-acfa-d678032b358f" CreationDate="2022-06-22T15:21:10.233" UserId="2065" Text="|error|cargo|build|wsl|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12755" PostHistoryTypeId="5" PostId="3405" RevisionGUID="3e99566e-8af7-479d-915f-9ca345aa635a" CreationDate="2022-06-22T15:26:47.937" UserId="2065" Comment="added 209 characters in body" Text="After upgrading our chain and its relevant dependencies to polkadot-v0.9.2.2 I am getting the following build error for 'tikv-jemalloc-sys v0.4.3+5.2.1-patched.2' [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I have also tried to add `parity-util-mem = { version = &quot;0.11&quot;, default-features = false, features = [&quot;jemalloc-global&quot;] }` as a dependency to our node's Cargo.toml file and it does not seem to solve the problem.&#xD;&#xA;&#xD;&#xA;Here is my current rust configuration &#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;I have tried applying the solutions suggested in  https://substrate.stackexchange.com/questions/2380/problem-compiling-substrate-node-in-wsl-windows and  https://substrate.stackexchange.com/questions/2897/error-failed-to-run-custom-build-command-for-tikv-jemalloc-sys-v0-4-35-2-1-pa but still seems to get the same error. Furthermore, the problem does not seem to occur on non-WSL machines&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/U5SHA.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/4ueWs.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/xdlIO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12756" PostHistoryTypeId="5" PostId="3405" RevisionGUID="63987e81-8675-4f97-bc70-1fef0c7fe8e4" CreationDate="2022-06-22T15:27:24.913" UserId="29" Comment="deleted 1 character in body" Text="After upgrading our chain and its relevant dependencies to polkadot-v0.9.22 I am getting the following build error for 'tikv-jemalloc-sys v0.4.3+5.2.1-patched.2' [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I have also tried to add `parity-util-mem = { version = &quot;0.11&quot;, default-features = false, features = [&quot;jemalloc-global&quot;] }` as a dependency to our node's Cargo.toml file and it does not seem to solve the problem.&#xD;&#xA;&#xD;&#xA;Here is my current rust configuration &#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;I have tried applying the solutions suggested in  https://substrate.stackexchange.com/questions/2380/problem-compiling-substrate-node-in-wsl-windows and  https://substrate.stackexchange.com/questions/2897/error-failed-to-run-custom-build-command-for-tikv-jemalloc-sys-v0-4-35-2-1-pa but still seems to get the same error. Furthermore, the problem does not seem to occur on non-WSL machines&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/U5SHA.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/4ueWs.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/xdlIO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12757" PostHistoryTypeId="2" PostId="3406" RevisionGUID="049477fa-6184-4a74-9a99-2eb794ac77fd" CreationDate="2022-06-22T15:39:28.187" UserId="28" Text="In [this PR](https://github.com/paritytech/substrate/pull/10403) the `Default` bound on `AccountId` was removed.&#xD;&#xA;&#xD;&#xA;As Ron mentioned, the answer to this is to update your code to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;decl_storage! {&#xD;&#xA;    trait Store for Module&lt;T: Config&gt; as TFTBridgeModule {&#xD;&#xA;        pub Validators get(fn validator_accounts): Vec&lt;T::AccountId&gt;;&#xD;&#xA;        pub FeeAccount get(fn fee_account): Option&lt;T::AccountId&gt;;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where `FeeAccount` returns an `Option` rather than directly the `T::AccountId` type.&#xD;&#xA;&#xD;&#xA;Another option is to use the syntax:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;decl_storage! {&#xD;&#xA;    trait Store for Module&lt;T: Config&gt; as TFTBridgeModule {&#xD;&#xA;        pub Validators get(fn validator_accounts): Vec&lt;T::AccountId&gt;;&#xD;&#xA;        pub FeeAccount get(fn fee_account): T::AccountId = SomeDefaultAccount;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where you can specify what the default value for this storage should be, which allows you to return a value without an option, but also not depend on the `Default` trait." ContentLicense="CC BY-SA 4.0" />
  <row Id="12759" PostHistoryTypeId="2" PostId="3407" RevisionGUID="1136e17b-b906-4bf6-b2d7-38a47e6f0b83" CreationDate="2022-06-22T16:05:22.050" UserId="1904" Text="The value is encoded again to a vector of bytes, so you can decode it like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let bytes: Vec&lt;u8&gt; = Decode::decode(&amp;mut &amp;input[..]).unwrap();&#xD;&#xA;let (owner, asset): (AccountId, Asset) = Decode::decode(&amp;mut &amp;bytes[..]).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see a working example [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/efinity/wasm-conf-demo/blob/master/src/mock.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="12761" PostHistoryTypeId="5" PostId="3404" RevisionGUID="d18372d5-27a5-49a1-bbfc-a8f466574eea" CreationDate="2022-06-22T16:20:40.257" UserId="29" Comment="added 1 character in body" Text="I will try to respond with my findings and hopefully others will join with their tips &amp; tricks as well&#xD;&#xA;&#xD;&#xA; 1. Compile for concrete CPU - you can find out type of CPU of your target machine via `rustc --print target-cpus --target=x86_64-unknown-linux-gnu` (assuming x86_64 standard CPU architecture) and then run compilation with `RUSTFLAGS=&quot;-C target-cpu=skylake&quot; cargo build --release` (for Intel Skylake series of CPUs). This results in a significant peformance gain on AMD processors, not so much on Intel.&#xD;&#xA; 2. `codegen-units = 1` - this tells Rust compiler to compile everything as a single crate (default is to compile crates in parallel to speed up the process). This allows for more optimizations to be done by compiler&#xD;&#xA; 3. `lto = fat` - this flag optimizes inter-binary linking process across all crates while increasing the compile time&#xD;&#xA;&#xD;&#xA;Also it's worth noting that makes sense to build your node on the latest nightly releases of Rust to include all potential optimizations that can come with a new `rustc` version. " ContentLicense="CC BY-SA 4.0" />
  <row Id="12762" PostHistoryTypeId="52" PostId="3399" RevisionGUID="cae9acff-c180-44a3-a265-0c6a06785a96" CreationDate="2022-06-22T17:18:57.417" />
  <row Id="12763" PostHistoryTypeId="2" PostId="3408" RevisionGUID="3e36fd6d-99b2-4388-9fa4-f9404903bcc4" CreationDate="2022-06-22T17:44:44.910" UserId="29" Text="I am running macOS and every so often I get the following pop up:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/tSybT.png)&#xD;&#xA;&#xD;&#xA;I believe this is the Rust Analyzer on VS Code but I am not 100% sure.&#xD;&#xA;&#xD;&#xA;I cannot get rid of it, only minimize it.&#xD;&#xA;&#xD;&#xA;Has anyone else run into this? Any way to make it disappear?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12765" PostHistoryTypeId="1" PostId="3408" RevisionGUID="3e36fd6d-99b2-4388-9fa4-f9404903bcc4" CreationDate="2022-06-22T17:44:44.910" UserId="29" Text="How to remove &quot;Verifying &quot;build-script-build&quot; pop up" ContentLicense="CC BY-SA 4.0" />
  <row Id="12766" PostHistoryTypeId="3" PostId="3408" RevisionGUID="3e36fd6d-99b2-4388-9fa4-f9404903bcc4" CreationDate="2022-06-22T17:44:44.910" UserId="29" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12767" PostHistoryTypeId="5" PostId="3356" RevisionGUID="2dffe232-e364-4f13-94dc-6cb0a83310a2" CreationDate="2022-06-22T17:46:58.903" UserId="29" Comment="edited body" Text="How many minimum validators are needed to run a substrate solochain? Is single validator enough to run a Substrate solochain, if we are not parachain?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12768" PostHistoryTypeId="2" PostId="3409" RevisionGUID="188f0810-f7ce-46f1-bf14-6987392a708f" CreationDate="2022-06-22T18:14:04.993" UserId="452" Text="I don't use VSCode so can't relate to the specific problem you're having. That said, I recently disabled support for build-scripts in rust-analyzer (and proc-macros since those imply build-script support), I did this to increase the performance of RA (less compiling needed). The relevant rust-analyzer options are `rust-analyzer.cargo.buildScripts.enable` and `rust-analyzer.procMacro.enable`, but should be set to false." ContentLicense="CC BY-SA 4.0" />
  <row Id="12770" PostHistoryTypeId="4" PostId="3379" RevisionGUID="3576b007-607d-4821-ab19-b9fb9ca12447" CreationDate="2022-06-22T18:14:46.017" UserId="452" Comment="edited title" Text="Performance tuning of Substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="12771" PostHistoryTypeId="2" PostId="3410" RevisionGUID="ea4dd7f2-8d8a-4c04-ab62-1dc968bdf369" CreationDate="2022-06-22T18:27:29.487" UserId="1780" Text="1. It depends on your usecase and the load on your RPC node. &#xD;&#xA;2. The default number of connections is 100 but it is configurable via the CLI `--ws-max-connections`.&#xD;&#xA;&#xD;&#xA;If you reach the maximum number of connections you should see: &#xD;&#xA;&#xD;&#xA;`&quot;Too many connections. Try again in a while&quot;`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; upstream prematurely closed connection while reading response header from upstream&#xD;&#xA;&#xD;&#xA;That is most likely something else related to the K8s cluster/jsonrpsee but would be good to investigate what is the cause of that as it happens &quot;sometimes&quot;.  &#xD;&#xA;&#xD;&#xA;Can you file an issue in substrate/polkadot how to reproduce this? Would be good with logs from the polkadot node/wireshark and similar." ContentLicense="CC BY-SA 4.0" />
  <row Id="12773" PostHistoryTypeId="2" PostId="3411" RevisionGUID="5c413eb4-4365-4ac6-829f-b4b0ed7a7d03" CreationDate="2022-06-22T21:13:59.237" UserId="2731" Text="I am currently trying to use the javascript api to send dot between accounts and I was wondering if there was a function/way to find out whether a transaction is finalized just based off the transaction hash. I read the docs here: https://polkadot.js.org/docs/api/start/api.tx.subs, I understand how to use the callback for status updates however I would really like a standalone function that takes in a transaction hash and outputs whether it is finalized if such a thing exists" ContentLicense="CC BY-SA 4.0" />
  <row Id="12775" PostHistoryTypeId="1" PostId="3411" RevisionGUID="5c413eb4-4365-4ac6-829f-b4b0ed7a7d03" CreationDate="2022-06-22T21:13:59.237" UserId="2731" Text="Function to see whether transaction is finalized" ContentLicense="CC BY-SA 4.0" />
  <row Id="12776" PostHistoryTypeId="3" PostId="3411" RevisionGUID="5c413eb4-4365-4ac6-829f-b4b0ed7a7d03" CreationDate="2022-06-22T21:13:59.237" UserId="2731" Text="|polkadot-js|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12777" PostHistoryTypeId="2" PostId="3412" RevisionGUID="ec6b753d-4fdc-433e-acfb-861f974bed0e" CreationDate="2022-06-23T00:15:28.267" UserId="181" Text="I have a pallet `pallet-a` whose StorageItem should be read/written by other pallets. Let's say that `StorageItem` is &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn get_commitments)]&#xD;&#xA;	pub type Commits&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageDoubleMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		CommitKey&#xD;&#xA;		Commitment&lt;T::Hash&gt;,&#xD;&#xA;		OptionQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;In a separate pallet, `pallet-b`(and in the future, when others use this), the functions of this StorageItem, should be accessible under the namespace of one of `pallet-b`'s Config associated types.&#xD;&#xA;&#xD;&#xA;I'm trying to accomplish this result by having `pallet-b`'s Config include some associated types that are bound on traits implemented in the instance of `pallet-a`. As of now, those traits just implement some functions that don't need to be elaborated on here. Just know there are `impl`s for my `Pallet` for each. E.g. just imagine something like &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	impl&lt;T: Config&lt;I&gt;, I: 'static&gt; Reveal&lt;T::AccountId, T::Hash,&gt; for Pallet&lt;T, I&gt; {&#xD;&#xA;		fn does_thing(&#xD;&#xA;			original_hash: T::Hash,&#xD;&#xA;			random_seed: u64,&#xD;&#xA;		) -&gt; &lt;T as frame_system::Config&gt;::Hash {&#xD;&#xA;// ... implementation&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The relevant portion of `pallet-b`'s config trait:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;					/* --snip-- */&#xD;&#xA;type Commitments: Reveal&lt;&lt;Self as frame_system::Config&gt;::AccountId, &lt;Self as frame_system::Config&gt;::Hash&gt;&#xD;&#xA;+ Commit&lt;Self::AccountId, &lt;Self as pallet::Config&gt;::Hash&gt;;&#xD;&#xA;					/* --snip-- */&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And: relevant portion in `Config` trait implementation in `runtime/lib.rs`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;					/* --snip-- */&#xD;&#xA;	type Commitments = Commitments; // instance of our pallet implementing traits above&#xD;&#xA;					/* --snip-- */&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, I'd like to be able to invoke functions on StorageItems inside of `pallet-b` like: &#xD;&#xA;```rust&#xD;&#xA;T::Commitments::Commits::&lt;T, I&gt;::contains_key(k1, k2);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I'm skeptical of the approach based on errors when trying this like: &#xD;&#xA;`help: use fully-qualified syntax: &lt;&lt;T as pallet::Config&gt;::Commitments as Trait&gt;::RevealWindow`.&#xD;&#xA;&#xD;&#xA;Bonus:&#xD;&#xA;I also tried adding the above-mentioned StorageItem to the trait like &#xD;&#xA;```rust&#xD;&#xA;	impl&lt;T: Config&lt;I&gt;, I: 'static&gt; Reveal&lt;T::AccountId, T::Hash,&gt; for Pallet&lt;T, I&gt; {&#xD;&#xA;		type Commits = Commits&lt;T, I&gt;;&#xD;&#xA;					/* --snip-- */&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And in `pallet-b`:&#xD;&#xA;```rust&#xD;&#xA;&lt;&lt;T as pallet::Config&gt;::Commitments as Reveal&lt;T::AccountId, &lt;T as frame_system::Config&gt;::Hash&gt;&gt;::Commits::contains_key(1, 2);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which gives: ```    = note: the following trait bounds were not satisfied:&#xD;&#xA;            `&lt;&lt;T as pallet::Config&gt;::Commitments as pallet_commitments::Reveal&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::Hash&gt;&gt;::Commits: frame_support::storage::generator::StorageMap&lt;_, _&gt;`&#xD;&#xA;            which is required by `&lt;&lt;T as pallet::Config&gt;::Commitments as pallet_commitments::Reveal&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::Hash&gt;&gt;::Commits: frame_support::StorageMap&lt;_, _&gt;```(Repeating for every type of StorageItem)&#xD;&#xA;&#xD;&#xA;I would appreciate any guidance on what I'm trying to accomplish. Can it be done through some particular trait bounds in `pallet-b`'s `Config` trait, or does it need to be an associated type on the trait in `pallet-a`? Or is a different approach recommended?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12779" PostHistoryTypeId="1" PostId="3412" RevisionGUID="ec6b753d-4fdc-433e-acfb-861f974bed0e" CreationDate="2022-06-23T00:15:28.267" UserId="181" Text="Expose StorageItems to other pallets whose types are bound on an instance of my pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="12780" PostHistoryTypeId="3" PostId="3412" RevisionGUID="ec6b753d-4fdc-433e-acfb-861f974bed0e" CreationDate="2022-06-23T00:15:28.267" UserId="181" Text="|storage|macro|config|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12784" PostHistoryTypeId="2" PostId="3413" RevisionGUID="12ffb959-e0ba-4184-ae48-7aeb1b07177c" CreationDate="2022-06-23T05:38:43.967" UserId="318" Text="Is there a command or an easy way to rollback the changes to a node's RocksDb to force the node to go back in its history and start fresh from previous block numbers? For example if the node has seen and synced with `n` blocks so far but you want to stop the node, remove whatever led to `n` and force the node to start from `n-1`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12786" PostHistoryTypeId="1" PostId="3413" RevisionGUID="12ffb959-e0ba-4184-ae48-7aeb1b07177c" CreationDate="2022-06-23T05:38:43.967" UserId="318" Text="Database rollback" ContentLicense="CC BY-SA 4.0" />
  <row Id="12787" PostHistoryTypeId="3" PostId="3413" RevisionGUID="12ffb959-e0ba-4184-ae48-7aeb1b07177c" CreationDate="2022-06-23T05:38:43.967" UserId="318" Text="|storage|rocks-db|recovery|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12788" PostHistoryTypeId="2" PostId="3414" RevisionGUID="1a13dea3-8a7e-49ad-a3f6-55f38f898118" CreationDate="2022-06-23T06:31:51.497" UserId="2777" Text="I want to connect 2 node via custom chain specification via Internet IP public&#xD;&#xA;https://docs.substrate.io/tutorials/v3/private-network/#create-a-custom-chain-specification&#xD;&#xA;&#xD;&#xA;I.STEP1: Create Aura and grandpa&#xD;&#xA;--- NODE 01----&#xD;&#xA;1.Create Aura-01:&#xD;&#xA;&#xD;&#xA;    Secret phrase:       glory icon taste syrup such guard correct occur coyote frequent thing water&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87&#xD;&#xA;      Public key (hex):  0x0adf0e0405dbc259257c2eb6700d00849a94edf496872dbea5547d236a9aff00&#xD;&#xA;      Account ID:        0x0adf0e0405dbc259257c2eb6700d00849a94edf496872dbea5547d236a9aff00&#xD;&#xA;      Public key (SS58): 5CJxbavev61VDuLbyMErtE7PvjA8osHhDkv3gKttHsSZFMdJ&#xD;&#xA;      SS58 Address:      5CJxbavev61VDuLbyMErtE7PvjA8osHhDkv3gKttHsSZFMdJ&#xD;&#xA;&#xD;&#xA;2.Create Granpa-01&#xD;&#xA;&#xD;&#xA;    Secret phrase:       glory icon taste syrup such guard correct occur coyote frequent thing water&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87&#xD;&#xA;      Public key (hex):  0x8e34ea1bd11bd532427f82daae6aa3a855fdc948136753905a74796a5b7146c8&#xD;&#xA;      Account ID:        0x8e34ea1bd11bd532427f82daae6aa3a855fdc948136753905a74796a5b7146c8&#xD;&#xA;      Public key (SS58): 5FHANk2EkM6sTeGnkZ2HaRCj356NVWg4DSJag4gsz6Jupazt&#xD;&#xA;      SS58 Address:      5FHANk2EkM6sTeGnkZ2HaRCj356NVWg4DSJag4gsz6Jupazt&#xD;&#xA;&#xD;&#xA;---NODE 02-------------------&#xD;&#xA;&#xD;&#xA;3.Create Aura-02:&#xD;&#xA;&#xD;&#xA;    Secret phrase:       praise scout author learn bounce funny pulp caution young collect whip limb&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d&#xD;&#xA;      Public key (hex):  0x16134c09a7818a590ebc5f9b336c22fe3d23e88e6449edbb996116449430be01&#xD;&#xA;      Account ID:        0x16134c09a7818a590ebc5f9b336c22fe3d23e88e6449edbb996116449430be01&#xD;&#xA;      Public key (SS58): 5CZeeFRsRSUweVkqZR3hDTN9khk3U3oa4rjaFg2S96WPpRhd&#xD;&#xA;      SS58 Address:      5CZeeFRsRSUweVkqZR3hDTN9khk3U3oa4rjaFg2S96WPpRhd&#xD;&#xA;&#xD;&#xA;4.Create Grandpa-02:&#xD;&#xA;&#xD;&#xA;    Secret phrase:       praise scout author learn bounce funny pulp caution young collect whip limb&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d&#xD;&#xA;      Public key (hex):  0x3612c18b4ae0e6b7e5b5bd79b5353cc20af70ba1302fe638884114ee0b9a7452&#xD;&#xA;      Account ID:        0x3612c18b4ae0e6b7e5b5bd79b5353cc20af70ba1302fe638884114ee0b9a7452&#xD;&#xA;      Public key (SS58): 5DHc1oW2bBAfu46v5mxNu97iWohvEvsdT2TyaBirXuQzC18F&#xD;&#xA;      SS58 Address:      5DHc1oW2bBAfu46v5mxNu97iWohvEvsdT2TyaBirXuQzC18F&#xD;&#xA;&#xD;&#xA;II.STEP 2: Node 01 Export the local chain specification to a file named customSpec.json&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template build-spec --disable-default-bootnode --chain local &gt; customSpec.json&#xD;&#xA;&#xD;&#xA;III.STEP 3: Node-01 Add Aura and grandpa both of node into customSpec.json&#xD;&#xA;IV. Convert customSpec to RAW&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode &gt; customSpecRaw.json&#xD;&#xA;&#xD;&#xA;V.Share customSpecRAW file to node-02&#xD;&#xA;&#xD;&#xA;[Link RAW file][1]&#xD;&#xA;&#xD;&#xA;VI.NODE-01 Run:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/node01 \&#xD;&#xA;    --chain ./customSpecRaw.json \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9945 \&#xD;&#xA;    --rpc-port 9933 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator \&#xD;&#xA;    --rpc-methods Unsafe \&#xD;&#xA;    --name MyNode01&#xD;&#xA;&#xD;&#xA;VII.NODE-01 Add key to Keystore with password 123456&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node01 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Sr25519 \&#xD;&#xA;    --suri '0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type aura&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node01 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Ed25519 \&#xD;&#xA;    --suri '0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type gran&#xD;&#xA;&#xD;&#xA;VIII. NODE-01 verify key&#xD;&#xA;&#xD;&#xA;    ls /tmp/node01/chains/local_testnet/keystore&#xD;&#xA;&#xD;&#xA;IX.NODE-02 run:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/node02 \&#xD;&#xA;    --chain ./customSpecRaw.json \&#xD;&#xA;    --port 30334 \&#xD;&#xA;    --ws-port 9946 \&#xD;&#xA;    --rpc-port 9934 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator \&#xD;&#xA;    --rpc-methods Unsafe \&#xD;&#xA;    --name MyNode02 \&#xD;&#xA;    --bootnodes /ip4/171.245.164.166/tcp/30333/p2p/12D3KooWBNTdqMcbcE3gqNWtvKWZWsFnHaehtMtbiq3kVeUk3JSE \&#xD;&#xA;    --password-interactive&#xD;&#xA;&#xD;&#xA;X.NODE-02 Add key to keystore with password 123456&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node02 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Sr25519 \&#xD;&#xA;    --suri '0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type aura&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node02 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Ed25519 \&#xD;&#xA;    --suri '0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type gran&#xD;&#xA;&#xD;&#xA;XI. NODE-02 verify key store&#xD;&#xA;&#xD;&#xA;    ls /tmp/node02/chains/local_testnet/keystore&#xD;&#xA;&#xD;&#xA;Result is both of node can peer without product and finalize block.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://drive.google.com/file/d/1ADk2rRhoubjmCu0jzwsbiCCj6CrImsys/view?usp=sharing&#xD;&#xA;  [2]: https://i.stack.imgur.com/klhef.png&#xD;&#xA;&#xD;&#xA;Also same problem with 3 nodes.&#xD;&#xA;Can anyone help me this issue?&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="12790" PostHistoryTypeId="1" PostId="3414" RevisionGUID="1a13dea3-8a7e-49ad-a3f6-55f38f898118" CreationDate="2022-06-23T06:31:51.497" UserId="2777" Text="Can not product and finalize block when peer 2 node" ContentLicense="CC BY-SA 4.0" />
  <row Id="12791" PostHistoryTypeId="3" PostId="3414" RevisionGUID="1a13dea3-8a7e-49ad-a3f6-55f38f898118" CreationDate="2022-06-23T06:31:51.497" UserId="2777" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12792" PostHistoryTypeId="2" PostId="3415" RevisionGUID="f3fa1965-c46f-4615-9e48-2f2929df2349" CreationDate="2022-06-23T07:18:00.010" UserId="2586" Text="I am writing a frame where I need to generate the vrf sign for the authority, this requires me to include the sp_keystore and schnorrkel in the cargo.toml of the frame.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;But then I encounter the following errors:-&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;As you can see there are some conflicts between std and no_std types.&#xD;&#xA;I understand that we cannot use std library inside the frame. Is there any way to use these creates inside the frame?  &#xD;&#xA;&#xD;&#xA;What I want to do is something like the following&#xD;&#xA;```&#xD;&#xA;	let result = SyncCryptoStore::sr25519_vrf_sign(&#xD;&#xA;		&amp;**keystore,&#xD;&#xA;		AuthorityId::ID,&#xD;&#xA;		authority_id.as_ref(),&#xD;&#xA;		transcript_data,&#xD;&#xA;	);&#xD;&#xA;```&#xD;&#xA;This works for the client. But I need to do this inside the frame and have SyncCryptoStore and Keystore be accessible inside the frame.&#xD;&#xA;&#xD;&#xA;Thank you,&#xD;&#xA;Yeou&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/E3tri.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/8seU8.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/gz0Ps.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12794" PostHistoryTypeId="1" PostId="3415" RevisionGUID="f3fa1965-c46f-4615-9e48-2f2929df2349" CreationDate="2022-06-23T07:18:00.010" UserId="2586" Text="Bring and use sp-keystore and schnorrkel inside frame" ContentLicense="CC BY-SA 4.0" />
  <row Id="12795" PostHistoryTypeId="3" PostId="3415" RevisionGUID="f3fa1965-c46f-4615-9e48-2f2929df2349" CreationDate="2022-06-23T07:18:00.010" UserId="2586" Text="|substrate-node|runtime|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12796" PostHistoryTypeId="2" PostId="3416" RevisionGUID="06f3055b-6fe6-4795-9521-1aced5b12588" CreationDate="2022-06-23T07:36:25.883" UserId="251" Text="I've seen some code like this&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;move |_, ()| async move {&#xD;&#xA;	let uncles =&#xD;&#xA;		sp_authorship::InherentDataProvider::&lt;&lt;Block as BlockT&gt;::Header&gt;::check_inherents();&#xD;&#xA;	let timestamp = sp_timestamp::InherentDataProvider::from_system_time();&#xD;&#xA;	let slot =&#xD;&#xA;		sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_duration(&#xD;&#xA;			*timestamp,&#xD;&#xA;			slot_duration,&#xD;&#xA;		);&#xD;&#xA;&#xD;&#xA;	Ok((timestamp, slot, uncles))&#xD;&#xA;},&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I don't know what it means. If I remove one of them, the node still can be compiled and running without any issue. &#xD;&#xA;&#xD;&#xA;Or I should ask what is `InherentData`. What does it use for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12798" PostHistoryTypeId="1" PostId="3416" RevisionGUID="06f3055b-6fe6-4795-9521-1aced5b12588" CreationDate="2022-06-23T07:36:25.883" UserId="251" Text="What's `InherentDataProviders`? How can I use them?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12799" PostHistoryTypeId="3" PostId="3416" RevisionGUID="06f3055b-6fe6-4795-9521-1aced5b12588" CreationDate="2022-06-23T07:36:25.883" UserId="251" Text="|inherent|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12800" PostHistoryTypeId="2" PostId="3417" RevisionGUID="f9d12648-bb99-4579-b6df-da3c42b44af4" CreationDate="2022-06-23T07:38:42.060" UserId="2777" Text="Try to use command:&#xD;&#xA;sudo make install" ContentLicense="CC BY-SA 4.0" />
  <row Id="12802" PostHistoryTypeId="5" PostId="3340" RevisionGUID="c6d8c4dc-4562-415f-9058-26dd1c875fc5" CreationDate="2022-06-23T10:25:21.027" UserId="2759" Comment="added additional information in relation to comments" Text="Without knowing much about the setup, this is how Delegator **Eve** ends up getting a reward, when a candidate **Alice** creates a block:&#xD;&#xA;&#xD;&#xA;To receive a reward, the following parameters are important:&#xD;&#xA;`defaultBlocksPerRound` (default 600) and `rewardPaymentDelay` (default 2). &#xD;&#xA;&#xD;&#xA;Using the above values, a single round goes on for `600` blocks, where **Alice** may create N (of total) number of blocks and gets points awarded for it accordingly. The storage items `round` and `points` can be used to observe the current round, and the total points that are rewarded currently to all candidates.&#xD;&#xA;&#xD;&#xA;Once a round is complete, `rewardPaymentDelay` comes into play, so **Eve** will be awarded after `2` rounds, i.e. after `1200` (2 * 600) blocks once the current round has ended. The reward will only be awarded to the candidate and their delegators that are present in the `topDelegations` storage item.&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;EventHandler implementation for staking pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_author_inherent::Config for Runtime {&#xD;&#xA;	type SlotBeacon = RelaychainBlockNumberProvider&lt;Self&gt;;&#xD;&#xA;	type AccountLookup = MoonbeamOrbiters;&#xD;&#xA;&#xD;&#xA;	type EventHandler = ParachainStaking; // This calls the staking pallet&#xD;&#xA;                                          // when a block is produced&#xD;&#xA;	type CanAuthor = AuthorFilter;&#xD;&#xA;	type WeightInfo = pallet_author_inherent::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12803" PostHistoryTypeId="2" PostId="3418" RevisionGUID="b0a71813-2bf4-477d-bcb7-4b883d6c8de5" CreationDate="2022-06-23T10:54:26.173" UserId="2770" Text="What are some very optimal tokenomics for a substrate based blockchain without any parachains that can be easily implemented using substrate's default framework ? The documentation on W3 research says to maintain (for chains without any parachains) atleast 75% of the tokens staked. &#xD;&#xA;1-If this peg is not maintained..what will happen?? other than there will be more tokens in circulation in the market.. does it affect the stability of the chain??&#xD;&#xA;2-What if we keep all the parameters same as what is described in Web3's substrate guide but only change the staking % to 50% instead of 75% that is advised ? (without parachains)&#xD;&#xA;3-Substrate docs says if staking drop below 50% the security of the network will be compromised? What does that mean? because in Polkadot tokenomics its mentioned that if staking drops below 50% the validators rewards will increase and also % of Inflation will go to treasury. Will Treasury tokens balance out the staking % decrease?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12805" PostHistoryTypeId="1" PostId="3418" RevisionGUID="b0a71813-2bf4-477d-bcb7-4b883d6c8de5" CreationDate="2022-06-23T10:54:26.173" UserId="2770" Text="Need help with Token Economics Design for Substrate based blockchain (without any Parachains)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12806" PostHistoryTypeId="3" PostId="3418" RevisionGUID="b0a71813-2bf4-477d-bcb7-4b883d6c8de5" CreationDate="2022-06-23T10:54:26.173" UserId="2770" Text="|staking|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12807" PostHistoryTypeId="2" PostId="3419" RevisionGUID="ace2e4b0-e4e9-48d4-9135-bcd23c52e4bb" CreationDate="2022-06-23T11:04:12.167" UserId="393" Text="It depends. &#xD;&#xA;&#xD;&#xA; - If block n is finalized which is the most possible case, then there's no easy way to achieve this goal. You can only fork this chain, and start a new chain. You can fork in the following ways: 1) export all blocks from old chain, and then import them into new chain. 2) use tools like fork-off-substrate, read the raw storage with blockNum = n - 1, and then write raw storage in chainspec.&#xD;&#xA; - If block n is not finalized and you can control most of the validators, which you can see has many constraints, you can run command: ./target/release/&lt;your node binary&gt; revert." ContentLicense="CC BY-SA 4.0" />
  <row Id="12809" PostHistoryTypeId="2" PostId="3420" RevisionGUID="dffc9ad8-0010-44f2-8cdd-e76b9d91ff95" CreationDate="2022-06-23T11:56:16.947" UserId="2025" Text="I think you may need to rewrite this question to make it more specific and focused on one point.&#xD;&#xA;&#xD;&#xA;It seems you are mixing to two things here:&#xD;&#xA;&#xD;&#xA; - The token economics of a Substrate based blockchain, which in principle can be any token economics, completely up to the blockchain developer to define. It could be, for example, the token economics of Bitcoin, with difficulty-adjusted PoW and halving in emission every 4 years approx.&#xD;&#xA; - The specific token economics that are defined for Polkadot (and Kusama) and discussed extensively [here](https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html). These token economics were specifically designed for a blockchain like Polkadot: a NPoS chain acting as the relay chain in an ecosystem of Parachains." ContentLicense="CC BY-SA 4.0" />
  <row Id="12811" PostHistoryTypeId="2" PostId="3421" RevisionGUID="35943590-245f-45da-9e40-53bd219d3a7d" CreationDate="2022-06-23T12:00:34.237" UserId="2355" Text="Context:&#xD;&#xA;&#xD;&#xA;I'm trying to fetch datas from an ended crowdloan.&#xD;&#xA;The crowdloan is on kusama, for parachain id 2113.&#xD;&#xA;&#xD;&#xA;I first connect:&#xD;&#xA;&#xD;&#xA;    async function connect() {&#xD;&#xA;    	let endpoint = config.endpoint;&#xD;&#xA;    		global.endpoint = endpoint;&#xD;&#xA;    		const provider = new WsProvider(endpoint);&#xD;&#xA;    		const api = await ApiPromise.create({&#xD;&#xA;                provider,&#xD;&#xA;                ...spec&#xD;&#xA;            });&#xD;&#xA;            return api;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;then fetch the addresses of the users that contributed:&#xD;&#xA;&#xD;&#xA;    async function fetchCrowdloan() {&#xD;&#xA;    	try {&#xD;&#xA;    		const api = await connect();&#xD;&#xA;    &#xD;&#xA;            console.log(await api.derive.crowdloan.contributions(2113))&#xD;&#xA;            process.exit(0)&#xD;&#xA;            // other stuff&#xD;&#xA;    	} catch (error) {&#xD;&#xA;            console.log(error)&#xD;&#xA;            process.exit(1)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Yesterday, when i ran my script, an array of the 478 users i expected to be here, was logged in the terminal. I closed my PC, went to sleep, and this morning, it doesn't work anymore, I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-06-23 12:27:51        RPC-CORE: getKeysPaged(childKey: PrefixedStorageKey, prefix: StorageKey, count: u32, startKey?: StorageKey, at?: Hash): Vec&lt;StorageKey&gt;:: creat&#xD;&#xA;eType(StorageKey):: Expected hex value to convert, found '0x'&#xD;&#xA;2022-06-23 12:27:51             DRR: createType(StorageKey):: Expected hex value to convert, found '0x'&#xD;&#xA;Error: createType(StorageKey):: Expected hex value to convert, found '0x'&#xD;&#xA;    at createTypeUnsafe (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)&#xD;&#xA;    at TypeRegistry.createTypeUnsafe (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/types/cjs/create/registry.js:333:46)&#xD;&#xA;    at /home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/rpc-core/cjs/bundle.js:395:50&#xD;&#xA;    at Array.map (&lt;anonymous&gt;)&#xD;&#xA;    at RpcCore._formatInputs (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/rpc-core/cjs/bundle.js:395:19)&#xD;&#xA;    at callWithRegistry (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/rpc-core/cjs/bundle.js:252:27)&#xD;&#xA;    at Observable._subscribe (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/rpc-core/cjs/bundle.js:266:9)&#xD;&#xA;    at Observable._trySubscribe (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/rxjs/dist/cjs/internal/Observable.js:41:25)&#xD;&#xA;    at /home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/rxjs/dist/cjs/internal/Observable.js:35:31&#xD;&#xA;    at Object.errorContext (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Was there an update in the api of kusama in the night ? How can i solve it ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12813" PostHistoryTypeId="1" PostId="3421" RevisionGUID="35943590-245f-45da-9e40-53bd219d3a7d" CreationDate="2022-06-23T12:00:34.237" UserId="2355" Text="api.derive.crowdloan.contributions: Expected hex value to convert, found '0x'" ContentLicense="CC BY-SA 4.0" />
  <row Id="12814" PostHistoryTypeId="3" PostId="3421" RevisionGUID="35943590-245f-45da-9e40-53bd219d3a7d" CreationDate="2022-06-23T12:00:34.237" UserId="2355" Text="|polkadot-js|kusama|api|crowdloan|kabocha|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12815" PostHistoryTypeId="52" PostId="3413" RevisionGUID="e96808b7-2afd-4f89-ab49-63e3ba7bf7c3" CreationDate="2022-06-23T13:59:46.960" />
  <row Id="12816" PostHistoryTypeId="4" PostId="1973" RevisionGUID="7bf8462f-5cdf-4748-811e-568ba752c2a9" CreationDate="2022-06-23T15:01:57.553" UserId="2065" Comment="edited title" Text="Using another pallet calls for FRAME-based benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="12817" PostHistoryTypeId="5" PostId="3414" RevisionGUID="73382ec1-74e7-42c1-8551-e900da88be02" CreationDate="2022-06-23T15:17:22.583" UserId="29" Comment="added 75 characters in body; edited title" Text="I want to connect 2 nodes via custom chain specification via Internet IP public&#xD;&#xA;- https://docs.substrate.io/tutorials/v3/private-network/#create-a-custom-chain-specification&#xD;&#xA;&#xD;&#xA;I. STEP 1: Create Aura and grandpa&#xD;&#xA;&#xD;&#xA;--- NODE 01----&#xD;&#xA;1. Create Aura-01:&#xD;&#xA;```&#xD;&#xA;    Secret phrase:       glory icon taste syrup such guard correct occur coyote frequent thing water&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87&#xD;&#xA;      Public key (hex):  0x0adf0e0405dbc259257c2eb6700d00849a94edf496872dbea5547d236a9aff00&#xD;&#xA;      Account ID:        0x0adf0e0405dbc259257c2eb6700d00849a94edf496872dbea5547d236a9aff00&#xD;&#xA;      Public key (SS58): 5CJxbavev61VDuLbyMErtE7PvjA8osHhDkv3gKttHsSZFMdJ&#xD;&#xA;      SS58 Address:      5CJxbavev61VDuLbyMErtE7PvjA8osHhDkv3gKttHsSZFMdJ&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Create Grandpa-01&#xD;&#xA;```&#xD;&#xA;    Secret phrase:       glory icon taste syrup such guard correct occur coyote frequent thing water&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87&#xD;&#xA;      Public key (hex):  0x8e34ea1bd11bd532427f82daae6aa3a855fdc948136753905a74796a5b7146c8&#xD;&#xA;      Account ID:        0x8e34ea1bd11bd532427f82daae6aa3a855fdc948136753905a74796a5b7146c8&#xD;&#xA;      Public key (SS58): 5FHANk2EkM6sTeGnkZ2HaRCj356NVWg4DSJag4gsz6Jupazt&#xD;&#xA;      SS58 Address:      5FHANk2EkM6sTeGnkZ2HaRCj356NVWg4DSJag4gsz6Jupazt&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---NODE 02-------------------&#xD;&#xA;&#xD;&#xA;3. Create Aura-02:&#xD;&#xA;```&#xD;&#xA;    Secret phrase:       praise scout author learn bounce funny pulp caution young collect whip limb&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d&#xD;&#xA;      Public key (hex):  0x16134c09a7818a590ebc5f9b336c22fe3d23e88e6449edbb996116449430be01&#xD;&#xA;      Account ID:        0x16134c09a7818a590ebc5f9b336c22fe3d23e88e6449edbb996116449430be01&#xD;&#xA;      Public key (SS58): 5CZeeFRsRSUweVkqZR3hDTN9khk3U3oa4rjaFg2S96WPpRhd&#xD;&#xA;      SS58 Address:      5CZeeFRsRSUweVkqZR3hDTN9khk3U3oa4rjaFg2S96WPpRhd&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;4. Create Grandpa-02:&#xD;&#xA;```&#xD;&#xA;    Secret phrase:       praise scout author learn bounce funny pulp caution young collect whip limb&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d&#xD;&#xA;      Public key (hex):  0x3612c18b4ae0e6b7e5b5bd79b5353cc20af70ba1302fe638884114ee0b9a7452&#xD;&#xA;      Account ID:        0x3612c18b4ae0e6b7e5b5bd79b5353cc20af70ba1302fe638884114ee0b9a7452&#xD;&#xA;      Public key (SS58): 5DHc1oW2bBAfu46v5mxNu97iWohvEvsdT2TyaBirXuQzC18F&#xD;&#xA;      SS58 Address:      5DHc1oW2bBAfu46v5mxNu97iWohvEvsdT2TyaBirXuQzC18F&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;II. STEP 2: Node 01 Export the local chain specification to a file named customSpec.json&#xD;&#xA;```&#xD;&#xA;    ./target/release/node-template build-spec --disable-default-bootnode --chain local &gt; customSpec.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;III. STEP 3: Node-01 Add Aura and Grandpa both of node into customSpec.json&#xD;&#xA;&#xD;&#xA;IV. Convert customSpec to RAW&#xD;&#xA;```&#xD;&#xA;    ./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode &gt; customSpecRaw.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;V.Share customSpecRAW file to node-02&#xD;&#xA;&#xD;&#xA;[Link RAW file][1]&#xD;&#xA;&#xD;&#xA;VI.NODE-01 Run:&#xD;&#xA;```&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/node01 \&#xD;&#xA;    --chain ./customSpecRaw.json \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9945 \&#xD;&#xA;    --rpc-port 9933 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator \&#xD;&#xA;    --rpc-methods Unsafe \&#xD;&#xA;    --name MyNode01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;VII.NODE-01 Add key to Keystore with password 123456&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node01 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Sr25519 \&#xD;&#xA;    --suri '0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type aura&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node01 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Ed25519 \&#xD;&#xA;    --suri '0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type gran&#xD;&#xA;&#xD;&#xA;VIII. NODE-01 verify key&#xD;&#xA;&#xD;&#xA;    ls /tmp/node01/chains/local_testnet/keystore&#xD;&#xA;&#xD;&#xA;IX.NODE-02 run:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/node02 \&#xD;&#xA;    --chain ./customSpecRaw.json \&#xD;&#xA;    --port 30334 \&#xD;&#xA;    --ws-port 9946 \&#xD;&#xA;    --rpc-port 9934 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator \&#xD;&#xA;    --rpc-methods Unsafe \&#xD;&#xA;    --name MyNode02 \&#xD;&#xA;    --bootnodes /ip4/171.245.164.166/tcp/30333/p2p/12D3KooWBNTdqMcbcE3gqNWtvKWZWsFnHaehtMtbiq3kVeUk3JSE \&#xD;&#xA;    --password-interactive&#xD;&#xA;&#xD;&#xA;X.NODE-02 Add key to keystore with password 123456&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node02 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Sr25519 \&#xD;&#xA;    --suri '0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type aura&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node02 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Ed25519 \&#xD;&#xA;    --suri '0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type gran&#xD;&#xA;&#xD;&#xA;XI. NODE-02 verify key store&#xD;&#xA;&#xD;&#xA;    ls /tmp/node02/chains/local_testnet/keystore&#xD;&#xA;&#xD;&#xA;Result is both nodes can peer without producing and finalizing blocks.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://drive.google.com/file/d/1ADk2rRhoubjmCu0jzwsbiCCj6CrImsys/view?usp=sharing&#xD;&#xA;  [2]: https://i.stack.imgur.com/klhef.png&#xD;&#xA;&#xD;&#xA;Also same problem with 3 nodes.&#xD;&#xA;Can anyone help me this issue?&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="12818" PostHistoryTypeId="4" PostId="3414" RevisionGUID="73382ec1-74e7-42c1-8551-e900da88be02" CreationDate="2022-06-23T15:17:22.583" UserId="29" Comment="added 75 characters in body; edited title" Text="Cannot produce and finalize blocks with 2 node peer" ContentLicense="CC BY-SA 4.0" />
  <row Id="12819" PostHistoryTypeId="5" PostId="3415" RevisionGUID="f04249af-54d4-40b7-af6b-fddfef1f3cb7" CreationDate="2022-06-23T15:19:14.903" UserId="29" Comment="deleted 9 characters in body" Text="I am writing a frame where I need to generate the vrf sign for the authority, this requires me to include the sp_keystore and schnorrkel in the cargo.toml of the frame.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;But then I encounter the following errors:-&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;As you can see there are some conflicts between std and no_std types.&#xD;&#xA;I understand that we cannot use std library inside the frame. Is there any way to use these crates inside frame?  &#xD;&#xA;&#xD;&#xA;What I want to do is something like the following&#xD;&#xA;```&#xD;&#xA;	let result = SyncCryptoStore::sr25519_vrf_sign(&#xD;&#xA;		&amp;**keystore,&#xD;&#xA;		AuthorityId::ID,&#xD;&#xA;		authority_id.as_ref(),&#xD;&#xA;		transcript_data,&#xD;&#xA;	);&#xD;&#xA;```&#xD;&#xA;This works for the client. But I need to do this inside frame and have SyncCryptoStore and Keystore be accessible inside the frame.&#xD;&#xA;&#xD;&#xA;Thank you,&#xD;&#xA;Yeou&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/E3tri.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/8seU8.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/gz0Ps.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12824" PostHistoryTypeId="2" PostId="3423" RevisionGUID="b4e41fef-a0c3-4e47-be40-399c07e0a587" CreationDate="2022-06-23T16:07:10.873" UserId="29" Text="`InherentDataProvider` is a type that provides data to inherents.&#xD;&#xA;&#xD;&#xA;&gt; Each inherent is added to a produced block. Each runtime decides on which inherents it wants to attach to its blocks. All data that is required for the runtime to create the inherents is stored in the `InherentData`. This `InherentData` is constructed by the node and given to the runtime.&#xD;&#xA;- [Source](https://github.com/paritytech/substrate/blob/be8bb186d87b9d2b47a2907c9b51ae1e252362c3/primitives/inherents/README.md#L3)&#xD;&#xA;&#xD;&#xA;As to the specific code that you are referencing, maybe these two PR's can help:&#xD;&#xA;- https://github.com/paritytech/substrate/issues/8029&#xD;&#xA;- https://github.com/paritytech/polkadot/pull/4973/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="12826" PostHistoryTypeId="2" PostId="3424" RevisionGUID="92dbf1a5-c780-4733-a1eb-2c2308d602d3" CreationDate="2022-06-23T16:22:12.740" UserId="29" Text="Works fine for me (`&quot;@polkadot/api&quot;: &quot;^8.8.3-9&quot;`):&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const fetchCrowdloan = async () =&gt; {&#xD;&#xA;    const wsProvider = new WsProvider('wss://kusama-rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    console.log(await api.derive.crowdloan.contributions(2113))&#xD;&#xA;    console.log((await api.derive.crowdloan.contributions(2113)).contributorsHex.length)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Output:&#xD;&#xA;```sh&#xD;&#xA;{&#xD;&#xA;  blockHash: '-',&#xD;&#xA;  contributorsHex: [&#xD;&#xA;    '0x0034622b3c63b574024d395c25c8e516c0b5d2761d0601d2545cc76f17435801',&#xD;&#xA;    '0x020fa85efa96a432e05598df7ec297921a457cf8a2a7600b92760939d9b9400d',&#xD;&#xA;    ....&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;478&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12830" PostHistoryTypeId="2" PostId="3426" RevisionGUID="7a2e38b9-e49f-4e41-ae2b-93125246ccb8" CreationDate="2022-06-23T17:22:21.820" UserId="699" Text="The correct way to revert the siblings is to use `./binary revert ...`&#xD;&#xA;Ex: `polkadot revert --chain=rococo-local 1`&#xD;&#xA;&#xD;&#xA;This was not possible for parachain due to how they treat leaves and best blocks (dependant on the relaychain), but has since been fixed (see https://github.com/paritytech/substrate/pull/11716)" ContentLicense="CC BY-SA 4.0" />
  <row Id="12833" PostHistoryTypeId="2" PostId="3427" RevisionGUID="8324ed05-5ba9-416b-8fea-c8c24765e505" CreationDate="2022-06-23T20:36:04.363" UserId="2780" Text="So from the new tutorial website: https://docs.substrate.io/tutorials/get-started/trusted-network/#generate-local-keys-using-the-node-template&#xD;&#xA;&#xD;&#xA;Few scrolls down there is a line: `./target/release/node-template \ --base-path /tmp/node01 \ --chain ./customSpecRaw.json \ --port 30333 \ --ws-port 9945 \ --rpc-port 9933 \ --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ --validator \ --rpc-methods Unsafe \ --name MyNode01`&#xD;&#xA;&#xD;&#xA;That is throwing the error? What could be solution for this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12835" PostHistoryTypeId="1" PostId="3427" RevisionGUID="8324ed05-5ba9-416b-8fea-c8c24765e505" CreationDate="2022-06-23T20:36:04.363" UserId="2780" Text="Simulate Network Tutoral" ContentLicense="CC BY-SA 4.0" />
  <row Id="12836" PostHistoryTypeId="3" PostId="3427" RevisionGUID="8324ed05-5ba9-416b-8fea-c8c24765e505" CreationDate="2022-06-23T20:36:04.363" UserId="2780" Text="|substrate-node|polkadot|substrate-node-template|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12837" PostHistoryTypeId="2" PostId="3428" RevisionGUID="e7f28906-726f-4edc-9f90-6711c263cb41" CreationDate="2022-06-23T20:37:43.087" UserId="2780" Text="I have discovered what the problem was, problem was that the `\` backslashes where included in the block of code on website, so the new code without the backslashes would look like this:`./target/release/node-template --base-path /tmp/node01 --chain ./customSpecRaw.json --port 30333 --ws-port 9945 --rpc-port 9933 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator --rpc-methods Unsafe --name MyNode01`" ContentLicense="CC BY-SA 4.0" />
  <row Id="12839" PostHistoryTypeId="5" PostId="3427" RevisionGUID="e8959b1e-92a0-4d05-9f40-76ce89c8ca9a" CreationDate="2022-06-23T20:40:01.477" UserId="2780" Comment="added 422 characters in body; edited title" Text="So from the new tutorial website: https://docs.substrate.io/tutorials/get-started/trusted-network/#generate-local-keys-using-the-node-template&#xD;&#xA;&#xD;&#xA;Few scrolls down there is a line: `./target/release/node-template \ --base-path /tmp/node01 \ --chain ./customSpecRaw.json \ --port 30333 \ --ws-port 9945 \ --rpc-port 9933 \ --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ --validator \ --rpc-methods Unsafe \ --name MyNode01`&#xD;&#xA;&#xD;&#xA;That is throwing the error? ````./target/release/node-template \ --base-path /tmp/node01 \ --chain ./customSpecRaw.json \ --port 30333 \ --ws-port 9945 \ --rpc-port 9933 \ --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ --validator \ --rpc-methods Unsafe \ --name MyNode01&#xD;&#xA;error: Found argument ' --base-path' which wasn't expected, or isn't valid in this context&#xD;&#xA;&#xD;&#xA;USAGE:&#xD;&#xA;    node-template [OPTIONS]&#xD;&#xA;    node-template &lt;SUBCOMMAND&gt;`&#xD;&#xA;&#xD;&#xA;What could be solution for this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12840" PostHistoryTypeId="4" PostId="3427" RevisionGUID="e8959b1e-92a0-4d05-9f40-76ce89c8ca9a" CreationDate="2022-06-23T20:40:01.477" UserId="2780" Comment="added 422 characters in body; edited title" Text="Simulate Network Tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="12841" PostHistoryTypeId="5" PostId="3427" RevisionGUID="1fa92b0e-57de-40f1-a275-b9ad8e0140ea" CreationDate="2022-06-23T20:40:39.570" UserId="2780" Comment="deleted 1 character in body" Text="So from the new tutorial website: https://docs.substrate.io/tutorials/get-started/trusted-network/#generate-local-keys-using-the-node-template&#xD;&#xA;&#xD;&#xA;Few scrolls down there is a line: `./target/release/node-template \ --base-path /tmp/node01 \ --chain ./customSpecRaw.json \ --port 30333 \ --ws-port 9945 \ --rpc-port 9933 \ --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ --validator \ --rpc-methods Unsafe \ --name MyNode01`&#xD;&#xA;&#xD;&#xA;That is throwing the error? `./target/release/node-template \ --base-path /tmp/node01 \ --chain ./customSpecRaw.json \ --port 30333 \ --ws-port 9945 \ --rpc-port 9933 \ --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ --validator \ --rpc-methods Unsafe \ --name MyNode01&#xD;&#xA;error: Found argument ' --base-path' which wasn't expected, or isn't valid in this context&#xD;&#xA;&#xD;&#xA;USAGE:&#xD;&#xA;    node-template [OPTIONS]&#xD;&#xA;    node-template &lt;SUBCOMMAND&gt;&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;What could be solution for this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12842" PostHistoryTypeId="5" PostId="3427" RevisionGUID="66bf43eb-af8f-4b9f-a245-f384b18c470a" CreationDate="2022-06-23T20:41:30.650" UserId="2780" Comment="deleted 4 characters in body" Text="So from the new tutorial website: https://docs.substrate.io/tutorials/get-started/trusted-network/#generate-local-keys-using-the-node-template&#xD;&#xA;&#xD;&#xA;Few scrolls down there is a line: `./target/release/node-template \ --base-path /tmp/node01 \ --chain ./customSpecRaw.json \ --port 30333 \ --ws-port 9945 \ --rpc-port 9933 \ --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ --validator \ --rpc-methods Unsafe \ --name MyNode01`&#xD;&#xA;&#xD;&#xA;That is throwing the error? `./target/release/node-template \ --base-path /tmp/node01 \ --chain ./customSpecRaw.json \ --port 30333 \ --ws-port 9945 \ --rpc-port 9933 \ --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ --validator \ --rpc-methods Unsafe \ --name MyNode01&#xD;&#xA;error: Found argument ' --base-path' which wasn't expected, or isn't valid in this context&#xD;&#xA;&#xD;&#xA;USAGE:&#xD;&#xA;    node-template [OPTIONS]&#xD;&#xA;    node-template &lt;SUBCOMMAND&gt;`&#xD;&#xA;What could be solution for this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12843" PostHistoryTypeId="10" PostId="3427" RevisionGUID="dd3cf88f-393b-4c96-8711-ee9f0e435552" CreationDate="2022-06-23T21:19:22.263" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="12844" PostHistoryTypeId="5" PostId="3414" RevisionGUID="78b83b57-bcd1-43fe-b577-d71f667e78be" CreationDate="2022-06-23T21:21:29.047" UserId="34" Comment="deleted 25 characters in body; edited tags; edited tags" Text="I want to connect 2 nodes via custom chain specification via Internet IP public&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/tutorials/get-started/trusted-network/&#xD;&#xA;&#xD;&#xA;I. STEP 1: Create Aura and grandpa&#xD;&#xA;&#xD;&#xA;--- NODE 01----&#xD;&#xA;1. Create Aura-01:&#xD;&#xA;```&#xD;&#xA;    Secret phrase:       glory icon taste syrup such guard correct occur coyote frequent thing water&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87&#xD;&#xA;      Public key (hex):  0x0adf0e0405dbc259257c2eb6700d00849a94edf496872dbea5547d236a9aff00&#xD;&#xA;      Account ID:        0x0adf0e0405dbc259257c2eb6700d00849a94edf496872dbea5547d236a9aff00&#xD;&#xA;      Public key (SS58): 5CJxbavev61VDuLbyMErtE7PvjA8osHhDkv3gKttHsSZFMdJ&#xD;&#xA;      SS58 Address:      5CJxbavev61VDuLbyMErtE7PvjA8osHhDkv3gKttHsSZFMdJ&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Create Grandpa-01&#xD;&#xA;```&#xD;&#xA;    Secret phrase:       glory icon taste syrup such guard correct occur coyote frequent thing water&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87&#xD;&#xA;      Public key (hex):  0x8e34ea1bd11bd532427f82daae6aa3a855fdc948136753905a74796a5b7146c8&#xD;&#xA;      Account ID:        0x8e34ea1bd11bd532427f82daae6aa3a855fdc948136753905a74796a5b7146c8&#xD;&#xA;      Public key (SS58): 5FHANk2EkM6sTeGnkZ2HaRCj356NVWg4DSJag4gsz6Jupazt&#xD;&#xA;      SS58 Address:      5FHANk2EkM6sTeGnkZ2HaRCj356NVWg4DSJag4gsz6Jupazt&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---NODE 02-------------------&#xD;&#xA;&#xD;&#xA;3. Create Aura-02:&#xD;&#xA;```&#xD;&#xA;    Secret phrase:       praise scout author learn bounce funny pulp caution young collect whip limb&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d&#xD;&#xA;      Public key (hex):  0x16134c09a7818a590ebc5f9b336c22fe3d23e88e6449edbb996116449430be01&#xD;&#xA;      Account ID:        0x16134c09a7818a590ebc5f9b336c22fe3d23e88e6449edbb996116449430be01&#xD;&#xA;      Public key (SS58): 5CZeeFRsRSUweVkqZR3hDTN9khk3U3oa4rjaFg2S96WPpRhd&#xD;&#xA;      SS58 Address:      5CZeeFRsRSUweVkqZR3hDTN9khk3U3oa4rjaFg2S96WPpRhd&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;4. Create Grandpa-02:&#xD;&#xA;```&#xD;&#xA;    Secret phrase:       praise scout author learn bounce funny pulp caution young collect whip limb&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d&#xD;&#xA;      Public key (hex):  0x3612c18b4ae0e6b7e5b5bd79b5353cc20af70ba1302fe638884114ee0b9a7452&#xD;&#xA;      Account ID:        0x3612c18b4ae0e6b7e5b5bd79b5353cc20af70ba1302fe638884114ee0b9a7452&#xD;&#xA;      Public key (SS58): 5DHc1oW2bBAfu46v5mxNu97iWohvEvsdT2TyaBirXuQzC18F&#xD;&#xA;      SS58 Address:      5DHc1oW2bBAfu46v5mxNu97iWohvEvsdT2TyaBirXuQzC18F&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;II. STEP 2: Node 01 Export the local chain specification to a file named customSpec.json&#xD;&#xA;```&#xD;&#xA;    ./target/release/node-template build-spec --disable-default-bootnode --chain local &gt; customSpec.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;III. STEP 3: Node-01 Add Aura and Grandpa both of node into customSpec.json&#xD;&#xA;&#xD;&#xA;IV. Convert customSpec to RAW&#xD;&#xA;```&#xD;&#xA;    ./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode &gt; customSpecRaw.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;V.Share customSpecRAW file to node-02&#xD;&#xA;&#xD;&#xA;[Link RAW file][1]&#xD;&#xA;&#xD;&#xA;VI.NODE-01 Run:&#xD;&#xA;```&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/node01 \&#xD;&#xA;    --chain ./customSpecRaw.json \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9945 \&#xD;&#xA;    --rpc-port 9933 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator \&#xD;&#xA;    --rpc-methods Unsafe \&#xD;&#xA;    --name MyNode01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;VII.NODE-01 Add key to Keystore with password 123456&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node01 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Sr25519 \&#xD;&#xA;    --suri '0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type aura&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node01 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Ed25519 \&#xD;&#xA;    --suri '0x070c94ef16c1a629ddf6b9d1416fa2665e7d5f01bd2113e61a78c53f6e5cda87' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type gran&#xD;&#xA;&#xD;&#xA;VIII. NODE-01 verify key&#xD;&#xA;&#xD;&#xA;    ls /tmp/node01/chains/local_testnet/keystore&#xD;&#xA;&#xD;&#xA;IX.NODE-02 run:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/node02 \&#xD;&#xA;    --chain ./customSpecRaw.json \&#xD;&#xA;    --port 30334 \&#xD;&#xA;    --ws-port 9946 \&#xD;&#xA;    --rpc-port 9934 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator \&#xD;&#xA;    --rpc-methods Unsafe \&#xD;&#xA;    --name MyNode02 \&#xD;&#xA;    --bootnodes /ip4/171.245.164.166/tcp/30333/p2p/12D3KooWBNTdqMcbcE3gqNWtvKWZWsFnHaehtMtbiq3kVeUk3JSE \&#xD;&#xA;    --password-interactive&#xD;&#xA;&#xD;&#xA;X.NODE-02 Add key to keystore with password 123456&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node02 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Sr25519 \&#xD;&#xA;    --suri '0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type aura&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template key insert --base-path /tmp/node02 \&#xD;&#xA;    --chain customSpecRaw.json \&#xD;&#xA;    --scheme Ed25519 \&#xD;&#xA;    --suri '0x16df58dcb530ece94270a6154c7d8ad1b3d4aebe69ce55ed2cfe620f6e357a1d' \&#xD;&#xA;    --password-interactive \&#xD;&#xA;    --key-type gran&#xD;&#xA;&#xD;&#xA;XI. NODE-02 verify key store&#xD;&#xA;&#xD;&#xA;    ls /tmp/node02/chains/local_testnet/keystore&#xD;&#xA;&#xD;&#xA;Result is both nodes can peer without producing and finalizing blocks.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://drive.google.com/file/d/1ADk2rRhoubjmCu0jzwsbiCCj6CrImsys/view?usp=sharing&#xD;&#xA;  [2]: https://i.stack.imgur.com/klhef.png&#xD;&#xA;&#xD;&#xA;Also same problem with 3 nodes.&#xD;&#xA;Can anyone help me this issue?&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="12845" PostHistoryTypeId="6" PostId="3414" RevisionGUID="78b83b57-bcd1-43fe-b577-d71f667e78be" CreationDate="2022-06-23T21:21:29.047" UserId="34" Comment="deleted 25 characters in body; edited tags; edited tags" Text="|finality|chainspec|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12852" PostHistoryTypeId="2" PostId="3430" RevisionGUID="97beea3b-9bce-4a35-bb48-f5cce28843ae" CreationDate="2022-06-24T02:31:45.473" UserId="537" Text="i`m looking for an efficient way to purge StorageDoubleMap.&#xD;&#xA;&#xD;&#xA;so lets assume i have some collection:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn provisions)]&#xD;&#xA;	pub type Provisions&lt;T: Config&gt; =&#xD;&#xA;		StorageDoubleMap&lt;_, Twox64Concat, T::AccountId, Twox64Concat, TokenId, Balance, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;that is filled with some data and now i want to remove all the entries effectively&#xD;&#xA;&#xD;&#xA;what i tried is&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(T::WeightInfo::claim_rewards())]&#xD;&#xA;		#[transactional]&#xD;&#xA;		pub fn finalize(origin: OriginFor&lt;T&gt;, limit: Option&lt;u32&gt;) -&gt; DispatchResult {&#xD;&#xA;			ensure_root(origin)?;&#xD;&#xA;&#xD;&#xA;			let mut remove_counter = 0;&#xD;&#xA;&#xD;&#xA;			for prefix in [&#xD;&#xA;				Provisions::&lt;T&gt;::prefix_hash(),&#xD;&#xA;			] {&#xD;&#xA;				match child::kill_storage(&amp;ChildInfo::new_default_from_vec(prefix), limit) {&#xD;&#xA;					KillStorageResult::AllRemoved(num_removed) | &#xD;&#xA;					KillStorageResult::SomeRemaining(num_removed) =&gt; {&#xD;&#xA;						if let Some(l) = limit {&#xD;&#xA;							remove_counter+=num_removed;&#xD;&#xA;							if  remove_counter &gt;= l {&#xD;&#xA;								Self::deposit_event(Event::PartiallyCleaned);&#xD;&#xA;								return Ok(().into())&#xD;&#xA;							}&#xD;&#xA;						}&#xD;&#xA;					}&#xD;&#xA;				};&#xD;&#xA;			}&#xD;&#xA;            Self::deposit_event(Event::Cleaned);&#xD;&#xA;			 Ok(().into())&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but it doesnt seemt to work..." ContentLicense="CC BY-SA 4.0" />
  <row Id="12854" PostHistoryTypeId="1" PostId="3430" RevisionGUID="97beea3b-9bce-4a35-bb48-f5cce28843ae" CreationDate="2022-06-24T02:31:45.473" UserId="537" Text="Whats the correct way of purging StorageDoubleMap" ContentLicense="CC BY-SA 4.0" />
  <row Id="12855" PostHistoryTypeId="3" PostId="3430" RevisionGUID="97beea3b-9bce-4a35-bb48-f5cce28843ae" CreationDate="2022-06-24T02:31:45.473" UserId="537" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12856" PostHistoryTypeId="2" PostId="3431" RevisionGUID="93236762-dcf5-4937-adfb-44a46c294397" CreationDate="2022-06-24T03:02:46.990" UserId="28" Text="`StorageDoubleMap` has a function:&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;/// Remove all value of the storage.&#xD;&#xA;	pub fn remove_all(limit: Option&lt;u32&gt;) -&gt; sp_io::KillStorageResult {&#xD;&#xA;		&lt;Self as crate::storage::StoragePrefixedMap&lt;Value&gt;&gt;::remove_all(limit)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;https://crates.parity.io/frame_support/pallet_prelude/struct.StorageDoubleMap.html#method.remove_all&#xD;&#xA;&#xD;&#xA;So you can just call `let kill_result = Provisions::&lt;T&gt;::remove_all(limit);`&#xD;&#xA;&#xD;&#xA;Then, check if `kill_result` is `AllRemoved`." ContentLicense="CC BY-SA 4.0" />
  <row Id="12859" PostHistoryTypeId="5" PostId="3410" RevisionGUID="1d5c0dca-39e5-4db9-9810-fa85a4d7d1df" CreationDate="2022-06-24T06:58:54.380" UserId="1780" Comment="deleted 393 characters in body" Text="1. It depends on your usecase and the load on your RPC node. &#xD;&#xA;2. The default number of connections is 100 but it is configurable via the CLI flag `--ws-max-connections`.&#xD;&#xA;&#xD;&#xA;If you reach the maximum number of connections you should see: &#xD;&#xA;&#xD;&#xA;`&quot;Too many connections. Try again in a while&quot;`&#xD;&#xA;&#xD;&#xA;&gt; upstream prematurely closed connection while reading response header from upstream&#xD;&#xA;&#xD;&#xA;That is most likely something else related to the K8s cluster/jsonrpsee but would be good to investigate what is the cause of that as it happens &quot;sometimes&quot;.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="12860" PostHistoryTypeId="34" PostId="3297" RevisionGUID="96c2478b-605e-4f24-9902-b499fd71ef4c" CreationDate="2022-06-24T08:06:32.377" UserId="555" Comment="9" />
  <row Id="12862" PostHistoryTypeId="2" PostId="3432" RevisionGUID="c2f78352-3c1e-41be-9f71-340772642c4d" CreationDate="2022-06-24T09:08:31.227" UserId="1789" Text="I have this hierarchy in my substrate parachain project:&#xD;&#xA;```&#xD;&#xA;my_parachain/&#xD;&#xA;├── ...&#xD;&#xA;├── runtime folder&#xD;&#xA;└── runtime-common folder&#xD;&#xA;Cargo.lock&#xD;&#xA;Cargo.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The above runtime-common has some constants and types that are used in my pallet-bridge's mock.rs and tests.rs, and also in my runtime/src/lib.rs&#xD;&#xA;&#xD;&#xA;inside the runtime-common folder:&#xD;&#xA;```&#xD;&#xA;src/&#xD;&#xA;└── lib.rs&#xD;&#xA;Cargo.toml&#xD;&#xA;```&#xD;&#xA;inside the runtime-common/src/lib.rs:&#xD;&#xA;```&#xD;&#xA;pub mod constants {&#xD;&#xA;  //use node_primitives::Balance;&#xD;&#xA;  pub type Balance = u128;//from substrate/bin/node/primitives&#xD;&#xA;  pub const MICRO_CFG: Balance = 1_000_000_000_000; // 10−6 	0.000001&#xD;&#xA;  pub const MILLI_CFG: Balance = 1_000 * MICRO_CFG; // 10−3 	0.001&#xD;&#xA;  pub const CENTI_CFG: Balance = 10 * MILLI_CFG; // 10−2 	0.01&#xD;&#xA;  pub const CFG: Balance = 100 * CENTI_CFG;&#xD;&#xA;&#xD;&#xA;  pub const NATIVE_TOKEN_TRANSFER_FEE: Balance = 2000 * CFG;&#xD;&#xA;&#xD;&#xA;  pub const NFT_TOKEN_TRANSFER_FEE: Balance = 20 * CFG;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;inside the runtime-common/Cargo.toml&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;runtime-common&quot;&#xD;&#xA;version = &quot;1.0.0&quot;&#xD;&#xA;authors = [&quot;Centrifuge&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;LGPL-3.0&quot;&#xD;&#xA;homepage = &quot;&quot;&#xD;&#xA;repository = &quot;&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can add my bridge-pallet, chainbridge, and runtime-common in runtime/Cargo.toml as dependencies:&#xD;&#xA;```&#xD;&#xA;pallet-bridge =           { path = &quot;../pallets/bridge&quot;, default-features = false }&#xD;&#xA;chainbridge = { git = &quot;https://github.com/centrifuge/chainbridge-substrate.git&quot;, default-features = false, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;runtime-common = { path = &quot;../runtime-common&quot;, default-features = false }&#xD;&#xA;```&#xD;&#xA;then `cargo check` and `cargo build` can run fine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But after adding these code inside the runtime/src/lib.rs:&#xD;&#xA;```&#xD;&#xA;pub use runtime_common::{&#xD;&#xA;  constants::{&#xD;&#xA;    CFG, NATIVE_TOKEN_TRANSFER_FEE, NFT_TOKEN_TRANSFER_FEE, Balance,&#xD;&#xA;  }&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;then I got these errors:&#xD;&#xA;```&#xD;&#xA;   Compiling h-runtime v0.0.1 (/mnt/sda3/polkadot/1pchain-chainbridge/runtime)&#xD;&#xA;error: failed to run custom build command for `h-runtime v0.0.1 (/mnt/sda3/polkadot/1pchain-chainbridge/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/mnt/sda3/polkadot/1pchain-chainbridge/target/debug/build/h-runtime-1e48817ae1228872/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/mnt/sda3/polkadot/1pchain-chainbridge/target/debug/wbuild/h-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.63.0-nightly (dc80ca78b 2022-06-21)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  warning: Patch `fc-db v2.0.0-dev (https://github.com/PNetwork/frontier?branch=patch-polkadot-v0.9.23#d7b30f9c)` was not used in the crate graph.&#xD;&#xA;  Patch `fc-mapping-sync v2.0.0-dev (https://github.com/PNetwork/frontier?branch=patch-polkadot-v0.9.23#d7b30f9c)` was not used in the crate graph.&#xD;&#xA;  Patch `fc-rpc v2.0.0-dev (https://github.com/PNetwork/frontier?branch=patch-polkadot-v0.9.23#d7b30f9c)` was not used in the crate graph.&#xD;&#xA;  Patch `fc-rpc-core v1.1.0-dev (https://github.com/PNetwork/frontier?branch=patch-polkadot-v0.9.23#d7b30f9c)` was not used in the crate graph.&#xD;&#xA;  Check that the patched package version and available features are compatible&#xD;&#xA;  with the dependency requirements. If the patch has a different version from&#xD;&#xA;  what is locked in the Cargo.lock file, run `cargo update` to use the new&#xD;&#xA;  version. This may also occur with an optional dependency that is not enabled.&#xD;&#xA;  warning: associated function is never used: `initialize`&#xD;&#xA;     --&gt; /mnt/sda3/polkadot/1pchain-chainbridge/pallets/bridge/src/lib.rs:470:5&#xD;&#xA;      |&#xD;&#xA;  470 |     fn initialize(&#xD;&#xA;      |        ^^^^^^^^^^&#xD;&#xA;      |&#xD;&#xA;      = note: `#[warn(dead_code)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: `pallet-bridge` (lib) generated 1 warning&#xD;&#xA;     Compiling h-runtime v0.0.1 (/mnt/sda3/polkadot/1pchain-chainbridge/runtime)&#xD;&#xA;  error: duplicate lang item in crate `std` (which `runtime_common` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /mnt/sda3/polkadot/1pchain-chainbridge/target/debug/wbuild/h-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-8c2aafc76099389a.rmeta&#xD;&#xA;    = note: second definition in `std` loaded from /home/user2038/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-4faf99cd6c5513da.rlib&#xD;&#xA;&#xD;&#xA;  error: duplicate lang item in crate `std` (which `runtime_common` depends on): `oom`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /mnt/sda3/polkadot/1pchain-chainbridge/target/debug/wbuild/h-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-8c2aafc76099389a.rmeta&#xD;&#xA;    = note: second definition in `std` loaded from /home/user2038/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-4faf99cd6c5513da.rlib&#xD;&#xA;&#xD;&#xA;  error: could not compile `h-runtime` due to 2 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am aware of this post https://substrate.stackexchange.com/questions/1307/how-to-resolve-duplicate-lang-item-error&#xD;&#xA;&#xD;&#xA;I have `default-features = false` in my other Cargo.toml.&#xD;&#xA;&#xD;&#xA;but for this runtime-common, I have no dependencies.&#xD;&#xA;&#xD;&#xA;how can I make std not enabled by default in my runtime-common ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12864" PostHistoryTypeId="1" PostId="3432" RevisionGUID="c2f78352-3c1e-41be-9f71-340772642c4d" CreationDate="2022-06-24T09:08:31.227" UserId="1789" Text="duplicate lang item in crate `std` (which `my_crate` depends on): `panic_impl`" ContentLicense="CC BY-SA 4.0" />
  <row Id="12865" PostHistoryTypeId="3" PostId="3432" RevisionGUID="c2f78352-3c1e-41be-9f71-340772642c4d" CreationDate="2022-06-24T09:08:31.227" UserId="1789" Text="|runtime|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12866" PostHistoryTypeId="2" PostId="3433" RevisionGUID="c6ca3d8e-f7a8-4f46-bc2a-3cf0ffd9aefb" CreationDate="2022-06-24T09:54:29.827" UserId="1789" Text="add this line in the runtime-common/src/lib.rs:&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12868" PostHistoryTypeId="2" PostId="3434" RevisionGUID="03a916ac-291d-4793-afef-6bf1c5a4bd5c" CreationDate="2022-06-24T10:01:32.927" UserId="1789" Text="If you have a local crate, add this in the lib.rs:&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you use remote crates, add `default-features = false,` in your Cargo.toml. For example:&#xD;&#xA;```&#xD;&#xA;imported_crate = { git = &quot;...&quot;, default-features = false, branch = &quot;...&quot; }&#xD;&#xA;```&#xD;&#xA;see more details about `no_std`: https://substrate.stackexchange.com/questions/1307/how-to-resolve-duplicate-lang-item-error" ContentLicense="CC BY-SA 4.0" />
  <row Id="12870" PostHistoryTypeId="5" PostId="3433" RevisionGUID="41e0ae60-e3f5-4ae6-876c-d96b0fdbaa1b" CreationDate="2022-06-24T10:02:39.843" UserId="1789" Comment="added 321 characters in body" Text="add this line in the local crate at runtime-common/src/lib.rs:&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you use remote crates, add `default-features = false,` in your Cargo.toml. For example:&#xD;&#xA;```&#xD;&#xA;imported_crate = { git = &quot;...&quot;, default-features = false, branch = &quot;...&quot; }&#xD;&#xA;```&#xD;&#xA;see more details about `no_std`: https://substrate.stackexchange.com/questions/1307/how-to-resolve-duplicate-lang-item-error" ContentLicense="CC BY-SA 4.0" />
  <row Id="12871" PostHistoryTypeId="2" PostId="3435" RevisionGUID="2859c59e-afcd-4ebb-86ef-7ade2d1708e9" CreationDate="2022-06-24T10:03:33.190" UserId="1789" Text="If you have a local crate, add this in the lib.rs:&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you use remote crates, add `default-features = false,` in your Cargo.toml. For example:&#xD;&#xA;```&#xD;&#xA;imported_crate = { git = &quot;...&quot;, default-features = false, branch = &quot;...&quot; }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12873" PostHistoryTypeId="5" PostId="3415" RevisionGUID="299d518d-9525-445a-84f1-15cf354671b8" CreationDate="2022-06-24T11:39:56.273" UserId="2586" Comment="added 118 characters in body" Text="I am writing a frame where I need to generate the vrf sign for the authority, this requires me to include the sp_keystore and schnorrkel in the cargo.toml of the frame.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;But then I encounter the following errors:-&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;As you can see there are some conflicts between std and no_std types.&#xD;&#xA;I understand that we cannot use std library inside the frame. Is there any way to use these crates inside frame?  &#xD;&#xA;&#xD;&#xA;What I want to do is something like the following&#xD;&#xA;```&#xD;&#xA;	let result = SyncCryptoStore::sr25519_vrf_sign(&#xD;&#xA;		&amp;**keystore,&#xD;&#xA;		AuthorityId::ID,&#xD;&#xA;		authority_id.as_ref(),&#xD;&#xA;		transcript_data,&#xD;&#xA;	);&#xD;&#xA;```&#xD;&#xA;This works for the client. But I need to do this inside frame and have SyncCryptoStore and Keystore be accessible inside the frame.&#xD;&#xA;&#xD;&#xA;**EDIT:** The **solution** is to use or write a host function to access client code from within the runtime/frame.&#xD;&#xA;&#xD;&#xA;Thank you,&#xD;&#xA;Yeou&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/E3tri.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/8seU8.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/gz0Ps.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="12874" PostHistoryTypeId="2" PostId="3436" RevisionGUID="a6d01643-0e24-4b49-ad88-2917b6cc7475" CreationDate="2022-06-24T12:04:27.203" UserId="452" Text="You won't have access to the keystore from within a pallet since the keystore will include state that isn't tracked in the blockchain (i.e. the keys that are stored in the keystore). Allowing access to the keystore would lead to non-determinism since the pallet would execute differently depending on what keys the users had on disk. Even if you work around this by creating an host function you will just introduce non-determinism into your runtime which will lead to consensus issues.&#xD;&#xA;&#xD;&#xA;It is possible to use the keystore from within the runtime but only for offchain workers. Have a look at the offchain worker for the `im-online` pallet since it does sign stuff with keys from the keystore (https://github.com/paritytech/substrate/blob/master/frame/im-online/src/lib.rs#L520-L540)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12876" PostHistoryTypeId="2" PostId="3437" RevisionGUID="739c6600-c1e7-4803-901f-c6843333b597" CreationDate="2022-06-24T13:47:25.440" UserId="351" Text="Grandpa works with atleast 3 nodes because its using voting system to finalize blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="12878" PostHistoryTypeId="2" PostId="3438" RevisionGUID="05559be8-39da-45f8-9ac9-6ba71c2f700b" CreationDate="2022-06-24T15:23:32.227" UserId="14" Text="Using python's `scalecodec` ([py-scale-codec](https://github.com/polkascan/py-scale-codec)), you can get it like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;from scalecodec.base import ScaleBytes&#xD;&#xA;from scalecodec.types import U32&#xD;&#xA;from scalecodec.utils.ss58 import ss58_encode&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;def get_parachain_sovereign_account(para_id):&#xD;&#xA;	scale_encoded = b'para'.hex() + U32(ScaleBytes(bytearray())).encode(para_id).to_hex()[2:]&#xD;&#xA;	public_key = f&quot;0x{scale_encoded + ''.join(['0' * (64 - len(scale_encoded))])}&quot;&#xD;&#xA;	print(&#xD;&#xA;	    f'\t  Account ID:\t{public_key}\n' + \&#xD;&#xA;	    f'\tSS58 Address:\t{ss58_encode(public_key)}'&#xD;&#xA;	)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then...&#xD;&#xA;```&#xD;&#xA;get_parachain_sovereign_account(1000)&#xD;&#xA;&gt;&gt;&gt;&#xD;&#xA;	  Account ID:	0x70617261e8030000000000000000000000000000000000000000000000000000&#xD;&#xA;	SS58 Address:	5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ&#xD;&#xA;&#xD;&#xA;get_parachain_sovereign_account(2000)&#xD;&#xA;&gt;&gt;&gt;&#xD;&#xA;	  Account ID:	0x70617261d0070000000000000000000000000000000000000000000000000000&#xD;&#xA;	SS58 Address:	5Ec4AhPUwPeyTFyuhGuBbD224mY85LKLMSqSSo33JYWCazU4&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12880" PostHistoryTypeId="2" PostId="3439" RevisionGUID="44c40d0a-d4dd-4341-b04e-71f9d14de7db" CreationDate="2022-06-24T16:06:38.763" UserId="181" Text="As given in the title, I would like to get access to an instance of the backend from a host function.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I say 'backend instance' here, I'm referring to [this][1]. I hope to call its `offchain_storage()`, and later use that offchain storage instance. My use case here is to call some host function from the runtime to retrieve some expected value stored in the node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/60b945caca440fdf6a7be96b7dc0db54923f039d/bin/node-template/node/src/service.rs#L163" ContentLicense="CC BY-SA 4.0" />
  <row Id="12882" PostHistoryTypeId="1" PostId="3439" RevisionGUID="44c40d0a-d4dd-4341-b04e-71f9d14de7db" CreationDate="2022-06-24T16:06:38.763" UserId="181" Text="How can I access a backend instance from a host function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12883" PostHistoryTypeId="3" PostId="3439" RevisionGUID="44c40d0a-d4dd-4341-b04e-71f9d14de7db" CreationDate="2022-06-24T16:06:38.763" UserId="181" Text="|offchain-storage|host-functions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12884" PostHistoryTypeId="5" PostId="3421" RevisionGUID="4aeb5fe2-0700-4589-9879-8cb410e9692f" CreationDate="2022-06-24T16:20:31.833" UserId="2355" Comment="added 98 characters in body" Text="Context:&#xD;&#xA;&#xD;&#xA;I'm trying to fetch datas from an ended crowdloan.&#xD;&#xA;The crowdloan is on kusama, for parachain id 2113.&#xD;&#xA;&#xD;&#xA;I first connect:&#xD;&#xA;&#xD;&#xA;    async function connect() {&#xD;&#xA;    	let endpoint = config.endpoint;&#xD;&#xA;    		global.endpoint = endpoint;&#xD;&#xA;    		const provider = new WsProvider(endpoint);&#xD;&#xA;    		const api = await ApiPromise.create({&#xD;&#xA;                provider,&#xD;&#xA;                ...spec&#xD;&#xA;            });&#xD;&#xA;            return api;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;then fetch the addresses of the users that contributed:&#xD;&#xA;&#xD;&#xA;    async function fetchCrowdloan() {&#xD;&#xA;    	try {&#xD;&#xA;    		const api = await connect();&#xD;&#xA;    &#xD;&#xA;            console.log(await api.derive.crowdloan.contributions(2113))&#xD;&#xA;            process.exit(0)&#xD;&#xA;            // other stuff&#xD;&#xA;    	} catch (error) {&#xD;&#xA;            console.log(error)&#xD;&#xA;            process.exit(1)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Yesterday, when i ran my script, an array of the 478 users i expected to be here, was logged in the terminal. I closed my PC, went to sleep, and this morning, it doesn't work anymore, I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-06-23 12:27:51        RPC-CORE: getKeysPaged(childKey: PrefixedStorageKey, prefix: StorageKey, count: u32, startKey?: StorageKey, at?: Hash): Vec&lt;StorageKey&gt;:: creat&#xD;&#xA;eType(StorageKey):: Expected hex value to convert, found '0x'&#xD;&#xA;2022-06-23 12:27:51             DRR: createType(StorageKey):: Expected hex value to convert, found '0x'&#xD;&#xA;Error: createType(StorageKey):: Expected hex value to convert, found '0x'&#xD;&#xA;    at createTypeUnsafe (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/types-create/cjs/create/type.js:73:18)&#xD;&#xA;    at TypeRegistry.createTypeUnsafe (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/types/cjs/create/registry.js:333:46)&#xD;&#xA;    at /home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/rpc-core/cjs/bundle.js:395:50&#xD;&#xA;    at Array.map (&lt;anonymous&gt;)&#xD;&#xA;    at RpcCore._formatInputs (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/rpc-core/cjs/bundle.js:395:19)&#xD;&#xA;    at callWithRegistry (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/rpc-core/cjs/bundle.js:252:27)&#xD;&#xA;    at Observable._subscribe (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/@polkadot/rpc-core/cjs/bundle.js:266:9)&#xD;&#xA;    at Observable._trySubscribe (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/rxjs/dist/cjs/internal/Observable.js:41:25)&#xD;&#xA;    at /home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/rxjs/dist/cjs/internal/Observable.js:35:31&#xD;&#xA;    at Object.errorContext (/home/erudyx/work/rusty-crewmates/polkadot/kusama-crowdloan-snapshot/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Was there an update in the api of kusama in the night ? How can i solve it ?&#xD;&#xA;&#xD;&#xA;Update: all of the other calls are working fine, it's really just the `contribution()`function" ContentLicense="CC BY-SA 4.0" />
  <row Id="12885" PostHistoryTypeId="2" PostId="3440" RevisionGUID="7781f2f0-adb7-4e2f-a49a-6d3f9125aa9e" CreationDate="2022-06-24T16:27:59.893" UserId="452" Text="Offchain storage isn't part of consensus and therefore making the runtime access such storage would lead to non-determinism (since different nodes could have different data there). &#xD;&#xA;&#xD;&#xA;If you want to access offchain storage from within an offchain worker then that is already possible without adding new host functions: https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-local-storage/. &#xD;&#xA;&#xD;&#xA;If you really want to bring in data from offchain storage into the chain then it must be done by submitting an extrinsic with the given data." ContentLicense="CC BY-SA 4.0" />
  <row Id="12891" PostHistoryTypeId="5" PostId="3438" RevisionGUID="0e5114a9-624a-49c8-8658-fd2a89b113fc" CreationDate="2022-06-24T19:03:43.837" UserId="14" Comment="added 42 characters in body" Text="Using python's `scalecodec` ([py-scale-codec](https://github.com/polkascan/py-scale-codec)), you can get it like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;from scalecodec.base import ScaleBytes&#xD;&#xA;from scalecodec.types import U32&#xD;&#xA;from scalecodec.utils.ss58 import ss58_encode&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;def get_parachain_sovereign_account(para_id, chain_type='para'):&#xD;&#xA;	scale_encoded = chain_type.encode().hex()&#xD;&#xA;	scale_encoded += U32(ScaleBytes(bytearray())).encode(para_id).to_hex()[2:]&#xD;&#xA;	public_key = f&quot;0x{scale_encoded + ''.join(['0' * (64 - len(scale_encoded))])}&quot;&#xD;&#xA;	print(&#xD;&#xA;		f'\t  Account ID:\t{public_key}\n' + \&#xD;&#xA;		f'\tSS58 Address:\t{ss58_encode(public_key)}'&#xD;&#xA;	)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then...&#xD;&#xA;```&#xD;&#xA;get_parachain_sovereign_account(1000)&#xD;&#xA;&gt;&gt;&gt;&#xD;&#xA;	  Account ID:	0x70617261e8030000000000000000000000000000000000000000000000000000&#xD;&#xA;	SS58 Address:	5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ&#xD;&#xA;&#xD;&#xA;get_parachain_sovereign_account(2000)&#xD;&#xA;&gt;&gt;&gt;&#xD;&#xA;	  Account ID:	0x70617261d0070000000000000000000000000000000000000000000000000000&#xD;&#xA;	SS58 Address:	5Ec4AhPUwPeyTFyuhGuBbD224mY85LKLMSqSSo33JYWCazU4&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12892" PostHistoryTypeId="2" PostId="3442" RevisionGUID="2e6b240f-188f-4bab-89c1-a8585f093188" CreationDate="2022-06-24T20:49:27.890" UserId="2678" Text="We are trying to run the docker solution available for the substrate-node-template but are hitting a crash, only on M1 Macs.&#xD;&#xA;&#xD;&#xA;To repro, from the substrate-node-template repository, we added&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;touch .local&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;to line 9 of ./scripts/docker_run.sh&#xD;&#xA;&#xD;&#xA;and run:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./scripts/init.sh&#xD;&#xA;./scripts/docker_run.sh&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On the M1 Mac, it is crashing while updating crates.io index and the output is as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;MacBook-Pro ~/d/substrate-node-template (main)&gt; ./scripts/docker_run.sh&#xD;&#xA;*** Start Substrate node template ***&#xD;&#xA;[+] Running 2/2&#xD;&#xA; ⠿ Container node-template                  Removed                                                                                                                                                              0.0s&#xD;&#xA; ⠿ Network substrate-node-template_default  Removed                                                                                                                                                              0.1s&#xD;&#xA;[+] Running 1/0&#xD;&#xA; ⠿ Network substrate-node-template_default  Created                                                                                                                                                              0.0s&#xD;&#xA;    Updating crates.io index&#xD;&#xA;bash: line 1:     8 Killed                  cargo build --release   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We have tried upping the RAM and swap space available in Docker to 16GB and 4GB respectively and this still failed. We are able to run these commands successfully on non-M1 macs.&#xD;&#xA;&#xD;&#xA;Is anyone aware of a solution for this compatibility issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12894" PostHistoryTypeId="1" PostId="3442" RevisionGUID="2e6b240f-188f-4bab-89c1-a8585f093188" CreationDate="2022-06-24T20:49:27.890" UserId="2678" Text="Substrate-Node-Template Docker crashes on M1 Macs" ContentLicense="CC BY-SA 4.0" />
  <row Id="12895" PostHistoryTypeId="3" PostId="3442" RevisionGUID="2e6b240f-188f-4bab-89c1-a8585f093188" CreationDate="2022-06-24T20:49:27.890" UserId="2678" Text="|substrate-node-template|docker|macos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12896" PostHistoryTypeId="33" PostId="3379" RevisionGUID="712a8730-7832-45db-9ba0-5db085363d9e" CreationDate="2022-06-24T21:37:19.947" UserId="571" Comment="10" />
  <row Id="12897" PostHistoryTypeId="2" PostId="3443" RevisionGUID="43609d70-6c23-4222-8c56-d7dfcc3aae8f" CreationDate="2022-06-24T21:49:00.463" UserId="29" Text="That script is not compatible with Mac's.&#xD;&#xA;&#xD;&#xA;See here: &#xD;&#xA;&gt; This script is meant to be run on Unix/Linux based systems&#xD;&#xA;&#xD;&#xA;Source: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/scripts/docker_run.sh#L2&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I ran into a similar conundrum recently:&#xD;&#xA;- https://github.com/paritytech/cumulus/pull/1336#issuecomment-1164730969" ContentLicense="CC BY-SA 4.0" />
  <row Id="12899" PostHistoryTypeId="5" PostId="3443" RevisionGUID="1be7ddac-20b8-4902-a139-3287f673cc63" CreationDate="2022-06-24T22:28:17.717" UserId="29" Comment="Technically Mac's are UNIX-based..." Text="That script is not compatible with Mac's.&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-node-template/blob/main/docker-compose.yml#L6&#xD;&#xA;&#xD;&#xA;It is compiled for Linux.&#xD;&#xA;&#xD;&#xA;I ran into a similar conundrum recently:&#xD;&#xA;- https://github.com/paritytech/cumulus/pull/1336#issuecomment-1164730969" ContentLicense="CC BY-SA 4.0" />
  <row Id="12900" PostHistoryTypeId="2" PostId="3444" RevisionGUID="a1c4004d-5103-4a22-962e-b4df93631663" CreationDate="2022-06-24T23:47:37.803" UserId="2565" Text="Do not use &quot;key insert&quot;.  It does not work!  Go to polkadot.js and use RPC Calls/Authors/Insert Keys.&#xD;&#xA;&#xD;&#xA;Make sure to connect to the appropriate node while inserting their keys.  &#xD;&#xA;&#xD;&#xA;Make sure to purge also, you might have inserted invalid keys in there.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12905" PostHistoryTypeId="52" PostId="3442" RevisionGUID="864d4711-c109-4dfa-9fe4-045c6c087c21" CreationDate="2022-06-25T04:50:33.677" />
  <row Id="12906" PostHistoryTypeId="2" PostId="3445" RevisionGUID="d3198937-758a-4773-a30e-75e821deacfa" CreationDate="2022-06-25T11:45:29.937" UserId="2784" Text=" follow the tutorial https://docs.substrate.io/tutorials/get-started/simulate-network/ ,when  i running the following command:&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;I got `RuntimeApiError` error:&#xD;&#xA;```&#xD;&#xA;2022-06-25 18:59:19 Substrate Node    &#xD;&#xA;2022-06-25 18:59:19 ✌️  version 4.0.0-dev-681a9d8e3e8    &#xD;&#xA;2022-06-25 18:59:19 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2022    &#xD;&#xA;2022-06-25 18:59:19  Chain specification: Local Testnet    &#xD;&#xA;2022-06-25 18:59:19   Node name: Alice    &#xD;&#xA;2022-06-25 18:59:19  Role: AUTHORITY    &#xD;&#xA;2022-06-25 18:59:19  Database: RocksDb at /tmp/alice/chains/local_testnet/db/full    &#xD;&#xA;2022-06-25 18:59:19 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)    &#xD;&#xA;2022-06-25 18:59:31  Initializing Genesis block/state (state: 0xea25…5836, header-hash: 0xa711…99ac)    &#xD;&#xA;2022-06-25 18:59:31  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-06-25 18:59:32 Essential task `txpool-background` failed. Shutting down service.    &#xD;&#xA;Error: Service(Client(RuntimeApiError(Application(Execution(RuntimeConstruction(Other(&quot;failed to instantiate a new WASM module instance: Insufficient resources: cannot create a memfd&quot;)))))))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;my development environment:&#xD;&#xA;&#xD;&#xA;`rustup show`&#xD;&#xA;```&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /home/little/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.61.0 (fe5b13d68 2022-05-18)&#xD;&#xA;```&#xD;&#xA;`rustup +nightly show`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /home/little/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-x86_64-unknown-linux-gnu (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.63.0-nightly (43347397f 2022-06-23)&#xD;&#xA;```&#xD;&#xA;Ubuntu Memory&#xD;&#xA;```&#xD;&#xA;              total        used        free      shared  buff/cache   available&#xD;&#xA;Mem:          16259        7315        8720          17         223        8813&#xD;&#xA;Swap:         25514          54       25459&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12908" PostHistoryTypeId="1" PostId="3445" RevisionGUID="d3198937-758a-4773-a30e-75e821deacfa" CreationDate="2022-06-25T11:45:29.937" UserId="2784" Text="cannot create a memfd error with Ubuntu 20.04 on windows10 wsl1" ContentLicense="CC BY-SA 4.0" />
  <row Id="12909" PostHistoryTypeId="3" PostId="3445" RevisionGUID="d3198937-758a-4773-a30e-75e821deacfa" CreationDate="2022-06-25T11:45:29.937" UserId="2784" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12910" PostHistoryTypeId="2" PostId="3446" RevisionGUID="8de4560b-74b6-4875-bf2a-a6bd07615744" CreationDate="2022-06-25T13:04:48.083" UserId="408" Text="It was identified as a bug.&#xD;&#xA;&#xD;&#xA;See: &#xD;&#xA;&#xD;&#xA;- https://github.com/polkadot-js/api/issues/4981&#xD;&#xA;- https://github.com/polkadot-js/common/pull/1567&#xD;&#xA;&#xD;&#xA;There is nothing wrong on your side. Wait for the fix to land and upgrade your @polkadot/api to a newer version." ContentLicense="CC BY-SA 4.0" />
  <row Id="12912" PostHistoryTypeId="2" PostId="3447" RevisionGUID="174967e0-993a-42f6-a524-1c285095448a" CreationDate="2022-06-25T13:32:04.590" UserId="408" Text="You should probably try the `web3Accounts` method first.&#xD;&#xA;&#xD;&#xA;According to @polkadot/extension-dapp package's [document](https://www.npmjs.com/package/@polkadot/extension-dapp/v/0.33.2), here are the differences&#xD;&#xA;&#xD;&#xA;- `web3Accounts(): Promise&lt;InjectedAccountWithMeta[]&gt;` - returns a list of all the injected accounts, accross all extensions (source in meta)&#xD;&#xA;- `web3FromSource(name: string): Promise&lt;InjectedExtension&gt;` - Retrieves a provider identified by the name&#xD;&#xA;&#xD;&#xA;If you choose `web3FromSource`, make sure you pass to it the correct extension name. &#xD;&#xA;&#xD;&#xA;In the case of Polkadot.js extension, the name should be `polkadot-js`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const injector = await web3FromSource('polkadot-js');&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12914" PostHistoryTypeId="5" PostId="3360" RevisionGUID="47f74bcf-30e4-4502-89fe-1e4c1c7bf2ee" CreationDate="2022-06-25T15:59:30.967" UserId="1824" Comment="Added more context around the chain extension" Text="I'm trying to use the Scheduler pallet to schedule a call to the Contracts pallet as part&#xD;&#xA;of a chain extension implementation.&#xD;&#xA;&#xD;&#xA;I've managed to get the following to compile and execute:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// In `runtime/src/chain_extension.rs`&#xD;&#xA;pub struct MyExtension;&#xD;&#xA;&#xD;&#xA;impl&lt;T&gt; ChainExtension&lt;T&gt; for MyExtension&#xD;&#xA;where&#xD;&#xA;    T: pallet_contracts::Config + pallet_scheduler::Config,&#xD;&#xA;{&#xD;&#xA;    fn call&lt;E&gt;(&#xD;&#xA;        func_id: u32,&#xD;&#xA;        env: Environment&lt;'_, '_, E, InitState&gt;,&#xD;&#xA;    ) -&gt; Result&lt;RetVal, DispatchError&gt;&#xD;&#xA;{&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;    let call: &lt;T as pallet_scheduler::Config&gt;::Call =&#xD;&#xA;        frame_system::Call::remark {&#xD;&#xA;            remark: 0u32.encode(),&#xD;&#xA;        }&#xD;&#xA;        .into();&#xD;&#xA;&#xD;&#xA;    pallet_scheduler::Pallet::&lt;T&gt;::schedule(&#xD;&#xA;        RawOrigin::Signed(caller).into(),&#xD;&#xA;        at.into(),&#xD;&#xA;        None,&#xD;&#xA;        Default::default(),&#xD;&#xA;        call,&#xD;&#xA;    )?;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, when I try and craft a `Call` to the Contracts pallet like so:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let call = pallet_contracts::Call::remove_code {&#xD;&#xA;    code_hash: Default::default(),&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;let call = crate::Box::new(MaybeHashed::Value(call));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It fails with the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;     Compiling contracts-node-runtime v0.16.0 (/home/hernando/remote-builds/17766829191224950667/runtime)&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;     --&gt; /home/hernando/remote-builds/17766829191224950667/runtime/src/chain_extension.rs:151:21&#xD;&#xA;      |&#xD;&#xA;  146 |                 pallet_scheduler::Pallet::&lt;T&gt;::schedule(&#xD;&#xA;      |                 --------------------------------------- arguments to this function are incorrect&#xD;&#xA;  ...&#xD;&#xA;  151 |                     call,&#xD;&#xA;      |                     ^^^^ expected associated type, found enum `pallet_contracts::Call`&#xD;&#xA;      |&#xD;&#xA;      = note: expected struct `sp_std::prelude::Box&lt;MaybeHashed&lt;&lt;T as pallet_scheduler::Config&gt;::Call, &lt;T as SysConfig&gt;::Hash&gt;&gt;`&#xD;&#xA;                 found struct `sp_std::prelude::Box&lt;MaybeHashed&lt;pallet_contracts::Call&lt;_&gt;, _&gt;&gt;`&#xD;&#xA;      = help: consider constraining the associated type `&lt;T as pallet_scheduler::Config&gt;::Call` to `pallet_contracts::Call&lt;_&gt;` or calling a method that returns `&lt;T as pallet_scheduler::Config&gt;::Call`&#xD;&#xA;      = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html&#xD;&#xA;  note: associated function defined here&#xD;&#xA;     --&gt; /home/hernando/.cargo/git/checkouts/substrate-7e08433d4c370a21/c0ee2ad/frame/scheduler/src/lib.rs:425:10&#xD;&#xA;      |&#xD;&#xA;  425 |         pub fn schedule(&#xD;&#xA;      |                ^^^^^^^^&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0308`.&#xD;&#xA;  error: could not compile `contracts-node-runtime` due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Under the hood the [`Scheduler::schedule`](https://github.com/paritytech/substrate/blob/6001b59f9f64a133d55fc13a495acc76eb4b532f/frame/scheduler/src/lib.rs#L425) extrinsic is expecting a `&lt;T as pallet_scheduler::Config&gt;::Call`, which from&#xD;&#xA;the `Config` definition is the following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type Call: Parameter&#xD;&#xA;	+ Dispatchable&lt;Origin = &lt;Self as Config&gt;::Origin, PostInfo = PostDispatchInfo&gt;&#xD;&#xA;	+ GetDispatchInfo&#xD;&#xA;	+ From&lt;system::Call&lt;Self&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So the error makes sense. According to the `From` implementation we can only turn system&#xD;&#xA;`Call`s into Scheduler `Call`s, which is why `remark` worked and `remove_code` didn't.&#xD;&#xA;&#xD;&#xA;### Successful Dispatches of non-system Calls&#xD;&#xA;&#xD;&#xA;I've tried manually scheduling a Contracts call using the Polkadot JS UI and I'm able to&#xD;&#xA;schedule and execute it successfully. Below is the extrinsic it built:&#xD;&#xA;&#xD;&#xA;[![polkadot-js-apps-contract-call][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There's also the [Referenda pallet which implements some scheduler related traits](https://github.com/paritytech/substrate/blob/6001b59f9f64a133d55fc13a495acc76eb4b532f/frame/referenda/src/lib.rs#L131) and that allows it to specify its own `Call` type.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config&lt;I: 'static = ()&gt;: frame_system::Config + Sized {&#xD;&#xA;	/// The Scheduler.&#xD;&#xA;	type Scheduler: ScheduleAnon&lt;&#xD;&#xA;			Self::BlockNumber,&#xD;&#xA;			CallOf&lt;Self, I&gt;,&#xD;&#xA;			PalletsOriginOf&lt;Self&gt;,&#xD;&#xA;			Hash = Self::Hash,&#xD;&#xA;		&gt; + ScheduleNamed&lt;&#xD;&#xA;			Self::BlockNumber,&#xD;&#xA;			CallOf&lt;Self, I&gt;,&#xD;&#xA;			PalletsOriginOf&lt;Self&gt;,&#xD;&#xA;			Hash = Self::Hash,&#xD;&#xA;		&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;### Questions&#xD;&#xA;- How is Polkadot JS Apps able to successfully build a Contract `Call` and schedule it?&#xD;&#xA;- How am I able to replicate this in Rust without building a wrapper pallet a la&#xD;&#xA;  `pallet-referenda`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/krhbo.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="12915" PostHistoryTypeId="2" PostId="3448" RevisionGUID="0d8a34e5-b638-4345-aa54-2aa280da9fd5" CreationDate="2022-06-25T16:01:49.377" UserId="1824" Text="Alright, so I had a chat with Kian about this and he gave me some tips for how to&#xD;&#xA;approach this.&#xD;&#xA;&#xD;&#xA;First, we need to distinguish between _Runtime Calls_ and _Pallet Calls_.&#xD;&#xA;&#xD;&#xA;The Runtime calls are those that are exposed by the runtime. These are generated by the&#xD;&#xA;`construct_runtime!` macro. This type of call indicates which of the pallets included by&#xD;&#xA;the Runtime expose dispatchable functions (a.k.a extrinsics).&#xD;&#xA;&#xD;&#xA;Pallet calls are generated from the `#[pallet::call]` FRAME macro and indicate which&#xD;&#xA;dispatchables (extrinsics) are available in a given pallet.&#xD;&#xA;&#xD;&#xA;Now, with that background we can break down the error a bit more.&#xD;&#xA;&#xD;&#xA;First, let's take a look at a slightly simplified version of the&#xD;&#xA;`pallet_scheduler::Call::schedule()` function signature:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn schedule(&#xD;&#xA;    origin: OriginFor&lt;T&gt;,&#xD;&#xA;    ...&#xD;&#xA;    call: &lt;T as pallet_scheduler::Config&gt;::Call,&#xD;&#xA;&#xD;&#xA;) -&gt; DispatchResult; &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is expecting a _Runtime Call_. We can tell this because it is going through the&#xD;&#xA;associated type `Call` of the Scheduler pallet's `Config` trait, which is wired up in the&#xD;&#xA;Runtime.&#xD;&#xA;&#xD;&#xA;Now let's look at the original error again:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;= note: expected struct `sp_std::prelude::Box&lt;MaybeHashed&lt;&lt;T as pallet_scheduler::Config&gt;::Call, &lt;T as SysConfig&gt;::Hash&gt;&gt;`&#xD;&#xA;                 found struct `sp_std::prelude::Box&lt;MaybeHashed&lt;pallet_contracts::Call&lt;_&gt;, _&gt;&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We are handing the function a `pallet_contracts::Call`, which is a _Pallet Call_. We know&#xD;&#xA;this because we are going directly through the `pallet_contracts` module.&#xD;&#xA;&#xD;&#xA;So the question now becomes, how can we provide a _Runtime Call_ instead of a _Pallet Call_ &#xD;&#xA;to the `schedule()`?&#xD;&#xA;&#xD;&#xA;In order to build a Runtime Call for the Contracts pallet we can do the following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Note, `crate` refers to our `runtime/src/lib.rs`&#xD;&#xA;let call = crate::Call::Contracts(pallet_contracts::Call::remove_code {&#xD;&#xA;    code_hash: Default::default(),&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, this won't work just yet. Remember that we need this to be of the same type as&#xD;&#xA;the Scheduler pallet's associated type `Call`.&#xD;&#xA;&#xD;&#xA;Because we're working with generics (as usual when we deal with Substrate) we need to add&#xD;&#xA;the following trait bound in the definition of our chain extension:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T&gt; ChainExtension&lt;T&gt; for MyExtension&#xD;&#xA;where&#xD;&#xA;    T: pallet_contracts::Config + pallet_scheduler::Config,&#xD;&#xA;    &lt;T as pallet_scheduler::Config&gt;::Call: From&lt;crate::Call&gt;, // &lt;- Added this&#xD;&#xA;{ ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This specifies a requirement that we need be able to convert _any_ Runtime Call into a&#xD;&#xA;Runtime call for the Scheduler pallet.&#xD;&#xA;&#xD;&#xA;Luckily for us the `construct_runtime!` macro provides this implementation. So with that&#xD;&#xA;we can now convert our Call into the correct type.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let call: &lt;T as pallet_scheduler::Config&gt;::Call =&#xD;&#xA;    crate::Call::Contracts(pallet_contracts::Call::remove_code {&#xD;&#xA;        code_hash: Default::default(),&#xD;&#xA;    })&#xD;&#xA;    .into();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We can now pass this into the `Scheduler::schedule()` extrinsic and happily go about our&#xD;&#xA;day!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12917" PostHistoryTypeId="6" PostId="3360" RevisionGUID="52de9dad-532a-486c-8e75-677cf6b532a9" CreationDate="2022-06-25T16:02:07.750" UserId="1824" Comment="edited tags" Text="|runtime|extrinsic|chain-extension|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12918" PostHistoryTypeId="2" PostId="3449" RevisionGUID="be19387a-032a-4f1f-bad5-381a6ec6871f" CreationDate="2022-06-25T19:01:44.910" UserId="408" Text="No, it doesn't add a prefix.&#xD;&#xA;&#xD;&#xA;But signing messages and transactions do use separate functions.&#xD;&#xA;&#xD;&#xA;The [Signer interface](https://github.com/polkadot-js/api/blob/977eb3f9ecb8a2fb57b46b7da7f797b56a9e8bf2/packages/types/src/types/extrinsic.ts#L135-L150) is defined as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;export interface Signer&#xD;&#xA;  /**&#xD;&#xA;   * @description signs an extrinsic payload from a serialized form&#xD;&#xA;   */&#xD;&#xA;  signPayload?: (payload: SignerPayloadJSON) =&gt; Promise&lt;SignerResult&gt;;&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   * @description signs a raw payload, only the bytes data as supplied&#xD;&#xA;   */&#xD;&#xA;  signRaw?: (raw: SignerPayloadRaw) =&gt; Promise&lt;SignerResult&gt;;&#xD;&#xA;&#xD;&#xA;  /**&#xD;&#xA;   * @description Receives an update for the extrinsic signed by a `signer.sign`&#xD;&#xA;   */&#xD;&#xA;  update?: (id: number, status: H256 | ISubmittableResult) =&gt; void;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When signing messages, `signRaw` is called. When signing transactions, `signPayload` is used.&#xD;&#xA;&#xD;&#xA;If you call `alice.sign('a')` to sign a message, the payload would always be like&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  type: &quot;bytes&quot;,&#xD;&#xA;  data: &quot;a&quot;,&#xD;&#xA;  address: &quot;15StioR7cW1cui19icpxivT6iZR6e9RFKtj2urou1opJsCms&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But the result will vary each time you call it, because in sr25519 signatures are non-deterministic. &#xD;&#xA;&#xD;&#xA;When you call `await api.tx.system.remark('a')`, the payload will be like&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  specVersion: &quot;0x0000240e&quot;,&#xD;&#xA;  transactionVersion: &quot;0x0000000c&quot;,&#xD;&#xA;  address: &quot;15StioR7cW1cui19icpxivT6iZR6e9RFKtj2urou1opJsCms&quot;,&#xD;&#xA;  blockHash: &quot;0x00b2aa61d007c887d20050856c9fd98d649dd92dda14eedc2faea189dfac05ad&quot;,&#xD;&#xA;  blockNumber: &quot;0x00a6409f&quot;,&#xD;&#xA;  era: &quot;0xf501&quot;,&#xD;&#xA;  genesisHash: &quot;0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3&quot;,&#xD;&#xA;  method: &quot;0x00011448656c6c6f&quot;,&#xD;&#xA;  nonce: &quot;0x00000000&quot;,&#xD;&#xA;  signedExtensions: [&#xD;&#xA;    &quot;CheckNonZeroSender&quot;,&#xD;&#xA;    &quot;CheckSpecVersion&quot;,&#xD;&#xA;    &quot;CheckTxVersion&quot;,&#xD;&#xA;    &quot;CheckGenesis&quot;,&#xD;&#xA;    &quot;CheckMortality&quot;,&#xD;&#xA;    &quot;CheckNonce&quot;,&#xD;&#xA;    &quot;CheckWeight&quot;,&#xD;&#xA;    &quot;ChargeTransactionPayment&quot;,&#xD;&#xA;    &quot;PrevalidateAttests&quot;&#xD;&#xA;  ],&#xD;&#xA;  tip: &quot;0x00000000000000000000000000000000&quot;,&#xD;&#xA;  version: 4&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The two types of payloads are not compatible with each other. Therefore you cannot send a spoofed transaction that way." ContentLicense="CC BY-SA 4.0" />
  <row Id="12921" PostHistoryTypeId="2" PostId="3450" RevisionGUID="c7c8118e-3a60-4e9c-bcea-c002efb3f444" CreationDate="2022-06-25T22:04:03.977" UserId="2446" Text="1&#xD;&#xA;&#xD;&#xA;yh so i created a simple pallet with a function. I called this function from the explorer and everything worked and events were generated. But calling it from the Polkadot-JS API has not made any effect. I don't get a transaction hash return value, i don't see any changes on-chain, i don't see any events deposited. Its just silent. Worse, it throws no errors. My chain function is correct, that is not the issue. Same thing happens when i add an account to the keystore, with password and seed. It doesn't reflect on the explorer. Please why is this happening? Thanks. Also, when i call functions from default pallets, say balances.transfer(), it works. But it doesn't work with default functions. So i'm thinking maybe there's still some configuration of some sort to be done. Please help me. Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="12923" PostHistoryTypeId="1" PostId="3450" RevisionGUID="c7c8118e-3a60-4e9c-bcea-c002efb3f444" CreationDate="2022-06-25T22:04:03.977" UserId="2446" Text="Polkadot-JS API not reflecting changes on explorer or chain in local development" ContentLicense="CC BY-SA 4.0" />
  <row Id="12924" PostHistoryTypeId="3" PostId="3450" RevisionGUID="c7c8118e-3a60-4e9c-bcea-c002efb3f444" CreationDate="2022-06-25T22:04:03.977" UserId="2446" Text="|substrate-node|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12925" PostHistoryTypeId="2" PostId="3451" RevisionGUID="3e3b6668-1b6d-48e4-872b-d2332904c4f1" CreationDate="2022-06-25T22:20:50.923" UserId="172" Text="The transaction pool regularly calls the `validate_unsigned` function of the [`SignedExtension`](https://paritytech.github.io/substrate/master/sp_runtime/traits/trait.SignedExtension.html#) trait to check transaction validity against current state. This trait then gets used to implement custom extensions in [`frame_system`](https://paritytech.github.io/substrate/master/frame_system/index.html#signed-extensions), which get passed into the runtime as a single type, for example in a typical `runtime/src/lib.rs` file we have:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub type SignedExtra = (&#xD;&#xA;	frame_system::CheckNonZeroSender&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckSpecVersion&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckTxVersion&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckGenesis&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckEra&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckNonce&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckWeight&lt;Runtime&gt;,&#xD;&#xA;	pallet_transaction_payment::ChargeTransactionPayment&lt;Runtime&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;So, IIUC this then is used to construct all parts of `extra` data that a signed call submitted to the runtime expects:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Unchecked extrinsic type as expected by this runtime.&#xD;&#xA;pub type UncheckedExtrinsic = generic::UncheckedExtrinsic&lt;Address, Call, Signature, SignedExtra&gt;;&#xD;&#xA;```&#xD;&#xA;Then, the [`TaggedTransactionQueue`](https://paritytech.github.io/substrate/master/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html) runtime API provides a way to check that a submitted signed transaction is valid, giving the pool to order transaction by priority etc. &#xD;&#xA;&#xD;&#xA;From what I understand, this runtime API verifies all the data in `SignedExtra`. My question is how?&#xD;&#xA;&#xD;&#xA;How does this extra data gets passed into the signed extension and how does the transaction pool know what and where to check in the encoded call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12927" PostHistoryTypeId="1" PostId="3451" RevisionGUID="3e3b6668-1b6d-48e4-872b-d2332904c4f1" CreationDate="2022-06-25T22:20:50.923" UserId="172" Text="How does the `TaggedTransactionQueue` runtime API know what parts of the encoded call to check?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12928" PostHistoryTypeId="3" PostId="3451" RevisionGUID="3e3b6668-1b6d-48e4-872b-d2332904c4f1" CreationDate="2022-06-25T22:20:50.923" UserId="172" Text="|transactions|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12929" PostHistoryTypeId="5" PostId="3450" RevisionGUID="b48a9203-bee7-43e3-988b-e2a2a9be8377" CreationDate="2022-06-26T00:23:01.743" UserId="83" Comment="user didn't self check their question" Text="So i created a simple pallet with a function. I called this function from the explorer and everything worked and events were generated. But calling it from the Polkadot-JS API has not made any effect. I don't get a transaction hash return value, i don't see any changes on-chain, i don't see any events deposited. Its just silent. Worse, it throws no errors. My chain function is correct, that is not the issue. Same thing happens when i add an account to the keystore, with password and seed. It doesn't reflect on the explorer. Please why is this happening? Thanks. Also, when i call functions from default pallets, say balances.transfer(), it works. But it doesn't work with default functions. So i'm thinking maybe there's still some configuration of some sort to be done. Please help me. Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="12930" PostHistoryTypeId="5" PostId="3354" RevisionGUID="e1e82467-6e02-43d3-895b-e1292dc0aa7f" CreationDate="2022-06-26T09:01:51.170" UserId="560" Comment="Syncing storage maps between pallets" Text="I have one pallet with a storagemap that I want to use/call with another Pallet. &#xD;&#xA;&#xD;&#xA;After doing some research I ran over Centrifuge fudge project(https://github.com/centrifuge/fudge/blob/376e4d6b89324b24d131e7f7c19c7c504871d5d3/core/src/builder/relay_chain.rs#L62-L70) that has a similar approach.&#xD;&#xA;&#xD;&#xA;I tried to do this using a StorageInstance:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub mod llmmod {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_support::{&#xD;&#xA;		storage::types::{StorageMap, StorageValue, ValueQuery},&#xD;&#xA;		traits::StorageInstance,&#xD;&#xA;		Blake2_128Concat, Twox64Concat,&#xD;&#xA;	};&#xD;&#xA;	// ParaLifecyclesPrefix, based on centrifuge&#xD;&#xA;	pub struct LLMPoliticsCopy;&#xD;&#xA;&#xD;&#xA;	impl StorageInstance for LLMPoliticsCopy {&#xD;&#xA;		fn pallet_prefix() -&gt; &amp;'static str {&#xD;&#xA;			&quot;llm&quot;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		const STORAGE_PREFIX: &amp;'static str = &quot;LLMPolitics&quot;;&#xD;&#xA;	}&#xD;&#xA;	pub type LLMPolitics&lt;T&gt; = frame_support::storage::types::StorageMap&lt;&#xD;&#xA;		LLMPoliticsCopy,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		&lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;		u128,&#xD;&#xA;		frame_support::pallet_prelude::ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	pub fn check_pooled_llm&lt;T: frame_system::Config&gt;(sender: T::AccountId) -&gt; bool {&#xD;&#xA;		LLMPolitics::&lt;T&gt;::contains_key::&lt;T::AccountId&gt;(sender)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then I check the storage map with a regular contains, to check if the account is in the storage map:&#xD;&#xA;&#xD;&#xA;ensure!(!llmmod::check_pooled_llm::&lt;T&gt;(who.clone()), Error::&lt;T&gt;::NoPolLLM);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;The code is compiling, but the storage map is not syncing, when I insert a new entry using the pallet, it does not sync. &#xD;&#xA;&#xD;&#xA;Is there a way to Query a storage map in another pallet without adding new_pallet::Config to the config trait ? Is there a way to get around this?&#xD;&#xA;&#xD;&#xA;I need the democracy pallet to query a storage map from another pallet but adding `+ LLM_Pallet::Config` in the trait config for the pallet just introduce a lot of bugs.&#xD;&#xA;&#xD;&#xA;Is there a way to query storage maps that other pallets have without the pallet's config? manually adding a trait for it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;from pallet:&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::storage] // allocated in politics&#xD;&#xA;	#[pallet::getter(fn get_politics_balance)]&#xD;&#xA;	pub(super) type LLMPolitics&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Blake2_128Concat, T::AccountId, T::Balance, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Link to the code repo:     &#xD;&#xA;https://github.com/liberland/liberland_substrate/tree/storage&#xD;&#xA;https://github.com/liberland/liberland_substrate/blob/storage/frame/democracy/src/lib.rs&#xD;&#xA;https://github.com/liberland/liberland_substrate/blob/storage/frame/llm/src/lib.rs&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12931" PostHistoryTypeId="6" PostId="3354" RevisionGUID="e1e82467-6e02-43d3-895b-e1292dc0aa7f" CreationDate="2022-06-26T09:01:51.170" UserId="560" Comment="Syncing storage maps between pallets" Text="|pallet|storage|runtime|democracy|storagenmap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12935" PostHistoryTypeId="50" PostId="2833" RevisionGUID="0906a158-e426-4bde-90f6-67808ba1a869" CreationDate="2022-06-26T13:03:55.430" UserId="-1" />
  <row Id="12936" PostHistoryTypeId="5" PostId="3450" RevisionGUID="96db720b-f5d4-4d2a-a708-b647021c44d3" CreationDate="2022-06-26T15:12:45.410" UserId="2446" Comment="added 2030 characters in body" Text="So i created a simple frame pallet with an extrinsic. I called this extrinsic from the local explorer at 127.0.0.1:9944 and everything worked and events were generated. But calling it from the Polkadot-JS API has not made any effect.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider }).then(() =&gt; {&#xD;&#xA;        cryptoWaitReady().then(() =&gt; {&#xD;&#xA;            const mnemonic = mnemonicGenerate();&#xD;&#xA;            const { pair, json } = keyring.addUri(mnemonic, &quot;dave&quot;, { name: &quot;david&quot;, created: Date.now() });&#xD;&#xA;&#xD;&#xA;            (async function() {&#xD;&#xA;                // get IP address&#xD;&#xA;                let ip = &quot;127.0.0.1&quot;;&#xD;&#xA;&#xD;&#xA;                // record creation and sign-in onchain&#xD;&#xA;                const txHash = await api.tx.robot&#xD;&#xA;                    .signIn(ip)&#xD;&#xA;                    .signAndSend(pair.address);&#xD;&#xA;&#xD;&#xA;                console.log(txHash);&#xD;&#xA;            });&#xD;&#xA;        });&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; I don't get a transaction hash return value, i don't see any changes on-chain, i don't see any events deposited. Its just silent. Worse, it throws no errors. &#xD;&#xA;&#xD;&#xA;My chain function is correct, that is not the issue.&#xD;&#xA;```&#xD;&#xA;#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1000)]&#xD;&#xA;		pub fn sign_in(origin: OriginFor&lt;T&gt;, ip_addr: Vec&lt;u8&gt;) -&gt; DispatchResult&#xD;&#xA;		{&#xD;&#xA;			// first check for if account id is present&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;			let user_id = sender.clone();&#xD;&#xA;&#xD;&#xA;			// check for overflow&#xD;&#xA;			let ip_address: BoundedVec&lt;_, T::MaxIPAddress&gt; =&#xD;&#xA;				ip_addr.clone().try_into().map_err(|()| Error::&lt;T&gt;::IPAddressOverflow)?;&#xD;&#xA;&#xD;&#xA;			let now: u64 = T::TimeProvider::now().as_secs();&#xD;&#xA;&#xD;&#xA;			let nsd: SignInDetail&lt;T&gt; = SignInDetail {&#xD;&#xA;				ip: ip_address,&#xD;&#xA;				time: now&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			// select user&#xD;&#xA;			let detail = &lt;SignIns&lt;T&gt;&gt;::get(&amp;user_id);&#xD;&#xA;&#xD;&#xA;			if let Some(_sd) = detail {&#xD;&#xA;				// update timestamp&#xD;&#xA;				SignIns::&lt;T&gt;::mutate(&amp;user_id, |det| {&#xD;&#xA;					*det = Some(nsd);&#xD;&#xA;				});&#xD;&#xA;			} else {&#xD;&#xA;				// create new signin record and update timestamp &#xD;&#xA;				SignIns::&lt;T&gt;::insert(&amp;user_id, nsd);&#xD;&#xA;&#xD;&#xA;				// user was just created&#xD;&#xA;				Self::deposit_event(Event::Created(sender, now, ip_addr.clone()));&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;            Self::deposit_event(Event::SignIn(user_id, now, ip_addr.clone()));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA; Same thing happens when i add an account to the keystore, with password and seed.&#xD;&#xA;```&#xD;&#xA; const mnemonic = mnemonicGenerate();&#xD;&#xA;            const { pair, json } = keyring.addUri(mnemonic, &quot;dave&quot;, { name: &quot;david&quot;, created: Date.now() });&#xD;&#xA;```&#xD;&#xA;It doesn't reflect on the local explorer at 127.0.0.1:9944 . Please what am i doing wrong? Thanks. &#xD;&#xA;&#xD;&#xA;But when i use the example here (https://polkadot.js.org/docs/api/start/api.tx), using the ```balances``` pallet, it emits events, makes changes onchain and the changes and events are reflected on the local explorer at 127.0.0.1:9944 . &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12937" PostHistoryTypeId="5" PostId="3450" RevisionGUID="870bf384-d1cb-465a-be53-b38fbab87079" CreationDate="2022-06-26T18:33:04.370" UserId="2446" Comment="added 2 characters in body" Text="So i created a simple frame pallet with an extrinsic. I called this extrinsic from the local explorer at 127.0.0.1:9944 and everything worked and events were generated. But calling it from the Polkadot-JS API has not made any effect.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider }).then(() =&gt; {&#xD;&#xA;        cryptoWaitReady().then(() =&gt; {&#xD;&#xA;            const mnemonic = mnemonicGenerate();&#xD;&#xA;            const { pair, json } = keyring.addUri(mnemonic, &quot;dave&quot;, { name: &quot;david&quot;, created: Date.now() });&#xD;&#xA;&#xD;&#xA;            (async function() {&#xD;&#xA;                // get IP address&#xD;&#xA;                let ip = &quot;127.0.0.1&quot;;&#xD;&#xA;&#xD;&#xA;                // record creation and sign-in onchain&#xD;&#xA;                const txHash = await api.tx.robot&#xD;&#xA;                    .signIn(ip)&#xD;&#xA;                    .signAndSend(pair.address);&#xD;&#xA;&#xD;&#xA;                console.log(txHash);&#xD;&#xA;            }());&#xD;&#xA;        });&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; I don't get a transaction hash return value, i don't see any changes on-chain, i don't see any events deposited. Its just silent. Worse, it throws no errors. &#xD;&#xA;&#xD;&#xA;My chain function is correct, that is not the issue.&#xD;&#xA;```&#xD;&#xA;#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1000)]&#xD;&#xA;		pub fn sign_in(origin: OriginFor&lt;T&gt;, ip_addr: Vec&lt;u8&gt;) -&gt; DispatchResult&#xD;&#xA;		{&#xD;&#xA;			// first check for if account id is present&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;			let user_id = sender.clone();&#xD;&#xA;&#xD;&#xA;			// check for overflow&#xD;&#xA;			let ip_address: BoundedVec&lt;_, T::MaxIPAddress&gt; =&#xD;&#xA;				ip_addr.clone().try_into().map_err(|()| Error::&lt;T&gt;::IPAddressOverflow)?;&#xD;&#xA;&#xD;&#xA;			let now: u64 = T::TimeProvider::now().as_secs();&#xD;&#xA;&#xD;&#xA;			let nsd: SignInDetail&lt;T&gt; = SignInDetail {&#xD;&#xA;				ip: ip_address,&#xD;&#xA;				time: now&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			// select user&#xD;&#xA;			let detail = &lt;SignIns&lt;T&gt;&gt;::get(&amp;user_id);&#xD;&#xA;&#xD;&#xA;			if let Some(_sd) = detail {&#xD;&#xA;				// update timestamp&#xD;&#xA;				SignIns::&lt;T&gt;::mutate(&amp;user_id, |det| {&#xD;&#xA;					*det = Some(nsd);&#xD;&#xA;				});&#xD;&#xA;			} else {&#xD;&#xA;				// create new signin record and update timestamp &#xD;&#xA;				SignIns::&lt;T&gt;::insert(&amp;user_id, nsd);&#xD;&#xA;&#xD;&#xA;				// user was just created&#xD;&#xA;				Self::deposit_event(Event::Created(sender, now, ip_addr.clone()));&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;            Self::deposit_event(Event::SignIn(user_id, now, ip_addr.clone()));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA; Same thing happens when i add an account to the keystore, with password and seed.&#xD;&#xA;```&#xD;&#xA; const mnemonic = mnemonicGenerate();&#xD;&#xA;            const { pair, json } = keyring.addUri(mnemonic, &quot;dave&quot;, { name: &quot;david&quot;, created: Date.now() });&#xD;&#xA;```&#xD;&#xA;It doesn't reflect on the local explorer at 127.0.0.1:9944 . Please what am i doing wrong? Thanks. &#xD;&#xA;&#xD;&#xA;But when i use the example here (https://polkadot.js.org/docs/api/start/api.tx), using the ```balances``` pallet, it emits events, makes changes onchain and the changes and events are reflected on the local explorer at 127.0.0.1:9944 . &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12938" PostHistoryTypeId="5" PostId="3450" RevisionGUID="55cbcc34-d4be-4273-bcbf-d8c18db62a05" CreationDate="2022-06-26T19:15:00.350" UserId="2446" Comment="added 972 characters in body" Text="So i created a simple frame pallet with an extrinsic. I called this extrinsic from the local explorer at 127.0.0.1:9944 and everything worked and events were generated. But calling it from the Polkadot-JS API has not made any effect.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// substrate client imports&#xD;&#xA;const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;const { mnemonicGenerate } = require('@polkadot/util-crypto');&#xD;&#xA;const { keyring } = require('@polkadot/ui-keyring');&#xD;&#xA;// const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;const { cryptoWaitReady } = require('@polkadot/util-crypto');&#xD;&#xA;const { u8aToHex } = require('@polkadot/util');&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// global variables&#xD;&#xA;const wsProvider = new WsProvider('ws://127.0.0.1:9944');&#xD;&#xA;const port = 3002;&#xD;&#xA;&#xD;&#xA;cryptoWaitReady().then(() =&gt; {&#xD;&#xA;    // load all available addresses and accounts&#xD;&#xA;    keyring.loadAll({ ss58Format: 42, type: 'sr25519' });&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;async function createAccount(req, res) {&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider }).then(() =&gt; {&#xD;&#xA;        cryptoWaitReady().then(() =&gt; {&#xD;&#xA;            const mnemonic = mnemonicGenerate();&#xD;&#xA;            const { pair, json } = keyring.addUri(mnemonic, req.body.password, { name: req.body.name, created: Date.now() });&#xD;&#xA;&#xD;&#xA;            (async function() {&#xD;&#xA;                // get IP address&#xD;&#xA;                let ip = &quot;127.0.0.1&quot;;&#xD;&#xA;&#xD;&#xA;                // record creation and sign-in onchain&#xD;&#xA;                const txHash = await api.tx.robot&#xD;&#xA;                    .signIn(ip)&#xD;&#xA;                    .signAndSend(pair.address);&#xD;&#xA;&#xD;&#xA;                console.log(txHash);&#xD;&#xA;            }());&#xD;&#xA;        });&#xD;&#xA;    });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// request handles&#xD;&#xA;app.use(bodyParser.json());&#xD;&#xA;app.use(bodyParser.urlencoded({ extended: false }))&#xD;&#xA;&#xD;&#xA;// add account&#xD;&#xA;app.post('/create_account', function (req, res) {&#xD;&#xA;    createAccount(req, res);&#xD;&#xA;})&#xD;&#xA;&#xD;&#xA;app.listen(port, () =&gt; console.log(`Listening on port ${port}`))&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; I don't get a transaction hash return value, i don't see any changes on-chain, i don't see any events deposited. Its just silent. Worse, it throws no errors. &#xD;&#xA;&#xD;&#xA;My chain function is correct, that is not the issue.&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1000)]&#xD;&#xA;		pub fn sign_in(origin: OriginFor&lt;T&gt;, ip_addr: Vec&lt;u8&gt;) -&gt; DispatchResult&#xD;&#xA;		{&#xD;&#xA;			// first check for if account id is present&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;			let user_id = sender.clone();&#xD;&#xA;&#xD;&#xA;			// check for overflow&#xD;&#xA;			let ip_address: BoundedVec&lt;_, T::MaxIPAddress&gt; =&#xD;&#xA;				ip_addr.clone().try_into().map_err(|()| Error::&lt;T&gt;::IPAddressOverflow)?;&#xD;&#xA;&#xD;&#xA;			let now: u64 = T::TimeProvider::now().as_secs();&#xD;&#xA;&#xD;&#xA;			let nsd: SignInDetail&lt;T&gt; = SignInDetail {&#xD;&#xA;				ip: ip_address,&#xD;&#xA;				time: now&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			// select user&#xD;&#xA;			let detail = &lt;SignIns&lt;T&gt;&gt;::get(&amp;user_id);&#xD;&#xA;&#xD;&#xA;			if let Some(_sd) = detail {&#xD;&#xA;				// update timestamp&#xD;&#xA;				SignIns::&lt;T&gt;::mutate(&amp;user_id, |det| {&#xD;&#xA;					*det = Some(nsd);&#xD;&#xA;				});&#xD;&#xA;			} else {&#xD;&#xA;				// create new signin record and update timestamp &#xD;&#xA;				SignIns::&lt;T&gt;::insert(&amp;user_id, nsd);&#xD;&#xA;&#xD;&#xA;				// user was just created&#xD;&#xA;				Self::deposit_event(Event::Created(sender, now, ip_addr.clone()));&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;            Self::deposit_event(Event::SignIn(user_id, now, ip_addr.clone()));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA; Same thing happens when i add an account to the keystore, with password and seed.&#xD;&#xA;```&#xD;&#xA; const mnemonic = mnemonicGenerate();&#xD;&#xA;            const { pair, json } = keyring.addUri(mnemonic, &quot;dave&quot;, { name: &quot;david&quot;, created: Date.now() });&#xD;&#xA;```&#xD;&#xA;It doesn't reflect on the local explorer at 127.0.0.1:9944 . Please what am i doing wrong? Thanks. &#xD;&#xA;&#xD;&#xA;But when i use the example here (https://polkadot.js.org/docs/api/start/api.tx), using the ```balances``` pallet, it emits events, makes changes onchain and the changes and events are reflected on the local explorer at 127.0.0.1:9944 . &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12939" PostHistoryTypeId="2" PostId="3453" RevisionGUID="ad9e96ea-a1f5-4ab0-818c-00d5a3e18418" CreationDate="2022-06-27T03:23:44.743" UserId="2788" Text="I read this https://guide.kusama.network/docs/kusama-claims/#third-party-claims-processes but I don't have DOT token when you had your Genesis block. So, how can I get test tokens now? &#xD;&#xA;&#xD;&#xA;I'm joining your hackathon and wanna build dapps on your Kusama." ContentLicense="CC BY-SA 4.0" />
  <row Id="12941" PostHistoryTypeId="1" PostId="3453" RevisionGUID="ad9e96ea-a1f5-4ab0-818c-00d5a3e18418" CreationDate="2022-06-27T03:23:44.743" UserId="2788" Text="How to get test tokens for Kusama" ContentLicense="CC BY-SA 4.0" />
  <row Id="12942" PostHistoryTypeId="3" PostId="3453" RevisionGUID="ad9e96ea-a1f5-4ab0-818c-00d5a3e18418" CreationDate="2022-06-27T03:23:44.743" UserId="2788" Text="|kusama|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12943" PostHistoryTypeId="2" PostId="3454" RevisionGUID="dafc178b-d34b-4af3-a4b6-6688626a4cd2" CreationDate="2022-06-27T03:43:41.523" UserId="283" Text="Kusama is not a test network, but you might be interested in the Rococo network, documented here: https://wiki.polkadot.network/docs/build-pdk#rococo-testnet" ContentLicense="CC BY-SA 4.0" />
  <row Id="12945" PostHistoryTypeId="2" PostId="3455" RevisionGUID="e5f5e5b5-4cf8-4d5d-b138-a2b8b112acc3" CreationDate="2022-06-27T04:34:48.243" UserId="2010" Text="Is it okay to emit event from hooks like on_initialize() ?&#xD;&#xA;For example I have ~1000 items in storage and in a loop in on_initialize() I want to emit event if certain process is completed then is it fine?&#xD;&#xA;Also what is more efficient a) emit burst of 1000 event or b) combine event information in a large Vec&lt;&gt; and then send it wrapping in an event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12947" PostHistoryTypeId="1" PostId="3455" RevisionGUID="e5f5e5b5-4cf8-4d5d-b138-a2b8b112acc3" CreationDate="2022-06-27T04:34:48.243" UserId="2010" Text="Emit Events from hooks like on_initialize()" ContentLicense="CC BY-SA 4.0" />
  <row Id="12948" PostHistoryTypeId="3" PostId="3455" RevisionGUID="e5f5e5b5-4cf8-4d5d-b138-a2b8b112acc3" CreationDate="2022-06-27T04:34:48.243" UserId="2010" Text="|pallet|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12949" PostHistoryTypeId="5" PostId="3455" RevisionGUID="c8333d4f-ba64-4d79-976d-c15b4b96fe19" CreationDate="2022-06-27T04:54:55.750" UserId="2010" Comment="added 2 characters in body" Text="Is it okay to emit event from hooks like on_initialize() ?&#xD;&#xA;For example I have ~1000 items in storage and in a loop in on_initialize() I want to emit event if certain process is completed then is it fine?&#xD;&#xA;Also what is more efficient a) emit burst of 1000 events or b) combine events information in a large Vec&lt;&gt; and then send it wrapping in an event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12950" PostHistoryTypeId="2" PostId="3456" RevisionGUID="24058ecc-c289-4dec-84cc-8aca9d4348c2" CreationDate="2022-06-27T04:58:01.050" UserId="2338" Text="I was wondering if its possible to query the state of a contract at an old block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12952" PostHistoryTypeId="1" PostId="3456" RevisionGUID="24058ecc-c289-4dec-84cc-8aca9d4348c2" CreationDate="2022-06-27T04:58:01.050" UserId="2338" Text="Can you query the state of a contract at a given block number?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12953" PostHistoryTypeId="3" PostId="3456" RevisionGUID="24058ecc-c289-4dec-84cc-8aca9d4348c2" CreationDate="2022-06-27T04:58:01.050" UserId="2338" Text="|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12954" PostHistoryTypeId="2" PostId="3457" RevisionGUID="4c45fa69-7934-41d8-a201-cfca9361985b" CreationDate="2022-06-27T06:19:57.067" UserId="2789" Text="I am trying to implement a non-Rust contract using WASM.. Can anyone provide an example, please, of a small contract which returns the balance of an account, completely written in TypeScript / AssemblyScript and made to run as a smart contract on Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12956" PostHistoryTypeId="1" PostId="3457" RevisionGUID="4c45fa69-7934-41d8-a201-cfca9361985b" CreationDate="2022-06-27T06:19:57.067" UserId="2789" Text="AssemblyScript Contracts with Javascript Standard Library" ContentLicense="CC BY-SA 4.0" />
  <row Id="12957" PostHistoryTypeId="3" PostId="3457" RevisionGUID="4c45fa69-7934-41d8-a201-cfca9361985b" CreationDate="2022-06-27T06:19:57.067" UserId="2789" Text="|wasm|contracts|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12958" PostHistoryTypeId="2" PostId="3458" RevisionGUID="409e1ae1-890b-4065-8364-31a65b01791d" CreationDate="2022-06-27T07:43:24.890" UserId="16" Text="Similar to other RPCs you can pass a block hash to the `contracts_getStorage` RPC (using the `at` parameter) in order to query the state at a historical block:&#xD;&#xA;&#xD;&#xA;[![Using polkadot.js Apps to call the contracts_getStorage RPC][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Kv0wZ.png&#xD;&#xA;&#xD;&#xA;It is **not** possible to do that on-chain (i.e from a contract) as accessing historical data depends on whether the queried node has this block available which is not a requirement." ContentLicense="CC BY-SA 4.0" />
  <row Id="12960" PostHistoryTypeId="2" PostId="3459" RevisionGUID="d1bbbbba-3f68-4f51-91d3-c9089d3b3d92" CreationDate="2022-06-27T07:58:30.643" UserId="2473" Text="From [this comment][1] and [this question][2], &#xD;&#xA;&#xD;&#xA;There's a function for runtime-benchmarks to get all the [`events()`][3]. And I want something similar that can be accessed from the parachain. Just events that occur in a certain block.&#xD;&#xA;Is there a function for it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1750/how-does-my-parachain-crowdloan-pallet-work-with-slot-auction-crowdfunding#comment1697_1775&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/2259/read-current-crowdloan-contributions&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L1403" ContentLicense="CC BY-SA 4.0" />
  <row Id="12962" PostHistoryTypeId="1" PostId="3459" RevisionGUID="d1bbbbba-3f68-4f51-91d3-c9089d3b3d92" CreationDate="2022-06-27T07:58:30.643" UserId="2473" Text="From the parachain, how to read the events of a current block from the relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12963" PostHistoryTypeId="3" PostId="3459" RevisionGUID="d1bbbbba-3f68-4f51-91d3-c9089d3b3d92" CreationDate="2022-06-27T07:58:30.643" UserId="2473" Text="|parachain|events|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12964" PostHistoryTypeId="5" PostId="3459" RevisionGUID="9ca170a3-84a5-415b-93e7-6aec1c2a13c8" CreationDate="2022-06-27T08:39:11.903" UserId="2473" Comment="added 21 characters in body; edited title" Text="From [this comment][1] and [this question][2], &#xD;&#xA;&#xD;&#xA;There's a function for runtime-benchmarks to get all the [`events()`][3]. And I want something similar that can be accessed from the parachain. Just events from the relay chain that occur in a certain block.&#xD;&#xA;Is there a function for it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1750/how-does-my-parachain-crowdloan-pallet-work-with-slot-auction-crowdfunding#comment1697_1775&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/2259/read-current-crowdloan-contributions&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L1403" ContentLicense="CC BY-SA 4.0" />
  <row Id="12965" PostHistoryTypeId="4" PostId="3459" RevisionGUID="9ca170a3-84a5-415b-93e7-6aec1c2a13c8" CreationDate="2022-06-27T08:39:11.903" UserId="2473" Comment="added 21 characters in body; edited title" Text="From the parachain, how to read the relay chain events of a current block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12966" PostHistoryTypeId="2" PostId="3460" RevisionGUID="d725bd0a-4aab-4486-b64b-83693f00c065" CreationDate="2022-06-27T09:37:57.937" UserId="2102" Text="Is it possible to migrate a running solo chain to a parachain in order to gain decentralized proofs of validity? I don't know if there's any material related to this topic available (I haven't found any), but I was wondering if it is possible to do so.&#xD;&#xA;&#xD;&#xA;The idea is to develop a private network where only certain people will have access, but later on, I would like the chain to be integrated as a parachain, or at least get access to decentralized validation for blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="12968" PostHistoryTypeId="1" PostId="3460" RevisionGUID="d725bd0a-4aab-4486-b64b-83693f00c065" CreationDate="2022-06-27T09:37:57.937" UserId="2102" Text="Can a private network migrate to parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12969" PostHistoryTypeId="3" PostId="3460" RevisionGUID="d725bd0a-4aab-4486-b64b-83693f00c065" CreationDate="2022-06-27T09:37:57.937" UserId="2102" Text="|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12971" PostHistoryTypeId="2" PostId="3461" RevisionGUID="c4608353-636e-4bcc-bc06-ad98af03777e" CreationDate="2022-06-27T11:18:30.997" UserId="2673" Text="I'm using `pallet-assets` to implement my own pallet. In one of the extrinsic calls I would like to check if an asset with the given ID exists. How to achieve this, given that `Assets` type is private and there's no getter provided?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12973" PostHistoryTypeId="1" PostId="3461" RevisionGUID="c4608353-636e-4bcc-bc06-ad98af03777e" CreationDate="2022-06-27T11:18:30.997" UserId="2673" Text="How to check if an asset exists" ContentLicense="CC BY-SA 4.0" />
  <row Id="12974" PostHistoryTypeId="3" PostId="3461" RevisionGUID="c4608353-636e-4bcc-bc06-ad98af03777e" CreationDate="2022-06-27T11:18:30.997" UserId="2673" Text="|pallet|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12975" PostHistoryTypeId="2" PostId="3462" RevisionGUID="7ad4a763-33ca-4c48-81bd-6d3ce2641577" CreationDate="2022-06-27T11:50:07.067" UserId="2673" Text="I believe [this guide][1] describes how to do this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="12977" PostHistoryTypeId="2" PostId="3463" RevisionGUID="dfbffe0c-a93a-4b15-aa00-68e9c8d370ae" CreationDate="2022-06-27T11:59:28.877" UserId="377" Text="I Want to release my substrate chain. I just want to know that is there anyone has any release guide/ SOP/process which we can follow during release.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;What do we need to document about the release?&#xD;&#xA;version bumping&#xD;&#xA;storage migration&#xD;&#xA;other stuff.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12979" PostHistoryTypeId="1" PostId="3463" RevisionGUID="dfbffe0c-a93a-4b15-aa00-68e9c8d370ae" CreationDate="2022-06-27T11:59:28.877" UserId="377" Text="Do we have any release guide/SOP for new release of a substrate project?" ContentLicense="CC BY-SA 4.0" />
  <row Id="12980" PostHistoryTypeId="3" PostId="3463" RevisionGUID="dfbffe0c-a93a-4b15-aa00-68e9c8d370ae" CreationDate="2022-06-27T11:59:28.877" UserId="377" Text="|substrate-node|polkadot|polkadot-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12981" PostHistoryTypeId="2" PostId="3464" RevisionGUID="3dd385d8-79e0-478f-b553-65118d9bcb84" CreationDate="2022-06-27T12:23:58.243" UserId="560" Text="After some debugging and help from mustermeiszer I was able to spot the problem.&#xD;&#xA;In the problem was that I have the pallet defined as &quot;LLM&quot; and not &quot;llm&quot;(small cap) in the construct_runtime:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = node_primitives::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		Utility: pallet_utility,&#xD;&#xA;		Babe: pallet_babe,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		// Authorship must be before session in order to note author in the correct session and era&#xD;&#xA;		// for im-online and staking.&#xD;&#xA;		Authorship: pallet_authorship,&#xD;&#xA;		Indices: pallet_indices,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		AssetTxPayment: pallet_asset_tx_payment,&#xD;&#xA;		ElectionProviderMultiPhase: pallet_election_provider_multi_phase,&#xD;&#xA;		Staking: pallet_staking,&#xD;&#xA;		Session: pallet_session,&#xD;&#xA;		Democracy: pallet_democracy,&#xD;&#xA;		Council: pallet_collective::&lt;Instance1&gt;,&#xD;&#xA;		TechnicalCommittee: pallet_collective::&lt;Instance2&gt;,&#xD;&#xA;		Elections: pallet_elections_phragmen,&#xD;&#xA;		TechnicalMembership: pallet_membership::&lt;Instance1&gt;,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Treasury: pallet_treasury,&#xD;&#xA;		Contracts: pallet_contracts,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		ImOnline: pallet_im_online,&#xD;&#xA;		AuthorityDiscovery: pallet_authority_discovery,&#xD;&#xA;		Offences: pallet_offences,&#xD;&#xA;		Historical: pallet_session_historical::{Pallet},&#xD;&#xA;		RandomnessCollectiveFlip: pallet_randomness_collective_flip,&#xD;&#xA;		Identity: pallet_identity,&#xD;&#xA;		Society: pallet_society,&#xD;&#xA;		Recovery: pallet_recovery,&#xD;&#xA;		Vesting: pallet_vesting,&#xD;&#xA;		Scheduler: pallet_scheduler,&#xD;&#xA;		Preimage: pallet_preimage,&#xD;&#xA;		Proxy: pallet_proxy,&#xD;&#xA;		Multisig: pallet_multisig,&#xD;&#xA;		Bounties: pallet_bounties,&#xD;&#xA;		Tips: pallet_tips,&#xD;&#xA;		Assets: pallet_assets,&#xD;&#xA;		Mmr: pallet_mmr,&#xD;&#xA;		Lottery: pallet_lottery,&#xD;&#xA;		Gilt: pallet_gilt,&#xD;&#xA;		Uniques: pallet_uniques,&#xD;&#xA;		TransactionStorage: pallet_transaction_storage,&#xD;&#xA;		BagsList: pallet_bags_list,&#xD;&#xA;		StateTrieMigration: pallet_state_trie_migration,&#xD;&#xA;		ChildBounties: pallet_child_bounties,&#xD;&#xA;		Referenda: pallet_referenda,&#xD;&#xA;		ConvictionVoting: pallet_conviction_voting,&#xD;&#xA;		Whitelist: pallet_whitelist,&#xD;&#xA;		LLM: pallet_llm, //{Pallet, Storage, Event&lt;T&gt;}, // LLM Pallet&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Based on centrifuge integration I created a mod for it:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;pub mod llmmod {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_support::{&#xD;&#xA;		storage::types::{StorageMap, StorageValue, ValueQuery},&#xD;&#xA;		traits::StorageInstance,&#xD;&#xA;		Blake2_128Concat, Twox64Concat,&#xD;&#xA;	};&#xD;&#xA;	// ParaLifecyclesPrefix, based on centrifuge&#xD;&#xA;	pub struct LLMPoliticsCopy;&#xD;&#xA;&#xD;&#xA;	impl StorageInstance for LLMPoliticsCopy {&#xD;&#xA;		fn pallet_prefix() -&gt; &amp;'static str {&#xD;&#xA;			&quot;LLM&quot;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		const STORAGE_PREFIX: &amp;'static str = &quot;LLMPolitics&quot;;&#xD;&#xA;	}&#xD;&#xA;	pub type LLMPolitics&lt;T&gt; = frame_support::storage::types::StorageMap&lt;&#xD;&#xA;		LLMPoliticsCopy,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		&lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;		u128,&#xD;&#xA;		frame_support::pallet_prelude::ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;	//type AccountId = frame_system::Config::AccountId;&#xD;&#xA;&#xD;&#xA;	pub fn check_pooled_llm&lt;T: frame_system::Config&gt;(sender: T::AccountId) -&gt; bool {&#xD;&#xA;		LLMPolitics::&lt;T&gt;::contains_key::&lt;T::AccountId&gt;(sender)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then in the other pallet I do a simple contains check to check for the account:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;ensure!(!llmmod::check_pooled_llm::&lt;T&gt;(who.clone()), Error::&lt;T&gt;::NoPolLLM);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="12983" PostHistoryTypeId="2" PostId="3465" RevisionGUID="1d70fd1c-c94e-4918-a8f8-1940646a67fa" CreationDate="2022-06-27T12:46:20.603" UserId="560" Text="You can always query `pallet_assets::&lt;T&gt;::Balance` with the asset id&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let assetid: AssetId&lt;T&gt; = 1337u32.into();&#xD;&#xA;let asset_balance: u128 = pallet_assets::Pallet::&lt;T&gt;::balance(assetid.into(), t_ac2)&#xD;&#xA;				.try_into()&#xD;&#xA;				.unwrap_or(0u128);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12985" PostHistoryTypeId="5" PostId="3465" RevisionGUID="9b79d90c-89d8-4b63-bfe7-ff3b02f96024" CreationDate="2022-06-27T12:54:11.070" UserId="560" Comment="added 76 characters in body" Text="After you create the asset with for example `pallet_assets::Pallet::&lt;T&gt;::force_create` query `pallet_assets::&lt;T&gt;::Balance` with the asset id&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let assetid: AssetId&lt;T&gt; = 1337u32.into();&#xD;&#xA;let asset_balance: u128 = pallet_assets::Pallet::&lt;T&gt;::balance(assetid.into(), myaccount)&#xD;&#xA;				.try_into()&#xD;&#xA;				.unwrap_or(0u128);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="12986" PostHistoryTypeId="52" PostId="3456" RevisionGUID="3fec930a-bc43-4722-ba86-e3834966f147" CreationDate="2022-06-27T12:59:35.897" />
  <row Id="12987" PostHistoryTypeId="6" PostId="3354" RevisionGUID="4e98732d-c8bc-4318-8752-bb15c0763d44" CreationDate="2022-06-27T13:19:37.960" UserId="172" Comment="Add new tag." Text="|pallet|storage|storagenmap|liberland|" ContentLicense="CC BY-SA 4.0" />
  <row Id="12988" PostHistoryTypeId="2" PostId="3466" RevisionGUID="9e5b23fa-f8da-4ce5-9787-0c772937c3ca" CreationDate="2022-06-27T13:22:40.443" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="12990" PostHistoryTypeId="1" PostId="3466" RevisionGUID="9e5b23fa-f8da-4ce5-9787-0c772937c3ca" CreationDate="2022-06-27T13:22:40.443" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="12991" PostHistoryTypeId="2" PostId="3467" RevisionGUID="d2226345-1209-46d7-bd2c-37d51dbc6152" CreationDate="2022-06-27T13:22:40.443" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="12993" PostHistoryTypeId="1" PostId="3467" RevisionGUID="d2226345-1209-46d7-bd2c-37d51dbc6152" CreationDate="2022-06-27T13:22:40.443" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="12994" PostHistoryTypeId="2" PostId="3468" RevisionGUID="54b70124-7843-409c-b940-5bc09afc0873" CreationDate="2022-06-27T14:04:10.733" UserId="452" Text="Epochs are used to collect entropy from VRF outputs, this entropy is then used on a future epoch as a seed for the VRF (https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html, https://polkadot.network/blog/polkadot-consensus-part-3-babe/). Aside from that, the entire staking system of Polkadot assumes a closed validator set for certain periods (session and era concepts)." ContentLicense="CC BY-SA 4.0" />
  <row Id="12996" PostHistoryTypeId="2" PostId="3469" RevisionGUID="889bd563-ac70-4f1d-913f-4734fbd085d8" CreationDate="2022-06-27T14:37:29.250" UserId="2552" Text="I think you can use maybe_total_supply. This will return Some(supply) if the asset exists, and None otherwise&#xD;&#xA; https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/assets/src/functions.rs#L62" ContentLicense="CC BY-SA 4.0" />
  <row Id="12998" PostHistoryTypeId="2" PostId="3470" RevisionGUID="e372ec15-cee3-4f44-b270-9bf318c324b9" CreationDate="2022-06-27T14:40:49.887" UserId="298" Text="We are designing a parachain pallet. Part of it delays a call until a certain block number. Kusama has more consistent blocktimes than our newly born parachain. Is there a way we can access the block number of Kusama?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13000" PostHistoryTypeId="1" PostId="3470" RevisionGUID="e372ec15-cee3-4f44-b270-9bf318c324b9" CreationDate="2022-06-27T14:40:49.887" UserId="298" Text="Can we access a Kusama blocknumber from a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13001" PostHistoryTypeId="3" PostId="3470" RevisionGUID="e372ec15-cee3-4f44-b270-9bf318c324b9" CreationDate="2022-06-27T14:40:49.887" UserId="298" Text="|parachain|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13002" PostHistoryTypeId="2" PostId="3471" RevisionGUID="60b2b937-6234-417b-a95a-327327a0a00c" CreationDate="2022-06-27T14:55:17.953" UserId="2025" Text="Adding to Alexander's answer, bear in mind that depending on what the type of node you are querying, you may not be able to get the state at any height.&#xD;&#xA;&#xD;&#xA;For example, full nodes keep only the state at the last 256 blocks. To access the state of the blockchain at any block you will need to query (run locally?) an archival node. See [this guide for more info](https://wiki.polkadot.network/docs/maintain-sync#running-an-archive-node)." ContentLicense="CC BY-SA 4.0" />
  <row Id="13004" PostHistoryTypeId="2" PostId="3472" RevisionGUID="86265e96-a714-4c93-b6ee-c8d57ddc5ad4" CreationDate="2022-06-27T14:56:22.103" UserId="2565" Text="I already have a running erc20 smart contract using ink.  I want to add mint and burn functions.  Can anyone point me to the right direction, e.g., sample code, etc." ContentLicense="CC BY-SA 4.0" />
  <row Id="13006" PostHistoryTypeId="1" PostId="3472" RevisionGUID="86265e96-a714-4c93-b6ee-c8d57ddc5ad4" CreationDate="2022-06-27T14:56:22.103" UserId="2565" Text="How do you mint and burn ERC20 smart contract token using ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13007" PostHistoryTypeId="3" PostId="3472" RevisionGUID="86265e96-a714-4c93-b6ee-c8d57ddc5ad4" CreationDate="2022-06-27T14:56:22.103" UserId="2565" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13008" PostHistoryTypeId="2" PostId="3473" RevisionGUID="863f3d57-f8ba-48f9-8dbc-cc1660cb4980" CreationDate="2022-06-27T15:04:37.970" UserId="642" Text="One of the interesting features of (social) account recovery in Kusama is that &quot;If some one tries to initial recovery for your recoverable account, you can close the process and kind of punish them by withdrawing their recovery deposit&quot;.&#xD;&#xA;&#xD;&#xA;Hence, my question is how can a recoverable account get notified when a recovery process is initiated? (if the only way is listening to the events, which indexer provides such data?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13010" PostHistoryTypeId="1" PostId="3473" RevisionGUID="863f3d57-f8ba-48f9-8dbc-cc1660cb4980" CreationDate="2022-06-27T15:04:37.970" UserId="642" Text="how can a recoverable account get notified when someone is initiated a recovery for it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13011" PostHistoryTypeId="3" PostId="3473" RevisionGUID="863f3d57-f8ba-48f9-8dbc-cc1660cb4980" CreationDate="2022-06-27T15:04:37.970" UserId="642" Text="|kusama|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13012" PostHistoryTypeId="2" PostId="3474" RevisionGUID="8ff5df24-7d56-4085-9c71-5289ab4f2f57" CreationDate="2022-06-27T15:05:18.037" UserId="2355" Text="context: I need to put some data on vesting pallet. There is no such things as &quot;setVestedStorage&quot;, so i need to use ``system.setStorage`` (``api.tx.system.storage`` for the complete form) from the polkadotjs API&#xD;&#xA;&#xD;&#xA;The problem is that i cant find ANY documentation on this function, the only thing i know is it's interface: ``setStorage(Vec&lt;Bytes, Bytes&gt;)``, and that the first bytes parameter are the &quot;old bytes&quot;, and the second the &quot;new bytes&quot; (according to the only appearance of &quot;setStorage&quot; in [substrate github repo][1]), but that's all.&#xD;&#xA;&#xD;&#xA;How do i get the old bytes ?&#xD;&#xA;How do i get the new bytes ? especially as i use the function in a js script.&#xD;&#xA;How am i supposed to call this function ?&#xD;&#xA;Do i have to call it multiple times if i have an enormous amount of data (200k entries), or can i call it a single time ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/search?q=setStorage" ContentLicense="CC BY-SA 4.0" />
  <row Id="13014" PostHistoryTypeId="1" PostId="3474" RevisionGUID="8ff5df24-7d56-4085-9c71-5289ab4f2f57" CreationDate="2022-06-27T15:05:18.037" UserId="2355" Text="How to use system.setStorage()?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13015" PostHistoryTypeId="3" PostId="3474" RevisionGUID="8ff5df24-7d56-4085-9c71-5289ab4f2f57" CreationDate="2022-06-27T15:05:18.037" UserId="2355" Text="|polkadot-js|storage|vesting-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13016" PostHistoryTypeId="5" PostId="3471" RevisionGUID="bb224ec5-12dc-410b-a63c-70a51ab060e6" CreationDate="2022-06-27T15:06:01.020" UserId="2025" Comment="added 9 characters in body" Text="Adding to Alexander's answer, bear in mind that depending on what the type of node you are querying, you may not be able to get the state at any height.&#xD;&#xA;&#xD;&#xA;For example, Polkadot full nodes keep only the state at the last 256 blocks. To access the state of the blockchain at any block you will need to query (run locally?) an archival node. See [this guide for more info](https://wiki.polkadot.network/docs/maintain-sync#running-an-archive-node)." ContentLicense="CC BY-SA 4.0" />
  <row Id="13017" PostHistoryTypeId="2" PostId="3475" RevisionGUID="7adcabaa-3d7c-4276-8b08-3f0547310a29" CreationDate="2022-06-27T15:12:43.877" UserId="2478" Text="In the documentation api.query.childBounties.childBounties takes two u32 arguments https://polkadot.js.org/docs/substrate/storage#childbountiesu32-u32-optionpalletchildbountieschildbounty&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Z35Iu.png&#xD;&#xA;&#xD;&#xA;But it is not clear what are those arguments. Can someone tell me how to map polkadot js api to substrate rust code so these lookups can be checked." ContentLicense="CC BY-SA 4.0" />
  <row Id="13019" PostHistoryTypeId="1" PostId="3475" RevisionGUID="7adcabaa-3d7c-4276-8b08-3f0547310a29" CreationDate="2022-06-27T15:12:43.877" UserId="2478" Text="What are the arguments for api.query.childBounties.childBounties" ContentLicense="CC BY-SA 4.0" />
  <row Id="13020" PostHistoryTypeId="3" PostId="3475" RevisionGUID="7adcabaa-3d7c-4276-8b08-3f0547310a29" CreationDate="2022-06-27T15:12:43.877" UserId="2478" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13021" PostHistoryTypeId="6" PostId="3445" RevisionGUID="e5cc316c-a5cb-4007-8861-89ddad611849" CreationDate="2022-06-27T15:35:59.107" UserId="34" Comment="edited tags" Text="|wsl|windows|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13022" PostHistoryTypeId="5" PostId="3467" RevisionGUID="ef2ba34c-7ba6-4e30-a838-3fb4d99dfeea" CreationDate="2022-06-27T15:36:23.350" UserId="172" Comment="added 73 characters in body" Text="Liberland is building e-governance services using a Substrate blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="13023" PostHistoryTypeId="24" PostId="3467" RevisionGUID="ef2ba34c-7ba6-4e30-a838-3fb4d99dfeea" CreationDate="2022-06-27T15:36:23.350" Comment="Proposed by 172 approved by 34 edit id of 221" ContentLicense="CC BY-SA 4.0" />
  <row Id="13024" PostHistoryTypeId="5" PostId="3471" RevisionGUID="24041b5a-6667-40a0-8b46-0e055dd6d33f" CreationDate="2022-06-27T15:53:12.160" UserId="2025" Comment="deleted 1 character in body" Text="Adding to Alexander's answer, bear in mind that depending on what the type of node you are querying, you may not be able to get the state at any height.&#xD;&#xA;&#xD;&#xA;For example, Polkadot full nodes keep only the state at the last 256 blocks. To access the state of the blockchain at any block you will need to query (run locally?) an archive node. See [this guide for more info](https://wiki.polkadot.network/docs/maintain-sync#running-an-archive-node)." ContentLicense="CC BY-SA 4.0" />
  <row Id="13025" PostHistoryTypeId="2" PostId="3476" RevisionGUID="d416f653-5793-4942-83ca-cff5dd279791" CreationDate="2022-06-27T15:59:41.787" UserId="29" Text="There are various methods of releasing. It may be helpful for you to look at parachain teams in the ecosystem and see how they are doing their releases - look at their github." ContentLicense="CC BY-SA 4.0" />
  <row Id="13027" PostHistoryTypeId="2" PostId="3477" RevisionGUID="9248e262-4d8f-442a-9d7c-9f4f0ff84634" CreationDate="2022-06-27T16:08:49.243" UserId="246" Text="Hi trying to understand total number of XCM messages sent on a relay chain. &#xD;&#xA;&#xD;&#xA;Should I be counting all ‘Sent’ events from the ‘xcmpallet’. &#xD;&#xA;&#xD;&#xA;Thanks. " ContentLicense="CC BY-SA 4.0" />
  <row Id="13029" PostHistoryTypeId="1" PostId="3477" RevisionGUID="9248e262-4d8f-442a-9d7c-9f4f0ff84634" CreationDate="2022-06-27T16:08:49.243" UserId="246" Text="How to measure number of XCM messages sent on a relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13030" PostHistoryTypeId="3" PostId="3477" RevisionGUID="9248e262-4d8f-442a-9d7c-9f4f0ff84634" CreationDate="2022-06-27T16:08:49.243" UserId="246" Text="|xcm|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13031" PostHistoryTypeId="5" PostId="3450" RevisionGUID="bf5dd3ed-a6c0-4966-be5a-9ce688ac67c8" CreationDate="2022-06-27T16:40:36.020" UserId="2446" Comment="added 92 characters in body" Text="So i created a simple frame pallet with an extrinsic. I called this extrinsic from the local explorer at 127.0.0.1:9944 and everything worked and events were generated. But calling it from the Polkadot-JS API has not made any effect.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// substrate client imports&#xD;&#xA;const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;const { mnemonicGenerate } = require('@polkadot/util-crypto');&#xD;&#xA;const { keyring } = require('@polkadot/ui-keyring');&#xD;&#xA;// const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;const { cryptoWaitReady } = require('@polkadot/util-crypto');&#xD;&#xA;const { u8aToHex } = require('@polkadot/util');&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// global variables&#xD;&#xA;const wsProvider = new WsProvider('ws://127.0.0.1:9944');&#xD;&#xA;const port = 3002;&#xD;&#xA;&#xD;&#xA;cryptoWaitReady().then(() =&gt; {&#xD;&#xA;    // load all available addresses and accounts&#xD;&#xA;    keyring.loadAll({ ss58Format: 42, type: 'sr25519' });&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;async function createAccount(req, res) {&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider }).then(() =&gt; {&#xD;&#xA;        cryptoWaitReady().then(() =&gt; {&#xD;&#xA;            const mnemonic = mnemonicGenerate();&#xD;&#xA;            const { pair, json } = keyring.addUri(mnemonic, req.body.password, { name: req.body.name, created: Date.now() });&#xD;&#xA;&#xD;&#xA;            (async function() {&#xD;&#xA;                // get IP address&#xD;&#xA;                let ip = &quot;127.0.0.1&quot;;&#xD;&#xA;&#xD;&#xA;                // record creation and sign-in onchain&#xD;&#xA;                const txHash = await api.tx.robot&#xD;&#xA;                    .signIn(ip)&#xD;&#xA;                    .signAndSend(pair.address);&#xD;&#xA;&#xD;&#xA;                console.log(txHash);&#xD;&#xA;            }());&#xD;&#xA;        });&#xD;&#xA;    });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// request handles&#xD;&#xA;app.use(bodyParser.json());&#xD;&#xA;app.use(bodyParser.urlencoded({ extended: false }))&#xD;&#xA;&#xD;&#xA;// add account&#xD;&#xA;app.post('/create_account', function (req, res) {&#xD;&#xA;    createAccount(req, res);&#xD;&#xA;})&#xD;&#xA;&#xD;&#xA;app.listen(port, () =&gt; console.log(`Listening on port ${port}`))&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; I don't get a transaction hash return value, i don't see any changes on-chain, i don't see any events deposited. Its just silent. Worse, it throws no errors. &#xD;&#xA;&#xD;&#xA;My chain function is correct, that is not the issue.&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1000)]&#xD;&#xA;		pub fn sign_in(origin: OriginFor&lt;T&gt;, ip_addr: Vec&lt;u8&gt;) -&gt; DispatchResult&#xD;&#xA;		{&#xD;&#xA;			// first check for if account id is present&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;			let user_id = sender.clone();&#xD;&#xA;&#xD;&#xA;			// check for overflow&#xD;&#xA;			let ip_address: BoundedVec&lt;_, T::MaxIPAddress&gt; =&#xD;&#xA;				ip_addr.clone().try_into().map_err(|()| Error::&lt;T&gt;::IPAddressOverflow)?;&#xD;&#xA;&#xD;&#xA;			let now: u64 = T::TimeProvider::now().as_secs();&#xD;&#xA;&#xD;&#xA;			let nsd: SignInDetail&lt;T&gt; = SignInDetail {&#xD;&#xA;				ip: ip_address,&#xD;&#xA;				time: now&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			// select user&#xD;&#xA;			let detail = &lt;SignIns&lt;T&gt;&gt;::get(&amp;user_id);&#xD;&#xA;&#xD;&#xA;			if let Some(_sd) = detail {&#xD;&#xA;				// update timestamp&#xD;&#xA;				SignIns::&lt;T&gt;::mutate(&amp;user_id, |det| {&#xD;&#xA;					*det = Some(nsd);&#xD;&#xA;				});&#xD;&#xA;			} else {&#xD;&#xA;				// create new signin record and update timestamp &#xD;&#xA;				SignIns::&lt;T&gt;::insert(&amp;user_id, nsd);&#xD;&#xA;&#xD;&#xA;				// user was just created&#xD;&#xA;				Self::deposit_event(Event::Created(sender, now, ip_addr.clone()));&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;            Self::deposit_event(Event::SignIn(user_id, now, ip_addr.clone()));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA; Same thing happens when i add an account to the keystore, with password and seed.&#xD;&#xA;```&#xD;&#xA; const mnemonic = mnemonicGenerate();&#xD;&#xA;            const { pair, json } = keyring.addUri(mnemonic, &quot;dave&quot;, { name: &quot;david&quot;, created: Date.now() });&#xD;&#xA;```&#xD;&#xA;It doesn't reflect on the local explorer at 127.0.0.1:9944 . Please what am i doing wrong? Thanks. &#xD;&#xA;&#xD;&#xA;But when i use the example here (https://polkadot.js.org/docs/api/start/api.tx), using the ```balances``` pallet, it emits events, makes changes onchain and the changes and events are reflected on the local explorer at 127.0.0.1:9944 . &#xD;&#xA;&#xD;&#xA;or is it because of this:&#xD;&#xA;[![reason][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/w4Lcp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13032" PostHistoryTypeId="2" PostId="3478" RevisionGUID="0a55dad7-ec0d-4ff3-874c-df71358dee10" CreationDate="2022-06-27T16:52:36.680" UserId="2752" Text="In the ink! documentation I found the Keccak256 hash, which gives back a 256-bit hash.&#xD;&#xA;However I can not find a 256-bit integer in the ink! documentation. &#xD;&#xA;If I want to cast from the 32 bytes to an integer value, how could I do&#xD;&#xA;so in the ink! environment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13034" PostHistoryTypeId="1" PostId="3478" RevisionGUID="0a55dad7-ec0d-4ff3-874c-df71358dee10" CreationDate="2022-06-27T16:52:36.680" UserId="2752" Text="Is there a way to use the 256-bit integer type in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13035" PostHistoryTypeId="3" PostId="3478" RevisionGUID="0a55dad7-ec0d-4ff3-874c-df71358dee10" CreationDate="2022-06-27T16:52:36.680" UserId="2752" Text="|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13036" PostHistoryTypeId="2" PostId="3479" RevisionGUID="1a9e74bb-7dc8-4ab3-a63f-2733c2db1d09" CreationDate="2022-06-27T17:01:45.840" UserId="258" Text="So, I am trying to point all my dependencies on substrate contract node to the stable branch `polkadot-v0.9.23`&#xD;&#xA;&#xD;&#xA;But I get these errors when i try compiling&#xD;&#xA;&#xD;&#xA;    error[E0603]: module `group` is private&#xD;&#xA;       --&gt; /Users/Damilare/.cargo/git/checkouts/substrate-7e08433d4c370a21/76522d7/frame/support/procedural/tools/src/syn_ext.rs:50:53&#xD;&#xA;        |&#xD;&#xA;    50  |                 let syn::group::$name { token, content } = syn::group::$parse(input)?;&#xD;&#xA;        |                                                                 ^^^^^ private module&#xD;&#xA;        |&#xD;&#xA;    note: the module `group` is defined here&#xD;&#xA;       --&gt; /Users/Damilare/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.98/src/lib.rs:304:1&#xD;&#xA;        |&#xD;&#xA;    304 | mod group;&#xD;&#xA;        | ^^^^^^^^^^&#xD;&#xA;    &#xD;&#xA;    error[E0603]: module `group` is private&#xD;&#xA;       --&gt; /Users/Damilare/.cargo/git/checkouts/substrate-7e08433d4c370a21/76522d7/frame/support/procedural/tools/src/syn_ext.rs:50:14&#xD;&#xA;        |&#xD;&#xA;    50  |                 let syn::group::$name { token, content } = syn::group::$parse(input)?;&#xD;&#xA;        |                          ^^^^^ private module&#xD;&#xA;        |&#xD;&#xA;    note: the module `group` is defined here&#xD;&#xA;       --&gt; /Users/Damilare/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.98/src/lib.rs:304:1&#xD;&#xA;        |&#xD;&#xA;    304 | mod group;&#xD;&#xA;        | ^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13038" PostHistoryTypeId="1" PostId="3479" RevisionGUID="1a9e74bb-7dc8-4ab3-a63f-2733c2db1d09" CreationDate="2022-06-27T17:01:45.840" UserId="258" Text="Error Building Substrate contract Node(error[E0603]: module `group` is private) After switching Substrate dependencies to &quot;polkadot-v0.9.23&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13039" PostHistoryTypeId="3" PostId="3479" RevisionGUID="1a9e74bb-7dc8-4ab3-a63f-2733c2db1d09" CreationDate="2022-06-27T17:01:45.840" UserId="258" Text="|substrate-node|polkadot|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13040" PostHistoryTypeId="2" PostId="3480" RevisionGUID="63788ae5-949d-4586-9294-5597db34d5e0" CreationDate="2022-06-27T17:31:09.187" UserId="2783" Text="I tried to run my first SubQuery project by following Subquery Quick Start guide but ran into this error while trying to run the project with Docker. I just installed and started using Docker just now and have trouble understanding the framework behind it.&#xD;&#xA;&#xD;&#xA;I ran the docker using:&#xD;&#xA;`yarn start:docker`&#xD;&#xA;&#xD;&#xA;But then received:&#xD;&#xA;`error Command failed with exit code 1.`" ContentLicense="CC BY-SA 4.0" />
  <row Id="13042" PostHistoryTypeId="1" PostId="3480" RevisionGUID="63788ae5-949d-4586-9294-5597db34d5e0" CreationDate="2022-06-27T17:31:09.187" UserId="2783" Text="Create Subquery project from given path failed! Error: Entry file undefined for datasource not exist" ContentLicense="CC BY-SA 4.0" />
  <row Id="13043" PostHistoryTypeId="3" PostId="3480" RevisionGUID="63788ae5-949d-4586-9294-5597db34d5e0" CreationDate="2022-06-27T17:31:09.187" UserId="2783" Text="|substrate-node|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13044" PostHistoryTypeId="5" PostId="3480" RevisionGUID="43a37c04-ee00-42ae-9abf-9846be822f63" CreationDate="2022-06-27T17:35:54.767" UserId="2783" Comment="added 981 characters in body" Text="I tried to run my first SubQuery project by following Subquery Quick Start guide but ran into this error while trying to run the project with Docker. I just installed and started using Docker just now and have trouble understanding the framework behind it.&#xD;&#xA;&#xD;&#xA;I ran the docker using:&#xD;&#xA;`yarn start:docker`&#xD;&#xA;&#xD;&#xA;But then received:&#xD;&#xA;```&#xD;&#xA;subquerygetstartedtutorial-postgres-1        | 2022-06-27 17:13:49.821 UTC [1] LOG:  database system is ready to accept connections&#xD;&#xA;subquerygetstartedtutorial-subquery-node-1   | 2022-06-27T17:13:55.922Z &lt;configure&gt; ERROR Create Subquery project from given path failed! Error: Entry file undefined for datasource not exist&#xD;&#xA;subquerygetstartedtutorial-subquery-node-1 exited with code 1&#xD;&#xA;subquerygetstartedtutorial-subquery-node-1   | 2022-06-27T17:13:57.307Z &lt;configure&gt; ERROR Create Subquery project from given path failed! Error: Entry file undefined for datasource not exist&#xD;&#xA;subquerygetstartedtutorial-subquery-node-1 exited with code 1&#xD;&#xA;subquerygetstartedtutorial-subquery-node-1   | 2022-06-27T17:13:58.646Z &lt;configure&gt; ERROR Create Subquery project from given path failed! Error: Entry file undefined for datasource not exist&#xD;&#xA;container for service &quot;subquery-node&quot; is unhealthy&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13045" PostHistoryTypeId="5" PostId="3473" RevisionGUID="39b33cf3-d487-4699-a83f-831e3521b87e" CreationDate="2022-06-27T18:35:13.140" UserId="642" Comment="added 1 character in body" Text="One of the interesting features of (social) account recovery in Kusama is that &quot;If some one tries to initiate recovery for your recoverable account, you can close the process and kind of punish them by withdrawing their recovery deposit&quot;.&#xD;&#xA;&#xD;&#xA;Hence, my question is how can a recoverable account get notified when a recovery process is initiated? (if the only way is listening to the events, which indexer provides such data?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13047" PostHistoryTypeId="52" PostId="3461" RevisionGUID="94e1d59f-b2b6-4a46-a6f3-8bc125d83168" CreationDate="2022-06-27T19:22:48.263" />
  <row Id="13050" PostHistoryTypeId="2" PostId="3481" RevisionGUID="a47e5923-09d0-43b2-816f-4700ce135100" CreationDate="2022-06-28T04:15:05.047" UserId="711" Text="Have you tried changing the Rust compiler version using rustup command? That could fix your problem or maybe not" ContentLicense="CC BY-SA 4.0" />
  <row Id="13052" PostHistoryTypeId="2" PostId="3482" RevisionGUID="d66325aa-1f66-4c89-8c5d-d4fea6f2a061" CreationDate="2022-06-28T05:30:29.047" UserId="125" Text="I know there is a concept &quot;ED&quot;, which means that if the account balance is below this value, it will be wiped out. I tried to figure out how it works. The `AccountData` is defined in the runtime while stored in the `frame-system` pallet. `try_mutate_exists` in the `frame_system` pallet used to mutate `AccountData`, but how and where does the substrate system wipe the account whose balance below ED? I find `OnKilledAccount` type in the `frame_system::Config`, but it's more like a callback after the account has been killed. &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl&lt;T: Config&gt; StoredMap&lt;T::AccountId, T::AccountData&gt; for Pallet&lt;T&gt; {&#xD;&#xA;    fn get(k: &amp;T::AccountId) -&gt; T::AccountData {&#xD;&#xA;        Account::&lt;T&gt;::get(k).data&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn try_mutate_exists&lt;R, E: From&lt;DispatchError&gt;&gt;(&#xD;&#xA;        k: &amp;T::AccountId,&#xD;&#xA;        f: impl FnOnce(&amp;mut Option&lt;T::AccountData&gt;) -&gt; Result&lt;R, E&gt;,&#xD;&#xA;    ) -&gt; Result&lt;R, E&gt; {&#xD;&#xA;        let account = Account::&lt;T&gt;::get(k);&#xD;&#xA;        let was_providing = is_providing(&amp;account.data);&#xD;&#xA;        let mut some_data = if was_providing {&#xD;&#xA;            Some(account.data)&#xD;&#xA;        } else {&#xD;&#xA;            None&#xD;&#xA;        };&#xD;&#xA;        let result = f(&amp;mut some_data)?;&#xD;&#xA;        let is_providing = some_data.is_some();&#xD;&#xA;        if !was_providing &amp;&amp; is_providing {&#xD;&#xA;            Self::inc_providers(k);&#xD;&#xA;        } else if was_providing &amp;&amp; !is_providing {&#xD;&#xA;            match Self::dec_providers(k)? { // This may trigger account wipe&#xD;&#xA;                DecRefStatus::Reaped =&gt; return Ok(result),&#xD;&#xA;                DecRefStatus::Exists =&gt; {&#xD;&#xA;                    // Update value as normal...&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        } else if !was_providing &amp;&amp; !is_providing {&#xD;&#xA;            return Ok(result);&#xD;&#xA;        }&#xD;&#xA;        Account::&lt;T&gt;::mutate(k, |a| a.data = some_data.unwrap_or_default());&#xD;&#xA;        Ok(result)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13054" PostHistoryTypeId="1" PostId="3482" RevisionGUID="d66325aa-1f66-4c89-8c5d-d4fea6f2a061" CreationDate="2022-06-28T05:30:29.047" UserId="125" Text="How substrate wipe out the accounts whose balance below ED?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13055" PostHistoryTypeId="3" PostId="3482" RevisionGUID="d66325aa-1f66-4c89-8c5d-d4fea6f2a061" CreationDate="2022-06-28T05:30:29.047" UserId="125" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13056" PostHistoryTypeId="2" PostId="3483" RevisionGUID="4cfffc1d-10cb-4eb6-887d-06f4ee437937" CreationDate="2022-06-28T05:50:00.380" UserId="464" Text="I want to use the Asset pallet from another custom pallet. The goal is to use the custom pallet account and transfers the assets of this account to another one using this function: https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/frame/assets/src/lib.rs#L692&#xD;&#xA;&#xD;&#xA;But how do we handle the Origin ( https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/frame/assets/src/lib.rs#L693 ) as we don't have the possibility to sign it ( because it use generated pallet account like treasury does) ? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13058" PostHistoryTypeId="1" PostId="3483" RevisionGUID="4cfffc1d-10cb-4eb6-887d-06f4ee437937" CreationDate="2022-06-28T05:50:00.380" UserId="464" Text="Transfers from asset_pallet with generated pallet account" ContentLicense="CC BY-SA 4.0" />
  <row Id="13059" PostHistoryTypeId="3" PostId="3483" RevisionGUID="4cfffc1d-10cb-4eb6-887d-06f4ee437937" CreationDate="2022-06-28T05:50:00.380" UserId="464" Text="|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13060" PostHistoryTypeId="5" PostId="3482" RevisionGUID="a46e1904-1e0e-42fb-a14f-74e1509a38dc" CreationDate="2022-06-28T06:08:03.397" UserId="125" Comment="added 8 characters in body" Text="I know there is a concept &quot;ED&quot;, which means that if the account balance is below this value, it will be wiped out. I tried to figure out how it works. The `AccountData` is defined in the runtime while stored in the `frame-system` pallet. `try_mutate_exists` in the `frame_system` pallet used to mutate `AccountData` storage, but how and where does the substrate system wipe the account whose balance below ED? I find `OnKilledAccount` type in the `frame_system::Config`, but it's more like a callback after the account has been killed. &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl&lt;T: Config&gt; StoredMap&lt;T::AccountId, T::AccountData&gt; for Pallet&lt;T&gt; {&#xD;&#xA;    fn get(k: &amp;T::AccountId) -&gt; T::AccountData {&#xD;&#xA;        Account::&lt;T&gt;::get(k).data&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn try_mutate_exists&lt;R, E: From&lt;DispatchError&gt;&gt;(&#xD;&#xA;        k: &amp;T::AccountId,&#xD;&#xA;        f: impl FnOnce(&amp;mut Option&lt;T::AccountData&gt;) -&gt; Result&lt;R, E&gt;,&#xD;&#xA;    ) -&gt; Result&lt;R, E&gt; {&#xD;&#xA;        let account = Account::&lt;T&gt;::get(k);&#xD;&#xA;        let was_providing = is_providing(&amp;account.data);&#xD;&#xA;        let mut some_data = if was_providing {&#xD;&#xA;            Some(account.data)&#xD;&#xA;        } else {&#xD;&#xA;            None&#xD;&#xA;        };&#xD;&#xA;        let result = f(&amp;mut some_data)?;&#xD;&#xA;        let is_providing = some_data.is_some();&#xD;&#xA;        if !was_providing &amp;&amp; is_providing {&#xD;&#xA;            Self::inc_providers(k);&#xD;&#xA;        } else if was_providing &amp;&amp; !is_providing {&#xD;&#xA;            match Self::dec_providers(k)? { // This may trigger account wipe&#xD;&#xA;                DecRefStatus::Reaped =&gt; return Ok(result),&#xD;&#xA;                DecRefStatus::Exists =&gt; {&#xD;&#xA;                    // Update value as normal...&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        } else if !was_providing &amp;&amp; !is_providing {&#xD;&#xA;            return Ok(result);&#xD;&#xA;        }&#xD;&#xA;        Account::&lt;T&gt;::mutate(k, |a| a.data = some_data.unwrap_or_default());&#xD;&#xA;        Ok(result)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13061" PostHistoryTypeId="2" PostId="3484" RevisionGUID="ba0854eb-5503-4e77-9272-9f80948e3540" CreationDate="2022-06-28T06:26:55.397" UserId="2551" Text="# Ink! Code&#xD;&#xA;I defined method and struct like this:&#xD;&#xA;```&#xD;&#xA;#[derive(SpreadAllocate, PackedLayout, SpreadLayout, Clone, Decode, Encode)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug, scale_info::TypeInfo, StorageLayout))]&#xD;&#xA;pub struct ShowTest{&#xD;&#xA;    test_id: u8,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;//...&#xD;&#xA;&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn show_test_add(&amp;mut self, v: ShowTest) {&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# Question&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;After I deployed the contract to the local contract-test chain, I found the method name `show_test_add` became `showTestAdd` and field name `test_id` became `testId`.&#xD;&#xA;&#xD;&#xA;And it was the same when I used polkadot api in JS, I don't know why.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6Fpxl.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13063" PostHistoryTypeId="1" PostId="3484" RevisionGUID="ba0854eb-5503-4e77-9272-9f80948e3540" CreationDate="2022-06-28T06:26:55.397" UserId="2551" Text="Why the function names and parameter names are changed when I use in polkadot api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13064" PostHistoryTypeId="3" PostId="3484" RevisionGUID="ba0854eb-5503-4e77-9272-9f80948e3540" CreationDate="2022-06-28T06:26:55.397" UserId="2551" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13069" PostHistoryTypeId="2" PostId="3486" RevisionGUID="93f61ac9-c462-45dc-8b88-1682b034f873" CreationDate="2022-06-28T08:55:26.483" UserId="2794" Text="In the examples I've seen so far I can see that all the `[pallet::*]` definitions are within the `#[frame_support::pallet]` module.&#xD;&#xA;&#xD;&#xA;Is there any way we can split these into separate modules? For example would it be possible to create a `storage.rs` module and add the storages there like so&#xD;&#xA;&#xD;&#xA;```	&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type TotalSupply&lt;T: crate::Config&gt; = StorageValue&lt;_, u64, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The issue I'm facing is that I can't seem to find how to import the `pallet::storage` macro." ContentLicense="CC BY-SA 4.0" />
  <row Id="13071" PostHistoryTypeId="1" PostId="3486" RevisionGUID="93f61ac9-c462-45dc-8b88-1682b034f873" CreationDate="2022-06-28T08:55:26.483" UserId="2794" Text="Organize Runtime into modules" ContentLicense="CC BY-SA 4.0" />
  <row Id="13072" PostHistoryTypeId="3" PostId="3486" RevisionGUID="93f61ac9-c462-45dc-8b88-1682b034f873" CreationDate="2022-06-28T08:55:26.483" UserId="2794" Text="|runtime|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13073" PostHistoryTypeId="5" PostId="3460" RevisionGUID="8556bfdf-a568-4c44-90fc-1a030913227c" CreationDate="2022-06-28T08:59:58.750" UserId="2102" Comment="added 272 characters in body" Text="Is it possible to migrate a running solo chain to a parachain in order to gain decentralized proofs of validity? I don't know if there's any material related to this topic available (I haven't found any), but I was wondering if it is possible to do so.&#xD;&#xA;&#xD;&#xA;The idea is to develop a private network where only certain people will have access, but later on, I would like the chain to be integrated as a parachain, or at least get access to decentralized validation for blocks.&#xD;&#xA;&#xD;&#xA;UPDATE: Can we develop a solo chain and a parachain using the same runtime and node? Using the parachain-template I'm not able to produce blocks the same way I could with the node-template using the --dev flag (I guess it is because there's no GRANDPA pallet included)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13074" PostHistoryTypeId="2" PostId="3487" RevisionGUID="ca0b5f6d-04fd-4a42-8445-3aea33e70b7c" CreationDate="2022-06-28T09:00:52.913" UserId="2384" Text="While I also was doing something that requires fee-less transaction, it might be worthwhile for future reader,&#xD;&#xA;&#xD;&#xA;## Do not charge fee in specific extrinsic call&#xD;&#xA;While defining extrinsic call in pallet, we usually do:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(10_000 + Weight::db_write())]&#xD;&#xA;fn some_call(origin: _) -&gt; DispatchResult&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;this can be changed to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(Pays::No)]&#xD;&#xA;fn some_call(origin: _) -&gt; DispatchResult&#xD;&#xA;```&#xD;&#xA;so the call to `some_call` will not deduce any fee from caller&#xD;&#xA;&#xD;&#xA;## Do not charge fee for selective accounts only&#xD;&#xA;It might also be case that one have list of accounts that it should not charge fee for everyone else, it should&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(10_000 + Weight::db_read(2))]&#xD;&#xA;fn some_extrinsic(origin: OriginFro&lt;T&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    let caller = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;    let special_accounts = &lt;SepecialList&lt;T&gt;&gt;::get();&#xD;&#xA;    /*&#xD;&#xA;    Other operation&#xD;&#xA;    */&#xD;&#xA;&#xD;&#xA;    if special_accounts.contains(caller) {&#xD;&#xA;        Ok(Pays::No.into())&#xD;&#xA;    } else {&#xD;&#xA;        Ok(Pays::Yes.into())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Do not charge fee where caller doesn't matter at all&#xD;&#xA;We can simply make unsigned extrinsic at all&#xD;&#xA;&#xD;&#xA;## The whole flow don't charge any fee&#xD;&#xA;As [already answered](https://substrate.stackexchange.com/a/1800/2384), you can remove `pallet_transaction-payment`entirely" ContentLicense="CC BY-SA 4.0" />
  <row Id="13076" PostHistoryTypeId="4" PostId="3473" RevisionGUID="08b532b7-8bd7-4c4b-a9c8-60d539cfba89" CreationDate="2022-06-28T09:40:47.357" UserId="642" Comment="edited title" Text="How can a recoverable account get notified when someone is initiated a recovery for it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13077" PostHistoryTypeId="2" PostId="3488" RevisionGUID="89c2c9de-bc30-4b25-9e94-9834299f90ca" CreationDate="2022-06-28T09:45:08.007" UserId="140" Text="We created a crowdloan campaign. We recently won the parachain slot. Now we want to know how users can claim their tokens which they contributed in crowdloan?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13079" PostHistoryTypeId="1" PostId="3488" RevisionGUID="89c2c9de-bc30-4b25-9e94-9834299f90ca" CreationDate="2022-06-28T09:45:08.007" UserId="140" Text="How to claim tokens from crowdloan after winning a Parachain slot" ContentLicense="CC BY-SA 4.0" />
  <row Id="13080" PostHistoryTypeId="3" PostId="3488" RevisionGUID="89c2c9de-bc30-4b25-9e94-9834299f90ca" CreationDate="2022-06-28T09:45:08.007" UserId="140" Text="|substrate-node|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13081" PostHistoryTypeId="5" PostId="3462" RevisionGUID="5f783ecd-3080-47e5-b78b-f4eedf497546" CreationDate="2022-06-28T09:48:06.383" UserId="2673" Comment="Added related answers from Stackexchange" Text="I believe [this guide][1] describes how to do this.&#xD;&#xA;&#xD;&#xA;EDIT: There are some related answers here:&#xD;&#xA;* https://substrate.stackexchange.com/a/2911/2673&#xD;&#xA;* https://substrate.stackexchange.com/a/2334/2673&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="13083" PostHistoryTypeId="2" PostId="3489" RevisionGUID="e0e6342c-a442-414f-9066-6f8ab57c2395" CreationDate="2022-06-28T10:22:40.493" UserId="32" Text="Congratulations on winning the parachain slot! As the crowdloan campaign was successful, the tokens are now bonded till the end of the parachain lease. After the slot lease expires, anyone can trigger the refund for the contributed tokens through the permissionless `crowdloan.refund` extrinsic available on Polkadot JS Apps &gt; Developer &gt; Extrinsics page, by specifying the parachain ID. &#xD;&#xA;&#xD;&#xA;Detailed information available here:&#xD;&#xA;[https://wiki.polkadot.network/docs/learn-crowdloans#supporting-a-crowdloan-campaign][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-crowdloans#supporting-a-crowdloan-campaign" ContentLicense="CC BY-SA 4.0" />
  <row Id="13085" PostHistoryTypeId="2" PostId="3490" RevisionGUID="7ad02a6c-1bdb-494a-832d-034283cbf0ed" CreationDate="2022-06-28T10:40:25.733" UserId="2204" Text="So, substrate uses a bunch of network messages like block announce, grandpa message, block request-response, transaction. Substrate has notification substream open sending and receiving these messages and may be some other data as well.&#xD;&#xA;I expect that there might be some limit on size of the data substrate receives, because otherwise people can send huge amount of data to do DoS. So, is there a size limit on these network messages and how much?&#xD;&#xA;For more context, look at https://github.com/ChainSafe/gossamer/issues/2399" ContentLicense="CC BY-SA 4.0" />
  <row Id="13087" PostHistoryTypeId="1" PostId="3490" RevisionGUID="7ad02a6c-1bdb-494a-832d-034283cbf0ed" CreationDate="2022-06-28T10:40:25.733" UserId="2204" Text="Is there a size limit on substrate messages?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13088" PostHistoryTypeId="3" PostId="3490" RevisionGUID="7ad02a6c-1bdb-494a-832d-034283cbf0ed" CreationDate="2022-06-28T10:40:25.733" UserId="2204" Text="|networking|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13089" PostHistoryTypeId="2" PostId="3491" RevisionGUID="c19da5f1-ee3b-4a02-918b-0962859d3a82" CreationDate="2022-06-28T12:09:03.607" UserId="100" Text="Polkadot.js transforms contract message names to `camelCase` for consistency across its packages and alignment with JavaScript common practice.&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/docs/api-contract/FAQ#why-is-there-a-snake_case-vs-camelcase-difference" ContentLicense="CC BY-SA 4.0" />
  <row Id="13091" PostHistoryTypeId="2" PostId="3492" RevisionGUID="3bf74cfb-8706-4595-861b-66eba7543827" CreationDate="2022-06-28T12:19:59.127" UserId="2355" Text="What should i do between these two options:&#xD;&#xA;&#xD;&#xA;1) ``utility.batch()``&#xD;&#xA;&#xD;&#xA;I can batch multiple calls into one call, so it avoid making too many calls, but i'm afraid this will exceed the size of the block if i put all of my 20 000 transactions, and i would end up with something unwanted... Or does ``batch()`` can dispatch the calls on multiple blocks ?&#xD;&#xA;&#xD;&#xA;2) the call&#xD;&#xA;&#xD;&#xA;Or i can just ``signAndSend`` each transaction. It makes a looot of transaction, but i think it would be the best way as i'm (almost) sure everything will be sent across multiple blocks, but it will also be very long, and i'll need to make sure i dont have network/PC problem while the script is running" ContentLicense="CC BY-SA 4.0" />
  <row Id="13093" PostHistoryTypeId="1" PostId="3492" RevisionGUID="3bf74cfb-8706-4595-861b-66eba7543827" CreationDate="2022-06-28T12:19:59.127" UserId="2355" Text="What is the best way to batch ~20 000 calls to a chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13094" PostHistoryTypeId="3" PostId="3492" RevisionGUID="3bf74cfb-8706-4595-861b-66eba7543827" CreationDate="2022-06-28T12:19:59.127" UserId="2355" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13095" PostHistoryTypeId="2" PostId="3493" RevisionGUID="ab03ae78-1733-432a-b4fa-ec1578c02819" CreationDate="2022-06-28T12:30:02.560" UserId="1721" Text="I am trying to create a tuple. I know we can create an enum by defining the type as &#xD;&#xA;```&#xD;&#xA;   MyEnum: {&#xD;&#xA;            _enum: {&#xD;&#xA;                'account': String,&#xD;&#xA;                'accountId': 'u128'&#xD;&#xA;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;similarly how can i create a tuple type&#xD;&#xA;```&#xD;&#xA;(account, accountId)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13097" PostHistoryTypeId="1" PostId="3493" RevisionGUID="ab03ae78-1733-432a-b4fa-ec1578c02819" CreationDate="2022-06-28T12:30:02.560" UserId="1721" Text="How to create a tuple type using polkadot.js api" ContentLicense="CC BY-SA 4.0" />
  <row Id="13098" PostHistoryTypeId="3" PostId="3493" RevisionGUID="ab03ae78-1733-432a-b4fa-ec1578c02819" CreationDate="2022-06-28T12:30:02.560" UserId="1721" Text="|polkadot-js|scale-codec|javascript|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13100" PostHistoryTypeId="2" PostId="3494" RevisionGUID="2a3ebac5-b5e7-4b2d-810d-8d39f0385f6b" CreationDate="2022-06-28T14:54:09.887" UserId="1870" Text="In the deprecated Canvas repo the Rococo Canvas testnet is mentioned, however, I can't find any working rpc url. I can't connect to the [RPC linked][1] there, so I'd assume it's deprecated as well.&#xD;&#xA;&#xD;&#xA;On polkadot.js/apps I found a link to the Rococo Contracts which seems to do the job as well, however, I don't find any information on how I can get tokens to deploy my ink! smart contract. Does anybody know a faucet?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-canvas-rpc.polkadot.io#/explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="13102" PostHistoryTypeId="1" PostId="3494" RevisionGUID="2a3ebac5-b5e7-4b2d-810d-8d39f0385f6b" CreationDate="2022-06-28T14:54:09.887" UserId="1870" Text="On which public testnet can I deploy an ink! smart contract for testing" ContentLicense="CC BY-SA 4.0" />
  <row Id="13103" PostHistoryTypeId="3" PostId="3494" RevisionGUID="2a3ebac5-b5e7-4b2d-810d-8d39f0385f6b" CreationDate="2022-06-28T14:54:09.887" UserId="1870" Text="|ink|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13104" PostHistoryTypeId="10" PostId="3494" RevisionGUID="107fa70f-5e67-463e-bfb6-d72db5e6f944" CreationDate="2022-06-28T15:35:20.130" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[3399],&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="13105" PostHistoryTypeId="5" PostId="3480" RevisionGUID="798541dc-44ac-4664-9cf3-3919322b09dc" CreationDate="2022-06-28T15:39:08.843" UserId="34" Comment="added 33 characters in body; edited tags" Text="I tried to run my first [SubQuery](https://www.subquery.network/) project by following SubQuery Quick Start guide but ran into this error while trying to run the project with Docker. I just installed and started using Docker just now and have trouble understanding the framework behind it.&#xD;&#xA;&#xD;&#xA;I ran the docker using:&#xD;&#xA;`yarn start:docker`&#xD;&#xA;&#xD;&#xA;But then received:&#xD;&#xA;```&#xD;&#xA;subquerygetstartedtutorial-postgres-1        | 2022-06-27 17:13:49.821 UTC [1] LOG:  database system is ready to accept connections&#xD;&#xA;subquerygetstartedtutorial-subquery-node-1   | 2022-06-27T17:13:55.922Z &lt;configure&gt; ERROR Create Subquery project from given path failed! Error: Entry file undefined for datasource not exist&#xD;&#xA;subquerygetstartedtutorial-subquery-node-1 exited with code 1&#xD;&#xA;subquerygetstartedtutorial-subquery-node-1   | 2022-06-27T17:13:57.307Z &lt;configure&gt; ERROR Create Subquery project from given path failed! Error: Entry file undefined for datasource not exist&#xD;&#xA;subquerygetstartedtutorial-subquery-node-1 exited with code 1&#xD;&#xA;subquerygetstartedtutorial-subquery-node-1   | 2022-06-27T17:13:58.646Z &lt;configure&gt; ERROR Create Subquery project from given path failed! Error: Entry file undefined for datasource not exist&#xD;&#xA;container for service &quot;subquery-node&quot; is unhealthy&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13106" PostHistoryTypeId="6" PostId="3480" RevisionGUID="798541dc-44ac-4664-9cf3-3919322b09dc" CreationDate="2022-06-28T15:39:08.843" UserId="34" Comment="added 33 characters in body; edited tags" Text="|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13107" PostHistoryTypeId="6" PostId="3492" RevisionGUID="c4bb1305-94b9-4483-8c27-596ceb6a1e9b" CreationDate="2022-06-28T15:40:04.747" UserId="34" Comment="edited tags" Text="|polkadot-js|batch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13109" PostHistoryTypeId="5" PostId="3494" RevisionGUID="200d3858-ee03-4d0d-9e89-6682c420d645" CreationDate="2022-06-28T15:48:14.480" UserId="1870" Comment="add answer" Text="In the deprecated Canvas repo the Rococo Canvas testnet is mentioned, however, I can't find any working rpc url. I can't connect to the [RPC linked][1] there, so I'd assume it's deprecated as well.&#xD;&#xA;&#xD;&#xA;On polkadot.js/apps I found a link to the Rococo Contracts which seems to do the job as well, however, I don't find any information on how I can get tokens to deploy my ink! smart contract. Does anybody know a faucet?&#xD;&#xA;&#xD;&#xA;**EDIT**&#xD;&#xA;&#xD;&#xA;- I was able to solve it by sending the following command to the [faucet channel on element][2]: `!drip YOUR_SS_58_ADDRESS:1002`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-canvas-rpc.polkadot.io#/explorer&#xD;&#xA;  [2]: https://matrix.to/#/#rococo-faucet:matrix.org" ContentLicense="CC BY-SA 4.0" />
  <row Id="13110" PostHistoryTypeId="2" PostId="3495" RevisionGUID="4fc81113-50d9-4b28-a2b6-6a67dd19e259" CreationDate="2022-06-28T16:22:58.397" UserId="452" Text="Different subprotocols are using different limits:&#xD;&#xA;- request/response protocols: 16MB ([blocks](https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/client/network/sync/src/block_request_handler.rs#L71), [state](https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/client/network/sync/src/state_request_handler.rs#L58), [light](https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/client/network/light/src/light_client_requests.rs#L39), [warp](https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/client/network/sync/src/warp_request_handler.rs#L46))&#xD;&#xA;- notifications: [grandpa](https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/client/finality-grandpa/src/lib.rs#L733) 1MB, [transactions](https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/client/network/src/transactions.rs#L68) 16MB, [block announcements](https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/client/network/src/protocol.rs#L93) 1MB" ContentLicense="CC BY-SA 4.0" />
  <row Id="13116" PostHistoryTypeId="2" PostId="3497" RevisionGUID="ee25f891-c542-4973-a2da-35c436aca68e" CreationDate="2022-06-28T17:33:02.240" UserId="28" Text="If you want to notify the user exactly when a recovery process for their account has started, there will be a Pallet Event `RecoveryInitiated` when the recovery process has started, which can be listened for. You would basically need an active node or block explorer listening for these events, and some way to actively push a notification to the user.&#xD;&#xA;&#xD;&#xA;You can also look at the `ActiveRecovery` storage for a user to get the status of the recovery process passively, for example when a user interacts with your UI. This would allow any UI to at least notify the user that a process is active, even though it may not be exactly right when it started. The recovery delay period should be long enough to allow a user to still notice there is a recovery and stop it if necessary.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13118" PostHistoryTypeId="2" PostId="3498" RevisionGUID="2b7e2ebb-6ed9-4f6b-bf21-1b2b0335dd9b" CreationDate="2022-06-28T17:35:11.510" UserId="140" Text="I am trying to verify a simple runtime-upgrade using `try-runtime`. I followed https://docs.substrate.io/reference/how-to-guides/tools/use-try-runtime/ and https://docs.substrate.io/reference/command-line-tools/try-runtime/ to configure `try-runtime`.&#xD;&#xA;&#xD;&#xA;I started a relaychain on local and connected my parachain. After that I increased `authoring_version`, `spec_version`, `transaction_version` by one. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I executed below command&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run  --release --features try-runtime -- try-runtime --chain rococo-local-raw.json --wasm-execution=compiled on-runtime-upgrade live --uri=ws://localhost:8844&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and got below log&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-06-28 19:25:24 Connection established to target: Target { sockaddrs: [], host: &quot;localhost&quot;, host_header: &quot;localhost:8844&quot;, _mode: Plain, path_and_query: &quot;/&quot; }&#xD;&#xA;2022-06-28 19:25:24 scraping key-pairs from remote @ 0x54c6e42d70afcea8a69d6d4fa5bb6a4e88a56f12d4d6439d6f1327390c9d1890    &#xD;&#xA;2022-06-28 19:25:24 downloading data for all pallets.    &#xD;&#xA;2022-06-28 19:25:24 adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    &#xD;&#xA;2022-06-28 19:25:24 ‍ scraping child-tree data from 0 top keys    &#xD;&#xA;2022-06-28 19:25:24 injecting a total of 272 top keys    &#xD;&#xA;2022-06-28 19:25:24 injecting a total of 0 child keys    &#xD;&#xA;2022-06-28 19:25:24 initialized state externalities with storage root 0x6e3a0b89918cb69a8c1864afc1879fce3af15f080002f13ce217fddafa55449e    &#xD;&#xA;2022-06-28 19:25:26 Connection established to target: Target { sockaddrs: [], host: &quot;localhost&quot;, host_header: &quot;localhost:8844&quot;, _mode: Plain, path_and_query: &quot;/&quot; }&#xD;&#xA;2022-06-28 19:25:26 found matching spec name: &quot;test-parachain&quot;    &#xD;&#xA;2022-06-28 19:25:26 found matching spec version: 4    &#xD;&#xA;2022-06-28 19:25:26 try-runtime::on_runtime_upgrade parachain-template.    &#xD;&#xA;2022-06-28 19:25:26 [138]  Running migration with current storage version StorageVersion(1) / onchain StorageVersion(1)    &#xD;&#xA;2022-06-28 19:25:26 [138]  Migration did not executed. This probably should be removed    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for System    &#xD;&#xA;2022-06-28 19:25:26 ⚠️ ParachainSystem declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for Timestamp    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for ParachainInfo    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for TransactionPayment    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for Authorship    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for Session    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for Aura    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for AuraExt    &#xD;&#xA;2022-06-28 19:25:26 ⚠️ XcmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`    &#xD;&#xA;2022-06-28 19:25:26 ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for CumulusXcm    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for DmpQueue    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for XTokens    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for UnknownTokens    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for OrmlXcm    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for Treasury    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for Sudo    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for SudoOrigin    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for Council    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for Elections    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for Bootstrap    &#xD;&#xA;2022-06-28 19:25:26 ✅ no migration for Utility    &#xD;&#xA;2022-06-28 19:25:26 proof: 7e8e9f24b5fe37d30a429100664875294e7b9012096b41c4eb3aaf947f6ea42908010080fff78063ee78a43efee759a141dd64405df18ec3692c075def50a269d73fa4c79cf14680c3026eb264b25a84e01429e9564dd5bff011025763c472c33c2e81cc40ce8eb8802a18c60535c2eadd08e83fe26b935525c02144f18f53af9e2e055f6455128b1e80382f8597eb729aa4e676c306af30e936ddd8015efec0a833d135a72b45e1a4ba80cf890b0e8bb88ecc91a810cb7167abf988b2c96d782b07f905e3a3a054184fde80680036a0c364f6e7ef02889ac035636b10c6e166aff95ee8a1b4199dd540bb3c805f766a02769c4f3f74c0cfe5e781d43f7cce5248039c24b7a261ec0946bf133f809378787708226b4652132d7afec3add9d0c9e86eba9dbaca3133306d35f7c5948058e418bcf731d38bb0b715e168c72948f69ee197a9d0a2308f1a94e297b08bc880a05fc66697076e96eadd5d00d6029d1018044e0d4ba9453ca34fbef7c80118d7801f4ee836eebafabc11f84945ebfd2301ad3ec6b5786589a18ee9e9006b83b8e380060cba8c601bb318b4492a318599d76b65f31684b3050f492dd0a4b20c079c9480aa9cdcbba128719857cd6b792da28e766df4df00520b28916ed5a051d7f8169980496a14ca32680365b5928d6f7e94baf41f58749aa854498fab5f2cb3d720073f807576c2d2f87fe169a4a81e...1d4c4fd0153f71f566c4e280209cb3f73a369b3dd45351ac06f08666d2ffef955d3f76d3f6f369672f13964080a2ab88fbd63a9d859a9af8a71163b8bfa4337089d9b83b9e7247d3309e5627ee80bccc7e3755b35bfbda8f717e0d15c15ff2e618cbfad9fd4a80be807469a6461d9f05323df7cc47150b3930e2666b0aa3133d304c5f0a6ccf00f78ac824e72d27429ca3b8b004008027d293b7c1f82de8b4cb28ef8cd8f7e6f666edfa59bc72b5fc10d6bbc8e0c9a24c5f0dca42deb008c6559ee789c9b9f70a2c040080ce26713589dfb681da82046f8bebf1c3ba2f8e08eff1891451b75b7627bac301806588166e1e4eacf7963c352e635afc9330b1495dacde5ec41473e03897bf2ff68011c47f863c1b7176e7e4dfe070465f7dd3f126c81c104b40c5f1385a9bddf3c48012d8d13add449830dd394c801f4f2f8e2c74c65f39324b8572c8c3d4311b8bb68000b4806e05d5fab3cfa74da4413d7962efe8a22babc2afc0c38404d30d4a02a3fb1e688010851fbdf91d03d57ce2a55c0dc8bda46491e7fbcdce2fbdb5df4781c0429977801cd299ed858beb2792ed394c4e3c3c1a74eef452868b9bd5b21401ffea4afdb6807e5fa2b3716e2372be89d0fc4df4c28818808be46cc887321eb232be585e1230810e80104c5d0b9012096b41c4eb3aaf947f6ea429080100485d00959dca9d4616632a822d7523ba630400 / 15 nodes    &#xD;&#xA;2022-06-28 19:25:26 proof size: 894.42 KB (915888 bytes)    &#xD;&#xA;2022-06-28 19:25:26 compact proof size: 894.02 KB (915472 bytes)    &#xD;&#xA;2022-06-28 19:25:26 zstd-compressed compact proof 894.04 KB (915499 bytes)    &#xD;&#xA;2022-06-28 19:25:26 TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = 150000000, total weight = 250000000000 (0.0006)   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How would I know whether `runtime_upgrade` went successfully?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13120" PostHistoryTypeId="1" PostId="3498" RevisionGUID="2b7e2ebb-6ed9-4f6b-bf21-1b2b0335dd9b" CreationDate="2022-06-28T17:35:11.510" UserId="140" Text="How to verify `runtime-upgrade` using `try-runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="13121" PostHistoryTypeId="3" PostId="3498" RevisionGUID="2b7e2ebb-6ed9-4f6b-bf21-1b2b0335dd9b" CreationDate="2022-06-28T17:35:11.510" UserId="140" Text="|substrate-node|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13122" PostHistoryTypeId="2" PostId="3499" RevisionGUID="9c8fe4a5-6204-463d-894e-2d0e22c5d88d" CreationDate="2022-06-28T17:54:17.967" UserId="2790" Text="I wanted to provide some overview, of what I think are the three possible solutions (if one does NOT want to tight couple - i.e. `trait Config: other_pallet::Config` the pallets).&#xD;&#xA;&#xD;&#xA; 1. Create keys manually&#xD;&#xA; 2. Create `StorageMap` manually&#xD;&#xA; 3. Abstraction via trait&#xD;&#xA;&#xD;&#xA;Generally, I would suggest always favoring tight coupling or soft coupling (solution 3.) over creating keys or maps manually.&#xD;&#xA;The manual solutions are error-prone and can lead to pallets accessing different storage locations and/or assuming different types in the storage, which in the end can lead to nasty bugs.&#xD;&#xA;&#xD;&#xA;# Setup&#xD;&#xA; * pallet_provider&#xD;&#xA;    * Provides:&#xD;&#xA;      ```rust&#xD;&#xA;      #[pallet::storage]&#xD;&#xA;      pub type DataStorage&lt;T: Config&gt; =&#xD;&#xA;		 StorageMap&lt;_, Blake2_128Concat, T::Index, T::Data&gt;;&#xD;&#xA;      ```&#xD;&#xA;    * Stores `T::Data` under the key `T::Index`&#xD;&#xA; * pallet_consumer&#xD;&#xA;    * wants to access `DataStorage` &#xD;&#xA; * lib.rs of our runtime&#xD;&#xA;   ```rust&#xD;&#xA;   construct_runtime! {&#xD;&#xA;	  pub enum Runtime where&#xD;&#xA;		  Block = Block,&#xD;&#xA;		  NodeBlock = Block,&#xD;&#xA;		  UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	  {&#xD;&#xA;		  System: system::{Pallet},&#xD;&#xA;          Provider: pallet_provider::{Pallet, Storage},&#xD;&#xA;          Consumer: pallet_consumer::{Pallet}&#xD;&#xA;	  }&#xD;&#xA;   }&#xD;&#xA;   ```&#xD;&#xA;&#xD;&#xA;## Create keys manually&#xD;&#xA;Substrate's storage can be seen as a key-value-DB and the current storage types (`StorageValue`, `StorageMap` and `StorageDoubleMap`) just are convenience abstractions over this key-value logic. But in the end, they are always creating a deterministic key for accessing a specific value.&#xD;&#xA;&#xD;&#xA;There is a really good deep dive into how the storage actually works from Shawn Tabrizi [here](https://www.shawntabrizi.com/substrate/substrate-storage-deep-dive/).&#xD;&#xA;&#xD;&#xA;That being said one can access a pallet's storage elements by manually creating said keys.&#xD;&#xA;All **pallet's** storage elements are created after the following logic:&#xD;&#xA;&#xD;&#xA;* **StorageValue-Key:** `twox_128(&quot;PALLET_NAME&quot;)` + `twox_128(&quot;STORAGE_NAME&quot;)`&#xD;&#xA;* **StorageMap-Key:** `twox_128(&quot;PALLET_NAME&quot;)` + `twox_128(&quot;STORAGE_NAME&quot;)` + `DEV_CHOOSEN_HASHER(&quot;KEY_1&quot;)`&#xD;&#xA;* **StorageDoubleMap-Key:** `twox_128(&quot;PALLET_NAME&quot;)` + `twox_128(&quot;STORAGE_NAME&quot;)` + `DEV_CHOOSEN_HASHER(&quot;KEY_1&quot;)` + `DEV_CHOOSEN_HASHER(&quot;KEY_2&quot;)`&#xD;&#xA;&#xD;&#xA;&gt; **_NOTE:_** The `PALLET_NAME` is the name defined for the pallet in the `construct_runtime!()` macro.&#xD;&#xA;&#xD;&#xA;For our above defined setup we could retrieve the `T::Data` from storage in the pallet_consumer as follows:&#xD;&#xA;```rust&#xD;&#xA;const PALLET_NAME: &amp;'static str = &quot;Provider&quot;;&#xD;&#xA;const STORAGE_NAME: &amp;'static str = &quot;DataStorage&quot;;&#xD;&#xA;type Index = u32;&#xD;&#xA;type Data = u32;&#xD;&#xA;&#xD;&#xA;fn get_storage_value(key: Index) -&gt; Option&lt;Data&gt; {&#xD;&#xA;    let pallet_hash = sp_io::hashing::twox_128(PALLET_NAME.as_bytes());&#xD;&#xA;	let storage_hash = sp_io::hashing::twox_128(STORAGE_NAME.as_bytes());&#xD;&#xA;    // Hashing the scale-encoded key&#xD;&#xA;	let key_hashed = &#xD;&#xA;        frame_support::hash::Blake2_128Concat::hash(key.encode());&#xD;&#xA;&#xD;&#xA;	let mut final_key = Vec::new();&#xD;&#xA;	final_key.extend_from_slice(&amp;pallet_hash);&#xD;&#xA;	final_key.extend_from_slice(&amp;storage_hash);&#xD;&#xA;	final_key.extend_from_slice(&amp;key_hashed);&#xD;&#xA;    &#xD;&#xA;    frame_support::storage::unhashed::get::&lt;Data&gt;(&amp;final_key)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; **_NOTE:_** We have no way of checking whether our defined `Data` and `Index` types here, match with the `T::Data` and `T::Index` of the pallet_provider storage.&#xD;&#xA;&#xD;&#xA;## Create `StorageMaps` manually&#xD;&#xA;This solution uses the normal interface of the `StorageMaps` abstraction over storage. Meaning, one can use the created type just like any other normal storage element in substrate. BUT again, we manually define the names (pallet and storage) from which the final is key is generated.&#xD;&#xA;&#xD;&#xA;Here, we would create a copy of the `pub type Data&lt;T: Config&gt;` in the pallet_consumer, but without binding it to the config. Hence, relying again on manually knowing the key type `T::Index` and the data type `T::Data`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type Index = u32;&#xD;&#xA;type Data = u32;&#xD;&#xA;&#xD;&#xA;pub struct DataStorageCopyPrefix;&#xD;&#xA;impl StorageInstance for DataStorageCopyPrefix {&#xD;&#xA;    fn pallet_prefix() -&gt; &amp;'static str {&#xD;&#xA;        &quot;Provider&quot;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    const STORAGE_PREFIX: &amp;'static str = &quot;Data&quot;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub type DataStorageCopy&lt;T&gt; = frame_support::storage::types::StorageMap&lt;&#xD;&#xA;        DataStorageCopyPrefix,&#xD;&#xA;        Blake2_128Concat,&#xD;&#xA;        Index,&#xD;&#xA;        Data,&#xD;&#xA;    &gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; **_NOTE:_** We have no way of checking whether our defined `Data` and `Index` types here, match with the `T::Data` and `T::Index` of the pallet_provider storage.&#xD;&#xA;&#xD;&#xA;## Abstraction via trait&#xD;&#xA;This solution does not rely on knowledge of the underlying `StorageMap` in any way. Which, in my opinion is a bonus, as the pallet_provider is free to change the `StorageMap` without the need for the pallet_consumer to be changed.&#xD;&#xA;&#xD;&#xA; * Define a trait that &quot;abstracts&quot; what the pallet_consumer wants&#xD;&#xA;   ```rust&#xD;&#xA;   trait DataProvider {&#xD;&#xA;      type Key;&#xD;&#xA;      type Data;&#xD;&#xA;&#xD;&#xA;      fn query(key: Self::Key) -&gt; Option&lt;Self::Data&gt;;&#xD;&#xA;   ```&#xD;&#xA; * Implement `DataProvider` for the `pallet_provider::Pallet`&#xD;&#xA;   ```rust&#xD;&#xA;   impl&lt;T: Config&gt; DataProvider for Pallet&lt;T&gt; {&#xD;&#xA;      type Key = T::Index;&#xD;&#xA;      type Data = T::Data;&#xD;&#xA;      &#xD;&#xA;      fn query(key: Self::Key) -&gt; Option&lt;Self::Data&gt; {&#xD;&#xA;         Data::&lt;T&gt;::get(&amp;key)&#xD;&#xA;      }&#xD;&#xA;   }&#xD;&#xA;   ```&#xD;&#xA; * Create an associated type in the `pallet_consumer::Config`&#xD;&#xA;    ```rust&#xD;&#xA;    #[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		...&#xD;&#xA;        &#xD;&#xA;        type Provider: DataProvider&lt;Key = u32, Data = u32&gt;;&#xD;&#xA;&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;&gt; **_NOTE:_** We are enforcing here, that the associated type that implements `DataProvider` is using the `Key` and `Index` we are expecting. Which gives us an error upon compile time if the used type for `Provider` in the runtime does not match this expectation.&#xD;&#xA;&#xD;&#xA;## Summary&#xD;&#xA;* The first two solutions are error prone, as changes in naming or types in the pallet_provder might be unnoticed by the pallet_consumer. This could result in unexpected errors or even UB if the decoding still succeeds.&#xD;&#xA;* Solution 1 should be a last resort, but is generally useful to understand how keys for storage elements are generated. Furthermore, it allows querying storage via rpc methods for easily retrieving a whole map.&#xD;&#xA;* Solution 2 could be a solution when a pallet has a private storage type and changes to that privacy or trait abstraction are out of reach (e.g. pallet is maintained by another team).&#xD;&#xA;* Solution 3 should be favored in my opinion (if not tight-coupling). It allows to test the pallets independently of each other, it uses the compiler to ensure type-safety and is friendly to refactoring in the future." ContentLicense="CC BY-SA 4.0" />
  <row Id="13124" PostHistoryTypeId="2" PostId="3500" RevisionGUID="673798cb-2151-46cd-940d-956fa6100e41" CreationDate="2022-06-28T18:03:45.200" UserId="1816" Text="I solved this by removing the std dependencies of the `eth-trie.rs` crate. That was pretty straightforward and works well." ContentLicense="CC BY-SA 4.0" />
  <row Id="13126" PostHistoryTypeId="52" PostId="3490" RevisionGUID="f7e0a06b-82e3-4e52-bf3d-13c8acf53e70" CreationDate="2022-06-28T18:40:52.797" />
  <row Id="13127" PostHistoryTypeId="2" PostId="3501" RevisionGUID="c89ecc90-50f5-4dce-886d-3d75b1d667b5" CreationDate="2022-06-28T19:01:13.400" UserId="2796" Text="I want to listen to new transfers and get the hash and amount.&#xD;&#xA;How can I?&#xD;&#xA;Also, Can I get list transfers of account like this url?&#xD;&#xA;https://westend.subscan.io/account/5D8JvKv1yL8ZPN9xxNbQiRxX14KvpiP8UJcDys1ouDnKpczx&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="13129" PostHistoryTypeId="1" PostId="3501" RevisionGUID="c89ecc90-50f5-4dce-886d-3d75b1d667b5" CreationDate="2022-06-28T19:01:13.400" UserId="2796" Text="How can I listen to new receive transfer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13130" PostHistoryTypeId="3" PostId="3501" RevisionGUID="c89ecc90-50f5-4dce-886d-3d75b1d667b5" CreationDate="2022-06-28T19:01:13.400" UserId="2796" Text="|api|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13131" PostHistoryTypeId="2" PostId="3502" RevisionGUID="fa74489d-01a5-4754-8fd7-1b9b383db2da" CreationDate="2022-06-28T19:12:45.913" UserId="2790" Text="&gt; I can batch multiple calls into one call, so it avoid making too many calls, but i'm afraid this will exceed the size of the block if i put all of my 20 000 transactions, and i would end up with something unwanted... Or does batch() can dispatch the calls on multiple blocks ?&#xD;&#xA;&#xD;&#xA;`utility.batch()` will be a single transaction and I guess with 20.000 inner transactions this will probably never be included in a block as it's too big.&#xD;&#xA;&#xD;&#xA; * Are the transactions in any kind related to each other? &#xD;&#xA;   Meaning, if `tx_A` fails then `tx_B` should not be submitted?&#xD;&#xA;&#xD;&#xA;I ran into this problem once, and for me, the biggest issue was that the &quot;default&quot; transaction-pool-size is rather small. So transactions were being dropped as I tried submitting them. &#xD;&#xA;My rather amateurish solution was to simply restrict the number of concurrent transactions. &#xD;&#xA;&#xD;&#xA;Not sure, if this is still working but you can find the code that manages the dispatching here: https://github.com/centrifuge/centrifuge-cli/tree/main/packages/libs/dispatcher/src" ContentLicense="CC BY-SA 4.0" />
  <row Id="13133" PostHistoryTypeId="5" PostId="3494" RevisionGUID="5117002f-8341-442f-8b95-ab163f854669" CreationDate="2022-06-28T19:57:33.583" UserId="1870" Comment="added 11 characters in body" Text="In the deprecated Canvas repo the Rococo Canvas testnet is mentioned, however, I can't find any working rpc url. I can't connect to the [RPC linked][1] there, so I'd assume it's deprecated as well.&#xD;&#xA;&#xD;&#xA;On polkadot.js/apps I found a link to the Rococo Contracts which seems to do the job as well, however, I don't find any information on how I can get tokens to deploy my ink! smart contract. Does anybody know a faucet?&#xD;&#xA;&#xD;&#xA;**EDIT - SOLUTION**&#xD;&#xA;&#xD;&#xA;- I was able to solve it by sending the following command to the [faucet channel on element][2]: `!drip YOUR_SS_58_ADDRESS:1002`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-canvas-rpc.polkadot.io#/explorer&#xD;&#xA;  [2]: https://matrix.to/#/#rococo-faucet:matrix.org" ContentLicense="CC BY-SA 4.0" />
  <row Id="13134" PostHistoryTypeId="5" PostId="3484" RevisionGUID="290e07f3-52b0-4c6c-8259-04a7759f45ff" CreationDate="2022-06-28T20:01:34.430" UserId="100" Comment="removed the large titles for better readability" Text="I defined the ink! method and struct like this:&#xD;&#xA;```&#xD;&#xA;#[derive(SpreadAllocate, PackedLayout, SpreadLayout, Clone, Decode, Encode)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug, scale_info::TypeInfo, StorageLayout))]&#xD;&#xA;pub struct ShowTest{&#xD;&#xA;    test_id: u8,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;//...&#xD;&#xA;&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn show_test_add(&amp;mut self, v: ShowTest) {&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;After I deployed the contract to the local contract-test chain, I found the method name `show_test_add` became `showTestAdd` and field name `test_id` became `testId`.&#xD;&#xA;&#xD;&#xA;And it was the same when I used polkadot api in JS, I don't know why.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6Fpxl.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13135" PostHistoryTypeId="6" PostId="3484" RevisionGUID="290e07f3-52b0-4c6c-8259-04a7759f45ff" CreationDate="2022-06-28T20:01:34.430" UserId="100" Comment="removed the large titles for better readability" Text="|polkadot-js|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13136" PostHistoryTypeId="24" PostId="3484" RevisionGUID="290e07f3-52b0-4c6c-8259-04a7759f45ff" CreationDate="2022-06-28T20:01:34.430" Comment="Proposed by 100 approved by 28 edit id of 222" ContentLicense="CC BY-SA 4.0" />
  <row Id="13137" PostHistoryTypeId="52" PostId="3484" RevisionGUID="7d84d8f3-844e-458e-97c8-89896a25f2df" CreationDate="2022-06-28T20:05:22.847" />
  <row Id="13138" PostHistoryTypeId="2" PostId="3503" RevisionGUID="c882134c-6359-4a89-926b-4926684e05f4" CreationDate="2022-06-28T20:40:48.533" UserId="2752" Text="I want to call Error messages from different contract I am calling in ink! using&#xD;&#xA;the '?' operator.&#xD;&#xA;However it gives me the following Error:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;b&gt;`?` couldn&amp;apos;t convert the error to `contract::Error`&lt;/b&gt;&#xD;&#xA;  &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;--&amp;gt; &lt;/b&gt;&lt;/font&gt;lib.rs:77:107&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;77&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;  self.diff_contract.method(value_1, value_2)?;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                                  &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;^&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;the trait `std::convert::From&amp;lt;diff_contract::diff_contract::Error&amp;gt;` is not implemented for `contract::Error`&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;= &lt;/b&gt;&lt;/font&gt;&lt;b&gt;note&lt;/b&gt;: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;= &lt;/b&gt;&lt;/font&gt;&lt;b&gt;note&lt;/b&gt;: required because of the requirements on the impl of `std::ops::FromResidual&amp;lt;std::result::Result&amp;lt;std::convert::Infallible, diff_contract::diff_contract::Error&amp;gt;&amp;gt;` for `std::result::Result&amp;lt;[u8; 32], contract::Error&amp;gt;`&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;I guess I have to declare that I want to use the Error handling of the other contract in my original smart contract?&#xD;&#xA;If so, how can I do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13140" PostHistoryTypeId="1" PostId="3503" RevisionGUID="c882134c-6359-4a89-926b-4926684e05f4" CreationDate="2022-06-28T20:40:48.533" UserId="2752" Text="Calling Error messages when cross contract calling in ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="13141" PostHistoryTypeId="3" PostId="3503" RevisionGUID="c882134c-6359-4a89-926b-4926684e05f4" CreationDate="2022-06-28T20:40:48.533" UserId="2752" Text="|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13142" PostHistoryTypeId="4" PostId="2998" RevisionGUID="15160719-39ea-46b5-ad19-163e50b130a7" CreationDate="2022-06-28T21:01:26.347" UserId="2025" Comment="keyword typo" Text="Polkadot Patricia Trie compatible with Ethereum implementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="13143" PostHistoryTypeId="24" PostId="2998" RevisionGUID="15160719-39ea-46b5-ad19-163e50b130a7" CreationDate="2022-06-28T21:01:26.347" Comment="Proposed by 2025 approved by 1816 edit id of 224" ContentLicense="CC BY-SA 4.0" />
  <row Id="13144" PostHistoryTypeId="2" PostId="3504" RevisionGUID="441e49d4-ce13-4547-8cd3-ab6ab8566b23" CreationDate="2022-06-28T21:56:14.747" UserId="100" Text="We use Github Actions, Cypress, and a contracts-node binary to run E2E tests for Contracts UI. Here is [a PR][1] that updates Cypress to v10 and adds some tests for ERC20, hope it helps.&#xD;&#xA;&#xD;&#xA;We use [cypress-file-upload][2] to attach the `.contract` file to the tests. &#xD;&#xA;&#xD;&#xA;A solution without Cypress is to rename it to `.json` and import it into your tests. Most JavaScript bundlers can be configured to support JSON modules and the `.contract` file is valid JSON&#xD;&#xA;&#xD;&#xA;    import incrementer from './contracts/incrementer.json'; &#xD;&#xA;    const wasm = incrementer.source.wasm;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/contracts-ui/pull/322&#xD;&#xA;  [2]: https://www.npmjs.com/package/cypress-file-upload" ContentLicense="CC BY-SA 4.0" />
  <row Id="13146" PostHistoryTypeId="2" PostId="3505" RevisionGUID="0100ea17-5a06-4d97-aa38-65322febf6f7" CreationDate="2022-06-28T22:07:20.117" UserId="234" Text="In this [link][1] you can find my multisig `approve_as_multi` extrinsic and see the `InsufficientBalance` error.&#xD;&#xA;&#xD;&#xA;Does the balance error here refers to the **sender** (signatory) balance or the **multisig** address balance? Because the balance of my sender account has 0,5 WND and I was thinking it is enough. &#xD;&#xA;&#xD;&#xA;How much balance do I need or how do I calculate it ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://westend.subscan.io/extrinsic/11417201-2" ContentLicense="CC BY-SA 4.0" />
  <row Id="13148" PostHistoryTypeId="1" PostId="3505" RevisionGUID="0100ea17-5a06-4d97-aa38-65322febf6f7" CreationDate="2022-06-28T22:07:20.117" UserId="234" Text="Why does my multisig `approve_as_multi` extrinsic has failed with `InsufficientBalance` error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13149" PostHistoryTypeId="3" PostId="3505" RevisionGUID="0100ea17-5a06-4d97-aa38-65322febf6f7" CreationDate="2022-06-28T22:07:20.117" UserId="234" Text="|extrinsic|balances|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13150" PostHistoryTypeId="5" PostId="3504" RevisionGUID="cb4a3e50-8ebf-4ecc-af94-e5ff45677204" CreationDate="2022-06-28T22:09:47.130" UserId="100" Comment="deleted 16 characters in body" Text="We use Github Actions, Cypress, and a contracts-node binary to run E2E tests for Contracts UI. Here is [our CI workflow][1], hope it helps.&#xD;&#xA;&#xD;&#xA;We use [cypress-file-upload][2] to attach the `.contract` file to the tests. &#xD;&#xA;&#xD;&#xA;A solution without Cypress is to rename it to `.json` and import it into your tests. Most JavaScript bundlers can be configured to support JSON modules and the `.contract` file is valid JSON&#xD;&#xA;&#xD;&#xA;    import incrementer from './contracts/incrementer.json'; &#xD;&#xA;    const wasm = incrementer.source.wasm;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/contracts-ui/blob/master/.github/workflows/build.yml&#xD;&#xA;  [2]: https://www.npmjs.com/package/cypress-file-upload" ContentLicense="CC BY-SA 4.0" />
  <row Id="13151" PostHistoryTypeId="2" PostId="3506" RevisionGUID="5b88ab2a-5a86-4cf5-a931-2af7f9027c1d" CreationDate="2022-06-28T22:12:40.300" UserId="234" Text="In this [link][1] it is explained that the sender (one of the signatories) of the `approve_as_multi` tx needs to have enough balance to enact this tx.&#xD;&#xA;&#xD;&#xA;To calculate how much balance the sender needs to enact this tx, you need to check the following :&#xD;&#xA;&#xD;&#xA;1. The formula of calculation is described [here][2] and I quote it below :&#xD;&#xA; &#xD;&#xA;  &gt; Payment: DepositBase will be reserved if this is the first approval,&#xD;&#xA;  &gt; plus threshold times DepositFactor. It is returned once this dispatch&#xD;&#xA;  &gt; happens or is cancelled.&#xD;&#xA;    &#xD;&#xA;2. Then you will need to query in polkadot-js apps (connected in Westend) -&gt; Developer -&gt; Chain State -&gt; the Multisig constants : depositFactor, depositBase, maxSignatories (as shown in the screenshot below)&#xD;&#xA;&#xD;&#xA;   I already did it for you and the values are the following :&#xD;&#xA;    - const multisig.depositFactor = 1,600,000,000&#xD;&#xA;    - const multisig.depositBase = 1,004,400,000,000&#xD;&#xA;    - const multisig.maxSignatories = 100 (but in your case is 2 Max signatories)&#xD;&#xA;&#xD;&#xA;3. Additionally, you need to take into account the base units in Westend as found [here][3]&#xD;&#xA;&#xD;&#xA;This results in the following formula :&#xD;&#xA;(1004400000000+2*1600000000)/1000000000000=1,0076 WND&#xD;&#xA;&#xD;&#xA;In conclusion, the sender account needs at least 1,0076 WND in their balance to enact this tx.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/issues/2871#issuecomment-732701654&#xD;&#xA;  [2]: https://docs.rs/pallet-multisig/latest/pallet_multisig/enum.Call.html#variant.approve_as_multi&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/566a403be1277612f413136d9febe5efaabcf417/runtime/westend/constants/src/lib.rs#L28" ContentLicense="CC BY-SA 4.0" />
  <row Id="13153" PostHistoryTypeId="5" PostId="3506" RevisionGUID="faa69dc3-0e5e-421a-9600-fb3f3e015bdf" CreationDate="2022-06-28T22:23:33.883" UserId="234" Comment="Adding screenshot from polkadot js apps" Text="In this [link][1] it is explained that the sender (one of the signatories) of the `approve_as_multi` tx needs to have enough balance to enact this tx.&#xD;&#xA;&#xD;&#xA;To calculate how much balance the sender needs to enact this tx, you need to check the following :&#xD;&#xA;&#xD;&#xA;1. The formula of calculation is described [here][2] and I quote it below :&#xD;&#xA; &#xD;&#xA;  &gt; Payment: DepositBase will be reserved if this is the first approval,&#xD;&#xA;  &gt; plus threshold times DepositFactor. It is returned once this dispatch&#xD;&#xA;  &gt; happens or is cancelled.&#xD;&#xA;    &#xD;&#xA;2. Then you will need to query in polkadot-js apps (connected in Westend) -&gt; Developer -&gt; Chain State -&gt; the Multisig constants : depositFactor, depositBase, maxSignatories (as shown in the screenshot below)&#xD;&#xA;&#xD;&#xA;   I already did it for you and the values are the following :&#xD;&#xA;    - const multisig.depositFactor = 1,600,000,000&#xD;&#xA;    - const multisig.depositBase = 1,004,400,000,000&#xD;&#xA;    - const multisig.maxSignatories = 100 (but in your case is 2 Max signatories)&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;3. Additionally, you need to take into account the base units in Westend as found [here][3]&#xD;&#xA;&#xD;&#xA;This results in the following formula :&#xD;&#xA;(1004400000000+2*1600000000)/1000000000000=1,0076 WND&#xD;&#xA;&#xD;&#xA;In conclusion, the sender account needs at least 1,0076 WND in their balance to enact this tx.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/issues/2871#issuecomment-732701654&#xD;&#xA;  [2]: https://docs.rs/pallet-multisig/latest/pallet_multisig/enum.Call.html#variant.approve_as_multi&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/566a403be1277612f413136d9febe5efaabcf417/runtime/westend/constants/src/lib.rs#L28&#xD;&#xA;  [4]: https://i.stack.imgur.com/Gy8yU.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13154" PostHistoryTypeId="5" PostId="3482" RevisionGUID="496519fc-32b1-48cb-8e0d-4edb1d3e247a" CreationDate="2022-06-29T00:48:47.650" UserId="2025" Comment="improve readability" Text="I know the concept of existential deposit (ED) means that if the account balance is below this value, it will be wiped out. I tried to figure out how it works. The `AccountData` is defined in the runtime while stored in the `frame-system` pallet. `try_mutate_exists` in the `frame_system` pallet used to mutate `AccountData` storage, but how and where does the substrate system wipe the account whose balance below ED? I find `OnKilledAccount` type in the `frame_system::Config`, but it's more like a callback after the account has been killed. &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl&lt;T: Config&gt; StoredMap&lt;T::AccountId, T::AccountData&gt; for Pallet&lt;T&gt; {&#xD;&#xA;    fn get(k: &amp;T::AccountId) -&gt; T::AccountData {&#xD;&#xA;        Account::&lt;T&gt;::get(k).data&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn try_mutate_exists&lt;R, E: From&lt;DispatchError&gt;&gt;(&#xD;&#xA;        k: &amp;T::AccountId,&#xD;&#xA;        f: impl FnOnce(&amp;mut Option&lt;T::AccountData&gt;) -&gt; Result&lt;R, E&gt;,&#xD;&#xA;    ) -&gt; Result&lt;R, E&gt; {&#xD;&#xA;        let account = Account::&lt;T&gt;::get(k);&#xD;&#xA;        let was_providing = is_providing(&amp;account.data);&#xD;&#xA;        let mut some_data = if was_providing {&#xD;&#xA;            Some(account.data)&#xD;&#xA;        } else {&#xD;&#xA;            None&#xD;&#xA;        };&#xD;&#xA;        let result = f(&amp;mut some_data)?;&#xD;&#xA;        let is_providing = some_data.is_some();&#xD;&#xA;        if !was_providing &amp;&amp; is_providing {&#xD;&#xA;            Self::inc_providers(k);&#xD;&#xA;        } else if was_providing &amp;&amp; !is_providing {&#xD;&#xA;            match Self::dec_providers(k)? { // This may trigger account wipe&#xD;&#xA;                DecRefStatus::Reaped =&gt; return Ok(result),&#xD;&#xA;                DecRefStatus::Exists =&gt; {&#xD;&#xA;                    // Update value as normal...&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        } else if !was_providing &amp;&amp; !is_providing {&#xD;&#xA;            return Ok(result);&#xD;&#xA;        }&#xD;&#xA;        Account::&lt;T&gt;::mutate(k, |a| a.data = some_data.unwrap_or_default());&#xD;&#xA;        Ok(result)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13155" PostHistoryTypeId="4" PostId="3482" RevisionGUID="496519fc-32b1-48cb-8e0d-4edb1d3e247a" CreationDate="2022-06-29T00:48:47.650" UserId="2025" Comment="improve readability" Text="How substrate wipe out the accounts whose balance below existential deposit?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13156" PostHistoryTypeId="24" PostId="3482" RevisionGUID="496519fc-32b1-48cb-8e0d-4edb1d3e247a" CreationDate="2022-06-29T00:48:47.650" Comment="Proposed by 2025 approved by 125 edit id of 223" ContentLicense="CC BY-SA 4.0" />
  <row Id="13158" PostHistoryTypeId="6" PostId="3354" RevisionGUID="feb3a6e4-45f8-4a67-9a4d-85fd4daff89b" CreationDate="2022-06-29T04:57:22.213" UserId="34" Comment="edited tags" Text="|pallet|storage|frame|storagenmap|liberland|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13160" PostHistoryTypeId="2" PostId="3507" RevisionGUID="b14152c1-7300-4aa8-b1c6-0a9a75fd2a1b" CreationDate="2022-06-29T05:45:30.907" UserId="1949" Text="I would suggest splitting your questions into two - it is somewhat difficult to answer 2 completely different questions coherently in one.&#xD;&#xA;&#xD;&#xA;First off, you mention &quot;hash&quot; - be aware that transaction hashes in Substrate are non-unique. Here are some older [questions that deal with this](https://substrate.stackexchange.com/questions/2760/get-transaction-by-hash). You also mentioned JS in your tags, so the [FAQ entry](https://polkadot.js.org/docs/api/FAQ#which-api-can-i-use-to-query-by-transaction-hash) could be useful, along with the [wiki entry for unique identifiers](https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics)&#xD;&#xA;&#xD;&#xA;To listen for transfers, your best approach is to [listen to events](https://substrate.stackexchange.com/questions/2792/how-to-confirm-payment-from-specific-address/2793#2793) or indeed scan the blocks as the answer suggests.&#xD;&#xA;&#xD;&#xA;For retrieving a list of transactions by account, [here is a previous question](https://substrate.stackexchange.com/questions/1495/get-account-transactions-using-substrate-api/1496#1496) that answers this in detail with specific tools that you can use." ContentLicense="CC BY-SA 4.0" />
  <row Id="13162" PostHistoryTypeId="2" PostId="3508" RevisionGUID="516be373-00e9-4036-aab5-5ee2b31afd92" CreationDate="2022-06-29T05:52:13.377" UserId="1949" Text="Tuple types are specified in the same way they are in Rust, i.e. `(AccountId, u32)` will yield a tuple with `AccountId` and `u32`. These are all string values, i.e.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;MyTuple: &quot;(AccountId, u32)&quot;,&#xD;&#xA;MyEnum: {&#xD;&#xA;  _enum: {&#xD;&#xA;    Foo: &quot;AccountId&quot;,&#xD;&#xA;    Bar: &quot;(AccountId, u64)&quot;,&#xD;&#xA;    Baz: &quot;String&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;As indicated in a comment, with current Substrate nodes you should not need to define types, these are supplied in the metadata. (There is one caveat - when used over RPCs, these are not available and needs to be manually specified alongside the RPC definitions)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13164" PostHistoryTypeId="2" PostId="3509" RevisionGUID="d323fc66-c7cf-4f52-bd55-799b6561afbd" CreationDate="2022-06-29T05:55:39.317" UserId="1949" Text="Here is the [Rust source](https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/frame/child-bounties/src/lib.rs#L197-L204) for the double map.&#xD;&#xA;&#xD;&#xA;It is a link from the parent id to the child id." ContentLicense="CC BY-SA 4.0" />
  <row Id="13166" PostHistoryTypeId="2" PostId="3510" RevisionGUID="ac0e3dac-5256-44f6-b497-400ac713eba8" CreationDate="2022-06-29T08:00:10.207" UserId="599" Text="If you have different errors inside the function's body, you need to define the rules for converting one error into another. &#xD;&#xA;&#xD;&#xA;For example, if `diff_contract.method(value_1, value_2)` returns `Resutl&lt;(), DiffError&gt;`, and your function returns `Result&lt;(), MyCurrentError&gt;`, you need to convert `DiffError` into `MyCurrentError`.&#xD;&#xA;&#xD;&#xA;If you define `MyCurrentError`, you can implement the `From&lt;DiffError&gt;` trait, and the Rust will convert your error under the hood. You can check the example [here](https://github.com/Supercolony-net/openbrush-contracts/blob/main/contracts/src/traits/errors/psp22.rs#L48).&#xD;&#xA;&#xD;&#xA;But if `MyCurrentError` is defined by someone else, you can't implement foreign traits for foreign types. In that case, you need manually map one error into another." ContentLicense="CC BY-SA 4.0" />
  <row Id="13168" PostHistoryTypeId="2" PostId="3511" RevisionGUID="18043753-0b9c-4a38-86c5-d0dc875ce727" CreationDate="2022-06-29T08:13:50.677" UserId="429" Text="You just need to import &#xD;&#xA;```&#xD;&#xA;use frame_support::traits::Currency;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As it has the functionality that it requires." ContentLicense="CC BY-SA 4.0" />
  <row Id="13170" PostHistoryTypeId="2" PostId="3512" RevisionGUID="6c629134-0141-4ed7-a116-286bf32704df" CreationDate="2022-06-29T10:43:59.623" UserId="1813" Text="Attempting a parachain runtime upgrade using `.runtimes.compact.subwasm.parachain_authorize_upgrade_hash` and `.runtimes.compact.wasm` from the `srtool-cli@v0.8.0` output. Enacting the runtime upgrade ends up with a hash mismatch failure. Also tried upgrading by authorizing the reported `.runtimes.compact.blake2_256` hash - which fails likewise.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;gen&quot;: &quot;srtool v0.9.20&quot;,&#xD;&#xA;  &quot;src&quot;: &quot;git&quot;,&#xD;&#xA;  &quot;version&quot;: &quot;1.0.0-alpha.0&quot;,&#xD;&#xA;  &quot;commit&quot;: &quot;0a70aed7fc824ae51be4ec6b0940622673b6a3b5&quot;,&#xD;&#xA;  &quot;tag&quot;: &quot;v0.0.0-up&quot;,&#xD;&#xA;  &quot;branch&quot;: &quot;HEAD&quot;,&#xD;&#xA;  &quot;rustc&quot;: &quot;rustc 1.60.0 (7737e0b5c 2022-04-04)&quot;,&#xD;&#xA;  &quot;pkg&quot;: &quot;my-parachain-runtime&quot;,&#xD;&#xA;  &quot;tmsp&quot;: &quot;2022-06-29T10:36:15Z&quot;,&#xD;&#xA;  &quot;size&quot;: &quot;4946919&quot;,&#xD;&#xA;  &quot;prop&quot;: &quot;0x7ccbcd15bf46c21ef2dc18b3a23a32352deb9a439d0d6b15df1627871ad1b7bd&quot;,&#xD;&#xA;  &quot;ipfs&quot;: &quot;QmRRuNCcy4eFUm1ZP8kcNALy89TAs1tSSeGN7kRVrM9tV6&quot;,&#xD;&#xA;  &quot;sha256&quot;: &quot;0xbe06c07e6b4f2b9bbaff07263aac89df75559bf03863fea81f5ec9b09e0f9bd0&quot;,&#xD;&#xA;  &quot;wasm&quot;: &quot;runtime/parachain/target/srtool/release/wbuild/my-parachain-runtime/my_parachain_runtime.compact.wasm&quot;,&#xD;&#xA;  &quot;info&quot;: {&#xD;&#xA;    &quot;generator&quot;: {&#xD;&#xA;      &quot;name&quot;: &quot;srtool&quot;,&#xD;&#xA;      &quot;version&quot;: &quot;0.9.20&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;src&quot;: &quot;git&quot;,&#xD;&#xA;    &quot;version&quot;: &quot;1.0.0-alpha.0&quot;,&#xD;&#xA;    &quot;git&quot;: {&#xD;&#xA;      &quot;commit&quot;: &quot;0a70aed7fc824ae51be4ec6b0940622673b6a3b5&quot;,&#xD;&#xA;      &quot;tag&quot;: &quot;v0.0.0-up&quot;,&#xD;&#xA;      &quot;branch&quot;: &quot;HEAD&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;rustc&quot;: &quot;rustc 1.60.0 (7737e0b5c 2022-04-04)&quot;,&#xD;&#xA;    &quot;pkg&quot;: &quot;my-parachain-runtime&quot;,&#xD;&#xA;    &quot;profile&quot;: &quot;release&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;context&quot;: {&#xD;&#xA;    &quot;package&quot;: &quot;my-parachain-runtime&quot;,&#xD;&#xA;    &quot;runtime_dir&quot;: &quot;runtime/parachain&quot;,&#xD;&#xA;    &quot;docker&quot;: {&#xD;&#xA;      &quot;image&quot;: &quot;paritytech/srtool&quot;,&#xD;&#xA;      &quot;tag&quot;: &quot;1.60.0&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;profile&quot;: &quot;release&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;runtimes&quot;: {&#xD;&#xA;    &quot;compact&quot;: {&#xD;&#xA;      &quot;tmsp&quot;: &quot;2022-06-29T10:35:56Z&quot;,&#xD;&#xA;      &quot;size&quot;: &quot;4946919&quot;,&#xD;&#xA;      &quot;prop&quot;: &quot;0x7ccbcd15bf46c21ef2dc18b3a23a32352deb9a439d0d6b15df1627871ad1b7bd&quot;,&#xD;&#xA;      &quot;blake2_256&quot;: &quot;0x464d4f048640d36ab574880825856af908da5e5240e07970f00cb47a4fa60f28&quot;,&#xD;&#xA;      &quot;ipfs&quot;: &quot;QmRRuNCcy4eFUm1ZP8kcNALy89TAs1tSSeGN7kRVrM9tV6&quot;,&#xD;&#xA;      &quot;sha256&quot;: &quot;0xbe06c07e6b4f2b9bbaff07263aac89df75559bf03863fea81f5ec9b09e0f9bd0&quot;,&#xD;&#xA;      &quot;wasm&quot;: &quot;runtime/parachain/target/srtool/release/wbuild/my-parachain-runtime/my_parachain_runtime.compact.wasm&quot;,&#xD;&#xA;      &quot;subwasm&quot;: {&#xD;&#xA;        &quot;size&quot;: 4946919,&#xD;&#xA;        &quot;compression&quot;: {&#xD;&#xA;          &quot;size_compressed&quot;: 4946919,&#xD;&#xA;          &quot;size_decompressed&quot;: 4946919,&#xD;&#xA;          &quot;compressed&quot;: false&#xD;&#xA;        },&#xD;&#xA;        &quot;reserved_meta&quot;: [&#xD;&#xA;          109,&#xD;&#xA;          101,&#xD;&#xA;          116,&#xD;&#xA;          97&#xD;&#xA;        ],&#xD;&#xA;        &quot;reserved_meta_valid&quot;: true,&#xD;&#xA;        &quot;metadata_version&quot;: 14,&#xD;&#xA;        &quot;core_version&quot;: &quot;mine-2 (my Collator-1.tx2.au2)&quot;,&#xD;&#xA;        &quot;proposal_hash&quot;: &quot;0x7ccbcd15bf46c21ef2dc18b3a23a32352deb9a439d0d6b15df1627871ad1b7bd&quot;,&#xD;&#xA;        &quot;parachain_authorize_upgrade_hash&quot;: &quot;0x45d68032a4d5d2fbaa0e6b0a805c3103a9e5e48f03de718ad24336a99c606806&quot;,&#xD;&#xA;        &quot;ipfs_hash&quot;: &quot;QmRRuNCcy4eFUm1ZP8kcNALy89TAs1tSSeGN7kRVrM9tV6&quot;,&#xD;&#xA;        &quot;blake2_256&quot;: &quot;0x464d4f048640d36ab574880825856af908da5e5240e07970f00cb47a4fa60f28&quot;&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    &quot;compressed&quot;: {&#xD;&#xA;      &quot;tmsp&quot;: &quot;2022-06-29T10:35:56Z&quot;,&#xD;&#xA;      &quot;size&quot;: &quot;976120&quot;,&#xD;&#xA;      &quot;prop&quot;: &quot;0x1a3931ac4c740c832ee740930e13681f455584b4c9a159fd4e6b54d89cad0f96&quot;,&#xD;&#xA;      &quot;blake2_256&quot;: &quot;0xddaa8de7a96ff6bf36d6f242a6c51379f1f00a760dfcc196404404ca34af291d&quot;,&#xD;&#xA;      &quot;ipfs&quot;: &quot;QmYKbUqfcBa3sUGQpyjKYtaLf9UcMvJxuragr77gSfyxvr&quot;,&#xD;&#xA;      &quot;sha256&quot;: &quot;0x9963e39718523b72cb605249051abf0443024b97d1928895eb9ccd121b008e79&quot;,&#xD;&#xA;      &quot;wasm&quot;: &quot;runtime/parachain/target/srtool/release/wbuild/my-parachain-runtime/my_parachain_runtime.compact.compressed.wasm&quot;,&#xD;&#xA;      &quot;subwasm&quot;: {&#xD;&#xA;        &quot;size&quot;: 976120,&#xD;&#xA;        &quot;compression&quot;: {&#xD;&#xA;          &quot;size_compressed&quot;: 976120,&#xD;&#xA;          &quot;size_decompressed&quot;: 4946919,&#xD;&#xA;          &quot;compressed&quot;: true&#xD;&#xA;        },&#xD;&#xA;        &quot;reserved_meta&quot;: [&#xD;&#xA;          109,&#xD;&#xA;          101,&#xD;&#xA;          116,&#xD;&#xA;          97&#xD;&#xA;        ],&#xD;&#xA;        &quot;reserved_meta_valid&quot;: true,&#xD;&#xA;        &quot;metadata_version&quot;: 14,&#xD;&#xA;        &quot;core_version&quot;: &quot;mine-2 (my Collator-1.tx2.au2)&quot;,&#xD;&#xA;        &quot;proposal_hash&quot;: &quot;0x1a3931ac4c740c832ee740930e13681f455584b4c9a159fd4e6b54d89cad0f96&quot;,&#xD;&#xA;        &quot;parachain_authorize_upgrade_hash&quot;: &quot;0xd50130eabfce85fd030268649f548d03e2e58be73ee758a93173930d8841266d&quot;,&#xD;&#xA;        &quot;ipfs_hash&quot;: &quot;QmYKbUqfcBa3sUGQpyjKYtaLf9UcMvJxuragr77gSfyxvr&quot;,&#xD;&#xA;        &quot;blake2_256&quot;: &quot;0xddaa8de7a96ff6bf36d6f242a6c51379f1f00a760dfcc196404404ca34af291d&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TPAup.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13172" PostHistoryTypeId="1" PostId="3512" RevisionGUID="6c629134-0141-4ed7-a116-286bf32704df" CreationDate="2022-06-29T10:43:59.623" UserId="1813" Text="Hash for an authorize-enact runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13173" PostHistoryTypeId="3" PostId="3512" RevisionGUID="6c629134-0141-4ed7-a116-286bf32704df" CreationDate="2022-06-29T10:43:59.623" UserId="1813" Text="|runtime|upgrade|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13174" PostHistoryTypeId="2" PostId="3513" RevisionGUID="45a9638f-b2f3-4e4d-808d-0cc149ffd442" CreationDate="2022-06-29T11:12:15.987" UserId="620" Text="I can't tell where the `0xb1cb...` hash came from. You need to use the compressed Wasm and the Blake2 hash.&#xD;&#xA;&#xD;&#xA;Try doing the authorize with `&quot;blake2_256&quot;: &quot;0xddaa8de7a96ff6bf36d6f242a6c51379f1f00a760dfcc196404404ca34af291d&quot;` and then submit the `&lt;filename&gt;.compact.compressed.wasm` file at the enact stage." ContentLicense="CC BY-SA 4.0" />
  <row Id="13176" PostHistoryTypeId="5" PostId="3468" RevisionGUID="29bc6df7-5d0f-4e10-9d70-42657df5dc37" CreationDate="2022-06-29T11:45:34.870" UserId="452" Comment="added 691 characters in body" Text="In a proof-of-stake protocol there are usually two distinct categories of systems for determining the eligibility of a given validator to issue a block:&#xD;&#xA;- Computed publicly by performing some computation that is repeatable by everyone else and thus verifiable (Peercoin falls into this category AFAIK)&#xD;&#xA;- Using a cryptographic system that involves a private-key computation and a public-key verification (BABE falls into this category using VRFs)&#xD;&#xA;&#xD;&#xA;The advantage of the latter system is that since the computation for eligibility is not public (i.e. only the owner of the private-key can do it), it is harder for adversaries to corrupt the protocol since they cannot predict whether a given validator will be eligible to author the next block or not.&#xD;&#xA;&#xD;&#xA;Epochs are used to collect entropy from VRF outputs, this entropy is then used on a future epoch as a seed for the VRF (https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html, https://polkadot.network/blog/polkadot-consensus-part-3-babe/). This is also the reason why a closed validator set is a requirement." ContentLicense="CC BY-SA 4.0" />
  <row Id="13178" PostHistoryTypeId="2" PostId="3514" RevisionGUID="1c2dff79-82b9-47e7-ad5e-6b088f4d17d5" CreationDate="2022-06-29T13:09:52.163" UserId="555" Text="How to integrate **nimbus** in place of aura authorship in our node runtime ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13180" PostHistoryTypeId="1" PostId="3514" RevisionGUID="1c2dff79-82b9-47e7-ad5e-6b088f4d17d5" CreationDate="2022-06-29T13:09:52.163" UserId="555" Text="Integrate nimbus in runtime node" ContentLicense="CC BY-SA 4.0" />
  <row Id="13181" PostHistoryTypeId="3" PostId="3514" RevisionGUID="1c2dff79-82b9-47e7-ad5e-6b088f4d17d5" CreationDate="2022-06-29T13:09:52.163" UserId="555" Text="|consensus|moonbeam|nimbus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13182" PostHistoryTypeId="2" PostId="3515" RevisionGUID="6cc215bb-1511-4db6-a139-39254f9fada5" CreationDate="2022-06-29T13:16:47.977" UserId="553" Text="At Ternoa we are observing an interesting phenomenon where a node operator consistently produces more blocks than other node operators. In this case, he has two validator nodes and both nodes produce more block than any other validator.&#xD;&#xA;&#xD;&#xA;Our chain uses BABE for block production. The C is set to [1, 4]; allowedSlots is set to PrimaryAndSecondaryPlainSlots; all the Babe Authorities have 1 as BabeAuthorityWeight; We have currently 15 active validator slots.&#xD;&#xA;&#xD;&#xA;Any insights on why this phenomenon is manifesting? One idea that I have is that those nodes are more often chosen when a fork happens but I don't know how true that is." ContentLicense="CC BY-SA 4.0" />
  <row Id="13184" PostHistoryTypeId="1" PostId="3515" RevisionGUID="6cc215bb-1511-4db6-a139-39254f9fada5" CreationDate="2022-06-29T13:16:47.977" UserId="553" Text="Certain validator nodes produce more blocks than other nodes (BABE)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13185" PostHistoryTypeId="3" PostId="3515" RevisionGUID="6cc215bb-1511-4db6-a139-39254f9fada5" CreationDate="2022-06-29T13:16:47.977" UserId="553" Text="|validator|babe|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13186" PostHistoryTypeId="2" PostId="3516" RevisionGUID="9de50648-52f7-4dfb-a473-7e51483becc1" CreationDate="2022-06-29T13:19:57.377" UserId="2355" Text="First of all, ``deposit_creating`` is not a function exposed by Balance, but a function from the ``Currency`` trait.&#xD;&#xA;&#xD;&#xA;So, to use it, first thing to do is to use the Balance pallet as the Currency trait in your config (if you have the type on your pallet's config), so in your mock, you should have:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;},&#xD;&#xA;		Whatever: pallet_whatever::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;&#xD;&#xA;		Balances: pallet_balances, // you might need to add pallet_balances to your cargo.toml&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl pallet_whatever::Config for Test {&#xD;&#xA;	...&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;then, in your test, import the Currency trait (you cannot use trait's function if the trait is not in scope)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;``use frame_support::traits::Currency;``&#xD;&#xA;&#xD;&#xA;then, call the function on the trait&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use frame_support::traits::Currency;&#xD;&#xA;use crate::{Config as MyConfig}; // I use a named import for convenience&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;let imbalance = &lt;Test as MyConfig&gt;::Currency::deposit_creating(&amp;ALICE(), amount.into());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13188" PostHistoryTypeId="2" PostId="3517" RevisionGUID="30e378c5-35df-4572-9704-ace7c0b2a57a" CreationDate="2022-06-29T13:38:40.530" UserId="2355" Text="How can i convert an address of the form ``&quot;5DTNtGF2DmZ7QwGxg6n1xWzF6cEokNyNre7mUqpVuozrLxu3&quot;`` to hex **using polkadotjs packages**?&#xD;&#xA;&#xD;&#xA;Here is the context:&#xD;&#xA;&#xD;&#xA;I have multiples array of datas, containing ``address: balance``.&#xD;&#xA;I have to make interactions between these data (like searching the balance of the specific address). The problem is that, between array, the format is different (addresses start by 3, sometime by 5, sometimes are in hex...) so i cannot compare anything as the format is different.&#xD;&#xA;&#xD;&#xA;So i'd like to convert everything back to a hex account id, where everything will correspond.&#xD;&#xA;&#xD;&#xA;I'v found a way to change the prefix, decode into array of 32 int, but i couldnt find a way to convert to hex..." ContentLicense="CC BY-SA 4.0" />
  <row Id="13190" PostHistoryTypeId="1" PostId="3517" RevisionGUID="30e378c5-35df-4572-9704-ace7c0b2a57a" CreationDate="2022-06-29T13:38:40.530" UserId="2355" Text="Convert any address to accountId (in hex)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13191" PostHistoryTypeId="3" PostId="3517" RevisionGUID="30e378c5-35df-4572-9704-ace7c0b2a57a" CreationDate="2022-06-29T13:38:40.530" UserId="2355" Text="|polkadot-js|cryptography|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13192" PostHistoryTypeId="2" PostId="3518" RevisionGUID="193175eb-77bd-447e-9682-886da723d924" CreationDate="2022-06-29T13:47:16.653" UserId="34" Text="https://www.shawntabrizi.com/substrate-js-utilities/&#xD;&#xA;&#xD;&#xA;Source: https://github.com/shawntabrizi/substrate-js-utilities&#xD;&#xA;&#xD;&#xA;```JavaScript&#xD;&#xA;/* AccountId to Hex */&#xD;&#xA;let a2h = {&#xD;&#xA;	&quot;account&quot;: document.getElementById(&quot;account-a2h&quot;),&#xD;&#xA;	&quot;hex&quot;: document.getElementById(&quot;hex-a2h&quot;)&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;a2h.account.addEventListener(&quot;input&quot;, account2hex);&#xD;&#xA;a2h.hex.addEventListener(&quot;input&quot;, hex2account);&#xD;&#xA;&#xD;&#xA;function account2hex() {&#xD;&#xA;	try {&#xD;&#xA;		a2h.hex.value = u8aToHex(decodeAddress(a2h.account.value));&#xD;&#xA;	} catch (e) {&#xD;&#xA;		a2h.hex.value = &quot;Error&quot;;&#xD;&#xA;		console.error(e);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function hex2account() {&#xD;&#xA;	try {&#xD;&#xA;		a2h.account.value = encodeAddress(a2h.hex.value);&#xD;&#xA;	} catch (e) {&#xD;&#xA;		a2h.account.value = &quot;Error&quot;;&#xD;&#xA;		console.error(e);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13194" PostHistoryTypeId="6" PostId="3517" RevisionGUID="79fcd5ea-ab7e-4658-93d7-cfea16075e71" CreationDate="2022-06-29T13:48:22.127" UserId="34" Comment="edited tags" Text="|polkadot-js|cryptography|scale|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13195" PostHistoryTypeId="2" PostId="3519" RevisionGUID="73401db1-869a-43e7-a02c-f4c60fddc416" CreationDate="2022-06-29T14:01:45.260" UserId="225" Text="In current substrate proof https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/primitives/trie/src/storage_proof.rs#L35 (not the compact one), node are somehow ordered by the internal structure (btree), but it was not always the case and order should not be an enforced for thing as rpc (still a sort is needed if storing proof on state in a deterministic way, that was the reason for us to switch to put thing in a btreeset).&#xD;&#xA;&#xD;&#xA;Implementation should see all encoded nodes in the proof as a trie node, without looking at its size.&#xD;&#xA;There is currently no restriction upon adding extra content in a proof (but I don't think there is incentive in doing so). &#xD;&#xA;&#xD;&#xA;Yet indeed only the root nodes are allowed to be smaller than 32bytes.&#xD;&#xA;So if a proof contains multiple node smaller than 32 bytes, it should indicate it contains content from two different states or all those smaller node are child trie roots.&#xD;&#xA;&#xD;&#xA;Really the intent of this proof is to just be a set of encoded node.&#xD;&#xA;&#xD;&#xA;I would not be to prone to make root node the first for this reason." ContentLicense="CC BY-SA 4.0" />
  <row Id="13197" PostHistoryTypeId="2" PostId="3520" RevisionGUID="2e405958-9706-4656-a33a-a9394f928aed" CreationDate="2022-06-29T14:46:26.537" UserId="2129" Text="You have a couple of options. &#xD;&#xA;&#xD;&#xA;First, you already have an API -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const ADDR = &quot;5DTNtGF2DmZ7QwGxg6n1xWzF6cEokNyNre7mUqpVuozrLxu3&quot;&#xD;&#xA;&#xD;&#xA;// create a type from this&#xD;&#xA;const id = api.registry.createType(&quot;AccountId&quot;, ADDR)&#xD;&#xA;&#xD;&#xA;// convert to hex&#xD;&#xA;const hex = id.toHex()&#xD;&#xA;&#xD;&#xA;// alternatively, you can just compare directly to &#xD;&#xA;// something else that can be an ss58 address, hex&#xD;&#xA;// or even Uint8Array (raw decoded bytes are compared)&#xD;&#xA;const isEqual = id.eq(&quot;SomethingElse&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Your second option is via the `decodeAddress` -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { u8aToHex } from &quot;@polkadot/util&quot;&#xD;&#xA;import { decodeAddress } from &quot;@polkadot/util-crypto&quot;&#xD;&#xA;&#xD;&#xA;const ADDR = &quot;5DTNtGF2DmZ7QwGxg6n1xWzF6cEokNyNre7mUqpVuozrLxu3&quot;&#xD;&#xA;&#xD;&#xA;// convert to hex&#xD;&#xA;const hex = u8aToHex(decodeAddress(ADDR))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Option 3 - if the array is from the API, you can use the first option and just use the `.eq` directly on it (without creating)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13199" PostHistoryTypeId="5" PostId="3520" RevisionGUID="33beb4eb-3108-4c0c-8cf1-fd356908c2f9" CreationDate="2022-06-29T14:51:47.300" UserId="2129" Comment="added 89 characters in body" Text="You have a couple of options. &#xD;&#xA;&#xD;&#xA;First, if you already have an initialized API in your app -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const ADDR = &quot;5DTNtGF2DmZ7QwGxg6n1xWzF6cEokNyNre7mUqpVuozrLxu3&quot;&#xD;&#xA;&#xD;&#xA;// create a type from this&#xD;&#xA;const id = api.registry.createType(&quot;AccountId&quot;, ADDR)&#xD;&#xA;&#xD;&#xA;// convert to hex&#xD;&#xA;const hex = id.toHex()&#xD;&#xA;&#xD;&#xA;// alternatively, you can just compare directly to &#xD;&#xA;// something else that can be an ss58 address, hex&#xD;&#xA;// or even Uint8Array (raw decoded bytes are compared)&#xD;&#xA;const isEqual = id.eq(&quot;SomethingElse&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Your second option is via the `decodeAddress` -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { u8aToHex } from &quot;@polkadot/util&quot;&#xD;&#xA;import { decodeAddress } from &quot;@polkadot/util-crypto&quot;&#xD;&#xA;&#xD;&#xA;const ADDR = &quot;5DTNtGF2DmZ7QwGxg6n1xWzF6cEokNyNre7mUqpVuozrLxu3&quot;&#xD;&#xA;&#xD;&#xA;// convert to hex&#xD;&#xA;const hex = u8aToHex(decodeAddress(ADDR))&#xD;&#xA;&#xD;&#xA;// test for equality&#xD;&#xA;const isEqual = hex === &quot;0xdeadbeef&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Option 3 - if the array is from the API, you can use the first option and just use the `.eq` directly on it (without creating)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13200" PostHistoryTypeId="2" PostId="3521" RevisionGUID="9be6aea7-9fa4-4f58-ae0c-fcfa7eb1420d" CreationDate="2022-06-29T16:04:29.313" UserId="2790" Text="Not sure, which docs this is referring to. But this would be the extrinsic that is called https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/frame/system/src/lib.rs#L442.&#xD;&#xA;&#xD;&#xA;So it’s rather a Key and a Value to set in storage. In your case you would need to set the key and the value accordingly to the vesting storage-map (https://github.com/paritytech/substrate/blob/ee3eb8f2448cc1bb978c5d1564febd351c128bb0/frame/vesting/src/lib.rs#L194).&#xD;&#xA;&#xD;&#xA;Hope this helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="13202" PostHistoryTypeId="2" PostId="3522" RevisionGUID="10c7ec75-eda7-4ae7-b2d9-950d881df3f3" CreationDate="2022-06-29T16:15:30.343" UserId="2135" Text="In a dApp, I want the users to be able to do to `N` number of transactions.&#xD;&#xA;&#xD;&#xA;Those `N` transactions will be batched will be batched in a `batchAll`. If `N` exceeds the maximum benchmarked amount of transactions in one batch, let's say `x`, it will create multiple `batchAll` transactions for the user to sign.&#xD;&#xA;&#xD;&#xA;I would like to know what's the correct way, if there is one, for the user to sign 1 transaction on the UI instead of `N` divided by `x`.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13204" PostHistoryTypeId="1" PostId="3522" RevisionGUID="10c7ec75-eda7-4ae7-b2d9-950d881df3f3" CreationDate="2022-06-29T16:15:30.343" UserId="2135" Text="Best way to make user sign N number of transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="13205" PostHistoryTypeId="3" PostId="3522" RevisionGUID="10c7ec75-eda7-4ae7-b2d9-950d881df3f3" CreationDate="2022-06-29T16:15:30.343" UserId="2135" Text="|polkadot-js|polkadot-js-extension|batch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13206" PostHistoryTypeId="5" PostId="3522" RevisionGUID="b0f1f94e-2e75-4f50-8e7b-adb576b59ed5" CreationDate="2022-06-29T16:16:12.657" UserId="2135" Comment="deleted 14 characters in body" Text="In a dApp, I want the users to be able to do `N` number of transactions.&#xD;&#xA;&#xD;&#xA;Those `N` transactions will be batched in a `batchAll` call. If `N` exceeds the maximum benchmarked amount of transactions in one batch, let's say `x`, it will create multiple `batchAll` transactions for the user to sign.&#xD;&#xA;&#xD;&#xA;I would like to know what's the correct way, if there is one, for the user to sign 1 transaction on the UI instead of `N` divided by `x`.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13207" PostHistoryTypeId="2" PostId="3523" RevisionGUID="4d5654ab-bbde-4b63-bbee-b9ad9f544cab" CreationDate="2022-06-29T16:23:05.460" UserId="1789" Text="I am following this tutorial on how to reserve a paraID&#xD;&#xA;https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/&#xD;&#xA;&#xD;&#xA;I have the two Polkadot v0.9.24 validators running and I can see &quot;peer(1)&quot; in their logs so those two validators can see each other.&#xD;&#xA;&#xD;&#xA;Then I go to open PolkadotJS https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/parachains/parathreads&#xD;&#xA;&#xD;&#xA;in Accounts &gt; My accounts tab &gt; I see Alice has only 1 MUnit&#xD;&#xA;&#xD;&#xA;`ALICE 5Grwva…GKutQY  sr25519  1.0000 MUnit`&#xD;&#xA;&#xD;&#xA;Is that enough ? How can I get some more?&#xD;&#xA;&#xD;&#xA;The tutorial says `You must have a sufficient funds to reserve a ParaID. Refer to your target relay chain to determine the number of tokens required.`&#xD;&#xA;&#xD;&#xA;what does this mean? &#xD;&#xA;&#xD;&#xA;Then when I click on Network &gt; Parachains &gt; Parathreads tab &gt; use the + ParaId button &gt; &#xD;&#xA;&#xD;&#xA;It says `Reserve from Alice. ParachainID 2000. Reserved Deposit 5.000 Units`&#xD;&#xA;&#xD;&#xA;Then I click on submit, and get this error message:&#xD;&#xA;```&#xD;&#xA;1002: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed WASM backtrace: 0: 0x354ef6 - &lt;unknown&gt;!rust_begin_unwind 1: 0x872e - &lt;unknown&gt;!core::panicking::panic_fmt::hc6c29bb1e9ac0604 2: 0x145d3a - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction : RuntimeApi, Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n 0: 0x354ef6 - &lt;unknown&gt;!rust_begin_unwind\n 1: 0x872e - &lt;unknown&gt;!core::panicking::panic_fmt::hc6c29bb1e9ac0604\n …&#xD;&#xA;```&#xD;&#xA;Why is this not working? I am using the latest Polkadot v0.9.24. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13209" PostHistoryTypeId="1" PostId="3523" RevisionGUID="4d5654ab-bbde-4b63-bbee-b9ad9f544cab" CreationDate="2022-06-29T16:23:05.460" UserId="1789" Text="wasm unreachable instruction when trying to reserve a new ParaID in PolkadotJS" ContentLicense="CC BY-SA 4.0" />
  <row Id="13210" PostHistoryTypeId="3" PostId="3523" RevisionGUID="4d5654ab-bbde-4b63-bbee-b9ad9f544cab" CreationDate="2022-06-29T16:23:05.460" UserId="1789" Text="|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13211" PostHistoryTypeId="2" PostId="3524" RevisionGUID="16fdd375-4e08-4b6f-85df-8bb322082c24" CreationDate="2022-06-29T16:36:54.313" UserId="1745" Text="This feels like a silly question, but I'm wondering...&#xD;&#xA;&#xD;&#xA;If I have an existing permissioned chain running on Substrate with a token and a large number of holders, can I safely transition the application (with all state transition histories) to a parachain? &#xD;&#xA;&#xD;&#xA;My knowledge of substrate is somewhat limited, but it seems like migrating the transaction state held within my validators would prevent this unless the entire chain state is migrated to the relay chain (Polkadot). &#xD;&#xA;&#xD;&#xA;The only way forward I can see is create a new parachain application, and have current token holders exchange tokens 1:1 for the new parachain token with a freshly maintained state. &#xD;&#xA;&#xD;&#xA;Thoughts here are greatly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="13213" PostHistoryTypeId="1" PostId="3524" RevisionGUID="16fdd375-4e08-4b6f-85df-8bb322082c24" CreationDate="2022-06-29T16:36:54.313" UserId="1745" Text="Transition to Parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="13214" PostHistoryTypeId="3" PostId="3524" RevisionGUID="16fdd375-4e08-4b6f-85df-8bb322082c24" CreationDate="2022-06-29T16:36:54.313" UserId="1745" Text="|substrate-node|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13215" PostHistoryTypeId="2" PostId="3525" RevisionGUID="4297fd35-1d61-44c6-89dd-853fd964f21e" CreationDate="2022-06-29T17:14:02.230" UserId="620" Text="You already have the solution: just sign the `batchAll` call." ContentLicense="CC BY-SA 4.0" />
  <row Id="13217" PostHistoryTypeId="2" PostId="3526" RevisionGUID="792ff00a-1ef2-4f72-ab18-47f6c0bea7ca" CreationDate="2022-06-29T17:35:05.303" UserId="28" Text="Try Runtime uses a set of functions in the `OnRuntimeUpgrade` trait you need to implement and plug into your runtime.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// The runtime upgrade trait.&#xD;&#xA;///&#xD;&#xA;/// Implementing this lets you express what should happen when the runtime upgrades,&#xD;&#xA;/// and changes may need to occur to your module.&#xD;&#xA;pub trait OnRuntimeUpgrade {&#xD;&#xA;	/// Perform a module upgrade.&#xD;&#xA;	///&#xD;&#xA;	/// # Warning&#xD;&#xA;	///&#xD;&#xA;	/// This function will be called before we initialized any runtime state, aka `on_initialize`&#xD;&#xA;	/// wasn't called yet. So, information like the block number and any other&#xD;&#xA;	/// block local data are not accessible.&#xD;&#xA;	///&#xD;&#xA;	/// Return the non-negotiable weight consumed for runtime upgrade.&#xD;&#xA;	fn on_runtime_upgrade() -&gt; crate::weights::Weight {&#xD;&#xA;		0&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	/// Execute some pre-checks prior to a runtime upgrade.&#xD;&#xA;	///&#xD;&#xA;	/// This hook is never meant to be executed on-chain but is meant to be used by testing tools.&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn pre_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	/// Execute some post-checks after a runtime upgrade.&#xD;&#xA;	///&#xD;&#xA;	/// This hook is never meant to be executed on-chain but is meant to be used by testing tools.&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn post_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So you have a `pre_upgrade` hook which can return a result before the upgrade happens, and a `post_upgrade` hook which is run after the upgrade.&#xD;&#xA;&#xD;&#xA;If you want to test some migration with Try Runtime, you need to implement one of these two hooks.&#xD;&#xA;&#xD;&#xA;For example, from the Nomination Pools Pallet:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Trivial migration which makes the roles of each pool optional.&#xD;&#xA;///&#xD;&#xA;/// Note: The depositor is not optional since he can never change.&#xD;&#xA;pub struct MigrateToV1&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;impl&lt;T: Config&gt; OnRuntimeUpgrade for MigrateToV1&lt;T&gt; {&#xD;&#xA;	fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA;		let current = Pallet::&lt;T&gt;::current_storage_version();&#xD;&#xA;		let onchain = Pallet::&lt;T&gt;::on_chain_storage_version();&#xD;&#xA;&#xD;&#xA;		log!(&#xD;&#xA;			info,&#xD;&#xA;			&quot;Running migration with current storage version {:?} / onchain {:?}&quot;,&#xD;&#xA;			current,&#xD;&#xA;			onchain&#xD;&#xA;		);&#xD;&#xA;&#xD;&#xA;		if current == 1 &amp;&amp; onchain == 0 {&#xD;&#xA;			// this is safe to execute on any runtime that has a bounded number of pools.&#xD;&#xA;			let mut translated = 0u64;&#xD;&#xA;			BondedPools::&lt;T&gt;::translate::&lt;OldBondedPoolInner&lt;T&gt;, _&gt;(|_key, old_value| {&#xD;&#xA;				translated.saturating_inc();&#xD;&#xA;				Some(old_value.migrate_to_v1())&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			current.put::&lt;Pallet&lt;T&gt;&gt;();&#xD;&#xA;&#xD;&#xA;			log!(info, &quot;Upgraded {} pools, storage to version {:?}&quot;, translated, current);&#xD;&#xA;&#xD;&#xA;			T::DbWeight::get().reads_writes(translated + 1, translated + 1)&#xD;&#xA;		} else {&#xD;&#xA;			log!(info, &quot;Migration did not executed. This probably should be removed&quot;);&#xD;&#xA;			T::DbWeight::get().reads(1)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn post_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		// new version must be set.&#xD;&#xA;		assert_eq!(Pallet::&lt;T&gt;::on_chain_storage_version(), 1);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally, you need to include this runtime upgrade into your runtime:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Executive: handles dispatch to the various modules.&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;	InitiatePoolConfigs,&#xD;&#xA;	(&#xD;&#xA;		// Add migration structs here&#xD;&#xA;	),&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can look at PRs like this to follow along:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/11357" ContentLicense="CC BY-SA 4.0" />
  <row Id="13219" PostHistoryTypeId="2" PostId="3527" RevisionGUID="275b3d60-c9bf-4228-8114-17226a456d0b" CreationDate="2022-06-29T17:38:51.757" UserId="28" Text="If your batch call must be split over multiple extrinsics, there is really not a way to avoid the user having to sign multiple calls unless you have the private key, and do a non-interactive message signing.&#xD;&#xA;&#xD;&#xA;You can imagine that if a developer could force a user to sign multiple extrinsics at once, that would be really easy to attack the user.&#xD;&#xA;&#xD;&#xA;I would suggest, as a part of your user experience, you notify the user how many transactions you are expecting them to sign before you start prompting them for signatures, and that could at least make them aware of what is happening.&#xD;&#xA;&#xD;&#xA;Otherwise, you probably can create a local application which does this, but again, you would need to give direct access to the private key to do a non-interactive signing process." ContentLicense="CC BY-SA 4.0" />
  <row Id="13221" PostHistoryTypeId="2" PostId="3528" RevisionGUID="d04bb0a0-2f36-4a3d-b8f7-0daf329da96b" CreationDate="2022-06-29T18:52:32.137" UserId="2801" Text="I was doing some testing and sent a transaction on a custom substrate chain. On the polkadot explorer, the block which held the transaction had an error. The transaction completed; however, the explorer showed: &#xD;&#xA;&#xD;&#xA;`Unable to retrieve the specified block details. Unable to decode storage system.events:: createType(Vec&lt;EventRecord&gt;):: Vec&lt;EventRecord&gt;:: Decoded input doesn't match input, received`&#xD;&#xA;&#xD;&#xA;What is this error? And is there anything I could do to fix it?&#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="13223" PostHistoryTypeId="1" PostId="3528" RevisionGUID="d04bb0a0-2f36-4a3d-b8f7-0daf329da96b" CreationDate="2022-06-29T18:52:32.137" UserId="2801" Text="Polkadot Explorer: decode storage system.events" ContentLicense="CC BY-SA 4.0" />
  <row Id="13224" PostHistoryTypeId="3" PostId="3528" RevisionGUID="d04bb0a0-2f36-4a3d-b8f7-0daf329da96b" CreationDate="2022-06-29T18:52:32.137" UserId="2801" Text="|substrate-node|custom-types|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13225" PostHistoryTypeId="2" PostId="3529" RevisionGUID="8cb9e934-eeef-4315-918a-302d3aa9185e" CreationDate="2022-06-30T00:13:40.730" UserId="651" Text="documenting an error and a fix for others. While updating a substrate repository I was getting an error:&#xD;&#xA;&#xD;&#xA;    error: failed to select a version for the requirement `wasmtime = &quot;^0.38.0&quot;`                                                                      &#xD;&#xA;    candidate versions found which didn't match: 0.37.0, 0.36.0, 0.35.3, ...&#xD;&#xA;&#xD;&#xA;Checking crates.io I could see that there was a valid release for this crate and version, however, cargo was failing to find the latest version but there is a simple fix.&#xD;&#xA;&#xD;&#xA;**Fix**&#xD;&#xA;&#xD;&#xA;Remove cargos existing artifacts for the targeted directory: `cargo clean`&#xD;&#xA;Then `cargo check` will be able to get the latest versions of crates.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13227" PostHistoryTypeId="1" PostId="3529" RevisionGUID="8cb9e934-eeef-4315-918a-302d3aa9185e" CreationDate="2022-06-30T00:13:40.730" UserId="651" Text="FIX: failed to select a version for the requirement `&lt;crate = &quot;version&gt;&quot;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="13228" PostHistoryTypeId="3" PostId="3529" RevisionGUID="8cb9e934-eeef-4315-918a-302d3aa9185e" CreationDate="2022-06-30T00:13:40.730" UserId="651" Text="|substrate-node|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13229" PostHistoryTypeId="2" PostId="3530" RevisionGUID="3d838da3-1e39-44b0-91d5-59a5c2c79924" CreationDate="2022-06-30T02:51:07.810" UserId="393" Text="One alternative is take a storage snapshot of current solo chain, and write into spec.genesis.raw. The detail of implementation refers to [fork-off-substrate][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/maxsam4/fork-off-substrate/blob/master/index.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="13234" PostHistoryTypeId="2" PostId="3531" RevisionGUID="4e9d4ea5-96ac-44d0-8285-847587c64d20" CreationDate="2022-06-30T03:23:16.460" UserId="393" Text="    For example would it be possible to create a storage.rs module and add the storages there like so&#xD;&#xA;&#xD;&#xA;I think the answer is no. You can't split #[pallet::storage] from pallet module. When you go into the #[frame_support::pallet] macro's expand process, you'll see components in pallet are expanded as the whole. &#xD;&#xA;&#xD;&#xA;The source code of expand pallet can be found [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/f39769740858bf480ef13adbfd46267afce92eb9/frame/support/procedural/src/lib.rs#L406" ContentLicense="CC BY-SA 4.0" />
  <row Id="13236" PostHistoryTypeId="2" PostId="3532" RevisionGUID="68cb7ff3-40da-4e4e-a091-11d64277cd8d" CreationDate="2022-06-30T05:09:37.180" UserId="1789" Text="Solved...&#xD;&#xA;&#xD;&#xA;In PolkadotJS &gt; Settings &gt; Developer &gt; Reset to restore it to the original empty JSON format&#xD;&#xA;&#xD;&#xA;Stop the 2 Polkadot validators&#xD;&#xA;&#xD;&#xA;Purge those 2 validator's DB locally&#xD;&#xA;```&#xD;&#xA;cd $POLKADOT_BUILD_DIRECTORY &amp;&amp; rm -rf /tmp/relay/alice/chains/rococo_local_testnet/db/full&#xD;&#xA;&#xD;&#xA;cd $POLKADOT_BUILD_DIRECTORY &amp;&amp; rm -rf /tmp/relay-bob/chains/rococo_local_testnet/db/full&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Restart the 2 validators then follow the tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="13238" PostHistoryTypeId="2" PostId="3533" RevisionGUID="60324962-f79e-4fd1-8031-c5235d67c67e" CreationDate="2022-06-30T06:17:51.540" UserId="2802" Text="I want to set a single fee for every transaction happening in substrate either its transfer or any other transaction I want the transfer fee to be 1 unit.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="13240" PostHistoryTypeId="1" PostId="3533" RevisionGUID="60324962-f79e-4fd1-8031-c5235d67c67e" CreationDate="2022-06-30T06:17:51.540" UserId="2802" Text="How can i set fix gas fee for all transaction in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13241" PostHistoryTypeId="3" PostId="3533" RevisionGUID="60324962-f79e-4fd1-8031-c5235d67c67e" CreationDate="2022-06-30T06:17:51.540" UserId="2802" Text="|transactions|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13242" PostHistoryTypeId="2" PostId="3534" RevisionGUID="35c6a74e-6edc-4151-ae8e-d6b7d506a115" CreationDate="2022-06-30T06:47:54.450" UserId="1893" Text="If I have a substrate based blockchain live with a genesis configuration &amp; it also is included a parachain in Polkadot. Now if I want to do a forkless upgrade to the chain, is it possible to update the constants in the genesis config?&#xD;&#xA;&#xD;&#xA;For example, if I had added polkadot.js wallet address as a special account that holds some fund in the genesis and now want to change it to a different wallet address with a forkless upgrade, is that possible?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="13244" PostHistoryTypeId="1" PostId="3534" RevisionGUID="35c6a74e-6edc-4151-ae8e-d6b7d506a115" CreationDate="2022-06-30T06:47:54.450" UserId="1893" Text="Can you update a genesis configuration via forkless upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13245" PostHistoryTypeId="3" PostId="3534" RevisionGUID="35c6a74e-6edc-4151-ae8e-d6b7d506a115" CreationDate="2022-06-30T06:47:54.450" UserId="1893" Text="|substrate-node|polkadot|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13246" PostHistoryTypeId="2" PostId="3535" RevisionGUID="8cb1d1ef-f334-462a-8405-a94a709692d3" CreationDate="2022-06-30T07:55:51.090" UserId="213" Text="Storage:&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn voting)]&#xD;&#xA;	pub type Voting&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Twox64Concat, T::AccountId, Voter&lt;T::AccountId&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;Type:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, TypeInfo)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;    pub struct Voter&lt;AccountId&gt; {&#xD;&#xA;    	pub votes: Vec&lt;AccountId&gt;,&#xD;&#xA;    	pub score: u128,&#xD;&#xA;    }&#xD;&#xA;Without ValueQuery it does not give error, but with ValueQuery it gives error, how to fix the error. Seems I need to implement default, not sure how to do it. &#xD;&#xA;&#xD;&#xA;    the trait `std::default::Default` is not implemented for `types::Voter&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13248" PostHistoryTypeId="1" PostId="3535" RevisionGUID="8cb1d1ef-f334-462a-8405-a94a709692d3" CreationDate="2022-06-30T07:55:51.090" UserId="213" Text="Using ValueQuery gives error" ContentLicense="CC BY-SA 4.0" />
  <row Id="13249" PostHistoryTypeId="3" PostId="3535" RevisionGUID="8cb1d1ef-f334-462a-8405-a94a709692d3" CreationDate="2022-06-30T07:55:51.090" UserId="213" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13250" PostHistoryTypeId="2" PostId="3536" RevisionGUID="463e2213-369a-4e50-914a-9aed284ede2a" CreationDate="2022-06-30T07:56:00.940" UserId="2806" Text="I have been trying to deploy our substrate-node-template on gcp as a docker container. To do that I need to write a Dockerfile, since the node runs on 9944 port I couldn't figure out on deploying this on gcp.&#xD;&#xA;I have come this far with my Dockerfile:&#xD;&#xA;&#xD;&#xA;    FROM rustlang/rust:nightly&#xD;&#xA;&#xD;&#xA;    WORKDIR /app&#xD;&#xA;    &#xD;&#xA;    RUN apt-get update -y &amp;&amp; \&#xD;&#xA;      apt-get install -y cmake pkg-config libssl-dev git gcc build-essential clang libclang-dev&#xD;&#xA;    &#xD;&#xA;    RUN rustup target add wasm32-unknown-unknown&#xD;&#xA;    &#xD;&#xA;    COPY . .&#xD;&#xA;    &#xD;&#xA;    RUN cargo build --release&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    ENV environment dev&#xD;&#xA;    ENV place ws-external&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    CMD [&quot;sh&quot;, &quot;-c&quot;, &quot;/app/target/release/node-template --${environment} --${place}&quot;]&#xD;&#xA;    &#xD;&#xA;    EXPOSE 9944&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13252" PostHistoryTypeId="1" PostId="3536" RevisionGUID="463e2213-369a-4e50-914a-9aed284ede2a" CreationDate="2022-06-30T07:56:00.940" UserId="2806" Text="How to host substrate-node-template on gcp using Dockerfile" ContentLicense="CC BY-SA 4.0" />
  <row Id="13253" PostHistoryTypeId="3" PostId="3536" RevisionGUID="463e2213-369a-4e50-914a-9aed284ede2a" CreationDate="2022-06-30T07:56:00.940" UserId="2806" Text="|substrate-node|polkadot|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13254" PostHistoryTypeId="2" PostId="3537" RevisionGUID="3cf7a93c-f685-44cb-b6ec-9e49cff3a378" CreationDate="2022-06-30T09:14:14.003" UserId="1816" Text="This seems very basic, but I'm unable to figure out at which block number an event was emitted. &#xD;&#xA;&#xD;&#xA;Specifically, I'm listening for `Grandpa.NewAuthorities` system event and just want to know at which block it was emitted. I've looked through the entire event, but can't find anything that would enable this. What am I missing here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13256" PostHistoryTypeId="1" PostId="3537" RevisionGUID="3cf7a93c-f685-44cb-b6ec-9e49cff3a378" CreationDate="2022-06-30T09:14:14.003" UserId="1816" Text="Parse block number from received system event" ContentLicense="CC BY-SA 4.0" />
  <row Id="13257" PostHistoryTypeId="3" PostId="3537" RevisionGUID="3cf7a93c-f685-44cb-b6ec-9e49cff3a378" CreationDate="2022-06-30T09:14:14.003" UserId="1816" Text="|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13258" PostHistoryTypeId="2" PostId="3538" RevisionGUID="39ac591d-adbf-43ab-bbe1-606a9a3ef92a" CreationDate="2022-06-30T09:32:44.510" UserId="2581" Text="I want to know how I can get list of transactions and transactions info for specific wallet address in polkadot.js/api, especially for kusama.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const provider = new WsProvider(&quot;wss://kusama-rpc.polkadot.io&quot;);&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;const response = await api.rpc.eth.getTransactionByHash(hash);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am not sure if above code is for transactions, however it is not running and cause error.&#xD;&#xA;```&#xD;&#xA;UnhandledPromiseRejectionWarning: TypeError: api.rpc.eth.getTransactionByHash is not a function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I get transactions from wallet address in polkadot.js/api?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13260" PostHistoryTypeId="1" PostId="3538" RevisionGUID="39ac591d-adbf-43ab-bbe1-606a9a3ef92a" CreationDate="2022-06-30T09:32:44.510" UserId="2581" Text="Get Transactions from wallet address in polkadot.js/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="13261" PostHistoryTypeId="3" PostId="3538" RevisionGUID="39ac591d-adbf-43ab-bbe1-606a9a3ef92a" CreationDate="2022-06-30T09:32:44.510" UserId="2581" Text="|polkadot-js|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13262" PostHistoryTypeId="2" PostId="3539" RevisionGUID="f0efd5c5-61e9-4440-8e7b-b24c3bf3edb8" CreationDate="2022-06-30T11:40:31.257" UserId="2565" Text="Steps in configuring local_testnet (private network)&#xD;&#xA;&#xD;&#xA;1. Create bootnode keys:&#xD;&#xA;```&#xD;&#xA;# botnode aura&#xD;&#xA;$ subkey generate --scheme sr25519&#xD;&#xA;Secret phrase:       tackle memory pepper lake seed afford since state power label brick copy&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x81d794359885bb885c357dbf1bf75aff0f6744d532340d9418557ee43c8642ee&#xD;&#xA;  Public key (hex):  0x34edf846c91511ca2b33d201a82b4a801b177feb6583dd56b8b589226441b272&#xD;&#xA;  Account ID:        0x34edf846c91511ca2b33d201a82b4a801b177feb6583dd56b8b589226441b272&#xD;&#xA;  Public key (SS58): 5DG73DMGcRCdJD55tnMuzAfb9MkwKsgpW5ft7DBpnUxpW3Wg&#xD;&#xA;  SS58 Address:      5DG73DMGcRCdJD55tnMuzAfb9MkwKsgpW5ft7DBpnUxpW3Wg&#xD;&#xA;&#xD;&#xA;# botnode gran&#xD;&#xA;$ subkey inspect --scheme ed25519 &quot;tackle memory pepper lake seed afford since state power label brick copy&quot;&#xD;&#xA;Secret phrase:       tackle memory pepper lake seed afford since state power label brick copy&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x81d794359885bb885c357dbf1bf75aff0f6744d532340d9418557ee43c8642ee&#xD;&#xA;  Public key (hex):  0x468d07453610d714e22a33c03b3004dc3b8efb146ec1f2200ae8d68102f0ffe7&#xD;&#xA;  Account ID:        0x468d07453610d714e22a33c03b3004dc3b8efb146ec1f2200ae8d68102f0ffe7&#xD;&#xA;  Public key (SS58): 5DfD6wftdWs3VqsajyEZMZjsBLk9jTZV5PfihZ3GFCe8YCu7&#xD;&#xA;  SS58 Address:      5DfD6wftdWs3VqsajyEZMZjsBLk9jTZV5PfihZ3GFCe8YCu7&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Create node2 keys:&#xD;&#xA;```&#xD;&#xA;# node2 aura&#xD;&#xA;$ subkey generate --scheme sr25519&#xD;&#xA;Secret phrase:       clump distance vast head photo mass run mosquito chicken wash tattoo escape&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0xca425677c85da882ecec057b47af3ab282253b9d27ed35f9835bc2b794c3d348&#xD;&#xA;  Public key (hex):  0xd4aa883727fb3c36507dbba6b45fed749c3d2abbf7411b52461445b0a3403e15&#xD;&#xA;  Account ID:        0xd4aa883727fb3c36507dbba6b45fed749c3d2abbf7411b52461445b0a3403e15&#xD;&#xA;  Public key (SS58): 5GsYff9q6wdjt2hXcWyt6W9K7mctwDWpT8QJguMj2svuvnU9&#xD;&#xA;  SS58 Address:      5GsYff9q6wdjt2hXcWyt6W9K7mctwDWpT8QJguMj2svuvnU9&#xD;&#xA;&#xD;&#xA;# node2 gran&#xD;&#xA;$ subkey inspect --scheme ed25519 &quot;clump distance vast head photo mass run mosquito chicken wash tattoo escape&quot;&#xD;&#xA;Secret phrase:       clump distance vast head photo mass run mosquito chicken wash tattoo escape&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0xca425677c85da882ecec057b47af3ab282253b9d27ed35f9835bc2b794c3d348&#xD;&#xA;  Public key (hex):  0xa6c1df110420b87d24aa56d9887c6e8a346f8bf9016e685d6f1c8d7cb8085cf1&#xD;&#xA;  Account ID:        0xa6c1df110420b87d24aa56d9887c6e8a346f8bf9016e685d6f1c8d7cb8085cf1&#xD;&#xA;  Public key (SS58): 5FqMQ2bbE3uFmrbiAz4J3Cr3QdEq8NL48BgkVQZYbxFhnf5k&#xD;&#xA;  SS58 Address:      5FqMQ2bbE3uFmrbiAz4J3Cr3QdEq8NL48BgkVQZYbxFhnf5k&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Authorized the aura and gran addresses for both nodes in the CustomSpec.json file.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#...&#xD;&#xA;      &quot;aura&quot;: {&#xD;&#xA;        &quot;authorities&quot;: [&#xD;&#xA;          &quot;5DG73DMGcRCdJD55tnMuzAfb9MkwKsgpW5ft7DBpnUxpW3Wg&quot;,&#xD;&#xA;          &quot;5GsYff9q6wdjt2hXcWyt6W9K7mctwDWpT8QJguMj2svuvnU9&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;grandpa&quot;: {&#xD;&#xA;        &quot;authorities&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5DfD6wftdWs3VqsajyEZMZjsBLk9jTZV5PfihZ3GFCe8YCu7&quot;,&#xD;&#xA;            1&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5FqMQ2bbE3uFmrbiAz4J3Cr3QdEq8NL48BgkVQZYbxFhnf5k&quot;,&#xD;&#xA;            1&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;balances&quot;: {&#xD;&#xA;        &quot;balances&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5DG73DMGcRCdJD55tnMuzAfb9MkwKsgpW5ft7DBpnUxpW3Wg&quot;,&#xD;&#xA;            100000000000000000000000&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;transactionPayment&quot;: null,&#xD;&#xA;      &quot;sudo&quot;: {&#xD;&#xA;        &quot;key&quot;: &quot;5DG73DMGcRCdJD55tnMuzAfb9MkwKsgpW5ft7DBpnUxpW3Wg&quot;&#xD;&#xA;      }&#xD;&#xA;#...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;4. Create a bootnode (node01) shell script command:&#xD;&#xA;```&#xD;&#xA;# run-bootnode.sh&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9944 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-cors all \&#xD;&#xA;--ws-external \&#xD;&#xA;--rpc-external \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name MyNode01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;4. Create a node2 (node02) shell script command (the node id of the bootnode may change from time to time, please take note of that carefully):&#xD;&#xA;```&#xD;&#xA;# run-node2.sh&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node02 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30334 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9934 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-cors all \&#xD;&#xA;--ws-external \&#xD;&#xA;--rpc-external \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name MyNode02 \&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWAk2PkrAqmEaqGtGc8ieUARYWmTyJkimpndd1F1f3ZJWZ \&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;5. Purge all db and keystore.  Take note that if you restart your computer, your keystore also will be deleted.&#xD;&#xA;```&#xD;&#xA;$ ./target/release/node-template purge-chain --base-path /tmp/node01 &#xD;&#xA;$ rm -rf /tmp/node01/chains/local_testnet/keystore&#xD;&#xA;$ ./target/release/node-template purge-chain --base-path /tmp/node02&#xD;&#xA;$ rm -rf /tmp/node02/chains/local_testnet/keystore&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;6. Now run the two nodes i different terminal.&#xD;&#xA;```&#xD;&#xA;$ ./run-bootnode.sh&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;$ ./run-node2.sh&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;7. Register the keys of the bootnode.&#xD;&#xA;[![bootnode/aura][1]][1]&#xD;&#xA;[![bootnode/gran][2]][2]&#xD;&#xA;&#xD;&#xA;8. Register the keys of node2.  Make sure your polkadotJS is really connected to node2, if not this will not work.&#xD;&#xA;[![node2/aura][3]][3]&#xD;&#xA;[![node2/grand][4]][4]&#xD;&#xA;&#xD;&#xA;9. Check the keystore for each node&#xD;&#xA;```&#xD;&#xA;$ ls /tmp/node01/chains/local_testnet/keystore&#xD;&#xA;617572611c98e60ea5fb1dfd0f72996afd2e35294ac4f33dfd4937489c43c65222e06347&#xD;&#xA;6772616ea77e7345133bd15486b7745bade1eed84d8bde1abfc5ea7199411a1fc865786e&#xD;&#xA;&#xD;&#xA;$ ls //tmp/node02/chains/local_testnet/keystore&#xD;&#xA;61757261540f2298562a57b3348968793b2e6a5d623232a7d353356d621456f49ebe8902&#xD;&#xA;6772616ea8b2e3955493c2d2608ce6013da726b15982710f1b045fff97e07fe0e3f753b4&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;9. Re-run the node.  Thats it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sF28u.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/xvw8h.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/MM5u8.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/KDpDu.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13264" PostHistoryTypeId="2" PostId="3540" RevisionGUID="6726c521-3496-4966-bb8b-6067eaf899d8" CreationDate="2022-06-30T12:45:48.880" UserId="234" Text="I would like to correctly monitor the events that are related to multisig transactions and I was wondering if I should always expect the following event pairs :&#xD;&#xA;&#xD;&#xA;- `NewMultisig` &lt;&gt; `Reserved`&#xD;&#xA;- `MultisigExecuted` &lt;&gt; `Unreserved`&#xD;&#xA;&#xD;&#xA;to be triggered. Also, will the reservation amount always be the same?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13266" PostHistoryTypeId="1" PostId="3540" RevisionGUID="6726c521-3496-4966-bb8b-6067eaf899d8" CreationDate="2022-06-30T12:45:48.880" UserId="234" Text="Will the event pairs `NewMultisig` &lt;&gt; `Reserved` and `MultisigExecuted` &lt;&gt; `Unreserved` always be emitted during a multisig transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13267" PostHistoryTypeId="3" PostId="3540" RevisionGUID="6726c521-3496-4966-bb8b-6067eaf899d8" CreationDate="2022-06-30T12:45:48.880" UserId="234" Text="|events|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13268" PostHistoryTypeId="2" PostId="3541" RevisionGUID="696e815b-19aa-4dbe-bb9a-76b87d57d1d2" CreationDate="2022-06-30T12:45:48.880" UserId="234" Text="The event pairs will/should always happen one after another when we have a `NewMultisig` or a `MultisigExecuted` event.&#xD;&#xA;&#xD;&#xA;More specifically these events will happen in the following order as we check the code in substrate :&#xD;&#xA;&#xD;&#xA;- When a new multisig tx is created :&#xD;&#xA;    - This means that we have the 1st approval so the function [approve_as_multi][1] is called from the `Multisig` Pallet.&#xD;&#xA;    - Then this function calls the [operate][2] function and the reserve will happen either [here][3] or [here][4].&#xD;&#xA;        &#xD;&#xA;    - These functions will then trigger the event [Reserved][5] from the balances pallet&#xD;&#xA;    - Then you can see that the [NewMultisig][6] event will be called after.&#xD;&#xA;&#xD;&#xA;- When a multisig tx is executed :&#xD;&#xA;    - This means that we have the last approval so the function [as_multi][7] is called from the Multisig pallet.&#xD;&#xA;    - Then this function again calls the [operate][2] and the [unreserve][8] functions.&#xD;&#xA;    - This function will then trigger the event [Unreserved][9] from the Balances pallet. &#xD;&#xA;    - Last the event [MultisigExecuted][10] is triggered after the unreserve.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L423&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L516&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L645&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L648&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/8b2f5379653d9d741f666634ed7f751dd6870381/frame/balances/src/lib.rs#L1794&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L662&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L360&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L573&#xD;&#xA;  [9]: https://github.com/paritytech/substrate/blob/8b2f5379653d9d741f666634ed7f751dd6870381/frame/balances/src/lib.rs#L1826&#xD;&#xA;  [10]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L576" ContentLicense="CC BY-SA 4.0" />
  <row Id="13270" PostHistoryTypeId="6" PostId="3536" RevisionGUID="d32412dd-ea27-4c1b-b1b9-b297a9d61cc9" CreationDate="2022-06-30T13:53:02.733" UserId="34" Comment="edited tags" Text="|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13271" PostHistoryTypeId="5" PostId="3541" RevisionGUID="bffe00fb-b3c6-42bd-bf98-6f08be9e353e" CreationDate="2022-06-30T15:55:54.767" UserId="234" Comment="Added the reservation amount info" Text="The event pairs will/should always happen one after another when we have a `NewMultisig` or a `MultisigExecuted` event.&#xD;&#xA;&#xD;&#xA;More specifically these events will happen in the following order as we check the code in substrate :&#xD;&#xA;&#xD;&#xA;- When a new multisig tx is created :&#xD;&#xA;    - This means that we have the 1st approval so the function [approve_as_multi][1] is called from the `Multisig` Pallet.&#xD;&#xA;    - Then this function calls the [operate][2] function and the reserve will happen either [here][3] or [here][4].&#xD;&#xA;        &#xD;&#xA;    - These functions will then trigger the event [Reserved][5] from the balances pallet&#xD;&#xA;    - Then you can see that the [NewMultisig][6] event will be called after.&#xD;&#xA;&#xD;&#xA;- When a multisig tx is executed :&#xD;&#xA;    - This means that we have the last approval so the function [as_multi][7] is called from the Multisig pallet.&#xD;&#xA;    - Then this function again calls the [operate][2] and the [unreserve][8] functions.&#xD;&#xA;    - This function will then trigger the event [Unreserved][9] from the Balances pallet. &#xD;&#xA;    - Last the event [MultisigExecuted][10] is triggered after the unreserve.&#xD;&#xA;&#xD;&#xA;*** The reservation amount is calculated based on the following formula :&#xD;&#xA;&#xD;&#xA;&gt; DepositBase will be reserved if this is the first approval, plus&#xD;&#xA;&gt; threshold times DepositFactor. It is returned once this dispatch&#xD;&#xA;&gt; happens or is cancelled.&#xD;&#xA;&#xD;&#xA;and an example on how to calculate it in Westend is shown in detail this [post][11]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L423&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L516&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L645&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L648&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/8b2f5379653d9d741f666634ed7f751dd6870381/frame/balances/src/lib.rs#L1794&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L662&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L360&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L573&#xD;&#xA;  [9]: https://github.com/paritytech/substrate/blob/8b2f5379653d9d741f666634ed7f751dd6870381/frame/balances/src/lib.rs#L1826&#xD;&#xA;  [10]: https://github.com/paritytech/substrate/blob/f318350b6410ef47e438aae24c0b4779373d0a7b/frame/multisig/src/lib.rs#L576&#xD;&#xA;  [11]: https://substrate.stackexchange.com/a/3506/234" ContentLicense="CC BY-SA 4.0" />
  <row Id="13273" PostHistoryTypeId="2" PostId="3542" RevisionGUID="1dd441bb-9d6c-4400-87e3-3610596854e4" CreationDate="2022-06-30T18:18:21.803" UserId="464" Text="The genesis file/state can't be changed, it is what all the peers use to verify the chain (really simplified explanation), it is what it initialize the chain (thus the name genesis). Keep in mind that it is from the genesis state that all the rest of the chain history is constructed, if we would be able to change it, we would basically alter all the block after the initialization.&#xD;&#xA;&#xD;&#xA;However if you want to change variable after the launch of the chain it is possible, you will have to perform storage migration. &#xD;&#xA;See the [Substrate migration doc][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/parachains/runtime-upgrade/" ContentLicense="CC BY-SA 4.0" />
  <row Id="13275" PostHistoryTypeId="2" PostId="3543" RevisionGUID="2a021334-2acc-4a49-90a7-7257d2e23664" CreationDate="2022-06-30T18:26:59.553" UserId="2802" Text="i am trying to implement n-POS in my frontier and i had to use pallet-staking for that. but when i try to use this dependency in my cargo.TOML file it start giving me error related to frame-benchmarking&#xD;&#xA;&#xD;&#xA;**cargo.TOML**&#xD;&#xA;```&#xD;&#xA;[dependencies.sp-version]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '5.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-staking]&#xD;&#xA;git = &quot;https://github.com/paritytech/substrate&quot;&#xD;&#xA;default-features = false&#xD;&#xA;branch = &quot;master&quot; &#xD;&#xA;&#xD;&#xA;[dependencies.pallet-staking]&#xD;&#xA;git = &quot;https://github.com/paritytech/substrate&quot;&#xD;&#xA;default-features = false&#xD;&#xA;branch = &quot;master&quot;&#xD;&#xA;```&#xD;&#xA;in std array&#xD;&#xA;```&#xD;&#xA;&quot;pallet-staking/std&quot;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**error**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to select a version for `sc-client-db`.&#xD;&#xA;    ... required by package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate?branch=master#174735ea)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `frontier-template-node v0.0.0 (/Users/mp-haidera-pyse-403/Desktop/substrate/kories/node)`&#xD;&#xA;versions that meet the requirements `^0.10.0-dev` (locked to 0.10.0-dev) are: 0.10.0-dev&#xD;&#xA;&#xD;&#xA;the package `frame-benchmarking-cli` depends on `sc-client-db`, with features: `with-kvdb-rocksdb` but `sc-client-db` does not have these features.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;failed to select a version for `sc-client-db` which could resolve this conflict&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13277" PostHistoryTypeId="1" PostId="3543" RevisionGUID="2a021334-2acc-4a49-90a7-7257d2e23664" CreationDate="2022-06-30T18:26:59.553" UserId="2802" Text="Failed to resolve dependencies with pallet-staking in frontier" ContentLicense="CC BY-SA 4.0" />
  <row Id="13278" PostHistoryTypeId="3" PostId="3543" RevisionGUID="2a021334-2acc-4a49-90a7-7257d2e23664" CreationDate="2022-06-30T18:26:59.553" UserId="2802" Text="|consensus|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13280" PostHistoryTypeId="2" PostId="3544" RevisionGUID="02c9fa09-ade8-4f0c-b6f2-8a9bb485c46c" CreationDate="2022-07-01T03:58:29.160" UserId="651" Text="Remove cargos existing artifacts for the targeted directory: `cargo clean` Then `cargo check` will be able to get the latest versions of crates." ContentLicense="CC BY-SA 4.0" />
  <row Id="13282" PostHistoryTypeId="2" PostId="3545" RevisionGUID="736621fc-9c3a-47e9-b1d3-4c826bfa9c2a" CreationDate="2022-07-01T06:05:28.817" UserId="34" Text="https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/&#xD;&#xA;&#xD;&#xA;This guide is a work in progress at his time, outline for now with more details soon to come, as ironman said, an incremental runtime and storage migration to progressively populate your parachain is suggested. More info https://docs.substrate.io/reference/how-to-guides/parachains/prepare-to-launch/" ContentLicense="CC BY-SA 4.0" />
  <row Id="13284" PostHistoryTypeId="6" PostId="3524" RevisionGUID="a472ffe6-d800-4e21-a0bd-ab6f2884c65c" CreationDate="2022-07-01T06:06:04.000" UserId="34" Comment="edited tags; edited tags" Text="|parachain|solo-chain|convert|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13285" PostHistoryTypeId="6" PostId="3528" RevisionGUID="c94937fa-bf79-426a-9565-66f1b0ccda4a" CreationDate="2022-07-01T06:08:26.827" UserId="34" Comment="edited tags" Text="|polkadot-js|custom-types|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13286" PostHistoryTypeId="6" PostId="2892" RevisionGUID="1a57b904-0e07-4ab3-b0cf-f94fb3f545de" CreationDate="2022-07-01T06:10:10.330" UserId="34" Comment="edited tags" Text="|storage|trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13287" PostHistoryTypeId="2" PostId="3546" RevisionGUID="a919ced5-6225-4325-a00b-53d76ac68df2" CreationDate="2022-07-01T06:51:24.103" UserId="2103" Text="I am trying to create some custom assets using pallet_assets and I want to pay the transaction fees for some extrinsics using the created custom asset. How can I achieve so ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13289" PostHistoryTypeId="1" PostId="3546" RevisionGUID="a919ced5-6225-4325-a00b-53d76ac68df2" CreationDate="2022-07-01T06:51:24.103" UserId="2103" Text="Using Custom assets for transaction fees" ContentLicense="CC BY-SA 4.0" />
  <row Id="13290" PostHistoryTypeId="3" PostId="3546" RevisionGUID="a919ced5-6225-4325-a00b-53d76ac68df2" CreationDate="2022-07-01T06:51:24.103" UserId="2103" Text="|substrate-node|pallet|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13291" PostHistoryTypeId="2" PostId="3547" RevisionGUID="fda72798-5cf5-4d50-8dde-1584729ea226" CreationDate="2022-07-01T08:20:16.770" UserId="169" Text="One of the issues of PoS as far as I understand is the randomness that selects a staker. Ouroboros Praos, and [also BABE][1] use VRFs (Verifiable Random Functions) to assign primary and secondary leaders roles to block producers. What's special about this is that only the individual block producer knows whether they're gonna win a block, making targeted attacks infeasible. All good so far.&#xD;&#xA;&#xD;&#xA;If I understand correctly, [secondary leaders][1] exist in case primaries are not available for any reason (whether it's network latency issue, or being offline). Basically to solve the liveliness problem. BABE chooses the longest chain by finding the most primaries in a chain.&#xD;&#xA;&#xD;&#xA;[![Longest chain is the one with most primaries][5]][5]&#xD;&#xA;&#xD;&#xA;Let's say I'm a bad block producer, and I want to produce a certain outcome on the blockchain. What prevents me from doing that by:&#xD;&#xA;&#xD;&#xA;1. Producing the block, and keeping it with me (not broadcasting it)&#xD;&#xA;2. Waiting for the secondary producer to publish&#xD;&#xA;3. If I like the outcome, I keep it, otherwise, I publish my block and overwrite it&#xD;&#xA;&#xD;&#xA;I can even see [Sassafras][2] having the same issue, because it pre-publishes the list of producers to eliminate the probability of having missing producers in slots (the current problem with BABE). What if a producer holds off publishing their block and waits for the next producer in order to publish and then overwrites their work if they don't like it? Same issue with primary and secondary producers.&#xD;&#xA;&#xD;&#xA;[This is an attack][3] that's prevented in bitcoin by giving all miners the same strength/chainwork per block height. Basically the chainwork is a [function of the difficulty, not the inverse of the hash of a block][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/blog/polkadot-consensus-part-3-babe/&#xD;&#xA;  [2]: https://corepaper.org/substrate/consensus/sassafras/&#xD;&#xA;  [3]: https://bitcoin.stackexchange.com/questions/53825/would-an-optimization-proof-of-work-problem-where-the-entity-with-the-lowest-has/53965#53965&#xD;&#xA;  [4]: https://github.com/bitcoin/bitcoin/blob/1d39c9ca0672e7ad4c1f0959f9d58d2fcc7dc46b/src/chain.cpp#L125&#xD;&#xA;  [5]: https://i.stack.imgur.com/kaOhe.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13293" PostHistoryTypeId="1" PostId="3547" RevisionGUID="fda72798-5cf5-4d50-8dde-1584729ea226" CreationDate="2022-07-01T08:20:16.770" UserId="169" Text="What prevents a primary staker from holding off staking to wait for a specific outcome they want in BABE?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13294" PostHistoryTypeId="3" PostId="3547" RevisionGUID="fda72798-5cf5-4d50-8dde-1584729ea226" CreationDate="2022-07-01T08:20:16.770" UserId="169" Text="|babe|block|block-production|verifiable-random-function|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13295" PostHistoryTypeId="2" PostId="3548" RevisionGUID="dd40909f-cace-402f-a9fb-270bbd99a4df" CreationDate="2022-07-01T09:57:24.853" UserId="1810" Text="Praos has a performance &amp; resource utilization problem, not a liveness problem. BABE's secondary slots, and Sassafras, make the chain faster &amp; more efficient. &#xD;&#xA;&#xD;&#xA;As proven by the [Praos paper][1], we never care if some block producers carry out this &quot;attack&quot;, only if too many do.  It's tricky however because we intuitively think about attackers as being malicious together, while our results often say less than 1/2 or 1/3 byzantine.&#xD;&#xA;&#xD;&#xA;In other words, are these protocols secure if all block producers are malicious, but no more than 1/3rd form cartels together?  Although some work exists, there is afaik no analysis proving exactly this for Praos or any byzantine agreement protocol.  Instead, there are results after you add economic assumptions, which makes sense because this requires the cartels goals differ.  We do know [bicoin's consensus collapses after enough halvings][2] within the cartels model, due to their stupid economics.&#xD;&#xA;&#xD;&#xA;We believe Sassafras admits simpler analysis, and should be stronger, in the cartels model, for two reasons:&#xD;&#xA;&#xD;&#xA;Any (semi-)SSLE like Sassafras admits only one block per slot, which also means fewer blocks always reduces total rewards.  Although important, I kinda dislike the second bit here for polkadot because we'll be cheaper by making as much of the validator rewards as possible to go for approval checks of parachain blocks.&#xD;&#xA;&#xD;&#xA;In sassafras, we'll eventually bypass the memepool by send tx directly to block producers via tor-like circuits, at which block producers can take ownership of tx via half-aggregation aka pre-batching of signatures, snarks, etc., so then skipping others' block merely excludes their tx entirely, and does not permit you to benefit from those tx.  This looks crazy powerful.&#xD;&#xA;&#xD;&#xA;  [1]: https://eprint.iacr.org/2017/573.pdf&#xD;&#xA;  [2]: https://www.cs.princeton.edu/~arvindn/publications/mining_CCS.pdf&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13297" PostHistoryTypeId="5" PostId="3548" RevisionGUID="59d06ea6-8732-442a-8af3-e1cafb969920" CreationDate="2022-07-01T10:22:40.097" UserId="1810" Comment="added 266 characters in body" Text="Praos has a performance &amp; resource utilization problem, not a liveness problem. BABE's secondary slots, and Sassafras, make the chain faster &amp; more efficient. &#xD;&#xA;&#xD;&#xA;As proven by the [Praos paper][1], we never care if some block producers carry out this &quot;attack&quot;, only if too many do.  It's tricky however because we intuitively think about attackers as being malicious together, while our results often say less than 1/2 or 1/3 byzantine.&#xD;&#xA;&#xD;&#xA;In other words, are these protocols secure if all block producers are malicious, but no more than 1/3rd form cartels together?  Although some work exists, there is afaik no analysis proving exactly this for Praos or any byzantine agreement protocol.  Instead, there are results after you add economic assumptions, which makes sense because this requires the cartels goals differ.  We do know [bicoin's consensus collapses after enough halvings][2] within the cartels model, due to their stupid economics.&#xD;&#xA;&#xD;&#xA;We believe Sassafras admits simpler analysis, and should be stronger, in the cartels model, for two reasons:&#xD;&#xA;&#xD;&#xA;Any (semi-)SSLE like Sassafras admits only one block per slot, which also means fewer blocks always reduces total rewards.  Although important, I kinda dislike the second bit here for polkadot because we'll be cheaper by making as much of the validator rewards as possible to go for approval checks of parachain blocks.&#xD;&#xA;&#xD;&#xA;In sassafras, we'll eventually build tor-like circuits through which users send tx almost to block producers, bypassing the memepool.  We could then make block producers &quot;own&quot; tx via half-aggregation aka pre-batching of signatures, snarks, etc.  If we've both advancements, then skipping others' block merely excludes the contained tx entirely, but does not permit attackers to benefit from those tx.  This looks powerful.&#xD;&#xA;&#xD;&#xA;As an aside, Tor does not pay relay operators, largely because they believe altruism mitigates these economic concerns, and they've a worse threat model than blockchains, but this assumption remains hotly debated.&#xD;&#xA;&#xD;&#xA;  [1]: https://eprint.iacr.org/2017/573.pdf&#xD;&#xA;  [2]: https://www.cs.princeton.edu/~arvindn/publications/mining_CCS.pdf&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13298" PostHistoryTypeId="2" PostId="3549" RevisionGUID="79075a8f-acf2-4fe5-9c57-35da56fe33d1" CreationDate="2022-07-01T11:28:30.830" UserId="88" Text="I'm trying to convert my project over to a structure similar to the `@polkadotjs` repositories, but I'm finding the dev template provided a bit difficult to parse. Specifically:&#xD;&#xA;&#xD;&#xA;1. How do I use this repository as a base for my monorepo? Do I fork the repo and work off of it or is there a cli setup?&#xD;&#xA;&#xD;&#xA;2. How do I use the dev template package in the repo to create a new app/package in `packages`?  - the `package.json` is hard to parse. I would like to be able to build, test, lint my app/package without worrying too much about config. But I can't find any scripts that do that, only a list of bins, which is quite different from the `@polkadotjs/apps` repo.&#xD;&#xA;&#xD;&#xA;Note: I am aiming for a similar setup as the `@polkadotjs` monorepos with one for packages (including typegen) and another for apps. Thanks!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13300" PostHistoryTypeId="1" PostId="3549" RevisionGUID="79075a8f-acf2-4fe5-9c57-35da56fe33d1" CreationDate="2022-07-01T11:28:30.830" UserId="88" Text="How to use the polkadot/dev project template" ContentLicense="CC BY-SA 4.0" />
  <row Id="13301" PostHistoryTypeId="3" PostId="3549" RevisionGUID="79075a8f-acf2-4fe5-9c57-35da56fe33d1" CreationDate="2022-07-01T11:28:30.830" UserId="88" Text="|polkadot-js|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13302" PostHistoryTypeId="2" PostId="3550" RevisionGUID="668b3633-f6c9-485f-b242-d043a4224714" CreationDate="2022-07-01T12:05:13.213" UserId="332" Text="What is the best design to reuse governance pallets (e.g. treasury, council, Gov2) with non-L1 tokens?  &#xD;&#xA;&#xD;&#xA;Can a Statemine fungible asset be used with these pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13304" PostHistoryTypeId="1" PostId="3550" RevisionGUID="668b3633-f6c9-485f-b242-d043a4224714" CreationDate="2022-07-01T12:05:13.213" UserId="332" Text="Using fungible Statemine assets with governance" ContentLicense="CC BY-SA 4.0" />
  <row Id="13305" PostHistoryTypeId="3" PostId="3550" RevisionGUID="668b3633-f6c9-485f-b242-d043a4224714" CreationDate="2022-07-01T12:05:13.213" UserId="332" Text="|governance|statemint|statemine|gov2|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13306" PostHistoryTypeId="2" PostId="3551" RevisionGUID="ef780cb7-56c3-4495-b817-18e7ae299cf4" CreationDate="2022-07-01T12:42:20.140" UserId="627" Text="The [polkadot-js dev](https://github.com/polkadot-js/dev) repo is not a template project for helping with using the `@polkadot/*` libs, rather it is a set of templates, configs and scripts that helps all the polkadot-js repos to be consistent in terms of structure and coding.&#xD;&#xA;&#xD;&#xA;What this means internally to the polkadot-js org -&#xD;&#xA;&#xD;&#xA; - There is a single shared [config](https://github.com/polkadot-js/dev/tree/master/packages/dev/config) for everything - this means that each other repo (be it api, extension, apps, common, phishing, ...) just re-uses the config, be it for [Babel](https://github.com/polkadot-js/api/blob/45525b4288922bea8f5df5929061d4b749a25d25/babel.config.cjs#L4), [eslint](https://github.com/polkadot-js/common/blob/81f8f16b983c339b7ce2569e59dabb36a8ff5af0/.eslintrc.js#L4), [Typescript](https://github.com/polkadot-js/tools/blob/ea0d90a08771b3187555081c0371228b120d9d8a/tsconfig.base.json#L2), etc.&#xD;&#xA; - There are a set of [scripts](https://github.com/polkadot-js/dev/tree/master/packages/dev/scripts) that perform build steps - this means that each polkadot-js repo just calls into `@polkadot/dev` for [build](https://github.com/polkadot-js/phishing/blob/67ecbeef18332d4a0f7c37097707416457622440/package.json#L18), [linting](https://github.com/polkadot-js/phishing/blob/67ecbeef18332d4a0f7c37097707416457622440/package.json#L24), [publishing](https://github.com/polkadot-js/phishing/blob/67ecbeef18332d4a0f7c37097707416457622440/package.json#L20), etc.&#xD;&#xA; - There are a set of shared [dev dependencies](https://github.com/polkadot-js/dev/blob/08dffcc3808232fa8b508e49482d41f58fc3f9bd/packages/dev/package.json#L41) for all repos - this means that instead of managing versions for all of the above all-over, it is handled in a specific location and updates can be done seamlessly (obviously code-specific deps go into their normal places inside the repos)&#xD;&#xA; - Internally to this repo the [src/](https://github.com/polkadot-js/dev/tree/master/packages/dev/src) is never used anywhere - it is there to test the scripts/configs as changes are made. So when it builds itself correctly, it generally means it builds other polkadot-js repos correctly as well&#xD;&#xA;&#xD;&#xA;Overall it is not meant as a scaffold for anything external to polkadot-js, it purely is driven by the need for internal, [very opinionated &amp; very rigdit](https://github.com/polkadot-js/dev/blob/08dffcc3808232fa8b508e49482d41f58fc3f9bd/packages/dev/config/eslint.cjs#L70-L155), tooling for the polkadot-js repos itself. It was never meant as a cli-like tool ala react-create-scripts or something else." ContentLicense="CC BY-SA 4.0" />
  <row Id="13308" PostHistoryTypeId="2" PostId="3552" RevisionGUID="f9d1fe3e-85cd-4fd4-bae1-b938b1072b6a" CreationDate="2022-07-01T13:30:21.543" UserId="2102" Text="Yep, you need to implement the `Default` trait for your structure if you want to return anything in case the key is missing. I think this should work fine (not sure 100%):&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl&lt;AccountId&gt; Default for Voter&lt;AccountId&gt; {&#xD;&#xA;  fn default() -&gt; Self {&#xD;&#xA;    Self { votes: Default::default(), score: Default::default() }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can always set the `Default::default()` values for a different one in case you want to return something different, the votes can be initialized with some accounts and the score can be any number.&#xD;&#xA;&#xD;&#xA;Hope it helps.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13310" PostHistoryTypeId="2" PostId="3553" RevisionGUID="13da88e0-7fb3-45f5-8d6b-2a047678b54e" CreationDate="2022-07-01T14:02:47.687" UserId="2102" Text="You can simply use the `node-template` to develop any business logic and later on migrate your pallets to the `parachain-template`. As long as you work with the same version on both `templates`, moving pallets from one to another should be no problem.&#xD;&#xA;&#xD;&#xA;The same applies for node and runtime files, you can simply add your modifications to the `parachain-template` to make it work." ContentLicense="CC BY-SA 4.0" />
  <row Id="13312" PostHistoryTypeId="2" PostId="3554" RevisionGUID="c55a799e-c1c0-4efc-8863-81353dae2a0c" CreationDate="2022-07-01T14:24:06.853" UserId="2129" Text="To answer your comment around block-by-hash (there are no accoutn -&gt; tx mappings on the RPCs, as per the linked answers) -&#xD;&#xA;&#xD;&#xA;You can use the [getBlock](https://polkadot.js.org/docs/substrate/rpc#getblockhash-blockhash-signedblock) RPC call. Since you are using the JS API based on your example -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// retrieve the block by hash, API decodes extrinsics&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(&quot;0x...blockHash here...&quot;)&#xD;&#xA;&#xD;&#xA;// loop through extrinsics&#xD;&#xA;for (let i = 0; i &lt; signedBlock.block.extrinsics.length; i++) {&#xD;&#xA;  const x = signedBlock.block.extrinsics[i];&#xD;&#xA;&#xD;&#xA;  console.log(`&#xD;&#xA;    isSigned=${x.isSigned},&#xD;&#xA;    pallet=${x.method.section},&#xD;&#xA;    method=${x.method.method}&#xD;&#xA;  `)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13314" PostHistoryTypeId="5" PostId="3552" RevisionGUID="cd5b471b-7d3d-432c-9647-85f944c1d9f3" CreationDate="2022-07-01T14:34:10.987" UserId="2102" Comment="improved response" Text="If you want to use `ValueQuery` then yes, you need to implement the `Default` trait for your structure if you want to return anything in case the key is missing. I think this should work fine (not sure 100%):&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl&lt;AccountId&gt; Default for Voter&lt;AccountId&gt; {&#xD;&#xA;  fn default() -&gt; Self {&#xD;&#xA;    Self { votes: Default::default(), score: Default::default() }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can always set the `Default::default()` values for a different one in case you want to return something different, the votes can be initialized with some accounts and the score can be any number.&#xD;&#xA;&#xD;&#xA;If you omit `ValueQuery`, when interacting with you structure you will get `Option&lt;Voter&lt;AccountId&gt;&gt;`, which means, if you try to get some value from your `StorageMap` you will get either `Some(Voter)` or `None`. Using `ValueQuery` will always return a value, so you don't have to deal with unwrapping the `get` calls.&#xD;&#xA;&#xD;&#xA;Hope it helps.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13316" PostHistoryTypeId="5" PostId="1229" RevisionGUID="9fd6ec94-5096-4626-88eb-dca16ed9fc33" CreationDate="2022-07-01T17:15:24.607" UserId="34" Comment="added 47 characters in body" Text="Basically the same as what happened in [Ethereum's Shanghai Attacks](https://www.youtube.com/watch?v=nhr5nlMNvRQ). An &quot;attacker&quot; would submit a lot of transactions with the underestimated weights. They would effectively underpay the network for its work and the network would find it had more work to do than the time allowed. However, there's really no material difference here between attacking the network and using the network. The only difference is one of intention.&#xD;&#xA;&#xD;&#xA;For Relay chains like Polkadot, this is problematic in that it slows down block production and disenfranchises users transacting with accurate weights. Taken to the extreme, you'll end up with a degenerate network where blocks take many times as long to create as the nominal block period.&#xD;&#xA;&#xD;&#xA;For parachains this is far worse: parachains work within a much more stringent timing requirements, needing to prepare, author, submit and have verified their blocks in a limited period. The consequence of substantial underestimation of weights could result in the chain stalling completely. (Asynchronous Backing, a major parachain optimization feature will likely help with this, but won't alleviate it completely.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13317" PostHistoryTypeId="2" PostId="3555" RevisionGUID="ca614896-d56f-4cdb-8794-97d18d33f692" CreationDate="2022-07-01T17:42:18.290" UserId="34" Text="https://decoded.polkadot.network/ 2022 had a lot of great speakers to talk about many things relevant to Substrate and Polkadot builders, users, and enthusiasts. It was hosted on the [hopin](https://app.hopin.com/events/polkadot-decoded-2022/reception) platform and we were assured that it would be publicly available for everyone after-the-fact to view." ContentLicense="CC BY-SA 4.0" />
  <row Id="13319" PostHistoryTypeId="1" PostId="3555" RevisionGUID="ca614896-d56f-4cdb-8794-97d18d33f692" CreationDate="2022-07-01T17:42:18.290" UserId="34" Text="Where can I find the videos and materials from Polkadot Decoded 2022?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13320" PostHistoryTypeId="3" PostId="3555" RevisionGUID="ca614896-d56f-4cdb-8794-97d18d33f692" CreationDate="2022-07-01T17:42:18.290" UserId="34" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13321" PostHistoryTypeId="2" PostId="3556" RevisionGUID="a8228ba0-fcb7-4e23-b6f7-2fd54e0eef47" CreationDate="2022-07-01T17:42:18.290" UserId="34" Text="More will be added over time, but here are a few to start (I will update the answer here as I know of more)&#xD;&#xA;&#xD;&#xA;- [Björn Wagner kickoff](https://www.youtube.com/watch?v=7r_ScrX9Ra4)&#xD;&#xA;- [Official Polkadot YouTube playlist](https://www.youtube.com/playlist?list=PLOyWqupZ-WGvcE0HKKnORiFqWNv5onxCf)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13328" PostHistoryTypeId="52" PostId="3549" RevisionGUID="1f751363-4a07-4eb0-a1b8-2d27d99b9fa1" CreationDate="2022-07-01T20:24:53.323" />
  <row Id="13331" PostHistoryTypeId="2" PostId="3558" RevisionGUID="c0602dba-e6a8-437e-b457-937f38c2600d" CreationDate="2022-07-02T08:20:55.947" UserId="2011" Text="I have a local-rococo setup between parachain `3015` (sender) and parachain `2000` (recipient). I was able to send `hrmpInitOpenChannel` successfully to the recipient, then `hrmpAcceptOpenChannel`&#xD;&#xA;&#xD;&#xA;The recipient parachain happily accepts the `hrmpAcceptOpenChannel` request, but sender parachain fails right after the `HrmpChannelAccepted` event with `Unimplemented error`.&#xD;&#xA;&#xD;&#xA;The log trace snippet below is telling part of the story, I appreciate if there is any pointers here on where would be the next place to look.&#xD;&#xA;&#xD;&#xA;```2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::weight: FixedWeightBounds message: Xcm([HrmpChannelAccepted { recipient: 2000 }])    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowUnpaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;&#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute: origin: Some(MultiLocation { parents: 1, interior: Here }), total_surplus/refunded: 0/0, error_handler_weight: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 0, xcm_error: Unimplemented, weight: 0 })    &#xD;&#xA;2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: Execution errored at 0: Unimplemented (original_origin: MultiLocation { parents: 1, interior: Here })```   " ContentLicense="CC BY-SA 4.0" />
  <row Id="13333" PostHistoryTypeId="1" PostId="3558" RevisionGUID="c0602dba-e6a8-437e-b457-937f38c2600d" CreationDate="2022-07-02T08:20:55.947" UserId="2011" Text="Attempting to establish hrmp channels on rococo-local reports `Execution errored at 0: Unimplemented`" ContentLicense="CC BY-SA 4.0" />
  <row Id="13334" PostHistoryTypeId="3" PostId="3558" RevisionGUID="c0602dba-e6a8-437e-b457-937f38c2600d" CreationDate="2022-07-02T08:20:55.947" UserId="2011" Text="|xcm|rococo-local|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13335" PostHistoryTypeId="5" PostId="3558" RevisionGUID="a6ed6d1a-2377-4300-ab3b-42a5b26eaa6c" CreationDate="2022-07-02T08:26:43.207" UserId="2011" Comment="added 7 characters in body" Text="I have a local-rococo setup between parachain `3015` (sender) and parachain `2000` (recipient). I was able to send `hrmpInitOpenChannel` successfully to the recipient, followed by `hrmpAcceptOpenChannel`&#xD;&#xA;&#xD;&#xA;The recipient parachain happily accepts the `hrmpAcceptOpenChannel` request, but sender parachain fails right after the `HrmpChannelAccepted` event with `Unimplemented error`.&#xD;&#xA;&#xD;&#xA;The log trace snippet below is telling part of the story, I appreciate if there is any pointers here on where would be the next place to look.&#xD;&#xA;&#xD;&#xA;```2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::weight: FixedWeightBounds message: Xcm([HrmpChannelAccepted { recipient: 2000 }])    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowUnpaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;&#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute: origin: Some(MultiLocation { parents: 1, interior: Here }), total_surplus/refunded: 0/0, error_handler_weight: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 0, xcm_error: Unimplemented, weight: 0 })    &#xD;&#xA;2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: Execution errored at 0: Unimplemented (original_origin: MultiLocation { parents: 1, interior: Here })```   " ContentLicense="CC BY-SA 4.0" />
  <row Id="13336" PostHistoryTypeId="2" PostId="3559" RevisionGUID="9bb77f4c-28fa-4903-9751-34258005ec79" CreationDate="2022-07-02T08:38:56.017" UserId="2319" Text="amit@amit-Swift-SF315-41:~/Substrate/New/substrate-node-template$ cargo check -p node-template-runtime&#xD;&#xA;    Blocking waiting for file lock on package cache&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;error: failed to get `pallet-contracts` as a dependency of package `node-template-runtime v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load source for dependency `pallet-contracts`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech/substrate.git?tag=latest&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to find tag `latest`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  reference 'refs/remotes/origin/tags/latest' not found; class=Reference (4); code=NotFound (-3)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13338" PostHistoryTypeId="1" PostId="3559" RevisionGUID="9bb77f4c-28fa-4903-9751-34258005ec79" CreationDate="2022-07-02T08:38:56.017" UserId="2319" Text="add Contract pallet error" ContentLicense="CC BY-SA 4.0" />
  <row Id="13339" PostHistoryTypeId="3" PostId="3559" RevisionGUID="9bb77f4c-28fa-4903-9751-34258005ec79" CreationDate="2022-07-02T08:38:56.017" UserId="2319" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13340" PostHistoryTypeId="5" PostId="3559" RevisionGUID="3055645f-9a9d-4ce9-8e50-70063e3a39b3" CreationDate="2022-07-02T08:41:06.543" UserId="2319" Comment="added 124 characters in body" Text="&quot;https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/&quot;&#xD;&#xA;i have followed above link and get this error&#xD;&#xA;&#xD;&#xA;amit@amit-Swift-SF315-41:~/Substrate/New/substrate-node-template$ cargo check -p node-template-runtime&#xD;&#xA;    Blocking waiting for file lock on package cache&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;error: failed to get `pallet-contracts` as a dependency of package `node-template-runtime v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load source for dependency `pallet-contracts`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech/substrate.git?tag=latest&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to find tag `latest`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  reference 'refs/remotes/origin/tags/latest' not found; class=Reference (4); code=NotFound (-3)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13341" PostHistoryTypeId="2" PostId="3560" RevisionGUID="85c3fcae-6afa-40ac-8491-afefe2062caf" CreationDate="2022-07-02T08:52:02.470" UserId="2777" Text="How to upgrade substrate polkadot-v0.9.20 to v0.9.24?&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13343" PostHistoryTypeId="1" PostId="3560" RevisionGUID="85c3fcae-6afa-40ac-8491-afefe2062caf" CreationDate="2022-07-02T08:52:02.470" UserId="2777" Text="How to upgrade substrate polkadot-v0.9.20 version to polkadot-v0.9.24?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13344" PostHistoryTypeId="3" PostId="3560" RevisionGUID="85c3fcae-6afa-40ac-8491-afefe2062caf" CreationDate="2022-07-02T08:52:02.470" UserId="2777" Text="|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13345" PostHistoryTypeId="2" PostId="3561" RevisionGUID="d97bc3af-a260-4aa4-a40f-07c8e58004e2" CreationDate="2022-07-02T09:49:52.717" UserId="2565" Text="The version of your pallet contracts dependencies are wrong (I am assuming you are using the current substrate-node-template).&#xD;&#xA;&#xD;&#xA;Below are the needed dependencies:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-contracts = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.23&quot;, default-features = false }&#xD;&#xA;pallet-contracts-primitives = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.23&quot;, default-features = false }&#xD;&#xA;pallet-contracts-rpc-runtime-api = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.23&quot;, default-features = false }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have a detailed blog on this: http://tinyurl.com/yckd2axc" ContentLicense="CC BY-SA 4.0" />
  <row Id="13347" PostHistoryTypeId="2" PostId="3562" RevisionGUID="d34233f4-7b14-4463-817f-932f592b4461" CreationDate="2022-07-02T09:57:20.253" UserId="2565" Text="1. Imported the Abi (smart contract Json metadata, as shown in the image below of contract.tx console log)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;2. But when I call the methods using contract.tx.symbol (I have an error, as shown in the image below)&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;How can I call my events/messages/methods in my smart contract if it doesn't accept the metadata provided?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/jnmV2.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/xTbw5.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13349" PostHistoryTypeId="1" PostId="3562" RevisionGUID="d34233f4-7b14-4463-817f-932f592b4461" CreationDate="2022-07-02T09:57:20.253" UserId="2565" Text="How can I call the events of my smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13350" PostHistoryTypeId="3" PostId="3562" RevisionGUID="d34233f4-7b14-4463-817f-932f592b4461" CreationDate="2022-07-02T09:57:20.253" UserId="2565" Text="|polkadot-js|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13351" PostHistoryTypeId="2" PostId="3563" RevisionGUID="53cd972f-81a2-4610-8f85-6b3afea61614" CreationDate="2022-07-02T12:38:14.893" UserId="620" Text="From the logs and your comment, it looks like you are sending `hrmpInitOpenChannel` and `hrmpAcceptOpenChannel` to the other parachain? You actually want to send these to the _Relay Chain_. If that doesn't work, please post the exact calls you made and I'll take another look." ContentLicense="CC BY-SA 4.0" />
  <row Id="13353" PostHistoryTypeId="2" PostId="3564" RevisionGUID="b1891722-0ad8-4631-a800-05b8417f118c" CreationDate="2022-07-02T13:04:16.123" UserId="2833" Text="is it a new approach to add the custom types to the substrate-front-end-template ?&#xD;&#xA;the ones I found in past examples of Kitties seem don't work any more.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13355" PostHistoryTypeId="1" PostId="3564" RevisionGUID="b1891722-0ad8-4631-a800-05b8417f118c" CreationDate="2022-07-02T13:04:16.123" UserId="2833" Text="Add custom type to the substrate-front-end-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="13356" PostHistoryTypeId="3" PostId="3564" RevisionGUID="b1891722-0ad8-4631-a800-05b8417f118c" CreationDate="2022-07-02T13:04:16.123" UserId="2833" Text="|substrate-front-end|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13357" PostHistoryTypeId="5" PostId="3564" RevisionGUID="443e9ba2-bd3d-4a00-8b56-2e8541fb69d5" CreationDate="2022-07-02T13:08:26.427" UserId="2833" Comment="added 75 characters in body" Text="is it a new approach to add the custom types to the substrate-front-end-template ?&#xD;&#xA;the ones I found in past examples of Kitties seem don't work any more.&#xD;&#xA;I try add them to the PolkadotJS and to the config folder into JSON files&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13358" PostHistoryTypeId="5" PostId="3564" RevisionGUID="64b05f1b-b88e-4ce7-9dbc-4c1692d1ebb3" CreationDate="2022-07-02T13:09:04.493" UserId="2833" Comment="added 3 characters in body" Text="is it a new approach to add the custom types to the substrate-front-end-template ?&#xD;&#xA;the ones I found in past examples of Kitties seem don't work any more.&#xD;&#xA;I try adding them to the PolkadotJS and to the config folder into JSON files&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13359" PostHistoryTypeId="2" PostId="3565" RevisionGUID="ac92c69e-bfde-4fa8-bf28-aa8d79120961" CreationDate="2022-07-02T13:38:52.047" UserId="266" Text="I'm trying to build Polkadot as a relay chain for a tutorial but compiling one of its dependencies fails! I may be missing some tools. Could you help?&#xD;&#xA;Platform: MacOS (Intel)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Compiling prost-build v0.10.4&#xD;&#xA;error: failed to run custom build command for `prost-build v0.10.4`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `&lt;redacted_path&gt;/polkadot/target/release/build/prost-build-c6015cab4894bbe1/build-script-build` (exit status: 101)&#xD;&#xA;  --- stdout&#xD;&#xA;  cargo:rerun-if-changed=&lt;redacted_path&gt;/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.10.4/third-party/protobuf/cmake&#xD;&#xA;  CMAKE_TOOLCHAIN_FILE_x86_64-apple-darwin = None&#xD;&#xA;  CMAKE_TOOLCHAIN_FILE_x86_64_apple_darwin = None&#xD;&#xA;  HOST_CMAKE_TOOLCHAIN_FILE = None&#xD;&#xA;  CMAKE_TOOLCHAIN_FILE = None&#xD;&#xA;  CMAKE_GENERATOR_x86_64-apple-darwin = None&#xD;&#xA;  CMAKE_GENERATOR_x86_64_apple_darwin = None&#xD;&#xA;  HOST_CMAKE_GENERATOR = None&#xD;&#xA;  CMAKE_GENERATOR = None&#xD;&#xA;  CMAKE_PREFIX_PATH_x86_64-apple-darwin = None&#xD;&#xA;  CMAKE_PREFIX_PATH_x86_64_apple_darwin = None&#xD;&#xA;  HOST_CMAKE_PREFIX_PATH = None&#xD;&#xA;  CMAKE_PREFIX_PATH = None&#xD;&#xA;  CMAKE_x86_64-apple-darwin = None&#xD;&#xA;  CMAKE_x86_64_apple_darwin = None&#xD;&#xA;  HOST_CMAKE = None&#xD;&#xA;  CMAKE = None&#xD;&#xA;  running: &quot;cmake&quot; &quot;&lt;redacted_path&gt;/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.10.4/third-party/protobuf/cmake&quot; &quot;-Dprotobuf_BUILD_TESTS=OFF&quot; &quot;-DCMAKE_INSTALL_PREFIX=&lt;redacted_path&gt;/polkadot/target/release/build/prost-build-330684d335a6d019/out&quot; &quot;-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64&quot; &quot;-DCMAKE_C_COMPILER=/usr/bin/cc&quot; &quot;-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64&quot; &quot;-DCMAKE_CXX_COMPILER=/usr/bin/c++&quot; &quot;-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64&quot; &quot;-DCMAKE_ASM_COMPILER=/usr/bin/cc&quot; &quot;-DCMAKE_BUILD_TYPE=Debug&quot;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  thread 'main' panicked at '&#xD;&#xA;  failed to execute command: No such file or directory (os error 2)&#xD;&#xA;  is `cmake` not installed?&#xD;&#xA;&#xD;&#xA;  build script failed, must exit now', &lt;redacted_path&gt;/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have previously built the `substrate-node-template` project successfully.&#xD;&#xA;From the error it looks like I have no `cmake` installed but I have installed the Apple's developers tools and in general I've used this machine for development, including compiling generic Rust code.&#xD;&#xA;&#xD;&#xA;Any clues? Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="13361" PostHistoryTypeId="1" PostId="3565" RevisionGUID="ac92c69e-bfde-4fa8-bf28-aa8d79120961" CreationDate="2022-07-02T13:38:52.047" UserId="266" Text="Bulding polkadot (release-v0.9.24) fails while compiling a dependency (prost-build v0.10.4)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13362" PostHistoryTypeId="3" PostId="3565" RevisionGUID="ac92c69e-bfde-4fa8-bf28-aa8d79120961" CreationDate="2022-07-02T13:38:52.047" UserId="266" Text="|polkadot|relay-chain|build|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13363" PostHistoryTypeId="2" PostId="3566" RevisionGUID="578940b6-a25a-48b0-a285-9f708498f1f9" CreationDate="2022-07-02T15:23:37.443" UserId="2834" Text="There are unit tests in Polkadot and Kusama runtimes that fail if the `core::mem::size_of&lt;Call&gt;` is greater than 230 bytes. [Kusama](https://github.com/paritytech/polkadot/blob/067c8a2847c841644d41d2df7c1cb137fdc8b014/runtime/kusama/src/tests.rs#L177), [Polkadot](https://github.com/paritytech/polkadot/blob/067c8a2847c841644d41d2df7c1cb137fdc8b014/runtime/polkadot/src/lib.rs#L2174), [Substrate](https://github.com/paritytech/substrate/blob/279593d87f103fa5e10c9751a97b1584f3ad79d6/bin/node/runtime/src/lib.rs#L2155).&#xD;&#xA;&#xD;&#xA;What exactly is this size of and how was the limit chosen? More importantly is there any risk in it being too large? In our Joystream runtime the size of Call is reaching 350 Bytes.&#xD;&#xA;&#xD;&#xA;The test does suggest using `Box` to reduce the size but its not clear how to do this.&#xD;&#xA;&#xD;&#xA;Any advise would be appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="13365" PostHistoryTypeId="1" PostId="3566" RevisionGUID="578940b6-a25a-48b0-a285-9f708498f1f9" CreationDate="2022-07-02T15:23:37.443" UserId="2834" Text="What should be the maximum size of Call for a runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="13366" PostHistoryTypeId="3" PostId="3566" RevisionGUID="578940b6-a25a-48b0-a285-9f708498f1f9" CreationDate="2022-07-02T15:23:37.443" UserId="2834" Text="|runtime|call|limit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13367" PostHistoryTypeId="2" PostId="3567" RevisionGUID="7bc5e623-2bbb-4997-94ff-405501377cb2" CreationDate="2022-07-02T15:27:55.240" UserId="266" Text="Probably the most frictionless way to fix this is by installing `cmake`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Alternatively, provide a pre-built `protoc` to the build process.&#xD;&#xA;&#xD;&#xA;More context about [prost](https://github.com/tokio-rs/prost):&#xD;&#xA;&gt; PROST! a Protocol Buffers implementation for the Rust Language&#xD;&#xA;&#xD;&#xA;Specifically,&#xD;&#xA;&gt; prost-build makes it easy to generate Rust code from .proto files as part of a Cargo build&#xD;&#xA;&#xD;&#xA;To compile [prost-build](https://github.com/tokio-rs/prost/tree/master/prost-build) you can either provide `cmake` or precompiled `protoc`. Luckily, the prost-build Readme links to the [installation instructions of `protoc`](https://github.com/protocolbuffers/protobuf#protocol-compiler-installation) where you can find a pre-build binary for your system.&#xD;&#xA;&#xD;&#xA;Using this binary with an environment variable lets cargo build the dependency (`prost-build`) without having to also build `protoc`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`PROTOC=/path/to/protoc cargo build --release`" ContentLicense="CC BY-SA 4.0" />
  <row Id="13369" PostHistoryTypeId="5" PostId="3558" RevisionGUID="86e1e7df-314e-4ae3-904f-b1b34af7bfd8" CreationDate="2022-07-02T16:23:49.220" UserId="2011" Comment="added 191 characters in body" Text="I have a local-rococo setup between parachain `3015` (sender) and parachain `2000` (recipient). I was able to send `hrmpInitOpenChannel` successfully to the recipient, followed by `hrmpAcceptOpenChannel`&#xD;&#xA;&#xD;&#xA;The recipient parachain happily accepts the `hrmpAcceptOpenChannel` request, but sender parachain fails right after the `HrmpChannelAccepted` event with `Unimplemented error`.&#xD;&#xA;&#xD;&#xA;The log trace snippet below is telling part of the story, I appreciate if there is any pointers here on where would be the next place to look.&#xD;&#xA;&#xD;&#xA;```2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::weight: FixedWeightBounds message: Xcm([HrmpChannelAccepted { recipient: 2000 }])    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowUnpaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;&#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute: origin: Some(MultiLocation { parents: 1, interior: Here }), total_surplus/refunded: 0/0, error_handler_weight: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 0, xcm_error: Unimplemented, weight: 0 })    &#xD;&#xA;2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: Execution errored at 0: Unimplemented (original_origin: MultiLocation { parents: 1, interior: Here })``` &#xD;&#xA;&#xD;&#xA;Here is some more detailed context:&#xD;&#xA;&#xD;&#xA;A hrmpInitOpenChannel instantiated on the sender (3015)&#xD;&#xA;&#xD;&#xA;[![hrmpInitOpenChannel request snippet][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DSfoL.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13370" PostHistoryTypeId="5" PostId="3558" RevisionGUID="2b4ac54a-c85c-4652-81e2-50ad667a19cf" CreationDate="2022-07-02T16:36:51.380" UserId="2011" Comment="added 191 characters in body" Text="I have a local-rococo setup between parachain `3015` (sender) and parachain `2000` (recipient). I was able to send `hrmpInitOpenChannel` successfully to the recipient, followed by `hrmpAcceptOpenChannel`&#xD;&#xA;&#xD;&#xA;The recipient parachain happily accepts the `hrmpAcceptOpenChannel` request, but sender parachain fails right after the `HrmpChannelAccepted` event with `Unimplemented error`.&#xD;&#xA;&#xD;&#xA;The log trace snippet below is telling part of the story, I appreciate if there is any pointers here on where would be the next place to look.&#xD;&#xA;&#xD;&#xA;```2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::weight: FixedWeightBounds message: Xcm([HrmpChannelAccepted { recipient: 2000 }])    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowUnpaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;&#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute: origin: Some(MultiLocation { parents: 1, interior: Here }), total_surplus/refunded: 0/0, error_handler_weight: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 0, xcm_error: Unimplemented, weight: 0 })    &#xD;&#xA;2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: Execution errored at 0: Unimplemented (original_origin: MultiLocation { parents: 1, interior: Here })&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;For more context: the first step is to submit `polkadotXcm.send` rococo encoded `hrmpInitOpenChannel` intrinsic via the sender (3015) which in turn submits upward message to rococo&#xD;&#xA;&#xD;&#xA;[![hrmpInitOpenChannel request snippet][1]][1]&#xD;&#xA;&#xD;&#xA;Checking `hrmpOpenChannelRequestCount`, appears to have executed as expected, there is 1 open request for 3015. &#xD;&#xA;&#xD;&#xA;[![open channels count][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DSfoL.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/aLxEv.png&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13371" PostHistoryTypeId="5" PostId="3558" RevisionGUID="6a7d062e-5c3f-4db5-b478-1c136a22b537" CreationDate="2022-07-02T16:47:18.973" UserId="2011" Comment="added 191 characters in body" Text="I have a local-rococo setup between parachain `3015` (sender) and parachain `2000` (recipient). I was able to send `hrmpInitOpenChannel` successfully to the recipient, followed by `hrmpAcceptOpenChannel`&#xD;&#xA;&#xD;&#xA;The recipient parachain happily accepts the `hrmpAcceptOpenChannel` request, but sender parachain fails right after the `HrmpChannelAccepted` event with `Unimplemented error`.&#xD;&#xA;&#xD;&#xA;The log trace snippet below is telling part of the story, I appreciate it if there are any pointers here on where would be the next place to look.&#xD;&#xA;&#xD;&#xA;```2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::weight: FixedWeightBounds message: Xcm([HrmpChannelAccepted { recipient: 2000 }])    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowUnpaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;&#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute: origin: Some(MultiLocation { parents: 1, interior: Here }), total_surplus/refunded: 0/0, error_handler_weight: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 0, xcm_error: Unimplemented, weight: 0 })    &#xD;&#xA;2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: Execution errored at 0: Unimplemented (original_origin: MultiLocation { parents: 1, interior: Here })&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;For more context: the first step is to submit `polkadotXcm.send` rococo encoded `hrmpInitOpenChannel` extrinsic via the sender (3015) which in turn submits message upward to rococo&#xD;&#xA;&#xD;&#xA;[![hrmpInitOpenChannel request snippet][1]][1]&#xD;&#xA;&#xD;&#xA;Checking `hrmpOpenChannelRequestCount`, appears to have executed as expected, there is 1 open request for 3015. &#xD;&#xA;&#xD;&#xA;[![open channels count][2]][2]&#xD;&#xA;&#xD;&#xA;In the second step to perform accept, the encoded `hrmpAcceptOpenChannel` extrinsic is submitted via the recipient (2000) is executed successfully on Rococo as seen from the snippet below: &#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Here is the [script](https://gist.github.com/mohamedelshami/37a97a75f1b778de2d129b2a5b61e2f0) I use to perform the above operations.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DSfoL.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/aLxEv.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/pwa8x.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13372" PostHistoryTypeId="5" PostId="3558" RevisionGUID="0028826c-9463-4c4a-ad03-dbde008df4ea" CreationDate="2022-07-02T17:27:37.527" UserId="2011" Comment="added 30 characters in body" Text="I have a local-rococo setup between parachain `3015` (sender) and parachain `2000` (recipient). I was able to send `hrmpInitOpenChannel` successfully to the recipient, followed by `hrmpAcceptOpenChannel`&#xD;&#xA;&#xD;&#xA;The recipient parachain happily accepts the `hrmpAcceptOpenChannel` request, but sender parachain fails right after the `HrmpChannelAccepted` event with `Unimplemented error`.&#xD;&#xA;&#xD;&#xA;The log trace snippet below is telling part of the story, I appreciate it if there are any pointers here on where would be the next place to look.&#xD;&#xA;&#xD;&#xA;```2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), weight_limit: 500000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::weight: FixedWeightBounds message: Xcm([HrmpChannelAccepted { recipient: 2000 }])    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::barriers: AllowUnpaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([HrmpChannelAccepted { recipient: 2000 }]), max_weight: 1000000000, weight_credit: 0    &#xD;&#xA;&#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute: origin: Some(MultiLocation { parents: 1, interior: Here }), total_surplus/refunded: 0/0, error_handler_weight: 0    &#xD;&#xA;2022-07-01 19:40:00.027 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 0, xcm_error: Unimplemented, weight: 0 })    &#xD;&#xA;2022-07-01 19:40:00.027 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: Execution errored at 0: Unimplemented (original_origin: MultiLocation { parents: 1, interior: Here })&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;For more context: the first step is to submit `polkadotXcm.send` Rococo encoded `hrmpInitOpenChannel` extrinsic via the sender (3015) which in turn submits an upward message to Rococo&#xD;&#xA;&#xD;&#xA;[![hrmpInitOpenChannel request snippet][1]][1]&#xD;&#xA;&#xD;&#xA;Checking `hrmpOpenChannelRequestCount`, appears to have executed as expected, there is 1 open request for 3015. &#xD;&#xA;&#xD;&#xA;[![open channels count][2]][2]&#xD;&#xA;&#xD;&#xA;In the second step to accept the request, the encoded `hrmpAcceptOpenChannel` extrinsic is submitted via the recipient (2000) -- and it appears to have executed successfully on Rococo as seen from the snippet below: &#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Here is the [script](https://gist.github.com/mohamedelshami/37a97a75f1b778de2d129b2a5b61e2f0) I use to perform the above operations.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DSfoL.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/aLxEv.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/pwa8x.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13373" PostHistoryTypeId="2" PostId="3568" RevisionGUID="dcda739a-f6e5-4ae4-b13d-ceb4fe2de3cc" CreationDate="2022-07-02T19:32:14.780" UserId="2835" Text="I have followed the [tutorial](https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/) and have reached the step where parachain is now producing and finalising block with a local relay chain. Transactions on chain and DMP (teleport asset) all works well. I used the recent v0.9.24 parachain [template](https://github.com/substrate-developer-hub/substrate-parachain-template/tree/polkadot-v0.9.24).&#xD;&#xA;&#xD;&#xA;I then follow the tutorial and [added the contract-pallet](https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/) (following the impl in the node and runtime on the [v0.9.24](https://github.com/paritytech/substrate/tree/polkadot-v0.9.24/bin/node/runtime) branch, whilst blocks are still being produced on the parachain and being finalised, simple extrinsics such as transfer are now &quot;stuck&quot; in tx pool in the node, i.e. it is just in the pending extrinsic section of the UI, until the the signature dies after mortal period. &#xD;&#xA;&#xD;&#xA;Any info would be much appreciated, thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="13375" PostHistoryTypeId="1" PostId="3568" RevisionGUID="dcda739a-f6e5-4ae4-b13d-ceb4fe2de3cc" CreationDate="2022-07-02T19:32:14.780" UserId="2835" Text="Pending Extrinsic not executed on block producing parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="13376" PostHistoryTypeId="3" PostId="3568" RevisionGUID="dcda739a-f6e5-4ae4-b13d-ceb4fe2de3cc" CreationDate="2022-07-02T19:32:14.780" UserId="2835" Text="|substrate-node|parachain|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13378" PostHistoryTypeId="52" PostId="3565" RevisionGUID="26f53cb4-8077-4d3e-8d14-70d08dc7ba6a" CreationDate="2022-07-02T21:39:41.253" />
  <row Id="13379" PostHistoryTypeId="34" PostId="3379" RevisionGUID="d200289c-99dd-4c55-b14a-24bcba220bfd" CreationDate="2022-07-02T23:00:55.153" UserId="-1" Comment="10" />
  <row Id="13384" PostHistoryTypeId="2" PostId="3570" RevisionGUID="65c259ed-1504-434a-8514-ba22e05ef159" CreationDate="2022-07-03T03:09:42.793" UserId="2777" Text="I found the problem is substrate. Substrate version v9.20 has problem, so can not peer-id or product block or finalize block.&#xD;&#xA;&#xD;&#xA;After I upgrade to v9.24, this issuse was gone.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/jqW62.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13386" PostHistoryTypeId="2" PostId="3571" RevisionGUID="81ddfc5f-d13b-463d-bf04-39be896fde95" CreationDate="2022-07-03T05:14:48.907" UserId="2384" Text="First thing that came to my mind is doing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// How much is exactly one unit in your node?&#xD;&#xA;const UNIT: u32 = 10_000_000;&#xD;&#xA;&#xD;&#xA;#[pallet::weight(UNIT.into())]&#xD;&#xA;fn call_one(..) -&gt; _ {}&#xD;&#xA;&#xD;&#xA;#[pallet::weight(UNIT.into())]&#xD;&#xA;fn call_two(..) -&gt; {}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Another one is to have a seperate weight file and define weight there:&#xD;&#xA;&#xD;&#xA;_**weights.rs**_&#xD;&#xA;```rust&#xD;&#xA;use frame_support::{traits::Get, weights::Weight};&#xD;&#xA;use sp_std::marker::PhantomData;&#xD;&#xA;&#xD;&#xA;pub trait WeightInfo {&#xD;&#xA;	fn common_weight() -&gt; Weight;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct PalletWeightInfo&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;T: frame_system::Config&gt; WeightInfo for PalletWeightInfo&lt;T&gt;{&#xD;&#xA;	fn set_airdrop_server_account() -&gt; Weight {&#xD;&#xA;		ONE_UNIT as Weight&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In config:&#xD;&#xA;```rust&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;   /// -- other configs&#xD;&#xA;   PalletWeightInfo: WeightInfo,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In extrinsic call&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(T::PalletWeightInfo::common_weight())]&#xD;&#xA;fn call_one(..) -&gt; _ {}&#xD;&#xA;&#xD;&#xA;#[pallet::weight(T::PalletWeightInfo::common_weight())]&#xD;&#xA;fn call_two(..) -&gt; _ {}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you want that pallet to use constant fee in all extrinsic but also be configured from runtime, you can add `weight` field in `Config` as well.&#xD;&#xA;&#xD;&#xA;But depending on usage, it is very unlikely that it requires same weight for different calls since weight are measure of resource consumed by given extrinsic. Nevertheless, you are free to do so but make sure it is absolute desired and planned." ContentLicense="CC BY-SA 4.0" />
  <row Id="13388" PostHistoryTypeId="2" PostId="3572" RevisionGUID="38e00343-0435-43e7-bb8d-d14bab947f42" CreationDate="2022-07-03T05:15:34.513" UserId="299" Text="this is the normal log:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;When I upgraded to version 22, the log was missing the tags:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;and there is no problem with the code for `sc_tracing`:&#xD;&#xA;```&#xD;&#xA;/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.&#xD;&#xA;///&#xD;&#xA;/// This is the actual implementation that is abstract over the executor and the runtime api.&#xD;&#xA;#[sc_tracing::logging::prefix_logs_with(&quot;Parachain&quot;)]&#xD;&#xA;async fn start_node_impl&lt;RuntimeApi, Executor, RB, BIQ, BIC&gt;(&#xD;&#xA;    parachain_config: Configuration,&#xD;&#xA;    polkadot_config: Configuration,&#xD;&#xA;    collator_options: CollatorOptions,&#xD;&#xA;    id: ParaId,&#xD;&#xA;    _rpc_ext_builder: RB,&#xD;&#xA;    build_import_queue: BIQ,&#xD;&#xA;    build_consensus: BIC,&#xD;&#xA;    hwbench: Option&lt;sc_sysinfo::HwBench&gt;,&#xD;&#xA;) -&gt; sc_service::error::Result&lt;(&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8queP.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/27L7w.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13390" PostHistoryTypeId="1" PostId="3572" RevisionGUID="38e00343-0435-43e7-bb8d-d14bab947f42" CreationDate="2022-07-03T05:15:34.513" UserId="299" Text="The log no longer has Parachan and RelayChain tags" ContentLicense="CC BY-SA 4.0" />
  <row Id="13391" PostHistoryTypeId="3" PostId="3572" RevisionGUID="38e00343-0435-43e7-bb8d-d14bab947f42" CreationDate="2022-07-03T05:15:34.513" UserId="299" Text="|log|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13392" PostHistoryTypeId="5" PostId="3568" RevisionGUID="6dd0f335-41f8-435e-ba11-baa4aea07ec9" CreationDate="2022-07-03T06:11:07.623" UserId="2835" Comment="added 542 characters in body" Text="I have followed the [tutorial](https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/) and have reached the step where parachain is now producing and finalising block with a local relay chain. Transactions on chain and DMP (teleport asset) all works well. I used the recent v0.9.24 parachain [template](https://github.com/substrate-developer-hub/substrate-parachain-template/tree/polkadot-v0.9.24).&#xD;&#xA;&#xD;&#xA;I then follow the tutorial and [added the contract-pallet](https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/) (following the impl in the node and runtime on the [v0.9.24](https://github.com/paritytech/substrate/tree/polkadot-v0.9.24/bin/node/runtime) branch, whilst blocks are still being produced on the parachain and being finalised, simple extrinsics such as transfer are now &quot;stuck&quot; in tx pool in the node, i.e. it is just in the pending extrinsic section of the UI, until the the signature dies after mortal period. &#xD;&#xA;&#xD;&#xA;Any info would be much appreciated, thanks!&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Update: &#xD;&#xA;I have logged the trace and I am getting &#xD;&#xA;```&#xD;&#xA;2022-07-03 11:42:00.152 DEBUG tokio-runtime-worker txpool: [Parachain] [0x84d762e40aa5d13c850d8784b6d2a9432a02322d31248ddf8ad8ada5f311c677] Reported as invalid. Will skip sub-chains while iterating.&#xD;&#xA;2022-07-03 11:42:00.152 DEBUG tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] Block seems full, but will try 7 more transactions before quitting.&#xD;&#xA;```&#xD;&#xA;Perhaps I need up increase block size? I don't understand why this would be the case though. Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="13393" PostHistoryTypeId="2" PostId="3573" RevisionGUID="fc4cc844-f674-4d5e-93e8-004bc79908b8" CreationDate="2022-07-03T10:38:36.410" UserId="555" Text="This will fix by just installing c-make." ContentLicense="CC BY-SA 4.0" />
  <row Id="13395" PostHistoryTypeId="2" PostId="3574" RevisionGUID="d0f5e51c-d461-4aa0-8840-b8998c7ed5e4" CreationDate="2022-07-03T10:56:37.650" UserId="627" Text="On Substrate the [transaction hashes are not unique](https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics) and there is no RPC that actually provides an index of this non-unique identifier. There are a couple of existing questions answered on this, see [this](https://substrate.stackexchange.com/questions/2760/get-transaction-by-hash), [this](https://substrate.stackexchange.com/questions/1393/getting-extrinsic-data-with-the-transaction-hash) and [this](https://substrate.stackexchange.com/questions/626/to-get-the-extrinsic-data-from-the-extrinsic-hash).&#xD;&#xA;&#xD;&#xA;If you wish to see if something is finalized, one approach would be to &#xD;&#xA;&#xD;&#xA; - subscribe to the [finalized headers](https://polkadot.js.org/docs/substrate/rpc#subscribefinalizedheads-header), &#xD;&#xA; - [retrieve the&#xD;&#xA;   block](https://polkadot.js.org/docs/substrate/rpc#getblockhash-blockhash-signedblock)&#xD;&#xA;   and &#xD;&#xA; - check for the extrinsic you are after in the block" ContentLicense="CC BY-SA 4.0" />
  <row Id="13397" PostHistoryTypeId="5" PostId="3571" RevisionGUID="d9526baa-7510-462b-b85d-01a54b3e1491" CreationDate="2022-07-03T11:25:29.033" UserId="2384" Comment="added 408 characters in body" Text="## Manually specifying fee&#xD;&#xA;First thing that came to my mind is doing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// How much is exactly one unit in your node?&#xD;&#xA;const UNIT: u32 = 10_000_000;&#xD;&#xA;&#xD;&#xA;#[pallet::weight(UNIT.into())]&#xD;&#xA;fn call_one(..) -&gt; _ {}&#xD;&#xA;&#xD;&#xA;#[pallet::weight(UNIT.into())]&#xD;&#xA;fn call_two(..) -&gt; {}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Using `WeightInfo` trait&#xD;&#xA;Another one is to have a seperate weight file and define weight there:&#xD;&#xA;&#xD;&#xA;_**weights.rs**_&#xD;&#xA;```rust&#xD;&#xA;use frame_support::{traits::Get, weights::Weight};&#xD;&#xA;use sp_std::marker::PhantomData;&#xD;&#xA;&#xD;&#xA;pub trait WeightInfo {&#xD;&#xA;	fn common_weight() -&gt; Weight;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct PalletWeightInfo&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;T: frame_system::Config&gt; WeightInfo for PalletWeightInfo&lt;T&gt;{&#xD;&#xA;	fn set_airdrop_server_account() -&gt; Weight {&#xD;&#xA;		ONE_UNIT as Weight&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In config:&#xD;&#xA;```rust&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;   /// -- other configs&#xD;&#xA;   PalletWeightInfo: WeightInfo,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In extrinsic call&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(T::PalletWeightInfo::common_weight())]&#xD;&#xA;fn call_one(..) -&gt; _ {}&#xD;&#xA;&#xD;&#xA;#[pallet::weight(T::PalletWeightInfo::common_weight())]&#xD;&#xA;fn call_two(..) -&gt; _ {}&#xD;&#xA;```&#xD;&#xA;## Pallet specific through config trait&#xD;&#xA;If you want that pallet to use constant fee in all extrinsic but also be configured from runtime, you can add `weight` field in `Config` as well.&#xD;&#xA;&#xD;&#xA;## Global to runtime&#xD;&#xA;If you want to use same weight in every pallet you create &amp; link, you can set minimum fee weight to `UNIT` while creating runtime and put `#[pallet::weight(0)]` to every call. This will set the weight to minimum amount specified which will be outside pallet i.e in runtime creation&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;But depending on usage, it is very unlikely that it requires same weight for different calls since weight are measure of resource consumed by given extrinsic. Nevertheless, you are free to do so but make sure it is absolute desired and planned." ContentLicense="CC BY-SA 4.0" />
  <row Id="13399" PostHistoryTypeId="2" PostId="3575" RevisionGUID="e86e146c-b0e2-482e-9246-6a9e68f509d6" CreationDate="2022-07-03T15:22:01.100" UserId="2837" Text="I wonder why most substrate nodes have that --unsafe-rpc-external flag and which of the calls are actually unsafe. Is there a RPC documentation somewhere?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13401" PostHistoryTypeId="1" PostId="3575" RevisionGUID="e86e146c-b0e2-482e-9246-6a9e68f509d6" CreationDate="2022-07-03T15:22:01.100" UserId="2837" Text="Unsafe RPC calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13402" PostHistoryTypeId="3" PostId="3575" RevisionGUID="e86e146c-b0e2-482e-9246-6a9e68f509d6" CreationDate="2022-07-03T15:22:01.100" UserId="2837" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13405" PostHistoryTypeId="2" PostId="3576" RevisionGUID="ea6094a0-2925-4105-85f9-76b694ee0556" CreationDate="2022-07-03T19:23:52.107" UserId="2264" Text="I was surprised to see that there while `state_subscribeRuntimeVersion` exists, there's no `chain_subscribeMetadata` so that made me wonder two things:&#xD;&#xA;&#xD;&#xA;- What is the expected process for detecting metadata version upgrades? Is it assumed that because it's such a potentially fundamental change, clients will be aware of it in advance and somehow deal with it?&#xD;&#xA;&#xD;&#xA;- What are the kinds of processes that a client should invoke when the runtime version changes? " ContentLicense="CC BY-SA 4.0" />
  <row Id="13407" PostHistoryTypeId="1" PostId="3576" RevisionGUID="ea6094a0-2925-4105-85f9-76b694ee0556" CreationDate="2022-07-03T19:23:52.107" UserId="2264" Text="How often to refresh chain metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13408" PostHistoryTypeId="3" PostId="3576" RevisionGUID="ea6094a0-2925-4105-85f9-76b694ee0556" CreationDate="2022-07-03T19:23:52.107" UserId="2264" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13409" PostHistoryTypeId="5" PostId="3563" RevisionGUID="8657933e-bbd2-4303-af88-6a06d6ddc099" CreationDate="2022-07-03T19:51:29.627" UserId="620" Comment="added 625 characters in body" Text="From the logs and your comment, it looks like you are sending `hrmpInitOpenChannel` and `hrmpAcceptOpenChannel` to the other parachain? You actually want to send these to the _Relay Chain_. If that doesn't work, please post the exact calls you made and I'll take another look.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;EDIT based up question update:&#xD;&#xA;&#xD;&#xA;I see why you are confused, because of the `HrmpChannelAccepted` message sent to the parachain. Indeed, that error [comes from here](https://github.com/paritytech/polkadot/blob/ac3cc36/xcm/xcm-executor/src/lib.rs#L506) but just means that the parachain does nothing on receiving that instruction.&#xD;&#xA;&#xD;&#xA;However, as long as it was successful on the Relay Chain (which it looks like it was), then the channel is established and you can use it. To verify, look at `hrmp.hrmpChannels` and make sure that the channel is there.&#xD;&#xA;&#xD;&#xA;The script you used also looks to handle things correctly." ContentLicense="CC BY-SA 4.0" />
  <row Id="13410" PostHistoryTypeId="2" PostId="3577" RevisionGUID="07638471-6d96-4741-bc46-3366669acc62" CreationDate="2022-07-03T19:57:51.903" UserId="620" Text="&gt; What is the best design to reuse governance pallets (e.g. treasury, council, Gov2) with non-L1 tokens?&#xD;&#xA;&#xD;&#xA;You'll want to look at the `pub trait Config { type Currency }` for each of the pallets you are interested in. Taking [Democracy for example](https://github.com/paritytech/substrate/blob/279593d87f103fa5e10c9751a97b1584f3ad79d6/frame/democracy/src/lib.rs#L259L260), it requires the assets it uses to fulfill `ReservableCurrency` and `LockableCurrency`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Currency type for this pallet.&#xD;&#xA;type Currency: ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;	+ LockableCurrency&lt;Self::AccountId, Moment = Self::BlockNumber&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Right now, the Assets pallet does not have implementations of these traits, although it is on the general roadmap.&#xD;&#xA;&#xD;&#xA;&gt; Can a Statemine fungible asset be used with these pallets?&#xD;&#xA;&#xD;&#xA;Due to the limitations of the Assets pallet mentioned above, they couldn't be used _directly_. However, if your parachain recognizes Statemine as the reserve location for some asset, it could handle the `ReserveAssetDeposited` XCM instruction by minting some asset into a pallet that does implement those traits (e.g. Balances). In that case, the asset could be used for governance on your parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="13412" PostHistoryTypeId="2" PostId="3578" RevisionGUID="47c737f2-79a7-4e26-a271-4fc446f96a6e" CreationDate="2022-07-03T22:46:13.067" UserId="2838" Text="I'm having difficulty receiving staking rewards via the Ledger Live app even after following the [best practices][1] I am always warned - *There are no active nominations*.&#xD;&#xA;&#xD;&#xA;[![There are no active nominations][2]][2]&#xD;&#xA;&#xD;&#xA;In the past (~4-5 months ago), I received rewards daily, but in my recent nominations, I can't seem to figure out what mistake I'm making.&#xD;&#xA;&#xD;&#xA; - Using [https://polkadot.subscan.io/validator][3], I've selected only validators from the active set with ~2-3% commission.&#xD;&#xA;  - I've bonded more than 10 dot. ~120 which should be far above the current threshold.&#xD;&#xA;  - None of the nominators I've bonded with are oversubscribed.&#xD;&#xA;  - I maxed out my bonded set. I selected 16.&#xD;&#xA;&#xD;&#xA;I understand the active set fluctuates, and, as shown in the picture below, some validators are now *unelected*, but I assume that if I grab of basket of 16 validators from the active set which aren't oversubscribed I should at least see some rewards.&#xD;&#xA;&#xD;&#xA;[![Ledger Live staking nominations][4]][4]&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Staking transaction confirmed 3 days ago.&#xD;&#xA;&#xD;&#xA;[![Nomination Transaction][5]][5]&#xD;&#xA;&#xD;&#xA;Does the polkadot community have any pointers for selecting validators so I can receiving staking rewards? &#xD;&#xA;&#xD;&#xA;What am I overlooking? Maybe I just need to wait a few more days?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.ledger.com/hc/en-us/articles/360018131260?utm_source=ledger_live_desktop&amp;utm_medium=self_referral&amp;utm_content=polkadot&amp;docs=true&#xD;&#xA;  [2]: https://i.stack.imgur.com/K1odK.png&#xD;&#xA;  [3]: https://polkadot.subscan.io/validator&#xD;&#xA;  [4]: https://i.stack.imgur.com/k9mef.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/OdFr6.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13414" PostHistoryTypeId="1" PostId="3578" RevisionGUID="47c737f2-79a7-4e26-a271-4fc446f96a6e" CreationDate="2022-07-03T22:46:13.067" UserId="2838" Text="When staking polkadot on the Ledger Live app, how do I select validators to avoid the error - There are no active nominations?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13415" PostHistoryTypeId="3" PostId="3578" RevisionGUID="47c737f2-79a7-4e26-a271-4fc446f96a6e" CreationDate="2022-07-03T22:46:13.067" UserId="2838" Text="|polkadot|staking|validator|ledger|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13416" PostHistoryTypeId="2" PostId="3579" RevisionGUID="d65ceb8b-3479-4099-86a7-5ff363bd0682" CreationDate="2022-07-03T23:45:55.867" UserId="219" Text="There is no need to have an order in the proof node encodings. The solution I adopted so far (thanks @cheme) is to 'lazy decode' encodings as described below.&#xD;&#xA;&#xD;&#xA;There is a single for loop iterating over the encoded proof nodes. This one has two tasks:&#xD;&#xA;&#xD;&#xA; - find the root node and decode it&#xD;&#xA; - record all other node encodings in a key value map from the node Merkle value (hash digest or encoding itself, depending on encoding length) to the node encoding&#xD;&#xA;&#xD;&#xA;For each (non inlined) child of the root, the hash digest is looked up in our key value map and, if found, the matching node encoding gets decoded. In comparison with our previous solution to decode each node first, this solution also has the advantage to be more easily upgrade-able with the v1 state trie where the proof contains encoded proof nodes and eventually value byte slices (referenced by hash).&#xD;&#xA;&#xD;&#xA;However, if the root node is not the first encoded node in the proof, one or more hash computations are 'lost' on node encodings smaller or equal to 32 bytes, until the root node is found. This is because:&#xD;&#xA;&#xD;&#xA; - For encoded nodes larger than 32 bytes, the blake2b hash has to be computed to get their Merkle value; no additional computational cost&#xD;&#xA; - For encoded nodes smaller or equal to 32 bytes, their Merkle value is their encoding. The blake2b hash does not need to be computed to add them to the map of encoded nodes. However, because the root node Merkle value is always the hash of its encoding, we are here forced to hash it in order to compare it with the root hash given, until the root node is found.&#xD;&#xA;&#xD;&#xA;On the other hand, practically it seems like the root node is often the first encoded node, so this should not have an impact out there." ContentLicense="CC BY-SA 4.0" />
  <row Id="13418" PostHistoryTypeId="2" PostId="3580" RevisionGUID="95a65e3e-a8bd-4299-81ec-c76be9c008d9" CreationDate="2022-07-03T23:49:09.143" UserId="2565" Text="We solve the problem usign the following code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const options = { storageDepositLimit: null, gasLimit: -1 }&#xD;&#xA;const { gasRequired, storageDeposit, result, output } = await apiContract.query[&quot;getSymbol&quot;](address, options);&#xD;&#xA;&#xD;&#xA;console.log(output);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13420" PostHistoryTypeId="6" PostId="3568" RevisionGUID="47da8613-609f-49e0-84ce-bc72c312e6f8" CreationDate="2022-07-04T00:55:52.653" UserId="34" Comment="edited tags" Text="|parachain|ink|smart-contract|pallet-contracts|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13423" PostHistoryTypeId="2" PostId="3581" RevisionGUID="f3997f7d-955a-4069-a748-4d7f80626a37" CreationDate="2022-07-04T06:06:47.513" UserId="2839" Text="I'm particularly interested in the role of backups and state stored on disk in the recovery process. In terms of preparations, we are early enough in our project lifecycle to put in place whatever measures are pertinent in case the worst should happen.&#xD;&#xA;&#xD;&#xA;In terms of a partial failure, my understanding is that if at least two boot nodes remain running, then the other nodes can come back up and will re-sync. Is this correct? Is it beneficial for the recovery process of a node to be able to re-attach the existing storage device?&#xD;&#xA;&#xD;&#xA;Although very unlikely with proper redundancy, what would be the recommended recovery strategy if all the parachain nodes terminated? For example, is it enough to simply reboot the nodes with their attached storage devices and let the software handle the rest? Is it possible that the state on disk will be left in a bad state by a sudden node crash, mandating a restore from a stable point? Etc etc." ContentLicense="CC BY-SA 4.0" />
  <row Id="13425" PostHistoryTypeId="1" PostId="3581" RevisionGUID="f3997f7d-955a-4069-a748-4d7f80626a37" CreationDate="2022-07-04T06:06:47.513" UserId="2839" Text="How do I recover quickly if the number of healthy nodes for my parachain reaches zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13426" PostHistoryTypeId="3" PostId="3581" RevisionGUID="f3997f7d-955a-4069-a748-4d7f80626a37" CreationDate="2022-07-04T06:06:47.513" UserId="2839" Text="|parachain|storage|collator|recovery|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13427" PostHistoryTypeId="2" PostId="3582" RevisionGUID="d13fb749-f630-4fee-8834-148dd6358480" CreationDate="2022-07-04T08:42:49.640" UserId="2634" Text="error: error parsing manifest: unexpected character found: `\u{2}` at line 3779 column 58&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[lzh@c9 polkadot]$ git clone --depth 1 --branch release-v0.9.24 https://github.com/paritytech/polkadot.git  &#xD;&#xA;&#xD;&#xA;[lzh@c9 polkadot]$ cd polkadot&#xD;&#xA;&#xD;&#xA;[lzh@c9 polkadot]$ cargo b -r&#xD;&#xA;error: error parsing manifest: unexpected character found: `\u{2}` at line 3779 column 58&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13429" PostHistoryTypeId="1" PostId="3582" RevisionGUID="d13fb749-f630-4fee-8834-148dd6358480" CreationDate="2022-07-04T08:42:49.640" UserId="2634" Text="polkadot-0.9.24 , cargo b -r , Error : unexpected character found: `\u{2}` at line 3779 column 58" ContentLicense="CC BY-SA 4.0" />
  <row Id="13430" PostHistoryTypeId="3" PostId="3582" RevisionGUID="d13fb749-f630-4fee-8834-148dd6358480" CreationDate="2022-07-04T08:42:49.640" UserId="2634" Text="|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13431" PostHistoryTypeId="2" PostId="3583" RevisionGUID="8fd21839-5287-4e88-a37a-65dde371a117" CreationDate="2022-07-04T08:54:26.287" UserId="398" Text="I have to set up a network using the substrate. I am able to run the first node as boot node. now I have to run 3 more nodes as validator. Should I need to provide the first node IP as boot node URL or need to provide all four nodes (3 validator nodes + 1 boot node) as bootnode url. " ContentLicense="CC BY-SA 4.0" />
  <row Id="13433" PostHistoryTypeId="1" PostId="3583" RevisionGUID="8fd21839-5287-4e88-a37a-65dde371a117" CreationDate="2022-07-04T08:54:26.287" UserId="398" Text="How to add bootnodes option in running validator node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13434" PostHistoryTypeId="3" PostId="3583" RevisionGUID="8fd21839-5287-4e88-a37a-65dde371a117" CreationDate="2022-07-04T08:54:26.287" UserId="398" Text="|substrate-node|validator|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13435" PostHistoryTypeId="2" PostId="3584" RevisionGUID="73afe462-f7ce-48cb-9140-dc032d6c72fe" CreationDate="2022-07-04T09:28:47.253" UserId="266" Text="I completed the [Connect a local parachain tutorial](https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/#chain-purging) and during cleanup `purge-chain` for the collator node failed: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;% ./target/release/parachain-collator purge-chain --base-path /tmp/parachain/alice&#xD;&#xA;Error: Input(&quot;Relay chain argument error: Invalid input: `rococo-local` only supported with `rococo-native` feature enabled.&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've followed the tutorial successfully, had no issues and never came across &quot;`rococo-native` feature&quot;.&#xD;&#xA;Do you have an idea what is going on and how I can properly purge the chain? &#xD;&#xA;(I can always `rm -r`, I guess, but I wanted to know if I failed to configure something)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13437" PostHistoryTypeId="1" PostId="3584" RevisionGUID="73afe462-f7ce-48cb-9140-dc032d6c72fe" CreationDate="2022-07-04T09:28:47.253" UserId="266" Text="purge-chain for local testnets requires rococo-native feature enabled" ContentLicense="CC BY-SA 4.0" />
  <row Id="13438" PostHistoryTypeId="3" PostId="3584" RevisionGUID="73afe462-f7ce-48cb-9140-dc032d6c72fe" CreationDate="2022-07-04T09:28:47.253" UserId="266" Text="|parachain|parachain-collator|substrate-parachain-template|cleanup|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13439" PostHistoryTypeId="2" PostId="3585" RevisionGUID="4728bcd5-ff3b-499a-ab99-c169af80ee90" CreationDate="2022-07-04T10:16:47.103" UserId="28" Text="With any errors related to compiling released versions of Substrate / Polkadot, I suggest you update your Rust compiler:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;rustup update&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I ran the same commands as you locally, and it worked just fine.&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;rustc --version&#xD;&#xA;rustc 1.62.0-nightly (cb1219871 2022-05-08)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13441" PostHistoryTypeId="2" PostId="3586" RevisionGUID="71bf457b-4fd6-4bc1-a108-c3099e690589" CreationDate="2022-07-04T10:20:53.993" UserId="28" Text="To bootstrap a small test network of 4 nodes, you only need that one boot node, and the rest can use it.&#xD;&#xA;&#xD;&#xA;For larger networks, it makes sense to have multiple redundant boot nodes." ContentLicense="CC BY-SA 4.0" />
  <row Id="13447" PostHistoryTypeId="2" PostId="3588" RevisionGUID="eec32a58-7b5c-46ea-963b-aa70acf937ea" CreationDate="2022-07-04T10:39:44.310" UserId="354" Text="You don't need to provide bootnode url of all validator nodes as it is not necessary.If for some reason you are not confident about the node you want to connect is receiving connections you can give url of other bootnodes. &#xD;&#xA;&#xD;&#xA;As Shawn Tabrizi already answered it makes more sense for larger networks." ContentLicense="CC BY-SA 4.0" />
  <row Id="13449" PostHistoryTypeId="2" PostId="3589" RevisionGUID="d1e4236e-68a8-4d61-98d1-9f957f249d21" CreationDate="2022-07-04T11:21:44.233" UserId="28" Text="You should simply adjust the `WeightToFee` calculation from the Pallet Transaction Payment Configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, DealWithFees&gt;;&#xD;&#xA;	type OperationalFeeMultiplier = OperationalFeeMultiplier;&#xD;&#xA;	type WeightToFee = ConstantFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = ConstantMultiplier&lt;Balance, TransactionByteFee&gt;;&#xD;&#xA;	type FeeMultiplierUpdate =&#xD;&#xA;		TargetedFeeAdjustment&lt;Self, TargetBlockFullness, AdjustmentVariable, MinimumMultiplier&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You could create an use a struct like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Implementor of `WeightToFee` that always returns the same fee.&#xD;&#xA;pub struct ConstantFee&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;T&gt; WeightToFee for ConstantFee&lt;T&gt;&#xD;&#xA;where&#xD;&#xA;	T: BaseArithmetic + From&lt;u32&gt; + Copy + Unsigned,&#xD;&#xA;{&#xD;&#xA;	type Balance = T;&#xD;&#xA;&#xD;&#xA;	fn weight_to_fee(weight: &amp;Weight) -&gt; Self::Balance {&#xD;&#xA;		1_000_000u32.into()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This would make it so that the fee taken from the user is always a constant value you control." ContentLicense="CC BY-SA 4.0" />
  <row Id="13452" PostHistoryTypeId="2" PostId="3590" RevisionGUID="1c5efa5c-8e34-4a4b-9c2b-e1e58e561398" CreationDate="2022-07-04T11:31:06.150" UserId="28" Text="There is no hard science here, the number selected is [quite arbitrary](https://github.com/paritytech/substrate/pull/9418#discussion_r675313941).&#xD;&#xA;&#xD;&#xA;[Clippy explains](https://rust-lang.github.io/rust-clippy/master/#large_enum_variant) why we would want to do this best:&#xD;&#xA;&#xD;&#xA;&gt; &gt; What it does&#xD;&#xA;&gt; &#xD;&#xA;&gt; Checks for large size differences between variants on enums.&#xD;&#xA;&gt;&#xD;&#xA;&gt; &gt; Why is this bad?&#xD;&#xA;&gt; &#xD;&#xA;&gt; Enum size is bounded by the largest variant. Having a large variant&#xD;&#xA;&gt; can penalize the memory layout of that enum.&#xD;&#xA;&gt;&#xD;&#xA;&gt; &gt; Known problems&#xD;&#xA;&gt; &#xD;&#xA;&gt; This lint obviously cannot take the distribution of variants in your&#xD;&#xA;&gt; running program into account. It is possible that the smaller variants&#xD;&#xA;&gt; make up less than 1% of all instances, in which case the overhead is&#xD;&#xA;&gt; negligible and the boxing is counter-productive. Always measure the&#xD;&#xA;&gt; change this lint suggests.&#xD;&#xA;&gt; &#xD;&#xA;&gt; For types that implement Copy, the suggestion to Box a variant’s data&#xD;&#xA;&gt; would require removing the trait impl. The types can of course still&#xD;&#xA;&gt; be Clone, but that is worse ergonomically. Depending on the use case&#xD;&#xA;&gt; it may be possible to store the large data in an auxillary structure&#xD;&#xA;&gt; (e.g. Arena or ECS).&#xD;&#xA;&gt; &#xD;&#xA;&gt; The lint will ignore generic types if the layout depends on the&#xD;&#xA;&gt; generics, even if the size difference will be large anyway.&#xD;&#xA;&#xD;&#xA;I believe we specifically ran into memory allocation errors in the Wasm executor where we were WAY over-allocating memory for a `Call`, since some random variants were very large, and the memory allocator needs to handle the `Call` being those large variants.&#xD;&#xA;&#xD;&#xA;~200 bytes was selected because [clippy also warns at this size](https://rust-lang.github.io/rust-clippy/master/#large_enum_variant)." ContentLicense="CC BY-SA 4.0" />
  <row Id="13456" PostHistoryTypeId="2" PostId="3591" RevisionGUID="1615829b-3134-4653-8a33-52e26bbb95fa" CreationDate="2022-07-04T16:12:44.337" UserId="85" Text="What are events? Events are state in storage that is reset at the beginning of each block. So in order to get those events the code must know which block is associated I would think. You can see why there would not be a block number or hash stored in the events, as anyone that got an event must already know that information.&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate - have a look in system/events().&#xD;&#xA;&#xD;&#xA;If you did a raw storage query for `26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7` then you would get the events back as of the block that you were querying the storage for.&#xD;&#xA;&#xD;&#xA;Hope this sheds some light that events are not magic and work the same way as all the other storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="13458" PostHistoryTypeId="2" PostId="3592" RevisionGUID="2c607280-bc50-4e0e-a27c-b83f7fb18520" CreationDate="2022-07-04T16:28:51.383" UserId="85" Text="My understanding is as follows:&#xD;&#xA;&#xD;&#xA; 1. Firstly it can't change in the middle of a session so look out for the `session` / `New Session` event.&#xD;&#xA; 2. Then the other thing to look for is the `system` / `code updated` event - that will let you know if the next session is going to be using updated metadata.&#xD;&#xA; 3. Parachains might well have a different event: `paras` / `CurrentCodeUpdated`.&#xD;&#xA;&#xD;&#xA;I've not implemented updating the metadata according to these heuristics yet, but will report back once I have done so as to whether the above was sufficient.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13460" PostHistoryTypeId="2" PostId="3593" RevisionGUID="3b4832e1-7825-4bd2-a7f8-0a3c03b27a3c" CreationDate="2022-07-04T16:40:17.190" UserId="298" Text="We are a newly born Kusama parachain (still controlled by sudo), and we need to lock 70% of all KSM crowdloan participant balances into a wallet. &#xD;&#xA;&#xD;&#xA;We are using Vesting (actually Scheduler pallet) which make batched calls to reserve (70% of the) balances. Then we need to unlock 70% by the end of the 48 week parachain slot period. &#xD;&#xA;&#xD;&#xA;Currently our block times range from 12s to 36s. So it is very hard to estimate what block number 48 weeks will be.&#xD;&#xA;&#xD;&#xA;1. What is the best way to accurately get closest to 48 weeks?&#xD;&#xA;2. How do we regulate parachain blocktimes?&#xD;&#xA;3. Is there anyway we can use Kusama blocknumber, perhaps there is a pallet that is leveraging this?&#xD;&#xA;4. What's the best most precedent example of other projects doing this?&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="13462" PostHistoryTypeId="1" PostId="3593" RevisionGUID="3b4832e1-7825-4bd2-a7f8-0a3c03b27a3c" CreationDate="2022-07-04T16:40:17.190" UserId="298" Text="Parachain blocknumber/times are hard to approximate, how can we unlock balances for crowdloan participants in an accurate way?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13463" PostHistoryTypeId="3" PostId="3593" RevisionGUID="3b4832e1-7825-4bd2-a7f8-0a3c03b27a3c" CreationDate="2022-07-04T16:40:17.190" UserId="298" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13464" PostHistoryTypeId="2" PostId="3594" RevisionGUID="259886f5-e7d7-423f-a8a5-040b84fc4a59" CreationDate="2022-07-04T18:20:14.380" UserId="2787" Text="In the process of installing the democracy pallet,in chain_spec.rs,&#xD;&#xA;I am importing like this:&#xD;&#xA;```&#xD;&#xA;use pichiu_runtime::{ &#xD;&#xA;	constants::currency::PCHU, DemocracyConfig};&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I cannot reach the imports and get the following errors: &#xD;&#xA;```&#xD;&#xA; --&gt; node/src/chain_spec.rs:8:29&#xD;&#xA;  |&#xD;&#xA;8 |     constants::currency::PCHU, DemocracyConfig};&#xD;&#xA;  |                                ^^^^^^^^^^^^^^^ no `DemocracyConfig` in the root&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: could not find `DemocracyConfig` in `pichiu_runtime`&#xD;&#xA;   --&gt; node/src/chain_spec.rs:280:30&#xD;&#xA;    |&#xD;&#xA;280 |         democracy: pichiu_runtime::DemocracyConfig::default(),&#xD;&#xA;    |                                    ^^^^^^^^^^^^^^^ could not find `DemocracyConfig` in `pichiu_runtime`&#xD;&#xA;```&#xD;&#xA;I have tried to base myself off other parchains, polakdot and substrate code." ContentLicense="CC BY-SA 4.0" />
  <row Id="13466" PostHistoryTypeId="1" PostId="3594" RevisionGUID="259886f5-e7d7-423f-a8a5-040b84fc4a59" CreationDate="2022-07-04T18:20:14.380" UserId="2787" Text="Can't reach DemocracyConfig import" ContentLicense="CC BY-SA 4.0" />
  <row Id="13467" PostHistoryTypeId="3" PostId="3594" RevisionGUID="259886f5-e7d7-423f-a8a5-040b84fc4a59" CreationDate="2022-07-04T18:20:14.380" UserId="2787" Text="|substrate-node|pallet|runtime|config|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13468" PostHistoryTypeId="2" PostId="3595" RevisionGUID="8f76a0a4-84a5-4e56-9bb8-d9b2ce067d2e" CreationDate="2022-07-04T19:37:59.000" UserId="2478" Text="With recent updates in frontier eth_getLogs is returning empty array&#xD;&#xA;&#xD;&#xA;    curl -X POST --data '{&quot;id&quot;: 1, &quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;eth_getLogs&quot;,&quot;params&quot;: [{&quot;address&quot;:&quot;0x841ce48f9446c8e281d3f1444cb859b4a6d0738c&quot;, &quot;topics&quot;:[], &quot;fromBlock&quot;: &quot;0x14D7F5&quot;, &quot;toBlock&quot;: &quot;0x14D7F7&quot;}]}' https://rpc.astar.network:8545 (https://rpc.astar.network:8545/) -H &quot;Content-Type: application/json&quot;&#xD;&#xA;&#xD;&#xA;While the logs are there in block explorer https://blockscout.com/astar/tx/0xb92e1c21bbeb31f6854456a1529faa3dcea79de446ecfdc92118aca3aed9b40f/logs" ContentLicense="CC BY-SA 4.0" />
  <row Id="13470" PostHistoryTypeId="1" PostId="3595" RevisionGUID="8f76a0a4-84a5-4e56-9bb8-d9b2ce067d2e" CreationDate="2022-07-04T19:37:59.000" UserId="2478" Text="eth_getLogs is returning empty array" ContentLicense="CC BY-SA 4.0" />
  <row Id="13471" PostHistoryTypeId="3" PostId="3595" RevisionGUID="8f76a0a4-84a5-4e56-9bb8-d9b2ce067d2e" CreationDate="2022-07-04T19:37:59.000" UserId="2478" Text="|substrate-node|frontier|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13472" PostHistoryTypeId="2" PostId="3596" RevisionGUID="eaa6e2ee-d2c2-4a93-8894-2cbe6522eb8c" CreationDate="2022-07-04T19:56:21.373" UserId="555" Text="I think you have not implemented **DemocracyConfig** in runtime. " ContentLicense="CC BY-SA 4.0" />
  <row Id="13474" PostHistoryTypeId="5" PostId="3594" RevisionGUID="c9d13356-23e0-4dc2-85da-cee65a8a95bd" CreationDate="2022-07-05T03:52:49.697" UserId="83" Comment="typos" Text="In the process of installing the democracy pallet in chain_spec.rs,&#xD;&#xA;I am importing like this:&#xD;&#xA;```&#xD;&#xA;use pichiu_runtime::{ &#xD;&#xA;	constants::currency::PCHU, DemocracyConfig};&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I cannot reach the imports and get the following errors: &#xD;&#xA;```&#xD;&#xA; --&gt; node/src/chain_spec.rs:8:29&#xD;&#xA;  |&#xD;&#xA;8 |     constants::currency::PCHU, DemocracyConfig};&#xD;&#xA;  |                                ^^^^^^^^^^^^^^^ no `DemocracyConfig` in the root&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: could not find `DemocracyConfig` in `pichiu_runtime`&#xD;&#xA;   --&gt; node/src/chain_spec.rs:280:30&#xD;&#xA;    |&#xD;&#xA;280 |         democracy: pichiu_runtime::DemocracyConfig::default(),&#xD;&#xA;    |                                    ^^^^^^^^^^^^^^^ could not find `DemocracyConfig` in `pichiu_runtime`&#xD;&#xA;```&#xD;&#xA;I have tried to base myself off other parachains, polkadot and substrate code." ContentLicense="CC BY-SA 4.0" />
  <row Id="13475" PostHistoryTypeId="2" PostId="3597" RevisionGUID="84a0604f-0c18-4e74-a545-d37552ac9199" CreationDate="2022-07-05T04:48:26.323" UserId="2103" Text="I am using pallet_assets for creating custom assets and I want to call the transfer function from pallet_assets in my other custom pallet. The thing is I want to pass the AccountId of the recipient but the transfer function in pallet_assets does not take AccounId, rather it takes &lt;T::Lookup as StaticLookup&gt;::Source as parameter.&#xD;&#xA;&#xD;&#xA;How can I pass AccountId to &lt;T::Lookup as StaticLookup&gt;::Source ?? " ContentLicense="CC BY-SA 4.0" />
  <row Id="13477" PostHistoryTypeId="1" PostId="3597" RevisionGUID="84a0604f-0c18-4e74-a545-d37552ac9199" CreationDate="2022-07-05T04:48:26.323" UserId="2103" Text="How to pass an AccountId to a parameter of type &lt;T::Lookup as StaticLookup&gt;::Source?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13478" PostHistoryTypeId="3" PostId="3597" RevisionGUID="84a0604f-0c18-4e74-a545-d37552ac9199" CreationDate="2022-07-05T04:48:26.323" UserId="2103" Text="|pallet|data-type|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13479" PostHistoryTypeId="5" PostId="3597" RevisionGUID="b67159c7-e9c0-47bc-992c-d00409de54dd" CreationDate="2022-07-05T05:17:58.210" UserId="2103" Comment="added 235 characters in body; edited tags" Text="I am using pallet_assets for creating custom assets and I want to call the transfer function from pallet_assets in my other custom pallet. The thing is I want to pass the AccountId of the recipient but the transfer function in pallet_assets does not take AccounId, rather it takes &lt;T::Lookup as StaticLookup&gt;::Source as parameter.&#xD;&#xA;&#xD;&#xA;How can I pass AccountId to &lt;T::Lookup as StaticLookup&gt;::Source ?? &#xD;&#xA;&#xD;&#xA;This is the error that I'm getting: &#xD;&#xA;```&#xD;&#xA;mismatched types&#xD;&#xA;expected associated type `&lt;&lt;T as frame_system::Config&gt;::Lookup as StaticLookup&gt;::Source`&#xD;&#xA;   found associated type `&lt;T as frame_system::Config&gt;::AccountId`rustcE0308&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13480" PostHistoryTypeId="6" PostId="3597" RevisionGUID="b67159c7-e9c0-47bc-992c-d00409de54dd" CreationDate="2022-07-05T05:17:58.210" UserId="2103" Comment="added 235 characters in body; edited tags" Text="|pallet|account|data-type|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13481" PostHistoryTypeId="2" PostId="3598" RevisionGUID="4eadb5ca-ef12-4fa3-ab43-d727a8ba2c3c" CreationDate="2022-07-05T05:35:55.450" UserId="2384" Text="If you have `AccountId` and you want to Get `LookUp&lt;Target = AccountId&gt;`, you will have to [unlookup](https://crates.parity.io/sp_runtime/traits/trait.StaticLookup.html#tymethod.unlookup). Easiest way to do is:&#xD;&#xA;```rust&#xD;&#xA;let user: AccountId = get_a_user();&#xD;&#xA;let user_lookup = &lt;T::Lookup as sp_runtime::traits::StaticLookup&gt;::unlookup(user.clone());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13483" PostHistoryTypeId="2" PostId="3599" RevisionGUID="354c76f8-21b8-4ffb-b425-133f61e173f2" CreationDate="2022-07-05T06:26:02.863" UserId="2281" Text="[![ ][1]][1]&#xD;&#xA;&#xD;&#xA;I have cloned Aster and built it, after running the cloned Aster code i tried to deploy evm smart contract on it but it is showing Error **error:evm.balanceLow**. I have used SubWallet to create an evm and aster address.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Vlm3i.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13485" PostHistoryTypeId="1" PostId="3599" RevisionGUID="354c76f8-21b8-4ffb-b425-133f61e173f2" CreationDate="2022-07-05T06:26:02.863" UserId="2281" Text="Unable to deploy EVM contract on Aster" ContentLicense="CC BY-SA 4.0" />
  <row Id="13486" PostHistoryTypeId="3" PostId="3599" RevisionGUID="354c76f8-21b8-4ffb-b425-133f61e173f2" CreationDate="2022-07-05T06:26:02.863" UserId="2281" Text="|substrate-node|polkadot-js|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13487" PostHistoryTypeId="2" PostId="3600" RevisionGUID="2354e434-67f2-4a22-a0e4-7606338d66eb" CreationDate="2022-07-05T07:03:23.373" UserId="555" Text="I Just clone this https://github.com/OAK-Foundation/substrate-node-template/tree/nicks-v2 for storage migration. After launch on polkadot ,this error shows:[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;I'm using following commands to run:&#xD;&#xA;1.  ./target/release/node-template --dev&#xD;&#xA;2.  cp target/release/wbuild/node-template-runtime/node_template_runtime.wasm upgrade2.compact.wasm  **(upload this file in Developer &gt; Sudo, system.setCode)**&#xD;&#xA;For submitting Above file it shows **SpecVersionNeedsToIncrease**, However I increase the version many times 100 -&gt; 101 -&gt; 102 -&gt; 103...&#xD;&#xA;&#xD;&#xA;Upload types.json contain this code : &#xD;&#xA;{&#xD;&#xA;  &quot;Nickname&quot;: {&#xD;&#xA;    &quot;first&quot;: &quot;Vec&lt;u8&gt;&quot;,&#xD;&#xA;    &quot;last&quot;: &quot;Option&lt;Vec&lt;u8&gt;&gt;&quot;&#xD;&#xA;  },&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/pHn7b.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="13489" PostHistoryTypeId="1" PostId="3600" RevisionGUID="2354e434-67f2-4a22-a0e4-7606338d66eb" CreationDate="2022-07-05T07:03:23.373" UserId="555" Text="SpecVersion need to increase" ContentLicense="CC BY-SA 4.0" />
  <row Id="13490" PostHistoryTypeId="3" PostId="3600" RevisionGUID="2354e434-67f2-4a22-a0e4-7606338d66eb" CreationDate="2022-07-05T07:03:23.373" UserId="555" Text="|polkadot|storage|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13491" PostHistoryTypeId="2" PostId="3601" RevisionGUID="023da339-1399-411c-a1d6-6be8933f6786" CreationDate="2022-07-05T07:34:37.087" UserId="2845" Text="I'm trying to figure out with OCW. And have a question is it possible to configure OCW so that if one node starts an HTTP call in OCW other nodes will skip it. I checked all examples I could find regarding OCW and it looks like a synchronization mechanism with off-chain storage working for OCWs from different pallets in one node. Also tried to use is_validator but it returns true for both nodes even if I start it without the validator flag. What I'm trying to achieve is when some event happens OCW sends a request to an external service and starts some job, and job results after success are stored on-chain. &#xD;&#xA;&#xD;&#xA;    #[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;		fn offchain_worker(block_number: T::BlockNumber) {&#xD;&#xA;			log::info!(&quot;OCW {:?}&quot;, block_number);&#xD;&#xA;			if &lt;frame_system::Pallet&lt;T&gt;&gt;::read_events_no_consensus()&#xD;&#xA;				.into_iter()&#xD;&#xA;				.filter_map(|event_record| {&#xD;&#xA;					let local_event = &lt;T as Config&gt;::Event::from(event_record.event);&#xD;&#xA;					local_event.try_into().ok()&#xD;&#xA;				})&#xD;&#xA;				.any(|event| matches!(event, Event::SomethingStored(..)))&#xD;&#xA;			{&#xD;&#xA;				let should_send = Self::choose_transaction_type(block_number);&#xD;&#xA;				let res = match should_send {&#xD;&#xA;					TransactionType::Signed =&gt; Self::call_api_and_send_transaction(),&#xD;&#xA;					TransactionType::None =&gt; Ok(()),&#xD;&#xA;				};&#xD;&#xA;				if let Err(e) = res {&#xD;&#xA;					log::error!(&quot;Error: {}&quot;, e);&#xD;&#xA;				}&#xD;&#xA;				log::info!(&quot;Hello world from OCW {:?}&quot;, block_number);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		fn choose_transaction_type(block_number: T::BlockNumber) -&gt; TransactionType {&#xD;&#xA;			const RECENTLY_SENT: () = ();&#xD;&#xA;			log::info!(&quot;Choose transaction &quot;);&#xD;&#xA;			let val = StorageValueRef::persistent(b&quot;example_ocw::last_send&quot;);&#xD;&#xA;&#xD;&#xA;			let res =&#xD;&#xA;				val.mutate(|last_send: Result&lt;Option&lt;T::BlockNumber&gt;, StorageRetrievalError&gt;| {&#xD;&#xA;					match last_send {&#xD;&#xA;						Ok(Some(block)) if block_number &lt; block + T::GracePeriod::get() =&gt; {&#xD;&#xA;							log::info!(&quot;Recently Send &quot;);&#xD;&#xA;							Err(RECENTLY_SENT)&#xD;&#xA;						},&#xD;&#xA;						_ =&gt; Ok(block_number),&#xD;&#xA;					}&#xD;&#xA;				});&#xD;&#xA;&#xD;&#xA;			match res {&#xD;&#xA;				Ok(_block_number) =&gt; TransactionType::Signed,&#xD;&#xA;				Err(MutateStorageError::ValueFunctionFailed(RECENTLY_SENT)) =&gt; {&#xD;&#xA;					TransactionType::None&#xD;&#xA;				},&#xD;&#xA;&#xD;&#xA;				Err(MutateStorageError::ConcurrentModification(_)) =&gt; TransactionType::None,&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn call_api_and_send_transaction() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;			//TODO&#xD;&#xA;			let validator = sp_io::offchain::is_validator();&#xD;&#xA;&#xD;&#xA;			if validator {&#xD;&#xA;				log::info!(&quot;Call api and send transaction &quot;);&#xD;&#xA;				log::info!(&quot;is validator {:?} &quot;, validator);&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;starting node 1&#xD;&#xA;&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain dev \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-cors all \&#xD;&#xA;--ws-external \&#xD;&#xA;--rpc-external \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;  &#xD;&#xA;starting node 2&#xD;&#xA;&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/bob \  &#xD;&#xA;--chain dev \&#xD;&#xA;--bob \  &#xD;&#xA;--port 30334 \&#xD;&#xA;--ws-port 9946 \&#xD;&#xA;--rpc-port 9934 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp" ContentLicense="CC BY-SA 4.0" />
  <row Id="13493" PostHistoryTypeId="1" PostId="3601" RevisionGUID="023da339-1399-411c-a1d6-6be8933f6786" CreationDate="2022-07-05T07:34:37.087" UserId="2845" Text="Only one node should make http call from OCW" ContentLicense="CC BY-SA 4.0" />
  <row Id="13494" PostHistoryTypeId="3" PostId="3601" RevisionGUID="023da339-1399-411c-a1d6-6be8933f6786" CreationDate="2022-07-05T07:34:37.087" UserId="2845" Text="|substrate-node|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13495" PostHistoryTypeId="5" PostId="3599" RevisionGUID="5f6b4faf-88dd-4b2b-b513-5e71945649f4" CreationDate="2022-07-05T07:54:13.230" UserId="2281" Comment="deleted 2 characters in body" Text="I have cloned Aster and built it, after running the cloned Aster code i tried to deploy evm smart contract on it but it is showing Error **error:evm.balanceLow**. I have used SubWallet to create an evm and aster address.&#xD;&#xA;&#xD;&#xA;[![ ][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Vlm3i.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13496" PostHistoryTypeId="5" PostId="3598" RevisionGUID="418bf5a0-947b-4897-8239-e8d2d62de084" CreationDate="2022-07-05T08:50:45.730" UserId="2384" Comment="added 8 characters in body" Text="If you have `AccountId` and you want to Get `LookUp&lt;Target = AccountId&gt;`, you will have to [unlookup](https://crates.parity.io/sp_runtime/traits/trait.StaticLookup.html#tymethod.unlookup). Straightforward way to do is:&#xD;&#xA;```rust&#xD;&#xA;let user: AccountId = get_a_user();&#xD;&#xA;let user_lookup = &lt;T::Lookup as sp_runtime::traits::StaticLookup&gt;::unlookup(user.clone());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13497" PostHistoryTypeId="2" PostId="3602" RevisionGUID="cae53043-e8bd-4c52-a6be-ff8d717ff585" CreationDate="2022-07-05T09:16:07.330" UserId="2846" Text="i try to subscribe a account change event by code follow document https://polkadot.js.org/docs/api/start/api.query.subs&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA; const unsub = await  api.query.system.account(address, acc =&gt; {&#xD;&#xA;    console.log(acc):&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells the unsub will be a UnsubscribePromise type.&#xD;&#xA;but it actully return Promise&lt;Codec&gt; type.&#xD;&#xA;&#xD;&#xA;how can i get the UnsubscribePromise Type to unsubscribe it.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13499" PostHistoryTypeId="1" PostId="3602" RevisionGUID="cae53043-e8bd-4c52-a6be-ff8d717ff585" CreationDate="2022-07-05T09:16:07.330" UserId="2846" Text="export UnsubscribePromise but got Promise&lt;Codec&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13500" PostHistoryTypeId="3" PostId="3602" RevisionGUID="cae53043-e8bd-4c52-a6be-ff8d717ff585" CreationDate="2022-07-05T09:16:07.330" UserId="2846" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13501" PostHistoryTypeId="5" PostId="3602" RevisionGUID="300e0b1a-6efe-47ea-ba0c-c31d41e9d5a4" CreationDate="2022-07-05T09:17:40.650" UserId="2846" Comment="deleted 11 characters in body" Text="i try to subscribe a account change event by code follow document https://polkadot.js.org/docs/api/start/api.query.subs&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;  const unsub = networkAPI.api.query.system.account(address, (acc) =&gt; console.log);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells the unsub will be a UnsubscribePromise type.&#xD;&#xA;but it actully return Promise&lt;Codec&gt; type.&#xD;&#xA;&#xD;&#xA;how can i get the UnsubscribePromise Type to unsubscribe it.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13502" PostHistoryTypeId="5" PostId="3602" RevisionGUID="9ca8ce9e-d40e-4475-81f8-6692f82a67c2" CreationDate="2022-07-05T09:18:03.767" UserId="2846" Comment="deleted 11 characters in body" Text="i try to subscribe a account change event by code follow document https://polkadot.js.org/docs/api/start/api.query.subs&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;  const unsub = api.query.system.account(address, (acc) =&gt; console.log);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells the unsub will be a UnsubscribePromise type.&#xD;&#xA;but it actully return Promise&lt;Codec&gt; type.&#xD;&#xA;&#xD;&#xA;how can i get the UnsubscribePromise Type to unsubscribe it.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13503" PostHistoryTypeId="5" PostId="3584" RevisionGUID="106e6b70-3db5-4c38-a46c-428486f6930f" CreationDate="2022-07-05T09:19:41.837" UserId="266" Comment="Slightly better formatting of my steps" Text="I completed the [Connect a local parachain tutorial](https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/#chain-purging) and during cleanup `purge-chain` for the collator node failed: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;% ./target/release/parachain-collator purge-chain --base-path /tmp/parachain/alice&#xD;&#xA;Error: Input(&quot;Relay chain argument error: Invalid input: `rococo-local` only supported with `rococo-native` feature enabled.&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've followed the tutorial successfully, had no issues and never came across &quot;`rococo-native` feature&quot;.&#xD;&#xA;Do you have an idea what is going on and how I can properly purge the chain? &#xD;&#xA;(I can always `rm -r`, I guess, but I wanted to know if I failed to configure something)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Since asked in the comments, the way I start the parachain collator node is as in the tutorial:&#xD;&#xA;```sh&#xD;&#xA;./target/release/parachain-collator \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain ~/projects/rococo-custom-2-raw.json \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried &#xD;&#xA;1. manually (`rm -r`) removed the parachain directory in `/tmp/parachain/alice`&#xD;&#xA;2. started the node (starting a new chain db)&#xD;&#xA;3. stopped the node (`ctr+C`)&#xD;&#xA;4. I tried to purge the chain with the same command as above - still resulting in the same error.&#xD;&#xA;&#xD;&#xA;The only place I see `rococo-local` is in the chain config file - `rococo-local-parachain-2000-raw.json` - I created it using the commands in the tutorial but it may be worth going down in that direction to find more info." ContentLicense="CC BY-SA 4.0" />
  <row Id="13504" PostHistoryTypeId="5" PostId="3602" RevisionGUID="5ddfc0a3-f055-421e-a788-acd4dade8a47" CreationDate="2022-07-05T09:32:02.007" UserId="2846" Comment="added 2 characters in body" Text="i try to subscribe a account change event by code follow document https://polkadot.js.org/docs/api/start/api.query.subs&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;  const unsub = api.query.system.account(address, (acc) =&gt; console.log);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells the unsub will be a UnsubscribePromise type.&#xD;&#xA;but it actully return Promise\&lt;Codec\&gt; type.&#xD;&#xA;&#xD;&#xA;how can i get the UnsubscribePromise Type to unsubscribe it.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13505" PostHistoryTypeId="2" PostId="3603" RevisionGUID="a5045852-b6bc-408c-b830-6eaebaba9b37" CreationDate="2022-07-05T11:27:03.150" UserId="279" Text="you need to `await` to get the `unsub` fn.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const unsub = await api.query.system.account(address, (acc) =&gt; console.log);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="13507" PostHistoryTypeId="5" PostId="3603" RevisionGUID="04dc6702-033f-4f7c-822c-c60d17d4ab83" CreationDate="2022-07-05T11:50:39.087" UserId="279" Comment="added 223 characters in body" Text="you need to `await` to get the `unsub` fn.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const unsub = await api.query.system.account(address, (acc) =&gt; console.log);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const address = &quot;&quot;&#xD;&#xA;const unsub = await api.query.system.account(address, (acc) =&gt; console.log);&#xD;&#xA;console.log(unsub)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;will print&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;()=&gt;l.unsubscribe()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="13508" PostHistoryTypeId="2" PostId="3604" RevisionGUID="c2d7ed86-cb1e-40bb-8446-2aeb748f01aa" CreationDate="2022-07-05T12:06:22.820" UserId="2673" Text="**Context:** I'm creating a pallet with a simple DEX (decentralised exchange) functionality. I need to perform some arithmetic operations on balances for liquidity pools.&#xD;&#xA;&#xD;&#xA;**Problem:** How can I convert from asset balance to currency balance? I am aware of the [BalanceConversion](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/trait.BalanceConversion.html) trait and its [BalanceToAssetBalance](https://paritytech.github.io/substrate/master/pallet_assets/struct.BalanceToAssetBalance.html) impelementation, but it only converts the other way (which also need, btw). Could an asset balance -&gt; currency balance conversion be implemented in a similar way *without modifying* the `assets` pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13510" PostHistoryTypeId="1" PostId="3604" RevisionGUID="c2d7ed86-cb1e-40bb-8446-2aeb748f01aa" CreationDate="2022-07-05T12:06:22.820" UserId="2673" Text="Convert from asset balance to currency balance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13511" PostHistoryTypeId="3" PostId="3604" RevisionGUID="c2d7ed86-cb1e-40bb-8446-2aeb748f01aa" CreationDate="2022-07-05T12:06:22.820" UserId="2673" Text="|balances|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13513" PostHistoryTypeId="2" PostId="3605" RevisionGUID="167f6bb4-edb1-4817-ab38-37861a3de7ff" CreationDate="2022-07-05T12:47:02.747" UserId="2102" Text="After writing some benchmarks and making some code changes, I was able to make the block production constant. At the time, I'm able to handle ~1000tx per block (6s), which is not bad at all. To make block production constant it was a matter of writing benchmarks simulating the worst case scenario for each extrinsic on my chain and setting the right weights on each one of them.&#xD;&#xA;I had another issue that was causing the block production to slow down after ~30k tx, the issue was related to the way I was pushing new data on a vector, but as soon as I started using `append`, the issue disappeared. " ContentLicense="CC BY-SA 4.0" />
  <row Id="13515" PostHistoryTypeId="16" PostId="3605" RevisionGUID="a2c4a23d-9b02-42be-8008-224e36d56a73" CreationDate="2022-07-05T12:47:02.747" UserId="2102" />
  <row Id="13516" PostHistoryTypeId="52" PostId="3597" RevisionGUID="84ac1503-280f-45aa-b4df-3087ee2225c8" CreationDate="2022-07-05T12:48:43.240" />
  <row Id="13517" PostHistoryTypeId="2" PostId="3606" RevisionGUID="cdb0e9a7-a4df-43f2-9688-fa084b81fcbd" CreationDate="2022-07-05T12:52:52.100" UserId="427" Text="Is there a node-template for babe consensus tracking all the changes and updates as it does to substrate-node-template which follows aura consensus.&#xD;&#xA;&#xD;&#xA;For eg., polkadot-v0.9.24 changes are already integrated to substrate-node-template repo. But there is no way I can find the changes related to babe consensus and its changes related to polkadot-v0.9.24." ContentLicense="CC BY-SA 4.0" />
  <row Id="13519" PostHistoryTypeId="1" PostId="3606" RevisionGUID="cdb0e9a7-a4df-43f2-9688-fa084b81fcbd" CreationDate="2022-07-05T12:52:52.100" UserId="427" Text="Node-template for stand-alone blockchains with POS babe consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="13520" PostHistoryTypeId="3" PostId="3606" RevisionGUID="cdb0e9a7-a4df-43f2-9688-fa084b81fcbd" CreationDate="2022-07-05T12:52:52.100" UserId="427" Text="|substrate-node|substrate-node-template|babe|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13521" PostHistoryTypeId="2" PostId="3607" RevisionGUID="0ff7514c-90de-449c-8659-8378c189c83e" CreationDate="2022-07-05T13:02:06.697" UserId="29" Text="As stated here: https://github.com/polkadot-js/apps/issues/7607#issuecomment-1129752912&#xD;&#xA;&#xD;&#xA;&gt; This situation can happen IFF the chain moves to an emergency condition where the election/staking have failed to trigger a new era. In this case, new sessions are created, but no new era is created, thus no new validator set is also chosen and we stick with the old set.&#xD;&#xA;&#xD;&#xA;&gt; This is why the duration of the era is prolonged.&#xD;&#xA;&#xD;&#xA;A fix is also proposed within that link." ContentLicense="CC BY-SA 4.0" />
  <row Id="13523" PostHistoryTypeId="2" PostId="3608" RevisionGUID="1fc7dcbf-32c6-4c49-a1b7-18b4278785da" CreationDate="2022-07-05T13:06:52.240" UserId="627" Text="Increment [spec_version in the code](https://github.com/OAK-Foundation/substrate-node-template/blob/4205bb08cdec6a3cba6ab287f311ce913a9480b0/runtime/src/lib.rs#L101), rebuild the WASM and perform the upgrade.&#xD;&#xA;&#xD;&#xA;When upgrading the check will be done on the actual WASM blob to ensure that the version has been increased. (This is the check the error comes from)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13525" PostHistoryTypeId="4" PostId="3600" RevisionGUID="d121ad25-fcec-4326-b9eb-8185d4aea6b5" CreationDate="2022-07-05T13:38:19.763" UserId="85" Comment="turned it into more of a question" Text="How do I fix &quot;SpecVersionNeedsToIncrease&quot; error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13526" PostHistoryTypeId="5" PostId="3599" RevisionGUID="38364407-4116-41eb-b48b-7bab3fc6b2f2" CreationDate="2022-07-05T13:40:08.227" UserId="85" Comment="fix typo" Text="I have cloned Astar and built it, after running the cloned Astar code i tried to deploy evm smart contract on it but it is showing Error **error:evm.balanceLow**. I have used SubWallet to create an evm and aster address.&#xD;&#xA;&#xD;&#xA;[![ ][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Vlm3i.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13527" PostHistoryTypeId="4" PostId="3599" RevisionGUID="38364407-4116-41eb-b48b-7bab3fc6b2f2" CreationDate="2022-07-05T13:40:08.227" UserId="85" Comment="fix typo" Text="Unable to deploy EVM contract on Astar" ContentLicense="CC BY-SA 4.0" />
  <row Id="13528" PostHistoryTypeId="6" PostId="3599" RevisionGUID="38364407-4116-41eb-b48b-7bab3fc6b2f2" CreationDate="2022-07-05T13:40:08.227" UserId="85" Comment="fix typo" Text="|substrate-node|polkadot-js|evm|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13529" PostHistoryTypeId="6" PostId="3601" RevisionGUID="2d362550-f0fa-4146-82ad-adb742f18e45" CreationDate="2022-07-05T13:40:33.967" UserId="85" Comment="edited tags" Text="|substrate-node|offchain-worker|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13530" PostHistoryTypeId="2" PostId="3609" RevisionGUID="b24209da-a076-4b30-b71a-d630b4e875f8" CreationDate="2022-07-05T13:54:30.153" UserId="85" Text="What does &quot;there are no validators assigned to core&quot; mean and how do I fix it? I see that my parachain is stalled, I started 4 relay nodes with polkadot-launch and 3 parachains." ContentLicense="CC BY-SA 4.0" />
  <row Id="13532" PostHistoryTypeId="1" PostId="3609" RevisionGUID="b24209da-a076-4b30-b71a-d630b4e875f8" CreationDate="2022-07-05T13:54:30.153" UserId="85" Text="What does &quot;there are no validators assigned to core&quot; mean?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13533" PostHistoryTypeId="3" PostId="3609" RevisionGUID="b24209da-a076-4b30-b71a-d630b4e875f8" CreationDate="2022-07-05T13:54:30.153" UserId="85" Text="|parachain|stalled|polkadot-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13534" PostHistoryTypeId="2" PostId="3610" RevisionGUID="b2ef3431-7ee5-4845-8390-70f7f9cf0c76" CreationDate="2022-07-05T13:54:30.153" UserId="85" Text="If you get an error like &quot;there are no validators assigned to core core=CoreIndex(2)&quot;, then it could well be that you're running more parachains then there are relay validators available to service them. Currently there's a minimum of 2 validators per parachain needed to be spun up." ContentLicense="CC BY-SA 4.0" />
  <row Id="13539" PostHistoryTypeId="2" PostId="3612" RevisionGUID="ab12ae4e-4792-4116-af80-9e6321698730" CreationDate="2022-07-05T14:34:44.913" UserId="29" Text="Here are some tips...&#xD;&#xA;&#xD;&#xA;Look at the changes documented in the release:&#xD;&#xA;- https://github.com/paritytech/polkadot/releases&#xD;&#xA;&#xD;&#xA;Note things like breaking changes, storage migrations, low priority vs high priority, client updates vs runtime updates, etc.&#xD;&#xA;&#xD;&#xA;Also helpful to do comparisons between versions to see what the changes are. For example:&#xD;&#xA;- https://github.com/paritytech/substrate/compare/polkadot-v0.9.23...polkadot-v0.9.22&#xD;&#xA;&gt; You could do the same with the Polkadot repo&#xD;&#xA;&#xD;&#xA;And most importantly -&gt; Do one version at a time!&#xD;&#xA;&#xD;&#xA;Pay attention to any changes in the `cargo.toml` file e.g. version upgrades&#xD;&#xA;&#xD;&#xA;And make sure to update your dependencies to all point to the same branch of Substrate. For example:&#xD;&#xA;```sh&#xD;&#xA;git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Build and make sure it works:&#xD;&#xA;&#xD;&#xA;`cargo build --release`" ContentLicense="CC BY-SA 4.0" />
  <row Id="13541" PostHistoryTypeId="2" PostId="3613" RevisionGUID="d7549338-e450-4a85-8c98-9802fe00fd44" CreationDate="2022-07-05T14:36:30.017" UserId="266" Text="**Relay chain**&#xD;&#xA;&#xD;&#xA;The [Local relay chain tutorial](https://docs.substrate.io/tutorials/connect-other-chains/local-relay/#relay-chain-specification) on substrate.io has links to predefined [rococo chain specs](https://github.com/substrate-developer-hub/substrate-docs/tree/main/static/assets/tutorials/cumulus/chain-specs) for local use. You can download the plain version and browse it.&#xD;&#xA;&#xD;&#xA;**Parachain**&#xD;&#xA;&#xD;&#xA;The [Connect a local parachain tutorial](https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/#custom-parachain-specification) has instructions how to generate (and modify) specs from the parachain template&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-collator build-spec --disable-default-bootnode &gt; rococo-local-parachain-plain.json&#xD;&#xA;```&#xD;&#xA;You can generate one and browse it." ContentLicense="CC BY-SA 4.0" />
  <row Id="13543" PostHistoryTypeId="4" PostId="3572" RevisionGUID="b83f9eb7-4dcc-4b69-807f-a4acfc8707d6" CreationDate="2022-07-05T14:55:33.870" UserId="29" Comment="edited title" Text="The log no longer has [Parachain] and [RelayChain] tags" ContentLicense="CC BY-SA 4.0" />
  <row Id="13544" PostHistoryTypeId="52" PostId="3600" RevisionGUID="f5732ade-fe2a-4cf1-9596-e1309afe522d" CreationDate="2022-07-05T15:03:24.690" />
  <row Id="13545" PostHistoryTypeId="2" PostId="3614" RevisionGUID="e075020c-6580-46f2-97f8-07f1f0a06c0c" CreationDate="2022-07-05T15:08:59.200" UserId="29" Text="These flags allow you to expose the RPC interfaces publicly:&#xD;&#xA;```&#xD;&#xA;--unsafe-rpc-external&#xD;&#xA;  Listen to all RPC interfaces.&#xD;&#xA;            &#xD;&#xA;  Same as `--rpc-external`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--rpc-external&#xD;&#xA;  Listen to all RPC interfaces.&#xD;&#xA;            &#xD;&#xA;  Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: &lt;https://docs.substrate.io/v3/runtime/custom-rpcs/#public-rpcs&gt;. Use&#xD;&#xA;   `--unsafe-rpc-external` to suppress the warning if you understand the risks.&#xD;&#xA;```&#xD;&#xA;&gt; By default, the node will refuse to start if you try to expose an RPC interface and run a validator node at the same time. The --unsafe-* flags allow you to suppress this security measure. Exposing RPC interfaces can open up a huge surface of attacks and has to be carefully reviewed.&#xD;&#xA;&#xD;&#xA;Read more:&#xD;&#xA;- https://docs.substrate.io/main-docs/build/custom-rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="13547" PostHistoryTypeId="5" PostId="3580" RevisionGUID="60b9dc76-9c84-4d43-93eb-fb5f991cc622" CreationDate="2022-07-05T15:14:15.133" UserId="29" Comment="added 1 character in body" Text="We solved the problem using the following code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const options = { storageDepositLimit: null, gasLimit: -1 }&#xD;&#xA;const { gasRequired, storageDeposit, result, output } = await apiContract.query[&quot;getSymbol&quot;](address, options);&#xD;&#xA;&#xD;&#xA;console.log(output);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13548" PostHistoryTypeId="5" PostId="3602" RevisionGUID="0134eabc-b3b5-4dd7-aaa5-0a250f7d8240" CreationDate="2022-07-05T15:35:36.047" UserId="2846" Comment="added 815 characters in body" Text="i try to subscribe a account change event by code follow document https://polkadot.js.org/docs/api/start/api.query.subs&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;  const unsub = api.query.system.account(address, (acc) =&gt; console.log);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells the unsub will be a UnsubscribePromise type.&#xD;&#xA;but it actully return Promise\&lt;Codec\&gt; type.&#xD;&#xA;&#xD;&#xA;how can i get the UnsubscribePromise Type to unsubscribe it.&#xD;&#xA;&#xD;&#xA;update&#xD;&#xA;&#xD;&#xA;i wrote a demo code &#xD;&#xA;&#xD;&#xA;[deom code][1]&#xD;&#xA;&#xD;&#xA;and try to compile it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;➜  sub git:(master) pnpm build&#xD;&#xA;&#xD;&#xA;&gt; sub@0.0.0 build /srv/tmp/sub&#xD;&#xA;&gt; tsc &amp;&amp; vite build&#xD;&#xA;&#xD;&#xA;src/pok/pok.ts:6:53 - error TS7006: Parameter 'acc' implicitly has an 'any' type.&#xD;&#xA;&#xD;&#xA;6     const unsub = await api.query.system.account('',acc =&gt;console.log);&#xD;&#xA;                                                      ~~~&#xD;&#xA;&#xD;&#xA;src/pok/pok.ts:10:5 - error TS2349: This expression is not callable.&#xD;&#xA;  Type 'Codec' has no call signatures.&#xD;&#xA;&#xD;&#xA;10     unsub()&#xD;&#xA;       ~~~~~&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Found 2 errors in the same file, starting at: src/pok/pok.ts:6&#xD;&#xA;&#xD;&#xA; ELIFECYCLE  Command failed with exit code 2.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells me Type 'Codec' has no call signatures.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kulame/subtest/blob/e82e1b288c650ecb1aeec802967aebfc732fb6cf/src/pok/pok.ts#L3" ContentLicense="CC BY-SA 4.0" />
  <row Id="13549" PostHistoryTypeId="5" PostId="3612" RevisionGUID="41bbe548-477a-47ee-9cf2-c4952883a05a" CreationDate="2022-07-05T15:56:45.657" UserId="29" Comment="deleted 8 characters in body" Text="Here are some tips...&#xD;&#xA;&#xD;&#xA;Look at the changes documented in the release:&#xD;&#xA;- https://github.com/paritytech/polkadot/releases&#xD;&#xA;&#xD;&#xA;Note things like breaking changes, migrations, low priority vs high priority, client changes vs runtime changes, etc.&#xD;&#xA;&#xD;&#xA;Also helpful to do comparisons between versions to see what the changes are. For example:&#xD;&#xA;- https://github.com/paritytech/substrate/compare/polkadot-v0.9.23...polkadot-v0.9.22&#xD;&#xA;&gt; You could do the same with the Polkadot repo&#xD;&#xA;&#xD;&#xA;And most importantly -&gt; Do one version at a time!&#xD;&#xA;&#xD;&#xA;Pay attention to any changes in the `cargo.toml` file e.g. version upgrades&#xD;&#xA;&#xD;&#xA;And make sure to update your dependencies to all point to the same branch of Substrate. For example:&#xD;&#xA;```sh&#xD;&#xA;git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Build and make sure it works:&#xD;&#xA;&#xD;&#xA;`cargo build --release`" ContentLicense="CC BY-SA 4.0" />
  <row Id="13550" PostHistoryTypeId="2" PostId="3615" RevisionGUID="be04d837-ccd9-46a6-a68b-640ba01e8e40" CreationDate="2022-07-05T16:10:48.280" UserId="2849" Text="I am trying to integrate the substrate-connect light client extension into our application, connecting to our parachain but getting the following warnings and debug messages in the extension logs.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[18:03:01 609][sync-service-battery_station]GrandPa warp sync still in progress and taking a long time&#xD;&#xA;[18:03:02 428][runtime-battery_station]Worker =&gt; NewDownload(block=0x22a8…af0e)&#xD;&#xA;[18:03:02 429][runtime-battery_station]Worker &lt;= FailedDownload(blocks=[0x22a8…af0e], error=StorageQuery(StorageQueryError { errors: [] }))&#xD;&#xA;[18:03:02 449][connections]Problem during discovery on battery_station: NoPeer&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the networks tab of the substrate connect extension the light client says its `syncronizing` but `latest block` is showing no value at all.&#xD;&#xA;&#xD;&#xA;**From the debug messages it seems like its failing to download blocks.**&#xD;&#xA;&#xD;&#xA;Anyone seen this behaviour before when trying to connect to a parachain?&#xD;&#xA;&#xD;&#xA;Is there some incompatibility in our spec or chain configuration that makes it non compliant with the light client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13552" PostHistoryTypeId="1" PostId="3615" RevisionGUID="be04d837-ccd9-46a6-a68b-640ba01e8e40" CreationDate="2022-07-05T16:10:48.280" UserId="2849" Text="Substrate connect light client cannot seem to sync blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="13553" PostHistoryTypeId="3" PostId="3615" RevisionGUID="be04d837-ccd9-46a6-a68b-640ba01e8e40" CreationDate="2022-07-05T16:10:48.280" UserId="2849" Text="|light-client|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13554" PostHistoryTypeId="5" PostId="3615" RevisionGUID="5702bf5b-d03d-4217-81a9-e6654ebe9f97" CreationDate="2022-07-05T16:18:59.200" UserId="2849" Comment="added 37 characters in body" Text="I am trying to integrate the substrate-connect light client extension into our application, connecting to our parachain but getting the following warnings and debug messages in the extension logs.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[18:03:01 609][sync-service-battery_station]GrandPa warp sync still in progress and taking a long time&#xD;&#xA;[18:03:02 428][runtime-battery_station]Worker =&gt; NewDownload(block=0x22a8…af0e)&#xD;&#xA;[18:03:02 429][runtime-battery_station]Worker &lt;= FailedDownload(blocks=[0x22a8…af0e], error=StorageQuery(StorageQueryError { errors: [] }))&#xD;&#xA;[18:03:02 449][connections]Problem during discovery on battery_station: NoPeer&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the networks tab of the substrate connect extension the light client says its `syncronizing` but `latest block` is showing no value at all.&#xD;&#xA;&#xD;&#xA;**From the debug messages it seems like its failing to download blocks. Is it because it cannot find a peer?**&#xD;&#xA;&#xD;&#xA;Anyone seen this behaviour before when trying to connect to a parachain?&#xD;&#xA;&#xD;&#xA;Is there some incompatibility in our spec or chain configuration that makes it non compliant with the light client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13555" PostHistoryTypeId="2" PostId="3616" RevisionGUID="75ff3c76-bfca-4c1e-bf5e-bbe089602721" CreationDate="2022-07-05T16:24:37.790" UserId="32" Text="The minimum nomination amount receiving staking rewards on Polkadot is 125.43 DOT (on the day of posting this answer). You can view this value on [Polkadot staking page under the Stake tab.][1] This value is dynamic and can change from era to era (each era is a day on Polkadot network). &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;If you staked more than 125.43 DOT and are not receiving rewards, then the issue needs to be looked in depth. [&quot;Why am I not getting staking rewards?&quot;][3] - this support article explains the possible reasons. If you cannot resolve this on your own, you can click on &quot;contact us&quot; on that support page and fill in the details. The Polkadot support team will assist you further.&#xD;&#xA;&#xD;&#xA;PS: After the [Nomination Pools][4] are deployed on Polkadot (in a few months), the minimum threshold to receive Staking rewards on Polkadot will be significantly smaller. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://staking.polkadot.network/dashboard/#/stake&#xD;&#xA;  [2]: https://i.stack.imgur.com/Z2ZsK.png&#xD;&#xA;  [3]: https://support.polkadot.network/support/solutions/articles/65000170805-why-am-i-not-getting-staking-rewards-&#xD;&#xA;  [4]: https://wiki.polkadot.network/docs/learn-nomination-pools" ContentLicense="CC BY-SA 4.0" />
  <row Id="13557" PostHistoryTypeId="5" PostId="3616" RevisionGUID="3b75eb3c-158b-4623-a48d-d975b3b408b8" CreationDate="2022-07-05T16:30:34.540" UserId="32" Comment="added 81 characters in body" Text="Although the minimum amount to submit nomination intent is 10 DOT, the minimum nomination amount to receive staking rewards on Polkadot is dynamic and can change from era to era (each era is a day on Polkadot network). It is currently 125.43 DOT (on the day of posting this answer). You can view this value on [Polkadot staking page under the Stake tab.][1] &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;If you staked more than 125.43 DOT and are not receiving rewards, then the issue needs to be looked in depth. [&quot;Why am I not getting staking rewards?&quot;][3] - this support article explains the possible reasons. If you cannot resolve this on your own, you can click on &quot;contact us&quot; on that support page and fill in the details. The Polkadot support team will assist you further.&#xD;&#xA;&#xD;&#xA;PS: After the [Nomination Pools][4] are deployed on Polkadot (in a few months), the minimum threshold to receive Staking rewards on Polkadot will be significantly smaller. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://staking.polkadot.network/dashboard/#/stake&#xD;&#xA;  [2]: https://i.stack.imgur.com/Z2ZsK.png&#xD;&#xA;  [3]: https://support.polkadot.network/support/solutions/articles/65000170805-why-am-i-not-getting-staking-rewards-&#xD;&#xA;  [4]: https://wiki.polkadot.network/docs/learn-nomination-pools" ContentLicense="CC BY-SA 4.0" />
  <row Id="13558" PostHistoryTypeId="2" PostId="3617" RevisionGUID="2199ee07-b5ff-4887-b74f-25f855e5d3f6" CreationDate="2022-07-05T17:54:52.920" UserId="299" Text="I solved this problem because the version of `tracing-core` was too high, we had to fix the version of `tracing-core` to `0.1.26`.&#xD;&#xA;&lt;https://github.com/paritytech/substrate/issues/11691&gt;&#xD;&#xA;&#xD;&#xA;Solution:&#xD;&#xA;edit `/node/Cargo.toml`&#xD;&#xA;```rust&#xD;&#xA;......&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;tracing-core = &quot;=0.1.26&quot;&#xD;&#xA;&#xD;&#xA;......&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13560" PostHistoryTypeId="5" PostId="3528" RevisionGUID="df2f3ff0-af7b-4100-a3a6-3398f31751e9" CreationDate="2022-07-05T18:12:42.163" UserId="2801" Comment="added 49 characters in body" Text="I was doing some testing and sent a transaction on a custom substrate chain. On the polkadot explorer, the block which held the transaction had an error. The transaction completed; however, the explorer showed: &#xD;&#xA;&#xD;&#xA;`Unable to retrieve the specified block details. Unable to decode storage system.events:: createType(Vec&lt;EventRecord&gt;):: Vec&lt;EventRecord&gt;:: Decoded input doesn't match input, received`&#xD;&#xA;&#xD;&#xA;What is this error? And is there anything I could do to fix it?&#xD;&#xA;&#xD;&#xA;Thank you!&#xD;&#xA;&#xD;&#xA;Edit: https://polkadot.js.org/apps/#/explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="13561" PostHistoryTypeId="2" PostId="3618" RevisionGUID="3475321f-2200-481e-9e22-b080c7e833ba" CreationDate="2022-07-05T18:22:50.277" UserId="2132" Text="You are trying to use TypeScript results (static code analysis) without having augmentation applied. See the JS API [TS augmentation FAQ](https://polkadot.js.org/docs/api/FAQ#since-upgrading-to-the-7x-series-typescript-augmentation-is-missing) on how to apply the correct types for your environment.&#xD;&#xA;&#xD;&#xA;Effectively while the runtime is correctly decorated in all cases, for TypeScript you need to apply the augmentation overrides for your specific chain to help at coding-analysis time - here it doesn't have access to the on-chain metadata. Since all chains are different (different methods, arguments, etc.) for the static analysis the editors needs a bit of help to &quot;pick the right one&quot;.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13563" PostHistoryTypeId="2" PostId="3619" RevisionGUID="5fe6f5c3-65fe-450e-ba7e-5e7516e6cfbc" CreationDate="2022-07-05T18:32:09.657" UserId="2132" Text="You are missing some crucial information, such as which API you are using. &#xD;&#xA;&#xD;&#xA;For instance, on the JS API, each Codec result retrieved from storage has a `createdAtHash` getter. This means you can do -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;api.query.system.events((v) =&gt; {&#xD;&#xA;  console.log('Vec&lt;EventRecord&gt; created at', v.createdAtHash.toHex());&#xD;&#xA;}); &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Since the underlying `subscribeStorage` RPCs do return the blockHash, other APIs/middleware-layers would expose it in a different way." ContentLicense="CC BY-SA 4.0" />
  <row Id="13566" PostHistoryTypeId="2" PostId="3620" RevisionGUID="ac7a013d-f69e-4401-b79c-e5e03fcc5b27" CreationDate="2022-07-05T18:37:50.250" UserId="32" Text="I wanted to try out AccountIndex feature on Westend: [https://wiki.polkadot.network/docs/learn-accounts#indices][1] and claimed an index: [https://westend.subscan.io/extrinsic/11590551-2][2]&#xD;&#xA;&#xD;&#xA;When I try to do balance transfer using the Account Index on Polkadot-JS Apps UI, the transaction fails. Any idea why this is happening?&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-accounts#indices&#xD;&#xA;  [2]: https://westend.subscan.io/extrinsic/11590551-2&#xD;&#xA;  [3]: https://i.stack.imgur.com/hvGBB.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13568" PostHistoryTypeId="1" PostId="3620" RevisionGUID="ac7a013d-f69e-4401-b79c-e5e03fcc5b27" CreationDate="2022-07-05T18:37:50.250" UserId="32" Text="Balance transfer fails when sending to the AccountIndex" ContentLicense="CC BY-SA 4.0" />
  <row Id="13569" PostHistoryTypeId="3" PostId="3620" RevisionGUID="ac7a013d-f69e-4401-b79c-e5e03fcc5b27" CreationDate="2022-07-05T18:37:50.250" UserId="32" Text="|polkadot-js|runtime|balances|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13570" PostHistoryTypeId="2" PostId="3621" RevisionGUID="26dc3568-ad79-44ae-9671-659a02459af9" CreationDate="2022-07-05T18:46:31.657" UserId="29" Text="If I understand your question correctly, there is the `node-template` with Aura:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/6a946fc36d68b89599d7ca1ab03803d10c78468c/bin/node-template/runtime/src/lib.rs#L280&#xD;&#xA;&#xD;&#xA;...and there is `node` with Babe here:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/6a946fc36d68b89599d7ca1ab03803d10c78468c/bin/node/runtime/src/lib.rs#L1583&#xD;&#xA;&#xD;&#xA;Both are in-sync with latest release." ContentLicense="CC BY-SA 4.0" />
  <row Id="13572" PostHistoryTypeId="2" PostId="3622" RevisionGUID="da16412a-4eda-4272-94d2-4772b4fc0ce2" CreationDate="2022-07-05T19:00:39.757" UserId="29" Text="When I run:&#xD;&#xA;```&#xD;&#xA;$ curl -X POST --data '{&quot;id&quot;: 1, &quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;eth_getLogs&quot;,&quot;params&quot;: [{&quot;address&quot;:&quot;0x841ce48f9446c8e281d3f1444cb859b4a6d0738c&quot;, &quot;topics&quot;:[], &quot;fromBlock&quot;: &quot;0x14D7F5&quot;, &quot;toBlock&quot;: &quot;0x14D7F7&quot;}]}' https://rpc.astar.network:8545 -H &quot;Content-Type: application/json&quot; &#xD;&#xA;```&#xD;&#xA;I get the following result:&#xD;&#xA;```&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:[{&quot;address&quot;:&quot;0x841ce48f9446c8e281d3f1444cb859b4a6d0738c&quot;,&quot;blockHash&quot;:&quot;0x7afa51ec6ef05e41cd4cbe8879f4ecc6a765f7892e547f6341b4b1392381ea96&quot;,&quot;blockNumber&quot;:&quot;0x14d7f6&quot;,&quot;data&quot;:&quot;0x5cd11dbc09c77658576c5c498fb2f4c69d23fdba95df1c42bc494a9f3afc0bab00000000000000000000000027ee985d1e446ec71c277c89cd877ec4eeaa236c00000000000000000000000027ee985d1e446ec71c277c89cd877ec4eeaa236c0000000000000000000000006a2d262d56735dba19dd70682b39f6be9a931d980000000000000000000000000000000000000000000000000000000005ebb0b60000000000000000000000000000000000000000000000000000000000000038e446e1edeb0820082749ec71be560d667c964744fa39cf179ee1f6b8b6826cb8&quot;,&quot;logIndex&quot;:&quot;0x10&quot;,&quot;removed&quot;:false,&quot;topics&quot;:[&quot;0x79fa08de5149d912dce8e5e8da7a7c17ccdf23dd5d3bfe196802e6eb86347c7c&quot;],&quot;transactionHash&quot;:&quot;0xb92e1c21bbeb31f6854456a1529faa3dcea79de446ecfdc92118aca3aed9b40f&quot;,&quot;transactionIndex&quot;:&quot;0x6&quot;,&quot;transactionLogIndex&quot;:&quot;0x1&quot;}],&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I do not see an empty array." ContentLicense="CC BY-SA 4.0" />
  <row Id="13574" PostHistoryTypeId="5" PostId="3601" RevisionGUID="87d3eaaa-8c19-42dc-8dde-f497c6710dfa" CreationDate="2022-07-05T20:09:02.637" UserId="29" Comment="added 14 characters in body" Text="I'm trying to figure out with OCW. And have a question is it possible to configure OCW so that if one node starts an HTTP call in OCW other nodes will skip it. I checked all examples I could find regarding OCW and it looks like a synchronization mechanism with off-chain storage working for OCWs from different pallets in one node. Also tried to use is_validator but it returns true for both nodes even if I start it without the validator flag. What I'm trying to achieve is when some event happens OCW sends a request to an external service and starts some job, and job results after success are stored on-chain. &#xD;&#xA;&#xD;&#xA;    #[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;		fn offchain_worker(block_number: T::BlockNumber) {&#xD;&#xA;			log::info!(&quot;OCW {:?}&quot;, block_number);&#xD;&#xA;			if &lt;frame_system::Pallet&lt;T&gt;&gt;::read_events_no_consensus()&#xD;&#xA;				.into_iter()&#xD;&#xA;				.filter_map(|event_record| {&#xD;&#xA;					let local_event = &lt;T as Config&gt;::Event::from(event_record.event);&#xD;&#xA;					local_event.try_into().ok()&#xD;&#xA;				})&#xD;&#xA;				.any(|event| matches!(event, Event::SomethingStored(..)))&#xD;&#xA;			{&#xD;&#xA;				let should_send = Self::choose_transaction_type(block_number);&#xD;&#xA;				let res = match should_send {&#xD;&#xA;					TransactionType::Signed =&gt; Self::call_api_and_send_transaction(),&#xD;&#xA;					TransactionType::None =&gt; Ok(()),&#xD;&#xA;				};&#xD;&#xA;				if let Err(e) = res {&#xD;&#xA;					log::error!(&quot;Error: {}&quot;, e);&#xD;&#xA;				}&#xD;&#xA;				log::info!(&quot;Hello world from OCW {:?}&quot;, block_number);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		fn choose_transaction_type(block_number: T::BlockNumber) -&gt; TransactionType {&#xD;&#xA;			const RECENTLY_SENT: () = ();&#xD;&#xA;			log::info!(&quot;Choose transaction &quot;);&#xD;&#xA;			let val = StorageValueRef::persistent(b&quot;example_ocw::last_send&quot;);&#xD;&#xA;&#xD;&#xA;			let res =&#xD;&#xA;				val.mutate(|last_send: Result&lt;Option&lt;T::BlockNumber&gt;, StorageRetrievalError&gt;| {&#xD;&#xA;					match last_send {&#xD;&#xA;						Ok(Some(block)) if block_number &lt; block + T::GracePeriod::get() =&gt; {&#xD;&#xA;							log::info!(&quot;Recently Send &quot;);&#xD;&#xA;							Err(RECENTLY_SENT)&#xD;&#xA;						},&#xD;&#xA;						_ =&gt; Ok(block_number),&#xD;&#xA;					}&#xD;&#xA;				});&#xD;&#xA;&#xD;&#xA;			match res {&#xD;&#xA;				Ok(_block_number) =&gt; TransactionType::Signed,&#xD;&#xA;				Err(MutateStorageError::ValueFunctionFailed(RECENTLY_SENT)) =&gt; {&#xD;&#xA;					TransactionType::None&#xD;&#xA;				},&#xD;&#xA;&#xD;&#xA;				Err(MutateStorageError::ConcurrentModification(_)) =&gt; TransactionType::None,&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn call_api_and_send_transaction() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;			//TODO&#xD;&#xA;			let validator = sp_io::offchain::is_validator();&#xD;&#xA;&#xD;&#xA;			if validator {&#xD;&#xA;				log::info!(&quot;Call api and send transaction &quot;);&#xD;&#xA;				log::info!(&quot;is validator {:?} &quot;, validator);&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;starting node 1&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain dev \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-cors all \&#xD;&#xA;--ws-external \&#xD;&#xA;--rpc-external \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;starting node 2&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/bob \  &#xD;&#xA;--chain dev \&#xD;&#xA;--bob \  &#xD;&#xA;--port 30334 \&#xD;&#xA;--ws-port 9946 \&#xD;&#xA;--rpc-port 9934 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13575" PostHistoryTypeId="6" PostId="3620" RevisionGUID="a1794686-c8ac-420c-bd33-6ff3e19536b1" CreationDate="2022-07-05T20:20:35.293" UserId="34" Comment="edited tags; edited tags" Text="|polkadot-js|balances|error|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13576" PostHistoryTypeId="6" PostId="3595" RevisionGUID="cb14f2cc-71a6-4eac-b18e-be594e42f03d" CreationDate="2022-07-05T20:22:50.860" UserId="34" Comment="edited tags" Text="|substrate-node|frontier|evm|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13577" PostHistoryTypeId="5" PostId="3595" RevisionGUID="cb14f2cc-71a6-4eac-b18e-be594e42f03d" CreationDate="2022-07-05T20:22:50.860" UserId="34" Comment="edited tags" Text="With recent updates in frontier eth_getLogs is returning empty array&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -X POST --data '{&quot;id&quot;: 1, &quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;eth_getLogs&quot;,&quot;params&quot;: [{&quot;address&quot;:&quot;0x841ce48f9446c8e281d3f1444cb859b4a6d0738c&quot;, &quot;topics&quot;:[], &quot;fromBlock&quot;: &quot;0x14D7F5&quot;, &quot;toBlock&quot;: &quot;0x14D7F7&quot;}]}' https://rpc.astar.network:8545 (https://rpc.astar.network:8545/) -H &quot;Content-Type: application/json&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While the logs are there in block explorer https://blockscout.com/astar/tx/0xb92e1c21bbeb31f6854456a1529faa3dcea79de446ecfdc92118aca3aed9b40f/logs" ContentLicense="CC BY-SA 4.0" />
  <row Id="13578" PostHistoryTypeId="4" PostId="3595" RevisionGUID="cb14f2cc-71a6-4eac-b18e-be594e42f03d" CreationDate="2022-07-05T20:22:50.860" UserId="34" Comment="edited tags" Text="eth_getLogs is returning empty array on Astar" ContentLicense="CC BY-SA 4.0" />
  <row Id="13579" PostHistoryTypeId="2" PostId="3623" RevisionGUID="c6fe7a7f-daca-4ed7-9b2d-19fe91bb312d" CreationDate="2022-07-05T21:05:39.220" UserId="29" Text="This is not supported on-chain:&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/fb2c9ae0eece5a79356f7e7271cf3232f0143b0c/runtime/westend/src/lib.rs#L155&#xD;&#xA;&#xD;&#xA;You always need to do the id lookup off-chain.&#xD;&#xA;&#xD;&#xA;The second parameter of AccountIdLookup is the id which is set to `()` aka &quot;nothing&quot;.&#xD;&#xA;&#xD;&#xA;This was done to make the benchmarking predictable. Otherwise the worst case of each extrinsic would include the lookup of the ID to accountId.&#xD;&#xA;&#xD;&#xA;Thanks Basti for this answer." ContentLicense="CC BY-SA 4.0" />
  <row Id="13582" PostHistoryTypeId="2" PostId="3624" RevisionGUID="d69e0519-3c2c-4b69-a22c-418759e6ce94" CreationDate="2022-07-05T22:04:02.623" UserId="590" Text="I am trying to understand the constrains in the batching function. &#xD;&#xA;&#xD;&#xA;    	fn batched_calls_limit() -&gt; u32 {&#xD;&#xA;			let allocator_limit = sp_core::MAX_POSSIBLE_ALLOCATION;&#xD;&#xA;			let call_size = ((sp_std::mem::size_of::&lt;&lt;T as Config&gt;::Call&gt;() as u32 + CALL_ALIGN -&#xD;&#xA;				1) / CALL_ALIGN) * CALL_ALIGN;&#xD;&#xA;			// The margin to take into account vec doubling capacity.&#xD;&#xA;			let margin_factor = 3;&#xD;&#xA;&#xD;&#xA;			allocator_limit / margin_factor / call_size&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;Can someone please explain these constraints in more detail? Why do we need these?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13584" PostHistoryTypeId="1" PostId="3624" RevisionGUID="d69e0519-3c2c-4b69-a22c-418759e6ce94" CreationDate="2022-07-05T22:04:02.623" UserId="590" Text="Batching limitations" ContentLicense="CC BY-SA 4.0" />
  <row Id="13585" PostHistoryTypeId="3" PostId="3624" RevisionGUID="d69e0519-3c2c-4b69-a22c-418759e6ce94" CreationDate="2022-07-05T22:04:02.623" UserId="590" Text="|runtime|extrinsic|batch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13586" PostHistoryTypeId="52" PostId="3620" RevisionGUID="6532e5ee-3ecc-459f-ba44-b9813307a117" CreationDate="2022-07-06T02:38:29.820" />
  <row Id="13587" PostHistoryTypeId="2" PostId="3625" RevisionGUID="de64d5cf-55bc-4d92-896d-513936aff7ee" CreationDate="2022-07-06T03:02:19.180" UserId="181" Text="I have some code in a Substrate client that needs to call one of my runtime apis. I'd like an easy way to mock the client and custom runtime api functions to check that they're called.&#xD;&#xA;&#xD;&#xA;Is there an easy way to mock both? I was trying out [substrate-test-runtime][1] but don't see a proper way to get it working, and am wondering if there's something better.&#xD;&#xA;&#xD;&#xA;Here's a simplified example of a function that I would like to test looks like:&#xD;&#xA;```rust&#xD;&#xA;fn example_call&lt;B, C&gt;(&#xD;&#xA;	client: Arc&lt;C&gt;,&#xD;&#xA;)&#xD;&#xA;where&#xD;&#xA;	B: BlockT,&#xD;&#xA;	C: ProvideRuntimeApi&lt;B&gt; + HeaderBackend&lt;B&gt;,&#xD;&#xA;	C::Api: ConstructExtrinsicApi&lt;B&gt;,&#xD;&#xA;{&#xD;&#xA;	let best_hash = client.info().best_hash;&#xD;&#xA;	client.runtime_api()&#xD;&#xA;		.my_arbitrary_runtime_api_fn(&amp;generic::BlockId::Hash(best_hash));&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/test-utils/runtime/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="13589" PostHistoryTypeId="1" PostId="3625" RevisionGUID="de64d5cf-55bc-4d92-896d-513936aff7ee" CreationDate="2022-07-06T03:02:19.180" UserId="181" Text="Ways to mock client + custom runtime api from client side" ContentLicense="CC BY-SA 4.0" />
  <row Id="13590" PostHistoryTypeId="3" PostId="3625" RevisionGUID="de64d5cf-55bc-4d92-896d-513936aff7ee" CreationDate="2022-07-06T03:02:19.180" UserId="181" Text="|testing|client|mock|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13591" PostHistoryTypeId="5" PostId="3518" RevisionGUID="a14400be-7790-4311-82e8-e2b53c5f7d8f" CreationDate="2022-07-06T03:53:59.310" UserId="2355" Comment="adding an important import" Text="https://www.shawntabrizi.com/substrate-js-utilities/&#xD;&#xA;&#xD;&#xA;Source: https://github.com/shawntabrizi/substrate-js-utilities&#xD;&#xA;&#xD;&#xA;```JavaScript&#xD;&#xA;import { u8aToHex } from &quot;@polkadot/util&quot;;&#xD;&#xA;&#xD;&#xA;/* AccountId to Hex */&#xD;&#xA;let a2h = {&#xD;&#xA;	&quot;account&quot;: document.getElementById(&quot;account-a2h&quot;),&#xD;&#xA;	&quot;hex&quot;: document.getElementById(&quot;hex-a2h&quot;)&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;a2h.account.addEventListener(&quot;input&quot;, account2hex);&#xD;&#xA;a2h.hex.addEventListener(&quot;input&quot;, hex2account);&#xD;&#xA;&#xD;&#xA;function account2hex() {&#xD;&#xA;	try {&#xD;&#xA;		a2h.hex.value = u8aToHex(decodeAddress(a2h.account.value));&#xD;&#xA;	} catch (e) {&#xD;&#xA;		a2h.hex.value = &quot;Error&quot;;&#xD;&#xA;		console.error(e);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function hex2account() {&#xD;&#xA;	try {&#xD;&#xA;		a2h.account.value = encodeAddress(a2h.hex.value);&#xD;&#xA;	} catch (e) {&#xD;&#xA;		a2h.account.value = &quot;Error&quot;;&#xD;&#xA;		console.error(e);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13592" PostHistoryTypeId="24" PostId="3518" RevisionGUID="a14400be-7790-4311-82e8-e2b53c5f7d8f" CreationDate="2022-07-06T03:53:59.310" Comment="Proposed by 2355 approved by 34 edit id of 227" ContentLicense="CC BY-SA 4.0" />
  <row Id="13593" PostHistoryTypeId="5" PostId="3342" RevisionGUID="fb8e60da-d6d1-46f9-807a-4292cf18d46b" CreationDate="2022-07-06T03:54:44.793" UserId="88" Comment="Format markdown in codeblock" Text="Everyone.&#xD;&#xA;I am getting this error.&#xD;&#xA;Here is my Codebase: https://github.com/WB-Expert5007/Poa_to_Pos&#xD;&#xA;Please help me.&#xD;&#xA;&#xD;&#xA;```console&#xD;&#xA;Compiling node-template v4.0.0-dev (/home/mersaid/Documents/HARRY/Task/Climacoin/node)&#xD;&#xA;error[E0432]: unresolved import substrate_frame_rpc_system::LightSystem&#xD;&#xA;--&gt; node/src/rpc.rs:196:35&#xD;&#xA;|&#xD;&#xA;196 | use substrate_frame_rpc_system::{LightSystem, SystemApi};&#xD;&#xA;| ^^^^^^^^^^^ no LightSystem in the root&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: could not find light in sc_client_api&#xD;&#xA;--&gt; node/src/rpc.rs:61:48&#xD;&#xA;|&#xD;&#xA;61 | pub remote_blockchain: Arc&lt;dyn sc_client_api::light::RemoteBlockchain&gt;,&#xD;&#xA;| ^^^^^ could not find light in sc_client_api&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: could not find light in sc_client_api&#xD;&#xA;--&gt; node/src/rpc.rs:192:20&#xD;&#xA;|&#xD;&#xA;192 | F: sc_client_api::light::Fetcher + 'static,&#xD;&#xA;| ^^^^^ could not find light in sc_client_api&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is Error Image.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DSHAZ.png&#xD;&#xA;&#xD;&#xA;Please help me.&#xD;&#xA;Best Regards." ContentLicense="CC BY-SA 4.0" />
  <row Id="13594" PostHistoryTypeId="24" PostId="3342" RevisionGUID="fb8e60da-d6d1-46f9-807a-4292cf18d46b" CreationDate="2022-07-06T03:54:44.793" Comment="Proposed by 88 approved by 34 edit id of 226" ContentLicense="CC BY-SA 4.0" />
  <row Id="13595" PostHistoryTypeId="5" PostId="3559" RevisionGUID="6bcdc839-55ed-4dee-b56a-b8062133b750" CreationDate="2022-07-06T03:55:11.483" UserId="1824" Comment="Improve formatting" Text="I have followed [this tutorial][1], which adds the Contracts pallet to a Substrate runtime, and get the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;amit@amit-Swift-SF315-41:~/Substrate/New/substrate-node-template$ cargo check -p node-template-runtime&#xD;&#xA;    Blocking waiting for file lock on package cache&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;error: failed to get `pallet-contracts` as a dependency of package `node-template-runtime v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load source for dependency `pallet-contracts`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech/substrate.git?tag=latest&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to find tag `latest`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  reference 'refs/remotes/origin/tags/latest' not found; class=Reference (4); code=NotFound (-3)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/" ContentLicense="CC BY-SA 4.0" />
  <row Id="13596" PostHistoryTypeId="4" PostId="3559" RevisionGUID="6bcdc839-55ed-4dee-b56a-b8062133b750" CreationDate="2022-07-06T03:55:11.483" UserId="1824" Comment="Improve formatting" Text="Error adding Contract pallet to runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="13597" PostHistoryTypeId="6" PostId="3559" RevisionGUID="6bcdc839-55ed-4dee-b56a-b8062133b750" CreationDate="2022-07-06T03:55:11.483" UserId="1824" Comment="Improve formatting" Text="|substrate-node-template|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13598" PostHistoryTypeId="24" PostId="3559" RevisionGUID="6bcdc839-55ed-4dee-b56a-b8062133b750" CreationDate="2022-07-06T03:55:11.483" Comment="Proposed by 1824 approved by 34 edit id of 228" ContentLicense="CC BY-SA 4.0" />
  <row Id="13606" PostHistoryTypeId="2" PostId="3628" RevisionGUID="47519dfd-a1b1-4e5b-93a6-eec598f5431f" CreationDate="2022-07-06T08:24:12.637" UserId="2663" Text="I have the same problem of [this post][1] but `cargo clean` and `cargo check` doesn’t fix it.&#xD;&#xA;&#xD;&#xA;This is my terminal output:&#xD;&#xA;&#xD;&#xA;    Updating crates.io index&#xD;&#xA;    error: failed to select a version for the requirement wasmtime = &quot;^0.38.0&quot;`&#xD;&#xA;    candidate versions found which didn't match: 0.37.0, 0.36.0, 0.35.3, ...&#xD;&#xA;    location searched: crates.io index&#xD;&#xA;    required by package sp-wasm-interface v6.0.0 (/substrate/primitives/wasm-interface)&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3529/fix-failed-to-select-a-version-for-the-requirement-crate-version" ContentLicense="CC BY-SA 4.0" />
  <row Id="13608" PostHistoryTypeId="1" PostId="3628" RevisionGUID="47519dfd-a1b1-4e5b-93a6-eec598f5431f" CreationDate="2022-07-06T08:24:12.637" UserId="2663" Text="failed to select a version for the requirement wasmtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="13609" PostHistoryTypeId="3" PostId="3628" RevisionGUID="47519dfd-a1b1-4e5b-93a6-eec598f5431f" CreationDate="2022-07-06T08:24:12.637" UserId="2663" Text="|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13610" PostHistoryTypeId="2" PostId="3629" RevisionGUID="4cb87a76-5da3-44cb-8f5d-4a487a42d887" CreationDate="2022-07-06T08:24:20.120" UserId="234" Text="There is also the `/accounts/{address}/validate` endpoint in [Sidecar][1] which takes a ss58 or hex (from a u8 array) formatted address and returns the following information :&#xD;&#xA;&#xD;&#xA; - isValid&#xD;&#xA; - ss58Prefix&#xD;&#xA; - network&#xD;&#xA; - **accountId**&#xD;&#xA;&#xD;&#xA;You can find more info regarding this endpoint :&#xD;&#xA;- in [Sidecar docs][2] &#xD;&#xA;- in the latest [PR][3] where the `accountId` was added&#xD;&#xA;- in the corresponding function `validateAddress` in [sidecar code][4] (`src/services/accounts/AccountsValidateService.ts`)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-api-sidecar&#xD;&#xA;  [2]: https://paritytech.github.io/substrate-api-sidecar/dist/&#xD;&#xA;  [3]: https://github.com/paritytech/substrate-api-sidecar/pull/926&#xD;&#xA;  [4]: https://github.com/paritytech/substrate-api-sidecar/blob/2a3702e2b9b21228dbb949d0f0dd71cd878c4fc6/src/services/accounts/AccountsValidateService.ts#L38" ContentLicense="CC BY-SA 4.0" />
  <row Id="13616" PostHistoryTypeId="2" PostId="3631" RevisionGUID="97cab656-b0be-4226-b894-2a6836456326" CreationDate="2022-07-06T08:36:48.297" UserId="393" Text="1. &quot;And have a question is it possible to configure OCW so that if one node starts an HTTP call in OCW other nodes will skip it&quot;, It just work in the way you expect, only the author of current block can run the ocw function.&#xD;&#xA;&#xD;&#xA;2. What you should pay attention to is: maintain the job with block number, and make sure one job will be processed only once." ContentLicense="CC BY-SA 4.0" />
  <row Id="13622" PostHistoryTypeId="2" PostId="3632" RevisionGUID="f7ee1814-b458-4dbe-b000-9ffe0ced9dac" CreationDate="2022-07-06T09:02:00.277" UserId="2163" Text="Beefy is running on top of grandpa and it is generating the MMR which is sent to the other chain(e.g Ethereum). AFAIU MMR only consists of block header hashes that are generated using ECDSA. So the other blockchain is receiving this MMR. What can this actually be used for if there aren't any transactions or data stored in this MMR other than this hashes? I am probably missing something so I hope someone could clarify this to me :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13624" PostHistoryTypeId="1" PostId="3632" RevisionGUID="f7ee1814-b458-4dbe-b000-9ffe0ced9dac" CreationDate="2022-07-06T09:02:00.277" UserId="2163" Text="What is beefy used for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13625" PostHistoryTypeId="3" PostId="3632" RevisionGUID="f7ee1814-b458-4dbe-b000-9ffe0ced9dac" CreationDate="2022-07-06T09:02:00.277" UserId="2163" Text="|learning|beefy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13626" PostHistoryTypeId="5" PostId="3624" RevisionGUID="39b28c93-ff8b-472c-9eeb-cba01bb48974" CreationDate="2022-07-06T09:05:49.687" UserId="28" Comment="deleted 5 characters in body; edited tags" Text="I am trying to understand the constrains in the batching function. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn batched_calls_limit() -&gt; u32 {&#xD;&#xA;	let allocator_limit = sp_core::MAX_POSSIBLE_ALLOCATION;&#xD;&#xA;	let call_size = ((sp_std::mem::size_of::&lt;&lt;T as Config&gt;::Call&gt;() as u32 + CALL_ALIGN -&#xD;&#xA;		1) / CALL_ALIGN) * CALL_ALIGN;&#xD;&#xA;	// The margin to take into account vec doubling capacity.&#xD;&#xA;	let margin_factor = 3;&#xD;&#xA;&#xD;&#xA;	allocator_limit / margin_factor / call_size&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can someone please explain these constraints in more detail? Why do we need these?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13627" PostHistoryTypeId="6" PostId="3624" RevisionGUID="39b28c93-ff8b-472c-9eeb-cba01bb48974" CreationDate="2022-07-06T09:05:49.687" UserId="28" Comment="deleted 5 characters in body; edited tags" Text="|runtime|extrinsic|batch|memory|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13629" PostHistoryTypeId="2" PostId="3633" RevisionGUID="406428f8-adf6-4430-b17b-7f1e46f5ef60" CreationDate="2022-07-06T09:23:27.793" UserId="28" Text="Within the Wasm environment, there is a limited memory size available and accessible by the memory allocator.&#xD;&#xA;&#xD;&#xA;This code attempts to calculate the safe limits of nested calls which would not cause memory allocation errors." ContentLicense="CC BY-SA 4.0" />
  <row Id="13631" PostHistoryTypeId="2" PostId="3634" RevisionGUID="b4fd7dd6-cc2e-4851-9cea-886b493cd260" CreationDate="2022-07-06T09:49:25.027" UserId="1984" Text="Let's say I want to build a wallet, and instead of adding chains manually, I want to track and add/remove them automatically.&#xD;&#xA;&#xD;&#xA;My idea was to combine the data in the [ss58-registry](https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json) and the [production endpoints](https://github.com/polkadot-js/apps/blob/0884b314ae78f7f4187ca6777d4bd40ce47acc2d/packages/apps-config/src/endpoints/production.ts) (the `network` and `info` attributes seem to match), so I have access to both the token and account info as well as endpoints.&#xD;&#xA;&#xD;&#xA;Is there an easier or more reliable way of doing that? Or a recommended way?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13633" PostHistoryTypeId="1" PostId="3634" RevisionGUID="b4fd7dd6-cc2e-4851-9cea-886b493cd260" CreationDate="2022-07-06T09:49:25.027" UserId="1984" Text="Keeping up with (para)chains and their endpoints" ContentLicense="CC BY-SA 4.0" />
  <row Id="13634" PostHistoryTypeId="3" PostId="3634" RevisionGUID="b4fd7dd6-cc2e-4851-9cea-886b493cd260" CreationDate="2022-07-06T09:49:25.027" UserId="1984" Text="|polkadot-js|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13636" PostHistoryTypeId="2" PostId="3635" RevisionGUID="d2e1b0ac-9eef-4350-85cf-63b53456876b" CreationDate="2022-07-06T10:26:56.883" UserId="2384" Text="I always get confused and never got a clear picture of all these terms: `parachain`, `relaychain`, `collators`, `validator`, `stand-alone node` etc.&#xD;&#xA;&#xD;&#xA;I can't figure out a way to understand connecting all these terms together. While I read over docs I have been hit by prashes like: *main responsibility of relaychain is to coordinate the system as a whole, including parachains*. And *security is shared*&#xD;&#xA;&#xD;&#xA;I have dig into documentation several time but am not still sure what parachain is, how it related to relaychain, collators and other terms.&#xD;&#xA;&#xD;&#xA;Can you explain how all these pieces come together. And also give an example of what happen when I do simple `transfer` transaction. How the block with that transfer is produced, who produce it, where it is validated, what effect it brings to parachain/relaychain and all." ContentLicense="CC BY-SA 4.0" />
  <row Id="13638" PostHistoryTypeId="1" PostId="3635" RevisionGUID="d2e1b0ac-9eef-4350-85cf-63b53456876b" CreationDate="2022-07-06T10:26:56.883" UserId="2384" Text="How are relaychain, parachain, collators, validators work together" ContentLicense="CC BY-SA 4.0" />
  <row Id="13639" PostHistoryTypeId="3" PostId="3635" RevisionGUID="d2e1b0ac-9eef-4350-85cf-63b53456876b" CreationDate="2022-07-06T10:26:56.883" UserId="2384" Text="|substrate-node|parachain|parachain-collator|relay-chain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13640" PostHistoryTypeId="2" PostId="3636" RevisionGUID="691fd966-4dc7-4aa0-80d3-4272ddf6915a" CreationDate="2022-07-06T11:11:37.890" UserId="620" Text="You might want to check out https://polkadot.network/blog/the-path-of-a-parachain-block/&#xD;&#xA;&#xD;&#xA;I wrote it before most of the code was implemented, so some things are out of date (e.g., there are no fishermen) and some are just implemented differently (e.g., the struct that defines a PoV). But it should give a generally accurate conceptual understanding of how these pieces relate to each other." ContentLicense="CC BY-SA 4.0" />
  <row Id="13642" PostHistoryTypeId="52" PostId="3635" RevisionGUID="c0ebe430-0aa7-4ed8-a225-db35b3a76190" CreationDate="2022-07-06T18:27:11.663" />
  <row Id="13643" PostHistoryTypeId="5" PostId="2841" RevisionGUID="de0c8944-6e49-4f1e-b325-6c252f8ae3c6" CreationDate="2022-07-06T19:03:39.193" UserId="590" Comment="added 119 characters in body" Text="My understand in substrate is that there are three types of dispatches, normal, operational, and mandatory.&#xD;&#xA;&#xD;&#xA;This types of dispatch classes can consume a portion of the total weight in a block.&#xD;&#xA;&#xD;&#xA;I can use `AvailableBlockRatio` to set the percentage that normal transactions can consume in a block.&#xD;&#xA;&#xD;&#xA;Is there a way to extend that functionality. I want to limit the amount of weight an extrinsic can consume in a block.&#xD;&#xA;&#xD;&#xA;I would like to further divide the allocated weight for normal dispatch classes.&#xD;&#xA;&#xD;&#xA;For example, when attempting to add a transaction in a block, if the weight limit allocated for that transaction has been reached the transaction get added back into the transaction pool." ContentLicense="CC BY-SA 4.0" />
  <row Id="13644" PostHistoryTypeId="2" PostId="3637" RevisionGUID="f174bb55-befd-4181-9bd4-69298eca3444" CreationDate="2022-07-06T20:26:43.377" UserId="555" Text="I have successfully performed storage migration on standalone chain. But how to do this for parachain ?&#xD;&#xA;Like, How/what wasm should be upload of new version and Where Should I upload ?&#xD;&#xA;Is there any different process from standalone to do this ?&#xD;&#xA;&#xD;&#xA;Thanks in advance !!" ContentLicense="CC BY-SA 4.0" />
  <row Id="13646" PostHistoryTypeId="1" PostId="3637" RevisionGUID="f174bb55-befd-4181-9bd4-69298eca3444" CreationDate="2022-07-06T20:26:43.377" UserId="555" Text="How to add storage migration in parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13647" PostHistoryTypeId="3" PostId="3637" RevisionGUID="f174bb55-befd-4181-9bd4-69298eca3444" CreationDate="2022-07-06T20:26:43.377" UserId="555" Text="|polkadot-js|parachain|storage|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13648" PostHistoryTypeId="5" PostId="3602" RevisionGUID="fa9bc40b-0e13-452e-9303-a09c92eda0f2" CreationDate="2022-07-07T03:46:55.300" UserId="2846" Comment="added 131 characters in body" Text="i try to subscribe a account change event by code follow document https://polkadot.js.org/docs/api/start/api.query.subs&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;  const unsub = api.query.system.account(address, (acc) =&gt; console.log);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells the unsub will be a UnsubscribePromise type.&#xD;&#xA;but it actully return Promise\&lt;Codec\&gt; type.&#xD;&#xA;&#xD;&#xA;how can i get the UnsubscribePromise Type to unsubscribe it.&#xD;&#xA;&#xD;&#xA;update&#xD;&#xA;&#xD;&#xA;i wrote a demo code &#xD;&#xA;&#xD;&#xA;[deom code][1]&#xD;&#xA;&#xD;&#xA;and try to compile it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;➜  sub git:(master) pnpm build&#xD;&#xA;&#xD;&#xA;&gt; sub@0.0.0 build /srv/tmp/sub&#xD;&#xA;&gt; tsc &amp;&amp; vite build&#xD;&#xA;&#xD;&#xA;src/pok/pok.ts:6:53 - error TS7006: Parameter 'acc' implicitly has an 'any' type.&#xD;&#xA;&#xD;&#xA;6     const unsub = await api.query.system.account('',acc =&gt;console.log);&#xD;&#xA;                                                      ~~~&#xD;&#xA;&#xD;&#xA;src/pok/pok.ts:10:5 - error TS2349: This expression is not callable.&#xD;&#xA;  Type 'Codec' has no call signatures.&#xD;&#xA;&#xD;&#xA;10     unsub()&#xD;&#xA;       ~~~~~&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Found 2 errors in the same file, starting at: src/pok/pok.ts:6&#xD;&#xA;&#xD;&#xA; ELIFECYCLE  Command failed with exit code 2.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells me Type 'Codec' has no call signatures.&#xD;&#xA;&#xD;&#xA;update 2 &#xD;&#xA;&#xD;&#xA;i make a workspace on gitpod&#xD;&#xA;&#xD;&#xA;[demo workspace][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kulame/subtest/blob/e82e1b288c650ecb1aeec802967aebfc732fb6cf/src/pok/pok.ts#L3&#xD;&#xA;  [2]: https://kulame-subtest-4t9s5ehgr99.ws-us52.gitpod.io" ContentLicense="CC BY-SA 4.0" />
  <row Id="13649" PostHistoryTypeId="5" PostId="3602" RevisionGUID="df3e44ff-d6b3-43b4-8564-77a93789a211" CreationDate="2022-07-07T03:48:07.797" UserId="2846" Comment="added 393 characters in body" Text="i try to subscribe a account change event by code follow document https://polkadot.js.org/docs/api/start/api.query.subs&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;  const unsub = api.query.system.account(address, (acc) =&gt; console.log);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells the unsub will be a UnsubscribePromise type.&#xD;&#xA;but it actully return Promise\&lt;Codec\&gt; type.&#xD;&#xA;&#xD;&#xA;how can i get the UnsubscribePromise Type to unsubscribe it.&#xD;&#xA;&#xD;&#xA;update&#xD;&#xA;&#xD;&#xA;i wrote a demo code &#xD;&#xA;&#xD;&#xA;[deom code][1]&#xD;&#xA;&#xD;&#xA;and try to compile it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;➜  sub git:(master) pnpm build&#xD;&#xA;&#xD;&#xA;&gt; sub@0.0.0 build /srv/tmp/sub&#xD;&#xA;&gt; tsc &amp;&amp; vite build&#xD;&#xA;&#xD;&#xA;src/pok/pok.ts:6:53 - error TS7006: Parameter 'acc' implicitly has an 'any' type.&#xD;&#xA;&#xD;&#xA;6     const unsub = await api.query.system.account('',acc =&gt;console.log);&#xD;&#xA;                                                      ~~~&#xD;&#xA;&#xD;&#xA;src/pok/pok.ts:10:5 - error TS2349: This expression is not callable.&#xD;&#xA;  Type 'Codec' has no call signatures.&#xD;&#xA;&#xD;&#xA;10     unsub()&#xD;&#xA;       ~~~~~&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Found 2 errors in the same file, starting at: src/pok/pok.ts:6&#xD;&#xA;&#xD;&#xA; ELIFECYCLE  Command failed with exit code 2.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells me Type 'Codec' has no call signatures.&#xD;&#xA;&#xD;&#xA;update 2 &#xD;&#xA;&#xD;&#xA;i make a workspace on gitpod&#xD;&#xA;&#xD;&#xA;[demo workspace][2]&#xD;&#xA;&#xD;&#xA;it can show the error message on terminel tab.&#xD;&#xA;&#xD;&#xA;'''&#xD;&#xA;$ tsc &amp;&amp; vite build&#xD;&#xA;src/pok/pok.ts:11:5 - error TS2349: This expression is not callable.&#xD;&#xA;  Type 'Codec' has no call signatures.&#xD;&#xA;&#xD;&#xA;11     unsub()&#xD;&#xA;       ~~~~~&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Found 1 error in src/pok/pok.ts:11&#xD;&#xA;&#xD;&#xA;error Command failed with exit code 2.&#xD;&#xA;info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kulame/subtest/blob/e82e1b288c650ecb1aeec802967aebfc732fb6cf/src/pok/pok.ts#L3&#xD;&#xA;  [2]: https://kulame-subtest-4t9s5ehgr99.ws-us52.gitpod.io" ContentLicense="CC BY-SA 4.0" />
  <row Id="13650" PostHistoryTypeId="5" PostId="3602" RevisionGUID="e1c96f82-6f63-4159-af0e-9126064eec16" CreationDate="2022-07-07T03:48:33.813" UserId="2846" Comment="deleted 339 characters in body" Text="i try to subscribe a account change event by code follow document https://polkadot.js.org/docs/api/start/api.query.subs&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;  const unsub = api.query.system.account(address, (acc) =&gt; console.log);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells the unsub will be a UnsubscribePromise type.&#xD;&#xA;but it actully return Promise\&lt;Codec\&gt; type.&#xD;&#xA;&#xD;&#xA;how can i get the UnsubscribePromise Type to unsubscribe it.&#xD;&#xA;&#xD;&#xA;update&#xD;&#xA;&#xD;&#xA;i wrote a demo code &#xD;&#xA;&#xD;&#xA;[deom code][1]&#xD;&#xA;&#xD;&#xA;and try to compile it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;➜  sub git:(master) pnpm build&#xD;&#xA;&#xD;&#xA;&gt; sub@0.0.0 build /srv/tmp/sub&#xD;&#xA;&gt; tsc &amp;&amp; vite build&#xD;&#xA;&#xD;&#xA;src/pok/pok.ts:6:53 - error TS7006: Parameter 'acc' implicitly has an 'any' type.&#xD;&#xA;&#xD;&#xA;6     const unsub = await api.query.system.account('',acc =&gt;console.log);&#xD;&#xA;                                                      ~~~&#xD;&#xA;&#xD;&#xA;src/pok/pok.ts:10:5 - error TS2349: This expression is not callable.&#xD;&#xA;  Type 'Codec' has no call signatures.&#xD;&#xA;&#xD;&#xA;10     unsub()&#xD;&#xA;       ~~~~~&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Found 2 errors in the same file, starting at: src/pok/pok.ts:6&#xD;&#xA;&#xD;&#xA; ELIFECYCLE  Command failed with exit code 2.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it tells me Type 'Codec' has no call signatures.&#xD;&#xA;&#xD;&#xA;update 2 &#xD;&#xA;&#xD;&#xA;i make a workspace on gitpod&#xD;&#xA;&#xD;&#xA;[demo workspace][2]&#xD;&#xA;&#xD;&#xA;it can show the error message on terminel tab.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kulame/subtest/blob/e82e1b288c650ecb1aeec802967aebfc732fb6cf/src/pok/pok.ts#L3&#xD;&#xA;  [2]: https://kulame-subtest-4t9s5ehgr99.ws-us52.gitpod.io" ContentLicense="CC BY-SA 4.0" />
  <row Id="13657" PostHistoryTypeId="2" PostId="3639" RevisionGUID="78c259ec-c759-451e-967b-4c6e15ebe0a4" CreationDate="2022-07-07T06:51:53.027" UserId="28" Text="There is no official registry of parachain information at the moment; the ss58-registry is about as close to official as it can be.&#xD;&#xA;&#xD;&#xA;So doing something like you are suggesting is a solid choice in my opinion." ContentLicense="CC BY-SA 4.0" />
  <row Id="13659" PostHistoryTypeId="2" PostId="3640" RevisionGUID="24b19b9f-aecd-46f0-8683-938c0fedeb65" CreationDate="2022-07-07T07:03:17.763" UserId="2854" Text="The setup is:&#xD;&#xA;- polkadot-launch&#xD;&#xA;- 1 relay chain: polkadot-0.9.18 rococo&#xD;&#xA;- 2 parachains: moonbeam-0.24.0 moonbase-local&#xD;&#xA;  - paraId 1000&#xD;&#xA;  - paraId 1001&#xD;&#xA;- open hrmp channel via polkadot-launch&#xD;&#xA;&#xD;&#xA;Transferring DOT between Relay chain and parachain is ok:&#xD;&#xA;1. `assetManager.registerForeignAsset`&#xD;&#xA;2. `assetManager.setAssetUnitsPerSecond`&#xD;&#xA;3. relay chain -&gt; parachain `xcmPallet.limitedReserveTransferAssets`&#xD;&#xA;4. parachain -&gt; relay chain `xtokens.transfer`&#xD;&#xA;&#xD;&#xA;However, transferring parachain native token between 2 Moonbeam parachains is failed:&#xD;&#xA;parachain 1001 -&gt; parachain 1000&#xD;&#xA;1. On parachain 1000:&#xD;&#xA;`assetManager.registerForeignAsset`&#xD;&#xA;2. On parachain 1000: `assetManager.setAssetUnitsPerSecond`&#xD;&#xA;3. On parachain 1001:&#xD;&#xA;`xTokens.transfer` This step failed on parachain 1000. The error log is as follows:&#xD;&#xA;```&#xD;&#xA;2022-07-07 11:14:00.028 TRACE tokio-runtime-worker xcm::should_execute: [] &#xD;&#xA;did not pass barrier: &#xD;&#xA;origin: &#xD;&#xA;    MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, &#xD;&#xA;message: &#xD;&#xA;    Xcm([ReserveAssetDeposited(&#xD;&#xA;        MultiAssets([&#xD;&#xA;            MultiAsset {&#xD;&#xA;                id: Concrete(&#xD;&#xA;                    MultiLocation {&#xD;&#xA;                        parents: 1,&#xD;&#xA;                        interior: X2(Parachain(1001), PalletInstance(3))&#xD;&#xA;            }),&#xD;&#xA;                fun: Fungible(1000000000)&#xD;&#xA;        }&#xD;&#xA;    ])),&#xD;&#xA;    ClearOrigin,&#xD;&#xA;    BuyExecution {&#xD;&#xA;        fees: MultiAsset {&#xD;&#xA;            id: Concrete(MultiLocation {&#xD;&#xA;                parents: 1,&#xD;&#xA;                interior: X2(Parachain(1001), PalletInstance(3))&#xD;&#xA;            }),&#xD;&#xA;            fun: Fungible(1000000000)&#xD;&#xA;        },&#xD;&#xA;        weight_limit: Limited(100)&#xD;&#xA;    },&#xD;&#xA;    DepositAsset {&#xD;&#xA;        assets: Wild(All),&#xD;&#xA;        max_assets: 1,&#xD;&#xA;        beneficiary: MultiLocation {&#xD;&#xA;            parents: 0,&#xD;&#xA;            interior: X1(AccountKey20 {&#xD;&#xA;                network: Any,&#xD;&#xA;                key: [&#xD;&#xA;                    242,&#xD;&#xA;                    79,&#xD;&#xA;                    243,&#xD;&#xA;                    169,&#xD;&#xA;                    207,&#xD;&#xA;                    4,&#xD;&#xA;                    199,&#xD;&#xA;                    29,&#xD;&#xA;                    188,&#xD;&#xA;                    148,&#xD;&#xA;                    208,&#xD;&#xA;                    181,&#xD;&#xA;                    102,&#xD;&#xA;                    247,&#xD;&#xA;                    162,&#xD;&#xA;                    123,&#xD;&#xA;                    148,&#xD;&#xA;                    86,&#xD;&#xA;                    108,&#xD;&#xA;                    172&#xD;&#xA;                ]&#xD;&#xA;            })&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;]) &#xD;&#xA;max_weight: 400000000, &#xD;&#xA;weight_credit: 0&#xD;&#xA;&#xD;&#xA;2022-07-07 11:14:00.028 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: [] Barrier blocked execution! Error: (). (origin: MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }, weight_limit: Limited(100) }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountKey20 { network: Any, key: [242, 79, 243, 169, 207, 4, 199, 29, 188, 148, 208, 181, 102, 247, 162, 123, 148, 86, 108, 172] }) } }]), weight_limit: 41666666666, weight_credit: 0)    &#xD;&#xA;2022-07-07 11:14:00.028 ERROR tokio-runtime-worker cumulus_pallet_xcmp_queue: [] Failed to process XCMP-XCM message, caused by Barrier   &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13661" PostHistoryTypeId="1" PostId="3640" RevisionGUID="24b19b9f-aecd-46f0-8683-938c0fedeb65" CreationDate="2022-07-07T07:03:17.763" UserId="2854" Text="XCM Barrier blocked execution: when transferring XC-20 between 2 local Moonbase parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="13662" PostHistoryTypeId="3" PostId="3640" RevisionGUID="24b19b9f-aecd-46f0-8683-938c0fedeb65" CreationDate="2022-07-07T07:03:17.763" UserId="2854" Text="|polkadot|xcm|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13663" PostHistoryTypeId="5" PostId="3640" RevisionGUID="0ef0f276-77e2-4d52-98c9-71656ab9f3d6" CreationDate="2022-07-07T07:04:47.973" UserId="2854" Comment="added 130 characters in body" Text="The setup is:&#xD;&#xA;- polkadot-launch&#xD;&#xA;- 1 relay chain: polkadot-0.9.18 rococo&#xD;&#xA;- 2 parachains: moonbeam-0.24.0 moonbase-local&#xD;&#xA;  - paraId 1000&#xD;&#xA;  - paraId 1001&#xD;&#xA;- open hrmp channel via polkadot-launch&#xD;&#xA;&#xD;&#xA;Transferring DOT between Relay chain and parachain is ok:&#xD;&#xA;1. `assetManager.registerForeignAsset`&#xD;&#xA;2. `assetManager.setAssetUnitsPerSecond`&#xD;&#xA;3. relay chain -&gt; parachain `xcmPallet.limitedReserveTransferAssets`&#xD;&#xA;4. parachain -&gt; relay chain `xtokens.transfer`&#xD;&#xA;&#xD;&#xA;However, transferring parachain native token between 2 Moonbeam parachains is failed:&#xD;&#xA;parachain 1001 -&gt; parachain 1000&#xD;&#xA;1. On parachain 1000:&#xD;&#xA;`assetManager.registerForeignAsset`&#xD;&#xA;2. On parachain 1000: `assetManager.setAssetUnitsPerSecond`&#xD;&#xA;3. On parachain 1001:&#xD;&#xA;`xTokens.transfer` This step failed on parachain 1000. &#xD;&#xA;Maybe the xcm multilocation is wrong.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;The error log is as follows:&#xD;&#xA;```&#xD;&#xA;2022-07-07 11:14:00.028 TRACE tokio-runtime-worker xcm::should_execute: [] &#xD;&#xA;did not pass barrier: &#xD;&#xA;origin: &#xD;&#xA;    MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, &#xD;&#xA;message: &#xD;&#xA;    Xcm([ReserveAssetDeposited(&#xD;&#xA;        MultiAssets([&#xD;&#xA;            MultiAsset {&#xD;&#xA;                id: Concrete(&#xD;&#xA;                    MultiLocation {&#xD;&#xA;                        parents: 1,&#xD;&#xA;                        interior: X2(Parachain(1001), PalletInstance(3))&#xD;&#xA;            }),&#xD;&#xA;                fun: Fungible(1000000000)&#xD;&#xA;        }&#xD;&#xA;    ])),&#xD;&#xA;    ClearOrigin,&#xD;&#xA;    BuyExecution {&#xD;&#xA;        fees: MultiAsset {&#xD;&#xA;            id: Concrete(MultiLocation {&#xD;&#xA;                parents: 1,&#xD;&#xA;                interior: X2(Parachain(1001), PalletInstance(3))&#xD;&#xA;            }),&#xD;&#xA;            fun: Fungible(1000000000)&#xD;&#xA;        },&#xD;&#xA;        weight_limit: Limited(100)&#xD;&#xA;    },&#xD;&#xA;    DepositAsset {&#xD;&#xA;        assets: Wild(All),&#xD;&#xA;        max_assets: 1,&#xD;&#xA;        beneficiary: MultiLocation {&#xD;&#xA;            parents: 0,&#xD;&#xA;            interior: X1(AccountKey20 {&#xD;&#xA;                network: Any,&#xD;&#xA;                key: [&#xD;&#xA;                    242,&#xD;&#xA;                    79,&#xD;&#xA;                    243,&#xD;&#xA;                    169,&#xD;&#xA;                    207,&#xD;&#xA;                    4,&#xD;&#xA;                    199,&#xD;&#xA;                    29,&#xD;&#xA;                    188,&#xD;&#xA;                    148,&#xD;&#xA;                    208,&#xD;&#xA;                    181,&#xD;&#xA;                    102,&#xD;&#xA;                    247,&#xD;&#xA;                    162,&#xD;&#xA;                    123,&#xD;&#xA;                    148,&#xD;&#xA;                    86,&#xD;&#xA;                    108,&#xD;&#xA;                    172&#xD;&#xA;                ]&#xD;&#xA;            })&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;]) &#xD;&#xA;max_weight: 400000000, &#xD;&#xA;weight_credit: 0&#xD;&#xA;&#xD;&#xA;2022-07-07 11:14:00.028 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: [] Barrier blocked execution! Error: (). (origin: MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }, weight_limit: Limited(100) }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountKey20 { network: Any, key: [242, 79, 243, 169, 207, 4, 199, 29, 188, 148, 208, 181, 102, 247, 162, 123, 148, 86, 108, 172] }) } }]), weight_limit: 41666666666, weight_credit: 0)    &#xD;&#xA;2022-07-07 11:14:00.028 ERROR tokio-runtime-worker cumulus_pallet_xcmp_queue: [] Failed to process XCMP-XCM message, caused by Barrier   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eXLpp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13664" PostHistoryTypeId="5" PostId="3637" RevisionGUID="7ba37a48-be6e-439c-aad4-dcd329ab5930" CreationDate="2022-07-07T07:37:15.283" UserId="555" Comment="added 291 characters in body" Text="I have successfully performed storage migration on standalone chain. But how to do this for parachain ?&#xD;&#xA;Like, How/what wasm should be upload of new version and Where Should I upload ?&#xD;&#xA;Is there any different process from standalone to do this ?&#xD;&#xA;&#xD;&#xA;If I'm simply upload the upgraded wasm, the blocks remains finalising but **sudo.sudoUncheckedWeight&#xD;&#xA;    ready** : [![enter image description here][1]][1]&#xD;&#xA;this process will not complete.&#xD;&#xA;Can anyone please help me to solve this problem ?&#xD;&#xA;&#xD;&#xA;Thanks in advance !!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LzYkS.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13665" PostHistoryTypeId="5" PostId="3618" RevisionGUID="f8e166b0-1e54-4604-9fe2-51288fbb8332" CreationDate="2022-07-07T07:39:36.383" UserId="2132" Comment="Cleanups after linting" Text="You are trying to use TypeScript results (static code analysis) without having augmentation applied. See the JS API [TS augmentation FAQ](https://polkadot.js.org/docs/api/FAQ#since-upgrading-to-the-7x-series-typescript-augmentation-is-missing) on how to apply the correct types for your environment.&#xD;&#xA;&#xD;&#xA;Effectively while the runtime is correctly decorated in all cases, for TypeScript you need to apply the augmentation overrides for your specific chain to help at coding-analysis time - here it doesn't have access to the on-chain metadata. Since all chains are different (different methods, arguments, etc.) for the static analysis the editors needs a bit of help to &quot;pick the right one&quot;.&#xD;&#xA;&#xD;&#xA;An example of applying augmentation for TS -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// apply augmentation first, before any usage&#xD;&#xA;import &quot;@polkadot/api-augment&quot;&#xD;&#xA;&#xD;&#xA;// normal imports&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;&#xD;&#xA;&#xD;&#xA;// do stuff&#xD;&#xA;async function main () {&#xD;&#xA;	const api = await ApiPromise.create({&#xD;&#xA;		provider: new WsProvider(&quot;wss://kusama-rpc.polkadot.io&quot;)&#xD;&#xA;	})&#xD;&#xA;&#xD;&#xA;	// hu is VoidFn&#xD;&#xA;	// hdr is Header&#xD;&#xA;	const hu = await api.rpc.chain.subscribeAllHeads((hdr) =&gt;&#xD;&#xA;		console.log(hdr.number.toString())&#xD;&#xA;	)&#xD;&#xA;&#xD;&#xA;	// qu is VoidFn&#xD;&#xA;	// acc is FrameSystemAccountInfo&#xD;&#xA;	const qu = await api.query.system.account(&quot;&quot;, (acc) =&gt;&#xD;&#xA;		console.log(acc.consumers.toNumber())&#xD;&#xA;	)&#xD;&#xA;&#xD;&#xA;	// unsubscribe&#xD;&#xA;	qu()&#xD;&#xA;	hu()&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13666" PostHistoryTypeId="6" PostId="2781" RevisionGUID="fd2896ad-464e-4e8c-a2c9-0f5d7eed4883" CreationDate="2022-07-07T07:40:24.183" UserId="165" Comment="edited tags" Text="|substrate-node|polkadot|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13667" PostHistoryTypeId="2" PostId="3641" RevisionGUID="e0546f9a-7e9d-4530-a783-1522b2e53af0" CreationDate="2022-07-07T08:18:12.510" UserId="382" Text="BEEFY + MMR on chainA is an extra consensus protocol (extra because it relies on chainA's native consensus) to be used by light clients for lightweight syncing and subsequent following of chainA.&#xD;&#xA;&#xD;&#xA;This light client can be, like you say, an Ethereum smart contract in case of a ChainA &lt;-&gt; Ethereum bridge; but it can be any other use-case where a light client is preferred.&#xD;&#xA;&#xD;&#xA;The light client only needs to understand BEEFY+MMR in order to follow chainA finality; it **doesn't** need to understand GRANDPA (which is more complex), and it doesn't need to sync any of the blocks, or even their headers.&#xD;&#xA;For example, it could follow chainA just by subscribing to BEEFY Justifications and only process those.&#xD;&#xA;The MMR pallet also provides RPC endpoints to generate and/or verify proofs that particular blocks are part of the MMR (and thus, the chain).&#xD;&#xA;&#xD;&#xA;Higher level protocols are meant to build on the consensus guarantees that BEEFY+MMR provides.&#xD;&#xA;&#xD;&#xA;For example, a light client could exclusively work with on-demand block retrieval, where it can request some full-node for block N, then request a MMR-proof for it and verify it against its own MMR.&#xD;&#xA;Maintaining the MMR in the light client has very little overhead as it is pruned, and only contains hashes.&#xD;&#xA;&#xD;&#xA;There is also [some documentation](https://github.com/paritytech/grandpa-bridge-gadget/blob/master/docs/beefy.md) available for BEEFY, but it's work in progress." ContentLicense="CC BY-SA 4.0" />
  <row Id="13669" PostHistoryTypeId="2" PostId="3642" RevisionGUID="8b49e668-70aa-488e-895b-6ef11cbdf5c8" CreationDate="2022-07-07T08:35:04.297" UserId="2846" Text="I have two Balance type.&#xD;&#xA;```&#xD;&#xA;const a = registry.createType&lt;Balance&gt;('Balance', 10)&#xD;&#xA;const b = registry.createType&lt;Balance&gt;('Balance', 20)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there a simpler way to calculate them?  eg (+ - x /)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13671" PostHistoryTypeId="1" PostId="3642" RevisionGUID="8b49e668-70aa-488e-895b-6ef11cbdf5c8" CreationDate="2022-07-07T08:35:04.297" UserId="2846" Text="Is there a simpler way to calculate Balance type" ContentLicense="CC BY-SA 4.0" />
  <row Id="13672" PostHistoryTypeId="3" PostId="3642" RevisionGUID="8b49e668-70aa-488e-895b-6ef11cbdf5c8" CreationDate="2022-07-07T08:35:04.297" UserId="2846" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13673" PostHistoryTypeId="5" PostId="3640" RevisionGUID="5f02b9a8-c095-424b-b34b-4b9f2f96e746" CreationDate="2022-07-07T08:53:39.483" UserId="2854" Comment="deleted 14 characters in body" Text="The setup is:&#xD;&#xA;- polkadot-launch&#xD;&#xA;- 1 relay chain: polkadot-0.9.18 rococo&#xD;&#xA;- 2 parachains: moonbeam-0.24.0 moonbase-local&#xD;&#xA;  - paraId 1000&#xD;&#xA;  - paraId 1001&#xD;&#xA;- open hrmp channel via polkadot-launch&#xD;&#xA;&#xD;&#xA;Transferring DOT between Relay chain and parachain is ok:&#xD;&#xA;1. `assetManager.registerForeignAsset`&#xD;&#xA;2. `assetManager.setAssetUnitsPerSecond`&#xD;&#xA;3. relay chain -&gt; parachain `xcmPallet.limitedReserveTransferAssets`&#xD;&#xA;4. parachain -&gt; relay chain `xtokens.transfer`&#xD;&#xA;&#xD;&#xA;However, transferring parachain native token between 2 Moonbeam parachains is failed:&#xD;&#xA;parachain 1001 -&gt; parachain 1000&#xD;&#xA;1. On parachain 1000:&#xD;&#xA;`assetManager.registerForeignAsset`&#xD;&#xA;2. On parachain 1000: `assetManager.setAssetUnitsPerSecond`&#xD;&#xA;3. On parachain 1001:&#xD;&#xA;`xTokens.transfer` This step failed.&#xD;&#xA; &#xD;&#xA;Maybe the xcm multilocation is wrong.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;The error log is as follows:&#xD;&#xA;```&#xD;&#xA;2022-07-07 11:14:00.028 TRACE tokio-runtime-worker xcm::should_execute: [] &#xD;&#xA;did not pass barrier: &#xD;&#xA;origin: &#xD;&#xA;    MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, &#xD;&#xA;message: &#xD;&#xA;    Xcm([ReserveAssetDeposited(&#xD;&#xA;        MultiAssets([&#xD;&#xA;            MultiAsset {&#xD;&#xA;                id: Concrete(&#xD;&#xA;                    MultiLocation {&#xD;&#xA;                        parents: 1,&#xD;&#xA;                        interior: X2(Parachain(1001), PalletInstance(3))&#xD;&#xA;            }),&#xD;&#xA;                fun: Fungible(1000000000)&#xD;&#xA;        }&#xD;&#xA;    ])),&#xD;&#xA;    ClearOrigin,&#xD;&#xA;    BuyExecution {&#xD;&#xA;        fees: MultiAsset {&#xD;&#xA;            id: Concrete(MultiLocation {&#xD;&#xA;                parents: 1,&#xD;&#xA;                interior: X2(Parachain(1001), PalletInstance(3))&#xD;&#xA;            }),&#xD;&#xA;            fun: Fungible(1000000000)&#xD;&#xA;        },&#xD;&#xA;        weight_limit: Limited(100)&#xD;&#xA;    },&#xD;&#xA;    DepositAsset {&#xD;&#xA;        assets: Wild(All),&#xD;&#xA;        max_assets: 1,&#xD;&#xA;        beneficiary: MultiLocation {&#xD;&#xA;            parents: 0,&#xD;&#xA;            interior: X1(AccountKey20 {&#xD;&#xA;                network: Any,&#xD;&#xA;                key: [&#xD;&#xA;                    242,&#xD;&#xA;                    79,&#xD;&#xA;                    243,&#xD;&#xA;                    169,&#xD;&#xA;                    207,&#xD;&#xA;                    4,&#xD;&#xA;                    199,&#xD;&#xA;                    29,&#xD;&#xA;                    188,&#xD;&#xA;                    148,&#xD;&#xA;                    208,&#xD;&#xA;                    181,&#xD;&#xA;                    102,&#xD;&#xA;                    247,&#xD;&#xA;                    162,&#xD;&#xA;                    123,&#xD;&#xA;                    148,&#xD;&#xA;                    86,&#xD;&#xA;                    108,&#xD;&#xA;                    172&#xD;&#xA;                ]&#xD;&#xA;            })&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;]) &#xD;&#xA;max_weight: 400000000, &#xD;&#xA;weight_credit: 0&#xD;&#xA;&#xD;&#xA;2022-07-07 11:14:00.028 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: [] Barrier blocked execution! Error: (). (origin: MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }, weight_limit: Limited(100) }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountKey20 { network: Any, key: [242, 79, 243, 169, 207, 4, 199, 29, 188, 148, 208, 181, 102, 247, 162, 123, 148, 86, 108, 172] }) } }]), weight_limit: 41666666666, weight_credit: 0)    &#xD;&#xA;2022-07-07 11:14:00.028 ERROR tokio-runtime-worker cumulus_pallet_xcmp_queue: [] Failed to process XCMP-XCM message, caused by Barrier   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eXLpp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13675" PostHistoryTypeId="2" PostId="3643" RevisionGUID="c67b4fd9-4337-459e-abae-75c9c8573f92" CreationDate="2022-07-07T09:09:46.040" UserId="1970" Text="Any `Balance` type extends [bn.js (API docs)](https://polkadot.js.org/docs/api/start/types.basics#working-with-numbers) so it has all the [add, sub, etc.](https://github.com/indutny/bn.js/)&#xD;&#xA;&#xD;&#xA;This means for instance you can do -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const ex = api.consts.balances.existentialDeposit&#xD;&#xA;const val = ex.muln(2).addn(123)&#xD;&#xA;&#xD;&#xA;/* transfer 2 x existential + 123 */&#xD;&#xA;await api.tx.balances.transfer(&quot;...&quot;, val)&#xD;&#xA;&#xD;&#xA;/* if you wish to format different only */&#xD;&#xA;const fmt = api.createType(&quot;Balance&quot;, val).toHuman()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You generally don't want to or need to use `createType` the JS API will convert the inputs to the correct formats, e.g where a `Balance` is required in a call, anything of type string, hex, BN, BigInt, number will work and will be converted. &#xD;&#xA;&#xD;&#xA;In some cases, e.g. you want to add something and have stuff like `toHuman` in your code (as per the example above), it could be useful to create." ContentLicense="CC BY-SA 4.0" />
  <row Id="13677" PostHistoryTypeId="5" PostId="3640" RevisionGUID="56cf78ee-4649-49b7-a306-f3fd485257e0" CreationDate="2022-07-07T09:22:22.293" UserId="2854" Comment="added 166 characters in body" Text="The setup is:&#xD;&#xA;- polkadot-launch&#xD;&#xA;- 1 relay chain: polkadot-0.9.18 rococo&#xD;&#xA;- 2 parachains: moonbeam-0.24.0 moonbase-local&#xD;&#xA;  - paraId 1000&#xD;&#xA;  - paraId 1001&#xD;&#xA;- open hrmp channel via polkadot-launch&#xD;&#xA;&#xD;&#xA;Transferring DOT between Relay chain and parachain is ok:&#xD;&#xA;1. `assetManager.registerForeignAsset`&#xD;&#xA;2. `assetManager.setAssetUnitsPerSecond`&#xD;&#xA;3. relay chain -&gt; parachain `xcmPallet.limitedReserveTransferAssets`&#xD;&#xA;4. parachain -&gt; relay chain `xtokens.transfer`&#xD;&#xA;&#xD;&#xA;However, transferring parachain native token between 2 Moonbeam parachains is failed:&#xD;&#xA;parachain 1001 -&gt; parachain 1000&#xD;&#xA;1. On parachain 1000:&#xD;&#xA;`assetManager.registerForeignAsset`&#xD;&#xA;2. On parachain 1000: `assetManager.setAssetUnitsPerSecond`&#xD;&#xA;3. On parachain 1001:&#xD;&#xA;`xTokens.transfer` This step failed.&#xD;&#xA;&#xD;&#xA;The sender parachain 1001 successfully send the xcm message, but receiver parachain 1000 throw an error when executing this message.&#xD;&#xA;&#xD;&#xA;Maybe the xcm multilocation is wrong.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;The error log of receiver parachain 1000 is as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-07-07 11:14:00.028 TRACE tokio-runtime-worker xcm::should_execute: [] &#xD;&#xA;did not pass barrier: &#xD;&#xA;origin: &#xD;&#xA;    MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, &#xD;&#xA;message: &#xD;&#xA;    Xcm([ReserveAssetDeposited(&#xD;&#xA;        MultiAssets([&#xD;&#xA;            MultiAsset {&#xD;&#xA;                id: Concrete(&#xD;&#xA;                    MultiLocation {&#xD;&#xA;                        parents: 1,&#xD;&#xA;                        interior: X2(Parachain(1001), PalletInstance(3))&#xD;&#xA;            }),&#xD;&#xA;                fun: Fungible(1000000000)&#xD;&#xA;        }&#xD;&#xA;    ])),&#xD;&#xA;    ClearOrigin,&#xD;&#xA;    BuyExecution {&#xD;&#xA;        fees: MultiAsset {&#xD;&#xA;            id: Concrete(MultiLocation {&#xD;&#xA;                parents: 1,&#xD;&#xA;                interior: X2(Parachain(1001), PalletInstance(3))&#xD;&#xA;            }),&#xD;&#xA;            fun: Fungible(1000000000)&#xD;&#xA;        },&#xD;&#xA;        weight_limit: Limited(100)&#xD;&#xA;    },&#xD;&#xA;    DepositAsset {&#xD;&#xA;        assets: Wild(All),&#xD;&#xA;        max_assets: 1,&#xD;&#xA;        beneficiary: MultiLocation {&#xD;&#xA;            parents: 0,&#xD;&#xA;            interior: X1(AccountKey20 {&#xD;&#xA;                network: Any,&#xD;&#xA;                key: [&#xD;&#xA;                    242,&#xD;&#xA;                    79,&#xD;&#xA;                    243,&#xD;&#xA;                    169,&#xD;&#xA;                    207,&#xD;&#xA;                    4,&#xD;&#xA;                    199,&#xD;&#xA;                    29,&#xD;&#xA;                    188,&#xD;&#xA;                    148,&#xD;&#xA;                    208,&#xD;&#xA;                    181,&#xD;&#xA;                    102,&#xD;&#xA;                    247,&#xD;&#xA;                    162,&#xD;&#xA;                    123,&#xD;&#xA;                    148,&#xD;&#xA;                    86,&#xD;&#xA;                    108,&#xD;&#xA;                    172&#xD;&#xA;                ]&#xD;&#xA;            })&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;]) &#xD;&#xA;max_weight: 400000000, &#xD;&#xA;weight_credit: 0&#xD;&#xA;&#xD;&#xA;2022-07-07 11:14:00.028 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: [] Barrier blocked execution! Error: (). (origin: MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }, weight_limit: Limited(100) }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountKey20 { network: Any, key: [242, 79, 243, 169, 207, 4, 199, 29, 188, 148, 208, 181, 102, 247, 162, 123, 148, 86, 108, 172] }) } }]), weight_limit: 41666666666, weight_credit: 0)    &#xD;&#xA;2022-07-07 11:14:00.028 ERROR tokio-runtime-worker cumulus_pallet_xcmp_queue: [] Failed to process XCMP-XCM message, caused by Barrier   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eXLpp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13678" PostHistoryTypeId="2" PostId="3644" RevisionGUID="c4cb4f69-63bd-4201-9694-88a8c026fca8" CreationDate="2022-07-07T09:27:50.743" UserId="429" Text="In my benchmarks, I've written multiple benchmarks for an extrinsic to cover different scenarios, which gave me WeightIinfo for each of my benchmarks.&#xD;&#xA;&#xD;&#xA;Now the question here is how I can pick the worst scenario for my extrinsic dynamically?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13680" PostHistoryTypeId="1" PostId="3644" RevisionGUID="c4cb4f69-63bd-4201-9694-88a8c026fca8" CreationDate="2022-07-07T09:27:50.743" UserId="429" Text="Weight selection for extrinsic in case of multiple bechmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="13681" PostHistoryTypeId="3" PostId="3644" RevisionGUID="c4cb4f69-63bd-4201-9694-88a8c026fca8" CreationDate="2022-07-07T09:27:50.743" UserId="429" Text="|weight|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13682" PostHistoryTypeId="2" PostId="3645" RevisionGUID="4da7f836-35df-40b5-bfca-be37800cafe6" CreationDate="2022-07-07T09:34:11.413" UserId="2856" Text="you can upgrade wslv2 in https://ubuntu.com/blog/ubuntu-on-wsl-2-is-generally-available , i was success! good luck !" ContentLicense="CC BY-SA 4.0" />
  <row Id="13685" PostHistoryTypeId="2" PostId="3646" RevisionGUID="dd8bd183-5839-4c8c-ae80-cfa044218ec4" CreationDate="2022-07-07T09:47:58.550" UserId="2340" Text="From a parachain, how to get the current relay chain block number?&#xD;&#xA;&#xD;&#xA;I would like to write a hook using the relay chain block as a trigger." ContentLicense="CC BY-SA 4.0" />
  <row Id="13687" PostHistoryTypeId="1" PostId="3646" RevisionGUID="dd8bd183-5839-4c8c-ae80-cfa044218ec4" CreationDate="2022-07-07T09:47:58.550" UserId="2340" Text="From a parachain, how to get the current relay chain block number?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13688" PostHistoryTypeId="3" PostId="3646" RevisionGUID="dd8bd183-5839-4c8c-ae80-cfa044218ec4" CreationDate="2022-07-07T09:47:58.550" UserId="2340" Text="|parachain|relay-chain|blocknumber|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13689" PostHistoryTypeId="2" PostId="3647" RevisionGUID="d92152e4-e1de-43d7-acd2-c1c857c31d3c" CreationDate="2022-07-07T10:23:58.407" UserId="3" Text="Say I have instances of this enum stored on-chain:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum Enum {&#xD;&#xA;    V0,&#xD;&#xA;    V1,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And suppose now that I can the enum in some way:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum Enum {&#xD;&#xA;    V0,&#xD;&#xA;    V2,&#xD;&#xA;    V1,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is what the [substrate docs](https://docs.substrate.io/reference/scale-codec/) say about the encoding of enums:&#xD;&#xA;&#xD;&#xA;&gt; A fixed number of variants, each mutually exclusive and potentially implying a further value or series of values. Encoded as the first byte identifying the index of the variant that the value is. Any further bytes are used to encode any data that the variant implies. Thus, no more than 256 variants are supported.&#xD;&#xA;&#xD;&#xA;So I would expect that a storage migration is required almost everytime the enum is changed (the are exceptions like adding a variant to the end of the enum under certain circumstances). Otherwise, entries which previously are `Enum::V1` are now `Enum::V2`. Is this correct?&#xD;&#xA;&#xD;&#xA;If so, does this also pertain to the `Error` and `Event` enums, or are these special cases?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13691" PostHistoryTypeId="1" PostId="3647" RevisionGUID="d92152e4-e1de-43d7-acd2-c1c857c31d3c" CreationDate="2022-07-07T10:23:58.407" UserId="3" Text="Does changing an enum require a storage migration? What about `Error` and `Event`" ContentLicense="CC BY-SA 4.0" />
  <row Id="13692" PostHistoryTypeId="3" PostId="3647" RevisionGUID="d92152e4-e1de-43d7-acd2-c1c857c31d3c" CreationDate="2022-07-07T10:23:58.407" UserId="3" Text="|storage|migration|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13693" PostHistoryTypeId="2" PostId="3648" RevisionGUID="ec8eed0b-50e0-42a7-a79b-b782b594fc0a" CreationDate="2022-07-07T10:33:56.357" UserId="2788" Text="I'm new to substrate and Polkadot and I'm coming from ETH/Solidity. I noticed many test tokens in my Polkadot.js wallet like DOT, LDOT, ACA, KSM, etc.&#xD;&#xA;&#xD;&#xA;I'm trying to code a dapp that lets my user send a specific token (say ACA) to another wallet. The closest tutorial I found is [this][1]. But it doesn't specify how do I send a particular token.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/start/api.tx/" ContentLicense="CC BY-SA 4.0" />
  <row Id="13695" PostHistoryTypeId="1" PostId="3648" RevisionGUID="ec8eed0b-50e0-42a7-a79b-b782b594fc0a" CreationDate="2022-07-07T10:33:56.357" UserId="2788" Text="How to send specific token (like ACA) using Polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="13696" PostHistoryTypeId="3" PostId="3648" RevisionGUID="ec8eed0b-50e0-42a7-a79b-b782b594fc0a" CreationDate="2022-07-07T10:33:56.357" UserId="2788" Text="|polkadot-js|transfer|token|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13697" PostHistoryTypeId="2" PostId="3649" RevisionGUID="3b30427d-d41c-4f10-92fd-b87ff697ec7a" CreationDate="2022-07-07T11:16:23.673" UserId="2835" Text="In the [example][1] the returned type is a reference to a contract which implements the `FromAccountId` trait. I would like to just have the contract address (`AccountId`) stored so that the frontend can create instances of the contract. Is there a way to do this? thank you!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/examples/delegator/lib.rs#L78" ContentLicense="CC BY-SA 4.0" />
  <row Id="13699" PostHistoryTypeId="1" PostId="3649" RevisionGUID="3b30427d-d41c-4f10-92fd-b87ff697ec7a" CreationDate="2022-07-07T11:16:23.673" UserId="2835" Text="Get instantiated contract address from deployer contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="13700" PostHistoryTypeId="3" PostId="3649" RevisionGUID="3b30427d-d41c-4f10-92fd-b87ff697ec7a" CreationDate="2022-07-07T11:16:23.673" UserId="2835" Text="|substrate-node|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13701" PostHistoryTypeId="2" PostId="3650" RevisionGUID="a76e121c-bd79-44cc-9441-e9f239e82b8f" CreationDate="2022-07-07T11:23:50.253" UserId="2835" Text="After a look into the rust doc, it is possible to use a lower level call to do this. &#xD;&#xA;&#xD;&#xA;https://docs.rs/ink_lang/latest/ink_lang/struct.EnvAccess.html#method.instantiate_contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="13703" PostHistoryTypeId="2" PostId="3651" RevisionGUID="7ab5bf81-bf43-4b9e-8949-faca5401ee84" CreationDate="2022-07-07T11:37:43.260" UserId="2025" Text="From what I understand from your question, if you just need to send a token between two accounts using polkadot.js you should check the corresponding Substrate runtime calls [exposed by the API](https://polkadot.js.org/docs/substrate/extrinsics#balances). In your case, I would say you are interested in using either:&#xD;&#xA;&#xD;&#xA; - `transfer(dest: MultiAddress, value: Compact&lt;u128&gt;)` or&#xD;&#xA; - `transferKeepAlive(dest: MultiAddress, value: Compact&lt;u128&gt;)`.&#xD;&#xA;&#xD;&#xA;As @forgetso commented above, you will need to be connected to the relevant parachain to send its native token. In case, you are connected to Statemint/Statemine (which support any number of arbitrary assets), have a look to [this guide](https://wiki.polkadot.network/docs/build-integrate-assets#assets-basics) on how to identify and manage different assets (tokens).&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="13705" PostHistoryTypeId="2" PostId="3652" RevisionGUID="ea8281b6-2045-4e19-80b7-8d5a951a368b" CreationDate="2022-07-07T12:08:45.957" UserId="213" Text="    const [status, setStatus] = useState(null)    &#xD;&#xA;    &#xD;&#xA;    const txResHandler = ( status, events, dispatchError, setSubmitting) =&gt; {&#xD;&#xA;            setSubmitting(true)&#xD;&#xA;            if (dispatchError) {&#xD;&#xA;              setStatus(null)&#xD;&#xA;              if (dispatchError.isModule) {&#xD;&#xA;                // for module errors, we have the section indexed, lookup&#xD;&#xA;                const decoded = api.registry.findMetaError(dispatchError.asModule)&#xD;&#xA;                const { docs, name, section } = decoded&#xD;&#xA;        &#xD;&#xA;                console.log(`${section}.${name}: ${docs.join(' ')}`)&#xD;&#xA;                setStatus(name)&#xD;&#xA;                setSubmitting(false)&#xD;&#xA;              } else {&#xD;&#xA;                console.log(dispatchError.toString())&#xD;&#xA;              }&#xD;&#xA;            } else if (status.isFinalized) {&#xD;&#xA;              setStatus(` Finalized. Block hash: ${status.asFinalized.toString()}`)&#xD;&#xA;        &#xD;&#xA;              setSubmitting(false)&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;If previous transaction gives an error `setStatus(name)` in if (dispatchError.isModule) block, then the status/name remains same in the next transaction till `status.isFinalized`, it's not reset to null. How can I remove the previous status?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13707" PostHistoryTypeId="1" PostId="3652" RevisionGUID="ea8281b6-2045-4e19-80b7-8d5a951a368b" CreationDate="2022-07-07T12:08:45.957" UserId="213" Text="Status in txResHandler is not reset on second call" ContentLicense="CC BY-SA 4.0" />
  <row Id="13708" PostHistoryTypeId="3" PostId="3652" RevisionGUID="ea8281b6-2045-4e19-80b7-8d5a951a368b" CreationDate="2022-07-07T12:08:45.957" UserId="213" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13709" PostHistoryTypeId="5" PostId="3647" RevisionGUID="c26fbab7-5b03-47b3-9c8a-3a55cb087e06" CreationDate="2022-07-07T12:23:41.807" UserId="3" Comment="added 3 characters in body" Text="Say I have instances of this enum stored on-chain:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum Enum {&#xD;&#xA;    V0,&#xD;&#xA;    V1,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And suppose now that I change the enum in some way:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum Enum {&#xD;&#xA;    V0,&#xD;&#xA;    V2,&#xD;&#xA;    V1,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is what the [substrate docs](https://docs.substrate.io/reference/scale-codec/) say about the encoding of enums:&#xD;&#xA;&#xD;&#xA;&gt; A fixed number of variants, each mutually exclusive and potentially implying a further value or series of values. Encoded as the first byte identifying the index of the variant that the value is. Any further bytes are used to encode any data that the variant implies. Thus, no more than 256 variants are supported.&#xD;&#xA;&#xD;&#xA;So I would expect that a storage migration is required almost everytime the enum is changed (there are exceptions like adding a variant to the end of the enum under certain circumstances). Otherwise, entries which previously are `Enum::V1` are now `Enum::V2`. Is this correct?&#xD;&#xA;&#xD;&#xA;If so, does this also pertain to the `Error` and `Event` enums, or are these special cases?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13710" PostHistoryTypeId="2" PostId="3653" RevisionGUID="5d3bd3af-c6e5-4d1f-8030-05cbef582817" CreationDate="2022-07-07T12:40:59.760" UserId="2788" Text="I'm new and I'm trying to get the transaction hash but I'm only getting `undefined`. I used this [tutorial][1] and [this][2] and below is my code.&#xD;&#xA;&#xD;&#xA;    const txHash = await polkadot.tx.balances&#xD;&#xA;      .transfer('5F1pZe.....GmZRSZuK', 100000000000)&#xD;&#xA;      .signAndSend(SENDER, { signer: injector.signer }, (status) =&gt; {&#xD;&#xA;    &#xD;&#xA;    		if (status.isInBlock) {&#xD;&#xA;    			console.log(`Completed at block hash #${status.isInBlock}`);&#xD;&#xA;    		} else {&#xD;&#xA;    			console.log(`Current status: ${status.type}`);&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	}).catch((error) =&gt; {&#xD;&#xA;    		console.log(':( transaction failed', error);&#xD;&#xA;    	});&#xD;&#xA;    &#xD;&#xA;    console.log(&quot;Submitted with hash&quot;, txHash.hash);&#xD;&#xA;&#xD;&#xA;I'm getting `undefined` for `txHash.hash`, `status.type`. I have another code that works but I wonder what's wrong with the above.&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/start/api.tx.subs/&#xD;&#xA;  [2]: https://polkadot.js.org/docs/extension/usage/" ContentLicense="CC BY-SA 4.0" />
  <row Id="13712" PostHistoryTypeId="1" PostId="3653" RevisionGUID="5d3bd3af-c6e5-4d1f-8030-05cbef582817" CreationDate="2022-07-07T12:40:59.760" UserId="2788" Text="Can't get transaction hash from signAndSend of Polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="13713" PostHistoryTypeId="3" PostId="3653" RevisionGUID="5d3bd3af-c6e5-4d1f-8030-05cbef582817" CreationDate="2022-07-07T12:40:59.760" UserId="2788" Text="|transactions|transfer|token|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13714" PostHistoryTypeId="2" PostId="3654" RevisionGUID="0a1ab0cd-25b4-4b64-bb22-7d3a0038b6bd" CreationDate="2022-07-07T12:41:16.387" UserId="165" Text=" 1. The way of updating clients is no other than just using the new version, and for that you then find yourself in the situation where a machine has to stop providing service while the client is updated. There is no way a client can be updated without stopping it for a short period of time.&#xD;&#xA; 2. For avoiding finalization stalling, as you notice on your post, you have to avoid 2/3 of your validators being down at the very same time. We can consider 50 nodes &quot;small&quot; as 2/3 of them is not such a big number, and even if you have control over all them, what is likely to happen is that you update the clients in batches, or maybe even all of them at once. So even if you are using some kind of orchestration. So you can find yourself in this situation if not taking care of always having at least 2/3 of them up.&#xD;&#xA;&#xD;&#xA;For that I would recommend, in case you control all nodes in your network, grouping them in fairly small groups (~ 10 nodes each for 50 validators), and proceed with updated by groups." ContentLicense="CC BY-SA 4.0" />
  <row Id="13716" PostHistoryTypeId="2" PostId="3655" RevisionGUID="438b5ef8-b725-42dd-809e-727ba50d9fe8" CreationDate="2022-07-07T12:47:10.980" UserId="28" Text="A storage migration is needed whenever the encoded representation of the storage changes.&#xD;&#xA;&#xD;&#xA;In the case of an enum, it is represented as one byte.&#xD;&#xA;&#xD;&#xA;In the original enum:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Enum::V0 == 0x00&#xD;&#xA;Enum::V1 == 0x01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the new enum:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Enum::V0 == 0x00&#xD;&#xA;Enum::V2 == 0x01&#xD;&#xA;Enum::V1 == 0x02&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in this case, yes, you would need to write a migration which would update all `0x01` to `0x02`. But if you updated your enum to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;enum Enum {&#xD;&#xA;    V0,&#xD;&#xA;    V1,&#xD;&#xA;    V2,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you wouldn't need to run a migration since `V0` and `V1` still encode the same.&#xD;&#xA;&#xD;&#xA;Basically, your blockchain storage it just bytes. If your data structure can parse those bytes correctly, you don't need a migration. If your data structure changes what the bytes means, then yes you need a migration.&#xD;&#xA;&#xD;&#xA;`Error` and `Event` enums are not normally placed in storage, so generally no, you do not need to write storage migrations. If they are put in storage, then yes you will, but then I will also suggest you don't put them in storage.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13718" PostHistoryTypeId="5" PostId="3637" RevisionGUID="ba6964da-16ba-4380-86e8-2397ebdb510e" CreationDate="2022-07-07T13:25:53.763" UserId="555" Comment="edited body" Text="I have successfully performed storage migration on standalone chain. But how to do this for parachain ?&#xD;&#xA;Like, How/what wasm should be upload of new version and Where Should I upload ?&#xD;&#xA;Is there any different process from standalone to do this ?&#xD;&#xA;&#xD;&#xA;If I'm simply upload the upgraded wasm, the blocks remains finalising but **sudo.sudoUncheckedWeight&#xD;&#xA;    ready** : [![enter image description here][1]][1]&#xD;&#xA;this process will not complete.&#xD;&#xA;Can anyone please help me to solve this problem ?&#xD;&#xA;&#xD;&#xA;Thanks in advance !!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/F8EU5.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13719" PostHistoryTypeId="2" PostId="3656" RevisionGUID="cd6fcb73-24ab-4068-85fe-5b8aa308ef62" CreationDate="2022-07-07T15:09:16.670" UserId="2379" Text="I am building an ocw demo, the code is from https://github.com/paritytech/substrate/blob/master/frame/examples/offchain-worker/src/lib.rs, when using polkadot-v0.9.25 version, it appears got this error: &#xD;&#xA;**cannot find trait `TryFrom` in this scope**, I'm sure this code work with polkadot-v0.9.18.&#xD;&#xA;&#xD;&#xA;Have read this question: https://substrate.stackexchange.com/questions/2739/problems-with-app-crypto-macro, but it didn't solve my problem, this question is so confusing why not found and where this error is triggered&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub mod crypto {&#xD;&#xA;	use super::KEY_TYPE;&#xD;&#xA;	use sp_core::sr25519::Signature as Sr25519Signature;&#xD;&#xA;	use sp_runtime::{&#xD;&#xA;		app_crypto::{app_crypto, sr25519},&#xD;&#xA;		traits::Verify,&#xD;&#xA;		MultiSignature, MultiSigner,&#xD;&#xA;	};&#xD;&#xA;	app_crypto!(sr25519, KEY_TYPE);&#xD;&#xA;&#xD;&#xA;	pub struct TestAuthId;&#xD;&#xA;&#xD;&#xA;	impl frame_system::offchain::AppCrypto&lt;MultiSigner, MultiSignature&gt; for TestAuthId {&#xD;&#xA;		type RuntimeAppPublic = Public;&#xD;&#xA;		type GenericSignature = sp_core::sr25519::Signature;&#xD;&#xA;		type GenericPublic = sp_core::sr25519::Public;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// implemented for mock runtime in test&#xD;&#xA;	impl frame_system::offchain::AppCrypto&lt;&lt;Sr25519Signature as Verify&gt;::Signer, Sr25519Signature&gt;&#xD;&#xA;		for TestAuthId&#xD;&#xA;	{&#xD;&#xA;		type RuntimeAppPublic = Public;&#xD;&#xA;		type GenericSignature = sp_core::sr25519::Signature;&#xD;&#xA;		type GenericPublic = sp_core::sr25519::Public;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Cargo.toml&#xD;&#xA;```&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;lite-json = { version = &quot;0.1&quot;, default-features = false }&#xD;&#xA;log = { version = &quot;0.4.17&quot;, default-features = false }&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Substrate packages&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot;, optional = true }&#xD;&#xA;frame-support      = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;frame-system       = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;sp-std             = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;sp-keystore             = { version = &quot;0.12.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot;, optional = true}&#xD;&#xA;sp-core = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;sp-io = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;sp-runtime = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;lite-json/std&quot;,&#xD;&#xA;	&quot;log/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-io/std&quot;,&#xD;&#xA;	&quot;sp-keystore&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;have tried `cargo clean`, `cargo update`, &#xD;&#xA;```&#xD;&#xA;rustup update&#xD;&#xA;rustup update nightly&#xD;&#xA;rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13721" PostHistoryTypeId="1" PostId="3656" RevisionGUID="cd6fcb73-24ab-4068-85fe-5b8aa308ef62" CreationDate="2022-07-07T15:09:16.670" UserId="2379" Text="app_crypto!(sr25519, KEY_TYPE): cannot find trait `TryFrom` in this scope" ContentLicense="CC BY-SA 4.0" />
  <row Id="13722" PostHistoryTypeId="3" PostId="3656" RevisionGUID="cd6fcb73-24ab-4068-85fe-5b8aa308ef62" CreationDate="2022-07-07T15:09:16.670" UserId="2379" Text="|substrate-node-template|offchain-worker|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13723" PostHistoryTypeId="2" PostId="3657" RevisionGUID="7be5ee5a-faad-4f47-b5ff-6a89ec3bad85" CreationDate="2022-07-07T15:20:41.597" UserId="2384" Text="I was following these tutorial: [start a local relay chain](https://docs.substrate.io/tutorials/connect-other-chains/local-relay/) and [connect a local parachain](https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/). Everything went fine.&#xD;&#xA;&#xD;&#xA;Then next I tried to run another collator ( let's call this `custom-parachain`) binary instead of `parachain-collator` ( both are based on polkadot v0.9.24)&#xD;&#xA;&#xD;&#xA;I created a raw-sepc file with correct `paraId` and tried to run `custom-collator` the same way I ran `parachain-collator`. But `custom-collator` is NOT acting as collator.&#xD;&#xA;&#xD;&#xA;While I do all this: I left `./polkadot --alice --validator` and `./polkadot --bob --validator` running in seperate terminal&#xD;&#xA;&#xD;&#xA;Only reason I could this why it is not working as expected is that there is some relation between chain spec used to run validator ( [here](https://github.com/substrate-developer-hub/substrate-docs/blob/main/static/assets/tutorials/cumulus/chain-specs/rococo-custom-2-raw.json) ) and spec generated by `parachain-collator`.&#xD;&#xA;&#xD;&#xA;But when I use `custom-collator` with it's generated raw spec, it's not acting as validator. When running `parachain-collator` I could see logs like:&#xD;&#xA;```&#xD;&#xA;2022-07-0720:46:18 [Relaychain]  New Rounds for validator set id: 2 with session_start 21    &#xD;&#xA;2022-07-07 0:46:18 [Relaychain]  New Rounds for validator set id: 3 with session_start 31    &#xD;&#xA;2022-07-07 20:46:18 [Relaychain]  New Rounds for validator set id: 4 with session_start 41&#xD;&#xA;```&#xD;&#xA;But running `custom-parachain` logs are:&#xD;&#xA;```&#xD;&#xA;2022-07-07 0:48:09  Idle (1 peers), best: #174 (0x8601…c0ec), finalized #161 (0xf1c3…087f), ⬇ 35.2kiB/s ⬆ 2.4kiB/s    &#xD;&#xA;2022-07-07 0:48:09  Idle (0 peers), best: #0 (0x98d0…0f65), finalized #0 (0x98d0…0f65), ⬇ 1.3kiB/s ⬆ 1.1kiB/s    &#xD;&#xA;2022-07-07 0:48:14  Idle (1 peers), best: #174 (0x8601…c0ec), finalized #170 (0x68a7…d58a), ⬇ 1.3kiB/s ⬆ 0.7kiB/s    &#xD;&#xA;2022-07-07 0:48:14  Idle (0 peers), best: #0 (0x98d0…0f65), finalized #0 (0x98d0…0f65), ⬇ 0.1kiB/s ⬆ 0.1kiB/s    &#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13725" PostHistoryTypeId="1" PostId="3657" RevisionGUID="7be5ee5a-faad-4f47-b5ff-6a89ec3bad85" CreationDate="2022-07-07T15:20:41.597" UserId="2384" Text="What is relation between relaychain validator &amp; collator" ContentLicense="CC BY-SA 4.0" />
  <row Id="13726" PostHistoryTypeId="3" PostId="3657" RevisionGUID="7be5ee5a-faad-4f47-b5ff-6a89ec3bad85" CreationDate="2022-07-07T15:20:41.597" UserId="2384" Text="|substrate-node|polkadot|validator|parachain-collator|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13727" PostHistoryTypeId="5" PostId="3657" RevisionGUID="73b4ca0e-a956-46ef-be4d-2e00f3357071" CreationDate="2022-07-07T15:24:01.613" UserId="29" Comment="edited body" Text="I was following these tutorial: [start a local relay chain](https://docs.substrate.io/tutorials/connect-other-chains/local-relay/) and [connect a local parachain](https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/). Everything went fine.&#xD;&#xA;&#xD;&#xA;Then next I tried to run another collator ( let's call this `custom-parachain`) binary instead of `parachain-collator` ( both are based on polkadot v0.9.24)&#xD;&#xA;&#xD;&#xA;I created a raw-spec file with correct `paraId` and tried to run `custom-collator` the same way I ran `parachain-collator`. But `custom-collator` is NOT acting as collator.&#xD;&#xA;&#xD;&#xA;While I do all this: I left `./polkadot --alice --validator` and `./polkadot --bob --validator` running in seperate terminal&#xD;&#xA;&#xD;&#xA;Only reason I could this why it is not working as expected is that there is some relation between chain spec used to run validator ( [here](https://github.com/substrate-developer-hub/substrate-docs/blob/main/static/assets/tutorials/cumulus/chain-specs/rococo-custom-2-raw.json) ) and spec generated by `parachain-collator`.&#xD;&#xA;&#xD;&#xA;But when I use `custom-collator` with it's generated raw spec, it's not acting as validator. When running `parachain-collator` I could see logs like:&#xD;&#xA;```&#xD;&#xA;2022-07-0720:46:18 [Relaychain]  New Rounds for validator set id: 2 with session_start 21    &#xD;&#xA;2022-07-07 0:46:18 [Relaychain]  New Rounds for validator set id: 3 with session_start 31    &#xD;&#xA;2022-07-07 20:46:18 [Relaychain]  New Rounds for validator set id: 4 with session_start 41&#xD;&#xA;```&#xD;&#xA;But running `custom-parachain` logs are:&#xD;&#xA;```&#xD;&#xA;2022-07-07 0:48:09  Idle (1 peers), best: #174 (0x8601…c0ec), finalized #161 (0xf1c3…087f), ⬇ 35.2kiB/s ⬆ 2.4kiB/s    &#xD;&#xA;2022-07-07 0:48:09  Idle (0 peers), best: #0 (0x98d0…0f65), finalized #0 (0x98d0…0f65), ⬇ 1.3kiB/s ⬆ 1.1kiB/s    &#xD;&#xA;2022-07-07 0:48:14  Idle (1 peers), best: #174 (0x8601…c0ec), finalized #170 (0x68a7…d58a), ⬇ 1.3kiB/s ⬆ 0.7kiB/s    &#xD;&#xA;2022-07-07 0:48:14  Idle (0 peers), best: #0 (0x98d0…0f65), finalized #0 (0x98d0…0f65), ⬇ 0.1kiB/s ⬆ 0.1kiB/s    &#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13728" PostHistoryTypeId="2" PostId="3658" RevisionGUID="b0e08e54-8d6b-48ca-8c9a-85d1c9594cd6" CreationDate="2022-07-07T15:30:22.527" UserId="80" Text="I am working on chain extension to call rmrk pallet methods. One of the methods needs a BoundedVec&lt;u8&gt; that I need to pass via ink smart contract. What data type can I use to do this on smart contract side? Is there a BoundedVec&lt;&gt; type on ink?&#xD;&#xA;&#xD;&#xA;I tried using Vec&lt;u8&gt; and then trying to convert it to BoundedVec in the chain extension in runtime but I get the following error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;env.read_as()?;&#xD;&#xA;      |                                                                                                &#xD;&#xA;      ^^^^^^^ the trait `MaxEncodedLen` is not implemented for `sp_runtime::sp_application_crypto::Vec&lt;u8&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The method signature on ink contract&#xD;&#xA;```&#xD;&#xA;fn create_collection(contract_address: AccountId, metadata: Vec&lt;u8&gt;, symbol: Vec&lt;u8&gt;) -&gt; Result&lt;CollectionId, RCError&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reading the arguments in the runtime&#xD;&#xA;```&#xD;&#xA;let (contract_address, metadata, symbol) : (AccountId, Vec&lt;u8&gt;, Vec&lt;u8&gt;) = env.read_as()?;&#xD;&#xA;```				" ContentLicense="CC BY-SA 4.0" />
  <row Id="13730" PostHistoryTypeId="1" PostId="3658" RevisionGUID="b0e08e54-8d6b-48ca-8c9a-85d1c9594cd6" CreationDate="2022-07-07T15:30:22.527" UserId="80" Text="How can I pass a Vec&lt;u8&gt; via chain extension to pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13731" PostHistoryTypeId="3" PostId="3658" RevisionGUID="b0e08e54-8d6b-48ca-8c9a-85d1c9594cd6" CreationDate="2022-07-07T15:30:22.527" UserId="80" Text="|ink|wasm|chain-extension|rmrk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13732" PostHistoryTypeId="4" PostId="3657" RevisionGUID="0a1f3cf6-4d01-4391-965d-b60a09b77e0f" CreationDate="2022-07-07T15:31:02.460" UserId="2384" Comment="Ask about spec" Text="What is relation between relaychain validator spec &amp; collator spec" ContentLicense="CC BY-SA 4.0" />
  <row Id="13733" PostHistoryTypeId="2" PostId="3659" RevisionGUID="81f5b530-7bd0-4019-acaa-265b0a844d65" CreationDate="2022-07-07T15:47:41.337" UserId="1824" Text="You can only use [`read_as()`][1] for types whose size is known at compile time (thus the&#xD;&#xA;requirement that types implement [`MaxEncodedLen`][2]).&#xD;&#xA;&#xD;&#xA;If you don't know the size ahead of time, like in the case of a Vec, you can use&#xD;&#xA;[`read_as_unbounded()`][3]. In order to get the number of bytes to read you can use the&#xD;&#xA;[`in_len()`][4] method.&#xD;&#xA;&#xD;&#xA;So your code would look something like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let (contract_address, metadata, symbol): (AccountId, Vec&lt;u8&gt;, Vec&lt;u8&gt;)&#xD;&#xA;    = env.read_as_unbounded(env.in_len())?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have some demo code [here][5] if you need more resources on how to implement chain-extensions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/pallet_contracts/chain_extension/struct.Environment.html#method.read_as&#xD;&#xA;  [2]: https://crates.parity.io/frame_support/pallet_prelude/trait.MaxEncodedLen.html&#xD;&#xA;  [3]: https://crates.parity.io/pallet_contracts/chain_extension/struct.Environment.html#method.read_as_unbounded&#xD;&#xA;  [4]: https://crates.parity.io/pallet_contracts/chain_extension/struct.Environment.html#method.in_len&#xD;&#xA;  [5]: https://github.com/HCastano/decoded-2022-demo/blob/493edc950d9e7af03c8f021919f15bfc9f7e1e94/runtime/src/chain_extension.rs#L104" ContentLicense="CC BY-SA 4.0" />
  <row Id="13735" PostHistoryTypeId="2" PostId="3660" RevisionGUID="f0135989-c54b-461f-bf7c-3082e45fe811" CreationDate="2022-07-07T15:56:29.847" UserId="16" Text="The returned reference also implements [`ToAccountId`](https://paritytech.github.io/ink/ink_lang/trait.ToAccountId.html). So by calling `to_account_id()` on the returned type you should be able to get the `AccountId`." ContentLicense="CC BY-SA 4.0" />
  <row Id="13737" PostHistoryTypeId="2" PostId="3661" RevisionGUID="83de6df5-608b-4c6a-80f0-063f1332fd37" CreationDate="2022-07-07T16:15:47.977" UserId="560" Text="what you want to do is use the sudo tab, then sudo &gt; setCode(WithoutChecks)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13739" PostHistoryTypeId="2" PostId="3662" RevisionGUID="b0d6e03e-01e8-4fb8-bc7c-8de057686c43" CreationDate="2022-07-07T16:17:52.217" UserId="560" Text="try to use the chain in --dev mode, then uploading the new wasm file, if it breaks the chain/stop producing blocks, then you need a storage migration" ContentLicense="CC BY-SA 4.0" />
  <row Id="13741" PostHistoryTypeId="52" PostId="3642" RevisionGUID="8115ecc8-aafd-4777-a3e7-a9c5cca07c45" CreationDate="2022-07-07T16:42:07.380" />
  <row Id="13742" PostHistoryTypeId="5" PostId="3628" RevisionGUID="a24f1182-5822-4442-a552-c188c5bb845a" CreationDate="2022-07-07T17:03:44.507" UserId="2663" Comment="added 399 characters in body" Text="I have the same problem of [this post][1] but `cargo clean` and `cargo check` doesn’t fix it.&#xD;&#xA;&#xD;&#xA;This is my terminal output:&#xD;&#xA;&#xD;&#xA;    Updating crates.io index&#xD;&#xA;    error: failed to select a version for the requirement wasmtime = &quot;^0.38.0&quot;`&#xD;&#xA;    candidate versions found which didn't match: 0.37.0, 0.36.0, 0.35.3, ...&#xD;&#xA;    location searched: crates.io index&#xD;&#xA;    required by package sp-wasm-interface v6.0.0 (/substrate/primitives/wasm-interface)&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;**Update**&#xD;&#xA;&#xD;&#xA;`rustup show` output:&#xD;&#xA;&#xD;&#xA;    Default host: x86_64-apple-darwin&#xD;&#xA;    rustup home:  /Users/*****/.rustup&#xD;&#xA;    &#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-apple-darwin (default)&#xD;&#xA;    nightly-x86_64-apple-darwin&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-apple-darwin (default)&#xD;&#xA;    rustc 1.59.0 (9d1b2106e 2022-02-23)&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3529/fix-failed-to-select-a-version-for-the-requirement-crate-version" ContentLicense="CC BY-SA 4.0" />
  <row Id="13743" PostHistoryTypeId="2" PostId="3663" RevisionGUID="0cd78c99-a729-4aac-b485-680c5412a0ed" CreationDate="2022-07-07T17:23:48.893" UserId="2858" Text="```&#xD;&#xA;use erc20::Erc20Ref;&#xD;&#xA;use ink_storage::traits::SpreadAllocate;&#xD;&#xA;&#xD;&#xA;#[ink(storage)]&#xD;&#xA;#[derive(SpreadAllocate)]&#xD;&#xA;pub struct Bridge {&#xD;&#xA;    map: ink_storage::Mapping&lt;AccountId, u32&gt;,&#xD;&#xA;    token: Erc20Ref,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl Bridge {&#xD;&#xA;    #[ink(constructor)]&#xD;&#xA;    pub fn new(token: Erc20Ref) -&gt; Self {&#xD;&#xA;        ink_lang::utils::initialize_contract(|contract: &amp;mut Self| {&#xD;&#xA;            contract.token = token;&#xD;&#xA;        })&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;the problem is: the trait `ink_storage::traits::SpreadAllocate` is not implemented for `erc20::Erc20Ref`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Are there ways to make it properly without manual implementation of SpreadAllocate trait?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13745" PostHistoryTypeId="1" PostId="3663" RevisionGUID="0cd78c99-a729-4aac-b485-680c5412a0ed" CreationDate="2022-07-07T17:23:48.893" UserId="2858" Text="How to initiate SpreadAllocated storage including other contract reference?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13746" PostHistoryTypeId="3" PostId="3663" RevisionGUID="0cd78c99-a729-4aac-b485-680c5412a0ed" CreationDate="2022-07-07T17:23:48.893" UserId="2858" Text="|ink|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13747" PostHistoryTypeId="2" PostId="3664" RevisionGUID="273b7e77-a8d3-4e3e-858c-c46580a42881" CreationDate="2022-07-07T20:25:25.593" UserId="2842" Text="I'm trying to add Substrate to my project and am encountering this error when trying to compile. Do I need to set this explicitly somewhere in my runtime? I see there is an implementation in `sp_io` but not sure how to tell the compiler to use it, or perhaps there is a different way that I'm supposed to add this functionality back into a `no_std` project? I haven't worked super extensively with `no_std` feature (or lack thereof), so might be missing something. I could implement it myself but since I don't see that in the example project I figure there must be a way that I'm unaware of.&#xD;&#xA;&#xD;&#xA;I don't have anything in my project really as of yet, just trying to figure out which dependencies I need and which I can prune for my very simple use case. Here is my build file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;core&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;description = &quot;Core logic &amp; chain.&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;sp-std = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;sp-io = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; } #Added this to try to get the `#[panic_handler]` impl&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;frame-support/std&quot;,&#xD;&#xA;    &quot;frame-system/std&quot;,&#xD;&#xA;    &quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;    &quot;sp-api/std&quot;,&#xD;&#xA;    &quot;sp-std/std&quot;,&#xD;&#xA;    &quot;sp-core/std&quot;,&#xD;&#xA;    &quot;sp-io/std&quot;&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;`build.rs`&#xD;&#xA;```rust&#xD;&#xA;use substrate_wasm_builder::WasmBuilder;&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    WasmBuilder::new()&#xD;&#xA;        .with_current_project()&#xD;&#xA;        .export_heap_base()&#xD;&#xA;        .import_memory()&#xD;&#xA;        .build()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All I have in `lib.rs`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;// Make the WASM binary available.&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/wasm_binary.rs&quot;));&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13749" PostHistoryTypeId="1" PostId="3664" RevisionGUID="273b7e77-a8d3-4e3e-858c-c46580a42881" CreationDate="2022-07-07T20:25:25.593" UserId="2842" Text="error: `#[panic_handler]` function required, but not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="13750" PostHistoryTypeId="3" PostId="3664" RevisionGUID="273b7e77-a8d3-4e3e-858c-c46580a42881" CreationDate="2022-07-07T20:25:25.593" UserId="2842" Text="|no-std|panic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13751" PostHistoryTypeId="2" PostId="3665" RevisionGUID="f87f87a9-a22a-4c0c-b2b3-67b864815aa4" CreationDate="2022-07-07T21:31:16.633" UserId="16" Text="You are not using anything from `sp_io` in your `lib.rs`. The crate is therefore not linked in and you are missing the panic handler in your binary. Add this to your file to pull it in:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;extern crate sp_io;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13753" PostHistoryTypeId="5" PostId="3665" RevisionGUID="b71a6b03-4e50-4522-aabd-ea417753ceb8" CreationDate="2022-07-07T21:32:17.390" UserId="16" Comment="deleted 1 character in body" Text="You are not using anything from `sp_io` in your `lib.rs`. The crate is therefore not linked in and you are missing the panic handler in your binary. Add this to `lib.rs` to pull it in:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;extern crate sp_io;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13754" PostHistoryTypeId="52" PostId="3658" RevisionGUID="03eacfd2-fa58-4a68-a8f7-c4f2ac7eeea7" CreationDate="2022-07-07T23:38:43.570" />
  <row Id="13755" PostHistoryTypeId="2" PostId="3666" RevisionGUID="4d9d5011-2381-41e9-9c93-08bd45a31f52" CreationDate="2022-07-08T02:33:08.017" UserId="2788" Text="I'm trying to transfer aUSD test token from one wallet to another on my dapp using Polkadot.js wallet. Sender's wallet is connected to Mandala TC7 test.&#xD;&#xA;&#xD;&#xA;I read [this][1] at Acala's site and I'm trying to use it as below.&#xD;&#xA;&#xD;&#xA;    const transfer = polkadot.tx.currencies.transfer('5F1pZeuR...GmZRSZuK', 'aUSD',100000000000);&#xD;&#xA;&#xD;&#xA;But I'm getting the error below. My sender's wallet has 30 aUSD.&#xD;&#xA;&#xD;&#xA;`&#xD;&#xA;bundle-polkadot-types.js:8021 Uncaught (in promise) Error: createType(Call):: Call: failed decoding currencies.transfer:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;currency_id&quot;:&quot;{\&quot;_enum\&quot;:{\&quot;Token\&quot;:\&quot;AcalaPrimitivesCurrencyTokenSymbol\&quot;,\&quot;DexShare\&quot;:\&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)\&quot;,\&quot;Erc20\&quot;:\&quot;H160\&quot;,\&quot;StableAssetPoolToken\&quot;:\&quot;u32\&quot;,\&quot;LiquidCrowdloan\&quot;:\&quot;u32\&quot;,\&quot;ForeignAsset\&quot;:\&quot;u16\&quot;}}&quot;,&quot;amount&quot;:&quot;Lookup48&quot;}:: Struct: failed on currency_id: {&quot;_enum&quot;:{&quot;Token&quot;:&quot;AcalaPrimitivesCurrencyTokenSymbol&quot;,&quot;DexShare&quot;:&quot;(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)&quot;,&quot;Erc20&quot;:&quot;H160&quot;,&quot;StableAssetPoolToken&quot;:&quot;u32&quot;,&quot;LiquidCrowdloan&quot;:&quot;u32&quot;,&quot;ForeignAsset&quot;:&quot;u16&quot;}}:: Cannot map Enum JSON, unable to find 'aUSD' in token, dexshare, erc20, stableassetpooltoken, liquidcrowdloan, foreignasset&#xD;&#xA;    at createTypeUnsafe (bundle-polkadot-types.js:8021:20)&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.acala.network/integrate/integration/token-transfer#currencies.transfer" ContentLicense="CC BY-SA 4.0" />
  <row Id="13757" PostHistoryTypeId="1" PostId="3666" RevisionGUID="4d9d5011-2381-41e9-9c93-08bd45a31f52" CreationDate="2022-07-08T02:33:08.017" UserId="2788" Text="Cannot map Enum JSON, unable to find 'aUSD' in token in api.tx.currencies.transfer" ContentLicense="CC BY-SA 4.0" />
  <row Id="13758" PostHistoryTypeId="3" PostId="3666" RevisionGUID="4d9d5011-2381-41e9-9c93-08bd45a31f52" CreationDate="2022-07-08T02:33:08.017" UserId="2788" Text="|polkadot-js|transactions|transfer|polkadot-js-extension|acala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13759" PostHistoryTypeId="4" PostId="3657" RevisionGUID="78b08033-3efb-4370-9d9e-80a246e89360" CreationDate="2022-07-08T02:52:56.470" UserId="2384" Comment="edited title" Text="What is relaychain validator spec &amp; collator spec" ContentLicense="CC BY-SA 4.0" />
  <row Id="13760" PostHistoryTypeId="2" PostId="3667" RevisionGUID="d1ecd33c-92ca-4cb6-bc33-dc48bb51fd2c" CreationDate="2022-07-08T03:39:47.077" UserId="2731" Text="I am currently building a listener for KSM blocks. I used the api.rpc.chain.subscribeFinalizedHeads method with the RPC node wss://kusama-rpc.polkadot.io. As a simple test, I had the callback simply console log the block number. One thing I noticed is that there are some blocks being skipped by the subscriber. 1 out of every 6 blocks seems to not be picked up. If I type the missing block into a scanner online, it exists and shows up. However, the built in subscriber seems to be missing it. Does anyone have any insight into why this could be? I dont want to be missing transactions." ContentLicense="CC BY-SA 4.0" />
  <row Id="13762" PostHistoryTypeId="1" PostId="3667" RevisionGUID="d1ecd33c-92ca-4cb6-bc33-dc48bb51fd2c" CreationDate="2022-07-08T03:39:47.077" UserId="2731" Text="api.rpc.chain.subscribeFinalizedHeads missing blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="13763" PostHistoryTypeId="3" PostId="3667" RevisionGUID="d1ecd33c-92ca-4cb6-bc33-dc48bb51fd2c" CreationDate="2022-07-08T03:39:47.077" UserId="2731" Text="|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13764" PostHistoryTypeId="2" PostId="3668" RevisionGUID="b2c201a2-502c-4ac5-bc56-0093a6deb1d6" CreationDate="2022-07-08T04:38:12.563" UserId="2748" Text="I am performing the (add the contracts pallet to a runtime) substrate tutorial and I am getting this error &#xD;&#xA;&#xD;&#xA;error[E0405]: cannot find trait `Trait` in crate `pallet_contracts`&#xD;&#xA;   --&gt; runtime/src/lib.rs:279:24&#xD;&#xA;    |&#xD;&#xA;279 | impl pallet_contracts::Trait for Runtime {&#xD;&#xA;    |                        ^^^^^ not found in `pallet_contracts`&#xD;&#xA;&#xD;&#xA;can anyone tell me what should I do to solve this error" ContentLicense="CC BY-SA 4.0" />
  <row Id="13766" PostHistoryTypeId="1" PostId="3668" RevisionGUID="b2c201a2-502c-4ac5-bc56-0093a6deb1d6" CreationDate="2022-07-08T04:38:12.563" UserId="2748" Text="error[E0405]: cannot find trait `Trait` in crate pallet_contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="13767" PostHistoryTypeId="3" PostId="3668" RevisionGUID="b2c201a2-502c-4ac5-bc56-0093a6deb1d6" CreationDate="2022-07-08T04:38:12.563" UserId="2748" Text="|pallet-contracts|contracts|trait|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13768" PostHistoryTypeId="2" PostId="3669" RevisionGUID="ac8e611c-fb03-42fd-85de-404b717765c0" CreationDate="2022-07-08T05:00:53.533" UserId="627" Text="Looking at the extrinsics page, the currencyId is an Enum indicating the type of transfer. &#xD;&#xA;&#xD;&#xA;So you need to pass the `Token` explicitly. This should do the trick -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const transfer = polkadot.tx.currencies.transfer(&#xD;&#xA;  // dest&#xD;&#xA;  '5F1pZeuR...GmZRSZuK', &#xD;&#xA;  // currencyId, enum&#xD;&#xA;  { Token: 'AUSD' },&#xD;&#xA;  // amount&#xD;&#xA;  100000000000&#xD;&#xA;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13770" PostHistoryTypeId="2" PostId="3670" RevisionGUID="c56dcaf2-eee3-4345-ba32-c2840b84f465" CreationDate="2022-07-08T05:04:17.143" UserId="627" Text="The txhash is only returned when you use the non-subscribe form.&#xD;&#xA;&#xD;&#xA;In code for the non-sub form -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// don't subscribe, txhash is returned&#xD;&#xA;const txHash = await polkadot.tx.balances&#xD;&#xA;  .transfer('5F1pZe.....GmZRSZuK', 100000000000)&#xD;&#xA;  .signAndSend(SENDER, { signer: injector.signer });&#xD;&#xA;&#xD;&#xA;console.log(txhash);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And for the subscription form -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// subscription, unsub is returned, txHash internal&#xD;&#xA;const unsub = await polkadot.tx.balances&#xD;&#xA;  .transfer('5F1pZe.....GmZRSZuK', 100000000000)&#xD;&#xA;  .signAndSend(SENDER, { signer: injector.signer }, (status) =&gt; {&#xD;&#xA;    console.log(status.txHash);&#xD;&#xA;  });&#xD;&#xA;&#xD;&#xA;// unsubscribe&#xD;&#xA;unsub();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13772" PostHistoryTypeId="2" PostId="3671" RevisionGUID="fd25f9b6-6ed2-4b44-a59f-ebf38fa86d4b" CreationDate="2022-07-08T05:16:25.467" UserId="627" Text="The finalization doesn't happen block-by-block, but rather can finalize a chain. Consider the following -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;A&#xD;&#xA;|&#xD;&#xA;B&#xD;&#xA;|--|&#xD;&#xA;C  D&#xD;&#xA;|  |&#xD;&#xA;E  F&#xD;&#xA;|&#xD;&#xA;G&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Assume that A &amp; B are finalized. A fork happens. Now when G is finalized, it means that both C &amp; E are as well - since G builds on E, which builds on C, which builds on a previously finalized B.&#xD;&#xA;&#xD;&#xA;So Grandpa doesn't need to finalize block-by-block, but would finalize a full chain at once. The subscription returns the last block finalized, which would mean the block's parent and the parents of that, are finalized as well.&#xD;&#xA;&#xD;&#xA;So in this example you would receive finalization updates for - A, B &amp; G" ContentLicense="CC BY-SA 4.0" />
  <row Id="13774" PostHistoryTypeId="2" PostId="3672" RevisionGUID="0c1c0842-860a-48f3-9ae2-fd32093289d2" CreationDate="2022-07-08T06:46:48.983" UserId="2147" Text="Suppose I have the following cross pallet function call&#xD;&#xA;``` rust&#xD;&#xA;// Pallet A : method that sets a storage variable&#xD;&#xA;pub fn try_set_value_in_pallet_a(value: u64) -&gt; DispatchResult {&#xD;&#xA;    ensure!(!value.is_zero(), Error::&lt;T&gt;::CannotSetZeroValue);&#xD;&#xA;    ValueA::&lt;T&gt;::set(value);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Pallet B : extrinsic leveraging functionality in pallet A&#xD;&#xA;#[weights(...)]&#xD;&#xA;pub fn foo(value_a: u64, value_b: u64) -&gt; DispatchResult {&#xD;&#xA;    ensure!(!b.is_zero(), Error::&lt;T&gt;::CannotSetZeroValue);&#xD;&#xA;    ValueB::&lt;T&gt;::set(value_b);&#xD;&#xA;    PalletA::&lt;T&gt;::try_set_value_in_pallet_a(value_a)?;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;In this case if the following behavior is desired:&#xD;&#xA;Either `foo` in Pallet B succeeds or it leaves PalletA and PalletB states invariate.&#xD;&#xA;Where should I put the `#[transactional]` macro? Should I put it above `foo` only?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13776" PostHistoryTypeId="1" PostId="3672" RevisionGUID="0c1c0842-860a-48f3-9ae2-fd32093289d2" CreationDate="2022-07-08T06:46:48.983" UserId="2147" Text="Transactional macro cross pallet transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="13777" PostHistoryTypeId="3" PostId="3672" RevisionGUID="0c1c0842-860a-48f3-9ae2-fd32093289d2" CreationDate="2022-07-08T06:46:48.983" UserId="2147" Text="|pallet|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13778" PostHistoryTypeId="6" PostId="3663" RevisionGUID="f71ed0cd-047d-43a5-9348-922bac7f5c43" CreationDate="2022-07-08T07:27:28.897" UserId="34" Comment="edited tags" Text="|ink|wasm|erc20|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13779" PostHistoryTypeId="6" PostId="3672" RevisionGUID="368c738f-8f4c-4dcf-9577-8f67b3afc000" CreationDate="2022-07-08T07:29:27.167" UserId="34" Comment="edited tags" Text="|pallet|storage|loose-coupling|tight-coupling|transactional|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13780" PostHistoryTypeId="2" PostId="3673" RevisionGUID="f0021c52-67d5-4ae7-83bc-8fdd81419612" CreationDate="2022-07-08T12:16:32.637" UserId="88" Text="I am trying to migrate my pallet over to the parachain template, and while adding it to the runtime I noticed a slight difference between how benchmarks are defined.&#xD;&#xA;&#xD;&#xA;On the old runtime, all (or most) pallets had their benchmarks included as follows:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;	impl frame_benchmarking::Benchmark&lt;Block&gt; for Runtime {&#xD;&#xA;		fn dispatch_benchmark(&#xD;&#xA;            // &lt;snip&gt;&#xD;&#xA;			add_benchmark!(params, batches, frame_system, SystemBench::&lt;Runtime&gt;);&#xD;&#xA;			add_benchmark!(params, batches, pallet_balances, Balances);&#xD;&#xA;			add_benchmark!(params, batches, pallet_timestamp, Timestamp);&#xD;&#xA;            // Custom benchmark I want to migrate&#xD;&#xA;			add_benchmark!(params, batches, pallet_chocolate, ChocolateModule);&#xD;&#xA;            // &lt;snip&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While the new one only has one call to a `add_benchmarks` macro.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;	impl frame_benchmarking::Benchmark&lt;Block&gt; for Runtime {&#xD;&#xA;		fn dispatch_benchmark(&#xD;&#xA;            // &lt;snip&gt;&#xD;&#xA;			add_benchmarks!(params, batches);&#xD;&#xA;            // &lt;snip&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I checked the docs and it suggests using the `add_benchmark!` but that was in the context of the node template. What's the difference between these two forms? Does `add_benchmarks!` have the same effect as the individual `add_benchmark!` calls combined??&#xD;&#xA;&#xD;&#xA;Do note that I'm migrating from the node template runtime to the parachain template.&#xD;&#xA;&#xD;&#xA;Many thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="13782" PostHistoryTypeId="1" PostId="3673" RevisionGUID="f0021c52-67d5-4ae7-83bc-8fdd81419612" CreationDate="2022-07-08T12:16:32.637" UserId="88" Text="What's the difference between add_benchmarks and add_benchmark?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13783" PostHistoryTypeId="3" PostId="3673" RevisionGUID="f0021c52-67d5-4ae7-83bc-8fdd81419612" CreationDate="2022-07-08T12:16:32.637" UserId="88" Text="|runtime|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13784" PostHistoryTypeId="2" PostId="3674" RevisionGUID="b4776657-9eb2-4f2c-924a-e75a95abafdd" CreationDate="2022-07-08T12:41:34.827" UserId="2862" Text="I am trying to compile my own runtime, as PoC, but I don't use Rust's toolchain and some things are unclear how to do it at the moment.&#xD;&#xA;&#xD;&#xA;&gt; With Substrate, you can write your blockchain logic in any language&#xD;&#xA;&gt; that can compile to WebAssembly (Rust, C/C++, C#, Go, etc).&#xD;&#xA;&#xD;&#xA;Could somebody provide more details about the compilation of Wasm runtimes from languages/toolchains other than Rust?&#xD;&#xA;* does it target WebAssembly 1.0 specification?&#xD;&#xA;* does it target WASI, as it should be run outside the browser?&#xD;&#xA;* is it possible to use language with automatic memory management?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13786" PostHistoryTypeId="1" PostId="3674" RevisionGUID="b4776657-9eb2-4f2c-924a-e75a95abafdd" CreationDate="2022-07-08T12:41:34.827" UserId="2862" Text="Provide more details about the compilation target of Polkadot's wasm runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="13787" PostHistoryTypeId="3" PostId="3674" RevisionGUID="b4776657-9eb2-4f2c-924a-e75a95abafdd" CreationDate="2022-07-08T12:41:34.827" UserId="2862" Text="|substrate-node|runtime|wasm|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13788" PostHistoryTypeId="2" PostId="3675" RevisionGUID="ffd769a1-c10b-4ff5-9462-828ae6020dad" CreationDate="2022-07-08T13:36:29.557" UserId="28" Text="Take a look at the PR which introduces this change:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/10592&#xD;&#xA;&#xD;&#xA;So the new syntax which is easier to maintain is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;define_benchmarks!(&#xD;&#xA;	[path1, location1]&#xD;&#xA;	...&#xD;&#xA;	[pathN, locationN]&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl_runtime_apis! {&#xD;&#xA;	impl Benchmark&lt;Block&gt; for Runtime {&#xD;&#xA;		fn benchmark_metadata(…)  {&#xD;&#xA;			add_benchmarks!(list, extra);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn dispatch_benchmark(…)  {&#xD;&#xA;			list_benchmarks!(params, batches);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where the `define_benchmarks` is combined with `list_benchmarks` and `add_benchmarks`.&#xD;&#xA;&#xD;&#xA;This allows us to avoid having to have a huge list copied twice :)&#xD;&#xA;&#xD;&#xA;End of the day, both syntax is supported, so you need not worry if you don't want to update." ContentLicense="CC BY-SA 4.0" />
  <row Id="13790" PostHistoryTypeId="2" PostId="3676" RevisionGUID="f41c3a22-6487-48a0-b8f1-538bab466d8b" CreationDate="2022-07-08T13:42:42.893" UserId="28" Text="Putting it above `fn foo` only should be fine in this case. Basically the transactional macro needs to wrap all logic that should be reverted if it fails.&#xD;&#xA;&#xD;&#xA;Since the logic in pallet A is inside of `fn foo`, you only need a transactional layer around `fn foo`, and that will also take care of any reverting of storage changes in pallet A from that call aswell." ContentLicense="CC BY-SA 4.0" />
  <row Id="13792" PostHistoryTypeId="52" PostId="3667" RevisionGUID="48e9d4b2-a003-43f2-974e-c8a053c97bd2" CreationDate="2022-07-08T13:44:49.150" />
  <row Id="13793" PostHistoryTypeId="6" PostId="3674" RevisionGUID="fae780ba-ac43-441c-8168-53176d965e9d" CreationDate="2022-07-08T14:25:40.433" UserId="29" Comment="inherent" Text="|runtime|wasm|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13794" PostHistoryTypeId="2" PostId="3677" RevisionGUID="c2056a99-c33d-45fb-b8b3-ac54f46fc1e8" CreationDate="2022-07-08T15:25:12.543" UserId="480" Text="The `ChainSpec` type has a `from_genesis` method which takes an `Option&lt;Properties&gt;`. This `Properties` object is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Arbitrary properties defined in chain spec as a JSON object&#xD;&#xA;pub type Properties = serde_json::map::Map&lt;String, serde_json::Value&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can't find any documentation on the full list of the available keys for the ChainSpec properties and what they mean / do. Where can I find this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13796" PostHistoryTypeId="1" PostId="3677" RevisionGUID="c2056a99-c33d-45fb-b8b3-ac54f46fc1e8" CreationDate="2022-07-08T15:25:12.543" UserId="480" Text="What is the full list of ChainSpec properties?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13797" PostHistoryTypeId="3" PostId="3677" RevisionGUID="c2056a99-c33d-45fb-b8b3-ac54f46fc1e8" CreationDate="2022-07-08T15:25:12.543" UserId="480" Text="|genesis|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13798" PostHistoryTypeId="2" PostId="3678" RevisionGUID="bad6cb5b-52a9-42d0-9d4b-2971f3d0c21d" CreationDate="2022-07-08T19:48:47.183" UserId="29" Text="Great question!&#xD;&#xA;&#xD;&#xA;You can include the following in your parachain's runtime:&#xD;&#xA;```rust&#xD;&#xA;use cumulus_pallet_parachain_system::RelaychainBlockNumberProvider;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then, in the parachain's runtime, define the following in your pallet's config:&#xD;&#xA;```rust&#xD;&#xA;type RelayChainBlockNumber = RelaychainBlockNumberProvider&lt;Runtime&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In your pallet you will have to import `BlockNumberProvider`:&#xD;&#xA;```rust&#xD;&#xA;use sp_runtime::traits::BlockNumberProvider;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Define it in your pallet's config:&#xD;&#xA;```rust&#xD;&#xA;type RelayChainBlockNumber: BlockNumberProvider&lt;BlockNumber = Self::BlockNumber&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And, finally, you can get the relaychain's block number in your pallet:&#xD;&#xA;```rust&#xD;&#xA;let current_relaychain_block_number = T::RelayChainBlockNumber::current_block_number();&#xD;&#xA;log::info!(&quot;The current relaychain block number is {:?}&quot;, current_relaychain_block_number);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is an example:&#xD;&#xA;- https://github.com/brunopgalvao/cumulus-001/commit/033bebb2eeaa7e29fac7d7dc25558cc80e6d9b2f" ContentLicense="CC BY-SA 4.0" />
  <row Id="13800" PostHistoryTypeId="2" PostId="3679" RevisionGUID="c088e598-f299-4a5d-b079-6e50e1f80444" CreationDate="2022-07-08T20:34:27.280" UserId="2787" Text="&#xD;&#xA;While building the raw specs:&#xD;&#xA;&lt;br&gt;&#xD;&#xA;```&#xD;&#xA;./target/release/kylin-collator build-spec --chain=rococo_democracy.json --raw --disable-default-bootnode &gt; rococo_raw_democracy.json&#xD;&#xA;```&#xD;&#xA;I get &#xD;&#xA;```&#xD;&#xA;2022-07-08 16:00:00 Building chain spec    &#xD;&#xA;Error: Service(Other(&quot;Error parsing spec file: unknown field `democracy`, expected one of `system`, `parachainSystem`, `parachainInfo`, `sudo`, `balances`, `vesting`, `collatorSelection`, `session`, `aura`, `auraExt`, `polkadotXcm`, `crowdloanRewards`, `ormlTokens` at line 86 column 18&quot;))&#xD;&#xA;```&#xD;&#xA;In the chain_spec.rs, this fields is coded as such:&#xD;&#xA;```&#xD;&#xA;democracy: DemocracyConfig::default(),&#xD;&#xA;```&#xD;&#xA;Node compile is fine as well as the build spec.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13802" PostHistoryTypeId="1" PostId="3679" RevisionGUID="c088e598-f299-4a5d-b079-6e50e1f80444" CreationDate="2022-07-08T20:34:27.280" UserId="2787" Text="Raw specs not building, unknown field" ContentLicense="CC BY-SA 4.0" />
  <row Id="13803" PostHistoryTypeId="3" PostId="3679" RevisionGUID="c088e598-f299-4a5d-b079-6e50e1f80444" CreationDate="2022-07-08T20:34:27.280" UserId="2787" Text="|pallet|chainspec|config|democracy|specs|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13804" PostHistoryTypeId="5" PostId="3579" RevisionGUID="b356fb4e-df84-4777-94ce-a3dddde9daff" CreationDate="2022-07-08T20:45:52.513" UserId="219" Comment="added 30 characters in body" Text="**Comment edited with simplifications found in the comments**&#xD;&#xA;&#xD;&#xA;There is no need to have an order in the proof node encodings. The solution I adopted so far (thanks @cheme) is to 'lazy decode' encodings as described below.&#xD;&#xA;&#xD;&#xA;There is a single for loop iterating over the encoded proof nodes. This one has two tasks:&#xD;&#xA;&#xD;&#xA; - find the root node and decode it&#xD;&#xA; - record all other node encodings in a key value map from the node encoding hash digest to the node encoding&#xD;&#xA;&#xD;&#xA;For each (non inlined) child of the root, the hash digest is looked up in our key value map and, if found, the matching node encoding gets decoded. In comparison with our previous solution to decode each node first, this solution also has the advantage to be more easily upgrade-able with the v1 state trie where the proof contains encoded proof nodes and eventually value byte slices (referenced by their hash digest).&#xD;&#xA;&#xD;&#xA;&lt;s&gt;However, if the root node is not the first encoded node in the proof, one or more hash computations are 'lost' on node encodings smaller or equal to 32 bytes, until the root node is found. This is because:&#xD;&#xA;&#xD;&#xA; - For encoded nodes larger than 32 bytes, the blake2b hash has to be computed to get their Merkle value; no additional computational cost&#xD;&#xA; - For encoded nodes smaller or equal to 32 bytes, their Merkle value is their encoding. The blake2b hash does not need to be computed to add them to the map of encoded nodes. However, because the root node Merkle value is always the hash of its encoding, we are here forced to hash it in order to compare it with the root hash given, until the root node is found.&#xD;&#xA;&#xD;&#xA;On the other hand, practically it seems like the root node is often the first encoded node, so this should not have an impact out there.&lt;/s&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13805" PostHistoryTypeId="2" PostId="3680" RevisionGUID="9d4eff83-b794-4f34-bccf-f1ab451d8b56" CreationDate="2022-07-08T22:10:48.077" UserId="29" Text="Look here:&#xD;&#xA;- https://github.com/Kylin-Network/kylin-collator/blob/d21e1db3511f4536cf234c30d4081da1f4ea1230/node/src/command.rs#L39&#xD;&#xA;```rust&#xD;&#xA;impl IdentifyChain for dyn sc_service::ChainSpec {&#xD;&#xA;	fn identify(&amp;self) -&gt; ChainIdentity {&#xD;&#xA;		if self.id().starts_with(&quot;pichiu&quot;)&#xD;&#xA;	   {&#xD;&#xA;		   ChainIdentity::Pichiu&#xD;&#xA;	   } else {&#xD;&#xA;		   ChainIdentity::Development&#xD;&#xA;	   }&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For some reason you're defaulting to `ChainIdentity::Development` which in turn eventually calls [this](https://github.com/Kylin-Network/kylin-collator/blob/3b36bfa7f0fd88f4e2d527857d26ce8334a89715/node/src/chain_spec.rs#L17):&#xD;&#xA;```rust&#xD;&#xA;pub type DevelopmentChainSpec = sc_service::GenericChainSpec&lt;development_runtime::GenesisConfig, Extensions&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And that is the problem because, if you look at the development runtime, there is no democracy pallet and therefore you're getting that error.&#xD;&#xA;&#xD;&#xA;Hope that helps!" ContentLicense="CC BY-SA 4.0" />
  <row Id="13807" PostHistoryTypeId="2" PostId="3681" RevisionGUID="2c5c2d3f-86bd-4e7b-a46f-208f0e6d55fc" CreationDate="2022-07-09T02:10:42.103" UserId="590" Text="I am trying to understand why locking a balance is used instead of reserving when staking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13809" PostHistoryTypeId="1" PostId="3681" RevisionGUID="2c5c2d3f-86bd-4e7b-a46f-208f0e6d55fc" CreationDate="2022-07-09T02:10:42.103" UserId="590" Text="Staking locking vs reserving" ContentLicense="CC BY-SA 4.0" />
  <row Id="13810" PostHistoryTypeId="3" PostId="3681" RevisionGUID="2c5c2d3f-86bd-4e7b-a46f-208f0e6d55fc" CreationDate="2022-07-09T02:10:42.103" UserId="590" Text="|runtime|staking|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13811" PostHistoryTypeId="2" PostId="3682" RevisionGUID="d3da16fe-be13-43ac-bca3-378792deaf84" CreationDate="2022-07-09T06:41:40.967" UserId="1970" Text="Locks can overlap, while reserved values cannot. This means that if a value is reserved, it cannot be used in other operations that would also reserve.&#xD;&#xA;&#xD;&#xA;Consider somebody who both stakes and participates in democracy - with both operations locking the balance, it means that you can use bonded values to vote with. &#xD;&#xA;&#xD;&#xA;If this was reserved, you would lose the ability to vote with bonded balances." ContentLicense="CC BY-SA 4.0" />
  <row Id="13813" PostHistoryTypeId="2" PostId="3683" RevisionGUID="8d9e137e-1984-4b4b-a544-cb1d2347d0a6" CreationDate="2022-07-09T06:49:10.120" UserId="1970" Text="This is a general React question, not really related to the libraries. With that said, ensure that you clear the state when making the call so you don't carry old states around.&#xD;&#xA;&#xD;&#xA;Options are -&#xD;&#xA;&#xD;&#xA; - you can do it on calling, e.g. explicitly clear the state before making calls&#xD;&#xA; - in your callback, since you are adjusting the status (and we know error is the end of it all), do `setStatus(null)` along `setSubmitting(true)` (this may have other effects in your code, but is an idea)" ContentLicense="CC BY-SA 4.0" />
  <row Id="13815" PostHistoryTypeId="6" PostId="3681" RevisionGUID="ca23dc82-6145-42ed-86a3-981cf0671011" CreationDate="2022-07-09T08:00:47.500" UserId="34" Comment="edited tags" Text="|runtime|staking|pallet-staking|reserved-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13816" PostHistoryTypeId="5" PostId="3554" RevisionGUID="5a1333d8-dfaa-4301-b86a-f3a1c5049812" CreationDate="2022-07-09T08:01:39.813" UserId="1970" Comment="Typo fix for &quot;account&quot; (with some additional clarifications for 10 char limit)" Text="To answer your comment around block-by-hash (there are no account -&gt; transaction mappings on the RPCs, as per the linked answers in the comments above) -&#xD;&#xA;&#xD;&#xA;You can use the [getBlock](https://polkadot.js.org/docs/substrate/rpc#getblockhash-blockhash-signedblock) RPC call. Since you are using the JS API based on your example -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// retrieve the block by hash, API decodes extrinsics&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(&quot;0x...blockHash here...&quot;)&#xD;&#xA;&#xD;&#xA;// loop through extrinsics&#xD;&#xA;for (let i = 0; i &lt; signedBlock.block.extrinsics.length; i++) {&#xD;&#xA;  const x = signedBlock.block.extrinsics[i];&#xD;&#xA;&#xD;&#xA;  console.log(`&#xD;&#xA;    isSigned=${x.isSigned},&#xD;&#xA;    pallet=${x.method.section},&#xD;&#xA;    method=${x.method.method}&#xD;&#xA;  `)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13817" PostHistoryTypeId="24" PostId="3554" RevisionGUID="5a1333d8-dfaa-4301-b86a-f3a1c5049812" CreationDate="2022-07-09T08:01:39.813" Comment="Proposed by 1970 approved by 34 edit id of 229" ContentLicense="CC BY-SA 4.0" />
  <row Id="13818" PostHistoryTypeId="50" PostId="3136" RevisionGUID="af5b52dc-7a3b-4526-b4eb-7c481839273f" CreationDate="2022-07-09T08:04:15.350" UserId="-1" />
  <row Id="13819" PostHistoryTypeId="2" PostId="3684" RevisionGUID="c0efdcf9-7ba6-42c4-b38f-c330a787ee42" CreationDate="2022-07-09T12:01:16.047" UserId="45" Text="&gt; does it target WebAssembly 1.0 specification?&#xD;&#xA;&#xD;&#xA;The wasm runtime actually targets WebAssembly MVP, i.e. without any extensions enabled.&#xD;&#xA;&#xD;&#xA;&gt; is it possible to use language with automatic memory management?&#xD;&#xA;&#xD;&#xA;Well, to support automatic memory management [^1], the GC proposal would be handy. But as I mentioned, the wasm runtime supports only MVP currently and the GC proposal is under development still.&#xD;&#xA;&#xD;&#xA;But, theoretically, it might be possible. The support would be limited, to say the least. Your toolchain would need to polyfill the GC. I suppose the performance would be unsatisfactory.&#xD;&#xA;&#xD;&#xA;[^1]: I assume you mean GC based languaged by that, such as Java, .NET, etc. E.g. ARC used by Swift can work just well as of now.&#xD;&#xA;&#xD;&#xA;&gt; does it target WASI, as it should be run outside the browser?&#xD;&#xA;&#xD;&#xA;No, it does not. &#xD;&#xA;&#xD;&#xA;WASI is a standard that seeks to provide a system-level API comparable to an OS. Substrate/Polkadot is no OS and it does not support files, networking, or a major part of other things provided by WASI. Instead, a more domain-specific API is provided. You can see the host API definitions in [the spec](https://spec.polkadot.network/#chap-host-api).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13821" PostHistoryTypeId="2" PostId="3685" RevisionGUID="e1e2c276-bbe2-4c1b-bcbc-01f9aac69566" CreationDate="2022-07-09T16:08:33.607" UserId="2451" Text="The requirement to utilise a standard merkle tree and sparse merkle tree in a runtime module has recently arisen.  The runtime will need to be able to fetch data and witnesses from the trees.  I have been exploring the best way to implement this by utilising the frameworks provided by substrate.  I watched the following talk given by Shawn Tabrizi which was very insightful and provided a deep dive into substrates storage capabilities https://www.youtube.com/watch?v=kKKOL20FdII&amp;ab_channel=ParityTech.  Shawn mentions that substrate supports custom tree structures which can be embedded into the global patricia trie as child objects.  Are there any resources that cover custom implementations or ideally some examples?  I also want to understand how this will work with cumulus / parachains.  I assume the implementation need to be compatible with the patterns cumulus uses to construct PoV blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="13823" PostHistoryTypeId="1" PostId="3685" RevisionGUID="e1e2c276-bbe2-4c1b-bcbc-01f9aac69566" CreationDate="2022-07-09T16:08:33.607" UserId="2451" Text="Storage - Custom Tree Implementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="13824" PostHistoryTypeId="3" PostId="3685" RevisionGUID="e1e2c276-bbe2-4c1b-bcbc-01f9aac69566" CreationDate="2022-07-09T16:08:33.607" UserId="2451" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13825" PostHistoryTypeId="5" PostId="3656" RevisionGUID="6c689993-3b4f-45dd-a05c-60dfe4ac1a34" CreationDate="2022-07-09T17:52:34.480" UserId="2379" Comment="added 89 characters in body" Text="I am building an ocw demo, the code is from https://github.com/paritytech/substrate/blob/master/frame/examples/offchain-worker/src/lib.rs, when using polkadot-v0.9.25 version, it appears got this error: &#xD;&#xA;**cannot find trait `TryFrom` in this scope**, I'm sure this code work with polkadot-v0.9.18.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Have read this question: https://substrate.stackexchange.com/questions/2739/problems-with-app-crypto-macro, but it didn't solve my problem, this question is so confusing why not found and where this error is triggered&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub mod crypto {&#xD;&#xA;	use super::KEY_TYPE;&#xD;&#xA;	use sp_core::sr25519::Signature as Sr25519Signature;&#xD;&#xA;	use sp_runtime::{&#xD;&#xA;		app_crypto::{app_crypto, sr25519},&#xD;&#xA;		traits::Verify,&#xD;&#xA;		MultiSignature, MultiSigner,&#xD;&#xA;	};&#xD;&#xA;	app_crypto!(sr25519, KEY_TYPE);&#xD;&#xA;&#xD;&#xA;	pub struct TestAuthId;&#xD;&#xA;&#xD;&#xA;	impl frame_system::offchain::AppCrypto&lt;MultiSigner, MultiSignature&gt; for TestAuthId {&#xD;&#xA;		type RuntimeAppPublic = Public;&#xD;&#xA;		type GenericSignature = sp_core::sr25519::Signature;&#xD;&#xA;		type GenericPublic = sp_core::sr25519::Public;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// implemented for mock runtime in test&#xD;&#xA;	impl frame_system::offchain::AppCrypto&lt;&lt;Sr25519Signature as Verify&gt;::Signer, Sr25519Signature&gt;&#xD;&#xA;		for TestAuthId&#xD;&#xA;	{&#xD;&#xA;		type RuntimeAppPublic = Public;&#xD;&#xA;		type GenericSignature = sp_core::sr25519::Signature;&#xD;&#xA;		type GenericPublic = sp_core::sr25519::Public;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Cargo.toml&#xD;&#xA;```&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;lite-json = { version = &quot;0.1&quot;, default-features = false }&#xD;&#xA;log = { version = &quot;0.4.17&quot;, default-features = false }&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Substrate packages&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot;, optional = true }&#xD;&#xA;frame-support      = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;frame-system       = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;sp-std             = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;sp-keystore             = { version = &quot;0.12.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot;, optional = true}&#xD;&#xA;sp-core = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;sp-io = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;sp-runtime = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;lite-json/std&quot;,&#xD;&#xA;	&quot;log/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-io/std&quot;,&#xD;&#xA;	&quot;sp-keystore&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;have tried `cargo clean`, `cargo update`, &#xD;&#xA;```&#xD;&#xA;rustup update&#xD;&#xA;rustup update nightly&#xD;&#xA;rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GmF0c.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13826" PostHistoryTypeId="2" PostId="3686" RevisionGUID="78cc375b-0f8c-4177-a5bb-21c3b1430544" CreationDate="2022-07-09T21:53:20.863" UserId="351" Text="I guess, sp-io crate provide low level API for implementing storage. So you can build a custom trie and use sp-io to embed it as child trie." ContentLicense="CC BY-SA 4.0" />
  <row Id="13828" PostHistoryTypeId="2" PostId="3687" RevisionGUID="a2d6122e-dabc-464a-a663-a2fc14201a58" CreationDate="2022-07-10T01:18:50.123" UserId="2866" Text="I tried frontier-node-template it's working fine with substrate part but showing less balance in metamask.&#xD;&#xA;I used chainid and RPC it's showing 20 TEST instead of 20M Tokens &#xD;&#xA;What's i am missing? How to include decimal for evm chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13830" PostHistoryTypeId="1" PostId="3687" RevisionGUID="a2d6122e-dabc-464a-a663-a2fc14201a58" CreationDate="2022-07-10T01:18:50.123" UserId="2866" Text="How to include evm chain decimals?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13831" PostHistoryTypeId="3" PostId="3687" RevisionGUID="a2d6122e-dabc-464a-a663-a2fc14201a58" CreationDate="2022-07-10T01:18:50.123" UserId="2866" Text="|evm|chainspec|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13832" PostHistoryTypeId="2" PostId="3688" RevisionGUID="525c36d6-08d7-4cd0-82ae-34ee2dc459f6" CreationDate="2022-07-10T06:46:08.687" UserId="1744" Text=" I am using Ubuntu 20.04 on windows 10 wsl and when I run the command in my terminals:&#xD;&#xA;&#xD;&#xA;'''&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;'''&#xD;&#xA;&#xD;&#xA;Getting error like this:&#xD;&#xA;&#xD;&#xA;'''&#xD;&#xA; ./target/release/node-template \&#xD;&#xA;&gt; --base-path /tmp/alice \&#xD;&#xA;&gt; --chain local \&#xD;&#xA;&gt; --alice \&#xD;&#xA;&gt; --port 30333 \&#xD;&#xA;&gt; --ws-port 9945 \ &#xD;&#xA;&gt; --rpc-port 9933 \&#xD;&#xA;&gt; --node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;&gt; --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;&gt; --validator&#xD;&#xA;2022-07-10 12:05:30 Substrate Node    &#xD;&#xA;2022-07-10 12:05:30 ✌️  version 4.0.0-dev-9c89be106cb&#xD;&#xA;2022-07-10 12:05:30 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2022    &#xD;&#xA;2022-07-10 12:05:30  Chain specification: Local Testnet&#xD;&#xA;2022-07-10 12:05:30   Node name: Alice&#xD;&#xA;2022-07-10 12:05:30  Role: AUTHORITY&#xD;&#xA;2022-07-10 12:05:30  Database: RocksDb at /tmp/alice/chains/local_testnet/db/full&#xD;&#xA;2022-07-10 12:05:30 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)&#xD;&#xA;Error: Service(Client(RuntimeApiError(Application(Execution(RuntimeConstruction(Other(&quot;failed to instantiate a new WASM module instance: Insufficient resources: cannot create a memfd&quot;)))))))&#xD;&#xA;'''&#xD;&#xA;&#xD;&#xA;help me to find out the solutions" ContentLicense="CC BY-SA 4.0" />
  <row Id="13834" PostHistoryTypeId="1" PostId="3688" RevisionGUID="525c36d6-08d7-4cd0-82ae-34ee2dc459f6" CreationDate="2022-07-10T06:46:08.687" UserId="1744" Text="&quot;failed to instantiate a new WASM module instance: Insufficient resources: cannot create a memfd&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13835" PostHistoryTypeId="3" PostId="3688" RevisionGUID="525c36d6-08d7-4cd0-82ae-34ee2dc459f6" CreationDate="2022-07-10T06:46:08.687" UserId="1744" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13836" PostHistoryTypeId="5" PostId="3685" RevisionGUID="f4cf83c6-2cdb-4105-b292-a31ad55818a1" CreationDate="2022-07-10T08:45:47.777" UserId="2451" Comment="deleted 2 characters in body" Text="The requirement to utilise a binary merkle tree and sparse merkle tree in a runtime module has recently arisen.  The runtime will need to be able to fetch data and witnesses from the trees.  I have been exploring the best way to implement this by utilising the frameworks provided by substrate.  I watched the following talk given by Shawn Tabrizi which was very insightful and provided a deep dive into substrates storage capabilities https://www.youtube.com/watch?v=kKKOL20FdII&amp;ab_channel=ParityTech.  Shawn mentions that substrate supports custom tree structures which can be embedded into the global patricia trie as child objects.  Are there any resources that cover custom implementations or ideally some examples?  I also want to understand how this will work with cumulus / parachains.  I assume the implementation need to be compatible with the patterns cumulus uses to construct PoV blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="13837" PostHistoryTypeId="2" PostId="3689" RevisionGUID="889d1e86-1cb5-4529-936f-545c66cc54ed" CreationDate="2022-07-10T09:17:15.057" UserId="132" Text="Update rust toolchain with command `rustup update` fixed the issue.&#xD;&#xA;&#xD;&#xA;You could also try clean the registry index by remove folder `~/.cargo/registry/index` if you don't want to update the toolchain.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13839" PostHistoryTypeId="2" PostId="3690" RevisionGUID="06b1609d-ad1e-4fab-9dd5-3f1f71b978fa" CreationDate="2022-07-10T10:04:23.370" UserId="2809" Text="I want to fix the Gas fee for every transaction ever i my frontier-node-template. I've implemented this for the substrate runtime&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;pub const FIXED_GAS_FEE: u32 = 2500;&#xD;&#xA;pub struct ConstantFee&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;impl&lt;T&gt; WeightToFeePolynomial for ConstantFee&lt;T&gt;&#xD;&#xA;where&#xD;&#xA;	T: BaseArithmetic + From&lt;u32&gt; + Copy + Unsigned,&#xD;&#xA;{&#xD;&#xA;	type Balance = T;&#xD;&#xA;&#xD;&#xA;	fn polynomial() -&gt; WeightToFeeCoefficients&lt;Self::Balance&gt; {&#xD;&#xA;		smallvec!(WeightToFeeCoefficient {&#xD;&#xA;			coeff_integer: FIXED_GAS_FEE.into(),&#xD;&#xA;			coeff_frac: Perbill::zero(),&#xD;&#xA;			negative: false,&#xD;&#xA;			degree: 0,&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn calc(weight: &amp;Weight) -&gt; Self::Balance {&#xD;&#xA;		FIXED_GAS_FEE.into()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const TransactionByteFee: Balance = 0;&#xD;&#xA;}&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;0&gt;;&#xD;&#xA;	type WeightToFee = ConstantFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = ConstantMultiplier&lt;Balance, TransactionByteFee&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How ever, every transaction seems to cost 125,000,000 gas, which I located as the BaseExtrinsicWeight, and my ConstantFee struct seems to have no affect on the gas fee.&#xD;&#xA;&#xD;&#xA;I would like to,&#xD;&#xA;1. Ignore all weights&#xD;&#xA;2. Set gas fee as a constant in the substrate runtime and for the EVM&#xD;&#xA;&#xD;&#xA;how can I go by doing this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13841" PostHistoryTypeId="1" PostId="3690" RevisionGUID="06b1609d-ad1e-4fab-9dd5-3f1f71b978fa" CreationDate="2022-07-10T10:04:23.370" UserId="2809" Text="Get around ExtrinsicBaseWeight" ContentLicense="CC BY-SA 4.0" />
  <row Id="13842" PostHistoryTypeId="3" PostId="3690" RevisionGUID="06b1609d-ad1e-4fab-9dd5-3f1f71b978fa" CreationDate="2022-07-10T10:04:23.370" UserId="2809" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13843" PostHistoryTypeId="5" PostId="3688" RevisionGUID="61b71ea2-ea73-422b-b8a5-1ff9ff00705e" CreationDate="2022-07-10T10:13:23.237" UserId="34" Comment="edited body; edited tags; edited title" Text=" I am using Ubuntu 20.04 on windows 10 wsl and when I run the command in my terminals:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Getting error like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; ./target/release/node-template \&#xD;&#xA;&gt; --base-path /tmp/alice \&#xD;&#xA;&gt; --chain local \&#xD;&#xA;&gt; --alice \&#xD;&#xA;&gt; --port 30333 \&#xD;&#xA;&gt; --ws-port 9945 \ &#xD;&#xA;&gt; --rpc-port 9933 \&#xD;&#xA;&gt; --node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;&gt; --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;&gt; --validator&#xD;&#xA;2022-07-10 12:05:30 Substrate Node    &#xD;&#xA;2022-07-10 12:05:30 ✌️  version 4.0.0-dev-9c89be106cb&#xD;&#xA;2022-07-10 12:05:30 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2022    &#xD;&#xA;2022-07-10 12:05:30  Chain specification: Local Testnet&#xD;&#xA;2022-07-10 12:05:30   Node name: Alice&#xD;&#xA;2022-07-10 12:05:30  Role: AUTHORITY&#xD;&#xA;2022-07-10 12:05:30  Database: RocksDb at /tmp/alice/chains/local_testnet/db/full&#xD;&#xA;2022-07-10 12:05:30 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)&#xD;&#xA;Error: Service(Client(RuntimeApiError(Application(Execution(RuntimeConstruction(Other(&quot;failed to instantiate a new WASM module instance: Insufficient resources: cannot create a memfd&quot;)))))))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;help me to find out the solutions" ContentLicense="CC BY-SA 4.0" />
  <row Id="13844" PostHistoryTypeId="4" PostId="3688" RevisionGUID="61b71ea2-ea73-422b-b8a5-1ff9ff00705e" CreationDate="2022-07-10T10:13:23.237" UserId="34" Comment="edited body; edited tags; edited title" Text="Error: failed to instantiate a new WASM module instance: Insufficient resources: cannot create a memf&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13845" PostHistoryTypeId="6" PostId="3688" RevisionGUID="61b71ea2-ea73-422b-b8a5-1ff9ff00705e" CreationDate="2022-07-10T10:13:23.237" UserId="34" Comment="edited body; edited tags; edited title" Text="|substrate-node-template|wasm|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13846" PostHistoryTypeId="5" PostId="3690" RevisionGUID="4d10bef3-a1c4-48c4-bb26-0a2ba3354960" CreationDate="2022-07-10T10:46:45.730" UserId="2809" Comment="added 216 characters in body; edited tags" Text="I want to fix the Gas fee for every transaction ever i my frontier-node-template. I've implemented this for the substrate runtime&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;pub const FIXED_GAS_FEE: u32 = 2500;&#xD;&#xA;pub struct ConstantFee&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;impl&lt;T&gt; WeightToFeePolynomial for ConstantFee&lt;T&gt;&#xD;&#xA;where&#xD;&#xA;	T: BaseArithmetic + From&lt;u32&gt; + Copy + Unsigned,&#xD;&#xA;{&#xD;&#xA;	type Balance = T;&#xD;&#xA;&#xD;&#xA;	fn polynomial() -&gt; WeightToFeeCoefficients&lt;Self::Balance&gt; {&#xD;&#xA;		smallvec!(WeightToFeeCoefficient {&#xD;&#xA;			coeff_integer: FIXED_GAS_FEE.into(),&#xD;&#xA;			coeff_frac: Perbill::zero(),&#xD;&#xA;			negative: false,&#xD;&#xA;			degree: 0,&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn calc(weight: &amp;Weight) -&gt; Self::Balance {&#xD;&#xA;		FIXED_GAS_FEE.into()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const TransactionByteFee: Balance = 0;&#xD;&#xA;}&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;0&gt;;&#xD;&#xA;	type WeightToFee = ConstantFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = ConstantMultiplier&lt;Balance, TransactionByteFee&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How ever, every transaction seems to cost 125,000,000 gas, which I located as the BaseExtrinsicWeight, and my ConstantFee struct seems to have no affect on the gas fee.&#xD;&#xA;&#xD;&#xA;I would like to,&#xD;&#xA;1. Ignore all weights&#xD;&#xA;2. Set gas fee as a constant in the substrate runtime and for the EVM&#xD;&#xA;&#xD;&#xA;how can I go by doing this?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**UPDATE**&#xD;&#xA;&#xD;&#xA;I increased FIXED_GAS_FEE to 9 decimals, now it seems to work. It appears we have a minimum gas fee of 125_000_000, maybe I could only have gas in some particular order of decimals? Thoughts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13847" PostHistoryTypeId="6" PostId="3690" RevisionGUID="4d10bef3-a1c4-48c4-bb26-0a2ba3354960" CreationDate="2022-07-10T10:46:45.730" UserId="2809" Comment="added 216 characters in body; edited tags" Text="|extrinsic|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13848" PostHistoryTypeId="5" PostId="3690" RevisionGUID="e089cc25-a859-4d34-83af-487e7c974442" CreationDate="2022-07-10T10:47:39.740" UserId="2809" Comment="added 2 characters in body" Text="I want to fix the Gas fee for every transaction ever i my *frontier-node-template*. I've implemented this for the substrate runtime&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;pub const FIXED_GAS_FEE: u32 = 2500;&#xD;&#xA;pub struct ConstantFee&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;impl&lt;T&gt; WeightToFeePolynomial for ConstantFee&lt;T&gt;&#xD;&#xA;where&#xD;&#xA;	T: BaseArithmetic + From&lt;u32&gt; + Copy + Unsigned,&#xD;&#xA;{&#xD;&#xA;	type Balance = T;&#xD;&#xA;&#xD;&#xA;	fn polynomial() -&gt; WeightToFeeCoefficients&lt;Self::Balance&gt; {&#xD;&#xA;		smallvec!(WeightToFeeCoefficient {&#xD;&#xA;			coeff_integer: FIXED_GAS_FEE.into(),&#xD;&#xA;			coeff_frac: Perbill::zero(),&#xD;&#xA;			negative: false,&#xD;&#xA;			degree: 0,&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn calc(weight: &amp;Weight) -&gt; Self::Balance {&#xD;&#xA;		FIXED_GAS_FEE.into()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const TransactionByteFee: Balance = 0;&#xD;&#xA;}&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;0&gt;;&#xD;&#xA;	type WeightToFee = ConstantFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = ConstantMultiplier&lt;Balance, TransactionByteFee&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How ever, every transaction seems to cost 125,000,000 gas, which I located as the BaseExtrinsicWeight, and my ConstantFee struct seems to have no affect on the gas fee.&#xD;&#xA;&#xD;&#xA;I would like to,&#xD;&#xA;1. Ignore all weights&#xD;&#xA;2. Set gas fee as a constant in the substrate runtime and for the EVM&#xD;&#xA;&#xD;&#xA;how can I go by doing this?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**UPDATE**&#xD;&#xA;&#xD;&#xA;I increased FIXED_GAS_FEE to 9 decimals, now it seems to work. It appears we have a minimum gas fee of 125_000_000, maybe I could only have gas in some particular order of decimals? Thoughts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13849" PostHistoryTypeId="2" PostId="3691" RevisionGUID="aa9ce9ef-b3e2-43c5-9ce9-427eafdcdf5b" CreationDate="2022-07-10T11:59:09.243" UserId="167" Text="This is probably not Substrate/Polkadot related, rather your execution operation system is for some reason blocking this particular system call. Try executing `memfd_create` from `C` or some other language to see if it the problem persists or not.&#xD;&#xA;&#xD;&#xA;Related links: &#xD;&#xA;- https://man7.org/linux/man-pages/man2/memfd_create.2.html&#xD;&#xA;- https://stackoverflow.com/questions/56615488/getting-gcc-error-sys-memfd-h-no-such-file-or-directory" ContentLicense="CC BY-SA 4.0" />
  <row Id="13851" PostHistoryTypeId="2" PostId="3692" RevisionGUID="ef8f8b18-0adc-40c4-b43c-7bdad28c20db" CreationDate="2022-07-10T12:37:22.110" UserId="351" Text="The chain spec docs link &#xD;&#xA;https://paritytech.github.io/substrate/master/sc_chain_spec/struct.GenericChainSpec.html#method.from_genesis&#xD;&#xA;&#xD;&#xA;And do you know that you can produce a json file which is the chain_spec and check the keys using ... -build-spec command flag&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13853" PostHistoryTypeId="2" PostId="3693" RevisionGUID="b88f20c6-378d-4a32-a936-efe2d1a8048c" CreationDate="2022-07-10T12:59:42.110" UserId="28" Text="The `Properties` field in the Chain Specification is intentionally arbitrary. As you see in the comment:&#xD;&#xA;&#xD;&#xA;&gt; Arbitrary properties defined in chain spec as a JSON object&#xD;&#xA;&#xD;&#xA;As a chain spec creator, you can add whatever you want in here, and it can be used by clients or libraries which are programmed to interpret that data.&#xD;&#xA;&#xD;&#xA;At the time of writing this post, the &quot;common&quot; properties included with a chain spec are:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// from Kusama&#xD;&#xA;&quot;properties&quot;: {&#xD;&#xA;    &quot;ss58Format&quot;: 2,&#xD;&#xA;    &quot;tokenDecimals&quot;: 12,&#xD;&#xA;    &quot;tokenSymbol&quot;: &quot;KSM&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These are used by Polkadot JS and other front-end libraries to improve the user experience, but are not strictly required." ContentLicense="CC BY-SA 4.0" />
  <row Id="13855" PostHistoryTypeId="52" PostId="3688" RevisionGUID="f0a2f718-feda-4a22-9004-66d0f4f7740f" CreationDate="2022-07-10T14:46:19.457" />
  <row Id="13856" PostHistoryTypeId="2" PostId="3694" RevisionGUID="1332f18d-554c-41d6-96f0-bca84423d2da" CreationDate="2022-07-10T15:18:48.293" UserId="2408" Text="Have you tried explicetly importing `sp_core::Pair` as I've mentioned in the [answer](https://substrate.stackexchange.com/a/2787/2408) you linked above?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13858" PostHistoryTypeId="2" PostId="3695" RevisionGUID="8e664414-4cff-45a6-9cb2-6bc46412e4ff" CreationDate="2022-07-10T15:29:37.347" UserId="2408" Text="You should implement contracts' `Config`, not just `Trait`.   &#xD;&#xA;Use `impl pallet_contracts::Config for Runtime`.  &#xD;&#xA;Here is [my example](https://github.com/CREESTL/Crain/blob/b09671f9de7d0d61dae914be658f53b8d72b0632/runtime/src/lib.rs#L270) of implementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="13860" PostHistoryTypeId="2" PostId="3696" RevisionGUID="58ef84dc-8eab-44cd-abb7-b5c9e9e28f1a" CreationDate="2022-07-10T21:40:48.523" UserId="2868" Text="In the [`AdvancedEscrow`](https://github.com/AcalaNetwork/hardhat-tutorials/blob/master/advanced-escrow/contracts/AdvancedEscrow.sol) contract, we're essentially dispensing out aUSD tokens as rewards (on Mandala testnet obviously). My question is this: what gives me (either as a deployer of the contract or a general user of my dApp) the permission to suddenly dispense out tokens out of our own free will?&#xD;&#xA;&#xD;&#xA;Clearly, I'm not understanding something well, but it seems to me that I could essentially &quot;bypass&quot; a faucet and issue myself any number of aUSD tokens I deem fit, at any time just by slightly tweaking the contract.&#xD;&#xA;&#xD;&#xA;That said, what would you also suggest a contract developer that wants to build a protocol to issue out aUSD tokens as yield for using their dApp (as some sort of hypothetical usecase)?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="13862" PostHistoryTypeId="1" PostId="3696" RevisionGUID="58ef84dc-8eab-44cd-abb7-b5c9e9e28f1a" CreationDate="2022-07-10T21:40:48.523" UserId="2868" Text="Possibility of abuse with aUSD issuance on Mandala [AdvancedEscrow]" ContentLicense="CC BY-SA 4.0" />
  <row Id="13863" PostHistoryTypeId="3" PostId="3696" RevisionGUID="58ef84dc-8eab-44cd-abb7-b5c9e9e28f1a" CreationDate="2022-07-10T21:40:48.523" UserId="2868" Text="|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13864" PostHistoryTypeId="2" PostId="3697" RevisionGUID="e63e0e1f-be2e-47ad-9cc9-48f3a3b41406" CreationDate="2022-07-10T22:12:29.723" UserId="2724" Text="The `AdvancedEscrow` smart contract is used to automatically release funds added to the smart contract after certain precondition are met. In this case, either when the deadline block is reached or when the initiator of the escrow releases the funds.&#xD;&#xA;&#xD;&#xA;So the flow of the smart contract is as follows:&#xD;&#xA; 1. Initiator funds the smart contract in a desired token (could be ACA)&#xD;&#xA; 2. The initiator initiates the escrow by specifying the beneficiary and the deadline after which the funds should be released automatically by the on-chain scheduler&#xD;&#xA; 3. Upon the initiation of the escrow, the smart contract uses the on-chain DEX to swap the token that the initiator sent to the smart contract for aUSD&#xD;&#xA; 4. (This step is optional) The beneficiary selects the desired token to be paid out in (could be DOT). If the egress token is not set, the escrow is paid out in aUSD&#xD;&#xA; 5. The funds from escrow are released to the beneficiary (either by a call from the initiator or by the on-chain scheduler)&#xD;&#xA;&#xD;&#xA;The idea of an escrow is that the funds are held by an impartial party while the beneficiary provides a service to the initiator. For example: You hire a smart contract engineer to build a smart contract for you, but you don't want to send them the funds before they are done and they don't want to start the work, before they see the funds. This way the funds can be seen by the engineer, while they still have to perform the task before getting the funds released to them.&#xD;&#xA;&#xD;&#xA;&gt; TLDR: You need to fund the escrow in order to get the aUSD and the&#xD;&#xA;&gt; aUSD is swapped in a DEX with a rate available to anyone. There is no&#xD;&#xA;&gt; infinite generation of aUSD or generation of aUSD at all.&#xD;&#xA;&#xD;&#xA;The AdvancedEscrow example is intentionally built in a way that encourages improvement (like: what happens if the service isn't delivered? Should the funds be released back to the initiator or should something else happen?).&#xD;&#xA;&#xD;&#xA;As for the suggestion for issuing aUSD as yield for using the dApp, it really depends on the use case. You could however incorporate the on-chain schedule to issue the aUSD to the users. It is currently only available on Mandala network as we will do some further optimisations before releasing them on public networks." ContentLicense="CC BY-SA 4.0" />
  <row Id="13867" PostHistoryTypeId="2" PostId="3698" RevisionGUID="f6999bce-9ccf-4a31-8053-f050986280e3" CreationDate="2022-07-11T08:54:57.337" UserId="632" Text="Hello I would like to be able to call &#xD;&#xA;&#xD;&#xA;    fn system_name(&amp;self) -&gt; RpcResult&lt;String&gt; {&#xD;&#xA;    	Ok(self.info.impl_name.clone())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;inside a custom rpc call&#xD;&#xA;our custom rpc call is implemented like that: &#xD;&#xA;&#xD;&#xA;    io.extend_with(ApiServer::to_delegate(Api::new(&#xD;&#xA;		client.clone(),&#xD;&#xA;		pool.clone(),&#xD;&#xA;		graph,&#xD;&#xA;		Some(aureum_node_runtime::TransactionConverter),&#xD;&#xA;		network.clone(),&#xD;&#xA;		signers,&#xD;&#xA;		overrides.clone(),&#xD;&#xA;		backend.clone(),&#xD;&#xA;		is_authority,&#xD;&#xA;		block_data_cache.clone(),&#xD;&#xA;	)));" ContentLicense="CC BY-SA 4.0" />
  <row Id="13869" PostHistoryTypeId="1" PostId="3698" RevisionGUID="f6999bce-9ccf-4a31-8053-f050986280e3" CreationDate="2022-07-11T08:54:57.337" UserId="632" Text="Get System info in custom RPC call" ContentLicense="CC BY-SA 4.0" />
  <row Id="13870" PostHistoryTypeId="3" PostId="3698" RevisionGUID="f6999bce-9ccf-4a31-8053-f050986280e3" CreationDate="2022-07-11T08:54:57.337" UserId="632" Text="|substrate-node|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13872" PostHistoryTypeId="2" PostId="3699" RevisionGUID="f987b8bf-0fda-43bb-a27a-7e91c32726e1" CreationDate="2022-07-11T09:27:15.693" UserId="121" Text="1. Once a team successfully bid for a parachain slot, how long is the window that they can leave the slot empty? What will happen if they cannot successfully connect their chain in before the window closes.&#xD;&#xA;&#xD;&#xA;2. Is there a more detail instructions on how a bare-bone shell parachain got upgraded to Statemint? &#xD;&#xA;&#xD;&#xA;3. During the parachain upgrade, can the team reset the genesis block information?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13874" PostHistoryTypeId="1" PostId="3699" RevisionGUID="f987b8bf-0fda-43bb-a27a-7e91c32726e1" CreationDate="2022-07-11T09:27:15.693" UserId="121" Text="About parachain auction and parachain upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="13875" PostHistoryTypeId="3" PostId="3699" RevisionGUID="f987b8bf-0fda-43bb-a27a-7e91c32726e1" CreationDate="2022-07-11T09:27:15.693" UserId="121" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13877" PostHistoryTypeId="2" PostId="3700" RevisionGUID="46326b67-2c1c-43d9-a997-14b4927db488" CreationDate="2022-07-11T10:50:27.720" UserId="2102" Text="I've been using the [validator-set][1] pallet to add new validators on a permissioned network, and although it solves the issue related to block production slowing down when a validator is missing, it has a 'recovery' period where the block production slows down until the next session happens.&#xD;&#xA;&#xD;&#xA;I was wondering how does Polkadot or any other chain deal with this problem when a validator goes offline and it is supposed to author a block. Does it also slow for some time and later on the missing validator is removed from the session to maintain the block production constant?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/gautamdhameja/substrate-validator-set" ContentLicense="CC BY-SA 4.0" />
  <row Id="13879" PostHistoryTypeId="1" PostId="3700" RevisionGUID="46326b67-2c1c-43d9-a997-14b4927db488" CreationDate="2022-07-11T10:50:27.720" UserId="2102" Text="What happens if a validator goes offline and it's part of the session?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13880" PostHistoryTypeId="3" PostId="3700" RevisionGUID="46326b67-2c1c-43d9-a997-14b4927db488" CreationDate="2022-07-11T10:50:27.720" UserId="2102" Text="|polkadot|block-production|poa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13881" PostHistoryTypeId="2" PostId="3701" RevisionGUID="684936aa-777a-40cb-a7e9-35a3c76ffa9f" CreationDate="2022-07-11T11:10:10.510" UserId="2025" Text="First, bear in mind that Polkadot uses a block authoring system completely different to what you saw in the validator-set pallet you mentioned in your question.&#xD;&#xA;&#xD;&#xA;In Polkadot, BABE algorithm assigns validators per slot in a way that helps to greatly minimize the probability of a slot being missed. This is done by running a secondary, round-robin style validator selection algorithm in the background in parallel with the primary BABE election process. You can read the general description about this process in [this doc link](https://wiki.polkadot.network/docs/learn-consensus#block-production-babe).&#xD;&#xA;&#xD;&#xA;Moreover, if a validator is assigned to author a block and missed their slot, they will be reported as &quot;unresponsive&quot;. If they are unresponsive for too long, they may be slashed. You will find the details of this protocol in the Unresponsiveness section of [this documentation link](https://wiki.polkadot.network/docs/learn-staking#unresponsiveness).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13883" PostHistoryTypeId="2" PostId="3702" RevisionGUID="e215b0eb-5d1c-4da5-ac1c-debfe9008357" CreationDate="2022-07-11T11:34:12.443" UserId="501" Text="I'm very interested to use XCMP using with the direct method, but documentation and examples are very hard to find at the current state of polkadot/substrate.&#xD;&#xA;&#xD;&#xA;Can someone explain me how I could send direct XCMP messages using the [cumulus/relay-chain tutorial][1] ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-other-chains/local-relay/" ContentLicense="CC BY-SA 4.0" />
  <row Id="13885" PostHistoryTypeId="1" PostId="3702" RevisionGUID="e215b0eb-5d1c-4da5-ac1c-debfe9008357" CreationDate="2022-07-11T11:34:12.443" UserId="501" Text="Is direct XCMP possible ? If yes, how?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13886" PostHistoryTypeId="3" PostId="3702" RevisionGUID="e215b0eb-5d1c-4da5-ac1c-debfe9008357" CreationDate="2022-07-11T11:34:12.443" UserId="501" Text="|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13887" PostHistoryTypeId="5" PostId="1854" RevisionGUID="396cd9dc-421a-459b-99a2-82bedf561caa" CreationDate="2022-07-11T11:47:30.877" UserId="234" Comment="Replaced the benchmark link (I think the new one is the correct one from the new version of the substrate docs) since the old one just takes you to the Quickstart page." Text="During the last [Substrate Builders Program](https://substrate.io/ecosystem/substrate-builders-program/) Office Hours, the [Mangata](https://mangata.finance/) team raised awareness around some potential confusion around the **Substrate Benchmarking System** and how it is being applied in the Polkadot Ecosystem.&#xD;&#xA;&#xD;&#xA;Polkadot Wiki suggests some [Standard Hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#standard-hardware), which are the same as in the [Substrate Docs](https://docs.substrate.io/main-docs/test/benchmark/).&#xD;&#xA;&#xD;&#xA;Meanwhile, OnFinality Polkadot node hardware has modest 4GB of memory, and go even lower for parachain nodes.&#xD;&#xA;&#xD;&#xA;How do we reconcile those differences?&#xD;&#xA;Can OnFinality's nodes hit bottlenecks earlier than expected, due to their deviation from standard hardware?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13888" PostHistoryTypeId="24" PostId="1854" RevisionGUID="396cd9dc-421a-459b-99a2-82bedf561caa" CreationDate="2022-07-11T11:47:30.877" Comment="Proposed by 234 approved by 34 edit id of 230" ContentLicense="CC BY-SA 4.0" />
  <row Id="13889" PostHistoryTypeId="2" PostId="3703" RevisionGUID="4448c894-d6a3-440d-8d0a-3b24322a7a9b" CreationDate="2022-07-11T12:53:32.573" UserId="553" Text="Seems like this have been fixed without doing anything from our side." ContentLicense="CC BY-SA 4.0" />
  <row Id="13891" PostHistoryTypeId="2" PostId="3704" RevisionGUID="ec6eb2ee-4e58-49d1-be97-3511d9bfde3e" CreationDate="2022-07-11T13:27:26.133" UserId="2869" Text="**Context:** We are using GSRPC for interacting with a Polkadot Node. We are sending transactions using [SubmitAndWatchExtrinsic](https://pkg.go.dev/github.com/centrifuge/go-substrate-rpc-client/v3@v3.0.2/rpc/author#Author.SubmitAndWatchExtrinsic).&#xD;&#xA;&#xD;&#xA;**Question:** How can I detect if the transaction failed?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Note: I am aware that the [ExtrinsicStatusSubscription](https://pkg.go.dev/github.com/centrifuge/go-substrate-rpc-client/v3@v3.0.2/rpc/author#ExtrinsicStatusSubscription) reports about the status of an extrinsic. However, it does not seem to report whether the transaction failed during execution." ContentLicense="CC BY-SA 4.0" />
  <row Id="13893" PostHistoryTypeId="1" PostId="3704" RevisionGUID="ec6eb2ee-4e58-49d1-be97-3511d9bfde3e" CreationDate="2022-07-11T13:27:26.133" UserId="2869" Text="GSRPC: Check transaction failed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13894" PostHistoryTypeId="3" PostId="3704" RevisionGUID="ec6eb2ee-4e58-49d1-be97-3511d9bfde3e" CreationDate="2022-07-11T13:27:26.133" UserId="2869" Text="|transactions|events|golang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13895" PostHistoryTypeId="2" PostId="3705" RevisionGUID="1c599698-fa2d-43e9-97f6-2730628d1953" CreationDate="2022-07-11T14:20:49.023" UserId="501" Text="I get the WeightNotComputable error when I try to send this XCM transaction. What am I doing wrong?&#xD;&#xA;&#xD;&#xA;In [the documentation I've read][1]:&#xD;&#xA;```&#xD;&#xA;WeightNotComputable&#xD;&#xA;The weight of an XCM message is not computable ahead of execution.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I know the XCM pallet can't know the required weight beforehand...but I don't understand why I get this error ?&#xD;&#xA;&#xD;&#xA;**PS**: To create the XCM transaction call in a script I've done this:&#xD;&#xA;```&#xD;&#xA;    const destination = {&#xD;&#xA;        X1: {&#xD;&#xA;            Parachain: parachainId.toNumber(),&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    let templatePallet_hex_call = await parachainApi.tx.templatePallet.doSomething(22).signAsync(account);&#xD;&#xA;    console.log(&quot;templatePallet_hex_call&quot;, inspect(templatePallet_hex_call.toHex(), false, null, true))&#xD;&#xA;&#xD;&#xA;    const message = {&#xD;&#xA;        Transact: { originType: &quot;Native&quot;, requireWeightAtMost: 10000000000, call: compactAddLength(hexToU8a(templatePallet_hex_call.toHex())) }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    console.log(&quot;destination&quot;, inspect(destination, false, null, true))&#xD;&#xA;    console.log(&quot;message&quot;, inspect(message, false, null, true))&#xD;&#xA;&#xD;&#xA;    const txHash = await relaychainApiInst.tx.xcmPallet.send(destination, message).signAndSend(account);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![screenshot][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/polkadot/xcm/v2/prelude/opaque/enum.XcmError.html#variant.WeightNotComputable&#xD;&#xA;  [2]: https://i.stack.imgur.com/DZs5a.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13897" PostHistoryTypeId="1" PostId="3705" RevisionGUID="1c599698-fa2d-43e9-97f6-2730628d1953" CreationDate="2022-07-11T14:20:49.023" UserId="501" Text="XCMPallet send transact: error WeightNotComputable" ContentLicense="CC BY-SA 4.0" />
  <row Id="13898" PostHistoryTypeId="3" PostId="3705" RevisionGUID="1c599698-fa2d-43e9-97f6-2730628d1953" CreationDate="2022-07-11T14:20:49.023" UserId="501" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13899" PostHistoryTypeId="2" PostId="3706" RevisionGUID="cb8d303c-1752-4f5b-a063-081338aa39c3" CreationDate="2022-07-11T17:08:37.767" UserId="165" Text=" 1. I don't really quite get your question. One can bid for a slot as long as there is an ongoing auction. Once a winner is chosen, its parathread will be granted with a slot and then onboarded as a parachain. This parachain will start producing blocks as soon as there are a couple of nodes and collators running for it. And will keep on onboarded until the end of the LPs that were won during the auction. For a more detailed explanation on how auctions work please refer to the wiki - https://wiki.polkadot.network/docs/learn-auction&#xD;&#xA;Just to add here, there is nothing like that window you talk about in the implementation, so collators can be run anytime, but block production won't start until they are not running.&#xD;&#xA;&#xD;&#xA; 2. I think Bruno's comment answers this point by itself.&#xD;&#xA;&#xD;&#xA; 3. Thinking on an upgrade from shell to another runtime with more features, in that process you might need some genesis storage for a few of the new included pallets. You can add this storage items as part of a migration during the upgrade process. &#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="13901" PostHistoryTypeId="2" PostId="3707" RevisionGUID="9a985159-9b27-4343-9e53-ab392d39cf42" CreationDate="2022-07-11T17:08:56.860" UserId="140" Text="Our parachain is live now on Kusama. Now some collators want to join the network and produce blocks. However, these collators are not part of `chain_spec` and invulnerable list.&#xD;&#xA;&#xD;&#xA;To add any extra collator to the invulnerable list, we have to perform the below steps:&#xD;&#xA;&#xD;&#xA;1) set keys in session via `session&gt;&gt;setKeys`. They need to have some network native tokens to perform this operation.&#xD;&#xA;&#xD;&#xA;2) Share `Public key (hex)` of their Aura key to Sudo user so that sudo can add collator in the invulnerable list using `collator-selection&gt;&gt; set_invulnerables`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Are the above steps mandatory for collator to produce blocks?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13903" PostHistoryTypeId="1" PostId="3707" RevisionGUID="9a985159-9b27-4343-9e53-ab392d39cf42" CreationDate="2022-07-11T17:08:56.860" UserId="140" Text="Is it necessary to execute `collator-selection&gt;&gt; set_invulnerables` to make collator eligible to produce blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13904" PostHistoryTypeId="3" PostId="3707" RevisionGUID="9a985159-9b27-4343-9e53-ab392d39cf42" CreationDate="2022-07-11T17:08:56.860" UserId="140" Text="|substrate-node|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13905" PostHistoryTypeId="2" PostId="3708" RevisionGUID="5ba9da7a-b71c-47d1-93da-de17ea97fd6e" CreationDate="2022-07-11T17:31:30.860" UserId="2722" Text="I Need to `Connect to Local Parachain` .&#xD;&#xA;&#xD;&#xA;I did step by step every thing in this page : [Substrate][1]&#xD;&#xA;&#xD;&#xA;in section `Start a collator node` i run this command : &#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-collator \&#xD;&#xA;    --alice \&#xD;&#xA;    --collator \&#xD;&#xA;    --force-authoring \&#xD;&#xA;    --chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;    --base-path /tmp/parachain/alice \&#xD;&#xA;    --port 40333 \&#xD;&#xA;    --ws-port 8844 \&#xD;&#xA;    -- \&#xD;&#xA;    --execution wasm \&#xD;&#xA;    --chain &lt;relay chain raw chain spec&gt; \&#xD;&#xA;    --port 30343 \&#xD;&#xA;    --ws-port 9977&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;in this section `--chain &lt;relay chain raw chain spec&gt; \` i used `rococo-local-parachain-2000-raw.json` but i got this error : &#xD;&#xA;&#xD;&#xA;&gt; 2022-07-11 20:02:31 ⛓  Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)    &#xD;&#xA;Error: Input(&quot;Relay chain argument error: Invalid input: Error parsing spec file: unknown field `relay_chain` at line 75 column 1&quot;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**what's the problem? how can i solve this error ???**&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="13907" PostHistoryTypeId="1" PostId="3708" RevisionGUID="5ba9da7a-b71c-47d1-93da-de17ea97fd6e" CreationDate="2022-07-11T17:31:30.860" UserId="2722" Text="Relay chain argument error: Invalid input: Error parsing spec file: unknown field `relay_chain` at line 75 column 1" ContentLicense="CC BY-SA 4.0" />
  <row Id="13908" PostHistoryTypeId="3" PostId="3708" RevisionGUID="5ba9da7a-b71c-47d1-93da-de17ea97fd6e" CreationDate="2022-07-11T17:31:30.860" UserId="2722" Text="|substrate-node|parachain|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13909" PostHistoryTypeId="2" PostId="3709" RevisionGUID="1d1a52a0-4b33-4b9c-bef6-963c2bf625cd" CreationDate="2022-07-11T18:50:50.900" UserId="555" Text="I'm trying to trigger the storage migration on polkadot UI for our parachain. I'm trying different types to do this but getting some issues:&#xD;&#xA;&#xD;&#xA;Type 1 : If I simply upload the wasm file from sudo &gt; setcode, then this is coming : &#xD;&#xA;[![enter image description here][1]][1] In this, On upper righthand blue proces will not complete.&#xD;&#xA;&#xD;&#xA;Type 2 : I'm using scheduler pallet, But If I want to want to upload the **runtime.compact.wasm** this error is shown(Size of wasm is 4.6mb): [![enter image description here][2]][2] &#xD;&#xA;But If I upload this runtime.compact.compressed.wasm: &#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;This error is shown: [![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;Type 3: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UTyHu.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/R5KWX.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/t6bTJ.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/qgrKu.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13911" PostHistoryTypeId="1" PostId="3709" RevisionGUID="1d1a52a0-4b33-4b9c-bef6-963c2bf625cd" CreationDate="2022-07-11T18:50:50.900" UserId="555" Text="I'm getting some issue during storage migration" ContentLicense="CC BY-SA 4.0" />
  <row Id="13912" PostHistoryTypeId="3" PostId="3709" RevisionGUID="1d1a52a0-4b33-4b9c-bef6-963c2bf625cd" CreationDate="2022-07-11T18:50:50.900" UserId="555" Text="|polkadot-js|polkadot|parachain|runtime-upgrade|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13913" PostHistoryTypeId="2" PostId="3710" RevisionGUID="03e6e42a-9de6-4439-9d5d-c63526de8004" CreationDate="2022-07-11T19:29:17.360" UserId="140" Text="This is not the way to perform runtime upgrade on parachain. &#xD;&#xA;&#xD;&#xA;Runtime upgrade process is different in solochain and parachain. Please refer this https://docs.substrate.io/reference/how-to-guides/parachains/runtime-upgrade/ " ContentLicense="CC BY-SA 4.0" />
  <row Id="13915" PostHistoryTypeId="2" PostId="3711" RevisionGUID="1ba59475-6b82-43bd-ba2a-f0334e405991" CreationDate="2022-07-11T19:48:59.437" UserId="2645" Text="The official documentation shows this about the Mapping's initialization: &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Is it fine if I initialize a Mapping using `default`? &#xD;&#xA;e.g. &#xD;&#xA;```&#xD;&#xA;initialize_contract(|contract: &amp;mut Self| {&#xD;&#xA;   contract.my_mapping = &lt;Mapping&lt;T, V&gt;&gt;::default();&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;In my case, `V` is a custom struct and the goal is to have an empty mapping after the contract initialization. &#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/e4xii.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13917" PostHistoryTypeId="1" PostId="3711" RevisionGUID="1ba59475-6b82-43bd-ba2a-f0334e405991" CreationDate="2022-07-11T19:48:59.437" UserId="2645" Text="ink! Mapping initialization" ContentLicense="CC BY-SA 4.0" />
  <row Id="13918" PostHistoryTypeId="3" PostId="3711" RevisionGUID="1ba59475-6b82-43bd-ba2a-f0334e405991" CreationDate="2022-07-11T19:48:59.437" UserId="2645" Text="|ink|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13919" PostHistoryTypeId="2" PostId="3712" RevisionGUID="8b2ab6a9-461d-409d-8dd7-a3ebae489758" CreationDate="2022-07-11T21:32:06.593" UserId="1824" Text="It's fine to initialize an empty `Mapping`. You can do this by not passing anything to the initialization closure. &#xD;&#xA;&#xD;&#xA;[The docs](https://ink.substrate.io/datastructures/mapping#initializing-a-mapping) you linked to cover this default case:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(constructor)]&#xD;&#xA;pub fn default() -&gt; Self {&#xD;&#xA;  // Even though we're not explicitly initializing the `Mapping`,&#xD;&#xA;  // we still need to call this&#xD;&#xA;  ink_lang::utils::initialize_contract(|_| {})&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13921" PostHistoryTypeId="2" PostId="3713" RevisionGUID="94ccc188-9187-4283-b81f-bdcdc374c577" CreationDate="2022-07-11T21:40:10.397" UserId="100" Text="The comments are correct, `@polkadot/api-contract` can only interact with wasm contracts deployed on chains that include `pallet-contracts`&#xD;&#xA;&#xD;&#xA;In your case, you need a JS solution to interact with an Ethereum smart contract on Moonriver, which uses a [different set of pallets][1]. &#xD;&#xA;&#xD;&#xA;The Moonbeam docs have a tutorial on how to configure Hardhat and interact with a deployed contract in the Hardhat console. &#xD;&#xA;https://docs.moonbeam.network/builders/build/eth-api/dev-env/hardhat&#xD;&#xA;&#xD;&#xA;Another option you could try is compiling Solidity for Substrate with Solang and using it with `@polkadot/api`  &#xD;&#xA;https://github.com/hyperledger-labs/solang#build-for-substrate &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.moonbeam.network/learn/features/eth-compatibility/#frontier" ContentLicense="CC BY-SA 4.0" />
  <row Id="13924" PostHistoryTypeId="2" PostId="3714" RevisionGUID="8e6f7139-0e74-45d3-9b13-c75084840883" CreationDate="2022-07-11T22:28:46.197" UserId="88" Text="I came across this issue while trying to export chainspec for the `parachain-template`. In my runtime, one pallet reserves some currency using the `orml-currencies` pallet on genesis, and for this, it depends on accounts having some initial balance. This should be provided by the genesis config of the `orml-tokens` module&#xD;&#xA;&#xD;&#xA;For reference, this is my genesis config for the `orml-tokens` module&#xD;&#xA;```rs&#xD;&#xA;//&lt;snip&gt;&#xD;&#xA;		tokens: parachain_template_runtime::TokensConfig {&#xD;&#xA;			balances: endowed_accounts&#xD;&#xA;			.iter()&#xD;&#xA;			.flat_map(|x| {&#xD;&#xA;				vec![&#xD;&#xA;					(x.clone(), CurrencyId::DOT, ENDOWMENT),&#xD;&#xA;					(x.clone(), CurrencyId::BTC, ENDOWMENT),&#xD;&#xA;				]&#xD;&#xA;			})&#xD;&#xA;			.collect(),&#xD;&#xA;			&#xD;&#xA;		},&#xD;&#xA;//&lt;snip&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And my runtime config for `orml-currencies`&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;//&lt;snip&gt;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const GetNativeCurrencyId: CurrencyId = CurrencyId::Native;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl orml_currencies::Config for Runtime {&#xD;&#xA;	type MultiCurrency = Tokens;&#xD;&#xA;	type NativeCurrency = BasicCurrencyAdapter&lt;Runtime, Balances, Amount, BlockNumber&gt;;&#xD;&#xA;	type GetNativeCurrencyId = GetNativeCurrencyId;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;//&lt;snip&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I set the currencyId of the genesis run of the extrinsic to Native, the reserve works. Strangely, when I use a different currencyId, the reserve doesn't work. The extrinsic throws an &quot;InsufficientBalance&quot; Error. To take things further, when I try the exact same extrinsic after genesis with a new account that's funded with some currency (e.g DOT) by one of the accounts intialised on genesis, the extrinsic works.&#xD;&#xA;&#xD;&#xA;Any Idea of what may be the issue here would be great! &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; This may be unrelated, but I've had a similar issue in the past when I used `repatriate_reserved` on the same account using `orml-currencies` and the native currency id. It would exit with the amount despite having some tokens in reserve, and would otherwise pass for other tokens.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13926" PostHistoryTypeId="1" PostId="3714" RevisionGUID="8e6f7139-0e74-45d3-9b13-c75084840883" CreationDate="2022-07-11T22:28:46.197" UserId="88" Text="Genesis Config of ORML tokens not loaded for other pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="13927" PostHistoryTypeId="3" PostId="3714" RevisionGUID="8e6f7139-0e74-45d3-9b13-c75084840883" CreationDate="2022-07-11T22:28:46.197" UserId="88" Text="|token|orml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13928" PostHistoryTypeId="2" PostId="3715" RevisionGUID="1717a9f2-a237-43df-9110-d0dbc3e8539e" CreationDate="2022-07-11T22:44:43.930" UserId="279" Text="you need to use the `relay chain` spec in `--chain &lt;relay chain raw chain spec&gt; \`, for example the one created for `rococo-local` with the command &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;polkadot build-spec --chain rococo-local --disable-default-bootnode --raw &gt; rococo-local.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="13930" PostHistoryTypeId="5" PostId="3711" RevisionGUID="d068f49b-f7a1-4f42-8e71-eb1ac4880e7f" CreationDate="2022-07-12T01:20:43.857" UserId="1824" Comment="Add link to docs." Text="The [official documentation](https://ink.substrate.io/datastructures/mapping) shows this about the Mapping's initialization: &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Is it fine if I initialize a Mapping using `default`? &#xD;&#xA;e.g. &#xD;&#xA;```&#xD;&#xA;initialize_contract(|contract: &amp;mut Self| {&#xD;&#xA;   contract.my_mapping = &lt;Mapping&lt;T, V&gt;&gt;::default();&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;In my case, `V` is a custom struct and the goal is to have an empty mapping after the contract initialization. &#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/e4xii.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13931" PostHistoryTypeId="4" PostId="3711" RevisionGUID="d068f49b-f7a1-4f42-8e71-eb1ac4880e7f" CreationDate="2022-07-12T01:20:43.857" UserId="1824" Comment="Add link to docs." Text="ink! `Mapping` default initialization" ContentLicense="CC BY-SA 4.0" />
  <row Id="13932" PostHistoryTypeId="24" PostId="3711" RevisionGUID="d068f49b-f7a1-4f42-8e71-eb1ac4880e7f" CreationDate="2022-07-12T01:20:43.857" Comment="Proposed by 1824 approved by 2645 edit id of 231" ContentLicense="CC BY-SA 4.0" />
  <row Id="13933" PostHistoryTypeId="2" PostId="3716" RevisionGUID="27288f5a-8471-449f-a5b9-a50025d7a990" CreationDate="2022-07-12T01:55:01.443" UserId="2805" Text="I am having an issue when running `nicks-pallet` on my computer. I followed [the set up process of a substrate node][1] but still can't run a successful `cargo check -p node-template-runtime` or `cargo build` but I am getting the error &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to select a version for `syn`.&#xD;&#xA;    ... required by package `frame-support-procedural v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2022-07#279593d8)`&#xD;&#xA;    ... which satisfies git dependency `frame-support-procedural` of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2022-07#279593d8)`&#xD;&#xA;    ... which satisfies git dependency `frame-support` of package `frame-system v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2022-07#279593d8)`&#xD;&#xA;    ... which satisfies git dependency `frame-system` of package `pallet-nicks v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=monthly-2022-07#279593d8)`&#xD;&#xA;    ... which satisfies git dependency `pallet-nicks` of package `node-template-runtime v4.0.0-dev (substrate-node-template-test/runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (substrate-node-template-test/node)`&#xD;&#xA;versions that meet the requirements `^1.0.98` are: 1.0.98&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `syn v1.0.95`&#xD;&#xA;    ... which satisfies dependency `syn = &quot;^1.0.84&quot;` (locked to 1.0.95) of package `async-trait v0.1.53`&#xD;&#xA;    ... which satisfies dependency `async-trait = &quot;^0.1&quot;` (locked to 0.1.53) of package `jsonrpsee-core v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee-core = &quot;^0.13.1&quot;` (locked to 0.13.1) of package `jsonrpsee v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee = &quot;^0.13.0&quot;` (locked to 0.13.1) of package `node-template v4.0.0-dev (substrate-node-template-test/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `syn` which could resolve this conflict&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any help will be appreciated.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/" ContentLicense="CC BY-SA 4.0" />
  <row Id="13935" PostHistoryTypeId="1" PostId="3716" RevisionGUID="27288f5a-8471-449f-a5b9-a50025d7a990" CreationDate="2022-07-12T01:55:01.443" UserId="2805" Text="Unable to run nicks pallet on Macbook M1 Pro" ContentLicense="CC BY-SA 4.0" />
  <row Id="13936" PostHistoryTypeId="3" PostId="3716" RevisionGUID="27288f5a-8471-449f-a5b9-a50025d7a990" CreationDate="2022-07-12T01:55:01.443" UserId="2805" Text="|substrate-node|substrate-node-template|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13938" PostHistoryTypeId="2" PostId="3717" RevisionGUID="d9a6870a-bb8e-4f84-bb06-4126a8cf3865" CreationDate="2022-07-12T03:43:39.147" UserId="1942" Text="how does the substrate chain set the max total supply? Looking at the staking module, each era will increase the total_issuance through the issue,&#xD;&#xA;In the issue function, Self::Balance::max_value() is not configurable, and the binding is the max_value of u128&#xD;&#xA;&#xD;&#xA;For example, the Bitcoin max total supply is 24 million" ContentLicense="CC BY-SA 4.0" />
  <row Id="13940" PostHistoryTypeId="1" PostId="3717" RevisionGUID="d9a6870a-bb8e-4f84-bb06-4126a8cf3865" CreationDate="2022-07-12T03:43:39.147" UserId="1942" Text="how does the substrate chain set the max total supply?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13941" PostHistoryTypeId="3" PostId="3717" RevisionGUID="d9a6870a-bb8e-4f84-bb06-4126a8cf3865" CreationDate="2022-07-12T03:43:39.147" UserId="1942" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13942" PostHistoryTypeId="5" PostId="3631" RevisionGUID="b2001dca-7e43-45d5-80d5-e32c0da7f470" CreationDate="2022-07-12T05:17:27.750" UserId="393" Comment="Correction: ocw logic will executed by every node which enable offchain-worker." Text="1. &quot;And have a question is it possible to configure OCW so that if one node starts an HTTP call in OCW other nodes will skip it&quot;, you can add a judgement to make sure only the author of the block will execute the ocw logic, such as block.header.author == current_account.&#xD;&#xA;&#xD;&#xA;2. What you should pay attention to is: maintain the job with block number, and make sure one job will be processed only once." ContentLicense="CC BY-SA 4.0" />
  <row Id="13943" PostHistoryTypeId="5" PostId="3631" RevisionGUID="35b152c7-6fb2-4ccb-9043-d9c0ffdd3644" CreationDate="2022-07-12T05:23:03.703" UserId="393" Comment="Correction: ocw logic will executed by every node which enable offchain-worker." Text="1. &quot;And have a question is it possible to configure OCW so that if one node starts an HTTP call in OCW other nodes will skip it&quot;, you can add a judgement to make sure only the author of the block will execute the ocw logic, such as block.header.author == current_account. Or you can add judgement in the extrinsic's handler method, if the answer has been submitted then ignore following answers which are submitted by other nodes.&#xD;&#xA;&#xD;&#xA;2. What you should pay attention to is: maintain the job with block number, and make sure one job will be processed only once." ContentLicense="CC BY-SA 4.0" />
  <row Id="13944" PostHistoryTypeId="2" PostId="3718" RevisionGUID="7af8c48c-3244-4eb9-b180-9b0a98b171a7" CreationDate="2022-07-12T06:00:37.090" UserId="2102" Text="Reading the Polkadot docs, I've run into the following statement:&#xD;&#xA;&#xD;&#xA;*Validators should only run the Polkadot binary, and they should not listen on any port other than the configured p2p port.*&#xD;&#xA;&#xD;&#xA;So far, what I understand is that when someone submits a transaction, every network participant will have to validate the transaction, so It will eventually reach a validator node. So I was wondering, where does the Polkadot Chrome extension connect to if only the libp2p port is available? Are there sync nodes that only gossip transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13946" PostHistoryTypeId="1" PostId="3718" RevisionGUID="7af8c48c-3244-4eb9-b180-9b0a98b171a7" CreationDate="2022-07-12T06:00:37.090" UserId="2102" Text="Are transaction always submitted to non-validator nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13947" PostHistoryTypeId="3" PostId="3718" RevisionGUID="7af8c48c-3244-4eb9-b180-9b0a98b171a7" CreationDate="2022-07-12T06:00:37.090" UserId="2102" Text="|polkadot|transactions|sync|gossip|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13948" PostHistoryTypeId="2" PostId="3719" RevisionGUID="62d84510-7e6b-48f5-9362-8eab022c7adb" CreationDate="2022-07-12T06:07:32.883" UserId="2102" Text="I think you should run your sync node without the `--validator` flag, and if you have some sort of access control (like the `nodeAuthorization` pallet) you should allow the new node in the network. &#xD;&#xA;&#xD;&#xA;Just run the new node the same way you are running nodes 2, 3, 4 or 5, but avoid enabling the `--validator` flag. Once the node starts, you should see it peers with other nodes and starts to import blocks, but you won't see it authoring blocks or starting consensus over any block.&#xD;&#xA;&#xD;&#xA;This new node, although it won't author blocks, it can receive transactions and gossip them (I think), so you can connect your DApp to this node, and any transaction submitted to this node will eventually reach the other nodes.&#xD;&#xA;&#xD;&#xA;I'm not 100% sure, but maybe someone can provide a more detailed answer." ContentLicense="CC BY-SA 4.0" />
  <row Id="13950" PostHistoryTypeId="2" PostId="3720" RevisionGUID="f9a73e89-c4ae-40d3-8b8e-4aa265c7f7f9" CreationDate="2022-07-12T07:31:31.923" UserId="354" Text="I want to make a stable coin on substrate based chain, what I want to know is that can I do it with `assests pallet`, as I can't find any function that peg it with any other collateral, if it is possible can someone point me towards the right documentation. Or is it only possible through `ink smart contract`, it would be really helpful, if someone has already done this and can share their contract with me." ContentLicense="CC BY-SA 4.0" />
  <row Id="13952" PostHistoryTypeId="1" PostId="3720" RevisionGUID="f9a73e89-c4ae-40d3-8b8e-4aa265c7f7f9" CreationDate="2022-07-12T07:31:31.923" UserId="354" Text="How to make a stable coin on substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13953" PostHistoryTypeId="3" PostId="3720" RevisionGUID="f9a73e89-c4ae-40d3-8b8e-4aa265c7f7f9" CreationDate="2022-07-12T07:31:31.923" UserId="354" Text="|substrate-node|ink|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13954" PostHistoryTypeId="5" PostId="3720" RevisionGUID="040d806e-3d10-4c2b-96c6-bd5d0e03c2cf" CreationDate="2022-07-12T08:20:32.910" UserId="83" Comment="Typo" Text="I want to make a stable coin on substrate based chain, what I want to know is that can I do it with the `assets pallet`, as I can't find any function that peg it with any other collateral, if it is possible can someone point me towards the right documentation. Or is it only possible through `ink smart contract`, it would be really helpful, if someone has already done this and can share their contract with me." ContentLicense="CC BY-SA 4.0" />
  <row Id="13955" PostHistoryTypeId="5" PostId="3717" RevisionGUID="914dc2ba-5332-4e17-b44a-2fbb2d9571b0" CreationDate="2022-07-12T10:14:38.980" UserId="2025" Comment="typo and readability" Text="how does the substrate chain set the max total supply? Looking at the staking module, each era will increase the total_issuance through the issue,&#xD;&#xA;In the issue function, Self::Balance::max_value() is not configurable, and the binding is the max_value of u128&#xD;&#xA;&#xD;&#xA;For example, the Bitcoin max total supply is 21 million" ContentLicense="CC BY-SA 4.0" />
  <row Id="13956" PostHistoryTypeId="4" PostId="3717" RevisionGUID="914dc2ba-5332-4e17-b44a-2fbb2d9571b0" CreationDate="2022-07-12T10:14:38.980" UserId="2025" Comment="typo and readability" Text="how does a substrate chain set the max total supply?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13957" PostHistoryTypeId="24" PostId="3717" RevisionGUID="914dc2ba-5332-4e17-b44a-2fbb2d9571b0" CreationDate="2022-07-12T10:14:38.980" Comment="Proposed by 2025 approved by -1 edit id of 237" ContentLicense="CC BY-SA 4.0" />
  <row Id="13958" PostHistoryTypeId="5" PostId="3717" RevisionGUID="81754558-0a5a-40f4-bf94-dba3bedecf7a" CreationDate="2022-07-12T10:14:38.980" UserId="83" Comment="typo and readability" Text="How does a Substrate chain set the max total supply? Looking at the staking module, each era will increase the total_issuance through the issue. In the issue function, Self::Balance::max_value() is not configurable, and the binding is the max_value of u128.&#xD;&#xA;&#xD;&#xA;For example, the Bitcoin max total supply is 21 million." ContentLicense="CC BY-SA 4.0" />
  <row Id="13959" PostHistoryTypeId="4" PostId="3717" RevisionGUID="81754558-0a5a-40f4-bf94-dba3bedecf7a" CreationDate="2022-07-12T10:14:38.980" UserId="83" Comment="typo and readability" Text="How does a Substrate chain set the max total supply?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13960" PostHistoryTypeId="5" PostId="600" RevisionGUID="8d16ae5a-1ade-4972-aca7-ae846c14b299" CreationDate="2022-07-12T10:19:47.527" UserId="100" Comment="app changed url" Text="Typically all data is [SCALE encoded](https://github.com/paritytech/parity-scale-codec) for Substrate. You need to decode and parse the result into something human readable, like is done on the [contracts-ui](https://contracts-ui.substrate.io/) and documented in the [polkadot-js contracts docs](https://polkadot.js.org/docs/api-contract/start/contract.read#reading-contract-values)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13961" PostHistoryTypeId="24" PostId="600" RevisionGUID="8d16ae5a-1ade-4972-aca7-ae846c14b299" CreationDate="2022-07-12T10:19:47.527" Comment="Proposed by 100 approved by -1 edit id of 236" ContentLicense="CC BY-SA 4.0" />
  <row Id="13962" PostHistoryTypeId="5" PostId="600" RevisionGUID="047c0585-eac2-4820-abad-249d90616e05" CreationDate="2022-07-12T10:19:47.527" UserId="83" Comment="app changed url and retain github link" Text="Typically all data is [SCALE encoded](https://github.com/paritytech/parity-scale-codec) for Substrate. You need to decode and parse the result into something human readable, like is done on the [contracts-ui](https://contracts-ui.substrate.io/) from the [contracts-ui github](https://github.com/paritytech/contracts-ui) and documented in the [polkadot-js contracts docs](https://polkadot.js.org/docs/api-contract/start/contract.read#reading-contract-values)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13963" PostHistoryTypeId="5" PostId="2110" RevisionGUID="3b1f3dbb-55fb-4716-b69f-46e8f4179c5e" CreationDate="2022-07-12T10:21:22.837" UserId="100" Comment="app url changed" Text="Currently, I only found a way to interact with smart contracts by [contracts UI](https://contracts-ui.substrate.io/).&#xD;&#xA;&#xD;&#xA;Are there any detailed docs on how to interact with smart contracts of `ink!` with polkadot.js or something else?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13964" PostHistoryTypeId="24" PostId="2110" RevisionGUID="3b1f3dbb-55fb-4716-b69f-46e8f4179c5e" CreationDate="2022-07-12T10:21:22.837" Comment="Proposed by 100 approved by -1 edit id of 233" ContentLicense="CC BY-SA 4.0" />
  <row Id="13965" PostHistoryTypeId="5" PostId="2110" RevisionGUID="707477cc-060a-45e0-bdf2-c1cec8df4ec8" CreationDate="2022-07-12T10:21:22.837" UserId="83" Comment="app url changed and grammar" Text="Currently, I only found a way to interact with smart contracts using the [contracts UI](https://contracts-ui.substrate.io/).&#xD;&#xA;&#xD;&#xA;Are there any detailed docs on how to interact with `ink!` smart contracts with polkadot.js or something else?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13966" PostHistoryTypeId="5" PostId="1534" RevisionGUID="9353a327-0b14-47a6-b623-727179dcf048" CreationDate="2022-07-12T10:23:12.243" UserId="100" Comment="app url changed" Text="The testing Engine is still limited in some capabilities: It is correct that a Smart Contract obtains its own `AccountId`, but I doubt that this is currently reflected by the testing Engine, since it currently doesn't simulate the instantiation of a Smart Contract, which would assign a `AccountId` to the contract. &#xD;&#xA;&#xD;&#xA;Therefore `self.env().account_id()` currently returns the callee's AccountId, which is manually set by calling `ink_env::test::set_callee::&lt;ink_env::DefaultEnvironment&gt;(account_id)`. If you want to test it, you need to configure an `AccountId` for your Smart Contract first. I added a test in my example [here](https://github.com/achimcc/contract_get_account_id/blob/main/lib.rs#L125-L137). &#xD;&#xA;&#xD;&#xA;I added a function `getId()` to the `contract-transfer` example [here](https://github.com/achimcc/contract_get_account_id/blob/main/lib.rs).&#xD;&#xA;&#xD;&#xA;After starting substrate contracts node locally(version substrate-contracts-node 0.11.0-bb0cd97-x86_64-linux-gnu) with `substrate-contracts-node --dev --tmp`, and connecting it with [contracts ui](https://contracts-ui.substrate.io/), I can call the function to obtain the contracts `AccountId`, which is different from Alice's `AccountId`:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;So it indeed returns the Smart Contracts `AccountId` when deplyed on the Substrate Node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dyibr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13967" PostHistoryTypeId="24" PostId="1534" RevisionGUID="9353a327-0b14-47a6-b623-727179dcf048" CreationDate="2022-07-12T10:23:12.243" Comment="Proposed by 100 approved by -1 edit id of 232" ContentLicense="CC BY-SA 4.0" />
  <row Id="13968" PostHistoryTypeId="5" PostId="1534" RevisionGUID="dc2cd5d1-767c-4bbd-9831-e1569139c1c7" CreationDate="2022-07-12T10:23:12.243" UserId="83" Comment="app url changed" Text="The testing Engine is still limited in some capabilities: It is correct that a Smart Contract obtains its own `AccountId`, but I doubt that this is currently reflected by the testing Engine, since it currently doesn't simulate the instantiation of a Smart Contract, which would assign an `AccountId` to the contract. &#xD;&#xA;&#xD;&#xA;Therefore `self.env().account_id()` currently returns the callee's AccountId, which is manually set by calling `ink_env::test::set_callee::&lt;ink_env::DefaultEnvironment&gt;(account_id)`. If you want to test it, you need to configure an `AccountId` for your Smart Contract first. I added a test in my example [here](https://github.com/achimcc/contract_get_account_id/blob/main/lib.rs#L125-L137). &#xD;&#xA;&#xD;&#xA;I added a function `getId()` to the `contract-transfer` example [here](https://github.com/achimcc/contract_get_account_id/blob/main/lib.rs).&#xD;&#xA;&#xD;&#xA;After starting Substrate contracts node locally (version substrate-contracts-node 0.11.0-bb0cd97-x86_64-linux-gnu) with `substrate-contracts-node --dev --tmp`, and connecting it with the [contracts UI](https://contracts-ui.substrate.io/), I can call the function to obtain the contracts `AccountId`, which is different from Alice's `AccountId`:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;So it indeed returns the Smart Contracts `AccountId` when deplyed on the Substrate Node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dyibr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="13969" PostHistoryTypeId="5" PostId="3417" RevisionGUID="49915928-1959-48bd-801a-b38b9fc20b51" CreationDate="2022-07-12T10:24:41.540" UserId="83" Comment="add backticks" Text="Try to use command:&#xD;&#xA;`sudo make install`" ContentLicense="CC BY-SA 4.0" />
  <row Id="13970" PostHistoryTypeId="2" PostId="3721" RevisionGUID="2a4dfcff-7543-4f17-87dc-99fcb3f2e4e9" CreationDate="2022-07-12T10:27:35.377" UserId="2565" Text="How can you transfer balances from one accountId to another in substrate runtime?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;pub fn my_transfer(origin: OriginFor&lt;T&gt;,  account: T::AccountId, amount: u64) -&gt; DispatchResult {&#xD;&#xA;            let owner = ensure_signed(origin)?;&#xD;&#xA;			match PalletDataStore::&lt;T&gt;::get() {&#xD;&#xA;				Some(destination) =&gt; {&#xD;&#xA;					let _ = Currency::transfer(&amp;owner, &amp;destination, amount, ExistenceRequirement::KeepAlive);&#xD;&#xA;				},&#xD;&#xA;				None =&gt; return Err(Error::&lt;T&gt;::NoneValue.into()),&#xD;&#xA;			};&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;1. Based on the code above, I need to transfer some amount of origin's balances to some destination account&#xD;&#xA;2. I got an error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0283]: type annotations needed&#xD;&#xA;cannot satisfy `_: Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please help." ContentLicense="CC BY-SA 4.0" />
  <row Id="13972" PostHistoryTypeId="1" PostId="3721" RevisionGUID="2a4dfcff-7543-4f17-87dc-99fcb3f2e4e9" CreationDate="2022-07-12T10:27:35.377" UserId="2565" Text="How can you transfer balances from one accountId to another in substrate runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13973" PostHistoryTypeId="3" PostId="3721" RevisionGUID="2a4dfcff-7543-4f17-87dc-99fcb3f2e4e9" CreationDate="2022-07-12T10:27:35.377" UserId="2565" Text="|substrate-node|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13975" PostHistoryTypeId="2" PostId="3722" RevisionGUID="f5d01c3f-1cc0-406e-9980-c961311ad77e" CreationDate="2022-07-12T13:00:44.200" UserId="2872" Text="If I understand correctly, all cross-chain transfers in the destination network are fixed every block in the `parachainsystems.set_validation_date` extrinsic in `horizontal_messages` property. &#xD;&#xA;&#xD;&#xA;Is there any way to parse this data into human form? Is there a description of the data structure?&#xD;&#xA;&#xD;&#xA;For example, [here][1] is **Karura** set_validation_date with not empty horizontal_messages from **Kintsugi** (paraId 2092):&#xD;&#xA;&#xD;&#xA;    &quot;data&quot;:&quot;000210010400010200b1200608000c00070010a5d4e80a1300010200b1200608000c00070010a5d4e8010700f2052a010d0100040001010042c37a8f52d17c05bd1f5f4d7b751daae60841b6554bdbc043dd5319fbc5c21b&quot;&#xD;&#xA;    &quot;sent_at&quot;:13514596&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://karura.subscan.io/extrinsic/2253071-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="13977" PostHistoryTypeId="1" PostId="3722" RevisionGUID="f5d01c3f-1cc0-406e-9980-c961311ad77e" CreationDate="2022-07-12T13:00:44.200" UserId="2872" Text="Parsing Data in horizontal_messages of set_validation_data" ContentLicense="CC BY-SA 4.0" />
  <row Id="13978" PostHistoryTypeId="3" PostId="3722" RevisionGUID="f5d01c3f-1cc0-406e-9980-c961311ad77e" CreationDate="2022-07-12T13:00:44.200" UserId="2872" Text="|xcm|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13979" PostHistoryTypeId="2" PostId="3723" RevisionGUID="d8ce7044-1a5f-450b-a1f8-ac54ae073173" CreationDate="2022-07-12T14:25:25.090" UserId="16" Text="#### Question 1&#xD;&#xA;Yes. The `code` is just the contents of the wasm file as emitted by the compiler.&#xD;&#xA;&#xD;&#xA;#### Question 4&#xD;&#xA;&#xD;&#xA;`pallet-contracts` doesn't concern itself with the `data`. It just passes it down to the contract as-is. From the point of view of `paller-contracts` there is just a `call` function that takes some input. That means it is up to the contract how to interpret that data. For contracts written in ink! you can look at the metadata on how to craft this input (as you already suggested). It would look like this in Rust:&#xD;&#xA;```rust&#xD;&#xA;(&quot;functionA&quot;.hash()[..4], paramA, paramB, paramC).encode()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`encode()` is the `SCALE` encoding.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="13981" PostHistoryTypeId="2" PostId="3724" RevisionGUID="a2e82365-76fc-4b48-b2fa-62c9b7060abc" CreationDate="2022-07-12T17:04:51.833" UserId="501" Text="I'm trying to create the encoded element for an XCM V0 transact call such as:&#xD;&#xA;```&#xD;&#xA;const message = {&#xD;&#xA;    V0: {&#xD;&#xA;        Transact: {&#xD;&#xA;            originType: &quot;Native&quot;,&#xD;&#xA;            requireWeightAtMost: 100000,&#xD;&#xA;            call: {&#xD;&#xA;                encoded: &quot;0x280016000000&quot; //ex: templatePallet.doSomething(22)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**But how to create the encoded call ?**&#xD;&#xA;&#xD;&#xA;I've tried this without success:&#xD;&#xA;```&#xD;&#xA;let templatePallet_hex_call = await parachainApiInstInsurance.tx.templatePallet.doSomething(22).signAsync(account);&#xD;&#xA;...&#xD;&#xA;const message = {&#xD;&#xA;    V0: {&#xD;&#xA;        Transact: {&#xD;&#xA;            originType: &quot;Native&quot;,&#xD;&#xA;            requireWeightAtMost: 100000,&#xD;&#xA;            call: {&#xD;&#xA;                encoded: compactAddLength(hexToU8a(templatePallet_hex_call.toHex()))&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any clue or documentation for this ? Thanks in advance.&#xD;&#xA;&#xD;&#xA;PS: I've seen [this thread][1] but it's not using javascript.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1303/parachain-xcm-customize-call" ContentLicense="CC BY-SA 4.0" />
  <row Id="13983" PostHistoryTypeId="1" PostId="3724" RevisionGUID="a2e82365-76fc-4b48-b2fa-62c9b7060abc" CreationDate="2022-07-12T17:04:51.833" UserId="501" Text="Create hex encoded call (for XCM transact call) in javascript?" ContentLicense="CC BY-SA 4.0" />
  <row Id="13984" PostHistoryTypeId="3" PostId="3724" RevisionGUID="a2e82365-76fc-4b48-b2fa-62c9b7060abc" CreationDate="2022-07-12T17:04:51.833" UserId="501" Text="|xcm|scale-codec|javascript|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13985" PostHistoryTypeId="2" PostId="3725" RevisionGUID="4d59efb8-0af1-4e42-aba2-bbc3e36f3fb3" CreationDate="2022-07-12T18:10:36.000" UserId="627" Text="When you construct via `api.tx.*` is creates an unsigned extrinsic. So basically you want the call-only part of that.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// output as hex&#xD;&#xA;const encoded = u8aToHex(&#xD;&#xA;  // add length to the U8a (double-encoding)&#xD;&#xA;  compactAddLength(&#xD;&#xA;    // convert the method-only part to Uint8Array&#xD;&#xA;    templatePallet_hex_call&#xD;&#xA;      .method&#xD;&#xA;      .toU8a()&#xD;&#xA;  )&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This part is not signed, so you can forgo the `signAsync` in your code. The requirement here is for the length + call indexes + call data. The signing is only for extrinsics, not call data." ContentLicense="CC BY-SA 4.0" />
  <row Id="13987" PostHistoryTypeId="2" PostId="3726" RevisionGUID="61b23df0-a6f4-4d19-9fef-7361f0f615ae" CreationDate="2022-07-12T19:06:00.920" UserId="1824" Text="Typically derive macros can only generate an implementation for a given trait on a struct&#xD;&#xA;if **all** the fields of that struct already implement that trait.&#xD;&#xA;&#xD;&#xA;If we take a look at your first struct we can see that the [`scale_info::TypeInfo` trait](https://docs.rs/scale-info/2.1.2/scale_info/trait.TypeInfo.html) is implemented for&#xD;&#xA;[`u128`](https://docs.rs/scale-info/2.1.2/scale_info/trait.TypeInfo.html#impl-TypeInfo-for-u128)&#xD;&#xA;and&#xD;&#xA;[`String`](https://docs.rs/scale-info/2.1.2/scale_info/trait.TypeInfo.html#impl-TypeInfo-10),&#xD;&#xA;so `TypeInfo` can be derived for your struct.&#xD;&#xA;&#xD;&#xA;However, for your second struct the macro requires that `TestData` implements&#xD;&#xA;`TypeInfo` - which it does not.&#xD;&#xA;&#xD;&#xA;You have two options here. If all the fields of `TestData` implement `TypeInfo`&#xD;&#xA;you can use the derive macro to implement `TypeInfo` for it. Otherwise&#xD;&#xA;you'll have to manually provide an implementation.&#xD;&#xA;&#xD;&#xA;That is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl TypeInfo for TestData {&#xD;&#xA;    type Identity = ...;&#xD;&#xA;&#xD;&#xA;    fn type_info() -&gt; Type {&#xD;&#xA;        todo!()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="13993" PostHistoryTypeId="2" PostId="3728" RevisionGUID="b6e5a306-e8f5-4679-8a5b-8d57673358cb" CreationDate="2022-07-12T20:02:29.973" UserId="12" Text="I recently [upgraded a fork of the Node Template to v0.9.25][1] and now I am getting an [error about the Wasm toolchain not being installed][2]. Per the official Substrate documentation, the failing build is [adding the Wasm target to the nightly toolchain][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ChainSafe/substrate-node-template/commit/d2e6ccc8e60dd0e259c33694e7eac9cc72e3331a&#xD;&#xA;  [2]: https://github.com/ChainSafe/substrate-node-template/runs/7308258170?check_suite_focus=true#step:5:1182&#xD;&#xA;  [3]: https://github.com/ChainSafe/substrate-node-template/blob/main/.github/workflows/check.yml#L35" ContentLicense="CC BY-SA 4.0" />
  <row Id="13995" PostHistoryTypeId="1" PostId="3728" RevisionGUID="b6e5a306-e8f5-4679-8a5b-8d57673358cb" CreationDate="2022-07-12T20:02:29.973" UserId="12" Text="&quot;Rust WASM toolchain not installed&quot; with v0.9.25" ContentLicense="CC BY-SA 4.0" />
  <row Id="13996" PostHistoryTypeId="3" PostId="3728" RevisionGUID="b6e5a306-e8f5-4679-8a5b-8d57673358cb" CreationDate="2022-07-12T20:02:29.973" UserId="12" Text="|rust|wasm|build|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="13997" PostHistoryTypeId="5" PostId="3728" RevisionGUID="cd20db7c-16a6-4d1c-a335-025b8cae9ac5" CreationDate="2022-07-12T20:11:54.023" UserId="12" Comment="added 16 characters in body" Text="I recently [upgraded a fork of the Node Template to v0.9.25][1] and now I am getting an [error about the Wasm toolchain not being installed][2]. Per the official Substrate documentation, the failing build is [adding the Wasm target to the nightly toolchain][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ChainSafe/substrate-node-template/commit/d2e6ccc8e60dd0e259c33694e7eac9cc72e3331a&#xD;&#xA;  [2]: https://github.com/ChainSafe/substrate-node-template/runs/7308258170?check_suite_focus=true#step:5:1182&#xD;&#xA;  [3]: https://github.com/ChainSafe/substrate-node-template/blob/dfo/gssmr-test/.github/workflows/build-specs.yml#L35" ContentLicense="CC BY-SA 4.0" />
  <row Id="13998" PostHistoryTypeId="2" PostId="3729" RevisionGUID="47b4e2f7-9008-43a2-980e-bcb41c229c1a" CreationDate="2022-07-12T21:37:46.073" UserId="2731" Text="I am currently trying to use the polkadot-js sdk in order to transfer money between DOT wallets. I can successfully transfer money between two wallets using the api.tx.balances.transfer(destination, amount) transaction and then using the signAndSend() function, however I would like to have a third party wallet different from the transaction signer pay the ~0.015 DOT transfer fee, is this possible? I attempted to use the sign() method chained with send() and even if I call those two functions with the same wallet signing and sending I get an error &quot;1010: Invalid Transaction: Transaction is outdated&quot;. I read online that this is most likely to do with the nonce of the transaction but I am not entirely sure how to get the correct nonce" ContentLicense="CC BY-SA 4.0" />
  <row Id="14000" PostHistoryTypeId="1" PostId="3729" RevisionGUID="47b4e2f7-9008-43a2-980e-bcb41c229c1a" CreationDate="2022-07-12T21:37:46.073" UserId="2731" Text="Using Polkadot-JS to have third party wallet pay for dot transaction fee" ContentLicense="CC BY-SA 4.0" />
  <row Id="14001" PostHistoryTypeId="3" PostId="3729" RevisionGUID="47b4e2f7-9008-43a2-980e-bcb41c229c1a" CreationDate="2022-07-12T21:37:46.073" UserId="2731" Text="|polkadot-js|polkadot|extrinsic|balances|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14002" PostHistoryTypeId="5" PostId="2786" RevisionGUID="f8e04365-420b-4b4c-ba87-2ea274f2f486" CreationDate="2022-07-12T23:07:26.557" UserId="1824" Comment="Improve formatting" Text="I find myself needing to do two things with the Contracts pallet, which each raise a question:&#xD;&#xA;&#xD;&#xA;1) I want to call the [`instantiate_with_code`](https://github.com/paritytech/substrate/blob/3c48c61ac6a088901668820a825e2d5823bdea82/frame/contracts/src/lib.rs#L493) extrinsic from another Rust function.&#xD;&#xA;&#xD;&#xA;What is the correct way to build the `code: Vec&lt;u8&gt;` input? Is it as simple as passing my Wasm (compiled ink! contract), as a byte array?&#xD;&#xA;&#xD;&#xA;2) I want to call the [call](https://github.com/paritytech/substrate/blob/3c48c61ac6a088901668820a825e2d5823bdea82/frame/contracts/src/lib.rs#L436) extrinsic from another Rust function. &#xD;&#xA;&#xD;&#xA;How do I properly build the `data: Vec&lt;u8&gt;` input? The function in the smart contract is defined as: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn set_admin(&amp;mut self, account: AccountId)&#xD;&#xA;```` &#xD;&#xA;&#xD;&#xA;I suspect I need to do something like: convert the selector value for `set_admin` from my `metadata.json` to a `Vec&lt;u8&gt;`, then convert the relevant `AccountId` to a `Vec&lt;u8&gt;` and append it. Is this the correct way to build data inputs for the Contracts pallet?&#xD;&#xA;&#xD;&#xA;Are there any resources that define the correct format of the inputs for the Contracts pallet? I've searched but not been successful. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14003" PostHistoryTypeId="4" PostId="2786" RevisionGUID="f8e04365-420b-4b4c-ba87-2ea274f2f486" CreationDate="2022-07-12T23:07:26.557" UserId="1824" Comment="Improve formatting" Text="Instantiating and Calling a contract using the Contracts Pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="14004" PostHistoryTypeId="6" PostId="2786" RevisionGUID="f8e04365-420b-4b4c-ba87-2ea274f2f486" CreationDate="2022-07-12T23:07:26.557" UserId="1824" Comment="Improve formatting" Text="|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14005" PostHistoryTypeId="24" PostId="2786" RevisionGUID="f8e04365-420b-4b4c-ba87-2ea274f2f486" CreationDate="2022-07-12T23:07:26.557" Comment="Proposed by 1824 approved by 2136 edit id of 240" ContentLicense="CC BY-SA 4.0" />
  <row Id="14006" PostHistoryTypeId="2" PostId="3730" RevisionGUID="0696b029-83a0-444d-a189-cc8c9a39a0f7" CreationDate="2022-07-12T23:39:22.600" UserId="177" Text="I'm currently using substrate (version 4) with the contrat-pallet. I deploy contract in wasm, compiled from solidity (thanks to solang compiler) and sometimes, when executing a method of the smart contract, I encounter an error. When I take a look on the polkadotjs apps I have the following message : &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can have a look here : [PolkadotJs App link][2]&#xD;&#xA;&#xD;&#xA;But this message is not so explicit and doesn't help to figure out how to solve the problem. &#xD;&#xA;&#xD;&#xA;Furthermore, the output of the polkadotjs api when I run this code :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;contract.tx.method({ storageDepositLimit, gasLimit })&#xD;&#xA;.signAndSend(pair, result =&gt; {&#xD;&#xA;	if (result.status.isFinalized) {&#xD;&#xA;		return result.toHuman()&#xD;&#xA;	}&#xD;&#xA;})&#xD;&#xA;``` &#xD;&#xA;is not really more explicit :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  dispatchError: { Module: { index: '9', error: '0x0b000000' } },&#xD;&#xA;  dispatchInfo: { weight: '80,051,097,517', class: 'Normal', paysFee: 'Yes' },&#xD;&#xA;  events: [&#xD;&#xA;    { phase: [Object], event: [Object], topics: [] },&#xD;&#xA;    { phase: [Object], event: [Object], topics: [] }&#xD;&#xA;  ],&#xD;&#xA;  internalError: undefined,&#xD;&#xA;  status: {&#xD;&#xA;    Finalized: '0x2e6cfa203369435efd17144525e265508e801865baf7d8f8989883a553ddf4b8'&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;By experience, this kind of errors can occurs when a &quot;require&quot; from the solidity smart contract doesn't pass. But I don't have any details and I don't find how to get the require output message from the smart contract.&#xD;&#xA;&#xD;&#xA;Is there any way to get more detail on error to know what is going on ? To get the message from the &quot;require&quot; in the solidity smart contract ? To know from what part it came from ?&#xD;&#xA;&#xD;&#xA;Thanks !&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/QYaWQ.jpg&#xD;&#xA;  [2]: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer/query/0xfc3a6cb62b96686c786a9396c50f63ea34e656d1c1d6255596c51296d95134f0" ContentLicense="CC BY-SA 4.0" />
  <row Id="14008" PostHistoryTypeId="1" PostId="3730" RevisionGUID="0696b029-83a0-444d-a189-cc8c9a39a0f7" CreationDate="2022-07-12T23:39:22.600" UserId="177" Text="How to get smart contract detailed error with polkadot-js api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14009" PostHistoryTypeId="3" PostId="3730" RevisionGUID="0696b029-83a0-444d-a189-cc8c9a39a0f7" CreationDate="2022-07-12T23:39:22.600" UserId="177" Text="|polkadot-js|polkadot|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14010" PostHistoryTypeId="5" PostId="119" RevisionGUID="48e87be6-9df9-4e4e-925a-61f232a06ba7" CreationDate="2022-07-13T05:09:23.087" UserId="100" Comment="app changed url" Text="There was an update to the metadata format of a contract (part of the `.contract` file). The Canvas UI referenced in the tutorial wasn't updated to handle this. Reason for that is that it is soon to be replaced by [Contracts UI](https://contracts-ui.substrate.io/).&#xD;&#xA;&#xD;&#xA;In the meantime you should use the `Developer -&gt; Contracts` tab of [Polkadot.js Apps](https://polkadot.js.org/apps) to interact with your contracts. You can use the sidebar on the top left to connect to a local node [1].&#xD;&#xA;&#xD;&#xA;[![Screenshot of Polkadot.js Apps][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/PIxAz.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="14011" PostHistoryTypeId="24" PostId="119" RevisionGUID="48e87be6-9df9-4e4e-925a-61f232a06ba7" CreationDate="2022-07-13T05:09:23.087" Comment="Proposed by 100 approved by 34 edit id of 239" ContentLicense="CC BY-SA 4.0" />
  <row Id="14012" PostHistoryTypeId="5" PostId="2036" RevisionGUID="1c40fe8f-4f86-4c82-98ed-25d3e218549c" CreationDate="2022-07-13T05:09:31.240" UserId="100" Comment="app changed url" Text="Following https://docs.substrate.io/tutorials/v3/ink-workshop/pt1/ , &#xD;&#xA;I run `substrate-contracts-node --dev` to start the node, but the Contract UI at https://contracts-ui.substrate.io/ shows `Connection Error` and cannot connect to Local Node, preventing contract deployment. &#xD;&#xA;&#xD;&#xA;Any configuration to be changed ?&#xD;&#xA;&#xD;&#xA;Running on Chrome, Apple M1 chip.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**EDIT**: it looks like a websocket connection error:&#xD;&#xA;```&#xD;&#xA;2022-04-22 14:50:15 Blocked connection to WebSockets server from untrusted origin: Some(&quot;https://paritytech.github.io&quot;)    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;how can we allow the connection?&#xD;&#xA;&#xD;&#xA;**EDIT2**: I've added `--unsafe-ws-external` to ` substrate-contracts-node` command and Contract UI connects to LocalNode, but not sure this is the correct solution.&#xD;&#xA;(https://github.com/openethereum/parity-ethereum/issues/9678)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CzfLe.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14013" PostHistoryTypeId="24" PostId="2036" RevisionGUID="1c40fe8f-4f86-4c82-98ed-25d3e218549c" CreationDate="2022-07-13T05:09:31.240" Comment="Proposed by 100 approved by 83, 34 edit id of 234" ContentLicense="CC BY-SA 4.0" />
  <row Id="14014" PostHistoryTypeId="5" PostId="1975" RevisionGUID="97d07224-a9d7-4629-9682-de38d532e8da" CreationDate="2022-07-13T05:09:36.773" UserId="100" Comment="app changed url" Text="I have a chain extension implemented on [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node) and in my [ink!](https://paritytech.github.io/ink-docs/) smart contract according to [this](https://github.com/paritytech/ink/tree/v3.0.0-rc8/examples/rand-extension) tutorial. When I try to instantiate my contract on a local [contracts-ui](https://contracts-ui.substrate.io/) I get the following message:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;module uses chain extensions but chain extensions are disabled&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What do I need to do to enable chain extensions?**&#xD;&#xA;&#xD;&#xA;&gt;[Here](https://github.com/brunopgalvao/chain-extension-example-001/commit/18f217af5813844b1f56b175d33eb9a6ebe7afa8) is my code for sanity check." ContentLicense="CC BY-SA 4.0" />
  <row Id="14015" PostHistoryTypeId="24" PostId="1975" RevisionGUID="97d07224-a9d7-4629-9682-de38d532e8da" CreationDate="2022-07-13T05:09:36.773" Comment="Proposed by 100 approved by 34 edit id of 238" ContentLicense="CC BY-SA 4.0" />
  <row Id="14016" PostHistoryTypeId="5" PostId="2721" RevisionGUID="222bf3b0-006e-4b8a-af2a-8070ce9ae347" CreationDate="2022-07-13T05:09:41.020" UserId="100" Comment="app changed url" Text="Ink! 3.1.0 has been released today, and it seems that it has been automatically embed/used in the cargo-contract command.&#xD;&#xA;The result is that newly compiled contract are no more compatible with node that run 3.0 contracts pallet.&#xD;&#xA;&#xD;&#xA;Is there a way to keep version 3.0.1 when compiling ink! contracts ?&#xD;&#xA;&#xD;&#xA;Thanks for your help !&#xD;&#xA;&#xD;&#xA;Edit : found the `-Z original-manifest` cargo-contract option that preserves `cargo.toml` versions values :)  &#xD;&#xA;But the build failed at the metadata generation...&#xD;&#xA;&#xD;&#xA;**Steps to reproduce:**&#xD;&#xA; - Download and uncompress precompile contract node [v0.13](https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.13.0)&#xD;&#xA; - Launch dev node :&#xD;&#xA;```&#xD;&#xA;./substrate-contracts-node-v0.13 --dev&#xD;&#xA;```&#xD;&#xA; - Build flipper contract sample :&#xD;&#xA;```&#xD;&#xA;cargo contract new flipper&#xD;&#xA;cd flipper&#xD;&#xA;cargo +nightly contract build&#xD;&#xA;```&#xD;&#xA; - Use [Contracts UI](https://contracts-ui.substrate.io/) to instantiate the flipper contract&#xD;&#xA; - Instantiation failed with 'ExtrinsicFailed'&#xD;&#xA; - Debug log shows : &#xD;&#xA; ```&#xD;&#xA;DEBUG ThreadId(46) runtime::contracts: CodeRejected: module imports a&#xD;&#xA;   non-existent function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Same contract is instantiated correctly on recent contracts node v0.14 and v0.15.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Same flipper contract built a few days before (using ink! 3.0.1), instantiation is correct on v0.13.&#xD;&#xA;&#xD;&#xA;I saw that upgrading my [node version to polkadot v0.9.22](https://github.com/paritytech/ink/releases/tag/v3.1.0) should resolve this issue. But the cumulus pallet is still on polkadot v0.9.20.&#xD;&#xA;&#xD;&#xA;That's why I asked initially how to stick to ink! 3.0.1 when compiling contract.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14017" PostHistoryTypeId="24" PostId="2721" RevisionGUID="222bf3b0-006e-4b8a-af2a-8070ce9ae347" CreationDate="2022-07-13T05:09:41.020" Comment="Proposed by 100 approved by 83, 34 edit id of 235" ContentLicense="CC BY-SA 4.0" />
  <row Id="14018" PostHistoryTypeId="2" PostId="3731" RevisionGUID="d6039e6f-01d1-4361-855b-e4b6c04bc411" CreationDate="2022-07-13T05:14:05.687" UserId="73" Text="The horizontal messages are a `BTreeMap&lt;Paraid, Vec&lt;InboundHrmpMessage&gt;&gt;`. You can find the [`InboundHrmpMessage`][1] declaration here. The `data` field you then need to parse as versioned xcm message. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/2c934ed2cddcbf39cc3d8575d086ce13d937ca95/core-primitives/src/lib.rs#L141" ContentLicense="CC BY-SA 4.0" />
  <row Id="14020" PostHistoryTypeId="2" PostId="3732" RevisionGUID="c1f44ec4-fac3-472c-9c53-f2a760b63152" CreationDate="2022-07-13T06:43:10.253" UserId="2132" Text="The signer is always the account that pays all transaction fees. Trying to sign on one and then sending on another, won't yield results. At best where the two accounts have equal nonces it will be accepted, but the signer will still be responsible for the fees.&#xD;&#xA;&#xD;&#xA;If you wish to make transactions on behalf of other accounts, you can look at proxies. This allows 3rd-party accounts to make transactions (set by type) on behalf of other accounts and pay the associated fees for transactions.&#xD;&#xA;&#xD;&#xA;Assume you have account A and B and would like B to make transactions for A.&#xD;&#xA;&#xD;&#xA; 1. Setup a proxy using account A setting B as a delegate via [proxy.addProxy](https://polkadot.js.org/docs/substrate/extrinsics#addproxydelegate-accountid32-proxy_type-noderuntimeproxytype-delay-u32)&#xD;&#xA; 2. Send the transaction from account B via [proxy.proxy](https://polkadot.js.org/docs/substrate/extrinsics#proxyreal-accountid32-force_proxy_type-optionnoderuntimeproxytype-call-call)&#xD;&#xA;&#xD;&#xA;To the nonce issue you are facing, rather use the `signAsync` variant to retrieve the nonce from the chain, with `sign` you need to explicitly pass the correct nonce through as an option. (It is a deprecated function)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14022" PostHistoryTypeId="5" PostId="3732" RevisionGUID="a69ff357-58e3-448b-94c9-fccb15e1f672" CreationDate="2022-07-13T06:50:43.310" UserId="2132" Comment="Expand sign vs signAsync" Text="The signer is always the account that pays all transaction fees. Trying to sign on one and then sending on another, won't yield results. At best where the two accounts have equal nonces it will be accepted, but the signer will still be responsible for the fees.&#xD;&#xA;&#xD;&#xA;If you wish to make transactions on behalf of other accounts, you can look at proxies. This allows 3rd-party accounts to make transactions (set by type) on behalf of other accounts and pay the associated fees for transactions.&#xD;&#xA;&#xD;&#xA;Assume you have account A and B and would like B to make transactions for A.&#xD;&#xA;&#xD;&#xA; 1. Setup a proxy using account A setting B as a delegate via [proxy.addProxy](https://polkadot.js.org/docs/substrate/extrinsics#addproxydelegate-accountid32-proxy_type-noderuntimeproxytype-delay-u32)&#xD;&#xA; 2. Send the transaction from account B via [proxy.proxy](https://polkadot.js.org/docs/substrate/extrinsics#proxyreal-accountid32-force_proxy_type-optionnoderuntimeproxytype-call-call)&#xD;&#xA;&#xD;&#xA;To the nonce issue you are facing, rather use the `signAsync` variant to retrieve the nonce from the chain, with `sign` you need to explicitly pass the correct nonce through as an option. &#xD;&#xA;&#xD;&#xA;(It is a deprecated function, I'm assuming one of the reasons is because of this surprise factor since it doesn't behave analogous to `signAndSend` or `signAsync` when it comes to signing, it is much more low-level with all signing info to be supplied)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14023" PostHistoryTypeId="52" PostId="3729" RevisionGUID="ccd76312-b434-4b0d-82c5-a070a35d7946" CreationDate="2022-07-13T07:16:39.937" />
  <row Id="14024" PostHistoryTypeId="2" PostId="3733" RevisionGUID="64e5ecc1-ef06-4b99-a69a-a78d7738df3e" CreationDate="2022-07-13T07:22:09.607" UserId="1949" Text="The apps UI only retrieves block hashes, not extrinsic hashes. So when the error above occurs, it would mean you passed an invalid block hash which is not found [via RPC](https://polkadot.js.org/docs/substrate/rpc#getblockhash-blockhash-signedblock).&#xD;&#xA;&#xD;&#xA;Since there is no [lookup-by-tx-hash RPC](https://substrate.stackexchange.com/questions/2760/get-transaction-by-hash), the UI mentioned cannot lookup by that." ContentLicense="CC BY-SA 4.0" />
  <row Id="14026" PostHistoryTypeId="2" PostId="3734" RevisionGUID="09e09f54-0f4a-4017-b686-08acb1eb480f" CreationDate="2022-07-13T07:36:57.370" UserId="94" Text="Good question!  &#xD;&#xA;The `#[pallet::weight(…)]` annotation allows you to do some light compile-time computations.  &#xD;&#xA;This makes it possible to calculate a maximum like this:  &#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(T::WeightInfo::slow().max(T::WeightInfo::slower()))]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;One example of this can be found in the [bags-list pallet](https://github.com/paritytech/substrate/blob/b0777b4c7f7d8d3c635319d0153953d0a22aa58e/frame/bags-list/src/lib.rs#L224).  &#xD;&#xA;It is important to only do very lightweight calculations here, since the terms are evaluated to judge whether or not an extrinsic should be able to execute.  &#xD;&#xA;I think the most complicated weight terms are in the [utility pallet](https://github.com/paritytech/substrate/blob/b0777b4c7f7d8d3c635319d0153953d0a22aa58e/frame/utility/src/lib.rs#L300)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14028" PostHistoryTypeId="5" PostId="3652" RevisionGUID="439eaf1d-25d8-4dde-b9ed-ff4091ce5ced" CreationDate="2022-07-13T07:42:57.780" UserId="213" Comment="added 523 characters in body" Text="    const [status, setStatus] = useState(null)    &#xD;&#xA;    &#xD;&#xA;    const txResHandler = ( status, events, dispatchError, setSubmitting) =&gt; {&#xD;&#xA;            setSubmitting(true)&#xD;&#xA;            if (dispatchError) {&#xD;&#xA;              setStatus(null)&#xD;&#xA;              if (dispatchError.isModule) {&#xD;&#xA;                // for module errors, we have the section indexed, lookup&#xD;&#xA;                const decoded = api.registry.findMetaError(dispatchError.asModule)&#xD;&#xA;                const { docs, name, section } = decoded&#xD;&#xA;        &#xD;&#xA;                console.log(`${section}.${name}: ${docs.join(' ')}`)&#xD;&#xA;                setStatus(name)&#xD;&#xA;                setSubmitting(false)&#xD;&#xA;              } else {&#xD;&#xA;                console.log(dispatchError.toString())&#xD;&#xA;              }&#xD;&#xA;            } else if (status.isFinalized) {&#xD;&#xA;              setStatus(` Finalized. Block hash: ${status.asFinalized.toString()}`)&#xD;&#xA;        &#xD;&#xA;              setSubmitting(false)&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;If previous transaction gives an error `setStatus(name)` in if (dispatchError.isModule) block, then the status/name remains same in the next transaction till `status.isFinalized`, it's not reset to null. How can I remove the previous status?&#xD;&#xA;&#xD;&#xA;     setStatus('Sending...')    &#xD;&#xA;     const txExecute = api.tx.election.submitCandidacy(...opts)    &#xD;&#xA;      const unsub = await txExecute&#xD;&#xA;                  .signAndSend(...fromAcct, ({ status, events, dispatchError }) =&gt; {&#xD;&#xA;                    txResHandler(&#xD;&#xA;                      status,&#xD;&#xA;                      events,&#xD;&#xA;                      dispatchError,&#xD;&#xA;                      actions.setSubmitting&#xD;&#xA;                    )&#xD;&#xA;                  })&#xD;&#xA;                  .catch(txErrHandler)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14029" PostHistoryTypeId="5" PostId="3723" RevisionGUID="9b1450da-badd-4a80-9ea7-fe40d7776254" CreationDate="2022-07-13T07:53:52.703" UserId="16" Comment="edited body" Text="#### Question 1&#xD;&#xA;Yes. The `code` is just the contents of the wasm file as emitted by the compiler.&#xD;&#xA;&#xD;&#xA;#### Question 2&#xD;&#xA;&#xD;&#xA;`pallet-contracts` doesn't concern itself with the `data`. It just passes it down to the contract as-is. From the point of view of `paller-contracts` there is just a `call` function that takes some input. That means it is up to the contract how to interpret that data. For contracts written in ink! you can look at the metadata on how to craft this input (as you already suggested). It would look like this in Rust:&#xD;&#xA;```rust&#xD;&#xA;(&quot;functionA&quot;.hash()[..3], paramA, paramB, paramC).encode()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`encode()` is the `SCALE` encoding. The first element of the tuple is the selector which you can take from the metadata.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14030" PostHistoryTypeId="5" PostId="3431" RevisionGUID="3267aa3c-03fd-4e5a-ab01-691a3597aaf7" CreationDate="2022-07-13T08:02:20.247" UserId="28" Comment="deleted 3 characters in body" Text="`StorageDoubleMap` has a function:&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;/// Remove all value of the storage.&#xD;&#xA;pub fn remove_all(limit: Option&lt;u32&gt;) -&gt; sp_io::KillStorageResult {&#xD;&#xA;	&lt;Self as crate::storage::StoragePrefixedMap&lt;Value&gt;&gt;::remove_all(limit)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;https://crates.parity.io/frame_support/pallet_prelude/struct.StorageDoubleMap.html#method.remove_all&#xD;&#xA;&#xD;&#xA;So you can just call `let kill_result = Provisions::&lt;T&gt;::remove_all(limit);`&#xD;&#xA;&#xD;&#xA;Then, check if `kill_result` is `AllRemoved`." ContentLicense="CC BY-SA 4.0" />
  <row Id="14031" PostHistoryTypeId="5" PostId="3631" RevisionGUID="270d83e3-b0a5-4974-9a95-07aa6f8d339d" CreationDate="2022-07-13T08:28:55.907" UserId="393" Comment="added 657 characters in body" Text="&quot;And have a question is it possible to configure OCW so that if one node starts an HTTP call in OCW other nodes will skip it&quot;, you can add a judgement to make sure only the author of the block will execute the ocw logic, such as block.header.author == current_account. Or you can add judgement in the extrinsic's handler method, if the answer has been submitted then ignore following answers which are submitted by other nodes.&#xD;&#xA;&#xD;&#xA;I'll show how the second approach can be implemented:&#xD;&#xA;&#xD;&#xA; - Pallet's extrinsic api:&#xD;&#xA;        &#xD;&#xA;        #[pallet::weight(100)]&#xD;&#xA;        pub fn submit_from_ocw(&#xD;&#xA;            origin: OriginFor&lt;T&gt;,&#xD;&#xA;            key: SomeType,&#xD;&#xA;            Value: SomeType,&#xD;&#xA;        ) {&#xD;&#xA;          //guarantee only one validator can execute successfully&#xD;&#xA;          if (store.contains(key)) {&#xD;&#xA;             Error::XXX;&#xD;&#xA;          }&#xD;&#xA;          ...&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA; - ocw part&#xD;&#xA;&#xD;&#xA;    fn offchain_worker(block_number: BlockNumberFor&lt;T&gt;) {&#xD;&#xA;       for task in pending_tasks {&#xD;&#xA;          //guarantee only the block that task is created at, will process the task&#xD;&#xA;          if (task.create_at == block_number) {&#xD;&#xA;              ...&#xD;&#xA;              Pallet::&lt;T&gt;::submit_from_ocw(key, value);&#xD;&#xA;          }&#xD;&#xA;       }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="14032" PostHistoryTypeId="5" PostId="3719" RevisionGUID="aabb3b3e-cb2e-4833-a889-3d3fd16dbd9e" CreationDate="2022-07-13T08:33:42.783" UserId="2102" Comment="Update and enhance solution" Text="I think you should run your sync node without the `--validator` flag, and if you have some sort of access control (like the `nodeAuthorization` pallet) you should allow the new node in the network. &#xD;&#xA;&#xD;&#xA;Just run the new node the same way you are running nodes 2, 3, 4 or 5, but avoid enabling the `--validator` flag. Once the node starts, you should see it peers with other nodes and starts to import blocks, but you won't see it authoring blocks or starting consensus over any block.&#xD;&#xA;&#xD;&#xA;This new node, although it won't author blocks, it can receive transactions and gossip them (I think), so you can connect your DApp to this node, and any transaction submitted to this node will eventually reach the other nodes.&#xD;&#xA;&#xD;&#xA;I'm not 100% sure, but maybe someone can provide a more detailed answer.&#xD;&#xA;&#xD;&#xA;UPDATE: I tested this so I could also confirm that it works as expected. If you run a new node without the `--validator` flag it will sync blocks correctly and gossip any transaction it receives, so I think this is what you want. Make sure you are using an unknown account, i.e not using flags like `--alice`.&#xD;&#xA;Oh and another thing, if your nodes are in the same network then you should not worry about anything else, but if they are on a different network, you should at least have a boot node that will bridge validators and your new node.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14033" PostHistoryTypeId="2" PostId="3735" RevisionGUID="6bc716b3-1d7d-4b66-ae1b-78b6a92b9b3c" CreationDate="2022-07-13T08:36:52.643" UserId="140" Text="While configuring our parachain, in `pallet_collator_selection`, We used the same PotId as Substarte parachain template &#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-parachain-template/blob/e0388cbb1777c1fada8e2b649360b449869ffc64/runtime/src/lib.rs#L427&#xD;&#xA;&#xD;&#xA;However it's working fine. But would this cause any issue?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14035" PostHistoryTypeId="1" PostId="3735" RevisionGUID="6bc716b3-1d7d-4b66-ae1b-78b6a92b9b3c" CreationDate="2022-07-13T08:36:52.643" UserId="140" Text="Is it ok to use the same PotId as Substarte parachain template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14036" PostHistoryTypeId="3" PostId="3735" RevisionGUID="6bc716b3-1d7d-4b66-ae1b-78b6a92b9b3c" CreationDate="2022-07-13T08:36:52.643" UserId="140" Text="|substrate-node|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14037" PostHistoryTypeId="2" PostId="3736" RevisionGUID="c7e57090-34a5-4f87-b7bf-356f772d9901" CreationDate="2022-07-13T09:42:04.710" UserId="2423" Text="I'm having trouble decoding a `democracy.Voted` event on Polkadot - for example: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/explorer/query/0x960b817cc1d137151ec6069753f7458fbdd6fb26dbff3888137ae8b09b4fc060&#xD;&#xA;&#xD;&#xA;I'm working in Golang and I suspect that I am unpacking into a wrongly-defined data stucture.&#xD;&#xA;&#xD;&#xA;As I understand it, `democracy.Voted` is comprised of:&#xD;&#xA;&#xD;&#xA;* `AccountId32` - underlying data type is a 32 byte array&#xD;&#xA;* `ReferendumIndex` - underlying data type is an unsigned 32 bit integer&#xD;&#xA;* `PalletDemocracyVoteAccountVote` - described [here][1]&#xD;&#xA;&#xD;&#xA;In Rust, the Vote data structure is:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub struct Vote {&#xD;&#xA;    pub aye: bool,&#xD;&#xA;    pub conviction: Conviction,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I think I am having trouble with the `Conviction` enum.&#xD;&#xA;&#xD;&#xA;I notice in block explorers (e.g. [here][2]) that the `Vote` is reported as what looks like a U8 integer - in the case of the example above, 128.&#xD;&#xA;&#xD;&#xA;1. What is the underlying type for `Conviction`?&#xD;&#xA;&#xD;&#xA;2. Are the variants for `Conviction` determined by a bitfield on a single byte?&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/pallet_democracy/struct.Vote.html&#xD;&#xA;  [2]: https://polkadot.subscan.io/extrinsic/0xf5316f9dae9e650deb08e5e72c07ea37984a076aeb9b6826b8724b6c21b283e6" ContentLicense="CC BY-SA 4.0" />
  <row Id="14039" PostHistoryTypeId="1" PostId="3736" RevisionGUID="c7e57090-34a5-4f87-b7bf-356f772d9901" CreationDate="2022-07-13T09:42:04.710" UserId="2423" Text="Decoding `democracy.Voted`" ContentLicense="CC BY-SA 4.0" />
  <row Id="14040" PostHistoryTypeId="3" PostId="3736" RevisionGUID="c7e57090-34a5-4f87-b7bf-356f772d9901" CreationDate="2022-07-13T09:42:04.710" UserId="2423" Text="|polkadot|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14041" PostHistoryTypeId="2" PostId="3737" RevisionGUID="8d66aa83-59c5-4fa5-9cdf-a1a7b97e79af" CreationDate="2022-07-13T11:49:01.363" UserId="627" Text="The `aye` &amp; `conviction` is encoded as a single byte. The top-most bit indicated the true/false, the remaining bits indicates the conviction.&#xD;&#xA;&#xD;&#xA;You can look here for the specific [Vote decoding code](https://github.com/paritytech/substrate/blob/42044053b5895991d06ddc776e45da61c6462c78/frame/democracy/src/vote.rs#L44-L53) -&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl Decode for Vote {&#xD;&#xA;	fn decode&lt;I: Input&gt;(input: &amp;mut I) -&gt; Result&lt;Self, codec::Error&gt; {&#xD;&#xA;		let b = input.read_byte()?;&#xD;&#xA;		Ok(Vote {&#xD;&#xA;			aye: (b &amp; 0b1000_0000) == 0b1000_0000,&#xD;&#xA;			conviction: Conviction::try_from(b &amp; 0b0111_1111)&#xD;&#xA;				.map_err(|_| codec::Error::from(&quot;Invalid conviction&quot;))?,&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in your example, 128 would be an aye with [no conviction](https://github.com/paritytech/substrate/blob/42044053b5895991d06ddc776e45da61c6462c78/frame/democracy/src/conviction.rs#L31-L46)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14043" PostHistoryTypeId="5" PostId="3737" RevisionGUID="e47ef135-3d6f-451d-8b4d-c53f52b7d73a" CreationDate="2022-07-13T11:59:04.100" UserId="627" Comment="Types for fields" Text="The `aye` (bool) &amp; `conviction` (enum) is encoded together as a single byte. The top-most bit indicated the true/false, the remaining bits indicates the conviction.&#xD;&#xA;&#xD;&#xA;You can look here for the specific [Vote decoding code](https://github.com/paritytech/substrate/blob/42044053b5895991d06ddc776e45da61c6462c78/frame/democracy/src/vote.rs#L44-L53) -&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl Decode for Vote {&#xD;&#xA;	fn decode&lt;I: Input&gt;(input: &amp;mut I) -&gt; Result&lt;Self, codec::Error&gt; {&#xD;&#xA;		let b = input.read_byte()?;&#xD;&#xA;		Ok(Vote {&#xD;&#xA;			aye: (b &amp; 0b1000_0000) == 0b1000_0000,&#xD;&#xA;			conviction: Conviction::try_from(b &amp; 0b0111_1111)&#xD;&#xA;				.map_err(|_| codec::Error::from(&quot;Invalid conviction&quot;))?,&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in your example, 128 would be an aye with [no conviction](https://github.com/paritytech/substrate/blob/42044053b5895991d06ddc776e45da61c6462c78/frame/democracy/src/conviction.rs#L31-L46)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14044" PostHistoryTypeId="5" PostId="3730" RevisionGUID="6016cfea-c261-4f50-a5d3-c589159f9e97" CreationDate="2022-07-13T12:29:52.357" UserId="177" Comment="deleted 208 characters in body" Text="I'm currently using substrate (version 4) with the contrat-pallet. I deploy contract in wasm, compiled from solidity (thanks to solang compiler) and sometimes, when executing a method of the smart contract, I encounter an error. When I take a look on the polkadotjs apps I have the following message : &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;But this message is not so explicit and doesn't help to figure out how to solve the problem. &#xD;&#xA;&#xD;&#xA;Furthermore, the output of the polkadotjs api when I run this code :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;contract.tx.method({ storageDepositLimit, gasLimit })&#xD;&#xA;.signAndSend(pair, result =&gt; {&#xD;&#xA;	if (result.status.isFinalized) {&#xD;&#xA;		return result.toHuman()&#xD;&#xA;	}&#xD;&#xA;})&#xD;&#xA;``` &#xD;&#xA;is not really more explicit :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  dispatchError: { Module: { index: '9', error: '0x0b000000' } },&#xD;&#xA;  dispatchInfo: { weight: '80,051,097,517', class: 'Normal', paysFee: 'Yes' },&#xD;&#xA;  events: [&#xD;&#xA;    { phase: [Object], event: [Object], topics: [] },&#xD;&#xA;    { phase: [Object], event: [Object], topics: [] }&#xD;&#xA;  ],&#xD;&#xA;  internalError: undefined,&#xD;&#xA;  status: {&#xD;&#xA;    Finalized: '0x2e6cfa203369435efd17144525e265508e801865baf7d8f8989883a553ddf4b8'&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;By experience, this kind of errors can occurs when a &quot;require&quot; from the solidity smart contract doesn't pass. But I don't have any details and I don't find how to get the require output message from the smart contract.&#xD;&#xA;&#xD;&#xA;Is there any way to get more detail on error to know what is going on ? To get the message from the &quot;require&quot; in the solidity smart contract ? To know from what part it came from ?&#xD;&#xA;&#xD;&#xA;Thanks !&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/QYaWQ.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="14045" PostHistoryTypeId="2" PostId="3738" RevisionGUID="bff5a62e-210b-468d-a728-3e11637fd333" CreationDate="2022-07-13T13:33:21.767" UserId="2565" Text="This is now solved.  The solution is as follows:&#xD;&#xA;&#xD;&#xA;1. Add the following code in your pub trait Config: frame_system::Config&#xD;&#xA;```&#xD;&#xA;type Currency: Currency&lt;Self::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;2. Set the value of the config trait in runtime to point to pallet_balances&#xD;&#xA;```&#xD;&#xA;type Currency = pallet_balances::Pallet&lt;Runtime&gt;;&#xD;&#xA;```&#xD;&#xA;3. Declare a type BalanceOf (Reference: [https://paritytech.github.io/substrate/monthly-2021-09+1/pallet_balances/index.html][1])&#xD;&#xA;```&#xD;&#xA;pub type BalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;```&#xD;&#xA;4. Now modify your code:&#xD;&#xA;```&#xD;&#xA;#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;pub fn my_transfer(origin: OriginFor&lt;T&gt;,  source: T::AccountId, amount: BalanceOf&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;      let owner = ensure_signed(origin)?;&#xD;&#xA;      match PalletDataStore::&lt;T&gt;::get() {&#xD;&#xA;          Some(destination) =&gt; {&#xD;&#xA;              T::Currency::transfer(&amp;source, &amp;destination, amount, ExistenceRequirement::KeepAlive)?;&#xD;&#xA;          },&#xD;&#xA;          None =&gt; return Err(Error::&lt;T&gt;::NoneValue.into()),&#xD;&#xA;      };&#xD;&#xA;      Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/monthly-2021-09+1/pallet_balances/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="14047" PostHistoryTypeId="2" PostId="3739" RevisionGUID="d632a9f4-ac09-411a-80b7-d19ff8ceb73b" CreationDate="2022-07-13T16:24:50.833" UserId="377" Text="In type 1: use compact.compressed.wasm instead of compact.wasm. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14049" PostHistoryTypeId="5" PostId="3728" RevisionGUID="11222b9d-a3de-4dca-b312-5881a966dc24" CreationDate="2022-07-13T17:23:11.630" UserId="12" Comment="add `rustup show`" Text="I recently [upgraded a fork of the Node Template to v0.9.25][1] and now I am getting an [error about the Wasm toolchain not being installed][2]. Per the official Substrate documentation, the failing build is [adding the Wasm target to the nightly toolchain][3].&#xD;&#xA;&#xD;&#xA;    ~: rustup show&#xD;&#xA;    Default host: x86_64-unknown-linux-gnu&#xD;&#xA;    rustup home:  /home/werq/.rustup&#xD;&#xA;    &#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    nightly-x86_64-unknown-linux-gnu&#xD;&#xA;    1.60.0-x86_64-unknown-linux-gnu&#xD;&#xA;    &#xD;&#xA;    installed targets for active toolchain&#xD;&#xA;    --------------------------------------&#xD;&#xA;    &#xD;&#xA;    wasm32-unknown-unknown&#xD;&#xA;    x86_64-unknown-linux-gnu&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    rustc 1.62.0 (a8314ef7d 2022-06-27)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ChainSafe/substrate-node-template/commit/d2e6ccc8e60dd0e259c33694e7eac9cc72e3331a&#xD;&#xA;  [2]: https://github.com/ChainSafe/substrate-node-template/runs/7308258170?check_suite_focus=true#step:5:1182&#xD;&#xA;  [3]: https://github.com/ChainSafe/substrate-node-template/blob/dfo/gssmr-test/.github/workflows/build-specs.yml#L35" ContentLicense="CC BY-SA 4.0" />
  <row Id="14050" PostHistoryTypeId="2" PostId="3740" RevisionGUID="28cd7fc5-ab3d-446e-8ed4-776f5a905905" CreationDate="2022-07-13T19:18:08.443" UserId="555" Text="I have solved this issue by using compact.compressed wasm." ContentLicense="CC BY-SA 4.0" />
  <row Id="14052" PostHistoryTypeId="2" PostId="3741" RevisionGUID="95c9974e-4d49-46c5-8fb5-2e98e1cb6d34" CreationDate="2022-07-13T19:49:47.687" UserId="213" Text="I am using the balance pallet in the runtime. I want to install ink contract-pallet so that others can develop smart contracts using runtime pallet functions. I also want to send funds to ink smart contract from the runtime pallet, so that funds can be handled by the ink contract. I am new to ink, can I have such features? How can I do that? Some code snippets will be helpful. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14054" PostHistoryTypeId="1" PostId="3741" RevisionGUID="95c9974e-4d49-46c5-8fb5-2e98e1cb6d34" CreationDate="2022-07-13T19:49:47.687" UserId="213" Text="Transfering tokens from runtime pallet to ink smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="14055" PostHistoryTypeId="3" PostId="3741" RevisionGUID="95c9974e-4d49-46c5-8fb5-2e98e1cb6d34" CreationDate="2022-07-13T19:49:47.687" UserId="213" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14056" PostHistoryTypeId="2" PostId="3742" RevisionGUID="f3711e6b-a871-4ac8-b51e-b2195f07d5fa" CreationDate="2022-07-13T22:14:24.990" UserId="2790" Text="**Disclaimer: If any of the following is wrong, [cheme](https://substrate.stackexchange.com/users/225/cheme) or [shawn](https://substrate.stackexchange.com/users/28/shawn-tabrizi) are probably the best to correct me here. Also, if there is already work being done on this, please comment and correct me.**&#xD;&#xA;&#xD;&#xA;The short answer is: unfortunately NO. &#xD;&#xA;&#xD;&#xA;The current logic does not allow any non-Patricia-Trie logic as child storage and extending this logic needs changes in some core-substrate code. So it is non-trivial to use a binary merkle tree in child-storage, unless you want to store the whole tree as one byte-blob.&#xD;&#xA;&#xD;&#xA;# The problem&#xD;&#xA;&#xD;&#xA;1. the low-level API of the storage does not support non-Patricia-Trie logic&#xD;&#xA;&#xD;&#xA;2. there is currently no high-level API for child-storage in FRAME (Think of like `StorageMap`, etc. that take care of key-generation)&#xD;&#xA;&#xD;&#xA;Of course, the low-level API's design will affect the high-level API's design possibilities. As I thought about this one key question to answer here is: *Does Parity want to allow storage logic under a child-node to be developed independently of substrate?* Why I think this is important will hopefully be clear at the end.&#xD;&#xA;&#xD;&#xA;# Possible Solution: *high-level API*&#xD;&#xA;I will start with the high-level API as I think this is the crucial part for teams building on Substrate and it will define the requirements for the low-level API.&#xD;&#xA;&#xD;&#xA;## Non-Substrate Datastructures supported&#xD;&#xA;If non-Substrate code logic is supported a possible solution could look something like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct ChildStorage&lt;&#xD;&#xA;	Prefix: StorageInstance,&#xD;&#xA;	ChildStorage: CustomStorage,&#xD;&#xA;&gt;(core::marker::PhantomData&lt;(Prefix, ChildStorage)&gt;);&#xD;&#xA;&#xD;&#xA;pub trait CustomStorage {&#xD;&#xA;   /// Called when the writing iteration trough the trie reaches&#xD;&#xA;   /// the child-tree root&#xD;&#xA;   fn write(db: &amp;HashDB key: &amp;[u8], value: &amp;[u8]);&#xD;&#xA;&#xD;&#xA;   /// Called when the reading iteration trough the trie reaches&#xD;&#xA;   /// the child-tree root&#xD;&#xA;   fn read(db: &amp;HashDB, key: &amp;[u8], value: &amp;[u8])&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the storage object in a pallet could look something like&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type Binary&lt;T: Config&gt; = ChildStorage&lt;&#xD;&#xA;		_,&#xD;&#xA;        BMerkleTree&lt;Twox64Concat, T::AccountId, T::Balance&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;where `BMerkleTree&lt;Hasher, Key, Value&gt;` takes a hasher, a key and a value that is stored in the leaves. &#xD;&#xA;This approach would allow teams to build their own data structures. The datastructure implementation must then take care of calling `frame_support::storage::child::*` methods that in the end will trigger the `CustomStorage` methods. &#xD;&#xA;&#xD;&#xA;BUT&#xD;&#xA;&#xD;&#xA;* `ChildInfo` must be adapted and carry the `CustomStorage` object over the FFI of `sp-io`&#xD;&#xA;* exposes `HashDb` &#xD;&#xA;&#xD;&#xA;## Only Substrate Datastructures supported&#xD;&#xA;This case is probably &quot;easier&quot; as Parity could provide types like `BMerkleTree` just like the `StorageMap` type and implement specific read- and write-logic after reaching the last trie-node. &#xD;&#xA;&#xD;&#xA;# Possible Solution: *low-level API*&#xD;&#xA;The low-level API from my understanding would need some kind of proxy around the `HashDb` (e.g. [`KeyspacedDB`](https://github.com/paritytech/substrate/blob/367dab0d4bd7fd7b6c222dd15c753169c057dd42/primitives/trie/src/lib.rs#L409-L411). The proxy must take care of checking when the child-root is reached and the logic is leaving the patricia-trie. If this is the case it can forward to `CustomStorage` then. &#xD;&#xA;&#xD;&#xA;Also, this would need changes to [`child_storage_root`](https://github.com/paritytech/substrate/blob/367dab0d4bd7fd7b6c222dd15c753169c057dd42/primitives/state-machine/src/trie_backend_essence.rs#L495-L546) and `sp_io::ChildStorage`. &#xD;&#xA;&#xD;&#xA;Anyways, I probably missed a few important things and misunderstand some logic, but maybe this helps for understanding, creating a PR or so. &#xD;&#xA;&#xD;&#xA;# Resources&#xD;&#xA;* [Reading low-level](https://github.com/paritytech/substrate/blob/367dab0d4bd7fd7b6c222dd15c753169c057dd42/primitives/state-machine/src/trie_backend_essence.rs#L222-L237)&#xD;&#xA;* [Writing low-level](https://github.com/paritytech/substrate/blob/367dab0d4bd7fd7b6c222dd15c753169c057dd42/primitives/state-machine/src/trie_backend_essence.rs#L495-L540)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14058" PostHistoryTypeId="5" PostId="3735" RevisionGUID="2a1a8d66-fb41-4c11-9a04-79fc2d92d110" CreationDate="2022-07-14T00:53:14.247" UserId="83" Comment="Spelling" Text="While configuring our parachain, in `pallet_collator_selection`, we used the same PotId as in the Substrate parachain template &#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-parachain-template/blob/e0388cbb1777c1fada8e2b649360b449869ffc64/runtime/src/lib.rs#L427&#xD;&#xA;&#xD;&#xA;It's working fine. But would this cause any issue?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14059" PostHistoryTypeId="4" PostId="3735" RevisionGUID="2a1a8d66-fb41-4c11-9a04-79fc2d92d110" CreationDate="2022-07-14T00:53:14.247" UserId="83" Comment="Spelling" Text="Is it ok to use the same PotId as in the Substrate parachain template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14060" PostHistoryTypeId="2" PostId="3743" RevisionGUID="d176b8bf-6e0e-49b7-a8b5-2e8eefb31add" CreationDate="2022-07-14T03:58:25.693" UserId="2880" Text="I'm trying to build a single js file application with polakdot.js by using rollup to bundle everything together, but some of the polakdot.js libraries can't be resolved by the rollup node resolve plugin.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;@polkadot/x-randomvalues (imported by @polkadot/x-randomvalues?commonjs-external)&#xD;&#xA;@polkadot/x-textdecoder (imported by @polkadot/x-textdecoder?commonjs-external)&#xD;&#xA;@polkadot/x-textencoder (imported by @polkadot/x-textencoder?commonjs-external)&#xD;&#xA;@polkadot/x-fetch (imported by @polkadot/x-fetch?commonjs-external)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there some extra configuration that polkadot.js requires to bundle?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14062" PostHistoryTypeId="1" PostId="3743" RevisionGUID="d176b8bf-6e0e-49b7-a8b5-2e8eefb31add" CreationDate="2022-07-14T03:58:25.693" UserId="2880" Text="How to bundle polkadot.js with rollup?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14063" PostHistoryTypeId="3" PostId="3743" RevisionGUID="d176b8bf-6e0e-49b7-a8b5-2e8eefb31add" CreationDate="2022-07-14T03:58:25.693" UserId="2880" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14064" PostHistoryTypeId="2" PostId="3744" RevisionGUID="d4856574-705e-469b-838b-00e428bd3fcc" CreationDate="2022-07-14T05:46:23.033" UserId="627" Text="Browser bundles for the various packages are available in the [polkadot-js GH org](https://github.com/polkadot-js/build-bundle) and also as part of the npm packages. These are indeed all built with rollup.&#xD;&#xA;&#xD;&#xA;First off, not a bundling guru, so take this with a grain of salt.&#xD;&#xA;&#xD;&#xA;My guess at your issue: all the `x-*` packages use export maps extensively, so  it needs quite a recent version of the rollup node resolver to work - older version and known to have issues. So my first suggestion would be to ensure that -resolve and -commonjs are on the latest plugin versions, alongside rollup.&#xD;&#xA;&#xD;&#xA;As to how polkadot-js bundles - it is not that easy to untangle, since it uses some scripts that are [shared between the various repos](https://github.com/polkadot-js/dev/blob/master/packages/dev/config/rollup.js) the relevant bit there would be for the plugins added -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    plugins: [&#xD;&#xA;      pluginAlias({ entries }),&#xD;&#xA;      pluginJson(),&#xD;&#xA;      pluginCommonjs(),&#xD;&#xA;      pluginInject(inject),&#xD;&#xA;      pluginResolve({ browser: true }),&#xD;&#xA;      pluginCleanup()&#xD;&#xA;    ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Apart from some [overrides for some packages](https://github.com/polkadot-js/common/blob/5c92e095ffc1f7f92dfaedbde72d50b027fb18e5/rollup.config.mjs#L27) there are no specific/additional build steps applied for the various packages, the above shared config applies to all." ContentLicense="CC BY-SA 4.0" />
  <row Id="14066" PostHistoryTypeId="2" PostId="3745" RevisionGUID="8b69a262-f157-454a-819a-f8132b04e70f" CreationDate="2022-07-14T08:52:43.740" UserId="2736" Text="When running `try-runtime` I do not get any logs/output. Even when specifying explicitly `RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace`, still there is silence. However, in case of failure backtrace is printed out.&#xD;&#xA;&#xD;&#xA;Seems like other people have similar problems: https://github.com/paritytech/substrate/issues/11772" ContentLicense="CC BY-SA 4.0" />
  <row Id="14068" PostHistoryTypeId="1" PostId="3745" RevisionGUID="8b69a262-f157-454a-819a-f8132b04e70f" CreationDate="2022-07-14T08:52:43.740" UserId="2736" Text="No output from `try-runtime`" ContentLicense="CC BY-SA 4.0" />
  <row Id="14069" PostHistoryTypeId="3" PostId="3745" RevisionGUID="8b69a262-f157-454a-819a-f8132b04e70f" CreationDate="2022-07-14T08:52:43.740" UserId="2736" Text="|log|try-runtime|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14070" PostHistoryTypeId="2" PostId="3746" RevisionGUID="7e4bd3c6-1870-4add-9fcd-9f3faa846ac1" CreationDate="2022-07-14T09:26:43.963" UserId="2882" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NHvmD.png&#xD;&#xA;No method named `into_account` found for struct `PalletId` in the current scope. Although I added AccountIdConversion traits. This issue happen when I update polkadot version from 0.9.20 to 0.9.24. I used environment:&#xD;&#xA;rustc 1.62.0 (a8314ef7d 2022-06-27)&#xD;&#xA;cargo 1.62.0 (a748cf5a3 2022-06-08) " ContentLicense="CC BY-SA 4.0" />
  <row Id="14072" PostHistoryTypeId="1" PostId="3746" RevisionGUID="7e4bd3c6-1870-4add-9fcd-9f3faa846ac1" CreationDate="2022-07-14T09:26:43.963" UserId="2882" Text="Into_account not run properly in polkadot-v0.9.24" ContentLicense="CC BY-SA 4.0" />
  <row Id="14073" PostHistoryTypeId="3" PostId="3746" RevisionGUID="7e4bd3c6-1870-4add-9fcd-9f3faa846ac1" CreationDate="2022-07-14T09:26:43.963" UserId="2882" Text="|bug|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14074" PostHistoryTypeId="2" PostId="3747" RevisionGUID="e535bb64-da44-478e-b894-edf50e0a77d1" CreationDate="2022-07-14T09:44:51.277" UserId="94" Text="This is a bit confusing indeed, since extrinsics in Substrate don't &quot;fail&quot; in the error case.  &#xD;&#xA;Extrinsics will emit an `ExtrinsicFailed` event when returning an error, but still execute fine.  &#xD;&#xA;This stands in contrast to Ethereum, where a transaction reverts and does not execute in the error case.  &#xD;&#xA;&#xD;&#xA;In general you have to wait for the extrinsic to be included in a block.  &#xD;&#xA;Then read the events of your extrinsic from that block. There should either be a `ExtrinsicSuccess` or `ExtrinsicFailed` event.  &#xD;&#xA;GSRPC has some rough edges, I dont think it exposes everything that is necessary for this approach.  &#xD;&#xA;&#xD;&#xA;Another &quot;hacky&quot; way of doing it; Wait for the event that would be emitted in the success case with a timeout.  &#xD;&#xA;If it times out, you know that it did not work. In the other case it could also be that someone else send a successful extrinsic, whos event you now see.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="14076" PostHistoryTypeId="2" PostId="3748" RevisionGUID="21053c6f-90ec-441e-abc5-ee865154437c" CreationDate="2022-07-14T10:29:55.437" UserId="2565" Text="Can someone tell me how can you execute a smart contract method inside your custom pallet?&#xD;&#xA;&#xD;&#xA;You can call your smart contract tx/query through the RPC API but how can you call it inside a custom pallet?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&lt;pallet_contracts::Module&lt;T&gt;&gt;::call().transfer();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14078" PostHistoryTypeId="1" PostId="3748" RevisionGUID="21053c6f-90ec-441e-abc5-ee865154437c" CreationDate="2022-07-14T10:29:55.437" UserId="2565" Text="How can I call my contract methods inside a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14079" PostHistoryTypeId="3" PostId="3748" RevisionGUID="21053c6f-90ec-441e-abc5-ee865154437c" CreationDate="2022-07-14T10:29:55.437" UserId="2565" Text="|pallet|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14080" PostHistoryTypeId="2" PostId="3749" RevisionGUID="54f49b9c-298d-4241-a7db-eb2d01abd4f2" CreationDate="2022-07-14T11:29:24.567" UserId="2551" Text="# Code&#xD;&#xA;I defined a field in my contract like this&#xD;&#xA;```&#xD;&#xA;messages: Mapping&lt;String, Vec&lt;Message&gt;&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Message is struct&#xD;&#xA;```&#xD;&#xA;pub struct Message {&#xD;&#xA;    pub id: u128,&#xD;&#xA;    pub key: String,&#xD;&#xA;    pub p: String,&#xD;&#xA;    pub b: String,&#xD;&#xA;    pub s: Vec&lt;String&gt;,&#xD;&#xA;    pub addr: AccountId,&#xD;&#xA;    pub sel: [u8;4],&#xD;&#xA;    pub data: Vec&lt;u8&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a method with pseudo-code&#xD;&#xA;```&#xD;&#xA;fn push_message(&amp;mut self, message: Message) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            let mut c_message = self.messages.get(&amp;message.key).unwrap_or(Vec::&lt;Message&gt;::new());&#xD;&#xA;            c_message.push(message);&#xD;&#xA;            self.received_message_table.insert(message.key, &amp;c_message);&#xD;&#xA;            Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# Operation&#xD;&#xA;Repeatedly call `push_message` with the same `key` value to test the upper limit of Vec&lt;Message&gt; size.&#xD;&#xA;&#xD;&#xA;# Expectation&#xD;&#xA;I can call `push_message` successfully every time until the weight exceeds the maxExtrinsic weight.&#xD;&#xA;&#xD;&#xA;# Result&#xD;&#xA;I only pushed 67 message into the Vec&lt;message&gt;, then I got the error `contracts.ContractTraped`.&#xD;&#xA;In the node terminal, I saw the output &quot;range end index 16388 out of range for slice of length 16384&quot;.&#xD;&#xA;&#xD;&#xA;What does this mean?&#xD;&#xA;I think the transaction fail is because of the storage limit, instead of gas limit, is it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14082" PostHistoryTypeId="1" PostId="3749" RevisionGUID="54f49b9c-298d-4241-a7db-eb2d01abd4f2" CreationDate="2022-07-14T11:29:24.567" UserId="2551" Text="range end index 16388 out of range for slice of length 16384" ContentLicense="CC BY-SA 4.0" />
  <row Id="14083" PostHistoryTypeId="3" PostId="3749" RevisionGUID="54f49b9c-298d-4241-a7db-eb2d01abd4f2" CreationDate="2022-07-14T11:29:24.567" UserId="2551" Text="|ink|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14084" PostHistoryTypeId="2" PostId="3750" RevisionGUID="ca718e46-fb3f-4f10-90a6-020f2267d3bf" CreationDate="2022-07-14T12:08:04.310" UserId="94" Text="The old `into_account` function was ambiguous and possibly dangerous in certain cases.  &#xD;&#xA;You can now use `into_account_truncating` instead.  &#xD;&#xA;&#xD;&#xA;The function does exactly the same thing as before, but its name was changed to indicate that it is possibly truncating some of the seed data.  &#xD;&#xA;This is important in the case that you passed a very long seed and expect the returned account to depend on the full seed.  &#xD;&#xA;&#xD;&#xA;The change happend [here](https://github.com/paritytech/substrate/pull/10719) together with the introduction of `try_into_account` and some other functions." ContentLicense="CC BY-SA 4.0" />
  <row Id="14086" PostHistoryTypeId="2" PostId="3751" RevisionGUID="cf4d3a91-ef28-443b-8e16-43bd85d7abbd" CreationDate="2022-07-14T12:48:38.423" UserId="2883" Text="I'm currently trying to deploy &amp; interact with my contract using rust, but I can't find any methods or examples about this. (I've searched paritytech's github) Is there any way to deploy &amp; interact with my contract using rust? (Not by polkadot js) I think I can interact with chain by using subxt or substrate-api-client, but I can't deploy or interact with my contract (Call or Execute my functions)&#xD;&#xA;&#xD;&#xA;I appreciate any help you can provide." ContentLicense="CC BY-SA 4.0" />
  <row Id="14088" PostHistoryTypeId="1" PostId="3751" RevisionGUID="cf4d3a91-ef28-443b-8e16-43bd85d7abbd" CreationDate="2022-07-14T12:48:38.423" UserId="2883" Text="How can I deploy &amp; interact with contract on substrate using rust, not polkadot js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14089" PostHistoryTypeId="3" PostId="3751" RevisionGUID="cf4d3a91-ef28-443b-8e16-43bd85d7abbd" CreationDate="2022-07-14T12:48:38.423" UserId="2883" Text="|substrate-node|ink|rust|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14090" PostHistoryTypeId="2" PostId="3752" RevisionGUID="75dbb129-f9ed-4915-8b5a-f4c0e70caf08" CreationDate="2022-07-14T12:52:03.760" UserId="2855" Text="At the moment the transaction fee is payed as the native token in the substrate node template. When I create a new assed_id(say BAT) a fungible asset using pallet_assets, How can I now pay the transaction fees using the this BAT token?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14092" PostHistoryTypeId="1" PostId="3752" RevisionGUID="75dbb129-f9ed-4915-8b5a-f4c0e70caf08" CreationDate="2022-07-14T12:52:03.760" UserId="2855" Text="How to pay transaction fees using the custom token created by using pallet_assets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14093" PostHistoryTypeId="3" PostId="3752" RevisionGUID="75dbb129-f9ed-4915-8b5a-f4c0e70caf08" CreationDate="2022-07-14T12:52:03.760" UserId="2855" Text="|substrate-node|pallet|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14094" PostHistoryTypeId="6" PostId="3751" RevisionGUID="57a8d40e-b495-4fb2-a0db-275f85152f0f" CreationDate="2022-07-14T12:53:19.757" UserId="34" Comment="edited tags" Text="|ink|rust|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14095" PostHistoryTypeId="6" PostId="3752" RevisionGUID="7b7f8ad0-4438-41e2-a409-c22eb544d7df" CreationDate="2022-07-14T12:56:57.743" UserId="34" Comment="edited tags" Text="|pallet|balances|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14096" PostHistoryTypeId="2" PostId="3753" RevisionGUID="87d636ca-0109-4fb7-aa3d-40151d99ad85" CreationDate="2022-07-14T13:13:45.423" UserId="474" Text="There are some examples of working with contracts in the subxt tests (see https://github.com/paritytech/subxt/blob/master/testing/integration-tests/src/frame/contracts.rs#L58).&#xD;&#xA;&#xD;&#xA;There's also this Rust based tool which uses subxt and exists to help manage and deploy ink based contracts: https://github.com/paritytech/cargo-contract. &#xD;&#xA;&#xD;&#xA;Having a look at said tests, or the cargo-contract code should get you well on your way to using subxt to work with contracts!" ContentLicense="CC BY-SA 4.0" />
  <row Id="14098" PostHistoryTypeId="2" PostId="3754" RevisionGUID="6357fa67-3946-47c2-98ac-442de1a55066" CreationDate="2022-07-14T13:29:06.317" UserId="2884" Text="Is it possible to add support for other cryptographic algorithms, or are we only allowed to use the implemented ones?&#xD;&#xA;&#xD;&#xA;The implemented ones are sr25519, ed25519, ecdsa(secp256k1, not secp256r1).&#xD;&#xA;&#xD;&#xA;I tried following this [oracle example][1], but it seems to only wrap around sr25519. I then tried to mirror the [ecdsa implementation][2] but now I got to the point of trying to implement the [RuntimePublic trait][3], but I see that for [other algorithms][4], it is calling functions that talk to the [Keystore][5] through the [Crypto trait][6]&#xD;&#xA;&#xD;&#xA;I finally saw that getting keys of a certain algorithm is hardcoded in the Keystore, and when getting all of the keys regardless of the algo used, it still [converts it][7] into those 3 algorithms.&#xD;&#xA;&#xD;&#xA;It seems that substrate only lets you define crypto types only as a renamed version of the same algorithm, and not create new ones on other elliptic curves for example. Is this the case?&#xD;&#xA;&#xD;&#xA;Hardcoded crypto conversions of public keys from the Keystore:&#xD;&#xA;&#xD;&#xA;    impl SyncCryptoStore for LocalKeystore {&#xD;&#xA;    	fn keys(&amp;self, id: KeyTypeId) -&gt; std::result::Result&lt;Vec&lt;CryptoTypePublicPair&gt;, TraitError&gt; {&#xD;&#xA;    		let raw_keys = self.0.read().raw_public_keys(id)?;&#xD;&#xA;    		Ok(raw_keys.into_iter().fold(Vec::new(), |mut v, k| {&#xD;&#xA;    			v.push(CryptoTypePublicPair(sr25519::CRYPTO_ID, k.clone()));&#xD;&#xA;    			v.push(CryptoTypePublicPair(ed25519::CRYPTO_ID, k.clone()));&#xD;&#xA;    			v.push(CryptoTypePublicPair(ecdsa::CRYPTO_ID, k));&#xD;&#xA;    			v&#xD;&#xA;    		}))&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;How an algorithm like secp256k1 retrieves from the Keystore:&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;            fn ecdsa_public_keys(&amp;self, key_type: KeyTypeId) -&gt; Vec&lt;ecdsa::Public&gt; {&#xD;&#xA;            	self.0&#xD;&#xA;            		.read()&#xD;&#xA;            		.raw_public_keys(key_type)&#xD;&#xA;            		.map(|v| {&#xD;&#xA;            			v.into_iter()&#xD;&#xA;            				.filter_map(|k| ecdsa::Public::from_slice(k.as_slice()).ok())&#xD;&#xA;            				.collect()&#xD;&#xA;            		})&#xD;&#xA;            		.unwrap_or_default()&#xD;&#xA;            }&#xD;&#xA;        } // impl SyncCryptoStore for LocalKeystore&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/examples/offchain-worker/src/lib.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/primitives/core/src/ecdsa.rs&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/primitives/application-crypto/src/traits.rshttps://&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/primitives/application-crypto/src/ecdsa.rs&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/primitives/keystore/src/lib.rs&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/primitives/io/src/lib.rs&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/master/primitives/keystore/src/lib.rshttps://" ContentLicense="CC BY-SA 4.0" />
  <row Id="14100" PostHistoryTypeId="1" PostId="3754" RevisionGUID="6357fa67-3946-47c2-98ac-442de1a55066" CreationDate="2022-07-14T13:29:06.317" UserId="2884" Text="Adding support for p256 keys and signatures (secp256r1)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14101" PostHistoryTypeId="3" PostId="3754" RevisionGUID="6357fa67-3946-47c2-98ac-442de1a55066" CreationDate="2022-07-14T13:29:06.317" UserId="2884" Text="|runtime|rust|extrinsic|oracles|ecdsa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14102" PostHistoryTypeId="6" PostId="3752" RevisionGUID="8f055897-f9d7-4d47-9ab1-95b6346e807b" CreationDate="2022-07-14T13:29:38.627" UserId="85" Comment="edited tags" Text="|pallet|balances|assets|sufficient|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14103" PostHistoryTypeId="6" PostId="2450" RevisionGUID="bce9ae65-fa16-4b23-bc33-7547756d4d36" CreationDate="2022-07-14T13:30:06.357" UserId="85" Comment="edited tags" Text="|assets|statemine|statemint|sufficient|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14104" PostHistoryTypeId="2" PostId="3755" RevisionGUID="08345125-22e4-45f6-8ae2-c25b46d9d571" CreationDate="2022-07-14T13:34:19.900" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="14106" PostHistoryTypeId="1" PostId="3755" RevisionGUID="08345125-22e4-45f6-8ae2-c25b46d9d571" CreationDate="2022-07-14T13:34:19.900" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="14107" PostHistoryTypeId="2" PostId="3756" RevisionGUID="fb7ae578-c870-48c0-8457-75471f8a4ca8" CreationDate="2022-07-14T13:34:19.900" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="14109" PostHistoryTypeId="1" PostId="3756" RevisionGUID="fb7ae578-c870-48c0-8457-75471f8a4ca8" CreationDate="2022-07-14T13:34:19.900" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="14110" PostHistoryTypeId="2" PostId="3757" RevisionGUID="07ec0a84-d2e5-46dc-add9-d87205c94126" CreationDate="2022-07-14T13:54:01.950" UserId="451" Text="In addition to @jsdw's suggestions, have a look at https://github.com/paritytech/smart-bench. There I have written a macro which generates code based on a contract's metadata, which can then be used to build messages to send to ink! contracts via subxt.&#xD;&#xA;&#xD;&#xA;e.g. https://github.com/paritytech/smart-bench/blob/master/src/wasm/mod.rs#L27&#xD;&#xA;&#xD;&#xA;In the future it would be nice to extract that to it's own library so it can be reused, but that likely won't happen for a while so feel free to just copy that code for now.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14112" PostHistoryTypeId="2" PostId="3758" RevisionGUID="ffd3fa9a-8031-4378-b76d-7542d42e45eb" CreationDate="2022-07-14T13:57:47.990" UserId="85" Text="1. In order to do this you will need in your runtime the `pallet_asset_tx_payment` pallet. Here's an example of the [configuration][1].  &#xD;&#xA;(the pallet would need to be added into the `construct_runtime!` etc. See statemint as an example).&#xD;&#xA;&#xD;&#xA;2. Now that that type is available it needs to be added into the tuple that is the SignedExtra type like [this][2]. As you can see that then becomes part of the `UncheckedExtrinsic` type.&#xD;&#xA;&#xD;&#xA;3. Then on the client side when you construct the signed transaction the SignedExtra needs to be encoded too (eg. [subxt][3]). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/assets/statemint/src/lib.rs#L534&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/assets/statemint/src/lib.rs#L636&#xD;&#xA;  [3]: https://github.com/paritytech/subxt/blob/6012d2a75e3ea50209f9f5ab9638e6ee9e91a900/subxt/src/client.rs#L283" ContentLicense="CC BY-SA 4.0" />
  <row Id="14114" PostHistoryTypeId="2" PostId="3759" RevisionGUID="4a81a3ee-21f4-4d43-b1dc-2918244a506c" CreationDate="2022-07-14T14:54:20.323" UserId="1789" Text="The Substrate team(https://github.com/paritytech/substrate/) produces releases like polkadot-v0.9.25 every a few weeks,&#xD;&#xA;and my team needs to upgrade our parachain to follow those Substrate versions.&#xD;&#xA;&#xD;&#xA;My parachain also uses Frontier (https://github.com/paritytech/frontier/), which uses Substrate as a dependency.&#xD;&#xA;&#xD;&#xA;Because Frontier team does not produce a version for each new Substrate version, I have to fix the Frontier code to use a desired substrate version.&#xD;&#xA;&#xD;&#xA;I am aware of @JoshOrndorff's tutorial about how to add Frontier into a Substrate Node Template:&#xD;&#xA;https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021, but that is more than 1 year ago.&#xD;&#xA;&#xD;&#xA;Now I have a few options:&#xD;&#xA;1) Use the commit or branch that has the Substrate version I want: This is not good because those available versions are very limited&#xD;&#xA;2) Replicate what Josh did: add Frontier to the latest Substrate Node Template with the Substrate version I want&#xD;&#xA;3) Use the Frontier repo's template folder and upgrade it to the Substrate version I want&#xD;&#xA;What is the best strategy to approach this?&#xD;&#xA;&#xD;&#xA;Which option is better?&#xD;&#xA;&#xD;&#xA;And how can I upgrade or update the Substrate dependencies?&#xD;&#xA;&#xD;&#xA;I tried to copy the latest Frontier code from its master branch, then replace the Substrate version to the one I want, then I got these errors:&#xD;&#xA;```&#xD;&#xA;➜  frontier-zmod git:(polkadot-v0.9.24) ✗ cargo check                               &#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;    Updating crates.io index&#xD;&#xA;error: failed to select a version for `syn`.&#xD;&#xA;    ... required by package `frame-support-procedural v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.24#814752f6)`&#xD;&#xA;    ... which satisfies git dependency `frame-support-procedural` of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.24#814752f6)`&#xD;&#xA;    ... which satisfies git dependency `frame-support` of package `fp-ethereum v1.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/primitives/ethereum)`&#xD;&#xA;    ... which satisfies path dependency `fp-ethereum` (locked to 1.0.0-dev) of package `pallet-ethereum v4.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/frame/ethereum)`&#xD;&#xA;    ... which satisfies path dependency `pallet-ethereum` (locked to 4.0.0-dev) of package `frontier-template-runtime v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/runtime)`&#xD;&#xA;    ... which satisfies path dependency `frontier-template-runtime` (locked to 0.0.0) of package `fc-cli v1.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/cli)`&#xD;&#xA;    ... which satisfies path dependency `fc-cli` (locked to 1.0.0-dev) of package `frontier-template-node v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/node)`&#xD;&#xA;versions that meet the requirements `^1.0.98` are: 1.0.98&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `syn v1.0.96`&#xD;&#xA;    ... which satisfies dependency `syn = &quot;^1.0.96&quot;` (locked to 1.0.96) of package `async-trait v0.1.56`&#xD;&#xA;    ... which satisfies dependency `async-trait = &quot;^0.1&quot;` (locked to 0.1.56) of package `fc-consensus v2.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/consensus)`&#xD;&#xA;    ... which satisfies path dependency `fc-consensus` (locked to 2.0.0-dev) of package `frontier-template-node v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `syn` which could resolve this conflict&#xD;&#xA;➜  frontier-zmod git:(polkadot-v0.9.24) ✗ cargo update -p syn --precise 1.0.98      &#xD;&#xA;    Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;error: failed to select a version for `arrayvec`.&#xD;&#xA;    ... required by package `libp2p-kad v0.37.1`&#xD;&#xA;    ... which satisfies dependency `libp2p-kad = &quot;^0.37.1&quot;` of package `libp2p v0.45.1`&#xD;&#xA;    ... which satisfies dependency `libp2p = &quot;^0.45.1&quot;` of package `sc-cli v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.24#814752f6)`&#xD;&#xA;    ... which satisfies git dependency `sc-cli` of package `fc-cli v1.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/cli)`&#xD;&#xA;    ... which satisfies path dependency `fc-cli` (locked to 1.0.0-dev) of package `frontier-template-node v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/node)`&#xD;&#xA;versions that meet the requirements `^0.7.2` are: 0.7.2&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `arrayvec v0.7.1`&#xD;&#xA;    ... which satisfies dependency `arrayvec = &quot;^0.7.1&quot;` (locked to 0.7.1) of package `jsonrpsee-core v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee-core = &quot;^0.13.1&quot;` (locked to 0.13.1) of package `jsonrpsee v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee = &quot;^0.13.0&quot;` (locked to 0.13.1) of package `fc-rpc v2.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/rpc)`&#xD;&#xA;    ... which satisfies path dependency `fc-rpc` (locked to 2.0.0-dev) of package `frontier-template-node v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `arrayvec` which could resolve this conflict&#xD;&#xA;➜  frontier-zmod git:(polkadot-v0.9.24) ✗ cargo update -p arrayvec:0.4.12 --precise 0.7.2&#xD;&#xA;    Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;error: failed to select a version for the requirement `arrayvec = &quot;^0.4.6&quot;`&#xD;&#xA;candidate versions found which didn't match: 0.7.2&#xD;&#xA;location searched: crates.io index&#xD;&#xA;required by package `blake2-rfc v0.2.18`&#xD;&#xA;    ... which satisfies dependency `blake2-rfc = &quot;^0.2.18&quot;` (locked to 0.2.18) of package `sp-core v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.24#814752f6)`&#xD;&#xA;    ... which satisfies git dependency `sp-core` of package `fc-db v2.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/db)`&#xD;&#xA;    ... which satisfies path dependency `fc-db` (locked to 2.0.0-dev) of package `fc-cli v1.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/cli)`&#xD;&#xA;    ... which satisfies path dependency `fc-cli` (locked to 1.0.0-dev) of package `frontier-template-node v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/node)`&#xD;&#xA;```&#xD;&#xA;How can I upgrade the Substrate dependency?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14116" PostHistoryTypeId="1" PostId="3759" RevisionGUID="4a81a3ee-21f4-4d43-b1dc-2918244a506c" CreationDate="2022-07-14T14:54:20.323" UserId="1789" Text="How to upgrade Frontier to use a specific Substrate version" ContentLicense="CC BY-SA 4.0" />
  <row Id="14117" PostHistoryTypeId="3" PostId="3759" RevisionGUID="4a81a3ee-21f4-4d43-b1dc-2918244a506c" CreationDate="2022-07-14T14:54:20.323" UserId="1789" Text="|parachain|substrate-node-template|rust|frontier|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14118" PostHistoryTypeId="2" PostId="3760" RevisionGUID="6b7fced4-968b-4a83-8361-53f3fb4b52c4" CreationDate="2022-07-14T15:48:02.710" UserId="29" Text="For now, the recommended path is to use a stable release branch from the frontier repo. As of time of writing this, it is `polkadot-v0.9.22`:&#xD;&#xA;- https://github.com/paritytech/frontier/tree/polkadot-v0.9.22&#xD;&#xA;&#xD;&#xA;Notice how all the Substrate dependencies have:&#xD;&#xA;```&#xD;&#xA;branch = &quot;polkadot-v0.9.22&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This branch compiles and can be used to generate the frontier template as well if needed." ContentLicense="CC BY-SA 4.0" />
  <row Id="14120" PostHistoryTypeId="2" PostId="3761" RevisionGUID="6cfa0285-0c15-4372-b98c-48c1b2b41fa5" CreationDate="2022-07-14T15:50:39.300" UserId="2885" Text="sorry for the dumb non-technical question. &#xD;&#xA;&#xD;&#xA;I'd like to post [Bitgreen's Substrate Developer job opening][1] on https://careers.substrate.io/jobs, but I don't see how to post it.&#xD;&#xA;&#xD;&#xA;Thanks for any help!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://forms.gle/WzX3rvMzdBtAiqM19" ContentLicense="CC BY-SA 4.0" />
  <row Id="14122" PostHistoryTypeId="1" PostId="3761" RevisionGUID="6cfa0285-0c15-4372-b98c-48c1b2b41fa5" CreationDate="2022-07-14T15:50:39.300" UserId="2885" Text="How do I post a Substrate dev job opportunity on https://careers.substrate.io/jobs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14123" PostHistoryTypeId="3" PostId="3761" RevisionGUID="6cfa0285-0c15-4372-b98c-48c1b2b41fa5" CreationDate="2022-07-14T15:50:39.300" UserId="2885" Text="|advice|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14124" PostHistoryTypeId="5" PostId="3752" RevisionGUID="782044b5-a76d-44ca-a965-741c63444efb" CreationDate="2022-07-14T15:54:22.177" UserId="29" Comment="edited body" Text="At the moment the transaction fee is payed as the native token in the substrate node template. When I create a new asset_id(say BAT) a fungible asset using pallet_assets, How can I now pay the transaction fees using this BAT token?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14125" PostHistoryTypeId="2" PostId="3762" RevisionGUID="b8562bc1-1cb2-46f6-87e4-1b35f5ab7baf" CreationDate="2022-07-14T19:51:21.017" UserId="555" Text="I'm facing this issue after starting parachain: [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Note: I have changed the consensus mechanism from **aura to nimbus**(moonbeam use this).&#xD;&#xA;&#xD;&#xA;Can anyone please help me to solve this issue ?&#xD;&#xA;Thanks in advance !&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xIDKA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14127" PostHistoryTypeId="1" PostId="3762" RevisionGUID="b8562bc1-1cb2-46f6-87e4-1b35f5ab7baf" CreationDate="2022-07-14T19:51:21.017" UserId="555" Text="How to solve the error of 'Block invalid'" ContentLicense="CC BY-SA 4.0" />
  <row Id="14128" PostHistoryTypeId="3" PostId="3762" RevisionGUID="b8562bc1-1cb2-46f6-87e4-1b35f5ab7baf" CreationDate="2022-07-14T19:51:21.017" UserId="555" Text="|polkadot-js|parachain|parachain-collator|moonbeam|nimbus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14129" PostHistoryTypeId="52" PostId="3751" RevisionGUID="233ebe7f-5661-4310-88a8-122865d82840" CreationDate="2022-07-14T20:52:34.910" />
  <row Id="14130" PostHistoryTypeId="2" PostId="3763" RevisionGUID="a5fdd6c4-e985-4019-897c-d282f761ea9d" CreationDate="2022-07-14T21:50:24.550" UserId="2089" Text="StorageKey keyword mentioned in the RPC substrate docs and polkadotJS RPC API docs&#xD;&#xA;https://polkadot.js.org/docs/substrate/rpc#getkeyskey-storagekey-at-blockhash-vecstoragekey&#xD;&#xA;&#xD;&#xA;How to get this StorageKey?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14132" PostHistoryTypeId="1" PostId="3763" RevisionGUID="a5fdd6c4-e985-4019-897c-d282f761ea9d" CreationDate="2022-07-14T21:50:24.550" UserId="2089" Text="How to get StorageKey associated with an address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14133" PostHistoryTypeId="3" PostId="3763" RevisionGUID="a5fdd6c4-e985-4019-897c-d282f761ea9d" CreationDate="2022-07-14T21:50:24.550" UserId="2089" Text="|polkadot-js|rpc|api|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14134" PostHistoryTypeId="2" PostId="3764" RevisionGUID="87fb1d66-092d-4da9-a8cc-1ae5fc48a9c1" CreationDate="2022-07-14T22:14:06.847" UserId="29" Text="Great question!&#xD;&#xA;&#xD;&#xA;If you have a prefix of a storage key that you are looking for, you can specify in the first argument like so:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/FBrZN.png)&#xD;&#xA;&#xD;&#xA;&gt; Note that if you specify `0x` you will get all the keys!&#xD;&#xA;&#xD;&#xA;If you want to know how the storage keys are created I recommend reading:&#xD;&#xA;- https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="14136" PostHistoryTypeId="2" PostId="3765" RevisionGUID="545f573f-56e2-4c1c-965e-d80a12a78db2" CreationDate="2022-07-15T00:25:44.980" UserId="2842" Text="For my dapp I need storage which can reference a mutable amount of events, all of which have their own orderbook. Expanded, it looks something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;CoreStorage {&#xD;&#xA;    coin_storage: CoinStore, //not the issue&#xD;&#xA;    event_storage: {&#xD;&#xA;        event_type_1: Mapping&lt;EventId, EventType1&gt;,&#xD;&#xA;        event_type_2: Mapping&lt;EventId, EventType2&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;EventType1 {&#xD;&#xA;    event_info: EventInfo,&#xD;&#xA;    event_orderbook: EventOrderBook //where the issue lies&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;EventOrderbook {&#xD;&#xA;    orders_0: Mapping&lt;AccountId, Order&gt;, //this is impossible from what I can tell&#xD;&#xA;    orders_1: Mapping&lt;AccountId, Order&gt; &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Nested `Mapping` structures are not supported by design. Likely the final data structure will not be a `Mapping` type, something much more performant for sorted lookups, but regardless it will not be able to adhere to the `PackedLayout` trait (this is just what I assume with my current knowledge).&#xD;&#xA;&#xD;&#xA;My only thought I have to make this work is to have a separate smart contract for every `EventOrderbook` that communicates back to the main smart contract, so the storage structure will be replaced with something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use event_contract::EventContract&#xD;&#xA;&#xD;&#xA;EventType1 {&#xD;&#xA;    event_info: EventInfo,&#xD;&#xA;    event_contract: EventContract&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and in another crate I would have a contract that is compiled as a dependency that I can instantiate when I instantiate this main contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is this the correct approach? Or is there some more efficient way I should be doing this?&#xD;&#xA;&#xD;&#xA;Thank you! Any help or documentation would be appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="14138" PostHistoryTypeId="1" PostId="3765" RevisionGUID="545f573f-56e2-4c1c-965e-d80a12a78db2" CreationDate="2022-07-15T00:25:44.980" UserId="2842" Text="Contract storage contains nested orderbooks" ContentLicense="CC BY-SA 4.0" />
  <row Id="14139" PostHistoryTypeId="3" PostId="3765" RevisionGUID="545f573f-56e2-4c1c-965e-d80a12a78db2" CreationDate="2022-07-15T00:25:44.980" UserId="2842" Text="|ink|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14140" PostHistoryTypeId="5" PostId="3759" RevisionGUID="4ed721f8-5dbc-42f2-9b1a-fc4e8a4c92c9" CreationDate="2022-07-15T04:26:16.420" UserId="1789" Comment="deleted 92 characters in body" Text="The Substrate team(https://github.com/paritytech/substrate/) produces releases like polkadot-v0.9.25 every a few weeks,&#xD;&#xA;and my team needs to upgrade our parachain to follow those Substrate versions.&#xD;&#xA;&#xD;&#xA;My parachain also uses Frontier (https://github.com/paritytech/frontier/), which uses Substrate as a dependency.&#xD;&#xA;&#xD;&#xA;Because Frontier team does not produce a version for each new Substrate version, I have to fix the Frontier code to use a desired substrate version.&#xD;&#xA;&#xD;&#xA;I am aware of @JoshOrndorff's tutorial about how to add Frontier into a Substrate Node Template:&#xD;&#xA;https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021, but that is more than 1 year ago.&#xD;&#xA;&#xD;&#xA;Now I have a few options:&#xD;&#xA;1) Use the commit or branch that has the Substrate version I want: ... This is not good because those available versions are very limited&#xD;&#xA;&#xD;&#xA;2) Copy the latest code from the Frontier master branch, then update the Substrate version: ... This is not good as you can see the errors I got below&#xD;&#xA;&#xD;&#xA;Which option is better?&#xD;&#xA;&#xD;&#xA;And how can I upgrade or update the Substrate dependencies?&#xD;&#xA;&#xD;&#xA;I tried to copy the latest Frontier code from its master branch, then replace the Substrate version to the one I want, then I got these errors:&#xD;&#xA;```&#xD;&#xA;➜  frontier-zmod git:(polkadot-v0.9.24) ✗ cargo check                               &#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;    Updating crates.io index&#xD;&#xA;error: failed to select a version for `syn`.&#xD;&#xA;    ... required by package `frame-support-procedural v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.24#814752f6)`&#xD;&#xA;    ... which satisfies git dependency `frame-support-procedural` of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.24#814752f6)`&#xD;&#xA;    ... which satisfies git dependency `frame-support` of package `fp-ethereum v1.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/primitives/ethereum)`&#xD;&#xA;    ... which satisfies path dependency `fp-ethereum` (locked to 1.0.0-dev) of package `pallet-ethereum v4.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/frame/ethereum)`&#xD;&#xA;    ... which satisfies path dependency `pallet-ethereum` (locked to 4.0.0-dev) of package `frontier-template-runtime v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/runtime)`&#xD;&#xA;    ... which satisfies path dependency `frontier-template-runtime` (locked to 0.0.0) of package `fc-cli v1.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/cli)`&#xD;&#xA;    ... which satisfies path dependency `fc-cli` (locked to 1.0.0-dev) of package `frontier-template-node v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/node)`&#xD;&#xA;versions that meet the requirements `^1.0.98` are: 1.0.98&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `syn v1.0.96`&#xD;&#xA;    ... which satisfies dependency `syn = &quot;^1.0.96&quot;` (locked to 1.0.96) of package `async-trait v0.1.56`&#xD;&#xA;    ... which satisfies dependency `async-trait = &quot;^0.1&quot;` (locked to 0.1.56) of package `fc-consensus v2.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/consensus)`&#xD;&#xA;    ... which satisfies path dependency `fc-consensus` (locked to 2.0.0-dev) of package `frontier-template-node v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `syn` which could resolve this conflict&#xD;&#xA;➜  frontier-zmod git:(polkadot-v0.9.24) ✗ cargo update -p syn --precise 1.0.98      &#xD;&#xA;    Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;error: failed to select a version for `arrayvec`.&#xD;&#xA;    ... required by package `libp2p-kad v0.37.1`&#xD;&#xA;    ... which satisfies dependency `libp2p-kad = &quot;^0.37.1&quot;` of package `libp2p v0.45.1`&#xD;&#xA;    ... which satisfies dependency `libp2p = &quot;^0.45.1&quot;` of package `sc-cli v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.24#814752f6)`&#xD;&#xA;    ... which satisfies git dependency `sc-cli` of package `fc-cli v1.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/cli)`&#xD;&#xA;    ... which satisfies path dependency `fc-cli` (locked to 1.0.0-dev) of package `frontier-template-node v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/node)`&#xD;&#xA;versions that meet the requirements `^0.7.2` are: 0.7.2&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `arrayvec v0.7.1`&#xD;&#xA;    ... which satisfies dependency `arrayvec = &quot;^0.7.1&quot;` (locked to 0.7.1) of package `jsonrpsee-core v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee-core = &quot;^0.13.1&quot;` (locked to 0.13.1) of package `jsonrpsee v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee = &quot;^0.13.0&quot;` (locked to 0.13.1) of package `fc-rpc v2.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/rpc)`&#xD;&#xA;    ... which satisfies path dependency `fc-rpc` (locked to 2.0.0-dev) of package `frontier-template-node v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `arrayvec` which could resolve this conflict&#xD;&#xA;➜  frontier-zmod git:(polkadot-v0.9.24) ✗ cargo update -p arrayvec:0.4.12 --precise 0.7.2&#xD;&#xA;    Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;error: failed to select a version for the requirement `arrayvec = &quot;^0.4.6&quot;`&#xD;&#xA;candidate versions found which didn't match: 0.7.2&#xD;&#xA;location searched: crates.io index&#xD;&#xA;required by package `blake2-rfc v0.2.18`&#xD;&#xA;    ... which satisfies dependency `blake2-rfc = &quot;^0.2.18&quot;` (locked to 0.2.18) of package `sp-core v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.24#814752f6)`&#xD;&#xA;    ... which satisfies git dependency `sp-core` of package `fc-db v2.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/db)`&#xD;&#xA;    ... which satisfies path dependency `fc-db` (locked to 2.0.0-dev) of package `fc-cli v1.0.0-dev (/mnt/sda3/polkadot/frontier-zmod/client/cli)`&#xD;&#xA;    ... which satisfies path dependency `fc-cli` (locked to 1.0.0-dev) of package `frontier-template-node v0.0.0 (/mnt/sda3/polkadot/frontier-zmod/template/node)`&#xD;&#xA;```&#xD;&#xA;How can I upgrade the Substrate dependency?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14141" PostHistoryTypeId="6" PostId="3762" RevisionGUID="aee1f570-a22a-4a76-a674-973abd4d7303" CreationDate="2022-07-15T04:40:43.490" UserId="627" Comment="edited tags" Text="|parachain|parachain-collator|moonbeam|nimbus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14142" PostHistoryTypeId="2" PostId="3766" RevisionGUID="8f0cd13e-7428-4595-b268-cc705be0e218" CreationDate="2022-07-15T05:45:29.623" UserId="1789" Text="Inside the Frontier repo, I found this template folder:&#xD;&#xA;https://github.com/paritytech/frontier/tree/master/template&#xD;&#xA;&#xD;&#xA;and its Readme says: `This template is maintained in the Frontier project repository, and can be used to generate a stand-alone template for use in an independent project via the included template generation script.`... This is Option 1. That is to manually run that script.&#xD;&#xA;&#xD;&#xA;But then further down that Readme, it says `To build the chain, execute the following commands from the project root:...` this is Option 2. That is to build it via `cargo build --release`&#xD;&#xA;&#xD;&#xA;Also I am aware of @JoshOrndorff's tutorial about how to add Frontier into a Substrate Node Template: https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021, but that is a few months old. This is Option 3: that is to add Frontier code to the latest Substrate Node Template... &#xD;&#xA;&#xD;&#xA;I am very confused by those options. &#xD;&#xA;&#xD;&#xA;After fixing the Frontier with the correct Substrate version I need, how can I build a demo for running Ethereum smart contracts?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14144" PostHistoryTypeId="1" PostId="3766" RevisionGUID="8f0cd13e-7428-4595-b268-cc705be0e218" CreationDate="2022-07-15T05:45:29.623" UserId="1789" Text="How to make a Frontier demo for running Ethereum smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14145" PostHistoryTypeId="3" PostId="3766" RevisionGUID="8f0cd13e-7428-4595-b268-cc705be0e218" CreationDate="2022-07-15T05:45:29.623" UserId="1789" Text="|frontier|ethereum|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14146" PostHistoryTypeId="2" PostId="3767" RevisionGUID="47fda9cf-50da-4274-ae6c-da0e5711023f" CreationDate="2022-07-15T06:02:45.090" UserId="627" Text="You can also use the apps UI to create keys, generally if these are single items this is a quick approach. In the apps UI via the storage page, you can see the encoded keys based on the input parameters (along with a breakdown on the right as to which component is due to which part)&#xD;&#xA;&#xD;&#xA;[![generating keys via apps UI][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sWxnr.png&#xD;&#xA;&#xD;&#xA;Additionally (and this is most probably not applicable for your case, however I'm including it here for future reference), you can also do it programatically via the JS API.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;console.log(&#xD;&#xA;  // each api.query.&lt;module&gt;.&lt;method&gt; has .key exposed that&#xD;&#xA;  // generates an encoded storage key&#xD;&#xA;  api.query.system.account.key(&#xD;&#xA;    // any parameters that you would need&#xD;&#xA;    '1363HWTPzDrzAQ6ChFiMU6mP4b6jmQid2ae55JQcKtZnpLGv'&#xD;&#xA;  )&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The above would output the same details as found in the apps UI screenshot above, i.e `0x26aa...2f28 ` which is the key for that specific account at this storage location." ContentLicense="CC BY-SA 4.0" />
  <row Id="14148" PostHistoryTypeId="5" PostId="3767" RevisionGUID="9edb56e1-878e-4c74-a63d-e9ccb9e51c50" CreationDate="2022-07-15T06:10:34.790" UserId="627" Comment="Correct screenshot for system.account" Text="You can also use the apps UI to create keys, generally if these are single items this is a quick approach. In the apps UI via the storage page, you can see the encoded keys based on the input parameters (along with a breakdown on the right as to which component is due to which part)&#xD;&#xA;&#xD;&#xA;[![system.account query][1]][1]&#xD;&#xA;&#xD;&#xA;Additionally (and this is most probably not applicable for your case, however I'm including it here for future reference), you can also do it programatically via the JS API.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;console.log(&#xD;&#xA;  // each api.query.&lt;module&gt;.&lt;method&gt; has .key exposed that&#xD;&#xA;  // generates an encoded storage key&#xD;&#xA;  api.query.system.account.key(&#xD;&#xA;    // any parameters that you would need&#xD;&#xA;    '1363HWTPzDrzAQ6ChFiMU6mP4b6jmQid2ae55JQcKtZnpLGv'&#xD;&#xA;  )&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The above would output the same details as found in the apps UI screenshot above, i.e `0x26aa...2f28 ` which is the key for that specific account at this storage location.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6KRau.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14149" PostHistoryTypeId="2" PostId="3768" RevisionGUID="3f533f2e-8b7c-46a4-b736-ff702f4fcded" CreationDate="2022-07-15T06:59:06.313" UserId="2668" Text="I query all events, and decode the event a known type, but maybe some write them cause error, how to parse the event&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    pub fn decode_event(data: &amp;str) -&gt; Result&lt;String&gt; {&#xD;&#xA;        let mut vec = Vec::from_hex(data)?;&#xD;&#xA;        let events = Vec::&lt;EventRecord&lt;Event, H256&gt;&gt;::decode(&amp;mut vec.as_slice())?;&#xD;&#xA;        ...&#xD;&#xA;        Event::frame_system(fs) =&gt; {&#xD;&#xA;                m_event.module = &quot;System&quot;.to_string();&#xD;&#xA;                match *fs {&#xD;&#xA;                    frame_system::RawEvent::&lt;node_runtime::AccountId&gt;::ExtrinsicSuccess(d) =&gt; {&#xD;&#xA;                        m_event.event = &quot;ExtrinsicSuccess&quot;.to_string();&#xD;&#xA;                    }&#xD;&#xA;                    _ =&gt; {&#xD;&#xA;                        println!(&quot;dddd:{:?}&quot;,fs);&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;there is a build error:&#xD;&#xA;&#xD;&#xA;     match *fs {&#xD;&#xA;                          --- this expression has type `frame_system::RawEvent&lt;sp_core::crypto::AccountId32&gt;`&#xD;&#xA;                    frame_system::RawEvent::&lt;node_runtime::AccountId&gt;::ExtrinsicSuccess(d) =&gt; {&#xD;&#xA;                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `frame_system::RawEvent`, found a different enum `frame_system::RawEvent`&#xD;&#xA;&#xD;&#xA;    = note: expected enum `frame_system::RawEvent&lt;sp_core::crypto::AccountId32&gt;` (enum `frame_system::RawEvent`)&#xD;&#xA;    found enum `frame_system::RawEvent&lt;sp_core::crypto::AccountId32&gt;` (enum `frame_system::RawEvent`)&#xD;&#xA;    = note: perhaps two different versions of crate `frame_system` are being used?&#xD;&#xA;&#xD;&#xA;&gt; Blockquote" ContentLicense="CC BY-SA 4.0" />
  <row Id="14151" PostHistoryTypeId="1" PostId="3768" RevisionGUID="3f533f2e-8b7c-46a4-b736-ff702f4fcded" CreationDate="2022-07-15T06:59:06.313" UserId="2668" Text="how to confirm a event type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14152" PostHistoryTypeId="3" PostId="3768" RevisionGUID="3f533f2e-8b7c-46a4-b736-ff702f4fcded" CreationDate="2022-07-15T06:59:06.313" UserId="2668" Text="|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14153" PostHistoryTypeId="5" PostId="3756" RevisionGUID="b2196417-c8f5-4acf-a9cd-49b4b80b01c0" CreationDate="2022-07-15T07:00:06.790" UserId="85" Comment="added 202 characters in body" Text="A *sufficient* asset is one that is marked as valuable enough to be able to pay fees in that asset rather than having to use the native asset. Note at the moment there may be a cost to this convenience." ContentLicense="CC BY-SA 4.0" />
  <row Id="14154" PostHistoryTypeId="24" PostId="3756" RevisionGUID="b2196417-c8f5-4acf-a9cd-49b4b80b01c0" CreationDate="2022-07-15T07:00:06.790" Comment="Proposed by 85 approved by 34 edit id of 241" ContentLicense="CC BY-SA 4.0" />
  <row Id="14155" PostHistoryTypeId="52" PostId="3763" RevisionGUID="c2b58dc4-c3a9-4cac-af88-5a0e5ee9eabc" CreationDate="2022-07-15T07:40:29.430" />
  <row Id="14156" PostHistoryTypeId="2" PostId="3769" RevisionGUID="ecfbd9e4-dfe3-4388-a479-cf86143b30a6" CreationDate="2022-07-15T10:10:44.290" UserId="85" Text="You could in `collator-selection` `set desired candidates` to a higher number to allow others to post a bond and become collators. If you look at statemine/t for example they currently have as many external collators as invulnerable collators. In order for a new collator to come online this way they must first be part of the current session (i.e. not only does it need to register for the next session but that next session needs to have started before you can register as a collator.)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14158" PostHistoryTypeId="2" PostId="3770" RevisionGUID="4cde168e-869c-4464-8f02-a8e481fc21e4" CreationDate="2022-07-15T10:29:11.733" UserId="85" Text="If by direct you mean XCMP that is implemented without the full message going via the relay chain, then no that is not yet possible. It's on the roadmap after XCM v3 I believe, but the way things are coded, when this optimisation lands, it should not alter the existing APIs, it should just make XCMP message sending cheaper and more scaleable." ContentLicense="CC BY-SA 4.0" />
  <row Id="14160" PostHistoryTypeId="2" PostId="3771" RevisionGUID="a173c5b2-6869-4096-a612-42c9f15d1c74" CreationDate="2022-07-15T10:36:41.233" UserId="2882" Text="When I build subtrate node template with below libary, this issue is happened. How to fix that. I use rust: 1.64.0 and nightly-2022-07-14 (stable now).&#xD;&#xA;Polkadot version: 0.9.24&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/P6XMt.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14162" PostHistoryTypeId="1" PostId="3771" RevisionGUID="a173c5b2-6869-4096-a612-42c9f15d1c74" CreationDate="2022-07-15T10:36:41.233" UserId="2882" Text="sp-npos-elections compile error in polkadot-v0.9.24" ContentLicense="CC BY-SA 4.0" />
  <row Id="14163" PostHistoryTypeId="3" PostId="3771" RevisionGUID="a173c5b2-6869-4096-a612-42c9f15d1c74" CreationDate="2022-07-15T10:36:41.233" UserId="2882" Text="|bug|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14164" PostHistoryTypeId="2" PostId="3772" RevisionGUID="77495467-03cd-4071-b283-99049bee71f1" CreationDate="2022-07-15T10:56:41.660" UserId="1789" Text="[Solved] here are the steps to take:&#xD;&#xA;&#xD;&#xA;Go into the Frontier repo&#xD;&#xA;&#xD;&#xA;Fix the Substrate version to what you need: like polkadot-v0.9.24&#xD;&#xA;&#xD;&#xA;Then build it and run it:&#xD;&#xA;```&#xD;&#xA;cargo build --release&#xD;&#xA;./target/release/frontier-template-node --dev&#xD;&#xA;```&#xD;&#xA;That runs a chain based on Substrate Node Template.&#xD;&#xA;The hidden port is actually 9933, so here is the correct URL to connect your Ethereum tools to the running chain:&#xD;&#xA;```&#xD;&#xA;      url: &quot;http://127.0.0.1:9933&quot;,&#xD;&#xA;      chainId: 42,&#xD;&#xA;```&#xD;&#xA;I have no idea why the chainId was set to 42, which is the same chainId of the Ethereum Kovan network.&#xD;&#xA;&#xD;&#xA;So you can change the chainId here: `template/runtime/src/lib.rs`" ContentLicense="CC BY-SA 4.0" />
  <row Id="14166" PostHistoryTypeId="2" PostId="3773" RevisionGUID="bed47cab-82e6-44b8-89b3-9e7688c4e19a" CreationDate="2022-07-15T11:08:26.210" UserId="121" Text="I am trying to use [`sp_tracing::within_span!`][1] to instrument my code in the pallet. The next step is to configure a proper TracingSubscriber to pick up the span information, but the usual default [tracing_subscriber::fmt][2] depends on `std` library. So how would one go on configuring the proper TracingSubscriber to be used in runtime pallets, or how would one implement a `no-std` TracingSubscriber?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_tracing/macro.within_span.html&#xD;&#xA;  [2]: https://docs.rs/tracing-subscriber/0.3.14/tracing_subscriber/fmt/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="14168" PostHistoryTypeId="1" PostId="3773" RevisionGUID="bed47cab-82e6-44b8-89b3-9e7688c4e19a" CreationDate="2022-07-15T11:08:26.210" UserId="121" Text="How to configure the TracingSubscriber when using sp_tracing within a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14169" PostHistoryTypeId="3" PostId="3773" RevisionGUID="bed47cab-82e6-44b8-89b3-9e7688c4e19a" CreationDate="2022-07-15T11:08:26.210" UserId="121" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14170" PostHistoryTypeId="5" PostId="3772" RevisionGUID="f9a970b4-058b-4e36-8e67-ed8a3f88e22f" CreationDate="2022-07-15T11:25:31.737" UserId="1789" Comment="added 303 characters in body" Text="[Solved] here are the steps to take:&#xD;&#xA;&#xD;&#xA;Go into the Frontier repo&#xD;&#xA;&#xD;&#xA;Fix the Substrate version to what you need: like polkadot-v0.9.24&#xD;&#xA;&#xD;&#xA;Then build it and run it:&#xD;&#xA;```&#xD;&#xA;cargo build --release&#xD;&#xA;./target/release/frontier-template-node --dev&#xD;&#xA;```&#xD;&#xA;That runs a chain based on Substrate Node Template.&#xD;&#xA;The hidden port is actually 9933, so here is the correct URL to connect your Ethereum tools to the running chain:&#xD;&#xA;```&#xD;&#xA;      url: &quot;http://127.0.0.1:9933&quot;,&#xD;&#xA;      chainId: 42,&#xD;&#xA;```&#xD;&#xA;I have no idea why the chainId was set to 42, which is the same chainId of the Ethereum Kovan network.&#xD;&#xA;&#xD;&#xA;So you can change the chainId here: `template/runtime/src/lib.rs`&#xD;&#xA;&#xD;&#xA;To clarify when to use the Frontier's template folder:&#xD;&#xA;- If you have another repo that uses Frontier as a dependency, then use Option 1 above with Josh's video.&#xD;&#xA;- If you want to run Ethereum smart contracts inside a substrate based chain with minimum effort, use Option 2 above and my steps above." ContentLicense="CC BY-SA 4.0" />
  <row Id="14175" PostHistoryTypeId="5" PostId="3772" RevisionGUID="604db27a-bda9-4d91-81d9-427340692d12" CreationDate="2022-07-15T14:19:16.143" UserId="1789" Comment="added 350 characters in body" Text="[Solved] here are the steps to take:&#xD;&#xA;&#xD;&#xA;Go into the Frontier repo&#xD;&#xA;&#xD;&#xA;Fix the Substrate version to what you need: like polkadot-v0.9.24&#xD;&#xA;&#xD;&#xA;Open this file repo/template/runtime/src/lib.rs&#xD;&#xA;&#xD;&#xA;Change your default chainId from 42 to something else, for example 1942. Because 42 is also the Kovan's chainId. I have no idea why the chainId was set to 42.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then build it and run it:&#xD;&#xA;```&#xD;&#xA;cargo build --release&#xD;&#xA;./target/release/frontier-template-node --dev&#xD;&#xA;```&#xD;&#xA;That runs a chain based on Substrate Node Template.&#xD;&#xA;&#xD;&#xA;The hidden port is actually 9933, so here is the correct URL to connect your MetaMask, Hardhat, Remix to the running chain.&#xD;&#xA;```&#xD;&#xA;      url: &quot;http://127.0.0.1:9933&quot;,&#xD;&#xA;      chainId: 42,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Setup your Polkadot UI&#xD;&#xA;&#xD;&#xA;Open Polkadot UI in your browser at https://polkadot.js.org/apps/#?rpc=ws://127.0.0.1:9944&#xD;&#xA;&#xD;&#xA;Copy the polkadot UI setting at https://github.com/paritytech/frontier/tree/master/template&#xD;&#xA;&#xD;&#xA;Go to Polkadot UI &gt; Settings &gt; Developer tab:&#xD;&#xA;Paste the copied setting&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### To clarify when to use the Frontier's template folder:&#xD;&#xA;- If you have another repo that uses Frontier as a dependency, then use Option 1 above with Josh's video.&#xD;&#xA;- If you want to run Ethereum smart contracts inside a substrate based chain with minimum effort, use Option 2 above and my steps above." ContentLicense="CC BY-SA 4.0" />
  <row Id="14177" PostHistoryTypeId="2" PostId="3775" RevisionGUID="1e336df1-f477-4ddf-a87b-c0674ac1d0ad" CreationDate="2022-07-15T14:37:11.557" UserId="494" Text="[Chain Extensions](https://ink.substrate.io/macros-attributes/chain-extension/) are the main way to have contracts interact with the runtime (not the other way around).&#xD;&#xA;&#xD;&#xA;However, for an interaction with the native token, [`ink_env::transfer`](https://paritytech.github.io/ink/ink_env/fn.transfer.html) might be sufficient.&#xD;&#xA;&#xD;&#xA;Also, check `give_me` function in the [contract-transfer](https://github.com/paritytech/ink/blob/master/examples/contract-transfer/lib.rs) example." ContentLicense="CC BY-SA 4.0" />
  <row Id="14179" PostHistoryTypeId="4" PostId="3765" RevisionGUID="0c395838-4366-41cb-a917-6677fb01983a" CreationDate="2022-07-15T16:25:37.343" UserId="2842" Comment="edited title" Text="Contract storage needs nested orderbooks; best practice way to structure dapp?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14180" PostHistoryTypeId="2" PostId="3776" RevisionGUID="75f283f8-d372-4ccf-87b5-85c82c8178dd" CreationDate="2022-07-15T19:43:07.120" UserId="29" Text="Looks like the compiler is asking for `sp_std::vec`&#xD;&#xA;&#xD;&#xA;Try adding the following to your .toml file:&#xD;&#xA;```toml&#xD;&#xA;sp-std = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.24&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	....&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;    ....&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14183" PostHistoryTypeId="6" PostId="3717" RevisionGUID="fec39ffe-44ab-4a58-9f25-ae318b5607aa" CreationDate="2022-07-15T20:44:26.223" UserId="29" Comment="edited tags" Text="|frame|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14184" PostHistoryTypeId="2" PostId="3777" RevisionGUID="0764d792-d6fb-468e-a3a4-855b07ce8383" CreationDate="2022-07-15T21:06:13.167" UserId="275" Text="@joepetrowski&#xD;&#xA;Could you teach me why there was fishermen role initially considered to be needed and the reason it is no more exists at high level? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14186" PostHistoryTypeId="5" PostId="3777" RevisionGUID="17127b26-f0f9-4bc8-8497-5af1499d6505" CreationDate="2022-07-15T21:23:41.147" UserId="275" Comment="added 723 characters in body" Text="@joepetrowski&#xD;&#xA;Could you teach me why there was fishermen role initially considered to be needed and the reason it is no more exists at a high level? &#xD;&#xA;&#xD;&#xA;According to the article you put above,&#xD;&#xA;&#xD;&#xA;&gt; The availability check by the block author ensures that Polkadot will only include blocks for which the validators distributed their chunks, but it does not guarantee their validity. Because the number of validators on each parachain is so low, collusion is a reasonable concern. By separating block production (BABE) from finality (GRANDPA), Polkadot can perform extra validity checks after a block is produced but before it is finalized.[3] Polkadot has special actors, fishermen, who patrol Relay Chain blocks for invalid candidate receipts.&#xD;&#xA;&#xD;&#xA;Fishermen were taking great responsibility for validity checks by pointing out potential fraud. What is the alternative which can ensure validity now?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14187" PostHistoryTypeId="5" PostId="3777" RevisionGUID="23ccb92c-7f50-4ec1-9ac0-4803ab88f00c" CreationDate="2022-07-15T22:54:05.463" UserId="275" Comment="deleted 21 characters in body" Text="@joepetrowski&#xD;&#xA;Could you teach me why there was fishermen role initially considered to be needed and the reason it is no more exists at a high level? &#xD;&#xA;&#xD;&#xA;According to the article you put above,&#xD;&#xA;&#xD;&#xA;&gt; The availability check by the block author ensures that Polkadot will only include blocks for which the validators distributed their chunks, but it does not guarantee their validity. Because the number of validators on each parachain is so low, collusion is a reasonable concern. By separating block production (BABE) from finality (GRANDPA), Polkadot can perform extra validity checks after a block is produced but before it is finalized.[3] Polkadot has special actors, fishermen, who patrol Relay Chain blocks for invalid candidate receipts.&#xD;&#xA;&#xD;&#xA;Fishermen were taking great responsibility for validity checks by pointing out potential fraud. What is the alternative for this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14188" PostHistoryTypeId="2" PostId="3778" RevisionGUID="4ea09ed9-7ee6-47f9-a82e-cb4e7ec9f0ea" CreationDate="2022-07-15T23:20:23.347" UserId="2485" Text="Could you please tell me how convert a queryResult from Substrate storage into js object?&#xD;&#xA;&#xD;&#xA;i use these two functions to get the object from chain into js object&#xD;&#xA;&#xD;&#xA;1) queryResult.toHuman() function, but it adds commas to numbers of u64 type, although it parses strings as text&#xD;&#xA;&#xD;&#xA;2) queryResult.toJSON() makes all strings hex &#xD;&#xA;&#xD;&#xA;In polkadot/api package version 8.12.2 when specifying types for ApiPromise, all the string processed by the package are hex strings. My struct on chain is&#xD;&#xA;Example: {&#xD;&#xA;  field: Vec&lt;u8&gt;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;it used to be that if i were to specify to pass into ApiPromise&#xD;&#xA;Example: {&#xD;&#xA;  field: &quot;Text&quot;&#xD;&#xA;}&#xD;&#xA;it would automatically transform from a hex to a string when specified in types.&#xD;&#xA;&#xD;&#xA;Now, doesn't matter if i say field: &quot;Text&quot; or   field: &quot;Vec&lt;u8&gt;&quot; in types on js client side, the string parsed by a library is a hex. I also noticed that i don't need to specify example struct in types at all, it will return me the object from the chain, even though in the past it wouldn't be able to read it. I have just  recently updated substrate node to a version 0.9.24.&#xD;&#xA;&#xD;&#xA;Could you please tell me if this behavior is normal for the latest versions of polkadot js api and substrate? Is there a way to specify on js side how to parse a Vec&lt;u8&gt; field from the node: as a hex or as a string? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14190" PostHistoryTypeId="1" PostId="3778" RevisionGUID="4ea09ed9-7ee6-47f9-a82e-cb4e7ec9f0ea" CreationDate="2022-07-15T23:20:23.347" UserId="2485" Text="js polkadot/api reading objects from the chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="14191" PostHistoryTypeId="3" PostId="3778" RevisionGUID="4ea09ed9-7ee6-47f9-a82e-cb4e7ec9f0ea" CreationDate="2022-07-15T23:20:23.347" UserId="2485" Text="|polkadot-js|custom-types|json|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14192" PostHistoryTypeId="5" PostId="3778" RevisionGUID="2efa68bf-558f-4d8e-b980-42ed41af5a96" CreationDate="2022-07-15T23:45:03.913" UserId="2485" Comment="added 78 characters in body" Text="Could you please tell me how convert a queryResult from Substrate storage into js object?&#xD;&#xA;&#xD;&#xA;i use these two functions to get the object from chain into js object&#xD;&#xA;&#xD;&#xA;1) queryResult.toHuman() function, but it adds commas to numbers of u64 type, although it parses strings as text&#xD;&#xA;&#xD;&#xA;2) queryResult.toJSON() makes all strings hex &#xD;&#xA;&#xD;&#xA;In polkadot/api package version 8.12.2 when specifying types for ApiPromise, all the string processed by the package are hex strings. My struct on chain is&#xD;&#xA;Example: {&#xD;&#xA;  field: Vec&lt;u8&gt;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;it used to be that if i were to specify to pass into ApiPromise&#xD;&#xA;Example: {&#xD;&#xA;  field: &quot;Text&quot;&#xD;&#xA;}&#xD;&#xA;it would automatically transform from a hex to a string when specified in types.&#xD;&#xA;&#xD;&#xA;Now, doesn't matter if i say field: &quot;Text&quot; or   field: &quot;Vec&lt;u8&gt;&quot; in types on js client side, the string parsed by a library is a hex. I also noticed that i don't need to specify example struct in types at all, it will return me the object from the chain, even though in the past it wouldn't be able to read it. I have just  recently updated substrate node to a version 0.9.24.&#xD;&#xA;&#xD;&#xA;Could you please tell me if this behavior is normal for the latest versions of polkadot js api and substrate? Is there a way to specify on js side how to parse a Vec&lt;u8&gt; field from the node: as a hex or as a string? &#xD;&#xA;&#xD;&#xA;.toHuman() function returns strings but commas in numbers aren't desirable&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14193" PostHistoryTypeId="5" PostId="3777" RevisionGUID="39293a79-e64e-4081-90c2-95d092139858" CreationDate="2022-07-16T00:04:10.527" UserId="275" Comment="deleted 2 characters in body" Text="@joepetrowski&#xD;&#xA;Could you teach me why there was fishermen role initially considered to be needed and the reason it is no more exists at high level? &#xD;&#xA;&#xD;&#xA;According to the article you put above,&#xD;&#xA;&#xD;&#xA;&gt; The availability check by the block author ensures that Polkadot will only include blocks for which the validators distributed their chunks, but it does not guarantee their validity. Because the number of validators on each parachain is so low, collusion is a reasonable concern. By separating block production (BABE) from finality (GRANDPA), Polkadot can perform extra validity checks after a block is produced but before it is finalized.[3] Polkadot has special actors, fishermen, who patrol Relay Chain blocks for invalid candidate receipts.&#xD;&#xA;&#xD;&#xA;Fishermen were taking great responsibility for validity checks by pointing out potential fraud. What is the alternative for this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14195" PostHistoryTypeId="5" PostId="3640" RevisionGUID="9d567b39-bc06-441e-975e-d59af27d0191" CreationDate="2022-07-16T02:06:33.650" UserId="2854" Comment="added 553 characters in body" Text="The setup is:&#xD;&#xA;- polkadot-launch&#xD;&#xA;- 1 relay chain: polkadot-0.9.18 rococo&#xD;&#xA;- 2 parachains: moonbeam-0.24.0 moonbase-local&#xD;&#xA;  - paraId 1000&#xD;&#xA;  - paraId 1001&#xD;&#xA;- open hrmp channel via polkadot-launch&#xD;&#xA;&#xD;&#xA;Transferring DOT between Relay chain and parachain is ok:&#xD;&#xA;1. `assetManager.registerForeignAsset`&#xD;&#xA;2. `assetManager.setAssetUnitsPerSecond`&#xD;&#xA;3. relay chain -&gt; parachain `xcmPallet.limitedReserveTransferAssets`&#xD;&#xA;4. parachain -&gt; relay chain `xtokens.transfer`&#xD;&#xA;&#xD;&#xA;However, transferring parachain native token between 2 Moonbeam parachains is failed:&#xD;&#xA;parachain 1001 -&gt; parachain 1000&#xD;&#xA;1. On parachain 1000:&#xD;&#xA;`assetManager.registerForeignAsset`&#xD;&#xA;2. On parachain 1000: `assetManager.setAssetUnitsPerSecond`&#xD;&#xA;3. On parachain 1001:&#xD;&#xA;`xTokens.transfer` This step failed.&#xD;&#xA;&#xD;&#xA;The sender parachain 1001 successfully send the xcm message, but receiver parachain 1000 throw an error when executing this message.&#xD;&#xA;&#xD;&#xA;Maybe the xcm multilocation is wrong.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;The error log of receiver parachain 1000 is as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-07-07 11:14:00.028 TRACE tokio-runtime-worker xcm::should_execute: [] &#xD;&#xA;did not pass barrier: &#xD;&#xA;origin: &#xD;&#xA;    MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, &#xD;&#xA;message: &#xD;&#xA;    Xcm([ReserveAssetDeposited(&#xD;&#xA;        MultiAssets([&#xD;&#xA;            MultiAsset {&#xD;&#xA;                id: Concrete(&#xD;&#xA;                    MultiLocation {&#xD;&#xA;                        parents: 1,&#xD;&#xA;                        interior: X2(Parachain(1001), PalletInstance(3))&#xD;&#xA;            }),&#xD;&#xA;                fun: Fungible(1000000000)&#xD;&#xA;        }&#xD;&#xA;    ])),&#xD;&#xA;    ClearOrigin,&#xD;&#xA;    BuyExecution {&#xD;&#xA;        fees: MultiAsset {&#xD;&#xA;            id: Concrete(MultiLocation {&#xD;&#xA;                parents: 1,&#xD;&#xA;                interior: X2(Parachain(1001), PalletInstance(3))&#xD;&#xA;            }),&#xD;&#xA;            fun: Fungible(1000000000)&#xD;&#xA;        },&#xD;&#xA;        weight_limit: Limited(100)&#xD;&#xA;    },&#xD;&#xA;    DepositAsset {&#xD;&#xA;        assets: Wild(All),&#xD;&#xA;        max_assets: 1,&#xD;&#xA;        beneficiary: MultiLocation {&#xD;&#xA;            parents: 0,&#xD;&#xA;            interior: X1(AccountKey20 {&#xD;&#xA;                network: Any,&#xD;&#xA;                key: [&#xD;&#xA;                    242,&#xD;&#xA;                    79,&#xD;&#xA;                    243,&#xD;&#xA;                    169,&#xD;&#xA;                    207,&#xD;&#xA;                    4,&#xD;&#xA;                    199,&#xD;&#xA;                    29,&#xD;&#xA;                    188,&#xD;&#xA;                    148,&#xD;&#xA;                    208,&#xD;&#xA;                    181,&#xD;&#xA;                    102,&#xD;&#xA;                    247,&#xD;&#xA;                    162,&#xD;&#xA;                    123,&#xD;&#xA;                    148,&#xD;&#xA;                    86,&#xD;&#xA;                    108,&#xD;&#xA;                    172&#xD;&#xA;                ]&#xD;&#xA;            })&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;]) &#xD;&#xA;max_weight: 400000000, &#xD;&#xA;weight_credit: 0&#xD;&#xA;&#xD;&#xA;2022-07-07 11:14:00.028 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: [] Barrier blocked execution! Error: (). (origin: MultiLocation { parents: 1, interior: X1(Parachain(1001)) }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X2(Parachain(1001), PalletInstance(3)) }), fun: Fungible(1000000000) }, weight_limit: Limited(100) }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountKey20 { network: Any, key: [242, 79, 243, 169, 207, 4, 199, 29, 188, 148, 208, 181, 102, 247, 162, 123, 148, 86, 108, 172] }) } }]), weight_limit: 41666666666, weight_credit: 0)    &#xD;&#xA;2022-07-07 11:14:00.028 ERROR tokio-runtime-worker cumulus_pallet_xcmp_queue: [] Failed to process XCMP-XCM message, caused by Barrier   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Update: I make it after adding a xcm barrier to Moonbase.&#xD;&#xA;&#xD;&#xA;https://sourcegraph.com/github.com/PureStake/moonbeam@8369da6dd073e1dc757deda2a778648c15c8298e/-/blob/runtime/moonbase/src/xcm_config.rs?L223&#xD;&#xA;```rust&#xD;&#xA;// Allow paid executions&#xD;&#xA;pub type XcmBarrier = (&#xD;&#xA;	TakeWeightCredit,&#xD;&#xA;	AllowTopLevelPaidExecutionFrom&lt;Everything&gt;,&#xD;&#xA;    AllowUnpaidExecutionFrom&lt;Everything&gt;, // add this line, allow every xcm message&#xD;&#xA;	AllowKnownQueryResponses&lt;PolkadotXcm&gt;,&#xD;&#xA;	// Subscriptions for version tracking are OK.&#xD;&#xA;	AllowSubscriptionsFrom&lt;Everything&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eXLpp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14196" PostHistoryTypeId="5" PostId="3777" RevisionGUID="71487d2e-af2c-4d5d-ad84-1d9585f60ec3" CreationDate="2022-07-16T05:33:02.417" UserId="275" Comment="deleted 14 characters in body" Text="@joepetrowski&#xD;&#xA;Could you teach me why there was fishermen role initially considered to be needed and the reason it is no more exists at high level? &#xD;&#xA;&#xD;&#xA;According to the article,&#xD;&#xA;&#xD;&#xA;&gt; The availability check by the block author ensures that Polkadot will only include blocks for which the validators distributed their chunks, but it does not guarantee their validity. Because the number of validators on each parachain is so low, collusion is a reasonable concern. By separating block production (BABE) from finality (GRANDPA), Polkadot can perform extra validity checks after a block is produced but before it is finalized.[3] Polkadot has special actors, fishermen, who patrol Relay Chain blocks for invalid candidate receipts.&#xD;&#xA;&#xD;&#xA;Fishermen were taking great responsibility for validity checks by pointing out potential fraud. What is the alternative for this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14197" PostHistoryTypeId="4" PostId="3635" RevisionGUID="eddc3815-b960-4df5-82e5-3e6150b0258b" CreationDate="2022-07-16T05:44:55.857" UserId="2384" Comment="edited title" Text="How do relaychain, parachain, collators, validators work together" ContentLicense="CC BY-SA 4.0" />
  <row Id="14198" PostHistoryTypeId="2" PostId="3779" RevisionGUID="90938aa2-7b41-4e96-88e9-9f461e7012bf" CreationDate="2022-07-16T06:28:56.557" UserId="627" Text="As of metadata v14 you don't need to pass any type definitions - the runtime metadata fully specifies all objects and the API will use these type definitions. &#xD;&#xA;&#xD;&#xA;In general, there are a couple of `to*` methods on `Codec` objects. They are -&#xD;&#xA;&#xD;&#xA; - `toHuman()` - this returns a human-readable presentation of the data. Generally you don't want to use these programatically, it is formatted for (slightly opinionated) display&#xD;&#xA; - `toJSON()` - this returns an object that is meant for passing over RPC. This means that data is presented in a format that makes sense to RPC servers, i.e. `Vec&lt;u8&gt;` appears as hex, numbers (&gt; `u32`) as well.&#xD;&#xA; - `toHex()` - this returns a hex-based representation&#xD;&#xA; - `toU8a()` - this returns a SCALE representation of the data&#xD;&#xA; - `toString()` - this is a text data representation&#xD;&#xA;&#xD;&#xA;Objects that represent numbers have additional utility methods, such as `toNumber()`, `toBn()` and `toBigInt()`.&#xD;&#xA;&#xD;&#xA;In your case you have a Rust struct. These are decoded into [a JS Map object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), so it has all the methods that are on normal maps. &#xD;&#xA;&#xD;&#xA;Additionally, field getters are also added to this `Map`, it means you can do -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// retrieve object, it has the on-chain form&#xD;&#xA;// { a: 'Vec&lt;u8&gt;', b: 'u64' }&#xD;&#xA;const obj = await api.query.somewhere.foo();&#xD;&#xA;&#xD;&#xA;// display the internal values as string, each field&#xD;&#xA;// has a getter, so no need to use obj.get(&lt;field&gt;)&#xD;&#xA;console.log(&#xD;&#xA;  // Vec&lt;u8&gt;/Bytes has toUtf8() for string representation&#xD;&#xA;  obj.a.toUtf8(),&#xD;&#xA;  // display number as non-formatted string&#xD;&#xA;  obj.b.toString()&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in this case for any struct, you have getters that gives you access to the specific fields (over-and-above general `Map` methods such as `.entries()`, etc.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14200" PostHistoryTypeId="2" PostId="3780" RevisionGUID="5c4d13d6-a347-4b12-8758-a28389b81ff4" CreationDate="2022-07-16T11:35:33.323" UserId="73" Text="&gt; It seems that substrate only lets you define crypto types only as a renamed version of the same algorithm, and not create new ones on other elliptic curves for example. Is this the case?&#xD;&#xA;&#xD;&#xA;Yes that is the case.&#xD;&#xA;&#xD;&#xA;However, you can use [`insert_unknown`][1] to insert opaque private keys to the keystore and then use [`key_pair`][2] to get the private key. However, that will not work from the runtime. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/4a19d408095ebcb47840ad1f2f086f53a0020cb7/client/keystore/src/local.rs#L311&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/4a19d408095ebcb47840ad1f2f086f53a0020cb7/client/keystore/src/local.rs#L558" ContentLicense="CC BY-SA 4.0" />
  <row Id="14202" PostHistoryTypeId="5" PostId="2887" RevisionGUID="52d5be36-9471-421f-a64f-b8973dcad3d9" CreationDate="2022-07-16T12:46:08.843" UserId="29" Comment="deleted 525 characters in body" Text="# How to extend a slot on the relay chain&#xD;&#xA;&#xD;&#xA;To extend a slot on the relay chain the parachain team needs to secure a new slot via an auction. There are several approaches to doing so. Therefore your team needs to see what is the best fit for your case.&#xD;&#xA;&#xD;&#xA;Each slot can be a most 8 lease periods (LP). That means your team will need to acquire a new slot of 8 LPs via auction.&#xD;&#xA;&#xD;&#xA;To avoid downtime, your team will either need the new LP to start immediately after your existing one or you can have the slots &quot;overlap&quot; each other.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Option 1: Overlapping Slots&#xD;&#xA;&#xD;&#xA;Aquire a slot where the first LP is before the last LP of the current slot.&#xD;&#xA;&#xD;&#xA;1. Register a new `paraId`&#xD;&#xA;2. Win a slot auction with the new `paraId`&#xD;&#xA;    - Your team will now have two slots: one that will end soon, and one that just started.&#xD;&#xA;    - Both slots will have at least one LP in common&#xD;&#xA;3. When the old slot transitions to their last LP, your team can do a [swap](https://github.com/paritytech/polkadot/pull/4772) to swap to the new slot.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/29cNW.png)&#xD;&#xA;&#xD;&#xA;- Currently this has to be done via on-chain governance [example](https://kusama.polkassembly.io/post/1491) but their are [discussions](https://github.com/paritytech/polkadot/pull/5451) to improve the process.&#xD;&#xA;&#xD;&#xA;&gt; Note: This method has the benefit of giving flexibility to the team on when to bid for a slot, however it has the disadvantage of having more than one slot being active during the same LPs.&#xD;&#xA;&#xD;&#xA;### Option 2: Non-overlapping Slots&#xD;&#xA;&#xD;&#xA;Aquire a slot where the first LP starts right after the end of the last LP of the current slot.&#xD;&#xA;&#xD;&#xA;In this case, the team can bid directly with their current paraID, and it will be automatically extended without the need of swapping.&#xD;&#xA;&#xD;&#xA;This method has the advantage of not having superposing LP's on different slots owned by the same team, however it has the disadvantage of losing flexibility on when to win a new slot: if the team does not win the exact slot, then it will suffer some downtime until it wins a new slot." ContentLicense="CC BY-SA 4.0" />
  <row Id="14203" PostHistoryTypeId="2" PostId="3781" RevisionGUID="4aed80f0-381d-40e7-aa51-7bd768446cd6" CreationDate="2022-07-16T12:48:12.523" UserId="3" Text="The documentation of the `Timestamp` pallet states that the result of `Timestamp::now()` is undefined until `Timestamp::set` is called for the first time. Looking at the implementation details, you can see that `Timestamp::now()` returns zero otherwise. I would expect `Timestamp::now()` to be usable sometime during block #1.&#xD;&#xA;&#xD;&#xA;When calling `Timestamp::now()` during `on_initialize` of a custom pallet on block #1, it returns zero, but during `on_finalize` it returns the correct time. It's my understanding that the time is set using an inherent extinsic. Is there any guarantee where the time stamp is set?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14205" PostHistoryTypeId="1" PostId="3781" RevisionGUID="4aed80f0-381d-40e7-aa51-7bd768446cd6" CreationDate="2022-07-16T12:48:12.523" UserId="3" Text="At wnat time is `Timestamp::now` no longer undefined?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14206" PostHistoryTypeId="3" PostId="3781" RevisionGUID="4aed80f0-381d-40e7-aa51-7bd768446cd6" CreationDate="2022-07-16T12:48:12.523" UserId="3" Text="|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14207" PostHistoryTypeId="2" PostId="3782" RevisionGUID="fb193f05-56f6-41e1-9246-b28b24c77570" CreationDate="2022-07-16T12:56:22.460" UserId="2163" Text="Are the benchmarks run on the same machine in the cumulus repository as the ones in the substrate? That is, is the weight in weights.rs files the same in these two repositories?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14209" PostHistoryTypeId="1" PostId="3782" RevisionGUID="fb193f05-56f6-41e1-9246-b28b24c77570" CreationDate="2022-07-16T12:56:22.460" UserId="2163" Text="Cumulus extrinsic weight" ContentLicense="CC BY-SA 4.0" />
  <row Id="14210" PostHistoryTypeId="3" PostId="3782" RevisionGUID="fb193f05-56f6-41e1-9246-b28b24c77570" CreationDate="2022-07-16T12:56:22.460" UserId="2163" Text="|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14211" PostHistoryTypeId="4" PostId="3781" RevisionGUID="596eaaca-f04d-47f5-93a5-3702060c9f3b" CreationDate="2022-07-16T12:58:23.637" UserId="29" Comment="edited title" Text="At what time is `Timestamp::now` no longer undefined?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14212" PostHistoryTypeId="5" PostId="3781" RevisionGUID="596eaaca-f04d-47f5-93a5-3702060c9f3b" CreationDate="2022-07-16T12:58:23.637" UserId="29" Comment="edited title" Text="The documentation of the `Timestamp` pallet states that the result of `Timestamp::now()` is undefined until `Timestamp::set` is called for the first time. Looking at the implementation details, you can see that `Timestamp::now()` returns zero otherwise. I would expect `Timestamp::now()` to be usable sometime during block #1.&#xD;&#xA;&#xD;&#xA;When calling `Timestamp::now()` during `on_initialize` of a custom pallet on block #1, it returns zero, but during `on_finalize` it returns the correct time. It's my understanding that the time is set using an inherent extrinsic. Is there any guarantee where the time stamp is set?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14213" PostHistoryTypeId="6" PostId="3782" RevisionGUID="3cf9aada-8b95-4929-acc4-2d8e71cb11e4" CreationDate="2022-07-16T13:00:03.117" UserId="29" Comment="edited tags" Text="|weight|benchmarking|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14214" PostHistoryTypeId="2" PostId="3783" RevisionGUID="6a299683-b5a6-48ee-a08a-d9d39c69e715" CreationDate="2022-07-16T15:27:30.753" UserId="28" Text="`Timestamp::set` is indeed an inherent extrinsic as defined:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn is_inherent(call: &amp;Self::Call) -&gt; bool {&#xD;&#xA;	matches!(call, Call::set { .. })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Inherent extrinsics are guaranteed to execute before regular extrinsics, so you should have access to it during any normal extrinsic call during the first block.&#xD;&#xA;&#xD;&#xA;Of course after it is set, then you will always have a value there, but it might be one block behind if you use it at the `on_initialize`.&#xD;&#xA;&#xD;&#xA;Inherent extrinsic order should be defined by the order of the pallets, so you should also get access to it if you make sure `Timestamp` pallet is ordered before any other relevant pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="14216" PostHistoryTypeId="2" PostId="3784" RevisionGUID="71f215c0-ef71-4ced-aa50-164cb7d17a86" CreationDate="2022-07-16T16:08:26.077" UserId="2319" Text="i am clone substrate node template from this command&#xD;&#xA;&quot;git clone --branch latest --depth 1 https://github.com/substrate-developer-hub/substrate-node-template&quot;&#xD;&#xA;&#xD;&#xA;add pallet_democracy in runtime/cargo.toml&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How to add democracy pallet in the frame, Frame_System_Config &#xD;&#xA;and  impl for runtime..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14218" PostHistoryTypeId="1" PostId="3784" RevisionGUID="71f215c0-ef71-4ced-aa50-164cb7d17a86" CreationDate="2022-07-16T16:08:26.077" UserId="2319" Text="How to add democracy pallet as a substrate frame pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="14219" PostHistoryTypeId="3" PostId="3784" RevisionGUID="71f215c0-ef71-4ced-aa50-164cb7d17a86" CreationDate="2022-07-16T16:08:26.077" UserId="2319" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14220" PostHistoryTypeId="2" PostId="3785" RevisionGUID="279ad725-680c-4adb-9bdf-f3be8caf215f" CreationDate="2022-07-16T16:33:20.550" UserId="34" Text="Try the process described in the tutorials here: https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14222" PostHistoryTypeId="6" PostId="3784" RevisionGUID="f6bddf74-2be3-4792-9274-cf6920603530" CreationDate="2022-07-16T16:33:38.910" UserId="34" Comment="edited tags" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14223" PostHistoryTypeId="5" PostId="3782" RevisionGUID="4dbda61d-439d-4dea-b4bf-e3e4eb018ab6" CreationDate="2022-07-16T18:10:06.507" UserId="2163" Comment="added 105 characters in body" Text="Are the benchmarks run on the same machine in the cumulus repository as the ones in the substrate? That is, is the weight in weights.rs files the same in these two repositories?&#xD;&#xA;&#xD;&#xA;Edit: The weights in these repositories are not the same.&#xD;&#xA;&#xD;&#xA;How to generate the weights for cumulus?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14224" PostHistoryTypeId="2" PostId="3786" RevisionGUID="20c01f92-49f4-4918-ae71-b60f8a6c6dfa" CreationDate="2022-07-16T20:16:12.770" UserId="94" Text="The Cumulus weight generation follows the same logic as Substrate and Polkadot.  &#xD;&#xA;There exist two scripts that are used to regularly update the weights [here](https://github.com/paritytech/cumulus/blob/master/scripts/benchmarks-ci.sh) and [here](https://github.com/paritytech/cumulus/blob/master/scripts/benchmarks.sh).  &#xD;&#xA;Please note that we do not expect the exact same weights across all projects, even though the benchmarks are being run on the same machines.&#xD;&#xA;&#xD;&#xA;Some reasons for that are:&#xD;&#xA;- The runtime configuration influences the weight. It is therefore important to re-benchmark all pallets for each runtime. One obvious example is the `BlockExecutionWeight`, which is dependent on the inherents of the runtime.&#xD;&#xA;- The benchmarks were run with different Substrate versions. AFAIK Cumulus does not always re-benchmark when updating Substrate, but only before a release. Different versions of Substrate can change the results.&#xD;&#xA;- The rust compiler improved since the benchmarks were last run, which would result in lower weights.&#xD;&#xA;- A slight leeway for the weights is expected in any case, since it is a measurement that cannot be 100% reproduced." ContentLicense="CC BY-SA 4.0" />
  <row Id="14226" PostHistoryTypeId="2" PostId="3787" RevisionGUID="ef9abfc4-ce6a-4be9-8158-b0aa6ef38005" CreationDate="2022-07-16T22:29:09.357" UserId="28" Text="This error usually happens when you forget to add the `std` feature to the crate you imported.&#xD;&#xA;&#xD;&#xA;So try updating your cargo file to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    ....&#xD;&#xA;    &quot;sp-npos-elections/std&quot;,&#xD;&#xA;    ....&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And make sure the crate is imported with `default-features = false`" ContentLicense="CC BY-SA 4.0" />
  <row Id="14228" PostHistoryTypeId="2" PostId="3788" RevisionGUID="c700ab42-a68d-4280-9f2a-4e7c7a991d0b" CreationDate="2022-07-17T01:16:31.557" UserId="70" Text="We just upgraded our node client to polkadot-0.9.22 and experienced regular memory leaks to all nodes. I tried to look into Prometheus but there is not much helpful information we can find out. &#xD;&#xA;&#xD;&#xA;Have anyone got this experience before? or any hints that may cause the issue?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8qJlf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14230" PostHistoryTypeId="1" PostId="3788" RevisionGUID="c700ab42-a68d-4280-9f2a-4e7c7a991d0b" CreationDate="2022-07-17T01:16:31.557" UserId="70" Text="Memory leak after upgrading client to polkadot-0.9.22" ContentLicense="CC BY-SA 4.0" />
  <row Id="14231" PostHistoryTypeId="3" PostId="3788" RevisionGUID="c700ab42-a68d-4280-9f2a-4e7c7a991d0b" CreationDate="2022-07-17T01:16:31.557" UserId="70" Text="|substrate-node|nodes|memory|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14232" PostHistoryTypeId="2" PostId="3789" RevisionGUID="b945cbd9-52e5-49e6-b0e7-8da4b540dd17" CreationDate="2022-07-17T04:55:39.937" UserId="2163" Text="Do I need to change the git url of a dependency to my own repo and set the branch, or is there some other way to do this? Or should I only make a companion when the pr is merged?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14234" PostHistoryTypeId="1" PostId="3789" RevisionGUID="b945cbd9-52e5-49e6-b0e7-8da4b540dd17" CreationDate="2022-07-17T04:55:39.937" UserId="2163" Text="How to make a companion for a pr that is not merged" ContentLicense="CC BY-SA 4.0" />
  <row Id="14235" PostHistoryTypeId="3" PostId="3789" RevisionGUID="b945cbd9-52e5-49e6-b0e7-8da4b540dd17" CreationDate="2022-07-17T04:55:39.937" UserId="2163" Text="|learning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14236" PostHistoryTypeId="2" PostId="3790" RevisionGUID="5b96deda-bc41-4509-a25e-f79c2a3b031a" CreationDate="2022-07-17T11:20:41.177" UserId="28" Text="There are more detailed instructions in the Substrate contribution guide:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/docs/CONTRIBUTING.adoc#updating-polkadot-as-well&#xD;&#xA;&#xD;&#xA;High level:&#xD;&#xA;&#xD;&#xA;To create a companion to a Substrate PR, you must create Polkadot and Cumulus PRs which would fix any changes caused by the Substrate PR (for example removing or adding some function to the weight files of a module).&#xD;&#xA;&#xD;&#xA;Once you have created those companion PRs, you should include them in your Substrate pull request description as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;polkadot companion: &lt;link&gt;&#xD;&#xA;cumulus companion: &lt;link&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example: https://github.com/paritytech/substrate/pull/9018&#xD;&#xA;&#xD;&#xA;In the companion process, you should not expect that the PRs to Polkadot or Cumulus compile in the pull requests to those repos. This would not be possible since the Substrate PR has not yet been merged.&#xD;&#xA;&#xD;&#xA;Instead, you should look at the Substrate PR to see that the CI/CD checks &quot;polkadot-companion&quot; and &quot;cumulus-companion&quot;.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;If this works, then you are all good to go, and our merge bot will be able to merge the Substrate PR, then the subsequent Polkadot and Cumulus PR right after.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qgEvx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14238" PostHistoryTypeId="2" PostId="3791" RevisionGUID="dcfc903b-68e4-493f-b7a3-2ec7d3eea95b" CreationDate="2022-07-17T15:01:58.330" UserId="275" Text="In the Polkadot white paper and W3F research papers and lots of other articles, Fishermen is frequently described. This Fishermen (parachain full node) role checks validity of blocks by pointing out potential fraud of Relaychain validators.&#xD;&#xA;&#xD;&#xA;For example, one of articles it is written that&#xD;&#xA;&#xD;&#xA;&gt; The availability check by the block author ensures that Polkadot will only include blocks for which the validators distributed their chunks, but it does not guarantee their validity. Because the number of validators on each parachain is so low, collusion is a reasonable concern. By separating block production (BABE) from finality (GRANDPA), Polkadot can perform extra validity checks after a block is produced but before it is finalized.[3] Polkadot has special actors, fishermen, who patrol Relay Chain blocks for invalid candidate receipts.&#xD;&#xA;&#xD;&#xA;However, the thing is Fishermen role doesn't exist in current implementation. (ref: https://substrate.stackexchange.com/q/3635/275)&#xD;&#xA;&#xD;&#xA;Why it was considered to be needed initially and what is the alternative for this to check the validity of blocks (at high level)?&#xD;&#xA;I feel there're not enough papers, some articles reflecting the latest information (It could be I just don't notice them). I would like to get references(links) to detailed information if possible." ContentLicense="CC BY-SA 4.0" />
  <row Id="14240" PostHistoryTypeId="1" PostId="3791" RevisionGUID="dcfc903b-68e4-493f-b7a3-2ec7d3eea95b" CreationDate="2022-07-17T15:01:58.330" UserId="275" Text="How to ensure parachain block validity" ContentLicense="CC BY-SA 4.0" />
  <row Id="14241" PostHistoryTypeId="3" PostId="3791" RevisionGUID="dcfc903b-68e4-493f-b7a3-2ec7d3eea95b" CreationDate="2022-07-17T15:01:58.330" UserId="275" Text="|polkadot|relay-chain|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14242" PostHistoryTypeId="5" PostId="3791" RevisionGUID="f5cc9e58-c9cc-43f2-ab44-440780921752" CreationDate="2022-07-17T15:08:28.177" UserId="275" Comment="deleted 2 characters in body" Text="In the Polkadot white paper and W3F research papers and lots of other articles, Fishermen is frequently described. This Fishermen (parachain full node) role checks validity of blocks by pointing out potential fraud of Relaychain validators.&#xD;&#xA;&#xD;&#xA;For example, one of articles it is written that&#xD;&#xA;&#xD;&#xA;&gt; The availability check by the block author ensures that Polkadot will only include blocks for which the validators distributed their chunks, but it does not guarantee their validity. Because the number of validators on each parachain is so low, collusion is a reasonable concern. By separating block production (BABE) from finality (GRANDPA), Polkadot can perform extra validity checks after a block is produced but before it is finalized.[3] Polkadot has special actors, fishermen, who patrol Relay Chain blocks for invalid candidate receipts.&#xD;&#xA;&#xD;&#xA;However, the thing is Fishermen role doesn't exist in current implementation. (ref: https://substrate.stackexchange.com/q/3635/275)&#xD;&#xA;&#xD;&#xA;Why it was considered to be needed initially and what is the alternative for this to check the validity of blocks (at high level)?&#xD;&#xA;I feel there're not much papers, some articles reflecting the latest information (It could be I just don't notice them). I would like to get references(links) to detailed information if possible." ContentLicense="CC BY-SA 4.0" />
  <row Id="14243" PostHistoryTypeId="5" PostId="3791" RevisionGUID="02fca938-f678-4878-8462-acb72867c836" CreationDate="2022-07-17T15:09:58.130" UserId="2163" Comment="made the title a bit more specific." Text="In the Polkadot white paper and W3F research papers and lots of other articles, Fishermen is frequently described. This Fishermen (parachain full node) role checks validity of blocks by pointing out potential fraud of Relaychain validators.&#xD;&#xA;&#xD;&#xA;For example, one of articles it is written that&#xD;&#xA;&#xD;&#xA;&gt; The availability check by the block author ensures that Polkadot will only include blocks for which the validators distributed their chunks, but it does not guarantee their validity. Because the number of validators on each parachain is so low, collusion is a reasonable concern. By separating block production (BABE) from finality (GRANDPA), Polkadot can perform extra validity checks after a block is produced but before it is finalized.[3] Polkadot has special actors, fishermen, who patrol Relay Chain blocks for invalid candidate receipts.&#xD;&#xA;&#xD;&#xA;However, the thing is Fishermen role doesn't exist in current implementation. (ref: https://substrate.stackexchange.com/q/3635/275)&#xD;&#xA;&#xD;&#xA;Why it was considered to be needed initially and what is the alternative for this to check the validity of blocks (at high level)?&#xD;&#xA;I feel there're not enough papers, some articles reflecting the latest information (It could be I just don't notice them). I would like to get references(links) to detailed information if possible." ContentLicense="CC BY-SA 4.0" />
  <row Id="14244" PostHistoryTypeId="4" PostId="3791" RevisionGUID="02fca938-f678-4878-8462-acb72867c836" CreationDate="2022-07-17T15:09:58.130" UserId="2163" Comment="made the title a bit more specific." Text="How to ensure parachain block validity without fishermen" ContentLicense="CC BY-SA 4.0" />
  <row Id="14245" PostHistoryTypeId="24" PostId="3791" RevisionGUID="02fca938-f678-4878-8462-acb72867c836" CreationDate="2022-07-17T15:09:58.130" Comment="Proposed by 2163 approved by 275 edit id of 242" ContentLicense="CC BY-SA 4.0" />
  <row Id="14246" PostHistoryTypeId="2" PostId="3792" RevisionGUID="111d454b-da04-4dc6-8b25-4b64615ea720" CreationDate="2022-07-17T16:25:38.113" UserId="283" Text="https://polkadot.network/blog/polkadot-v1-0-sharding-and-economic-security/ This blog post contains a deep dive on how Polkadot currently provides economic security. It's actually a lot better than the fishermen plan because it defends against network-level adversaries. It uses a system of random assignment of validators to check each parachain block, which those validators broadcast to the network over gossip, and then corresponding approval messages that validators issue once they've checked the block and found it to be good.&#xD;&#xA;&#xD;&#xA;Quoting from the blog post:&#xD;&#xA;&#xD;&#xA;&gt; The security argument for Polkadot is based on Gambler’s Ruin. While&#xD;&#xA;&gt; it's true that an attacker who can take billions of attempts to&#xD;&#xA;&gt; brute-force the process would eventually be successful, we combine&#xD;&#xA;&gt; this process with a slashing system that ensures that each failed&#xD;&#xA;&gt; attempt is accompanied by a slash of the attacking validators' entire&#xD;&#xA;&gt; stake. Polkadot is a proof-of-stake network, and at the time of&#xD;&#xA;&gt; writing, each validator is backed by approximately 2 million DOT of&#xD;&#xA;&gt; stake. Most likely, each failed attempt would result in the slash of&#xD;&#xA;&gt; 10 or 20 validators. But even if only 1 validator gets slashed, it's&#xD;&#xA;&gt; still apparent that an attacker's funds would dry up quickly before&#xD;&#xA;&gt; success is likely.&#xD;&#xA;&gt; &#xD;&#xA;&gt; We achieve this with a few other properties of approval checking:&#xD;&#xA;&gt; &#xD;&#xA;&gt; 1. Validators' assignments to check a parachain block are secret until revealed by themselves.&#xD;&#xA;&gt; 2. Validators' assignments are deterministically generated.&#xD;&#xA;&gt; 3. Validators broadcast an intention to check a parachain block before recovering the data necessary to perform those checks.&#xD;&#xA;&gt; 4. When validators broadcast an intention to check a parachain block and then disappear, this causes more honest validators to begin&#xD;&#xA;&gt; checking.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Property 1 ensures that an attacker doesn't know who to DoS to prevent&#xD;&#xA;&gt; them from checking a block.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Property 2 ensures that even if the attacker has gotten a lucky 'draw'&#xD;&#xA;&gt; and has enough malicious nodes to convince honest nodes that something&#xD;&#xA;&gt; has been checked, that there are most likely honest nodes that will do&#xD;&#xA;&gt; the checks alongside them, and those honest nodes will raise an alarm.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Property 3 ensures that honest nodes don't accidentally reveal&#xD;&#xA;&gt; themselves as checkers by requesting data from malicious nodes and&#xD;&#xA;&gt; then get taken offline by the adversary with nobody noticing. i.e. if&#xD;&#xA;&gt; the attacker tries to silence checkers it will be noticed by others.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Property 4 ensures that nodes that appear to have been DoSed will be&#xD;&#xA;&gt; replaced by even more nodes. Approval-checking is meant to be like the&#xD;&#xA;&gt; hydra: if you cut one head off, 2 more heads appear." ContentLicense="CC BY-SA 4.0" />
  <row Id="14248" PostHistoryTypeId="2" PostId="3793" RevisionGUID="0d86fa90-c472-4ab3-9edd-3c79237d1634" CreationDate="2022-07-17T16:56:55.297" UserId="12" Text="This was a transient problem that was fixed by updating my nightly version after a few days." ContentLicense="CC BY-SA 4.0" />
  <row Id="14250" PostHistoryTypeId="2" PostId="3794" RevisionGUID="dd5f6f7e-d0fc-417e-9ea0-af9380647896" CreationDate="2022-07-17T20:23:02.863" UserId="2540" Text="What is the canonical way to create a paper wallet for a substrate based tokens?&#xD;&#xA;&#xD;&#xA;I could probably take a wallet app, create new account, backup the seed, note down receiving address, and remove wallet app.&#xD;&#xA;&#xD;&#xA;Is that correct? Am I missing something? 12/24 words seed will work with all other wallet apps or only the one I used to generate it?&#xD;&#xA;Are there any more canonical ways?&#xD;&#xA;&#xD;&#xA;Before removing wallet app I could probably deposit some dots and stake them so cold wallet will not suffer inflation. Does that make sense?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14252" PostHistoryTypeId="1" PostId="3794" RevisionGUID="dd5f6f7e-d0fc-417e-9ea0-af9380647896" CreationDate="2022-07-17T20:23:02.863" UserId="2540" Text="How to make a paper wallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="14253" PostHistoryTypeId="3" PostId="3794" RevisionGUID="dd5f6f7e-d0fc-417e-9ea0-af9380647896" CreationDate="2022-07-17T20:23:02.863" UserId="2540" Text="|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14254" PostHistoryTypeId="52" PostId="3791" RevisionGUID="45df2c14-45c6-4f47-b5f8-46f614a0ebd8" CreationDate="2022-07-17T23:02:18.057" />
  <row Id="14260" PostHistoryTypeId="2" PostId="3795" RevisionGUID="1103dc0f-e419-40cd-96c0-7fc59a640e8b" CreationDate="2022-07-18T03:13:47.790" UserId="2890" Text="We were trying to run collator with our paraID registered on polkadot. We are able to connect with the same process on rococo test network. But while we are connecting with polkadot. It's throwing these errors. The command to connect with polkadot live we are using is&#xD;&#xA;&#xD;&#xA;./target/release/parachain-collator&#xD;&#xA;--collator&#xD;&#xA;--force-authoring&#xD;&#xA;--chain polkadot-raw.json&#xD;&#xA;--base-path /tmp/parachain/vineet&#xD;&#xA;--port 40333&#xD;&#xA;--ws-port 8844&#xD;&#xA;--&#xD;&#xA;--execution wasm&#xD;&#xA;--chain polkadot.json&#xD;&#xA;--port 30343&#xD;&#xA;--ws-port 9977&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2022-07-15 18:28:15 [Relaychain] Failed to fetch runtime API data for job err=Execution { runtime_api_name: &quot;validator_groups&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_validator_groups is not found&quot;))) } 2022-07-15 18:28:15 [Relaychain] Failed to fetch basics from runtime API relay_parent=0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3 err=Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) } 2022-07-15 18:28:15 [Relaychain] Our view contains 0x91b1…90c3, but not in active heads added=0x91b1…90c3 2022-07-15 18:28:15 [Relaychain] error=RollingSessionWindow(SessionsUnavailable { kind: RuntimeApi(Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }), info: None }) 2022-07-15 18:28:15 [Relaychain] error=Sender(Runtime(RuntimeRequest(Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }))) ctx=&quot;on FromOrchestra&quot;&#xD;&#xA;&#xD;&#xA;2022-07-15 18:28:52 failed to associate send_message response to the sender" ContentLicense="CC BY-SA 4.0" />
  <row Id="14262" PostHistoryTypeId="1" PostId="3795" RevisionGUID="1103dc0f-e419-40cd-96c0-7fc59a640e8b" CreationDate="2022-07-18T03:13:47.790" UserId="2890" Text="While running collator agains our paraId having error" ContentLicense="CC BY-SA 4.0" />
  <row Id="14263" PostHistoryTypeId="3" PostId="3795" RevisionGUID="1103dc0f-e419-40cd-96c0-7fc59a640e8b" CreationDate="2022-07-18T03:13:47.790" UserId="2890" Text="|parachain|parachain-collator|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14264" PostHistoryTypeId="5" PostId="3795" RevisionGUID="3519251d-74ae-4eac-9fb2-17588c94c0cf" CreationDate="2022-07-18T03:24:08.717" UserId="2890" Comment="added 22 characters in body" Text="We were trying to run collator with our paraID registered on polkadot. We are able to connect with the same process on rococo test network. But while we are connecting with polkadot. It's throwing these errors. The command to connect with polkadot live we are using is&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-collator&#xD;&#xA;--collator&#xD;&#xA;--force-authoring&#xD;&#xA;--chain polkadot-raw.json&#xD;&#xA;--base-path /tmp/parachain/vineet&#xD;&#xA;--port 40333&#xD;&#xA;--ws-port 8844&#xD;&#xA;--&#xD;&#xA;--execution wasm&#xD;&#xA;--chain polkadot.json&#xD;&#xA;--port 30343&#xD;&#xA;--ws-port 9977&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;2022-07-15 18:28:15 [Relaychain] Failed to fetch runtime API data for job err=Execution { runtime_api_name: &quot;validator_groups&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_validator_groups is not found&quot;))) } &#xD;&#xA;2022-07-15 18:28:15 [Relaychain] Failed to fetch basics from runtime API relay_parent=0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3 err=Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) } &#xD;&#xA;2022-07-15 18:28:15 [Relaychain] Our view contains 0x91b1…90c3, but not in active heads added=0x91b1…90c3 &#xD;&#xA;2022-07-15 18:28:15 [Relaychain] error=RollingSessionWindow(SessionsUnavailable { kind: RuntimeApi(Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }), info: None }) &#xD;&#xA;2022-07-15 18:28:15 [Relaychain] error=Sender(Runtime(RuntimeRequest(Execution { runtime_api_name: &quot;session_index_for_child&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_session_index_for_child is not found&quot;))) }))) ctx=&quot;on FromOrchestra&quot;&#xD;&#xA;&#xD;&#xA;2022-07-15 18:28:52 failed to associate send_message response to the sender&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14265" PostHistoryTypeId="2" PostId="3796" RevisionGUID="4e28498e-b5c1-43a2-b750-37477bfd7b58" CreationDate="2022-07-18T04:53:34.793" UserId="1789" Text="I have a parachain project that uses Frontier as a dependency, but the Ethereum RPC does not work. So I need to find a bug there...&#xD;&#xA;&#xD;&#xA;Also I am aware of @JoshOrndorff's tutorial about how to add Frontier into a Substrate Node Template: https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021, but that is a few months old with different substrate version... &#xD;&#xA;&#xD;&#xA;quote from Frontier https://github.com/paritytech/frontier/tree/master/template: &quot;used to generate a stand-alone template for use in an independent project via the included [template generation script](https://github.com/paritytech/frontier/blob/master/docs/node-template-release.md).&quot;&#xD;&#xA;&#xD;&#xA;Can this template generate a parachain project(based on substrate parachain template)?&#xD;&#xA;&#xD;&#xA;I need to generate a parachain project(based on substrate parachain template) that uses Frontier repo as a dependency.&#xD;&#xA;How can I do that? &#xD;&#xA;&#xD;&#xA;Is there an easy way or quick start or template repo for such?&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="14267" PostHistoryTypeId="1" PostId="3796" RevisionGUID="4e28498e-b5c1-43a2-b750-37477bfd7b58" CreationDate="2022-07-18T04:53:34.793" UserId="1789" Text="How to make a parachain project that uses Frontier as a dependency?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14268" PostHistoryTypeId="3" PostId="3796" RevisionGUID="4e28498e-b5c1-43a2-b750-37477bfd7b58" CreationDate="2022-07-18T04:53:34.793" UserId="1789" Text="|parachain|frontier|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14269" PostHistoryTypeId="5" PostId="3796" RevisionGUID="db72ee61-9e35-4a5c-8977-887bd1b308a9" CreationDate="2022-07-18T04:58:51.327" UserId="1789" Comment="added 51 characters in body" Text="I have a parachain project that uses Frontier as a dependency with a specific Substrate version(polkadot-v0.9.24), but the Ethereum RPC does not work. So I need to find the bug there...&#xD;&#xA;&#xD;&#xA;Also I am aware of @JoshOrndorff's tutorial about how to add Frontier into a Substrate Node Template: https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021, but that is a few months old with different substrate version... &#xD;&#xA;&#xD;&#xA;quote from Frontier https://github.com/paritytech/frontier/tree/master/template: &quot;used to generate a stand-alone template for use in an independent project via the included [template generation script](https://github.com/paritytech/frontier/blob/master/docs/node-template-release.md).&quot;&#xD;&#xA;&#xD;&#xA;Can this template generate a parachain project(based on substrate parachain template)?&#xD;&#xA;&#xD;&#xA;I need to generate a parachain project(based on substrate parachain template) that uses Frontier repo as a dependency.&#xD;&#xA;How can I do that? &#xD;&#xA;&#xD;&#xA;Is there an easy way or quick start or template repo for such?&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="14270" PostHistoryTypeId="2" PostId="3797" RevisionGUID="85a9523b-e6bc-4fc2-9e98-9fec07fb0ded" CreationDate="2022-07-18T05:21:43.830" UserId="2163" Text="This on its own would not make much sense, but this could be useful when having a companion PR to check whether the CI for the companion passes." ContentLicense="CC BY-SA 4.0" />
  <row Id="14272" PostHistoryTypeId="1" PostId="3797" RevisionGUID="85a9523b-e6bc-4fc2-9e98-9fec07fb0ded" CreationDate="2022-07-18T05:21:43.830" UserId="2163" Text="Is there a way to run CI checks without making a change in the pr?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14273" PostHistoryTypeId="3" PostId="3797" RevisionGUID="85a9523b-e6bc-4fc2-9e98-9fec07fb0ded" CreationDate="2022-07-18T05:21:43.830" UserId="2163" Text="|learning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14274" PostHistoryTypeId="4" PostId="3797" RevisionGUID="306c01b9-cbff-490d-9137-31177a692204" CreationDate="2022-07-18T05:32:32.043" UserId="2163" Comment="edited title" Text="Is there a way to run CI checks without making a commit in the pr?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14279" PostHistoryTypeId="5" PostId="3796" RevisionGUID="ecd70dac-d4b8-46ca-95ef-89ad522180a9" CreationDate="2022-07-18T07:37:45.147" UserId="1789" Comment="added 288 characters in body; edited tags" Text="I have a parachain project that uses Frontier as a dependency with a specific Substrate version(polkadot-v0.9.24), but the Ethereum RPC does not work. So I need to find the bug there...&#xD;&#xA;&#xD;&#xA;Also I am aware of @JoshOrndorff's tutorial https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021&#xD;&#xA; about how to add Frontier into a Substrate Node Template: https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021, but that is a few months old with different substrate version... &#xD;&#xA;&#xD;&#xA;And the above is how to add Frontier as a dependency to Substrate Node Template, &#xD;&#xA;&#xD;&#xA;but how to add Frontier as a dependency to Substrate Parachain Template?&#xD;&#xA;&#xD;&#xA;Regarding the Frontier repo template...&#xD;&#xA;quote from Frontier https://github.com/paritytech/frontier/tree/master/template: &quot;used to generate a stand-alone template for use in an independent project via the included [template generation script](https://github.com/paritytech/frontier/blob/master/docs/node-template-release.md).&quot;&#xD;&#xA;&#xD;&#xA;Can this template generate a parachain project(based on substrate parachain template)?&#xD;&#xA;&#xD;&#xA;I need to generate a parachain project(based on substrate parachain template) that uses Frontier repo as a dependency.&#xD;&#xA;How can I do that? &#xD;&#xA;&#xD;&#xA;Is there an easy way or quick start or template repo for such?&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="14280" PostHistoryTypeId="6" PostId="3796" RevisionGUID="ecd70dac-d4b8-46ca-95ef-89ad522180a9" CreationDate="2022-07-18T07:37:45.147" UserId="1789" Comment="added 288 characters in body; edited tags" Text="|parachain|frontier|substrate-parachain-template|frontier-workshop|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14281" PostHistoryTypeId="2" PostId="3799" RevisionGUID="8e9282ea-f1f0-44c8-8621-a57113ec8906" CreationDate="2022-07-18T07:54:10.313" UserId="2881" Text="For better security on paper wallets, I have been using [Parity's bananasplit](https://github.com/paritytech/banana_split) to store my pieces of paper. &#xD;&#xA;&#xD;&#xA;As long as the target wallet supports sr25519, you will be fine in restoring. If in doubt, first test via throw-away mnemonics to see if your target wallets do do the correct thing.&#xD;&#xA;&#xD;&#xA;For my cold wallet, I do have a proxy setup that at least allows me to perform staking operations, e.g. change nominations. (Stuff like transfer I don't allow via the proxy as setup). there is a slight cost in setting up the proxy initially, but well worth it." ContentLicense="CC BY-SA 4.0" />
  <row Id="14285" PostHistoryTypeId="6" PostId="3795" RevisionGUID="f0e90908-86d3-43e9-aba0-abe75b4443c3" CreationDate="2022-07-18T08:39:10.357" UserId="34" Comment="edited tags" Text="|polkadot|parachain|rococo|parachain-collator|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14287" PostHistoryTypeId="2" PostId="3800" RevisionGUID="ed4e5dc2-6526-4d70-b906-3030c05b7bd3" CreationDate="2022-07-18T08:55:57.733" UserId="28" Text="The Balances pallet itself does not have logic which allows for a max value on the token.&#xD;&#xA;&#xD;&#xA;In fact, the Balances pallet which itself automatically increases or decreases the total balance in the system.&#xD;&#xA;&#xD;&#xA;Instead, if you want to program some hard cap, you should modify whatever system is minting new tokens on your chain, and before you mint tokens, check the current total supply, and only mint so that you do not go over your max value. But you will need to do this external to the balances pallet.&#xD;&#xA;&#xD;&#xA;Using the staking module and balances pallet together, there is no way to do this as far as I know since these two are meant to work together in a no-fixed-supply way.&#xD;&#xA;&#xD;&#xA;You could create a new staking pallet which manages such a check, or just have no staking pallet at all." ContentLicense="CC BY-SA 4.0" />
  <row Id="14289" PostHistoryTypeId="2" PostId="3801" RevisionGUID="1bb0b514-7325-4a13-afc4-4a126527f765" CreationDate="2022-07-18T08:58:58.957" UserId="2025" Text="How can I see the assets deployed on Statemint or Statemine parachains and read all their parameters and metadata? I would like to do that directly on Polkadot.js UI, is that possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14291" PostHistoryTypeId="1" PostId="3801" RevisionGUID="1bb0b514-7325-4a13-afc4-4a126527f765" CreationDate="2022-07-18T08:58:58.957" UserId="2025" Text="How can I see the assets deployed on Statemint/Statemine with all their related information on Polkadot.js UI?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14292" PostHistoryTypeId="3" PostId="3801" RevisionGUID="1bb0b514-7325-4a13-afc4-4a126527f765" CreationDate="2022-07-18T08:58:58.957" UserId="2025" Text="|polkadot-js|assets|statemine|statemint|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14293" PostHistoryTypeId="2" PostId="3802" RevisionGUID="91648570-1b5c-41ab-bbde-ff64f0d0a422" CreationDate="2022-07-18T08:58:58.957" UserId="2025" Text="Once you are in the Polkadot.js/apps UI, connect to **Statemint** network (Polkadot ecosystem), click on _Network_ tab and then on _Assets_ to see the complete list of deployed assets listed by _asset ID_. Follow the same process to see the existing assets on **Statemine** for Kusama ecosystem. &#xD;&#xA;&#xD;&#xA;Moreover, in the Polkadot.js/apps UI, if you go to _Developer_ tab, and click on _Chain State_ you can query the state of the chain for [the **assets pallet**](https://docs.rs/pallet-assets/latest/pallet_assets/) to see the entire set of parameters and metadata for each asset (by asset ID) with _asset_ and _metadata_ state queries respectively. In the screenshot below you can see all this information shown for the asset ID 21, wBTC.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/pyVqt.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14295" PostHistoryTypeId="2" PostId="3803" RevisionGUID="18524803-d7d6-4f19-8ef5-cfbb78377fca" CreationDate="2022-07-18T09:22:39.387" UserId="179" Text="All teams that are part of the [Substrate Builders Program][1] can post their jobs into the job board. We will reach out to you to help you with that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.io/ecosystem/substrate-builders-program/" ContentLicense="CC BY-SA 4.0" />
  <row Id="14297" PostHistoryTypeId="5" PostId="3803" RevisionGUID="a6e87e5f-f740-4353-8908-99706af4288c" CreationDate="2022-07-18T09:30:24.640" UserId="179" Comment="added 625 characters in body" Text="All teams that are part of the [Substrate Builders Program][1] can post their jobs into the job board. Currently [Getro][2] is being used, which scrapes all the job posts for any given team across different platforms. Each company has it's own Admin to manage the information being displayed and the platforms to scrape. In particular, Adam is currently Bit Green's Admin, however this can be changed as well, either by adding more Admin's or changing them.&#xD;&#xA;&#xD;&#xA;[All BitGreen's open positions][3] are posted on the Job Board, these being sourced from `https://bitgreen.org/were-hiring`. To add any other source (the one pointed before seems not to be online), the Admin or Admins can edit that&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.io/ecosystem/substrate-builders-program/&#xD;&#xA;  [2]: https://www.getro.com&#xD;&#xA;  [3]: https://careers.substrate.io/jobs?q=bitGreen" ContentLicense="CC BY-SA 4.0" />
  <row Id="14298" PostHistoryTypeId="2" PostId="3804" RevisionGUID="85413a02-9f0b-4d77-9cba-25a00ece365f" CreationDate="2022-07-18T10:02:39.797" UserId="2663" Text="Many tutorial on the [substrate doc](https://docs.substrate.io/tutorials/) have similar code for the `Cargo.toml`.&#xD;&#xA;&#xD;&#xA;For example this is from [configure the contracts pallet tutoria](https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies.pallet-contracts]&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate.git'&#xD;&#xA;tag = 'latest'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-contracts-primitives]&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate.git'&#xD;&#xA;tag = 'latest'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I try to compile I get the following error:&#xD;&#xA;```&#xD;&#xA;failed to get `pallet-contracts` as a dependency of package `node-template-runtime v4.0.0-dev (/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load source for dependency `pallet-contracts`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech/substrate.git?tag=latest&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to find tag `latest`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  reference 'refs/remotes/origin/tags/latest' not found; class=Reference (4); code=NotFound (-3)&#xD;&#xA;```&#xD;&#xA;If I set the branch like this `branch = polkadot-v0.9.24` it works.&#xD;&#xA;&#xD;&#xA;I think the problem is that there isn't a `latest` tag in the `https://github.com/paritytech/substrate.git` repo.&#xD;&#xA;&#xD;&#xA;Is this a problem of the documentation or I miss something? " ContentLicense="CC BY-SA 4.0" />
  <row Id="14300" PostHistoryTypeId="1" PostId="3804" RevisionGUID="85413a02-9f0b-4d77-9cba-25a00ece365f" CreationDate="2022-07-18T10:02:39.797" UserId="2663" Text="failed to find tag `latest` - pallet version in tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="14301" PostHistoryTypeId="3" PostId="3804" RevisionGUID="85413a02-9f0b-4d77-9cba-25a00ece365f" CreationDate="2022-07-18T10:02:39.797" UserId="2663" Text="|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14302" PostHistoryTypeId="5" PostId="3800" RevisionGUID="c8635fcb-96e4-4c75-a698-ae2ec358bfe0" CreationDate="2022-07-18T10:50:24.750" UserId="28" Comment="added 1 character in body" Text="The Balances pallet itself does not have logic which allows for a max supply of the token.&#xD;&#xA;&#xD;&#xA;In fact, the Balances pallet has no logic which itself automatically increases or decreases the total balance in the system. Only functions / APIs which can be called by other runtime logic.&#xD;&#xA;&#xD;&#xA;Instead, if you want to program some hard cap, you should modify whatever system is minting new tokens on your chain, and before you mint tokens, check the current total supply, and only mint so that you do not go over your max value. But you will need to do this external to the balances pallet.&#xD;&#xA;&#xD;&#xA;Using the staking module and balances pallet together, there is no way to do this as far as I know since these two are meant to work together in a no-fixed-supply way.&#xD;&#xA;&#xD;&#xA;You could create a new staking pallet which manages such a check, or just have no staking pallet at all." ContentLicense="CC BY-SA 4.0" />
  <row Id="14303" PostHistoryTypeId="2" PostId="3805" RevisionGUID="a3df8f0e-5b91-463f-92bd-f37779900f49" CreationDate="2022-07-18T11:21:25.470" UserId="34" Text="This tag will be deprecated for the time being, it was not meant to be deleted just yet, all versions will be following Polkadot releases as you say, so for now, always inspect the docs and update the template source to the matching release tag to ensure compatibility." ContentLicense="CC BY-SA 4.0" />
  <row Id="14305" PostHistoryTypeId="2" PostId="3806" RevisionGUID="0099e0c0-6eeb-4f63-a96d-917d3beaa028" CreationDate="2022-07-18T14:16:44.763" UserId="494" Text="The statement you quoted represents a security measurement. This is a recommended best-practice because validators are sensitive nodes and attack surfaces must be reduced as much as possible.&#xD;&#xA;&#xD;&#xA;Theoretically speaking, there's nothing preventing a validator node having regular RPC methods exposed such that it can be used to submit transactions. However that would be considered a bad security practice.&#xD;&#xA;&#xD;&#xA;PolkadotJS (which I assume is what you mean by *Chrome extension*) sends RPC calls to regular (non-validator) full nodes. By having its p2p port open, the validator will receive transactions via gossip." ContentLicense="CC BY-SA 4.0" />
  <row Id="14307" PostHistoryTypeId="5" PostId="3784" RevisionGUID="81f445b4-5f99-4b5d-92a9-3a9e8a5b34ab" CreationDate="2022-07-18T15:02:28.053" UserId="2319" Comment="added 1863 characters in body" Text="i am clone substrate node template from this command&#xD;&#xA;&quot;git clone --branch latest --depth 1 https://github.com/substrate-developer-hub/substrate-node-template&quot;&#xD;&#xA;&#xD;&#xA;add pallet_democracy in runtime/cargo.toml&#xD;&#xA;&#xD;&#xA;then run below command &#xD;&#xA;&quot;cargo check -p node-template-runtime&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i will get below error &#xD;&#xA;error: failed to select a version for `syn`.&#xD;&#xA;    ... required by package `frame-support-procedural v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-support-procedural` of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-support` of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking` of package `pallet-democracy v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `pallet-democracy` of package `node-template-runtime v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `^1.0.98` are: 1.0.98&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `syn v1.0.95`&#xD;&#xA;    ... which satisfies dependency `syn = &quot;^1.0.84&quot;` (locked to 1.0.95) of package `async-trait v0.1.53`&#xD;&#xA;    ... which satisfies dependency `async-trait = &quot;^0.1&quot;` (locked to 0.1.53) of package `jsonrpsee-core v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee-core = &quot;^0.13.1&quot;` (locked to 0.13.1) of package `jsonrpsee v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee = &quot;^0.13.0&quot;` (locked to 0.13.1) of package `node-template v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `syn` which could resolve this conflict&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How to solve it!!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14308" PostHistoryTypeId="2" PostId="3807" RevisionGUID="86b75992-b8d3-4b5a-96e9-1e8fbd64fe26" CreationDate="2022-07-18T15:44:31.060" UserId="585" Text="Like there is e.g. `polkadot benchmark machine --chain kusama --verify-duration 60` for the relaychain, is there something similar for the parachains? If not maybe some custom tool for measuring parachain node performance? Or how would you test this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14310" PostHistoryTypeId="1" PostId="3807" RevisionGUID="86b75992-b8d3-4b5a-96e9-1e8fbd64fe26" CreationDate="2022-07-18T15:44:31.060" UserId="585" Text="Is there any benchmarking tool for parachain collator node performance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14311" PostHistoryTypeId="3" PostId="3807" RevisionGUID="86b75992-b8d3-4b5a-96e9-1e8fbd64fe26" CreationDate="2022-07-18T15:44:31.060" UserId="585" Text="|benchmarking|parachain-collator|performance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14312" PostHistoryTypeId="2" PostId="3808" RevisionGUID="a2c6ee8f-b79e-4d71-9eac-5422b9bdfe93" CreationDate="2022-07-18T17:02:08.200" UserId="2319" Text="i am follow above tutorial but i will get below error&#xD;&#xA;&#xD;&#xA;error: failed to select a version for `syn`.&#xD;&#xA;    ... required by package `frame-support-procedural v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-support-procedural` of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-support` of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking` of package `pallet-democracy v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `pallet-democracy` of package `node-template-runtime v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `^1.0.98` are: 1.0.98&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `syn v1.0.95`&#xD;&#xA;    ... which satisfies dependency `syn = &quot;^1.0.84&quot;` (locked to 1.0.95) of package `async-trait v0.1.53`&#xD;&#xA;    ... which satisfies dependency `async-trait = &quot;^0.1&quot;` (locked to 0.1.53) of package `jsonrpsee-core v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee-core = &quot;^0.13.1&quot;` (locked to 0.13.1) of package `jsonrpsee v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee = &quot;^0.13.0&quot;` (locked to 0.13.1) of package `node-template v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `syn` which could resolve this conflict" ContentLicense="CC BY-SA 4.0" />
  <row Id="14314" PostHistoryTypeId="5" PostId="3808" RevisionGUID="f408fe97-19de-48c2-b543-657e28ebdde9" CreationDate="2022-07-18T17:03:34.497" UserId="2319" Comment="added 51 characters in body" Text="i am follow above tutorial and add pallet-democracy in the runtime/cargo.toml but i will get below error&#xD;&#xA;&#xD;&#xA;error: failed to select a version for `syn`.&#xD;&#xA;    ... required by package `frame-support-procedural v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-support-procedural` of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-support` of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking` of package `pallet-democracy v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `pallet-democracy` of package `node-template-runtime v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `^1.0.98` are: 1.0.98&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `syn v1.0.95`&#xD;&#xA;    ... which satisfies dependency `syn = &quot;^1.0.84&quot;` (locked to 1.0.95) of package `async-trait v0.1.53`&#xD;&#xA;    ... which satisfies dependency `async-trait = &quot;^0.1&quot;` (locked to 0.1.53) of package `jsonrpsee-core v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee-core = &quot;^0.13.1&quot;` (locked to 0.13.1) of package `jsonrpsee v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee = &quot;^0.13.0&quot;` (locked to 0.13.1) of package `node-template v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `syn` which could resolve this conflict" ContentLicense="CC BY-SA 4.0" />
  <row Id="14315" PostHistoryTypeId="5" PostId="3808" RevisionGUID="8d3081d6-0a94-4d25-8ef5-98d4abccaa23" CreationDate="2022-07-18T17:04:20.557" UserId="2319" Comment="added 66 characters in body" Text="i am follow above tutorial and add pallet-democracy in the runtime/cargo.toml&#xD;&#xA;then run below command &quot;cargo check -p node-template-runtime&quot;&#xD;&#xA;&#xD;&#xA;but i will get below error&#xD;&#xA;&#xD;&#xA;error: failed to select a version for `syn`.&#xD;&#xA;    ... required by package `frame-support-procedural v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-support-procedural` of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-support` of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking` of package `pallet-democracy v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `pallet-democracy` of package `node-template-runtime v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `^1.0.98` are: 1.0.98&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `syn v1.0.95`&#xD;&#xA;    ... which satisfies dependency `syn = &quot;^1.0.84&quot;` (locked to 1.0.95) of package `async-trait v0.1.53`&#xD;&#xA;    ... which satisfies dependency `async-trait = &quot;^0.1&quot;` (locked to 0.1.53) of package `jsonrpsee-core v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee-core = &quot;^0.13.1&quot;` (locked to 0.13.1) of package `jsonrpsee v0.13.1`&#xD;&#xA;    ... which satisfies dependency `jsonrpsee = &quot;^0.13.0&quot;` (locked to 0.13.1) of package `node-template v4.0.0-dev (/home/amit/Substrate/New/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `syn` which could resolve this conflict" ContentLicense="CC BY-SA 4.0" />
  <row Id="14316" PostHistoryTypeId="2" PostId="3809" RevisionGUID="bd34e3e7-a4b2-496e-906e-24a0fec736a2" CreationDate="2022-07-18T20:01:16.600" UserId="16" Text="When looking at Kusamas's `pallet_xcm::Config` we can see that it allows [only the council][1] to use **send** arbitrary XCM messages while [it allows everyone][2] to **execute** arbitrary XCM messages.&#xD;&#xA;&#xD;&#xA;1. Why is sending a more privileged operation than executing?&#xD;&#xA;2. Can't a user send arbitrary XCM by executing a wrapping instruction like `InitiateTeleport` anyways?&#xD;&#xA;3. What is it a user cannot do when they can only **execute** but not **send**?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/eed45cfe22d5d1d66d0d149f4a0656f90976ad8b/runtime/kusama/src/xcm_config.rs#L177&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/eed45cfe22d5d1d66d0d149f4a0656f90976ad8b/runtime/kusama/src/xcm_config.rs#L180" ContentLicense="CC BY-SA 4.0" />
  <row Id="14318" PostHistoryTypeId="1" PostId="3809" RevisionGUID="bd34e3e7-a4b2-496e-906e-24a0fec736a2" CreationDate="2022-07-18T20:01:16.600" UserId="16" Text="Why does Kusama allow executing arbitrary XCM programs but not sending them?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14319" PostHistoryTypeId="3" PostId="3809" RevisionGUID="bd34e3e7-a4b2-496e-906e-24a0fec736a2" CreationDate="2022-07-18T20:01:16.600" UserId="16" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14324" PostHistoryTypeId="2" PostId="3811" RevisionGUID="10b6d012-2a72-4856-9c3b-1590bc70829d" CreationDate="2022-07-18T21:49:08.737" UserId="2698" Text="I have been running into a compilation error when adding different features in our node. This error appeared when I added the vesting pallet. It also appeared when I was configuring the runtime for something completely separate a month ago. The issue is I have no idea what is causing it since it doesn't point to any place for error. A copy of the error message can be seen below:&#xD;&#xA;```&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;   --&gt; /Users/jackson/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/npos-elections/src/lib.rs:367:45&#xD;&#xA;    |&#xD;&#xA;367 |         Self { total: Default::default(), voters: vec![] }&#xD;&#xA;    |                                                   ^^^&#xD;&#xA;    |&#xD;&#xA;    = note: consider importing one of these items:&#xD;&#xA;            codec::alloc::vec&#xD;&#xA;            crate::sp_std::vec&#xD;&#xA;            scale_info::prelude::vec&#xD;&#xA;            sp_std::vec&#xD;&#xA;&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;   --&gt; /Users/jackson/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/npos-elections/src/reduce.rs:608:21&#xD;&#xA;    |&#xD;&#xA;608 |                     let min_edge = vec![min_voter, min_target];&#xD;&#xA;    |                                    ^^^&#xD;&#xA;    |&#xD;&#xA;    = note: consider importing one of these items:&#xD;&#xA;            codec::alloc::vec&#xD;&#xA;            crate::sp_std::vec&#xD;&#xA;            scale_info::prelude::vec&#xD;&#xA;            sp_std::vec&#xD;&#xA;&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;  --&gt; /Users/jackson/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/npos-elections/src/phragmms.rs:52:20&#xD;&#xA;   |&#xD;&#xA;52 |     let mut winners = vec![];&#xD;&#xA;   |                       ^^^&#xD;&#xA;   |&#xD;&#xA;   = note: consider importing one of these items:&#xD;&#xA;           codec::alloc::vec&#xD;&#xA;           crate::sp_std::vec&#xD;&#xA;           scale_info::prelude::vec&#xD;&#xA;           sp_std::vec&#xD;&#xA;&#xD;&#xA;error: could not compile `sp-npos-elections` due to 3 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;```&#xD;&#xA;Any help would be appreciated as I have no idea what the possible causes are. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14326" PostHistoryTypeId="1" PostId="3811" RevisionGUID="10b6d012-2a72-4856-9c3b-1590bc70829d" CreationDate="2022-07-18T21:49:08.737" UserId="2698" Text="Primitive completion Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="14327" PostHistoryTypeId="3" PostId="3811" RevisionGUID="10b6d012-2a72-4856-9c3b-1590bc70829d" CreationDate="2022-07-18T21:49:08.737" UserId="2698" Text="|substrate-node|pallet|runtime|node-primitives|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14328" PostHistoryTypeId="2" PostId="3812" RevisionGUID="4c45b272-f3ce-4ea8-b0f6-3009d0a60875" CreationDate="2022-07-18T22:33:15.333" UserId="494" Text="This is more of a [Systems Programming](https://en.wikipedia.org/wiki/Systems_programming) question, rather than Substrate specifically.&#xD;&#xA;&#xD;&#xA;The node you start with the first command is one [process](https://en.wikipedia.org/wiki/Process_(computing)) in the Operating System, and whenever you call the node binary again, you will be simply creating a new process.&#xD;&#xA;&#xD;&#xA;Unless some clever [Inter Process Communication](https://en.wikipedia.org/wiki/Inter-process_communication) solution is established for CLIs (which Substrate does not provide out-of-the-box), you can't communicate with a node via CLI after it's already started.&#xD;&#xA;&#xD;&#xA;The only way to modify the behaviour of a node after it's already started is via RPC (which technically is just a flavour of IPC tailored for communication between separate machines over network).&#xD;&#xA;&#xD;&#xA;Please note that the process for inserting keys (mentioned in the comments) is merely modifying the keystore on disk (e.g.: `~/.local/share/node-template/chains/local_testnet/keystore/`). It happens regardless of the node being running, and if the node is running, it will have to be restarted for the changes to take effect." ContentLicense="CC BY-SA 4.0" />
  <row Id="14330" PostHistoryTypeId="50" PostId="3333" RevisionGUID="bd0f9c33-6412-43b1-9936-3ff4789ec7f5" CreationDate="2022-07-19T01:03:15.407" UserId="-1" />
  <row Id="14331" PostHistoryTypeId="2" PostId="3813" RevisionGUID="1272bee5-48f6-4903-b778-b2e96cdea403" CreationDate="2022-07-19T01:52:26.010" UserId="244" Text="In the [Permissioned Network](https://docs.substrate.io/tutorials/get-started/permissioned-network/) tutorial on Substrate docs, it's shown how to created a permissioned network from scratch along with the node-authorization pallet to manage the validator set.&#xD;&#xA;&#xD;&#xA;However, in the &quot;Add genesis storage for authorized nodes&quot; section it's said that some pre-genesis configuration is required.&#xD;&#xA;&#xD;&#xA;Is it possible to add this pallet to a permissioned network after it's started?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14333" PostHistoryTypeId="1" PostId="3813" RevisionGUID="1272bee5-48f6-4903-b778-b2e96cdea403" CreationDate="2022-07-19T01:52:26.010" UserId="244" Text="Is it possible to integrate node-authorization pallet after genesis?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14334" PostHistoryTypeId="3" PostId="3813" RevisionGUID="1272bee5-48f6-4903-b778-b2e96cdea403" CreationDate="2022-07-19T01:52:26.010" UserId="244" Text="|pallet|runtime-upgrade|consensus|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14335" PostHistoryTypeId="2" PostId="3814" RevisionGUID="6acd7ce0-556b-4d8d-a735-920905ea53ae" CreationDate="2022-07-19T07:22:40.180" UserId="2898" Text="according to substrate docs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;To perform a forkless runtime upgrade, Substrate uses existing runtime logic to update the Wasm runtime stored on the blockchain to a new consensus-breaking version with new logic. This upgrade gets pushed out to all full nodes on the network as a part of the consensus process. After the Wasm runtime is upgraded, the orchestration engine sees that the native runtime spec_name, spec_version, or authoring_version no longer matches the new Wasm runtime. As a result, the orchestration engine executes the canonical Wasm runtime instead of using the native runtime in any of the execution processes.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Question:&#xD;&#xA;Is there any voting system that decides whether to publish this new update or discard it? if yes then how does that voting works? &#xD;&#xA;&#xD;&#xA;what does orchestration engine means in this doc?&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14337" PostHistoryTypeId="1" PostId="3814" RevisionGUID="6acd7ce0-556b-4d8d-a735-920905ea53ae" CreationDate="2022-07-19T07:22:40.180" UserId="2898" Text="Polkadot runtime upgrade mechanism and voting" ContentLicense="CC BY-SA 4.0" />
  <row Id="14338" PostHistoryTypeId="3" PostId="3814" RevisionGUID="6acd7ce0-556b-4d8d-a735-920905ea53ae" CreationDate="2022-07-19T07:22:40.180" UserId="2898" Text="|polkadot|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14339" PostHistoryTypeId="5" PostId="3814" RevisionGUID="7cfc7d2a-6435-4402-800f-c4bc7ea2971f" CreationDate="2022-07-19T07:30:07.347" UserId="2898" Comment="deleted 53 characters in body" Text="according to substrate docs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;To perform a forkless runtime upgrade, Substrate uses existing runtime logic to update the Wasm runtime stored on the blockchain to a new consensus-breaking version with new logic. This upgrade gets pushed out to all full nodes on the network as a part of the consensus process. After the Wasm runtime is upgraded, the orchestration engine sees that the native runtime spec_name, spec_version, or authoring_version no longer matches the new Wasm runtime. As a result, the orchestration engine executes the canonical Wasm runtime instead of using the native runtime in any of the execution processes.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Question:&#xD;&#xA;Is there any voting system that decides whether to publish this new update or discard it? if yes then how does that voting works? &#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14340" PostHistoryTypeId="2" PostId="3815" RevisionGUID="d252c6be-c11a-41fd-9f40-396166ee9780" CreationDate="2022-07-19T08:30:02.843" UserId="2898" Text="Yes, runtime upgrades need to pass by referendum (i.e. voted on by all DOT holders). The majority of stake always commands the network. There is in fact a Referendum right now to upgrade Polkadot to runtime v9250 - see https://polkadot.polkassembly.io/referendum/69 &#xD;&#xA;&#xD;&#xA;for details or you can vote on it yourself here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.api.onfinality.io%2Fpublic-ws#/democracySee &#xD;&#xA;&#xD;&#xA;for the details of how this works&#xD;&#xA;https://wiki.polkadot.network/docs/learn-governance#referenda &#xD;&#xA;&#xD;&#xA;credits: &#xD;&#xA;Bill|W3f" ContentLicense="CC BY-SA 4.0" />
  <row Id="14342" PostHistoryTypeId="2" PostId="3816" RevisionGUID="f82731b2-4fd8-4b42-b801-00e868ed2cb7" CreationDate="2022-07-19T09:17:04.967" UserId="1951" Text="I've been having the problem of transactions not being imported at the same block in a local network. When submitting one transaction from three nodes in a local network at the same time, those transactions only get imported across three blocks. I've ensured that the transactions have not excluded the transaction pool limits, yet at each block, only one transaction gets imported.&#xD;&#xA;&#xD;&#xA;A more detailed description of the scenario:&#xD;&#xA;1. Launch a local network of three nodes with offchain workers that submit an unsigned transaction with maximum priority and different `provides` tags at each block&#xD;&#xA;2. One transaction gets taken from the `ready` pool, other two txs get pruned &amp; revalidated (even though the network is idling)&#xD;&#xA;3. On the next block, **two** transactions from **the next node** get imported, the other four (two from the previous block, two from this block) stay in the pool, get revalidated&#xD;&#xA;4. Repeat&#xD;&#xA;&#xD;&#xA;Could it be an issue of Aura (all three nodes are validators), an issue of priority, an issue of unsigned transactions, or something else? Are there any restrictions on how many transactions (given that they satisfy the limits) can be imported in a block? Thanks!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14344" PostHistoryTypeId="1" PostId="3816" RevisionGUID="f82731b2-4fd8-4b42-b801-00e868ed2cb7" CreationDate="2022-07-19T09:17:04.967" UserId="1951" Text="How many transactions with equal priority can be imported in one block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14345" PostHistoryTypeId="3" PostId="3816" RevisionGUID="f82731b2-4fd8-4b42-b801-00e868ed2cb7" CreationDate="2022-07-19T09:17:04.967" UserId="1951" Text="|transactions|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14346" PostHistoryTypeId="5" PostId="3796" RevisionGUID="2ac9a252-c355-4c18-b953-161f69231b27" CreationDate="2022-07-19T09:43:02.263" UserId="1789" Comment="added 284 characters in body; edited tags" Text="I have a parachain project that uses Frontier as a dependency with a specific Substrate version(polkadot-v0.9.24), but the Ethereum RPC does not work. So I need to find the bug there...&#xD;&#xA;&#xD;&#xA;Also I am aware of @JoshOrndorff's tutorial https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021&#xD;&#xA; about how to add Frontier into a Substrate Node Template: https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021, but that is a few months old with different substrate version... &#xD;&#xA;&#xD;&#xA;And the above is how to add Frontier as a dependency to Substrate Node Template, &#xD;&#xA;&#xD;&#xA;but how to add Frontier as a dependency to Substrate Parachain Template?&#xD;&#xA;&#xD;&#xA;Regarding the Frontier repo template...&#xD;&#xA;quote from Frontier https://github.com/paritytech/frontier/tree/master/template: &quot;used to generate a stand-alone template for use in an independent project via the included [template generation script](https://github.com/paritytech/frontier/blob/master/docs/node-template-release.md).&quot;&#xD;&#xA;&#xD;&#xA;Can this template generate a parachain project(based on substrate parachain template)?&#xD;&#xA;&#xD;&#xA;I need to generate a parachain project(based on substrate parachain template) that uses Frontier repo as a dependency.&#xD;&#xA;How can I do that? &#xD;&#xA;&#xD;&#xA;I found out some Frontier templates have been built and uploaded into Frontier Node Template repo https://github.com/substrate-developer-hub/frontier-node-template/tree/main&#xD;&#xA;&#xD;&#xA;It seems I can just copy the files under that repo above/node and runtime folder, then make my parachain from there. Is that a quick way to make my template parachain?&#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="14347" PostHistoryTypeId="6" PostId="3796" RevisionGUID="2ac9a252-c355-4c18-b953-161f69231b27" CreationDate="2022-07-19T09:43:02.263" UserId="1789" Comment="added 284 characters in body; edited tags" Text="|parachain|frontier|frontier-node-template|substrate-parachain-template|frontier-workshop|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14348" PostHistoryTypeId="2" PostId="3817" RevisionGUID="681f0d5f-9314-41f7-abf0-4fcfaa3f8402" CreationDate="2022-07-19T09:58:55.417" UserId="28" Text="There was at least one known issue here that has been resolved in the latest releases:&#xD;&#xA;&#xD;&#xA;* https://github.com/paritytech/substrate/issues/11604&#xD;&#xA;* https://github.com/paritytech/cumulus/pull/1382&#xD;&#xA;&#xD;&#xA;The best solution here is to upgrade to the latest client release." ContentLicense="CC BY-SA 4.0" />
  <row Id="14350" PostHistoryTypeId="2" PostId="3818" RevisionGUID="37704daa-9bca-4a68-9065-8dfbe6e18874" CreationDate="2022-07-19T10:06:57.397" UserId="2803" Text="I'm trying to get the length of hash. Currently, I tried to make use of `len_bytes()` like in [this docs][1]. But I encountered an error like the below image.&#xD;&#xA;Please help to solve this.! Thanks in advanced.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-core/3.0.0/sp_core/struct.H256.html&#xD;&#xA;  [2]: https://i.stack.imgur.com/6Sd4v.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14352" PostHistoryTypeId="1" PostId="3818" RevisionGUID="37704daa-9bca-4a68-9065-8dfbe6e18874" CreationDate="2022-07-19T10:06:57.397" UserId="2803" Text="How to get the Hash's length?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14353" PostHistoryTypeId="3" PostId="3818" RevisionGUID="37704daa-9bca-4a68-9065-8dfbe6e18874" CreationDate="2022-07-19T10:06:57.397" UserId="2803" Text="|substrate-node-template|rust|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14354" PostHistoryTypeId="2" PostId="3819" RevisionGUID="165fab34-ff84-44b0-81c7-90d6192e8609" CreationDate="2022-07-19T10:09:53.330" UserId="2025" Text="Not a direct answer to the question but I think this will be useful:&#xD;&#xA;&#xD;&#xA;Polkaholic.io just released [this block indexer](https://polkaholic.io/chain/polkadot#recentblocks) where you can monitor every XCM message [sent](https://polkaholic.io/xcmmessages/polkadot/all) and [received](https://polkaholic.io/xcmmessages/all/polkadot) from/in the relay chain. You can also explore extrinsics from the XCM pallet and monitor [their timeline](https://polkaholic.io/timeline/0xb1776894d4b57807c8d27e15c5b93f5bf234bc331efecb2c37844e8723a9ec0c).&#xD;&#xA;&#xD;&#xA;Note that it is the first version of this indexer tool so expect changes and improvements to be made." ContentLicense="CC BY-SA 4.0" />
  <row Id="14356" PostHistoryTypeId="5" PostId="3819" RevisionGUID="31de9a36-0307-404c-a2bb-97d376216540" CreationDate="2022-07-19T10:30:40.340" UserId="2025" Comment="imrpove" Text="Not a direct answer to the question but I think this will be useful:&#xD;&#xA;&#xD;&#xA;Polkaholic.io just released [this block indexer](https://polkaholic.io/chain/polkadot#recentblocks) where you can monitor every XCM message [sent](https://polkaholic.io/xcmmessages/polkadot/all) and [received](https://polkaholic.io/xcmmessages/all/polkadot) from/in the relay chain. You can also explore submitted extrinsics from the XCM pallet and monitor [their timeline](https://polkaholic.io/timeline/0xb1776894d4b57807c8d27e15c5b93f5bf234bc331efecb2c37844e8723a9ec0c) from chain to chain.&#xD;&#xA;&#xD;&#xA;Note that it is the first version of this indexer tool so expect changes and improvements to be made." ContentLicense="CC BY-SA 4.0" />
  <row Id="14360" PostHistoryTypeId="5" PostId="3815" RevisionGUID="8fb6ed36-bc97-4ee3-96b8-07c4da7f4a2a" CreationDate="2022-07-19T10:59:28.517" UserId="2025" Comment="beautify and fix links" Text="Yes, runtime upgrades need to pass by referendum (i.e. voted on by all DOT holders). The majority of stake always commands the network. There is in fact a Referendum right now to upgrade Polkadot to runtime v9250, see: https://polkadot.polkassembly.io/referendum/69 &#xD;&#xA;&#xD;&#xA;for details or you can vote on it yourself [here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.api.onfinality.io%2Fpublic-ws#/democracySee) &#xD;&#xA;&#xD;&#xA;for the details of how this works have a look to [this doc page](https://wiki.polkadot.network/docs/learn-governance#referenda)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;credits: &#xD;&#xA;Bill|W3f" ContentLicense="CC BY-SA 4.0" />
  <row Id="14361" PostHistoryTypeId="24" PostId="3815" RevisionGUID="8fb6ed36-bc97-4ee3-96b8-07c4da7f4a2a" CreationDate="2022-07-19T10:59:28.517" Comment="Proposed by 2025 approved by 34 edit id of 243" ContentLicense="CC BY-SA 4.0" />
  <row Id="14362" PostHistoryTypeId="4" PostId="3795" RevisionGUID="7d44fb3e-f9ae-4104-8105-399daf3fe330" CreationDate="2022-07-19T11:44:03.583" UserId="29" Comment="edited title" Text="While running collator with our paraId having error" ContentLicense="CC BY-SA 4.0" />
  <row Id="14363" PostHistoryTypeId="2" PostId="3821" RevisionGUID="30a6e0eb-9f57-403a-a44e-c184e2f7b32b" CreationDate="2022-07-19T14:21:50.900" UserId="2878" Text="I want to create custom data structure. I'm a newbie with Rust and Ink! and can't get how to implement my data structure to use it in ```Mapping```.&#xD;&#xA;I have such a structure:&#xD;&#xA;```&#xD;&#xA;pub struct TokenInfo {&#xD;&#xA;    data: [u8; 284],&#xD;&#xA;    in_collection: bool,&#xD;&#xA;    init_price: Balance,&#xD;&#xA;    init_owner: AccountId,&#xD;&#xA;    for_sale: bool,&#xD;&#xA;    discount_duration: u64,&#xD;&#xA;    birth_date: Timestamp,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;1. Should I implement it as a structure and add a ```Mapping``` field of that structure to my storage or implement it as separated values and add a ```Mapping``` field to each of it to my storage?&#xD;&#xA;2. I found something close to my problem on this site https://ink.substrate.io/datastructures/custom-datastructure but there's only example with one ```bool``` variable.&#xD;&#xA; - How to implement ```SpreadLayout``` for my structure with a bunch of different variables?&#xD;&#xA; - How to calculate ```FOOTPRINT```? Guess I should add 1 for every ```i32```. But what's about ```u8```? Divide by 4? What's about bool? In example above there's added 1 only for one ```bool``` variable. I understand that you can't lock half of a storage cell but don't understand how should I calculate the ```FOOTPRINT```. I'm really confused about it. I got 82 for ```FOOTPRINT```, does my calculations right? &#xD;&#xA; - Also I don't understand how to implement functions: ```pull_spread()```, ```push_spread()``` and ```clear_spread()```. How to handle a lot of variables in these functions?&#xD;&#xA;3. How to use structure implemented as a ```SpreadLayout```? I have an error of ```unsatisfied trait bounds``` when trying to get value of the structure with ```get()``` function of ```Mapping``` or when trying to set value with ```insert()``` function. Should I use new functions: ```pull_spread()```, ```push_spread()``` and ```clear_spread()``` instead?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14365" PostHistoryTypeId="1" PostId="3821" RevisionGUID="30a6e0eb-9f57-403a-a44e-c184e2f7b32b" CreationDate="2022-07-19T14:21:50.900" UserId="2878" Text="How to implement Custom Data Structure for ink! storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14366" PostHistoryTypeId="3" PostId="3821" RevisionGUID="30a6e0eb-9f57-403a-a44e-c184e2f7b32b" CreationDate="2022-07-19T14:21:50.900" UserId="2878" Text="|ink|smart-contract|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14369" PostHistoryTypeId="2" PostId="3823" RevisionGUID="a717713c-c04f-4e37-9186-4589814209f8" CreationDate="2022-07-19T15:22:21.490" UserId="172" Text="As I understand it, substrate light clients (a.k.a [smoldot](https://github.com/paritytech/smoldot)) connect to full nodes in order to receive block headers. &#xD;&#xA;&#xD;&#xA;I am wondering about what incentives these full nodes have to keep providing block headers to light nodes and what are their costs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14371" PostHistoryTypeId="1" PostId="3823" RevisionGUID="a717713c-c04f-4e37-9186-4589814209f8" CreationDate="2022-07-19T15:22:21.490" UserId="172" Text="What incentives exist for a full node to provide block headers to a light client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14372" PostHistoryTypeId="3" PostId="3823" RevisionGUID="a717713c-c04f-4e37-9186-4589814209f8" CreationDate="2022-07-19T15:22:21.490" UserId="172" Text="|substrate-node|networking|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14373" PostHistoryTypeId="2" PostId="3824" RevisionGUID="dd7e2ffa-3067-4ee1-9d37-7ba1efc2914f" CreationDate="2022-07-19T15:39:19.630" UserId="1789" Text="Check out the Frontier Node Template repo https://github.com/substrate-developer-hub/frontier-node-template&#xD;&#xA;&#xD;&#xA;Copy the files in node and runtime folders inside the above repo, then make your parachain from there. It is the quickest way to make a parachain that uses Frontier as a dependency. &#xD;&#xA;&#xD;&#xA;Also check out other open source parachain repositories for specific Substrate versions!" ContentLicense="CC BY-SA 4.0" />
  <row Id="14375" PostHistoryTypeId="2" PostId="3825" RevisionGUID="8a4d5730-c092-495d-a0c5-2fb959317f38" CreationDate="2022-07-19T16:03:32.723" UserId="507" Text="There's upcoming features coming to pallet uniques. They are now merged to master of substrate repo but not yet released. We would like to be prepared for it on Singular marketplace but not 100% sure how to generate types to work on the UI with it. I can generate custom chain types, and import it as api-augument, this will decorate tx, query, rpc calls but the return types (definitions/interfaces) are un-decorated then (returns typles and codecs instead of the actual types). Any advice on this?&#xD;&#xA;&#xD;&#xA;The features I am talking about for the reference:&#xD;&#xA;https://github.com/paritytech/substrate/commit/9dad17f77b8a56ccf0d289ae410ee1e61d9b12a1&#xD;&#xA;&#xD;&#xA;when I add this to custom node and then generate chain types from it and replace my augmentation with it I get the new methods like `buyItem` but return types of all uniques methods are under-decorated" ContentLicense="CC BY-SA 4.0" />
  <row Id="14377" PostHistoryTypeId="1" PostId="3825" RevisionGUID="8a4d5730-c092-495d-a0c5-2fb959317f38" CreationDate="2022-07-19T16:03:32.723" UserId="507" Text="How to decorate polkadot.js api with upcoming runtime features" ContentLicense="CC BY-SA 4.0" />
  <row Id="14378" PostHistoryTypeId="3" PostId="3825" RevisionGUID="8a4d5730-c092-495d-a0c5-2fb959317f38" CreationDate="2022-07-19T16:03:32.723" UserId="507" Text="|polkadot-js|typescript|uniques|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14379" PostHistoryTypeId="2" PostId="3826" RevisionGUID="66fb4a55-3a63-4384-bb2f-ef241dbc55a2" CreationDate="2022-07-19T18:39:18.793" UserId="12" Text="I am working with the team that is developing [the MetaMask snap for Polkadot-like networks][1]. In addition to this wallet and [the well known Polkadot-JS extension][2], there are [Fearless Wallet][3], [Talisman][4], and I'm sure many others. The Ethereum ecosystem maintains [a modal to make it easy for dApp developers to support multiple wallets][5], as does [the Near ecosystem][6]. Is there an established/preferred pattern for dealing with the multiple wallets that exist in the Polkadot ecosystem? If such a solution doesn't currently exist, would a solution similar to the Ethereum/Near solutions be a desirable addition to the Polkadot ecosystem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ChainSafe/metamask-snap-polkadot&#xD;&#xA;  [2]: https://github.com/polkadot-js/extension&#xD;&#xA;  [3]: https://fearlesswallet.io/&#xD;&#xA;  [4]: https://talisman.xyz/&#xD;&#xA;  [5]: https://github.com/Web3Modal/web3modal&#xD;&#xA;  [6]: https://github.com/near/wallet-selector" ContentLicense="CC BY-SA 4.0" />
  <row Id="14381" PostHistoryTypeId="1" PostId="3826" RevisionGUID="66fb4a55-3a63-4384-bb2f-ef241dbc55a2" CreationDate="2022-07-19T18:39:18.793" UserId="12" Text="Wallet Selection Modal" ContentLicense="CC BY-SA 4.0" />
  <row Id="14382" PostHistoryTypeId="3" PostId="3826" RevisionGUID="66fb4a55-3a63-4384-bb2f-ef241dbc55a2" CreationDate="2022-07-19T18:39:18.793" UserId="12" Text="|wallet|polkadot-js-extension|metamask|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14383" PostHistoryTypeId="2" PostId="3827" RevisionGUID="2378ac54-1e50-46d4-af0a-6feb62086fab" CreationDate="2022-07-19T19:08:12.287" UserId="2722" Text="When I going to `Request your parachain slot` but every time I want to press sign transaction the button, it shows me this error `system.ExtrinsicFailed BadOrigin` . &#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this problem?**&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="14385" PostHistoryTypeId="1" PostId="3827" RevisionGUID="2378ac54-1e50-46d4-af0a-6feb62086fab" CreationDate="2022-07-19T19:08:12.287" UserId="2722" Text="system.ExtrinsicFailed BadOrigin" ContentLicense="CC BY-SA 4.0" />
  <row Id="14386" PostHistoryTypeId="3" PostId="3827" RevisionGUID="2378ac54-1e50-46d4-af0a-6feb62086fab" CreationDate="2022-07-19T19:08:12.287" UserId="2722" Text="|substrate-node|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14388" PostHistoryTypeId="5" PostId="3827" RevisionGUID="2c31eadc-87ad-4bb3-8fdb-693e58d4807d" CreationDate="2022-07-19T19:17:41.840" UserId="2722" Comment="added 89 characters in body" Text="When I going to `Request your parachain slot` but every time I want to press sign transaction the button, it shows me this error `system.ExtrinsicFailed BadOrigin` . &#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this problem?**&#xD;&#xA;  &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Ohbrw.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14389" PostHistoryTypeId="5" PostId="3826" RevisionGUID="ed01bfcf-21a7-48a3-9570-dedf7622dfee" CreationDate="2022-07-19T19:30:07.263" UserId="12" Comment="Fearless Wallet -&gt; Nova Wallet" Text="I am working with the team that is developing [the MetaMask snap for Polkadot-like networks][1]. In addition to this wallet and [the well known Polkadot-JS extension][2], there are [Nova Wallet][3], [Talisman][4], and I'm sure many others. The Ethereum ecosystem maintains [a modal to make it easy for dApp developers to support multiple wallets][5], as does [the Near ecosystem][6]. Is there an established/preferred pattern for dealing with the multiple wallets that exist in the Polkadot ecosystem? If such a solution doesn't currently exist, would a solution similar to the Ethereum/Near solutions be a desirable addition to the Polkadot ecosystem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ChainSafe/metamask-snap-polkadot&#xD;&#xA;  [2]: https://github.com/polkadot-js/extension&#xD;&#xA;  [3]: https://novawallet.io/&#xD;&#xA;  [4]: https://talisman.xyz/&#xD;&#xA;  [5]: https://github.com/Web3Modal/web3modal&#xD;&#xA;  [6]: https://github.com/near/wallet-selector" ContentLicense="CC BY-SA 4.0" />
  <row Id="14390" PostHistoryTypeId="2" PostId="3828" RevisionGUID="e63e07ab-dd89-4b27-b318-463bbfcf017a" CreationDate="2022-07-19T19:31:28.577" UserId="2698" Text="The error was caused by some format errors when configuring the runtime for the pallet I added. The first issue was the pallet was not imported and the second is when I used asterisks instead of quotes for the std configuration." ContentLicense="CC BY-SA 4.0" />
  <row Id="14392" PostHistoryTypeId="2" PostId="3829" RevisionGUID="9fb7a180-9c09-4b95-b473-df05d495b218" CreationDate="2022-07-19T19:52:03.873" UserId="138" Text="I am building a somewhat generic client for Substrate-based chains in Rust using the `subxt` crate. To learn about runtime calls, my goal was to call the `core.version` runtime API directly using the RPC endpoint `state_call`.&#xD;&#xA;&#xD;&#xA;Internally `subxt` uses a special RPC endpoint `state_getRuntimeVersion`, but that just gets redirected to the runtime at the specific block anyways:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    /// Fetch the runtime version&#xD;&#xA;    pub async fn runtime_version(&#xD;&#xA;        &amp;self,&#xD;&#xA;        at: Option&lt;T::Hash&gt;,&#xD;&#xA;    ) -&gt; Result&lt;RuntimeVersion, BasicError&gt; {&#xD;&#xA;        let params = rpc_params![at];&#xD;&#xA;        let version = self&#xD;&#xA;            .client&#xD;&#xA;            .request(&quot;state_getRuntimeVersion&quot;, params)&#xD;&#xA;            .await?;&#xD;&#xA;        Ok(version)&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This was my try to make the runtime call directly:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    let version: subxt::rpc::RuntimeVersion = rpc_client&#xD;&#xA;        .rpc()&#xD;&#xA;        .client&#xD;&#xA;        .request(&quot;state_call&quot;, rpc_params![&quot;core.version&quot;, &quot;&quot;])&#xD;&#xA;        .await&#xD;&#xA;        .unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it just errs out with `Exported method core.version is not found`. How can I make this call work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14394" PostHistoryTypeId="1" PostId="3829" RevisionGUID="9fb7a180-9c09-4b95-b473-df05d495b218" CreationDate="2022-07-19T19:52:03.873" UserId="138" Text="Simple runtime call in Rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="14395" PostHistoryTypeId="3" PostId="3829" RevisionGUID="9fb7a180-9c09-4b95-b473-df05d495b218" CreationDate="2022-07-19T19:52:03.873" UserId="138" Text="|rust|subxt|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14396" PostHistoryTypeId="2" PostId="3830" RevisionGUID="58ba1a7c-4c2f-4b86-84b4-1be68a88aec2" CreationDate="2022-07-19T20:57:14.617" UserId="494" Text="The node provided by [substrate-parachain-template](https://github.com/substrate-developer-hub/substrate-parachain-template) provides the same command:&#xD;&#xA;```&#xD;&#xA;./parachain-collator benchmark machine&#xD;&#xA;2022-07-19 17:55:28 Running machine benchmarks... &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14402" PostHistoryTypeId="2" PostId="3831" RevisionGUID="cba5fec7-f47e-4e19-bb70-a68ec05ab82c" CreationDate="2022-07-19T22:05:44.203" UserId="28" Text="Currently there are no incentives, but it is something that will need to be thought through, designed, and implemented in time." ContentLicense="CC BY-SA 4.0" />
  <row Id="14404" PostHistoryTypeId="2" PostId="3832" RevisionGUID="12a50e17-eea8-4b32-9ee3-871b028f7ab0" CreationDate="2022-07-19T22:10:22.293" UserId="28" Text="Probably there are some tricks related to getting the types working with the TypeScript type generation:&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/docs/api/examples/promise/typegen&#xD;&#xA;&#xD;&#xA;However, you will not be able to call and test these new extrinsics with just the new types.&#xD;&#xA;&#xD;&#xA;Instead I suggest you run a test network with the latest version of Substrate, which should give you access to the latest pallet and all the new APIs, calls, and types.&#xD;&#xA;&#xD;&#xA;You can test against this, and then have confidence that your UI is ready when the upgrade happens on the main network.&#xD;&#xA;&#xD;&#xA;Additionally, you can add simple checks like:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;if api.tx.uniques.set_price { /* then show ui for set price */ }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will automatically feature gate your UI to only show elements which a runtime supports the new calls for." ContentLicense="CC BY-SA 4.0" />
  <row Id="14406" PostHistoryTypeId="2" PostId="3833" RevisionGUID="0941949f-c410-4d28-893a-b2d6c4c4c6c8" CreationDate="2022-07-19T22:12:29.023" UserId="28" Text="The process to request a slot on Rococo is defined here:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/connect-other-chains/rococo-slot/&#xD;&#xA;&#xD;&#xA;You cannot make this call yourself as the function is permissioned so that only certain Rococo administrators can access it." ContentLicense="CC BY-SA 4.0" />
  <row Id="14408" PostHistoryTypeId="6" PostId="3827" RevisionGUID="a3cee47d-e9e7-420f-bcc2-13e0a184fdf6" CreationDate="2022-07-19T22:12:51.620" UserId="28" Comment="edited tags" Text="|parachain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14409" PostHistoryTypeId="4" PostId="3827" RevisionGUID="a3cee47d-e9e7-420f-bcc2-13e0a184fdf6" CreationDate="2022-07-19T22:12:51.620" UserId="28" Comment="edited tags" Text="Error requesting Rococo Parachain Slot" ContentLicense="CC BY-SA 4.0" />
  <row Id="14410" PostHistoryTypeId="2" PostId="3834" RevisionGUID="c99bf984-e926-4ab6-ad3d-39382fb0e2e2" CreationDate="2022-07-19T22:22:45.673" UserId="28" Text="I am not sure if your node will break including the pallet without a genesis, but there are a few functions like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Reset all the well known nodes. This will not remove the ownership and additional&#xD;&#xA;/// connections for the removed nodes. The node owner can perform further cleaning if&#xD;&#xA;/// they decide to leave the network.&#xD;&#xA;///&#xD;&#xA;/// May only be called from `T::ResetOrigin`.&#xD;&#xA;///&#xD;&#xA;/// - `nodes`: the new nodes for the allow list.&#xD;&#xA;#[pallet::weight((T::WeightInfo::reset_well_known_nodes(), DispatchClass::Operational))]&#xD;&#xA;pub fn reset_well_known_nodes(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	nodes: Vec&lt;(PeerId, T::AccountId)&gt;,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;	T::ResetOrigin::ensure_origin(origin)?;&#xD;&#xA;	ensure!(nodes.len() &lt; T::MaxWellKnownNodes::get() as usize, Error::&lt;T&gt;::TooManyNodes);&#xD;&#xA;&#xD;&#xA;	Self::initialize_nodes(&amp;nodes);&#xD;&#xA;&#xD;&#xA;	Self::deposit_event(Event::NodesReset { nodes });&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which allow you to initialize or set into storage the nodes you want to use.&#xD;&#xA;&#xD;&#xA;If not having the genesis would break the chain, there are three ways forward:&#xD;&#xA;&#xD;&#xA;1. Install this pallet into your runtime, but do not actually configure it to control the nodes on your network. Instead, use whatever the existing system you have is, and just stick it in there to do nothing. Then you can add the nodes you want via these calls.&#xD;&#xA;&#xD;&#xA;2. Use a runtime migration in the runtime upgrade to set the expected nodes you would otherwise set in genesis. It should basically be easy enough to call the genesis initialization at the beginning of any new block via `on_runtime_upgrade`.&#xD;&#xA;&#xD;&#xA;3. Use a call like `set_storage` to set the storage for the validator nodes where the pallet would expect to find them. You can do this before the pallet is ever added to your chain, and then, as soon as it is added, the data is already there. This is similar to a runtime migration, but done beforehand instead of on the fly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;End of the day, storage is just storage. Genesis initialization is just setting values into storage, and then the pallet can read and use those values. You can set those storage values a million different ways, and the pallet will work just fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="14412" PostHistoryTypeId="2" PostId="3835" RevisionGUID="c60e7de4-15a5-483b-ae93-307daadaed99" CreationDate="2022-07-19T22:26:17.333" UserId="1798" Text="Question on using the Substrate Sidecar API. I'm trying to get the current &quot;era&quot; a block is in. Looking through the API endpoints it's not clear which one would give me that. The &quot;blocks/head&quot; endpoint has an &quot;era&quot; field however it's only for extrinsics and their life span. I'm looking for something like how this [website][1] displays it. Any ideas?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkastats.io/block?blockNumber=11000000" ContentLicense="CC BY-SA 4.0" />
  <row Id="14414" PostHistoryTypeId="1" PostId="3835" RevisionGUID="c60e7de4-15a5-483b-ae93-307daadaed99" CreationDate="2022-07-19T22:26:17.333" UserId="1798" Text="How can I find out what era a block was produced in?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14415" PostHistoryTypeId="3" PostId="3835" RevisionGUID="c60e7de4-15a5-483b-ae93-307daadaed99" CreationDate="2022-07-19T22:26:17.333" UserId="1798" Text="|sidecar|substrate-api-sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14416" PostHistoryTypeId="2" PostId="3836" RevisionGUID="b1ef3b9d-e9bc-46f0-b5af-dba67bc3fd77" CreationDate="2022-07-19T22:35:11.097" UserId="1798" Text="You can find the documentation for all Substrate API Sidecar endpoints [here][1].&#xD;&#xA;&#xD;&#xA;For the information you're looking for, you can use the `/pallets/staking/progress` endpoint. By default, this will look up the latest block, but you can also pass in a historical block as a query param `...?at=&lt;blockNumber&gt;`. The value you are looking for will be found in the &quot;activeEra&quot; key.&#xD;&#xA;&#xD;&#xA;Here is a snipped example of the object returned from `/pallets/staking/progress?at=11000000`:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;at&quot;: {&#xD;&#xA;        &quot;hash&quot;: &quot;0x7fae32d478e996a90f0cad3ce0ac4b642b6d794c394bec0de4b9a10038fc924a&quot;,&#xD;&#xA;        &quot;height&quot;: &quot;11000000&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;activeEra&quot;: &quot;761&quot;, &lt;--- What you're looking for&#xD;&#xA;&#xD;&#xA;   /*-SNIP-*/&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate-api-sidecar/dist/" ContentLicense="CC BY-SA 4.0" />
  <row Id="14420" PostHistoryTypeId="2" PostId="3837" RevisionGUID="774cb1f1-2ca6-4998-983f-53bf862dad3a" CreationDate="2022-07-20T00:07:24.533" UserId="29" Text="This issue was reported here: https://github.com/paritytech/substrate/issues/11709 and a fix has recently been merged into `master` here: https://github.com/paritytech/substrate/pull/11851" ContentLicense="CC BY-SA 4.0" />
  <row Id="14422" PostHistoryTypeId="2" PostId="3838" RevisionGUID="059b46ee-751c-4e89-b418-23d7c4adda8e" CreationDate="2022-07-20T02:21:01.043" UserId="445" Text="Go to **Cargo.lock** -&gt; search **name = &quot;syn&quot;** -&gt; remove **checksum** -&gt; set **version = &quot;1.0.96&quot;** (with branch =&quot;polkadot-v0.9.24) &#xD;&#xA;With another branch, you should choose **&quot;syn&quot;** version properly" ContentLicense="CC BY-SA 4.0" />
  <row Id="14424" PostHistoryTypeId="5" PostId="3838" RevisionGUID="858b838d-82a8-4879-b824-dfb08dc31920" CreationDate="2022-07-20T02:22:53.103" UserId="445" Comment="added 26 characters in body" Text="Go to **Cargo.lock** -&gt; search **name = &quot;syn&quot;** -&gt; remove **checksum** -&gt; set **version = &quot;1.0.96&quot;** (with branch =&quot;polkadot-v0.9.24) -&gt; cargo build --release&#xD;&#xA;&#xD;&#xA;With another branch, you should choose **&quot;syn&quot;** version properly" ContentLicense="CC BY-SA 4.0" />
  <row Id="14425" PostHistoryTypeId="2" PostId="3839" RevisionGUID="5ec78edd-8d35-454d-b86a-824139bec13d" CreationDate="2022-07-20T04:26:32.953" UserId="140" Text="As I checked with community on element, we can have same potId." ContentLicense="CC BY-SA 4.0" />
  <row Id="14427" PostHistoryTypeId="2" PostId="3840" RevisionGUID="15eafc0c-a419-4245-8ded-31b32512b082" CreationDate="2022-07-20T07:06:01.213" UserId="2736" Text="The problem has just been resolved resolved in https://github.com/paritytech/substrate/pull/11854." ContentLicense="CC BY-SA 4.0" />
  <row Id="14429" PostHistoryTypeId="52" PostId="3835" RevisionGUID="7ce91cd5-b49f-4b4a-a042-7113b2100114" CreationDate="2022-07-20T07:22:15.797" />
  <row Id="14430" PostHistoryTypeId="2" PostId="3841" RevisionGUID="bff79d1b-f3f3-4463-badf-5a8488aa93c2" CreationDate="2022-07-20T07:40:18.277" UserId="1789" Text="Regarding this tutorial &quot;**Connect a local parachain**&quot;: https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/, it requires &#xD;&#xA;- using GUI in a browser to Reserve a ParaID (that is to use Polkadot-JS Apps connecting to your local relay chain)&#xD;&#xA;- using GUI in a browser to do Parachain Registration... &#xD;&#xA;- confirming parachain collator block production in command output&#xD;&#xA;&#xD;&#xA;How can I do all that in command line(CLI) only?&#xD;&#xA;&#xD;&#xA;It will be much easier and quicker for me to write a bash script to run through the whole process.&#xD;&#xA;&#xD;&#xA;Also I need to run this whole process in a Github CICD.&#xD;&#xA;Please advise." ContentLicense="CC BY-SA 4.0" />
  <row Id="14432" PostHistoryTypeId="1" PostId="3841" RevisionGUID="bff79d1b-f3f3-4463-badf-5a8488aa93c2" CreationDate="2022-07-20T07:40:18.277" UserId="1789" Text="How to use command line to Reserve ParaID and register Parachain locally" ContentLicense="CC BY-SA 4.0" />
  <row Id="14433" PostHistoryTypeId="3" PostId="3841" RevisionGUID="bff79d1b-f3f3-4463-badf-5a8488aa93c2" CreationDate="2022-07-20T07:40:18.277" UserId="1789" Text="|polkadot-js|parachain|parachain-collator|relay-chain|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14434" PostHistoryTypeId="6" PostId="3829" RevisionGUID="30bd7419-ea40-4d33-aa0a-0ee32221a331" CreationDate="2022-07-20T07:54:15.320" UserId="138" Comment="edited tags" Text="|rust|subxt|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14435" PostHistoryTypeId="2" PostId="3842" RevisionGUID="68e4a285-da60-4a76-af28-f885f33f7572" CreationDate="2022-07-20T08:53:09.123" UserId="85" Text="I think you've found this out, but for others: In chrome you can run polkadot js and then inspect the webpage and switch over to the network tab. From there if you click on `ws` to filter to the websockets you can see the request and response from the UI for any call whether that's a state query, rpc call, runtime call or submitting an extrinsic. &#xD;&#xA;&#xD;&#xA;Here's the request you can see on the wire:&#xD;&#xA;`{&quot;id&quot;:157,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_call&quot;,&quot;params&quot;:[&quot;Core_version&quot;,&quot;0x&quot;]}`&#xD;&#xA;&#xD;&#xA;The result is &#xD;&#xA;`{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x20706f6c6b61646f743c7061726974792d706f6c6b61646f74000000000e2400000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000c00000000&quot;,&quot;id&quot;:157}`&#xD;&#xA;and we can see in polkadot js this decodes to &#xD;&#xA;&#xD;&#xA;`&#xD;&#xA;{&#xD;&#xA;  specName: polkadot&#xD;&#xA;  implName: parity-polkadot&#xD;&#xA;  authoringVersion: 0&#xD;&#xA;  specVersion: 9,230&#xD;&#xA;  implVersion: 0&#xD;&#xA;  apis: [&#xD;&#xA;    [&#xD;&#xA;      0xdf6acb689907609b&#xD;&#xA;      4&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x37e397fc7c91f5e4&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x40fe3ad401f8959a&#xD;&#xA;      6&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xd2bc9897eed08f15&#xD;&#xA;      3&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xf78b278be53f454c&#xD;&#xA;      2&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xaf2c0297a23e6d3d&#xD;&#xA;      2&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x49eaaf1b548a0cb0&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x91d5df18b0d2cf58&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xed99c5acb25eedf5&#xD;&#xA;      3&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xcbca25e39f142387&#xD;&#xA;      2&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x687ad44ad37f03c2&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xab3c0572291feb8b&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xbc9d89904f5b923f&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x37c8bb1350a9a2a8&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;  ]&#xD;&#xA;  transactionVersion: 12&#xD;&#xA;  stateVersion: 0&#xD;&#xA;}&#xD;&#xA;7: core.version: RuntimeVersion&#xD;&#xA;{&#xD;&#xA;  specName: polkadot&#xD;&#xA;  implName: parity-polkadot&#xD;&#xA;  authoringVersion: 0&#xD;&#xA;  specVersion: 9,230&#xD;&#xA;  implVersion: 0&#xD;&#xA;  apis: [&#xD;&#xA;    [&#xD;&#xA;      0xdf6acb689907609b&#xD;&#xA;      4&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x37e397fc7c91f5e4&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x40fe3ad401f8959a&#xD;&#xA;      6&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xd2bc9897eed08f15&#xD;&#xA;      3&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xf78b278be53f454c&#xD;&#xA;      2&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xaf2c0297a23e6d3d&#xD;&#xA;      2&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x49eaaf1b548a0cb0&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x91d5df18b0d2cf58&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xed99c5acb25eedf5&#xD;&#xA;      3&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xcbca25e39f142387&#xD;&#xA;      2&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x687ad44ad37f03c2&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xab3c0572291feb8b&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0xbc9d89904f5b923f&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;    [&#xD;&#xA;      0x37c8bb1350a9a2a8&#xD;&#xA;      1&#xD;&#xA;    ]&#xD;&#xA;  ]&#xD;&#xA;  transactionVersion: 12&#xD;&#xA;  stateVersion: 0&#xD;&#xA;}`&#xD;&#xA;&#xD;&#xA;polkadot in hex is 70 6f 6c 6b 61 64 6f 74 so that gives you a pretty good steer on the decoding front. The code is [here][1] to decode it. The 0x20 prefix will be a `Compact&lt;u32&gt;` saying what the string length is. But you should be able to call `RuntimeVersion::decode(&amp;mut &amp;bytes[..])` to decode it all in one go.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/5597a93a8c8b1ab578693c68549e3ce1902f3eaf/primitives/version/src/lib.rs#L228" ContentLicense="CC BY-SA 4.0" />
  <row Id="14437" PostHistoryTypeId="2" PostId="3843" RevisionGUID="7bab3386-f714-45f4-80d4-7ff3cb36198f" CreationDate="2022-07-20T09:53:53.187" UserId="1789" Text="Zombienet uses an RPC endpoint internally to issue a transaction to register the parachain using sudo iirc&#xD;&#xA;&#xD;&#xA;Then use Zombienet to run custom Js script:&#xD;&#xA;https://github.com/paritytech/zombienet/blob/main/docs/src/test-dsl-definition-spec.md :&#xD;&#xA;```&#xD;&#xA;Custom js scripts: Allow to run a defined script and assert on the completeness or return value.&#xD;&#xA;&#xD;&#xA;    node-name: js-script script_relative_path [ return is comparator target_value] [within x seconds]&#xD;&#xA;        alice: js-script ./0008-custom.js return is greater than 1 within 200 seconds&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14439" PostHistoryTypeId="2" PostId="3844" RevisionGUID="225dd206-374c-4da2-a4a7-efd41cbd9b14" CreationDate="2022-07-20T10:51:01.200" UserId="2484" Text="I read the answer of Shawn about locked and reserved balances. https://substrate.stackexchange.com/questions/24/what-is-the-difference-between-free-balance-reserved-balance-locked-balance-v&#xD;&#xA;&#xD;&#xA;He pointed out, that locked funds (`WithdrawReasons::TRANSFER`) can still be reserved.&#xD;&#xA;&#xD;&#xA;&gt; So if an account has a lock for 100 units with WithdrawReasons::Transfer, it cannot make a transfer which brings its free balance lower than 100 units. However, this account will be able to perform another operation like reserve taking its free balance below 100 units.&#xD;&#xA;&#xD;&#xA;I tried this, but `pallet_balances` returns the `LiquidityRestrictions` error when I try to reserve locked funds.&#xD;&#xA;&#xD;&#xA;https://crates.parity.io/src/pallet_balances/lib.rs.html#1445&#xD;&#xA;&#xD;&#xA;Shouldn't be a reserve allowed while having it locked at the same time or is it correct as it is?&#xD;&#xA;&#xD;&#xA;I mean the `free_balance` after a lock is still untouched. This could indicate that a `reserve` can happen." ContentLicense="CC BY-SA 4.0" />
  <row Id="14441" PostHistoryTypeId="1" PostId="3844" RevisionGUID="225dd206-374c-4da2-a4a7-efd41cbd9b14" CreationDate="2022-07-20T10:51:01.200" UserId="2484" Text="Why is `reserve` restricted for locked balances?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14442" PostHistoryTypeId="3" PostId="3844" RevisionGUID="225dd206-374c-4da2-a4a7-efd41cbd9b14" CreationDate="2022-07-20T10:51:01.200" UserId="2484" Text="|balances|transfer|reserved-balance|locked-balance|free-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14443" PostHistoryTypeId="2" PostId="3845" RevisionGUID="a1479b17-376a-4746-82c2-9441c3d8329b" CreationDate="2022-07-20T13:00:51.973" UserId="2582" Text="So there is a repo [parity-bridges-common](https://github.com/paritytech/parity-bridges-common) that contains &quot;Useful Bridge Building Tools&quot; and is currently under development.&#xD;&#xA;&#xD;&#xA;This repo [uses XCMv3 branches of polkadot and substrate]() (which is not released to master yet), however we need to work with main versions of Substrate/Polkadot (for example, with latest polkadot v0.9.26). What would be the best way to organise it (i.e. how to use these templates/examples in more recent versions)?&#xD;&#xA;&#xD;&#xA;In [parity-bridges-common's Cargo.toml](https://github.com/paritytech/parity-bridges-common/blob/16aaeb9f9d80c5437001f4739b7f8a338287bf4b/Cargo.toml#L17) and in some [old PR](https://github.com/paritytech/parity-bridges-common/pull/1378) it is written that the intention is to move to the main versions later when the 3rd XCM version will be released. So one way is to work with this branch as well. However, it would require to (kind of) rollback to older version of substrate (since the XCM branch diverged from main ones about 3 months ago). Furthermore, I'm worried that latter migration to newer substrate version (on XCM v3 release) may turn out labour intensive.&#xD;&#xA;&#xD;&#xA;Is there any better way to use these bridge tools for development or such overhead is unavoidable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14445" PostHistoryTypeId="1" PostId="3845" RevisionGUID="a1479b17-376a-4746-82c2-9441c3d8329b" CreationDate="2022-07-20T13:00:51.973" UserId="2582" Text="How `parity-bridges-common` is intended to be used for development?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14446" PostHistoryTypeId="3" PostId="3845" RevisionGUID="a1479b17-376a-4746-82c2-9441c3d8329b" CreationDate="2022-07-20T13:00:51.973" UserId="2582" Text="|polkadot|xcm|build|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14454" PostHistoryTypeId="2" PostId="3848" RevisionGUID="e0ad40c8-e6ee-402f-bbcb-b6fbc2aaab62" CreationDate="2022-07-20T14:07:39.853" UserId="2384" Text="Basically, I keep in mind that everything I do from frontend is just some calls to chain. Even the actual command might get complicated depending on abstraction of what we trying to do but you just have to figure our right method.&#xD;&#xA;&#xD;&#xA;Being specific to your use case, please see&#xD;&#xA;&#xD;&#xA;polkadot-launch's `registerParachain` method: https://github.com/paritytech/polkadot-launch/blob/951af7055e2c9abfa7a03ee7848548c1a3efdc16/src/rpc.ts#L38&#xD;&#xA;&#xD;&#xA;This will help you to bring the process atleast to nodejs which can be then accessed from Ci/Cd. To convert it to actual raw bash/sh script, you might monitor the calls made while you do the process and replicate it. But I guess this will not gonna be worth to write in bash if you can have it on nodejs." ContentLicense="CC BY-SA 4.0" />
  <row Id="14456" PostHistoryTypeId="2" PostId="3849" RevisionGUID="371cd2ff-7784-4789-a777-f8a0d1c4150a" CreationDate="2022-07-20T15:15:09.860" UserId="1951" Text="The solution was much simpler than I imagined. In my `ValidateUnsigned`, I added a check to restrict the transactions from `TransactionSource::External`, and completely forgot that the transactions that are gossiped get the `External` transaction source.&#xD;&#xA;The solution was to enable debug logs for `sc_service`, see the error and remove that check." ContentLicense="CC BY-SA 4.0" />
  <row Id="14458" PostHistoryTypeId="2" PostId="3850" RevisionGUID="01bc4f1a-dbac-42de-b568-c33f4a40f991" CreationDate="2022-07-20T16:22:57.860" UserId="2163" Text="I am a bit confused about this. If I have a pr on Substrate that requires a companion on Cumulus that adds to the weight file for a given pallet, how do I calculate the weight? I can run the ```benchmark.sh``` script inside the cumulus repo locally, but that will generate the weight while running on my machine. What is the way to run the benchmark on the benchmarking machine for the new code when the pr on substrate is not merged yet?&#xD;&#xA;&#xD;&#xA;I am probably missing something, so I hope someone could explain this to me.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="14460" PostHistoryTypeId="1" PostId="3850" RevisionGUID="01bc4f1a-dbac-42de-b568-c33f4a40f991" CreationDate="2022-07-20T16:22:57.860" UserId="2163" Text="How to calculate weight on cumulus" ContentLicense="CC BY-SA 4.0" />
  <row Id="14461" PostHistoryTypeId="3" PostId="3850" RevisionGUID="01bc4f1a-dbac-42de-b568-c33f4a40f991" CreationDate="2022-07-20T16:22:57.860" UserId="2163" Text="|weight|benchmarking|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14467" PostHistoryTypeId="2" PostId="3852" RevisionGUID="8154d742-2586-4f42-8ae1-1758cdfd6faa" CreationDate="2022-07-21T06:19:46.433" UserId="251" Text="Is possible to extract the runtime version from the WASM file?&#xD;&#xA;&#xD;&#xA;Sometimes, I want to verify the WASM file's content locally." ContentLicense="CC BY-SA 4.0" />
  <row Id="14469" PostHistoryTypeId="1" PostId="3852" RevisionGUID="8154d742-2586-4f42-8ae1-1758cdfd6faa" CreationDate="2022-07-21T06:19:46.433" UserId="251" Text="Is possible to extract the runtime version from WASM file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14470" PostHistoryTypeId="3" PostId="3852" RevisionGUID="8154d742-2586-4f42-8ae1-1758cdfd6faa" CreationDate="2022-07-21T06:19:46.433" UserId="251" Text="|rust|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14471" PostHistoryTypeId="2" PostId="3853" RevisionGUID="968f4cef-b25d-4222-a057-cea71784085e" CreationDate="2022-07-21T06:26:06.333" UserId="251" Text="This is not a Substrate question.&#xD;&#xA;&#xD;&#xA;But here you go https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow." ContentLicense="CC BY-SA 4.0" />
  <row Id="14473" PostHistoryTypeId="2" PostId="3854" RevisionGUID="7e105368-c41e-4e99-9e2a-c93a273d4848" CreationDate="2022-07-21T07:57:12.243" UserId="2883" Text="I'm currently trying to make a transaction using subxt tool.&#xD;&#xA;&#xD;&#xA;I could generate tx with test sr25519 keyring (Alice, Bob, ...), but I'm not sure I can do this with my account on rococo testnet.&#xD;&#xA;&#xD;&#xA;I made my account and got a faucet for testing, but I'm stuck making PairSigner.&#xD;&#xA;&#xD;&#xA;From this example &lt;https://github.com/paritytech/subxt/blob/master/examples/examples/balance_transfer.rs&gt;, I'm trying to make a signer with the account.&#xD;&#xA;&#xD;&#xA;I've searched all possible ways (from_string, from_phrase, ...) but they didn't work for me. (Maybe I misused them)&#xD;&#xA;&#xD;&#xA;Below code is my example to make a signer. (account_seed is 12 words seed)&#xD;&#xA;```&#xD;&#xA;let pair = crypto::Pair::from_string(&amp;config.account_seed, Some(&amp;config.account_password)).unwrap();&#xD;&#xA;let signer = PairSigner::new(pair);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thank you for any advice or solutions." ContentLicense="CC BY-SA 4.0" />
  <row Id="14475" PostHistoryTypeId="1" PostId="3854" RevisionGUID="7e105368-c41e-4e99-9e2a-c93a273d4848" CreationDate="2022-07-21T07:57:12.243" UserId="2883" Text="Is it possible to make a transaction with my own account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14476" PostHistoryTypeId="3" PostId="3854" RevisionGUID="7e105368-c41e-4e99-9e2a-c93a273d4848" CreationDate="2022-07-21T07:57:12.243" UserId="2883" Text="|extrinsic|transactions|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14477" PostHistoryTypeId="2" PostId="3855" RevisionGUID="2baf2f8d-d3e6-441e-9011-b79b05b89631" CreationDate="2022-07-21T07:59:06.323" UserId="2663" Text="I tried to follow [this tutorial](https://docs.substrate.io/tutorials/work-with-pallets/custom-pallet/) but I have the following problem:&#xD;&#xA;&#xD;&#xA;This is my `pallets/template/src/lib.rs`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;// Re-export pallet items so that they can be accessed from the crate namespace.&#xD;&#xA;pub use pallet::*;&#xD;&#xA;use sp_std::vec::Vec;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use sp_std::vec::Vec; // Step 3.1 will include this in `Cargo.toml`&#xD;&#xA;&#xD;&#xA;	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;	}&#xD;&#xA;	// Pallets use events to inform users when important changes are made.&#xD;&#xA;	// Event documentation should end with an array that provides descriptive names for parameters.&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		/// Event emitted when a proof has been claimed. [who, claim]&#xD;&#xA;		ClaimCreated(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;		/// Event emitted when a claim is revoked by the owner. [who, claim]&#xD;&#xA;		ClaimRevoked(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;	}&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		/// The proof has already been claimed.&#xD;&#xA;		ProofAlreadyClaimed,&#xD;&#xA;		/// The proof does not exist, so it cannot be revoked.&#xD;&#xA;		NoSuchProof,&#xD;&#xA;		/// The proof is claimed by another account, so caller can't revoke it.&#xD;&#xA;		NotProofOwner,&#xD;&#xA;	}&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	#[pallet::generate_storage_info]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub(super) type Proofs&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, Vec&lt;u8&gt;, (T::AccountId, T::BlockNumber), ValueQuery&gt;;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {}&#xD;&#xA;	// Dispatchable functions allow users to interact with the pallet and invoke state changes.&#xD;&#xA;	// These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;	// Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1_000)]&#xD;&#xA;		pub fn create_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// Verify that the specified proof has not already been claimed.&#xD;&#xA;			ensure!(!Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::ProofAlreadyClaimed);&#xD;&#xA;&#xD;&#xA;			// Get the block number from the FRAME System pallet.&#xD;&#xA;			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;&#xD;&#xA;			// Store the proof with the sender and block number.&#xD;&#xA;			Proofs::&lt;T&gt;::insert(&amp;proof, (&amp;sender, current_block));&#xD;&#xA;&#xD;&#xA;			// Emit an event that the claim was created.&#xD;&#xA;			Self::deposit_event(Event::ClaimCreated(sender, proof));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(10_000)]&#xD;&#xA;		pub fn revoke_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// Verify that the specified proof has been claimed.&#xD;&#xA;			ensure!(Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::NoSuchProof);&#xD;&#xA;&#xD;&#xA;			// Get owner of the claim.&#xD;&#xA;			let (owner, _) = Proofs::&lt;T&gt;::get(&amp;proof);&#xD;&#xA;&#xD;&#xA;			// Verify that sender of the current call is the claim owner.&#xD;&#xA;			ensure!(sender == owner, Error::&lt;T&gt;::NotProofOwner);&#xD;&#xA;&#xD;&#xA;			// Remove claim from storage.&#xD;&#xA;			Proofs::&lt;T&gt;::remove(&amp;proof);&#xD;&#xA;&#xD;&#xA;			// Emit an event that the claim was erased.&#xD;&#xA;			Self::deposit_event(Event::ClaimRevoked(sender, proof));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And this is the `pallets/template/Cargo.toml` file:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-template&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;FRAME pallet template for defining custom runtime logic.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;Unlicense&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-support = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;}&#xD;&#xA;frame-system = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;frame-benchmarking = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;, optional = true }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-io = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-runtime = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-std = { default-features = false, version = &quot;4.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking/std&quot;,&#xD;&#xA;	'sp-std/std',&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;When I try to check with `cargo check -p pallet-template` i get this error output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: expected one of: `generate_store`, `without_storage_info`, `storage_version`&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:40:12&#xD;&#xA;   |&#xD;&#xA;40 |     #[pallet::generate_storage_info]&#xD;&#xA;   |               ^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:5:5&#xD;&#xA;  |&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;error[E0432]: unresolved imports `pallet`, `sp_std::vec::Vec`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:4:9&#xD;&#xA;  |&#xD;&#xA;4 | pub use pallet::*;&#xD;&#xA;  |         ^^^^^^ help: a similar path exists: `frame_system::pallet`&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0432, E0433.&#xD;&#xA;For more information about an error, try `rustc --explain E0432`.&#xD;&#xA;error: could not compile `pallet-template` due to 3 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm pretty new to Rust and Substrate so I don't get what is the problem here." ContentLicense="CC BY-SA 4.0" />
  <row Id="14479" PostHistoryTypeId="1" PostId="3855" RevisionGUID="2baf2f8d-d3e6-441e-9011-b79b05b89631" CreationDate="2022-07-21T07:59:06.323" UserId="2663" Text="Use macros in a custom pallet tutorial doesn't compile" ContentLicense="CC BY-SA 4.0" />
  <row Id="14480" PostHistoryTypeId="3" PostId="3855" RevisionGUID="2baf2f8d-d3e6-441e-9011-b79b05b89631" CreationDate="2022-07-21T07:59:06.323" UserId="2663" Text="|error|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14481" PostHistoryTypeId="2" PostId="3856" RevisionGUID="18372fa1-a6cb-48cd-a93f-1a4b3ae0d478" CreationDate="2022-07-21T08:03:47.893" UserId="1789" Text="Hi I am trying to use Hardhat to deploy Ethereum smart contracts to my parachain with Frontier EVM inside. The Hardhat uses my own Typescript file to deploy contracts like this one: https://hardhat.org/hardhat-runner/docs/guides/deploying&#xD;&#xA;&#xD;&#xA;Then I got this error: `ProviderError: submit transaction to pool failed: Pool(InvalidTransaction(InvalidTransaction::Payment))`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;-----------== incrementer2 deployment script&#xD;&#xA;owner: 0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b &#xD;&#xA;user1: 0x735113e044BFce4DebA5da7BfBc96A3e6A96F6Da&#xD;&#xA;owner balance: 340282366920938463463.319096430768211455&#xD;&#xA;user1 balance: 0.0&#xD;&#xA;ProviderError: submit transaction to pool failed: Pool(InvalidTransaction(InvalidTransaction::Payment))&#xD;&#xA;    at HttpProvider.request (/mnt/sda4/0Programming/Ethereum/1aTokenStandards/node_modules/hardhat/src/internal/core/providers/http.ts:78:19)&#xD;&#xA;    at HDWalletProvider.request (/mnt/sda4/0Programming/Ethereum/1aTokenStandards/node_modules/hardhat/src/internal/core/providers/accounts.ts:182:36)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;    at async EthersProviderWrapper.send (/mnt/sda4/0Programming/Ethereum/1aTokenStandards/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am not sure what happened... My Hardhat can run Ethereum smart contract tests and deploy contracts to a local Ethereum network with no problem. The contract can be deployed to my parachain via Remix and MetaMask, too. but somehow Hardhat cannot directly deploy smart contracts..." ContentLicense="CC BY-SA 4.0" />
  <row Id="14483" PostHistoryTypeId="1" PostId="3856" RevisionGUID="18372fa1-a6cb-48cd-a93f-1a4b3ae0d478" CreationDate="2022-07-21T08:03:47.893" UserId="1789" Text="ProviderError: submit transaction to pool failed: Pool(InvalidTransaction(InvalidTransaction::Payment))" ContentLicense="CC BY-SA 4.0" />
  <row Id="14484" PostHistoryTypeId="3" PostId="3856" RevisionGUID="18372fa1-a6cb-48cd-a93f-1a4b3ae0d478" CreationDate="2022-07-21T08:03:47.893" UserId="1789" Text="|parachain|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14485" PostHistoryTypeId="2" PostId="3857" RevisionGUID="6606dcf2-7338-4696-8479-37e6d2d4b5bf" CreationDate="2022-07-21T08:06:07.243" UserId="198" Text="tldr: Yes it is possible :)&#xD;&#xA;&#xD;&#xA;There is a tool (and a bunch of crates) that actually aims at getting as many info as possible from a substrate wasm blob without requiring any node, it is called `subwasm`: https://github.com/chevdor/subwasm&#xD;&#xA;&#xD;&#xA;If you don't have a runtime at hand, `subwasm` can help you fetch one quickly:&#xD;&#xA;```&#xD;&#xA;subwasm get --chain westend -o /tmp/runtime.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Assuming you have a runtime as `/tmp/runtime.wasm`, you can use either the `info` or the (new) `version` command, for instance:&#xD;&#xA;```&#xD;&#xA;subwasm info /tmp/westend.wasm --json | jq -r .core_version.specVersion&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It will return `9260` (currently). This call does NOT require a node and work totally offline.&#xD;&#xA;&#xD;&#xA;`subwasm` can get you more information, the same way the Polkadot release notes show runtimes, for instance:&#xD;&#xA;```&#xD;&#xA;subwasm info /tmp/runtime.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;will output:&#xD;&#xA;```&#xD;&#xA;Running subwasm v0.18.0&#xD;&#xA;️  Runtime size:                1.138 MB (1,193,760 bytes)&#xD;&#xA;  Compressed:                  Yes, 80.61%&#xD;&#xA;✨ Reserved meta:                OK - [6D, 65, 74, 61]&#xD;&#xA; Metadata version:             V14&#xD;&#xA; Core version:                 westend-9260 (parity-westend-0.tx11.au2)&#xD;&#xA;️  system.setCode hash:         0xb98632189a72582b350912cd4b70fe393fe71140c1f7ed7a95082dd95a3db8ae&#xD;&#xA;️  authorizeUpgrade hash:       0x1dd000c1b9c9d2f1df4f5fde6ea6965b32b1aba0b207e8da8e93773123c3d49c&#xD;&#xA;#️⃣  Blake2-256 hash:             0x6190bd415a14354629aee74dbb1a0c907ea800acd2a0842d8184b86185e4dde3&#xD;&#xA; IPFS:                         https://www.ipfs.io/ipfs/QmXW&lt;...&gt;H8SwGFGWEyJ4&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you are more focused on the version itself, you can use the (fairly recent) `version` command:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subwasm version /tmp/westend.wasm &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which will output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Running subwasm v0.18.0&#xD;&#xA;specifications : westend v9260&#xD;&#xA;implementation : parity-westend v0&#xD;&#xA;transaction    : v11&#xD;&#xA;authoring      : v2&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Most commands output text by default but support the `--json` flag as well.&#xD;&#xA;&#xD;&#xA;Most commands work offline as shown above (and that's the main purpose of `subwasm`) but for convenience, `subwasm` can also fetch the runtime from a node, this is what happened with you call `subwam info --chain westend`, in that case, `subwasm` does not query the remote node for the data, instead it only fetches the wasm blob and calls the runtime direclty.&#xD;&#xA;&#xD;&#xA;So using the `--chain` flag is like doing a `get` first to get the runtime locally." ContentLicense="CC BY-SA 4.0" />
  <row Id="14487" PostHistoryTypeId="2" PostId="3858" RevisionGUID="03caba0f-40b4-47e9-b1f9-ed0f1e8ef701" CreationDate="2022-07-21T08:08:39.763" UserId="372" Text="In older versions of the Substrate node template, the node would print some helpful information on startup. For example it would print the ports being used for the websocket and p2p endpoints. It would also print the Peer Id.&#xD;&#xA;&#xD;&#xA;As of today ((latest commit)[https://github.com/substrate-developer-hub/substrate-node-template/commit/4ea490ef8ee7cde7668c56dc548e72ee8695297b]) it no longer prints this information. How can I get a node's Peer id to use as a bootnode?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14489" PostHistoryTypeId="1" PostId="3858" RevisionGUID="03caba0f-40b4-47e9-b1f9-ed0f1e8ef701" CreationDate="2022-07-21T08:08:39.763" UserId="372" Text="How to obtain a peer address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14490" PostHistoryTypeId="3" PostId="3858" RevisionGUID="03caba0f-40b4-47e9-b1f9-ed0f1e8ef701" CreationDate="2022-07-21T08:08:39.763" UserId="372" Text="|peers|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14491" PostHistoryTypeId="5" PostId="3857" RevisionGUID="aa2553a6-57c8-4fc1-8c8f-b1ceca84e213" CreationDate="2022-07-21T08:15:27.110" UserId="198" Comment="Add infos about the metadata command" Text="tldr: Yes it is possible :)&#xD;&#xA;&#xD;&#xA;There is a tool (and a bunch of crates) that actually aims at getting as many info as possible from a substrate wasm blob without requiring any node, it is called `subwasm`: https://github.com/chevdor/subwasm&#xD;&#xA;&#xD;&#xA;If you don't have a runtime at hand, `subwasm` can help you fetch one quickly:&#xD;&#xA;```&#xD;&#xA;subwasm get --chain westend -o /tmp/runtime.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Assuming you have a runtime as `/tmp/runtime.wasm`, you can use either the `info` or the (new) `version` command, for instance:&#xD;&#xA;```&#xD;&#xA;subwasm info /tmp/westend.wasm --json | jq -r .core_version.specVersion&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It will return `9260` (currently). This call does NOT require a node and work totally offline.&#xD;&#xA;&#xD;&#xA;`subwasm` can get you more information, the same way the Polkadot release notes show runtimes, for instance:&#xD;&#xA;```&#xD;&#xA;subwasm info /tmp/runtime.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;will output:&#xD;&#xA;```&#xD;&#xA;Running subwasm v0.18.0&#xD;&#xA;️  Runtime size:                1.138 MB (1,193,760 bytes)&#xD;&#xA;  Compressed:                  Yes, 80.61%&#xD;&#xA;✨ Reserved meta:                OK - [6D, 65, 74, 61]&#xD;&#xA; Metadata version:             V14&#xD;&#xA; Core version:                 westend-9260 (parity-westend-0.tx11.au2)&#xD;&#xA;️  system.setCode hash:         0xb98632189a72582b350912cd4b70fe393fe71140c1f7ed7a95082dd95a3db8ae&#xD;&#xA;️  authorizeUpgrade hash:       0x1dd000c1b9c9d2f1df4f5fde6ea6965b32b1aba0b207e8da8e93773123c3d49c&#xD;&#xA;#️⃣  Blake2-256 hash:             0x6190bd415a14354629aee74dbb1a0c907ea800acd2a0842d8184b86185e4dde3&#xD;&#xA; IPFS:                         https://www.ipfs.io/ipfs/QmXW&lt;...&gt;H8SwGFGWEyJ4&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you are more focused on the version itself, you can use the (fairly recent) `version` command:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subwasm version /tmp/westend.wasm &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which will output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Running subwasm v0.18.0&#xD;&#xA;specifications : westend v9260&#xD;&#xA;implementation : parity-westend v0&#xD;&#xA;transaction    : v11&#xD;&#xA;authoring      : v2&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Most commands output text by default but support the `--json` flag as well.&#xD;&#xA;&#xD;&#xA;Most commands work offline as shown above (and that's the main purpose of `subwasm`) but for convenience, `subwasm` can also fetch the runtime from a node, this is what happened with you call `subwam info --chain westend`, in that case, `subwasm` does **not** query the remote node for the data via RPC, instead it only fetches (via RPC) the wasm blob, decodes it and calls the runtime direclty and locally.&#xD;&#xA;&#xD;&#xA;So using the `--chain` flag is like doing a `get` first to get the runtime locally.&#xD;&#xA;&#xD;&#xA;NOTE: if you want to know more about the content of the runtime, you can check out the `meta` (alias for `metadata`) command as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="14492" PostHistoryTypeId="5" PostId="3855" RevisionGUID="ed0d43b2-e5b8-44ac-8b2a-fdc9472afcef" CreationDate="2022-07-21T08:52:57.870" UserId="2663" Comment="deleted 5745 characters in body" Text="I tried to follow [this tutorial](https://docs.substrate.io/tutorials/work-with-pallets/custom-pallet/) but I have the following problem:&#xD;&#xA;&#xD;&#xA;This is my `pallets/template/src/lib.rs` [file on github](https://github.com/viac92/substrate-node-template/blob/tutorialMacro/pallets/template/src/lib.rs)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And this is the `pallets/template/Cargo.toml` [file on github](https://github.com/viac92/substrate-node-template/blob/tutorialMacro/pallets/template/Cargo.toml)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: expected one of: `generate_store`, `without_storage_info`, `storage_version`&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:40:12&#xD;&#xA;   |&#xD;&#xA;40 |     #[pallet::generate_storage_info]&#xD;&#xA;   |               ^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:5:5&#xD;&#xA;  |&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;error[E0432]: unresolved imports `pallet`, `sp_std::vec::Vec`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:4:9&#xD;&#xA;  |&#xD;&#xA;4 | pub use pallet::*;&#xD;&#xA;  |         ^^^^^^ help: a similar path exists: `frame_system::pallet`&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0432, E0433.&#xD;&#xA;For more information about an error, try `rustc --explain E0432`.&#xD;&#xA;error: could not compile `pallet-template` due to 3 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm pretty new to Rust and Substrate so I don't get what is the problem here." ContentLicense="CC BY-SA 4.0" />
  <row Id="14493" PostHistoryTypeId="2" PostId="3859" RevisionGUID="4d509f23-e343-47e9-9d31-01351aa43d4d" CreationDate="2022-07-21T08:54:45.623" UserId="627" Text="There are 2 parts to the TS interfaces -&#xD;&#xA;&#xD;&#xA; - those that ship in Substrate, Polkadot &amp; Kusama&#xD;&#xA; - those that ship in other chains&#xD;&#xA;&#xD;&#xA;For the first batch, the API tracks the latest Substrate/Kusama/Polkadot metadata on a weekly basis, which means that the TS definitions for any of these on master is at most outdated by a week. (This obviously means that the developer would need to follow API updates, e.g. the weekly releases ship with the latest generated TS interfaces)&#xD;&#xA;&#xD;&#xA;For the second type (which would also include non-merged PRs on the above repos), you would need to generate your own definitions and augment that.&#xD;&#xA;&#xD;&#xA;Looking at your specific question and the specific PR and dates, the relevant TS definitions has been available since the [8.13.1](https://github.com/polkadot-js/api/releases/tag/v8.13.1) API release.&#xD;&#xA;&#xD;&#xA;The metadata update went in [here](https://github.com/polkadot-js/api/commit/12d8465cf40f347bbae0c5bdbfd5343b429942d4) eg. for the [ItemPriceSet enum entry as added above](https://github.com/polkadot-js/api/blob/92d6f6b98fbbae17dc266ce501115b5dc3b94da4/packages/types-augment/src/lookup/types-substrate.ts#L1404-L1410).&#xD;&#xA;&#xD;&#xA;The short version: types are decorated from metadata at-runtime, for updated at-development Substrate TS definitions, ensure you track the API releases." ContentLicense="CC BY-SA 4.0" />
  <row Id="14495" PostHistoryTypeId="2" PostId="3860" RevisionGUID="db55f2bc-61a2-4769-aec8-a865024d6f22" CreationDate="2022-07-21T08:54:53.523" UserId="2102" Text="I've also noticed that, and I'm not sure if its a bug or they've added some additional flags for that, but I guess you can query a node PeerId using RPC calls or interacting via the Polkadot JS App like this https://substrate.stackexchange.com/questions/2986/get-a-local-node-identity-peer-id/2987#2987" ContentLicense="CC BY-SA 4.0" />
  <row Id="14497" PostHistoryTypeId="5" PostId="3857" RevisionGUID="5beb2d7a-218e-4a9b-8748-07656470c489" CreationDate="2022-07-21T08:57:38.223" UserId="198" Comment="Add notice about not using crates.io to install subwasm" Text="tldr: Yes it is possible :)&#xD;&#xA;&#xD;&#xA;There is a tool (and a bunch of crates) that actually aims at getting as many info as possible from a substrate wasm blob without requiring any node, it is called `subwasm`: https://github.com/chevdor/subwasm&#xD;&#xA;&#xD;&#xA;**IMPORTANT**: Make sure to install from the repo and **not from crates.io**. See repo for details.&#xD;&#xA;&#xD;&#xA;If you don't have a runtime at hand, `subwasm` can help you fetch one quickly:&#xD;&#xA;```&#xD;&#xA;subwasm get --chain westend -o /tmp/runtime.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Assuming you have a runtime as `/tmp/runtime.wasm`, you can use either the `info` or the (new) `version` command, for instance:&#xD;&#xA;```&#xD;&#xA;subwasm info /tmp/westend.wasm --json | jq -r .core_version.specVersion&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It will return `9260` (currently). This call does NOT require a node and work totally offline.&#xD;&#xA;&#xD;&#xA;`subwasm` can get you more information, the same way the Polkadot release notes show runtimes, for instance:&#xD;&#xA;```&#xD;&#xA;subwasm info /tmp/runtime.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;will output:&#xD;&#xA;```&#xD;&#xA;Running subwasm v0.18.0&#xD;&#xA;️  Runtime size:                1.138 MB (1,193,760 bytes)&#xD;&#xA;  Compressed:                  Yes, 80.61%&#xD;&#xA;✨ Reserved meta:                OK - [6D, 65, 74, 61]&#xD;&#xA; Metadata version:             V14&#xD;&#xA; Core version:                 westend-9260 (parity-westend-0.tx11.au2)&#xD;&#xA;️  system.setCode hash:         0xb98632189a72582b350912cd4b70fe393fe71140c1f7ed7a95082dd95a3db8ae&#xD;&#xA;️  authorizeUpgrade hash:       0x1dd000c1b9c9d2f1df4f5fde6ea6965b32b1aba0b207e8da8e93773123c3d49c&#xD;&#xA;#️⃣  Blake2-256 hash:             0x6190bd415a14354629aee74dbb1a0c907ea800acd2a0842d8184b86185e4dde3&#xD;&#xA; IPFS:                         https://www.ipfs.io/ipfs/QmXW&lt;...&gt;H8SwGFGWEyJ4&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you are more focused on the version itself, you can use the (fairly recent) `version` command:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subwasm version /tmp/westend.wasm &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which will output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Running subwasm v0.18.0&#xD;&#xA;specifications : westend v9260&#xD;&#xA;implementation : parity-westend v0&#xD;&#xA;transaction    : v11&#xD;&#xA;authoring      : v2&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Most commands output text by default but support the `--json` flag as well.&#xD;&#xA;&#xD;&#xA;Most commands work offline as shown above (and that's the main purpose of `subwasm`) but for convenience, `subwasm` can also fetch the runtime from a node, this is what happened with you call `subwam info --chain westend`, in that case, `subwasm` does **not** query the remote node for the data via RPC, instead it only fetches (via RPC) the wasm blob, decodes it and calls the runtime direclty and locally.&#xD;&#xA;&#xD;&#xA;So using the `--chain` flag is like doing a `get` first to get the runtime locally.&#xD;&#xA;&#xD;&#xA;NOTE: if you want to know more about the content of the runtime, you can check out the `meta` (alias for `metadata`) command as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="14498" PostHistoryTypeId="5" PostId="3855" RevisionGUID="cdcc5f37-80fd-4b53-a072-9d38093230db" CreationDate="2022-07-21T08:59:49.620" UserId="2663" Comment="added 28 characters in body" Text="I tried to follow [this tutorial](https://docs.substrate.io/tutorials/work-with-pallets/custom-pallet/) but I have the following problem:&#xD;&#xA;&#xD;&#xA;This is my `pallets/template/src/lib.rs` [file on github](https://github.com/viac92/substrate-node-template/blob/tutorialMacro/pallets/template/src/lib.rs)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And this is the `pallets/template/Cargo.toml` [file on github](https://github.com/viac92/substrate-node-template/blob/tutorialMacro/pallets/template/Cargo.toml)&#xD;&#xA;&#xD;&#xA;The terminal error output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: expected one of: `generate_store`, `without_storage_info`, `storage_version`&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:40:12&#xD;&#xA;   |&#xD;&#xA;40 |     #[pallet::generate_storage_info]&#xD;&#xA;   |               ^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:5:5&#xD;&#xA;  |&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;error[E0432]: unresolved imports `pallet`, `sp_std::vec::Vec`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:4:9&#xD;&#xA;  |&#xD;&#xA;4 | pub use pallet::*;&#xD;&#xA;  |         ^^^^^^ help: a similar path exists: `frame_system::pallet`&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0432, E0433.&#xD;&#xA;For more information about an error, try `rustc --explain E0432`.&#xD;&#xA;error: could not compile `pallet-template` due to 3 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm pretty new to Rust and Substrate so I don't get what is the problem here." ContentLicense="CC BY-SA 4.0" />
  <row Id="14500" PostHistoryTypeId="2" PostId="3861" RevisionGUID="c15ebf92-cc53-495c-9b26-9df28b3c2715" CreationDate="2022-07-21T09:47:38.530" UserId="85" Text="How do you efficiently tell which `block number` the last runtime upgrade happened on for a particular chain (without reading every block)?&#xD;&#xA;&#xD;&#xA;A couple of people have hinted to me that the answer is in a digest somewhere? I'm assuming they were not referring to [bill's][1] :-) . Is this accessible from an rpc / state call / runtime call?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://app.subsocial.network/@polkadotdigest" ContentLicense="CC BY-SA 4.0" />
  <row Id="14502" PostHistoryTypeId="1" PostId="3861" RevisionGUID="c15ebf92-cc53-495c-9b26-9df28b3c2715" CreationDate="2022-07-21T09:47:38.530" UserId="85" Text="How do you tell which block number the last runtime upgrade happened on a chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14503" PostHistoryTypeId="3" PostId="3861" RevisionGUID="c15ebf92-cc53-495c-9b26-9df28b3c2715" CreationDate="2022-07-21T09:47:38.530" UserId="85" Text="|session|blocknumber|digest|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14504" PostHistoryTypeId="2" PostId="3862" RevisionGUID="cd142c8e-b8cd-49a6-ba43-928eb6a5d3a4" CreationDate="2022-07-21T09:53:02.633" UserId="2906" Text="Dan&#xD;&#xA;A similar solution to support multi-wallet on polkadot ecosystem is in progress right now. I'll keep you posted once we are close to release." ContentLicense="CC BY-SA 4.0" />
  <row Id="14506" PostHistoryTypeId="5" PostId="3862" RevisionGUID="7d27aafd-7b77-4a98-a87b-fe6c19e17af4" CreationDate="2022-07-21T09:53:54.077" UserId="2906" Comment="added 1 character in body" Text="Dan.&#xD;&#xA;A similar solution to support multi-wallet on polkadot ecosystem is in progress right now. I'll keep you posted once we are close to release." ContentLicense="CC BY-SA 4.0" />
  <row Id="14507" PostHistoryTypeId="5" PostId="3862" RevisionGUID="43ff6c87-a7ea-4657-831f-3fdb590ad22c" CreationDate="2022-07-21T09:54:05.657" UserId="2906" Comment="deleted 6 characters in body" Text="A similar solution to support multi-wallet on polkadot ecosystem is in progress right now. I'll keep you posted once we are close to release." ContentLicense="CC BY-SA 4.0" />
  <row Id="14508" PostHistoryTypeId="5" PostId="3855" RevisionGUID="b0ff3b6f-f256-47fd-a442-75279fc7f788" CreationDate="2022-07-21T10:06:06.757" UserId="2663" Comment="added 743 characters in body" Text="I tried to follow [this tutorial](https://docs.substrate.io/tutorials/work-with-pallets/custom-pallet/) but I have the following problem:&#xD;&#xA;&#xD;&#xA;This is my `pallets/template/src/lib.rs` [file on github](https://github.com/viac92/substrate-node-template/blob/tutorialMacro/pallets/template/src/lib.rs)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And this is the `pallets/template/Cargo.toml` [file on github](https://github.com/viac92/substrate-node-template/blob/tutorialMacro/pallets/template/Cargo.toml)&#xD;&#xA;&#xD;&#xA;The terminal error output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: expected one of: `generate_store`, `without_storage_info`, `storage_version`&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:40:12&#xD;&#xA;   |&#xD;&#xA;40 |     #[pallet::generate_storage_info]&#xD;&#xA;   |               ^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:5:5&#xD;&#xA;  |&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;error[E0432]: unresolved imports `pallet`, `sp_std::vec::Vec`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:4:9&#xD;&#xA;  |&#xD;&#xA;4 | pub use pallet::*;&#xD;&#xA;  |         ^^^^^^ help: a similar path exists: `frame_system::pallet`&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0432, E0433.&#xD;&#xA;For more information about an error, try `rustc --explain E0432`.&#xD;&#xA;error: could not compile `pallet-template` due to 3 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm pretty new to Rust and Substrate so I don't get what is the problem here.&#xD;&#xA;&#xD;&#xA;**UPDATE**&#xD;&#xA;&#xD;&#xA;I remove `#[pallet::generate_storage_info]` as suggest by @shawn-tabrizi now I get only this two errors:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:5:5&#xD;&#xA;  |&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:11:9&#xD;&#xA;   |&#xD;&#xA;11 |     use sp_std::vec::Vec; // Step 3.1 will include this in `Cargo.toml`&#xD;&#xA;   |         ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0433`.&#xD;&#xA;error: could not compile `pallet-template` due to 2 previous errors&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14509" PostHistoryTypeId="2" PostId="3863" RevisionGUID="fc656258-9c47-4578-ae95-50bf14d279d2" CreationDate="2022-07-21T10:17:29.777" UserId="28" Text="The problem is that you placed `sp-std` import into the `dev-dependencies` rather than the regular `dependencies`.&#xD;&#xA;&#xD;&#xA;Your file should like:&#xD;&#xA;&#xD;&#xA;```cargo&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-template&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;FRAME pallet template for defining custom runtime logic.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;Unlicense&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;    &quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-support = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;}&#xD;&#xA;frame-system = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;frame-benchmarking = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;, optional = true }&#xD;&#xA;# PUT IT HERE&#xD;&#xA;sp-std = { default-features = false, version = &quot;4.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-io = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-runtime = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;# DON'T PUT IT HERE&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;codec/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;    &quot;frame-support/std&quot;,&#xD;&#xA;    &quot;frame-system/std&quot;,&#xD;&#xA;    &quot;frame-benchmarking/std&quot;,&#xD;&#xA;    'sp-std/std',&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14511" PostHistoryTypeId="6" PostId="3852" RevisionGUID="87dbe3e8-4231-4a0b-800c-35a572a45770" CreationDate="2022-07-21T10:24:55.357" UserId="85" Comment="edited tags" Text="|rust|wasm|subwasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14512" PostHistoryTypeId="5" PostId="280" RevisionGUID="25ccdfea-33ea-4dfa-b9f5-bd94e77ecf54" CreationDate="2022-07-21T10:31:53.367" UserId="2025" Comment="fix old link" Text="Great question!&#xD;&#xA;&#xD;&#xA;Accounts in Substrate are stored in the FRAME System Pallet [here](https://github.com/paritytech/substrate/blob/7e643ceabf11858cd3c059579ab45794793f2a78/frame/system/src/lib.rs#L544).&#xD;&#xA;&#xD;&#xA;Other pallets may depend on an account (consumers) or other pallets may need the existence of this account for its own purposes (sufficients) - regardless of which, the account first must be deemed as existing (providers).&#xD;&#xA;&#xD;&#xA;**Consumers**&#xD;&#xA;&gt; The number of other modules that currently depend on this account's existence. The account cannot be reaped until this is zero.&#xD;&#xA;&#xD;&#xA;In order to increment the consumer reference for an account, first the provider reference for that account has to be greater than zero (this indicates that the account is active and can be depended upon).&#xD;&#xA;&#xD;&#xA;Incrementing the consumers reference is a way of letting other pallets know that the account is active and depended upon by other pallets therefore do not remove that account.&#xD;&#xA;&#xD;&#xA;**Providers**&#xD;&#xA;&gt; The number of other modules that allow this account to exist. The account may not be reaped until this and `sufficients` are both zero.&#xD;&#xA;&#xD;&#xA;Providers is a way to tell other pallets whether an account is active (&gt;0) or not.&#xD;&#xA;&#xD;&#xA;The idea/design/concept of these reference counters is to keep users accountable for data stored on chain:&#xD;&#xA;&#xD;&#xA;&gt; If users want to remove their accounts and get back the existential deposit, they need to remove the dependencies from those on-chain pallets, such as clearing data stored on-chain for those pallets, which decrement consumers counter. Pallets also have cleanup functions to decrement providers to mark the account as deactivated within the pallet-managed scope. When the account providers reaches 0, with the prerequisite that consumers has reached 0 by this point, this account is considered deactivated by all on-chain pallets.&#xD;&#xA;&#xD;&#xA;When it comes to incrementing/decrementing remember:&#xD;&#xA;&#xD;&#xA;&gt; Each increment call of a certain counter should be accompanied by a corresponding decrement call of the counter in an account life cycle, else it is a design bug.&#xD;&#xA;&#xD;&#xA;**Sufficients**&#xD;&#xA;&gt; The number of modules that allow this account to exist for their own purposes only. The account may not be reaped until this and `providers` are both zero.&#xD;&#xA;&#xD;&#xA;An example we normally give is the `Assets` pallet. In order to create an asset, you need an account. The `Assets` pallet depends on the account for its own purposes but the account itself does not depend on it necessarily, e.g. it has no balance of its own with that asset. Because of this the account is deemed as self-sufficient. It has enough purpose to exist.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Reference: https://docs.substrate.io/reference/account-data-structures/" ContentLicense="CC BY-SA 4.0" />
  <row Id="14513" PostHistoryTypeId="24" PostId="280" RevisionGUID="25ccdfea-33ea-4dfa-b9f5-bd94e77ecf54" CreationDate="2022-07-21T10:31:53.367" Comment="Proposed by 2025 approved by 34 edit id of 246" ContentLicense="CC BY-SA 4.0" />
  <row Id="14514" PostHistoryTypeId="5" PostId="3842" RevisionGUID="39452157-9daa-4648-b330-a5cf9a4c7fd2" CreationDate="2022-07-21T10:32:05.243" UserId="138" Comment="formatted JSON contents" Text="I think you've found this out, but for others: In chrome you can run polkadot js and then inspect the webpage and switch over to the network tab. From there if you click on `ws` to filter to the websockets you can see the request and response from the UI for any call whether that's a state query, rpc call, runtime call or submitting an extrinsic. &#xD;&#xA;&#xD;&#xA;Here's the request you can see on the wire:&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;id&quot;:157,&#xD;&#xA;  &quot;jsonrpc&quot;:&quot;2.0&quot;,&#xD;&#xA;  &quot;method&quot;:&quot;state_call&quot;,&#xD;&#xA;  &quot;params&quot;:[&quot;Core_version&quot;,&quot;0x&quot;]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The result is &#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;jsonrpc&quot;:&quot;2.0&quot;,&#xD;&#xA;  &quot;result&quot;:&quot;0x20706f6c6b61646f743c7061726974792d706f6c6b61646f74000000000e2400000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000c00000000&quot;,&#xD;&#xA;  &quot;id&quot;:157&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and we can see in polkadot js this decodes to &#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;specName&quot;: &quot;polkadot&quot;,&#xD;&#xA;  &quot;implName&quot;: &quot;parity-polkadot&quot;,&#xD;&#xA;  &quot;authoringVersion&quot;: 0,&#xD;&#xA;  &quot;specVersion&quot;: 9230,&#xD;&#xA;  &quot;implVersion&quot;: 0,&#xD;&#xA;  &quot;apis&quot;: [&#xD;&#xA;    [ &quot;0xdf6acb689907609b&quot;, 4 ],&#xD;&#xA;    [ &quot;0x37e397fc7c91f5e4&quot;, 1 ],&#xD;&#xA;    [ &quot;0x40fe3ad401f8959a&quot;, 6 ],&#xD;&#xA;    [ &quot;0xd2bc9897eed08f15&quot;, 3 ],&#xD;&#xA;    [ &quot;0xf78b278be53f454c&quot;, 2 ],&#xD;&#xA;    [ &quot;0xaf2c0297a23e6d3d&quot;, 2 ],&#xD;&#xA;    [ &quot;0x49eaaf1b548a0cb0&quot;, 1 ],&#xD;&#xA;    [ &quot;0x91d5df18b0d2cf58&quot;, 1 ],&#xD;&#xA;    [ &quot;0xed99c5acb25eedf5&quot;, 3 ],&#xD;&#xA;    [ &quot;0xcbca25e39f142387&quot;, 2 ],&#xD;&#xA;    [ &quot;0x687ad44ad37f03c2&quot;, 1 ],&#xD;&#xA;    [ &quot;0xab3c0572291feb8b&quot;, 1 ],&#xD;&#xA;    [ &quot;0xbc9d89904f5b923f&quot;, 1 ],&#xD;&#xA;    [ &quot;0x37c8bb1350a9a2a8&quot;, 1 ]&#xD;&#xA;  ],&#xD;&#xA;  &quot;transactionVersion&quot;: 12,&#xD;&#xA;  &quot;stateVersion&quot;: 0&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;polkadot in hex is 70 6f 6c 6b 61 64 6f 74 so that gives you a pretty good steer on the decoding front. The code is [here][1] to decode it. The 0x20 prefix will be a `Compact&lt;u32&gt;` saying what the string length is. But you should be able to call `sp_version::RuntimeVersion::decode(&amp;mut &amp;bytes[..])` to decode it all in one go.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/5597a93a8c8b1ab578693c68549e3ce1902f3eaf/primitives/version/src/lib.rs#L228" ContentLicense="CC BY-SA 4.0" />
  <row Id="14515" PostHistoryTypeId="24" PostId="3842" RevisionGUID="39452157-9daa-4648-b330-a5cf9a4c7fd2" CreationDate="2022-07-21T10:32:05.243" Comment="Proposed by 138 approved by 34 edit id of 245" ContentLicense="CC BY-SA 4.0" />
  <row Id="14516" PostHistoryTypeId="10" PostId="3804" RevisionGUID="bfc36d8a-732e-4539-ba37-630036723056" CreationDate="2022-07-21T10:33:43.680" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="14517" PostHistoryTypeId="2" PostId="3864" RevisionGUID="3d3697db-191e-41b4-be4b-f201ae43ac0b" CreationDate="2022-07-21T11:32:27.213" UserId="1942" Text=" report &quot;no `AuthorClient` in `author`&quot; in rpc-client/src/main.rs when i upgrade chain to 0.9.24&#xD;&#xA;&#xD;&#xA;report &quot;add `dyn` keyword before this trait&quot; if i change to AuthorApiClient.&#xD;&#xA;&#xD;&#xA;does AuthorApiClient and AuthorClient not work?&#xD;&#xA;```&#xD;&#xA;cargo check&#xD;&#xA;   Compiling node-runtime v2.0.1 (/Users/li/Documents/GitHub/deeper-chain/runtime)&#xD;&#xA;    Checking node-rpc-client v2.0.0 (/Users/li/Documents/GitHub/deeper-chain/rpc-client)&#xD;&#xA;error[E0432]: unresolved import `sc_rpc_api::author::AuthorClient`&#xD;&#xA;  --&gt; rpc-client/src/main.rs:28:49&#xD;&#xA;   |&#xD;&#xA;28 | use sc_rpc_api::author::{hash::ExtrinsicOrHash, AuthorClient};&#xD;&#xA;   |                                                 ^^^^^^^^^^^^&#xD;&#xA;   |                                                 |&#xD;&#xA;   |                                                 no `AuthorClient` in `author`&#xD;&#xA;   |                                                 help: a similar name exists in the module: `AuthorApiClient`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0432`.&#xD;&#xA;error: could not compile `node-rpc-client` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;rpc-client/src/main.rs&#xD;&#xA;```&#xD;&#xA;// This file is part of Substrate.&#xD;&#xA;&#xD;&#xA;// Copyright (C) 2019-2021 Parity Technologies (UK) Ltd.&#xD;&#xA;// SPDX-License-Identifier: Apache-2.0&#xD;&#xA;&#xD;&#xA;// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#xD;&#xA;// you may not use this file except in compliance with the License.&#xD;&#xA;// You may obtain a copy of the License at&#xD;&#xA;//&#xD;&#xA;// 	http://www.apache.org/licenses/LICENSE-2.0&#xD;&#xA;//&#xD;&#xA;// Unless required by applicable law or agreed to in writing, software&#xD;&#xA;// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xD;&#xA;// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xD;&#xA;// See the License for the specific language governing permissions and&#xD;&#xA;// limitations under the License.&#xD;&#xA;&#xD;&#xA;#![warn(missing_docs)]&#xD;&#xA;&#xD;&#xA;//! Example substrate RPC client code.&#xD;&#xA;//!&#xD;&#xA;//! This module shows how you can write a Rust RPC client that connects to a running&#xD;&#xA;//! substrate node and use statically typed RPC wrappers.&#xD;&#xA;&#xD;&#xA;use futures::{Future, TryFutureExt};&#xD;&#xA;use jsonrpc_core_client::{transports::http, RpcError};&#xD;&#xA;use node_primitives::Hash;&#xD;&#xA;use sc_rpc_api::author::{hash::ExtrinsicOrHash, AuthorApiClient};&#xD;&#xA;&#xD;&#xA;fn main() -&gt; Result&lt;(), RpcError&gt; {&#xD;&#xA;    sp_tracing::try_init_simple();&#xD;&#xA;&#xD;&#xA;    futures::executor::block_on(async {&#xD;&#xA;        let uri = &quot;http://localhost:9933&quot;;&#xD;&#xA;&#xD;&#xA;        http::connect(uri)&#xD;&#xA;            .and_then(|client: AuthorApiClient&lt;Hash, Hash&gt;| remove_all_extrinsics(client))&#xD;&#xA;            .await&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Remove all pending extrinsics from the node.&#xD;&#xA;///&#xD;&#xA;/// The example code takes `AuthorApiClient` and first:&#xD;&#xA;/// 1. Calls the `pending_extrinsics` method to get all extrinsics in the pool.&#xD;&#xA;/// 2. Then calls `remove_extrinsic` passing the obtained raw extrinsics.&#xD;&#xA;///&#xD;&#xA;/// As the result of running the code the entire content of the transaction pool is going&#xD;&#xA;/// to be removed and the extrinsics are going to be temporarily banned.&#xD;&#xA;fn remove_all_extrinsics(&#xD;&#xA;    client: AuthorApiClient&lt;Hash, Hash&gt;,&#xD;&#xA;) -&gt; impl Future&lt;Output = Result&lt;(), RpcError&gt;&gt; {&#xD;&#xA;    client&#xD;&#xA;        .pending_extrinsics()&#xD;&#xA;        .and_then(move |pending| {&#xD;&#xA;            client.remove_extrinsic(&#xD;&#xA;                pending&#xD;&#xA;                    .into_iter()&#xD;&#xA;                    .map(|tx| ExtrinsicOrHash::Extrinsic(tx.into()))&#xD;&#xA;                    .collect(),&#xD;&#xA;            )&#xD;&#xA;        })&#xD;&#xA;        .map_ok(|removed| {&#xD;&#xA;            println!(&quot;Removed extrinsics: {:?}&quot;, removed);&#xD;&#xA;        })&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14519" PostHistoryTypeId="1" PostId="3864" RevisionGUID="3d3697db-191e-41b4-be4b-f201ae43ac0b" CreationDate="2022-07-21T11:32:27.213" UserId="1942" Text="upgrade custom chain to 0.9.24, rpc-client/src/main.rs report &quot;no `AuthorClient` in `author`&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14520" PostHistoryTypeId="3" PostId="3864" RevisionGUID="3d3697db-191e-41b4-be4b-f201ae43ac0b" CreationDate="2022-07-21T11:32:27.213" UserId="1942" Text="|substrate-node|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14525" PostHistoryTypeId="5" PostId="3850" RevisionGUID="f3967567-9946-4f0c-bbe0-dc5d40558ed7" CreationDate="2022-07-21T12:51:42.857" UserId="2163" Comment="added 62 characters in body" Text="I am a bit confused about this. If I have a pr on Substrate that requires a companion on Cumulus that adds to the weight file for a given pallet, how do I calculate the weight? I can run the ```benchmark.sh``` script inside the cumulus repo locally with the local substrate directory that contains the new code, but that will generate the weight while running on my machine. What is the way to run the benchmark on the benchmarking machine for the new code when the pr on substrate is not merged yet?&#xD;&#xA;&#xD;&#xA;I am probably missing something, so I hope someone could explain this to me.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="14526" PostHistoryTypeId="52" PostId="3852" RevisionGUID="0a2cd295-19df-4cc4-b4b7-48997b1e19ce" CreationDate="2022-07-21T14:27:47.800" />
  <row Id="14527" PostHistoryTypeId="2" PostId="3866" RevisionGUID="a91cd180-1838-4179-8b3b-0f2aa08285ba" CreationDate="2022-07-21T18:47:09.430" UserId="716" Text="I have code to convert ss58 address to a different parachain using polkadot{js}, such as below:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const { Keyring } = require(&quot;@polkadot/keyring&quot;);&#xD;&#xA;const keyring = new Keyring();&#xD;&#xA;keyring.encodeAddress(&quot;5EChUec3ZQhUvY1g52ZbfBVkqjUY9Kcr6mcEvQMbmd38shQL&quot;, 10);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What would be the equivalent is python using the py-substrate-interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14529" PostHistoryTypeId="1" PostId="3866" RevisionGUID="a91cd180-1838-4179-8b3b-0f2aa08285ba" CreationDate="2022-07-21T18:47:09.430" UserId="716" Text="How to convert ss58 address to a different parachain in py-substrate-interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="14530" PostHistoryTypeId="3" PostId="3866" RevisionGUID="a91cd180-1838-4179-8b3b-0f2aa08285ba" CreationDate="2022-07-21T18:47:09.430" UserId="716" Text="|python|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14531" PostHistoryTypeId="2" PostId="3867" RevisionGUID="c18f584c-4043-4971-92fe-ca8e41081b9f" CreationDate="2022-07-21T18:58:53.100" UserId="1824" Text="So I think we need to clarify some things about ink! storage.&#xD;&#xA;&#xD;&#xA;&gt; It is really helpful because I will write every field only on initialize an instance but after will read/write 1-3 fields&#xD;&#xA;&#xD;&#xA;So in ink! [all reads storage are eager](https://ink.substrate.io/datastructures/overview#eager-loading).&#xD;&#xA;&#xD;&#xA;What this means is that whenever this is read from storage, the _entire_ struct will be&#xD;&#xA;read, even if just a _single field_ is accessed. &#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct ContractStorage {&#xD;&#xA;    foo: u32,&#xD;&#xA;    bar: AccountId,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(message)]&#xD;&#xA;fn read_from_storage(&amp;mut self) {&#xD;&#xA;    // This reads the _entire_ `ContractStorage` struct from storage, which includes the&#xD;&#xA;    // `bar` field.&#xD;&#xA;    let foo = self.foo;&#xD;&#xA;    todo!()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; No, I am trying to derive SpreadAllocate for secondary storage and want to have a Mapping to TokenInfo structure in my root storage.&#xD;&#xA;&#xD;&#xA;So there is not such thing as secondary storage. At the end of the day&#xD;&#xA;you only have fields in the root storage struct (the one tagged with&#xD;&#xA;`#[ink(storage)]`.&#xD;&#xA;&#xD;&#xA;Now, for the custom struct in a `Mapping` part. The `Mapping` API basically requires that&#xD;&#xA;your type implements `scale::Encode`, `scale::Decode`, `SpreadLayout`, and `PackedLayout`&#xD;&#xA;(see the requirements for [`Mapping::insert()`](https://docs.rs/ink_storage/latest/ink_storage/struct.Mapping.html#method.insert)).&#xD;&#xA;&#xD;&#xA;Since your `TokenInfo` struct is made up of primitive types, which themselves implement&#xD;&#xA;all these traits, then you can simply derive those traits for `TokenInfo`. No need to manually implement them.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod flipper {&#xD;&#xA;    use ink_storage::traits::{SpreadAllocate, PackedLayout, SpreadLayout};&#xD;&#xA;&#xD;&#xA;    #[derive(PackedLayout, SpreadLayout, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(::scale_info::TypeInfo))]&#xD;&#xA;    pub struct TokenInfo {&#xD;&#xA;        data: [u8; 284],&#xD;&#xA;        in_collection: bool,&#xD;&#xA;        init_price: Balance,&#xD;&#xA;        init_owner: AccountId,&#xD;&#xA;        for_sale: bool,&#xD;&#xA;        discount_duration: u64,&#xD;&#xA;        birth_date: Timestamp,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Flipper {&#xD;&#xA;        map: ink_storage::Mapping&lt;u32, TokenInfo&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Flipper {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn default() -&gt; Self {&#xD;&#xA;            ink_lang::utils::initialize_contract(|_| {})&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn flip(&amp;mut self) {&#xD;&#xA;            let s = TokenInfo {&#xD;&#xA;                data: [0; 284],&#xD;&#xA;                in_collection: Default::default(),&#xD;&#xA;                init_price: Default::default(),&#xD;&#xA;                init_owner: Default::default(),&#xD;&#xA;                for_sale: Default::default(),&#xD;&#xA;                discount_duration: Default::default(),&#xD;&#xA;                birth_date: Default::default(),&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            self.map.insert(&amp;0, &amp;s);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14533" PostHistoryTypeId="2" PostId="3868" RevisionGUID="e14ab463-fbdd-4940-bdd0-e22b50792574" CreationDate="2022-07-21T23:04:21.330" UserId="2698" Text="I have the responsibility of updating an old pallet (1-2 years old) and I can not find an updated directory since currently it is throwing this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to select a version for `parity-util-mem`.&#xD;&#xA;    ... required by package `sp-runtime v3.0.0`&#xD;&#xA;    ... which satisfies dependency `sp-runtime = &quot;^3.0.0&quot;` of package `frame-support v3.0.0`&#xD;&#xA;    ... which satisfies dependency `frame-support = &quot;^3.0.0&quot;` of package `orml-utilities v0.4.0`&#xD;&#xA;    ... which satisfies dependency `orml-utilities = &quot;^0.4.0&quot;` of package `pallet-vesting v3.0.0 (/Users/jackson/Desktop/chain_v2/pallets/vesting)`&#xD;&#xA;    ... which satisfies path dependency `pallet-vesting` (locked to 3.0.0) of package `node-template-runtime v4.0.0-dev (/Users/jackson/Desktop/chain_v2/runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/Users/jackson/Desktop/chain_v2/node)`&#xD;&#xA;versions that meet the requirements `^0.9.0` are: 0.9.0&#xD;&#xA;&#xD;&#xA;the package `parity-util-mem` links to the native library `parity-util-mem-ban-duplicates`, but it conflicts with a previous package which links to `parity-util-mem-ban-duplicates` as well:&#xD;&#xA;package `parity-util-mem v0.10.2`&#xD;&#xA;    ... which satisfies dependency `parity-util-mem = &quot;^0.10.2&quot;` of package `sc-informant v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#22d40c76)`&#xD;&#xA;    ... which satisfies git dependency `sc-informant` (locked to 0.10.0-dev) of package `sc-service v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#22d40c76)`&#xD;&#xA;    ... which satisfies git dependency `sc-service` (locked to 0.10.0-dev) of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#22d40c76)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/Users/jackson/Desktop/chain_v2/node)`&#xD;&#xA;Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='parity-util-mem' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.&#xD;&#xA;&#xD;&#xA;failed to select a version for `parity-util-mem` which could resolve this conflict&#xD;&#xA;```&#xD;&#xA;This is the import statement I am using in the toml: `orml-utilities = { version = &quot;0.4.0&quot;, default-features = false }`" ContentLicense="CC BY-SA 4.0" />
  <row Id="14535" PostHistoryTypeId="1" PostId="3868" RevisionGUID="e14ab463-fbdd-4940-bdd0-e22b50792574" CreationDate="2022-07-21T23:04:21.330" UserId="2698" Text="Updating Dependency for ORML" ContentLicense="CC BY-SA 4.0" />
  <row Id="14536" PostHistoryTypeId="3" PostId="3868" RevisionGUID="e14ab463-fbdd-4940-bdd0-e22b50792574" CreationDate="2022-07-21T23:04:21.330" UserId="2698" Text="|substrate-node|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14537" PostHistoryTypeId="5" PostId="3841" RevisionGUID="4824c87d-377e-4ac5-b16a-8a24c3ddc807" CreationDate="2022-07-22T04:53:06.217" UserId="1789" Comment="deleted 185 characters in body; edited title" Text="Regarding this tutorial &quot;**Connect a local parachain**&quot;: https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/, it requires &#xD;&#xA;- using GUI in a browser to do Parachain Registration... &#xD;&#xA;&#xD;&#xA;How can I do all that in command line(CLI) only?&#xD;&#xA;&#xD;&#xA;It will be much easier and quicker for me to write a bash script to run through the whole process.&#xD;&#xA;&#xD;&#xA;Also I need to run this whole process in a Github CICD.&#xD;&#xA;Please advise." ContentLicense="CC BY-SA 4.0" />
  <row Id="14538" PostHistoryTypeId="4" PostId="3841" RevisionGUID="4824c87d-377e-4ac5-b16a-8a24c3ddc807" CreationDate="2022-07-22T04:53:06.217" UserId="1789" Comment="deleted 185 characters in body; edited title" Text="How to use command line to register Parachain locally" ContentLicense="CC BY-SA 4.0" />
  <row Id="14539" PostHistoryTypeId="2" PostId="3869" RevisionGUID="615977eb-256c-43e6-8f4f-a81a50d04707" CreationDate="2022-07-22T05:00:12.833" UserId="1789" Text="Regarding this tutorial &quot;Connect a local parachain&quot;: https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/, it requires&#xD;&#xA;- using GUI in a browser to Reserve a ParaID on the relay chain (that is to use Polkadot-JS Apps connecting to your local relay chain)&#xD;&#xA;&#xD;&#xA;I have searched on that Polkadot-launch repo https://github.com/paritytech/polkadot-launch/ and found nothing about that.&#xD;&#xA;&#xD;&#xA;How can I use a command line(e.g. NodeJs) to do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14541" PostHistoryTypeId="1" PostId="3869" RevisionGUID="615977eb-256c-43e6-8f4f-a81a50d04707" CreationDate="2022-07-22T05:00:12.833" UserId="1789" Text="How to use command line to Reserve ParaID locally" ContentLicense="CC BY-SA 4.0" />
  <row Id="14542" PostHistoryTypeId="3" PostId="3869" RevisionGUID="615977eb-256c-43e6-8f4f-a81a50d04707" CreationDate="2022-07-22T05:00:12.833" UserId="1789" Text="|polkadot|validator|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14543" PostHistoryTypeId="2" PostId="3870" RevisionGUID="53d7e73e-a007-4a97-a09f-cf03268075a0" CreationDate="2022-07-22T05:35:58.830" UserId="1789" Text="I solved it... Do not duplicate Hardhat plugin imports. &#xD;&#xA;```&#xD;&#xA;import { task, HardhatUserConfig } from &quot;hardhat/config&quot;;&#xD;&#xA;import { ethers } from &quot;ethers&quot;;&#xD;&#xA;import '@nomiclabs/hardhat-waffle'&#xD;&#xA;import &quot;@nomiclabs/hardhat-ethers&quot;;&#xD;&#xA;import { config as dotenvConfig } from &quot;dotenv&quot;;//to avoid conflict with const config: HardhatUserConfig = {}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14545" PostHistoryTypeId="2" PostId="3871" RevisionGUID="2ddb45bf-e408-4b2f-943d-0142b9938d6a" CreationDate="2022-07-22T05:37:18.027" UserId="2384" Text="Here is the pseudo code on how would you do it:&#xD;&#xA;```js&#xD;&#xA;@import polkadot_api;&#xD;&#xA;&#xD;&#xA;let reserver = 0xa_address_is_here;&#xD;&#xA;let registrar.reserve(reserver, 2000);&#xD;&#xA;```&#xD;&#xA;Here is what [`registrar.reserver`](https://github.com/paritytech/polkadot/blob/9804117d3e676aace31ed39569a4e6aec75956de/runtime/common/src/paras_registrar.rs#L344) do.&#xD;&#xA;&#xD;&#xA;Also refer to polkadot guide on [how to call transaction](https://polkadot.js.org/docs/api/start/api.tx) and [how to call rpc](https://polkadot.js.org/docs/api/start/rpc.custom).&#xD;&#xA;&#xD;&#xA;At this point, you sucessfully reserved a paraId. Now you can proceed to [register parachain](https://substrate.stackexchange.com/a/3848/2384)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14547" PostHistoryTypeId="5" PostId="3870" RevisionGUID="4d481abf-94a1-4caf-8ee8-89825fd764de" CreationDate="2022-07-22T07:03:53.277" UserId="1789" Comment="added 278 characters in body" Text="I solved it... Do not duplicate Hardhat plugin imports. &#xD;&#xA;```&#xD;&#xA;import { task, HardhatUserConfig } from &quot;hardhat/config&quot;;&#xD;&#xA;import { ethers } from &quot;ethers&quot;;&#xD;&#xA;import '@nomiclabs/hardhat-waffle'&#xD;&#xA;import &quot;@nomiclabs/hardhat-ethers&quot;;&#xD;&#xA;import { config as dotenvConfig } from &quot;dotenv&quot;;//to avoid conflict with const config: HardhatUserConfig = {}&#xD;&#xA;```&#xD;&#xA;Also wait for previous transaction to go through first:&#xD;&#xA;```&#xD;&#xA;const tx = await owner.sendTransaction({ &#xD;&#xA;    to: ERC1820_DEPLOYER, value: toWei(0.08) &#xD;&#xA;});&#xD;&#xA;const receipt = await tx.wait().catch((err: any) =&gt; {&#xD;&#xA;    console.log(&quot;Error 001:&quot;, err);&#xD;&#xA;    return false;&#xD;&#xA;});&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14548" PostHistoryTypeId="2" PostId="3872" RevisionGUID="a84e75ed-9912-4f07-9789-5b20e452b55a" CreationDate="2022-07-22T07:15:12.300" UserId="104" Text="Can't answer authoritatively on the 1st or 3rd, but maybe answers to the 2nd question may help illuminate.&#xD;&#xA;&#xD;&#xA;2. The answer is no, but let's list out all of the instructions that allow a user to provide an arbitrary XCM blob as a parameter and sends it onward to another destination:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;InitiateTeleport&#xD;&#xA;InitiateReserveWithdraw&#xD;&#xA;DepositReserveAsset&#xD;&#xA;ExportMessage // XCMv3 instruction&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For the top 3, every time the XCM blob is sent to the intended destination, a `ClearOrigin` instruction is inserted right before executing the XCM blob, making it impossible for the XCM blob to run any privileged operations. Take for instance, the `WithdrawAsset` instruction and look at how it is executed:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;WithdrawAsset(assets) =&gt; {&#xD;&#xA;	// Take `assets` from the origin account (on-chain) and place in holding.&#xD;&#xA;	let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?.clone();&#xD;&#xA;	for asset in assets.into_inner().into_iter() {&#xD;&#xA;		Config::AssetTransactor::withdraw_asset(&amp;asset, &amp;origin, Some(&amp;self.context))?;&#xD;&#xA;		self.subsume_asset(asset)?;&#xD;&#xA;	}&#xD;&#xA;	Ok(())&#xD;&#xA;},&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Right on the first line, we see that it's trying to get a reference to the local origin register. Since the origin register has been cleared out via `ClearOrigin`, this line will fail and we won't be able to send and execute such an instruction via `InitiateTeleport`, `InititateReserveWithdraw` or `DepositReserveAsset`.&#xD;&#xA;&#xD;&#xA;In addition, the two instructions `InitiateTeleport` and `DepositReserveAsset` requires the destination to whitelist the sender as a safe teleporter/reserve, adding another layer of security against arbitrary XCM executions. &#xD;&#xA;&#xD;&#xA;For `ExportMessage`, there is a validation function that is called during the execution of it, which is controlled by the message exporter, so the responsibility of ensuring that nothing weird gets sent via the bridge is up to the bridge itself." ContentLicense="CC BY-SA 4.0" />
  <row Id="14550" PostHistoryTypeId="2" PostId="3873" RevisionGUID="cedf5065-0579-48bb-bed1-240b08df9232" CreationDate="2022-07-22T07:59:14.507" UserId="251" Text="Usually, I go to Subscan.&#xD;&#xA;&#xD;&#xA;At the event page, set the filter to `System::CodeUpdated`.&#xD;&#xA;&#xD;&#xA;Then you can easily find which block height this event happened." ContentLicense="CC BY-SA 4.0" />
  <row Id="14552" PostHistoryTypeId="5" PostId="3873" RevisionGUID="a577353e-b298-4ca0-a944-37ec235a73b7" CreationDate="2022-07-22T08:05:37.947" UserId="251" Comment="added 75 characters in body" Text="Usually, I go to Subscan.&#xD;&#xA;&#xD;&#xA;At the event page, set the filter to `System::CodeUpdated`.&#xD;&#xA;&#xD;&#xA;Then you can easily find which block height this event happened.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;But it looks like is hard to find it out quickly just on a node." ContentLicense="CC BY-SA 4.0" />
  <row Id="14553" PostHistoryTypeId="2" PostId="3874" RevisionGUID="42487ed5-ba50-448b-a057-ebc1bae618ca" CreationDate="2022-07-22T08:11:17.827" UserId="251" Text="For Polkadot Apps, just like what @andresvsm mentioned.&#xD;&#xA;&#xD;&#xA;For CLI, just:&#xD;&#xA;```&#xD;&#xA;curl http://127.0.0.1:9933 -X POST -H &quot;Content-Type:application/json&quot; -d '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;system_localPeerId&quot;,&quot;params&quot;:[],&quot;id&quot;:1}' | jq&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And if you want to interact with Rust, try [this](https://github.com/hack-ink/subalfred/blob/main/substrate-minimum/subrpcer/src/system.rs#L44-L47)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14555" PostHistoryTypeId="2" PostId="3875" RevisionGUID="469c80f6-8fe1-45ff-93d7-d153a49db107" CreationDate="2022-07-22T08:24:55.023" UserId="251" Text="You need to check out which Substrate version that you are upgrading to.&#xD;&#xA;&#xD;&#xA;Then replace all runtime dependencies' Substrate version to that version.&#xD;&#xA;&#xD;&#xA;Finally, you can check the `Cargo.lock` to find out which dependency is using an incompatible parity-util-mem.&#xD;&#xA;&#xD;&#xA;Note:&#xD;&#xA;I suggest following a release branch. Like:&#xD;&#xA;```&#xD;&#xA;# your project.toml&#xD;&#xA;polkadot-xxx = { git = &quot;...polkadot&quot;, branch = &quot;release-v0.9.25 }&#xD;&#xA;cumulus-xxx = { git = &quot;... cumulus&quot;, branch = &quot;polkadot-v0.9.25 }&#xD;&#xA;substrate-xxx = { git = &quot;... substrate&quot;, branch = &quot;polkadot-v0.9.25 }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Otherwise, you might need to select the version manually.&#xD;&#xA;If you change the dependencies to an untagged/unbranched version, it might break the compatibility. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14558" PostHistoryTypeId="2" PostId="3876" RevisionGUID="854d43f6-cba3-4275-a24a-87820ba216b4" CreationDate="2022-07-22T08:53:02.683" UserId="489" Text="# Background&#xD;&#xA;Implementation pairing operation over elliptic curves from the following &quot;families&quot; with parameters such as base field, extension tower structure, coefficients defined in runtime:&#xD;&#xA;- BLS12&#xD;&#xA;- BN&#xD;&#xA;- MNT4/6 (Ate pairing)&#xD;&#xA;&#xD;&#xA;I want to learn about BN128 curve in substrate&#xD;&#xA;&#xD;&#xA;# question&#xD;&#xA;Does substrate support BN128 curve? " ContentLicense="CC BY-SA 4.0" />
  <row Id="14560" PostHistoryTypeId="1" PostId="3876" RevisionGUID="854d43f6-cba3-4275-a24a-87820ba216b4" CreationDate="2022-07-22T08:53:02.683" UserId="489" Text="Does substrate support bn128?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14561" PostHistoryTypeId="3" PostId="3876" RevisionGUID="854d43f6-cba3-4275-a24a-87820ba216b4" CreationDate="2022-07-22T08:53:02.683" UserId="489" Text="|zero-knowlage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14563" PostHistoryTypeId="2" PostId="3877" RevisionGUID="9b7014a9-0a3d-4a77-9c50-88ae41efd3d2" CreationDate="2022-07-22T09:26:00.483" UserId="2911" Text="According to Substrate doc on Runtime development: &quot;...the runtime for a Substrate node contains all of the business logic for executing transactions, saving state transitions, and interacting with the outer node.&quot;&#xD;&#xA;&#xD;&#xA;Can anyone please points out where the APIs are for these functions? (&quot;executing transactions, saving state transitions, and interacting with the outer node.&quot;) Is it &quot;sp_api&quot;? (https://docs.substrate.io/main-docs/fundamentals/runtime-intro/)&#xD;&#xA;&#xD;&#xA;My understanding is that we don't need FRAME and Pallets to build a runtime, and building one from scratch probably is necessary to better understand how Substrate works under the hood. &#xD;&#xA;&#xD;&#xA;Is there an example how this can be done?&#xD;&#xA; &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14565" PostHistoryTypeId="1" PostId="3877" RevisionGUID="9b7014a9-0a3d-4a77-9c50-88ae41efd3d2" CreationDate="2022-07-22T09:26:00.483" UserId="2911" Text="How to build a substrate runtime from scratch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14566" PostHistoryTypeId="3" PostId="3877" RevisionGUID="9b7014a9-0a3d-4a77-9c50-88ae41efd3d2" CreationDate="2022-07-22T09:26:00.483" UserId="2911" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14567" PostHistoryTypeId="5" PostId="3877" RevisionGUID="9df1cff5-e084-4eb3-8a19-cdc74e1d537a" CreationDate="2022-07-22T09:26:50.107" UserId="2911" Comment="deleted 1 character in body" Text="According to Substrate doc on Runtime development: &quot;...the runtime for a Substrate node contains all of the business logic for executing transactions, saving state transitions, and interacting with the outer node.&quot;&#xD;&#xA;&#xD;&#xA;Can anyone please point out where the APIs are for these functions? (&quot;executing transactions, saving state transitions, and interacting with the outer node.&quot;) Is it &quot;sp_api&quot;? (https://docs.substrate.io/main-docs/fundamentals/runtime-intro/)&#xD;&#xA;&#xD;&#xA;My understanding is that we don't need FRAME and Pallets to build a runtime, and building one from scratch probably is necessary to better understand how Substrate works under the hood. &#xD;&#xA;&#xD;&#xA;Is there an example how this can be done?&#xD;&#xA; &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14568" PostHistoryTypeId="2" PostId="3878" RevisionGUID="bfd260cb-403d-450d-b1fc-11c9798a80ba" CreationDate="2022-07-22T09:29:07.233" UserId="94" Text="py-substrate-interface provides helper functions for that in the `utils.ss58` namespace.  &#xD;&#xA;Transforming an address from one chain-id to another can look like this:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;from substrateinterface.utils.ss58 import ss58_decode, ss58_encode&#xD;&#xA;&#xD;&#xA;addr = &quot;5EChUec3ZQhUvY1g52ZbfBVkqjUY9Kcr6mcEvQMbmd38shQL&quot;&#xD;&#xA;# This is optional, but good for input validation.&#xD;&#xA;input_id = 42&#xD;&#xA;output_id = 10&#xD;&#xA;&#xD;&#xA;pk = ss58_decode(addr, valid_ss58_format=input_id)&#xD;&#xA;output = ss58_encode(pk, ss58_format=output_id)&#xD;&#xA;&#xD;&#xA;print(&quot;Input  addr (network={}): {}&quot;.format(input_id, addr))&#xD;&#xA;print(&quot;Output addr (network={}): {}&quot;.format(output_id, output))&#xD;&#xA;```&#xD;&#xA;prints:&#xD;&#xA;```pre&#xD;&#xA;Input  addr (network=42): 5EChUec3ZQhUvY1g52ZbfBVkqjUY9Kcr6mcEvQMbmd38shQL&#xD;&#xA;Output addr (network=10): 231bCuH9G6iDvf4q5zQqaLzAACu8PTUC4ft3EXmxxG1Xs6HW&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can verify the results on polkadot-js https://polkadot.js.org/apps/#/utilities" ContentLicense="CC BY-SA 4.0" />
  <row Id="14570" PostHistoryTypeId="2" PostId="3879" RevisionGUID="7db8afbe-6a60-40d7-9b80-3f931b67ac1d" CreationDate="2022-07-22T10:12:05.237" UserId="251" Text="I didn't see anything about the 'reserved balance can be locked' from the link that you provide.&#xD;&#xA;&#xD;&#xA;I'm not the author of pallet-balances. So, I don't know why it is designed like this.&#xD;&#xA;&#xD;&#xA;But I can answer why you can not do this.&#xD;&#xA;&#xD;&#xA;First, let's look at the [`AccountData`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L672-L695) struct.&#xD;&#xA;&#xD;&#xA;The free balance does not include the reserved balance. They are separated parts.&#xD;&#xA;&#xD;&#xA;Then, the [`set_lock`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L2117-L2137) and [`update_locks`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L944-L994). Apparently, it doesn't care about the amount, just set a lock on the account.&#xD;&#xA;&#xD;&#xA;And when you want to spend the fund, you will enter the [`ensure_can_withdraw`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L1452-L1472) and [`frozen`](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L702-L710). That's the point, it only interacts with free balance. It doesn't work with reserve.&#xD;&#xA;&#xD;&#xA;Finally, we get:&#xD;&#xA;```&#xD;&#xA;free + reserved = total&#xD;&#xA;# and sometimes, the lock might be greater than the free&#xD;&#xA;free - lock     = usable&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14572" PostHistoryTypeId="5" PostId="3874" RevisionGUID="4e9063c8-6ee7-44fb-87d2-8d88d794a637" CreationDate="2022-07-22T10:15:27.507" UserId="251" Comment="deleted 5 characters in body" Text="For Polkadot Apps, just like what @andresvsm mentioned.&#xD;&#xA;&#xD;&#xA;For CLI, just:&#xD;&#xA;```&#xD;&#xA;curl http://127.0.0.1:9933 -X POST -H &quot;Content-Type:application/json&quot; -d '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;system_localPeerId&quot;,&quot;params&quot;:[],&quot;id&quot;:1}'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And if you want to interact with Rust, try [this](https://github.com/hack-ink/subalfred/blob/main/substrate-minimum/subrpcer/src/system.rs#L44-L47)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14573" PostHistoryTypeId="5" PostId="3879" RevisionGUID="f3476eb8-99e7-4165-8a19-f1477c7806f7" CreationDate="2022-07-22T10:32:27.217" UserId="251" Comment="deleted 100 characters in body" Text="I'm not the author of pallet-balances. So, I don't know why it is designed like this.&#xD;&#xA;&#xD;&#xA;But I can answer why you can not do this.&#xD;&#xA;&#xD;&#xA;First, let's look at the [`AccountData`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L672-L695) struct.&#xD;&#xA;&#xD;&#xA;The free balance does not include the reserved balance. They are separated parts.&#xD;&#xA;&#xD;&#xA;Then, the [`set_lock`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L2117-L2137) and [`update_locks`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L944-L994). Apparently, it doesn't care about the amount, just set a lock on the account.&#xD;&#xA;&#xD;&#xA;And when you want to spend the fund, you will enter the [`ensure_can_withdraw`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L1452-L1472) and [`frozen`](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L702-L710). That's the point, it only interacts with free balance. It doesn't work with reserve.&#xD;&#xA;&#xD;&#xA;Finally, we get:&#xD;&#xA;```&#xD;&#xA;free + reserved = total&#xD;&#xA;# and sometimes, the lock might be greater than the free&#xD;&#xA;free - lock     = usable&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14574" PostHistoryTypeId="5" PostId="3879" RevisionGUID="28f507e7-185e-4302-8ab8-189fda9ec392" CreationDate="2022-07-22T10:54:33.003" UserId="251" Comment="added 499 characters in body" Text="I didn't found 'you can reserve the lock funds' from the link you provide.&#xD;&#xA;&#xD;&#xA;I'm not the author of pallet-balances. So, I don't know why it is designed like this.&#xD;&#xA;&#xD;&#xA;But I can answer why you can not do this.&#xD;&#xA;&#xD;&#xA;First, let's look at the [`AccountData`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L672-L695) struct.&#xD;&#xA;&#xD;&#xA;The free balance does not include the reserved balance. They are separated parts.&#xD;&#xA;&#xD;&#xA;Then, the [`set_lock`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L2117-L2137) and [`update_locks`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L944-L994). Apparently, it doesn't care about the amount, just set a lock on the account.&#xD;&#xA;&#xD;&#xA;And when you want to spend the fund, you will enter the [`ensure_can_withdraw`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L1452-L1472) and [`frozen`](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L702-L710). That's the point, it only interacts with free balance. It doesn't work with reserve.&#xD;&#xA;&#xD;&#xA;For the [`reserve`](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/balances/src/lib.rs#L1763-L1781). You can see it also call the `ensure_can_withdraw`. So, you can not call reserve after lock.&#xD;&#xA;&#xD;&#xA;Finally, we get:&#xD;&#xA;```&#xD;&#xA;free + reserved = total&#xD;&#xA;free - lock     = usable&#xD;&#xA;&#xD;&#xA;sometimes, the lock might be greater than the total&#xD;&#xA;&#xD;&#xA;so, this pallet allows you to write your own logic like&#xD;&#xA;&#xD;&#xA;set a lock depending on your reserve amount, and it might looks&#xD;&#xA;like your locked funds were in reseved?&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14575" PostHistoryTypeId="2" PostId="3880" RevisionGUID="2308cb51-a53d-4b21-b410-54416d83a11f" CreationDate="2022-07-22T11:37:13.300" UserId="2033" Text="I have written the benchmarking code for the pallet, &#xD;&#xA;&#xD;&#xA;Used the below CLI command to run benchmarking - &#xD;&#xA;&#xD;&#xA;./target/release/node-template benchmark pallet --pallet pallet_usd_rate --extrinsic &quot;*&quot; --steps=50 --repeat=20 --execution=wasm --wasm-execution=compiled --heap-pages=4098 --output=pallets/usd-rate/src/weights1.rs&#xD;&#xA;&#xD;&#xA;But during execution I have seen one surprising thing that on each execution of benchmarking, the calculated weight are different.&#xD;&#xA;It is varying between 10_245_000 to 28_000_000.&#xD;&#xA;&#xD;&#xA;I have tried many ways via changing the parameters, but the behaviour is same.&#xD;&#xA;Even I have tried to run the benchmarking of Pallet_timestamp..&#xD;&#xA;But for pallet_timestamp also it is varying, it is not fixed.&#xD;&#xA;&#xD;&#xA;I assume it must be fixed value on a particular machine....because there is no change in code..&#xD;&#xA;It should not vary on each execution..&#xD;&#xA;&#xD;&#xA;Can anyone explain me the reason for this behaviour." ContentLicense="CC BY-SA 4.0" />
  <row Id="14577" PostHistoryTypeId="1" PostId="3880" RevisionGUID="2308cb51-a53d-4b21-b410-54416d83a11f" CreationDate="2022-07-22T11:37:13.300" UserId="2033" Text="Can any one tell me why weight generated via benchmarking execution is varying on each execution" ContentLicense="CC BY-SA 4.0" />
  <row Id="14578" PostHistoryTypeId="3" PostId="3880" RevisionGUID="2308cb51-a53d-4b21-b410-54416d83a11f" CreationDate="2022-07-22T11:37:13.300" UserId="2033" Text="|substrate-node|substrate-node-template|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14579" PostHistoryTypeId="2" PostId="3881" RevisionGUID="101c3415-de1a-4470-865e-2a4d3fc5bb01" CreationDate="2022-07-22T13:21:02.187" UserId="372" Text="Substrate requires that every header has a state root. (See [Trait `Header`](https://crates.parity.io/sp_runtime/traits/trait.Header.html).)&#xD;&#xA;&#xD;&#xA;When the runtime executes a block authored by a peer, it is assumed that the runtime will check the state root from the header against the state that it has calculated itself. For example, FRAME does the [state root check in FRAME executive](https://github.com/paritytech/substrate/blob/master/frame/executive/src/lib.rs#L476-L479).&#xD;&#xA;&#xD;&#xA;Question: Why is it the runtime's job to do this check, when virtually every runtime will have to do it? Why isn't this check done on the client side so the runtime developer has no chance to forget?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14581" PostHistoryTypeId="1" PostId="3881" RevisionGUID="101c3415-de1a-4470-865e-2a4d3fc5bb01" CreationDate="2022-07-22T13:21:02.187" UserId="372" Text="Why isn't the state root checked on the client side?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14582" PostHistoryTypeId="3" PostId="3881" RevisionGUID="101c3415-de1a-4470-865e-2a4d3fc5bb01" CreationDate="2022-07-22T13:21:02.187" UserId="372" Text="|runtime|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14583" PostHistoryTypeId="5" PostId="2381" RevisionGUID="1ee69ea3-5dea-4275-a71a-dc910f706e7d" CreationDate="2022-07-22T14:07:37.343" UserId="28" Comment="added 14 characters in body" Text="If you get this kinda error when compiling you substrate-node-template make sure you have all these installed&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;mrisholukamba@mrisholukamba:~$ rustup show&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /home/mrisholukamba/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.60.0 (7737e0b5c 2022-04-04)&#xD;&#xA;--------------------------------------------&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;after that and it does not compile , make sure you install&#xD;&#xA;&#xD;&#xA;    apt-get install make&#xD;&#xA;&#xD;&#xA;----------------------------------------------------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: This applies if the substrate-node-template is fresh&#xD;&#xA;But after playing around with it and you get error when compiling then make sure you read the error message and tackle it accordingly. This problem occurred to me and it was wise sharing the solution to any beginner." ContentLicense="CC BY-SA 4.0" />
  <row Id="14584" PostHistoryTypeId="2" PostId="3882" RevisionGUID="90905770-a465-48ad-88aa-25c403721883" CreationDate="2022-07-22T14:26:03.093" UserId="1789" Text="I can deploy a few Ethereum smart contracts into my parachain via Hardhat. &#xD;&#xA;&#xD;&#xA;But those are only smaller contracts. All the big contracts, the upgradeable contracts, cannot be deployed with error message &#xD;&#xA;```&#xD;&#xA;ProviderError: submit transaction to pool failed: Pool(InvalidTransaction(InvalidTransaction::ExhaustsResources))&#xD;&#xA;```&#xD;&#xA;Reference: https://wiki.polkadot.network/docs/maintain-errors. &#xD;&#xA;&#xD;&#xA;my hardhat.config.ts has gas limit 4100000, which should be enough... right? I mean... &#xD;&#xA;- what is too big gas limit, and what is too small?&#xD;&#xA;&#xD;&#xA;I suspect my parachain has certain limitations on deployment sizes... &#xD;&#xA;&#xD;&#xA;- Where is that set? &#xD;&#xA;- How can I increase such limitation? " ContentLicense="CC BY-SA 4.0" />
  <row Id="14586" PostHistoryTypeId="1" PostId="3882" RevisionGUID="90905770-a465-48ad-88aa-25c403721883" CreationDate="2022-07-22T14:26:03.093" UserId="1789" Text="Pool(InvalidTransaction(InvalidTransaction::ExhaustsResources))" ContentLicense="CC BY-SA 4.0" />
  <row Id="14587" PostHistoryTypeId="3" PostId="3882" RevisionGUID="90905770-a465-48ad-88aa-25c403721883" CreationDate="2022-07-22T14:26:03.093" UserId="1789" Text="|parachain|frontier|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14588" PostHistoryTypeId="2" PostId="3883" RevisionGUID="ddccbb1f-a207-47e8-8498-4eccf23edea4" CreationDate="2022-07-22T15:11:39.917" UserId="419" Text="I have a chain running with some pallets in the runtime. Now I want to add a new (already existing) pallet in the runtime, but this pallet has some genesis config entries.&#xD;&#xA;&#xD;&#xA;Is it possible to add this pallet in the runtime as part of a forkless upgrade? &#xD;&#xA;&#xD;&#xA;One way I could think of achieving this is to use storage migrations which would populate the storage values needed for config items. Would this be a good practice or is there a better solution?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14590" PostHistoryTypeId="1" PostId="3883" RevisionGUID="ddccbb1f-a207-47e8-8498-4eccf23edea4" CreationDate="2022-07-22T15:11:39.917" UserId="419" Text="Is there a way to add a pallet to the runtime, with genesis config, as part of a runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14591" PostHistoryTypeId="3" PostId="3883" RevisionGUID="ddccbb1f-a207-47e8-8498-4eccf23edea4" CreationDate="2022-07-22T15:11:39.917" UserId="419" Text="|runtime|runtime-upgrade|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14592" PostHistoryTypeId="4" PostId="3883" RevisionGUID="973f5481-0ca8-4c20-a837-a929dd473422" CreationDate="2022-07-22T15:24:24.410" UserId="419" Comment="edited title" Text="Is there a way to add a pallet with genesis config through a runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14593" PostHistoryTypeId="2" PostId="3884" RevisionGUID="d7bf1bef-8d3a-42d5-a445-960f5ad1aa30" CreationDate="2022-07-22T15:45:08.760" UserId="2908" Text="Getting the following error and not able to build my first local blockchain using the documentation tutorial:&#xD;&#xA; 3 warnings generated.&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobuf-lited.a(io_win32.cc.o) has no symbols&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobuf-lited.a(io_win32.cc.o) has no symbols&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobufd.a(io_win32.cc.o) has no symbols&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobufd.a(error_listener.cc.o) has no symbols&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobufd.a(io_win32.cc.o) has no symbols&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobufd.a(error_listener.cc.o) has no symbols&#xD;&#xA;  fatal error: /Library/Developer/CommandLineTools/usr/bin/ranlib: can't write to output file (No space left on device)&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ar: internal ranlib command failed&#xD;&#xA;  make[2]: *** [libprotocd.a] Error 1&#xD;&#xA;  make[2]: *** Deleting file `libprotocd.a'&#xD;&#xA;  make[1]: *** [CMakeFiles/libprotoc.dir/all] Error 2&#xD;&#xA;  make: *** [all] Error 2&#xD;&#xA;  thread 'main' panicked at '&#xD;&#xA;  command did not execute successfully, got: exit status: 2&#xD;&#xA;&#xD;&#xA;  build script failed, must exit now', /Users/manekkooner/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish..." ContentLicense="CC BY-SA 4.0" />
  <row Id="14595" PostHistoryTypeId="1" PostId="3884" RevisionGUID="d7bf1bef-8d3a-42d5-a445-960f5ad1aa30" CreationDate="2022-07-22T15:45:08.760" UserId="2908" Text="Not able to build local blockchain as per documenation tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="14596" PostHistoryTypeId="3" PostId="3884" RevisionGUID="d7bf1bef-8d3a-42d5-a445-960f5ad1aa30" CreationDate="2022-07-22T15:45:08.760" UserId="2908" Text="|tutorials|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14597" PostHistoryTypeId="2" PostId="3885" RevisionGUID="c6a6e3ec-5717-4bc2-bfac-2ffdb74a3708" CreationDate="2022-07-22T16:10:24.887" UserId="372" Text="Yes, a migration is the right way to do this." ContentLicense="CC BY-SA 4.0" />
  <row Id="14599" PostHistoryTypeId="33" PostId="3850" RevisionGUID="36f5200f-a9e1-46b8-870d-a76f4780ceb3" CreationDate="2022-07-22T16:24:44.297" UserId="2163" Comment="12" />
  <row Id="14600" PostHistoryTypeId="2" PostId="3886" RevisionGUID="2bd4e890-1e01-46a2-8e46-d2c8aed6cfd1" CreationDate="2022-07-22T19:25:22.070" UserId="2163" Text="What does it actually mean for a PR to be waiting for an audit on substrate, who is going to audit the code and how is it different from reviewing the code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14602" PostHistoryTypeId="1" PostId="3886" RevisionGUID="2bd4e890-1e01-46a2-8e46-d2c8aed6cfd1" CreationDate="2022-07-22T19:25:22.070" UserId="2163" Text="What is the audit process on substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14603" PostHistoryTypeId="3" PostId="3886" RevisionGUID="2bd4e890-1e01-46a2-8e46-d2c8aed6cfd1" CreationDate="2022-07-22T19:25:22.070" UserId="2163" Text="|learning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14604" PostHistoryTypeId="2" PostId="3887" RevisionGUID="8d526c05-7bb0-4020-8327-595a75104cd3" CreationDate="2022-07-22T19:30:44.987" UserId="2913" Text="Out of curiosity, I'm running `$ rust-analyzer analysis-stats .` in my substrate repo root directory.&#xD;&#xA;&#xD;&#xA;I'm getting reports about ~30 cyclic dependencies, similar to&#xD;&#xA;```&#xD;&#xA;[ERROR project_model::workspace] cyclic deps: frame_election_provider_support(CrateId(199)) -&gt; frame_election_provider_solution_type(CrateId(198)), alternative path: frame_election_provider_solution_type(CrateId(198)) -&gt; frame_election_provider_support(CrateId(199))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm wondering if this is a problem or not?&#xD;&#xA;Should it be fixed or should I configure rust-analyzer to ignore it somehow?&#xD;&#xA;&#xD;&#xA;I'm running this version: `rust-analyzer 1.64.0-nightly (897a7ec 2022-07-17)`" ContentLicense="CC BY-SA 4.0" />
  <row Id="14606" PostHistoryTypeId="1" PostId="3887" RevisionGUID="8d526c05-7bb0-4020-8327-595a75104cd3" CreationDate="2022-07-22T19:30:44.987" UserId="2913" Text="Cyclic deps in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14607" PostHistoryTypeId="3" PostId="3887" RevisionGUID="8d526c05-7bb0-4020-8327-595a75104cd3" CreationDate="2022-07-22T19:30:44.987" UserId="2913" Text="|error|learning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14612" PostHistoryTypeId="2" PostId="3889" RevisionGUID="d7939658-3bad-4b80-8dca-3828276071ae" CreationDate="2022-07-23T03:43:47.227" UserId="251" Text="```&#xD;&#xA;(No space left on device)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It looks like you need a larger hard disk." ContentLicense="CC BY-SA 4.0" />
  <row Id="14614" PostHistoryTypeId="2" PostId="3890" RevisionGUID="2c4e3ffb-a020-4695-a7d6-7c8481b76fe4" CreationDate="2022-07-23T03:48:14.047" UserId="251" Text="`BlockWeights` was set [here](https://github.com/paritytech/substrate/blob/dbdbef95c84644328bee60bd170d79814c04e32b/bin/node/runtime/src/lib.rs#L204).&#xD;&#xA;&#xD;&#xA;Tips:&#xD;&#xA;&#xD;&#xA;If you have sudo pallet on your chain. You could try [`sudo_unchecked_weight`](https://github.com/paritytech/substrate/blob/dbdbef95c84644328bee60bd170d79814c04e32b/frame/sudo/src/lib.rs#L156-L180). To verify if this is the root cause." ContentLicense="CC BY-SA 4.0" />
  <row Id="14616" PostHistoryTypeId="6" PostId="3864" RevisionGUID="0a71a8e7-ba45-40ab-887e-6b75218d1d8e" CreationDate="2022-07-23T07:28:20.753" UserId="2163" Comment="Added new tag." Text="|substrate-node|rpc|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14617" PostHistoryTypeId="24" PostId="3864" RevisionGUID="0a71a8e7-ba45-40ab-887e-6b75218d1d8e" CreationDate="2022-07-23T07:28:20.753" Comment="Proposed by 2163 approved by 34 edit id of 247" ContentLicense="CC BY-SA 4.0" />
  <row Id="14618" PostHistoryTypeId="5" PostId="3884" RevisionGUID="df7d87ec-f320-4312-8ef8-72eb9fa9abed" CreationDate="2022-07-23T07:28:33.597" UserId="251" Comment="Markdown Format" Text="Getting the following error and not able to build my first local blockchain using the documentation tutorial:&#xD;&#xA; 3 warnings generated.&#xD;&#xA;```&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobuf-lited.a(io_win32.cc.o) has no symbols&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobuf-lited.a(io_win32.cc.o) has no symbols&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobufd.a(io_win32.cc.o) has no symbols&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobufd.a(error_listener.cc.o) has no symbols&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobufd.a(io_win32.cc.o) has no symbols&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libprotobufd.a(error_listener.cc.o) has no symbols&#xD;&#xA;  fatal error: /Library/Developer/CommandLineTools/usr/bin/ranlib: can't write to output file (No space left on device)&#xD;&#xA;  /Library/Developer/CommandLineTools/usr/bin/ar: internal ranlib command failed&#xD;&#xA;  make[2]: *** [libprotocd.a] Error 1&#xD;&#xA;  make[2]: *** Deleting file `libprotocd.a'&#xD;&#xA;  make[1]: *** [CMakeFiles/libprotoc.dir/all] Error 2&#xD;&#xA;  make: *** [all] Error 2&#xD;&#xA;  thread 'main' panicked at '&#xD;&#xA;  command did not execute successfully, got: exit status: 2&#xD;&#xA;&#xD;&#xA;  build script failed, must exit now', /Users/manekkooner/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14619" PostHistoryTypeId="24" PostId="3884" RevisionGUID="df7d87ec-f320-4312-8ef8-72eb9fa9abed" CreationDate="2022-07-23T07:28:33.597" Comment="Proposed by 251 approved by 34 edit id of 248" ContentLicense="CC BY-SA 4.0" />
  <row Id="14620" PostHistoryTypeId="2" PostId="3891" RevisionGUID="878ce09c-6819-40e6-99e2-9a7bed03b42c" CreationDate="2022-07-23T09:39:10.410" UserId="309" Text="need help with benchmarking: the command `cargo build --release --features runtime-benchmarks` completes without any problem, but then I try  `./target/release/fs-node benchmark pallet --chain dev --execution wasm --wasm-execution compiled --pallet pallet_nft --extrinsic &quot;*&quot; --steps 100 --repeat 40 --output ./pallets/nft/src/weights.rs --template ./pallets/roles/src/frame-weight-template.hbs` and I get  this :  `Error: Input(&quot;NotPermitted&quot;)` any idea about the source of this error?&#xD;&#xA;Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="14622" PostHistoryTypeId="1" PostId="3891" RevisionGUID="878ce09c-6819-40e6-99e2-9a7bed03b42c" CreationDate="2022-07-23T09:39:10.410" UserId="309" Text="Benchmarks command error" ContentLicense="CC BY-SA 4.0" />
  <row Id="14623" PostHistoryTypeId="3" PostId="3891" RevisionGUID="878ce09c-6819-40e6-99e2-9a7bed03b42c" CreationDate="2022-07-23T09:39:10.410" UserId="309" Text="|substrate-node|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14625" PostHistoryTypeId="2" PostId="3892" RevisionGUID="b69468b7-2707-4e9c-bb57-3f47439d2926" CreationDate="2022-07-23T10:23:08.523" UserId="2916" Text="Why isn't the local node identity showing when I start a new Substrate node?&#xD;&#xA;&#xD;&#xA;I'm using this command:&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;And would expect the output to look more like this:&#xD;&#xA;```&#xD;&#xA;2021-03-10 17:34:27  Substrate Node&#xD;&#xA;2021-03-10 17:34:27  ✌️  version 3.0.0-1c5b984-x86_64-linux-gnu&#xD;&#xA;2021-03-10 17:34:27  ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2021&#xD;&#xA;2021-03-10 17:34:27   Chain specification: Local Testnet&#xD;&#xA;2021-03-10 17:34:27   Node name: Alice&#xD;&#xA;2021-03-10 17:34:27   Role: AUTHORITY&#xD;&#xA;2021-03-10 17:34:27   Database: RocksDb at /tmp/alice/chains/local_testnet/db&#xD;&#xA;2021-03-10 17:34:27  ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)&#xD;&#xA;2021-03-10 17:34:27   Initializing Genesis block/state (state: 0xea47…9ba8, header-hash: 0x9d07…7cce)&#xD;&#xA;2021-03-10 17:34:27   Loading GRANDPA authority set from genesis on what appears to be first startup.&#xD;&#xA;2021-03-10 17:34:27  ⏱  Loaded block-time = 6000 milliseconds from genesis on first-launch&#xD;&#xA;2021-03-10 17:34:27  Using default protocol ID &quot;sup&quot; because none is configured in the chain specs&#xD;&#xA;2021-03-10 17:34:27   Local node identity is: 12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But my response looks more like this:&#xD;&#xA;[![same response but missing a bunch of info…][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6NnkD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14627" PostHistoryTypeId="1" PostId="3892" RevisionGUID="b69468b7-2707-4e9c-bb57-3f47439d2926" CreationDate="2022-07-23T10:23:08.523" UserId="2916" Text="How to get local node identity to show when starting a new Substrate node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14628" PostHistoryTypeId="3" PostId="3892" RevisionGUID="b69468b7-2707-4e9c-bb57-3f47439d2926" CreationDate="2022-07-23T10:23:08.523" UserId="2916" Text="|substrate-node|substrate-node-template|identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14630" PostHistoryTypeId="2" PostId="3893" RevisionGUID="7be7a76a-59a9-4a07-8c76-87e59e971fd7" CreationDate="2022-07-23T11:12:43.790" UserId="94" Text="The benchbot can now also be used to run on *companion* merge requests, even in Cumulus.  &#xD;&#xA;An example command looks like this:  &#xD;&#xA;```pre&#xD;&#xA;/cmd queue -v PATCH_substrate=11796 -c bench-bot $ pallet statemint assets pallet_uniques&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This would benchmark the `uniques` pallet for the `statemint` runtime after patching the local Substrate installation to MR `11796`.&#xD;&#xA;The `-v PATCH_substrate` is important to tell the to consider this as a companion to a different MR.  &#xD;&#xA;You can add Polkadot here as well. The output will be pushed directly to the branch, as can be see [here](https://github.com/paritytech/cumulus/pull/1460#issuecomment-1193097900).  &#xD;&#xA;&#xD;&#xA;Currently it looks like its modifying the `Cargo.lock` file, I dont think that is intentional. Will be fixed shortly." ContentLicense="CC BY-SA 4.0" />
  <row Id="14632" PostHistoryTypeId="2" PostId="3894" RevisionGUID="f7836186-4096-473f-9456-4eccf6bf9be3" CreationDate="2022-07-23T11:44:36.967" UserId="94" Text="In your case the error originates from your pallet logic itself.  &#xD;&#xA;The `NotPermitted` error is defined [here](https://github.com/Fair-Squares/fair-squares/blob/f5207c4a74b362cb46be368240c9489280ce095b/pallets/nft/src/lib.rs#L260).  &#xD;&#xA;In your benchmark you call the `mint` extrinsic with this account: `create_account::&lt;T&gt;(&quot;caller&quot;, 0)` which is not permitted to mint, therefore the error.  &#xD;&#xA;The `can_mint` function in the `Permissions` trait guards that, you can either mock it by whitelisting that account or use an account that is permissioned.  &#xD;&#xA;&#xD;&#xA;With mocked `Permissions` it looks like this for the `mint` extrinsic but the others need fixing as well.  &#xD;&#xA;```pre&#xD;&#xA;Pallet: &quot;pallet_nft&quot;, Extrinsic: &quot;mint&quot;, Lowest values: [], Highest values: [], Steps: 100, Repeat: 40&#xD;&#xA;Raw Storage Info&#xD;&#xA;========&#xD;&#xA;Storage: NftModule Collections (r:1 w:0)&#xD;&#xA;Storage: Uniques Asset (r:1 w:1)&#xD;&#xA;Storage: Uniques Class (r:1 w:1)&#xD;&#xA;Storage: Uniques CollectionMaxSupply (r:1 w:0)&#xD;&#xA;Storage: Uniques Account (r:0 w:1)&#xD;&#xA;Storage: NftModule Items (r:0 w:1)&#xD;&#xA;&#xD;&#xA;Median Slopes Analysis&#xD;&#xA;========&#xD;&#xA;-- Extrinsic Time --&#xD;&#xA;&#xD;&#xA;Model:&#xD;&#xA;Time ~=    48.62&#xD;&#xA;              µs&#xD;&#xA;&#xD;&#xA;Reads = 4&#xD;&#xA;Writes = 4&#xD;&#xA;&#xD;&#xA;Min Squares Analysis&#xD;&#xA;========&#xD;&#xA;-- Extrinsic Time --&#xD;&#xA;&#xD;&#xA;Model:&#xD;&#xA;Time ~=    48.62&#xD;&#xA;              µs&#xD;&#xA;&#xD;&#xA;Reads = 4&#xD;&#xA;Writes = 4&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Two more things just for your convenience:  &#xD;&#xA;1. You can run the benchmarks in a *test* mode where just one iteration is executed. This compiles much faster than the normal benchmarking. The test mode uses the mocked runtime and the real benchmarks use the node runtime.  &#xD;&#xA;```sh&#xD;&#xA;cargo t --features=runtime-benchmarks -p pallet-nft&#xD;&#xA;```&#xD;&#xA;2. In the long run you should try to get rid of the `without_storage_info` annotation. *Just* delete them and fix the compile errors. In the future these annotations need to be removed to enable PoV benchmarking." ContentLicense="CC BY-SA 4.0" />
  <row Id="14634" PostHistoryTypeId="50" PostId="3418" RevisionGUID="34252051-7b71-4e99-a17b-81404d16f203" CreationDate="2022-07-23T12:04:20.293" UserId="-1" />
  <row Id="14635" PostHistoryTypeId="2" PostId="3895" RevisionGUID="bd349158-12e2-483a-82c1-a7b9fc487d89" CreationDate="2022-07-23T16:39:04.947" UserId="244" Text="You are using a version of Substrate with a known bug that has been fixed. Here you can check 2 issues about your problem: &#xD;&#xA;- https://github.com/paritytech/substrate/issues/11855&#xD;&#xA;- https://github.com/paritytech/substrate/issues/11691&#xD;&#xA;&#xD;&#xA;For now, you can either pin the `tracing-core` crate to version `0.1.26`, or you can update the dependencies to remove the bugged feature, as a temporary workaround, like here:&#xD;&#xA;- https://github.com/paritytech/substrate/pull/11854" ContentLicense="CC BY-SA 4.0" />
  <row Id="14637" PostHistoryTypeId="34" PostId="3850" RevisionGUID="fbbd11ce-4f53-4c3d-ab5b-0bf446271cee" CreationDate="2022-07-23T16:50:16.960" UserId="2163" Comment="12" />
  <row Id="14638" PostHistoryTypeId="5" PostId="3418" RevisionGUID="fc6d89b1-99b3-463c-8f8b-f19f226780d8" CreationDate="2022-07-23T16:59:51.657" UserId="2163" Comment="fixed some typos, and made the question more readable" Text="What are some very optimal tokenomics for a substrate based blockchain without any parachains that can be easily implemented using substrate's default framework? The documentation on W3 research says to maintain (for chains without any parachains) at least 75% of the tokens staked. &#xD;&#xA;&#xD;&#xA;1-If this peg is not maintained..what will happen?? other than having more tokens in circulation in the market.. does it affect the stability of the chain??&#xD;&#xA;&#xD;&#xA;2-What if we keep all the parameters the same as what is described in Web3's substrate guide but only change the staking % to 50% instead of 75% that is advised? (without parachains)&#xD;&#xA;&#xD;&#xA;3-Substrate docs say if staking drops below 50% the security of the network will be compromised? What does that mean? because in the Polkadot tokenomics its mentioned that if staking drops below 50% the validators rewards will increase and also % of inflation will go to the treasury. Will the treasury tokens balance out the staking % decrease?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14639" PostHistoryTypeId="4" PostId="3418" RevisionGUID="fc6d89b1-99b3-463c-8f8b-f19f226780d8" CreationDate="2022-07-23T16:59:51.657" UserId="2163" Comment="fixed some typos, and made the question more readable" Text="Need help with understanding Token Economics Design for Substrate based blockchain (without any Parachains)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14640" PostHistoryTypeId="24" PostId="3418" RevisionGUID="fc6d89b1-99b3-463c-8f8b-f19f226780d8" CreationDate="2022-07-23T16:59:51.657" Comment="Proposed by 2163 approved by 34 edit id of 249" ContentLicense="CC BY-SA 4.0" />
  <row Id="14642" PostHistoryTypeId="2" PostId="3896" RevisionGUID="a742ee2e-66ee-4afc-92c5-d524346c0edb" CreationDate="2022-07-23T17:43:49.187" UserId="28" Text="Cyclic dependencies are not allowed by Rust in general.&#xD;&#xA;&#xD;&#xA;I looked into the specific error that is being brought up here.&#xD;&#xA;&#xD;&#xA;Package `frame-election-provider-support` has a dependency on `frame-election-provider-solution-type`.&#xD;&#xA;&#xD;&#xA;But package `frame-election-provider-solution-type` only has a `dev-dependency` to `frame-election-provider-support`.&#xD;&#xA;&#xD;&#xA;In this case, the cyclic dependency is right, and something that is explicitly allowed by the rust testing framework.&#xD;&#xA;&#xD;&#xA;So in this case, no, nothing needs to be fixed afaik." ContentLicense="CC BY-SA 4.0" />
  <row Id="14644" PostHistoryTypeId="2" PostId="3897" RevisionGUID="731a8ee1-b3a1-449f-bd80-f017c78c66f8" CreationDate="2022-07-23T23:55:29.937" UserId="2916" Text="I see this example on [Substrate's docs](https://docs.substrate.io/tutorials/get-started/permissioned-network/):&#xD;&#xA;```&#xD;&#xA;Node key: c12b6d18942f5ee8528c8e2baf4e147b5c5c18710926ea492d09cbd9f6c9f82a&#xD;&#xA;PeerID (generated from the node key): 12D3KooWBmAwcd4PJNJvfV89HwE48nwkRmAgo8Vy3uQEyNNHBox2&#xD;&#xA;Decoded PeerID in hex: 0024080112201ce5f00ef6e89374afb625f1ae4c1546d31234e87e3c3f51a62b91dd6bfa57df&#xD;&#xA;```&#xD;&#xA;I can generate the node key and the PeerID with the `subkey` program e.g. `subkey generate-node-key`. However, I'm not sure how I can decode the PeerID in the Terminal. Any idea how I could do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14646" PostHistoryTypeId="1" PostId="3897" RevisionGUID="731a8ee1-b3a1-449f-bd80-f017c78c66f8" CreationDate="2022-07-23T23:55:29.937" UserId="2916" Text="How to get the hex decoded version of a Peer Id?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14647" PostHistoryTypeId="3" PostId="3897" RevisionGUID="731a8ee1-b3a1-449f-bd80-f017c78c66f8" CreationDate="2022-07-23T23:55:29.937" UserId="2916" Text="|substrate-node-template|nodes|peers|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14648" PostHistoryTypeId="5" PostId="3873" RevisionGUID="583a61f0-6d89-4499-abc7-632efaf08cf8" CreationDate="2022-07-24T06:42:20.553" UserId="251" Comment="added 2391 characters in body" Text="Usually, I go to Subscan.&#xD;&#xA;&#xD;&#xA;At the event page, set the filter to `System::CodeUpdated`.&#xD;&#xA;&#xD;&#xA;Then you can easily find which block height this event happened.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;But it looks like it is hard to find it out quickly just on a node.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Haha, I wrote a tool to fetch the runtime upgrade block. See this [PR](https://github.com/hack-ink/subalfred/pull/37).&#xD;&#xA;&#xD;&#xA;You just need to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subalfred get runtime-upgrade-block 9100 --uri wss://polkadot.api.onfinality.io/public-ws -lsubalfred::core::node&#xD;&#xA;&#xD;&#xA;2022-07-24T06:40:43.855553Z TRACE subalfred::core::node: (0, 11298502) -&gt; 30&#xD;&#xA;2022-07-24T06:40:45.483503Z TRACE subalfred::core::node: (5649251, 11298502) -&gt; 9140&#xD;&#xA;2022-07-24T06:40:46.942158Z TRACE subalfred::core::node: (5649251, 8473876) -&gt; 9090&#xD;&#xA;2022-07-24T06:40:48.439329Z TRACE subalfred::core::node: (7061564, 8473876) -&gt; 9122&#xD;&#xA;2022-07-24T06:40:49.984054Z TRACE subalfred::core::node: (7061564, 7767720) -&gt; 9110&#xD;&#xA;2022-07-24T06:40:50.539368Z TRACE subalfred::core::node: (7061564, 7414642) -&gt; 9110&#xD;&#xA;2022-07-24T06:40:51.808166Z TRACE subalfred::core::node: (7061564, 7238103) -&gt; 9090&#xD;&#xA;2022-07-24T06:40:53.076860Z TRACE subalfred::core::node: (7149834, 7238103) -&gt; 9090&#xD;&#xA;2022-07-24T06:40:54.891926Z TRACE subalfred::core::node: (7193968, 7238103) -&gt; 9090&#xD;&#xA;2022-07-24T06:40:55.981484Z TRACE subalfred::core::node: (7216035, 7238103) -&gt; 9100&#xD;&#xA;2022-07-24T06:40:57.449337Z TRACE subalfred::core::node: (7216035, 7227069) -&gt; 9100&#xD;&#xA;2022-07-24T06:40:58.006499Z TRACE subalfred::core::node: (7216035, 7221552) -&gt; 9100&#xD;&#xA;2022-07-24T06:40:59.226754Z TRACE subalfred::core::node: (7216035, 7218794) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:01.175041Z TRACE subalfred::core::node: (7217415, 7218794) -&gt; 9100&#xD;&#xA;2022-07-24T06:41:02.371131Z TRACE subalfred::core::node: (7217415, 7218104) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:03.477414Z TRACE subalfred::core::node: (7217760, 7218104) -&gt; 9100&#xD;&#xA;2022-07-24T06:41:05.401558Z TRACE subalfred::core::node: (7217760, 7217932) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:05.957115Z TRACE subalfred::core::node: (7217846, 7217932) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:07.067274Z TRACE subalfred::core::node: (7217889, 7217932) -&gt; 9100&#xD;&#xA;2022-07-24T06:41:08.289674Z TRACE subalfred::core::node: (7217889, 7217910) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:09.864914Z TRACE subalfred::core::node: (7217900, 7217910) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:10.976319Z TRACE subalfred::core::node: (7217905, 7217910) -&gt; 9100&#xD;&#xA;2022-07-24T06:41:12.343318Z TRACE subalfred::core::node: (7217905, 7217907) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:13.664283Z TRACE subalfred::core::node: (7217906, 7217907) -&gt; 9090&#xD;&#xA;7217907 0x8f10de9e6dcf190dccc90f464a8aa4448c9b080746d8e905bb0e4841fef80fdd&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-rpc.dwellir.com#/explorer/query/0x8f10de9e6dcf190dccc90f464a8aa4448c9b080746d8e905bb0e4841fef80fdd" ContentLicense="CC BY-SA 4.0" />
  <row Id="14649" PostHistoryTypeId="5" PostId="3873" RevisionGUID="a859e85c-e3fb-42c8-bef0-56cc8e5f6328" CreationDate="2022-07-24T06:47:33.370" UserId="251" Comment="added 2391 characters in body" Text="Usually, I go to Subscan.&#xD;&#xA;&#xD;&#xA;At the event page, set the filter to `System::CodeUpdated`.&#xD;&#xA;&#xD;&#xA;Then you can easily find which block height this event happened.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;But it looks like it is hard to find it out quickly just on a node.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Haha, I wrote a tool to fetch the runtime upgrade block. See this [PR](https://github.com/hack-ink/subalfred/pull/37).&#xD;&#xA;&#xD;&#xA;It needs &lt;img src=&quot;https://latex.codecogs.com/svg.image?log_2&amp;space;BlockHeight&quot; title=&quot;log_2 BlockHeight&quot; /&gt; times requests.&#xD;&#xA;&#xD;&#xA;You just need to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subalfred get runtime-upgrade-block 9100 --uri wss://polkadot.api.onfinality.io/public-ws -lsubalfred::core::node&#xD;&#xA;&#xD;&#xA;2022-07-24T06:40:43.855553Z TRACE subalfred::core::node: (0, 11298502) -&gt; 30&#xD;&#xA;2022-07-24T06:40:45.483503Z TRACE subalfred::core::node: (5649251, 11298502) -&gt; 9140&#xD;&#xA;2022-07-24T06:40:46.942158Z TRACE subalfred::core::node: (5649251, 8473876) -&gt; 9090&#xD;&#xA;2022-07-24T06:40:48.439329Z TRACE subalfred::core::node: (7061564, 8473876) -&gt; 9122&#xD;&#xA;2022-07-24T06:40:49.984054Z TRACE subalfred::core::node: (7061564, 7767720) -&gt; 9110&#xD;&#xA;2022-07-24T06:40:50.539368Z TRACE subalfred::core::node: (7061564, 7414642) -&gt; 9110&#xD;&#xA;2022-07-24T06:40:51.808166Z TRACE subalfred::core::node: (7061564, 7238103) -&gt; 9090&#xD;&#xA;2022-07-24T06:40:53.076860Z TRACE subalfred::core::node: (7149834, 7238103) -&gt; 9090&#xD;&#xA;2022-07-24T06:40:54.891926Z TRACE subalfred::core::node: (7193968, 7238103) -&gt; 9090&#xD;&#xA;2022-07-24T06:40:55.981484Z TRACE subalfred::core::node: (7216035, 7238103) -&gt; 9100&#xD;&#xA;2022-07-24T06:40:57.449337Z TRACE subalfred::core::node: (7216035, 7227069) -&gt; 9100&#xD;&#xA;2022-07-24T06:40:58.006499Z TRACE subalfred::core::node: (7216035, 7221552) -&gt; 9100&#xD;&#xA;2022-07-24T06:40:59.226754Z TRACE subalfred::core::node: (7216035, 7218794) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:01.175041Z TRACE subalfred::core::node: (7217415, 7218794) -&gt; 9100&#xD;&#xA;2022-07-24T06:41:02.371131Z TRACE subalfred::core::node: (7217415, 7218104) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:03.477414Z TRACE subalfred::core::node: (7217760, 7218104) -&gt; 9100&#xD;&#xA;2022-07-24T06:41:05.401558Z TRACE subalfred::core::node: (7217760, 7217932) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:05.957115Z TRACE subalfred::core::node: (7217846, 7217932) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:07.067274Z TRACE subalfred::core::node: (7217889, 7217932) -&gt; 9100&#xD;&#xA;2022-07-24T06:41:08.289674Z TRACE subalfred::core::node: (7217889, 7217910) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:09.864914Z TRACE subalfred::core::node: (7217900, 7217910) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:10.976319Z TRACE subalfred::core::node: (7217905, 7217910) -&gt; 9100&#xD;&#xA;2022-07-24T06:41:12.343318Z TRACE subalfred::core::node: (7217905, 7217907) -&gt; 9090&#xD;&#xA;2022-07-24T06:41:13.664283Z TRACE subalfred::core::node: (7217906, 7217907) -&gt; 9090&#xD;&#xA;7217907 0x8f10de9e6dcf190dccc90f464a8aa4448c9b080746d8e905bb0e4841fef80fdd&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-rpc.dwellir.com#/explorer/query/0x8f10de9e6dcf190dccc90f464a8aa4448c9b080746d8e905bb0e4841fef80fdd" ContentLicense="CC BY-SA 4.0" />
  <row Id="14650" PostHistoryTypeId="2" PostId="3898" RevisionGUID="2468033f-5639-43ed-96e4-1b6c6b2e1936" CreationDate="2022-07-24T08:46:54.310" UserId="2916" Text="I notice that for the [nicks pallet](https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/) there is no need to write a custom RPC or configure that, while with the [contracts pallet](https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/) that need seems to be there. It also seems that in the Substrate Front End Explorer that the former's methods seems to be considered &quot;Extrinsic&quot;.&#xD;&#xA;&#xD;&#xA;I'm having trouble wrapping my head between the difference between these two pallets and why the &quot;contracts&quot; pallet needs all the extra RPC configuration. Any idea why this is the case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14652" PostHistoryTypeId="1" PostId="3898" RevisionGUID="2468033f-5639-43ed-96e4-1b6c6b2e1936" CreationDate="2022-07-24T08:46:54.310" UserId="2916" Text="What's the different between &quot;Extrinsic&quot; and &quot;RPC&quot; methods for pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14653" PostHistoryTypeId="3" PostId="3898" RevisionGUID="2468033f-5639-43ed-96e4-1b6c6b2e1936" CreationDate="2022-07-24T08:46:54.310" UserId="2916" Text="|pallet|substrate-node-template|runtime|rpc|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14654" PostHistoryTypeId="2" PostId="3899" RevisionGUID="9d208e79-a6b0-40f2-9b8f-e445a1bec319" CreationDate="2022-07-24T11:17:41.997" UserId="351" Text="**Extrinsics** are anything that comes from external sources and make into the chain, i.e&#xD;&#xA;Function call, submitting anything to the chain.&#xD;&#xA;**RPC ( Remote procedural Call)** is the execution of a function remotely. RPC can be used to execute anything which is defined in another remote server. So for example in your custom pallet there are some functions which you defined, those ae extrinsics call because they will put external data into the chain state, but also how can you call those functions , you use RPC to call them.   " ContentLicense="CC BY-SA 4.0" />
  <row Id="14656" PostHistoryTypeId="2" PostId="3900" RevisionGUID="74365b76-43f9-4d59-b3a2-fedea5cdfea3" CreationDate="2022-07-24T11:25:55.130" UserId="351" Text="Well you have misunderstood the docs. So Substrate is divided into substrate node and the runtime. The runtime is the state transition function which contain custom logic.&#xD;&#xA;But also there is **FRAME framework** for building the runtime. &#xD;&#xA;&#xD;&#xA;The runtime compiles to WASM. So it means you can build your own runtime framework and compile it to WASM but this is the hard path because all developers are using the existing FRAME , so you will have little help building your own runtime framework. But this gives much flexibility which in most cases you wouldn't want it. So it is just better to use FRAME because there alot of modules/pallets which are present to help you and never re-invent the wheel. And learning FRAME just follow the documentation. And if you want to understand the substrate node, just follow the codebase. Because the focus is on the runtime and the whole node logic is abstracted away.   " ContentLicense="CC BY-SA 4.0" />
  <row Id="14658" PostHistoryTypeId="2" PostId="3901" RevisionGUID="f8f2b23b-98b7-4d84-b6ee-88d7d774603f" CreationDate="2022-07-24T15:12:58.373" UserId="2319" Text="Clone the repo&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;cd substrate-node-template&#xD;&#xA;&#xD;&#xA;cargo build --release&#xD;&#xA;&#xD;&#xA;Add scheduler-pallet Add this line in runtime cargo.toml&#xD;&#xA;&#xD;&#xA;pallet-vesting = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;&#xD;&#xA;'pallet-vesting/std',&#xD;&#xA;Check that the new dependencies resolve correctly by running the following command:&#xD;&#xA;cargo check -p node-template-runtime&#xD;&#xA;&#xD;&#xA;then it gives below error&#xD;&#xA;&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `Event`, `Currency`, `BlockNumberToBalance`, `MinVestedTransfer`, `WeightInfo`, `MAX_VESTING_SCHEDULES`&#xD;&#xA;     --&gt; /home/amit/Substrate/New Pallet/substrate-node-template/runtime/src/lib.rs:203:1&#xD;&#xA;      |&#xD;&#xA;  203 | impl pallet_vesting::Config for Runtime {}&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Event`, `Currency`, `BlockNumberToBalance`, `MinVestedTransfer`, `WeightInfo`, `MAX_VESTING_SCHEDULES` in implementation&#xD;&#xA;      |&#xD;&#xA;      = help: implement the missing item: `type Event = Type;`&#xD;&#xA;      = help: implement the missing item: `type Currency = Type;`&#xD;&#xA;      = help: implement the missing item: `type BlockNumberToBalance = Type;`&#xD;&#xA;      = help: implement the missing item: `type MinVestedTransfer = Type;`&#xD;&#xA;      = help: implement the missing item: `type WeightInfo = Type;`&#xD;&#xA;      = help: implement the missing item: `const MAX_VESTING_SCHEDULES: u32 = 42;`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0046`." ContentLicense="CC BY-SA 4.0" />
  <row Id="14660" PostHistoryTypeId="1" PostId="3901" RevisionGUID="f8f2b23b-98b7-4d84-b6ee-88d7d774603f" CreationDate="2022-07-24T15:12:58.373" UserId="2319" Text="How to Add Vesting pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="14661" PostHistoryTypeId="3" PostId="3901" RevisionGUID="f8f2b23b-98b7-4d84-b6ee-88d7d774603f" CreationDate="2022-07-24T15:12:58.373" UserId="2319" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14662" PostHistoryTypeId="5" PostId="3901" RevisionGUID="2921e3ca-3a18-4518-9151-111af516ec6b" CreationDate="2022-07-24T15:14:24.233" UserId="2319" Comment="added 16 characters in body" Text="----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Clone the repo&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;cd substrate-node-template&#xD;&#xA;&#xD;&#xA;cargo build --release&#xD;&#xA;&#xD;&#xA;Add scheduler-pallet Add this line in runtime cargo.toml&#xD;&#xA;&#xD;&#xA;pallet-vesting = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;&#xD;&#xA;'pallet-vesting/std',&#xD;&#xA;Check that the new dependencies resolve correctly by running the following command:&#xD;&#xA;cargo check -p node-template-runtime&#xD;&#xA;&#xD;&#xA;then it gives below error&#xD;&#xA;&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `Event`, `Currency`, `BlockNumberToBalance`, `MinVestedTransfer`, `WeightInfo`, `MAX_VESTING_SCHEDULES`&#xD;&#xA;     --&gt; /home/amit/Substrate/New Pallet/substrate-node-template/runtime/src/lib.rs:203:1&#xD;&#xA;      |&#xD;&#xA;  203 | impl pallet_vesting::Config for Runtime {}&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Event`, `Currency`, `BlockNumberToBalance`, `MinVestedTransfer`, `WeightInfo`, `MAX_VESTING_SCHEDULES` in implementation&#xD;&#xA;      |&#xD;&#xA;      = help: implement the missing item: `type Event = Type;`&#xD;&#xA;      = help: implement the missing item: `type Currency = Type;`&#xD;&#xA;      = help: implement the missing item: `type BlockNumberToBalance = Type;`&#xD;&#xA;      = help: implement the missing item: `type MinVestedTransfer = Type;`&#xD;&#xA;      = help: implement the missing item: `type WeightInfo = Type;`&#xD;&#xA;      = help: implement the missing item: `const MAX_VESTING_SCHEDULES: u32 = 42;`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0046`." ContentLicense="CC BY-SA 4.0" />
  <row Id="14663" PostHistoryTypeId="2" PostId="3902" RevisionGUID="fa62b65f-5c16-468d-82da-53dfc96676d9" CreationDate="2022-07-24T15:20:09.417" UserId="2163" Text="I am going to answer only the part about why the nicks pallet doesn't need RPC methods because there already seems to be an answer that explains the second part of your question.&#xD;&#xA;&#xD;&#xA;AFAIK the reason why the nicks pallet doesn't need RPC methods is that substrate comes with a runtime API for querying storage values. So in the case of the nicks pallet, you are actually only querying the storage values, and substrate allows you to do that." ContentLicense="CC BY-SA 4.0" />
  <row Id="14665" PostHistoryTypeId="2" PostId="3903" RevisionGUID="6bfd1b19-759e-4099-b36e-c805046eadd8" CreationDate="2022-07-24T15:33:15.397" UserId="251" Text="Here's a [tutorial](https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/) about how to add a pallet to runtime.&#xD;&#xA;&#xD;&#xA;And for the error, here's an [example](https://github.com/paritytech/substrate/blob/ca570cffee47d9fa4806715b0e8b284ec6db7e65/bin/node/runtime/src/lib.rs#L1353-L1362)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14667" PostHistoryTypeId="5" PostId="3903" RevisionGUID="7674e965-0b82-4f46-a32b-c781eb686f61" CreationDate="2022-07-24T15:41:18.857" UserId="251" Comment="added 79 characters in body" Text="Here's a [tutorial](https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/) about how to add a pallet to runtime.&#xD;&#xA;&#xD;&#xA;And for the error, here's an [example](https://github.com/paritytech/substrate/blob/ca570cffee47d9fa4806715b0e8b284ec6db7e65/bin/node/runtime/src/lib.rs#L1353-L1362). This is a very basic Rust question. I think you should go for some Rust knowledge first." ContentLicense="CC BY-SA 4.0" />
  <row Id="14668" PostHistoryTypeId="5" PostId="3901" RevisionGUID="f6f730bd-ed25-455e-bfc8-51ee50db8289" CreationDate="2022-07-24T16:13:41.917" UserId="251" Comment="Format Markdown" Text="```&#xD;&#xA;# Clone the repo&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;cd substrate-node-template&#xD;&#xA;cargo build --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Add scheduler-pallet Add this line in runtime cargo.toml&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-vesting = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;&#xD;&#xA;'pallet-vesting/std',&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check that the new dependencies resolve correctly by running the following command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo check -p node-template-runtime&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;then it gives below error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `Event`, `Currency`, `BlockNumberToBalance`, `MinVestedTransfer`, `WeightInfo`, `MAX_VESTING_SCHEDULES`&#xD;&#xA;     --&gt; /home/amit/Substrate/New Pallet/substrate-node-template/runtime/src/lib.rs:203:1&#xD;&#xA;      |&#xD;&#xA;  203 | impl pallet_vesting::Config for Runtime {}&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Event`, `Currency`, `BlockNumberToBalance`, `MinVestedTransfer`, `WeightInfo`, `MAX_VESTING_SCHEDULES` in implementation&#xD;&#xA;      |&#xD;&#xA;      = help: implement the missing item: `type Event = Type;`&#xD;&#xA;      = help: implement the missing item: `type Currency = Type;`&#xD;&#xA;      = help: implement the missing item: `type BlockNumberToBalance = Type;`&#xD;&#xA;      = help: implement the missing item: `type MinVestedTransfer = Type;`&#xD;&#xA;      = help: implement the missing item: `type WeightInfo = Type;`&#xD;&#xA;      = help: implement the missing item: `const MAX_VESTING_SCHEDULES: u32 = 42;`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0046`.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14669" PostHistoryTypeId="24" PostId="3901" RevisionGUID="f6f730bd-ed25-455e-bfc8-51ee50db8289" CreationDate="2022-07-24T16:13:41.917" Comment="Proposed by 251 approved by 2319 edit id of 250" ContentLicense="CC BY-SA 4.0" />
  <row Id="14672" PostHistoryTypeId="2" PostId="3905" RevisionGUID="34394483-5e77-4daa-a339-4d850b0b351f" CreationDate="2022-07-24T17:06:53.470" UserId="427" Text="Usually this happens when you have some dependency version conflicts in your runtime Cargo.toml and pallet's Cargo.toml.&#xD;&#xA;&#xD;&#xA;Compare all of the Cargo.toml in your project and compare all the versions of each dependencies in every place. it should be similar.&#xD;&#xA;&#xD;&#xA;for example, &#xD;&#xA;&#xD;&#xA;in runtime if you're using this &#xD;&#xA;frame-election-provider-support = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;**polkadot-v0.9.24**&quot;  }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and in your pallet if you are using different branch like this &#xD;&#xA;frame-election-provider-support = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;**polkadot-v0.9.18**&quot;  }&#xD;&#xA;&#xD;&#xA;you will get this error.  hope this helps&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14674" PostHistoryTypeId="2" PostId="3906" RevisionGUID="e3040088-737c-4fb7-b68c-d3a91b5cc158" CreationDate="2022-07-24T23:34:56.220" UserId="116" Text="Is there a way, apart from manual code review, to guarantee `assert!()` and `panic!()` calls intended for test code not accidentally gets built for the chain runtime.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14676" PostHistoryTypeId="1" PostId="3906" RevisionGUID="e3040088-737c-4fb7-b68c-d3a91b5cc158" CreationDate="2022-07-24T23:34:56.220" UserId="116" Text="panic!() and assert!() in runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="14677" PostHistoryTypeId="3" PostId="3906" RevisionGUID="e3040088-737c-4fb7-b68c-d3a91b5cc158" CreationDate="2022-07-24T23:34:56.220" UserId="116" Text="|runtime|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14678" PostHistoryTypeId="2" PostId="3907" RevisionGUID="bdedbbcf-e3f3-4728-b63e-27c47d11302a" CreationDate="2022-07-24T23:53:10.663" UserId="711" Text="I think you are looking for `debug_assert!()`. It is built into debug builds but not release builds&#xD;&#xA;&#xD;&#xA;May not directly answer your question, but could be useful" ContentLicense="CC BY-SA 4.0" />
  <row Id="14680" PostHistoryTypeId="52" PostId="3901" RevisionGUID="3e20b9ab-53c1-4ee6-ac65-c838bc6a7e80" CreationDate="2022-07-25T00:36:52.633" />
  <row Id="14681" PostHistoryTypeId="2" PostId="3908" RevisionGUID="0e380bc4-27ff-48e2-9533-49140e4a6d30" CreationDate="2022-07-25T04:39:40.170" UserId="1789" Text="When I tried to deploy an Ethereum smart contract to my parachain's Frontier EVM, I got this error:&#xD;&#xA;```&#xD;&#xA;running deployment script...&#xD;&#xA;owner: 0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b&#xD;&#xA;user1: 0x735113e044BFce4DebA5da7BfBc96A3e6A96F6Da&#xD;&#xA;owner balance: 340282366920938463463.319096430768211455&#xD;&#xA;user1 balance: 0.0&#xD;&#xA;about to deploy contract...&#xD;&#xA;Error: Returned error: submit transaction to pool failed: Pool(TemporarilyBanned)&#xD;&#xA;    at Object.ErrorResponse (...ethereumProject/node_modules/web3-core-helpers/lib/errors.js:28:19)&#xD;&#xA;    at ...ethereumProject/node_modules/web3-core-requestmanager/lib/index.js:300:36&#xD;&#xA;    at XMLHttpRequest.request.onreadystatechange (...ethereumProject/node_modules/web3-providers-http/lib/index.js:98:13)&#xD;&#xA;    at XMLHttpRequestEventTarget.dispatchEvent (...ethereumProject/node_modules/xhr2-cookies/xml-http-request-event-target.ts:44:13)&#xD;&#xA;    at XMLHttpRequest._setReadyState (...ethereumProject/node_modules/xhr2-cookies/xml-http-request.ts:219:8)&#xD;&#xA;    at XMLHttpRequest._onHttpResponseEnd (...ethereumProject/node_modules/xhr2-cookies/xml-http-request.ts:345:8)&#xD;&#xA;    at IncomingMessage.&lt;anonymous&gt; (...ethereumProject/node_modules/xhr2-cookies/xml-http-request.ts:311:39)&#xD;&#xA;    at IncomingMessage.emit (node:events:539:35)&#xD;&#xA;    at IncomingMessage.emit (node:domain:475:12)&#xD;&#xA;    at endReadableNT (node:internal/streams/readable:1345:12)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:83:21) {&#xD;&#xA;  data: null&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I found this old Stackoverflow post in the general forum: https://stackoverflow.com/questions/57270007/in-substrate-what-does-code-1012-transaction-is-temporarily-banned-mean&#xD;&#xA;- how can I use -ltxpool=log ? in the command that launches my parachain?&#xD;&#xA;&#xD;&#xA;I have found those Substrate code:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/6e740bc89d097a38d922d5619b55e0c7e8664a6c/client/transaction-pool/src/graph/rotator.rs#L94&#xD;&#xA;```&#xD;&#xA;pub struct PoolRotator&lt;Hash&gt;&#xD;&#xA;...&#xD;&#xA;pub fn clear_timeouts(&amp;self, now: &amp;Instant)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/2b43a43dd0dca9a4bb2e3b3253af0e44f71a56ba/core/transaction-pool/graph/src/pool.rs#L128&#xD;&#xA;```&#xD;&#xA;pub struct Pool&lt;B: ChainApi&gt;&#xD;&#xA;...&#xD;&#xA;self.rotator.clear_timeouts(&amp;now);&#xD;&#xA;```&#xD;&#xA;I think I should call this function: `pub fn clear_timeouts(&amp;self, now: &amp;Instant)`, but don't know how to do that... &#xD;&#xA;- should I call that from my parachain as an extrinsic function?&#xD;&#xA;- should I call that from Polkadot.js ?&#xD;&#xA;- if so, how can I make such a function call?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14683" PostHistoryTypeId="1" PostId="3908" RevisionGUID="0e380bc4-27ff-48e2-9533-49140e4a6d30" CreationDate="2022-07-25T04:39:40.170" UserId="1789" Text="submit transaction to pool failed: Pool(TemporarilyBanned)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14684" PostHistoryTypeId="3" PostId="3908" RevisionGUID="0e380bc4-27ff-48e2-9533-49140e4a6d30" CreationDate="2022-07-25T04:39:40.170" UserId="1789" Text="|parachain|frontier|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14685" PostHistoryTypeId="5" PostId="3856" RevisionGUID="2ba2c84f-1376-4dfd-84eb-af202a43dcfb" CreationDate="2022-07-25T04:45:48.640" UserId="1789" Comment="deleted 105 characters in body" Text="Hi I am trying to use Hardhat to deploy Ethereum smart contracts to my parachain with Frontier EVM inside. The Hardhat uses my own Typescript file to deploy contracts like this one: https://hardhat.org/hardhat-runner/docs/guides/deploying&#xD;&#xA;&#xD;&#xA;Then I got this error: `ProviderError: submit transaction to pool failed: Pool(InvalidTransaction(InvalidTransaction::Payment))`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;-----------== incrementer2 deployment script&#xD;&#xA;owner: 0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b &#xD;&#xA;user1: 0x735113e044BFce4DebA5da7BfBc96A3e6A96F6Da&#xD;&#xA;owner balance: 340282366920938463463.319096430768211455&#xD;&#xA;user1 balance: 0.0&#xD;&#xA;ProviderError: submit transaction to pool failed: Pool(InvalidTransaction(InvalidTransaction::Payment))&#xD;&#xA;    at HttpProvider.request (...my_project/node_modules/hardhat/src/internal/core/providers/http.ts:78:19)&#xD;&#xA;    at HDWalletProvider.request (...my_project/node_modules/hardhat/src/internal/core/providers/accounts.ts:182:36)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;    at async EthersProviderWrapper.send (...my_project/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am not sure what happened... My Hardhat can run Ethereum smart contract tests and deploy contracts to a local Ethereum network with no problem. The contract can be deployed to my parachain via Remix and MetaMask, too. but somehow Hardhat cannot directly deploy smart contracts..." ContentLicense="CC BY-SA 4.0" />
  <row Id="14686" PostHistoryTypeId="5" PostId="3714" RevisionGUID="daf27d98-fb73-4679-a4f9-fcffb64dabd0" CreationDate="2022-07-25T05:30:24.910" UserId="88" Comment="deleted 433 characters in body" Text="&#xD;&#xA;In my runtime, one pallet reserves some currency using the `orml-currencies` pallet on genesis, and for this, it depends on accounts having some initial balance. This should be provided by the genesis config of the `orml-tokens` module&#xD;&#xA;&#xD;&#xA;For reference, this is my genesis config for the `orml-tokens` module&#xD;&#xA;```rs&#xD;&#xA;//&lt;snip&gt;&#xD;&#xA;		tokens: parachain_template_runtime::TokensConfig {&#xD;&#xA;			balances: endowed_accounts&#xD;&#xA;			.iter()&#xD;&#xA;			.flat_map(|x| {&#xD;&#xA;				vec![&#xD;&#xA;					(x.clone(), CurrencyId::DOT, ENDOWMENT),&#xD;&#xA;					(x.clone(), CurrencyId::BTC, ENDOWMENT),&#xD;&#xA;				]&#xD;&#xA;			})&#xD;&#xA;			.collect(),&#xD;&#xA;			&#xD;&#xA;		},&#xD;&#xA;//&lt;snip&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And my runtime config for `orml-currencies`&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;//&lt;snip&gt;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const GetNativeCurrencyId: CurrencyId = CurrencyId::Native;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl orml_currencies::Config for Runtime {&#xD;&#xA;	type MultiCurrency = Tokens;&#xD;&#xA;	type NativeCurrency = BasicCurrencyAdapter&lt;Runtime, Balances, Amount, BlockNumber&gt;;&#xD;&#xA;	type GetNativeCurrencyId = GetNativeCurrencyId;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;//&lt;snip&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I set the currencyId of the genesis run of the extrinsic to Native, the reserve works. &#xD;&#xA;&#xD;&#xA;Strangely, when I use a different currencyId, the reserve doesn't work. The extrinsic throws an &quot;InsufficientBalance&quot; Error. &#xD;&#xA;&#xD;&#xA;To take things further, when I try the exact same extrinsic after genesis with a new account that's funded with some currency (e.g DOT) by one of the accounts intialised on genesis, the extrinsic works&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14687" PostHistoryTypeId="2" PostId="3909" RevisionGUID="775e8aaa-ad6d-477e-a6d7-a8e006681ad3" CreationDate="2022-07-25T06:37:56.600" UserId="2903" Text="I am trying to inherit a trait in ink! as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink::trait_definition]&#xD;&#xA;trait Erc20 {&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink::trait_definition]&#xD;&#xA;trait CustomErc20: Erc20 {&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I get this error:&#xD;&#xA;&#xD;&#xA;    ink! trait definitions with supertraits are not supported, yet&#xD;&#xA;&#xD;&#xA;Is it possible to inherit contracts/traits in ink!, like in solidity?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14689" PostHistoryTypeId="1" PostId="3909" RevisionGUID="775e8aaa-ad6d-477e-a6d7-a8e006681ad3" CreationDate="2022-07-25T06:37:56.600" UserId="2903" Text="How to inherit Ink! traits/contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="14690" PostHistoryTypeId="3" PostId="3909" RevisionGUID="775e8aaa-ad6d-477e-a6d7-a8e006681ad3" CreationDate="2022-07-25T06:37:56.600" UserId="2903" Text="|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14691" PostHistoryTypeId="2" PostId="3910" RevisionGUID="08a41551-084a-476f-925f-e0fc696b221c" CreationDate="2022-07-25T06:55:11.307" UserId="227" Text="I'm reposting the comment by user mastro, so that this question no longer shows up as one without answer.&#xD;&#xA;&#xD;&#xA;&gt;This is fixed by following the answer [here](https://substrate.stackexchange.com/questions/2613/ink-cannot-derive-spreadlayout-and-spreadallocate-for-simple-struct-and-enum)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14693" PostHistoryTypeId="5" PostId="3901" RevisionGUID="be92e15e-6bd6-4f4d-a0a0-549c381814d6" CreationDate="2022-07-25T07:01:27.517" UserId="251" Comment="Add more detail" Text="```&#xD;&#xA;# Clone the repo&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;cd substrate-node-template&#xD;&#xA;cargo build --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Add scheduler-pallet Add this line in runtime cargo.toml&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-vesting = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;&#xD;&#xA;'pallet-vesting/std',&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check that the new dependencies resolve correctly by running the following command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo check -p node-template-runtime&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;then it gives below error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `Event`, `Currency`, `BlockNumberToBalance`, `MinVestedTransfer`, `WeightInfo`, `MAX_VESTING_SCHEDULES`&#xD;&#xA;     --&gt; /home/amit/Substrate/New Pallet/substrate-node-template/runtime/src/lib.rs:203:1&#xD;&#xA;      |&#xD;&#xA;  203 | impl pallet_vesting::Config for Runtime {}&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Event`, `Currency`, `BlockNumberToBalance`, `MinVestedTransfer`, `WeightInfo`, `MAX_VESTING_SCHEDULES` in implementation&#xD;&#xA;      |&#xD;&#xA;      = help: implement the missing item: `type Event = Type;`&#xD;&#xA;      = help: implement the missing item: `type Currency = Type;`&#xD;&#xA;      = help: implement the missing item: `type BlockNumberToBalance = Type;`&#xD;&#xA;      = help: implement the missing item: `type MinVestedTransfer = Type;`&#xD;&#xA;      = help: implement the missing item: `type WeightInfo = Type;`&#xD;&#xA;      = help: implement the missing item: `const MAX_VESTING_SCHEDULES: u32 = 42;`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0046`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// runtime/lib.rs&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const MinVestedTransfer: Balance = 100 * DOLLARS;&#xD;&#xA;}&#xD;&#xA;impl pallet_vesting::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type BlockNumberToBalance = ConvertInto;&#xD;&#xA;	type MinVestedTransfer = MinVestedTransfer;&#xD;&#xA;	type WeightInfo = pallet_vesting::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;	// `VestingInfo` encode length is 36bytes. 28 schedules gets encoded as 1009 bytes, which is the&#xD;&#xA;	// highest number of schedules that encodes less than 2^10.&#xD;&#xA;	const MAX_VESTING_SCHEDULES: u32 = 28;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After add this is code in runtime/lib.rs&#xD;&#xA;&#xD;&#xA;give below error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub const MinVestedTransfer: Balance = 100 * DOLLARS;&#xD;&#xA;      |                                                  ^^^^^^^ not found in this scope&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14694" PostHistoryTypeId="24" PostId="3901" RevisionGUID="be92e15e-6bd6-4f4d-a0a0-549c381814d6" CreationDate="2022-07-25T07:01:27.517" Comment="Proposed by 251 approved by 2319 edit id of 251" ContentLicense="CC BY-SA 4.0" />
  <row Id="14695" PostHistoryTypeId="5" PostId="3901" RevisionGUID="5f3a052e-c7a7-4427-8553-612d2d6559ad" CreationDate="2022-07-25T07:02:23.947" UserId="2319" Comment="deleted 55 characters in body" Text="```&#xD;&#xA;# Clone the repo&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;cd substrate-node-template&#xD;&#xA;cargo build --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Add scheduler-pallet Add this line in runtime cargo.toml&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-vesting = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.23&quot; }&#xD;&#xA;&#xD;&#xA;'pallet-vesting/std',&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check that the new dependencies resolve correctly by running the following command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo check -p node-template-runtime&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;then it gives below error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `Event`, `Currency`, `BlockNumberToBalance`, `MinVestedTransfer`, `WeightInfo`, `MAX_VESTING_SCHEDULES`&#xD;&#xA;     --&gt; /home/amit/Substrate/New Pallet/substrate-node-template/runtime/src/lib.rs:203:1&#xD;&#xA;      |&#xD;&#xA;  203 | impl pallet_vesting::Config for Runtime {}&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Event`, `Currency`, `BlockNumberToBalance`, `MinVestedTransfer`, `WeightInfo`, `MAX_VESTING_SCHEDULES` in implementation&#xD;&#xA;      |&#xD;&#xA;      = help: implement the missing item: `type Event = Type;`&#xD;&#xA;      = help: implement the missing item: `type Currency = Type;`&#xD;&#xA;      = help: implement the missing item: `type BlockNumberToBalance = Type;`&#xD;&#xA;      = help: implement the missing item: `type MinVestedTransfer = Type;`&#xD;&#xA;      = help: implement the missing item: `type WeightInfo = Type;`&#xD;&#xA;      = help: implement the missing item: `const MAX_VESTING_SCHEDULES: u32 = 42;`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0046`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// runtime/lib.rs&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const MinVestedTransfer: Balance = 100 * DOLLARS;&#xD;&#xA;}&#xD;&#xA;impl pallet_vesting::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type BlockNumberToBalance = ConvertInto;&#xD;&#xA;	type MinVestedTransfer = MinVestedTransfer;&#xD;&#xA;	type WeightInfo = pallet_vesting::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;	// `VestingInfo` encode length is 36bytes. 28 schedules gets encoded as 1009 bytes, which is the&#xD;&#xA;	// highest number of schedules that encodes less than 2^10.&#xD;&#xA;	const MAX_VESTING_SCHEDULES: u32 = 28;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After add this is code in runtime/lib.rs&#xD;&#xA;&#xD;&#xA;give below error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14697" PostHistoryTypeId="2" PostId="3911" RevisionGUID="36803d64-7dd0-4418-8a2c-ec2523d5d29c" CreationDate="2022-07-25T07:17:06.937" UserId="227" Text="Did you end up figuring it out?&#xD;&#xA;&#xD;&#xA;An approach to debugging this could be with a local instance of the [`substrate-contracts-node`](https://github.com/paritytech/substrate-contracts-node#download-binary). &#xD;&#xA;&#xD;&#xA;This node comes with the typical Alice, Bob, etc. accounts that are endowed with a huge amount of tokens. In the [Contracts UI](https://contracts-ui.substrate.io/) or polkadot-js you can then submit the transaction from e.g. Alice and the UI displays the amount of gas used.&#xD;&#xA;&#xD;&#xA;So this should give you an idea if the gas costs are in general in a reasonable domain. If this already fails it's likely that you're logic is unbound in some way.&#xD;&#xA;&#xD;&#xA;In order to debug this you could then create a Rust unit test ([like here](https://github.com/paritytech/ink/blob/master/examples/flipper/lib.rs#L38-L47)) and see if that finishes." ContentLicense="CC BY-SA 4.0" />
  <row Id="14699" PostHistoryTypeId="2" PostId="3912" RevisionGUID="36357285-85df-4cf9-9ea9-f5c316f4402e" CreationDate="2022-07-25T07:19:29.040" UserId="227" Text="I'm reposting the answer from Jaco above, so that this question no longer shows up as one without answers.&#xD;&#xA;&#xD;&#xA;&gt;curl `rpc_methods` will show you all calls exposed by the node. `contractInfoOf` is a state call, e.g. the correct storage key to `stage_getStorage`" ContentLicense="CC BY-SA 4.0" />
  <row Id="14701" PostHistoryTypeId="52" PostId="3906" RevisionGUID="321f08e9-92c0-4693-b493-f4b6ea88755e" CreationDate="2022-07-25T07:37:08.907" />
  <row Id="14702" PostHistoryTypeId="2" PostId="3913" RevisionGUID="724dcc97-3254-48ec-88e0-1e3664ce3aa0" CreationDate="2022-07-25T08:56:01.640" UserId="2916" Text="I'm at the very last stage of [this tutorial to make a custom pallet](https://docs.substrate.io/tutorials/work-with-pallets/use-macros-in-a-custom-pallet/#build-a-custom-front-end-component) and have tried running Substrate frontend template in my browser. Keep in mind that everything before this compiled successfully. What I expect to see is a &quot;Proof of Existence&quot; section like this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;However, mine does not have the &quot;Proof of Existence&quot; section:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Any idea what could be going wrong and how to fix it?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VVrVm.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/FHvOJ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14704" PostHistoryTypeId="1" PostId="3913" RevisionGUID="724dcc97-3254-48ec-88e0-1e3664ce3aa0" CreationDate="2022-07-25T08:56:01.640" UserId="2916" Text="No &quot;Proof of Existence&quot; section in the Substrate frontend template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14705" PostHistoryTypeId="3" PostId="3913" RevisionGUID="724dcc97-3254-48ec-88e0-1e3664ce3aa0" CreationDate="2022-07-25T08:56:01.640" UserId="2916" Text="|pallet|substrate-node-template|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14706" PostHistoryTypeId="5" PostId="3913" RevisionGUID="c3f97361-1b29-4e00-83cc-3296b5818036" CreationDate="2022-07-25T09:17:04.297" UserId="2916" Comment="added 341 characters in body; edited title" Text="I'm at the very last stage of [this tutorial to make a custom pallet](https://docs.substrate.io/tutorials/work-with-pallets/use-macros-in-a-custom-pallet/#build-a-custom-front-end-component) and have tried running Substrate frontend template in my browser. I'm using [this code](https://raw.githubusercontent.com/teamchong/substrate-proof-of-existence-frontend/main/src/TemplateModule.js) for TemplateModule.js, but when I try to create a new claim I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Uncaught TypeError: Cannot read properties of undefined (reading 'toString')&#xD;&#xA;```&#xD;&#xA;On the line where it says:&#xD;&#xA;```&#xD;&#xA;api.query.templateModule&#xD;&#xA;      .proofs(digest, result =&gt; {&#xD;&#xA;        // Our storage item returns a tuple, which is represented as an array.&#xD;&#xA;        setOwner(result[0].toString()) // &lt;--- THIS LINE GIVES ME AN ERROR&#xD;&#xA;        setBlock(result[1].toNumber())&#xD;&#xA;      })&#xD;&#xA;      .then(unsub =&gt; {&#xD;&#xA;        unsubscribe = unsub&#xD;&#xA;      })&#xD;&#xA;```&#xD;&#xA;And the result is that I'm not able to create a proof of existence claim. Any idea how to fix this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14707" PostHistoryTypeId="4" PostId="3913" RevisionGUID="c3f97361-1b29-4e00-83cc-3296b5818036" CreationDate="2022-07-25T09:17:04.297" UserId="2916" Comment="added 341 characters in body; edited title" Text="Create claim not working in &quot;Proof of Existence&quot; tutorial&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14708" PostHistoryTypeId="4" PostId="3913" RevisionGUID="7d3c939e-c76b-470f-ba37-59d131a14ac6" CreationDate="2022-07-25T09:28:39.693" UserId="2916" Comment="edited title" Text="Create claim not working in &quot;Proof of Existence&quot; tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="14709" PostHistoryTypeId="2" PostId="3914" RevisionGUID="5501ef03-ff17-42f3-b543-971b2aec6a59" CreationDate="2022-07-25T09:44:44.117" UserId="94" Text="## Technical perspective&#xD;&#xA;&#xD;&#xA;Theoretically you are right; code reviews should already catch *all* errors in a piece of software.  &#xD;&#xA;This is a very far stretch as we know from experience.  &#xD;&#xA;The good part about code auditing is that it can be perfectly out-sourced and can thereby free resources that are needed to fix critical issues.  &#xD;&#xA;Auditors have the time to analyze complex software with different fuzzy tools and game theoretical analysis.  &#xD;&#xA;In that process they often find edge-cases and combinations of inputs that are difficult to imagine but can happen and would cause an error.  &#xD;&#xA;&#xD;&#xA;Imagine the developers had to do all the analysis that the auditing firm is doing; they would not have the time to do anything else.  &#xD;&#xA;For a project that multi-billions of USD dollars depend on, this additional level of security is needed.&#xD;&#xA;&#xD;&#xA;## Developer perspective&#xD;&#xA;&#xD;&#xA;As a software developer its nice to have another company professionally invest their time to ensure the proper function of the written software.  &#xD;&#xA;This increases the experience of the developer and his self confidence.  &#xD;&#xA;It also calms the mind to know that there were no gross errors that slipped through.  &#xD;&#xA;&#xD;&#xA;## Game-theoretic perspective&#xD;&#xA;&#xD;&#xA;Code auditing is a tool to increase the level of *reasonable* trust that you can have in a piece of software.  &#xD;&#xA;This is done by having an external auditing firm analyse the software and stake their reputation by approving the piece of code.  &#xD;&#xA;If the software turns out to be grossly incorrect, the auditing firm loses its reputation.  &#xD;&#xA;A code audit is more valuable the more reputable the auditing firm is.&#xD;&#xA;&#xD;&#xA;## Auditing process&#xD;&#xA;&#xD;&#xA;I can only give you a high-level overview as the exact details are security relevant.  &#xD;&#xA;After the code and (often also the reviews) are done; we ask the auditors to have a look at the code.  &#xD;&#xA;They come back after some time and tell us about the findings. We then fix these issues and proceed with the development process.  &#xD;&#xA;One auditor for example was *Quarkslab*, as stated publicly [here](https://polkadot.network/blog/full-audit-of-xcmv2-completed-by-quarkslab/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14711" PostHistoryTypeId="2" PostId="3915" RevisionGUID="d643d2c1-e0e9-463e-a740-69c3745a530d" CreationDate="2022-07-25T10:01:36.480" UserId="2903" Text="I'm trying to call an erc20 contract from another custom erc20 contract.&#xD;&#xA;&#xD;&#xA;Both, the original contract and calling contract have the following macros:&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;&#xD;&#xA;In the calling contract's struct, we have `asset: Erc20Ref,`, and facing this error:&#xD;&#xA;&#xD;&#xA;    the trait bound `Erc20Ref: SpreadAllocate` is not satisfied&#xD;&#xA;    the trait `SpreadAllocate` is not implemented for `Erc20Ref`&#xD;&#xA;&#xD;&#xA;The Erc20Ref is generated by ink, and I guess it doesn't implement SpreadAllocate. Is there a way to resolve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14713" PostHistoryTypeId="1" PostId="3915" RevisionGUID="d643d2c1-e0e9-463e-a740-69c3745a530d" CreationDate="2022-07-25T10:01:36.480" UserId="2903" Text="Use SpreadAllocate in cross-contract calling" ContentLicense="CC BY-SA 4.0" />
  <row Id="14714" PostHistoryTypeId="3" PostId="3915" RevisionGUID="d643d2c1-e0e9-463e-a740-69c3745a530d" CreationDate="2022-07-25T10:01:36.480" UserId="2903" Text="|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14719" PostHistoryTypeId="2" PostId="3917" RevisionGUID="fd5871f2-8ea9-47bd-bb02-bdbbaf029538" CreationDate="2022-07-25T11:44:40.493" UserId="2905" Text="``` &#xD;&#xA;{&#xD;&#xA;  specVersion: &quot;&quot;,&#xD;&#xA;  transactionVersion: &quot;&quot;,&#xD;&#xA;  address: &quot;&quot;,&#xD;&#xA;  blockHash: &quot;&quot;,&#xD;&#xA;  blockNumber: &quot;&quot;,&#xD;&#xA;  era: &quot;&quot;,&#xD;&#xA;  genesisHash: &quot;&quot;,&#xD;&#xA;  method: &quot;&quot;,&#xD;&#xA;  nonce: &quot;&quot;,&#xD;&#xA;  signedExtensions: [&#xD;&#xA;    &quot;CheckNonZeroSender&quot;,&#xD;&#xA;    &quot;CheckSpecVersion&quot;,&#xD;&#xA;    &quot;CheckTxVersion&quot;,&#xD;&#xA;    &quot;CheckGenesis&quot;,&#xD;&#xA;    &quot;CheckMortality&quot;,&#xD;&#xA;    &quot;CheckNonce&quot;,&#xD;&#xA;    &quot;CheckWeight&quot;,&#xD;&#xA;    &quot;ChargeTransactionPayment&quot;,&#xD;&#xA;    &quot;PrevalidateAttests&quot;,&#xD;&#xA;  ],&#xD;&#xA;  tip: &quot;&quot;,&#xD;&#xA;  version: 4,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14721" PostHistoryTypeId="1" PostId="3917" RevisionGUID="fd5871f2-8ea9-47bd-bb02-bdbbaf029538" CreationDate="2022-07-25T11:44:40.493" UserId="2905" Text="How do i know that from which parachain/app, a particular transaction belongs/coming from? (based on below informatino)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14722" PostHistoryTypeId="3" PostId="3917" RevisionGUID="fd5871f2-8ea9-47bd-bb02-bdbbaf029538" CreationDate="2022-07-25T11:44:40.493" UserId="2905" Text="|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14723" PostHistoryTypeId="2" PostId="3918" RevisionGUID="ace1c0cf-2189-48c2-976b-154ff2c74edc" CreationDate="2022-07-25T11:48:06.140" UserId="1808" Text="I created a Polkadot private chain with 5 validator candidates and 4 validator active. If I set 1 epoch = 1 era and shutdown one active validator, there is no problem, the standby validator takes over and the chain continues. However, if I set 6 epoch = 1 era and shutdown 1 active validator, the election will fail and will need to go execute governance fallback to bring it again to normal. Why is this happening?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14725" PostHistoryTypeId="1" PostId="3918" RevisionGUID="ace1c0cf-2189-48c2-976b-154ff2c74edc" CreationDate="2022-07-25T11:48:06.140" UserId="1808" Text="Polkadot Election Failure" ContentLicense="CC BY-SA 4.0" />
  <row Id="14726" PostHistoryTypeId="3" PostId="3918" RevisionGUID="ace1c0cf-2189-48c2-976b-154ff2c74edc" CreationDate="2022-07-25T11:48:06.140" UserId="1808" Text="|polkadot|election|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14727" PostHistoryTypeId="2" PostId="3919" RevisionGUID="a6b8e9d8-c04c-44b9-aa01-f40151d2c125" CreationDate="2022-07-25T11:52:57.047" UserId="73" Text="There is no simple way to tell you which block updated the runtime. To not require executing/looking into the state for each block, we introduced the `CodeUpdated` digest. This is part of the header and can be looked up. However, we don't store anywhere all the headers when this digest was present. For this you can use indexers like subscan." ContentLicense="CC BY-SA 4.0" />
  <row Id="14729" PostHistoryTypeId="5" PostId="3917" RevisionGUID="d431fea4-7eb4-465b-a7b6-218f649c161c" CreationDate="2022-07-25T11:57:43.147" UserId="2905" Comment="added 135 characters in body" Text="Looking at transaction information i want to know from which parachain it's coming ex : app.parallel.finance, astar, kapex etc etc.&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;{&#xD;&#xA;  specVersion: &quot;&quot;,&#xD;&#xA;  transactionVersion: &quot;&quot;,&#xD;&#xA;  address: &quot;&quot;,&#xD;&#xA;  blockHash: &quot;&quot;,&#xD;&#xA;  blockNumber: &quot;&quot;,&#xD;&#xA;  era: &quot;&quot;,&#xD;&#xA;  genesisHash: &quot;&quot;,&#xD;&#xA;  method: &quot;&quot;,&#xD;&#xA;  nonce: &quot;&quot;,&#xD;&#xA;  signedExtensions: [&#xD;&#xA;    &quot;CheckNonZeroSender&quot;,&#xD;&#xA;    &quot;CheckSpecVersion&quot;,&#xD;&#xA;    &quot;CheckTxVersion&quot;,&#xD;&#xA;    &quot;CheckGenesis&quot;,&#xD;&#xA;    &quot;CheckMortality&quot;,&#xD;&#xA;    &quot;CheckNonce&quot;,&#xD;&#xA;    &quot;CheckWeight&quot;,&#xD;&#xA;    &quot;ChargeTransactionPayment&quot;,&#xD;&#xA;    &quot;PrevalidateAttests&quot;,&#xD;&#xA;  ],&#xD;&#xA;  tip: &quot;&quot;,&#xD;&#xA;  version: 4,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14730" PostHistoryTypeId="2" PostId="3920" RevisionGUID="13a31fe8-147d-4f7c-85c6-bc357c5f1d4a" CreationDate="2022-07-25T12:02:16.153" UserId="94" Text="When I look at my staking rewards, i can observe that the rewards fluctuate strongly.  &#xD;&#xA;Sometimes its `x` DOT per day, then the next day its just `x / 2` DOT.  &#xD;&#xA;Why is it fluctuating by more than 100% ? It feels like I'm doing something wrong.  &#xD;&#xA;Am I nominating the wrong validators?  &#xD;&#xA;Does the [staking dashboard](https://staking.polkadot.network/dashboard#/validators) help with getting more rewards?  " ContentLicense="CC BY-SA 4.0" />
  <row Id="14732" PostHistoryTypeId="1" PostId="3920" RevisionGUID="13a31fe8-147d-4f7c-85c6-bc357c5f1d4a" CreationDate="2022-07-25T12:02:16.153" UserId="94" Text="Why do Staking Rewards fluctuate so much?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14733" PostHistoryTypeId="3" PostId="3920" RevisionGUID="13a31fe8-147d-4f7c-85c6-bc357c5f1d4a" CreationDate="2022-07-25T12:02:16.153" UserId="94" Text="|polkadot|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14734" PostHistoryTypeId="2" PostId="3921" RevisionGUID="ba079da3-5d21-4d2e-9f23-70f25ee37fec" CreationDate="2022-07-25T12:21:15.613" UserId="73" Text="Besides the mentioned `debug_assert!` there is nothing provided by Rust out of the box. However, you could write your own `maybe-assert` crate or whatever you want to call it.&#xD;&#xA;&#xD;&#xA;You would by default export a macro `maybe_assert!` with the same semantics as `assert!`, aka you just forward all the arguments to `assert!`. The trick would be to introduce some feature `do-not-assert` or something similar to your `maybe_assert` crate. Then you would enable this `do-not-assert` feature for your runtime when you build a release that should be put on chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="14736" PostHistoryTypeId="2" PostId="3922" RevisionGUID="986d81c5-1c23-47c1-8951-0269d5f15311" CreationDate="2022-07-25T13:13:33.373" UserId="501" Text="I've got the error: &#xD;&#xA;&gt; cannot find trait `WeightInfo` in this scope&#xD;&#xA;&#xD;&#xA;I've added this in runtime :&#xD;&#xA;&#xD;&#xA;    impl my_pallet::Config for Runtime {&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type WeightInfo = my_pallet::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And this in my lib.rs pallet:&#xD;&#xA;&#xD;&#xA;    pub mod weights;&#xD;&#xA;    pub use weights::WeightInfo;&#xD;&#xA;&#xD;&#xA;with this also in config:&#xD;&#xA;    &#xD;&#xA;    type WeightInfo: WeightInfo;&#xD;&#xA;&#xD;&#xA;And of course I've generated a weights.rs file using the benchmark tool which looks correct comparing to the examples and other pallets.&#xD;&#xA;&#xD;&#xA;Why can't the compiler find the trait for WeightInfo ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14738" PostHistoryTypeId="1" PostId="3922" RevisionGUID="986d81c5-1c23-47c1-8951-0269d5f15311" CreationDate="2022-07-25T13:13:33.373" UserId="501" Text="cannot find trait WeightInfo in this scope" ContentLicense="CC BY-SA 4.0" />
  <row Id="14739" PostHistoryTypeId="3" PostId="3922" RevisionGUID="986d81c5-1c23-47c1-8951-0269d5f15311" CreationDate="2022-07-25T13:13:33.373" UserId="501" Text="|weight|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14740" PostHistoryTypeId="5" PostId="3922" RevisionGUID="5d86a05b-f54a-422f-8700-a1b78dfe2cd7" CreationDate="2022-07-25T13:21:40.453" UserId="501" Comment="added 608 characters in body" Text="I've got the error: &#xD;&#xA;&gt; cannot find trait `WeightInfo` in this scope&#xD;&#xA;&#xD;&#xA;I've added this in runtime :&#xD;&#xA;&#xD;&#xA;    impl my_pallet::Config for Runtime {&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type WeightInfo = my_pallet::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And this in my lib.rs pallet:&#xD;&#xA;&#xD;&#xA;    pub mod weights;&#xD;&#xA;    pub use weights::WeightInfo;&#xD;&#xA;&#xD;&#xA;with this also in config:&#xD;&#xA;    &#xD;&#xA;    type WeightInfo: WeightInfo;&#xD;&#xA;&#xD;&#xA;And of course I've generated a weights.rs file using the benchmark tool which looks correct comparing to the examples and other pallets.&#xD;&#xA;&#xD;&#xA;Why can't the compiler find the trait for WeightInfo ?&#xD;&#xA;&#xD;&#xA;Edit: I forgot to paste the exact output:&#xD;&#xA;&#xD;&#xA;    error[E0405]: cannot find trait `WeightInfo` in this scope&#xD;&#xA;      --&gt; pallets/my_pallet/src/lib.rs:33:20&#xD;&#xA;       |&#xD;&#xA;    33 |         type WeightInfo: WeightInfo;&#xD;&#xA;       |                          ^^^^^^^^^^&#xD;&#xA;       |&#xD;&#xA;    help: you might have meant to use the associated type&#xD;&#xA;       |&#xD;&#xA;    33 |         type WeightInfo: Self::WeightInfo;&#xD;&#xA;       |                          ~~~~~~~~~~~~~~~~&#xD;&#xA;    help: consider importing one of these items&#xD;&#xA;       |&#xD;&#xA;    23 |     use crate::WeightInfo;&#xD;&#xA;       |&#xD;&#xA;    23 |     use frame_system::WeightInfo;&#xD;&#xA;       |&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14741" PostHistoryTypeId="2" PostId="3923" RevisionGUID="3ae0e734-338e-46fd-8490-b16532acd08b" CreationDate="2022-07-25T13:43:49.813" UserId="94" Text="The problem is that a pallet does not import the surrounding imports.  &#xD;&#xA;The fix is to add a `use super::*;` to your pallet like this:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use super::*;  // Here&#xD;&#xA;	#[allow(unused_imports)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also I dont see the maintain template in [your executed command](https://github.com/lucgerrits/pallet-error-for-stackexchange/blob/d7bc0a0080a926364880630ce26d2235b96893a6/pallets/sim_renault/src/weights.rs#L20). Therefore the next error is about the `()` type not implementing your `WeightInfo` trait. The maintainer template does that [here](https://github.com/paritytech/substrate/blob/618f26bc9fe1a5ae8ee0a485e4e24da3e5979af6/.maintain/frame-weight-template.hbs#L89) for you.  &#xD;&#xA;Or you use `pallet_sim_renault::weights::SubstrateWeight&lt;Test&gt;` instead of `()`." ContentLicense="CC BY-SA 4.0" />
  <row Id="14744" PostHistoryTypeId="2" PostId="3924" RevisionGUID="a75dad73-939c-4fa4-9b28-cd8801e71e07" CreationDate="2022-07-25T14:01:07.763" UserId="100" Text="You can use `contract.query` either to read a contract value or to get cost estimations for a contract transaction. Any contract dispatchable can be called via `query` to get the gas and storage deposit estimations before submitting the transaction. &#xD;&#xA;&#xD;&#xA;Because there are no on-chain consequences for `query`, you can pass -1 as gas limit. This is not recommended for `contract.tx` where real costs can occur. In this case, you should use the `gasRequired` value returned by the query. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14746" PostHistoryTypeId="2" PostId="3925" RevisionGUID="58ca6043-104d-462e-bd14-a009e0208210" CreationDate="2022-07-25T16:18:41.400" UserId="599" Text="It is not inheritance, it is called [supertrait](https://doc.rust-lang.org/reference/items/traits.html#supertraits). It is a bound for that trait that if someone implements your `CustomErc20`, he also should implement the `Erc20` trait.&#xD;&#xA;&#xD;&#xA;ink! right now doesn't support it(your error says to you about it). Maybe it will be fixed during [this](https://github.com/paritytech/ink/issues/737) issue or [this](https://github.com/paritytech/ink/issues/631).&#xD;&#xA;&#xD;&#xA;You can use [`openbrush::trait_definition`](https://github.com/Supercolony-net/openbrush-contracts#default-implementation-in-ink-traits) macro that allows adding bounds. But you need to use it in combination with the `openbrush::contract` macro(instead of `ink::contract`).&#xD;&#xA;&#xD;&#xA;Right now, OpenBrush allows adding any bounds(defined with `openbrush::trait_definition`, `ink::trait_definition` and common rust traits). But in the next release, OpenBursh will allow adding only bounds defined via `openbrush::trait_definition`. It is because traits defined with the `trait_definition` macro are public and should not use bounds related to a specific language or implementation." ContentLicense="CC BY-SA 4.0" />
  <row Id="14748" PostHistoryTypeId="2" PostId="3926" RevisionGUID="3ebe5110-f770-4ef6-bf5d-3007acec836e" CreationDate="2022-07-25T16:19:07.427" UserId="167" Text="The staking rewards are coming from era points. The points can come from various sources, mainly including: &#xD;&#xA;&#xD;&#xA;1. Authoring rewards, which is more or less equal over time&#xD;&#xA;2. Doing PVF (parachain validation function) execution, which is very much not equal in the short time, but it does average out in the longer term. There could be slight variability based on the validator's networking hardware as well. &#xD;&#xA;&#xD;&#xA;If you average your rewards over a period of 1 or 2 months, it should be more or less equal and the variability averages out. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14750" PostHistoryTypeId="2" PostId="3927" RevisionGUID="69582378-f5aa-47c8-975c-89d08676a89c" CreationDate="2022-07-25T16:20:27.293" UserId="599" Text="It is a duplicate of this [issue](https://github.com/paritytech/ink/issues/1149). You can find a workaround there. Soon it will be fixed with [storage refactoring](https://github.com/paritytech/ink/issues/1134)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14752" PostHistoryTypeId="2" PostId="3928" RevisionGUID="6e070ba4-6f4d-4ace-ab7d-935558899e4a" CreationDate="2022-07-25T16:23:54.913" UserId="2384" Text="And yeah `debug_assert!` might also be worth keeping in mind. However, you can also do something like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;macro_rules! test_only_assert {&#xD;&#xA;    ($cond:expr $(,)?) =&gt; {{&#xD;&#xA;        #[cfg(test)]&#xD;&#xA;        assert!($cond)&#xD;&#xA;    }};&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Now you can do like:&#xD;&#xA;fn runtime_function() {&#xD;&#xA;    test_only_assert!(..)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And similar for panic too. It will make sure that test will be run even when running with release profile. Eg: `cargo test --all --release` and wont be included if binary is in debug but not in test." ContentLicense="CC BY-SA 4.0" />
  <row Id="14754" PostHistoryTypeId="2" PostId="3929" RevisionGUID="3fc0ec0d-9a72-417e-9905-7c2bdcdf8f76" CreationDate="2022-07-25T16:25:01.340" UserId="599" Text="Duplicate of [that question](https://substrate.stackexchange.com/questions/3915/use-spreadallocate-in-cross-contract-calling).&#xD;&#xA;&#xD;&#xA;The answer is no. The workaround is to implement it manually=)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14759" PostHistoryTypeId="2" PostId="3931" RevisionGUID="f732e4dd-fbc8-4c0f-bee8-022567ff0b98" CreationDate="2022-07-25T18:44:22.743" UserId="179" Text="Is there an API to get the complete Peer List with what type of node it is from somewhere in the Polkadot/Kusama networks?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14761" PostHistoryTypeId="1" PostId="3931" RevisionGUID="f732e4dd-fbc8-4c0f-bee8-022567ff0b98" CreationDate="2022-07-25T18:44:22.743" UserId="179" Text="Get Network Peers and Node type" ContentLicense="CC BY-SA 4.0" />
  <row Id="14762" PostHistoryTypeId="3" PostId="3931" RevisionGUID="f732e4dd-fbc8-4c0f-bee8-022567ff0b98" CreationDate="2022-07-25T18:44:22.743" UserId="179" Text="|substrate-node|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14763" PostHistoryTypeId="2" PostId="3932" RevisionGUID="59ebbef3-e784-437c-af60-7bd78c360c40" CreationDate="2022-07-25T19:19:40.510" UserId="362" Text="The Polkadot runtime has a large number of parameter values that determine how much a user has to lock up as a deposit when creating a state object. The motivation seems to be something like a state-rent, inducing owner to cleanup object at some point in the future to recover the funds. Here is one example&#xD;&#xA;&#xD;&#xA;    pub const PreimageBaseDeposit: Balance = deposit(2, 64);&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/d21399ad3b5a188df37665b72d2d1d48ca5c0e1d/runtime/polkadot/src/lib.rs#L280&#xD;&#xA;&#xD;&#xA;All of these places seem to use a utility routine `deposit`, which looks like this&#xD;&#xA;&#xD;&#xA;	pub const fn deposit(items: u32, bytes: u32) -&gt; Balance {&#xD;&#xA;		items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/d21399ad3b5a188df37665b72d2d1d48ca5c0e1d/runtime/polkadot/constants/src/lib.rs#L35&#xD;&#xA;&#xD;&#xA;where `DOLLARS` and `MILLICENTS` are constants for the number of currency units that are approximately worth the corresponding value in USD.&#xD;&#xA;&#xD;&#xA;It is however not clear what exactly the rationale is for the form of this deposit function, nor where the magic values 20 and 100 come from." ContentLicense="CC BY-SA 4.0" />
  <row Id="14765" PostHistoryTypeId="1" PostId="3932" RevisionGUID="59ebbef3-e784-437c-af60-7bd78c360c40" CreationDate="2022-07-25T19:19:40.510" UserId="362" Text="Computing deposits in Polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="14766" PostHistoryTypeId="3" PostId="3932" RevisionGUID="59ebbef3-e784-437c-af60-7bd78c360c40" CreationDate="2022-07-25T19:19:40.510" UserId="362" Text="|polkadot|existential-deposit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14767" PostHistoryTypeId="52" PostId="3920" RevisionGUID="2cf79465-b610-4426-b9f2-0f3a7b0edd0e" CreationDate="2022-07-25T20:02:42.547" />
  <row Id="14768" PostHistoryTypeId="2" PostId="3933" RevisionGUID="775d668f-cb14-49c7-9101-39d45cf401d1" CreationDate="2022-07-25T20:30:08.967" UserId="29" Text="Your command to run a collator is fine. In regards to this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[Relaychain] Failed to fetch runtime API data for job err=Execution { runtime_api_name: &quot;validator_groups&quot;, source: Application(Execution(Other(&quot;Exported method ParachainHost_validator_groups is not found&quot;))) } &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There is an open issue for this:&#xD;&#xA;&#xD;&#xA;- https://github.com/paritytech/cumulus/issues/1293#issuecomment-1137160459&#xD;&#xA;&#xD;&#xA;In regards to the `failed to associate send_message response to the sender` message, I have opened an issue here: https://github.com/paritytech/cumulus/issues/1467&#xD;&#xA;&#xD;&#xA;Regardless of these messages, you should still be able to sync with Polkadot and collate with your command." ContentLicense="CC BY-SA 4.0" />
  <row Id="14770" PostHistoryTypeId="5" PostId="3912" RevisionGUID="daa0d13a-2939-402e-87dc-274c853868b6" CreationDate="2022-07-25T21:06:43.587" UserId="29" Comment="edited body" Text="I'm reposting the answer from Jaco above, so that this question no longer shows up as one without answers.&#xD;&#xA;&#xD;&#xA;&gt;curl `rpc_methods` will show you all calls exposed by the node. `contractInfoOf` is a state call, e.g. the correct storage key to `state_getStorage`" ContentLicense="CC BY-SA 4.0" />
  <row Id="14771" PostHistoryTypeId="5" PostId="3871" RevisionGUID="869c1f5c-7c97-4f79-8175-72e5c80aa15d" CreationDate="2022-07-25T21:11:47.700" UserId="29" Comment="deleted 1 character in body" Text="Here is the pseudo code on how would you do it:&#xD;&#xA;```js&#xD;&#xA;@import polkadot_api;&#xD;&#xA;&#xD;&#xA;let reserver = 0xa_address_is_here;&#xD;&#xA;let registrar.reserve(reserver, 2000);&#xD;&#xA;```&#xD;&#xA;Here is what [`registrar.reserve`](https://github.com/paritytech/polkadot/blob/9804117d3e676aace31ed39569a4e6aec75956de/runtime/common/src/paras_registrar.rs#L344) do.&#xD;&#xA;&#xD;&#xA;Also refer to polkadot guide on [how to call transaction](https://polkadot.js.org/docs/api/start/api.tx) and [how to call rpc](https://polkadot.js.org/docs/api/start/rpc.custom).&#xD;&#xA;&#xD;&#xA;At this point, you sucessfully reserved a paraId. Now you can proceed to [register parachain](https://substrate.stackexchange.com/a/3848/2384)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14772" PostHistoryTypeId="5" PostId="3913" RevisionGUID="6ec78c5f-bfdf-4a52-8232-59ec58f6e904" CreationDate="2022-07-25T22:07:54.053" UserId="2916" Comment="added 132 characters in body" Text="I'm at the very last stage of [this tutorial to make a custom pallet](https://docs.substrate.io/tutorials/work-with-pallets/use-macros-in-a-custom-pallet/#build-a-custom-front-end-component) and have tried running Substrate frontend template in my browser. I'm using [this code](https://raw.githubusercontent.com/teamchong/substrate-proof-of-existence-frontend/main/src/TemplateModule.js) for TemplateModule.js, but when I try to create a new claim I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Uncaught TypeError: Cannot read properties of undefined (reading 'toString')&#xD;&#xA;```&#xD;&#xA;On the line where it says:&#xD;&#xA;```&#xD;&#xA;api.query.templateModule&#xD;&#xA;      .proofs(digest, result =&gt; {&#xD;&#xA;        // Our storage item returns a tuple, which is represented as an array.&#xD;&#xA;        setOwner(result[0].toString()) // &lt;--- THIS LINE GIVES ME AN ERROR&#xD;&#xA;        setBlock(result[1].toNumber())&#xD;&#xA;      })&#xD;&#xA;      .then(unsub =&gt; {&#xD;&#xA;        unsubscribe = unsub&#xD;&#xA;      })&#xD;&#xA;```&#xD;&#xA;And the result is that I'm not able to create a proof of existence claim. Any idea how to fix this?&#xD;&#xA;&#xD;&#xA;This is the `result` object by the way:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JHXkW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14773" PostHistoryTypeId="5" PostId="3874" RevisionGUID="288d588d-33de-4f47-82fb-7afdd75c52df" CreationDate="2022-07-25T22:25:11.857" UserId="29" Comment="added 36 characters in body" Text="For Polkadot Apps, just like what @andresvsm mentioned.&#xD;&#xA;&#xD;&#xA;For CLI, just:&#xD;&#xA;```&#xD;&#xA;curl http://127.0.0.1:9933 -X POST -H &quot;Content-Type:application/json&quot; -d '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;system_localPeerId&quot;,&quot;params&quot;:[],&quot;id&quot;:1}'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And if you want to interact with Rust, try [this](https://github.com/hack-ink/subalfred/blob/0d0e2c4e8dac0d76654a0a3130e74c1314ca37ba/substrate-minimal/subrpcer/src/system.rs#L44-L47)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14774" PostHistoryTypeId="2" PostId="3934" RevisionGUID="083db16d-70f1-45e4-9ad1-af903244d56d" CreationDate="2022-07-25T22:48:40.600" UserId="2843" Text="I think you can try this calls. Not sure how it's formatted&#xD;&#xA;https://polkadot.js.org/docs/substrate/rpc/#syncstate" ContentLicense="CC BY-SA 4.0" />
  <row Id="14776" PostHistoryTypeId="2" PostId="3935" RevisionGUID="4dd95de1-9f9b-42a5-8926-3c94f6425979" CreationDate="2022-07-26T03:41:41.873" UserId="2785" Text="I can have config of my pallet in two different ways:&#xD;&#xA;```rust&#xD;&#xA;trait Config: frame_system::Config {&#xD;&#xA;    // *--snip&#xD;&#xA;    #[pallet::constant]&#xD;&#xA;    SomeConstant: Get&lt;u32&gt;,&#xD;&#xA;&#xD;&#xA;    const ANOTHER_CONSTANT: u32,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So when do I define it with `#[pallet::constant]` and when as `associated item`" ContentLicense="CC BY-SA 4.0" />
  <row Id="14778" PostHistoryTypeId="1" PostId="3935" RevisionGUID="4dd95de1-9f9b-42a5-8926-3c94f6425979" CreationDate="2022-07-26T03:41:41.873" UserId="2785" Text="usage of `#[pallet::constant]` vs `const associated item`" ContentLicense="CC BY-SA 4.0" />
  <row Id="14779" PostHistoryTypeId="3" PostId="3935" RevisionGUID="4dd95de1-9f9b-42a5-8926-3c94f6425979" CreationDate="2022-07-26T03:41:41.873" UserId="2785" Text="|substrate-node|rust|constants|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14780" PostHistoryTypeId="2" PostId="3936" RevisionGUID="e4919ccb-9782-445b-ae8f-4f58e88ca938" CreationDate="2022-07-26T03:44:01.363" UserId="2785" Text="Why no use `#cfg[test]` in every assert! statement" ContentLicense="CC BY-SA 4.0" />
  <row Id="14782" PostHistoryTypeId="2" PostId="3937" RevisionGUID="2dde39e8-8ee9-403a-a23a-89385533efaa" CreationDate="2022-07-26T05:15:59.713" UserId="2916" Text="I'm trying to call the `setName` method of nicks pallet:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, when I run click &quot;Signed&quot; I get the error on the right, which is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;system:ExtrinsicFailed&#xD;&#xA;[{&quot;Module&quot;:{&quot;index&quot;:&quot;10&quot;,&quot;error&quot;:&quot;0x01000000&quot;}},{&quot;weight&quot;:&quot;50,000,000&quot;,&quot;class&quot;:&quot;Normal&quot;,&quot;paysFee&quot;:&quot;Yes&quot;}]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Of note is that this error isn't specific to setName or nicks pallet, as if I try it with other pallets too then I get the same error.&#xD;&#xA;&#xD;&#xA;Any idea how to fix it?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YZaaV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="14784" PostHistoryTypeId="1" PostId="3937" RevisionGUID="2dde39e8-8ee9-403a-a23a-89385533efaa" CreationDate="2022-07-26T05:15:59.713" UserId="2916" Text="&quot;system:ExtrinsicFailed&quot; error when submitting transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="14785" PostHistoryTypeId="3" PostId="3937" RevisionGUID="2dde39e8-8ee9-403a-a23a-89385533efaa" CreationDate="2022-07-26T05:15:59.713" UserId="2916" Text="|pallet|substrate-node-template|extrinsic|transactions|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14786" PostHistoryTypeId="2" PostId="3938" RevisionGUID="9d2d357c-98ec-4251-9132-dcc35834f7a8" CreationDate="2022-07-26T08:01:43.390" UserId="2673" Text="What I can suggest is this.&#xD;&#xA;Don't tightly couple your pallet to `pallet-assets`. Instead, put an associated type in your pallet's config with a [Transfer](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungibles/trait.Transfer.html) trait bound (assets pallet implements it). Then, you can use the [transfer](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungibles/trait.Transfer.html#tymethod.transfer) method from that trait, which does not require origin.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14788" PostHistoryTypeId="2" PostId="3939" RevisionGUID="2af47f5a-0c4a-47aa-94f2-b6035d9fc386" CreationDate="2022-07-26T08:19:28.557" UserId="2673" Text="I am building a pallet which uses assets in a loosely-coupled manner. In the pallet's `Config`, there's an associated type `Assets` with [`Inspect`](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungibles/trait.Inspect.html) and [`Transfer`](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungibles/trait.Transfer.html) bounds.&#xD;&#xA;&#xD;&#xA;Now, when writing benchmarks, I need some way to create and mint assets. Otherwise, my pallet won't be able to perform any transfers. I know that assets pallet implements both [`Create`](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungibles/trait.Create.html) and [`Mutate`](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungibles/trait.Mutate.html) traits, but as far as I understand, I cannot use any methods from these traits in my pallet's benchmarks, as long as they're not explicitly added to the `Config`. And I don't want to do that, because it seems really bad design to add trait bounds for the sake of benchmarks only.&#xD;&#xA;&#xD;&#xA;So, how could I create and mint assets for my benchmarks??" ContentLicense="CC BY-SA 4.0" />
  <row Id="14790" PostHistoryTypeId="1" PostId="3939" RevisionGUID="2af47f5a-0c4a-47aa-94f2-b6035d9fc386" CreationDate="2022-07-26T08:19:28.557" UserId="2673" Text="How to create and mint assets in benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="14791" PostHistoryTypeId="3" PostId="3939" RevisionGUID="2af47f5a-0c4a-47aa-94f2-b6035d9fc386" CreationDate="2022-07-26T08:19:28.557" UserId="2673" Text="|benchmarking|assets|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14792" PostHistoryTypeId="6" PostId="3917" RevisionGUID="2c930c8b-594c-47e7-baa8-a65d151ad226" CreationDate="2022-07-26T10:54:58.027" UserId="34" Comment="edited tags" Text="|parachain|extrinsic|transactions|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14795" PostHistoryTypeId="5" PostId="998" RevisionGUID="71889b73-d3ee-48e4-a2e8-6e53f6cac8f1" CreationDate="2022-07-26T10:56:44.857" UserId="2025" Comment="fix link to new substrate docs" Text="I was following [this guide Configuring Genesis for Balances](https://docs.substrate.io/reference/how-to-guides/basics/configure-genesis-state/).&#xD;&#xA;&#xD;&#xA;In my parachain, I replaced `T::Balance` with `BalanceOf&lt;T&gt;`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;    	type Currency: ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;    		+ LockableCurrency&lt;Self::AccountId, Moment = Self::BlockNumber&gt;;&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;	#[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;	#[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		pub single_balance: BalanceOf&lt;T&gt;,&#xD;&#xA;		pub account_map: Vec&lt;(T::AccountId, BalanceOf&lt;T&gt;)&gt;,&#xD;&#xA;	}&#xD;&#xA;	#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	impl&lt;T: Config&gt; Default for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			Self { single_balance: Default::default(), account_map: Default::default() }&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// https://docs.substrate.io/v3/runtime/storage#declaring-storage-items&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_value)]&#xD;&#xA;	pub type SingleValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;; //&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_balance)]&#xD;&#xA;	pub type SingleBalance&lt;T: Config&gt; = StorageValue&lt;_, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	// A map that has enumerable entries.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn accounts)]&#xD;&#xA;	pub type AccountMap&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt;` is not satisfied.&#xD;&#xA;&#xD;&#xA;Here's the genesis configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;And the error I'm getting:&#xD;&#xA;&#xD;&#xA;`EncodeLike&lt;u32&gt;` is not implemented for `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;&#xD;&#xA;`122 |     pub fn put&lt;Arg: EncodeLike&lt;Value&gt;&gt;(val: Arg) {&#xD;&#xA;     |                ^^^^^^^^^^^^^^^^ required by this bound in frame_support::pallet_prelude::StorageValue::&lt;Prefix, Value, QueryKind, OnEmpty&gt;::put&#xD;&#xA;help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; &#xD;&#xA;    where &amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt; {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14796" PostHistoryTypeId="24" PostId="998" RevisionGUID="71889b73-d3ee-48e4-a2e8-6e53f6cac8f1" CreationDate="2022-07-26T10:56:44.857" Comment="Proposed by 2025 approved by 34 edit id of 252" ContentLicense="CC BY-SA 4.0" />
  <row Id="14797" PostHistoryTypeId="2" PostId="3940" RevisionGUID="38fd8336-7422-4f05-908a-600311c54ab3" CreationDate="2022-07-26T11:02:01.770" UserId="94" Text="I analyzed your benchmark and it looks good, quite consistent (minus one outlier) [µs]:  &#xD;&#xA;```pre&#xD;&#xA;15.76&#xD;&#xA;15.69&#xD;&#xA;15.37&#xD;&#xA;15.55&#xD;&#xA;15.31&#xD;&#xA;31.38&#xD;&#xA;16.07&#xD;&#xA;15.81&#xD;&#xA;15.67&#xD;&#xA;15.43&#xD;&#xA;15.64&#xD;&#xA;15.99&#xD;&#xA;15.44&#xD;&#xA;```&#xD;&#xA;The benchmarks need to be run on the same hardware every time. This is since they measure *time*, and a faster PC scores lower (better) weights.  &#xD;&#xA;If you are just doing development you can obviously use any hardware. But before a release it is necessary to re-benchmark the weights on fixed hardware.   &#xD;&#xA;A good pick would be the Kusama [reference hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-kusama#hardware)." ContentLicense="CC BY-SA 4.0" />
  <row Id="14800" PostHistoryTypeId="2" PostId="3941" RevisionGUID="9d7f8588-d51c-4426-a6dc-ac1183b50214" CreationDate="2022-07-26T11:26:29.817" UserId="2935" Text="One way of achieving this would be a setup similar to `pallet-xcm-benchmarks`.&#xD;&#xA;&#xD;&#xA;[Here][1] you can find the benchmarking pallet's `Config` that contains a `Config` of whatever pallet should be tested. This approach gives you freedom to implement any necessary helpers you might need. You can find some sample benchmarking code [here][2]. Of course it doesn't necessarily need to be a separate pallet. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/59aa955576e963942c60e3ae8f8316444b66cafb/xcm/pallet-xcm-benchmarks/src/lib.rs#L34&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/59aa955576e963942c60e3ae8f8316444b66cafb/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs#L53" ContentLicense="CC BY-SA 4.0" />
  <row Id="14802" PostHistoryTypeId="2" PostId="3942" RevisionGUID="a3426ec5-c980-4678-a441-3bca4fd5d457" CreationDate="2022-07-26T12:25:30.350" UserId="2936" Text="When running the tutorial for substrate-frontend-template in Chrome/macOS, it doesn't load due to a websocket error.   The tutorial says to use &quot;yarn start&quot;&#xD;&#xA;&#xD;&#xA;Tutorial:&#xD;&#xA;&lt;https://docs.substrate.io/tutorials/get-started/build-local-blockchain/#:~:text=yarn%20install-,Start%20the%20front%2Dend%20template,-The%20Substrate%20front&gt;&#xD;&#xA;&#xD;&#xA;where section is &quot;Start the front-end template&quot;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14804" PostHistoryTypeId="1" PostId="3942" RevisionGUID="a3426ec5-c980-4678-a441-3bca4fd5d457" CreationDate="2022-07-26T12:25:30.350" UserId="2936" Text="Error Connecting to Substrate Connection to websocket 'ws://127.0.0.1:9944/' failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="14805" PostHistoryTypeId="3" PostId="3942" RevisionGUID="a3426ec5-c980-4678-a441-3bca4fd5d457" CreationDate="2022-07-26T12:25:30.350" UserId="2936" Text="|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14810" PostHistoryTypeId="2" PostId="3944" RevisionGUID="c6da57ab-16d0-4283-86c3-32c4baa3698c" CreationDate="2022-07-26T13:54:10.780" UserId="2673" Text="As far as I understand, benchmarks have to be run in a stable environment. I've always been getting big variance when running any benchmarks on my PC, because there's a thousand other processes in the background, sharing RAM &amp; CPU with the benchmarks. I think a dedicated (virtual) machine might be a good solution for production benchmarking." ContentLicense="CC BY-SA 4.0" />
  <row Id="14812" PostHistoryTypeId="2" PostId="3945" RevisionGUID="2db280c4-4a9f-4924-a4b4-6877256bea53" CreationDate="2022-07-26T14:00:51.267" UserId="94" Text="Windows and MacOS are being mentioned a few times on docs.substrate.io, but the Substrate CI does not run tests on there.  &#xD;&#xA;Now my question; what are the officially supported OS?  &#xD;&#xA;With &quot;officially supported&quot; I mean that its a safe choice for validators." ContentLicense="CC BY-SA 4.0" />
  <row Id="14814" PostHistoryTypeId="1" PostId="3945" RevisionGUID="2db280c4-4a9f-4924-a4b4-6877256bea53" CreationDate="2022-07-26T14:00:51.267" UserId="94" Text="Which Operating Systems are officially supported?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14815" PostHistoryTypeId="3" PostId="3945" RevisionGUID="2db280c4-4a9f-4924-a4b4-6877256bea53" CreationDate="2022-07-26T14:00:51.267" UserId="94" Text="|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14816" PostHistoryTypeId="2" PostId="3946" RevisionGUID="43f309cc-7be0-4b9e-975f-1d0bacb142e8" CreationDate="2022-07-26T14:07:06.047" UserId="94" Text="Substrate supports `ECDSA`, `ED25519` and `SR25519` as listed here https://docs.rs/sp-core.  &#xD;&#xA;You can open an issue if you feel that Substrate is lacking important features.  &#xD;&#xA;Or if you are experienced you can implement it and try to integrate it into Substrate by opening a Merge Request.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14818" PostHistoryTypeId="5" PostId="3925" RevisionGUID="c224f3d7-3e22-4881-a441-098acc31acd4" CreationDate="2022-07-26T15:10:22.703" UserId="599" Comment="deleted 1 character in body" Text="It is not inheritance, it is called [supertrait](https://doc.rust-lang.org/reference/items/traits.html#supertraits). It is a bound for the trait that if someone implements your `CustomErc20`, he also should implement the `Erc20` trait.&#xD;&#xA;&#xD;&#xA;ink! right now doesn't support it(your error says to you about it). Maybe it will be fixed during [this](https://github.com/paritytech/ink/issues/737) issue or [this](https://github.com/paritytech/ink/issues/631).&#xD;&#xA;&#xD;&#xA;You can use [`openbrush::trait_definition`](https://github.com/Supercolony-net/openbrush-contracts#default-implementation-in-ink-traits) macro that allows adding bounds. But you need to use it in combination with the `openbrush::contract` macro(instead of `ink::contract`).&#xD;&#xA;&#xD;&#xA;Right now, OpenBrush allows adding any bounds(defined with `openbrush::trait_definition`, `ink::trait_definition` and common rust traits). But in the next release, OpenBursh will allow adding only bounds defined via `openbrush::trait_definition`. It is because traits defined with the `trait_definition` macro are public and should not use bounds related to a specific language or implementation." ContentLicense="CC BY-SA 4.0" />
  <row Id="14819" PostHistoryTypeId="2" PostId="3947" RevisionGUID="9fd05f8c-c5c1-4862-9f54-73a75fd65308" CreationDate="2022-07-26T15:16:39.903" UserId="73" Text="The only &quot;safe&quot; choice is Linux. As you already mentioned, we only test on Linux and most validators also run on Linux. For MacOs we only ensure that it compiles, because a lot of developers are running on MacOs. We also have some performance optimization around Wasm execution that are only for Linux/MacOs. Windows is not really supported. We probably compile on Windows, but not that much more support is provided. On Windows the Linux subsystem should be used to get the best compatibility. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14821" PostHistoryTypeId="5" PostId="3942" RevisionGUID="8221d124-bbf0-4c6a-836d-d5a21b9c03dd" CreationDate="2022-07-26T18:35:52.183" UserId="2936" Comment="added 41 characters in body" Text="When running the tutorial for substrate-frontend-template in Chrome/macOS, it doesn't load due to a websocket error.   The tutorial says to use &quot;yarn start&quot; which invokes: &quot;react-app-rewired start&quot;&#xD;&#xA;&#xD;&#xA;Tutorial:&#xD;&#xA;&lt;https://docs.substrate.io/tutorials/get-started/build-local-blockchain/#:~:text=yarn%20install-,Start%20the%20front%2Dend%20template,-The%20Substrate%20front&gt;&#xD;&#xA;&#xD;&#xA;where section is &quot;Start the front-end template&quot;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14822" PostHistoryTypeId="2" PostId="3948" RevisionGUID="83488723-47cc-4dfe-add4-e7be79194654" CreationDate="2022-07-26T18:48:19.777" UserId="29" Text="According to the docs, using the macro gives you the extra benefit of having it included in the metadatas:&#xD;&#xA;&#xD;&#xA;&gt; To put Get associated type into metadatas, use the attribute #[pallet::constant], e.g.:&#xD;&#xA;&gt; &#xD;&#xA;&gt; ```rs&#xD;&#xA;&gt; #[pallet::config] &#xD;&#xA;&gt; pub trait Config: frame_system::Config { 		&#xD;&#xA;&gt;   #[pallet::constant] 		&#xD;&#xA;&gt;   type Foo: Get&lt;u32&gt;; &#xD;&#xA;&gt; }&#xD;&#xA;&gt; ```&#xD;&#xA;- https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html#macro-expansion&#xD;&#xA;&#xD;&#xA;You can see the full definition and implementation of this constant macro here:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/support/procedural/src/pallet/expand/constants.rs#L20-L108" ContentLicense="CC BY-SA 4.0" />
  <row Id="14825" PostHistoryTypeId="2" PostId="3949" RevisionGUID="593758b1-4fac-401b-87e0-e14d0b1573ee" CreationDate="2022-07-26T20:37:48.217" UserId="1824" Text="It's pretty straightforwaded to call a contract from a pallet. I'm going to assume you're calling an ink! contract with the following message for the purposes of this answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn flip(&amp;mut self, foo: u32) {&#xD;&#xA;    todo!()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm also gonna assume this contract has already been deployed on-chain.&#xD;&#xA;&#xD;&#xA;You'll need a couple of things:&#xD;&#xA;- Some sort of coupling to `pallet-contracts`&#xD;&#xA;- Knowledge about the contract's message selector and arguments&#xD;&#xA;&#xD;&#xA;With that you'll able to use [`pallet_contracts::bare_call`](https://crates.parity.io/pallet_contracts/pallet/struct.Pallet.html#method.bare_call) to call into our contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Coupling&#xD;&#xA;&#xD;&#xA;Your custom pallet needs to have access to the interface from the Contracts pallet. It&#xD;&#xA;can do this in one of two ways:&#xD;&#xA;- [Tight coupling](https://docs.substrate.io/reference/how-to-guides/pallet-design/use-tight-coupling/)&#xD;&#xA;- [Loose coupling](https://docs.substrate.io/reference/how-to-guides/pallet-design/use-loose-coupling/)&#xD;&#xA;&#xD;&#xA;I'm not gonna get into the details here, but just know that you have to use _one_ of&#xD;&#xA;them. We'll use tight coupling for our example.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Selector and Arguments&#xD;&#xA;&#xD;&#xA;The message selector is the identifier used to pick out which of the many functions in&#xD;&#xA;your smart contract should be called. Assuming you have an ink! contract, you can find&#xD;&#xA;this info in the metadata generated by `cargo-contract`.&#xD;&#xA;&#xD;&#xA;When you do `cargo +nightly contract build` you'll get something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Your contract artifacts are ready. You can find them in:&#xD;&#xA;/private/tmp/flipper/target/ink&#xD;&#xA;&#xD;&#xA;  - flipper.contract (code + metadata)&#xD;&#xA;  - flipper.wasm (the contract's code)&#xD;&#xA;  - metadata.json (the contract's metadata)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the `metadata.json` file you'll find a section like this:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;&quot;messages&quot;: [&#xD;&#xA;  {&#xD;&#xA;    &quot;args&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;label&quot;: &quot;foo&quot;,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&#xD;&#xA;            &quot;u32&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;type&quot;: 4&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    ],&#xD;&#xA;    &quot;docs&quot;: [],&#xD;&#xA;    &quot;label&quot;: &quot;flip&quot;,&#xD;&#xA;    &quot;mutates&quot;: true,&#xD;&#xA;    &quot;payable&quot;: false,&#xD;&#xA;    &quot;returnType&quot;: null,&#xD;&#xA;    &quot;selector&quot;: &quot;0x633aa551&quot;&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Find the message you want to call and take a note of the selector bytes. If your function&#xD;&#xA;has any arguments you'll also need to take a note of what those are.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Crafting a `bare_call`&#xD;&#xA;&#xD;&#xA;The `bare_call` function takes an `input_data` buffer. This buffer needs to be of the&#xD;&#xA;form:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[ MESSAGE_SELECTOR | SCALE_ENCODED_ARG_1 | ... | SCALE_ENCODED_ARG_N ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We can craft this as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let mut selector: Vec&lt;u8&gt; = [0x63, 0x3A, 0xA5, 0x51].into();&#xD;&#xA;let mut message_arg = 15663040u32.encode();&#xD;&#xA;&#xD;&#xA;let mut data = Vec::new();&#xD;&#xA;data.append(&amp;mut selector);&#xD;&#xA;data.append(&amp;mut message_arg);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, to put it call together. In our pallet we'll need a `call` (so a function within the&#xD;&#xA;`#[pallet::call]` macro) which will itself call `bare_call`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn call_contract(&#xD;&#xA;    origin: OriginFor&lt;T&gt;,&#xD;&#xA;    dest: T::AccountId, // &lt;- This is the address of the deployed contract we're calling&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;    let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;    // Amount to transfer to the message. Not gonna transfer anything here, so we'll&#xD;&#xA;    // leave this as `0`.&#xD;&#xA;    let value: BalanceOf&lt;T&gt; = Default::default();&#xD;&#xA;&#xD;&#xA;    // You'll have to play around with this depening on your contract. I don't recommend&#xD;&#xA;    // hardcoding it but for demo purposes this'll do the trick&#xD;&#xA;    let gas_limit = 10_000_000_000;&#xD;&#xA;    let debug = false;&#xD;&#xA;&#xD;&#xA;    // Remember, we pulled this out from the `metadata.json` file.&#xD;&#xA;    //&#xD;&#xA;    // Again, probably shouldn't be hardcoded but :shrug:&#xD;&#xA;    let mut selector: Vec&lt;u8&gt; = [0x63, 0x3A, 0xA5, 0x51].into();&#xD;&#xA;    let mut message_arg = 15663040u32.encode();&#xD;&#xA;&#xD;&#xA;    let mut data = Vec::new();&#xD;&#xA;    data.append(&amp;mut selector);&#xD;&#xA;    data.append(&amp;mut message_arg);&#xD;&#xA;&#xD;&#xA;    // This ends up calling our contract!&#xD;&#xA;    pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;        who,&#xD;&#xA;        dest.clone(),&#xD;&#xA;        value,&#xD;&#xA;        gas_limit,&#xD;&#xA;        data,&#xD;&#xA;        debug,&#xD;&#xA;    )&#xD;&#xA;    .result?;&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Further Reading&#xD;&#xA;- https://github.com/justinFrevert/Runtime-Contract-Interactions/&#xD;&#xA;    - I based this answer off [the following function](https://github.com/justinFrevert/Runtime-Contract-Interactions/blob/6cb243499015134c489df1de1ffdce3be28a27f9/pallets/template/src/lib.rs#L88).&#xD;&#xA;- https://github.com/HCastano/decoded-2022-demo &#xD;&#xA;    - Similar thing [here](https://github.com/HCastano/decoded-2022-demo/blob/493edc950d9e7af03c8f021919f15bfc9f7e1e94/runtime/src/chain_extension.rs#L127), but in the context of chain extensions.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14827" PostHistoryTypeId="10" PostId="3122" RevisionGUID="306cda8b-a6a3-4a64-ac8d-56a422a336da" CreationDate="2022-07-26T21:09:49.023" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[3151],&quot;Voters&quot;:[{&quot;Id&quot;:1824,&quot;DisplayName&quot;:&quot;HCastano&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="14828" PostHistoryTypeId="2" PostId="3950" RevisionGUID="953655b0-55fc-4a78-8a2e-1f87d91beb1b" CreationDate="2022-07-26T21:20:28.237" UserId="2698" Text="I am updating our pallet's for the first time in (1-2) years. I have been trying to iron out all of the outdated dependancies for the last couple of days. I can't seem to get past this error which I have been having:&#xD;&#xA;```&#xD;&#xA;error: failed to select a version for `parity-util-mem`.&#xD;&#xA;    ... required by package `sp-runtime v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `sp-runtime` of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking` of package `pallet-vesting v4.0.0 (/Users/jackson/Desktop/chain_v2/pallets/vesting)`&#xD;&#xA;    ... which satisfies path dependency `pallet-vesting` of package `node-template-runtime v4.0.0-dev (/Users/jackson/Desktop/chain_v2/runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/Users/jackson/Desktop/chain_v2/node)`&#xD;&#xA;versions that meet the requirements `^0.11.0` are: 0.11.0&#xD;&#xA;&#xD;&#xA;the package `parity-util-mem` links to the native library `parity-util-mem-ban-duplicates`, but it conflicts with a previous package which links to `parity-util-mem-ban-duplicates` as well:&#xD;&#xA;package `parity-util-mem v0.10.2`&#xD;&#xA;    ... which satisfies dependency `parity-util-mem = &quot;^0.10.2&quot;` of package `sc-service v0.10.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#22d40c76)`&#xD;&#xA;    ... which satisfies git dependency `sc-service` (locked to 0.10.0-dev) of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#22d40c76)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/Users/jackson/Desktop/chain_v2/node)`&#xD;&#xA;Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='parity-util-mem' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.&#xD;&#xA;&#xD;&#xA;failed to select a version for `parity-util-mem` which could resolve this conflict&#xD;&#xA;```&#xD;&#xA;This is the Cargo.toml file which is being compiled:&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-vesting&quot;&#xD;&#xA;version = &quot;4.0.0&quot;&#xD;&#xA;description = &quot;FRAME pallet template for defining custom runtime logic.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;Unlicense&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;parity-scale-codec = { version = &quot;3.0.0&quot;, default-features = false, features = [ &quot;derive&quot; ] }&#xD;&#xA;scale-info = { version = &quot;2.0&quot;, default-features = false, features = [&#xD;&#xA;    &quot;derive&quot;&#xD;&#xA;] }&#xD;&#xA;frame-support = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.26&quot;, default-features = false }&#xD;&#xA;frame-system = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.26&quot;, default-features = false }&#xD;&#xA;frame-benchmarking = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.26&quot;, default-features = false }&#xD;&#xA;sp-runtime = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.26&quot;, default-features = false }&#xD;&#xA;sp-std = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.26&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-io = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;orml-utilities = {version = &quot;0.4.1-dev&quot;, git = &quot;https://github.com/open-web3-stack/open-runtime-module-library.git&quot;}&#xD;&#xA;pallet-balances = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;parity-scale-codec/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;    &quot;frame-support/std&quot;,&#xD;&#xA;    &quot;frame-system/std&quot;,&#xD;&#xA;    &quot;frame-benchmarking/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;```&#xD;&#xA;Is there a way to tell which dependency is the issue? If there is how would I update it. Thanks in advance for the advice. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14830" PostHistoryTypeId="1" PostId="3950" RevisionGUID="953655b0-55fc-4a78-8a2e-1f87d91beb1b" CreationDate="2022-07-26T21:20:28.237" UserId="2698" Text="Looking for the Outdated Dependency" ContentLicense="CC BY-SA 4.0" />
  <row Id="14831" PostHistoryTypeId="3" PostId="3950" RevisionGUID="953655b0-55fc-4a78-8a2e-1f87d91beb1b" CreationDate="2022-07-26T21:20:28.237" UserId="2698" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14832" PostHistoryTypeId="2" PostId="3951" RevisionGUID="bc112572-0cba-4ab7-abd5-8bfe0da8755e" CreationDate="2022-07-26T21:41:57.880" UserId="2937" Text="I'm playing with substrate's ink.&#xD;&#xA;I have written simple smart contract which deposits funds from a user in a fixed amount.&#xD;&#xA;&#xD;&#xA;My problem is with tests (deposit):&#xD;&#xA;When a user sends funds to the contract, I *DO NOT* see that the contract balance changes.&#xD;&#xA;&#xD;&#xA;Can someone, please, explain or point me into documentation&#xD;&#xA;why the contracts balance doesn't change?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;    use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;    #[ink::contract]&#xD;&#xA;    mod simple_deposit {&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        InvalidDepositSize,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct SimpleDeposit {&#xD;&#xA;        pub total_deposited: Balance,&#xD;&#xA;        pub deposit_size: Balance,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl SimpleDeposit {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(deposit_size: Balance) -&gt; Self {&#xD;&#xA;            Self { total_deposited: 0,&#xD;&#xA;                   deposit_size: deposit_size,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn balance(&amp;self) -&gt; Balance {&#xD;&#xA;            self.total_deposited&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn deposit(&amp;mut self) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            if self.env().transferred_value() != self.deposit_size {&#xD;&#xA;                return Err(Error::InvalidDepositSize);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            self.total_deposited += self.env().transferred_value();&#xD;&#xA;&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;        use ink_lang as ink;&#xD;&#xA;        use ink_lang::codegen::Env;&#xD;&#xA;&#xD;&#xA;        use ink_env::test::set_caller as set_caller;&#xD;&#xA;        use ink_env::test::set_value_transferred as set_value_transferred;&#xD;&#xA;&#xD;&#xA;        fn bob_account() -&gt; AccountId {&#xD;&#xA;            ink_env::test::default_accounts::&lt;ink_env::DefaultEnvironment&gt;().bob&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn constructor() {&#xD;&#xA;            let simple_deposit = SimpleDeposit::new(15);&#xD;&#xA;&#xD;&#xA;            assert_eq!(simple_deposit.total_deposited, 0);&#xD;&#xA;            assert_eq!(simple_deposit.deposit_size, 15);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn deposit() {&#xD;&#xA;            let mut simple_deposit = SimpleDeposit::new(15);&#xD;&#xA;            let balance_before = simple_deposit.env().balance();&#xD;&#xA;&#xD;&#xA;            set_caller::&lt;Environment&gt;(bob_account());&#xD;&#xA;            set_value_transferred::&lt;ink_env::DefaultEnvironment&gt;(15);&#xD;&#xA;            let res = simple_deposit.deposit();&#xD;&#xA;            assert!(res.is_ok());&#xD;&#xA;&#xD;&#xA;            let balance_after = simple_deposit.env().balance();&#xD;&#xA;&#xD;&#xA;            assert_ne!(balance_before, balance_after);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Sorry, I haven't searched the substrate.stackexchange yet (lack of time, maybe, will do it later).&#xD;&#xA;&#xD;&#xA;Thanks in advance for any advices and suggestions!&#xD;&#xA;&#xD;&#xA;here is the link to the gist on github:&#xD;&#xA;&#xD;&#xA;https://gist.github.com/vni/fb897f32244e8ff6931b286bb926a191#file-substrate-simple_deposit-ink-rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="14834" PostHistoryTypeId="1" PostId="3951" RevisionGUID="bc112572-0cba-4ab7-abd5-8bfe0da8755e" CreationDate="2022-07-26T21:41:57.880" UserId="2937" Text="smart contract's balance doesn't change in tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="14835" PostHistoryTypeId="3" PostId="3951" RevisionGUID="bc112572-0cba-4ab7-abd5-8bfe0da8755e" CreationDate="2022-07-26T21:41:57.880" UserId="2937" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14836" PostHistoryTypeId="2" PostId="3952" RevisionGUID="9475c62e-081d-44b5-b28c-55b6c8fae6e4" CreationDate="2022-07-27T03:56:22.157" UserId="2384" Text="Adding comment from Oliver as answer ( so this question don't stay &quot;unanswered&quot;):&#xD;&#xA;You have to make sure that node is still running on same port as you are trying to connect" ContentLicense="CC BY-SA 4.0" />
  <row Id="14838" PostHistoryTypeId="2" PostId="3953" RevisionGUID="5eec52cd-a3d7-4db8-bbb1-781bf15af0f6" CreationDate="2022-07-27T07:11:40.153" UserId="360" Text="Parachains can conveniently be tested locally with polkadot-launch to ensure a specific runtime release will produce blocks and perform e2e tests.&#xD;&#xA;&#xD;&#xA;Is there an example of how to do these kinds of tests in github actions automatically?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14840" PostHistoryTypeId="1" PostId="3953" RevisionGUID="5eec52cd-a3d7-4db8-bbb1-781bf15af0f6" CreationDate="2022-07-27T07:11:40.153" UserId="360" Text="How to integration-test a parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="14841" PostHistoryTypeId="3" PostId="3953" RevisionGUID="5eec52cd-a3d7-4db8-bbb1-781bf15af0f6" CreationDate="2022-07-27T07:11:40.153" UserId="360" Text="|parachain|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14842" PostHistoryTypeId="2" PostId="3954" RevisionGUID="22d756d8-c4cd-40c5-8e67-ad28fa7724a6" CreationDate="2022-07-27T08:09:18.370" UserId="2809" Text="I'm implementing a permissioned EVM compatible NPoS chain on the Frontier node template using Aura as my block producer.&#xD;&#xA;&#xD;&#xA;I have implemented the necessary pallets(Staking, timestamp, session, GRANDPA(came pre implemented), evm/ethereum etc).&#xD;&#xA;&#xD;&#xA;I've set 3 initial stakers/Aura authorities(Alice, Bob, Charlie) and expect to manually add more.&#xD;&#xA;&#xD;&#xA;The chain works fine in local testnet, however this is an event that is emitted, indicating that election is not triggered. Can anyone suggest what the issue is?&#xD;&#xA;&#xD;&#xA;[![StakingElectionFailed][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the configuration for my Staking, Session and Grandpa pallet.&#xD;&#xA;&#xD;&#xA;[![staking][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JLNhz.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/wxhhm.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/cbj3V.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14844" PostHistoryTypeId="1" PostId="3954" RevisionGUID="22d756d8-c4cd-40c5-8e67-ad28fa7724a6" CreationDate="2022-07-27T08:09:18.370" UserId="2809" Text="NPoS with Aura - no planned era" ContentLicense="CC BY-SA 4.0" />
  <row Id="14845" PostHistoryTypeId="3" PostId="3954" RevisionGUID="22d756d8-c4cd-40c5-8e67-ad28fa7724a6" CreationDate="2022-07-27T08:09:18.370" UserId="2809" Text="|consensus|grandpa|aura|npos|proof-of-stake|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14846" PostHistoryTypeId="2" PostId="3955" RevisionGUID="8f7114fe-fe98-4070-9e38-dd92e466d782" CreationDate="2022-07-27T08:15:04.930" UserId="94" Text="This could be a good use for feature flags since you have the following requirement:  &#xD;&#xA;Depend on a trait *only* in benchmarking.  &#xD;&#xA;&#xD;&#xA;You can see this multiple times already being used for example in the config of the `Uniques` pallet: &#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;/// A set of helper functions for benchmarking.&#xD;&#xA;type Helper: BenchmarkHelper&lt;Self::CollectionId, Self::ItemId&gt;;&#xD;&#xA;```&#xD;&#xA;The `BenchmarkHelper` trait then provides everything you need for benchmarking.&#xD;&#xA;&#xD;&#xA;In the runtime config this can be easily configured via:&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;type Helper = ();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14848" PostHistoryTypeId="2" PostId="3956" RevisionGUID="32401b59-6cb4-46bb-9bc2-0782847cf503" CreationDate="2022-07-27T08:20:22.773" UserId="2582" Text="Dependency that causes the problem is written in error, so you can follow the report to find remaining outdated packages.&#xD;&#xA;&#xD;&#xA;In this case, it says that one version of `parity-util-mem` is required by `pallet-vesting` .toml of which you have attached, and another one comes from `frame-benchmarking-cli` which is (together with `vesting`) is a dependency of  `node-template`.&#xD;&#xA;&#xD;&#xA;So updating `frame-benchmarking-cli`'s git version somewhere in `/Users/jackson/Desktop/chain_v2/node/Cargo.toml` to `branch = &quot;polkadot-v0.9.26&quot;` should do the work (if I'm not missing something)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14854" PostHistoryTypeId="5" PostId="3941" RevisionGUID="250013d0-1211-4fe9-993e-d377cfec1c0f" CreationDate="2022-07-27T11:16:30.010" UserId="2935" Comment="added 150 characters in body" Text="One way of achieving this would be a setup similar to `pallet-xcm-benchmarks`.&#xD;&#xA;&#xD;&#xA;[Here][1] you can find the benchmarking pallet's `Config` that contains a `Config` of whatever pallet should be tested. This approach gives you freedom to implement any necessary helpers you might need. You can find some sample benchmarking code [here][2]. Of course it doesn't necessarily need to be a separate pallet. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: Oliver's [answer][3] might actually be an easier solution for this kind of thing. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/59aa955576e963942c60e3ae8f8316444b66cafb/xcm/pallet-xcm-benchmarks/src/lib.rs#L34&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/59aa955576e963942c60e3ae8f8316444b66cafb/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs#L53&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/3955/2935" ContentLicense="CC BY-SA 4.0" />
  <row Id="14855" PostHistoryTypeId="2" PostId="3958" RevisionGUID="3c143d94-dfc1-4c14-9c53-ca77d6f34e00" CreationDate="2022-07-27T11:19:05.423" UserId="2916" Text="Managed to sort it out thanks to Bruno. When I checked the &quot;PolkadotJS Apps Explorer&quot; I found that the name I was setting was too short (the minimum character length is 8 characters or something). When I made the nickname longer then it worked fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="14858" PostHistoryTypeId="5" PostId="3951" RevisionGUID="2e09edf6-23c8-4290-be61-e2a83ee4cc1a" CreationDate="2022-07-27T11:55:02.303" UserId="1951" Comment="added payable annotation, still doesn't work with payable" Text="I'm playing with substrate's ink.&#xD;&#xA;I have written a simple smart contract which deposits funds from a user in a fixed amount.&#xD;&#xA;&#xD;&#xA;My problem is with tests (deposit):&#xD;&#xA;When a user sends funds to the contract, I *DO NOT* see that the contract balance changes.&#xD;&#xA;&#xD;&#xA;Can someone, please, explain or point me to the documentation&#xD;&#xA;why the contract's balance doesn't change?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;    use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;    #[ink::contract]&#xD;&#xA;    mod simple_deposit {&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        InvalidDepositSize,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct SimpleDeposit {&#xD;&#xA;        pub total_deposited: Balance,&#xD;&#xA;        pub deposit_size: Balance,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl SimpleDeposit {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(deposit_size: Balance) -&gt; Self {&#xD;&#xA;            Self { total_deposited: 0,&#xD;&#xA;                   deposit_size: deposit_size,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn balance(&amp;self) -&gt; Balance {&#xD;&#xA;            self.total_deposited&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message, payable)]&#xD;&#xA;        pub fn deposit(&amp;mut self) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            if self.env().transferred_value() != self.deposit_size {&#xD;&#xA;                return Err(Error::InvalidDepositSize);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            self.total_deposited += self.env().transferred_value();&#xD;&#xA;&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;        use ink_lang as ink;&#xD;&#xA;        use ink_lang::codegen::Env;&#xD;&#xA;&#xD;&#xA;        use ink_env::test::set_caller as set_caller;&#xD;&#xA;        use ink_env::test::set_value_transferred as set_value_transferred;&#xD;&#xA;&#xD;&#xA;        fn bob_account() -&gt; AccountId {&#xD;&#xA;            ink_env::test::default_accounts::&lt;ink_env::DefaultEnvironment&gt;().bob&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn constructor() {&#xD;&#xA;            let simple_deposit = SimpleDeposit::new(15);&#xD;&#xA;&#xD;&#xA;            assert_eq!(simple_deposit.total_deposited, 0);&#xD;&#xA;            assert_eq!(simple_deposit.deposit_size, 15);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn deposit() {&#xD;&#xA;            let mut simple_deposit = SimpleDeposit::new(15);&#xD;&#xA;            let balance_before = simple_deposit.env().balance();&#xD;&#xA;&#xD;&#xA;            set_caller::&lt;Environment&gt;(bob_account());&#xD;&#xA;            set_value_transferred::&lt;ink_env::DefaultEnvironment&gt;(15);&#xD;&#xA;            let res = simple_deposit.deposit();&#xD;&#xA;            assert!(res.is_ok());&#xD;&#xA;&#xD;&#xA;            let balance_after = simple_deposit.env().balance();&#xD;&#xA;&#xD;&#xA;            assert_ne!(balance_before, balance_after);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Sorry, I haven't searched the substrate.stackexchange yet (lack of time, maybe, will do it later).&#xD;&#xA;&#xD;&#xA;Thanks in advance for any advices and suggestions!&#xD;&#xA;&#xD;&#xA;here is the link to the gist on GitHub:&#xD;&#xA;&#xD;&#xA;https://gist.github.com/vni/fb897f32244e8ff6931b286bb926a191#file-substrate-simple_deposit-ink-rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="14859" PostHistoryTypeId="24" PostId="3951" RevisionGUID="2e09edf6-23c8-4290-be61-e2a83ee4cc1a" CreationDate="2022-07-27T11:55:02.303" Comment="Proposed by 1951 approved by 34 edit id of 253" ContentLicense="CC BY-SA 4.0" />
  <row Id="14860" PostHistoryTypeId="2" PostId="3959" RevisionGUID="9abd6d5c-0e81-4139-870b-f64e4a9f1f48" CreationDate="2022-07-27T12:06:18.510" UserId="567" Text="Seems like `set_value_transferred` set the value transferred from the caller but [does not update the balances][1]&#xD;&#xA;&#xD;&#xA;I could reproduce with this test on the [contract-trasnfer example][2] in ink repo:&#xD;&#xA;&#xD;&#xA;    #[ink::test]&#xD;&#xA;    fn test_transferred_value() {&#xD;&#xA;        // given&#xD;&#xA;        let accounts = default_accounts();&#xD;&#xA;        let mut give_me = create_contract(100);&#xD;&#xA;&#xD;&#xA;        // when&#xD;&#xA;        // Push the new execution context which sets Eve as caller and&#xD;&#xA;        // the `mock_transferred_value` as the value which the contract&#xD;&#xA;        // will see as transferred to it.&#xD;&#xA;        set_sender(accounts.eve);&#xD;&#xA;        give_me.give_me(20);&#xD;&#xA;&#xD;&#xA;        ink_env::test::set_value_transferred::&lt;ink_env::DefaultEnvironment&gt;(10);&#xD;&#xA;&#xD;&#xA;        assert_eq!(get_balance(accounts.eve), 20);&#xD;&#xA;&#xD;&#xA;        give_me.was_it_ten();&#xD;&#xA;&#xD;&#xA;        // Panic - Should be 10&#xD;&#xA;        assert_eq!(get_balance(accounts.eve), 10);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/268e80a99b19af93d13fc904b20ee69f3ac1f243/crates/engine/src/test_api.rs#L257&#xD;&#xA;  [2]: https://github.com/paritytech/ink/blob/master/examples/contract-transfer/lib.rs&#xD;&#xA;&#xD;&#xA;You can open an issue in ink! repo " ContentLicense="CC BY-SA 4.0" />
  <row Id="14862" PostHistoryTypeId="2" PostId="3960" RevisionGUID="4469927e-aef4-4867-9455-6218ff285234" CreationDate="2022-07-27T12:50:07.750" UserId="479" Text="at the moment I struggle a bit with the question of &quot;How to benchmark the Grandpa pallet&quot;. Like it seems it's not possible to auto-generate weights at the moment (see here: https://github.com/paritytech/substrate/issues/7383) and I guess just using the default weights is not really an option if we plan to use this in production (especially if we have to assume that our hardware spec isn't matching the default spec). Apart from that we also use a custom implementation for offense reporting and pass it to the grandpa instance in our runtime.&#xD;&#xA;&#xD;&#xA;Now to my actual question: Do I have to write my own benchmark for the grandpa pallet in this case and generate the weights with that? We already did this for the session pallet.&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="14864" PostHistoryTypeId="1" PostId="3960" RevisionGUID="4469927e-aef4-4867-9455-6218ff285234" CreationDate="2022-07-27T12:50:07.750" UserId="479" Text="How to benchmark pallet Grandpa?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14865" PostHistoryTypeId="3" PostId="3960" RevisionGUID="4469927e-aef4-4867-9455-6218ff285234" CreationDate="2022-07-27T12:50:07.750" UserId="479" Text="|benchmarking|grandpa|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14866" PostHistoryTypeId="5" PostId="3945" RevisionGUID="8c2dcde6-9f56-4fda-a2c9-aacb762a384d" CreationDate="2022-07-27T13:27:07.527" UserId="45" Comment="capitalization" Text="Windows and macOS are being mentioned a few times on docs.substrate.io, but the Substrate CI does not run tests on there.  &#xD;&#xA;Now my question; what are the officially supported OS?  &#xD;&#xA;With &quot;officially supported&quot; I mean that its a safe choice for validators." ContentLicense="CC BY-SA 4.0" />
  <row Id="14867" PostHistoryTypeId="5" PostId="3947" RevisionGUID="d1a3ce07-ec3f-4432-bceb-c649bf270c84" CreationDate="2022-07-27T13:28:43.140" UserId="45" Comment="grammar, punctuation and capitalization (macOS)" Text="The only &quot;safe&quot; choice is Linux. As you already mentioned, we only test on Linux, and most validators also run on Linux. For macOS, we only ensure that it compiles because a lot of developers are running on macOS. We also have some performance optimization around Wasm execution that is only for Linux/macOS. Windows is not really supported. We probably compile on Windows, but not that much more support is provided. The Linux subsystem should be used on Windows to get the best compatibility. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14868" PostHistoryTypeId="2" PostId="3961" RevisionGUID="120cf3e4-983a-4ffc-b057-8d772bf5e6b4" CreationDate="2022-07-27T14:04:05.790" UserId="494" Text="`polkadot-launch` is being deprecated in favor of [zombienet](https://github.com/paritytech/zombienet).&#xD;&#xA;&#xD;&#xA;You can find some examples on [polkadot](https://github.com/paritytech/polkadot/tree/master/zombienet_tests) and [cumulus](https://github.com/paritytech/cumulus/tree/master/zombienet_tests), although some might be depending on Parity internal infrastructure and you won't necessarily get the full picture." ContentLicense="CC BY-SA 4.0" />
  <row Id="14870" PostHistoryTypeId="2" PostId="3962" RevisionGUID="980016d4-0599-4824-8c91-ae38a4842d2a" CreationDate="2022-07-27T17:23:17.163" UserId="2936" Text="In particular the Initializing Genesis block/state is missing from the output along with some other details.&#xD;&#xA;&#xD;&#xA;Tutorial:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/get-started/simulate-network/ &#xD;&#xA;&#xD;&#xA;Start Alice node:&#xD;&#xA;&#xD;&#xA;       % ./target/release/node-template \                                               &#xD;&#xA;        --base-path /tmp/alice \&#xD;&#xA;        --chain local \&#xD;&#xA;        --alice \&#xD;&#xA;        --port 30333 \&#xD;&#xA;        --ws-port 9945 \&#xD;&#xA;        --rpc-port 9933 \&#xD;&#xA;        --node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;        --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;        --validator&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    2022-07-27 13:15:15 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;    2022-07-27 13:15:15 creating instance on iface 192.168.7.213    &#xD;&#xA;    2022-07-27 13:15:20  Idle (0 peers), best: #0 (0x004c…08f7), finalized #0 (0x004c…08f7), ⬇ 0 ⬆ 0    &#xD;&#xA;    2022-07-27 13:15:25  Idle (0 peers), best: #0 (0x004c…08f7), finalized #0 (0x004c…08f7), ⬇ 0 ⬆ 0    &#xD;&#xA;    2022-07-27 13:15:30  Idle (0 peers), best: #0 (0x004c…08f7), finalized #0 (0x004c…08f7), ⬇ 0 ⬆ 0    &#xD;&#xA;    2022-07-27 13:15:35  Idle (0 peers), best: #0 (0x004c…08f7), finalized #0 (0x004c…08f7), ⬇ 0 ⬆ 0    &#xD;&#xA;    2022-07-27 13:15:35 ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Timeout }    &#xD;&#xA;    2022-07-27 13:15:40  Idle (0 peers), best: #0 (0x004c…08f7), finalized #0 (0x004c…08f7), ⬇ 0 ⬆ 0    &#xD;&#xA;    2022-07-27 13:15:45  Idle (0 peers), best: #0 (0x004c…08f7), finalized #0 (0x004c…08f7), ⬇ 0 ⬆ 0    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Expected similar output from tutorial:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wqD9C.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="14872" PostHistoryTypeId="1" PostId="3962" RevisionGUID="980016d4-0599-4824-8c91-ae38a4842d2a" CreationDate="2022-07-27T17:23:17.163" UserId="2936" Text="Simulate network tutorial produces output that is different from the tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="14873" PostHistoryTypeId="3" PostId="3962" RevisionGUID="980016d4-0599-4824-8c91-ae38a4842d2a" CreationDate="2022-07-27T17:23:17.163" UserId="2936" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14874" PostHistoryTypeId="2" PostId="3963" RevisionGUID="5b5cc183-f58a-4b76-8915-75629e0fcae7" CreationDate="2022-07-27T18:19:39.140" UserId="590" Text="It seems that I can use a signed extension anywhere I can use an unsigned transaction.&#xD;&#xA;&#xD;&#xA;Can you please explain why I would implement one over the other?&#xD;&#xA;&#xD;&#xA;How does the transaction lifecycle differ?&#xD;&#xA;&#xD;&#xA;The only reason I would imagine I would use an unsigned transaction would be when the submitter does not have an account." ContentLicense="CC BY-SA 4.0" />
  <row Id="14876" PostHistoryTypeId="1" PostId="3963" RevisionGUID="5b5cc183-f58a-4b76-8915-75629e0fcae7" CreationDate="2022-07-27T18:19:39.140" UserId="590" Text="Unsigned Transactions vs Signed Extensions" ContentLicense="CC BY-SA 4.0" />
  <row Id="14877" PostHistoryTypeId="3" PostId="3963" RevisionGUID="5b5cc183-f58a-4b76-8915-75629e0fcae7" CreationDate="2022-07-27T18:19:39.140" UserId="590" Text="|transactions|signed-extensions|unsigned|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14878" PostHistoryTypeId="2" PostId="3964" RevisionGUID="106cdbd8-5fb5-4a31-8ec0-d7c8bcfc1dd4" CreationDate="2022-07-27T18:22:15.437" UserId="590" Text="I also notice that implementing feeless transaction are [recommended on stack-exchange][1] using an unsigned transactions.&#xD;&#xA;&#xD;&#xA;Why is it better to implement feeless transactions with an unsigned transaction over SignedExtension with Pays::No?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/questions/1713/how-we-can-implement-gasless-feeless-transaction/1715#1715" ContentLicense="CC BY-SA 4.0" />
  <row Id="14880" PostHistoryTypeId="1" PostId="3964" RevisionGUID="106cdbd8-5fb5-4a31-8ec0-d7c8bcfc1dd4" CreationDate="2022-07-27T18:22:15.437" UserId="590" Text="feeless transactions unsiged vs signed extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="14881" PostHistoryTypeId="3" PostId="3964" RevisionGUID="106cdbd8-5fb5-4a31-8ec0-d7c8bcfc1dd4" CreationDate="2022-07-27T18:22:15.437" UserId="590" Text="|transactions|signed-extensions|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14882" PostHistoryTypeId="2" PostId="3965" RevisionGUID="03b571b8-6894-4cbe-830f-b7ccfa9a7ab2" CreationDate="2022-07-27T18:27:53.563" UserId="590" Text="How do I remove duplications of transactions from the transaction pool? I noticed some return a tag in a signed SignedExtension [TransactionValidity][1] provides field. However, it is not clear to me how this works.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_runtime/transaction_validity/struct.ValidTransaction.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="14884" PostHistoryTypeId="1" PostId="3965" RevisionGUID="03b571b8-6894-4cbe-830f-b7ccfa9a7ab2" CreationDate="2022-07-27T18:27:53.563" UserId="590" Text="SignedExtension Transaction Pool Deduplication" ContentLicense="CC BY-SA 4.0" />
  <row Id="14885" PostHistoryTypeId="3" PostId="3965" RevisionGUID="03b571b8-6894-4cbe-830f-b7ccfa9a7ab2" CreationDate="2022-07-27T18:27:53.563" UserId="590" Text="|transactions|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14888" PostHistoryTypeId="2" PostId="3967" RevisionGUID="c2e9f20d-8764-460b-b38f-3282437b6a68" CreationDate="2022-07-27T21:36:43.507" UserId="172" Text="I understand that the relay chain needs to store proofs for a certain amount of final blocks _if a dispute occurs_. But it's not clear to me what the implementation decisions were for explicitly writing certain things to Polkadot's runtime storage (such as the bit fields for availability and the `onChainVotes` from the `para_inherent` pallet). &#xD;&#xA;&#xD;&#xA;Why is writing this to Polkadot's runtime storage really necessary if it's only needed per block? Assuming there's a good reason, why can't it work outside the runtime?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14890" PostHistoryTypeId="1" PostId="3967" RevisionGUID="c2e9f20d-8764-460b-b38f-3282437b6a68" CreationDate="2022-07-27T21:36:43.507" UserId="172" Text="What data does the Polkadot relay chain really need to store for parachain block validation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14891" PostHistoryTypeId="3" PostId="3967" RevisionGUID="c2e9f20d-8764-460b-b38f-3282437b6a68" CreationDate="2022-07-27T21:36:43.507" UserId="172" Text="|polkadot|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14892" PostHistoryTypeId="5" PostId="2991" RevisionGUID="69eb87f6-831c-4699-b3bc-4f949cbbc292" CreationDate="2022-07-27T22:03:06.267" UserId="16" Comment="Syntax highlighting and formatting" Text="I am trying to call a contract read which is deployed on the Azero smartnet using @polkadot/api-contract following https://polkadot.js.org/docs/api-contract. Here is my current code.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { ApiPromise, HttpProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;import { ContractPromise } from &quot;@polkadot/api-contract&quot;;&#xD;&#xA;&#xD;&#xA;import { abi } from &quot;./psp34-metadata&quot;;&#xD;&#xA;&#xD;&#xA;const main = async () =&gt; {&#xD;&#xA;  const wsProvider = new HttpProvider(&quot;https://rpc-smartnet.test.azero.dev/&quot;);&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;  const nftCollectionAddress = `5FoLoL5mYXpBwxJUMDo3tcwh5VTrzaz3LvbA4B7LiivjXV7C`;&#xD;&#xA;&#xD;&#xA;  // Construct our Code helper. The abi is an Abi object, an unparsed JSON string&#xD;&#xA;  // or the raw JSON data (after doing a JSON.parse). The wasm is either a hex&#xD;&#xA;  // string (0x prefixed), an Uint8Array or a Node.js Buffer object&#xD;&#xA;  const contract = new ContractPromise(api, abi, nftCollectionAddress);&#xD;&#xA;  &#xD;&#xA;  const value = 0; // only useful on isPayable messages&#xD;&#xA;&#xD;&#xA;  const gasLimit = 3000n * 1000000n;&#xD;&#xA;&#xD;&#xA;  const senderAddress = `5CXCzYooepihLkWNbFQ9VJieLSWgguTEPe6eWrDM8wAytCea`; // * My SubWallet address&#xD;&#xA;&#xD;&#xA;  const tokenId = 1; // Token ID of NFT Im trying to read&#xD;&#xA;&#xD;&#xA;  const { gasConsumed, result, output } = await contract.query[&#xD;&#xA;    &quot;psp34Traits::tokenUri&quot;&#xD;&#xA;  ](senderAddress, { value, gasLimit }, value);&#xD;&#xA;&#xD;&#xA;  console.log({ gasConsumed, result, output });&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;main();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I create the ContractPromise and can console.log the various methods on contract.query, but when i try to call `psp34Traits::tokenUri` I receive the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Enum(Err):: Enum(Module):: Struct: failed on error: u8:: u8: Input too large. Found input with 26 bits, expected 8&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the exact message method from the deployed contract in ink! I am calling from Node&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;fn token_uri(&#xD;&#xA;    &amp;self,&#xD;&#xA;    token_id: u64&#xD;&#xA;) -&gt; String {&#xD;&#xA;    let value = self.get_attribute(Id::U8(0), String::from(&quot;baseURI&quot;).into_bytes());&#xD;&#xA;    let mut token_uri = String::from_utf8(value.unwrap()).unwrap();&#xD;&#xA;    token_uri = token_uri + &amp;token_id.to_string() + &amp;String::from(&quot;.json&quot;);&#xD;&#xA;    return token_uri;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is also the full error log. Any tips to point me in the right direction would be greatly appreciated&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-06-01 01:12:05        RPC-CORE: call(callRequest: ContractCallRequest, at?: BlockHash): ContractExecResult:: createType(ContractExecResult):: Struct: failed on result: {&quot;_enum&quot;:{&quot;Ok&quot;:&quot;ContractExecResultOk&quot;,&quot;Err&quot;:&quot;ContractExecResultErr&quot;}}:: Enum(Err):: Enum(Module):: Struct: failed on error: u8:: u8: Input too large. Found input with 26 bits, expected 8&#xD;&#xA;/Users/user/Work/azero/polkadotjs/node_modules/@polkadot/types-create/cjs/create/type.js:70&#xD;&#xA;    firstError = new Error(`createType(${type}):: ${error.message}`);&#xD;&#xA;                 ^&#xD;&#xA;Error: createType(ContractExecResult):: Struct: failed on result: {&quot;_enum&quot;:{&quot;Ok&quot;:&quot;ContractExecResultOk&quot;,&quot;Err&quot;:&quot;ContractExecResultErr&quot;}}:: Enum(Err):: Enum(Module):: Struct: failed on error: u8:: u8: Input too large. Found input with 26 bits, expected 8&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14893" PostHistoryTypeId="5" PostId="3244" RevisionGUID="6280c673-9b2d-4524-98b8-87be02c27a90" CreationDate="2022-07-27T22:06:21.013" UserId="16" Comment="formatting" Text="I am trying to use the `ContractPromise` from `@polkadot/api-contract` to interact with a published smart contract on the moonriver network but when I try and create a new `ContractPromise` object I get the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: createType(ContractProjectInfo):: Struct: Unable to map&quot; + abi string + &quot;array to object with known keys source, contract&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm not entirely sure why this is because the ABI and contract address seem to be correct.&#xD;&#xA;&#xD;&#xA;The code I am using to test it out is here:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;import { ContractPromise } from &quot;@polkadot/api-contract&quot;;&#xD;&#xA;import { ksmContractABI } from &quot;./consts&quot;;&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;  console.log(&quot;start&quot;);&#xD;&#xA;  const ksmContractAddress = &quot;0xFfc7780C34B450d917d557E728f033033CB4fA8C&quot;;&#xD;&#xA;  const wsProvider = new WsProvider(&quot;wss://kusama-rpc.polkadot.io&quot;);&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;  const contract = new ContractPromise(&#xD;&#xA;    api,&#xD;&#xA;    JSON.stringify(ksmContractABI),&#xD;&#xA;    ksmContractAddress&#xD;&#xA;  );&#xD;&#xA;  console.log(&quot;done&quot;);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;the contract can be seen here: https://moonriver.moonscan.io/address/0xFfc7780C34B450d917d557E728f033033CB4fA8C&#xD;&#xA;&#xD;&#xA;and the code from which I generated my abi can be found here: https://github.com/mixbytes/lido-dot-ksm/blob/main/contracts/Lido.sol" ContentLicense="CC BY-SA 4.0" />
  <row Id="14895" PostHistoryTypeId="2" PostId="3968" RevisionGUID="fb1381c2-37fc-467f-af64-f4d243847482" CreationDate="2022-07-28T01:15:12.113" UserId="251" Text="What's your definition of the duplication.&#xD;&#xA;&#xD;&#xA;Here is an [example](https://github.dev/paritytech/substrate/blob/dddfed3d9260cf03244f15ba3db4edf9af7467e9/frame/examples/basic/src/lib.rs#L758-L759).&#xD;&#xA;As you can see there's a matcher to analyze the call struct.&#xD;&#xA;&#xD;&#xA;Then you could do something like this:&#xD;&#xA;```rust&#xD;&#xA;Some(Call::set_dummy { maybe_a_hash, .. }) {&#xD;&#xA;    if xxx.contains(maybe_a_hash) {&#xD;&#xA;        return InvalidTransaction::Custom(&lt;Error&lt;T&gt;&gt;::AlredyExisted.as_u8()).into()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14897" PostHistoryTypeId="50" PostId="3479" RevisionGUID="fce0c34c-9118-45d9-b82b-6ea4cc9dcb21" CreationDate="2022-07-28T05:02:35.190" UserId="-1" />
  <row Id="14898" PostHistoryTypeId="5" PostId="3882" RevisionGUID="d2d687a8-70f8-4e7a-966e-31f23a48c053" CreationDate="2022-07-28T05:10:50.470" UserId="1789" Comment="added 4 characters in body; edited tags; edited title" Text="I can deploy a few Ethereum smart contracts into my parachain via Hardhat. &#xD;&#xA;&#xD;&#xA;But those are only smaller contracts. All the big contracts, the upgradeable contracts, cannot be deployed with error message &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ProviderError: submit transaction to pool failed: &#xD;&#xA;Pool(InvalidTransaction(InvalidTransaction::ExhaustsResources))&#xD;&#xA;```&#xD;&#xA;Reference: https://wiki.polkadot.network/docs/maintain-errors. &#xD;&#xA;&#xD;&#xA;my hardhat.config.ts has gas limit 4100000, which should be enough... right? I mean... &#xD;&#xA;- what is too big gas limit, and what is too small?&#xD;&#xA;&#xD;&#xA;I suspect my parachain has certain limitations on deployment sizes... &#xD;&#xA;&#xD;&#xA;- Where is that set? &#xD;&#xA;- How can I increase such limitation? " ContentLicense="CC BY-SA 4.0" />
  <row Id="14899" PostHistoryTypeId="4" PostId="3882" RevisionGUID="d2d687a8-70f8-4e7a-966e-31f23a48c053" CreationDate="2022-07-28T05:10:50.470" UserId="1789" Comment="added 4 characters in body; edited tags; edited title" Text="deploy solidity ethereum to parachain with ExhaustsResources error" ContentLicense="CC BY-SA 4.0" />
  <row Id="14900" PostHistoryTypeId="6" PostId="3882" RevisionGUID="d2d687a8-70f8-4e7a-966e-31f23a48c053" CreationDate="2022-07-28T05:10:50.470" UserId="1789" Comment="added 4 characters in body; edited tags; edited title" Text="|parachain|frontier|evm|ethereum|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14902" PostHistoryTypeId="10" PostId="2615" RevisionGUID="2b5cf06d-0057-4f8c-9a91-1ae2b4776a41" CreationDate="2022-07-28T07:00:12.350" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[2613],&quot;Voters&quot;:[{&quot;Id&quot;:16,&quot;DisplayName&quot;:&quot;Alexander Theißen&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="14903" PostHistoryTypeId="2" PostId="3969" RevisionGUID="8e2a013f-54c0-483c-bf17-83ac9cb266ed" CreationDate="2022-07-28T07:23:58.267" UserId="2025" Text="Have a look to Bruno's answer [here](https://substrate.stackexchange.com/questions/2179/why-unsigned-extrinsics). It covers both rationale and transaction lifecycle for unsigned extrinsics." ContentLicense="CC BY-SA 4.0" />
  <row Id="14905" PostHistoryTypeId="2" PostId="3970" RevisionGUID="bda3c67a-3114-465d-8e3a-5b46f557ea61" CreationDate="2022-07-28T08:12:09.543" UserId="2673" Text="Turns out, there's a really simple solution to this problem. The benchmarking framework allows to introduce additional trait bounds in a `where_clause` block. So, in order to be able to create and mint assets, I just need to add the following code:&#xD;&#xA;```rust&#xD;&#xA;benchmarks! {&#xD;&#xA;    where_clause {&#xD;&#xA;        where&#xD;&#xA;            T::Assets: Create&lt;T::AssetId&gt; + Mutate&lt;T::AssetId&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14907" PostHistoryTypeId="5" PostId="3882" RevisionGUID="22373642-baab-4583-ab9e-9141426afdf9" CreationDate="2022-07-28T08:20:01.370" UserId="1789" Comment="added 751 characters in body" Text="I can deploy a few Ethereum smart contracts into my parachain via Hardhat. &#xD;&#xA;&#xD;&#xA;But those are only normal contracts. All the upgradeable contracts and ERC777 contract cannot be deployed with the ExhaustsResources error: &#xD;&#xA;```&#xD;&#xA;ProviderError: submit transaction to pool failed: &#xD;&#xA;Pool(InvalidTransaction(InvalidTransaction::ExhaustsResources))&#xD;&#xA;```&#xD;&#xA;Reference: https://wiki.polkadot.network/docs/maintain-errors. &#xD;&#xA;&#xD;&#xA;my hardhat.config.ts&#xD;&#xA;```&#xD;&#xA;const config: HardhatUserConfig = {&#xD;&#xA;  defaultNetwork: &quot;hardhat&quot;,&#xD;&#xA;  networks: {&#xD;&#xA;    parachain: {&#xD;&#xA;      url: `${PARACHAIN_CHAIN_URL}`,&#xD;&#xA;      chainId: 1345,&#xD;&#xA;      //gasPrice:...//causes Payment error&#xD;&#xA;      gas: 25e6,//these also work: 7e6, 2e6&#xD;&#xA;      accounts: {&#xD;&#xA;        mnemonic: `${MNEMONIC}`,&#xD;&#xA;        path: &quot;m/44'/60'/0'/0&quot;,&#xD;&#xA;        initialIndex: 0,&#xD;&#xA;        count: 20,&#xD;&#xA;        passphrase: &quot;&quot;,&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA;    rinkeby: {&#xD;&#xA;      url: `https://rinkeby.infura.io/v3/${INFURA_API_KEY}`,&#xD;&#xA;      chainId: 4,&#xD;&#xA;      gasPrice: ethers.utils.parseUnits(&quot;20&quot;, &quot;gwei&quot;).toNumber(),&#xD;&#xA;      gas: 25e6,&#xD;&#xA;      accounts: [`0x${OWNERPK}`, `0x${USER1PK}`, `0x${USER2PK}`],&#xD;&#xA;    },&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;I can run the same deployment script to deploy contracts to Rinkeby network, but why the same script cannot deploy upgradeable and ERC777 contracts to my parachain???&#xD;&#xA;&#xD;&#xA;I suspect my parachain has certain limitations on deployment sizes... &#xD;&#xA;&#xD;&#xA;- Where is that set? &#xD;&#xA;- How can I increase such limitation? " ContentLicense="CC BY-SA 4.0" />
  <row Id="14908" PostHistoryTypeId="2" PostId="3971" RevisionGUID="4a9ed248-d1fb-4275-ad5b-05aad3d3007a" CreationDate="2022-07-28T08:59:50.080" UserId="351" Text="This article will answer the question in great details.https://polkadot.network/blog/polkadot-v1-0-sharding-and-economic-security/" ContentLicense="CC BY-SA 4.0" />
  <row Id="14910" PostHistoryTypeId="2" PostId="3972" RevisionGUID="a3d95ba0-fde8-43b3-abd7-3bcc7a533b40" CreationDate="2022-07-28T10:29:33.603" UserId="354" Text="I want to change inflation rate of a substrate based chain, the method for inflation is written in `frame/staking/reward-curve` and it being initialised in `bin/node/runtime/lib.rs` &#xD;&#xA;&#xD;&#xA;    pallet_staking_reward_curve::build! {&#xD;&#xA;    	const REWARD_CURVE: PiecewiseLinear&lt;'static&gt; = curve!(&#xD;&#xA;    		min_inflation: 0_025_000,&#xD;&#xA;    		max_inflation: 0_100_000,&#xD;&#xA;    		ideal_stake: 0_500_000,&#xD;&#xA;    		falloff: 0_050_000,&#xD;&#xA;    		max_piece_count: 40,&#xD;&#xA;    		test_precision: 0_005_000,&#xD;&#xA;    	);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So i changed the `min_inflation and max_inflation` in runtime/lib.rs but the inflation rate does change. What I want to ask is am I doing something wrong or is it not the right way to change the inflation rate." ContentLicense="CC BY-SA 4.0" />
  <row Id="14912" PostHistoryTypeId="1" PostId="3972" RevisionGUID="a3d95ba0-fde8-43b3-abd7-3bcc7a533b40" CreationDate="2022-07-28T10:29:33.603" UserId="354" Text="How to change inflation rate of a substrate based chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14913" PostHistoryTypeId="3" PostId="3972" RevisionGUID="a3d95ba0-fde8-43b3-abd7-3bcc7a533b40" CreationDate="2022-07-28T10:29:33.603" UserId="354" Text="|substrate-node|polkadot|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14914" PostHistoryTypeId="2" PostId="3973" RevisionGUID="acae1e5a-1124-44ad-a0b6-bdc76ed6c004" CreationDate="2022-07-28T11:20:19.293" UserId="566" Text="I'm having trouble doing an RPC call using polkadot.js. &#xD;&#xA;&#xD;&#xA;My contract is here: https://github.com/kanishkatn/ink-test/tree/master/flipper&#xD;&#xA;&#xD;&#xA;I tried making the RPC call using the selector from metadata.json. But, it always throws this error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  gasConsumed: 0&#xD;&#xA;  gasRequired: 0&#xD;&#xA;  storageDeposit: {&#xD;&#xA;    Charge: 0&#xD;&#xA;  }&#xD;&#xA;  debugMessage: &#xD;&#xA;  result: {&#xD;&#xA;    Err: {&#xD;&#xA;      Module: {&#xD;&#xA;        index: 7&#xD;&#xA;        error: 0x02000000&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I also wrote my own client, it throws the same error as well. My client is here: https://github.com/kanishkatn/ink-test/tree/master/client&#xD;&#xA;&#xD;&#xA;The `instantiate` call works properly on polkadot.js/apps as well as contracts-ui. I'm able to call other methods in contracts-ui as well. So, clearly I haven't understood how the selector and the data works in `call`.&#xD;&#xA;&#xD;&#xA;What did I do wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14916" PostHistoryTypeId="1" PostId="3973" RevisionGUID="acae1e5a-1124-44ad-a0b6-bdc76ed6c004" CreationDate="2022-07-28T11:20:19.293" UserId="566" Text="How to do contract RPC call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14917" PostHistoryTypeId="3" PostId="3973" RevisionGUID="acae1e5a-1124-44ad-a0b6-bdc76ed6c004" CreationDate="2022-07-28T11:20:19.293" UserId="566" Text="|polkadot-js|ink|pallet-contracts|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14918" PostHistoryTypeId="2" PostId="3974" RevisionGUID="5b5b3e93-0ec6-4f2e-a570-baba63143709" CreationDate="2022-07-28T11:59:44.480" UserId="2884" Text="I'm trying to enforce a &quot;same native token&quot; rule for the relay and all future parachains in my local environment. For this, I must first configure my parachain to accept teleports from a relay account to a parachain account.&#xD;&#xA;&#xD;&#xA;I saw that natively the cumulus template parachain has teleported disabled:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct XcmConfig;&#xD;&#xA;impl xcm_executor::Config for XcmConfig {&#xD;&#xA;	...&#xD;&#xA;	type IsTeleporter = (); // Teleporting is disabled.&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So I enabled teleports from the relay chain (0.9.20 fork) by coding the following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct XcmConfig;&#xD;&#xA;impl xcm_executor::Config for XcmConfig {&#xD;&#xA;	...&#xD;&#xA;	type IsTeleporter = (xcm_builder::Case&lt;DotFromPolkadot&gt;,);&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DotLocation: MultiLocation = MultiLocation::parent();&#xD;&#xA;	pub const Polkadot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(DotLocation::get()) });&#xD;&#xA;	pub const DotFromPolkadot: (MultiAssetFilter, MultiLocation) = (Polkadot::get(), DotLocation);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Parachain recognizes the relay chain as a teleporter.&#xD;&#xA;pub type TrustedTeleporters = (xcm_builder::Case&lt;DotFromPolkadot&gt;,);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From what I understood the actual execution of teleporting is already implemented in the xcm pallet, and all I have to do is configure it in this xcm_config.rs inside the runtime folder.&#xD;&#xA;&#xD;&#xA;But when running a teleport using the frontend of polkador.js.apps, it makes the runtime panic with the following message:&#xD;&#xA;&#xD;&#xA;```zsh&#xD;&#xA;2022-07-28 11:22:24.026 ERROR tokio-runtime-worker runtime: [Parachain] panicked at 'assertion failed: `(left == right)`&#xD;&#xA;  left: `0x01992e7b9de1178b594c0a24dc30f820d61caad33f9fda514c93c9400426d1cd`,&#xD;&#xA; right: `0x0000000000000000000000000000000000000000000000000000000000000000`', /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/4bbedb3/pallets/parachain-system/src/lib.rs:774:9    &#xD;&#xA;2022-07-28 11:22:24.026  WARN tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x1bd944 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;. Dropping.    &#xD;&#xA;2022-07-28 11:22:24.026 ERROR tokio-runtime-worker runtime: [Parachain] panicked at 'set_validation_data inherent needs to be present in every block!', /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/4bbedb3/pallets/parachain-system/src/lib.rs:143:13    &#xD;&#xA;2022-07-28 11:22:24.026  WARN tokio-runtime-worker aura: [Parachain] Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x1bd944 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is this because the actual teleporting logic is not implemented? or what do I have to do to enable this? Any help or direction would be appreciated.&#xD;&#xA;&#xD;&#xA;Also if you know resources on how to implement having the same token shared between all parachains and relay chain it would be a big help!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14920" PostHistoryTypeId="1" PostId="3974" RevisionGUID="5b5b3e93-0ec6-4f2e-a570-baba63143709" CreationDate="2022-07-28T11:59:44.480" UserId="2884" Text="Runtime panic when teleporting dot from relay to parachain locally" ContentLicense="CC BY-SA 4.0" />
  <row Id="14921" PostHistoryTypeId="3" PostId="3974" RevisionGUID="5b5b3e93-0ec6-4f2e-a570-baba63143709" CreationDate="2022-07-28T11:59:44.480" UserId="2884" Text="|parachain|xcm|wasm|token|panic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14922" PostHistoryTypeId="2" PostId="3975" RevisionGUID="a1d2abd3-6fb9-4c05-85fc-418c3452543d" CreationDate="2022-07-28T12:42:30.767" UserId="2166" Text="Looks like your gasLimit is too low. Increase gas limit or simply set it to -1 which will use max. gas available." ContentLicense="CC BY-SA 4.0" />
  <row Id="14924" PostHistoryTypeId="2" PostId="3976" RevisionGUID="bdc6c2d0-c813-495d-bbd4-1199e491798e" CreationDate="2022-07-28T12:45:43.407" UserId="379" Text="When trying to run try-runtime I do not get any logs. I also received an error in my local node:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-07-28 14:42:57 Accepting new connection, 1/100&#xD;&#xA;2022-07-28 14:42:57 WS error: i/o error: Transport endpoint is not connected (os error 107); terminate connection 14&#xD;&#xA;2022-07-28 14:42:57 Accepting new connection, 1/100&#xD;&#xA;2022-07-28 14:42:57 WS error: i/o error: Transport endpoint is not connected (os error 107); terminate connection 15&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Output from try-runtime&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace cargo run --release --features=try-runtime try-runtime --execution Native on-runtime-upgrade live --uri ws://localhost:9944&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Finished release [optimized] target(s) in 1.32s&#xD;&#xA;     Running `target/release/tfchain try-runtime --execution Native on-runtime-upgrade live --uri 'ws://localhost:9944'`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My node is on version `polkadot-0.9.24`, I also saw a similar issue here on stackexchange as well as on github (https://github.com/paritytech/substrate/issues/11691) But I am not sure how to fix the problem where I don't have any output logs." ContentLicense="CC BY-SA 4.0" />
  <row Id="14926" PostHistoryTypeId="1" PostId="3976" RevisionGUID="bdc6c2d0-c813-495d-bbd4-1199e491798e" CreationDate="2022-07-28T12:45:43.407" UserId="379" Text="try-runtime no output" ContentLicense="CC BY-SA 4.0" />
  <row Id="14927" PostHistoryTypeId="3" PostId="3976" RevisionGUID="bdc6c2d0-c813-495d-bbd4-1199e491798e" CreationDate="2022-07-28T12:45:43.407" UserId="379" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14928" PostHistoryTypeId="2" PostId="3977" RevisionGUID="77410c1f-3c1d-41cf-ae95-3f02cf033ae9" CreationDate="2022-07-28T13:07:52.043" UserId="1837" Text="I have been trying to implement a transaction queue which will store extrinsic call data and later execute it.&#xD;&#xA;&#xD;&#xA;## Transaction Queue&#xD;&#xA;This is how the queue looks like, which enqueue and dequeue call-data bytes (pallet u8, call u8, call params u8).&#xD;&#xA;`TransactionQueue: Vec&lt;u8&gt;` &#xD;&#xA;&#xD;&#xA;I tried to find an easy way to construct extrinsic from call bytes but failed. So I started to implement how subxt constructs extrinsic [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// dequeue transaction call data.&#xD;&#xA;let maybe_call_data = store.dequeue_item(&#xD;&#xA;    SledQueueKey::from_substrate_chain_id(chain_id),&#xD;&#xA;)?;&#xD;&#xA;if let Some(call_data) = maybe_call_data {&#xD;&#xA;    &#xD;&#xA;    let call_data = subxt::Encoded(call_data);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    // This is the steps to create encoded extrinsic which can be executed by rpc client&#xD;&#xA;    let account_nonce = if let Some(nonce) = signer.nonce() {&#xD;&#xA;        nonce&#xD;&#xA;    } else {&#xD;&#xA;        client&#xD;&#xA;            .rpc()&#xD;&#xA;            .system_account_next_index(signer.account_id())&#xD;&#xA;            .map_err(anyhow::Error::from)&#xD;&#xA;            .await?&#xD;&#xA;    };&#xD;&#xA;    // 1.Construct our custom additional/extra params.&#xD;&#xA;    let additional_and_extra_params = {&#xD;&#xA;        // Obtain spec version and transaction version from the runtime version of the client.&#xD;&#xA;        let runtime = client&#xD;&#xA;            .rpc()&#xD;&#xA;            .runtime_version(None)&#xD;&#xA;            .map_err(anyhow::Error::from)&#xD;&#xA;            .await?;&#xD;&#xA;        subxt::PolkadotExtrinsicParams::&lt;subxt::DefaultConfig&gt;::new(&#xD;&#xA;            runtime.spec_version,&#xD;&#xA;            runtime.transaction_version,&#xD;&#xA;            account_nonce,&#xD;&#xA;            *client.genesis(),&#xD;&#xA;            Default::default(),&#xD;&#xA;        )&#xD;&#xA;    };&#xD;&#xA;    // 2. Construct signature. This is compatible with the Encode impl&#xD;&#xA;    //    for SignedPayload (which is this payload of bytes that we'd like)&#xD;&#xA;    //    to sign. See:&#xD;&#xA;    //    https://github.com/paritytech/substrate/blob/9a6d706d8db00abb6ba183839ec98ecd9924b1f8/primitives/runtime/src/generic/unchecked_extrinsic.rs#L215)&#xD;&#xA;    let signature = {&#xD;&#xA;        let mut bytes = Vec::new();&#xD;&#xA;        call_data.encode_to(&amp;mut bytes);&#xD;&#xA;        additional_and_extra_params.encode_extra_to(&amp;mut bytes);&#xD;&#xA;        additional_and_extra_params&#xD;&#xA;            .encode_additional_to(&amp;mut bytes);&#xD;&#xA;        if bytes.len() &gt; 256 {&#xD;&#xA;            signer.sign(&amp;blake2_256(&amp;bytes))&#xD;&#xA;        } else {&#xD;&#xA;            signer.sign(&amp;bytes)&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;    // 3. Encode extrinsic, now that we have the parts we need. This is compatible&#xD;&#xA;    //    with the Encode impl for UncheckedExtrinsic (protocol version 4).&#xD;&#xA;    let extrinsic = {&#xD;&#xA;        let mut encoded_inner = Vec::new();&#xD;&#xA;        // &quot;is signed&quot; + transaction protocol version (4)&#xD;&#xA;        (0b10000000 + 4u8).encode_to(&amp;mut encoded_inner);&#xD;&#xA;        // from address for signature&#xD;&#xA;        signer.address().encode_to(&amp;mut encoded_inner);&#xD;&#xA;        // the signature bytes&#xD;&#xA;        signature.encode_to(&amp;mut encoded_inner);&#xD;&#xA;        // attach custom extra params&#xD;&#xA;        additional_and_extra_params&#xD;&#xA;            .encode_extra_to(&amp;mut encoded_inner);&#xD;&#xA;        // and now, call data&#xD;&#xA;        call_data.encode_to(&amp;mut encoded_inner);&#xD;&#xA;        // now, prefix byte length:&#xD;&#xA;        let len = Compact(&#xD;&#xA;            u32::try_from(encoded_inner.len())&#xD;&#xA;                .expect(&quot;extrinsic size expected to be &lt;4GB&quot;),&#xD;&#xA;        );&#xD;&#xA;        let mut encoded = Vec::new();&#xD;&#xA;        len.encode_to(&amp;mut encoded);&#xD;&#xA;        encoded.extend(encoded_inner);&#xD;&#xA;        encoded&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // encoded extinsic&#xD;&#xA;    let encoded_extrinsic = subxt::Encoded(extrinsic);&#xD;&#xA;&#xD;&#xA;    // watch_extrinsic submits and returns transaction subscription&#xD;&#xA;    let result = client&#xD;&#xA;        .rpc()&#xD;&#xA;        .watch_extrinsic(&amp;encoded_extrinsic)&#xD;&#xA;        .map_err(anyhow::Error::from)&#xD;&#xA;        .await;&#xD;&#xA;    let mut progress = match result {&#xD;&#xA;        Ok(d) =&gt; d,&#xD;&#xA;        Err(e) =&gt; {&#xD;&#xA;            tracing::debug!(&quot;extrinsic error : {:?}&quot;, e);&#xD;&#xA;            continue;&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Error.&#xD;&#xA;I tried to construct extrinsic as per the above code but it fails with `code:1002, message: Verification Error: Runtime error`.&#xD;&#xA;&#xD;&#xA;full error log&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;timestamp&quot;: &quot;2022-07-27T12:52:10.189639Z&quot;,&#xD;&#xA;  &quot;level&quot;: &quot;DEBUG&quot;,&#xD;&#xA;  &quot;message&quot;: &quot;extrinsic error : Rpc error: JSON-RPC call failed: RPC Call failed: code: 1002, message: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n    0: 0x39248 - &lt;unknown&gt;!rust_begin_unwind\n, data: Some(RawValue(\&quot;RuntimeApi(\\\&quot;Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\\\\nWASM backtrace:\\\\n\\\\n    0: 0x39248 - &lt;unknown&gt;!rust_begin_unwind\\\\n\\\&quot;)\&quot;))\n\nCaused by:\n    0: JSON-RPC call failed: RPC Call failed: code: 1002, message: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\n       WASM backtrace:\n       \n           0: 0x39248 - &lt;unknown&gt;!rust_begin_unwind\n       , data: Some(RawValue(\&quot;RuntimeApi(\\\&quot;Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\\\\nWASM backtrace:\\\\n\\\\n    0: 0x39248 - &lt;unknown&gt;!rust_begin_unwind\\\\n\\\&quot;)\&quot;))\n    1: RPC Call failed: code: 1002, message: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\n       WASM backtrace:\n       \n           0: 0x39248 - &lt;unknown&gt;!rust_begin_unwind\n       , data: Some(RawValue(\&quot;RuntimeApi(\\\&quot;Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\\\\nWASM backtrace:\\\\n\\\\n    0: 0x39248 - &lt;unknown&gt;!rust_begin_unwind\\\\n\\\&quot;)\&quot;))&quot;,&#xD;&#xA;  &quot;target&quot;: &quot;webb_relayer::tx_queue::substrate_tx_queue&quot;,&#xD;&#xA;  &quot;spans&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;node&quot;: &quot;1080&quot;,&#xD;&#xA;      &quot;name&quot;: &quot;run&quot;&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It would be great if anyone can help me understand what the error msg means and if there is a better way to solve this problem.&#xD;&#xA;&#xD;&#xA;Any help or suggestion is most appreciated. Thank you&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/subxt/latest/src/subxt/client.rs.html#424-445" ContentLicense="CC BY-SA 4.0" />
  <row Id="14930" PostHistoryTypeId="1" PostId="3977" RevisionGUID="77410c1f-3c1d-41cf-ae95-3f02cf033ae9" CreationDate="2022-07-28T13:07:52.043" UserId="1837" Text="Verification Error: Runtime error code-1002" ContentLicense="CC BY-SA 4.0" />
  <row Id="14931" PostHistoryTypeId="3" PostId="3977" RevisionGUID="77410c1f-3c1d-41cf-ae95-3f02cf033ae9" CreationDate="2022-07-28T13:07:52.043" UserId="1837" Text="|substrate-node|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14932" PostHistoryTypeId="2" PostId="3978" RevisionGUID="a4af68b9-511e-423e-ae76-f41d4a0d0b12" CreationDate="2022-07-28T13:11:50.583" UserId="165" Text="To add new collators to an already running chain you will need to use something like [collator-selection](https://github.com/paritytech/cumulus/blob/master/pallets/collator-selection/src/lib.rs) pallet.&#xD;&#xA;This will help you when adding collators with keys not present on the chainspec of your chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="14934" PostHistoryTypeId="4" PostId="3977" RevisionGUID="c0a06cb8-81e9-4d1e-8fe8-ff7c307a07e4" CreationDate="2022-07-28T13:18:16.707" UserId="1837" Comment="edited title" Text="Create submittable extrinsic from call bytes" ContentLicense="CC BY-SA 4.0" />
  <row Id="14935" PostHistoryTypeId="2" PostId="3979" RevisionGUID="e0302e39-dabf-45c7-88ea-0221696b0b35" CreationDate="2022-07-28T13:52:52.247" UserId="251" Text="This makes me confused for a whole day.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;First, please take a look at these:&#xD;&#xA;[PolkadotApps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fdarwiniacrab-rpc.dwellir.com#/explorer/query/11305767), [Subscan](https://crab.subscan.io/extrinsic/11305767-1), [Code](https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L1041).&#xD;&#xA;&#xD;&#xA;From the code, we know this is a `Pays::No` call. Indeed, it doesn't cost any tx fee. But why the extrinsic detail shows:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  weight: 2,347,339,000&#xD;&#xA;  class: Normal&#xD;&#xA;  paysFee: Yes&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;IIUC, it should be:&#xD;&#xA;```&#xD;&#xA;PostDispatchInfo {&#xD;&#xA;    actual_weight: None,&#xD;&#xA;    pays_fee: Pays::No,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And the second weird thing, please take a look at these:&#xD;&#xA;[PolkadotApps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fdarwiniacrab-rpc.dwellir.com#/explorer/query/11436986), [Subscan](https://crab.subscan.io/extrinsic/11436986-1), [Code](https://github.com/paritytech/parity-bridges-common/blob/master/modules/grandpa/src/lib.rs#L201).&#xD;&#xA;&#xD;&#xA;From the code, we know this is also a `Pays::No` call. But why does it cost a lot of tx fees? I've grabbed the data and tested it on the mock file. I'm sure `is_mandatory_header ` is `true`." ContentLicense="CC BY-SA 4.0" />
  <row Id="14937" PostHistoryTypeId="1" PostId="3979" RevisionGUID="e0302e39-dabf-45c7-88ea-0221696b0b35" CreationDate="2022-07-28T13:52:52.247" UserId="251" Text="How do the `DispatchResultWithPostInfo` and `Pays::No` actually work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14938" PostHistoryTypeId="3" PostId="3979" RevisionGUID="e0302e39-dabf-45c7-88ea-0221696b0b35" CreationDate="2022-07-28T13:52:52.247" UserId="251" Text="|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14940" PostHistoryTypeId="5" PostId="3979" RevisionGUID="51f85245-0820-4781-82c2-7a34f801ef03" CreationDate="2022-07-28T13:59:12.213" UserId="251" Comment="deleted 1 character in body" Text="This makes me confused for a whole day.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;First, please take a look at these:&#xD;&#xA;[PolkadotApps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fdarwiniacrab-rpc.dwellir.com#/explorer/query/11305767), [Subscan](https://crab.subscan.io/extrinsic/11305767-1), [Code](https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L1041).&#xD;&#xA;&#xD;&#xA;From the code, we know this is a `Pays::No` call. Indeed, it doesn't cost any tx fee. But why the extrinsic detail shows:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  weight: 2,347,339,000&#xD;&#xA;  class: Normal&#xD;&#xA;  paysFee: Yes&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;IIUC, it should be:&#xD;&#xA;```&#xD;&#xA;PostDispatchInfo {&#xD;&#xA;    actual_weight: None,&#xD;&#xA;    pays_fee: Pays::No,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And the second weird thing, please take a look at these:&#xD;&#xA;[PolkadotApps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fdarwiniacrab-rpc.dwellir.com#/explorer/query/11436986), [Subscan](https://crab.subscan.io/extrinsic/11436986-1), [Code](https://github.com/paritytech/parity-bridges-common/blob/master/modules/grandpa/src/lib.rs#L201).&#xD;&#xA;&#xD;&#xA;From the code, we know this is also a `Pays::No` call. But why does it cost a lot of tx fees? I've grabbed the data and tested it on the mock file. I'm sure `is_mandatory_header` is `true`." ContentLicense="CC BY-SA 4.0" />
  <row Id="14941" PostHistoryTypeId="2" PostId="3980" RevisionGUID="f8f355ef-ab6b-4fe0-9e2e-1ff37a5dee78" CreationDate="2022-07-28T14:03:28.987" UserId="2319" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/KhQA8.png&#xD;&#xA;&#xD;&#xA;I am successfully add scheduler pallet but in polkadot.js frontend extrinics not work properly help me put correct value in scheduler extrinics.. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14943" PostHistoryTypeId="1" PostId="3980" RevisionGUID="f8f355ef-ab6b-4fe0-9e2e-1ff37a5dee78" CreationDate="2022-07-28T14:03:28.987" UserId="2319" Text="i am successfully add scheduler pallet then but extrinics not work properly help me put correct value in scheduler extrinics" ContentLicense="CC BY-SA 4.0" />
  <row Id="14944" PostHistoryTypeId="3" PostId="3980" RevisionGUID="f8f355ef-ab6b-4fe0-9e2e-1ff37a5dee78" CreationDate="2022-07-28T14:03:28.987" UserId="2319" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14945" PostHistoryTypeId="2" PostId="3981" RevisionGUID="3f476a31-8e4b-487c-9792-648e29508951" CreationDate="2022-07-28T14:05:12.643" UserId="251" Text="Yes, that's the right way. That's what the pallet wants you to do.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const RewardCurve: &amp;'static PiecewiseLinear&lt;'static&gt; = &amp;REWARD_CURVE;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;impl pallet_staking::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;	type EraPayout = pallet_staking::ConvertCurve&lt;RewardCurve&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, the trait name is `Config`. So this is a configuration for you.&#xD;&#xA;&#xD;&#xA;You may write your pallet in the future. And if you want other people to use the pallet more flexibly. You would also provide some configurations." ContentLicense="CC BY-SA 4.0" />
  <row Id="14947" PostHistoryTypeId="2" PostId="3982" RevisionGUID="62e2f6e4-6186-4316-b770-3e8fcd09f128" CreationDate="2022-07-28T14:36:32.563" UserId="165" Text="Even though most of the answers depend on the exact configuration of the systems being run. I feel I can give you a few pointers here.&#xD;&#xA;&#xD;&#xA; - Backups / snapshots.&#xD;&#xA;&#xD;&#xA;They are the key to ensure access to the state of your chain at any point. They come handy when interested in running some tests from state at block B. In case of corruption of dbs you know you can reover.&#xD;&#xA;If you make them available to the community, they will have resources to sync faster.&#xD;&#xA;&#xD;&#xA; - Some nodes were stopped&#xD;&#xA;&#xD;&#xA;If there are still nodes running that means that any other node can, through discovery, connect to them and sync your chain. Also, your chain will be available as long as there is at least one node publicly accessible running, that's on theory, on practice as you mention it is more like two nodes running as collators are actually being run.&#xD;&#xA;&#xD;&#xA; - All nodes stopped.&#xD;&#xA;&#xD;&#xA;Well, this means that your chain is not available at any level. You can still spin up nodes again and, if dbs have not been removed, everything shall continue as soon as nodes are back running. From the top of my head I won't mention anything else on this topic.&#xD;&#xA;&#xD;&#xA; - Corrupted DB&#xD;&#xA;&#xD;&#xA;The reasons of why a db can get corrupted are difficult to list, it might be that for one system loosing power unexpectedly leaves the db in a bad state, but maybe for a different system the OS / drive controllers are smart enough to avoid this scenario.&#xD;&#xA;Running out of space in your disk can be a problem, but I cannot promise you that hitting this will corrupt your dbs always, though I have seen it happening.&#xD;&#xA;&#xD;&#xA;At least, these are two points I would say to pay attention to and avoid finding your nodes into.&#xD;&#xA;&#xD;&#xA;But what I can confirm is that if your db gets corrupted you will have no option but drop that db and sync your node again, for what backups are really helpful." ContentLicense="CC BY-SA 4.0" />
  <row Id="14949" PostHistoryTypeId="2" PostId="3983" RevisionGUID="b8a795fd-6092-4b72-9f61-7a609c4648e0" CreationDate="2022-07-28T14:44:24.953" UserId="29" Text="This may be related to this issue here:&#xD;&#xA; - https://github.com/paritytech/substrate/issues/11855&#xD;&#xA;&#xD;&#xA;Try:&#xD;&#xA;```&#xD;&#xA;cargo update -p tracing-core --precise 0.1.26&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then re-run your node again." ContentLicense="CC BY-SA 4.0" />
  <row Id="14951" PostHistoryTypeId="4" PostId="3964" RevisionGUID="402734ef-31eb-49de-b075-7fe23aa6a462" CreationDate="2022-07-28T14:45:36.480" UserId="29" Comment="edited title" Text="feeless transactions unsigned vs signed extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="14952" PostHistoryTypeId="5" PostId="3968" RevisionGUID="b4fb1202-b925-4f67-a7a9-02f0c1cb8a57" CreationDate="2022-07-28T14:47:12.877" UserId="29" Comment="added 1 character in body" Text="What's your definition of the duplication.&#xD;&#xA;&#xD;&#xA;Here is an [example](https://github.dev/paritytech/substrate/blob/dddfed3d9260cf03244f15ba3db4edf9af7467e9/frame/examples/basic/src/lib.rs#L758-L759).&#xD;&#xA;As you can see there's a matcher to analyze the call struct.&#xD;&#xA;&#xD;&#xA;Then you could do something like this:&#xD;&#xA;```rust&#xD;&#xA;Some(Call::set_dummy { maybe_a_hash, .. }) {&#xD;&#xA;    if xxx.contains(maybe_a_hash) {&#xD;&#xA;        return InvalidTransaction::Custom(&lt;Error&lt;T&gt;&gt;::AlreadyExisted.as_u8()).into()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14953" PostHistoryTypeId="5" PostId="3980" RevisionGUID="adb1e28f-3c9d-4eae-ab01-4eab96e498f3" CreationDate="2022-07-28T14:54:47.303" UserId="29" Comment="deleted 63 characters in body; edited title" Text="I have successfully added the scheduler pallet but in polkadot.js frontend I am getting a `badOrigin`:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/KhQA8.png)&#xD;&#xA;&#xD;&#xA;What could be the issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="14954" PostHistoryTypeId="4" PostId="3980" RevisionGUID="adb1e28f-3c9d-4eae-ab01-4eab96e498f3" CreationDate="2022-07-28T14:54:47.303" UserId="29" Comment="deleted 63 characters in body; edited title" Text="Getting a `badOrigin` on Scheduler pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="14955" PostHistoryTypeId="2" PostId="3984" RevisionGUID="ded47e71-4097-42dc-a8f2-cfba88fc4378" CreationDate="2022-07-28T15:09:17.577" UserId="29" Text="You can find additional resources on this topic here:&#xD;&#xA;- https://spec.polkadot.network/#chapter-anv&#xD;&#xA;- https://w3f.github.io/parachain-implementers-guide" ContentLicense="CC BY-SA 4.0" />
  <row Id="14957" PostHistoryTypeId="5" PostId="3971" RevisionGUID="5272bc10-c97b-4c2a-b38c-88509f8ba463" CreationDate="2022-07-28T15:09:30.783" UserId="29" Comment="added 4 characters in body" Text="This article will answer the question in great details.&#xD;&#xA;- https://polkadot.network/blog/polkadot-v1-0-sharding-and-economic-security/" ContentLicense="CC BY-SA 4.0" />
  <row Id="14958" PostHistoryTypeId="5" PostId="3949" RevisionGUID="34e77dcf-ed2e-4b05-b4c9-ae0cae61d577" CreationDate="2022-07-28T15:50:58.967" UserId="1824" Comment="Fix some typos" Text="It's pretty straightforward to call a contract from a pallet. I'm going to assume you're calling an ink! contract with the following message for the purposes of this answer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn flip(&amp;mut self, foo: u32) {&#xD;&#xA;    todo!()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm also gonna assume this contract has already been deployed on-chain.&#xD;&#xA;&#xD;&#xA;You'll need a couple of things:&#xD;&#xA;- Some sort of coupling to `pallet-contracts`&#xD;&#xA;- Knowledge about the contract's message selector and arguments&#xD;&#xA;&#xD;&#xA;With that you'll able to use [`pallet_contracts::bare_call`](https://crates.parity.io/pallet_contracts/pallet/struct.Pallet.html#method.bare_call) to call into our contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Coupling&#xD;&#xA;&#xD;&#xA;Your custom pallet needs to have access to the interface from the Contracts pallet. It&#xD;&#xA;can do this in one of two ways:&#xD;&#xA;- [Tight coupling](https://docs.substrate.io/reference/how-to-guides/pallet-design/use-tight-coupling/)&#xD;&#xA;- [Loose coupling](https://docs.substrate.io/reference/how-to-guides/pallet-design/use-loose-coupling/)&#xD;&#xA;&#xD;&#xA;I'm not gonna get into the details here, but just know that you have to use _one_ of&#xD;&#xA;them. We'll use tight coupling for our example.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Selector and Arguments&#xD;&#xA;&#xD;&#xA;The message selector is the identifier used to pick out which of the many functions in&#xD;&#xA;your smart contract should be called. Assuming you have an ink! contract, you can find&#xD;&#xA;this info in the metadata generated by `cargo-contract`.&#xD;&#xA;&#xD;&#xA;When you do `cargo +nightly contract build` you'll get something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Your contract artifacts are ready. You can find them in:&#xD;&#xA;/private/tmp/flipper/target/ink&#xD;&#xA;&#xD;&#xA;  - flipper.contract (code + metadata)&#xD;&#xA;  - flipper.wasm (the contract's code)&#xD;&#xA;  - metadata.json (the contract's metadata)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the `metadata.json` file you'll find a section like this:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;&quot;messages&quot;: [&#xD;&#xA;  {&#xD;&#xA;    &quot;args&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;label&quot;: &quot;foo&quot;,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&#xD;&#xA;            &quot;u32&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;type&quot;: 4&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    ],&#xD;&#xA;    &quot;docs&quot;: [],&#xD;&#xA;    &quot;label&quot;: &quot;flip&quot;,&#xD;&#xA;    &quot;mutates&quot;: true,&#xD;&#xA;    &quot;payable&quot;: false,&#xD;&#xA;    &quot;returnType&quot;: null,&#xD;&#xA;    &quot;selector&quot;: &quot;0x633aa551&quot;&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Find the message you want to call and take a note of the selector bytes. If your function&#xD;&#xA;has any arguments you'll also need to take a note of what those are.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Crafting a `bare_call`&#xD;&#xA;&#xD;&#xA;The `bare_call` function takes an `input_data` buffer. This buffer needs to be of the&#xD;&#xA;form:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[ MESSAGE_SELECTOR | SCALE_ENCODED_ARG_1 | ... | SCALE_ENCODED_ARG_N ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We can craft this as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let mut selector: Vec&lt;u8&gt; = [0x63, 0x3A, 0xA5, 0x51].into();&#xD;&#xA;let mut message_arg = 15663040u32.encode();&#xD;&#xA;&#xD;&#xA;let mut data = Vec::new();&#xD;&#xA;data.append(&amp;mut selector);&#xD;&#xA;data.append(&amp;mut message_arg);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, to put it call together. In our pallet we'll need a `call` (so a function within the&#xD;&#xA;`#[pallet::call]` macro) which will itself call `bare_call`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn call_contract(&#xD;&#xA;    origin: OriginFor&lt;T&gt;,&#xD;&#xA;    dest: T::AccountId, // &lt;- This is the address of the deployed contract we're calling&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;    let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;    // Amount to transfer to the message. Not gonna transfer anything here, so we'll&#xD;&#xA;    // leave this as `0`.&#xD;&#xA;    let value: BalanceOf&lt;T&gt; = Default::default();&#xD;&#xA;&#xD;&#xA;    // You'll have to play around with this depending on your contract. I don't recommend&#xD;&#xA;    // hardcoding it but for demo purposes this'll do the trick&#xD;&#xA;    let gas_limit = 10_000_000_000;&#xD;&#xA;    let debug = false;&#xD;&#xA;&#xD;&#xA;    // Remember, we pulled this out from the `metadata.json` file.&#xD;&#xA;    //&#xD;&#xA;    // Again, probably shouldn't be hardcoded but :shrug:&#xD;&#xA;    let mut selector: Vec&lt;u8&gt; = [0x63, 0x3A, 0xA5, 0x51].into();&#xD;&#xA;    let mut message_arg = 15663040u32.encode();&#xD;&#xA;&#xD;&#xA;    let mut data = Vec::new();&#xD;&#xA;    data.append(&amp;mut selector);&#xD;&#xA;    data.append(&amp;mut message_arg);&#xD;&#xA;&#xD;&#xA;    // This ends up calling our contract!&#xD;&#xA;    pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;        who,&#xD;&#xA;        dest.clone(),&#xD;&#xA;        value,&#xD;&#xA;        gas_limit,&#xD;&#xA;        data,&#xD;&#xA;        debug,&#xD;&#xA;    )&#xD;&#xA;    .result?;&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Further Reading&#xD;&#xA;- https://github.com/justinFrevert/Runtime-Contract-Interactions/&#xD;&#xA;    - I based this answer off [the following function](https://github.com/justinFrevert/Runtime-Contract-Interactions/blob/6cb243499015134c489df1de1ffdce3be28a27f9/pallets/template/src/lib.rs#L88).&#xD;&#xA;- https://github.com/HCastano/decoded-2022-demo &#xD;&#xA;    - Similar thing [here](https://github.com/HCastano/decoded-2022-demo/blob/493edc950d9e7af03c8f021919f15bfc9f7e1e94/runtime/src/chain_extension.rs#L127), but in the context of chain extensions.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14959" PostHistoryTypeId="2" PostId="3985" RevisionGUID="588d1163-eed1-475e-9099-1a3a4a766a84" CreationDate="2022-07-28T16:10:18.213" UserId="1837" Text="I was using the wrong ExtrinsicParams. It should be `subxt::SubstrateExtrinsicParams` instead of `subxt::PolkadotExtrinsicParams`.&#xD;&#xA;&#xD;&#xA;This solves my problem but I will be also interested if there is any other easy way to solve this problem. " ContentLicense="CC BY-SA 4.0" />
  <row Id="14961" PostHistoryTypeId="2" PostId="3986" RevisionGUID="b5c91337-92a2-4e1b-9312-d4db3707466e" CreationDate="2022-07-28T16:21:03.983" UserId="1842" Text="For bitfields: I am pretty sure that the only reason we store them is so we can accumulate them over several blocks until we reached availability/cores time out. While validators will re-send bitfields every block, this adds some more resilience in case of spurious network problems for example.&#xD;&#xA;&#xD;&#xA;For the `onChainVotes` stuff: This is an implementation detail. It is strictly speaking not needed to store this on chain, but it is useful for disputes to have that information easily accessible by the node. Easily accessible means a versioned runtime API, hence the need to put it in storage.&#xD;&#xA;&#xD;&#xA;For disputes it is crucial to have backing votes available for a candidate in case a dispute is raised at some point. We use the `onChainVotes` stuff in the dispute-coordinator to scrape votes from chain state at every block, as that is less troublesome than reading block data directly on the node side. Because we read the state at each block, there is no need to preserve votes in state for longer.&#xD;&#xA;&#xD;&#xA;Hope that makes sense." ContentLicense="CC BY-SA 4.0" />
  <row Id="14963" PostHistoryTypeId="2" PostId="3987" RevisionGUID="31fe692b-a3c5-4b60-af43-0028c926aa18" CreationDate="2022-07-28T22:40:32.763" UserId="1950" Text="I have a substrate pallet `A` and it has following Errors Defined&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;        /// Not a coffee&#xD;&#xA;		InvalidCoffee,&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;trait implementation in Pallet `A`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait A&lt;AccountId, Error&gt; {&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;	fn is_valid_coffee(coffee_id: u32) -&gt; Result&lt;bool, Error&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; A&lt;AccountIdOf&lt;T&gt;, Error&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	 &#xD;&#xA;&#xD;&#xA;	 &#xD;&#xA;	fn is_valid_coffee(coffee_id: u32) -&gt; Result&lt;bool, Error&lt;T&gt;&gt; {&#xD;&#xA;		Coffee::&lt;T&gt;::get(coffee_id).ok_or(Error::&lt;T&gt;::InvalidCoffee)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am using a trait defined in this Pallet `A`  (`is_valid_coffee`) in pallet `B`, it requires the Error defined in Pallet `A`. How to import it to Pallet `B`? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14965" PostHistoryTypeId="1" PostId="3987" RevisionGUID="31fe692b-a3c5-4b60-af43-0028c926aa18" CreationDate="2022-07-28T22:40:32.763" UserId="1950" Text="How to use an Error define in one pallet in another pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="14966" PostHistoryTypeId="3" PostId="3987" RevisionGUID="31fe692b-a3c5-4b60-af43-0028c926aa18" CreationDate="2022-07-28T22:40:32.763" UserId="1950" Text="|rust|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14967" PostHistoryTypeId="2" PostId="3988" RevisionGUID="58de2465-dcfb-4b18-bca0-bf23402dbbf3" CreationDate="2022-07-29T01:01:04.717" UserId="251" Text="```&#xD;&#xA;trait Config: frame_system::Config + another_pallet::Config {}&#xD;&#xA;&#xD;&#xA;fn example&lt;T&gt;() -&gt; DispatchError &#xD;&#xA;where&#xD;&#xA;    T: Config&#xD;&#xA;{&#xD;&#xA;    Err(&lt;another_pallet::Error&lt;T&gt;&gt;::AnotherError)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="14969" PostHistoryTypeId="2" PostId="3989" RevisionGUID="f0bc9a4b-340c-4186-b37d-8f1b5ac2c4c5" CreationDate="2022-07-29T02:23:12.833" UserId="2307" Text="I add pallet_multisig in runtime and build successfully but why the add multisig button is unavailable and there is no pallet multisig in developers/extrinsic on polkadosjs client? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="14971" PostHistoryTypeId="1" PostId="3989" RevisionGUID="f0bc9a4b-340c-4186-b37d-8f1b5ac2c4c5" CreationDate="2022-07-29T02:23:12.833" UserId="2307" Text="Can not add Multisig" ContentLicense="CC BY-SA 4.0" />
  <row Id="14972" PostHistoryTypeId="3" PostId="3989" RevisionGUID="f0bc9a4b-340c-4186-b37d-8f1b5ac2c4c5" CreationDate="2022-07-29T02:23:12.833" UserId="2307" Text="|substrate-node|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14973" PostHistoryTypeId="2" PostId="3990" RevisionGUID="0fe9fa32-5e5f-45e9-9bb0-96c0d873aade" CreationDate="2022-07-29T03:04:31.273" UserId="445" Text="Try this: In PolkadotJs, **Go to Developer -&gt; Sudo -&gt; scheduler** ( Instance Pallet) -&gt; schedule(extrinsic) &#xD;&#xA;&#xD;&#xA;If you configure like this https://github.com/PureStake/moonbeam/blob/master/runtime/moonbeam/src/lib.rs#L471 " ContentLicense="CC BY-SA 4.0" />
  <row Id="14975" PostHistoryTypeId="2" PostId="3991" RevisionGUID="a1d1d7d2-ee0e-4ce0-9d7f-484ac34934e3" CreationDate="2022-07-29T03:05:39.183" UserId="251" Text="For the first question, I have an answer now.&#xD;&#xA;&#xD;&#xA;[Code](https://github.com/paritytech/substrate/blob/master/frame/support/src/weights.rs#L320-L327):&#xD;&#xA;```&#xD;&#xA;/// Calculate how much weight was actually spent by the `Dispatchable`.&#xD;&#xA;pub fn calc_actual_weight(&amp;self, info: &amp;DispatchInfo) -&gt; Weight {&#xD;&#xA;	if let Some(actual_weight) = self.actual_weight {&#xD;&#xA;		actual_weight.min(info.weight)&#xD;&#xA;	} else {&#xD;&#xA;		info.weight&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a `DispatchInfo` which was converted from `DispatchResultWithPostInfo`." ContentLicense="CC BY-SA 4.0" />
  <row Id="14977" PostHistoryTypeId="5" PostId="3991" RevisionGUID="c98a2eb1-8529-4f23-ac6c-fbf7d68fd22a" CreationDate="2022-07-29T04:13:22.403" UserId="251" Comment="added 137 characters in body" Text="For the first question, I have an answer now.&#xD;&#xA;&#xD;&#xA;[Code](https://github.com/paritytech/substrate/blob/master/frame/support/src/weights.rs#L320-L327):&#xD;&#xA;```&#xD;&#xA;/// Calculate how much weight was actually spent by the `Dispatchable`.&#xD;&#xA;pub fn calc_actual_weight(&amp;self, info: &amp;DispatchInfo) -&gt; Weight {&#xD;&#xA;	if let Some(actual_weight) = self.actual_weight {&#xD;&#xA;		actual_weight.min(info.weight)&#xD;&#xA;	} else {&#xD;&#xA;		info.weight&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a `DispatchInfo` which was converted from `DispatchResultWithPostInfo`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For the second question.&#xD;&#xA;&#xD;&#xA;I found that the system will withdraw your balance then deposit it back.&#xD;&#xA;&#xD;&#xA;So, it's free actually." ContentLicense="CC BY-SA 4.0" />
  <row Id="14978" PostHistoryTypeId="2" PostId="3992" RevisionGUID="c5b63e9a-caf1-470d-95d2-8ef7bb2f4252" CreationDate="2022-07-29T04:33:33.580" UserId="2947" Text="I am new to substrate.  Am trying to deploy and instantiate a simple contract on a local node.  Everything is via the command line (cargo), or node.js, no UI, no browser.&#xD;&#xA;&#xD;&#xA;Am using [paritytech's substrate-contracts-node][1] because it already comes with contracts-pallet, and [substrate-developer-hub's substrate-node-template][2] does not seem to.&#xD;&#xA;  &#xD;&#xA;I create a simple project: `cargo contract new flipper`.  &#xD;&#xA;  &#xD;&#xA;Then, `cargo +nightly contract build --release`.  &#xD;&#xA;  &#xD;&#xA;Then, I make sure the node is running:  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    substrate-contracts-node --dev --detailed-log-output&#xD;&#xA;&#xD;&#xA;(I don't think  I even need any options).&#xD;&#xA;&#xD;&#xA;Then, `cargo contract upload --verbose --suri //Alice` .&#xD;&#xA;  &#xD;&#xA;Output on client-side:  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    $ cargo contract upload --verbose --suri //Alice&#xD;&#xA;    VERBOSE&#xD;&#xA;            Event Balances ➜ Withdraw&#xD;&#xA;              who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;              amount: 525756416&#xD;&#xA;            Event Balances ➜ Reserved&#xD;&#xA;              who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;              amount: 314475000000&#xD;&#xA;            Event Contracts ➜ CodeStored&#xD;&#xA;              code_hash: 0x4406fe2cdb0473a8925be201d3452ce15a0988406c7eb4fb48a6ca324bac2733&#xD;&#xA;            Event TransactionPayment ➜ TransactionFeePaid&#xD;&#xA;              who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;              actual_fee: 525756416&#xD;&#xA;              tip: 0&#xD;&#xA;            Event System ➜ ExtrinsicSuccess&#xD;&#xA;              dispatch_info: DispatchInfo { weight: 439457000, class: Normal, pays_fee: Yes }&#xD;&#xA;    &#xD;&#xA;        Code hash 0x4406fe2cdb0473a8925be201d3452ce15a0988406c7eb4fb48a6ca324bac2733&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;I use the code hash for the instantiate command:  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    code_hash=0x4406fe2cdb0473a8925be201d3452ce15a0988406c7eb4fb48a6ca324bac2733;&#xD;&#xA;    &#xD;&#xA;    cargo contract instantiate \&#xD;&#xA;    	--verbose \&#xD;&#xA;    	--constructor new \&#xD;&#xA;    	--suri //Alice \&#xD;&#xA;    	--code-hash $code_hash&#xD;&#xA;&#xD;&#xA;Output client side:&#xD;&#xA;&#xD;&#xA;    ERROR: Module error: Contracts: OutOfGas&#xD;&#xA;    &#xD;&#xA;    The executed contract exhausted its gas limit.&#xD;&#xA;&#xD;&#xA;The output on the terminal running the node: (deploy):&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    2022-07-29 00:14:17  Starting consensus session on top of parent 0x2f9fcaae0e2c09157198db93ab7d30c0251d033203604f730a06f9bfd1a285df&#xD;&#xA;    2022-07-29 00:14:17  Prepared block for proposing at 11 (4 ms) [hash: 0x5e9b43d696429a702669b92b50ec21ff6e5f1b68d52c30bf8a4180d023a449be; parent_hash: 0x2f9f…85df; extrinsics (2): [0x238c…aa21, 0xc325…d77b]]&#xD;&#xA;    2022-07-29 00:14:17 Instant Seal success: CreatedBlock { hash: 0x5e9b43d696429a702669b92b50ec21ff6e5f1b68d52c30bf8a4180d023a449be, aux: ImportedAux { header_only: false, clear_justification_requests: false, needs_justification: false, bad_justification: false, is_new_best: true } }&#xD;&#xA;    2022-07-29 00:14:17 ✨ Imported #11 (0x5e9b…49be)&#xD;&#xA;&#xD;&#xA;Node terminal ouput: (instantiate):&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    2022-07-29 00:16:04 Accepting new connection, 1/100&#xD;&#xA;    2022-07-29 00:16:04  Starting consensus session on top of parent 0x5e9b43d696429a702669b92b50ec21ff6e5f1b68d52c30bf8a4180d023a449be&#xD;&#xA;    2022-07-29 00:16:04  Prepared block for proposing at 12 (0 ms) [hash: 0x24704f81396e053fc4861656dee410a52cad8203900ae99ef89c03795f9f5178; parent_hash: 0x5e9b…49be; extrinsics (2): [0x64cf…1ada, 0xf68f…52bd]]&#xD;&#xA;    2022-07-29 00:16:04 Instant Seal success: CreatedBlock { hash: 0x24704f81396e053fc4861656dee410a52cad8203900ae99ef89c03795f9f5178, aux: ImportedAux { header_only: false, clear_justification_requests: false, needs_justification: false, bad_justification: false, is_new_best: true } }&#xD;&#xA;    2022-07-29 00:16:04 ✨ Imported #12 (0x2470…5178)&#xD;&#xA;&#xD;&#xA;So now what? I think my use of `cargo contract` is out as far as &quot;gas&quot; is concerned.  &#xD;&#xA;&#xD;&#xA;Willing to write up a node.js client (`@polkadot/api`), but not sure how to proceed. Who needs the &quot;gas&quot;... the contract?  If so, how do I get a reference/id/address to it?  &#xD;&#xA;  &#xD;&#xA;Should that have happened during deployment, during instantiation? Are the starting default values for `//Alice` too little?  &#xD;&#xA;  &#xD;&#xA;I am not clear as to the exact problem, thus how to solve it.  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14980" PostHistoryTypeId="1" PostId="3992" RevisionGUID="c5b63e9a-caf1-470d-95d2-8ef7bb2f4252" CreationDate="2022-07-29T04:33:33.580" UserId="2947" Text="I get a &quot;The executed contract exhausted its gas limit.&quot; when attempting to instantiate a contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="14981" PostHistoryTypeId="3" PostId="3992" RevisionGUID="c5b63e9a-caf1-470d-95d2-8ef7bb2f4252" CreationDate="2022-07-29T04:33:33.580" UserId="2947" Text="|polkadot-js|substrate-contracts-node|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14982" PostHistoryTypeId="2" PostId="3993" RevisionGUID="aee82339-4558-4a67-8d53-e721fb56276f" CreationDate="2022-07-29T07:06:08.810" UserId="567" Text="As Mapping inside Mapping is not supported [explanation here][1].&#xD;&#xA;The best way is to use a tuple:&#xD;&#xA;&#xD;&#xA;If you have this structure:&#xD;&#xA;&#xD;&#xA;    Map&lt;A, Map&lt;B, C&gt;&gt;&#xD;&#xA;&#xD;&#xA;You can structure it like this:&#xD;&#xA;&#xD;&#xA;    Map&lt;(A, B), C&gt;&#xD;&#xA;&#xD;&#xA;In your example it can be:&#xD;&#xA;&#xD;&#xA;    EventType1 {&#xD;&#xA;        event_info: EventInfo,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    CoreStorage {&#xD;&#xA;        coin_storage: CoinStore, //not the issue&#xD;&#xA;        event_storage: {&#xD;&#xA;            event_type_1: Mapping&lt;EventId, EventType1&gt;,&#xD;&#xA;            event_type_2: Mapping&lt;EventId, EventType2&gt;,&#xD;&#xA;            order_0: Mapping&lt;(EventId, AccountId), Order&gt;&#xD;&#xA;            order_1: Mapping&lt;(EventId, AccountId), Order&gt;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;And then you can access `Orders` with `EventId` &amp; `AccountId`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1659/how-to-have-a-mapping-in-a-custom-structure-inside-an-ink-contract/1668#1668" ContentLicense="CC BY-SA 4.0" />
  <row Id="14984" PostHistoryTypeId="6" PostId="3992" RevisionGUID="b5168fa8-98b3-4125-9f3d-a729d3fcbe0a" CreationDate="2022-07-29T07:12:09.187" UserId="627" Comment="edited tags" Text="|substrate-contracts-node|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14985" PostHistoryTypeId="2" PostId="3994" RevisionGUID="4d6e6c45-88df-479c-91fb-cab4a90e7889" CreationDate="2022-07-29T08:22:04.680" UserId="16" Text="Every contract execution whether it is an instantiation or a call needs to set a parameter named [`gas_limit`][1] to cap how much execution it is allowed to perform. This is necessary because whoever sends a transaction needs to pay for its execution and without this limit the costs would be uncapped.&#xD;&#xA;&#xD;&#xA;In your case you didn't supply `--gas` which makes `cargo contract` use its default of `50_000_000_000` which is apparently not enough. To find out how much you need you can run your command with `--dry-run` first which returns the gas required. In case of a dry run you don't pay any fees. So you can just supply a very high `--gas` in order to find out how much you actually need.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/3ca8a42954e284bfb8771ed93d37cced3a7809b9/frame/contracts/src/lib.rs#L537" ContentLicense="CC BY-SA 4.0" />
  <row Id="14987" PostHistoryTypeId="5" PostId="2943" RevisionGUID="e07141c7-19bd-4143-bf55-8fe8051ea44d" CreationDate="2022-07-29T09:18:44.710" UserId="2025" Comment="fix link to Substrate docs" Text="Here is a description of [SCALE compact-encoding](https://docs.substrate.io/reference/scale-codec/). As you mentioned in your question, there are basically 4 variants indicated by the flags from the 2 least-significant bits. &#xD;&#xA;&#xD;&#xA;Effectively when decoding the first byte of SCALE compact, it would be in the form `0bxxxxxxyy` where `yy` are the flags and the most-significant 6 `xxxxxx` are the bits containing the value in the first byte.&#xD;&#xA;&#xD;&#xA;Interpreting the lest-significant binary flags you can have lengths of 1, 2, 4 &amp; 4+ bytes -&#xD;&#xA;&#xD;&#xA;`00` This is a single-byte version. To extract the value, you would do `byte1 &gt;&gt; 2`. As an example `0b00000100` would be `4 &gt;&gt; 2 = 1`&#xD;&#xA;&#xD;&#xA;`01` This is a double-byte version. To extract the value, you would do `(byte1 + (byte2 &lt;&lt; 8)) &gt;&gt; 2`. As an example `0b11111101 0b00000111` would be `(253 + (7 &lt;&lt; 8)) &gt;&gt; 2 = 511`&#xD;&#xA;&#xD;&#xA;`10` This is the 4 byte version. For extracting the value, it ends up being `(byte1 + (byte2 &lt;&lt; 8) + (byte3 &lt;&lt; 16) + (byte4 &lt;&lt; 24)) &gt;&gt; 2`. An example would be `0b11111110 0b11111111 0b11111111 0b11111111` which would be `(254 + (255 &lt;&lt; 8) + (255 &lt;&lt; 16) + (255 &lt;&lt; 24)) &gt;&gt; 2 = 1073741823`&#xD;&#xA;&#xD;&#xA;`11` This is the n-byte version. The first byte + 4 details the number of bytes following. So Assuming a first byte of `0b00000111` it would yield 5 bytes, i.e. `(7 &gt;&gt; 2) + 4 = 5`. The next 5 bytes would therefore be the LE encoded value.&#xD;&#xA;&#xD;&#xA;Depending on your toolset and language, be aware that some of these are very large numbers and could overflow the &quot;normal&quot; representation. So it is recommended to use big integer support for your environment especially when converting the very large values. &#xD;&#xA;&#xD;&#xA;(And example of this is JS where the [maximum integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) is 2^53 - 1. So in this specific case you may want to use [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) or alternatives when converting. Other languages would have other limits, bear those in mind.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="14988" PostHistoryTypeId="24" PostId="2943" RevisionGUID="e07141c7-19bd-4143-bf55-8fe8051ea44d" CreationDate="2022-07-29T09:18:44.710" Comment="Proposed by 2025 approved by 627 edit id of 254" ContentLicense="CC BY-SA 4.0" />
  <row Id="14989" PostHistoryTypeId="2" PostId="3995" RevisionGUID="263e8f9e-a14d-497c-8bb9-377d6d674812" CreationDate="2022-07-29T09:41:28.547" UserId="73" Text="You are right that it show the correct information with no fees. There was actually some bug in reporting the correct result. It was fixed in the following commit (as of writing this, 6 days ago, so relative freshly fixed): https://github.com/paritytech/substrate/commit/7bb4936d788c84bfd9ed1bbde49336538459c5aa" ContentLicense="CC BY-SA 4.0" />
  <row Id="14992" PostHistoryTypeId="52" PostId="3992" RevisionGUID="f23dd358-228c-40f3-82b5-7b517fd8345f" CreationDate="2022-07-29T12:38:14.427" />
  <row Id="14993" PostHistoryTypeId="2" PostId="3996" RevisionGUID="130ff54c-f5d2-4358-b535-418c90a10b0a" CreationDate="2022-07-29T13:20:00.353" UserId="18" Text="We want to automate the launch of our bootnodes for our parachain. We generated a spec file with an IP address as well as an identity that are repeatable. We used the `--node-key` to get a repeatable identity and each IP address has a unique nodekey &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The issue is that when a node downloads the spec file which has its identity as part of the bootnodes inside the spec file we receive the below error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-07-29 11:35:19 [Parachain]  The bootnode you want to connect provided a different peer ID than the one you expect: `12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ` with `12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ`:`Dialer { address: &quot;/ip4/13.59.92.128/tcp/30333/p2p/12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ&quot;, role_override: Dialer }`.    &#xD;&#xA;2022-07-29 11:35:22 [Relaychain] ⚙️  Syncing 668.6 bps, target=#1255136 (36 peers), best: #116194 (0xd001…c67d), finalized #115761 (0xa114…c722), ⬇ 8.5MiB/s ⬆ 8.7kiB/s    &#xD;&#xA;2022-07-29 11:35:23 [Parachain]  Idle (4 peers), best: #4654 (0x62d2…3104), finalized #0 (0x32ab…a5aa), ⬇ 0.2kiB/s ⬆ 0.5kiB/s    &#xD;&#xA;2022-07-29 11:35:24 [Parachain]  The bootnode you want to connect provided a different peer ID than the one you expect: `12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ` with `12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ`:`Dialer { address: &quot;/ip4/13.59.92.128/tcp/30333/p2p/12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ&quot;, role_override: Dialer }`.    &#xD;&#xA;2022-07-29 11:35:27 [Relaychain] ⚙️  Syncing 1025.2 bps, target=#1255135 (37 peers), best: #121320 (0x4854…ce41), finalized #121081 (0xeeb5…6510), ⬇ 14.3MiB/s ⬆ 12.9kiB/s    &#xD;&#xA;2022-07-29 11:35:28 [Parachain]  Idle (4 peers), best: #4654 (0x62d2…3104), finalized #0 (0x32ab…a5aa), ⬇ 0.2kiB/s ⬆ 0.2kiB/s    &#xD;&#xA;2022-07-29 11:35:29 [Parachain]  The bootnode you want to connect provided a different peer ID than the one you expect: `12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ` with `12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ`:`Dialer { address: &quot;/ip4/13.59.92.128/tcp/30333/p2p/12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ&quot;, role_override: Dialer }`.    &#xD;&#xA;2022-07-29 11:35:31 [Parachain] ✨ Imported #4668 (0x5840…8332)    &#xD;&#xA;2022-07-29 11:35:31 [Parachain] ✨ Imported #4668 (0xabba…cad3)    &#xD;&#xA;2022-07-29 11:35:31 [Parachain] ✨ Imported #4668 (0x3ffa…be31)    &#xD;&#xA;2022-07-29 11:35:31 [Parachain] ✨ Imported #4668 (0xa2dd…f089)    &#xD;&#xA;2022-07-29 11:35:32 [Relaychain] ⚙️  Syncing 923.2 bps, target=#1255136 (38 peers), best: #125936 (0x4f02…11e3), finalized #125810 (0xe9b6…04f5), ⬇ 10.4MiB/s ⬆ 10.0kiB/s    &#xD;&#xA;2022-07-29 11:35:34 [Parachain]  Idle (4 peers), best: #4654 (0x62d2…3104), finalized #0 (0x32ab…a5aa), ⬇ 5.9kiB/s ⬆ 0.4kiB/s    &#xD;&#xA;2022-07-29 11:35:34 [Parachain]  The bootnode you want to connect provided a different peer ID than the one you expect: `12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ` with `12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ`:`Dialer { address: &quot;/ip4/13.59.92.128/tcp/30333/p2p/12D3KooWJp6SAVLsc2aoEAwP3D9ETEcBKW9tvV1ZvfDqXBUw74zQ&quot;, role_override: Dialer }`. &#xD;&#xA;```&#xD;&#xA;Please note that despite the error, the bootnode does discover the other boot nodes and syncs successfully. &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;So the question is how do we automate the launching of bootnodes, this same spec file works fine when you are launching a node that connects to these bootnodes but it assumes the bootnode is already running&#xD;&#xA;&#xD;&#xA;how do you automate the launch of the bootnodes themselves if they are not running on the same instance? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14995" PostHistoryTypeId="1" PostId="3996" RevisionGUID="130ff54c-f5d2-4358-b535-418c90a10b0a" CreationDate="2022-07-29T13:20:00.353" UserId="18" Text="automating the launch of bootnodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="14996" PostHistoryTypeId="3" PostId="3996" RevisionGUID="130ff54c-f5d2-4358-b535-418c90a10b0a" CreationDate="2022-07-29T13:20:00.353" UserId="18" Text="|parachain|rococo|chainspec|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="14997" PostHistoryTypeId="5" PostId="3989" RevisionGUID="2b607600-7c8e-43ca-8459-34c6a72f02e9" CreationDate="2022-07-29T14:11:12.883" UserId="29" Comment="added 1093 characters in body; edited tags; edited title" Text="Here is my config setup for pallet_multisig:&#xD;&#xA;```rs&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DepositBase:u128 = 500;&#xD;&#xA;	pub const DepositFactor:u32 = 50;&#xD;&#xA;	pub const MaxSignatories:u16 = 5;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_multisig::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type DepositBase = DepositBase;&#xD;&#xA;	type DepositFactor = DepositFactor;&#xD;&#xA;	type MaxSignatories = MaxSignatories;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is my `construct_runtime`:&#xD;&#xA;```rs&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		RandomnessCollectiveFlip: pallet_randomness_collective_flip,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		// Include the custom logic from the pallet-template in the runtime.&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;		PalletMultisig: pallet_multisig,&#xD;&#xA;		PalletUtility: pallet_utility&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However when I build this, you can see the &quot;+ multisig&quot; button is greyed out:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/bLtcM.png)&#xD;&#xA;&#xD;&#xA;What am I missing to properly configure the multisig pallet?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="14998" PostHistoryTypeId="4" PostId="3989" RevisionGUID="2b607600-7c8e-43ca-8459-34c6a72f02e9" CreationDate="2022-07-29T14:11:12.883" UserId="29" Comment="added 1093 characters in body; edited tags; edited title" Text="multisig add button not appearing on polkadotJS apps after adding the pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="14999" PostHistoryTypeId="6" PostId="3989" RevisionGUID="2b607600-7c8e-43ca-8459-34c6a72f02e9" CreationDate="2022-07-29T14:11:12.883" UserId="29" Comment="added 1093 characters in body; edited tags; edited title" Text="|polkadot-js|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15000" PostHistoryTypeId="2" PostId="3997" RevisionGUID="ea682bae-9d8f-44fd-ac94-205de494fa8b" CreationDate="2022-07-29T14:22:57.403" UserId="165" Text="The error seems to appear when adding to a node itself as a bootnode.&#xD;&#xA;&#xD;&#xA;The fix for these error messages you are seeing have been recently added [here](https://github.com/paritytech/substrate/pull/11851).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15002" PostHistoryTypeId="2" PostId="3998" RevisionGUID="bd6ed914-e380-4f44-9b56-e554490593f0" CreationDate="2022-07-29T14:23:23.290" UserId="29" Text="Try changing the identifier names in your `construct_runtime`:&#xD;&#xA;&#xD;&#xA;From this:&#xD;&#xA;```rs&#xD;&#xA;PalletMultisig: pallet_multisig,&#xD;&#xA;PalletUtility: pallet_utility&#xD;&#xA;```&#xD;&#xA;to:&#xD;&#xA;```rs&#xD;&#xA;Multisig: pallet_multisig,&#xD;&#xA;Utility: pallet_utility&#xD;&#xA;```&#xD;&#xA;re-build and see if it works" ContentLicense="CC BY-SA 4.0" />
  <row Id="15004" PostHistoryTypeId="5" PostId="3989" RevisionGUID="bb772eaa-023a-49cf-8f32-ccc878b44f89" CreationDate="2022-07-29T14:24:32.523" UserId="29" Comment="added 24 characters in body" Text="Here is my config setup for pallet_multisig:&#xD;&#xA;```rs&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DepositBase:u128 = 500;&#xD;&#xA;	pub const DepositFactor:u32 = 50;&#xD;&#xA;	pub const MaxSignatories:u16 = 5;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_multisig::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type DepositBase = DepositBase;&#xD;&#xA;	type DepositFactor = DepositFactor;&#xD;&#xA;	type MaxSignatories = MaxSignatories;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is my `construct_runtime`:&#xD;&#xA;```rs&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		RandomnessCollectiveFlip: pallet_randomness_collective_flip,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		// Include the custom logic from the pallet-template in the runtime.&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;		PalletMultisig: pallet_multisig,&#xD;&#xA;		PalletUtility: pallet_utility&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However when I build this, you can see the &quot;+ multisig&quot; button is greyed out:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/bLtcM.png)&#xD;&#xA;&#xD;&#xA;What am I missing to properly configure the multisig pallet to work with polkadotJS?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15005" PostHistoryTypeId="5" PostId="3998" RevisionGUID="bbc77963-f80e-4e86-9bed-2c43043e5228" CreationDate="2022-07-29T14:55:23.433" UserId="29" Comment="added 5 characters in body" Text="Try changing the identifier names in your `construct_runtime`:&#xD;&#xA;&#xD;&#xA;From this:&#xD;&#xA;```rs&#xD;&#xA;PalletMultisig: pallet_multisig,&#xD;&#xA;PalletUtility: pallet_utility&#xD;&#xA;```&#xD;&#xA;To this:&#xD;&#xA;```rs&#xD;&#xA;Multisig: pallet_multisig,&#xD;&#xA;Utility: pallet_utility&#xD;&#xA;```&#xD;&#xA;re-build and see if it works" ContentLicense="CC BY-SA 4.0" />
  <row Id="15006" PostHistoryTypeId="2" PostId="3999" RevisionGUID="146a7a47-8074-4c54-9e42-c8c40f101971" CreationDate="2022-07-29T16:24:31.697" UserId="235" Text="We are [building](https://github.com/Fair-Squares/fair-squares) an asset onboarding &amp; tenancy platform and each asset is unique. We have designed it to use the [uniques-pallet](https://github.com/paritytech/substrate/tree/master/frame/uniques/src). The change that we require on top of this pallet are:&#xD;&#xA; &#xD;&#xA;1. The NFT is owned by multiple accounts.&#xD;&#xA;2. The NFT-asset share are transferable, tradable and are used for future governance regarding that specific asset.&#xD;&#xA;3. (*optional*) The NFT asset to have its own treasury(accountID that can hold funds)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The flow:** &#xD;&#xA;A seller onboards an asset and if all checks pass the asset will belong to a set of selected investors. We need to make the NFT divisible and give the investors their share of the NFT and the ownership of the NFT has to switch to the total amount of fractioned shares. &#xD;&#xA;&#xD;&#xA;**Question**:&#xD;&#xA;Asking the substrate community for design help that makes as much as possible use of the frame pallet in the substrate repository. &#xD;&#xA;&#xD;&#xA;Our idea would be to add the asset-pallet that introduces the fungible tokens and after a successful sale to distribute the shares to the investors. This however leaves the ownership requirement still open. This would be covered by an on-chain registry that creates accountID's that corresponds to the specific asset_id of the fungible shares. &#xD;&#xA;&#xD;&#xA;All feedback, idea's and links are welcome.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15008" PostHistoryTypeId="1" PostId="3999" RevisionGUID="146a7a47-8074-4c54-9e42-c8c40f101971" CreationDate="2022-07-29T16:24:31.697" UserId="235" Text="Fractionalized NFTs" ContentLicense="CC BY-SA 4.0" />
  <row Id="15009" PostHistoryTypeId="3" PostId="3999" RevisionGUID="146a7a47-8074-4c54-9e42-c8c40f101971" CreationDate="2022-07-29T16:24:31.697" UserId="235" Text="|substrate-node-template|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15010" PostHistoryTypeId="2" PostId="4000" RevisionGUID="c291f506-7f8d-42aa-a832-75cab2ba4f33" CreationDate="2022-07-29T16:31:18.080" UserId="2752" Text="I am implementing a smart contract according to the psp34 openbrush standard.&#xD;&#xA;Now I want to do some testing.&#xD;&#xA;I want to mint a token and then use it in some methods.&#xD;&#xA;Some of the methods of my smart contract require, that the caller is either the &#xD;&#xA;owner of the token or approved by the owner.&#xD;&#xA;How can I change from the creator (the account that mints the token) of the token&#xD;&#xA;to another account that then uses the token?&#xD;&#xA;For example when testing with truffle you can use [deployer, investor] and then &#xD;&#xA;specify the caller with {from: investor}.&#xD;&#xA;Is something similar possible here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15012" PostHistoryTypeId="1" PostId="4000" RevisionGUID="c291f506-7f8d-42aa-a832-75cab2ba4f33" CreationDate="2022-07-29T16:31:18.080" UserId="2752" Text="How to change the caller of a method when testing smart contracts in rust?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15013" PostHistoryTypeId="3" PostId="4000" RevisionGUID="c291f506-7f8d-42aa-a832-75cab2ba4f33" CreationDate="2022-07-29T16:31:18.080" UserId="2752" Text="|smart-contract|rust|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15014" PostHistoryTypeId="2" PostId="4001" RevisionGUID="4837c505-a552-4969-a8cb-70a44cd19b92" CreationDate="2022-07-29T16:59:18.310" UserId="2752" Text="I found examples of how to test for this and more use cases in the &#xD;&#xA;openbrush github repo.&#xD;&#xA;[Here][1] is the example that I needed for my question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Supercolony-net/openbrush-contracts/blob/d6e29f05fd462e4e027de1f2f9177d594a5a0f05/tests/psp34.rs#L185" ContentLicense="CC BY-SA 4.0" />
  <row Id="15016" PostHistoryTypeId="2" PostId="4002" RevisionGUID="98c5255b-b05e-4068-95d6-a961f0375497" CreationDate="2022-07-29T17:32:27.847" UserId="490" Text="This is something Unique Network (not to be confused with uniques-pallet) did as &quot;refungible&quot;, and something we at RMRK do as &quot;NFTs as DAOs&quot; (full breakdown [here](https://url.rmrk.app/wasmconf)), short version [here](https://docs.rmrk.app/lego5-dao).&#xD;&#xA;&#xD;&#xA;Since uniques-pallet is currently implemented on Statemine/Statemint which also has assets for custom tokens, this only requires a linking logic between an NFT being minted and it being locked as collateral to create a custom asset, instead of using KSM as collateral. &#xD;&#xA;&#xD;&#xA;This should be a relatively easy update to make to the code, but since it is kind of out of scope for the common-good parachain that is Statemine/Statemint, I am a little skeptical of it making it in. In any case, I think this is more a matter of upgrading assets pallet to support NFTs as collateral, rather than upgrading uniques-pallet directly." ContentLicense="CC BY-SA 4.0" />
  <row Id="15018" PostHistoryTypeId="5" PostId="3999" RevisionGUID="9e374904-3397-427d-b560-418fc1c5e77f" CreationDate="2022-07-29T17:58:12.023" UserId="235" Comment="added 47 characters in body" Text="We are [building](https://github.com/Fair-Squares/fair-squares) an asset onboarding &amp; tenancy platform and each asset is unique. We have designed it to use the [uniques-pallet](https://github.com/paritytech/substrate/tree/master/frame/uniques/src). The change that we require on top of this pallet are:&#xD;&#xA; &#xD;&#xA;1. The NFT is owned by multiple accounts.&#xD;&#xA;2. The NFT-asset share are transferable, tradable and are used for future governance regarding that specific asset.&#xD;&#xA;3. (*optional*) The NFT asset to have its own treasury(accountID that can hold funds)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The flow:** &#xD;&#xA;A seller onboards an asset and if all checks pass the asset will belong to a set of selected investors. We need to make the NFT divisible and give the investors their share of the NFT and the ownership of the NFT has to switch to the total amount of fractioned shares. &#xD;&#xA;&#xD;&#xA;**Question**:&#xD;&#xA;Asking the substrate community for design help that makes as much as possible use of the frame pallet in the substrate repository. &#xD;&#xA;&#xD;&#xA;Our idea would be to add the asset-pallet in the runtime that introduces the fungible tokens and after a successful sale of the NFT the fungible tokens are distributed as shares to the investors. This however leaves the ownership requirement still open. This would be covered by an on-chain registry that creates accountID's that corresponds to the specific asset_id of the fungible shares. &#xD;&#xA;&#xD;&#xA;All feedback, idea's and links are welcome.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15019" PostHistoryTypeId="2" PostId="4003" RevisionGUID="23237947-b1fe-4a3a-830d-4c0cd335b4e5" CreationDate="2022-07-29T18:12:50.467" UserId="167" Text="This is all about **economic security**. &#xD;&#xA;&#xD;&#xA;Most of the operations that allow a user to consume some state on the blockchain should require a deposit, otherwise that blockchain is vulnerable to all sort of sibyl attacks from the get go.&#xD;&#xA;&#xD;&#xA;The typical attack scenario would be, for example, for an attacker to create a storage items onchain and bloat the state. &#xD;&#xA;&#xD;&#xA;With that, you need to decide on deposits that are high enough such that the cost of an attack is high enough. &#xD;&#xA;&#xD;&#xA;How to deduce this exact number is then up to a particular chain, how strict it wants to be in terms of security and deposits for storage items, and even things like the total liquid market cap. " ContentLicense="CC BY-SA 4.0" />
  <row Id="15021" PostHistoryTypeId="2" PostId="4004" RevisionGUID="5fff73c8-8d8a-4fc5-9803-0a604d596d62" CreationDate="2022-07-29T23:24:33.743" UserId="2947" Text="I am new to substrate.  As you can see, I have the front-end running, I can access the wasm file I want to upload, etc, but I don't know if I have the correct selections, and especially: what goes in the `code` entry box?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dmeZJ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/H0cG4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15023" PostHistoryTypeId="1" PostId="4004" RevisionGUID="5fff73c8-8d8a-4fc5-9803-0a604d596d62" CreationDate="2022-07-29T23:24:33.743" UserId="2947" Text="how to upload contract using substrate-front-end-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="15024" PostHistoryTypeId="3" PostId="4004" RevisionGUID="5fff73c8-8d8a-4fc5-9803-0a604d596d62" CreationDate="2022-07-29T23:24:33.743" UserId="2947" Text="|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15025" PostHistoryTypeId="52" PostId="3999" RevisionGUID="e9cf452e-d987-4487-bc6f-9baafe8ab158" CreationDate="2022-07-30T00:24:33.900" />
  <row Id="15027" PostHistoryTypeId="5" PostId="4001" RevisionGUID="11edf027-534d-461b-891e-69e958d3ef57" CreationDate="2022-07-30T02:04:00.097" UserId="2752" Comment="added 416 characters in body" Text="I found examples of how to test for this and more use cases in the &#xD;&#xA;openbrush github repo.&#xD;&#xA;[Here][1] is the example that I needed for my question.&#xD;&#xA;&#xD;&#xA;Here is what the important parts are:&#xD;&#xA;&#xD;&#xA;    use openbrush::{&#xD;&#xA;        contracts::psp34::*,&#xD;&#xA;        test_utils::{&#xD;&#xA;            accounts,&#xD;&#xA;            change_caller,&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;    ...&#xD;&#xA;    #[ink::test]&#xD;&#xA;    fn transfer_token() {&#xD;&#xA;        let accounts = accounts();&#xD;&#xA;        ...&#xD;&#xA;        let owner = accounts.alice;&#xD;&#xA;        let spender = accounts.bob;&#xD;&#xA;        ...&#xD;&#xA;        change_caller(spender);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Supercolony-net/openbrush-contracts/blob/d6e29f05fd462e4e027de1f2f9177d594a5a0f05/tests/psp34.rs#L185" ContentLicense="CC BY-SA 4.0" />
  <row Id="15028" PostHistoryTypeId="2" PostId="4005" RevisionGUID="50e92f9e-0d44-4ea9-be49-8c968402e710" CreationDate="2022-07-30T02:10:04.477" UserId="2752" Text="I am looking for an implementation of the EIP712 standard in rust.&#xD;&#xA;Like the psp22 openbrush standard which is more or less the equivalent&#xD;&#xA;to the erc20 standard." ContentLicense="CC BY-SA 4.0" />
  <row Id="15030" PostHistoryTypeId="1" PostId="4005" RevisionGUID="50e92f9e-0d44-4ea9-be49-8c968402e710" CreationDate="2022-07-30T02:10:04.477" UserId="2752" Text="Is there a EIP712 pendant in rust?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15031" PostHistoryTypeId="3" PostId="4005" RevisionGUID="50e92f9e-0d44-4ea9-be49-8c968402e710" CreationDate="2022-07-30T02:10:04.477" UserId="2752" Text="|smart-contract|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15032" PostHistoryTypeId="2" PostId="4006" RevisionGUID="59b7b1a2-e195-4dd4-aede-bff71427881c" CreationDate="2022-07-30T05:19:28.093" UserId="1950" Text="I have the following account initialisation on benchmarking.rs file. The following configuration works on mock.rs and test.rs files but getting errors in benchmarking&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub(crate) fn test_pub(n: u8) -&gt; sp_core::sr25519::Public {&#xD;&#xA;	sp_core::sr25519::Public::from_raw([n; 32])&#xD;&#xA;}&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize, Hash))]&#xD;&#xA;pub struct AccountId(pub u64);&#xD;&#xA;&#xD;&#xA;impl sp_std::fmt::Display for AccountId {&#xD;&#xA;	fn fmt(&amp;self, f: &amp;mut sp_std::fmt::Formatter&lt;'_&gt;) -&gt; sp_std::fmt::Result {&#xD;&#xA;		write!(f, &quot;{}&quot;, self.0)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl From&lt;u64&gt; for AccountId {&#xD;&#xA;	fn from(account_id: u64) -&gt; Self {&#xD;&#xA;		Self(account_id)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;benchmarking.rs file as follows&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;//! Benchmarks for Template Pallet&#xD;&#xA;#![cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;&#xD;&#xA;#![allow(unused_imports)]&#xD;&#xA;use super::*;&#xD;&#xA;&#xD;&#xA;use crate::Pallet as Sample;&#xD;&#xA;use frame_benchmarking::{account, benchmarks, whitelisted_caller};&#xD;&#xA;use frame_system::{self, RawOrigin, Origin};&#xD;&#xA;use sp_runtime::traits::StaticLookup;&#xD;&#xA;use pallet_primitives::DataDTO;&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;use serde::{Deserialize, Serialize};&#xD;&#xA;&#xD;&#xA;fn initial_setup &lt;T: Config + pallet_marks::Config + pallet_admin::Config&gt;(caller: T::AccountId) {&#xD;&#xA; let account_id = T::Lookup::unlookup(caller.clone());&#xD;&#xA;}&#xD;&#xA;const SEED: u32 = 0;&#xD;&#xA;&#xD;&#xA;fn assert_last_event&lt;T: Config&gt;(generic_event: &lt;T as Config&gt;::Event) {&#xD;&#xA;    frame_system::Pallet::&lt;T&gt;::assert_last_event(generic_event.into());&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub(crate) fn test_pub(n: u8) -&gt; sp_core::sr25519::Public {&#xD;&#xA;	sp_core::sr25519::Public::from_raw([n; 32])&#xD;&#xA;}&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize, Hash))]&#xD;&#xA;pub struct AccountId(pub u64);&#xD;&#xA;&#xD;&#xA;impl sp_std::fmt::Display for AccountId {&#xD;&#xA;	fn fmt(&amp;self, f: &amp;mut sp_std::fmt::Formatter&lt;'_&gt;) -&gt; sp_std::fmt::Result {&#xD;&#xA;		write!(f, &quot;{}&quot;, self.0)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl From&lt;u64&gt; for AccountId {&#xD;&#xA;	fn from(account_id: u64) -&gt; Self {&#xD;&#xA;		Self(account_id)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;benchmarks!{&#xD;&#xA;  create_marks {&#xD;&#xA;&#xD;&#xA;		let data: dataDTO  = DataDTO {&#xD;&#xA;			version: 1_u32,&#xD;&#xA;			active: false,&#xD;&#xA;		};&#xD;&#xA;		let acc = test_pub(1);&#xD;&#xA;		pallet_marks::Pallet::&lt;T&gt;::register_marks(&#xD;&#xA;			Origin::Signed(acc.clone())&#xD;&#xA;		);&#xD;&#xA;		 &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  }: _(RawOrigin::Signed(acc.clone()), data)&#xD;&#xA; verify {&#xD;&#xA;    let mark_id = 1u32;&#xD;&#xA;    assert_last_event::&lt;T&gt;(Event::&lt;T&gt;::Created(mark_id, acc).into());&#xD;&#xA; }&#xD;&#xA; impl_benchmark_test_suite!(&#xD;&#xA;  Sample,&#xD;&#xA;  crate::mock::new_test_ext(),&#xD;&#xA;  crate::mock::Test)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I try to run this I am getting the following error&#xD;&#xA;```&#xD;&#xA;|             Origin::Signed(acc.clone())&#xD;&#xA;   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found enum `RawOrigin`&#xD;&#xA;   |&#xD;&#xA;   = note: expected associated type `&lt;T as frame_system::Config&gt;::Origin`&#xD;&#xA;                         found enum `RawOrigin&lt;sp_core::sr25519::Public&gt;`&#xD;&#xA;   = help: consider constraining the associated type `&lt;T as frame_system::Config&gt;::Origin` to `RawOrigin&lt;sp_core::sr25519::Public&gt;` or calling a method that returns `&lt;T as frame_system::Config&gt;::Origin`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15034" PostHistoryTypeId="1" PostId="4006" RevisionGUID="59b7b1a2-e195-4dd4-aede-bff71427881c" CreationDate="2022-07-30T05:19:28.093" UserId="1950" Text="Error when trying to use an account in Benchmarks expected associated type, found enum `RawOrigin`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15035" PostHistoryTypeId="3" PostId="4006" RevisionGUID="59b7b1a2-e195-4dd4-aede-bff71427881c" CreationDate="2022-07-30T05:19:28.093" UserId="1950" Text="|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15041" PostHistoryTypeId="2" PostId="4008" RevisionGUID="57bbf3f9-9cd6-4282-8f3b-e6629a42bb14" CreationDate="2022-07-30T07:24:17.893" UserId="2140" Text="I am analyzing the slashing module in Staking pallet and found that whenever slash happens NegativeImbalance is generating.&#xD;&#xA;    &#xD;&#xA;    // 1&#xD;&#xA;    fn apply_slash() {&#xD;&#xA;  &#xD;&#xA;         do_slash();&#xD;&#xA;         payout_reporters();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // 2 Imbalance is generating&#xD;&#xA;    fn do_slash() {&#xD;&#xA;        ...&#xD;&#xA;        let (imbalance, missing) = T::Currency::slash(stash, value);&#xD;&#xA;        slashed_imbalance.subsume(imbalance);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // 3 payout reporters when there are reporters otherwise goes to Treasury&#xD;&#xA;    fn payout_reporters() {&#xD;&#xA;        &#xD;&#xA;        if reward_payout.is_zero() || reporters.is_empty() {&#xD;&#xA;            &#xD;&#xA;            // T::Slash = Treasury &#xD;&#xA;            // Question: How exactly does this imbalance go to Treasury? What is really happening on back side?&#xD;&#xA;		    T::Slash::on_unbalanced(slashed_imbalance); &#xD;&#xA;		    return&#xD;&#xA;	    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Whenever Imbalance is dropped in Substrate, I know that TotalIssuance is increasing when PositiveImbalance is dropped and decreasing when NegativeImbalance is dropped. &#xD;&#xA;&#xD;&#xA;Question &#xD;&#xA;&#xD;&#xA;1. How `T::Slash::on_unbalanced(slashed_imbalance)` makes NegativeImbalance, which is amount of slash goes to Treasury?&#xD;&#xA;&#xD;&#xA;2. How can I check whether its balance goes to Treasury or not?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15043" PostHistoryTypeId="1" PostId="4008" RevisionGUID="57bbf3f9-9cd6-4282-8f3b-e6629a42bb14" CreationDate="2022-07-30T07:24:17.893" UserId="2140" Text="Does drop(imbalance) always go to Treasury Pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15044" PostHistoryTypeId="3" PostId="4008" RevisionGUID="57bbf3f9-9cd6-4282-8f3b-e6629a42bb14" CreationDate="2022-07-30T07:24:17.893" UserId="2140" Text="|substrate-node|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15045" PostHistoryTypeId="5" PostId="4008" RevisionGUID="8e26ff02-75fc-43c0-9dea-b851a423370a" CreationDate="2022-07-30T07:35:42.983" UserId="2140" Comment="added 630 characters in body" Text="I am analyzing the slashing module in Staking pallet and found that whenever slash happens NegativeImbalance is generating.&#xD;&#xA;    &#xD;&#xA;    // 1&#xD;&#xA;    fn apply_slash() {&#xD;&#xA;  &#xD;&#xA;         do_slash();&#xD;&#xA;         payout_reporters();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // 2 Imbalance is generating&#xD;&#xA;    fn do_slash() {&#xD;&#xA;        ...&#xD;&#xA;        let (imbalance, missing) = T::Currency::slash(stash, value);&#xD;&#xA;        slashed_imbalance.subsume(imbalance);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // 3 payout reporters when there are reporters otherwise goes to Treasury&#xD;&#xA;    fn payout_reporters() {&#xD;&#xA;        &#xD;&#xA;        if reward_payout.is_zero() || reporters.is_empty() {&#xD;&#xA;            &#xD;&#xA;            // T::Slash = Treasury &#xD;&#xA;            // Question: How exactly does this imbalance go to Treasury? What is really happening on back side?&#xD;&#xA;		    T::Slash::on_unbalanced(slashed_imbalance); &#xD;&#xA;		    return&#xD;&#xA;	    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // 4 Inside Treasury Pallet&#xD;&#xA;    impl&lt;T: Config&lt;I&gt;, I: 'static&gt; OnUnbalanced&lt;NegativeImbalanceOf&lt;T, I&gt;&gt; for Pallet&lt;T, I&gt; {&#xD;&#xA;	fn on_nonzero_unbalanced(amount: NegativeImbalanceOf&lt;T, I&gt;) {&#xD;&#xA;		let numeric_amount = amount.peek();&#xD;&#xA;&#xD;&#xA;		// Must resolve into existing but better to be safe.&#xD;&#xA;		let _ = T::Currency::resolve_creating(&amp;Self::account_id(), amount);&#xD;&#xA;&#xD;&#xA;		Self::deposit_event(Event::Deposit { value: numeric_amount });&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Whenever Imbalance is dropped in Substrate, I know that TotalIssuance is increasing when PositiveImbalance is dropped and decreasing when NegativeImbalance is dropped. &#xD;&#xA;&#xD;&#xA;Question &#xD;&#xA;&#xD;&#xA;1. How `T::Slash::on_unbalanced(slashed_imbalance)` makes NegativeImbalance, which is amount of slash goes to Treasury? I don't see any custom on_balance() method in OnUnbalance trait implementation inside Treasury pallet. It just seems like drop(slashed_imbalance) which only affects TotalIssuance not Treasury.&#xD;&#xA;&#xD;&#xA;2. How can I check whether its balance goes to Treasury or not?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15046" PostHistoryTypeId="2" PostId="4009" RevisionGUID="3ca266e9-286f-4a4a-8861-f657b56772bd" CreationDate="2022-07-30T10:26:35.090" UserId="28" Text="No, it does NOT always go to the treasury pallet. This is something that is configured when setting up the pallets for your chain.&#xD;&#xA;&#xD;&#xA;In [staking](https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/mod.rs#L134) there is a configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Handler for the unbalanced reduction when slashing a staker.&#xD;&#xA;type Slash: OnUnbalanced&lt;NegativeImbalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the [runtime configuration](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs) this is configured as:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type Slash = Treasury; // send the slashed funds to the treasury.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So you can completely control what you want to do with the slashed funds. If you set it to `()`, then it will simply be burned." ContentLicense="CC BY-SA 4.0" />
  <row Id="15048" PostHistoryTypeId="5" PostId="4003" RevisionGUID="fe387071-9209-4315-92d4-f7b1c9bf9f6c" CreationDate="2022-07-30T10:33:19.120" UserId="83" Comment="Typo" Text="This is all about **economic security**. &#xD;&#xA;&#xD;&#xA;Most of the operations that allow a user to consume some state on the blockchain should require a deposit, otherwise that blockchain is vulnerable to all sort of sibyl attacks from the get go.&#xD;&#xA;&#xD;&#xA;The typical attack scenario would be, for example, for an attacker to create storage items onchain and bloat the state. &#xD;&#xA;&#xD;&#xA;With that, you need to decide on deposits that are high enough such that the cost of an attack is high enough. &#xD;&#xA;&#xD;&#xA;How to deduce this exact number is then up to a particular chain, how strict it wants to be in terms of security and deposits for storage items, and even things like the total liquid market cap. " ContentLicense="CC BY-SA 4.0" />
  <row Id="15049" PostHistoryTypeId="2" PostId="4010" RevisionGUID="e6eee286-ce6d-42fe-92a0-659a070932fd" CreationDate="2022-07-30T11:47:52.737" UserId="2950" Text="I'm having trouble running the nodes.&#xD;&#xA;&#xD;&#xA;Does anyone know what the problem is?&#xD;&#xA;&#xD;&#xA;link: &lt;https://github.com/substrate-developer-hub/substrate-node-template&gt;&#xD;&#xA;&#xD;&#xA;command:&#xD;&#xA;```&#xD;&#xA;./scripts/docker_run.sh&#xD;&#xA;```&#xD;&#xA;error:&#xD;&#xA;```&#xD;&#xA;*** Start Substrate node template ***&#xD;&#xA;[+] Running 1/1&#xD;&#xA; ⠿ Network substrate-node-template_default  Removed                                                                                                  0.1s&#xD;&#xA;[+] Running 1/0&#xD;&#xA; ⠿ Network substrate-node-template_default  Created                                                                                                  0.1s&#xD;&#xA;[+] Running 7/7&#xD;&#xA; ⠿ dev Pulled                                                                                                                                      100.6s&#xD;&#xA;   ⠿ d121f8d1c412 Pull complete                                                                                                                     32.3s&#xD;&#xA;   ⠿ 1b985895e9b7 Pull complete                                                                                                                     32.3s&#xD;&#xA;   ⠿ 809a473c961b Pull complete                                                                                                                     32.4s&#xD;&#xA;   ⠿ 89f7c794c3df Pull complete                                                                                                                     33.7s&#xD;&#xA;   ⠿ ea120af1c111 Pull complete                                                                                                                     42.7s&#xD;&#xA;   ⠿ de2c35bb8bf1 Pull complete                                                                                                                     96.2s&#xD;&#xA;error: failed to parse manifest at `/var/www/node-template/node/Cargo.toml`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to parse the `edition` key&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions.&#xD;&#xA;```&#xD;&#xA;my env:&#xD;&#xA;```&#xD;&#xA;Ubuntu 22.04 LTS&#xD;&#xA;rustc 1.62.1 (e092d0b6b 2022-07-16)&#xD;&#xA;cargo 1.62.1 (a748cf5a3 2022-06-08)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15051" PostHistoryTypeId="1" PostId="4010" RevisionGUID="e6eee286-ce6d-42fe-92a0-659a070932fd" CreationDate="2022-07-30T11:47:52.737" UserId="2950" Text="substrate template node build error" ContentLicense="CC BY-SA 4.0" />
  <row Id="15052" PostHistoryTypeId="3" PostId="4010" RevisionGUID="e6eee286-ce6d-42fe-92a0-659a070932fd" CreationDate="2022-07-30T11:47:52.737" UserId="2950" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15053" PostHistoryTypeId="2" PostId="4011" RevisionGUID="b0c8aee8-b365-4071-9b8f-c211b0a9d442" CreationDate="2022-07-30T13:43:57.067" UserId="2951" Text="What are the (high-level) steps to, firstly, create a substrate address from a _private_ key and secondly, to create a m-of-n multisig address?&#xD;&#xA;&#xD;&#xA;A description similar to this image would be just about my level ;)&#xD;&#xA;&#xD;&#xA;[![BTC address generation flowchart][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/AIgOZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15055" PostHistoryTypeId="1" PostId="4011" RevisionGUID="b0c8aee8-b365-4071-9b8f-c211b0a9d442" CreationDate="2022-07-30T13:43:57.067" UserId="2951" Text="How is a substrate address, or multisig address, calcluated from private key?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15056" PostHistoryTypeId="3" PostId="4011" RevisionGUID="b0c8aee8-b365-4071-9b8f-c211b0a9d442" CreationDate="2022-07-30T13:43:57.067" UserId="2951" Text="|cryptography|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15057" PostHistoryTypeId="2" PostId="4012" RevisionGUID="c1ac38dd-5da4-42ce-bcb7-2d773a2eafa9" CreationDate="2022-07-30T16:47:50.967" UserId="145" Text="`docker-compose.yml` file in the root directory seems to be using an outdated Docker image that has an old version of Rust. Replace the following line in that file:&#xD;&#xA;&#xD;&#xA;```yml&#xD;&#xA;image: paritytech/ci-linux:974ba3ac-20201006&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;with:&#xD;&#xA;&#xD;&#xA;```yml&#xD;&#xA;image: paritytech/ci-linux:42a94a57-20220730&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and try running `./scripts/docker_run.sh` again. It should build and start fine.&#xD;&#xA;&#xD;&#xA;You can also find the rest of the tags for the image [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://hub.docker.com/r/paritytech/ci-linux/tags" ContentLicense="CC BY-SA 4.0" />
  <row Id="15059" PostHistoryTypeId="5" PostId="4012" RevisionGUID="aee18fad-5b05-46f4-bbcd-2c49de56dfd8" CreationDate="2022-07-30T16:55:14.033" UserId="145" Comment="added 101 characters in body" Text="`docker-compose.yml` file in the root directory seems to be using an outdated Docker image that has an old version of Rust. Replace the following line in that file:&#xD;&#xA;&#xD;&#xA;```yml&#xD;&#xA;image: paritytech/ci-linux:974ba3ac-20201006&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;with:&#xD;&#xA;&#xD;&#xA;```yml&#xD;&#xA;image: paritytech/ci-linux:42a94a57-20220730&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and try running `./scripts/docker_run.sh` again. It should build and start fine.&#xD;&#xA;&#xD;&#xA;You can also use the following for the latest version always:&#xD;&#xA;&#xD;&#xA;```yml&#xD;&#xA;image: paritytech/ci-linux:production&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Rest of the tags for the image are [here][1]. And [here][2] is the related issue in the repo.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://hub.docker.com/r/paritytech/ci-linux/tags&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template/issues/236" ContentLicense="CC BY-SA 4.0" />
  <row Id="15060" PostHistoryTypeId="2" PostId="4013" RevisionGUID="7af490dc-0824-4f86-a914-318a02cf57fa" CreationDate="2022-07-30T17:21:35.257" UserId="2883" Text="I'm a developer who wants to call the ink contract's function from the outside. I already know that ink contract supports cross-contract. But what I want to do is call the function using subxt or node_runtime crate or etc. I don't want to use polkadot js, but want to implement all features in rust and test it. **(rust version of web3.js and polkadot.js)**&#xD;&#xA;&#xD;&#xA;I tried to implement this by using this function: https://github.com/paritytech/subxt/blob/master/testing/integration-tests/src/frame/contracts.rs#L136 but I don't know how to use this function in testnet(rococo or Shibuya) or my local node.&#xD;&#xA;&#xD;&#xA;And I also tried to use node_runtime and many other things, but I couldn't make it.&#xD;&#xA;&#xD;&#xA;Thank you for any support." ContentLicense="CC BY-SA 4.0" />
  <row Id="15062" PostHistoryTypeId="1" PostId="4013" RevisionGUID="7af490dc-0824-4f86-a914-318a02cf57fa" CreationDate="2022-07-30T17:21:35.257" UserId="2883" Text="Call ink contract using rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="15063" PostHistoryTypeId="3" PostId="4013" RevisionGUID="7af490dc-0824-4f86-a914-318a02cf57fa" CreationDate="2022-07-30T17:21:35.257" UserId="2883" Text="|substrate-node|ink|rust|substrate-contracts-node|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15068" PostHistoryTypeId="2" PostId="4015" RevisionGUID="3eadfae5-b13c-42c3-a2d5-cdcf3d698512" CreationDate="2022-07-30T18:51:05.663" UserId="299" Text="Compile successfully on mac, but it fails to compile on linux.&#xD;&#xA;&#xD;&#xA;repo: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;&#xD;&#xA;system: linux(centos)&#xD;&#xA;&#xD;&#xA;error log:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;   Compiling sp-panic-handler v4.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.26#e8a7d161)&#xD;&#xA;error: failed to run custom build command for `libp2p-core v0.34.0`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/ssm-user/substrate-node-template/target/release/build/libp2p-core-9ce8bf6b64c36b1a/build-script-build` (exit status:101)&#xD;&#xA;  --- stderr&#xD;&#xA;  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: &quot;protoc failed: envelope.proto:1:10: Unrecognized syntaxidentifier \&quot;proto3\&quot;.  This parser only recognizes \&quot;proto2\&quot;.\n&quot; }', /home/ssm-user/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-core-0.34.0/build.rs:30:6&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15070" PostHistoryTypeId="1" PostId="4015" RevisionGUID="3eadfae5-b13c-42c3-a2d5-cdcf3d698512" CreationDate="2022-07-30T18:51:05.663" UserId="299" Text="Failed to run custom build command for `libp2p-core v0.34.0`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15071" PostHistoryTypeId="3" PostId="4015" RevisionGUID="3eadfae5-b13c-42c3-a2d5-cdcf3d698512" CreationDate="2022-07-30T18:51:05.663" UserId="299" Text="|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15072" PostHistoryTypeId="2" PostId="4016" RevisionGUID="305f65a6-cce0-4e07-997d-4d62cb639b67" CreationDate="2022-07-30T22:38:05.500" UserId="2954" Text="Same as title&#xD;&#xA;Is there any integration test framework for Ink contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15074" PostHistoryTypeId="1" PostId="4016" RevisionGUID="305f65a6-cce0-4e07-997d-4d62cb639b67" CreationDate="2022-07-30T22:38:05.500" UserId="2954" Text="Is there any integration test framework for Ink contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15075" PostHistoryTypeId="3" PostId="4016" RevisionGUID="305f65a6-cce0-4e07-997d-4d62cb639b67" CreationDate="2022-07-30T22:38:05.500" UserId="2954" Text="|substrate-node|polkadot|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15076" PostHistoryTypeId="5" PostId="3992" RevisionGUID="747befb7-03d0-4329-8bd3-b98a6efcee74" CreationDate="2022-07-30T22:57:24.757" UserId="2947" Comment="added 3749 characters in body" Text="I am new to substrate.  Am trying to deploy and instantiate a simple contract on a local node.  Everything is via the command line (cargo), or node.js, no UI, no browser.&#xD;&#xA;&#xD;&#xA;Am using [paritytech's substrate-contracts-node][1] because it already comes with contracts-pallet, and [substrate-developer-hub's substrate-node-template][2] does not seem to.&#xD;&#xA;  &#xD;&#xA;I create a simple project: `cargo contract new flipper`.  &#xD;&#xA;  &#xD;&#xA;Then, `cargo +nightly contract build --release`.  &#xD;&#xA;  &#xD;&#xA;Then, I make sure the node is running:  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    substrate-contracts-node --dev --detailed-log-output&#xD;&#xA;&#xD;&#xA;(I don't think  I even need any options).&#xD;&#xA;&#xD;&#xA;Then, `cargo contract upload --verbose --suri //Alice` .&#xD;&#xA;  &#xD;&#xA;Output on client-side:  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    $ cargo contract upload --verbose --suri //Alice&#xD;&#xA;    VERBOSE&#xD;&#xA;            Event Balances ➜ Withdraw&#xD;&#xA;              who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;              amount: 525756416&#xD;&#xA;            Event Balances ➜ Reserved&#xD;&#xA;              who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;              amount: 314475000000&#xD;&#xA;            Event Contracts ➜ CodeStored&#xD;&#xA;              code_hash: 0x4406fe2cdb0473a8925be201d3452ce15a0988406c7eb4fb48a6ca324bac2733&#xD;&#xA;            Event TransactionPayment ➜ TransactionFeePaid&#xD;&#xA;              who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;              actual_fee: 525756416&#xD;&#xA;              tip: 0&#xD;&#xA;            Event System ➜ ExtrinsicSuccess&#xD;&#xA;              dispatch_info: DispatchInfo { weight: 439457000, class: Normal, pays_fee: Yes }&#xD;&#xA;    &#xD;&#xA;        Code hash 0x4406fe2cdb0473a8925be201d3452ce15a0988406c7eb4fb48a6ca324bac2733&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;I use the code hash for the instantiate command:  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    code_hash=0x4406fe2cdb0473a8925be201d3452ce15a0988406c7eb4fb48a6ca324bac2733;&#xD;&#xA;    &#xD;&#xA;    cargo contract instantiate \&#xD;&#xA;    	--verbose \&#xD;&#xA;    	--constructor new \&#xD;&#xA;    	--suri //Alice \&#xD;&#xA;    	--code-hash $code_hash&#xD;&#xA;&#xD;&#xA;Output client side:&#xD;&#xA;&#xD;&#xA;    ERROR: Module error: Contracts: OutOfGas&#xD;&#xA;    &#xD;&#xA;    The executed contract exhausted its gas limit.&#xD;&#xA;&#xD;&#xA;The output on the terminal running the node: (deploy):&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    2022-07-29 00:14:17  Starting consensus session on top of parent 0x2f9fcaae0e2c09157198db93ab7d30c0251d033203604f730a06f9bfd1a285df&#xD;&#xA;    2022-07-29 00:14:17  Prepared block for proposing at 11 (4 ms) [hash: 0x5e9b43d696429a702669b92b50ec21ff6e5f1b68d52c30bf8a4180d023a449be; parent_hash: 0x2f9f…85df; extrinsics (2): [0x238c…aa21, 0xc325…d77b]]&#xD;&#xA;    2022-07-29 00:14:17 Instant Seal success: CreatedBlock { hash: 0x5e9b43d696429a702669b92b50ec21ff6e5f1b68d52c30bf8a4180d023a449be, aux: ImportedAux { header_only: false, clear_justification_requests: false, needs_justification: false, bad_justification: false, is_new_best: true } }&#xD;&#xA;    2022-07-29 00:14:17 ✨ Imported #11 (0x5e9b…49be)&#xD;&#xA;&#xD;&#xA;Node terminal ouput: (instantiate):&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    2022-07-29 00:16:04 Accepting new connection, 1/100&#xD;&#xA;    2022-07-29 00:16:04  Starting consensus session on top of parent 0x5e9b43d696429a702669b92b50ec21ff6e5f1b68d52c30bf8a4180d023a449be&#xD;&#xA;    2022-07-29 00:16:04  Prepared block for proposing at 12 (0 ms) [hash: 0x24704f81396e053fc4861656dee410a52cad8203900ae99ef89c03795f9f5178; parent_hash: 0x5e9b…49be; extrinsics (2): [0x64cf…1ada, 0xf68f…52bd]]&#xD;&#xA;    2022-07-29 00:16:04 Instant Seal success: CreatedBlock { hash: 0x24704f81396e053fc4861656dee410a52cad8203900ae99ef89c03795f9f5178, aux: ImportedAux { header_only: false, clear_justification_requests: false, needs_justification: false, bad_justification: false, is_new_best: true } }&#xD;&#xA;    2022-07-29 00:16:04 ✨ Imported #12 (0x2470…5178)&#xD;&#xA;&#xD;&#xA;So now what? I think my use of `cargo contract` is out as far as &quot;gas&quot; is concerned.  &#xD;&#xA;&#xD;&#xA;Willing to write up a node.js client (`@polkadot/api`), but not sure how to proceed. Who needs the &quot;gas&quot;... the contract?  If so, how do I get a reference/id/address to it?  &#xD;&#xA;  &#xD;&#xA;Should that have happened during deployment, during instantiation? Are the starting default values for `//Alice` too little?  &#xD;&#xA;  &#xD;&#xA;I am not clear as to the exact problem, thus how to solve it.  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**UPDATE:**&#xD;&#xA;&#xD;&#xA;Thank you to Alexander Theißen, I think I got past the original &quot;gas limit&quot; problem.&#xD;&#xA;&#xD;&#xA;I am still not quite sure if I have all of the correct parameters for the `cargo contract instantiate` command.&#xD;&#xA;&#xD;&#xA;Here is what I have:  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    code_hash=0x4406fe2cdb0473a8925be201d3452ce15a0988406c7eb4fb48a6ca324bac2733&#xD;&#xA;        cargo contract instantiate \&#xD;&#xA;        	--verbose \&#xD;&#xA;        	--storage-deposit-limit 50000000000 \&#xD;&#xA;        	--gas 50000000000 \&#xD;&#xA;        	--constructor new \&#xD;&#xA;        	--args false \&#xD;&#xA;        	--suri //Alice \&#xD;&#xA;        	--code-hash $code_hash&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;The error is:&#xD;&#xA;&#xD;&#xA;    ERROR: Rpc error: JSON-RPC call failed: RPC Call failed: code: 1002, message: Verification Error: Runtime error: Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction, data: Some(RawValue(&quot;RuntimeApi(\&quot;Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction\&quot;)&quot;))&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;        0: JSON-RPC call failed: RPC Call failed: code: 1002, message: Verification Error: Runtime error: Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction, data: Some(RawValue(&quot;RuntimeApi(\&quot;Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction\&quot;)&quot;))&#xD;&#xA;        1: RPC Call failed: code: 1002, message: Verification Error: Runtime error: Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction, data: Some(RawValue(&quot;RuntimeApi(\&quot;Execution failed: Error calling api function: Failed to convert parameter `tx` from node to runtime of validate_transaction\&quot;)&quot;))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, if I use a UI: [https://paritytech.github.io/contracts-ui][3], I can connect to the local `substrate-contracts-node` and even just use the uploaded contract by supplying the UI with code_hash.  From there I can successfully make calls to the contract.&#xD;&#xA;&#xD;&#xA;So I assume the issue is related to something I am doing wrong with the `cargo contract instantiate` parameters.  &#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [3]: https://ERROR:%20Rpc%20error:%20JSON-RPC%20call%20failed:%20RPC%20Call%20failed:%20code:%201002,%20message:%20Verification%20Error:%20Runtime%20error:%20Execution%20failed:%20Error%20calling%20api%20function:%20Failed%20to%20convert%20parameter%20%60tx%60%20from%20node%20to%20runtime%20of%20validate_transaction,%20data:%20Some(RawValue(%22RuntimeApi(%5C%22Execution%20failed:%20Error%20calling%20api%20function:%20Failed%20to%20convert%20parameter%20%60tx%60%20from%20node%20to%20runtime%20of%20validate_transaction%5C%22)%22))%20%20Caused%20by:%20%20%20%20%200:%20JSON-RPC%20call%20failed:%20RPC%20Call%20failed:%20code:%201002,%20message:%20Verification%20Error:%20Runtime%20error:%20Execution%20failed:%20Error%20calling%20api%20function:%20Failed%20to%20convert%20parameter%20%60tx%60%20from%20node%20to%20runtime%20of%20validate_transaction,%20data:%20Some(RawValue(%22RuntimeApi(%5C%22Execution%20failed:%20Error%20calling%20api%20function:%20Failed%20to%20convert%20parameter%20%60tx%60%20from%20node%20to%20runtime%20of%20validate_transaction%5C%22)%22))%20%20%20%20%201:%20RPC%20Call%20failed:%20code:%201002,%20message:%20Verification%20Error:%20Runtime%20error:%20Execution%20failed:%20Error%20calling%20api%20function:%20Failed%20to%20convert%20parameter%20%60tx%60%20from%20node%20to%20runtime%20of%20validate_transaction,%20data:%20Some(RawValue(%22RuntimeApi(%5C%22Execution%20failed:%20Error%20calling%20api%20function:%20Failed%20to%20convert%20parameter%20%60tx%60%20from%20node%20to%20runtime%20of%20validate_transaction%5C%22)%22))" ContentLicense="CC BY-SA 4.0" />
  <row Id="15080" PostHistoryTypeId="6" PostId="4016" RevisionGUID="ea8a98ac-672c-4301-ab1f-e0261337c446" CreationDate="2022-07-31T08:37:48.730" UserId="34" Comment="edited tags" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15085" PostHistoryTypeId="5" PostId="3954" RevisionGUID="fa98e24c-a1dd-4a4e-af0a-32dc3ba16034" CreationDate="2022-07-31T11:22:29.193" UserId="2809" Comment="added 151 characters in body" Text="UPDATE: The election always finalizes with Election Fallback and set of validators doesnt't and neither does the Era, but sessions keep increasing.&#xD;&#xA;I understand that an era is just a couple of sessions after which Staking does reward/slashes, and having set the Session length, the proper ElectionDataProvider and ElectionProvider, I am unable to resolve the issue still.&#xD;&#xA;&#xD;&#xA;I'm implementing a permissioned EVM compatible NPoS chain on the Frontier node template using Aura as my block producer.&#xD;&#xA;&#xD;&#xA;I have implemented the necessary pallets(Staking, timestamp, session, GRANDPA(came pre implemented), evm/ethereum etc).&#xD;&#xA;&#xD;&#xA;I've set 3 initial stakers/Aura authorities(Alice, Bob, Charlie) and expect to manually add more.&#xD;&#xA;&#xD;&#xA;The chain works fine in local testnet, however this is an event that is emitted, indicating that election is not triggered. Can anyone suggest what the issue is?&#xD;&#xA;&#xD;&#xA;[![StakingElectionFailed][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the configuration for my Staking, Session and Grandpa pallet.&#xD;&#xA;&#xD;&#xA;[![staking][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JLNhz.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/wxhhm.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/cbj3V.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15086" PostHistoryTypeId="2" PostId="4019" RevisionGUID="0e4c5533-9b66-4dae-b229-73150e3dac87" CreationDate="2022-07-31T12:51:20.060" UserId="560" Text="You can also check out try-runtime: https://docs.substrate.io/reference/how-to-guides/tools/use-try-runtime/" ContentLicense="CC BY-SA 4.0" />
  <row Id="15088" PostHistoryTypeId="2" PostId="4020" RevisionGUID="9e9aa29f-5977-43f5-8c27-032711b08c6e" CreationDate="2022-07-31T13:45:41.990" UserId="560" Text="I'm trying to get fork-off to work with a pair of custom types(https://github.com/hicommonwealth/edgeware-node-types) and I am getting fork-off-substrate to work with a WS socket instead of a HTTP RPC socket(because i couldnt get the HttpProvider to work with the custom specs):&#xD;&#xA;```js&#xD;&#xA;const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;const { HttpProvider } = require('@polkadot/rpc-provider');&#xD;&#xA;const { spec } = require('@edgeware/node-types');&#xD;&#xA;&#xD;&#xA;//const provider = new HttpProvider(process.env.HTTP_RPC_ENDPOINT || 'http://localhost:9933')&#xD;&#xA;// NEW&#xD;&#xA;const provider = new WsProvider(process.env.HTTP_RPC_ENDPOINT);&#xD;&#xA;//....&#xD;&#xA;&#xD;&#xA;// Connect&#xD;&#xA;api = await ApiPromise.create({ provider, ...spec });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but it breaks at 37%&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;HTTP_RPC_ENDPOINT=ws://mynode:9989 npm start&#xD;&#xA;We are intentionally using the HTTP endpoint. If you see any warnings about that, please ignore them.&#xD;&#xA;Custom Schema missing, using default schema.&#xD;&#xA;2022-07-31 15:26:21        API/INIT: RPC methods not decorated: contracts_upload_code, dev_getBlockStats, eth_feeHistory, eth_maxPriorityFeePerGas&#xD;&#xA;api promise ok&#xD;&#xA;Fetching current state of the live chain. Please wait, it can take a while depending on the size of your chain.&#xD;&#xA; ███████████████░░░░░░░░░░░░░░░░░░░░░░░░░ 37% | ETA: 117s | 95/256&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2022-07-31 15:29:43          API-WS: disconnected from ws://5.9.83.210:9989: 1009:: Maximum message size exceeded.&#xD;&#xA;2022-07-31 15:29:43        RPC-CORE: health(): Health:: disconnected from ws://5.9.83.210:9989: 1009:: Maximum message size exceeded.&#xD;&#xA;/fork-off-substrate/node_modules/@polkadot/rpc-provider/ws/index.cjs:197&#xD;&#xA;        const error = new Error(`disconnected from ${(0, _classPrivateFieldLooseBase2.default)(this, _endpoints)[_endpoints][(0, _classPrivateFieldLooseBase2;&#xD;&#xA;                      ^&#xD;&#xA;&#xD;&#xA;Error: disconnected from ws://5.9.83.210:9989: 1009:: Maximum message size exceeded.&#xD;&#xA;    at W3CWebSocket.value (//chain_data/fork-off-substrate/node_modules/@polkadot/rpc-provider/ws/index.cjs:197:23)&#xD;&#xA;    at W3CWebSocket._dispatchEvent [as dispatchEvent] (/chain_data/fork-off-substrate/node_modules/yaeti/lib/EventTarget.js:107)&#xD;&#xA;    at W3CWebSocket.onClose (/chain_data/fork-off-substrate/node_modules/websocket/lib/W3CWebSocket.js:228:10)&#xD;&#xA;    at WebSocketConnection.&lt;anonymous&gt; (/chain_data/fork-off-substrate/node_modules/websocket/lib/W3CWebSocket.js:201:17)&#xD;&#xA;    at WebSocketConnection.emit (node:events:527:28)&#xD;&#xA;    at WebSocketConnection.drop (/chain_data/fork-off-substrate/node_modules/websocket/lib/WebSocketConnection.js:475:14)&#xD;&#xA;    at WebSocketConnection.processFrame (/chain_data/fork-off-substrate/node_modules/websocket/lib/WebSocketConnection.js:578:2)&#xD;&#xA;    at //chain_data/fork-off-substrate/node_modules/websocket/lib/WebSocketConnection.js:323:40&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:78:11)&#xD;&#xA;&#xD;&#xA;Node.js v17.8.0&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Substrate node:&#xD;&#xA;https://github.com/edgeware-network/edgeware-node/tree/erup-5-latest&#xD;&#xA;&#xD;&#xA;I tried to increase the rpc-max-limit flag, but it doesnt work :/&#xD;&#xA;Does anyone have any ideas on how to solve this?&#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;/tmp/edgeware-node # ./../bc/edgeware-node/target/re&#xD;&#xA;lease/edgeware --chain=edgeware -d datal --rpc-port 9988 --unsafe-rpc-external --rpc-external --ws-external --rpc-cors=all --ws-port 9989 --rpc-methods=Unsafe --name flipchan_testing --max-runtime-instances 256  --ws-max-out-buffer-capacity=9999 --rpc-max-payload=9991024                                &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15090" PostHistoryTypeId="1" PostId="4020" RevisionGUID="9e9aa29f-5977-43f5-8c27-032711b08c6e" CreationDate="2022-07-31T13:45:41.990" UserId="560" Text="fork-off-substrate dying at 37% with rpc max size disconnect" ContentLicense="CC BY-SA 4.0" />
  <row Id="15091" PostHistoryTypeId="3" PostId="4020" RevisionGUID="9e9aa29f-5977-43f5-8c27-032711b08c6e" CreationDate="2022-07-31T13:45:41.990" UserId="560" Text="|substrate-node|rpc|websocket|wss|fork|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15092" PostHistoryTypeId="50" PostId="3555" RevisionGUID="72cd971f-6dd2-4fdb-af44-5c3236071578" CreationDate="2022-07-31T18:07:50.723" UserId="-1" />
  <row Id="15093" PostHistoryTypeId="2" PostId="4021" RevisionGUID="b16bc343-0706-4e3c-8067-dba9ba7a1c8d" CreationDate="2022-07-31T21:52:25.880" UserId="2956" Text="I am working on an exercise involving liquid staking, where two different tokens are managed. It was suggested to me that I might try instantiating the Balances pallet twice, following the pattern of the full node instantiating the Collective pallet for both the Council and the TechnicalCommittee. &#xD;&#xA;&#xD;&#xA;In testing, I am finding that the two instances are writing to the same location in storage, so that the balances of one token overwrite those of the other.&#xD;&#xA;&#xD;&#xA;Example is here: https://github.com/psfblair/polkadot-academy-final-exam/commit/69a4cd5bc2caa6320a2e2034c59dcfa6a8802038&#xD;&#xA;&#xD;&#xA;Details of testing:&#xD;&#xA;```&#xD;&#xA;Desired initial state:&#xD;&#xA;    user_account: Main: 10, Derivative: 70&#xD;&#xA;    pot_account: Main: 20, Derivative: 160&#xD;&#xA;&#xD;&#xA;Additional state changes to be triggered during test:&#xD;&#xA;    user sends 3 units of main token to pot&#xD;&#xA;    pot sends 3 units of derivative token to user&#xD;&#xA;&#xD;&#xA;Expected final state:&#xD;&#xA;    user_account: Main: 7, Derivative: 73&#xD;&#xA;    pot_account: Main: 23, Derivative: 157&#xD;&#xA;&#xD;&#xA;Actual final state:&#xD;&#xA;    user_account: Main: 70, Derivative: 70&#xD;&#xA;    pot_account: Main: 160, Derivative: 160&#xD;&#xA;```&#xD;&#xA;When storage is initialized, the main balances are done first, and then the derivative balances. It appears that the derivative balances are overwriting the first (and then no transactions are made afterwards).&#xD;&#xA;&#xD;&#xA;Here are some relevant excerpts from the code. From mock.rs, there are two instances of the balances pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type MainToken = pallet_balances::Instance1;&#xD;&#xA;impl pallet_balances::Config&lt;MainToken&gt; for Test {&#xD;&#xA;	type MaxLocks = frame_support::traits::ConstU32&lt;1024&gt;;&#xD;&#xA;	type MaxReserves = ();&#xD;&#xA;	type ReserveIdentifier = [u8; 8];&#xD;&#xA;	type Balance = BalanceImpl;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type DustRemoval = ();&#xD;&#xA;	type ExistentialDeposit = ExistentialDeposit;&#xD;&#xA;	type AccountStore = System;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type DerivativeToken = pallet_balances::Instance2;&#xD;&#xA;impl pallet_balances::Config&lt;DerivativeToken&gt; for Test {&#xD;&#xA;	type MaxLocks = frame_support::traits::ConstU32&lt;1024&gt;;&#xD;&#xA;	type MaxReserves = ();&#xD;&#xA;	type ReserveIdentifier = [u8; 8];&#xD;&#xA;	type Balance = BalanceImpl;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type DustRemoval = ();&#xD;&#xA;	type ExistentialDeposit = ExistentialDeposit;&#xD;&#xA;	type AccountStore = System;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The runtime is constructed with the two instances:&#xD;&#xA;```&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;},&#xD;&#xA;		LiquidStakingModule: pallet_liquid_staking::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		MainBalances: pallet_balances::&lt;Instance1&gt;::{Pallet, Call, Storage, Config&lt;T, Instance1&gt;, Event&lt;T, Instance1&gt;},&#xD;&#xA;		DerivativeBalances: pallet_balances::&lt;Instance2&gt;::{Pallet, Call, Storage, Config&lt;T, Instance2&gt;, Event&lt;T, Instance2&gt;},&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;The pallet is configured to allow access to the two different currencies in which the balances are implemented:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl crate::pallet::Config for Test {&#xD;&#xA;	...&#xD;&#xA;	type MainCurrency = MainBalances;&#xD;&#xA;	type DerivativeCurrency = DerivativeBalances;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;`MainCurrency` and `DerivativeCurrency` are used by the pallet in lib.rs for e.g. making transfers.&#xD;&#xA;&#xD;&#xA;Here is how mock.rs initializes the storage. It takes a vector of tuples of (accountId, mainBalance, derivativeBalance) and decomposes them into a vector of (accountId, mainBalance) tuples for the main balance storage, and a vector of (accountId, derivativeBalance) for the derivative balance storage:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn new_test_ext(users: Vec&lt;(u64, u128, u128)&gt;) -&gt; sp_io::TestExternalities {&#xD;&#xA;	let mut storage = frame_system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap();&#xD;&#xA;	GenesisConfig {&#xD;&#xA;		main_balances: MainBalancesConfig {&#xD;&#xA;			balances: users.iter().map(|(account_id, main_balance, _)| (*account_id, *main_balance) ).collect(),&#xD;&#xA;		},&#xD;&#xA;		derivative_balances: DerivativeBalancesConfig {&#xD;&#xA;			balances: users.iter().map(|(account_id, _, derivative_balances)| (*account_id, *derivative_balances) ).collect(),&#xD;&#xA;		},&#xD;&#xA;		..Default::default()&#xD;&#xA;	}&#xD;&#xA;	.assimilate_storage(&amp;mut storage)&#xD;&#xA;	.unwrap();&#xD;&#xA;	&#xD;&#xA;	let mut externalities = sp_io::TestExternalities::new(storage);&#xD;&#xA;	externalities.execute_with(|| System::set_block_number(1));&#xD;&#xA;	externalities&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Is there something else I should be doing to make this work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15095" PostHistoryTypeId="1" PostId="4021" RevisionGUID="b16bc343-0706-4e3c-8067-dba9ba7a1c8d" CreationDate="2022-07-31T21:52:25.880" UserId="2956" Text="How to manage storage when a pallet is instantiated more than once?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15096" PostHistoryTypeId="3" PostId="4021" RevisionGUID="b16bc343-0706-4e3c-8067-dba9ba7a1c8d" CreationDate="2022-07-31T21:52:25.880" UserId="2956" Text="|pallet|balances|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15097" PostHistoryTypeId="2" PostId="4022" RevisionGUID="0c85460a-dc93-45f4-bad2-ce6bff262cad" CreationDate="2022-07-31T23:41:19.080" UserId="28" Text="I believe you need to adjust the `AccountStore` type in the second balances pallet instance to store the balances in the Balances pallet storage.&#xD;&#xA;&#xD;&#xA;See the docs here: https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L495&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_balances::Config for Runtime {&#xD;&#xA;    type AccountStore = StorageMapShim&lt;Self::Account&lt;Runtime&gt;, frame_system::Provider&lt;Runtime&gt;, AccountId, Self::AccountData&lt;Balance&gt;&gt;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Something like that." ContentLicense="CC BY-SA 4.0" />
  <row Id="15099" PostHistoryTypeId="2" PostId="4023" RevisionGUID="a0aa0f83-92cd-42f3-ad97-70239f286569" CreationDate="2022-08-01T04:46:04.893" UserId="354" Text="What I understand from your question is that you want EVM compatibility in your chain, so the best option for that is to integrate EVM pallet to you chain instead of changing in frontier.&#xD;&#xA;&#xD;&#xA;And also you want to implement NPoS using AURA which is quite a difficult task, as NPoS uses [Phragmen Elections][1] which depends on a weighted system and [AURA][2] does not have weighted implementation whereas [BABE][3] implement weights, you can check [here][4]. &#xD;&#xA;&#xD;&#xA;If you want to go with AURA for block production than you need to implement weights in it and accordingly change GRANDPA to make it work properly. &#xD;&#xA;&#xD;&#xA;I hope this helps.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-phragmen&#xD;&#xA;  [2]: https://docs.substrate.io/reference/glossary/#authority-round-aura&#xD;&#xA;  [3]: https://docs.substrate.io/reference/glossary/#blind-assignment-of-blockchain-extension-babe&#xD;&#xA;  [4]: https://stackoverflow.com/questions/58369340/in-substrate-what-is-the-difference-between-babe-aura-and-grandpa" ContentLicense="CC BY-SA 4.0" />
  <row Id="15101" PostHistoryTypeId="2" PostId="4024" RevisionGUID="52b2e29e-32e6-4afd-9e51-1424b07fde0d" CreationDate="2022-08-01T04:51:56.390" UserId="344" Text="I want to write a sanity check that my node has the right session keys configured, based on the stash address:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  let nextKeys = await api.query.session.nextKeys(stash_account);&#xD;&#xA;  console.log(`Node's next keys: ${nextKeys}`);&#xD;&#xA;  console.log(`Node's next keys in hex: ${nextKeys.toHex()}`);&#xD;&#xA;  let nodeHasKeys = await api.rpc.author.hasSessionKeys(nextKeys.toHex());&#xD;&#xA;  console.log(`Node has keys: ${nodeHasKeys}`);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The above always returns False, but it looks like I am getting the right data from the chain (`{&quot;grandpa&quot;:&quot;0x90cac` etc...).&#xD;&#xA;&#xD;&#xA;How to make the above work? I tried `hasSessionKeys(nextKeys)` as well without `.toHex()` but it didn't work either.&#xD;&#xA;&#xD;&#xA;I am trying on Kusama but I'd like the above to work on Polkadot too." ContentLicense="CC BY-SA 4.0" />
  <row Id="15103" PostHistoryTypeId="1" PostId="4024" RevisionGUID="52b2e29e-32e6-4afd-9e51-1424b07fde0d" CreationDate="2022-08-01T04:51:56.390" UserId="344" Text="how to verify that my validator has the right session keys" ContentLicense="CC BY-SA 4.0" />
  <row Id="15104" PostHistoryTypeId="3" PostId="4024" RevisionGUID="52b2e29e-32e6-4afd-9e51-1424b07fde0d" CreationDate="2022-08-01T04:51:56.390" UserId="344" Text="|api|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15105" PostHistoryTypeId="52" PostId="4021" RevisionGUID="71c87b01-348f-41c9-b731-c258d1efd62b" CreationDate="2022-08-01T05:53:27.763" />
  <row Id="15106" PostHistoryTypeId="2" PostId="4025" RevisionGUID="441b2cfd-e569-4b8f-ac60-e85bc7455223" CreationDate="2022-08-01T07:56:40.843" UserId="529" Text="I'm writing a chain-extension for a substrate pallet and one of the pallet's functions takes an input parameter which has type `Permill`.&#xD;&#xA;What would be the way to call such function from the contract/chain-extension?&#xD;&#xA;```&#xD;&#xA;pub fn mint_nft(&#xD;&#xA;          // ---- snip ----&#xD;&#xA;&#xD;&#xA;			royalty: Option&lt;Permill&gt;,&#xD;&#xA;&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15108" PostHistoryTypeId="1" PostId="4025" RevisionGUID="441b2cfd-e569-4b8f-ac60-e85bc7455223" CreationDate="2022-08-01T07:56:40.843" UserId="529" Text="Using Permill in the ink! contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="15109" PostHistoryTypeId="3" PostId="4025" RevisionGUID="441b2cfd-e569-4b8f-ac60-e85bc7455223" CreationDate="2022-08-01T07:56:40.843" UserId="529" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15111" PostHistoryTypeId="2" PostId="4026" RevisionGUID="e8d26360-8c7c-4d07-834c-9470bdb1e93e" CreationDate="2022-08-01T10:38:10.117" UserId="172" Text="I would like to use BABE's randomness for some on-chain logic. IIUC using BABE inside a parachain's runtime is not recommended good practice because there's no fallback for producing blocks if no collator is found, so parachain runtime developers must use Aura.&#xD;&#xA;&#xD;&#xA;Is there a way for me to benefit from BABE's randomness in my parachain's runtime, perhaps from the relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15113" PostHistoryTypeId="1" PostId="4026" RevisionGUID="e8d26360-8c7c-4d07-834c-9470bdb1e93e" CreationDate="2022-08-01T10:38:10.117" UserId="172" Text="How can I use BABE's randomness in my parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15114" PostHistoryTypeId="3" PostId="4026" RevisionGUID="e8d26360-8c7c-4d07-834c-9470bdb1e93e" CreationDate="2022-08-01T10:38:10.117" UserId="172" Text="|runtime|babe|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15115" PostHistoryTypeId="2" PostId="4027" RevisionGUID="8c5d07fb-8077-4e21-91a8-4b5e1eca5522" CreationDate="2022-08-01T11:25:12.880" UserId="2959" Text="I am working on a project that requires a contract to be instantiated and retrieve address in a contract transaction. Here is an implementation done in Cosmwasm https://github.com/digitalnativeinc/standard-cosmwasm/blob/0d92518c512bede566852b10a5f5f065105641c3/contracts/vault_manager/src/contract.rs#L218&#xD;&#xA;&#xD;&#xA;Is there any way I can implement it? I see a discussion at https://github.com/paritytech/ink/issues/6 but I do not see any further action regarding this.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15117" PostHistoryTypeId="1" PostId="4027" RevisionGUID="8c5d07fb-8077-4e21-91a8-4b5e1eca5522" CreationDate="2022-08-01T11:25:12.880" UserId="2959" Text="Is there a way to instantiate a wasm contract code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15118" PostHistoryTypeId="3" PostId="4027" RevisionGUID="8c5d07fb-8077-4e21-91a8-4b5e1eca5522" CreationDate="2022-08-01T11:25:12.880" UserId="2959" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15119" PostHistoryTypeId="5" PostId="3976" RevisionGUID="99c45d1e-4709-44c9-bcb3-0a2b5718f566" CreationDate="2022-08-01T11:39:03.533" UserId="379" Comment="added 1207 characters in body" Text="When trying to run try-runtime I do not get any logs. I also received an error in my local node:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-07-28 14:42:57 Accepting new connection, 1/100&#xD;&#xA;2022-07-28 14:42:57 WS error: i/o error: Transport endpoint is not connected (os error 107); terminate connection 14&#xD;&#xA;2022-07-28 14:42:57 Accepting new connection, 1/100&#xD;&#xA;2022-07-28 14:42:57 WS error: i/o error: Transport endpoint is not connected (os error 107); terminate connection 15&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Output from try-runtime&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace cargo run --release --features=try-runtime try-runtime --execution Native on-runtime-upgrade live --uri ws://localhost:9944&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Finished release [optimized] target(s) in 1.32s&#xD;&#xA;     Running `target/release/tfchain try-runtime --execution Native on-runtime-upgrade live --uri 'ws://localhost:9944'`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My node is on version `polkadot-0.9.24`, I also saw a similar issue here on stackexchange as well as on github (https://github.com/paritytech/substrate/issues/11691) But I am not sure how to fix the problem where I don't have any output logs.&#xD;&#xA;&#xD;&#xA;Not sure if it's a related problem but when I run my node I also don't receive the output log what we used to have on substrate v3. It currently looks like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;➜ ./target/debug/tfchain --dev --ws-external                                                                &#xD;&#xA;2022-08-01 13:38:40 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-08-01 13:38:42  Starting consensus session on top of parent 0x4ffef2a81bdbb08f62e222fff128e5f69938b268117a1b81df76f06117f7dd8b    &#xD;&#xA;2022-08-01 13:38:42 types::NodeContract billed successfully at block: 1    &#xD;&#xA;2022-08-01 13:38:42  Prepared block for proposing at 1 (134 ms) [hash: 0x0679f9497911563cd0a7ee23b28334ab821175472b5541b0989dc23c334b775f; parent_hash: 0x4ffe…dd8b; extrinsics (1): [0xf713…8989]]    &#xD;&#xA;2022-08-01 13:38:42  Pre-sealed block for proposal at 1. Hash now 0x847aa4d6dc62c808f2771c7de0eb6c2a815f662700f8bbd8522401648b3d04d8, previously 0x0679f9497911563cd0a7ee23b28334ab821175472b5541b0989dc23c334b775f.    &#xD;&#xA;2022-08-01 13:38:42 ✨ Imported #1 (0x847a…04d8)    &#xD;&#xA;2022-08-01 13:38:42 offchain worker done.    &#xD;&#xA;2022-08-01 13:38:45  Idle (0 peers), best: #1 (0x847a…04d8), finalized #0 (0x4ffe…dd8b), ⬇ 43 B/s ⬆ 0&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15120" PostHistoryTypeId="2" PostId="4028" RevisionGUID="98063c7b-8116-4559-8e83-90cb6ec02193" CreationDate="2022-08-01T11:53:48.903" UserId="73" Text="Yes, you can use the randomness from the relay chain. It is currently not that easy, but you should be able to do it in the following way:&#xD;&#xA;&#xD;&#xA;In your runtime:&#xD;&#xA;```&#xD;&#xA;impl cumulus_parachain_system::Config for Runtime {&#xD;&#xA;    type OnSystemEvent = MySystemEventHandler;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Wherever `MySystemEventHandler` is implemented:&#xD;&#xA;```&#xD;&#xA;impl OnSystemEvent for MySystemEventHandler {&#xD;&#xA;    fn on_validation_data(data: &amp;PersistedValidationData) {&#xD;&#xA;        let proof = cumulus_parachain_system::RelayChainStateProof::new(my_para_id, data.relay_parent_storage_root, cumulus_parachain_system::Pallet::relay_state_proof()).expect(&quot;Invalid relay chain proof&quot;);&#xD;&#xA;&#xD;&#xA;       use cumulus_primitives_core::relay_chain::well_known_keys as relay_well_known_keys;&#xD;&#xA;       let randomness = proof.read_entry::&lt;schnorrkel::Randomness&gt;(relay_well_known_keys::CURRENT_BLOCK_RANDOMNESS);&#xD;&#xA;    }&#xD;&#xA;    ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There exists three different types of randomness that BABE can provide to you. See [here][1] for a description of each of them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/5abf6c8a015fac28d33967800da7c5c8d53002e3/frame/babe/src/randomness.rs#L27-L121" ContentLicense="CC BY-SA 4.0" />
  <row Id="15122" PostHistoryTypeId="2" PostId="4029" RevisionGUID="68d3671b-7735-41a9-b9a1-29c5008825b1" CreationDate="2022-08-01T12:35:51.240" UserId="2960" Text="where is the test / description for substrate democracy pallets propose&#xD;&#xA;&#xD;&#xA;this is the function I am talking about https://github.com/paritytech/substrate/blob/4d598040e0369b02cd24e8e67eaf317d09f74f85/frame/democracy/src/lib.rs#L629&#xD;&#xA;&#xD;&#xA;is the proposal_hash parameter the hash of the content / description of the change being propose? if so , where is the actual content stored? could it be IPFS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15124" PostHistoryTypeId="1" PostId="4029" RevisionGUID="68d3671b-7735-41a9-b9a1-29c5008825b1" CreationDate="2022-08-01T12:35:51.240" UserId="2960" Text="where is the test / description for substrate democracy pallets propose" ContentLicense="CC BY-SA 4.0" />
  <row Id="15125" PostHistoryTypeId="3" PostId="4029" RevisionGUID="68d3671b-7735-41a9-b9a1-29c5008825b1" CreationDate="2022-08-01T12:35:51.240" UserId="2960" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15126" PostHistoryTypeId="2" PostId="4030" RevisionGUID="f5432dda-f543-4332-8c2b-8a24056432f4" CreationDate="2022-08-01T12:37:24.707" UserId="73" Text="As my [comments][1] is saying, you need to pin `tracing-core` to `0.1.26`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/11691#issuecomment-1159575042" ContentLicense="CC BY-SA 4.0" />
  <row Id="15128" PostHistoryTypeId="2" PostId="4031" RevisionGUID="9636f599-305a-407b-a716-ed436d4151bb" CreationDate="2022-08-01T12:45:09.937" UserId="2961" Text="a question about block limit, the amount of bytes that can be stored in each block. From what i can gather this value can be changed [Here][1], However when i change the 5 to lets say 20 (5mb to 20mb) I still get (Invalid Transaction: Transaction would exhaust the block limits) error at the same amount of transactions. Just for clarification I am using the utility pallet for batching these transactions. So im guessing there is something else that must be done to increase block size!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/d6f219c653f05aeb0663aaa05c9d6d62f93d00e4/runtime/src/lib.rs#L142" ContentLicense="CC BY-SA 4.0" />
  <row Id="15130" PostHistoryTypeId="1" PostId="4031" RevisionGUID="9636f599-305a-407b-a716-ed436d4151bb" CreationDate="2022-08-01T12:45:09.937" UserId="2961" Text="Increasing Block Size" ContentLicense="CC BY-SA 4.0" />
  <row Id="15131" PostHistoryTypeId="3" PostId="4031" RevisionGUID="9636f599-305a-407b-a716-ed436d4151bb" CreationDate="2022-08-01T12:45:09.937" UserId="2961" Text="|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15132" PostHistoryTypeId="2" PostId="4032" RevisionGUID="48374483-23af-4ddf-a751-2efb4d5a541c" CreationDate="2022-08-01T12:57:09.767" UserId="73" Text="You not only need to allow the block to get bigger, you also need to allow a higher `BlockWeights`. The `BlockWeights` is a parameter given to the `frame_system::Config` trait. It defines the amount of weight you allow per transaction type. If you don't increase that, you will not be able to push more transactions per block." ContentLicense="CC BY-SA 4.0" />
  <row Id="15134" PostHistoryTypeId="2" PostId="4033" RevisionGUID="e4bb904d-ee3d-4b26-aaf3-9075045961b7" CreationDate="2022-08-01T13:11:51.073" UserId="1951" Text="you can take a look at [Redspot](https://github.com/patractlabs/redspot), but it does not seem to be maintained anymore.&#xD;&#xA;Generally, you can write integration tests using `polkadot.js`." ContentLicense="CC BY-SA 4.0" />
  <row Id="15136" PostHistoryTypeId="2" PostId="4034" RevisionGUID="615cdb9d-5f54-4fbc-8314-2624353db123" CreationDate="2022-08-01T13:17:32.147" UserId="1951" Text="With Rust, it's a bit more complicated than with JS/TS.&#xD;&#xA;&#xD;&#xA;Here's an example of how to call a contract using `subxt`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// assuming you have `api` and the contract address&#xD;&#xA;let mut call_data = Vec::&lt;u8&gt;::new();&#xD;&#xA;        //append the selector&#xD;&#xA;call_data.append(&amp;mut (&amp;blake2_256(&quot;method_name&quot;.as_bytes())[0..4]).to_vec());&#xD;&#xA;        //append the arguments&#xD;&#xA;call_data.append(&amp;mut scale::Encode::encode(&amp;(&#xD;&#xA;            AccountId32::from_string(&amp;arg1).ok()?,&#xD;&#xA;            arg2,&#xD;&#xA;            arg3,&#xD;&#xA;        )));&#xD;&#xA;api.tx().contracts().call(&#xD;&#xA;            AccountId32::from_string(contract).ok()?.into(), // contract address&#xD;&#xA;            0, // transferred_value&#xD;&#xA;            20_000_000_000, // gas limit&#xD;&#xA;            None, // storage deposit limit&#xD;&#xA;            call_data, // the call data&#xD;&#xA;        ))&#xD;&#xA;        .sign_and_submit(&amp;signer) // your signer object&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15138" PostHistoryTypeId="2" PostId="4035" RevisionGUID="0a63b329-c916-423e-9165-93f4e972bf00" CreationDate="2022-08-01T13:32:35.887" UserId="1951" Text="Basically, the transaction pool deduplicates the transactions using `provides` tags. Right now, if you `provide` two equal values for different transactions, only one will be admitted to the tx pool and later included in the block.&#xD;&#xA;Let's say you have the following code for validating a transaction:&#xD;&#xA;```rust&#xD;&#xA;ValidTransaction::with_tag_prefix(&quot;MyPallet&quot;)&#xD;&#xA;						.priority(TransactionPriority::MAX)&#xD;&#xA;						.longevity(10)&#xD;&#xA;						.propagate(true)&#xD;&#xA;						.and_provides(value_1)&#xD;&#xA;                        .and_provides(value_2)&#xD;&#xA;						.build()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, if you have two transactions with an overlap in **EITHER**  `value_1` or `value_2`, one of the transactions will be dropped. That's how the transaction pool deduplicates transactions." ContentLicense="CC BY-SA 4.0" />
  <row Id="15140" PostHistoryTypeId="5" PostId="4029" RevisionGUID="552df332-718e-4528-ad66-e8d9ca896fbf" CreationDate="2022-08-01T13:43:13.553" UserId="2960" Comment="edited body; edited title" Text="where is the actual text/description for the democracy pallet propose function &#xD;&#xA;this is the function I am talking about https://github.com/paritytech/substrate/blob/4d598040e0369b02cd24e8e67eaf317d09f74f85/frame/democracy/src/lib.rs#L629&#xD;&#xA;is the proposal_hash parameter the hash of the content / description of the change being proposed? if so , where is the actual content stored? could it be IPFS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15141" PostHistoryTypeId="4" PostId="4029" RevisionGUID="552df332-718e-4528-ad66-e8d9ca896fbf" CreationDate="2022-08-01T13:43:13.553" UserId="2960" Comment="edited body; edited title" Text="where is the text / description for substrate democracy pallets propose" ContentLicense="CC BY-SA 4.0" />
  <row Id="15143" PostHistoryTypeId="2" PostId="4036" RevisionGUID="9b02f6cc-e697-4888-8df6-51ae154e9f65" CreationDate="2022-08-01T13:50:38.633" UserId="172" Text="It seems like Moonbeam/Moonriver has a way to do this using a runtime API for client side VRF verification (see: [full code snip](https://github.com/PureStake/moonbeam/blob/4e2a5785424be6faa01cd14e90155d9d2ec734ee/runtime/moonbase/src/lib.rs#L1110-L1126) and [original PR](https://github.com/PureStake/moonbeam/pull/1376)):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct BabeDataGetter;&#xD;&#xA;impl pallet_randomness::GetBabeData&lt;u64, Option&lt;Hash&gt;&gt; for BabeDataGetter {&#xD;&#xA;	// Tolerate panic here because only ever called in inherent (so can be omitted)&#xD;&#xA;	fn get_epoch_index() -&gt; u64 {&#xD;&#xA;		relay_chain_state_proof()&#xD;&#xA;			.read_optional_entry(relay_chain::well_known_keys::EPOCH_INDEX)&#xD;&#xA;			.ok()&#xD;&#xA;			.flatten()&#xD;&#xA;			.expect(&quot;expected to be able to read epoch index from relay chain state proof&quot;)&#xD;&#xA;	}&#xD;&#xA;	fn get_epoch_randomness() -&gt; Option&lt;Hash&gt; {&#xD;&#xA;		relay_chain_state_proof()&#xD;&#xA;			.read_optional_entry(relay_chain::well_known_keys::ONE_EPOCH_AGO_RANDOMNESS)&#xD;&#xA;			.ok()&#xD;&#xA;			.flatten()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_randomness::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type AddressMapping = moonbeam_runtime_common::IntoAddressMapping;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type BabeDataGetter = BabeDataGetter; // &lt;--- used here&#xD;&#xA;    ...&#xD;&#xA; }&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15149" PostHistoryTypeId="2" PostId="4038" RevisionGUID="1617256b-3b2d-4fb8-aa75-96ef033406de" CreationDate="2022-08-01T15:28:00.980" UserId="251" Text="Before you propose the proposal, you need to [submit a preimage](https://github.com/paritytech/substrate/blob/4d598040e0369b02cd24e8e67eaf317d09f74f85/frame/democracy/src/lib.rs#L1001).&#xD;&#xA;&#xD;&#xA;And the data was [stored on the chain](https://github.com/paritytech/substrate/blob/4d598040e0369b02cd24e8e67eaf317d09f74f85/frame/democracy/src/lib.rs#L1891).&#xD;&#xA;&#xD;&#xA;It could be IPFS (in some ways). You could upload your proposal content to IPFS, then use the link as the preimage data." ContentLicense="CC BY-SA 4.0" />
  <row Id="15155" PostHistoryTypeId="2" PostId="4040" RevisionGUID="80fd72a1-0eaa-43ef-993b-819c84d4db92" CreationDate="2022-08-01T15:29:09.017" UserId="555" Text="How I can get the **previous block** time using timestamp pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="15157" PostHistoryTypeId="1" PostId="4040" RevisionGUID="80fd72a1-0eaa-43ef-993b-819c84d4db92" CreationDate="2022-08-01T15:29:09.017" UserId="555" Text="How to get previous block time using timestamp" ContentLicense="CC BY-SA 4.0" />
  <row Id="15158" PostHistoryTypeId="3" PostId="4040" RevisionGUID="80fd72a1-0eaa-43ef-993b-819c84d4db92" CreationDate="2022-08-01T15:29:09.017" UserId="555" Text="|substrate-node-template|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15159" PostHistoryTypeId="2" PostId="4041" RevisionGUID="edadab63-d390-415d-90c5-2768e5be4b7b" CreationDate="2022-08-01T15:36:36.967" UserId="251" Text="It looks like that fork-off-substrate was not maintained actively.&#xD;&#xA;&#xD;&#xA;You could try the [subalfred](https://github.com/hack-ink/subalfred).&#xD;&#xA;&#xD;&#xA;It uses WS/Rust/Async. So, it's really fast. For me, it scrapes 200k pairs in 10 seconds (in localhost). If you are connecting to a remote node, the network would be the bottleneck.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./node build-spec --chain xxx-dev --raw &gt; xxx.json&#xD;&#xA;&#xD;&#xA;subalfred export-state ws://localhost:9944--fork-off --simple-governance --skip-pallets Staking --output xxx.json --log subalfred::core::node,subalfred::core::substrate_client&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`--simple-governance` will replace the council and tech.comm member with `//Alice`.&#xD;&#xA;&#xD;&#xA;`--skip-pallets` could skip some large pallets if you want.&#xD;&#xA;&#xD;&#xA;It needs an xxx.json to generate a runnable spec file. If you just want the storage data. You could use `--output &lt;any name&gt;` or drop this option (it will export data to a export.json file)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15161" PostHistoryTypeId="52" PostId="4026" RevisionGUID="e2c3b80b-a5f1-450f-bc9e-13cee85f9905" CreationDate="2022-08-01T18:38:30.527" />
  <row Id="15163" PostHistoryTypeId="2" PostId="4042" RevisionGUID="ee950451-b3af-499f-9446-1f79391c5b67" CreationDate="2022-08-01T19:07:15.737" UserId="29" Text="As stated in that screenshot, the code needs to be in bytes.&#xD;&#xA;&#xD;&#xA;I recommend you read the following tutorials:&#xD;&#xA;- https://docs.substrate.io/tutorials/smart-contracts&#xD;&#xA;&#xD;&#xA;Typically the process is as follows:&#xD;&#xA;&#xD;&#xA;1. Write your smart contract using [ink!](https://github.com/paritytech/ink)&#xD;&#xA;2. Build your ink! smart contract using [cargo-contract](https://github.com/paritytech/cargo-contract) CLI tool (you could even upload using this tool)&#xD;&#xA;3. Use [contracts-ui](https://github.com/paritytech/contracts-ui) or [polkadotJS apps](https://polkadot.js.org/apps/#/explorer) to upload/instantiate your ink! smart contract&#xD;&#xA;&#xD;&#xA;Below you have [polkadotJS apps](https://polkadot.js.org/apps/#/explorer) and [contracts-ui](https://github.com/paritytech/contracts-ui) respectively. Notice how there is a file upload where you either upload the Wasm file or in the [contracts-ui](https://github.com/paritytech/contracts-ui) interface you upload the contracts file (which also include the Wasm for the contract along with some additional metadata).&#xD;&#xA;&#xD;&#xA;[polkadotJS apps](https://polkadot.js.org/apps/#/explorer)&#xD;&#xA;![](https://i.stack.imgur.com/HKgU9.png)&#xD;&#xA;In the above notice how once the Wasm is uploaded, you get the highlighted `code`. This is the `code` that your substrate-front-end-template is asking for. You can copy that, add a `0x` prefix, and paste it in your substrate-front-end-template and it should work. You can confirm by looking in chain state &gt; contracts &gt; codeStorage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[contracts-ui](https://github.com/paritytech/contracts-ui)&#xD;&#xA;![](https://i.stack.imgur.com/pd8Cl.png)&#xD;&#xA;&#xD;&#xA;Notice how the contracts file also includes the Wasm.&#xD;&#xA;![](https://i.stack.imgur.com/OkDaJ.png)&#xD;&#xA;&#xD;&#xA;Remember that regardless of which UI you use, you will need the underlying substrate node to be running the [contracts pallet](https://github.com/paritytech/substrate/tree/master/frame/contracts). You can either configure this pallet into your node yourself or you can use the pre-configured [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15165" PostHistoryTypeId="5" PostId="4042" RevisionGUID="722da660-14a2-4769-9595-a4cb9879a558" CreationDate="2022-08-01T19:21:16.203" UserId="29" Comment="added 5 characters in body" Text="I recommend you read the following tutorials:&#xD;&#xA;- https://docs.substrate.io/tutorials/smart-contracts&#xD;&#xA;&#xD;&#xA;Typically the process is as follows:&#xD;&#xA;&#xD;&#xA;1. Write your smart contract using [ink!](https://github.com/paritytech/ink)&#xD;&#xA;2. Build your ink! smart contract using [cargo-contract](https://github.com/paritytech/cargo-contract) CLI tool (you could even upload using this tool)&#xD;&#xA;3. Use [contracts-ui](https://github.com/paritytech/contracts-ui) or [polkadotJS apps](https://polkadot.js.org/apps/#/explorer) to upload/instantiate your ink! smart contract&#xD;&#xA;&#xD;&#xA;Below you have [polkadotJS apps](https://polkadot.js.org/apps/#/explorer) and [contracts-ui](https://github.com/paritytech/contracts-ui) respectively. Notice how there is a file upload where you either upload the Wasm file or in the [contracts-ui](https://github.com/paritytech/contracts-ui) interface you upload the contracts file (which also includes the Wasm for the contract along with some additional metadata).&#xD;&#xA;&#xD;&#xA;[polkadotJS apps](https://polkadot.js.org/apps/#/explorer)&#xD;&#xA;![](https://i.stack.imgur.com/HKgU9.png)&#xD;&#xA;&#xD;&#xA;In the above notice how once the Wasm is uploaded, you get the highlighted `code`. This is the `code` that your substrate-front-end-template is asking for. You can copy that, add a `0x` prefix, and paste it in your substrate-front-end-template and it should work. You can confirm by looking in chain state &gt; contracts &gt; codeStorage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[contracts-ui](https://github.com/paritytech/contracts-ui)&#xD;&#xA;![](https://i.stack.imgur.com/pd8Cl.png)&#xD;&#xA;&#xD;&#xA;Notice how the contracts file also includes the Wasm.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/OkDaJ.png)&#xD;&#xA;&#xD;&#xA;Remember that regardless of which UI you use, you will need the underlying substrate node to be running the [contracts pallet](https://github.com/paritytech/substrate/tree/master/frame/contracts). You can either configure this pallet into your node yourself or you can use the pre-configured [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15166" PostHistoryTypeId="5" PostId="4042" RevisionGUID="542133d7-9b36-4e84-9b29-e724f182b9f3" CreationDate="2022-08-01T20:21:09.173" UserId="29" Comment="added 11 characters in body" Text="I recommend you read the following tutorials:&#xD;&#xA;- https://docs.substrate.io/tutorials/smart-contracts&#xD;&#xA;&#xD;&#xA;Typically the process is as follows:&#xD;&#xA;&#xD;&#xA;1. Write your smart contract using [ink!](https://github.com/paritytech/ink)&#xD;&#xA;2. Build your ink! smart contract using [cargo-contract](https://github.com/paritytech/cargo-contract) CLI tool (you could even upload using this tool)&#xD;&#xA;3. Use [contracts-ui](https://github.com/paritytech/contracts-ui) or [polkadotJS apps](https://polkadot.js.org/apps/#/explorer) or similar to upload/instantiate your ink! smart contract&#xD;&#xA;&#xD;&#xA;Below you have [polkadotJS apps](https://polkadot.js.org/apps/#/explorer) and [contracts-ui](https://github.com/paritytech/contracts-ui) respectively. Notice how there is a file upload where you either upload the Wasm file or in the [contracts-ui](https://github.com/paritytech/contracts-ui) interface you upload the contracts file (which also includes the Wasm for the contract along with some additional metadata).&#xD;&#xA;&#xD;&#xA;[polkadotJS apps](https://polkadot.js.org/apps/#/explorer)&#xD;&#xA;![](https://i.stack.imgur.com/HKgU9.png)&#xD;&#xA;&#xD;&#xA;In the above notice how once the Wasm is uploaded, you get the highlighted `code`. This is the `code` that your substrate-front-end-template is asking for. You can copy that, add a `0x` prefix, and paste it in your substrate-front-end-template and it should work. You can confirm by looking in chain state &gt; contracts &gt; codeStorage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[contracts-ui](https://github.com/paritytech/contracts-ui)&#xD;&#xA;![](https://i.stack.imgur.com/pd8Cl.png)&#xD;&#xA;&#xD;&#xA;Notice how the contracts file also includes the Wasm.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/OkDaJ.png)&#xD;&#xA;&#xD;&#xA;Remember that regardless of which UI you use, you will need the underlying substrate node to be running the [contracts pallet](https://github.com/paritytech/substrate/tree/master/frame/contracts). You can either configure this pallet into your node yourself or you can use the pre-configured [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15167" PostHistoryTypeId="2" PostId="4043" RevisionGUID="57064115-e210-4604-ba20-d19bcab60021" CreationDate="2022-08-01T21:04:36.780" UserId="2947" Text="I have tried following instructions from:&#xD;&#xA;&#xD;&#xA;https://rustrepo.com/repo/paritytech-substrate-contracts-node&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;https://ink.substrate.io/faq/#how-do-i-print-something-to-the-console-from-the-runtime&#xD;&#xA;&#xD;&#xA;My process:  &#xD;&#xA;&#xD;&#xA;1 - Add debug statements to the contract code:&#xD;&#xA;&#xD;&#xA;    #[ink(constructor)]&#xD;&#xA;    pub fn new() -&gt; Self {&#xD;&#xA;      ink_env::debug_println!(&quot;created new instance at {}&quot;, Self::env().block_number());&#xD;&#xA;      Self {}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn sayhello(&amp;self) {&#xD;&#xA;      ink_env::debug_println!(&quot;Hello&quot;);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;2 - build:  `cargo +nightly contract build`.&#xD;&#xA;&#xD;&#xA;OUTPUT: &#xD;&#xA;&#xD;&#xA;    Original wasm size: 32.7K, Optimized: 11.1K&#xD;&#xA;    &#xD;&#xA;    The contract was built in DEBUG mode.&#xD;&#xA;    &#xD;&#xA;    Your contract artifacts are ready. You can find them in:&#xD;&#xA;    /home/IamDeveloper/MySoftwareProjects/blockchain/rust/rust-substrate-blockchain-projects/my-first-substrate-projects/my-first-project-prep-lesson/my-first-smart-contracts/helloworld/target/ink&#xD;&#xA;    &#xD;&#xA;      - helloworld.contract (code + metadata)&#xD;&#xA;      - helloworld.wasm (the contract's code)&#xD;&#xA;      - metadata.json (the contract's metadata)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;3 - In another terminal, run the node:&#xD;&#xA;&#xD;&#xA;    substrate-contracts-node --dev -lerror,runtime::contracts=debug&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;4 - In the original terminal, upload:&#xD;&#xA;&#xD;&#xA;    cargo contract upload --suri //Alice&#xD;&#xA;&#xD;&#xA;5 - Get the code hash:&#xD;&#xA;&#xD;&#xA;    code_hash=0xfd548906549af08bbb8bdd436f46b457d2b6ea9f8b6610e9515b3c4e7fe22d9c&#xD;&#xA;&#xD;&#xA;6 - Instantiate:&#xD;&#xA;&#xD;&#xA;    cargo contract instantiate \&#xD;&#xA;      --gas 500000000000 \&#xD;&#xA;      --constructor new \&#xD;&#xA;      --suri //Alice \&#xD;&#xA;      --code-hash $code_hash&#xD;&#xA;&#xD;&#xA;7 - Get the Contract:&#xD;&#xA;&#xD;&#xA;    Contract=5E4V3mvaf2nYKLRJJMNhc6TXrM5GxNwsga4hESRPquCXEyu1&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;8 - Call:&#xD;&#xA;&#xD;&#xA;    cargo contract call \&#xD;&#xA;      --gas 500000000000 \&#xD;&#xA;      --message sayhello \&#xD;&#xA;      --suri //Alice \&#xD;&#xA;      --contract $Contract&#xD;&#xA;&#xD;&#xA;RESULT:&#xD;&#xA;No output at all from the terminal running the node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15169" PostHistoryTypeId="1" PostId="4043" RevisionGUID="57064115-e210-4604-ba20-d19bcab60021" CreationDate="2022-08-01T21:04:36.780" UserId="2947" Text="How to get Rust contract methods to output/print when running on substrate-contracts-node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15170" PostHistoryTypeId="3" PostId="4043" RevisionGUID="57064115-e210-4604-ba20-d19bcab60021" CreationDate="2022-08-01T21:04:36.780" UserId="2947" Text="|rust|substrate-contracts-node|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15171" PostHistoryTypeId="2" PostId="4044" RevisionGUID="2cbafecb-9e83-4b29-966e-4a1744607963" CreationDate="2022-08-01T22:34:04.190" UserId="172" Text="&#xD;&#xA;The `frame_sysem` pallet has an extrinsic called `remark` declared as such:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;		#[pallet::weight(T::SystemWeightInfo::remark(_remark.len() as u32))]&#xD;&#xA;		pub fn remark(origin: OriginFor&lt;T&gt;, _remark: Vec&lt;u8&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			ensure_signed_or_root(origin)?;&#xD;&#xA;			Ok(().into())&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It's particularly interesting because it emits no events and makes no update to storage, yet a user can call it as a signed extrinsic with a `Vec&lt;u8&gt;` as an input.&#xD;&#xA;&#xD;&#xA;I don't see a way to explicitly query the outcome of this call, there seems to be no tested for it too. So I'm curious: where does this `Vec&lt;u8&gt;` actually go and how can I verify it behaves as expected? " ContentLicense="CC BY-SA 4.0" />
  <row Id="15173" PostHistoryTypeId="1" PostId="4044" RevisionGUID="2cbafecb-9e83-4b29-966e-4a1744607963" CreationDate="2022-08-01T22:34:04.190" UserId="172" Text="Wha happens when I call `System::remark`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15174" PostHistoryTypeId="3" PostId="4044" RevisionGUID="2cbafecb-9e83-4b29-966e-4a1744607963" CreationDate="2022-08-01T22:34:04.190" UserId="172" Text="|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15175" PostHistoryTypeId="2" PostId="4045" RevisionGUID="14419867-94b9-412e-869d-ea0be5a91fe1" CreationDate="2022-08-01T22:54:25.067" UserId="703" Text="I have been working on creating a guide to port Solidity smart contracts to ink! smart contracts. I was hoping for some input on how to best handle Solidity's `uint256` in ink!.&#xD;&#xA;&#xD;&#xA;Solidity is optimized for 256 bit / 32 byte words. So, many Solidity smart contracts use `uint256` as a way to save on gas (but not necessarily storage). ink! does not have a `u256` built in. To me, it seems like the size of a `u128` (largest primitive numerical type in ink!) would be more than sufficient to represent most non-hash numerical values.&#xD;&#xA;&#xD;&#xA;So, I am thinking that the proper route for this is to reduce the `uint256` to a more appropriate size in ink!. Or if absolutely necessary, create a wrapper around a `[u64; 4]`.&#xD;&#xA;&#xD;&#xA;Does this seem like an appropriate approach? Also, are there any similar word-size optimizations for ink! / Wasm?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15177" PostHistoryTypeId="1" PostId="4045" RevisionGUID="14419867-94b9-412e-869d-ea0be5a91fe1" CreationDate="2022-08-01T22:54:25.067" UserId="703" Text="Best way to handle Solidity's `uint256` in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="15178" PostHistoryTypeId="3" PostId="4045" RevisionGUID="14419867-94b9-412e-869d-ea0be5a91fe1" CreationDate="2022-08-01T22:54:25.067" UserId="703" Text="|ink|smart-contract|wasm|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15179" PostHistoryTypeId="2" PostId="4046" RevisionGUID="2650c505-cb99-4ac2-910b-7056e2905068" CreationDate="2022-08-01T23:07:26.087" UserId="28" Text="It goes into the block as a valid extrinsic. The data included in the remark will then forever be a part of the blockchain as an extrinsic that can be found in a block, and not part of some underlying state transition." ContentLicense="CC BY-SA 4.0" />
  <row Id="15181" PostHistoryTypeId="2" PostId="4047" RevisionGUID="180dab5e-acf1-4efc-916c-5cdf863962ae" CreationDate="2022-08-01T23:15:48.043" UserId="172" Text="For example, there's a FRAME pallet called [Remark](https://github.com/paritytech/substrate/tree/master/frame/remark) which does one thing: it allows storing data in externalities that can access the node's storage via a runtime interface. If integrated into a runtime, this would enable any user to call a signed extrinsic that stores some data off-chain. To do this, it makes use of a host function declared in `sp_io` called `transaction_index::index`.&#xD;&#xA;&#xD;&#xA;As I understand it, it just stores an index of calls on the client's storage, which correspond to some `Option&lt;Hash&gt;`. This is done by `primitives::state_machine::storage_index_transaction`. What's not clear to me is that the function it calls is unimplemented:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait Externalities: ExtensionStore {&#xD;&#xA;    // -- snip --&#xD;&#xA;	/// Index specified transaction slice and store it.&#xD;&#xA;	fn storage_index_transaction(&amp;mut self, _index: u32, _hash: &amp;[u8], _size: u32) {&#xD;&#xA;		unimplemented!(&quot;storage_index_transaction&quot;);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How does transaction indexing work here and what is the intended purpose of having this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15183" PostHistoryTypeId="1" PostId="4047" RevisionGUID="180dab5e-acf1-4efc-916c-5cdf863962ae" CreationDate="2022-08-01T23:15:48.043" UserId="172" Text="What is transaction indexing in externalities useful for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15184" PostHistoryTypeId="3" PostId="4047" RevisionGUID="180dab5e-acf1-4efc-916c-5cdf863962ae" CreationDate="2022-08-01T23:15:48.043" UserId="172" Text="|offchain-storage|host-functions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15185" PostHistoryTypeId="5" PostId="4044" RevisionGUID="e7597906-226b-43c3-979c-5c8559095ff0" CreationDate="2022-08-01T23:30:33.843" UserId="172" Comment="deleted 1 character in body" Text="&#xD;&#xA;The `frame_sysem` pallet has an extrinsic called `remark` declared as such:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;		#[pallet::weight(T::SystemWeightInfo::remark(_remark.len() as u32))]&#xD;&#xA;		pub fn remark(origin: OriginFor&lt;T&gt;, _remark: Vec&lt;u8&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			ensure_signed_or_root(origin)?;&#xD;&#xA;			Ok(().into())&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It's particularly interesting because it emits no events and makes no update to storage, yet a user can call it as a signed extrinsic with a `Vec&lt;u8&gt;` as an input.&#xD;&#xA;&#xD;&#xA;I don't see a way to explicitly query the outcome of this call, there seems to be no tests for it too. So I'm curious: where does this `Vec&lt;u8&gt;` actually go and how can I verify it behaves as expected? " ContentLicense="CC BY-SA 4.0" />
  <row Id="15186" PostHistoryTypeId="2" PostId="4048" RevisionGUID="f519bb54-f821-412c-bf86-07a03c8305bf" CreationDate="2022-08-02T00:01:16.953" UserId="2307" Text="I'm trying to connect to local node using polkadot/api library but when I start my project it return this error in the library&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is my code:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/RLNxD.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/C340y.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15188" PostHistoryTypeId="1" PostId="4048" RevisionGUID="f519bb54-f821-412c-bf86-07a03c8305bf" CreationDate="2022-08-02T00:01:16.953" UserId="2307" Text="Cannot connect to local node using polkadot/api library. Return error unexpected character '#' in the library" ContentLicense="CC BY-SA 4.0" />
  <row Id="15189" PostHistoryTypeId="3" PostId="4048" RevisionGUID="f519bb54-f821-412c-bf86-07a03c8305bf" CreationDate="2022-08-02T00:01:16.953" UserId="2307" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15190" PostHistoryTypeId="5" PostId="4041" RevisionGUID="7b325fdd-8388-421c-b123-170cbf5e3c7c" CreationDate="2022-08-02T01:02:19.890" UserId="251" Comment="added 1 character in body" Text="It looks like that fork-off-substrate was not maintained actively.&#xD;&#xA;&#xD;&#xA;You could try the [subalfred](https://github.com/hack-ink/subalfred).&#xD;&#xA;&#xD;&#xA;It uses WS/Rust/Async. So, it's really fast. For me, it scrapes 200k pairs in 10 seconds (in localhost). If you are connecting to a remote node, the network would be the bottleneck.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./node build-spec --chain xxx-dev --raw &gt; xxx.json&#xD;&#xA;&#xD;&#xA;subalfred export-state ws://localhost:9944 --fork-off --simple-governance --skip-pallets Staking --output xxx.json --log subalfred::core::node,subalfred::core::substrate_client&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`--simple-governance` will replace the council and tech.comm member with `//Alice`.&#xD;&#xA;&#xD;&#xA;`--skip-pallets` could skip some large pallets if you want.&#xD;&#xA;&#xD;&#xA;Use `subalfred export-state --help` to see other options detail.&#xD;&#xA;&#xD;&#xA;It needs an xxx.json to generate a runnable spec file. If you just want the storage data. You could use `--output &lt;any name&gt;` or drop this option (it will export data to a export.json file)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15191" PostHistoryTypeId="2" PostId="4049" RevisionGUID="3368d932-9ecd-4d91-96a5-41b9319dbf6b" CreationDate="2022-08-02T01:19:44.507" UserId="2060" Text="The error means you need to use a babel loader that supports [private class fields][1].&#xD;&#xA;&#xD;&#xA;We also ran into this issue, and fixed it with proper build config. We have a working build [here][2] but we're using TypeScript not JavaScript.  Maybe that might help you.&#xD;&#xA;&#xD;&#xA;It also looks like you aren't the only one, someone reported [something like it][3] earlier this year.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields&#xD;&#xA;  [2]: https://github.com/LibertyDSNP/example-client-frequency&#xD;&#xA;  [3]: https://github.com/polkadot-js/api/issues/4500" ContentLicense="CC BY-SA 4.0" />
  <row Id="15193" PostHistoryTypeId="2" PostId="4050" RevisionGUID="875244d4-f1f6-43b9-adf2-e09a39cb87d5" CreationDate="2022-08-02T01:38:40.537" UserId="2947" Text="I have this in my single Javascript client.js that I am going to run with node.  It's just the single file; was not created as a node project. (no npm init):&#xD;&#xA;&#xD;&#xA;    const { WsProvider, ApiPromise } = require('@polkadot/api');&#xD;&#xA;    const { ContractPromise } = require('@polkadot/api-contract');&#xD;&#xA;&#xD;&#xA;When I attemp to run it, I get (just a sample of a long list):&#xD;&#xA;&#xD;&#xA;    @polkadot/util has multiple versions, ensure that there is only one installed.&#xD;&#xA;    Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;    The following conflicting packages were found:&#xD;&#xA;            cjs 10.1.1      node_modules/@polkadot/api/node_modules/@polkadot/util/cjs&#xD;&#xA;            cjs 10.1.2      node_modules/@polkadot/api-contract/node_modules/@polkadot/util/cjs&#xD;&#xA;    @polkadot/types has multiple versions, ensure that there is only one installed.&#xD;&#xA;    Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;    The following conflicting packages were found:&#xD;&#xA;            cjs 8.14.1      node_modules/@polkadot/api/node_modules/@polkadot/types/cjs&#xD;&#xA;            cjs 9.0.1       node_modules/@polkadot/api-contract/node_modules/@polkadot/types/cjs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15195" PostHistoryTypeId="1" PostId="4050" RevisionGUID="875244d4-f1f6-43b9-adf2-e09a39cb87d5" CreationDate="2022-08-02T01:38:40.537" UserId="2947" Text="How do I correctly require @polkadot/api and @polkadot/api-contract without causing a conflict?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15196" PostHistoryTypeId="3" PostId="4050" RevisionGUID="875244d4-f1f6-43b9-adf2-e09a39cb87d5" CreationDate="2022-08-02T01:38:40.537" UserId="2947" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15197" PostHistoryTypeId="5" PostId="4050" RevisionGUID="90798e64-6e63-43bb-92c2-d61adf34c884" CreationDate="2022-08-02T02:10:44.110" UserId="2947" Comment="added 403 characters in body" Text="I have this in my single Javascript client.js that I am going to run with node.  It's just the single file; was not created as a node project. (no npm init):&#xD;&#xA;&#xD;&#xA;    const { WsProvider, ApiPromise } = require('@polkadot/api');&#xD;&#xA;    const { ContractPromise } = require('@polkadot/api-contract');&#xD;&#xA;&#xD;&#xA;When I attemp to run it, I get (just a sample of a long list):&#xD;&#xA;&#xD;&#xA;    @polkadot/util has multiple versions, ensure that there is only one installed.&#xD;&#xA;    Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;    The following conflicting packages were found:&#xD;&#xA;            cjs 10.1.1      node_modules/@polkadot/api/node_modules/@polkadot/util/cjs&#xD;&#xA;            cjs 10.1.2      node_modules/@polkadot/api-contract/node_modules/@polkadot/util/cjs&#xD;&#xA;    @polkadot/types has multiple versions, ensure that there is only one installed.&#xD;&#xA;    Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;    The following conflicting packages were found:&#xD;&#xA;            cjs 8.14.1      node_modules/@polkadot/api/node_modules/@polkadot/types/cjs&#xD;&#xA;            cjs 9.0.1       node_modules/@polkadot/api-contract/node_modules/@polkadot/types/cjs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I originally installed all npm packages &quot;globally&quot; ($HOME/.nvm/versions/node/blahblah...) because I didn't want a bunch of repeated node_modules all over the place.&#xD;&#xA;&#xD;&#xA;And I did a symbolic link from the (above) global location to wherever my client.js was.&#xD;&#xA;&#xD;&#xA;I also didn't want to have to mess with package.json etc.. just keep things as simple as possible.  One file.&#xD;&#xA;&#xD;&#xA;And it all worked until now.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15198" PostHistoryTypeId="2" PostId="4051" RevisionGUID="501febf9-b6de-4c19-9a44-a968d1ad3c63" CreationDate="2022-08-02T02:12:36.610" UserId="2947" Text="I had to go ahead and do an `npm init` in the location of my `client.j`s, then `npm install  @polkadot/api@latest @polkadot/api-contract@latest` in same location, then `npm dedupe  @polkadot/api@latest @polkadot/api-contract@latest`.&#xD;&#xA;&#xD;&#xA;Now no conflicts." ContentLicense="CC BY-SA 4.0" />
  <row Id="15200" PostHistoryTypeId="2" PostId="4052" RevisionGUID="5adc818d-d063-42d0-8f0c-ee9f79b1720f" CreationDate="2022-08-02T05:10:56.897" UserId="344" Text="Replying to myself. It actually works the way I described it, not sure why I thought otherwise initially.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  let nextKeys = await api.query.session.nextKeys(stash_account);&#xD;&#xA;  let nodeHasKeys = await api.rpc.author.hasSessionKeys(nextKeys.toHex());&#xD;&#xA;  if (nodeHasKeys.isFalse()) {&#xD;&#xA;    console.error(`Node does not have the expected session keys.`);&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is a complete session key check script:&#xD;&#xA;https://github.com/midl-dev/polkadot-k8s/blob/master/polkadot-session-key-check/index.ts" ContentLicense="CC BY-SA 4.0" />
  <row Id="15202" PostHistoryTypeId="5" PostId="3991" RevisionGUID="17fb0f03-2171-4c1d-b5b7-3172116cbcf4" CreationDate="2022-08-02T05:25:49.523" UserId="251" Comment="added 149 characters in body" Text="For the first question, I have an answer now.&#xD;&#xA;&#xD;&#xA;[Code](https://github.com/paritytech/substrate/blob/master/frame/support/src/weights.rs#L320-L327):&#xD;&#xA;```&#xD;&#xA;/// Calculate how much weight was actually spent by the `Dispatchable`.&#xD;&#xA;pub fn calc_actual_weight(&amp;self, info: &amp;DispatchInfo) -&gt; Weight {&#xD;&#xA;	if let Some(actual_weight) = self.actual_weight {&#xD;&#xA;		actual_weight.min(info.weight)&#xD;&#xA;	} else {&#xD;&#xA;		info.weight&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is a `DispatchInfo` which was converted from `DispatchResultWithPostInfo`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For the second question.&#xD;&#xA;&#xD;&#xA;I found that the system will withdraw your balance then deposit it back.&#xD;&#xA;&#xD;&#xA;So, it's free actually.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This answered my question. Because I'm on a quite old Substrate version.&#xD;&#xA;&#xD;&#xA;If somebody comes from the future, also check @bkchr 's answer." ContentLicense="CC BY-SA 4.0" />
  <row Id="15203" PostHistoryTypeId="2" PostId="4053" RevisionGUID="8d3fd195-b29a-456f-8da6-0d20c160c4a9" CreationDate="2022-08-02T09:03:56.480" UserId="2384" Text="**What happens?**&#xD;&#xA;&#xD;&#xA;Well essentially nothing&#xD;&#xA;&#xD;&#xA;**What really happens**&#xD;&#xA;&#xD;&#xA;When you submit `system.remark` extrinsic and pass some bytes in it, all those nice thing of validation, transmission etc goes on. Eventually, this call will be part of the blockchain. So what's the use case&#xD;&#xA;&#xD;&#xA;**Use case**: There might be many use case but one that I found often myself using is to record something in the chain. For example, if some treasury transfer was done, it might make sense to store that info like `03-10-2023.Treasury Transfer: for -- usecase` and once the extrinsic is included we can store this extrinsic hash and everyone can see such record anytime. Example: [my sample `system.remark` call in rococo](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/extrinsics/decode/0xc1038400f236079666bd5aa519b9bb6074cac1904e327a9907116b1c0a945e18d1e1286a017eccf23f2e22e68138e4e6a659fdaa2c3742da97e38a12314e37170f971e937e57f4c8e8b9b7e88bf68617d1f1524fbfef73b8de0160663be277aa0bb3451283c500080000011502417574686f723a205375646970204768696d6972652e20416e7377657220666f723a202068747470733a2f2f7375627374726174652e737461636b65786368616e67652e636f6d2f7175657374696f6e732f343034342f7768612d68617070656e732d7768656e2d692d63616c6c2d73797374656d72656d61726b2f343035332334303533)&#xD;&#xA;&#xD;&#xA;So you get the idea. It is often handful to store some arbitrary data, sometime to just check if extrinsic call is successful and stuff." ContentLicense="CC BY-SA 4.0" />
  <row Id="15205" PostHistoryTypeId="2" PostId="4054" RevisionGUID="d4df304a-1d15-44f7-8342-5ca3daf3e003" CreationDate="2022-08-02T09:13:01.933" UserId="2916" Text="I'm trying to prepare a local parachain testnet. However, when I run two nodes at the same time, although the two nodes recognise each other no new blocks are added and I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error with block built on 0x8d39cb0a86cceeeae7861dcc2b19fe9d8db94b8481ea50fd13093c7e632dc101: Import failed: Unexpected epoch change    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any idea how to fix this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15207" PostHistoryTypeId="1" PostId="4054" RevisionGUID="d4df304a-1d15-44f7-8342-5ca3daf3e003" CreationDate="2022-08-02T09:13:01.933" UserId="2916" Text="Error with block built on XXX: Import failed: Unexpected epoch change" ContentLicense="CC BY-SA 4.0" />
  <row Id="15208" PostHistoryTypeId="3" PostId="4054" RevisionGUID="d4df304a-1d15-44f7-8342-5ca3daf3e003" CreationDate="2022-08-02T09:13:01.933" UserId="2916" Text="|parachain|rococo|substrate-parachain-template|epoch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15209" PostHistoryTypeId="2" PostId="4055" RevisionGUID="03d2bc11-732a-4ba7-b0f1-9e4eeb6eef3f" CreationDate="2022-08-02T10:56:42.430" UserId="251" Text="```&#xD;&#xA;2022-08-02 18:53:10 〽️ Prometheus exporter started at 127.0.0.1:9616&#xD;&#xA;2022-08-02 18:53:10  run BEEFY worker, best grandpa: #13709439.&#xD;&#xA;2022-08-02 18:53:10 creating instance on iface 65.21.88.129&#xD;&#xA;2022-08-02 18:53:10 failed to create `InterfaceState`: No such device (os error 19)&#xD;&#xA;2022-08-02 18:53:10 creating instance on iface 172.17.0.1&#xD;&#xA;2022-08-02 18:53:10 GRANDPA voter error: could not complete a round on disk: bad justification for header: invalid precommits for target commit&#xD;&#xA;2022-08-02 18:53:10 Essential task `grandpa-voter` failed. Shutting down service.&#xD;&#xA;2022-08-02 18:53:10 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;2022-08-02 18:53:10 creating instance on iface 65.21.88.129&#xD;&#xA;2022-08-02 18:53:10 failed to create `InterfaceState`: No such device (os error 19)&#xD;&#xA;2022-08-02 18:53:10 creating instance on iface 172.17.0.1&#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have tried Google, but nothing useful founded.&#xD;&#xA;&#xD;&#xA;What should I do? I have no idea how to debug this.&#xD;&#xA;&#xD;&#xA;I think the `Interface` error can be ignored. I can run node with that error before. Or in a new `-d path`." ContentLicense="CC BY-SA 4.0" />
  <row Id="15211" PostHistoryTypeId="1" PostId="4055" RevisionGUID="03d2bc11-732a-4ba7-b0f1-9e4eeb6eef3f" CreationDate="2022-08-02T10:56:42.430" UserId="251" Text="Essential task failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="15212" PostHistoryTypeId="3" PostId="4055" RevisionGUID="03d2bc11-732a-4ba7-b0f1-9e4eeb6eef3f" CreationDate="2022-08-02T10:56:42.430" UserId="251" Text="|substrate-node|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15213" PostHistoryTypeId="2" PostId="4056" RevisionGUID="bf5a4ff5-3d64-400c-9d12-9b02bba3f93a" CreationDate="2022-08-02T12:09:38.267" UserId="2344" Text="How does the polkadot api keep track of the nominators per validator?&#xD;&#xA;&#xD;&#xA;Here you can see there is a `count` of `nominators`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`api.query.staking.nominators(stash)` provides a list of **validators** the stash has nominated.&#xD;&#xA;&#xD;&#xA;I found this https://github.com/polkadot-js/api/issues/4124, which does not answer the question.&#xD;&#xA;&#xD;&#xA;Do I have to query every address (is there an api that will list all addresses?), each block, and index the whole database?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7yGBh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15215" PostHistoryTypeId="1" PostId="4056" RevisionGUID="bf5a4ff5-3d64-400c-9d12-9b02bba3f93a" CreationDate="2022-08-02T12:09:38.267" UserId="2344" Text="polkadot.js api: How to find all nominators of a validator?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15216" PostHistoryTypeId="3" PostId="4056" RevisionGUID="bf5a4ff5-3d64-400c-9d12-9b02bba3f93a" CreationDate="2022-08-02T12:09:38.267" UserId="2344" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15217" PostHistoryTypeId="5" PostId="2656" RevisionGUID="8ba13c01-25c4-4b73-9f80-147520710c46" CreationDate="2022-08-02T12:25:33.647" UserId="1760" Comment="added 534 characters in body" Text="If I make a request to get events in a particular block using web UI, I get a nice human-readable response:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've made an RPC call to get the same data&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;id&quot;: 1,&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;state_getStorageAt&quot;, &#xD;&#xA;    &quot;params&quot;: [&quot;0x26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7&quot;,&quot;0x5056c4cb701e192962e5a76c895273e69188edea1badf9b145b884a9416c8443&quot;]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;... and I got an output&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;result&quot;: &quot;0x1000000000000000585f8f090000000002000000010000000508ba6ef6480a2c4173bbbf0c27355c0e3c6d7a874a21cc2464e97d3fd5d92e245b1b5a7307000000000000000000000000000001000000080380eb30ca364f5c349d573b62cfadadba95af2e94f62fd8af4e15b90b971a4da633803b0648373051a1e2158c547112dcf63802d0d52b301a33dae8b9c6114e90f012b8516d57525358775a7476385956586574346e43424a396776646d4a6e3564364b34385a6a6148704763515a75676300000100000000001027000000000000000000&quot;,&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I understand that it is a set of data encrypted with SCALE codec.&#xD;&#xA;&#xD;&#xA;For example `0803` is a pallet and method indexes and &#xD;&#xA;`eb30ca364f5c349d573b62cfadadba95af2e94f62fd8af4e15b90b971a4da633` is attached data.&#xD;&#xA;&#xD;&#xA;What is the best way to decode the complete result with Rust? Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## UPDATE&#xD;&#xA;In the end this worked for me&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;&#xD;&#xA;let data = &quot;0x0c00000000000000585f8f090000000002000000010000000508ba6ef6480a2c4173bbbf0c27355c0e3c6d7a874a21cc2464e97d3fd5d92e245bd859730700000000000000000000000000000100000000010308011027000000000000000000&quot;;&#xD;&#xA;let data_bytes = hex::decode(data.replace(&quot;0x&quot;, &quot;&quot;)).unwrap();&#xD;&#xA;let event = &lt;polkadot::system::storage::Events as StorageEntry&gt;::Value::decode(&amp;mut data_bytes.as_slice()).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/k9WWV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15218" PostHistoryTypeId="2" PostId="4057" RevisionGUID="d7cd5777-18d9-4c71-8dc8-f99cc1166548" CreationDate="2022-08-02T13:16:45.163" UserId="494" Text="I wrote [a customized version of node-authorization](https://github.com/bernardoaraujor/node-authorization) as an answer to this question. It's just a PoC and not production-ready.&#xD;&#xA;&#xD;&#xA;It adds [a storage migration](https://github.com/bernardoaraujor/node-authorization/blob/master/src/migration.rs) so that it can be used on a chain after Genesis. The storage migration adds `Alice` and `Bob` as Well-Known nodes after the runtime upgrade. That way, the [&quot;Authorize specific nodes&quot; tutorial](https://docs.substrate.io/tutorials/get-started/permissioned-network/) can be followed while skipping the Genesis step.&#xD;&#xA;&#xD;&#xA;Another modification that proved necessary was [adding a check](https://github.com/bernardoaraujor/node-authorization/commit/645d0fe970f2f9c2c17bc262332eb161dd68dcb5) to the offchain worker so that it only calls [`set_authorized_nodes`](https://docs.rs/sp-io/latest/sp_io/offchain/fn.set_authorized_nodes.html) if storage has already been populated. Otherwise, the chain bricks after the runtime upgrade." ContentLicense="CC BY-SA 4.0" />
  <row Id="15220" PostHistoryTypeId="2" PostId="4058" RevisionGUID="c504f091-e205-4405-8839-2e2c9aab1860" CreationDate="2022-08-02T13:22:47.507" UserId="251" Text="I think this is an error from the relaychain, not the parachain.&#xD;&#xA;&#xD;&#xA;I guess the reason is that your relaychain was stopping producing blocks for a long time. Which doesn't meet BABE requirement.&#xD;&#xA;&#xD;&#xA;Try to clean the DB." ContentLicense="CC BY-SA 4.0" />
  <row Id="15222" PostHistoryTypeId="2" PostId="4059" RevisionGUID="16a89da3-b605-4772-b334-003dc26a2fcd" CreationDate="2022-08-02T13:58:38.490" UserId="2344" Text="It seems we have to parse the whole lot!&#xD;&#xA;&#xD;&#xA;Here is the app code:&#xD;&#xA;https://github.com/polkadot-js/apps/blob/master/packages/page-staking/src/useNominations.ts#L12&#xD;&#xA;&#xD;&#xA;Here is another example:&#xD;&#xA;https://github.com/w3f/polkadot-watcher-csv-exporter/blob/master/src/dataGatherer.ts#L72&#xD;&#xA;&#xD;&#xA;How I managed to get the data:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const { ApiPromise, WsProvider } = require('@polkadot/api')&#xD;&#xA;const { endpoints } = require('./test-endpoints')&#xD;&#xA;&#xD;&#xA;const chain_id = 'kusama'&#xD;&#xA;const endpoint = 'local';&#xD;&#xA;&#xD;&#xA;const getNominatorStaking = async (api, apiChunkSize = 64) =&gt;{&#xD;&#xA;&#xD;&#xA;  console.debug(`getting the nominator entries...`)&#xD;&#xA;  const nominators = await api.query.staking.nominators.entries();&#xD;&#xA;  console.debug(`got ${nominators.length} entries !!`)&#xD;&#xA;  const nominatorAddresses = nominators.map(([address]) =&gt; &quot;&quot;+address.toHuman()[0]);&#xD;&#xA;&#xD;&#xA;  console.debug(`the nominator addresses size is ${nominatorAddresses.length}`)&#xD;&#xA;&#xD;&#xA;  //A too big nominators set could make crush the API =&gt; Chunk splitting&#xD;&#xA;  const size = apiChunkSize&#xD;&#xA;  var nominatorAddressesChucked = []&#xD;&#xA;  for (let i = 0; i &lt; nominatorAddresses.length; i += size) {&#xD;&#xA;    const chunk = nominatorAddresses.slice(i, i + size)&#xD;&#xA;    nominatorAddressesChucked.push(chunk)&#xD;&#xA;  } &#xD;&#xA;&#xD;&#xA;  const nominatorsStakings = []&#xD;&#xA;  for (const chunk of nominatorAddressesChucked) {&#xD;&#xA;    console.debug(`the handled chunk size is ${chunk.length}`)&#xD;&#xA;    nominatorsStakings.push(...await api.derive.staking.accounts(chunk))&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  return nominatorsStakings&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;&#xD;&#xA;  const provider = new WsProvider(endpoints[chain_id][endpoint])&#xD;&#xA;  const api = await ApiPromise.create({ provider: provider })&#xD;&#xA;&#xD;&#xA;  // keep the chunk (batch) size **small** else you will flood the api!&#xD;&#xA;  const nomintorStaking = await getNominatorStaking(api, 512)&#xD;&#xA;  console.debug(nomintorStaking)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(err =&gt; {&#xD;&#xA;  console.debug(err)&#xD;&#xA;  process.exit(-1)&#xD;&#xA;})&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15224" PostHistoryTypeId="2" PostId="4060" RevisionGUID="6aafc24f-9f65-4602-9d8d-38096d3dad70" CreationDate="2022-08-02T14:37:43.820" UserId="29" Text="The Substrate address is actually derived from the public key:&#xD;&#xA;&#xD;&#xA;&gt; For most networks, the public key associated with an account is how&#xD;&#xA;&gt; that account is identified on the network and is used as the&#xD;&#xA;&gt; destination address for transactions. However, Substrate-based chains&#xD;&#xA;&gt; use the underlying public key to derive one or more public addresses.&#xD;&#xA;&gt; Instead of using the public key directly, Substrate allows you&#xD;&#xA;&gt; generate multiple addresses and address formats for an account.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/main-docs/fundamentals/accounts-addresses-keys&#xD;&#xA;&#xD;&#xA;&gt; In Substrate-based networks, the sr25519 encoded keys are used to produce SS58 addresses as the public keys for interacting with the blockchain.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/reference/command-line-tools/subkey&#xD;&#xA;&#xD;&#xA;To see the process of generating keys in Substrate:&#xD;&#xA;-  https://docs.substrate.io/tutorials/get-started/trusted-network/#generate-your-account-and-keys&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-cryptography&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-keys" ContentLicense="CC BY-SA 4.0" />
  <row Id="15226" PostHistoryTypeId="5" PostId="4060" RevisionGUID="4b7a054d-9dab-44ad-a721-9b7e0092cee7" CreationDate="2022-08-02T14:43:06.277" UserId="29" Comment="added 99 characters in body" Text="The Substrate address is actually derived from the public key:&#xD;&#xA;&#xD;&#xA;&gt; For most networks, the public key associated with an account is how&#xD;&#xA;&gt; that account is identified on the network and is used as the&#xD;&#xA;&gt; destination address for transactions. However, Substrate-based chains&#xD;&#xA;&gt; use the underlying public key to derive one or more public addresses.&#xD;&#xA;&gt; Instead of using the public key directly, Substrate allows you&#xD;&#xA;&gt; generate multiple addresses and address formats for an account.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/main-docs/fundamentals/accounts-addresses-keys&#xD;&#xA;&#xD;&#xA;&gt; In Substrate-based networks, the sr25519 encoded keys are used to produce SS58 addresses as the public keys for interacting with the blockchain.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/reference/command-line-tools/subkey&#xD;&#xA;&#xD;&#xA;To see the process of generating keys in Substrate:&#xD;&#xA;-  https://docs.substrate.io/tutorials/get-started/trusted-network/#generate-your-account-and-keys&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-cryptography&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-keys&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-accounts#address-generation-derivation-and-portability" ContentLicense="CC BY-SA 4.0" />
  <row Id="15227" PostHistoryTypeId="5" PostId="4060" RevisionGUID="c3b6a9a1-4d44-435a-834c-41e779031e83" CreationDate="2022-08-02T14:56:45.427" UserId="29" Comment="added 99 characters in body" Text="The Substrate address is actually derived from the public key:&#xD;&#xA;&#xD;&#xA;&gt; For most networks, the public key associated with an account is how&#xD;&#xA;&gt; that account is identified on the network and is used as the&#xD;&#xA;&gt; destination address for transactions. However, Substrate-based chains&#xD;&#xA;&gt; use the underlying public key to derive one or more public addresses.&#xD;&#xA;&gt; Instead of using the public key directly, Substrate allows you&#xD;&#xA;&gt; generate multiple addresses and address formats for an account.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/main-docs/fundamentals/accounts-addresses-keys&#xD;&#xA;&#xD;&#xA;&gt; In Substrate-based networks, the sr25519 encoded keys are used to produce SS58 addresses as the public keys for interacting with the blockchain.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/reference/command-line-tools/subkey&#xD;&#xA;&#xD;&#xA;Substrate supports a number of different signature schemes e.g. ed25519 (Edwards), sr25519 (schnorrkel), ecdsa (non-Bitcoin compatible).&#xD;&#xA;&#xD;&#xA;To see the process of generating keys in Substrate:&#xD;&#xA;-  https://docs.substrate.io/tutorials/get-started/trusted-network/#generate-your-account-and-keys&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-cryptography&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-keys&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-accounts#address-generation-derivation-and-portability&#xD;&#xA;- https://polkadot.js.org/docs/keyring/start/ss58#how-is-the-encoding-done" ContentLicense="CC BY-SA 4.0" />
  <row Id="15228" PostHistoryTypeId="5" PostId="4060" RevisionGUID="64e63fa5-9ca6-4dbe-ae89-15d3a2cc5948" CreationDate="2022-08-02T15:02:07.943" UserId="29" Comment="added 99 characters in body" Text="The Substrate address is actually derived from the public key:&#xD;&#xA;&#xD;&#xA;&gt; For most networks, the public key associated with an account is how&#xD;&#xA;&gt; that account is identified on the network and is used as the&#xD;&#xA;&gt; destination address for transactions. However, Substrate-based chains&#xD;&#xA;&gt; use the underlying public key to derive one or more public addresses.&#xD;&#xA;&gt; Instead of using the public key directly, Substrate allows you&#xD;&#xA;&gt; generate multiple addresses and address formats for an account.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/main-docs/fundamentals/accounts-addresses-keys&#xD;&#xA;&#xD;&#xA;&gt; In Substrate-based networks, the sr25519 encoded keys are used to produce SS58 addresses as the public keys for interacting with the blockchain.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/reference/command-line-tools/subkey&#xD;&#xA;&#xD;&#xA;Substrate supports a number of different signature schemes e.g. ed25519 (Edwards), sr25519 (schnorrkel), ecdsa (non-Bitcoin compatible).&#xD;&#xA;&#xD;&#xA;To see the process of generating keys in Substrate:&#xD;&#xA;-  https://docs.substrate.io/tutorials/get-started/trusted-network/#generate-your-account-and-keys&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-cryptography&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-keys&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-accounts#address-generation-derivation-and-portability&#xD;&#xA;- https://polkadot.js.org/docs/keyring/start/ss58#how-is-the-encoding-done&#xD;&#xA;&#xD;&#xA;As far as how a multisig address is generated, I recommend looking at this code here:&#xD;&#xA;1. https://polkadot.js.org/docs/util-crypto/examples/create-multisig&#xD;&#xA;2. https://github.com/polkadot-js/build-deno.land/blob/ac5fab607364eda37099f2d08ec1bb5ecc75402d/util-crypto/address/keyMulti.ts#L15-L24" ContentLicense="CC BY-SA 4.0" />
  <row Id="15229" PostHistoryTypeId="5" PostId="4060" RevisionGUID="44eb89f8-ed8c-4ff8-b097-766bf3d1d40e" CreationDate="2022-08-02T15:22:09.250" UserId="29" Comment="added 798 characters in body" Text="The Substrate address is actually derived from the public key:&#xD;&#xA;&#xD;&#xA;&gt; For most networks, the public key associated with an account is how&#xD;&#xA;&gt; that account is identified on the network and is used as the&#xD;&#xA;&gt; destination address for transactions. However, Substrate-based chains&#xD;&#xA;&gt; use the underlying public key to derive one or more public addresses.&#xD;&#xA;&gt; Instead of using the public key directly, Substrate allows you&#xD;&#xA;&gt; to generate multiple addresses and address formats for an account.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/main-docs/fundamentals/accounts-addresses-keys&#xD;&#xA;&#xD;&#xA;&gt; In Substrate-based networks, the sr25519 encoded keys are used to produce SS58 addresses as the public keys for interacting with the blockchain.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/reference/command-line-tools/subkey&#xD;&#xA;&#xD;&#xA;Additionally, Substrate has a multi-format address wrapper for on-chain accounts:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub enum MultiAddress&lt;AccountId, AccountIndex&gt; {&#xD;&#xA;	/// It's an account ID (pubkey).&#xD;&#xA;	Id(AccountId),&#xD;&#xA;	/// It's an account index.&#xD;&#xA;	Index(#[codec(compact)] AccountIndex),&#xD;&#xA;	/// It's some arbitrary raw bytes.&#xD;&#xA;	Raw(Vec&lt;u8&gt;),&#xD;&#xA;	/// It's a 32 byte representation.&#xD;&#xA;	Address32([u8; 32]),&#xD;&#xA;	/// Its a 20 byte representation.&#xD;&#xA;	Address20([u8; 20]),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/028ee356720d9b8de9995acae93de68af4ef8ece/primitives/runtime/src/multiaddress.rs#L26-L37&#xD;&#xA;&#xD;&#xA;You can see this gives support to 20 bytes, 32 bytes, arbitrary raw bytes, and you could even have a simple custom index number to represent the address.&#xD;&#xA;&#xD;&#xA;Substrate is highly configurable and supports a number of different signature schemes e.g. ed25519 (Edwards), sr25519 (schnorrkel), ecdsa (non-Bitcoin compatible), and it is not limited to these.&#xD;&#xA;&#xD;&#xA;To see the process of generating keys in Substrate:&#xD;&#xA;-  https://docs.substrate.io/tutorials/get-started/trusted-network/#generate-your-account-and-keys&#xD;&#xA;&#xD;&#xA;More info can be found here:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-cryptography&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-keys&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-accounts#address-generation-derivation-and-portability&#xD;&#xA;- https://polkadot.js.org/docs/keyring/start/ss58#how-is-the-encoding-done&#xD;&#xA;&#xD;&#xA;As far as how a multisig address is generated, I recommend looking at this code here:&#xD;&#xA;1. https://polkadot.js.org/docs/util-crypto/examples/create-multisig&#xD;&#xA;2. https://github.com/polkadot-js/build-deno.land/blob/ac5fab607364eda37099f2d08ec1bb5ecc75402d/util-crypto/address/keyMulti.ts#L15-L24" ContentLicense="CC BY-SA 4.0" />
  <row Id="15230" PostHistoryTypeId="2" PostId="4061" RevisionGUID="a2892049-56ec-4ab8-a1ee-1e5c4787f2cf" CreationDate="2022-08-02T15:34:08.253" UserId="494" Text="ink! Smart Contracts are deployed into a code-bundle, which is addressed by its hash. The Contract can then be instantiated from that hash.&#xD;&#xA;&#xD;&#xA;The [Substrate Contracts UI](https://contracts-ui.substrate.io/hash-lookup) provides a page for that." ContentLicense="CC BY-SA 4.0" />
  <row Id="15232" PostHistoryTypeId="2" PostId="4062" RevisionGUID="a34fd17a-8b40-4ec0-bb06-7ce13a962dbd" CreationDate="2022-08-02T16:30:46.133" UserId="29" Text="When you run:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;$ cargo contract call \&#xD;&#xA;  --gas 500000000000 \&#xD;&#xA;  --message flip \&#xD;&#xA;  --suri //Alice \&#xD;&#xA;  --contract 5H2RSmmxGh4cBKAqfqFetd2to1niGFfviEeCvsopmbYeiT2b&#xD;&#xA;```&#xD;&#xA;You should get an output similar to this in your terminal:&#xD;&#xA;```sh&#xD;&#xA;        Event Balances ➜ Withdraw&#xD;&#xA;          who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;          amount: 86298152&#xD;&#xA;        Event TransactionPayment ➜ TransactionFeePaid&#xD;&#xA;          who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;          actual_fee: 86298152&#xD;&#xA;          tip: 0&#xD;&#xA;        Event System ➜ ExtrinsicSuccess&#xD;&#xA;          dispatch_info: DispatchInfo { weight: 10158560289, class: Normal, pays_fee: Yes }&#xD;&#xA;```&#xD;&#xA;You will not see anything output in the substrate node logs, however there will be events fired off. &#xD;&#xA;&#xD;&#xA;**You need to listen for these events**.&#xD;&#xA;&#xD;&#xA;For example, if you open [polkadotJS apps](https://polkadot.js.org/apps/#/explorer) and connect to your node and call the contract, you will see an event like the following:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/BHrUJ.png)&#xD;&#xA;&#xD;&#xA;You can decoded the `data` by running the following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo contract decode -d 0x633aa551 -t message&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You will get:&#xD;&#xA;```sh&#xD;&#xA;Decoded data: flip&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15234" PostHistoryTypeId="5" PostId="4062" RevisionGUID="362c8fd9-9aa4-4f34-b67c-8bfe79d25ac5" CreationDate="2022-08-02T16:35:52.227" UserId="29" Comment="added 170 characters in body" Text="When you run:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;$ cargo contract call \&#xD;&#xA;  --gas 500000000000 \&#xD;&#xA;  --message flip \&#xD;&#xA;  --suri //Alice \&#xD;&#xA;  --contract 5H2RSmmxGh4cBKAqfqFetd2to1niGFfviEeCvsopmbYeiT2b&#xD;&#xA;```&#xD;&#xA;You should get an output similar to this in your terminal:&#xD;&#xA;```sh&#xD;&#xA;        Event Balances ➜ Withdraw&#xD;&#xA;          who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;          amount: 86298152&#xD;&#xA;        Event TransactionPayment ➜ TransactionFeePaid&#xD;&#xA;          who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;          actual_fee: 86298152&#xD;&#xA;          tip: 0&#xD;&#xA;        Event System ➜ ExtrinsicSuccess&#xD;&#xA;          dispatch_info: DispatchInfo { weight: 10158560289, class: Normal, pays_fee: Yes }&#xD;&#xA;```&#xD;&#xA;You will not see anything output in the substrate node logs.&#xD;&#xA;&#xD;&#xA;However you can see details on the transaction if you open [polkadotJS apps](https://polkadot.js.org/apps/#/explorer) and connect to your node and call the contract, you will see an extrinsic like the following:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/BHrUJ.png)&#xD;&#xA;&#xD;&#xA;You can decoded the `data` by running the following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo contract decode -d 0x633aa551 -t message&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You will get:&#xD;&#xA;```sh&#xD;&#xA;Decoded data: flip&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15235" PostHistoryTypeId="5" PostId="4062" RevisionGUID="29108678-7aba-4e74-bc9a-ca76ca84a39e" CreationDate="2022-08-02T16:44:46.953" UserId="29" Comment="added 142 characters in body" Text="When you run:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;$ cargo contract call \&#xD;&#xA;  --gas 500000000000 \&#xD;&#xA;  --message flip \&#xD;&#xA;  --suri //Alice \&#xD;&#xA;  --contract 5H2RSmmxGh4cBKAqfqFetd2to1niGFfviEeCvsopmbYeiT2b&#xD;&#xA;```&#xD;&#xA;You should get an output similar to this in your terminal:&#xD;&#xA;```sh&#xD;&#xA;        Event Balances ➜ Withdraw&#xD;&#xA;          who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;          amount: 86298152&#xD;&#xA;        Event TransactionPayment ➜ TransactionFeePaid&#xD;&#xA;          who: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;          actual_fee: 86298152&#xD;&#xA;          tip: 0&#xD;&#xA;        Event System ➜ ExtrinsicSuccess&#xD;&#xA;          dispatch_info: DispatchInfo { weight: 10158560289, class: Normal, pays_fee: Yes }&#xD;&#xA;```&#xD;&#xA;You will not see anything output in the substrate node logs.&#xD;&#xA;&#xD;&#xA;However you can see details on the transaction if you open [polkadotJS apps](https://polkadot.js.org/apps/#/explorer) and connect to your node and call the contract, you will see an extrinsic like the following:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/BHrUJ.png)&#xD;&#xA;&#xD;&#xA;You can decoded the `data` by running the following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo contract decode -d 0x633aa551 -t message&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You will get:&#xD;&#xA;```sh&#xD;&#xA;Decoded data: flip&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can also use JavaScript to create your transactions and get the result:&#xD;&#xA;- https://polkadot.js.org/docs/api-contract/start/contract.tx" ContentLicense="CC BY-SA 4.0" />
  <row Id="15236" PostHistoryTypeId="12" PostId="4062" RevisionGUID="f9a827eb-4b0e-4575-b494-41c32d0101d6" CreationDate="2022-08-02T16:47:01.573" UserId="29" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="15237" PostHistoryTypeId="5" PostId="4062" RevisionGUID="b150f5b4-19be-45e0-8f0a-77706fbbdfa7" CreationDate="2022-08-02T17:10:53.713" UserId="29" Comment="deleted 643 characters in body" Text="I have the following ink! message:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn say_hello(&amp;self) {&#xD;&#xA;	ink_env::debug_println!(&quot;Hello&quot;);&#xD;&#xA;}&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;I run my node like this:&#xD;&#xA;```&#xD;&#xA;./target/release/substrate-contracts-node --dev -lerror,runtime::contracts=debug&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I call like this:&#xD;&#xA;```&#xD;&#xA;cargo contract call \&#xD;&#xA;  --gas 500000000000 \&#xD;&#xA;  --message say_hello \&#xD;&#xA;  --suri //Alice \&#xD;&#xA;  --contract 5HJSXhYLExB5KYCMXa95mKEUX4UXXsp8Up9rBLzR57PPwtkq&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The following appears in my node logs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-08-02 13:07:28.410 DEBUG tokio-runtime-worker runtime::contracts: Execution finished with debug buffer: Hello&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I recommend you delete your contract, re-deploy, and try again." ContentLicense="CC BY-SA 4.0" />
  <row Id="15238" PostHistoryTypeId="13" PostId="4062" RevisionGUID="9bc129af-3ec4-4a61-9f1c-8a7e3d1eacbd" CreationDate="2022-08-02T17:10:58.327" UserId="29" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="15239" PostHistoryTypeId="5" PostId="4062" RevisionGUID="84ce77c4-7a8d-473e-b46c-89caba85ec51" CreationDate="2022-08-02T17:16:08.783" UserId="29" Comment="deleted 643 characters in body" Text="I have the following ink! message:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn say_hello(&amp;self) {&#xD;&#xA;	ink_env::debug_println!(&quot;Hello&quot;);&#xD;&#xA;}&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;I run my node like this:&#xD;&#xA;```&#xD;&#xA;./target/release/substrate-contracts-node --dev -lerror,runtime::contracts=debug&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I call like this:&#xD;&#xA;```&#xD;&#xA;cargo contract call \&#xD;&#xA;  --gas 500000000000 \&#xD;&#xA;  --message say_hello \&#xD;&#xA;  --suri //Alice \&#xD;&#xA;  --contract 5HJSXhYLExB5KYCMXa95mKEUX4UXXsp8Up9rBLzR57PPwtkq&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The following appears in my node logs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-08-02 13:07:28.410 DEBUG tokio-runtime-worker runtime::contracts: Execution finished with debug buffer: Hello&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Make sure your contract exists.&#xD;&#xA;&#xD;&#xA;You should see it in https://polkadot.js.org/apps/#/contracts&#xD;&#xA;&#xD;&#xA;Also, try deleting your contract and re-deploying. You may have an old contract there." ContentLicense="CC BY-SA 4.0" />
  <row Id="15240" PostHistoryTypeId="2" PostId="4063" RevisionGUID="d4e8d4d9-0e73-4d41-9b78-39ac6684e68d" CreationDate="2022-08-02T17:36:19.577" UserId="2968" Text="I'm currently trying substrate tutorial, but it got stack. Please give me an advice.&#xD;&#xA;&#xD;&#xA;Following the &quot;use macros in a custom pallet&quot; tutorial, I coded lib.rs file like this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use sp_std::vec::Vec; // Step 3.1 will include this in `Cargo.toml`&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;	}&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		ClaimCreated(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;		ClaimRevoked(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;	}&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		ProofAlreadyClaimed,&#xD;&#xA;		NoSuchProof,&#xD;&#xA;		NotProofOwner,&#xD;&#xA;	}&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub(super) type Proofs&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, Vec&lt;u8&gt;, (T::AccountId, T::BlockNumber), ValueQuery&gt;;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {}&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1_000)]&#xD;&#xA;		pub fn create_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;			ensure!(!Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::ProofAlreadyClaimed);&#xD;&#xA;			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;			Proofs::&lt;T&gt;::insert(&amp;proof, (&amp;sender, current_block));&#xD;&#xA;			Self::deposit_event(Event::ClaimCreated(sender, proof));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(10_000)]&#xD;&#xA;		pub fn revoke_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;			ensure!(Proofs::&lt;T&gt;::contains_key(&amp;proof),Error::&lt;T&gt;::NoSuchProof);&#xD;&#xA;			let (owner, _) = Proofs::&lt;T&gt;::get(&amp;proof);&#xD;&#xA;			ensure!(sender == owner, Error::&lt;T&gt;::NotProofOwner);&#xD;&#xA;			Proofs::&lt;T&gt;::remove(&amp;proof);&#xD;&#xA;			Self::deposit_event(Event::ClaimRevoked(sender, proof));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Cargo.toml file is like this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-template&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;FRAME pallet template for defining custom runtime logic.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;Unlicense&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-support = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;}&#xD;&#xA;frame-system = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;frame-benchmarking = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;, optional = true }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-io = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-runtime = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;&#xD;&#xA;[dependencies.sp-std]&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate.git'&#xD;&#xA;branch = 'polkadot-v0.9.26' &#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;  &quot;sp-std/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking/std&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;```&#xD;&#xA;And I used command &quot;cargo check -p node-template-runtime&quot;. But I got an Error like this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ensure!(!Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::ProofAlreadyClaimed);&#xD;&#xA;                      ^^^^^^^^^^^^ function or associated item cannot be called on &#xD;&#xA;`frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageProofs&lt;T&gt;, frame_support::Blake2_128Concat, Vec&lt;u8&gt;, (&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber), frame_support::pallet_prelude::ValueQuery&gt;` due to unsatisfied trait bounds&#xD;&#xA;&#xD;&#xA;Proofs::&lt;T&gt;::insert(&amp;proof, (&amp;sender, current_block));&#xD;&#xA;             ^^^^^^ function or associated item cannot be called on `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageProofs&lt;T&gt;, frame_support::Blake2_128Concat, Vec&lt;u8&gt;, (&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber), frame_support::pallet_prelude::ValueQuery&gt;` due to unsatisfied trait bounds&#xD;&#xA;&#xD;&#xA;ensure!(Proofs::&lt;T&gt;::contains_key(&amp;proof),Error::&lt;T&gt;::NoSuchProof);&#xD;&#xA;                     ^^^^^^^^^^^^ function or associated item cannot be called on `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageProofs&lt;T&gt;, frame_support::Blake2_128Concat, Vec&lt;u8&gt;, (&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber), frame_support::pallet_prelude::ValueQuery&gt;` due to unsatisfied trait bounds&#xD;&#xA;&#xD;&#xA;let (owner, _) = Proofs::&lt;T&gt;::get(&amp;proof);&#xD;&#xA;                              ^^^ function or associated item cannot be called on `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageProofs&lt;T&gt;, frame_support::Blake2_128Concat, Vec&lt;u8&gt;, (&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber), frame_support::pallet_prelude::ValueQuery&gt;` due to unsatisfied trait bounds&#xD;&#xA;&#xD;&#xA;Proofs::&lt;T&gt;::remove(&amp;proof);&#xD;&#xA;             ^^^^^^ function or associated item cannot be called on `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageProofs&lt;T&gt;, frame_support::Blake2_128Concat, Vec&lt;u8&gt;, (&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber), frame_support::pallet_prelude::ValueQuery&gt;` due to unsatisfied trait bounds&#xD;&#xA;&#xD;&#xA; #[pallet::pallet]&#xD;&#xA;           ^^^^^^ the trait `MaxEncodedLen` is not implemented for `Vec&lt;u8&gt;`&#xD;&#xA;&#xD;&#xA;#[pallet::pallet]&#xD;&#xA;          ^^^^^^ the trait `core::default::Default` is not implemented for `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;          ^^^^^^^ the trait `core::default::Default` is not implemented for `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;```&#xD;&#xA;Somebody, Please help me. I beg you.&#xD;&#xA;What should I do next??&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15242" PostHistoryTypeId="1" PostId="4063" RevisionGUID="d4e8d4d9-0e73-4d41-9b78-39ac6684e68d" CreationDate="2022-08-02T17:36:19.577" UserId="2968" Text="Error in substrates' &quot;use macros in a custom pallet&quot; tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="15243" PostHistoryTypeId="3" PostId="4063" RevisionGUID="d4e8d4d9-0e73-4d41-9b78-39ac6684e68d" CreationDate="2022-08-02T17:36:19.577" UserId="2968" Text="|substrate-node-template|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15244" PostHistoryTypeId="2" PostId="4064" RevisionGUID="d4f5dbb7-c7e2-44cd-8f84-2ccfdb2df07d" CreationDate="2022-08-02T18:31:12.457" UserId="28" Text="Unfortunately there is a bug in the tutorial at the moment. While we work to fix it in the tutorial, here is a fix to the code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use sp_std::vec::Vec; // Step 3.1 will include this in `Cargo.toml`&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;	}&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		ClaimCreated(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;		ClaimRevoked(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;	}&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		ProofAlreadyClaimed,&#xD;&#xA;		NoSuchProof,&#xD;&#xA;		NotProofOwner,&#xD;&#xA;	}&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::unbounded]&#xD;&#xA;	pub(super) type Proofs&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Blake2_128Concat, Vec&lt;u8&gt;, (T::AccountId, T::BlockNumber)&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {}&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1_000)]&#xD;&#xA;		pub fn create_claim(origin: OriginFor&lt;T&gt;, proof: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;			ensure!(!Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::ProofAlreadyClaimed);&#xD;&#xA;			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;			Proofs::&lt;T&gt;::insert(&amp;proof, (&amp;sender, current_block));&#xD;&#xA;			Self::deposit_event(Event::ClaimCreated(sender, proof));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(10_000)]&#xD;&#xA;		pub fn revoke_claim(origin: OriginFor&lt;T&gt;, proof: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;			let (owner, _) = Proofs::&lt;T&gt;::get(&amp;proof).ok_or(Error::&lt;T&gt;::NoSuchProof)?;&#xD;&#xA;			ensure!(sender == owner, Error::&lt;T&gt;::NotProofOwner);&#xD;&#xA;			Proofs::&lt;T&gt;::remove(&amp;proof);&#xD;&#xA;			Self::deposit_event(Event::ClaimRevoked(sender, proof));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Specifically, we switch the `StorageMap` from returning a value to returning an `Option&lt;Value&gt;`. We then handle that in the logic of the code." ContentLicense="CC BY-SA 4.0" />
  <row Id="15248" PostHistoryTypeId="2" PostId="4066" RevisionGUID="af9b4ca2-dc8d-46c5-9bd8-214c57f6342d" CreationDate="2022-08-02T18:46:27.267" UserId="29" Text="Looks like the `grandpa-voter` failed.&#xD;&#xA;&#xD;&#xA;The specific error `Essential task failed` is originating from here:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Return a future that will end with success if the signal to terminate was sent&#xD;&#xA;/// (`self.terminate()`) or with an error if an essential task fails.&#xD;&#xA;///&#xD;&#xA;/// # Warning&#xD;&#xA;///&#xD;&#xA;/// This function will not wait until the end of the remaining task.&#xD;&#xA;pub fn future&lt;'a&gt;(&#xD;&#xA;	&amp;'a mut self,&#xD;&#xA;) -&gt; Pin&lt;Box&lt;dyn Future&lt;Output = Result&lt;(), Error&gt;&gt; + Send + 'a&gt;&gt; {&#xD;&#xA;	Box::pin(async move {&#xD;&#xA;		let mut t1 = self.essential_failed_rx.next().fuse();&#xD;&#xA;		let mut t2 = self.on_exit.clone().fuse();&#xD;&#xA;		let mut t3 = try_join_all(&#xD;&#xA;			self.children&#xD;&#xA;				.iter_mut()&#xD;&#xA;				.map(|x| x.future())&#xD;&#xA;				// Never end this future if there is no error because if there is no children,&#xD;&#xA;				// it must not stop&#xD;&#xA;				.chain(std::iter::once(pending().boxed())),&#xD;&#xA;		)&#xD;&#xA;		.fuse();&#xD;&#xA;&#xD;&#xA;		futures::select! {&#xD;&#xA;			_ = t1 =&gt; Err(Error::Other(&quot;Essential task failed.&quot;.into())),&#xD;&#xA;			_ = t2 =&gt; Ok(()),&#xD;&#xA;			res = t3 =&gt; Err(res.map(|_| ()).expect_err(&quot;this future never ends; qed&quot;)),&#xD;&#xA;		}&#xD;&#xA;	})&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/client/service/src/task_manager/mod.rs#L343-L371&#xD;&#xA;&#xD;&#xA;Looks like the error: `invalid precommits for target commit` is coming from this logic:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Create a GRANDPA justification from the given commit. This method&#xD;&#xA;/// assumes the commit is valid and well-formed.&#xD;&#xA;pub fn from_commit&lt;C&gt;(&#xD;&#xA;	client: &amp;Arc&lt;C&gt;,&#xD;&#xA;	round: u64,&#xD;&#xA;	commit: Commit&lt;Block&gt;,&#xD;&#xA;) -&gt; Result&lt;GrandpaJustification&lt;Block&gt;, Error&gt;&#xD;&#xA;where&#xD;&#xA;	C: HeaderBackend&lt;Block&gt;,&#xD;&#xA;{&#xD;&#xA;	let mut votes_ancestries_hashes = HashSet::new();&#xD;&#xA;	let mut votes_ancestries = Vec::new();&#xD;&#xA;&#xD;&#xA;	let error = || {&#xD;&#xA;		let msg = &quot;invalid precommits for target commit&quot;.to_string();&#xD;&#xA;		Err(Error::Client(ClientError::BadJustification(msg)))&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	// we pick the precommit for the lowest block as the base that&#xD;&#xA;	// should serve as the root block for populating ancestry (i.e.&#xD;&#xA;	// collect all headers from all precommit blocks to the base)&#xD;&#xA;	let (base_hash, base_number) = match commit&#xD;&#xA;		.precommits&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|signed| &amp;signed.precommit)&#xD;&#xA;		.min_by_key(|precommit| precommit.target_number)&#xD;&#xA;		.map(|precommit| (precommit.target_hash.clone(), precommit.target_number))&#xD;&#xA;	{&#xD;&#xA;		None =&gt; return error(),&#xD;&#xA;		Some(base) =&gt; base,&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	for signed in commit.precommits.iter() {&#xD;&#xA;		let mut current_hash = signed.precommit.target_hash;&#xD;&#xA;		loop {&#xD;&#xA;			if current_hash == base_hash {&#xD;&#xA;				break&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			match client.header(BlockId::Hash(current_hash))? {&#xD;&#xA;				Some(current_header) =&gt; {&#xD;&#xA;					// NOTE: this should never happen as we pick the lowest block&#xD;&#xA;					// as base and only traverse backwards from the other blocks&#xD;&#xA;					// in the commit. but better be safe to avoid an unbound loop.&#xD;&#xA;					if *current_header.number() &lt;= base_number {&#xD;&#xA;						return error()&#xD;&#xA;					}&#xD;&#xA;&#xD;&#xA;					let parent_hash = *current_header.parent_hash();&#xD;&#xA;					if votes_ancestries_hashes.insert(current_hash) {&#xD;&#xA;						votes_ancestries.push(current_header);&#xD;&#xA;					}&#xD;&#xA;&#xD;&#xA;					current_hash = parent_hash;&#xD;&#xA;				},&#xD;&#xA;				_ =&gt; return error(),&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	Ok(GrandpaJustification { round, commit, votes_ancestries })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/42655d235dc0d6ad711bf45a3e7dfdbfd89d76e9/client/finality-grandpa/src/justification.rs#L50-L112&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also note this comment:&#xD;&#xA;```&#xD;&#xA;/// This is meant to be stored in the db and passed around the network to other&#xD;&#xA;/// nodes, and are used by syncing nodes to prove authority set handoffs.&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/42655d235dc0d6ad711bf45a3e7dfdbfd89d76e9/client/finality-grandpa/src/justification.rs#L41&#xD;&#xA;&#xD;&#xA;Hope this is a little better than Google.." ContentLicense="CC BY-SA 4.0" />
  <row Id="15252" PostHistoryTypeId="2" PostId="4067" RevisionGUID="47849689-7a80-44db-8928-f82e4814a74a" CreationDate="2022-08-02T19:07:19.367" UserId="2748" Text="I am doing the prepare your first contract tutorial on subtrate and i am getting the following error ERROR: Your wasm-opt version is 91, but we require a version &gt;= 99.Can anyone please tell me how to solve it .&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15254" PostHistoryTypeId="1" PostId="4067" RevisionGUID="47849689-7a80-44db-8928-f82e4814a74a" CreationDate="2022-08-02T19:07:19.367" UserId="2748" Text="ERROR: Your wasm-opt version is 91, but we require a version &gt;= 99" ContentLicense="CC BY-SA 4.0" />
  <row Id="15255" PostHistoryTypeId="3" PostId="4067" RevisionGUID="47849689-7a80-44db-8928-f82e4814a74a" CreationDate="2022-08-02T19:07:19.367" UserId="2748" Text="|smart-contract|contracts|wasmi|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15256" PostHistoryTypeId="5" PostId="4066" RevisionGUID="42ace6ec-efa7-4eb8-846d-0d8d6817456b" CreationDate="2022-08-02T19:40:26.337" UserId="29" Comment="added 86 characters in body" Text="Looks like the `grandpa-voter` failed.&#xD;&#xA;&#xD;&#xA;The specific error `Essential task failed` is originating from here:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Return a future that will end with success if the signal to terminate was sent&#xD;&#xA;/// (`self.terminate()`) or with an error if an essential task fails.&#xD;&#xA;///&#xD;&#xA;/// # Warning&#xD;&#xA;///&#xD;&#xA;/// This function will not wait until the end of the remaining task.&#xD;&#xA;pub fn future&lt;'a&gt;(&#xD;&#xA;	&amp;'a mut self,&#xD;&#xA;) -&gt; Pin&lt;Box&lt;dyn Future&lt;Output = Result&lt;(), Error&gt;&gt; + Send + 'a&gt;&gt; {&#xD;&#xA;	Box::pin(async move {&#xD;&#xA;		let mut t1 = self.essential_failed_rx.next().fuse();&#xD;&#xA;		let mut t2 = self.on_exit.clone().fuse();&#xD;&#xA;		let mut t3 = try_join_all(&#xD;&#xA;			self.children&#xD;&#xA;				.iter_mut()&#xD;&#xA;				.map(|x| x.future())&#xD;&#xA;				// Never end this future if there is no error because if there is no children,&#xD;&#xA;				// it must not stop&#xD;&#xA;				.chain(std::iter::once(pending().boxed())),&#xD;&#xA;		)&#xD;&#xA;		.fuse();&#xD;&#xA;&#xD;&#xA;		futures::select! {&#xD;&#xA;			_ = t1 =&gt; Err(Error::Other(&quot;Essential task failed.&quot;.into())),&#xD;&#xA;			_ = t2 =&gt; Ok(()),&#xD;&#xA;			res = t3 =&gt; Err(res.map(|_| ()).expect_err(&quot;this future never ends; qed&quot;)),&#xD;&#xA;		}&#xD;&#xA;	})&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/client/service/src/task_manager/mod.rs#L343-L371&#xD;&#xA;&#xD;&#xA;Looks like the error: `invalid precommits for target commit` is coming from this logic:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Create a GRANDPA justification from the given commit. This method&#xD;&#xA;/// assumes the commit is valid and well-formed.&#xD;&#xA;pub fn from_commit&lt;C&gt;(&#xD;&#xA;	client: &amp;Arc&lt;C&gt;,&#xD;&#xA;	round: u64,&#xD;&#xA;	commit: Commit&lt;Block&gt;,&#xD;&#xA;) -&gt; Result&lt;GrandpaJustification&lt;Block&gt;, Error&gt;&#xD;&#xA;where&#xD;&#xA;	C: HeaderBackend&lt;Block&gt;,&#xD;&#xA;{&#xD;&#xA;	let mut votes_ancestries_hashes = HashSet::new();&#xD;&#xA;	let mut votes_ancestries = Vec::new();&#xD;&#xA;&#xD;&#xA;	let error = || {&#xD;&#xA;		let msg = &quot;invalid precommits for target commit&quot;.to_string();&#xD;&#xA;		Err(Error::Client(ClientError::BadJustification(msg)))&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	// we pick the precommit for the lowest block as the base that&#xD;&#xA;	// should serve as the root block for populating ancestry (i.e.&#xD;&#xA;	// collect all headers from all precommit blocks to the base)&#xD;&#xA;	let (base_hash, base_number) = match commit&#xD;&#xA;		.precommits&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|signed| &amp;signed.precommit)&#xD;&#xA;		.min_by_key(|precommit| precommit.target_number)&#xD;&#xA;		.map(|precommit| (precommit.target_hash.clone(), precommit.target_number))&#xD;&#xA;	{&#xD;&#xA;		None =&gt; return error(),&#xD;&#xA;		Some(base) =&gt; base,&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	for signed in commit.precommits.iter() {&#xD;&#xA;		let mut current_hash = signed.precommit.target_hash;&#xD;&#xA;		loop {&#xD;&#xA;			if current_hash == base_hash {&#xD;&#xA;				break&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			match client.header(BlockId::Hash(current_hash))? {&#xD;&#xA;				Some(current_header) =&gt; {&#xD;&#xA;					// NOTE: this should never happen as we pick the lowest block&#xD;&#xA;					// as base and only traverse backwards from the other blocks&#xD;&#xA;					// in the commit. but better be safe to avoid an unbound loop.&#xD;&#xA;					if *current_header.number() &lt;= base_number {&#xD;&#xA;						return error()&#xD;&#xA;					}&#xD;&#xA;&#xD;&#xA;					let parent_hash = *current_header.parent_hash();&#xD;&#xA;					if votes_ancestries_hashes.insert(current_hash) {&#xD;&#xA;						votes_ancestries.push(current_header);&#xD;&#xA;					}&#xD;&#xA;&#xD;&#xA;					current_hash = parent_hash;&#xD;&#xA;				},&#xD;&#xA;				_ =&gt; return error(),&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	Ok(GrandpaJustification { round, commit, votes_ancestries })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/42655d235dc0d6ad711bf45a3e7dfdbfd89d76e9/client/finality-grandpa/src/justification.rs#L50-L112&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also note this comment:&#xD;&#xA;```&#xD;&#xA;/// This is meant to be stored in the db and passed around the network to other&#xD;&#xA;/// nodes, and are used by syncing nodes to prove authority set handoffs.&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/42655d235dc0d6ad711bf45a3e7dfdbfd89d76e9/client/finality-grandpa/src/justification.rs#L41&#xD;&#xA;&#xD;&#xA;a little info on pre-commits:&#xD;&#xA;- https://spec.polkadot.network/#defn-voting-rounds&#xD;&#xA;&#xD;&#xA;Hope this is a little better than Google.." ContentLicense="CC BY-SA 4.0" />
  <row Id="15257" PostHistoryTypeId="2" PostId="4068" RevisionGUID="a953325a-2c1e-4456-b3f1-16be36b517bd" CreationDate="2022-08-02T20:22:28.947" UserId="703" Text="Answer from [@alexander-theißen][1]: &#xD;&#xA;&#xD;&#xA;&gt; The biggest primitive type in wasm is 64bit cause this is what real&#xD;&#xA;&gt; computers have (ignoring simd stuff). So there is no value in using&#xD;&#xA;&gt; u128 over a collection.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/users/16/alexander-thei%C3%9Fen" ContentLicense="CC BY-SA 4.0" />
  <row Id="15259" PostHistoryTypeId="2" PostId="4069" RevisionGUID="bc3f648b-39da-4239-bfa2-90fb07847f76" CreationDate="2022-08-02T21:13:31.467" UserId="258" Text="I am having an issue trying to verify ecdsa signature in ink! for my &#xD;&#xA;test.&#xD;&#xA;&#xD;&#xA;I am generating the signature this way&#xD;&#xA;&#xD;&#xA;    const keyring = new Keyring({type: 'ecdsa'});&#xD;&#xA;    const pair =  keyring.addFromUri('//Alice');&#xD;&#xA;&#xD;&#xA;Then i get the public key to be stored in the contract storage as the governor during instantiation of the contract&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    const publicKey = pair.publicKey;&#xD;&#xA;&#xD;&#xA;This is how i am signing the message(data)&#xD;&#xA;&#xD;&#xA;    const sig = Array.from(pair.sign(hashDataArray));&#xD;&#xA;&#xD;&#xA;Then i pass the signature into the contract.&#xD;&#xA;&#xD;&#xA;But when i call `ink_env::ecdsa_recover` in the contract to recover the public key from the signature, i get a different public key entirely different from the one i stored(generated) in the contract during instantiation.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15261" PostHistoryTypeId="1" PostId="4069" RevisionGUID="bc3f648b-39da-4239-bfa2-90fb07847f76" CreationDate="2022-08-02T21:13:31.467" UserId="258" Text="ink_env::ecdsa_recover is not returning the right public key" ContentLicense="CC BY-SA 4.0" />
  <row Id="15262" PostHistoryTypeId="3" PostId="4069" RevisionGUID="bc3f648b-39da-4239-bfa2-90fb07847f76" CreationDate="2022-08-02T21:13:31.467" UserId="258" Text="|ink|smart-contract|substrate-contracts-node|hash|ecdsa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15263" PostHistoryTypeId="2" PostId="4070" RevisionGUID="04aca8ff-dbc0-4011-89b3-54cef966d720" CreationDate="2022-08-03T03:18:24.763" UserId="2782" Text="I have a couple of questions in regard to RPC node for Polkadot or Substrate. &#xD;&#xA;&#xD;&#xA;1 - RPC node is recommended to be pruned or leave it unpruned? &#xD;&#xA;2 - Full node vs archieve node, I'm assuming that there are the same if Full node is not &quot;pruned&quot; at all. &#xD;&#xA;&#xD;&#xA;3 - RPC node configuration - i dont see too many information in regard to this. Is there public information on how to setup a RPC, if there isn't, I am willing to do that if someone is willing to help me to understand how to setup.  &#xD;&#xA;&#xD;&#xA;4 - Reverse Proxy back to the polkadot.js - is there any specific gateway or permission that we need to allow with? Else, we can do that permissionless? &#xD;&#xA;&#xD;&#xA;5 - RPC node - I'm also assuming that it should always work with a separated archive node for data  consistency. &#xD;&#xA;&#xD;&#xA;If there are any more information on how to setup RPC node, and back to Polkadot.JS. please don't hesitate to contact me and help me with me. Much appreciate. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15265" PostHistoryTypeId="1" PostId="4070" RevisionGUID="04aca8ff-dbc0-4011-89b3-54cef966d720" CreationDate="2022-08-03T03:18:24.763" UserId="2782" Text="RPC deployment Guideline" ContentLicense="CC BY-SA 4.0" />
  <row Id="15266" PostHistoryTypeId="3" PostId="4070" RevisionGUID="04aca8ff-dbc0-4011-89b3-54cef966d720" CreationDate="2022-08-03T03:18:24.763" UserId="2782" Text="|polkadot-js|polkadot|kusama|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15267" PostHistoryTypeId="2" PostId="4071" RevisionGUID="8e0c6644-a723-4512-b4e7-acec1823f625" CreationDate="2022-08-03T04:27:38.693" UserId="121" Text="I am simulating how validators got switched when a validator is down in my localhost local chain setting. &#xD;&#xA;&#xD;&#xA;I have 3 validators set in local chain genesis, Alice, Bob, and Charlie, but I only have Alice and Bob nodes up.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Blocks are produced and not finalized, this is expected. I then run a Dave node, and make it a waiting validator (shown below), and then called with sudo the extrinsic **staking** &gt; **forceNewEraAlways()**.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;With this setting, I would expect in the next epoch (set in 2 mins), the network will drop the offlined Charlie (xCff2o...) and pick Dave as an active validator. *But I see that Charlie continue to be an active validator, not just in one era but all eras afterwards*.&#xD;&#xA;&#xD;&#xA;In this case given I am the network admin with sudo key how can I force the validator sets to reelect and forcibly drop Charlie and add Dave in the validator set?&#xD;&#xA;&#xD;&#xA;This is [the event log screenshot][3] if it helps.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;Related? https://substrate.stackexchange.com/questions/2678/local-network-does-not-change-validator-set&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dbMFX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/rAOJN.png&#xD;&#xA;  [3]: https://tinyurl.com/2a8novn7" ContentLicense="CC BY-SA 4.0" />
  <row Id="15269" PostHistoryTypeId="1" PostId="4071" RevisionGUID="8e0c6644-a723-4512-b4e7-acec1823f625" CreationDate="2022-08-03T04:27:38.693" UserId="121" Text="Validator re-election in new era" ContentLicense="CC BY-SA 4.0" />
  <row Id="15270" PostHistoryTypeId="3" PostId="4071" RevisionGUID="8e0c6644-a723-4512-b4e7-acec1823f625" CreationDate="2022-08-03T04:27:38.693" UserId="121" Text="|validator|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15271" PostHistoryTypeId="4" PostId="4071" RevisionGUID="435ccd8d-7748-4840-b8e7-82cf7ca67fdc" CreationDate="2022-08-03T04:34:09.237" UserId="121" Comment="edited title" Text="Offline validator is being picked in new era (in local chain)" ContentLicense="CC BY-SA 4.0" />
  <row Id="15272" PostHistoryTypeId="5" PostId="4071" RevisionGUID="435ccd8d-7748-4840-b8e7-82cf7ca67fdc" CreationDate="2022-08-03T04:34:09.237" UserId="121" Comment="edited title" Text="I am simulating how validators got switched when a validator is down in my localhost local chain setting. &#xD;&#xA;&#xD;&#xA;I have 3-validator set in local chain genesis, Alice, Bob, and Charlie, but I only have Alice and Bob nodes up.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Blocks are produced and not finalized, this is expected. I then run a Dave node, and make it a waiting validator (shown below), and then called with sudo the extrinsic **staking** &gt; **forceNewEraAlways()**.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;With this setting, I would expect in the next epoch set in 2 mins, the network will drop the offlined Charlie (xCff2o...) and pick Dave as an active validator. *But I see that Charlie continue to be an active validator, not just in one era but all eras afterwards*.&#xD;&#xA;&#xD;&#xA;In this case given I am the network admin with sudo key how can I force the validator sets to reelect and forcibly drop Charlie and add Dave in the validator set?&#xD;&#xA;&#xD;&#xA;This is [the event log screenshot][3] if it helps.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;Related? https://substrate.stackexchange.com/questions/2678/local-network-does-not-change-validator-set&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dbMFX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/rAOJN.png&#xD;&#xA;  [3]: https://tinyurl.com/2a8novn7" ContentLicense="CC BY-SA 4.0" />
  <row Id="15273" PostHistoryTypeId="2" PostId="4072" RevisionGUID="77dec4b4-5d52-46e1-beb2-2d49c02dad24" CreationDate="2022-08-03T06:19:23.273" UserId="2973" Text="when I tried to use command ```cargo build --release``` to build substrate-node-template on version polkadot-v0.9.26, the following  error was emitted:&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for `librocksdb-sys v0.6.1+6.28.2`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/john/documents/blockchain/substrate-node-template/target/release/build/librocksdb-sys-60f437c04bdca76d/build-script-build` (exit status: 127)&#xD;&#xA;  --- stderr&#xD;&#xA;  Inconsistency detected by ld.so: dl-open.c: 678: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)-&gt;r_state == RT_CONSISTENT' failed!&#xD;&#xA;&#xD;&#xA;rust version: rustc 1.62.1 (e092d0b6b 2022-07-16)   &#xD;&#xA;OS version: CentOS Linux release 7.9.2009 (Core)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15275" PostHistoryTypeId="1" PostId="4072" RevisionGUID="77dec4b4-5d52-46e1-beb2-2d49c02dad24" CreationDate="2022-08-03T06:19:23.273" UserId="2973" Text="failed to run custom build command for `librocksdb-sys v0.6.1+6.28.2`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15276" PostHistoryTypeId="3" PostId="4072" RevisionGUID="77dec4b4-5d52-46e1-beb2-2d49c02dad24" CreationDate="2022-08-03T06:19:23.273" UserId="2973" Text="|substrate-node-template|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15277" PostHistoryTypeId="5" PostId="4072" RevisionGUID="0f31495d-255f-4b1d-b2a5-e6518d9aba2f" CreationDate="2022-08-03T06:20:33.343" UserId="2973" Comment="deleted 28 characters in body" Text="when I tried to use command ```cargo build --release``` to build substrate-node-template on version polkadot-v0.9.26, the following  error was emitted:&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for `librocksdb-sys v0.6.1+6.28.2`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `.../substrate-node-template/target/release/build/librocksdb-sys-60f437c04bdca76d/build-script-build` (exit status: 127)&#xD;&#xA;  --- stderr&#xD;&#xA;  Inconsistency detected by ld.so: dl-open.c: 678: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)-&gt;r_state == RT_CONSISTENT' failed!&#xD;&#xA;&#xD;&#xA;rust version: rustc 1.62.1 (e092d0b6b 2022-07-16)   &#xD;&#xA;OS version: CentOS Linux release 7.9.2009 (Core)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15278" PostHistoryTypeId="2" PostId="4073" RevisionGUID="373b5b79-e14e-4c6b-8119-855793ddbe44" CreationDate="2022-08-03T07:51:09.737" UserId="2588" Text="when I run `getBlock` function as followed `const signedBlock = await api.derived.chain.getBlock(blockhash)` I can fetch data from this blockhash: `0x5a17cf943d384aacdfcd834702fa1904f34b4164c2bc6d5601f8ab2fdeb15240` but it doesn't work the same for this blockhash: `0x32b4113148f6086a76f5d01cca690cd7712517dbd64ed862f05d4cebe790a81f`. What is the difference between these two? Parameters are the same, methods, modules, calls are the same. Here is my code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    const { ApiPromise, WsProvider } = require('@polkadot/api')&#xD;&#xA;    const BigNumber = require('bignumber.js')&#xD;&#xA;    &#xD;&#xA;    const wsProvider = new WsProvider('ws://WEBSOCKET');&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;     function convertToDot(amount) {&#xD;&#xA;    &#xD;&#xA;      if (amount === undefined || amount === null || amount === &quot;&quot; || amount === 0) &#xD;&#xA;      {&#xD;&#xA;        return 0;&#xD;&#xA;      }&#xD;&#xA;      else {&#xD;&#xA;        let divisionby = 10000000000;&#xD;&#xA;        var bn = new BigNumber(amount);&#xD;&#xA;        return Number( bn.div(divisionby) );&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const declaredTransferTypes = {&#xD;&#xA;      balances: [&quot;transfer&quot;, &quot;transferKeepAlive&quot;],&#xD;&#xA;      utility: [&quot;batch&quot;]&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const getTransactionsFromBlockHash = async (blockhash) =&gt; {&#xD;&#xA;     &#xD;&#xA;    try{&#xD;&#xA;      api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;      const signedBlock = await api.derive.chain.getBlock(blockhash)&#xD;&#xA;      console.log(signedBlock)&#xD;&#xA;      let signedBlockExts = signedBlock.block.extrinsics&#xD;&#xA;      if (signedBlockExts.length &lt;= 0) return []&#xD;&#xA;      let successTxArray = []&#xD;&#xA;      const signedExts = signedBlock.extrinsics&#xD;&#xA;      const extrinsicTransfers = signedBlock.block.extrinsics.filter(y =&gt; (((y.method.toHuman().method === &quot;transfer&quot;) || (y.method.toHuman().method === &quot;transferKeepAlive&quot;)) &amp;&amp; (y.method.toHuman().section === &quot;balances&quot;)))&#xD;&#xA;      if (extrinsicTransfers.length &gt; 0) {&#xD;&#xA;        extrinsicTransfers.forEach(item =&gt; {&#xD;&#xA;          const onlySuccessTransfer = signedExts.filter(y =&gt; (y.extrinsic.args.length === 2) &amp;&amp; (item.args[0].toHuman().Id === y.extrinsic.args[0].toHuman().Id) &amp;&amp; (!y.dispatchError))&#xD;&#xA;          if (onlySuccessTransfer.length &gt; 0) {&#xD;&#xA;           console.log(&quot;success transfer object&quot;, { tx: item.hash.toHuman(), from: item.signer.toHuman().Id, to: item.args[0].toHuman().Id, amount: convertToDot(`${item.args[1]}`) })&#xD;&#xA;            successTxArray.push({ tx: item.hash.toHuman(), from: item.signer.toHuman().Id, to: item.args[0].toHuman().Id, amount: convertToDot(`${item.args[1]}`) })&#xD;&#xA;          }&#xD;&#xA;        })&#xD;&#xA;      }&#xD;&#xA;       console.log(&quot;success transfer  number&quot;, successTxArray.length, &quot;success tx here&quot;, successTxArray)&#xD;&#xA;    &#xD;&#xA;      const extrinsicUtility = signedBlockExts.filter(y =&gt; (((Object.values(declaredTransferTypes.utility).filter(a =&gt; a === y.method.toHuman().method))) &amp;&amp; (y.method.toHuman().section === &quot;utility&quot;)))&#xD;&#xA;      if (extrinsicUtility.length === 0) return (successTxArray.length &gt; 0 ? successTxArray : [])&#xD;&#xA;      extrinsicUtility.forEach(item =&gt; {&#xD;&#xA;        const onlySuccessUtility = signedExts.filter(y =&gt; (y.extrinsic._raw.toHuman().signature.signer.Id.indexOf(item._raw.signature.signer.toHuman().Id) &gt; -1) &amp;&amp; (!y.dispatchError)).map(a =&gt; (a.extrinsic._raw.toHuman().method.args[0]))&#xD;&#xA;        // console.log(&quot;onlySuccessUtility&quot;, onlySuccessUtility)&#xD;&#xA;        if ((onlySuccessUtility.length &gt; 0) &amp;&amp; (item.args[0].length &gt; 0)) {&#xD;&#xA;          item.args[0].filter(y =&gt; (Object.values(declaredTransferTypes.balances).filter(a =&gt; a === y.method)) &amp;&amp; (y.section === &quot;balances&quot;)).map(a =&gt; (a.args)).forEach(y =&gt; {&#xD;&#xA;            // console.log(&quot;Success Utility Transactions:&quot;, { tx: item.hash.toHuman(), from: item.signer.toHuman().Id, to: y[0].toHuman().Id, amount: convertToDot(`${y[1]}`) })&#xD;&#xA;            successTxArray.push({ tx: item.hash.toHuman(), from: item.signer.toHuman().Id, to: y[0].toHuman().Id, amount: convertToDot(`${y[1]}`) })&#xD;&#xA;          })&#xD;&#xA;        }&#xD;&#xA;      })&#xD;&#xA;      &#xD;&#xA;      console.log(&quot;Extrinsics success tx number&quot;, successTxArray.length, &quot;success tx&quot;, successTxArray)&#xD;&#xA;      return successTxArray&#xD;&#xA;    &#xD;&#xA;    } catch(err){&#xD;&#xA;    console.log(&quot;Couldn't decode the block. Blockhash:&quot;, blockhash)&#xD;&#xA;    &#xD;&#xA;    return []&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    getTransactionsFromBlockHash(&quot;0x32b4113148f6086a76f5d01cca690cd7712517dbd64ed862f05d4cebe790a81f&quot;)&#xD;&#xA;&#xD;&#xA;This is the error I'm receiving when I can't fetch data:&#xD;&#xA;&#xD;&#xA;    2022-08-02 17:59:31 RPC-CORE: getRuntimeVersion(at?: BlockHash): RuntimeVersion:: -32603: Unknown error occurred: Client, Application, UnknownBlock, State already discarded for BlockId::Hash, 0xd72e0b2d776d84dd5d274be22ba0fc1ab971ac8a8f7f0fdb3dc54c331ecec608&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15280" PostHistoryTypeId="1" PostId="4073" RevisionGUID="373b5b79-e14e-4c6b-8119-855793ddbe44" CreationDate="2022-08-03T07:51:09.737" UserId="2588" Text="getBlock - Unable to catch some transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="15281" PostHistoryTypeId="3" PostId="4073" RevisionGUID="373b5b79-e14e-4c6b-8119-855793ddbe44" CreationDate="2022-08-03T07:51:09.737" UserId="2588" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15282" PostHistoryTypeId="2" PostId="4074" RevisionGUID="0bdebf6b-2771-4f4a-bee7-0a0b5a2f4073" CreationDate="2022-08-03T08:00:33.180" UserId="2736" Text="**Context:**&#xD;&#xA;&#xD;&#xA;Testing `try-runtime::follow-chain` utility with a local live chain.&#xD;&#xA;&#xD;&#xA;**Problem:**&#xD;&#xA;&#xD;&#xA;`RemoteExternalities` doesn't create a perfect copy of the state.&#xD;&#xA;&#xD;&#xA;After `follow-chain` connects to a node, it starts listening for finalized heads. After encountering first such, it uses `RemoteExternalities` to build local state based on that block's parent. However, the created storage differs from the one on-chain.&#xD;&#xA;&#xD;&#xA;This happens also when we use *exactly* the same runtime code.&#xD;&#xA;&#xD;&#xA;Logs from `follow-chain` (pay attention to storage root hash):&#xD;&#xA;```&#xD;&#xA;DEBUG main try-runtime::cli: new block event: 0x3e9f789a0c13c9b9a57784c7c49fe3ca8a4484b47add564eb95116c0c6a36239 =&gt; 539, extrinsics: 1, storage root: 0xe0a9f15698564ddd1511161dba5582b9cd4e9d7a63a676129619a3492df451fc&#xD;&#xA; WARN tokio-runtime-worker jsonrpsee_core::client::async_client: Custom(&quot;[backend]: frontend dropped; terminate client&quot;)&#xD;&#xA; INFO                 main jsonrpsee_client_transport::ws: Connection established to target: Target { sockaddrs: [], host: &quot;localhost&quot;, host_header: &quot;localhost:9944&quot;, _mode: Plain, path_and_query: &quot;/&quot; }&#xD;&#xA; INFO                 main remote-ext: scraping key-pairs from remote @ 0x781879a43612925645215738464ee16f68f84f556f7950092b0d1a46e1ec236f    &#xD;&#xA; INFO                 main remote-ext: downloading data for all pallets.    &#xD;&#xA; INFO                 main remote-ext: ‍ scraping child-tree data from 0 top keys    &#xD;&#xA; WARN tokio-runtime-worker jsonrpsee_core::client::async_client: Custom(&quot;[backend]: frontend dropped; terminate client&quot;)&#xD;&#xA; INFO                 main remote-ext: injecting a total of 721 top keys    &#xD;&#xA; INFO                 main remote-ext: injecting a total of 0 child keys    &#xD;&#xA; INFO                 main remote-ext: initialized state externalities with storage root 0xa7eca01edf1691709442b5fb7f4d748b02ba6308b580ff6c34e4dc7ae00b451e    &#xD;&#xA; INFO                 main try-runtime::cli: initialized state externalities at 539, storage root 0xa7eca01edf1691709442b5fb7f4d748b02ba6308b580ff6c34e4dc7ae00b451e&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also, screenshot from the PolkadotUI describing block 538 (the parent block, from which we are scraping state):&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6t1S2.png&#xD;&#xA;&#xD;&#xA;**Reproduction:**&#xD;&#xA;&#xD;&#xA;I built a binary with `cargo build --features &quot;try-runtime&quot;`. This served both as the node executable and `try-runtime` tool. I used chainspec that was used by nodes to start the chain (so the same runtime blob).&#xD;&#xA;&#xD;&#xA;Note: I am aware that, in the basic scenario, storage roots will start mismatching anyway after processing first block (e.g. seal digest item will not be included in the re-executed blocks). Nevertheless, I'm trying to achieve full storage match in the beginning as a baseline for further testing. For this I'm already adding all needed digests, but since there's already an initial storage mismatch, I cannot proceed." ContentLicense="CC BY-SA 4.0" />
  <row Id="15284" PostHistoryTypeId="1" PostId="4074" RevisionGUID="0bdebf6b-2771-4f4a-bee7-0a0b5a2f4073" CreationDate="2022-08-03T08:00:33.180" UserId="2736" Text="`try-runtime` doesn't start with a proper state" ContentLicense="CC BY-SA 4.0" />
  <row Id="15285" PostHistoryTypeId="3" PostId="4074" RevisionGUID="0bdebf6b-2771-4f4a-bee7-0a0b5a2f4073" CreationDate="2022-08-03T08:00:33.180" UserId="2736" Text="|storage|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15286" PostHistoryTypeId="2" PostId="4075" RevisionGUID="a3bd8811-61d3-4197-a9a6-31d3c745dc82" CreationDate="2022-08-03T09:08:04.833" UserId="2307" Text="How can I send a transaction with a vector of tuples like Option&lt;Vec&lt;(T::AccountId, u8)&gt;&gt; from frontend (react)? What about None and other types js don't have? Is there any site I can look for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15288" PostHistoryTypeId="1" PostId="4075" RevisionGUID="a3bd8811-61d3-4197-a9a6-31d3c745dc82" CreationDate="2022-08-03T09:08:04.833" UserId="2307" Text="How can I send a transaction with vector of tuple from frontend (react)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15289" PostHistoryTypeId="3" PostId="4075" RevisionGUID="a3bd8811-61d3-4197-a9a6-31d3c745dc82" CreationDate="2022-08-03T09:08:04.833" UserId="2307" Text="|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15290" PostHistoryTypeId="2" PostId="4076" RevisionGUID="2e000ad3-60b0-4a37-9b92-156012842d47" CreationDate="2022-08-03T09:38:40.270" UserId="2762" Text="The error appears because before add any claim is trying to get the owner and block from an undefined value.&#xD;&#xA;&#xD;&#xA;It has to be checked if this value exists before trying to get the owner and the block:&#xD;&#xA;&#xD;&#xA;    if(result.value[0] &amp;&amp; result.value[1]){&#xD;&#xA;       setOwner(result.value[0].toString())&#xD;&#xA;       setBlock(result.value[1].toNumber())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The fix has been proposed for the documentation tutorial code [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-docs/pull/1356" ContentLicense="CC BY-SA 4.0" />
  <row Id="15295" PostHistoryTypeId="5" PostId="4063" RevisionGUID="25733220-3e76-4a04-8a8f-31ceb03cbd0a" CreationDate="2022-08-03T14:30:28.053" UserId="2025" Comment="improve readability, remove unnecessary words, add links" Text="I'm currently trying [this substrate tutorial](https://docs.substrate.io/tutorials/work-with-pallets/use-macros-in-a-custom-pallet/), but it got stuck.&#xD;&#xA;&#xD;&#xA;Following the tutorial, I coded lib.rs file like this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use sp_std::vec::Vec; // Step 3.1 will include this in `Cargo.toml`&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;	}&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		ClaimCreated(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;		ClaimRevoked(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;	}&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		ProofAlreadyClaimed,&#xD;&#xA;		NoSuchProof,&#xD;&#xA;		NotProofOwner,&#xD;&#xA;	}&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub(super) type Proofs&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, Vec&lt;u8&gt;, (T::AccountId, T::BlockNumber), ValueQuery&gt;;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {}&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1_000)]&#xD;&#xA;		pub fn create_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;			ensure!(!Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::ProofAlreadyClaimed);&#xD;&#xA;			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;			Proofs::&lt;T&gt;::insert(&amp;proof, (&amp;sender, current_block));&#xD;&#xA;			Self::deposit_event(Event::ClaimCreated(sender, proof));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;		#[pallet::weight(10_000)]&#xD;&#xA;		pub fn revoke_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;			ensure!(Proofs::&lt;T&gt;::contains_key(&amp;proof),Error::&lt;T&gt;::NoSuchProof);&#xD;&#xA;			let (owner, _) = Proofs::&lt;T&gt;::get(&amp;proof);&#xD;&#xA;			ensure!(sender == owner, Error::&lt;T&gt;::NotProofOwner);&#xD;&#xA;			Proofs::&lt;T&gt;::remove(&amp;proof);&#xD;&#xA;			Self::deposit_event(Event::ClaimRevoked(sender, proof));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Cargo.toml file is like this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-template&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;FRAME pallet template for defining custom runtime logic.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;Unlicense&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-support = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;}&#xD;&#xA;frame-system = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;frame-benchmarking = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;, optional = true }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-io = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-runtime = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;&#xD;&#xA;[dependencies.sp-std]&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate.git'&#xD;&#xA;branch = 'polkadot-v0.9.26' &#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;  &quot;sp-std/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking/std&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;```&#xD;&#xA;And I used command &quot;cargo check -p node-template-runtime&quot;. But I got an Error like this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ensure!(!Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::ProofAlreadyClaimed);&#xD;&#xA;                      ^^^^^^^^^^^^ function or associated item cannot be called on &#xD;&#xA;`frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageProofs&lt;T&gt;, frame_support::Blake2_128Concat, Vec&lt;u8&gt;, (&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber), frame_support::pallet_prelude::ValueQuery&gt;` due to unsatisfied trait bounds&#xD;&#xA;&#xD;&#xA;Proofs::&lt;T&gt;::insert(&amp;proof, (&amp;sender, current_block));&#xD;&#xA;             ^^^^^^ function or associated item cannot be called on `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageProofs&lt;T&gt;, frame_support::Blake2_128Concat, Vec&lt;u8&gt;, (&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber), frame_support::pallet_prelude::ValueQuery&gt;` due to unsatisfied trait bounds&#xD;&#xA;&#xD;&#xA;ensure!(Proofs::&lt;T&gt;::contains_key(&amp;proof),Error::&lt;T&gt;::NoSuchProof);&#xD;&#xA;                     ^^^^^^^^^^^^ function or associated item cannot be called on `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageProofs&lt;T&gt;, frame_support::Blake2_128Concat, Vec&lt;u8&gt;, (&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber), frame_support::pallet_prelude::ValueQuery&gt;` due to unsatisfied trait bounds&#xD;&#xA;&#xD;&#xA;let (owner, _) = Proofs::&lt;T&gt;::get(&amp;proof);&#xD;&#xA;                              ^^^ function or associated item cannot be called on `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageProofs&lt;T&gt;, frame_support::Blake2_128Concat, Vec&lt;u8&gt;, (&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber), frame_support::pallet_prelude::ValueQuery&gt;` due to unsatisfied trait bounds&#xD;&#xA;&#xD;&#xA;Proofs::&lt;T&gt;::remove(&amp;proof);&#xD;&#xA;             ^^^^^^ function or associated item cannot be called on `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageProofs&lt;T&gt;, frame_support::Blake2_128Concat, Vec&lt;u8&gt;, (&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber), frame_support::pallet_prelude::ValueQuery&gt;` due to unsatisfied trait bounds&#xD;&#xA;&#xD;&#xA; #[pallet::pallet]&#xD;&#xA;           ^^^^^^ the trait `MaxEncodedLen` is not implemented for `Vec&lt;u8&gt;`&#xD;&#xA;&#xD;&#xA;#[pallet::pallet]&#xD;&#xA;          ^^^^^^ the trait `core::default::Default` is not implemented for `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;          ^^^^^^^ the trait `core::default::Default` is not implemented for `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;```&#xD;&#xA;Can somebody please help me?&#xD;&#xA;What should I do next??&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15296" PostHistoryTypeId="4" PostId="4063" RevisionGUID="25733220-3e76-4a04-8a8f-31ceb03cbd0a" CreationDate="2022-08-03T14:30:28.053" UserId="2025" Comment="improve readability, remove unnecessary words, add links" Text="Error in Substrate &quot;use macros in a custom pallet&quot; tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="15297" PostHistoryTypeId="24" PostId="4063" RevisionGUID="25733220-3e76-4a04-8a8f-31ceb03cbd0a" CreationDate="2022-08-03T14:30:28.053" Comment="Proposed by 2025 approved by 34 edit id of 255" ContentLicense="CC BY-SA 4.0" />
  <row Id="15301" PostHistoryTypeId="2" PostId="4079" RevisionGUID="143a4af3-fff8-4a72-af58-d35ad1b681fd" CreationDate="2022-08-03T20:28:53.033" UserId="94" Text="Polkadot nodes are configured to prune old blocks to save disk space.  &#xD;&#xA;The default configuration is set to 256 past blocks ([wiki link](https://wiki.polkadot.network/docs/maintain-sync#types-of-nodes)).  &#xD;&#xA;If you try to query the state of an older block, you will see the error that you experienced:&#xD;&#xA;```pre&#xD;&#xA;State already discarded for BlockId::Hash ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;One solution is to configure the node in `--archive` mode, which will keep all blocks but requires much more disk space.  &#xD;&#xA;Another way is to use an indexer, which is an external application that ingests block data and makes it query-able.  &#xD;&#xA;This has the additional advantage that its normally faster since the Polkadot node itself is not build for massive RPC requests into past blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="15303" PostHistoryTypeId="2" PostId="4080" RevisionGUID="73f25036-f043-44a4-b2cc-da6bd7b4a7e0" CreationDate="2022-08-03T21:13:58.070" UserId="94" Text="Sorry that there is no satisfying solution right now.  &#xD;&#xA;The main problem is that some pallets are to tightly coupled.  &#xD;&#xA;IIRC the offences pallet has a `report_offence` callback without a `WeightInfo` which is used by `Babe`, `Grandpa` and `ImOnline`.  &#xD;&#xA;This in term calls an `on_offence` callback which does also not have a `WeightInfo`   &#xD;&#xA;So it would start by giving these callbacks a `WeightInfo` and then using that in `Babe` etc. to calculate the correct weight.  &#xD;&#xA;I think another problem here is that a callbacks' weight highly depends on the runtime config and then needs to either be parametrized or benchmarked multiple times, once for each possible config.  &#xD;&#xA;This all would be solved by un-coupling the pallets...  &#xD;&#xA;&#xD;&#xA;PS: What did you change for the session pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15305" PostHistoryTypeId="2" PostId="4081" RevisionGUID="e49727a5-5e85-4a73-8682-2a0ef44ec286" CreationDate="2022-08-03T23:10:13.730" UserId="2916" Text="Following [this tutorial](https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/).&#xD;&#xA;&#xD;&#xA;I'm trying to run this command in the `substrate-parachain-template` folder (found [here](https://github.com/substrate-developer-hub/substrate-parachain-template)):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-collator build-spec --disable-default-bootnode &gt; rococo-local-parachain-plain.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I get this error:&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-collator: No such file or directory&#xD;&#xA;```&#xD;&#xA;Any idea what I'm doing wrong or how to fix it? I've already run `cargo b -r`, so that's not the issue.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15307" PostHistoryTypeId="1" PostId="4081" RevisionGUID="e49727a5-5e85-4a73-8682-2a0ef44ec286" CreationDate="2022-08-03T23:10:13.730" UserId="2916" Text="./target/release/parachain-collator not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="15308" PostHistoryTypeId="3" PostId="4081" RevisionGUID="e49727a5-5e85-4a73-8682-2a0ef44ec286" CreationDate="2022-08-03T23:10:13.730" UserId="2916" Text="|parachain|parachain-collator|chainspec|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15310" PostHistoryTypeId="2" PostId="4082" RevisionGUID="3007040e-63b4-4527-a3ec-dc0aa68b87a6" CreationDate="2022-08-04T01:01:38.200" UserId="251" Text="I think the name should be [parachain-template-node](https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/node/Cargo.toml#L2)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15313" PostHistoryTypeId="2" PostId="4083" RevisionGUID="65bb9414-3a4d-4e5a-b7ab-9b622a5009ac" CreationDate="2022-08-04T01:45:56.330" UserId="2307" Text="How to get all items in storage map? In polkadotjs, we can choose a storage map and give no id and It return all items? How to do like that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15315" PostHistoryTypeId="1" PostId="4083" RevisionGUID="65bb9414-3a4d-4e5a-b7ab-9b622a5009ac" CreationDate="2022-08-04T01:45:56.330" UserId="2307" Text="How to get all items in storage map?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15316" PostHistoryTypeId="3" PostId="4083" RevisionGUID="65bb9414-3a4d-4e5a-b7ab-9b622a5009ac" CreationDate="2022-08-04T01:45:56.330" UserId="2307" Text="|substrate-front-end|storagenmap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15317" PostHistoryTypeId="2" PostId="4084" RevisionGUID="1d8438d8-8760-47c4-873b-3e9ba12ddfae" CreationDate="2022-08-04T03:45:05.543" UserId="275" Text="As far as I'm experimenting, u32 works for it. In above example,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;royalty: Option&lt;u32&gt;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you look at Permill macro, `u32` is used (at the third bottom arg of `implement_per_thing_with_perthousand` macro) for its type.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;implement_per_thing_with_perthousand!(&#xD;&#xA;    Permill,&#xD;&#xA;	test_permill,&#xD;&#xA;	test_permill_extra,&#xD;&#xA;	[u32, u64, u128],&#xD;&#xA;	1_000_000u32,&#xD;&#xA;	u32,&#xD;&#xA;	u64,&#xD;&#xA;	&quot;_Parts per Million_&quot;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I also confirmed, if `u32` value is more than million 1000000, decoding will fail on chainextension side.&#xD;&#xA;&#xD;&#xA;[macro definition](https://github.com/paritytech/substrate/blob/744eda47f545e31083ee722abb3a286f91a7f98d/primitives/arithmetic/src/per_things.rs#L1841)" ContentLicense="CC BY-SA 4.0" />
  <row Id="15319" PostHistoryTypeId="5" PostId="4084" RevisionGUID="3985a948-1f35-4f91-898f-8b560636cf33" CreationDate="2022-08-04T03:50:46.643" UserId="275" Comment="added 30 characters in body" Text="As far as I'm experimenting, u32 works for it. In above example,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;royalty: Option&lt;u32&gt;,&#xD;&#xA;```&#xD;&#xA;on ink! smart contract side.&#xD;&#xA;&#xD;&#xA;If you look at Permill macro, `u32` is used (at the third bottom arg of `implement_per_thing_with_perthousand` macro) for its type.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;implement_per_thing_with_perthousand!(&#xD;&#xA;    Permill,&#xD;&#xA;	test_permill,&#xD;&#xA;	test_permill_extra,&#xD;&#xA;	[u32, u64, u128],&#xD;&#xA;	1_000_000u32,&#xD;&#xA;	u32,&#xD;&#xA;	u64,&#xD;&#xA;	&quot;_Parts per Million_&quot;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I also confirmed, if `u32` value is more than million 1000000, decoding will fail on chainextension side.&#xD;&#xA;&#xD;&#xA;[macro definition](https://github.com/paritytech/substrate/blob/744eda47f545e31083ee722abb3a286f91a7f98d/primitives/arithmetic/src/per_things.rs#L1841)" ContentLicense="CC BY-SA 4.0" />
  <row Id="15320" PostHistoryTypeId="2" PostId="4085" RevisionGUID="75cccd22-c590-4230-a391-1c711490282e" CreationDate="2022-08-04T04:42:16.647" UserId="318" Text="Substrate has introduced a flag called `--no-hardware-benchmarks` to disable automatic hardware benchmarks. This implies if the flag is not set, the benchmark should run automatically at startup and measure the CPU speed. Without this benchmark and using the version of substrate which has this new CLI option, I was expecting to see a report that would give comparable figures to the configuration of substrate reference hardware:&#xD;&#xA;```&#xD;&#xA;SUBSTRATE_REFERENCE_HARDWARE =&#xD;&#xA;        [&#xD;&#xA;      	{&#xD;&#xA;      		&quot;metric&quot;: &quot;Blake2256&quot;,&#xD;&#xA;      		&quot;minimum&quot;: {&#xD;&#xA;      			&quot;MiBs&quot;: 1029.0&#xD;&#xA;      		}&#xD;&#xA;      	},&#xD;&#xA;      	{&#xD;&#xA;      		&quot;metric&quot;: &quot;Sr25519Verify&quot;,&#xD;&#xA;      		&quot;minimum&quot;: {&#xD;&#xA;      			&quot;KiBs&quot;: 666.0&#xD;&#xA;      		}&#xD;&#xA;      	},&#xD;&#xA;      	{&#xD;&#xA;      		&quot;metric&quot;: &quot;MemCopy&quot;,&#xD;&#xA;      		&quot;minimum&quot;: {&#xD;&#xA;      			&quot;GiBs&quot;: 14.323&#xD;&#xA;      		}&#xD;&#xA;      	},&#xD;&#xA;      	{&#xD;&#xA;      		&quot;metric&quot;: &quot;DiskSeqWrite&quot;,&#xD;&#xA;      		&quot;minimum&quot;: {&#xD;&#xA;      			&quot;MiBs&quot;: 450.0&#xD;&#xA;      		}&#xD;&#xA;      	},&#xD;&#xA;      	{&#xD;&#xA;      		&quot;metric&quot;: &quot;DiskRndWrite&quot;,&#xD;&#xA;      		&quot;minimum&quot;: {&#xD;&#xA;      			&quot;MiBs&quot;: 200.0&#xD;&#xA;      		}&#xD;&#xA;      	}&#xD;&#xA;      ]&#xD;&#xA;```&#xD;&#xA;However I couldn't find such logs when I started my node. Is my usage and expectation correct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15322" PostHistoryTypeId="1" PostId="4085" RevisionGUID="75cccd22-c590-4230-a391-1c711490282e" CreationDate="2022-08-04T04:42:16.647" UserId="318" Text="How to see the hardware benchmark results?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15323" PostHistoryTypeId="3" PostId="4085" RevisionGUID="75cccd22-c590-4230-a391-1c711490282e" CreationDate="2022-08-04T04:42:16.647" UserId="318" Text="|benchmarking|log|cli|hardware|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15324" PostHistoryTypeId="2" PostId="4086" RevisionGUID="248c193c-8715-48a5-bb6a-64c56c74afc4" CreationDate="2022-08-04T05:26:58.023" UserId="2980" Text="I am trying to find the correct parameters to pass into the query function for the substrate interface module when interacting with the parallel api to interact with their AMM. I attempted to modify the code from the linked post:&#xD;&#xA;&#xD;&#xA;&lt;https://substrate.stackexchange.com/questions/107/how-to-determine-which-parameters-are-required-when-using-substrate-query-to-q&gt;&#xD;&#xA;&#xD;&#xA;Below is my adapted code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;&#xD;&#xA;paraurl = 'wss://rpc.parallel.fi'&#xD;&#xA;&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=paraurl,&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;storage_function = substrate.get_metadata_storage_function('AMM','Pools')&#xD;&#xA;&#xD;&#xA;typeString = storage_function.get_params_type_string()&#xD;&#xA;print('Storage Function params length:', len(typeString))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Retrieve a SCALE object of the param type&#xD;&#xA;param_type = substrate.create_scale_object(storage_function.get_params_type_string()[0])&#xD;&#xA;&#xD;&#xA;# Possible options of Enum type&#xD;&#xA;print(param_type.type_mapping)&#xD;&#xA;&#xD;&#xA;# So if I want to use the 'Token' option: SCALE type is 'scale_info::42'&#xD;&#xA;token_param = substrate.create_scale_object(param_type.type_mapping[0][1])&#xD;&#xA;&#xD;&#xA;# Show possible options of Tokens&#xD;&#xA;print(token_param.type_mapping)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I am receiving the error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  File &quot;/home/travnado300/Documents/Python Scripts/Substrate Interactions/Parallel.py&quot;, line 30, in &lt;module&gt;&#xD;&#xA;    token_param = substrate.create_scale_object(param_type.type_mapping[0][1])&#xD;&#xA;  TypeError: 'NoneType' object is not subscriptable&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am wondering if this is just an issue with the parallel API not having all of the information available or if there is a way to access the params needed to pass into the function:&#xD;&#xA;```&#xD;&#xA;substrate.query()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15326" PostHistoryTypeId="1" PostId="4086" RevisionGUID="248c193c-8715-48a5-bb6a-64c56c74afc4" CreationDate="2022-08-04T05:26:58.023" UserId="2980" Text="Python substrate-interface discovering which params need to be passed into query function for parallel API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15327" PostHistoryTypeId="3" PostId="4086" RevisionGUID="248c193c-8715-48a5-bb6a-64c56c74afc4" CreationDate="2022-08-04T05:26:58.023" UserId="2980" Text="|python|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15328" PostHistoryTypeId="2" PostId="4087" RevisionGUID="5a49f925-08a7-47c0-ba00-ef0b0b04acb5" CreationDate="2022-08-04T05:31:30.670" UserId="251" Text="Actually, the polkadot js did not fetch all the items.&#xD;&#xA;&#xD;&#xA;It uses [get_keys_paged](https://polkadot.js.org/docs/substrate/rpc#getkeyspagedkey-storagekey-count-u32-startkey-storagekey-at-blockhash-vecstoragekey) to get the first \&lt;default paged size\&gt;(maybe 100) items.&#xD;&#xA;&#xD;&#xA;This RPC accepts a key and a start key as params. So, that is how it works. Starting searching the first `x` items under the given key.&#xD;&#xA;&#xD;&#xA;Tips:&#xD;&#xA;&#xD;&#xA;After getting all the keys that you want, call [get_storage](https://polkadot.js.org/docs/substrate/rpc#getstoragekey-storagekey-at-blockhash-storagedata) to get the key's value (generally this is a batch call).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15330" PostHistoryTypeId="5" PostId="4087" RevisionGUID="aef2787b-981e-454f-af5e-69e2635d1541" CreationDate="2022-08-04T05:37:29.530" UserId="251" Comment="added 197 characters in body" Text="Actually, the polkadot js did not fetch all the items.&#xD;&#xA;&#xD;&#xA;It uses [get_keys_paged](https://polkadot.js.org/docs/substrate/rpc#getkeyspagedkey-storagekey-count-u32-startkey-storagekey-at-blockhash-vecstoragekey) to get the first \&lt;default paged size\&gt;(maybe 100) items.&#xD;&#xA;&#xD;&#xA;This RPC accepts a key and a start key as params. So, that is how it works. Starting searching the first `x` items under the given key.&#xD;&#xA;&#xD;&#xA;Tips:&#xD;&#xA;&#xD;&#xA;After getting all the keys that you want, call [get_storage](https://polkadot.js.org/docs/substrate/rpc#getstoragekey-storagekey-at-blockhash-storagedata) to get the key's value (generally this is a batch call).&#xD;&#xA;&#xD;&#xA;You could make a loop like [this](https://github.com/hack-ink/subalfred/blob/18fef101dbe9a622f238dc69ace62bf7b10b3e79/src/subalfred/core/substrate_client/mod.rs#L38-L92) to fetch all the pairs.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15331" PostHistoryTypeId="5" PostId="4086" RevisionGUID="84c7da65-da05-469a-aa12-e06317a9a712" CreationDate="2022-08-04T05:37:33.037" UserId="2980" Comment="deleted 84 characters in body" Text="I am trying to find the correct parameters to pass into the query function for the substrate interface module when interacting with the parallel api to interact with their AMM. I attempted to modify the code from the linked post:&#xD;&#xA;&#xD;&#xA;&lt;https://substrate.stackexchange.com/questions/107/how-to-determine-which-parameters-are-required-when-using-substrate-query-to-q&gt;&#xD;&#xA;&#xD;&#xA;Below is my adapted code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;&#xD;&#xA;paraurl = 'wss://rpc.parallel.fi'&#xD;&#xA;&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=paraurl,&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;storage_function = substrate.get_metadata_storage_function('AMM','Pools')&#xD;&#xA;&#xD;&#xA;typeString = storage_function.get_params_type_string()&#xD;&#xA;print('Storage Function params length:', len(typeString))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Retrieve a SCALE object of the param type&#xD;&#xA;param_type = substrate.create_scale_object(storage_function.get_params_type_string()[0])&#xD;&#xA;&#xD;&#xA;# Possible options of Enum type&#xD;&#xA;print(param_type.type_mapping)&#xD;&#xA;&#xD;&#xA;token_param = substrate.create_scale_object(param_type.type_mapping[0][1])&#xD;&#xA;&#xD;&#xA;# Show possible options&#xD;&#xA;print(token_param.type_mapping)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I am receiving the error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  File &quot;/home/travnado300/Documents/Python Scripts/Substrate Interactions/Parallel.py&quot;, line 30, in &lt;module&gt;&#xD;&#xA;    token_param = substrate.create_scale_object(param_type.type_mapping[0][1])&#xD;&#xA;  TypeError: 'NoneType' object is not subscriptable&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am wondering if this is just an issue with the parallel API not having all of the information available or if there is a way to access the params needed to pass into the function:&#xD;&#xA;```&#xD;&#xA;substrate.query()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15332" PostHistoryTypeId="6" PostId="4031" RevisionGUID="e136cb0d-f900-4d82-9fd9-cf4c589bc7c3" CreationDate="2022-08-04T05:53:27.117" UserId="85" Comment="edited tags" Text="|block-production|block-size|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15333" PostHistoryTypeId="2" PostId="4088" RevisionGUID="4572edf8-702e-4ee2-8e29-96cfb88f4891" CreationDate="2022-08-04T08:45:13.007" UserId="2981" Text="I'm using ```#[pallet::getter(fn get_balance)]``` for my StorageMap to generate a getter function, but it returns pure u64 instead of Result type. What is the way to handle missing key cases then?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn get_balance)]&#xD;&#xA;	pub(super) type Balances&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Blake2_128Concat, T::AccountId, u64, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;	#[pallet::weight(10_000)]&#xD;&#xA;	pub fn transfer(&#xD;&#xA;		_origin: OriginFor&lt;T&gt;,&#xD;&#xA;		to: T::AccountId,&#xD;&#xA;		value: u64,&#xD;&#xA;	) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;		let sender = ensure_signed(_origin)?;&#xD;&#xA;		let sender_balance = Self::get_balance(&amp;sender);&#xD;&#xA;		let receiver_balance = Self::get_balance(&amp;to).ok_or(0 as u64);&#xD;&#xA;```&#xD;&#xA;After cargo check I receive this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0599]: no method named `ok_or` found for type `u64` in the current scope&#xD;&#xA;  --&gt; pallets/ERC20/src/lib.rs:93:50&#xD;&#xA;   |&#xD;&#xA;93 |             let receiver_balance = Self::get_balance(&amp;to).ok_or(0 as u64);&#xD;&#xA;   |                                                           ^^^^^ method not found in `u64`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm using 4.0.0-dev version FRAME libraries and 5.0.0 version sp-* libraries.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15335" PostHistoryTypeId="1" PostId="4088" RevisionGUID="4572edf8-702e-4ee2-8e29-96cfb88f4891" CreationDate="2022-08-04T08:45:13.007" UserId="2981" Text="Why getter function don't return Result type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15336" PostHistoryTypeId="3" PostId="4088" RevisionGUID="4572edf8-702e-4ee2-8e29-96cfb88f4891" CreationDate="2022-08-04T08:45:13.007" UserId="2981" Text="|pallet|rust|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15337" PostHistoryTypeId="2" PostId="4089" RevisionGUID="40d4d875-29ae-4bb3-9644-ce4a85fcf5c8" CreationDate="2022-08-04T08:48:20.960" UserId="251" Text="There is a trait bound.&#xD;&#xA;&#xD;&#xA;You are using `ValueQuery`.&#xD;&#xA; &#xD;&#xA;The value in the storage map must be implemented `Default`.&#xD;&#xA;&#xD;&#xA;If the key is missing in the storage map, then the default value will be returned.&#xD;&#xA;&#xD;&#xA;If you don't want a default value, go for [`OptionQuery`](https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.OptionQuery.html). If you want a result, then `X::get(y).ok_or(Error)?`." ContentLicense="CC BY-SA 4.0" />
  <row Id="15339" PostHistoryTypeId="4" PostId="4044" RevisionGUID="802f927c-78e8-4c18-89c3-8e6f381810bc" CreationDate="2022-08-04T08:54:23.797" UserId="28" Comment="edited title" Text="What happens when I call `System::remark`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15340" PostHistoryTypeId="5" PostId="4064" RevisionGUID="248bfd53-f7a2-49d5-971a-3ba9b428f173" CreationDate="2022-08-04T08:55:18.383" UserId="28" Comment="added 1581 characters in body" Text="Unfortunately there is a bug in the tutorial at the moment. While we work to fix it in the tutorial, here is a fix to the code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;// Re-export pallet items so that they can be accessed from the crate namespace.&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// Pallets use events to inform users when important changes are made.&#xD;&#xA;	// Event documentation should end with an array that provides descriptive names for parameters.&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		/// Event emitted when a claim has been created.&#xD;&#xA;		ClaimCreated { who: T::AccountId, claim: T::Hash },&#xD;&#xA;		/// Event emitted when a claim is revoked by the owner.&#xD;&#xA;		ClaimRevoked { who: T::AccountId, claim: T::Hash },&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		/// The claim already exists.&#xD;&#xA;		AlreadyClaimed,&#xD;&#xA;		/// The claim does not exist, so it cannot be revoked.&#xD;&#xA;		NoSuchClaim,&#xD;&#xA;		/// The claim is owned by another account, so caller can't revoke it.&#xD;&#xA;		NotClaimOwner,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub(super) type Claims&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Blake2_128Concat, T::Hash, (T::AccountId, T::BlockNumber)&gt;;&#xD;&#xA;&#xD;&#xA;	// Dispatchable functions allow users to interact with the pallet and invoke state changes.&#xD;&#xA;	// These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;	// Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn create_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash) -&gt; DispatchResult {&#xD;&#xA;			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// Verify that the specified claim has not already been stored.&#xD;&#xA;			ensure!(!Claims::&lt;T&gt;::contains_key(&amp;claim), Error::&lt;T&gt;::AlreadyClaimed);&#xD;&#xA;&#xD;&#xA;			// Get the block number from the FRAME System pallet.&#xD;&#xA;			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;&#xD;&#xA;			// Store the claim with the sender and block number.&#xD;&#xA;			Claims::&lt;T&gt;::insert(&amp;claim, (&amp;sender, current_block));&#xD;&#xA;&#xD;&#xA;			// Emit an event that the claim was created.&#xD;&#xA;			Self::deposit_event(Event::ClaimCreated { who: sender, claim });&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn revoke_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash) -&gt; DispatchResult {&#xD;&#xA;			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// Get owner of the claim, if none return an error.&#xD;&#xA;			let (owner, _) = Claims::&lt;T&gt;::get(&amp;claim).ok_or(Error::&lt;T&gt;::NoSuchClaim)?;&#xD;&#xA;&#xD;&#xA;			// Verify that sender of the current call is the claim owner.&#xD;&#xA;			ensure!(sender == owner, Error::&lt;T&gt;::NotClaimOwner);&#xD;&#xA;&#xD;&#xA;			// Remove claim from storage.&#xD;&#xA;			Claims::&lt;T&gt;::remove(&amp;claim);&#xD;&#xA;&#xD;&#xA;			// Emit an event that the claim was erased.&#xD;&#xA;			Self::deposit_event(Event::ClaimRevoked { who: sender, claim });&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Specifically, we switch the `StorageMap` from returning a value to returning an `Option&lt;Value&gt;`. We then handle that in the logic of the code." ContentLicense="CC BY-SA 4.0" />
  <row Id="15345" PostHistoryTypeId="2" PostId="4090" RevisionGUID="aac0f818-da5b-4a54-83b2-bd449ec97967" CreationDate="2022-08-04T09:03:58.010" UserId="627" Text="The Js API provides the `.keys()` and `.entries()` interfaces on storage. This means -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// returns all the entries, key + value pairs&#xD;&#xA;const entries = await api.query.someWhere.someMap.entries()&#xD;&#xA;&#xD;&#xA;// returns the keys only (decoded)&#xD;&#xA;const entries = await api.query.someWhere.someMap.keys()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For a description of the above you can follow along in the documentation, it is listed here -&#xD;&#xA;&#xD;&#xA; - [map with keys and entries](https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries)&#xD;&#xA; - [more examples with double-maps](https://polkadot.js.org/docs/api/cookbook/storage#how-do-i-use-entrieskeys-on-double-maps)&#xD;&#xA;&#xD;&#xA;What the UI does for maps is to call `.entries()` when the option is selected. Underlying in the API it indeed uses the pages keys RPCs to retrieve all keys/entries." ContentLicense="CC BY-SA 4.0" />
  <row Id="15347" PostHistoryTypeId="2" PostId="4091" RevisionGUID="b725e29c-3553-49a7-93d0-55496d5b3a00" CreationDate="2022-08-04T09:04:45.623" UserId="28" Text="The behavior of how FRAME generates storage keys leads to the fact that all pallets have their storage under a shared prefix-trie:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All the storage keys are in the format:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;hash(name) ++ hash(name) ++ hash(name) ++ ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;twox128(pallet_name) + twox128(storage_name) + ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So if you call `remove_storage_prefix` or `kill_prefix` with the appropriate pallet prefix, you will remove all the storage for that pallet.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wp4Sr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15349" PostHistoryTypeId="5" PostId="4091" RevisionGUID="3a94a0aa-3d5e-45be-80f1-a527d017dd43" CreationDate="2022-08-04T09:08:07.847" UserId="28" Comment="edited body" Text="The behavior of how FRAME generates storage keys leads to the fact that all pallets have their storage under a shared prefix-trie:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All the storage keys are in the format:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;hash(name) ++ hash(name) ++ hash(name) ++ ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;twox128(pallet_name) + twox128(storage_name) + ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So if you call `remove_storage_prefix` or `kill_prefix` with the appropriate pallet prefix, you will remove all the storage for that pallet.&#xD;&#xA;&#xD;&#xA;  [2]: https://i.stack.imgur.com/1gQMf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15350" PostHistoryTypeId="2" PostId="4092" RevisionGUID="b4b09947-7467-419b-b296-3bc8bb11f6c5" CreationDate="2022-08-04T09:08:32.713" UserId="2982" Text="How to store enumeration in smart contract with ink!&#xD;&#xA;I have a field in smart contract with type `Mapping&lt;AccountId, Enum&gt;`, I tried to use guide https://ink.substrate.io/datastructures/custom-datastructure, but Im dont understand how I should pull, push and clear Enum values in storage by pointers. " ContentLicense="CC BY-SA 4.0" />
  <row Id="15352" PostHistoryTypeId="1" PostId="4092" RevisionGUID="b4b09947-7467-419b-b296-3bc8bb11f6c5" CreationDate="2022-08-04T09:08:32.713" UserId="2982" Text="How to store a enumerations in smart contracts with ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15353" PostHistoryTypeId="3" PostId="4092" RevisionGUID="b4b09947-7467-419b-b296-3bc8bb11f6c5" CreationDate="2022-08-04T09:08:32.713" UserId="2982" Text="|ink|smart-contract|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15354" PostHistoryTypeId="2" PostId="4093" RevisionGUID="7746dd04-e0fb-434a-a427-388d75374ef3" CreationDate="2022-08-04T09:12:56.247" UserId="627" Text="There are 2 questions here -&#xD;&#xA;&#xD;&#xA; - `None` as found in an `Option`&#xD;&#xA; - `Tuple` types&#xD;&#xA;&#xD;&#xA;In the JS world you can do the following -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// signature of this extrinsic is value: Option&lt;(T::AccountId, u8)&gt;&#xD;&#xA;// send None through - mapped from null&#xD;&#xA;await api.tx.someWhere.something(null)&#xD;&#xA;&#xD;&#xA;// send a Tuple value through&#xD;&#xA;await api.tx.someWhere.something(['1Test...', 5])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So `Tuple` values appear is a JS array with the correct number of elements.&#xD;&#xA;&#xD;&#xA;To expand this into your signature type posted above, i.e. an `Option` of a `Vec` of `Tuples` -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// signature of this extrinsic is value: Option&lt;Vec&lt;(T::AccountId, u8)&gt;&gt;&#xD;&#xA;// send None through - mapped from null&#xD;&#xA;await api.tx.someWhere.something(null)&#xD;&#xA;&#xD;&#xA;// send a Vec&lt;Tuple&gt; value through (2 values)&#xD;&#xA;await api.tx.someWhere.something([['1Test...', 5], ['1Test...', 6]])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The same would apply to eg. `.query.*` if you need to specify a `Tuple`." ContentLicense="CC BY-SA 4.0" />
  <row Id="15356" PostHistoryTypeId="2" PostId="4094" RevisionGUID="6d068c6a-e9df-46ac-bd88-bc9cfaf442a9" CreationDate="2022-08-04T09:39:08.160" UserId="2982" Text="Just derive this trait to Enum or use thid code:&#xD;&#xA;&#xD;&#xA;      impl SpreadLayout for Enum {&#xD;&#xA;        const FOOTPRINT: u64 = 2;&#xD;&#xA;&#xD;&#xA;        fn pull_spread(ptr: &amp;mut KeyPtr) -&gt; Self {&#xD;&#xA;            Self::from(SpreadLayout::pull_spread(ptr))&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn push_spread(&amp;self, ptr: &amp;mut KeyPtr) {&#xD;&#xA;            SpreadLayout::push_spread(self, ptr);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn clear_spread(&amp;self, ptr: &amp;mut KeyPtr) {&#xD;&#xA;            SpreadLayout::clear_spread(self, ptr);&#xD;&#xA;        }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="15358" PostHistoryTypeId="52" PostId="4083" RevisionGUID="579482ab-c2cf-412e-96f8-248710659db8" CreationDate="2022-08-04T09:49:17.050" />
  <row Id="15359" PostHistoryTypeId="2" PostId="4095" RevisionGUID="e9767b93-4e43-400e-81e1-66a59208f57d" CreationDate="2022-08-04T10:00:53.817" UserId="2809" Text="As the title says, I have added EVM pallet to my NPoS runtime(using [chainsafe/substrate-node-template](https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking)), and when i run my node with Alice and Bob validators, the StakingElection begins to fail.&#xD;&#xA;&#xD;&#xA;I don't believe i'm missing any configurations, and I have only added the pallet to Runtime for now, and its genesis config in chain_spec.rs, making no other changes.&#xD;&#xA;&#xD;&#xA;**NOTE** The chainsafe template had an issue where eras didn't change hence no election occured, but I have solved that with [this pr](https://github.com/ChainSafe/substrate-node-template/pull/4), the NPoS election works fine not having added the EVM pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2pO2q.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15361" PostHistoryTypeId="1" PostId="4095" RevisionGUID="e9767b93-4e43-400e-81e1-66a59208f57d" CreationDate="2022-08-04T10:00:53.817" UserId="2809" Text="EVM pallet causes StakingElection.fail" ContentLicense="CC BY-SA 4.0" />
  <row Id="15362" PostHistoryTypeId="3" PostId="4095" RevisionGUID="e9767b93-4e43-400e-81e1-66a59208f57d" CreationDate="2022-08-04T10:00:53.817" UserId="2809" Text="|staking|evm|session|election|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15363" PostHistoryTypeId="2" PostId="4096" RevisionGUID="9f017eff-17e9-4d7f-b3b2-b0ae8ae5e750" CreationDate="2022-08-04T10:23:51.673" UserId="94" Text="A `v0.9.27` Polkadot node will print hardware and performance info on startup. It looks like this:&#xD;&#xA;```sh&#xD;&#xA;Parity Polkadot    &#xD;&#xA;✌️  version 0.9.27-b017bad50d3    &#xD;&#xA;❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2022    &#xD;&#xA; Chain specification: Polkadot    &#xD;&#xA;  Node name: ethereal-throne-1125    &#xD;&#xA;⛓  Native runtime: polkadot-9270 (parity-polkadot-0.tx13.au0) &#xD;&#xA;   &#xD;&#xA;# General hardware info&#xD;&#xA; Operating system: linux    &#xD;&#xA; CPU architecture: x86_64    &#xD;&#xA; Target environment: gnu&#xD;&#xA; CPU: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz    &#xD;&#xA; CPU cores: 4    &#xD;&#xA; Memory: 31831MB    &#xD;&#xA; Kernel: 5.15.0-43-generic    &#xD;&#xA; Linux distribution: Ubuntu 22.04.1 LTS    &#xD;&#xA; Virtual machine: no&#xD;&#xA;&#xD;&#xA;# Hardware benchmarks&#xD;&#xA; CPU score: 1063MB/s    &#xD;&#xA; Memory score: 17465MB/s    &#xD;&#xA; Disk score (seq. writes): 2793MB/s    &#xD;&#xA; Disk score (rand. writes): 348MB/s &#xD;&#xA;&#xD;&#xA; Highest known block at #0    &#xD;&#xA;〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It is also the case for slightly earlier Polkadot versions.  &#xD;&#xA;You can see that there are two paragraphs of output that mention either hardware or its performance.  &#xD;&#xA;Now the `--no-hardware-benchmarks` flag will suppress this output by not running the benchmarks.  &#xD;&#xA;&#xD;&#xA;Additionally you can run them explicitly by calling `polkadot benchmark machine`.  &#xD;&#xA;This performs a longer and more precise benchmark. The output depends on your hardware:  &#xD;&#xA;```pre&#xD;&#xA;Running machine benchmarks...    &#xD;&#xA;+----------+----------------+--------------+--------------+-------------------+&#xD;&#xA;| Category | Function       | Score        | Minimum      | Result            |&#xD;&#xA;+=============================================================================+&#xD;&#xA;| CPU      | BLAKE2-256     | 994.00 MiB/s | 1.00 GiB/s   | ✅ Pass ( 96.6 %) |&#xD;&#xA;|----------+----------------+--------------+--------------+-------------------|&#xD;&#xA;| CPU      | SR25519-Verify | 652.91 KiB/s | 666.00 KiB/s | ✅ Pass ( 98.0 %) |&#xD;&#xA;|----------+----------------+--------------+--------------+-------------------|&#xD;&#xA;| Memory   | Copy           | 15.46 GiB/s  | 14.32 GiB/s  | ✅ Pass (107.9 %) |&#xD;&#xA;|----------+----------------+--------------+--------------+-------------------|&#xD;&#xA;| Disk     | Seq Write      | 2.48 GiB/s   | 450.00 MiB/s | ✅ Pass (564.8 %) |&#xD;&#xA;|----------+----------------+--------------+--------------+-------------------|&#xD;&#xA;| Disk     | Rnd Write      | 300.62 MiB/s | 200.00 MiB/s | ✅ Pass (150.3 %) |&#xD;&#xA;+----------+----------------+--------------+--------------+-------------------+&#xD;&#xA;From 5 benchmarks in total, 5 passed and 0 failed (10% fault tolerance).    &#xD;&#xA;The hardware meets the requirements &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15365" PostHistoryTypeId="2" PostId="4097" RevisionGUID="79347c18-9b42-47e7-b8ce-6dfd14aca87b" CreationDate="2022-08-04T10:37:03.163" UserId="213" Text="I want to pass Balance to SchellingGameSharedSource.&#xD;&#xA;&#xD;&#xA;Here is my code:&#xD;&#xA;&#xD;&#xA;    use sortition_sum_game::types::{SumTreeName};&#xD;&#xA;    use schelling_game_shared::types::{SchellingGameType};&#xD;&#xA;    type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;    type BalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Currency as Currency&lt;AccountIdOf&lt;T&gt;&gt;&gt;::Balance;&#xD;&#xA;    &#xD;&#xA;    #[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;    		type SchellingGameSharedSource: SchellingGameSharedLink&lt;SumTreeName=SumTreeName, SchellingGameType = SchellingGameType, BlockNumber = Self::BlockNumber, AccountId= Self::AccountId, Balance=BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;    		type Currency: ReservableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;SchellingGameSharedLink trait&#xD;&#xA;&#xD;&#xA;    pub trait SchellingGameSharedLink {&#xD;&#xA;    	type SumTreeName;&#xD;&#xA;    	type SchellingGameType;&#xD;&#xA;    	type BlockNumber;&#xD;&#xA;    	type AccountId;&#xD;&#xA;    	type Balance;&#xD;&#xA;    &#xD;&#xA;    fn apply_jurors_helper_link(&#xD;&#xA;    		key: Self::SumTreeName,&#xD;&#xA;    		game_type: Self::SchellingGameType,&#xD;&#xA;    		who: Self::AccountId,&#xD;&#xA;    		stake: Self::Balance,&#xD;&#xA;    	) -&gt; DispatchResult;&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Passing `Balance=BalanceOf&lt;T&gt;` gives error can't find type T in this scope   &#xD;&#xA;and passing `Balance=Self::Balance&gt;` gives error associated type `Balance` not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="15367" PostHistoryTypeId="1" PostId="4097" RevisionGUID="79347c18-9b42-47e7-b8ce-6dfd14aca87b" CreationDate="2022-08-04T10:37:03.163" UserId="213" Text="How pass Balance in loosely coupled pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15368" PostHistoryTypeId="3" PostId="4097" RevisionGUID="79347c18-9b42-47e7-b8ce-6dfd14aca87b" CreationDate="2022-08-04T10:37:03.163" UserId="213" Text="|loose-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15369" PostHistoryTypeId="2" PostId="4098" RevisionGUID="baa88613-80ba-4f64-9dc1-a7d81b3d8994" CreationDate="2022-08-04T10:38:56.397" UserId="73" Text="You need to pass `Balance = BalanceOf&lt;Self&gt;`.&#xD;&#xA;&#xD;&#xA;In the context of the trait there is no generic parameter `T` defined, so you can not use it. Your `BalanceOf` is written in a way that it assumes that `T` is something that implements your `Config` trait. So, if you want to use it in the context of your trait declaration, you need to pass `Self` as parameter to `BalanceOf`." ContentLicense="CC BY-SA 4.0" />
  <row Id="15371" PostHistoryTypeId="2" PostId="4099" RevisionGUID="41b80fad-4a51-4c3a-9139-09b94682b4d0" CreationDate="2022-08-04T10:43:20.267" UserId="251" Text="Check if they are in [Invulnerables](https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/mod.rs#L236)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15373" PostHistoryTypeId="5" PostId="4072" RevisionGUID="2d802434-7c1c-4f2d-8871-36e3ac1ece1c" CreationDate="2022-08-04T11:36:03.873" UserId="29" Comment="added 16 characters in body" Text="When I use the command ```cargo build --release``` to build substrate-node-template on version `polkadot-v0.9.26`, the following  error is emitted:&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `librocksdb-sys v0.6.1+6.28.2`&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `.../substrate-node-template/target/release/build/librocksdb-sys-60f437c04bdca76d/build-script-build` (exit status: 127)&#xD;&#xA;  --- stderr&#xD;&#xA;  Inconsistency detected by ld.so: dl-open.c: 678: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)-&gt;r_state == RT_CONSISTENT' failed!&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; rust version: rustc 1.62.1 (e092d0b6b 2022-07-16)    OS version:&#xD;&#xA;&#xD;&#xA;&gt; CentOS Linux release 7.9.2009 (Core)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15374" PostHistoryTypeId="5" PostId="4092" RevisionGUID="0d28c821-c0b2-4292-b18b-fe674b64cae2" CreationDate="2022-08-04T11:44:41.760" UserId="29" Comment="edited body" Text="How to store enumeration in smart contract with ink!&#xD;&#xA;I have a field in smart contract with type `Mapping&lt;AccountId, Enum&gt;`, I tried to use guide https://ink.substrate.io/datastructures/custom-datastructure, but I don't understand how I should pull, push and clear Enum values in storage by pointers. " ContentLicense="CC BY-SA 4.0" />
  <row Id="15375" PostHistoryTypeId="5" PostId="4094" RevisionGUID="dcee2d87-70a7-41b7-8ccb-5448aeeb4b0d" CreationDate="2022-08-04T11:44:59.403" UserId="29" Comment="edited body" Text="Just derive this trait to Enum or use this code:&#xD;&#xA;&#xD;&#xA;      impl SpreadLayout for Enum {&#xD;&#xA;        const FOOTPRINT: u64 = 2;&#xD;&#xA;&#xD;&#xA;        fn pull_spread(ptr: &amp;mut KeyPtr) -&gt; Self {&#xD;&#xA;            Self::from(SpreadLayout::pull_spread(ptr))&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn push_spread(&amp;self, ptr: &amp;mut KeyPtr) {&#xD;&#xA;            SpreadLayout::push_spread(self, ptr);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn clear_spread(&amp;self, ptr: &amp;mut KeyPtr) {&#xD;&#xA;            SpreadLayout::clear_spread(self, ptr);&#xD;&#xA;        }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="15376" PostHistoryTypeId="5" PostId="4090" RevisionGUID="977d52d8-96bf-4354-996f-25bc889cab13" CreationDate="2022-08-04T12:04:12.940" UserId="1918" Comment="Copy edited (e.g. ref. &lt;https://en.wikipedia.org/wiki/Sentence_clause_structure#Run-on_sentences&gt;). Brevity. Expanded." Text="The JavaScript API provides the `.keys()` and `.entries()` interfaces on storage. This means -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// returns all the entries, key + value pairs&#xD;&#xA;const entries = await api.query.someWhere.someMap.entries()&#xD;&#xA;&#xD;&#xA;// returns the keys only (decoded)&#xD;&#xA;const entries = await api.query.someWhere.someMap.keys()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For a description of the above, you can follow along in the documentation. It is listed here -&#xD;&#xA;&#xD;&#xA; - [map with keys and entries](https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries)&#xD;&#xA; - [more examples with double-maps](https://polkadot.js.org/docs/api/cookbook/storage#how-do-i-use-entrieskeys-on-double-maps)&#xD;&#xA;&#xD;&#xA;The UI calls `.entries()` for maps when the option is selected. Underlying in the API it indeed uses the pages keys RPCs to retrieve all keys/entries.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15377" PostHistoryTypeId="24" PostId="4090" RevisionGUID="977d52d8-96bf-4354-996f-25bc889cab13" CreationDate="2022-08-04T12:04:12.940" Comment="Proposed by 1918 approved by 627 edit id of 259" ContentLicense="CC BY-SA 4.0" />
  <row Id="15380" PostHistoryTypeId="5" PostId="838" RevisionGUID="50d37b28-e973-4e79-b8a6-62dfb90b28c0" CreationDate="2022-08-04T12:20:01.167" UserId="1918" Comment="Copy edited (e.g. ref. &lt;https://polkadot.js.org/&gt; and &lt;https://en.wikipedia.org/wiki/JavaScript&gt;)." Text="The API provides application developers the ability to query a node and interact with the Polkadot or Substrate chains using JavaScript.&#xD;&#xA;&#xD;&#xA;Learn more here: https://polkadot.js.org" ContentLicense="CC BY-SA 4.0" />
  <row Id="15381" PostHistoryTypeId="24" PostId="838" RevisionGUID="50d37b28-e973-4e79-b8a6-62dfb90b28c0" CreationDate="2022-08-04T12:20:01.167" Comment="Proposed by 1918 approved by 627, 34 edit id of 256" ContentLicense="CC BY-SA 4.0" />
  <row Id="15382" PostHistoryTypeId="10" PostId="4070" RevisionGUID="e3e29551-02b4-47d5-b53c-95461017fac0" CreationDate="2022-08-04T12:20:26.697" UserId="34" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="15384" PostHistoryTypeId="10" PostId="4075" RevisionGUID="80b84b14-8946-42f3-b162-1b93d2166d89" CreationDate="2022-08-04T12:21:23.980" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="15385" PostHistoryTypeId="11" PostId="4075" RevisionGUID="a556759d-7cdc-48e1-b778-2dd84f64a339" CreationDate="2022-08-04T12:22:55.650" UserId="34" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="15386" PostHistoryTypeId="5" PostId="4095" RevisionGUID="f5e14662-5150-4208-9484-800fb8a7a393" CreationDate="2022-08-04T12:23:54.533" UserId="2809" Comment="added 266 characters in body" Text="As the title says, I have added EVM pallet to my NPoS runtime(using [chainsafe/substrate-node-template](https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking)), and when i run my node with Alice and Bob validators, the StakingElection begins to fail.&#xD;&#xA;&#xD;&#xA;I don't believe i'm missing any configurations, and I have only added the pallet to Runtime for now, and its genesis config in chain_spec.rs, making no other changes.&#xD;&#xA;&#xD;&#xA;**NOTE** The chainsafe template had an issue where eras didn't change hence no election occured, but I have solved that with [this pr](https://github.com/ChainSafe/substrate-node-template/pull/4), the NPoS election works fine not having added the EVM pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2pO2q.png&#xD;&#xA;&#xD;&#xA;**UPDATE 1** I have added pallet_ethereum, changed SubstrateBlockHashMapping to EthereuBlockhashMapping, still the same issue.&#xD;&#xA;If I remove all EVM related stuff, my NPoS works fine. Solution is submitted, election is finalized and a new authority set is chosen." ContentLicense="CC BY-SA 4.0" />
  <row Id="15387" PostHistoryTypeId="5" PostId="4083" RevisionGUID="8520bcec-a685-4621-83db-c5663ab1fe39" CreationDate="2022-08-04T12:57:17.540" UserId="1918" Comment="Copy edited (ref. &lt;https://polkadot.js.org/&gt; and &lt;https://www.youtube.com/watch?v=1Dax90QyXgI&amp;t=0m38s&gt;). Fixed the question formation - missing auxiliary (or helping) verb - see e.g. &lt;https://www.youtube.com/watch?v=t4yWEt0OSpg&amp;t=1m49s&gt; (QUASM) - alternatively, drop the question mark (title only)." Text="How can I get all items in a storage map? In polkadot-js, can we choose a storage map and give no id and its return all items? How can I do it like that?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15388" PostHistoryTypeId="4" PostId="4083" RevisionGUID="8520bcec-a685-4621-83db-c5663ab1fe39" CreationDate="2022-08-04T12:57:17.540" UserId="1918" Comment="Copy edited (ref. &lt;https://polkadot.js.org/&gt; and &lt;https://www.youtube.com/watch?v=1Dax90QyXgI&amp;t=0m38s&gt;). Fixed the question formation - missing auxiliary (or helping) verb - see e.g. &lt;https://www.youtube.com/watch?v=t4yWEt0OSpg&amp;t=1m49s&gt; (QUASM) - alternatively, drop the question mark (title only)." Text="How can I get all items in a storage map?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15389" PostHistoryTypeId="24" PostId="4083" RevisionGUID="8520bcec-a685-4621-83db-c5663ab1fe39" CreationDate="2022-08-04T12:57:17.540" Comment="Proposed by 1918 approved by 34 edit id of 258" ContentLicense="CC BY-SA 4.0" />
  <row Id="15392" PostHistoryTypeId="52" PostId="4085" RevisionGUID="31a90dfe-61ec-4a3a-90da-f7f287520dae" CreationDate="2022-08-04T13:28:42.553" />
  <row Id="15394" PostHistoryTypeId="2" PostId="4100" RevisionGUID="e4857b02-f885-411d-81ab-4efcbcf93237" CreationDate="2022-08-04T13:51:41.520" UserId="165" Text="This issue have been solved in this PR- https://github.com/ChainSafe/substrate-node-template/pull/4" ContentLicense="CC BY-SA 4.0" />
  <row Id="15396" PostHistoryTypeId="5" PostId="4095" RevisionGUID="646d1077-bf95-4bc9-9710-3acfb5d33ab8" CreationDate="2022-08-04T13:55:50.493" UserId="2809" Comment="added 195 characters in body" Text="As the title says, I have added EVM pallet to my NPoS runtime(using [chainsafe/substrate-node-template](https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking)), and when i run my node with Alice and Bob validators, the StakingElection begins to fail.&#xD;&#xA;&#xD;&#xA;I don't believe i'm missing any configurations, and I have only added the pallet to Runtime for now, and its genesis config in chain_spec.rs, making no other changes.&#xD;&#xA;&#xD;&#xA;**NOTE** The chainsafe template had an issue where eras didn't change hence no election occured, but I have solved that with [this pr](https://github.com/ChainSafe/substrate-node-template/pull/4), the NPoS election works fine not having added the EVM pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**UPDATE 1** I have added pallet_ethereum, changed SubstrateBlockHashMapping to EthereuBlockhashMapping, still the same issue.&#xD;&#xA;If I remove all EVM related stuff, my NPoS works fine. Solution is submitted, election is finalized and a new authority set is chosen.&#xD;&#xA;&#xD;&#xA;**UPDATE 2**&#xD;&#xA;I forgot to add an image of whaat should normally happen(when pallet_evm is not installed)&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2pO2q.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/t6yQZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15401" PostHistoryTypeId="5" PostId="4095" RevisionGUID="973e960c-9b42-4dce-bf51-e226566ea307" CreationDate="2022-08-04T14:34:38.347" UserId="2809" Comment="added 152 characters in body" Text="As the title says, I have added EVM pallet to my NPoS runtime(using [chainsafe/substrate-node-template](https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking)), and when i run my node with Alice and Bob validators, the StakingElection begins to fail.&#xD;&#xA;&#xD;&#xA;I don't believe i'm missing any configurations, and I have only added the pallet to Runtime for now, and its genesis config in chain_spec.rs, making no other changes.&#xD;&#xA;&#xD;&#xA;**NOTE** The chainsafe template had an issue where eras didn't change hence no election occured, but I have solved that with [this pr](https://github.com/ChainSafe/substrate-node-template/pull/4), the NPoS election works fine not having added the EVM pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**UPDATE 1** I have added pallet_ethereum, changed SubstrateBlockHashMapping to EthereuBlockhashMapping, still the same issue.&#xD;&#xA;If I remove all EVM related stuff, my NPoS works fine. Solution is submitted, election is finalized and a new authority set is chosen.&#xD;&#xA;&#xD;&#xA;**UPDATE 2**&#xD;&#xA;I forgot to add an image of whaat should normally happen(when pallet_evm is not installed)&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;**UPDATE 3**&#xD;&#xA;Here is the branch and repo in question [here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2pO2q.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/t6yQZ.png&#xD;&#xA;  [3]: https://github.com/talhadaar/chainsafe-substrate-node-template/tree/question" ContentLicense="CC BY-SA 4.0" />
  <row Id="15403" PostHistoryTypeId="2" PostId="4101" RevisionGUID="16b492d4-bd3b-4a4d-a6db-c4d30c51e863" CreationDate="2022-08-04T16:16:41.037" UserId="1789" Text="I was trying to add Frontier as a dependency of my parachain(Substrate Cumulus based) project... &#xD;&#xA;```&#xD;&#xA;$ cargo build -r       &#xD;&#xA;    Updating git repository `https://github.com/PNetwork/frontier`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/frontier`&#xD;&#xA;    Updating crates.io index&#xD;&#xA;error: failed to select a version for `parity-db`.&#xD;&#xA;    ... required by package `fc-db v2.0.0-dev (https://github.com/PNetwork/frontier?branch=patch3-polkadot-v0.9.25#2e4daa4e)`&#xD;&#xA;    ... which satisfies git dependency `fc-db` of package `fc-cli v1.0.0-dev (https://github.com/PNetwork/frontier?branch=patch3-polkadot-v0.9.25#2e4daa4e)`&#xD;&#xA;    ... which satisfies git dependency `fc-cli` of package `parachain-template-node v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/node)`&#xD;&#xA;versions that meet the requirements `^0.3.14` are: 0.3.16, 0.3.15, 0.3.14&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `parity-db v0.3.13`&#xD;&#xA;    ... which satisfies dependency `parity-db = &quot;^0.3.13&quot;` (locked to 0.3.13) of package `polkadot-node-subsystem-util v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`&#xD;&#xA;    ... which satisfies git dependency `polkadot-node-subsystem-util` (locked to 0.9.25) of package `polkadot-approval-distribution v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`&#xD;&#xA;    ... which satisfies git dependency `polkadot-approval-distribution` (locked to 0.9.25) of package `polkadot-service v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`&#xD;&#xA;    ... which satisfies git dependency `polkadot-service` (locked to 0.9.25) of package `cumulus-relay-chain-inprocess-interface v0.1.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.25#390042a0)`&#xD;&#xA;    ... which satisfies git dependency `cumulus-relay-chain-inprocess-interface` (locked to 0.1.0) of package `parachain-template-node v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `parity-db` which could resolve this conflict&#xD;&#xA;```&#xD;&#xA;My project/node/Cargo.toml&#xD;&#xA;```&#xD;&#xA;cumulus-relay-chain-rpc-interface = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;```&#xD;&#xA;I cannot change the dependency at https://github.com/PNetwork/frontier, &#xD;&#xA;so I think I need to somehow specify the version of `cumulus-relay-chain-inprocess-interface`. Right? &#xD;&#xA;&#xD;&#xA;How can I do that so the parity-db is somehow pumped up in version?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15405" PostHistoryTypeId="1" PostId="4101" RevisionGUID="16b492d4-bd3b-4a4d-a6db-c4d30c51e863" CreationDate="2022-08-04T16:16:41.037" UserId="1789" Text="error: failed to select a version for `parity-db`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15406" PostHistoryTypeId="3" PostId="4101" RevisionGUID="16b492d4-bd3b-4a4d-a6db-c4d30c51e863" CreationDate="2022-08-04T16:16:41.037" UserId="1789" Text="|parachain|frontier|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15407" PostHistoryTypeId="2" PostId="4102" RevisionGUID="bb8fe631-1caa-46ff-8395-eb0ba0054d2f" CreationDate="2022-08-04T17:28:59.580" UserId="2952" Text="I was following the substrate kitties tutorial where i needed to create a storage map where the id is mapped to the `kitty` struct which is created. But i am getting the following error.&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `Kitty&lt;T&gt;: TypeInfo` is not satisfied&#xD;&#xA;  --&gt; pallets/mykitties/src/lib.rs:85:12&#xD;&#xA;   |&#xD;&#xA;85 |     #[pallet::storage]&#xD;&#xA;   |               ^^^^^^^ the trait `TypeInfo` is not implemented for `Kitty&lt;T&gt;`&#xD;&#xA;   |&#xD;&#xA;   = help: the following other types implement trait `TypeInfo`:&#xD;&#xA;             &amp;T&#xD;&#xA;             &amp;mut T&#xD;&#xA;             ()&#xD;&#xA;             (A, B)&#xD;&#xA;             (A, B, C)&#xD;&#xA;             (A, B, C, D)&#xD;&#xA;             (A, B, C, D, E)&#xD;&#xA;             (A, B, C, D, E, F)&#xD;&#xA;           and 167 others&#xD;&#xA;   = note: required because of the requirements on the impl of `StaticTypeInfo` for `Kitty&lt;T&gt;`&#xD;&#xA;   = note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageKitties&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::Hash, Kitty&lt;T&gt;&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is my pallet code below(pallets/mykitties/src/lib.rs)&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::{&#xD;&#xA;		dispatch::{DispatchResult, DispatchResultWithPostInfo},&#xD;&#xA;		pallet_prelude::*,&#xD;&#xA;		sp_runtime::traits::{Hash, Zero},&#xD;&#xA;		traits::{Currency, ExistenceRequirement, Randomness},&#xD;&#xA;	};&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use sp_io::hashing::blake2_128;&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	use serde::{Deserialize, Serialize};&#xD;&#xA;&#xD;&#xA;	type AccountOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;	type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, Debug, Clone, PartialEq)]&#xD;&#xA;	#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;	pub enum Gender {&#xD;&#xA;		Male,&#xD;&#xA;		Female,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl Default for Gender {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			Gender::Male&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Clone, Encode, Decode, PartialEq)]&#xD;&#xA;	pub struct Kitty&lt;T: Config&gt; {&#xD;&#xA;		pub dna: [u8; 16],&#xD;&#xA;		pub price: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;		pub gender: Gender,&#xD;&#xA;		pub owner: AccountOf&lt;T&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// TODO Part II: Struct for holding Kitty information.&#xD;&#xA;&#xD;&#xA;	// TODO Part II: Enum and implementation to handle Gender type in Kitty struct.&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	/// Configure the pallet by specifying the parameters and types it depends on.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: pallet_balances::Config + frame_system::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;&#xD;&#xA;		// The Currency handler for the Kitties pallet.&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		// TODO Part II: Specify the custom types for our runtime.&#xD;&#xA;		type KittyRandomness: Randomness&lt;Self::Hash, Self::BlockNumber&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxKittyOwned: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// Errors.&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		// TODO Part III&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	// #[pallet::metadata(T::AccountId = &quot;AccountId&quot;)]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		// TODO Part III&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn all_kitties_count)]&#xD;&#xA;	pub(super) type AllKittiesCount&lt;T: Config&gt; = StorageValue&lt;_, u64, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn kitties)]&#xD;&#xA;	/// Stores a Kitty's unique traits, owner and price.&#xD;&#xA;	pub(super) type Kitties&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, T::Hash, Kitty&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn kitties_owned)]&#xD;&#xA;	pub(super) type KittiesOwned&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Twox64Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		BoundedVec&lt;T::Hash, T::MaxKittyOwned&gt;,&#xD;&#xA;		ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	// TODO Part II: Remaining storage items.&#xD;&#xA;&#xD;&#xA;	// TODO Part III: Our pallet's genesis configuration.&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		// TODO Part III: create_kitty&#xD;&#xA;&#xD;&#xA;		// TODO Part III: set_price&#xD;&#xA;&#xD;&#xA;		// TODO Part III: transfer&#xD;&#xA;&#xD;&#xA;		// TODO Part III: buy_kitty&#xD;&#xA;&#xD;&#xA;		// TODO Part III: breed_kitty&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl&lt;T: Config&gt; Kitty&lt;T&gt; {&#xD;&#xA;		pub fn gender(dna: T::Hash) -&gt; Gender {&#xD;&#xA;			if dna.as_ref()[0] % 2 == 0 {&#xD;&#xA;				Gender::Male&#xD;&#xA;			} else {&#xD;&#xA;				Gender::Female&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		// TODO Part III: helper functions for dispatchable functions&#xD;&#xA;&#xD;&#xA;		// TODO: increment_nonce, random_hash, mint, transfer_from&#xD;&#xA;&#xD;&#xA;		fn gen_gender() -&gt; Gender {&#xD;&#xA;			let random = T::KittyRandomness::random(&amp;b&quot;gender&quot;[..]).0;&#xD;&#xA;			match random.as_ref()[0] % 2 {&#xD;&#xA;				0 =&gt; Gender::Male,&#xD;&#xA;				_ =&gt; Gender::Female,&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn gen_dna() -&gt; [u8; 16] {&#xD;&#xA;			let payload = (&#xD;&#xA;				T::KittyRandomness::random(&amp;b&quot;gender&quot;[..]).0,&#xD;&#xA;				&lt;frame_system::Pallet&lt;T&gt;&gt;::block_number(),&#xD;&#xA;			);&#xD;&#xA;&#xD;&#xA;			payload.using_encoded(blake2_128)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please can anybody help me to solve this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15409" PostHistoryTypeId="1" PostId="4102" RevisionGUID="bb8fe631-1caa-46ff-8395-eb0ba0054d2f" CreationDate="2022-08-04T17:28:59.580" UserId="2952" Text="the trait bound `Kitty&lt;T&gt;: TypeInfo` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="15410" PostHistoryTypeId="3" PostId="4102" RevisionGUID="bb8fe631-1caa-46ff-8395-eb0ba0054d2f" CreationDate="2022-08-04T17:28:59.580" UserId="2952" Text="|pallet|storage|kitties-tutorial|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15411" PostHistoryTypeId="2" PostId="4103" RevisionGUID="fa708a0c-4a0e-4203-b7bd-783f2ed4cf92" CreationDate="2022-08-04T17:57:04.647" UserId="427" Text="You need to implement TypeInfo Trait to Kitty's Struct like below. &#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, TypeInfo)]&#xD;&#xA;    pub struct Kitty&lt;T: Config&gt; {&#xD;&#xA;        pub dna: [u8; 16],&#xD;&#xA;        pub price: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;        pub gender: Gender,&#xD;&#xA;        pub owner: AccountOf&lt;T&gt;,&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="15413" PostHistoryTypeId="5" PostId="4102" RevisionGUID="218b8fae-41d6-4d73-b7ec-8b76fdd9ce88" CreationDate="2022-08-04T18:45:57.660" UserId="2952" Comment="added 64 characters in body" Text="I was following the substrate kitties tutorial where i needed to create a storage map where the id is mapped to the `kitty` struct which is created. But i am getting the following error.&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `Kitty&lt;T&gt;: TypeInfo` is not satisfied&#xD;&#xA;  --&gt; pallets/mykitties/src/lib.rs:85:12&#xD;&#xA;   |&#xD;&#xA;85 |     #[pallet::storage]&#xD;&#xA;   |               ^^^^^^^ the trait `TypeInfo` is not implemented for `Kitty&lt;T&gt;`&#xD;&#xA;   |&#xD;&#xA;   = help: the following other types implement trait `TypeInfo`:&#xD;&#xA;             &amp;T&#xD;&#xA;             &amp;mut T&#xD;&#xA;             ()&#xD;&#xA;             (A, B)&#xD;&#xA;             (A, B, C)&#xD;&#xA;             (A, B, C, D)&#xD;&#xA;             (A, B, C, D, E)&#xD;&#xA;             (A, B, C, D, E, F)&#xD;&#xA;           and 167 others&#xD;&#xA;   = note: required because of the requirements on the impl of `StaticTypeInfo` for `Kitty&lt;T&gt;`&#xD;&#xA;   = note: required because of the requirements on the impl of `StorageEntryMetadataBuilder` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageKitties&lt;T&gt;, frame_support::Twox64Concat, &lt;T as frame_system::Config&gt;::Hash, Kitty&lt;T&gt;&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is my pallet code below(pallets/mykitties/src/lib.rs)&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::{&#xD;&#xA;		dispatch::{DispatchResult, DispatchResultWithPostInfo},&#xD;&#xA;		pallet_prelude::*,&#xD;&#xA;		sp_runtime::traits::{Hash, Zero},&#xD;&#xA;		traits::{Currency, ExistenceRequirement, Randomness},&#xD;&#xA;	};&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use sp_io::hashing::blake2_128;&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	use serde::{Deserialize, Serialize};&#xD;&#xA;&#xD;&#xA;	type AccountOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;	type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, Debug, Clone, PartialEq)]&#xD;&#xA;	#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;	pub enum Gender {&#xD;&#xA;		Male,&#xD;&#xA;		Female,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl Default for Gender {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			Gender::Male&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Clone, Encode, Decode, PartialEq)]&#xD;&#xA;	pub struct Kitty&lt;T: Config&gt; {&#xD;&#xA;		pub dna: [u8; 16],&#xD;&#xA;		pub price: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;		pub gender: Gender,&#xD;&#xA;		pub owner: AccountOf&lt;T&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// TODO Part II: Struct for holding Kitty information.&#xD;&#xA;&#xD;&#xA;	// TODO Part II: Enum and implementation to handle Gender type in Kitty struct.&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	/// Configure the pallet by specifying the parameters and types it depends on.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: pallet_balances::Config + frame_system::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;&#xD;&#xA;		// The Currency handler for the Kitties pallet.&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		// TODO Part II: Specify the custom types for our runtime.&#xD;&#xA;		type KittyRandomness: Randomness&lt;Self::Hash, Self::BlockNumber&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxKittyOwned: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// Errors.&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		// TODO Part III&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	// #[pallet::metadata(T::AccountId = &quot;AccountId&quot;)]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		// TODO Part III&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn all_kitties_count)]&#xD;&#xA;	pub(super) type AllKittiesCount&lt;T: Config&gt; = StorageValue&lt;_, u64, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn kitties)]&#xD;&#xA;	/// Stores a Kitty's unique traits, owner and price.&#xD;&#xA;	pub(super) type Kitties&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, T::Hash, Kitty&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn kitties_owned)]&#xD;&#xA;	pub(super) type KittiesOwned&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Twox64Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		BoundedVec&lt;T::Hash, T::MaxKittyOwned&gt;,&#xD;&#xA;		ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	// TODO Part II: Remaining storage items.&#xD;&#xA;&#xD;&#xA;	// TODO Part III: Our pallet's genesis configuration.&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		// TODO Part III: create_kitty&#xD;&#xA;&#xD;&#xA;		// TODO Part III: set_price&#xD;&#xA;&#xD;&#xA;		// TODO Part III: transfer&#xD;&#xA;&#xD;&#xA;		// TODO Part III: buy_kitty&#xD;&#xA;&#xD;&#xA;		// TODO Part III: breed_kitty&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl&lt;T: Config&gt; Kitty&lt;T&gt; {&#xD;&#xA;		pub fn gender(dna: T::Hash) -&gt; Gender {&#xD;&#xA;			if dna.as_ref()[0] % 2 == 0 {&#xD;&#xA;				Gender::Male&#xD;&#xA;			} else {&#xD;&#xA;				Gender::Female&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		// TODO Part III: helper functions for dispatchable functions&#xD;&#xA;&#xD;&#xA;		// TODO: increment_nonce, random_hash, mint, transfer_from&#xD;&#xA;&#xD;&#xA;		fn gen_gender() -&gt; Gender {&#xD;&#xA;			let random = T::KittyRandomness::random(&amp;b&quot;gender&quot;[..]).0;&#xD;&#xA;			match random.as_ref()[0] % 2 {&#xD;&#xA;				0 =&gt; Gender::Male,&#xD;&#xA;				_ =&gt; Gender::Female,&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn gen_dna() -&gt; [u8; 16] {&#xD;&#xA;			let payload = (&#xD;&#xA;				T::KittyRandomness::random(&amp;b&quot;gender&quot;[..]).0,&#xD;&#xA;				&lt;frame_system::Pallet&lt;T&gt;&gt;::block_number(),&#xD;&#xA;			);&#xD;&#xA;&#xD;&#xA;			payload.using_encoded(blake2_128)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Here is the code: https://github.com/dhruvja/substrate-kitties&#xD;&#xA;&#xD;&#xA;Please can anybody help me to solve this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15423" PostHistoryTypeId="2" PostId="4106" RevisionGUID="7069aa01-1aa7-49d9-b7c5-2dae069de72a" CreationDate="2022-08-04T20:36:46.427" UserId="2984" Text="I kind of know there are differences between both types, such as flags --ws, --rpc, --dev (which include many other flags for development), specChain file, ports, and so on.&#xD;&#xA;&#xD;&#xA;What are the main differences between live network vs dev network using Substrate? If I want to deploy a live network, what is essential to know?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15425" PostHistoryTypeId="1" PostId="4106" RevisionGUID="7069aa01-1aa7-49d9-b7c5-2dae069de72a" CreationDate="2022-08-04T20:36:46.427" UserId="2984" Text="Live chain x Dev chain, what are the main differences?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15426" PostHistoryTypeId="3" PostId="4106" RevisionGUID="7069aa01-1aa7-49d9-b7c5-2dae069de72a" CreationDate="2022-08-04T20:36:46.427" UserId="2984" Text="|substrate-node|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15427" PostHistoryTypeId="5" PostId="4106" RevisionGUID="fde6571e-6cc5-4737-98d6-4643988b6549" CreationDate="2022-08-04T20:41:20.113" UserId="2984" Comment="added 5 characters in body" Text="I kind of know there are differences between both types, such as cli flags --ws, --rpc, --dev (which include many other flags for development), chain spec file, ports, and so on.&#xD;&#xA;&#xD;&#xA;What are the main differences between live network vs dev network using Substrate? If I want to deploy a live network, what is essential to know?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15428" PostHistoryTypeId="4" PostId="4106" RevisionGUID="8e335961-5cc2-4af5-afe9-df429f1e368e" CreationDate="2022-08-04T20:46:20.997" UserId="2984" Comment="edited title" Text="Live chain x Dev chain, what are the main differences between both types?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15429" PostHistoryTypeId="4" PostId="4106" RevisionGUID="1e6bb220-ffe4-4f6a-a1e0-fc1f12d265d1" CreationDate="2022-08-04T20:47:50.280" UserId="2984" Comment="edited title" Text="What are the main differences between a Live and Dev network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15430" PostHistoryTypeId="5" PostId="4106" RevisionGUID="658eb694-3299-4d52-8896-73f641f0a2ce" CreationDate="2022-08-04T20:55:49.487" UserId="2984" Comment="added 17 characters in body" Text="I kind of know there are differences between both types, such as cli flags --ws, --rpc, --dev (which include many other flags for development), chain spec file, ports, and so on.&#xD;&#xA;&#xD;&#xA;What are the main differences between live network vs dev network using Substrate? If I want to deploy a private network in production, what is essential to know?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15431" PostHistoryTypeId="50" PostId="3595" RevisionGUID="f066ce7b-d10b-4ced-a8ad-cc3fedc7fbbc" CreationDate="2022-08-04T21:01:20.073" UserId="-1" />
  <row Id="15432" PostHistoryTypeId="2" PostId="4107" RevisionGUID="f70248cd-d582-4899-a65e-ffbde363d0ab" CreationDate="2022-08-04T21:17:54.810" UserId="258" Text="So I figured the signature creation in polkadotJS is to receive the raw data and not the hash. &#xD;&#xA;&#xD;&#xA;More so, I had to generate the public key this way:&#xD;&#xA;&#xD;&#xA;    const mnemonic = mnemonicGenerate();&#xD;&#xA;    const keyring = new Keyring({type: 'ethereum'});&#xD;&#xA;    const pair = keyring.addFromUri(mnemonic, { name: 'first pair' }, 'ethereum');&#xD;&#xA;          &#xD;&#xA;    const publicKey = pair.publicKey;&#xD;&#xA;&#xD;&#xA;And then i created the signature this way&#xD;&#xA;&#xD;&#xA;    const sig = Array.from(pair.sign(rawData));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;With this generation, I was able to recover the public key successfully with `ink_env::ecdsa_recover`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;N.B: I am using `keccak256` for hashing. The Keyring type `ecdsa` uses `blake2` uses for hashing hence why I used the type `ethereum` which uses keccak for hashing. You can find the details [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/common/blob/3597a4eb4e0cf9985104568058c5cd23701bbaed/packages/keyring/src/pair/index.ts#L37" ContentLicense="CC BY-SA 4.0" />
  <row Id="15434" PostHistoryTypeId="2" PostId="4108" RevisionGUID="3c876d8a-44b9-4e63-ae86-a9ba2a325769" CreationDate="2022-08-04T21:33:09.120" UserId="258" Text="Seems you are trying to make a cross contract call.&#xD;&#xA;&#xD;&#xA;You can look at this [question][1] to take a cue on the best way to achieve this.&#xD;&#xA;&#xD;&#xA;You can also make a low-level cross contract call using the [build_call][2] and providing a selector.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2797/what-is-the-best-way-to-make-a-cross-contract-call-on-ink&#xD;&#xA;  [2]: https://docs.rs/ink_env/latest/ink_env/call/fn.build_call.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="15436" PostHistoryTypeId="2" PostId="4109" RevisionGUID="87ef1290-4475-485a-a227-84f588c8efb2" CreationDate="2022-08-04T22:56:44.230" UserId="2916" Text="I'm trying to use this code to start a parachain (from [this tutorial](https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/)):&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-collator \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain &lt;relay chain raw chain spec&gt; \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I'm not sure what I should specify for the `relay chain raw chain spec`. I know where my parachain spec is (`rococo-local-parachain-2000-raw.json`), but for the relay chain I don't know.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15438" PostHistoryTypeId="1" PostId="4109" RevisionGUID="87ef1290-4475-485a-a227-84f588c8efb2" CreationDate="2022-08-04T22:56:44.230" UserId="2916" Text="Where to find the path for my relay chain when starting a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15439" PostHistoryTypeId="3" PostId="4109" RevisionGUID="87ef1290-4475-485a-a227-84f588c8efb2" CreationDate="2022-08-04T22:56:44.230" UserId="2916" Text="|parachain|parachain-collator|relay-chain|chainspec|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15440" PostHistoryTypeId="2" PostId="4110" RevisionGUID="51428a26-702b-4aba-94a2-b9cddd2c0a42" CreationDate="2022-08-05T00:37:36.437" UserId="251" Text="Check the [previous section](https://docs.substrate.io/tutorials/connect-other-chains/local-relay/).&#xD;&#xA;&#xD;&#xA;The tutorial is using this [spec](https://github.com/substrate-developer-hub/substrate-docs/blob/main/static/assets/tutorials/cumulus/chain-specs/rococo-custom-2-raw.json). You could download this directly.&#xD;&#xA;&#xD;&#xA;Or, build it yourself:&#xD;&#xA;&#xD;&#xA;1. `git clone https://github.com/paritytech/polkadot.git &amp;&amp; cd polkadot`&#xD;&#xA;2. `cargo build --release --features rococo-native`&#xD;&#xA;3. `target/release/polkadot build-spec --chain rococo-local --disable-default-bootnode --raw &gt; relaychain.json`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15442" PostHistoryTypeId="2" PostId="4111" RevisionGUID="19ddf3f4-70a0-42cc-8d20-3ae72b80d4a6" CreationDate="2022-08-05T02:38:01.577" UserId="251" Text="I only found two differences.&#xD;&#xA;&#xD;&#xA;Check [this](https://github.com/paritytech/substrate/blob/master/client/cli/src/params/network_params.rs#L197-L209).&#xD;&#xA;&#xD;&#xA;You could global search the keywords `ChainType::Live`, `ChainType::Development` in Substrate repository." ContentLicense="CC BY-SA 4.0" />
  <row Id="15445" PostHistoryTypeId="5" PostId="4101" RevisionGUID="62c3448d-fbfb-4764-a6dd-efd23587f2a1" CreationDate="2022-08-05T03:34:04.250" UserId="1789" Comment="added 555 characters in body" Text="I was trying to add Frontier as a dependency of my parachain(Substrate Cumulus based) project... &#xD;&#xA;```&#xD;&#xA;$ cargo build -r       &#xD;&#xA;    Updating git repository `https://github.com/PNetwork/frontier`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/frontier`&#xD;&#xA;    Updating crates.io index&#xD;&#xA;error: failed to select a version for `parity-db`.&#xD;&#xA;    ... required by package `fc-db v2.0.0-dev (https://github.com/PNetwork/frontier?branch=patch3-polkadot-v0.9.25#2e4daa4e)`&#xD;&#xA;    ... which satisfies git dependency `fc-db` of package `fc-cli v1.0.0-dev (https://github.com/PNetwork/frontier?branch=patch3-polkadot-v0.9.25#2e4daa4e)`&#xD;&#xA;    ... which satisfies git dependency `fc-cli` of package `parachain-template-node v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/node)`&#xD;&#xA;versions that meet the requirements `^0.3.14` are: 0.3.16, 0.3.15, 0.3.14&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `parity-db v0.3.13`&#xD;&#xA;    ... which satisfies dependency `parity-db = &quot;^0.3.13&quot;` (locked to 0.3.13) of package `polkadot-node-subsystem-util v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`&#xD;&#xA;    ... which satisfies git dependency `polkadot-node-subsystem-util` (locked to 0.9.25) of package `polkadot-approval-distribution v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`&#xD;&#xA;    ... which satisfies git dependency `polkadot-approval-distribution` (locked to 0.9.25) of package `polkadot-service v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`&#xD;&#xA;    ... which satisfies git dependency `polkadot-service` (locked to 0.9.25) of package `cumulus-relay-chain-inprocess-interface v0.1.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.25#390042a0)`&#xD;&#xA;    ... which satisfies git dependency `cumulus-relay-chain-inprocess-interface` (locked to 0.1.0) of package `parachain-template-node v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `parity-db` which could resolve this conflict&#xD;&#xA;```&#xD;&#xA;I was using https://github.com/PNetwork/frontier repo to replace https://github.com/paritytech/frontier because I need to change the Frontier repo's substrate version to polkadot-v0.9.25, which is the same substrate version in my parachain.&#xD;&#xA;&#xD;&#xA;My project/node/Cargo.toml&#xD;&#xA;```&#xD;&#xA;cumulus-relay-chain-rpc-interface = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;```&#xD;&#xA;then I tried to fix this parity-db version:&#xD;&#xA;```&#xD;&#xA;cargo update -p parity-db --precise 0.3.14&#xD;&#xA;```&#xD;&#xA;then it became `error: failed to select a version for tokio`&#xD;&#xA;then I tried to fix it: &#xD;&#xA;```&#xD;&#xA;cargo update -p tokio --precise 1.19.2&#xD;&#xA;```&#xD;&#xA;then it went back to `error: failed to select a version for parity-db`&#xD;&#xA;&#xD;&#xA;I cannot change the dependency at https://github.com/PNetwork/frontier, &#xD;&#xA;so I think I need to somehow specify the version of `cumulus-relay-chain-inprocess-interface`. Right? &#xD;&#xA;&#xD;&#xA;How can I do that so the parity-db is somehow pumped up in version?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15446" PostHistoryTypeId="5" PostId="4101" RevisionGUID="c14130c8-1b65-414c-8932-da0bafb225d7" CreationDate="2022-08-05T03:50:16.863" UserId="1789" Comment="added 2045 characters in body" Text="I was trying to add Frontier as a dependency of my parachain(Substrate Cumulus based) project... &#xD;&#xA;```&#xD;&#xA;$ cargo build -r       &#xD;&#xA;    Updating git repository `https://github.com/PNetwork/frontier`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/frontier`&#xD;&#xA;    Updating crates.io index&#xD;&#xA;error: failed to select a version for `parity-db`.&#xD;&#xA;    ... required by package `fc-db v2.0.0-dev (https://github.com/PNetwork/frontier?branch=patch3-polkadot-v0.9.25#2e4daa4e)`&#xD;&#xA;    ... which satisfies git dependency `fc-db` of package `fc-cli v1.0.0-dev (https://github.com/PNetwork/frontier?branch=patch3-polkadot-v0.9.25#2e4daa4e)`&#xD;&#xA;    ... which satisfies git dependency `fc-cli` of package `parachain-template-node v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/node)`&#xD;&#xA;versions that meet the requirements `^0.3.14` are: 0.3.16, 0.3.15, 0.3.14&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `parity-db v0.3.13`&#xD;&#xA;    ... which satisfies dependency `parity-db = &quot;^0.3.13&quot;` (locked to 0.3.13) of package `polkadot-node-subsystem-util v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`&#xD;&#xA;    ... which satisfies git dependency `polkadot-node-subsystem-util` (locked to 0.9.25) of package `polkadot-approval-distribution v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`&#xD;&#xA;    ... which satisfies git dependency `polkadot-approval-distribution` (locked to 0.9.25) of package `polkadot-service v0.9.25 (https://github.com/paritytech/polkadot?branch=release-v0.9.25#5174e9ae)`&#xD;&#xA;    ... which satisfies git dependency `polkadot-service` (locked to 0.9.25) of package `cumulus-relay-chain-inprocess-interface v0.1.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.25#390042a0)`&#xD;&#xA;    ... which satisfies git dependency `cumulus-relay-chain-inprocess-interface` (locked to 0.1.0) of package `parachain-template-node v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `parity-db` which could resolve this conflict&#xD;&#xA;```&#xD;&#xA;I was using https://github.com/PNetwork/frontier repo to replace https://github.com/paritytech/frontier because I need to change the Frontier repo's substrate version to polkadot-v0.9.25, which is the same substrate version in my parachain.&#xD;&#xA;&#xD;&#xA;My project/node/Cargo.toml&#xD;&#xA;```&#xD;&#xA;# Frontier&#xD;&#xA;fc-cli = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;fc-consensus = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;fc-db = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;fc-mapping-sync = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;fc-rpc = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;fc-rpc-core = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;fp-consensus = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;fp-dynamic-fee = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;fp-evm = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;fp-rpc = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;fp-storage = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;master&quot; }&#xD;&#xA;&#xD;&#xA;# Cumulus&#xD;&#xA;cumulus-client-cli = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;cumulus-client-collator = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;cumulus-client-consensus-aura = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;cumulus-client-consensus-common = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;cumulus-client-network = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;cumulus-client-service = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;cumulus-primitives-core = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;cumulus-primitives-parachain-inherent = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;cumulus-relay-chain-inprocess-interface = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;cumulus-relay-chain-interface = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;cumulus-relay-chain-rpc-interface = { git = &quot;https://github.com/paritytech/cumulus&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;```&#xD;&#xA;then I tried to fix this parity-db version:&#xD;&#xA;```&#xD;&#xA;cargo update -p parity-db --precise 0.3.14&#xD;&#xA;```&#xD;&#xA;then it became `error: failed to select a version for tokio`&#xD;&#xA;then I tried to fix it: &#xD;&#xA;```&#xD;&#xA;cargo update -p tokio --precise 1.19.2&#xD;&#xA;```&#xD;&#xA;then it went back to `error: failed to select a version for parity-db`&#xD;&#xA;&#xD;&#xA;I cannot change the dependency at https://github.com/PNetwork/frontier, &#xD;&#xA;so I think I need to somehow specify the version of `cumulus-relay-chain-inprocess-interface`. Right? &#xD;&#xA;&#xD;&#xA;How can I do that so the parity-db is somehow pumped up in version?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15449" PostHistoryTypeId="2" PostId="4113" RevisionGUID="a15793a1-9d92-4cbb-9a69-f71a3f760726" CreationDate="2022-08-05T06:31:39.863" UserId="2736" Text="The problem was with `StateVersion` -- for RemoteExternalities Builder it is by default `V1` and there is no way of changing that from `try-runtime` level. My chain has `StateVersion` set to `V0` and hence, the mismatch occurred." ContentLicense="CC BY-SA 4.0" />
  <row Id="15451" PostHistoryTypeId="2" PostId="4114" RevisionGUID="3d822fc8-cef4-4600-aeb4-2331573a6761" CreationDate="2022-08-05T06:37:51.863" UserId="275" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail), then ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to return DispatchError (from ChainExtension) as its returned value?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15453" PostHistoryTypeId="1" PostId="4114" RevisionGUID="3d822fc8-cef4-4600-aeb4-2331573a6761" CreationDate="2022-08-05T06:37:51.863" UserId="275" Text="How ink! handles DispatchError from ChainExtension" ContentLicense="CC BY-SA 4.0" />
  <row Id="15454" PostHistoryTypeId="3" PostId="4114" RevisionGUID="3d822fc8-cef4-4600-aeb4-2331573a6761" CreationDate="2022-08-05T06:37:51.863" UserId="275" Text="|ink|smart-contract|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15455" PostHistoryTypeId="5" PostId="4114" RevisionGUID="a7b28026-2470-470a-b6d7-08a5359f31a4" CreationDate="2022-08-05T06:44:35.017" UserId="275" Comment="added 11 characters in body" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail), then ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to handle and return DispatchError (from ChainExtension) as its returned value?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15456" PostHistoryTypeId="5" PostId="4114" RevisionGUID="4c1b786f-efa5-492c-9762-8120a147383b" CreationDate="2022-08-05T07:16:00.167" UserId="275" Comment="added 212 characters in body" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success.&#xD;&#xA;What I did was ignore `Error(DispatchError)` and return `Ok(RetVal::Converging(1))` so that ink! can handle status code 1.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail), then ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to handle and return DispatchError (from ChainExtension) as its returned value?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/QTcO1.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15457" PostHistoryTypeId="8" PostId="4114" RevisionGUID="555dfad5-9ab6-4b53-bafa-90f832a0080b" CreationDate="2022-08-05T07:27:17.360" UserId="275" Comment="Rollback to [a7b28026-2470-470a-b6d7-08a5359f31a4]" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail), then ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to handle and return DispatchError (from ChainExtension) as its returned value?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15458" PostHistoryTypeId="2" PostId="4115" RevisionGUID="223818e4-e5be-4ed6-b6c9-e3085a38a9ba" CreationDate="2022-08-05T08:01:13.377" UserId="251" Text="Check https://substrate.stackexchange.com/questions/3868/updating-dependency-for-orml/3875#3875.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And this is what we do https://github.com/darwinia-network/darwinia/blob/main/runtime/darwinia/Cargo.toml.&#xD;&#xA;&#xD;&#xA;Lock all the different repositories' Substrate to a single version `darwinia-v0.12.3`. &#xD;&#xA;&#xD;&#xA;In your code, that `master` branch not always matches `polkadot-v0.9.25`." ContentLicense="CC BY-SA 4.0" />
  <row Id="15460" PostHistoryTypeId="5" PostId="4114" RevisionGUID="eca9bba9-5c83-42fa-90af-a803eda86ad0" CreationDate="2022-08-05T08:03:14.903" UserId="275" Comment="added 259 characters in body" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success even if dispatch failed.&#xD;&#xA;(What I did for experiments was ignore `Error(DispatchError)` and return `Ok(RetVal::Converging(1))` instead so that ink! can handle status code 1.)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail),but ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to handle and return DispatchError (from ChainExtension) as its returned value?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vz8MX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15461" PostHistoryTypeId="5" PostId="4055" RevisionGUID="cf1c9b9a-0005-4f2d-bfb5-ecd5d874d04f" CreationDate="2022-08-05T08:06:08.010" UserId="251" Comment="added 211 characters in body" Text="```&#xD;&#xA;2022-08-02 18:53:10 〽️ Prometheus exporter started at 127.0.0.1:9616&#xD;&#xA;2022-08-02 18:53:10  run BEEFY worker, best grandpa: #13709439.&#xD;&#xA;2022-08-02 18:53:10 creating instance on iface 65.21.88.129&#xD;&#xA;2022-08-02 18:53:10 failed to create `InterfaceState`: No such device (os error 19)&#xD;&#xA;2022-08-02 18:53:10 creating instance on iface 172.17.0.1&#xD;&#xA;2022-08-02 18:53:10 GRANDPA voter error: could not complete a round on disk: bad justification for header: invalid precommits for target commit&#xD;&#xA;2022-08-02 18:53:10 Essential task `grandpa-voter` failed. Shutting down service.&#xD;&#xA;2022-08-02 18:53:10 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;2022-08-02 18:53:10 creating instance on iface 65.21.88.129&#xD;&#xA;2022-08-02 18:53:10 failed to create `InterfaceState`: No such device (os error 19)&#xD;&#xA;2022-08-02 18:53:10 creating instance on iface 172.17.0.1&#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have tried Google, but nothing useful founded.&#xD;&#xA;&#xD;&#xA;What should I do? I have no idea how to debug this.&#xD;&#xA;&#xD;&#xA;I think the `Interface` error can be ignored. I can run node with that error before. Or in a new `-d path`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This would an issue. It's really hard to analyze. I'm going to close this.&#xD;&#xA;&#xD;&#xA;What I do is clean the DB and resync. That works for me. But Kusama's state is 300GB now. we can not always do the resync." ContentLicense="CC BY-SA 4.0" />
  <row Id="15462" PostHistoryTypeId="5" PostId="4114" RevisionGUID="5428c7db-4d8d-4f0f-8c72-b2e4bd20f5b4" CreationDate="2022-08-05T08:08:43.370" UserId="275" Comment="added 3 characters in body" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success even if dispatch failed.&#xD;&#xA;(What I did for experiments was ignore `Error(DispatchError)` and return `Ok(RetVal::Converging(1))` instead so that ink! can handle status code 1.)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail),but ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to handle DispatchError (from ChainExtension) and return it as its returned value?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vz8MX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15463" PostHistoryTypeId="5" PostId="4114" RevisionGUID="cf59612a-4ede-475f-855a-a15480647d30" CreationDate="2022-08-05T08:14:18.347" UserId="275" Comment="deleted 3 characters in body" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success even if dispatch failed.&#xD;&#xA;(What I did for experiments was ignore `Error(DispatchError)` and return `Ok(RetVal::Converging(1))` instead so that ink! can handle status code 1.)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail), ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to handle DispatchError (from ChainExtension) and return it as its returned value?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vz8MX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15464" PostHistoryTypeId="2" PostId="4116" RevisionGUID="851c7ebd-93d6-4ed8-9474-fc102f79d6c6" CreationDate="2022-08-05T08:17:50.127" UserId="116" Text="How to get all extrinsics executed in a block with subxt?&#xD;&#xA;&#xD;&#xA;My question is identical to [With subxt how can I subscribe to watch extrinsics?][1] &#xD;&#xA;&#xD;&#xA;&gt; There's some great examples of how to use subxt to listen to [all&#xD;&#xA;&gt; events][2].&#xD;&#xA;&gt; &#xD;&#xA;&gt; Polkadot-js events screen seem to show events grouped by the extrinsic&#xD;&#xA;&gt; that created them. Can I do the same in rust?&#xD;&#xA;&gt; &#xD;&#xA;&#xD;&#xA;but the accepted answer [3] leaves me hanging at &#xD;&#xA;&#xD;&#xA;&gt; 3. Map the extracted index to the extrinsic, as found in the block&#xD;&#xA;&#xD;&#xA;Where do I find this list of extrinsics in the block? Should I fetch the full block with a new rpc call like this?&#xD;&#xA;&#xD;&#xA;    let mut blocks: Subscription&lt;Header&lt;u32, BlakeTwo256&gt;&gt; =&#xD;&#xA;        api.client.rpc().subscribe_blocks().await?;&#xD;&#xA;&#xD;&#xA;    while let Some(Ok(block)) = blocks.next().await {&#xD;&#xA;&#xD;&#xA;        println!(&#xD;&#xA;            &quot;block number: {:?} hash:{:?} parent:{:?} state root:{:?} extrinsics root:{:?}&quot;,&#xD;&#xA;            block.number,&#xD;&#xA;            block.hash(),&#xD;&#xA;            block.parent_hash,&#xD;&#xA;            block.state_root,&#xD;&#xA;            block.extrinsics_root&#xD;&#xA;        ); &#xD;&#xA;        if let Ok(Some(fullblock)) = api.client.rpc().block(Some(block.hash())).await&#xD;&#xA;            {             &#xD;&#xA;            // block.&#xD;&#xA;            for extr in fullblock.block.extrinsics {&#xD;&#xA;                   &#xD;&#xA;                println!(&quot;Hello Extrinsics {:?}&quot;,extr);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;if so what should I decode `extr:OpaqueExtrinsic` with the value `0401000ba5620d6d8201`&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;in to a type and encoded hash `0x8d5c44aba83278ee050e7595ba1e31ae9c0cc44ab4e02d0b55f83f07809556f3` ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2178/with-subxt-how-can-i-subscribe-to-watch-extrinsics&#xD;&#xA;  [2]: https://github.com/paritytech/subxt/blob/master/examples/examples/subscribe_all_events.rs&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/2183/116&#xD;&#xA;  [4]: https://i.stack.imgur.com/zs7nV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15466" PostHistoryTypeId="1" PostId="4116" RevisionGUID="851c7ebd-93d6-4ed8-9474-fc102f79d6c6" CreationDate="2022-08-05T08:17:50.127" UserId="116" Text="How to get the extrincs and their hash from a block with Subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="15467" PostHistoryTypeId="3" PostId="4116" RevisionGUID="851c7ebd-93d6-4ed8-9474-fc102f79d6c6" CreationDate="2022-08-05T08:17:50.127" UserId="116" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15468" PostHistoryTypeId="5" PostId="4114" RevisionGUID="e16b11d8-a19d-44ad-a486-8ef1b1690d96" CreationDate="2022-08-05T08:44:54.823" UserId="275" Comment="added 2 characters in body" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success even if dispatch failed.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;(What I did for experiments was ignore `Error(DispatchError)` and return `Ok(RetVal::Converging(1))` instead so that ink! can handle status code 1.)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail), ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to handle DispatchError (from ChainExtension) and return it as its returned value?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vz8MX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15469" PostHistoryTypeId="2" PostId="4117" RevisionGUID="ec5725d6-4182-4299-874d-461cba5b608a" CreationDate="2022-08-05T09:35:53.820" UserId="165" Text="Experiencing panic in `libp2p-websocket` with logs looking like&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'SinkImpl::poll_ready called after error.'&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15471" PostHistoryTypeId="1" PostId="4117" RevisionGUID="ec5725d6-4182-4299-874d-461cba5b608a" CreationDate="2022-08-05T09:35:53.820" UserId="165" Text="Chain crashing with `SinkImpl::poll_ready called after error.`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15472" PostHistoryTypeId="3" PostId="4117" RevisionGUID="ec5725d6-4182-4299-874d-461cba5b608a" CreationDate="2022-08-05T09:35:53.820" UserId="165" Text="|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15473" PostHistoryTypeId="2" PostId="4118" RevisionGUID="37613932-7d3c-46bb-aff7-1a61b9cb1ec9" CreationDate="2022-08-05T09:36:27.090" UserId="165" Text="This issue has been fixed - https://github.com/libp2p/rust-yamux/pull/138&#xD;&#xA;&#xD;&#xA;Now [tagged and published](https://github.com/libp2p/rust-yamux/pull/138#issuecomment-1206103021) - [yamux 0.10.2](https://crates.io/crates/yamux/0.10.2)&#xD;&#xA;&#xD;&#xA;To apply this fix just a quick `cargo update -p yamux` is needed to apply the latest yamux version." ContentLicense="CC BY-SA 4.0" />
  <row Id="15475" PostHistoryTypeId="2" PostId="4119" RevisionGUID="fd442bd0-47fe-4c34-be4c-250410bad179" CreationDate="2022-08-05T09:40:30.510" UserId="157" Text="Using `polkadot-v0.9.19` branch I've created benchmarks for a pallet, added it into runtime, compiled.&#xD;&#xA;On run of any of created benchmarks getting this error:&#xD;&#xA;&#xD;&#xA;&gt; Error:&#xD;&#xA;&gt; Service(Client(RuntimeApiError(Application(VersionInvalid(&quot;Instantiation:&#xD;&#xA;&gt; Export ext_crypto_verify_ecdsa_version_1 not found&quot;)))))&#xD;&#xA;&gt;&#xD;&#xA;&gt; Cannot create a runtime error=Instantiation(&quot;Instantiation:&#xD;&#xA;&gt; Export ext_crypto_verify_ecdsa_version_1 not found&quot;)&#xD;&#xA;&#xD;&#xA;Need some hint where it may come from." ContentLicense="CC BY-SA 4.0" />
  <row Id="15477" PostHistoryTypeId="1" PostId="4119" RevisionGUID="fd442bd0-47fe-4c34-be4c-250410bad179" CreationDate="2022-08-05T09:40:30.510" UserId="157" Text="Cannot create a runtime on benchmark run" ContentLicense="CC BY-SA 4.0" />
  <row Id="15478" PostHistoryTypeId="3" PostId="4119" RevisionGUID="fd442bd0-47fe-4c34-be4c-250410bad179" CreationDate="2022-08-05T09:40:30.510" UserId="157" Text="|substrate-node|pallet|frame|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15481" PostHistoryTypeId="2" PostId="4121" RevisionGUID="5996a98e-009c-4788-8121-b77186c0d713" CreationDate="2022-08-05T09:58:38.443" UserId="2862" Text="I just want to confirm that Polkadot's Runtime does not support concurrency since it targets WebAssembly MVP?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15483" PostHistoryTypeId="1" PostId="4121" RevisionGUID="5996a98e-009c-4788-8121-b77186c0d713" CreationDate="2022-08-05T09:58:38.443" UserId="2862" Text="Does Polkadot's Runtime/Wasm support any form of concurrency" ContentLicense="CC BY-SA 4.0" />
  <row Id="15484" PostHistoryTypeId="3" PostId="4121" RevisionGUID="5996a98e-009c-4788-8121-b77186c0d713" CreationDate="2022-08-05T09:58:38.443" UserId="2862" Text="|runtime|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15485" PostHistoryTypeId="2" PostId="4122" RevisionGUID="8785fa82-6ff1-4d5f-b25c-bcb7194dc457" CreationDate="2022-08-05T10:09:41.210" UserId="2986" Text="I am subscribing system events using the [events api][1]. After I got the specific event I am looking for, how should get the block hash of this event?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.query.system.events((events) =&gt; {&#xD;&#xA;    console.log(`\nReceived ${events.length} events:`);&#xD;&#xA;&#xD;&#xA;    // Loop through the Vec&lt;EventRecord&gt;&#xD;&#xA;    events.forEach((record) =&gt; {&#xD;&#xA;      const { event, phase } = record;&#xD;&#xA;&#xD;&#xA;      // found the one&#xD;&#xA;      if (event.section === 'SomeSection') {&#xD;&#xA;          // notify user the block hash&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/system-events" ContentLicense="CC BY-SA 4.0" />
  <row Id="15487" PostHistoryTypeId="1" PostId="4122" RevisionGUID="8785fa82-6ff1-4d5f-b25c-bcb7194dc457" CreationDate="2022-08-05T10:09:41.210" UserId="2986" Text="How do I get the block hash of an event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15488" PostHistoryTypeId="3" PostId="4122" RevisionGUID="8785fa82-6ff1-4d5f-b25c-bcb7194dc457" CreationDate="2022-08-05T10:09:41.210" UserId="2986" Text="|polkadot-js|events|block-hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15489" PostHistoryTypeId="2" PostId="4123" RevisionGUID="99c85175-a593-42ec-a6d6-54c40c5311d4" CreationDate="2022-08-05T10:14:55.603" UserId="94" Text="The Polkadot Network does support concurrency in the form of Parachains.  &#xD;&#xA;But the runtime itself does not, so to say; Polkadot is a network of parallelly running chains, which themselves run serially.  &#xD;&#xA;&#xD;&#xA;That the runtime is serial is not primarily because it targets WASM.  &#xD;&#xA;Creating a semantic for deterministic parallel executing is really difficult in general. This is also the case for non-WASM execution.  &#xD;&#xA;It is currently not a high priority since the main scaling mechanism of Substrate happens through Parachains.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15493" PostHistoryTypeId="2" PostId="4125" RevisionGUID="ce2aaae6-91cc-44e4-bb63-7202de390b74" CreationDate="2022-08-05T11:19:19.597" UserId="1789" Text="I was trying adding Frontier as a dependency to my parachain project...&#xD;&#xA;&#xD;&#xA;After fixing a few errors and adding UncheckedExtrinsic &amp; CheckedExtrinsic:&#xD;&#xA;```&#xD;&#xA;pub type UncheckedExtrinsic =&#xD;&#xA;	fp_self_contained::UncheckedExtrinsic&lt;Address, Call, Signature, SignedExtra&gt;;&#xD;&#xA;pub type CheckedExtrinsic = fp_self_contained::CheckedExtrinsic&lt;AccountId, Call, SignedExtra, H160&gt;;&#xD;&#xA;```&#xD;&#xA;I got this error during compilation:&#xD;&#xA;```&#xD;&#xA;➜  substrate-parachain-template-evm git:(polkadot-v0.9.25) ✗ cargo build -r&#xD;&#xA;   Compiling parachain-template-runtime v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/runtime)&#xD;&#xA;   Compiling fp-self-contained v1.0.0-dev (https://github.com/PAIDNetwork/frontier?branch=patch3-polkadot-v0.9.25#2e4daa4e)&#xD;&#xA;   Compiling pallet-transaction-payment v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.25#3348e144)&#xD;&#xA;   Compiling frame-election-provider-support v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.25#3348e144)&#xD;&#xA;error[E0277]: the trait bound `unchecked_extrinsic::UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;: parity_util_mem::malloc_size::MallocSizeOf` is not satisfied&#xD;&#xA;    --&gt; /home/user2038/.cargo/git/checkouts/frontier-b733f450c86c5786/2e4daa4/primitives/self-contained/src/unchecked_extrinsic.rs:71:75&#xD;&#xA;     |&#xD;&#xA;71   | impl&lt;Address, Call: SelfContainedCall, Signature, Extra: SignedExtension&gt; Extrinsic&#xD;&#xA;     |                                                                           ^^^^^^^^^ the trait `parity_util_mem::malloc_size::MallocSizeOf` is not implemented for `unchecked_extrinsic::UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;`&#xD;&#xA;     |&#xD;&#xA;     = help: the following other types implement trait `parity_util_mem::malloc_size::MallocSizeOf`:&#xD;&#xA;               &amp;'a T&#xD;&#xA;               ()&#xD;&#xA;               (TupleElement0, TupleElement1)&#xD;&#xA;               (TupleElement0, TupleElement1, TupleElement2)&#xD;&#xA;               (TupleElement0, TupleElement1, TupleElement2, TupleElement3)&#xD;&#xA;               (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)&#xD;&#xA;               (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)&#xD;&#xA;               (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)&#xD;&#xA;             and 113 others&#xD;&#xA;note: required by a bound in `Extrinsic`&#xD;&#xA;    --&gt; /home/user2038/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/runtime/src/traits.rs:1129:30&#xD;&#xA;     |&#xD;&#xA;1129 | pub trait Extrinsic: Sized + MaybeMallocSizeOf {&#xD;&#xA;     |                              ^^^^^^^^^^^^^^^^^ required by this bound in `Extrinsic`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `unchecked_extrinsic::UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;: parity_util_mem::malloc_size::MallocSizeOf` is not satisfied&#xD;&#xA;   --&gt; /home/user2038/.cargo/git/checkouts/frontier-b733f450c86c5786/2e4daa4/primitives/self-contained/src/unchecked_extrinsic.rs:142:58&#xD;&#xA;    |&#xD;&#xA;142 | impl&lt;Address, Call: SelfContainedCall, Signature, Extra&gt; ExtrinsicCall&#xD;&#xA;    |                                                          ^^^^^^^^^^^^^ the trait `parity_util_mem::malloc_size::MallocSizeOf` is not implemented for `unchecked_extrinsic::UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `parity_util_mem::malloc_size::MallocSizeOf`:&#xD;&#xA;              &amp;'a T&#xD;&#xA;              ()&#xD;&#xA;              (TupleElement0, TupleElement1)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)&#xD;&#xA;            and 113 others&#xD;&#xA;note: required by a bound in `ExtrinsicCall`&#xD;&#xA;   --&gt; /home/user2038/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/frame/support/src/traits/misc.rs:673:26&#xD;&#xA;    |&#xD;&#xA;673 | pub trait ExtrinsicCall: sp_runtime::traits::Extrinsic {&#xD;&#xA;    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ExtrinsicCall`&#xD;&#xA;```&#xD;&#xA;I have don't know what is missing in my code.&#xD;&#xA;This `parity_util_mem::malloc_size::MallocSizeOf` has never appeared in my code... &#xD;&#xA;any idea?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15495" PostHistoryTypeId="1" PostId="4125" RevisionGUID="ce2aaae6-91cc-44e4-bb63-7202de390b74" CreationDate="2022-08-05T11:19:19.597" UserId="1789" Text="trait `parity_util_mem::malloc_size::MallocSizeOf` is not implemented for `unchecked_extrinsic::UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15496" PostHistoryTypeId="3" PostId="4125" RevisionGUID="ce2aaae6-91cc-44e4-bb63-7202de390b74" CreationDate="2022-08-05T11:19:19.597" UserId="1789" Text="|parachain|frontier|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15497" PostHistoryTypeId="2" PostId="4126" RevisionGUID="7dc8dbea-24a8-4dbc-a998-ad9615fcd09b" CreationDate="2022-08-05T11:36:02.930" UserId="362" Text="The documentation around emitting events states that events are written to storage, and then cleared next block.&#xD;&#xA;&#xD;&#xA;This has considerable costs&#xD;&#xA; - You add extra db write/read overhead to practically every extrinsic, and cleanup, making extrinsics more expensive and wasting block weight.&#xD;&#xA; - As the log of events grows during block execution, the object being written back and forth to the underlying database becomes bigger and bigger, because its all one big `Vec`.&#xD;&#xA;&#xD;&#xA;I have three questions about this&#xD;&#xA;- What is the benefit of this writing to storage, and why is this the default?&#xD;&#xA;- What is the downside of removing this writing to storage? does it cause some cascade of other changes one has to make?&#xD;&#xA;- Should we be seeing this cost, and the dbwrite, in our benchmarking? because we currently are not." ContentLicense="CC BY-SA 4.0" />
  <row Id="15499" PostHistoryTypeId="1" PostId="4126" RevisionGUID="7dc8dbea-24a8-4dbc-a998-ad9615fcd09b" CreationDate="2022-08-05T11:36:02.930" UserId="362" Text="Why are events stored?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15500" PostHistoryTypeId="3" PostId="4126" RevisionGUID="7dc8dbea-24a8-4dbc-a998-ad9615fcd09b" CreationDate="2022-08-05T11:36:02.930" UserId="362" Text="|benchmarking|weight|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15501" PostHistoryTypeId="5" PostId="4114" RevisionGUID="5bd65a86-7d3d-4409-88e3-db5759eefd8c" CreationDate="2022-08-05T12:13:21.610" UserId="275" Comment="added 50 characters in body" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success even if dispatch failed.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;(What I did for experiments was ignore `Error(DispatchError)` and return `Ok(RetVal::Converging(1))` instead so that ink! can handle status code 1.)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail), ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (here ContractError reflect DispatchError's reason and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to handle DispatchError (from ChainExtension) and return it as its returned value?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vz8MX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15502" PostHistoryTypeId="5" PostId="4114" RevisionGUID="0c6fdc3e-5948-48ac-b706-94f12b254bd7" CreationDate="2022-08-05T12:20:47.423" UserId="275" Comment="added 1 character in body" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success even if dispatch failed.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;(What I did for experiments was ignore `Error(DispatchError)` and return `Ok(RetVal::Converging(1))` instead so that ink! can handle status code 1.)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail), ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (here ContractError reflects DispatchError's reason and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to handle DispatchError (from ChainExtension) and return it as its returned value?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vz8MX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15503" PostHistoryTypeId="2" PostId="4127" RevisionGUID="1950adee-b04e-415f-a0d3-83ad793f9885" CreationDate="2022-08-05T12:29:35.343" UserId="251" Text="Blockchain is a large state world tree.&#xD;&#xA;&#xD;&#xA;Events were removed in the next block. But that does not mean they have never existed.&#xD;&#xA;&#xD;&#xA;As you can see, most of the RPCs have an arg named `at`. You can fetch the state at any block.&#xD;&#xA;&#xD;&#xA;For example, the events were removed at 100 block height. But you could fetch state at 99 block height. Then you know those events happened. &#xD;&#xA;&#xD;&#xA;Imagine, if you have an event listener. Once it goes offline, does it mean all the events are lost? Apparently not, you can start the scan from an old block height.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Just a note. This is pretty useful in the cross-chain bridge. You could use the storage proof to perform the verification." ContentLicense="CC BY-SA 4.0" />
  <row Id="15505" PostHistoryTypeId="2" PostId="4128" RevisionGUID="f42b026a-cabc-4318-8cc6-e1ea42260df9" CreationDate="2022-08-05T12:42:31.410" UserId="251" Text="It looks like you are using `patch`.&#xD;&#xA;&#xD;&#xA;If the traits' versions mismatch. You will get this error.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# crate_a Cargo.toml&#xD;&#xA;scale-info = 2.0&#xD;&#xA;&#xD;&#xA;// crate_a lib.rs&#xD;&#xA;#[derive(TypeInfo)]&#xD;&#xA;pub struct S;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;# crate_b Cargo.toml&#xD;&#xA;scale-info = 1.0&#xD;&#xA;// crate_b lib.rs&#xD;&#xA;pub trait T: TypeInfo { fn f(); }&#xD;&#xA;&#xD;&#xA;&lt;crate_a::S as T&gt;::f();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The compiler will say `S` did not implement `TypeInfo`." ContentLicense="CC BY-SA 4.0" />
  <row Id="15509" PostHistoryTypeId="2" PostId="4130" RevisionGUID="0e0489e5-8ee4-45ce-b5a3-0ea376ef4e49" CreationDate="2022-08-05T13:06:01.857" UserId="251" Text="Darwinia is running with two treasury instances now.&#xD;&#xA;&#xD;&#xA;Check https://github.com/darwinia-network/darwinia/blob/main/runtime/darwinia/src/pallets/treasury.rs.&#xD;&#xA;&#xD;&#xA;But we only have tips and bounty for the main currency." ContentLicense="CC BY-SA 4.0" />
  <row Id="15511" PostHistoryTypeId="2" PostId="4131" RevisionGUID="af3257f0-a013-4f4f-901d-cd5c8b1ad00d" CreationDate="2022-08-05T13:37:40.540" UserId="2988" Text="so i have a parachain upgraded to substrate 4.0.0 &#xD;&#xA;and i need the type registry of this chain in order to work with [subscan-essentials][1]&#xD;&#xA;&#xD;&#xA;normally with substrate-node-template subscan-essentials work smoothly &#xD;&#xA;but not sure about substrate 4.0.0 parachain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/subscan-explorer/subscan-essentials" ContentLicense="CC BY-SA 4.0" />
  <row Id="15513" PostHistoryTypeId="1" PostId="4131" RevisionGUID="af3257f0-a013-4f4f-901d-cd5c8b1ad00d" CreationDate="2022-08-05T13:37:40.540" UserId="2988" Text="how to get type registry for substrate v4.0.0 parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15514" PostHistoryTypeId="3" PostId="4131" RevisionGUID="af3257f0-a013-4f4f-901d-cd5c8b1ad00d" CreationDate="2022-08-05T13:37:40.540" UserId="2988" Text="|parachain|substrate-node-template|relay-chain|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15515" PostHistoryTypeId="2" PostId="4132" RevisionGUID="1b55ca76-75e2-42bc-beab-89ad8d9caeb1" CreationDate="2022-08-05T14:02:09.510" UserId="45" Text="The idea behind writing the events into the storage is to ensure they influence the state root in the block and ensure that events are stored somewhere for retrieval.&#xD;&#xA;&#xD;&#xA;The fact that the events are stored in the trie and influence the state root allows for anybody to ask &quot;what were the events at this particular block&quot; and get the answer with unforgeable proof. This is very useful for light clients.&#xD;&#xA;&#xD;&#xA;Then to serve the events, they have to be stored somewhere. The most straightforward way to provide that is to ensure every node stores them. &#xD;&#xA;&#xD;&#xA;Substrate and FRAME could be smarter about this. For example, an idea was floating around about introducing a transient trie. Such a trie would allow writing the elements to the set but won't allow the Substrate Runtime to read them. That trie would still maintain the state root when elements are inserted. If the storage of events were backed by a transient trie, then writing the events into the database becomes optional to follow the consensus. Thus, the nodes not interested in storing them can turn off that and save some disk throughput." ContentLicense="CC BY-SA 4.0" />
  <row Id="15517" PostHistoryTypeId="2" PostId="4133" RevisionGUID="ed4dda29-77e5-46dc-acec-a787d540a421" CreationDate="2022-08-05T14:39:42.487" UserId="1789" Text="I am trying to add Frontier as a dependency in my substrate-parachain-template.&#xD;&#xA;```&#xD;&#xA;     Compiling sp-npos-elections v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.25#3348e144)&#xD;&#xA;  error: cannot find macro `vec` in this scope&#xD;&#xA;     --&gt; /home/user2038/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/npos-elections/src/reduce.rs:604:21&#xD;&#xA;      |&#xD;&#xA;  604 |                     let min_edge = vec![min_voter, min_target];&#xD;&#xA;      |                                    ^^^&#xD;&#xA;      |&#xD;&#xA;      = note: consider importing one of these items:&#xD;&#xA;              codec::alloc::vec&#xD;&#xA;              crate::vec&#xD;&#xA;              scale_info::prelude::vec&#xD;&#xA;              sp_std::vec&#xD;&#xA;&#xD;&#xA;  error: cannot find macro `vec` in this scope&#xD;&#xA;    --&gt; /home/user2038/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/npos-elections/src/phragmms.rs:52:20&#xD;&#xA;     |&#xD;&#xA;  52 |     let mut winners = vec![];&#xD;&#xA;     |                       ^^^&#xD;&#xA;     |&#xD;&#xA;     = note: consider importing one of these items:&#xD;&#xA;             codec::alloc::vec&#xD;&#xA;             crate::vec&#xD;&#xA;             scale_info::prelude::vec&#xD;&#xA;             sp_std::vec&#xD;&#xA;```&#xD;&#xA;From this post https://stackoverflow.com/questions/70477868/substrate-cannot-find-type-vec-in-this-scope, perhaps I need to make a pallet to fix this error?&#xD;&#xA;That sounds weird...&#xD;&#xA;&#xD;&#xA;Is there another solution? How can I solve this? " ContentLicense="CC BY-SA 4.0" />
  <row Id="15519" PostHistoryTypeId="1" PostId="4133" RevisionGUID="ed4dda29-77e5-46dc-acec-a787d540a421" CreationDate="2022-08-05T14:39:42.487" UserId="1789" Text="cannot find macro `vec` in this scope" ContentLicense="CC BY-SA 4.0" />
  <row Id="15520" PostHistoryTypeId="3" PostId="4133" RevisionGUID="ed4dda29-77e5-46dc-acec-a787d540a421" CreationDate="2022-08-05T14:39:42.487" UserId="1789" Text="|frontier|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15521" PostHistoryTypeId="5" PostId="4133" RevisionGUID="531e3168-b1ad-4e29-ae6e-ef0ec5bda52f" CreationDate="2022-08-05T14:46:26.940" UserId="1789" Comment="added 172 characters in body" Text="I am trying to add Frontier as a dependency in my substrate-parachain-template.&#xD;&#xA;```&#xD;&#xA;     Compiling sp-npos-elections v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.25#3348e144)&#xD;&#xA;  error: cannot find macro `vec` in this scope&#xD;&#xA;     --&gt; /home/user2038/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/npos-elections/src/reduce.rs:604:21&#xD;&#xA;      |&#xD;&#xA;  604 |                     let min_edge = vec![min_voter, min_target];&#xD;&#xA;      |                                    ^^^&#xD;&#xA;      |&#xD;&#xA;      = note: consider importing one of these items:&#xD;&#xA;              codec::alloc::vec&#xD;&#xA;              crate::vec&#xD;&#xA;              scale_info::prelude::vec&#xD;&#xA;              sp_std::vec&#xD;&#xA;&#xD;&#xA;  error: cannot find macro `vec` in this scope&#xD;&#xA;    --&gt; /home/user2038/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/npos-elections/src/phragmms.rs:52:20&#xD;&#xA;     |&#xD;&#xA;  52 |     let mut winners = vec![];&#xD;&#xA;     |                       ^^^&#xD;&#xA;     |&#xD;&#xA;     = note: consider importing one of these items:&#xD;&#xA;             codec::alloc::vec&#xD;&#xA;             crate::vec&#xD;&#xA;             scale_info::prelude::vec&#xD;&#xA;             sp_std::vec&#xD;&#xA;```&#xD;&#xA;From this post https://stackoverflow.com/questions/70477868/substrate-cannot-find-type-vec-in-this-scope, perhaps I need to make a pallet to fix this error?&#xD;&#xA;That sounds weird...&#xD;&#xA;&#xD;&#xA;It seems this solves it: https://users.rust-lang.org/t/whats-different-between-these-two-features-style/47292/5 with reference https://github.com/paritytech/substrate/blob/master/utils/wasm-builder/src/wasm_project.rs#L324-L349&#xD;&#xA;&#xD;&#xA;but how can I apply that in my project???&#xD;&#xA;&#xD;&#xA;Is there another solution? How can I solve this? " ContentLicense="CC BY-SA 4.0" />
  <row Id="15522" PostHistoryTypeId="2" PostId="4134" RevisionGUID="814dd987-868f-47b3-ad6d-ed1003b981b8" CreationDate="2022-08-05T15:06:04.827" UserId="494" Text="Pallets can have unit tests with a mock runtime where extrinsics are tested against multiple cases.&#xD;&#xA;&#xD;&#xA;However it's not obvious how to do the same for offchain workers.&#xD;&#xA;&#xD;&#xA;How can I write unit tests for offchain workers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15524" PostHistoryTypeId="1" PostId="4134" RevisionGUID="814dd987-868f-47b3-ad6d-ed1003b981b8" CreationDate="2022-08-05T15:06:04.827" UserId="494" Text="How to write unit tests for offchain workers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15525" PostHistoryTypeId="3" PostId="4134" RevisionGUID="814dd987-868f-47b3-ad6d-ed1003b981b8" CreationDate="2022-08-05T15:06:04.827" UserId="494" Text="|offchain-worker|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15526" PostHistoryTypeId="4" PostId="4116" RevisionGUID="ac70438a-3feb-4e7e-ac93-e9c8903bcdc3" CreationDate="2022-08-05T15:17:26.483" UserId="29" Comment="edited title" Text="How to get the extrinsics and their hash from a block with Subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="15527" PostHistoryTypeId="2" PostId="4135" RevisionGUID="8425f9f0-d0c1-4f28-afce-b5c302654faa" CreationDate="2022-08-05T15:30:43.413" UserId="2752" Text="I think the compiler actually already tells you what you need to do.&#xD;&#xA;vec![] is not included in any of the crates you are using.&#xD;&#xA;So in order to use it, you need to import it. &#xD;&#xA;&#xD;&#xA;This is how this could look like:&#xD;&#xA;&#xD;&#xA;        use codec::vec;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15532" PostHistoryTypeId="2" PostId="4137" RevisionGUID="13917859-6116-4ca1-9451-0b9f1aabb853" CreationDate="2022-08-05T15:46:08.770" UserId="251" Text="Check your deps std features.&#xD;&#xA;&#xD;&#xA;I think you might missing something like `xxx/std`." ContentLicense="CC BY-SA 4.0" />
  <row Id="15534" PostHistoryTypeId="2" PostId="4138" RevisionGUID="3c5814b7-bf80-426a-b001-4f87ad82196d" CreationDate="2022-08-05T15:52:34.820" UserId="45" Text="I do agree that theoretically writing everything from scratch allows you to get much better results than a pre-made framework. Besides that, Substrate has to make some sacrifices for the generality it provides.&#xD;&#xA;&#xD;&#xA;Consider replicating Bitcoin in Substrate. Let's focus only on one facet of such a project — the database. To validate a bitcoin block, one only needs to store the set of UTXO. Bitcoin does not require a state trie. If you were to implement bitcoin on top of Substrate, you would store the UTXO in the state trie. That comes with the price of maintaining the state trie, e.g. computing the state root. Who cares about bitcoin, you may ask? The point is though that Substrate makes some assumptions for you. Those can fit your use case, or they can interfere.&#xD;&#xA;&#xD;&#xA;If you take the logic to the extreme, you should not write programs for operating systems. Instead, write the programs directly for bare metal, forgoing an OS just because an OS makes choices that you might not want or need. That's not what we see in reality, though. It takes absolutely insane amount of effort and obscure knowledge. People do that but only when they absolutely have to and when they can afford that. Linux is good enough for the overwhelming majority of use-cases. &#xD;&#xA;&#xD;&#xA;I think this analogy works here, so I will further develop it.&#xD;&#xA;&#xD;&#xA;It takes enormous amounts of effort and expertise. You will have to fill in a database, trie, mempool, and VM, to name a few, and each of those is a rabbit hole of each own. Each component needs to be implemented, tested, optimized and maintained. That takes time and always more time than you expect (even after the adjustment).&#xD;&#xA;&#xD;&#xA;Similar to Linux, there is space for reaping the fruits of economies of scale. More users make for more contributors. More contributors make for more quality software. Also, more quality software attracts more users. Many bugfixes are written with blood. Thousands of developers' serendipitous insights lead to innumerable optimizations. It's **very** hard to challenge Linux, even if your scope is way less general. Also, there is a point about a talent pool. There are certainly people who can write programs against Linux, and there are a decent number of kernel developers. &#xD;&#xA;&#xD;&#xA;This is not to say that Substrate is in such a position currently, but it is on the way there. It seems to be the general dynamics of framework vs. roll-your-own solution.&#xD;&#xA;&#xD;&#xA;Rolling your own blockchain is a dangerous endeavor accessible only to very well-funded entities and makes sense if the benefits are extremely high. If the team wants to innovate only on the STF (in Substrate we call it Runtime), there is not much sense in writing the blockchain from scratch. In the case something does not work well in Substrate for a particular use case, the team would be better off lobbying the change to make it work better or, in the worst case, forking Substrate.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15536" PostHistoryTypeId="2" PostId="4139" RevisionGUID="2f1c9221-5e81-4f44-80bf-1a1df5461925" CreationDate="2022-08-05T16:04:58.817" UserId="251" Text="You need something like [this](https://github.com/paritytech/substrate/blob/master/frame/merkle-mountain-range/src/tests.rs#L36-L40) to register the offchain ext.&#xD;&#xA;&#xD;&#xA;It's a really good example. Check the whole `tests.rs`." ContentLicense="CC BY-SA 4.0" />
  <row Id="15538" PostHistoryTypeId="2" PostId="4140" RevisionGUID="9b332407-f96c-4983-8662-664fce6225cb" CreationDate="2022-08-05T18:37:27.937" UserId="2989" Text="I have a local testnet running and it works until the first lease period is up. Once the first lease period finishes the chain stops producing blocks. I am looking for an easy way to submit some extrinsics to extend the lease period for a parachain -- or would I have to do something more complex in order to accomplish this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15540" PostHistoryTypeId="1" PostId="4140" RevisionGUID="9b332407-f96c-4983-8662-664fce6225cb" CreationDate="2022-08-05T18:37:27.937" UserId="2989" Text="Extend parachain lease on local testnet" ContentLicense="CC BY-SA 4.0" />
  <row Id="15541" PostHistoryTypeId="3" PostId="4140" RevisionGUID="9b332407-f96c-4983-8662-664fce6225cb" CreationDate="2022-08-05T18:37:27.937" UserId="2989" Text="|substrate-node|parachain|extrinsic|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15542" PostHistoryTypeId="2" PostId="4141" RevisionGUID="24779f2e-75db-4e40-b01d-642b02ed5a3f" CreationDate="2022-08-05T20:15:07.357" UserId="703" Text="This question is more about best practices, and if there is a better method for providing mock data for off-chain ink! tests.  &#xD;&#xA;&#xD;&#xA;The goal is to use mock data for off-chain unit testing for ink! contracts. Cross-contract calls do not work in an off-chain environment. In this example, the contract performs a cross-contract call to an ERC-20 contract to get a caller's balance. My solution was to implement conditional compiling to &quot;re-route&quot; a helper function.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;//only compiles when *not* running tests&#xD;&#xA;#[cfg(not(test))]&#xD;&#xA;fn get_token_balance(&amp;self, caller: &amp;AccountId) -&gt; Balance {&#xD;&#xA;    //calls the external ERC-20 contract&#xD;&#xA;    self.token.balance_of(*caller)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;//only compiles when running tests&#xD;&#xA;#[cfg(test)]&#xD;&#xA;fn get_token_balance(&amp;self, _: &amp;AccountId) -&gt; Balance {&#xD;&#xA;    //arbitrary value&#xD;&#xA;    1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;When compiling for tests, the function that contains the cross-contract call will be excluded. Instead, a different version of the function will be compiled returning some arbitrary value, enabling the unit tests to run. &#xD;&#xA;&#xD;&#xA;The general pattern would be:&#xD;&#xA;- Extrapolate cross-contract calls into a helper function&#xD;&#xA;- Add a configuration to the function that performs the cross-contract call to *not* compile when building tests&#xD;&#xA;- Add another function that *does* compile when building in tests. This function returns any mock data that would be returned from the external contract.&#xD;&#xA;&#xD;&#xA;One limitation of this method is that it will only work for cross-contract calls that do not perform writes but only reads. One solution to this is adding an extra field to the contract that only compiles with tests. This field will work as a fake-storage.&#xD;&#xA;```&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct MyContract {&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mock_field: SomeStruct, // will serve as a fake storage&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;//on-chain, performs cross-contract call&#xD;&#xA;#[cfg(not(test))]&#xD;&#xA;fn do_some_write(&amp;mut self) {&#xD;&#xA;    self.external_contract.write_to_field(0xDEADBEAF);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;//testing environment only&#xD;&#xA;#[cfg(test)]&#xD;&#xA;fn do_some_write(&amp;mut self) {&#xD;&#xA;    self.mock_field.my_fake_storage_item = 0xDEADBEAF;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there a more streamlined approach to providing these mock tests? Or this a viable solution that future ink! developers could use to make their unit tests pass?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15544" PostHistoryTypeId="1" PostId="4141" RevisionGUID="24779f2e-75db-4e40-b01d-642b02ed5a3f" CreationDate="2022-08-05T20:15:07.357" UserId="703" Text="How to provide mock data for cross-contract calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="15545" PostHistoryTypeId="3" PostId="4141" RevisionGUID="24779f2e-75db-4e40-b01d-642b02ed5a3f" CreationDate="2022-08-05T20:15:07.357" UserId="703" Text="|ink|smart-contract|testing|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15546" PostHistoryTypeId="5" PostId="4107" RevisionGUID="3b8869ea-e277-42cd-95d5-ff4d3548ca9b" CreationDate="2022-08-05T20:58:28.383" UserId="258" Comment="deleted 5 characters in body" Text="So I figured the signature creation in polkadotJS is to receive the raw data and not the hash. &#xD;&#xA;&#xD;&#xA;More so, I had to generate the public key this way:&#xD;&#xA;&#xD;&#xA;    const mnemonic = mnemonicGenerate();&#xD;&#xA;    const keyring = new Keyring({type: 'ethereum'});&#xD;&#xA;    const pair = keyring.addFromUri(mnemonic, { name: 'first pair' }, 'ethereum');&#xD;&#xA;          &#xD;&#xA;    const publicKey = pair.publicKey;&#xD;&#xA;&#xD;&#xA;And then i created the signature this way&#xD;&#xA;&#xD;&#xA;    const sig = Array.from(pair.sign(rawData));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;With this generation, I was able to recover the public key successfully with `ink_env::ecdsa_recover`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;N.B: I am using `keccak256` for hashing. The Keyring type `ecdsa` uses `blake2` for hashing hence why I used the type `ethereum` which uses keccak for hashing. You can find the details [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/common/blob/3597a4eb4e0cf9985104568058c5cd23701bbaed/packages/keyring/src/pair/index.ts#L37" ContentLicense="CC BY-SA 4.0" />
  <row Id="15548" PostHistoryTypeId="5" PostId="4070" RevisionGUID="4ee7fde3-49e6-4d74-ae95-aff48c38bbd9" CreationDate="2022-08-06T02:55:58.017" UserId="2782" Comment="deleted 460 characters in body" Text="I have a questions in regard to RPC node for Polkadot or Substrate. &#xD;&#xA;&#xD;&#xA;RPC node configuration - i dont see too many information in regard to this. Is there public information on how to setup a RPC, if there isn't, I am willing to do that if someone is willing to help me to understand how to setup.  &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;If there are any more information on how to setup RPC node, and back to Polkadot.JS. please don't hesitate to contact me and help me with me. Much appreciate. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15550" PostHistoryTypeId="2" PostId="4142" RevisionGUID="8411f1d1-00dc-4e74-9178-4013e3b3018f" CreationDate="2022-08-06T04:27:25.027" UserId="251" Text="IMHO, you could call [sudo_schedule_parathread_upgrade](https://github.com/paritytech/polkadot/blob/master/runtime/common/src/paras_sudo_wrapper.rs#L94-L109) first to onboard your chain. Then call [force_lease](https://github.com/paritytech/polkadot/blob/master/runtime/common/src/slots/mod.rs#L164-L181) to change the lease." ContentLicense="CC BY-SA 4.0" />
  <row Id="15552" PostHistoryTypeId="2" PostId="4143" RevisionGUID="0f6b1077-3838-4d8a-93c3-b46340557d20" CreationDate="2022-08-06T05:04:36.247" UserId="213" Text="This is the polkadotjs code:&#xD;&#xA;&#xD;&#xA;    const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;    &#xD;&#xA;    const seeds = &quot;caution juice atom organ advance problem want pledge someone senior holiday very&quot;;&#xD;&#xA;    const keyring = new Keyring();&#xD;&#xA;    const pair = keyring.addFromUri(seeds);&#xD;&#xA;    const sig = pair.sign(pair.address);&#xD;&#xA;    const sigHex = '0x' + Buffer.from(sig).toString('hex');&#xD;&#xA;&#xD;&#xA;I want to convert it into rust using subxt. Here is my code so far:&#xD;&#xA;&#xD;&#xA;    use sp_core::{&#xD;&#xA;        sr25519,&#xD;&#xA;        Pair,&#xD;&#xA;    };&#xD;&#xA;    use sp_keyring::AccountKeyring;&#xD;&#xA;    &#xD;&#xA;    use subxt::{&#xD;&#xA;        Client,&#xD;&#xA;        DefaultConfig,&#xD;&#xA;        PairSigner,&#xD;&#xA;        SubstrateExtrinsicParams, extrinsic::Signer,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    fn get_from_seed(seed: &amp;str) -&gt; sr25519::Pair {&#xD;&#xA;        sr25519::Pair::from_string(&amp;format!(&quot;//{}&quot;, seed), None)&#xD;&#xA;            .expect(&quot;static values are valid; qed&quot;)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub fn pair_signer(pair: sr25519::Pair) -&gt; PairSigner&lt;DefaultConfig, sr25519::Pair&gt; {&#xD;&#xA;        PairSigner::new(pair)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    fn main() {&#xD;&#xA;        let pair = get_from_seed(&quot;caution juice atom organ advance problem want pledge someone senior holiday very&quot;);&#xD;&#xA;        let pairsigner = pair_signer(pair);&#xD;&#xA;        let sig = pairsigner.sign(pairsigner.address());&#xD;&#xA;        &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But I am unable to convert it into hex.&#xD;&#xA;sign() takes &amp;[u8], mismatched types expected reference `&amp;[u8]` found enum `MultiAddress&lt;AccountId32, u32&gt;`  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15554" PostHistoryTypeId="1" PostId="4143" RevisionGUID="0f6b1077-3838-4d8a-93c3-b46340557d20" CreationDate="2022-08-06T05:04:36.247" UserId="213" Text="I want to generate sigHex from sign in rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="15555" PostHistoryTypeId="3" PostId="4143" RevisionGUID="0f6b1077-3838-4d8a-93c3-b46340557d20" CreationDate="2022-08-06T05:04:36.247" UserId="213" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15556" PostHistoryTypeId="12" PostId="4143" RevisionGUID="873781cf-1e1e-4224-ad40-d7150386130d" CreationDate="2022-08-06T05:58:49.570" UserId="213" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:213,&quot;DisplayName&quot;:&quot;Amiya Behera&quot;}]}" />
  <row Id="15557" PostHistoryTypeId="13" PostId="4143" RevisionGUID="75a3739b-f06d-43d8-8761-f6daf9e5e091" CreationDate="2022-08-06T06:32:52.157" UserId="213" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:213,&quot;DisplayName&quot;:&quot;Amiya Behera&quot;}]}" />
  <row Id="15558" PostHistoryTypeId="2" PostId="4144" RevisionGUID="56e16ddf-1b62-4217-a8e2-7c1b82e84cd8" CreationDate="2022-08-06T06:34:08.083" UserId="213" Text="Seems solved it:&#xD;&#xA;&#xD;&#xA;    use sp_core::{&#xD;&#xA;        sr25519,&#xD;&#xA;        ed25519,&#xD;&#xA;        Pair,&#xD;&#xA;    };&#xD;&#xA;    use sp_keyring::AccountKeyring;&#xD;&#xA;    use sp_runtime::MultiSignature;&#xD;&#xA;    &#xD;&#xA;    use subxt::{&#xD;&#xA;        Client,&#xD;&#xA;        DefaultConfig,&#xD;&#xA;        PairSigner,&#xD;&#xA;        SubstrateExtrinsicParams, extrinsic::Signer,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    fn get_from_seed(seed: &amp;str) -&gt; ed25519::Pair {&#xD;&#xA;        ed25519::Pair::from_string(&amp;format!(&quot;{}&quot;, seed), None)&#xD;&#xA;            .expect(&quot;static values are valid; qed&quot;)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub fn pair_signer(pair: ed25519::Pair) -&gt; PairSigner&lt;DefaultConfig, ed25519::Pair&gt; {&#xD;&#xA;        PairSigner::new(pair)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    fn main() {&#xD;&#xA;        let pair = get_from_seed(&quot;caution juice atom organ advance problem want pledge someone senior holiday very&quot;);&#xD;&#xA;        let pairsigner = pair_signer(pair);&#xD;&#xA;        println!(&quot;{}&quot;, pairsigner.account_id());&#xD;&#xA;        let sig = pairsigner.sign(format!(&quot;{}&quot;, pairsigner.account_id()).as_bytes());&#xD;&#xA;        if let MultiSignature::Ed25519(x) = sig.clone() {&#xD;&#xA;            println!(&quot;0x{:?}&quot;, x);&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        &#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="15560" PostHistoryTypeId="11" PostId="4070" RevisionGUID="86c2880c-1b17-408b-ad14-a9fbc05f93af" CreationDate="2022-08-06T07:47:37.987" UserId="34" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="15563" PostHistoryTypeId="10" PostId="4055" RevisionGUID="31fa995e-b7fc-46a0-afb6-f69c1edfd7a7" CreationDate="2022-08-06T07:53:10.650" UserId="34" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="15566" PostHistoryTypeId="2" PostId="4145" RevisionGUID="c44d2397-e578-4df7-b1f2-a910dd1669c5" CreationDate="2022-08-06T10:32:35.610" UserId="599" Text="With the current version of the ink! you need to implement `SpreadLayou`, `PackedLayout`, and `StorageLayout`. You can derive implementation of those traits like [here](https://github.com/paritytech/ink/blob/3c267d68a413cb25ca87a0ca1e014a52543971a2/examples/multisig/lib.rs#L102) or implement it manually.&#xD;&#xA;&#xD;&#xA;But after resolving [issue](https://github.com/paritytech/ink/issues/1134) maybe you need to derive other traits or use a macro. More details about the new version you can find with linked pull requests=)" ContentLicense="CC BY-SA 4.0" />
  <row Id="15568" PostHistoryTypeId="2" PostId="4146" RevisionGUID="21805bea-20ce-4650-8153-d7cff5f2ba00" CreationDate="2022-08-06T10:51:16.000" UserId="599" Text="```&#xD;&#xA;Uploading your contract on the blockchain with `contract-pallet` has two phases:&#xD;&#xA;- Deploy - deploys source code to the blockchain. After deploying, the network uses the hash of the source code as an identifier for future instantiation of the contract. Now anyone can instantiate the contract by source code hash.&#xD;&#xA;- Instantiation - creates the instance of the contract on the blockchain that uses source code by its hash. After that, anyone can interact with the contract.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Copy/paste this text from [doc](https://docs.openbrush.io/smart-contracts/upgradeable#constructor-and-initialization).&#xD;&#xA;&#xD;&#xA;If you want to instantiate the contract, first it should be deployed to the network by someone, and you need to know the code hash of the contract(logic layer).&#xD;&#xA;&#xD;&#xA;After you have several options on how to instantiate it. You can import the source of the contract into your project like [here](https://github.com/paritytech/ink/blob/33ae2285dc64e63e1ad73f194cbcbf6a034717e3/examples/delegator/Cargo.toml#L18). And after, instantiate it via auto generated `Ref` type like [here](https://github.com/paritytech/ink/blob/33ae2285dc64e63e1ad73f194cbcbf6a034717e3/examples/delegator/lib.rs#L78).&#xD;&#xA;&#xD;&#xA;Another solution is to use [raw environment](https://github.com/paritytech/ink/blob/33ae2285dc64e63e1ad73f194cbcbf6a034717e3/crates/env/src/api.rs#L298) method or to use [`create_builder`](https://github.com/paritytech/ink/blob/33ae2285dc64e63e1ad73f194cbcbf6a034717e3/crates/env/src/call/create_builder.rs#L129). But it requires more data from you like selector of constructor and so on.&#xD;&#xA;&#xD;&#xA;In the future [OpenBrush](https://github.com/Supercolony-net/openbrush-contracts) and [ink!](https://github.com/paritytech/ink/tree/master) will provide a more user-friendly way how to instantiate it without the import of the source code=)" ContentLicense="CC BY-SA 4.0" />
  <row Id="15570" PostHistoryTypeId="2" PostId="4147" RevisionGUID="f6706343-81df-454b-a439-d17231217d02" CreationDate="2022-08-06T11:12:42.327" UserId="2471" Text="Is there a way to produce blocks only if there are incoming transactions. Thus not producing empty blocks?&#xD;&#xA;Do we need to build a palette for that or what exactly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15572" PostHistoryTypeId="1" PostId="4147" RevisionGUID="f6706343-81df-454b-a439-d17231217d02" CreationDate="2022-08-06T11:12:42.327" UserId="2471" Text="Produce blocks only if there are incoming transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="15573" PostHistoryTypeId="3" PostId="4147" RevisionGUID="f6706343-81df-454b-a439-d17231217d02" CreationDate="2022-08-06T11:12:42.327" UserId="2471" Text="|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15574" PostHistoryTypeId="2" PostId="4148" RevisionGUID="b7b2ed39-e311-4494-8412-793e0310ea30" CreationDate="2022-08-06T11:59:30.160" UserId="2320" Text="Is there a way to query a running (local) node and list all available RPC and/or extrinsic endpoints? &#xD;&#xA;&#xD;&#xA;I want to create an overview for new team members and for our company, and maybe even pipe the output to a diagram tool!" ContentLicense="CC BY-SA 4.0" />
  <row Id="15576" PostHistoryTypeId="1" PostId="4148" RevisionGUID="b7b2ed39-e311-4494-8412-793e0310ea30" CreationDate="2022-08-06T11:59:30.160" UserId="2320" Text="How to list all available RPC and extrinsics endpoints of a node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15577" PostHistoryTypeId="3" PostId="4148" RevisionGUID="b7b2ed39-e311-4494-8412-793e0310ea30" CreationDate="2022-08-06T11:59:30.160" UserId="2320" Text="|substrate-node|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15578" PostHistoryTypeId="2" PostId="4149" RevisionGUID="9ae0c517-660c-42e1-a092-dc85c496f3d4" CreationDate="2022-08-06T12:34:38.467" UserId="2471" Text="&#xD;&#xA;When I start a template-node as below I get only these concise info :&#xD;&#xA;&#xD;&#xA;    ~/substrate-node-template$ ./target/release/node-template --chain=local --base-path /tmp/validator1 --alice --node-key=c12b6d18942f5ee8528c8e2baf4e147b5c5c18710926ea492d09cbd9f6c9f82a --port 30333 --ws-port 9944&#xD;&#xA;    2022-08-06 13:32:59 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;    2022-08-06 13:32:59 creating instance on iface 192.168.1.6    &#xD;&#xA;    2022-08-06 13:32:59 creating instance on iface 172.18.0.1    &#xD;&#xA;    2022-08-06 13:32:59 creating instance on iface 172.17.0.1    &#xD;&#xA;    2022-08-06 13:33:03 Accepting new connection, 1/100&#xD;&#xA;    2022-08-06 13:33:04  Idle (0 peers), best: #1807 (0xcec7…1a55), finalized #1805 (0xb25a…7110), ⬇ 0 ⬆ 0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am expecting rather to have something similare to &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/tyIYA.png&#xD;&#xA;&#xD;&#xA;What am i missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15580" PostHistoryTypeId="1" PostId="4149" RevisionGUID="9ae0c517-660c-42e1-a092-dc85c496f3d4" CreationDate="2022-08-06T12:34:38.467" UserId="2471" Text="peers info are not showing up when node is started" ContentLicense="CC BY-SA 4.0" />
  <row Id="15581" PostHistoryTypeId="3" PostId="4149" RevisionGUID="9ae0c517-660c-42e1-a092-dc85c496f3d4" CreationDate="2022-08-06T12:34:38.467" UserId="2471" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15582" PostHistoryTypeId="2" PostId="4150" RevisionGUID="24b1417a-2c7c-49c3-a733-d4e66a152292" CreationDate="2022-08-06T13:52:52.770" UserId="2981" Text="Substrate node template (version polkadot-v0.9.26) could not find any peers including itself (as I understood) and does not produce any blocks. I did not add any lines of code.&#xD;&#xA;Logs: &#xD;&#xA;```log&#xD;&#xA;2022-08-06 16:42:58 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-08-06 16:42:58 creating instance on iface 10.242.1.103    &#xD;&#xA;2022-08-06 16:42:58 creating instance on iface 172.23.174.132    &#xD;&#xA;2022-08-06 16:42:58 creating instance on iface 10.116.116.117    &#xD;&#xA;2022-08-06 16:42:58 error sending packet on iface 172.23.174.132: No route to host (os error 65)    &#xD;&#xA;2022-08-06 16:43:03  Idle (0 peers), best: #0 (0xf574…42d7), finalized #0 (0xf574…42d7), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-08-06 16:43:08  Idle (0 peers), best: #0 (0xf574…42d7), finalized #0 (0xf574…42d7), ⬇ 0 ⬆ 0 &#xD;&#xA;```&#xD;&#xA;What could cause such problem? I tried to run it several days ago and it worked properly, but I don't know how to trace what has changed.&#xD;&#xA;&#xD;&#xA;I'm using macos 12.5 (intel version), firewall is off. I also have installed zerotier with several networks connected, but it wasn't a problem earlier." ContentLicense="CC BY-SA 4.0" />
  <row Id="15584" PostHistoryTypeId="1" PostId="4150" RevisionGUID="24b1417a-2c7c-49c3-a733-d4e66a152292" CreationDate="2022-08-06T13:52:52.770" UserId="2981" Text="Clean node template don't produce blocks due to &quot;No route to host error&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15585" PostHistoryTypeId="3" PostId="4150" RevisionGUID="24b1417a-2c7c-49c3-a733-d4e66a152292" CreationDate="2022-08-06T13:52:52.770" UserId="2981" Text="|substrate-node-template|error|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15586" PostHistoryTypeId="4" PostId="4150" RevisionGUID="4cd2a1f5-1b13-4273-b70a-b1614c1971a7" CreationDate="2022-08-06T13:54:40.930" UserId="2981" Comment="edited title" Text="Clean node template doesn't produce blocks due to &quot;No route to host error&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15587" PostHistoryTypeId="4" PostId="4150" RevisionGUID="f3c52188-4cd9-48a3-a383-61b599d8c79f" CreationDate="2022-08-06T13:55:00.217" UserId="2981" Comment="edited title" Text="Clean node template doesn't produce blocks due to &quot;No route to host&quot; error" ContentLicense="CC BY-SA 4.0" />
  <row Id="15588" PostHistoryTypeId="2" PostId="4151" RevisionGUID="07ef2d73-4d9d-48b3-9775-91b6a6eacea5" CreationDate="2022-08-06T14:53:06.340" UserId="2344" Text="Using `polkadot.js` api:&#xD;&#xA;&#xD;&#xA;- How do I get from an address to the parent address/identity?&#xD;&#xA;- Is there any way to traverse from an identity to the sub-identities?&#xD;&#xA;&#xD;&#xA;Just calling the identity of the address returns `null`&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api'&#xD;&#xA;// import { hexToString } from '@polkadot/util'&#xD;&#xA;&#xD;&#xA;(async () =&gt; {&#xD;&#xA;&#xD;&#xA;  const provider = new WsProvider('wss://kusama-rpc.polkadot.io')&#xD;&#xA;  const api = await ApiPromise.create({ provider: provider })&#xD;&#xA;&#xD;&#xA;  var validator = { stash: &quot;HyLisujX7Cr6D7xzb6qadFdedLt8hmArB6ZVGJ6xsCUHqmx&quot; }; // METASPAN&#xD;&#xA;  var identity = await api.query.identity.identityOf(validator.stash)&#xD;&#xA;  console.log(identity.toString())&#xD;&#xA;  // {&quot;judgements&quot;:[[0,{&quot;reasonable&quot;:null}]],&quot;deposit&quot;:33333333000,&quot;info&quot;:{&quot;additional&quot;:[],&quot;display&quot;:{&quot;raw&quot;:&quot;0x4d4554415350414e&quot;},&quot;legal&quot;:{&quot;none&quot;:null},&quot;web&quot;:{&quot;none&quot;:null},&quot;riot&quot;:{&quot;none&quot;:null},&quot;email&quot;:{&quot;raw&quot;:&quot;0x646572656b406d6574617370616e2e636f6d&quot;},&quot;pgpFingerprint&quot;:null,&quot;image&quot;:{&quot;none&quot;:null},&quot;twitter&quot;:{&quot;raw&quot;:&quot;0x406d6574617370616e5f696f&quot;}}}&#xD;&#xA;&#xD;&#xA;  validator = { name: '☀️SHAWN☀️/08', stash: 'GvBUeTDynB9A7fFDPoBt3RGXSjZVeCetoXjYQ44cMNp5myY' }&#xD;&#xA;  identity = await api.query.identity.identityOf(validator.stash)&#xD;&#xA;  console.log(identity.toString())&#xD;&#xA;  // empty&#xD;&#xA;&#xD;&#xA;  console.debug('done')&#xD;&#xA;&#xD;&#xA;  setTimeout(() =&gt; {&#xD;&#xA;    process.exit(0)&#xD;&#xA;  }, 5000)&#xD;&#xA;&#xD;&#xA;})()&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15590" PostHistoryTypeId="1" PostId="4151" RevisionGUID="07ef2d73-4d9d-48b3-9775-91b6a6eacea5" CreationDate="2022-08-06T14:53:06.340" UserId="2344" Text="How to query an address that has sub-identity?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15591" PostHistoryTypeId="3" PostId="4151" RevisionGUID="07ef2d73-4d9d-48b3-9775-91b6a6eacea5" CreationDate="2022-08-06T14:53:06.340" UserId="2344" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15592" PostHistoryTypeId="2" PostId="4152" RevisionGUID="628d3199-9efd-43ab-bcf6-4ef3072008bb" CreationDate="2022-08-06T15:04:25.817" UserId="2344" Text="If the identity is null, try querying `superOf`:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  const parent = await api.query.identity.superOf(validator.stash)&#xD;&#xA;  console.log(parent.toString())&#xD;&#xA;  var [stash, other] = parent.toJSON()&#xD;&#xA;  identity = await api.query.identity.identityOf(stash)&#xD;&#xA;  console.log(identity.toString())&#xD;&#xA;&#xD;&#xA;  // now get all the kids&#xD;&#xA;  var kids = await api.query.identity.subsOf(stash)&#xD;&#xA;  console.log(kids.toJSON())&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;produces:&#xD;&#xA;```bash&#xD;&#xA;{&quot;judgements&quot;:[[0,{&quot;reasonable&quot;:null}]],&quot;deposit&quot;:33333333000,&quot;info&quot;:{&quot;additional&quot;:[],&quot;display&quot;:{&quot;raw&quot;:&quot;0x4d4554415350414e&quot;},&quot;legal&quot;:{&quot;none&quot;:null},&quot;web&quot;:{&quot;none&quot;:null},&quot;riot&quot;:{&quot;none&quot;:null},&quot;email&quot;:{&quot;raw&quot;:&quot;0x646572656b406d6574617370616e2e636f6d&quot;},&quot;pgpFingerprint&quot;:null,&quot;image&quot;:{&quot;none&quot;:null},&quot;twitter&quot;:{&quot;raw&quot;:&quot;0x406d6574617370616e5f696f&quot;}}}&#xD;&#xA;&#xD;&#xA;[&quot;JHDDYty2cU6vjWyMF2kvNK9hRMAgH9THwqvQpUzqQQs7KJr&quot;,{&quot;raw&quot;:&quot;0x3038f09f9a80&quot;}]&#xD;&#xA;{&quot;judgements&quot;:[[0,{&quot;reasonable&quot;:null}]],&quot;deposit&quot;:1666666666660,&quot;info&quot;:{&quot;additional&quot;:[],&quot;display&quot;:{&quot;raw&quot;:&quot;0xe29880efb88f536861776ee29880efb88f&quot;},&quot;legal&quot;:{&quot;none&quot;:null},&quot;web&quot;:{&quot;none&quot;:null},&quot;riot&quot;:{&quot;none&quot;:null},&quot;email&quot;:{&quot;raw&quot;:&quot;0x736861776e40706f6c6b6177616c6c65742e696f&quot;},&quot;pgpFingerprint&quot;:null,&quot;image&quot;:{&quot;none&quot;:null},&quot;twitter&quot;:{&quot;raw&quot;:&quot;0x40536861776e5859616e67&quot;}}}&#xD;&#xA;[&#xD;&#xA;  3999999999984,&#xD;&#xA;  [&#xD;&#xA;    'GF8vGjisLMsGqJyxhqFRs2Xq6hESJc1KYhRX3QcnWKpghRU',&#xD;&#xA;    'Fd7mesPpDrtpeNzVYSUSi4VxzmFktbsaCUT1edPgG8EsMaH',&#xD;&#xA;    'FQ7qkGu8VUWi7ywuTsAXeLkp1ay82va8ZSekV6VRdR17C7F',&#xD;&#xA;    'Dd2vDdzbe78DGP1WWgjF3c8HniTiwTZTqDiZqqtqoFu1XKW',&#xD;&#xA;    'GUipmsoRhdwHiMh48Msg6UfRCYFcq4NBG8kpTuZeckpgLFc',&#xD;&#xA;    'HJ6MymyKX5wGiFzNj2ytMFiRrPqkUkVzs5SdBU1N8WjW1Hy',&#xD;&#xA;    'HEUnXNpZS8sxY6jjWunUdREL9ftbwh2LABVV78w5nHPdjRC',&#xD;&#xA;    'GUNLTkwW4gJCnyWtjq7Ypenp7xuEEpxbcpTuqLkUZXC9kWb',&#xD;&#xA;    'GvBUeTDynB9A7fFDPoBt3RGXSjZVeCetoXjYQ44cMNp5myY',&#xD;&#xA;    'CwuaQKaC8cDkFfUGFtrex1kdE2ezRDHqNJ6fBVYZ1hVuqqM',&#xD;&#xA;    'EdBHD7CW85ZEaUfuQXdzqgNvY7qTszEiuHThP7TbVrcffDg',&#xD;&#xA;    'EJWav3rM921ZJRKaVgeuT4WwYb9Qcf7TDftM8dJqSTPNowT'&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15594" PostHistoryTypeId="5" PostId="4152" RevisionGUID="7a167845-ba40-4478-9ffd-23e0a86c6579" CreationDate="2022-08-06T15:15:08.680" UserId="2344" Comment="deleted 1012 characters in body" Text="If the identity is null, try querying `superOf`:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  const parent = await api.query.identity.superOf(validator.stash)&#xD;&#xA;  //console.log(parent.toString())&#xD;&#xA;  var [parentStash, subId] = parent.toJSON()&#xD;&#xA;  console.log(parentStash, '-raw-', hexToString(subId.raw))&#xD;&#xA;&#xD;&#xA;  var parentIdentity = await api.query.identity.identityOf(parentStash)&#xD;&#xA;  var idj = parentIdentity.toJSON()&#xD;&#xA;  console.log('parent name:', hexToString(idj.info.display.raw))&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;produces:&#xD;&#xA;```bash&#xD;&#xA;{&quot;judgements&quot;:[[0,{&quot;reasonable&quot;:null}]],&quot;deposit&quot;:33333333000,&quot;info&quot;:{&quot;additional&quot;:[],&quot;display&quot;:{&quot;raw&quot;:&quot;0x4d4554415350414e&quot;},&quot;legal&quot;:{&quot;none&quot;:null},&quot;web&quot;:{&quot;none&quot;:null},&quot;riot&quot;:{&quot;none&quot;:null},&quot;email&quot;:{&quot;raw&quot;:&quot;0x646572656b406d6574617370616e2e636f6d&quot;},&quot;pgpFingerprint&quot;:null,&quot;image&quot;:{&quot;none&quot;:null},&quot;twitter&quot;:{&quot;raw&quot;:&quot;0x406d6574617370616e5f696f&quot;}}}&#xD;&#xA;&#xD;&#xA;JHDDYty2cU6vjWyMF2kvNK9hRMAgH9THwqvQpUzqQQs7KJr -raw- 08&#xD;&#xA;parent name: ☀️Shawn☀️&#xD;&#xA;done&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15595" PostHistoryTypeId="2" PostId="4153" RevisionGUID="f1c98574-c65b-42d5-8c94-2f2862f9e597" CreationDate="2022-08-06T15:59:22.507" UserId="251" Text="```&#xD;&#xA;curl http://127.0.0.1:9933 -X POST -H &quot;Content-Type:application/json&quot; -d '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;rpc_methods&quot;,&quot;params&quot;:[],&quot;id&quot;:1}'&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15597" PostHistoryTypeId="5" PostId="3855" RevisionGUID="ed63e7a6-ddf9-4712-8243-39b4627ca971" CreationDate="2022-08-06T17:21:09.500" UserId="28" Comment="added 16 characters in body" Text="I tried to follow [this tutorial](https://docs.substrate.io/tutorials/work-with-pallets/use-macros-in-a-custom-pallet/) but I have the following problem:&#xD;&#xA;&#xD;&#xA;This is my `pallets/template/src/lib.rs` [file on github](https://github.com/viac92/substrate-node-template/blob/tutorialMacro/pallets/template/src/lib.rs)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And this is the `pallets/template/Cargo.toml` [file on github](https://github.com/viac92/substrate-node-template/blob/tutorialMacro/pallets/template/Cargo.toml)&#xD;&#xA;&#xD;&#xA;The terminal error output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: expected one of: `generate_store`, `without_storage_info`, `storage_version`&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:40:12&#xD;&#xA;   |&#xD;&#xA;40 |     #[pallet::generate_storage_info]&#xD;&#xA;   |               ^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:5:5&#xD;&#xA;  |&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;error[E0432]: unresolved imports `pallet`, `sp_std::vec::Vec`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:4:9&#xD;&#xA;  |&#xD;&#xA;4 | pub use pallet::*;&#xD;&#xA;  |         ^^^^^^ help: a similar path exists: `frame_system::pallet`&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0432, E0433.&#xD;&#xA;For more information about an error, try `rustc --explain E0432`.&#xD;&#xA;error: could not compile `pallet-template` due to 3 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm pretty new to Rust and Substrate so I don't get what is the problem here.&#xD;&#xA;&#xD;&#xA;**UPDATE**&#xD;&#xA;&#xD;&#xA;I remove `#[pallet::generate_storage_info]` as suggest by @shawn-tabrizi now I get only this two errors:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA; --&gt; pallets/template/src/lib.rs:5:5&#xD;&#xA;  |&#xD;&#xA;5 | use sp_std::vec::Vec;&#xD;&#xA;  |     ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:11:9&#xD;&#xA;   |&#xD;&#xA;11 |     use sp_std::vec::Vec; // Step 3.1 will include this in `Cargo.toml`&#xD;&#xA;   |         ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0433`.&#xD;&#xA;error: could not compile `pallet-template` due to 2 previous errors&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15598" PostHistoryTypeId="5" PostId="4145" RevisionGUID="e35e22f2-d1a8-41c0-bb71-b9af7ec8555d" CreationDate="2022-08-06T17:57:02.710" UserId="599" Comment="added 1 character in body" Text="With the current version of the ink! you need to implement `SpreadLayout`, `PackedLayout`, and `StorageLayout`. You can derive implementation of those traits like [here](https://github.com/paritytech/ink/blob/3c267d68a413cb25ca87a0ca1e014a52543971a2/examples/multisig/lib.rs#L102) or implement it manually.&#xD;&#xA;&#xD;&#xA;But after resolving [issue](https://github.com/paritytech/ink/issues/1134) maybe you need to derive other traits or use a macro. More details about the new version you can find with linked pull requests=)" ContentLicense="CC BY-SA 4.0" />
  <row Id="15599" PostHistoryTypeId="2" PostId="4154" RevisionGUID="f24ca174-e2dc-42f4-be9a-bf18dc54fbcd" CreationDate="2022-08-06T18:14:59.920" UserId="29" Text="There may be a simpler way to do this but here is a script:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const getEvents = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    // Subscribe to the new headers on-chain. The callback is fired when new headers&#xD;&#xA;    // are found, the call itself returns a promise with a subscription that can be&#xD;&#xA;    // used to unsubscribe from the newHead subscription&#xD;&#xA;    await api.rpc.chain.subscribeNewHeads(async (header) =&gt; {&#xD;&#xA;        console.log(`Chain is at block: #${header.number}`);&#xD;&#xA;        const blockHash = await api.rpc.chain.getBlockHash(header.number);&#xD;&#xA;        console.log(`blockHash: ${blockHash}`);&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;            // console.log(index, ex.toHuman());&#xD;&#xA;            const { method: { args, method, section } } = ex;&#xD;&#xA;            // console.log(&quot;******EXTRINSIC--BEGIN***&quot;);&#xD;&#xA;            // console.log(`${section}.${method}(${args.map((a) =&gt; a.toString()).join(', ')})`);&#xD;&#xA;            // console.log(&quot;******EXTRINSIC--END*****&quot;);&#xD;&#xA;&#xD;&#xA;            const at = await api.at(blockHash);&#xD;&#xA;            const allRecords = await at.query.system.events();&#xD;&#xA;            // filter the specific events based on the phase and then the&#xD;&#xA;            // index of our extrinsic in the block&#xD;&#xA;            // console.log(allRecords.toHuman());&#xD;&#xA;            const events = allRecords&#xD;&#xA;                .filter(({ phase }) =&gt;&#xD;&#xA;                    phase.isApplyExtrinsic &amp;&amp;&#xD;&#xA;                    phase.asApplyExtrinsic.eq(index)&#xD;&#xA;                )&#xD;&#xA;                .map(({ event }) =&gt; `${event.section}.${event.method}`);&#xD;&#xA;&#xD;&#xA;            console.log(&quot;******EVENT--BEGIN*****&quot;);&#xD;&#xA;            console.log(`${section}.${method}:: ${events.join(', ') || 'no events'}`);&#xD;&#xA;            console.log(&quot;******EVENT--END*******&quot;);&#xD;&#xA;        });&#xD;&#xA;    });&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15601" PostHistoryTypeId="5" PostId="4154" RevisionGUID="007c9415-22b3-44a9-9b9d-713b55302c22" CreationDate="2022-08-06T18:20:06.733" UserId="29" Comment="deleted 51 characters in body" Text="There may be a simpler way to do this but here is a script:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const getEvents = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    // Subscribe to the new headers on-chain. The callback is fired when new headers&#xD;&#xA;    // are found, the call itself returns a promise with a subscription that can be&#xD;&#xA;    // used to unsubscribe from the newHead subscription&#xD;&#xA;    await api.rpc.chain.subscribeNewHeads(async (header) =&gt; {&#xD;&#xA;        console.log(`Chain is at block: #${header.number}`);&#xD;&#xA;        const blockHash = await api.rpc.chain.getBlockHash(header.number);&#xD;&#xA;        console.log(`blockHash: ${blockHash}`);&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;            // console.log(index, ex.toHuman());&#xD;&#xA;            const { method: { args, method, section } } = ex;&#xD;&#xA;            // console.log(&quot;******EXTRINSIC--BEGIN***&quot;);&#xD;&#xA;            // console.log(`${section}.${method}(${args.map((a) =&gt; a.toString()).join(', ')})`);&#xD;&#xA;            // console.log(&quot;******EXTRINSIC--END*****&quot;);&#xD;&#xA;&#xD;&#xA;            const at = await api.at(blockHash);&#xD;&#xA;            const allRecords = await at.query.system.events();&#xD;&#xA;            // filter the specific events based on the phase and then the&#xD;&#xA;            // index of our extrinsic in the block&#xD;&#xA;            const events = allRecords&#xD;&#xA;                .filter(({ phase }) =&gt;&#xD;&#xA;                    phase.isApplyExtrinsic &amp;&amp;&#xD;&#xA;                    phase.asApplyExtrinsic.eq(index)&#xD;&#xA;                )&#xD;&#xA;                .map(({ event }) =&gt; `${event.section}.${event.method}`);&#xD;&#xA;&#xD;&#xA;            console.log(&quot;******EVENT--BEGIN*****&quot;);&#xD;&#xA;            console.log(`${section}.${method}:: ${events.join(', ') || 'no events'}`);&#xD;&#xA;            console.log(&quot;******EVENT--END*******&quot;);&#xD;&#xA;        });&#xD;&#xA;    });&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15602" PostHistoryTypeId="5" PostId="4154" RevisionGUID="acb9f8e4-b040-4afd-b1b3-d3c66e435801" CreationDate="2022-08-06T18:26:42.387" UserId="29" Comment="deleted 1270 characters in body" Text="There may be a simpler way to do this but here is a script:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const getEvents = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    await api.rpc.chain.subscribeNewHeads(async (header) =&gt; {&#xD;&#xA;        console.log(`Chain is at block: #${header.number}`);&#xD;&#xA;        const blockHash = await api.rpc.chain.getBlockHash(header.number);&#xD;&#xA;        console.log(`blockHash: ${blockHash}`);&#xD;&#xA;        const at = await api.at(blockHash);&#xD;&#xA;        const events = await at.query.system.events();&#xD;&#xA;        console.log(events.toHuman());&#xD;&#xA;    });&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15603" PostHistoryTypeId="2" PostId="4155" RevisionGUID="3175f865-390f-4f37-9852-e5c0873d4605" CreationDate="2022-08-07T01:36:06.507" UserId="251" Text="If your `T::Hash` comes from `frame_system::Config` here is the def:&#xD;&#xA;```&#xD;&#xA;/// The output of the `Hashing` function.&#xD;&#xA;type Hash: Parameter&#xD;&#xA;	+ Member&#xD;&#xA;	+ MaybeSerializeDeserialize&#xD;&#xA;	+ Debug&#xD;&#xA;	+ MaybeDisplay&#xD;&#xA;	+ SimpleBitOps&#xD;&#xA;	+ Ord&#xD;&#xA;	+ Default&#xD;&#xA;	+ Copy&#xD;&#xA;	+ CheckEqual&#xD;&#xA;	+ sp_std::hash::Hash&#xD;&#xA;	+ AsRef&lt;[u8]&gt;&#xD;&#xA;	+ AsMut&lt;[u8]&gt;&#xD;&#xA;	+ MaybeMallocSizeOf&#xD;&#xA;	+ MaxEncodedLen;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you could simply do:&#xD;&#xA;```&#xD;&#xA;dna.as_ref().len()&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15606" PostHistoryTypeId="2" PostId="4156" RevisionGUID="1386c99c-45c2-40f2-97c0-34ed3ed094f5" CreationDate="2022-08-07T03:29:35.570" UserId="299" Text="I ran into this problem while testing a new parachain.&#xD;&#xA;```&#xD;&#xA;balances.transferKeepAlive&#xD;&#xA;-32602: Unknown SS58 address format `129`. ` `To support this address format, you need to call `set_default_ss58_version` at node start up.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15608" PostHistoryTypeId="1" PostId="4156" RevisionGUID="1386c99c-45c2-40f2-97c0-34ed3ed094f5" CreationDate="2022-08-07T03:29:35.570" UserId="299" Text="-32602: Unknown SS58 address format" ContentLicense="CC BY-SA 4.0" />
  <row Id="15609" PostHistoryTypeId="3" PostId="4156" RevisionGUID="1386c99c-45c2-40f2-97c0-34ed3ed094f5" CreationDate="2022-08-07T03:29:35.570" UserId="299" Text="|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15610" PostHistoryTypeId="2" PostId="4157" RevisionGUID="f525a3c5-b57b-4b59-a1ae-108822772de4" CreationDate="2022-08-07T07:55:37.170" UserId="299" Text="I solved the problem because 129 was not registered.&#xD;&#xA;https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="15612" PostHistoryTypeId="2" PostId="4158" RevisionGUID="df4e084c-cb56-490e-a48e-a445c4e31837" CreationDate="2022-08-07T09:39:23.567" UserId="2981" Text="Adding --dev flag to the boot command helped. Turned out this problem has no relation to network error." ContentLicense="CC BY-SA 4.0" />
  <row Id="15614" PostHistoryTypeId="2" PostId="4159" RevisionGUID="ca245061-aecf-4c45-9ae9-b0729e862d52" CreationDate="2022-08-07T11:50:30.577" UserId="352" Text="We want transfer all Tx with Tx-core.&#xD;&#xA;&#xD;&#xA;Is there a guide for this? (ex. The value needs to be empty[This is my guess haha]).&#xD;&#xA;&#xD;&#xA;If it's not transfer all, it's working well, so leave a question. &#xD;&#xA;&#xD;&#xA;We make Tx with Tx-wrapper and, broadcasting with sidecar.&#xD;&#xA;&#xD;&#xA;Thank you in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15616" PostHistoryTypeId="1" PostId="4159" RevisionGUID="ca245061-aecf-4c45-9ae9-b0729e862d52" CreationDate="2022-08-07T11:50:30.577" UserId="352" Text="How to make TransferAll transaction with Tx-wrapper?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15617" PostHistoryTypeId="3" PostId="4159" RevisionGUID="ca245061-aecf-4c45-9ae9-b0729e862d52" CreationDate="2022-08-07T11:50:30.577" UserId="352" Text="|transactions|transfer|sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15618" PostHistoryTypeId="10" PostId="4149" RevisionGUID="4f60182d-ca0c-40e6-b671-a472e332ff9b" CreationDate="2022-08-07T13:51:04.117" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[3858],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="15619" PostHistoryTypeId="10" PostId="4156" RevisionGUID="50458a79-32df-4220-a4bf-566a6d0df20e" CreationDate="2022-08-07T13:51:23.220" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="15620" PostHistoryTypeId="5" PostId="2670" RevisionGUID="d5af03f6-4e7a-453f-b6d1-e36db3049682" CreationDate="2022-08-07T13:54:17.127" UserId="234" Comment="Removing the imdb link" Text="In our runtime we have a custom implementation of offence reporting. I want to write an adapter for grandpa equivocation offences (implementing the [`ReportOffence`](https://paritytech.github.io/substrate/master/sp_staking/offence/trait.ReportOffence.html) trait), and have been using the offences pallet as a guide for how to do this. &#xD;&#xA;&#xD;&#xA;In the Offences pallet, offence details are stored in a map of (effectively) `(Offence::ID, Slot, Offender) =&gt; OffenceDetails` (see [here](https://paritytech.github.io/substrate/master/pallet_offences/pallet/type.Reports.html)). This allows efficient lookup of reports that have already been submitted via `HandleEquivocations::is_known_offence`.&#xD;&#xA;&#xD;&#xA;The downside seems to be that we can never prune any reports, since otherwise the offence report could (presumably) be replayed by some malicious party, causing an offender to be slashed twice for the same offence. Indeed, checking the chain state of `offence.reports()` on polkadot, my browser slows noticeably while downloading and parsing the huge number of accumulated reports. So it appears these are never (or rarely?) pruned. &#xD;&#xA;&#xD;&#xA;In my implementation of [`ReportOffence`], I would like to to avoid the abovementioned storage bloat if possible. Thus my plan would be to take advantage of the `Ord` property of [`Offence::TimeSlot`](https://paritytech.github.io/substrate/master/sp_staking/offence/trait.Offence.html#associatedtype.TimeSlot). Instead of storing a map of `(Offence::ID, Slot, Offender) =&gt; OffenceDetails`, I would store `(Offence::ID, Offender) =&gt; Slot` and then reject any equivocation report for a slot older than slot of the last reported offence. &#xD;&#xA;&#xD;&#xA;So, a couple of concrete questions:&#xD;&#xA;&#xD;&#xA;- Is there any fundamental reason that offence reports are (or seem to be) stored indefinitely in polkadot, apart from checking for dupliate reports? &#xD;&#xA;- Similarly: Is there any fundamental reason that frame's offences pallet does *not* implement double-slashing prevention through the `TimeSlot: Ord` trait rather than a hash? " ContentLicense="CC BY-SA 4.0" />
  <row Id="15621" PostHistoryTypeId="24" PostId="2670" RevisionGUID="d5af03f6-4e7a-453f-b6d1-e36db3049682" CreationDate="2022-08-07T13:54:17.127" Comment="Proposed by 234 approved by 34 edit id of 260" ContentLicense="CC BY-SA 4.0" />
  <row Id="15622" PostHistoryTypeId="10" PostId="4150" RevisionGUID="40d48948-499a-49b9-83f2-19727fd2ab58" CreationDate="2022-08-07T13:55:46.770" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="15623" PostHistoryTypeId="2" PostId="4160" RevisionGUID="dbc052ff-a2f2-4466-824e-708abbc9d109" CreationDate="2022-08-07T16:25:12.940" UserId="445" Text="You can follow this tutorial&#xD;&#xA;&#xD;&#xA;https://github.com/CocDap/VBI-Octopus-2/tree/assignment-3&#xD;&#xA;&#xD;&#xA;Step by step for RPC configuration:&#xD;&#xA;&#xD;&#xA;1. Declare your runtime api in your specific pallet: https://github.com/CocDap/VBI-Octopus-2/blob/assignment-3/pallets/template/rpc/runtime-api/src/lib.rs#L7&#xD;&#xA;&#xD;&#xA;2. Declare your rpc method and implement runtime api trait&#xD;&#xA;https://github.com/CocDap/VBI-Octopus-2/blob/assignment-3/pallets/template/rpc/src/lib.rs#L37&#xD;&#xA;&#xD;&#xA;3. Declare helper function in your pallet: https://github.com/CocDap/VBI-Octopus-2/blob/assignment-3/pallets/template/src/lib.rs#L211&#xD;&#xA;&#xD;&#xA;4. Define your runtime api in runtime/src/lib.rs: https://github.com/CocDap/VBI-Octopus-2/blob/assignment-3/runtime/src/lib.rs#L441&#xD;&#xA;&#xD;&#xA;5. Add your custom rpc in node/src/rpc.rs: https://github.com/CocDap/VBI-Octopus-2/blob/assignment-3/node/src/rpc.rs#L36&#xD;&#xA;&#xD;&#xA;And how you query value through RPC&#xD;&#xA;&#xD;&#xA;    curl http://localhost:9933 -H &quot;Content-Type:application/json;charset=utf-8&quot; -d   '{&#xD;&#xA;         &quot;jsonrpc&quot;:&quot;2.0&quot;,&#xD;&#xA;          &quot;id&quot;:1,&#xD;&#xA;          &quot;method&quot;:&quot;&lt;your rpc method&quot;,&#xD;&#xA;          &quot;params&quot;: []&#xD;&#xA;        }'&#xD;&#xA;&#xD;&#xA;More materials from Substrate:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/tree/master/frame/transaction-payment/rpc&#xD;&#xA;&#xD;&#xA;https://substrate.recipes/custom-rpc.html ( This is old version, But good info for you)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15625" PostHistoryTypeId="2" PostId="4161" RevisionGUID="ae41f408-be3b-4599-ac39-38c4d6715416" CreationDate="2022-08-08T00:30:54.880" UserId="2752" Text="I want to query a smart contract which I deployed on the AlepZero testnet.&#xD;&#xA;[The polkadot.js][1] documentation is pretty clear and easy to follow regarding&#xD;&#xA;connecting to the chain and querying general chain information. But I get&#xD;&#xA;a bit confused when it comes to querying information regarding deployed smart&#xD;&#xA;contracts.&#xD;&#xA;Here is what i have so far:&#xD;&#xA;&#xD;&#xA;    // Required imports&#xD;&#xA;    import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;    import { ContractPromise } from '@polkadot/api-contract';&#xD;&#xA;&#xD;&#xA;    // Initialise the provider to connect to the local node&#xD;&#xA;    const provider = new WsProvider('wss://ws.test.azero.dev');&#xD;&#xA;&#xD;&#xA;    // Create the API and wait until ready&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    const contract = new ContractPromise(api, metadata, wasm);&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;I am a bit confused what the metadata and wasm are in this context.&#xD;&#xA;The documentation just sends me in a circle of links here.&#xD;&#xA;&#xD;&#xA;Also, when I have established the connection to the right deployed smart contract,&#xD;&#xA;how can I query or execute methods to get information about it?&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/" ContentLicense="CC BY-SA 4.0" />
  <row Id="15627" PostHistoryTypeId="1" PostId="4161" RevisionGUID="ae41f408-be3b-4599-ac39-38c4d6715416" CreationDate="2022-08-08T00:30:54.880" UserId="2752" Text="How can you query a smart contract using the polkadot.js api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15628" PostHistoryTypeId="3" PostId="4161" RevisionGUID="ae41f408-be3b-4599-ac39-38c4d6715416" CreationDate="2022-08-08T00:30:54.880" UserId="2752" Text="|polkadot|smart-contract|api|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15633" PostHistoryTypeId="2" PostId="4163" RevisionGUID="aadc8115-73b6-4c4c-b47b-7293e509dba9" CreationDate="2022-08-08T03:15:32.350" UserId="116" Text="`OpaqueExtrinsic` implements the trait `Encode` one could then use the `BlakeTwo256::hash_of()` function to calculate the hash value of the extrinsics.&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;use codec::Encode;&#xD;&#xA;&#xD;&#xA;fn blake_two_256_hash&lt;T&gt;(data: T) -&gt; H256&#xD;&#xA;where&#xD;&#xA;    T: Encode,&#xD;&#xA;{&#xD;&#xA;    let ans: H256 = BlakeTwo256::hash_of(&amp;data);&#xD;&#xA;    ans&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And then fetch the full blocks as they are finalized:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    let mut blocks: Subscription&lt;Header&lt;u32, BlakeTwo256&gt;&gt; =&#xD;&#xA;        api.client.rpc().subscribe_blocks().await?;&#xD;&#xA;&#xD;&#xA;    while let Some(Ok(block)) = blocks.next().await {&#xD;&#xA;        if let Ok(Some(fullblock)) = api.client.rpc().block(Some(block.hash())).await {&#xD;&#xA;            for extr in fullblock.block.extrinsics {&#xD;&#xA;               /// extr is an OpaqueExtrinsic&#xD;&#xA;                println!(&quot;Got extrinsic Hash: {:?}&quot;,  blake_two_256_hash(&amp;extr));&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="15635" PostHistoryTypeId="5" PostId="4106" RevisionGUID="739426c9-25c8-4cf4-a7ec-2f40549e15ef" CreationDate="2022-08-08T03:53:21.530" UserId="2984" Comment="deleted 2 characters in body" Text="I kinda know there are differences between both types, such as cli flags --ws, --rpc, --dev (which include many other flags for development), chain spec file, ports, and so on.&#xD;&#xA;&#xD;&#xA;What are the main differences between live network vs dev network using Substrate? If I want to deploy a private network in production, what is essential to know?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15636" PostHistoryTypeId="2" PostId="4164" RevisionGUID="6985cb1a-3deb-416e-9866-3ad446ce1978" CreationDate="2022-08-08T08:24:04.813" UserId="1789" Text="I solved it by adding `default-features = false,` in my Frontier dependencies!&#xD;&#xA;```&#xD;&#xA;# Frontier&#xD;&#xA;pallet-evm = { git = &quot;https://github.com/paritytech/frontier&quot;, default-features = false, branch = &quot;patch3-polkadot-v0.9.25&quot; }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15638" PostHistoryTypeId="5" PostId="4164" RevisionGUID="0daa1db4-d6ed-4d33-9c54-7d197ef71ff6" CreationDate="2022-08-08T09:06:43.317" UserId="1789" Comment="added 199 characters in body" Text="I solved it by adding `default-features = false,` in my Frontier dependencies in my runtime/Cargo.toml&#xD;&#xA;```&#xD;&#xA;# Frontier&#xD;&#xA;pallet-evm = { git = &quot;https://github.com/paritytech/frontier&quot;, default-features = false, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but strangely, in my node/Cargo.toml, there is no need to add that:&#xD;&#xA;```&#xD;&#xA;#Frontier&#xD;&#xA;fp-rpc = { git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;polkadot-v0.9.25&quot; }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15640" PostHistoryTypeId="2" PostId="4165" RevisionGUID="0bc5d8d8-64af-4a88-8ef1-e93b4b82e51a" CreationDate="2022-08-08T10:41:48.667" UserId="2471" Text="Acala is an EVM-substrate project. &#xD;&#xA;&#xD;&#xA;I am trying to edit the code to make Acala run on POA not on POS as it is currently done.&#xD;&#xA;What would be the steps to consider in order to shift to POA?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15642" PostHistoryTypeId="1" PostId="4165" RevisionGUID="0bc5d8d8-64af-4a88-8ef1-e93b4b82e51a" CreationDate="2022-08-08T10:41:48.667" UserId="2471" Text="Use POA in Acala-based fork" ContentLicense="CC BY-SA 4.0" />
  <row Id="15643" PostHistoryTypeId="3" PostId="4165" RevisionGUID="0bc5d8d8-64af-4a88-8ef1-e93b4b82e51a" CreationDate="2022-08-08T10:41:48.667" UserId="2471" Text="|evm|acala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15644" PostHistoryTypeId="2" PostId="4166" RevisionGUID="5374aa47-d42f-4430-a6e6-4bdf00a47fbc" CreationDate="2022-08-08T10:54:14.257" UserId="2102" Text="Following the Polkadot JS docs, I don't see where `wasm` is used tbh&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ContractPromise } from '@polkadot/api-contract';&#xD;&#xA;&#xD;&#xA;// The address is the actual on-chain address as ss58 or AccountId object.&#xD;&#xA;const contract = new ContractPromise(api, metadata, address);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But anyways, the alephZero docs also mention the following aspects in [this section][1]:&#xD;&#xA;&#xD;&#xA;&gt; The resulting files will be placed in mytoken/target/ink/ folder. If the compilation is successful you will find there the following 3 files:&#xD;&#xA;&gt; - mytoken.wasm is a binary WASM file with the compiled contract&#xD;&#xA;&gt; - metadata.json containing our contracts ABI (Application Binary Interface)&#xD;&#xA;&gt; - mytoken.contract which bundles the above two for more convenient interaction with the chain explorer&#xD;&#xA;&#xD;&#xA;So, once you compile your smart contract, and because you mentioned that you've deployed it, I assume you have a `metadata.json` file, which is the one that you have to add here `new ContractPromise(api, metadata, address);`&#xD;&#xA;&#xD;&#xA;Instead of a wasm file, the third argument `address` is the actual address of your smart contract deployed on the testnet, its identifier.&#xD;&#xA;&#xD;&#xA;So let's assume you have a directory `src` where you store the `metadata.json` file and the address of your smart contract is `5DewKiJMRAaeRuYH48wmyXiTwzxedkq6zziRNr2EmirZATK3`. You need to create the `ContractPromise` like:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;... //snip&#xD;&#xA;// Create the API and wait until ready&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;const scAddress = '5DewKiJMRAaeRuYH48wmyXiTwzxedkq6zziRNr2EmirZATK3';&#xD;&#xA;&#xD;&#xA;const contract = new ContractPromise(api, 'src/metadata.json', scAddress);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally, in order to interact with your smart contract, you can follow this guide: https://polkadot.js.org/docs/api-contract/start/contract.read#reading-contract-values&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.alephzero.org/smart-contracts-tutorial/creating-your-first-contract#compiling" ContentLicense="CC BY-SA 4.0" />
  <row Id="15646" PostHistoryTypeId="5" PostId="1201" RevisionGUID="783e5bc9-437e-4515-a66a-edfa3160e457" CreationDate="2022-08-08T12:17:27.933" UserId="234" Comment="Updated the link that points to the comment of the `start_era` call" Text="In the Babe pallet of Substrate, there are tests that show that a validator will be removed from the active validator set over the course of two **consecutive** eras.&#xD;&#xA;&#xD;&#xA;In the first era, a validator commits an offence and an equivocation proof is reported.&#xD;&#xA;In the second era, the offending validator gets slashed with the unapplied slash from the previous era.&#xD;&#xA;It shows in the the Staking pallet of Substrate, but not in any test, that the offending validator would be involuntarily chilled in the second era, since the effects of removing it from the active validator set in the first era do not take effect until the second era.&#xD;&#xA;&#xD;&#xA;The test function where this happens is called `report_equivocation_current_session_works` in the Babe pallet [here][1].&#xD;&#xA;&#xD;&#xA;The test function gives each validator in the session the same balance of `10_000_000`, and an exposed slashable balance of `10_000`, and then simulates a case where one of the validators (at index 1) commits an offence and needs enough time to generate an equivocation proof that contains two block header hashes from the current slot within the same first era, and also reports the equivocation proof within that same first era.&#xD;&#xA;&#xD;&#xA;The test function then starts a second era so *&quot;the results of the offence report are applied at era end&quot;*, as mentioned [here][2] and checks that 100% of the slashable balance of the offending validator gets slashed to `0` and it checks that they are still staking in that second era but with an exposed slashable balance of `0`. &#xD;&#xA;&#xD;&#xA;I think the test could be improved by checking that they are no longer in the active validator set to demonstrate that they have been involuntarily chilled in the second era.  &#xD;&#xA;&#xD;&#xA;In the Staking pallet implementation where most of this functionality occurs, the `compute_slash` function [here][3] computes the slash of the validator and nominators. It then calls `fetch_spans` to initialize `SlashingSpans` if necessary with a slashing span index, an `AccountId`, and it uses the current era index as the start of the slashing span. It then calls `chill_stash` to involuntarily chill that validator's stash account, which involves removing it from the active validator set, with effects felt at the beginning of the next era (the second era in the case of the above test).&#xD;&#xA;&#xD;&#xA;Also in `compute_slash` function, if the slash amount is more than `0`, and the slashable balance of the validator from the most recent slashing span is also more than `0`, and the misbehaviour occurred within the current slashing span then it provides the values to be slashed to `UnappliedSlash` for slashing to occur in the next era (the second era in the case of the above test).&#xD;&#xA;&#xD;&#xA;Note that in the above test function, an equivocation offence trait from the Babe or Grandpa pallet may be used along with the `report_offence` function from the Offense pallet to provide equivocation offence data in an equivocation report to a `HandleEquivocation` trait in the corresponding pallet, which has utility methods for handling valid equivocation reports.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/babe/src/tests.rs#L425&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/babe/src/tests.rs#L473&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/staking/src/slashing.rs#L227&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/" ContentLicense="CC BY-SA 4.0" />
  <row Id="15647" PostHistoryTypeId="24" PostId="1201" RevisionGUID="783e5bc9-437e-4515-a66a-edfa3160e457" CreationDate="2022-08-08T12:17:27.933" Comment="Proposed by 234 approved by 83 edit id of 262" ContentLicense="CC BY-SA 4.0" />
  <row Id="15648" PostHistoryTypeId="5" PostId="4161" RevisionGUID="8e2cb165-6c6a-4461-b109-5fea532fa36a" CreationDate="2022-08-08T12:25:31.110" UserId="2958" Comment="removed unnecessary spaces, grammar fix" Text="I want to query a smart contract which I deployed on the AlepZero testnet.&#xD;&#xA;[The polkadot.js][1] documentation is pretty clear and easy to follow regarding connecting to the chain and querying general chain information. But I get a bit confused when it comes to querying information regarding deployed smart contracts.&#xD;&#xA;&#xD;&#xA;Here is what I have so far:&#xD;&#xA;&#xD;&#xA;    // Required imports&#xD;&#xA;    import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;    import { ContractPromise } from '@polkadot/api-contract';&#xD;&#xA;&#xD;&#xA;    // Initialise the provider to connect to the local node&#xD;&#xA;    const provider = new WsProvider('wss://ws.test.azero.dev');&#xD;&#xA;&#xD;&#xA;    // Create the API and wait until ready&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    const contract = new ContractPromise(api, metadata, wasm);&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;I am a bit confused about what the metadata and wasm are in this context.&#xD;&#xA;The documentation just sends me in a circle of links here.&#xD;&#xA;&#xD;&#xA;Also, when I have established the connection to the right deployed smart contract, how can I query or execute methods to get information about it?&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/" ContentLicense="CC BY-SA 4.0" />
  <row Id="15649" PostHistoryTypeId="24" PostId="4161" RevisionGUID="8e2cb165-6c6a-4461-b109-5fea532fa36a" CreationDate="2022-08-08T12:25:31.110" Comment="Proposed by 2958 approved by -1 edit id of 261" ContentLicense="CC BY-SA 4.0" />
  <row Id="15650" PostHistoryTypeId="5" PostId="4161" RevisionGUID="a6000604-6e12-4a4a-8a4d-05f982dd9970" CreationDate="2022-08-08T12:25:31.110" UserId="83" Comment="Backticks" Text="I want to query a smart contract which I deployed on the Aleph Zero testnet.&#xD;&#xA;[The Polkadot.js][1] documentation is pretty clear and easy to follow regarding connecting to the chain and querying general chain information. But I get a bit confused when it comes to querying information regarding deployed smart contracts.&#xD;&#xA;&#xD;&#xA;Here is what I have so far:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// Required imports&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;import { ContractPromise } from '@polkadot/api-contract';&#xD;&#xA;&#xD;&#xA;// Initialise the provider to connect to the local node&#xD;&#xA;const provider = new WsProvider('wss://ws.test.azero.dev');&#xD;&#xA;&#xD;&#xA;// Create the API and wait until ready&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;    &#xD;&#xA;const contract = new ContractPromise(api, metadata, wasm);&#xD;&#xA;```&#xD;&#xA;    &#xD;&#xA;I am a bit confused about what the metadata and wasm are in this context.&#xD;&#xA;The documentation just sends me in a circle of links here.&#xD;&#xA;&#xD;&#xA;Also, when I have established the connection to the right deployed smart contract, how can I query or execute methods to get information about it?&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/" ContentLicense="CC BY-SA 4.0" />
  <row Id="15651" PostHistoryTypeId="2" PostId="4167" RevisionGUID="f56c4a8a-9f9e-46c6-8053-ac119ca632cb" CreationDate="2022-08-08T12:43:19.423" UserId="2384" Text="## Changes made&#xD;&#xA;In previous version things were fine. In this change, I added `pallet-staking` in the collator. &#xD;&#xA;Here `Staking` is `pallet_staking::{Pallet,...}`&#xD;&#xA;&#xD;&#xA; * Configured `pallet_staking` with reference ( but is not exactly same ) as [polkadot/kusama-runtime](https://github.com/paritytech/polkadot/blob/22836e55d41eef24ed5917fd654ee82a683a7cfe/runtime/kusama/src/lib.rs#L595)&#xD;&#xA;&#xD;&#xA; * Configured `pallet_authorship`&#xD;&#xA;```rust&#xD;&#xA;impl pallet_authorship::Config for Runtime {&#xD;&#xA;    type FindAuthor = pallet_session::FindAccountFromAuthorIndex&lt;Self, Aura&gt;;&#xD;&#xA;    type UncleGenerations = UncleGenerations;&#xD;&#xA;    type FilterUncle = ();&#xD;&#xA;    type EventHandler = (Staking,); //TODO: use ImOnline as second field of tuple&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; * Configures `pallet_session`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_session::Config for Runtime {&#xD;&#xA;    type Event = Event;&#xD;&#xA;    type ValidatorId = &lt;Self as frame_system::Config&gt;::AccountId;&#xD;&#xA;    // we don't have stash and controller, thus we don't need the convert as well.&#xD;&#xA;    type ValidatorIdOf = pallet_staking::StashOf&lt;Self&gt;;&#xD;&#xA;    type ShouldEndSession = pallet_session::PeriodicSessions&lt;Period, Offset&gt;;&#xD;&#xA;    type NextSessionRotation = pallet_session::PeriodicSessions&lt;Period, Offset&gt;;&#xD;&#xA;    type SessionManager = pallet_session::historical::NoteHistoricalRoot&lt;Self, Staking&gt;;&#xD;&#xA;    // Essentially just Aura, but lets be pedantic.&#xD;&#xA;    type SessionHandler = &lt;SessionKeys as sp_runtime::traits::OpaqueKeys&gt;::KeyTypeIdProviders;&#xD;&#xA;    type Keys = SessionKeys;&#xD;&#xA;    type WeightInfo = pallet_session::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_session_historical::Config for Runtime {&#xD;&#xA;        type FullIdentification = pallet_staking::Exposure&lt;AccountId, Balance&gt;;&#xD;&#xA;        type FullIdentificationOf = pallet_staking::ExposureOf&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;* Chain spec config of staking:&#xD;&#xA;```rust&#xD;&#xA;staking: StakingConfig {&#xD;&#xA;            invulnerables: invulnerables.clone().iter().map(|(acc, _aura)| acc).cloned().collect(),&#xD;&#xA;            validator_count: invulnerables.len() as u32,&#xD;&#xA;            minimum_validator_count: 2,&#xD;&#xA;            slash_reward_fraction: Perbill::from_percent(10),&#xD;&#xA;            ..Default::default()&#xD;&#xA;        },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Problem&#xD;&#xA;Now when starting this collator with help of `polkadot-launch` collator is not producing even the #1 block while relaychain was producing more than 100.&#xD;&#xA;&#xD;&#xA;## Alternatives&#xD;&#xA;But running previous version of collator the same way which had not pallet-staking and then upgrading the chain with `parachainSystem.enactAuthorize` do continue to produce block.&#xD;&#xA;&#xD;&#xA;Note: I have not yet tested the staking behaviour but any suggestion will be welcome" ContentLicense="CC BY-SA 4.0" />
  <row Id="15653" PostHistoryTypeId="1" PostId="4167" RevisionGUID="f56c4a8a-9f9e-46c6-8053-ac119ca632cb" CreationDate="2022-08-08T12:43:19.423" UserId="2384" Text="Collator not producing block" ContentLicense="CC BY-SA 4.0" />
  <row Id="15654" PostHistoryTypeId="3" PostId="4167" RevisionGUID="f56c4a8a-9f9e-46c6-8053-ac119ca632cb" CreationDate="2022-08-08T12:43:19.423" UserId="2384" Text="|staking|parachain-collator|block-production|session|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15655" PostHistoryTypeId="2" PostId="4168" RevisionGUID="763d5c13-cb2f-4e35-80c0-3eef3ddfbb70" CreationDate="2022-08-08T12:48:02.923" UserId="2025" Text="Yes, txwrapper-core supports the construction of TransferAll transactions. You can have a look to [the corresponding documentation](https://github.com/paritytech/txwrapper-core/blob/main/docs/modules/txwrapper_substrate_src.methods.balances.md#transferall) to learn how to use [the transferAll method](https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-substrate/src/methods/balances/transferAll.ts) to construct this type of transactions.&#xD;&#xA;&#xD;&#xA;Regarding the specific input arguments, please note that if you set `keep_alive` to `False` the sender account [will be reaped](https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15657" PostHistoryTypeId="5" PostId="4168" RevisionGUID="fd6e76e1-6907-466c-bcca-c663ca91529e" CreationDate="2022-08-08T13:09:47.827" UserId="2025" Comment="improve description" Text="Yes, txwrapper-core supports the construction of Balance's pallet **TransferAll** transactions. You can have a look to [the corresponding documentation](https://github.com/paritytech/txwrapper-core/blob/main/docs/modules/txwrapper_substrate_src.methods.balances.md#transferall) to learn how to use [the transferAll method](https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-substrate/src/methods/balances/transferAll.ts) to construct this type of transactions.&#xD;&#xA;&#xD;&#xA;Regarding the specific input arguments, please note that if you set `keep_alive` to `False` the sender account [will be reaped](https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15664" PostHistoryTypeId="5" PostId="4159" RevisionGUID="9671f616-c893-4200-be77-9ce7f94c4aec" CreationDate="2022-08-08T13:48:42.510" UserId="2025" Comment="improve question formulation and add links" Text="We want transfer the entire transferable balance with [txwrapper-core](https://github.com/paritytech/txwrapper-core).&#xD;&#xA;&#xD;&#xA;Is there a guide for this? (ex. The value needs to be empty). &#xD;&#xA;&#xD;&#xA;We make the transaction with txwrapper-core and broadcast it with [API Sidecar](https://github.com/paritytech/substrate-api-sidecar).&#xD;&#xA;&#xD;&#xA;Thank you in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15665" PostHistoryTypeId="4" PostId="4159" RevisionGUID="9671f616-c893-4200-be77-9ce7f94c4aec" CreationDate="2022-08-08T13:48:42.510" UserId="2025" Comment="improve question formulation and add links" Text="How to make TransferAll transaction with txwrapper?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15666" PostHistoryTypeId="24" PostId="4159" RevisionGUID="9671f616-c893-4200-be77-9ce7f94c4aec" CreationDate="2022-08-08T13:48:42.510" Comment="Proposed by 2025 approved by 73, 34 edit id of 263" ContentLicense="CC BY-SA 4.0" />
  <row Id="15667" PostHistoryTypeId="5" PostId="4153" RevisionGUID="dfeca82a-03df-4ff4-b2c4-6ff5f6296c68" CreationDate="2022-08-08T14:13:33.493" UserId="251" Comment="added 163 characters in body" Text="```&#xD;&#xA;curl http://127.0.0.1:9933 -X POST -H &quot;Content-Type:application/json&quot; -d '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;rpc_methods&quot;,&quot;params&quot;:[],&quot;id&quot;:1}'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The result example, extrinsic relates:&#xD;&#xA;```&#xD;&#xA;author_pendingExtrinsics&#xD;&#xA;author_removeExtrinsic&#xD;&#xA;author_submitAndWatchExtrinsic&#xD;&#xA;author_submitExtrinsic&#xD;&#xA;author_unwatchExtrinsic&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15668" PostHistoryTypeId="2" PostId="4170" RevisionGUID="aa817c95-e6a2-452a-8f9b-bafb55f0c964" CreationDate="2022-08-08T14:33:22.830" UserId="104" Text="The code that's panicking is this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		// After hashing each message in the message queue chain submitted by the collator, we&#xD;&#xA;		// should arrive to the MQC head provided by the relay chain.&#xD;&#xA;		//&#xD;&#xA;		// A mismatch means that at least some of the submitted messages were altered, omitted or&#xD;&#xA;		// added improperly.&#xD;&#xA;		assert_eq!(dmq_head.head(), expected_dmq_mqc_head);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So it looks to me that some messages in your DMP queue didn't get processed correctly, as the code here expects to see an empty queue, and yet `dmq_head.head()` is returning a non-zero value.&#xD;&#xA;&#xD;&#xA;The way I see it, this isn't really an XCM question, but a DMP/messaging protocol question, and I unfortunately don't have much insight into how DMP works to answer what exactly you should do to solve this problem." ContentLicense="CC BY-SA 4.0" />
  <row Id="15670" PostHistoryTypeId="5" PostId="4119" RevisionGUID="9bd74579-1c3f-4c8d-8e81-51bd669d24c7" CreationDate="2022-08-08T15:32:47.193" UserId="157" Comment="added 492 characters in body" Text="Using `polkadot-v0.9.19` branch I've created benchmarks for a pallet, added it into runtime, compiled.&#xD;&#xA;On run of any of created benchmarks getting this error:&#xD;&#xA;&#xD;&#xA;&gt; Error:&#xD;&#xA;&gt; Service(Client(RuntimeApiError(Application(VersionInvalid(&quot;Instantiation:&#xD;&#xA;&gt; Export ext_crypto_verify_ecdsa_version_1 not found&quot;)))))&#xD;&#xA;&gt;&#xD;&#xA;&gt; Cannot create a runtime error=Instantiation(&quot;Instantiation:&#xD;&#xA;&gt; Export ext_crypto_verify_ecdsa_version_1 not found&quot;)&#xD;&#xA;&#xD;&#xA;Need some hint where it may come from.&#xD;&#xA;&#xD;&#xA;Edit: When run with sudo - getting this error:&#xD;&#xA;&#xD;&#xA;&gt; sudo ./target/debug/polkadex-node benchmark pallet --pallet&#xD;&#xA;&gt; pallet-ocex-lmp --extrinsic &quot;*&quot;&#xD;&#xA;&gt;&#xD;&#xA;&gt; 2022-08-08 17:29:24 [0]  generated 1&#xD;&#xA;&gt; npos voters, 1 from validators and 0 nominators&#xD;&#xA;&gt; &#xD;&#xA;&gt; &#xD;&#xA;&gt;Error:&#xD;&#xA;&gt; Service(Client(VersionInvalid(&quot;Instantiation: Module&#xD;&#xA;&gt; __wbindgen_placeholder__ not found&quot;))) 2022-08-08 17:29:25 Cannot create a runtime error=Instantiation(&quot;Instantiation: Module&#xD;&#xA;&gt; __wbindgen_placeholder__ not found&quot;)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15671" PostHistoryTypeId="2" PostId="4171" RevisionGUID="2183d2c7-dc63-4a5f-929f-85403dff5635" CreationDate="2022-08-08T16:16:25.817" UserId="445" Text="Add `TypeInfo` and `#[scale_info(skip_type_params(T))]` . Because your struct define Generic type &#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;pub struct Kitty&lt;T: Config&gt; {&#xD;&#xA;      pub dna: [u8; 16],&#xD;&#xA;      pub price: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;      pub gender: Gender,&#xD;&#xA;      pub owner: AccountOf&lt;T&gt;,&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15673" PostHistoryTypeId="4" PostId="4141" RevisionGUID="391f501a-67b5-48cc-9de0-b2748b257ccd" CreationDate="2022-08-08T16:16:42.930" UserId="703" Comment="Changed title to better fit question." Text="Best way to provide mock data for cross-contract calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="15674" PostHistoryTypeId="2" PostId="4172" RevisionGUID="363968e7-a958-4fc4-bfa2-86a688751522" CreationDate="2022-08-08T16:36:01.300" UserId="1789" Text="I was trying to add Frontier into my parachain as a dependency...&#xD;&#xA;then I got this error&#xD;&#xA;```&#xD;&#xA;     Compiling parachain-template-runtime v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/runtime)&#xD;&#xA;  error[E0412]: cannot find type `BaseFee` in this scope&#xD;&#xA;     --&gt; /mnt/sda3/polkadot/substrate-parachain-template-evm/runtime/src/lib.rs:415:23&#xD;&#xA;      |&#xD;&#xA;  415 |     type FeeCalculator = BaseFee;&#xD;&#xA;      |                          ^^^^^^^ not found in this scope&#xD;&#xA;```&#xD;&#xA;But I don't know how to import this `BaseFee` because I could not find where it was imported from in the Frontier repository's template/runtime/src/lib.rs:&#xD;&#xA;https://github.com/paritytech/frontier/blob/polkadot-v0.9.25/template/runtime/src/lib.rs#L330&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;	type FeeCalculator = BaseFee;//from Frontier template, where is this declared?&#xD;&#xA;	//type FeeCalculator = FixedGasPrice;//from moombeam;&#xD;&#xA;	//type FeeCalculator = ();//From JoshOrndorff&#xD;&#xA;...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;or should I use the `FixedGasPrice` from Moombeam?&#xD;&#xA;```&#xD;&#xA;pub struct FixedGasPrice;&#xD;&#xA;impl FeeCalculator for FixedGasPrice {&#xD;&#xA;	fn min_gas_price() -&gt; (U256, Weight) {&#xD;&#xA;        (&#xD;&#xA;			(1 * currency::GIGAWEI * currency::SUPPLY_FACTOR).into(),&#xD;&#xA;			1u64,&#xD;&#xA;		)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;What is the difference? It seems I can use `FixedGasPrice` to set the minimum gasPrice...&#xD;&#xA;&#xD;&#xA;so that the user must pay `1 * currency::GIGAWEI * currency::SUPPLY_FACTOR` for every `1u64` amount of Weight. right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15676" PostHistoryTypeId="1" PostId="4172" RevisionGUID="363968e7-a958-4fc4-bfa2-86a688751522" CreationDate="2022-08-08T16:36:01.300" UserId="1789" Text="How to set FeeCalculator value to use BaseFee or FixedGasPrice in pallet_evm config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15677" PostHistoryTypeId="3" PostId="4172" RevisionGUID="363968e7-a958-4fc4-bfa2-86a688751522" CreationDate="2022-08-08T16:36:01.300" UserId="1789" Text="|parachain|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15678" PostHistoryTypeId="2" PostId="4173" RevisionGUID="3b6920d1-f788-4904-b8fd-82b74ef1edf1" CreationDate="2022-08-08T16:41:56.137" UserId="2985" Text="Iam having a parathread 4050&#xD;&#xA;Which i requested for a upgrade to parachain&#xD;&#xA;&#xD;&#xA;Now, iam bit confused on how a parachain produce blocks,&#xD;&#xA;&#xD;&#xA;I would like have a step by step process of producing blocks with parachain on rococo testnet&#xD;&#xA;thanks for the help" ContentLicense="CC BY-SA 4.0" />
  <row Id="15680" PostHistoryTypeId="1" PostId="4173" RevisionGUID="3b6920d1-f788-4904-b8fd-82b74ef1edf1" CreationDate="2022-08-08T16:41:56.137" UserId="2985" Text="How to start produce blocks with Parachain on Rococo Testnet" ContentLicense="CC BY-SA 4.0" />
  <row Id="15681" PostHistoryTypeId="3" PostId="4173" RevisionGUID="3b6920d1-f788-4904-b8fd-82b74ef1edf1" CreationDate="2022-08-08T16:41:56.137" UserId="2985" Text="|polkadot|parachain|parachain-collator|substrate-parachain-template|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15682" PostHistoryTypeId="5" PostId="4141" RevisionGUID="199b60e3-2c54-450a-a8cd-081e57696807" CreationDate="2022-08-08T16:49:58.037" UserId="703" Comment="corrected spelling" Text="This question is more about best practices, and if there is a better method for providing mock data for off-chain ink! tests.  &#xD;&#xA;&#xD;&#xA;The goal is to use mock data for off-chain unit testing for ink! contracts. Cross-contract calls do not work in an off-chain environment. In this example, the contract performs a cross-contract call to an ERC-20 contract to get a caller's balance. My solution was to implement conditional compiling to &quot;re-route&quot; a helper function.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;//only compiles when *not* running tests&#xD;&#xA;#[cfg(not(test))]&#xD;&#xA;fn get_token_balance(&amp;self, caller: &amp;AccountId) -&gt; Balance {&#xD;&#xA;    //calls the external ERC-20 contract&#xD;&#xA;    self.token.balance_of(*caller)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;//only compiles when running tests&#xD;&#xA;#[cfg(test)]&#xD;&#xA;fn get_token_balance(&amp;self, _: &amp;AccountId) -&gt; Balance {&#xD;&#xA;    //arbitrary value&#xD;&#xA;    1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;When compiling for tests, the function that contains the cross-contract call will be excluded. Instead, a different version of the function will be compiled returning some arbitrary value, enabling the unit tests to run. &#xD;&#xA;&#xD;&#xA;The general pattern would be:&#xD;&#xA;- Extrapolate cross-contract calls into a helper function&#xD;&#xA;- Add a configuration to the function that performs the cross-contract call to *not* compile when building tests&#xD;&#xA;- Add another function that *does* compile when building in tests. This function returns any mock data that would be returned from the external contract.&#xD;&#xA;&#xD;&#xA;One limitation of this method is that it will only work for cross-contract calls that do not perform writes but only reads. One solution to this is adding an extra field to the contract that only compiles with tests. This field will work as a fake-storage.&#xD;&#xA;```&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct MyContract {&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mock_field: SomeStruct, // will serve as a fake storage&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;//on-chain, performs cross-contract call&#xD;&#xA;#[cfg(not(test))]&#xD;&#xA;fn do_some_write(&amp;mut self) {&#xD;&#xA;    self.external_contract.write_to_field(0xDEADBEEF);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;//testing environment only&#xD;&#xA;#[cfg(test)]&#xD;&#xA;fn do_some_write(&amp;mut self) {&#xD;&#xA;    self.mock_field.my_fake_storage_item = 0xDEADBEEF;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there a more streamlined approach to providing these mock tests? Or this a viable solution that future ink! developers could use to make their unit tests pass?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15683" PostHistoryTypeId="2" PostId="4174" RevisionGUID="27ac20a1-d277-42df-b178-ffe8259c154a" CreationDate="2022-08-08T17:15:02.460" UserId="2698" Text="I am attempting to implement a custom pallet, but I keep running into this compile error:&#xD;&#xA;```&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /Users/jackson/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:235:9&#xD;&#xA;      |&#xD;&#xA;  235 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  236 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  237 | |                         For more information see: \&#xD;&#xA;  238 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /Users/jackson/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:262:5&#xD;&#xA;      |&#xD;&#xA;  262 |     imp::getrandom_inner(dest)&#xD;&#xA;      |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;```&#xD;&#xA;I have found a few other posts related to this but I haven't found an answer with a connection to the pallets. If I omit the custom pallet, then everything builds fine. Has anyone seen this issue before?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15685" PostHistoryTypeId="1" PostId="4174" RevisionGUID="27ac20a1-d277-42df-b178-ffe8259c154a" CreationDate="2022-08-08T17:15:02.460" UserId="2698" Text="the wasm32-unknown-unknown target is not supported by default" ContentLicense="CC BY-SA 4.0" />
  <row Id="15686" PostHistoryTypeId="3" PostId="4174" RevisionGUID="27ac20a1-d277-42df-b178-ffe8259c154a" CreationDate="2022-08-08T17:15:02.460" UserId="2698" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15687" PostHistoryTypeId="2" PostId="4175" RevisionGUID="d0ec0099-801b-4caa-bced-f75b3ce4c793" CreationDate="2022-08-08T17:23:34.077" UserId="94" Text="Pallets compile to WASM which means that all dependencies need to work in a *no-std* environment.  &#xD;&#xA;In your case it looks like one of your dependencies tries to generate rangom numbers.  &#xD;&#xA;This does not work in WASM and the dependency therefore prints that it cannot build.  &#xD;&#xA;There are a few cases where this can easily be fixed:  &#xD;&#xA;- Add the dependency as *dev* dependency if you only need it in tests.&#xD;&#xA;- Use the [proper way](https://substrate.stackexchange.com/questions/121/secure-random-number-generation) to generate randomness on-chain.&#xD;&#xA;- Use `cargo tree` to find out how the randomness dependency ends up in your pallet if you dont intend to use it.&#xD;&#xA;- Analyze the offending dependency and see if it even supports *no-std*.&#xD;&#xA;&#xD;&#xA;In any way; it always helps if you share the code. But hopefully this gives you a hint!" ContentLicense="CC BY-SA 4.0" />
  <row Id="15689" PostHistoryTypeId="2" PostId="4176" RevisionGUID="a72c16be-b23a-4f6d-b49a-2cbb8010b989" CreationDate="2022-08-08T17:24:34.483" UserId="29" Text="First make sure you test locally:&#xD;&#xA;- https://docs.substrate.io/tutorials/connect-other-chains/local-relay&#xD;&#xA;&#xD;&#xA;When you're ready for testing on Rococo, you can follow this guide:&#xD;&#xA;- https://docs.substrate.io/tutorials/connect-other-chains/rococo-slot" ContentLicense="CC BY-SA 4.0" />
  <row Id="15691" PostHistoryTypeId="5" PostId="4176" RevisionGUID="4a7590e1-6c57-485f-a257-d414120abe92" CreationDate="2022-08-08T17:31:11.393" UserId="29" Comment="added 286 characters in body" Text="First make sure you test locally:&#xD;&#xA;- https://docs.substrate.io/tutorials/connect-other-chains/local-relay&#xD;&#xA;&#xD;&#xA;When you're ready for testing on Rococo, you can follow this guide:&#xD;&#xA;- https://docs.substrate.io/tutorials/connect-other-chains/rococo-slot&#xD;&#xA;&#xD;&#xA;Once a Parity team member with sudo has uploaded your wasm and genesis state to the Rococo relay chain via the [subport issue you filled out](https://github.com/paritytech/subport/issues/432), you will have a temporary slot and can then run your collator and start producing blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="15692" PostHistoryTypeId="5" PostId="4176" RevisionGUID="5f1770e9-95ce-46ae-b272-f8fb3af67e95" CreationDate="2022-08-08T17:41:41.070" UserId="29" Comment="added 8 characters in body" Text="First make sure you test locally:&#xD;&#xA;- https://docs.substrate.io/tutorials/connect-other-chains/local-relay&#xD;&#xA;&#xD;&#xA;When you're ready for testing on Rococo testnet, you can follow this guide:&#xD;&#xA;- https://docs.substrate.io/tutorials/connect-other-chains/rococo-slot&#xD;&#xA;&#xD;&#xA;Once a Parity team member with sudo has uploaded your wasm and genesis state to the Rococo relay chain via the [subport issue you filled out](https://github.com/paritytech/subport/issues/432), you will have a temporary slot and can then run your collator and start producing blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="15697" PostHistoryTypeId="2" PostId="4178" RevisionGUID="56747332-faa0-4cad-8510-8f85e9f20fa2" CreationDate="2022-08-09T00:32:33.053" UserId="227" Text="The comment by Andrew above links this tool which we use for benchmarking ink! contracts: https://github.com/paritytech/smart-bench.&#xD;&#xA;&#xD;&#xA;The readme contains some info on how to use it, in case of uncertainties/missing docs feel free to open an issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="15699" PostHistoryTypeId="2" PostId="4179" RevisionGUID="b0530433-25fb-46dc-bed4-2ec3d23fe765" CreationDate="2022-08-09T00:46:56.657" UserId="227" Text="Rust doesn't have a u256 in its standard library and neither does ink!. However, you can use crates that provide this type.&#xD;&#xA;&#xD;&#xA;For example, the [`ethnum`](https://crates.io/crates/ethnum) crate:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use ethnum::U256;&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;  let bytes: [u8; 32] = [0; 32];&#xD;&#xA;  let _: U256 = U256::from_le_bytes(bytes);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The method [`from_le_bytes`](https://docs.rs/ethnum/1.2.2/ethnum/struct.U256.html#method.from_le_bytes) here takes bytes in little-endian, there's also a method for big-endian." ContentLicense="CC BY-SA 4.0" />
  <row Id="15701" PostHistoryTypeId="2" PostId="4180" RevisionGUID="2940fc69-433d-4785-a4fe-975a6e707a18" CreationDate="2022-08-09T00:52:46.097" UserId="227" Text="There is a project called [ask!](https://github.com/ask-lang/ask), which is a domain-specific language for Assembly Script that enables you writing contracts for Substrate's smart contract module ‒ the [`pallet-contracts`](https://github.com/paritytech/substrate/tree/master/frame/contracts).&#xD;&#xA;&#xD;&#xA;The ask! repository contains a number of examples [here](https://github.com/ask-lang/ask/tree/main/examples), they should give you a starting point of what you're searching for." ContentLicense="CC BY-SA 4.0" />
  <row Id="15703" PostHistoryTypeId="2" PostId="4181" RevisionGUID="bd7df936-08f0-4970-9a06-2ebfc088635b" CreationDate="2022-08-09T01:37:44.560" UserId="2998" Text="I am navigating by all the recipes, and I am playing with the structStorage.&#xD;&#xA;When I save a struct on the storage, after I try to get from chain state, if I use polkadot.js UI, the value that I am getting is : &lt;unknown&gt;.&#xD;&#xA;If i u&#xD;&#xA;&#xD;&#xA;    Error: Unable to decode storage structStorage.innerThingsByNumbers: entry 1:: createType(InnerThingOf):: DoNotConstruct: Cannot construct unknown type InnerThingOf&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15705" PostHistoryTypeId="1" PostId="4181" RevisionGUID="bd7df936-08f0-4970-9a06-2ebfc088635b" CreationDate="2022-08-09T01:37:44.560" UserId="2998" Text="Chain state with struct return &lt;unknown&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15706" PostHistoryTypeId="3" PostId="4181" RevisionGUID="bd7df936-08f0-4970-9a06-2ebfc088635b" CreationDate="2022-08-09T01:37:44.560" UserId="2998" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15707" PostHistoryTypeId="2" PostId="4182" RevisionGUID="fc9587c6-977e-4f94-b6d9-4e99ea6e76d9" CreationDate="2022-08-09T01:51:55.343" UserId="227" Text="It looks like you're adding the `pallet-contracts-rpc` dependency to the runtime (`runtime/Cargo.toml`). It should only be added to the node (`node/Cargo.toml`) though.&#xD;&#xA;&#xD;&#xA;The reason is that everything under `runtime/` will be run in an isolated `no_std` sandbox mode in WebAssembly, whereas the RPC endpoints are very much exposed to the outside networking world.&#xD;&#xA;&#xD;&#xA;There is some glue between sandbox and node (you can think of the node as a client running the runtime within). This glue code is the `pallet-contracts-rpc-runtime-api`.&#xD;&#xA;&#xD;&#xA;The tutorial has been updated by now (the link from the top post also no longer works). I'm not sure what the tutorial was referring to before, but the current one under https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/ contains the correct instructions." ContentLicense="CC BY-SA 4.0" />
  <row Id="15710" PostHistoryTypeId="2" PostId="4183" RevisionGUID="6022cef5-bebd-47ad-8dd2-e7acf78672a2" CreationDate="2022-08-09T04:54:20.290" UserId="627" Text="It would depend on what `tokenContract.address` is. If in Uint8Array format, it would expect it to be correctly encoded for the specified type. Consider the following -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// some address grabbed from Kusama, ss58 format&#xD;&#xA;const SS = 'DtbB3Uy8zX9khHRf7SsSVk7esY5AngKvC9EJVhpjSzza2MU';&#xD;&#xA;&#xD;&#xA;// same address as above, in raw format&#xD;&#xA;const U8A = new Uint8Array([&#xD;&#xA;  58,43,90,168,255,212,227,197,&#xD;&#xA;  204,177,29,52,40,103,217,100,&#xD;&#xA;  65,77,211,110,19,141,228,102,&#xD;&#xA;  245,250,109,134,95,25,214,101&#xD;&#xA;]);&#xD;&#xA;&#xD;&#xA;// as above, hex-encoded&#xD;&#xA;const HEX = '0x3a2b5aa8ffd4e3c5ccb11d342867d964414dd36e138de466f5fa6d865f19d665';&#xD;&#xA;&#xD;&#xA;// this works - the Option will see non-null and handle correctly&#xD;&#xA;console.log(api.createType('Option&lt;AccountId&gt;', SS).toU8a())&#xD;&#xA;&#xD;&#xA;// this fails, same error as you reported - since the input is&#xD;&#xA;// a Uint8Array, it expects it to be fully SCALE encoded. The&#xD;&#xA;// first byte would be used for Some/None, the remainder (now 31)&#xD;&#xA;// for the address&#xD;&#xA;console.log(api.createType('Option&lt;AccountId&gt;', U8A).toU8a())&#xD;&#xA;&#xD;&#xA;// this works - hex is handled like ss58, so it detects/converts&#xD;&#xA;console.log(api.createType('Option&lt;AccountId&gt;', HEX).toU8a())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in the case where a Uint8Array is passed, ensure it is an actual encoded `Option&lt;AccountId&gt;`, that would mean `[1, ... address bytes]`, where the initial `1` indicated `Some` as per the SCALE encoding.&#xD;&#xA;&#xD;&#xA;So in broad terms the API will try and convert the input as best it can - in the case of Uint8Array however, it always expects a correctly encoded SCALE value, generally these are used as part of stream decoding where Uint8Arrays are passed through." ContentLicense="CC BY-SA 4.0" />
  <row Id="15713" PostHistoryTypeId="2" PostId="4184" RevisionGUID="4c22ad12-639d-4561-9228-fc92bf62b4c8" CreationDate="2022-08-09T05:53:44.223" UserId="318" Text="My understanding is the following terms which are used in different contexts and applications all refer to the same thing: &quot;genesis hash&quot;, &quot;network key&quot;, &quot;chain id&quot;. I know at least one way of finding out this value for a chain when the chain is up. I do the following rpc call to get the &quot;hash of block 0&quot;: &#xD;&#xA;```    &#xD;&#xA;curl --request POST \&#xD;&#xA;  --url [NODE_RPC_URL] \&#xD;&#xA;  --header 'Content-Type: application/json' \&#xD;&#xA;  --data '{&quot;jsonrpc&quot;: &quot;2.0&quot;,&quot;method&quot;: &quot;chain_getBlockHash&quot;,&quot;params&quot;: [0],&quot;id&quot;: 1}'&#xD;&#xA;```&#xD;&#xA;I would however prefer using substrate cli to find this key aspect of a chain. From the list of CLI options I see there is a `export-genesis-state` which when used together with `--chain` should return some information about the genesis. It's however not looking to be same or contain the genesis hash. Is there any other method or command that could be used for this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15715" PostHistoryTypeId="1" PostId="4184" RevisionGUID="4c22ad12-639d-4561-9228-fc92bf62b4c8" CreationDate="2022-08-09T05:53:44.223" UserId="318" Text="What is the best way to find the genesis hash for a chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15716" PostHistoryTypeId="3" PostId="4184" RevisionGUID="4c22ad12-639d-4561-9228-fc92bf62b4c8" CreationDate="2022-08-09T05:53:44.223" UserId="318" Text="|genesis|hash|cli|chain-id|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15718" PostHistoryTypeId="2" PostId="4185" RevisionGUID="b1207707-0e4f-4bf1-a282-004bdccc8131" CreationDate="2022-08-09T06:31:35.177" UserId="1947" Text="Is there a way to persist event from contract even in case of error? Currently the deposited event seems to disappear when error occurs in contract." ContentLicense="CC BY-SA 4.0" />
  <row Id="15720" PostHistoryTypeId="1" PostId="4185" RevisionGUID="b1207707-0e4f-4bf1-a282-004bdccc8131" CreationDate="2022-08-09T06:31:35.177" UserId="1947" Text="Persist Event on Error- Ink Contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="15721" PostHistoryTypeId="3" PostId="4185" RevisionGUID="b1207707-0e4f-4bf1-a282-004bdccc8131" CreationDate="2022-08-09T06:31:35.177" UserId="1947" Text="|ink|smart-contract|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15722" PostHistoryTypeId="2" PostId="4186" RevisionGUID="15919142-4408-4d06-9ffe-efb4dd164575" CreationDate="2022-08-09T06:33:13.770" UserId="251" Text="Using the RPC is the right way.&#xD;&#xA;&#xD;&#xA;`export-genesis-state` is used for parathread registration. Which is `block.header().encode()` actually.&#xD;&#xA;&#xD;&#xA;Also, you could see the short-version hash from the log when you boot the node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Initializing Genesis block/state (state: 0xaaa5…9119, header-hash: 0x7cca…b06c)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15724" PostHistoryTypeId="5" PostId="4186" RevisionGUID="eddc55e3-e213-4be4-86e4-eea870f9cf0c" CreationDate="2022-08-09T06:38:22.033" UserId="251" Comment="added 127 characters in body" Text="Using the RPC is the right way.&#xD;&#xA;&#xD;&#xA;`export-genesis-state` is used for parathread registration. Which is `block.header().encode()` actually.&#xD;&#xA;&#xD;&#xA;Also, you could see the short-version hash from the log when you boot the node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Initializing Genesis block/state (state: 0xaaa5…9119, header-hash: 0x7cca…b06c)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And I found another way:&#xD;&#xA;```&#xD;&#xA;# This will print the parent hash&#xD;&#xA;# There you go&#xD;&#xA;./node export-blocks --from 1&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15725" PostHistoryTypeId="2" PostId="4187" RevisionGUID="c7ba0e24-0ca3-477f-8c29-d14c1e9d4fe9" CreationDate="2022-08-09T06:39:40.750" UserId="1970" Text="With any recent Substrate chains based off Metadata v14, this is not needed - the metadata itself will be fully-specify will all types and their definitions.&#xD;&#xA;&#xD;&#xA;For older versions of Substrate, you need to specify the types in the UI via Settings -&gt; Developer. The metadata only exposes the names of the types and the UI would need to know what type it is to [construct it](https://polkadot.js.org/docs/api/start/types.create#choosing-how-to-create).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15729" PostHistoryTypeId="5" PostId="137" RevisionGUID="342b4017-5da8-4904-a990-cc4b82e84339" CreationDate="2022-08-09T06:49:02.643" UserId="165" Comment="added 14 characters in body" Text="It's a concrete way of representing a part of a whole with more or less resolution.&#xD;&#xA;&#xD;&#xA;As you point out when you use any of the [per_things](https://docs.substrate.io/rustdocs/latest/sp_arithmetic/per_things/index.html) structs, what you are expressing a part of a whole.&#xD;&#xA;&#xD;&#xA;In case of percent ( as you might be more used to) when you refer to 100%, that's the unit, the total of the whole. So 100 out of 100 parts, that is the whole amount of units, which is the 100%. This way you can do a division of something in 100 parts and you can express a subset of it, being the half (50 parts out of 100 parts in this case) 50% and so on.&#xD;&#xA;&#xD;&#xA;*Example time!* - Imagine you have cake:&#xD;&#xA;&#xD;&#xA;If you want to divide the cake (the whole/ the unit) in 25 parts and you want to express it in percent terms, having 10 parts would be the 40% of the cake.&#xD;&#xA;&#xD;&#xA;Then, if for your use case happens to need higher precision for expressing a subset out of the whole you might go with something different than percent, that being perthousand, permill or perbill.&#xD;&#xA;&#xD;&#xA;Then, going back to the cake example, if you divide it in 1 billion parts, the precision goes up, but you can still express a sub set of all the parts of the cake by saying, I have the `Perbill::from_percent(40);` of the total of the cake. The amount of cake you have is the same than in the previous example, but is expressed with a crazy big precision for a cake (?) &#xD;&#xA;&#xD;&#xA;If you check the documentation, you will see that [Perbill::one()](https://paritytech.github.io/substrate/master/sp_runtime/struct.Perbill.html#method.one) and [Perbill::zero()](https://paritytech.github.io/substrate/master/sp_runtime/struct.Perbill.html#method.one) exist.&#xD;&#xA;And as stated&#xD;&#xA;&#xD;&#xA;&gt; Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1]&#xD;&#xA;&#xD;&#xA;- `Perbill::one()` will reference the total of the unit, all the parts of the cake.&#xD;&#xA;- `Perbill::zero()` will reference an empty set containing no parts at all from the total of parts." ContentLicense="CC BY-SA 4.0" />
  <row Id="15730" PostHistoryTypeId="2" PostId="4189" RevisionGUID="15ec6485-6128-4fe3-9d0f-ae77eda6f97a" CreationDate="2022-08-09T07:02:03.110" UserId="234" Text="You could also use [substrate-api-sidecar][1] &#xD;&#xA;to query a running local node. By default, it provides a series of endpoints to retrieve chain information (blocks, extrinsics and storage) from nodes. &#xD;&#xA;Highlighting here some extrinsics/transaction related endpoints : &#xD;&#xA;&#xD;&#xA;`/blocks/{blockId}/extrinsics/{extrinsicIndex}`&#xD;&#xA;&#xD;&#xA;`/node/transaction-pool`&#xD;&#xA;&#xD;&#xA;`/transaction`&#xD;&#xA;&#xD;&#xA;`/transaction/dry-run`&#xD;&#xA;&#xD;&#xA;`/transaction/fee-estimate`&#xD;&#xA;&#xD;&#xA;`/transaction/material`&#xD;&#xA;&#xD;&#xA;but you can also check the full endpoints docs [here][2] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-api-sidecar&#xD;&#xA;  [2]: https://paritytech.github.io/substrate-api-sidecar/dist/" ContentLicense="CC BY-SA 4.0" />
  <row Id="15732" PostHistoryTypeId="2" PostId="4190" RevisionGUID="3c179a8d-267e-4d40-96fe-96799cc32a76" CreationDate="2022-08-09T07:48:26.603" UserId="1778" Text="```bash&#xD;&#xA;Error: Service(Other(&quot;Error parsing spec file: missing field `nodeAuthorization` at line 89 column 5&quot;))&#xD;&#xA;```&#xD;&#xA;This is the error message I encounter when trying to build a raw chain spec json file." ContentLicense="CC BY-SA 4.0" />
  <row Id="15734" PostHistoryTypeId="1" PostId="4190" RevisionGUID="3c179a8d-267e-4d40-96fe-96799cc32a76" CreationDate="2022-08-09T07:48:26.603" UserId="1778" Text="Error building custome chain spec after adding the node authorization configurations to chain_spec.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="15735" PostHistoryTypeId="3" PostId="4190" RevisionGUID="3c179a8d-267e-4d40-96fe-96799cc32a76" CreationDate="2022-08-09T07:48:26.603" UserId="1778" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15736" PostHistoryTypeId="2" PostId="4191" RevisionGUID="8c09233c-5fd8-4957-b9fd-cd9a0c26e0fd" CreationDate="2022-08-09T07:48:54.717" UserId="2999" Text="```&#xD;&#xA;{&#xD;&#xA;  &quot;source&quot;: {&#xD;&#xA;    &quot;hash&quot;: &quot;&quot;,&#xD;&#xA;    &quot;language&quot;: &quot;Ask! 0.4.0&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;asc 0.19.23&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;contract&quot;: {&#xD;&#xA;    &quot;name&quot;: &quot;&quot;,&#xD;&#xA;    &quot;version&quot;: &quot;&quot;,&#xD;&#xA;    &quot;authors&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;V3&quot;: {&#xD;&#xA;    &quot;spec&quot;: {&#xD;&#xA;      &quot;constructors&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 1,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;string&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;name&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 1,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;string&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;symbol&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;default&quot;,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;selector&quot;: &quot;0xed4b9d1b&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;messages&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;to&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;mint&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcfdd9aa2&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;from&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;burn&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xb1efc17b&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 1,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;string&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;name&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x3adaf70d&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 1,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;string&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;symbol&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x9bd1933e&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 0,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u8&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;decimal&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcc3fec6d&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 4,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u128&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;totalSupply&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcae60595&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;account&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 4,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u128&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;balanceOf&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xf48def67&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;recipient&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;transfer&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x84a15da1&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;owner&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 4,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u128&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;allowance&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x6a00165e&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;approve&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x681266a0&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;sender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;recipient&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;transferFrom&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x02a6e0d5&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;addedValue&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;increaseAllowance&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcb005356&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;subtractedValue&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;decreaseAllowance&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xe19fabb4&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;events&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;id&quot;: 1,&#xD;&#xA;          &quot;label&quot;: &quot;Transfer&quot;,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;from&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;to&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;value&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [&#xD;&#xA;            &quot;&quot;&#xD;&#xA;          ]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;id&quot;: 2,&#xD;&#xA;          &quot;label&quot;: &quot;Approval&quot;,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;owner&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;value&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [&#xD;&#xA;            &quot;&quot;&#xD;&#xA;          ]&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;docs&quot;: [&#xD;&#xA;        &quot;&quot;&#xD;&#xA;      ]&#xD;&#xA;    },&#xD;&#xA;    &quot;types&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 0,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;u8&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 1,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;str&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 2,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;array&quot;: {&#xD;&#xA;              &quot;len&quot;: 32,&#xD;&#xA;              &quot;type&quot;: 0&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 3,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;composite&quot;: {&#xD;&#xA;              &quot;fields&quot;: [&#xD;&#xA;                {&#xD;&#xA;                  &quot;name&quot;: &quot;inner&quot;,&#xD;&#xA;                  &quot;type&quot;: 2,&#xD;&#xA;                  &quot;typeName&quot;: &quot;FixedArray32&lt;u8&gt;&quot;&#xD;&#xA;                }&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            &quot;path&quot;: []&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 4,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;u128&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 5,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;bool&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it show error: &#xD;&#xA;```&#xD;&#xA;PortableRegistry: 3: Error extracting {&quot;path&quot;:[],&quot;params&quot;:[],&quot;def&quot;:{&quot;composite&quot;:{&quot;fields&quot;:[{&quot;name&quot;:&quot;inner&quot;,&quot;type&quot;:2,&quot;typeName&quot;:&quot;FixedArray32&lt;u8&gt;&quot;,&quot;docs&quot;:[]}]}},&quot;docs&quot;:[]}: Cannot read properties of undefined (reading 'toString')&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15738" PostHistoryTypeId="1" PostId="4191" RevisionGUID="8c09233c-5fd8-4957-b9fd-cd9a0c26e0fd" CreationDate="2022-08-09T07:48:54.717" UserId="2999" Text="Why this metadata.json is not valid" ContentLicense="CC BY-SA 4.0" />
  <row Id="15739" PostHistoryTypeId="3" PostId="4191" RevisionGUID="8c09233c-5fd8-4957-b9fd-cd9a0c26e0fd" CreationDate="2022-08-09T07:48:54.717" UserId="2999" Text="|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15740" PostHistoryTypeId="5" PostId="4191" RevisionGUID="7a6eefc7-1e46-4657-9b60-e6430285a8f8" CreationDate="2022-08-09T07:49:57.580" UserId="2999" Comment="added 53 characters in body" Text="```&#xD;&#xA;{&#xD;&#xA;  &quot;source&quot;: {&#xD;&#xA;    &quot;hash&quot;: &quot;&quot;,&#xD;&#xA;    &quot;language&quot;: &quot;Ask! 0.4.0&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;asc 0.19.23&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;contract&quot;: {&#xD;&#xA;    &quot;name&quot;: &quot;&quot;,&#xD;&#xA;    &quot;version&quot;: &quot;&quot;,&#xD;&#xA;    &quot;authors&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;V3&quot;: {&#xD;&#xA;    &quot;spec&quot;: {&#xD;&#xA;      &quot;constructors&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 1,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;string&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;name&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 1,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;string&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;symbol&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;default&quot;,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;selector&quot;: &quot;0xed4b9d1b&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;messages&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;to&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;mint&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcfdd9aa2&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;from&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;burn&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xb1efc17b&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 1,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;string&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;name&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x3adaf70d&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 1,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;string&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;symbol&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x9bd1933e&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 0,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u8&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;decimal&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcc3fec6d&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 4,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u128&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;totalSupply&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcae60595&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;account&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 4,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u128&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;balanceOf&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xf48def67&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;recipient&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;transfer&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x84a15da1&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;owner&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 4,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u128&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;allowance&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x6a00165e&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;approve&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x681266a0&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;sender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;recipient&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;transferFrom&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x02a6e0d5&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;addedValue&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;increaseAllowance&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcb005356&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;subtractedValue&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;decreaseAllowance&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xe19fabb4&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;events&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;id&quot;: 1,&#xD;&#xA;          &quot;label&quot;: &quot;Transfer&quot;,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;from&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;to&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;value&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [&#xD;&#xA;            &quot;&quot;&#xD;&#xA;          ]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;id&quot;: 2,&#xD;&#xA;          &quot;label&quot;: &quot;Approval&quot;,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;owner&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;value&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [&#xD;&#xA;            &quot;&quot;&#xD;&#xA;          ]&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;docs&quot;: [&#xD;&#xA;        &quot;&quot;&#xD;&#xA;      ]&#xD;&#xA;    },&#xD;&#xA;    &quot;types&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 0,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;u8&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 1,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;str&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 2,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;array&quot;: {&#xD;&#xA;              &quot;len&quot;: 32,&#xD;&#xA;              &quot;type&quot;: 0&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 3,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;composite&quot;: {&#xD;&#xA;              &quot;fields&quot;: [&#xD;&#xA;                {&#xD;&#xA;                  &quot;name&quot;: &quot;inner&quot;,&#xD;&#xA;                  &quot;type&quot;: 2,&#xD;&#xA;                  &quot;typeName&quot;: &quot;FixedArray32&lt;u8&gt;&quot;&#xD;&#xA;                }&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            &quot;path&quot;: []&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 4,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;u128&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 5,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;bool&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it show error: &#xD;&#xA;```&#xD;&#xA;PortableRegistry: 3: Error extracting {&quot;path&quot;:[],&quot;params&quot;:[],&quot;def&quot;:{&quot;composite&quot;:{&quot;fields&quot;:[{&quot;name&quot;:&quot;inner&quot;,&quot;type&quot;:2,&quot;typeName&quot;:&quot;FixedArray32&lt;u8&gt;&quot;,&quot;docs&quot;:[]}]}},&quot;docs&quot;:[]}: Cannot read properties of undefined (reading 'toString')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I could not find any thing wrong with this format" ContentLicense="CC BY-SA 4.0" />
  <row Id="15741" PostHistoryTypeId="5" PostId="4191" RevisionGUID="c8631102-61d4-4060-9f15-b8c83b7aa5fa" CreationDate="2022-08-09T07:51:36.360" UserId="2999" Comment="added 129 characters in body" Text="```&#xD;&#xA;{&#xD;&#xA;  &quot;source&quot;: {&#xD;&#xA;    &quot;hash&quot;: &quot;&quot;,&#xD;&#xA;    &quot;language&quot;: &quot;Ask! 0.4.0&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;asc 0.19.23&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;contract&quot;: {&#xD;&#xA;    &quot;name&quot;: &quot;&quot;,&#xD;&#xA;    &quot;version&quot;: &quot;&quot;,&#xD;&#xA;    &quot;authors&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;V3&quot;: {&#xD;&#xA;    &quot;spec&quot;: {&#xD;&#xA;      &quot;constructors&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 1,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;string&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;name&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 1,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;string&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;symbol&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;default&quot;,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;selector&quot;: &quot;0xed4b9d1b&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;messages&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;to&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;mint&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcfdd9aa2&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;from&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;burn&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xb1efc17b&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 1,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;string&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;name&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x3adaf70d&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 1,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;string&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;symbol&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x9bd1933e&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 0,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u8&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;decimal&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcc3fec6d&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 4,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u128&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;totalSupply&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcae60595&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;account&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 4,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u128&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;balanceOf&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xf48def67&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;recipient&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;transfer&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x84a15da1&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;owner&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 4,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;u128&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;allowance&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x6a00165e&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;approve&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x681266a0&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;sender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;recipient&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;amount&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;transferFrom&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0x02a6e0d5&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;addedValue&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;increaseAllowance&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xcb005356&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;mutates&quot;: true,&#xD;&#xA;          &quot;payable&quot;: true,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;label&quot;: &quot;subtractedValue&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;type&quot;: 5,&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;bool&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;docs&quot;: [],&#xD;&#xA;          &quot;label&quot;: &quot;decreaseAllowance&quot;,&#xD;&#xA;          &quot;selector&quot;: &quot;0xe19fabb4&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;events&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;id&quot;: 1,&#xD;&#xA;          &quot;label&quot;: &quot;Transfer&quot;,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;from&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;to&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;value&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [&#xD;&#xA;            &quot;&quot;&#xD;&#xA;          ]&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          &quot;id&quot;: 2,&#xD;&#xA;          &quot;label&quot;: &quot;Approval&quot;,&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;owner&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;spender&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 3,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;AccountId&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;value&quot;,&#xD;&#xA;              &quot;indexed&quot;: false,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;type&quot;: 4,&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;u128&quot;&#xD;&#xA;                ]&#xD;&#xA;              },&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;&quot;&#xD;&#xA;              ]&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [&#xD;&#xA;            &quot;&quot;&#xD;&#xA;          ]&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;docs&quot;: [&#xD;&#xA;        &quot;&quot;&#xD;&#xA;      ]&#xD;&#xA;    },&#xD;&#xA;    &quot;types&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 0,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;u8&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 1,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;str&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 2,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;array&quot;: {&#xD;&#xA;              &quot;len&quot;: 32,&#xD;&#xA;              &quot;type&quot;: 0&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 3,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;composite&quot;: {&#xD;&#xA;              &quot;fields&quot;: [&#xD;&#xA;                {&#xD;&#xA;                  &quot;name&quot;: &quot;inner&quot;,&#xD;&#xA;                  &quot;type&quot;: 2,&#xD;&#xA;                  &quot;typeName&quot;: &quot;FixedArray32&lt;u8&gt;&quot;&#xD;&#xA;                }&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            &quot;path&quot;: []&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 4,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;u128&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 5,&#xD;&#xA;        &quot;type&quot;: {&#xD;&#xA;          &quot;def&quot;: {&#xD;&#xA;            &quot;primitive&quot;: &quot;bool&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it show error: &#xD;&#xA;```&#xD;&#xA;PortableRegistry: 3: Error extracting {&quot;path&quot;:[],&quot;params&quot;:[],&quot;def&quot;:{&quot;composite&quot;:{&quot;fields&quot;:[{&quot;name&quot;:&quot;inner&quot;,&quot;type&quot;:2,&quot;typeName&quot;:&quot;FixedArray32&lt;u8&gt;&quot;,&quot;docs&quot;:[]}]}},&quot;docs&quot;:[]}: Cannot read properties of undefined (reading 'toString')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I could not find any thing wrong with this format.&#xD;&#xA;&#xD;&#xA;I meet this error when I update the format design to the latest V3.&#xD;&#xA;I have not met this error when use old metadata format." ContentLicense="CC BY-SA 4.0" />
  <row Id="15742" PostHistoryTypeId="2" PostId="4192" RevisionGUID="ad6b3f82-7d89-4dd4-bcbf-d7e80eb96ebb" CreationDate="2022-08-09T08:06:27.477" UserId="445" Text="I guess that you follow this tutorial https://docs.substrate.io/tutorials/get-started/permissioned-network/&#xD;&#xA;&#xD;&#xA;I think you should check your chain spec configuration in `fn testnet_genesis`&#xD;&#xA;&#xD;&#xA;and check this&#xD;&#xA;```&#xD;&#xA; node_authorization: NodeAuthorizationConfig {&#xD;&#xA;   nodes: vec![&#xD;&#xA;     (&#xD;&#xA;       OpaquePeerId(bs58::decode(&quot;12D3KooWBmAwcd4PJNJvfV89HwE48nwkRmAgo8Vy3uQEyNNHBox2&quot;).into_vec().unwrap()),&#xD;&#xA;       endowed_accounts[0].clone()&#xD;&#xA;     ),&#xD;&#xA;     (&#xD;&#xA;       OpaquePeerId(bs58::decode(&quot;12D3KooWQYV9dGMFoRzNStwpXztXaBUjtPqi6aU76ZgUriHhKust&quot;).into_vec().unwrap()),&#xD;&#xA;       endowed_accounts[1].clone()&#xD;&#xA;     ),&#xD;&#xA;   ],&#xD;&#xA; },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Last but not least, you should give us more details" ContentLicense="CC BY-SA 4.0" />
  <row Id="15745" PostHistoryTypeId="2" PostId="4193" RevisionGUID="1f4a7b3f-7fc8-483d-9db2-be9e3441ca2d" CreationDate="2022-08-09T08:25:08.677" UserId="2881" Text="I played around a bit with your example. &#xD;&#xA;&#xD;&#xA;The JS API doesn't seem to like the fact that the `path` for the `composite` has no entries and fails on trying to extract values from that. (It uses these to create the human Java-like type names)&#xD;&#xA;&#xD;&#xA;Adding entries to the path yields no errors.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15747" PostHistoryTypeId="2" PostId="4194" RevisionGUID="1b2d4563-19e4-4091-9d37-7410bac778c3" CreationDate="2022-08-09T08:35:06.847" UserId="1789" Text="I was trying to add Frontier template into my substrate-parachain-template project...&#xD;&#xA;&#xD;&#xA;when I added this code below in runtime/src/lib.rs:&#xD;&#xA;```&#xD;&#xA;impl pallet_base_fee::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Threshold = BaseFeeThreshold;&#xD;&#xA;	type IsActive = IsActive;&#xD;&#xA;	type DefaultBaseFeePerGas = DefaultBaseFeePerGas;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I got this error:&#xD;&#xA;```&#xD;&#xA;    Compiling parachain-template-runtime v0.1.0 (/mnt/sda3/polkadot/substrate-parachain-template-evm/runtime)&#xD;&#xA;...&#xD;&#xA;  error[E0277]: the trait bound `Event: From&lt;pallet_base_fee::Event&gt;` is not satisfied&#xD;&#xA;     --&gt; /mnt/sda3/polkadot/substrate-parachain-template-evm/runtime/src/lib.rs:525:15&#xD;&#xA;      |&#xD;&#xA;  525 |     type Event = Event;&#xD;&#xA;      |                  ^^^^^ the trait `From&lt;pallet_base_fee::Event&gt;` is not implemented for `Event`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `From&lt;T&gt;`:&#xD;&#xA;                &lt;Event as From&lt;cumulus_pallet_dmp_queue::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;cumulus_pallet_parachain_system::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;cumulus_pallet_xcm::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;cumulus_pallet_xcmp_queue::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;frame_system::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_balances::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_collator_selection::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_ethereum::Event&gt;&gt;&#xD;&#xA;              and 4 others&#xD;&#xA;  note: required by a bound in `pallet_base_fee::Config::Event`&#xD;&#xA;     --&gt; /home/user2038/.cargo/git/checkouts/frontier-b733f450c86c5786/2e4daa4/frame/base-fee/src/lib.rs:49:15&#xD;&#xA;      |&#xD;&#xA;  49  |         type Event: From&lt;Event&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;      |                     ^^^^^^^^^^^ required by this bound in `pallet_base_fee::Config::Event`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;```&#xD;&#xA;This `Event` has been used many times in runtime/src/lib.rs.&#xD;&#xA;&#xD;&#xA;And those usage below are all working fine:&#xD;&#xA;```&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;	type Event = Event;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_balances::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;	type Event = Event;&#xD;&#xA;}&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;	type Event = Event;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_ethereum::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;	type Event = Event;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;So I do not know why `pallet_base_fee` cannot accept it...&#xD;&#xA;&#xD;&#xA;What is missing here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15749" PostHistoryTypeId="1" PostId="4194" RevisionGUID="1b2d4563-19e4-4091-9d37-7410bac778c3" CreationDate="2022-08-09T08:35:06.847" UserId="1789" Text="the trait bound `Event: From&lt;pallet_base_fee::Event&gt;` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="15750" PostHistoryTypeId="3" PostId="4194" RevisionGUID="1b2d4563-19e4-4091-9d37-7410bac778c3" CreationDate="2022-08-09T08:35:06.847" UserId="1789" Text="|parachain|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15751" PostHistoryTypeId="2" PostId="4195" RevisionGUID="a47f5374-2b1c-4f75-a6da-2f8821aae7f3" CreationDate="2022-08-09T08:56:28.503" UserId="251" Text="Did you add pallet-base-fee in the `construct_runtime!` with `Event&lt;T&gt;`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15753" PostHistoryTypeId="2" PostId="4196" RevisionGUID="2de3055d-bb16-40a2-8143-b8319da20cf8" CreationDate="2022-08-09T10:07:25.683" UserId="1789" Text="Adding `pallet_base_fee` in the `construct_runtime!` somehow imports this `BaseFee` variable:&#xD;&#xA;```&#xD;&#xA;construct_runtime!(&#xD;&#xA;    ...&#xD;&#xA;	{&#xD;&#xA;    BaseFee: pallet_base_fee,&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15755" PostHistoryTypeId="2" PostId="4197" RevisionGUID="38da7749-af7e-42cb-979b-705067b838bb" CreationDate="2022-08-09T10:23:24.067" UserId="3000" Text="I Need to create a pallet in substrate and i changed genesis build in substrate in my pallet.&#xD;&#xA;&#xD;&#xA;when i run this command it show me this error :&#xD;&#xA;&#xD;&#xA;&gt;GenesisConfig { ^^^^^^^^^^^^^ missing template_module&#xD;&#xA;&#xD;&#xA;**I dont know whats the problem , please guide me to solve this problem .**&#xD;&#xA;&#xD;&#xA;these code are my genesis build in my pallet :&#xD;&#xA;&#xD;&#xA;	#[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		default_price: BalanceOf&lt;T&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;std&quot;)]&#xD;&#xA;    impl&lt;T: Config&gt; Default for GenesisConfig&lt;T&gt; {&#xD;&#xA;        fn default() -&gt; GenesisConfig&lt;T&gt; {&#xD;&#xA;            GenesisConfig { default_price: T::DefaultMembershipPrice::get().saturated_into() }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[pallet::genesis_build]&#xD;&#xA;    impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;        fn build(&amp;self) {&#xD;&#xA;            let n = T::DefaultNumMembership::get();&#xD;&#xA;            for i in 0u64..n {&#xD;&#xA;                let val = DaoMembership {&#xD;&#xA;                    dna: None,&#xD;&#xA;                    owner: None,&#xD;&#xA;                    price: Some(self.default_price.clone()),&#xD;&#xA;                    name: None,&#xD;&#xA;                };&#xD;&#xA;                &lt;MembershipsPooled&lt;T&gt;&gt;::insert(i, val);&#xD;&#xA;                log::info!(&quot;[info!!] generated membership and pooled: [{:?}]&quot;, i);&#xD;&#xA;            }&#xD;&#xA;            &lt;CountForPooled&lt;T&gt;&gt;::put(n);&#xD;&#xA;            &lt;CountForOwned&lt;T&gt;&gt;::put(0);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and this is configuratoin in `chain_spec` :&#xD;&#xA;&#xD;&#xA;    use node_template_runtime::{&#xD;&#xA;        AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, Signature, SudoConfig,&#xD;&#xA;        SystemConfig, WASM_BINARY,&#xD;&#xA;    };&#xD;&#xA;    use sc_service::ChainType;&#xD;&#xA;    use sp_consensus_aura::sr25519::AuthorityId as AuraId;&#xD;&#xA;    use sp_core::{sr25519, Pair, Public};&#xD;&#xA;    use sp_finality_grandpa::AuthorityId as GrandpaId;&#xD;&#xA;    use sp_runtime::traits::{IdentifyAccount, Verify};&#xD;&#xA;    &#xD;&#xA;    // The URL for the telemetry server.&#xD;&#xA;    // const STAGING_TELEMETRY_URL: &amp;str = &quot;wss://telemetry.polkadot.io/submit/&quot;;&#xD;&#xA;    &#xD;&#xA;    /// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.&#xD;&#xA;    pub type ChainSpec = sc_service::GenericChainSpec&lt;GenesisConfig&gt;;&#xD;&#xA;    &#xD;&#xA;    /// Generate a crypto pair from seed.&#xD;&#xA;    pub fn get_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; &lt;TPublic::Pair as Pair&gt;::Public {&#xD;&#xA;        TPublic::Pair::from_string(&amp;format!(&quot;//{}&quot;, seed), None)&#xD;&#xA;            .expect(&quot;static values are valid; qed&quot;)&#xD;&#xA;            .public()&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    type AccountPublic = &lt;Signature as Verify&gt;::Signer;&#xD;&#xA;    &#xD;&#xA;    /// Generate an account ID from seed.&#xD;&#xA;    pub fn get_account_id_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; AccountId&#xD;&#xA;    where&#xD;&#xA;        AccountPublic: From&lt;&lt;TPublic::Pair as Pair&gt;::Public&gt;,&#xD;&#xA;    {&#xD;&#xA;        AccountPublic::from(get_from_seed::&lt;TPublic&gt;(seed)).into_account()&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Generate an Aura authority key.&#xD;&#xA;    pub fn authority_keys_from_seed(s: &amp;str) -&gt; (AuraId, GrandpaId) {&#xD;&#xA;        (get_from_seed::&lt;AuraId&gt;(s), get_from_seed::&lt;GrandpaId&gt;(s))&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub fn development_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;        let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;    &#xD;&#xA;        Ok(ChainSpec::from_genesis(&#xD;&#xA;            // Name&#xD;&#xA;            &quot;Development&quot;,&#xD;&#xA;            // ID&#xD;&#xA;            &quot;dev&quot;,&#xD;&#xA;            ChainType::Development,&#xD;&#xA;            move || {&#xD;&#xA;                testnet_genesis(&#xD;&#xA;                    wasm_binary,&#xD;&#xA;                    // Initial PoA authorities&#xD;&#xA;                    vec![authority_keys_from_seed(&quot;Alice&quot;)],&#xD;&#xA;                    // Sudo account&#xD;&#xA;                    get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;                    // Pre-funded accounts&#xD;&#xA;                    vec![&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;                    ],&#xD;&#xA;                    true,&#xD;&#xA;                )&#xD;&#xA;            },&#xD;&#xA;            // Bootnodes&#xD;&#xA;            vec![],&#xD;&#xA;            // Telemetry&#xD;&#xA;            None,&#xD;&#xA;            // Protocol ID&#xD;&#xA;            None,&#xD;&#xA;            None,&#xD;&#xA;            // Properties&#xD;&#xA;            None,&#xD;&#xA;            // Extensions&#xD;&#xA;            None,&#xD;&#xA;        ))&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub fn local_testnet_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;        let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;    &#xD;&#xA;        Ok(ChainSpec::from_genesis(&#xD;&#xA;            // Name&#xD;&#xA;            &quot;Local Testnet&quot;,&#xD;&#xA;            // ID&#xD;&#xA;            &quot;local_testnet&quot;,&#xD;&#xA;            ChainType::Local,&#xD;&#xA;            move || {&#xD;&#xA;                testnet_genesis(&#xD;&#xA;                    wasm_binary,&#xD;&#xA;                    // Initial PoA authorities&#xD;&#xA;                    vec![authority_keys_from_seed(&quot;Alice&quot;), authority_keys_from_seed(&quot;Bob&quot;)],&#xD;&#xA;                    // Sudo account&#xD;&#xA;                    get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;                    // Pre-funded accounts&#xD;&#xA;                    vec![&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;                    ],&#xD;&#xA;                    true,&#xD;&#xA;                )&#xD;&#xA;            },&#xD;&#xA;            // Bootnodes&#xD;&#xA;            vec![],&#xD;&#xA;            // Telemetry&#xD;&#xA;            None,&#xD;&#xA;            // Protocol ID&#xD;&#xA;            None,&#xD;&#xA;            // Properties&#xD;&#xA;            None,&#xD;&#xA;            None,&#xD;&#xA;            // Extensions&#xD;&#xA;            None,&#xD;&#xA;        ))&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Configure initial storage state for FRAME modules.&#xD;&#xA;    fn testnet_genesis(&#xD;&#xA;        wasm_binary: &amp;[u8],&#xD;&#xA;        initial_authorities: Vec&lt;(AuraId, GrandpaId)&gt;,&#xD;&#xA;        root_key: AccountId,&#xD;&#xA;        endowed_accounts: Vec&lt;AccountId&gt;,&#xD;&#xA;        _enable_println: bool,&#xD;&#xA;    ) -&gt; GenesisConfig {&#xD;&#xA;        GenesisConfig {&#xD;&#xA;            system: SystemConfig {&#xD;&#xA;                // Add Wasm runtime to storage.&#xD;&#xA;                code: wasm_binary.to_vec(),&#xD;&#xA;            },&#xD;&#xA;            balances: BalancesConfig {&#xD;&#xA;                // Configure endowed accounts with initial balance of 1 &lt;&lt; 60.&#xD;&#xA;                balances: endowed_accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect(),&#xD;&#xA;            },&#xD;&#xA;            aura: AuraConfig {&#xD;&#xA;                authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),&#xD;&#xA;            },&#xD;&#xA;            grandpa: GrandpaConfig {&#xD;&#xA;                authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(),&#xD;&#xA;            },&#xD;&#xA;            sudo: SudoConfig {&#xD;&#xA;                // Assign network admin rights.&#xD;&#xA;                key: Some(root_key),&#xD;&#xA;            },&#xD;&#xA;            transaction_payment: Default::default(),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15757" PostHistoryTypeId="1" PostId="4197" RevisionGUID="38da7749-af7e-42cb-979b-705067b838bb" CreationDate="2022-08-09T10:23:24.067" UserId="3000" Text="GenesisConfig { | missing `template_module`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15758" PostHistoryTypeId="3" PostId="4197" RevisionGUID="38da7749-af7e-42cb-979b-705067b838bb" CreationDate="2022-08-09T10:23:24.067" UserId="3000" Text="|substrate-node|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15759" PostHistoryTypeId="2" PostId="4198" RevisionGUID="b5138ae4-7b63-47b2-b91a-0bd3f6fc6705" CreationDate="2022-08-09T10:33:41.350" UserId="445" Text="You should add your genesis config in chain_spec.rs &#xD;&#xA;&#xD;&#xA;Let add this under  `transaction_payment: Default::default()`&#xD;&#xA;We have 2 ways:&#xD;&#xA;&#xD;&#xA;1. `template_module: Default::default()` : Why you can use it. Because you are already implement trait `Default` for `GenesisConfig` in your pallet&#xD;&#xA; ( &#xD;&#xA;```&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;impl&lt;T: Config&gt; Default for GenesisConfig&lt;T&gt; {&#xD;&#xA;    fn default() -&gt; GenesisConfig&lt;T&gt; {&#xD;&#xA;        GenesisConfig { default_price: T::DefaultMembershipPrice::get().saturated_into() }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Import your `TemplateModuleConfig` in this `use node_template_runtime::{&#xD;&#xA;    AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, Signature, SudoConfig,&#xD;&#xA;    SystemConfig, WASM_BINARY,&#xD;&#xA;};`&#xD;&#xA;&#xD;&#xA;Then, &#xD;&#xA;```&#xD;&#xA;template_module: TemplateModuleConfig {&#xD;&#xA;        default_price: 100u32.into()&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15762" PostHistoryTypeId="2" PostId="4199" RevisionGUID="79f16097-388f-4471-afa0-774bcc7d27e5" CreationDate="2022-08-09T11:01:16.547" UserId="276" Text="You can use the `storage_function.get_param_info()` to get more information about the param types:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;storage_function = substrate.get_metadata_storage_function('AMM', 'Pools')&#xD;&#xA;&#xD;&#xA;param_info = storage_function.get_param_info()&#xD;&#xA;&#xD;&#xA;print(param_info)&#xD;&#xA;# [{'primitive': 'u32'}, {'primitive': 'u32'}]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;More information see: https://github.com/polkascan/py-substrate-interface#type-information-about-how-to-format-parameters" ContentLicense="CC BY-SA 4.0" />
  <row Id="15764" PostHistoryTypeId="6" PostId="4159" RevisionGUID="d8f237b0-0e43-4044-8762-15b3e257d674" CreationDate="2022-08-09T11:04:02.353" UserId="2025" Comment="Add right tool to the tag list" Text="|transactions|transfer|txwrapper|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15765" PostHistoryTypeId="24" PostId="4159" RevisionGUID="d8f237b0-0e43-4044-8762-15b3e257d674" CreationDate="2022-08-09T11:04:02.353" Comment="Proposed by 2025 approved by 34 edit id of 264" ContentLicense="CC BY-SA 4.0" />
  <row Id="15767" PostHistoryTypeId="5" PostId="131" RevisionGUID="c96e2aca-bf98-41a7-9b46-8ce3cfdb1689" CreationDate="2022-08-09T11:05:45.373" UserId="276" Comment="New helper function available" Text="**Update**: The `storage_function.get_param_info()` helper function is introduced, see: https://github.com/polkascan/py-substrate-interface#type-information-about-how-to-format-parameters&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;It is indeed a bit cumbersome to figure out a) what are the parameters for a storage function when this is not a primitive but a complex type and b) how to specify this that is correctly encoded.&#xD;&#xA;&#xD;&#xA;I tried to figured this out purely using the library and this resulted in the following example:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;# Retrieve storage function to get information about value and param types&#xD;&#xA;storage_function = substrate.get_metadata_storage_function(&quot;Tokens&quot;, &quot;TotalIssuance&quot;)&#xD;&#xA;&#xD;&#xA;# Amount of params&#xD;&#xA;print(len(storage_function.get_params_type_string())) # 1&#xD;&#xA;&#xD;&#xA;# Retrieve a SCALE object of the param type&#xD;&#xA;param_type = substrate.create_scale_object(storage_function.get_params_type_string()[0])&#xD;&#xA;&#xD;&#xA;# Possible options of Enum type&#xD;&#xA;print(param_type.type_mapping)&#xD;&#xA;# [('Token', 'scale_info::42'), ('DexShare', '(scale_info::43, scale_info::43)'), ('Erc20', 'scale_info::44'), ('StableAssetPoolToken', 'scale_info::4'), ('LiquidCrowdloan', 'scale_info::4'), ('ForeignAsset', 'scale_info::35')]&#xD;&#xA;&#xD;&#xA;# So if I want to use the 'Token' option: SCALE type is 'scale_info::42'&#xD;&#xA;token_param = substrate.create_scale_object(param_type.type_mapping[0][1])&#xD;&#xA;&#xD;&#xA;# Show possible options of Tokens&#xD;&#xA;print(token_param.type_mapping)&#xD;&#xA;# [('ACA', 'Null'), ('AUSD', 'Null'), ('DOT', 'Null'), ('LDOT', 'Null'), (None, 'Null'), (None, 'Null') ....&#xD;&#xA;&#xD;&#xA;# So now if I want to show the TotalIssuance of the `Token` `KSM`:&#xD;&#xA;result = substrate.query(&#xD;&#xA;    module='Tokens',&#xD;&#xA;    storage_function='TotalIssuance',&#xD;&#xA;    params=[{'Token': 'KSM'}]&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;# Result is U128 object with value 81190424615873229&#xD;&#xA;print(result.value)&#xD;&#xA;# 81190424615873229&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As said, this is not very intuitive.. &#xD;&#xA;&#xD;&#xA;It becomes more clear when using the `query_map()` function (get all results, omitting the param)&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;# Query the Mapped storage function&#xD;&#xA;result_map = substrate.query_map(module='Tokens', storage_function='TotalIssuance')&#xD;&#xA;&#xD;&#xA;print(list(result_map))&#xD;&#xA;# [[&lt;scale_info::41(value={'DexShare': ({'Token': 'KSM'}, {'Token': 'LKSM'})})&gt;, &lt;U128(value=19811150500020714)&gt;], [&lt;scale_info::41(value={'DexShare': ({'Token': 'KUSD'}, {'Token': 'BNC'})})&gt;, &lt;U128(value=2953340214648797607)&gt;], [&lt;scale_info::41(value={'DexShare': ({'Token': 'KSM'}, {'ForeignAsset': 0})})&gt;, &lt;U128(value=5454135724694137)&gt;], ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here you will see the key to use immediately. There is clearly a need for an easier way to retrieve this information from the storage function, I will submit an issue for this feature request" ContentLicense="CC BY-SA 4.0" />
  <row Id="15768" PostHistoryTypeId="5" PostId="4173" RevisionGUID="c154d1fe-de15-45a9-b9d4-8c82998cee29" CreationDate="2022-08-09T11:07:40.830" UserId="34" Comment="deleted 158 characters in body; edited tags" Text="I would like have a step by step process to get block production started with a parachain on Rococo testnet." ContentLicense="CC BY-SA 4.0" />
  <row Id="15769" PostHistoryTypeId="6" PostId="4173" RevisionGUID="c154d1fe-de15-45a9-b9d4-8c82998cee29" CreationDate="2022-08-09T11:07:40.830" UserId="34" Comment="deleted 158 characters in body; edited tags" Text="|parachain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15770" PostHistoryTypeId="4" PostId="4173" RevisionGUID="c154d1fe-de15-45a9-b9d4-8c82998cee29" CreationDate="2022-08-09T11:07:40.830" UserId="34" Comment="deleted 158 characters in body; edited tags" Text="How to start a Parachain on Rococo Testnet" ContentLicense="CC BY-SA 4.0" />
  <row Id="15773" PostHistoryTypeId="2" PostId="4201" RevisionGUID="1f1601fd-3685-4303-b145-bec356abba5d" CreationDate="2022-08-09T14:05:44.350" UserId="2307" Text="I do the same with this solver https://substrate.stackexchange.com/questions/3721/how-can-you-transfer-balances-from-one-accountid-to-another-in-substrate-runtime and also have ReservableCurrency&lt;Self::AccountId&gt; in type Currency.&#xD;&#xA;I create an nft with 100 units of BalanceOf&lt;T&gt;.But when I buy this nft, the balance in my account seems not right (image below). My balance was 1000 units before I buy. So how can I fix this bug?&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zGx1c.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15775" PostHistoryTypeId="1" PostId="4201" RevisionGUID="1f1601fd-3685-4303-b145-bec356abba5d" CreationDate="2022-08-09T14:05:44.350" UserId="2307" Text="T::Currency::transfer work not correctly" ContentLicense="CC BY-SA 4.0" />
  <row Id="15776" PostHistoryTypeId="3" PostId="4201" RevisionGUID="1f1601fd-3685-4303-b145-bec356abba5d" CreationDate="2022-08-09T14:05:44.350" UserId="2307" Text="|substrate-node|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15778" PostHistoryTypeId="5" PostId="4201" RevisionGUID="ae4df277-4817-4849-8739-e6f9c6e48a79" CreationDate="2022-08-09T14:27:59.660" UserId="2102" Comment="Update text to be more legible" Text="I do the same as https://substrate.stackexchange.com/questions/3721/how-can-you-transfer-balances-from-one-accountid-to-another-in-substrate-runtime and also have ReservableCurrency&lt;Self::AccountId&gt; in type Currency.&#xD;&#xA;I've created an NFT with 100 units of BalanceOf&lt;T&gt;. But when I try to buy this NFT, the balance in my account seems not right (image below). My balance was 1000 units before I buy. So how can I fix this bug?&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zGx1c.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15779" PostHistoryTypeId="4" PostId="4201" RevisionGUID="ae4df277-4817-4849-8739-e6f9c6e48a79" CreationDate="2022-08-09T14:27:59.660" UserId="2102" Comment="Update text to be more legible" Text="T::Currency::transfer does not work correctly" ContentLicense="CC BY-SA 4.0" />
  <row Id="15780" PostHistoryTypeId="24" PostId="4201" RevisionGUID="ae4df277-4817-4849-8739-e6f9c6e48a79" CreationDate="2022-08-09T14:27:59.660" Comment="Proposed by 2102 approved by 2307 edit id of 265" ContentLicense="CC BY-SA 4.0" />
  <row Id="15781" PostHistoryTypeId="2" PostId="4202" RevisionGUID="320a9d5a-8819-4f02-a657-5d03051dcfeb" CreationDate="2022-08-09T14:36:53.897" UserId="2102" Text="If you expected your balance to be 900 after purchasing the NFT, you need to ensure that you are actually setting the NFT value to 100 KIT units.&#xD;&#xA;&#xD;&#xA;To give you an example of what I mean, [Polkadot token decimals][1] are set to 10&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub fn polkadot_chain_spec_properties() -&gt; serde_json::map::Map&lt;String, serde_json::Value&gt; {&#xD;&#xA;	serde_json::json!({&#xD;&#xA;		&quot;tokenDecimals&quot;: 10,&#xD;&#xA;	})&#xD;&#xA;	.as_object()&#xD;&#xA;	.expect(&quot;Map given; qed&quot;)&#xD;&#xA;	.clone()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, I'm assuming that when you create the NFT, you are passing the value 100 to the extrinsic, which is not correct at all if you are using the default token decimals of the chain. &#xD;&#xA;&#xD;&#xA;The default token decimals of substrate is 12 (I think), so if you want to set your NFT value to 100 unit, you need to pass the value `100_000_000_000_000` to the extrinsic.&#xD;&#xA;&#xD;&#xA;You are also paying for fees, so the total cost of the transaction would never be 100 units, it will be a little bit more, but that's just another topic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/node/service/src/chain_spec.rs#L1073" ContentLicense="CC BY-SA 4.0" />
  <row Id="15784" PostHistoryTypeId="2" PostId="4203" RevisionGUID="84a1d2c3-ba84-4098-93a9-68aa803f9937" CreationDate="2022-08-09T15:43:26.993" UserId="2752" Text="I uploaded a smart contract to the Aleph Zero test net.&#xD;&#xA;&#xD;&#xA;When I tried to query one of the methods of said smart contract, I encountered this error:&#xD;&#xA;&lt;pre&gt;2022-08-09 09:34:28        API/INIT: RPC methods not decorated: alephNode_emergencyFinalize&#xD;&#xA;2022-08-09 09:34:28        API/INIT: aleph-node/30: Not decorating unknown runtime apis: 0x2be3f75b696ad1f6/1&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;[This post][1] answers, what the problem is, however I have problems implementing the solution.&#xD;&#xA;&#xD;&#xA;    const provider = new WsProvider('wss://ws.test.azero.dev');&#xD;&#xA;&#xD;&#xA;    const api = await ApiPromise.create({ provider,&#xD;&#xA;        rpc: {&#xD;&#xA;            firstModule: {&#xD;&#xA;                myMethod: {&#xD;&#xA;                    description: 'Returns AccountId',&#xD;&#xA;                    params: [],&#xD;&#xA;                    type: 'AccountId'&#xD;&#xA;                }&#xD;&#xA;          }&#xD;&#xA;    } });&#xD;&#xA;&#xD;&#xA;    const address = 'contract address'&#xD;&#xA;    const account = 'account address'&#xD;&#xA;&#xD;&#xA;    const contract = new ContractPromise(api, abi, address)&#xD;&#xA;&#xD;&#xA;    const gasLimit = 3000n * 1000000n;&#xD;&#xA;    const storageDepositLimit = null&#xD;&#xA;&#xD;&#xA;    const { gasRequired, storageDeposit, result, output } = await contract.query.myMethod(&#xD;&#xA;        account,&#xD;&#xA;        {&#xD;&#xA;          gasLimit,&#xD;&#xA;          storageDepositLimit,&#xD;&#xA;        }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;The code above results in the same error.&#xD;&#xA;The polkadot{.js} documentation suggests to call the custom RPC like this:&#xD;&#xA;&#xD;&#xA;    const { gasRequired, storageDeposit, result, output } = await api.rpc.firstModule.myMethod(&#xD;&#xA;        account,&#xD;&#xA;        {&#xD;&#xA;          gasLimit,&#xD;&#xA;          storageDepositLimit,&#xD;&#xA;        }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA; However, this results in this error:&#xD;&#xA;&#xD;&#xA;&gt; TypeError: api.rpc.firstModule.myMethod is not a function&#xD;&#xA;&#xD;&#xA;How can I call the method from my smart contract?&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2210/custom-rpcs-not-decorated" ContentLicense="CC BY-SA 4.0" />
  <row Id="15786" PostHistoryTypeId="1" PostId="4203" RevisionGUID="84a1d2c3-ba84-4098-93a9-68aa803f9937" CreationDate="2022-08-09T15:43:26.993" UserId="2752" Text="How to call a contract using a custom RPC?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15787" PostHistoryTypeId="3" PostId="4203" RevisionGUID="84a1d2c3-ba84-4098-93a9-68aa803f9937" CreationDate="2022-08-09T15:43:26.993" UserId="2752" Text="|polkadot-js|smart-contract|api|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15788" PostHistoryTypeId="52" PostId="4191" RevisionGUID="63511525-2d6c-4cb5-8bae-b1b1ea6da07b" CreationDate="2022-08-09T15:50:28.537" />
  <row Id="15789" PostHistoryTypeId="50" PostId="3668" RevisionGUID="c9a15acb-b8a5-49d8-9075-27e284dd9da2" CreationDate="2022-08-09T16:01:40.087" UserId="-1" />
  <row Id="15790" PostHistoryTypeId="2" PostId="4204" RevisionGUID="04d164b4-8380-4287-80e6-29c35aa084a4" CreationDate="2022-08-09T19:43:15.997" UserId="3004" Text="I am pretty new to substrate development and trying to understand substrate development. How is a pallet different from a smart contract ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="15792" PostHistoryTypeId="1" PostId="4204" RevisionGUID="04d164b4-8380-4287-80e6-29c35aa084a4" CreationDate="2022-08-09T19:43:15.997" UserId="3004" Text="How is a pallet different from a smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15793" PostHistoryTypeId="3" PostId="4204" RevisionGUID="04d164b4-8380-4287-80e6-29c35aa084a4" CreationDate="2022-08-09T19:43:15.997" UserId="3004" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15794" PostHistoryTypeId="2" PostId="4205" RevisionGUID="1eabc91c-005b-4171-b97e-245120334d96" CreationDate="2022-08-09T20:15:02.423" UserId="2752" Text="Ok, this problem was completely on me.&#xD;&#xA;&#xD;&#xA;I censored the contract address, so it is impossible to know, but &#xD;&#xA;I put in the hash for the contract and not the actual address.&#xD;&#xA;&#xD;&#xA;Changing 'address' to the actual contract address and putting a 'gasLimit'&#xD;&#xA;of 5000000000000 made the declaration of a custom RPC unnecessary and&#xD;&#xA;I was able to call the methods." ContentLicense="CC BY-SA 4.0" />
  <row Id="15796" PostHistoryTypeId="5" PostId="2081" RevisionGUID="3d9ce0d7-4ab7-4707-b49a-00878697201f" CreationDate="2022-08-09T20:35:54.233" UserId="29" Comment="deleted 100 characters in body" Text="[This](https://docs.substrate.io/v3/runtime/smart-contracts) article has quite a few strong points between smart contract vs runtime development.&#xD;&#xA;&#xD;&#xA;&gt; It aims to provide insight on reasons for choosing smart contract development over runtime development for your on-chain logic.&#xD;&#xA;&#xD;&#xA;The Polkadot wiki has some notes on this:&#xD;&#xA;- https://wiki.polkadot.network/docs/build-smart-contracts&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15797" PostHistoryTypeId="10" PostId="4204" RevisionGUID="22411e4d-3b16-492c-86b6-9a3504ab749c" CreationDate="2022-08-09T20:36:37.810" UserId="29" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[4],&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="15802" PostHistoryTypeId="2" PostId="4207" RevisionGUID="c0e9ade9-4f9a-4063-8758-fc3f8d4f2ddf" CreationDate="2022-08-09T20:58:14.357" UserId="1803" Text="The main question is whether we should whitelist RawOrigin::Root caller for benchmarks. Looking into FRAME pallets, I don't see it's whitelisted.&#xD;&#xA;&#xD;&#xA;Also, not sure that I understand what exactly whitelisting is. I assume it's about ignoring DB operations from a particular caller origin while measuring the overall extrinsic complexity. Please, correct me if I'm wrong." ContentLicense="CC BY-SA 4.0" />
  <row Id="15804" PostHistoryTypeId="1" PostId="4207" RevisionGUID="c0e9ade9-4f9a-4063-8758-fc3f8d4f2ddf" CreationDate="2022-08-09T20:58:14.357" UserId="1803" Text="Benchmarking whitelisted_caller and Root" ContentLicense="CC BY-SA 4.0" />
  <row Id="15805" PostHistoryTypeId="3" PostId="4207" RevisionGUID="c0e9ade9-4f9a-4063-8758-fc3f8d4f2ddf" CreationDate="2022-08-09T20:58:14.357" UserId="1803" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15806" PostHistoryTypeId="2" PostId="4208" RevisionGUID="b6bcb85c-5cd5-42f5-8ef9-189f3cc9ce1c" CreationDate="2022-08-09T21:06:10.900" UserId="644" Text="I try to use PolkadotJs with my website create with Vuexy React but i have this error: &#xD;&#xA;&#xD;&#xA;./node_modules/@polkadot/api/rx/Api.js 108:2&#xD;&#xA;Module parse failed: Unexpected character '#' (108:2)&#xD;&#xA;File was processed with these loaders:&#xD;&#xA; * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js&#xD;&#xA;You may need an additional loader to handle the result of these loaders.&#xD;&#xA;| &#xD;&#xA;| export class ApiRx extends ApiBase {&#xD;&#xA;&gt;   #isReadyRx;&#xD;&#xA;|   /**&#xD;&#xA;|    * @description Create an instance of the ApiRx class&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is my package.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```{&#xD;&#xA;  &quot;name&quot;: &quot;vuexy-react-admin-dashboard&quot;,&#xD;&#xA;  &quot;version&quot;: &quot;8.0.0&quot;,&#xD;&#xA;  &quot;private&quot;: true,&#xD;&#xA;  &quot;dependencies&quot;: {&#xD;&#xA;    &quot;@casl/ability&quot;: &quot;^5.4.3&quot;,&#xD;&#xA;    &quot;@casl/react&quot;: &quot;^2.3.0&quot;,&#xD;&#xA;    &quot;@craco/craco&quot;: &quot;^6.4.3&quot;,&#xD;&#xA;    &quot;@fullcalendar/core&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/daygrid&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/interaction&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/list&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/react&quot;: &quot;^5.11.1&quot;,&#xD;&#xA;    &quot;@fullcalendar/timegrid&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/timeline&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@hookform/resolvers&quot;: &quot;^2.8.10&quot;,&#xD;&#xA;    &quot;@polkadot/api&quot;: &quot;^9.1.1&quot;,&#xD;&#xA;    &quot;@popperjs/core&quot;: &quot;^2.11.3&quot;,&#xD;&#xA;    &quot;@reduxjs/toolkit&quot;: &quot;^1.2.5&quot;,&#xD;&#xA;    &quot;animate.css&quot;: &quot;4.1.1&quot;,&#xD;&#xA;    &quot;apexcharts&quot;: &quot;^3.35.2&quot;,&#xD;&#xA;    &quot;apexcharts-clevision&quot;: &quot;^3.28.5&quot;,&#xD;&#xA;    &quot;axios&quot;: &quot;^0.27.2&quot;,&#xD;&#xA;    &quot;axios-mock-adapter&quot;: &quot;^1.20.0&quot;,&#xD;&#xA;    &quot;bootstrap&quot;: &quot;5.1.0&quot;,&#xD;&#xA;    &quot;bs-stepper&quot;: &quot;1.7.0&quot;,&#xD;&#xA;    &quot;chart.js&quot;: &quot;^3.7.1&quot;,&#xD;&#xA;    &quot;classnames&quot;: &quot;2.3.1&quot;,&#xD;&#xA;    &quot;cleave.js&quot;: &quot;1.6.0&quot;,&#xD;&#xA;    &quot;draft-js&quot;: &quot;0.11.7&quot;,&#xD;&#xA;    &quot;draftjs-to-html&quot;: &quot;0.9.1&quot;,&#xD;&#xA;    &quot;file-saver&quot;: &quot;^2.0.5&quot;,&#xD;&#xA;    &quot;flatpickr&quot;: &quot;^4.6.13&quot;,&#xD;&#xA;    &quot;history&quot;: &quot;^5.3.0&quot;,&#xD;&#xA;    &quot;html-to-draftjs&quot;: &quot;1.5.0&quot;,&#xD;&#xA;    &quot;i18next&quot;: &quot;^21.8.2&quot;,&#xD;&#xA;    &quot;i18next-browser-languagedetector&quot;: &quot;^6.1.4&quot;,&#xD;&#xA;    &quot;i18next-xhr-backend&quot;: &quot;3.2.2&quot;,&#xD;&#xA;    &quot;jquery&quot;: &quot;^3.6.0&quot;,&#xD;&#xA;    &quot;jsonwebtoken&quot;: &quot;8.5.1&quot;,&#xD;&#xA;    &quot;moment&quot;: &quot;^2.29.3&quot;,&#xD;&#xA;    &quot;nouislider&quot;: &quot;^15.5.0&quot;,&#xD;&#xA;    &quot;nouislider-react&quot;: &quot;^3.4.1&quot;,&#xD;&#xA;    &quot;postcss-rtl&quot;: &quot;^1.5.0&quot;,&#xD;&#xA;    &quot;prismjs&quot;: &quot;^1.28.0&quot;,&#xD;&#xA;    &quot;prop-types&quot;: &quot;^15.8.1&quot;,&#xD;&#xA;    &quot;rc-input-number&quot;: &quot;^7.3.4&quot;,&#xD;&#xA;    &quot;react&quot;: &quot;^18.1.0&quot;,&#xD;&#xA;    &quot;react-apexcharts&quot;: &quot;^1.4.0&quot;,&#xD;&#xA;    &quot;react-chartjs-2&quot;: &quot;^4.1.0&quot;,&#xD;&#xA;    &quot;react-contexify&quot;: &quot;5.0.0&quot;,&#xD;&#xA;    &quot;react-copy-to-clipboard&quot;: &quot;^5.1.0&quot;,&#xD;&#xA;    &quot;react-country-flag&quot;: &quot;^3.0.2&quot;,&#xD;&#xA;    &quot;react-data-table-component&quot;: &quot;^7.5.2&quot;,&#xD;&#xA;    &quot;react-dom&quot;: &quot;^18.1.0&quot;,&#xD;&#xA;    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.7&quot;,&#xD;&#xA;    &quot;react-dropzone&quot;: &quot;^14.2.1&quot;,&#xD;&#xA;    &quot;react-feather&quot;: &quot;~2.0.3&quot;,&#xD;&#xA;    &quot;react-flatpickr&quot;: &quot;^3.10.12&quot;,&#xD;&#xA;    &quot;react-hook-form&quot;: &quot;^7.31.1&quot;,&#xD;&#xA;    &quot;react-hot-toast&quot;: &quot;2.2.0&quot;,&#xD;&#xA;    &quot;react-i18next&quot;: &quot;^11.16.9&quot;,&#xD;&#xA;    &quot;react-paginate&quot;: &quot;^8.1.3&quot;,&#xD;&#xA;    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,&#xD;&#xA;    &quot;react-player&quot;: &quot;^2.10.1&quot;,&#xD;&#xA;    &quot;react-rating&quot;: &quot;2.0.5&quot;,&#xD;&#xA;    &quot;react-redux&quot;: &quot;^8.0.1&quot;,&#xD;&#xA;    &quot;react-router-dom&quot;: &quot;^6.3.0&quot;,&#xD;&#xA;    &quot;react-scripts&quot;: &quot;4.0.2&quot;,&#xD;&#xA;    &quot;react-select&quot;: &quot;^5.3.2&quot;,&#xD;&#xA;    &quot;react-shepherd&quot;: &quot;3.3.6&quot;,&#xD;&#xA;    &quot;react-slidedown&quot;: &quot;^2.4.7&quot;,&#xD;&#xA;    &quot;react-sortablejs&quot;: &quot;6.0.0&quot;,&#xD;&#xA;    &quot;reactstrap&quot;: &quot;9.0.1&quot;,&#xD;&#xA;    &quot;recharts&quot;: &quot;^2.1.9&quot;,&#xD;&#xA;    &quot;redux&quot;: &quot;^4.2.0&quot;,&#xD;&#xA;    &quot;redux-debounced&quot;: &quot;0.5.0&quot;,&#xD;&#xA;    &quot;redux-thunk&quot;: &quot;^2.4.1&quot;,&#xD;&#xA;    &quot;sass&quot;: &quot;^1.51.0&quot;,&#xD;&#xA;    &quot;screenfull&quot;: &quot;5.0.2&quot;,&#xD;&#xA;    &quot;sortablejs&quot;: &quot;^1.12.0&quot;,&#xD;&#xA;    &quot;styled-components&quot;: &quot;^5.3.5&quot;,&#xD;&#xA;    &quot;sweetalert2&quot;: &quot;^11.4.14&quot;,&#xD;&#xA;    &quot;sweetalert2-react-content&quot;: &quot;^5.0.0&quot;,&#xD;&#xA;    &quot;swiper&quot;: &quot;^8.1.5&quot;,&#xD;&#xA;    &quot;wnumb&quot;: &quot;1.2.0&quot;,&#xD;&#xA;    &quot;xlsx&quot;: &quot;^0.18.5&quot;,&#xD;&#xA;    &quot;yarn&quot;: &quot;^1.22.18&quot;,&#xD;&#xA;    &quot;yup&quot;: &quot;^0.32.11&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;scripts&quot;: {&#xD;&#xA;    &quot;start&quot;: &quot;craco start&quot;,&#xD;&#xA;    &quot;build&quot;: &quot;craco build&quot;,&#xD;&#xA;    &quot;test&quot;: &quot;craco test&quot;,&#xD;&#xA;    &quot;eject&quot;: &quot;react-scripts eject&quot;,&#xD;&#xA;    &quot;format&quot;: &quot;prettier --write \&quot;src/**/*.js\&quot;&quot;,&#xD;&#xA;    &quot;lint&quot;: &quot;eslint src/**/*.js src/**/*.js&quot;,&#xD;&#xA;    &quot;lint:fix&quot;: &quot;eslint src/**/*.js --fix&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;eslintConfig&quot;: {&#xD;&#xA;    &quot;extends&quot;: &quot;react-app&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;devDependencies&quot;: {&#xD;&#xA;    &quot;@types/sortablejs&quot;: &quot;^1.10.6&quot;,&#xD;&#xA;    &quot;eslint&quot;: &quot;^8.15.0&quot;,&#xD;&#xA;    &quot;eslint-plugin-import&quot;: &quot;^2.26.0&quot;,&#xD;&#xA;    &quot;eslint-plugin-react&quot;: &quot;^7.29.4&quot;,&#xD;&#xA;    &quot;prettier&quot;: &quot;^2.6.2&quot;,&#xD;&#xA;    &quot;sass-loader&quot;: &quot;^12.6.0&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;browserslist&quot;: {&#xD;&#xA;    &quot;production&quot;: [&#xD;&#xA;      &quot;&gt;0.2%&quot;,&#xD;&#xA;      &quot;not dead&quot;,&#xD;&#xA;      &quot;not op_mini all&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;development&quot;: [&#xD;&#xA;      &quot;last 1 chrome version&quot;,&#xD;&#xA;      &quot;last 1 firefox version&quot;,&#xD;&#xA;      &quot;last 1 safari version&quot;&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;resolutions&quot;: {&#xD;&#xA;    &quot;react-error-overlay&quot;: &quot;6.0.9&quot;,&#xD;&#xA;    &quot;react-scripts/postcss-preset-env/postcss-custom-properties&quot;: &quot;^10.0.0&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;homepage&quot;: &quot;&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;craco.config.js&#xD;&#xA;```&#xD;&#xA;const path = require('path')&#xD;&#xA;&#xD;&#xA;module.exports = {&#xD;&#xA;  reactScriptsVersion: 'react-scripts',&#xD;&#xA;  style: {&#xD;&#xA;    sass: {&#xD;&#xA;      loaderOptions: {&#xD;&#xA;        sassOptions: {&#xD;&#xA;          includePaths: ['node_modules', 'src/assets']&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    postcss: {&#xD;&#xA;      plugins: [require('postcss-rtl')()]&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  webpack: {&#xD;&#xA;    alias: {&#xD;&#xA;      '@src': path.resolve(__dirname, 'src'),&#xD;&#xA;      '@assets': path.resolve(__dirname, 'src/@core/assets'),&#xD;&#xA;      '@components': path.resolve(__dirname, 'src/@core/components'),&#xD;&#xA;      '@layouts': path.resolve(__dirname, 'src/@core/layouts'),&#xD;&#xA;      '@store': path.resolve(__dirname, 'src/redux'),&#xD;&#xA;      '@styles': path.resolve(__dirname, 'src/@core/scss'),&#xD;&#xA;      '@configs': path.resolve(__dirname, 'src/configs'),&#xD;&#xA;      '@utils': path.resolve(__dirname, 'src/utility/Utils'),&#xD;&#xA;      '@hooks': path.resolve(__dirname, 'src/utility/hooks')&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15808" PostHistoryTypeId="1" PostId="4208" RevisionGUID="b6bcb85c-5cd5-42f5-8ef9-189f3cc9ce1c" CreationDate="2022-08-09T21:06:10.900" UserId="644" Text="Integrate @polkadot/api with Vuexy React Template" ContentLicense="CC BY-SA 4.0" />
  <row Id="15809" PostHistoryTypeId="3" PostId="4208" RevisionGUID="b6bcb85c-5cd5-42f5-8ef9-189f3cc9ce1c" CreationDate="2022-08-09T21:06:10.900" UserId="644" Text="|polkadot-js|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15810" PostHistoryTypeId="5" PostId="4208" RevisionGUID="f497f49b-85bb-4164-bfc9-220e2022ddfb" CreationDate="2022-08-09T21:34:48.467" UserId="644" Comment="added 96 characters in body" Text="I try to use PolkadotJs with my website create with Vuexy React but i have this error: &#xD;&#xA;&#xD;&#xA;./node_modules/@polkadot/api/rx/Api.js 108:2&#xD;&#xA;Module parse failed: Unexpected character '#' (108:2)&#xD;&#xA;File was processed with these loaders:&#xD;&#xA; * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js&#xD;&#xA;You may need an additional loader to handle the result of these loaders.&#xD;&#xA;| &#xD;&#xA;| export class ApiRx extends ApiBase {&#xD;&#xA;&gt;   #isReadyRx;&#xD;&#xA;|   /**&#xD;&#xA;|    * @description Create an instance of the ApiRx class&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is my package.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```{&#xD;&#xA;  &quot;name&quot;: &quot;vuexy-react-admin-dashboard&quot;,&#xD;&#xA;  &quot;version&quot;: &quot;8.0.0&quot;,&#xD;&#xA;  &quot;private&quot;: true,&#xD;&#xA;  &quot;dependencies&quot;: {&#xD;&#xA;    &quot;@casl/ability&quot;: &quot;^5.4.3&quot;,&#xD;&#xA;    &quot;@casl/react&quot;: &quot;^2.3.0&quot;,&#xD;&#xA;    &quot;@craco/craco&quot;: &quot;^6.4.3&quot;,&#xD;&#xA;    &quot;@fullcalendar/core&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/daygrid&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/interaction&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/list&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/react&quot;: &quot;^5.11.1&quot;,&#xD;&#xA;    &quot;@fullcalendar/timegrid&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/timeline&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@hookform/resolvers&quot;: &quot;^2.8.10&quot;,&#xD;&#xA;    &quot;@polkadot/api&quot;: &quot;^9.1.1&quot;,&#xD;&#xA;    &quot;@popperjs/core&quot;: &quot;^2.11.3&quot;,&#xD;&#xA;    &quot;@reduxjs/toolkit&quot;: &quot;^1.2.5&quot;,&#xD;&#xA;    &quot;animate.css&quot;: &quot;4.1.1&quot;,&#xD;&#xA;    &quot;apexcharts&quot;: &quot;^3.35.2&quot;,&#xD;&#xA;    &quot;apexcharts-clevision&quot;: &quot;^3.28.5&quot;,&#xD;&#xA;    &quot;axios&quot;: &quot;^0.27.2&quot;,&#xD;&#xA;    &quot;axios-mock-adapter&quot;: &quot;^1.20.0&quot;,&#xD;&#xA;    &quot;bootstrap&quot;: &quot;5.1.0&quot;,&#xD;&#xA;    &quot;bs-stepper&quot;: &quot;1.7.0&quot;,&#xD;&#xA;    &quot;chart.js&quot;: &quot;^3.7.1&quot;,&#xD;&#xA;    &quot;classnames&quot;: &quot;2.3.1&quot;,&#xD;&#xA;    &quot;cleave.js&quot;: &quot;1.6.0&quot;,&#xD;&#xA;    &quot;draft-js&quot;: &quot;0.11.7&quot;,&#xD;&#xA;    &quot;draftjs-to-html&quot;: &quot;0.9.1&quot;,&#xD;&#xA;    &quot;file-saver&quot;: &quot;^2.0.5&quot;,&#xD;&#xA;    &quot;flatpickr&quot;: &quot;^4.6.13&quot;,&#xD;&#xA;    &quot;history&quot;: &quot;^5.3.0&quot;,&#xD;&#xA;    &quot;html-to-draftjs&quot;: &quot;1.5.0&quot;,&#xD;&#xA;    &quot;i18next&quot;: &quot;^21.8.2&quot;,&#xD;&#xA;    &quot;i18next-browser-languagedetector&quot;: &quot;^6.1.4&quot;,&#xD;&#xA;    &quot;i18next-xhr-backend&quot;: &quot;3.2.2&quot;,&#xD;&#xA;    &quot;jquery&quot;: &quot;^3.6.0&quot;,&#xD;&#xA;    &quot;jsonwebtoken&quot;: &quot;8.5.1&quot;,&#xD;&#xA;    &quot;moment&quot;: &quot;^2.29.3&quot;,&#xD;&#xA;    &quot;nouislider&quot;: &quot;^15.5.0&quot;,&#xD;&#xA;    &quot;nouislider-react&quot;: &quot;^3.4.1&quot;,&#xD;&#xA;    &quot;postcss-rtl&quot;: &quot;^1.5.0&quot;,&#xD;&#xA;    &quot;prismjs&quot;: &quot;^1.28.0&quot;,&#xD;&#xA;    &quot;prop-types&quot;: &quot;^15.8.1&quot;,&#xD;&#xA;    &quot;rc-input-number&quot;: &quot;^7.3.4&quot;,&#xD;&#xA;    &quot;react&quot;: &quot;^18.1.0&quot;,&#xD;&#xA;    &quot;react-apexcharts&quot;: &quot;^1.4.0&quot;,&#xD;&#xA;    &quot;react-chartjs-2&quot;: &quot;^4.1.0&quot;,&#xD;&#xA;    &quot;react-contexify&quot;: &quot;5.0.0&quot;,&#xD;&#xA;    &quot;react-copy-to-clipboard&quot;: &quot;^5.1.0&quot;,&#xD;&#xA;    &quot;react-country-flag&quot;: &quot;^3.0.2&quot;,&#xD;&#xA;    &quot;react-data-table-component&quot;: &quot;^7.5.2&quot;,&#xD;&#xA;    &quot;react-dom&quot;: &quot;^18.1.0&quot;,&#xD;&#xA;    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.7&quot;,&#xD;&#xA;    &quot;react-dropzone&quot;: &quot;^14.2.1&quot;,&#xD;&#xA;    &quot;react-feather&quot;: &quot;~2.0.3&quot;,&#xD;&#xA;    &quot;react-flatpickr&quot;: &quot;^3.10.12&quot;,&#xD;&#xA;    &quot;react-hook-form&quot;: &quot;^7.31.1&quot;,&#xD;&#xA;    &quot;react-hot-toast&quot;: &quot;2.2.0&quot;,&#xD;&#xA;    &quot;react-i18next&quot;: &quot;^11.16.9&quot;,&#xD;&#xA;    &quot;react-paginate&quot;: &quot;^8.1.3&quot;,&#xD;&#xA;    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,&#xD;&#xA;    &quot;react-player&quot;: &quot;^2.10.1&quot;,&#xD;&#xA;    &quot;react-rating&quot;: &quot;2.0.5&quot;,&#xD;&#xA;    &quot;react-redux&quot;: &quot;^8.0.1&quot;,&#xD;&#xA;    &quot;react-router-dom&quot;: &quot;^6.3.0&quot;,&#xD;&#xA;    &quot;react-scripts&quot;: &quot;4.0.2&quot;,&#xD;&#xA;    &quot;react-select&quot;: &quot;^5.3.2&quot;,&#xD;&#xA;    &quot;react-shepherd&quot;: &quot;3.3.6&quot;,&#xD;&#xA;    &quot;react-slidedown&quot;: &quot;^2.4.7&quot;,&#xD;&#xA;    &quot;react-sortablejs&quot;: &quot;6.0.0&quot;,&#xD;&#xA;    &quot;reactstrap&quot;: &quot;9.0.1&quot;,&#xD;&#xA;    &quot;recharts&quot;: &quot;^2.1.9&quot;,&#xD;&#xA;    &quot;redux&quot;: &quot;^4.2.0&quot;,&#xD;&#xA;    &quot;redux-debounced&quot;: &quot;0.5.0&quot;,&#xD;&#xA;    &quot;redux-thunk&quot;: &quot;^2.4.1&quot;,&#xD;&#xA;    &quot;sass&quot;: &quot;^1.51.0&quot;,&#xD;&#xA;    &quot;screenfull&quot;: &quot;5.0.2&quot;,&#xD;&#xA;    &quot;sortablejs&quot;: &quot;^1.12.0&quot;,&#xD;&#xA;    &quot;styled-components&quot;: &quot;^5.3.5&quot;,&#xD;&#xA;    &quot;sweetalert2&quot;: &quot;^11.4.14&quot;,&#xD;&#xA;    &quot;sweetalert2-react-content&quot;: &quot;^5.0.0&quot;,&#xD;&#xA;    &quot;swiper&quot;: &quot;^8.1.5&quot;,&#xD;&#xA;    &quot;wnumb&quot;: &quot;1.2.0&quot;,&#xD;&#xA;    &quot;xlsx&quot;: &quot;^0.18.5&quot;,&#xD;&#xA;    &quot;yarn&quot;: &quot;^1.22.18&quot;,&#xD;&#xA;    &quot;yup&quot;: &quot;^0.32.11&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;scripts&quot;: {&#xD;&#xA;    &quot;start&quot;: &quot;craco start&quot;,&#xD;&#xA;    &quot;build&quot;: &quot;craco build&quot;,&#xD;&#xA;    &quot;test&quot;: &quot;craco test&quot;,&#xD;&#xA;    &quot;eject&quot;: &quot;react-scripts eject&quot;,&#xD;&#xA;    &quot;format&quot;: &quot;prettier --write \&quot;src/**/*.js\&quot;&quot;,&#xD;&#xA;    &quot;lint&quot;: &quot;eslint src/**/*.js src/**/*.js&quot;,&#xD;&#xA;    &quot;lint:fix&quot;: &quot;eslint src/**/*.js --fix&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;eslintConfig&quot;: {&#xD;&#xA;    &quot;extends&quot;: &quot;react-app&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;devDependencies&quot;: {&#xD;&#xA;    &quot;@types/sortablejs&quot;: &quot;^1.10.6&quot;,&#xD;&#xA;    &quot;eslint&quot;: &quot;^8.15.0&quot;,&#xD;&#xA;    &quot;eslint-plugin-import&quot;: &quot;^2.26.0&quot;,&#xD;&#xA;    &quot;eslint-plugin-react&quot;: &quot;^7.29.4&quot;,&#xD;&#xA;    &quot;prettier&quot;: &quot;^2.6.2&quot;,&#xD;&#xA;    &quot;sass-loader&quot;: &quot;^12.6.0&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;browserslist&quot;: {&#xD;&#xA;    &quot;production&quot;: [&#xD;&#xA;      &quot;&gt;0.2%&quot;,&#xD;&#xA;      &quot;not dead&quot;,&#xD;&#xA;      &quot;not op_mini all&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;development&quot;: [&#xD;&#xA;      &quot;last 1 chrome version&quot;,&#xD;&#xA;      &quot;last 1 firefox version&quot;,&#xD;&#xA;      &quot;last 1 safari version&quot;&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;resolutions&quot;: {&#xD;&#xA;    &quot;react-error-overlay&quot;: &quot;6.0.9&quot;,&#xD;&#xA;    &quot;react-scripts/postcss-preset-env/postcss-custom-properties&quot;: &quot;^10.0.0&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;homepage&quot;: &quot;&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;craco.config.js&#xD;&#xA;```&#xD;&#xA;const path = require('path')&#xD;&#xA;&#xD;&#xA;module.exports = {&#xD;&#xA;  reactScriptsVersion: 'react-scripts',&#xD;&#xA;  style: {&#xD;&#xA;    sass: {&#xD;&#xA;      loaderOptions: {&#xD;&#xA;        sassOptions: {&#xD;&#xA;          includePaths: ['node_modules', 'src/assets']&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    postcss: {&#xD;&#xA;      plugins: [require('postcss-rtl')()]&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  babel: {&#xD;&#xA;    plugins: [[&quot;@babel/plugin-proposal-private-methods&quot;, { &quot;loose&quot;: true }]]&#xD;&#xA;  },&#xD;&#xA;  webpack: {&#xD;&#xA;    alias: {&#xD;&#xA;      '@src': path.resolve(__dirname, 'src'),&#xD;&#xA;      '@assets': path.resolve(__dirname, 'src/@core/assets'),&#xD;&#xA;      '@components': path.resolve(__dirname, 'src/@core/components'),&#xD;&#xA;      '@layouts': path.resolve(__dirname, 'src/@core/layouts'),&#xD;&#xA;      '@store': path.resolve(__dirname, 'src/redux'),&#xD;&#xA;      '@styles': path.resolve(__dirname, 'src/@core/scss'),&#xD;&#xA;      '@configs': path.resolve(__dirname, 'src/configs'),&#xD;&#xA;      '@utils': path.resolve(__dirname, 'src/utility/Utils'),&#xD;&#xA;      '@hooks': path.resolve(__dirname, 'src/utility/hooks')&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15811" PostHistoryTypeId="5" PostId="4208" RevisionGUID="067c0841-59cd-4aa2-b33e-f74bf855d443" CreationDate="2022-08-09T22:54:11.150" UserId="644" Comment="added 119 characters in body" Text="I try to use PolkadotJs with my website create with Vuexy React but i have this error: &#xD;&#xA;./node_modules/@polkadot/api/packageInfo.js 6:14&#xD;&#xA;Module parse failed: Unexpected token (6:14)&#xD;&#xA;File was processed with these loaders:&#xD;&#xA; * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js&#xD;&#xA;You may need an additional loader to handle the result of these loaders.&#xD;&#xA;| export const packageInfo = {&#xD;&#xA;|   name: '@polkadot/api',&#xD;&#xA;&gt;   path: import.meta &amp;&amp; import.meta.url ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',&#xD;&#xA;|   type: 'esm',&#xD;&#xA;|   version: '9.1.1'&#xD;&#xA;&#xD;&#xA;This is my package.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```{&#xD;&#xA;  &quot;name&quot;: &quot;vuexy-react-admin-dashboard&quot;,&#xD;&#xA;  &quot;version&quot;: &quot;8.0.0&quot;,&#xD;&#xA;  &quot;private&quot;: true,&#xD;&#xA;  &quot;dependencies&quot;: {&#xD;&#xA;    &quot;@casl/ability&quot;: &quot;^5.4.3&quot;,&#xD;&#xA;    &quot;@casl/react&quot;: &quot;^2.3.0&quot;,&#xD;&#xA;    &quot;@craco/craco&quot;: &quot;^6.4.3&quot;,&#xD;&#xA;    &quot;@fullcalendar/core&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/daygrid&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/interaction&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/list&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/react&quot;: &quot;^5.11.1&quot;,&#xD;&#xA;    &quot;@fullcalendar/timegrid&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@fullcalendar/timeline&quot;: &quot;^5.11.0&quot;,&#xD;&#xA;    &quot;@hookform/resolvers&quot;: &quot;^2.8.10&quot;,&#xD;&#xA;    &quot;@polkadot/api&quot;: &quot;^9.1.1&quot;,&#xD;&#xA;    &quot;@popperjs/core&quot;: &quot;^2.11.3&quot;,&#xD;&#xA;    &quot;@reduxjs/toolkit&quot;: &quot;^1.2.5&quot;,&#xD;&#xA;    &quot;animate.css&quot;: &quot;4.1.1&quot;,&#xD;&#xA;    &quot;apexcharts&quot;: &quot;^3.35.2&quot;,&#xD;&#xA;    &quot;apexcharts-clevision&quot;: &quot;^3.28.5&quot;,&#xD;&#xA;    &quot;axios&quot;: &quot;^0.27.2&quot;,&#xD;&#xA;    &quot;axios-mock-adapter&quot;: &quot;^1.20.0&quot;,&#xD;&#xA;    &quot;bootstrap&quot;: &quot;5.1.0&quot;,&#xD;&#xA;    &quot;bs-stepper&quot;: &quot;1.7.0&quot;,&#xD;&#xA;    &quot;chart.js&quot;: &quot;^3.7.1&quot;,&#xD;&#xA;    &quot;classnames&quot;: &quot;2.3.1&quot;,&#xD;&#xA;    &quot;cleave.js&quot;: &quot;1.6.0&quot;,&#xD;&#xA;    &quot;draft-js&quot;: &quot;0.11.7&quot;,&#xD;&#xA;    &quot;draftjs-to-html&quot;: &quot;0.9.1&quot;,&#xD;&#xA;    &quot;file-saver&quot;: &quot;^2.0.5&quot;,&#xD;&#xA;    &quot;flatpickr&quot;: &quot;^4.6.13&quot;,&#xD;&#xA;    &quot;history&quot;: &quot;^5.3.0&quot;,&#xD;&#xA;    &quot;html-to-draftjs&quot;: &quot;1.5.0&quot;,&#xD;&#xA;    &quot;i18next&quot;: &quot;^21.8.2&quot;,&#xD;&#xA;    &quot;i18next-browser-languagedetector&quot;: &quot;^6.1.4&quot;,&#xD;&#xA;    &quot;i18next-xhr-backend&quot;: &quot;3.2.2&quot;,&#xD;&#xA;    &quot;jquery&quot;: &quot;^3.6.0&quot;,&#xD;&#xA;    &quot;jsonwebtoken&quot;: &quot;8.5.1&quot;,&#xD;&#xA;    &quot;moment&quot;: &quot;^2.29.3&quot;,&#xD;&#xA;    &quot;nouislider&quot;: &quot;^15.5.0&quot;,&#xD;&#xA;    &quot;nouislider-react&quot;: &quot;^3.4.1&quot;,&#xD;&#xA;    &quot;postcss-rtl&quot;: &quot;^1.5.0&quot;,&#xD;&#xA;    &quot;prismjs&quot;: &quot;^1.28.0&quot;,&#xD;&#xA;    &quot;prop-types&quot;: &quot;^15.8.1&quot;,&#xD;&#xA;    &quot;rc-input-number&quot;: &quot;^7.3.4&quot;,&#xD;&#xA;    &quot;react&quot;: &quot;^18.1.0&quot;,&#xD;&#xA;    &quot;react-apexcharts&quot;: &quot;^1.4.0&quot;,&#xD;&#xA;    &quot;react-chartjs-2&quot;: &quot;^4.1.0&quot;,&#xD;&#xA;    &quot;react-contexify&quot;: &quot;5.0.0&quot;,&#xD;&#xA;    &quot;react-copy-to-clipboard&quot;: &quot;^5.1.0&quot;,&#xD;&#xA;    &quot;react-country-flag&quot;: &quot;^3.0.2&quot;,&#xD;&#xA;    &quot;react-data-table-component&quot;: &quot;^7.5.2&quot;,&#xD;&#xA;    &quot;react-dom&quot;: &quot;^18.1.0&quot;,&#xD;&#xA;    &quot;react-draft-wysiwyg&quot;: &quot;^1.14.7&quot;,&#xD;&#xA;    &quot;react-dropzone&quot;: &quot;^14.2.1&quot;,&#xD;&#xA;    &quot;react-feather&quot;: &quot;~2.0.3&quot;,&#xD;&#xA;    &quot;react-flatpickr&quot;: &quot;^3.10.12&quot;,&#xD;&#xA;    &quot;react-hook-form&quot;: &quot;^7.31.1&quot;,&#xD;&#xA;    &quot;react-hot-toast&quot;: &quot;2.2.0&quot;,&#xD;&#xA;    &quot;react-i18next&quot;: &quot;^11.16.9&quot;,&#xD;&#xA;    &quot;react-paginate&quot;: &quot;^8.1.3&quot;,&#xD;&#xA;    &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,&#xD;&#xA;    &quot;react-player&quot;: &quot;^2.10.1&quot;,&#xD;&#xA;    &quot;react-rating&quot;: &quot;2.0.5&quot;,&#xD;&#xA;    &quot;react-redux&quot;: &quot;^8.0.1&quot;,&#xD;&#xA;    &quot;react-router-dom&quot;: &quot;^6.3.0&quot;,&#xD;&#xA;    &quot;react-scripts&quot;: &quot;4.0.2&quot;,&#xD;&#xA;    &quot;react-select&quot;: &quot;^5.3.2&quot;,&#xD;&#xA;    &quot;react-shepherd&quot;: &quot;3.3.6&quot;,&#xD;&#xA;    &quot;react-slidedown&quot;: &quot;^2.4.7&quot;,&#xD;&#xA;    &quot;react-sortablejs&quot;: &quot;6.0.0&quot;,&#xD;&#xA;    &quot;reactstrap&quot;: &quot;9.0.1&quot;,&#xD;&#xA;    &quot;recharts&quot;: &quot;^2.1.9&quot;,&#xD;&#xA;    &quot;redux&quot;: &quot;^4.2.0&quot;,&#xD;&#xA;    &quot;redux-debounced&quot;: &quot;0.5.0&quot;,&#xD;&#xA;    &quot;redux-thunk&quot;: &quot;^2.4.1&quot;,&#xD;&#xA;    &quot;sass&quot;: &quot;^1.51.0&quot;,&#xD;&#xA;    &quot;screenfull&quot;: &quot;5.0.2&quot;,&#xD;&#xA;    &quot;sortablejs&quot;: &quot;^1.12.0&quot;,&#xD;&#xA;    &quot;styled-components&quot;: &quot;^5.3.5&quot;,&#xD;&#xA;    &quot;sweetalert2&quot;: &quot;^11.4.14&quot;,&#xD;&#xA;    &quot;sweetalert2-react-content&quot;: &quot;^5.0.0&quot;,&#xD;&#xA;    &quot;swiper&quot;: &quot;^8.1.5&quot;,&#xD;&#xA;    &quot;wnumb&quot;: &quot;1.2.0&quot;,&#xD;&#xA;    &quot;xlsx&quot;: &quot;^0.18.5&quot;,&#xD;&#xA;    &quot;yarn&quot;: &quot;^1.22.18&quot;,&#xD;&#xA;    &quot;yup&quot;: &quot;^0.32.11&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;scripts&quot;: {&#xD;&#xA;    &quot;start&quot;: &quot;craco start&quot;,&#xD;&#xA;    &quot;build&quot;: &quot;craco build&quot;,&#xD;&#xA;    &quot;test&quot;: &quot;craco test&quot;,&#xD;&#xA;    &quot;eject&quot;: &quot;react-scripts eject&quot;,&#xD;&#xA;    &quot;format&quot;: &quot;prettier --write \&quot;src/**/*.js\&quot;&quot;,&#xD;&#xA;    &quot;lint&quot;: &quot;eslint src/**/*.js src/**/*.js&quot;,&#xD;&#xA;    &quot;lint:fix&quot;: &quot;eslint src/**/*.js --fix&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;eslintConfig&quot;: {&#xD;&#xA;    &quot;extends&quot;: &quot;react-app&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;devDependencies&quot;: {&#xD;&#xA;    &quot;@types/sortablejs&quot;: &quot;^1.10.6&quot;,&#xD;&#xA;    &quot;eslint&quot;: &quot;^8.15.0&quot;,&#xD;&#xA;    &quot;eslint-plugin-import&quot;: &quot;^2.26.0&quot;,&#xD;&#xA;    &quot;eslint-plugin-react&quot;: &quot;^7.29.4&quot;,&#xD;&#xA;    &quot;prettier&quot;: &quot;^2.6.2&quot;,&#xD;&#xA;    &quot;sass-loader&quot;: &quot;^12.6.0&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;browserslist&quot;: {&#xD;&#xA;    &quot;production&quot;: [&#xD;&#xA;      &quot;&gt;0.2%&quot;,&#xD;&#xA;      &quot;not dead&quot;,&#xD;&#xA;      &quot;not op_mini all&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;development&quot;: [&#xD;&#xA;      &quot;last 1 chrome version&quot;,&#xD;&#xA;      &quot;last 1 firefox version&quot;,&#xD;&#xA;      &quot;last 1 safari version&quot;&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;resolutions&quot;: {&#xD;&#xA;    &quot;react-error-overlay&quot;: &quot;6.0.9&quot;,&#xD;&#xA;    &quot;react-scripts/postcss-preset-env/postcss-custom-properties&quot;: &quot;^10.0.0&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;homepage&quot;: &quot;&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;craco.config.js&#xD;&#xA;```&#xD;&#xA;const path = require('path')&#xD;&#xA;&#xD;&#xA;module.exports = {&#xD;&#xA;  reactScriptsVersion: 'react-scripts',&#xD;&#xA;  style: {&#xD;&#xA;    sass: {&#xD;&#xA;      loaderOptions: {&#xD;&#xA;        sassOptions: {&#xD;&#xA;          includePaths: ['node_modules', 'src/assets']&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    postcss: {&#xD;&#xA;      plugins: [require('postcss-rtl')()]&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  babel: {&#xD;&#xA;    plugins: [[&quot;@babel/plugin-proposal-private-methods&quot;, { &quot;loose&quot;: true }]]&#xD;&#xA;  },&#xD;&#xA;  webpack: {&#xD;&#xA;    alias: {&#xD;&#xA;      '@src': path.resolve(__dirname, 'src'),&#xD;&#xA;      '@assets': path.resolve(__dirname, 'src/@core/assets'),&#xD;&#xA;      '@components': path.resolve(__dirname, 'src/@core/components'),&#xD;&#xA;      '@layouts': path.resolve(__dirname, 'src/@core/layouts'),&#xD;&#xA;      '@store': path.resolve(__dirname, 'src/redux'),&#xD;&#xA;      '@styles': path.resolve(__dirname, 'src/@core/scss'),&#xD;&#xA;      '@configs': path.resolve(__dirname, 'src/configs'),&#xD;&#xA;      '@utils': path.resolve(__dirname, 'src/utility/Utils'),&#xD;&#xA;      '@hooks': path.resolve(__dirname, 'src/utility/hooks')&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15812" PostHistoryTypeId="2" PostId="4209" RevisionGUID="4abb8b9b-b5b0-4e2e-bd25-927f45cfa227" CreationDate="2022-08-10T02:21:23.613" UserId="3009" Text="I followed the answer of &quot;[how to verify a signature in a pallet][1]&quot;, and try to verify some data signed by a private key on chain logic.&#xD;&#xA;&#xD;&#xA;    	#[pallet::weight(10_000)]&#xD;&#xA;		pub fn my_verify(origin: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: T::Signature, from: T::PublicKey) -&gt; DispatchResult{&#xD;&#xA;			log::info!(&quot;--------public key is {:?}&quot;, from.clone().into_account());&#xD;&#xA;			log::info!(&quot;--------signature is {:?}&quot;, sig.clone());&#xD;&#xA;			log::info!(&quot;--------data is {:?}&quot;, data.clone());&#xD;&#xA;&#xD;&#xA;			let ok = sig.verify(&amp;data[..], &amp;from.into_account());&#xD;&#xA;			// `ok` is a bool. Use in an `if` or `ensure!`.&#xD;&#xA;			ensure!(ok, &lt;Error&lt;T&gt;&gt;::SignatureVerifyError);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;but I got false from sig.verify(). My config is exactly the same as the question's answer.&#xD;&#xA;&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// A Signature can be verified with a specific `PublicKey`.&#xD;&#xA;		/// The additional traits are boilerplate.&#xD;&#xA;		type Signature: Verify&lt;Signer = Self::PublicKey&gt; + Encode + Decode + Member + TypeInfo;&#xD;&#xA;&#xD;&#xA;		/// A PublicKey can be converted into an `AccountId`. This is required by the&#xD;&#xA;		/// `Signature` type.&#xD;&#xA;		/// The additional traits are boilerplate.&#xD;&#xA;		type PublicKey: IdentifyAccount&lt;AccountId = Self::PublicKey&gt; + Encode + Decode + Member + TypeInfo;&#xD;&#xA;&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxMinersOwned: Get&lt;u32&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type EpochCycle: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;and runtime config is like this:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    impl pallet_xenon::Config for Runtime {&#xD;&#xA;	type Signature = sp_core::sr25519::Signature;&#xD;&#xA;	type PublicKey = sp_core::sr25519::Public;&#xD;&#xA;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type MaxMinersOwned = MaxMinersOwned;&#xD;&#xA;	type EpochCycle = EpochCycle;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;So what mistake did I make? Help!!! Please!!!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/questions/305/how-to-verify-a-signature-in-a-pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="15814" PostHistoryTypeId="1" PostId="4209" RevisionGUID="4abb8b9b-b5b0-4e2e-bd25-927f45cfa227" CreationDate="2022-08-10T02:21:23.613" UserId="3009" Text="verify a signature in pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="15815" PostHistoryTypeId="3" PostId="4209" RevisionGUID="4abb8b9b-b5b0-4e2e-bd25-927f45cfa227" CreationDate="2022-08-10T02:21:23.613" UserId="3009" Text="|pallet|cryptography|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15816" PostHistoryTypeId="5" PostId="4209" RevisionGUID="403163cd-44ce-42d4-bb97-7b1223ba6615" CreationDate="2022-08-10T02:42:32.513" UserId="3009" Comment="added 4 characters in body" Text="I followed the answer of &quot;[how to verify a signature in a pallet][1]&quot;, and try to verify some data signed by a private key on chain logic.&#xD;&#xA;&#xD;&#xA;    	#[pallet::weight(10_000)]&#xD;&#xA;		pub fn my_verify(origin: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: T::Signature, from: T::PublicKey) -&gt; DispatchResult{&#xD;&#xA;			log::info!(&quot;--------public key is {:?}&quot;, from.clone().into_account());&#xD;&#xA;			log::info!(&quot;--------signature is {:?}&quot;, sig.clone());&#xD;&#xA;			log::info!(&quot;--------data is {:?}&quot;, data.clone());&#xD;&#xA;&#xD;&#xA;			let ok = sig.verify(&amp;data[..], &amp;from.into_account());&#xD;&#xA;			// `ok` is a bool. Use in an `if` or `ensure!`.&#xD;&#xA;			ensure!(ok, &lt;Error&lt;T&gt;&gt;::SignatureVerifyError);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;but I got **false** from sig.verify(). My config is exactly the same as the question's answer.&#xD;&#xA;&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// A Signature can be verified with a specific `PublicKey`.&#xD;&#xA;		/// The additional traits are boilerplate.&#xD;&#xA;		type Signature: Verify&lt;Signer = Self::PublicKey&gt; + Encode + Decode + Member + TypeInfo;&#xD;&#xA;&#xD;&#xA;		/// A PublicKey can be converted into an `AccountId`. This is required by the&#xD;&#xA;		/// `Signature` type.&#xD;&#xA;		/// The additional traits are boilerplate.&#xD;&#xA;		type PublicKey: IdentifyAccount&lt;AccountId = Self::PublicKey&gt; + Encode + Decode + Member + TypeInfo;&#xD;&#xA;&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxMinersOwned: Get&lt;u32&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type EpochCycle: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;and runtime config is like this:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    impl pallet_xenon::Config for Runtime {&#xD;&#xA;	type Signature = sp_core::sr25519::Signature;&#xD;&#xA;	type PublicKey = sp_core::sr25519::Public;&#xD;&#xA;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type MaxMinersOwned = MaxMinersOwned;&#xD;&#xA;	type EpochCycle = EpochCycle;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;So what mistake did I make? Help!!! Please!!!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/questions/305/how-to-verify-a-signature-in-a-pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="15817" PostHistoryTypeId="5" PostId="4209" RevisionGUID="ea7d6d05-3004-46b8-a84e-df1e8b71c412" CreationDate="2022-08-10T02:48:37.743" UserId="3009" Comment="added 133 characters in body" Text="I followed the answer of &quot;[how to verify a signature in a pallet][1]&quot;, and try to verify some data signed by a private key on chain logic.&#xD;&#xA;&#xD;&#xA;    	#[pallet::weight(10_000)]&#xD;&#xA;		pub fn my_verify(origin: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: T::Signature, from: T::PublicKey) -&gt; DispatchResult{&#xD;&#xA;			log::info!(&quot;--------public key is {:?}&quot;, from.clone().into_account());&#xD;&#xA;			log::info!(&quot;--------signature is {:?}&quot;, sig.clone());&#xD;&#xA;			log::info!(&quot;--------data is {:?}&quot;, data.clone());&#xD;&#xA;&#xD;&#xA;			let ok = sig.verify(&amp;data[..], &amp;from.into_account());&#xD;&#xA;			// `ok` is a bool. Use in an `if` or `ensure!`.&#xD;&#xA;			ensure!(ok, &lt;Error&lt;T&gt;&gt;::SignatureVerifyError);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;but I got **false** from sig.verify(). My config is exactly the same as the question's answer.&#xD;&#xA;&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// A Signature can be verified with a specific `PublicKey`.&#xD;&#xA;		/// The additional traits are boilerplate.&#xD;&#xA;		type Signature: Verify&lt;Signer = Self::PublicKey&gt; + Encode + Decode + Member + TypeInfo;&#xD;&#xA;&#xD;&#xA;		/// A PublicKey can be converted into an `AccountId`. This is required by the&#xD;&#xA;		/// `Signature` type.&#xD;&#xA;		/// The additional traits are boilerplate.&#xD;&#xA;		type PublicKey: IdentifyAccount&lt;AccountId = Self::PublicKey&gt; + Encode + Decode + Member + TypeInfo;&#xD;&#xA;&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxMinersOwned: Get&lt;u32&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type EpochCycle: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;and runtime config is like this:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    impl pallet_xenon::Config for Runtime {&#xD;&#xA;	type Signature = sp_core::sr25519::Signature;&#xD;&#xA;	type PublicKey = sp_core::sr25519::Public;&#xD;&#xA;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type MaxMinersOwned = MaxMinersOwned;&#xD;&#xA;	type EpochCycle = EpochCycle;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;So what mistake did I make? Help!!! Please!!!&#xD;&#xA;&#xD;&#xA;my console shows the log output like this:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/305/how-to-verify-a-signature-in-a-pallet&#xD;&#xA;  [2]: https://i.stack.imgur.com/BPzkW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15818" PostHistoryTypeId="5" PostId="4209" RevisionGUID="a5f72517-60d8-470f-a4ad-8100e216386f" CreationDate="2022-08-10T02:50:15.340" UserId="3009" Comment="deleted 21 characters in body" Text="I followed the answer of &quot;[how to verify a signature in a pallet][1]&quot;, and try to verify some data signed by a private key on chain logic.&#xD;&#xA;&#xD;&#xA;    	#[pallet::weight(10_000)]&#xD;&#xA;		pub fn my_verify(origin: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: T::Signature, from: T::PublicKey) -&gt; DispatchResult{&#xD;&#xA;			log::info!(&quot;--------public key is {:?}&quot;, from.clone().into_account());&#xD;&#xA;			log::info!(&quot;--------signature is {:?}&quot;, sig.clone());&#xD;&#xA;			log::info!(&quot;--------data is {:?}&quot;, data.clone());&#xD;&#xA;&#xD;&#xA;			let ok = sig.verify(&amp;data[..], &amp;from.into_account());&#xD;&#xA;			// `ok` is a bool. Use in an `if` or `ensure!`.&#xD;&#xA;			ensure!(ok, &lt;Error&lt;T&gt;&gt;::SignatureVerifyError);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;but I got **false** from sig.verify(). My config is exactly the same as the question's answer.&#xD;&#xA;&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// A Signature can be verified with a specific `PublicKey`.&#xD;&#xA;		/// The additional traits are boilerplate.&#xD;&#xA;		type Signature: Verify&lt;Signer = Self::PublicKey&gt; + Encode + Decode + Member + TypeInfo;&#xD;&#xA;&#xD;&#xA;		/// A PublicKey can be converted into an `AccountId`. This is required by the&#xD;&#xA;		/// `Signature` type.&#xD;&#xA;		/// The additional traits are boilerplate.&#xD;&#xA;		type PublicKey: IdentifyAccount&lt;AccountId = Self::PublicKey&gt; + Encode + Decode + Member + TypeInfo;&#xD;&#xA;&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxMinersOwned: Get&lt;u32&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type EpochCycle: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;and runtime config is like this:&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    impl pallet_xenon::Config for Runtime {&#xD;&#xA;	type Signature = sp_core::sr25519::Signature;&#xD;&#xA;	type PublicKey = sp_core::sr25519::Public;&#xD;&#xA;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type MaxMinersOwned = MaxMinersOwned;&#xD;&#xA;	type EpochCycle = EpochCycle;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;So what mistake did I make? Help!!! Please!!!&#xD;&#xA;&#xD;&#xA;my console shows the log output like this:&#xD;&#xA;[![loginfo][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/305/how-to-verify-a-signature-in-a-pallet&#xD;&#xA;  [2]: https://i.stack.imgur.com/BPzkW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15819" PostHistoryTypeId="2" PostId="4210" RevisionGUID="d9a65d85-952f-4106-81a6-5283869aaa7b" CreationDate="2022-08-10T03:26:36.513" UserId="251" Text="I have met a similar(on ECDSA) problem before. But I'm not sure if this could help you. That takes me a whole night to debug(I think there are some bugs on my code before).&#xD;&#xA;&#xD;&#xA;Finally, I found the substrate's signing &amp; verification are a little bit different. For SR25519, the signing context is 'substrate', check [sign](https://github.com/paritytech/substrate/blob/fece0657f20e15df94be5833b164dfacd44823eb/primitives/core/src/sr25519.rs#L557) &amp; [verify](https://github.com/paritytech/substrate/blob/fece0657f20e15df94be5833b164dfacd44823eb/primitives/core/src/sr25519.rs#L576). &#xD;&#xA;&#xD;&#xA;After I switch to https://github.com/paritytech/libsecp256k1, the issues were gone." ContentLicense="CC BY-SA 4.0" />
  <row Id="15821" PostHistoryTypeId="2" PostId="4211" RevisionGUID="8874b6c3-857e-438d-879d-61db88de179a" CreationDate="2022-08-10T04:10:39.580" UserId="2307" Text="I get 1,660,103,328,001 type string from substrate node created by T::Timestamp::now(). What type is this? How can I format this value to readable date time? I've tried with new Date() but it return a time around 1953 in console and invalid date in react." ContentLicense="CC BY-SA 4.0" />
  <row Id="15823" PostHistoryTypeId="1" PostId="4211" RevisionGUID="8874b6c3-857e-438d-879d-61db88de179a" CreationDate="2022-08-10T04:10:39.580" UserId="2307" Text="How to format time in client get from pallet_timestamp polkadotjs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15824" PostHistoryTypeId="3" PostId="4211" RevisionGUID="8874b6c3-857e-438d-879d-61db88de179a" CreationDate="2022-08-10T04:10:39.580" UserId="2307" Text="|polkadot-js|date|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15825" PostHistoryTypeId="2" PostId="4212" RevisionGUID="ed3fa656-d2ef-4ea8-8ae4-6e43c40da5da" CreationDate="2022-08-10T04:23:48.287" UserId="445" Text="`T::Timestamp::now()` return type `Duration`. But we usually convert into `u64` &#xD;&#xA;&#xD;&#xA;You can not check in PolkadotJs, PolkadotJs only return timestamp&#xD;&#xA;You can check unix timestamp conversion: https://www.epochconverter.com/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In Reactjs code, you can render like this &#xD;&#xA;&#xD;&#xA;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;                  &lt;Your Tag&gt;&#xD;&#xA;                    {new Intl.DateTimeFormat('en-US', {&#xD;&#xA;                      year: 'numeric',&#xD;&#xA;                      month: '2-digit',&#xD;&#xA;                      day: '2-digit',&#xD;&#xA;                      hour: '2-digit',&#xD;&#xA;                      minute: '2-digit',&#xD;&#xA;                      second: '2-digit',&#xD;&#xA;                    }).format(&lt;your query timestamp&gt;)}&#xD;&#xA;                  &lt;/Your tag&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15827" PostHistoryTypeId="2" PostId="4213" RevisionGUID="205968f8-0beb-4c1a-b00a-1ebff647d305" CreationDate="2022-08-10T05:11:01.253" UserId="2881" Text="Timestamp.now is miliseconds since unix epoch. To convert you can use the normal JS Date.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;/* retrieve the timestamp */&#xD;&#xA;const now = await api.query.timestamp.now()&#xD;&#xA;&#xD;&#xA;/* get the ms as a JS number */&#xD;&#xA;const ms = now.toNumber()&#xD;&#xA;&#xD;&#xA;/* create a JS Date */&#xD;&#xA;const dt = new Date(ms)&#xD;&#xA;&#xD;&#xA;/* print the date to the console - current locale */&#xD;&#xA;console.log(dt.toLocaleString())&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15829" PostHistoryTypeId="2" PostId="4214" RevisionGUID="c9d5e286-a53a-463b-bd08-708ef96255b3" CreationDate="2022-08-10T05:16:43.767" UserId="2881" Text="I am not familiar with Vuexy and/or craco, but from the above error it would seem that it is using Webpack 4 as a bundler. WP 4 does not have support for import.meta.url it is only available on WP 5. &#xD;&#xA;&#xD;&#xA;If there is no current version of Vuexy/craco available that are using WP 5, you would need to add additional loaders to your config.&#xD;&#xA;&#xD;&#xA;Support for this can be added by a 3rd party loader as [described in the js api build FAQ](https://polkadot.js.org/docs/usage/FAQ#on-webpack-4-i-have-a-parse-error-on-importmetaurl)" ContentLicense="CC BY-SA 4.0" />
  <row Id="15831" PostHistoryTypeId="2" PostId="4215" RevisionGUID="ba95f864-b73d-4a47-8d8f-7a3519e7bbc8" CreationDate="2022-08-10T05:50:11.523" UserId="2992" Text="2022 Apple macbook pros all comes with M2 chips. Before buying one, I want to double check about the current support status of the M2 chips with the Substrate/Polkadot codebase.&#xD;&#xA;1. Is M2 chips compatibility tested for the Substrate + polkadot codebase?&#xD;&#xA;2. Anyone currently do substrate (or related) development on M2 laptops?&#xD;&#xA;&#xD;&#xA;Any info are appreciated!&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="15833" PostHistoryTypeId="1" PostId="4215" RevisionGUID="ba95f864-b73d-4a47-8d8f-7a3519e7bbc8" CreationDate="2022-08-10T05:50:11.523" UserId="2992" Text="Support status for Apple M2 chip" ContentLicense="CC BY-SA 4.0" />
  <row Id="15834" PostHistoryTypeId="3" PostId="4215" RevisionGUID="ba95f864-b73d-4a47-8d8f-7a3519e7bbc8" CreationDate="2022-08-10T05:50:11.523" UserId="2992" Text="|dev|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15835" PostHistoryTypeId="2" PostId="4216" RevisionGUID="34f7d4c9-e574-4c03-8a10-0066d23ad743" CreationDate="2022-08-10T06:38:25.490" UserId="227" Text="I synchronized [`substrate-contracts-node`](https://github.com/paritytech/substrate-contracts-node) with the latest Substrate yesterday. There were some minor changes necessary for the latest Substrate release. Could be that this solves your problem.&#xD;&#xA;&#xD;&#xA;This is the toolchain which I used locally: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;rustc 1.64.0-nightly (2643b1646 2022-07-27)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could you try pointing the dependencies in there to the Polkadot release that you want to use?&#xD;&#xA;&#xD;&#xA;If it doesn't work:&#xD;&#xA;* What command are you executing for the build?&#xD;&#xA;* What's your local toolchain?&#xD;&#xA;* Are you using the latest `HEAD` of the `substrate-contracts-node` repository?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15838" PostHistoryTypeId="2" PostId="4217" RevisionGUID="b0020cee-53f4-480b-9efb-7fc14b35b08d" CreationDate="2022-08-10T07:21:57.227" UserId="251" Text="For better old version compatibility.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo update -p syn --precise 1.0.96&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm on polkadot-v0.9.23 too. And I don't want to change my stable toolchain. This could be the best option." ContentLicense="CC BY-SA 4.0" />
  <row Id="15840" PostHistoryTypeId="2" PostId="4218" RevisionGUID="a1f8c645-c32d-4b82-b66d-2fdc488a8d4a" CreationDate="2022-08-10T07:23:39.847" UserId="3010" Text="I want to nest mapping in ink (Rust) smart contract like solidity:&#xD;&#xA;``mapping(account_id =&gt; mapping(campaign_id =&gt; donate_value))``" ContentLicense="CC BY-SA 4.0" />
  <row Id="15842" PostHistoryTypeId="1" PostId="4218" RevisionGUID="a1f8c645-c32d-4b82-b66d-2fdc488a8d4a" CreationDate="2022-08-10T07:23:39.847" UserId="3010" Text="How to nest mapping in ink (Rust) smart contract like solidity?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15843" PostHistoryTypeId="3" PostId="4218" RevisionGUID="a1f8c645-c32d-4b82-b66d-2fdc488a8d4a" CreationDate="2022-08-10T07:23:39.847" UserId="3010" Text="|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15844" PostHistoryTypeId="2" PostId="4219" RevisionGUID="17e973be-3763-42fe-8b6b-b274b099e26c" CreationDate="2022-08-10T07:43:18.710" UserId="3011" Text="generated files `augment-api-runtime.ts` has a line `augment-api-runtime.ts:136`&#xD;&#xA;which looks like this:&#xD;&#xA;```&#xD;&#xA;      /**&#xD;&#xA;       * Return all the current data for a block in a single runtime call.&#xD;&#xA;       **/&#xD;&#xA;      currentAll: AugmentedCall&lt;ApiType, () =&gt; Observable&lt;ITuple&lt;[Option&lt;BlockV2&gt;, Option&lt;Vec&lt;ReceiptV0&gt;&gt;, Option&lt;Vec&lt;TransactionStatus&gt;&gt;]&gt;&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;typescript justly throwing errors: `Cannot find name 'ReceiptV0'` and `Cannot find name 'TransactionStatus'`.&#xD;&#xA;&#xD;&#xA;I suppose this line have to be something like this::&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;      /**&#xD;&#xA;       * Return all the current data for a block in a single runtime call.&#xD;&#xA;       **/&#xD;&#xA;      currentAll: AugmentedCall&lt;ApiType, () =&gt; Observable&lt;ITuple&lt;[Option&lt;BlockV2&gt;, Option&lt;Vec&lt;EthReceiptV3&gt;&gt;, Option&lt;Vec&lt;EthTransactionStatus&gt;&gt;]&gt;&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Look at this code:&#xD;&#xA;https://github.com/polkadot-js/api/blob/12750bc83d8d7f01957896a80a7ba948ba3690b7/packages/types/src/interfaces/eth/runtime.ts#L180" ContentLicense="CC BY-SA 4.0" />
  <row Id="15846" PostHistoryTypeId="1" PostId="4219" RevisionGUID="17e973be-3763-42fe-8b6b-b274b099e26c" CreationDate="2022-08-10T07:43:18.710" UserId="3011" Text="@polkadot/typegen 9.1.1 use the missing types" ContentLicense="CC BY-SA 4.0" />
  <row Id="15847" PostHistoryTypeId="3" PostId="4219" RevisionGUID="17e973be-3763-42fe-8b6b-b274b099e26c" CreationDate="2022-08-10T07:43:18.710" UserId="3011" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15848" PostHistoryTypeId="2" PostId="4220" RevisionGUID="215e406b-0a47-4a6d-8bf2-47a80284511c" CreationDate="2022-08-10T08:51:14.717" UserId="2102" Text="I use a macbook air with the M2 chip and it works perfectly fine. It gets a little bit hot when you compile for the first time (after that it doesn't), but you won't notice it unless you use the top most keys. I think the macbook pro comes with vents so that could help a little bit for compilations." ContentLicense="CC BY-SA 4.0" />
  <row Id="15850" PostHistoryTypeId="5" PostId="4202" RevisionGUID="2c689f9a-a960-4f79-86b9-4245a4a5127f" CreationDate="2022-08-10T08:55:18.163" UserId="2102" Comment="eng fix" Text="If you expected your balance to be 900 after purchasing the NFT, you need to ensure that you are actually setting the NFT value to 100 KIT units.&#xD;&#xA;&#xD;&#xA;To give you an example of what I mean, [Polkadot token decimals][1] are set to 10&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub fn polkadot_chain_spec_properties() -&gt; serde_json::map::Map&lt;String, serde_json::Value&gt; {&#xD;&#xA;	serde_json::json!({&#xD;&#xA;		&quot;tokenDecimals&quot;: 10,&#xD;&#xA;	})&#xD;&#xA;	.as_object()&#xD;&#xA;	.expect(&quot;Map given; qed&quot;)&#xD;&#xA;	.clone()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, I'm assuming that when you create the NFT, you are passing the value 100 to the extrinsic, which is not correct at all if you are using the default token decimals of the chain. &#xD;&#xA;&#xD;&#xA;The default token decimals of substrate are 12 (I think), so if you want to set your NFT value to 100 unit, you need to pass the value `100_000_000_000_000` to the extrinsic.&#xD;&#xA;&#xD;&#xA;You are also paying for fees, so the total cost of the transaction would never be 100 units, it will be a little bit more, but that's just another topic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/node/service/src/chain_spec.rs#L1073" ContentLicense="CC BY-SA 4.0" />
  <row Id="15851" PostHistoryTypeId="2" PostId="4221" RevisionGUID="d5c9a924-b448-40e4-a21b-8b564adaabf2" CreationDate="2022-08-10T09:06:34.450" UserId="473" Text="I've been trying to use the `export-state` and then add the custom set of authorities to the `aura` and `grandpa` as per the `Simulate network tutorial`, but i'm always getting the file as a raw genesis file and no way to add the authorities. &#xD;&#xA;&#xD;&#xA;The tutorial says to create a custom spec then, change the values and then generate the raw spec. That works, but i don't get the data, which is really important to have.&#xD;&#xA;&#xD;&#xA;Any help is welcome. &#xD;&#xA;&#xD;&#xA;Thanks " ContentLicense="CC BY-SA 4.0" />
  <row Id="15853" PostHistoryTypeId="1" PostId="4221" RevisionGUID="d5c9a924-b448-40e4-a21b-8b564adaabf2" CreationDate="2022-08-10T09:06:34.450" UserId="473" Text="how to use export-state then add the custom aura and grandpa authorities" ContentLicense="CC BY-SA 4.0" />
  <row Id="15854" PostHistoryTypeId="3" PostId="4221" RevisionGUID="d5c9a924-b448-40e4-a21b-8b564adaabf2" CreationDate="2022-08-10T09:06:34.450" UserId="473" Text="|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15855" PostHistoryTypeId="5" PostId="4221" RevisionGUID="fbbaef91-83a9-43ec-9513-e7f71c4801b7" CreationDate="2022-08-10T09:24:25.193" UserId="473" Comment="added 104 characters in body" Text="I've been trying to use the `export-state` and then add the custom set of authorities to the `aura` and `grandpa` as per the [`Simulate network tutorial`](https://docs.substrate.io/tutorials/get-started/trusted-network/#create-a-custom-chain-specification), but i'm always getting the file as a raw genesis file and no way to add the authorities. &#xD;&#xA;&#xD;&#xA;The tutorial says to create a custom spec then, change the values and then generate the raw spec. That works, but i don't get the data, which is important to have.&#xD;&#xA;&#xD;&#xA;I've also read multiple times this post, which clarified few things but not my use-case https://substrate.stackexchange.com/questions/436/how-to-configure-a-substrate-network-with-injected-block-history-from-a-snapshot&#xD;&#xA;&#xD;&#xA;Any help is welcome. &#xD;&#xA;&#xD;&#xA;Thanks " ContentLicense="CC BY-SA 4.0" />
  <row Id="15856" PostHistoryTypeId="2" PostId="4222" RevisionGUID="e8bee7df-cb8c-407d-a162-2639310ec78b" CreationDate="2022-08-10T09:35:45.990" UserId="632" Text="Hello I am creating custom rpc call, I need metadata to be able to decode extrinsics call inside my calls.&#xD;&#xA;&#xD;&#xA;But I dont know how to get substrate metadata inside my rpc call?&#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="15858" PostHistoryTypeId="1" PostId="4222" RevisionGUID="e8bee7df-cb8c-407d-a162-2639310ec78b" CreationDate="2022-08-10T09:35:45.990" UserId="632" Text="Get Metadata inside custom rpc call" ContentLicense="CC BY-SA 4.0" />
  <row Id="15859" PostHistoryTypeId="3" PostId="4222" RevisionGUID="e8bee7df-cb8c-407d-a162-2639310ec78b" CreationDate="2022-08-10T09:35:45.990" UserId="632" Text="|substrate-node|rust|rpc|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15860" PostHistoryTypeId="5" PostId="4095" RevisionGUID="3d76a452-c205-4ea8-b03b-053ff978b525" CreationDate="2022-08-10T09:48:14.353" UserId="2809" Comment="added 474 characters in body" Text="As the title says, I have added EVM pallet to my NPoS runtime(using [chainsafe/substrate-node-template](https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking)), and when i run my node with Alice and Bob validators, the StakingElection begins to fail.&#xD;&#xA;&#xD;&#xA;I don't believe i'm missing any configurations, and I have only added the pallet to Runtime for now, and its genesis config in chain_spec.rs, making no other changes.&#xD;&#xA;&#xD;&#xA;**NOTE** The chainsafe template had an issue where eras didn't change hence no election occured, but I have solved that with [this pr](https://github.com/ChainSafe/substrate-node-template/pull/4), the NPoS election works fine not having added the EVM pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**UPDATE 1** I have added pallet_ethereum, changed SubstrateBlockHashMapping to EthereuBlockhashMapping, still the same issue.&#xD;&#xA;If I remove all EVM related stuff, my NPoS works fine. Solution is submitted, election is finalized and a new authority set is chosen.&#xD;&#xA;&#xD;&#xA;**UPDATE 2**&#xD;&#xA;I forgot to add an image of whaat should normally happen(when pallet_evm is not installed)&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;**UPDATE 3**&#xD;&#xA;Here is the branch and repo in question [here][3]&#xD;&#xA;&#xD;&#xA;**UPDATE 4**&#xD;&#xA;It appears using fp_evm::GenesisAccount to create and endow some test accounts in chain_spec for EVMConfig breaks the NPoS election for both polkadotv0.9.22 and polkadotv0.9.25, without endowed test accounts I cannot test any of the EVM compatibility. &#xD;&#xA;It looks like fp_evm is causing the break. Is this an active issue? and will Frontier be fixing this?&#xD;&#xA;**Note** that I am not working with a parachain, it is a **standalone** chain with EVM compatability,&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2pO2q.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/t6yQZ.png&#xD;&#xA;  [3]: https://github.com/talhadaar/chainsafe-substrate-node-template/tree/question" ContentLicense="CC BY-SA 4.0" />
  <row Id="15861" PostHistoryTypeId="2" PostId="4223" RevisionGUID="44d3ab57-ce0c-4c7a-a051-e5c0a24d6741" CreationDate="2022-08-10T10:41:11.707" UserId="2025" Text="Conveniently, you have the relevant RPC method to get the metadata from a Substrate chain as the first example of [the custom RPC documentation on Substrate](https://docs.substrate.io/main-docs/build/custom-rpc/).&#xD;&#xA;&#xD;&#xA;Additionally, if you are considering to use Polkadot.js, [this is the relevant method to get the metadata](https://docs.substrate.io/main-docs/build/custom-rpc/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15863" PostHistoryTypeId="5" PostId="4095" RevisionGUID="97abe38c-8152-4ddf-b43b-1b1a2eebe874" CreationDate="2022-08-10T10:58:17.423" UserId="2809" Comment="deleted 163 characters in body; edited title" Text="As the title says, I have added EVM Compatibility to my NPoS runtime(using [chainsafe/substrate-node-template](https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking)), and when i run my node with Alice and Bob validators, the StakingElection begins to fail.&#xD;&#xA;&#xD;&#xA;**NOTE** The chainsafe template had an issue where eras didn't change hence no election occured, but I have solved that with [this pr](https://github.com/ChainSafe/substrate-node-template/pull/4), the NPoS election works fine not having added the EVM pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**UPDATE 1** I have added pallet_ethereum, changed SubstrateBlockHashMapping to EthereuBlockhashMapping, still the same issue.&#xD;&#xA;If I remove all EVM related stuff, my NPoS works fine. Solution is submitted, election is finalized and a new authority set is chosen.&#xD;&#xA;&#xD;&#xA;**UPDATE 2**&#xD;&#xA;I forgot to add an image of whaat should normally happen(when pallet_evm is not installed)&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;**UPDATE 3**&#xD;&#xA;Here is the branch and repo in question [here][3]&#xD;&#xA;&#xD;&#xA;**UPDATE 4**&#xD;&#xA;It appears using fp_evm::GenesisAccount to create and endow some test accounts in chain_spec for EVMConfig breaks the NPoS election for both polkadotv0.9.22 and polkadotv0.9.25, without endowed test accounts I cannot test any of the EVM compatibility. &#xD;&#xA;It looks like fp_evm is causing the break. Is this an active issue? and will Frontier be fixing this?&#xD;&#xA;**Note** that I am not working with a parachain, it is a **standalone** chain with EVM compatability,&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2pO2q.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/t6yQZ.png&#xD;&#xA;  [3]: https://github.com/talhadaar/chainsafe-substrate-node-template/tree/question" ContentLicense="CC BY-SA 4.0" />
  <row Id="15864" PostHistoryTypeId="4" PostId="4095" RevisionGUID="97abe38c-8152-4ddf-b43b-1b1a2eebe874" CreationDate="2022-08-10T10:58:17.423" UserId="2809" Comment="deleted 163 characters in body; edited title" Text="fp_evm::GenesisAccount causes StakingElection.fail" ContentLicense="CC BY-SA 4.0" />
  <row Id="15865" PostHistoryTypeId="2" PostId="4224" RevisionGUID="1e2113b2-84b5-4498-afdf-200871359a88" CreationDate="2022-08-10T11:26:29.117" UserId="474" Text="Just to elaborate on this, since I've been digging into it and asking around...&#xD;&#xA;&#xD;&#xA;We can use the following formula to calculate the `partial_fee` for an extrinsic (ie the total/final fee&#xD;&#xA;minus any tip).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;partial_fee = base_fee + len_fee + ((adjusted_weight_fee/estimated_weight)*actual_weight)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where:&#xD;&#xA;- `base_fee` is a fixed base fee to include some transaction in a block. It accounts&#xD;&#xA;  for the work needed to verify the signature and such and is constant for any tx.&#xD;&#xA;- `len_fee` is a fee paid based on the size (length in bytes) of the transaction. Longer&#xD;&#xA;  transactions require more storage.&#xD;&#xA;- `adjusted_weight_fee` is a fee that is itself `estimated_weight * targeted_fee_adjustment`.&#xD;&#xA;  `targeted_fee_adjustment` is some adjustment made based on the network load and such, and is&#xD;&#xA;  an opaque internal value we have no access to.&#xD;&#xA;- `estimated_weight` is the &quot;pre-dispatch&quot; weight of the transaction. It's set based on the cost&#xD;&#xA;  of processing the transaction on reference hardware.&#xD;&#xA;- `actual_weight` is the weight that is found in the `ExtrinsicSuccess` event for the extrinsic in&#xD;&#xA;  a block (it's just called `weight` in the event), and is often the same as `estimated_weight`,&#xD;&#xA;  but the node has the opportunity to change it to whatever it likes, I think.&#xD;&#xA;&#xD;&#xA;The RPC endpoint `payment_queryFeeDetails` returns `base_fee`, `len_fee` and `adjusted_weight_fee`.&#xD;&#xA;&#xD;&#xA;The RPC endpoint `payment_queryInfo` returns `estimated_weight` (called `weight` in the response), and&#xD;&#xA;a `partialFee` value, which is our best guess at the inclusion fee for the tx without actually submitting&#xD;&#xA;it and seeing whether the node changes the weight/decides not to take a fee at all.&#xD;&#xA;&#xD;&#xA;To get the correct values for some extrinsic from those endpoints, provide the extrinsic bytes, and the&#xD;&#xA;block number **one before the block it made it into** (eg if the extrinsic was in block 100, you'd use&#xD;&#xA;block 99 as an argument). Using the correct block number is very important.&#xD;&#xA;&#xD;&#xA;Once you've called these endpoints, access the `ExtrinsicSuccess` event to find the `actual_weight`&#xD;&#xA;(it's just called `weight` in the event props), but also a `paysFee` value which signals whether the &#xD;&#xA;extrinsic actually incurred a fee at all or not (a node has the opportunity to refund the fee entirely &#xD;&#xA;if it likes by setting this to `No`).&#xD;&#xA;&#xD;&#xA;So, the steps to calculate the fee are basically:&#xD;&#xA;- if `paysFee` is No, the fee paid is 0&#xD;&#xA;- else, gather the values needed above and plus them into the equation above to return the final &#xD;&#xA;  partial fee that was paid.&#xD;&#xA;&#xD;&#xA;# Why the above equation?!&#xD;&#xA;&#xD;&#xA;Well, the basic way to calculate a pre-dispatch fee is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;partial_fee = base_fee + len_fee + adjusted_weight_fee&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(see above for explanations of each value).&#xD;&#xA;&#xD;&#xA;We can obtain this result just from the `payment` RPC endpoints. &#xD;&#xA;&#xD;&#xA;Once the extrinsic is in a block though, the `ExtrinsicSuccess` event signals whether the weight used to&#xD;&#xA;calculate the fee changed (and whether we need to pay at all via `paysFee`). So we need to recalculate the&#xD;&#xA;`adjusted_weight_fee` by swapping out the original `weight` it was based on with the correct weight from the&#xD;&#xA;`ExtrinsicSuccess` event. That's all there really is to it.&#xD;&#xA;&#xD;&#xA;Note that doing this calculation may incur some precision loss, and so it's recommended to use high precision&#xD;&#xA;maths libraries to get the most accurate values back." ContentLicense="CC BY-SA 4.0" />
  <row Id="15867" PostHistoryTypeId="5" PostId="4224" RevisionGUID="270a937d-9c4e-485a-a560-d135c9e7f49d" CreationDate="2022-08-10T12:30:55.457" UserId="474" Comment="added 536 characters in body" Text="Just to elaborate on this, since I've been digging into it and asking around...&#xD;&#xA;&#xD;&#xA;We can use the following formula to calculate the `partial_fee` for an extrinsic (ie the total/final fee&#xD;&#xA;minus any tip).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;partial_fee = base_fee + len_fee + ((adjusted_weight_fee/estimated_weight)*actual_weight)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where:&#xD;&#xA;- `base_fee` is a fixed base fee to include some transaction in a block. It accounts&#xD;&#xA;  for the work needed to verify the signature and such and is constant for any tx.&#xD;&#xA;- `len_fee` is a fee paid based on the size (length in bytes) of the transaction. Longer&#xD;&#xA;  transactions require more storage.&#xD;&#xA;- `adjusted_weight_fee` is a fee that is itself `estimated_weight * targeted_fee_adjustment`.&#xD;&#xA;  `targeted_fee_adjustment` is some adjustment made based on the network load and such, and is&#xD;&#xA;  an opaque internal value we have no access to.&#xD;&#xA;- `estimated_weight` is the &quot;pre-dispatch&quot; weight of the transaction. It's set based on the cost&#xD;&#xA;  of processing the transaction on reference hardware.&#xD;&#xA;- `actual_weight` is the weight that is found in the `ExtrinsicSuccess` event for the extrinsic in&#xD;&#xA;  a block (it's just called `weight` in the event), and is often the same as `estimated_weight`,&#xD;&#xA;  but the node has the opportunity to change it to whatever it likes, I think.&#xD;&#xA;&#xD;&#xA;The RPC endpoint `payment_queryFeeDetails` returns `base_fee`, `len_fee` and `adjusted_weight_fee`.&#xD;&#xA;&#xD;&#xA;The RPC endpoint `payment_queryInfo` returns `estimated_weight` (called `weight` in the response), and&#xD;&#xA;a `partialFee` value, which is our best guess at the inclusion fee for the tx without actually submitting&#xD;&#xA;it and seeing whether the node changes the weight/decides not to take a fee at all.&#xD;&#xA;&#xD;&#xA;To get the correct values for some extrinsic from those endpoints, provide the extrinsic bytes, and the&#xD;&#xA;block number **one before the block it made it into** (eg if the extrinsic was in block 100, you'd use&#xD;&#xA;block 99 as an argument). Using the correct block number is very important.&#xD;&#xA;&#xD;&#xA;Once you've called these endpoints, access the `ExtrinsicSuccess` event to find the `actual_weight`&#xD;&#xA;(it's just called `weight` in the event props), but also a `paysFee` value which signals whether the &#xD;&#xA;extrinsic actually incurred a fee at all or not (a node has the opportunity to refund the fee entirely &#xD;&#xA;if it likes by setting this to `No`).&#xD;&#xA;&#xD;&#xA;So, the steps to calculate the fee are basically:&#xD;&#xA;- if `paysFee` is No, the fee paid is 0&#xD;&#xA;- else, gather the values needed above and plus them into the equation above to return the final &#xD;&#xA;  partial fee that was paid.&#xD;&#xA;&#xD;&#xA;# Why the above equation?!&#xD;&#xA;&#xD;&#xA;Well, the basic way to calculate a pre-dispatch fee is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;partial_fee = base_fee + len_fee + adjusted_weight_fee&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(see above for explanations of each value).&#xD;&#xA;&#xD;&#xA;We can obtain this result just from the `payment` RPC endpoints. &#xD;&#xA;&#xD;&#xA;Once the extrinsic is in a block though, the `ExtrinsicSuccess` event signals whether the weight used to&#xD;&#xA;calculate the fee changed (and whether we need to pay at all via `paysFee`). So we need to recalculate the&#xD;&#xA;`adjusted_weight_fee` by swapping out the original `weight` it was based on with the correct weight from the&#xD;&#xA;`ExtrinsicSuccess` event. That's all there really is to it.&#xD;&#xA;&#xD;&#xA;Note that doing this calculation may incur some precision loss, and so it's recommended to use high precision&#xD;&#xA;maths libraries to get the most accurate values back.&#xD;&#xA;&#xD;&#xA;# Caveats&#xD;&#xA;&#xD;&#xA;Substrate based chains can use whatever custom fee logic they like, and so this logic/calculation only applies to chains that copy the Polkadot fee calculation logic.&#xD;&#xA;&#xD;&#xA;There will soon be a `transactionPayment::TransactionFeePaid` event, which will include the final fee paid for some transaction (ie the inclusion/partial fee + any tip). This will become a more reliable way to calculate fees going forwards (and is on Kusama already), but of course there is always a need to calculate fees for historic blocks too :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="15868" PostHistoryTypeId="2" PostId="4225" RevisionGUID="eb59f686-6213-4cbc-877a-2ad3e734e912" CreationDate="2022-08-10T12:49:29.570" UserId="94" Text="How did you create the signature that you are testing with?  &#xD;&#xA;I assume you used PolkadotJS? That will not work per default, but can easily be fixed.  &#xD;&#xA;PolkadotJS has the quirk of wrapping everything in `&lt;Bytes&gt;&lt;/Bytes&gt;` tags.  &#xD;&#xA;You can update your Rust code to expect this wrapping, or don't. Depending on your use-case.  &#xD;&#xA;&#xD;&#xA;Lets write some tests to verify the assumption. First do a test where we sign with Rust and verify with Rust:  &#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn sig_verify_rust_works() {&#xD;&#xA;	use sp_core::Pair;&#xD;&#xA;&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		let alice = sp_core::sr25519::Pair::from_string(&quot;//Alice&quot;, None).unwrap();&#xD;&#xA;		let msg: Vec&lt;u8&gt; = b&quot;The actual message&quot;.to_vec();&#xD;&#xA;		let sig = alice.sign(&amp;msg[..]);&#xD;&#xA;&#xD;&#xA;		// Works as expected - no magic involved.&#xD;&#xA;		assert_ok!(Example::my_verify(Origin::root(), msg, sig, alice.public()));&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Now a test where we try to verify a signature that was created by PolkadotJS:  &#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn sig_verify_polkadotjs_works() {&#xD;&#xA;	use sp_core::Pair;&#xD;&#xA;&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		let alice = sp_core::sr25519::Pair::from_string(&quot;//Alice&quot;, None).unwrap();&#xD;&#xA;		&#xD;&#xA;		// Signature on &quot;The actual message&quot; by Alice via PolkadotJS.&#xD;&#xA;		let sig = b&quot;860ab35af395c6cc989b0498269d26c13d488431f8ceac89ed82744eb84361162ce7f6c817575e46c07287f000397a0c3d5521577ac63e20ce1d0b3ab158cd88&quot;;&#xD;&#xA;		let sig = hex::decode(sig).unwrap();&#xD;&#xA;		let sig = sp_core::sr25519::Signature::from_slice(&amp;sig[..]).unwrap();&#xD;&#xA;		&#xD;&#xA;		// This will not work since it's missing the wrapping:&#xD;&#xA;		let msg: Vec&lt;u8&gt; = b&quot;The actual message&quot;.to_vec();&#xD;&#xA;		assert!(Example::my_verify(Origin::root(), msg, sig.clone(), alice.public()).is_err());&#xD;&#xA;&#xD;&#xA;		// This will work since it's wrapped:&#xD;&#xA;		let msg: Vec&lt;u8&gt; = b&quot;&lt;Bytes&gt;The actual message&lt;/Bytes&gt;&quot;.to_vec();&#xD;&#xA;		assert!(Example::my_verify(Origin::root(), msg, sig, alice.public()).is_ok());&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;As you can see: The `&lt;Bytes&gt;&lt;/Bytes&gt;` makes the difference.  &#xD;&#xA;Interestingly enough, PolkadotJS does accepts both as valid, with and without &#xD;&#xA; the wrapping.  &#xD;&#xA;&#xD;&#xA;If you are using something besides PolkadotJS, you need to pay attention to the Signing context as mentioned in the original post: [How to verify a signature in a Pallet?](https://substrate.stackexchange.com/questions/305/how-to-verify-a-signature-in-a-pallet)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15870" PostHistoryTypeId="5" PostId="316" RevisionGUID="493366c8-e765-4a86-8055-41410d88d954" CreationDate="2022-08-10T12:52:16.303" UserId="94" Comment="added 3 characters in body" Text="Substrate provides a [Verify](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.Verify.html) and an [IdentifyAccount](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.IdentifyAccount.html) trait.  &#xD;&#xA;They work with any signature scheme since they are just traits and can be implemented for different crypto schemata.  &#xD;&#xA;This is very helpful when implementing off-chain protocols like Channels, Plasmas, Rollups etc.&#xD;&#xA;&#xD;&#xA;The `Config` trait of your pallet needs to be extended to support it:  &#xD;&#xA;```rust&#xD;&#xA;/// A Signature can be verified with a specific `PublicKey`.&#xD;&#xA;/// The additional traits are boilerplate.&#xD;&#xA;type Signature: Verify&lt;Signer = Self::PublicKey&gt; + Encode + Decode + Parameter;&#xD;&#xA;&#xD;&#xA;/// A PublicKey can be converted into an `AccountId`. This is required by the&#xD;&#xA;/// `Signature` type.&#xD;&#xA;/// The additional traits are boilerplate.&#xD;&#xA;type PublicKey: IdentifyAccount&lt;AccountId = Self::PublicKey&gt; + Encode + Decode + Parameter;&#xD;&#xA;```&#xD;&#xA;This makes it possible to verify signatures within the pallet.  &#xD;&#xA;Using it in an Extrinsic looks like this:  &#xD;&#xA;```rust&#xD;&#xA;fn my_verify(_: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: T::Signature, from: T::PublicKey)&#xD;&#xA;{&#xD;&#xA;    let ok = sig.verify(&amp;data, &amp;from);&#xD;&#xA;    // `ok` is a bool. Use in an `if` or `ensure!`.&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On the runtime side you can then inject the *concrete* crypto implementation that you want:  &#xD;&#xA;```rust&#xD;&#xA;type Signature = sp_core::ecdsa::Signature;&#xD;&#xA;type PublicKey = sp_core::ecdsa::Public;&#xD;&#xA;```&#xD;&#xA;Available are `ecdsa`, `sr25519` and `ed25519` all from [sp_core](https://docs.rs/sp-core/latest/sp_core/).  &#xD;&#xA;The Merline signing context for `sr25519` is `b&quot;substrate&quot;` as defined [here](https://github.com/paritytech/substrate/blob/bfc6fb4a95adccf96dadbe5e5e6bb8605d5a2c01/primitives/core/src/sr25519.rs#L61)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15871" PostHistoryTypeId="2" PostId="4226" RevisionGUID="74307c81-e01b-40ea-be7b-f27d49d98d2f" CreationDate="2022-08-10T14:05:16.077" UserId="298" Text="As a sudo of a parachain on Kusama, i am making the first runtime upgrade. &#xD;&#xA;&#xD;&#xA;Initially, i made the upgrade as a sudo unchecked weight and setCode without checks. The transaction looked successful it went &quot;in block&quot;. But the the runtime didnt upgrade, and the spec version stayed the same. &#xD;&#xA;&#xD;&#xA;Then i went the correct route creating an hash and going to parachainSystem &gt; AuthorizeUpgrade and then enactAuthorizeUpgrade, but i get this error `parachainSystem.ProhibitedByPolkadot`...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo.Sudid&#xD;&#xA;A sudo just took place. [result] &#xD;&#xA;sudoResult: Result&lt;Null, SpRuntimeDispatchError&gt;&#xD;&#xA;Err&#xD;&#xA;DispatchError&#xD;&#xA;{&#xD;&#xA;  Module: {&#xD;&#xA;    index: 1&#xD;&#xA;    error: 1&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;type&#xD;&#xA;parachainSystem.ProhibitedByPolkadot&#xD;&#xA;details&#xD;&#xA;Polkadot currently prohibits this parachain from upgrading its validation function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Are we blocked out for a period of time? How can we succesfully make an upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15873" PostHistoryTypeId="1" PostId="4226" RevisionGUID="74307c81-e01b-40ea-be7b-f27d49d98d2f" CreationDate="2022-08-10T14:05:16.077" UserId="298" Text="Error upgrading parachain on Kusama: `parachainSystem.ProhibitedByPolkadot`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15874" PostHistoryTypeId="3" PostId="4226" RevisionGUID="74307c81-e01b-40ea-be7b-f27d49d98d2f" CreationDate="2022-08-10T14:05:16.077" UserId="298" Text="|polkadot|parachain|kusama|runtime-upgrade|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15875" PostHistoryTypeId="2" PostId="4227" RevisionGUID="c695bd12-8482-4b0f-9ce0-32450c74472e" CreationDate="2022-08-10T14:43:45.337" UserId="1789" Text="Hi I was trying to add Frontier code to my substrate-parachain-template project.&#xD;&#xA;&#xD;&#xA;I was following JoshOrndorff's tutorial and his commits here https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021&#xD;&#xA;&#xD;&#xA;However, Josh's tutorial is a little outdated and his code is based on Substrate-Node-template instead of Substrate-Parachain-template...&#xD;&#xA;&#xD;&#xA;So currently I am trying to add Frontier's template folder code into my Substrate-parachain-template repo. I think that is also the approach Josh was using, right?&#xD;&#xA;&#xD;&#xA;After following that approach, almost all code can be added from Frontier/template to my parachain, except node/service.rs...  because it is surprisingly complicated!... &#xD;&#xA;&#xD;&#xA;For example, I need to remove `sc_finality_grandpa` from the Frontier/template to make it work with any parachain. but I don't know what can be used to replace `sc_finality_grandpa::GrandpaBlockImport&lt;FullBackend, Block, FullClient, FullSelectChain&gt;,`?&#xD;&#xA;&#xD;&#xA;```#[cfg(feature = &quot;aura&quot;)]&#xD;&#xA;pub type ConsensusResult = (&#xD;&#xA;	FrontierBlockImport&lt;&#xD;&#xA;		Block,&#xD;&#xA;		sc_finality_grandpa::GrandpaBlockImport&lt;FullBackend, Block, FullClient, FullSelectChain&gt;,&#xD;&#xA;		FullClient,&#xD;&#xA;	&gt;,&#xD;&#xA;	sc_finality_grandpa::LinkHalf&lt;Block, FullClient, FullSelectChain&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; Any advice? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="15877" PostHistoryTypeId="1" PostId="4227" RevisionGUID="c695bd12-8482-4b0f-9ce0-32450c74472e" CreationDate="2022-08-10T14:43:45.337" UserId="1789" Text="How to add Frontier code as a dependency to substrate-parachain-template based parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15878" PostHistoryTypeId="3" PostId="4227" RevisionGUID="c695bd12-8482-4b0f-9ce0-32450c74472e" CreationDate="2022-08-10T14:43:45.337" UserId="1789" Text="|parachain|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15879" PostHistoryTypeId="2" PostId="4228" RevisionGUID="c1113aa8-f00a-46f3-9839-6dba9e887c9a" CreationDate="2022-08-10T15:06:53.737" UserId="3013" Text="Currently I have a local relay Rococo chain with 2 parachains (forked from the parachain template). I want to develop an XCM pallet that calls contract on another chain. cumulus-ping is working.&#xD;&#xA;&#xD;&#xA;However a develop cycle takes awhile. I change something in the parachain, compile it, then restart relay chain, generate and submit the genesis head and validation function to the relay chain to test the feature ... Most of the tutorials I have seen assume I want to play with the existing chains. Is there a better/faster way to iterate on a code change? " ContentLicense="CC BY-SA 4.0" />
  <row Id="15881" PostHistoryTypeId="1" PostId="4228" RevisionGUID="c1113aa8-f00a-46f3-9839-6dba9e887c9a" CreationDate="2022-08-10T15:06:53.737" UserId="3013" Text="What is the best way to iteratively develop a XCM pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15882" PostHistoryTypeId="3" PostId="4228" RevisionGUID="c1113aa8-f00a-46f3-9839-6dba9e887c9a" CreationDate="2022-08-10T15:06:53.737" UserId="3013" Text="|pallet|parachain|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15883" PostHistoryTypeId="2" PostId="4229" RevisionGUID="b4020ad6-4c22-47fe-b467-c6d4f247f43e" CreationDate="2022-08-10T15:39:51.057" UserId="2881" Text="It is not missing the types, rather it is applying the type names exactly as specified in the pre-v14 metadata. It doesn't apply transformations to the types received in the metadata.&#xD;&#xA;&#xD;&#xA;So with that in mind, it is generally suggested to use a Substrate base that supports v14 metadata where all the types and their definitions are carried in the metadata itself - which removes the need to define your own types.&#xD;&#xA;&#xD;&#xA;If you need to use a v13 metadata, for type generation to work correctly, you would need to add the corresponding types for your runtime to a definitions.ts file and pass it along with generation. This would mean either defining the specific types missing of providing aliases from the way it is described in the metadata to the names it is defined as as part of the js api runtime/rpc definitions." ContentLicense="CC BY-SA 4.0" />
  <row Id="15885" PostHistoryTypeId="5" PostId="4207" RevisionGUID="17d1db5f-7add-46a7-a48a-59ff59ea2848" CreationDate="2022-08-10T16:15:09.520" UserId="1803" Comment="added 10 characters in body; edited title" Text="&quot;Whitelist account from further DB operations.&quot;&#xD;&#xA;&#xD;&#xA;What does it actually means, and when should it be used? Looking into the examples, I see that basically every caller of the extrinsic is whitelisted. And if the caller is RawOrigin::Root - do we need to whitelist him too?&#xD;&#xA;		&#xD;&#xA;    frame_benchmarking::whitelisted_caller;&#xD;&#xA;    frame_benchmarking::benchmarking::add_to_whitelist;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15886" PostHistoryTypeId="4" PostId="4207" RevisionGUID="17d1db5f-7add-46a7-a48a-59ff59ea2848" CreationDate="2022-08-10T16:15:09.520" UserId="1803" Comment="added 10 characters in body; edited title" Text="Benchmarking whitelist" ContentLicense="CC BY-SA 4.0" />
  <row Id="15887" PostHistoryTypeId="2" PostId="4230" RevisionGUID="a205c49d-6c54-4207-92d8-13ceec67bbbd" CreationDate="2022-08-10T17:28:27.653" UserId="494" Text="Both [Democracy](https://github.com/paritytech/substrate/tree/master/frame/democracy) and [Referenda](https://github.com/paritytech/substrate/tree/master/frame/referenda) pallets are used for purposes of on-chain governance.&#xD;&#xA;&#xD;&#xA;However, only Democracy is used on Polkadot and Kusama runtimes. What is the difference between these two pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15889" PostHistoryTypeId="1" PostId="4230" RevisionGUID="a205c49d-6c54-4207-92d8-13ceec67bbbd" CreationDate="2022-08-10T17:28:27.653" UserId="494" Text="What is the difference between Referenda and Democracy pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15890" PostHistoryTypeId="3" PostId="4230" RevisionGUID="a205c49d-6c54-4207-92d8-13ceec67bbbd" CreationDate="2022-08-10T17:28:27.653" UserId="494" Text="|pallet|frame|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15891" PostHistoryTypeId="2" PostId="4231" RevisionGUID="f3204c98-ec30-40da-8dd8-5ff5c32b9937" CreationDate="2022-08-10T22:56:07.817" UserId="28" Text="Part of benchmarking is counting the number of storage reads and writes that happen in the runtime storage, because the runtime storage is a merkle trie, and operations on the merkle trie is very expensive.&#xD;&#xA;&#xD;&#xA;Whitelisting in this case is a way to tell the benchmarking backend to ignore certain keys, for example user accounts, or specific kinds of storage items, so that accessing those keys do not consume a storage read or write.&#xD;&#xA;&#xD;&#xA;We can do this because if you access the same storage multiple times within a block, a storage cache is used rather than the actual database, so only the first access to a storage is heavy, compared to every access. For example, since the block number is a storage item that is read and written to each block, we can ignore any reads or writes to the block number in other extrinsics.&#xD;&#xA;&#xD;&#xA;You know the logic of your blockchain best, so these tools are made available to developers in order to control the output of benchmarking, and accurately represent the complexity of their logic on chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="15893" PostHistoryTypeId="2" PostId="4232" RevisionGUID="b2f83e34-c751-4742-b759-75c35b3d275e" CreationDate="2022-08-10T22:58:30.567" UserId="28" Text="You should write unit tests using the `xcm-simulator` which can emulate multiple parachains communicating over XCM:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/tree/master/xcm/xcm-simulator&#xD;&#xA;&#xD;&#xA;In this case, you would just need to execute `cargo test ...` to run the tests." ContentLicense="CC BY-SA 4.0" />
  <row Id="15895" PostHistoryTypeId="10" PostId="4218" RevisionGUID="402cbb5e-2e8e-4afe-921f-63dfd489ea13" CreationDate="2022-08-10T23:00:59.580" UserId="28" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[3765],&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="15897" PostHistoryTypeId="2" PostId="4233" RevisionGUID="ffa5113b-3884-45ca-a8a3-2703e3453bd0" CreationDate="2022-08-11T08:03:50.990" UserId="227" Text="&gt;Currently the deposited event seems to disappear when error occurs in contract.&#xD;&#xA;&#xD;&#xA;In the following I assume that by &quot;error occurs&quot; you mean that the contract either traps or returns a `Result::Err`.&#xD;&#xA;&#xD;&#xA;Trapping happens typically when a contract panics on e.g. `expect` or `unwrap` or reentrancy (which is disabled by default). In the case of the contract trapping all side-effects are rolled back, so no storage changes are persisted and no events are emitted.&#xD;&#xA;&#xD;&#xA;Returning a `Result::Err` results in the same behavior, the side-effects are rolled back and the `Err(…)` is returned in an output buffer, which can be displayed by UI's or CLI clients.&#xD;&#xA;&#xD;&#xA;You have two options for your case:&#xD;&#xA;&#xD;&#xA;*(1) Return a `Result&lt;Result&lt;…&gt;&gt;`.*&#xD;&#xA;So pseudo-code:&#xD;&#xA;```rust&#xD;&#xA;type MyBusinessLogicResult&lt;T&gt; = Result&lt;T, MyErrors&gt;;&#xD;&#xA;&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn foo(&amp;mut self) -&gt; Result&lt;MyBusinessLogicResult&lt;…&gt;&gt; {&#xD;&#xA;  self.env().emit_event(MyEventIndicatingAnError);&#xD;&#xA;  Ok(MyBusinessLogicResult::Err(…))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It's important to know that here any side-effect before the `Ok(…)` would be persisted to chain storage! This is likely not what you want, bringing us to option (2).&#xD;&#xA;&#xD;&#xA;*(2) Use RPC's for determining if an error would happen on a particular contract call invocation.*&#xD;&#xA;&#xD;&#xA;This is the preferred method. Your frontend executes an RPC call to dry-run the contract method. This is then synchronous and your UI will immediately know the `Result` that the invocation would yield. &#xD;&#xA;&#xD;&#xA;You can immediately display an error to the user, enabling adjusting the input so that the call would succeed.&#xD;&#xA;&#xD;&#xA;You only submit the extrinsic once this dry-run would yield `Result::Ok`. &#xD;&#xA;&#xD;&#xA;The advantage here is that the user doesn't have to pay for getting just the error and the result is known immediately. Events are asynchronous, your frontend has to actively listen for them which is not such a nice user experience due to the UI having to display some &quot;waiting&quot; indicator.&#xD;&#xA;&#xD;&#xA;If you're using polkadot-js as an API there is documentation on how to dry-run a contract call [here](https://polkadot.js.org/docs/api-contract/start/contract.tx/#cost-estimation).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15899" PostHistoryTypeId="2" PostId="4234" RevisionGUID="535aeefc-9838-4cf1-bf6c-9f2e30c56edf" CreationDate="2022-08-11T09:13:48.617" UserId="552" Text="I was looking through a way where there a possibility of implementing a custom root origin in substrate. " ContentLicense="CC BY-SA 4.0" />
  <row Id="15901" PostHistoryTypeId="1" PostId="4234" RevisionGUID="535aeefc-9838-4cf1-bf6c-9f2e30c56edf" CreationDate="2022-08-11T09:13:48.617" UserId="552" Text="Is it possible to implement a custom root origin in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="15902" PostHistoryTypeId="3" PostId="4234" RevisionGUID="535aeefc-9838-4cf1-bf6c-9f2e30c56edf" CreationDate="2022-08-11T09:13:48.617" UserId="552" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15903" PostHistoryTypeId="2" PostId="4235" RevisionGUID="51ca87a8-f01c-4876-b67f-6cc0134c6183" CreationDate="2022-08-11T09:16:09.733" UserId="251" Text="```&#xD;&#xA;# steps to reproduce&#xD;&#xA;git clone https://github.com/darwinia-network/darwinia-common&#xD;&#xA;cd darwinia-common&#xD;&#xA;git checkout xavier/bench&#xD;&#xA;cargo build --release --features runtime-benchmarks&#xD;&#xA;target/release/drml benchmark --header .maintain/lincense-header --execution native --heap-pages 4096 --chain pangolin-dev --output node/runtime/pangolin/src/weights/ --extrinsic 'claim_bounty' --pallet 'pallet_bounties'&#xD;&#xA;&#xD;&#xA;# result                     &#xD;&#xA;2022-08-11 16:51:39 `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0    &#xD;&#xA;2022-08-11 16:51:39 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-08-11 16:51:39 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-08-11 16:51:39 [0]  new validator set of size 1 has been processed for era 1    &#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:77] &amp;pot_account = 6d6f646c64612f74727372790000000000000000000000000000000000000000 (5EYCAe5g...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:80] &amp;value = 1000000000&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:150] frame_system::Pallet::&lt;T&gt;::block_number() = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:155] &amp;bounty_id = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:157] &amp;curator = 4a12a3ac483a9db634e75b6358a8fdc1ca6d3b784566cd4e0c092b0f910c5b71 (5DjpwLaa...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:162] &amp;beneficiary = MultiAddress::Id(&#xD;&#xA;    7733dba55f14729038399c06e59481896b0a1531fbb807f1b77a712e8e3e63cb (5EkzxfK9...),&#xD;&#xA;)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:77] &amp;pot_account = 6d6f646c64612f74727372790000000000000000000000000000000000000000 (5EYCAe5g...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:80] &amp;value = 1000000000&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:150] frame_system::Pallet::&lt;T&gt;::block_number() = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:155] &amp;bounty_id = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:157] &amp;curator = 4a12a3ac483a9db634e75b6358a8fdc1ca6d3b784566cd4e0c092b0f910c5b71 (5DjpwLaa...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:162] &amp;beneficiary = MultiAddress::Id(&#xD;&#xA;    7733dba55f14729038399c06e59481896b0a1531fbb807f1b77a712e8e3e63cb (5EkzxfK9...),&#xD;&#xA;)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:77] &amp;pot_account = 6d6f646c64612f74727372790000000000000000000000000000000000000000 (5EYCAe5g...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:80] &amp;value = 1000000000&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:150] frame_system::Pallet::&lt;T&gt;::block_number() = 57600&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:155] &amp;bounty_id = 1&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:157] &amp;curator = 4a12a3ac483a9db634e75b6358a8fdc1ca6d3b784566cd4e0c092b0f910c5b71 (5DjpwLaa...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:162] &amp;beneficiary = MultiAddress::Id(&#xD;&#xA;    7733dba55f14729038399c06e59481896b0a1531fbb807f1b77a712e8e3e63cb (5EkzxfK9...),&#xD;&#xA;)&#xD;&#xA;Error: Input(&quot;Premature&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I notice block number 57600 is `BountyDepositPayoutDelay`. And I think it was changed by this [line](https://github.com/paritytech/substrate/blob/master/frame/bounties/src/benchmarking.rs#L159).&#xD;&#xA;&#xD;&#xA;But why? Every new round should be started with a branch new state.&#xD;&#xA;&#xD;&#xA;If I run the pallet-bounties's benchmark in Polkadot. It works as expected. Always starting from block number 0.&#xD;&#xA;&#xD;&#xA;Custom logs are defined [here](https://github.com/darwinia-network/substrate/blob/xavier/debug/frame/bounties/src/benchmarking.rs)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15905" PostHistoryTypeId="1" PostId="4235" RevisionGUID="51ca87a8-f01c-4876-b67f-6cc0134c6183" CreationDate="2022-08-11T09:16:09.733" UserId="251" Text="Why the state in benchmark didn't reset?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15906" PostHistoryTypeId="3" PostId="4235" RevisionGUID="51ca87a8-f01c-4876-b67f-6cc0134c6183" CreationDate="2022-08-11T09:16:09.733" UserId="251" Text="|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15907" PostHistoryTypeId="2" PostId="4236" RevisionGUID="1a0006c5-8514-4f9e-970f-6eb928ab5388" CreationDate="2022-08-11T09:22:10.093" UserId="2759" Text="Given the following code sample&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.query.system.account&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'd like to know the key prefix constituents, i.e. `System` + `Account` and the type this operation will return as a string, i.e. `FrameSystemAccountInfo`.&#xD;&#xA;&#xD;&#xA;Is there a possibility in polkadotjs API to retrieve this type information somehow?&#xD;&#xA;&#xD;&#xA;PS: I'm currently retrieving the key prefix constituents via:&#xD;&#xA;```js&#xD;&#xA;const { prefix, method } = api.query.system.account.creator.toJSON().storage&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15909" PostHistoryTypeId="1" PostId="4236" RevisionGUID="1a0006c5-8514-4f9e-970f-6eb928ab5388" CreationDate="2022-08-11T09:22:10.093" UserId="2759" Text="Polkadot-JS: Retrieve return type of a query operation dynamically" ContentLicense="CC BY-SA 4.0" />
  <row Id="15910" PostHistoryTypeId="3" PostId="4236" RevisionGUID="1a0006c5-8514-4f9e-970f-6eb928ab5388" CreationDate="2022-08-11T09:22:10.093" UserId="2759" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15911" PostHistoryTypeId="5" PostId="4235" RevisionGUID="72481f6d-b754-4961-bf14-48df68bc0067" CreationDate="2022-08-11T09:30:43.530" UserId="251" Comment="added 68 characters in body" Text="```&#xD;&#xA;# steps to reproduce&#xD;&#xA;git clone https://github.com/darwinia-network/darwinia-common&#xD;&#xA;cd darwinia-common&#xD;&#xA;git checkout xavier/bench&#xD;&#xA;cargo build --release --features runtime-benchmarks&#xD;&#xA;target/release/drml benchmark --header .maintain/lincense-header --execution native --heap-pages 4096 --chain pangolin-dev --output node/runtime/pangolin/src/weights/ --extrinsic 'claim_bounty' --pallet 'pallet_bounties'&#xD;&#xA;&#xD;&#xA;# result                     &#xD;&#xA;2022-08-11 16:51:39 `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0    &#xD;&#xA;2022-08-11 16:51:39 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-08-11 16:51:39 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-08-11 16:51:39 [0]  new validator set of size 1 has been processed for era 1    &#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:77] &amp;pot_account = 6d6f646c64612f74727372790000000000000000000000000000000000000000 (5EYCAe5g...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:80] &amp;value = 1000000000&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:150] frame_system::Pallet::&lt;T&gt;::block_number() = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:155] &amp;bounty_id = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:157] &amp;curator = 4a12a3ac483a9db634e75b6358a8fdc1ca6d3b784566cd4e0c092b0f910c5b71 (5DjpwLaa...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:162] &amp;beneficiary = MultiAddress::Id(&#xD;&#xA;    7733dba55f14729038399c06e59481896b0a1531fbb807f1b77a712e8e3e63cb (5EkzxfK9...),&#xD;&#xA;)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:77] &amp;pot_account = 6d6f646c64612f74727372790000000000000000000000000000000000000000 (5EYCAe5g...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:80] &amp;value = 1000000000&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:150] frame_system::Pallet::&lt;T&gt;::block_number() = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:155] &amp;bounty_id = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:157] &amp;curator = 4a12a3ac483a9db634e75b6358a8fdc1ca6d3b784566cd4e0c092b0f910c5b71 (5DjpwLaa...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:162] &amp;beneficiary = MultiAddress::Id(&#xD;&#xA;    7733dba55f14729038399c06e59481896b0a1531fbb807f1b77a712e8e3e63cb (5EkzxfK9...),&#xD;&#xA;)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:77] &amp;pot_account = 6d6f646c64612f74727372790000000000000000000000000000000000000000 (5EYCAe5g...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:80] &amp;value = 1000000000&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:150] frame_system::Pallet::&lt;T&gt;::block_number() = 57600&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:155] &amp;bounty_id = 1&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:157] &amp;curator = 4a12a3ac483a9db634e75b6358a8fdc1ca6d3b784566cd4e0c092b0f910c5b71 (5DjpwLaa...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:162] &amp;beneficiary = MultiAddress::Id(&#xD;&#xA;    7733dba55f14729038399c06e59481896b0a1531fbb807f1b77a712e8e3e63cb (5EkzxfK9...),&#xD;&#xA;)&#xD;&#xA;Error: Input(&quot;Premature&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I notice block number 57600 is `BountyDepositPayoutDelay`. And I think it was changed by this [line](https://github.com/paritytech/substrate/blob/master/frame/bounties/src/benchmarking.rs#L159).&#xD;&#xA;&#xD;&#xA;But why? Every new round should be started with a branch new state. Also, why the first two round works but failed at the third round?&#xD;&#xA;&#xD;&#xA;If I run the pallet-bounties's benchmark in Polkadot. It works as expected. Always starting from block number 0.&#xD;&#xA;&#xD;&#xA;Custom logs are defined [here](https://github.com/darwinia-network/substrate/blob/xavier/debug/frame/bounties/src/benchmarking.rs)." ContentLicense="CC BY-SA 4.0" />
  <row Id="15912" PostHistoryTypeId="2" PostId="4237" RevisionGUID="6e258296-4e44-4fc8-8bcb-c7c651630775" CreationDate="2022-08-11T09:52:15.913" UserId="445" Text="Some references that you can walk through:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/src/frame_system/lib.rs.html#788&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/collective/src/lib.rs#L1032&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15914" PostHistoryTypeId="5" PostId="4235" RevisionGUID="df365d67-658b-44ee-8539-de92644e355e" CreationDate="2022-08-11T09:57:58.140" UserId="251" Comment="added 166 characters in body" Text="```&#xD;&#xA;# steps to reproduce&#xD;&#xA;git clone https://github.com/darwinia-network/darwinia-common&#xD;&#xA;cd darwinia-common&#xD;&#xA;git checkout xavier/bench&#xD;&#xA;cargo build --release --features runtime-benchmarks&#xD;&#xA;target/release/drml benchmark --header .maintain/lincense-header --execution native --heap-pages 4096 --chain pangolin-dev --output node/runtime/pangolin/src/weights/ --extrinsic 'claim_bounty' --pallet 'pallet_bounties'&#xD;&#xA;&#xD;&#xA;# result                     &#xD;&#xA;2022-08-11 16:51:39 `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0    &#xD;&#xA;2022-08-11 16:51:39 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-08-11 16:51:39 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-08-11 16:51:39 [0]  new validator set of size 1 has been processed for era 1    &#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:77] &amp;pot_account = 6d6f646c64612f74727372790000000000000000000000000000000000000000 (5EYCAe5g...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:80] &amp;value = 1000000000&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:150] frame_system::Pallet::&lt;T&gt;::block_number() = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:155] &amp;bounty_id = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:157] &amp;curator = 4a12a3ac483a9db634e75b6358a8fdc1ca6d3b784566cd4e0c092b0f910c5b71 (5DjpwLaa...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:162] &amp;beneficiary = MultiAddress::Id(&#xD;&#xA;    7733dba55f14729038399c06e59481896b0a1531fbb807f1b77a712e8e3e63cb (5EkzxfK9...),&#xD;&#xA;)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:77] &amp;pot_account = 6d6f646c64612f74727372790000000000000000000000000000000000000000 (5EYCAe5g...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:80] &amp;value = 1000000000&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:150] frame_system::Pallet::&lt;T&gt;::block_number() = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:155] &amp;bounty_id = 0&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:157] &amp;curator = 4a12a3ac483a9db634e75b6358a8fdc1ca6d3b784566cd4e0c092b0f910c5b71 (5DjpwLaa...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:162] &amp;beneficiary = MultiAddress::Id(&#xD;&#xA;    7733dba55f14729038399c06e59481896b0a1531fbb807f1b77a712e8e3e63cb (5EkzxfK9...),&#xD;&#xA;)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:77] &amp;pot_account = 6d6f646c64612f74727372790000000000000000000000000000000000000000 (5EYCAe5g...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:80] &amp;value = 1000000000&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:150] frame_system::Pallet::&lt;T&gt;::block_number() = 57600&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:155] &amp;bounty_id = 1&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:157] &amp;curator = 4a12a3ac483a9db634e75b6358a8fdc1ca6d3b784566cd4e0c092b0f910c5b71 (5DjpwLaa...)&#xD;&#xA;[/root/.cargo/git/checkouts/substrate-a7fa553ead635512/a7bbfa3/frame/bounties/src/benchmarking.rs:162] &amp;beneficiary = MultiAddress::Id(&#xD;&#xA;    7733dba55f14729038399c06e59481896b0a1531fbb807f1b77a712e8e3e63cb (5EkzxfK9...),&#xD;&#xA;)&#xD;&#xA;Error: Input(&quot;Premature&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I notice block number 57600 is `BountyDepositPayoutDelay`. And I think it was changed by this [line](https://github.com/paritytech/substrate/blob/master/frame/bounties/src/benchmarking.rs#L159).&#xD;&#xA;&#xD;&#xA;But why? Every new round should be started with a branch new state. Also, why the first two round works but failed at the third round?&#xD;&#xA;&#xD;&#xA;If I run the pallet-bounties's benchmark in Polkadot. It works as expected. Always starting from block number 0.&#xD;&#xA;&#xD;&#xA;Custom logs are defined [here](https://github.com/darwinia-network/substrate/blob/xavier/debug/frame/bounties/src/benchmarking.rs).&#xD;&#xA;&#xD;&#xA;It looks like this [line](https://github.com/paritytech/substrate/blob/a1a9b475c354d873f91135ed5fa028ac9ef6a2c4/frame/benchmarking/src/lib.rs#L1113) doesn't work." ContentLicense="CC BY-SA 4.0" />
  <row Id="15915" PostHistoryTypeId="2" PostId="4238" RevisionGUID="391d559b-ed5a-48ca-95af-8eb6fcd47907" CreationDate="2022-08-11T11:14:43.540" UserId="632" Text="We just migrated from substrate v3 to substrate v4, after that I expected to have metadata V14 when I'll call ```state_getMetadata``` rpc method.&#xD;&#xA;but I still get V12 metadata and I dont understand why.&#xD;&#xA;&#xD;&#xA;If you have an idea.. &#xD;&#xA;thank you. " ContentLicense="CC BY-SA 4.0" />
  <row Id="15917" PostHistoryTypeId="1" PostId="4238" RevisionGUID="391d559b-ed5a-48ca-95af-8eb6fcd47907" CreationDate="2022-08-11T11:14:43.540" UserId="632" Text="Metadata V12 / V14" ContentLicense="CC BY-SA 4.0" />
  <row Id="15918" PostHistoryTypeId="3" PostId="4238" RevisionGUID="391d559b-ed5a-48ca-95af-8eb6fcd47907" CreationDate="2022-08-11T11:14:43.540" UserId="632" Text="|substrate-node|json-rpc|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15919" PostHistoryTypeId="2" PostId="4239" RevisionGUID="b06c5336-97bd-45fb-b8f5-09aa18e619af" CreationDate="2022-08-11T13:36:33.927" UserId="1870" Text="I followed the [instructions][1] to install *substrate-contracts-node*. However, it failed with the following error:&#xD;&#xA;&#xD;&#xA;    % cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked&#xD;&#xA;    &#xD;&#xA;        Updating git repository `https://github.com/paritytech/substrate-contracts-node.git`&#xD;&#xA;      Installing contracts-node v0.18.0 (https://github.com/paritytech/substrate-contracts-node.git#10f07a81)&#xD;&#xA;        Updating crates.io index&#xD;&#xA;    error: failed to select a version for the requirement `libp2p = &quot;^0.46.1&quot;`&#xD;&#xA;    candidate versions found which didn't match: 0.45.1, 0.45.0, 0.44.0, ...&#xD;&#xA;    location searched: crates.io index&#xD;&#xA;    required by package `sc-cli v0.10.0-dev (https://github.com/paritytech/substrate#74a6370e)`&#xD;&#xA;        ... which satisfies git dependency `sc-cli` (locked to 0.10.0-dev) of package `contracts-node v0.18.0 (/Users/xxx/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/10f07a8/node)`&#xD;&#xA;&#xD;&#xA;I also tried using a specific tag, e.g. &#xD;&#xA;&#xD;&#xA;    cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.18.0 --force --locked&#xD;&#xA;&#xD;&#xA;but the result was the same for v0.17.0 and v0.18.0. However, on v0.16.0 it worked.&#xD;&#xA;&#xD;&#xA;I'm using macOS 12.5 (21G72) on a MacBook Pro M1 (14-inch, 2021). However, I tried running it on an Ubuntu machine and the behaviour was the same.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node#build-locally&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15921" PostHistoryTypeId="1" PostId="4239" RevisionGUID="b06c5336-97bd-45fb-b8f5-09aa18e619af" CreationDate="2022-08-11T13:36:33.927" UserId="1870" Text="Error when installing substrate-contracts-node (v0.17.0, v0.18.0)" ContentLicense="CC BY-SA 4.0" />
  <row Id="15922" PostHistoryTypeId="3" PostId="4239" RevisionGUID="b06c5336-97bd-45fb-b8f5-09aa18e619af" CreationDate="2022-08-11T13:36:33.927" UserId="1870" Text="|substrate-node|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15923" PostHistoryTypeId="5" PostId="3779" RevisionGUID="e687e177-17b1-4fcd-b540-2626e8db52a2" CreationDate="2022-08-11T13:46:43.543" UserId="627" Comment="Add toPrimitive description" Text="As of metadata v14 you don't need to pass any type definitions - the runtime metadata fully specifies all objects and the API will use these type definitions. &#xD;&#xA;&#xD;&#xA;In general, there are a couple of `to*` methods on `Codec` objects. They are -&#xD;&#xA;&#xD;&#xA; - `toHuman()` - this returns a human-readable presentation of the data. Generally you don't want to use these programatically, it is formatted for (slightly opinionated) display&#xD;&#xA; - `toJSON()` - this returns an object that is meant for passing over RPC. This means that data is presented in a format that makes sense to RPC servers, i.e. `Vec&lt;u8&gt;` appears as hex, numbers (&gt; `u32`) as well.&#xD;&#xA; - `toPrimitive()` - this returns a best-effort JS primitive representation with boolean/string/number fields&#xD;&#xA; - `toHex()` - this returns a hex-based representation&#xD;&#xA; - `toU8a()` - this returns a SCALE representation of the data&#xD;&#xA; - `toString()` - this is a text data representation&#xD;&#xA;&#xD;&#xA;Objects that represent numbers have additional utility methods, such as `toNumber()`, `toBn()` and `toBigInt()`.&#xD;&#xA;&#xD;&#xA;In your case you have a Rust struct. These are decoded into [a JS Map object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), so it has all the methods that are on normal maps. &#xD;&#xA;&#xD;&#xA;Additionally, field getters are also added to this `Map`, it means you can do -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// retrieve object, it has the on-chain form&#xD;&#xA;// { a: 'Vec&lt;u8&gt;', b: 'u64' }&#xD;&#xA;const obj = await api.query.somewhere.foo();&#xD;&#xA;&#xD;&#xA;// display the internal values as string, each field&#xD;&#xA;// has a getter, so no need to use obj.get(&lt;field&gt;)&#xD;&#xA;console.log(&#xD;&#xA;  // Vec&lt;u8&gt;/Bytes has toUtf8() for string representation&#xD;&#xA;  obj.a.toUtf8(),&#xD;&#xA;  // display number as non-formatted string&#xD;&#xA;  obj.b.toString()&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in this case for any struct, you have getters that gives you access to the specific fields (over-and-above general `Map` methods such as `.entries()`, etc.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="15924" PostHistoryTypeId="5" PostId="4239" RevisionGUID="609ed1b9-ed38-45f6-9434-526ddcf46b19" CreationDate="2022-08-11T13:50:24.533" UserId="1870" Comment="added 42 characters in body" Text="I followed the [instructions][1] to install *substrate-contracts-node*. However, it failed with the following error:&#xD;&#xA;&#xD;&#xA;    % cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked&#xD;&#xA;    &#xD;&#xA;        Updating git repository `https://github.com/paritytech/substrate-contracts-node.git`&#xD;&#xA;      Installing contracts-node v0.18.0 (https://github.com/paritytech/substrate-contracts-node.git#10f07a81)&#xD;&#xA;        Updating crates.io index&#xD;&#xA;    error: failed to select a version for the requirement `libp2p = &quot;^0.46.1&quot;`&#xD;&#xA;    candidate versions found which didn't match: 0.45.1, 0.45.0, 0.44.0, ...&#xD;&#xA;    location searched: crates.io index&#xD;&#xA;    required by package `sc-cli v0.10.0-dev (https://github.com/paritytech/substrate#74a6370e)`&#xD;&#xA;        ... which satisfies git dependency `sc-cli` (locked to 0.10.0-dev) of package `contracts-node v0.18.0 (/Users/xxx/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/10f07a8/node)`&#xD;&#xA;&#xD;&#xA;I also tried using a specific tag, e.g. &#xD;&#xA;&#xD;&#xA;    cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.18.0 --force --locked&#xD;&#xA;&#xD;&#xA;but the result was the same for v0.17.0 and v0.18.0. However, on v0.16.0 this error doesn't appear (but another one appears: *error[E0658]: default values for const generic parameters are experimental*).&#xD;&#xA;&#xD;&#xA;I'm using macOS 12.5 (21G72) on a MacBook Pro M1 (14-inch, 2021). However, I tried running it on an Ubuntu machine and the behaviour was the same.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node#build-locally&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15925" PostHistoryTypeId="2" PostId="4240" RevisionGUID="d3a357b0-9ac9-43bc-a895-9bee007af0ce" CreationDate="2022-08-11T14:12:56.940" UserId="282" Text="While observing the GrandPa communication between 2 substrates nodes and 1 gossamer node I notice that only `Prevotes` and `Precommmits` were being exchanged. Currently, are the `PrimaryProposal` messages not in use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15927" PostHistoryTypeId="1" PostId="4240" RevisionGUID="d3a357b0-9ac9-43bc-a895-9bee007af0ce" CreationDate="2022-08-11T14:12:56.940" UserId="282" Text="Currently, does substrate/polkadot make use of PrimaryProposal stage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15928" PostHistoryTypeId="3" PostId="4240" RevisionGUID="d3a357b0-9ac9-43bc-a895-9bee007af0ce" CreationDate="2022-08-11T14:12:56.940" UserId="282" Text="|substrate-node|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15929" PostHistoryTypeId="2" PostId="4241" RevisionGUID="cf6370da-ff9b-4d1a-ab7f-27a349a790d6" CreationDate="2022-08-11T14:17:02.480" UserId="555" Text="What is the use of **ProposalIndex** in pallet-collective? However, we also have **proposal_hash** for identifying the proposal." ContentLicense="CC BY-SA 4.0" />
  <row Id="15931" PostHistoryTypeId="1" PostId="4241" RevisionGUID="cf6370da-ff9b-4d1a-ab7f-27a349a790d6" CreationDate="2022-08-11T14:17:02.480" UserId="555" Text="Use of ProposalIndex in pallet-collective" ContentLicense="CC BY-SA 4.0" />
  <row Id="15932" PostHistoryTypeId="3" PostId="4241" RevisionGUID="cf6370da-ff9b-4d1a-ab7f-27a349a790d6" CreationDate="2022-08-11T14:17:02.480" UserId="555" Text="|pallet|substrate-node-template|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15933" PostHistoryTypeId="5" PostId="4095" RevisionGUID="0bcd086a-90e4-41fc-ad22-9e30fcff5417" CreationDate="2022-08-11T15:02:29.193" UserId="2809" Comment="added 177 characters in body" Text="As the title says, I have added EVM Compatibility to my NPoS runtime(using [chainsafe/substrate-node-template](https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking)), and when i run my node with Alice and Bob validators, the StakingElection begins to fail.&#xD;&#xA;&#xD;&#xA;**NOTE** The chainsafe template had an issue where eras didn't change hence no election occured, but I have solved that with [this pr](https://github.com/ChainSafe/substrate-node-template/pull/4), the NPoS election works fine not having added the EVM pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**UPDATE 1** I have added pallet_ethereum, changed SubstrateBlockHashMapping to EthereuBlockhashMapping, still the same issue.&#xD;&#xA;If I remove all EVM related stuff, my NPoS works fine. Solution is submitted, election is finalized and a new authority set is chosen.&#xD;&#xA;&#xD;&#xA;**UPDATE 2**&#xD;&#xA;I forgot to add an image of whaat should normally happen(when pallet_evm is not installed)&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;**UPDATE 3**&#xD;&#xA;Here is the branch and repo in question [here][3]&#xD;&#xA;&#xD;&#xA;**UPDATE 4**&#xD;&#xA;It appears using fp_evm::GenesisAccount to create and endow some test accounts in chain_spec for EVMConfig breaks the NPoS election for both polkadotv0.9.22 and polkadotv0.9.25, without endowed test accounts I cannot test any of the EVM compatibility. &#xD;&#xA;It looks like fp_evm is causing the break. Is this an active issue? and will Frontier be fixing this?&#xD;&#xA;**Note** that I am not working with a parachain, it is a **standalone** chain with EVM compatability,&#xD;&#xA;&#xD;&#xA;**UPDATE 5**&#xD;&#xA;I have added 5 accounts in EVMGenesis config, but looks there aren't any&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2pO2q.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/t6yQZ.png&#xD;&#xA;  [3]: https://github.com/talhadaar/chainsafe-substrate-node-template/tree/question&#xD;&#xA;  [4]: https://i.stack.imgur.com/Pbvrm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="15935" PostHistoryTypeId="6" PostId="4239" RevisionGUID="00d8f53e-a6fd-48f5-b568-28063b7e0186" CreationDate="2022-08-11T15:19:27.530" UserId="34" Comment="edited tags" Text="|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15936" PostHistoryTypeId="2" PostId="4242" RevisionGUID="a4bd6694-ac88-4dd4-9e69-758a94fdd7bc" CreationDate="2022-08-11T16:34:21.293" UserId="2060" Text="If you see the error in the Polkadot UI/dashboard while submitting an extrinsic: &quot;`Unable to retrieve header and parent from supplied hash.`&quot; under the following conditions:&#xD;&#xA;* even a simple balance transfer fails in the same way&#xD;&#xA;* local chain development&#xD;&#xA;* you restarted your chain&#xD;&#xA;&#xD;&#xA;Then try clearing your browser cache.&#xD;&#xA;&#xD;&#xA;I also got this error when trying an extrinsic through the dashboard when connected to a local chain. I attempted a simple balance transfer and this failed with the above error. This issue crops up for me fairly often when I'm developing, if I've restarted my chain, even after deleting the chain db.  Clearing the browser cache fixes it.&#xD;&#xA;&#xD;&#xA;Yep, browser clinging to its cache for dear life strikes again." ContentLicense="CC BY-SA 4.0" />
  <row Id="15938" PostHistoryTypeId="2" PostId="4243" RevisionGUID="eca56ea2-c3fe-4ac0-a6fe-7b71cabdaafc" CreationDate="2022-08-11T16:52:17.493" UserId="2441" Text="Our runtime uses an inherent which itself requires a pre-runtime digest to be present. I don't believe this is supported; from what I can tell, the benchmarking only handles the `inherents` provided by the implementation:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/utils/frame/benchmarking-cli/src/extrinsic/bench.rs#L130&#xD;&#xA;&#xD;&#xA;Specifically, we use `author-inherent` from `Nimbus`: https://github.com/PureStake/nimbus/blob/0e5702105941baba0e08b343ceaa217192191b73/pallets/author-inherent/src/lib.rs&#xD;&#xA;&#xD;&#xA;Which follows this workflow:&#xD;&#xA;&#xD;&#xA;* `on_initialize()` must be called with a certain `pre_runtime_digest` present. This is copied into a storage item.&#xD;&#xA;* The `kickoff_authorship_validation` inherent must then be called, which then expects this storage item to be present.&#xD;&#xA;&#xD;&#xA;Without the ability to inject this pre-runtime digest, `benchmark overhead` is triggering a failure in this inherent because `on_initialize` failed to find the injected digest into pallet storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="15940" PostHistoryTypeId="1" PostId="4243" RevisionGUID="eca56ea2-c3fe-4ac0-a6fe-7b71cabdaafc" CreationDate="2022-08-11T16:52:17.493" UserId="2441" Text="Can `benchmark overhead` support `pre-runtime digests`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15941" PostHistoryTypeId="3" PostId="4243" RevisionGUID="eca56ea2-c3fe-4ac0-a6fe-7b71cabdaafc" CreationDate="2022-08-11T16:52:17.493" UserId="2441" Text="|benchmark|digest|inherent|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15942" PostHistoryTypeId="2" PostId="4244" RevisionGUID="f93ff325-05bf-4f83-a7be-e576c1fd9fcb" CreationDate="2022-08-11T17:01:41.827" UserId="703" Text="In addition to the other answer, there is a possibility to use a different data-structure for nested-mappings. An easy to implement one is [BTreeMap][1]. It is worth noting that `BTreeMap` is not as efficient as `Mapping`. See [this answer][2] for details.&#xD;&#xA;&#xD;&#xA;Here is an example implementation based on your code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use ink_prelude::collections::BTreeMap;&#xD;&#xA;&#xD;&#xA;CoreStorage {&#xD;&#xA;    coin_storage: CoinStore,&#xD;&#xA;    event_storage: {&#xD;&#xA;        event_type_1: Mapping&lt;EventId, EventType1&gt;,&#xD;&#xA;        event_type_2: Mapping&lt;EventId, EventType2&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;EventType1 {&#xD;&#xA;    event_info: EventInfo,&#xD;&#xA;    event_orderbook: EventOrderBook&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;EventOrderbook {&#xD;&#xA;    orders_0: BTreeMap&lt;AccountId, Order&gt;,&#xD;&#xA;    orders_1: BTreeMap&lt;AccountId, Order&gt; &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/ink/ink_prelude/collections/btree_map/struct.BTreeMap.html&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/1099/2696" ContentLicense="CC BY-SA 4.0" />
  <row Id="15944" PostHistoryTypeId="2" PostId="4245" RevisionGUID="46aaf610-b869-441f-8a3b-739b491aff30" CreationDate="2022-08-11T17:08:45.957" UserId="494" Text="When creating a `StorageMap`, a hashing algorithm needs to be chosen for the `StorageHasher`.&#xD;&#xA;&#xD;&#xA;`frame_support` provides [a few options][1]:&#xD;&#xA;- `Identity`&#xD;&#xA;- `Blake2_128`&#xD;&#xA;- `Blake2_128Concat`&#xD;&#xA;- `Blake2_256`&#xD;&#xA;- `Twox64Concat`&#xD;&#xA;- `Twox128`&#xD;&#xA;- `Twox256`&#xD;&#xA;&#xD;&#xA;Where `Identity` means using the key directly (with no hashing), `Blake2_*` means using some variation of the [BLAKE2](https://www.blake2.net/) algorithm, and `Twox*` means using some variation of the [xxHash](https://cyan4973.github.io/xxHash/) algorithm.&#xD;&#xA;&#xD;&#xA;The question here is: what criteria would one take into account when choosing BLAKE2 vs xxHash for their `StorageHasher` object? When to choose one over the other?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/frame-support/2.0.0-rc2/frame_support/index.html#structs" ContentLicense="CC BY-SA 4.0" />
  <row Id="15946" PostHistoryTypeId="1" PostId="4245" RevisionGUID="46aaf610-b869-441f-8a3b-739b491aff30" CreationDate="2022-08-11T17:08:45.957" UserId="494" Text="StorageHasher: Blake2 vs Twox" ContentLicense="CC BY-SA 4.0" />
  <row Id="15947" PostHistoryTypeId="3" PostId="4245" RevisionGUID="46aaf610-b869-441f-8a3b-739b491aff30" CreationDate="2022-08-11T17:08:45.957" UserId="494" Text="|storage|hash|storagenmap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15948" PostHistoryTypeId="2" PostId="4246" RevisionGUID="4694549f-c6a8-4da7-a336-1d07d7df3583" CreationDate="2022-08-11T18:36:04.040" UserId="3005" Text="We've gone through the [tutorial][1] for running upgrades. We've been able to successfully upgrade using the Polkadot UI.&#xD;&#xA;&#xD;&#xA;However, when we do the same thing with our custom Runtime, although the tx says it's added to block, the version doesn't get bumped. i.e. the upgrade isn't successful.&#xD;&#xA;&#xD;&#xA;On investigation of the block with the included tx, we find this event:&#xD;&#xA;```&#xD;&#xA;Unable to decode storage system.events:: createType(Vec&lt;EventRecord&gt;):: Vec&lt;EventRecord&gt;:: Decoded input doesn't match input, received&#xD;&#xA;0x0c020c0500000000000000005095a20900000000020000000100000000010305000000000000000000010000 (44 bytes), created 0x0c020c0500000000000000005095a20900000000020000000100000000010305000000000000000000010000000000 (47 bytes)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This event error isn't helping us understand what we're doing wrong.&#xD;&#xA;&#xD;&#xA;Does anyone have any ideas what might be different about our Runtime that could be causing this? Or, is there a way that we could get more information about what's going wrong?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/get-started/forkless-upgrade/" ContentLicense="CC BY-SA 4.0" />
  <row Id="15950" PostHistoryTypeId="1" PostId="4246" RevisionGUID="4694549f-c6a8-4da7-a336-1d07d7df3583" CreationDate="2022-08-11T18:36:04.040" UserId="3005" Text="Why isn't our Runtime updating with `set_code`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15951" PostHistoryTypeId="3" PostId="4246" RevisionGUID="4694549f-c6a8-4da7-a336-1d07d7df3583" CreationDate="2022-08-11T18:36:04.040" UserId="3005" Text="|runtime|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15952" PostHistoryTypeId="5" PostId="4240" RevisionGUID="8ad77b03-a084-4120-a635-cb33f9fc4621" CreationDate="2022-08-11T19:38:59.223" UserId="12" Comment="add links and minor nitpicks" Text="While observing the GRANDPA communication between 2 Substrates nodes and 1 [Gossamer][1] node I notice that only [`Prevotes`][2] and [`Precommmits`][3] were being exchanged. Currently, are the [`PrimaryProposal`][4] messages not in use?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ChainSafe/gossamer&#xD;&#xA;  [2]: https://crates.parity.io/sc_finality_grandpa/type.Prevote.html&#xD;&#xA;  [3]: https://crates.parity.io/sc_finality_grandpa/type.Precommit.html&#xD;&#xA;  [4]: https://crates.parity.io/sc_finality_grandpa/type.PrimaryPropose.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="15953" PostHistoryTypeId="24" PostId="4240" RevisionGUID="8ad77b03-a084-4120-a635-cb33f9fc4621" CreationDate="2022-08-11T19:38:59.223" Comment="Proposed by 12 approved by 282 edit id of 266" ContentLicense="CC BY-SA 4.0" />
  <row Id="15954" PostHistoryTypeId="2" PostId="4247" RevisionGUID="8879e285-604d-4b01-bf7e-cead72c55247" CreationDate="2022-08-11T20:31:21.357" UserId="2752" Text="I have a contract which I want to call using the polkadot{.js} extension.&#xD;&#xA;To call the method successfully, you have to sign it.&#xD;&#xA;When I am now signing a method, I have trouble reading out the value the method&#xD;&#xA;should give me, when executed properly.&#xD;&#xA;&#xD;&#xA;If I would not have to sign the method, I would read the output the follwing way:&#xD;&#xA;&#xD;&#xA;    const { output } = await contract.query.method(&#xD;&#xA;        account.address,&#xD;&#xA;        {&#xD;&#xA;            gasLimit,&#xD;&#xA;            storageDepositLimit,&#xD;&#xA;        },&#xD;&#xA;        variables&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;    console.log(output.toHuman())&#xD;&#xA;&#xD;&#xA;And the output would look smth like that:&#xD;&#xA;&#xD;&#xA;&gt; Ok('result here')&#xD;&#xA;&#xD;&#xA;Now I have to sign the method first, and the code looks the following way:&#xD;&#xA;&#xD;&#xA;    const { output } = await contract.tx&#xD;&#xA;        .method({ storageDepositLimit, gasLimit }, variables)&#xD;&#xA;        .signAndSend(account.address, {signer: injector.signer},  result =&gt; {&#xD;&#xA;        if (result.status.isInBlock) {&#xD;&#xA;            console.log('in a block');&#xD;&#xA;        } else if (result.status.isFinalized) {&#xD;&#xA;          console.log('finalized');&#xD;&#xA;          console.log(result.toHuman())&#xD;&#xA;        }&#xD;&#xA;    })&#xD;&#xA;&#xD;&#xA;The 'result.toHuman()' part does not give me the output of the method. And when I try to call 'output.toHuman()' it tells me that output is undefined.&#xD;&#xA;&#xD;&#xA;How can I access the output of the method, when signing the execution prior?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15956" PostHistoryTypeId="1" PostId="4247" RevisionGUID="8879e285-604d-4b01-bf7e-cead72c55247" CreationDate="2022-08-11T20:31:21.357" UserId="2752" Text="How to get output when calling a contract method and signing it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15957" PostHistoryTypeId="3" PostId="4247" RevisionGUID="8879e285-604d-4b01-bf7e-cead72c55247" CreationDate="2022-08-11T20:31:21.357" UserId="2752" Text="|polkadot-js|smart-contract|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15958" PostHistoryTypeId="5" PostId="4246" RevisionGUID="4f9bb785-459b-4480-8d86-ebcb0b673853" CreationDate="2022-08-11T20:37:28.030" UserId="3005" Comment="added 99 characters in body" Text="We've gone through the [tutorial][1] for running upgrades. We've been able to successfully upgrade using the Polkadot UI.&#xD;&#xA;&#xD;&#xA;However, when we do the same thing with our custom Runtime, although the tx says it's added to block, the version doesn't get bumped. i.e. the upgrade isn't successful.&#xD;&#xA;&#xD;&#xA;On investigation of the block with the included tx, we find this event:&#xD;&#xA;```&#xD;&#xA;Unable to decode storage system.events:: createType(Vec&lt;EventRecord&gt;):: Vec&lt;EventRecord&gt;:: Decoded input doesn't match input, received&#xD;&#xA;0x0c020c0500000000000000005095a20900000000020000000100000000010305000000000000000000010000 (44 bytes), created 0x0c020c0500000000000000005095a20900000000020000000100000000010305000000000000000000010000000000 (47 bytes)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This event error isn't helping us understand what we're doing wrong.&#xD;&#xA;&#xD;&#xA;Does anyone have any ideas what might be different about our Runtime that could be causing this? Or, is there a way that we could get more information about what's going wrong?&#xD;&#xA;&#xD;&#xA;I'll note that our Runtime is on `3.0.0` and the tutorial code we're running is on `4.0.0-dev`.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/get-started/forkless-upgrade/" ContentLicense="CC BY-SA 4.0" />
  <row Id="15959" PostHistoryTypeId="2" PostId="4248" RevisionGUID="75bd38a0-b293-4ff6-991f-db54e5a066d9" CreationDate="2022-08-11T21:32:29.277" UserId="351" Text="From the documentation. Blake2 is a cryptographic hasher and it's slow while Twox is non-cryptographic and fast." ContentLicense="CC BY-SA 4.0" />
  <row Id="15961" PostHistoryTypeId="2" PostId="4249" RevisionGUID="7c3e6406-e06f-4666-bc0c-b61cfce5a789" CreationDate="2022-08-12T01:03:52.713" UserId="181" Text="We faced a situation the other day where we needed some result of std operations inside of our benchmarks. Specifically, we were looking to generate key pairs and signatures from types given by [app_crypto!][1](`Pair` and `Signature`). I imagine there are plenty of other use cases for performing operations depending on std though. So I was curious if there is any existing way around this limitation at the moment.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-application-crypto/2.0.0-alpha.5/sp_application_crypto/macro.app_crypto.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="15963" PostHistoryTypeId="1" PostId="4249" RevisionGUID="7c3e6406-e06f-4666-bc0c-b61cfce5a789" CreationDate="2022-08-12T01:03:52.713" UserId="181" Text="Get results of some std operations in benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="15964" PostHistoryTypeId="3" PostId="4249" RevisionGUID="7c3e6406-e06f-4666-bc0c-b61cfce5a789" CreationDate="2022-08-12T01:03:52.713" UserId="181" Text="|runtime|benchmarking|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15965" PostHistoryTypeId="2" PostId="4250" RevisionGUID="ccffbc52-0482-43b1-88b6-4384b62a21d2" CreationDate="2022-08-12T03:10:23.997" UserId="251" Text="If you are sure that your std configuration is correct.&#xD;&#xA;&#xD;&#xA;Take a look at https://github.com/paritytech/substrate/pull/10837. You may need to cherry-pick this one." ContentLicense="CC BY-SA 4.0" />
  <row Id="15967" PostHistoryTypeId="2" PostId="4251" RevisionGUID="ad0d9dbd-a2d6-4aed-aff3-bf92161337ea" CreationDate="2022-08-12T03:51:09.270" UserId="251" Text="It's because my ED is too small. Then it fails somewhere.&#xD;&#xA;&#xD;&#xA;&gt; Huh, there is actually an issue with resetting the State in case the Extrinsic errors. I am currently fixing it but for that to work you would have to update your Substrate. – &#xD;&#xA;Oliver Tale-Yazdi&#xD;&#xA;&#xD;&#xA;And it might relate to that bug. So the state can not be reset. Substrate&amp;Polkadot's ED is big enough so no error, and they are able to reset DB correctly.&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="15969" PostHistoryTypeId="2" PostId="4252" RevisionGUID="586b2e5d-2b2b-4619-ba58-a50fce2bed90" CreationDate="2022-08-12T06:33:59.333" UserId="2025" Text="To complete to the answers:&#xD;&#xA;&#xD;&#xA;The deciding factor to choose _Blake2_ (cryptographic hashing function) over _xxHash_ (simple hashing function) is whether the input to be hashed is set by the users or by the system. In other words, the part of the storage key that can be &quot;choosen&quot; by users has to be randomly and uniformly distributed (aka secure) and for that we need a cryptographic hashing function. We need this property to avoid having unbalanced state tries in the chan storage. &#xD;&#xA;&#xD;&#xA;For example, if _xxHash_ was used as the `StorageHasher` for Account IDs, an attacker could create an unbalanced state trie, with a vanity account generator and some tokens to spare, just creating accounts with account IDs sharing the same trie prefix.&#xD;&#xA;&#xD;&#xA;[This article by Shawn](https://www.shawntabrizi.com/substrate/transparent-keys-in-substrate/) is a very good dive on the topic of storage keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="15971" PostHistoryTypeId="2" PostId="4253" RevisionGUID="55b60520-aa61-436f-a017-08a8794ae36c" CreationDate="2022-08-12T06:40:17.667" UserId="227" Text="This is likely caused by an old Rust toolchain being used for the installation on your local machine.&#xD;&#xA;&#xD;&#xA;You can check which toolchain is used by executing `rustup show` before the `cargo install` command.&#xD;&#xA;&#xD;&#xA;This is the toolchain which works for me locally:&#xD;&#xA;```&#xD;&#xA;rustc 1.64.0-nightly (2643b1646 2022-07-27)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can try using the same one by executing `rustup override set nightly-2022-07-28` before the install command." ContentLicense="CC BY-SA 4.0" />
  <row Id="15973" PostHistoryTypeId="2" PostId="4254" RevisionGUID="9c4f9d60-10cb-4a50-bdf0-de1f77705fd8" CreationDate="2022-08-12T09:09:11.967" UserId="362" Text="There has been an evolution in how one defines pallets in the Substrate framework over time, and this has left the ecosystem in a state where useful pallets exist in different versions. &#xD;&#xA;&#xD;&#xA;This begs the question&#xD;&#xA;&#xD;&#xA;**is it safe to mix pallets built using distinct FRAME macros in the same runtime?**&#xD;&#xA;&#xD;&#xA;In other words, if it all builds, can one assume there is no extra risk or problems coming from the mixing itself? " ContentLicense="CC BY-SA 4.0" />
  <row Id="15975" PostHistoryTypeId="1" PostId="4254" RevisionGUID="9c4f9d60-10cb-4a50-bdf0-de1f77705fd8" CreationDate="2022-08-12T09:09:11.967" UserId="362" Text="Mixing FRAME macros in a single runtime or pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="15976" PostHistoryTypeId="3" PostId="4254" RevisionGUID="9c4f9d60-10cb-4a50-bdf0-de1f77705fd8" CreationDate="2022-08-12T09:09:11.967" UserId="362" Text="|pallet|macro|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15977" PostHistoryTypeId="2" PostId="4255" RevisionGUID="bd123cf6-edff-44af-aea5-006b689d859f" CreationDate="2022-08-12T09:16:54.670" UserId="362" Text="- `on_initialize` returns a weight, but what is the effect of this weight exceeding block weight limit? Is the block valid? can extrinsic still be included?&#xD;&#xA;- `on_finalized` does not return a weight, does that mean it always runs regardless of what remains of the block weight budget as a result of extrinsics+`on_initialize`" ContentLicense="CC BY-SA 4.0" />
  <row Id="15979" PostHistoryTypeId="1" PostId="4255" RevisionGUID="bd123cf6-edff-44af-aea5-006b689d859f" CreationDate="2022-08-12T09:16:54.670" UserId="362" Text="Do `on_finalized` and `on_initialize` impact block weight budget?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15980" PostHistoryTypeId="3" PostId="4255" RevisionGUID="bd123cf6-edff-44af-aea5-006b689d859f" CreationDate="2022-08-12T09:16:54.670" UserId="362" Text="|benchmarking|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15981" PostHistoryTypeId="2" PostId="4256" RevisionGUID="6f81bfff-3c77-4044-96da-134555bcb54b" CreationDate="2022-08-12T10:08:51.830" UserId="2344" Text="According to the [documentation][1], `api.query.nominationPools.poolMembers` should yield details about pool members.&#xD;&#xA;&#xD;&#xA;The result should be a Map so we should be able to iterate the .entries / .keys.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;(async () {&#xD;&#xA;  const provider = new WsProvider('wss://kusama-rpc.polkadot.io')&#xD;&#xA;  const api = await ApiPromise.create({ provider: provider })&#xD;&#xA;&#xD;&#xA;  var addresses = [&#xD;&#xA;    'F3opxRbN5ZavB4LTn2JaUnScQc7G7G177CPnqjBpa9F9Gdr', // pool 50 stash&#xD;&#xA;    'F3opxRbN5ZavB4LTn2aKWL2iuHJifMsqn8uLnR2HQ1yQs7t', // pool 50 reward&#xD;&#xA;    'HhYuQCR1pJKVwPruCSNr8xp4R1ovqtAbNy3S8VuMXsPtBmH', // pool 50 depositor/root/etc&#xD;&#xA;  ]&#xD;&#xA;&#xD;&#xA;  addresses.forEach(async (address) =&gt; {&#xD;&#xA;    console.log('address', address)&#xD;&#xA;    var members = await api.query.nominationPools.poolMembers.entries(address)&#xD;&#xA;    var keys    = await api.query.nominationPools.poolMembers.keys(address)&#xD;&#xA;    &#xD;&#xA;    console.log('members', members, 'keys', keys)&#xD;&#xA;    // const accountIds = keys.map(({ args: [accountId] }) =&gt; accountId)&#xD;&#xA;    const accountIds = keys.map(({ args }) =&gt; args)&#xD;&#xA;    console.debug('accountIds', accountIds)&#xD;&#xA;&#xD;&#xA;    members.forEach(([key, member]) =&gt; {&#xD;&#xA;      console.log('key arguments:', key.args.map((k) =&gt; k.toHuman()));&#xD;&#xA;      console.log('     exposure:', member.toHuman());&#xD;&#xA;    })&#xD;&#xA;  })&#xD;&#xA;})()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I can't get anything from the `entries()` or `keys()`&#xD;&#xA;&#xD;&#xA;returns&#xD;&#xA;```bash&#xD;&#xA;address F3opxRbN5ZavB4LTn2JaUnScQc7G7G177CPnqjBpa9F9Gdr&#xD;&#xA;address F3opxRbN5ZavB4LTn2aKWL2iuHJifMsqn8uLnR2HQ1yQs7t&#xD;&#xA;address HhYuQCR1pJKVwPruCSNr8xp4R1ovqtAbNy3S8VuMXsPtBmH&#xD;&#xA;done...&#xD;&#xA;members [] keys []&#xD;&#xA;accountIds []&#xD;&#xA;members [] keys []&#xD;&#xA;accountIds []&#xD;&#xA;members [] keys []&#xD;&#xA;accountIds []&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Just calling `await api.query.nominationPools.poolMembers(POOL_ADDRESS)` produces:&#xD;&#xA;```json&#xD;&#xA;    {&#xD;&#xA;        &quot;poolId&quot; : 34,&#xD;&#xA;        &quot;points&quot; : 1011793913984.0,&#xD;&#xA;        &quot;rewardPoolTotalEarnings&quot; : 449109804460.0,&#xD;&#xA;        &quot;unbondingEras&quot; : {}&#xD;&#xA;    },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage#poolmembersaccountid32-optionpalletnominationpoolspoolmember" ContentLicense="CC BY-SA 4.0" />
  <row Id="15983" PostHistoryTypeId="1" PostId="4256" RevisionGUID="6f81bfff-3c77-4044-96da-134555bcb54b" CreationDate="2022-08-12T10:08:51.830" UserId="2344" Text="Using polkadot.js api, how can we list the members of a Kusama nomination pool?" ContentLicense="CC BY-SA 4.0" />
  <row Id="15984" PostHistoryTypeId="3" PostId="4256" RevisionGUID="6f81bfff-3c77-4044-96da-134555bcb54b" CreationDate="2022-08-12T10:08:51.830" UserId="2344" Text="|polkadot-js|kusama|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="15985" PostHistoryTypeId="2" PostId="4257" RevisionGUID="25dda709-a141-4309-815c-531298d87baf" CreationDate="2022-08-12T10:25:31.670" UserId="2881" Text="It is a map. So to get `.entries()` you specify no parameters as [per the docs](https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries). Params would only come into play with higher-order maps [as per docs](https://polkadot.js.org/docs/api/cookbook/storage#how-do-i-use-entrieskeys-on-double-maps).&#xD;&#xA;&#xD;&#xA;To get all the entries of the pools -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const e = await api.query.nominationPools.poolMembers.entries()&#xD;&#xA;&#xD;&#xA;e.forEach(([k, v]) =&gt;&#xD;&#xA;  console.log(&#xD;&#xA;    /* AccountId */&#xD;&#xA;    k.args[0].toString(),&#xD;&#xA;    /* Pool info */&#xD;&#xA;    JSON.stringify(v.toHuman())&#xD;&#xA;  )&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which would look like something like the following on Kusama -&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;GyBph4GJZsiMNJv53mACcujkWcm8NvWF7o2s2pf6PU1efh1 {&quot;poolId&quot;:&quot;46&quot;,&quot;points&quot;:&quot;100,000,000,000&quot;,&quot;rewardPoolTotalEarnings&quot;:&quot;10,378,313,014&quot;,&quot;unbondingEras&quot;:{}}&#xD;&#xA;Fk5Z52gA8Ue5G3jNWtvJzNARU1HK12ufsa5xZuDgKvQK5KX {&quot;poolId&quot;:&quot;43&quot;,&quot;points&quot;:&quot;1,000,000,000,000&quot;,&quot;rewardPoolTotalEarnings&quot;:&quot;91,827,296,941&quot;,&quot;unbondingEras&quot;:{}}&#xD;&#xA;GUiPpM5wF4KhEiTt2emUYB9VpBSuyEPYhRsE15Ur75Q4ToM {&quot;poolId&quot;:&quot;54&quot;,&quot;points&quot;:&quot;5,000,000,000,000&quot;,&quot;rewardPoolTotalEarnings&quot;:&quot;1,713,575,059&quot;,&quot;unbondingEras&quot;:{}}&#xD;&#xA;EFQ1wXD4X1KvV68Ks9VsM2XEjrGZhZo14sjSLQndCTgTRrU {&quot;poolId&quot;:&quot;2&quot;,&quot;points&quot;:&quot;2,138,360,777,446&quot;,&quot;rewardPoolTotalEarnings&quot;:&quot;9,324,915,743,936&quot;,&quot;unbondingEras&quot;:{}}&#xD;&#xA;G5NLBLGAUgozcXseaWSsCpfXnxqHcSW7nAAZ689PvspThnE {&quot;poolId&quot;:&quot;34&quot;,&quot;points&quot;:&quot;500,000,000,000&quot;,&quot;rewardPoolTotalEarnings&quot;:&quot;562,215,251,310&quot;,&quot;unbondingEras&quot;:{}}&#xD;&#xA;DE1QQkVPp8XVksN4v6qnQYWUjMBBrPGLkHtHM4zZ8N9Vmoc {&quot;poolId&quot;:&quot;5&quot;,&quot;points&quot;:&quot;1,000,000,000,000&quot;,&quot;rewardPoolTotalEarnings&quot;:&quot;0&quot;,&quot;unbondingEras&quot;:{}}&#xD;&#xA;FaJi8E1WkeGDR7f79SyburcAkzh78X587diwWhKezDxn1p8 {&quot;poolId&quot;:&quot;1&quot;,&quot;points&quot;:&quot;35,000,000,000,000&quot;,&quot;rewardPoolTotalEarnings&quot;:&quot;300,374,601,212&quot;,&quot;unbondingEras&quot;:{}}&#xD;&#xA;JKYYceWYMAoJMEw9CJWMxmfA7fZbc3he9JKDt7ivYvKXmkq {&quot;poolId&quot;:&quot;7&quot;,&quot;points&quot;:&quot;6,000,000,000,000&quot;,&quot;rewardPoolTotalEarnings&quot;:&quot;0&quot;,&quot;unbondingEras&quot;:{}}&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="15987" PostHistoryTypeId="2" PostId="4258" RevisionGUID="7c06a6a7-686e-48ab-a9be-b18f21ca9513" CreationDate="2022-08-12T11:39:54.210" UserId="45" Text="Here is the schematical representation of the block weight:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│┌──────────────────┐┌───────────────────────────────────┐┌─────────────────┐│&#xD;&#xA;││                  ││                                   ││                 ││&#xD;&#xA;││  on_initialize   ││            extrinsics             ││   on_finalize   ││&#xD;&#xA;││                  ││                                   ││                 ││&#xD;&#xA;│└──────────────────┘└───────────────────────────────────┘└─────────────────┘│&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA; ◀─────────────────────────────────Block Weight─────────────────────────────▶ &#xD;&#xA;                                                                              &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `on_initialize` is privileged in a way that it can take how much weight it wants. If necessary, the logic there can take almost the whole budget without leaving anything for the extrinsics processing.&#xD;&#xA;&#xD;&#xA;`on_finalize` is always executed and there is no way to skip that. `on_finalize` takes control after all extrinsics are executed. The problem is that whoever packs the block can fill up the extrinsics so that there is no space left for the `on_finalize` logic. That's why the convention is `on_initialize` returns the weight for itself and for `on_finalize`.&#xD;&#xA;&#xD;&#xA;Substrate does not impose any hard limits on weight. However, Polkadot does. If a parachain validation function took more weight than alloted, such a block will be discarded.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15989" PostHistoryTypeId="5" PostId="4252" RevisionGUID="637c2684-0053-4bde-b01f-8025d6c775e8" CreationDate="2022-08-12T13:29:42.540" UserId="2025" Comment="typo" Text="To complete to the answers:&#xD;&#xA;&#xD;&#xA;The deciding factor to choose _Blake2_ (cryptographic hashing function) over _xxHash_ (simple hashing function) is whether the input to be hashed is set by the users or by the system. In other words, the part of the storage key that can be &quot;choosen&quot; by users has to be randomly and uniformly distributed (aka secure) and for that we need a cryptographic hashing function. We need this property to avoid having unbalanced state tries in the chain storage. &#xD;&#xA;&#xD;&#xA;For example, if _xxHash_ was used as the `StorageHasher` for Account IDs, an attacker could create an unbalanced state trie, with a vanity account generator and some tokens to spare, just creating accounts with account IDs sharing the same trie prefix.&#xD;&#xA;&#xD;&#xA;[This article by Shawn](https://www.shawntabrizi.com/substrate/transparent-keys-in-substrate/) is a very good dive on the topic of storage keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="15990" PostHistoryTypeId="2" PostId="4259" RevisionGUID="73766ff8-3af7-4dda-a888-1c30b3aa31bb" CreationDate="2022-08-12T15:37:16.667" UserId="227" Text="In terms of ink! you could take a look at the OpenBrush reference implementation for [PSP-22](https://github.com/w3f/PSPs/blob/master/PSPs/psp-22.md) implementation. This is a standard akin to ERC-20, but for `pallet-contracts` and ink!.&#xD;&#xA;&#xD;&#xA;There is an implementation of this standard in the OpenBrush project [here](https://github.com/Supercolony-net/openbrush-contracts/blob/main/contracts/src/token/psp22/psp22.rs).&#xD;&#xA;&#xD;&#xA;Documentation on the mint and burn functionality can be found here:&#xD;&#xA;* https://docs.openbrush.io/smart-contracts/PSP22/Extensions/mintable&#xD;&#xA;* https://docs.openbrush.io/smart-contracts/PSP22/Extensions/burnable&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="15992" PostHistoryTypeId="2" PostId="4260" RevisionGUID="9c2cb492-0331-4ac1-8c88-0643e9f2e8a4" CreationDate="2022-08-12T15:51:02.500" UserId="85" Text="I think pretty much everyone's using the new macro system (rather than the older decl macros that used to exist). I would see if there's an alternative pallet if you're still seeing the old decl ones as maybe it's not been updated because the ecosystem has moved on to something better. If you've got specific examples maybe we can highlight modern day equivalents." ContentLicense="CC BY-SA 4.0" />
  <row Id="15994" PostHistoryTypeId="2" PostId="4261" RevisionGUID="13a04fa6-7fc7-4d78-93d0-794f3684f439" CreationDate="2022-08-12T16:55:08.363" UserId="2752" Text="Like P.Ossun said, the solution is to dry-run the contract first and&#xD;&#xA;check the answer, then to run the contract again, this time making actual&#xD;&#xA;changes on the blockchain.&#xD;&#xA;&#xD;&#xA;[Here][1] you can find the documantation how to do the dry run.&#xD;&#xA;&#xD;&#xA;The solution to my question would look the following way:&#xD;&#xA;&#xD;&#xA;    const { gasRequired, storageDeposit, result, output } = await contract.query.method(&#xD;&#xA;        account.address,&#xD;&#xA;        {&#xD;&#xA;            gasLimit,&#xD;&#xA;            storageDepositLimit,&#xD;&#xA;        },&#xD;&#xA;        variables&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;    console.log(output.toHuman())&#xD;&#xA;&#xD;&#xA;    if(result.isOk){&#xD;&#xA;        await contract.tx&#xD;&#xA;            .method({ storageDepositLimit, gasLimit }, variables)&#xD;&#xA;            .signAndSend(account.address, {signer: injector.signer},  result =&gt; {&#xD;&#xA;            if (result.status.isInBlock) {&#xD;&#xA;                console.log('in a block');&#xD;&#xA;            } else if (result.status.isFinalized) {&#xD;&#xA;                console.log('finalized');&#xD;&#xA;            }&#xD;&#xA;        })&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api-contract/start/contract.tx/#cost-estimation" ContentLicense="CC BY-SA 4.0" />
  <row Id="15996" PostHistoryTypeId="52" PostId="4255" RevisionGUID="768146f8-8ccd-40fe-b3c4-03f8eee218ae" CreationDate="2022-08-12T17:19:48.060" />
  <row Id="15997" PostHistoryTypeId="5" PostId="4246" RevisionGUID="a9d8f110-7b58-4f29-84b6-4b3bc2eb8471" CreationDate="2022-08-12T18:17:08.343" UserId="3005" Comment="added 416 characters in body" Text="We've gone through the [tutorial][1] for running upgrades. We've been able to successfully upgrade using the Polkadot UI.&#xD;&#xA;&#xD;&#xA;However, when we do the same thing with our custom Runtime, although the tx says it's added to block, the version doesn't get bumped. i.e. the upgrade isn't successful.&#xD;&#xA;&#xD;&#xA;On investigation of the block with the included tx, we find this event:&#xD;&#xA;```&#xD;&#xA;Unable to decode storage system.events:: createType(Vec&lt;EventRecord&gt;):: Vec&lt;EventRecord&gt;:: Decoded input doesn't match input, received&#xD;&#xA;0x0c020c0500000000000000005095a20900000000020000000100000000010305000000000000000000010000 (44 bytes), created 0x0c020c0500000000000000005095a20900000000020000000100000000010305000000000000000000010000000000 (47 bytes)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This event error isn't helping us understand what we're doing wrong.&#xD;&#xA;&#xD;&#xA;Does anyone have any ideas what might be different about our Runtime that could be causing this? Or, is there a way that we could get more information about what's going wrong?&#xD;&#xA;&#xD;&#xA;I'll note that our Runtime is on `3.0.0` and the tutorial code we're running is on `4.0.0-dev`.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;&#xD;&#xA;Another strange thing: we wanted to get insight into how far into the `set_code` call it was getting, so we pulled down the source code for `frame-system-3.0.0` and patched our dep in `cargo.toml`. We then have tried adding events and even panics to the call code... but the behavior doesn't change. If we try compiling with bad code it breaks, but other than that it doesn't seem to make any difference.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/get-started/forkless-upgrade/" ContentLicense="CC BY-SA 4.0" />
  <row Id="15998" PostHistoryTypeId="2" PostId="4262" RevisionGUID="ed6b70cc-501b-434c-af8e-34344bcf1023" CreationDate="2022-08-12T21:08:58.627" UserId="2698" Text="In the nodes we were running we were able to mix the two versions safely while we were working on getting all of our pallets upgraded." ContentLicense="CC BY-SA 4.0" />
  <row Id="16001" PostHistoryTypeId="5" PostId="4251" RevisionGUID="7d462bcf-fda7-4ad6-a36e-47a53e0582fc" CreationDate="2022-08-13T12:37:51.213" UserId="251" Comment="added 61 characters in body" Text="It's because my ED is too small. Then it fails somewhere.&#xD;&#xA;&#xD;&#xA;&gt; Huh, there is actually an issue with resetting the State in case the Extrinsic errors. I am currently fixing it but for that to work you would have to update your Substrate. – &#xD;&#xA;Oliver Tale-Yazdi&#xD;&#xA;&#xD;&#xA;And it relate to that bug. So the state can not be reset. Substrate&amp;Polkadot's ED is big enough so no error, and they are able to reset DB correctly.&#xD;&#xA; &#xD;&#xA;Fixed [here](https://github.com/paritytech/substrate/pull/12025)." ContentLicense="CC BY-SA 4.0" />
  <row Id="16002" PostHistoryTypeId="2" PostId="4263" RevisionGUID="03878352-760e-4cd4-a335-c672e22dc80f" CreationDate="2022-08-13T13:08:06.427" UserId="1803" Text="I want to validate the extrinsic string parameters like `name`, `title`, `cid`, etc. The type should be capable of min/max length validation. And checking the lower bound is impossible with the [current implementation of `frame_support::BoundedVec`][1]. But [`BoundedVec` from std library][2] has a lower bound functionality.&#xD;&#xA;&#xD;&#xA;It's more of a suggestion for a Substrate team. I assume the only way is a custom type with all of the serialization rules. Maybe other suggestions on how to solve this string validation problem or if it even makes sense? For sure, I can do it with `!ensure` macros.&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/frame_support/storage/bounded_vec/struct.BoundedVec.html&#xD;&#xA;  [2]: https://docs.rs/bounded-vec/latest/bounded_vec/struct.BoundedVec.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="16004" PostHistoryTypeId="1" PostId="4263" RevisionGUID="03878352-760e-4cd4-a335-c672e22dc80f" CreationDate="2022-08-13T13:08:06.427" UserId="1803" Text="Extrinsic's string parameter lower bound validation" ContentLicense="CC BY-SA 4.0" />
  <row Id="16005" PostHistoryTypeId="3" PostId="4263" RevisionGUID="03878352-760e-4cd4-a335-c672e22dc80f" CreationDate="2022-08-13T13:08:06.427" UserId="1803" Text="|extrinsic|validation|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16006" PostHistoryTypeId="2" PostId="4264" RevisionGUID="6ad81e37-91cc-4429-a5c5-8649082150e6" CreationDate="2022-08-13T19:05:51.473" UserId="28" Text="It should be okay to mix pallets from the old and new macros. We had this for a while when we were migrating pallets to the new macros.&#xD;&#xA;&#xD;&#xA;End of the day, the underlying generated Rust code is the same, just the syntax for defining a pallet is different." ContentLicense="CC BY-SA 4.0" />
  <row Id="16008" PostHistoryTypeId="2" PostId="4265" RevisionGUID="9c5837e0-c48c-4170-bc77-67f2e256e932" CreationDate="2022-08-14T09:40:52.863" UserId="309" Text="Is there a way to configure the destination account when using  the Slashing function from `Trait frame_support::traits::tokens::currency::Currency`?&#xD;&#xA;&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="16010" PostHistoryTypeId="1" PostId="4265" RevisionGUID="9c5837e0-c48c-4170-bc77-67f2e256e932" CreationDate="2022-08-14T09:40:52.863" UserId="309" Text="Destination account of the Slashing function in Currency trait" ContentLicense="CC BY-SA 4.0" />
  <row Id="16011" PostHistoryTypeId="3" PostId="4265" RevisionGUID="9c5837e0-c48c-4170-bc77-67f2e256e932" CreationDate="2022-08-14T09:40:52.863" UserId="309" Text="|slashing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16012" PostHistoryTypeId="2" PostId="4266" RevisionGUID="098df19c-5965-4fe3-952d-3f995412c3bf" CreationDate="2022-08-14T09:40:59.940" UserId="3016" Text="The PeerID is encoded in bs58.&#xD;&#xA;So you need to decode it.&#xD;&#xA;Refer to the code in the example.&#xD;&#xA;[![decoding peerId in bs58][1]][1]&#xD;&#xA;Refer this url.&#xD;&#xA;https://whisperd.tech/bs58-codec/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/R6HVz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16014" PostHistoryTypeId="5" PostId="4266" RevisionGUID="51f92e96-1df5-476e-be62-ab6dc4fdd0ad" CreationDate="2022-08-14T09:42:06.837" UserId="3016" Comment="deleted 6 characters in body" Text="The PeerID is encoded in bs58.&#xD;&#xA;So you need to decode it.&#xD;&#xA;Refer to the code in the example.&#xD;&#xA;[![decoding peerId][1]][1]&#xD;&#xA;&#xD;&#xA;Refer this url.&#xD;&#xA;https://whisperd.tech/bs58-codec/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ypdYm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16015" PostHistoryTypeId="5" PostId="4266" RevisionGUID="3d331133-33f0-48f7-8f70-785811faa43e" CreationDate="2022-08-14T09:43:46.560" UserId="3016" Comment="added 354 characters in body" Text="The PeerID is encoded in bs58.&#xD;&#xA;So you need to decode it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; node_authorization: NodeAuthorizationConfig {&#xD;&#xA;   nodes: vec![&#xD;&#xA;     (&#xD;&#xA;       OpaquePeerId(bs58::decode(&quot;12D3KooWBmAwcd4PJNJvfV89HwE48nwkRmAgo8Vy3uQEyNNHBox2&quot;).into_vec().unwrap()),&#xD;&#xA;       endowed_accounts[0].clone()&#xD;&#xA;     ),&#xD;&#xA;     (&#xD;&#xA;       OpaquePeerId(bs58::decode(&quot;12D3KooWQYV9dGMFoRzNStwpXztXaBUjtPqi6aU76ZgUriHhKust&quot;).into_vec().unwrap()),&#xD;&#xA;       endowed_accounts[1].clone()&#xD;&#xA;     ),&#xD;&#xA;   ],&#xD;&#xA; },&#xD;&#xA;```&#xD;&#xA;Refer this url.&#xD;&#xA;https://whisperd.tech/bs58-codec/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ypdYm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16016" PostHistoryTypeId="5" PostId="4266" RevisionGUID="60ce40a1-5b23-4040-8e80-5667d168ee68" CreationDate="2022-08-14T09:44:14.720" UserId="3016" Comment="deleted 20 characters in body" Text="The PeerID is encoded in bs58.&#xD;&#xA;So you need to decode it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; node_authorization: NodeAuthorizationConfig {&#xD;&#xA;   nodes: vec![&#xD;&#xA;     (&#xD;&#xA;       OpaquePeerId(bs58::decode(&quot;12D3KooWBmAwcd4PJNJvfV89HwE48nwkRmAgo8Vy3uQEyNNHBox2&quot;).into_vec().unwrap()),&#xD;&#xA;       endowed_accounts[0].clone()&#xD;&#xA;     ),&#xD;&#xA;     (&#xD;&#xA;       OpaquePeerId(bs58::decode(&quot;12D3KooWQYV9dGMFoRzNStwpXztXaBUjtPqi6aU76ZgUriHhKust&quot;).into_vec().unwrap()),&#xD;&#xA;       endowed_accounts[1].clone()&#xD;&#xA;     ),&#xD;&#xA;   ],&#xD;&#xA; },&#xD;&#xA;```&#xD;&#xA;Here is an online BS58 decoder alive.&#xD;&#xA;&#xD;&#xA;https://whisperd.tech/bs58-codec/&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16017" PostHistoryTypeId="2" PostId="4267" RevisionGUID="236d35ee-1d75-42fe-9e71-43dc309e9728" CreationDate="2022-08-14T09:51:52.133" UserId="1803" Text="Without deprecated transactional macro for extrinsic, the `assert_noop!(extrinsic_call, Error::&lt;Test&gt;::BalanceLow)` test doesn't work. Not sure if the reason is in orml currencies or if something is wrong with the new implementation of transactional behavior, which should work by default (**polkadot-v0.9.25**)&#xD;&#xA;&#xD;&#xA;Source:&#xD;&#xA;&#xD;&#xA;    T::Currency::transfer(currency_id, &amp;who, &amp;treasury, amount).map_err(|_| Error::&lt;T&gt;::BalanceLow)?;&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;&#xD;&#xA;    thread 'tests::control_create_org_errors' panicked at 'assertion failed: `(left == right)`&#xD;&#xA;      left: `[245, 32, 98, 192, 108, 62, 24, 236, 229, 230, 140, 25, 143, 54, 170, 37, 99, 44, 26, 101, 67, 233, 195, 119, 185, 51, 44, 203, 171, 193, 137, 38]`,&#xD;&#xA;     right: `[199, 230, 38, 211, 152, 255, 39, 158, 254, 167, 26, 129, 76, 121, 100, 236, 166, 213, 246, 117, 212, 210, 220, 40, 183, 220, 93, 168, 87, 241, 65, 91]`', gamedao-protocol/control/src/tests.rs:70:9" ContentLicense="CC BY-SA 4.0" />
  <row Id="16019" PostHistoryTypeId="1" PostId="4267" RevisionGUID="236d35ee-1d75-42fe-9e71-43dc309e9728" CreationDate="2022-08-14T09:51:52.133" UserId="1803" Text="Transactional macro deprecated but still required" ContentLicense="CC BY-SA 4.0" />
  <row Id="16020" PostHistoryTypeId="3" PostId="4267" RevisionGUID="236d35ee-1d75-42fe-9e71-43dc309e9728" CreationDate="2022-08-14T09:51:52.133" UserId="1803" Text="|testing|orml|transactional|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16021" PostHistoryTypeId="2" PostId="4268" RevisionGUID="81c62b39-00c6-4d1d-bc7f-8f6f35dc3bec" CreationDate="2022-08-14T14:32:05.317" UserId="251" Text="There is a trait name [`OnUnbalanced`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.OnUnbalanced.html).&#xD;&#xA;&#xD;&#xA;It's a hook. And you could write some logic like if somebody got slash then trigger it.&#xD;&#xA;&#xD;&#xA;Here's an example. Treasury pallet define a `OnSlash` configuration. You could config where the [slashed balance](https://github.com/paritytech/substrate/blob/master/frame/treasury/src/lib.rs#L377) go." ContentLicense="CC BY-SA 4.0" />
  <row Id="16023" PostHistoryTypeId="5" PostId="4268" RevisionGUID="8796cbd2-27d7-4716-85fc-3feea9dfeced" CreationDate="2022-08-14T14:38:17.007" UserId="251" Comment="added 364 characters in body" Text="There is a trait name [`OnUnbalanced`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.OnUnbalanced.html).&#xD;&#xA;&#xD;&#xA;It's a hook. And you could write some logic like if somebody got slash then trigger it.&#xD;&#xA;&#xD;&#xA;Here's an example. Treasury pallet defines an `OnSlash` configuration. You could configure where the [slashed balance](https://github.com/paritytech/substrate/blob/master/frame/treasury/src/lib.rs#L377) go. &#xD;&#xA;&#xD;&#xA;The example's configuration is [`()`](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1056). Here's the [implementation](https://github.com/paritytech/substrate/blob/master/frame/support/src/traits/tokens/imbalance/on_unbalanced.rs#L55). It does nothing, which means the token just burned. You could implement your owned logic.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;BTW, If you want to slash some token from the 'bad guy' and reward someone. Why not use `transfer` or `withdraw`/`issue`/`burn`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16024" PostHistoryTypeId="50" PostId="3741" RevisionGUID="15ad3756-b9d8-42df-94d1-93a711275577" CreationDate="2022-08-14T15:02:05.207" UserId="-1" />
  <row Id="16025" PostHistoryTypeId="2" PostId="4269" RevisionGUID="fae99f1a-e2ed-4e4d-be70-89dbd3aebadb" CreationDate="2022-08-14T18:41:46.650" UserId="28" Text="I believe that this is is just an artifact of the original implementation detail of the storage layer, which shows up in tests.&#xD;&#xA;&#xD;&#xA;This PR: https://github.com/paritytech/substrate/pull/11927&#xD;&#xA;&#xD;&#xA;Should solve that. Specifically, before, if you do not explicitly call `dispatch` on the call, you would not get the transactional behavior.&#xD;&#xA;&#xD;&#xA;With the PR above, now it should not matter.&#xD;&#xA;&#xD;&#xA;So try running the test again against Substrate master and you should ideally see the error go away." ContentLicense="CC BY-SA 4.0" />
  <row Id="16027" PostHistoryTypeId="2" PostId="4270" RevisionGUID="0d6fe04f-8636-4a94-b133-c9b560d9ebce" CreationDate="2022-08-14T18:53:15.203" UserId="2752" Text="I wrote a smart contract, implementing a psp34 token ([docs][1]).&#xD;&#xA;Inside the smart contract, it is no problem using the methods provided by openbrush.&#xD;&#xA;However, when I deploy it on chain and want to call a method (like for example&#xD;&#xA;owner_of), using the [pokadot{.js} api][2], I run into the following problem:&#xD;&#xA;&#xD;&#xA;When looking at the metadata of my contract, a typical method looks like this:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;id&quot;,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;Vec&quot;&#xD;&#xA;                ],&#xD;&#xA;                &quot;type&quot;: 7&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [&#xD;&#xA;            &quot; Returns the owner of a token.&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;label&quot;: &quot;owner_of&quot;,&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;Option&quot;&#xD;&#xA;            ],&#xD;&#xA;            &quot;type&quot;: 24&#xD;&#xA;          },&#xD;&#xA;          &quot;selector&quot;: &quot;...&quot;&#xD;&#xA;        },&#xD;&#xA;&#xD;&#xA;But a method from the openbrush looks like this:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;          &quot;args&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;label&quot;: &quot;id&quot;,&#xD;&#xA;              &quot;type&quot;: {&#xD;&#xA;                &quot;displayName&quot;: [&#xD;&#xA;                  &quot;psp34_external&quot;,&#xD;&#xA;                  &quot;OwnerOfInput1&quot;&#xD;&#xA;                ],&#xD;&#xA;                &quot;type&quot;: 1&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;docs&quot;: [&#xD;&#xA;            &quot; Returns the owner of the token if any.&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;label&quot;: &quot;PSP34::owner_of&quot;,&#xD;&#xA;          &quot;mutates&quot;: false,&#xD;&#xA;          &quot;payable&quot;: false,&#xD;&#xA;          &quot;returnType&quot;: {&#xD;&#xA;            &quot;displayName&quot;: [&#xD;&#xA;              &quot;psp34_external&quot;,&#xD;&#xA;              &quot;OwnerOfOutput&quot;&#xD;&#xA;            ],&#xD;&#xA;            &quot;type&quot;: 24&#xD;&#xA;          },&#xD;&#xA;          &quot;selector&quot;: &quot;...&quot;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;From my understanding the polkadot api changes the label from 'owner_of' to 'ownerOf'.&#xD;&#xA;But what does it to 'PSP34::owner_of'?&#xD;&#xA;&#xD;&#xA;I tried to call the original PSP34 owner_of method like this:&#xD;&#xA;&#xD;&#xA;    const { gasRequired, storageDeposit, result, output } = await contract.query.ownerOf(&#xD;&#xA;        accountId,&#xD;&#xA;        {&#xD;&#xA;        gasLimit,&#xD;&#xA;        storageDepositLimit,&#xD;&#xA;        },&#xD;&#xA;        id&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;But it does gives the error 'ownerOf is not a function'. My solution so far was to just implement a method in my contract which calls on the PSP34 owner_of method, and to then call this new method with the API. &#xD;&#xA;&#xD;&#xA;Although this works, it strikes me as not pretty. Especially, since the original PSP34 owner_of method is still visible on chain.&#xD;&#xA;&#xD;&#xA;My question now is: Is it possible to call the PSP34::owner_of method with the polkadot api? And if not, how can I **overwrite** the method so only the method in my contract is visible to the chain and I can call it with the polkadot api like before.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.openbrush.io/smart-contracts/PSP34/&#xD;&#xA;  [2]: https://polkadot.js.org/docs/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16029" PostHistoryTypeId="1" PostId="4270" RevisionGUID="0d6fe04f-8636-4a94-b133-c9b560d9ebce" CreationDate="2022-08-14T18:53:15.203" UserId="2752" Text="How to call a method (from an openbrush standard token) using the polkadot api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16030" PostHistoryTypeId="3" PostId="4270" RevisionGUID="0d6fe04f-8636-4a94-b133-c9b560d9ebce" CreationDate="2022-08-14T18:53:15.203" UserId="2752" Text="|polkadot-js|ink|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16031" PostHistoryTypeId="2" PostId="4271" RevisionGUID="830a2cb3-a271-467e-853a-6d439c636261" CreationDate="2022-08-14T19:40:33.497" UserId="2471" Text="I would like to build a frontier based node. However I am confused about what to start with&#xD;&#xA;&#xD;&#xA;should I generate my template using the script `./node-template-release.sh` as mentioned in  https://github.com/paritytech/frontier/tree/master/template &#xD;&#xA;&#xD;&#xA;(This process failed to build!)&#xD;&#xA;&#xD;&#xA;Or should I directly use this template&#xD;&#xA;https://github.com/substrate-developer-hub/frontier-node-template&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16033" PostHistoryTypeId="1" PostId="4271" RevisionGUID="830a2cb3-a271-467e-853a-6d439c636261" CreationDate="2022-08-14T19:40:33.497" UserId="2471" Text="Frontier template" ContentLicense="CC BY-SA 4.0" />
  <row Id="16034" PostHistoryTypeId="3" PostId="4271" RevisionGUID="830a2cb3-a271-467e-853a-6d439c636261" CreationDate="2022-08-14T19:40:33.497" UserId="2471" Text="|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16035" PostHistoryTypeId="5" PostId="4265" RevisionGUID="d0bbedf9-9a4f-46fe-8d0e-b8798075c7f9" CreationDate="2022-08-14T23:02:26.460" UserId="309" Comment="added 228 characters in body" Text="Is there a way to configure the destination account when using  the Slashing function from `Trait frame_support::traits::tokens::currency::Currency`?&#xD;&#xA;&#xD;&#xA;Kazu&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;As I'm using the `reserve` function from the `ReservableCurrency` trait, instead of using the slash function of the currency trait, I will use the `rapatriate_reserved` function of the `ReservableCurrency` trait." ContentLicense="CC BY-SA 4.0" />
  <row Id="16036" PostHistoryTypeId="2" PostId="4272" RevisionGUID="f63b381d-c7a1-46d6-a628-129c2d991eb9" CreationDate="2022-08-14T23:40:54.227" UserId="599" Text="`PSP34` in the rust level is a trait(interface) implemented by your contract. At the ABI level is a prefix or a namespace of the method that makes it unique. It allows supporting several methods with the same naming but with different prefixes. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// First&#xD;&#xA;impl Contract {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn balance_of(&amp;self, owner: AccountId) -&gt; Balance { ... }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Second&#xD;&#xA;impl PSP22 for Contract {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn balance_of(&amp;self, owner: AccountId) -&gt; Balance { ... }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Third&#xD;&#xA;impl PSP34 for Contract {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn balance_of(&amp;self, owner: AccountId) -&gt; Balance { ... }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All those three implementations will generate different labels and selectors(selector is 4 bytes of the black2b hash of the label) for your methods:&#xD;&#xA;&#xD;&#xA;- First: &quot;label&quot;: &quot;balance_of&quot;, &quot;selector&quot;: &quot;0x0f755a56&quot;&#xD;&#xA;- Second: &quot;label&quot;: &quot;PSP22::balance_of&quot;, &quot;selector&quot;: &quot;0x6568382f&quot;&#xD;&#xA;- Third: &quot;label&quot;: &quot;PSP34::balance_of&quot;, &quot;selector&quot;: &quot;0xcde7e55f&quot;&#xD;&#xA;&#xD;&#xA;The [polkadot-js](https://github.com/polkadot-js/api) can work with prefix and non-prefixed methods. It campelCase all methods, but it still supports the label format.&#xD;&#xA;&#xD;&#xA;- First: `contract.query.balanceOf` or `contract.query[&quot;balance_of&quot;]`&#xD;&#xA;- Second: `contract.query.psp22BalanceOf` or `contract.query[&quot;PSP22::balance_of&quot;]`&#xD;&#xA;- Third: `contract.query.psp34BalanceOf` or `contract.query[&quot;PSP34::balance_of&quot;]`&#xD;&#xA;&#xD;&#xA;The same works for the `tx` namespace. Maybe it can be changed in the future after resolving [issue](https://github.com/polkadot-js/api/issues/4469).&#xD;&#xA;&#xD;&#xA;It should solve your problem=) But I suggest you try [typechain-polkadot](https://github.com/Supercolony-net/typechain-polkadot) for integration tests and frontend development. It will generate all classes based on the ABI of your contract, and you will know how to call each method." ContentLicense="CC BY-SA 4.0" />
  <row Id="16038" PostHistoryTypeId="4" PostId="4270" RevisionGUID="0240698f-e768-42e3-b6de-f6cce459bfaa" CreationDate="2022-08-14T23:44:55.540" UserId="599" Comment="Added more general description of the problem" Text="How to call prefixed by trait(interface) methods using the polkadot api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16039" PostHistoryTypeId="5" PostId="4272" RevisionGUID="79d8670f-0a35-44d1-801a-01675b54ab34" CreationDate="2022-08-14T23:47:08.090" UserId="599" Comment="added 36 characters in body" Text="`PSP34` in the rust level is a trait(interface) implemented by your contract. At the ABI level is a prefix or a namespace of the method that makes it unique. It allows supporting several methods with the same naming but with different prefixes. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// First&#xD;&#xA;impl Contract {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn balance_of(&amp;self, owner: AccountId) -&gt; Balance { ... }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Second&#xD;&#xA;impl PSP22 for Contract {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn balance_of(&amp;self, owner: AccountId) -&gt; Balance { ... }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Third&#xD;&#xA;impl PSP34 for Contract {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn balance_of(&amp;self, owner: AccountId) -&gt; Balance { ... }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All those three implementations will generate different labels and selectors(selector is 4 bytes of the black2b hash of the label) for your methods:&#xD;&#xA;&#xD;&#xA;- First: &quot;label&quot;: &quot;balance_of&quot;, &quot;selector&quot;: &quot;0x0f755a56&quot;&#xD;&#xA;- Second: &quot;label&quot;: &quot;PSP22::balance_of&quot;, &quot;selector&quot;: &quot;0x6568382f&quot;&#xD;&#xA;- Third: &quot;label&quot;: &quot;PSP34::balance_of&quot;, &quot;selector&quot;: &quot;0xcde7e55f&quot;&#xD;&#xA;&#xD;&#xA;The [polkadot-js](https://github.com/polkadot-js/api) can work with prefix and non-prefixed methods. It [campelCase](https://textedit.tools/camelcase) all methods, but it still supports the label format.&#xD;&#xA;&#xD;&#xA;- First: `contract.query.balanceOf` or `contract.query[&quot;balance_of&quot;]`&#xD;&#xA;- Second: `contract.query.psp22BalanceOf` or `contract.query[&quot;PSP22::balance_of&quot;]`&#xD;&#xA;- Third: `contract.query.psp34BalanceOf` or `contract.query[&quot;PSP34::balance_of&quot;]`&#xD;&#xA;&#xD;&#xA;The same works for the `tx` namespace. Maybe it can be changed in the future after resolving [issue](https://github.com/polkadot-js/api/issues/4469).&#xD;&#xA;&#xD;&#xA;It should solve your problem=) But I suggest you try [typechain-polkadot](https://github.com/Supercolony-net/typechain-polkadot) for integration tests and frontend development. It will generate all classes based on the ABI of your contract, and you will know how to call each method." ContentLicense="CC BY-SA 4.0" />
  <row Id="16044" PostHistoryTypeId="5" PostId="4268" RevisionGUID="ca42238c-11ce-4a14-ac8b-6f12c52d5e4c" CreationDate="2022-08-15T01:55:00.333" UserId="251" Comment="added 26 characters in body" Text="There is a trait name [`OnUnbalanced`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.OnUnbalanced.html).&#xD;&#xA;&#xD;&#xA;It's a hook. And you could write some logic like if somebody got slash then trigger it.&#xD;&#xA;&#xD;&#xA;Here's an example. Treasury pallet defines an `OnSlash` configuration. You could configure where the [slashed balance](https://github.com/paritytech/substrate/blob/master/frame/treasury/src/lib.rs#L377) go. &#xD;&#xA;&#xD;&#xA;The example's configuration is [`()`](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1056). Here's the [implementation](https://github.com/paritytech/substrate/blob/master/frame/support/src/traits/tokens/imbalance/on_unbalanced.rs#L55). It does nothing, which means the token just burned. You could implement your owned logic then pass it to `OnSlash`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;BTW, If you want to slash some token from the 'bad guy' and reward someone. Why not use `transfer` or `withdraw`/`issue`/`burn`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16045" PostHistoryTypeId="2" PostId="4274" RevisionGUID="0596a751-4d8d-4fac-bddf-219278ddbf23" CreationDate="2022-08-15T09:53:09.673" UserId="227" Text="The source of the problem is that ink! internally uses a static buffer to avoid expensive heap allocations. The limitation of this static buffer is 16 KiB, which is 16384 bytes, so the limit that you are hitting:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/buffer.rs#L22-L23&#xD;&#xA;&#xD;&#xA;The limit was originally chosen to be ideal for the underlying database used in Substrate. There have been changes in the meantime now though, so that we're contemplating increasing the limit. There is also an open PR for ink! to make this limit configurable: https://github.com/paritytech/ink/pull/1279.&#xD;&#xA;&#xD;&#xA;What I want to question though is why you are pushing the `Message` in its entirety to the `Vec`. It's typically an anti-pattern for smart contracts to use big vectors, as many operations become more gas-expensive on them instead of on e.g. a `Mapping`.&#xD;&#xA;&#xD;&#xA;Could you use something along those lines, for example?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;messages: Mapping&lt;String, Vec&lt;MessageId&gt;&gt;&#xD;&#xA;messageid_to_message: Mapping&lt;MessageId, Message&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This would decrease the amount stored in the `Vec` significantly." ContentLicense="CC BY-SA 4.0" />
  <row Id="16047" PostHistoryTypeId="2" PostId="4275" RevisionGUID="874d6bb8-5fcd-428f-8efd-c038b27e1104" CreationDate="2022-08-15T09:57:59.843" UserId="227" Text="A case of how this can happen is this:&#xD;&#xA;&#xD;&#xA;You chose a gas limit that is larger than the entire block weight.&#xD;&#xA;&#xD;&#xA;The &quot;gas limit&quot; is referring to the weight that the node assumes for executing the extrinsic. If this limit is larger than the block weight the node would be unable to put your extrinsic into the block.&#xD;&#xA;&#xD;&#xA;Could this be the case for you?&#xD;&#xA;&#xD;&#xA;The UI's (https://contracts-ui.substrate.io and `polkadot-js`) both dry-run the extrinsic on the node and show you the gas costs of that dry-run. They prefill the field for &quot;gas limit&quot; with this value. So you shouldn't run into this case if you use just the default settings." ContentLicense="CC BY-SA 4.0" />
  <row Id="16049" PostHistoryTypeId="2" PostId="4276" RevisionGUID="61b66c95-eaed-4d1e-bd07-9b2619b74fcc" CreationDate="2022-08-15T10:57:17.137" UserId="2722" Text="&gt;i need create wallet for user in substrate pallet . &#xD;&#xA;&#xD;&#xA;for example i need create wallet for user and return the wallet info for user also use can use that info for transfer money to other wallets .&#xD;&#xA;&#xD;&#xA; **now i need to know what should i do for that ?** &#xD;&#xA;&#xD;&#xA;actually i need create wallet for user programmatically . &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16051" PostHistoryTypeId="1" PostId="4276" RevisionGUID="61b66c95-eaed-4d1e-bd07-9b2619b74fcc" CreationDate="2022-08-15T10:57:17.137" UserId="2722" Text="how can create wallet for use in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16052" PostHistoryTypeId="3" PostId="4276" RevisionGUID="61b66c95-eaed-4d1e-bd07-9b2619b74fcc" CreationDate="2022-08-15T10:57:17.137" UserId="2722" Text="|substrate-node|polkadot|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16053" PostHistoryTypeId="2" PostId="4277" RevisionGUID="c9fd3427-f916-49f5-93c6-7810b982ed09" CreationDate="2022-08-15T11:47:17.073" UserId="85" Text="https://docs.substrate.io/reference/command-line-tools/subkey/ - subkey generate will show you how to create a private key. As demonstrated by recent solana hacks it would be a very bad idea to log the private seed anywhere." ContentLicense="CC BY-SA 4.0" />
  <row Id="16055" PostHistoryTypeId="2" PostId="4278" RevisionGUID="67843bee-e147-4e3f-8baf-a99a6ae0a237" CreationDate="2022-08-15T12:04:29.587" UserId="85" Text="I suspect a great way to start is probably to watch this subzero video and then maybe try and follow along and do it yourself locally over a weekend learning as you go:&#xD;&#xA;https://www.youtube.com/watch?v=V9KfvhoqLJ4" ContentLicense="CC BY-SA 4.0" />
  <row Id="16057" PostHistoryTypeId="50" PostId="3754" RevisionGUID="5b4a00cb-d748-4cdb-b74a-8bb5e500ef8d" CreationDate="2022-08-15T12:04:45.540" UserId="-1" />
  <row Id="16058" PostHistoryTypeId="2" PostId="4279" RevisionGUID="5842df40-9b41-4c91-8f27-fde486a9cdb7" CreationDate="2022-08-15T12:07:21.793" UserId="3029" Text="I am trying to request a block hash for a specific block using the Polkadot JSON-RPC but no matter how I construct the request (with Python), it always returns the latest block and not the one I want. How can I solve that? &#xD;&#xA;&#xD;&#xA;import requests&#xD;&#xA;import json&#xD;&#xA;def get_block_hash(block_number):&#xD;&#xA;  url = &quot;https://dot.getblock.io/mainnet/&quot;&#xD;&#xA;&#xD;&#xA;  payload = json.dumps({&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;chain_getBlockHash&quot;,&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;  })&#xD;&#xA;  headers = {&#xD;&#xA;    'x-api-key': 'enter-api-key',&#xD;&#xA;    'blockNumber': block_number,&#xD;&#xA;    'Content-Type': 'application/json'&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  response = requests.request(&quot;POST&quot;, url, headers=headers, data=payload)&#xD;&#xA;&#xD;&#xA;  print(response.text)&#xD;&#xA;&#xD;&#xA;  return response&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16060" PostHistoryTypeId="1" PostId="4279" RevisionGUID="5842df40-9b41-4c91-8f27-fde486a9cdb7" CreationDate="2022-08-15T12:07:21.793" UserId="3029" Text="JSON-RPC getBlockHash Request" ContentLicense="CC BY-SA 4.0" />
  <row Id="16061" PostHistoryTypeId="3" PostId="4279" RevisionGUID="5842df40-9b41-4c91-8f27-fde486a9cdb7" CreationDate="2022-08-15T12:07:21.793" UserId="3029" Text="|polkadot|rpc|python|block|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16062" PostHistoryTypeId="5" PostId="4279" RevisionGUID="9443dd5a-4fd6-48ab-bfcf-c32fa5d404cb" CreationDate="2022-08-15T12:08:18.257" UserId="3029" Comment="added 16 characters in body" Text="I am trying to request a block hash for a specific block using the Polkadot JSON-RPC but no matter how I construct the request (with Python), it always returns the latest block and not the one I want. How can I solve that? &#xD;&#xA;&#xD;&#xA;import requests&#xD;&#xA;&#xD;&#xA;import json&#xD;&#xA;&#xD;&#xA;def get_block_hash(block_number):&#xD;&#xA;&#xD;&#xA;  url = &quot;https://dot.getblock.io/mainnet/&quot;&#xD;&#xA;&#xD;&#xA;  payload = json.dumps({&#xD;&#xA;&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;&#xD;&#xA;    &quot;method&quot;: &quot;chain_getBlockHash&quot;,&#xD;&#xA;&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;&#xD;&#xA;  })&#xD;&#xA;&#xD;&#xA;  headers = {&#xD;&#xA;    'x-api-key': 'enter-api-key',&#xD;&#xA;    'blockNumber': block_number,&#xD;&#xA;    'Content-Type': 'application/json'&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  response = requests.request(&quot;POST&quot;, url, headers=headers, data=payload)&#xD;&#xA;&#xD;&#xA;  print(response.text)&#xD;&#xA;&#xD;&#xA;  return response&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16063" PostHistoryTypeId="2" PostId="4280" RevisionGUID="bdaa7891-e689-4c11-92d1-7da5e2a013c6" CreationDate="2022-08-15T12:33:12.367" UserId="2355" Text="I am doing a balance upload (copying and modifying the balances from a chain to another)&#xD;&#xA;&#xD;&#xA;I have a json file containing all i need, i compute the new balance, and i batch calls doing a setBalance().&#xD;&#xA;&#xD;&#xA;I have ~16000 calls to batch. Once everything passed, i run a check script that, for every addresses, fetch their balance from the chain, and check if it matches the one i was expected. and, out of my 16000 calls, i get ~500 accounts that doesn't have the right value. and the difference is very big, no not negligible. &#xD;&#xA;&#xD;&#xA;why does this happens ? Why doesn't i have an error ? How can i prevent this ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16065" PostHistoryTypeId="1" PostId="4280" RevisionGUID="bdaa7891-e689-4c11-92d1-7da5e2a013c6" CreationDate="2022-08-15T12:33:12.367" UserId="2355" Text="batched transactions are not all executed, but no error are thrown" ContentLicense="CC BY-SA 4.0" />
  <row Id="16066" PostHistoryTypeId="3" PostId="4280" RevisionGUID="bdaa7891-e689-4c11-92d1-7da5e2a013c6" CreationDate="2022-08-15T12:33:12.367" UserId="2355" Text="|api|batch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16067" PostHistoryTypeId="2" PostId="4281" RevisionGUID="045f4999-52d6-421a-8532-39a18c2b6e56" CreationDate="2022-08-15T12:38:39.047" UserId="2881" Text="The JSON-RPC 2.0 parameters doesn't go in the header, they are part of the body. Here is a correctly-formatted body for a getBlockHash query -&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;id&quot;:1,&#xD;&#xA;  &quot;jsonrpc&quot;:&quot;2.0&quot;,&#xD;&#xA;  &quot;method&quot;:&quot;chain_getBlockHash&quot;,&#xD;&#xA;  &quot;params&quot;:[123456]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `params` above contain the blocknumber, 123456 in this case." ContentLicense="CC BY-SA 4.0" />
  <row Id="16069" PostHistoryTypeId="2" PostId="4282" RevisionGUID="768f281c-e69b-4dd3-81ac-46c5a9a2003d" CreationDate="2022-08-15T13:43:48.543" UserId="94" Text="`Utility::batch` does not return the error but emits a `BatchInterrupted` event.  &#xD;&#xA;Take a look at the related function `batch_all` which returns the error.  &#xD;&#xA;Otherwise there is `force_batch` which does not interrupt but keeps going and emits `ItemFailed` events." ContentLicense="CC BY-SA 4.0" />
  <row Id="16072" PostHistoryTypeId="2" PostId="4283" RevisionGUID="8553685d-b47a-4ad3-9435-7bebc7ff5424" CreationDate="2022-08-15T14:34:45.447" UserId="227" Text="This is no trivial undertaking. A good resource to learn about the different types of stable coins is https://101blockchains.com/types-of-stablecoins.&#xD;&#xA;&#xD;&#xA;For crypto-backed stablecoins and algorithmic stablecoins you can easily find open source implementations and whitepapers. For those systems it's especially important that their development happens out in the open, for anybody to find issues with. Otherwise you might end up going live with a system that hasn't been peer reviewed beforehand and issues might be exploited immediately.&#xD;&#xA;&#xD;&#xA;For crypto-backed stablecoins there is e.g. [MakerDAO's Multi Collateral DAI implementation in Solidity](https://github.com/makerdao/dss). You can find the paper on it [here](https://makerdao.com/en/whitepaper/#introduction) and the repository points to some documentation as well. &#xD;&#xA;&#xD;&#xA;You will see that this is a complex system though, requiring much more than the what-might-seem core logic of pegging to another currency (e.g. a governance system for upgrading the system is required as well).&#xD;&#xA;&#xD;&#xA;In Polkadot, Acala is a stablecoin for which you can find their whitepaper [here](https://github.com/AcalaNetwork/Acala-white-paper) and an implementation in Rust [here](https://github.com/AcalaNetwork/Acala). &#xD;&#xA;&#xD;&#xA;At the moment there is no ink! stablecoin implementation that I am aware of. If you're serious about this undertaking (be it just as an exercise to learn more about how stablecoins work) the best starting points would be to either&#xD;&#xA;* …understand how Acala works and try to port that code to ink!. Since the Acala implementation is already in Rust this will easen the work or&#xD;&#xA;* …port a MakerDAO implementation to ink!. You could e.g. restrict yourself to [SAI](https://makerdao.com/en/whitepaper/sai/), which has a simpler implementation than MCD.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16074" PostHistoryTypeId="2" PostId="4284" RevisionGUID="d7ff2e9f-4caf-4af6-9232-1168d9e007b8" CreationDate="2022-08-15T16:36:09.877" UserId="587" Text="I've been working on a pallet in isolation for a few months. I did testing by mocking a runtime and mocking the related pallets that are expected by it. Basically, so far I have created fake pallets in a `mock` directory and used those in place of the ones that my pallet expects to be loosely coupled with. Here's my directory structure (roughly)&#xD;&#xA;```&#xD;&#xA;frame/my-pallet/&#xD;&#xA;├── Cargo.toml&#xD;&#xA;└── src&#xD;&#xA;    ├── benchmarking.rs&#xD;&#xA;    ├── lib.rs&#xD;&#xA;    ├── mock&#xD;&#xA;    │   ├── accounts.rs&#xD;&#xA;    │   ├── assets.rs&#xD;&#xA;    │   ├── mod.rs&#xD;&#xA;    │   ├── pallet1.rs&#xD;&#xA;    │   ├── pallet2.rs&#xD;&#xA;    │   └── runtime.rs&#xD;&#xA;    ├── tests&#xD;&#xA;    │   ├── mod.rs&#xD;&#xA;    │   ├── extrinsic1.rs&#xD;&#xA;    │   ├── extrinsic2.rs&#xD;&#xA;    │   └── extrinsic3.rs&#xD;&#xA;    ├── helpers.rs&#xD;&#xA;    └── weights.rs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I now wanna do tests with a real implementation of `pallet1`, but I wanna keep the test cases with the mocked version. Is there a 'canonical' way of doing that? I'm considering just adding a `integrations` subdirectory under `src` and having new `mock.rs` and `tests.rs` files there." ContentLicense="CC BY-SA 4.0" />
  <row Id="16076" PostHistoryTypeId="1" PostId="4284" RevisionGUID="d7ff2e9f-4caf-4af6-9232-1168d9e007b8" CreationDate="2022-08-15T16:36:09.877" UserId="587" Text="Recommended layout for testing integration of pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="16077" PostHistoryTypeId="3" PostId="4284" RevisionGUID="d7ff2e9f-4caf-4af6-9232-1168d9e007b8" CreationDate="2022-08-15T16:36:09.877" UserId="587" Text="|frame|testing|mock|loose-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16079" PostHistoryTypeId="2" PostId="4285" RevisionGUID="23a9aac8-5c17-4ef8-a039-c5b5b612348c" CreationDate="2022-08-15T18:15:58.453" UserId="2752" Text="I am monitoring the events when calling a method from my contract and want to &#xD;&#xA;save the output of one of my custom events, to display it.&#xD;&#xA;&#xD;&#xA;The call of my method looks like this:&#xD;&#xA;&#xD;&#xA;    contract.tx&#xD;&#xA;      .method({ storageDepositLimit, gasLimit }, account , 'root', label)&#xD;&#xA;      .signAndSend(alice, ({events = [], status}) =&gt; {&#xD;&#xA;        if (status.isInBlock) {&#xD;&#xA;          console.log('in a block')&#xD;&#xA;          events.forEach(({ event, phase }) =&gt; {&#xD;&#xA;            if(api.events.contracts.ContractEmitted.is(event)){&#xD;&#xA;              const [account_id, contract_evt] = event.data&#xD;&#xA;              const decoded = new Abi(abi).decodeEvent(contract_evt)&#xD;&#xA;              // This (decoded) is the information I want to save&#xD;&#xA;            }else{&#xD;&#xA;              console.log('\t', phase.toString(), `: ${event.section}.${event.method}`, event.data.toString())&#xD;&#xA;            }&#xD;&#xA;          });&#xD;&#xA;         } else if (status.isFinalized) {&#xD;&#xA;          console.log('finalized')&#xD;&#xA;        }&#xD;&#xA;      })&#xD;&#xA;&#xD;&#xA;How can I save 'decoded' outside of the contract call to display the information later?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16081" PostHistoryTypeId="1" PostId="4285" RevisionGUID="23a9aac8-5c17-4ef8-a039-c5b5b612348c" CreationDate="2022-08-15T18:15:58.453" UserId="2752" Text="How to save decoded events using polkadot.js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16082" PostHistoryTypeId="3" PostId="4285" RevisionGUID="23a9aac8-5c17-4ef8-a039-c5b5b612348c" CreationDate="2022-08-15T18:15:58.453" UserId="2752" Text="|polkadot-js|events|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16083" PostHistoryTypeId="2" PostId="4286" RevisionGUID="df1e6f3e-d413-441f-a499-ea41cdcc85f8" CreationDate="2022-08-15T19:46:33.787" UserId="29" Text="You could define an array: `const decodedEvents = []` before `contract.tx` and when you get your `decodeEvent` you then push that into the decodedEvents array. &#xD;&#xA;&#xD;&#xA;You can then use `decodedEvents` later." ContentLicense="CC BY-SA 4.0" />
  <row Id="16085" PostHistoryTypeId="5" PostId="4279" RevisionGUID="2cc51a2f-e754-43ea-b8d3-4e161849431f" CreationDate="2022-08-15T19:49:29.760" UserId="29" Comment="added 9 characters in body" Text="I am trying to request a block hash for a specific block using the Polkadot JSON-RPC but no matter how I construct the request (with Python), it always returns the latest block and not the one I want. How can I solve that?&#xD;&#xA;&#xD;&#xA;```py&#xD;&#xA;import requests&#xD;&#xA;&#xD;&#xA;import json&#xD;&#xA;&#xD;&#xA;def get_block_hash(block_number):&#xD;&#xA;&#xD;&#xA;  url = &quot;https://dot.getblock.io/mainnet/&quot;&#xD;&#xA;&#xD;&#xA;  payload = json.dumps({&#xD;&#xA;&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;&#xD;&#xA;    &quot;method&quot;: &quot;chain_getBlockHash&quot;,&#xD;&#xA;&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;&#xD;&#xA;  })&#xD;&#xA;&#xD;&#xA;  headers = {&#xD;&#xA;    'x-api-key': 'enter-api-key',&#xD;&#xA;    'blockNumber': block_number,&#xD;&#xA;    'Content-Type': 'application/json'&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  response = requests.request(&quot;POST&quot;, url, headers=headers, data=payload)&#xD;&#xA;&#xD;&#xA;  print(response.text)&#xD;&#xA;&#xD;&#xA;  return response&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16086" PostHistoryTypeId="5" PostId="1320" RevisionGUID="d13c3afb-6431-4340-9e11-49d5c8ecbdaa" CreationDate="2022-08-15T22:52:54.917" UserId="34" Comment="deleted 8 characters in body" Text="There are many docs/tutorials explaining how to extend the node's RPC service with a Custom RPC to query the Runtime storage. What I could not figure it out yet, is how to do the same but to query the Offchain-storage. I basically want to replicate the following available built-in service but with my own Custom RPC:&#xD;&#xA;https://paritytech.github.io/substrate/master/sc_rpc_api/offchain/index.html&#xD;&#xA;&#xD;&#xA;Below are my snippets:&#xD;&#xA;&#xD;&#xA;This example works properly. No storage required.&#xD;&#xA;```&#xD;&#xA;// node/src/rpc.rs&#xD;&#xA;// Ref: https://substrate.recipes/custom-rpc.html&#xD;&#xA;&#xD;&#xA;let mut io = jsonrpc_core::IoHandler::default();&#xD;&#xA;&#xD;&#xA;// Add a silly RPC that returns constant values&#xD;&#xA;io.extend_with(SillyRpc::to_delegate(Silly {},));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The following example is the one I'm interested in, and I could not figure it out how to make it work so far. Below I'm trying to incorporate the `offchain-storage`.&#xD;&#xA;```&#xD;&#xA;// node/src/rpc.rs&#xD;&#xA;// Ref: https://core.tetcoin.org/rustdocs/v2.0.1/src/sc_rpc/offchain/mod.rs.html&#xD;&#xA;&#xD;&#xA;let mut io = jsonrpc_core::IoHandler::default();&#xD;&#xA;&#xD;&#xA;let storage = ???????&#xD;&#xA;io.extend_with(SillyRpc::to_delegate(Silly::new(storage)));&#xD;&#xA;```&#xD;&#xA;The closest code I found similar to what I need is the following from `builder.rs`:&#xD;&#xA;```&#xD;&#xA;let maybe_offchain_rpc = offchain_storage.map(|storage| {&#xD;&#xA;	let offchain = sc_rpc::offchain::Offchain::new(storage, deny_unsafe);&#xD;&#xA;	offchain::OffchainApi::to_delegate(offchain)&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also related to the previous question:&#xD;&#xA;https://substrate.stackexchange.com/questions/1024/is-it-possible-to-query-an-ocws-off-chain-storage-via-rpc-from-an-external-serv/1049#1049&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;Pablo." ContentLicense="CC BY-SA 4.0" />
  <row Id="16087" PostHistoryTypeId="5" PostId="4286" RevisionGUID="bd9e2175-9d24-497b-a274-abf2dfd8fb02" CreationDate="2022-08-16T03:53:17.927" UserId="29" Comment="deleted 56 characters in body" Text="This is a good question.&#xD;&#xA;&#xD;&#xA;From all the examples that I have seen, it looks like you may have to have your program logic inside the `signAndSend`." ContentLicense="CC BY-SA 4.0" />
  <row Id="16088" PostHistoryTypeId="5" PostId="4286" RevisionGUID="9d7bcbd0-a350-43ca-8e6a-5ea3271e9568" CreationDate="2022-08-16T04:51:56.593" UserId="29" Comment="added 736 characters in body" Text="This is a good question.&#xD;&#xA;&#xD;&#xA;From all the examples that I have seen, it looks like you may have to have your program logic inside the `signAndSend`.&#xD;&#xA;&#xD;&#xA;Also, a note that `contract.tx.method({ storageDepositLimit, gasLimit }, account , 'root', label).signAndSend(alice)` gives you back a tx hash that you can use to query the events later.&#xD;&#xA;&#xD;&#xA;If you know which block number this transaction occurred you can take the block hash and query on that block hash like this:&#xD;&#xA;&#xD;&#xA;You can use &#xD;&#xA;```js&#xD;&#xA;const apiAt = await api.at(blockHash);&#xD;&#xA;const events = await apiAt.query.system.events();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Looks like you can match the extrinsics with the events:&#xD;&#xA;- https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-map-extrinsics-to-their-events&#xD;&#xA;&#xD;&#xA;You can match extrinsic hashes here:&#xD;&#xA;- https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-retrieve-the-headerextrinsic-hash-from-blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="16089" PostHistoryTypeId="2" PostId="4287" RevisionGUID="04ee18d3-9879-46de-af8e-6fb390da3c75" CreationDate="2022-08-16T05:36:48.700" UserId="1949" Text="All you want to do is have the data available outside the callback. So just set it to some variable -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let decoded = null&#xD;&#xA;&#xD;&#xA;function setDecoded (value) {&#xD;&#xA;  decoded = value&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;contract.tx&#xD;&#xA;  .method({ storageDepositLimit, gasLimit }, account , 'root', label)&#xD;&#xA;  .signAndSend(alice, ({events = [], status}) =&gt; {&#xD;&#xA;    if (status.isInBlock) {&#xD;&#xA;      console.log('in a block')&#xD;&#xA;      events.forEach(({ event, phase }) =&gt; {&#xD;&#xA;        if(api.events.contracts.ContractEmitted.is(event)){&#xD;&#xA;          const [account_id, contract_evt] = event.data&#xD;&#xA;&#xD;&#xA;          /* saves the data */&#xD;&#xA;          setDecoded(new Abi(abi).decodeEvent(contract_evt))&#xD;&#xA;        }else{&#xD;&#xA;          console.log('\t', phase.toString(), `: ${event.section}.${event.method}`, event.data.toString())&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;     } else if (status.isFinalized) {&#xD;&#xA;      console.log('finalized')&#xD;&#xA;    }&#xD;&#xA;  })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Alternatively, you can obviously listen for any events anywhere and still do the same -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let decoded = null&#xD;&#xA;&#xD;&#xA;function setDecoded (value) {&#xD;&#xA;  decoded = value&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;api.query.system.events((records) =&gt;&#xD;&#xA;  records.forEach(({ event, phase }) =&gt; {&#xD;&#xA;    if(api.events.contracts.ContractEmitted.is(event)){&#xD;&#xA;      const [account_id, contract_evt] = event.data&#xD;&#xA;&#xD;&#xA;      /* saves the data if from our contract */&#xD;&#xA;      if (account_id.eq(&quot;contract address goes here&quot;))&#xD;&#xA;        setDecoded(new Abi(abi).decodeEvent(contract_evt))&#xD;&#xA;    }&#xD;&#xA;  })&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16091" PostHistoryTypeId="2" PostId="4288" RevisionGUID="84f96d6e-40f0-4d50-ae07-2debdc72e193" CreationDate="2022-08-16T05:44:07.313" UserId="1949" Text="`api.query.&lt;pallet&gt;.&lt;call&gt;.creator.meta` has the metadata as retrieved from the chain.&#xD;&#xA;&#xD;&#xA;To lookup the specific type there, you can do&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const meta = api.query.system.account.creator.meta&#xD;&#xA;&#xD;&#xA;/ * FrameSystemAccountInfo */&#xD;&#xA;console.log(api.registry.lookup.getName(meta.type.asMap.value))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16095" PostHistoryTypeId="2" PostId="4290" RevisionGUID="70cf4e83-4dd6-4344-84fe-6094ce4412bf" CreationDate="2022-08-16T07:57:23.870" UserId="251" Text="```py&#xD;&#xA;import json&#xD;&#xA;# pip3 install websocket-client&#xD;&#xA;import websocket&#xD;&#xA;&#xD;&#xA;uri = 'wss://rpc.polkadot.io'&#xD;&#xA;ws = websocket.create_connection(uri)&#xD;&#xA;&#xD;&#xA;for block_number in range(11627380, 0, -1):&#xD;&#xA;    print(block_number)&#xD;&#xA;&#xD;&#xA;    data = f'{{\&#xD;&#xA;        &quot;jsonrpc&quot;: &quot;2.0&quot;,\&#xD;&#xA;        &quot;id&quot;: 1,\&#xD;&#xA;        &quot;method&quot;: &quot;chain_getBlockHash&quot;,\&#xD;&#xA;        &quot;params&quot;: [{block_number}]\&#xD;&#xA;    }}'&#xD;&#xA;&#xD;&#xA;    ws.send(data)&#xD;&#xA;&#xD;&#xA;    block_hash = json.loads(ws.recv())['result']&#xD;&#xA;&#xD;&#xA;    print(block_hash)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;11627380&#xD;&#xA;0x6d4d9db750b8b25c3a8b924c7a9987f4dfebc4f64d981d27f5ebfbcc36dc2acc&#xD;&#xA;11627379&#xD;&#xA;0x83f433b3cb100e41f4028849e1299632d8d3a9eb92c0429de68cd3345c22544f&#xD;&#xA;11627378&#xD;&#xA;0x98feb884664c370090bbabf8d43f6cf1d580cf99bed392b3b45173456e93e237&#xD;&#xA;11627377&#xD;&#xA;0x01810c5483943974e1c00fed4f49bf0ac057d131f2842566289b0f417d6e8bfd&#xD;&#xA;11627376&#xD;&#xA;0xd1ccb8a533a37db43947aa6bf3c854eded35558309d0e888356819bac6a6fcab&#xD;&#xA;11627375&#xD;&#xA;0xa9ded33c03d0f7ba435ed7ddc528fb3a4bbb1486ac7fdad41f3adb9c68cc656c&#xD;&#xA;11627374&#xD;&#xA;0x41d2512fcdd9fec34e97a5d931dbdff3144cd900fd5ef94b9f070b5abcd947a6&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16097" PostHistoryTypeId="2" PostId="4291" RevisionGUID="d8ab786c-7866-49af-90d1-6365914da401" CreationDate="2022-08-16T08:11:03.257" UserId="220" Text="The [interlay docs][1] state:&#xD;&#xA;&#xD;&#xA;&gt; If Vaults fail to behave according to protocol rules, they face&#xD;&#xA;&gt; punishment through liquidation of collateral - specifically, if a&#xD;&#xA;&gt; Vault fails to execute a redeem on time or falls below the liquidation&#xD;&#xA;&gt; collateral threshold.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Failed Redeem If Vaults go offline and fail to execute redeem, there&#xD;&#xA;&gt; are two possible outcomes.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Outcome 1: User retries with another Vault&#xD;&#xA;&gt; &#xD;&#xA;&gt; After the redeem request expires, the user can cancel it and decide to&#xD;&#xA;&gt; retry with another Vault. In this case:&#xD;&#xA;&gt; &#xD;&#xA;&gt; A punishment fee is slashed from the Vaults collateral and paid to the&#xD;&#xA;&gt; user, and A temporary ban is incurred upon the Vault e.g. 24 hours&#xD;&#xA;&gt; from accepting further requests. Outcome 2: User liquidates (part of)&#xD;&#xA;&gt; Vault&#xD;&#xA;&gt; &#xD;&#xA;&gt; After the redeem request expires, the user can cancel it and decide to&#xD;&#xA;&gt; liquidate (part of) the Vault. In this case:&#xD;&#xA;&gt; &#xD;&#xA;&gt; A punishment fee is slashed from the Vaults collateral and paid to the&#xD;&#xA;&gt; user, Vault collateral is slashed at the current spot&#xD;&#xA;&gt; collateral-to-BTC exchange rate and paid to the user, A temporary ban&#xD;&#xA;&gt; is incurred upon the Vault e.g. 24 hours from accepting further&#xD;&#xA;&gt; requests (if it still has collateral left), and The Vault keeps the&#xD;&#xA;&gt; BTC.&#xD;&#xA;&#xD;&#xA;How is the &quot;current spot collateral-to-BTC exchange rate&quot; determined? Is there an exchange built into the protocol? If not from where is the rate signal derived?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.interlay.io/#/vault/overview?id=failed-redeem" ContentLicense="CC BY-SA 4.0" />
  <row Id="16099" PostHistoryTypeId="1" PostId="4291" RevisionGUID="d8ab786c-7866-49af-90d1-6365914da401" CreationDate="2022-08-16T08:11:03.257" UserId="220" Text="How is exchange rate determined in the case of an InterBTC failed redeem?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16100" PostHistoryTypeId="3" PostId="4291" RevisionGUID="d8ab786c-7866-49af-90d1-6365914da401" CreationDate="2022-08-16T08:11:03.257" UserId="220" Text="|interbtc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16101" PostHistoryTypeId="2" PostId="4292" RevisionGUID="89e9e345-097c-4e4c-89da-a449f36ee324" CreationDate="2022-08-16T09:58:46.970" UserId="3009" Text="I received a task which is generating key pair in pallet on chain logic. I know that I should import sp_core crate. I import it like this: &quot;use sp_core::Pair;&quot;  This line was written at the top of my pallet source code but below the micro &quot;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&quot;&#xD;&#xA;&#xD;&#xA;When I build the project, an error comes out and shows &quot;no `Pair` in the root&quot; .I inspect the rust docs which shows that Pair is a trait in sp_core::crypto (sp_core::crypto::Pair),and re-export to the sp_core root. So I don't know why the error jump out.&#xD;&#xA;&#xD;&#xA;After thinking it over carefully, I thought it must be related to cfg feature. I mean when compiling the pallet or runtime code, the feature of std should not be set, but the Pair trait has  a std feature set on itself just right. So the error said &quot;no `Pair` in the root&quot;&#xD;&#xA;&#xD;&#xA;But why the Pair trait can't be use in pallet and runtime? Maybe the random is the origin of this. As we know, random generating is forbidden on blockchain because of consensus mechanism. So generating key pair is also forbidden due to the use of random.&#xD;&#xA;&#xD;&#xA;So how can I generate a key pair? Can I generate key pair on offchain work as an alternative way? But the offchain work is one part of pallet as an implementation of hooks trait. I find that I still can not compile the pallet code with &quot;use sp_core::Pair;&quot;.&#xD;&#xA;&#xD;&#xA;Oh, who can tell me how to handle this problem? &#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="16103" PostHistoryTypeId="1" PostId="4292" RevisionGUID="89e9e345-097c-4e4c-89da-a449f36ee324" CreationDate="2022-08-16T09:58:46.970" UserId="3009" Text="How to generate key pair in pallet or on offchain work" ContentLicense="CC BY-SA 4.0" />
  <row Id="16104" PostHistoryTypeId="3" PostId="4292" RevisionGUID="89e9e345-097c-4e4c-89da-a449f36ee324" CreationDate="2022-08-16T09:58:46.970" UserId="3009" Text="|pallet|offchain|keyring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16105" PostHistoryTypeId="2" PostId="4293" RevisionGUID="2d6c9c3a-5349-402b-ba71-a9889fafefae" CreationDate="2022-08-16T10:13:17.560" UserId="566" Text="I'm looking to subscribe to events emitted from a contract. &#xD;&#xA;&#xD;&#xA;I am currently creating a storage key for **System** **Events**, subscribing to it and filtering the events to get the one emitted by the contract I am interested in.&#xD;&#xA;&#xD;&#xA;Is there a better way to subscribe to the events of a specific contract?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16107" PostHistoryTypeId="1" PostId="4293" RevisionGUID="2d6c9c3a-5349-402b-ba71-a9889fafefae" CreationDate="2022-08-16T10:13:17.560" UserId="566" Text="Subscribing to contract events using RPC" ContentLicense="CC BY-SA 4.0" />
  <row Id="16108" PostHistoryTypeId="3" PostId="4293" RevisionGUID="2d6c9c3a-5349-402b-ba71-a9889fafefae" CreationDate="2022-08-16T10:13:17.560" UserId="566" Text="|ink|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16109" PostHistoryTypeId="2" PostId="4294" RevisionGUID="dde585c7-0cc1-444d-b48b-488b84b4217b" CreationDate="2022-08-16T10:40:40.000" UserId="445" Text="From my understanding, Polkadot has `sudo` governance in the initial phase. Currently, Polkadot completely changed into on-chain governance by `pallet_democracy`, `pallet_membership`, `pallet_collective`. &#xD;&#xA;&#xD;&#xA;How Polkadot can implement this transition?&#xD;&#xA;&#xD;&#xA;Some doubts from my side. Correct me right or wrong!&#xD;&#xA;&#xD;&#xA;+ In the initial phase,  Polkadot used `sudo`. This `sudo` key will configure in chain spec. If Polkadot removes `sudo` key, it's mean that Polkadot will change the genesis state -&gt; Polkadot will reset the chain?&#xD;&#xA;&#xD;&#xA;+ When Polkadot had this transition? As calculation, it's aproximately `about 2 years 3 months` ago." ContentLicense="CC BY-SA 4.0" />
  <row Id="16111" PostHistoryTypeId="1" PostId="4294" RevisionGUID="dde585c7-0cc1-444d-b48b-488b84b4217b" CreationDate="2022-08-16T10:40:40.000" UserId="445" Text="How Polkadot transition Sudo into On chain governance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16112" PostHistoryTypeId="3" PostId="4294" RevisionGUID="dde585c7-0cc1-444d-b48b-488b84b4217b" CreationDate="2022-08-16T10:40:40.000" UserId="445" Text="|polkadot|kusama|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16114" PostHistoryTypeId="4" PostId="4293" RevisionGUID="10e3d884-a0d7-4cb5-a744-6f42851e7092" CreationDate="2022-08-16T11:03:07.383" UserId="566" Comment="edited title" Text="How to subscribe to contract events using RPC" ContentLicense="CC BY-SA 4.0" />
  <row Id="16115" PostHistoryTypeId="5" PostId="4280" RevisionGUID="c01b329c-cb52-48a4-9edf-aa86c502ae6a" CreationDate="2022-08-16T11:03:44.327" UserId="2355" Comment="added code " Text="I am doing a balance upload (copying and modifying the balances from a chain to another)&#xD;&#xA;&#xD;&#xA;I have a json file containing all i need, i compute the new balance, and i batch calls doing a setBalance().&#xD;&#xA;&#xD;&#xA;I have ~16000 calls to batch. Once everything passed, i run a check script that, for every addresses, fetch their balance from the chain, and check if it matches the one i was expected. and, out of my 16000 calls, i get ~500 accounts that doesn't have the right value. and the difference is very big, no not negligible. &#xD;&#xA;&#xD;&#xA;why does this happens ? Why doesn't i have an error ? How can i prevent this ?&#xD;&#xA;&#xD;&#xA;here is the code (simplified) :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import balances from &quot;./balances.json&quot;&#xD;&#xA;/* js&#xD;&#xA;format:&#xD;&#xA;0x000: {&#xD;&#xA;address: 0x000&#xD;&#xA;free: ...&#xD;&#xA;reserved: ...&#xD;&#xA;Total: ...&#xD;&#xA;*/&#xD;&#xA;&#xD;&#xA;for (balance in balances) {&#xD;&#xA;   let new_balance = (balance.Total / 100) * 10 ** 12&#xD;&#xA;   const free_balance = parseInt((new_balance * (3 / 10))&#xD;&#xA;   const reserved_balance = parseInt((new_balance * (7 / 10))&#xD;&#xA;&#xD;&#xA;   await api.tx.sudo.sudo(&#xD;&#xA;      api.tx.balances.setBalance(address, free_balance.toString(),&#xD;&#xA;      reserved_balance.toString())&#xD;&#xA;   ).signAndSend(sudo, { nonce: -1 })&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16116" PostHistoryTypeId="5" PostId="4280" RevisionGUID="681ea202-6783-43ff-9f2d-336a443e09ed" CreationDate="2022-08-16T11:09:09.760" UserId="2355" Comment="added code " Text="I am doing a balance upload (copying and modifying the balances from a chain to another)&#xD;&#xA;&#xD;&#xA;I have a json file containing all i need, i compute the new balance, and i batch calls doing a setBalance().&#xD;&#xA;&#xD;&#xA;I have ~16000 calls to batch. Once everything passed, i run a check script that, for every addresses, fetch their balance from the chain, and check if it matches the one i was expected. and, out of my 16000 calls, i get ~500 accounts that doesn't have the right value. and the difference is very big, no not negligible. &#xD;&#xA;&#xD;&#xA;why does this happens ? Why doesn't i have an error ? How can i prevent this ?&#xD;&#xA;&#xD;&#xA;here is the code (simplified) :&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import balances from &quot;./balances.json&quot;&#xD;&#xA;/*&#xD;&#xA;format:&#xD;&#xA;0x000: {&#xD;&#xA;  address: 0x000 // same as key&#xD;&#xA;  free: ...&#xD;&#xA;  reserved: ...&#xD;&#xA;  Total: ...&#xD;&#xA;}&#xD;&#xA;*/&#xD;&#xA;&#xD;&#xA;import crowdloan from &quot;./crowdloan.json&quot;&#xD;&#xA;/*&#xD;&#xA;format:&#xD;&#xA;0x000: value&#xD;&#xA;*/&#xD;&#xA;&#xD;&#xA;for (balance in balances) {&#xD;&#xA;   let new_balance = (balance.Total / 100) * 10 ** 12&#xD;&#xA;&#xD;&#xA;   const deposit = crowdloan[balance.address]&#xD;&#xA;   if (deposit != undefined) {&#xD;&#xA;      new_balance += deposit * kab_per_ksm /* constant */ * 10 ** 12&#xD;&#xA;   }&#xD;&#xA;&#xD;&#xA;   const free_balance = parseInt((new_balance * (3 / 10))&#xD;&#xA;   const reserved_balance = parseInt((new_balance * (7 / 10))&#xD;&#xA;&#xD;&#xA;   await api.tx.sudo.sudo(&#xD;&#xA;      api.tx.balances.setBalance(address, free_balance.toString(),&#xD;&#xA;      reserved_balance.toString())&#xD;&#xA;   ).signAndSend(sudo, { nonce: -1 })&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16117" PostHistoryTypeId="2" PostId="4295" RevisionGUID="6682d385-240c-4a26-a027-52c09da23c09" CreationDate="2022-08-16T11:13:21.633" UserId="1789" Text="Part 1 of this question:&#xD;&#xA;https://substrate.stackexchange.com/questions/3796/how-to-make-a-parachain-project-that-uses-frontier-as-a-dependency&#xD;&#xA;&#xD;&#xA;Merge Fronter repo/template folder into your parachain... although I am stuck at node/service.rs but it seems it is okay to skip those...&#xD;&#xA;&#xD;&#xA;Regarding to ERC777 contracts, you have to &#xD;&#xA;- use Truffle to deploy the ERC1820 first ... see https://ethereum.stackexchange.com/questions/17927/how-to-deploy-smart-contract-in-predefined-contract-address-in-private-ethereum/79316#79316&#xD;&#xA;&#xD;&#xA;- use Truffle to deploy ERC777 second ... see&#xD;&#xA;https://forum.openzeppelin.com/t/simple-erc777-token-example/746&#xD;&#xA;&#xD;&#xA;Hardhat can only deploy ERC20, ERC721, ERC1155, ERC4626, ERC1820, but it cannot deploy ERC777 for some unknown reason...&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16119" PostHistoryTypeId="2" PostId="4296" RevisionGUID="65bb54f3-1bf4-492b-a90c-754d570f5b69" CreationDate="2022-08-16T11:38:36.310" UserId="362" Text="# Premise&#xD;&#xA;&#xD;&#xA;1. Substrate will, by default, store every event in a block in a storage value `Event` of type `Vec&lt;EventRecord&gt;` in the system module, which involves reading &amp; writing this full vector each time, as explained here https://stackoverflow.com/questions/57219830/what-is-the-cost-of-event-storage-in-substrate.&#xD;&#xA;2. The time it takes to read/write to the database increases with the size of the object being read, at least eventually in expectation.&#xD;&#xA;&#xD;&#xA;# Problem&#xD;&#xA;&#xD;&#xA;If an extrinsic emits an event with has some payload with some size, say like a user provided `Vec&lt;u8&gt;`, then an attacker can submit a series of such extrinsics, radically increasing the size of this vector, and as a result making the real computational weight of all subsequent extrinsics in that same block much greater than what is reported by their weight functions, and also no fee is paid for this computation. In essence all weight functions for those extrinsics are wrong now. This problem increases in severity independently with block weight/length limits, and the size of individual events, because both independently can be used to bloat the size of `Events`.&#xD;&#xA;&#xD;&#xA;Unfortunately, it's also in practice not feasible to opt out of the default behavior in the System module, as there is no storage of logs or events in Substrate that can be exposed to the myriad of tools that need to inspect this, they all rely on storage state snapshots in archival nodes.&#xD;&#xA;&#xD;&#xA;# Questions&#xD;&#xA;&#xD;&#xA;1. Is this an accurate summary?&#xD;&#xA;2. How was it determined that this is already not a problem in Polkadot or Kusama?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16121" PostHistoryTypeId="1" PostId="4296" RevisionGUID="65bb54f3-1bf4-492b-a90c-754d570f5b69" CreationDate="2022-08-16T11:38:36.310" UserId="362" Text="Large event payloads unsafe?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16122" PostHistoryTypeId="3" PostId="4296" RevisionGUID="65bb54f3-1bf4-492b-a90c-754d570f5b69" CreationDate="2022-08-16T11:38:36.310" UserId="362" Text="|benchmarking|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16123" PostHistoryTypeId="5" PostId="3824" RevisionGUID="2211d2e6-8100-4cc9-b86e-c796ecb52a29" CreationDate="2022-08-16T12:55:55.830" UserId="1789" Comment="added 174 characters in body" Text="Check out the Frontier Node Template repo https://github.com/substrate-developer-hub/frontier-node-template&#xD;&#xA;&#xD;&#xA;Copy the files in node and runtime folders inside the above repo, then make your parachain from there. It is the quickest way to make a parachain that uses Frontier as a dependency. &#xD;&#xA;&#xD;&#xA;Also check out other open source parachain repositories for specific Substrate versions!&#xD;&#xA;&#xD;&#xA;See part 2 of this question: https://substrate.stackexchange.com/questions/4227/how-to-add-frontier-code-as-a-dependency-to-substrate-parachain-template-based-p/4295#4295" ContentLicense="CC BY-SA 4.0" />
  <row Id="16124" PostHistoryTypeId="5" PostId="4294" RevisionGUID="c8a7af37-2d50-49ba-94d3-1ade63b0776b" CreationDate="2022-08-16T14:15:36.243" UserId="34" Comment="deleted 53 characters in body; edited tags" Text="From my understanding, Polkadot has `sudo` governance in the initial phase. Currently, Polkadot completely changed into on-chain governance by `pallet_democracy`, `pallet_membership`, `pallet_collective`. &#xD;&#xA;&#xD;&#xA;- How did Polkadot implement this transition?&#xD;&#xA;&#xD;&#xA;- In the initial phase,  Polkadot used `sudo`. This `sudo` key will configure in chain spec. If Polkadot removes `sudo` key, it's mean that Polkadot will change the genesis state -&gt; Polkadot will reset the chain?&#xD;&#xA;&#xD;&#xA;- When Polkadot had this transition? As calculation, it's approximately `about 2 years 3 months` ago." ContentLicense="CC BY-SA 4.0" />
  <row Id="16125" PostHistoryTypeId="6" PostId="4294" RevisionGUID="c8a7af37-2d50-49ba-94d3-1ade63b0776b" CreationDate="2022-08-16T14:15:36.243" UserId="34" Comment="deleted 53 characters in body; edited tags" Text="|polkadot|kusama|runtime-upgrade|governance|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16126" PostHistoryTypeId="2" PostId="4297" RevisionGUID="f1ceadc0-01bc-428e-8cc6-19346e07aa60" CreationDate="2022-08-16T14:30:05.580" UserId="34" Text="One of the key features that Substrate is build around is the ability to perform [runtime upgrades](https://docs.substrate.io/main-docs/build/upgrade/). This feature allows for the logic of a blockchain to change over time. Polkadot and Kusama both used this feature (that almost always requires `root` [origin](https://docs.substrate.io/main-docs/build/origins/), that `sudo` and some governance pallets allow for, to remove the [sudo pallet](https://paritytech.github.io/substrate/master/pallet_sudo/index.html) and put in place governance pallets to take over the only path to make a `root` origin call in the network. &#xD;&#xA;&#xD;&#xA;You can discover when this event occurred by looking for runtime upgrade events in the history of the chain with tools like [Substrate archive](https://docs.substrate.io/reference/command-line-tools/archive/) and discover the runtime used to update at each point along the way. Easiest way to discover the features of the runtime is likely the metadata including the version of the runtime (impl version) and look up the source code for this on the [Polkadot repository releases](https://github.com/paritytech/polkadot/releases) that includes notes on what is included in the runtime for both networks, that will eventually be used to perform a runtime upgrade on the various relay chain networks listed. " ContentLicense="CC BY-SA 4.0" />
  <row Id="16129" PostHistoryTypeId="6" PostId="4291" RevisionGUID="8daeae6e-149a-434c-83c0-67d3d4ad235e" CreationDate="2022-08-16T14:44:53.590" UserId="34" Comment="edited tags" Text="|parachain|interbtc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16130" PostHistoryTypeId="5" PostId="4272" RevisionGUID="f2a1fbfc-3aee-4056-8992-9e2b6e17981a" CreationDate="2022-08-16T14:47:47.313" UserId="599" Comment="deleted 95 characters in body" Text="`PSP34` in the rust level is a trait(interface) implemented by your contract. At the ABI level is a prefix or a namespace of the method that makes it unique. It allows supporting several methods with the same naming but with different prefixes. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// First&#xD;&#xA;impl Contract {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn balance_of(&amp;self, owner: AccountId) -&gt; Balance { ... }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Second&#xD;&#xA;impl PSP22 for Contract {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn balance_of(&amp;self, owner: AccountId) -&gt; Balance { ... }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Third&#xD;&#xA;impl PSP34 for Contract {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn balance_of(&amp;self, owner: AccountId) -&gt; Balance { ... }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All those three implementations will generate different labels and selectors(selector is 4 bytes of the black2b hash of the label) for your methods:&#xD;&#xA;&#xD;&#xA;- First: &quot;label&quot;: &quot;balance_of&quot;, &quot;selector&quot;: &quot;0x0f755a56&quot;&#xD;&#xA;- Second: &quot;label&quot;: &quot;PSP22::balance_of&quot;, &quot;selector&quot;: &quot;0x6568382f&quot;&#xD;&#xA;- Third: &quot;label&quot;: &quot;PSP34::balance_of&quot;, &quot;selector&quot;: &quot;0xcde7e55f&quot;&#xD;&#xA;&#xD;&#xA;The [polkadot-js](https://github.com/polkadot-js/api) can work with prefix and non-prefixed methods. It [campelCase](https://textedit.tools/camelcase) prefix and name of the method.&#xD;&#xA;&#xD;&#xA;- First: `contract.query.balanceOf` or `contract.query[&quot;balanceOf&quot;]`&#xD;&#xA;- Second: `contract.query[&quot;psp22::balanceOf&quot;]`&#xD;&#xA;- Third: `contract.query[&quot;psp34::balanceOf&quot;]`&#xD;&#xA;&#xD;&#xA;The same works for the `tx` namespace. Maybe it can be changed in the future after resolving [issue](https://github.com/polkadot-js/api/issues/4469).&#xD;&#xA;&#xD;&#xA;It should solve your problem=) But I suggest you try [typechain-polkadot](https://github.com/Supercolony-net/typechain-polkadot) for integration tests and frontend development. It will generate all classes based on the ABI of your contract, and you will know how to call each method." ContentLicense="CC BY-SA 4.0" />
  <row Id="16131" PostHistoryTypeId="2" PostId="4298" RevisionGUID="96f01998-51ca-4bc5-a904-114b36a4d279" CreationDate="2022-08-16T14:49:33.000" UserId="1849" Text="Yes, they are in use, but they are sort of plan B to ensure liveliness (that is to make sure the best final candidate of round r-1 is finalized before we move to round r+1). So you should not expect to see them often when the network consists of few well-connected honest nodes (so for example, Aura-BABE does not fork due two nodes winning the same BABE slot and half of the network sees one candidate first and the other half see the other).&#xD;&#xA;&#xD;&#xA;Specifically, see [Algorithm 14. Play-Grandpa-Round](https://spec.polkadot.network/#_voting_process_in_round_r) line 4. The primary only makes a proposal if it sees (based on the votes it has observed) the best final candidate of round r-1 failed to be finalized in that round. If it observes that the best final candidate of last round (r-1) or any of its descendants has been finalized in that round, then it does not send the primary proposal in the current round (r).&#xD;&#xA;&#xD;&#xA;See [this example](https://spec.polkadot.network/#exmp-candid-unfinalized) of a situtaion when the network fails to finalize the best candidate." ContentLicense="CC BY-SA 4.0" />
  <row Id="16133" PostHistoryTypeId="2" PostId="4299" RevisionGUID="f5295352-76da-4495-857e-bdf3d8f38a7a" CreationDate="2022-08-16T15:32:50.803" UserId="73" Text="I have gone back in time to find out the reason for `ProposalIndex` :D &#xD;&#xA;&#xD;&#xA;[Here][1] you find the comment that lead to this addition. Personally I'm not really convinced that this proposal index is required. Even if someone sends again a proposal with the same hash, it would be the same proposal (assuming there is no hash collision). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/694#discussion_r216271657" ContentLicense="CC BY-SA 4.0" />
  <row Id="16139" PostHistoryTypeId="2" PostId="4301" RevisionGUID="37ed41eb-6fc7-41c1-9e53-eb8de988cab5" CreationDate="2022-08-16T17:18:31.583" UserId="2985" Text="I recently got a parachain ie, 4058 via subport issues request form&#xD;&#xA;&#xD;&#xA;When i was starting my parachain-collator-template with the following command &#xD;&#xA;&#xD;&#xA;*./target/release/parachain-collator \&#xD;&#xA;--bob \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--base-path /tmp/parachain/bob \&#xD;&#xA;--port 40334 \&#xD;&#xA;--ws-port 8845 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain rococo.json \&#xD;&#xA;--port 30344 \&#xD;&#xA;--ws-port 9978*&#xD;&#xA;&#xD;&#xA;[rococo.json](https://drive.google.com/file/d/1CgM4qa81-xsWYOPVih3b3yiBuNPxmLRh/view?usp=sharing  &quot;chain spec file&quot;)&#xD;&#xA;&#xD;&#xA;[rococo-local-parachain-2000-raw.json ](https://drive.google.com/file/d/1K_i5QLPi-n1-Z81sRJE9Ksozi2VBXKk_/view?usp=sharing  &quot;chain spec file&quot;)&#xD;&#xA;&#xD;&#xA;Its just shows logs of syncing peers&#xD;&#xA;&#xD;&#xA;I cant able to produce new blocks via collators&#xD;&#xA;&#xD;&#xA;Can anyone help me how can i able to solve this problem&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16141" PostHistoryTypeId="1" PostId="4301" RevisionGUID="37ed41eb-6fc7-41c1-9e53-eb8de988cab5" CreationDate="2022-08-16T17:18:31.583" UserId="2985" Text="collator nodes are not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="16142" PostHistoryTypeId="3" PostId="4301" RevisionGUID="37ed41eb-6fc7-41c1-9e53-eb8de988cab5" CreationDate="2022-08-16T17:18:31.583" UserId="2985" Text="|polkadot|parachain|parachain-collator|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16143" PostHistoryTypeId="5" PostId="4301" RevisionGUID="e6a76ff6-4a5c-4c5c-90e8-e7390fa3a665" CreationDate="2022-08-16T17:31:04.750" UserId="2985" Comment="added 85 characters in body" Text="[![enter image description here][1]][1]I recently got a parachain ie, 4058 via subport issues request form&#xD;&#xA;&#xD;&#xA;When i was starting my parachain-collator-template with the following command &#xD;&#xA;&#xD;&#xA;*./target/release/parachain-collator \&#xD;&#xA;--bob \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--base-path /tmp/parachain/bob \&#xD;&#xA;--port 40334 \&#xD;&#xA;--ws-port 8845 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain rococo.json \&#xD;&#xA;--port 30344 \&#xD;&#xA;--ws-port 9978*&#xD;&#xA;&#xD;&#xA;[rococo.json](https://drive.google.com/file/d/1CgM4qa81-xsWYOPVih3b3yiBuNPxmLRh/view?usp=sharing  &quot;chain spec file&quot;)&#xD;&#xA;&#xD;&#xA;[rococo-local-parachain-2000-raw.json ](https://drive.google.com/file/d/1K_i5QLPi-n1-Z81sRJE9Ksozi2VBXKk_/view?usp=sharing  &quot;chain spec file&quot;)&#xD;&#xA;&#xD;&#xA;Its just shows logs of syncing peers&#xD;&#xA;&#xD;&#xA;I cant able to produce new blocks via collators&#xD;&#xA;&#xD;&#xA;Can anyone help me how can i able to solve this problem&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/nyqIz.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="16144" PostHistoryTypeId="2" PostId="4302" RevisionGUID="5c421642-3673-4ddc-b215-090f56ddc4f0" CreationDate="2022-08-16T17:45:20.780" UserId="73" Text="The Parachain will not start producing blocks until you have reached the tip of the relay chain. Each Parachain block is build on a specific relay chain block and this currently requires that you always build on the latest block of the relay chain. In the future this will be relaxed a little bit, but the relay chain block will still be required to be near of the tip of relay chain.&#xD;&#xA;&#xD;&#xA;So, you will need to wait for your collator to have finished syncing the relay chain to start producing blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="16148" PostHistoryTypeId="2" PostId="4304" RevisionGUID="023bd371-e506-4154-9b98-e281546a34b4" CreationDate="2022-08-16T19:48:56.437" UserId="2862" Text="Why is the Runtime memory management designed such that the Host manages the memory shared with the Wasm Runtime (imports memory + allocation functions)? Since the Host might need to store things onto the memory, does it heap allocate things specific to itself on the linear memory shared with the Wasm runtime or it is in separate memory space?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16150" PostHistoryTypeId="1" PostId="4304" RevisionGUID="023bd371-e506-4154-9b98-e281546a34b4" CreationDate="2022-08-16T19:48:56.437" UserId="2862" Text="What are the design decisions behind Runtime memory management" ContentLicense="CC BY-SA 4.0" />
  <row Id="16151" PostHistoryTypeId="3" PostId="4304" RevisionGUID="023bd371-e506-4154-9b98-e281546a34b4" CreationDate="2022-08-16T19:48:56.437" UserId="2862" Text="|runtime|wasm|memory|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16152" PostHistoryTypeId="2" PostId="4305" RevisionGUID="2ca372fe-e1d4-485b-abce-0c6fc0b8f2ab" CreationDate="2022-08-16T21:49:54.600" UserId="2855" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lZhQn.png&#xD;&#xA;&#xD;&#xA;while building substrate node template &#xD;&#xA;versions: polkadot-v0.9.19, polkadot-v0.9.27&#xD;&#xA;get the below error&#xD;&#xA;rustup version &#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    nightly-2022-02-15-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    rustc 1.60.0-nightly (c5c610aad 2022-02-14)&#xD;&#xA;    " ContentLicense="CC BY-SA 4.0" />
  <row Id="16154" PostHistoryTypeId="1" PostId="4305" RevisionGUID="2ca372fe-e1d4-485b-abce-0c6fc0b8f2ab" CreationDate="2022-08-16T21:49:54.600" UserId="2855" Text="Substrate Node Template Build Error, sys::group private" ContentLicense="CC BY-SA 4.0" />
  <row Id="16155" PostHistoryTypeId="3" PostId="4305" RevisionGUID="2ca372fe-e1d4-485b-abce-0c6fc0b8f2ab" CreationDate="2022-08-16T21:49:54.600" UserId="2855" Text="|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16156" PostHistoryTypeId="2" PostId="4306" RevisionGUID="a1349535-169c-4baf-bf31-5aa1de8999b3" CreationDate="2022-08-16T22:00:27.160" UserId="74" Text="I'm trying to build a somewhat generic, somewhat specific call dispatcher that allows me to inspect metadata about the call in order to constrain it by either&#xD;&#xA;- call index / pallet index&#xD;&#xA;- call name / pallet name&#xD;&#xA;&#xD;&#xA;Here is an example trait implemented in my trait Config&#xD;&#xA;```&#xD;&#xA;/// Proposed dispatchable call&#xD;&#xA;type Proposal: Parameter&#xD;&#xA;	+ Dispatchable&lt;Origin = Self::Origin&gt;&#xD;&#xA;	+ EncodeLike&#xD;&#xA;	+ Decode&#xD;&#xA;	+ GetDispatchInfo;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm aware of the traits `GetCallName` and `GetCallMetadata` but they don't seem to be implemented on a generic `Call` instantiated at the runtime level. For clarity, my runtime implementation is&#xD;&#xA;```&#xD;&#xA;impl Config for Test {&#xD;&#xA;    ...&#xD;&#xA;    type Proposal = Call;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don't want to allow just any call to be processed in some functions. My intention is to do something like:&#xD;&#xA;```&#xD;&#xA;ensure!(call.get_call_metadata().function_name() === &quot;hardcoded_function_name&quot;)&#xD;&#xA;```&#xD;&#xA;or&#xD;&#xA;```&#xD;&#xA;ensure!(valid_calls.contains(call.get_call_metadata().function_name()))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there an easy or thoughtful way to approach this in Substrate-style that allows me to keep generality. For example, it would be interesting if the call was filterable somehow so that 10 calls were allowed and I can define these at runtime (I had tried to add a tuple and implement a trait for tuples but it seemed too hacky)." ContentLicense="CC BY-SA 4.0" />
  <row Id="16158" PostHistoryTypeId="1" PostId="4306" RevisionGUID="a1349535-169c-4baf-bf31-5aa1de8999b3" CreationDate="2022-08-16T22:00:27.160" UserId="74" Text="Getting more call metadata from a generic call" ContentLicense="CC BY-SA 4.0" />
  <row Id="16159" PostHistoryTypeId="3" PostId="4306" RevisionGUID="a1349535-169c-4baf-bf31-5aa1de8999b3" CreationDate="2022-08-16T22:00:27.160" UserId="74" Text="|extrinsic|metadata|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16160" PostHistoryTypeId="4" PostId="4305" RevisionGUID="77035aae-9edd-44d1-9f26-dd07fd4da2f1" CreationDate="2022-08-16T22:23:17.420" UserId="2855" Comment="edited title" Text="Substrate Node Template Build Error, syn::group private" ContentLicense="CC BY-SA 4.0" />
  <row Id="16161" PostHistoryTypeId="2" PostId="4307" RevisionGUID="1084175c-a3b3-4f4e-b7ae-8d691acb1496" CreationDate="2022-08-16T22:54:34.137" UserId="298" Text="I have implemented `pallet_treasury` just like Kusama, how do i find the resulting address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16163" PostHistoryTypeId="1" PostId="4307" RevisionGUID="1084175c-a3b3-4f4e-b7ae-8d691acb1496" CreationDate="2022-08-16T22:54:34.137" UserId="298" Text="How do i find the address of the treasury?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16164" PostHistoryTypeId="3" PostId="4307" RevisionGUID="1084175c-a3b3-4f4e-b7ae-8d691acb1496" CreationDate="2022-08-16T22:54:34.137" UserId="298" Text="|substrate-node-template|kusama|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16165" PostHistoryTypeId="4" PostId="4293" RevisionGUID="7be3f1b2-bbd9-4cfc-9559-7bb3075f5a6b" CreationDate="2022-08-17T01:57:57.167" UserId="566" Comment="edited title" Text="How to subscribe to contract events using RPC?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16166" PostHistoryTypeId="2" PostId="4308" RevisionGUID="98eeafb2-269b-4ca9-a4de-5a6b55fe1c51" CreationDate="2022-08-17T02:17:36.083" UserId="445" Text="Downgrade your current `syn` version `1.0.99` into `1.0.96` in my case&#xD;&#xA;&#xD;&#xA;Step:&#xD;&#xA;+ Go to `Cargo.lock`&#xD;&#xA;+ Search `name = &quot;syn&quot;`  in `Cargo.lock`&#xD;&#xA;+ Delete `checksum` line of `syn` &#xD;&#xA;+ Replace `1.0.99` by `1.0.96`&#xD;&#xA;+ `cargo build --release` again&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16168" PostHistoryTypeId="2" PostId="4309" RevisionGUID="61473c2c-b13d-4417-a6cb-006a458801a0" CreationDate="2022-08-17T03:42:12.513" UserId="2668" Text=" 1. first  get the system eventData `state_getStorage` api&#xD;&#xA; 2. now i need to decode the system eventData by metadata&#xD;&#xA;&#xD;&#xA;is there some example how to decode it ?&#xD;&#xA;for some reaseon ,only rust worker it  ,thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="16170" PostHistoryTypeId="1" PostId="4309" RevisionGUID="61473c2c-b13d-4417-a6cb-006a458801a0" CreationDate="2022-08-17T03:42:12.513" UserId="2668" Text="How use Metadata deocde Vec::&lt;EventRecord&lt;Event, H256&gt;&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16171" PostHistoryTypeId="3" PostId="4309" RevisionGUID="61473c2c-b13d-4417-a6cb-006a458801a0" CreationDate="2022-08-17T03:42:12.513" UserId="2668" Text="|events|metadata|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16172" PostHistoryTypeId="2" PostId="4310" RevisionGUID="10a524ef-d47b-4252-9a5d-82854ac0cb26" CreationDate="2022-08-17T05:21:48.207" UserId="251" Text="Find the pallet id in runtime first. Different networks might use different id. [Kusama treasury pallet id](https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L636)&#xD;&#xA;&#xD;&#xA;Use [subalfred](https://github.com/hack-ink/subalfred).&#xD;&#xA;```&#xD;&#xA;λ subalfred key 'py/trsry' --key-type pallet --network kusama&#xD;&#xA;public-key 0x6d6f646c70792f74727372790000000000000000000000000000000000000000 PalletId(py/trsry)&#xD;&#xA;kusama F3opxRbN5ZbjJNU511Kj2TLuzFcDq9BGduA9TgiECafpg29&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;https://kusama.subscan.io/account/F3opxRbN5ZbjJNU511Kj2TLuzFcDq9BGduA9TgiECafpg29" ContentLicense="CC BY-SA 4.0" />
  <row Id="16174" PostHistoryTypeId="2" PostId="4311" RevisionGUID="37605ade-ef63-4eba-bb4f-e429cd77f889" CreationDate="2022-08-17T05:25:30.090" UserId="251" Text="Here are some very detailed examples.&#xD;&#xA;&#xD;&#xA;1. [subscribe_all_event](https://github.com/paritytech/subxt/blob/master/examples/examples/subscribe_all_events.rs)&#xD;&#xA;2. [subscribe_one_event](https://github.com/paritytech/subxt/blob/master/examples/examples/subscribe_one_event.rs)&#xD;&#xA;3. [subscribe_some_event](https://github.com/paritytech/subxt/blob/master/examples/examples/subscribe_some_events.rs)" ContentLicense="CC BY-SA 4.0" />
  <row Id="16176" PostHistoryTypeId="2" PostId="4312" RevisionGUID="67e82fa8-a0c2-4e20-908e-55bf85e978e7" CreationDate="2022-08-17T06:12:55.683" UserId="251" Text="Just simply do this (you don't have to modify the lock file manually):&#xD;&#xA;```&#xD;&#xA;cargo update -p syn --precise 1.0.96&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I really want to mark this question as dup. But the other question is inactive. No upvote/accept answer.&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/3479/error-building-substrate-contract-nodeerrore0603-module-group-is-private/4217#4217" ContentLicense="CC BY-SA 4.0" />
  <row Id="16178" PostHistoryTypeId="2" PostId="4313" RevisionGUID="d6a5a3c3-b2bc-41d4-8ba4-8ad2e4518673" CreationDate="2022-08-17T06:28:05.060" UserId="3021" Text="Hi guys I am new to blockchain and susbtrate, so these questions would be stupid to you...But I really need some help here...&#xD;&#xA;&#xD;&#xA; - How does substrate ensure anything has been done inside the pallet will be synced on (accepted by) the chain (when/where does the consensus model/module/infra kick in)? &#xD;&#xA; - And what will happen if the **thing** (should be synced) is rejected by the chain ?&#xD;&#xA; - Where can I find the source code referring to this feature/ answering to these questions ?&#xD;&#xA; &#xD;&#xA;Thanks a lot!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16180" PostHistoryTypeId="1" PostId="4313" RevisionGUID="d6a5a3c3-b2bc-41d4-8ba4-8ad2e4518673" CreationDate="2022-08-17T06:28:05.060" UserId="3021" Text="how substrate pallet works" ContentLicense="CC BY-SA 4.0" />
  <row Id="16181" PostHistoryTypeId="3" PostId="4313" RevisionGUID="d6a5a3c3-b2bc-41d4-8ba4-8ad2e4518673" CreationDate="2022-08-17T06:28:05.060" UserId="3021" Text="|substrate-node|transactions|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16182" PostHistoryTypeId="2" PostId="4314" RevisionGUID="cae3a456-700f-4e32-ad3e-8c7800b4d68a" CreationDate="2022-08-17T06:51:15.733" UserId="575" Text="You can use subquery [event handler][1] to capture the desired events. It supports filtering based on `Modules` (the `contracts` module in this case) and `Methods`. &#xD;&#xA;&#xD;&#xA;This filters all events of all contracts. But to filter the events for a specific contract, you'll have to [subscribe][2] to the contract's entity in the schema, and filter this subscription with the contract address&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.subquery.network/build/mapping.html&#xD;&#xA;  [2]: https://doc.subquery.network/it/run_publish/subscription.html#filtering" ContentLicense="CC BY-SA 4.0" />
  <row Id="16184" PostHistoryTypeId="4" PostId="4313" RevisionGUID="5fb31d2d-9a69-44de-8cdc-8f021f77f100" CreationDate="2022-08-17T06:53:54.207" UserId="3021" Comment="edited title" Text="how pallet and consensus work together" ContentLicense="CC BY-SA 4.0" />
  <row Id="16185" PostHistoryTypeId="4" PostId="4313" RevisionGUID="71969da1-3368-490c-8c40-30d177a8b172" CreationDate="2022-08-17T06:54:41.800" UserId="3021" Comment="edited title" Text="How do pallet and consensus model/algorithm/infrastructure work together?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16186" PostHistoryTypeId="2" PostId="4315" RevisionGUID="bea43cab-75a9-4d87-a92f-7fa0eb8ea268" CreationDate="2022-08-17T06:59:34.330" UserId="251" Text="You can filter the call in runtime. Here is how proxy do:&#xD;&#xA;&#xD;&#xA;Provide a filter configuration here https://github.com/paritytech/substrate/blob/master/frame/proxy/src/lib.rs#L124-L134.&#xD;&#xA;&#xD;&#xA;Configure it here https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L264-L319." ContentLicense="CC BY-SA 4.0" />
  <row Id="16188" PostHistoryTypeId="6" PostId="4304" RevisionGUID="d33dfff5-82d1-483d-b7de-834812bad0f7" CreationDate="2022-08-17T07:07:31.650" UserId="2862" Comment="edited tags" Text="|runtime|wasmi|memory|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16189" PostHistoryTypeId="2" PostId="4316" RevisionGUID="f51bfc41-a4d8-4e92-84dd-7161c0a09e1f" CreationDate="2022-08-17T07:53:41.520" UserId="2663" Text="I want to get/store the peerId or some identifier of all active nodes in the blockchain and use them in the logic of a custom pallet.&#xD;&#xA;&#xD;&#xA;I think that I need to get this data from some API and call the data into the pallet.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16191" PostHistoryTypeId="1" PostId="4316" RevisionGUID="f51bfc41-a4d8-4e92-84dd-7161c0a09e1f" CreationDate="2022-08-17T07:53:41.520" UserId="2663" Text="How to get peerId of active nodes in runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16192" PostHistoryTypeId="3" PostId="4316" RevisionGUID="f51bfc41-a4d8-4e92-84dd-7161c0a09e1f" CreationDate="2022-08-17T07:53:41.520" UserId="2663" Text="|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16193" PostHistoryTypeId="2" PostId="4317" RevisionGUID="a78e3800-49a0-4644-bd4a-0937ebec6cd7" CreationDate="2022-08-17T09:14:49.883" UserId="2477" Text="as far as I know, contract calls are expensive because the called contract code must be loaded. Do you know -&#xD;&#xA;1) what if I make 2 cross-contract calls in one function to the same smart contract? Is the contract code loaded two times?&#xD;&#xA;2) What if I make 2 cross-contract calls in one function to the two different smart contracts that share the same code_hash? For example, I call two different PSP22s." ContentLicense="CC BY-SA 4.0" />
  <row Id="16195" PostHistoryTypeId="1" PostId="4317" RevisionGUID="a78e3800-49a0-4644-bd4a-0937ebec6cd7" CreationDate="2022-08-17T09:14:49.883" UserId="2477" Text="Costs of multiple cross-contract calls in one function (to the contracts with the same code)" ContentLicense="CC BY-SA 4.0" />
  <row Id="16196" PostHistoryTypeId="3" PostId="4317" RevisionGUID="a78e3800-49a0-4644-bd4a-0937ebec6cd7" CreationDate="2022-08-17T09:14:49.883" UserId="2477" Text="|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16197" PostHistoryTypeId="5" PostId="4317" RevisionGUID="fb039fcc-74fd-4ed6-87f0-e453dc68f79c" CreationDate="2022-08-17T09:22:30.853" UserId="16" Comment="deleted 12 characters in body" Text="As far as I know, contract calls are expensive because the called contract code must be loaded.&#xD;&#xA;&#xD;&#xA;1) What if I make 2 cross-contract calls in one function to the same smart contract? Is the contract code loaded two times?&#xD;&#xA;2) What if I make 2 cross-contract calls in one function to the two different smart contracts that share the same code_hash? For example, I call two different PSP22s." ContentLicense="CC BY-SA 4.0" />
  <row Id="16198" PostHistoryTypeId="4" PostId="4317" RevisionGUID="fb039fcc-74fd-4ed6-87f0-e453dc68f79c" CreationDate="2022-08-17T09:22:30.853" UserId="16" Comment="deleted 12 characters in body" Text="What are the costs of multiple cross-contract calls in one transaction to callees with the same code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16204" PostHistoryTypeId="4" PostId="4317" RevisionGUID="288777f4-780a-439d-87b7-e962754a6854" CreationDate="2022-08-17T10:11:01.343" UserId="16" Comment="edited title" Text="What are the costs of multiple cross-contract calls in one contract call stack to callees with the same code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16205" PostHistoryTypeId="2" PostId="4319" RevisionGUID="04d7eb4e-55c5-436a-a340-74f77b113116" CreationDate="2022-08-17T10:12:24.837" UserId="16" Text="The only really expensive part is loading the contract code because its size usually dominates every other storage access.&#xD;&#xA;&#xD;&#xA;The costs of loading a contract code consists of two parts:&#xD;&#xA;1. Pulling the contract from storage into the runtime&#xD;&#xA;2. Delivering the contract code the the validator over the internet (only applies if pallet-contracts is deployed on a parachain).&#xD;&#xA;&#xD;&#xA;Please note that the costs for **1** are **theoretically** reduced if you use the same code from the same `pallet-contracts::call` and the costs for **2** even when doing it within the same block.&#xD;&#xA;&#xD;&#xA;**However**, we do not account for that right now. Due to the dynamic nature of weight tracking in `pallet-contracts` as opposed to simple pallets it would require additional work to make that happen: We would need to track which codes were accessed and then reduce the costs if they are loaded a second time. It is possible but it is just not happening right now.&#xD;&#xA; &#xD;&#xA;Since we currently have no way to account for the costs of **2** we simulate it with [`ContractAccessWeight`](https://github.com/paritytech/substrate/blob/97ae6be11b0132224a05634c508417f048894670/frame/contracts/src/lib.rs#L331-L350). We could reduce these costs if it happens in the same `pallet-contracts:call` in the same way as mentioned above. Tracking it per block is not in the cards right now." ContentLicense="CC BY-SA 4.0" />
  <row Id="16207" PostHistoryTypeId="5" PostId="4298" RevisionGUID="74fb247b-3558-4302-a06c-82eb4443dfa3" CreationDate="2022-08-17T10:16:03.290" UserId="1849" Comment="deleted 2 characters in body" Text="Yes, they are in use, but they are sort of plan B to ensure liveness (that is to make sure the best final candidate of round r-1 is finalized before we move to round r+1). So you should not expect to see them often when the network consists of few well-connected honest nodes (so for example, Aura-BABE does not fork due two nodes winning the same BABE slot and half of the network sees one candidate first and the other half see the other).&#xD;&#xA;&#xD;&#xA;Specifically, see [Algorithm 14. Play-Grandpa-Round](https://spec.polkadot.network/#_voting_process_in_round_r) line 4. The primary only makes a proposal if it sees (based on the votes it has observed) the best final candidate of round r-1 failed to be finalized in that round. If it observes that the best final candidate of last round (r-1) or any of its descendants has been finalized in that round, then it does not send the primary proposal in the current round (r).&#xD;&#xA;&#xD;&#xA;See [this example](https://spec.polkadot.network/#exmp-candid-unfinalized) of a situtaion when the network fails to finalize the best candidate." ContentLicense="CC BY-SA 4.0" />
  <row Id="16208" PostHistoryTypeId="2" PostId="4320" RevisionGUID="3f6cb0df-6282-46d7-b500-786e4fc95a7f" CreationDate="2022-08-17T10:40:40.800" UserId="393" Text="For &quot;How to generate random offchain&quot;, you can refer https://wiki.polkadot.network/docs/learn-randomness" ContentLicense="CC BY-SA 4.0" />
  <row Id="16210" PostHistoryTypeId="5" PostId="4252" RevisionGUID="30f95e12-0f6c-4215-a46e-c09afa37f1e6" CreationDate="2022-08-17T11:30:07.677" UserId="2025" Comment="typo" Text="To complete the answers:&#xD;&#xA;&#xD;&#xA;The deciding factor to choose _Blake2_ (cryptographic hashing function) over _xxHash_ (simple hashing function) is whether the input to be hashed is set by the users or by the system. In other words, the part of the storage key that can be &quot;choosen&quot; by users has to be randomly and uniformly distributed (aka secure) and for that we need a cryptographic hashing function. We need this property to avoid having unbalanced state tries in the chain storage. &#xD;&#xA;&#xD;&#xA;For example, if _xxHash_ was used as the `StorageHasher` for Account IDs, an attacker could create an unbalanced state trie, with a vanity account generator and some tokens to spare, just creating accounts with account IDs sharing the same trie prefix.&#xD;&#xA;&#xD;&#xA;[This article by Shawn](https://www.shawntabrizi.com/substrate/transparent-keys-in-substrate/) is a very good dive on the topic of storage keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="16216" PostHistoryTypeId="2" PostId="4322" RevisionGUID="a2f15aba-404f-40c0-b6c5-19d9c536b915" CreationDate="2022-08-17T15:04:00.387" UserId="1789" Text="It turns out to be the problem of the deployer Hardhat!&#xD;&#xA;&#xD;&#xA;See this post: https://substrate.stackexchange.com/questions/4227/how-to-add-frontier-code-as-a-dependency-to-substrate-parachain-template-based-p/4295#4295&#xD;&#xA;&#xD;&#xA;All the upgradeable contracts and ERC777 could not be deployed because Hardhat was running too fast and that overwhelmed my parachain, hence &quot;ExhaustsResources&quot; error!&#xD;&#xA;&#xD;&#xA;I can deploy all my upgradeable contracts and ERC777(deploy ERC1820 first!) via Truffle. See my truffle-config.js:&#xD;&#xA;```&#xD;&#xA;    parachain: {&#xD;&#xA;      provider: () =&gt; new HDWalletProvider(MNEMONIC, `${PARA_CHAIN_URL}`),//PARA_CHAIN_URL=http://127.0.0.1:7272&#xD;&#xA;      network_id: 2045,&#xD;&#xA;      production: true, &#xD;&#xA;      confirmations: 2, //to wait for enough confirmation&#xD;&#xA;      skipDryRun: true, //true to skip simulations&#xD;&#xA;    },&#xD;&#xA;```&#xD;&#xA;I think this `confirmation` slows the deployment down so my parachain can have time to make deployment properly." ContentLicense="CC BY-SA 4.0" />
  <row Id="16218" PostHistoryTypeId="5" PostId="4295" RevisionGUID="6b81f1a5-9695-48d1-83c7-b32cbf644344" CreationDate="2022-08-17T15:07:17.023" UserId="1789" Comment="added 235 characters in body" Text="Part 1 of this question:&#xD;&#xA;https://substrate.stackexchange.com/questions/3796/how-to-make-a-parachain-project-that-uses-frontier-as-a-dependency&#xD;&#xA;&#xD;&#xA;Merge Fronter repo/template folder into your parachain... although I am stuck at node/service.rs but it seems it is okay to skip those...&#xD;&#xA;&#xD;&#xA;Regarding to ERC777 contracts, you have to &#xD;&#xA;- use Truffle to deploy the ERC1820 first ... see https://ethereum.stackexchange.com/questions/17927/how-to-deploy-smart-contract-in-predefined-contract-address-in-private-ethereum/79316#79316&#xD;&#xA;&#xD;&#xA;- use Truffle to deploy ERC777 second ... see&#xD;&#xA;https://forum.openzeppelin.com/t/simple-erc777-token-example/746&#xD;&#xA;&#xD;&#xA;Hardhat can only deploy ERC20, ERC721, ERC1155, ERC4626, ERC1820, but it cannot deploy ERC777 for some unknown reason...&#xD;&#xA;&#xD;&#xA;Solved: Use Truffle to deploy upgradeable and ERC777 contracts: See `ExhaustsResources` error solution  https://substrate.stackexchange.com/questions/3882/deploy-solidity-ethereum-to-parachain-with-exhaustsresources-error/4322#4322&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16219" PostHistoryTypeId="2" PostId="4323" RevisionGUID="8f7363b2-21fb-4455-8ce9-3d6b073b7eee" CreationDate="2022-08-17T17:20:12.140" UserId="2752" Text="I am using the openbrush standard to implement a psp34 token. &#xD;&#xA;Now I want to call certain methods from said token, like for &#xD;&#xA;example owner_of.&#xD;&#xA;&#xD;&#xA;owner_of from psp34 has id:Id as an input which can then be defined&#xD;&#xA;as U8, U16, U32, U64, U128 or Bytes. &#xD;&#xA;&#xD;&#xA;The input on the JavaScript side is a String like this:&#xD;&#xA;&#xD;&#xA;    const id = '0xf59eee94f32bfeddeca43d100742db523b5d00041d2314512c37c663e3404c68'&#xD;&#xA;&#xD;&#xA;and now I want to call the owner_of method, using said Id.&#xD;&#xA;This results in this error:&#xD;&#xA;&#xD;&#xA;&gt; Uncaught (in promise) Error: createType(OpenbrushContractsTypesId):: Unable to create Enum via index 237, in U8, U16, U32, U64, U128, Bytes&#xD;&#xA;&#xD;&#xA;I tried to use the createType package of polkadot like this:&#xD;&#xA;&#xD;&#xA;    const input = api.createType('Bytes', id)&#xD;&#xA;&#xD;&#xA;But it results in the same error. How can I cast my String input to 'Bytes' so it will be accepted by the api? &#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="16221" PostHistoryTypeId="1" PostId="4323" RevisionGUID="8f7363b2-21fb-4455-8ce9-3d6b073b7eee" CreationDate="2022-08-17T17:20:12.140" UserId="2752" Text="How to change input from string to Id::Bytes in JavaScript?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16222" PostHistoryTypeId="3" PostId="4323" RevisionGUID="8f7363b2-21fb-4455-8ce9-3d6b073b7eee" CreationDate="2022-08-17T17:20:12.140" UserId="2752" Text="|polkadot-js|api|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16223" PostHistoryTypeId="2" PostId="4324" RevisionGUID="64fb06fb-323d-4af1-bb92-7920757c4de5" CreationDate="2022-08-17T17:29:36.690" UserId="2698" Text="So I have this code here in my vesting pallet: &#xD;&#xA;```&#xD;&#xA;		#[pallet::weight(100)]&#xD;&#xA;		pub fn modify_vesting_scheudule_block_for_all (&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			block_amount: &lt;T as frame_system::Config&gt;::BlockNumber,&#xD;&#xA;		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			ensure_root(origin)?;&#xD;&#xA;			let res = with_transaction_result (|| {&#xD;&#xA;				let mut vested_ids = Vec::new();&#xD;&#xA;				for (id,_schedules) in VestingSchedules::&lt;T&gt;::iter() {&#xD;&#xA;					vested_ids.push(id);&#xD;&#xA;				}&#xD;&#xA;				for id in vested_ids.iter() {&#xD;&#xA;					let schedules = VestingSchedules::&lt;T&gt;::take(id);&#xD;&#xA;					let mut tmp: BoundedVec&lt;VestingScheduleOf&lt;T&gt;, T::MaxVestingSchedules&gt;;&#xD;&#xA;					for schedule in &amp;schedules {&#xD;&#xA;						if schedule.start &lt; block_amount {&#xD;&#xA;							// need to put it back and revert the take if there is an error &#xD;&#xA;							// VestingSchedules::&lt;T&gt;::insert(id, schedules.clone());&#xD;&#xA;							return Err(Error::&lt;T&gt;::InvalidClaimBlock.into());&#xD;&#xA;						};&#xD;&#xA;						// ensure!(schedule.start &gt; block_amount, Error::&lt;T&gt;::InvalidClaimBlock);&#xD;&#xA;						tmp.push(&#xD;&#xA;							VestingSchedule {&#xD;&#xA;								start: schedule.start - block_amount,&#xD;&#xA;								period: schedule.period,&#xD;&#xA;								period_count: schedule.period_count,&#xD;&#xA;								vested_amount: schedule.vested_amount,	&#xD;&#xA;							}&#xD;&#xA;						);&#xD;&#xA;					}&#xD;&#xA;					VestingSchedules::&lt;T&gt;::insert(id, tmp);&#xD;&#xA;				}	&#xD;&#xA;				Ok(())&#xD;&#xA; 			});&#xD;&#xA;			&#xD;&#xA;			match res {&#xD;&#xA;				Ok(_) =&gt; {&#xD;&#xA;					Self::deposit_event(Event::VestingScheduleModified(block_amount));&#xD;&#xA;					Ok(().into())&#xD;&#xA;				},&#xD;&#xA;				Err(_e) =&gt; {&#xD;&#xA;					Err(Error::&lt;T&gt;::InvalidClaimBlock.into())&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;However I am getting this error:&#xD;&#xA;```&#xD;&#xA;error[E0381]: borrow of possibly-uninitialized variable: `tmp`&#xD;&#xA;   --&gt; pallets/vesting/src/lib.rs:269:7&#xD;&#xA;    |&#xD;&#xA;269 | /                         tmp.push(&#xD;&#xA;270 | |                             VestingSchedule {&#xD;&#xA;271 | |                                 start: schedule.start - block_amount,&#xD;&#xA;272 | |                                 period: schedule.period,&#xD;&#xA;...   |&#xD;&#xA;275 | |                             }&#xD;&#xA;276 | |                         );&#xD;&#xA;    | |_________________________^ use of possibly-uninitialized `tmp`&#xD;&#xA;```&#xD;&#xA;This makes sense to me but I have been searching around and I can not seem to find any documentation on how to actually intialize an empty bounded Vec. I have been using this as reference: https://docs.rs/bounded-vec/latest/bounded_vec/struct.BoundedVec.html. How do I initialize a bounded Vec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16225" PostHistoryTypeId="1" PostId="4324" RevisionGUID="64fb06fb-323d-4af1-bb92-7920757c4de5" CreationDate="2022-08-17T17:29:36.690" UserId="2698" Text="How to initialize a bounded Vec" ContentLicense="CC BY-SA 4.0" />
  <row Id="16226" PostHistoryTypeId="3" PostId="4324" RevisionGUID="64fb06fb-323d-4af1-bb92-7920757c4de5" CreationDate="2022-08-17T17:29:36.690" UserId="2698" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16227" PostHistoryTypeId="2" PostId="4325" RevisionGUID="8ab557a2-71a0-41a3-9e1c-6092cfe88576" CreationDate="2022-08-17T17:36:55.463" UserId="94" Text="As with all structs in Rust that can be default initialised you can use the `Default` trait:  &#xD;&#xA;```rust&#xD;&#xA;let mut my_vec: BoundedVec&lt;u8, ConstU32&lt;10&gt;&gt; = Default::default();&#xD;&#xA;```&#xD;&#xA;Or equivalently&#xD;&#xA;```rust&#xD;&#xA;let mut my_vec = BoundedVec::&lt;u8, ConstU32&lt;10&gt;&gt;::default();&#xD;&#xA;```&#xD;&#xA;You can also use the macro&#xD;&#xA;```rust&#xD;&#xA;let mut my_vec: BoundedVec&lt;u8, ConstU32&lt;10&gt;&gt; = bounded_vec![];&#xD;&#xA;```&#xD;&#xA;Or omit the type and hope that the compiler figures it out:&#xD;&#xA;```rust&#xD;&#xA;let mut my_vec = bounded_vec![];&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16229" PostHistoryTypeId="5" PostId="4325" RevisionGUID="5bdc4a1d-c899-4e0e-b44a-297a26d4e0bf" CreationDate="2022-08-17T17:42:41.893" UserId="94" Comment="deleted 2 characters in body" Text="As with all types in Rust that can be default initialized you can use the `Default` trait:  &#xD;&#xA;```rust&#xD;&#xA;let mut my_vec: BoundedVec&lt;u8, ConstU32&lt;10&gt;&gt; = Default::default();&#xD;&#xA;```&#xD;&#xA;Or equivalently&#xD;&#xA;```rust&#xD;&#xA;let mut my_vec = BoundedVec::&lt;u8, ConstU32&lt;10&gt;&gt;::default();&#xD;&#xA;```&#xD;&#xA;You can also use the macro&#xD;&#xA;```rust&#xD;&#xA;let mut my_vec: BoundedVec&lt;u8, ConstU32&lt;10&gt;&gt; = bounded_vec![];&#xD;&#xA;```&#xD;&#xA;Or omit the type and hope that the compiler figures it out:&#xD;&#xA;```rust&#xD;&#xA;let mut my_vec = bounded_vec![];&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16230" PostHistoryTypeId="2" PostId="4326" RevisionGUID="9d5464ba-8553-40fe-988e-8177a826f87c" CreationDate="2022-08-17T19:11:31.620" UserId="227" Text="Try installing/building with `--locked`, the process will then use the dependency versions from the `Cargo.lock` file in the repository. Those dependencies are typically verified to work. If you omit the `--locked` you'll get potentially newer versions of the dependencies that introduce some incompatibility.&#xD;&#xA;&#xD;&#xA;If this doesn't work: seeing the `proto2` vs `proto3` error message, could also be that you local version of `protoc` is outdated. Try `protoc --version`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Are you possibly using an old version in your environment? I'd check if there are updates available." ContentLicense="CC BY-SA 4.0" />
  <row Id="16232" PostHistoryTypeId="2" PostId="4327" RevisionGUID="29d2beaf-95c6-4dad-8eed-5a1c3105f103" CreationDate="2022-08-17T19:42:20.460" UserId="627" Text="Fora nay enume, the input is `index`, `bytes`. So depending on the enum, the first byte needs to be the actual enum id or (in the case of the JS API identify the enum, type.&#xD;&#xA;&#xD;&#xA;Since you have no info, some examples that may or may not be applicable -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// pass u16 to query&#xD;&#xA;api.query.&lt;somewhere&gt;.ownerOf({ u16: '0xf59eee94f32bfeddeca43d100742db523b5d00041d2314512c37c663e3404c68' })&#xD;&#xA;&#xD;&#xA;// pass u32 to tx&#xD;&#xA;api.tx.&lt;somewhere&gt;.ownerOf({ u32: '0xf59eee94f32bfeddeca43d100742db523b5d00041d2314512c37c663e3404c68' })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;etc... You need to identify where the enum points." ContentLicense="CC BY-SA 4.0" />
  <row Id="16234" PostHistoryTypeId="2" PostId="4328" RevisionGUID="46422c71-a176-4b0b-8297-8e41b5f52027" CreationDate="2022-08-17T22:23:53.243" UserId="494" Text="Nodes don't store networking information beyond their own peers, and there's no reason for them to implement some rather complex network traversal algorithm to keep track of literally **ALL** nodes in the network. So there's no API that will give you that answer out-of-the-box.&#xD;&#xA;&#xD;&#xA;That being said, [`sp_io::offchain::network_state`](https://paritytech.github.io/substrate/master/sp_io/offchain/fn.network_state.html) allows you to set up an [Offchain Worker](https://docs.substrate.io/fundamentals/offchain-operations/) that would, for every node, create an on-chain entry. So your pallet can set a `StorageMap&lt;PeerId, Vec&lt;Multiaddr&gt;&gt;` to keep track of all network nodes, along with the OCW that keeps updating such item for every node.&#xD;&#xA;&#xD;&#xA;Check [`node-authorization` pallet](https://github.com/paritytech/substrate/blob/e7aa858767c2f19a1f084b98f7a43db52b53b969/frame/node-authorization/src/lib.rs#L176), along with [this tutorial](https://docs.substrate.io/tutorials/get-started/permissioned-network/) for some reference on how to get started on this. Its use case is slightly different, but there's some parallels with your question.&#xD;&#xA;&#xD;&#xA;You also need to make sure that nodes that eventually go offline are cleaned up from this `StorageMap`. So your OCW should get the list of all nodes from on-chain Storage, sweep the list checking if each one is online, and if not, remove it.&#xD;&#xA;&#xD;&#xA;One big caveat for this solution is that you will only be keeping track of nodes that have OCW enabled. Non-validator nodes will not enable OCW by default, so the CLI option `--offchain-worker always` needs to be used on every non-validator nodes. You could always maintain your own fork of [`sc-cli`](https://github.com/paritytech/substrate/tree/master/client/cli) to make OCWs run by default on every node of your network." ContentLicense="CC BY-SA 4.0" />
  <row Id="16236" PostHistoryTypeId="2" PostId="4329" RevisionGUID="a30fdda0-f964-4f33-9374-89e760878694" CreationDate="2022-08-17T22:53:07.560" UserId="3039" Text="I was trying to run substrate following the installation process on the docs and I have a mac running with M1.&#xD;&#xA;&#xD;&#xA;I followed the instructions to the letter, installing Rosseta 2 and cmake and also I tried every workaround for M1 that i could found but the error still persist.&#xD;&#xA;&#xD;&#xA;Not sure if I'm missing something or if i need to use an older version of something for it to work...&#xD;&#xA;&#xD;&#xA;[![error][1]][1]&#xD;&#xA;&#xD;&#xA;[![error 2][2]][2]&#xD;&#xA;&#xD;&#xA;This is my first time trying to run a substrate node and also my first time posting in here so i really hope i'm using the format correctly.&#xD;&#xA;&#xD;&#xA;Thank you very much in advance!&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZU3Kf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/3YhBQ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16238" PostHistoryTypeId="1" PostId="4329" RevisionGUID="a30fdda0-f964-4f33-9374-89e760878694" CreationDate="2022-08-17T22:53:07.560" UserId="3039" Text="Problem running 'cargo build --release ' on substrate-node-template for M1" ContentLicense="CC BY-SA 4.0" />
  <row Id="16239" PostHistoryTypeId="3" PostId="4329" RevisionGUID="a30fdda0-f964-4f33-9374-89e760878694" CreationDate="2022-08-17T22:53:07.560" UserId="3039" Text="|substrate-node-template|build|macos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16240" PostHistoryTypeId="2" PostId="4330" RevisionGUID="958fdcd9-f6bc-46d5-bf1e-ee80697c272f" CreationDate="2022-08-17T22:54:02.007" UserId="494" Text="Any pallet is just a Rust crate. Adding the &quot;real&quot; `pallet1` as a dependency to `Cargo.toml` will make it available to be imported anywhere in your project." ContentLicense="CC BY-SA 4.0" />
  <row Id="16243" PostHistoryTypeId="2" PostId="4331" RevisionGUID="c0f5d54f-59ef-4029-a9fc-99dd1a2d230d" CreationDate="2022-08-18T00:58:23.623" UserId="29" Text="```js&#xD;&#xA;import { stringToU8a } from '@polkadot/util';&#xD;&#xA;import { encodeAddress } from '@polkadot/util-crypto';&#xD;&#xA;&#xD;&#xA;const treasuryAddress = encodeAddress(stringToU8a(&quot;modlpy/trsry&quot;.padEnd(32, '\0')))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also, if you're using polkadotJS apps it shows up in Address book &gt; My contacts:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/b2aT9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16245" PostHistoryTypeId="5" PostId="4331" RevisionGUID="303b0d25-8a41-4805-a795-f652f9645c74" CreationDate="2022-08-18T01:19:46.777" UserId="29" Comment="deleted 175 characters in body" Text="```js&#xD;&#xA;import { stringToU8a } from '@polkadot/util';&#xD;&#xA;import { encodeAddress } from '@polkadot/util-crypto';&#xD;&#xA;&#xD;&#xA;const treasuryAddress = encodeAddress(stringToU8a(&quot;modlpy/trsry&quot;.padEnd(32, '\0')))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16246" PostHistoryTypeId="2" PostId="4332" RevisionGUID="b6ade672-3516-4805-ad93-0832fa12f447" CreationDate="2022-08-18T03:00:07.703" UserId="3040" Text="Is it possible to query through state storage or rpc?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16248" PostHistoryTypeId="1" PostId="4332" RevisionGUID="b6ade672-3516-4805-ad93-0832fa12f447" CreationDate="2022-08-18T03:00:07.703" UserId="3040" Text="How to judge whether the relaychain of a parachain is polkadot or kusama or westend?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16249" PostHistoryTypeId="3" PostId="4332" RevisionGUID="b6ade672-3516-4805-ad93-0832fa12f447" CreationDate="2022-08-18T03:00:07.703" UserId="3040" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16253" PostHistoryTypeId="2" PostId="4333" RevisionGUID="e66e4034-b581-477b-8290-612a5b5a39e6" CreationDate="2022-08-18T03:59:21.107" UserId="3041" Text="I followed [Connect a local parachain][1] tutorial and successfully run my local parachain node with this command:&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-collator \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain &lt;relay chain raw chain spec&gt; \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977&#xD;&#xA;```&#xD;&#xA;But while follow [Connect to Rococo testnet][2] tutorial, I don't know how to fill the `&lt;relay chain raw chain spec&gt;` field to start local parachain node. Do I need the chain specification file of Rococco testnet to run my local parachain node?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-other-chains/local-parachain/&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/connect-other-chains/rococo-slot/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16255" PostHistoryTypeId="1" PostId="4333" RevisionGUID="e66e4034-b581-477b-8290-612a5b5a39e6" CreationDate="2022-08-18T03:59:21.107" UserId="3041" Text="Do I need the chain specification file of Rococco testnet to run my local parachain node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16256" PostHistoryTypeId="3" PostId="4333" RevisionGUID="e66e4034-b581-477b-8290-612a5b5a39e6" CreationDate="2022-08-18T03:59:21.107" UserId="3041" Text="|parachain|rococo|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16257" PostHistoryTypeId="5" PostId="4327" RevisionGUID="74e33cb3-ca92-45e9-beda-075813b10af8" CreationDate="2022-08-18T07:23:54.300" UserId="627" Comment="typos" Text="For any enum, the input is `index` + `bytes`. So depending on the enum, the first byte needs to be the actual enum id or (in the case of the JS API) identify the enum, type.&#xD;&#xA;&#xD;&#xA;Since you have no info, some examples that may or may not be applicable -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// pass u16 to query&#xD;&#xA;api.query.&lt;somewhere&gt;.ownerOf({ u16: '0xf59eee94f32bfeddeca43d100742db523b5d00041d2314512c37c663e3404c68' })&#xD;&#xA;&#xD;&#xA;// pass u32 to tx&#xD;&#xA;api.tx.&lt;somewhere&gt;.ownerOf({ u32: '0xf59eee94f32bfeddeca43d100742db523b5d00041d2314512c37c663e3404c68' })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;etc... You need to identify where the enum points." ContentLicense="CC BY-SA 4.0" />
  <row Id="16258" PostHistoryTypeId="2" PostId="4334" RevisionGUID="07324c2b-beef-407d-be8d-3a05a9e9e4dd" CreationDate="2022-08-18T07:42:36.330" UserId="2163" Text="If I have a pallet that depends on the staking pallet, and for example one of the functions needs access to the active era, how can I set up the test environment so that I can actually test this?&#xD;&#xA;&#xD;&#xA;Let's say I am accessing the active era like this: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let active_era = Staking::&lt;T&gt;::active_era().ok_or(/*...*/)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have checked the `mock.rs` file in the `staking` pallet directory, and it sets up all the configs and sets up the environment needed for testing the `staking` pallet.&#xD;&#xA;&#xD;&#xA;For my pallet, I need to set up the staking pallet because my pallet is dependent on it.&#xD;&#xA;I was thinking of accessing the `ExtBuilder` from the staking pallet, but it is a bit more complex than just importing it at the beginning of the file. It's because the `staking/src/mock.rs` file is only compiled when testing the pallet. So when I am testing only my pallet it isn't possible to access the `ExtBuilder` from the staking pallet.&#xD;&#xA;&#xD;&#xA;How should I go about setting up the `staking` pallet for testing my own pallet?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16260" PostHistoryTypeId="1" PostId="4334" RevisionGUID="07324c2b-beef-407d-be8d-3a05a9e9e4dd" CreationDate="2022-08-18T07:42:36.330" UserId="2163" Text="How to test a pallet that depends on the staking pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16261" PostHistoryTypeId="3" PostId="4334" RevisionGUID="07324c2b-beef-407d-be8d-3a05a9e9e4dd" CreationDate="2022-08-18T07:42:36.330" UserId="2163" Text="|pallet|testing|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16262" PostHistoryTypeId="2" PostId="4335" RevisionGUID="7ca8247b-c8d6-414f-8312-a25788f7cdef" CreationDate="2022-08-18T09:47:03.850" UserId="2471" Text="I am exploring moonbeam project. I would like to know if it is possible to run a standalone moonbeam network without collators or relaychain.&#xD;&#xA;&#xD;&#xA;I am interested in running a POA based moonbeam standalone network for my research project. Any help is highly appreciated&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16264" PostHistoryTypeId="1" PostId="4335" RevisionGUID="7ca8247b-c8d6-414f-8312-a25788f7cdef" CreationDate="2022-08-18T09:47:03.850" UserId="2471" Text="Is it possible to run moonbeam as a standalone network" ContentLicense="CC BY-SA 4.0" />
  <row Id="16265" PostHistoryTypeId="3" PostId="4335" RevisionGUID="7ca8247b-c8d6-414f-8312-a25788f7cdef" CreationDate="2022-08-18T09:47:03.850" UserId="2471" Text="|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16266" PostHistoryTypeId="5" PostId="4326" RevisionGUID="d483edfc-d4e2-4e4a-a9e9-ef9ddea9ddc5" CreationDate="2022-08-18T10:07:37.943" UserId="227" Comment="added 65 characters in body" Text="Try installing/building with `--locked`, the process will then use the dependency versions from the `Cargo.lock` file in the repository. Those dependencies are typically verified to work. If you omit the `--locked` you'll get potentially newer versions of the dependencies that could introduce some incompatibility.&#xD;&#xA;&#xD;&#xA;If this doesn't work: seeing the `proto2` vs `proto3` error message, could also be that your local version of `protoc` is outdated. Try `protoc --version` to see what you have installed.&#xD;&#xA;Are you possibly using an old version in your environment? I'd check if there are updates available for your operating system then." ContentLicense="CC BY-SA 4.0" />
  <row Id="16267" PostHistoryTypeId="2" PostId="4336" RevisionGUID="83a51a8a-4069-4fad-8d52-b2d72db4b7d2" CreationDate="2022-08-18T11:08:06.310" UserId="2762" Text="In order to connect your parachain to a relay chain you need its chain spec file.&#xD;&#xA;&#xD;&#xA;In the tutorial, the relay chain you want to connect is rococo. &#xD;&#xA;The chain spec is public: https://github.com/paritytech/polkadot/blob/master/node/service/chain-specs/rococo.json&#xD;&#xA;&#xD;&#xA;I suggest to download this file in your node and run the same command with:&#xD;&#xA;&#xD;&#xA;    --chain ./rococo.json \&#xD;&#xA;&#xD;&#xA;You can see the spec files of other public networks: https://github.com/paritytech/polkadot/tree/master/node/service/chain-specs" ContentLicense="CC BY-SA 4.0" />
  <row Id="16269" PostHistoryTypeId="5" PostId="4335" RevisionGUID="c3ff3955-c8b4-4a97-9097-e6b7168e10df" CreationDate="2022-08-18T11:08:58.717" UserId="2471" Comment="deleted 1 character in body; edited title" Text="I am exploring moonbeam and astar projects. I would like to know if it is possible to run a standalone network without collators or relaychain.&#xD;&#xA;&#xD;&#xA;I am interested in running a standalone network of one of them for my research project.&#xD;&#xA;Any help is highly appreciated&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16270" PostHistoryTypeId="4" PostId="4335" RevisionGUID="c3ff3955-c8b4-4a97-9097-e6b7168e10df" CreationDate="2022-08-18T11:08:58.717" UserId="2471" Comment="deleted 1 character in body; edited title" Text="Is it possible to run moonbeam/Astar as a standalone network" ContentLicense="CC BY-SA 4.0" />
  <row Id="16271" PostHistoryTypeId="6" PostId="4335" RevisionGUID="c3ff3955-c8b4-4a97-9097-e6b7168e10df" CreationDate="2022-08-18T11:08:58.717" UserId="2471" Comment="deleted 1 character in body; edited title" Text="|frontier|evm|moonbeam|astar|acala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16272" PostHistoryTypeId="2" PostId="4337" RevisionGUID="23b61aed-195d-4492-b320-ae0abb294807" CreationDate="2022-08-18T11:26:49.223" UserId="575" Text="It's possible. In this case, your network will have to run (and use) its own `finality` gadget (rather than that of the relay chain). You can implement the `GRANDPA` pallet in your network for block finality.&#xD;&#xA;&#xD;&#xA;Using `POA` shouldn't be an issue, since Substrate ships with `Aura`, which is a POA-based consensus engine.&#xD;&#xA;&#xD;&#xA;[This guide][1] explains how you can customize the consensus engine of your chain. You can also check out [this guide][2] to get a high-level explanation of what's involved when converting from a Parachain to a solo chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/consensus-models/create-a-hybrid-node/&#xD;&#xA;  [2]: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16274" PostHistoryTypeId="5" PostId="4334" RevisionGUID="4abcde8b-a909-46ed-8df2-b992ecf86ebc" CreationDate="2022-08-18T11:38:07.270" UserId="2163" Comment="added 92 characters in body" Text="If I have a pallet that depends on the staking pallet, and for example one of the functions needs access to the active era, how can I set up the test environment so that I can actually test this?&#xD;&#xA;&#xD;&#xA;Let's say I am accessing the active era like this: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let active_era = Staking::&lt;T&gt;::active_era().ok_or(/*...*/)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have checked the `mock.rs` file in the `staking` pallet directory, and it sets up all the configs and sets up the environment needed for testing the `staking` pallet.&#xD;&#xA;&#xD;&#xA;For my pallet, I need to set up the staking pallet because my pallet is dependent on it.&#xD;&#xA;I was thinking of accessing the `ExtBuilder` from the staking pallet, but it is a bit more complex than just importing it at the beginning of the file. It's because the `staking/src/mock.rs` file is only compiled when testing the pallet. So when I am testing only my pallet it isn't possible to access the `ExtBuilder` from the staking pallet.&#xD;&#xA;This means that I can't access anything from the `mock.rs` file inside the staking pallet.&#xD;&#xA;&#xD;&#xA;How should I go about setting up the `staking` pallet for testing my own pallet?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16275" PostHistoryTypeId="2" PostId="4338" RevisionGUID="e4c963d2-5ad9-4fad-b8a1-422d1e4f8555" CreationDate="2022-08-18T11:46:20.680" UserId="28" Text="You will need to add the Staking Pallet into your mock `construct_runtime!`:&#xD;&#xA;&#xD;&#xA;From `frame/session/benchmarking/src/mock.rs`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;},&#xD;&#xA;		Balances: pallet_balances::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},&#xD;&#xA;		Staking: pallet_staking::{Pallet, Call, Config&lt;T&gt;, Storage, Event&lt;T&gt;},&#xD;&#xA;		Session: pallet_session::{Pallet, Call, Storage, Event, Config&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;At this point, you should be able to access public functions from the staking module via the `Staking` struct which is defined in the `construct_runtime!`.&#xD;&#xA;&#xD;&#xA;So you should be able to call:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let active_era = Staking::&lt;T&gt;::active_era().ok_or(/*...*/)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Exactly as you have wanted in your main post." ContentLicense="CC BY-SA 4.0" />
  <row Id="16277" PostHistoryTypeId="6" PostId="4304" RevisionGUID="0c43a6d7-0e4e-446b-9f4a-2a4df4f6dbe7" CreationDate="2022-08-18T11:56:39.377" UserId="45" Comment="edited tags" Text="|runtime|wasm|memory|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16279" PostHistoryTypeId="2" PostId="4339" RevisionGUID="849a1479-207f-4b78-af83-71949fe21ec7" CreationDate="2022-08-18T12:38:34.653" UserId="25" Text="I noticed https://github.com/paritytech/substrate/issues/6042 was recently resolved, replacing `T::AccountId` with `&lt;T::Lookup as StaticLookup&gt;::Source`. Substrate docs don't mention what is the benefit of one over the other.&#xD;&#xA;&#xD;&#xA;It seems related to pallet-assets and might be necessary in more complex scenarios, but maybe someone can elaborate on it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16281" PostHistoryTypeId="1" PostId="4339" RevisionGUID="849a1479-207f-4b78-af83-71949fe21ec7" CreationDate="2022-08-18T12:38:34.653" UserId="25" Text="&lt;T::Lookup as StaticLookup&gt;::Source vs T::AccountId?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16282" PostHistoryTypeId="3" PostId="4339" RevisionGUID="849a1479-207f-4b78-af83-71949fe21ec7" CreationDate="2022-08-18T12:38:34.653" UserId="25" Text="|frame|account|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16283" PostHistoryTypeId="2" PostId="4340" RevisionGUID="52ce132c-a0b3-4f82-9937-1437d5dc7886" CreationDate="2022-08-18T12:44:39.453" UserId="227" Text="`wasm-opt` is part of the `binaryen` package. You can find out your local version by executing `wasm-opt --version`.&#xD;&#xA;&#xD;&#xA;In [the `cargo-contract` installation instructions](https://github.com/paritytech/cargo-contract#installation) and the error message that you are getting there are notes on how to get a new version.&#xD;&#xA;&#xD;&#xA;It comes down to installing `binaryen` in a version &gt;= 99:&#xD;&#xA;  * [Debian/Ubuntu](https://tracker.debian.org/pkg/binaryen): `apt-get install binaryen`&#xD;&#xA;  * [Homebrew](https://formulae.brew.sh/formula/binaryen): `brew install binaryen`&#xD;&#xA;  * [Arch Linux](https://archlinux.org/packages/community/x86_64/binaryen/): `pacman -S binaryen`&#xD;&#xA;  * Windows: [binary releases are available](https://github.com/WebAssembly/binaryen/releases)&#xD;&#xA;  * There is also `npm i wasm-opt -g`.&#xD;&#xA;&#xD;&#xA;If none of this works you can download a binary release [here](https://github.com/WebAssembly/binaryen/releases) and put the `wasm-opt` binary into your environment.&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="16285" PostHistoryTypeId="2" PostId="4341" RevisionGUID="1792cb19-5c90-468c-802d-9fab6a2a4f65" CreationDate="2022-08-18T12:54:02.820" UserId="28" Text="You can start by looking at the trait:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Means of changing one type into another in a manner dependent on the source type.&#xD;&#xA;/// This variant is different to `Lookup` in that it doesn't (can cannot) require any&#xD;&#xA;/// context.&#xD;&#xA;pub trait StaticLookup {&#xD;&#xA;	/// Type to lookup from.&#xD;&#xA;	type Source: Codec + Clone + PartialEq + Debug + TypeInfo;&#xD;&#xA;	/// Type to lookup into.&#xD;&#xA;	type Target;&#xD;&#xA;	/// Attempt a lookup.&#xD;&#xA;	fn lookup(s: Self::Source) -&gt; Result&lt;Self::Target, LookupError&gt;;&#xD;&#xA;	/// Convert from Target back to Source.&#xD;&#xA;	fn unlookup(t: Self::Target) -&gt; Self::Source;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Static lookup just describes some logic which converts from one type to another. In the most basic implementation, you can simply create the &quot;identity lookup&quot; conversion, taking an existing type and mapping it to itself:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// A lookup implementation returning the input value.&#xD;&#xA;#[derive(Default)]&#xD;&#xA;pub struct IdentityLookup&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;impl&lt;T: Codec + Clone + PartialEq + Debug + TypeInfo&gt; StaticLookup for IdentityLookup&lt;T&gt; {&#xD;&#xA;	type Source = T;&#xD;&#xA;	type Target = T;&#xD;&#xA;	fn lookup(x: T) -&gt; Result&lt;T, LookupError&gt; {&#xD;&#xA;		Ok(x)&#xD;&#xA;	}&#xD;&#xA;	fn unlookup(x: T) -&gt; T {&#xD;&#xA;		x&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, with this abstraction, you can also program more complex lookup patterns, for example converting domain name (like `shawntabrizi.dot`) or index to the appropriate account id.&#xD;&#xA;&#xD;&#xA;From Pallet Indices:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; StaticLookup for Pallet&lt;T&gt; {&#xD;&#xA;	type Source = MultiAddress&lt;T::AccountId, T::AccountIndex&gt;;&#xD;&#xA;	type Target = T::AccountId;&#xD;&#xA;&#xD;&#xA;	fn lookup(a: Self::Source) -&gt; Result&lt;Self::Target, LookupError&gt; {&#xD;&#xA;		Self::lookup_address(a).ok_or(LookupError)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn unlookup(a: Self::Target) -&gt; Self::Source {&#xD;&#xA;		MultiAddress::Id(a)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This abstraction allows substrate developers to be more flexible on the input users give to pallets when referencing an account, and allow the underlying pallet logic to handle the conversion to an appropriate account id." ContentLicense="CC BY-SA 4.0" />
  <row Id="16287" PostHistoryTypeId="2" PostId="4342" RevisionGUID="4eb4c5d5-95ed-4be0-952b-b81683f2429d" CreationDate="2022-08-18T13:07:25.230" UserId="2809" Text="I've implemented a POA EVM-Compatible chain using the Frontier node template on branch polkadot-v0.9.22.&#xD;&#xA;&#xD;&#xA;I've Implemented a DealWithFees struct and let some part of fees be added to a treasury i've implemented. I'm running all the defaults which came with Frontier's node template having made no changes to pallet evm, ethereum, baseFee or dynamic_fee's configs.&#xD;&#xA;&#xD;&#xA;Ive set pallet EVM's OnChargeTransaction to EVMCurrencyAdapter&lt;Balances, DealWithFees&lt;Runtime&gt;&gt;.&#xD;&#xA;&#xD;&#xA;But after executing an EVM transaction, no change is observed in the treasury.&#xD;&#xA;&#xD;&#xA;**NOTE** I have fixed the fee for every transaction at 250,000,000,000 balance.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;pub struct ToAuthor&lt;R&gt;(sp_std::marker::PhantomData&lt;R&gt;);&#xD;&#xA;impl&lt;R&gt; OnUnbalanced&lt;NegativeImbalance&lt;R&gt;&gt; for ToAuthor&lt;R&gt;&#xD;&#xA;where&#xD;&#xA;	R: pallet_balances::Config + pallet_authorship::Config,&#xD;&#xA;	&lt;R as frame_system::Config&gt;::AccountId: From&lt;AccountId&gt;,&#xD;&#xA;	&lt;R as frame_system::Config&gt;::AccountId: Into&lt;AccountId&gt;,&#xD;&#xA;	&lt;R as frame_system::Config&gt;::Event: From&lt;pallet_balances::Event&lt;R&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	fn on_nonzero_unbalanced(amount: NegativeImbalance&lt;R&gt;) {&#xD;&#xA;		if let Some(author) = &lt;pallet_authorship::Pallet&lt;R&gt;&gt;::author() {&#xD;&#xA;			&lt;pallet_balances::Pallet&lt;R&gt;&gt;::resolve_creating(&amp;author, amount);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct DealWithFees&lt;R&gt;(sp_std::marker::PhantomData&lt;R&gt;);&#xD;&#xA;impl&lt;R&gt; OnUnbalanced&lt;NegativeImbalance&lt;R&gt;&gt; for DealWithFees&lt;R&gt;&#xD;&#xA;where&#xD;&#xA;	R: pallet_balances::Config + pallet_treasury::Config + pallet_authorship::Config,&#xD;&#xA;	pallet_treasury::Pallet&lt;R&gt;: OnUnbalanced&lt;NegativeImbalance&lt;R&gt;&gt;,&#xD;&#xA;	&lt;R as frame_system::Config&gt;::AccountId: From&lt;AccountId&gt;,&#xD;&#xA;	&lt;R as frame_system::Config&gt;::AccountId: Into&lt;AccountId&gt;,&#xD;&#xA;	&lt;R as frame_system::Config&gt;::Event: From&lt;pallet_balances::Event&lt;R&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	fn on_unbalanceds&lt;B&gt;(mut fees_then_tips: impl Iterator&lt;Item = NegativeImbalance&lt;R&gt;&gt;) {&#xD;&#xA;		if let Some(fees) = fees_then_tips.next() {&#xD;&#xA;			// for fees, 75% to treasury, 25% to author&#xD;&#xA;			let mut split = fees.ration(75, 25);&#xD;&#xA;			if let Some(tips) = fees_then_tips.next() {&#xD;&#xA;				// for tips, if any, 100% to author&#xD;&#xA;				tips.merge_into(&amp;mut split.1);&#xD;&#xA;			}&#xD;&#xA;			use pallet_treasury::Pallet as Treasury;&#xD;&#xA;			&lt;Treasury&lt;R&gt; as OnUnbalanced&lt;_&gt;&gt;::on_unbalanced(split.0);&#xD;&#xA;			&lt;ToAuthor&lt;R&gt; as OnUnbalanced&lt;_&gt;&gt;::on_unbalanced(split.1);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);&#xD;&#xA;/// We allow for 2 seconds of compute with a 6 second average block time.&#xD;&#xA;pub const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND;&#xD;&#xA;const WEIGHT_PER_GAS: u64 = 20_000;&#xD;&#xA;&#xD;&#xA;pub struct ConstantFee&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;impl&lt;T&gt; WeightToFeePolynomial for ConstantFee&lt;T&gt;&#xD;&#xA;where&#xD;&#xA;	T: BaseArithmetic + From&lt;u32&gt; + Copy + Unsigned + From&lt;u64&gt;,&#xD;&#xA;{&#xD;&#xA;	type Balance = T;&#xD;&#xA;&#xD;&#xA;	fn polynomial() -&gt; WeightToFeeCoefficients&lt;Self::Balance&gt; {&#xD;&#xA;		let fee: u64 = (DOLLARS * 25).try_into().unwrap();&#xD;&#xA;		smallvec!(WeightToFeeCoefficient {&#xD;&#xA;			coeff_integer: fee.into(),&#xD;&#xA;			coeff_frac: Perbill::zero(),&#xD;&#xA;			negative: false,&#xD;&#xA;			degree: 0,&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn calc(_weight: &amp;Weight) -&gt; Self::Balance {&#xD;&#xA;		let fee: u64 = (DOLLARS * 25).try_into().unwrap();&#xD;&#xA;		return fee.into();&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const TransactionByteFee: Balance = 1;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, DealWithFees&lt;Runtime&gt;&gt;;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;5&gt;;&#xD;&#xA;	type WeightToFee = ConstantFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = ConstantMultiplier&lt;Balance, TransactionByteFee&gt;;&#xD;&#xA;	&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const SpendPeriod: BlockNumber = 6 * DAYS;&#xD;&#xA;	pub const TreasuryPalletId: PalletId = PalletId(*b&quot;py/trsry&quot;);&#xD;&#xA;	/// 5% of proposal value should be reserved from proposer balance,&#xD;&#xA;	/// but not less than ProposalBondMinimum.&#xD;&#xA;	/// This value would be slashed if proposal rejected.&#xD;&#xA;	pub const ProposalBond: Permill = Permill::from_percent(0);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_treasury::Config for Runtime {&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	// Only root for now, governance later.&#xD;&#xA;	type ApproveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	// Only root for now, governance later.&#xD;&#xA;	type RejectOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	// If proposal rejected - send deposit to treasury.&#xD;&#xA;	type OnSlash = Treasury;&#xD;&#xA;	type ProposalBond = ProposalBond;&#xD;&#xA;	type ProposalBondMinimum = ();&#xD;&#xA;	type ProposalBondMaximum = ();&#xD;&#xA;	type SpendPeriod = SpendPeriod;&#xD;&#xA;	// Not burning.&#xD;&#xA;	type Burn = ();&#xD;&#xA;	type PalletId = TreasuryPalletId;&#xD;&#xA;	type BurnDestination = ();&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type SpendFunds = ();&#xD;&#xA;	type MaxApprovals = ConstU32&lt;100&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const UncleGenerations: BlockNumber = 5;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_authorship::Config for Runtime {&#xD;&#xA;	type FindAuthor = pallet_session::FindAccountFromAuthorIndex&lt;Self, Aura&gt;;&#xD;&#xA;	type UncleGenerations = UncleGenerations;&#xD;&#xA;	type FilterUncle = ();&#xD;&#xA;	type EventHandler = ();&#xD;&#xA;}&#xD;&#xA;pub struct FindAuthorTruncated&lt;F&gt;(PhantomData&lt;F&gt;);&#xD;&#xA;impl&lt;F: FindAuthor&lt;u32&gt;&gt; FindAuthor&lt;H160&gt; for FindAuthorTruncated&lt;F&gt; {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;H160&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		if let Some(author_index) = F::find_author(digests) {&#xD;&#xA;			let authority_id = Aura::authorities()[author_index as usize].clone();&#xD;&#xA;			return Some(H160::from_slice(&amp;authority_id.to_raw_vec()[4..24]));&#xD;&#xA;		}&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct FixedGasWeightMapping;&#xD;&#xA;impl GasWeightMapping for FixedGasWeightMapping {&#xD;&#xA;	fn gas_to_weight(gas: u64) -&gt; Weight {&#xD;&#xA;		gas.saturating_mul(WEIGHT_PER_GAS)&#xD;&#xA;	}&#xD;&#xA;	fn weight_to_gas(weight: Weight) -&gt; u64 {&#xD;&#xA;		weight.wrapping_div(WEIGHT_PER_GAS)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const ChainId: u64 = 421;&#xD;&#xA;	pub BlockGasLimit: U256 = U256::from(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WEIGHT_PER_GAS);&#xD;&#xA;	pub PrecompilesValue: FrontierPrecompiles&lt;Runtime&gt; = FrontierPrecompiles::&lt;_&gt;::new();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;	type FeeCalculator = BaseFee;&#xD;&#xA;	type GasWeightMapping = FixedGasWeightMapping;&#xD;&#xA;	type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping&lt;Self&gt;;&#xD;&#xA;	type CallOrigin = EnsureAddressTruncated;&#xD;&#xA;	type WithdrawOrigin = EnsureAddressTruncated;&#xD;&#xA;	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Runner = pallet_evm::runner::stack::Runner&lt;Self&gt;;&#xD;&#xA;	type PrecompilesType = FrontierPrecompiles&lt;Self&gt;;&#xD;&#xA;	type PrecompilesValue = PrecompilesValue;&#xD;&#xA;	type ChainId = ChainId;&#xD;&#xA;	type BlockGasLimit = BlockGasLimit;&#xD;&#xA;	type OnChargeTransaction = EVMCurrencyAdapter&lt;Balances, DealWithFees&lt;Runtime&gt;&gt;;&#xD;&#xA;	type FindAuthor = FindAuthorTruncated&lt;Aura&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_ethereum::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type StateRoot = pallet_ethereum::IntermediateStateRoot&lt;Self&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;frame_support::parameter_types! {&#xD;&#xA;	pub BoundDivision: U256 = U256::from(1024);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_dynamic_fee::Config for Runtime {&#xD;&#xA;	type MinGasPriceBoundDivisor = BoundDivision;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;frame_support::parameter_types! {&#xD;&#xA;	pub IsActive: bool = false;&#xD;&#xA;	pub DefaultBaseFeePerGas: U256 = U256::from(1_000_000_000);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct BaseFeeThreshold;&#xD;&#xA;impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold {&#xD;&#xA;	fn lower() -&gt; Permill {&#xD;&#xA;		Permill::zero()&#xD;&#xA;	}&#xD;&#xA;	fn ideal() -&gt; Permill {&#xD;&#xA;		Permill::from_parts(500_000)&#xD;&#xA;	}&#xD;&#xA;	fn upper() -&gt; Permill {&#xD;&#xA;		Permill::from_parts(1_000_000)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_base_fee::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Threshold = BaseFeeThreshold;&#xD;&#xA;	type IsActive = IsActive;&#xD;&#xA;	type DefaultBaseFeePerGas = DefaultBaseFeePerGas;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_hotfix_sufficients::Config for Runtime {&#xD;&#xA;	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16289" PostHistoryTypeId="1" PostId="4342" RevisionGUID="4eb4c5d5-95ed-4be0-952b-b81683f2429d" CreationDate="2022-08-18T13:07:25.230" UserId="2809" Text="EVM transaction gas fees no added to treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="16290" PostHistoryTypeId="3" PostId="4342" RevisionGUID="4eb4c5d5-95ed-4be0-952b-b81683f2429d" CreationDate="2022-08-18T13:07:25.230" UserId="2809" Text="|transactions|evm|fee|pallet-treasury|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16291" PostHistoryTypeId="4" PostId="4342" RevisionGUID="71d9b267-3052-447f-a1bd-1c963b617e5e" CreationDate="2022-08-18T13:23:15.357" UserId="575" Comment="corrected spellings" Text="EVM transaction gas fees not added to the treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="16292" PostHistoryTypeId="24" PostId="4342" RevisionGUID="71d9b267-3052-447f-a1bd-1c963b617e5e" CreationDate="2022-08-18T13:23:15.357" Comment="Proposed by 575 approved by 34 edit id of 268" ContentLicense="CC BY-SA 4.0" />
  <row Id="16293" PostHistoryTypeId="2" PostId="4343" RevisionGUID="9a22d68f-f34b-4ab6-8379-f9be9b1a078e" CreationDate="2022-08-18T14:00:33.483" UserId="2935" Text="I'm about to introduce several instances of a pallet that was previously used as a default instance. The question is: how do I migrate the storage of `pallet_bags_list` to `pallet_bags_list::&lt;Instance1&gt;`. Or does it happen automatically for the first instance?&#xD;&#xA;&#xD;&#xA;Some context could be found [here][1] and [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/74b6fba024eeaae38b78a143a2c70358dec22450/bin/node/runtime/src/lib.rs#L1639&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1632" ContentLicense="CC BY-SA 4.0" />
  <row Id="16295" PostHistoryTypeId="1" PostId="4343" RevisionGUID="9a22d68f-f34b-4ab6-8379-f9be9b1a078e" CreationDate="2022-08-18T14:00:33.483" UserId="2935" Text="How to migrate storage from a default pallet instance to an actual one" ContentLicense="CC BY-SA 4.0" />
  <row Id="16296" PostHistoryTypeId="3" PostId="4343" RevisionGUID="9a22d68f-f34b-4ab6-8379-f9be9b1a078e" CreationDate="2022-08-18T14:00:33.483" UserId="2935" Text="|pallet|storage|instantiable|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16297" PostHistoryTypeId="2" PostId="4344" RevisionGUID="7935a16e-12a7-4451-a3a0-1875566948f6" CreationDate="2022-08-18T14:14:49.940" UserId="85" Text="Each pallet in a runtime has an index associate with it. When an extrinsic is scale encoded, this index is the first byte that identifies which pallet it belongs to. (The next byte identifies which pallet's `Call` variant is being called).&#xD;&#xA;&#xD;&#xA;In the linked `construct_runtime!` there are no explicit indexes, so the first pallet will be 0 and its enumerated from there on. If people add new pallets / pallet instances on the end then nothing disrupts the existing index numbers. However for production chains it's recommended to explicitly specify the pallet indexes your using (E.g. [statemint][1]).&#xD;&#xA;&#xD;&#xA;So to answer your question, if you just replace `pallet_bags_list` with `pallet_bags_list::&lt;Instance1&gt;` with the same location in the list then no storage migration will be required. This is because all of a pallet's storage is prefixed by the pallet's index to make its self contained.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/15d4f8b3be52ca530a4b2c3bf2c5d7fce2f1ab17/parachains/runtimes/assets/statemint/src/lib.rs#L583" ContentLicense="CC BY-SA 4.0" />
  <row Id="16299" PostHistoryTypeId="5" PostId="4344" RevisionGUID="af985675-bcf3-4d9a-a8bb-fab1f8e07849" CreationDate="2022-08-18T14:21:32.757" UserId="85" Comment="removed supposition parts." Text="Each pallet in a runtime has an index associate with it. When an extrinsic is scale encoded, this index is the first byte that identifies which pallet it belongs to. (The next byte identifies which pallet's `Call` variant is being called).&#xD;&#xA;&#xD;&#xA;In the linked `construct_runtime!` there are no explicit indexes, so the first pallet will be 0 and its enumerated from there on. If people add new pallets / pallet instances on the end then nothing disrupts the existing index numbers. However for production chains it's recommended to explicitly specify the pallet indexes your using (E.g. [statemint][1]).&#xD;&#xA;&#xD;&#xA;The pallet's storage is prefixed by the pallet's index to make its self contained.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/15d4f8b3be52ca530a4b2c3bf2c5d7fce2f1ab17/parachains/runtimes/assets/statemint/src/lib.rs#L583" ContentLicense="CC BY-SA 4.0" />
  <row Id="16300" PostHistoryTypeId="5" PostId="4343" RevisionGUID="6a252cf4-2014-4115-973d-a0c9d39f6ee0" CreationDate="2022-08-18T14:36:05.860" UserId="2935" Comment="added 150 characters in body" Text="I'm about to introduce several instances of a pallet that was previously used as a default instance. The question is: how do I migrate the storage of `pallet_bags_list` to `pallet_bags_list::&lt;Instance1&gt;`. &lt;s&gt;Or does it happen automatically for the first instance?&lt;/s&gt; It seems like this does not happen automatically, because a `DefaultInstance` has an empty prefix, named instances have their name as prefix. &#xD;&#xA;&#xD;&#xA;Some context could be found [here][1] and [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/74b6fba024eeaae38b78a143a2c70358dec22450/bin/node/runtime/src/lib.rs#L1639&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1632" ContentLicense="CC BY-SA 4.0" />
  <row Id="16301" PostHistoryTypeId="2" PostId="4345" RevisionGUID="2660af83-67c0-4224-9dda-d0bf22ba2d6f" CreationDate="2022-08-18T15:10:13.110" UserId="251" Text="Shawn has explained a lot.&#xD;&#xA;&#xD;&#xA;Let me give you a real example.&#xD;&#xA;&#xD;&#xA;I've implemented a custom `AccoundIdLookup` for Darwinia, which allows transfer from Substrate address to EVM address directly.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/blob/main/node/runtime/pangolin/src/pallets/system.rs#L42&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/blob/main/node/primitives/src/lib.rs#L181-L201&#xD;&#xA;&#xD;&#xA;Before this, the EVM user needs to calculate their Substrate address based on the EVM address. Then transfer some balance to the Substrate account to fund their EVM account.&#xD;&#xA;&#xD;&#xA;But now, they just need to transfer from an `H256` address to an `H160` address directly. Because the pallet-balances is accepting a [loopup type](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L280) as the dest. It's more flexible than the `AccountId`." ContentLicense="CC BY-SA 4.0" />
  <row Id="16303" PostHistoryTypeId="2" PostId="4346" RevisionGUID="b603fc71-71ac-4bc8-a7ac-7d727fbd0ace" CreationDate="2022-08-18T15:58:39.383" UserId="276" Text="You can also have a look at https://github.com/polkascan/py-substrate-interface if you want more complex interaction with the RPC " ContentLicense="CC BY-SA 4.0" />
  <row Id="16305" PostHistoryTypeId="2" PostId="4347" RevisionGUID="7b01e8e3-e37d-4c76-b97b-1d264b12ed85" CreationDate="2022-08-18T16:51:08.430" UserId="227" Text="&gt;The question is What is the appropriate way for ink! smart contract messages to handle `DispatchError` (from `ChainExtension`) and return it as its returned value?&#xD;&#xA;&#xD;&#xA;How I understand your question is that you want for the frontend to have the information that an error occurred while calling a contract. And specifically that it was  a `DispatchError` in a chain extension.&#xD;&#xA;&#xD;&#xA;The problem that you face when returning `RetVal::Diverging` from a chain extension's `fn call` is that Substrate will emit an event `ExtrinsicFailed(pallet_contracts::ContractReverted)` without the information that it was a `DispatchError`. &#xD;&#xA;&#xD;&#xA;What you can do is to throw the `DispatchError` immediately in your `fn call`. This will then result in an `ExtrinsicFailed` event being emitted on-chain, containing the info that it was a dispatch error.&#xD;&#xA;&#xD;&#xA;So in the code from your screenshot it would be:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let result =&#xD;&#xA;  RmrkExtension::execute_func::&lt;E&gt;(func_id_matcher, env)?;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16307" PostHistoryTypeId="2" PostId="4348" RevisionGUID="25e66b32-bc76-45dc-9459-e8dfd568ac45" CreationDate="2022-08-18T17:41:49.047" UserId="2940" Text="I have implemented the NPOS with EVM blockchain using the substrate.&#xD;&#xA;&#xD;&#xA;NPOS working fine but after adding EVM to node config the NPOS is not working and the staking election failed.&#xD;&#xA;&#xD;&#xA;Smart Contracts working fine on the chain.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16309" PostHistoryTypeId="1" PostId="4348" RevisionGUID="25e66b32-bc76-45dc-9459-e8dfd568ac45" CreationDate="2022-08-18T17:41:49.047" UserId="2940" Text="NPOS not working after adding the EVM to node config in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="16310" PostHistoryTypeId="3" PostId="4348" RevisionGUID="25e66b32-bc76-45dc-9459-e8dfd568ac45" CreationDate="2022-08-18T17:41:49.047" UserId="2940" Text="|substrate-node|rust|evm|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16311" PostHistoryTypeId="5" PostId="4329" RevisionGUID="582f659c-b1dc-409c-a2c4-c3349fc54b17" CreationDate="2022-08-18T19:32:19.153" UserId="3039" Comment="added 218 characters in body" Text="I was trying to run substrate following the installation process on the docs and I have a mac running with M1.&#xD;&#xA;&#xD;&#xA;I followed the instructions to the letter, installing Rosseta 2 and cmake and also I tried every workaround for M1 that i could found but the error still persist.&#xD;&#xA;&#xD;&#xA;Not sure if I'm missing something or if i need to use an older version of something for it to work...&#xD;&#xA;&#xD;&#xA;[![error][1]][1]&#xD;&#xA;&#xD;&#xA;[![error 2][2]][2]&#xD;&#xA;&#xD;&#xA;This is my first time trying to run a substrate node and also my first time posting in here so i really hope i'm using the format correctly.&#xD;&#xA;&#xD;&#xA;Thank you very much in advance!&#xD;&#xA;&#xD;&#xA;UPDATE. Adding `rustup show` and `rustup +nightly show` outputs&#xD;&#xA;&#xD;&#xA;[![rustup show][3]][3]&#xD;&#xA;&#xD;&#xA;[![rustup +nightly show][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZU3Kf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/3YhBQ.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/NxR0l.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/WlYfZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16312" PostHistoryTypeId="5" PostId="4329" RevisionGUID="4e06b667-51ed-4495-bf67-c82068de3646" CreationDate="2022-08-18T19:38:51.877" UserId="3039" Comment="edited body" Text="I was trying to run substrate following the installation process on the docs and I have a mac running with M1.&#xD;&#xA;&#xD;&#xA;I followed the instructions to the letter, installing Rosseta 2 and cmake and also I tried every workaround for M1 that i could found but the error still persist.&#xD;&#xA;&#xD;&#xA;Not sure if I'm missing something or if i need to use an older version of something for it to work...&#xD;&#xA;&#xD;&#xA;[![error][1]][1]&#xD;&#xA;&#xD;&#xA;[![error 2][2]][2]&#xD;&#xA;&#xD;&#xA;This is my first time trying to run a substrate node and also my first time posting in here so i really hope i'm using the format correctly.&#xD;&#xA;&#xD;&#xA;Thank you very much in advance!&#xD;&#xA;&#xD;&#xA;UPDATE. Adding `rustup show` and `rustup +nightly show` outputs&#xD;&#xA;&#xD;&#xA;[![rustup show][3]][3]&#xD;&#xA;&#xD;&#xA;[![rustup +nightly show][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZU3Kf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/3YhBQ.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/7gO9s.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/WlYfZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16313" PostHistoryTypeId="50" PostId="3807" RevisionGUID="d00b6920-dc8b-4320-b76f-b0ec28de16a6" CreationDate="2022-08-18T21:07:30.803" UserId="-1" />
  <row Id="16318" PostHistoryTypeId="2" PostId="4350" RevisionGUID="8bdc9a78-7217-4c2e-a5d2-3bab7f18c340" CreationDate="2022-08-19T00:56:46.750" UserId="590" Text="I notice that frame-support has some constant weights:&#xD;&#xA;- ExtrinsicBaseWeight&#xD;&#xA;- RocksDbWeight&#xD;&#xA;- BlockExecutionWeight&#xD;&#xA;- ParityDbWeight (not using)&#xD;&#xA;&#xD;&#xA;Sean recommends that we run weights on all pallets as mentioned on a [stackexchange][1] response. Do we also need to regenerate the weight constants from frame-support? If so how?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/questions/295/how-to-generate-weightinfo-for-pallets/878#878" ContentLicense="CC BY-SA 4.0" />
  <row Id="16320" PostHistoryTypeId="1" PostId="4350" RevisionGUID="8bdc9a78-7217-4c2e-a5d2-3bab7f18c340" CreationDate="2022-08-19T00:56:46.750" UserId="590" Text="Do I need to re-run frame-support weight constants?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16321" PostHistoryTypeId="3" PostId="4350" RevisionGUID="8bdc9a78-7217-4c2e-a5d2-3bab7f18c340" CreationDate="2022-08-19T00:56:46.750" UserId="590" Text="|frame|benchmarking|weight|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16322" PostHistoryTypeId="10" PostId="3479" RevisionGUID="97be099a-a3be-4e92-80dc-3aa250cf566a" CreationDate="2022-08-19T02:54:02.273" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[4305],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="16323" PostHistoryTypeId="2" PostId="4351" RevisionGUID="9b029a4b-2c7a-48d5-8037-791a7376719d" CreationDate="2022-08-19T03:04:14.750" UserId="3009" Text="In my last question, I asked about [how to generate key pair in substrate][1].But it seems that it is hard to do this.So I have to make a conclusion that I can't generate key pair in substrate sadly. But my intuition told me that I was wrong. So if somebody knows the truth about my question，please tell me.&#xD;&#xA;&#xD;&#xA;In the course of struggling against the problem,I still puzzled why I can't use sp_core::Pair in my pallet code. Or who can tell me under what conditions I can import this item to my code.Is there some features or attributs that can help me to import sp_core::Pair into my code. I am not very clear with the condition compilation course of runtime especially the influence of cfg feature. Hope to learn this,anything about this is good for me.&#xD;&#xA;&#xD;&#xA;Thanks!!!&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4292/how-to-generate-key-pair-in-pallet-or-on-offchain-work" ContentLicense="CC BY-SA 4.0" />
  <row Id="16325" PostHistoryTypeId="1" PostId="4351" RevisionGUID="9b029a4b-2c7a-48d5-8037-791a7376719d" CreationDate="2022-08-19T03:04:14.750" UserId="3009" Text="How to import sp_core::Pair?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16326" PostHistoryTypeId="3" PostId="4351" RevisionGUID="9b029a4b-2c7a-48d5-8037-791a7376719d" CreationDate="2022-08-19T03:04:14.750" UserId="3009" Text="|pallet|runtime|rust|keyring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16327" PostHistoryTypeId="4" PostId="3730" RevisionGUID="e5f7b50e-fd70-41f2-80d5-cc2a0a0ae38b" CreationDate="2022-08-19T06:52:18.653" UserId="227" Comment="edited tags; edited title" Text="How to get a detailed error for a Solang-compiled contract with polkadot-js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16328" PostHistoryTypeId="6" PostId="3730" RevisionGUID="e5f7b50e-fd70-41f2-80d5-cc2a0a0ae38b" CreationDate="2022-08-19T06:52:18.653" UserId="227" Comment="edited tags; edited title" Text="|polkadot-js|polkadot|smart-contract|solidity|solang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16329" PostHistoryTypeId="2" PostId="4352" RevisionGUID="0ceb14ae-7b97-4e08-9bb5-d536258be2e1" CreationDate="2022-08-19T06:58:28.670" UserId="575" Text="It's not possible to use `sp_core::Pair` in your runtime. &#xD;&#xA;&#xD;&#xA;By design, the `Pair` trait (as well as other traits with the `full_crypto` feature) don't support WASM runtimes. &#xD;&#xA;&#xD;&#xA;This is because the WASM runtimes will be compiled for `no_std` environments too, which isn't a suitable environment for hash-based functions (like random seed generation)." ContentLicense="CC BY-SA 4.0" />
  <row Id="16331" PostHistoryTypeId="6" PostId="3730" RevisionGUID="736ce28b-19d4-44d1-ac26-a212df0ec770" CreationDate="2022-08-19T07:23:35.670" UserId="227" Comment="edited tags" Text="|polkadot-js|smart-contract|solidity|solang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16332" PostHistoryTypeId="2" PostId="4353" RevisionGUID="b5f9641a-e0ca-429a-b847-b0d1df031236" CreationDate="2022-08-19T07:46:42.773" UserId="227" Text="There is a Parity repository called [`substrate-contracts-node`](https://github.com/paritytech/substrate-contracts-node), it's a Substrate node configured to include `pallet-contracts`. &#xD;&#xA;&#xD;&#xA;You can take a look at how the trait is implemented here: https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/src/lib.rs#L272-L320." ContentLicense="CC BY-SA 4.0" />
  <row Id="16334" PostHistoryTypeId="2" PostId="4354" RevisionGUID="3d1880b9-12f3-4713-b67a-8ab8362477bb" CreationDate="2022-08-19T07:50:22.507" UserId="3049" Text="Currently it is not yet possible to view the error message directly in the `polkadot.js` UI. To see your error message from the `require` statement you need to:&#xD;&#xA;&#xD;&#xA; -  Compile `solang` yourself from the latest master branch and use that. We added this feature recently and it is not yet released (it will be in V 0.2).&#xD;&#xA; - Make sure your node is configured to display the debug buffer, [as described here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://ink.substrate.io/faq#how-do-i-print-something-to-the-console-from-the-runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="16336" PostHistoryTypeId="2" PostId="4355" RevisionGUID="782c2474-5d48-4a62-9c79-6142322d0587" CreationDate="2022-08-19T07:54:49.953" UserId="567" Text="To run an Astar local node you have two options:&#xD;&#xA;&#xD;&#xA;[astar-local][1] is the the closest to live networks - and have a block time of 2 sec. To run it follow these [instructions][2] and run the node with (it will run a non-persistent local instance):&#xD;&#xA;&#xD;&#xA;    ./target/release/astar-collator --dev --tmp&#xD;&#xA;&#xD;&#xA;There is also [swanky-node][3] an local environment that targets WASM development (EVM is not available in this node). You can run it the same way as astar-local&#xD;&#xA;&#xD;&#xA;If you need to run a local network with relay-chain + parachains to use XCM you will have to use [polkadot-launch][4] but I guess this is not what you are looking for.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AstarNetwork/Astar&#xD;&#xA;  [2]: https://github.com/AstarNetwork/Astar#building-from-source&#xD;&#xA;  [3]: https://github.com/AstarNetwork/swanky-node&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-launch" ContentLicense="CC BY-SA 4.0" />
  <row Id="16338" PostHistoryTypeId="2" PostId="4356" RevisionGUID="a1d61d2f-5921-4be4-9db9-4d03a42762e3" CreationDate="2022-08-19T08:23:09.743" UserId="3009" Text="The official website tells us there is &quot; [A secure, local entropy source for random number generation][1]&quot; . I think it means that I can make use of this feature to generate random number or even  generate key pair in offchain worker. I want to know how to implement this.Is there any code snippet that I could learn?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/fundamentals/offchain-operations/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16340" PostHistoryTypeId="1" PostId="4356" RevisionGUID="a1d61d2f-5921-4be4-9db9-4d03a42762e3" CreationDate="2022-08-19T08:23:09.743" UserId="3009" Text="How to use &quot;A secure, local entropy source for random number generation&quot; in offchain worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16341" PostHistoryTypeId="3" PostId="4356" RevisionGUID="a1d61d2f-5921-4be4-9db9-4d03a42762e3" CreationDate="2022-08-19T08:23:09.743" UserId="3009" Text="|offchain-worker|random|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16342" PostHistoryTypeId="2" PostId="4357" RevisionGUID="fb8d0393-461b-4744-962a-ccd2d74a7a19" CreationDate="2022-08-19T08:28:54.837" UserId="73" Text="For offchain workers there is the [`random_seed`][1] function. This will return you a random seed that you can use to initialize a random number generator.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/a357c29ebabb075235977edd5e3901c66575f995/primitives/io/src/lib.rs#L1208" ContentLicense="CC BY-SA 4.0" />
  <row Id="16344" PostHistoryTypeId="2" PostId="4358" RevisionGUID="2d819d90-e8ed-485c-a581-5c8097b3961e" CreationDate="2022-08-19T10:13:53.817" UserId="94" Text="Very good question!  &#xD;&#xA;&#xD;&#xA;The weights that you mentioned are also generated by the `benchmark` command.  &#xD;&#xA;It has several sub-commands which are explained in the [README](https://github.com/paritytech/substrate/tree/master/utils/frame/benchmarking-cli#the-benchmarking-cli):  &#xD;&#xA;```pre&#xD;&#xA;$ cargo run --profile=production -- benchmark&#xD;&#xA;&#xD;&#xA;Sub-commands concerned with benchmarking.&#xD;&#xA;&#xD;&#xA;USAGE:&#xD;&#xA;    substrate benchmark &lt;SUBCOMMAND&gt;&#xD;&#xA;&#xD;&#xA;OPTIONS:&#xD;&#xA;    -h, --help       Print help information&#xD;&#xA;    -V, --version    Print version information&#xD;&#xA;&#xD;&#xA;SUBCOMMANDS:&#xD;&#xA;    block       Benchmark the execution time of historic blocks&#xD;&#xA;    machine     Command to benchmark the hardware.&#xD;&#xA;    overhead    Benchmark the execution overhead per-block and per-extrinsic&#xD;&#xA;    pallet      Benchmark the extrinsic weight of FRAME Pallets&#xD;&#xA;    storage     Benchmark the storage speed of a chain snapshot&#xD;&#xA;```&#xD;&#xA;The equivalence here is:  &#xD;&#xA;- `benchmark storage` creates `RocksDbWeight` and `ParityDbWeight`&#xD;&#xA;- `benchmark overhead` creates `BlockExecutionWeight` and `ExtrinsicBaseWeight`&#xD;&#xA;&#xD;&#xA;All this is documented in the linked README above.  &#xD;&#xA;You can get an impression what parameters to use for these commands when looking at the header of each weigh file in [Polkadot](https://github.com/paritytech/polkadot/tree/master/runtime/polkadot/constants/src/weights). There you will see something like:  &#xD;&#xA;```rust&#xD;&#xA;//! DATABASE: `ParityDb`, RUNTIME: `Polkadot`&#xD;&#xA;//! BLOCK-NUM: `BlockId::Number(9653477)`&#xD;&#xA;//! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1`&#xD;&#xA;//! STATE-VERSION: `V0`, STATE-CACHE-SIZE: `0`&#xD;&#xA;//! WEIGHT-PATH: `runtime/polkadot/constants/src/weights/`&#xD;&#xA;//! METRIC: `Average`, WEIGHT-MUL: `1.1`, WEIGHT-ADD: `0`&#xD;&#xA;&#xD;&#xA;// Executed Command:&#xD;&#xA;//   ./target/production/polkadot&#xD;&#xA;//   benchmark storage&#xD;&#xA;//   --db=paritydb&#xD;&#xA;//   --state-version=0&#xD;&#xA;//   --mul=1.1&#xD;&#xA;//   --weight-path=runtime/polkadot/constants/src/weights/&#xD;&#xA;```&#xD;&#xA;Which tells you how it was called.  &#xD;&#xA;PS: The commands had a `-` in the name formerly which got removed now." ContentLicense="CC BY-SA 4.0" />
  <row Id="16346" PostHistoryTypeId="2" PostId="4359" RevisionGUID="82754bfd-e31f-464f-bcbd-f536139f55c3" CreationDate="2022-08-19T10:25:26.233" UserId="251" Text="I'm writing a tool to build a fork-off chain. But the new chain can not get finalized.&#xD;&#xA;&#xD;&#xA;I've skipped the Babe/Grandpa/Session's storage.&#xD;&#xA;&#xD;&#xA;I also check the chain state, that no historical storage under the Grandpa.&#xD;&#xA;&#xD;&#xA;But when I call the RPC, round_state. It shows all the old validators didn't vote.&#xD;&#xA;Interesting, where did the old validator data come from?&#xD;&#xA;&#xD;&#xA;And I found these things:&#xD;&#xA;```&#xD;&#xA;const VERSION_KEY: &amp;[u8] = b&quot;grandpa_schema_version&quot;;&#xD;&#xA;const SET_STATE_KEY: &amp;[u8] = b&quot;grandpa_completed_round&quot;;&#xD;&#xA;const CONCLUDED_ROUNDS: &amp;[u8] = b&quot;grandpa_concluded_rounds&quot;;&#xD;&#xA;const AUTHORITY_SET_KEY: &amp;[u8] = b&quot;grandpa_voters&quot;;&#xD;&#xA;const BEST_JUSTIFICATION: &amp;[u8] = b&quot;grandpa_best_justification&quot;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Are these stored in runtime storage?&#xD;&#xA;If yes, what are the keys to them?&#xD;&#xA;&#xD;&#xA;If I grab the storage base on the metadata pallet prefix. The finalization works. But if I grab all the keys and filter the Babe/Grandpa/Session prefixes, then it won't. So, I believe there are some 'well-known' keys storing the Grandpa cache." ContentLicense="CC BY-SA 4.0" />
  <row Id="16348" PostHistoryTypeId="1" PostId="4359" RevisionGUID="82754bfd-e31f-464f-bcbd-f536139f55c3" CreationDate="2022-08-19T10:25:26.233" UserId="251" Text="Where the GRANDPA round state stored at?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16349" PostHistoryTypeId="3" PostId="4359" RevisionGUID="82754bfd-e31f-464f-bcbd-f536139f55c3" CreationDate="2022-08-19T10:25:26.233" UserId="251" Text="|storage|grandpa|state|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16350" PostHistoryTypeId="2" PostId="4360" RevisionGUID="5fd6eaba-40b6-4ed3-a33f-6f9c954addce" CreationDate="2022-08-19T11:52:05.997" UserId="1803" Text="We have a DAO factory, and the whole idea is to create councils dynamically on the pallet level.&#xD;&#xA;The best would be using the native approach of the council origin but having the possibility to change the council through extrinsic calls instead of having instances of the `pallet_collective` at the runtime level.&#xD;&#xA;I think it's currently not possible, but still, I wonder what's the best approach here." ContentLicense="CC BY-SA 4.0" />
  <row Id="16352" PostHistoryTypeId="1" PostId="4360" RevisionGUID="5fd6eaba-40b6-4ed3-a33f-6f9c954addce" CreationDate="2022-08-19T11:52:05.997" UserId="1803" Text="Storage level Origin" ContentLicense="CC BY-SA 4.0" />
  <row Id="16353" PostHistoryTypeId="3" PostId="4360" RevisionGUID="5fd6eaba-40b6-4ed3-a33f-6f9c954addce" CreationDate="2022-08-19T11:52:05.997" UserId="1803" Text="|origin|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16354" PostHistoryTypeId="2" PostId="4361" RevisionGUID="c8f4269a-8ffd-46a4-b8dc-903fac9f6009" CreationDate="2022-08-19T12:56:11.743" UserId="28" Text="It sounds like you are trying to do things which aren't really supported in the Rust type system.&#xD;&#xA;&#xD;&#xA;Instead you should probably re-create some kind of access control layer into your pallet which can be dynamically created and managed. For example some kind of simple multisig structure.&#xD;&#xA;&#xD;&#xA;In this case, the Rust type system is not going to be friendly to spinning up multiple origins which can be manipulated by storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="16356" PostHistoryTypeId="2" PostId="4362" RevisionGUID="9f276c33-0559-415b-86a1-9d11796d8ae4" CreationDate="2022-08-19T17:07:41.073" UserId="45" Text="&gt; Why is the Runtime memory management designed such that the Host manages the memory shared with the Wasm Runtime (imports memory + allocation functions)?&#xD;&#xA;&#xD;&#xA;The design in which allocation functions are on the host side is dictated by the fact that some of the host functions might return buffers of data of unknown size. That means that the wasm code cannot efficiently provide buffers upfront. For example, let's examine the host function that returns a given storage value. The storage value's size is not known upfront in the general case, so the wasm caller cannot pre-allocate the buffer upfront. A potential solution is to first call the host function without a buffer, which will return the value's size, and then do the second call passing a buffer of the required size. For some host functions, caches could be put in place for mitigation, some other functions cannot be implemented in the such model at all. To solve this problem, it was chosen to place the allocator on the host side.&#xD;&#xA;&#xD;&#xA;Note, however, that this is not the only possible solution. For instance, there is an ongoing discussion about moving the allocator into the wasm: [substrate#11883](https://github.com/paritytech/substrate/issues/11883).&#xD;&#xA;&#xD;&#xA;The fact that the memory is imported does not matter too much in our setting. It could work with a declared and exported memory. In fact, this is how it worked in the beginning and importing memory. We almost certainly still support this to this day. Imported memory works a little bit better than exported memory since it avoids some edge cases, although it also has some downsides.&#xD;&#xA;&#xD;&#xA;&gt; Since the Host might need to store things onto the memory, does it heap allocate things specific to itself on the linear memory shared with the Wasm runtime or it is in separate memory space?&#xD;&#xA;&#xD;&#xA;Notably, the allocator maintains some of its data structures inside the linear memory and some other structures outside." ContentLicense="CC BY-SA 4.0" />
  <row Id="16358" PostHistoryTypeId="2" PostId="4363" RevisionGUID="e98b3b0b-b59a-432c-b604-443d08603fbd" CreationDate="2022-08-19T17:38:56.267" UserId="3051" Text="I am facing an issue with my private chain where I have configured 1 bootnode, 4 validator nodes and 3 non-validator nodes. When I launch the network, the peers are detected, validator node validates one block and then peers of all validator nodes get disconnected whereas peers of non-validators stay connected. Please find attached the image showing logs of one of the validators.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cuIgH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16360" PostHistoryTypeId="1" PostId="4363" RevisionGUID="e98b3b0b-b59a-432c-b604-443d08603fbd" CreationDate="2022-08-19T17:38:56.267" UserId="3051" Text="Validator peers disconnecting after producing one block" ContentLicense="CC BY-SA 4.0" />
  <row Id="16361" PostHistoryTypeId="3" PostId="4363" RevisionGUID="e98b3b0b-b59a-432c-b604-443d08603fbd" CreationDate="2022-08-19T17:38:56.267" UserId="3051" Text="|substrate-node|validator|peers|private-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16362" PostHistoryTypeId="2" PostId="4364" RevisionGUID="252d4b4b-d526-4acd-8c06-55c09380b005" CreationDate="2022-08-19T22:39:06.863" UserId="2060" Text="In trying to learning how governance works, I have implemented a bare-minimum governance configuration. I run it on a local relay chain and passed referenda always fail enactment with `BadOrigin` no matter what extrinsic is proposed. Even a simple balance transfer initiated by the origin account for the transfer fails. All proposals are proposed by a Council member, using the Polkadot UI -&gt; Democracy tab. Everything else works as expected. Any ideas why this could be happening?&#xD;&#xA;&#xD;&#xA;Here is my governance-related config:&#xD;&#xA;&#xD;&#xA;    parameter_types! {&#xD;&#xA;		pub MaximumSchedulerWeight: Weight = Perbill::from_percent(10) * RuntimeBlockWeights::get().max_block;&#xD;&#xA;		pub const MaxScheduledPerBlock: u32 = 50;&#xD;&#xA;		pub const NoPreimagePostponement: Option&lt;u32&gt; = Some(5 * MINUTES);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl pallet_scheduler::Config for Runtime {&#xD;&#xA;	    type Event = Event;&#xD;&#xA;	    type Origin = Origin;&#xD;&#xA;		type PalletsOrigin = OriginCaller;&#xD;&#xA;		type Call = Call;&#xD;&#xA;		type MaximumWeight = MaximumSchedulerWeight;&#xD;&#xA;		type ScheduleOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;		type MaxScheduledPerBlock = MaxScheduledPerBlock;&#xD;&#xA;		type WeightInfo = pallet_scheduler::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;		type OriginPrivilegeCmp = EqualPrivilegeOnly;&#xD;&#xA;		type PreimageProvider = Preimage;&#xD;&#xA;		type NoPreimagePostponement = NoPreimagePostponement;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    parameter_types! {&#xD;&#xA;		pub const PreimageMaxSize: u32 = 4096 * 1024;&#xD;&#xA;		pub const PreimageBaseDeposit: Balance = 1 * MILLIUNIT;&#xD;&#xA;		pub const PreimageByteDeposit: Balance = 1 * MICROUNIT;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl pallet_preimage::Config for Runtime {&#xD;&#xA;		type WeightInfo = pallet_preimage::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;		type Event = Event;&#xD;&#xA;		type Currency = Balances;&#xD;&#xA;		type ManagerOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;		type MaxSize = PreimageMaxSize;&#xD;&#xA;		type BaseDeposit = PreimageBaseDeposit;&#xD;&#xA;		type ByteDeposit = PreimageByteDeposit;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	parameter_types! {&#xD;&#xA;		pub const CouncilMotionDuration: BlockNumber = 5 * DAYS;&#xD;&#xA;		pub const CouncilMaxProposals: u32 = 25;&#xD;&#xA;		pub const CouncilMaxMembers: u32 = 1;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	type CouncilCollective = pallet_collective::Instance1;&#xD;&#xA;	impl pallet_collective::Config&lt;CouncilCollective&gt; for Runtime {&#xD;&#xA;		type Origin = Origin;&#xD;&#xA;		type Proposal = Call;&#xD;&#xA;		type Event = Event;&#xD;&#xA;		type MotionDuration = CouncilMotionDuration;&#xD;&#xA;		type MaxProposals = CouncilMaxProposals;&#xD;&#xA;		type MaxMembers = CouncilMaxMembers;&#xD;&#xA;		type DefaultVote = pallet_collective::PrimeDefaultVote;&#xD;&#xA;		type WeightInfo = pallet_collective::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	parameter_types! {&#xD;&#xA;		pub const LaunchPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;&#xD;&#xA;		pub const VotingPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;&#xD;&#xA;		pub const FastTrackVotingPeriod: BlockNumber = 3 * 24 * 60 * MINUTES;&#xD;&#xA;		pub const MinimumDeposit: Balance = 100 * UNIT;&#xD;&#xA;		pub const EnactmentPeriod: BlockNumber = 30 * 24 * 60 * MINUTES;&#xD;&#xA;		pub const CooloffPeriod: BlockNumber = 28 * 24 * 60 * MINUTES;&#xD;&#xA;		pub const MaxProposals: u32 = 100;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl pallet_democracy::Config for Runtime {&#xD;&#xA;		type CooloffPeriod = CooloffPeriod;&#xD;&#xA;		type Currency = Balances;&#xD;&#xA;		type EnactmentPeriod = EnactmentPeriod;&#xD;&#xA;		type Event = Event;&#xD;&#xA;		type FastTrackVotingPeriod = FastTrackVotingPeriod;&#xD;&#xA;		type InstantAllowed = frame_support::traits::ConstBool&lt;true&gt;;&#xD;&#xA;		type LaunchPeriod = LaunchPeriod;&#xD;&#xA;		type MaxProposals = MaxProposals;&#xD;&#xA;		type MaxVotes = ConstU32&lt;100&gt;;&#xD;&#xA;		type MinimumDeposit = MinimumDeposit;&#xD;&#xA;		type PreimageByteDeposit = PreimageByteDeposit;&#xD;&#xA;		type Proposal = Call;&#xD;&#xA;		type Scheduler = Scheduler;&#xD;&#xA;		type Slash = (); &#xD;&#xA;		type WeightInfo = pallet_democracy::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;		type VoteLockingPeriod = EnactmentPeriod; // Same as EnactmentPeriod&#xD;&#xA;		type VotingPeriod = VotingPeriod;&#xD;&#xA;		type ExternalDefaultOrigin = pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 1, 1&gt;;&#xD;&#xA;		type ExternalMajorityOrigin =  pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 3, 4&gt;;&#xD;&#xA;		type ExternalOrigin = pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 1, 2&gt;;&#xD;&#xA;		type FastTrackOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;		type InstantOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;		type PalletsOrigin = OriginCaller;&#xD;&#xA;		type CancellationOrigin = pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 2, 3&gt;;&#xD;&#xA;		type CancelProposalOrigin = EitherOfDiverse&lt;EnsureRoot&lt;AccountId&gt;, 	pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 1, 1&gt;&gt;;&#xD;&#xA;		type BlacklistOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;		type VetoOrigin = pallet_collective::EnsureMember&lt;AccountId, CouncilCollective&gt;;&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="16364" PostHistoryTypeId="1" PostId="4364" RevisionGUID="252d4b4b-d526-4acd-8c06-55c09380b005" CreationDate="2022-08-19T22:39:06.863" UserId="2060" Text="Why does referendum on a local chain always fail in execution with BadOrigin?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16365" PostHistoryTypeId="3" PostId="4364" RevisionGUID="252d4b4b-d526-4acd-8c06-55c09380b005" CreationDate="2022-08-19T22:39:06.863" UserId="2060" Text="|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16366" PostHistoryTypeId="2" PostId="4365" RevisionGUID="11cf327d-6452-4aa5-aefe-1a2ba119e272" CreationDate="2022-08-20T00:19:28.597" UserId="28" Text="When a Democracy proposal executes, it dispatches the call using the `Root` origin:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let res = proposal&#xD;&#xA;	.dispatch(frame_system::RawOrigin::Root.into())&#xD;&#xA;	.map(|_| ())&#xD;&#xA;	.map_err(|e| e.error);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This means you need to call extrinsics which expect the `Root` origin, else you will get a `BadOrigin` error.&#xD;&#xA;&#xD;&#xA;For example, the `transfer` function in Balances expects a signed origin:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(T::WeightInfo::transfer())]&#xD;&#xA;pub fn transfer(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	dest: AccountIdLookupOf&lt;T&gt;,&#xD;&#xA;	#[pallet::compact] value: T::Balance,&#xD;&#xA;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;	let transactor = ensure_signed(origin)?;&#xD;&#xA;	// -- snip --&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And this makes sense, because if you execute a transfer from a democracy proposal, who will be the sender account which has the original balance to be transferred?&#xD;&#xA;&#xD;&#xA;You might want to try calling `force_transfer` instead, which is specifically a `Root` call for transferring the balance on behalf of another user:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Exactly as `transfer`, except the origin must be root and the source account may be&#xD;&#xA;/// specified.&#xD;&#xA;/// # &lt;weight&gt;&#xD;&#xA;/// - Same as transfer, but additional read and write because the source account is not&#xD;&#xA;///   assumed to be in the overlay.&#xD;&#xA;/// # &lt;/weight&gt;&#xD;&#xA;#[pallet::weight(T::WeightInfo::force_transfer())]&#xD;&#xA;pub fn force_transfer(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	source: AccountIdLookupOf&lt;T&gt;,&#xD;&#xA;	dest: AccountIdLookupOf&lt;T&gt;,&#xD;&#xA;	#[pallet::compact] value: T::Balance,&#xD;&#xA;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;	ensure_root(origin)?;&#xD;&#xA;	let source = T::Lookup::lookup(source)?;&#xD;&#xA;	let dest = T::Lookup::lookup(dest)?;&#xD;&#xA;	&lt;Self as Currency&lt;_&gt;&gt;::transfer(&#xD;&#xA;		&amp;source,&#xD;&#xA;		&amp;dest,&#xD;&#xA;		value,&#xD;&#xA;		ExistenceRequirement::AllowDeath,&#xD;&#xA;	)?;&#xD;&#xA;	Ok(().into())&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16368" PostHistoryTypeId="2" PostId="4366" RevisionGUID="b48650d4-7ab5-4be3-8084-e97f83c53f96" CreationDate="2022-08-20T00:22:32.167" UserId="3053" Text="I'm running **benchmark-cli storage** tool to calculate average weights for DB read and writes and one thing that I've noticed is that there are significant difference between even 99th percentile and worst case scenarios (max). Here is an example ran on RocksDb.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		/// Stats nanoseconds:&#xD;&#xA;		///   Min, Max: 54_112, 124_655_974&#xD;&#xA;		///   Average:  133_227&#xD;&#xA;		///   Median:   131_560&#xD;&#xA;		///   Std-Dev:  213029.92&#xD;&#xA;		///&#xD;&#xA;		/// Percentiles nanoseconds:&#xD;&#xA;		///   99th: 165_267&#xD;&#xA;		///   95th: 150_276&#xD;&#xA;		///   75th: 137_649&#xD;&#xA;		write: 133_227 * constants::WEIGHT_PER_NANOS,&#xD;&#xA;&#xD;&#xA;You can see that the max which is 124_655_974 is more than 700 times worst than 99th which is 165_267.&#xD;&#xA;&#xD;&#xA;Does anyone know why this might happen and is that related to some flaw in benchmarking or some cache related side-effect?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16370" PostHistoryTypeId="1" PostId="4366" RevisionGUID="b48650d4-7ab5-4be3-8084-e97f83c53f96" CreationDate="2022-08-20T00:22:32.167" UserId="3053" Text="benchmarks: Significant different between 99th and worst case" ContentLicense="CC BY-SA 4.0" />
  <row Id="16371" PostHistoryTypeId="3" PostId="4366" RevisionGUID="b48650d4-7ab5-4be3-8084-e97f83c53f96" CreationDate="2022-08-20T00:22:32.167" UserId="3053" Text="|storage|benchmarking|weight|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16372" PostHistoryTypeId="5" PostId="4366" RevisionGUID="2622bc70-5569-4d8c-be8a-e089495558eb" CreationDate="2022-08-20T00:26:56.650" UserId="3053" Comment="added 148 characters in body" Text="I'm running **benchmark-cli storage** tool to calculate average weights for DB read and writes and one thing that I've noticed is that there are significant difference between even 99th percentile and worst case scenarios (max). Here is an example ran on RocksDb.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		/// Stats nanoseconds:&#xD;&#xA;		///   Min, Max: 54_112, 124_655_974&#xD;&#xA;		///   Average:  133_227&#xD;&#xA;		///   Median:   131_560&#xD;&#xA;		///   Std-Dev:  213029.92&#xD;&#xA;		///&#xD;&#xA;		/// Percentiles nanoseconds:&#xD;&#xA;		///   99th: 165_267&#xD;&#xA;		///   95th: 150_276&#xD;&#xA;		///   75th: 137_649&#xD;&#xA;		write: 133_227 * constants::WEIGHT_PER_NANOS,&#xD;&#xA;&#xD;&#xA;You can see that the max which is 124_655_974 is more than 700 times worst than 99th which is 165_267.&#xD;&#xA;&#xD;&#xA;Does anyone know why this might happen and is that related to some flaw in benchmarking or some cache related side-effect?&#xD;&#xA;&#xD;&#xA;Notes:&#xD;&#xA;- I've printed out these worst case nodes and they are different on every run but the worst case seems to still be around the same number." ContentLicense="CC BY-SA 4.0" />
  <row Id="16373" PostHistoryTypeId="5" PostId="4366" RevisionGUID="99e2e83d-9556-4304-a8ab-a1e764e33c1d" CreationDate="2022-08-20T00:40:26.200" UserId="3053" Comment="edited body" Text="I'm running **benchmark-cli storage** tool to calculate average weights for DB read and writes and one thing that I've noticed is that there are significant difference between even 99th percentile and worst case scenarios (max). Here is an example ran on RocksDb.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		/// Stats nanoseconds:&#xD;&#xA;		///   Min, Max: 54_112, 124_655_974&#xD;&#xA;		///   Average:  133_227&#xD;&#xA;		///   Median:   131_560&#xD;&#xA;		///   Std-Dev:  213029.92&#xD;&#xA;		///&#xD;&#xA;		/// Percentiles nanoseconds:&#xD;&#xA;		///   99th: 165_267&#xD;&#xA;		///   95th: 150_276&#xD;&#xA;		///   75th: 137_649&#xD;&#xA;		write: 133_227 * constants::WEIGHT_PER_NANOS,&#xD;&#xA;&#xD;&#xA;You can see that the max which is 124_655_974 is more than 700 times worst than 99th which is 165_267.&#xD;&#xA;&#xD;&#xA;Does anyone know why this might happen and is that related to some flaw in benchmarking or some cache related side-effect?&#xD;&#xA;&#xD;&#xA;Notes:&#xD;&#xA;- I've printed out these worst cases and they are different keys on every run but the worst case seems to still be around the same number." ContentLicense="CC BY-SA 4.0" />
  <row Id="16374" PostHistoryTypeId="5" PostId="4265" RevisionGUID="cb3e942a-5dee-4e43-841e-9d0ca61ad6a6" CreationDate="2022-08-20T04:28:21.853" UserId="309" Comment="edited body" Text="Is there a way to configure the destination account when using  the Slashing function from `Trait frame_support::traits::tokens::currency::Currency`?&#xD;&#xA;&#xD;&#xA;Kazu&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;As I'm using the `reserve` function from the `ReservableCurrency` trait, instead of using the slash function of the currency trait, I will use the `repatriate_reserved` function of the `ReservableCurrency` trait." ContentLicense="CC BY-SA 4.0" />
  <row Id="16375" PostHistoryTypeId="5" PostId="4348" RevisionGUID="b1137e1e-2312-424a-a3a9-3f8adc9ad9bb" CreationDate="2022-08-20T06:11:53.043" UserId="2940" Comment="added 2066 characters in body" Text="I have implemented the NPOS with EVM blockchain using the substrate.&#xD;&#xA;&#xD;&#xA;NPOS working fine but after adding EVM to Genesis config in node the NPOS is not working and the staking election failed.&#xD;&#xA;&#xD;&#xA;Smart Contracts working fine on the chain.&#xD;&#xA;&#xD;&#xA;    GenesisConfig {&#xD;&#xA;    		system: SystemConfig {&#xD;&#xA;    			// Add Wasm runtime to storage.&#xD;&#xA;    			code: wasm_binary.to_vec(),&#xD;&#xA;    		},&#xD;&#xA;    		balances: BalancesConfig {&#xD;&#xA;    			// Configure endowed accounts with initial balance of 1 &lt;&lt; 60.&#xD;&#xA;    			balances: endowed_accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect(),&#xD;&#xA;    		},&#xD;&#xA;    		babe: BabeConfig {&#xD;&#xA;    			authorities: vec![],&#xD;&#xA;    			epoch_config: Some(nfid_runtime::BABE_GENESIS_EPOCH_CONFIG),&#xD;&#xA;    		},&#xD;&#xA;    		grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;    		session: SessionConfig {&#xD;&#xA;    			keys: initial_authorities&#xD;&#xA;    				.iter()&#xD;&#xA;    				.map(|x| {&#xD;&#xA;    					(&#xD;&#xA;    						x.0.clone(),&#xD;&#xA;    						x.0.clone(),&#xD;&#xA;    						SessionKeys { babe: x.1.clone(), grandpa: x.2.clone() },&#xD;&#xA;    					)&#xD;&#xA;    				})&#xD;&#xA;    				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;    		},&#xD;&#xA;    		staking: StakingConfig {&#xD;&#xA;    			validator_count: initial_authorities.len() as u32,&#xD;&#xA;    			minimum_validator_count: initial_authorities.len() as u32,&#xD;&#xA;    			invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),&#xD;&#xA;    			slash_reward_fraction: sp_runtime::Perbill::from_percent(10),&#xD;&#xA;    			stakers,&#xD;&#xA;    			..Default::default()&#xD;&#xA;    		},&#xD;&#xA;    		sudo: SudoConfig {&#xD;&#xA;    			// Assign network admin rights.&#xD;&#xA;    			key: Some(root_key),&#xD;&#xA;    		},&#xD;&#xA;    		transaction_payment: Default::default(),&#xD;&#xA;    		evm: Default::default(),&#xD;&#xA;    		ethereum: Default::default(),&#xD;&#xA;    		base_fee: Default::default(),&#xD;&#xA;    		dynamic_fee: Default::default(),&#xD;&#xA;    		node_authorization: NodeAuthorizationConfig {&#xD;&#xA;    			nodes: vec![&#xD;&#xA;    				(&#xD;&#xA;    					OpaquePeerId(&#xD;&#xA;    						bs58::decode(&quot;12D3KooWBmAwcd4PJNJvfV89HwE48nwkRmAgo8Vy3uQEyNNHBox2&quot;)&#xD;&#xA;    							.into_vec()&#xD;&#xA;    							.unwrap(),&#xD;&#xA;    					),&#xD;&#xA;    					endowed_accounts[0].clone(), // Alice&#xD;&#xA;    				),&#xD;&#xA;    				(&#xD;&#xA;    					OpaquePeerId(&#xD;&#xA;    						bs58::decode(&quot;12D3KooWQYV9dGMFoRzNStwpXztXaBUjtPqi6aU76ZgUriHhKust&quot;)&#xD;&#xA;    							.into_vec()&#xD;&#xA;    							.unwrap(),&#xD;&#xA;    					),&#xD;&#xA;    					endowed_accounts[1].clone(), // Bob&#xD;&#xA;    				),&#xD;&#xA;    			],&#xD;&#xA;    		},&#xD;&#xA;    	}" ContentLicense="CC BY-SA 4.0" />
  <row Id="16376" PostHistoryTypeId="2" PostId="4367" RevisionGUID="c516ca14-bf3c-4a41-bcea-cef2995e09f5" CreationDate="2022-08-20T07:31:19.297" UserId="3055" Text="I was following the substrate get started tutorial. In the &quot;Trusted Network - Add trusted nodes&quot;, I was failed to start the first node step.&#xD;&#xA;&#xD;&#xA;(I was using the virtual machine and the os is Kali Linux)&#xD;&#xA;&#xD;&#xA;I just copied and ran the below code from the tutorial.&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/node01 \&#xD;&#xA;    --chain ./customSpecRaw.json \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9945 \&#xD;&#xA;    --rpc-port 9933 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator \&#xD;&#xA;    --rpc-methods Unsafe \&#xD;&#xA;    --name MyNode01 \&#xD;&#xA;    --password-interactive&#xD;&#xA;&#xD;&#xA;However, it keeps showing the error line and cannot generate blocks. &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am sure that I have inserted the keystore as below.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/IMvK3.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/NPQOR.png&#xD;&#xA;&#xD;&#xA;Also, I tried to skip this error and keep following the tutorial. When I used the second virtual machine (also Kali) to connect this node, it also failed. It also showed the same error line and cannot generate blocks. Besides, the peer value also without showing right." ContentLicense="CC BY-SA 4.0" />
  <row Id="16378" PostHistoryTypeId="1" PostId="4367" RevisionGUID="c516ca14-bf3c-4a41-bcea-cef2995e09f5" CreationDate="2022-08-20T07:31:19.297" UserId="3055" Text="Error on Launching the First Node Following the Tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="16379" PostHistoryTypeId="3" PostId="4367" RevisionGUID="c516ca14-bf3c-4a41-bcea-cef2995e09f5" CreationDate="2022-08-20T07:31:19.297" UserId="3055" Text="|substrate-node|substrate-node-template|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16380" PostHistoryTypeId="2" PostId="4368" RevisionGUID="5b7c836d-2c38-416e-8b1a-12ec072c0475" CreationDate="2022-08-20T09:44:15.840" UserId="2935" Text="The answer turned out to be pretty simple, the pallet storage is prefixed according to how it's defined in `construct_runtime!`. &#xD;&#xA;&#xD;&#xA;So in order to migrate from&#xD;&#xA;```&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = node_primitives::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		Utility: pallet_utility,&#xD;&#xA;		Uniques: pallet_uniques,&#xD;&#xA;		TransactionStorage: pallet_transaction_storage,&#xD;&#xA;		BagsList: pallet_bags_list,&#xD;&#xA;        ....&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;to&#xD;&#xA;```&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = node_primitives::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		Utility: pallet_utility,&#xD;&#xA;		Uniques: pallet_uniques,&#xD;&#xA;		TransactionStorage: pallet_transaction_storage,&#xD;&#xA;		VoterBagsList: pallet_bags_list::&lt;Instance1&gt;,&#xD;&#xA;        ....&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;We simply need to use [this][1] function. A full example would look like this:&#xD;&#xA;```&#xD;&#xA;	pub fn migrate&lt;T: Config, P: GetStorageVersion + PalletInfoAccess, N: AsRef&lt;str&gt;&gt;(&#xD;&#xA;		old_pallet_name: N,&#xD;&#xA;	) -&gt; Weight {&#xD;&#xA;		let old_pallet_name = old_pallet_name.as_ref();&#xD;&#xA;		let new_pallet_name = &lt;P as PalletInfoAccess&gt;::name();&#xD;&#xA;&#xD;&#xA;		if new_pallet_name == old_pallet_name {&#xD;&#xA;			log!(warn, &quot;new bags-list name is equal to the old one, no need to migrate&quot;);&#xD;&#xA;			return 0&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		if StorageVersion::&lt;T&gt;::get() == Releases::V10_0_0 {&#xD;&#xA;			move_pallet(old_pallet_name.as_bytes(), new_pallet_name.as_bytes());&#xD;&#xA;			StorageVersion::&lt;T&gt;::put(Releases::V11_0_0);&#xD;&#xA;			&lt;T as frame_system::Config&gt;::BlockWeights::get().max_block&#xD;&#xA;		} else {&#xD;&#xA;			log!(warn, &quot;v11::migrate should be removed.&quot;);&#xD;&#xA;			T::DbWeight::get().reads(1)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;Where `old_pallet_name` would be `BagsList`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/c8653447fc8ef8d95a92fe164c96dffb37919e85/frame/support/src/storage/migration.rs#L363" ContentLicense="CC BY-SA 4.0" />
  <row Id="16382" PostHistoryTypeId="50" PostId="3826" RevisionGUID="bca95bac-28db-450a-a80a-49a1690046e3" CreationDate="2022-08-20T10:07:40.777" UserId="-1" />
  <row Id="16388" PostHistoryTypeId="2" PostId="4370" RevisionGUID="a97abbe8-f454-4c38-8e8f-f6e006ffb6b9" CreationDate="2022-08-21T06:23:13.890" UserId="3061" Text="To start off, when using polkadot.js the current time can be retrieved via:&#xD;&#xA;```typescript&#xD;&#xA;api.query.timestamp.now()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Under the hood, this uses the `state` collection of RPC methods (`state_getStorage`, `state_subscribeStorage`, etc).&#xD;&#xA;&#xD;&#xA;These methods take two parameters, a `storage key` and a `blockhash`.&#xD;&#xA;&#xD;&#xA;The `storage key` is [the encoded format](https://www.shawntabrizi.com/substrate/transparent-keys-in-substrate/) of the key for the storage you want to query.&#xD;&#xA;&#xD;&#xA;The block hash is optional, and if omitted the query will default to the current block.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;So first we need to fetch the `blockhash` of the block you want to query, i.e. `the previous block`:&#xD;&#xA;```typescript&#xD;&#xA;// get the latest block number&#xD;&#xA;const blockNumber = await api.query.system.number()&#xD;&#xA;&#xD;&#xA;// determine the previous block number&#xD;&#xA;const previousBlockNumber = blockNumber.subn(1)&#xD;&#xA;&#xD;&#xA;// fetch the previous block hash&#xD;&#xA;const previousBlockHash = await api.query.system.blockHash(previousBlockNumber)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then we need to pass this `blockhash` to the `timestamp.now` query:&#xD;&#xA;```typescript&#xD;&#xA;api.query.timestamp.now.at(previousBlockHash)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16390" PostHistoryTypeId="2" PostId="4371" RevisionGUID="823dabd5-2b3b-4f56-b78f-08734116c982" CreationDate="2022-08-21T07:32:33.807" UserId="2484" Text="Is there any best practice how to count the weights in `on_initialize` correctly?&#xD;&#xA;&#xD;&#xA;I read through the Polkadot and Substrate `on_initialize` weight calculations and couldn't always figure out: When to benchmark? When to use benchmark components? When to use manual read and write additions?&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Just an example [here](https://github.com/paritytech/polkadot/blob/f000f3a992a1f0ae043feeb27b50751d4d124930/runtime/common/src/slots/mod.rs#L229-L304). There the length of `Leases` was not taken into account of the weight benchmark.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In regards to benchmark components: Why does the component `MaxApprovals` affect the weight [here](https://github.com/paritytech/substrate/blob/28f0cb18c96fb82f810f1d9be69fb609fbb7217e/frame/treasury/src/lib.rs#L388-L409)?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Why do we return 0 weight [here](https://github.com/paritytech/substrate/blob/28f0cb18c96fb82f810f1d9be69fb609fbb7217e/frame/treasury/src/lib.rs#L317-L324), when there was at least the calculation of `(n % T::SpendPeriod::get()).is_zero()` (which also should consume a little bit processing time)?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[This](https://github.com/paritytech/substrate/blob/28f0cb18c96fb82f810f1d9be69fb609fbb7217e/frame/treasury/src/lib.rs#L511-L544) is a pretty good example, that the length of `Approvals` affect the weight and should be a component.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[Here](https://github.com/paritytech/substrate/blob/96596bcaac7d1fd60cf0e4f066ebf8ba3b810d84/frame/aura/src/lib.rs#L89-L112) only `T::DbWeight::get().` is used. But isn't there some processing time for the `assert` call? Why wasn't benchmarking taken into account there? When using this style. Why couldn't I just use `T::DbWeight::get().reads_writes(proposals_approvals_len, proposals_approvals_len)` [here](https://github.com/paritytech/substrate/blob/28f0cb18c96fb82f810f1d9be69fb609fbb7217e/frame/treasury/src/lib.rs#L511-L542)?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I count the following `reads_writes` in `on_initialize` and `on_finalize` [here](https://github.com/paritytech/substrate/blob/a1a9b475c354d873f91135ed5fa028ac9ef6a2c4/frame/transaction-storage/src/lib.rs#L149-L180):&#xD;&#xA;&#xD;&#xA;READS:&#xD;&#xA;`StoragePeriod`, `ChunkCount`, `ProofChecked` ([take](https://crates.parity.io/frame_support/storage/types/struct.StorageValue.html#method.take)), `BlockTransactions`&#xD;&#xA;&#xD;&#xA;WRITES:&#xD;&#xA;`Transactions`, `ChunkCount`, `ProofChecked` ([take](https://crates.parity.io/frame_support/storage/types/struct.StorageValue.html#method.take)), `BlockTransactions`&#xD;&#xA;&#xD;&#xA;But it is `T::DbWeight::get().reads_writes(2, 4)`, why?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I would expect `T::DbWeight::get().writes(1)` [here](https://github.com/paritytech/polkadot/blob/f000f3a992a1f0ae043feeb27b50751d4d124930/xcm/pallet-xcm/src/lib.rs#L412). Why it only takes the weight of `check_xcm_version_change` into the overall weight?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Can you provide any best practices how to correctly count the weights of `on_initialize`?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16392" PostHistoryTypeId="1" PostId="4371" RevisionGUID="823dabd5-2b3b-4f56-b78f-08734116c982" CreationDate="2022-08-21T07:32:33.807" UserId="2484" Text="How to weight `on_initialize`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16393" PostHistoryTypeId="3" PostId="4371" RevisionGUID="823dabd5-2b3b-4f56-b78f-08734116c982" CreationDate="2022-08-21T07:32:33.807" UserId="2484" Text="|storage|benchmarking|weight|benchmark|rocks-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16394" PostHistoryTypeId="2" PostId="4372" RevisionGUID="aed01622-8ebe-42a2-93f0-b8a23484013f" CreationDate="2022-08-21T09:50:38.140" UserId="309" Text="I am trying to do benchmarking for my pallet,but I get the following error:&#xD;&#xA;&#xD;&#xA;     Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;    WASM backtrace:&#xD;&#xA;    &#xD;&#xA;        0: 0x1a301b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;        1: 0x30a5 - &lt;unknown&gt;!core::panicking::panic_fmt::h6a131cbcc658ec37&#xD;&#xA;        2: 0x361a - &lt;unknown&gt;!core::panicking::assert_failed_inner::h86b3069f7ca9f7fb&#xD;&#xA;        3: 0x87700 - &lt;unknown&gt;!core::panicking::assert_failed::h6b8055eba7e8280d&#xD;&#xA;        4: 0xd528b - &lt;unknown&gt;!core::ops::function::FnOnce::call_once{{vtable.shim}}::h929d29dd14df6479&#xD;&#xA;        5: 0x185359 - &lt;unknown&gt;!pallet_nft::benchmarking::&lt;impl frame_benchmarking::utils::Benchmarking for pallet_nft::pallet::Pallet&lt;T&gt;&gt;::run_benchmark::h62db5691578e2bd7&#xD;&#xA;        6: 0xe4eba - &lt;unknown&gt;!&lt;fs_node_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_Benchmark::Benchmark&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,fs_node_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_spec_version::CheckSpecVersion&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;fs_node_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;fs_node_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::dispatch_benchmark::h1ae5618b1e790929&#xD;&#xA;        7: 0x149bd5 - &lt;unknown&gt;!Benchmark_dispatch_benchmark&#xD;&#xA;&#xD;&#xA;Any Idea on how to interpret this error, or even better: solve it?&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="16396" PostHistoryTypeId="1" PostId="4372" RevisionGUID="aed01622-8ebe-42a2-93f0-b8a23484013f" CreationDate="2022-08-21T09:50:38.140" UserId="309" Text="Benchmarking Wasm error" ContentLicense="CC BY-SA 4.0" />
  <row Id="16397" PostHistoryTypeId="3" PostId="4372" RevisionGUID="aed01622-8ebe-42a2-93f0-b8a23484013f" CreationDate="2022-08-21T09:50:38.140" UserId="309" Text="|benchmarking|wasm|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16398" PostHistoryTypeId="2" PostId="4373" RevisionGUID="9b4b87c1-7690-4c87-a7a2-563d5a6b1829" CreationDate="2022-08-21T12:29:56.427" UserId="94" Text="Assuming that the math is correct; this shows you that there are less than one percent of very large outliers.  &#xD;&#xA;Polkadot shows similar behaviour with 310x worst case compared to the 99th percentile for RocksDB and 682x for ParityDB.  &#xD;&#xA;Are you using a NVMe SSD? With HDDs you will get worse results.  &#xD;&#xA;Your std deviation is also quite large, as comparison RocksDB Polkadot:  &#xD;&#xA;```rust&#xD;&#xA;/// Time to write one storage item.&#xD;&#xA;/// Calculated by multiplying the *Average* of all values with `1.1` and adding `0`.&#xD;&#xA;///&#xD;&#xA;/// Stats [NS]:&#xD;&#xA;///   Min, Max: 16_368, 34_500_937&#xD;&#xA;///   Average:  75_882&#xD;&#xA;///   Median:   74_236&#xD;&#xA;///   Std-Dev:  64706.41&#xD;&#xA;///&#xD;&#xA;/// Percentiles [NS]:&#xD;&#xA;///   99th: 111_151&#xD;&#xA;///   95th: 92_666&#xD;&#xA;///   75th: 80_297&#xD;&#xA;write: 83_471 * constants::WEIGHT_PER_NANOS,&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16401" PostHistoryTypeId="2" PostId="4374" RevisionGUID="1fe77de6-c5fd-4015-93cc-c2c4e2b74ac0" CreationDate="2022-08-21T16:05:06.450" UserId="85" Text="I'd make sure you're using a nightly from at least 2021-09-1. It's probably just that you're using an earlier compiler that was not as clever. In general using a nightly from near the tag is likely to be a good call." ContentLicense="CC BY-SA 4.0" />
  <row Id="16403" PostHistoryTypeId="2" PostId="4375" RevisionGUID="3cb6f383-599d-421e-9572-8cc28167ce42" CreationDate="2022-08-21T17:15:24.980" UserId="298" Text="We are uploading balances to a parachain. And there are some errors, so we would like to overwrite all ~20k balances. Is setBalance safe enough to overwrite, or is there a cleaner way such as reaping all the balances in question, and then setBalance thereafter? &#xD;&#xA;&#xD;&#xA;Secondly, does setBalance to zero remove the leaves from the trie, or does 0.000 remain in the trie?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16405" PostHistoryTypeId="1" PostId="4375" RevisionGUID="3cb6f383-599d-421e-9572-8cc28167ce42" CreationDate="2022-08-21T17:15:24.980" UserId="298" Text="Does setBalance always overwrite?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16406" PostHistoryTypeId="3" PostId="4375" RevisionGUID="3cb6f383-599d-421e-9572-8cc28167ce42" CreationDate="2022-08-21T17:15:24.980" UserId="298" Text="|substrate-node|parachain|storage|kusama|kabocha|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16407" PostHistoryTypeId="2" PostId="4376" RevisionGUID="e611d725-7ea3-4e91-ae53-fafaaaad8120" CreationDate="2022-08-21T18:50:52.737" UserId="560" Text="Hello everyone,    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm trying to spin up a test chain(with imported real chain data) with alice(so I can start it from genesis and start producing blocks with --alice flag) and after dumping the state of the current chain:&#xD;&#xA;```shell&#xD;&#xA;$ ./target/release/edgeware export-state --base-path /tmp/edgewaretest/ --chain edgeware &gt; edg_export.json&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;I then change the sudo key to Alice and validator key to Alice. Based on these scripts:&#xD;&#xA;https://github.com/Phala-Network/phala-blockchain/blob/master/scripts/js/src/bin/chainSpecUtils.js#L92&#xD;&#xA;https://github.com/zeitgeistpm/zeitgeist/blob/a9ff9693dbfeb9527ee3b3ddb5a9873940fedc1f/scripts/runtime-upgrade/test_runtime_upgrade.sh#L30&#xD;&#xA;&#xD;&#xA;Plus I removed the bootnodes but the chain will still not produce blocks:&#xD;&#xA;```&#xD;&#xA;# ./target/release/edgeware --chain=edg_state.json  --base-path=/tmp/edg_exported_state --alice --validator   &#xD;&#xA;2022-08-21 20:29:11 Edgeware Node&#xD;&#xA;2022-08-21 20:29:17  Idle (0 peers), best: #0 (0x2192…24e0), finalized #0 (0&#xD;&#xA;x2192…24e0), ⬇ 0.7kiB/s ⬆ 0.7kiB/s&#xD;&#xA;2022-08-21 20:29:22  Idle (0 peers), best: #0 (0x2192…24e0), finalized #0 (0&#xD;&#xA;x2192…24e0), ⬇ 0.1kiB/s ⬆ 0&#xD;&#xA;2022-08-21 20:29:27  Idle (0 peers), best: #0 (0x2192…24e0), finalized #0 (0&#xD;&#xA;x2192…24e0), ⬇ 0.1kiB/s ⬆ 0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I based this solution on the 3rd solution that was given here:&#xD;&#xA;https://substrate.stackexchange.com/a/439/560&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Chain used:&#xD;&#xA;https://github.com/edgeware-network/edgeware-node/tree/erup-5-latest&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What am I doing wrong? And what is the correct way to change validator and sudo key to alice?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="16409" PostHistoryTypeId="1" PostId="4376" RevisionGUID="e611d725-7ea3-4e91-ae53-fafaaaad8120" CreationDate="2022-08-21T18:50:52.737" UserId="560" Text="Export state of a running chain and run it as alice" ContentLicense="CC BY-SA 4.0" />
  <row Id="16410" PostHistoryTypeId="3" PostId="4376" RevisionGUID="e611d725-7ea3-4e91-ae53-fafaaaad8120" CreationDate="2022-08-21T18:50:52.737" UserId="560" Text="|runtime-upgrade|migration|database|on-runtime-upgrade|state|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16411" PostHistoryTypeId="2" PostId="4377" RevisionGUID="5d12b486-4b6b-481f-bcc9-2d117a7c8d93" CreationDate="2022-08-21T20:07:48.513" UserId="3064" Text="I came up with a slightly different solution which filter's out nominators for a specific set of validator. I hope this helps someone out!&#xD;&#xA;&#xD;&#xA;Note:&#xD;&#xA;I wasn't able to parse the API's return value for &#xD;&#xA;&#xD;&#xA;    const nominators = await api.query.staking.nominators.entries();&#xD;&#xA;&#xD;&#xA;so I wrote to json and parsed that instead as a temporary solution.&#xD;&#xA;&#xD;&#xA;There is still a lot of parsing to do; if anybody comes up with a better solution please post it.&#xD;&#xA;&#xD;&#xA;Here's my code:&#xD;&#xA;&#xD;&#xA;    /**&#xD;&#xA;     * Extracts all staking data for nominators which support the target_validaotrs.&#xD;&#xA;     * @param {ApiPromise} api the active polkadot.js api connection&#xD;&#xA;     * @param {Collection} target_validators validators whose nominators will be filtered&#xD;&#xA;     * @param {boolean} dump_json if true, write intermediate data to json and log filter message &#xD;&#xA;     * @returns a collection of staking data for each nominator supporting a target validator&#xD;&#xA;     */&#xD;&#xA;    async function getNominatorStaking(api, target_validators, dump_json=false) {&#xD;&#xA;        const nominators = await api.query.staking.nominators.entries();&#xD;&#xA;    &#xD;&#xA;        // Write nominator data to json for parsing later&#xD;&#xA;        let nominatorData = nominators.map(entry =&gt; [entry[0].toHuman()[0], entry[1]]);&#xD;&#xA;        nominatorData = JSON.stringify(nominatorData, null, 2);&#xD;&#xA;        fs.writeFileSync('intermediaries/nominators.json', nominatorData);&#xD;&#xA;    &#xD;&#xA;        // Todo: This section could be imporved by figuring out how to parse the nominators variable instead of json&#xD;&#xA;        // Filter nominators for those that support target validators&#xD;&#xA;        const jsonData = require('./intermediaries/nominators.json'); // using json because nominators does not parse well&#xD;&#xA;        const filteredNominators = jsonData.filter(&#xD;&#xA;            n =&gt; containsTargets(n[1][&quot;targets&quot;], target_validators)&#xD;&#xA;        );&#xD;&#xA;        &#xD;&#xA;        filteredNominatorAddresses = filteredNominators.map(entry =&gt; entry[0]);&#xD;&#xA;        &#xD;&#xA;        // Create chunks so as not to overload api&#xD;&#xA;        let apiChunkSize = 64;&#xD;&#xA;        const size = apiChunkSize;&#xD;&#xA;        var nominatorAddressesChuncked = [];&#xD;&#xA;        for (let i = 0; i &lt; filteredNominatorAddresses.length; i += size) {&#xD;&#xA;            const chunk = filteredNominatorAddresses.slice(i, i + size);&#xD;&#xA;            nominatorAddressesChuncked.push(chunk);&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        // Fetch staking data for filtered nominators&#xD;&#xA;        const nominatorStakings = [];&#xD;&#xA;        for (const chunk of tdqm(nominatorAddressesChuncked)) {&#xD;&#xA;            nominatorStakings.push(...await api.derive.staking.accounts(chunk));&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        if (dump_json) {&#xD;&#xA;            console.log(&#xD;&#xA;                filteredNominators.length + &#xD;&#xA;                &quot; addresses filtered out of &quot; + &#xD;&#xA;                jsonData.length + &quot;: &quot; + &#xD;&#xA;                Math.floor(filteredNominators.length/jsonData.length*100) + &#xD;&#xA;                &quot;%&quot;&#xD;&#xA;            );&#xD;&#xA;    &#xD;&#xA;            let data = JSON.stringify(filteredNominators, null, 2);&#xD;&#xA;            fs.writeFileSync('intermediaries/filtered_nominators.json', data);&#xD;&#xA;    &#xD;&#xA;            data = JSON.stringify(nominatorStakings, null, 2);&#xD;&#xA;            fs.writeFileSync('intermediaries/filtered_nominator_stakings.json', data);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        return nominatorStakings;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16413" PostHistoryTypeId="2" PostId="4378" RevisionGUID="f8f03929-99a3-47fb-8cac-0eab6ee52016" CreationDate="2022-08-21T21:00:36.687" UserId="3064" Text="I have tried using api/packages/api-derive/src/staking/erasRewards.ts, but I do not understand what titrates the number of eras being shown. Also, whose rewards am I looking at? All rewards in that given era? &#xD;&#xA;&#xD;&#xA;Here's my code snippet:&#xD;&#xA;&#xD;&#xA;    const data = await api.derive.staking.erasRewards(); &#xD;&#xA;    console.log(data.map(n =&gt; n['era'].toHuman() + &quot;: &quot; + n['eraReward'].toHuman()));&#xD;&#xA;out:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;      '727: 2,551,955,748,462,398',&#xD;&#xA;      '728: 2,563,279,047,583,848',&#xD;&#xA;      '729: 2,563,370,718,401,581',&#xD;&#xA;      '730: 2,566,416,999,724,756',&#xD;&#xA;      '731: 2,579,735,528,770,578',&#xD;&#xA;      '732: 2,580,391,954,273,350',&#xD;&#xA;      '733: 2,574,770,240,650,025',&#xD;&#xA;      '734: 2,574,423,145,452,759',&#xD;&#xA;      '735: 2,572,961,896,036,511',&#xD;&#xA;      '736: 2,572,752,562,942,962',&#xD;&#xA;      '737: 2,575,640,277,891,519',&#xD;&#xA;      '738: 2,575,174,055,033,005',&#xD;&#xA;      '739: 2,572,164,587,614,876',&#xD;&#xA;      '740: 2,574,636,183,355,342',&#xD;&#xA;      '741: 2,575,348,329,001,013',&#xD;&#xA;      '742: 2,556,461,500,268,646',&#xD;&#xA;      '743: 2,556,729,480,475,956',&#xD;&#xA;      '744: 2,557,482,295,343,475',&#xD;&#xA;      '745: 2,533,870,094,301,476',&#xD;&#xA;      '746: 2,527,530,013,839,401',&#xD;&#xA;      '747: 2,527,804,229,223,442',&#xD;&#xA;      '748: 2,528,033,816,896,959',&#xD;&#xA;      '749: 2,533,785,921,746,221',&#xD;&#xA;      '750: 2,534,274,185,050,776',&#xD;&#xA;      '751: 2,538,036,804,329,962',&#xD;&#xA;      '752: 2,537,897,849,156,071',&#xD;&#xA;      '753: 2,537,564,847,212,898',&#xD;&#xA;      '754: 2,538,531,966,424,070',&#xD;&#xA;      '755: 2,539,108,793,068,694',&#xD;&#xA;      '756: 2,540,608,123,105,699',&#xD;&#xA;      '757: 2,540,897,813,019,624',&#xD;&#xA;      '758: 2,540,220,548,628,705',&#xD;&#xA;      '759: 2,540,499,187,276,898',&#xD;&#xA;      '760: 2,535,471,076,137,138',&#xD;&#xA;      '761: 2,537,161,861,178,588',&#xD;&#xA;      '762: 2,537,712,672,567,210',&#xD;&#xA;      '763: 2,538,354,552,093,822',&#xD;&#xA;      '764: 2,539,370,254,053,080',&#xD;&#xA;      '765: 2,539,498,967,691,432',&#xD;&#xA;      '766: 2,537,985,738,070,300',&#xD;&#xA;      '767: 2,539,672,793,438,627',&#xD;&#xA;      '768: 2,547,647,218,090,372',&#xD;&#xA;      '769: 2,548,407,690,287,302',&#xD;&#xA;      '770: 2,549,213,979,480,129',&#xD;&#xA;      '771: 2,541,633,869,358,439',&#xD;&#xA;      '772: 2,547,817,357,135,217',&#xD;&#xA;      '773: 2,547,432,369,360,853',&#xD;&#xA;      '774: 2,547,718,144,532,895',&#xD;&#xA;      '775: 2,549,267,291,525,198',&#xD;&#xA;      '776: 2,550,814,915,082,432',&#xD;&#xA;      '777: 2,551,440,540,362,707',&#xD;&#xA;      '778: 2,553,256,619,503,668',&#xD;&#xA;      '779: 2,552,954,215,201,388',&#xD;&#xA;      '780: 2,553,460,158,045,053',&#xD;&#xA;      '781: 2,556,438,206,416,740',&#xD;&#xA;      '782: 2,558,118,980,257,812',&#xD;&#xA;      '783: 2,559,147,608,644,081',&#xD;&#xA;      '784: 2,560,633,251,102,886',&#xD;&#xA;      '785: 2,562,597,178,237,471',&#xD;&#xA;      '786: 2,562,751,449,521,687',&#xD;&#xA;      '787: 2,566,234,007,347,650',&#xD;&#xA;      '788: 2,565,712,211,377,681',&#xD;&#xA;      '789: 2,566,815,672,241,032',&#xD;&#xA;      '790: 2,567,044,191,299,448',&#xD;&#xA;      '791: 2,567,605,353,041,866',&#xD;&#xA;      '792: 2,568,789,496,998,416',&#xD;&#xA;      '793: 2,567,509,775,385,522',&#xD;&#xA;      '794: 2,569,839,818,841,921',&#xD;&#xA;      '795: 2,569,981,058,027,446',&#xD;&#xA;      '796: 2,566,746,092,399,327',&#xD;&#xA;      '797: 2,566,853,946,849,154',&#xD;&#xA;      '798: 2,567,661,511,732,652',&#xD;&#xA;      '799: 2,567,730,503,536,287',&#xD;&#xA;      '800: 2,572,088,096,172,078',&#xD;&#xA;      '801: 2,570,797,107,149,885',&#xD;&#xA;      '802: 2,572,428,261,633,356',&#xD;&#xA;      '803: 2,576,551,669,974,451',&#xD;&#xA;      '804: 2,577,565,186,348,720',&#xD;&#xA;      '805: 2,578,034,696,990,158',&#xD;&#xA;      '806: 2,578,387,595,911,190',&#xD;&#xA;      '807: 2,578,369,699,479,845',&#xD;&#xA;      '808: 2,578,868,063,338,523',&#xD;&#xA;      '809: 2,579,517,724,773,635',&#xD;&#xA;      '810: 2,574,743,424,098,730'&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;I also tried using api/packages/api-derive/src/staking/stakerRewards.ts, but I kept getting an empty array output.&#xD;&#xA;&#xD;&#xA;Code:&#xD;&#xA;&#xD;&#xA;    const data = await api.derive.staking.stakerRewards('11uMPbeaEDJhUxzU4ZfWW9VQEsryP9XqFcNRfPdYda6aFWJ');&#xD;&#xA;    console.log(data)&#xD;&#xA;Out:&#xD;&#xA;&#xD;&#xA;    []&#xD;&#xA;&#xD;&#xA;How do I fetch all the rewards paid to a specific account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16415" PostHistoryTypeId="1" PostId="4378" RevisionGUID="f8f03929-99a3-47fb-8cac-0eab6ee52016" CreationDate="2022-08-21T21:00:36.687" UserId="3064" Text="Polkadot.js: How do I fetch all rewards paid to a specific nominator that resulted from a specific validator?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16416" PostHistoryTypeId="3" PostId="4378" RevisionGUID="f8f03929-99a3-47fb-8cac-0eab6ee52016" CreationDate="2022-08-21T21:00:36.687" UserId="3064" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16417" PostHistoryTypeId="2" PostId="4379" RevisionGUID="62916e81-2bf9-4c78-a05d-9a968109104b" CreationDate="2022-08-22T05:57:33.070" UserId="227" Text="Testing cross-contract calls is the biggest missing piece in ink! 3.0 right now.&#xD;&#xA;&#xD;&#xA;There are ways to do it currently, but none of them is ideal. The concept of using feature flags you used works, but it's complex and test logic ends up being mixed in with the actual contract. Another option is to use [redspot](https://github.com/paritytech/ink/issues/788#issuecomment-865567259), though I haven't tried this myself.&#xD;&#xA;&#xD;&#xA;In the foreseeable future (1-2 months) we will introduce a proper solution with ink! 4.0:&#xD;&#xA;* The off-chain testing engine will be extended to support cross-contract unit testing. There is already [a PR](https://github.com/paritytech/ink/pull/1358) for it.&#xD;&#xA;* We're introducing a new attribute `#[ink::e2e_test]` that will interact with a real node process in the background and expose an API to interact with it (for deploying and calling contracts). Then you can test cross-contract calls in the real on-chain environment. There is [this ticket](https://github.com/paritytech/ink/issues/1234) for it and we're actively working on it." ContentLicense="CC BY-SA 4.0" />
  <row Id="16419" PostHistoryTypeId="2" PostId="4380" RevisionGUID="bf455994-4fa6-4250-970d-c570a357c380" CreationDate="2022-08-22T06:04:34.410" UserId="227" Text="There is a crate `eip_712` ([docs.rs](https://docs.rs/eip-712/latest/eip_712/), [crates.io](https://crates.io/crates/eip-712)). It hasn't been updated for quite some time though." ContentLicense="CC BY-SA 4.0" />
  <row Id="16421" PostHistoryTypeId="5" PostId="4379" RevisionGUID="f766bf81-1e8d-4d88-93e9-d899d0853f53" CreationDate="2022-08-22T06:53:57.337" UserId="227" Comment="added 25 characters in body" Text="Testing cross-contract calls is the biggest missing piece for developer experience in ink! 3.0 right now.&#xD;&#xA;&#xD;&#xA;There are ways to do it currently, but none of them is ideal. The concept of using feature flags you used works, but it's complex and test logic ends up being mixed in with the actual contract. Another option is to use [redspot](https://github.com/paritytech/ink/issues/788#issuecomment-865567259), though I haven't tried this myself.&#xD;&#xA;&#xD;&#xA;In the foreseeable future (1-2 months) we will introduce a proper solution with ink! 4.0:&#xD;&#xA;* The off-chain testing engine will be extended to support cross-contract unit testing. There is already [a PR](https://github.com/paritytech/ink/pull/1358) for it.&#xD;&#xA;* We're introducing a new attribute `#[ink::e2e_test]` that will interact with a real node process in the background and expose an API to interact with it (for deploying and calling contracts). Then you can test cross-contract calls in the real on-chain environment. There is [this ticket](https://github.com/paritytech/ink/issues/1234) for it and we're actively working on it." ContentLicense="CC BY-SA 4.0" />
  <row Id="16422" PostHistoryTypeId="2" PostId="4381" RevisionGUID="1ed84b66-59de-44e6-bd99-ebece299436e" CreationDate="2022-08-22T07:08:03.933" UserId="3009" Text="I want to use hooks for some  business  logic,but I am not very familiar  with the usage of on_initialize 、on_finialize and offchain_worker.Can all of them modify the on chain storage? If yes , what is the order?&#xD;&#xA;&#xD;&#xA;I guess so&#xD;&#xA;1.a node import a block&#xD;&#xA;2.execute offchain_worker&#xD;&#xA;3.execute on_initialize&#xD;&#xA;4.execute all the extrinsics in the block&#xD;&#xA;5.execute on_finialize&#xD;&#xA;&#xD;&#xA;Am I right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16424" PostHistoryTypeId="1" PostId="4381" RevisionGUID="1ed84b66-59de-44e6-bd99-ebece299436e" CreationDate="2022-08-22T07:08:03.933" UserId="3009" Text="How to comprehen the hooks of substrate?Such as on_initialize 、on_finialize、offchain_worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="16425" PostHistoryTypeId="3" PostId="4381" RevisionGUID="1ed84b66-59de-44e6-bd99-ebece299436e" CreationDate="2022-08-22T07:08:03.933" UserId="3009" Text="|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16426" PostHistoryTypeId="5" PostId="4381" RevisionGUID="09d250f6-7124-4fb6-a7bb-2db158e130e0" CreationDate="2022-08-22T07:22:22.020" UserId="3009" Comment="added 16 characters in body" Text="&#xD;&#xA;I want to use hooks for some  business  logic,but I am not very familiar  with the usage of on_initialize 、on_finialize and offchain_worker.Can all of them modify the on chain storage? If yes , what is the order?&#xD;&#xA;&#xD;&#xA;I guess so&#xD;&#xA;&#xD;&#xA; 1. a node import a block&#xD;&#xA; 2. execute offchain_worker&#xD;&#xA; 3. execute on_initialize&#xD;&#xA; 4. execute all the extrinsics in the block&#xD;&#xA; 5. execute on_finialize&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Am I right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16427" PostHistoryTypeId="2" PostId="4382" RevisionGUID="e4df5310-2026-4fc3-abd2-df6538d30f34" CreationDate="2022-08-22T07:25:27.347" UserId="2163" Text="I want to rerun a test inside `frame-support` and overwrite the `.stderr` file with the actual error. The CI checks give me the instruction to rerun the test with the environment variable `TRYBUILD=overwrite`, but how do I do that? I tried to set the env variable in the `Cargo.toml` file like: &#xD;&#xA;```rust&#xD;&#xA;[env]&#xD;&#xA;TRYBUILD = &quot;overwrite&quot;&#xD;&#xA;```&#xD;&#xA;but this doesn't work." ContentLicense="CC BY-SA 4.0" />
  <row Id="16429" PostHistoryTypeId="1" PostId="4382" RevisionGUID="e4df5310-2026-4fc3-abd2-df6538d30f34" CreationDate="2022-08-22T07:25:27.347" UserId="2163" Text="How to rerun test with TRYBUILD=overwrite?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16430" PostHistoryTypeId="3" PostId="4382" RevisionGUID="e4df5310-2026-4fc3-abd2-df6538d30f34" CreationDate="2022-08-22T07:25:27.347" UserId="2163" Text="|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16431" PostHistoryTypeId="2" PostId="4383" RevisionGUID="9cce25d5-94d6-49fb-88cc-3c973b1ea7a7" CreationDate="2022-08-22T08:05:12.170" UserId="632" Text="I created a custom function in a custom RPC call to send a raw transaction : &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn send_raw_transaction(&amp;self, bytes: Bytes) -&gt; FutureResult&lt;TxHash&lt;P&gt;&gt; {&#xD;&#xA;        let slice = &amp;bytes.0[..];&#xD;&#xA;        if slice.len() == 0 {&#xD;&#xA;            return Box::pin(future::err(internal_err(&quot;transaction data is empty&quot;)));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        let extend = rlp::encode(&amp;slice);&#xD;&#xA;        let block_hash = BlockId::hash(self.client.info().best_hash);&#xD;&#xA;&#xD;&#xA;        let ext = &quot;05000046ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a30&quot;.as_bytes();&#xD;&#xA;        let xt = match Decode::decode(&amp;mut &amp;ext[..]) {&#xD;&#xA;            Ok(xt) =&gt; xt,&#xD;&#xA;            Err(_) =&gt; return Box::pin(future::err(internal_err(&quot;cannot access runtime api&quot;))),&#xD;&#xA;        };&#xD;&#xA;        println!(&quot;extrinsic : {:?}&quot;,ext);&#xD;&#xA;&#xD;&#xA;        return Box::pin(&#xD;&#xA;            self.pool&#xD;&#xA;                .submit_one(&amp;block_hash, TransactionSource::Local, xt)&#xD;&#xA;                .map_err(|err| {&#xD;&#xA;                    internal_err(format!(&quot;submit transaction to pool failed: {:?}&quot;, err))&#xD;&#xA;                }),&#xD;&#xA;        );&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```05000046ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a30```&#xD;&#xA;&#xD;&#xA;This should be a balances.transfer call.&#xD;&#xA;&#xD;&#xA;When I try to call this method I just receive an error : &#xD;&#xA;&#xD;&#xA;*submit transaction to pool failed: RuntimeApi(&quot;Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n    0: 0x113908 - &lt;unknown&gt;!rust_begin_unwind\n&quot;)&#xD;&#xA;RpcError: -32603: submit transaction to pool failed: RuntimeApi(&quot;Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n    0: 0x113908 - &lt;unknown&gt;!rust_begin_unwind\n&quot;)*&#xD;&#xA;&#xD;&#xA;Do you have an idea, where this error come from ? &#xD;&#xA;&#xD;&#xA;thank you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16433" PostHistoryTypeId="1" PostId="4383" RevisionGUID="9cce25d5-94d6-49fb-88cc-3c973b1ea7a7" CreationDate="2022-08-22T08:05:12.170" UserId="632" Text="Substrate call raw transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="16434" PostHistoryTypeId="3" PostId="4383" RevisionGUID="9cce25d5-94d6-49fb-88cc-3c973b1ea7a7" CreationDate="2022-08-22T08:05:12.170" UserId="632" Text="|substrate-node|transactions|rpc|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16435" PostHistoryTypeId="50" PostId="3884" RevisionGUID="ff85b5a1-163e-4f36-8507-1c60e72e9e97" CreationDate="2022-08-22T09:05:30.573" UserId="-1" />
  <row Id="16436" PostHistoryTypeId="2" PostId="4384" RevisionGUID="f5f8a876-9d1a-4b1d-943f-022da2cee902" CreationDate="2022-08-22T10:35:12.263" UserId="94" Text="There is [a script](https://github.com/paritytech/substrate/blob/master/.maintain/update-rust-stable.sh) in the Substrate repo which you can use to update the pallet UI tests.  &#xD;&#xA;You can call it like this:  &#xD;&#xA;```sh&#xD;&#xA;.maintain/update-rust-stable.sh 1.62&#xD;&#xA;```&#xD;&#xA;with the Rust version that you want to use.  &#xD;&#xA;This should set all env variables, thanks to @bkchr." ContentLicense="CC BY-SA 4.0" />
  <row Id="16438" PostHistoryTypeId="2" PostId="4385" RevisionGUID="9f2a75bf-5202-43fb-a9b9-9a7cb6a70df9" CreationDate="2022-08-22T11:40:02.520" UserId="3067" Text="I've been playing around with substrate a lot lately and I was wondering how one would go with implementing optimistic block execution. &#xD;&#xA;&#xD;&#xA;What I mean by this is that transactions are executed *as if* they are valid, but their validity depends on some criteria that is only available to know *after* block propagation. Therefore, if an invalid trasaction is found, nodes would have to revert the world state to the state resulting from the last valid transaction.&#xD;&#xA;&#xD;&#xA;More specifically, I was wondering whether or not this is doable within FRAME." ContentLicense="CC BY-SA 4.0" />
  <row Id="16440" PostHistoryTypeId="1" PostId="4385" RevisionGUID="9f2a75bf-5202-43fb-a9b9-9a7cb6a70df9" CreationDate="2022-08-22T11:40:02.520" UserId="3067" Text="Optimistic block execution and reverting state" ContentLicense="CC BY-SA 4.0" />
  <row Id="16441" PostHistoryTypeId="3" PostId="4385" RevisionGUID="9f2a75bf-5202-43fb-a9b9-9a7cb6a70df9" CreationDate="2022-08-22T11:40:02.520" UserId="3067" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16442" PostHistoryTypeId="2" PostId="4386" RevisionGUID="0d5a963e-27c5-4e0f-a33c-1222796e068d" CreationDate="2022-08-22T13:07:06.423" UserId="73" Text="The order is the following:&#xD;&#xA;&#xD;&#xA;1. A node imports/start building a block:&#xD;&#xA; - `on_initialize` is called for all Pallets in the runtime.&#xD;&#xA; - All extrinsics are executed/applied.&#xD;&#xA; - `on_finalize` is called for all Pallets in the runtime.&#xD;&#xA;&#xD;&#xA;2. Import/Block building is finished:&#xD;&#xA; - `offchain_worker` is called.&#xD;&#xA;&#xD;&#xA;Any changes the offchain worker is doing, can not be seen by the on chain logic. Any change to the on chain state needs to happen inside a block. The offchain worker has its own offchain storage for read + write and can also read the on chain storage. The on chain logic can use the offchain indexing functionality to store special data that is only readable by offchain workers and is not part of the on chain state. " ContentLicense="CC BY-SA 4.0" />
  <row Id="16444" PostHistoryTypeId="5" PostId="4381" RevisionGUID="ceb30690-7ef7-4770-ad03-177fee1daf64" CreationDate="2022-08-22T13:08:36.437" UserId="73" Comment="added 10 characters in body; edited title" Text="&#xD;&#xA;I want to use hooks for some  business  logic,but I am not very familiar  with the usage of `on_initialize`, `on_finialize` and `offchain_worker`.Can all of them modify the on chain storage? If yes, what is the order?&#xD;&#xA;&#xD;&#xA;I guess so&#xD;&#xA;&#xD;&#xA; 1. a node import a block&#xD;&#xA; 2. execute `offchain_worker`&#xD;&#xA; 3. execute `on_initialize`&#xD;&#xA; 4. execute all the extrinsics in the block&#xD;&#xA; 5. execute `on_finalize`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Am I right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16445" PostHistoryTypeId="4" PostId="4381" RevisionGUID="ceb30690-7ef7-4770-ad03-177fee1daf64" CreationDate="2022-08-22T13:08:36.437" UserId="73" Comment="added 10 characters in body; edited title" Text="How to comprehend the hooks of Substrate? Such as `on_initialize`, `on_finialize` and `offchain_worker`" ContentLicense="CC BY-SA 4.0" />
  <row Id="16446" PostHistoryTypeId="2" PostId="4387" RevisionGUID="a3f0a1e4-aee5-4d4a-91a8-99d2df683a2b" CreationDate="2022-08-22T13:39:32.853" UserId="351" Text="Offchain workers modify storage by submitting a txn. And the order of execution is Offchain worker does  not interfere with other txn and they are run on block importation. &#xD;&#xA;&#xD;&#xA;The other hooks run on block formation, So on_initialize is when a block is prepared and initialized and then transactions ( so if offchain worker submitted a txn to the pool the txn will be executed). &#xD;&#xA;&#xD;&#xA;But offchain workers dont follow that order, because it is made to not interfere with the normal txn execution flow. " ContentLicense="CC BY-SA 4.0" />
  <row Id="16448" PostHistoryTypeId="2" PostId="4388" RevisionGUID="6fb4d1d7-d1a7-48eb-ba66-93635e440966" CreationDate="2022-08-22T13:44:08.883" UserId="575" Text="With regards to the naming of the trait,&#xD;&#xA;&#xD;&#xA;the `Trait` name was used for config traits in the older version of substrate. This name has been replaced with `Config`.&#xD;&#xA;&#xD;&#xA;Therefore, instead of using: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_contracts::Trait for Runtime {&#xD;&#xA;//define types here&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;you should use: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;//define types here&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The errors you're getting with regards to the `RentPayment` and `SignedClaimHandicap` types are occurring because these types are non-existent. They aren't declared in the `contracts` pallet's `Config` trait (they may have been there in older versions, but have been removed).&#xD;&#xA;&#xD;&#xA;You should use the up-to-date tutorial [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16450" PostHistoryTypeId="2" PostId="4389" RevisionGUID="f68bff0f-e6fb-4056-b772-6b513b82ccb5" CreationDate="2022-08-22T14:29:22.327" UserId="251" Text="You could look at the [`ValidateUnsigned`](https://paritytech.github.io/substrate/master/frame_support/pallet_prelude/trait.ValidateUnsigned.html).&#xD;&#xA;&#xD;&#xA;This check is at the transaction pool level. Once the verification fails, the transaction will be dropped and won't be broadcast.&#xD;&#xA;&#xD;&#xA;There are a lot of examples in the substrate/frontier repository.&#xD;&#xA;&#xD;&#xA;Here is [one](https://github.com/paritytech/substrate/blob/master/frame/im-online/src/lib.rs#L551)." ContentLicense="CC BY-SA 4.0" />
  <row Id="16452" PostHistoryTypeId="5" PostId="4381" RevisionGUID="381b1be8-5a68-4779-940b-767eff12bf47" CreationDate="2022-08-22T14:49:04.657" UserId="29" Comment="added 1 character in body" Text="&#xD;&#xA;I want to use hooks for some  business  logic,but I am not very familiar  with the usage of `on_initialize`, `on_finialize` and `offchain_worker`. Can all of them modify the on chain storage? If yes, what is the order?&#xD;&#xA;&#xD;&#xA;I guess so&#xD;&#xA;&#xD;&#xA; 1. a node import a block&#xD;&#xA; 2. execute `offchain_worker`&#xD;&#xA; 3. execute `on_initialize`&#xD;&#xA; 4. execute all the extrinsics in the block&#xD;&#xA; 5. execute `on_finalize`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Am I right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16453" PostHistoryTypeId="2" PostId="4390" RevisionGUID="4b8377bd-bfb0-4cbf-abc1-6a4b0cfd78ce" CreationDate="2022-08-22T14:59:57.737" UserId="94" Text="What you are looking at from your first query is the **total** payout of the whole era. It amounts to about 255k DOT.  &#xD;&#xA;&#xD;&#xA;The information of past payouts is stored in events. It is not held in storage permanently as that would only inflate the storage. This information is therefore not available in a standard Polkadot node.&#xD;&#xA;&#xD;&#xA;You either need:&#xD;&#xA;- An archive node, since that stores all past events.&#xD;&#xA;- An indexing service that stores these events and makes them queryable for you.&#xD;&#xA;&#xD;&#xA;In case you have that, the `Staking::Rewarded` event contains the receiver and the amount of each payout.  &#xD;&#xA;A `Staking::PayoutStarted` event before that indicates from which era and validator the rewards are.  &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16455" PostHistoryTypeId="52" PostId="4382" RevisionGUID="a3db1c13-43a2-4fd8-8702-13d041bacefb" CreationDate="2022-08-22T15:25:32.773" />
  <row Id="16456" PostHistoryTypeId="50" PostId="3418" RevisionGUID="c2ef76d9-61ea-417c-94e0-28f84a040041" CreationDate="2022-08-22T17:02:25.213" UserId="-1" />
  <row Id="16457" PostHistoryTypeId="2" PostId="4391" RevisionGUID="e0ef29fe-cfec-48e8-9c5c-6f36349f569f" CreationDate="2022-08-22T18:16:57.347" UserId="3070" Text="Is there documentation on how to interact with an Ink smart contract via ReactJS and polkadot.js or capi? &#xD;&#xA;Using the metadata that is generated from the smart contract.&#xD;&#xA;&#xD;&#xA;thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16459" PostHistoryTypeId="1" PostId="4391" RevisionGUID="e0ef29fe-cfec-48e8-9c5c-6f36349f569f" CreationDate="2022-08-22T18:16:57.347" UserId="3070" Text="Smart Contract UI Docs or Tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="16460" PostHistoryTypeId="3" PostId="4391" RevisionGUID="e0ef29fe-cfec-48e8-9c5c-6f36349f569f" CreationDate="2022-08-22T18:16:57.347" UserId="3070" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16461" PostHistoryTypeId="2" PostId="4392" RevisionGUID="8cd05b44-e664-410b-898d-8180d2c214ac" CreationDate="2022-08-22T18:34:00.537" UserId="29" Text="There is this cool tutorial that shows how to interact using PolkadotJS apps and React!&#xD;&#xA;- https://learn.figment.io/tutorials/build-polkadot-amm-using-ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="16463" PostHistoryTypeId="2" PostId="4393" RevisionGUID="144cb0d6-fac2-4da4-8560-d3a6961abe61" CreationDate="2022-08-22T19:35:43.743" UserId="245" Text="I have `struct` that holds when it's created as `BlockNumber`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Default, Clone, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(BlockTime, MaxContentLength))]&#xD;&#xA;pub struct Listing&lt;BlockNumber, MaxContentLength: Get&lt;u32&gt;&gt; {&#xD;&#xA;	pub is_active: bool,&#xD;&#xA;	pub content: Content&lt;MaxContentLength&gt;,&#xD;&#xA;	pub created: BlockNumber,&#xD;&#xA;	pub updated: Option&lt;BlockNumber&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I'm trying to set it like this but getting an error saying type argument `T` not allowed.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;Listings::&lt;T&gt;::insert(&#xD;&#xA;	&amp;property,&#xD;&#xA;	&amp;who,&#xD;&#xA;	Listing {&#xD;&#xA;		is_active: is_active.unwrap_or(false),&#xD;&#xA;		content,&#xD;&#xA;		created: frame_system::&lt;T&gt;::Pallet::current_block_number(),&#xD;&#xA;		updated: None,&#xD;&#xA;	},&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0109]: type arguments are not allowed for this type&#xD;&#xA;  --&gt; pallets/listing/src/lib.rs:87:30&#xD;&#xA;   |&#xD;&#xA;87 |                     created: frame_system::&lt;T&gt;::Pallet::current_block_number(),&#xD;&#xA;   |                                             ^ type argument not allowed&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0109`.&#xD;&#xA;error: could not compile `pallet-listing` due to previous error&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16465" PostHistoryTypeId="1" PostId="4393" RevisionGUID="144cb0d6-fac2-4da4-8560-d3a6961abe61" CreationDate="2022-08-22T19:35:43.743" UserId="245" Text="Get BlockNumber from Pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="16466" PostHistoryTypeId="3" PostId="4393" RevisionGUID="144cb0d6-fac2-4da4-8560-d3a6961abe61" CreationDate="2022-08-22T19:35:43.743" UserId="245" Text="|frame-system|blocknumber|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16467" PostHistoryTypeId="2" PostId="4394" RevisionGUID="97643b1e-c676-43c7-8563-dec1b2164411" CreationDate="2022-08-22T19:38:08.767" UserId="14" Text="Try this:&#xD;&#xA;```&#xD;&#xA;Listings::&lt;T&gt;::insert(&#xD;&#xA;    &amp;property,&#xD;&#xA;    &amp;who,&#xD;&#xA;    Listing {&#xD;&#xA;        is_active: is_active.unwrap_or(false),&#xD;&#xA;        content,&#xD;&#xA;        created: frame_system::Pallet::&lt;T&gt;::current_block_number(),&#xD;&#xA;        updated: None,&#xD;&#xA;    },&#xD;&#xA;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16469" PostHistoryTypeId="2" PostId="4395" RevisionGUID="6d50c018-19eb-4a45-9cb9-1a1708107fb0" CreationDate="2022-08-22T20:12:41.387" UserId="245" Text="I have a function that updates my Listing struct in DoubleMap Storage. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn update_listing(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	property_id: T::Hash,&#xD;&#xA;	is_active: Option&lt;bool&gt;,&#xD;&#xA;	content: Option&lt;Content&lt;T::MaxContentLength&gt;&gt;,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;	let who = ensure_signed(origin)?;&#xD;&#xA;	ensure!(Listings::&lt;T&gt;::get(&amp;property_id, &amp;who).is_some(), Error::&lt;T&gt;::ListingNotFound);&#xD;&#xA;&#xD;&#xA;	Listings::&lt;T&gt;::mutate(&amp;property_id, &amp;who, |o_listing| {&#xD;&#xA;		let listing = o_listing.as_mut().unwrap();&#xD;&#xA;		if let Some(is_active) = is_active {&#xD;&#xA;			listing.is_active = is_active;&#xD;&#xA;		}&#xD;&#xA;		if let Some(content) = content {&#xD;&#xA;			listing.content = content;&#xD;&#xA;		}&#xD;&#xA;		Some(listing)&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;	Self::deposit_event(Event::ListingUpdated(property_id, who));&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;error: lifetime may not live long enough&#xD;&#xA;   --&gt; pallets/listing/src/lib.rs:131:5&#xD;&#xA;    |&#xD;&#xA;123 |             Listings::&lt;T&gt;::mutate(&amp;property_id, &amp;who, |mut o_listing| {&#xD;&#xA;    |                                                        -------------- return type of closure is std::option::Option&lt;&amp;'2 mut Listing&lt;&lt;T as frame_system::Config&gt;::BlockNumber, &lt;T as pallet::Config&gt;::MaxContentLength&gt;&gt;&#xD;&#xA;    |                                                        |&#xD;&#xA;    |                                                        has type `&amp;'1 mut std::option::Option&lt;Listing&lt;&lt;T as frame_system::Config&gt;::BlockNumber, &lt;T as pallet::Config&gt;::MaxContentLength&gt;&gt;`&#xD;&#xA;...&#xD;&#xA;131 |                 Some(listing)&#xD;&#xA;    |                 ^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16471" PostHistoryTypeId="1" PostId="4395" RevisionGUID="6d50c018-19eb-4a45-9cb9-1a1708107fb0" CreationDate="2022-08-22T20:12:41.387" UserId="245" Text="Lifetime error on Storage Mutate" ContentLicense="CC BY-SA 4.0" />
  <row Id="16472" PostHistoryTypeId="3" PostId="4395" RevisionGUID="6d50c018-19eb-4a45-9cb9-1a1708107fb0" CreationDate="2022-08-22T20:12:41.387" UserId="245" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16473" PostHistoryTypeId="2" PostId="4396" RevisionGUID="186a39dd-9a4e-450d-9b4f-e02d5c027441" CreationDate="2022-08-22T23:02:52.570" UserId="512" Text="It appears in substrate this is O(n), but want to confirm since I believe `hashbrown` just wipes control bytes, which appears O(1).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Side note:&#xD;&#xA;&#xD;&#xA;The problem I'm trying to solve is tracking a number of free calls (u16) an account gets per era.&#xD;&#xA;&#xD;&#xA;Data structures are stored like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  type FreeCalls = u16;&#xD;&#xA;&#xD;&#xA;  #[pallet::pallet]&#xD;&#xA;  #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;  pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;  /// To disable free calls, set this to `None` or leave it unitialized.&#xD;&#xA;  #[pallet::storage]&#xD;&#xA;  #[pallet::getter(fn free_calls_per_era)]&#xD;&#xA;  pub type FreeCallsPerEra&lt;T&gt; = StorageValue&lt;_, FreeCalls&gt;;&#xD;&#xA;&#xD;&#xA;  /// Stores how many calls a user has left for this era.&#xD;&#xA;  ///&#xD;&#xA;  /// `Some(n)` : user has n free calls left&#xD;&#xA;  /// `Some(0)` : user has zero free calls left&#xD;&#xA;  /// `None` : user has not used any free calls yet this era (so set it to FreeCallsPerEra)&#xD;&#xA;  #[pallet::storage]&#xD;&#xA;  #[pallet::getter(fn free_calls_left)]&#xD;&#xA;  pub type FreeCallsLeft&lt;T&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, FreeCalls, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As the comments in the above code explain, we can check the number of free calls an account has left by querying `FreeCallsLeft&lt;T&gt;`. If `None`, they have `free_calls_per_era()` calls left, and `Some(0)` means they've used them all. To reset this, we `clear()` the map, and we would do it every era.&#xD;&#xA;&#xD;&#xA;Is there a better approach to this, or do we just deal with O(n) `clear()` every era? Sure, the map value could be `(free_calls_left, era_index)` and reset the free calls and current era when queried, but then we basically store every account forever until we prune it." ContentLicense="CC BY-SA 4.0" />
  <row Id="16475" PostHistoryTypeId="1" PostId="4396" RevisionGUID="186a39dd-9a4e-450d-9b4f-e02d5c027441" CreationDate="2022-08-22T23:02:52.570" UserId="512" Text="What is the time complexity of StorageMap::clear()?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16476" PostHistoryTypeId="3" PostId="4396" RevisionGUID="186a39dd-9a4e-450d-9b4f-e02d5c027441" CreationDate="2022-08-22T23:02:52.570" UserId="512" Text="|storage|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16477" PostHistoryTypeId="5" PostId="4395" RevisionGUID="5925c21a-cae9-4f96-885b-f92f8b69b81d" CreationDate="2022-08-23T00:35:04.810" UserId="245" Comment="added 56 characters in body" Text="I have a function that updates my Listing struct in DoubleMap Storage. How can I mutate the storage with given optional params?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn update_listing(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	property_id: T::Hash,&#xD;&#xA;	is_active: Option&lt;bool&gt;,&#xD;&#xA;	content: Option&lt;Content&lt;T::MaxContentLength&gt;&gt;,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;	let who = ensure_signed(origin)?;&#xD;&#xA;	ensure!(Listings::&lt;T&gt;::get(&amp;property_id, &amp;who).is_some(), Error::&lt;T&gt;::ListingNotFound);&#xD;&#xA;&#xD;&#xA;	Listings::&lt;T&gt;::mutate(&amp;property_id, &amp;who, |o_listing| {&#xD;&#xA;		let listing = o_listing.as_mut().unwrap();&#xD;&#xA;		if let Some(is_active) = is_active {&#xD;&#xA;			listing.is_active = is_active;&#xD;&#xA;		}&#xD;&#xA;		if let Some(content) = content {&#xD;&#xA;			listing.content = content;&#xD;&#xA;		}&#xD;&#xA;		Some(listing)&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;	Self::deposit_event(Event::ListingUpdated(property_id, who));&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;error: lifetime may not live long enough&#xD;&#xA;   --&gt; pallets/listing/src/lib.rs:131:5&#xD;&#xA;    |&#xD;&#xA;123 |             Listings::&lt;T&gt;::mutate(&amp;property_id, &amp;who, |mut o_listing| {&#xD;&#xA;    |                                                        -------------- return type of closure is std::option::Option&lt;&amp;'2 mut Listing&lt;&lt;T as frame_system::Config&gt;::BlockNumber, &lt;T as pallet::Config&gt;::MaxContentLength&gt;&gt;&#xD;&#xA;    |                                                        |&#xD;&#xA;    |                                                        has type `&amp;'1 mut std::option::Option&lt;Listing&lt;&lt;T as frame_system::Config&gt;::BlockNumber, &lt;T as pallet::Config&gt;::MaxContentLength&gt;&gt;`&#xD;&#xA;...&#xD;&#xA;131 |                 Some(listing)&#xD;&#xA;    |                 ^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16478" PostHistoryTypeId="2" PostId="4397" RevisionGUID="4af4f0c0-0226-4bc6-90f4-919c98c98308" CreationDate="2022-08-23T00:55:08.300" UserId="245" Text="Instead of using `mutate`, I get and edit the data and then insert it.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let mut listing =&#xD;&#xA;	Listings::&lt;T&gt;::get(&amp;property_id, &amp;who).ok_or(Error::&lt;T&gt;::ListingNotFound)?;&#xD;&#xA;&#xD;&#xA;if let Some(status) = status {&#xD;&#xA;	listing.status = status;&#xD;&#xA;}&#xD;&#xA;if let Some(content) = content {&#xD;&#xA;	listing.content = content;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Listings::&lt;T&gt;::insert(&amp;property_id, &amp;who, listing);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16480" PostHistoryTypeId="2" PostId="4398" RevisionGUID="dc928e27-9eab-4247-9749-5ba6eedcd893" CreationDate="2022-08-23T02:53:27.677" UserId="3032" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5csFK.png&#xD;&#xA;&#xD;&#xA;After BABE changed to RRSC, explorer does not show the author" ContentLicense="CC BY-SA 4.0" />
  <row Id="16482" PostHistoryTypeId="1" PostId="4398" RevisionGUID="dc928e27-9eab-4247-9749-5ba6eedcd893" CreationDate="2022-08-23T02:53:27.677" UserId="3032" Text="After BABE changed to RRSC, explorer does not show the author" ContentLicense="CC BY-SA 4.0" />
  <row Id="16483" PostHistoryTypeId="3" PostId="4398" RevisionGUID="dc928e27-9eab-4247-9749-5ba6eedcd893" CreationDate="2022-08-23T02:53:27.677" UserId="3032" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16484" PostHistoryTypeId="2" PostId="4399" RevisionGUID="b54d479d-67da-4cdc-bbe4-2983903bc397" CreationDate="2022-08-23T03:37:02.037" UserId="251" Text="```&#xD;&#xA;Listings::&lt;T&gt;::mutate(&amp;property_id, &amp;who, |listing| {&#xD;&#xA;    // you don't need to use `as_mut` here. listing is already a `&amp;mut _`&#xD;&#xA;    if let Some(is_active) = is_active {&#xD;&#xA;        listing.is_active = is_active;&#xD;&#xA;    }&#xD;&#xA;    if let Some(content) = content {&#xD;&#xA;        listing.content = content;&#xD;&#xA;    }&#xD;&#xA;    // you can not return a local reference to outside, take the ownership first &#xD;&#xA;    // Some(listing.to_owned())&#xD;&#xA;    // or&#xD;&#xA;    Some(listing.clone())&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Furthermore, you could use `try_mutate` or `get/insert`. While the `listing` is not changed, you could save one DB write cost." ContentLicense="CC BY-SA 4.0" />
  <row Id="16486" PostHistoryTypeId="5" PostId="4095" RevisionGUID="4e2b4818-df47-4ffc-af0a-0f50c0d5676d" CreationDate="2022-08-23T08:43:25.153" UserId="2809" Comment="added 185 characters in body" Text="As the title says, I have added EVM Compatibility to my NPoS runtime(using [chainsafe/substrate-node-template](https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking)), and when i run my node with Alice and Bob validators, the StakingElection begins to fail.&#xD;&#xA;&#xD;&#xA;**NOTE** The chainsafe template had an issue where eras didn't change hence no election occured, but I have solved that with [this pr](https://github.com/ChainSafe/substrate-node-template/pull/4), the NPoS election works fine not having added the EVM pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**UPDATE 1** I have added pallet_ethereum, changed SubstrateBlockHashMapping to EthereuBlockhashMapping, still the same issue.&#xD;&#xA;If I remove all EVM related stuff, my NPoS works fine. Solution is submitted, election is finalized and a new authority set is chosen.&#xD;&#xA;&#xD;&#xA;**UPDATE 2**&#xD;&#xA;I forgot to add an image of whaat should normally happen(when pallet_evm is not installed)&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;**UPDATE 3**&#xD;&#xA;Here is the branch and repo in question [here][3]&#xD;&#xA;&#xD;&#xA;**UPDATE 4**&#xD;&#xA;It appears using fp_evm::GenesisAccount to create and endow some test accounts in chain_spec for EVMConfig breaks the NPoS election for both polkadotv0.9.22 and polkadotv0.9.25, without endowed test accounts I cannot test any of the EVM compatibility. &#xD;&#xA;It looks like fp_evm is causing the break. Is this an active issue? and will Frontier be fixing this?&#xD;&#xA;**Note** that I am not working with a parachain, it is a **standalone** chain with EVM compatability,&#xD;&#xA;&#xD;&#xA;**UPDATE 5**&#xD;&#xA;I have added 5 accounts in EVMGenesis config, but looks there aren't any&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;**UPDATE 6**&#xD;&#xA;In the block where StakingElection fails, logs show there are 2 consensus engines.&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2pO2q.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/t6yQZ.png&#xD;&#xA;  [3]: https://github.com/talhadaar/chainsafe-substrate-node-template/tree/question&#xD;&#xA;  [4]: https://i.stack.imgur.com/Pbvrm.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/28FGD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16489" PostHistoryTypeId="2" PostId="4401" RevisionGUID="50a0df18-d2d9-480e-b847-f51c0e4bd0f4" CreationDate="2022-08-23T08:58:01.657" UserId="85" Text="Not maybe a direct answer, but if you discover the parachains via the relay chain then you know which relay chain they are associated with." ContentLicense="CC BY-SA 4.0" />
  <row Id="16491" PostHistoryTypeId="2" PostId="4402" RevisionGUID="e71af187-d7fe-4023-af68-da7e2953a09b" CreationDate="2022-08-23T09:03:28.767" UserId="85" Text="Using `On finalized` could you blow up the block's weight if there were no transactions in it so that it then skips that block? ( https://substrate.stackexchange.com/questions/4255/do-on-finalized-and-on-initialize-impact-block-weight-budget )&#xD;&#xA;&#xD;&#xA;That said if it created overweight blocks all the time then probably the networking code might start to shun your collator...?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16493" PostHistoryTypeId="2" PostId="4403" RevisionGUID="e1596fd7-367c-4b68-866b-8ec590036bd9" CreationDate="2022-08-23T09:25:06.807" UserId="94" Text="Could be a failing test in your benchmarks. The error message looks a bit scary if you did not try to run them manually first.  &#xD;&#xA;Try:  &#xD;&#xA;```sh&#xD;&#xA;cargo t -p pallet-nft --features runtime-benchmarks&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16496" PostHistoryTypeId="2" PostId="4404" RevisionGUID="613716cb-303a-49b4-ba1e-95597b6cabdf" CreationDate="2022-08-23T10:00:36.720" UserId="73" Text="&gt; It appears in substrate this is O(n), but want to confirm since I believe hashbrown just wipes control bytes, which appears O(1).&#xD;&#xA;&#xD;&#xA;It is `O(n)`. `hashbrown` is a in memory hash map and there you only need to delete the inner structure, while for our storage map you need to iterate over all elements and set them as deleted.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To your other question. You could use a `StorageDoubleMap`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type FreeCallsLeft = StorageDoubleMap&lt;EraIndex, AccountId, Value&gt;;&#xD;&#xA;type EraToClean = StorageValue&lt;EraIndex&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you could leverage `on_idle`:&#xD;&#xA;```&#xD;&#xA;fn on_idle(block_number, weight_left_in_block) {&#xD;&#xA;    let era_to_clean = EraToClean::get();&#xD;&#xA;    &#xD;&#xA;    if era_to_clean &lt; CurrentEra::get() {&#xD;&#xA;         let res = FreeCallsLeft::clear_prefix(&#xD;&#xA;           // Clear everything under the given first key&#xD;&#xA;           era_to_clean, &#xD;&#xA;           // Every call to this function, aka at most once per block,&#xD;&#xA;           // we will delete 100 elements.&#xD;&#xA;           // This should actually be calculated based on the remaining weight&#xD;&#xA;           // of the block to ensure we don't overuse our budget&#xD;&#xA;           100,&#xD;&#xA;           None,&#xD;&#xA;         );&#xD;&#xA;&#xD;&#xA;         if res.maybe_cursor.is_none() {&#xD;&#xA;           EraToClean::put(era_to_clean + 1);&#xD;&#xA;         }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Be aware that the code above is very pseudo and needs some adjustments here and there :P However, to convey the idea it should be enough.&#xD;&#xA;The given logic would also not really work if `FreeCallsLeft` is unlimited. Aka there could be too many elements in it to delete in on era." ContentLicense="CC BY-SA 4.0" />
  <row Id="16498" PostHistoryTypeId="2" PostId="4405" RevisionGUID="f984d31b-b5ae-4ebe-acad-d282c0aec743" CreationDate="2022-08-23T10:18:56.223" UserId="3075" Text="There are two ways that I know of, either through RPC or querying chainstate.&#xD;&#xA;&#xD;&#xA;## RPC&#xD;&#xA;&#xD;&#xA;Make a `system.chain` call via RPC and it will return the chain name in plain text.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;Polkadot&#xD;&#xA;&#xD;&#xA;## Chainstate&#xD;&#xA;&#xD;&#xA;If you query chainstate ( https://polkadot.js.org/apps/#/chainstate ), for `system.lastRuntimeUpgrade`, you'll get the current runtime version and the name of the chain.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      specVersion: 9,260&#xD;&#xA;      specName: polkadot&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="16500" PostHistoryTypeId="2" PostId="4406" RevisionGUID="9c6fd9ad-a092-49d7-a54a-f72e4451a6b1" CreationDate="2022-08-23T11:44:54.593" UserId="28" Text="Rocks DB is a very complex database, which did have strange outlier behaviors we never fully understood.&#xD;&#xA;&#xD;&#xA;I actually spoke about that to some extend here: https://youtu.be/Qa6sTyUqgek?t=4573&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;There were certain benchmarks where Rocks DB totally went crazy and gave huge outliers, and because of that, we had to remove Rocks DB from the main benchmarking pipeline (using an in-memory db), and instead isolate the database benchmarking to a separate process.&#xD;&#xA;&#xD;&#xA;So unfortunately I do not have an answer &quot;why exactly&quot; these outliers exist, but it is something that is known about from our experience with the DB, and it is something reasonable to expect when using it. As Oliver mentions, your benchmark results show that the average time calculated is quite accurate, and you should not really get yourself hung up on the outliers. This is why we take averages and median values.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/k3KZe.jpg&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16502" PostHistoryTypeId="50" PostId="3877" RevisionGUID="d692d80f-abc3-4dfb-a675-8c0ed19dbf40" CreationDate="2022-08-23T12:07:10.740" UserId="-1" />
  <row Id="16503" PostHistoryTypeId="2" PostId="4407" RevisionGUID="e5b7aa50-c4e7-4b38-9ff4-13faa06ee7ea" CreationDate="2022-08-23T12:44:50.947" UserId="655" Text="You can use our new project https://github.com/Supercolony-net/typechain-polkadot, it is still in development, but you can also use the beta versions from https://www.npmjs.com/package/typechain" ContentLicense="CC BY-SA 4.0" />
  <row Id="16505" PostHistoryTypeId="2" PostId="4408" RevisionGUID="fd5bbe60-3434-4006-a254-c22241cf0bcd" CreationDate="2022-08-23T13:57:00.523" UserId="2983" Text="As title says, I'm wondering if this is at all possible" ContentLicense="CC BY-SA 4.0" />
  <row Id="16507" PostHistoryTypeId="1" PostId="4408" RevisionGUID="fd5bbe60-3434-4006-a254-c22241cf0bcd" CreationDate="2022-08-23T13:57:00.523" UserId="2983" Text="Is it possible to nominate different validators at the same time with the same stash account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16508" PostHistoryTypeId="3" PostId="4408" RevisionGUID="fd5bbe60-3434-4006-a254-c22241cf0bcd" CreationDate="2022-08-23T13:57:00.523" UserId="2983" Text="|validator|stash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16509" PostHistoryTypeId="2" PostId="4409" RevisionGUID="660cb0c0-c0e9-46b8-a1d6-3477ad7257ef" CreationDate="2022-08-23T14:29:10.657" UserId="234" Text="Yes, you can but it is advised to use your Controller account (also advised to be different than your Stash account) to do that. &#xD;&#xA;&#xD;&#xA;A good place to start to learn about how to nominate is :&#xD;&#xA;- [Become a Nominator on Polkadot][1]&#xD;&#xA;&#xD;&#xA;&gt; Nominators are recommended to set up separate stash and controller&#xD;&#xA;&gt; accounts.&#xD;&#xA;&#xD;&#xA;- [How do I stake (nominate) on Polkadot?][5] &#xD;&#xA;- [Nominating/Staking on Polkadot and Kusama with Bill Laboon][2] (2020)&#xD;&#xA;- [Picking Validators to Nominate (Stake) in Polkadot][3] (2020)&#xD;&#xA;- [How to Nominate / Stake on Polkadot? - A Beginner's Guide][4] (2021)&#xD;&#xA;&#xD;&#xA;Take into account that the 3 videos are a little bit old but still quite useful. More up to date info is in our wiki and support pages that are listed first. Hope some of this is helpful for you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-how-to-nominate-polkadot&#xD;&#xA;  [2]: https://www.youtube.com/watch?v=NYs9oWAbzbE&#xD;&#xA;  [3]: https://youtu.be/ZMzhM1m4I-k&#xD;&#xA;  [4]: https://youtu.be/FCXC0CDhyS4&#xD;&#xA;  [5]: https://support.polkadot.network/support/solutions/articles/65000168057-how-do-i-stake-nominate-on-polkadot-" ContentLicense="CC BY-SA 4.0" />
  <row Id="16511" PostHistoryTypeId="2" PostId="4410" RevisionGUID="fdc559a7-6dec-4fc1-ab32-eb931a9b9aeb" CreationDate="2022-08-23T18:05:56.813" UserId="140" Text="How to fetch crowdloan contributor details? Would it be possible to know which contributor contributed how much amount?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16513" PostHistoryTypeId="1" PostId="4410" RevisionGUID="fdc559a7-6dec-4fc1-ab32-eb931a9b9aeb" CreationDate="2022-08-23T18:05:56.813" UserId="140" Text="How to fetch crowdloan contributor details?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16514" PostHistoryTypeId="3" PostId="4410" RevisionGUID="fdc559a7-6dec-4fc1-ab32-eb931a9b9aeb" CreationDate="2022-08-23T18:05:56.813" UserId="140" Text="|substrate-node|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16515" PostHistoryTypeId="2" PostId="4411" RevisionGUID="65d68b21-5fbe-46ea-b340-cab87a593fa4" CreationDate="2022-08-23T18:21:06.783" UserId="590" Text="I noticed various projects having multiple runtimes for Kusama, Polkadot and maybe a local-testnet. This makes sense as they can have different set of features. &#xD;&#xA;&#xD;&#xA;In my case I only want to test on Rococo and launch on Polkadot. Is it recommended that I have separate runtimes for each? If so what are reasons two have multiple runtimes? Is there a recommended setup for this?&#xD;&#xA;&#xD;&#xA;Do Rococo and Polkadot have the same versions?&#xD;&#xA;&#xD;&#xA;In the [documentation][1] it states:&#xD;&#xA;&gt; Parachains are very tightly coupled with the relay chain codebase that they connect to because they share so many common dependencies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-other-chains/local-relay/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16517" PostHistoryTypeId="1" PostId="4411" RevisionGUID="65d68b21-5fbe-46ea-b340-cab87a593fa4" CreationDate="2022-08-23T18:21:06.783" UserId="590" Text="Polkadot vs Rococo runtimes" ContentLicense="CC BY-SA 4.0" />
  <row Id="16518" PostHistoryTypeId="3" PostId="4411" RevisionGUID="65d68b21-5fbe-46ea-b340-cab87a593fa4" CreationDate="2022-08-23T18:21:06.783" UserId="590" Text="|polkadot|substrate-node-template|runtime|rococo|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16519" PostHistoryTypeId="2" PostId="4412" RevisionGUID="5c237f93-6899-461c-98da-9f0584f1bc5b" CreationDate="2022-08-23T18:37:09.957" UserId="590" Text="1. You can take a look at the events submitted yourself:&#xD;&#xA;&#xD;&#xA;&gt; https://github.com/paritytech/polkadot/blob/master/runtime/common/src/crowdloan/mod.rs#L260&#xD;&#xA;&#xD;&#xA;2. use [subscan][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;3. use [subquery][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.subscan.io/#fund-contributes&#xD;&#xA;  [2]: https://www.subquery.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16521" PostHistoryTypeId="5" PostId="4411" RevisionGUID="4311c47a-b9fd-4b43-9fa7-275eadfc60f1" CreationDate="2022-08-23T20:26:14.633" UserId="590" Comment="added 1 character in body" Text="I noticed various projects having multiple runtimes for Kusama, Polkadot and maybe a local-testnet. This makes sense as they can have different set of features. &#xD;&#xA;&#xD;&#xA;In my case I only want to test on Rococo and launch on Polkadot. Is it recommended that I have separate runtimes for each? If so what are reasons in having multiple runtimes? Is there a recommended setup for this?&#xD;&#xA;&#xD;&#xA;Do Rococo and Polkadot have the same versions?&#xD;&#xA;&#xD;&#xA;In the [documentation][1] it states:&#xD;&#xA;&gt; Parachains are very tightly coupled with the relay chain codebase that they connect to because they share so many common dependencies.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-other-chains/local-relay/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16522" PostHistoryTypeId="2" PostId="4413" RevisionGUID="234171cf-06af-4b92-b1ee-fa764f324115" CreationDate="2022-08-23T21:38:14.157" UserId="2320" Text="I set up a state via&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl ExtBuilder {&#xD;&#xA; pub fn build(self) -&gt; sp_io::TestExternalities {&#xD;&#xA;  let mut t = system::GenesisConfig::default().build_storage::&lt;TestRuntime&gt;().unwrap();&#xD;&#xA;  let mut ext = sp_io::TestExternalities::new(t);&#xD;&#xA;  ext.execute_with(|| &#xD;&#xA;      System::set_block_number(1));&#xD;&#xA;      ThirdPartyModule::createAsset { ... }&#xD;&#xA;  ext&#xD;&#xA; }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the &quot;normal&quot; unit tests, I call `Externalities::build().execute_with(|| {...})` to access the store. &#xD;&#xA;&#xD;&#xA;Now I want to do benchmark testing via `impl_benchmark_test_suite!` and I pass the storage as the second parameter:&#xD;&#xA;&#xD;&#xA;`impl_benchmark_test_suite!(Pallet, Externalities::build() , Test,);`. However, the store doesn't contain the same information as with the Unit tests, and `createAsset` doesn't get triggered or at least, it is not part of the store. I wonder how I would &quot;register&quot; this module or this content into my store for the benchmark tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16524" PostHistoryTypeId="1" PostId="4413" RevisionGUID="234171cf-06af-4b92-b1ee-fa764f324115" CreationDate="2022-08-23T21:38:14.157" UserId="2320" Text="How to persist TestExternalities via impl_benchmark_test_suite testing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16525" PostHistoryTypeId="3" PostId="4413" RevisionGUID="234171cf-06af-4b92-b1ee-fa764f324115" CreationDate="2022-08-23T21:38:14.157" UserId="2320" Text="|benchmarking|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16526" PostHistoryTypeId="2" PostId="4414" RevisionGUID="6ca2ffbf-a308-4440-bdf7-3232f195028b" CreationDate="2022-08-23T22:56:17.440" UserId="3064" Text="Is there a list of archive nodes for polkadot/kusama/parachains?&#xD;&#xA;&#xD;&#xA;I'm trying to fetch all historical events in order to visualize staking rewards for nominators and validators. " ContentLicense="CC BY-SA 4.0" />
  <row Id="16528" PostHistoryTypeId="1" PostId="4414" RevisionGUID="6ca2ffbf-a308-4440-bdf7-3232f195028b" CreationDate="2022-08-23T22:56:17.440" UserId="3064" Text="How do I connect to an archive node with polkadot.js api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16529" PostHistoryTypeId="3" PostId="4414" RevisionGUID="6ca2ffbf-a308-4440-bdf7-3232f195028b" CreationDate="2022-08-23T22:56:17.440" UserId="3064" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16530" PostHistoryTypeId="2" PostId="4415" RevisionGUID="d6267062-69a3-44d3-9733-64252eed1b83" CreationDate="2022-08-24T00:39:22.530" UserId="575" Text="You should have separate runtimes for the Testnet and Mainnet. That way, you have a testing ground that you can experiment on without any risks of dire economic consequences." ContentLicense="CC BY-SA 4.0" />
  <row Id="16532" PostHistoryTypeId="2" PostId="4416" RevisionGUID="8c132a75-579e-4d86-91a8-d22cadae0552" CreationDate="2022-08-24T01:04:22.663" UserId="575" Text="You can use Subscan's [extrinsic query tool][2] to search for the `crowdloan.contribute` call of the account in question.&#xD;&#xA;&#xD;&#xA;You can also get this information with the [`crowdloan.contributed`][3] event. The amount contributed will be in the `BalanceOf` parameter.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: https://polkadot.subscan.io/extrinsic?address=&amp;module=crowdloan&amp;call=contribute&amp;result=all&amp;signedChecked=signed%20only&amp;startDate=&amp;endDate=&amp;startBlock=&amp;timeType=date&amp;version=9260&amp;endBlock=&#xD;&#xA;  [3]: https://polkadot.subscan.io/event?address=&amp;module=crowdloan&amp;event=contributed&amp;startDate=&amp;endDate=&amp;startBlock=&amp;endBlock=&amp;timeType=date&amp;version=9260" ContentLicense="CC BY-SA 4.0" />
  <row Id="16534" PostHistoryTypeId="2" PostId="4417" RevisionGUID="9279d539-57fb-466a-a377-ebcf11baa160" CreationDate="2022-08-24T03:41:23.517" UserId="3009" Text="I want to clear a StorageMap in on_finalize()  hook function. The code like this:&#xD;&#xA;&#xD;&#xA;    		//clear current epoch data for the next cycle&#xD;&#xA;			let mut mrr: MultiRemovalResults = &lt;CurrentEpochData&lt;T&gt;&gt;::clear(10000, None);&#xD;&#xA;			loop {&#xD;&#xA;				match mrr.maybe_cursor{&#xD;&#xA;					None =&gt; break,&#xD;&#xA;					Some(v) =&gt; {&#xD;&#xA;						mrr = &lt;CurrentEpochData&lt;T&gt;&gt;::clear(10000, Some(&amp;v[..]));&#xD;&#xA;					}&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;The code above is written in on_finalize, and I am not sure if I can do this. I am afraid that there is some limition with on_finalize hook, such as time limit or weight limit. &#xD;&#xA;&#xD;&#xA;Need help！！！" ContentLicense="CC BY-SA 4.0" />
  <row Id="16536" PostHistoryTypeId="1" PostId="4417" RevisionGUID="9279d539-57fb-466a-a377-ebcf11baa160" CreationDate="2022-08-24T03:41:23.517" UserId="3009" Text="Is there time limition or weight limition when calling &quot;on_finalize()&quot; hook?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16537" PostHistoryTypeId="3" PostId="4417" RevisionGUID="9279d539-57fb-466a-a377-ebcf11baa160" CreationDate="2022-08-24T03:41:23.517" UserId="3009" Text="|weight|limit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16543" PostHistoryTypeId="50" PostId="3856" RevisionGUID="a1c402db-16d4-473a-86be-c1c71ea60df8" CreationDate="2022-08-24T05:03:15.367" UserId="-1" />
  <row Id="16544" PostHistoryTypeId="2" PostId="4419" RevisionGUID="8636baf4-252a-41fe-a327-4d633698e1f0" CreationDate="2022-08-24T06:31:05.467" UserId="2711" Text="We have a running solo chain that is based on the officially released 3.0.0 version. Is there any guide or example about bumping dependency from 3.0.0 to the latest master branch? Any PRs we should pay attention to that might break the running solo chain, such as state migration or consensus change?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16546" PostHistoryTypeId="1" PostId="4419" RevisionGUID="8636baf4-252a-41fe-a327-4d633698e1f0" CreationDate="2022-08-24T06:31:05.467" UserId="2711" Text="Bump substrate's dependency from 3.0.0 to master branch for a running solo chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16547" PostHistoryTypeId="3" PostId="4419" RevisionGUID="8636baf4-252a-41fe-a327-4d633698e1f0" CreationDate="2022-08-24T06:31:05.467" UserId="2711" Text="|substrate-node|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16548" PostHistoryTypeId="2" PostId="4420" RevisionGUID="3bf5e446-817b-49c5-bd00-1a47e9b5e6a6" CreationDate="2022-08-24T08:59:57.297" UserId="3078" Text="# Summary &#xD;&#xA;&#xD;&#xA;I am using an Ink! smart contract (implemented in contract.rs) code calling a chain extension method. &#xD;&#xA;&#xD;&#xA;This works well. &#xD;&#xA;&#xD;&#xA;However, I want to split my code and call the extension method in a new module (let's call it util.rs). &#xD;&#xA;&#xD;&#xA;What is the idiomatic way to share the same env with this module.&#xD;&#xA;In other words I want to be able to call self.env().extension.my_method from utils.rs method.&#xD;&#xA;&#xD;&#xA;# First attempt&#xD;&#xA;&#xD;&#xA;I try to overlad the + operation with a basic functions for now.&#xD;&#xA;&#xD;&#xA;## Share the EnvAccess to a struct defined in util.rs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#utils.rs&#xD;&#xA;use crate::CustomEnvironment;&#xD;&#xA;use ink_lang::EnvAccess;&#xD;&#xA;&#xD;&#xA;#[derive(Debug)]&#xD;&#xA;pub struct VeryUtil&lt;'a&gt; {&#xD;&#xA;    pub value: ink_prelude::vec::Vec&lt;u8&gt;,&#xD;&#xA;    pub extension: EnvAccess&lt;'a, CustomEnvironment&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;'a&gt; VeryUtil&lt;'a&gt; {&#xD;&#xA;    pub fn new(&#xD;&#xA;        value: ink_prelude::vec::Vec&lt;u8&gt;,&#xD;&#xA;        extension: EnvAccess&lt;'a, CustomEnvironment&gt;,&#xD;&#xA;    ) -&gt; Self {&#xD;&#xA;        VeryUtil { value, extension }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl core::ops::Add&lt;VeryUtil&lt;'_&gt;&gt; for VeryUtil&lt;'_&gt; {&#xD;&#xA;    // For the next line I get&#xD;&#xA;    // generic associated types are unstable&#xD;&#xA;    // type Output&lt;'a&gt; = VeryUtil&lt;'a&gt;;&#xD;&#xA;&#xD;&#xA;    // for now I tested with&#xD;&#xA;    type Output = Vec&lt;u8&gt;;&#xD;&#xA;&#xD;&#xA;    fn add(self, rhs: VeryUtil) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;        println!(&quot;&gt; add is called&quot;);&#xD;&#xA;&#xD;&#xA;        let val = self&#xD;&#xA;            .extension&#xD;&#xA;            .extension()&#xD;&#xA;            .add_values(&amp;self.value, &amp;rhs.value);&#xD;&#xA;&#xD;&#xA;        val.unwrap()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here I get a warning when the output was the same struct, I commented in the code. &#xD;&#xA;A subsidiary question is how to avoid to share for each struct the env, but without it I would not be able to call the extension method in the Add overload part!&#xD;&#xA;&#xD;&#xA;## Use the defined  struct in one of the exposed contract methods: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# contract.rs&#xD;&#xA;1 let very_util_val1 = crate::util::VeryUtil::new(my_vec1.clone(), self.env());&#xD;&#xA;2 let very_util_val2 = crate::util::VeryUtil::new(my_vec2.clone(), self.env());&#xD;&#xA;3 // All the code purpose is to be able to do this!!!&#xD;&#xA;4 let result = very_util_val1 + very_util_val2 &#xD;&#xA;```&#xD;&#xA;I get the following error for line 1 and 2 : &#xD;&#xA;```&#xD;&#xA;cannot borrow `*self` as mutable because it is also borrowed as immutable&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My initial choice was to share a *__ink_ConreteOpsInstance* (self.env().extension) but I did not know how to define this type in my struct. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Another idea&#xD;&#xA;&#xD;&#xA;Maybe I can ask access like the contract module with the following macro ...&#xD;&#xA;```&#xD;&#xA;#[ink::contract(env = crate::CustomEnvironment)]&#xD;&#xA;```&#xD;&#xA;... but this module is not a contract just a sub module.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16550" PostHistoryTypeId="1" PostId="4420" RevisionGUID="3bf5e446-817b-49c5-bd00-1a47e9b5e6a6" CreationDate="2022-08-24T08:59:57.297" UserId="3078" Text="Access to chain extension method from another module" ContentLicense="CC BY-SA 4.0" />
  <row Id="16551" PostHistoryTypeId="3" PostId="4420" RevisionGUID="3bf5e446-817b-49c5-bd00-1a47e9b5e6a6" CreationDate="2022-08-24T08:59:57.297" UserId="3078" Text="|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16552" PostHistoryTypeId="2" PostId="4421" RevisionGUID="58f90d7d-8453-4c9e-b2a5-f1ae8a2762be" CreationDate="2022-08-24T09:10:36.020" UserId="298" Text="We have a pallet (called [pallet_supersig][1]), and have an RPC module that we have implemented into a [substrate node template with supersig][2], when running the dev node we can find the rpc methods() that the supersig methods are there:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    superSig_getProposalState&#xD;&#xA;    superSig_getSupersigId&#xD;&#xA;    superSig_getUserSupersigs&#xD;&#xA;    superSig_listMembers&#xD;&#xA;    superSig_listProposals&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;![rpc &gt; methods()][3]&#xD;&#xA;&#xD;&#xA;But not in the dropdown, &#xD;&#xA;&#xD;&#xA;![enter image description here][4]&#xD;&#xA;&#xD;&#xA;We also try to `curl` it, but aren't able to find the exact request to access it. Or perhaps it is not accessible?&#xD;&#xA;&#xD;&#xA;We are either calling it incorrectly or we are missing something when desinging the RPC. Could someone check over this issue RPC to see what we're missing? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kabocha-network/pallet_supersig/tree/polkadot-v0.9.24&#xD;&#xA;  [2]: https://github.com/decentration/substrate-supersig-template/blob/e674e4004726153182ee71e94c7fcbb56a9f4304/runtime/src/lib.rs#L467&#xD;&#xA;  [3]: https://i.stack.imgur.com/WbZCY.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/TJ31V.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16554" PostHistoryTypeId="1" PostId="4421" RevisionGUID="58f90d7d-8453-4c9e-b2a5-f1ae8a2762be" CreationDate="2022-08-24T09:10:36.020" UserId="298" Text="How to curl custom RPC methods?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16555" PostHistoryTypeId="3" PostId="4421" RevisionGUID="58f90d7d-8453-4c9e-b2a5-f1ae8a2762be" CreationDate="2022-08-24T09:10:36.020" UserId="298" Text="|pallet|substrate-node-template|custom-rpc|kabocha|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16556" PostHistoryTypeId="5" PostId="4417" RevisionGUID="22fc9678-1566-4710-86a3-5f0b045e35f1" CreationDate="2022-08-24T09:46:45.537" UserId="85" Comment="clearer English" Text="I want to clear a StorageMap in on_finalize()  hook function. The code like this:&#xD;&#xA;&#xD;&#xA;    		//clear current epoch data for the next cycle&#xD;&#xA;			let mut mrr: MultiRemovalResults = &lt;CurrentEpochData&lt;T&gt;&gt;::clear(10000, None);&#xD;&#xA;			loop {&#xD;&#xA;				match mrr.maybe_cursor{&#xD;&#xA;					None =&gt; break,&#xD;&#xA;					Some(v) =&gt; {&#xD;&#xA;						mrr = &lt;CurrentEpochData&lt;T&gt;&gt;::clear(10000, Some(&amp;v[..]));&#xD;&#xA;					}&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;The code above is written in on_finalize, and I am not sure if I can do this. I am afraid that there is some limitation with on_finalize hook, such as time limit or weight limit. &#xD;&#xA;&#xD;&#xA;Need help！！！" ContentLicense="CC BY-SA 4.0" />
  <row Id="16557" PostHistoryTypeId="4" PostId="4417" RevisionGUID="22fc9678-1566-4710-86a3-5f0b045e35f1" CreationDate="2022-08-24T09:46:45.537" UserId="85" Comment="clearer English" Text="Is there time limit or weight limit when calling &quot;on_finalize()&quot; hook?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16558" PostHistoryTypeId="2" PostId="4422" RevisionGUID="9e50b0f3-f5c6-42db-aca9-e67a3a763d9a" CreationDate="2022-08-24T10:25:28.593" UserId="2935" Text="There's nothing stopping you from migrating to the latest master, even better is to migrate to the [latest polkadot release branch](https://github.com/paritytech/substrate/tree/polkadot-v0.9.27), depending on how often you are planning to upgrade and how much you care about the release having been tested.&#xD;&#xA;&#xD;&#xA;Your old WASM runtime should be running fine on that, when it comes to upgrading the runtime itself - this would really depend on the pallets you are using and their versions. A variety of pallets might have one or several migrations that you have to execute one after another depending on how far up you want to go with the version.&#xD;&#xA;&#xD;&#xA;The best way to determine those is just looking at any of the pallets that you are about to upgrade along with the runtime and apply all the migrations as needed.&#xD;&#xA;&#xD;&#xA;In order to further bullet-proof your runtime migrations - please take a look at [this tool][1]. And a crowdcast seminar from one of the links [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/command-line-tools/try-runtime/&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/try_runtime_cli/index.html#resources" ContentLicense="CC BY-SA 4.0" />
  <row Id="16560" PostHistoryTypeId="2" PostId="4423" RevisionGUID="5be63fc0-7596-4ea5-b86c-d264f061ceb7" CreationDate="2022-08-24T10:27:38.997" UserId="165" Text="First of all, Rococo has never meant to be a canary network for any other relaychain. And its value and appeal resides in having a testing hub with the maximum possible number of ecosystem networks present on it, enabling testing intercommunication and integration between different chains among other things.  &#xD;&#xA;&#xD;&#xA;Though, Rococo runtime, spec, config and such are not exactly the same than the ones running in Kusama or Polkadot but it tries to mirror the same set of features that we can find in Kusama. Its runtime gets released at every Polkadot release. Check [this release](https://github.com/paritytech/polkadot/releases/tag/v0.9.27) for instance, you will find Rococo's runtime being released too. So,&#xD;&#xA;&gt;Do Rococo and Polkadot have the same versions?&#xD;&#xA;&#xD;&#xA;Both runtimes are released together, with the same version.&#xD;&#xA;&#xD;&#xA;&gt; Is it recommended that I have separate runtimes for each?&#xD;&#xA;&#xD;&#xA;For this question I would recommend what I have been observing among the different teams using Rococo network at the moment. Yes separate runtimes seems the way to go, though these runtimes are effectively the same one, adding specific values for Rococo in your spec, for example" ContentLicense="CC BY-SA 4.0" />
  <row Id="16562" PostHistoryTypeId="2" PostId="4424" RevisionGUID="9d734da5-6d0a-4e85-9bb0-393105b150e5" CreationDate="2022-08-24T10:50:17.700" UserId="1789" Text="I saw this in Zombienet's Testing DSL page:&#xD;&#xA;https://github.com/paritytech/zombienet/blob/main/docs/src/test-dsl-definition-spec.md&#xD;&#xA;&#xD;&#xA;Under `Available Assertions`&#xD;&#xA;```&#xD;&#xA;Custom js scripts: Allow to run a defined script and assert on the completeness or return value.&#xD;&#xA;&#xD;&#xA;    node-name: js-script script_relative_path [ return is comparator target_value] [within x seconds]&#xD;&#xA;        alice: js-script ./0008-custom.js return is greater than 1 within 200 seconds&#xD;&#xA;```&#xD;&#xA;How can I do that?&#xD;&#xA;My network file, z05-small-network.toml :&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:{{POLKADOT_VERSION}}&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;{{COLLATOR_URL}}&quot;&#xD;&#xA;  command = &quot;hero-collator&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;  &#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;My feature file:&#xD;&#xA;```&#xD;&#xA;Description: Small Network test&#xD;&#xA;Network: ./z05-small-network.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# well know functions&#xD;&#xA;alice: is up&#xD;&#xA;bob: is up&#xD;&#xA;alice: parachain 2000 is registered within 225 seconds&#xD;&#xA;&#xD;&#xA;alice: js-script ./01-custom.js return is greater than 1 within 200 seconds&#xD;&#xA;```&#xD;&#xA;My Js file... 01-custom.js:&#xD;&#xA;```&#xD;&#xA;console.log(&quot;hello!!!&quot;);&#xD;&#xA;return 2;&#xD;&#xA;```&#xD;&#xA;Then I got this error:&#xD;&#xA;```&#xD;&#xA;    ✔ alice: is up (147ms)&#xD;&#xA;    ✔ bob: is up (88ms)&#xD;&#xA;2022-08-24 18:46:43        API/INIT: Not decorating unknown runtime apis: 0xe5bdc752b8ec2ba1/1, 0x91a3c6922fd0a608/1, 0xb69782c4499462e5/1&#xD;&#xA;    ✔ alice: parachain 2000 is registered within 225 seconds (2734ms)&#xD;&#xA;hello!!!&#xD;&#xA;&#xD;&#xA;	 Error running script: ./01-custom.js&#xD;&#xA;		 undefined is not a function&#xD;&#xA;&#xD;&#xA;    1) alice: js-script ./01-custom.js return is greater than 1 within 200 seconds&#xD;&#xA;```&#xD;&#xA;How can I assert on the completeness or return value?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16564" PostHistoryTypeId="1" PostId="4424" RevisionGUID="9d734da5-6d0a-4e85-9bb0-393105b150e5" CreationDate="2022-08-24T10:50:17.700" UserId="1789" Text="How to run JavaScript Js scripts in Zombienet tests and assert on the completeness or return value" ContentLicense="CC BY-SA 4.0" />
  <row Id="16565" PostHistoryTypeId="3" PostId="4424" RevisionGUID="9d734da5-6d0a-4e85-9bb0-393105b150e5" CreationDate="2022-08-24T10:50:17.700" UserId="1789" Text="|javascript|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16566" PostHistoryTypeId="2" PostId="4425" RevisionGUID="9669d406-479e-4e3a-91ef-ecfeadb9be45" CreationDate="2022-08-24T11:26:52.907" UserId="110" Text="In our parachain setup we have one healthy collator node producing blocks.&#xD;&#xA;I tried to add two bootnodes and one collator to the set (all of them connecting to the existing collator). So for the bootnodes and the other collator, all of them were specifying the first healthy collator as &quot;bootnode&quot;.&#xD;&#xA;&#xD;&#xA;All the nodes discover each other, so they show 3 peers and, calling the RPC method `system.peers()` on each of them shows that they are the correct ones.&#xD;&#xA;&#xD;&#xA;The problem comes when nor the new collator (which is part of the invulnerable set) or the other two nodes, show activity in the network as the existing collator does (i.e. they are stuck in an old block). So it appears to me to be like a stalled subset of nodes.&#xD;&#xA;Inspecting the RPC `system.health()` on the healthy node shows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  peers: 3&#xD;&#xA;  isSyncing: false&#xD;&#xA;  shouldHavePeers: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So that calls my attention: `shouldHavePeers` is `false`, while in the other 3 nodes is `true`. Does anyone know what exactly **shouldHavePeers** means, why is it `false`, and how to make the node axtually accept the other peers ? &#xD;&#xA;Any help will be much appreciated!" ContentLicense="CC BY-SA 4.0" />
  <row Id="16568" PostHistoryTypeId="1" PostId="4425" RevisionGUID="9669d406-479e-4e3a-91ef-ecfeadb9be45" CreationDate="2022-08-24T11:26:52.907" UserId="110" Text="New collators not peering - shouldHavePeers: false" ContentLicense="CC BY-SA 4.0" />
  <row Id="16569" PostHistoryTypeId="3" PostId="4425" RevisionGUID="9669d406-479e-4e3a-91ef-ecfeadb9be45" CreationDate="2022-08-24T11:26:52.907" UserId="110" Text="|networking|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16570" PostHistoryTypeId="5" PostId="4425" RevisionGUID="447a27b1-be12-4433-b6a8-c47ad40161c6" CreationDate="2022-08-24T11:32:10.403" UserId="110" Comment="added 241 characters in body" Text="In our parachain setup we have one healthy collator node producing blocks.&#xD;&#xA;I tried to add two bootnodes and one collator to the set (all of them connecting to the existing collator). So for the bootnodes and the other collator, all of them were specifying the first healthy collator as &quot;bootnode&quot;.&#xD;&#xA;&#xD;&#xA;All the nodes discover each other, so they show 3 peers and, calling the RPC method `system.peers()` on each of them shows that they are the correct ones.&#xD;&#xA;&#xD;&#xA;The problem comes when nor the new collator (which is part of the invulnerable set) or the other two nodes, show activity in the network as the existing collator does (i.e. they are stuck in an old block). So it appears to me to be like a stalled subset of nodes.&#xD;&#xA;Inspecting the RPC `system.health()` on the healthy node shows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  peers: 3&#xD;&#xA;  isSyncing: false&#xD;&#xA;  shouldHavePeers: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So that calls my attention: `shouldHavePeers` is `false`, while in the other 3 nodes is `true`. Does anyone know what exactly **shouldHavePeers** means, why is it `false`, and how to make the node axtually accept the other peers ? &#xD;&#xA;Any help will be much appreciated!&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;I know from [here][1] that `should_have_peers` &quot;Might be false for local chains or when running without discovery&quot;. This doesn't help too much, since it is not a Local network and we are not specifically running without discovery." ContentLicense="CC BY-SA 4.0" />
  <row Id="16571" PostHistoryTypeId="5" PostId="4425" RevisionGUID="a31e3b6c-a2a2-4a6f-83cb-6208ad1b6592" CreationDate="2022-08-24T11:32:49.020" UserId="110" Comment="added 100 characters in body" Text="In our parachain setup we have one healthy collator node producing blocks.&#xD;&#xA;I tried to add two bootnodes and one collator to the set (all of them connecting to the existing collator). So for the bootnodes and the other collator, all of them were specifying the first healthy collator as &quot;bootnode&quot;.&#xD;&#xA;&#xD;&#xA;All the nodes discover each other, so they show 3 peers and, calling the RPC method `system.peers()` on each of them shows that they are the correct ones.&#xD;&#xA;&#xD;&#xA;The problem comes when nor the new collator (which is part of the invulnerable set) or the other two nodes, show activity in the network as the existing collator does (i.e. they are stuck in an old block). So it appears to me to be like a stalled subset of nodes.&#xD;&#xA;Inspecting the RPC `system.health()` on the healthy node shows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  peers: 3&#xD;&#xA;  isSyncing: false&#xD;&#xA;  shouldHavePeers: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So that calls my attention: `shouldHavePeers` is `false`, while in the other 3 nodes is `true`. Does anyone know what exactly **shouldHavePeers** means, why is it `false`, and how to make the node axtually accept the other peers ? &#xD;&#xA;Any help will be much appreciated!&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;I know from [here][1] that `should_have_peers` &quot;Might be false for local chains or when running without discovery&quot;. This doesn't help too much, since it is not a Local network and we are not specifically running without discovery.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/sc_rpc/system/struct.Health.html#structfield.should_have_peers" ContentLicense="CC BY-SA 4.0" />
  <row Id="16572" PostHistoryTypeId="2" PostId="4426" RevisionGUID="4f2fdacd-53ea-4456-88fe-041dcf239343" CreationDate="2022-08-24T12:42:15.917" UserId="427" Text="We have a Substrate based solo chain where we need to fetch external data like ETH/USD price using off-chain workers right now. But these OCW doesn't work for reaching consensus on data being fetched and put on chain. is there any substrate based oracle available for solo-chain and not parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16574" PostHistoryTypeId="1" PostId="4426" RevisionGUID="4f2fdacd-53ea-4456-88fe-041dcf239343" CreationDate="2022-08-24T12:42:15.917" UserId="427" Text="Is there any Oracle solution available for substrate based solo chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16575" PostHistoryTypeId="3" PostId="4426" RevisionGUID="4f2fdacd-53ea-4456-88fe-041dcf239343" CreationDate="2022-08-24T12:42:15.917" UserId="427" Text="|offchain-worker|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16576" PostHistoryTypeId="2" PostId="4427" RevisionGUID="9d35a34a-de28-45c1-b830-2fab84264a17" CreationDate="2022-08-24T12:50:30.140" UserId="2484" Text="`on_finalize` is guaranteed to run at the end of a block. A trick is to [move the logic rather to `on_initialize` instead of `on_finalize`](https://substrate-developer-hub.github.io/docs/en/knowledgebase/runtime/benchmarking#minimize-usage-of-on_finalize-and-trasition-logic-to-on_initialize). You could potentially leave it in `on_finalize`, if you know exactly how much weight `on_finalize` takes and add that additional weight to `on_initialize`.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;I couldn't find [the method `clear` implemented for the `StorageMap` here](https://crates.parity.io/frame_support/pallet_prelude/struct.StorageMap.html). You should probably think about using [`remove_all`](https://crates.parity.io/frame_support/pallet_prelude/struct.StorageMap.html#method.remove_all) or [`drain`](https://crates.parity.io/frame_support/pallet_prelude/struct.StorageMap.html#method.drain) for clearing the `StorageMap`.&#xD;&#xA;&#xD;&#xA;In addition to that, I would probably making absolutely sure, that you don't remove (and therefore make a storage write) too many values of the `StorageMap` in one block, because storage writes are expensive. This is the reason, why there is a limit specified for the usage of `remove_all`.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Yes, you are absolutely right, that there is a limit of maximal computation ([weight](https://docs.substrate.io/build/tx-weights-fees/)) for each block.&#xD;&#xA;&#xD;&#xA;But `on_finalize` can exceed the maximal block limit, because the hook is in the `Mandatory` dispatch class. The drawback of this is a longer block execution time than the expected target block time (like 6 seconds for Kusama). But as long as you count the weights for each action (`on_initialize`, `on_finalize`, `on_runtime_upgrade` and the dispatch functions) correctly, then and only then, the `on_finalize` leads to no overweight in the block.&#xD;&#xA;&#xD;&#xA;You can see an example of removing items with a `RemoveKeysLimit` configuration constant [here](https://github.com/paritytech/polkadot/blob/f23b88302570f800234bacc6f92153b9433e3429/runtime/common/src/crowdloan/mod.rs#L523-L533). The `remove` doesn't happen on a `StorageMap`, but you should use this principle with [`drain`](https://crates.parity.io/frame_support/pallet_prelude/struct.StorageMap.html#method.drain) accordingly.&#xD;&#xA;&#xD;&#xA;I hope this answers your question." ContentLicense="CC BY-SA 4.0" />
  <row Id="16578" PostHistoryTypeId="2" PostId="4428" RevisionGUID="84e60f48-4cba-402e-a5aa-8b480ca4b5a2" CreationDate="2022-08-24T13:09:21.017" UserId="2645" Text="Based on the [ink! Cross-Contract Calling documentation][1], I want to reference other smart contract and instantiate it more than once. That would be possible? &#xD;&#xA;&#xD;&#xA;I tried to do it but when I execute the logic twice I get a `Duplicate Contract` error. I don't know if I have to send different parameters to salt_bytes() or if this is not possible right now with `ink`. &#xD;&#xA;&#xD;&#xA;I let you an example of what I have been trying:&#xD;&#xA;&#xD;&#xA;    let new_contract = ContractRef::new(owner)&#xD;&#xA;                .endowment(0)&#xD;&#xA;                .code_hash(self.contract_hash)&#xD;&#xA;                .salt_bytes(self.version.to_le_bytes())&#xD;&#xA;                .instantiate()&#xD;&#xA;                .expect(&quot;failed at instantiating the contract&quot;);&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: https://ink.substrate.io/basics/cross-contract-calling/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16580" PostHistoryTypeId="1" PostId="4428" RevisionGUID="84e60f48-4cba-402e-a5aa-8b480ca4b5a2" CreationDate="2022-08-24T13:09:21.017" UserId="2645" Text="Can I reference and instantiate other ink! smart contract more than once?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16581" PostHistoryTypeId="3" PostId="4428" RevisionGUID="84e60f48-4cba-402e-a5aa-8b480ca4b5a2" CreationDate="2022-08-24T13:09:21.017" UserId="2645" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16582" PostHistoryTypeId="2" PostId="4429" RevisionGUID="a180680d-dcb2-4ef1-8083-d62495896afc" CreationDate="2022-08-24T13:39:29.647" UserId="94" Text="There are multiple possibilities here depending on your needs.  &#xD;&#xA;- Using a runtime migration when there are large one-time changes to be made.&#xD;&#xA;- Using `on_idle` to lazily do some cleanup. `on_idle` get the remaining weight as argument, so you can calculate how much operations you can do. This is easier to use than a migration IMO.&#xD;&#xA;&#xD;&#xA;With `on_initialize` and `on_finalize` you need to be careful not to go overweight, otherwise the block could be rejected by collators if this happens on a para-chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="16584" PostHistoryTypeId="2" PostId="4430" RevisionGUID="9c83b438-2878-4d86-bf5a-7dace2658c00" CreationDate="2022-08-24T14:11:21.870" UserId="94" Text="I will try to answer most of the Qs.  &#xD;&#xA;&gt; When to benchmark? When to use manual read and write additions?&#xD;&#xA;&#xD;&#xA;The short answer: use benchmarks and not manual guesstimates for hooks' weights.  &#xD;&#xA;I can't really justify the practice since its error-prone and breaks easily.  &#xD;&#xA;&#xD;&#xA;&gt; When to use benchmark components?&#xD;&#xA;&#xD;&#xA;I think your observations are correct. Benchmarking components should be used when the weight has a dependency on the size or length of a specific value.  &#xD;&#xA;There are obviously bugs in the code; developers don't always take all variables into account or a later amendment invalidates it.&#xD;&#xA;&#xD;&#xA;&gt; Why do we return 0 weight here, when there was at least the calculation of (n % T::SpendPeriod::get()).is_zero() (which also should consume a little bit processing time)?&#xD;&#xA;&#xD;&#xA;Yes ideally this should have a benchmark. The effort for this is currently ignored.  &#xD;&#xA;The `scheduler` pallet has a lot of `on_initialize` benchmarks if you need inspiration.&#xD;&#xA;&#xD;&#xA;&gt; Can you provide any best practices how to correctly count the weights of `on_initialize`?&#xD;&#xA;&#xD;&#xA;Best not to do it.  &#xD;&#xA;Anyway, a relay chain will not really suffer from slightly incorrect weights since its blocks always execute. Sure there could be longer block times, but then it can be fixed.  &#xD;&#xA;For a para-chain this is not a good idea, since a grossly overweight `on_initialize` could lead collators to miss their block production slot and stall the chain.  &#xD;&#xA;&#xD;&#xA;I will go through your posted cases and open an issue (link: TBD)." ContentLicense="CC BY-SA 4.0" />
  <row Id="16586" PostHistoryTypeId="5" PostId="4429" RevisionGUID="9e22f21d-3ccb-4b64-a39d-2227df1c1054" CreationDate="2022-08-24T14:17:55.877" UserId="94" Comment="added 206 characters in body" Text="There are multiple possibilities here depending on your needs.  &#xD;&#xA;- Using a runtime migration when there are large one-time changes to be made.&#xD;&#xA;- Using `on_idle` to lazily do some cleanup. `on_idle` get the remaining weight as argument, so you can calculate how much operations you can do. This is easier to use than a migration IMO.&#xD;&#xA;&#xD;&#xA;With `on_initialize` and `on_finalize` you need to be careful not to go overweight, otherwise the block could be rejected by collators if this happens on a para-chain.&#xD;&#xA;&#xD;&#xA;EDIT: To actually answer your question from the title:  &#xD;&#xA;Yes there is a limit. It is shared with `on_initialize` such that `on_initialize` returns the weight for both `on_initialize` and `on_finalize`." ContentLicense="CC BY-SA 4.0" />
  <row Id="16587" PostHistoryTypeId="2" PostId="4431" RevisionGUID="0b6933e8-7b73-4e49-bb37-1f5c1202495d" CreationDate="2022-08-24T14:23:22.427" UserId="279" Text="thanks for your feedback! &#xD;&#xA;The `custom js` script must `export` a function call `run` that zombienet will call as part of the assertion.&#xD;&#xA;&#xD;&#xA;You can check as example https://github.com/paritytech/zombienet/blob/main/tests/0008-custom.js&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;async function run(nodeName, networkInfo, args) {&#xD;&#xA;    const {wsUri, userDefinedTypes} = networkInfo.nodesByName[nodeName];&#xD;&#xA;    const api = await zombie.connect(wsUri, userDefinedTypes);&#xD;&#xA;    const validator = await api.query.session.validators();&#xD;&#xA;    return validator.length;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;module.exports = { run }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I will also update the documentation to make notice of this requirement.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="16589" PostHistoryTypeId="4" PostId="4426" RevisionGUID="0f3a40f3-e40a-47e1-9cd9-74b6b276ea65" CreationDate="2022-08-24T14:26:26.537" UserId="29" Comment="edited title" Text="Is there any oracle solution available for substrate based solo chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16590" PostHistoryTypeId="2" PostId="4432" RevisionGUID="c228912e-3cfb-40ba-a4f7-883bae72221c" CreationDate="2022-08-24T14:37:22.253" UserId="94" Text="There are some public archives here: https://wiki.polkadot.network/docs/maintain-endpoints  &#xD;&#xA;But I don't think an external archive is going to cut it for your use case.  &#xD;&#xA;Archive nodes do not directly provide all past events, so you have to query all past blocks and then extract the events from them. This is really slow, and if you need it for multiple chains it will take even longer.  &#xD;&#xA;There are indexer services which can do this for you like the one @Squirrel linked.&#xD;&#xA;&#xD;&#xA;If this is a one off; then you can sync your own archive with `--sync warp --pruning archive` in some minutes which then provides the data faster than an external node.  &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16592" PostHistoryTypeId="4" PostId="4424" RevisionGUID="0c941e86-360e-4728-82dc-2db78604ccad" CreationDate="2022-08-24T15:08:35.073" UserId="1789" Comment="edited title" Text="Run JavaScript Js scripts in Zombienet tests and assert on the completeness or return value" ContentLicense="CC BY-SA 4.0" />
  <row Id="16593" PostHistoryTypeId="2" PostId="4433" RevisionGUID="2f117a4d-f1da-4790-80c7-644c51d65303" CreationDate="2022-08-24T15:33:37.040" UserId="94" Text="You can list all RPC methods like this with cURL and jq:  &#xD;&#xA;```sh&#xD;&#xA;curl -sS -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;}' http://localhost:9933/ | jq '.result.methods'&#xD;&#xA;```&#xD;&#xA;Or call one of your supersig methods like this:  &#xD;&#xA;```sh&#xD;&#xA;curl -sS -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;superSig_listMembers&quot;, &quot;params&quot;: [123]}' http://localhost:9933/&#xD;&#xA;&#xD;&#xA;# Which errors with a weird message...&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:1,&quot;message&quot;:&quot;Runtime error&quot;,&quot;data&quot;:&quot;Application(Execution(Other(\&quot;Exported method SuperSigApi_list_members is not found\&quot;)))&quot;},&quot;id&quot;:1}%                      &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Anyway, the browser error message gives it away.  &#xD;&#xA;```pre&#xD;&#xA;API/INIT: RPC methods not decorated: superSig_getProposalState, superSig_getSupersigId, superSig_getUserSupersigs, superSig_listMembers, superSig_listProposals&#xD;&#xA;```&#xD;&#xA;So it should be fixed by [this](https://substrate.stackexchange.com/questions/2210/custom-rpcs-not-decorated)." ContentLicense="CC BY-SA 4.0" />
  <row Id="16595" PostHistoryTypeId="5" PostId="4433" RevisionGUID="3d449bea-0e7b-435d-b963-91f3a95a2e30" CreationDate="2022-08-24T15:38:41.913" UserId="94" Comment="added 90 characters in body" Text="You can list all RPC methods like this with cURL and jq:  &#xD;&#xA;```sh&#xD;&#xA;curl -sS -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;}' http://localhost:9933/ | jq '.result.methods'&#xD;&#xA;```&#xD;&#xA;Or call one of your supersig methods like this:  &#xD;&#xA;```sh&#xD;&#xA;curl -sS -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;superSig_listMembers&quot;, &quot;params&quot;: [123]}' http://localhost:9933/&#xD;&#xA;&#xD;&#xA;# Which errors with a weird message...&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:1,&quot;message&quot;:&quot;Runtime error&quot;,&quot;data&quot;:&quot;Application(Execution(Other(\&quot;Exported method SuperSigApi_list_members is not found\&quot;)))&quot;},&quot;id&quot;:1}%                      &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Anyway, the browser error message gives it away.  &#xD;&#xA;```pre&#xD;&#xA;API/INIT: RPC methods not decorated: superSig_getProposalState, superSig_getSupersigId, superSig_getUserSupersigs, superSig_listMembers, superSig_listProposals&#xD;&#xA;```&#xD;&#xA;So it should be fixed by [this](https://substrate.stackexchange.com/questions/2210/custom-rpcs-not-decorated).  &#xD;&#xA;Normally the node should also print that error, but your node isn't printing anything." ContentLicense="CC BY-SA 4.0" />
  <row Id="16596" PostHistoryTypeId="6" PostId="4420" RevisionGUID="d87a5f8a-9c56-4cc2-8ea7-5a2d8f213af0" CreationDate="2022-08-24T17:08:32.650" UserId="34" Comment="edited tags" Text="|ink|pallet-contracts|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16598" PostHistoryTypeId="10" PostId="4332" RevisionGUID="b08fcf5e-638c-4080-b0a3-91e03bf43818" CreationDate="2022-08-24T17:09:46.370" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:85,&quot;DisplayName&quot;:&quot;Squirrel&quot;},{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="16599" PostHistoryTypeId="52" PostId="4421" RevisionGUID="6c185f27-214a-42de-9513-1140f9cf6d04" CreationDate="2022-08-24T17:11:18.763" />
  <row Id="16605" PostHistoryTypeId="50" PostId="3931" RevisionGUID="98ca3d16-eb35-41e3-aa75-dcffe3373e68" CreationDate="2022-08-24T23:02:45.237" UserId="-1" />
  <row Id="16613" PostHistoryTypeId="2" PostId="4437" RevisionGUID="08e639e3-7dee-40db-9033-866f5d7a5fbf" CreationDate="2022-08-25T06:11:29.860" UserId="3009" Text="I found this puzzle in my [last question][1], which is from one answer of my question. &#xD;&#xA;&#xD;&#xA;There are at least two StorageMap structs in substrate framework.Their links are listed below:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageMap.html&#xD;&#xA;https://crates.parity.io/frame_support/pallet_prelude/struct.StorageMap.html&#xD;&#xA;&#xD;&#xA;They are StroageMap structs with little difference. They have different function sets at first glance. I want to figure out which struct should I pick up when coding a pallet in substrate?&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4417/is-there-time-limit-or-weight-limit-when-calling-on-finalize-hook" ContentLicense="CC BY-SA 4.0" />
  <row Id="16615" PostHistoryTypeId="1" PostId="4437" RevisionGUID="08e639e3-7dee-40db-9033-866f5d7a5fbf" CreationDate="2022-08-25T06:11:29.860" UserId="3009" Text="Are both of them same StorageMap？" ContentLicense="CC BY-SA 4.0" />
  <row Id="16616" PostHistoryTypeId="3" PostId="4437" RevisionGUID="08e639e3-7dee-40db-9033-866f5d7a5fbf" CreationDate="2022-08-25T06:11:29.860" UserId="3009" Text="|storage|struct|crates|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16621" PostHistoryTypeId="2" PostId="4440" RevisionGUID="c0b154b5-d945-456f-a977-ab0b532500b6" CreationDate="2022-08-25T06:52:58.027" UserId="3081" Text="I am getting type as `Codec` while using `api.query.&lt;module&gt;&lt;method&gt;`. The types should be specific or am i missing something. Is there any way to convert this into the right type." ContentLicense="CC BY-SA 4.0" />
  <row Id="16623" PostHistoryTypeId="1" PostId="4440" RevisionGUID="c0b154b5-d945-456f-a977-ab0b532500b6" CreationDate="2022-08-25T06:52:58.027" UserId="3081" Text="Polkadot js API Type Issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="16624" PostHistoryTypeId="3" PostId="4440" RevisionGUID="c0b154b5-d945-456f-a977-ab0b532500b6" CreationDate="2022-08-25T06:52:58.027" UserId="3081" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16625" PostHistoryTypeId="2" PostId="4441" RevisionGUID="85d87b45-9955-46af-b1a7-3ccc212aedbe" CreationDate="2022-08-25T07:04:58.123" UserId="2102" Text="The one that you should use is the [first one][1]. If you take a look at the `pallet_prelude` crate, you can see that the `StorageMap` used across most of the tutorials is being 'imported' from the `storage::types` crate.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub use crate::{&#xD;&#xA;		dispatch::{DispatchError, DispatchResult, DispatchResultWithPostInfo, Parameter},&#xD;&#xA;		ensure,&#xD;&#xA;		inherent::{InherentData, InherentIdentifier, ProvideInherent},&#xD;&#xA;		storage,&#xD;&#xA;		storage::{&#xD;&#xA;			bounded_vec::BoundedVec,&#xD;&#xA;			types::{&#xD;&#xA;				CountedStorageMap, Key as NMapKey, OptionQuery, StorageDoubleMap, StorageMap,&#xD;&#xA;		HERE --&gt; StorageNMap, StorageValue, ValueQuery,&#xD;&#xA;			},&#xD;&#xA;		},&#xD;&#xA;		traits::{&#xD;&#xA;			ConstU32, EnsureOrigin, Get, GetDefault, GetStorageVersion, Hooks, IsType,&#xD;&#xA;			PalletInfoAccess, StorageInfoTrait,&#xD;&#xA;		},&#xD;&#xA;		weights::{DispatchClass, Pays, Weight},&#xD;&#xA;		Blake2_128, Blake2_128Concat, Blake2_256, CloneNoBound, DebugNoBound, EqNoBound, Identity,&#xD;&#xA;		PartialEqNoBound, RuntimeDebug, RuntimeDebugNoBound, Twox128, Twox256, Twox64Concat,&#xD;&#xA;	};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So basically, when you call `frame_support::pallet_prelude::StorageMap` you are calling the one inside the `storage::types` crate.&#xD;&#xA;&#xD;&#xA;As for the question 'why are there two StorageMaps?' I think the second one is used in old versions of FRAME, where you would use `decl_storage` to create your structures. It has to exist because although substrate is being updated constantly, it is backward compatible with old implementations of it. But I'm not 100% sure thats the reason.&#xD;&#xA;&#xD;&#xA;Taking a look at the `storage::StorageMap`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// A strongly-typed map in storage.&#xD;&#xA;///&#xD;&#xA;/// Details on implementation can be found at [`generator::StorageMap`].&#xD;&#xA;pub trait StorageMap&lt;K: FullEncode, V: FullCodec&gt; {&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and then the `generator::StorageMap`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Generator for `StorageMap` used by `decl_storage`.&#xD;&#xA;/// ...&#xD;&#xA;&#xD;&#xA;pub trait StorageMap&lt;K: FullEncode, V: FullCodec&gt; {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The docs of the implementation state that the generator is used by the `decl_storage` function.&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageMap.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="16627" PostHistoryTypeId="2" PostId="4442" RevisionGUID="bfb0d3e7-79ee-4e0a-a6eb-de910fe5daf8" CreationDate="2022-08-25T07:57:01.277" UserId="1970" Text="Remember that the full types are only available at runtime, i.e. all the endpoints and methods and their types are available in the on-chain runtime via metadata&#xD;&#xA;&#xD;&#xA;When operating in a TypeScript environment, this means you would need to apply static types &quot;augmented&quot; for your specific chain - no two Substrate-based chains are the same&#xD;&#xA;&#xD;&#xA;The [pjs api docs](https://polkadot.js.org/docs/api/FAQ#since-upgrading-to-the-7x-series-typescript-augmentation-is-missing) has a section detailing how to apply augmentation.&#xD;&#xA;&#xD;&#xA;It has [also been covered before](https://substrate.stackexchange.com/a/3618/627) in another answer which has code samples which I am shortening below with attribution to the answer linked -&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// apply augmentation first, before any usage&#xD;&#xA;import &quot;@polkadot/api-augment&quot;&#xD;&#xA;&#xD;&#xA;// normal imports&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;&#xD;&#xA;&#xD;&#xA;// ... all code with augmented types follow&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16629" PostHistoryTypeId="2" PostId="4443" RevisionGUID="6740e9ae-5d1c-413e-a6d4-7658dd085db8" CreationDate="2022-08-25T08:05:48.943" UserId="100" Text="In case you haven't found it already, the polkadot.js docs have a section on contracts where you can learn how to [read values][1] and [execute transactions][2] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api-contract/start/contract.read&#xD;&#xA;  [2]: https://polkadot.js.org/docs/api-contract/start/contract.tx" ContentLicense="CC BY-SA 4.0" />
  <row Id="16631" PostHistoryTypeId="2" PostId="4444" RevisionGUID="21a473aa-9051-4667-809f-984ac3b9f144" CreationDate="2022-08-25T08:18:00.900" UserId="627" Text="`05000046ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a30` is an encoded call, but it is not an encoded extrinsic. So you won't be able to submit that into the pool, the format is incorrect.&#xD;&#xA;&#xD;&#xA;Above you have &#xD;&#xA;&#xD;&#xA;`&lt;call index&gt;&lt;call data&gt;` &#xD;&#xA;&#xD;&#xA;any extrinsic is in the format of &#xD;&#xA;&#xD;&#xA;`&lt;compact length&gt;&lt;version&gt;&lt;signature (if signed)&gt;&lt;extension data&gt;&lt;call index&gt;&lt;call data&gt;`&#xD;&#xA;&#xD;&#xA;Since the length is missing (and then the version flag with the signed/unsigned bit), the runtime cannot decode it to submit to the pool." ContentLicense="CC BY-SA 4.0" />
  <row Id="16633" PostHistoryTypeId="2" PostId="4445" RevisionGUID="f12dd906-a48c-441c-9eb3-c5ba3f58400c" CreationDate="2022-08-25T08:48:46.210" UserId="627" Text="This is a duplicate of a [submitted issue](https://github.com/polkadot-js/apps/issues/8035), please ensure to only submit a single to actually save time, i.e. &quot;calling all pockets&quot; means it is actually less likely to be answered.&#xD;&#xA;&#xD;&#xA;As explained in the answer above, your experience with renaming a known id into an unknown id and then not being able to extract the author is entirely expected.&#xD;&#xA;&#xD;&#xA;Each consensus log item, be it for Babe, Aura, Pow or Nimbus has specific logic for extracting the author based on the type of information contained in the logs. &#xD;&#xA;&#xD;&#xA;In some cases this would mean mapping an index in the logs to the session validators, in other cases it may mean using the actual log data as the public key and yet it other cases it may mean accessing a chain-specific author mapping state entry.&#xD;&#xA;&#xD;&#xA;For anything unknown, the API doesn't try and guess intent. It works on what it can accurately map.&#xD;&#xA;&#xD;&#xA;The JS API will only map to the known consensus ids and follow the specific logic for those to extract author information. If you decide to rename &quot;BASE&quot; to &quot;RRSC&quot; without changing logic, there is no way of knowing what you actually mean and how the author extraction is supposed to work. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16635" PostHistoryTypeId="2" PostId="4446" RevisionGUID="7bcbea63-dc38-47ba-a500-e411c449c5e3" CreationDate="2022-08-25T08:55:59.123" UserId="2722" Text="&#xD;&#xA;&#xD;&#xA;i need to create nft pallet with substrate . i have write these codes but when i run this command : `cargo build --release` it show me this errors :&#xD;&#xA;&#xD;&#xA;      --- stderr&#xD;&#xA;         Compiling base-nft v4.0.0-dev (/home/kianoush/blockchain_project/substrate_nft/pallets/base-nft)&#xD;&#xA;      error[E0433]: failed to resolve: use of undeclared crate or module `sp_runtime`&#xD;&#xA;        --&gt; /home/kianoush/blockchain_project/substrate_nft/pallets/base-nft/src/lib.rs:14:5&#xD;&#xA;         |&#xD;&#xA;      14 | use sp_runtime::{&#xD;&#xA;         |     ^^^^^^^^^^ use of undeclared crate or module `sp_runtime`&#xD;&#xA;    &#xD;&#xA;      error[E0432]: unresolved import `sp_runtime`&#xD;&#xA;        --&gt; /home/kianoush/blockchain_project/substrate_nft/pallets/base-nft/src/lib.rs:14:5&#xD;&#xA;         |&#xD;&#xA;      14 | use sp_runtime::{&#xD;&#xA;         |     ^^^^^^^^^^ help: a similar path exists: `frame_support::sp_runtime`&#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this error ?**&#xD;&#xA;&#xD;&#xA;My Codes : &#xD;&#xA;&#xD;&#xA;        #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    #[warn(unused_imports)]&#xD;&#xA;    &#xD;&#xA;    use frame_support::{&#xD;&#xA;    	inherent::Vec,&#xD;&#xA;    	pallet_prelude::{ValueQuery, *},&#xD;&#xA;    	traits::Currency,Twox64Concat,&#xD;&#xA;    };&#xD;&#xA;    use frame_system::pallet_prelude::*;&#xD;&#xA;    /// Edit this file to define custom logic or remove it if it is not needed.&#xD;&#xA;    /// Learn more about FRAME and the core library of Substrate FRAME pallets:&#xD;&#xA;    /// &lt;https://docs.substrate.io/v3/runtime/frame&gt;&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    use sp_runtime::{&#xD;&#xA;    	traits::{&#xD;&#xA;    		AtLeast32BitUnsigned, CheckedAdd, CheckedSub, Hash, MaybeSerializeDeserialize, Member, One,&#xD;&#xA;    		Zero,&#xD;&#xA;    	},&#xD;&#xA;    	DispatchError, DispatchResult,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    /// Class info&#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;    #[scale_info(skip_type_params(TokenId, AccountId, Data))]&#xD;&#xA;    pub struct ClassInfo&lt;TokenId, AccountId, Data&gt; {&#xD;&#xA;    	/// Class metadata&#xD;&#xA;    	pub metadata: Vec&lt;u8&gt;,&#xD;&#xA;    	/// Total issuance for the class&#xD;&#xA;    	pub total_issuance: TokenId,&#xD;&#xA;    	/// Class owner&#xD;&#xA;    	pub owner: AccountId,&#xD;&#xA;    	/// Class Properties&#xD;&#xA;    	pub data: Data,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;    #[scale_info(skip_type_params(AccountId, Data))]&#xD;&#xA;    pub struct TokenInfo&lt;AccountId, Data&gt; {&#xD;&#xA;    	/// Token metadata&#xD;&#xA;    	pub metadata: Vec&lt;u8&gt;,&#xD;&#xA;    	/// Token owner&#xD;&#xA;    	pub owners: Vec&lt;AccountId&gt;,&#xD;&#xA;    	/// Token Properties&#xD;&#xA;    	pub data: Data,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    &#xD;&#xA;    	use super::*;&#xD;&#xA;    &#xD;&#xA;    	#[derive(Default, Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug)]&#xD;&#xA;    	pub struct TokenByOwnerData {&#xD;&#xA;    		pub percent_owned: u8,&#xD;&#xA;    		pub token_id: u32,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;    		/// The class ID type&#xD;&#xA;    		type ClassId: Parameter + Member + Default + Copy;&#xD;&#xA;    		/// The token ID type&#xD;&#xA;    		type TokenId: Parameter + Member + Default + Copy;&#xD;&#xA;    		/// The class properties type&#xD;&#xA;    		type ClassData: Parameter + Member + Default;&#xD;&#xA;    		/// The token properties type&#xD;&#xA;    		type TokenData: Parameter + Member + Default;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	pub type ClassInfoOf&lt;T&gt; = ClassInfo&lt;&#xD;&#xA;    		&lt;T as Config&gt;::TokenId,&#xD;&#xA;    		&lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;    		&lt;T as Config&gt;::ClassData,&#xD;&#xA;    	&gt;;&#xD;&#xA;    	pub type TokenInfoOf&lt;T&gt; =&#xD;&#xA;    		TokenInfo&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as Config&gt;::TokenData&gt;;&#xD;&#xA;    &#xD;&#xA;    	pub type GenesisTokenData&lt;T&gt; = (&#xD;&#xA;    		&lt;T as frame_system::Config&gt;::AccountId, // Token owner&#xD;&#xA;    		Vec&lt;u8&gt;,                                // Token metadata&#xD;&#xA;    		&lt;T as Config&gt;::TokenData,&#xD;&#xA;    	);&#xD;&#xA;    	pub type GenesisTokens&lt;T&gt; = (&#xD;&#xA;    		&lt;T as frame_system::Config&gt;::AccountId, // Token class owner&#xD;&#xA;    		Vec&lt;u8&gt;,                                // Token class metadata&#xD;&#xA;    		&lt;T as Config&gt;::ClassData,&#xD;&#xA;    		Vec&lt;GenesisTokenData&lt;T&gt;&gt;, // Vector of tokens belonging to this class&#xD;&#xA;    	);&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    	#[pallet::without_storage_info]&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	/// Next available class ID.&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn next_class_id)]&#xD;&#xA;    	pub type NextClassId&lt;T: Config&gt; = StorageValue&lt;_, T::ClassId, ValueQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    	/// Next available token ID.&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn next_token_id)]&#xD;&#xA;    	pub type NextTokenId&lt;T: Config&gt; =&#xD;&#xA;    		StorageMap&lt;_, Twox64Concat, T::ClassId, T::TokenId, ValueQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    	/// Store class info.&#xD;&#xA;    	///&#xD;&#xA;    	/// Returns `None` if class info not set or removed.&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn classes)]&#xD;&#xA;    	pub type Classes&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, T::ClassId, ClassInfoOf&lt;T&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    	/// Store token info.&#xD;&#xA;    	///&#xD;&#xA;    	/// Returns `None` if token info not set or removed.&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn tokens)]&#xD;&#xA;    	pub type Tokens&lt;T: Config&gt; =&#xD;&#xA;    		StorageDoubleMap&lt;_, Twox64Concat, T::ClassId, Twox64Concat, T::TokenId, TokenInfoOf&lt;T&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    	// Pallets use events to inform users when important changes are made.&#xD;&#xA;    	// https://docs.substrate.io/v3/runtime/events-and-errors&#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// Event documentation should end with an array that provides descriptive names for event&#xD;&#xA;    		/// parameters. [something, who]&#xD;&#xA;    		SomethingStored(u32, T::AccountId),&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	/// Error for non-fungible-token module.&#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// No available class ID&#xD;&#xA;    		NoAvailableClassId,&#xD;&#xA;    		/// No available token ID&#xD;&#xA;    		NoAvailableTokenId,&#xD;&#xA;    		/// Token(ClassId, TokenId) not found&#xD;&#xA;    		TokenNotFound,&#xD;&#xA;    		/// Class not found&#xD;&#xA;    		ClassNotFound,&#xD;&#xA;    		/// The operator is not the owner of the token and has no permission&#xD;&#xA;    		NoPermission,&#xD;&#xA;    		/// Arithmetic calculation overflow&#xD;&#xA;    		NumOverflow,&#xD;&#xA;    		/// Can not destroy class&#xD;&#xA;    		/// Total issuance is not 0&#xD;&#xA;    		CannotDestroyClass,&#xD;&#xA;    		/// Sender tried to send more ownership than they have&#xD;&#xA;    		SenderInsufficientPercentage,&#xD;&#xA;    		/// Wrong arguments&#xD;&#xA;    		WrongArguments,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    	pub fn create_class(&#xD;&#xA;    		origin: OriginFor&lt;T&gt;,&#xD;&#xA;    		metadata: Vec&lt;u8&gt;,&#xD;&#xA;    		data: T::ClassData,&#xD;&#xA;    	) -&gt; DispatchResult {&#xD;&#xA;    		let who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    		let class_id = NextClassId::&lt;T&gt;::try_mutate(|id| -&gt; Result&lt;T::ClassId, DispatchError&gt; {&#xD;&#xA;    			let current_id = *id;&#xD;&#xA;    			*id = id.checked_add(&amp;One::one()).ok_or(Error::&lt;T&gt;::NoAvailableClassId)?;&#xD;&#xA;    			Ok(current_id)&#xD;&#xA;    		})?;&#xD;&#xA;    &#xD;&#xA;    		let info =&#xD;&#xA;    			ClassInfo { metadata, total_issuance: Default::default(), owner: who.clone(), data };&#xD;&#xA;    		Classes::&lt;T&gt;::insert(class_id, info);&#xD;&#xA;    &#xD;&#xA;    		Ok(class_id)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16637" PostHistoryTypeId="1" PostId="4446" RevisionGUID="7bcbea63-dc38-47ba-a500-e411c449c5e3" CreationDate="2022-08-25T08:55:59.123" UserId="2722" Text="use of undeclared crate or module `sp_runtime`" ContentLicense="CC BY-SA 4.0" />
  <row Id="16638" PostHistoryTypeId="3" PostId="4446" RevisionGUID="7bcbea63-dc38-47ba-a500-e411c449c5e3" CreationDate="2022-08-25T08:55:59.123" UserId="2722" Text="|substrate-node|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16639" PostHistoryTypeId="2" PostId="4447" RevisionGUID="1bd8f771-2608-449d-8b4d-e434dd2cf292" CreationDate="2022-08-25T09:03:55.373" UserId="14" Text="You should add `sp-runtime` to your pallet's `Cargo.toml` file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;sp-runtime = { default-features = false, git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;master&quot; }&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or try to do what the compiler is telling you `&quot;help: a similar path exists: `frame_support::sp_runtime`&quot;`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use frame_support::sp_runtime::{&lt;Module1&gt;, &lt;Module2&gt;, ...},&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16641" PostHistoryTypeId="5" PostId="4406" RevisionGUID="9f1dfeac-ad15-4b62-8d55-dbdd2f6392e8" CreationDate="2022-08-25T09:13:18.550" UserId="28" Comment="edited body" Text="Rocks DB is a very complex database, which did have strange outlier behaviors we never fully understood.&#xD;&#xA;&#xD;&#xA;I actually spoke about that to some extent here: https://youtu.be/Qa6sTyUqgek?t=4573&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;There were certain benchmarks where Rocks DB totally went crazy and gave huge outliers, and because of that, we had to remove Rocks DB from the main benchmarking pipeline (using an in-memory db), and instead isolate the database benchmarking to a separate process.&#xD;&#xA;&#xD;&#xA;So unfortunately I do not have an answer &quot;why exactly&quot; these outliers exist, but it is something that is known about from our experience with the DB, and it is something reasonable to expect when using it. As Oliver mentions, your benchmark results show that the average time calculated is quite accurate, and you should not really get yourself hung up on the outliers. This is why we take averages and median values.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/k3KZe.jpg&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16646" PostHistoryTypeId="5" PostId="4430" RevisionGUID="d53405d8-086d-438e-a687-3bb66da9ec5b" CreationDate="2022-08-25T09:57:40.480" UserId="94" Comment="added 353 characters in body" Text="I will try to answer most of the Qs.  &#xD;&#xA;&gt; When to benchmark? When to use manual read and write additions?&#xD;&#xA;&#xD;&#xA;The short answer: use benchmarks and not manual guesstimates for hooks' weights.  &#xD;&#xA;I can't really justify the practice since its error-prone and breaks easily.  &#xD;&#xA;&#xD;&#xA;&gt; When to use benchmark components?&#xD;&#xA;&#xD;&#xA;I think your observations are correct. Benchmarking components should be used when the weight has a dependency on the size or length of a specific value.  &#xD;&#xA;There are obviously bugs in the code; developers don't always take all variables into account or a later amendment invalidates it.  &#xD;&#xA;&#xD;&#xA;One exception exists for storage. The storage weights are benchmarked with a [full snapshot](https://github.com/paritytech/polkadot/blob/c3d5882a64e5330a04d9b2486891e30ac9c58768/runtime/polkadot/constants/src/weights/paritydb_weights.rs#L22) and therefore always worst case. So you don't have to populate all maps every time you write a benchmark.&#xD;&#xA;&#xD;&#xA;&gt; Why do we return 0 weight here, when there was at least the calculation of (n % T::SpendPeriod::get()).is_zero() (which also should consume a little bit processing time)?&#xD;&#xA;&#xD;&#xA;Yes ideally this should have a benchmark. The effort for this is currently ignored.  &#xD;&#xA;The `scheduler` pallet has a lot of `on_initialize` benchmarks if you need inspiration.&#xD;&#xA;&#xD;&#xA;&gt; Can you provide any best practices how to correctly count the weights of `on_initialize`?&#xD;&#xA;&#xD;&#xA;Best not to do it.  &#xD;&#xA;Anyway, a relay chain will not really suffer from slightly incorrect weights since its blocks always execute. Sure there could be longer block times, but then it can be fixed.  &#xD;&#xA;For a para-chain this is not a good idea, since a grossly overweight `on_initialize` could lead collators to miss their block production slot and stall the chain.  &#xD;&#xA;&#xD;&#xA;I will go through your posted cases and open an issue (link: TBD)." ContentLicense="CC BY-SA 4.0" />
  <row Id="16648" PostHistoryTypeId="2" PostId="4449" RevisionGUID="72d203d8-7be3-49bf-b2b2-446c34cf4e01" CreationDate="2022-08-25T10:22:38.547" UserId="2337" Text="I am trying to validate an ink contract:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;source&quot;: {&#xD;&#xA;        &quot;hash&quot;: &quot;0xb7233c251935e3ea430f99396cbb9430dd44ac2d07e447fd2003e81ad1d4a577&quot;,&#xD;&#xA;        &quot;language&quot;: &quot;ink! 3.3.1&quot;,&#xD;&#xA;        &quot;compiler&quot;: &quot;rustc 1.65.0-nightly&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;contract&quot;: {&#xD;&#xA;        &quot;name&quot;: &quot;my_psp22_metadata&quot;,&#xD;&#xA;        &quot;version&quot;: &quot;2.2.0&quot;,&#xD;&#xA;        &quot;authors&quot;: [&#xD;&#xA;            &quot;Author's email&quot;&#xD;&#xA;        ]&#xD;&#xA;    },&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The contract was successfully [deployed on shiden][1] so i am sure that metadata is correct.&#xD;&#xA;&#xD;&#xA;The problem is that i can't validate the metadata and interact with the contract.&#xD;&#xA;I tested validation on the latest json schema from the ink master branch.&#xD;&#xA;Here is the errors - https://www.jsonschemavalidator.net/s/EyN4d6Az&#xD;&#xA;&#xD;&#xA;I guess the schema is incorrect or outdated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkaholic.io/tx/0x2c986a6cb47b94a9e50f5d3f660e0f37177989594eb087bf7309c2e15e2340c8" ContentLicense="CC BY-SA 4.0" />
  <row Id="16650" PostHistoryTypeId="1" PostId="4449" RevisionGUID="72d203d8-7be3-49bf-b2b2-446c34cf4e01" CreationDate="2022-08-25T10:22:38.547" UserId="2337" Text="Validation error during ink contract metadata validation" ContentLicense="CC BY-SA 4.0" />
  <row Id="16651" PostHistoryTypeId="3" PostId="4449" RevisionGUID="72d203d8-7be3-49bf-b2b2-446c34cf4e01" CreationDate="2022-08-25T10:22:38.547" UserId="2337" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16652" PostHistoryTypeId="5" PostId="4447" RevisionGUID="cb558e02-c640-41fc-b0d0-ebef1b1564a4" CreationDate="2022-08-25T10:30:40.107" UserId="14" Comment="deleted 2 characters in body" Text="You should add `sp-runtime` to your pallet's `Cargo.toml` file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;sp-runtime = { default-features = false, git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;master&quot; }&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or try to do what the compiler is telling you `&quot;help: a similar path exists: frame_support::sp_runtime&quot;`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use frame_support::sp_runtime::{&lt;Module1&gt;, &lt;Module2&gt;, ...},&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16653" PostHistoryTypeId="2" PostId="4450" RevisionGUID="3b213ad5-60ce-454c-a847-e3354760aa25" CreationDate="2022-08-25T10:45:49.877" UserId="655" Text="Take a look at this https://github.com/Supercolony-net/typechain-polkadot, we are working on it, and in the future, there will be a lot of new features!" ContentLicense="CC BY-SA 4.0" />
  <row Id="16655" PostHistoryTypeId="2" PostId="4451" RevisionGUID="4b08a0f1-6463-4293-a798-34e33f394261" CreationDate="2022-08-25T12:33:09.023" UserId="2673" Text="Did you use the same salt when instantiating for the second time? Looks to me like it might be the problem, since the salt is used to determine contract's account ID." ContentLicense="CC BY-SA 4.0" />
  <row Id="16657" PostHistoryTypeId="2" PostId="4452" RevisionGUID="d53d8e75-9e1c-40ff-8a18-c0b9f726a38e" CreationDate="2022-08-25T12:46:12.987" UserId="73" Text="&gt; Substrate will, by default, store every event in a block in a storage value Event of type Vec&lt;EventRecord&gt; in the system module, which involves reading &amp; writing this full vector each time, as explained here https://stackoverflow.com/questions/57219830/what-is-the-cost-of-event-storage-in-substrate.&#xD;&#xA;&#xD;&#xA;You don't read the entire vector every time in the runtime. Instead we have this specialized `append` function. This takes the value on the host side, appends your new data and puts back the value.&#xD;&#xA;&#xD;&#xA;With the old state trie implementation it could lead to problems for Parachains, because in the next block when we delete the events they could may end up in the storage proof. However, with the new state trie implementation `state_version = 1` this isn't a problem any more.&#xD;&#xA;&gt; The time it takes to read/write to the database increases with the size of the object being read, at least eventually in expectation.&#xD;&#xA;&#xD;&#xA;These read/writes are also not done in the database. No write while executing a block in Substrate is ever going directly to the database. Writes are always being stored in the `Overlay`. Any further read of a value that was written will also be answered by the `Overlay`. As this `Overlay` is in memory the access to it is &quot;free&quot; when seen from the benchmarking perspective. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; If an extrinsic emits an event with has some payload with some size, say like a user provided Vec&lt;u8&gt;, then an attacker can submit a series of such extrinsics, radically increasing the size of this vector, and as a result making the real computational weight of all subsequent extrinsics in that same block much greater than what is reported by their weight functions, and also no fee is paid for this computation. In essence all weight functions for those extrinsics are wrong now. This problem increases in severity independently with block weight/length limits, and the size of individual events, because both independently can be used to bloat the size of Events.&#xD;&#xA;&#xD;&#xA;Given my statements above, the problem statement is not really true. However, you could start by only storing the hash of some data in the event. Why store the full data? The full data can be restored from the state if needed. Then appending an event should always be constant time. This mainly depends on the system allocator on how fast it can allocate memory and if allocating memory will take more time with more memory. " ContentLicense="CC BY-SA 4.0" />
  <row Id="16659" PostHistoryTypeId="2" PostId="4453" RevisionGUID="10a50396-83a8-49a7-ac5b-ff12a161644a" CreationDate="2022-08-25T12:47:33.610" UserId="2673" Text="I don't think you should rely on `Externalities::build()` to do the environment setup for your benchmarks, because it will not be called when you run your benchmarks (opposed to running benchmark test suite). AFAIK people usually use separate setup-helper functions for benchmarks. You can have a look a [this file](https://github.com/paritytech/substrate/blob/1399afdcd8ab4d7fad149c96f9cadcaf04b94f86/frame/child-bounties/src/benchmarking.rs). There's `setup_bounty`, `setup_child_bounty`, `activate_bounty`, etc. I think that's the way to go." ContentLicense="CC BY-SA 4.0" />
  <row Id="16661" PostHistoryTypeId="52" PostId="4440" RevisionGUID="9f61cafa-7875-4464-9623-e3337019c8e0" CreationDate="2022-08-25T14:54:09.633" />
  <row Id="16662" PostHistoryTypeId="50" PostId="3876" RevisionGUID="636c87b0-6d12-402b-9612-708367d8317f" CreationDate="2022-08-25T15:02:00.183" UserId="-1" />
  <row Id="16663" PostHistoryTypeId="6" PostId="4449" RevisionGUID="1e2ea354-7887-4603-833a-baf97ecab4a5" CreationDate="2022-08-25T16:15:53.587" UserId="29" Comment="edited tags" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16664" PostHistoryTypeId="2" PostId="4454" RevisionGUID="686ccffd-5498-486d-b382-99a1d5663024" CreationDate="2022-08-25T16:18:14.707" UserId="74" Text="We are configuring the block time to be 6 seconds in our parachain and yet in Polkadot apps it reliably creates blocks every 12 seconds. Is there something I'm missing here?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hmMTM.png&#xD;&#xA;&#xD;&#xA;The code we are using in the runtime:&#xD;&#xA;```&#xD;&#xA;/// This determines the average expected block time that we are targeting.&#xD;&#xA;/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`.&#xD;&#xA;/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked&#xD;&#xA;/// up by `pallet_aura` to implement `fn slot_duration()`.&#xD;&#xA;///&#xD;&#xA;/// Change this to adjust the block time.&#xD;&#xA;pub const MILLISECS_PER_BLOCK: u64 = 6_000;&#xD;&#xA;&#xD;&#xA;pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;&#xD;&#xA;&#xD;&#xA;// Time is measured by number of blocks.&#xD;&#xA;pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);&#xD;&#xA;pub const HOURS: BlockNumber = MINUTES * 60;&#xD;&#xA;pub const DAYS: BlockNumber = HOURS * 24;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The link to the runtime code itself: https://github.com/webb-tools/dkg-substrate/blob/drew/parachain/parachain/runtime/rococo/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="16666" PostHistoryTypeId="1" PostId="4454" RevisionGUID="686ccffd-5498-486d-b382-99a1d5663024" CreationDate="2022-08-25T16:18:14.707" UserId="74" Text="Block times in parachain are twice as long as configured" ContentLicense="CC BY-SA 4.0" />
  <row Id="16667" PostHistoryTypeId="3" PostId="4454" RevisionGUID="686ccffd-5498-486d-b382-99a1d5663024" CreationDate="2022-08-25T16:18:14.707" UserId="74" Text="|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16668" PostHistoryTypeId="5" PostId="1082" RevisionGUID="09b38100-79a1-40a7-a971-015d8485a388" CreationDate="2022-08-25T16:19:23.843" UserId="29" Comment="update links" Text="This is a hard question to answer but I will try to give my 2 **..**'s on what was helpful for me when I started on the Substrate path as a Polkadot Support Engineer at Parity. Maybe some others can share their perspective as well.&#xD;&#xA;&#xD;&#xA;If you have a bit of a programming background and your goal is that you want to learn blockchain to become familiar with Substrate I would recommend the following:&#xD;&#xA;&#xD;&#xA;Learn blockchain fundamentals with Bill Laboon:&#xD;&#xA;- [Blockchain Fundamentals](https://youtube.com/playlist?list=PLxVihxZC42nF_MCN9PTvZMIifRjx9cZ2J)&#xD;&#xA;&#xD;&#xA;Become familiar with [Substrate Docs](https://substrate.io):&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/overview&#xD;&#xA;&#xD;&#xA;Do **all** the Substrate tutorials:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3&#xD;&#xA;&#xD;&#xA;Subscribe &amp; watch videos&#xD;&#xA;- [Parity Tech YouTube](https://www.youtube.com/c/ParityTech)&#xD;&#xA;&#xD;&#xA;Learn about the [different pallets](https://paritytech.github.io/substrate/master/sc_service/index.html?search=pallet) available to you. Read them.&#xD;&#xA;- Use the full Substrate [node runtime](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs) as a reference as to how to configure some of these pallets&#xD;&#xA;- Pick a pallet and try to implement it yourself using the [Substrate Node Template](https://github.com/substrate-developer-hub/substrate-node-template)&#xD;&#xA;&#xD;&#xA;Build stuff&#xD;&#xA;- Don't be afraid to get your &quot;hands dirty&quot;&#xD;&#xA;- Pick something that you don't know and try to learn it&#xD;&#xA;- Become comfortable configuring and running nodes &#xD;&#xA;- Build a pallet from scratch&#xD;&#xA;&#xD;&#xA;Adopt a growth-mindset&#xD;&#xA;- Learn a little everyday; this adds up&#xD;&#xA;&#xD;&#xA;Keep up-to-date on what is happening in the [Polkadot community](https://wiki.polkadot.network/docs/community) especially the Element chats and Github.&#xD;&#xA;&#xD;&#xA;Go deeper into Substrate:&#xD;&#xA;- [Substrate How-To Guides](https://docs.substrate.io/how-to-guides/v3)&#xD;&#xA;&#xD;&#xA;Read the docs!&#xD;&#xA;- [Substrate Rust Docs](https://paritytech.github.io/substrate/master/sc_service/index.html)&#xD;&#xA;- This is the Substrate Developer's bible&#xD;&#xA;&#xD;&#xA;Read the code!&#xD;&#xA;- https://github.com/paritytech/substrate&#xD;&#xA;- This is the Substrate Developer's home&#xD;&#xA;- You should be regularly poking around in the Substrate codebase to understand how things work; don't be satisfied with concepts, you should understand how it works in the code as well.&#xD;&#xA;&#xD;&#xA;Stay up-to-date on Stack Exchange:&#xD;&#xA;- [Substrate Stack Exchange](https://substrate.stackexchange.com)&#xD;&#xA;- Replicate the issues, solve them&#xD;&#xA;&#xD;&#xA;Learn Rust as you learn Substrate:&#xD;&#xA;- [Rust Book](https://doc.rust-lang.org/book)&#xD;&#xA;- Several other resources available&#xD;&#xA;&#xD;&#xA;Find a mentor &#xD;&#xA;- Blockchain &amp; the Polkadot ecosystem can be complex; however, the community is thriving, there are Polkadot events online and all over the world - great place to meet others who are a little further on the Substrate path&#xD;&#xA;&#xD;&#xA;From here, you could specialize e.g. Substrate Runtime Engineer, Substrate Parachain Engineer, etc. depending on the path you want to take there are a number of additional resources available to you.&#xD;&#xA;&#xD;&#xA;**And last but not least:**&#xD;&#xA;- Participate in a Substrate-related hackathon!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kkK1a.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16669" PostHistoryTypeId="2" PostId="4455" RevisionGUID="af23c455-902f-49fa-842a-9a4f9d885393" CreationDate="2022-08-25T16:31:36.220" UserId="94" Text="&gt; If an extrinsic emits an event with has some payload with some size, say like a user provided Vec&lt;u8&gt;, then an attacker can submit a series of such extrinsics, radically increasing the size of this vector  &#xD;&#xA;&gt;...  &#xD;&#xA;&gt; How was it determined that this is already not a problem in Polkadot or Kusama?&#xD;&#xA;&#xD;&#xA;Developers pay attention to never put user-provided unbound data directly into events.  &#xD;&#xA;&#xD;&#xA;It is smarter, as noted above, to only use hashes. This holds generally for all on-chain data; dont use the data itself but rather hashes wherever possible.  &#xD;&#xA;This keeps on-chain data small and cheap to scale.  &#xD;&#xA;If you still need to store blobs of data, you can use the `preimage` pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="16671" PostHistoryTypeId="2" PostId="4456" RevisionGUID="4e9204fc-661c-4038-aff7-9ab86c0992b2" CreationDate="2022-08-25T16:42:52.973" UserId="94" Text="`frame_support::pallet_prelude` re-exports the most common used types and constants for ease of use.  &#xD;&#xA;The re-export happens [here](https://github.com/paritytech/substrate/blob/2b54771bf923b1f220b6997e710d7169f3dc613b/frame/support/src/lib.rs#L1370).  &#xD;&#xA;It is therefore exactly the same type, as you can discover by clicking on the `src` links.  &#xD;&#xA;The crates.io is outdated, that is why it looks a bit different." ContentLicense="CC BY-SA 4.0" />
  <row Id="16673" PostHistoryTypeId="2" PostId="4457" RevisionGUID="cd930929-7b16-48c1-af84-41a09de3e70d" CreationDate="2022-08-25T20:21:45.463" UserId="73" Text="The block time of Parachains are currently restricted to 12 seconds. This is a limitation of the current Parachains consensus implementation in the relay chain. In the future with asynchronous backing this limitation will be lifted. Then Parachain block times faster than the relay chain block time will be possible." ContentLicense="CC BY-SA 4.0" />
  <row Id="16679" PostHistoryTypeId="52" PostId="4454" RevisionGUID="98893174-7ed2-4995-afb6-c3603cea0f0c" CreationDate="2022-08-26T01:05:31.403" />
  <row Id="16683" PostHistoryTypeId="2" PostId="4459" RevisionGUID="dfe2da36-fca8-4133-82a7-e36816279e53" CreationDate="2022-08-26T06:46:27.650" UserId="2844" Text="Have a look in this [link][1] , Phala-Network is working on test cross-contract Ink! contracts and they have implemented cross-contract test in ink/examples/delegator/adder/ example&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/pull/1358" ContentLicense="CC BY-SA 4.0" />
  <row Id="16685" PostHistoryTypeId="2" PostId="4460" RevisionGUID="5980846d-a1ba-4671-91bc-1ac7d84d357b" CreationDate="2022-08-26T08:34:42.773" UserId="3009" Text="I want to modify some on-chain storage from offchain worker by sending a signed transaction, so I write a dispatch function which handles the transaction. But the dispatch function also can be accessed from other way as normal（such as a user sign an extrinsic out of blockchain）. I want to block the other ways so the on-chain storage only can be modified by offchain worker. How to do this, or is there any method that can distinguish different access path？" ContentLicense="CC BY-SA 4.0" />
  <row Id="16687" PostHistoryTypeId="1" PostId="4460" RevisionGUID="5980846d-a1ba-4671-91bc-1ac7d84d357b" CreationDate="2022-08-26T08:34:42.773" UserId="3009" Text="How to write a dispatch function which can only access from offchain worker with signed extrinsic/transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16688" PostHistoryTypeId="3" PostId="4460" RevisionGUID="5980846d-a1ba-4671-91bc-1ac7d84d357b" CreationDate="2022-08-26T08:34:42.773" UserId="3009" Text="|storage|extrinsic|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16689" PostHistoryTypeId="5" PostId="4460" RevisionGUID="c9de7e3a-8350-4a57-bb65-a0e68ae9c4d1" CreationDate="2022-08-26T08:41:10.677" UserId="3009" Comment="added 55 characters in body" Text="I want to modify some on-chain storage from offchain worker by sending a signed transaction, so I write a dispatch function which handles the transaction. But the dispatch function also can be accessed from other way as normal（such as a user sign an extrinsic out of blockchain）. I want to block the other ways so the on-chain storage only can be modified by offchain worker. How to do this, or is there any method that can distinguish different access path？&#xD;&#xA;&#xD;&#xA;Or how can I extract the KeyTypeId from AccountId？？" ContentLicense="CC BY-SA 4.0" />
  <row Id="16690" PostHistoryTypeId="2" PostId="4461" RevisionGUID="3631b1e3-b871-4a24-8ba8-dfb1d5333c3c" CreationDate="2022-08-26T09:56:57.313" UserId="298" Text="For a transaction fee implementation, i would like to burn 40% of transaction fees, send 30% to treasury and 30% to collators. Which pallet do can i use to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16692" PostHistoryTypeId="1" PostId="4461" RevisionGUID="3631b1e3-b871-4a24-8ba8-dfb1d5333c3c" CreationDate="2022-08-26T09:56:57.313" UserId="298" Text="How do you burn transaction fees?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16693" PostHistoryTypeId="3" PostId="4461" RevisionGUID="3631b1e3-b871-4a24-8ba8-dfb1d5333c3c" CreationDate="2022-08-26T09:56:57.313" UserId="298" Text="|parachain|transactions|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16694" PostHistoryTypeId="2" PostId="4462" RevisionGUID="aacd5137-2860-4cbe-99ce-63283318dfda" CreationDate="2022-08-26T10:25:06.123" UserId="94" Text="What you are looking for is the `transaction-payment` pallet.  &#xD;&#xA;The functions `withdraw_fee` and `correct_and_deposit_fee` of its `CurrencyAdapter` handle the fees.  &#xD;&#xA;These fees are then handed over to the `OnUnbalanced` handler. This handler is an injected trait function and can be configured by the runtime.  &#xD;&#xA;You see how this works when analyzing the [on_unbalanceds](https://github.com/paritytech/polkadot/blob/7e4afecf44f066292fb74eeb895940bc597b3481/runtime/common/src/impls.rs#L45) function in the common Polkadot runtime.  &#xD;&#xA;It looks like this:  &#xD;&#xA;```rust&#xD;&#xA;fn on_unbalanceds&lt;B&gt;(mut fees_then_tips: impl Iterator&lt;Item = NegativeImbalance&lt;R&gt;&gt;) {&#xD;&#xA;	if let Some(fees) = fees_then_tips.next() {&#xD;&#xA;		// for fees, 80% to treasury, 20% to author&#xD;&#xA;		let mut split = fees.ration(80, 20);&#xD;&#xA;		if let Some(tips) = fees_then_tips.next() {&#xD;&#xA;			// for tips, if any, 100% to author&#xD;&#xA;			tips.merge_into(&amp;mut split.1);&#xD;&#xA;		}&#xD;&#xA;		use pallet_treasury::Pallet as Treasury;&#xD;&#xA;		&lt;Treasury&lt;R&gt; as OnUnbalanced&lt;_&gt;&gt;::on_unbalanced(split.0);&#xD;&#xA;		&lt;ToAuthor&lt;R&gt; as OnUnbalanced&lt;_&gt;&gt;::on_unbalanced(split.1);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The entry points for these functions is the signed extension `ChargeTransactionPayment`.  &#xD;&#xA;The `pre_dispatch` calls `withdraw_fee` and `post_dispatch` does `correct_and_deposit_fee`." ContentLicense="CC BY-SA 4.0" />
  <row Id="16696" PostHistoryTypeId="2" PostId="4463" RevisionGUID="2106075c-19d3-4c27-ba46-1fc8d91d86ec" CreationDate="2022-08-26T11:25:54.617" UserId="3" Text="The `IterableStorageMap` API explicitly forbids altering the map while iterating: https://paritytech.github.io/substrate/master/src/frame_support/storage/mod.rs.html#270-272&#xD;&#xA;&#xD;&#xA;The `frame_support::storage::migration` module is less clear in its documentation. If I iterate over a storage map using `storage_iter`, what's the effect of altering the map while iterating over it? What changes to the map can I make without causing undefined behavior?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16698" PostHistoryTypeId="1" PostId="4463" RevisionGUID="2106075c-19d3-4c27-ba46-1fc8d91d86ec" CreationDate="2022-08-26T11:25:54.617" UserId="3" Text="Is using `put_storage_value` on a storage map while iterating over the same map using `storage_iter` undefined behavior?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16699" PostHistoryTypeId="3" PostId="4463" RevisionGUID="2106075c-19d3-4c27-ba46-1fc8d91d86ec" CreationDate="2022-08-26T11:25:54.617" UserId="3" Text="|storage|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16700" PostHistoryTypeId="2" PostId="4464" RevisionGUID="b79bad99-63c5-4706-a348-fe9d85f50c8c" CreationDate="2022-08-26T11:59:51.343" UserId="2548" Text="I would like to store a date and later on compare it to the current date.&#xD;&#xA;&#xD;&#xA;How can I do it? &#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="16702" PostHistoryTypeId="1" PostId="4464" RevisionGUID="b79bad99-63c5-4706-a348-fe9d85f50c8c" CreationDate="2022-08-26T11:59:51.343" UserId="2548" Text="How to store date on storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16703" PostHistoryTypeId="3" PostId="4464" RevisionGUID="b79bad99-63c5-4706-a348-fe9d85f50c8c" CreationDate="2022-08-26T11:59:51.343" UserId="2548" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16704" PostHistoryTypeId="2" PostId="4465" RevisionGUID="c649abfa-0e57-4b0a-92a3-8ee2be4edf34" CreationDate="2022-08-26T12:24:39.350" UserId="28" Text="It is not recommended to store and use dates on chain, since dates are not a native measurement of the blockchain.&#xD;&#xA;&#xD;&#xA;Instead you can use the `BlockNumber` type, which is going to be a much better unit for time passing in your runtime logic.&#xD;&#xA;&#xD;&#xA;Otherwise, if you are really insistent to use some kind of human date, you can use the Timestamp Pallet via the [`Time` trait](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Time.html), which uses `Moment` type.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Both options would look something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use frame_support::traits::Time;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type Time: Time;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	type MomentOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Time as Time&gt;::Moment;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type TimeStorage&lt;T&gt; = StorageValue&lt;_, MomentOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type BlockNumberStorage&lt;T: Config&gt; = StorageValue&lt;_, T::BlockNumber&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn store_time(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _who = ensure_signed(origin)?;&#xD;&#xA;			let current_time = T::Time::now();&#xD;&#xA;			TimeStorage::&lt;T&gt;::put(current_time);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn store_block_number(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let _who = ensure_signed(origin)?;&#xD;&#xA;			let current_block_number = frame_system::Pallet::&lt;T&gt;::block_number();&#xD;&#xA;			BlockNumberStorage::&lt;T&gt;::put(current_block_number);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16706" PostHistoryTypeId="2" PostId="4466" RevisionGUID="1dc3ceb6-9ef4-46a4-a195-089bc5ac18fb" CreationDate="2022-08-26T12:29:54.537" UserId="28" Text="Iterating over a storage map is going through all the storage keys in order based on their hex representation.&#xD;&#xA;&#xD;&#xA;If you are iterating over a storage map, and add a new item to the storage map, it is possible you will or will not go over that item during iteration, which as you stated is an undefined behavior.&#xD;&#xA;&#xD;&#xA;There is not really a way around this since most storage map keys use a hash, which have no predictable output.&#xD;&#xA;&#xD;&#xA;The only thing you can safely do is modify existing values of the map in place, without modifying the keys present, which will keep the iterator consistent." ContentLicense="CC BY-SA 4.0" />
  <row Id="16708" PostHistoryTypeId="2" PostId="4467" RevisionGUID="e443ec17-8e27-42e7-ab36-1190bc6cbcd4" CreationDate="2022-08-26T12:52:21.190" UserId="3086" Text="I just discovered substrate. I would like to use, as a dependency a substrate crate which uses sp_io and sp_runtime feature.&#xD;&#xA;&#xD;&#xA;The naive code I wrote fails because of &quot;Externalities&quot; and I could not find how to run it outside a substrate node as a native rust program. Is that even possible?&#xD;&#xA;&#xD;&#xA;Here is an example of error:&#xD;&#xA;&#xD;&#xA;    '`timestamp_version_1` called outside of an Externalities-provided environment.'" ContentLicense="CC BY-SA 4.0" />
  <row Id="16710" PostHistoryTypeId="1" PostId="4467" RevisionGUID="e443ec17-8e27-42e7-ab36-1190bc6cbcd4" CreationDate="2022-08-26T12:52:21.190" UserId="3086" Text="Using a substrate crate for a standard rust project" ContentLicense="CC BY-SA 4.0" />
  <row Id="16711" PostHistoryTypeId="3" PostId="4467" RevisionGUID="e443ec17-8e27-42e7-ab36-1190bc6cbcd4" CreationDate="2022-08-26T12:52:21.190" UserId="3086" Text="|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16712" PostHistoryTypeId="5" PostId="4467" RevisionGUID="568ff2f6-4f18-4003-a038-ad39f99be1e8" CreationDate="2022-08-26T13:09:36.270" UserId="3086" Comment="added 9 characters in body" Text="I just discovered substrate. I would like to use, as a dependency a substrate crate which uses sp_io and sp_runtime offchain feature.&#xD;&#xA;&#xD;&#xA;The naive code I wrote fails because of &quot;Externalities&quot; and I could not find how to run it outside a substrate node as a native rust program. Is that even possible?&#xD;&#xA;&#xD;&#xA;Here is an example of error:&#xD;&#xA;&#xD;&#xA;    '`timestamp_version_1` called outside of an Externalities-provided environment.'" ContentLicense="CC BY-SA 4.0" />
  <row Id="16713" PostHistoryTypeId="2" PostId="4468" RevisionGUID="90a9ddce-d985-4198-ad9e-d48735bdf9b5" CreationDate="2022-08-26T13:38:15.047" UserId="481" Text="Is it safe to do a mutation from within a SignedExtension for some pallet-specific storage items while validating a transaction? If not, what could go wrong, and why?&#xD;&#xA;&#xD;&#xA;One thing that could go wrong is if `pre_dispatch` / `validate` are called separately, it could trigger the mutation multiple times&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16715" PostHistoryTypeId="1" PostId="4468" RevisionGUID="90a9ddce-d985-4198-ad9e-d48735bdf9b5" CreationDate="2022-08-26T13:38:15.047" UserId="481" Text="Safe to mutate in `pre_dispatch`/`validate`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16716" PostHistoryTypeId="3" PostId="4468" RevisionGUID="90a9ddce-d985-4198-ad9e-d48735bdf9b5" CreationDate="2022-08-26T13:38:15.047" UserId="481" Text="|polkadot|pallet|parachain|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16717" PostHistoryTypeId="12" PostId="4468" RevisionGUID="4ad3cde3-d130-4ebb-8cf6-3835436600f5" CreationDate="2022-08-26T13:49:32.857" UserId="481" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:481,&quot;DisplayName&quot;:&quot;insipx&quot;}]}" />
  <row Id="16718" PostHistoryTypeId="13" PostId="4468" RevisionGUID="1aeb8131-424a-4c0f-86d7-0fced62ee6bb" CreationDate="2022-08-26T13:49:59.033" UserId="481" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:481,&quot;DisplayName&quot;:&quot;insipx&quot;}]}" />
  <row Id="16719" PostHistoryTypeId="2" PostId="4469" RevisionGUID="1853d9bb-6763-48a7-a6f3-e4f2c3bfec23" CreationDate="2022-08-26T15:44:51.557" UserId="2403" Text="Trying to generate random 256 bytes hash-like data. But compiler tells&#xD;&#xA;```&#xD;&#xA;  error[E0599]: no function or associated item named `random` found for struct `H256` in the current scope&#xD;&#xA;     --&gt; /home/poh/pro/work/aratar/substrate-dev/trait/app-agents/src/lib.rs:262:23&#xD;&#xA;      |&#xD;&#xA;  262 |                 seed: hash::H256::random(),&#xD;&#xA;      |                                   ^^^^^^ function or associated item not found in `H256`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But, if I change `random` to `zero`, then everything compiles successfully. What did I miss?&#xD;&#xA;&#xD;&#xA;Using substrate v0.9.25." ContentLicense="CC BY-SA 4.0" />
  <row Id="16721" PostHistoryTypeId="1" PostId="4469" RevisionGUID="1853d9bb-6763-48a7-a6f3-e4f2c3bfec23" CreationDate="2022-08-26T15:44:51.557" UserId="2403" Text="`sp_core::hash::H256::random()` not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="16722" PostHistoryTypeId="3" PostId="4469" RevisionGUID="1853d9bb-6763-48a7-a6f3-e4f2c3bfec23" CreationDate="2022-08-26T15:44:51.557" UserId="2403" Text="|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16723" PostHistoryTypeId="52" PostId="4461" RevisionGUID="5b21b256-82bc-4048-9ce8-f14731ac21b3" CreationDate="2022-08-26T17:58:53.007" />
  <row Id="16724" PostHistoryTypeId="2" PostId="4470" RevisionGUID="e4cd5dac-abef-455b-8b4c-a38313c9ae47" CreationDate="2022-08-26T19:19:33.553" UserId="351" Text="So the pallet::call macro requires the function to be public. So its either in the frontend you just dont expose the function but anyhow a  user can access the function (he/she can use polkadot js to interact with your chain). &#xD;&#xA;&#xD;&#xA;Because even the offchain worker requires the Call to be public." ContentLicense="CC BY-SA 4.0" />
  <row Id="16726" PostHistoryTypeId="2" PostId="4471" RevisionGUID="3f45dc03-4da2-49bc-9d96-cd05465fea55" CreationDate="2022-08-26T21:12:06.967" UserId="29" Text="If you're using `sp_core` in your tests, then you can have it like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use sp_core::H256;&#xD;&#xA;H256::random()&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16728" PostHistoryTypeId="5" PostId="4469" RevisionGUID="f7506657-420f-4828-a742-9b7a2c18968a" CreationDate="2022-08-26T21:37:12.750" UserId="2403" Comment="added 2344 characters in body" Text="Trying to generate random 256 bytes hash-like data. But compiler tells&#xD;&#xA;```&#xD;&#xA;  error[E0599]: no function or associated item named `random` found for struct `H256` in the current scope&#xD;&#xA;     --&gt; /home/poh/pro/work/aratar/substrate-dev/trait/app-agents/src/lib.rs:262:23&#xD;&#xA;      |&#xD;&#xA;  262 |                 seed: hash::H256::random(),&#xD;&#xA;      |                                   ^^^^^^ function or associated item not found in `H256`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But, if I change `random` to `zero`, then everything compiles successfully. What did I miss?&#xD;&#xA;&#xD;&#xA;Using substrate v0.9.25.&#xD;&#xA;&#xD;&#xA;**Update**&#xD;&#xA;&#xD;&#xA;How to reproduce:&#xD;&#xA;- Clone 0.9.25 `git clone --recursive git@github.com:paritytech/substrate.git -b polkadot-v0.9.25`&#xD;&#xA;- Apply this changes:&#xD;&#xA;```&#xD;&#xA;diff --git a/frame/assets/Cargo.toml b/frame/assets/Cargo.toml&#xD;&#xA;index 9e98d4e15a..40421d3a8c 100644&#xD;&#xA;--- a/frame/assets/Cargo.toml&#xD;&#xA;+++ b/frame/assets/Cargo.toml&#xD;&#xA;@@ -23,9 +23,9 @@ frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../su&#xD;&#xA; # `system` module provides us with all sorts of useful stuff and macros depend on it being around.&#xD;&#xA; frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../system&quot; }&#xD;&#xA; frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../benchmarking&quot;, optional = true }&#xD;&#xA;+sp-core = { version = &quot;6.0.0&quot;, default-features = false, path = &quot;../../primitives/core&quot; }&#xD;&#xA; &#xD;&#xA; [dev-dependencies]&#xD;&#xA;-sp-core = { version = &quot;6.0.0&quot;, path = &quot;../../primitives/core&quot; }&#xD;&#xA; sp-std = { version = &quot;4.0.0&quot;, path = &quot;../../primitives/std&quot; }&#xD;&#xA; sp-io = { version = &quot;6.0.0&quot;, path = &quot;../../primitives/io&quot; }&#xD;&#xA; pallet-balances = { version = &quot;4.0.0-dev&quot;, path = &quot;../balances&quot; }&#xD;&#xA;diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs&#xD;&#xA;index 3f9146c5d2..fad1825812 100644&#xD;&#xA;--- a/frame/assets/src/lib.rs&#xD;&#xA;+++ b/frame/assets/src/lib.rs&#xD;&#xA;@@ -160,6 +160,7 @@ use frame_support::{&#xD;&#xA;        },&#xD;&#xA; };&#xD;&#xA; use frame_system::Config as SystemConfig;&#xD;&#xA;+use sp_core::hash;&#xD;&#xA; &#xD;&#xA; pub use pallet::*;&#xD;&#xA; pub use weights::WeightInfo;&#xD;&#xA;@@ -504,6 +505,7 @@ pub mod pallet {&#xD;&#xA;                        admin: &lt;T::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;                        min_balance: T::Balance,&#xD;&#xA;                ) -&gt; DispatchResult {&#xD;&#xA;+                       let x = hash::H256::random();&#xD;&#xA;                        let owner = ensure_signed(origin)?;&#xD;&#xA;                        let admin = T::Lookup::lookup(admin)?;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;- `cargo check`&#xD;&#xA;&#xD;&#xA;My setup is&#xD;&#xA;```&#xD;&#xA;$ rustup show&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /home/poh/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.62.1 (e092d0b6b 2022-07-16)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16729" PostHistoryTypeId="5" PostId="4471" RevisionGUID="2b3ced96-af09-494d-b3e0-4cd4b8d91662" CreationDate="2022-08-26T22:18:53.540" UserId="29" Comment="added 1595 characters in body" Text="If you're using `sp_core` in your tests, then you can have it like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use sp_core::H256;&#xD;&#xA;H256::random()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Make sure to include `rand` crate as a dev dependency.&#xD;&#xA;&#xD;&#xA;Looks like the `H256::random()` function implementation is feature guarded via `rand` crate:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// Implementation for disabled rand crate support.&#xD;&#xA;//&#xD;&#xA;// # Note&#xD;&#xA;//&#xD;&#xA;// Feature guarded macro definitions instead of feature guarded impl blocks&#xD;&#xA;// to work around the problems of introducing `rand` crate feature in&#xD;&#xA;// a user crate.&#xD;&#xA;#[cfg(not(feature = &quot;rand&quot;))]&#xD;&#xA;#[macro_export]&#xD;&#xA;#[doc(hidden)]&#xD;&#xA;macro_rules! impl_rand_for_fixed_hash {&#xD;&#xA;	( $name:ident ) =&gt; {};&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Implementation for enabled rand crate support.&#xD;&#xA;//&#xD;&#xA;// # Note&#xD;&#xA;//&#xD;&#xA;// Feature guarded macro definitions instead of feature guarded impl blocks&#xD;&#xA;// to work around the problems of introducing `rand` crate feature in&#xD;&#xA;// a user crate.&#xD;&#xA;#[cfg(feature = &quot;rand&quot;)]&#xD;&#xA;#[macro_export]&#xD;&#xA;#[doc(hidden)]&#xD;&#xA;macro_rules! impl_rand_for_fixed_hash {&#xD;&#xA;	( $name:ident ) =&gt; {&#xD;&#xA;		impl $crate::rand::distributions::Distribution&lt;$name&gt; for $crate::rand::distributions::Standard {&#xD;&#xA;			fn sample&lt;R: $crate::rand::Rng + ?Sized&gt;(&amp;self, rng: &amp;mut R) -&gt; $name {&#xD;&#xA;				let mut ret = $name::zero();&#xD;&#xA;				for byte in ret.as_bytes_mut().iter_mut() {&#xD;&#xA;					*byte = rng.gen();&#xD;&#xA;				}&#xD;&#xA;				ret&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		/// Utilities using the `rand` crate.&#xD;&#xA;		impl $name {&#xD;&#xA;			&lt;!--snip--&gt;&#xD;&#xA;			/// Create a new hash with cryptographically random content.&#xD;&#xA;			pub fn random() -&gt; Self {&#xD;&#xA;				let mut hash = Self::zero();&#xD;&#xA;				hash.randomize();&#xD;&#xA;				hash&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	};&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- https://github.com/paritytech/parity-common/blob/77ddc33a2773bab5d7169f5f29199182713d463d/fixed-hash/src/hash.rs#L455-L528" ContentLicense="CC BY-SA 4.0" />
  <row Id="16730" PostHistoryTypeId="2" PostId="4472" RevisionGUID="0f50880e-25cb-44f6-b07a-7c87f81f6857" CreationDate="2022-08-26T22:31:35.400" UserId="3084" Text="When trying to upgrade to Substrate v 0.9.26, I see this error:&#xD;&#xA;```&#xD;&#xA;the trait bound `Event: From&lt;pallet_transaction_payment::Event&lt;Runtime&gt;&gt;` is not satisfied&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my config I have the following:&#xD;&#xA;```&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;As you can see, the trait is implemented. Why is this error getting thrown?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16732" PostHistoryTypeId="1" PostId="4472" RevisionGUID="0f50880e-25cb-44f6-b07a-7c87f81f6857" CreationDate="2022-08-26T22:31:35.400" UserId="3084" Text="Substrate upgrade to 0.9.26: the trait bound `Event: From&lt;pallet_transaction_payment::Event&lt;Runtime&gt;&gt;` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="16733" PostHistoryTypeId="3" PostId="4472" RevisionGUID="0f50880e-25cb-44f6-b07a-7c87f81f6857" CreationDate="2022-08-26T22:31:35.400" UserId="3084" Text="|polkadot|rust|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16734" PostHistoryTypeId="2" PostId="4473" RevisionGUID="b5c3b56a-bd26-4360-9705-d16af4f4346f" CreationDate="2022-08-26T22:55:21.440" UserId="29" Text="Make sure to include `Event` module part in your `frame_support::construct_runtime!` like so:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event&lt;T&gt;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; - https://github.com/paritytech/substrate/blob/e8a7d161f39db70cb27fdad6c6e215cf493ebc3b/frame/transaction-payment/src/lib.rs#L805&#xD;&#xA;&#xD;&#xA;More Info:&#xD;&#xA;- https://paritytech.github.io/substrate/master/frame_support/macro.construct_runtime.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="16736" PostHistoryTypeId="5" PostId="265" RevisionGUID="50c4611a-d4d5-4946-95ab-0c005354a23e" CreationDate="2022-08-27T06:46:18.750" UserId="104" Comment="added 18 characters in body" Text="The [ORML Xtokens pallet][1] is just the first step, as you try to configure it in your chain, you'll quickly see that it requires an `XcmExecutor` configuration item, which the [`xcm-executor`][2] module offers a default implementation of.&#xD;&#xA;&#xD;&#xA;The problem next is that the default `XcmExecutor` itself also requires configuration, and one of the items for the `XcmConfig` is to specify the `XcmSender`. This is where you'll need to include pallets that implement the proper message passing protocol. Depending on who you want to send your XCM to, you'll either need to include the [XCMP queue pallet][3] if you're sending to a sibling parachain, or include the [parachain system pallet][4] if you're sending to the relay chain.&#xD;&#xA;&#xD;&#xA;You may also want to take a look at [my answer here][5] to decide which asset transfer model that you'd like to pick for your chain.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/8ef830db9a009fdf4cf5092ebaf14371d27a9a4c/xcm/xcm-executor/src/lib.rs#L44&#xD;&#xA;  [3]: https://github.com/paritytech/cumulus/tree/master/pallets/xcmp-queue&#xD;&#xA;  [4]: https://github.com/paritytech/cumulus/tree/master/pallets/parachain-system&#xD;&#xA;  [5]: https://substrate.stackexchange.com/a/38/104" ContentLicense="CC BY-SA 4.0" />
  <row Id="16742" PostHistoryTypeId="2" PostId="4475" RevisionGUID="4d661173-fdc4-4e24-8ce6-5f1d67f2bf2a" CreationDate="2022-08-27T12:19:15.707" UserId="407" Text="I have a single pallet called `ehr`, its dependencies are&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-support = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;}&#xD;&#xA;frame-system = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;frame-benchmarking = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;, optional = true }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-runtime = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-core = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-io = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-std = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-keystore = { version = &quot;0.12.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;parking_lot = '0.12'&#xD;&#xA;hex = &quot;0.4.3&quot;&#xD;&#xA;jsonwebtoken = &quot;8.1.1&quot;&#xD;&#xA;serde = &quot;1.0.141&quot;&#xD;&#xA;querystring = &quot;0.1.0&quot;&#xD;&#xA;libaes = &quot;0.6.2&quot;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-keystore/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-io/std&quot;,&#xD;&#xA;&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;] &#xD;&#xA;```&#xD;&#xA;When i ran `cargo check -p pallet-ehr` it compiles succesfully, but when compiling my node runtime using `cargo check -p node-runtime` . it  outputs &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error[E0433]: failed to resolve: could not find `format` in `alloc`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1721:31&#xD;&#xA;       |&#xD;&#xA;  1721 |     let message = sp_std::alloc::format!(&quot;{}&quot;, info);&#xD;&#xA;       |                                  ^^^^^^ could not find `format` in `alloc`&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;     --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:125:1&#xD;&#xA;      |&#xD;&#xA;  125 | #[runtime_interface]&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      |&#xD;&#xA;      = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;     --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:328:1&#xD;&#xA;      |&#xD;&#xA;  328 | #[runtime_interface]&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      |&#xD;&#xA;      = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;     --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:506:1&#xD;&#xA;      |&#xD;&#xA;  506 | #[runtime_interface]&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      |&#xD;&#xA;      = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;     --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:641:1&#xD;&#xA;      |&#xD;&#xA;  641 | #[runtime_interface]&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      |&#xD;&#xA;      = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;     --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:702:1&#xD;&#xA;      |&#xD;&#xA;  702 | #[runtime_interface]&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      |&#xD;&#xA;      = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1079:1&#xD;&#xA;       |&#xD;&#xA;  1079 | #[runtime_interface]&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1123:1&#xD;&#xA;       |&#xD;&#xA;  1123 | #[runtime_interface]&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1137:1&#xD;&#xA;       |&#xD;&#xA;  1137 | #[runtime_interface]&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1159:1&#xD;&#xA;       |&#xD;&#xA;  1159 | #[runtime_interface]&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1378:1&#xD;&#xA;       |&#xD;&#xA;  1378 | #[runtime_interface(wasm_only)]&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1393:1&#xD;&#xA;       |&#xD;&#xA;  1393 | #[runtime_interface(wasm_only)]&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1403:1&#xD;&#xA;       |&#xD;&#xA;  1403 | #[runtime_interface]&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1451:1&#xD;&#xA;       |&#xD;&#xA;  1451 | #[runtime_interface(wasm_only, no_tracing)]&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1568:1&#xD;&#xA;       |&#xD;&#xA;  1568 | #[runtime_interface(wasm_only)]&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1663:1&#xD;&#xA;       |&#xD;&#xA;  1663 | #[runtime_interface(wasm_only)]&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0152]: found duplicate lang item `panic_impl`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1720:1&#xD;&#xA;       |&#xD;&#xA;  1720 | pub fn panic(info: &amp;core::panic::PanicInfo) -&gt; ! {&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;       |&#xD;&#xA;       = note: the lang item is first defined in crate `std` (which `sp_runtime_interface` depends on)&#xD;&#xA;       = note: first definition in `std` loaded from /home/joshua/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-a237209e92b55a70.rlib&#xD;&#xA;       = note: second definition in the local crate (`sp_io`)&#xD;&#xA;&#xD;&#xA;  error[E0152]: found duplicate lang item `oom`&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1736:1&#xD;&#xA;       |&#xD;&#xA;  1736 | pub fn oom(_: core::alloc::Layout) -&gt; ! {&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;       |&#xD;&#xA;       = note: the lang item is first defined in crate `std` (which `sp_runtime_interface` depends on)&#xD;&#xA;       = note: first definition in `std` loaded from /home/joshua/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-a237209e92b55a70.rlib&#xD;&#xA;       = note: second definition in the local crate (`sp_io`)&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1707:4&#xD;&#xA;       |&#xD;&#xA;  1706 |         unsafe fn alloc(&amp;self, layout: Layout) -&gt; *mut u8 {&#xD;&#xA;       |                                                   ------- expected `*mut u8` because of return type&#xD;&#xA;  1707 |             allocator::malloc(layout.size() as u32)&#xD;&#xA;       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected *-ptr, found struct `sp_wasm_interface::Pointer`&#xD;&#xA;       |&#xD;&#xA;       = note: expected raw pointer `*mut u8`&#xD;&#xA;                       found struct `sp_wasm_interface::Pointer&lt;u8&gt;`&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1711:20&#xD;&#xA;       |&#xD;&#xA;  1711 |             allocator::free(ptr)&#xD;&#xA;       |             --------------- ^^^ expected struct `sp_wasm_interface::Pointer`, found *-ptr&#xD;&#xA;       |             |&#xD;&#xA;       |             arguments to this function are incorrect&#xD;&#xA;       |&#xD;&#xA;       = note:   expected struct `sp_wasm_interface::Pointer&lt;u8&gt;`&#xD;&#xA;               found raw pointer `*mut u8`&#xD;&#xA;  note: function defined here&#xD;&#xA;      --&gt; /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1386:5&#xD;&#xA;       |&#xD;&#xA;  1386 |     fn free(&amp;mut self, ptr: Pointer&lt;u8&gt;) {&#xD;&#xA;       |        ^^^^            ----------------&#xD;&#xA;&#xD;&#xA;  Some errors have detailed explanations: E0152, E0308, E0433.&#xD;&#xA;  For more information about an error, try `rustc --explain E0152`.&#xD;&#xA;  error: could not compile `sp-io` due to 20 previous errors&#xD;&#xA;```&#xD;&#xA;My runtime dependencies are :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;getrandom = { version = &quot;0.2.7&quot;, features = [&quot;js&quot;] }&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;pallet-randomness-collective-flip = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;, optional = true }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-block-builder = {  version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;}&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;}&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-runtime = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-io = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-std = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;sp-version = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;, optional = true }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;, optional = true }&#xD;&#xA;hex-literal = { version = &quot;0.3.4&quot;, optional = true }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-ehr = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/ehr&quot; }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-ehr/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;	&quot;sp-io/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;hex-literal&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-ehr/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-ehr/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;```.&#xD;&#xA;&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="16744" PostHistoryTypeId="1" PostId="4475" RevisionGUID="4d661173-fdc4-4e24-8ce6-5f1d67f2bf2a" CreationDate="2022-08-27T12:19:15.707" UserId="407" Text="sp-io v6.0.0 does not compile using substrate frame" ContentLicense="CC BY-SA 4.0" />
  <row Id="16745" PostHistoryTypeId="3" PostId="4475" RevisionGUID="4d661173-fdc4-4e24-8ce6-5f1d67f2bf2a" CreationDate="2022-08-27T12:19:15.707" UserId="407" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16746" PostHistoryTypeId="2" PostId="4476" RevisionGUID="21ef96df-5eda-4a6b-967f-883c8675c0d8" CreationDate="2022-08-27T14:58:28.347" UserId="560" Text="Is there an easy way to get a list of all pallets storage versions? An output like this: &#xD;&#xA;[&#xD;&#xA;Palletname, StorageVersion&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is it possible to query using curl and the rpc for the storage version of all pallets or does anyone have some commandline fu that can do this?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="16748" PostHistoryTypeId="1" PostId="4476" RevisionGUID="21ef96df-5eda-4a6b-967f-883c8675c0d8" CreationDate="2022-08-27T14:58:28.347" UserId="560" Text="How to query for All Pallets StorageVersions" ContentLicense="CC BY-SA 4.0" />
  <row Id="16749" PostHistoryTypeId="3" PostId="4476" RevisionGUID="21ef96df-5eda-4a6b-967f-883c8675c0d8" CreationDate="2022-08-27T14:58:28.347" UserId="560" Text="|substrate-node|pallet|storage|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16750" PostHistoryTypeId="50" PostId="3972" RevisionGUID="3c131283-f113-4b5b-821b-509a04312775" CreationDate="2022-08-27T15:08:20.883" UserId="-1" />
  <row Id="16751" PostHistoryTypeId="2" PostId="4477" RevisionGUID="9ea24afa-672c-4f1f-b1e4-6d0860661cb8" CreationDate="2022-08-27T21:55:59.687" UserId="245" Text="I have a local node with validators Alice and Bob. I've created a node key using this command&#xD;&#xA;```bash&#xD;&#xA;subkey generate-node-key --file ./.keys/node-key&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can I use the node key with `--validator`? Because I saw an example creating a node with only node key and validators connecting that node. What is the correct way of doing this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16753" PostHistoryTypeId="1" PostId="4477" RevisionGUID="9ea24afa-672c-4f1f-b1e4-6d0860661cb8" CreationDate="2022-08-27T21:55:59.687" UserId="245" Text="How to use node key?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16754" PostHistoryTypeId="3" PostId="4477" RevisionGUID="9ea24afa-672c-4f1f-b1e4-6d0860661cb8" CreationDate="2022-08-27T21:55:59.687" UserId="245" Text="|subkey|node-key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16755" PostHistoryTypeId="2" PostId="4478" RevisionGUID="008dfd06-1d51-4b03-8c27-41689a28daf1" CreationDate="2022-08-27T23:18:52.237" UserId="3064" Text="code:&#xD;&#xA;const nominators = await api.query.staking.nominators.entries();&#xD;&#xA;&#xD;&#xA;example json output for nominators vaiable:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;      [&#xD;&#xA;        [&#xD;&#xA;          &quot;145xupEFYa81KCexCH5bRU6k3fqY9GgLWAH8nMhat2CKHkcd&quot;&#xD;&#xA;        ],&#xD;&#xA;        {&#xD;&#xA;          &quot;targets&quot;: [&#xD;&#xA;            &quot;12gPFmRqnsDhc9C5DuXyXBFA23io5fSGtKTSAimQtAWgueD2&quot;,&#xD;&#xA;            &quot;13Q48Ep3PVpvXA1BeVcUhNJerLshsaeq4EdgPUHnemqJYmND&quot;,&#xD;&#xA;            &quot;13s9RrQSFbnp2TneY7nkdLmGc3ijBw12YQct8pc8km36Z9hg&quot;,&#xD;&#xA;            &quot;14bUYpiF2oxVpmXDnFxBipSi4m9zYBThMZoLpY8bRQrPQNG1&quot;,&#xD;&#xA;            &quot;15wepZh1jWNqxBjsgErm8HmYiE21n79c5krQJeTsYAjHddeM&quot;,&#xD;&#xA;            &quot;16DKyH4fggEXeGwCytqM19e9NFGkgR2neZPDJ5ta8BKpPbPK&quot;,&#xD;&#xA;            &quot;13RENAu9cpMpxp3EYzWFGpZXgvMZGDrnconYugNdynQz1sDQ&quot;,&#xD;&#xA;            &quot;14Y626iStBUWcNtnmH97163BBJJ2f7jc1piGMZwEQfK3t8zw&quot;,&#xD;&#xA;            &quot;16YwUZyLdeAoe4KmhivGwuuJpBH1US4qkUtXK2V83MVXUy6x&quot;,&#xD;&#xA;            &quot;14BeKcfcvJSJjvu9GZ2CA8EQ3XkK9J1HdwDrfz5Sg5ERDnrP&quot;,&#xD;&#xA;            &quot;124X3VPduasSodAjS6MPd5nEqM8SUdKN5taMUUPtkWqF1fVf&quot;,&#xD;&#xA;            &quot;127nWP7adKAsXBW135FrBgmt5mxuFA5YpXSrdD6BWp6RUoHs&quot;,&#xD;&#xA;            &quot;1EWbJs2jdh34mhH8ovwQTNiLmQ87mMksJW3raRMxk6WXY29&quot;,&#xD;&#xA;            &quot;15UyiZ9rYhrX39Rasc1iE4sdME7WHNFSj8RQT3yuuytd3Nrd&quot;,&#xD;&#xA;            &quot;15cfSaBcTxNr8rV59cbhdMNCRagFr3GE6B3zZRsCp4QHHKPu&quot;,&#xD;&#xA;            &quot;148Ta5cWD3wekK3C6EbdDhYrdxC5e71VTKQCjmHUjE1DCG31&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;submittedIn&quot;: &quot;813&quot;,&#xD;&#xA;          &quot;suppressed&quot;: false&#xD;&#xA;        }&#xD;&#xA;      ],...&#xD;&#xA;&#xD;&#xA;I thought that the targets were validators which the nominator voted for, but that doesn't always seem to be the case. &#xD;&#xA;&#xD;&#xA;What do these targets represent?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16757" PostHistoryTypeId="1" PostId="4478" RevisionGUID="008dfd06-1d51-4b03-8c27-41689a28daf1" CreationDate="2022-08-27T23:18:52.237" UserId="3064" Text="polkadot-js: What does targets mean in api.query.staking.nominators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16758" PostHistoryTypeId="3" PostId="4478" RevisionGUID="008dfd06-1d51-4b03-8c27-41689a28daf1" CreationDate="2022-08-27T23:18:52.237" UserId="3064" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16759" PostHistoryTypeId="5" PostId="4478" RevisionGUID="b3fc62dc-21b4-4ade-b2f3-41c46bd8dd63" CreationDate="2022-08-27T23:24:22.790" UserId="3064" Comment="added 6 characters in body" Text="code:&#xD;&#xA;&#xD;&#xA;    const nominators = await api.query.staking.nominators.entries();&#xD;&#xA;&#xD;&#xA;example json output for nominators vaiable:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;      [&#xD;&#xA;        [&#xD;&#xA;          &quot;145xupEFYa81KCexCH5bRU6k3fqY9GgLWAH8nMhat2CKHkcd&quot;&#xD;&#xA;        ],&#xD;&#xA;        {&#xD;&#xA;          &quot;targets&quot;: [&#xD;&#xA;            &quot;12gPFmRqnsDhc9C5DuXyXBFA23io5fSGtKTSAimQtAWgueD2&quot;,&#xD;&#xA;            &quot;13Q48Ep3PVpvXA1BeVcUhNJerLshsaeq4EdgPUHnemqJYmND&quot;,&#xD;&#xA;            &quot;13s9RrQSFbnp2TneY7nkdLmGc3ijBw12YQct8pc8km36Z9hg&quot;,&#xD;&#xA;            &quot;14bUYpiF2oxVpmXDnFxBipSi4m9zYBThMZoLpY8bRQrPQNG1&quot;,&#xD;&#xA;            &quot;15wepZh1jWNqxBjsgErm8HmYiE21n79c5krQJeTsYAjHddeM&quot;,&#xD;&#xA;            &quot;16DKyH4fggEXeGwCytqM19e9NFGkgR2neZPDJ5ta8BKpPbPK&quot;,&#xD;&#xA;            &quot;13RENAu9cpMpxp3EYzWFGpZXgvMZGDrnconYugNdynQz1sDQ&quot;,&#xD;&#xA;            &quot;14Y626iStBUWcNtnmH97163BBJJ2f7jc1piGMZwEQfK3t8zw&quot;,&#xD;&#xA;            &quot;16YwUZyLdeAoe4KmhivGwuuJpBH1US4qkUtXK2V83MVXUy6x&quot;,&#xD;&#xA;            &quot;14BeKcfcvJSJjvu9GZ2CA8EQ3XkK9J1HdwDrfz5Sg5ERDnrP&quot;,&#xD;&#xA;            &quot;124X3VPduasSodAjS6MPd5nEqM8SUdKN5taMUUPtkWqF1fVf&quot;,&#xD;&#xA;            &quot;127nWP7adKAsXBW135FrBgmt5mxuFA5YpXSrdD6BWp6RUoHs&quot;,&#xD;&#xA;            &quot;1EWbJs2jdh34mhH8ovwQTNiLmQ87mMksJW3raRMxk6WXY29&quot;,&#xD;&#xA;            &quot;15UyiZ9rYhrX39Rasc1iE4sdME7WHNFSj8RQT3yuuytd3Nrd&quot;,&#xD;&#xA;            &quot;15cfSaBcTxNr8rV59cbhdMNCRagFr3GE6B3zZRsCp4QHHKPu&quot;,&#xD;&#xA;            &quot;148Ta5cWD3wekK3C6EbdDhYrdxC5e71VTKQCjmHUjE1DCG31&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;submittedIn&quot;: &quot;813&quot;,&#xD;&#xA;          &quot;suppressed&quot;: false&#xD;&#xA;        }&#xD;&#xA;      ],...&#xD;&#xA;&#xD;&#xA;I thought that the targets were validators which the nominator voted for, but that doesn't always seem to be the case. &#xD;&#xA;&#xD;&#xA;What do these targets represent?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16761" PostHistoryTypeId="2" PostId="4479" RevisionGUID="f10a45e2-5bc5-4984-a595-e2de376cf883" CreationDate="2022-08-28T05:00:05.343" UserId="251" Text="The node key is the identity of your node.&#xD;&#xA;&#xD;&#xA;When you boot the node you will get that too.&#xD;&#xA;It will be stored at `&lt;DATA-DIR&gt;/chains/&lt;CHAIN&gt;/network/secret_ed25519`.&#xD;&#xA;&#xD;&#xA;There are many ways to use it.&#xD;&#xA;&#xD;&#xA;1. put it in that folder&#xD;&#xA;2. replace the existing file's content&#xD;&#xA;3. `./node --node-key-file /path-to-the-node-key`&#xD;&#xA;&#xD;&#xA;Just a note here.&#xD;&#xA;&#xD;&#xA;In general, I don't generate the node key from `subkey`.&#xD;&#xA;You just need to run `./node --node-key-file a`. If the `a` not existed, the node will crate an `a` node key file automatically." ContentLicense="CC BY-SA 4.0" />
  <row Id="16763" PostHistoryTypeId="2" PostId="4480" RevisionGUID="15b0bb47-cf0a-4652-b361-03947928ea77" CreationDate="2022-08-28T05:04:40.350" UserId="251" Text="It comes from the [staking Rust code](https://github.com/paritytech/substrate/blob/ea4f532cffde1b90651d8f1be13a10c3721dd3d3/frame/staking/src/lib.rs#L677-L678).&#xD;&#xA;&#xD;&#xA;It means what validators this nominator is nominating." ContentLicense="CC BY-SA 4.0" />
  <row Id="16765" PostHistoryTypeId="5" PostId="4479" RevisionGUID="fa49bb38-d187-40ce-a399-277f0d7f79ff" CreationDate="2022-08-28T07:37:38.670" UserId="251" Comment="added 7 characters in body" Text="The node key is the identity of your node.&#xD;&#xA;&#xD;&#xA;When you boot the node, you will get that too.&#xD;&#xA;&#xD;&#xA;It will be stored at `&lt;DATA-DIR&gt;/chains/&lt;CHAIN&gt;/network/secret_ed25519`.&#xD;&#xA;&#xD;&#xA;There are many ways to use it.&#xD;&#xA;&#xD;&#xA;1. put it in that folder&#xD;&#xA;2. replace the existing file's content&#xD;&#xA;3. `./node --node-key-file /path-to-the-node-key`&#xD;&#xA;&#xD;&#xA;Just a note here.&#xD;&#xA;&#xD;&#xA;I generally don't generate the node key from the `subkey`.&#xD;&#xA;&#xD;&#xA;You just need to run `./node --node-key-file a'. &#xD;&#xA;&#xD;&#xA;If the `a' does not exist, the node will automatically create an `a` node key file." ContentLicense="CC BY-SA 4.0" />
  <row Id="16769" PostHistoryTypeId="2" PostId="4481" RevisionGUID="27593674-b727-4223-a990-86ac4a99dc42" CreationDate="2022-08-28T11:57:33.323" UserId="3090" Text="I have learned substrate some weaks ago, and due to generating of new blocks, my storage of pc is getting full." ContentLicense="CC BY-SA 4.0" />
  <row Id="16771" PostHistoryTypeId="1" PostId="4481" RevisionGUID="27593674-b727-4223-a990-86ac4a99dc42" CreationDate="2022-08-28T11:57:33.323" UserId="3090" Text="How can I delete blocks from local in my pc. My storage is full due to blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="16772" PostHistoryTypeId="3" PostId="4481" RevisionGUID="27593674-b727-4223-a990-86ac4a99dc42" CreationDate="2022-08-28T11:57:33.323" UserId="3090" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16773" PostHistoryTypeId="4" PostId="4481" RevisionGUID="93df3011-76fb-47b7-bd35-e3c785635982" CreationDate="2022-08-28T11:58:50.483" UserId="3090" Comment="edited title" Text="How can I delete blocks from my pc. My storage is full due to blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="16774" PostHistoryTypeId="2" PostId="4482" RevisionGUID="a9d792aa-08df-47d2-a599-37e730ef879d" CreationDate="2022-08-28T15:06:08.187" UserId="2102" Text="If you are just trying it out you should run the node with the following flag `--tmp`. &#xD;&#xA;&#xD;&#xA;If you were using the `--dev` flag it should also delete everything on stop.&#xD;&#xA;&#xD;&#xA;When you start the node, you should look for the following line:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;2022-08-28 17:01:20  Database: RocksDb at /var/folders/19/5tshxn412wx071h968j4s3s00000gn/T/substrate5R32Qo/chains/dev/db/full&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If anything is being persisted, that's the path you need to clean.&#xD;&#xA;&#xD;&#xA;I haven't run into that issue yet although I have a good amount of blocks stored. Are you sure the blocks are the issue? Note that the node itself can be more than 8GB" ContentLicense="CC BY-SA 4.0" />
  <row Id="16776" PostHistoryTypeId="2" PostId="4483" RevisionGUID="b87c5540-51fe-4ceb-8721-fcdb18ac0390" CreationDate="2022-08-28T15:23:48.677" UserId="2102" Text="Yes you can use the `--validator` flag and the `--node-key` or `--node-key-file` at the same time. Keep in mind that the `--node-key` will have precedence over the other one.&#xD;&#xA;&#xD;&#xA;Note if you are using the `--alice` or `--bob` flags, the `--validator` flag is not required.&#xD;&#xA;&#xD;&#xA;Additionally, you can also use the node itself to generate the same identity instead of using subkey like:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template key generate-node-key&#xD;&#xA;&#xD;&#xA;# Local Identity&#xD;&#xA;12D3KooWJHhnF64TXSmyxNkhPkXAHtYNRy86LuvGQu1LTi5vrJCL&#xD;&#xA;# Node Key&#xD;&#xA;86e77fbcc353717cd95cb8861f6763b250384af1289bd45f24b0a477f620fc5b&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or save it to a file:&#xD;&#xA;&#xD;&#xA;```console&#xD;&#xA;./target/release/node-template key generate-node-key --file ./.keys/node-key&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then, you can run the node like:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;# Using the node key directly (only for dev)&#xD;&#xA;./target/release/node-template --validator --node-key 86e77fbcc353717cd95cb8861f6763b250384af1289bd45f24b0a477f620fc5b&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;# Using the file&#xD;&#xA;./target/release/node-template --validator --node-key-file ./.keys/node-key&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And when the node is running, you'll see that the node identity is the same as the one generated by the node or subkey&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;2022-08-28 17:21:09   Local node identity is: 12D3KooWJHhnF64TXSmyxNkhPkXAHtYNRy86LuvGQu1LTi5vrJCL    &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16778" PostHistoryTypeId="50" PostId="3996" RevisionGUID="7df2923a-cec1-45e4-b0c5-c734dd44bc30" CreationDate="2022-08-28T16:03:50.443" UserId="-1" />
  <row Id="16779" PostHistoryTypeId="2" PostId="4484" RevisionGUID="06644ac2-3779-43aa-b780-6940d295b6ec" CreationDate="2022-08-28T16:11:21.320" UserId="251" Text="The default bootnodes are read from the spec file.&#xD;&#xA;&#xD;&#xA;You should update this field in your spec file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	&quot;bootNodes&quot;: [&#xD;&#xA;	],&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here's the Polkadot spec https://github.com/paritytech/polkadot/blob/master/node/service/chain-specs/polkadot.json.&#xD;&#xA;&#xD;&#xA;You could see:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  &quot;bootNodes&quot;: [&#xD;&#xA;    &quot;/dns/polkadot-connect-0.parity.io/tcp/443/wss/p2p/12D3KooWEPmjoRpDSUuiTjvyNDd8fejZ9eNWH5bE965nyBMDrB4o&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-1.parity.io/tcp/443/wss/p2p/12D3KooWLvcA24g6sT9YTaQyinwowMbLF5z7iMLoxZpEiV9pSmNf&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-2.parity.io/tcp/443/wss/p2p/12D3KooWDhp18HYzJuVX2jLhtjQgAhT1XWGqah42StoUJpkLvh2o&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-3.parity.io/tcp/443/wss/p2p/12D3KooWEsPEadSjLAPyxckqVJkp54aVdPuX3DD6a1FTL2y5cB9x&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-4.parity.io/tcp/443/wss/p2p/12D3KooWFfG1SQvcPoUK2N41cx7r52KYXKpRtZxfLZk8xtVzpp4d&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-5.parity.io/tcp/443/wss/p2p/12D3KooWDmQPkBvQGg9wjBdFThtWj3QCDVQyHJ1apfWrHvjwbYS8&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-6.parity.io/tcp/443/wss/p2p/12D3KooWBKtPpCnVTTzD7fPpCdFsrsYZ5K8fwmsLabb1JBuCycYs&quot;,&#xD;&#xA;    &quot;/dns/polkadot-connect-7.parity.io/tcp/443/wss/p2p/12D3KooWP3BsFY6UaiLjEJ3YbDp6q6SMQgAHB15qKj41DUZQLMqD&quot;,&#xD;&#xA;    &quot;/dns/p2p.0.polkadot.network/tcp/30333/p2p/12D3KooWHsvEicXjWWraktbZ4MQBizuyADQtuEGr3NbDvtm5rFA5&quot;,&#xD;&#xA;    &quot;/dns/p2p.1.polkadot.network/tcp/30333/p2p/12D3KooWQz2q2UWVCiy9cFX1hHYEmhSKQB2hjEZCccScHLGUPjcc&quot;,&#xD;&#xA;    &quot;/dns/p2p.2.polkadot.network/tcp/30333/p2p/12D3KooWNHxjYbDLLbDNZ2tq1kXgif5MSiLTUWJKcDdedKu4KaG8&quot;,&#xD;&#xA;    &quot;/dns/p2p.3.polkadot.network/tcp/30333/p2p/12D3KooWGJQysxrQcSvUWWNw88RkqYvJhH3ZcDpWJ8zrXKhLP5Vr&quot;,&#xD;&#xA;    &quot;/dns/p2p.4.polkadot.network/tcp/30333/p2p/12D3KooWKer8bYqpYjwurVABu13mkELpX2X7mSpEicpjShLeg7D6&quot;,&#xD;&#xA;    &quot;/dns/p2p.5.polkadot.network/tcp/30333/p2p/12D3KooWSRjL9LcEQd5u2fQTbyLxTEHq1tUFgQ6amXSp8Eu7TfKP&quot;,&#xD;&#xA;    &quot;/dns/cc1-0.parity.tech/tcp/30333/p2p/12D3KooWSz8r2WyCdsfWHgPyvD8GKQdJ1UAiRmrcrs8sQB3fe2KU&quot;,&#xD;&#xA;    &quot;/dns/cc1-1.parity.tech/tcp/30333/p2p/12D3KooWFN2mhgpkJsDBuNuE5427AcDrsib8EoqGMZmkxWwx3Md4&quot;,&#xD;&#xA;    &quot;/dns/polkadot-bootnode.dwellir.com/tcp/30333/ws/p2p/12D3KooWKvdDyRKqUfSAaUCbYiLwKY8uK3wDWpCuy2FiDLbkPTDJ&quot;&#xD;&#xA;  ],&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16781" PostHistoryTypeId="2" PostId="4485" RevisionGUID="f9d5d973-cc71-4d1b-813c-e0554e22372b" CreationDate="2022-08-28T17:44:42.570" UserId="407" Text="I had remove the default features in my ehr pallet from `serde`, `sp-keystore` and `hex`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sp-keystore = { version = &quot;0.12.0&quot;,optional= true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot; }&#xD;&#xA;parking_lot = '0.12'&#xD;&#xA;hex = { version = &quot;0.4.3&quot;, default-features = false, features = [&quot;alloc&quot;] }&#xD;&#xA;jsonwebtoken = &quot;8.1.1&quot;&#xD;&#xA;serde = { version = &quot;1.0.141&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;```&#xD;&#xA;And also remove features from `sp-io` that conflicts with other dependencies &#xD;&#xA;&#xD;&#xA;    sp-io = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.26&quot;, features=[&quot;disable_oom&quot;, &quot;disable_panic_handler&quot;] }&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16783" PostHistoryTypeId="2" PostId="4486" RevisionGUID="2e5006cd-9afa-4153-9cf9-f13a2845765b" CreationDate="2022-08-28T20:52:27.717" UserId="74" Text="Yes you can implement logic using this curve in Substrate. It is not supported natively as a key type, but that doesn't really matter if I had to guess what your use case is.&#xD;&#xA;&#xD;&#xA;One way to do this is to use [Arkworks][1]. The Arkworks ecosystem has a library that exposes the BN128 curve among many others and compiles into WASM compatible code. You can do so by importing the relevant packages you need for your application and using `default-features = false` in your `Cargo.toml` of your pallet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We've effectively used this route on [Webb's Substrate Protocol][2]. You can see an example of it in the links below. I will describe what is going on here so that it avoids any confusion hopefully.&#xD;&#xA;&#xD;&#xA;We've generalized our pallets to provide some arbitrary functionality like hashing or verifying zero-knowledge proofs (Groth16 proofs/Plonk proofs over a specified curve in our runtime).&#xD;&#xA;&#xD;&#xA;1. [We define the actual curve-specific hashing logic in the runtime.][3]&#xD;&#xA;2. [The curve specific logic lives in a `no-std` compatible library, for example our BN128 Poseidon hashing logic.][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/arkworks-rs/curves&#xD;&#xA;  [2]: https://github.com/webb-tools/protocol-substrate&#xD;&#xA;  [3]: https://github.com/webb-tools/protocol-substrate/blob/main/pallets/hasher/src/mock.rs#L86-L91&#xD;&#xA;  [4]: https://github.com/webb-tools/protocol-substrate/blob/main/primitives/src/hashing/arkworks.rs#L10-L24&#xD;&#xA;&#xD;&#xA;You can define arbitrary `no-std` compatible curves and functionality anywhere you want really in your runtime. You could even implement it directly in the pallet's logic, since this code all executes there anyway." ContentLicense="CC BY-SA 4.0" />
  <row Id="16785" PostHistoryTypeId="2" PostId="4487" RevisionGUID="9dadd818-561b-40e8-aa01-37749f38bef2" CreationDate="2022-08-29T06:03:44.667" UserId="3009" Text="I want to use the predefined built-in account's key pair to sign extrinsic from ocw, but I can not get the key/Secret seed/Secret phrase from polkadotjs app. How can I get these items? Shall I use subkey on the node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16787" PostHistoryTypeId="1" PostId="4487" RevisionGUID="9dadd818-561b-40e8-aa01-37749f38bef2" CreationDate="2022-08-29T06:03:44.667" UserId="3009" Text="How can I get predefined built-in account‘s key pair from polkadotjs app? Such as Alice and Bob" ContentLicense="CC BY-SA 4.0" />
  <row Id="16788" PostHistoryTypeId="3" PostId="4487" RevisionGUID="9dadd818-561b-40e8-aa01-37749f38bef2" CreationDate="2022-08-29T06:03:44.667" UserId="3009" Text="|polkadot|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16793" PostHistoryTypeId="2" PostId="4489" RevisionGUID="c270b176-41eb-47f1-ae74-37e39850fb7d" CreationDate="2022-08-29T06:18:29.490" UserId="167" Text="All of the default substrate accounts such as `Alice` are derived from this seed: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;bottom drive obey lake curtain smoke basket hold race lonely fit walk&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[source](https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/primitives/core/src/crypto.rs#L49).&#xD;&#xA;&#xD;&#xA;To get `Alice`, you derive a key with a [single hard junction](https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/primitives/core/src/crypto.rs#L754) from this key. In other words: &#xD;&#xA;&#xD;&#xA; ```&#xD;&#xA;bottom drive obey lake curtain smoke basket hold race lonely fit walk//Alice&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16796" PostHistoryTypeId="2" PostId="4490" RevisionGUID="9e68fead-d55e-4ff6-b04d-baefd74f609f" CreationDate="2022-08-29T06:41:26.973" UserId="167" Text="Getting the pallet version from [`polkadot-js-api`](https://github.com/polkadot-js/api/blob/8ba4ed53776a7a71478e229547c7af3d4dc57d63/packages/types/src/metadata/decorate/storage/index.spec.ts#L51) is as simple as: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;await api.query.system.palletVersion()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can wrap this in a script to give you all of the pallet versions: " ContentLicense="CC BY-SA 4.0" />
  <row Id="16798" PostHistoryTypeId="2" PostId="4491" RevisionGUID="6960162c-e307-4eb7-b8df-4aedb30ee8ac" CreationDate="2022-08-29T07:37:18.150" UserId="403" Text="For eg: &#xD;&#xA;I want to get the balance of an account in Polkadot before I can execute the extrinsic in my parachain. Is it possible to do so?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16800" PostHistoryTypeId="1" PostId="4491" RevisionGUID="6960162c-e307-4eb7-b8df-4aedb30ee8ac" CreationDate="2022-08-29T07:37:18.150" UserId="403" Text="Can I access storage of relay chain pallet from my parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16801" PostHistoryTypeId="3" PostId="4491" RevisionGUID="6960162c-e307-4eb7-b8df-4aedb30ee8ac" CreationDate="2022-08-29T07:37:18.150" UserId="403" Text="|parachain|storage|relay-chain|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16802" PostHistoryTypeId="2" PostId="4492" RevisionGUID="0facc597-ad26-4a95-a7ed-22558fe2d5e4" CreationDate="2022-08-29T08:43:15.797" UserId="251" Text="It depends on your system and the CLI flags.&#xD;&#xA;&#xD;&#xA;If you use the flag `--base-dir &lt;path&gt;` or `-d &lt;path&gt;`, check the `&lt;path&gt;`. &#xD;&#xA;&#xD;&#xA;If you are on macOS, check the `~/Library/Application Support/&lt;chain-name&gt;`.&#xD;&#xA;&#xD;&#xA;If you are on Linux, check the `~/.local/share/&lt;chain-name&gt;`.&#xD;&#xA;&#xD;&#xA;Tips: if you run `./node purge-chain`, it will show the path to the data." ContentLicense="CC BY-SA 4.0" />
  <row Id="16804" PostHistoryTypeId="2" PostId="4493" RevisionGUID="18d92e80-f412-4fc7-a652-33491c817891" CreationDate="2022-08-29T08:49:13.997" UserId="575" Text="You can use an [offchain worker][1] to fetch the required storage items from an API&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/fundamentals/offchain-operations/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16806" PostHistoryTypeId="2" PostId="4494" RevisionGUID="8d558a85-f63d-4485-bcaa-5b82a8418192" CreationDate="2022-08-29T09:10:41.513" UserId="362" Text="Not as part of your synchronous runtime logic, no, that would require all parachains to run inside one state machine, which conflicts with the sharding model." ContentLicense="CC BY-SA 4.0" />
  <row Id="16808" PostHistoryTypeId="5" PostId="4492" RevisionGUID="6748351a-6d54-454d-afde-195a3e01cb5d" CreationDate="2022-08-29T09:14:44.983" UserId="251" Comment="added 73 characters in body" Text="It depends on your system and the CLI flags.&#xD;&#xA;&#xD;&#xA;If you use the flag `--tmp` or `--dev`, check the `/tmp/&lt;somewhere&gt;`.&#xD;&#xA;&#xD;&#xA;If you use the flag `--base-dir &lt;path&gt;` or `-d &lt;path&gt;`, check the `&lt;path&gt;`. &#xD;&#xA;&#xD;&#xA;If you are on macOS, check the `~/Library/Application Support/&lt;chain-name&gt;`.&#xD;&#xA;&#xD;&#xA;If you are on Linux, check the `~/.local/share/&lt;chain-name&gt;`.&#xD;&#xA;&#xD;&#xA;Tips: if you run `./node purge-chain`, it will show the path to the data." ContentLicense="CC BY-SA 4.0" />
  <row Id="16809" PostHistoryTypeId="2" PostId="4495" RevisionGUID="7bc6b514-390b-44c1-acc2-902dd7f20a2e" CreationDate="2022-08-29T09:26:42.107" UserId="94" Text="You can always use Subkey to print the Secret Key and such:  &#xD;&#xA;```sh&#xD;&#xA;$ subkey inspect &quot;//Alice&quot;&#xD;&#xA;&#xD;&#xA;Secret Key URI `//Alice` is account:&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a&#xD;&#xA;  Public key (hex):  0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Account ID:        0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Public key (SS58): 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;  SS58 Address:      5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16811" PostHistoryTypeId="5" PostId="4492" RevisionGUID="86a84131-77f5-4c35-9aa5-56a92301ee82" CreationDate="2022-08-29T09:27:02.143" UserId="251" Comment="deleted 57 characters in body" Text="It depends on your system and the CLI flags.&#xD;&#xA;&#xD;&#xA;If you use the flag `--base-dir &lt;path&gt;` or `-d &lt;path&gt;`, check the `&lt;path&gt;`. &#xD;&#xA;&#xD;&#xA;If you are on macOS, check the `~/Library/Application Support/&lt;chain-name&gt;`.&#xD;&#xA;&#xD;&#xA;If you are on Linux, check the `~/.local/share/&lt;chain-name&gt;`.&#xD;&#xA;&#xD;&#xA;Tips: if you run `./node purge-chain --chain &lt;chain&gt;`, it will show the path to the data." ContentLicense="CC BY-SA 4.0" />
  <row Id="16812" PostHistoryTypeId="5" PostId="4420" RevisionGUID="4ae04929-2fc0-4d48-b674-1b40ccc01f74" CreationDate="2022-08-29T10:26:20.997" UserId="16" Comment="syntax highlighting" Text="# Summary &#xD;&#xA;&#xD;&#xA;I am using an Ink! smart contract (implemented in contract.rs) code calling a chain extension method. &#xD;&#xA;&#xD;&#xA;This works well. &#xD;&#xA;&#xD;&#xA;However, I want to split my code and call the extension method in a new module (let's call it util.rs). &#xD;&#xA;&#xD;&#xA;What is the idiomatic way to share the same env with this module.&#xD;&#xA;In other words I want to be able to call self.env().extension.my_method from utils.rs method.&#xD;&#xA;&#xD;&#xA;# First attempt&#xD;&#xA;&#xD;&#xA;I try to overlad the + operation with a basic functions for now.&#xD;&#xA;&#xD;&#xA;## Share the EnvAccess to a struct defined in util.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// utils.rs&#xD;&#xA;use crate::CustomEnvironment;&#xD;&#xA;use ink_lang::EnvAccess;&#xD;&#xA;&#xD;&#xA;#[derive(Debug)]&#xD;&#xA;pub struct VeryUtil&lt;'a&gt; {&#xD;&#xA;    pub value: ink_prelude::vec::Vec&lt;u8&gt;,&#xD;&#xA;    pub extension: EnvAccess&lt;'a, CustomEnvironment&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;'a&gt; VeryUtil&lt;'a&gt; {&#xD;&#xA;    pub fn new(&#xD;&#xA;        value: ink_prelude::vec::Vec&lt;u8&gt;,&#xD;&#xA;        extension: EnvAccess&lt;'a, CustomEnvironment&gt;,&#xD;&#xA;    ) -&gt; Self {&#xD;&#xA;        VeryUtil { value, extension }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl core::ops::Add&lt;VeryUtil&lt;'_&gt;&gt; for VeryUtil&lt;'_&gt; {&#xD;&#xA;    // For the next line I get&#xD;&#xA;    // generic associated types are unstable&#xD;&#xA;    // type Output&lt;'a&gt; = VeryUtil&lt;'a&gt;;&#xD;&#xA;&#xD;&#xA;    // for now I tested with&#xD;&#xA;    type Output = Vec&lt;u8&gt;;&#xD;&#xA;&#xD;&#xA;    fn add(self, rhs: VeryUtil) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;        println!(&quot;&gt; add is called&quot;);&#xD;&#xA;&#xD;&#xA;        let val = self&#xD;&#xA;            .extension&#xD;&#xA;            .extension()&#xD;&#xA;            .add_values(&amp;self.value, &amp;rhs.value);&#xD;&#xA;&#xD;&#xA;        val.unwrap()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here I get a warning when the output was the same struct, I commented in the code. &#xD;&#xA;A subsidiary question is how to avoid to share for each struct the env, but without it I would not be able to call the extension method in the Add overload part!&#xD;&#xA;&#xD;&#xA;## Use the defined  struct in one of the exposed contract methods: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// contract.rs&#xD;&#xA;1 let very_util_val1 = crate::util::VeryUtil::new(my_vec1.clone(), self.env());&#xD;&#xA;2 let very_util_val2 = crate::util::VeryUtil::new(my_vec2.clone(), self.env());&#xD;&#xA;3 // All the code purpose is to be able to do this!!!&#xD;&#xA;4 let result = very_util_val1 + very_util_val2 &#xD;&#xA;```&#xD;&#xA;I get the following error for line 1 and 2 : &#xD;&#xA;```&#xD;&#xA;cannot borrow `*self` as mutable because it is also borrowed as immutable&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My initial choice was to share a *__ink_ConreteOpsInstance* (self.env().extension) but I did not know how to define this type in my struct. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Another idea&#xD;&#xA;&#xD;&#xA;Maybe I can ask access like the contract module with the following macro ...&#xD;&#xA;```rust&#xD;&#xA;#[ink::contract(env = crate::CustomEnvironment)]&#xD;&#xA;```&#xD;&#xA;... but this module is not a contract just a sub module.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16813" PostHistoryTypeId="2" PostId="4496" RevisionGUID="ab5b3e8f-5495-4ac1-be61-fdbfb7d7b78d" CreationDate="2022-08-29T10:32:38.977" UserId="16" Text="Non sequitur. Successful deployment does not tell you whether your metadata is valid. The metadata isn't uploaded to the chain and hence not validated. The only thing you learned is that the chosen constructor didn't revert for the input you passed. That said, an outdated schema seems to be the most likely conclusion (or a schema that does not cover all corner cases). Best to open an issue in the ink! repo with a minimal reproducer." ContentLicense="CC BY-SA 4.0" />
  <row Id="16815" PostHistoryTypeId="2" PostId="4497" RevisionGUID="7420e31b-7fc5-4bd2-a994-4a8cd8d83013" CreationDate="2022-08-29T11:13:55.320" UserId="560" Text="the way to do it with js is to loop the pallets and query storageVersion and validate the returned payload:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;api.query.$pallet.storageVersion&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16817" PostHistoryTypeId="2" PostId="4498" RevisionGUID="533ead7f-32b5-4a85-a62b-2aea0b417560" CreationDate="2022-08-29T12:13:30.510" UserId="74" Text="We are adding custom networking/gossip logic to our codebase to handle other off-chain protocols over the gossip network. We experience reliability issues in the parachain environment that are both hard to reproduce and which do not occur in the standalone environment.&#xD;&#xA;&#xD;&#xA;Is there information or guidance on building networking apps in a parachain context? Are there issues that we should be aware of (such as message buffering, limits, other side-effects that could be possible)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16819" PostHistoryTypeId="1" PostId="4498" RevisionGUID="533ead7f-32b5-4a85-a62b-2aea0b417560" CreationDate="2022-08-29T12:13:30.510" UserId="74" Text="Are messages on parachains buffered on the network differently than they are in standalone environments?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16820" PostHistoryTypeId="3" PostId="4498" RevisionGUID="533ead7f-32b5-4a85-a62b-2aea0b417560" CreationDate="2022-08-29T12:13:30.510" UserId="74" Text="|substrate-node|parachain|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16821" PostHistoryTypeId="2" PostId="4499" RevisionGUID="6ea08377-5e55-4bc1-8f7f-fe8dc4fade04" CreationDate="2022-08-29T13:02:42.123" UserId="2477" Text="&#xD;&#xA;I have N fundamental data storage variables for each user (AccountId) that must be stored in mappings and are accessed and modified during method calls (#ink[messege]) in a smart contract.&#xD;&#xA;Not all of these fundamental data storage variables are used in all methods.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;- There are N fundamental data storage variables and 2 methods that modify them.&#xD;&#xA;- 1st method modifies the first M&lt;N of variables.&#xD;&#xA;- 2nd method modifies all N variables.&#xD;&#xA;- Both methods are called the same often.&#xD;&#xA;&#xD;&#xA;I have few ideas on how to organize data in this case and I don't know which one to choose:&#xD;&#xA;&#xD;&#xA;1) Each variable is stored in a separate Mapping&lt;AccountId, data_type&gt;.&#xD;&#xA;2) I divide variables into 2 structs (or tuples) and I store these structs (tuples) in 		 &#xD;&#xA;       two mappings.&#xD;&#xA;3) I divide variables into 2 structs (or tuples). Then I make a super-struct (super- &#xD;&#xA;       tuple) that contains both of the previous structs (tuples). &#xD;&#xA;       I have one Mapping&lt;AccoundId, SuperStruct&gt;&#xD;&#xA;4) All variables are stored in one struct (tuple) and there is only one mapping.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The question is how to organize that data to make accessing and modifying cheap (in gas)? Is it possible to give some general rules, or is it very case-dependent?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16823" PostHistoryTypeId="1" PostId="4499" RevisionGUID="6ea08377-5e55-4bc1-8f7f-fe8dc4fade04" CreationDate="2022-08-29T13:02:42.123" UserId="2477" Text="Rules for gas-efficient organizing multiple storage data variables in mappings in an ink! smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16824" PostHistoryTypeId="3" PostId="4499" RevisionGUID="6ea08377-5e55-4bc1-8f7f-fe8dc4fade04" CreationDate="2022-08-29T13:02:42.123" UserId="2477" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16825" PostHistoryTypeId="2" PostId="4500" RevisionGUID="de00e655-b33c-4535-afa8-e854a8aa0cc5" CreationDate="2022-08-29T13:40:04.603" UserId="1956" Text="Phala claims that both, the contract state and all interactions are encrypted and only accessable by the contract itself. How is this implemented? Unfortunately I find very little docs touching that topic. It would be really interesting to know which parties and which keys are involved and how they are handled. Who do I need to trust if anybody? I guess intel guarantees for the actual program+input=output validation using the trusted execution environment, but are there other entities that could either break confidentially or operation of a contract?&#xD;&#xA;&#xD;&#xA;Given the hypothetical case that a contracts would hold a private key that would have access to a very large amount of funds, what would be attack vectors?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="16827" PostHistoryTypeId="1" PostId="4500" RevisionGUID="de00e655-b33c-4535-afa8-e854a8aa0cc5" CreationDate="2022-08-29T13:40:04.603" UserId="1956" Text="How is confidentially guaranteed for fat contract state and transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16828" PostHistoryTypeId="3" PostId="4500" RevisionGUID="de00e655-b33c-4535-afa8-e854a8aa0cc5" CreationDate="2022-08-29T13:40:04.603" UserId="1956" Text="|fat-contract|phala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16829" PostHistoryTypeId="52" PostId="4491" RevisionGUID="d3fb0007-21e3-418b-8986-e0da3a3b7a9a" CreationDate="2022-08-29T15:42:01.093" />
  <row Id="16830" PostHistoryTypeId="5" PostId="4420" RevisionGUID="d9d281e3-a8b2-4574-ae31-7591ab40499f" CreationDate="2022-08-29T16:12:17.387" UserId="3078" Comment="Add a more concise and concrete question" Text="# Summary &#xD;&#xA;&#xD;&#xA;I am using an Ink! smart contract (implemented in contract.rs) code calling a chain extension method. &#xD;&#xA;&#xD;&#xA;This works well. &#xD;&#xA;&#xD;&#xA;However, I want to split my code and call the extension method in a new module (let's call it util.rs). &#xD;&#xA;&#xD;&#xA;What is the idiomatic way to share the same env with this module.&#xD;&#xA;In other words I want to be able to call self.env().extension.my_method from utils.rs method.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Update&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I will ask my question in a more concise and concrete way, suppose the following code in a ink! smart contract: &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;use crate::CustomEnvironment;&#xD;&#xA;&#xD;&#xA;// use ink_env::chain_extension::ChainExtension; NOT EXPOSED PUBLICLY&#xD;&#xA;fn call_a_method_extension(ext: &lt;&lt;CustomEnvironment&gt;::ChainExtension as ChainExtensionInstance&gt;::Instance) {&#xD;&#xA;    // use ext here&#xD;&#xA;    // ext.call_on_chain_method&#xD;&#xA;}&#xD;&#xA;// ...&#xD;&#xA;let ext = Self::env().extension();&#xD;&#xA;// Info from rust-analyser:&#xD;&#xA;// ChainExtensionInstance&lt;Self = Environment&lt;Self = E&gt;::ChainExtension&gt;::Instance&#xD;&#xA;// &lt;&lt;E as Environment&gt;::ChainExtension as ChainExtensionInstance&gt;::Instance&#xD;&#xA;&#xD;&#xA;call_a_method_extension(ext);&#xD;&#xA;&#xD;&#xA;// ...&#xD;&#xA;#[derive(Debug, Copy, Clone, PartialEq, Eq)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;pub enum CustomEnvironment {}&#xD;&#xA;&#xD;&#xA;impl Environment for CustomEnvironment {&#xD;&#xA;    const MAX_EVENT_TOPICS: usize = &lt;ink_env::DefaultEnvironment as Environment&gt;::MAX_EVENT_TOPICS;&#xD;&#xA;&#xD;&#xA;    type AccountId = &lt;ink_env::DefaultEnvironment as Environment&gt;::AccountId;&#xD;&#xA;    type Balance = &lt;ink_env::DefaultEnvironment as Environment&gt;::Balance;&#xD;&#xA;    type Hash = &lt;ink_env::DefaultEnvironment as Environment&gt;::Hash;&#xD;&#xA;    type BlockNumber = &lt;ink_env::DefaultEnvironment as Environment&gt;::BlockNumber;&#xD;&#xA;    type Timestamp = &lt;ink_env::DefaultEnvironment as Environment&gt;::Timestamp;&#xD;&#xA;&#xD;&#xA;    type ChainExtension = ConcreteOps;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;What type need to be written to the ext parameter in get_extension method ? &#xD;&#xA;&#xD;&#xA;# Archive&#xD;&#xA;&#xD;&#xA;## First attempt&#xD;&#xA;&#xD;&#xA;I try to overlad the + operation with a basic functions for now.&#xD;&#xA;&#xD;&#xA;## Share the EnvAccess to a struct defined in util.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// utils.rs&#xD;&#xA;use crate::CustomEnvironment;&#xD;&#xA;use ink_lang::EnvAccess;&#xD;&#xA;&#xD;&#xA;#[derive(Debug)]&#xD;&#xA;pub struct VeryUtil&lt;'a&gt; {&#xD;&#xA;    pub value: ink_prelude::vec::Vec&lt;u8&gt;,&#xD;&#xA;    pub extension: EnvAccess&lt;'a, CustomEnvironment&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;'a&gt; VeryUtil&lt;'a&gt; {&#xD;&#xA;    pub fn new(&#xD;&#xA;        value: ink_prelude::vec::Vec&lt;u8&gt;,&#xD;&#xA;        extension: EnvAccess&lt;'a, CustomEnvironment&gt;,&#xD;&#xA;    ) -&gt; Self {&#xD;&#xA;        VeryUtil { value, extension }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl core::ops::Add&lt;VeryUtil&lt;'_&gt;&gt; for VeryUtil&lt;'_&gt; {&#xD;&#xA;    // For the next line I get&#xD;&#xA;    // generic associated types are unstable&#xD;&#xA;    // type Output&lt;'a&gt; = VeryUtil&lt;'a&gt;;&#xD;&#xA;&#xD;&#xA;    // for now I tested with&#xD;&#xA;    type Output = Vec&lt;u8&gt;;&#xD;&#xA;&#xD;&#xA;    fn add(self, rhs: VeryUtil) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;        println!(&quot;&gt; add is called&quot;);&#xD;&#xA;&#xD;&#xA;        let val = self&#xD;&#xA;            .extension&#xD;&#xA;            .extension()&#xD;&#xA;            .add_values(&amp;self.value, &amp;rhs.value);&#xD;&#xA;&#xD;&#xA;        val.unwrap()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here I get a warning when the output was the same struct, I commented in the code. &#xD;&#xA;A subsidiary question is how to avoid to share for each struct the env, but without it I would not be able to call the extension method in the Add overload part!&#xD;&#xA;&#xD;&#xA;## Use the defined  struct in one of the exposed contract methods: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// contract.rs&#xD;&#xA;1 let very_util_val1 = crate::util::VeryUtil::new(my_vec1.clone(), self.env());&#xD;&#xA;2 let very_util_val2 = crate::util::VeryUtil::new(my_vec2.clone(), self.env());&#xD;&#xA;3 // All the code purpose is to be able to do this!!!&#xD;&#xA;4 let result = very_util_val1 + very_util_val2 &#xD;&#xA;```&#xD;&#xA;I get the following error for line 1 and 2 : &#xD;&#xA;```&#xD;&#xA;cannot borrow `*self` as mutable because it is also borrowed as immutable&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My initial choice was to share a *__ink_ConreteOpsInstance* (self.env().extension) but I did not know how to define this type in my struct. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Another idea&#xD;&#xA;&#xD;&#xA;Maybe I can ask access like the contract module with the following macro ...&#xD;&#xA;```rust&#xD;&#xA;#[ink::contract(env = crate::CustomEnvironment)]&#xD;&#xA;```&#xD;&#xA;... but this module is not a contract just a sub module.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16831" PostHistoryTypeId="4" PostId="4420" RevisionGUID="d9d281e3-a8b2-4574-ae31-7591ab40499f" CreationDate="2022-08-29T16:12:17.387" UserId="3078" Comment="Add a more concise and concrete question" Text="Update: Access to chain extension method from another module" ContentLicense="CC BY-SA 4.0" />
  <row Id="16832" PostHistoryTypeId="2" PostId="4501" RevisionGUID="5aac8099-529f-4150-9f01-4b7739fc2e65" CreationDate="2022-08-29T17:59:26.897" UserId="45" Text="It is possible but in a somewhat roundabout way.&#xD;&#xA;&#xD;&#xA;A parablock candidate is always created against a picked relay-parent — a relay-chain block. The storage root of the relay parent will be passed as a parameter to the parachain validation function (PVF). In the context of Cumulus, PVF is the same as the Runtime.&#xD;&#xA;&#xD;&#xA;What's that? How is the relay parent's storage root useful? Well, the storage root identifies the whole storage contents at the corresponding block, and it also allows for verifying proofs of inclusion. Simply put, somebody could create a proof and convince you that a certain key has a certain value in the storage with the specific storage root.&#xD;&#xA;&#xD;&#xA;The problem here is how to obtain that proof. The runtime is executed within a box and cannot reach any other data besides the storage and the data from the block itself (e.g., extrinsics). Therefore, to read the state of the relay chain, something should provide the proof through extrinsics. &#xD;&#xA;&#xD;&#xA;Luckily, Cumulus already reads some storage from the relay parent, and it is not completely a terra incognito, but it is not exactly a stroll in a park either. &#xD;&#xA;&#xD;&#xA;I guess a good entrypoint into this would be [this structure](https://github.com/paritytech/cumulus/blob/05abc1a38a27658732fce8798c5d251d898bae11/pallets/parachain-system/src/relay_state_snapshot.rs) and [this place](https://github.com/paritytech/cumulus/blob/680c5738d642b8e14bc8d09059ea17c99d320b4f/primitives/parachain-inherent/src/client_side.rs) where it's collected. &#xD;&#xA;&#xD;&#xA;A more user-friendly way is on the radar and is tracked [here](https://github.com/paritytech/cumulus/issues/320)." ContentLicense="CC BY-SA 4.0" />
  <row Id="16834" PostHistoryTypeId="2" PostId="4502" RevisionGUID="5da57b90-1411-4aba-9037-1b2f2950f134" CreationDate="2022-08-29T18:30:07.267" UserId="213" Text="I'm trying to use subxt in my yew front end app.&#xD;&#xA;&#xD;&#xA;    let pair = Pair::from_phrase(&amp;&quot;menumonic&quot;.to_string(), Some(&quot;password&quot;))?;&#xD;&#xA;&#xD;&#xA;As I can't use polkadot extension for signing transaction, is it safe to store pair in local storage for signing transaction?&#xD;&#xA;&#xD;&#xA;How can I do the transaction safely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16836" PostHistoryTypeId="1" PostId="4502" RevisionGUID="5da57b90-1411-4aba-9037-1b2f2950f134" CreationDate="2022-08-29T18:30:07.267" UserId="213" Text="Is it safe to store pair on local storage for signing transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16837" PostHistoryTypeId="3" PostId="4502" RevisionGUID="5da57b90-1411-4aba-9037-1b2f2950f134" CreationDate="2022-08-29T18:30:07.267" UserId="213" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16838" PostHistoryTypeId="5" PostId="4502" RevisionGUID="a4df47f9-d177-4442-ae72-1436e2a5c49a" CreationDate="2022-08-29T18:38:39.750" UserId="213" Comment="added 26 characters in body" Text="I'm trying to use subxt in my yew front end app.&#xD;&#xA;&#xD;&#xA;    let pair = Pair::from_phrase(&amp;&quot;menumonic&quot;.to_string(), Some(&quot;password&quot;))?;&#xD;&#xA;&#xD;&#xA;As I can't use polkadot extension for signing transaction, is it safe to store pair in local storage for signing transaction? Or storing in use_state. &#xD;&#xA;&#xD;&#xA;How can I do the transaction safely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16839" PostHistoryTypeId="5" PostId="4502" RevisionGUID="feb6c225-7745-4486-a27e-0007a4ca009e" CreationDate="2022-08-29T18:59:43.150" UserId="213" Comment="added 132 characters in body" Text="I'm trying to use subxt in my yew front end app.&#xD;&#xA;&#xD;&#xA;    let pair = Pair::from_phrase(&amp;&quot;mnemonic&quot;.to_string(), Some(&quot;password&quot;))?;&#xD;&#xA;&#xD;&#xA;As I can't use polkadot extension for signing transaction, is it safe to store mnemonic in local storage than using the password (without storing password in local storage) for signing transaction.&#xD;&#xA;&#xD;&#xA;How can I encrypt the mnemonic and store it in local storage, and then decrypt it? &#xD;&#xA;&#xD;&#xA;How can I do the transaction safely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16840" PostHistoryTypeId="5" PostId="4377" RevisionGUID="5a4cff43-1f89-4869-af2d-46644c1471a9" CreationDate="2022-08-30T01:54:39.820" UserId="3064" Comment="made code more succinct and improved performance" Text="I came up with a slightly different solution which filter's out nominators for a specific set of validator. I hope this helps someone out!&#xD;&#xA;&#xD;&#xA;Note:&#xD;&#xA;I wasn't able to parse the API's return value for &#xD;&#xA;&#xD;&#xA;    const nominators = await api.query.staking.nominators.entries();&#xD;&#xA;&#xD;&#xA;so I wrote to json and parsed that instead as a temporary solution.&#xD;&#xA;&#xD;&#xA;There is still a lot of parsing to do; if anybody comes up with a better solution please post it.&#xD;&#xA;&#xD;&#xA;Here's my code:&#xD;&#xA;```lang-js&#xD;&#xA;/**&#xD;&#xA; * Extracts all staking data for nominators which support the target_validaotrs.&#xD;&#xA; * @param {ApiPromise} api the active polkadot.js api connection&#xD;&#xA; * @param {Collection} target_validators validators whose nominators will be filtered&#xD;&#xA; * @param {boolean} dump_json if true, write intermediate data to json and log filter message &#xD;&#xA; * @returns a collection of staking data for each nominator supporting a target validator&#xD;&#xA; */&#xD;&#xA;async function getNominatorStaking(api, target_validators, dump_json = false) {&#xD;&#xA;    const nominators = await api.query.staking.nominators.entries();&#xD;&#xA;    let nominatorData = nominators.map(entry =&gt; entry.map(data =&gt; data.toHuman()));&#xD;&#xA;&#xD;&#xA;    // Filter nominators for those that support target validators&#xD;&#xA;    const filteredNominators = nominatorData.filter(&#xD;&#xA;        n =&gt; containsTargets(n[1].targets, target_validators)&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    const filteredNominatorAddresses = filteredNominators.map(entry =&gt; entry[0][0]);&#xD;&#xA;&#xD;&#xA;    // Create chunks so as not to overload api&#xD;&#xA;    let apiChunkSize = 64;&#xD;&#xA;    const size = apiChunkSize;&#xD;&#xA;    var nominatorAddressesChuncked = [];&#xD;&#xA;    for (let i = 0; i &lt; filteredNominatorAddresses.length; i += size) {&#xD;&#xA;        const chunk = filteredNominatorAddresses.slice(i, i + size);&#xD;&#xA;        nominatorAddressesChuncked.push(chunk);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Fetch staking data for filtered nominators&#xD;&#xA;    const nominatorStakings = [];&#xD;&#xA;    for (const chunk of tdqm(nominatorAddressesChuncked)) {&#xD;&#xA;        nominatorStakings.push(...await api.derive.staking.accounts(chunk));&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Dump data to json if requested &#xD;&#xA;    if (dump_json) {&#xD;&#xA;        // Log information about filtering process&#xD;&#xA;        console.log(&#xD;&#xA;            filteredNominators.length +&#xD;&#xA;            &quot; addresses filtered out of &quot; +&#xD;&#xA;            nominatorData.length + &quot;: &quot; +&#xD;&#xA;            Math.floor(filteredNominators.length / nominatorData.length * 100) +&#xD;&#xA;            &quot;%&quot;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        // Write json files &#xD;&#xA;        fs.writeFileSync(&#xD;&#xA;            'intermediaries/nominators.json',&#xD;&#xA;            JSON.stringify(nominatorData, null, 2)&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        fs.writeFileSync(&#xD;&#xA;            'intermediaries/filtered_nominators.json',&#xD;&#xA;            JSON.stringify(filteredNominators, null, 2)&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        fs.writeFileSync(&#xD;&#xA;            'intermediaries/filtered_nominator_stakings.json',&#xD;&#xA;            JSON.stringify(nominatorStakings, null, 2)&#xD;&#xA;        );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    return nominatorStakings;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16841" PostHistoryTypeId="2" PostId="4503" RevisionGUID="a5bdebc0-feae-4043-865c-40f1b2df7c29" CreationDate="2022-08-30T02:03:50.540" UserId="299" Text="https://wiki.polkadot.network/docs/maintain-sync#running-an-archive-node.&#xD;&#xA;&#xD;&#xA;this is my start command:&#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;./target/release/node --chain specs/testnet/testnet.json --name &quot;test-archive-node&quot; --pruning archive --base-path /tmp/archive-node --unsafe-ws-external --rpc-cors all  --bootnodes /ip4/xxxxxxx/tcp/40335/p2p/xxxxxxx&#xD;&#xA;```&#xD;&#xA;this log:&#xD;&#xA;```shell&#xD;&#xA;2022-08-30 09:56:51 Test Node&#xD;&#xA;2022-08-30 09:56:51 ✌️  version 0.0.1-91477983703&#xD;&#xA;2022-08-30 09:56:51 ❤️  by Test Developers, 2021-2022&#xD;&#xA;2022-08-30 09:56:51  Chain specification: Testnet&#xD;&#xA;2022-08-30 09:56:51   Node name: test-archive-node&#xD;&#xA;2022-08-30 09:56:51  Role: FULL&#xD;&#xA;2022-08-30 09:56:51  Database: RocksDb at /tmp/archive-node/chains/testnet/db/full&#xD;&#xA;2022-08-30 09:56:51 ⛓  Native runtime: test-node (node-1.tx1.au1)&#xD;&#xA;2022-08-30 09:56:54 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs&#xD;&#xA;2022-08-30 09:56:54   Local node identity is: *************&#xD;&#xA;2022-08-30 09:56:54  Operating system: linux&#xD;&#xA;2022-08-30 09:56:54  CPU architecture: x86_64&#xD;&#xA;2022-08-30 09:56:54  Target environment: gnu&#xD;&#xA;2022-08-30 09:56:54  CPU: Intel(R) Xeon(R) Platinum 8369B CPU @ 2.70GHz&#xD;&#xA;2022-08-30 09:56:54  CPU cores: 1&#xD;&#xA;2022-08-30 09:56:54  Memory: 7814MB&#xD;&#xA;2022-08-30 09:56:54  Kernel: 5.4.0-123-generic&#xD;&#xA;2022-08-30 09:56:54  Linux distribution: Ubuntu 20.04.4 LTS&#xD;&#xA;2022-08-30 09:56:54  Virtual machine: yes&#xD;&#xA;2022-08-30 09:56:54  Highest known block at #0&#xD;&#xA;2022-08-30 09:56:54 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;2022-08-30 09:56:54 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=None&#xD;&#xA;2022-08-30 09:56:54 Running JSON-RPC WS server: addr=0.0.0.0:9944, allowed origins=None&#xD;&#xA;2022-08-30 09:56:54 creating instance on iface 172.24.192.69&#xD;&#xA;2022-08-30 09:56:55 creating instance on iface 172.17.0.1&#xD;&#xA;2022-08-30 09:56:55 creating instance on iface 172.18.0.1&#xD;&#xA;2022-08-30 09:56:59  Idle (0 peers), best: #0 (0xecba…5342), finalized #0 (0xecba…5342), ⬇ 0 ⬆ 0&#xD;&#xA;2022-08-30 09:57:04  Idle (0 peers), best: #0 (0xecba…5342), finalized #0 (0xecba…5342), ⬇ 0 ⬆ 0&#xD;&#xA;^[[A^[[D2022-08-30 09:57:09  Idle (0 peers), best: #0 (0xecba…5342), finalized #0 (0xecba…5342), ⬇ 0 ⬆ 0&#xD;&#xA;2022-08-30 09:57:14  Idle (0 peers), best: #0 (0xecba…5342), finalized #0 (0xecba…5342), ⬇ 0 ⬆ 0&#xD;&#xA;2022-08-30 09:57:19  Idle (0 peers), best: #0 (0xecba…5342), finalized #0 (0xecba…5342), ⬇ 0 ⬆ 0&#xD;&#xA;2022-08-30 09:57:24  Idle (0 peers), best: #0 (0xecba…5342), finalized #0 (0xecba…5342), ⬇ 0 ⬆ 0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16843" PostHistoryTypeId="1" PostId="4503" RevisionGUID="a5bdebc0-feae-4043-865c-40f1b2df7c29" CreationDate="2022-08-30T02:03:50.540" UserId="299" Text="How to run archive-node in substrate chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="16844" PostHistoryTypeId="3" PostId="4503" RevisionGUID="a5bdebc0-feae-4043-865c-40f1b2df7c29" CreationDate="2022-08-30T02:03:50.540" UserId="299" Text="|archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16845" PostHistoryTypeId="2" PostId="4504" RevisionGUID="42ff3665-b618-4e00-ab5f-f429aa790219" CreationDate="2022-08-30T02:13:30.517" UserId="251" Text="Boot with `--pruning archive` or `--validator`. It will set the node to archive mode." ContentLicense="CC BY-SA 4.0" />
  <row Id="16847" PostHistoryTypeId="5" PostId="4504" RevisionGUID="4f2d039c-fa39-4153-b75e-2ad3e091e2ab" CreationDate="2022-08-30T02:19:50.463" UserId="251" Comment="added 170 characters in body" Text="Boot with `--pruning archive` or `--validator`. It will set the node to archive mode.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If you run with `--pruning 1000` again on the achieve DB. It will throw an error. I think that's a way to verify this. (Does anyone have a better way to verify this?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="16848" PostHistoryTypeId="2" PostId="4505" RevisionGUID="48195d77-0498-4193-8838-1fe07e513e53" CreationDate="2022-08-30T06:49:47.660" UserId="377" Text="Can anyone please explain what is the best decentralized storage protocol for storing pdf/images data on Polkadot parachain? &#xD;&#xA;Actually, I gone through filecoin, Crust and Cess. Now I'm little confused about this. &#xD;&#xA;Can anyone also have any idea what storage is widely used by most of the parachain? &#xD;&#xA;Thanks in advance&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16850" PostHistoryTypeId="1" PostId="4505" RevisionGUID="48195d77-0498-4193-8838-1fe07e513e53" CreationDate="2022-08-30T06:49:47.660" UserId="377" Text="Best Decentralised Storage for parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16851" PostHistoryTypeId="3" PostId="4505" RevisionGUID="48195d77-0498-4193-8838-1fe07e513e53" CreationDate="2022-08-30T06:49:47.660" UserId="377" Text="|parachain|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16852" PostHistoryTypeId="5" PostId="4502" RevisionGUID="bb6ad27e-98da-4122-a994-83b54d3094b1" CreationDate="2022-08-30T07:14:14.627" UserId="213" Comment="added 3555 characters in body" Text="I'm trying to use subxt in my yew front end app.&#xD;&#xA;&#xD;&#xA;    let pair = Pair::from_phrase(&amp;&quot;mnemonic&quot;.to_string(), Some(&quot;password&quot;))?;&#xD;&#xA;&#xD;&#xA;As I can't use polkadot extension for signing transaction, is it safe to store mnemonic in local storage than using the password (without storing password in local storage) for signing transaction.&#xD;&#xA;&#xD;&#xA;How can I encrypt the mnemonic and store it in local storage, and then decrypt it? &#xD;&#xA;&#xD;&#xA;How can I do the transaction safely?&#xD;&#xA;&#xD;&#xA;Here I have [tried the process][1] where salt for password and iv are stored in local storage, and also encrypted seed is stored in local storage. &#xD;&#xA;```rust&#xD;&#xA;use std::fmt::format;&#xD;&#xA;use libaes::Cipher;&#xD;&#xA;use scrypt::{scrypt, Params, Scrypt};&#xD;&#xA;use serde::{Deserialize, Serialize};&#xD;&#xA;use serde_json;&#xD;&#xA;&#xD;&#xA;use password_hash::{rand_core::OsRng, PasswordHash, PasswordHasher, PasswordVerifier, SaltString};&#xD;&#xA;&#xD;&#xA;pub fn generate_hash_and_verify(passwordstring: String) -&gt; String  {&#xD;&#xA;    let password = passwordstring.as_bytes();&#xD;&#xA;    let salt = SaltString::generate(&amp;mut OsRng); &#xD;&#xA;    println!(&quot;salt: {}&quot;, salt);&#xD;&#xA;    let password_hash = Scrypt.hash_password(password, &amp;salt).unwrap().to_string();&#xD;&#xA;    let parsed_hash = PasswordHash::new(&amp;password_hash).unwrap();&#xD;&#xA;    assert!(Scrypt.verify_password(password, &amp;parsed_hash).is_ok());&#xD;&#xA;    let salt_string = format!(&quot;{}&quot;, salt); // Store the salt in local storage.&#xD;&#xA;    salt_string&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn already_used_salt(passwordstring: String, salt_string: String) -&gt; String {&#xD;&#xA;    let salt_str: &amp;str = &amp;salt_string[..];&#xD;&#xA;    let salt = SaltString::new(salt_str).unwrap();&#xD;&#xA;    let password = passwordstring.as_bytes();&#xD;&#xA;&#xD;&#xA;    let password_hash = Scrypt.hash_password(password, &amp;salt).unwrap().to_string();&#xD;&#xA;    let parsed_hash = PasswordHash::new(&amp;password_hash).unwrap();&#xD;&#xA;    assert!(Scrypt.verify_password(password, &amp;parsed_hash).is_ok());&#xD;&#xA;    password_hash&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn encrypt_seed(password_hash: String, seed: String) -&gt; (Vec&lt;u8&gt;, String) {&#xD;&#xA;    let iv_salt = SaltString::generate(&amp;mut OsRng);&#xD;&#xA;    let iv_salt_string = format!(&quot;{}&quot;, iv_salt); &#xD;&#xA;    let iv_salt_string_clone = iv_salt_string.clone(); // Store iv salt in local storage&#xD;&#xA;    let iv_salt_bytes = iv_salt_string.into_bytes();&#xD;&#xA;    // println!(&quot;iv_salt_bytes len: {}&quot;, iv_salt_bytes.len());&#xD;&#xA;    // println!(&quot;iv_salt_bytes: {:?}&quot;, iv_salt_bytes);&#xD;&#xA;    let iv: &amp;[u8; 16] = &amp;iv_salt_bytes[0..16].try_into().unwrap();&#xD;&#xA;    // println!(&quot;iv: {:?}&quot;, iv);&#xD;&#xA;    let my_key_bytes = password_hash.into_bytes();&#xD;&#xA;    // println!(&quot;my_key_bytes: {:?}&quot;, my_key_bytes);&#xD;&#xA;    let my_key: &amp;[u8; 16] = &amp;my_key_bytes[0..16].try_into().unwrap();&#xD;&#xA;    // println!(&quot;my_key_bytes: {:?}&quot;, my_key);&#xD;&#xA;&#xD;&#xA;    let cipher = Cipher::new_128(my_key);&#xD;&#xA;&#xD;&#xA;    // Encryption&#xD;&#xA;    let encrypted = cipher.cbc_encrypt(iv, seed.as_bytes()); // Store in local storate&#xD;&#xA;    // println!(&quot;{:?}&quot;, encrypted); &#xD;&#xA;&#xD;&#xA;    // Decryption&#xD;&#xA;    let decrypted = cipher.cbc_decrypt(iv, &amp;encrypted[..]);&#xD;&#xA;    let seed = String::from_utf8(decrypted).unwrap();&#xD;&#xA;    // println!(&quot;{}&quot;, seed);&#xD;&#xA;    (encrypted, iv_salt_string_clone)&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn decrypt_seed(password: String, seed: String) {&#xD;&#xA;     &#xD;&#xA;    let salt_str = generate_hash_and_verify(password.clone());&#xD;&#xA;    let password_hash = already_used_salt(password, salt_str);&#xD;&#xA;    let (encrypted, iv_salt_string) = encrypt_seed(password_hash.clone(), seed);&#xD;&#xA;    let iv_salt_bytes = iv_salt_string.into_bytes();&#xD;&#xA;    let iv: &amp;[u8; 16] = &amp;iv_salt_bytes[0..16].try_into().unwrap();&#xD;&#xA;    let my_key_bytes = password_hash.into_bytes();&#xD;&#xA;    let my_key: &amp;[u8; 16] = &amp;my_key_bytes[0..16].try_into().unwrap();&#xD;&#xA;    let cipher = Cipher::new_128(my_key);&#xD;&#xA;    let decrypted = cipher.cbc_decrypt(iv, &amp;encrypted[..]);&#xD;&#xA;    let seed = String::from_utf8(decrypted).unwrap();&#xD;&#xA;    println!(&quot;{}&quot;, seed);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;fn main() {&#xD;&#xA;    let seed = &quot;caution juice atom organ advance problem want pledge someone senior holiday very&quot;&#xD;&#xA;        .to_owned();&#xD;&#xA;    decrypt_seed(&quot;passwordubiqutous&quot;.to_string(), seed)  &#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/amiyatulu/seed_encrypt" ContentLicense="CC BY-SA 4.0" />
  <row Id="16853" PostHistoryTypeId="2" PostId="4506" RevisionGUID="db28a11b-4923-4cd5-bd1a-c4dcd559a194" CreationDate="2022-08-30T08:12:37.590" UserId="73" Text="Yes it is safe to mutate storage items from `pre_dispatch`. Mutating storage items from `validate` doesn't make that much sense as it is only called in an offchain context. However, as the docs say you should ensure that `pre_dispatch` and `validate` are doing the exact same validity checks as otherwise your chain is attackable. &#xD;&#xA;Whatever you are doing, you just need to take into account that the dispatchable is maybe &quot;failing&quot; and didn't do what you expected in your `pre_dispatch`. So, you may need to use `post_dispatch` to do some corrections." ContentLicense="CC BY-SA 4.0" />
  <row Id="16855" PostHistoryTypeId="50" PostId="3405" RevisionGUID="6e34f2d6-0e1e-46b7-a650-04965f3edb7a" CreationDate="2022-08-30T09:03:40.320" UserId="-1" />
  <row Id="16856" PostHistoryTypeId="2" PostId="4507" RevisionGUID="414f45b6-ddbf-4ee5-b6ca-faa4714416ad" CreationDate="2022-08-30T09:08:29.010" UserId="85" Text="If I want to meet and chat with other parachain developers or devs building on parachains (with a substrate of beer and pizza), are there any good meetups in London where we could do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16858" PostHistoryTypeId="1" PostId="4507" RevisionGUID="414f45b6-ddbf-4ee5-b6ca-faa4714416ad" CreationDate="2022-08-30T09:08:29.010" UserId="85" Text="Are there any good substrate dev meetups in London?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16859" PostHistoryTypeId="3" PostId="4507" RevisionGUID="414f45b6-ddbf-4ee5-b6ca-faa4714416ad" CreationDate="2022-08-30T09:08:29.010" UserId="85" Text="|untagged|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16860" PostHistoryTypeId="2" PostId="4508" RevisionGUID="037b8351-5754-4b4e-92c2-8f7b04f60aec" CreationDate="2022-08-30T09:21:32.473" UserId="85" Text="Just announced there is a new meetup series in London dedicated to making Web3 a reality:&#xD;&#xA;&#xD;&#xA;https://www.meetup.com/beyond-the-chain-london/" ContentLicense="CC BY-SA 4.0" />
  <row Id="16862" PostHistoryTypeId="2" PostId="4509" RevisionGUID="ae91a61b-443d-4413-8386-53cb0ee38a96" CreationDate="2022-08-30T09:37:29.597" UserId="2163" Text="When an owner of an item makes a call to `approve_transfer` he allows an account to make transfers with that item.&#xD;&#xA;&#xD;&#xA;But if the owner transfers the item to a third account after making a call to `approve_transfer`(where he could have given access to his other account), he can transfer the item back to his account that he gave approval to before.&#xD;&#xA;&#xD;&#xA;Isn't this a problem, shouldn't we reset the delegate account to `None` after every transfer? Or maybe I am missing something?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16864" PostHistoryTypeId="1" PostId="4509" RevisionGUID="ae91a61b-443d-4413-8386-53cb0ee38a96" CreationDate="2022-08-30T09:37:29.597" UserId="2163" Text="Is the uniques approvals functionality correct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16865" PostHistoryTypeId="3" PostId="4509" RevisionGUID="ae91a61b-443d-4413-8386-53cb0ee38a96" CreationDate="2022-08-30T09:37:29.597" UserId="2163" Text="|uniques|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16866" PostHistoryTypeId="2" PostId="4510" RevisionGUID="f4301495-0269-499d-9dd3-f4bc48509468" CreationDate="2022-08-30T09:54:34.800" UserId="2307" Text="My pallet A:&#xD;&#xA;```&#xD;&#xA;pub trait TraitInPalletA&lt;AccountId&gt; {&#xD;&#xA;	fn do_somthing(&#xD;&#xA;		address: AccountId,&#xD;&#xA;	) -&gt; DispatchResult;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; TraitInPalletA&lt;T::AccountId&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	fn do_somthing(&#xD;&#xA;		address: T::AccountId,&#xD;&#xA;	) -&gt; DispatchResult {&#xD;&#xA;        // do_something&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;My pallet B:&#xD;&#xA;```&#xD;&#xA;use pallet_a::TraitInPalletA;&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;    // snip&#xD;&#xA;	type TraitA: TraitInPalletA&lt;Self::AccountId&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And in runtime:&#xD;&#xA;```&#xD;&#xA;impl pallet_a::Config for Runtime {&#xD;&#xA;	// snip&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_b::Config for Runtime {&#xD;&#xA;    // snip&#xD;&#xA;	type TraitA = Balances;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;When I build my code, it return this error in runtime at 'type TraitA = Balances' line:&#xD;&#xA;type TraitA = Balances;&#xD;&#xA;      |                          ^^^^^^^^ the trait `TraitInPalletA&lt;AccountId32&gt;` is not implemented for `pallet_balances::Pallet&lt;Runtime&gt;`&#xD;&#xA;&#xD;&#xA;How can I fix this bug?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16868" PostHistoryTypeId="1" PostId="4510" RevisionGUID="f4301495-0269-499d-9dd3-f4bc48509468" CreationDate="2022-08-30T09:54:34.800" UserId="2307" Text="Loose coopling with T::AccountId" ContentLicense="CC BY-SA 4.0" />
  <row Id="16869" PostHistoryTypeId="3" PostId="4510" RevisionGUID="f4301495-0269-499d-9dd3-f4bc48509468" CreationDate="2022-08-30T09:54:34.800" UserId="2307" Text="|substrate-node|loose-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16870" PostHistoryTypeId="2" PostId="4511" RevisionGUID="f3941f0d-1fc2-45cc-a430-bca8894e2426" CreationDate="2022-08-30T10:29:40.423" UserId="2663" Text="Sorry for the title but I don't know how to explain it better.&#xD;&#xA;&#xD;&#xA;I have [this simple custom pallet](https://github.com/Datagen-Project/Datagen-Substrate-Grant/tree/impl_random_selection_from_list/pallets/random_node_selector/src) and I try to test the `create_random_number` dispatchable function with a simple `assert_ok!` but I get this error from the terminal:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;running 2 tests&#xD;&#xA;test mock::__construct_runtime_integrity_test::runtime_integrity_tests ... ok&#xD;&#xA;test tests::crate_random_number ... FAILED&#xD;&#xA;&#xD;&#xA;failures:&#xD;&#xA;&#xD;&#xA;---- tests::crate_random_number stdout ----&#xD;&#xA;thread 'tests::crate_random_number' panicked at 'attempt to subtract with overflow', /rustc/263edd43c5255084292329423c61a9d69715ebfa/library/core/src/ops/arith.rs:240:1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The test panic at [this line](https://github.com/Datagen-Project/Datagen-Substrate-Grant/blob/bf14dc39e31a37fd52b3e5561a4128f135e1de9f/pallets/random_node_selector/src/lib.rs#L186) but I don't understand why because if I try to `cargo build --release` and call this function on the polkadot app it works fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="16872" PostHistoryTypeId="1" PostId="4511" RevisionGUID="f3941f0d-1fc2-45cc-a430-bca8894e2426" CreationDate="2022-08-30T10:29:40.423" UserId="2663" Text="Test panic with Randomness::random() 'attempt to subtract with overflow'" ContentLicense="CC BY-SA 4.0" />
  <row Id="16873" PostHistoryTypeId="3" PostId="4511" RevisionGUID="f3941f0d-1fc2-45cc-a430-bca8894e2426" CreationDate="2022-08-30T10:29:40.423" UserId="2663" Text="|pallet|random|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16874" PostHistoryTypeId="2" PostId="4512" RevisionGUID="3e29745f-5d65-4755-8750-0ca47fe8180d" CreationDate="2022-08-30T10:43:00.710" UserId="3009" Text="In my coding, I find that I can use a value or a value's reference as parameter in function StorageValue::put(). The same case is in function StorageMap::insert(). In my view, I can not input a value of different kind that the function needs. I found the parameter's kind in these functions are EncodeLike&lt;T&gt;, I am a green hand of rust, so I am not very clear about the usage of this style. Who can explain this for me?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16876" PostHistoryTypeId="1" PostId="4512" RevisionGUID="3e29745f-5d65-4755-8750-0ca47fe8180d" CreationDate="2022-08-30T10:43:00.710" UserId="3009" Text="Why using value and value reference as parameter in functions of StorageValue and StorageMap are both OK?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16877" PostHistoryTypeId="3" PostId="4512" RevisionGUID="3e29745f-5d65-4755-8750-0ca47fe8180d" CreationDate="2022-08-30T10:43:00.710" UserId="3009" Text="|storage|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16878" PostHistoryTypeId="5" PostId="4425" RevisionGUID="eb43add0-8989-4050-8b9c-6e65e1cc7618" CreationDate="2022-08-30T11:11:46.920" UserId="110" Comment="added 74 characters in body" Text="In our parachain setup we have one healthy collator node producing blocks.&#xD;&#xA;I tried to add two bootnodes and one collator to the set (all of them connecting to the existing collator). So for the bootnodes and the other collator, all of them were specifying the first healthy collator as &quot;bootnode&quot;.&#xD;&#xA;&#xD;&#xA;All the nodes discover each other, so they show 3 peers and, calling the RPC method `system.peers()` on each of them shows that they are the correct ones.&#xD;&#xA;&#xD;&#xA;The problem comes when nor the new collator (which is part of the invulnerable set) or the other two nodes, show activity in the network as the existing collator does (i.e. they are stuck in an old block). So it appears to me to be like a stalled subset of nodes.&#xD;&#xA;Inspecting the RPC `system.health()` on the healthy node shows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  peers: 3&#xD;&#xA;  isSyncing: false&#xD;&#xA;  shouldHavePeers: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So that calls my attention: `shouldHavePeers` is `false`, while in the other 3 nodes is `true`. Does anyone know what exactly **shouldHavePeers** means, why is it `false`, and how to make the node axtually accept the other peers ? &#xD;&#xA;Any help will be much appreciated!&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;I know from [here][1] that `should_have_peers` &quot;Might be false for local chains or when running without discovery&quot;. This doesn't help too much, since it is not a Local network and we are not specifically running without discovery.&#xD;&#xA;&#xD;&#xA;EDIT 2:&#xD;&#xA;`system.chainType` is `Live` for all the nodes.&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/sc_rpc/system/struct.Health.html#structfield.should_have_peerssystem.chainType" ContentLicense="CC BY-SA 4.0" />
  <row Id="16879" PostHistoryTypeId="2" PostId="4513" RevisionGUID="2c79465c-b56e-46b9-b462-4ae3c05a996a" CreationDate="2022-08-30T12:33:46.370" UserId="94" Text="This is caused by the fact that the block-number is 0 when your test runs.  &#xD;&#xA;The coinflip pallet then tries to calculate `0-1` [here](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/randomness-collective-flip/src/lib.rs#L79).  &#xD;&#xA;You can set the block-number to 1 in your `new_test_ext` function like this:  &#xD;&#xA;```rust&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;	let mut ext: sp_io::TestExternalities = system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap().into();&#xD;&#xA;	ext.execute_with(|| System::set_block_number(1));&#xD;&#xA;	ext&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Many tests do that, for similar reasons, so its not a red-flag." ContentLicense="CC BY-SA 4.0" />
  <row Id="16881" PostHistoryTypeId="4" PostId="4510" RevisionGUID="4e143857-bc63-4eba-9cfa-2eb64aa47358" CreationDate="2022-08-30T13:10:20.777" UserId="2307" Comment="edited title" Text="Loose coupling with T::AccountId" ContentLicense="CC BY-SA 4.0" />
  <row Id="16882" PostHistoryTypeId="2" PostId="4514" RevisionGUID="d75eb3c8-f6c9-4234-9916-7ae732344934" CreationDate="2022-08-30T13:26:30.210" UserId="3097" Text="I'm new to polkadot I want to know that in web3.py we just pass the transaction hash to the function w3.eth.getTransaction(txHash), in polkadot how we can do this by using python?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16884" PostHistoryTypeId="1" PostId="4514" RevisionGUID="d75eb3c8-f6c9-4234-9916-7ae732344934" CreationDate="2022-08-30T13:26:30.210" UserId="3097" Text="How to find the transaction details by using the transaction hash on polkadot by using python" ContentLicense="CC BY-SA 4.0" />
  <row Id="16885" PostHistoryTypeId="3" PostId="4514" RevisionGUID="d75eb3c8-f6c9-4234-9916-7ae732344934" CreationDate="2022-08-30T13:26:30.210" UserId="3097" Text="|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16886" PostHistoryTypeId="2" PostId="4515" RevisionGUID="9b3c9e5b-235b-417b-aeb1-725b091e6ddc" CreationDate="2022-08-30T13:33:25.220" UserId="2673" Text="Well, you set a trait bound for the associated type `TypeA` which requires it to implement trait `TraitInPalletA`. Then you attempt to assign to it a type `Balances` which doesn't implement that trait. `¯\_(ツ)_/¯`&#xD;&#xA;&#xD;&#xA;Probably you need to provide an implementation of `TraitInPallet` for `pallet_balances::Pallet` in pallet A." ContentLicense="CC BY-SA 4.0" />
  <row Id="16888" PostHistoryTypeId="6" PostId="4505" RevisionGUID="ba0b4c21-078b-4129-867a-b48f282310a4" CreationDate="2022-08-30T13:49:21.217" UserId="377" Comment="edited tags" Text="|polkadot|parachain|storage|decentralised|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16889" PostHistoryTypeId="2" PostId="4516" RevisionGUID="d4793d6a-c8c1-44e7-bd00-36f36d09c674" CreationDate="2022-08-30T14:06:18.537" UserId="73" Text="As you already found out this works because these functions take some generic type that implements `EncodeLike` the value type of your storage item. This is just some scheme to support passing either references or values to the function. You could even pass different types as long as they use the same encoding. As the FRAME storage SCALE encodes all values and decodes them when you call `get`, the type that you pass to `put` isn't important, as long as it encodes into the same format ;) &#xD;&#xA;&#xD;&#xA;This `EncodeLike` trait is some marker trait that only acts as some sort of information source at compilation time. It doesn't provide any further utility.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;MyStorageItem::put(val);&#xD;&#xA;let val = MyStorageItem::get();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Between this `put` and `get` the `val` is encoded and stored in the state. The `get` then retrieves the `val` from the state as an blob of bytes and decodes it." ContentLicense="CC BY-SA 4.0" />
  <row Id="16891" PostHistoryTypeId="5" PostId="4514" RevisionGUID="af309480-fd6e-4f80-967c-47b017b97f96" CreationDate="2022-08-30T14:44:20.830" UserId="34" Comment="added 14 characters in body; edited tags; edited title" Text="Is there something equivalent to  [`w3.eth.getTransaction(txHash)`](https://web3py.readthedocs.io/en/latest/web3.eth.html#web3.eth.Eth.get_transaction), for Substrate based chains using python?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16892" PostHistoryTypeId="4" PostId="4514" RevisionGUID="af309480-fd6e-4f80-967c-47b017b97f96" CreationDate="2022-08-30T14:44:20.830" UserId="34" Comment="added 14 characters in body; edited tags; edited title" Text="How to query transaction details by using the transaction hash on polkadot by using python" ContentLicense="CC BY-SA 4.0" />
  <row Id="16893" PostHistoryTypeId="6" PostId="4514" RevisionGUID="af309480-fd6e-4f80-967c-47b017b97f96" CreationDate="2022-08-30T14:44:20.830" UserId="34" Comment="added 14 characters in body; edited tags; edited title" Text="|polkadot|transactions|api|python|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16894" PostHistoryTypeId="6" PostId="43" RevisionGUID="a42827f3-49bb-4366-939d-434514c72b14" CreationDate="2022-08-30T14:45:31.213" UserId="2" Comment="tags edited" Text="|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16895" PostHistoryTypeId="24" PostId="43" RevisionGUID="a42827f3-49bb-4366-939d-434514c72b14" CreationDate="2022-08-30T14:45:31.213" Comment="Proposed by 2 approved by 34 edit id of 269" ContentLicense="CC BY-SA 4.0" />
  <row Id="16896" PostHistoryTypeId="2" PostId="4517" RevisionGUID="242d0b52-b0ea-4fd4-8aad-12606a5293ed" CreationDate="2022-08-30T14:53:17.343" UserId="94" Text="Transaction hashes have a different meaning in Polkadot than in Ethereum.  &#xD;&#xA;Ethereum TX hashes uniquely identify a transaction in a Block.  &#xD;&#xA;TX hashes in Polkadot are not necessarily unique. They are calculated from the function name and its argument values. So they identify a Transaction regardless of whether it's inside a block or not.   &#xD;&#xA;Many Polkadot Transactions will therefore share the *same* hash.  &#xD;&#xA;&#xD;&#xA;Transactions in Polkadot are identified by their block-number and the index that they have in that block.  For example [#11831228-2](https://polkadot.subscan.io/extrinsic/11831228-2) is transaction 2 in Block 11831228.  &#xD;&#xA;&#xD;&#xA;Have a look at [py-substrate-interface](https://github.com/polkascan/py-substrate-interface#method-1-access-serialized-value) which has an example on how to list the extrinsics of a block." ContentLicense="CC BY-SA 4.0" />
  <row Id="16898" PostHistoryTypeId="2" PostId="4518" RevisionGUID="b303d0f3-f1bd-4cb9-81bc-b340b6458450" CreationDate="2022-08-30T15:06:55.300" UserId="49" Text="When swapping two parachain slots as described in [the polkadot wiki](https://wiki.polkadot.network/docs/learn-auction#lease-extension-with-overlapping-slots), is it also possible to swap the `ParaID`, for example to keep the old `ParaID` and thus avoid issues in regards to XCM when extending the lease?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16900" PostHistoryTypeId="1" PostId="4518" RevisionGUID="b303d0f3-f1bd-4cb9-81bc-b340b6458450" CreationDate="2022-08-30T15:06:55.300" UserId="49" Text="Parachain lease extension: Swap ParaID as well" ContentLicense="CC BY-SA 4.0" />
  <row Id="16901" PostHistoryTypeId="3" PostId="4518" RevisionGUID="b303d0f3-f1bd-4cb9-81bc-b340b6458450" CreationDate="2022-08-30T15:06:55.300" UserId="49" Text="|polkadot|parachain|slot|lease|paraid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16902" PostHistoryTypeId="52" PostId="4507" RevisionGUID="31713945-5b7d-4cf6-815a-1057c9744c97" CreationDate="2022-08-30T17:08:43.363" />
  <row Id="16903" PostHistoryTypeId="2" PostId="4519" RevisionGUID="2cebdf32-a35c-45f4-a95a-3deb0dc99490" CreationDate="2022-08-30T18:02:32.700" UserId="29" Text="Take a look at this answer, specifically option 2:&#xD;&#xA;- https://substrate.stackexchange.com/questions/2874/how-can-a-project-prolong-a-parachain-slot-lease-in-kusama/2887#2887&#xD;&#xA;&#xD;&#xA;The key for option 2 as well, is for your team to plan in advance. &#xD;&#xA;&#xD;&#xA;Make sure you have time allocated for all aspects of securing a new slot.&#xD;&#xA;&#xD;&#xA;I recommend you test this process locally on a test network." ContentLicense="CC BY-SA 4.0" />
  <row Id="16905" PostHistoryTypeId="5" PostId="4519" RevisionGUID="39fdf197-f42b-4f56-bd07-256e08f7cf51" CreationDate="2022-08-30T18:10:17.787" UserId="29" Comment="added 27 characters in body" Text="Take a look at this answer, specifically option 2:&#xD;&#xA;- https://substrate.stackexchange.com/questions/2874/how-can-a-project-prolong-a-parachain-slot-lease-in-kusama/2887#2887&#xD;&#xA;&#xD;&#xA;The key for option 2 as well, is for your team to plan in advance. &#xD;&#xA;&#xD;&#xA;Make sure you have time allocated for all aspects of securing a new slot (governance, auction, etc).&#xD;&#xA;&#xD;&#xA;I recommend you test this process locally on a test network." ContentLicense="CC BY-SA 4.0" />
  <row Id="16906" PostHistoryTypeId="2" PostId="4520" RevisionGUID="4090aea0-5734-4826-8944-9bbcee7cd14f" CreationDate="2022-08-30T18:19:17.160" UserId="3088" Text="I was running benchmarks for my pallet and i had a note about some unknown db interactions besides the ones i expect.&#xD;&#xA;`// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)`&#xD;&#xA;I tried to inspect this and surrounded storage keys and got this &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TDsrw.jpg&#xD;&#xA;I can't understand this key definition. But it seems to be related to ascii table in some way. Especially this order `:;&lt;=&gt;?`. What is this and what can cause these db queries?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16908" PostHistoryTypeId="1" PostId="4520" RevisionGUID="4090aea0-5734-4826-8944-9bbcee7cd14f" CreationDate="2022-08-30T18:19:17.160" UserId="3088" Text="Unknown storage interactions during benchmarking custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="16909" PostHistoryTypeId="3" PostId="4520" RevisionGUID="4090aea0-5734-4826-8944-9bbcee7cd14f" CreationDate="2022-08-30T18:19:17.160" UserId="3088" Text="|pallet|storage|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16910" PostHistoryTypeId="2" PostId="4521" RevisionGUID="1506aacd-9dbb-4262-b4a8-3b1a94f43163" CreationDate="2022-08-30T18:37:03.867" UserId="94" Text="This is the storage key for `:transaction_level:`. It is just ASCII encoded as HEX.   &#xD;&#xA;That key should be white-listed which is also the case on current Substrate master.  &#xD;&#xA;Your problem should be solved by updating Substrate. The change happened [here](https://github.com/paritytech/substrate/pull/11394)." ContentLicense="CC BY-SA 4.0" />
  <row Id="16912" PostHistoryTypeId="52" PostId="4511" RevisionGUID="0939cf24-e6b7-4170-a9a7-d5ab154a0719" CreationDate="2022-08-30T18:38:17.003" />
  <row Id="16914" PostHistoryTypeId="2" PostId="4522" RevisionGUID="236d4256-cb4b-48e5-9411-c3ec6c917d20" CreationDate="2022-08-31T02:39:17.090" UserId="2765" Text="A short answer: you only need to trust the Secure Enclave hardware, thus the only attack vector is to compromise the hardware.&#xD;&#xA;&#xD;&#xA;Before all, the programs in Secure Enclave are different in that the hardware owners can neither see their memory value nor affect their execution. This is the meaning of &quot;enclave&quot;: they own the computer but not the programs in it. So in the following when I say the Worker knows the key, only the program knows but not the human operator.&#xD;&#xA;&#xD;&#xA;Every entity in Phala blockchain has its own sr25519 key pair: each Worker has its WorkerKey to show the identity and encrypt its traffic, and each contract has the ContractKey to encrypt the traffic and its state stored on-chain.&#xD;&#xA;&#xD;&#xA;Among all the Workers, some are elected as Gatekeepers. The only difference is that Gatekeepers need to generate and manage the MasterKey, which is the basis of all the ContractKey: we do not store the contract secret keys on-chain, they are generated on-the-fly by deriving the MasterKey given the metadata of the contract.&#xD;&#xA;&#xD;&#xA;**By compromising a Gatekeeper and leaking the MasterKey you can generate any ContractKey and see their states.** It is so important that we need to protect the Gatekeepers well: the Gatekeeper computers must be in the 1 or 2 [confidence level](https://wiki.phala.network/en-us/mine/solo/1-2-confidential-level-evaluation/#confidence-level-of-a-miner) so they are immune to all the known attacks against Secure Enclave, and their IP addresses are not public to prevent direct access.&#xD;&#xA;&#xD;&#xA;When a contract is deployed to a Worker, the Gatekeeper will share its ContractKey to the Worker (with end-to-end encryption of course) so the Worker can decrypt the traffic and states of the contract for execution. **By compromising a single Worker, the attackers can learn the ContractKeys that have been shared with it.** You can choose the Workers with high confidence levels to deploy your contract and hide them behind a gateway to enjoy the similar security promise of Gatekeepers.&#xD;&#xA;&#xD;&#xA;## Comments on Intel SGX Security&#xD;&#xA;&#xD;&#xA;The SGX provides the promise of confidentiality and execution integrity. Until now, to crack the execution integrity and control the programs in SGX is impossible (unless the program itself has vulnerabilities, and Rust can help mitigate this).&#xD;&#xA;&#xD;&#xA;Another problem is privacy leakage which is usually based on the side channel attacks on Spectre and Meltdown vulnerabilities and their variants. My comment on this is that although there are many successful attacks in the lab, it's hard to remotely leak the data: these attacks rely on high-frequency repeated attempts with no crash and a high-resolution timer, and both are not available in our environment.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16916" PostHistoryTypeId="5" PostId="4522" RevisionGUID="05e5f30f-88e4-4ebd-bc1a-c89f96665748" CreationDate="2022-08-31T02:50:30.393" UserId="2765" Comment="added 211 characters in body" Text="A short answer: you only need to trust the Secure Enclave hardware, thus the only attack vector is to compromise the hardware.&#xD;&#xA;&#xD;&#xA;Before all, the programs in Secure Enclave are different in that the hardware owners can neither see their memory value nor affect their execution. This is the meaning of &quot;enclave&quot;: they own the computer but not the programs in it. So in the following when I say the Worker knows the key, only the program knows but not the human operator.&#xD;&#xA;&#xD;&#xA;Every entity in Phala blockchain has its own sr25519 key pair: each Worker has its WorkerKey to show the identity and encrypt its traffic, and each contract has the ContractKey to encrypt the traffic and its state stored on-chain. They all follow the same schema: the public key is released on-chain so you can verify the identity and use it to encrypt your request, and the secret key never leaves the Secure Enclave hardware in plain text.&#xD;&#xA;&#xD;&#xA;Among all the Workers, some are elected as Gatekeepers. The only difference is that Gatekeepers need to generate and manage the MasterKey, which is the basis of all the ContractKey: we do not store the contract secret keys on-chain, they are generated on-the-fly by deriving the MasterKey given the metadata of the contract.&#xD;&#xA;&#xD;&#xA;**By compromising a Gatekeeper and leaking the MasterKey you can generate any ContractKey and see their states.** It is so important that we need to protect the Gatekeepers well: the Gatekeeper computers must be in the 1 or 2 [confidence level](https://wiki.phala.network/en-us/mine/solo/1-2-confidential-level-evaluation/#confidence-level-of-a-miner) so they are immune to all the known attacks against Secure Enclave, and their IP addresses are not public to prevent direct access.&#xD;&#xA;&#xD;&#xA;When a contract is deployed to a Worker, the Gatekeeper will share its ContractKey to the Worker (with end-to-end encryption of course) so the Worker can decrypt the traffic and states of the contract for execution. **By compromising a single Worker, the attackers can learn the ContractKeys that have been shared with it.** You can choose the Workers with high confidence levels to deploy your contract and hide them behind a gateway to enjoy the similar security promise of Gatekeepers.&#xD;&#xA;&#xD;&#xA;## Comments on Intel SGX Security&#xD;&#xA;&#xD;&#xA;The SGX provides the promise of confidentiality and execution integrity. Until now, to crack the execution integrity and control the programs in SGX is impossible (unless the program itself has vulnerabilities, and Rust can help mitigate this).&#xD;&#xA;&#xD;&#xA;Another problem is privacy leakage which is usually based on the side channel attacks on Spectre and Meltdown vulnerabilities and their variants. My comment on this is that although there are many successful attacks in the lab, it's hard to remotely leak the data: these attacks rely on high-frequency repeated attempts with no crash and a high-resolution timer, and both are not available in our environment.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16917" PostHistoryTypeId="5" PostId="4479" RevisionGUID="87d45a69-700e-4cd4-8f4d-15b6435dfacb" CreationDate="2022-08-31T04:33:53.493" UserId="251" Comment="edited body" Text="The node key is the identity of your node.&#xD;&#xA;&#xD;&#xA;When you boot the node, you will get that too.&#xD;&#xA;&#xD;&#xA;It will be stored at `&lt;DATA-DIR&gt;/chains/&lt;CHAIN&gt;/network/secret_ed25519`.&#xD;&#xA;&#xD;&#xA;There are many ways to use it.&#xD;&#xA;&#xD;&#xA;1. put it in that folder&#xD;&#xA;2. replace the existing file's content&#xD;&#xA;3. `./node --node-key-file /path-to-the-node-key`&#xD;&#xA;&#xD;&#xA;Just a note here.&#xD;&#xA;&#xD;&#xA;I generally don't generate the node key from the `subkey`.&#xD;&#xA;&#xD;&#xA;You just need to run `./node --node-key-file a'. &#xD;&#xA;&#xD;&#xA;If the `a` does not exist, the node will automatically create an `a` node key file." ContentLicense="CC BY-SA 4.0" />
  <row Id="16919" PostHistoryTypeId="4" PostId="4500" RevisionGUID="4a0b8a74-18c7-4ef6-b7ea-0ad65d74bed5" CreationDate="2022-08-31T06:35:04.483" UserId="2765" Comment="Now the official name is Phat Contract" Text="How is confidentially guaranteed for Phat Contract state and transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16920" PostHistoryTypeId="24" PostId="4500" RevisionGUID="4a0b8a74-18c7-4ef6-b7ea-0ad65d74bed5" CreationDate="2022-08-31T06:35:04.483" Comment="Proposed by 2765 approved by 1956 edit id of 270" ContentLicense="CC BY-SA 4.0" />
  <row Id="16921" PostHistoryTypeId="2" PostId="4523" RevisionGUID="45869fa5-a9f7-48d1-92f7-b8505ab936ec" CreationDate="2022-08-31T06:44:13.083" UserId="3096" Text="We had changed the code in pallet template and was trying to add it in substrate node-template runtime. Link to [github code][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Got the following [![error][2]][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/sky-vibhu/Custom-Pallet.git&#xD;&#xA;  [2]: https://i.stack.imgur.com/yg2f7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="16923" PostHistoryTypeId="1" PostId="4523" RevisionGUID="45869fa5-a9f7-48d1-92f7-b8505ab936ec" CreationDate="2022-08-31T06:44:13.083" UserId="3096" Text="Getting conflicting implementation error while adding custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="16924" PostHistoryTypeId="3" PostId="4523" RevisionGUID="45869fa5-a9f7-48d1-92f7-b8505ab936ec" CreationDate="2022-08-31T06:44:13.083" UserId="3096" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16929" PostHistoryTypeId="2" PostId="4525" RevisionGUID="67272467-4066-4c8b-a7f2-bf1b2701cd09" CreationDate="2022-08-31T08:07:32.857" UserId="1789" Text="how to run Zombienet tests with natively built parachain and polkadot validator?&#xD;&#xA;It seems in the Zombienet's Readme it is not very clear on how to set that up...&#xD;&#xA;&#xD;&#xA;Can I use the same test file(.feature file) ?&#xD;&#xA;&#xD;&#xA;My current network file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:{{POLKADOT_VERSION}}&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;{{COLLATOR_URL}}&quot;&#xD;&#xA;  command = &quot;parachain-collator&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;  &#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;How can I change the relayer and parachain images to local native binaries? " ContentLicense="CC BY-SA 4.0" />
  <row Id="16931" PostHistoryTypeId="1" PostId="4525" RevisionGUID="67272467-4066-4c8b-a7f2-bf1b2701cd09" CreationDate="2022-08-31T08:07:32.857" UserId="1789" Text="How to run Zombienet with native built binaries?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16932" PostHistoryTypeId="3" PostId="4525" RevisionGUID="67272467-4066-4c8b-a7f2-bf1b2701cd09" CreationDate="2022-08-31T08:07:32.857" UserId="1789" Text="|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16933" PostHistoryTypeId="2" PostId="4526" RevisionGUID="7c8f4b2b-0139-467c-8960-87a88a24a370" CreationDate="2022-08-31T08:10:39.053" UserId="1789" Text="thank you for Zombienet team's quick reply!&#xD;&#xA;&#xD;&#xA;For my fixed network file above:&#xD;&#xA;&#xD;&#xA;`default_command = &quot;polkadot&quot;` =&gt; Rename your built polkadot validator binary to &quot;polkadot&quot;&#xD;&#xA;&#xD;&#xA;`command = &quot;parachain-collator&quot;` =&gt; Rename your built parachain collator binary to &quot;parachain-collator&quot;&#xD;&#xA;&#xD;&#xA;Then add the binaries above into your bash PATH:&#xD;&#xA;```&#xD;&#xA;export PATH=&quot;/path/to/built/binary_folder/:$PATH&quot;&#xD;&#xA;```&#xD;&#xA;Check if your binaries can be accessed in PATH:&#xD;&#xA;```&#xD;&#xA;polkadot --version&#xD;&#xA;parachain-collator --version&#xD;&#xA;```&#xD;&#xA;Then run my Zombienet feature file with native provider:&#xD;&#xA;```&#xD;&#xA;zombienet-linux1256 -p native test zombienet_tests/05-small-network.feature&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16935" PostHistoryTypeId="2" PostId="4527" RevisionGUID="175aace9-b297-46c8-9b60-2fed7f796730" CreationDate="2022-08-31T08:30:35.980" UserId="201" Text="I would like to calculate the threshold for referendums to pass. I found this article about how the calculation works, but it requires the number of coins in circulation. Is there an API endpoint for this?&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-governance" ContentLicense="CC BY-SA 4.0" />
  <row Id="16937" PostHistoryTypeId="1" PostId="4527" RevisionGUID="175aace9-b297-46c8-9b60-2fed7f796730" CreationDate="2022-08-31T08:30:35.980" UserId="201" Text="How to get circulating supply / 'electorate' from API" ContentLicense="CC BY-SA 4.0" />
  <row Id="16938" PostHistoryTypeId="3" PostId="4527" RevisionGUID="175aace9-b297-46c8-9b60-2fed7f796730" CreationDate="2022-08-31T08:30:35.980" UserId="201" Text="|polkadot-js|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16939" PostHistoryTypeId="2" PostId="4528" RevisionGUID="089b8569-5ce7-48d7-8b40-79fdaf2dd4cf" CreationDate="2022-08-31T09:19:06.967" UserId="251" Text="&gt; [Vote Threshold](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/democracy/src/vote_threshold.rs#L92-L105)&#xD;&#xA;&#xD;&#xA;Let's take a look at the calculation/formula first.&#xD;&#xA;&#xD;&#xA;There are 3 kinds of `VoteThreshold`, so the first thing you need to figure out is the voting kind.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt; [Bake Referendum](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/democracy/src/lib.rs#L1716)&#xD;&#xA;&#xD;&#xA;Then, the previous function was called here.&#xD;&#xA;&#xD;&#xA;Through the code, we know that we need two storage items to finish the calculation.&#xD;&#xA;&#xD;&#xA; 1. [ReferendumInfoOf](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/democracy/src/lib.rs#L423) contains voting type and tally/supply&#xD;&#xA; 2. [TotalIssuance](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/balances/src/lib.rs#L495) is the electorate&#xD;&#xA; &#xD;&#xA;You just need to query `balances::total_issuance` and `democracy::referendum_info_of(x)`. Then fill them in the formula.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Tips: for the `compare_rationals`. It's well documented in the source code.&#xD;&#xA;&#xD;&#xA;It's just `n1 / d1 &lt; n2 / d2` but with some overflowing protection.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16941" PostHistoryTypeId="2" PostId="4529" RevisionGUID="9c9086f9-2b1a-42f7-8fa7-d5f65d908b70" CreationDate="2022-08-31T09:19:49.653" UserId="3009" Text="When I make use of offchain signed extrinsic to send transaction to chain, I copied snippet from others, which is like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    use sp_core::crypto::KeyTypeId;&#xD;&#xA;    pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;xkey&quot;);&#xD;&#xA;    pub mod crypto {&#xD;&#xA;    	use super::KEY_TYPE;&#xD;&#xA;    	use sp_runtime::app_crypto::{app_crypto, sr25519};&#xD;&#xA;    	app_crypto!(sr25519, KEY_TYPE);&#xD;&#xA;    }&#xD;&#xA;    pub type AuthorityId = crypto::Public;&#xD;&#xA;&#xD;&#xA;There is a KeyTypeId in snippet, which is defined by b&quot;xkey&quot;. In runtime code I used this KeyTypeId and it works.But I don't quite sure about what does the KeyTypeId means. I just know that the KeyTypeId bound with a private key which is associated with an account. Who can tell me the background knowledge of all of this?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16943" PostHistoryTypeId="1" PostId="4529" RevisionGUID="9c9086f9-2b1a-42f7-8fa7-d5f65d908b70" CreationDate="2022-08-31T09:19:49.653" UserId="3009" Text="What is KeyTypeId, and how to use it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16944" PostHistoryTypeId="3" PostId="4529" RevisionGUID="9c9086f9-2b1a-42f7-8fa7-d5f65d908b70" CreationDate="2022-08-31T09:19:49.653" UserId="3009" Text="|offchain|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16945" PostHistoryTypeId="5" PostId="4528" RevisionGUID="10b40306-9804-4c96-8e07-ff24942dfd53" CreationDate="2022-08-31T09:24:41.380" UserId="251" Comment="added 1 character in body" Text="&gt; [Vote Threshold](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/democracy/src/vote_threshold.rs#L92-L105)&#xD;&#xA;&#xD;&#xA;Let's take a look at the calculation/formula first.&#xD;&#xA;&#xD;&#xA;There are 3 kinds of `VoteThreshold`, so the first thing you need to figure out is the voting kind.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt; [Bake Referendum](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/democracy/src/lib.rs#L1716)&#xD;&#xA;&#xD;&#xA;Then, the previous function was called here.&#xD;&#xA;&#xD;&#xA;Through the code, we know that we need two storage items to finish the calculation.&#xD;&#xA;&#xD;&#xA; 1. [ReferendumInfoOf](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/democracy/src/lib.rs#L423) contains voting type and tally/supply&#xD;&#xA; 2. [TotalIssuance](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/balances/src/lib.rs#L495) is the electorate&#xD;&#xA; &#xD;&#xA;You just need to query `balances::total_issuance` and `democracy::referendum_info_of(x)`.&#xD;&#xA;And fill them in the formula.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Tips: for the `compare_rationals`.&#xD;&#xA;It's well documented in the source code.&#xD;&#xA;&#xD;&#xA;It's just `n1 / d1 &lt; n2 / d2` but with some overflowing protection. &#xD;&#xA;&#xD;&#xA;If you are off-chain, using `f64`/`double` is enough. IIUC. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16946" PostHistoryTypeId="2" PostId="4530" RevisionGUID="a1f837e7-503f-4d74-b196-363b4a62bb0c" CreationDate="2022-08-31T09:35:57.410" UserId="251" Text="[Here](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/primitives/core/src/crypto.rs#L1105-L1124) defines some well-known key type ids.&#xD;&#xA;&#xD;&#xA;Just like its name. It's the key type's id.&#xD;&#xA;Which is used [here](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/primitives/runtime/src/traits.rs#L1715).&#xD;&#xA;&#xD;&#xA;From the algorithm level, key type id is just a 4-bytes-length slice append to the key head. " ContentLicense="CC BY-SA 4.0" />
  <row Id="16948" PostHistoryTypeId="5" PostId="4530" RevisionGUID="7a7b2055-d63d-4115-8590-da6311cf8c8f" CreationDate="2022-08-31T09:42:06.840" UserId="251" Comment="added 235 characters in body" Text="[Here](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/primitives/core/src/crypto.rs#L1105-L1124) defines some well-known key type ids.&#xD;&#xA;&#xD;&#xA;Just like its name. It's the key type's id.&#xD;&#xA;Which is used [here](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/primitives/runtime/src/traits.rs#L1715).&#xD;&#xA;&#xD;&#xA;From the algorithm level, key type id is just a 4-bytes-length slice append to the key head. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;BTW, [here](https://github.com/hack-ink/subalfred/blob/7aabd6b6246af0043c15468498b350b5dcdd30fe/src/subalfred/core/key/mod.rs#L13-L46) is a minimal re-implementation of the Substrate key type id. It might looks more clearly." ContentLicense="CC BY-SA 4.0" />
  <row Id="16949" PostHistoryTypeId="5" PostId="4528" RevisionGUID="74c0ebae-5772-4d24-a495-89e07e9e8223" CreationDate="2022-08-31T09:46:05.277" UserId="251" Comment="edited body" Text="&gt; [Vote Threshold](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/democracy/src/vote_threshold.rs#L92-L105)&#xD;&#xA;&#xD;&#xA;Let's take a look at the calculation/formula first.&#xD;&#xA;&#xD;&#xA;There are 3 kinds of `VoteThreshold`, so the first thing you need to figure out is the voting type.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt; [Bake Referendum](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/democracy/src/lib.rs#L1716)&#xD;&#xA;&#xD;&#xA;Then, the previous function was called here.&#xD;&#xA;&#xD;&#xA;Through the code, we know that we need two storage items to finish the calculation.&#xD;&#xA;&#xD;&#xA; 1. [ReferendumInfoOf](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/democracy/src/lib.rs#L423) contains voting type and tally/supply&#xD;&#xA; 2. [TotalIssuance](https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/frame/balances/src/lib.rs#L495) is the electorate&#xD;&#xA; &#xD;&#xA;You just need to query `balances::total_issuance` and `democracy::referendum_info_of(x)`.&#xD;&#xA;And fill them in the formula.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Tips: for the `compare_rationals`.&#xD;&#xA;It's well documented in the source code.&#xD;&#xA;&#xD;&#xA;It's just `n1 / d1 &lt; n2 / d2` but with some overflowing protection. &#xD;&#xA;&#xD;&#xA;If you are off-chain, using `f64`/`double` is enough. IIUC. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16950" PostHistoryTypeId="2" PostId="4531" RevisionGUID="792c5811-ddb3-4c88-bda4-49b7dc54aa2f" CreationDate="2022-08-31T09:54:22.720" UserId="1789" Text="I need a RPC port to deploy Ethereum smart contracts into my parachain's EVM.&#xD;&#xA;and the EVM endpoint would look like `http://127.0.0.1:xxxx`&#xD;&#xA;&#xD;&#xA;My current network file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:{{POLKADOT_VERSION}}&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;{{COLLATOR_URL}}&quot;&#xD;&#xA;  command = &quot;parachain-collator&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;  &#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;Now when I run Zombienet, I got this from the console log:&#xD;&#xA;```&#xD;&#xA;parachain-collator --name collator01 --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --chain /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/cfg/rococo-local-2000.json --base-path /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/data --listen-addr /ip4/0.0.0.0/tcp/33493/ws --rpc-port 42567 --ws-port 32777 --prometheus-external --prometheus-port 38427 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --collator --force-authoring -lparachain=debug -- --chain /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/cfg/rococo-local.json --execution wasm --port 35237 --ws-port 42705 --rpc-port 46031&#xD;&#xA;```&#xD;&#xA;I see there are two RPC ports: --rpc-port 42567 and --rpc-port 46031&#xD;&#xA;&#xD;&#xA;Which one should I use to deploy Ethereum smart contracts into my parachain's EVM ?&#xD;&#xA;&#xD;&#xA;How can I get such port number programmatically in my JS script?&#xD;&#xA;I guess it is somewhere below?&#xD;&#xA;```&#xD;&#xA;const { wsUri, userDefinedTypes } = networkInfo.nodesByName[nodeName];&#xD;&#xA;	const api = await zombie.connect(wsUri, userDefinedTypes);&#xD;&#xA;	const validator = await api.query.session.validators();&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16952" PostHistoryTypeId="1" PostId="4531" RevisionGUID="792c5811-ddb3-4c88-bda4-49b7dc54aa2f" CreationDate="2022-08-31T09:54:22.720" UserId="1789" Text="How to use a RPC port during Zombienet tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16953" PostHistoryTypeId="3" PostId="4531" RevisionGUID="792c5811-ddb3-4c88-bda4-49b7dc54aa2f" CreationDate="2022-08-31T09:54:22.720" UserId="1789" Text="|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16954" PostHistoryTypeId="2" PostId="4532" RevisionGUID="a1159b90-73e4-46e5-8d6b-fcab47bc381b" CreationDate="2022-08-31T09:57:19.760" UserId="251" Text="There are two nodes inside a collator.&#xD;&#xA;One is the relaychain the other is the parachain.&#xD;&#xA;&#xD;&#xA;When you type `./collator --rpc-port xxx -- --rpc-port xxx`.&#xD;&#xA;&#xD;&#xA;The first parameter(the one before the `--`) apply to the parachain, the second parameter apply to the relaychain.&#xD;&#xA;&#xD;&#xA;If you want to interact with your parachain, use the first port." ContentLicense="CC BY-SA 4.0" />
  <row Id="16956" PostHistoryTypeId="5" PostId="4531" RevisionGUID="c4f4e916-fcb2-46f3-bcfd-d703d849b480" CreationDate="2022-08-31T10:18:58.813" UserId="1789" Comment="added 1540 characters in body" Text="I need a RPC port to deploy Ethereum smart contracts into my parachain's EVM.&#xD;&#xA;and the EVM endpoint would look like `http://127.0.0.1:xxxx`&#xD;&#xA;&#xD;&#xA;My current network file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:{{POLKADOT_VERSION}}&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;{{COLLATOR_URL}}&quot;&#xD;&#xA;  command = &quot;parachain-collator&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;  &#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;Now when I run Zombienet, I got this from the console log:&#xD;&#xA;```&#xD;&#xA;parachain-collator --name collator01 --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --chain /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/cfg/rococo-local-2000.json --base-path /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/data --listen-addr /ip4/0.0.0.0/tcp/33493/ws --rpc-port 42567 --ws-port 32777 --prometheus-external --prometheus-port 38427 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --collator --force-authoring -lparachain=debug -- --chain /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/cfg/rococo-local.json --execution wasm --port 35237 --ws-port 42705 --rpc-port 46031&#xD;&#xA;```&#xD;&#xA;I see there are two RPC ports: --rpc-port 42567 and --rpc-port 46031&#xD;&#xA;&#xD;&#xA;Which one should I use to deploy Ethereum smart contracts into my parachain's EVM ?&#xD;&#xA;&#xD;&#xA;How can I get such port number programmatically in my JS script?&#xD;&#xA;I guess it is somewhere below?&#xD;&#xA;```&#xD;&#xA;const { wsUri, userDefinedTypes } = networkInfo.nodesByName[nodeName];&#xD;&#xA;	const api = await zombie.connect(wsUri, userDefinedTypes);&#xD;&#xA;	const validator = await api.query.session.validators();&#xD;&#xA;```&#xD;&#xA;After printing out the run function arguments of `nodeName, networkInfo, args`, I got those:&#xD;&#xA;```&#xD;&#xA;nodeName: alice&#xD;&#xA;networkInfo: {&#xD;&#xA;  tmpDir: '/tmp/zombie-1125ee14af7d14ea72ebc09edb1a453d_-61203-NLdisHdTEY63',&#xD;&#xA;  chainSpecPath: '/tmp/zombie-1125ee14af7d14ea72ebc09edb1a453d_-61203-NLdisHdTEY63/rococo-local.json',&#xD;&#xA;  relay: [&#xD;&#xA;    {&#xD;&#xA;      name: 'alice',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:34997',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:40159/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      name: 'bob',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:44399',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:42067/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  paras: {&#xD;&#xA;    '2000': {&#xD;&#xA;      chainSpecPath: '/tmp/zombie-1125ee14af7d14ea72ebc09edb1a453d_-61203-NLdisHdTEY63/rococo-local-2000.json',&#xD;&#xA;      nodes: [Array]&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  nodesByName: {&#xD;&#xA;    alice: {&#xD;&#xA;      name: 'alice',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:34997',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:40159/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    },&#xD;&#xA;    bob: {&#xD;&#xA;      name: 'bob',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:44399',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:42067/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    },&#xD;&#xA;    collator01: {&#xD;&#xA;      name: 'collator01',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:42071',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:41243/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype],&#xD;&#xA;      parachainId: 2000&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;args: []&#xD;&#xA;```&#xD;&#xA;I could not find the RPC port or URL!" ContentLicense="CC BY-SA 4.0" />
  <row Id="16957" PostHistoryTypeId="2" PostId="4533" RevisionGUID="afc6327d-7039-4216-9ca9-9e6a3a8356fe" CreationDate="2022-08-31T10:22:43.263" UserId="575" Text="`KeyTypeId` is used in creating an identifier that maps to public keys in your application. The public keys then map to private keys. Essentially, the identifier is a public value  that represents the public key of an account.&#xD;&#xA;&#xD;&#xA;From your snippet,&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;xkey&quot;);&#xD;&#xA;``` &#xD;&#xA;created a new instance of the `KeyTypeId` struct with the `*b&quot;xkey&quot;` value.&#xD;&#xA;&#xD;&#xA;The `KEY_TYPE` identifier was then used to declare an account with the `sr25519` signing algorithm using the `app_crypto!` macro:&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;app_crypto!(sr25519, KEY_TYPE);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This kind of identity-based cryptography is what makes it possible for different substrate chains to have their own designated address formats for the same public key, Since the designated address formats simply represents the public key in a private-public keypair" ContentLicense="CC BY-SA 4.0" />
  <row Id="16959" PostHistoryTypeId="5" PostId="4521" RevisionGUID="b1585091-354b-4db4-8843-a988ae61b997" CreationDate="2022-08-31T11:00:01.107" UserId="94" Comment="added 362 characters in body" Text="This is the storage key for `:transaction_level:`. It is just ASCII encoded as HEX.   &#xD;&#xA;That key should be white-listed which is also the case on current Substrate master.  &#xD;&#xA;Your problem should be solved by updating Substrate. The change happened [here](https://github.com/paritytech/substrate/pull/11394).&#xD;&#xA;&#xD;&#xA;As context:  &#xD;&#xA;This key tracks how many transactional levels are currently stacked upon the storage overlay.  &#xD;&#xA;Each time an extrinsic is dispatched, its changes are stored to a temporary transactional level, such that the changes can be rolled back if the extrinsic fails. See [Substrate/#11918](https://github.com/paritytech/substrate/pull/11918) for more." ContentLicense="CC BY-SA 4.0" />
  <row Id="16960" PostHistoryTypeId="2" PostId="4534" RevisionGUID="8b64c791-f123-4015-ab33-f513fbe7294f" CreationDate="2022-08-31T11:08:03.623" UserId="183" Text="In parachain context, imagine we have declared a migration within `type Executvie` where we want to migrate some state from pallet A to pallet B in `on_runtime_upgrade`. In the new wasm the pallet A gets deleted and pallet B gets added.&#xD;&#xA;&#xD;&#xA;What if `on_runtime_upgrade` fails somehow in the middle way? We could have some incomplete or corrupted state for both pallet A and B, right? If this migration is related to block authoring (e.g. session/collator settings), is it possible that the parachain gets stuck?&#xD;&#xA;&#xD;&#xA;Is there a way to prevent that besides try-runtime and testing on the testnet?&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="16962" PostHistoryTypeId="1" PostId="4534" RevisionGUID="8b64c791-f123-4015-ab33-f513fbe7294f" CreationDate="2022-08-31T11:08:03.623" UserId="183" Text="What happens if `on_runtime_upgrade` during migration fails?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16963" PostHistoryTypeId="3" PostId="4534" RevisionGUID="8b64c791-f123-4015-ab33-f513fbe7294f" CreationDate="2022-08-31T11:08:03.623" UserId="183" Text="|parachain|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16964" PostHistoryTypeId="2" PostId="4535" RevisionGUID="dc24ef26-3e87-4481-8fa3-31a9cef6779e" CreationDate="2022-08-31T11:15:30.187" UserId="73" Text="No, `on_runtime_upgrade` must not fail. If it fails, you are in big troubles, which most of the time means that your chain is fucked.&#xD;&#xA;&#xD;&#xA;As you already said, make sure to use `try-runtime` and test nets to test the upgrade." ContentLicense="CC BY-SA 4.0" />
  <row Id="16966" PostHistoryTypeId="2" PostId="4536" RevisionGUID="c63034e4-96cd-46ed-979b-87c120339bd3" CreationDate="2022-08-31T11:52:07.890" UserId="73" Text="The idea by `KeyTypeId` is to have some unique identifier for a key. This is used for the &quot;application crypto&quot; as we call it in Substrate. Basically that just means that you should use different keys for all your different &quot;services&quot;. When you look for example at Polkadot, there we got a key for BABE, Grandpa, im-online and some others. Some of these &quot;services&quot; could share the same key. However that would also mean that if you loose one key, all these services would be &quot;hacked&quot;. &#xD;&#xA;&#xD;&#xA;To distinguish keys in the keystore between these different services, each of them has a different `KeyTypeId`. One think to note is that a `KeyTypeId` is not an unique identifier for a crypto type. As some services are crypto agnostic, they could use different types of crypto. However, each chain normally only has one fixed crypto per service.&#xD;&#xA;&#xD;&#xA;TLDR: `KeyTypeId`s are used to distinguish different keys in the key store." ContentLicense="CC BY-SA 4.0" />
  <row Id="16968" PostHistoryTypeId="5" PostId="4531" RevisionGUID="2d982fc7-6b23-4849-b0d1-db29e23f0252" CreationDate="2022-08-31T12:42:04.310" UserId="1789" Comment="added 74 characters in body" Text="I need a RPC port to deploy Ethereum smart contracts into my parachain's EVM.&#xD;&#xA;and the EVM endpoint would look like `http://127.0.0.1:xxxx`&#xD;&#xA;&#xD;&#xA;My current network file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:{{POLKADOT_VERSION}}&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;{{COLLATOR_URL}}&quot;&#xD;&#xA;  command = &quot;parachain-collator&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;  &#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;Now when I run Zombienet, I got this from the console log:&#xD;&#xA;```&#xD;&#xA;parachain-collator --name collator01 --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --chain /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/cfg/rococo-local-2000.json --base-path /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/data --listen-addr /ip4/0.0.0.0/tcp/33493/ws --rpc-port 42567 --ws-port 32777 --prometheus-external --prometheus-port 38427 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --collator --force-authoring -lparachain=debug -- --chain /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/cfg/rococo-local.json --execution wasm --port 35237 --ws-port 42705 --rpc-port 46031&#xD;&#xA;```&#xD;&#xA;I see there are two RPC ports: --rpc-port 42567 and --rpc-port 46031&#xD;&#xA;&#xD;&#xA;Which one should I use to deploy Ethereum smart contracts into my parachain's EVM ?&#xD;&#xA;&#xD;&#xA;How can I get such port number programmatically in my JS script?&#xD;&#xA;I guess it is somewhere below?&#xD;&#xA;```&#xD;&#xA;const { wsUri, userDefinedTypes } = networkInfo.nodesByName[nodeName];&#xD;&#xA;	const api = await zombie.connect(wsUri, userDefinedTypes);&#xD;&#xA;	const validator = await api.query.session.validators();&#xD;&#xA;```&#xD;&#xA;After printing out the run function arguments of `nodeName, networkInfo, args`, I got those:&#xD;&#xA;```&#xD;&#xA;nodeName: alice&#xD;&#xA;networkInfo: {&#xD;&#xA;  tmpDir: '/tmp/zombie-1125ee14af7d14ea72ebc09edb1a453d_-61203-NLdisHdTEY63',&#xD;&#xA;  chainSpecPath: '/tmp/zombie-1125ee14af7d14ea72ebc09edb1a453d_-61203-NLdisHdTEY63/rococo-local.json',&#xD;&#xA;  relay: [&#xD;&#xA;    {&#xD;&#xA;      name: 'alice',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:34997',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:40159/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      name: 'bob',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:44399',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:42067/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  paras: {&#xD;&#xA;    '2000': {&#xD;&#xA;      chainSpecPath: '/tmp/zombie-1125ee14af7d14ea72ebc09edb1a453d_-61203-NLdisHdTEY63/rococo-local-2000.json',&#xD;&#xA;      nodes: [Array]&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  nodesByName: {&#xD;&#xA;    alice: {&#xD;&#xA;      name: 'alice',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:34997',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:40159/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    },&#xD;&#xA;    bob: {&#xD;&#xA;      name: 'bob',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:44399',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:42067/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    },&#xD;&#xA;    collator01: {&#xD;&#xA;      name: 'collator01',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:42071',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:41243/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype],&#xD;&#xA;      parachainId: 2000&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;args: []&#xD;&#xA;```&#xD;&#xA;I could not find the RPC port or URL!&#xD;&#xA;&#xD;&#xA;Why are these ports random? Can we predetermine the collator RPC port?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16969" PostHistoryTypeId="2" PostId="4537" RevisionGUID="f83e26d9-76eb-4e8c-9c32-828c37f2c6cd" CreationDate="2022-08-31T13:20:31.060" UserId="3009" Text="I my project, I have to build a blockchain using ECDSA address in order to compatible with Ethereum. But the native address is in sr25519 scheme in substrate. What should I do to implement this? Is there any best practices?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16971" PostHistoryTypeId="1" PostId="4537" RevisionGUID="f83e26d9-76eb-4e8c-9c32-828c37f2c6cd" CreationDate="2022-08-31T13:20:31.060" UserId="3009" Text="Can I use ECDSA address which is compatible with Ethereum as the Native address in a substrate based blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16972" PostHistoryTypeId="3" PostId="4537" RevisionGUID="f83e26d9-76eb-4e8c-9c32-828c37f2c6cd" CreationDate="2022-08-31T13:20:31.060" UserId="3009" Text="|address|ecdsa|sr25519|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16973" PostHistoryTypeId="2" PostId="4538" RevisionGUID="d51424b5-166f-4cf0-a557-0918ec0c7bdf" CreationDate="2022-08-31T13:31:07.000" UserId="2673" Text="AFAIK substrate supports a couple of signature schemes, among them secp256k1. Moonbeam is a chain built with substrate which uses Ethereum-compatible [unified accounts](https://docs.moonbeam.network/learn/features/unified-accounts/). I suggest looking at their docs and/or code for more detailed information." ContentLicense="CC BY-SA 4.0" />
  <row Id="16976" PostHistoryTypeId="5" PostId="4531" RevisionGUID="389e2f2d-39b3-4e9a-8faf-0eb5c119711b" CreationDate="2022-08-31T14:39:52.393" UserId="1789" Comment="added 167 characters in body" Text="I need a RPC port to deploy Ethereum smart contracts into my parachain's EVM.&#xD;&#xA;and the EVM endpoint would look like `http://127.0.0.1:xxxx`&#xD;&#xA;&#xD;&#xA;My current network file:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/parity/polkadot:{{POLKADOT_VERSION}}&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;{{COLLATOR_URL}}&quot;&#xD;&#xA;  command = &quot;parachain-collator&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;  &#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;Now when I run Zombienet, I got this from the console log:&#xD;&#xA;```&#xD;&#xA;parachain-collator --name collator01 --node-key 5e123980fad4770d9ab5b7df7bbee8499943822a8555d11995e8203210065342 --chain /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/cfg/rococo-local-2000.json --base-path /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/data --listen-addr /ip4/0.0.0.0/tcp/33493/ws --rpc-port 42567 --ws-port 32777 --prometheus-external --prometheus-port 38427 --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external --collator --force-authoring -lparachain=debug -- --chain /tmp/zombie-7777a966fceaf2c9ff0d46f9a5d9aa5a_-38485-NbMcMKykG6mQ/collator01/cfg/rococo-local.json --execution wasm --port 35237 --ws-port 42705 --rpc-port 46031&#xD;&#xA;```&#xD;&#xA;I see there are two RPC ports: --rpc-port 42567 and --rpc-port 46031&#xD;&#xA;&#xD;&#xA;Which one should I use to deploy Ethereum smart contracts into my parachain's EVM ?&#xD;&#xA;&#xD;&#xA;How can I get such port number programmatically in my JS script?&#xD;&#xA;I guess it is somewhere below?&#xD;&#xA;```&#xD;&#xA;const { wsUri, userDefinedTypes } = networkInfo.nodesByName[nodeName];&#xD;&#xA;	const api = await zombie.connect(wsUri, userDefinedTypes);&#xD;&#xA;	const validator = await api.query.session.validators();&#xD;&#xA;```&#xD;&#xA;After printing out the run function arguments of `nodeName, networkInfo, args`, I got those:&#xD;&#xA;```&#xD;&#xA;nodeName: alice&#xD;&#xA;networkInfo: {&#xD;&#xA;  tmpDir: '/tmp/zombie-1125ee14af7d14ea72ebc09edb1a453d_-61203-NLdisHdTEY63',&#xD;&#xA;  chainSpecPath: '/tmp/zombie-1125ee14af7d14ea72ebc09edb1a453d_-61203-NLdisHdTEY63/rococo-local.json',&#xD;&#xA;  relay: [&#xD;&#xA;    {&#xD;&#xA;      name: 'alice',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:34997',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:40159/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      name: 'bob',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:44399',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:42067/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  paras: {&#xD;&#xA;    '2000': {&#xD;&#xA;      chainSpecPath: '/tmp/zombie-1125ee14af7d14ea72ebc09edb1a453d_-61203-NLdisHdTEY63/rococo-local-2000.json',&#xD;&#xA;      nodes: [Array]&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  nodesByName: {&#xD;&#xA;    alice: {&#xD;&#xA;      name: 'alice',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:34997',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:40159/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    },&#xD;&#xA;    bob: {&#xD;&#xA;      name: 'bob',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:44399',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:42067/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype]&#xD;&#xA;    },&#xD;&#xA;    collator01: {&#xD;&#xA;      name: 'collator01',&#xD;&#xA;      wsUri: 'ws://127.0.0.1:42071',&#xD;&#xA;      prometheusUri: 'http://127.0.0.1:41243/metrics',&#xD;&#xA;      userDefinedTypes: [Object: null prototype],&#xD;&#xA;      parachainId: 2000&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;args: []&#xD;&#xA;```&#xD;&#xA;I could not find the RPC port or URL!&#xD;&#xA;&#xD;&#xA;Why are these ports random? Can we predetermine the collator RPC port?&#xD;&#xA;&#xD;&#xA;From this https://github.com/paritytech/zombienet/blob/main/docs/src/network-definition-spec.md, it seems I can set the node RPC port, but not collator RPC port!??" ContentLicense="CC BY-SA 4.0" />
  <row Id="16977" PostHistoryTypeId="5" PostId="4537" RevisionGUID="ffa8ab32-8a10-48bf-ba8b-435b496ca609" CreationDate="2022-08-31T14:55:47.413" UserId="29" Comment="added 6 characters in body" Text="For my project, I have to build a blockchain using ECDSA address in order to be compatible with Ethereum. But the native address is in sr25519 scheme in substrate. What should I do to implement this? Are there any best practices?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16978" PostHistoryTypeId="2" PostId="4539" RevisionGUID="06bd7ed2-8401-4aa4-a834-eba0ddc5b0dd" CreationDate="2022-08-31T15:03:51.410" UserId="3104" Text="Scenario:&#xD;&#xA;Transfer token A from parachain_1 to parachain_2&#xD;&#xA;&#xD;&#xA;I can verify the amount of token A issued on parachain_2 by looking at token A's total issuance on parachain_2 but how can i find the total token A reserved?&#xD;&#xA;&#xD;&#xA;I believe this diagram describes the details of this transfer:&#xD;&#xA;https://www.figma.com/file/9WoqPIRBv2zh23yt8LGU0c/XCM-Transfer-Reserve-Asset?node-id=0%3A1&#xD;&#xA;&#xD;&#xA;In this case do i need to query the holding register of token A on kusama? If so, how do i query that? Or can this value be derived another way?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16980" PostHistoryTypeId="1" PostId="4539" RevisionGUID="06bd7ed2-8401-4aa4-a834-eba0ddc5b0dd" CreationDate="2022-08-31T15:03:51.410" UserId="3104" Text="How do i verify total token mint and total token reserved are the same after a transfer between kusama parachains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="16981" PostHistoryTypeId="3" PostId="4539" RevisionGUID="06bd7ed2-8401-4aa4-a834-eba0ddc5b0dd" CreationDate="2022-08-31T15:03:51.410" UserId="3104" Text="|parachain|kusama|xcm|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16982" PostHistoryTypeId="5" PostId="4529" RevisionGUID="1ad8bb82-75a2-4e59-b853-67e8b1ff66b0" CreationDate="2022-08-31T15:05:45.007" UserId="29" Comment="added 10 characters in body" Text="When I made use of an offchain signed extrinsic to send a transaction to a chain, I copied a snippet from others, which is like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use sp_core::crypto::KeyTypeId;&#xD;&#xA;pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;xkey&quot;);&#xD;&#xA;pub mod crypto {&#xD;&#xA;    use super::KEY_TYPE;&#xD;&#xA;    use sp_runtime::app_crypto::{app_crypto, sr25519};&#xD;&#xA;    app_crypto!(sr25519, KEY_TYPE);&#xD;&#xA;}&#xD;&#xA;pub type AuthorityId = crypto::Public;&#xD;&#xA;```&#xD;&#xA;There is a `KeyTypeId` in the snippet, which is defined by `b&quot;xkey&quot;`. In the runtime code I used this `KeyTypeId` and it works. But I am not quite sure about what the `KeyTypeId` means. I just know that the `KeyTypeId` bounds with a private key which is associated with an account. Who can tell me the background knowledge of all of this?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16983" PostHistoryTypeId="5" PostId="4536" RevisionGUID="acd34a79-acd4-4bbb-a618-d1e65063b60c" CreationDate="2022-08-31T15:06:19.313" UserId="29" Comment="deleted 1 character in body" Text="The idea by `KeyTypeId` is to have some unique identifier for a key. This is used for the &quot;application crypto&quot; as we call it in Substrate. Basically that just means that you should use different keys for all your different &quot;services&quot;. When you look for example at Polkadot, there we got a key for BABE, Grandpa, im-online and some others. Some of these &quot;services&quot; could share the same key. However that would also mean that if you loose one key, all these services would be &quot;hacked&quot;. &#xD;&#xA;&#xD;&#xA;To distinguish keys in the keystore between these different services, each of them has a different `KeyTypeId`. One thing to note is that a `KeyTypeId` is not a unique identifier for a crypto type. As some services are crypto agnostic, they could use different types of crypto. However, each chain normally only has one fixed crypto per service.&#xD;&#xA;&#xD;&#xA;TLDR: `KeyTypeId`s are used to distinguish different keys in the key store." ContentLicense="CC BY-SA 4.0" />
  <row Id="16984" PostHistoryTypeId="5" PostId="4533" RevisionGUID="e3547f66-a8b5-412a-9ff7-e0edd029dd49" CreationDate="2022-08-31T15:38:47.500" UserId="575" Comment="deleted 267 characters in body" Text="`KeyTypeId` is used in creating an identifier that maps to public keys in your application. The public keys then map to private keys. Essentially, the identifier is a public value  that represents the public key of an account.&#xD;&#xA;&#xD;&#xA;From your snippet,&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;xkey&quot;);&#xD;&#xA;``` &#xD;&#xA;created a new instance of the `KeyTypeId` struct with the `*b&quot;xkey&quot;` value.&#xD;&#xA;&#xD;&#xA;The `KEY_TYPE` identifier was then used to declare an account with the `sr25519` signing algorithm using the `app_crypto!` macro:&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;app_crypto!(sr25519, KEY_TYPE);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="16985" PostHistoryTypeId="2" PostId="4540" RevisionGUID="72532e88-a0bf-4761-8b98-fbdce095a919" CreationDate="2022-08-31T15:59:46.253" UserId="29" Text="One requirement of Babe is to produce at least one block per epoch.&#xD;&#xA;- https://github.com/paritytech/substrate/issues/4464#issuecomment-567651962&#xD;&#xA;&#xD;&#xA;You could create a &quot;test&quot; runtime with [instant seal](https://github.com/paritytech/substrate/tree/master/client/consensus/manual-seal) to achieve the result you desire.&#xD;&#xA;&#xD;&#xA;Here are couple implementations of instant seal:&#xD;&#xA;- https://github.com/PureStake/moonbeam/commit/e018d429c027a0e95bd504dd7204881ba1c8d7b2&#xD;&#xA;- https://github.com/paritytech/substrate-contracts-node/pull/42/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="16987" PostHistoryTypeId="52" PostId="4529" RevisionGUID="c8aa6abf-c6c8-4d42-83c4-f328d6f9d38f" CreationDate="2022-08-31T17:20:12.807" />
  <row Id="16988" PostHistoryTypeId="2" PostId="4541" RevisionGUID="a27fcddb-310e-465b-9e38-5a3e6bc4a60c" CreationDate="2022-08-31T17:50:13.340" UserId="29" Text="As noted here:&#xD;&#xA;- https://docs.substrate.io/tutorials/get-started/forkless-upgrade&#xD;&#xA;&#xD;&#xA;When upgrading the chain, you need to manually increment the `spec_version`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are the changes for `release-v0.9.28`, notice that the only value that was updated was the `spec_version`:&#xD;&#xA;```diff&#xD;&#xA;/// Runtime version (Polkadot).&#xD;&#xA;#[sp_version::runtime_version]&#xD;&#xA;pub const VERSION: RuntimeVersion = RuntimeVersion {&#xD;&#xA;	spec_name: create_runtime_str!(&quot;polkadot&quot;),&#xD;&#xA;	impl_name: create_runtime_str!(&quot;parity-polkadot&quot;),&#xD;&#xA;	authoring_version: 0,&#xD;&#xA;-	spec_version: 9270,&#xD;&#xA;+	spec_version: 9280,&#xD;&#xA;	impl_version: 0,&#xD;&#xA;	#[cfg(not(feature = &quot;disable-runtime-api&quot;))]&#xD;&#xA;	apis: RUNTIME_API_VERSIONS,&#xD;&#xA;	#[cfg(feature = &quot;disable-runtime-api&quot;)]&#xD;&#xA;	apis: sp_version::create_apis_vec![[]],&#xD;&#xA;	transaction_version: 13,&#xD;&#xA;	state_version: 0,&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; Note: `authoring_version` is rarely incremented. &#xD;&#xA;&gt;&#xD;&#xA;&gt; tldr: https://substrate.stackexchange.com/questions/984/when-are-you-required-to-change-the-authoring-version-for-forkless-runtime-upg/1055#1055&#xD;&#xA;&#xD;&#xA;More Info:&#xD;&#xA;- https://docs.substrate.io/build/upgrade-the-runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="16990" PostHistoryTypeId="2" PostId="4542" RevisionGUID="6e8eda80-0b8b-4769-872d-3cc0de0532cf" CreationDate="2022-08-31T18:44:57.323" UserId="3105" Text="I'm building a typescript project and I'm trying to do the very simplest thing as a first step with Polkadot: Connect to a node and get account information. However, when I run `tsc`, it totally blows up.&#xD;&#xA;&#xD;&#xA;I've read all kinds of stuff in their docs and online about type generation and importing these &quot;augmentations&quot; (including [this SO question](https://substrate.stackexchange.com/questions/188/how-do-you-resolve-missing-type-errors-in-the-polkadot-api-v7-x-x-packages)), but I haven't managed to break through yet.&#xD;&#xA;&#xD;&#xA;On top of that, it seems crazy to me that you would actually have to do this complex type generation step to make the library work, so I wanted to gut check it and see if anyone maybe has a super simple typescript repo out there that I can use as an example. I did see [this example](https://github.com/polkadot-js/docs/tree/master/docs/api/examples/promise/typegen), but its wildly out of date, and it also doesn't have any explanation to go along with it.&#xD;&#xA;&#xD;&#xA;For the benefit of googlers, here are a few of the errors I'm getting (of 127 in total):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;node_modules/@polkadot/api-derive/accounts/flags.d.ts:3:15 - error TS2305: Module '&quot;@polkadot/types/lookup&quot;' has no exported member 'PalletElectionsPhragmenSeatHolder'.&#xD;&#xA;&#xD;&#xA;3 import type { PalletElectionsPhragmenSeatHolder } from '@polkadot/types/lookup';&#xD;&#xA;                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&#xD;&#xA;&#xD;&#xA;node_modules/@polkadot/api-derive/accounts/identity.d.ts:4:15 - error TS2305: Module '&quot;@polkadot/types/lookup&quot;' has no exported member 'PalletIdentityRegistration'.&#xD;&#xA;&#xD;&#xA;4 import type { PalletIdentityRegistration } from '@polkadot/types/lookup';&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And here's the entire contents of what I'm trying to compile:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import * as Polkadot from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;const provider = new Polkadot.WsProvider(&quot;wss://westend-rpc.polkadot.io&quot;);&#xD;&#xA;export const client = Polkadot.ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;// TODO: use the client to do something&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="16992" PostHistoryTypeId="1" PostId="4542" RevisionGUID="6e8eda80-0b8b-4769-872d-3cc0de0532cf" CreationDate="2022-08-31T18:44:57.323" UserId="3105" Text="Typescript errors when using @polkadot/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="16993" PostHistoryTypeId="3" PostId="4542" RevisionGUID="6e8eda80-0b8b-4769-872d-3cc0de0532cf" CreationDate="2022-08-31T18:44:57.323" UserId="3105" Text="|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16994" PostHistoryTypeId="6" PostId="4542" RevisionGUID="70d8afc1-e414-46fe-a126-6fb7f01b1e70" CreationDate="2022-08-31T19:22:28.623" UserId="29" Comment="edited tags" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="16995" PostHistoryTypeId="2" PostId="4543" RevisionGUID="df71e73d-d384-4b2b-a3b1-e0569816201f" CreationDate="2022-08-31T19:33:38.870" UserId="2132" Text="```js&#xD;&#xA;// each chain is different in what they expose runtime-wise&#xD;&#xA;// enable it on a static basis (westend being closest to polkadot)&#xD;&#xA;import &quot;polkadot/api-augment/polkadot&quot;;&#xD;&#xA;&#xD;&#xA;import * as Polkadot from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;const provider = new Polkadot.WsProvider(&quot;wss://westend-rpc.polkadot.io&quot;);&#xD;&#xA;export const client = Polkadot.ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;// TODO: use the client to do something&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As per the linked SO answer - metadata describes the chain, these types are _only_ available at runtime, each chain is vastly different, so you need to add the per-chain types when using TS. &#xD;&#xA;&#xD;&#xA;(This is unlike anything else where the interfaces are fixed, Substrate-based chains are lego pieces, all from different sources, the static pre-compile environment needs to know what happens at runtime)" ContentLicense="CC BY-SA 4.0" />
  <row Id="16997" PostHistoryTypeId="2" PostId="4544" RevisionGUID="bf221c95-d8db-413e-80e1-6833336a7dff" CreationDate="2022-08-31T19:43:13.997" UserId="94" Text="No it's not correct, as we saw in your [MR](https://github.com/paritytech/substrate/pull/12145)." ContentLicense="CC BY-SA 4.0" />
  <row Id="16999" PostHistoryTypeId="2" PostId="4545" RevisionGUID="3ee6a7e0-1109-40c5-8c0d-504ddfdf4d4d" CreationDate="2022-08-31T20:24:43.133" UserId="2548" Text="Below is the cargo.toml file of one of my pallet.&#xD;&#xA;``` &#xD;&#xA;[package]&#xD;&#xA;name = &quot;escrow&quot;&#xD;&#xA;version = &quot;3.0.0&quot;&#xD;&#xA;edition = &quot;2018&quot;&#xD;&#xA;authors = ['Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;']&#xD;&#xA;repository = 'https://github.com/substrate-developer-hub/recipes'&#xD;&#xA;description = &quot;A pallet that demonstrates storing custom structs in Substrate storage&quot;&#xD;&#xA;license = &quot;GPL-3.0-or-later&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;parity-scale-codec = { version = &quot;2.0&quot;, features = [&quot;derive&quot;], default-features = false }&#xD;&#xA;&#xD;&#xA;#Optional imports for benchmarking&#xD;&#xA;frame-benchmarking = { git = &quot;https://github.com/paritytech/substrate&quot;, default-features = false, optional = true , branch = &quot;polkadot-v0.9.16&quot; }&#xD;&#xA;&#xD;&#xA;# Substrate packages&#xD;&#xA;pallet-balances = { version = '3.0', default-features = false }&#xD;&#xA;frame-support = { version = '3.0', default-features = false }&#xD;&#xA;frame-system = { version = '3.0', default-features = false }&#xD;&#xA;sp-runtime = { version = '3.0', default-features = false }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;serde = '1.0'&#xD;&#xA;sp-core = '3.0'&#xD;&#xA;sp-io = '3.0'&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = ['std']&#xD;&#xA;std = [&#xD;&#xA;	'pallet-balances/std',&#xD;&#xA;	'frame-support/std',&#xD;&#xA;	'frame-system/std',&#xD;&#xA;	'parity-scale-codec/std',&#xD;&#xA;	'sp-runtime/std',&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;After I added the :&#xD;&#xA;``` &#xD;&#xA;#Optional imports for benchmarking&#xD;&#xA;frame-benchmarking = { git = &quot;https://github.com/paritytech/substrate&quot;, default-features = false, optional = true , branch = &quot;polkadot-v0.9.16&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am having the below error: &#xD;&#xA;```. &#xD;&#xA;&#xD;&#xA;stdout :     Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;    Updating crates.io index&#xD;&#xA;error: failed to select a version for `parity-util-mem`.&#xD;&#xA;    ... required by package `sp-runtime v4.1.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#19162e43)`&#xD;&#xA;    ... which satisfies git dependency `sp-runtime` of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#19162e43)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking` of package `escrow v3.0.0 (/Users/elioprifti/recipes/pallets/escrow)`&#xD;&#xA;    ... which satisfies path dependency `escrow` (locked to 3.0.0) of package `super-runtime v3.0.0 (/Users/elioprifti/recipes/runtimes/super-runtime)`&#xD;&#xA;    ... which satisfies path dependency `runtime` (locked to 3.0.0) of package `basic-pow v3.0.0 (/Users/elioprifti/recipes/nodes/basic-pow)`&#xD;&#xA;versions that meet the requirements `^0.10.2` are: 0.10.2&#xD;&#xA;&#xD;&#xA;the package `parity-util-mem` links to the native library `parity-util-mem-ban-duplicates`, but it conflicts with a previous package which links to `parity-util-mem-ban-duplicates` as well:&#xD;&#xA;package `parity-util-mem v0.9.0`&#xD;&#xA;    ... which satisfies dependency `parity-util-mem = &quot;^0.9.0&quot;` (locked to 0.9.0) of package `sc-service v0.9.0`&#xD;&#xA;    ... which satisfies dependency `sc-service = &quot;^0.9&quot;` (locked to 0.9.0) of package `basic-pow v3.0.0 (/Users/elioprifti/recipes/nodes/basic-pow)`&#xD;&#xA;Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='parity-util-mem' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.&#xD;&#xA;&#xD;&#xA;failed to select a version for `parity-util-mem` which could resolve this conflict&#xD;&#xA;&#xD;&#xA;stderr : &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Any idea how can I fix it? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17001" PostHistoryTypeId="1" PostId="4545" RevisionGUID="3ee6a7e0-1109-40c5-8c0d-504ddfdf4d4d" CreationDate="2022-08-31T20:24:43.133" UserId="2548" Text="frame-benchmarking version conflict" ContentLicense="CC BY-SA 4.0" />
  <row Id="17002" PostHistoryTypeId="3" PostId="4545" RevisionGUID="3ee6a7e0-1109-40c5-8c0d-504ddfdf4d4d" CreationDate="2022-08-31T20:24:43.133" UserId="2548" Text="|substrate-node|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17004" PostHistoryTypeId="2" PostId="4546" RevisionGUID="fdec2310-6eab-4cca-a63b-6c9e6482fc8e" CreationDate="2022-08-31T20:43:53.240" UserId="29" Text="Make sure you add the `polkadot-v0.9.x` to all your Substrate dependencies.&#xD;&#xA;&#xD;&#xA;Take a look here:&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-node-template/blob/6a8b2b12371395979099d2c79ccc1860531b0449/runtime/Cargo.toml#L47&#xD;&#xA;&#xD;&#xA;Notice how **all** the Substrate dependencies have `branch = &quot;polkadot-v0.9.28&quot;`&#xD;&#xA;&#xD;&#xA;Same goes for the pallet:&#xD;&#xA;```cargo&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;sp-io = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;sp-runtime = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;```&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-node-template/blob/6a8b2b12371395979099d2c79ccc1860531b0449/pallets/template/Cargo.toml#L20-L27" ContentLicense="CC BY-SA 4.0" />
  <row Id="17006" PostHistoryTypeId="36" PostId="4547" RevisionGUID="89fe6499-8e78-460c-9eec-85bb7e4466d1" CreationDate="2022-08-31T22:01:05.613" UserId="-1" Comment="from https://ethereum.stackexchange.com/questions/134647/client-library-for-polkadot-in-python" />
  <row Id="17007" PostHistoryTypeId="2" PostId="4547" RevisionGUID="5ba21d99-6e01-48a9-a491-325356d7ba91" CreationDate="2022-08-30T12:26:05.737" UserId="3097" Text="Like web3.js and Web3.py can be use for ethereum and binance smart chain,I want to ask that which library in python we can use for polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17009" PostHistoryTypeId="1" PostId="4547" RevisionGUID="5ba21d99-6e01-48a9-a491-325356d7ba91" CreationDate="2022-08-30T12:26:05.737" UserId="3097" Text="Client library for Polkadot in python" ContentLicense="CC BY-SA 4.0" />
  <row Id="17010" PostHistoryTypeId="3" PostId="4547" RevisionGUID="5ba21d99-6e01-48a9-a491-325356d7ba91" CreationDate="2022-08-30T12:26:05.737" UserId="3097" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17011" PostHistoryTypeId="2" PostId="4548" RevisionGUID="2e111ef2-5015-4442-a75a-4475909f2838" CreationDate="2022-09-01T00:42:07.407" UserId="251" Text="Go for [`py-substrate-interface`](https://github.com/polkascan/py-substrate-interface).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;BTW, you could find a lot of useful things in the [awesome-substrate](https://github.com/substrate-developer-hub/awesome-substrate).&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17017" PostHistoryTypeId="2" PostId="4550" RevisionGUID="d2dd7379-7085-4d31-a5da-2589fd52a0f1" CreationDate="2022-09-01T05:38:12.377" UserId="3097" Text="I want to Create Wallet / Generate address like in ethereum we use web3.py but how could I do same thing in polkadot by using python?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17019" PostHistoryTypeId="1" PostId="4550" RevisionGUID="d2dd7379-7085-4d31-a5da-2589fd52a0f1" CreationDate="2022-09-01T05:38:12.377" UserId="3097" Text="How we can Create Wallet / Generate address in polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="17020" PostHistoryTypeId="3" PostId="4550" RevisionGUID="d2dd7379-7085-4d31-a5da-2589fd52a0f1" CreationDate="2022-09-01T05:38:12.377" UserId="3097" Text="|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17021" PostHistoryTypeId="5" PostId="4523" RevisionGUID="068cf957-c2d4-4263-aa6b-62e4abe9e693" CreationDate="2022-09-01T06:33:48.743" UserId="3096" Comment="added 16 characters in body" Text="We had changed the code in pallet template and was trying to add it in substrate node-template runtime. Link to[ \[github][1] code][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Got the following [![error][2]][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/sky-vibhu/Customise-pallet.git&#xD;&#xA;  [2]: https://i.stack.imgur.com/yg2f7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17026" PostHistoryTypeId="2" PostId="4552" RevisionGUID="2936b26f-50ab-4d9d-ae52-502853c3100e" CreationDate="2022-09-01T07:41:58.883" UserId="251" Text="It depends on the chain.&#xD;&#xA;&#xD;&#xA;Most of the chains are using SR25519.&#xD;&#xA;&#xD;&#xA;Check https://github.com/polkascan/py-sr25519-bindings.&#xD;&#xA;&#xD;&#xA;Some chains like Moonbeam, use Ethereum address. So, web3.py works for them." ContentLicense="CC BY-SA 4.0" />
  <row Id="17028" PostHistoryTypeId="2" PostId="4553" RevisionGUID="17c018a9-8ee2-4a1b-9e6d-1a99e68efd55" CreationDate="2022-09-01T07:52:20.240" UserId="2916" Text="In the substrate-node-template, I can't see the local node identity whenever I start the node with `./target/release/node-template --dev`: e.g.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5tnZP.png&#xD;&#xA;&#xD;&#xA;Apparently to fix this I need to pin my tracing-core version to 0.1.26, but I do not know how I can do this. I've tried running `cargo update -p tracing-core --precise 0.1.26` but I get this error:&#xD;&#xA;`&#xD;&#xA;error: failed to select a version for the requirement `tracing-core = &quot;^0.1.27&quot;` candidate versions found which didn't match: 0.1.26&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;I'm also not sure how to modify the Cargo.toml files in `substrate-node-template` to fix this issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="17030" PostHistoryTypeId="1" PostId="4553" RevisionGUID="17c018a9-8ee2-4a1b-9e6d-1a99e68efd55" CreationDate="2022-09-01T07:52:20.240" UserId="2916" Text="How do I pin my tracing-core version to 0.1.26?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17031" PostHistoryTypeId="3" PostId="4553" RevisionGUID="17c018a9-8ee2-4a1b-9e6d-1a99e68efd55" CreationDate="2022-09-01T07:52:20.240" UserId="2916" Text="|substrate-node-template|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17032" PostHistoryTypeId="2" PostId="4554" RevisionGUID="87640a28-5b58-4e32-907d-fab5f495acb7" CreationDate="2022-09-01T08:35:58.173" UserId="1789" Text="You need to specify the `--rpc-port` in your network file in Zombienet tests. &#xD;&#xA;&#xD;&#xA;See how I can specify port 6969 to be my collator RPC port:&#xD;&#xA;```&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;{{COLLATOR_URL}}&quot;&#xD;&#xA;  command = &quot;parachain-collator&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;  rpc_port = 6969&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17035" PostHistoryTypeId="2" PostId="4555" RevisionGUID="a076db4b-8fd0-4ee3-bbe9-1b484a53c429" CreationDate="2022-09-01T08:41:52.950" UserId="28" Text="The problem is [this line](https://github.com/sky-vibhu/Customise-pallet/blob/main/pallets/template/src/lib.rs#L8) in your custom pallet template:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub use frame_system::pallet::*;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With this line, you have basically exported the entire `frame_system` Pallet into your file, which makes all of the pallet template imports look like frame system.&#xD;&#xA;&#xD;&#xA;You should change this line to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub use pallet::*;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As seen here: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/pallets/template/src/lib.rs#L6&#xD;&#xA;&#xD;&#xA;I am interested to know how you got to this error, and what you were trying to do. Does some tutorial tell you to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17037" PostHistoryTypeId="2" PostId="4556" RevisionGUID="abf11ce0-ca0a-4ec8-845e-a9996e4f70e0" CreationDate="2022-09-01T08:53:18.303" UserId="362" Text="The docs say that the benefit of this macro is that the &quot;value is included in the metadata&quot;, but from what I can gather, there is nothing which pins down this value at compile time? That is, someone can provide a `Get` implementation which is based on storage state, block number or any other non-constant input.&#xD;&#xA;&#xD;&#xA;1. Am I mistaken?&#xD;&#xA;2. What value would actually be put in metadata?&#xD;&#xA;3. Does a mutable `pallet::constant` cause problems for the node or Polkadotjs or some other part of the stack?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17039" PostHistoryTypeId="1" PostId="4556" RevisionGUID="abf11ce0-ca0a-4ec8-845e-a9996e4f70e0" CreationDate="2022-09-01T08:53:18.303" UserId="362" Text="Are pallet:constants really constant?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17040" PostHistoryTypeId="3" PostId="4556" RevisionGUID="abf11ce0-ca0a-4ec8-845e-a9996e4f70e0" CreationDate="2022-09-01T08:53:18.303" UserId="362" Text="|frame-system|constants|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17041" PostHistoryTypeId="2" PostId="4557" RevisionGUID="13889983-0c0d-4bce-a7e2-020010b87b5e" CreationDate="2022-09-01T09:08:24.843" UserId="2471" Text="If you have the private key and the corresponding Pubkey, is it possible to use them to boot a peer with the corresponding peerId?&#xD;&#xA;&#xD;&#xA;is it possible to import the keys and thus have the same peerId **without using --node-key option when running the peer** ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17043" PostHistoryTypeId="1" PostId="4557" RevisionGUID="13889983-0c0d-4bce-a7e2-020010b87b5e" CreationDate="2022-09-01T09:08:24.843" UserId="2471" Text="bootstrap a peer with a specific nodeId" ContentLicense="CC BY-SA 4.0" />
  <row Id="17044" PostHistoryTypeId="3" PostId="4557" RevisionGUID="13889983-0c0d-4bce-a7e2-020010b87b5e" CreationDate="2022-09-01T09:08:24.843" UserId="2471" Text="|substrate-node|peers|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17045" PostHistoryTypeId="5" PostId="4552" RevisionGUID="0c458174-f2d0-4570-a02b-e1dc5bff5280" CreationDate="2022-09-01T09:11:09.403" UserId="251" Comment="deleted 11 characters in body" Text="It depends on the chain.&#xD;&#xA;&#xD;&#xA;Most of the chains are using SR25519.&#xD;&#xA;&#xD;&#xA;Check https://github.com/polkascan/py-sr25519-bindings.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Some chains like Moonbeam, use ECDSA. So, web3.py works for them." ContentLicense="CC BY-SA 4.0" />
  <row Id="17046" PostHistoryTypeId="5" PostId="4557" RevisionGUID="ece42bc8-c47c-4ad4-862b-d4ffd20d6d44" CreationDate="2022-09-01T09:24:08.730" UserId="2471" Comment="deleted 11 characters in body" Text="If you have node keys (generated using subey), is it possible to use them to boot a peer with the corresponding peerId?&#xD;&#xA;&#xD;&#xA;is it possible to import the keys and thus have the same peerId **without using --node-key option when running the peer** ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17047" PostHistoryTypeId="5" PostId="4552" RevisionGUID="d523acc3-f455-4480-9cbf-3510057c161f" CreationDate="2022-09-01T09:33:40.810" UserId="251" Comment="added 546 characters in body" Text="It depends on the chain.&#xD;&#xA;&#xD;&#xA;Most of the chains are using SR25519.&#xD;&#xA;&#xD;&#xA;Check https://github.com/polkascan/py-sr25519-bindings.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;# you need to install py-sr25519-bindings first.&#xD;&#xA;&#xD;&#xA;import sr25519&#xD;&#xA;from random import randbytes&#xD;&#xA;&#xD;&#xA;message = b&quot;test&quot;&#xD;&#xA;&#xD;&#xA;public_key, private_key = sr25519.pair_from_seed(randbytes(32))&#xD;&#xA;&#xD;&#xA;print(f'Public Key: {public_key.hex()}')&#xD;&#xA;print(f'Private Key: {private_key.hex()}')&#xD;&#xA;&#xD;&#xA;# Generate signature&#xD;&#xA;signature = sr25519.sign(&#xD;&#xA;    (public_key, private_key),&#xD;&#xA;    message&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;print('Signature', signature.hex())&#xD;&#xA;&#xD;&#xA;# Verify message with signature&#xD;&#xA;if sr25519.verify(signature, message, public_key):&#xD;&#xA;    print('Verified')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Public Key: 7ab28584182c59102c85ae3ec101d4ac553399414ea074b359b58456db811954&#xD;&#xA;Private Key: ca4085af2c6db24241f16d0402db7ce5f0744d94ff265178c21aaa7d27c97b0acc0cb6a5a89f1c40072004ac7cbce04c811fd84dae34e68a63df15be7fdd2c8f&#xD;&#xA;Signature 72edc37c686762fa81b9c640fbdc6742c0ea01a4fa308d42047e45210581fb6bb2a1547f734c405a5486f03eac11a37970c539307ba6f09c2d7cd252c77a488f&#xD;&#xA;Verified&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Some chains like Moonbeam, use ECDSA. So, web3.py works for them." ContentLicense="CC BY-SA 4.0" />
  <row Id="17048" PostHistoryTypeId="5" PostId="4552" RevisionGUID="f8f96ae0-f56d-49f0-88ff-ed3a1e5d070f" CreationDate="2022-09-01T09:43:49.190" UserId="251" Comment="added 135 characters in body" Text="It depends on the chain.&#xD;&#xA;&#xD;&#xA;Most of the chains are using SR25519.&#xD;&#xA;&#xD;&#xA;Check https://github.com/polkascan/py-sr25519-bindings.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;# you need to install py-sr25519-bindings first.&#xD;&#xA;&#xD;&#xA;import sr25519&#xD;&#xA;from random import randbytes&#xD;&#xA;&#xD;&#xA;message = b&quot;test&quot;&#xD;&#xA;&#xD;&#xA;raw_seed = randbytes(32)&#xD;&#xA;public_key, private_key = sr25519.pair_from_seed(raw_seed)&#xD;&#xA;&#xD;&#xA;print(f'Raw seed: {raw_seed.hex()}')&#xD;&#xA;print(f'Public Key: {public_key.hex()}')&#xD;&#xA;print(f'Private Key: {private_key.hex()}')&#xD;&#xA;&#xD;&#xA;# Generate signature&#xD;&#xA;signature = sr25519.sign(&#xD;&#xA;    (public_key, private_key),&#xD;&#xA;    message&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;print('Signature', signature.hex())&#xD;&#xA;&#xD;&#xA;# Verify message with signature&#xD;&#xA;if sr25519.verify(signature, message, public_key):&#xD;&#xA;    print('Verified')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Raw seed: 2a6cdceb2fc16b07b60cec685bfe171c1d0b989e962dbf41f0e044060de2aa54&#xD;&#xA;Public Key: c20c0de890c5a809a9837b439e1e7c86bb23e31932e367b66d14a82d5f429c6e&#xD;&#xA;Private Key: 189c98cd0c669869df80dead8d310a8430f8e35705036f41a79555dc513a7509ee96d314905deb7dbb1f0830343694756c10e812124201d7bd44530874b6b4b9&#xD;&#xA;Signature c64d79859ef905184556f87663e1b8a22eda672328f0973d293aaf379bbc5a1e074572ff2245837a04217603a5316eeaf504bbda7b4427c0393dfe7d57020c87&#xD;&#xA;Verified&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Some chains like Moonbeam, use ECDSA. So, web3.py works for them." ContentLicense="CC BY-SA 4.0" />
  <row Id="17049" PostHistoryTypeId="2" PostId="4558" RevisionGUID="1cdfc4b7-7fa8-4407-beee-844d7238b019" CreationDate="2022-09-01T11:37:27.153" UserId="2873" Text="I have an my own Substrate node (not a parachain, based on the template-node, so Aura consensus is used) and I changed the block time to 6 seconds in the `runtime/src/lib.rs` by setting&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub const MILLISECS_PER_BLOCK: u64 = 6000;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Though, when running the node locally with --dev configuration, it takes 12 seconds to produce blocks:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;2022-09-01 12:50:36.010  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x7b2d27b8c9d1bacda74bf281bcf1f3fa6fdc9e017490860e55356b695aec9d4d    &#xD;&#xA;2022-09-01 12:50:36.029 DEBUG tokio-runtime-worker runtime::system: [1] length: 11 (normal 0%, op: 0%, mandatory 0%) / normal weight: 0 (0%) / op weight 0 (0%) / mandatory weight 5921651000 (0%)    &#xD;&#xA;2022-09-01 12:50:36.030  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 1 (3 ms) [hash: 0x017f1e5a02dcccb639a13c5fb9e5c5844b4efdfc596613db9da255000b89e414; parent_hash: 0x7b2d…9d4d; extrinsics (1): [0x7932…5556]]    &#xD;&#xA;2022-09-01 12:50:36.031  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 1. Hash now 0xdd564786a31bceefd7b4468173234870866615cd9433b438e84214e9debb9a18, previously 0x017f1e5a02dcccb639a13c5fb9e5c5844b4efdfc596613db9da255000b89e414.    &#xD;&#xA;2022-09-01 12:50:36.032  INFO tokio-runtime-worker substrate: ✨ Imported #1 (0xdd56…9a18)    &#xD;&#xA;2022-09-01 12:50:39.100  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #1 (0xdd56…9a18), finalized #0 (0x7b2d…9d4d), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-09-01 12:50:44.101  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #1 (0xdd56…9a18), finalized #0 (0x7b2d…9d4d), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-09-01 12:50:48.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0xdd564786a31bceefd7b4468173234870866615cd9433b438e84214e9debb9a18    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Why is it taking 12 seconds to produce blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17051" PostHistoryTypeId="1" PostId="4558" RevisionGUID="1cdfc4b7-7fa8-4407-beee-844d7238b019" CreationDate="2022-09-01T11:37:27.153" UserId="2873" Text="Why my solo chain block time is 12 seconds when set to 6?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17052" PostHistoryTypeId="3" PostId="4558" RevisionGUID="1cdfc4b7-7fa8-4407-beee-844d7238b019" CreationDate="2022-09-01T11:37:27.153" UserId="2873" Text="|substrate-node|substrate-node-template|block-production|substrate-block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17053" PostHistoryTypeId="2" PostId="4559" RevisionGUID="a150d0ca-f05a-4f67-8860-3aa984bb009b" CreationDate="2022-09-01T11:50:06.873" UserId="3097" Text="I've started the syncing of polkadot node and I want to check how many blocks have synced can anyone tell me how would I do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17055" PostHistoryTypeId="1" PostId="4559" RevisionGUID="a150d0ca-f05a-4f67-8860-3aa984bb009b" CreationDate="2022-09-01T11:50:06.873" UserId="3097" Text="How to check how many blocks of polkadot node are synced?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17056" PostHistoryTypeId="3" PostId="4559" RevisionGUID="a150d0ca-f05a-4f67-8860-3aa984bb009b" CreationDate="2022-09-01T11:50:06.873" UserId="3097" Text="|polkadot|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17057" PostHistoryTypeId="2" PostId="4560" RevisionGUID="cabef53e-9e45-4de1-9988-9517abe861cd" CreationDate="2022-09-01T12:21:40.023" UserId="74" Text="What are the differences between SCALE and RLP serialization beyond little-endian vs big-endian encoding? If both are length-encoded, what might make one better than the other?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17059" PostHistoryTypeId="1" PostId="4560" RevisionGUID="cabef53e-9e45-4de1-9988-9517abe861cd" CreationDate="2022-09-01T12:21:40.023" UserId="74" Text="Why SCALE vs RLP?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17060" PostHistoryTypeId="3" PostId="4560" RevisionGUID="cabef53e-9e45-4de1-9988-9517abe861cd" CreationDate="2022-09-01T12:21:40.023" UserId="74" Text="|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17061" PostHistoryTypeId="2" PostId="4561" RevisionGUID="3eb2b600-9e3c-4105-9266-18880baaa3f3" CreationDate="2022-09-01T12:24:51.373" UserId="74" Text="Does your Aura `chain_spec.rs` have 2 validators in it? Aura is a round-robin based protocol, if you have more than 1 validator, it will expect another block to be made in order of the list of authorities of your chain. Therefore, it might be the case that `Bob` fails to make a block after 6 seconds and loses his turn (since an extra 6 seconds are given to buffer the possibility that `Bob` is slow). " ContentLicense="CC BY-SA 4.0" />
  <row Id="17063" PostHistoryTypeId="2" PostId="4562" RevisionGUID="539bec18-be6e-4aa3-a28f-aea1ffe232aa" CreationDate="2022-09-01T12:26:07.080" UserId="74" Text="On the execution of your chain's node, you should see logs like:&#xD;&#xA;```&#xD;&#xA;2022-08-30 18:29:22.545  INFO tokio-runtime-worker substrate:  Idle (2 peers), best: #18 (0x43b6…2bc0), finalized #17 (0xcbf3…7bac), ⬇ 0 ⬆ 0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This tells you that you have synced 18 blocks, 17 of which are finalized." ContentLicense="CC BY-SA 4.0" />
  <row Id="17065" PostHistoryTypeId="2" PostId="4563" RevisionGUID="17fa83d9-80de-4bed-ad71-36b5d36c3f34" CreationDate="2022-09-01T12:30:51.610" UserId="74" Text="Yes, it should be possible to have the same peerId without specifying it in your CLI execution as a hardcoded `--node-key`. In order to do that you must ensure that you have the `node-key` saved in your keystore in the respective location where the node key is stored.&#xD;&#xA;&#xD;&#xA;There should be a default location for these type of key file on startup. You can generate a node-key to a file by following the description of section **subkey generate-node-key** in the [relevant Substrate Docs section][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/command-line-tools/subkey/" ContentLicense="CC BY-SA 4.0" />
  <row Id="17067" PostHistoryTypeId="5" PostId="4556" RevisionGUID="24e63039-ad80-4600-b3af-ced46c5a0785" CreationDate="2022-09-01T13:03:56.353" UserId="362" Comment="added 157 characters in body" Text="The docs say that the benefit of this macro is that the &quot;value is included in the metadata&quot;, but from what I can gather, there is nothing which pins down this value at compile time? That is, someone can provide a `Get` implementation which is based on storage state, block number or any other non-constant input.&#xD;&#xA;&#xD;&#xA; 1. Am I mistaken?&#xD;&#xA; 2. What value would actually be put in metadata?&#xD;&#xA; 3. Does a mutable `pallet::constant` cause problems for the node or Polkadotjs or some other part of the stack?&#xD;&#xA;&#xD;&#xA;**Edit:**&#xD;&#xA;&#xD;&#xA;Seems that `frame_support::parameter_types` can indeed be backed by a mutable storage item, but not sure what that implies for 2 and 3 above." ContentLicense="CC BY-SA 4.0" />
  <row Id="17068" PostHistoryTypeId="2" PostId="4564" RevisionGUID="ba1d390d-f804-482a-989c-ddc3672b4b09" CreationDate="2022-09-01T13:35:52.470" UserId="1789" Text="I was trying to deploy Ethereum smart contracts to my parachain as part of a Zombienet test... After deploying a bunch of contracts including demo, &#xD;&#xA;BoxU, ERC1820, ERC20, ERC721, ERC1155, ERC777, ERC4626, ERC20Upgradeable, ERC721Upgradeable. Then when Zombienet was trying to deploy ERC1155Upgradeable, it got stuck at this line: `tx = await tokenU.deployed()`. See the deployment code below:&#xD;&#xA;```&#xD;&#xA;	const TokenU = await ethers.getContractFactory(tokenCtrtNameU);&#xD;&#xA;	log1(&quot;checkpoint 2&quot;);&#xD;&#xA;	const tokenU = await upgrades.deployProxy(TokenU, ERC1155Arg, { initializer: &quot;initialize&quot; });&#xD;&#xA;	log1(&quot;checkpoint 3&quot;);&#xD;&#xA;	tx = await tokenU.deployed();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I use this command to see what was going on in the collator:&#xD;&#xA;```&#xD;&#xA;tail -f  /tmp/zombie-21376e2e46cad37d1c90b10d38ca14f3_-8552-iVEWz3ZX31I8/collator01.log&#xD;&#xA;```&#xD;&#xA;Then I saw this error:&#xD;&#xA;```&#xD;&#xA;2022-09-01 21:09:42.039  WARN tokio-runtime-worker aura: [Parachain] Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x33535f - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x4f06 - &lt;unknown&gt;!core::panicking::panic_fmt::h6a371c04dcf7739e&#xD;&#xA;    2: 0x4ec7 - &lt;unknown&gt;!core::panicking::panic::h9bf88698387979d4&#xD;&#xA;    3: 0x196d9f - &lt;unknown&gt;!&lt;hero_runtime::FindAuthorAdapter&lt;F&gt; as frame_support::traits::validation::FindAuthor&lt;primitive_types::H160&gt;&gt;::find_author::hb75087d0ff50d58a&#xD;&#xA;    4: 0x2cfaf1 - &lt;unknown&gt;!pallet_evm::&lt;impl pallet_evm::pallet::Pallet&lt;T&gt;&gt;::find_author::hc0ba43b18d98715f&#xD;&#xA;    5: 0x123657 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnFinalize&lt;BlockNumber&gt;&gt;::on_finalize::h8c02df61507e22df&#xD;&#xA;    6: 0x125856 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnFinalize&lt;BlockNumber&gt;&gt;::on_finalize::hacec8aa069fcdecf&#xD;&#xA;    7: 0x176ccc - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnFinalize&lt;BlockNumber&gt;&gt;::on_finalize::h32e12ed50e5008ad&#xD;&#xA;    8: 0x2db235 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnFinalize&lt;BlockNumber&gt;&gt;::on_finalize::h2c719d04a10b76ff&#xD;&#xA;    9: 0x240c79 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnFinalize&lt;BlockNumber&gt;&gt;::on_finalize::h2f55e682c72fcce1&#xD;&#xA;   10: 0x14f1a3 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::finalize_block::h0f119abaaa10d4a4&#xD;&#xA;   11: 0xa3625 - &lt;unknown&gt;!BlockBuilder_finalize_block&#xD;&#xA;```&#xD;&#xA;Those scripts work fine when I was using them to deploy smart contracts on Hardhat's virtual EVM and on my natively built collator EVM(running with 2 validators in Bash) &#xD;&#xA;&#xD;&#xA;What went wrong?&#xD;&#xA;Maybe I need to slow down the deployment?&#xD;&#xA;Or Zombienet cannot handle heavy contract deployment? &#xD;&#xA;&#xD;&#xA;Or Zombienet cannot handle high traffic RPC calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17070" PostHistoryTypeId="1" PostId="4564" RevisionGUID="ba1d390d-f804-482a-989c-ddc3672b4b09" CreationDate="2022-09-01T13:35:52.470" UserId="1789" Text="Zombienet: wasm trap: wasm `unreachable` instruction executed" ContentLicense="CC BY-SA 4.0" />
  <row Id="17071" PostHistoryTypeId="3" PostId="4564" RevisionGUID="ba1d390d-f804-482a-989c-ddc3672b4b09" CreationDate="2022-09-01T13:35:52.470" UserId="1789" Text="|frontier|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17072" PostHistoryTypeId="2" PostId="4565" RevisionGUID="e66d2de3-84cd-4a8c-9800-5f4036a5c185" CreationDate="2022-09-01T14:22:02.203" UserId="29" Text="Looks like there is an issue for this:&#xD;&#xA;- https://github.com/paritytech/substrate/issues/11855&#xD;&#xA;&#xD;&#xA;I was able to replicate this issue on:&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-node-template/releases/tag/polkadot-v0.9.26&#xD;&#xA;&#xD;&#xA;Logs are working for me fine on:&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-node-template/releases/tag/polkadot-v0.9.28&#xD;&#xA;&#xD;&#xA;Try using `polkadot-v0.9.28` tag of the node-template." ContentLicense="CC BY-SA 4.0" />
  <row Id="17074" PostHistoryTypeId="2" PostId="4566" RevisionGUID="cb4010d9-420b-4508-801b-1d1bff04af19" CreationDate="2022-09-01T14:29:59.250" UserId="251" Text="Simply use your node executable.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./node -d foo --chain bar --node-key-file node-key&#xD;&#xA;mv node-key foo/chains/bar/network/secret_ed25519&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Actually, if you don't specify the `--node-key-file` the node will generate a node key file under the network folder directly. You don't have to do anything.&#xD;&#xA;&#xD;&#xA;Note: some old Substrate versions won't cache the node key file, the peer id will be changed every restart. IIRC, that is long long ago." ContentLicense="CC BY-SA 4.0" />
  <row Id="17076" PostHistoryTypeId="5" PostId="4566" RevisionGUID="8fb833d4-533e-4957-85d4-79acd2ac84da" CreationDate="2022-09-01T14:59:51.333" UserId="251" Comment="added 8 characters in body" Text="Simply use your node executable.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./node -d foo --chain bar --node-key-file node-key&#xD;&#xA;mv node-key foo/chains/bar/network/secret_ed25519&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Actually, if you don't specify the `--node-key-file` the node will generate a `secret_ed25519` file under the network folder directly. You don't have to do anything.&#xD;&#xA;&#xD;&#xA;Note: some old Substrate versions won't cache the node key file, the peer id will be changed every restart. IIRC, that is long long ago." ContentLicense="CC BY-SA 4.0" />
  <row Id="17077" PostHistoryTypeId="2" PostId="4567" RevisionGUID="21a15916-3996-4f16-9781-ef0fb2ea78ec" CreationDate="2022-09-01T15:00:02.677" UserId="29" Text="Similar to Drew's answer...&#xD;&#xA;&#xD;&#xA;You should see something like this when syncing:&#xD;&#xA;```sh&#xD;&#xA;2022-07-22 19:38:12 [Relaychain] ⚙️  Syncing 91.7 bps, target=#11280082 (50 peers), best: #7467984 (0x2517…6b44), finalized #7467520 (0x7ec6…add8), ⬇ 106.0kiB/s ⬆ 37.1kiB/s &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Notice the **target** and **finalized** block numbers. &#xD;&#xA;&#xD;&#xA;In my example, I am still far from the target (which is when I am fully synced)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17079" PostHistoryTypeId="2" PostId="4568" RevisionGUID="95d6cce4-b7bc-49cd-ac10-32d0ad4ab9da" CreationDate="2022-09-01T15:39:32.500" UserId="2713" Text="Assume you submit a transaction to a Full Node which is configured incorrectly such that it can forward transactions but does not receive back results, e.g. it is working one-way `Full Node x-&gt; Validators` instead of two way `Full Node &lt;-&gt; Validators`.&#xD;&#xA;&#xD;&#xA;As a user, you might retry to send the same transaction such that the same one (except for the tx nonce) will be in the transaction pool twice. However, that transaction might already be included in a block, you just don't know that because the Full Node you trust is stale.&#xD;&#xA;&#xD;&#xA;What prevents your retry to be executed as well? If I understand correctly, after including the transaction, your account nonce will be bumped. Also, transactions are per default ordered by increasing nonces. Thus, the second attempt of you transaction can then be included in the block as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="17081" PostHistoryTypeId="1" PostId="4568" RevisionGUID="95d6cce4-b7bc-49cd-ac10-32d0ad4ab9da" CreationDate="2022-09-01T15:39:32.500" UserId="2713" Text="Transactions in a one-way synhronized node" ContentLicense="CC BY-SA 4.0" />
  <row Id="17082" PostHistoryTypeId="3" PostId="4568" RevisionGUID="95d6cce4-b7bc-49cd-ac10-32d0ad4ab9da" CreationDate="2022-09-01T15:39:32.500" UserId="2713" Text="|transactions|nonce|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17083" PostHistoryTypeId="2" PostId="4569" RevisionGUID="17d32824-564c-457c-8344-b9ec52a60fa3" CreationDate="2022-09-01T16:38:28.943" UserId="94" Text="Programmatically you can use PolkadotJS or cURL to query that info from the RPC.  &#xD;&#xA;For example the last head:  &#xD;&#xA;```bash&#xD;&#xA;curl -sS -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;chain_getHeader&quot;}' http://localhost:9933/ | jq '.result.number' -r&#xD;&#xA;```&#xD;&#xA;which prints hex. PolkadotJS is more convenient, see [getHeader](https://polkadot.js.org/docs/substrate/rpc/#getheaderhash-blockhash-header) and [getFinalizedHead](https://polkadot.js.org/docs/substrate/rpc/#getfinalizedhead-blockhash)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17085" PostHistoryTypeId="2" PostId="4570" RevisionGUID="8f13420f-7b49-4609-a29c-9964dabe69c4" CreationDate="2022-09-01T18:56:04.870" UserId="3105" Text="The problem ended up being a tsconfig option: `compilerOptions.skipLibCheck`. I have that set to `false` in my go-to configuration. Switching it to `true` fixes the issue.&#xD;&#xA;&#xD;&#xA;I have to say, though, this feels like a red flag. If I can only get this to work by turning off huge portions of typescript's consistency validation system, I'm not sure there's much of a point to using typescript. In fact, using typescript with part of its validation turned off would give you a false sense of security that can lead to innumerable bugs and errors at runtime.&#xD;&#xA;&#xD;&#xA;For anyone finding this in the future, I think this raises serious concerns for building safe production applications...." ContentLicense="CC BY-SA 4.0" />
  <row Id="17087" PostHistoryTypeId="2" PostId="4571" RevisionGUID="d9ce5721-9b00-4917-8de7-11136b8ec15a" CreationDate="2022-09-01T19:50:01.360" UserId="3070" Text="Are there any Ink contract example implementations for DAOs?&#xD;&#xA;A contract that supports Voting using weights for members from a Multisig contract?&#xD;&#xA;&#xD;&#xA;thanks," ContentLicense="CC BY-SA 4.0" />
  <row Id="17089" PostHistoryTypeId="1" PostId="4571" RevisionGUID="d9ce5721-9b00-4917-8de7-11136b8ec15a" CreationDate="2022-09-01T19:50:01.360" UserId="3070" Text="DAO Contracts Specs for Ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17090" PostHistoryTypeId="3" PostId="4571" RevisionGUID="d9ce5721-9b00-4917-8de7-11136b8ec15a" CreationDate="2022-09-01T19:50:01.360" UserId="3070" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17095" PostHistoryTypeId="2" PostId="4573" RevisionGUID="9318854c-e572-44a2-9709-13bc53f22cfb" CreationDate="2022-09-01T21:47:28.610" UserId="28" Text="At the moment, Rust does not have stable support for [const generics](https://github.com/paritytech/substrate/pull/9865) or [const traits](https://github.com/rust-lang/rust/issues/67792), and similar stuff.&#xD;&#xA;&#xD;&#xA;Your Pallet constants SHOULD be constant, and it is your job as a runtime developer to ensure you implement them properly.&#xD;&#xA;&#xD;&#xA;But yes, it is unfortunately currently possible to implement such items as non-const, and it will make your metadata act funny (like change block to block)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17097" PostHistoryTypeId="2" PostId="4574" RevisionGUID="7824218e-577c-40d3-9192-350056d0a3a0" CreationDate="2022-09-01T21:54:19.030" UserId="28" Text="I am not an expert of RLP, but it does not seem these two things are that comparable.&#xD;&#xA;&#xD;&#xA;From [RLP docs](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/):&#xD;&#xA;&#xD;&#xA;&gt; The purpose of RLP is to encode arbitrarily nested arrays of binary data, and RLP is the primary encoding method used to serialize objects in Ethereum's execution layer. The only purpose of RLP is to encode structure; encoding specific data types (e.g. strings, floats) is left up to higher-order protocols; but positive RLP integers must be represented in big-endian binary form with no leading zeroes (thus making the integer value zero equivalent to the empty byte array).&#xD;&#xA;&#xD;&#xA;SCALE clearly has a wider scope than RLP, where the SCALE specification is designed to encode any data type.&#xD;&#xA;&#xD;&#xA;Furthermore, it is not trivial to just breeze over the fact that SCALE is little-endian, since Wasm is little-endian making SCALE near zero overhead, and we know that Substrate and Polkadot are based entirely around Wasm.&#xD;&#xA;&#xD;&#xA;Beyond that, you have the usual reasons why SCALE was chosen:&#xD;&#xA;&#xD;&#xA;- Simple to define.&#xD;&#xA;- Not Rust-specific (but happens to work great in Rust).&#xD;&#xA;  - Easy to derive codec logic: `#[derive(Encode, Decode)]`&#xD;&#xA;  - Viable and useful for APIs like: `MaxEncodedLen` and `TypeInfo`&#xD;&#xA;  - It does not use Rust `std`, and thus can compile to Wasm `no_std`.&#xD;&#xA;- Consensus critical / bijective; one value will always encode to one blob and that blob will only decode to that value.&#xD;&#xA;- Supports a copy-free decode for basic types on LE architectures.&#xD;&#xA;- It is about as thin and lightweight as can be." ContentLicense="CC BY-SA 4.0" />
  <row Id="17099" PostHistoryTypeId="2" PostId="4575" RevisionGUID="4cdd828b-af67-4d3d-b37a-6050087294f4" CreationDate="2022-09-02T00:15:09.167" UserId="2060" Text="We want the ability to filter certain accounts from calling extrinsics in the democracy pallet.&#xD;&#xA;&#xD;&#xA;One idea was to create a signed extension where the call fails if the AccountId is one of the restricted accounts, which is possible but seems heavy-handed.  It seems like a CallFilter could do the same but this seems like a lot too.&#xD;&#xA;&#xD;&#xA;We thought, maybe we could set Origin to use a custom EnsureOrigin implementation for pallet_democracy. Unfortunately it's just an associated type, so we can't change it in the pallet_democracy Config.&#xD;&#xA;&#xD;&#xA;What is the best way to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17101" PostHistoryTypeId="1" PostId="4575" RevisionGUID="4cdd828b-af67-4d3d-b37a-6050087294f4" CreationDate="2022-09-02T00:15:09.167" UserId="2060" Text="How does one block specific accounts from calling extrinsics for a substrate pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17102" PostHistoryTypeId="3" PostId="4575" RevisionGUID="4cdd828b-af67-4d3d-b37a-6050087294f4" CreationDate="2022-09-02T00:15:09.167" UserId="2060" Text="|extrinsic|signed-extensions|origin|config|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17103" PostHistoryTypeId="5" PostId="4575" RevisionGUID="a2ed4076-03b1-42a9-8224-458c95ad200e" CreationDate="2022-09-02T00:25:57.050" UserId="2060" Comment="added 103 characters in body" Text="We want the ability to filter certain accounts from calling extrinsics in the democracy pallet.  There are more details but basically we can't do this by reserving token balance or we would do that.&#xD;&#xA;&#xD;&#xA;One idea was to create a signed extension where the call fails if the AccountId is one of the restricted accounts, which is possible but seems heavy-handed.  It seems like a CallFilter could do the same but this seems like a lot too.&#xD;&#xA;&#xD;&#xA;We thought, maybe we could set Origin to use a custom EnsureOrigin implementation for pallet_democracy. Unfortunately it's just an associated type, so we can't change it in the pallet_democracy Config.&#xD;&#xA;&#xD;&#xA;What is the best way to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17104" PostHistoryTypeId="2" PostId="4576" RevisionGUID="c38697ac-4dc7-4df3-9cf7-c8888b0adf4c" CreationDate="2022-09-02T00:53:48.437" UserId="445" Text="I start running development node, and try to test about transfer balance in polkadot.js.org&#xD;&#xA;&#xD;&#xA;Problem: `Make Transfer` button only hidden, not show &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/QpFyv.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17106" PostHistoryTypeId="1" PostId="4576" RevisionGUID="c38697ac-4dc7-4df3-9cf7-c8888b0adf4c" CreationDate="2022-09-02T00:53:48.437" UserId="445" Text="Can not transfer balance in polkadot.js.org?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17107" PostHistoryTypeId="3" PostId="4576" RevisionGUID="c38697ac-4dc7-4df3-9cf7-c8888b0adf4c" CreationDate="2022-09-02T00:53:48.437" UserId="445" Text="|polkadot-js|substrate-node-template|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17108" PostHistoryTypeId="2" PostId="4577" RevisionGUID="d0477f21-a98f-436b-8141-2fce33871673" CreationDate="2022-09-02T01:04:06.570" UserId="251" Text="It depends on the configuration/logic you are using for your chain.&#xD;&#xA;&#xD;&#xA;For the most common XCM configuration, the reserved balance goes to the parachain_2's sovereign account on parachain_1.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For example, our parachain is Crab Parachain. We reserve transfer some Crab to Karura(paraid 2000).&#xD;&#xA;&#xD;&#xA;Let's calculate the Karura's sovereign address first.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subalfred key --type sibling 2000&#xD;&#xA;public-key 0x7369626cd0070000000000000000000000000000000000000000000000000000 SiblId(2000)&#xD;&#xA;Substrate 5Eg2fntJ27qsari4FGrGhrMqKFDRnkNSR6UshkZYBGXmSuC8&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then check at the https://crab-parachain.subscan.io/account/5Eg2fntJ27qsari4FGrGhrMqKFDRnkNSR6UshkZYBGXmSuC8." ContentLicense="CC BY-SA 4.0" />
  <row Id="17110" PostHistoryTypeId="5" PostId="4577" RevisionGUID="7dbd277f-87f6-4277-9fde-56fe1419a9d5" CreationDate="2022-09-02T01:09:22.710" UserId="251" Comment="added 70 characters in body" Text="It depends on the configuration/logic you are using for your chain.&#xD;&#xA;&#xD;&#xA;For the most common XCM configuration, the reserved balance goes to the parachain_2's sovereign account on parachain_1.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For example, our parachain is Crab Parachain. We reserve transfer some Crab to Karura(paraid 2000).&#xD;&#xA;&#xD;&#xA;Let's calculate the Karura's sovereign address first.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subalfred key --type sibling 2000&#xD;&#xA;public-key 0x7369626cd0070000000000000000000000000000000000000000000000000000 SiblId(2000)&#xD;&#xA;Substrate 5Eg2fntJ27qsari4FGrGhrMqKFDRnkNSR6UshkZYBGXmSuC8&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then check at the [`5Eg2fntJ27qsari4FGrGhrMqKFDRnkNSR6UshkZYBGXmSuC8` on Crab Parachain](https://crab-parachain.subscan.io/account/5Eg2fntJ27qsari4FGrGhrMqKFDRnkNSR6UshkZYBGXmSuC8)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17111" PostHistoryTypeId="5" PostId="4502" RevisionGUID="2f499fd3-d6f7-40ef-aff7-68d0763b1803" CreationDate="2022-09-02T05:43:52.550" UserId="213" Comment="added 85 characters in body" Text="I'm trying to use subxt in my yew front end app.&#xD;&#xA;&#xD;&#xA;    let pair = Pair::from_phrase(&amp;&quot;mnemonic&quot;.to_string(), Some(&quot;password&quot;))?;&#xD;&#xA;&#xD;&#xA;As I can't use polkadot extension for signing transaction, is it safe to store mnemonic in local storage than using the password (without storing password in local storage) for signing transaction.&#xD;&#xA;&#xD;&#xA;How can I encrypt the mnemonic and store it in local storage, and then decrypt it? &#xD;&#xA;&#xD;&#xA;How can I do the transaction safely?&#xD;&#xA;&#xD;&#xA;Here I have [tried the process][1] where salt for password and iv are stored in local storage, and also encrypted seed is stored in local storage. &#xD;&#xA;```rust&#xD;&#xA;use std::fmt::format;&#xD;&#xA;use libaes::Cipher;&#xD;&#xA;use scrypt::{scrypt, Params, Scrypt};&#xD;&#xA;use serde::{Deserialize, Serialize};&#xD;&#xA;use serde_json;&#xD;&#xA;&#xD;&#xA;use password_hash::{rand_core::OsRng, PasswordHash, PasswordHasher, PasswordVerifier, SaltString};&#xD;&#xA;&#xD;&#xA;pub fn generate_hash_and_verify(passwordstring: String) -&gt; String  {&#xD;&#xA;    let password = passwordstring.as_bytes();&#xD;&#xA;    let salt = SaltString::generate(&amp;mut OsRng); &#xD;&#xA;    println!(&quot;salt: {}&quot;, salt);&#xD;&#xA;    let password_hash = Scrypt.hash_password(password, &amp;salt).unwrap().to_string();&#xD;&#xA;    let parsed_hash = PasswordHash::new(&amp;password_hash).unwrap();&#xD;&#xA;    assert!(Scrypt.verify_password(password, &amp;parsed_hash).is_ok());&#xD;&#xA;    let salt_string = format!(&quot;{}&quot;, salt); // Store the salt in local storage.&#xD;&#xA;    salt_string&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn already_used_salt(passwordstring: String, salt_string: String) -&gt; String {&#xD;&#xA;    let salt_str: &amp;str = &amp;salt_string[..];&#xD;&#xA;    let salt = SaltString::new(salt_str).unwrap();&#xD;&#xA;    let password = passwordstring.as_bytes();&#xD;&#xA;&#xD;&#xA;    let password_hash = Scrypt.hash_password(password, &amp;salt).unwrap().to_string();&#xD;&#xA;    let parsed_hash = PasswordHash::new(&amp;password_hash).unwrap();&#xD;&#xA;    assert!(Scrypt.verify_password(password, &amp;parsed_hash).is_ok());&#xD;&#xA;    password_hash&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn encrypt_seed(password_hash: String, seed: String) -&gt; (Vec&lt;u8&gt;, String) {&#xD;&#xA;    let iv_salt = SaltString::generate(&amp;mut OsRng);&#xD;&#xA;    let iv_salt_string = format!(&quot;{}&quot;, iv_salt); &#xD;&#xA;    let iv_salt_string_clone = iv_salt_string.clone(); // Store iv salt in local storage&#xD;&#xA;    let iv_salt_bytes = iv_salt_string.into_bytes();&#xD;&#xA;    // println!(&quot;iv_salt_bytes len: {}&quot;, iv_salt_bytes.len());&#xD;&#xA;    // println!(&quot;iv_salt_bytes: {:?}&quot;, iv_salt_bytes);&#xD;&#xA;    let iv: &amp;[u8; 16] = &amp;iv_salt_bytes[0..16].try_into().unwrap();&#xD;&#xA;    // println!(&quot;iv: {:?}&quot;, iv);&#xD;&#xA;    let my_key_bytes = password_hash.into_bytes();&#xD;&#xA;    // println!(&quot;my_key_bytes: {:?}&quot;, my_key_bytes);&#xD;&#xA;    let my_key: &amp;[u8; 16] = &amp;my_key_bytes[0..16].try_into().unwrap();&#xD;&#xA;    // println!(&quot;my_key_bytes: {:?}&quot;, my_key);&#xD;&#xA;&#xD;&#xA;    let cipher = Cipher::new_128(my_key);&#xD;&#xA;&#xD;&#xA;    // Encryption&#xD;&#xA;    let encrypted = cipher.cbc_encrypt(iv, seed.as_bytes()); // Store in local storate&#xD;&#xA;    // println!(&quot;{:?}&quot;, encrypted); &#xD;&#xA;&#xD;&#xA;    // Decryption&#xD;&#xA;    let decrypted = cipher.cbc_decrypt(iv, &amp;encrypted[..]);&#xD;&#xA;    let seed = String::from_utf8(decrypted).unwrap();&#xD;&#xA;    // println!(&quot;{}&quot;, seed);&#xD;&#xA;    (encrypted, iv_salt_string_clone)&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn decrypt_seed(password: String, seed: String) {&#xD;&#xA;     &#xD;&#xA;    let salt_str = generate_hash_and_verify(password.clone());&#xD;&#xA;    let password_hash = already_used_salt(password, salt_str);&#xD;&#xA;    let (encrypted, iv_salt_string) = encrypt_seed(password_hash.clone(), seed);&#xD;&#xA;    let iv_salt_bytes = iv_salt_string.into_bytes();&#xD;&#xA;    let iv: &amp;[u8; 16] = &amp;iv_salt_bytes[0..16].try_into().unwrap();&#xD;&#xA;    let my_key_bytes = password_hash.into_bytes();&#xD;&#xA;    let my_key: &amp;[u8; 16] = &amp;my_key_bytes[0..16].try_into().unwrap();&#xD;&#xA;    let cipher = Cipher::new_128(my_key);&#xD;&#xA;    let decrypted = cipher.cbc_decrypt(iv, &amp;encrypted[..]);&#xD;&#xA;    let seed = String::from_utf8(decrypted).unwrap();&#xD;&#xA;    println!(&quot;{}&quot;, seed);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;fn main() {&#xD;&#xA;    let seed = &quot;caution juice atom organ advance problem want pledge someone senior holiday very&quot;&#xD;&#xA;        .to_owned();&#xD;&#xA;    decrypt_seed(&quot;passwordubiqutous&quot;.to_string(), seed)  &#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There are packages too to encrypt messages: &#xD;&#xA;https://docs.rs/pwbox/latest/pwbox/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/amiyatulu/seed_encrypt" ContentLicense="CC BY-SA 4.0" />
  <row Id="17112" PostHistoryTypeId="5" PostId="4523" RevisionGUID="0ae4a1c9-ae80-4f25-905d-9c1c35da3875" CreationDate="2022-09-02T05:54:46.307" UserId="3096" Comment="added 105 characters in body" Text="We had changed the code in pallet template and was trying to add it in substrate node-template runtime. Link to[ \[github][1] code][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Got the following [![error][2]][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;After answer updated following new error:  [![error][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/sky-vibhu/Customise-pallet.git&#xD;&#xA;  [2]: https://i.stack.imgur.com/yg2f7.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/G3ql7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17113" PostHistoryTypeId="5" PostId="4523" RevisionGUID="7a120117-0015-4f90-8d37-249ee4f1721f" CreationDate="2022-09-02T06:50:55.943" UserId="3096" Comment="added 54 characters in body" Text="We had changed the code in pallet template and was trying to add it in substrate node-template runtime. Link to[ \[github][1] code][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Got the following [![error][3]][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;After answer updated following new error:  [![error][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/sky-vibhu/Customise-Pallet&#xD;&#xA;  [2]: https://github.com/sky-vibhu/Customise-pallet.git&#xD;&#xA;  [3]: https://i.stack.imgur.com/yg2f7.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/G3ql7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17114" PostHistoryTypeId="2" PostId="4578" RevisionGUID="01210449-19bb-4b3b-9ff1-cf5b465937e8" CreationDate="2022-09-02T06:59:38.417" UserId="3097" Text="Are polkascan and subscan.polkadot are same because I'm facing an issue that I've generated an address for polkadot by using python and I've pasted the same address on both of these explorers polkascan shows me the details of address but on subscan.polkadot it throws an error that Account not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="17116" PostHistoryTypeId="1" PostId="4578" RevisionGUID="01210449-19bb-4b3b-9ff1-cf5b465937e8" CreationDate="2022-09-02T06:59:38.417" UserId="3097" Text="Are polkascan and subscan same and synced?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17117" PostHistoryTypeId="3" PostId="4578" RevisionGUID="01210449-19bb-4b3b-9ff1-cf5b465937e8" CreationDate="2022-09-02T06:59:38.417" UserId="3097" Text="|polkadot|polkascan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17118" PostHistoryTypeId="2" PostId="4579" RevisionGUID="892676d2-a6c9-4b51-9b6c-6462f3448e8b" CreationDate="2022-09-02T07:32:44.943" UserId="3109" Text="I want to design  a light weight blockchain that is interoperable. Being light weight, it will be able to take part in consensus and create 	new nodes without doing complex computations and wasting resources. This means, the blockchain will run on any mobile, tablet or laptop. &#xD;&#xA;As already light client available , How can i change this smoldot repository to make my light client.&#xD;&#xA;And which frameworks and language to considered?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17120" PostHistoryTypeId="1" PostId="4579" RevisionGUID="892676d2-a6c9-4b51-9b6c-6462f3448e8b" CreationDate="2022-09-02T07:32:44.943" UserId="3109" Text="Which files to change in smoldot to design light client according to our need.?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17121" PostHistoryTypeId="3" PostId="4579" RevisionGUID="892676d2-a6c9-4b51-9b6c-6462f3448e8b" CreationDate="2022-09-02T07:32:44.943" UserId="3109" Text="|substrate-node-template|rust|runtime|evm|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17122" PostHistoryTypeId="2" PostId="4580" RevisionGUID="c62d2ae4-3044-4f1e-bc69-4022e7c6b4cc" CreationDate="2022-09-02T08:40:00.213" UserId="567" Text="You can check my example inspired by Governor contract of OpenZeppelin:&#xD;&#xA;&#xD;&#xA;https://github.com/AstarNetwork/WASM-Governor-Workshop&#xD;&#xA;&#xD;&#xA;It supports Vote using weights of a governance token" ContentLicense="CC BY-SA 4.0" />
  <row Id="17124" PostHistoryTypeId="5" PostId="4580" RevisionGUID="0abf40c1-ad32-484a-89aa-2d4f2f76fda9" CreationDate="2022-09-02T08:45:07.937" UserId="567" Comment="added 131 characters in body" Text="You can check my example inspired by Governor contract of OpenZeppelin:&#xD;&#xA;&#xD;&#xA;https://github.com/AstarNetwork/WASM-Governor-Workshop&#xD;&#xA;&#xD;&#xA;It supports Vote using weights of a governance token. &#xD;&#xA;For Multisig you can have a look at parity multisig example:&#xD;&#xA;https://github.com/paritytech/ink/tree/master/examples/multisig&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17125" PostHistoryTypeId="2" PostId="4581" RevisionGUID="e90ef0e6-9fa0-450f-963e-8ddeb4509a7e" CreationDate="2022-09-02T09:13:21.337" UserId="2471" Text="I have changed the name on my spec.json and I am getting this erro&#xD;&#xA;&#xD;&#xA;    Unable to author block in slot 270671004,. `can_author_with` returned: `spec_name` does not match `X` vs `node-frontier-template` Probably a node update is required!&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;What would be the issue behind?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17127" PostHistoryTypeId="1" PostId="4581" RevisionGUID="e90ef0e6-9fa0-450f-963e-8ddeb4509a7e" CreationDate="2022-09-02T09:13:21.337" UserId="2471" Text="Unable to author block in slot 270671004,. `can_author_with` returned: `spec_name` does not match" ContentLicense="CC BY-SA 4.0" />
  <row Id="17128" PostHistoryTypeId="3" PostId="4581" RevisionGUID="e90ef0e6-9fa0-450f-963e-8ddeb4509a7e" CreationDate="2022-09-02T09:13:21.337" UserId="2471" Text="|substrate-node|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17129" PostHistoryTypeId="5" PostId="4523" RevisionGUID="0c63ac3f-e940-4440-9e7b-ab9162050859" CreationDate="2022-09-02T09:27:40.503" UserId="3096" Comment="added 1855 characters in body" Text="We had changed the code in pallet template and was trying to add it in substrate node-template runtime. Link to[ \[github][1] code][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Got the following [![error][3]][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;After answer updated following new error:  [![error][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Error - &#xD;&#xA; Compiling node-template-runtime v4.0.0-dev (/data/Network-marketing/runtime)&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/data/Network-marketing/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/data/Network-marketing/target/release/build/node-template-runtime-55554732df6f82a1/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/data/Network-marketing/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.65.0-nightly (02654a084 2022-08-30)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/data/Network-marketing/runtime)&#xD;&#xA;  error[E0119]: conflicting implementations of trait `core::convert::TryFrom&lt;OriginCaller&gt;` for type `frame_system::RawOrigin&lt;[type error]&gt;`&#xD;&#xA;     --&gt; /data/Network-marketing/runtime/src/lib.rs:284:1&#xD;&#xA;      |&#xD;&#xA;  284 |    construct_runtime!(&#xD;&#xA;      |   _^&#xD;&#xA;      |  |_|&#xD;&#xA;      | ||&#xD;&#xA;  285 | ||     pub enum Runtime&#xD;&#xA;  286 | ||     where&#xD;&#xA;  287 | ||         Block = Block,&#xD;&#xA;  ...   ||&#xD;&#xA;  302 | ||     }&#xD;&#xA;  303 | || );&#xD;&#xA;      | ||_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: conflicting implementation in crate `core`:&#xD;&#xA;              - impl&lt;T, U&gt; TryFrom&lt;U&gt; for T&#xD;&#xA;                where U: Into&lt;T&gt;;&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0119`.&#xD;&#xA;  error: could not compile `node-template-runtime` due to previous error`enter code here`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/sky-vibhu/Customise-Pallet&#xD;&#xA;  [2]: https://github.com/sky-vibhu/Customise-pallet.git&#xD;&#xA;  [3]: https://i.stack.imgur.com/yg2f7.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/G3ql7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17130" PostHistoryTypeId="2" PostId="4582" RevisionGUID="4fa98f1c-797c-4d54-b581-2a966a8c600d" CreationDate="2022-09-02T09:53:03.277" UserId="251" Text="Take Polkadot as an example.&#xD;&#xA;&#xD;&#xA;You can not change the spec name in runtime [lib.rs](https://github.com/paritytech/polkadot/blob/00f873119c8491a5d188d5aa3050035180f7e5e3/runtime/polkadot/src/lib.rs#L112), nor the one in spec file [polkadot.json](https://github.com/paritytech/polkadot/blob/master/node/service/chain-specs/polkadot.json) during the chain is running." ContentLicense="CC BY-SA 4.0" />
  <row Id="17132" PostHistoryTypeId="5" PostId="4582" RevisionGUID="6c0d6b90-27aa-4000-ab59-352fd848ea99" CreationDate="2022-09-02T09:59:27.283" UserId="251" Comment="added 72 characters in body" Text="Take Polkadot as an example.&#xD;&#xA;&#xD;&#xA;You can not change the spec name in runtime [lib.rs](https://github.com/paritytech/polkadot/blob/00f873119c8491a5d188d5aa3050035180f7e5e3/runtime/polkadot/src/lib.rs#L112), nor the one in spec file [polkadot.json](https://github.com/paritytech/polkadot/blob/master/node/service/chain-specs/polkadot.json) during the chain is running.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;IIUC, if you want to change it, you need to start a new chain. Otherwise, you might need to a lot of extra works." ContentLicense="CC BY-SA 4.0" />
  <row Id="17133" PostHistoryTypeId="2" PostId="4583" RevisionGUID="ba4558d0-4c16-445a-9424-8015578698b2" CreationDate="2022-09-02T10:23:18.073" UserId="362" Text="In the `pallet_multisig`, there are two storage maps `Multisigs` for the multisigs and `Calls` for the actual call in a multisig. The pallet has two distinct pricing components for its bloat deposit:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes.&#xD;&#xA;pub const DepositBase: Balance = deposit(1, 88);&#xD;&#xA;// Additional storage item size of 32 bytes.&#xD;&#xA;pub const DepositFactor: Balance = deposit(0, 32);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when you look at how these are used, you see that `store_call_and_reserve` uses `data.encoded_len() + 31` as the byte length used with the `DepositFactor` to price the `Calls` mapping, despite the byte size of this needing to be `sizeof([u8; 32]||(OpaqueCall&lt;T&gt;, T::AccountId, BalanceOf&lt;T&gt;)` which is something like `32 + data.encoded_len() + 32 + 128` in Polkadot/Kusama.&#xD;&#xA;&#xD;&#xA;**Isn't this under pricing in this case?**&#xD;&#xA;&#xD;&#xA;I ask because there is very scarce information on how storage deposits should properly be set, so I'm not totally sure I am interpreting everything properly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Side question:** Why would one split this representations into two distinct maps like this? It seems having call in multisig itself would be a safer static representation, now there is an implicit runtime invariant about maps being synchronised." ContentLicense="CC BY-SA 4.0" />
  <row Id="17135" PostHistoryTypeId="1" PostId="4583" RevisionGUID="ba4558d0-4c16-445a-9424-8015578698b2" CreationDate="2022-09-02T10:23:18.073" UserId="362" Text="Multisig pallet mispricing bug?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17136" PostHistoryTypeId="3" PostId="4583" RevisionGUID="ba4558d0-4c16-445a-9424-8015578698b2" CreationDate="2022-09-02T10:23:18.073" UserId="362" Text="|existential-deposit|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17141" PostHistoryTypeId="2" PostId="4585" RevisionGUID="4c1817de-256d-4453-92df-f7713774963c" CreationDate="2022-09-02T10:33:31.193" UserId="529" Text="Have you checked how the module separation is done for the [Swanky-node][1]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AstarNetwork/swanky-node/blob/main/runtime/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="17143" PostHistoryTypeId="2" PostId="4586" RevisionGUID="78332481-e3c0-441c-a7aa-693523de0384" CreationDate="2022-09-02T10:50:36.290" UserId="362" Text="In Polkadot and Kusama, the `deposit` function is used to price storage object footprint, it looks like this&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;	pub const fn deposit(items: u32, bytes: u32) -&gt; Balance {&#xD;&#xA;		items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The semantics of this seem to be $20 for any map entry and 10c per byte actually consumed by the mapping, which is just counted as the total size of key and value of each mapping. When I use $USD denominations here I am going by the obvious attempt to price in terms of some implied liquid valuation of the native asset. Importantly, this is a general model used across the board, so it's not based on detailed considerations about each map.&#xD;&#xA;&#xD;&#xA;The prices this attempts to produce are very large, just in terms of normal diserable costs of using certain basic blockchain features.&#xD;&#xA;&#xD;&#xA;The inconsistency seems to be when one comes for example to the `balances_pallet`, it has the `ExistentialDeposit` has the implicit storage bond for accounts, serving the exact same purpose, but it has a _radically_ lower price: $1&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub const EXISTENTIAL_DEPOSIT: Balance = 100 * CENTS;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Not only is this much less than the fixed $20, but also does not account for the substantial storage footprint of an account.&#xD;&#xA;&#xD;&#xA;So here is my question: if the purpose of all of these deposits is to discourage state bloat attacks, isn't all that matters the smallest price of being able to add anything in storage at a given size? If so, having these gigantic deposit differentials would seem to be inconsistent and useless, because all that matters is whether (in this case) the `balances_pallet` is protected or not.&#xD;&#xA;&#xD;&#xA;Also, why such a _gigantic_ pricing of the other deposits?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17145" PostHistoryTypeId="1" PostId="4586" RevisionGUID="78332481-e3c0-441c-a7aa-693523de0384" CreationDate="2022-09-02T10:50:36.290" UserId="362" Text="Inconsistent storage deposit logic in Polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="17146" PostHistoryTypeId="3" PostId="4586" RevisionGUID="78332481-e3c0-441c-a7aa-693523de0384" CreationDate="2022-09-02T10:50:36.290" UserId="362" Text="|existential-deposit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17147" PostHistoryTypeId="2" PostId="4587" RevisionGUID="28c01adf-2131-400b-9fc1-587bb3a6d93f" CreationDate="2022-09-02T11:39:23.337" UserId="3111" Text="I found there is almost no rust unstable feature usage inside substrate, is that a coincidence, code of conduct, or for some specific reasons?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17149" PostHistoryTypeId="1" PostId="4587" RevisionGUID="28c01adf-2131-400b-9fc1-587bb3a6d93f" CreationDate="2022-09-02T11:39:23.337" UserId="3111" Text="Can we use rust unstable features in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17150" PostHistoryTypeId="3" PostId="4587" RevisionGUID="28c01adf-2131-400b-9fc1-587bb3a6d93f" CreationDate="2022-09-02T11:39:23.337" UserId="3111" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17153" PostHistoryTypeId="2" PostId="4588" RevisionGUID="2f302720-e50b-4c50-91b5-0f1906f4ef12" CreationDate="2022-09-02T12:17:34.800" UserId="3097" Text="I've setup the full node of polkadot westend network and it's fully synced now I want to connect with my node on local host how could I do that&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17155" PostHistoryTypeId="1" PostId="4588" RevisionGUID="2f302720-e50b-4c50-91b5-0f1906f4ef12" CreationDate="2022-09-02T12:17:34.800" UserId="3097" Text="How to connect to locally synced node of polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="17156" PostHistoryTypeId="3" PostId="4588" RevisionGUID="2f302720-e50b-4c50-91b5-0f1906f4ef12" CreationDate="2022-09-02T12:17:34.800" UserId="3097" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17157" PostHistoryTypeId="5" PostId="4420" RevisionGUID="bb9375af-d2cc-42dd-8c3a-b644ec85fffc" CreationDate="2022-09-02T12:44:29.737" UserId="3078" Comment="added 143 characters in body" Text="# Summary &#xD;&#xA;&#xD;&#xA;I am using an Ink! smart contract (implemented in contract.rs) code calling a chain extension method. &#xD;&#xA;&#xD;&#xA;This works well. &#xD;&#xA;&#xD;&#xA;However, I want to split my code and call the extension method in a new module (let's call it util.rs). &#xD;&#xA;&#xD;&#xA;What is the idiomatic way to share the same env with this module.&#xD;&#xA;In other words I want to be able to call self.env().extension.my_method from utils.rs method.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Update&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I will ask my question in a more concise and concrete way, suppose the following code in a ink! smart contract: &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;use crate::CustomEnvironment;&#xD;&#xA;&#xD;&#xA;// use ink_env::chain_extension::ChainExtension; NOT EXPOSED PUBLICLY&#xD;&#xA;&#xD;&#xA;// Suppose we want to define this method that takes the extension as parameter&#xD;&#xA;fn call_a_method_extension(ext: &lt;&lt;CustomEnvironment&gt;::ChainExtension as ChainExtensionInstance&gt;::Instance) {&#xD;&#xA;    // use ext here&#xD;&#xA;    // ext.call_on_chain_method&#xD;&#xA;}&#xD;&#xA;// ...&#xD;&#xA;let ext = Self::env().extension();&#xD;&#xA;// Info from rust-analyser:&#xD;&#xA;// ChainExtensionInstance&lt;Self = Environment&lt;Self = E&gt;::ChainExtension&gt;::Instance&#xD;&#xA;// &lt;&lt;E as Environment&gt;::ChainExtension as ChainExtensionInstance&gt;::Instance&#xD;&#xA;&#xD;&#xA;// we want to pass ext to call_a_method_extension&#xD;&#xA;call_a_method_extension(ext);&#xD;&#xA;&#xD;&#xA;// ...&#xD;&#xA;#[derive(Debug, Copy, Clone, PartialEq, Eq)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;pub enum CustomEnvironment {}&#xD;&#xA;&#xD;&#xA;impl Environment for CustomEnvironment {&#xD;&#xA;    const MAX_EVENT_TOPICS: usize = &lt;ink_env::DefaultEnvironment as Environment&gt;::MAX_EVENT_TOPICS;&#xD;&#xA;&#xD;&#xA;    type AccountId = &lt;ink_env::DefaultEnvironment as Environment&gt;::AccountId;&#xD;&#xA;    type Balance = &lt;ink_env::DefaultEnvironment as Environment&gt;::Balance;&#xD;&#xA;    type Hash = &lt;ink_env::DefaultEnvironment as Environment&gt;::Hash;&#xD;&#xA;    type BlockNumber = &lt;ink_env::DefaultEnvironment as Environment&gt;::BlockNumber;&#xD;&#xA;    type Timestamp = &lt;ink_env::DefaultEnvironment as Environment&gt;::Timestamp;&#xD;&#xA;&#xD;&#xA;    type ChainExtension = ConcreteOps;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;What type need to be written to the ext parameter in call_a_method_extension method ? &#xD;&#xA;&#xD;&#xA;# Archive&#xD;&#xA;&#xD;&#xA;## First attempt&#xD;&#xA;&#xD;&#xA;I try to overlad the + operation with a basic functions for now.&#xD;&#xA;&#xD;&#xA;## Share the EnvAccess to a struct defined in util.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// utils.rs&#xD;&#xA;use crate::CustomEnvironment;&#xD;&#xA;use ink_lang::EnvAccess;&#xD;&#xA;&#xD;&#xA;#[derive(Debug)]&#xD;&#xA;pub struct VeryUtil&lt;'a&gt; {&#xD;&#xA;    pub value: ink_prelude::vec::Vec&lt;u8&gt;,&#xD;&#xA;    pub extension: EnvAccess&lt;'a, CustomEnvironment&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;'a&gt; VeryUtil&lt;'a&gt; {&#xD;&#xA;    pub fn new(&#xD;&#xA;        value: ink_prelude::vec::Vec&lt;u8&gt;,&#xD;&#xA;        extension: EnvAccess&lt;'a, CustomEnvironment&gt;,&#xD;&#xA;    ) -&gt; Self {&#xD;&#xA;        VeryUtil { value, extension }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl core::ops::Add&lt;VeryUtil&lt;'_&gt;&gt; for VeryUtil&lt;'_&gt; {&#xD;&#xA;    // For the next line I get&#xD;&#xA;    // generic associated types are unstable&#xD;&#xA;    // type Output&lt;'a&gt; = VeryUtil&lt;'a&gt;;&#xD;&#xA;&#xD;&#xA;    // for now I tested with&#xD;&#xA;    type Output = Vec&lt;u8&gt;;&#xD;&#xA;&#xD;&#xA;    fn add(self, rhs: VeryUtil) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;        println!(&quot;&gt; add is called&quot;);&#xD;&#xA;&#xD;&#xA;        let val = self&#xD;&#xA;            .extension&#xD;&#xA;            .extension()&#xD;&#xA;            .add_values(&amp;self.value, &amp;rhs.value);&#xD;&#xA;&#xD;&#xA;        val.unwrap()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here I get a warning when the output was the same struct, I commented in the code. &#xD;&#xA;A subsidiary question is how to avoid to share for each struct the env, but without it I would not be able to call the extension method in the Add overload part!&#xD;&#xA;&#xD;&#xA;## Use the defined  struct in one of the exposed contract methods: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// contract.rs&#xD;&#xA;1 let very_util_val1 = crate::util::VeryUtil::new(my_vec1.clone(), self.env());&#xD;&#xA;2 let very_util_val2 = crate::util::VeryUtil::new(my_vec2.clone(), self.env());&#xD;&#xA;3 // All the code purpose is to be able to do this!!!&#xD;&#xA;4 let result = very_util_val1 + very_util_val2 &#xD;&#xA;```&#xD;&#xA;I get the following error for line 1 and 2 : &#xD;&#xA;```&#xD;&#xA;cannot borrow `*self` as mutable because it is also borrowed as immutable&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My initial choice was to share a *__ink_ConreteOpsInstance* (self.env().extension) but I did not know how to define this type in my struct. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Another idea&#xD;&#xA;&#xD;&#xA;Maybe I can ask access like the contract module with the following macro ...&#xD;&#xA;```rust&#xD;&#xA;#[ink::contract(env = crate::CustomEnvironment)]&#xD;&#xA;```&#xD;&#xA;... but this module is not a contract just a sub module.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17158" PostHistoryTypeId="2" PostId="4589" RevisionGUID="478a35a5-6667-47a5-b9b9-f8e7b897e922" CreationDate="2022-09-02T13:35:04.880" UserId="29" Text="Lots of different ways to connect.&#xD;&#xA;&#xD;&#xA;You can connect using [polkadotJS apps](https://polkadot.js.org/apps).&#xD;&#xA;&#xD;&#xA;You can also use [polkadotsJS api](https://polkadot.js.org/docs/api) and connect with your node using JavaScript.&#xD;&#xA;&#xD;&#xA;Lots of resources on connecting to your node here:&#xD;&#xA;- https://docs.substrate.io/tutorials&#xD;&#xA;&#xD;&#xA;You can also use [substrate-api-sidecar](https://github.com/paritytech/substrate-api-sidecar) to build a REST api around your node and interact with your node in a REST fashion." ContentLicense="CC BY-SA 4.0" />
  <row Id="17160" PostHistoryTypeId="2" PostId="4590" RevisionGUID="e2fe3366-3f38-4940-9e74-6164aed5fefe" CreationDate="2022-09-02T13:35:49.533" UserId="2985" Text="Iam having two files &#xD;&#xA;&#xD;&#xA;[rococo_custom_2_plain.json](https://github.com/substrate-developer-hub/substrate-docs/blob/main/static/assets/tutorials/cumulus/chain-specs/rococo-custom-2-plain.json)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA; 1. What does beefy means?&#xD;&#xA; 2. What s the difference b/w alice vs alice_stash &amp; bob vs bob-stash ?&#xD;&#xA; 3. From the above image how can i able to step up for new node ie., charlie?&#xD;&#xA;&#xD;&#xA;[rococo_local_plain_200.json]&#xD;&#xA;(https://drive.google.com/file/d/1sks5s8BEouuxwFMV9zAkqjkNWr27Uc00/view?usp=sharing)&#xD;&#xA;&#xD;&#xA;how can i add charlie node as collator same as alice &amp; bob.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ll5l2.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17162" PostHistoryTypeId="1" PostId="4590" RevisionGUID="e2fe3366-3f38-4940-9e74-6164aed5fefe" CreationDate="2022-09-02T13:35:49.533" UserId="2985" Text="How to charlie node to local relay-chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17163" PostHistoryTypeId="3" PostId="4590" RevisionGUID="e2fe3366-3f38-4940-9e74-6164aed5fefe" CreationDate="2022-09-02T13:35:49.533" UserId="2985" Text="|polkadot|parachain|relay-chain|rococo-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17164" PostHistoryTypeId="4" PostId="4590" RevisionGUID="5456d177-1f5e-4c65-9e1c-98e135574a4b" CreationDate="2022-09-02T13:36:30.670" UserId="2985" Comment="edited title" Text="How to add charlie node to local relay-chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17165" PostHistoryTypeId="2" PostId="4591" RevisionGUID="68aef174-4b8f-4e23-852b-71d0c4d1896e" CreationDate="2022-09-02T13:48:18.077" UserId="2548" Text="I get this issue when I try to build the substrate-node-template&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `prost-build v0.10.4`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/elioprifti/substrate-node-template/target/debug/build/prost-build-842a283f6884a648/build-script-build` (exit status: 101)&#xD;&#xA;  --- stdout&#xD;&#xA;  cargo:rerun-if-changed=/Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.10.4/third-party/protobuf/cmake&#xD;&#xA;  CMAKE_TOOLCHAIN_FILE_aarch64-apple-darwin = None&#xD;&#xA;  CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin = None&#xD;&#xA;  HOST_CMAKE_TOOLCHAIN_FILE = None&#xD;&#xA;  CMAKE_TOOLCHAIN_FILE = None&#xD;&#xA;  CMAKE_GENERATOR_aarch64-apple-darwin = None&#xD;&#xA;  CMAKE_GENERATOR_aarch64_apple_darwin = None&#xD;&#xA;  HOST_CMAKE_GENERATOR = None&#xD;&#xA;  CMAKE_GENERATOR = None&#xD;&#xA;  CMAKE_PREFIX_PATH_aarch64-apple-darwin = None&#xD;&#xA;  CMAKE_PREFIX_PATH_aarch64_apple_darwin = None&#xD;&#xA;  HOST_CMAKE_PREFIX_PATH = None&#xD;&#xA;  CMAKE_PREFIX_PATH = None&#xD;&#xA;  CMAKE_aarch64-apple-darwin = None&#xD;&#xA;  CMAKE_aarch64_apple_darwin = None&#xD;&#xA;  HOST_CMAKE = None&#xD;&#xA;  CMAKE = None&#xD;&#xA;  running: &quot;cmake&quot; &quot;/Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.10.4/third-party/protobuf/cmake&quot; &quot;-Dprotobuf_BUILD_TESTS=OFF&quot; &quot;-DCMAKE_INSTALL_PREFIX=/Users/elioprifti/substrate-node-template/target/debug/build/prost-build-ff54cba47a5a17d8/out&quot; &quot;-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -arch arm64&quot; &quot;-DCMAKE_C_COMPILER=/usr/bin/cc&quot; &quot;-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -arch arm64&quot; &quot;-DCMAKE_CXX_COMPILER=/usr/bin/c++&quot; &quot;-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -arch arm64&quot; &quot;-DCMAKE_ASM_COMPILER=/usr/bin/cc&quot; &quot;-DCMAKE_BUILD_TYPE=Debug&quot;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  thread 'main' panicked at '&#xD;&#xA;  failed to execute command: No such file or directory (os error 2)&#xD;&#xA;  is `cmake` not installed?&#xD;&#xA;&#xD;&#xA;  build script failed, must exit now', /Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;elioprifti@pc-193-62 substrate-node-template % &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Rust configuration: &#xD;&#xA;```&#xD;&#xA;elioprifti@pc-193-62 ~ % rustup show                                &#xD;&#xA;rustup +nightly show&#xD;&#xA;&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/elioprifti/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.63.0 (4b91a6ea7 2022-08-08)&#xD;&#xA;&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/elioprifti/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.65.0-nightly (2e35f954a 2022-09-01)&#xD;&#xA;&#xD;&#xA;elioprifti@pc-193-62 ~ % &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Any idea? " ContentLicense="CC BY-SA 4.0" />
  <row Id="17167" PostHistoryTypeId="1" PostId="4591" RevisionGUID="68aef174-4b8f-4e23-852b-71d0c4d1896e" CreationDate="2022-09-02T13:48:18.077" UserId="2548" Text="Mac m1 substrate node template can't be build" ContentLicense="CC BY-SA 4.0" />
  <row Id="17168" PostHistoryTypeId="3" PostId="4591" RevisionGUID="68aef174-4b8f-4e23-852b-71d0c4d1896e" CreationDate="2022-09-02T13:48:18.077" UserId="2548" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17169" PostHistoryTypeId="2" PostId="4592" RevisionGUID="d95ebd84-6304-49a2-8993-26fc4a41a481" CreationDate="2022-09-02T13:55:31.737" UserId="14" Text="The error is pointing this out:&#xD;&#xA;```&#xD;&#xA;is `cmake` not installed?&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17171" PostHistoryTypeId="2" PostId="4593" RevisionGUID="6b4edd12-2b09-42ce-9c84-7fbf7769ae88" CreationDate="2022-09-02T13:59:19.453" UserId="29" Text="BEEFY (Bridge Efficiency Enabling Finality Yielder) is a secondary protocol running alongside GRANDPA to support efficient bridging with non-Substrate blockchains.&#xD;&#xA;- https://github.com/paritytech/grandpa-bridge-gadget&#xD;&#xA;&#xD;&#xA;Video on BEEFY:&#xD;&#xA;- https://www.youtube.com/watch?v=ZmIa_4hPRZ8&#xD;&#xA;&#xD;&#xA;What is the difference between Alice vs Alice Stash? &#xD;&#xA;&#xD;&#xA;Both are predefined dev accounts:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;$ ./target/release/node-template key inspect //Alice&#xD;&#xA;Secret Key URI `//Alice` is account:&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a&#xD;&#xA;  Public key (hex):  0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Account ID:        0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Public key (SS58): 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;  SS58 Address:      5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;$ ./target/release/node-template key inspect //Alice//stash&#xD;&#xA;Secret Key URI `//Alice//stash` is account:&#xD;&#xA;  Network ID:        substrate &#xD;&#xA; Secret seed:       0x3c881bc4d45926680c64a7f9315eeda3dd287f8d598f3653d7c107799c5422b3&#xD;&#xA;  Public key (hex):  0xbe5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f&#xD;&#xA;  Account ID:        0xbe5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f&#xD;&#xA;  Public key (SS58): 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;  SS58 Address:      5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the [node-template](https://github.com/substrate-developer-hub/substrate-node-template/) Alice's key is normally used as the sudo key:&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-node-template/blob/6a8b2b12371395979099d2c79ccc1860531b0449/node/src/chain_spec.rs#L54&#xD;&#xA;&#xD;&#xA;Take a look at this tutorial on how to add additional nodes:&#xD;&#xA;- https://docs.substrate.io/tutorials/get-started/trusted-network&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17173" PostHistoryTypeId="2" PostId="4594" RevisionGUID="a176512d-c769-458d-897b-f4e6708b08dd" CreationDate="2022-09-02T14:20:03.507" UserId="73" Text="We only need rust nightly for compiling the runtime and there is also some open issue to switch to stable as soon as we can. The main point here would be that communicating which nightly compiler for every version would be a little bit annoying. We already had these problems when nightly changed stuff that we used in the runtime. &#xD;&#xA;&#xD;&#xA;In your own Substrate based runtime you can enable whatever rust feature you like. We will not prevent this or stopping you from doing this :) " ContentLicense="CC BY-SA 4.0" />
  <row Id="17175" PostHistoryTypeId="2" PostId="4595" RevisionGUID="c944981b-38a6-49c1-828c-377740a3200c" CreationDate="2022-09-02T14:24:39.207" UserId="73" Text="You are mixing up some stuff. The light client is called light because it only follows consensus. Meaning it isn't able to author any blocks. You still need validators that are able to produce new blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="17177" PostHistoryTypeId="2" PostId="4596" RevisionGUID="cd24c7aa-9c79-4d6c-822c-e9324bffed9e" CreationDate="2022-09-02T14:47:59.257" UserId="29" Text="```sh&#xD;&#xA;brew update&#xD;&#xA;brew install cmake&#xD;&#xA;```&#xD;&#xA;Make sure it is installed:&#xD;&#xA;```&#xD;&#xA;cmake --help&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Make sure you follow the steps here:&#xD;&#xA;- https://docs.substrate.io/install/macos/#install-required-packages-and-rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="17181" PostHistoryTypeId="2" PostId="4598" RevisionGUID="80be1c1f-a871-475e-8c2f-d9306ec831d6" CreationDate="2022-09-02T14:55:42.757" UserId="538" Text="I am attempting to build some tests that initiate and validate transaction fee movements. The problem is that I seem unable to initiate transaction fees in a mock runtime at all. I suspect I am missing something fundamental about how mocks/tests are using `UncheckedExtrinsic` and `SignedExtra`, so any help would be appreciated!&#xD;&#xA;&#xD;&#xA;My release version of the runtime works fine to charge tx fees and transfer them to the appropriate pallet. I implemented `OnUnbalanced` and a custom fee splitter in the `CurrencyAdapter` of `pallet_transaction_payment`.&#xD;&#xA;&#xD;&#xA;I moved the same fee splitter mechanism over to my mock runtime and overrode the standard Unchecked extrinsic code `MockUncheckedExtrinsic`, but seem unable to trigger transaction fees to even be taken in the mock runtime. Here is what is not working so far:&#xD;&#xA;```&#xD;&#xA;// type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic&lt;Test&gt;;&#xD;&#xA;// type Block = frame_system::mocking::MockBlock&lt;Test&gt;;&#xD;&#xA;&#xD;&#xA;// An attempt to test charging tx fees in mocks that failed :(&#xD;&#xA;pub type SignedExtra = (&#xD;&#xA;	frame_system::CheckWeight&lt;Test&gt;,&#xD;&#xA;	pallet_transaction_payment::ChargeTransactionPayment&lt;Test&gt;,&#xD;&#xA;);&#xD;&#xA;pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic&lt;AccountId, Call, (), SignedExtra&gt;;&#xD;&#xA;pub type Block = sp_runtime::generic::Block&lt;Header, UncheckedExtrinsic&gt;;&#xD;&#xA;&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;},&#xD;&#xA;        Balances: pallet_balances::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		MyPallet: my_pallet::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="17183" PostHistoryTypeId="1" PostId="4598" RevisionGUID="80be1c1f-a871-475e-8c2f-d9306ec831d6" CreationDate="2022-09-02T14:55:42.757" UserId="538" Text="Testing transaction fee movements" ContentLicense="CC BY-SA 4.0" />
  <row Id="17184" PostHistoryTypeId="3" PostId="4598" RevisionGUID="80be1c1f-a871-475e-8c2f-d9306ec831d6" CreationDate="2022-09-02T14:55:42.757" UserId="538" Text="|transactions|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17190" PostHistoryTypeId="5" PostId="4596" RevisionGUID="fe8de8f6-d038-45ab-9055-19817cb80526" CreationDate="2022-09-02T15:44:30.733" UserId="29" Comment="added 60 characters in body" Text="Looks like it is not finding it.&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;brew update&#xD;&#xA;brew uninstall cmake&#xD;&#xA;brew install cmake&#xD;&#xA;```&#xD;&#xA;Make sure it is installed:&#xD;&#xA;```&#xD;&#xA;cmake --help&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Make sure you follow the steps here:&#xD;&#xA;- https://docs.substrate.io/install/macos/#install-required-packages-and-rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="17191" PostHistoryTypeId="2" PostId="4600" RevisionGUID="7805770c-b6e3-4fef-9e97-8a54fbc6ec19" CreationDate="2022-09-02T15:52:29.410" UserId="2548" Text="Always restart your machine, this fixed it!" ContentLicense="CC BY-SA 4.0" />
  <row Id="17193" PostHistoryTypeId="2" PostId="4601" RevisionGUID="95344ca2-106b-4c03-b896-2f4bc42c9823" CreationDate="2022-09-02T16:57:00.283" UserId="3109" Text="Is there any framework available by using it we can create light client for interoperable blockchains/substrate based blockchains" ContentLicense="CC BY-SA 4.0" />
  <row Id="17195" PostHistoryTypeId="1" PostId="4601" RevisionGUID="95344ca2-106b-4c03-b896-2f4bc42c9823" CreationDate="2022-09-02T16:57:00.283" UserId="3109" Text="Framework for light client" ContentLicense="CC BY-SA 4.0" />
  <row Id="17196" PostHistoryTypeId="3" PostId="4601" RevisionGUID="95344ca2-106b-4c03-b896-2f4bc42c9823" CreationDate="2022-09-02T16:57:00.283" UserId="3109" Text="|substrate-node|substrate-node-template|runtime|light-client|blockchain-frameworks|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17197" PostHistoryTypeId="2" PostId="4602" RevisionGUID="989bbaf9-5143-44c1-913d-9a5895663f31" CreationDate="2022-09-02T17:30:39.993" UserId="2581" Text="I want to get reward for specific address in polkadot.js/api.&#xD;&#xA;Especially for kusama.&#xD;&#xA;Is polkadot.js providing such api to get reward for specific validator address?&#xD;&#xA;also for specific block height?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17199" PostHistoryTypeId="1" PostId="4602" RevisionGUID="989bbaf9-5143-44c1-913d-9a5895663f31" CreationDate="2022-09-02T17:30:39.993" UserId="2581" Text="Get reward amount in polkadot.js/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="17200" PostHistoryTypeId="3" PostId="4602" RevisionGUID="989bbaf9-5143-44c1-913d-9a5895663f31" CreationDate="2022-09-02T17:30:39.993" UserId="2581" Text="|polkadot-js|kusama|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17201" PostHistoryTypeId="5" PostId="4581" RevisionGUID="86752d0a-f178-46b3-a78c-7b789ee6fcc1" CreationDate="2022-09-02T17:54:41.463" UserId="2471" Comment="added 349 characters in body" Text="I have changed the name on my spec.json and I am getting this erro&#xD;&#xA;&#xD;&#xA;    Unable to author block in slot 270671004,. `can_author_with` returned: `spec_name` does not match `X` vs `node-frontier-template` Probably a node update is required!&#xD;&#xA;&#xD;&#xA;    Edit :&#xD;&#xA;I have changed this too !&#xD;&#xA;&#xD;&#xA;    pub const VERSION: RuntimeVersion = RuntimeVersion {&#xD;&#xA;    	spec_name: create_runtime_str!(&quot;x&quot;),&#xD;&#xA;    	impl_name: create_runtime_str!(&quot;x&quot;),&#xD;&#xA;    	authoring_version: 1,&#xD;&#xA;    	spec_version: 1,&#xD;&#xA;    	impl_version: 1,&#xD;&#xA;    	apis: RUNTIME_API_VERSIONS,&#xD;&#xA;    	transaction_version: 1,&#xD;&#xA;    	state_version: 1,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;What would be the issue behind?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17202" PostHistoryTypeId="2" PostId="4603" RevisionGUID="98e28714-18b8-4086-a0ad-1894b21cf325" CreationDate="2022-09-02T18:28:10.347" UserId="555" Text="Can anyone please give me any link or docs where I can find more about **Substrate Files decentralized storage**?&#xD;&#xA;&#xD;&#xA;I have gone through this link: https://github.com/polkadot-js/apps/pull/6106&#xD;&#xA;&#xD;&#xA;Is there any other material to explore more about it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17204" PostHistoryTypeId="1" PostId="4603" RevisionGUID="98e28714-18b8-4086-a0ad-1894b21cf325" CreationDate="2022-09-02T18:28:10.347" UserId="555" Text="what is Substrate Files Decentralised storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17205" PostHistoryTypeId="3" PostId="4603" RevisionGUID="98e28714-18b8-4086-a0ad-1894b21cf325" CreationDate="2022-09-02T18:28:10.347" UserId="555" Text="|substrate-node|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17206" PostHistoryTypeId="5" PostId="4519" RevisionGUID="e9feea0a-031b-463b-bacc-a535ab4a52c2" CreationDate="2022-09-02T19:33:48.987" UserId="29" Comment="added 700 characters in body" Text="It is currently not possible to do an overlapping slot and keep the same paraId.&#xD;&#xA;&#xD;&#xA;&gt; This is a good feature request (or PR).&#xD;&#xA;&#xD;&#xA;Looks like in the [swap](https://github.com/paritytech/polkadot/blob/00f873119c8491a5d188d5aa3050035180f7e5e3/runtime/common/src/paras_registrar.rs#L262-L274) code, if the paraIds are the same then it will result in a no-op:&#xD;&#xA;```rs&#xD;&#xA;// If `id` and `other` is the same id, we treat this as a &quot;clear&quot; function, and exit&#xD;&#xA;// early, since swapping the same id would otherwise be a noop.&#xD;&#xA;if id == other {&#xD;&#xA;	PendingSwap::&lt;T&gt;::remove(id);&#xD;&#xA;	return Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/00f873119c8491a5d188d5aa3050035180f7e5e3/runtime/common/src/paras_registrar.rs#L277-L282&#xD;&#xA;&#xD;&#xA;I agree that non-overlapping slots takes a bit of logistics and planning e.g. making sure you have time allocated for all aspects of securing a new slot (governance, auction, etc) and it is not guaranteed.&#xD;&#xA;&#xD;&#xA;Always make sure to test this process locally on a test network.&#xD;&#xA;&#xD;&#xA;More Info:&#xD;&#xA;- https://substrate.stackexchange.com/questions/2874/how-can-a-project-prolong-a-parachain-slot-lease-in-kusama/2887#2887&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17207" PostHistoryTypeId="5" PostId="4519" RevisionGUID="6d7830e5-7a65-4ed9-b3fa-1aa7538a58c3" CreationDate="2022-09-02T19:39:15.323" UserId="29" Comment="added 25 characters in body" Text="It is currently not possible to do an overlapping slot and keep the same paraId.&#xD;&#xA;&#xD;&#xA;&gt; This is a good feature request (or PR).&#xD;&#xA;&#xD;&#xA;Looks like in the [swap](https://github.com/paritytech/polkadot/blob/00f873119c8491a5d188d5aa3050035180f7e5e3/runtime/common/src/paras_registrar.rs#L262-L274) code, if the paraIds are the same then it will result in a no-op:&#xD;&#xA;```rs&#xD;&#xA;// If `id` and `other` is the same id, we treat this as a &quot;clear&quot; function, and exit&#xD;&#xA;// early, since swapping the same id would otherwise be a noop.&#xD;&#xA;if id == other {&#xD;&#xA;	PendingSwap::&lt;T&gt;::remove(id);&#xD;&#xA;	return Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/00f873119c8491a5d188d5aa3050035180f7e5e3/runtime/common/src/paras_registrar.rs#L277-L282&#xD;&#xA;&#xD;&#xA;I agree that non-overlapping slots takes a bit of logistics and planning e.g. making sure you have time allocated for all aspects of securing a new slot (governance, auction, etc) and it is not guaranteed - you could lose the bid.&#xD;&#xA;&#xD;&#xA;Always make sure to test this process locally on a test network.&#xD;&#xA;&#xD;&#xA;More Info:&#xD;&#xA;- https://substrate.stackexchange.com/questions/2874/how-can-a-project-prolong-a-parachain-slot-lease-in-kusama/2887#2887&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17208" PostHistoryTypeId="52" PostId="4588" RevisionGUID="99ac768f-11fd-412e-9041-61ff7f287ec7" CreationDate="2022-09-02T20:19:39.190" />
  <row Id="17209" PostHistoryTypeId="2" PostId="4604" RevisionGUID="986c846d-19bd-4c46-80b9-604eb9b04c29" CreationDate="2022-09-02T20:37:42.803" UserId="234" Text="As Bruno mentioned there are multiple ways to connect to a node but it also depends on what you would like to achieve when connecting to your node. &#xD;&#xA;&#xD;&#xA;For example there is also another tool called [subxt][1] which is a Rust library for interacting with a substrate based node. If your goal is to do one of the following :&#xD;&#xA;- Accessing storage entries&#xD;&#xA;- Accessing constants&#xD;&#xA;- Subscribing to events&#xD;&#xA;- Submitting extrinsics&#xD;&#xA;&#xD;&#xA;you could also use this tool.&#xD;&#xA;&#xD;&#xA;Last, another resource worth checking is our Polkadot wiki page regarding [Node Interaction][2] which mentions different ways to interact with your node and showing some examples.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/build-node-interaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="17212" PostHistoryTypeId="5" PostId="4582" RevisionGUID="195d3164-7f35-479c-8e9e-d9b6a93b60ff" CreationDate="2022-09-03T07:00:48.137" UserId="251" Comment="added 2 characters in body" Text="Take Polkadot as an example.&#xD;&#xA;&#xD;&#xA;You can not change the spec name in runtime [lib.rs](https://github.com/paritytech/polkadot/blob/00f873119c8491a5d188d5aa3050035180f7e5e3/runtime/polkadot/src/lib.rs#L112), nor the one in spec file [polkadot.json](https://github.com/paritytech/polkadot/blob/master/node/service/chain-specs/polkadot.json) during the chain is running.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;IIUC, if you want to change it, you need to start a new chain. Otherwise, you might need to do a lot of extra work." ContentLicense="CC BY-SA 4.0" />
  <row Id="17213" PostHistoryTypeId="2" PostId="4605" RevisionGUID="ff35dc52-bad9-4069-9798-cdb985d714e9" CreationDate="2022-09-03T08:43:17.233" UserId="251" Text="I believe this question comes from https://substrate.stackexchange.com/questions/4550/how-we-can-create-wallet-generate-address-in-polkadot.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;When you create an address locally. There is no record of this address anywhere, even on the chain. The account won't exist in the actual chain storage until you fund it.&#xD;&#xA;&#xD;&#xA;For Polkascan, it will show an empty(default) `AccountDataInfo`.&#xD;&#xA;&#xD;&#xA;For Subscan, it will show not found. I'm pretty sure about this. (I'm a member of Itering/Darwinia/Subscan)" ContentLicense="CC BY-SA 4.0" />
  <row Id="17215" PostHistoryTypeId="5" PostId="4605" RevisionGUID="a8c82b8e-b7d2-425b-acda-32faec0cd08c" CreationDate="2022-09-03T08:58:02.047" UserId="251" Comment="added 179 characters in body" Text="I believe this question comes from https://substrate.stackexchange.com/questions/4550/how-we-can-create-wallet-generate-address-in-polkadot.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Your gen-account script is purely an offline tool. When you create an address locally. There is no record of this address anywhere, even on the chain. The account won't exist in the actual chain storage until you fund it. &#xD;&#xA;&#xD;&#xA;Imagine, there are so many possibilities/accounts in the world. It's impossible for Polkadot to put all of them in storage before the users activate/fund them. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For Polkascan, it will show an empty(default) `AccountDataInfo`.&#xD;&#xA;&#xD;&#xA;For Subscan, it will show not found. I'm pretty sure about this. (I'm a member of Itering/Darwinia/Subscan)" ContentLicense="CC BY-SA 4.0" />
  <row Id="17216" PostHistoryTypeId="5" PostId="4605" RevisionGUID="b751626e-b169-49a8-849f-9f2f82b093dd" CreationDate="2022-09-03T09:05:31.920" UserId="251" Comment="added 211 characters in body" Text="I believe this question comes from https://substrate.stackexchange.com/questions/4550/how-we-can-create-wallet-generate-address-in-polkadot.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Your gen-account script is purely an offline tool. When you create an address locally. There is no record of this address anywhere, even on the chain. The account won't exist in the actual chain storage until you fund it. &#xD;&#xA;&#xD;&#xA;Imagine, there are so many possibilities/accounts in the world. It's impossible for Polkadot to put all of them in storage before the users activate/fund them. &#xD;&#xA;&#xD;&#xA;Only when [`NewAccount`](https://github.com/paritytech/substrate/blob/4b7911607b48a5ca7ebf1d655f12d91cdd241866/frame/system/src/lib.rs#L515-L516) event is deposited, then we could say the account exists now.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For Polkascan, it will show an empty(default) `AccountDataInfo`.&#xD;&#xA;&#xD;&#xA;For Subscan, it will show not found. I'm pretty sure about this. (I'm a member of Itering/Darwinia/Subscan)" ContentLicense="CC BY-SA 4.0" />
  <row Id="17217" PostHistoryTypeId="2" PostId="4606" RevisionGUID="abc63c22-54be-43ec-9c63-c09e8a53181f" CreationDate="2022-09-03T10:05:19.733" UserId="165" Text="When swapping between two parachains you are transfering slot information of each one to the other, same thing happens with crowdloan info.&#xD;&#xA;&#xD;&#xA;[`swap` is part of registrar pallet][1], and defines that for this case, both paras are parachains at the same time, the logic handling the swap will be defined at runtime level.&#xD;&#xA;```rust&#xD;&#xA;// --snip&#xD;&#xA;// If both chains are currently parachains, there is nothing funny we&#xD;&#xA;// need to do for their lifecycle management, just swap the underlying&#xD;&#xA;// data.&#xD;&#xA;T::OnSwap::on_swap(id, other);&#xD;&#xA;// --snip&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If we check registrar pallet config on Kusama we can see the following:&#xD;&#xA;```rust&#xD;&#xA;impl paras_registrar::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Origin = Origin;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type OnSwap = (Crowdloan, Slots); // implementations of OnSwap on these pallets&#xD;&#xA;	type ParaDeposit = ParaDeposit;&#xD;&#xA;	type DataDepositPerByte = DataDepositPerByte;&#xD;&#xA;	type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;So, when swapping, the logic handling the information movement is located in the following pallets, per runtime definition:&#xD;&#xA;&#xD;&#xA; - [crowdloan][2]: swapping Funds information between paras.&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; crate::traits::OnSwap for Pallet&lt;T&gt; {&#xD;&#xA;	fn on_swap(one: ParaId, other: ParaId) {&#xD;&#xA;		Funds::&lt;T&gt;::mutate(one, |x| Funds::&lt;T&gt;::mutate(other, |y| sp_std::mem::swap(x, y)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; - [slots][3]: swapping Leases information between paras.&#xD;&#xA;``` rust&#xD;&#xA;impl&lt;T: Config&gt; crate::traits::OnSwap for Pallet&lt;T&gt; {&#xD;&#xA;	fn on_swap(one: ParaId, other: ParaId) {&#xD;&#xA;		Leases::&lt;T&gt;::mutate(one, |x| Leases::&lt;T&gt;::mutate(other, |y| sp_std::mem::swap(x, y)))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Meaning that if there was a parachain, with `ParaId=2222` which is at its last LP, close to the end of its parachain lifecycle, and it swaps with another parachain with `ParaId=3333` that has more LPs, meaning it will be parachain for longer.&#xD;&#xA;`2222` will receive the LPs of `3333`, then we achieve to keep `2222` for longer as a parachain. `3333` in the other hand will end its parachain lifecycle when `2222` was going to, as it holds the `Leases` information that was `2222`'s before the swap.&#xD;&#xA;Similar story with `Funds` info.&#xD;&#xA;&#xD;&#xA;So answering your question, `ParaId`s don't swap, but you can make one of them stick for longer, and thus keep on using it, and this don't present any kind of problems.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/6217ef5e29023375876460d3e831d6463c074bdd/runtime/common/src/paras_registrar.rs#L274&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/66374ef1f8dce7ce072e5ae7fdff87b660f04a66/runtime/common/src/crowdloan/mod.rs#L819-L823&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/slots/mod.rs#L328-L332" ContentLicense="CC BY-SA 4.0" />
  <row Id="17223" PostHistoryTypeId="2" PostId="4608" RevisionGUID="334e7b24-1f6c-41e4-8498-1f7cde9e596c" CreationDate="2022-09-03T13:30:23.170" UserId="29" Text="Looks like there was an announcement by the Crust team when this feature came out:&#xD;&#xA;&#xD;&#xA;&gt; Polkadot Files module is now LIVE for all Polkadot ecosystem users,&#xD;&#xA;&gt; including relay and parachain users  @Polkadot  &#xD;&#xA;&gt; &#xD;&#xA;&gt; ✅File storage &#xD;&#xA;&gt;&#xD;&#xA;&gt; ✅NFT metadata pinning &#xD;&#xA;&gt;&#xD;&#xA;&gt; ✅Website hosting &#xD;&#xA;&gt;&#xD;&#xA;&gt; ✅DECENTRALIZED&#xD;&#xA;&gt; through #CrustNetwork and #IPFS!&#xD;&#xA;&#xD;&#xA;- https://twitter.com/CrustNetwork/status/1494263644229861377?s=20&amp;t=E1W6Hj7u8wxWkf3WOkCEVg&#xD;&#xA;&#xD;&#xA;That [link](https://github.com/polkadot-js/apps/pull/6106) that you shared pretty much has all the information.&#xD;&#xA;&#xD;&#xA;For example, the README states:&#xD;&#xA;&#xD;&#xA;&gt; Substrate Files is a decentralized storage module which allows&#xD;&#xA;&gt; substrate-based chains(including&#xD;&#xA;&gt; Polkadot/Kusama/Crust/Acala/Clover/Moonbeam/Astar/Phala/...) users&#xD;&#xA;&gt; upload their files to IPFS W3Auth Gateway and decentralized pin their&#xD;&#xA;&gt; files on Crust Network by using the standard IPFS W3Auth Pinning&#xD;&#xA;&gt; Service. This module is a 100% IPFS compatible file storage module,&#xD;&#xA;&gt; users can pin NFT files, host DApps or store on-chain data in totally&#xD;&#xA;&gt; DECENTRALIZED way(guaranteed by Crust protocol). Also, the Pinning&#xD;&#xA;&gt; Service is compatible with several Platforms like Ethereum, Polygon,&#xD;&#xA;&gt; Solana and Near, and funded by Decentralized Cloud Foundation. So&#xD;&#xA;&gt; currently, Substrate Files is FREE for all the substrate-based chains!&#xD;&#xA;- https://github.com/crustio/apps/blob/b1fe7a10b6e7e67ad926842edab598bdc3474717/packages/page-files/README.md&#xD;&#xA;&#xD;&#xA;You can read about the particulars by reading [the code](https://github.com/polkadot-js/apps/pull/6106/files) and the Crust technology that was used e.g. [IPFS W3Auth Gateway](https://wiki.crust.network/docs/en/buildIPFSWeb3AuthGW)&#xD;&#xA;&#xD;&#xA;If you're not familiar with how Crust works, start here:&#xD;&#xA;- https://wiki.crust.network/docs/en/crustOverview" ContentLicense="CC BY-SA 4.0" />
  <row Id="17230" PostHistoryTypeId="6" PostId="4598" RevisionGUID="c31948e8-531c-452a-8c7a-20ad46a23f48" CreationDate="2022-09-03T16:20:35.397" UserId="34" Comment="edited tags" Text="|runtime|transactions|testing|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17231" PostHistoryTypeId="2" PostId="4610" RevisionGUID="f5f493ed-ffaa-4e60-801f-2241bb6fedb0" CreationDate="2022-09-03T20:39:51.870" UserId="2471" Text="What are the blockchain explorers compatible with substrate based blockchains?&#xD;&#xA;&#xD;&#xA;I am aware of polkatdotjs and subscan. Is there any other solutions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17233" PostHistoryTypeId="1" PostId="4610" RevisionGUID="f5f493ed-ffaa-4e60-801f-2241bb6fedb0" CreationDate="2022-09-03T20:39:51.870" UserId="2471" Text="sbstrate blockchain explorers" ContentLicense="CC BY-SA 4.0" />
  <row Id="17234" PostHistoryTypeId="3" PostId="4610" RevisionGUID="f5f493ed-ffaa-4e60-801f-2241bb6fedb0" CreationDate="2022-09-03T20:39:51.870" UserId="2471" Text="|substrate-node|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17237" PostHistoryTypeId="2" PostId="4611" RevisionGUID="9f13e815-8ca7-465a-b883-95fe950930e8" CreationDate="2022-09-04T03:21:19.313" UserId="2034" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DKT4h.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/MQRpr.png&#xD;&#xA;&#xD;&#xA;As shown in these two pictures, I want to know the exact meaning of &quot;Prefix&quot; in the struct StroageValue, so I go to core::marker file by follow rust-analyzer's guidance, and search the word &quot;Prefix&quot;, but got nothing. So could anyone tell me why? And how to find the accurate define of the &quot;Prefix&quot; here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17239" PostHistoryTypeId="1" PostId="4611" RevisionGUID="9f13e815-8ca7-465a-b883-95fe950930e8" CreationDate="2022-09-04T03:21:19.313" UserId="2034" Text="How to find the define of Prefix in struct StrorageValue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17240" PostHistoryTypeId="3" PostId="4611" RevisionGUID="9f13e815-8ca7-465a-b883-95fe950930e8" CreationDate="2022-09-04T03:21:19.313" UserId="2034" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17241" PostHistoryTypeId="2" PostId="4612" RevisionGUID="2bffe51f-5e47-4b96-a851-0b7e7d3d23c1" CreationDate="2022-09-04T04:55:03.733" UserId="251" Text="At the pallet level, `Prefix` is a generic or you can understand it as a placeholder.&#xD;&#xA;&#xD;&#xA;When you finally construct the pallet in `construct_runtime!`, the name is its prefix.&#xD;&#xA;&#xD;&#xA;For example, https://github.com/paritytech/substrate/blob/78bff0efb83b8b3cff1d09561c335c9b76504066/bin/node-template/runtime/src/lib.rs#L286. `pallet_balance` use `Balance` as its prefix here.&#xD;&#xA;&#xD;&#xA;Actually, it is `twox128(b&quot;Balance&quot;)` in storage. It needs one hash.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Use [subalfred](https://subalfred.hack.ink/user/cli/storage-key.html) you could easily get the storage key.&#xD;&#xA;&#xD;&#xA;Or use PolkadotApps navigate to the chain state page." ContentLicense="CC BY-SA 4.0" />
  <row Id="17243" PostHistoryTypeId="2" PostId="4613" RevisionGUID="20c31cd1-7531-45d0-bbd7-75341cafa309" CreationDate="2022-09-04T04:59:28.397" UserId="251" Text="Check [awesome-substrate](https://github.com/substrate-developer-hub/awesome-substrate). You could search `explorer` on that page. For any other requirements, you could always search here first.&#xD;&#xA;&#xD;&#xA;You missed these:&#xD;&#xA;- https://wiki.polkadot.network/docs/build-tools-index#block-explorers&#xD;&#xA;  - https://dotscanner.com/?utm_source=polkadot_wiki&#xD;&#xA;- https://explorer.polkascan.io&#xD;&#xA;- https://polkaholic.io/#chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="17245" PostHistoryTypeId="5" PostId="4612" RevisionGUID="3a19335c-ad24-4eb7-9a7d-e6fd82ff01dd" CreationDate="2022-09-04T05:09:03.923" UserId="251" Comment="added 94 characters in body" Text="At the pallet level, `Prefix` is a generic or you can understand it as a placeholder.&#xD;&#xA;&#xD;&#xA;When you finally construct the pallet in `construct_runtime!`, the name is its prefix.&#xD;&#xA;&#xD;&#xA;For example, https://github.com/paritytech/substrate/blob/78bff0efb83b8b3cff1d09561c335c9b76504066/bin/node-template/runtime/src/lib.rs#L286. `pallet_balance` use `Balance` as its prefix here.&#xD;&#xA;&#xD;&#xA;Actually, it is `twox128(b&quot;Balance&quot;)` in storage. It needs one hash.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Use [subalfred](https://subalfred.hack.ink/user/cli/storage-key.html) you could easily get the storage key.&#xD;&#xA;&#xD;&#xA;Or use PolkadotApps to navigate to the chain state page.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NGr2A.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17252" PostHistoryTypeId="4" PostId="4610" RevisionGUID="92448891-738b-4e52-9934-26ffbcfb3f2a" CreationDate="2022-09-04T11:19:39.757" UserId="28" Comment="edited tags; edited title" Text="Substrate Blockchain Explorers" ContentLicense="CC BY-SA 4.0" />
  <row Id="17253" PostHistoryTypeId="6" PostId="4610" RevisionGUID="92448891-738b-4e52-9934-26ffbcfb3f2a" CreationDate="2022-09-04T11:19:39.757" UserId="28" Comment="edited tags; edited title" Text="|cross-chain-explorers|explorer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17254" PostHistoryTypeId="52" PostId="4610" RevisionGUID="ecc46a5e-9521-4c68-818a-f26e0d8a2df6" CreationDate="2022-09-04T11:20:12.723" />
  <row Id="17256" PostHistoryTypeId="2" PostId="4615" RevisionGUID="62b6b57c-00b6-4fcd-a8dc-c4fe9851963a" CreationDate="2022-09-04T18:29:00.797" UserId="2548" Text="I am looking to learn to benchmark. Except for the official documentation, I did not find much information/examples.&#xD;&#xA;&#xD;&#xA;Can you please help me with examples/articles?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="17258" PostHistoryTypeId="1" PostId="4615" RevisionGUID="62b6b57c-00b6-4fcd-a8dc-c4fe9851963a" CreationDate="2022-09-04T18:29:00.797" UserId="2548" Text="Lack of Benchmarking information!" ContentLicense="CC BY-SA 4.0" />
  <row Id="17259" PostHistoryTypeId="3" PostId="4615" RevisionGUID="62b6b57c-00b6-4fcd-a8dc-c4fe9851963a" CreationDate="2022-09-04T18:29:00.797" UserId="2548" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17260" PostHistoryTypeId="2" PostId="4616" RevisionGUID="c7d6ac61-1521-4af3-be83-512b0c5c593b" CreationDate="2022-09-04T19:29:00.163" UserId="28" Text="&gt; the official documentation&#xD;&#xA;&#xD;&#xA;Seems like a pretty good place to learn about benchmarking to me:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/tree/master/frame/benchmarking&#xD;&#xA;&#xD;&#xA;Beyond that:&#xD;&#xA;&#xD;&#xA;- 3 Hour Video on Benchmarking: https://youtu.be/Qa6sTyUqgek&#xD;&#xA;- Nearly every pallet in FRAME folder has some benchmarks you can use as reference:&#xD;&#xA;    - https://github.com/paritytech/substrate/tree/master/frame" ContentLicense="CC BY-SA 4.0" />
  <row Id="17262" PostHistoryTypeId="2" PostId="4617" RevisionGUID="66324c38-7ed4-4aa3-bf1c-acbfbe0f5aad" CreationDate="2022-09-04T21:57:18.723" UserId="2471" Text="I want to expose an RPC/WS endpoints publicly. What mesures should I take into consideration?&#xD;&#xA;Should I just expose RPC/WS using substrate options  --unsafe-rpc-external --unsafe-ws-external?&#xD;&#xA;&#xD;&#xA;But as I understand  --unsafe-rpc-external --unsafe-ws-external are not safe so how to expose ws and rpc safely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17264" PostHistoryTypeId="1" PostId="4617" RevisionGUID="66324c38-7ed4-4aa3-bf1c-acbfbe0f5aad" CreationDate="2022-09-04T21:57:18.723" UserId="2471" Text="exposing RPC/ws publicaly" ContentLicense="CC BY-SA 4.0" />
  <row Id="17265" PostHistoryTypeId="3" PostId="4617" RevisionGUID="66324c38-7ed4-4aa3-bf1c-acbfbe0f5aad" CreationDate="2022-09-04T21:57:18.723" UserId="2471" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17266" PostHistoryTypeId="4" PostId="4615" RevisionGUID="3d6a2e7d-2ed6-49fa-9081-9a77116ccbb8" CreationDate="2022-09-04T23:15:20.417" UserId="28" Comment="edited title" Text="Examples of Substrate Benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="17267" PostHistoryTypeId="2" PostId="4618" RevisionGUID="301aa0e8-eb7c-44a2-9cae-c73740b961d6" CreationDate="2022-09-04T23:25:43.227" UserId="3120" Text="    pub fn send(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            address : String&#xD;&#xA;        ) -&gt; Result&lt;()&gt; {&#xD;&#xA;    //some type conversion address-&gt;account&#xD;&#xA;&#xD;&#xA;    self.env().transfer(account, value)&#xD;&#xA;&#xD;&#xA;I want to write methods like this.&#xD;&#xA;but there's no type conversion String -&gt; AccountId in AccountId trait.&#xD;&#xA;How can i do this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17269" PostHistoryTypeId="1" PostId="4618" RevisionGUID="301aa0e8-eb7c-44a2-9cae-c73740b961d6" CreationDate="2022-09-04T23:25:43.227" UserId="3120" Text="ink contract string to AccountId conversion" ContentLicense="CC BY-SA 4.0" />
  <row Id="17270" PostHistoryTypeId="3" PostId="4618" RevisionGUID="301aa0e8-eb7c-44a2-9cae-c73740b961d6" CreationDate="2022-09-04T23:25:43.227" UserId="3120" Text="|substrate-node|ink|smart-contract|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17271" PostHistoryTypeId="2" PostId="4619" RevisionGUID="22204790-f383-4c95-9ba7-2e80eb90d7d8" CreationDate="2022-09-05T01:42:03.730" UserId="251" Text="Use `--rpc-external`(http) or `--ws-external`(ws).&#xD;&#xA;&#xD;&#xA;`--unsafe-x-external` is designed for the validator/collator node. It is not recommended to expose the endpoints of an authority node. If you want to do that, use these two flags." ContentLicense="CC BY-SA 4.0" />
  <row Id="17273" PostHistoryTypeId="5" PostId="4619" RevisionGUID="97322f85-a537-4e39-ad3b-42b5840a6ef6" CreationDate="2022-09-05T03:09:46.717" UserId="251" Comment="added 14 characters in body" Text="Use `--rpc-external`(http) or `--ws-external`(ws).&#xD;&#xA;&#xD;&#xA;`--unsafe-x-external` is designed for the validator/collator node. It is not recommended to expose the endpoints of an authority node. If you want to do that anyway, use these two unsafe flags.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Why unsafe?&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;- `author_insertKeys` call will generate session keys files in your disk&#xD;&#xA;- `state_getStoragePaged` is a recursive query call, which will use lots of performance(CPU/MEM)&#xD;&#xA;&#xD;&#xA;Tips: `--rpc-method auto/unsafe` provides more controlling options at a different level." ContentLicense="CC BY-SA 4.0" />
  <row Id="17274" PostHistoryTypeId="5" PostId="4619" RevisionGUID="b454ed93-9d19-4773-89e0-aeb93dcc575d" CreationDate="2022-09-05T03:15:35.247" UserId="251" Comment="added 1 character in body" Text="Use `--rpc-external`(http) or `--ws-external`(ws).&#xD;&#xA;&#xD;&#xA;`--unsafe-x-external` is designed for the validator/collator node. It is not recommended to expose the endpoints of an authority node. If you want to do that anyway, use these two unsafe flags.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Why unsafe?&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;- `author_insertKeys` call will generate session keys files in your disk&#xD;&#xA;- `state_getStoragePaged` is a recursive query call, which will cost lots of performance(CPU/MEM)&#xD;&#xA;&#xD;&#xA;Tips: `--rpc-method auto/unsafe` provides more controlling options at a different level." ContentLicense="CC BY-SA 4.0" />
  <row Id="17275" PostHistoryTypeId="2" PostId="4620" RevisionGUID="2969cfd9-3171-432b-ad12-600535b678a4" CreationDate="2022-09-05T04:58:32.617" UserId="252" Text="I use the [substrate-developer-hub/substrate-node-template version: polkadot-v0.9.26][1] for practice.&#xD;&#xA;&#xD;&#xA;When I run `cargo build --release`&#xD;&#xA;&#xD;&#xA;I got error:  &#xD;&#xA;  invalid output constraint '=@ccz' in asm : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;details:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Building [=======================&gt; ] 954/964: librocksdb-sys(build)&#xD;&#xA;&#xD;&#xA;The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;warning: snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm warning: : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal)); warning: ^ warning: 1 error generated.&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for librocksdb-sys v0.6.1+6.28.2&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;&#xD;&#xA;CARGO_CFG_TARGET_FEATURE = Some(&quot;cmpxchg16b,fxsr,llvm14-builtins-abi,sse,sse2,sse3,ssse3&quot;) running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy-sinksource.o&quot; &quot;-c&quot; &quot;snappy/snappy-sinksource.cc&quot; running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy.o&quot; &quot;-c&quot; &quot;snappy/snappy.cc&quot; running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy-c.o&quot; &quot;-c&quot; &quot;snappy/snappy-c.cc&quot; exit status: 0 exit status: 0 cargo:warning=snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm cargo:warning= : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal)); cargo:warning= ^ cargo:warning=1 error generated. exit status: 1&#xD;&#xA;&#xD;&#xA;--- stderr&#xD;&#xA;&#xD;&#xA;error occurred: Command &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy.o&quot; &quot;-c&quot; &quot;snappy/snappy.cc&quot; with args &quot;c++&quot; did not execute successfully (status code exit status: 1).&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/tree/autoupdate_polkadot-v0.9.26_2022-07-28_10-17-23" ContentLicense="CC BY-SA 4.0" />
  <row Id="17277" PostHistoryTypeId="1" PostId="4620" RevisionGUID="2969cfd9-3171-432b-ad12-600535b678a4" CreationDate="2022-09-05T04:58:32.617" UserId="252" Text="Build RocksDB failed at snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm in MacOS while installing substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="17278" PostHistoryTypeId="3" PostId="4620" RevisionGUID="2969cfd9-3171-432b-ad12-600535b678a4" CreationDate="2022-09-05T04:58:32.617" UserId="252" Text="|rocks-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17279" PostHistoryTypeId="5" PostId="4620" RevisionGUID="6a4c3fd8-335d-4d1c-a01b-b21de4c00b89" CreationDate="2022-09-05T06:09:17.880" UserId="252" Comment="append tool chain version info" Text="I use the [substrate-developer-hub/substrate-node-template version: polkadot-v0.9.26][1] for practice.&#xD;&#xA;&#xD;&#xA;When I run `cargo build --release`&#xD;&#xA;&#xD;&#xA;I got error:  &#xD;&#xA;  invalid output constraint '=@ccz' in asm : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;details:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Building [=======================&gt; ] 954/964: librocksdb-sys(build)&#xD;&#xA;&#xD;&#xA;The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;warning: snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm warning: : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal)); warning: ^ warning: 1 error generated.&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for librocksdb-sys v0.6.1+6.28.2&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;&#xD;&#xA;CARGO_CFG_TARGET_FEATURE = Some(&quot;cmpxchg16b,fxsr,llvm14-builtins-abi,sse,sse2,sse3,ssse3&quot;) running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy-sinksource.o&quot; &quot;-c&quot; &quot;snappy/snappy-sinksource.cc&quot; running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy.o&quot; &quot;-c&quot; &quot;snappy/snappy.cc&quot; running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy-c.o&quot; &quot;-c&quot; &quot;snappy/snappy-c.cc&quot; exit status: 0 exit status: 0 cargo:warning=snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm cargo:warning= : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal)); cargo:warning= ^ cargo:warning=1 error generated. exit status: 1&#xD;&#xA;&#xD;&#xA;--- stderr&#xD;&#xA;&#xD;&#xA;error occurred: Command &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy.o&quot; &quot;-c&quot; &quot;snappy/snappy.cc&quot; with args &quot;c++&quot; did not execute successfully (status code exit status: 1).&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My MacOS version: 10.15.1&#xD;&#xA;```&#xD;&#xA; cmake --version&#xD;&#xA;cmake version 3.24.1&#xD;&#xA;&#xD;&#xA; clang --version&#xD;&#xA;Apple clang version 11.0.0 (clang-1100.0.33.12)&#xD;&#xA;Target: x86_64-apple-darwin19.0.0&#xD;&#xA;&#xD;&#xA; lldb --version&#xD;&#xA;lldb-1100.0.30.6&#xD;&#xA;Apple Swift version 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9)&#xD;&#xA;&#xD;&#xA;rustup show:&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-apple-darwin (default)&#xD;&#xA;nightly-2021-01-13-x86_64-apple-darwin&#xD;&#xA;nightly-2021-09-08-x86_64-apple-darwin&#xD;&#xA;nightly-x86_64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-apple-darwin&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-apple-darwin (default)&#xD;&#xA;rustc 1.63.0 (4b91a6ea7 2022-08-08)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Last time  when I practised the node-template, I downloaded the node-template, 4.0.0-dev, branch = &quot;polkadot-v0.9.17&quot;. It's ok.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/tree/autoupdate_polkadot-v0.9.26_2022-07-28_10-17-23" ContentLicense="CC BY-SA 4.0" />
  <row Id="17280" PostHistoryTypeId="2" PostId="4621" RevisionGUID="be6bb1e7-bc42-4fc0-9f9c-9f4ed0de0bdf" CreationDate="2022-09-05T06:17:36.333" UserId="252" Text="I search for half a day. From [here][1] and [here][2] I got some information.&#xD;&#xA;&#xD;&#xA;I find the exact file of snappy.cc in the `CLion` IDE. and change the piece of code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#if defined(__GNUC__) &amp;&amp; defined(__x86_64__)    // delete&#xD;&#xA;#if defined(__GCC_ASM_FLAG_OUTPUTS__) &amp;&amp; defined(__x86_64__)   // add this line, change the '__GNUC__' to '__GCC_ASM_FLAG_OUTPUTS__'&#xD;&#xA;  // TODO clang misses the fact that the (c &amp; 3) already correctly&#xD;&#xA;  // sets the zero flag.&#xD;&#xA;  asm(&quot;and $3, %k[tag_type]\n\t&quot;&#xD;&#xA;      : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal));&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://groups.google.com/g/snappy-compression/c/-AVUHVOf_OQ&#xD;&#xA;  [2]: https://github.com/google/snappy/commit/8dd58a519f79f0742d4c68fbccb2aed2ddb651e8" ContentLicense="CC BY-SA 4.0" />
  <row Id="17282" PostHistoryTypeId="5" PostId="4621" RevisionGUID="19cc8d25-4b87-4368-8fe5-ea5f3331f4d2" CreationDate="2022-09-05T06:29:15.123" UserId="252" Comment="added 229 characters in body" Text="I search for half a day. From [here][1] and [here][2] I got some information.&#xD;&#xA;&#xD;&#xA;I find the exact file of `librocksdb-sys-0.6.1+6.28.2/snappy/snappy.cc` in the help of `CLion` IDE, which is referenced by the current `node-template` project, and change the piece of code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#if defined(__GNUC__) &amp;&amp; defined(__x86_64__)    // delete&#xD;&#xA;#if defined(__GCC_ASM_FLAG_OUTPUTS__) &amp;&amp; defined(__x86_64__)   // add this line, change the '__GNUC__' to '__GCC_ASM_FLAG_OUTPUTS__'&#xD;&#xA;  // TODO clang misses the fact that the (c &amp; 3) already correctly&#xD;&#xA;  // sets the zero flag.&#xD;&#xA;  asm(&quot;and $3, %k[tag_type]\n\t&quot;&#xD;&#xA;      : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal));&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems that `librocksdb` reference the `snappy` by the source code. I directly change the code as per the solution [here][2]. Then compile the node-template code, it is successful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://groups.google.com/g/snappy-compression/c/-AVUHVOf_OQ&#xD;&#xA;  [2]: https://github.com/google/snappy/commit/8dd58a519f79f0742d4c68fbccb2aed2ddb651e8" ContentLicense="CC BY-SA 4.0" />
  <row Id="17283" PostHistoryTypeId="2" PostId="4622" RevisionGUID="1274678e-9c29-4bdf-a263-fdafed887bbe" CreationDate="2022-09-05T06:36:43.630" UserId="167" Text="Your setup actually looks correct. What you have to do next is to make sure you call into the exact same functions as a real runtime when you execute a transaction. &#xD;&#xA;&#xD;&#xA;In reality, this happens in `frame-executive` and in [`fn apply_extrinsic`](https://github.com/paritytech/substrate/blob/9428b0ea492d405f320753fcd93bc59ebb3bf33b/frame/executive/src/lib.rs#L434). To mirror that into your test setup:&#xD;&#xA;&#xD;&#xA;1. You probably want to skip signature verification, so you need a stub that will naively concert `UncheckedExtrinsic` to `CheckedExtrinsic` for you.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn check(uxt: UncheckedExtrinsic) -&gt; CheckedExtrinsic {&#xD;&#xA;  // should just map the fields one to one. &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Then, you can imitate what the executive does: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn dispatch(uxt: UncheckedExtrinsic) {&#xD;&#xA;  let xt = check(uxt); &#xD;&#xA;  let encoded_len = xt.encoded_size();&#xD;&#xA;  let dispatch_info = xt.get_dispatch_info();&#xD;&#xA;  let r = Applyable::apply::&lt;_&gt;(xt, &amp;dispatch_info, encoded_len)?;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Some other relevant types implementations: &#xD;&#xA;&#xD;&#xA;1. [`Applyable`](https://paritytech.github.io/substrate/master/sp_runtime/traits/trait.Applyable.html).&#xD;&#xA;2. [`Checkable`](https://paritytech.github.io/substrate/master/sp_runtime/traits/trait.Checkable.html).&#xD;&#xA;3. [`GetDispatchInfo`](https://paritytech.github.io/substrate/master/frame_support/weights/trait.GetDispatchInfo.html)&#xD;&#xA;&#xD;&#xA;Note that you have opted to use the real `generic::UncheckedExtrinsic` in your example, but you can probably do it with [`TestXt`](https://paritytech.github.io/substrate/master/sp_runtime/testing/struct.TestXt.html) as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="17285" PostHistoryTypeId="2" PostId="4623" RevisionGUID="3aea5b6e-627b-4d13-9031-5cbb168d563b" CreationDate="2022-09-05T06:39:17.280" UserId="2467" Text="I have been reading about Polkadot transaction fees (https://wiki.polkadot.network/docs/learn-transaction-fees) and understand at a high level the weight-based model, and that this is calculated prior to the transaction vs. a benchmark, as opposed to gas metering which is calculated differently, but they are both still transaction fees, correct? Albeit Polkadot's are cheaper and less variable? &#xD;&#xA;Is it accurate then to say that Polkadot is &quot;gas-less&quot;, but not &quot;fee-less&quot;? - as I have heard the former attributed to Polkadot and it confused me. &#xD;&#xA;Thank you!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17287" PostHistoryTypeId="1" PostId="4623" RevisionGUID="3aea5b6e-627b-4d13-9031-5cbb168d563b" CreationDate="2022-09-05T06:39:17.280" UserId="2467" Text="Polkadot transaction fees weight based vs. gas model e.g. Ethereum" ContentLicense="CC BY-SA 4.0" />
  <row Id="17288" PostHistoryTypeId="3" PostId="4623" RevisionGUID="3aea5b6e-627b-4d13-9031-5cbb168d563b" CreationDate="2022-09-05T06:39:17.280" UserId="2467" Text="|transactions|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17289" PostHistoryTypeId="5" PostId="4620" RevisionGUID="d199d594-b742-44cd-b17f-c8d579dd1842" CreationDate="2022-09-05T06:48:31.617" UserId="252" Comment="added 694 characters in body" Text="I use the [substrate-developer-hub/substrate-node-template version: polkadot-v0.9.26][1] for practice.&#xD;&#xA;&#xD;&#xA;When I run `cargo build --release`&#xD;&#xA;&#xD;&#xA;I got error:  &#xD;&#xA;  invalid output constraint '=@ccz' in asm : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;details:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Building [=======================&gt; ] 954/964: librocksdb-sys(build)&#xD;&#xA;&#xD;&#xA;The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;warning: snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm warning: : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal)); warning: ^ warning: 1 error generated.&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for librocksdb-sys v0.6.1+6.28.2&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;&#xD;&#xA;CARGO_CFG_TARGET_FEATURE = Some(&quot;cmpxchg16b,fxsr,llvm14-builtins-abi,sse,sse2,sse3,ssse3&quot;) running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy-sinksource.o&quot; &quot;-c&quot; &quot;snappy/snappy-sinksource.cc&quot; running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy.o&quot; &quot;-c&quot; &quot;snappy/snappy.cc&quot; running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy-c.o&quot; &quot;-c&quot; &quot;snappy/snappy-c.cc&quot; exit status: 0 exit status: 0 cargo:warning=snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm cargo:warning= : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal)); cargo:warning= ^ cargo:warning=1 error generated. exit status: 1&#xD;&#xA;&#xD;&#xA;--- stderr&#xD;&#xA;&#xD;&#xA;error occurred: Command &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-arch&quot; &quot;x86_64&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-std=c++11&quot; &quot;-DNDEBUG=1&quot; &quot;-o&quot; &quot;/Users/anweshnayak/Documents/projects/polkadot/parity/substrate-dev-hub/substrate-node-template/target/release/build/librocksdb-sys-0e318981b983f350/out/snappy/snappy.o&quot; &quot;-c&quot; &quot;snappy/snappy.cc&quot; with args &quot;c++&quot; did not execute successfully (status code exit status: 1).&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My MacOS version: 10.15.1&#xD;&#xA;```&#xD;&#xA; cmake --version&#xD;&#xA;cmake version 3.24.1&#xD;&#xA;&#xD;&#xA; clang --version&#xD;&#xA;Apple clang version 11.0.0 (clang-1100.0.33.12)&#xD;&#xA;Target: x86_64-apple-darwin19.0.0&#xD;&#xA;&#xD;&#xA; lldb --version&#xD;&#xA;lldb-1100.0.30.6&#xD;&#xA;Apple Swift version 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9)&#xD;&#xA;&#xD;&#xA; gcc --version&#xD;&#xA;Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1&#xD;&#xA;Apple clang version 11.0.0 (clang-1100.0.33.12)&#xD;&#xA;Target: x86_64-apple-darwin19.0.0&#xD;&#xA;Thread model: posix&#xD;&#xA;InstalledDir: /Library/Developer/CommandLineTools/usr/bin&#xD;&#xA;&#xD;&#xA; g++ --version&#xD;&#xA;Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1&#xD;&#xA;Apple clang version 11.0.0 (clang-1100.0.33.12)&#xD;&#xA;Target: x86_64-apple-darwin19.0.0&#xD;&#xA;Thread model: posix&#xD;&#xA;InstalledDir: /Library/Developer/CommandLineTools/usr/bin&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;rustup show:&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-apple-darwin (default)&#xD;&#xA;nightly-2021-01-13-x86_64-apple-darwin&#xD;&#xA;nightly-2021-09-08-x86_64-apple-darwin&#xD;&#xA;nightly-x86_64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-apple-darwin&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-apple-darwin (default)&#xD;&#xA;rustc 1.63.0 (4b91a6ea7 2022-08-08)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Last time  when I practised the node-template, I downloaded the node-template, 4.0.0-dev, branch = &quot;polkadot-v0.9.17&quot;. It's ok.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/tree/autoupdate_polkadot-v0.9.26_2022-07-28_10-17-23" ContentLicense="CC BY-SA 4.0" />
  <row Id="17290" PostHistoryTypeId="2" PostId="4624" RevisionGUID="4fa25a4f-709d-4be6-81ff-bcd13b63bb63" CreationDate="2022-09-05T06:58:59.377" UserId="3121" Text="https://docs.substrate.io/tutorials/get-started/simulate-network/&#xD;&#xA;&#xD;&#xA;While working on this tutorial, I decided to go beyond the Alice and Bob nodes and also started Charlie and Eve nodes. While adding Charlie worked fine and all three nodes recognized 2 peers, adding Eve did not do the same. Alice and Bob correctly recognized 3 peers, but Charlie and Eve only recognized 2. I used the names from the previous tutorial when accessing localhost:8000 from 'yarn start'.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \    &#xD;&#xA;--base-path /tmp/&lt;name&gt; \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the reason for this? It could very well be that my understanding of something if fundamentally wrong." ContentLicense="CC BY-SA 4.0" />
  <row Id="17292" PostHistoryTypeId="1" PostId="4624" RevisionGUID="4fa25a4f-709d-4be6-81ff-bcd13b63bb63" CreationDate="2022-09-05T06:58:59.377" UserId="3121" Text="Tutorial - Simulate a network: I've started 4 nodes (Alice/Bob/Charlie/Eve), but not all of the nodes show '3 peers'" ContentLicense="CC BY-SA 4.0" />
  <row Id="17293" PostHistoryTypeId="3" PostId="4624" RevisionGUID="4fa25a4f-709d-4be6-81ff-bcd13b63bb63" CreationDate="2022-09-05T06:58:59.377" UserId="3121" Text="|substrate-node|peers|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17294" PostHistoryTypeId="5" PostId="4624" RevisionGUID="4a50f3ec-4854-46aa-af19-54fcc6a1a748" CreationDate="2022-09-05T07:12:25.900" UserId="3121" Comment="added 178 characters in body" Text="https://docs.substrate.io/tutorials/get-started/simulate-network/&#xD;&#xA;&#xD;&#xA;While working on this tutorial, I decided to go beyond the Alice and Bob nodes and also started Charlie and Eve nodes. While adding Charlie worked fine and all three nodes recognized 2 peers, adding Eve did not do the same. Alice and Bob correctly recognized 3 peers, but Charlie and Eve only recognized 2. I used the names from the previous tutorial when accessing localhost:8000 from 'yarn start'.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \    &#xD;&#xA;--base-path /tmp/&lt;name&gt; \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the reason for this? It could very well be that my understanding of something if fundamentally wrong.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GDDHA.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/0ThPa.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17295" PostHistoryTypeId="2" PostId="4625" RevisionGUID="cc703b72-803f-45b2-8abe-b163eb01bdfd" CreationDate="2022-09-05T07:31:28.067" UserId="2749" Text="The substrate node consists of 2 parts: [runtime and outer node (or node client)][1].&#xD;&#xA;&#xD;&#xA;The Substrate has [forkless upgrade][2] functionality for the runtime updates. Sometimes [node client should be updated first][3] to support the next runtime version. Usually, it is because of new host functions. [Example][4].&#xD;&#xA;&#xD;&#xA;Having the fact that the node client should be able to sync from the scratch (it means that it should be compatible with any runtime version), am I correct that if I need to update the node client and node runtime from [0.9.0][4] to [0.9.16][5] I can update node client to the latest version 0.9.16 and apply all node runtimes (from 0.9.1 to 0.9.16) skipping intermediate node client updates? Or node client has some data migrations (or something similar) under the hood so it is better not to skip versions and apply node client updates one by one?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/fundamentals/architecture/&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/get-started/forkless-upgrade/&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/learn-runtime-upgrades#new-client-releases&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/releases/tag/v0.9.0&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot/releases/tag/v0.9.16" ContentLicense="CC BY-SA 4.0" />
  <row Id="17297" PostHistoryTypeId="1" PostId="4625" RevisionGUID="cc703b72-803f-45b2-8abe-b163eb01bdfd" CreationDate="2022-09-05T07:31:28.067" UserId="2749" Text="Skipping node client's intermediate versions" ContentLicense="CC BY-SA 4.0" />
  <row Id="17298" PostHistoryTypeId="3" PostId="4625" RevisionGUID="cc703b72-803f-45b2-8abe-b163eb01bdfd" CreationDate="2022-09-05T07:31:28.067" UserId="2749" Text="|substrate-node|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17299" PostHistoryTypeId="2" PostId="4626" RevisionGUID="3a02de14-5035-4c45-90ab-47e2eaba284d" CreationDate="2022-09-05T07:57:36.177" UserId="2809" Text="Needed to implement this for DealWithFees as well&#xD;&#xA;```&#xD;&#xA;fn on_nonzero_unbalanced(amount: NegativeImbalance&lt;R&gt;) {}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17301" PostHistoryTypeId="2" PostId="4627" RevisionGUID="d2c87346-0ef0-4e2a-9600-d98b12c02732" CreationDate="2022-09-05T08:01:17.463" UserId="2884" Text="Currently to process an XCM message in my own pallet call, I inherit the config of my pallet from frame_system + pallet_xcm to have a representable origin:&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_xcm::Config {&#xD;&#xA;		...&#xD;&#xA;		// We need a specified origin to be used with the functions of the pallet_xcm that take an origin&#xD;&#xA;		type Origin: From&lt;&lt;Self as frame_system::Config&gt;::Origin&gt;&#xD;&#xA;		+ Into&lt;Result&lt;XcmOrigin, &lt;Self as Config&gt;::Origin&gt;&gt; + Debug;&#xD;&#xA;		...&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;After this I can call a function like ensure_xcm from the pallet_xcm like this:&#xD;&#xA;&#xD;&#xA;    ensure_xcm(&lt;T as Config&gt;::Origin::from(origin))&#xD;&#xA;&#xD;&#xA;My problem is that ensure_xcm gets the origin as the parachain id, but I want the account that created the xcm message in the first place, not just the parachain.&#xD;&#xA;It this possible?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17303" PostHistoryTypeId="1" PostId="4627" RevisionGUID="d2c87346-0ef0-4e2a-9600-d98b12c02732" CreationDate="2022-09-05T08:01:17.463" UserId="2884" Text="How to see account id origin when receiving an XCM message. Currently the origin contains the parachain id" ContentLicense="CC BY-SA 4.0" />
  <row Id="17304" PostHistoryTypeId="3" PostId="4627" RevisionGUID="d2c87346-0ef0-4e2a-9600-d98b12c02732" CreationDate="2022-09-05T08:01:17.463" UserId="2884" Text="|pallet|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17309" PostHistoryTypeId="2" PostId="4629" RevisionGUID="88f50d0e-9367-42c3-a748-dbc467208492" CreationDate="2022-09-05T08:57:04.710" UserId="2673" Text="I assume the question is: &quot;How to parse `AccountId` from `String` in an ink contract method?&quot;&#xD;&#xA;&#xD;&#xA;First, I would reconsider if this is actually needed. Why not make the method parameter to be of type `AccountId`?&#xD;&#xA;&#xD;&#xA;In a contract code one is not limited to methods from the `AccountId` trait, but can use other methods implemented by the concrete type being used in the environment. The `AccountId` type is configurable, so one could provide a type with appropriate method for parsing strings. E.g. `sp_runtime::AccountId32` has a [`FromStr` implementation](https://paritytech.github.io/substrate/master/sp_runtime/struct.AccountId32.html#impl-FromStr-for-AccountId32)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17312" PostHistoryTypeId="2" PostId="4630" RevisionGUID="6c39aa5e-9281-4f1f-b90b-ae305d76d615" CreationDate="2022-09-05T11:54:33.100" UserId="74" Text="It sounds like you'll have to construct a custom XCM that encodes, as a message parameter, the creator of the message. As you've remarked, the message origin is always the parachain ID.&#xD;&#xA;&#xD;&#xA;This can be described throughout this XCM format spec: https://github.com/paritytech/xcm-format. Here the origin as always a `MultiLocation`, since messages come from specific locations and thus can't be externally-owned accounts as far as I know.&#xD;&#xA;&#xD;&#xA;You could implement and send a `Tranasct` XCM in combination with a specific extrinsic that allows you to dispatch and process such XCMs across chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="17314" PostHistoryTypeId="2" PostId="4631" RevisionGUID="180f9b55-5f22-4a41-9746-1c9cf2f60df5" CreationDate="2022-09-05T12:08:46.600" UserId="2581" Text="api.query.staking.erasRewardPoints(era) query returns reward history for selected era.&#xD;&#xA;And only last 84 eras reward history is available.&#xD;&#xA;I want to get reward history from first era.&#xD;&#xA;How can I get reward history for all eras?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17316" PostHistoryTypeId="1" PostId="4631" RevisionGUID="180f9b55-5f22-4a41-9746-1c9cf2f60df5" CreationDate="2022-09-05T12:08:46.600" UserId="2581" Text="Past reward history in polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="17317" PostHistoryTypeId="3" PostId="4631" RevisionGUID="180f9b55-5f22-4a41-9746-1c9cf2f60df5" CreationDate="2022-09-05T12:08:46.600" UserId="2581" Text="|polkadot-js|kusama|era|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17318" PostHistoryTypeId="2" PostId="4632" RevisionGUID="c192f1ed-80bf-4a35-ae2c-343216e80cb6" CreationDate="2022-09-05T12:10:19.347" UserId="2985" Text="I was looking for an option to set a name for keys in both relay_chain &amp; parachain_template&#xD;&#xA;&#xD;&#xA;For that, I was trying to generate new keys from relay_chain &amp; parachain_template of v0.9.28&#xD;&#xA;&#xD;&#xA;where I can able to generate new keys at the relay_chain template in v0.9.28&#xD;&#xA;with the following command.&#xD;&#xA;`/target/release/Polkadot key generate --scheme Sr25519 --password-interactive` &#xD;&#xA;&#xD;&#xA;In parachain_template ie., v0.9.28, I can't able generate new keys even if I specify the correct path command&#xD;&#xA;`/target/release/parachain-template-node key generate --scheme Sr25519 --password-interactive` &#xD;&#xA;why does this happen?&#xD;&#xA;&#xD;&#xA;kindly can anyone let me know how to solve this query.&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17320" PostHistoryTypeId="1" PostId="4632" RevisionGUID="c192f1ed-80bf-4a35-ae2c-343216e80cb6" CreationDate="2022-09-05T12:10:19.347" UserId="2985" Text="how to set a name to newly generated keys at relay_chain &amp; parachain_template for v0.9.28" ContentLicense="CC BY-SA 4.0" />
  <row Id="17321" PostHistoryTypeId="3" PostId="4632" RevisionGUID="c192f1ed-80bf-4a35-ae2c-343216e80cb6" CreationDate="2022-09-05T12:10:19.347" UserId="2985" Text="|polkadot|parachain|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17322" PostHistoryTypeId="2" PostId="4633" RevisionGUID="77dc7138-5ab5-419e-b162-f437f2fce26e" CreationDate="2022-09-05T12:40:15.190" UserId="251" Text="It depends on if you have configured it for your CLI.&#xD;&#xA;&#xD;&#xA;Example: https://github.com/paritytech/substrate/blob/58d3bc67b9595d0a26f5abba88fe4941a6e75b4a/bin/node/cli/src/cli.rs#L64-L66&#xD;&#xA;&#xD;&#xA;For Polkadot, yes.&#xD;&#xA;&#xD;&#xA;For Parachain-Template, nope.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;But it is simply just a CLI tool. You could extend your CLI with it or you could use the subkey directly. They are the same usage.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/tree/master/bin/utils/subkey" ContentLicense="CC BY-SA 4.0" />
  <row Id="17324" PostHistoryTypeId="2" PostId="4634" RevisionGUID="49e0a115-e93d-4f02-a9bb-e6d36434a5e2" CreationDate="2022-09-05T12:53:22.450" UserId="452" Text="The data for the current state of GRANDPA is stored outside the runtime in local storage. It's important to take into account that even though GRANDPA gets its authorities from the chain and its purpose is to finalize said chain, the protocol itself runs off-chain. The keys in your post are indeed the keys in local storage where the GRANDPA data is stored, and I think for your use-case just wiping those entries should work (as if it was genesis state). You should be able to use [this](https://github.com/paritytech/substrate/blob/master/client/service/src/client/client.rs#L2010-L2027) backend API to remove these keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="17326" PostHistoryTypeId="5" PostId="2272" RevisionGUID="74d56fe4-02dd-4bf1-a172-600e2c65a115" CreationDate="2022-09-05T13:58:10.337" UserId="234" Comment="Updating the links so they point to the new docs" Text="The transaction queue in Substrate has client side APIs that check for the validity of transactions and sorts them into two queues: the **ready** and **future** queues. Transactions in the *ready* queue are used to build the next block. And transactions end up in the *future* queue if they didn't satisfy some requirements to get added to the block but are still valid for the next block.&#xD;&#xA;&#xD;&#xA;&gt; When a transaction is submitted to the network, it is validated by a node and then gossiped to its peers and they will also validate the transaction and so on.&#xD;&#xA;&#xD;&#xA;Any transaction that's sent to a non-authoring node will just be gossiped to other nodes in the network and enter their transaction pool until it is received by an authoring node. Then, it will check if the transaction is valid and place it in order of transaction priority to include it in the block it broadcasts to the rest of the network. The other nodes receiving this block will then verify that it's properly constructed and once a majority reach consensus, the block is executed and state transitions are applied in the runtime.&#xD;&#xA;&#xD;&#xA;&gt; What is the process of a transaction being removed or dropped from a transaction pool.&#xD;&#xA;&#xD;&#xA;I'll take the opportunity here to provide a more detailed answer. &#xD;&#xA;&#xD;&#xA;## How transactions are validated&#xD;&#xA;&#xD;&#xA;Rules defined in the runtime helps the transaction pool determine whether a transaction is valid or not (using the [`transaction_validity` interface](https://paritytech.github.io/substrate/master/sp_runtime/transaction_validity/index.html)). Basically, the client then checks if a transaction is properly &quot;tagged&quot; with some validity characteristics, returning a `Result`. You can see what these look like from the `Ok()` case [`ValidTransaction`](https://paritytech.github.io/substrate/master/sp_runtime/transaction_validity/struct.ValidTransaction.html).&#xD;&#xA;To help perform these checks, Substrate uses a concept called **signed extensions**. They attach additional data to a transaction in the runtime side (see the existing [`SignedExtensions` in FRAME](https://github.com/paritytech/substrate/tree/master/frame/system/src/extensions)), which could really be thought of as a way to enforce the expected behaviour of a transaction. With them, the client can easily verify whatever these requirements are and accept or drop the transaction accordingly.&#xD;&#xA;&#xD;&#xA;### Transaction checks&#xD;&#xA;&#xD;&#xA;Any given transaction is &quot;tagged&quot; with a bunch of information that a transaction **requires** (i.e. properties that _must_ be satisfied before the transaction is added to a block, for example the nonce, the weight) and that it may **provide** (i.e. properties that will be satisfied once the transaction is added to a block, like a tip). &#xD;&#xA;&#xD;&#xA;The transaction queue has a runtime API, called [`TaggedTransactionQueue`](https://paritytech.github.io/substrate/master/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html) that makes regular calls to these signed extensions to *keep checking* that a transaction is valid before it gets put in the ready queue. Valid just means &quot;*everything that the runtime says that this transaction *requires* to be valid is there*&quot;. &#xD;&#xA;&#xD;&#xA;The mechanism of making repeated calls into the runtime is a useful safeguard for verifying that transactions won't fail in a block and to add anti-spam and replay protection logic.&#xD;&#xA;With this, a transaction is either accepted (returning [`ValidTransaction`](https://paritytech.github.io/substrate/master/sp_runtime/transaction_validity/struct.ValidTransaction.html)) or rejected (returning [`TransactionValidityError`](https://paritytech.github.io/substrate/master/sp_runtime/transaction_validity/enum.TransactionValidityError.html)).&#xD;&#xA;&#xD;&#xA;The flow from when a user connects to an application and submits a transaction, to when the `validate_transaction` interface is hit looks like this:&#xD;&#xA;&#xD;&#xA;[![transaction-process-1][1]][1]&#xD;&#xA;&#xD;&#xA;### Invalid transactions&#xD;&#xA;&#xD;&#xA;A transaction can be invalidated or dropped at different stages in the queue (its not so black and white though).&#xD;&#xA;For instance:&#xD;&#xA;* When a transaction is too large for a block and has exceeded the its required  era (it will be dropped from the future queue).&#xD;&#xA;* When a transaction doesn't contain a valid signature (it will be dropped immediately).&#xD;&#xA;* When a transaction in the queue is stale (as it's already been included in a block) it will be dropped from the verifying queue.&#xD;&#xA;* When a transaction is too large to fit in the current block, it will be put back in a queue for a new verification round.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Now that all has been checked, assuming the transaction is valid the [`ValidTransactionBuilder`](https://paritytech.github.io/substrate/master/sp_runtime/transaction_validity/struct.ValidTransactionBuilder.html) bundles the information previously verified and the transaction gets added to the _ready_ queue, where it's sorted by priority among other transactions in the queue for block authors to build the next block. Transactions get put in the _future_ queue if they haven't met all their requirements but still have valid longevity, so they can be revalidated.&#xD;&#xA;&#xD;&#xA;Have a look at the [API documentation](https://github.com/paritytech/substrate/tree/master/client/transaction-pool) for more details. Acknowledgements: huge thanks to Joyce for the helpful diagrams.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XgDxn.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZJ6Ik.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17327" PostHistoryTypeId="24" PostId="2272" RevisionGUID="74d56fe4-02dd-4bf1-a172-600e2c65a115" CreationDate="2022-09-05T13:58:10.337" Comment="Proposed by 234 approved by 34 edit id of 272" ContentLicense="CC BY-SA 4.0" />
  <row Id="17328" PostHistoryTypeId="5" PostId="4631" RevisionGUID="8deeda9b-54fb-4b4c-ad78-e7356aea0b94" CreationDate="2022-09-05T14:18:30.020" UserId="2581" Comment="added 13 characters in body" Text="```api.query.staking.erasRewardPoints(era)``` query returns reward history for selected era. &#xD;&#xA;&#xD;&#xA;And only last 84 eras reward history is available.&#xD;&#xA;&#xD;&#xA;I want to get reward history from first era.&#xD;&#xA;&#xD;&#xA;How can I get reward history for all eras?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17329" PostHistoryTypeId="5" PostId="4634" RevisionGUID="d863c8bf-58ea-478e-ba60-d97dd0da1d2d" CreationDate="2022-09-05T15:25:31.377" UserId="452" Comment="added 649 characters in body" Text="The data for the current state of GRANDPA is stored outside the runtime in local storage. It's important to take into account that even though GRANDPA gets its authorities from the chain and its purpose is to finalize said chain, the protocol itself runs off-chain. The keys in your post are indeed the keys in local storage where the GRANDPA data is stored, and I think for your use-case just wiping those entries should work (as if it was genesis state). You should be able to use [this](https://github.com/paritytech/substrate/blob/master/client/service/src/client/client.rs#L2010-L2027) backend API to remove these keys.&#xD;&#xA;&#xD;&#xA;Edit: In the meantime I looked at the GRANDPA pallet code and remembered something, the GRANDPA authorities are stored under a special runtime storage key (https://github.com/paritytech/substrate/blob/master/primitives/finality-grandpa/src/lib.rs#L60-L62). As you can see here: https://github.com/paritytech/substrate/blob/master/frame/grandpa/src/lib.rs#L412-L420. The reason this was done in the past was that we needed a stable key in order to be able to generate storage proofs for the GRANDPA authorities (which were useful for light clients). I believe if you also scrape this key when you export state then that should solve your problem." ContentLicense="CC BY-SA 4.0" />
  <row Id="17330" PostHistoryTypeId="5" PostId="4519" RevisionGUID="8b9dce41-ac74-4147-9efc-b124e743e585" CreationDate="2022-09-05T15:39:37.047" UserId="29" Comment="deleted 618 characters in body" Text="Yes it is possible to keep the paraId with overlapping slots by calling the registrar &gt; swap extrinsic.&#xD;&#xA;&#xD;&#xA;I agree that non-overlapping slots takes a bit of logistics and planning e.g. making sure you have time allocated for all aspects of securing a new slot (governance, auction, etc) and it is not guaranteed - you could lose the bid.&#xD;&#xA;&#xD;&#xA;Always make sure to test this process locally on a test network.&#xD;&#xA;&#xD;&#xA;More Info:&#xD;&#xA;- https://substrate.stackexchange.com/questions/2874/how-can-a-project-prolong-a-parachain-slot-lease-in-kusama/2887#2887&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17331" PostHistoryTypeId="2" PostId="4635" RevisionGUID="3e3e96d5-0183-4be1-8bfa-cfd023d6509b" CreationDate="2022-09-05T15:47:02.577" UserId="165" Text="I guess you already had somehow an answer here ? https://substrate.stackexchange.com/questions/3932/computing-deposits-in-polkadot&#xD;&#xA;&#xD;&#xA;Even though I don't think this is the answer you are going after; You want to call `deposit` on your runtime when you are looking for a more precise value depending on the number of elements and size you are expecting to maintain on storage. Though, you could configure any arbitrary value as a mean to avoid spam and bloat as long as they make sense and match the context they are being applied to." ContentLicense="CC BY-SA 4.0" />
  <row Id="17333" PostHistoryTypeId="52" PostId="4627" RevisionGUID="513eeff3-251f-4510-b937-7009b1e86fd9" CreationDate="2022-09-05T16:03:47.237" />
  <row Id="17334" PostHistoryTypeId="5" PostId="2887" RevisionGUID="b9693707-70a1-49d2-8dd2-a47b56a8a903" CreationDate="2022-09-05T16:27:46.187" UserId="29" Comment="added 57 characters in body" Text="# How to extend a slot on the relay chain&#xD;&#xA;&#xD;&#xA;To extend a slot on the relay chain the parachain team needs to secure a new slot via an auction. There are several approaches to doing so. Therefore your team needs to see what is the best fit for your case.&#xD;&#xA;&#xD;&#xA;Each slot can be a most 8 lease periods (LP). That means your team will need to acquire a new slot of 8 LPs via auction.&#xD;&#xA;&#xD;&#xA;To avoid downtime, your team will either need the new LP to start immediately after your existing one or you can have the slots &quot;overlap&quot; each other.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Option 1: Overlapping Slots&#xD;&#xA;&#xD;&#xA;Aquire a slot where the first LP is before the last LP of the current slot.&#xD;&#xA;&#xD;&#xA;1. Register a new `paraId`&#xD;&#xA;2. Win a slot auction with the new `paraId`&#xD;&#xA;    - Your team will now have two slots: one that will end soon, and one that just started.&#xD;&#xA;    - Both slots will have at least one LP in common&#xD;&#xA;3. When the old slot transitions to their last LP, your team can do a [swap](https://github.com/paritytech/polkadot/pull/4772) to swap to the new slot.&#xD;&#xA;&#xD;&#xA;&gt; By calling swap, your original paraId will be kept.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/29cNW.png)&#xD;&#xA;&#xD;&#xA;- Currently this has to be done via on-chain governance [example](https://kusama.polkassembly.io/post/1491) but their are [discussions](https://github.com/paritytech/polkadot/pull/5451) to improve the process.&#xD;&#xA;&#xD;&#xA;&gt; Note: This method has the benefit of giving flexibility to the team on when to bid for a slot, however it has the disadvantage of having more than one slot being active during the same LPs.&#xD;&#xA;&#xD;&#xA;### Option 2: Non-overlapping Slots&#xD;&#xA;&#xD;&#xA;Aquire a slot where the first LP starts right after the end of the last LP of the current slot.&#xD;&#xA;&#xD;&#xA;In this case, the team can bid directly with their current paraID, and it will be automatically extended without the need of swapping.&#xD;&#xA;&#xD;&#xA;This method has the advantage of not having superposing LP's on different slots owned by the same team, however it has the disadvantage of losing flexibility on when to win a new slot: if the team does not win the exact slot, then it will suffer some downtime until it wins a new slot." ContentLicense="CC BY-SA 4.0" />
  <row Id="17335" PostHistoryTypeId="2" PostId="4636" RevisionGUID="8f418fd2-9130-468e-aabf-78725ce51cfe" CreationDate="2022-09-05T21:55:07.410" UserId="703" Text="IPFS will likely be the best option for offchain + decentralized storage.&#xD;&#xA;&#xD;&#xA;If you are willing, and able, you could run your own IPFS nodes to host your data in IPFS. However, if you would rather outsource your node operation, there are some services that provide this. &#xD;&#xA;&#xD;&#xA;- One example is [Pinata][1]. Pinata will store your data on IPFS for you, and provide very fast access to the data. [Raresama][2], an NFT marketplace on Moonbeam, uses Pinata to store their NFT pictures.&#xD;&#xA;&#xD;&#xA;- [Crust Network][3] is another good option. They host a deployment of polkadot.js.org on IPFS, and is used by a few NFT parachains, such as RMRK (see Crust's homepage for more). Crust will likely be cheaper than Pinata. &#xD;&#xA;&#xD;&#xA;  [1]: https://www.pinata.cloud/&#xD;&#xA;  [2]: https://raresama.com/&#xD;&#xA;  [3]: https://crust.network/&#xD;&#xA;  [4]: https://docs.rs/ipfs/latest/ipfs/&#xD;&#xA;  [5]: https://github.com/rs-ipfs/substrate/tree/offchain_ipfs" ContentLicense="CC BY-SA 4.0" />
  <row Id="17337" PostHistoryTypeId="2" PostId="4637" RevisionGUID="1fb48129-d7e5-47aa-8789-d9603e13d725" CreationDate="2022-09-05T22:21:48.007" UserId="2065" Text="I am getting the following errors when building sp_io for our blockchain runtime.&#xD;&#xA;&#xD;&#xA;     error[E0152]: found duplicate lang item `panic_impl`&#xD;&#xA;          --&gt; /home/aibrayanov/.cargo/git/checkouts/substrate-7e08433d4c370a21/814752f/primitives/io/src/lib.rs:1633:1&#xD;&#xA;           |&#xD;&#xA;      1633 | pub fn panic(info: &amp;core::panic::PanicInfo) -&gt; ! {&#xD;&#xA;           | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;           |&#xD;&#xA;           = note: the lang item is first defined in crate `std` (which `parity_scale_codec` depends on)&#xD;&#xA;           = note: first definition in `std` loaded from /home/aibrayanov/.rustup/toolchains/nightly-2022-02-19-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-d9a8e4ca4a56d589.rlib&#xD;&#xA;           = note: second definition in the local crate (`sp_io`)&#xD;&#xA;    &#xD;&#xA;      error[E0152]: found duplicate lang item `oom`&#xD;&#xA;          --&gt; /home/aibrayanov/.cargo/git/checkouts/substrate-7e08433d4c370a21/814752f/primitives/io/src/lib.rs:1649:1&#xD;&#xA;           |&#xD;&#xA;      1649 | pub fn oom(_: core::alloc::Layout) -&gt; ! {&#xD;&#xA;           | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;           |&#xD;&#xA;           = note: the lang item is first defined in crate `std` (which `parity_scale_codec` depends on)&#xD;&#xA;           = note: first definition in `std` loaded from /home/aibrayanov/.rustup/toolchains/nightly-2022-02-19-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-d9a8e4ca4a56d589.rlib&#xD;&#xA;           = note: second definition in the local crate (`sp_io`)&#xD;&#xA;    &#xD;&#xA;      For more information about this error, try `rustc --explain E0152`.&#xD;&#xA;&#xD;&#xA;I tried to enable `default-features = std` and add`#![cfg_attr(not(feature = &quot;std&quot;), no_std)]` where relavant but I continue to get the same errors. Here is a copy of my Cargo.toml file (full runtime code can be found [here][1]) &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;metaverse-runtime-common&quot;&#xD;&#xA;    description = &quot;Common code shared between runtimes&quot;&#xD;&#xA;    version = &quot;0.0.1&quot;&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    impl-trait-for-tuples = { version = &quot;0.2.1&quot;, default-features = false }&#xD;&#xA;    log = { version = &quot;0.4&quot;, default-features = false }&#xD;&#xA;    num_enum = { version = &quot;0.5.3&quot;, default-features = false }&#xD;&#xA;    hex-literal = { version = &quot;0.3.1&quot;, default-features = false }&#xD;&#xA;    &#xD;&#xA;    # Substrate&#xD;&#xA;    frame-support = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    frame-system = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-collective = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-balances = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-timestamp = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-scheduler = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    sp-core = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    sp-runtime = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    sp-std = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    sp-io = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    # EVM pallets&#xD;&#xA;    pallet-evm = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-ethereum = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-base-fee = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-evm-test-vector-support = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-evm-precompile-blake2 = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-evm-precompile-bn128 = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-evm-precompile-dispatch = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-evm-precompile-ed25519 = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-evm-precompile-modexp = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-evm-precompile-sha3fips = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    pallet-evm-precompile-simple = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    fp-evm = { git = &quot;https://github.com/justinphamnz/frontier&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    &#xD;&#xA;    # external crates - orml packages&#xD;&#xA;    orml-currencies = { git = &quot;https://github.com/bit-country/open-runtime-module-library&quot;, branch = &quot;v-9.24&quot;, default-features = false }&#xD;&#xA;    orml-tokens = { git = &quot;https://github.com/bit-country/open-runtime-module-library&quot;, branch = &quot;v-9.24&quot;, default-features = false }&#xD;&#xA;    orml-traits = { git = &quot;https://github.com/bit-country/open-runtime-module-library&quot;, branch = &quot;v-9.24&quot;, default-features = false }&#xD;&#xA;    orml-nft = { git = &quot;https://github.com/bit-country/open-runtime-module-library&quot;, branch = &quot;v-9.24&quot;, default-features = false }&#xD;&#xA;    orml-oracle = { git = &quot;https://github.com/bit-country/open-runtime-module-library&quot;, branch = &quot;v-9.24&quot;, default-features = false }&#xD;&#xA;    # metaverse dependencies&#xD;&#xA;    primitives = { package = &quot;bit-country-primitives&quot;, path = &quot;../../primitives/metaverse&quot;, default-features = false }&#xD;&#xA;    core-primitives = { path = &quot;../../traits/core-primitives&quot;, default-features = false }&#xD;&#xA;    auction-manager = { package = &quot;auction-manager&quot;, path = &quot;../../traits/auction-manager&quot;, default-features = false }&#xD;&#xA;    metaverse = { package = &quot;pallet-metaverse&quot;, path = &quot;../../pallets/metaverse&quot;, default-features = false }&#xD;&#xA;    estate = { package = &quot;pallet-estate&quot;, path = &quot;../../pallets/estate&quot;, default-features = false }&#xD;&#xA;    evm-mapping = { package = &quot;pallet-evm-mapping&quot;, path = &quot;../../pallets/evm-mapping&quot;, default-features = false }&#xD;&#xA;    nft = { package = &quot;pallet-nft&quot;, path = &quot;../../pallets/nft&quot;, version = &quot;2.0.0-rc6&quot;, default-features = false }&#xD;&#xA;    continuum = { package = &quot;pallet-continuum&quot;, path = &quot;../../pallets/continuum&quot;, version = &quot;0.0.1&quot;, default-features = false }&#xD;&#xA;    auction = { package = &quot;pallet-auction&quot;, path = &quot;../../pallets/auction&quot;, version = &quot;2.0.0-rc6&quot;, default-features = false }&#xD;&#xA;    currencies = { package = &quot;currencies&quot;, path = &quot;../../pallets/currencies&quot;, version = &quot;2.0.0-rc6&quot;, default-features = false }&#xD;&#xA;    mining = { package = &quot;pallet-mining&quot;, path = &quot;../../pallets/mining&quot;, version = &quot;2.0.0-rc6&quot;, default-features = false }&#xD;&#xA;    governance = { package = &quot;pallet-governance&quot;, path = &quot;../../pallets/governance&quot;, version = &quot;2.0.0-rc6&quot;, default-features = false }&#xD;&#xA;    crowdloan = { package = &quot;pallet-crowdloan&quot;, path = &quot;../../pallets/crowdloan&quot;, version = &quot;2.0.0-rc6&quot;, default-features = false }&#xD;&#xA;    economy = { package = &quot;pallet-economy&quot;, path = &quot;../../pallets/economy&quot;, version = &quot;2.0.0-rc6&quot;, default-features = false }&#xD;&#xA;    emergency = { package = &quot;pallet-emergency&quot;, path = &quot;../../pallets/emergency&quot;, version = &quot;2.0.0-rc6&quot;, default-features = false }&#xD;&#xA;    precompile-utils = { path = &quot;../../primitives/precompiles&quot;, default-features = false }&#xD;&#xA;    precompile-utils-macro = {path = &quot;../../primitives/precompiles/macro&quot;, default-features = false }&#xD;&#xA;    [build-dependencies]&#xD;&#xA;    substrate-wasm-builder = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.24&quot;, default-features = false }&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;        &quot;pallet-evm/std&quot;,&#xD;&#xA;        &quot;fp-evm/std&quot;,&#xD;&#xA;        &quot;pallet-ethereum/std&quot;,&#xD;&#xA;        &quot;pallet-evm-precompile-blake2/std&quot;,&#xD;&#xA;        &quot;pallet-evm-precompile-simple/std&quot;,&#xD;&#xA;        &quot;pallet-evm-precompile-bn128/std&quot;,&#xD;&#xA;        &quot;pallet-evm-precompile-dispatch/std&quot;,&#xD;&#xA;        &quot;pallet-evm-precompile-ed25519/std&quot;,&#xD;&#xA;        &quot;pallet-evm-precompile-modexp/std&quot;,&#xD;&#xA;        &quot;pallet-evm-precompile-sha3fips/std&quot;,&#xD;&#xA;        &quot;orml-currencies/std&quot;,&#xD;&#xA;        &quot;orml-tokens/std&quot;,&#xD;&#xA;        &quot;orml-nft/std&quot;,&#xD;&#xA;        &quot;orml-oracle/std&quot;,&#xD;&#xA;        &quot;orml-traits/std&quot;,&#xD;&#xA;        &quot;primitives/std&quot;,&#xD;&#xA;        &quot;metaverse/std&quot;,&#xD;&#xA;        &quot;auction-manager/std&quot;,&#xD;&#xA;        &quot;auction/std&quot;,&#xD;&#xA;        &quot;estate/std&quot;,&#xD;&#xA;        &quot;nft/std&quot;,&#xD;&#xA;        &quot;continuum/std&quot;,&#xD;&#xA;        &quot;currencies/std&quot;,&#xD;&#xA;        &quot;mining/std&quot;,&#xD;&#xA;        &quot;evm-mapping/std&quot;,&#xD;&#xA;        &quot;governance/std&quot;,&#xD;&#xA;        &quot;crowdloan/std&quot;,&#xD;&#xA;        &quot;economy/std&quot;,&#xD;&#xA;        &quot;emergency/std&quot;,&#xD;&#xA;        &quot;precompile-utils/std&quot;,&#xD;&#xA;        &quot;sp-io/std&quot;,&#xD;&#xA;        &quot;sp-std/std&quot;,&#xD;&#xA;        &quot;sp-core/std&quot;,&#xD;&#xA;        &quot;sp-runtime/std&quot;,&#xD;&#xA;        &quot;pallet-balances/std&quot;,&#xD;&#xA;        &quot;pallet-collective/std&quot;,&#xD;&#xA;        &quot;pallet-timestamp/std&quot;,&#xD;&#xA;        &quot;pallet-scheduler/std&quot;,&#xD;&#xA;        &quot;frame-system/std&quot;,&#xD;&#xA;        &quot;frame-support/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chexware/Bit-Country-Blockchain/tree/feature/evm-precompile-mock" ContentLicense="CC BY-SA 4.0" />
  <row Id="17339" PostHistoryTypeId="1" PostId="4637" RevisionGUID="1fb48129-d7e5-47aa-8789-d9603e13d725" CreationDate="2022-09-05T22:21:48.007" UserId="2065" Text="error[E0152]: found duplicate lang item when building sp_io" ContentLicense="CC BY-SA 4.0" />
  <row Id="17340" PostHistoryTypeId="3" PostId="4637" RevisionGUID="1fb48129-d7e5-47aa-8789-d9603e13d725" CreationDate="2022-09-05T22:21:48.007" UserId="2065" Text="|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17341" PostHistoryTypeId="2" PostId="4638" RevisionGUID="8ef9a641-4216-4d26-b99d-8f04fc399790" CreationDate="2022-09-05T22:45:42.693" UserId="2565" Text="In my pallet I want to get the total supply of a given smart contract ERC20.  How can I do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17343" PostHistoryTypeId="1" PostId="4638" RevisionGUID="8ef9a641-4216-4d26-b99d-8f04fc399790" CreationDate="2022-09-05T22:45:42.693" UserId="2565" Text="How to get the total supply of the smart contract in pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17344" PostHistoryTypeId="3" PostId="4638" RevisionGUID="8ef9a641-4216-4d26-b99d-8f04fc399790" CreationDate="2022-09-05T22:45:42.693" UserId="2565" Text="|substrate-node|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17345" PostHistoryTypeId="2" PostId="4639" RevisionGUID="8ce61f21-a06a-46f7-be2d-9a4e23fdece0" CreationDate="2022-09-06T03:19:56.060" UserId="70" Text="The common cause of this type of error is the leaking of `std` features. &#xD;&#xA;&#xD;&#xA;You should check if `sp-io` already included in default `std` (including other dependencies that may use `sp-io`)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17347" PostHistoryTypeId="2" PostId="4640" RevisionGUID="4cfd075a-5e59-41d9-a222-9e1e15889a26" CreationDate="2022-09-06T07:51:47.170" UserId="3127" Text="Where is the contract deployed? Are you using an EVM pallet, or have an ink! contract? If, for instance, you have an ERC20 ink! contract, it has a total supply function by design, so you should be able to call the total_supply functions in the UI https://github.com/paritytech/contracts-ui" ContentLicense="CC BY-SA 4.0" />
  <row Id="17349" PostHistoryTypeId="2" PostId="4641" RevisionGUID="45461b44-eb3b-4f73-8cc9-14a78e44d091" CreationDate="2022-09-06T08:41:41.563" UserId="698" Text="As discussed you'll need to use api.at with a block hash of an earlier block to continue searching beyond the history depth. " ContentLicense="CC BY-SA 4.0" />
  <row Id="17357" PostHistoryTypeId="2" PostId="4643" RevisionGUID="a22aee4e-4155-4c8c-b3a2-526e6a6bcae6" CreationDate="2022-09-06T11:55:44.090" UserId="2548" Text="I am using substrate-node-template and recently I added a new pallet.&#xD;&#xA;Now I need to build a docker file because I would like to send it for testing.&#xD;&#xA;&#xD;&#xA;Any information?&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="17359" PostHistoryTypeId="1" PostId="4643" RevisionGUID="a22aee4e-4155-4c8c-b3a2-526e6a6bcae6" CreationDate="2022-09-06T11:55:44.090" UserId="2548" Text="Build a docker file/image for my new pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="17360" PostHistoryTypeId="3" PostId="4643" RevisionGUID="a22aee4e-4155-4c8c-b3a2-526e6a6bcae6" CreationDate="2022-09-06T11:55:44.090" UserId="2548" Text="|substrate-node-template|rust|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17361" PostHistoryTypeId="2" PostId="4644" RevisionGUID="46ef5757-8e18-42e3-ae32-d93d0b6e351c" CreationDate="2022-09-06T13:16:14.850" UserId="251" Text="The most common way is using [Polkadot Apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate).&#xD;&#xA;&#xD;&#xA;Because we can not ensure every chain has integrated with Subscan service, and sometimes you are under a development environment.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;Navigate to `chain state` &gt; `system` &gt; `account` &gt; `type in the address` &gt; `submit`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/PykgT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17363" PostHistoryTypeId="2" PostId="4645" RevisionGUID="f711a11a-aa34-4266-b166-eac603fa0402" CreationDate="2022-09-06T14:00:25.357" UserId="3129" Text="I am following this &#xD;&#xA;https://core.tetcoin.org/docs/en/tutorials/create-your-first-substrate-chain/setup&#xD;&#xA;&#xD;&#xA;make build command gave me this error&#xD;&#xA;no field __rip on type __darwin_arm_thread_state64" ContentLicense="CC BY-SA 4.0" />
  <row Id="17365" PostHistoryTypeId="1" PostId="4645" RevisionGUID="f711a11a-aa34-4266-b166-eac603fa0402" CreationDate="2022-09-06T14:00:25.357" UserId="3129" Text="Error on making build" ContentLicense="CC BY-SA 4.0" />
  <row Id="17366" PostHistoryTypeId="3" PostId="4645" RevisionGUID="f711a11a-aa34-4266-b166-eac603fa0402" CreationDate="2022-09-06T14:00:25.357" UserId="3129" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17368" PostHistoryTypeId="2" PostId="4646" RevisionGUID="4c78ea90-4158-406b-a6be-90dfa649844f" CreationDate="2022-09-06T14:18:23.690" UserId="29" Text="I have just setup Alice, Bob, Charlie, and Eve. &#xD;&#xA;&#xD;&#xA;Here is a snippet of Eve's logs showing 3 peers connected:&#xD;&#xA;```&#xD;&#xA;2022-09-06 10:11:14  Idle (3 peers), best: #76 (0x714a…af6a), finalized #74 (0x0201…6fef), ⬇ 1.8kiB/s ⬆ 1.7kiB/s    &#xD;&#xA;2022-09-06 10:11:18 ✨ Imported #77 (0xb648…03f7)    &#xD;&#xA;2022-09-06 10:11:19  Idle (3 peers), best: #77 (0xb648…03f7), finalized #75 (0x9745…38bf), ⬇ 2.1kiB/s ⬆ 2.0kiB/s &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is my setup:&#xD;&#xA;&#xD;&#xA;**Alice**&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Bob**&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/bob \&#xD;&#xA;--chain local \&#xD;&#xA;--bob \&#xD;&#xA;--port 30334 \&#xD;&#xA;--ws-port 9946 \&#xD;&#xA;--rpc-port 9934 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000002 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Charlie**&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/charlie \&#xD;&#xA;--chain local \&#xD;&#xA;--charlie \&#xD;&#xA;--port 30335 \&#xD;&#xA;--ws-port 9947 \&#xD;&#xA;--rpc-port 9935 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000003 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Eve**&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/charlie \&#xD;&#xA;--chain local \&#xD;&#xA;--charlie \&#xD;&#xA;--port 30336 \&#xD;&#xA;--ws-port 9948 \&#xD;&#xA;--rpc-port 9936 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000004 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Version: `polkadot-v0.9.28`&#xD;&#xA;&#xD;&#xA;Now keep in mind that by default, in the node-template, only Alice and Bob are authorities." ContentLicense="CC BY-SA 4.0" />
  <row Id="17370" PostHistoryTypeId="2" PostId="4647" RevisionGUID="a9b9f8df-a618-441c-918c-158db431d075" CreationDate="2022-09-06T14:21:05.760" UserId="29" Text="I recommend to follow the authoritative docs instead:&#xD;&#xA;- https://docs.substrate.io/install&#xD;&#xA;- https://docs.substrate.io/tutorials/get-started/build-local-blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="17372" PostHistoryTypeId="5" PostId="4646" RevisionGUID="82440bd4-6cb7-4fc0-b41f-9842c4cba7a8" CreationDate="2022-09-06T14:23:45.197" UserId="29" Comment="deleted 8 characters in body" Text="I have just setup Alice, Bob, Charlie, and Eve. &#xD;&#xA;&#xD;&#xA;Here is a snippet of Eve's logs showing 3 peers connected:&#xD;&#xA;```&#xD;&#xA;2022-09-06 10:11:14  Idle (3 peers), best: #76 (0x714a…af6a), finalized #74 (0x0201…6fef), ⬇ 1.8kiB/s ⬆ 1.7kiB/s    &#xD;&#xA;2022-09-06 10:11:18 ✨ Imported #77 (0xb648…03f7)    &#xD;&#xA;2022-09-06 10:11:19  Idle (3 peers), best: #77 (0xb648…03f7), finalized #75 (0x9745…38bf), ⬇ 2.1kiB/s ⬆ 2.0kiB/s &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is my setup:&#xD;&#xA;&#xD;&#xA;**Alice**&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Bob**&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/bob \&#xD;&#xA;--chain local \&#xD;&#xA;--bob \&#xD;&#xA;--port 30334 \&#xD;&#xA;--ws-port 9946 \&#xD;&#xA;--rpc-port 9934 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000002 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Charlie**&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/charlie \&#xD;&#xA;--chain local \&#xD;&#xA;--charlie \&#xD;&#xA;--port 30335 \&#xD;&#xA;--ws-port 9947 \&#xD;&#xA;--rpc-port 9935 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000003 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Eve**&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/eve \&#xD;&#xA;--chain local \&#xD;&#xA;--eve \&#xD;&#xA;--port 30336 \&#xD;&#xA;--ws-port 9948 \&#xD;&#xA;--rpc-port 9936 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000004 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Version: `polkadot-v0.9.28`&#xD;&#xA;&#xD;&#xA;Now keep in mind that by default, in the node-template, only Alice and Bob are authorities." ContentLicense="CC BY-SA 4.0" />
  <row Id="17373" PostHistoryTypeId="2" PostId="4648" RevisionGUID="7cd1f89a-0c70-4b04-b0cb-b52ada2543c5" CreationDate="2022-09-06T14:46:13.403" UserId="94" Text="As you probably saw; there is a [docker-compose](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/docker-compose.yml) file in the Repo which you can use in CI. It is not ideal since it re-builds every time.  &#xD;&#xA;&#xD;&#xA;Creating a docker image for the node can be done as shown [here](https://github.com/perun-network/perun-polkadot-node/blob/f0a29200bed5d2e4ec6fcb0ce8ae121f9124ff5a/node/Dockerfile):  &#xD;&#xA;```lang-dockerfile&#xD;&#xA;FROM paritytech/ci-linux:production as build&#xD;&#xA;&#xD;&#xA;WORKDIR /code&#xD;&#xA;COPY . .&#xD;&#xA;RUN cargo build --release&#xD;&#xA;&#xD;&#xA;FROM ubuntu:20.04&#xD;&#xA;WORKDIR /node&#xD;&#xA;&#xD;&#xA;# Copy the node binary.&#xD;&#xA;COPY --from=build /code/target/release/node-template .&#xD;&#xA;&#xD;&#xA;# Install root certs, see: https://github.com/paritytech/substrate/issues/9984&#xD;&#xA;RUN apt update &amp;&amp; \&#xD;&#xA;	apt install -y ca-certificates &amp;&amp; \&#xD;&#xA;	update-ca-certificates &amp;&amp; \&#xD;&#xA;	apt remove ca-certificates -y &amp;&amp; \&#xD;&#xA;	rm -rf /var/lib/apt/lists/*&#xD;&#xA;&#xD;&#xA;EXPOSE 9944&#xD;&#xA;# Exposing unsafe RPC methods is needed for testing but should not be done in&#xD;&#xA;# production.&#xD;&#xA;CMD [ &quot;./node-template&quot;, &quot;--dev&quot;, &quot;--ws-external&quot;, &quot;--rpc-methods=Unsafe&quot; ]&#xD;&#xA;```&#xD;&#xA;It is possible like [this](https://github.com/perun-network/perun-polkadot-node/blob/f0a29200bed5d2e4ec6fcb0ce8ae121f9124ff5a/docker-compose.yml) to combine it with the frontend template.  &#xD;&#xA;In any case; this should not be used in production since it exposes unsafe RPS methods which is good for testing.  &#xD;&#xA;A more professional Dockerfile can be found in the [Polkadot Repo](https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/polkadot/polkadot_builder.Dockerfile)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17375" PostHistoryTypeId="2" PostId="4649" RevisionGUID="0de22909-02b5-48a5-8e87-6d1c93ffa6b5" CreationDate="2022-09-06T14:56:56.463" UserId="190" Text="The js code uses polkadot api, util-crypto and extension-dap&#xD;&#xA;&#xD;&#xA;```js          &#xD;&#xA;    const { signature } = await signRaw({&#xD;&#xA;        address: account.address,&#xD;&#xA;        data: payload,&#xD;&#xA;        type: 'bytes'&#xD;&#xA;    });&#xD;&#xA;    // isValid is true&#xD;&#xA;    const isValid = await signatureVerify(payload, signature, account.address);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The rust code crates the payload and passed it has hex_encoded into the js code.&#xD;&#xA;I make sure that hex encoding and decoding was all correct, but I couldn't understand why the signature is valid in js code, but verifying it in the rust code against the payload returns invalid.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;    let is_valid1 = signature.verify(payload.as_slice(), &amp;signer_address);&#xD;&#xA;    // invalid&#xD;&#xA;    let message = format!(&quot;rust signature is valid1: {}&quot;, is_valid1);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17377" PostHistoryTypeId="1" PostId="4649" RevisionGUID="0de22909-02b5-48a5-8e87-6d1c93ffa6b5" CreationDate="2022-09-06T14:56:56.463" UserId="190" Text="Why is it that the signature created using polkadot api is valid, but verifying that signature using substrate library is invalid?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17378" PostHistoryTypeId="3" PostId="4649" RevisionGUID="0de22909-02b5-48a5-8e87-6d1c93ffa6b5" CreationDate="2022-09-06T14:56:56.463" UserId="190" Text="|substrate-node|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17379" PostHistoryTypeId="2" PostId="4650" RevisionGUID="56c42263-ca5e-4a07-8045-d702df100d7f" CreationDate="2022-09-06T15:05:18.060" UserId="1789" Text="Every time when I start my parachain, I see Bob, Charlie, Dave,... etc and each of them has `1.1529 MUNIT` on Polkadot.js.org's Accounts -&gt; Accounts -&gt; My Account page. But how does Polkadot.js.org know my parachain's decimal places?&#xD;&#xA;&#xD;&#xA;What does the `M` mean? like 1 Million with 6 zeros?&#xD;&#xA;&#xD;&#xA;After sending `100000000000000000` with 17 zeros as the value from one account to another, finally that shows up on that above Accounts page as `0.1MUNIT`. &#xD;&#xA;Assume `M` means 6 zeros, then 12 = 18 - 6... The Accounts page shows balance with 12 decimal places... where did that come from?&#xD;&#xA;&#xD;&#xA;After some digging, I found those inside the chain_spec.rs&#xD;&#xA;```&#xD;&#xA;pub fn development_config() ...&#xD;&#xA;	properties.insert(&quot;tokenDecimals&quot;.into(), 12.into());&#xD;&#xA;&#xD;&#xA;pub fn local_testnet_config() ...&#xD;&#xA;	properties.insert(&quot;tokenDecimals&quot;.into(), 12.into());&#xD;&#xA;```&#xD;&#xA;So the 12 dp must come from there... right?&#xD;&#xA;That is how Polkadot.js.org set its decimal places in the Accounts page. Right?&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=ws%3A%2F%2Flocalhost%3A8844#" ContentLicense="CC BY-SA 4.0" />
  <row Id="17381" PostHistoryTypeId="1" PostId="4650" RevisionGUID="56c42263-ca5e-4a07-8045-d702df100d7f" CreationDate="2022-09-06T15:05:18.060" UserId="1789" Text="How to set decimal points on Polkadot.js.org account balances for parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="17382" PostHistoryTypeId="3" PostId="4650" RevisionGUID="56c42263-ca5e-4a07-8045-d702df100d7f" CreationDate="2022-09-06T15:05:18.060" UserId="1789" Text="|polkadot-js|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17383" PostHistoryTypeId="2" PostId="4651" RevisionGUID="eb852ff1-3b5a-42cb-8d85-243690709580" CreationDate="2022-09-06T15:39:07.417" UserId="29" Text="Yes the `tokenDecimals` can be hardcoded in the chain_spec.rs file (like you have shown) or they can be configured in the chain spec of the chain. For example, in Polkadot's chain spec you will see the following:&#xD;&#xA;```json&#xD;&#xA;&quot;properties&quot;: {&#xD;&#xA;    &quot;ss58Format&quot;: 0,&#xD;&#xA;    &quot;tokenDecimals&quot;: 10,&#xD;&#xA;    &quot;tokenSymbol&quot;: &quot;DOT&quot;&#xD;&#xA;  },&#xD;&#xA;```&#xD;&#xA;- https://raw.githubusercontent.com/paritytech/polkadot/master/node/service/chain-specs/polkadot.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="17385" PostHistoryTypeId="2" PostId="4652" RevisionGUID="33b3e967-d5cb-4e71-b992-7809732bda93" CreationDate="2022-09-06T15:56:01.017" UserId="538" Text="Thanks to @kianenigma and @shawn-tabrizi pointing me in the right direction, I realized that to do what I'm looking for I just need to call `pre_dispatch` and `post_dispatch` manually on the call.&#xD;&#xA;&#xD;&#xA;In addition to adjusting the the mock as I showed above in the original question, I wrote a simple call wrapper to take the transaction fees on the calls I'd like to check. I provide it here in case anyone else is interested:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use crate::Call as PalletCall;&#xD;&#xA;use pallet_transaction_payment::ChargeTransactionPayment;&#xD;&#xA;&#xD;&#xA;fn fee_call_wrapper(call: PalletCall&lt;Test&gt;, from: AccountId) {&#xD;&#xA;	let pallet_pre = free_balance(&amp;MyPallet::account_id());&#xD;&#xA;	let from_pre = balance(&amp;from); // Don't care about reserves for tx fee tests&#xD;&#xA;&#xD;&#xA;	let call: &lt;Test as frame_system::Config&gt;::Call = Call::MyPallet(call);&#xD;&#xA;	let info = call.get_dispatch_info();&#xD;&#xA;	let len = call.encode().len();&#xD;&#xA;	let pre_d = ChargeTransactionPayment::&lt;Test&gt;::from(0).pre_dispatch(&amp;from, &amp;call.clone(), &amp;info, len).expect(&quot;pre_dispatch error&quot;);&#xD;&#xA;	let post_result = call.dispatch(Origin::signed(from.clone())).expect(&quot;dispatch failure&quot;);&#xD;&#xA;	let actual_fee = TransactionPayment::compute_actual_fee(len.try_into().unwrap(), &amp;info, &amp;post_result, 0);&#xD;&#xA;	assert_ok!(ChargeTransactionPayment::&lt;Test&gt;::post_dispatch(&#xD;&#xA;		Some(pre_d),&#xD;&#xA;		&amp;info,&#xD;&#xA;		&amp;post_result,&#xD;&#xA;		len,&#xD;&#xA;		&amp;Ok(())&#xD;&#xA;	));&#xD;&#xA;&#xD;&#xA;	//Check fees&#xD;&#xA;	let split = (80,20);&#xD;&#xA;	let pallet_fee = actual_fee * split.0 / 100;&#xD;&#xA;	assert_eq!(free_balance(&amp;MyPallet::account_id()), pallet_fee + pallet_pre );&#xD;&#xA;	assert_eq!(balance(&amp;from), from_pre - actual_fee);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which can then be called like so:&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn do_something_with_tx_fees_taken_works() {&#xD;&#xA;	ExtBuilder::default().build().execute_with(|| {&#xD;&#xA;		let call = PalletCall::do_something{...};&#xD;&#xA;		fee_call_wrapper(call, ALICE);&#xD;&#xA;&#xD;&#xA;        // Do other checks here...&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that this is just a simple fee splitter, taking 80% to the MyPallet account." ContentLicense="CC BY-SA 4.0" />
  <row Id="17387" PostHistoryTypeId="2" PostId="4653" RevisionGUID="8862c3fd-cae0-4544-94f6-4971ac4bfa32" CreationDate="2022-09-06T16:24:06.310" UserId="29" Text="I run the following command:&#xD;&#xA;```&#xD;&#xA;cargo run --release --features=try-runtime try-runtime on-runtime-upgrade live ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;And I get the error:&#xD;&#xA;```&#xD;&#xA;error: Found argument 'ws://localhost:9944' which wasn't expected, or isn't valid in this context&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17389" PostHistoryTypeId="1" PostId="4653" RevisionGUID="8862c3fd-cae0-4544-94f6-4971ac4bfa32" CreationDate="2022-09-06T16:24:06.310" UserId="29" Text="try-runtime: Found argument 'ws://localhost:9944' which wasn't expected" ContentLicense="CC BY-SA 4.0" />
  <row Id="17390" PostHistoryTypeId="3" PostId="4653" RevisionGUID="8862c3fd-cae0-4544-94f6-4971ac4bfa32" CreationDate="2022-09-06T16:24:06.310" UserId="29" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17391" PostHistoryTypeId="2" PostId="4654" RevisionGUID="b2309618-8dbe-48bd-be2e-f3afcad45158" CreationDate="2022-09-06T16:24:06.310" UserId="29" Text="As the help message says:&#xD;&#xA;```&#xD;&#xA;USAGE:&#xD;&#xA;    substrate try-runtime on-runtime-upgrade live [OPTIONS] --uri &lt;URI&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;use the `--uri` flag:&#xD;&#xA;```&#xD;&#xA;cargo run --release --features=try-runtime try-runtime on-runtime-upgrade live --uri ws://localhost:9944&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17393" PostHistoryTypeId="5" PostId="4345" RevisionGUID="96464e2a-ba5d-4747-ae27-1488e62dce57" CreationDate="2022-09-06T16:29:40.073" UserId="165" Comment="typo ?" Text="Shawn has explained a lot.&#xD;&#xA;&#xD;&#xA;Let me give you a real example.&#xD;&#xA;&#xD;&#xA;I've implemented a custom `AccoundIdLookup` for Darwinia, which allows transfer from Substrate address to EVM address directly.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/blob/main/node/runtime/pangolin/src/pallets/system.rs#L42&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/blob/main/node/primitives/src/lib.rs#L181-L201&#xD;&#xA;&#xD;&#xA;Before this, the EVM user needs to calculate their Substrate address based on the EVM address. Then transfer some balance to the Substrate account to fund their EVM account.&#xD;&#xA;&#xD;&#xA;But now, they just need to transfer from an `H256` address to an `H160` address directly. Because the pallet-balances is accepting a [lookup type](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L280) as the dest. It's more flexible than the `AccountId`." ContentLicense="CC BY-SA 4.0" />
  <row Id="17394" PostHistoryTypeId="2" PostId="4655" RevisionGUID="4b8ccb81-d649-4aa9-ac40-8df8fe0c4f4a" CreationDate="2022-09-06T17:24:59.477" UserId="29" Text="I am running the `node-template` on ws://localhost:9944 and I am running the following command on Substrate:&#xD;&#xA;```&#xD;&#xA;cargo run --release --features=try-runtime try-runtime on-runtime-upgrade live -u ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;I get the error:&#xD;&#xA;```&#xD;&#xA;Version: 3.0.0-dev-34a0621761c&#xD;&#xA;&#xD;&#xA;   0: backtrace::capture::Backtrace::new&#xD;&#xA;   1: sp_panic_handler::set::{{closure}}&#xD;&#xA;   2: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:702:17&#xD;&#xA;   3: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13&#xD;&#xA;   4: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   5: rust_begin_unwind&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5&#xD;&#xA;   6: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14&#xD;&#xA;   7: core::panicking::panic_display&#xD;&#xA;   8: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;   9: try_runtime_cli::TryRuntimeCmd::run::{{closure}}&#xD;&#xA;  10: sc_cli::runner::main::{{closure}}::{{closure}}::{{closure}}&#xD;&#xA;  11: &lt;futures_util::future::poll_fn::PollFn&lt;F&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  12: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  13: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  14: tokio::park::thread::CachedParkThread::block_on&#xD;&#xA;  15: tokio::runtime::thread_pool::ThreadPool::block_on&#xD;&#xA;  16: tokio::runtime::Runtime::block_on&#xD;&#xA;  17: sc_cli::runner::Runner&lt;C&gt;::async_run&#xD;&#xA;  18: node_cli::command::run&#xD;&#xA;  19: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  20: std::rt::lang_start::{{closure}}&#xD;&#xA;  21: core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:280:13&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14&#xD;&#xA;      std::rt::lang_start_internal::{{closure}}&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:48&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14&#xD;&#xA;      std::rt::lang_start_internal&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:20&#xD;&#xA;  22: _main&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'main' panicked at 'version mismatch: remote spec name: 'node-template', expected (local chain spec, aka. `--chain`): 'node'', /Users/bruno/src/substrate/utils/frame/try-runtime/cli/src/lib.rs:647&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17396" PostHistoryTypeId="1" PostId="4655" RevisionGUID="4b8ccb81-d649-4aa9-ac40-8df8fe0c4f4a" CreationDate="2022-09-06T17:24:59.477" UserId="29" Text="TryRuntime: Found argument 'ws://localhost:9944' which wasn't expected" ContentLicense="CC BY-SA 4.0" />
  <row Id="17397" PostHistoryTypeId="3" PostId="4655" RevisionGUID="4b8ccb81-d649-4aa9-ac40-8df8fe0c4f4a" CreationDate="2022-09-06T17:24:59.477" UserId="29" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17398" PostHistoryTypeId="2" PostId="4656" RevisionGUID="1cf7703d-02f8-4b1d-a42d-d858fdf9c9a5" CreationDate="2022-09-06T17:24:59.477" UserId="29" Text="Specifically, notice this line in your error message:&#xD;&#xA;```&#xD;&#xA;Thread 'main' panicked at 'version mismatch: remote spec name: 'node-template', expected (local chain spec, aka. `--chain`): 'node'', /Users/bruno/src/substrate/utils/frame/try-runtime/cli/src/lib.rs:647&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;your node-template is running with this spec name:&#xD;&#xA;```rs&#xD;&#xA;spec_name: create_runtime_str!(&quot;node-template&quot;),&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/dcfaa41d11e70cfc976e292b2975c7285cf3668c/bin/node-template/runtime/src/lib.rs#L96&#xD;&#xA;&#xD;&#xA;try-runtime is running with this spec name:&#xD;&#xA;```rs&#xD;&#xA;spec_name: create_runtime_str!(&quot;node&quot;),&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/dcfaa41d11e70cfc976e292b2975c7285cf3668c/bin/node/runtime/src/lib.rs#L121&#xD;&#xA;&#xD;&#xA;And therefore there is a mismatch.&#xD;&#xA;&#xD;&#xA;In this case you want to use the try-runtime flag `--no-spec-name-check`:&#xD;&#xA;```&#xD;&#xA;--no-spec-name-check&#xD;&#xA;            When enabled, the spec name check will not panic, and instead only show a warning&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So your command should be:&#xD;&#xA;```&#xD;&#xA;cargo run --release --features=try-runtime try-runtime --no-spec-name-check on-runtime-upgrade live -u ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will run nicely and you will see a warning message like the following:&#xD;&#xA;```&#xD;&#xA;2022-09-06 12:11:25 version mismatch: remote spec name: 'node-template', expected (local chain spec, aka. `--chain`): 'node'    &#xD;&#xA;2022-09-06 12:11:25 spec version mismatch (local 268 != remote 100). This could cause some issues.&#xD;&#xA;```&#xD;&#xA;.. which is expected." ContentLicense="CC BY-SA 4.0" />
  <row Id="17400" PostHistoryTypeId="4" PostId="4655" RevisionGUID="e46945a1-8f79-4f1e-91c7-53fde746fe73" CreationDate="2022-09-06T17:40:20.650" UserId="29" Comment="edited title" Text="TryRuntime: panicked at version mismatch" ContentLicense="CC BY-SA 4.0" />
  <row Id="17401" PostHistoryTypeId="4" PostId="4655" RevisionGUID="ac5feb3c-c278-4282-bdc2-4966c37fb614" CreationDate="2022-09-06T17:54:52.500" UserId="29" Comment="edited title" Text="try-runtime: panicked at version mismatch" ContentLicense="CC BY-SA 4.0" />
  <row Id="17402" PostHistoryTypeId="2" PostId="4657" RevisionGUID="e9e1674f-2734-41c4-96b1-f76a08d25cc4" CreationDate="2022-09-06T18:00:53.540" UserId="3109" Text="How can I make substrate node light as light client ? If we want to build a light client can it be possible to make changes in substrate node and make it a light client." ContentLicense="CC BY-SA 4.0" />
  <row Id="17404" PostHistoryTypeId="1" PostId="4657" RevisionGUID="e9e1674f-2734-41c4-96b1-f76a08d25cc4" CreationDate="2022-09-06T18:00:53.540" UserId="3109" Text="Substrate Node to light Client" ContentLicense="CC BY-SA 4.0" />
  <row Id="17405" PostHistoryTypeId="3" PostId="4657" RevisionGUID="e9e1674f-2734-41c4-96b1-f76a08d25cc4" CreationDate="2022-09-06T18:00:53.540" UserId="3109" Text="|substrate-node|polkadot|substrate-node-template|rust|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17406" PostHistoryTypeId="2" PostId="4658" RevisionGUID="47a96ede-ea4d-43ac-b49f-8832c20cb27f" CreationDate="2022-09-06T18:30:40.010" UserId="94" Text="The scope of your question is not clear to me. How &quot;light&quot; do you mean? Where should it run?  &#xD;&#xA;All substrate compatible chains or just Polkadot?&#xD;&#xA;&#xD;&#xA;Did you have a look at [substrate-connect](https://github.com/paritytech/substrate-connect) or [Smoldot](https://github.com/paritytech/smoldot)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17408" PostHistoryTypeId="2" PostId="4659" RevisionGUID="31586067-bbc0-4467-9b0c-338255a66340" CreationDate="2022-09-06T18:42:20.457" UserId="2548" Text="I am trying to execute the above command but have the following issue: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[+] Running 7/7&#xD;&#xA; ⠿ dev Pulled                                                                                                     98.3s&#xD;&#xA;   ⠿ d121f8d1c412 Pull complete                                                                                    6.0s&#xD;&#xA;   ⠿ 1b985895e9b7 Pull complete                                                                                    6.1s&#xD;&#xA;   ⠿ 809a473c961b Pull complete                                                                                    6.2s&#xD;&#xA;   ⠿ 89f7c794c3df Pull complete                                                                                    6.6s&#xD;&#xA;   ⠿ ea120af1c111 Pull complete                                                                                   68.8s&#xD;&#xA;   ⠿ de2c35bb8bf1 Pull complete                                                                                   96.1s&#xD;&#xA;[+] Running 0/1&#xD;&#xA; ⠋ Container node-template  Creating                                                                               0.1s&#xD;&#xA;Error response from daemon: invalid mount config for type &quot;bind&quot;: bind source path does not exist: /host_mnt/Users/ep/IdeaProjects/demo/substrate-node-template/.local&#xD;&#xA;`docker-compose` process finished with exit code 1&#xD;&#xA;```&#xD;&#xA;What's wrong? " ContentLicense="CC BY-SA 4.0" />
  <row Id="17410" PostHistoryTypeId="1" PostId="4659" RevisionGUID="31586067-bbc0-4467-9b0c-338255a66340" CreationDate="2022-09-06T18:42:20.457" UserId="2548" Text="./scripts/docker_run.sh command does not work" ContentLicense="CC BY-SA 4.0" />
  <row Id="17411" PostHistoryTypeId="3" PostId="4659" RevisionGUID="31586067-bbc0-4467-9b0c-338255a66340" CreationDate="2022-09-06T18:42:20.457" UserId="2548" Text="|substrate-node|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17412" PostHistoryTypeId="2" PostId="4660" RevisionGUID="ce905c31-f572-46fd-bc51-c8a4761abb45" CreationDate="2022-09-06T19:06:05.023" UserId="3070" Text="When using Ink to store data in a Mapping with a tuple Key, how do you iterate through all the elements in a tuple?&#xD;&#xA;&#xD;&#xA;thanks,&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17414" PostHistoryTypeId="1" PostId="4660" RevisionGUID="ce905c31-f572-46fd-bc51-c8a4761abb45" CreationDate="2022-09-06T19:06:05.023" UserId="3070" Text="Iterate through Map Items when using a Tuple Key" ContentLicense="CC BY-SA 4.0" />
  <row Id="17415" PostHistoryTypeId="3" PostId="4660" RevisionGUID="ce905c31-f572-46fd-bc51-c8a4761abb45" CreationDate="2022-09-06T19:06:05.023" UserId="3070" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17416" PostHistoryTypeId="2" PostId="4661" RevisionGUID="7ff8457e-d55b-4ea9-8248-a5e9c1bed354" CreationDate="2022-09-06T19:32:32.437" UserId="29" Text="Looks like `.local` is missing. Try:&#xD;&#xA;```&#xD;&#xA;touch .local&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17418" PostHistoryTypeId="2" PostId="4662" RevisionGUID="5d03c433-bbb9-4a6a-8d90-b0df75bef541" CreationDate="2022-09-06T19:40:24.700" UserId="29" Text="In the docs I see the following:&#xD;&#xA;&#xD;&#xA;&gt; You can combine try-runtime with fork-off-substrate to test your chain&#xD;&#xA;&gt; before production. Use try-runtime to test your chain's migration and&#xD;&#xA;&gt; its pre and post states. Then, use fork-off-substrate if you want to&#xD;&#xA;&gt; check that block production continues after the migration.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/reference/command-line-tools/try-runtime/#usage&#xD;&#xA;&#xD;&#xA;It is not clear to me where the follow-chain option would come in." ContentLicense="CC BY-SA 4.0" />
  <row Id="17420" PostHistoryTypeId="1" PostId="4662" RevisionGUID="5d03c433-bbb9-4a6a-8d90-b0df75bef541" CreationDate="2022-09-06T19:40:24.700" UserId="29" Text="What is a good use-case for using try-runtime with follow-chain and fork-off-substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17421" PostHistoryTypeId="3" PostId="4662" RevisionGUID="5d03c433-bbb9-4a6a-8d90-b0df75bef541" CreationDate="2022-09-06T19:40:24.700" UserId="29" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17425" PostHistoryTypeId="2" PostId="4664" RevisionGUID="0d4edb73-d0c1-4f43-bfad-c5de872e3095" CreationDate="2022-09-07T01:00:34.757" UserId="590" Text="Block weight is divided between 3 different types of transaction classes:&#xD;&#xA;&#xD;&#xA;- mandatory&#xD;&#xA;- operation&#xD;&#xA;- normal&#xD;&#xA;&#xD;&#xA;Each type has a `max_total`. The `max_total` *is used so that any one type does not dominate the block*. In any case, there is a `max_block` for which the sum of these classes cannot exceed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Below is an illustration with a 3 normal transactions that have reach it limit, 2 mandatory transactions, 1 operational transactions. Also, the note that the block is not full.&#xD;&#xA;```&#xD;&#xA;/// |   |`max_block`&#xD;&#xA;/// |   | &#xD;&#xA;/// |   |                      -- `Mandatory` limit (unlimited)&#xD;&#xA;/// |#  |                 |   |&#xD;&#xA;/// |#  | `Ext3`          | - - `Operational` limit&#xD;&#xA;/// |#  | `Ext2`          |-  - `Normal` limit&#xD;&#xA;/// | # | `Ext1`          |#  |&#xD;&#xA;/// |  #| `on_initialize` |# #|&#xD;&#xA;/// |  #| `base_block`    |###|&#xD;&#xA;/// |NOM|                 |NOM|&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Questions:**&#xD;&#xA;&#xD;&#xA;1. Please tell me if the following understanding is correct:&#xD;&#xA;In the case that there are no more operational or mandatory transactions that can fill up the remaining space and normal transactions have reach its limits. A block is created and will NOT attempt to fill the remaining space with more normal transactions?&#xD;&#xA;&#xD;&#xA;2. If the above is true, what are the limitations that prevents an architectural design that attempts to always fill up the remaining space? &#xD;&#xA;&#xD;&#xA;3. Can I reach into the transaction pool to see if I can add more normal transactions to fill up the remaining space?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17427" PostHistoryTypeId="1" PostId="4664" RevisionGUID="0d4edb73-d0c1-4f43-bfad-c5de872e3095" CreationDate="2022-09-07T01:00:34.757" UserId="590" Text="Substrate weight limits and block production" ContentLicense="CC BY-SA 4.0" />
  <row Id="17428" PostHistoryTypeId="3" PostId="4664" RevisionGUID="0d4edb73-d0c1-4f43-bfad-c5de872e3095" CreationDate="2022-09-07T01:00:34.757" UserId="590" Text="|runtime|transactions|weight|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17429" PostHistoryTypeId="2" PostId="4665" RevisionGUID="57b4c9fd-b2c0-4df6-a538-090cb12295be" CreationDate="2022-09-07T02:50:31.037" UserId="3121" Text="I would like to do two things;&#xD;&#xA;&#xD;&#xA; 1. On wallet generation, I would like to flag whether the wallet owner is corporate or consumer, AND&#xD;&#xA; 2. If corporate, allow balances to temporarily (~month) be negative&#xD;&#xA;&#xD;&#xA;Very sorry for asking such a broad question, but if anyone could please help me look in the right direction." ContentLicense="CC BY-SA 4.0" />
  <row Id="17431" PostHistoryTypeId="1" PostId="4665" RevisionGUID="57b4c9fd-b2c0-4df6-a538-090cb12295be" CreationDate="2022-09-07T02:50:31.037" UserId="3121" Text="Is there a way to allow temporary negative balances?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17432" PostHistoryTypeId="3" PostId="4665" RevisionGUID="57b4c9fd-b2c0-4df6-a538-090cb12295be" CreationDate="2022-09-07T02:50:31.037" UserId="3121" Text="|substrate-front-end|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17433" PostHistoryTypeId="2" PostId="4666" RevisionGUID="63fb67e4-b5b4-4d4d-bbb7-e4a0f6253e8f" CreationDate="2022-09-07T03:10:26.057" UserId="251" Text="You can not store a negative balance on the storage.&#xD;&#xA;&#xD;&#xA;But there are other ways to make it looks like negative.&#xD;&#xA;&#xD;&#xA;For example, you could add a lock on it.&#xD;&#xA;&#xD;&#xA;`usable = total - lock`. If you set a big lock on this account. Then the usable balance is always `0`, unless `total &gt; lock`.&#xD;&#xA;&#xD;&#xA;And there are also a lot of ways to set a lock. I think you could start from the [`pallet-vesting`](https://github.com/paritytech/substrate/blob/master/frame/vesting/README.md)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17435" PostHistoryTypeId="5" PostId="4666" RevisionGUID="ec6f95ed-dd2c-445c-8bfd-0187c70372eb" CreationDate="2022-09-07T03:26:23.490" UserId="251" Comment="added 76 characters in body" Text="You can not store a negative balance on the storage. (I mean to use the `pallet-balances`, but you could write your own pallet.)&#xD;&#xA;&#xD;&#xA;But there are other ways to make it looks like negative.&#xD;&#xA;&#xD;&#xA;For example, you could add a lock on it.&#xD;&#xA;&#xD;&#xA;`usable = total - lock`. If you set a big lock on this account. Then the usable balance is always `0`, unless `total &gt; lock`.&#xD;&#xA;&#xD;&#xA;And there are also a lot of ways to set a lock. I think you could start from the [`pallet-vesting`](https://github.com/paritytech/substrate/blob/master/frame/vesting/README.md)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17436" PostHistoryTypeId="50" PostId="4106" RevisionGUID="b6ca2574-4aa4-4809-a4d3-7b5112d63307" CreationDate="2022-09-07T04:03:40.303" UserId="-1" />
  <row Id="17437" PostHistoryTypeId="2" PostId="4667" RevisionGUID="e2aa557f-59a2-44a5-9dfd-f8f7916b15c0" CreationDate="2022-09-07T04:35:00.177" UserId="2065" Text="I am currently implementing a mock for our EVM precompiles but ran into the following error when building the tests &#xD;&#xA;&#xD;&#xA;        error[E0277]: the trait bound `currencies::MultiCurrencyPrecompile&lt;TestRuntime&gt;: Precompile` is not satisfied&#xD;&#xA;       --&gt; runtime/common/src/mock.rs:205:25&#xD;&#xA;        |&#xD;&#xA;    205 |     type PrecompilesType = Precompiles;&#xD;&#xA;        |                            ^^^^^^^^^^^ the trait `Precompile` is not implemented for `currencies::MultiCurrencyPrecompile&lt;TestRuntime&gt;`&#xD;&#xA;        |&#xD;&#xA;        = help: the following implementations were found:&#xD;&#xA;                  &lt;currencies::MultiCurrencyPrecompile&lt;Runtime&gt; as Precompile&gt;&#xD;&#xA;&#xD;&#xA;However, the precompile trait is already implemented for `MultiCurrencyPrecompile`.&#xD;&#xA;Here is the implementation: &#xD;&#xA;&#xD;&#xA;    pub struct MultiCurrencyPrecompile&lt;Runtime&gt;(PhantomData&lt;Runtime&gt;);&#xD;&#xA;    &#xD;&#xA;    impl&lt;Runtime&gt; Precompile for MultiCurrencyPrecompile&lt;Runtime&gt;&#xD;&#xA;    where&#xD;&#xA;    	Runtime: currencies::Config + pallet_evm::Config + frame_system::Config,&#xD;&#xA;    	Runtime: Erc20Mapping,&#xD;&#xA;    	currencies::Pallet&lt;Runtime&gt;:&#xD;&#xA;    		MultiCurrencyTrait&lt;Runtime::AccountId, CurrencyId = FungibleTokenId, Balance = Balance&gt;,&#xD;&#xA;    	U256: From&lt;&#xD;&#xA;    		&lt;&lt;Runtime as currencies::Config&gt;::MultiSocialCurrency as MultiCurrencyTrait&lt;&#xD;&#xA;    			&lt;Runtime as frame_system::Config&gt;::AccountId,&#xD;&#xA;    		&gt;&gt;::Balance,&#xD;&#xA;    	&gt;,&#xD;&#xA;    	BalanceOf&lt;Runtime&gt;: TryFrom&lt;U256&gt; + Into&lt;U256&gt; + EvmData,&#xD;&#xA;    	&lt;&lt;Runtime as frame_system::Config&gt;::Call as Dispatchable&gt;::Origin: OriginTrait,&#xD;&#xA;    {&#xD;&#xA;    	fn execute(handle: &amp;mut impl PrecompileHandle) -&gt; PrecompileResult {&#xD;&#xA;    		let address = handle.code_address();&#xD;&#xA;    &#xD;&#xA;    		if let Some(currency_id) = Runtime::decode_evm_address(address) {&#xD;&#xA;    			log::debug!(target: &quot;evm&quot;, &quot;multicurrency: currency id: {:?}&quot;, currency_id);&#xD;&#xA;    &#xD;&#xA;    			let result = {&#xD;&#xA;    				let selector = match handle.read_selector() {&#xD;&#xA;    					Ok(selector) =&gt; selector,&#xD;&#xA;    					Err(e) =&gt; return Err(e),&#xD;&#xA;    				};&#xD;&#xA;    &#xD;&#xA;    				if let Err(err) = handle.check_function_modifier(match selector {&#xD;&#xA;    					Action::Approve | Action::Transfer | Action::TransferFrom =&gt; FunctionModifier::NonPayable,&#xD;&#xA;    					_ =&gt; FunctionModifier::View,&#xD;&#xA;    				}) {&#xD;&#xA;    					return Err(err);&#xD;&#xA;    				}&#xD;&#xA;    &#xD;&#xA;    				match selector {&#xD;&#xA;    					// Local and Foreign common&#xD;&#xA;    					Action::TotalSupply =&gt; Self::total_supply(currency_id, handle),&#xD;&#xA;    					Action::BalanceOf =&gt; Self::balance_of(currency_id, handle),&#xD;&#xA;    					Action::Allowance =&gt; Self::total_supply(currency_id, handle),&#xD;&#xA;    					Action::Transfer =&gt; Self::transfer(currency_id, handle),&#xD;&#xA;    					Action::Approve =&gt; Self::total_supply(currency_id, handle),&#xD;&#xA;    					Action::TransferFrom =&gt; Self::total_supply(currency_id, handle),&#xD;&#xA;    					Action::Name =&gt; Self::total_supply(currency_id, handle),&#xD;&#xA;    					Action::Symbol =&gt; Self::total_supply(currency_id, handle),&#xD;&#xA;    					Action::Decimals =&gt; Self::total_supply(currency_id, handle),&#xD;&#xA;    				}&#xD;&#xA;    			};&#xD;&#xA;    		}&#xD;&#xA;    		Err(PrecompileFailure::Revert {&#xD;&#xA;    			exit_status: ExitRevert::Reverted,&#xD;&#xA;    			output: &quot;invalid currency id&quot;.into(),&#xD;&#xA;    		})&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Also here is the implementation of the `MetaverseNetworkPrecompiles` used as `Precompiles` value:&#xD;&#xA;&#xD;&#xA;    impl&lt;R&gt; PrecompileSet for MetaverseNetworkPrecompiles&lt;R&gt;&#xD;&#xA;    where&#xD;&#xA;    	R: pallet_evm::Config + currencies::Config,&#xD;&#xA;    	MultiCurrencyPrecompile&lt;R&gt;: Precompile,&#xD;&#xA;    	Dispatch&lt;R&gt;: Precompile,&#xD;&#xA;    {&#xD;&#xA;    	fn execute(&amp;self, handle: &amp;mut impl PrecompileHandle) -&gt; Option&lt;PrecompileResult&gt; {&#xD;&#xA;    		let address = handle.code_address();&#xD;&#xA;    &#xD;&#xA;    		//		if self.is_precompile(address) &amp;&amp; address &gt; hash(9) &amp;&amp; handle.context().address != address {&#xD;&#xA;    		//			return Some(Err(PrecompileFailure::Revert {&#xD;&#xA;    		//				exit_status: ExitRevert::Reverted,&#xD;&#xA;    		//				output: b&quot;cannot be called with DELEGATECALL or CALLCODE&quot;.to_vec(),&#xD;&#xA;    		//			}));&#xD;&#xA;    		//		}&#xD;&#xA;    &#xD;&#xA;    		match address {&#xD;&#xA;    			// Ethereum precompiles :&#xD;&#xA;    			a if a == hash(1) =&gt; Some(ECRecover::execute(handle)),&#xD;&#xA;    			a if a == hash(2) =&gt; Some(Sha256::execute(handle)),&#xD;&#xA;    			a if a == hash(3) =&gt; Some(Ripemd160::execute(handle)),&#xD;&#xA;    			a if a == hash(4) =&gt; Some(Identity::execute(handle)),&#xD;&#xA;    			a if a == hash(5) =&gt; Some(Modexp::execute(handle)),&#xD;&#xA;    			a if a == hash(6) =&gt; Some(Bn128Add::execute(handle)),&#xD;&#xA;    			a if a == hash(7) =&gt; Some(Bn128Mul::execute(handle)),&#xD;&#xA;    			a if a == hash(8) =&gt; Some(Bn128Pairing::execute(handle)),&#xD;&#xA;    			a if a == hash(9) =&gt; Some(Blake2F::execute(handle)),&#xD;&#xA;    			// nor Ethereum precompiles :&#xD;&#xA;    			a if a == hash(1024) =&gt; Some(Sha3FIPS256::execute(handle)),&#xD;&#xA;    			a if a == hash(1025) =&gt; Some(Dispatch::&lt;R&gt;::execute(handle)),&#xD;&#xA;    			a if a == hash(1026) =&gt; Some(ECRecoverPublicKey::execute(handle)),&#xD;&#xA;    			a if a == hash(1027) =&gt; Some(Ed25519Verify::execute(handle)),&#xD;&#xA;    			// Metaverse Network precompiles&#xD;&#xA;    			// If the address matches asset prefix, the we route through the asset precompile set&#xD;&#xA;    			a if &amp;a.to_fixed_bytes()[0..9] == ASSET_PRECOMPILE_ADDRESS_PREFIX =&gt; {&#xD;&#xA;    				Some(MultiCurrencyPrecompile::&lt;R&gt;::execute(handle))&#xD;&#xA;    			}&#xD;&#xA;    			// Default&#xD;&#xA;    			_ =&gt; None,&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	fn is_precompile(&amp;self, address: H160) -&gt; bool {&#xD;&#xA;    		//		sp_std::vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 1024, 1025, 1026, 1027, 400]&#xD;&#xA;    		//			.into_iter()&#xD;&#xA;    		//			.map(hash)&#xD;&#xA;    		//			.any(|x| x == address)&#xD;&#xA;    		true&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Here is also the  part of the mock file which gives the build error&#xD;&#xA;&#xD;&#xA;    pub type Precompiles = MetaverseNetworkPrecompiles&lt;TestRuntime&gt;;&#xD;&#xA;    &#xD;&#xA;    parameter_types! {&#xD;&#xA;    	pub NetworkContractSource: H160 = H160::from_low_u64_be(1);&#xD;&#xA;    	pub const ChainId: u64 = 2042;&#xD;&#xA;    	pub BlockGasLimit: U256 = U256::from(u32::max_value());&#xD;&#xA;    	pub PrecompilesValue: Precompiles = MetaverseNetworkPrecompiles::&lt;_&gt;::new();&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_evm::Config for TestRuntime {&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type Currency = Balances;&#xD;&#xA;    &#xD;&#xA;    	type BlockGasLimit = BlockGasLimit;&#xD;&#xA;    	type ChainId = ChainId;&#xD;&#xA;    	type BlockHashMapping = EthereumBlockHashMapping&lt;Self&gt;;&#xD;&#xA;    	type Runner = pallet_evm::runner::stack::Runner&lt;Self&gt;;&#xD;&#xA;    &#xD;&#xA;    	type CallOrigin = EnsureAddressRoot&lt;AccountId&gt;;&#xD;&#xA;    	type WithdrawOrigin = EnsureAddressNever&lt;AccountId&gt;;&#xD;&#xA;    	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;    &#xD;&#xA;    	type FeeCalculator = ();&#xD;&#xA;    	type GasWeightMapping = ();&#xD;&#xA;    	type OnChargeTransaction = ();&#xD;&#xA;    	type FindAuthor = ();&#xD;&#xA;    	type PrecompilesType = Precompiles;&#xD;&#xA;    	type PrecompilesValue = PrecompilesValue;&#xD;&#xA;    	//type WeightInfo = pallet_evm::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Full implementation can be found [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chexware/Bit-Country-Blockchain/tree/feature/precompile-mock" ContentLicense="CC BY-SA 4.0" />
  <row Id="17439" PostHistoryTypeId="1" PostId="4667" RevisionGUID="e2aa557f-59a2-44a5-9dfd-f8f7916b15c0" CreationDate="2022-09-07T04:35:00.177" UserId="2065" Text="Building precompile mock results in error[E0277]: the trait bound `currencies::MultiCurrencyPrecompile&lt;TestRuntime&gt;: Precompile` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="17440" PostHistoryTypeId="3" PostId="4667" RevisionGUID="e2aa557f-59a2-44a5-9dfd-f8f7916b15c0" CreationDate="2022-09-07T04:35:00.177" UserId="2065" Text="|testing|evm|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17441" PostHistoryTypeId="5" PostId="4664" RevisionGUID="e4dc5a14-6316-4306-a829-f8687db56d0e" CreationDate="2022-09-07T04:55:12.293" UserId="590" Comment="deleted 3 characters in body" Text="Block weight is divided between 3 different types of transaction classes:&#xD;&#xA;&#xD;&#xA;- mandatory&#xD;&#xA;- operation&#xD;&#xA;- normal&#xD;&#xA;&#xD;&#xA;Each type has a `max_total`. The `max_total` *is used so that any one type does not dominate the block*. In any case, there is a `max_block` for which the sum of these classes cannot exceed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Below is an illustration with 3 normal transactions that have reach its limit, 2 mandatory transactions, and 1 operational transaction. Also, note that the block is not full.&#xD;&#xA;```&#xD;&#xA;/// |   |`max_block`&#xD;&#xA;/// |   | &#xD;&#xA;/// |   |                      -- `Mandatory` limit (unlimited)&#xD;&#xA;/// |#  |                 |   |&#xD;&#xA;/// |#  | `Ext3`          | - - `Operational` limit&#xD;&#xA;/// |#  | `Ext2`          |-  - `Normal` limit&#xD;&#xA;/// | # | `Ext1`          |#  |&#xD;&#xA;/// |  #| `on_initialize` |# #|&#xD;&#xA;/// |  #| `base_block`    |###|&#xD;&#xA;/// |NOM|                 |NOM|&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Questions:**&#xD;&#xA;&#xD;&#xA;1. Please tell me if the following understanding is correct:&#xD;&#xA;In the case that there are no more operational or mandatory transactions that can fill up the remaining space and normal transactions have reach its limit. A block is created and will NOT attempt to fill the remaining space with more normal transactions?&#xD;&#xA;&#xD;&#xA;2. If the above is true, what are the limitations that prevents an architectural design that attempts to always fill up the remaining space? &#xD;&#xA;&#xD;&#xA;3. Can I reach into the transaction pool to see if I can add more normal transactions to fill up the remaining space?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17442" PostHistoryTypeId="2" PostId="4668" RevisionGUID="b28a0aa0-81a1-4230-9880-b5bd2927e0a3" CreationDate="2022-09-07T07:10:27.450" UserId="3106" Text="I am using&#xD;&#xA;```&#xD;&#xA;const decodedEvent = Abi.decodeEvent(Uint8Array.from(Buffer.from(&quot;00000064a7b3b6e00d000000000000000000000000000000000000000000000000&quot;, 'hex'))) &#xD;&#xA;(00000064a7b3b6e00d000000000000000000000000000000000000000000000000 is the data in the contracts::contractemitted event.)&#xD;&#xA;```&#xD;&#xA;But I cannot access the actual argument values, only their types. I'd like to be able to access the values when decoding the event. What am I missing?&#xD;&#xA;&#xD;&#xA;Currently when accessing the decodedEvent.event.args, I only see the names and types. Where can I access the values?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17444" PostHistoryTypeId="1" PostId="4668" RevisionGUID="b28a0aa0-81a1-4230-9880-b5bd2927e0a3" CreationDate="2022-09-07T07:10:27.450" UserId="3106" Text="How to get event args values from contracts::contractemitted data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17445" PostHistoryTypeId="3" PostId="4668" RevisionGUID="b28a0aa0-81a1-4230-9880-b5bd2927e0a3" CreationDate="2022-09-07T07:10:27.450" UserId="3106" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17446" PostHistoryTypeId="2" PostId="4669" RevisionGUID="d75a6b2b-edf3-44b9-9bfe-b2dea3c875ed" CreationDate="2022-09-07T07:15:55.747" UserId="2025" Text="As you can see from the reference you linked, (most of) transactions in Polkadot relay chain pay an inclusion fee, so I would say that calling Polkadot &quot;fee-less&quot; is a misconception.&#xD;&#xA;&#xD;&#xA;However, there are exceptions to this and certain types of extrinsics are excluded from paying fees. This is the case of unsigned transactions (claim DOT token, heartbeats...). Since there is no key pair associated to them, fees can't be taken from any account.  But bear in mind that unsigned transactions are only used in special cases and each one needs its own, custom validation logic. &#xD;&#xA;&#xD;&#xA;Since Polkadot relay chain is a Substrate chain, I recommend you to read about [fees and weights on Substrate chains](https://docs.substrate.io/build/tx-weights-fees/). Also if you are interest in exploring feeless transactions and how to implement them on a Substrate chain, have a look to [this Substrate Exchange question](https://substrate.stackexchange.com/questions/1713/how-we-can-implement-gasless-feeless-transaction/1715#1715)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17448" PostHistoryTypeId="2" PostId="4670" RevisionGUID="4ff724d8-b8e4-47f1-b1ea-e9ca3a130205" CreationDate="2022-09-07T07:39:38.963" UserId="167" Text="- [`try-runtime::follow-chain`](https://paritytech.github.io/substrate/master/try_runtime_cli/enum.Command.html#variant.FollowChain) allows you to follow a chain's finalized blocks and apply the same extrinsics on top of a new WASM runtime. Indeed, because the `:CODE:` is different, and won't expect the state root check to pass in these blocks. &#xD;&#xA;&#xD;&#xA;This is mainly to ensure that the the transactions of alive chain execute successfully on top of a new runtime. &#xD;&#xA;&#xD;&#xA;Moreover, as of , you can add new auxiliary checks to each pallet (in [`try_state` hook](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.try_state)) that are executed only when you execute `try-runtime::follow-chain`. These could be checks that ensure your state is consistent, and all of its assumptions are hold. &#xD;&#xA;&#xD;&#xA;So, in other words, you don't do the state root check, because you are using a new runtime, but you could optionally execute more additional checks.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;`fork-of-substrate` only downloads the state of a chain, and creates a new dev network that uses that state as its genesis. Its purpose is to ensure that block production continues on top of that state. **These blocks are all empty.** They won't be equivalent to the real chain of choice anymore. &#xD;&#xA;&#xD;&#xA;Mixing these two concepts in the docs are in my opinion not a good idea and they are not that related. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Opinionated: I actually think `fork-of-substrate` does **not** provide that much meaningful information. Block production is mainly a function of the client side code, and putting a live chain's state on top of a `--dev` client is not a variable that can actually affect block production that much. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17450" PostHistoryTypeId="5" PostId="4666" RevisionGUID="a69f635d-c1b4-47a5-b56e-5ca395f201a4" CreationDate="2022-09-07T07:40:52.190" UserId="251" Comment="added 159 characters in body" Text="You can not store a negative balance on the storage. (I mean to use the `pallet-balances`, but you could write your own pallet.)&#xD;&#xA;&#xD;&#xA;But there are other ways to make it looks like negative.&#xD;&#xA;&#xD;&#xA;For example, you could add a lock on it.&#xD;&#xA;&#xD;&#xA;`usable = free - lock`&#xD;&#xA;&#xD;&#xA;If you set a big lock on this account. Then the usable balance is always `0`, unless `free &gt; lock`.&#xD;&#xA;&#xD;&#xA;And there are also a lot of ways to set a lock. I think you could start from the [`pallet-vesting`](https://github.com/paritytech/substrate/blob/master/frame/vesting/README.md).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;`total = reserved + free`&#xD;&#xA;&#xD;&#xA;You could also use reserved to implement this feature. But IIUC, you might need to write some code in this way." ContentLicense="CC BY-SA 4.0" />
  <row Id="17451" PostHistoryTypeId="2" PostId="4671" RevisionGUID="1c410aaa-65c7-49a0-8d72-c1a2ebf055fb" CreationDate="2022-09-07T07:42:30.203" UserId="3130" Text="I'm locally testing adding a new collator to two existing collators.&#xD;&#xA;&#xD;&#xA;I managed to set the aura key, add it to the `Invulnerables` list and let a new session start. I can see that `session.queuedKeys` storage has all of three collators` keys included but only the first two (already existing ones) are producing blocks.&#xD;&#xA;&#xD;&#xA;Is there some steps I'm missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17453" PostHistoryTypeId="1" PostId="4671" RevisionGUID="1c410aaa-65c7-49a0-8d72-c1a2ebf055fb" CreationDate="2022-09-07T07:42:30.203" UserId="3130" Text="New collators not producing blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="17454" PostHistoryTypeId="3" PostId="4671" RevisionGUID="1c410aaa-65c7-49a0-8d72-c1a2ebf055fb" CreationDate="2022-09-07T07:42:30.203" UserId="3130" Text="|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17455" PostHistoryTypeId="5" PostId="6" RevisionGUID="14f63fb7-8940-4897-8827-2c2561dd5699" CreationDate="2022-09-07T07:54:20.987" UserId="2025" Comment="fix links, better wording" Text="There are a lot of tutorials on https://docs.substrate.io/tutorials/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is one to convert &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="17456" PostHistoryTypeId="2" PostId="4672" RevisionGUID="d5423b83-f00c-443b-885f-2698e0f80705" CreationDate="2022-09-07T08:04:45.500" UserId="445" Text="&#xD;&#xA;I'm trying to debug in pallet-staking to figure out something about how validators/nominators join NPoS network.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs#L437&#xD;&#xA;&#xD;&#xA;Code:&#xD;&#xA;&#xD;&#xA;`log!(info, &quot;Staking: Try trigger new era: Election Result:{:?}&quot;, election_result);`&#xD;&#xA;&#xD;&#xA;Result when running node:&#xD;&#xA;&#xD;&#xA;`Staking: Try trigger new era: Election Result:[(, &lt;wasm:stripped&gt;), (, &lt;wasm:stripped&gt;)]`&#xD;&#xA;&#xD;&#xA;Question: What does`&lt;wasm:stripped&gt;` mean? This is only wasm binary? Can we convert this wasm to native rust?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17458" PostHistoryTypeId="1" PostId="4672" RevisionGUID="d5423b83-f00c-443b-885f-2698e0f80705" CreationDate="2022-09-07T08:04:45.500" UserId="445" Text="Fail to debug pallet-staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="17459" PostHistoryTypeId="3" PostId="4672" RevisionGUID="d5423b83-f00c-443b-885f-2698e0f80705" CreationDate="2022-09-07T08:04:45.500" UserId="445" Text="|substrate-node|polkadot|pallet|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17460" PostHistoryTypeId="2" PostId="4673" RevisionGUID="cb19a722-2baa-4ed0-83c8-7964c50e269d" CreationDate="2022-09-07T08:42:55.857" UserId="167" Text="When a type derives `RuntimeDebug` instead of `Debug`, then this string literal is printed ONLY in wasm. You have two options here: &#xD;&#xA;&#xD;&#xA;1. Run native&#xD;&#xA;2. Change the derive, and make sure the type derives `Debug`." ContentLicense="CC BY-SA 4.0" />
  <row Id="17462" PostHistoryTypeId="4" PostId="4672" RevisionGUID="a3dcd490-a180-472a-915e-853bc34c78cf" CreationDate="2022-09-07T08:43:28.620" UserId="167" Comment="edited title" Text="&lt;wasm:stripped&gt; printed when logging from the runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="17463" PostHistoryTypeId="2" PostId="4674" RevisionGUID="14aebd4f-b0bd-4c59-97ad-c88eeb5f0cf1" CreationDate="2022-09-07T10:46:48.600" UserId="2673" Text="It turned out I didn't actually need this kind of conversion which `BalanceToAssetBalance` offers. It's based on the ratio between the fungible’s minimum balance and the minimum asset balance, which was not relevant in my use case. So I ended up simply using the [`Convert`](https://paritytech.github.io/substrate/master/sp_runtime/traits/trait.Convert.html) trait (which, btw is required by `BalanceToAssetBalance`). [Here's](https://github.com/Wiezzel/substrate-dex/blob/203dd718020232439c26b4acefd1ceac0cbc99fd/src/lib.rs#L81-L83) how I implemented it." ContentLicense="CC BY-SA 4.0" />
  <row Id="17465" PostHistoryTypeId="2" PostId="4675" RevisionGUID="a7ebb321-f61f-4a33-96ce-1e2b3c103567" CreationDate="2022-09-07T11:02:19.137" UserId="3096" Text="I am trying to couple substrate node-template to frame support in order to use trait currency.&#xD;&#xA;Link to [github][1] link&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Error - &#xD;&#xA;&#xD;&#xA;    error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/data/substrate-node-template/runtime)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/data/substrate-node-template/target/release/build/node-template-runtime-55554732df6f82a1/build-script-build` (exit status: 1)&#xD;&#xA;      --- stdout&#xD;&#xA;      Information that should be included in a bug report.&#xD;&#xA;      Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/data/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;      Using rustc version: rustc 1.65.0-nightly (02654a084 2022-08-30)&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;         Compiling node-template-runtime v4.0.0-dev (/data/substrate-node-template/runtime)&#xD;&#xA;      warning: unused import: `frame_support::traits::Currency`&#xD;&#xA;       --&gt; /data/substrate-node-template/runtime/src/lib.rs:9:5&#xD;&#xA;        |&#xD;&#xA;      9 | use frame_support::traits::Currency;&#xD;&#xA;        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;        |&#xD;&#xA;        = note: `#[warn(unused_imports)]` on by default&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `u128: Currency&lt;AccountId32&gt;` is not satisfied&#xD;&#xA;         --&gt; /data/substrate-node-template/runtime/src/lib.rs:272:19&#xD;&#xA;          |&#xD;&#xA;      272 |      type Currency = Balance;&#xD;&#xA;          |                      ^^^^^^^ the trait `Currency&lt;AccountId32&gt;` is not implemented for `u128`&#xD;&#xA;          |&#xD;&#xA;          = help: the trait `Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;` is implemented for `pallet_balances::Pallet&lt;T, I&gt;`&#xD;&#xA;      note: required by a bound in `pallet_template::Config::Currency`&#xD;&#xA;         --&gt; /data/substrate-node-template/pallets/template/src/lib.rs:36:18&#xD;&#xA;          |&#xD;&#xA;      36  |         type Currency: Currency&lt;Self::AccountId&gt;;&#xD;&#xA;          |                        ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_template::Config::Currency`&#xD;&#xA;    &#xD;&#xA;      For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;      warning: `node-template-runtime` (lib) generated 1 warning&#xD;&#xA;      error: could not compile `node-template-runtime` due to previous error; 1 warning &#xD;&#xA;&#xD;&#xA;emitted`enter code here`&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/sky-vibhu/customised-pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="17467" PostHistoryTypeId="1" PostId="4675" RevisionGUID="a7ebb321-f61f-4a33-96ce-1e2b3c103567" CreationDate="2022-09-07T11:02:19.137" UserId="3096" Text="Getting error while trying to loosely couple node-template to frame support" ContentLicense="CC BY-SA 4.0" />
  <row Id="17468" PostHistoryTypeId="3" PostId="4675" RevisionGUID="a7ebb321-f61f-4a33-96ce-1e2b3c103567" CreationDate="2022-09-07T11:02:19.137" UserId="3096" Text="|pallet|substrate-node-template|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17469" PostHistoryTypeId="2" PostId="4676" RevisionGUID="bed082db-4121-4e71-852f-e3899902ef21" CreationDate="2022-09-07T11:14:26.160" UserId="2673" Text="I suspect you need to write `type Currency = Balances`, not `Balance`.&#xD;&#xA;While `Balances` is an instance of `pallet_balances`, `Balance` is just an alias for `u128`. It's the former that implements the `Currency` trait, not the latter." ContentLicense="CC BY-SA 4.0" />
  <row Id="17471" PostHistoryTypeId="2" PostId="4677" RevisionGUID="06cd1e2c-3968-4310-bcb7-b26a913b82f4" CreationDate="2022-09-07T12:38:56.240" UserId="1805" Text="Reading through this: https://polkadot.js.org/docs/api/start/api.query.multi/&#xD;&#xA;It states &quot;It should be trivially extendable to subscribe to the validators, track which one have entered or left&quot;. How is this possible? I thought that something like this would work but it doesn't&#xD;&#xA;&#xD;&#xA;```api.query.staking.validators.multi((validators) =&gt; {console.log(validators)});```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17473" PostHistoryTypeId="1" PostId="4677" RevisionGUID="06cd1e2c-3968-4310-bcb7-b26a913b82f4" CreationDate="2022-09-07T12:38:56.240" UserId="1805" Text="Subscribe to all storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="17474" PostHistoryTypeId="3" PostId="4677" RevisionGUID="06cd1e2c-3968-4310-bcb7-b26a913b82f4" CreationDate="2022-09-07T12:38:56.240" UserId="1805" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17475" PostHistoryTypeId="4" PostId="4659" RevisionGUID="b7d2420b-e3a5-4bb3-b020-7fe021c3ea2f" CreationDate="2022-09-07T13:11:29.097" UserId="2673" Comment="Specify that the question is about the node template" Text="Substrate node template: ./scripts/docker_run.sh command does not work" ContentLicense="CC BY-SA 4.0" />
  <row Id="17476" PostHistoryTypeId="6" PostId="4659" RevisionGUID="b7d2420b-e3a5-4bb3-b020-7fe021c3ea2f" CreationDate="2022-09-07T13:11:29.097" UserId="2673" Comment="Specify that the question is about the node template" Text="|substrate-node|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17477" PostHistoryTypeId="24" PostId="4659" RevisionGUID="b7d2420b-e3a5-4bb3-b020-7fe021c3ea2f" CreationDate="2022-09-07T13:11:29.097" Comment="Proposed by 2673 approved by 94, 29 edit id of 273" ContentLicense="CC BY-SA 4.0" />
  <row Id="17479" PostHistoryTypeId="5" PostId="4670" RevisionGUID="4bf0505c-bee8-4b17-9b46-286bb2e84c91" CreationDate="2022-09-07T13:20:48.587" UserId="29" Comment="added 1 character in body" Text="- [`try-runtime::follow-chain`](https://paritytech.github.io/substrate/master/try_runtime_cli/enum.Command.html#variant.FollowChain) allows you to follow a chain's finalized blocks and apply the same extrinsics on top of a new WASM runtime. Indeed, because the `:CODE:` is different, and won't expect the state root check to pass in these blocks. &#xD;&#xA;&#xD;&#xA;This is mainly to ensure that the the transactions of a live chain execute successfully on top of a new runtime. &#xD;&#xA;&#xD;&#xA;Moreover, as of , you can add new auxiliary checks to each pallet (in [`try_state` hook](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.try_state)) that are executed only when you execute `try-runtime::follow-chain`. These could be checks that ensure your state is consistent, and all of its assumptions are hold. &#xD;&#xA;&#xD;&#xA;So, in other words, you don't do the state root check, because you are using a new runtime, but you could optionally execute more additional checks.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;`fork-of-substrate` only downloads the state of a chain, and creates a new dev network that uses that state as its genesis. Its purpose is to ensure that block production continues on top of that state. **These blocks are all empty.** They won't be equivalent to the real chain of choice anymore. &#xD;&#xA;&#xD;&#xA;Mixing these two concepts in the docs are in my opinion not a good idea and they are not that related. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Opinionated: I actually think `fork-of-substrate` does **not** provide that much meaningful information. Block production is mainly a function of the client side code, and putting a live chain's state on top of a `--dev` client is not a variable that can actually affect block production that much. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17481" PostHistoryTypeId="2" PostId="4678" RevisionGUID="b5c291db-5318-4206-bd62-4e900c9ac026" CreationDate="2022-09-07T13:24:22.587" UserId="85" Text="Look at how [smoldot][1] is constructed. It's specific to polkadot/parachain chains rather than a generic solution though. There's a lot of constraints if your targeting a light client that can run in the browser.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/smoldot/" ContentLicense="CC BY-SA 4.0" />
  <row Id="17483" PostHistoryTypeId="6" PostId="4550" RevisionGUID="927db3c2-9263-4fb6-a606-5463a0d52c29" CreationDate="2022-09-07T13:25:29.427" UserId="85" Comment="edited tags" Text="|account|python|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17484" PostHistoryTypeId="2" PostId="4679" RevisionGUID="ea576253-8efc-46e1-a4e7-bf4bcafbfaf5" CreationDate="2022-09-07T14:35:52.623" UserId="2749" Text="I am working on Substrate node update.&#xD;&#xA;&#xD;&#xA;During the testing, I found out that the deployed smart contract ([incrementer, tag: v3.0.0-rc4][1]) &quot;dies&quot; during the node updates from:&#xD;&#xA;&#xD;&#xA; 1. [v0.8.27][2] to [v0.8.28][3];&#xD;&#xA; 2. [v0.8.28][3] to [v0.8.29][4];&#xD;&#xA; 3. [v0.8.29][4] to [v0.8.30][5].&#xD;&#xA;&#xD;&#xA;What does &quot;dies&quot; mean?&#xD;&#xA;The network sees the SC but during execution the following errors are received:&#xD;&#xA;&#xD;&#xA; 1. In Polkadot.js apps' console;&#xD;&#xA;    ```&#xD;&#xA;    RPC-CORE: rentProjection(address: AccountId, at?: BlockHash): Option&lt;BlockNumber&gt;:: 3: The contract is a tombstone and doesn't have any storage.&#xD;&#xA;    ```&#xD;&#xA; 2. Transaction fails in the Network.&#xD;&#xA;    ```&#xD;&#xA;    DispatchError&#xD;&#xA;    {&#xD;&#xA;      Module: {&#xD;&#xA;        index: 17,&#xD;&#xA;        error: 12&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    type&#xD;&#xA;    contracts.NotCallable&#xD;&#xA;&#xD;&#xA;    details&#xD;&#xA;    The contract that was called is either no contract at all (a plain account),  or is a tombstone.&#xD;&#xA;&#xD;&#xA;    DispatchInfo&#xD;&#xA;    {&#xD;&#xA;      weight: 0,&#xD;&#xA;      class: Normal,&#xD;&#xA;      paysFee: Yes&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;At the same time:&#xD;&#xA;  1. I am able to deploy SC each time after node runtime update and it is working as expected;&#xD;&#xA;  2. Starting [v0.8.30][5] -&gt; [v0.9.0][6] this issue is not reproducing (tested up to [0.9.3][7] including).&#xD;&#xA;&#xD;&#xA;Does somebody have any ideas on how to avoid &quot;dying&quot;?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/tree/v3.0.0-rc4/examples/incrementer&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/polkadot-release-v0.8.27&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/polkadot-v0.8.28&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/tree/polkadot-v0.8.29&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot/releases/tag/v0.8.30&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/commit/dc9acd2d74a5451a63e34060a4c7869021780b3e&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.3" ContentLicense="CC BY-SA 4.0" />
  <row Id="17486" PostHistoryTypeId="1" PostId="4679" RevisionGUID="ea576253-8efc-46e1-a4e7-bf4bcafbfaf5" CreationDate="2022-09-07T14:35:52.623" UserId="2749" Text="ink Smart Contract &quot;dies&quot; after the node runtime update" ContentLicense="CC BY-SA 4.0" />
  <row Id="17487" PostHistoryTypeId="3" PostId="4679" RevisionGUID="ea576253-8efc-46e1-a4e7-bf4bcafbfaf5" CreationDate="2022-09-07T14:35:52.623" UserId="2749" Text="|substrate-node|ink|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17488" PostHistoryTypeId="2" PostId="4680" RevisionGUID="5ec2ffc0-a680-4972-bfb7-767e18384d80" CreationDate="2022-09-07T15:00:02.447" UserId="1789" Text="Every time when I start my parachain, I see Alice, Bob, Charlie, Dave,... etc and each of them has 1.1529 MUNIT on Polkadot.js.org's Accounts -&gt; Accounts -&gt; My Account page. &#xD;&#xA;&#xD;&#xA;How does Polkadot.js.org get those initial account balances?&#xD;&#xA;&#xD;&#xA;I found this code in chain_spec.rs in substrate-parachain-template repository https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/node/src/chain_spec.rs#L119 :&#xD;&#xA;```&#xD;&#xA;pub fn development_config() -&gt; ChainSpec {&#xD;&#xA;    // the same code as in local_testnet_config() below, except:&#xD;&#xA;    // Name: &quot;Development&quot;,&#xD;&#xA;	// ID  : &quot;dev&quot;,&#xD;&#xA;    // ChainType::Development&#xD;&#xA;    // Protocol ID and Properties: None,&#xD;&#xA;}&#xD;&#xA;pub fn local_testnet_config() -&gt; ChainSpec {&#xD;&#xA;	// Give your base currency a unit name and decimal places&#xD;&#xA;	let mut properties = sc_chain_spec::Properties::new();&#xD;&#xA;	properties.insert(&quot;tokenSymbol&quot;.into(), &quot;UNIT&quot;.into());&#xD;&#xA;	properties.insert(&quot;tokenDecimals&quot;.into(), 12.into());&#xD;&#xA;	properties.insert(&quot;ss58Format&quot;.into(), 42.into());&#xD;&#xA;&#xD;&#xA;	ChainSpec::from_genesis(&#xD;&#xA;		// Name&#xD;&#xA;		&quot;Local Testnet&quot;,&#xD;&#xA;		// ID&#xD;&#xA;		&quot;local_testnet&quot;,&#xD;&#xA;		ChainType::Local,&#xD;&#xA;		move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				// initial collators.&#xD;&#xA;				vec![&#xD;&#xA;					(&#xD;&#xA;						get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;						get_collator_keys_from_seed(&quot;Alice&quot;),&#xD;&#xA;					),&#xD;&#xA;					(&#xD;&#xA;						get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;						get_collator_keys_from_seed(&quot;Bob&quot;),&#xD;&#xA;					),&#xD;&#xA;				],&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;				],&#xD;&#xA;				1000.into(),&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;		// Bootnodes&#xD;&#xA;		Vec::new(),&#xD;&#xA;		// Telemetry&#xD;&#xA;		None,&#xD;&#xA;		// Protocol ID&#xD;&#xA;		Some(&quot;template-local&quot;),&#xD;&#xA;		// Fork ID&#xD;&#xA;		None,&#xD;&#xA;		// Properties&#xD;&#xA;		Some(properties),&#xD;&#xA;		// Extensions&#xD;&#xA;		Extensions {&#xD;&#xA;			relay_chain: &quot;rococo-local&quot;.into(), // You MUST set this to the correct network!&#xD;&#xA;			para_id: 1000,&#xD;&#xA;		},&#xD;&#xA;	)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;	invulnerables: Vec&lt;(AccountId, AuraId)&gt;,&#xD;&#xA;	endowed_accounts: Vec&lt;AccountId&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	id: ParaId,&#xD;&#xA;) -&gt; GenesisConfig {&#xD;&#xA;        system: SystemConfig { ... },&#xD;&#xA;		balances: hero_runtime::BalancesConfig {&#xD;&#xA;			balances: endowed_accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect(),&#xD;&#xA;		},&#xD;&#xA;        parachain_info: hero_runtime::ParachainInfoConfig { parachain_id: id },&#xD;&#xA;        ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I see this `balances: endowed_accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect(),` maps ALICE, BOB, etc.. to `1 &lt;&lt; 60`, which uses Rust's left shift operator to make ( A &lt;&lt; B ) equivalent to A*2^B&#xD;&#xA;&#xD;&#xA;for example: &#xD;&#xA;&#xD;&#xA;1000 &lt;&lt; 2 returns  1000*(2^2) = 4000&#xD;&#xA;&#xD;&#xA;1 &lt;&lt; 60 returns 1*(2^60) = 1.152921505×10^18, which matches what I saw in Polkadot.js.org&#xD;&#xA;&#xD;&#xA;But both `development_config()` or `local_testnet_config()` use this `testnet_genesis()` to generate initial account balances.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I ran my local parachain with a local relay chain as described in &quot;Connect other chains&quot; https://docs.substrate.io/tutorials/connect-other-chains/, was I running it through `development_config()` or `local_testnet_config()` ?&#xD;&#xA;&#xD;&#xA;Both those two config functions use `testnet_genesis()` &#xD;&#xA;```&#xD;&#xA;fn testnet_genesis(&#xD;&#xA;  invulnerables: Vec&lt;(AccountId, AuraId)&gt;,&#xD;&#xA;  endowed_accounts: Vec&lt;AccountId&gt;,&#xD;&#xA;  root_key: AccountId,&#xD;&#xA;  id: ParaId,&#xD;&#xA;){ ... }&#xD;&#xA;```&#xD;&#xA;What determines this `testnet_genesis()` `id` argument to be `1000.into(),` or `2000.into(),`? &#xD;&#xA;&#xD;&#xA;When running my parachain locally with relay chain, I need to reserve paraId 2000 as described in the above &quot;Connect other chains&quot; tutorial.&#xD;&#xA;&#xD;&#xA;Does this paraId 2000 determine the `testnet_genesis()` id argument to be `2000.into()`?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17490" PostHistoryTypeId="1" PostId="4680" RevisionGUID="5ec2ffc0-a680-4972-bfb7-767e18384d80" CreationDate="2022-09-07T15:00:02.447" UserId="1789" Text="Where does initial ALICE account balance come from? From development_config() or local_testnet_config() in chain_spec.rs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17491" PostHistoryTypeId="3" PostId="4680" RevisionGUID="5ec2ffc0-a680-4972-bfb7-767e18384d80" CreationDate="2022-09-07T15:00:02.447" UserId="1789" Text="|polkadot-js|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17492" PostHistoryTypeId="50" PostId="3974" RevisionGUID="7fbfc033-b992-4221-9dd6-4b4510d0e7e3" CreationDate="2022-09-07T15:05:20.543" UserId="-1" />
  <row Id="17493" PostHistoryTypeId="2" PostId="4681" RevisionGUID="acc6c832-4ae6-4f44-bd97-46579926c82a" CreationDate="2022-09-07T15:33:38.543" UserId="2749" Text="I am working on a Substrate node update.&#xD;&#xA;&#xD;&#xA;I am following [Polkadot's releases][1] not to skip migrations.&#xD;&#xA;&#xD;&#xA;Some node runtime updates require node client updates. This information can be found in Polkadot's releases. For example, [v0.9.0][2] or [v0.9.8][3].&#xD;&#xA;&#xD;&#xA;During testing on dev networks, I found out that [v0.8.27][4] and [v0.9.5][5] also require node client updates. I am receiving the following error during connection to a node after node runtime applying via forkless upgrade:&#xD;&#xA;```&#xD;&#xA;FATAL: Unable to initialize the API: -32603: Unknown error occurred: Client, VersionInvalid, Other, \&quot;Instantiation: Export ext_default_child_storage_storage_kill_version_2 not found\&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can it be missed information in Polkadot's release logs or is something wrong on my end?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/releases&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/releases/tag/v0.9.0&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/releases/tag/v0.9.8&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/releases/tag/v0.8.27&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot/releases/tag/v0.9.5" ContentLicense="CC BY-SA 4.0" />
  <row Id="17495" PostHistoryTypeId="1" PostId="4681" RevisionGUID="acc6c832-4ae6-4f44-bd97-46579926c82a" CreationDate="2022-09-07T15:33:38.543" UserId="2749" Text="Node client updates require where they should not be according to Polkadot's release notes" ContentLicense="CC BY-SA 4.0" />
  <row Id="17496" PostHistoryTypeId="3" PostId="4681" RevisionGUID="acc6c832-4ae6-4f44-bd97-46579926c82a" CreationDate="2022-09-07T15:33:38.543" UserId="2749" Text="|substrate-node|polkadot|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17497" PostHistoryTypeId="50" PostId="4119" RevisionGUID="36dc0579-637b-4eb3-9c52-d6310897d1ef" CreationDate="2022-09-07T16:05:15.593" UserId="-1" />
  <row Id="17498" PostHistoryTypeId="52" PostId="4672" RevisionGUID="25ecf633-5add-41f5-8d0f-a5b54030b23e" CreationDate="2022-09-07T16:07:01.623" />
  <row Id="17499" PostHistoryTypeId="5" PostId="4020" RevisionGUID="5a7a5e0b-5d95-4a1b-a0a9-13b95e93888a" CreationDate="2022-09-07T16:23:32.540" UserId="560" Comment="deleted 6 characters in body" Text="I'm trying to get fork-off to work with a pair of custom types(https://github.com/hicommonwealth/edgeware-node-types) and I am getting fork-off-substrate to work with a WS socket instead of a HTTP RPC socket(because i couldnt get the HttpProvider to work with the custom specs):&#xD;&#xA;```js&#xD;&#xA;const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;const { HttpProvider } = require('@polkadot/rpc-provider');&#xD;&#xA;const { spec } = require('@edgeware/node-types');&#xD;&#xA;&#xD;&#xA;//const provider = new HttpProvider(process.env.HTTP_RPC_ENDPOINT || 'http://localhost:9933')&#xD;&#xA;// NEW&#xD;&#xA;const provider = new WsProvider(process.env.HTTP_RPC_ENDPOINT);&#xD;&#xA;//....&#xD;&#xA;&#xD;&#xA;// Connect&#xD;&#xA;api = await ApiPromise.create({ provider, ...spec });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but it breaks at 37%&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;HTTP_RPC_ENDPOINT=ws://mynode:9989 npm start&#xD;&#xA;We are intentionally using the HTTP endpoint. If you see any warnings about that, please ignore them.&#xD;&#xA;Custom Schema missing, using default schema.&#xD;&#xA;2022-07-31 15:26:21        API/INIT: RPC methods not decorated: contracts_upload_code, dev_getBlockStats, eth_feeHistory, eth_maxPriorityFeePerGas&#xD;&#xA;api promise ok&#xD;&#xA;Fetching current state of the live chain. Please wait, it can take a while depending on the size of your chain.&#xD;&#xA; ███████████████░░░░░░░░░░░░░░░░░░░░░░░░░ 37% | ETA: 117s | 95/256&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2022-07-31 15:29:43          API-WS: disconnected from ws://5.9.83.210:9989: 1009:: Maximum message size exceeded.&#xD;&#xA;2022-07-31 15:29:43        RPC-CORE: health(): Health:: disconnected from ws://host:9989: 1009:: Maximum message size exceeded.&#xD;&#xA;/fork-off-substrate/node_modules/@polkadot/rpc-provider/ws/index.cjs:197&#xD;&#xA;        const error = new Error(`disconnected from ${(0, _classPrivateFieldLooseBase2.default)(this, _endpoints)[_endpoints][(0, _classPrivateFieldLooseBase2;&#xD;&#xA;                      ^&#xD;&#xA;&#xD;&#xA;Error: disconnected from ws://5.9.83.210:9989: 1009:: Maximum message size exceeded.&#xD;&#xA;    at W3CWebSocket.value (//chain_data/fork-off-substrate/node_modules/@polkadot/rpc-provider/ws/index.cjs:197:23)&#xD;&#xA;    at W3CWebSocket._dispatchEvent [as dispatchEvent] (/chain_data/fork-off-substrate/node_modules/yaeti/lib/EventTarget.js:107)&#xD;&#xA;    at W3CWebSocket.onClose (/chain_data/fork-off-substrate/node_modules/websocket/lib/W3CWebSocket.js:228:10)&#xD;&#xA;    at WebSocketConnection.&lt;anonymous&gt; (/chain_data/fork-off-substrate/node_modules/websocket/lib/W3CWebSocket.js:201:17)&#xD;&#xA;    at WebSocketConnection.emit (node:events:527:28)&#xD;&#xA;    at WebSocketConnection.drop (/chain_data/fork-off-substrate/node_modules/websocket/lib/WebSocketConnection.js:475:14)&#xD;&#xA;    at WebSocketConnection.processFrame (/chain_data/fork-off-substrate/node_modules/websocket/lib/WebSocketConnection.js:578:2)&#xD;&#xA;    at //chain_data/fork-off-substrate/node_modules/websocket/lib/WebSocketConnection.js:323:40&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:78:11)&#xD;&#xA;&#xD;&#xA;Node.js v17.8.0&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Substrate node:&#xD;&#xA;https://github.com/edgeware-network/edgeware-node/tree/erup-5-latest&#xD;&#xA;&#xD;&#xA;I tried to increase the rpc-max-limit flag, but it doesnt work :/&#xD;&#xA;Does anyone have any ideas on how to solve this?&#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;/tmp/edgeware-node # ./../bc/edgeware-node/target/re&#xD;&#xA;lease/edgeware --chain=edgeware -d datal --rpc-port 9988 --unsafe-rpc-external --rpc-external --ws-external --rpc-cors=all --ws-port 9989 --rpc-methods=Unsafe --name flipchan_testing --max-runtime-instances 256  --ws-max-out-buffer-capacity=9999 --rpc-max-payload=9991024                                &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17500" PostHistoryTypeId="2" PostId="4682" RevisionGUID="2491016e-b423-42e3-8b95-051b7363a656" CreationDate="2022-09-07T16:24:06.180" UserId="703" Text="&gt; Was I running it through development_config() or local_testnet_config() ?&#xD;&#xA;&#xD;&#xA;By default, you are running it through `local_testnet_config`. This default configuration can be found in `node/src/command.rs` in the `load_spec` function. See [here][1]:&#xD;&#xA;```&#xD;&#xA;fn load_spec(id: &amp;str) -&gt; std::result::Result&lt;Box&lt;dyn ChainSpec&gt;, String&gt; {&#xD;&#xA;	Ok(match id {&#xD;&#xA;		&quot;dev&quot; =&gt; Box::new(chain_spec::development_config()),&#xD;&#xA;		&quot;template-rococo&quot; =&gt; Box::new(chain_spec::local_testnet_config()),&#xD;&#xA;		&quot;&quot; | &quot;local&quot; =&gt; Box::new(chain_spec::local_testnet_config()),&#xD;&#xA;		path =&gt; Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?),&#xD;&#xA;	})&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The last match arm `&quot;&quot; | &quot;local&quot;` is the one that runs by default (empty string). If you wanted to change which chain-spec is used (e.g. &quot;dev&quot;), simply provide `--chain &quot;dev&quot;` to your run command. To go one step further, play around with the build-spec command and compare the outputted files. &#xD;&#xA;```&#xD;&#xA;#generate dev spec (uses development_config)&#xD;&#xA;./target/release/&lt;node-executable&gt; build-spec --chain dev &gt; dev-spec.json&#xD;&#xA;&#xD;&#xA;#generate local spec (uses local_testnet_config)&#xD;&#xA;./target/release/&lt;node-executable&gt; build-spec --chain local &gt; local-spec.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; What determines this testnet_genesis() id argument to be 1000.into(), or 2000.into(),?&#xD;&#xA;&#xD;&#xA;As you noted, the `paraID` you register on the relay chain must be placed into the `id` field in the chain spec.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/node/src/command.rs#L30" ContentLicense="CC BY-SA 4.0" />
  <row Id="17502" PostHistoryTypeId="5" PostId="4682" RevisionGUID="14647379-2bd3-417b-b46a-0108df05dc3f" CreationDate="2022-09-07T16:30:39.213" UserId="703" Comment="Added details for testnet_genesis and initial balances." Text="&gt; Was I running it through development_config() or local_testnet_config() ?&#xD;&#xA;&#xD;&#xA;By default, you are running it through `local_testnet_config`. This default configuration can be found in `node/src/command.rs` in the `load_spec` function. See [here][1]:&#xD;&#xA;```&#xD;&#xA;fn load_spec(id: &amp;str) -&gt; std::result::Result&lt;Box&lt;dyn ChainSpec&gt;, String&gt; {&#xD;&#xA;	Ok(match id {&#xD;&#xA;		&quot;dev&quot; =&gt; Box::new(chain_spec::development_config()),&#xD;&#xA;		&quot;template-rococo&quot; =&gt; Box::new(chain_spec::local_testnet_config()),&#xD;&#xA;		&quot;&quot; | &quot;local&quot; =&gt; Box::new(chain_spec::local_testnet_config()),&#xD;&#xA;		path =&gt; Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?),&#xD;&#xA;	})&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The last match arm `&quot;&quot; | &quot;local&quot;` is the one that runs by default (empty string). If you wanted to change which chain-spec is used (e.g. &quot;dev&quot;), simply provide `--chain &quot;dev&quot;` to your run command. To go one step further, play around with the build-spec command and compare the outputted files. &#xD;&#xA;```&#xD;&#xA;#generate dev spec (uses development_config)&#xD;&#xA;./target/release/&lt;node-executable&gt; build-spec --chain dev &gt; dev-spec.json&#xD;&#xA;&#xD;&#xA;#generate local spec (uses local_testnet_config)&#xD;&#xA;./target/release/&lt;node-executable&gt; build-spec --chain local &gt; local-spec.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Furthermore, you are correct in noting that both `development_config` and `local_testnet_config` use `testnet_genesis`. So, either way (in this case) the balances will come from `testnet_genesis`. However, you could easily modify this file to have, for example, a `testnet_genesis` and `dev_genesis` that use different balances. You could also alter which accounts have initial balances in `local_testnet_config` or `development_config`. &#xD;&#xA;&#xD;&#xA;&gt; What determines this testnet_genesis() id argument to be 1000.into(), or 2000.into(),?&#xD;&#xA;&#xD;&#xA;As you noted, the `paraID` you register on the relay chain must be placed into the `id` field in the chain spec.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/node/src/command.rs#L30" ContentLicense="CC BY-SA 4.0" />
  <row Id="17503" PostHistoryTypeId="2" PostId="4683" RevisionGUID="b88cb070-090f-4518-b69e-e8ba8841b82b" CreationDate="2022-09-07T17:40:26.863" UserId="380" Text="If you're using the substrate contracts node then the balances are coming from the [`chain_spec.rs`](https://github.com/paritytech/substrate-contracts-node/blob/b2f89dc1b5f8a21f8a4e6fb2a7ba90ac880b52cc/node/src/chain_spec.rs#L139) file.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		balances: BalancesConfig {&#xD;&#xA;			// Configure endowed accounts with initial balance of 1 &lt;&lt; 60.&#xD;&#xA;			balances: endowed_accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect(),&#xD;&#xA;		},&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17505" PostHistoryTypeId="2" PostId="4684" RevisionGUID="a9379773-d55e-4b0b-a034-7fdf72e93638" CreationDate="2022-09-07T22:01:15.543" UserId="3133" Text="By my calculations Polkadot should create 1 block every 6 seconds which is confirmed by looking at https://polkadot.subscan.io/ - however it states there are only 12M blocks when there should be many more blocks since launch date.&#xD;&#xA;&#xD;&#xA;Can anyone explain the difference?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17507" PostHistoryTypeId="1" PostId="4684" RevisionGUID="a9379773-d55e-4b0b-a034-7fdf72e93638" CreationDate="2022-09-07T22:01:15.543" UserId="3133" Text="Why Does Subscan Show Only 12M Blocks And Not Several 100M?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17508" PostHistoryTypeId="3" PostId="4684" RevisionGUID="a9379773-d55e-4b0b-a034-7fdf72e93638" CreationDate="2022-09-07T22:01:15.543" UserId="3133" Text="|polkadot|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17509" PostHistoryTypeId="2" PostId="4685" RevisionGUID="4d13dcb7-63e6-44db-b544-8b25e9fc0fec" CreationDate="2022-09-07T22:19:13.753" UserId="73" Text="Polkadot is running since roughly two years. If you take this into account:&#xD;&#xA;`2 years * 365 days * 24 hours * 60 minutes * 60 seconds / 6`&#xD;&#xA;&#xD;&#xA;You will end up with `10512000`. So, not really several 100 millions." ContentLicense="CC BY-SA 4.0" />
  <row Id="17511" PostHistoryTypeId="5" PostId="4671" RevisionGUID="fbac5bce-149e-4794-92c3-a183c8fde146" CreationDate="2022-09-07T22:23:32.903" UserId="3130" Comment="added 194 characters in body" Text="I'm locally testing adding a new collator to two existing collators.&#xD;&#xA;&#xD;&#xA;I managed to:&#xD;&#xA;- set the aura key,&#xD;&#xA;  - `ext.session.setKeys` to set public key&#xD;&#xA;  - `rpc.author.insertKeys` to set private key&#xD;&#xA;- add it to the `Invulnerables` list and&#xD;&#xA;- let a new session start&#xD;&#xA;&#xD;&#xA;I can see that `session.queuedKeys` storage has all of three collators' keys included but only the first two (already existing ones) are producing blocks.&#xD;&#xA;&#xD;&#xA;Is there some steps I'm missing? I'm using the `polkadot:v0.9.19` image for relay chain.&#xD;&#xA;&#xD;&#xA;Edit: some more details given" ContentLicense="CC BY-SA 4.0" />
  <row Id="17512" PostHistoryTypeId="2" PostId="4686" RevisionGUID="9f0e8ef3-5e38-490b-b71a-34928e763ea0" CreationDate="2022-09-07T22:30:46.650" UserId="2065" Text="Got a similar issue when running builds on Ubuntu. Managed to resolve it by installing jemalloc via `sudo apt install libjemalloc2` " ContentLicense="CC BY-SA 4.0" />
  <row Id="17514" PostHistoryTypeId="2" PostId="4687" RevisionGUID="aa5c51f0-71f8-4509-9505-b8f0c77963ae" CreationDate="2022-09-07T22:41:35.017" UserId="2340" Text="I have some code that benchmarks one of my extrinsic.&#xD;&#xA;```&#xD;&#xA;benchmarks! {&#xD;&#xA;	create_supersig {&#xD;&#xA;		let z in 0 .. 10;&#xD;&#xA;&#xD;&#xA;		let alice: T::AccountId = get_account::&lt;T&gt;(&quot;ALICE&quot;);&#xD;&#xA;		let bob: T::AccountId = get_account::&lt;T&gt;(&quot;BOB&quot;);&#xD;&#xA;		let charlie: T::AccountId = get_account::&lt;T&gt;(&quot;CHARLIE&quot;);&#xD;&#xA;		let val: BalanceOf&lt;T&gt; = 4_000_000_000u32.into();&#xD;&#xA;		T::Currency::make_free_balance_be(&amp;alice, val.saturating_mul(4_000_000_000u32.into()));&#xD;&#xA;&#xD;&#xA;		let mut vec_members = vec!{(alice.clone(), Role::Standard), (bob, Role::Standard), (charlie, Role::Standard)};&#xD;&#xA;		let oui = &quot;oui&quot;;&#xD;&#xA;		for i in 0 .. z {&#xD;&#xA;			let acc = benchmark_account(oui, i, 0);&#xD;&#xA;			vec_members.push((acc, Role::Standard));&#xD;&#xA;		}&#xD;&#xA;		let members: BoundedVec&lt;_, _&gt; = vec_members.try_into().unwrap();&#xD;&#xA;	}: _(RawOrigin::Signed(alice.clone()), members.clone())&#xD;&#xA;	verify {&#xD;&#xA;		assert_eq!(Pallet::&lt;T&gt;::nonce_supersig(), 1);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`members` is a bounded `Vec` of the members of the organization I'm creating.&#xD;&#xA;The code (and other variations I tried) panic when I try to build the `BoundedVec`, at:&#xD;&#xA;```&#xD;&#xA;		let members: BoundedVec&lt;_, _&gt; = vec_members.try_into().unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I remove the loop filling the `Vec`, which means that the bounded `Vec` will always be the same length (aka the same type), it doesn't panic anymore.&#xD;&#xA;&#xD;&#xA;Is it because:&#xD;&#xA;- I'm not using `BoundedVec` the right way&#xD;&#xA;- I cannot use `BoundedVec` like this in benchmarks (probably due to the work done by the macro)&#xD;&#xA;&#xD;&#xA;What should I do? &#xD;&#xA;1) change the type expected by my extrinsic from `BoundedVec` to `Vec` ?&#xD;&#xA;2) find a way to specify the size/type of my `BoundedVec` in the benchmarks&#xD;&#xA;&#xD;&#xA;It's defined in my pallet config:&#xD;&#xA;```&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;	        ...&#xD;&#xA;		/// The maximum number of account that can added or removed in a single call&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxAccountsPerTransaction: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;And use in the extrinsic signature:&#xD;&#xA;        &#xD;&#xA;```&#xD;&#xA;		#[pallet::weight(T::WeightInfo::create_supersig(members.len() as u32))]&#xD;&#xA;		pub fn create_supersig(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			members: BoundedVec&lt;(T::AccountId, Role), T::MaxAccountsPerTransaction&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17516" PostHistoryTypeId="1" PostId="4687" RevisionGUID="aa5c51f0-71f8-4509-9505-b8f0c77963ae" CreationDate="2022-09-07T22:41:35.017" UserId="2340" Text="Use BoundedVec in benchmark" ContentLicense="CC BY-SA 4.0" />
  <row Id="17517" PostHistoryTypeId="3" PostId="4687" RevisionGUID="aa5c51f0-71f8-4509-9505-b8f0c77963ae" CreationDate="2022-09-07T22:41:35.017" UserId="2340" Text="|benchmarking|benchmark|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17522" PostHistoryTypeId="2" PostId="4689" RevisionGUID="c1295d01-a0ef-4c2b-a99f-b05766e9576f" CreationDate="2022-09-07T23:09:33.587" UserId="73" Text="It is very likely that these information are just missing in the Polkadot release logs.&#xD;&#xA;&#xD;&#xA;Especially for these old releases." ContentLicense="CC BY-SA 4.0" />
  <row Id="17524" PostHistoryTypeId="2" PostId="4690" RevisionGUID="d079a7e6-def2-4cf1-b3cc-42f604621ca6" CreationDate="2022-09-07T23:12:38.690" UserId="73" Text="`session.queuedkeys` is about the keys that will be set in the next session. So, not in the current session." ContentLicense="CC BY-SA 4.0" />
  <row Id="17526" PostHistoryTypeId="2" PostId="4691" RevisionGUID="5110fdfc-5b59-461f-9203-2bb7fb01bf7a" CreationDate="2022-09-08T00:02:15.180" UserId="2548" Text="I have an issue. I wold like to store a struct using AccountId as key: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Copy, Encode, Decode, RuntimeDebug, PartialEq, Eq, MaxEncodedLen, TypeInfo)]&#xD;&#xA;	pub struct Contract&lt;Origin, AccountId, Amount&gt; {&#xD;&#xA;		pub origin: Origin,&#xD;&#xA;		pub to: AccountId,&#xD;&#xA;		pub amount: Amount,&#xD;&#xA;		pub current_block_number: u64,&#xD;&#xA;		pub work_days_in_block_number: u64,&#xD;&#xA;		pub take_action_days_in_block: u64,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn contract_sender)]&#xD;&#xA;	pub(super) type ContractSender&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Blake2_128Concat, T::AccountId, Contract&lt;T::AccountId, T::AccountId, BalanceOf&lt;T&gt;&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn contract_receiver)]&#xD;&#xA;	pub(super) type ContractReceiver&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Blake2_128Concat, T::AccountId, Contract&lt;T::AccountId, T::AccountId, BalanceOf&lt;T&gt;&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;But having this issue: &#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `Contract&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::AccountId, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;: std::default::Default` is not satisfied&#xD;&#xA;  --&gt; pallets/escrow/src/lib.rs:47:12&#xD;&#xA;   |&#xD;&#xA;47 |     #[pallet::pallet]&#xD;&#xA;   |               ^^^^^^ the trait `std::default::Default` is not implemented for `Contract&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::AccountId, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;`&#xD;&#xA;   |&#xD;&#xA;   = help: the trait `StorageInfoTrait` is implemented for `frame_support::pallet_prelude::StorageMap&lt;Prefix, Hasher, Key, Value, QueryKind, OnEmpty, MaxValues&gt;`&#xD;&#xA;   = note: required because of the requirements on the impl of `frame_support::traits::Get&lt;Contract&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::AccountId, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;&gt;` for `GetDefault`&#xD;&#xA;   = note: required because of the requirements on the impl of `QueryKindTrait&lt;Contract&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::AccountId, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;, GetDefault&gt;` for `frame_support::pallet_prelude::ValueQuery`&#xD;&#xA;   = note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageMap&lt;_GeneratedPrefixForStorageContractSender&lt;T&gt;, frame_support::Blake2_128Concat, &lt;T as frame_system::Config&gt;::AccountId, Contract&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::AccountId, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;, frame_support::pallet_prelude::ValueQuery&gt;`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Contract&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::AccountId, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;: std::default::Default` is not satisfied&#xD;&#xA;  --&gt; pallets/escrow/src/lib.rs:66:12&#xD;&#xA;   |&#xD;&#xA;66 |     #[pallet::storage]&#xD;&#xA;   |               ^^^^^^^ the trait `std::default::Default` is not implemented for `Contract&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::AccountId, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I do not understand what's wrong :/&#xD;&#xA;Any idea? " ContentLicense="CC BY-SA 4.0" />
  <row Id="17528" PostHistoryTypeId="1" PostId="4691" RevisionGUID="5110fdfc-5b59-461f-9203-2bb7fb01bf7a" CreationDate="2022-09-08T00:02:15.180" UserId="2548" Text="the trait `std::default::Default` is not implemented for AccountId" ContentLicense="CC BY-SA 4.0" />
  <row Id="17529" PostHistoryTypeId="3" PostId="4691" RevisionGUID="5110fdfc-5b59-461f-9203-2bb7fb01bf7a" CreationDate="2022-09-08T00:02:15.180" UserId="2548" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17530" PostHistoryTypeId="2" PostId="4692" RevisionGUID="089d8cef-f8f6-435a-8511-2e9d39efeccf" CreationDate="2022-09-08T00:28:18.750" UserId="29" Text="Say I want to spin up a local Rococo test network with:&#xD;&#xA;&#xD;&#xA;- Four validators&#xD;&#xA;- Two parachains&#xD;&#xA;- One collator per parachain&#xD;&#xA;&#xD;&#xA;How do I do this with [Zombienet](https://github.com/paritytech/zombienet)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17532" PostHistoryTypeId="1" PostId="4692" RevisionGUID="089d8cef-f8f6-435a-8511-2e9d39efeccf" CreationDate="2022-09-08T00:28:18.750" UserId="29" Text="How do I spin up a testnet with zombienet using polkadot binaries?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17533" PostHistoryTypeId="3" PostId="4692" RevisionGUID="089d8cef-f8f6-435a-8511-2e9d39efeccf" CreationDate="2022-09-08T00:28:18.750" UserId="29" Text="|zombienet|rococo-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17534" PostHistoryTypeId="2" PostId="4693" RevisionGUID="0eca98d2-5fff-4e08-9629-979ec42c4fa1" CreationDate="2022-09-08T00:28:18.750" UserId="29" Text="You'll need to download the Zombienet executable.&#xD;&#xA;&#xD;&#xA;You can find linux and macOS executables of the Zombienet CLI here:&#xD;&#xA;- https://github.com/paritytech/zombienet/releases&#xD;&#xA;&#xD;&#xA;Download the Zombienet CLI according to your operating system.&#xD;&#xA;&#xD;&#xA;&gt; Tip: If you want the executable to be available system-wide then you can follow these steps (otherwise just download the executable to your working directory):&#xD;&#xA;&gt; &#xD;&#xA;&gt; ```&#xD;&#xA;&gt; wget https://github.com/paritytech/zombienet/releases/download/v1.2.61/zombienet-macos&#xD;&#xA;&gt; chmod +x zombienet-macos &#xD;&#xA;&gt; cp zombienet-macos /usr/local/bin&#xD;&#xA;&gt; ```&#xD;&#xA;&#xD;&#xA;Make sure Zombienet CLI is installed correctly:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos --help&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some similar output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Usage: zombienet [options] [command]&#xD;&#xA;&#xD;&#xA;Options:&#xD;&#xA;  -c, --spawn-concurrency &lt;concurrency&gt;  Number of concurrent spawning process to launch, default is 1&#xD;&#xA;  -p, --provider &lt;provider&gt;              Override provider to use (choices: &quot;podman&quot;, &quot;kubernetes&quot;, &quot;native&quot;)&#xD;&#xA;  -m, --monitor                          Start as monitor, do not auto cleanup network&#xD;&#xA;  -h, --help                             display help for command&#xD;&#xA;&#xD;&#xA;Commands:&#xD;&#xA;  spawn &lt;networkConfig&gt; [creds]          Spawn the network defined in the config&#xD;&#xA;  test &lt;testFile&gt; [runningNetworkSpec]   Run tests on the network defined&#xD;&#xA;  setup &lt;binaries...&gt;                    Setup is meant for downloading and making dev environment of Zombienet ready&#xD;&#xA;  version                                Prints zombienet version&#xD;&#xA;  help [command]                         display help for command&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Setting up your config&#xD;&#xA;&#xD;&#xA;Zombienet works with a config. The config is where you specify your test network's configuration. The config is also where you can specify the polkadot binaries.&#xD;&#xA;&#xD;&#xA;Create a config file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;touch config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in this example config we are specifying that we want a Rococo relay chain with four validators and two parachains - each with one collator:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot-v0.9.28&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;dave&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1000-collator&quot;&#xD;&#xA;  command = &quot;./bin/parachain-template-node-v0.9.28-1000&quot;&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1001&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1001-collator&quot;&#xD;&#xA;  command = &quot;../bin/parachain-template-node-v0.9.28-1001&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Save the file and run the Zombienet CLI using this config:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos spawn config.toml -p native&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some nicely formatted output stating that the nodes are up and ready.&#xD;&#xA;&#xD;&#xA;You can now interact with your nodes in [polkadotJS apps](https://polkadot.js.org/apps)!" ContentLicense="CC BY-SA 4.0" />
  <row Id="17536" PostHistoryTypeId="2" PostId="4694" RevisionGUID="e5fc3b8f-107f-4be3-b8c7-f87b9a607dec" CreationDate="2022-09-08T00:31:52.470" UserId="590" Text="When reading about Signed Extensions in [transaction-format][1] it states that AdditionalSigned can be used to&#xD;&#xA;&#xD;&#xA;&gt; to handle any additional data to go into the signed payload. This makes it possible to attach any custom logic prior to dispatching a transaction.&#xD;&#xA;&#xD;&#xA;I noticed that [CheckGenesis][2] uses it but no clear on how it works.&#xD;&#xA;&#xD;&#xA;Can you please explain how AdditionalSigned works and provide some additional use cases of AdditionalSigned?&#xD;&#xA;&#xD;&#xA;Also, what does it mean by &quot;attach any custom logic prior to dispatching a transaction&quot;? How is it different than pre-dispatch and when should I use it over pre-dispatch?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/transaction-format/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/system/src/extensions/check_genesis.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="17538" PostHistoryTypeId="1" PostId="4694" RevisionGUID="e5fc3b8f-107f-4be3-b8c7-f87b9a607dec" CreationDate="2022-09-08T00:31:52.470" UserId="590" Text="Signed Extensions AdditionalSigned associated type" ContentLicense="CC BY-SA 4.0" />
  <row Id="17539" PostHistoryTypeId="3" PostId="4694" RevisionGUID="e5fc3b8f-107f-4be3-b8c7-f87b9a607dec" CreationDate="2022-09-08T00:31:52.470" UserId="590" Text="|transactions|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17540" PostHistoryTypeId="4" PostId="4692" RevisionGUID="bd2747c2-4e15-4d5c-a400-c873f4ab7f98" CreationDate="2022-09-08T01:43:46.670" UserId="29" Comment="edited title" Text="How do I spin up a testnet with Zombienet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17541" PostHistoryTypeId="5" PostId="4693" RevisionGUID="b8b096b0-28b6-471f-91e4-ae2e91cd1bfc" CreationDate="2022-09-08T01:48:52.293" UserId="29" Comment="added 130 characters in body" Text="You'll need to download the Zombienet executable.&#xD;&#xA;&#xD;&#xA;You can find linux and macOS executables of the Zombienet CLI here:&#xD;&#xA;- https://github.com/paritytech/zombienet/releases&#xD;&#xA;&#xD;&#xA;Download the Zombienet CLI according to your operating system.&#xD;&#xA;&#xD;&#xA;&gt; Tip: If you want the executable to be available system-wide then you can follow these steps (otherwise just download the executable to your working directory):&#xD;&#xA;&gt; &#xD;&#xA;&gt; ```&#xD;&#xA;&gt; wget https://github.com/paritytech/zombienet/releases/download/v1.2.61/zombienet-macos&#xD;&#xA;&gt; chmod +x zombienet-macos &#xD;&#xA;&gt; cp zombienet-macos /usr/local/bin&#xD;&#xA;&gt; ```&#xD;&#xA;&#xD;&#xA;Make sure Zombienet CLI is installed correctly:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos --help&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some similar output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Usage: zombienet [options] [command]&#xD;&#xA;&#xD;&#xA;Options:&#xD;&#xA;  -c, --spawn-concurrency &lt;concurrency&gt;  Number of concurrent spawning process to launch, default is 1&#xD;&#xA;  -p, --provider &lt;provider&gt;              Override provider to use (choices: &quot;podman&quot;, &quot;kubernetes&quot;, &quot;native&quot;)&#xD;&#xA;  -m, --monitor                          Start as monitor, do not auto cleanup network&#xD;&#xA;  -h, --help                             display help for command&#xD;&#xA;&#xD;&#xA;Commands:&#xD;&#xA;  spawn &lt;networkConfig&gt; [creds]          Spawn the network defined in the config&#xD;&#xA;  test &lt;testFile&gt; [runningNetworkSpec]   Run tests on the network defined&#xD;&#xA;  setup &lt;binaries...&gt;                    Setup is meant for downloading and making dev environment of Zombienet ready&#xD;&#xA;  version                                Prints zombienet version&#xD;&#xA;  help [command]                         display help for command&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Setting up your config&#xD;&#xA;&#xD;&#xA;Zombienet works with a config. The config is where you specify your test network's configuration. The config is also where you can specify the polkadot/cumulus binaries.&#xD;&#xA;&#xD;&#xA;Create a config file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;touch config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in this example config we are specifying that we want a Rococo relay chain with four validators and two parachains - each with one collator. Make sure you have the compiled binaries available.&#xD;&#xA;&#xD;&#xA;&gt; Zombienet also works with other providers such as Kubernetes and Podman.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot-v0.9.28&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;dave&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1000-collator&quot;&#xD;&#xA;  command = &quot;./bin/parachain-template-node-v0.9.28-1000&quot;&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1001&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1001-collator&quot;&#xD;&#xA;  command = &quot;../bin/parachain-template-node-v0.9.28-1001&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Save the file and run the Zombienet CLI using this config:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos spawn config.toml -p native&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some nicely formatted output stating that the nodes are up and ready.&#xD;&#xA;&#xD;&#xA;You can now interact with your nodes in [polkadotJS apps](https://polkadot.js.org/apps)!" ContentLicense="CC BY-SA 4.0" />
  <row Id="17542" PostHistoryTypeId="2" PostId="4695" RevisionGUID="af072098-e8c6-45c2-a699-777250bdce23" CreationDate="2022-09-08T02:09:22.753" UserId="251" Text="&gt; I wold like to store a struct using AccountId as key.&#xD;&#xA;&#xD;&#xA;This is not the problem. It's totally fine.&#xD;&#xA;&#xD;&#xA;The problem is the `Contract` struct.&#xD;&#xA;It contains an `AccountId` and the `AccountId` doesn't implement `Default`.&#xD;&#xA;Because the `StorageMap` value require `Default`.&#xD;&#xA;&#xD;&#xA;You could change this map value to `Option&lt;Contract&gt;`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Check the original PR for more information.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/10403&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17544" PostHistoryTypeId="2" PostId="4696" RevisionGUID="86b82e93-2bae-4054-b43c-33c0c9fb7728" CreationDate="2022-09-08T02:38:36.373" UserId="251" Text="You could use `BoundedVec` anywhere.&#xD;&#xA;&#xD;&#xA;What is the value of `MaxAccountsPerTransaction` you used in the mock runtime?&#xD;&#xA;&#xD;&#xA;If `z + 3 &gt; MaxAccountsPerTransaction`, then you got this error." ContentLicense="CC BY-SA 4.0" />
  <row Id="17546" PostHistoryTypeId="5" PostId="4694" RevisionGUID="88ec1cbe-0bcf-4a95-96a7-6fc29bfd40d2" CreationDate="2022-09-08T03:31:53.337" UserId="590" Comment="added 9 characters in body" Text="When reading about Signed Extensions in the [transaction-format][1] post it states that AdditionalSigned can be used to&#xD;&#xA;&#xD;&#xA;&gt; to handle any additional data to go into the signed payload. This makes it possible to attach any custom logic prior to dispatching a transaction.&#xD;&#xA;&#xD;&#xA;I noticed that [CheckGenesis][2] uses it but no clear on how it works.&#xD;&#xA;&#xD;&#xA;Can you please explain how AdditionalSigned works and provide some additional use cases of AdditionalSigned?&#xD;&#xA;&#xD;&#xA;Also, what does it mean by &quot;attach any custom logic prior to dispatching a transaction&quot;? How is it different than pre-dispatch and when should I use it over pre-dispatch?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/transaction-format/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/system/src/extensions/check_genesis.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="17547" PostHistoryTypeId="5" PostId="4668" RevisionGUID="fa09a37a-c204-4e21-8d6c-56954a17b15f" CreationDate="2022-09-08T03:35:44.257" UserId="3106" Comment="added 129 characters in body" Text="I am using&#xD;&#xA;```&#xD;&#xA;const decodedEvent = Abi.decodeEvent(Uint8Array.from(Buffer.from(&quot;00000064a7b3b6e00d000000000000000000000000000000000000000000000000&quot;, 'hex'))) &#xD;&#xA;(00000064a7b3b6e00d000000000000000000000000000000000000000000000000 is the data in the contracts::contractemitted event.)&#xD;&#xA;```&#xD;&#xA;But I cannot access the actual argument values, only their types. I'd like to be able to access the values when decoding the event. What am I missing?&#xD;&#xA;&#xD;&#xA;Here's the `decodedEvent.event.args`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Currently when accessing the decodedEvent.event.args, I only see the names and types. Where can I access the values?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/QIEyS.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17548" PostHistoryTypeId="2" PostId="4697" RevisionGUID="2cafa6b2-e4d1-4c7a-a0e5-e881c732a0b9" CreationDate="2022-09-08T04:38:01.680" UserId="544" Text="We are hosting some parachain full nodes on the could. However we found that 80% of the costs come from the internet traffic, and specifically, we found that the outbound traffic of the relaychain client has been always skyrocketed. We noticed that it's possible to limit `--out-peers` in substrate, but even a few peers can still create huge traffic (e.g. new client downloading the blocks).&#xD;&#xA;&#xD;&#xA;Is it possible to limit the outbound traffic bandwidth rate in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17550" PostHistoryTypeId="1" PostId="4697" RevisionGUID="2cafa6b2-e4d1-4c7a-a0e5-e881c732a0b9" CreationDate="2022-09-08T04:38:01.680" UserId="544" Text="How to limit the outbound traffic (bandwidth)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17551" PostHistoryTypeId="3" PostId="4697" RevisionGUID="2cafa6b2-e4d1-4c7a-a0e5-e881c732a0b9" CreationDate="2022-09-08T04:38:01.680" UserId="544" Text="|networking|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17552" PostHistoryTypeId="5" PostId="4114" RevisionGUID="500fb2ef-ff4e-495a-8fb2-471c451112de" CreationDate="2022-09-08T05:03:41.963" UserId="275" Comment="added 6 characters in body" Text="ChainExtension will return `Result&lt;RetVal, DispatchError&gt;`. (As you can see in the bottom pircutre)&#xD;&#xA;&#xD;&#xA;- When ChainExtension implementation returns `Ok(RetVal::Converging(1))` and handle that status code 1 on ink! contract side like below, then Extrinsic itself will be shown as success event even if dispatch failed.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl ink_env::chain_extension::FromStatusCode for ContractErrorCode {&#xD;&#xA;    fn from_status_code(status_code: u32) -&gt; Result&lt;(), Self&gt; {&#xD;&#xA;        match status_code {&#xD;&#xA;            0 =&gt; Ok(()),&#xD;&#xA;            1 =&gt; Err(Self::Failed),&#xD;&#xA;            _ =&gt; panic!(&quot;encountered unknown status code&quot;),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;(What I did for experiments was ignore `Error(DispatchError)` and return `Ok(RetVal::Converging(1))` instead so that ink! can handle status code 1.)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;- When it returns `DispatchError` (Extrinsic itself fail), ink! smart contract cannot handle it and return its failure reason with `#[message]` functions' returned value. for e.g. `Result&lt;(), ContractError&gt;` (here ContractError reflects DispatchError's reason and perhaps we'd like to show it on UI).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The question is&#xD;&#xA;What is the appropriate way for ink! smart contract messages to handle DispatchError (from ChainExtension) and return it as its returned value?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vz8MX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/XBgYO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17553" PostHistoryTypeId="2" PostId="4698" RevisionGUID="c99dc5d2-d0f8-4ac3-b043-ef30df295f28" CreationDate="2022-09-08T08:20:26.980" UserId="73" Text="You can not limit the traffic of your node directly? How should that even work? You stop answering requests etc?&#xD;&#xA;&#xD;&#xA;The only way to bring down traffic is to restrict the number of `--in-peers` and `--out-peers`. The traffic should be proportional to the number of peers you are connected to. When you decrease this number the traffic should go down." ContentLicense="CC BY-SA 4.0" />
  <row Id="17555" PostHistoryTypeId="2" PostId="4699" RevisionGUID="1f7e16ff-11b0-4cd4-a0cd-3d606cd66fcb" CreationDate="2022-09-08T08:29:12.563" UserId="73" Text="The point of `AdditionalSigned` to include data in the signed data, aka the data is given to the `sign` function and is being &quot;secured&quot; by the signature of the transaction. The nice property of `AdditionalSigned` is that this data isn't part of the transaction itself. This means it doesn't increase the size of the transaction. However, this also means it needs to be data that both sides (signer and the chain) are aware of. An example of this is the genesis hash as you already said or the the `spec_version`. &#xD;&#xA;&#xD;&#xA;`CheckGenesis` is for example used to protect against replays of transactions on different chains as they all have a different genesis. `CheckSpecVersion` is used to invalidate all transactions after a runtime upgrade, because the `Call` format may changed and you don't want to apply &quot;invalid&quot; calls." ContentLicense="CC BY-SA 4.0" />
  <row Id="17557" PostHistoryTypeId="2" PostId="4700" RevisionGUID="5afbe1f7-95c9-4964-a202-4cc2b28d26d7" CreationDate="2022-09-08T08:29:40.520" UserId="2673" Text="IIRC the values should be in `decodedEvent.args`." ContentLicense="CC BY-SA 4.0" />
  <row Id="17559" PostHistoryTypeId="5" PostId="4695" RevisionGUID="cc198a59-61a9-40c1-a164-93f7408d952f" CreationDate="2022-09-08T08:58:32.887" UserId="251" Comment="edited body" Text="&gt; I wold like to store a struct using AccountId as key.&#xD;&#xA;&#xD;&#xA;This is not the problem. It's totally fine.&#xD;&#xA;&#xD;&#xA;The problem is the `Contract` struct.&#xD;&#xA;Because the `StorageMap` value require `Default`.&#xD;&#xA;It contains an `AccountId` and the `AccountId` doesn't implement `Default`.&#xD;&#xA;&#xD;&#xA;You could change this map value to `Option&lt;Contract&gt;`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Check the original PR for more information.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/10403&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17560" PostHistoryTypeId="2" PostId="4701" RevisionGUID="a98c819e-2d88-4e83-ab8d-2c146b2394aa" CreationDate="2022-09-08T10:17:54.800" UserId="3109" Text="How to run smoldot repository code and connect with our substrate based chain or substrate node ?&#xD;&#xA;On official documentation of smoldot on github is not in detail .Please answer here complete way to use smoldot light client " ContentLicense="CC BY-SA 4.0" />
  <row Id="17562" PostHistoryTypeId="1" PostId="4701" RevisionGUID="a98c819e-2d88-4e83-ab8d-2c146b2394aa" CreationDate="2022-09-08T10:17:54.800" UserId="3109" Text="Smoldot Documentation" ContentLicense="CC BY-SA 4.0" />
  <row Id="17563" PostHistoryTypeId="3" PostId="4701" RevisionGUID="a98c819e-2d88-4e83-ab8d-2c146b2394aa" CreationDate="2022-09-08T10:17:54.800" UserId="3109" Text="|substrate-node|rust|runtime|substrate-contracts-node|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17564" PostHistoryTypeId="50" PostId="4086" RevisionGUID="c2ea68b1-66de-477d-852a-231555bdfe8c" CreationDate="2022-09-08T11:08:05.747" UserId="-1" />
  <row Id="17567" PostHistoryTypeId="2" PostId="4703" RevisionGUID="7a803333-cd64-4687-8ab7-0676b25772c4" CreationDate="2022-09-08T11:55:11.797" UserId="1789" Text="And I learned about how to wrap a pallet to make a precompile for Ethereum users to call those pallet functions ... see the video at https://www.youtube.com/watch?v=V9KfvhoqLJ4&amp;t=1004s (time = 01:10:15), and code at&#xD;&#xA;https://github.com/PureStake/substrate-node-template/commits/frontier-workshop-2021&#xD;&#xA;&#xD;&#xA;in this precompile function at https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl&lt;Runtime&gt; PalletTemplatePrecompile&lt;Runtime&gt;&#xD;&#xA;where&#xD;&#xA;	Runtime: pallet_template::Config + pallet_evm::Config,&#xD;&#xA;	Runtime::Call: Dispatchable&lt;PostInfo = PostDispatchInfo&gt; + GetDispatchInfo,&#xD;&#xA;	&lt;Runtime::Call as Dispatchable&gt;::Origin: From&lt;Option&lt;Runtime::AccountId&gt;&gt;,&#xD;&#xA;	Runtime::Call: From&lt;pallet_template::Call&lt;Runtime&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	fn do_something(&#xD;&#xA;		mut input: EvmDataReader,&#xD;&#xA;		target_gas: Option&lt;u64&gt;,&#xD;&#xA;		context: &amp;Context,&#xD;&#xA;	) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;		// This gasometer is a handy utility that will help us account for gas as we go.&#xD;&#xA;		let mut gasometer = Gasometer::new(target_gas);&#xD;&#xA;&#xD;&#xA;		// Bound check. We expect a single argument passed in.&#xD;&#xA;		input.expect_arguments(1)?;&#xD;&#xA;&#xD;&#xA;		// Parse the u32 value that will be dispatched to the pallet.&#xD;&#xA;		let value = input.read::&lt;u32&gt;()?.into();&#xD;&#xA;&#xD;&#xA;		// Use pallet-evm's account mapping to determine what AccountId to dispatch from.&#xD;&#xA;		let origin = Runtime::AddressMapping::into_account_id(context.caller);&#xD;&#xA;		let call =&#xD;&#xA;			pallet_template::Call::&lt;Runtime&gt;::do_something{something: value};&#xD;&#xA;&#xD;&#xA;		// Dispatch the call into the runtime.&#xD;&#xA;		// The RuntimeHelper tells how much gas was actually used.&#xD;&#xA;		let used_gas = RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;			Some(origin).into(),&#xD;&#xA;			call,&#xD;&#xA;			gasometer.remaining_gas()?,&#xD;&#xA;		)?;&#xD;&#xA;&#xD;&#xA;		// Record the gas used in the gasometer&#xD;&#xA;		gasometer.record_cost(used_gas)?;&#xD;&#xA;&#xD;&#xA;		Ok(PrecompileOutput {&#xD;&#xA;			exit_status: ExitSucceed::Stopped,&#xD;&#xA;			cost: gasometer.used_gas(),&#xD;&#xA;			output: Default::default(),&#xD;&#xA;			logs: Default::default(),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;in my `pallet_template`:&#xD;&#xA;```&#xD;&#xA;		pub fn do_something(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			call: Box&lt;&lt;T as Config&gt;::Call&gt;,&#xD;&#xA;		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			let sender = ensure_signed(origin.clone())?;&#xD;&#xA;&#xD;&#xA;            let special_accounts = &lt;SepecialList&lt;T&gt;&gt;::get();&#xD;&#xA;            // check if this sender can send feeless txn&#xD;&#xA;&#xD;&#xA;			// Dispatch the call.&#xD;&#xA;			let result = call.dispatch(origin);&#xD;&#xA;&#xD;&#xA;            if special_accounts.contains(sender) {&#xD;&#xA;               Ok(Pays::No.into())&#xD;&#xA;            } else {&#xD;&#xA;               Ok(Pays::Yes.into())&#xD;&#xA;            }&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;Now. How can I specify which function from an Ethereum smart contract(deployed into the EVM in my parachain) to invoke? &#xD;&#xA;&#xD;&#xA;How can I pass this `call: Box&lt;&lt;T as Config&gt;::Call&gt;` argument in the precompile to the `do_something()` in my `pallet_template` ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17569" PostHistoryTypeId="1" PostId="4703" RevisionGUID="7a803333-cd64-4687-8ab7-0676b25772c4" CreationDate="2022-09-08T11:55:11.797" UserId="1789" Text="How to make gasless or feeless transaction in Frontier EVM for certain Ethereum smart contract functions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17570" PostHistoryTypeId="3" PostId="4703" RevisionGUID="7a803333-cd64-4687-8ab7-0676b25772c4" CreationDate="2022-09-08T11:55:11.797" UserId="1789" Text="|pallet|parachain|frontier|evm|feeless|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17571" PostHistoryTypeId="2" PostId="4704" RevisionGUID="408cbeae-8cca-4169-8f85-f471975be9e9" CreationDate="2022-09-08T12:02:31.660" UserId="3127" Text="Yes, as previously mentioned, the `ValueQuery` forces `Contract` to default to some kind of default `Contract` with default `AccountId`, which doesn't exist, and `OptionQuery` allows it to just be `None`. Broke my head the first time I saw this error! :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="17573" PostHistoryTypeId="2" PostId="4705" RevisionGUID="81c5ea3b-add0-4c1b-8586-e9b63971dfe7" CreationDate="2022-09-08T12:16:09.553" UserId="3127" Text="I am wondering if you are missing a step here, before using `param_type`. Possibly a `decode()` after `create_scale_object`, similar to [https://github.com/polkascan/py-scale-codec/blob/master/README.md#encode-a-call][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkascan/py-scale-codec/blob/master/README.md#encode-a-call" ContentLicense="CC BY-SA 4.0" />
  <row Id="17575" PostHistoryTypeId="5" PostId="4695" RevisionGUID="65667230-abb3-4698-bcb7-33b261441490" CreationDate="2022-09-08T12:17:56.383" UserId="251" Comment="added 2 characters in body" Text="&gt; I wold like to store a struct using AccountId as key.&#xD;&#xA;&#xD;&#xA;This is not the problem. It's totally fine.&#xD;&#xA;&#xD;&#xA;The problem is the `Contract` struct.&#xD;&#xA;Because the `StorageMap` value require `Default`.&#xD;&#xA;It contains an `AccountId` and the `AccountId` doesn't implement `Default`.&#xD;&#xA;&#xD;&#xA;You could change this map's query type to `OptionQuery`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Check the original PR for more information.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/10403&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17576" PostHistoryTypeId="2" PostId="4706" RevisionGUID="0d95713e-015a-4d14-996b-d9e80bafb696" CreationDate="2022-09-08T12:56:47.693" UserId="2011" Text="We have a paraID locked after a completed Crodwloan, the auction has concluded in a no-winning state, and the parathread is still owned by the account manager.&#xD;&#xA;&#xD;&#xA;Any explanation as to why the deposit is still locked?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17578" PostHistoryTypeId="1" PostId="4706" RevisionGUID="0d95713e-015a-4d14-996b-d9e80bafb696" CreationDate="2022-09-08T12:56:47.693" UserId="2011" Text="Unable to deregister paraId on Kusama" ContentLicense="CC BY-SA 4.0" />
  <row Id="17579" PostHistoryTypeId="3" PostId="4706" RevisionGUID="0d95713e-015a-4d14-996b-d9e80bafb696" CreationDate="2022-09-08T12:56:47.693" UserId="2011" Text="|kusama|crowdloan|parathread|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17581" PostHistoryTypeId="2" PostId="4707" RevisionGUID="f957fcf9-35e5-44c6-92d0-0fc2a484d79f" CreationDate="2022-09-08T13:01:48.857" UserId="2635" Text="Are there any tools/script yo stress a substrate bases blockchain? Generating transfers between accounts should be Ok.&#xD;&#xA;I think I saw one a few months ago but I can not find it :-(&#xD;&#xA;&#xD;&#xA;Thanks very much.&#xD;&#xA;Regards;&#xD;&#xA;fernando " ContentLicense="CC BY-SA 4.0" />
  <row Id="17583" PostHistoryTypeId="1" PostId="4707" RevisionGUID="f957fcf9-35e5-44c6-92d0-0fc2a484d79f" CreationDate="2022-09-08T13:01:48.857" UserId="2635" Text="Stress test a substrated based blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="17584" PostHistoryTypeId="3" PostId="4707" RevisionGUID="f957fcf9-35e5-44c6-92d0-0fc2a484d79f" CreationDate="2022-09-08T13:01:48.857" UserId="2635" Text="|substrate-node|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17585" PostHistoryTypeId="2" PostId="4708" RevisionGUID="8f99ef61-abbe-4493-8fc4-21ad53fa5ab3" CreationDate="2022-09-08T13:06:53.893" UserId="3127" Text="I have come across this [https://socket.dev/npm/package/artillery-engine-substrate][1] but I have not used it yet unfortunately.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://socket.dev/npm/package/artillery-engine-substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="17587" PostHistoryTypeId="2" PostId="4709" RevisionGUID="d5d47da7-92e2-4337-94e6-2d6e5f7176de" CreationDate="2022-09-08T13:20:33.907" UserId="3097" Text="How can i subscribe to the new pending transactions of polkadot by using substrate interface python " ContentLicense="CC BY-SA 4.0" />
  <row Id="17589" PostHistoryTypeId="1" PostId="4709" RevisionGUID="d5d47da7-92e2-4337-94e6-2d6e5f7176de" CreationDate="2022-09-08T13:20:33.907" UserId="3097" Text="How to subscribe the new pending transaction of polkadot in substrate python" ContentLicense="CC BY-SA 4.0" />
  <row Id="17590" PostHistoryTypeId="3" PostId="4709" RevisionGUID="d5d47da7-92e2-4337-94e6-2d6e5f7176de" CreationDate="2022-09-08T13:20:33.907" UserId="3097" Text="|polkadot|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17595" PostHistoryTypeId="2" PostId="4711" RevisionGUID="a47bf1db-059f-44df-9a23-2340a4fb7349" CreationDate="2022-09-08T13:52:46.520" UserId="29" Text="You can benchmark your chain:&#xD;&#xA;- https://docs.substrate.io/test/benchmark/#benchmarking-tools&#xD;&#xA;&#xD;&#xA;Additional info:&#xD;&#xA;- https://youtu.be/Qa6sTyUqgek?t=576" ContentLicense="CC BY-SA 4.0" />
  <row Id="17597" PostHistoryTypeId="5" PostId="4711" RevisionGUID="dad65dc5-6190-455f-9962-136cfc853316" CreationDate="2022-09-08T14:20:33.830" UserId="29" Comment="added 178 characters in body" Text="You can benchmark your chain:&#xD;&#xA;- https://docs.substrate.io/test/benchmark/#benchmarking-tools&#xD;&#xA;&#xD;&#xA;Take a look at these transfer benchmarks:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/b8c3d8cc2301a46070ddc9dbd90c135f9db5cd0d/frame/balances/src/benchmarking.rs#L38-L177&#xD;&#xA;&#xD;&#xA;Additional info:&#xD;&#xA;- https://youtu.be/Qa6sTyUqgek?t=576" ContentLicense="CC BY-SA 4.0" />
  <row Id="17599" PostHistoryTypeId="6" PostId="4709" RevisionGUID="0545faa0-4b68-45b7-b8e9-7e45f61ebcf4" CreationDate="2022-09-08T15:15:55.413" UserId="2673" Comment="Added the `python` tag" Text="|polkadot|python|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17600" PostHistoryTypeId="24" PostId="4709" RevisionGUID="0545faa0-4b68-45b7-b8e9-7e45f61ebcf4" CreationDate="2022-09-08T15:15:55.413" Comment="Proposed by 2673 approved by 34 edit id of 277" ContentLicense="CC BY-SA 4.0" />
  <row Id="17601" PostHistoryTypeId="4" PostId="4703" RevisionGUID="f9a5d0b8-842b-4d63-8060-39e823f22b48" CreationDate="2022-09-08T15:16:07.923" UserId="1789" Comment="edited title" Text="How to make feeless(for parachain runtime balance) transaction in Frontier EVM for certain Ethereum smart contract functions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17602" PostHistoryTypeId="5" PostId="1612" RevisionGUID="20c39c01-5e4e-4a63-9306-e795bae085a8" CreationDate="2022-09-08T15:16:10.923" UserId="2025" Comment="fix link to new docs" Text="&#xD;&#xA;I also noticed that the docs were lacking in explanation on how to add custom rpcs, but then I stumbled on the rust RPC repo by parity. It's referenced at the bottom of the docs on substrate.io that talks about [adding custom rpcs](https://docs.substrate.io/build/custom-rpc/): &#xD;&#xA;https://github.com/paritytech/jsonrpc&#xD;&#xA;&#xD;&#xA;From the examples in the README file, it seems the RPC is a struct that implements the RPC trait. This RPC trait has some macros derived that help specify the functions to be exposed. This is then made concrete on the RPC struct with an impl block that defines the functions fully. To do the same on a node, the main focus would be to find something similar to the two impl blocks (one for the trait, the other for the struct). I'd look for something similar on substrate nodes and use that instead.&#xD;&#xA;&#xD;&#xA;To give an example with the node-template I used,&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/blob/v3.0.0%2Bmonthly-2021-08/node/src/rpc.rs&#xD;&#xA;&#xD;&#xA;I just looked through it and there's a comment at the bottom that explains how to extend the functionality on a node.&#xD;&#xA;Specifically:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;	// Extend this RPC with a custom API by using the following syntax.&#xD;&#xA;	// `YourRpcStruct` should have a reference to a client, which is needed&#xD;&#xA;	// to call into the runtime.&#xD;&#xA;	// `io.extend_with(YourRpcTrait::to_delegate(YourRpcStruct::new(ReferenceToClient, ...)));`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;To bring things together, I'd call this method (`io.extend_with()`), or its equivalent on your setup, with a custom struct that has the rpcs you'd like to expose and the accompanying trait following the guide from `paritytech/jsonrpc`. Specifically, the one on clients: https://github.com/paritytech/jsonrpc#client-support&#xD;&#xA;&#xD;&#xA;This doesn't quite answer your question with the error, but I hope it helps you implement a custom RPC." ContentLicense="CC BY-SA 4.0" />
  <row Id="17603" PostHistoryTypeId="24" PostId="1612" RevisionGUID="20c39c01-5e4e-4a63-9306-e795bae085a8" CreationDate="2022-09-08T15:16:10.923" Comment="Proposed by 2025 approved by 34 edit id of 275" ContentLicense="CC BY-SA 4.0" />
  <row Id="17604" PostHistoryTypeId="6" PostId="4701" RevisionGUID="7c7164d8-0469-4d44-bf92-1b19704c45fb" CreationDate="2022-09-08T15:16:20.990" UserId="2673" Comment="Remove `substrate-contracts-node` tag as this question is not related" Text="|substrate-node|rust|runtime|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17605" PostHistoryTypeId="24" PostId="4701" RevisionGUID="7c7164d8-0469-4d44-bf92-1b19704c45fb" CreationDate="2022-09-08T15:16:20.990" Comment="Proposed by 2673 approved by 34 edit id of 274" ContentLicense="CC BY-SA 4.0" />
  <row Id="17606" PostHistoryTypeId="5" PostId="4086" RevisionGUID="fc2a6034-217f-4576-aef4-0d60dbaf31f4" CreationDate="2022-09-08T15:16:31.167" UserId="2673" Comment="Add Python syntax highlighting" Text="I am trying to find the correct parameters to pass into the query function for the substrate interface module when interacting with the parallel api to interact with their AMM. I attempted to modify the code from the linked post:&#xD;&#xA;&#xD;&#xA;&lt;https://substrate.stackexchange.com/questions/107/how-to-determine-which-parameters-are-required-when-using-substrate-query-to-q&gt;&#xD;&#xA;&#xD;&#xA;Below is my adapted code:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;&#xD;&#xA;paraurl = 'wss://rpc.parallel.fi'&#xD;&#xA;&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=paraurl,&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;storage_function = substrate.get_metadata_storage_function('AMM','Pools')&#xD;&#xA;&#xD;&#xA;typeString = storage_function.get_params_type_string()&#xD;&#xA;print('Storage Function params length:', len(typeString))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Retrieve a SCALE object of the param type&#xD;&#xA;param_type = substrate.create_scale_object(storage_function.get_params_type_string()[0])&#xD;&#xA;&#xD;&#xA;# Possible options of Enum type&#xD;&#xA;print(param_type.type_mapping)&#xD;&#xA;&#xD;&#xA;token_param = substrate.create_scale_object(param_type.type_mapping[0][1])&#xD;&#xA;&#xD;&#xA;# Show possible options&#xD;&#xA;print(token_param.type_mapping)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I am receiving the error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  File &quot;/home/travnado300/Documents/Python Scripts/Substrate Interactions/Parallel.py&quot;, line 30, in &lt;module&gt;&#xD;&#xA;    token_param = substrate.create_scale_object(param_type.type_mapping[0][1])&#xD;&#xA;  TypeError: 'NoneType' object is not subscriptable&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am wondering if this is just an issue with the parallel API not having all of the information available or if there is a way to access the params needed to pass into the function:&#xD;&#xA;```&#xD;&#xA;substrate.query()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17607" PostHistoryTypeId="24" PostId="4086" RevisionGUID="fc2a6034-217f-4576-aef4-0d60dbaf31f4" CreationDate="2022-09-08T15:16:31.167" Comment="Proposed by 2673 approved by 34 edit id of 276" ContentLicense="CC BY-SA 4.0" />
  <row Id="17611" PostHistoryTypeId="2" PostId="4713" RevisionGUID="90be0aa8-f67c-43f9-95ff-60cae97a3af5" CreationDate="2022-09-08T15:27:22.047" UserId="34" Text="Checkout the docs on how to convert a silo chain to a parachain: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/&#xD;&#xA;&#xD;&#xA;Note that you must perform state _migrations_ on your new parachain_starting from genesis_ to populate the desired state on the parachain. You cannot simply &quot;flip a switch&quot; on a running chain to become a parachain.&#xD;&#xA;https://docs.substrate.io/reference/how-to-guides/parachains/runtime-upgrade/&#xD;&#xA;&#xD;&#xA;It is likely you need to evaluate your benchmarking closely and fit into the _much more strick and limited_ weight requirements for parachain operation, compared to solo chain operation as well. You may need to redactor or when prune functionality based on those investigations.&#xD;&#xA;https://docs.substrate.io/reference/how-to-guides/weights/add-benchmarks/" ContentLicense="CC BY-SA 4.0" />
  <row Id="17613" PostHistoryTypeId="2" PostId="4714" RevisionGUID="93667359-5083-4cca-a78d-5ab72f0795f3" CreationDate="2022-09-08T15:41:35.607" UserId="94" Text="There is [sTPS repo](https://github.com/paritytech/polkadot-stps/) contains some functions to spin up a multi-node network and stress-test it.  &#xD;&#xA;Unfortunately there are some non-deterministic bugs with how we are using Zombienet which does not allow for reliable output.  &#xD;&#xA;&#xD;&#xA;You could still re-use some of the code in that repo, especially the Rust code regarding the transaction signing and sending.  &#xD;&#xA;&#xD;&#xA;I dont know what kind of benchmark you want to do. The sTPS aims at a multi-node global spanning benchmark, not just local testing.  &#xD;&#xA;Also, what are you expecting as output? Just transactions per second or other metrics like memory usage or response time?  &#xD;&#xA;Anyway, next time please include as *much* info as possible into your question." ContentLicense="CC BY-SA 4.0" />
  <row Id="17615" PostHistoryTypeId="2" PostId="4715" RevisionGUID="33d8e637-20d5-445f-8eeb-8ad418573e2e" CreationDate="2022-09-08T15:59:39.403" UserId="3142" Text="How can I call an extrinsic on a palette using the polkadot-js-api CLI tool?  I don't see much documentation on the tool nor does the --help provide much detail.  Could I use this tool for this purpose?  I would like to call an extrinsic that takes a local file as input using the @ parameter and passes the contents to a custom extrinsic on a custom palette.&#xD;&#xA;&#xD;&#xA;    polkadot-js-api --help   &#xD;&#xA;    polkadot-js-api&#xD;&#xA;    &#xD;&#xA;    Usage: [options] &lt;endpoint&gt; &lt;...params&gt;&#xD;&#xA;    Example: query.system.account 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKv3gB&#xD;&#xA;    Example: query.substrate.code --info&#xD;&#xA;    Example: --seed &quot;//Alice&quot; tx.balances.transfer F7Gh 10000&#xD;&#xA;    &#xD;&#xA;    Options:&#xD;&#xA;      --help                 Show help                                                                             [boolean]&#xD;&#xA;      --version              Show version number                                                                   [boolean]&#xD;&#xA;      --assetId              The asset id to add to the transaction for payment                                     [number]&#xD;&#xA;      --info                 Shows the meta information for the call                                               [boolean]&#xD;&#xA;      --noWait               After sending a tx return immediately and don't wait until it is included in a block  [boolean]&#xD;&#xA;      --params               Location of file containing space-separated transaction parameters (optional)          [string]&#xD;&#xA;      --rpc                  Add this .json file as RPC types to the API constructor                                [string]&#xD;&#xA;      --seed                 The account seed to use (required for tx.* only)                                       [string]&#xD;&#xA;      --sign                 The account crypto signature to use (required fo tx.* only)&#xD;&#xA;                                          [string] [choices: &quot;ed25519&quot;, &quot;sr25519&quot;, &quot;ethereum&quot;, &quot;ecdsa&quot;] [default: &quot;sr25519&quot;]&#xD;&#xA;      --sub                  With this flag set, perform subscription, running until exited with ^C                [boolean]&#xD;&#xA;      --sudo                 Run this tx as a wrapped sudo.sudo call                                               [boolean]&#xD;&#xA;      --sudoUncheckedWeight  Run this tx as a wrapped sudo.sudoUncheckedWeight call with weight                     [string]&#xD;&#xA;      --tip                  Add a tip to the transction for the block author                                       [number]&#xD;&#xA;      --types                Add this .json file as types to the API constructor                                    [string]&#xD;&#xA;      --ws                   The API endpoint to connect to, e.g. wss://kusama-rpc.polkadot.io&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17617" PostHistoryTypeId="1" PostId="4715" RevisionGUID="33d8e637-20d5-445f-8eeb-8ad418573e2e" CreationDate="2022-09-08T15:59:39.403" UserId="3142" Text="Calling an extrinsic using the polkadot-js-api CLI tool" ContentLicense="CC BY-SA 4.0" />
  <row Id="17618" PostHistoryTypeId="3" PostId="4715" RevisionGUID="33d8e637-20d5-445f-8eeb-8ad418573e2e" CreationDate="2022-09-08T15:59:39.403" UserId="3142" Text="|polkadot-js|extrinsic|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17619" PostHistoryTypeId="5" PostId="4715" RevisionGUID="85f153f4-29eb-4c37-a88d-3c874e254b8a" CreationDate="2022-09-08T16:01:17.800" UserId="3142" Comment="added 74 characters in body" Text="How can I call an extrinsic on a palette using the polkadot-js-api CLI tool?  I don't see much documentation on the tool nor does the --help provide much detail.  Could I use this tool for this purpose?  I would like to call an extrinsic that takes a local file as input using the @ parameter and passes the contents to a custom extrinsic on a custom palette.  If not, what are some other tools I could use rather than coding my own?&#xD;&#xA;&#xD;&#xA;    polkadot-js-api --help   &#xD;&#xA;    polkadot-js-api&#xD;&#xA;    &#xD;&#xA;    Usage: [options] &lt;endpoint&gt; &lt;...params&gt;&#xD;&#xA;    Example: query.system.account 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKv3gB&#xD;&#xA;    Example: query.substrate.code --info&#xD;&#xA;    Example: --seed &quot;//Alice&quot; tx.balances.transfer F7Gh 10000&#xD;&#xA;    &#xD;&#xA;    Options:&#xD;&#xA;      --help                 Show help                                                                             [boolean]&#xD;&#xA;      --version              Show version number                                                                   [boolean]&#xD;&#xA;      --assetId              The asset id to add to the transaction for payment                                     [number]&#xD;&#xA;      --info                 Shows the meta information for the call                                               [boolean]&#xD;&#xA;      --noWait               After sending a tx return immediately and don't wait until it is included in a block  [boolean]&#xD;&#xA;      --params               Location of file containing space-separated transaction parameters (optional)          [string]&#xD;&#xA;      --rpc                  Add this .json file as RPC types to the API constructor                                [string]&#xD;&#xA;      --seed                 The account seed to use (required for tx.* only)                                       [string]&#xD;&#xA;      --sign                 The account crypto signature to use (required fo tx.* only)&#xD;&#xA;                                          [string] [choices: &quot;ed25519&quot;, &quot;sr25519&quot;, &quot;ethereum&quot;, &quot;ecdsa&quot;] [default: &quot;sr25519&quot;]&#xD;&#xA;      --sub                  With this flag set, perform subscription, running until exited with ^C                [boolean]&#xD;&#xA;      --sudo                 Run this tx as a wrapped sudo.sudo call                                               [boolean]&#xD;&#xA;      --sudoUncheckedWeight  Run this tx as a wrapped sudo.sudoUncheckedWeight call with weight                     [string]&#xD;&#xA;      --tip                  Add a tip to the transction for the block author                                       [number]&#xD;&#xA;      --types                Add this .json file as types to the API constructor                                    [string]&#xD;&#xA;      --ws                   The API endpoint to connect to, e.g. wss://kusama-rpc.polkadot.io&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17620" PostHistoryTypeId="2" PostId="4716" RevisionGUID="9c025e0a-aaa6-405c-bc38-d86b1eb1c185" CreationDate="2022-09-08T16:10:46.967" UserId="1789" Text="How is gasPrice determined in Frontier EVM?&#xD;&#xA;&#xD;&#xA;I found the following settings in the Frontier/template/src/runtime/lib.rs&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;	type FeeCalculator = BaseFee;&#xD;&#xA;	type GasWeightMapping = FixedGasWeightMapping;&#xD;&#xA;	type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping&lt;Self&gt;;&#xD;&#xA;	type CallOrigin = EnsureAddressTruncated;&#xD;&#xA;	type WithdrawOrigin = EnsureAddressTruncated;&#xD;&#xA;	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type PrecompilesType = FrontierPrecompiles&lt;Self&gt;;&#xD;&#xA;	type PrecompilesValue = PrecompilesValue;&#xD;&#xA;	type ChainId = EVMChainId;&#xD;&#xA;	type BlockGasLimit = BlockGasLimit;&#xD;&#xA;	type Runner = pallet_evm::runner::stack::Runner&lt;Self&gt;;&#xD;&#xA;	type OnChargeTransaction = ();&#xD;&#xA;	type FindAuthor = FindAuthorTruncated&lt;Aura&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_base_fee::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Threshold = BaseFeeThreshold;&#xD;&#xA;	type DefaultBaseFeePerGas = DefaultBaseFeePerGas;&#xD;&#xA;	type DefaultElasticity = DefaultElasticity;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Can I modifiy `fn weight_to_gas(weight: Weight)` to always return zero?&#xD;&#xA;&#xD;&#xA;How can I set it up so there is no charge when certain accounts make certain Ethereum contract transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17622" PostHistoryTypeId="1" PostId="4716" RevisionGUID="9c025e0a-aaa6-405c-bc38-d86b1eb1c185" CreationDate="2022-09-08T16:10:46.967" UserId="1789" Text="How to make gasless(EVM balance) transaction in Frontier EVM for certain Ethereum smart contract functions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17623" PostHistoryTypeId="3" PostId="4716" RevisionGUID="9c025e0a-aaa6-405c-bc38-d86b1eb1c185" CreationDate="2022-09-08T16:10:46.967" UserId="1789" Text="|parachain|frontier|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17624" PostHistoryTypeId="2" PostId="4717" RevisionGUID="90b47672-8b02-4e05-aa7d-06773dcc3156" CreationDate="2022-09-08T16:22:19.460" UserId="3127" Text="Here is an example how to upload a wasm blob as a file by calling `setCode` of the `system` module [https://github.com/polkadot-js/tools/tree/master/packages/api-cli#files-as-parameters][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/tools/tree/master/packages/api-cli#files-as-parameters&#xD;&#xA;&#xD;&#xA;I suggest trying a similar command with your module's extrinsic. " ContentLicense="CC BY-SA 4.0" />
  <row Id="17626" PostHistoryTypeId="5" PostId="4701" RevisionGUID="12e52997-45e9-4bcf-9678-526b10aaccce" CreationDate="2022-09-08T17:43:03.697" UserId="3109" Comment="added 92 characters in body" Text="How to run smoldot repository code and connect with our substrate based chain or substrate node ?&#xD;&#xA;On official documentation of smoldot on github is not in detail .Please answer here complete way to use smoldot light client.&#xD;&#xA;and Where can i find in depth explanation of connecting smoldot to substrate based chains." ContentLicense="CC BY-SA 4.0" />
  <row Id="17627" PostHistoryTypeId="2" PostId="4718" RevisionGUID="de0d17be-6b65-4ac6-b7a5-2879e35bfe92" CreationDate="2022-09-08T18:08:08.770" UserId="94" Text="&gt; How to run smoldot repository code and connect with our substrate based chain or substrate node ?&#xD;&#xA;&#xD;&#xA;`cd bin/wasm-node/javascript &amp;&amp; npm i &amp;&amp; npm start` as per [README](https://github.com/paritytech/smoldot#wasm-light-node).  &#xD;&#xA;I don't know if there is more in depth doc besides the code itself. IMO that is fine for a WIP repo." ContentLicense="CC BY-SA 4.0" />
  <row Id="17629" PostHistoryTypeId="2" PostId="4719" RevisionGUID="1ccbbdc6-4e55-4815-b02c-4adfcc324342" CreationDate="2022-09-08T18:23:32.973" UserId="276" Text="You can use https://github.com/polkascan/py-substrate-interface for that, it has a lot of helper functions to interface with Substrate:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;from substrateinterface import Keypair&#xD;&#xA;keypair = Keypair.create_from_mnemonic(Keypair.generate_mnemonic(), crypto_type=KeypairType.SR25519)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17631" PostHistoryTypeId="2" PostId="4720" RevisionGUID="188c6225-4cb1-4503-9a27-3619ea609033" CreationDate="2022-09-08T18:26:29.307" UserId="276" Text="I think what you mean is the `author_pendingExtrinsics` RPC call, so that would be something like:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;result = substrate.rpc_request(&quot;author_pendingExtrinsics&quot;, [])&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17633" PostHistoryTypeId="2" PostId="4721" RevisionGUID="a39a545b-4383-416e-b10c-277e39e5149d" CreationDate="2022-09-08T18:45:20.343" UserId="165" Text="While building a node using the _feature-gated_ runtimes added in https://github.com/paritytech/substrate/pull/11818 I encounter the following compilation errors.&#xD;&#xA;&#xD;&#xA;- **Scenario 1**&#xD;&#xA;&#xD;&#xA;`construct_runtime!` includes a pallet decorated by `#[cfg(feature = &quot;template&quot;)]`.&#xD;&#xA;Building with: `$ cargo build --release` results in&#xD;&#xA;```rust&#xD;&#xA;--- stderr&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/home/ale/Projects/substrate/substrate-node-template/runtime)&#xD;&#xA;  error[E0277]: the trait bound `Event: From&lt;pallet_template::Event&lt;Runtime&gt;&gt;` is not satisfied&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:270:15&#xD;&#xA;      |&#xD;&#xA;  270 |     type Event = Event;&#xD;&#xA;      |                  ^^^^^ the trait `From&lt;pallet_template::Event&lt;Runtime&gt;&gt;` is not implemented for `Event`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `From&lt;T&gt;`:&#xD;&#xA;                &lt;Event as From&lt;frame_system::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_balances::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_grandpa::Event&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_sudo::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_transaction_payment::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;  note: required by a bound in `pallet_template::Config::Event`&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/pallets/template/src/lib.rs:30:15&#xD;&#xA;      |&#xD;&#xA;  30  |         type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;      |                     ^^^^^^^^^^^^^^^^^ required by this bound in `pallet_template::Config::Event`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;  ```&#xD;&#xA;  &#xD;&#xA; - **Scenario 2**&#xD;&#xA;&#xD;&#xA;`construct_runtime!` includes a pallet decorated by `#[cfg(feature = &quot;template&quot;)]`.&#xD;&#xA;Building with: `$ cargo build --release --features template` results in&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/home/ale/Projects/substrate/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.65.0-nightly (2e35f954a 2022-09-01)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/home/ale/Projects/substrate/substrate-node-template/runtime)&#xD;&#xA;  error[E0428]: the name `AllPalletsWithSystem` is defined multiple times&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:280:1&#xD;&#xA;      |&#xD;&#xA;  280 |     construct_runtime!(&#xD;&#xA;      |    _^&#xD;&#xA;      |  _|_|&#xD;&#xA;      | | |&#xD;&#xA;  281 | | |     pub struct Runtime&#xD;&#xA;  282 | | |     where&#xD;&#xA;  283 | | |         Block = Block,&#xD;&#xA;  ...   | |&#xD;&#xA;  298 | | |     }&#xD;&#xA;  299 | | | );&#xD;&#xA;      | | |_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: `AllPalletsWithSystem` must be defined only once in the type namespace of this module&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0428]: the name `AllPalletsWithoutSystem` is defined multiple times&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:280:1&#xD;&#xA;      |&#xD;&#xA;  280 |     construct_runtime!(&#xD;&#xA;      |    _^&#xD;&#xA;      |  _|_|&#xD;&#xA;      | | |&#xD;&#xA;  281 | | |     pub struct Runtime&#xD;&#xA;  282 | | |     where&#xD;&#xA;  283 | | |         Block = Block,&#xD;&#xA;  ...   | |&#xD;&#xA;  298 | | |     }&#xD;&#xA;  299 | | | );&#xD;&#xA;      | | |_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: `AllPalletsWithoutSystem` must be defined only once in the type namespace of this module&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0428]: the name `AllPalletsWithSystemReversed` is defined multiple times&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:280:1&#xD;&#xA;      |&#xD;&#xA;  280 |     construct_runtime!(&#xD;&#xA;      |    _^&#xD;&#xA;      |  _|_|&#xD;&#xA;      | | |&#xD;&#xA;  281 | | |     pub struct Runtime&#xD;&#xA;  282 | | |     where&#xD;&#xA;  283 | | |         Block = Block,&#xD;&#xA;  ...   | |&#xD;&#xA;  298 | | |     }&#xD;&#xA;  299 | | | );&#xD;&#xA;      | | |_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: `AllPalletsWithSystemReversed` must be defined only once in the type namespace of this module&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0428]: the name `AllPalletsWithoutSystemReversed` is defined multiple times&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:280:1&#xD;&#xA;      |&#xD;&#xA;  280 |     construct_runtime!(&#xD;&#xA;      |    _^&#xD;&#xA;      |  _|_|&#xD;&#xA;      | | |&#xD;&#xA;  281 | | |     pub struct Runtime&#xD;&#xA;  282 | | |     where&#xD;&#xA;  283 | | |         Block = Block,&#xD;&#xA;  ...   | |&#xD;&#xA;  298 | | |     }&#xD;&#xA;  299 | | | );&#xD;&#xA;      | | |_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: `AllPalletsWithoutSystemReversed` must be defined only once in the type namespace of this module&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0428]: the name `AllPalletsReversedWithSystemFirst` is defined multiple times&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:280:1&#xD;&#xA;      |&#xD;&#xA;  280 |     construct_runtime!(&#xD;&#xA;      |    _^&#xD;&#xA;      |  _|_|&#xD;&#xA;      | | |&#xD;&#xA;  281 | | |     pub struct Runtime&#xD;&#xA;  282 | | |     where&#xD;&#xA;  283 | | |         Block = Block,&#xD;&#xA;  ...   | |&#xD;&#xA;  298 | | |     }&#xD;&#xA;  299 | | | );&#xD;&#xA;      | | |_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: `AllPalletsReversedWithSystemFirst` must be defined only once in the type namespace of this module&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  warning: ignoring -C extra-filename flag due to -o flag&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0428`.&#xD;&#xA;  warning: `node-template-runtime` (lib) generated 1 warning&#xD;&#xA;  error: could not compile `node-template-runtime` due to 5 previous errors; 1 warning emitted&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Find the source I have been working with at: https://github.com/al3mart/substrate-node-template/tree/al3mart/runtime-featuregated.&#xD;&#xA;To reproduce the above behavior run the build commands posted above. " ContentLicense="CC BY-SA 4.0" />
  <row Id="17635" PostHistoryTypeId="1" PostId="4721" RevisionGUID="a39a545b-4383-416e-b10c-277e39e5149d" CreationDate="2022-09-08T18:45:20.343" UserId="165" Text="Hitting compilation issues while testing Substrate PR#11818 - Allow `construct_runtime` to take cfg attributes for pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="17636" PostHistoryTypeId="3" PostId="4721" RevisionGUID="a39a545b-4383-416e-b10c-277e39e5149d" CreationDate="2022-09-08T18:45:20.343" UserId="165" Text="|substrate-node|substrate-node-template|features|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17637" PostHistoryTypeId="2" PostId="4722" RevisionGUID="42b067b4-d7f6-4cef-9d88-99cc58a13d6a" CreationDate="2022-09-08T20:09:11.363" UserId="2548" Text="I'm trying to run the image pulled from dockerhub: https://hub.docker.com/repository/docker/gertdjali/escrow but doesn't work.&#xD;&#xA;&#xD;&#xA;I ran the image locally by terminal './scripts/docker_run.sh' as described in this doc on git https://github.com/substrate-developer-hub/substrate-node-template. After I pushed this image to dockerhub, I pulled it from another machine(pc) and tried to run it but it doesn't work because when I try to connect it to the https://polkadot.js.org/apps/#/explorer  says: Waiting to make a connection to the remote endpoint and finishing API initialization.&#xD;&#xA;What should I do? &#xD;&#xA;Can somebody pull my docker image and try to run it locally and then to connect to https://polkadot.js.org ? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17639" PostHistoryTypeId="1" PostId="4722" RevisionGUID="42b067b4-d7f6-4cef-9d88-99cc58a13d6a" CreationDate="2022-09-08T20:09:11.363" UserId="2548" Text="Problem to run docker image" ContentLicense="CC BY-SA 4.0" />
  <row Id="17640" PostHistoryTypeId="3" PostId="4722" RevisionGUID="42b067b4-d7f6-4cef-9d88-99cc58a13d6a" CreationDate="2022-09-08T20:09:11.363" UserId="2548" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17641" PostHistoryTypeId="2" PostId="4723" RevisionGUID="5e9717f0-719f-43b5-9858-82cd04cb9fff" CreationDate="2022-09-08T20:20:14.340" UserId="284" Text="Here are a couple of places to look for more information:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/integrate-with-tools/substrate-connect/&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-docs/pull/1382&#xD;&#xA;&#xD;&#xA;The PR is still a work in progress, but might help to answer your questions." ContentLicense="CC BY-SA 4.0" />
  <row Id="17643" PostHistoryTypeId="2" PostId="4724" RevisionGUID="dc7acd1e-a0ea-492f-ae4d-e801a0576dd8" CreationDate="2022-09-08T21:00:14.317" UserId="2752" Text="I am currently trying to setup a project where I intend to have multiple contracts &#xD;&#xA;call on each other. Since I am using the openbrush standard (mostly to implement&#xD;&#xA;an NFT using PSP34) I thought it would make sense to adhere to the [recommended project&#xD;&#xA;structure][1] by the openbrush team, since it also makes it easier to cross contract&#xD;&#xA;call, compared to what I have seen before when only ink! is used.&#xD;&#xA;&#xD;&#xA;However, I now have some problems actually implementing it. For starters (and mostly as an example), I just wanted to implement a simple contract which prints an NFT when deployed and allows the caller to print new ones, if the caller already owns an NFT. So you would need to be &quot;invited&quot; by someone who already has an NFT. &#xD;&#xA;&#xD;&#xA;I looked at the [example-project-structure][2] which is provided on github and tried to model my approach after that. However, I do not understand a few things, especially in the 'impls' folder, which is supposed to contain the actual implementations of the contract methods.&#xD;&#xA;&#xD;&#xA;I get bombarded with a lot of Error messages, some of them I could fix, but some of them I could not figure out the problem.&#xD;&#xA;&#xD;&#xA;Here is the code:&#xD;&#xA;&#xD;&#xA;    pub use crate::traits::nft::*;&#xD;&#xA;&#xD;&#xA;    use ink_prelude::{&#xD;&#xA;        vec::Vec&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    use openbrush::{&#xD;&#xA;        contracts::traits::psp34::{&#xD;&#xA;            PSP34Ref,&#xD;&#xA;            Id&#xD;&#xA;        },&#xD;&#xA;        traits::{&#xD;&#xA;            AccountId,&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    impl &lt;T&gt; Buy for T {&#xD;&#xA;&#xD;&#xA;        default fn _emit_nft_bought(&amp;mut self, _owner: AccountId, _id: Vec&lt;u8&gt;){}&#xD;&#xA;&#xD;&#xA;        default fn buy(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            to: AccountId,&#xD;&#xA;            id: Vec&lt;u8&gt;&#xD;&#xA;        ) -&gt; Result&lt;(), BuyError&gt; {&#xD;&#xA;&#xD;&#xA;            if id_exists(&amp;self){&#xD;&#xA;                PSP34Ref::_mint_to(to, Id::Bytes(id.clone()))?;&#xD;&#xA;                self._emit_nft_bought(to, id);&#xD;&#xA;                Ok(())&#xD;&#xA;            }else{&#xD;&#xA;                return Err(BuyError::NoBalance)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /// this function just serves as an example&#xD;&#xA;    fn id_exists &lt;T&gt; (instance: &amp;T) -&gt; bool{&#xD;&#xA;        if PSP34Ref::balance_of(&amp;instance, Self::env().caller()) &gt; 0{&#xD;&#xA;            true&#xD;&#xA;        }else{&#xD;&#xA;            false&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And here the errors:&#xD;&#xA;&lt;pre&gt;&lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;error[E0433]&lt;/b&gt;&lt;/font&gt;&lt;b&gt;: failed to resolve: use of undeclared type `Self`&lt;/b&gt;&#xD;&#xA;  &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;--&amp;gt; &lt;/b&gt;&lt;/font&gt;contracts/impls/nft/buy.rs:43:40&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;43&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;    if PSP34Ref::balance_of(&amp;amp;instance, Self::env().caller()) &amp;gt; 0{&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                                       &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;^^^^&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;use of undeclared type `Self`&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&#xD;&#xA;&lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;error[E0599]&lt;/b&gt;&lt;/font&gt;&lt;b&gt;: no associated item named `_mint_to` found for trait object `(dyn PSP34Wrapper + &amp;apos;static)` in the current scope&lt;/b&gt;&#xD;&#xA;  &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;--&amp;gt; &lt;/b&gt;&lt;/font&gt;contracts/impls/nft/buy.rs:29:23&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;29&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;            PSP34Ref::_mint_to(to, Id::Bytes(id.clone()))?;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                      &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;^^^^^^^^&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;associated item not found in `(dyn PSP34Wrapper + &amp;apos;static)`&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&#xD;&#xA;&lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;error[E0277]&lt;/b&gt;&lt;/font&gt;&lt;b&gt;: the trait bound `&amp;amp;T: PSP34Wrapper` is not satisfied&lt;/b&gt;&#xD;&#xA;  &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;--&amp;gt; &lt;/b&gt;&lt;/font&gt;contracts/impls/nft/buy.rs:43:29&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;43&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;    if PSP34Ref::balance_of(&amp;amp;instance, Self::env().caller()) &amp;gt; 0{&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                            &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;^^^^^^^^^&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;the trait `PSP34Wrapper` is not implemented for `&amp;amp;T`&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;= &lt;/b&gt;&lt;/font&gt;&lt;b&gt;help&lt;/b&gt;: the trait `PSP34Wrapper` &lt;b&gt;is&lt;/b&gt; implemented for `&lt;b&gt;&amp;lt;DefaultEnvironment as Environment&amp;gt;::AccountId&lt;/b&gt;`&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;= &lt;/b&gt;&lt;/font&gt;&lt;b&gt;note&lt;/b&gt;: required for the cast to the object type `dyn PSP34Wrapper`&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;In the example provided by the team behind openbrush, they are using Self::env().caller(),&#xD;&#xA;so I don't really understand why this is not accepted here. &#xD;&#xA;The other two errors I am a bit lost, where the origin of the error lies and what is necessary to fix them.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.openbrush.io/smart-contracts/example/setup_project&#xD;&#xA;  [2]: https://github.com/Supercolony-net/openbrush-contracts/tree/main/example_project_structure" ContentLicense="CC BY-SA 4.0" />
  <row Id="17645" PostHistoryTypeId="1" PostId="4724" RevisionGUID="dc7acd1e-a0ea-492f-ae4d-e801a0576dd8" CreationDate="2022-09-08T21:00:14.317" UserId="2752" Text="How to set up an project utilizing openbrush?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17646" PostHistoryTypeId="3" PostId="4724" RevisionGUID="dc7acd1e-a0ea-492f-ae4d-e801a0576dd8" CreationDate="2022-09-08T21:00:14.317" UserId="2752" Text="|ink|rust|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17647" PostHistoryTypeId="52" PostId="4707" RevisionGUID="5256741a-41ee-416a-b61a-222f7cbcd137" CreationDate="2022-09-08T21:02:50.083" />
  <row Id="17648" PostHistoryTypeId="2" PostId="4725" RevisionGUID="9fa28529-54d4-4a87-b8ca-463d2f0d8015" CreationDate="2022-09-08T21:59:42.697" UserId="2441" Text="I have noticed on Moonbeam that the `Normal system.blockWeight` is often much higher than the sum of Normal class extrinsics included in the block. Example:&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/explorer/query/0x438d0a0323d6434a5426ec02dfbfe1847cbfafcf05517c1515029428e5f5b85d&#xD;&#xA;&#xD;&#xA;(block 1813141 / 0x438d0a0323d6434a5426ec02dfbfe1847cbfafcf05517c1515029428e5f5b85d)&#xD;&#xA;&#xD;&#xA;This block includes some `ethereum.transact` transactions totaling `14_967_850_000` Normal weight, but the `system.blockWeight` Normal class for the same block is `221_040_085_000`.&#xD;&#xA;&#xD;&#xA;It is common for these to be different, although the two numbers are sometimes identical as well. Sometimes they are both 0 for a block.&#xD;&#xA;&#xD;&#xA;Where could this discrepancy be coming from?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17650" PostHistoryTypeId="1" PostId="4725" RevisionGUID="9fa28529-54d4-4a87-b8ca-463d2f0d8015" CreationDate="2022-09-08T21:59:42.697" UserId="2441" Text="Where can normal weight come from other than extrinsics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17651" PostHistoryTypeId="3" PostId="4725" RevisionGUID="9fa28529-54d4-4a87-b8ca-463d2f0d8015" CreationDate="2022-09-08T21:59:42.697" UserId="2441" Text="|extrinsic|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17652" PostHistoryTypeId="2" PostId="4726" RevisionGUID="cd338e86-49ce-4051-b65e-4c584bd08979" CreationDate="2022-09-08T23:28:52.077" UserId="3099" Text="I am new to the substrate and setting it up. I do not get the output fields as shown in the &quot;Review the node messages displayed&quot; section of the tutorial [here][1] on how to launch a new node. I am following all the steps in the tutorial to launch the node, and my local blockchain is working fine and finalizing new nodes. The only issue is that I do not see the detailed output. I am pasting a screenshot below of what I see.&#xD;&#xA;&#xD;&#xA;[![Screenshot of initial output I see on launching a fresh node][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/get-started/simulate-network/#Start-the-first-blockchain-node&#xD;&#xA;  [2]: https://i.stack.imgur.com/7L3rn.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17654" PostHistoryTypeId="1" PostId="4726" RevisionGUID="cd338e86-49ce-4051-b65e-4c584bd08979" CreationDate="2022-09-08T23:28:52.077" UserId="3099" Text="Don't get the detailed output as shown in the tutorial when I launch a new node" ContentLicense="CC BY-SA 4.0" />
  <row Id="17655" PostHistoryTypeId="3" PostId="4726" RevisionGUID="cd338e86-49ce-4051-b65e-4c584bd08979" CreationDate="2022-09-08T23:28:52.077" UserId="3099" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17656" PostHistoryTypeId="5" PostId="4575" RevisionGUID="84353cbb-5ca1-4caa-b983-baea811873fa" CreationDate="2022-09-08T23:55:49.623" UserId="2060" Comment="deleted 75 characters in body" Text="We want the ability to filter certain accounts from calling extrinsics in the democracy pallet.  There are more details but basically we can't do this by reserving token balance or we would do that.&#xD;&#xA;&#xD;&#xA;One idea was to create a signed extension where the call fails if the AccountId is one of the restricted accounts, which is possible but seems heavy-handed.  &#xD;&#xA;&#xD;&#xA;We thought, maybe we could set Origin to use a custom EnsureOrigin implementation for pallet_democracy. Unfortunately it's just an associated type, so we can't change it in the pallet_democracy Config.&#xD;&#xA;&#xD;&#xA;What is the best way to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17657" PostHistoryTypeId="2" PostId="4727" RevisionGUID="9da506c1-a022-40d6-a3bf-f71d1b1663ef" CreationDate="2022-09-09T02:43:51.203" UserId="251" Text="[Subalfred](https://subalfred.hack.ink/user/cli/key.html) is another option now.&#xD;&#xA;&#xD;&#xA;It provides more detail about the key.&#xD;&#xA;&#xD;&#xA;It could:&#xD;&#xA;- show the SS58 prefix&#xD;&#xA;- detect if it is a pallet account&#xD;&#xA;- detect if it is a paraid&#xD;&#xA;- show all networks' address&#xD;&#xA;- accept multiple type of input, public key/address/id&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subalfred key --show-prefix --list-all 0x6d6f646c70792f74727372790000000000000000000000000000000000000000&#xD;&#xA;public-key 0x6d6f646c70792f74727372790000000000000000000000000000000000000000 PalletId(py/trsry)&#xD;&#xA;BareEd25519               3 LqU5wxzkNSKtMmvyXtM6vimZUPuH1mhTaTHm9L1h4BA6stP&#xD;&#xA;BareSecp256k1            43 5LKrRdd881RQ8hxVCq5JCyMmQt7fULxX1CcYNV44DFxfMrsn&#xD;&#xA;BareSr25519               1 9G9ZxtByngsaEy1AU8JM8BvGW7KAeWf5hM2Xn3QmLzBY97T&#xD;&#xA;DICO                     53 6LCT1Z39xvAfhJ18G9sXyz21sjYc2BFitc9rXKV4qouYBA7Z&#xD;&#xA;Eggnet                 4006 oVPveLKWsFc9HzQiHqDv81ecYWEH8EyHSGDCwMNVNTJeQQxFU&#xD;&#xA;ICE                    2208 npP7jGQpDyrB6vTXuh3wqNJdPoWN9nK5vWSbbo82eQy9kNdXb&#xD;&#xA;KICO                     52 6EQnkZVkadHwYEbfMczWc5kbEFQJxzdChfbiudqmNxK3tnhx&#xD;&#xA;SNOW                   2207 nhzjWivARPECavheDiyeKCdcCSTDLGancSF9CRNsNnF6YMzYq&#xD;&#xA;Turing                 2114 cU77QDyYhsYaVKKm8p5Ywh4gygQ59bm2dhsoiZB1JtoxHGyQR&#xD;&#xA;acala                    10 23M5ttkpSQZQymcBKG3WkEak5sPxfJBLnALD4vq7w3La53HJ&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17659" PostHistoryTypeId="5" PostId="4621" RevisionGUID="1db70676-3fd9-4fa2-9802-5e6cc35db4d8" CreationDate="2022-09-09T03:06:04.770" UserId="252" Comment="added 51 characters in body" Text="I search for half a day. From [here][1] and [here][2] I got some information.&#xD;&#xA;&#xD;&#xA;I find the exact file of `librocksdb-sys-0.6.1+6.28.2/snappy/snappy.cc` in the help of `CLion` IDE, which is referenced by the current `node-template` project, and change the piece of code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#if defined(__GNUC__) &amp;&amp; defined(__x86_64__)    // delete&#xD;&#xA;#if defined(__GCC_ASM_FLAG_OUTPUTS__) &amp;&amp; defined(__x86_64__)   // add this line, change the '__GNUC__' to '__GCC_ASM_FLAG_OUTPUTS__'&#xD;&#xA;  // TODO clang misses the fact that the (c &amp; 3) already correctly&#xD;&#xA;  // sets the zero flag.&#xD;&#xA;  asm(&quot;and $3, %k[tag_type]\n\t&quot;&#xD;&#xA;      : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal));&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems that `librocksdb` reference the `snappy` by the source code. I directly change the code as per the solution [here][2]. Then compile the node-template code, it is successful.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Another way is updating clang to version &gt;=12&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://groups.google.com/g/snappy-compression/c/-AVUHVOf_OQ&#xD;&#xA;  [2]: https://github.com/google/snappy/commit/8dd58a519f79f0742d4c68fbccb2aed2ddb651e8" ContentLicense="CC BY-SA 4.0" />
  <row Id="17660" PostHistoryTypeId="2" PostId="4728" RevisionGUID="b951a2cd-dd0a-4055-af3d-4cfeda1dcbf7" CreationDate="2022-09-09T04:58:22.963" UserId="3146" Text="I'm trying to learn how to use the staking pallet in a game I'm building as a way to learn substrate, [linked here](https://github.com/stonecharioteer/substrate-node-connect-four), and I'd like to implement staking an amount when challenging another player.&#xD;&#xA;However, I'm using Frame 4.0.0-dev, and I'm unable to find enough resources to help me understand how to mock `BalanceOf` for writing tests.&#xD;&#xA;Could someone point me to some?&#xD;&#xA;I've been looking at [lockable currency](https://docs.substrate.io/reference/how-to-guides/pallet-design/implement-lockable-currency/), but [that pallet](https://github.com/substrate-developer-hub/substrate-how-to-guides/tree/main/example-code/template-node/pallets/lockable-currency/src) doesn't have any tests.&#xD;&#xA;&#xD;&#xA;Could someone help me here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17662" PostHistoryTypeId="1" PostId="4728" RevisionGUID="b951a2cd-dd0a-4055-af3d-4cfeda1dcbf7" CreationDate="2022-09-09T04:58:22.963" UserId="3146" Text="How do I mock `BalanceOf` for testing staking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17663" PostHistoryTypeId="3" PostId="4728" RevisionGUID="b951a2cd-dd0a-4055-af3d-4cfeda1dcbf7" CreationDate="2022-09-09T04:58:22.963" UserId="3146" Text="|balances|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17664" PostHistoryTypeId="2" PostId="4729" RevisionGUID="7dbf868b-12fc-4455-b793-00a4d6833dc1" CreationDate="2022-09-09T05:49:01.333" UserId="251" Text="Where are you going to use the `BalanceOf`?&#xD;&#xA;&#xD;&#xA;I think you could take a look at the [pallet-balances](https://github.com/paritytech/substrate/blob/d1f905bad9/frame/balances).&#xD;&#xA;It shows you: &#xD;&#xA;- [how to define a `BalanceOf` type](https://github.com/paritytech/substrate/blob/d1f905bad9/frame/balances/README.md)&#xD;&#xA;- [how to implement the `LockableCurrency`](https://github.com/paritytech/substrate/blob/5a48536a49859f83dbbbab1285311f14c192e7b1/frame/balances/src/lib.rs#L2115-L2182)&#xD;&#xA;- [a lot of unit tests](https://github.com/paritytech/substrate/blob/d1f905bad9/frame/balances/src/tests.rs)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17666" PostHistoryTypeId="2" PostId="4730" RevisionGUID="3e04eee4-d4f6-452e-9abd-7302e6cf7b7c" CreationDate="2022-09-09T06:59:02.113" UserId="3127" Text="In your `mock.rs` file at the very end you are building the mock storage with `pub fn new_test_ext()`. In there, you can use `pallet_balances` to predefine some balances for your addresses along the lines of: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;	let mut t = frame_system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap();&#xD;&#xA;	pallet_balances::GenesisConfig::&lt;Test&gt; {&#xD;&#xA;		balances: vec![(1, 100_000), (2, 100_000), (3, 100_000), (4, 100_000), (5, 100_00)],&#xD;&#xA;	}&#xD;&#xA;	.assimilate_storage(&amp;mut t)&#xD;&#xA;	.unwrap();&#xD;&#xA;	t.into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also add `Balances: pallet_balances` to `construct_runtime!` . " ContentLicense="CC BY-SA 4.0" />
  <row Id="17668" PostHistoryTypeId="5" PostId="4729" RevisionGUID="81f687d8-b12a-4893-bd61-187ab4409115" CreationDate="2022-09-09T07:11:43.413" UserId="251" Comment="deleted 1 character in body" Text="Where are you going to use the `BalanceOf`?&#xD;&#xA;&#xD;&#xA;I think you could take a look at the [pallet-balances](https://github.com/paritytech/substrate/blob/d1f905bad9/frame/balances).&#xD;&#xA;It shows you: &#xD;&#xA;- [how to define a `BalanceOf` type](https://github.com/paritytech/substrate/blob/d1f905bad9/frame/balances/README.md)&#xD;&#xA;- [how to implement the `LockableCurrency`](https://github.com/paritytech/substrate/blob/5a48536a49859f83dbbbab1285311f14c192e7b1/frame/balances/src/lib.rs#L2115-L2182)&#xD;&#xA;- [a lot of unit tests](https://github.com/paritytech/substrate/blob/d1f905bad9/frame/balances/src/tests.rs)" ContentLicense="CC BY-SA 4.0" />
  <row Id="17674" PostHistoryTypeId="2" PostId="4732" RevisionGUID="1adb0f6f-4b0a-4516-87b1-380308a743ae" CreationDate="2022-09-09T07:32:58.900" UserId="1927" Text="I'm trying to understand the `[pallet::extra_constants]` and how it's different from `[pallet::constant]`.&#xD;&#xA;&#xD;&#xA;And appropriate scenario for the same.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17676" PostHistoryTypeId="1" PostId="4732" RevisionGUID="1adb0f6f-4b0a-4516-87b1-380308a743ae" CreationDate="2022-09-09T07:32:58.900" UserId="1927" Text="How is [pallet::extra_constants] is different from [pallet::constant]. When is it appropriate to use it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17677" PostHistoryTypeId="3" PostId="4732" RevisionGUID="1adb0f6f-4b0a-4516-87b1-380308a743ae" CreationDate="2022-09-09T07:32:58.900" UserId="1927" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17678" PostHistoryTypeId="5" PostId="4721" RevisionGUID="c8a9f7fd-2f10-4679-97e5-b8db78642267" CreationDate="2022-09-09T07:42:42.167" UserId="165" Comment="edited body" Text="Find the source I have been working with at: https://github.com/al3mart/substrate-node-template/tree/al3mart/runtime-featuregated.&#xD;&#xA;&#xD;&#xA;While building a node using the _feature-gated_ runtimes added in https://github.com/paritytech/substrate/pull/11818 I encounter the following compilation errors.&#xD;&#xA;&#xD;&#xA;- **Scenario 1**&#xD;&#xA;&#xD;&#xA;`construct_runtime!` includes a pallet decorated by `#[cfg(feature = &quot;template&quot;)]`.&#xD;&#xA;Building with: `$ cargo build --release` results in&#xD;&#xA;```rust&#xD;&#xA;--- stderr&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/home/ale/Projects/substrate/substrate-node-template/runtime)&#xD;&#xA;  error[E0277]: the trait bound `Event: From&lt;pallet_template::Event&lt;Runtime&gt;&gt;` is not satisfied&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:270:15&#xD;&#xA;      |&#xD;&#xA;  270 |     type Event = Event;&#xD;&#xA;      |                  ^^^^^ the trait `From&lt;pallet_template::Event&lt;Runtime&gt;&gt;` is not implemented for `Event`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `From&lt;T&gt;`:&#xD;&#xA;                &lt;Event as From&lt;frame_system::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_balances::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_grandpa::Event&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_sudo::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;                &lt;Event as From&lt;pallet_transaction_payment::Event&lt;Runtime&gt;&gt;&gt;&#xD;&#xA;  note: required by a bound in `pallet_template::Config::Event`&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/pallets/template/src/lib.rs:30:15&#xD;&#xA;      |&#xD;&#xA;  30  |         type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;      |                     ^^^^^^^^^^^^^^^^^ required by this bound in `pallet_template::Config::Event`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;  ```&#xD;&#xA;  &#xD;&#xA; - **Scenario 2**&#xD;&#xA;&#xD;&#xA;`construct_runtime!` includes a pallet decorated by `#[cfg(feature = &quot;template&quot;)]`.&#xD;&#xA;Building with: `$ cargo build --release --features template` results in&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/home/ale/Projects/substrate/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.65.0-nightly (2e35f954a 2022-09-01)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/home/ale/Projects/substrate/substrate-node-template/runtime)&#xD;&#xA;  error[E0428]: the name `AllPalletsWithSystem` is defined multiple times&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:280:1&#xD;&#xA;      |&#xD;&#xA;  280 |     construct_runtime!(&#xD;&#xA;      |    _^&#xD;&#xA;      |  _|_|&#xD;&#xA;      | | |&#xD;&#xA;  281 | | |     pub struct Runtime&#xD;&#xA;  282 | | |     where&#xD;&#xA;  283 | | |         Block = Block,&#xD;&#xA;  ...   | |&#xD;&#xA;  298 | | |     }&#xD;&#xA;  299 | | | );&#xD;&#xA;      | | |_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: `AllPalletsWithSystem` must be defined only once in the type namespace of this module&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0428]: the name `AllPalletsWithoutSystem` is defined multiple times&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:280:1&#xD;&#xA;      |&#xD;&#xA;  280 |     construct_runtime!(&#xD;&#xA;      |    _^&#xD;&#xA;      |  _|_|&#xD;&#xA;      | | |&#xD;&#xA;  281 | | |     pub struct Runtime&#xD;&#xA;  282 | | |     where&#xD;&#xA;  283 | | |         Block = Block,&#xD;&#xA;  ...   | |&#xD;&#xA;  298 | | |     }&#xD;&#xA;  299 | | | );&#xD;&#xA;      | | |_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: `AllPalletsWithoutSystem` must be defined only once in the type namespace of this module&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0428]: the name `AllPalletsWithSystemReversed` is defined multiple times&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:280:1&#xD;&#xA;      |&#xD;&#xA;  280 |     construct_runtime!(&#xD;&#xA;      |    _^&#xD;&#xA;      |  _|_|&#xD;&#xA;      | | |&#xD;&#xA;  281 | | |     pub struct Runtime&#xD;&#xA;  282 | | |     where&#xD;&#xA;  283 | | |         Block = Block,&#xD;&#xA;  ...   | |&#xD;&#xA;  298 | | |     }&#xD;&#xA;  299 | | | );&#xD;&#xA;      | | |_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: `AllPalletsWithSystemReversed` must be defined only once in the type namespace of this module&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0428]: the name `AllPalletsWithoutSystemReversed` is defined multiple times&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:280:1&#xD;&#xA;      |&#xD;&#xA;  280 |     construct_runtime!(&#xD;&#xA;      |    _^&#xD;&#xA;      |  _|_|&#xD;&#xA;      | | |&#xD;&#xA;  281 | | |     pub struct Runtime&#xD;&#xA;  282 | | |     where&#xD;&#xA;  283 | | |         Block = Block,&#xD;&#xA;  ...   | |&#xD;&#xA;  298 | | |     }&#xD;&#xA;  299 | | | );&#xD;&#xA;      | | |_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: `AllPalletsWithoutSystemReversed` must be defined only once in the type namespace of this module&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0428]: the name `AllPalletsReversedWithSystemFirst` is defined multiple times&#xD;&#xA;     --&gt; /home/ale/Projects/substrate/substrate-node-template/runtime/src/lib.rs:280:1&#xD;&#xA;      |&#xD;&#xA;  280 |     construct_runtime!(&#xD;&#xA;      |    _^&#xD;&#xA;      |  _|_|&#xD;&#xA;      | | |&#xD;&#xA;  281 | | |     pub struct Runtime&#xD;&#xA;  282 | | |     where&#xD;&#xA;  283 | | |         Block = Block,&#xD;&#xA;  ...   | |&#xD;&#xA;  298 | | |     }&#xD;&#xA;  299 | | | );&#xD;&#xA;      | | |_- in this macro invocation&#xD;&#xA;  ...   |&#xD;&#xA;      |&#xD;&#xA;      = note: `AllPalletsReversedWithSystemFirst` must be defined only once in the type namespace of this module&#xD;&#xA;      = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  warning: ignoring -C extra-filename flag due to -o flag&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0428`.&#xD;&#xA;  warning: `node-template-runtime` (lib) generated 1 warning&#xD;&#xA;  error: could not compile `node-template-runtime` due to 5 previous errors; 1 warning emitted&#xD;&#xA;```&#xD;&#xA;To reproduce the above behavior run the build commands posted above. " ContentLicense="CC BY-SA 4.0" />
  <row Id="17679" PostHistoryTypeId="2" PostId="4733" RevisionGUID="3c7c5447-87c5-498d-8a9d-d71d3eff6959" CreationDate="2022-09-09T08:09:05.507" UserId="194" Text="I'm trying to implement this [xcm chain extension mvp](https://github.com/paritytech/pallet-contracts-xcm) to send a XCM call from a simple contract.&#xD;&#xA;&#xD;&#xA;The problem i'm facing is when i try to compile the contract with the given [Cargo.toml](https://github.com/paritytech/pallet-contracts-xcm/blob/master/ink/Cargo.toml), i get the following compilation error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;➜  ink git:(master) ✗ cargo +nightly contract build&#xD;&#xA;&#xD;&#xA;....&#xD;&#xA;&#xD;&#xA;error: the `#[global_allocator]` in ink_allocator conflicts with global allocator in: sp_io&#xD;&#xA;&#xD;&#xA;error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `panic_impl`.&#xD;&#xA;  |&#xD;&#xA;  = note: the lang item is first defined in crate `ink_env` (which `flipper` depends on)&#xD;&#xA;  = note: first definition in `ink_env` loaded from /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libink_env-0acca4fc7a95b368.rlib&#xD;&#xA;  = note: second definition in `sp_io` loaded from /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libsp_io-7276ad9650247190.rlib, /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libsp_io-7276ad9650247190.rmeta&#xD;&#xA;&#xD;&#xA;error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `oom`.&#xD;&#xA;  |&#xD;&#xA;  = note: the lang item is first defined in crate `ink_allocator` (which `ink_env` depends on)&#xD;&#xA;  = note: first definition in `ink_allocator` loaded from /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libink_allocator-f7c621310e573610.rlib, /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libink_allocator-f7c621310e573610.rmeta&#xD;&#xA;  = note: second definition in `sp_io` loaded from /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libsp_io-7276ad9650247190.rlib, /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libsp_io-7276ad9650247190.rmeta&#xD;&#xA;&#xD;&#xA;error: could not compile `extension-xcm` due to 3 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there anything i'm not taking into account when building the contract? I have tried with many variants adding the xcm crate dependency from a new project using `cargo contract new` ..., but the error is the same.&#xD;&#xA;&#xD;&#xA;Also it would be nice to know if there is there any working example of this extension where i can take references?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17681" PostHistoryTypeId="1" PostId="4733" RevisionGUID="3c7c5447-87c5-498d-8a9d-d71d3eff6959" CreationDate="2022-09-09T08:09:05.507" UserId="194" Text="Error when compiling a contract using the XCM chain extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="17682" PostHistoryTypeId="3" PostId="4733" RevisionGUID="3c7c5447-87c5-498d-8a9d-d71d3eff6959" CreationDate="2022-09-09T08:09:05.507" UserId="194" Text="|smart-contract|xcm|chain-extension|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17683" PostHistoryTypeId="66" PostId="4733" RevisionGUID="3c7c5447-87c5-498d-8a9d-d71d3eff6959" CreationDate="2022-09-09T08:09:05.507" UserId="194" />
  <row Id="17684" PostHistoryTypeId="5" PostId="4733" RevisionGUID="f2005df1-a110-4e3b-b221-7bea9f4c1360" CreationDate="2022-09-09T08:09:55.043" UserId="194" Comment="added 77 characters in body" Text="I'm trying to implement this [xcm chain extension mvp](https://github.com/paritytech/pallet-contracts-xcm) to send a XCM call from a simple contract.&#xD;&#xA;&#xD;&#xA;The problem i'm facing is when i try to compile the contract with the given [Cargo.toml](https://github.com/paritytech/pallet-contracts-xcm/blob/master/ink/Cargo.toml), i get the following compilation error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;➜  ink git:(master) ✗ cargo +nightly contract build&#xD;&#xA;&#xD;&#xA;....&#xD;&#xA;&#xD;&#xA;error: the `#[global_allocator]` in ink_allocator conflicts with global allocator in: sp_io&#xD;&#xA;&#xD;&#xA;error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `panic_impl`.&#xD;&#xA;  |&#xD;&#xA;  = note: the lang item is first defined in crate `ink_env` (which `flipper` depends on)&#xD;&#xA;  = note: first definition in `ink_env` loaded from /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libink_env-0acca4fc7a95b368.rlib&#xD;&#xA;  = note: second definition in `sp_io` loaded from /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libsp_io-7276ad9650247190.rlib, /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libsp_io-7276ad9650247190.rmeta&#xD;&#xA;&#xD;&#xA;error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `oom`.&#xD;&#xA;  |&#xD;&#xA;  = note: the lang item is first defined in crate `ink_allocator` (which `ink_env` depends on)&#xD;&#xA;  = note: first definition in `ink_allocator` loaded from /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libink_allocator-f7c621310e573610.rlib, /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libink_allocator-f7c621310e573610.rmeta&#xD;&#xA;  = note: second definition in `sp_io` loaded from /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libsp_io-7276ad9650247190.rlib, /Users/hectorb/blockchain/pallet-contracts-xcm/ink/target/ink/wasm32-unknown-unknown/release/deps/libsp_io-7276ad9650247190.rmeta&#xD;&#xA;&#xD;&#xA;error: could not compile `extension-xcm` due to 3 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there anything i'm not taking into account when building the contract? I have tried with many variants adding the xcm crate dependency from a new project using `cargo contract new` ..., but the error is the same.&#xD;&#xA;&#xD;&#xA;Also it would be nice to know if there is there any working example of this extension where i can take references?&#xD;&#xA;&#xD;&#xA;Github issue: https://github.com/paritytech/pallet-contracts-xcm/issues/1" ContentLicense="CC BY-SA 4.0" />
  <row Id="17685" PostHistoryTypeId="5" PostId="4673" RevisionGUID="a7d734c0-f52c-45c5-8f27-eea977100246" CreationDate="2022-09-09T08:21:10.363" UserId="167" Comment="added 25 characters in body" Text="When a type derives `RuntimeDebug` instead of `Debug`, then this string literal is printed ONLY in wasm. You have two options here: &#xD;&#xA;&#xD;&#xA;1. Run native via `--execution Native`.&#xD;&#xA;2. Change the derive, and make sure the type derives `Debug`." ContentLicense="CC BY-SA 4.0" />
  <row Id="17686" PostHistoryTypeId="2" PostId="4734" RevisionGUID="4ae5233d-7f53-4964-b27f-5168a36c545f" CreationDate="2022-09-09T08:22:24.733" UserId="165" Text=" - **Scenario 1** - feature not enabled&#xD;&#xA;&#xD;&#xA;Not only the pallet has to be decorated within the `contruct_runtime!` macro, like so&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;template&quot;)]&#xD;&#xA;TemplateModule: pallet_template::{Event},&#xD;&#xA;```&#xD;&#xA;But also its Config trait implementation for the runtime&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;template&quot;)]&#xD;&#xA;impl pallet_template::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;as when adding `#[cfg(feature = &quot;template&quot;)]` on `TemplateModule`, it basically removes the pallet from the runtime if the &quot;template&quot; feature flag is not present. So, the compilation errors make total sense as the pallet is not part of the runtime.&#xD;&#xA;&#xD;&#xA; - **Scenario 2**&#xD;&#xA;&#xD;&#xA;So far, this scenario looks like is caused by a possible bug.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17688" PostHistoryTypeId="2" PostId="4735" RevisionGUID="be564fa8-49b5-4fec-8c08-13a9352c85df" CreationDate="2022-09-09T08:25:34.733" UserId="251" Text="&gt; https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;	#[pallet::constant]&#xD;&#xA;	type Foo: Get&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[pallet::extra_constants]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	pub fn bar() -&gt; u32 {&#xD;&#xA;		0&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, the `constant` can only be defined in the `Config` trait.&#xD;&#xA;You must define a type first and then mark it as constant.&#xD;&#xA;&#xD;&#xA;`extra_constants` can be defined without that limitation. But this constants can not be configured in runtime.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// runtime.rs&#xD;&#xA;// You can not configure the `extra_constants` here.&#xD;&#xA;impl pallet_a::Config for Runtime {&#xD;&#xA;	type Foo = ConstU32&lt;10&gt;;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17690" PostHistoryTypeId="5" PostId="4735" RevisionGUID="e46dfdb2-0c96-4521-9557-1769470619ee" CreationDate="2022-09-09T08:37:24.550" UserId="251" Comment="added 24 characters in body" Text="&gt; https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// pallet_a.rs&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;	#[pallet::constant]&#xD;&#xA;	type Foo: Get&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[pallet::extra_constants]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	pub fn bar() -&gt; u32 {&#xD;&#xA;		0&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, the `constant` can only be defined in the `Config` trait.&#xD;&#xA;You must define a type first and then mark it as constant.&#xD;&#xA;&#xD;&#xA;`extra_constants` can be defined without that limitation. But this constants can not be configured in runtime.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// runtime.rs&#xD;&#xA;// You can not configure the `extra_constants` here.&#xD;&#xA;impl pallet_a::Config for Runtime {&#xD;&#xA;	type Foo = ConstU32&lt;10&gt;;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17691" PostHistoryTypeId="4" PostId="4732" RevisionGUID="379ddfc9-180c-473a-b640-23f89e6733e3" CreationDate="2022-09-09T08:38:45.593" UserId="251" Comment="edited title" Text="How's the `pallet::extra_constants` different from `pallet::constant`. How to choose?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17692" PostHistoryTypeId="5" PostId="4732" RevisionGUID="379ddfc9-180c-473a-b640-23f89e6733e3" CreationDate="2022-09-09T08:38:45.593" UserId="251" Comment="edited title" Text="I'm trying to understand the `#[pallet::extra_constants]` and how it's different from `#[pallet::constant]`.&#xD;&#xA;&#xD;&#xA;And appropriate scenario for the same.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17693" PostHistoryTypeId="2" PostId="4736" RevisionGUID="aa947869-b5ba-4700-bb54-b92947442dd0" CreationDate="2022-09-09T09:05:17.950" UserId="167" Text="One easy way to do this without needing to change the pallet code too much, as you said, is using signed extensions. Here's one that does a similar thing: &#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/12129/files#diff-103bae13a15813f338cb0bb67e77f3687c2c811fe75b2defd1cdc3d2afd6aa17R487&#xD;&#xA;&#xD;&#xA;As for custom origin, you can also do that, but it would require some changes to the pallet code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// in `trait Config`&#xD;&#xA;type CustomSignedOrigin: EnsureOrigin&lt;Self::AccountId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then, in all of the calls that you want to be restricted: &#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;// remove this&#xD;&#xA;let who = ensure_signed(origin)?;&#xD;&#xA;// add this: &#xD;&#xA;let who = T::CustomSignedOrigin::ensure_origin(origin)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally, in the top level runtime, you want an implementation of `EnsureOrigin` that acts similar to `EnsureSigned` but filters out certain accounts.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The main advantage of the second approach is that the overhead will only be felt if the transaction is related to `pallet-democracy`, whereas in the former approach, the signed extension is checked against all transaction. Although, if you implement it correctly, the first thing that you will do in the signed extension is to check if the transaction's call is from democracy, and if not, you early exist. In my opinion, this is a very negligible overhead. " ContentLicense="CC BY-SA 4.0" />
  <row Id="17695" PostHistoryTypeId="2" PostId="4737" RevisionGUID="e56e5fa3-31d0-487a-9701-867e17bc6e59" CreationDate="2022-09-09T09:08:15.253" UserId="2977" Text="### Aim&#xD;&#xA;&#xD;&#xA;I would like to use the `asMultiThrshold1` extrinsic in the Extrinsic Tab to produce a multi-sig call to authorise a balance transfer from the multi-sig account `ABC` (made by Alice, Bob and Charlie) to the account `Stash 2`.&#xD;&#xA;&#xD;&#xA;### What I tried&#xD;&#xA;&#xD;&#xA;I used Alice's account to dispatch the multi-sig call&#xD;&#xA;&#xD;&#xA;![enter image description here](https://i.stack.imgur.com/s0D2K.png)&#xD;&#xA;&#xD;&#xA;This resulted in the following error:&#xD;&#xA;&#xD;&#xA;![enter image description here](https://i.stack.imgur.com/l5zqv.png)&#xD;&#xA;&#xD;&#xA;Such error can be viewed [here](https://westend.subscan.io/extrinsic/12533740-2). I have enough balance to do such operation, I do not understand why the UI is saying the opposite.&#xD;&#xA;&#xD;&#xA;### What is unclear to me&#xD;&#xA;&#xD;&#xA;As far as I understood the `asMultiThrshold1` option is used when only one approval is needed. To me it is unclear why I would need a multi-sig account with only one approval. Also, the UI does not let me to generate one as the minimum threshold I can choose is 2. " ContentLicense="CC BY-SA 4.0" />
  <row Id="17697" PostHistoryTypeId="1" PostId="4737" RevisionGUID="e56e5fa3-31d0-487a-9701-867e17bc6e59" CreationDate="2022-09-09T09:08:15.253" UserId="2977" Text="How to use `asMultiThrshold1` within the multisig pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="17698" PostHistoryTypeId="3" PostId="4737" RevisionGUID="e56e5fa3-31d0-487a-9701-867e17bc6e59" CreationDate="2022-09-09T09:08:15.253" UserId="2977" Text="|polkadot-js|westend|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17699" PostHistoryTypeId="66" PostId="4737" RevisionGUID="e56e5fa3-31d0-487a-9701-867e17bc6e59" CreationDate="2022-09-09T09:08:15.253" UserId="2977" />
  <row Id="17700" PostHistoryTypeId="2" PostId="4738" RevisionGUID="0699b377-0413-4498-86ae-45e1fc038cf4" CreationDate="2022-09-09T09:53:04.883" UserId="251" Text="You need to [reserve](https://github.com/paritytech/substrate/blob/master/frame/multisig/src/lib.rs#L681) some tokens while using multi-sig.&#xD;&#xA;&#xD;&#xA;Different configurations for different networks. &#xD;&#xA;&#xD;&#xA;I'm not sure how much Westend needed. But try transfer more token to your account." ContentLicense="CC BY-SA 4.0" />
  <row Id="17702" PostHistoryTypeId="2" PostId="4739" RevisionGUID="8363d777-c483-40b6-a52c-d328709206b9" CreationDate="2022-09-09T09:58:40.360" UserId="527" Text="I think the best option you have here is using a `SignExtension`. There, you can filter by `who` (checking a whitelisted list in storage), for those signed `call` that match with `pallet_democracy::Call::vote`, ..." ContentLicense="CC BY-SA 4.0" />
  <row Id="17704" PostHistoryTypeId="5" PostId="628" RevisionGUID="6b862c63-c4d6-43f1-8145-b57b9e017467" CreationDate="2022-09-09T10:48:28.537" UserId="94" Comment="added 116 characters in body" Text="You need to provide the SS58 prefix to the `create_from_mnemonic` function to make it generate a Kusama address as opposed to a generic Substrate address:  &#xD;&#xA;```python&#xD;&#xA;from substrateinterface import Keypair&#xD;&#xA;&#xD;&#xA;# 2 for Kusama.&#xD;&#xA;prefix = 2&#xD;&#xA;# If you want to use a random mnemonic:&#xD;&#xA;mnemonic = Keypair.generate_mnemonic()&#xD;&#xA;# ... or use a specific mnemonic:&#xD;&#xA;mnemonic = 'episode together nose spoon dose oil faculty zoo ankle evoke admit walnut'&#xD;&#xA;&#xD;&#xA;keypair = Keypair.create_from_mnemonic(mnemonic, ss58_format=prefix)&#xD;&#xA;# Prints JHXFqYWQFFr5RkHVzviRiKhY7tutyGcYQb6kUyoScSir862&#xD;&#xA;print(keypair.ss58_address)&#xD;&#xA;```&#xD;&#xA;Kusama has the prefix 2, you can see all of them in the [ss58-registry](https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17705" PostHistoryTypeId="50" PostId="4222" RevisionGUID="48566487-a9a0-4aee-b6ad-661b62e44678" CreationDate="2022-09-09T11:01:35.160" UserId="-1" />
  <row Id="17706" PostHistoryTypeId="2" PostId="4740" RevisionGUID="0f402f07-b80e-42b7-9726-9787c2b0ef25" CreationDate="2022-09-09T11:21:09.947" UserId="1789" Text="Make precompiles for all the EVM functions that need to be gasless. &#xD;&#xA;When Ethereum users call those precompile functions, they will see 0 ETH gas cost on their MetaMask. &#xD;&#xA;&#xD;&#xA;Also, Moombean has a lot of precompiles written already like ERC20, staking, etc...&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17708" PostHistoryTypeId="2" PostId="4741" RevisionGUID="0e206349-eece-4fb2-85a4-3f29b353f7d5" CreationDate="2022-09-09T11:22:56.220" UserId="1789" Text="For specifying which function from an Ethereum smart contract, use precompiles instead of a regular Ethereum contracts. &#xD;&#xA;&#xD;&#xA;See reference: https://substrate.stackexchange.com/questions/4716/how-to-make-gaslessevm-balance-transaction-in-frontier-evm-for-certain-ethereu/4740" ContentLicense="CC BY-SA 4.0" />
  <row Id="17710" PostHistoryTypeId="2" PostId="4742" RevisionGUID="b5b2c3de-c633-4a27-930a-ca2623f71ad4" CreationDate="2022-09-09T11:59:15.123" UserId="527" Text=" 1. Your understanding is correct, if `max_total` is reached for a particular Dispatch Class, no more transactions of that class will be attempted to be included in the block.&#xD;&#xA; 2. Substrate is flexible about how to fill the blocks and there are not limitations. However, a bad configuration might lead to building oversized blocks that might have a critical impact in your chain, or Operational transactions never being included and pushed out by high-priority/high-fees Normal transactions.&#xD;&#xA; 3. The weights configurations about how to fill a block can be found in [`BlockWeights`](https://github.com/paritytech/substrate/blob/master/frame/system/src/limits.rs#L196-L203) and [`WeightsPerClass`](https://github.com/paritytech/substrate/blob/master/frame/system/src/limits.rs#L96-L119). You can play with `max_total` and `reserved` attributes for each Dispatch Class to meet your chain's particular needs. A detailed explanation can be found [here](https://github.com/paritytech/substrate/blob/master/frame/system/src/limits.rs#L121-L194).&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="17712" PostHistoryTypeId="5" PostId="4734" RevisionGUID="059178ef-531a-4934-b7a1-c7e3d83b84f7" CreationDate="2022-09-09T13:42:29.833" UserId="165" Comment="added 105 characters in body" Text=" - **Scenario 1** - feature not enabled&#xD;&#xA;&#xD;&#xA;Not only the pallet has to be decorated within the `contruct_runtime!` macro, like so&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;template&quot;)]&#xD;&#xA;TemplateModule: pallet_template::{Event},&#xD;&#xA;```&#xD;&#xA;But also its Config trait implementation for the runtime&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;template&quot;)]&#xD;&#xA;impl pallet_template::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;as when adding `#[cfg(feature = &quot;template&quot;)]` on `TemplateModule`, it basically removes the pallet from the runtime if the &quot;template&quot; feature flag is not present. So, the compilation errors make total sense as the pallet is not part of the runtime.&#xD;&#xA;&#xD;&#xA; - **Scenario 2**&#xD;&#xA;&#xD;&#xA;So far, this scenario looks like is caused by a possible bug.&#xD;&#xA;&#xD;&#xA;EDIT: including comment with fix.&#xD;&#xA;&#xD;&#xA;&gt; Fix for scenario 2: github.com/paritytech/substrate/pull/12229&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17713" PostHistoryTypeId="2" PostId="4743" RevisionGUID="8686c720-6a8a-44b7-84d8-8f29591d359f" CreationDate="2022-09-09T13:58:57.263" UserId="2100" Text="I am implementing the `MaxEncodedLen` trait for my pallet. I have this struct in a separate crate. I use this struct as my `GenesisConfig`, which is why it derives `serde::Serialize` and `serde::Deserialize` :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(serde::Serialize, serde::Deserialize))]&#xD;&#xA;#[scale_info(skip_type_params(ProofSize))]&#xD;&#xA;#[codec(mel_bound())]&#xD;&#xA;pub struct InitialSync&lt;SyncCommitteeSize: Get&lt;u32&gt;, ProofSize: Get&lt;u32&gt;&gt; {&#xD;&#xA;	pub current_sync_committee_branch: BoundedVec&lt;H256, ProofSize&gt;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my pallet, I declared a constant for the vector bound:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;    #[pallet::constant]&#xD;&#xA;    type MaxProofBranchSize: Get&lt;u32&gt;;&#xD;&#xA;	&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I compile my pallet, the compiler complains that&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;^^^ the trait frame_support::Deserialize&lt;'_&gt;is not implemented for&lt;T as pallet::Config&gt;::MaxProofBranchSize&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It doesn't make sense to implement the Deserialize for my constant, since it's just a size bound.&#xD;&#xA;&#xD;&#xA;The same thing happened with `TypeInfo`, where the compiler said that the trait is not implemented for `MaxProofBranchSize`. Macro `#[scale_info(skip_type_params(ProofSize))]` fixed that error.&#xD;&#xA;&#xD;&#xA;I'm looking for something to tell the compiler to ignore my parameter `ProofSize` for traits `Deserialize` and `Serialize`." ContentLicense="CC BY-SA 4.0" />
  <row Id="17715" PostHistoryTypeId="1" PostId="4743" RevisionGUID="8686c720-6a8a-44b7-84d8-8f29591d359f" CreationDate="2022-09-09T13:58:57.263" UserId="2100" Text="The trait frame_support::Deserialize&lt;'_&gt; is not implemented for &lt;T as pallet::Config&gt;::MaxSomeSize" ContentLicense="CC BY-SA 4.0" />
  <row Id="17716" PostHistoryTypeId="3" PostId="4743" RevisionGUID="8686c720-6a8a-44b7-84d8-8f29591d359f" CreationDate="2022-09-09T13:58:57.263" UserId="2100" Text="|genesis|serialization|maxencodedlen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17717" PostHistoryTypeId="66" PostId="4743" RevisionGUID="8686c720-6a8a-44b7-84d8-8f29591d359f" CreationDate="2022-09-09T13:58:57.263" UserId="2100" />
  <row Id="17718" PostHistoryTypeId="4" PostId="4743" RevisionGUID="9278bc23-a0f6-4cc5-bac5-553147b1e54c" CreationDate="2022-09-09T14:02:44.220" UserId="2100" Comment="edited title" Text="The trait Deserialize is not implemented for a Get&lt;u32&gt; constant" ContentLicense="CC BY-SA 4.0" />
  <row Id="17719" PostHistoryTypeId="5" PostId="4743" RevisionGUID="b9967fcc-cb3c-450b-b2e6-63b628fd6f91" CreationDate="2022-09-09T14:04:40.793" UserId="2100" Comment="added 164 characters in body" Text="I am implementing the `MaxEncodedLen` trait for my pallet. I have this struct in a separate crate. I use this struct as my `GenesisConfig`, which is why it derives `serde::Serialize` and `serde::Deserialize` :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(serde::Serialize, serde::Deserialize))]&#xD;&#xA;#[scale_info(skip_type_params(ProofSize))]&#xD;&#xA;#[codec(mel_bound())]&#xD;&#xA;pub struct InitialSync&lt;SyncCommitteeSize: Get&lt;u32&gt;, ProofSize: Get&lt;u32&gt;&gt; {&#xD;&#xA;	pub current_sync_committee_branch: BoundedVec&lt;H256, ProofSize&gt;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my pallet, I declared a constant for the vector bound:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;    #[pallet::constant]&#xD;&#xA;    type MaxProofBranchSize: Get&lt;u32&gt;;&#xD;&#xA;	&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is my GenesisConfig:&#xD;&#xA;```&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;	pub initial_sync: InitialSync&lt;T::MaxProofBranchSize&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I compile my pallet, the compiler complains that&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;^^^ the trait frame_support::Deserialize&lt;'_&gt;is not implemented for&lt;T as pallet::Config&gt;::MaxProofBranchSize&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It doesn't make sense to implement the Deserialize for my constant, since it's just a size bound.&#xD;&#xA;&#xD;&#xA;The same thing happened with `TypeInfo`, where the compiler said that the trait is not implemented for `MaxProofBranchSize`. Macro `#[scale_info(skip_type_params(ProofSize))]` fixed that error.&#xD;&#xA;&#xD;&#xA;I'm looking for something to tell the compiler to ignore my parameter `ProofSize` for traits `Deserialize` and `Serialize`." ContentLicense="CC BY-SA 4.0" />
  <row Id="17720" PostHistoryTypeId="10" PostId="4691" RevisionGUID="0d0febf1-9d61-4ee4-957f-d561baecff5d" CreationDate="2022-09-09T14:11:38.850" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[1812],&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="17722" PostHistoryTypeId="2" PostId="4744" RevisionGUID="17ba1c2e-771b-44a3-ac46-695a3ccc6fe7" CreationDate="2022-09-09T17:26:40.107" UserId="29" Text="I see this code used in the Substrate runtime:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub enum ProxyType {&#xD;&#xA;	Any,&#xD;&#xA;	NonTransfer,&#xD;&#xA;	Governance,&#xD;&#xA;	Staking,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl InstanceFilter&lt;Call&gt; for ProxyType {&#xD;&#xA;	fn filter(&amp;self, c: &amp;Call) -&gt; bool {&#xD;&#xA;		match self {&#xD;&#xA;			ProxyType::Any =&gt; true,&#xD;&#xA;			ProxyType::NonTransfer =&gt; !matches!(&#xD;&#xA;				c,&#xD;&#xA;				Call::Balances(..) |&#xD;&#xA;					Call::Assets(..) | Call::Uniques(..) |&#xD;&#xA;					Call::Vesting(pallet_vesting::Call::vested_transfer { .. }) |&#xD;&#xA;					Call::Indices(pallet_indices::Call::transfer { .. })&#xD;&#xA;			),&#xD;&#xA;			ProxyType::Governance =&gt; matches!(&#xD;&#xA;				c,&#xD;&#xA;				Call::Democracy(..) |&#xD;&#xA;					Call::Council(..) | Call::Society(..) |&#xD;&#xA;					Call::TechnicalCommittee(..) |&#xD;&#xA;					Call::Elections(..) | Call::Treasury(..)&#xD;&#xA;			),&#xD;&#xA;			ProxyType::Staking =&gt; matches!(c, Call::Staking(..)),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;	fn is_superset(&amp;self, o: &amp;Self) -&gt; bool {&#xD;&#xA;		match (self, o) {&#xD;&#xA;			(x, y) if x == y =&gt; true,&#xD;&#xA;			(ProxyType::Any, _) =&gt; true,&#xD;&#xA;			(_, ProxyType::Any) =&gt; false,&#xD;&#xA;			(ProxyType::NonTransfer, _) =&gt; true,&#xD;&#xA;			_ =&gt; false,&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/5a48536a49859f83dbbbab1285311f14c192e7b1/bin/node/runtime/src/lib.rs#L278-L319&#xD;&#xA;&#xD;&#xA;How does this work and when should I create one?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17724" PostHistoryTypeId="1" PostId="4744" RevisionGUID="17ba1c2e-771b-44a3-ac46-695a3ccc6fe7" CreationDate="2022-09-09T17:26:40.107" UserId="29" Text="What are Call Filters?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17725" PostHistoryTypeId="3" PostId="4744" RevisionGUID="17ba1c2e-771b-44a3-ac46-695a3ccc6fe7" CreationDate="2022-09-09T17:26:40.107" UserId="29" Text="|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17726" PostHistoryTypeId="2" PostId="4745" RevisionGUID="be1b547f-1621-4a6d-bfbe-24eca0c97d35" CreationDate="2022-09-09T20:14:41.083" UserId="276" Text="Another angle, I think it's difference in terminology here. What you probably mean by coming from Ethereum is that pending transactions are transactions that are not yet 'finalized\` in Substrate.&#xD;&#xA;&#xD;&#xA;Finalized means it can never ever change. In a POW chain you work with confirmations, which gives you some kind certainty, in Substrate you have finality and give you absolute certainty.&#xD;&#xA;&#xD;&#xA;This is different than the 'pending extrinsics' in Substrate, which means extrinsics in the tx pool, not yet including in a block.&#xD;&#xA;&#xD;&#xA;What you probably want to know is which extrinsics are not yet finalized. So you just retrieve the finalized block\_number:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;result = substrate.get_block_header(finalized_only=True)&#xD;&#xA;finalized_block_number = result['header']['number']&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And any extrinsic in block height higher than that is a pending (unfinalized) extrinsic." ContentLicense="CC BY-SA 4.0" />
  <row Id="17728" PostHistoryTypeId="2" PostId="4746" RevisionGUID="b51606a8-5c93-49fa-a3a9-bbf93883410a" CreationDate="2022-09-09T21:06:02.647" UserId="170" Text="The first error you get is because the function `id_exists` is not described in an implementation of a struct, therefore no `Self` is found.&#xD;&#xA;&#xD;&#xA;The second error means that there is no function `_mint_to` in `PSP34Wrapper`. `PSP34Wrapper` is a way how to do a cross-contract call in OB, but you can only do calls to public functions of a contract, _mint_to is a private function in `PSP34`. You can add the mint functionality to your contract with the `PSP34Mintable` extension (but since you only want to call this function from the contract you don't need that, you just need to specify that `T` is `PSP34`).&#xD;&#xA;&#xD;&#xA;The third error means you are providing a wrong argument to the `PSP34Wrapper`. The first argument to a wrapper call in OB is the reference to the account id we want to make the call to.&#xD;&#xA;&#xD;&#xA;So I guess you want to do something like this:&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;impl &lt;T: PSP34&gt; Buy for T {&#xD;&#xA;&#xD;&#xA;    default fn _emit_nft_bought(&amp;mut self, _owner: AccountId, _id: Vec&lt;u8&gt;){}&#xD;&#xA;&#xD;&#xA;    default fn buy(&#xD;&#xA;        &amp;mut self,&#xD;&#xA;        to: AccountId,&#xD;&#xA;        id: Vec&lt;u8&gt;&#xD;&#xA;    ) -&gt; Result&lt;(), BuyError&gt; {&#xD;&#xA;        if self.id_exists() {&#xD;&#xA;            self._mint_to(to, Id::Bytes(id.clone()))?;&#xD;&#xA;            self._emit_nft_bought(to, id);&#xD;&#xA;            Ok(())&#xD;&#xA;        } else {&#xD;&#xA;            return Err(BuyError::NoBalance)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /// this function just serves as an example&#xD;&#xA;    default fn id_exists (&amp;self, account: AccountId) -&gt; bool{&#xD;&#xA;        if self.balance_of(Self::env().caller()) &gt; 0 {&#xD;&#xA;            true&#xD;&#xA;        } else {&#xD;&#xA;            false&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I haven't tried to compile it, so it may not, but it could serve as a good jump-off point for you hopefully :D&#xD;&#xA;&#xD;&#xA;So what we did there is that we specify that T also implements PSP34, and now we can call PSP34 functions on self. You don't need cross-contract calls (correct me if I'm wrong). Anyway, if you want for example to mint another nft, you would add the mintable extension to the nft and in your contract create a wrapper&#xD;&#xA;&#xD;&#xA;`pub type Wrapper = dyn PSP34Mintable`&#xD;&#xA;&#xD;&#xA;by which you can then call the public functions from `PSP34Mintable` for example like this&#xD;&#xA;&#xD;&#xA;`Wrapper::mint(&amp;account_id_of_nft, to, id)`&#xD;&#xA;&#xD;&#xA;which would call the mint function of the specified contract (if there is such function). The mint extension is [here][1] if you would be interested.&#xD;&#xA;&#xD;&#xA;Hope I helped at least a little :D&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Supercolony-net/openbrush-contracts/blob/main/contracts/src/token/psp34/extensions/mintable.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="17730" PostHistoryTypeId="2" PostId="4747" RevisionGUID="a2aef5d1-461f-42aa-9990-eae5ae22207d" CreationDate="2022-09-09T21:10:44.270" UserId="3108" Text="I am building simple SDK for Polkadot Api calls. I am running into following issue trying to build it:&#xD;&#xA;&#xD;&#xA;    error TS2742: The inferred type of 'closeChannel' cannot be named without a reference to '.pnpm/@polkadot+types@8.14.1/node_modules/@polkadot/types/types'. This is likely not portable. A type annotation is necessary.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Code that I get error on is API function to close HRMP channels for specific node:&#xD;&#xA;&#xD;&#xA;    import type { ApiPromise } from '@polkadot/api'&#xD;&#xA;    &#xD;&#xA;    export function closeChannel(api: ApiPromise, origin: number, inbound: number, outbound: number) {&#xD;&#xA;        return api.tx.hrmp.forceCleanHrmp(origin,inbound,outbound)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;What am I doing wrong? I see no errors before compilation. Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="17732" PostHistoryTypeId="1" PostId="4747" RevisionGUID="a2aef5d1-461f-42aa-9990-eae5ae22207d" CreationDate="2022-09-09T21:10:44.270" UserId="3108" Text="error TS2742: The inferred type of X cannot be named without a reference to" ContentLicense="CC BY-SA 4.0" />
  <row Id="17733" PostHistoryTypeId="3" PostId="4747" RevisionGUID="a2aef5d1-461f-42aa-9990-eae5ae22207d" CreationDate="2022-09-09T21:10:44.270" UserId="3108" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17734" PostHistoryTypeId="2" PostId="4748" RevisionGUID="51716ca6-a5f9-4fec-adf9-57ff01e6fee2" CreationDate="2022-09-09T21:16:19.363" UserId="2706" Text="I'm in a situation where a user can mint new NFTs of a certain type B only if they are owner of NFT of type A. B NFT checks if caller has A NFT in a mint function. To instantiate a B contract I would need to pass A NFT address in the constructor. &#xD;&#xA;&#xD;&#xA;The question is how do I get a hash of freshly created contract in test environment&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        fn minting_works() {&#xD;&#xA;            let accounts = default_accounts();&#xD;&#xA;&#xD;&#xA;            let mut a_contract= AContract::new();&#xD;&#xA;            set_sender(accounts.alice);&#xD;&#xA;&#xD;&#xA;            a_contract.mint(cid.clone()); // Mint A NFT to a user&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;            let mut b_contract= BContract::new(contract_hash);&#xD;&#xA;            b_contract.mint(cid.clone()); // Mint B NFT to a user&#xD;&#xA;        }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17736" PostHistoryTypeId="1" PostId="4748" RevisionGUID="51716ca6-a5f9-4fec-adf9-57ff01e6fee2" CreationDate="2022-09-09T21:16:19.363" UserId="2706" Text="Testing cross-contract calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="17737" PostHistoryTypeId="3" PostId="4748" RevisionGUID="51716ca6-a5f9-4fec-adf9-57ff01e6fee2" CreationDate="2022-09-09T21:16:19.363" UserId="2706" Text="|testing|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17738" PostHistoryTypeId="2" PostId="4749" RevisionGUID="e66d3cb4-0501-49e1-9d33-b47033a6133b" CreationDate="2022-09-09T21:44:18.447" UserId="590" Text="My understanding is that the Transaction-Payment Pallet prioritizes transactions based on tip, weight and length of the transaction. `ChargeTransactionPayment::get_priority` uses this data to give priority to a transaction.&#xD;&#xA;&#xD;&#xA;**Question**:&#xD;&#xA;&#xD;&#xA;If I want to change the priority of certain transactions.&#xD;&#xA; 1. Do I need to make the modification in the Transaction-Payment-Pallet?&#xD;&#xA; 2. Create another SignedExtension?&#xD;&#xA;&#xD;&#xA;If I can create another Signed Extension, does the order matter of where in the SignedExtra it goes? For example, do I need to place this SignedExtension after  Transaction-Payment-Pallet SignedExtension to prevent an overwrite from Transaction-Payment-Pallet?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17740" PostHistoryTypeId="1" PostId="4749" RevisionGUID="e66d3cb4-0501-49e1-9d33-b47033a6133b" CreationDate="2022-09-09T21:44:18.447" UserId="590" Text="Transaction Prioritization" ContentLicense="CC BY-SA 4.0" />
  <row Id="17741" PostHistoryTypeId="3" PostId="4749" RevisionGUID="e66d3cb4-0501-49e1-9d33-b47033a6133b" CreationDate="2022-09-09T21:44:18.447" UserId="590" Text="|signed-extensions|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17742" PostHistoryTypeId="5" PostId="4749" RevisionGUID="b4e29eba-b596-4528-997f-b678ab2ce98a" CreationDate="2022-09-09T21:49:39.800" UserId="590" Comment="deleted 5 characters in body" Text="My understanding is that the Transaction-Payment Pallet prioritizes transactions based on tip, weight and length of the transaction. `ChargeTransactionPayment::get_priority` uses this data to give priority to a transaction.&#xD;&#xA;&#xD;&#xA;**Question**:&#xD;&#xA;&#xD;&#xA;If I want to change the priority of certain transactions.&#xD;&#xA; 1. Do I need to make the modification in the Transaction-Payment-Pallet?&#xD;&#xA; 2. Create another SignedExtension?&#xD;&#xA;&#xD;&#xA;If I can create another Signed Extension, does it matter what order inside `SignedExtra` is in? For example, do I need to place this SignedExtension after  Transaction-Payment-Pallet SignedExtension to prevent an overwrite from Transaction-Payment-Pallet?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17744" PostHistoryTypeId="2" PostId="4750" RevisionGUID="dbad3418-2b49-45dc-abfa-7262d286dc3d" CreationDate="2022-09-10T03:40:06.477" UserId="407" Text="When i run my substrate based node, i get `Error: Service(Client(VersionInvalid(&quot;host doesn't provide any imports from non-env module: __wbindgen_placeholder__:__wbindgen_describe&quot;)))`." ContentLicense="CC BY-SA 4.0" />
  <row Id="17746" PostHistoryTypeId="1" PostId="4750" RevisionGUID="dbad3418-2b49-45dc-abfa-7262d286dc3d" CreationDate="2022-09-10T03:40:06.477" UserId="407" Text="Substrate Node compiles, but does not run" ContentLicense="CC BY-SA 4.0" />
  <row Id="17747" PostHistoryTypeId="3" PostId="4750" RevisionGUID="dbad3418-2b49-45dc-abfa-7262d286dc3d" CreationDate="2022-09-10T03:40:06.477" UserId="407" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17748" PostHistoryTypeId="2" PostId="4751" RevisionGUID="f5f1844b-c307-4afd-9bf7-b736a070c041" CreationDate="2022-09-10T04:38:30.083" UserId="283" Text="The default Substrate transaction queue uses the [`TaggedTransactionQueue`](https://crates.parity.io/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html) Runtime API to query the runtime about the validity and priority of queued transactions. &#xD;&#xA;&#xD;&#xA;Under the hood, this is usually implemented in the runtime as &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	impl tx_pool_api::runtime_api::TaggedTransactionQueue&lt;Block&gt; for Runtime {&#xD;&#xA;		fn validate_transaction(&#xD;&#xA;			source: TransactionSource,&#xD;&#xA;			tx: &lt;Block as BlockT&gt;::Extrinsic,&#xD;&#xA;			block_hash: &lt;Block as BlockT&gt;::Hash,&#xD;&#xA;		) -&gt; TransactionValidity {&#xD;&#xA;			Executive::validate_transaction(source, tx, block_hash)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The (`TransactionValidity`)[https://crates.parity.io/sp_runtime/transaction_validity/type.TransactionValidity.html] is a `Result&lt;ValidTransaction, _&gt;, where a `ValidTransaction` has a field&#xD;&#xA;&#xD;&#xA;`priority: TransactionPriority // = u64`&#xD;&#xA;&#xD;&#xA;Under the hood, `Executive::validate_transaction` uses the [`CheckedExtrinsic::validate`](https://crates.parity.io/sp_runtime/generic/struct.CheckedExtrinsic.html#method.validate) function. &#xD;&#xA;&#xD;&#xA;In order to plug into this part of Substrate, you should create an alternative `UncheckedExtrinsic` type for your runtime, where the `Check`ed variant implements your custom logic to give different priorities to different extrinsics.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17750" PostHistoryTypeId="2" PostId="4752" RevisionGUID="23729c81-4dd1-4dc7-acef-6e1429005e21" CreationDate="2022-09-10T04:44:20.467" UserId="283" Text="Call filters are used to determine which types of calls are allowed to be made by a particular Origin. In the example you've given, they're being used in the definition of different kinds of proxy accounts to determine which types of calls they're allowed to make on behalf of another account. Proxies and governance are main use-cases of this, but there are others.&#xD;&#xA;&#xD;&#xA;A pallet author can use `InstanceFilter` (which is stateful) or the `Contains` trait (which is not) to limit the types of calls which can be made.&#xD;&#xA;&#xD;&#xA;Oftentimes, chains early in their launch cycle will limit the type of transactions that accounts can make. For instance, when Polkadot was initially launched, a call filter was used prior to the transition to permissionless PoS to prevent balances from being transferred. After the transition to PoS, the call filter was removed by a governance proposal." ContentLicense="CC BY-SA 4.0" />
  <row Id="17752" PostHistoryTypeId="2" PostId="4753" RevisionGUID="33aadf90-374c-4981-b2a0-25c2317601d1" CreationDate="2022-09-10T04:50:30.560" UserId="283" Text="The total weight of the block comes from the sum of:&#xD;&#xA;  1. work done in `on_initialize`, which is done _before_ extrinsics&#xD;&#xA;  2. work done in extrinsics&#xD;&#xA;  3. work done in `on_finalize`, which is done _after_ extrinsics&#xD;&#xA;&#xD;&#xA;Doing heavy work in `on_finalize` is discouraged, because the block may already be filled with extrinsics. In fact, the `on_initialize` function of pallets is supposed to estimate the weight of both `on_initialize` and `on_finalize` in order to prevent the block from being filled with too many extrinsics." ContentLicense="CC BY-SA 4.0" />
  <row Id="17754" PostHistoryTypeId="2" PostId="4754" RevisionGUID="0a2ee623-ef63-4f22-84ff-3f75a27bee05" CreationDate="2022-09-10T07:57:28.160" UserId="139" Text="The docs say that `StaticLookup` does not require &quot;context&quot; whereas `Lookup` does. What does this mean? Is there an example or a pallet where we can look at both `Lookup` and `StaticLookup` implementations to see how they differ? &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Means of changing one type into another in a manner dependent on the source type.&#xD;&#xA;pub trait Lookup {&#xD;&#xA;	/// Type to lookup from.&#xD;&#xA;	type Source;&#xD;&#xA;	/// Type to lookup into.&#xD;&#xA;	type Target;&#xD;&#xA;	/// Attempt a lookup.&#xD;&#xA;	fn lookup(&amp;self, s: Self::Source) -&gt; Result&lt;Self::Target, LookupError&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Means of changing one type into another in a manner dependent on the source type.&#xD;&#xA;/// This variant is different to `Lookup` in that it doesn't (can cannot) require any&#xD;&#xA;/// context.&#xD;&#xA;pub trait StaticLookup {&#xD;&#xA;	/// Type to lookup from.&#xD;&#xA;	type Source: Codec + Clone + PartialEq + Debug + TypeInfo;&#xD;&#xA;	/// Type to lookup into.&#xD;&#xA;	type Target;&#xD;&#xA;	/// Attempt a lookup.&#xD;&#xA;	fn lookup(s: Self::Source) -&gt; Result&lt;Self::Target, LookupError&gt;;&#xD;&#xA;	/// Convert from Target back to Source.&#xD;&#xA;	fn unlookup(t: Self::Target) -&gt; Self::Source;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17756" PostHistoryTypeId="1" PostId="4754" RevisionGUID="0a2ee623-ef63-4f22-84ff-3f75a27bee05" CreationDate="2022-09-10T07:57:28.160" UserId="139" Text="What is the difference between `Lookup` and `StaticLookup`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17757" PostHistoryTypeId="3" PostId="4754" RevisionGUID="0a2ee623-ef63-4f22-84ff-3f75a27bee05" CreationDate="2022-09-10T07:57:28.160" UserId="139" Text="|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17763" PostHistoryTypeId="2" PostId="4756" RevisionGUID="55821add-4acc-4af0-a97b-3051925e798f" CreationDate="2022-09-10T09:03:23.250" UserId="390" Text="&#xD;&#xA;I am getting this error below from nginx &#xD;&#xA;&#xD;&#xA;``` [error] 32#32: *4 upstream prematurely closed connection while reading response header from upstream, client: 172.21.0.1, server: , request: &quot;GET / HTTP/1.1&quot;, upstream: &quot;http://172.21.0.2:8844/&quot;, host: &quot;localhost&quot; ```&#xD;&#xA;&#xD;&#xA;I have tried using the exact nginx config below as documented in wiki.polkadot.network/docs/maintain-wss#set-up-nginx-server&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;server {&#xD;&#xA;        listen 80 default_server;&#xD;&#xA;&#xD;&#xA;        root /var/www/html;&#xD;&#xA;        index index.html;&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        location / {&#xD;&#xA;          proxy_buffering off;&#xD;&#xA;          proxy_pass http://hero:9944;&#xD;&#xA;          proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;          proxy_set_header Host $host;&#xD;&#xA;          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;&#xD;&#xA;          proxy_http_version 1.1;&#xD;&#xA;          proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;          proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        listen [::]:443 ssl default_server ipv6only=on;&#xD;&#xA;        listen 443 ssl default_server;&#xD;&#xA;        ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;&#xD;&#xA;        ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;&#xD;&#xA;&#xD;&#xA;        ssl_session_cache shared:cache_nginx_SSL:1m;&#xD;&#xA;        ssl_session_timeout 1440m;&#xD;&#xA;&#xD;&#xA;        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;&#xD;&#xA;        ssl_prefer_server_ciphers on;&#xD;&#xA;&#xD;&#xA;        ssl_ciphers &quot;ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS&quot;;&#xD;&#xA;&#xD;&#xA;        ssl_dhparam /etc/ssl/certs/dhparam.pem;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The issue is definitely not DNS as using an incorrect DNS name will cause nginx to error on start up. &#xD;&#xA;&#xD;&#xA;## Keypoints&#xD;&#xA;- 502 error occurs locally in a docker-compose environment but the WS &amp; WSS connection still works on PolkadotJS&#xD;&#xA;- 502 return code in a cloud environment fails because the health check on the LB is expecting a 200 HTTP code hence marks the Nginx proxy as unhealthy and doesnt route the traffic through&#xD;&#xA;&#xD;&#xA;Please advice on what I could do to prevent this nginx error, I have tried every possible solution online. Ideally I would like a 200 HTTP return code when connecting to the Websocket&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17765" PostHistoryTypeId="1" PostId="4756" RevisionGUID="55821add-4acc-4af0-a97b-3051925e798f" CreationDate="2022-09-10T09:03:23.250" UserId="390" Text="Nginx Websocket Proxy Error - 502 Bad Gateway" ContentLicense="CC BY-SA 4.0" />
  <row Id="17766" PostHistoryTypeId="3" PostId="4756" RevisionGUID="55821add-4acc-4af0-a97b-3051925e798f" CreationDate="2022-09-10T09:03:23.250" UserId="390" Text="|substrate-node|private-network|websocket|wss|nginx|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17767" PostHistoryTypeId="5" PostId="4756" RevisionGUID="818adb03-b541-4024-baa2-962f5608c64b" CreationDate="2022-09-10T09:03:59.560" UserId="390" Comment="edited body" Text="&#xD;&#xA;I am getting this error below from nginx &#xD;&#xA;&#xD;&#xA;``` [error] 32#32: *4 upstream prematurely closed connection while reading response header from upstream, client: 172.21.0.1, server: , request: &quot;GET / HTTP/1.1&quot;, upstream: &quot;http://172.21.0.2:8844/&quot;, host: &quot;localhost&quot; ```&#xD;&#xA;&#xD;&#xA;I have tried using the exact nginx config below as documented in wiki.polkadot.network/docs/maintain-wss#set-up-nginx-server&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;server {&#xD;&#xA;        listen 80 default_server;&#xD;&#xA;&#xD;&#xA;        root /var/www/html;&#xD;&#xA;        index index.html;&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        location / {&#xD;&#xA;          proxy_buffering off;&#xD;&#xA;          proxy_pass http://hero:8844;&#xD;&#xA;          proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;          proxy_set_header Host $host;&#xD;&#xA;          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;&#xD;&#xA;          proxy_http_version 1.1;&#xD;&#xA;          proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;          proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        listen [::]:443 ssl default_server ipv6only=on;&#xD;&#xA;        listen 443 ssl default_server;&#xD;&#xA;        ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;&#xD;&#xA;        ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;&#xD;&#xA;&#xD;&#xA;        ssl_session_cache shared:cache_nginx_SSL:1m;&#xD;&#xA;        ssl_session_timeout 1440m;&#xD;&#xA;&#xD;&#xA;        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;&#xD;&#xA;        ssl_prefer_server_ciphers on;&#xD;&#xA;&#xD;&#xA;        ssl_ciphers &quot;ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS&quot;;&#xD;&#xA;&#xD;&#xA;        ssl_dhparam /etc/ssl/certs/dhparam.pem;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The issue is definitely not DNS as using an incorrect DNS name will cause nginx to error on start up. &#xD;&#xA;&#xD;&#xA;## Keypoints&#xD;&#xA;- 502 error occurs locally in a docker-compose environment but the WS &amp; WSS connection still works on PolkadotJS&#xD;&#xA;- 502 return code in a cloud environment fails because the health check on the LB is expecting a 200 HTTP code hence marks the Nginx proxy as unhealthy and doesnt route the traffic through&#xD;&#xA;&#xD;&#xA;Please advice on what I could do to prevent this nginx error, I have tried every possible solution online. Ideally I would like a 200 HTTP return code when connecting to the Websocket&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17768" PostHistoryTypeId="2" PostId="4757" RevisionGUID="feaea5f4-f352-4310-a836-43ae159be9e4" CreationDate="2022-09-10T10:40:22.957" UserId="251" Text="IIUC, this only difference is about the revert.&#xD;&#xA;&#xD;&#xA;`Lookup`:&#xD;&#xA;- `A -&gt; B` ✓&#xD;&#xA;- `B -&gt; A` &#xD;&#xA;&#xD;&#xA;`StaticLookup`:&#xD;&#xA;- `A -&gt; B` ✓&#xD;&#xA;- `B -&gt; A` ✓&#xD;&#xA;&#xD;&#xA;For example, you define an account id conversion algorithm.&#xD;&#xA;&#xD;&#xA;`AccountId32 -&gt; AccountId20`, truncate the first 20 bytes.&#xD;&#xA;&#xD;&#xA;This is not recoverable. You should use `Lookup` here." ContentLicense="CC BY-SA 4.0" />
  <row Id="17770" PostHistoryTypeId="2" PostId="4758" RevisionGUID="eb9d6eb3-bd72-4e98-9336-f27d18d528b6" CreationDate="2022-09-10T11:27:43.330" UserId="2484" Text="I am about to make the decision on how to store some hash value inside the blockchain. A hash value is the best practice to minimise the size of the blockchain, but still allows people to verify information. &#xD;&#xA;&#xD;&#xA;I used the following approach in the past:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;[u8; 16]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found, that in the `pallet_democracy` there is the following approach:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&lt;T as frame_system::Config&gt;::Hash&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What way of storing information on-chain is the best, and why? " ContentLicense="CC BY-SA 4.0" />
  <row Id="17772" PostHistoryTypeId="1" PostId="4758" RevisionGUID="eb9d6eb3-bd72-4e98-9336-f27d18d528b6" CreationDate="2022-09-10T11:27:43.330" UserId="2484" Text="What is the best practice for storing a hash?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17773" PostHistoryTypeId="3" PostId="4758" RevisionGUID="eb9d6eb3-bd72-4e98-9336-f27d18d528b6" CreationDate="2022-09-10T11:27:43.330" UserId="2484" Text="|storage|database|hash|data-type|blockchain-size|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17774" PostHistoryTypeId="2" PostId="4759" RevisionGUID="7eecd24a-83af-4ff7-a375-bc263f17e5d1" CreationDate="2022-09-10T12:21:45.200" UserId="2442" Text="In my pallet have created a custom new-type, in the same fashion as `AccountId32`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Clone, PartialEq, Eq, Ord, PartialOrd, Debug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct GenericId(BoundedVec&lt;u8, MaxGenericIdLenGet&gt;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The type can be converted `From&lt;GenericId&gt; for BoundedVec&lt;u8, MaxGenericIdLenGet&gt;` and `From&lt;BoundedVec&lt;u8, MaxGenericIdLenGet&gt;&gt; for GenericId`.&#xD;&#xA;I would expect it to show up in the [polkadot-js explorer][1] as `GenericId` (`AccountId32` indeed shows up), but it shows as `Bytes` instead.&#xD;&#xA;&#xD;&#xA;How do I make `GenericId` show up not as `Bytes`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/#/explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="17776" PostHistoryTypeId="1" PostId="4759" RevisionGUID="7eecd24a-83af-4ff7-a375-bc263f17e5d1" CreationDate="2022-09-10T12:21:45.200" UserId="2442" Text="Custom type is encoded as Bytes" ContentLicense="CC BY-SA 4.0" />
  <row Id="17777" PostHistoryTypeId="3" PostId="4759" RevisionGUID="7eecd24a-83af-4ff7-a375-bc263f17e5d1" CreationDate="2022-09-10T12:21:45.200" UserId="2442" Text="|rpc|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17778" PostHistoryTypeId="2" PostId="4760" RevisionGUID="6a641a12-4931-44b2-a35a-84f520eaa1b6" CreationDate="2022-09-10T18:13:13.570" UserId="2752" Text="I am implementing a project using the directory structure proposed by openbrush.&#xD;&#xA;The contract compiles without a problem, but when it comes to testing I run&#xD;&#xA;into the following error:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;error[E0599]&lt;/b&gt;&lt;/font&gt;&lt;b&gt;: no function or associated item named `new` found for trait object `dyn project_name::traits::traitName::TraitName` in the current scope&lt;/b&gt;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;--&amp;gt; &lt;/b&gt;&lt;/font&gt;tests/integrations_tests.rs:148:30&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;148&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;            let contract = TraitName::new(input1, input2, input3, input4);&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                             &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;^^^&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;function or associated item not found in `dyn project_name::traits::traitName::TraitName`&lt;/b&gt;&lt;/font&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Do I need to declare the constructor in the trait somewhere?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17780" PostHistoryTypeId="1" PostId="4760" RevisionGUID="6a641a12-4931-44b2-a35a-84f520eaa1b6" CreationDate="2022-09-10T18:13:13.570" UserId="2752" Text="Constructor not found when testing smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="17781" PostHistoryTypeId="3" PostId="4760" RevisionGUID="6a641a12-4931-44b2-a35a-84f520eaa1b6" CreationDate="2022-09-10T18:13:13.570" UserId="2752" Text="|ink|smart-contract|rust|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17782" PostHistoryTypeId="2" PostId="4761" RevisionGUID="0aa7e36c-c343-4011-8e04-2ff1ebb8fc23" CreationDate="2022-09-10T18:56:06.537" UserId="512" Text="We want to reuse the clients libp2p instance for receiving threshold signature shares directly from our users, for key resharing/rotation as validators join/leave the active validator set, broadcasting, and for other various multiparty computations. Tightly coupling this logic with the substrate client and using non-standard libp2p protocols seems the most appropriate way to do this.&#xD;&#xA;&#xD;&#xA;It seems the best way to do this might be via forking sc-networking. Since this is not fun to maintian, might it make sense to add a feature to provide additional protocols/handlers via the sc-networking config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17784" PostHistoryTypeId="1" PostId="4761" RevisionGUID="0aa7e36c-c343-4011-8e04-2ff1ebb8fc23" CreationDate="2022-09-10T18:56:06.537" UserId="512" Text="What is the best way to add additional libp2p protocols to Substrate client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17785" PostHistoryTypeId="3" PostId="4761" RevisionGUID="0aa7e36c-c343-4011-8e04-2ff1ebb8fc23" CreationDate="2022-09-10T18:56:06.537" UserId="512" Text="|networking|offchain|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17786" PostHistoryTypeId="2" PostId="4762" RevisionGUID="307db915-2447-428d-b6f7-a67a53da3141" CreationDate="2022-09-11T01:07:52.800" UserId="3114" Text="- I want to convert the address string received as a parameter to an ink! AccountId.&#xD;&#xA;- I have implemented the following source code using sp-runtime. When I implemented the following in pallet, it worked, but in ink!, the type of AccountId is different and I can't compile it.&#xD;&#xA;- Please tell me how to convert the string address to AccountId in &quot;ink!&quot;.&#xD;&#xA;```&#xD;&#xA;        #[inline]&#xD;&#xA;        fn convert_vec_to_accountid(&amp;self, account_vec: Vec&lt;u8&gt;)-&gt; AccountId{ &#xD;&#xA;          let mut array = [0; 32];&#xD;&#xA;          let bytes = &amp;account_vec[..array.len()]; &#xD;&#xA;          array.copy_from_slice(bytes);&#xD;&#xA;          let account32: AccountId32 = array.into();&#xD;&#xA;          let mut to32 = AccountId32::as_ref(&amp;account32);&#xD;&#xA;          let to_address : AccountId = AccountId::decode(&amp;mut to32).unwrap_or_default();&#xD;&#xA;          to_address&#xD;&#xA;        }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17788" PostHistoryTypeId="1" PostId="4762" RevisionGUID="307db915-2447-428d-b6f7-a67a53da3141" CreationDate="2022-09-11T01:07:52.800" UserId="3114" Text="How to convert Address string to AccountId in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="17789" PostHistoryTypeId="3" PostId="4762" RevisionGUID="307db915-2447-428d-b6f7-a67a53da3141" CreationDate="2022-09-11T01:07:52.800" UserId="3114" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17790" PostHistoryTypeId="2" PostId="4763" RevisionGUID="fa07a518-2a9b-4386-b605-8ebca5339d9c" CreationDate="2022-09-11T02:06:43.917" UserId="283" Text="`sc-network` allows for custom notification protocols and request/response protocols to be registered with the [`NetworkConfiguration`](https://crates.parity.io/sc_network/config/struct.NetworkConfiguration.html) when starting the service.&#xD;&#xA;&#xD;&#xA;The `extra_sets` define peer-sets for notifications protocols, and the `request_response_protocols` define request/response protocols which the nodes support.&#xD;&#xA;&#xD;&#xA;When configuring a request/response protocol, you pass a `Sender` which the `sc-network` logic will forward incoming requests through, which allows you to handle them.&#xD;&#xA;&#xD;&#xA;You can listen for notifications and peer events on a notifications protocol by invoking [`NetworkService::event_stream`](https://crates.parity.io/sc_network/struct.NetworkService.html#method.event_stream) and send notifications with `NetworkService::write_notification`, or use `NetworkService::notification_sender` to incorporate backpressure into your code." ContentLicense="CC BY-SA 4.0" />
  <row Id="17793" PostHistoryTypeId="2" PostId="4764" RevisionGUID="1e849355-f93a-476b-b59c-9e19c8280268" CreationDate="2022-09-11T09:11:37.067" UserId="139" Text="The default implementation is to use a `u32` as `AccountIndex`. This means that only 2^32 claims can be made. Besides reserving an integer, can we use `String` as `AccountIndex` thereby referencing an account with a name instead of a number?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17795" PostHistoryTypeId="1" PostId="4764" RevisionGUID="1e849355-f93a-476b-b59c-9e19c8280268" CreationDate="2022-09-11T09:11:37.067" UserId="139" Text="What are some other use cases for pallet indices?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17796" PostHistoryTypeId="3" PostId="4764" RevisionGUID="1e849355-f93a-476b-b59c-9e19c8280268" CreationDate="2022-09-11T09:11:37.067" UserId="139" Text="|untagged|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17797" PostHistoryTypeId="4" PostId="587" RevisionGUID="314ed224-1c91-4ddc-85a3-a5b06d6794e8" CreationDate="2022-09-11T10:03:09.647" UserId="85" Comment="ink specific question" Text="How to decode ink smart contract call and event data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17798" PostHistoryTypeId="6" PostId="587" RevisionGUID="314ed224-1c91-4ddc-85a3-a5b06d6794e8" CreationDate="2022-09-11T10:03:09.647" UserId="85" Comment="ink specific question" Text="|polkadot-js|ink|smart-contract|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17799" PostHistoryTypeId="2" PostId="4765" RevisionGUID="7521af16-2974-4a06-8e96-c01cb3541add" CreationDate="2022-09-11T11:00:47.750" UserId="73" Text="When you use `&lt;T as frame_system::Config&gt;::Hash` you will use the `Hash` as configured in your runtime. The advantage of this is that it will make your pallet generic over the hashing algorithm to use. If you only use `[u8; 16]` you need to have the hashing algorithm hard-coded to ensure that the hash is only 16 bytes. &#xD;&#xA;&#xD;&#xA;Depending on what you are trying to do, there is no downside of any of the solutions. Storage size will only depend on the length of the hash you are using. If you directly specify `[u8; 16]` or use a hash that is 16 bytes the storage usage will be exactly the same." ContentLicense="CC BY-SA 4.0" />
  <row Id="17801" PostHistoryTypeId="6" PostId="4748" RevisionGUID="d9b12ca7-5635-4940-993b-6acebcb1fe39" CreationDate="2022-09-11T14:55:28.323" UserId="34" Comment="Ink" Text="|ink|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17802" PostHistoryTypeId="5" PostId="4322" RevisionGUID="a4f1f092-b07d-467e-8c9d-78edb5896b4b" CreationDate="2022-09-12T03:36:02.480" UserId="1789" Comment="added 814 characters in body" Text="It turns out to be the problem of the deployer Hardhat!&#xD;&#xA;&#xD;&#xA;See this post: https://substrate.stackexchange.com/questions/4227/how-to-add-frontier-code-as-a-dependency-to-substrate-parachain-template-based-p/4295#4295&#xD;&#xA;&#xD;&#xA;All the upgradeable contracts and ERC777 could not be deployed because Hardhat was running too fast and that overwhelmed my parachain, hence &quot;ExhaustsResources&quot; error!&#xD;&#xA;&#xD;&#xA;Now I can deploy all my upgradeable contracts and ERC777(deploy ERC1820 first!) via Hardhat or Truffle. &#xD;&#xA;&#xD;&#xA;my hardhat.config.ts:&#xD;&#xA;```&#xD;&#xA;const config: HardhatUserConfig = {&#xD;&#xA;  defaultNetwork: &quot;hardhat&quot;,&#xD;&#xA;  networks: {&#xD;&#xA;    hero: {&#xD;&#xA;      url: `${PARACHAIN_EVM_ENDPOINT}`,&#xD;&#xA;      chainId: 1234,&#xD;&#xA;      //gasPrice: 0,&#xD;&#xA;      //gasPrice: ethers.utils.parseUnits(&quot;1&quot;, &quot;gwei&quot;).toNumber(),//causing Payment error&#xD;&#xA;      gas: 25e6,//7e6,&#xD;&#xA;      accounts: {&#xD;&#xA;        mnemonic: `${MNEMONIC}`,&#xD;&#xA;        path: &quot;m/44'/60'/0'/0&quot;,&#xD;&#xA;        initialIndex: 0,&#xD;&#xA;        count: 20,&#xD;&#xA;        passphrase: &quot;&quot;,&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;AND you must use `await` for all asynchronous operations!&#xD;&#xA;&#xD;&#xA;AND you must wait for block confirmation as shown below for Hardhat code:&#xD;&#xA;```&#xD;&#xA;token = await Token.deploy(tokenName, tokenSymbol);&#xD;&#xA;await token.deployTransaction.wait(blockConfirmation);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For Truffle, add this `confirmations` in your truffle-config.js:&#xD;&#xA;```&#xD;&#xA;    parachain: {&#xD;&#xA;      provider: () =&gt; new HDWalletProvider(MNEMONIC, `${PARA_CHAIN_URL}`),//PARA_CHAIN_URL=http://127.0.0.1:7272&#xD;&#xA;      network_id: 2045,&#xD;&#xA;      production: true, &#xD;&#xA;      confirmations: 2, //to wait for enough confirmation&#xD;&#xA;      skipDryRun: true, //true to skip simulations&#xD;&#xA;    },&#xD;&#xA;```&#xD;&#xA;This `confirmation` slows the deployment down so the parachain can have time to make deployment properly." ContentLicense="CC BY-SA 4.0" />
  <row Id="17803" PostHistoryTypeId="5" PostId="4295" RevisionGUID="7a99de69-f1a7-4b96-8dac-32f375a57d93" CreationDate="2022-09-12T03:40:22.257" UserId="1789" Comment="deleted 138 characters in body" Text="Part 1 of this question:&#xD;&#xA;https://substrate.stackexchange.com/questions/3796/how-to-make-a-parachain-project-that-uses-frontier-as-a-dependency&#xD;&#xA;&#xD;&#xA;Merge Fronter repo/template folder into your parachain... although I am stuck at node/service.rs but it seems it is okay to skip those...&#xD;&#xA;&#xD;&#xA;Regarding to ERC777 contracts, you have to &#xD;&#xA;- use deploy the ERC1820 first ... see https://ethereum.stackexchange.com/questions/17927/how-to-deploy-smart-contract-in-predefined-contract-address-in-private-ethereum/79316#79316&#xD;&#xA;&#xD;&#xA;- use deploy ERC777 second ... see&#xD;&#xA;https://forum.openzeppelin.com/t/simple-erc777-token-example/746&#xD;&#xA;&#xD;&#xA;Both Hardhat or Truffle can deploy upgradeable and ERC777 contracts...&#xD;&#xA;See `ExhaustsResources` error solution  https://substrate.stackexchange.com/questions/3882/deploy-solidity-ethereum-to-parachain-with-exhaustsresources-error/4322#4322&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17804" PostHistoryTypeId="5" PostId="4322" RevisionGUID="59b0552e-9a5c-47e6-8495-956a62cabec0" CreationDate="2022-09-12T03:41:40.187" UserId="1789" Comment="added 5 characters in body" Text="It turns out to be the problem of the deployer Hardhat!&#xD;&#xA;&#xD;&#xA;See this post: https://substrate.stackexchange.com/questions/4227/how-to-add-frontier-code-as-a-dependency-to-substrate-parachain-template-based-p/4295#4295&#xD;&#xA;&#xD;&#xA;All the upgradeable contracts and ERC777 could not be deployed because Hardhat was running too fast and that overwhelmed my parachain, hence &quot;ExhaustsResources&quot; error!&#xD;&#xA;&#xD;&#xA;Now I can deploy all my upgradeable contracts and ERC777(deploy ERC1820 first!) via Hardhat or Truffle. &#xD;&#xA;&#xD;&#xA;my hardhat.config.ts:&#xD;&#xA;```&#xD;&#xA;const config: HardhatUserConfig = {&#xD;&#xA;  defaultNetwork: &quot;hardhat&quot;,&#xD;&#xA;  networks: {&#xD;&#xA;    parachain: {&#xD;&#xA;      url: `${PARACHAIN_EVM_ENDPOINT}`,&#xD;&#xA;      chainId: 1234,&#xD;&#xA;      //gasPrice: 0,&#xD;&#xA;      //gasPrice: ethers.utils.parseUnits(&quot;1&quot;, &quot;gwei&quot;).toNumber(),//causing Payment error&#xD;&#xA;      gas: 25e6,//7e6,&#xD;&#xA;      accounts: {&#xD;&#xA;        mnemonic: `${MNEMONIC}`,&#xD;&#xA;        path: &quot;m/44'/60'/0'/0&quot;,&#xD;&#xA;        initialIndex: 0,&#xD;&#xA;        count: 20,&#xD;&#xA;        passphrase: &quot;&quot;,&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;AND you must use `await` for all asynchronous operations!&#xD;&#xA;&#xD;&#xA;AND you must wait for block confirmation as shown below for Hardhat code:&#xD;&#xA;```&#xD;&#xA;token = await Token.deploy(tokenName, tokenSymbol);&#xD;&#xA;await token.deployTransaction.wait(blockConfirmation);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For Truffle, add this `confirmations` in your truffle-config.js:&#xD;&#xA;```&#xD;&#xA;    parachain: {&#xD;&#xA;      provider: () =&gt; new HDWalletProvider(MNEMONIC, `${PARA_CHAIN_URL}`),//PARA_CHAIN_URL=http://127.0.0.1:7272&#xD;&#xA;      network_id: 2045,&#xD;&#xA;      production: true, &#xD;&#xA;      confirmations: 2, //to wait for enough confirmation&#xD;&#xA;      skipDryRun: true, //true to skip simulations&#xD;&#xA;    },&#xD;&#xA;```&#xD;&#xA;This `confirmation` slows the deployment down so the parachain can have time to make deployment properly." ContentLicense="CC BY-SA 4.0" />
  <row Id="17805" PostHistoryTypeId="2" PostId="4766" RevisionGUID="ea6fb698-a70d-434c-8b26-f885d3fa8a0a" CreationDate="2022-09-12T03:42:39.247" UserId="1789" Text="Regarding `Pool(TemporarilyBanned)`, you need to wait for asynchronous operations and wait for block confirmations... see https://substrate.stackexchange.com/questions/3882/deploy-solidity-ethereum-to-parachain-with-exhaustsresources-error/4322#4322" ContentLicense="CC BY-SA 4.0" />
  <row Id="17807" PostHistoryTypeId="2" PostId="4767" RevisionGUID="c5fa6495-ec40-490f-98c9-8644b4122f0d" CreationDate="2022-09-12T04:14:51.277" UserId="1959" Text="You seem to be looking for a xcm instruction: [DescendOrigin][1]&#xD;&#xA;&#xD;&#xA;&gt; Mutate the origin to some interior location.&#xD;&#xA;&#xD;&#xA;For example, you create a XCM with account `[0u8;32]:&#xD;&#xA;&#xD;&#xA;    Xcm(vec![&#xD;&#xA;				WithdrawAsset(..),&#xD;&#xA;				BuyExecution {..},&#xD;&#xA;				DescendOrigin(X1(AccountId32 { network: .., id: [0u8;32] })),&#xD;&#xA;                Transact(&lt;your pallet call&gt;)&#xD;&#xA;                ...&#xD;&#xA;			]);&#xD;&#xA;Before your pallet is called by transact, the origin of xcm will be converted by `OriginConverter`, you can find this configuration in [`XcmCExecutorConfig`][2]. And you can customize your converter as needed, such as use the account who created the xcm `[0u8;32]` to sign the origin.&#xD;&#xA;&#xD;&#xA;After that, your `ensure_origin` in your call will get the account who created the xcm.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/xcm-format#descendorigin&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/release-v0.9.26/xcm/xcm-executor/src/config.rs#L39" ContentLicense="CC BY-SA 4.0" />
  <row Id="17809" PostHistoryTypeId="5" PostId="4767" RevisionGUID="81bcd179-686d-4fc7-98b2-326c33c82129" CreationDate="2022-09-12T04:47:53.210" UserId="1959" Comment="added 309 characters in body" Text="You seem to be looking for a xcm instruction: [DescendOrigin][1]&#xD;&#xA;&#xD;&#xA;&gt; Mutate the origin to some interior location.&#xD;&#xA;&#xD;&#xA;It will append an account to the `origin` location (which include paraId you mentioned above).&#xD;&#xA;&#xD;&#xA;For example, you create a XCM with account `[0u8;32]`:&#xD;&#xA;&#xD;&#xA;    Xcm(vec![&#xD;&#xA;				WithdrawAsset(..),&#xD;&#xA;				BuyExecution {..},&#xD;&#xA;				DescendOrigin(X1(AccountId32 { network: .., id: [0u8;32] })),&#xD;&#xA;                Transact(&lt;your pallet call&gt;)&#xD;&#xA;                ...&#xD;&#xA;			]);&#xD;&#xA;Before your pallet is called by transact, the origin of xcm will be converted by `OriginConverter`, you can find this configuration in [`XcmCExecutorConfig`][2]. And you can customize your converter as needed, such as use the account who created the xcm `[0u8;32]` to sign the origin.&#xD;&#xA;&#xD;&#xA;After that, your `ensure_origin` in your call will get the account who created the xcm.&#xD;&#xA;&#xD;&#xA;**Note:**&#xD;&#xA;&#xD;&#xA;If you use polkadot's [`pallet-xcm.send`][3], it will add the `DescendOrigin` instruction for you when you need.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/xcm-format#descendorigin&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/release-v0.9.26/xcm/xcm-executor/src/config.rs#L39&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/release-v0.9.26/xcm/pallet-xcm/src/lib.rs#L1069" ContentLicense="CC BY-SA 4.0" />
  <row Id="17810" PostHistoryTypeId="5" PostId="4764" RevisionGUID="bafd3e27-3bec-4fc4-b0e5-ea978090b63b" CreationDate="2022-09-12T05:33:57.757" UserId="139" Comment="Question on how to use it." Text="The default implementation is to use a `u32` as `AccountIndex`. This means that only 2^32 claims can be made. Besides reserving an integer, can we use `String` as `AccountIndex` thereby referencing an account with a name instead of a number? &#xD;&#xA;&#xD;&#xA;Edit #1: Can we use it in place of regular addresses to send/receive funds?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17811" PostHistoryTypeId="5" PostId="4706" RevisionGUID="2d1d1e05-58c0-47b0-bcc3-317cc8e31581" CreationDate="2022-09-12T07:59:44.323" UserId="2011" Comment="edited body" Text="We have a paraID locked after a completed Crowdloan, the auction has concluded in a no-winning state, and the parathread is still owned by the account manager.&#xD;&#xA;&#xD;&#xA;Any explanation as to why the deposit is still locked?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17812" PostHistoryTypeId="2" PostId="4768" RevisionGUID="f8c5d0f4-bdab-48fd-aa47-9f5d8676b51b" CreationDate="2022-09-12T08:37:10.350" UserId="3114" Text="- I read the account page on the polkadot wiki and implemented the following logic.&#xD;&#xA;- I've tested it and it's working fine at the moment.&#xD;&#xA;- However, I don't understand enough to explain this structure to someone.&#xD;&#xA;- So be careful when using this logic.&#xD;&#xA;- Or if anyone can give me the correct logic, detailed explanation, please help me.&#xD;&#xA;https://wiki.polkadot.network/docs/learn-accounts&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        #[inline]&#xD;&#xA;        fn convert_string_to_accountid(&amp;self, account_str: &amp;str)-&gt; AccountId{&#xD;&#xA;            let mut output = vec![0xFF; 35];&#xD;&#xA;            bs58::decode(account_str).into(&amp;mut output).unwrap();&#xD;&#xA;            let cut_address_vec:Vec&lt;_&gt; = output.drain(1..33).collect();&#xD;&#xA;            let mut array = [0; 32];&#xD;&#xA;            let bytes = &amp;cut_address_vec[..array.len()]; &#xD;&#xA;            array.copy_from_slice(bytes);&#xD;&#xA;            let accountId:AccountId = array.into();&#xD;&#xA;            accountId&#xD;&#xA;        }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17814" PostHistoryTypeId="5" PostId="4756" RevisionGUID="f8e52262-8c38-4651-aa8e-d3a3116d0c01" CreationDate="2022-09-12T09:11:26.270" UserId="390" Comment="added 6 characters in body" Text="&#xD;&#xA;I am getting this error below from nginx &#xD;&#xA;&#xD;&#xA;``` [error] 32#32: *4 upstream prematurely closed connection while reading response header from upstream, client: 172.21.0.1, server: , request: &quot;GET / HTTP/1.1&quot;, upstream: &quot;http://172.21.0.2:8844/&quot;, host: &quot;localhost&quot; ```&#xD;&#xA;&#xD;&#xA;I have tried using the exact nginx config below as documented in wiki.polkadot.network/docs/maintain-wss#set-up-nginx-server&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;server {&#xD;&#xA;        listen 80 default_server;&#xD;&#xA;&#xD;&#xA;        root /var/www/html;&#xD;&#xA;        index index.html;&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        location / {&#xD;&#xA;          proxy_buffering off;&#xD;&#xA;          proxy_pass http://172.21.0.2:8844;&#xD;&#xA;          proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;          proxy_set_header Host $host;&#xD;&#xA;          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;&#xD;&#xA;          proxy_http_version 1.1;&#xD;&#xA;          proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;          proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        listen [::]:443 ssl default_server ipv6only=on;&#xD;&#xA;        listen 443 ssl default_server;&#xD;&#xA;        ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;&#xD;&#xA;        ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;&#xD;&#xA;&#xD;&#xA;        ssl_session_cache shared:cache_nginx_SSL:1m;&#xD;&#xA;        ssl_session_timeout 1440m;&#xD;&#xA;&#xD;&#xA;        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;&#xD;&#xA;        ssl_prefer_server_ciphers on;&#xD;&#xA;&#xD;&#xA;        ssl_ciphers &quot;ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS&quot;;&#xD;&#xA;&#xD;&#xA;        ssl_dhparam /etc/ssl/certs/dhparam.pem;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Keypoints&#xD;&#xA;- 502 error occurs locally in a docker-compose environment but the WS &amp; WSS connection still works on PolkadotJS&#xD;&#xA;- 502 return code in a cloud environment fails because the health check on the LB is expecting a 200 HTTP code hence marks the Nginx proxy as unhealthy and doesnt route the traffic through&#xD;&#xA;&#xD;&#xA;Please advice on what I could do to prevent this nginx error, I have tried every possible solution online. Ideally I would like a 200 HTTP return code when connecting to the Substrate Node's Websocket&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17816" PostHistoryTypeId="2" PostId="4769" RevisionGUID="587204b7-d254-467d-b693-0a179c95067d" CreationDate="2022-09-12T12:35:43.663" UserId="458" Text="I am getting follwing error while fetching Grandpa authority from Validator node:-&#xD;&#xA;&#xD;&#xA;    [2022-09-12T12:06:27Z INFO  ws] Queuing connection to wss://blockchain.polkadex.trade/&#xD;&#xA;    [2022-09-12T12:06:27Z INFO  substrate_api_client::std::rpc::ws_client] sending request: {&quot;id&quot;:&quot;1&quot;,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_getStorage&quot;,&quot;params&quot;:[&quot;0x3a6772616e6470615f617574686f726974696573&quot;,&quot;0x922f7b81c4f8b8375a861d879808b9bd3afa557f9ad25401beea9420905ee005&quot;]}&#xD;&#xA;    [2022-09-12T12:06:27Z INFO  substrate_api_client::std::rpc::ws_client] Got get_request_msg {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32000,&quot;message&quot;:&quot;Client error: UnknownBlock: State already discarded for BlockId::Hash(0x922f7b81c4f8b8375a861d879808b9bd3afa557f9ad25401beea9420905ee005)&quot;},&quot;id&quot;:&quot;1&quot;}&#xD;&#xA;    Error: Unable to get grandpa_authorities&#xD;&#xA;Usually, we get this error when fetching from a node with non-pruning mode. But I guess Validator always runs with pruning mode. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17818" PostHistoryTypeId="1" PostId="4769" RevisionGUID="587204b7-d254-467d-b693-0a179c95067d" CreationDate="2022-09-12T12:35:43.663" UserId="458" Text="Getting &quot;UnknownBlock: State already discarded&quot; while fetch block data from Validator node" ContentLicense="CC BY-SA 4.0" />
  <row Id="17819" PostHistoryTypeId="3" PostId="4769" RevisionGUID="587204b7-d254-467d-b693-0a179c95067d" CreationDate="2022-09-12T12:35:43.663" UserId="458" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17822" PostHistoryTypeId="5" PostId="4769" RevisionGUID="5e0bbed9-8248-4188-8086-7bf9dccc2f73" CreationDate="2022-09-12T14:02:42.123" UserId="458" Comment="deleted 87 characters in body" Text="I am getting follwing error while fetching Grandpa authority from Validator node:-&#xD;&#xA;&#xD;&#xA;    [2022-09-12T12:06:27Z INFO  ws] Queuing connection to wss://blockchain.polkadex.trade/&#xD;&#xA;    [2022-09-12T12:06:27Z INFO  substrate_api_client::std::rpc::ws_client] sending request: {&quot;id&quot;:&quot;1&quot;,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_getStorage&quot;,&quot;params&quot;:[&quot;0x3a6772616e6470615f617574686f726974696573&quot;,&quot;0x922f7b81c4f8b8375a861d879808b9bd3afa557f9ad25401beea9420905ee005&quot;]}&#xD;&#xA;    [2022-09-12T12:06:27Z INFO  substrate_api_client::std::rpc::ws_client] Got get_request_msg {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32000,&quot;message&quot;:&quot;Client error: UnknownBlock: State already discarded for BlockId::Hash(0x922f7b81c4f8b8375a861d879808b9bd3afa557f9ad25401beea9420905ee005)&quot;},&quot;id&quot;:&quot;1&quot;}&#xD;&#xA;    Error: Unable to get grandpa_authorities&#xD;&#xA;Not sure why I am getting the above error?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17823" PostHistoryTypeId="5" PostId="4760" RevisionGUID="3e963ce4-cf64-4603-9abd-703a80d12e35" CreationDate="2022-09-12T14:17:31.040" UserId="2752" Comment="added 895 characters in body" Text="`enter code here`I am implementing a project using the directory structure proposed by openbrush.&#xD;&#xA;The contract compiles without a problem, but when it comes to testing I run&#xD;&#xA;into the following error:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;error[E0599]&lt;/b&gt;&lt;/font&gt;&lt;b&gt;: no function or associated item named `new` found for trait object `dyn project_name::traits::traitName::TraitName` in the current scope&lt;/b&gt;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;--&amp;gt; &lt;/b&gt;&lt;/font&gt;tests/integrations_tests.rs:148:30&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;148&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;            let contract = TraitName::new(input);&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                             &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;^^^&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;function or associated item not found in `dyn project_name::traits::traitName::TraitName`&lt;/b&gt;&lt;/font&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Do I need to declare the constructor in the trait somewhere?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    #![feature(min_specialization)]&#xD;&#xA;&#xD;&#xA;    #[openbrush::contract]&#xD;&#xA;    pub mod name {&#xD;&#xA;        use project_name::traits::traitName::*;&#xD;&#xA;      &#xD;&#xA;        impl TraitName {&#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn new(input: bool) -&gt; Self {&#xD;&#xA;                ink_lang::codegen::initialize_contract(|contract: &amp; mut Self| {&#xD;&#xA;                    Self::new_init(contract, input)&#xD;&#xA;                })&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            fn new_init(&amp;mut self, input: bool) {&#xD;&#xA;                // do smth with input&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[cfg(test)]&#xD;&#xA;        mod tests {&#xD;&#xA;            use super::*;&#xD;&#xA;            use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;            #[ink::test]&#xD;&#xA;            fn test_nr_1(){&#xD;&#xA;                let contract = TraitName::new(true);&#xD;&#xA;                // stuff to test with contract&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="17825" PostHistoryTypeId="2" PostId="4771" RevisionGUID="4c5ddef6-2939-4758-8e66-dcabcc012669" CreationDate="2022-09-12T14:21:58.917" UserId="2752" Text="A solution to the problem was to not have the tests in a seperate test module.&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    #![feature(min_specialization)]&#xD;&#xA;    &#xD;&#xA;    #[openbrush::contract]&#xD;&#xA;    pub mod name {&#xD;&#xA;        use project_name::traits::traitName::*;&#xD;&#xA;      &#xD;&#xA;        impl TraitName {&#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn new(input: bool) -&gt; Self {&#xD;&#xA;                ink_lang::codegen::initialize_contract(|contract: &amp; mut Self| {&#xD;&#xA;                    Self::new_init(contract, input)&#xD;&#xA;                })&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            fn new_init(&amp;mut self, input: bool) {&#xD;&#xA;                // do smth with input&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        &#xD;&#xA;        use ink_lang as ink;&#xD;&#xA;    &#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn test_nr_1(){&#xD;&#xA;            let contract = TraitName::new(true);&#xD;&#xA;            // stuff to test with contract&#xD;&#xA;        }&#xD;&#xA;            &#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="17827" PostHistoryTypeId="2" PostId="4772" RevisionGUID="8ddd1e6b-5aac-4ac8-9e96-3f1cf564b426" CreationDate="2022-09-12T14:25:32.233" UserId="94" Text="(repost from [here](https://substrate.stackexchange.com/questions/4073/getblock-unable-to-catch-some-transactions/4079#4079), since your title should be easier to find):&#xD;&#xA;&#xD;&#xA;Polkadot nodes are configured to prune old blocks to save disk space.  &#xD;&#xA;The default configuration is set to 256 past blocks ([wiki link](https://wiki.polkadot.network/docs/maintain-sync#types-of-nodes)).  &#xD;&#xA;If you try to query the state of an older block, you will see the error that you experienced:&#xD;&#xA;```pre&#xD;&#xA;State already discarded for BlockId::Hash ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;One solution is to configure the node in `--pruning=archive` mode, which will keep all blocks but requires much more disk space. Or tune it more finely with the `--pruning` flag, which reads:  &#xD;&#xA;```pre&#xD;&#xA;--pruning &lt;PRUNING_MODE&gt;&#xD;&#xA;            Specify the state pruning mode, a number of blocks to keep or 'archive'.&#xD;&#xA;            &#xD;&#xA;            Default is to keep only the last 256 blocks, otherwise, the state can be kept for all of&#xD;&#xA;            the blocks (i.e 'archive'), or for all of the canonical blocks (i.e&#xD;&#xA;            'archive-canonical').&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Another way is to use an indexer, which is an external application that ingests block data and makes it query-able.  &#xD;&#xA;This has the additional advantage that its normally faster since the Polkadot node itself is not build for massive RPC requests into past blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="17831" PostHistoryTypeId="2" PostId="4773" RevisionGUID="9d0f8681-d164-4b4e-aaa5-1c72b212cb2b" CreationDate="2022-09-12T14:54:40.940" UserId="94" Text="&gt; The default implementation is to use a u32 as AccountIndex. This means that only 2^32 claims can be made.  &#xD;&#xA;&#xD;&#xA;Yes. This is an assumption that often occurs within Substrate. `usize` is truncated into `u32` in multiple places. You can change it in your runtime though. &#xD;&#xA;&#xD;&#xA;&gt; Besides reserving an integer, can we use String as AccountIndex thereby referencing an account with a name instead of a number?  &#xD;&#xA;&gt;[…] Can we use it in place of regular addresses to send/receive funds?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There exists the `Lookup` and `StaticLookup` trait which can translate a generic value into an `AccountId`. You probably want something like this:  &#xD;&#xA;```rust&#xD;&#xA;fn transfer(&#xD;&#xA;    origin: OriginFor&lt;T&gt;,&#xD;&#xA;    receiver: String,&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;but that has the downside of being limited to `String`. So now you would need different functions depending on the receiver type; not good.  &#xD;&#xA;Instead Substrate uses `Lookup` in many places, so that it becomes:  &#xD;&#xA;```rust&#xD;&#xA;fn transfer(&#xD;&#xA;    origin: OriginFor&lt;T&gt;,&#xD;&#xA;    receiver: &lt;&lt;T as frame_system::Config&gt;::Lookup as StaticLookup&gt;::Source,&#xD;&#xA;)&#xD;&#xA;{&#xD;&#xA;    let target = T::Lookup::lookup(receiver)?;&#xD;&#xA;```&#xD;&#xA;You can now translate all kinds of types by implementing that trait.  &#xD;&#xA;There is a good example in the Darwinia repo where Ethereum addresses are translated to Substrate: [here](https://github.com/darwinia-network/darwinia-common/blob/0448b1abb0ccba5b964bdd57ebf185d33de56235/node/primitives/src/lib.rs#L181-L201)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17833" PostHistoryTypeId="2" PostId="4774" RevisionGUID="ac281129-9067-45cf-b9e7-183a49fdc3c4" CreationDate="2022-09-12T15:03:54.347" UserId="94" Text="`Lookup::lookup` has a `self` parameter and `StaticLookup` does not.  &#xD;&#xA;So you can carry around some context in the `self` of the `Lookup` trait.  &#xD;&#xA;&#xD;&#xA;Otherwise inverting a value may not be defined for different contexts.  &#xD;&#xA;But yea, the implications in the doc are a bit weird." ContentLicense="CC BY-SA 4.0" />
  <row Id="17835" PostHistoryTypeId="2" PostId="4775" RevisionGUID="5032c2ce-a5bf-4538-9e75-a237cf7744ab" CreationDate="2022-09-12T15:49:30.090" UserId="94" Text="To make your life easier, you can use the expansions that `genesis_config` already provides. It does solve your problem and makes the code easier.  &#xD;&#xA;But only works, unless you need the struct explicitly somewhere else.  &#xD;&#xA;So you could opt for deleting the `InitialSync` struct.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;	pub initial_sync: BoundedVec&lt;sp_core::H256, T::MaxProofBranchSize&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Otherwise you have to re-do what the `genesis_config` struct does for you.  &#xD;&#xA;The struct then becomes:  &#xD;&#xA;```rust&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(serde::Serialize, serde::Deserialize))]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;	feature = &quot;std&quot;,&#xD;&#xA;	serde(&#xD;&#xA;		rename_all = &quot;camelCase&quot;,&#xD;&#xA;		deny_unknown_fields,&#xD;&#xA;		bound(serialize = &quot;&quot;),&#xD;&#xA;		bound(deserialize = &quot;&quot;)&#xD;&#xA;	)&#xD;&#xA;)]&#xD;&#xA;// Dont know if the other derives that you added here are actually&#xD;&#xA;// needed for a genesis config.&#xD;&#xA;pub struct InitialSync&lt;ProofSize: Get&lt;u32&gt;&gt; {&#xD;&#xA;    pub current_sync_committee_branch: BoundedVec&lt;H256, ProofSize&gt;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17837" PostHistoryTypeId="5" PostId="4775" RevisionGUID="c7087924-6d9b-4388-aa42-0f56c51c6aee" CreationDate="2022-09-12T15:55:20.647" UserId="94" Comment="deleted 29 characters in body" Text="To make your life easier, you can use the expansions that `genesis_config` already provides. It does solve your problem and makes the code easier.  &#xD;&#xA;So you could opt for deleting the `InitialSync` struct, or just not using it in the Genesis config.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;	pub initial_sync: BoundedVec&lt;sp_core::H256, T::MaxProofBranchSize&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Otherwise you have to re-do what the `genesis_config` struct does for you.  &#xD;&#xA;The struct then becomes:  &#xD;&#xA;```rust&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(serde::Serialize, serde::Deserialize))]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;	feature = &quot;std&quot;,&#xD;&#xA;	serde(&#xD;&#xA;		rename_all = &quot;camelCase&quot;,&#xD;&#xA;		deny_unknown_fields,&#xD;&#xA;		bound(serialize = &quot;&quot;),&#xD;&#xA;		bound(deserialize = &quot;&quot;)&#xD;&#xA;	)&#xD;&#xA;)]&#xD;&#xA;// Dont know if the other derives that you added here are actually&#xD;&#xA;// needed for a genesis config.&#xD;&#xA;pub struct InitialSync&lt;ProofSize: Get&lt;u32&gt;&gt; {&#xD;&#xA;    pub current_sync_committee_branch: BoundedVec&lt;H256, ProofSize&gt;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17838" PostHistoryTypeId="2" PostId="4776" RevisionGUID="e2181461-5849-4307-80b9-7a002f21c42a" CreationDate="2022-09-12T16:23:34.647" UserId="2752" Text="I want to write a contract which enables the user to deposit the native chain token&#xD;&#xA;in a contract and to then later withdraw the token.&#xD;&#xA;&#xD;&#xA;[The only example][1] I found so far, only enables the user to withdraw the balance from&#xD;&#xA;the smart contract but I couldn't figure out how to send token to the contract.&#xD;&#xA;&#xD;&#xA;This is how I want it in theory to look:&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        #[ink(message, payable)]&#xD;&#xA;        pub fn deposit(&amp;mut self, value: Balance) {&#xD;&#xA;            // Test if caller has sufficient funds&#xD;&#xA;            // deposit the balance to the contract&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        #[ink(message, payable)]&#xD;&#xA;        pub fn withdraw(&amp;mut self, value: Balance) {&#xD;&#xA;            ink_env::debug_println!(&quot;requested value: {}&quot;, value);&#xD;&#xA;            ink_env::debug_println!(&quot;contract balance: {}&quot;, self.env().balance());&#xD;&#xA;&#xD;&#xA;            assert!(value &lt;= self.env().balance(), &quot;insufficient funds!&quot;);&#xD;&#xA;&#xD;&#xA;            if self.env().transfer(self.env().caller(), value).is_err() {&#xD;&#xA;                panic!(&#xD;&#xA;                    &quot;requested transfer failed. this can be the case if the contract does not\&#xD;&#xA;                     have sufficient free funds or if the transfer would have brought the\&#xD;&#xA;                     contract's balance below minimum balance.&quot;&#xD;&#xA;                )&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/examples/contract-transfer/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="17840" PostHistoryTypeId="1" PostId="4776" RevisionGUID="e2181461-5849-4307-80b9-7a002f21c42a" CreationDate="2022-09-12T16:23:34.647" UserId="2752" Text="How to transfer a native chain token from one account to the contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17841" PostHistoryTypeId="3" PostId="4776" RevisionGUID="e2181461-5849-4307-80b9-7a002f21c42a" CreationDate="2022-09-12T16:23:34.647" UserId="2752" Text="|ink|smart-contract|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17842" PostHistoryTypeId="10" PostId="1502" RevisionGUID="fabf743a-ba94-4994-a2d7-74b8f2df570e" CreationDate="2022-09-12T16:44:18.867" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="17843" PostHistoryTypeId="5" PostId="4751" RevisionGUID="bc3d5e3e-3c7b-4423-9ea1-43aaedb9d8ac" CreationDate="2022-09-12T17:06:55.977" UserId="283" Comment="changed recommendation from custom extrinsic to custom `SignedExtension`" Text="The default Substrate transaction queue uses the [`TaggedTransactionQueue`](https://crates.parity.io/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html) Runtime API to query the runtime about the validity and priority of queued transactions. &#xD;&#xA;&#xD;&#xA;Under the hood, this is usually implemented in the runtime as &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	impl tx_pool_api::runtime_api::TaggedTransactionQueue&lt;Block&gt; for Runtime {&#xD;&#xA;		fn validate_transaction(&#xD;&#xA;			source: TransactionSource,&#xD;&#xA;			tx: &lt;Block as BlockT&gt;::Extrinsic,&#xD;&#xA;			block_hash: &lt;Block as BlockT&gt;::Hash,&#xD;&#xA;		) -&gt; TransactionValidity {&#xD;&#xA;			Executive::validate_transaction(source, tx, block_hash)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The [`TransactionValidity`](https://crates.parity.io/sp_runtime/transaction_validity/type.TransactionValidity.html) is a `Result&lt;ValidTransaction, _&gt;, where a `ValidTransaction` has a field&#xD;&#xA;&#xD;&#xA;`priority: TransactionPriority // = u64`&#xD;&#xA;&#xD;&#xA;Under the hood, `Executive::validate_transaction` uses the [`CheckedExtrinsic::validate`](https://crates.parity.io/sp_runtime/generic/struct.CheckedExtrinsic.html#method.validate) function, which in turn invokes the [`SignedExtension::validate`](https://crates.parity.io/sp_runtime/traits/trait.SignedExtension.html#method.validate) function. &#xD;&#xA;&#xD;&#xA;In order to plug into this part of Substrate, you should create an alternative `SignedExtension` with a custom `validate` function that returns a suitable `TransactionValidity`. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17844" PostHistoryTypeId="5" PostId="4760" RevisionGUID="a48e6419-d2f7-4dc5-a742-af3286495494" CreationDate="2022-09-12T17:14:04.020" UserId="2752" Comment="deleted 17 characters in body" Text="I am implementing a project using the directory structure proposed by openbrush.&#xD;&#xA;The contract compiles without a problem, but when it comes to testing I run&#xD;&#xA;into the following error:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;error[E0599]&lt;/b&gt;&lt;/font&gt;&lt;b&gt;: no function or associated item named `new` found for trait object `dyn project_name::traits::traitName::TraitName` in the current scope&lt;/b&gt;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;--&amp;gt; &lt;/b&gt;&lt;/font&gt;tests/integrations_tests.rs:148:30&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;148&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;            let contract = TraitName::new(input);&#xD;&#xA;    &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                             &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;^^^&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;function or associated item not found in `dyn project_name::traits::traitName::TraitName`&lt;/b&gt;&lt;/font&gt;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;Do I need to declare the constructor in the trait somewhere?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    #![feature(min_specialization)]&#xD;&#xA;&#xD;&#xA;    #[openbrush::contract]&#xD;&#xA;    pub mod name {&#xD;&#xA;        use project_name::traits::traitName::*;&#xD;&#xA;      &#xD;&#xA;        impl TraitName {&#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn new(input: bool) -&gt; Self {&#xD;&#xA;                ink_lang::codegen::initialize_contract(|contract: &amp; mut Self| {&#xD;&#xA;                    Self::new_init(contract, input)&#xD;&#xA;                })&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            fn new_init(&amp;mut self, input: bool) {&#xD;&#xA;                // do smth with input&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[cfg(test)]&#xD;&#xA;        mod tests {&#xD;&#xA;            use super::*;&#xD;&#xA;            use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;            #[ink::test]&#xD;&#xA;            fn test_nr_1(){&#xD;&#xA;                let contract = TraitName::new(true);&#xD;&#xA;                // stuff to test with contract&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="17849" PostHistoryTypeId="52" PostId="4769" RevisionGUID="272bf5d5-e3ba-40fd-9423-c720ffbd2f05" CreationDate="2022-09-12T20:36:47.557" />
  <row Id="17850" PostHistoryTypeId="2" PostId="4778" RevisionGUID="fbda7dba-4f12-405e-8330-c1c5e74deba3" CreationDate="2022-09-12T22:05:46.463" UserId="2752" Text="The title of the question is a bit open ended, but I am trying to make cross contract calling work right now and realised, that there is a lot of open question on how it exactly works and how the parts fit together.&#xD;&#xA;&#xD;&#xA;I am using the directory structure recommended by openbrush (more or less). At the moment, my project looks like this:&#xD;&#xA;&#xD;&#xA; - contracts&#xD;&#xA;    - contract_1&#xD;&#xA;       - Cargo.toml&#xD;&#xA;       - lib.rs&#xD;&#xA;    - contract_2&#xD;&#xA;       - Cargo.toml&#xD;&#xA;       - lib.rs&#xD;&#xA; - traits&#xD;&#xA;    - contract_1.rs&#xD;&#xA;    - contract_2.rs&#xD;&#xA;    - mod.rs&#xD;&#xA; - Cargo.toml&#xD;&#xA; - lib.rs&#xD;&#xA;&#xD;&#xA;I want to call contract_1 in contract_2.&#xD;&#xA;&#xD;&#xA;Defining the traits I have a wrapper for contract_1 like this:&#xD;&#xA;&#xD;&#xA;    #[openbrush::wrapper]&#xD;&#xA;    pub type ContractOneRef = dyn ContractOne;&#xD;&#xA;&#xD;&#xA;Then I try to call on contract_1 in contract_2 like this:&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    use ink_lang as ink;&#xD;&#xA;    &#xD;&#xA;    #[ink::contract]&#xD;&#xA;    mod contract_2 {&#xD;&#xA;    use c1_contract::contract_1::*;&#xD;&#xA;    use project::traits::contract_2::*;&#xD;&#xA;    &#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Manager {&#xD;&#xA;        contract_1: ContractOneRef&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl ContractTwo {&#xD;&#xA;        &#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(&#xD;&#xA;            code_hash: Hash&#xD;&#xA;        ) -&gt; Self {&#xD;&#xA;            // Here I am not even sure what exactly to do.&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The idea is, that contract_1 is already deployed on the chain and I want to call on it with contract_2. I have found conflicting information online on how to reference the contract which I want to call on.&#xD;&#xA;&#xD;&#xA;[Here][1] there are two examples on how to do it. The answer is, that the first example is deprecated and the second example does not really get any explanation. Just plain code. The [wrapper feature][2] of openbrush is also mentioned, but the only thing it seems to explain is how to do the trait definition.&#xD;&#xA;&#xD;&#xA;Looking at the code example I am thinking, that the way to define/link contract_1 could look like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;        let total_balance = Self::env().balance();&#xD;&#xA;        let salt = version.to_le_bytes();&#xD;&#xA;        let contract_1 = ContractOneRef::new(input_values)&#xD;&#xA;            .endowment(total_balance / 4)&#xD;&#xA;            .code_hash(accumulator_code_hash)&#xD;&#xA;            .salt_bytes(salt)&#xD;&#xA;            .instantiate()&#xD;&#xA;            .unwrap_or_else(|error| {&#xD;&#xA;                panic!(&#xD;&#xA;                    &quot;failed at instantiating the Accumulator contract: {:?}&quot;,&#xD;&#xA;                    error&#xD;&#xA;                )&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;But this just throws a lot of errors like:&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;33&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;            let salt = version.to_le_bytes();&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                       &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;^^^^^^^&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;not found in this scope&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;&lt;pre&gt;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;37&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                .instantiate()&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;| &lt;/b&gt;&lt;/font&gt;                 &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;^^^^^^^^^^^&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#F15D22&quot;&gt;&lt;b&gt;method not found in `CreateBuilder&amp;lt;DefaultEnvironment, Set&amp;lt;ink_env::Hash&amp;gt;, Unset&amp;lt;u64&amp;gt;, Set&amp;lt;u128&amp;gt;, Set&amp;lt;ExecutionInput&amp;lt;ArgumentList&amp;lt;ink_env::call::utils::Argument&amp;lt;String&amp;gt;, ArgumentList&amp;lt;ink_env::call::utils::Argument&amp;lt;String&amp;gt;, ArgumentList&amp;lt;ink_env::call::utils::Argument&amp;lt;ink_env::AccountId&amp;gt;, ArgumentList&amp;lt;ink_env::call::utils::Argument&amp;lt;Vec&amp;lt;u8&amp;gt;&amp;gt;, ArgumentList&amp;lt;ArgumentListEnd, ArgumentListEnd&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;, Unset&amp;lt;Salt&amp;gt;, c1_contract::contract_one::ContractOneRef&amp;gt;`&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;   &lt;font color=&quot;#48B9C7&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&#xD;&#xA;&lt;/pre&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is this the right way to call on a contract which is using the wrapper of openbrush?&#xD;&#xA;And if yes, what am I doing wrong?&#xD;&#xA;&#xD;&#xA;Also, what are the different values they are trying passing over there?&#xD;&#xA;&#xD;&#xA; - endowment&#xD;&#xA; - code_hash&#xD;&#xA; - isntantiate&#xD;&#xA; - salt&#xD;&#xA;&#xD;&#xA;And if this is calling on a contract which should already be deployed on chain, why would I have to put call the constructor and pass in the arguments there?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2797/what-is-the-best-way-to-make-a-cross-contract-call-on-ink&#xD;&#xA;  [2]: https://github.com/Supercolony-net/openbrush-contracts#wrapper-around-traits" ContentLicense="CC BY-SA 4.0" />
  <row Id="17852" PostHistoryTypeId="1" PostId="4778" RevisionGUID="fbda7dba-4f12-405e-8330-c1c5e74deba3" CreationDate="2022-09-12T22:05:46.463" UserId="2752" Text="How does cross contract calling with openbrush work exactly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17853" PostHistoryTypeId="3" PostId="4778" RevisionGUID="fbda7dba-4f12-405e-8330-c1c5e74deba3" CreationDate="2022-09-12T22:05:46.463" UserId="2752" Text="|ink|smart-contract|blockchaincross-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17854" PostHistoryTypeId="2" PostId="4779" RevisionGUID="40946de1-55ad-4583-8a58-cd431de360d8" CreationDate="2022-09-13T00:52:52.840" UserId="599" Text="During work on your project, you may have two kinds of cross-contract interactions:&#xD;&#xA;- When one contract instantiates another contract.&#xD;&#xA;- When one contract calls the method of another already instantiated contract.&#xD;&#xA;&#xD;&#xA;Wrapper from OpenBrush allows you to do the second kind of interaction(you need only knowledge of the trait). In the future, it will be improved, and you will be able to do the first kind, too.&#xD;&#xA;&#xD;&#xA;The `{}Ref`(where `{}` is the name of the contract) allows you to do both kinds of interactions, but you need to import another contract as a dependency.&#xD;&#xA;&#xD;&#xA;You can call the constructor of the `{}Ref` and pass arguments. During compilation ink! will expand it into a low-level call of host functions. But except for arguments, you also need to specify:&#xD;&#xA;- `endowment` - the amount of tokens that you want to transfer. Remember, it requires the constructor to be `payable`.&#xD;&#xA;- `code_hash` - the code hash of the [deployed](https://docs.openbrush.io/smart-contracts/upgradeable#constructor-and-initialization) contract.&#xD;&#xA;- `salt` - if you want to deploy several contracts during one transaction, each contract should be deployed with some salt. It is needed to make the contract unique. It can be any sequence of bytes(an empty array also works). `version` in the example is a number that can be incremented each time after deploying a new contract.&#xD;&#xA;&#xD;&#xA;OpenBrush use both `{}Ref` and wrapper in the example. `{}Ref` is used to [instantiate the contracts](https://github.com/Supercolony-net/openbrush-contracts/blob/9dbc5f73acb439318329e1dfe6235e021a4b7786/example_project_structure/contracts/lending/lib.rs#L76). Wrapper is used to do [cross contract calls](https://github.com/Supercolony-net/openbrush-contracts/blob/9dbc5f73acb439318329e1dfe6235e021a4b7786/example_project_structure/impls/lending/lending.rs#L108)&#xD;&#xA;&#xD;&#xA;I hope it will answer your question. If not, you can ask in the comment, and I will edit the post.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17856" PostHistoryTypeId="2" PostId="4780" RevisionGUID="8e588fe1-a8c8-4a86-be55-f0af7481e717" CreationDate="2022-09-13T01:06:00.520" UserId="599" Text="Your pseudo-code is right. The user can call the method `deposit` of the contract and pass some value from the UI or the TS/JS code.&#xD;&#xA;&#xD;&#xA;Also, other contracts can do cross-contract calls to you(they need to call the `deposit` method) and specify the amount to transfer.&#xD;&#xA;&#xD;&#xA;Inside of `deposit` method, you can use [`ink_env::transferred_value`](https://github.com/paritytech/ink/blob/master/crates/env/src/api.rs#L63) method, to get the value of the sent amount(your contract already received money when the blockchain started to execute your transaction).&#xD;&#xA;&#xD;&#xA;But expect of that method, you also can receive money by standard transfer [`ink_env::transfer`](https://github.com/paritytech/ink/blob/master/crates/env/src/api.rs#L353). Or by transfer via `pallet-balances`.&#xD;&#xA;&#xD;&#xA;Also, maybe it will be useful to check or reuse the code from [`payment_apliiter`](https://github.com/Supercolony-net/openbrush-contracts/blob/9dbc5f73acb439318329e1dfe6235e021a4b7786/contracts/src/finance/payment_splitter/mod.rs#L82) in [OpenBrush](https://github.com/Supercolony-net/openbrush-contracts/tree/9dbc5f73acb439318329e1dfe6235e021a4b7786/examples/payment_splitter)." ContentLicense="CC BY-SA 4.0" />
  <row Id="17858" PostHistoryTypeId="5" PostId="4769" RevisionGUID="60ea7468-aba9-45f5-b650-197a37d627c7" CreationDate="2022-09-13T03:00:55.327" UserId="458" Comment="deleted 15 characters in body" Text="I am getting follwing error while fetching Grandpa authority from Validator node:-&#xD;&#xA;&#xD;&#xA;    [2022-09-12T12:06:27Z INFO  ws] Queuing connection to wss://blockchain/&#xD;&#xA;    [2022-09-12T12:06:27Z INFO  substrate_api_client::std::rpc::ws_client] sending request: {&quot;id&quot;:&quot;1&quot;,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_getStorage&quot;,&quot;params&quot;:[&quot;0x3a6772616e6470615f617574686f726974696573&quot;,&quot;0x922f7b81c4f8b8375a861d879808b9bd3afa557f9ad25401beea9420905ee005&quot;]}&#xD;&#xA;    [2022-09-12T12:06:27Z INFO  substrate_api_client::std::rpc::ws_client] Got get_request_msg {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32000,&quot;message&quot;:&quot;Client error: UnknownBlock: State already discarded for BlockId::Hash(0x922f7b81c4f8b8375a861d879808b9bd3afa557f9ad25401beea9420905ee005)&quot;},&quot;id&quot;:&quot;1&quot;}&#xD;&#xA;    Error: Unable to get grandpa_authorities&#xD;&#xA;Not sure why I am getting the above error?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17859" PostHistoryTypeId="2" PostId="4781" RevisionGUID="f2bda027-82f1-4a5f-ade2-482098862a40" CreationDate="2022-09-13T06:56:47.930" UserId="251" Text="I am afraid you can't do this.&#xD;&#xA;&#xD;&#xA;The `TypeInfo` will explain this type as `BoundedVec&lt;u8, MaxGenericIdLenGet&gt;`.&#xD;&#xA;&#xD;&#xA;So, it shows bytes in the PolkadotApps.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Why `H256` work?&#xD;&#xA;&#xD;&#xA;In fact, `H256` is `[u8; 32]`.&#xD;&#xA;&#xD;&#xA;But PolkadotApps makes some wrap for it.&#xD;&#xA;&#xD;&#xA;Then it could be displayed as `0x00...` instead of `[0,...]`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If you want to do this.&#xD;&#xA;&#xD;&#xA;IIUC, you've to tweak the PolkadotJS about how it deals with `GenericId`." ContentLicense="CC BY-SA 4.0" />
  <row Id="17861" PostHistoryTypeId="2" PostId="4782" RevisionGUID="958491ed-5f10-4ee5-89f5-4fdb9a7e270c" CreationDate="2022-09-13T08:20:13.483" UserId="2884" Text="- first byte: pallet id,&#xD;&#xA;- second byte: call position in the order defined on the pallet,&#xD;&#xA;- third byte and onwards: arguments encoded in SCALE, and put in the order defined on the fn parameters definition (except origin argument).&#xD;&#xA;&#xD;&#xA;For example, if you want to execute the do_something call of [pallet_template][1], first you see the id of the pallet in the destination runtime:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;construct_runtime! {&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = primitives::v2::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		// Basic stuff; balances is uncallable initially.&#xD;&#xA;		System: frame_system::{Pallet, Call, Storage, Config, Event&lt;T&gt;} = 0,&#xD;&#xA;		...&#xD;&#xA;		TemplatePallet: pallet_template::{Pallet, Call, Storage, Event&lt;T&gt;}  = 40,&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So your first byte will need to be equal to 40 in decimal.&#xD;&#xA;&#xD;&#xA;Then you look at the order in which the functions are defined on the pallet:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	#[pallet::weight(...)]&#xD;&#xA;	pub fn do_something(...) -&gt; DispatchResultWithPostInfo {...}&#xD;&#xA;&#xD;&#xA;	#[pallet::weight(...)]&#xD;&#xA;	pub fn cause_error(...) -&gt; DispatchResultWithPostInfo {...}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The position of the do_something function is number 1, so your second byte should equal 1 in decimal.&#xD;&#xA;&#xD;&#xA;You finally look at the parameters of the function:&#xD;&#xA;```rust&#xD;&#xA;pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResultWithPostInfo {...}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Without counting the origin, you only have one parameter. So the number of bytes will be decided by how SCALE encoding works on u32, but that is something you can easily find, and should not worry to much about.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Note**: &#xD;&#xA;&#xD;&#xA;I found this information by playing around the code myself, and using the [cargo expand][2] function to see how the pallet and runtime look after the macros. I highly recommend using it to understand the code a bit better.&#xD;&#xA;&#xD;&#xA;I used this knowledge to create a mock Call enum that derives Encode and Decode. This way one runtime can create a valid encoded pallet call of another runtime without needing all of the underlying logic.&#xD;&#xA;&#xD;&#xA;For example, if you have on one runtime a very complex call on pallet id 42, and function position 4, with a first argument u32 and a second argument Vec&lt;u32&gt;, you can create a mock call that will get encoded the same as the original pallet as following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;#[allow(non_camel_case_types)]&#xD;&#xA;enum MockCall {&#xD;&#xA;	#[codec(index = 0u8)]&#xD;&#xA;	first_fn {&#xD;&#xA;    	first_item: u32,&#xD;&#xA;        second_item: Vec&lt;u32&gt;, &#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The names of the enum, function, and parameters do not matter, only the order and parameter types. You also need to derive the scale encoding!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/master/parachain-template/pallets/template/src/lib.rs#:~:text=pub%20fn%20do_something(origin%3A%20OriginFor%3CT%3E%2C%20something%3A%20u32)%20%2D%3E%20DispatchResultWithPostInfo%20%7B&#xD;&#xA;  [2]: https://docs.rs/crate/cargo-expand/0.3.10" ContentLicense="CC BY-SA 4.0" />
  <row Id="17867" PostHistoryTypeId="2" PostId="4784" RevisionGUID="3db30b16-95e5-4989-8fb7-40a4825b2796" CreationDate="2022-09-13T12:04:59.960" UserId="2034" Text="[![enter image description here][1]][1]&#xD;&#xA;As the picture shows, when I try to &quot;impl pallet_balances::Config for Test&quot; of pallets/template/src/mock.rs, I got the error &quot;type mismatch resolving `&lt;mock::Test as frame_system::Config&gt;::AccountData == AccountData&lt;u128&gt;`&quot;. I tried to do the fix as the compiler note says, but still got errors. So could I know what's wrong with my code? I'm using polkadot-9.25 branch, and below is my code at pallets/template/src/mock.rs:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;use crate as pallet_template;&#xD;&#xA;// use frame_support::traits::{ConstU16, ConstU64};&#xD;&#xA;pub use frame_support::{&#xD;&#xA;	construct_runtime, parameter_types,&#xD;&#xA;	traits::{&#xD;&#xA;		ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, KeyOwnerProofSystem, Randomness,&#xD;&#xA;		StorageInfo,&#xD;&#xA;	},&#xD;&#xA;	weights::{&#xD;&#xA;		constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},&#xD;&#xA;		IdentityFee, Weight,&#xD;&#xA;	},&#xD;&#xA;	StorageValue,&#xD;&#xA;};&#xD;&#xA;use frame_system as system;&#xD;&#xA;use sp_core::H256;&#xD;&#xA;use sp_runtime::{&#xD;&#xA;	testing::Header,&#xD;&#xA;	traits::{BlakeTwo256, IdentityLookup},&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic&lt;Test&gt;;&#xD;&#xA;type Block = frame_system::mocking::MockBlock&lt;Test&gt;;&#xD;&#xA;type Balance = u128;&#xD;&#xA;&#xD;&#xA;// Configure a mock runtime to test the pallet.&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;},&#xD;&#xA;		TemplateModule: pallet_template::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		Balances: pallet_balances::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},&#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl system::Config for Test {&#xD;&#xA;	type BaseCallFilter = frame_support::traits::Everything;&#xD;&#xA;	type BlockWeights = ();&#xD;&#xA;	type BlockLength = ();&#xD;&#xA;	type DbWeight = ();&#xD;&#xA;	type Origin = Origin;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type Index = u64;&#xD;&#xA;	type BlockNumber = u64;&#xD;&#xA;	type Hash = H256;&#xD;&#xA;	type Hashing = BlakeTwo256;&#xD;&#xA;	type AccountId = u64;&#xD;&#xA;	type Lookup = IdentityLookup&lt;Self::AccountId&gt;;&#xD;&#xA;	type Header = Header;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type BlockHashCount = ConstU64&lt;250&gt;;&#xD;&#xA;	type Version = ();&#xD;&#xA;	type PalletInfo = PalletInfo;&#xD;&#xA;	type AccountData = ();&#xD;&#xA;	type OnNewAccount = ();&#xD;&#xA;	type OnKilledAccount = ();&#xD;&#xA;	type SystemWeightInfo = ();&#xD;&#xA;	type SS58Prefix = ConstU16&lt;42&gt;;&#xD;&#xA;	type OnSetCode = ();&#xD;&#xA;	type MaxConsumers = frame_support::traits::ConstU32&lt;16&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_template::Config for Test {&#xD;&#xA;	type Event = Event;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_balances::Config for Test {&#xD;&#xA;	type MaxLocks = ConstU32&lt;50&gt;;&#xD;&#xA;	type MaxReserves = ();&#xD;&#xA;	type ReserveIdentifier = [u8; 8];&#xD;&#xA;	/// The type for recording an account's balance.&#xD;&#xA;	type Balance = Balance;&#xD;&#xA;	/// The ubiquitous event type.&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type DustRemoval = ();&#xD;&#xA;	type ExistentialDeposit = ConstU128&lt;500&gt;;&#xD;&#xA;	type AccountStore = System;&#xD;&#xA;	type WeightInfo = pallet_balances::weights::SubstrateWeight&lt;Test&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Build genesis storage according to the mock runtime.&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;	system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap().into()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/O0rxH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17869" PostHistoryTypeId="1" PostId="4784" RevisionGUID="3db30b16-95e5-4989-8fb7-40a4825b2796" CreationDate="2022-09-13T12:04:59.960" UserId="2034" Text="Got error when trying to &quot;impl pallet_balances::Config for Test&quot; at pallets/template/src/mock.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="17870" PostHistoryTypeId="3" PostId="4784" RevisionGUID="3db30b16-95e5-4989-8fb7-40a4825b2796" CreationDate="2022-09-13T12:04:59.960" UserId="2034" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17871" PostHistoryTypeId="2" PostId="4785" RevisionGUID="5612c195-b5e5-46f9-8f67-1e79d2f239ef" CreationDate="2022-09-13T13:32:03.793" UserId="3121" Text="&lt;https://docs.substrate.io/tutorials/smart-contracts/prepare-your-first-contract/&gt;&#xD;&#xA;&#xD;&#xA;Hi, I'm working on the above tutorial and after running the `cargo +nightly test` command, I see the following error.&#xD;&#xA;```&#xD;&#xA;error[E0158]: associated consts cannot be referenced in patterns&#xD;&#xA;  --&gt; flipper/lib.rs:9:5&#xD;&#xA;   |&#xD;&#xA;9  | /     pub struct Flipper {&#xD;&#xA;10 | |         value: bool,&#xD;&#xA;11 | |     }&#xD;&#xA;   | |_____^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Nothing has been changed from the source code here. What is a workaround for this please?&#xD;&#xA;&#xD;&#xA;&lt;https://github.com/paritytech/ink/blob/master/examples/flipper/lib.rs&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17873" PostHistoryTypeId="1" PostId="4785" RevisionGUID="5612c195-b5e5-46f9-8f67-1e79d2f239ef" CreationDate="2022-09-13T13:32:03.793" UserId="3121" Text="error[E0158] when testing default contract from flipper" ContentLicense="CC BY-SA 4.0" />
  <row Id="17874" PostHistoryTypeId="3" PostId="4785" RevisionGUID="5612c195-b5e5-46f9-8f67-1e79d2f239ef" CreationDate="2022-09-13T13:32:03.793" UserId="3121" Text="|substrate-node|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17875" PostHistoryTypeId="2" PostId="4786" RevisionGUID="03fa07cc-6dcb-4088-9091-5825a0a29684" CreationDate="2022-09-13T13:42:18.453" UserId="3164" Text="The polkadot project builds with no problems on my m1 chip macbook, but when I try to execute the executatble, I get the following error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;❯ ./target/release/polkadot --chain=polkadot&#xD;&#xA;&#xD;&#xA;&lt;jemalloc&gt;: Error allocating TSD&#xD;&#xA;[1]    87791 abort      ./target/release/polkadot --chain=polkadot&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How do I workaround this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17877" PostHistoryTypeId="1" PostId="4786" RevisionGUID="03fa07cc-6dcb-4088-9091-5825a0a29684" CreationDate="2022-09-13T13:42:18.453" UserId="3164" Text="Fails to run polkadot on macbook m1 chip with error: &lt;jemalloc&gt;: Error allocating TSD" ContentLicense="CC BY-SA 4.0" />
  <row Id="17878" PostHistoryTypeId="3" PostId="4786" RevisionGUID="03fa07cc-6dcb-4088-9091-5825a0a29684" CreationDate="2022-09-13T13:42:18.453" UserId="3164" Text="|polkadot|rust|macos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17879" PostHistoryTypeId="2" PostId="4787" RevisionGUID="9f8f1c65-5b16-47be-9c8b-b95dd3cc3cc3" CreationDate="2022-09-13T13:52:30.193" UserId="234" Text="The [as_multi_threshold_1][1] function can be useful when you need to allow people to share an account with full permission to use it. &#xD;&#xA;&#xD;&#xA;A real use case scenario could be for example a business that has a bank account and says &quot;*any one of the 3 founders can authorize payments from this account*&quot;. &#xD;&#xA;&#xD;&#xA;In that case you will need to have :&#xD;&#xA;- A multisig with 3 signatories and threshold 1&#xD;&#xA;- If one out of the three signatories signs, then the call is executed&#xD;&#xA;- In this case `as_multi_threshold_1` should be used since no further approvals are needed (hence no need to use [approve_as_multi][2] or [as_multi][3]).&#xD;&#xA;&#xD;&#xA;I can confirm that currently [Polkadot-js Apps][4] does not allow the creation of Multisig accounts with threshold lower than 2. This changed in this [p-js apps PR][5] based on this reported [issue][6] in the same repo. However there is still an [issue][7] open that I think requests exactly that, allowing multisigs with threshold 1. I am not sure however what is the reason why it is still not implemented. Maybe you could add a comment in the repository, in the corresponding issue to ask that or even better submit a PR with the change &amp; solution. It would certainly be a great contribution for the tool and the community.&#xD;&#xA;&#xD;&#xA;In the meantime, if you would like to create a multisig with threshold 1 then you could also use [txwrapper-core][8] which is a tool that Parity supports with new features and weekly updates. There is a detailed [Multisig][9] example that you can try out and change to see how it works.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/multisig/src/lib.rs#L267&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/multisig/src/lib.rs#L423&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/multisig/src/lib.rs#L360&#xD;&#xA;  [4]: https://polkadot.js.org/apps/#/accounts&#xD;&#xA;  [5]: https://github.com/polkadot-js/apps/pull/3542&#xD;&#xA;  [6]: https://github.com/polkadot-js/apps/issues/3541&#xD;&#xA;  [7]: https://github.com/polkadot-js/apps/issues/3862&#xD;&#xA;  [8]: https://github.com/paritytech/txwrapper-core&#xD;&#xA;  [9]: https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-examples/multisig" ContentLicense="CC BY-SA 4.0" />
  <row Id="17881" PostHistoryTypeId="2" PostId="4788" RevisionGUID="a7a7ff70-bf06-4eeb-9932-3e75cc5b9aed" CreationDate="2022-09-13T13:58:14.790" UserId="3166" Text="Polkadot and kusama respectively have integrated their platform with [ledger hardware wallet](https://www.ledger.com/). After reading documentation I came to know that integrating a blockchain with ledger requires a nano app which will run in ledger and a GUI. Kusama and polkadot prepared their respective nano app and for GUI they used [Polkadot UI](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/settings) to connect ledger and perform operations such as transfer and staking as seen on this [link](https://support.ledger.com/hc/en-us/articles/4416512532625-Set-up-and-use-polkadot-js-to-access-your-Ledger-Kusama-KSM-account?docs=true). My question is can other substrate based app use Polkadot-UI for connecting ledger and perform operation like Kusama and polkadot. If yes then how can I do that?&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17883" PostHistoryTypeId="1" PostId="4788" RevisionGUID="a7a7ff70-bf06-4eeb-9932-3e75cc5b9aed" CreationDate="2022-09-13T13:58:14.790" UserId="3166" Text="How did kusama and Polkadot integrated their respective ledger nano app via Polkadot ui?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17884" PostHistoryTypeId="3" PostId="4788" RevisionGUID="a7a7ff70-bf06-4eeb-9932-3e75cc5b9aed" CreationDate="2022-09-13T13:58:14.790" UserId="3166" Text="|substrate-node|polkadot-js|polkadot|kusama|ledger|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17885" PostHistoryTypeId="2" PostId="4789" RevisionGUID="0808dc7c-49e2-4e9c-bf7d-50db0593e468" CreationDate="2022-09-13T13:58:47.820" UserId="2025" Text="In [the source code where transaction mortality is defined](https://github.com/paritytech/substrate/blob/3449fb003534c0c361a92a2d1fe03abc80e4997d/primitives/runtime/src/generic/era.rs#L58), the comments say:&#xD;&#xA;&#xD;&#xA;&gt; Create a new era based on a period (which should be a power of two&#xD;&#xA;&gt; between 4 and 65536 inclusive) and a block number on which it should&#xD;&#xA;&gt; start (or, for long periods, be shortly after the start).&#xD;&#xA;&#xD;&#xA;However, the [Polkadot Wiki](https://wiki.polkadot.network/docs/build-protocol-info#transaction-mortality) states that:&#xD;&#xA;&#xD;&#xA;&gt; The transaction payload includes a block number and block hash&#xD;&#xA;&gt; checkpoint from which a transaction is valid and a validity period...&#xD;&#xA;&gt; &#xD;&#xA;&gt; ...The `BlockHashCount` parameter store on-chain is set to 2400 blocks (about&#xD;&#xA;&gt; four hours) at genesis. If the validity period is larger than the&#xD;&#xA;&gt; number of blocks stored on-chain, then the transaction will only be&#xD;&#xA;&gt; valid as long as there is a block to check it against.&#xD;&#xA;&#xD;&#xA;First, why is the period value mapped to a power of 2 for an era in a mortal transaction?&#xD;&#xA;&#xD;&#xA;Secondly, can I set a value larger than 2400 for the period of my transaction mortality?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17887" PostHistoryTypeId="1" PostId="4789" RevisionGUID="0808dc7c-49e2-4e9c-bf7d-50db0593e468" CreationDate="2022-09-13T13:58:47.820" UserId="2025" Text="Questions on transaction mortality" ContentLicense="CC BY-SA 4.0" />
  <row Id="17888" PostHistoryTypeId="3" PostId="4789" RevisionGUID="0808dc7c-49e2-4e9c-bf7d-50db0593e468" CreationDate="2022-09-13T13:58:47.820" UserId="2025" Text="|substrate-node|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17889" PostHistoryTypeId="2" PostId="4790" RevisionGUID="f7bba5db-aef9-4301-ae8e-4dafd4ccb744" CreationDate="2022-09-13T13:58:47.820" UserId="2025" Text="The reasoning behind the **first question** is basically compactness for transaction serialization. The whole mortal/immortal info fits into 2 bytes. The first being an Enum variant for *Mortal*(blocks) or *Immortal*. So immortal transactions just use one byte, whereas mortals use 2, being the second byte the mortality. The point is that 1 byte can only represent 256 values, hence the mortality is given by *2 ** (byte_value)*. And the implementation will always round to the next upper power of 2 for any input value for the period (f.e., 2500 --&gt; 4096).&#xD;&#xA;&#xD;&#xA;Moving to **the second question**, the transaction needs to reference a `BlockHash` in the state, as said by the wiki. The runtime stores a map of `BlockHash =&gt; BlockNumber` for the previous `BlockHashCount` number of blocks in a FIFO queue. `BlockHashCount` is [a system parameter](https://polkadot.js.org/docs/substrate/constants/#blockhashcount-u32) currently set to 2400 in Polkadot and Kusama. &#xD;&#xA;So with this runtime parameter, 4096 is the highest &quot;real&quot; value you can set mortality to, however it may still fail after 2400 blocks with [`AncientBirthBlock` error message](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/frame/system/src/extensions/check_mortality.rs#L79).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*(Kudos to @joepetrowski for the relevant info for this answer)*" ContentLicense="CC BY-SA 4.0" />
  <row Id="17891" PostHistoryTypeId="2" PostId="4791" RevisionGUID="fa0ff363-9d3a-4fc4-8c6e-8b10d31375d2" CreationDate="2022-09-13T14:26:51.343" UserId="74" Text="I want to leverage the Substrate peerset to build an offchain gossip protocol. This protocol will send lots of messages at the beginning of every session. Are there reasons this would be a bad idea?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17893" PostHistoryTypeId="1" PostId="4791" RevisionGUID="fa0ff363-9d3a-4fc4-8c6e-8b10d31375d2" CreationDate="2022-09-13T14:26:51.343" UserId="74" Text="Is sc_network safe to use for offchain gossip protocols?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17894" PostHistoryTypeId="3" PostId="4791" RevisionGUID="fa0ff363-9d3a-4fc4-8c6e-8b10d31375d2" CreationDate="2022-09-13T14:26:51.343" UserId="74" Text="|substrate-node|networking|gossip|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17895" PostHistoryTypeId="2" PostId="4792" RevisionGUID="2ddde51e-018a-4a3c-862f-5900263dfd2c" CreationDate="2022-09-13T14:34:35.477" UserId="2034" Text="I found the reason now, I should change the type AccountData = () to 	type AccountData = pallet_balances::AccountData&lt;Balance&gt;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17897" PostHistoryTypeId="5" PostId="4791" RevisionGUID="f315384a-ed59-419b-ad60-972f94ba7622" CreationDate="2022-09-13T15:26:27.060" UserId="74" Comment="added 271 characters in body; edited title" Text="I want to leverage the Substrate peerset to build an offchain gossip protocol. This protocol will send lots of messages at the beginning of every session. Are there reasons this would be a bad idea?&#xD;&#xA;&#xD;&#xA;We've experienced reliability issues when implementing offchain gossip protocols leveraging Substrate's networking stack specifically in a parachain environment. Does anyone know reasons why this might be? In a standalone environment our gossip system seems reliable." ContentLicense="CC BY-SA 4.0" />
  <row Id="17898" PostHistoryTypeId="4" PostId="4791" RevisionGUID="f315384a-ed59-419b-ad60-972f94ba7622" CreationDate="2022-09-13T15:26:27.060" UserId="74" Comment="added 271 characters in body; edited title" Text="Is sc_network safe to use for offchain gossip protocols in a parachain context?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17899" PostHistoryTypeId="2" PostId="4793" RevisionGUID="05cddeff-0f6f-41a2-8d32-17557c021045" CreationDate="2022-09-13T15:37:35.113" UserId="472" Text="The off-chain engine used for contract tests did not provide means for automatically moving funds along while making contract (payable) message invocation. We have fixed that now by introducing the [`pay_with_call!()`](https://paritytech.github.io/ink/ink_env/macro.pay_with_call.html) macro. " ContentLicense="CC BY-SA 4.0" />
  <row Id="17901" PostHistoryTypeId="2" PostId="4794" RevisionGUID="83382ae9-5d4c-40b0-84c1-44724c676931" CreationDate="2022-09-13T21:32:00.657" UserId="2403" Text="Trying to implement some filter/checker for «subcalls» based on `Dispatchable` trait in my pallet. I can get metadata: pallet name and function name, but I can't get the arguments values.&#xD;&#xA;&#xD;&#xA;How should I properly filter calls by argument values with my custom logic?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	...&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config&lt;I: 'static = ()&gt;: frame_system::Config {&#xD;&#xA;		...&#xD;&#xA;		type Call:&#xD;&#xA;			  Parameter&#xD;&#xA;			+ Dispatchable&lt;Origin = Self::Origin, PostInfo = PostDispatchInfo&gt;&#xD;&#xA;			+ GetDispatchInfo&#xD;&#xA;			+ GetCallMetadata&#xD;&#xA;			+ From&lt;frame_system::Call&lt;Self&gt;&gt;&#xD;&#xA;			+ UnfilteredDispatchable&lt;Origin = Self::Origin&gt;&#xD;&#xA;			+ IsType&lt;&lt;Self as frame_system::Config&gt;::Call&gt;;&#xD;&#xA;		...&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&lt;I&gt;, I: 'static&gt; Pallet&lt;T, I&gt; {&#xD;&#xA;		...&#xD;&#xA;		#[pallet::weight(xxx)]&#xD;&#xA;		pub fn submit(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			calls: Vec&lt;&lt;T as Config&lt;I&gt;&gt;::Call&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let origin_address = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// process calls one by one&#xD;&#xA;			for call in calls {&#xD;&#xA;				log::info!(&quot;&gt;&gt;&gt;&gt;&gt;&gt; {:?}&quot;, call.get_call_metadata());&#xD;&#xA;				// check arguments values?&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}" ContentLicense="CC BY-SA 4.0" />
  <row Id="17903" PostHistoryTypeId="1" PostId="4794" RevisionGUID="83382ae9-5d4c-40b0-84c1-44724c676931" CreationDate="2022-09-13T21:32:00.657" UserId="2403" Text="Dispatchable calls filter/check by arguments" ContentLicense="CC BY-SA 4.0" />
  <row Id="17904" PostHistoryTypeId="3" PostId="4794" RevisionGUID="83382ae9-5d4c-40b0-84c1-44724c676931" CreationDate="2022-09-13T21:32:00.657" UserId="2403" Text="|pallet|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17905" PostHistoryTypeId="52" PostId="4789" RevisionGUID="89a213b1-cd01-4c26-9e39-5cccc152269b" CreationDate="2022-09-13T21:59:23.857" />
  <row Id="17906" PostHistoryTypeId="5" PostId="4697" RevisionGUID="08a93dac-36cc-4172-8db4-064551d77356" CreationDate="2022-09-13T23:05:00.310" UserId="29" Comment="deleted 6 characters in body" Text="We are hosting some parachain full nodes on the cloud. However we found that 80% of the costs come from the internet traffic, and specifically, we found that the outbound traffic of the relaychain client has been skyrocketing. We noticed that it's possible to limit `--out-peers` in substrate, but even a few peers can still create huge traffic (e.g. new client downloading the blocks).&#xD;&#xA;&#xD;&#xA;Is it possible to limit the outbound traffic bandwidth rate in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17907" PostHistoryTypeId="2" PostId="4795" RevisionGUID="ce60d0fb-12f2-4c83-bec2-abbe0a8f3156" CreationDate="2022-09-14T01:09:11.683" UserId="29" Text="You can subscribe without `multi` as well. For example:&#xD;&#xA;```js&#xD;&#xA;await api.query.system.events(events =&gt;&#xD;&#xA;    events.forEach(({event}) =&gt; console.log(event.toHuman())))&#xD;&#xA;```&#xD;&#xA;- https://polkadot.js.org/docs/api/start/api.query.subs#subscriptions&#xD;&#xA;&#xD;&#xA;Perhaps this is what you are looking for:&#xD;&#xA;```js&#xD;&#xA;await api.query.session.validators(validators =&gt; &#xD;&#xA;    console.table(validators.map(validator =&gt; validator.toHuman())))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17909" PostHistoryTypeId="2" PostId="4796" RevisionGUID="9dfebe71-c086-4e73-91f0-2a8650b33a7b" CreationDate="2022-09-14T01:20:16.327" UserId="3130" Text="We had a [temporary slot with para_id `3026`](https://github.com/paritytech/subport/issues/357) previously and wanted to request for long-term slot (now that we have launched on Kusama) with the matching `2119`.&#xD;&#xA;&#xD;&#xA;We thought the procedure is to:&#xD;&#xA;- generate new chain spec with `&quot;para_id&quot;: 2119`&#xD;&#xA;- redeploy bootnode and collators&#xD;&#xA;- update `para_id` on [polkadot-js/apps](https://github.com/polkadot-js/apps)&#xD;&#xA;- request for long-term slot on [paritytech/subport](https://github.com/paritytech/subport)&#xD;&#xA;&#xD;&#xA;Our collators ran into this error after chain spec update:&#xD;&#xA;```&#xD;&#xA;Bootnode with peer id 12D.... is on a different chain (our genesis: ... theirs: ...)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Are we missing something or is there a different approach to this? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="17911" PostHistoryTypeId="1" PostId="4796" RevisionGUID="9dfebe71-c086-4e73-91f0-2a8650b33a7b" CreationDate="2022-09-14T01:20:16.327" UserId="3130" Text="Migrating from short-term to long-term slot on Rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="17912" PostHistoryTypeId="3" PostId="4796" RevisionGUID="9dfebe71-c086-4e73-91f0-2a8650b33a7b" CreationDate="2022-09-14T01:20:16.327" UserId="3130" Text="|rococo|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17913" PostHistoryTypeId="2" PostId="4797" RevisionGUID="04844c65-ab69-4d38-b689-655bcfb2810b" CreationDate="2022-09-14T02:03:35.143" UserId="251" Text="I think your bootnodes are still running in the old version.&#xD;&#xA;&#xD;&#xA;So, when the new nodes connect to the bootnodes, they will report 'different genesis'.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You could:&#xD;&#xA;- stop 3026 and update all nodes to 2119&#xD;&#xA;- remove the old bootnodes from your new spec file and add some new bootnodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="17915" PostHistoryTypeId="2" PostId="4798" RevisionGUID="08500107-7760-456f-b8ab-3cc44382faf4" CreationDate="2022-09-14T03:47:43.510" UserId="3109" Text="Any one here who can tell me step by step how to&#xD;&#xA;&#xD;&#xA;run **smoldot light client** and in which environment(ubuntu Linux , Windows) and what are the pre-requisite to run a light client ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17917" PostHistoryTypeId="1" PostId="4798" RevisionGUID="08500107-7760-456f-b8ab-3cc44382faf4" CreationDate="2022-09-14T03:47:43.510" UserId="3109" Text="Run Smoldot Light Client" ContentLicense="CC BY-SA 4.0" />
  <row Id="17918" PostHistoryTypeId="3" PostId="4798" RevisionGUID="08500107-7760-456f-b8ab-3cc44382faf4" CreationDate="2022-09-14T03:47:43.510" UserId="3109" Text="|runtime|evm|light-client|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17919" PostHistoryTypeId="2" PostId="4799" RevisionGUID="2f62fbce-9305-4cf0-9670-5364c4411fdc" CreationDate="2022-09-14T03:58:45.287" UserId="2986" Text="This there a way to preflight/preview a transaction before the actual signAndSend?&#xD;&#xA;&#xD;&#xA;I would like to know if a transaction would fail before letting user submit the transaction and prevent user losing gas.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="17921" PostHistoryTypeId="1" PostId="4799" RevisionGUID="2f62fbce-9305-4cf0-9670-5364c4411fdc" CreationDate="2022-09-14T03:58:45.287" UserId="2986" Text="How to preflight / preview a transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17922" PostHistoryTypeId="3" PostId="4799" RevisionGUID="2f62fbce-9305-4cf0-9670-5364c4411fdc" CreationDate="2022-09-14T03:58:45.287" UserId="2986" Text="|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17923" PostHistoryTypeId="5" PostId="4799" RevisionGUID="80bec0e1-f3a5-471b-bbe2-ba167aaae0da" CreationDate="2022-09-14T04:11:03.583" UserId="393" Comment="typo and more background" Text="Is there a way to preflight/preview a transaction before the actual signAndSend?&#xD;&#xA;&#xD;&#xA;I would like to know if a transaction would fail before letting user submit the transaction and prevent user losing gas.&#xD;&#xA;&#xD;&#xA;I guess polkadot.js has this kind of function, but nothing find in the doc.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="17924" PostHistoryTypeId="24" PostId="4799" RevisionGUID="80bec0e1-f3a5-471b-bbe2-ba167aaae0da" CreationDate="2022-09-14T04:11:03.583" Comment="Proposed by 393 approved by 2986 edit id of 281" ContentLicense="CC BY-SA 4.0" />
  <row Id="17925" PostHistoryTypeId="2" PostId="4800" RevisionGUID="6983acec-6458-416b-bc2e-b5413df21357" CreationDate="2022-09-14T04:27:19.067" UserId="2752" Text="I want to call a payable method using the polkadot API.&#xD;&#xA;&#xD;&#xA;if the method would not be payable it would look like this:&#xD;&#xA;&#xD;&#xA;    const { gasRequired, storageDeposit, result, output } = await contract.query&#xD;&#xA;                .method(&#xD;&#xA;                    fromAccount,&#xD;&#xA;                    {&#xD;&#xA;                        gasLimit,&#xD;&#xA;                        storageDepositLimit&#xD;&#xA;                    },&#xD;&#xA;                    toAccount,&#xD;&#xA;                    input,&#xD;&#xA;                    input2&#xD;&#xA;                )&#xD;&#xA;&#xD;&#xA;But how could I transfer a certain amount of native chain tokens when calling this method?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17927" PostHistoryTypeId="1" PostId="4800" RevisionGUID="6983acec-6458-416b-bc2e-b5413df21357" CreationDate="2022-09-14T04:27:19.067" UserId="2752" Text="How to call payable methods with the polkadot API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17928" PostHistoryTypeId="3" PostId="4800" RevisionGUID="6983acec-6458-416b-bc2e-b5413df21357" CreationDate="2022-09-14T04:27:19.067" UserId="2752" Text="|polkadot|ink|smart-contract|rust|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17929" PostHistoryTypeId="2" PostId="4801" RevisionGUID="c1c404fc-98e5-4af8-90c1-ceb6ac28ed02" CreationDate="2022-09-14T07:07:18.257" UserId="2663" Text="For example if I call a function from a custom pallet that set a random number on chain this elaboration is done by a single node or by the entire network with some sort of virtualization?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17931" PostHistoryTypeId="1" PostId="4801" RevisionGUID="c1c404fc-98e5-4af8-90c1-ceb6ac28ed02" CreationDate="2022-09-14T07:07:18.257" UserId="2663" Text="What happen under the hood when I call an extrinsic function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17932" PostHistoryTypeId="3" PostId="4801" RevisionGUID="c1c404fc-98e5-4af8-90c1-ceb6ac28ed02" CreationDate="2022-09-14T07:07:18.257" UserId="2663" Text="|runtime|architecture|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17933" PostHistoryTypeId="5" PostId="4737" RevisionGUID="42636488-449f-4d26-a6ea-5ce0b2ef15dc" CreationDate="2022-09-14T07:35:12.713" UserId="234" Comment="Changing `asMultiThrshold1` to `asMultiThreshold1`" Text="### Aim&#xD;&#xA;&#xD;&#xA;I would like to use the `asMultiThreshold1` extrinsic in the Extrinsic Tab to produce a multi-sig call to authorise a balance transfer from the multi-sig account `ABC` (made by Alice, Bob and Charlie) to the account `Stash 2`.&#xD;&#xA;&#xD;&#xA;### What I tried&#xD;&#xA;&#xD;&#xA;I used Alice's account to dispatch the multi-sig call&#xD;&#xA;&#xD;&#xA;![enter image description here](https://i.stack.imgur.com/s0D2K.png)&#xD;&#xA;&#xD;&#xA;This resulted in the following error:&#xD;&#xA;&#xD;&#xA;![enter image description here](https://i.stack.imgur.com/l5zqv.png)&#xD;&#xA;&#xD;&#xA;Such error can be viewed [here](https://westend.subscan.io/extrinsic/12533740-2). I have enough balance to do such operation, I do not understand why the UI is saying the opposite.&#xD;&#xA;&#xD;&#xA;### What is unclear to me&#xD;&#xA;&#xD;&#xA;As far as I understood the `asMultiThreshold1` option is used when only one approval is needed. To me it is unclear why I would need a multi-sig account with only one approval. Also, the UI does not let me to generate one as the minimum threshold I can choose is 2. " ContentLicense="CC BY-SA 4.0" />
  <row Id="17934" PostHistoryTypeId="4" PostId="4737" RevisionGUID="42636488-449f-4d26-a6ea-5ce0b2ef15dc" CreationDate="2022-09-14T07:35:12.713" UserId="234" Comment="Changing `asMultiThrshold1` to `asMultiThreshold1`" Text="How to use `asMultiThreshold1` within the multisig pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="17935" PostHistoryTypeId="24" PostId="4737" RevisionGUID="42636488-449f-4d26-a6ea-5ce0b2ef15dc" CreationDate="2022-09-14T07:35:12.713" Comment="Proposed by 234 approved by 2977 edit id of 280" ContentLicense="CC BY-SA 4.0" />
  <row Id="17936" PostHistoryTypeId="2" PostId="4802" RevisionGUID="aa8b8516-2d71-4750-80ab-c5e074b85094" CreationDate="2022-09-14T08:00:26.387" UserId="406" Text="I set up the private network of 8/10, everything is working fine, all the validators validate the blocks but after the an era I am facing an issue that the **staking.StakingElectionFailed. The election failed. No new era is planned.** &#xD;&#xA;I don't know how to fix this. I followed this link &#xD;&#xA; https://github.com/polkadot-js/apps/issues/7607#issuecomment-1129752912 &#xD;&#xA; and also followed other link to purge the chain but still facing this issue that the era time is not completing. I have many scenario in which I am facing the same issue of era completion 8/10 private network is one of them.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;After this I again the setup the private network of 10/10 and this time everything is working fine but i want to know that why there is era time completion issue when i setup the 8/10 private network &#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/C4aL2.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17938" PostHistoryTypeId="1" PostId="4802" RevisionGUID="aa8b8516-2d71-4750-80ab-c5e074b85094" CreationDate="2022-09-14T08:00:26.387" UserId="406" Text="The election failed. No new era is planned" ContentLicense="CC BY-SA 4.0" />
  <row Id="17939" PostHistoryTypeId="3" PostId="4802" RevisionGUID="aa8b8516-2d71-4750-80ab-c5e074b85094" CreationDate="2022-09-14T08:00:26.387" UserId="406" Text="|substrate-node|polkadot|substrate-node-template|kusama|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17940" PostHistoryTypeId="2" PostId="4803" RevisionGUID="964139d9-71fc-4fae-9eeb-ad7ced1ebd7c" CreationDate="2022-09-14T08:15:19.923" UserId="2484" Text="Hey Substrate community,&#xD;&#xA;&#xD;&#xA;there are two different methods to remove multiple items for one specific first key from a `StorageDoubleMap`. There is [`clear_prefix`](https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageDoubleMap.html#method.clear_prefix) and [`drain_prefix`](https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageDoubleMap.html#method.drain_prefix). `clear_prefix` provides additional information with a cursor, that needs to be used for the case, that the map is not fully cleaned. But isn't `drain_prefix` the same functionality with less information as `clear_prefix`?&#xD;&#xA;&#xD;&#xA;So I mean I can check with `drain_prefix`, if there are items left to delete. I could query `if &lt;StorageItem&lt;T&gt;&gt;::drain_prefix(first_key).take(1).next().is_none()`. Sure, this requires one additional read. Is this the reason why `clear_prefix` exists too? " ContentLicense="CC BY-SA 4.0" />
  <row Id="17942" PostHistoryTypeId="1" PostId="4803" RevisionGUID="964139d9-71fc-4fae-9eeb-ad7ced1ebd7c" CreationDate="2022-09-14T08:15:19.923" UserId="2484" Text="When to use StorageDoubleMap `clear_prefix` vs `drain_prefix`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17943" PostHistoryTypeId="3" PostId="4803" RevisionGUID="964139d9-71fc-4fae-9eeb-ad7ced1ebd7c" CreationDate="2022-09-14T08:15:19.923" UserId="2484" Text="|storage|map|cleanup|remove-all|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17944" PostHistoryTypeId="2" PostId="4804" RevisionGUID="f8fa0ef0-dc6b-4de4-9fe0-508969442149" CreationDate="2022-09-14T08:59:57.990" UserId="529" Text="You need to add `{ value: valueToBeSent }` as the last argument in the `method`&#xD;&#xA;```&#xD;&#xA;.method( arg1, arg2, { value: valueToBeSent })&#xD;&#xA;```&#xD;&#xA;This is how it works for `tx` call:&#xD;&#xA;```&#xD;&#xA;await contract.connect(owner).tx.createCollection(collectionMetadata, collectionMax, collectionSymbol, { value: reserveValue });&#xD;&#xA;```&#xD;&#xA;Check also if your `query` call method is payable. Most likely there is no charge for query." ContentLicense="CC BY-SA 4.0" />
  <row Id="17946" PostHistoryTypeId="2" PostId="4805" RevisionGUID="76cb345c-6c80-40e1-8512-72a3a1e63918" CreationDate="2022-09-14T09:40:49.583" UserId="485" Text="How do i query over rpc the maximum weight for normal extrinsics as defined in frame_system here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/system/src/limits.rs#L99-L122" ContentLicense="CC BY-SA 4.0" />
  <row Id="17948" PostHistoryTypeId="1" PostId="4805" RevisionGUID="76cb345c-6c80-40e1-8512-72a3a1e63918" CreationDate="2022-09-14T09:40:49.583" UserId="485" Text="How to query the max extrinsic weight over rpc?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17949" PostHistoryTypeId="3" PostId="4805" RevisionGUID="76cb345c-6c80-40e1-8512-72a3a1e63918" CreationDate="2022-09-14T09:40:49.583" UserId="485" Text="|transactions|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17954" PostHistoryTypeId="2" PostId="4807" RevisionGUID="62dfa9bd-8239-4c6e-8ec4-38212a08e11f" CreationDate="2022-09-14T09:54:34.493" UserId="251" Text="1. use `state_getMetadata`&#xD;&#xA;  ```&#xD;&#xA;  curl -X POST -H 'Content-Type:application/json' https://rpc.polkadot.io -d '{&quot;id&quot;:0,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_getMetadata&quot;,&quot;params&quot;:[]}'&#xD;&#xA;  ```&#xD;&#xA;2. find the `frame system constants` part&#xD;&#xA;  ```&#xD;&#xA;  constants: [&#xD;&#xA;  	{&#xD;&#xA;  		name: BlockWeights&#xD;&#xA;  		type: 161&#xD;&#xA;  		value: 0x5872d25c0100000000204aa9d1010000603b14050000000001a094cb9158010000010098f73e5d010000010000000000000000603b14050000000001a01c1efccc0100000100204aa9d1010000010088526a74000000603b140500000000000000&#xD;&#xA;  		docs: [&#xD;&#xA;  			Block &amp; extrinsics weights: base values and limits.&#xD;&#xA;  		]&#xD;&#xA;  	}&#xD;&#xA;  ]&#xD;&#xA;  ```&#xD;&#xA;3. decode the `value`&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;That's how PolkadotApps do.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/I1ZLe.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17956" PostHistoryTypeId="5" PostId="4807" RevisionGUID="702ec97c-9856-4ed9-96dc-24a6a3deba20" CreationDate="2022-09-14T09:59:58.433" UserId="251" Comment="added 141 characters in body" Text="1. use `state_getMetadata`&#xD;&#xA;  ```sh&#xD;&#xA;  curl -X POST -H 'Content-Type:application/json' https://rpc.polkadot.io -d '{&quot;id&quot;:0,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_getMetadata&quot;,&quot;params&quot;:[]}'&#xD;&#xA;  ```&#xD;&#xA;2. find the `frame system constants` part&#xD;&#xA;  ```json&#xD;&#xA;  constants: [&#xD;&#xA;  	{&#xD;&#xA;  		name: BlockWeights&#xD;&#xA;  		type: 161&#xD;&#xA;  		value: 0x5872d25c0100000000204aa9d1010000603b14050000000001a094cb9158010000010098f73e5d010000010000000000000000603b14050000000001a01c1efccc0100000100204aa9d1010000010088526a74000000603b140500000000000000&#xD;&#xA;  		docs: [&#xD;&#xA;  			Block &amp; extrinsics weights: base values and limits.&#xD;&#xA;  		]&#xD;&#xA;  	}&#xD;&#xA;  ]&#xD;&#xA;  ```&#xD;&#xA;3. decode the `value`&#xD;&#xA;  ```rust&#xD;&#xA;  parity_scale_codec::Decode::decode::&lt;FrameSystemLimitsBlockWeights&gt;(&amp;mut &amp;*array_bytes::hex2bytes_unchecked(value)).unwrap();&#xD;&#xA;  ```&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;That's how PolkadotApps do.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/I1ZLe.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17957" PostHistoryTypeId="2" PostId="4808" RevisionGUID="d2d817e9-92e0-4bba-a1e4-ad0eff488c0f" CreationDate="2022-09-14T10:10:31.337" UserId="251" Text="Check the PolkadotJS [algorithm](https://github.com/polkadot-js/api/blob/master/packages/api-derive/src/session/progress.ts#L31).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;info.currentIndex.sub(activeEraStartSessionIndex).imul(info.sessionLength).iadd(sessionProgress);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Due to the election failure. [`ErasStartSessionIndex`](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/frame/staking/src/pallet/impls.rs#L417) won't be updated. So, the PolkadotApps get a rediculous big number.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You could check your log:&#xD;&#xA;```&#xD;&#xA;journalctl -u darwinia-node.service | grep &quot;election provider failed&quot;&#xD;&#xA;Sep 08 06:32:18 pangoro-g1 drml[136952]: 2022-09-08 06:32:18 [14058]  election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I guess you encounter the same error as me.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;To solve this, you just need to change the [`FallBack`](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/bin/node/runtime/src/lib.rs#L713) to `frame_election_provider_support::onchain::OnChainSequentialPhragmen&lt;Runtime&gt;`. I guess you have set it to `NoFallBack` before.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3A3og.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17959" PostHistoryTypeId="5" PostId="4808" RevisionGUID="8c968d9b-a2ac-456e-8148-368cb484c881" CreationDate="2022-09-14T10:18:42.007" UserId="251" Comment="added 318 characters in body" Text="Check the PolkadotJS [algorithm](https://github.com/polkadot-js/api/blob/master/packages/api-derive/src/session/progress.ts#L31).&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;info.currentIndex.sub(activeEraStartSessionIndex).imul(info.sessionLength).iadd(sessionProgress);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Due to the election failure. [`ErasStartSessionIndex`](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/frame/staking/src/pallet/impls.rs#L417) won't be updated. So, the PolkadotApps get a ridiculously big number.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You could check your log:&#xD;&#xA;```sh&#xD;&#xA;journalctl -u darwinia-node.service | grep &quot;election provider failed&quot;&#xD;&#xA;Sep 08 06:32:18 pangoro-g1 drml[136952]: 2022-09-08 06:32:18 [14058]  election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I guess you encounter the same error as me.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;To solve this, you just need to change the [`Fallback`](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/bin/node/runtime/src/lib.rs#L713) to `frame_election_provider_support::onchain::OnChainSequentialPhragmen&lt;Runtime&gt;`. I guess you have set it to `NoFallback` before.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Because your validator set is pretty small, on-chain computation is totally fine.&#xD;&#xA;&#xD;&#xA;You could also check the [elect algorithm](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/frame/election-provider-multi-phase/src/lib.rs#L1548). To find out how to work with `NoFallback`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3A3og.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="17961" PostHistoryTypeId="2" PostId="4809" RevisionGUID="8a41f8af-c7e4-49ca-86ec-daf7860ee7b9" CreationDate="2022-09-14T10:26:06.020" UserId="251" Text="The main difference to me is if it returns a closure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you just want to remove it:&#xD;&#xA;```rust&#xD;&#xA;Foo::clear_prefix();&#xD;&#xA;```&#xD;&#xA;&lt;sup&gt;Note: these are pseudo code&lt;/sup&gt;&#xD;&#xA;&#xD;&#xA;When you want to interact with the removed item:&#xD;&#xA;```rust&#xD;&#xA;Foo::darin_prefix().iter().for_each(|removed_item| {&#xD;&#xA;    Bar::insert(removed_item);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&lt;sup&gt;Note: these are pseudo code&lt;/sup&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17963" PostHistoryTypeId="5" PostId="4785" RevisionGUID="3b8af432-2a50-421f-9c90-957ce6d1dccb" CreationDate="2022-09-14T10:33:33.857" UserId="251" Comment="added 4 characters in body" Text="&lt;https://docs.substrate.io/tutorials/smart-contracts/prepare-your-first-contract/&gt;&#xD;&#xA;&#xD;&#xA;Hi, I'm working on the above tutorial and after running the `cargo +nightly test` command, I see the following error.&#xD;&#xA;```rust&#xD;&#xA;error[E0158]: associated consts cannot be referenced in patterns&#xD;&#xA;  --&gt; flipper/lib.rs:9:5&#xD;&#xA;   |&#xD;&#xA;9  | /     pub struct Flipper {&#xD;&#xA;10 | |         value: bool,&#xD;&#xA;11 | |     }&#xD;&#xA;   | |_____^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Nothing has been changed from the source code here. What is a workaround for this please?&#xD;&#xA;&#xD;&#xA;&lt;https://github.com/paritytech/ink/blob/master/examples/flipper/lib.rs&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17964" PostHistoryTypeId="2" PostId="4810" RevisionGUID="f70fac37-db92-4731-96b6-ec5827ed6d41" CreationDate="2022-09-14T10:35:20.463" UserId="2307" Text="I'm following instructions in substrate document. I build contract flipper and get this error:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OdSQj.png&#xD;&#xA;&#xD;&#xA;How can I fix this error? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="17966" PostHistoryTypeId="1" PostId="4810" RevisionGUID="f70fac37-db92-4731-96b6-ec5827ed6d41" CreationDate="2022-09-14T10:35:20.463" UserId="2307" Text="Contract flipper build fails" ContentLicense="CC BY-SA 4.0" />
  <row Id="17967" PostHistoryTypeId="3" PostId="4810" RevisionGUID="f70fac37-db92-4731-96b6-ec5827ed6d41" CreationDate="2022-09-14T10:35:20.463" UserId="2307" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17968" PostHistoryTypeId="5" PostId="4809" RevisionGUID="cff3474b-21a3-4db0-a959-73049e4f5fd7" CreationDate="2022-09-14T10:40:49.410" UserId="251" Comment="added 7 characters in body" Text="The main difference to me is if it returns a closure.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you just want to remove it:&#xD;&#xA;```rust&#xD;&#xA;Foo::clear_prefix();&#xD;&#xA;```&#xD;&#xA;&lt;sup&gt;Note: these are pseudo code&lt;/sup&gt;&#xD;&#xA;&#xD;&#xA;When you want to interact with the removed item:&#xD;&#xA;```rust&#xD;&#xA;Foo::darin_prefix().iter().for_each(|removed_item| {&#xD;&#xA;    Bar::insert(removed_item.hash(), removed_item);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&lt;sup&gt;Note: these are pseudo code&lt;/sup&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17969" PostHistoryTypeId="50" PostId="4276" RevisionGUID="6847daec-0dcf-435e-bf76-2e5a5cbe0904" CreationDate="2022-09-14T12:01:00.173" UserId="-1" />
  <row Id="17970" PostHistoryTypeId="52" PostId="4800" RevisionGUID="c6c2bbce-884c-403e-bad8-4ff71621010e" CreationDate="2022-09-14T12:29:59.317" />
  <row Id="17973" PostHistoryTypeId="50" PostId="4271" RevisionGUID="07e58795-206c-47a6-898a-6498530e6042" CreationDate="2022-09-14T13:08:00.893" UserId="-1" />
  <row Id="17974" PostHistoryTypeId="2" PostId="4811" RevisionGUID="2c0ab82c-5fff-4283-a44c-ea08f43264af" CreationDate="2022-09-14T13:25:54.277" UserId="3127" Text="A great way to start with the Frontier node is the [Substrate tutorial][1] and it uses the template from the substrate developer hub. Verified today that it works well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts/" ContentLicense="CC BY-SA 4.0" />
  <row Id="17976" PostHistoryTypeId="6" PostId="4785" RevisionGUID="64a99b96-9201-4300-98c9-014b9d224c40" CreationDate="2022-09-14T14:09:54.133" UserId="529" Comment="added tag ink" Text="|substrate-node|ink|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17977" PostHistoryTypeId="24" PostId="4785" RevisionGUID="64a99b96-9201-4300-98c9-014b9d224c40" CreationDate="2022-09-14T14:09:54.133" Comment="Proposed by 529 approved by 29 edit id of 282" ContentLicense="CC BY-SA 4.0" />
  <row Id="17978" PostHistoryTypeId="2" PostId="4812" RevisionGUID="f1f0303b-7af2-4665-9645-aa75c005066a" CreationDate="2022-09-14T14:20:29.027" UserId="29" Text="There is detailed information on the transaction lifecycle here:&#xD;&#xA;- https://docs.substrate.io/fundamentals/transaction-lifecycle&#xD;&#xA;&#xD;&#xA;Video:&#xD;&#xA;- https://www.youtube.com/watch?v=3pfM0GOp02c" ContentLicense="CC BY-SA 4.0" />
  <row Id="17980" PostHistoryTypeId="5" PostId="4775" RevisionGUID="65bf1e43-5ec4-4362-b259-35906e5c4a63" CreationDate="2022-09-14T15:06:55.580" UserId="94" Comment="deleted 1 character in body" Text="To make your life easier, you can use the expansions that `genesis_config` already provides. It does solve your problem and makes the code easier.  &#xD;&#xA;So you could opt for deleting the `InitialSync` struct, or just not using it in the Genesis config.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;	pub initial_sync: BoundedVec&lt;sp_core::H256, T::MaxProofBranchSize&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Otherwise you have to re-do what the `genesis_config` macro does for you.  &#xD;&#xA;The struct then becomes:  &#xD;&#xA;```rust&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(serde::Serialize, serde::Deserialize))]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;	feature = &quot;std&quot;,&#xD;&#xA;	serde(&#xD;&#xA;		rename_all = &quot;camelCase&quot;,&#xD;&#xA;		deny_unknown_fields,&#xD;&#xA;		bound(serialize = &quot;&quot;),&#xD;&#xA;		bound(deserialize = &quot;&quot;)&#xD;&#xA;	)&#xD;&#xA;)]&#xD;&#xA;// Dont know if the other derives that you added here are actually&#xD;&#xA;// needed for a genesis config.&#xD;&#xA;pub struct InitialSync&lt;ProofSize: Get&lt;u32&gt;&gt; {&#xD;&#xA;    pub current_sync_committee_branch: BoundedVec&lt;H256, ProofSize&gt;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17981" PostHistoryTypeId="5" PostId="3475" RevisionGUID="ece2de32-6a00-4d19-9b07-769788e25a32" CreationDate="2022-09-14T16:06:32.273" UserId="2025" Comment="improve readability" Text="In the documentation [api.query.childBounties.childBounties](https://polkadot.js.org/docs/substrate/storage#childbountiesu32-u32-optionpalletchildbountieschildbounty) takes two u32 arguments:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Z35Iu.png&#xD;&#xA;&#xD;&#xA;But it is not clear what are those arguments. Can someone tell me how to map polkadot js api to substrate rust code so these lookups can be checked." ContentLicense="CC BY-SA 4.0" />
  <row Id="17982" PostHistoryTypeId="6" PostId="3475" RevisionGUID="ece2de32-6a00-4d19-9b07-769788e25a32" CreationDate="2022-09-14T16:06:32.273" UserId="2025" Comment="improve readability" Text="|polkadot|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17983" PostHistoryTypeId="24" PostId="3475" RevisionGUID="ece2de32-6a00-4d19-9b07-769788e25a32" CreationDate="2022-09-14T16:06:32.273" Comment="Proposed by 2025 approved by 34 edit id of 278" ContentLicense="CC BY-SA 4.0" />
  <row Id="17984" PostHistoryTypeId="5" PostId="4109" RevisionGUID="76faa2cd-5ebb-4a16-abad-d46e940ffdab" CreationDate="2022-09-14T16:06:56.077" UserId="2025" Comment="fix doc link" Text="I'm trying to use this code to start a parachain (from [this tutorial](https://docs.substrate.io/tutorials/connect-other-chains/connect-a-local-parachain/)):&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-collator \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain &lt;relay chain raw chain spec&gt; \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, I'm not sure what I should specify for the `relay chain raw chain spec`. I know where my parachain spec is (`rococo-local-parachain-2000-raw.json`), but for the relay chain I don't know.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17985" PostHistoryTypeId="24" PostId="4109" RevisionGUID="76faa2cd-5ebb-4a16-abad-d46e940ffdab" CreationDate="2022-09-14T16:06:56.077" Comment="Proposed by 2025 approved by 34 edit id of 279" ContentLicense="CC BY-SA 4.0" />
  <row Id="17986" PostHistoryTypeId="2" PostId="4813" RevisionGUID="86b3acfe-682c-4683-a155-0884a0ac63f4" CreationDate="2022-09-14T17:20:25.337" UserId="2355" Text="Imagine i have a on_initialize hook like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	    fn on_initialize(n: T::BlockNumber) -&gt; Weight {&#xD;&#xA;            return T::DbWeight::get().writes(1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'd like a test that can verify the hook, something like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;	#[test]&#xD;&#xA;	fn valid_weights() {&#xD;&#xA;		new_test_ext().execute_with(|| {&#xD;&#xA;			assert_eq!(&#xD;&#xA;                &lt;MyPallet as OnInitialize&lt;u64&gt;&gt;::on_initialize(1),&#xD;&#xA;			    &lt;TestRuntime as sp_weights&gt;::DbWeight::get().writes(2) //&lt;-- sp_weight is unknown&#xD;&#xA;			);&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;/!\ i use substrate branch `polkadot-v0.9.22`, where sp_weight is not available as a package, so i cant import it&#xD;&#xA;&#xD;&#xA;he problem is... that i cant find a way to do it. I couldn't find a way to use something like `Test::DbWeight::get().writes(1)`, the closest i could get was this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;	&lt;&lt;TestRuntime as frame_system::Config&gt;::DbWeight&gt;::get().reads(1)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but i get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   type annotations needed&#xD;&#xA;   cannot infer type for type parameter `T` declared on the trait `Get`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17988" PostHistoryTypeId="1" PostId="4813" RevisionGUID="86b3acfe-682c-4683-a155-0884a0ac63f4" CreationDate="2022-09-14T17:20:25.337" UserId="2355" Text="Test hooks weights using dbWeights" ContentLicense="CC BY-SA 4.0" />
  <row Id="17989" PostHistoryTypeId="3" PostId="4813" RevisionGUID="86b3acfe-682c-4683-a155-0884a0ac63f4" CreationDate="2022-09-14T17:20:25.337" UserId="2355" Text="|weight|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="17990" PostHistoryTypeId="52" PostId="4805" RevisionGUID="b514ee03-910e-4654-ac25-7590ba73d77a" CreationDate="2022-09-14T17:41:10.233" />
  <row Id="17991" PostHistoryTypeId="2" PostId="4814" RevisionGUID="20ca6738-e991-460a-b88c-6ff82dd61fb0" CreationDate="2022-09-14T17:47:57.273" UserId="94" Text="You are very close, but the `sp_weights` is not needed.  &#xD;&#xA;I think in your case the Rust compiler is just being annoying.  &#xD;&#xA;You can write it more explicit like this  to help the type-interference understand what you want:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn valid_weights() {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_support::weights::RuntimeDbWeight;&#xD;&#xA;&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		let db_weights: RuntimeDbWeight = &lt;TestRuntime as frame_system::Config&gt;::DbWeight::get();&#xD;&#xA;&#xD;&#xA;		assert_eq!(&#xD;&#xA;			MyPallet::on_initialize(1),&#xD;&#xA;			db_weights.writes(2)&#xD;&#xA;		);&#xD;&#xA;	})&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="17993" PostHistoryTypeId="2" PostId="4815" RevisionGUID="73f76d5a-3e6c-4d8e-a7e4-2a25f50f8b99" CreationDate="2022-09-14T18:21:11.243" UserId="167" Text="You can use the [`DryRun` RPC method](https://polkadot.js.org/docs/substrate/rpc#dryrunextrinsic-bytes-at-blockhash-applyextrinsicresult) to check the outcome of the transaction.&#xD;&#xA;&#xD;&#xA;[Here](&#xD;&#xA;https://github.com/paritytech/polkadot-scripts/blob/7fd155ce22f3d5702be197544281c2c6a988428b/src/helpers/rpc.ts#L55-L59) is an example: &#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;export async function dryRun(api: ApiPromise, signer: KeyringPair, tx: SubmittableExtrinsic&lt;&quot;promise&quot;, ISubmittableResult&gt;): Promise&lt;[boolean, ApplyExtrinsicResult]&gt; {&#xD;&#xA;	const signed = await tx.signAsync(signer);&#xD;&#xA;	const dryRun = await api.rpc.system.dryRun(signed.toHex());&#xD;&#xA;	return [dryRun.isOk &amp;&amp; dryRun.asOk.isOk, dryRun]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note that this RPC is marked as `unsafe`, most public nodes will not expose this and you might need to run your own local node in order to be able to call this. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="17997" PostHistoryTypeId="2" PostId="4816" RevisionGUID="2caf92bf-23a1-47b0-95cc-a41c044b6593" CreationDate="2022-09-14T19:47:20.097" UserId="3174" Text="I currently have a local relay chain with 4 validators and 2 collator nodes from 2 different parachains running. **I want to connect another node that is out of network** to one of the parachains. Is this possible? I'm pretty new to networking but it seems like it should be, given I set the right configuration for my ports.&#xD;&#xA;&#xD;&#xA;I already have set the --ws-external and --rpc-external flags on my relay chain and parachain nodes. Would it be possible to connect and register the node form the other parachain if I just reference the public IP of the local machine? Or is it more complicated than this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="17999" PostHistoryTypeId="1" PostId="4816" RevisionGUID="2caf92bf-23a1-47b0-95cc-a41c044b6593" CreationDate="2022-09-14T19:47:20.097" UserId="3174" Text="Connect external-network node to local-network relay chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="18000" PostHistoryTypeId="3" PostId="4816" RevisionGUID="2caf92bf-23a1-47b0-95cc-a41c044b6593" CreationDate="2022-09-14T19:47:20.097" UserId="3174" Text="|substrate-node|private-network|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18001" PostHistoryTypeId="6" PostId="4816" RevisionGUID="50413a7d-bd1e-405c-b979-596f5f22ebbb" CreationDate="2022-09-14T19:47:44.550" UserId="3174" Comment="edited tags" Text="|substrate-node|networking|private-network|rococo-local|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18002" PostHistoryTypeId="4" PostId="4816" RevisionGUID="8ae055de-7183-4ba2-8750-e01363fe417a" CreationDate="2022-09-14T19:49:05.257" UserId="3174" Comment="edited title" Text="Connect external-parachain node to local-network relay chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="18003" PostHistoryTypeId="4" PostId="4816" RevisionGUID="6893a55f-88f2-42bc-973f-0e6be0c8929e" CreationDate="2022-09-14T19:49:23.680" UserId="3174" Comment="edited title" Text="Connect external parachain node to local network relay chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="18004" PostHistoryTypeId="5" PostId="4808" RevisionGUID="1ce75cea-ab3b-46fd-85a8-032e884c6196" CreationDate="2022-09-15T01:49:48.237" UserId="251" Comment="added 713 characters in body" Text="### Why&#xD;&#xA;&#xD;&#xA;Check the PolkadotJS [algorithm](https://github.com/polkadot-js/api/blob/master/packages/api-derive/src/session/progress.ts#L31).&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;info.currentIndex.sub(activeEraStartSessionIndex).imul(info.sessionLength).iadd(sessionProgress);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Due to the election failure. [`ErasStartSessionIndex`](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/frame/staking/src/pallet/impls.rs#L417) won't be updated. So, the PolkadotApps get a ridiculously big number.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You could check your log:&#xD;&#xA;```sh&#xD;&#xA;journalctl -u darwinia-node.service | grep &quot;election provider failed&quot;&#xD;&#xA;Sep 08 06:32:18 pangoro-g1 drml[136952]: 2022-09-08 06:32:18 [14058]  election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I guess you encounter the same error as me.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;### The easiest way to fix&#xD;&#xA;To solve this, you just need to change the [`Fallback`](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/bin/node/runtime/src/lib.rs#L713) to `frame_election_provider_support::onchain::OnChainSequentialPhragmen&lt;Runtime&gt;`. I guess you have set it to `NoFallback` before.&#xD;&#xA;&#xD;&#xA;Because your validator set is pretty small, on-chain computation is totally fine.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;### Debug &amp; fix&#xD;&#xA;Check the logs in [`feasibility_check `](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L1453) to find out what's the root cause.&#xD;&#xA;&#xD;&#xA;You need to know that once you enter the emergency mode with `NoFallback`, that is a [deep loop](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L733-L808).&#xD;&#xA;&#xD;&#xA;You've to do one of these to recover the election:&#xD;&#xA;- force set [`CurrentPhase`](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L1217) with root&#xD;&#xA;- calculate the result with offchain tool then submit it through [`set_emergency_election_result `](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L956)&#xD;&#xA;- change `NoFallback` to `OnChainSequentialPhragmen`&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3A3og.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18005" PostHistoryTypeId="2" PostId="4817" RevisionGUID="d1b9a687-71d4-4d80-a22b-104dbc13fe88" CreationDate="2022-09-15T02:07:29.340" UserId="251" Text="Let's call 'another node' as A.&#xD;&#xA;&#xD;&#xA;If A holds the same genesis as relaychain, then it can join the network. &#xD;&#xA;&#xD;&#xA;Actually, there are two nodes in the collator node. I mean:&#xD;&#xA;```&#xD;&#xA;A.relaychain.genesis == relaychain.genesis&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you need to make sure:&#xD;&#xA;- `--port xxx` is opening (IIUC, the default value for `A.relaychain.port` is `30334`)&#xD;&#xA;- public IP, meet any one of the below requirements is enough&#xD;&#xA;  - A connects to others&#xD;&#xA;    - other nodes should have a public IP&#xD;&#xA;  - others connect to A&#xD;&#xA;    - If your router has a public IP then you could map it to your local machine&#xD;&#xA;&#xD;&#xA;Once you see `(1 peers)` in A's log, which means it has joined the network.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18007" PostHistoryTypeId="2" PostId="4818" RevisionGUID="5fc632bb-63bb-4d5e-83f5-931526c32b9f" CreationDate="2022-09-15T03:09:58.573" UserId="1942" Text="What are the necessary parameters that substrate boot nodes need to configure,  --sync Full --pruning archive --node-key Is it ok?&#xD;&#xA;&#xD;&#xA;Other nodes synchronize blocks by linking boot nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="18009" PostHistoryTypeId="1" PostId="4818" RevisionGUID="5fc632bb-63bb-4d5e-83f5-931526c32b9f" CreationDate="2022-09-15T03:09:58.573" UserId="1942" Text="how to lanch a boot node and necessary parameters" ContentLicense="CC BY-SA 4.0" />
  <row Id="18010" PostHistoryTypeId="3" PostId="4818" RevisionGUID="5fc632bb-63bb-4d5e-83f5-931526c32b9f" CreationDate="2022-09-15T03:09:58.573" UserId="1942" Text="|substrate-node|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18011" PostHistoryTypeId="2" PostId="4819" RevisionGUID="72b2e287-3f21-411e-a133-801af529d5c4" CreationDate="2022-09-15T04:07:21.493" UserId="393" Text="If you dive into the `construct_runtime!` macro, you'll find metadata contains only pallet name and function name.&#xD;&#xA;&#xD;&#xA;If you want to dispatch by parameters, I think you should try to convert the &lt;T as Config&lt;I&gt;&gt;::Call to Call&lt;T&gt;. Call&lt;T&gt; is an enum generated by `#[pallet::call]` macro. For now, i can't find a convert way, keep trying.&#xD;&#xA;&#xD;&#xA;At last, why you want to do this, can you give some context ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18013" PostHistoryTypeId="2" PostId="4820" RevisionGUID="0eda1624-e673-4c7f-a8ac-2b1b12c35419" CreationDate="2022-09-15T04:25:55.513" UserId="251" Text="Bootnodes don't need to be an achieve node.&#xD;&#xA;&#xD;&#xA;IMO, you just need to make sure that you have a public IP and the `--port` is opening.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;`--node-key-file`/`--node-key` is optional now.&#xD;&#xA;&#xD;&#xA;The node key will be generated automatically when the first boot.&#xD;&#xA;&#xD;&#xA;And in the latest Substrate version, the node will store the node key automatically to the `/&lt;path&gt;/chains/network/secret_ed25519`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If you decide to use `--node-key-file`, then `./node --node-key-file &lt;path&gt;`.&#xD;&#xA;&#xD;&#xA;If the `&lt;path&gt;` doesn't exist, the node key will be generated automatically." ContentLicense="CC BY-SA 4.0" />
  <row Id="18015" PostHistoryTypeId="5" PostId="4819" RevisionGUID="45bd38ae-8710-4cdf-8b8a-b7f3272ad956" CreationDate="2022-09-15T04:43:53.833" UserId="393" Comment="added 101 characters in body" Text="If you dive into the `construct_runtime!` macro, you'll find metadata contains only pallet name and function name.&#xD;&#xA;&#xD;&#xA;If you want to dispatch by parameters, I think you should try to convert the &lt;T as Config&lt;I&gt;&gt;::Call to Call&lt;T&gt;. Call&lt;T&gt; is an enum generated by `#[pallet::call]` macro. For now, i can't find a convert way, keep trying.&#xD;&#xA;&#xD;&#xA;If you just want to batch calls of one pallet, you can use Call&lt;T&gt; as the input parameter directly.&#xD;&#xA;At last, why you want to do this, can you give some context ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18021" PostHistoryTypeId="2" PostId="4822" RevisionGUID="141fc7ac-2cf6-4b27-b26a-92df1a75a7e9" CreationDate="2022-09-15T05:45:36.827" UserId="2752" Text="This question has already been asked [here][1]. It looks like unfortunately there are at the moment no options to test your smart contract (when cross contract calling) in rust. In the github issue there is a mentoning of [redspot][2], but I don't know how well that would work for you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/28/how-to-test-cross-contract-ink-contracts&#xD;&#xA;  [2]: https://github.com/patractlabs/redspot" ContentLicense="CC BY-SA 4.0" />
  <row Id="18023" PostHistoryTypeId="2" PostId="4823" RevisionGUID="ef360af8-1111-4896-9f7e-54c28b91eb54" CreationDate="2022-09-15T06:02:15.553" UserId="354" Text="I made a custom pallet and wants to access its method using a extrinsic call like `api.tx.&lt;module&gt;.&lt;method&gt;` but was not able to do that, do i need to implement it in blockchain code or it is implemented already but i am doing something wrong." ContentLicense="CC BY-SA 4.0" />
  <row Id="18025" PostHistoryTypeId="1" PostId="4823" RevisionGUID="ef360af8-1111-4896-9f7e-54c28b91eb54" CreationDate="2022-09-15T06:02:15.553" UserId="354" Text="How to call a function from custom pallet using api.tx?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18026" PostHistoryTypeId="3" PostId="4823" RevisionGUID="ef360af8-1111-4896-9f7e-54c28b91eb54" CreationDate="2022-09-15T06:02:15.553" UserId="354" Text="|substrate-node|polkadot-js|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18027" PostHistoryTypeId="2" PostId="4824" RevisionGUID="abd365d0-1351-415d-ae91-2cb933ad03b5" CreationDate="2022-09-15T06:07:15.047" UserId="552" Text="I was trying to mock the rpc calls in substrate, but if there's any example for that then I guess it would help better. " ContentLicense="CC BY-SA 4.0" />
  <row Id="18029" PostHistoryTypeId="1" PostId="4824" RevisionGUID="abd365d0-1351-415d-ae91-2cb933ad03b5" CreationDate="2022-09-15T06:07:15.047" UserId="552" Text="Is it possible to test/mock the rpc calls in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18030" PostHistoryTypeId="3" PostId="4824" RevisionGUID="abd365d0-1351-415d-ae91-2cb933ad03b5" CreationDate="2022-09-15T06:07:15.047" UserId="552" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18031" PostHistoryTypeId="2" PostId="4825" RevisionGUID="9ac0494c-902b-4417-9fa0-089ba514a5f6" CreationDate="2022-09-15T06:31:18.357" UserId="2752" Text="I've been trying for a few days now to implement cross contract calls but somehow I can't seem to make it right. So here is my code and I hope one of you can point out my mistake to me.&#xD;&#xA;&#xD;&#xA;I want to call on a smart contract which is already deployed on chain. [Here][1] is an example how that would look like, utilizing the openbrush wrapper. &#xD;&#xA;&#xD;&#xA;As far as I understand it, works by importing the trait of the smart contract which is to be called on and then using the AccountId of the smart contract to point to the right instance, deployed on the chain.&#xD;&#xA;&#xD;&#xA;Here is an example of how I tried to implement this myself. There are two contracts: &#xD;&#xA;&#xD;&#xA; - Incrementer Contract&#xD;&#xA;    - has one value which is 0 at the start&#xD;&#xA;    - inc() &lt;- method to increase the value by 0.1&#xD;&#xA;    - balance() &lt;- method to check the value&#xD;&#xA;&#xD;&#xA;- Caller Contract&#xD;&#xA;    - has the AccountId of Incrementer&#xD;&#xA;    - call() &lt;- method to call inc()&#xD;&#xA;&#xD;&#xA;Code:&#xD;&#xA;&#xD;&#xA;Incrementer trait:&#xD;&#xA;&#xD;&#xA;    #[openbrush::wrapper]&#xD;&#xA;    pub type IncRef = dyn Inc;&#xD;&#xA;    &#xD;&#xA;    #[openbrush::trait_definition]&#xD;&#xA;    pub trait Inc {&#xD;&#xA;    &#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn inc(&amp;mut self);&#xD;&#xA;    &#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn balance(&amp;self) -&gt; u128;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Incrementer code:&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    #![feature(min_specialization)]&#xD;&#xA;    &#xD;&#xA;    #[openbrush::contract]&#xD;&#xA;    mod inc {&#xD;&#xA;    &#xD;&#xA;        use project::traits::inc::*;&#xD;&#xA;    &#xD;&#xA;        #[ink(storage)]&#xD;&#xA;        pub struct Inc {&#xD;&#xA;            value: u128,&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        impl Inc {&#xD;&#xA;            &#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn new() -&gt; Self {&#xD;&#xA;                Self { value: 0 }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            #[ink(message)]&#xD;&#xA;            pub fn inc(&amp;mut self) {&#xD;&#xA;                self.value += 1;&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            #[ink(message)]&#xD;&#xA;            pub fn balance(&amp;self) -&gt; u128 {&#xD;&#xA;                self.value&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Caller Code:&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    #![feature(min_specialization)]&#xD;&#xA;    &#xD;&#xA;    #[openbrush::contract]&#xD;&#xA;    mod caller {&#xD;&#xA;        use project::traits::inc::IncRef;&#xD;&#xA;        &#xD;&#xA;        #[ink(storage)]&#xD;&#xA;        pub struct Caller {&#xD;&#xA;            contract: AccountId&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        impl Caller {&#xD;&#xA;            &#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn new(&#xD;&#xA;                contract: AccountId&#xD;&#xA;            ) -&gt; Self {&#xD;&#xA;                Self { contract: contract}&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            #[ink(message)]&#xD;&#xA;            pub fn call(){&#xD;&#xA;                IncRef::inc(&amp;self.contract);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Incrementer Cargo.toml&#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;inc&quot;&#xD;&#xA;    version = &quot;0.1.0&quot;&#xD;&#xA;    authors = [&quot;[your_name] &lt;[your_email]&gt;&quot;]&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    ink_primitives = { version = &quot;3&quot;, default-features = false }&#xD;&#xA;    ink_metadata = { version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    ink_env = { version = &quot;3&quot;, default-features = false }&#xD;&#xA;    ink_storage = { version = &quot;3&quot;, default-features = false }&#xD;&#xA;    ink_lang = { version = &quot;3&quot;, default-features = false }&#xD;&#xA;    &#xD;&#xA;    scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    &#xD;&#xA;    project = { path = &quot;../..&quot;, default-features = false }&#xD;&#xA;    openbrush = { version=&quot;~2.1.0&quot;, default-features = false}&#xD;&#xA;    &#xD;&#xA;    [lib]&#xD;&#xA;    name = &quot;inc&quot;&#xD;&#xA;    path = &quot;lib.rs&quot;&#xD;&#xA;    crate-type = [&#xD;&#xA;    	&quot;cdylib&quot;,&#xD;&#xA;        &quot;rlib&quot;&#xD;&#xA;    ]&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;        &quot;ink_metadata/std&quot;,&#xD;&#xA;        &quot;ink_env/std&quot;,&#xD;&#xA;        &quot;ink_storage/std&quot;,&#xD;&#xA;        &quot;ink_primitives/std&quot;,&#xD;&#xA;        &quot;scale/std&quot;,&#xD;&#xA;        &quot;scale-info/std&quot;,&#xD;&#xA;    &#xD;&#xA;        &quot;project/std&quot;,&#xD;&#xA;        &quot;openbrush/std&quot;&#xD;&#xA;    ]&#xD;&#xA;    ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Caller Cargo.toml&#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;caller&quot;&#xD;&#xA;    version = &quot;0.1.0&quot;&#xD;&#xA;    authors = [&quot;[your_name] &lt;[your_email]&gt;&quot;]&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    &#xD;&#xA;    [lib]&#xD;&#xA;    name = &quot;caller&quot;&#xD;&#xA;    path = &quot;lib.rs&quot;&#xD;&#xA;    crate-type = [&#xD;&#xA;    	&quot;cdylib&quot;,&#xD;&#xA;    ]&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    ink_primitives = { version = &quot;~3.3.0&quot;, default-features = false }&#xD;&#xA;    ink_metadata = { version = &quot;~3.3.0&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    ink_env = { version = &quot;~3.3.0&quot;, default-features = false }&#xD;&#xA;    ink_storage = { version = &quot;~3.3.0&quot;, default-features = false }&#xD;&#xA;    ink_lang = { version = &quot;~3.3.0&quot;, default-features = false }&#xD;&#xA;    ink_prelude = { version = &quot;~3.3.0&quot;, default-features = false }&#xD;&#xA;    ink_engine = { version = &quot;~3.3.0&quot;, default-features = false, optional = true }&#xD;&#xA;    &#xD;&#xA;    scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    project = { path = &quot;../..&quot;, default-features = false }&#xD;&#xA;    openbrush = { version=&quot;~2.1.0&quot;, default-features = false}&#xD;&#xA;    inc = { path = &quot;../inc&quot;, default-features = false, features = [&quot;ink-as-dependency&quot;] }&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;        &quot;ink_primitives/std&quot;,&#xD;&#xA;        &quot;ink_metadata&quot;,&#xD;&#xA;        &quot;ink_metadata/std&quot;,&#xD;&#xA;        &quot;ink_env/std&quot;,&#xD;&#xA;        &quot;ink_storage/std&quot;,&#xD;&#xA;        &quot;ink_lang/std&quot;,&#xD;&#xA;        &quot;scale/std&quot;,&#xD;&#xA;        &quot;scale-info&quot;,&#xD;&#xA;        &quot;scale-info/std&quot;,&#xD;&#xA;    &#xD;&#xA;        &quot;openbrush/std&quot;,&#xD;&#xA;        &quot;inc/std&quot;,&#xD;&#xA;        &quot;project/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;    ink-as-dependency = []&#xD;&#xA;    &#xD;&#xA;    [profile.dev]&#xD;&#xA;    codegen-units = 16&#xD;&#xA;    &#xD;&#xA;    [profile.release]&#xD;&#xA;    overflow-checks = false&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Since there also seems to be no way to adequatly [test smart contracts which utilize cross contract calls][2] I am a bit lost at which could be the mistake. I tried testing this implementation by uploading the contracts to a private node. But the only info I got was the following, when the call() call failed:&#xD;&#xA;&#xD;&#xA;&gt; 9/15/2022, 12:25:17 AM call()&#xD;&#xA;&gt; &#xD;&#xA;&gt; balances:Withdraw&#xD;&#xA;&gt; &#xD;&#xA;&gt; system:ExtrinsicFailed contracts:ContractTrapped&#xD;&#xA;&gt; &#xD;&#xA;&gt; Contract trapped during execution.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Supercolony-net/openbrush-contracts/blob/9dbc5f73acb439318329e1dfe6235e021a4b7786/example_project_structure/impls/lending/lending.rs#L108&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/28/how-to-test-cross-contract-ink-contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="18033" PostHistoryTypeId="1" PostId="4825" RevisionGUID="9ac0494c-902b-4417-9fa0-089ba514a5f6" CreationDate="2022-09-15T06:31:18.357" UserId="2752" Text="How to implement cross contract calls correctly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18034" PostHistoryTypeId="3" PostId="4825" RevisionGUID="9ac0494c-902b-4417-9fa0-089ba514a5f6" CreationDate="2022-09-15T06:31:18.357" UserId="2752" Text="|ink|smart-contract|openbrush|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18035" PostHistoryTypeId="2" PostId="4826" RevisionGUID="f0b60124-b66d-4854-a529-3ab14bb31438" CreationDate="2022-09-15T07:10:11.917" UserId="2484" Text="Hi Substrate Community,&#xD;&#xA;&#xD;&#xA;is there any way to get the current block weight? This is especially useful, when deciding in `on_finalize` if there is space left to put in some logic. I know, that `on_finalize` is guaranteed to run, but I would only run if a block is not full.&#xD;&#xA;&#xD;&#xA;How can I manage to do this with Substrate?&#xD;&#xA;&#xD;&#xA;I already tried to look into the `transaction_payment` and `frame_system` pallet. I could find a [`BlockWeights` struct](https://github.com/paritytech/substrate/blob/fd549573b2fffd620d9f2fcea76edab1cdabc62f/frame/system/src/limits.rs#L198-L206), but it hasn't the current block weight inside it." ContentLicense="CC BY-SA 4.0" />
  <row Id="18037" PostHistoryTypeId="1" PostId="4826" RevisionGUID="f0b60124-b66d-4854-a529-3ab14bb31438" CreationDate="2022-09-15T07:10:11.917" UserId="2484" Text="How to query the current consumed weight in an extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18038" PostHistoryTypeId="3" PostId="4826" RevisionGUID="f0b60124-b66d-4854-a529-3ab14bb31438" CreationDate="2022-09-15T07:10:11.917" UserId="2484" Text="|substrate-node|weight|block|frame-system|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18039" PostHistoryTypeId="2" PostId="4827" RevisionGUID="0c5ccd51-70e4-422e-b04d-398e698d8673" CreationDate="2022-09-15T08:57:10.190" UserId="1789" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;The following is an example of the ERC20 `transfer` function written as a precompile:&#xD;&#xA;```&#xD;&#xA;    fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;        handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;        // Parse input.&#xD;&#xA;        let mut input = handle.read_input()?;&#xD;&#xA;        input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;        let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;        let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;        // Build call with origin.&#xD;&#xA;        {&#xD;&#xA;            let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;            let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;            let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;            // Dispatch call (if enough gas).&#xD;&#xA;            RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;                handle,&#xD;&#xA;                Some(origin).into(),&#xD;&#xA;                pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                    dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                    value: amount,&#xD;&#xA;                },&#xD;&#xA;            )?;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        LogsBuilder::new(handle.context().address)&#xD;&#xA;            .log3(&#xD;&#xA;                SELECTOR_LOG_TRANSFER,&#xD;&#xA;                handle.context().caller,&#xD;&#xA;                to,&#xD;&#xA;                EvmDataWriter::new().write(amount).build(),&#xD;&#xA;            )&#xD;&#xA;            .record(handle)?;&#xD;&#xA;&#xD;&#xA;        // Build output.&#xD;&#xA;        Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;it seems this &#xD;&#xA;`handle.record_log_costs_manual(3, 32)?;` has something to do with fee...&#xD;&#xA;&#xD;&#xA;inside precompiles/utils/src/lib.rs, I found how record_log_costs_manual() is implemented:&#xD;&#xA;```&#xD;&#xA;pub trait PrecompileHandleExt: PrecompileHandle {&#xD;&#xA;    #[must_use]&#xD;&#xA;    /// Record cost of a log manually.&#xD;&#xA;    /// This can be useful to record log costs early when their content have static size.&#xD;&#xA;    fn record_log_costs_manual(&amp;mut self, topics: usize, data_len: usize) -&gt; EvmResult;&#xD;&#xA;```&#xD;&#xA;how can I set this precompile function transaction fee to zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18041" PostHistoryTypeId="1" PostId="4827" RevisionGUID="0c5ccd51-70e4-422e-b04d-398e698d8673" CreationDate="2022-09-15T08:57:10.190" UserId="1789" Text="Frontier: How to change EVM gas fee charged in calling precompile functions" ContentLicense="CC BY-SA 4.0" />
  <row Id="18042" PostHistoryTypeId="3" PostId="4827" RevisionGUID="0c5ccd51-70e4-422e-b04d-398e698d8673" CreationDate="2022-09-15T08:57:10.190" UserId="1789" Text="|frontier|evm|feeless|precompile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18043" PostHistoryTypeId="2" PostId="4828" RevisionGUID="7cfe26f5-788d-4bef-a4c9-ea69050ae408" CreationDate="2022-09-15T09:04:11.517" UserId="515" Text="What is an Off-Chain Call in this scenario? &#xD;&#xA;&#xD;&#xA;&gt; for instance an Off-Chain Worker, or an Off-Chain Call&#xD;&#xA;&#xD;&#xA;source: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/transaction_validity.rs#L246&#xD;&#xA;&#xD;&#xA;They are the same transactions called by Off-Chain Worker?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18045" PostHistoryTypeId="1" PostId="4828" RevisionGUID="7cfe26f5-788d-4bef-a4c9-ea69050ae408" CreationDate="2022-09-15T09:04:11.517" UserId="515" Text="What is Offchain Call in TransactionSource?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18046" PostHistoryTypeId="3" PostId="4828" RevisionGUID="7cfe26f5-788d-4bef-a4c9-ea69050ae408" CreationDate="2022-09-15T09:04:11.517" UserId="515" Text="|substrate-node|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18047" PostHistoryTypeId="2" PostId="4829" RevisionGUID="af27a0f2-f395-4375-9c2a-759e5bb7cbf3" CreationDate="2022-09-15T09:13:32.840" UserId="3171" Text="    hrmp.hrmpInitOpenChannel(&#xD;&#xA;       recipient: 3000                    //the other parachain you want to open the channel with&#xD;&#xA;       proposedMaxCapacity: 1000          // specifies how many messages can be in the channel at once&#xD;&#xA;       proposed_max_message_size: 102400  //specifies the maximum size of the messages&#xD;&#xA;    )&#xD;&#xA;There is example how to open HRMP between two siblings parachains.&#xD;&#xA;https://docs.substrate.io/reference/how-to-guides/parachains/add-hrmp-channels/&#xD;&#xA;But what exactly instruction should I use to open between my parachain and Rococo/Kusama/Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18049" PostHistoryTypeId="1" PostId="4829" RevisionGUID="af27a0f2-f395-4375-9c2a-759e5bb7cbf3" CreationDate="2022-09-15T09:13:32.840" UserId="3171" Text="How to open HRMP with Rococo chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18050" PostHistoryTypeId="3" PostId="4829" RevisionGUID="af27a0f2-f395-4375-9c2a-759e5bb7cbf3" CreationDate="2022-09-15T09:13:32.840" UserId="3171" Text="|parachain|xcm|xcmp|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18051" PostHistoryTypeId="5" PostId="4827" RevisionGUID="d0c7497b-2ac9-48c1-a651-a20173712ae2" CreationDate="2022-09-15T09:15:29.653" UserId="1789" Comment="added 289 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 &#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot: https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;Here is another example of the ERC20 `transfer` function written as a precompile:&#xD;&#xA;```&#xD;&#xA;    fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;        handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;        // Parse input.&#xD;&#xA;        let mut input = handle.read_input()?;&#xD;&#xA;        input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;        let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;        let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;        // Build call with origin.&#xD;&#xA;        {&#xD;&#xA;            let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;            let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;            let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;            // Dispatch call (if enough gas).&#xD;&#xA;            RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;                handle,&#xD;&#xA;                Some(origin).into(),&#xD;&#xA;                pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                    dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                    value: amount,&#xD;&#xA;                },&#xD;&#xA;            )?;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        LogsBuilder::new(handle.context().address)&#xD;&#xA;            .log3(&#xD;&#xA;                SELECTOR_LOG_TRANSFER,&#xD;&#xA;                handle.context().caller,&#xD;&#xA;                to,&#xD;&#xA;                EvmDataWriter::new().write(amount).build(),&#xD;&#xA;            )&#xD;&#xA;            .record(handle)?;&#xD;&#xA;&#xD;&#xA;        // Build output.&#xD;&#xA;        Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;it seems this &#xD;&#xA;`handle.record_log_costs_manual(3, 32)?;` has something to do with fee...&#xD;&#xA;&#xD;&#xA;inside precompiles/utils/src/lib.rs, I found how record_log_costs_manual() is implemented:&#xD;&#xA;```&#xD;&#xA;pub trait PrecompileHandleExt: PrecompileHandle {&#xD;&#xA;    #[must_use]&#xD;&#xA;    /// Record cost of a log manually.&#xD;&#xA;    /// This can be useful to record log costs early when their content have static size.&#xD;&#xA;    fn record_log_costs_manual(&amp;mut self, topics: usize, data_len: usize) -&gt; EvmResult;&#xD;&#xA;```&#xD;&#xA;how can I set this precompile function transaction fee to zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18052" PostHistoryTypeId="5" PostId="4827" RevisionGUID="5111ecc6-c7a4-479b-af9e-b46c96ef520f" CreationDate="2022-09-15T09:28:15.467" UserId="1789" Comment="added 173 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 and its original code is here https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd&#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot: Here is Moonbeam recent code on precompile https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;Here is another example of the ERC20 `transfer` function written as a precompile:&#xD;&#xA;```&#xD;&#xA;    fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;        handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;        // Parse input.&#xD;&#xA;        let mut input = handle.read_input()?;&#xD;&#xA;        input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;        let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;        let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;        // Build call with origin.&#xD;&#xA;        {&#xD;&#xA;            let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;            let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;            let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;            // Dispatch call (if enough gas).&#xD;&#xA;            RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;                handle,&#xD;&#xA;                Some(origin).into(),&#xD;&#xA;                pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                    dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                    value: amount,&#xD;&#xA;                },&#xD;&#xA;            )?;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        LogsBuilder::new(handle.context().address)&#xD;&#xA;            .log3(&#xD;&#xA;                SELECTOR_LOG_TRANSFER,&#xD;&#xA;                handle.context().caller,&#xD;&#xA;                to,&#xD;&#xA;                EvmDataWriter::new().write(amount).build(),&#xD;&#xA;            )&#xD;&#xA;            .record(handle)?;&#xD;&#xA;&#xD;&#xA;        // Build output.&#xD;&#xA;        Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;it seems this &#xD;&#xA;`handle.record_log_costs_manual(3, 32)?;` has something to do with fee...&#xD;&#xA;&#xD;&#xA;inside precompiles/utils/src/lib.rs, I found how record_log_costs_manual() is implemented:&#xD;&#xA;```&#xD;&#xA;pub trait PrecompileHandleExt: PrecompileHandle {&#xD;&#xA;    #[must_use]&#xD;&#xA;    /// Record cost of a log manually.&#xD;&#xA;    /// This can be useful to record log costs early when their content have static size.&#xD;&#xA;    fn record_log_costs_manual(&amp;mut self, topics: usize, data_len: usize) -&gt; EvmResult;&#xD;&#xA;```&#xD;&#xA;how can I set this precompile function transaction fee to zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18053" PostHistoryTypeId="2" PostId="4830" RevisionGUID="1072ba0f-164e-4f99-8766-108c0e6d22c6" CreationDate="2022-09-15T09:36:30.253" UserId="251" Text="H means horizontal.&#xD;&#xA;&#xD;&#xA;V means vertical.&#xD;&#xA;&#xD;&#xA;So, you should use VMP to interact with relaychain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        releychain&#xD;&#xA;   /(vmp)           \(vmp)&#xD;&#xA;para a   -(hrmp)-  para b &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also, check [cross consensus protocols](https://wiki.polkadot.network/docs/learn-crosschain#cross-consensus-protocols)." ContentLicense="CC BY-SA 4.0" />
  <row Id="18055" PostHistoryTypeId="5" PostId="4830" RevisionGUID="3b09f64d-ded8-41d8-b624-b16f695aa894" CreationDate="2022-09-15T09:42:26.913" UserId="251" Comment="added 183 characters in body" Text="H means horizontal.&#xD;&#xA;&#xD;&#xA;V means vertical.&#xD;&#xA;&#xD;&#xA;So, you should use VMP to interact with relaychain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        releychain&#xD;&#xA;   /(vmp)           \(vmp)&#xD;&#xA;para a   -(hrmp)-  para b &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also, check [cross consensus protocols](https://wiki.polkadot.network/docs/learn-crosschain#cross-consensus-protocols).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;When you send an open HRMP request, you could see an event on relaychain.&#xD;&#xA;&#xD;&#xA;`ump (UpwardMessagesReceived)`, which means you send a message from the downside to the upside through the VMP." ContentLicense="CC BY-SA 4.0" />
  <row Id="18056" PostHistoryTypeId="5" PostId="4830" RevisionGUID="c6a6e496-6be0-4977-b583-95da936c16b2" CreationDate="2022-09-15T09:52:25.020" UserId="251" Comment="added 38 characters in body" Text="H means horizontal.&#xD;&#xA;&#xD;&#xA;V means vertical.&#xD;&#xA;&#xD;&#xA;So, you should use VMP to interact with relaychain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;       releychain&#xD;&#xA;     /            \&#xD;&#xA;  (vmp)          (vmp)&#xD;&#xA;   /                \&#xD;&#xA;para a---(hrmp)---para b &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also, check [cross consensus protocols](https://wiki.polkadot.network/docs/learn-crosschain#cross-consensus-protocols).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;When you send an open HRMP request, you could see an event on relaychain.&#xD;&#xA;&#xD;&#xA;`ump (UpwardMessagesReceived)`, which means you send a message from the downside to the upside through the VMP." ContentLicense="CC BY-SA 4.0" />
  <row Id="18063" PostHistoryTypeId="2" PostId="4833" RevisionGUID="14d7e4f7-3ee2-4881-864e-ec5cbe696f56" CreationDate="2022-09-15T10:42:04.237" UserId="1989" Text="Is it possible to register custom metrics to be exported via Prometheus? Specifically, we would like to write values specific to the runtime - e.g. TVL, average throughput, etc.." ContentLicense="CC BY-SA 4.0" />
  <row Id="18065" PostHistoryTypeId="1" PostId="4833" RevisionGUID="14d7e4f7-3ee2-4881-864e-ec5cbe696f56" CreationDate="2022-09-15T10:42:04.237" UserId="1989" Text="Is it possible to extend Prometheus metrics in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18066" PostHistoryTypeId="3" PostId="4833" RevisionGUID="14d7e4f7-3ee2-4881-864e-ec5cbe696f56" CreationDate="2022-09-15T10:42:04.237" UserId="1989" Text="|rust|prometheus|metrics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18067" PostHistoryTypeId="2" PostId="4834" RevisionGUID="da492d28-7850-49c9-81be-dca356c42e69" CreationDate="2022-09-15T10:56:53.803" UserId="3164" Text="This doesn't solve the original problem, but a workaround was to change the allocator in parity-util-mem dependency of the Cargo.toml before compiling polkadot. &#xD;&#xA;&#xD;&#xA;I changed it from `jemalloc-global` to `mimalloc-global`&#xD;&#xA;&#xD;&#xA;ie&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;parity-util-mem = { version = &quot;0.11.0&quot;, default-features = false, features = [&quot;jemalloc-global&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;to &#xD;&#xA;```&#xD;&#xA;parity-util-mem = { version = &quot;0.11.0&quot;, default-features = false, features = [&quot;mimalloc-global&quot;] }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18069" PostHistoryTypeId="2" PostId="4835" RevisionGUID="b42f117f-93c9-4079-b02b-e7a24f4ab6d9" CreationDate="2022-09-15T11:34:19.197" UserId="642" Text="Recently when I want to submit a transaction I receive the following failure alert, I had similar issue while getting a tx `paymentInfo`, which is resolved by upgrading apis, but while submitting a tx the alert is still come up, however the transaction will get `inBlock`. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash): RuntimeDispatchInfo:: createType(RuntimeDispatchInfo):: Struct: failed on weight: u64:: Assertion failed`" ContentLicense="CC BY-SA 4.0" />
  <row Id="18071" PostHistoryTypeId="1" PostId="4835" RevisionGUID="b42f117f-93c9-4079-b02b-e7a24f4ab6d9" CreationDate="2022-09-15T11:34:19.197" UserId="642" Text="recent error: RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash) ... failed on weight: u64" ContentLicense="CC BY-SA 4.0" />
  <row Id="18072" PostHistoryTypeId="3" PostId="4835" RevisionGUID="b42f117f-93c9-4079-b02b-e7a24f4ab6d9" CreationDate="2022-09-15T11:34:19.197" UserId="642" Text="|polkadot|transactions|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18073" PostHistoryTypeId="5" PostId="4835" RevisionGUID="e522cd52-f2f0-442a-a25b-72141f298efc" CreationDate="2022-09-15T11:48:36.580" UserId="642" Comment="added 92 characters in body; edited title" Text="Recently when I want to submit a transaction I receive the following failure alert, I had similar issue while getting a tx `paymentInfo`, which is resolved by upgrading apis, but while submitting a tx the alert is still come up, however the transaction will get `inBlock`. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash): RuntimeDispatchInfo:: createType(RuntimeDispatchInfo):: Struct: failed on weight: u64:: Assertion failed`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I see the issue on Parity and OnFinality endpoints, but not on PinkNode and Dwellir !!" ContentLicense="CC BY-SA 4.0" />
  <row Id="18074" PostHistoryTypeId="4" PostId="4835" RevisionGUID="e522cd52-f2f0-442a-a25b-72141f298efc" CreationDate="2022-09-15T11:48:36.580" UserId="642" Comment="added 92 characters in body; edited title" Text="RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash) ... failed on weight: u64" ContentLicense="CC BY-SA 4.0" />
  <row Id="18075" PostHistoryTypeId="5" PostId="4835" RevisionGUID="814fd7fa-9376-4211-ae80-1bd654012ef6" CreationDate="2022-09-15T12:07:24.660" UserId="642" Comment="added 53 characters in body" Text="Recently when I want to submit a transaction I receive the following failure alert, I had similar issue while getting a tx `paymentInfo`, which is resolved by upgrading apis, but while submitting a tx the alert is still come up, however the transaction will get `inBlock`. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash): RuntimeDispatchInfo:: createType(RuntimeDispatchInfo):: Struct: failed on weight: u64:: Assertion failed`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I see the issue on Parity and OnFinality endpoints, but not on PinkNode and Dwellir !! and only on Westend and Polkadot, but not on Kusama." ContentLicense="CC BY-SA 4.0" />
  <row Id="18076" PostHistoryTypeId="2" PostId="4836" RevisionGUID="ee14513f-c237-4fc4-96a2-54b2f2b0e311" CreationDate="2022-09-15T12:21:19.890" UserId="94" Text="The `on_idle` hook is probably closer to what you are looking for.  &#xD;&#xA;It gets the remaining weight passed into it like this:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn on_idle(block: T::BlockNumber, remaining: Weight) -&gt; Weight&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This happens after all normal transactions and before `on_finalize`." ContentLicense="CC BY-SA 4.0" />
  <row Id="18078" PostHistoryTypeId="2" PostId="4837" RevisionGUID="2efe8686-4e39-48d4-870e-1bfbd5e0ba12" CreationDate="2022-09-15T12:26:31.657" UserId="1789" Text="I was trying to use this `ansi_term` dependency in my project/precompiles/utils/src/lib.rs.&#xD;&#xA;&#xD;&#xA;Here is my file structure:&#xD;&#xA;```&#xD;&#xA;my_parachain/&#xD;&#xA;├── ...&#xD;&#xA;└──precompiles/utils&#xD;&#xA;     ├── macro&#xD;&#xA;     ├── src/lib.rs&#xD;&#xA;     └── Cargo.toml&#xD;&#xA;```&#xD;&#xA;after adding the following in the Cargo.toml above&#xD;&#xA;```&#xD;&#xA;ansi_term = &quot;0.12.1&quot;&#xD;&#xA;```&#xD;&#xA;All can compile. ansi_term was also found to be 0.12.1 in my Cargo.lock already before adding that in the Cargo.toml.&#xD;&#xA;&#xD;&#xA;but when I want to use this `ansi_term` dependency by adding the following line in my project/precompiles/utils/src/lib.rs&#xD;&#xA;```&#xD;&#xA;use ansi_term::Colour;&#xD;&#xA;```&#xD;&#xA;then I got this error:&#xD;&#xA;```&#xD;&#xA; error: duplicate lang item in crate `std` (which `ansi_term` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from .../target/release/wbuild/hero-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-825169ab8c4ddb77.rmeta&#xD;&#xA;    = note: second definition in `std` loaded from /home/user2038/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-a237209e92b55a70.rlib&#xD;&#xA;&#xD;&#xA;  error: duplicate lang item in crate `std` (which `ansi_term` depends on): `oom`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from .../target/release/wbuild/hero-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-825169ab8c4ddb77.rmeta&#xD;&#xA;    = note: second definition in `std` loaded from /home/user2038/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-a237209e92b55a70.rlib&#xD;&#xA;&#xD;&#xA;  warning: `precompile-utils` (lib) generated 1 warning&#xD;&#xA;  error: could not compile `precompile-utils` due to 2 previous errors; 1 warning emitted&#xD;&#xA;```&#xD;&#xA;But if I remove `use ansi_term::Colour;` in precompiles/utils/src/lib.rs, then all can compile again. &#xD;&#xA;&#xD;&#xA;What went wrong???&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18080" PostHistoryTypeId="1" PostId="4837" RevisionGUID="2efe8686-4e39-48d4-870e-1bfbd5e0ba12" CreationDate="2022-09-15T12:26:31.657" UserId="1789" Text="duplicate lang item in crate std (which ansi_term depends on): panic_impl - Cannot use dependency" ContentLicense="CC BY-SA 4.0" />
  <row Id="18081" PostHistoryTypeId="3" PostId="4837" RevisionGUID="2efe8686-4e39-48d4-870e-1bfbd5e0ba12" CreationDate="2022-09-15T12:26:31.657" UserId="1789" Text="|polkadot|parachain|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18082" PostHistoryTypeId="2" PostId="4838" RevisionGUID="c1d8251f-f9d3-433e-8459-38e83c3141de" CreationDate="2022-09-15T12:59:02.283" UserId="642" Text="Since recent weights v2 type change that impacted the earlier api versions, we need to not only update all apis to the latest, but also some are replaced. in my case:&#xD;&#xA;&#xD;&#xA;`api.rpc.payment.queryInfo`&#xD;&#xA;&#xD;&#xA;is replaced with&#xD;&#xA;&#xD;&#xA;`api.call.transactionPaymentApi.queryInfo`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18084" PostHistoryTypeId="2" PostId="4839" RevisionGUID="699e77c6-cf4d-4fd4-94d4-71da5567eb66" CreationDate="2022-09-15T13:49:56.373" UserId="1959" Text="As Xavier mentioned, relaychain and parachain interact via VMP, so there is no need to open HRMP between parachain and relaychain(Rococo/Kusama/Polkadot), and there is no HRMP between parachain and relaychain. HRMP only can be opend between parachain and parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="18086" PostHistoryTypeId="2" PostId="4840" RevisionGUID="0dc8fd89-d040-4283-8ca7-a548e79acc35" CreationDate="2022-09-15T14:36:30.080" UserId="151" Text="As explained here : https://docs.substrate.io/fundamentals/offchain-operations/&#xD;&#xA;This is the runtime that call an off-chain worker that will return a transaction, that transaction will have a Local TransactionSource. To me &quot;Off-chain Call&quot; does not make sense here. Maybe a legacy in the comment." ContentLicense="CC BY-SA 4.0" />
  <row Id="18090" PostHistoryTypeId="5" PostId="4839" RevisionGUID="84c461b4-4af7-49b1-8600-e960409872c1" CreationDate="2022-09-15T14:59:41.130" UserId="29" Comment="added 1 character in body" Text="As Xavier mentioned, relaychain and parachain interact via VMP, so there is no need to open HRMP between parachain and relaychain(Rococo/Kusama/Polkadot), and there is no HRMP between parachain and relaychain. HRMP only can be opened between parachain and parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="18091" PostHistoryTypeId="2" PostId="4842" RevisionGUID="5b78d450-4498-41eb-b45b-839b320b9f8f" CreationDate="2022-09-15T15:21:10.643" UserId="29" Text="You can look here:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/8bd5510971a8fba46a7b1a6ead8254b9cbf0a73f/client/rpc/src/chain/tests.rs&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;```rust&#xD;&#xA;#[tokio::test]&#xD;&#xA;async fn should_return_header() {&#xD;&#xA;	let client = Arc::new(substrate_test_runtime_client::new());&#xD;&#xA;	let api = new_full(client.clone(), test_executor()).into_rpc();&#xD;&#xA;&#xD;&#xA;	let res: Header =&#xD;&#xA;		api.call(&quot;chain_getHeader&quot;, [H256::from(client.genesis_hash())]).await.unwrap();&#xD;&#xA;	assert_eq!(&#xD;&#xA;		res,&#xD;&#xA;		Header {&#xD;&#xA;			parent_hash: H256::from_low_u64_be(0),&#xD;&#xA;			number: 0,&#xD;&#xA;			state_root: res.state_root,&#xD;&#xA;			extrinsics_root: &quot;03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314&quot;&#xD;&#xA;				.parse()&#xD;&#xA;				.unwrap(),&#xD;&#xA;			digest: Default::default(),&#xD;&#xA;		}&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	let res: Header = api.call(&quot;chain_getHeader&quot;, EmptyParams::new()).await.unwrap();&#xD;&#xA;	assert_eq!(&#xD;&#xA;		res,&#xD;&#xA;		Header {&#xD;&#xA;			parent_hash: H256::from_low_u64_be(0),&#xD;&#xA;			number: 0,&#xD;&#xA;			state_root: res.state_root,&#xD;&#xA;			extrinsics_root: &quot;03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314&quot;&#xD;&#xA;				.parse()&#xD;&#xA;				.unwrap(),&#xD;&#xA;			digest: Default::default(),&#xD;&#xA;		}&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	assert_matches!(&#xD;&#xA;		api.call::&lt;_, Option&lt;Header&gt;&gt;(&quot;chain_getHeader&quot;, [H256::from_low_u64_be(5)])&#xD;&#xA;			.await&#xD;&#xA;			.unwrap(),&#xD;&#xA;		None&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There are different test setups for RPC. You can poke around in the substrate/client/rpc/src folder:&#xD;&#xA;- https://github.com/paritytech/substrate/tree/8bd5510971a8fba46a7b1a6ead8254b9cbf0a73f/client/rpc/src" ContentLicense="CC BY-SA 4.0" />
  <row Id="18093" PostHistoryTypeId="6" PostId="4824" RevisionGUID="6ad8cedc-7f45-4c41-8e30-128f54c471e7" CreationDate="2022-09-15T15:24:13.867" UserId="29" Comment="edited tags" Text="|rpc|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18094" PostHistoryTypeId="2" PostId="4843" RevisionGUID="0ac00d65-fdc6-4885-ae4c-5b1978a19561" CreationDate="2022-09-15T15:35:56.220" UserId="1959" Text="Developer -&gt; Sudo&#xD;&#xA;1. `parasSudoWrapper.sudoScheduleParaInitialize(paraId, genesis)`.&lt;br&gt;This step will onboard the parathread&#xD;&#xA;[![init][1]][1] &#xD;&#xA;&#xD;&#xA;2. `slots.forceLease(paraId, leaser, amount, periodBegin, periodCount)`.&lt;br&gt;This step will give the parathread lease and upgrade it to parachain, if not upgrade, you can do it via `parasSudoWrapper.sudoScheduleParathreadUpgrade(paraId)`&#xD;&#xA;[![upgradeparachain][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/scUyz.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/XQlVm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18096" PostHistoryTypeId="5" PostId="4820" RevisionGUID="1c7ba6a7-e35a-405e-b396-76a8902fec3a" CreationDate="2022-09-15T15:39:14.230" UserId="29" Comment="edited body" Text="Bootnodes don't need to be an archive node.&#xD;&#xA;&#xD;&#xA;IMO, you just need to make sure that you have a public IP and the `--port` is opening.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;`--node-key-file`/`--node-key` is optional now.&#xD;&#xA;&#xD;&#xA;The node key will be generated automatically when the first boot.&#xD;&#xA;&#xD;&#xA;And in the latest Substrate version, the node will store the node key automatically to the `/&lt;path&gt;/chains/network/secret_ed25519`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If you decide to use `--node-key-file`, then `./node --node-key-file &lt;path&gt;`.&#xD;&#xA;&#xD;&#xA;If the `&lt;path&gt;` doesn't exist, the node key will be generated automatically." ContentLicense="CC BY-SA 4.0" />
  <row Id="18097" PostHistoryTypeId="5" PostId="4818" RevisionGUID="70c8561d-d6b3-4a18-966a-f90cbed6a91d" CreationDate="2022-09-15T15:39:49.563" UserId="29" Comment="deleted 2 characters in body; edited title" Text="What are the necessary parameters that substrate bootnodes need to configure,  --sync Full --pruning archive --node-key Is it ok?&#xD;&#xA;&#xD;&#xA;Other nodes synchronize blocks by linking bootnodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="18098" PostHistoryTypeId="4" PostId="4818" RevisionGUID="70c8561d-d6b3-4a18-966a-f90cbed6a91d" CreationDate="2022-09-15T15:39:49.563" UserId="29" Comment="deleted 2 characters in body; edited title" Text="how to launch a bootnode and necessary parameters" ContentLicense="CC BY-SA 4.0" />
  <row Id="18099" PostHistoryTypeId="2" PostId="4844" RevisionGUID="f03b2ee4-20cd-4563-9101-077d95d75eac" CreationDate="2022-09-15T16:09:59.183" UserId="2548" Text="I have the below code, if you see I am storing the ContractSender struct as OptionQuery.&#xD;&#xA;&#xD;&#xA;Later on, I am trying to read the data from the Struct, but was not able to.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn contract_sender)]&#xD;&#xA;	pub(super) type ContractSender&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Blake2_128Concat, T::AccountId, Contract&lt;T::AccountId, T::AccountId, BalanceOf&lt;T&gt;&gt;, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn contract_receiver)]&#xD;&#xA;	pub(super) type ContractReceiver&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Blake2_128Concat, T::AccountId, Contract&lt;T::AccountId, T::AccountId, BalanceOf&lt;T&gt;&gt;, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		/// Sign Contract&#xD;&#xA;		ContractEvent(T::AccountId, T::AccountId, BalanceOf&lt;T&gt;, u64, u64, u64),&#xD;&#xA;		/// Lock funds&#xD;&#xA;		Locked(T::AccountId, BalanceOf&lt;T&gt;),&#xD;&#xA;&#xD;&#xA;		/// Unlock funds&#xD;&#xA;		UnLock(T::AccountId, BalanceOf&lt;T&gt;),&#xD;&#xA;&#xD;&#xA;		/// Transfer&#xD;&#xA;		Transfer(T::AccountId, T::AccountId, BalanceOf&lt;T&gt;),&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		/// The requested user has not stored a value yet&#xD;&#xA;		NoValueStored,&#xD;&#xA;		/// Expiring Date was wrong/older than current date&#xD;&#xA;		WrongExpiringDate,&#xD;&#xA;		/// Contract is signed by the same addresses&#xD;&#xA;		SameAddressError&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;&#xD;&#xA;		/// Sign contract between two addresses&#xD;&#xA;		#[pallet::weight(T::WeightInfo::sign_contract())]&#xD;&#xA;		pub fn sign_contract(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			to: T::AccountId,&#xD;&#xA;			amount: BalanceOf&lt;T&gt;,&#xD;&#xA;			work_days: u64,&#xD;&#xA;			take_action_days: u64,&#xD;&#xA;		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			// Check if Tx is signed&#xD;&#xA;			let from = ensure_signed(origin)?;&#xD;&#xA;			// Check if the sender and receiver have not the same address&#xD;&#xA;			ensure!(from != to, Error::&lt;T&gt;::SameAddressError);&#xD;&#xA;&#xD;&#xA;			// calculate how many blocks per day gets generated&#xD;&#xA;			let prod_block_per_sec = 6;&#xD;&#xA;			let day_per_second = 86400;&#xD;&#xA;			let prod_block_per_day = day_per_second / prod_block_per_sec;&#xD;&#xA;&#xD;&#xA;			let current_block_number: u64 = frame_system::Pallet::&lt;T&gt;::block_number().try_into().unwrap_or(0);&#xD;&#xA;			let work_days_in_block_number = current_block_number + (work_days * prod_block_per_day);&#xD;&#xA;			let take_action_days_in_block = work_days_in_block_number + (take_action_days * prod_block_per_day);&#xD;&#xA;&#xD;&#xA;			//Creating a Contract object&#xD;&#xA;			let contract = Contract {&#xD;&#xA;				origin: from.clone(),&#xD;&#xA;				to: to.clone(),&#xD;&#xA;				amount: amount.clone(),&#xD;&#xA;				current_block_number: current_block_number.clone(),&#xD;&#xA;				work_days_in_block_number: work_days_in_block_number.clone(),&#xD;&#xA;				take_action_days_in_block: take_action_days_in_block.clone(),&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			// Save in storage the sender and the contract&#xD;&#xA;			&lt;ContractSender&lt;T&gt;&gt;::insert(from.clone(), &amp;contract);&#xD;&#xA;			// Save in storage the reciever and the contract&#xD;&#xA;			&lt;ContractReceiver&lt;T&gt;&gt;::insert(to.clone(), contract);&#xD;&#xA;			//Throw Contract event&#xD;&#xA;&#xD;&#xA;			let work_days_in_block_number = &lt;ContractSender&lt;T&gt;&gt;::get(&amp;from).work_days_in_block_number;&#xD;&#xA;&#xD;&#xA;			Ok(().into())&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I am trying to read from the storage and get the work_days_in_block_number value but not possible.&#xD;&#xA;Error: &#xD;&#xA;```&#xD;&#xA; error[E0609]: no field `work_days_in_block_number` on type `Option&lt;Contract&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::AccountId, &lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance&gt;&gt;`&#xD;&#xA;     --&gt; /Users/elioprifti/substrate-node-template/pallets/escrow/src/lib.rs:161:68&#xD;&#xA;      |&#xD;&#xA;  161 |             let work_days_in_block_number = &lt;ContractSender&lt;T&gt;&gt;::get(&amp;from).work_days_in_block_number;&#xD;&#xA;      |                                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0609`.&#xD;&#xA;  warning: `escrow` (lib) generated 3 warnings&#xD;&#xA;  error: could not compile `escrow` due to previous error; 3 warnings emitted&#xD;&#xA;```&#xD;&#xA;What should I do? " ContentLicense="CC BY-SA 4.0" />
  <row Id="18101" PostHistoryTypeId="1" PostId="4844" RevisionGUID="f03b2ee4-20cd-4563-9101-077d95d75eac" CreationDate="2022-09-15T16:09:59.183" UserId="2548" Text="How to read storage when using ValueQuery" ContentLicense="CC BY-SA 4.0" />
  <row Id="18102" PostHistoryTypeId="3" PostId="4844" RevisionGUID="f03b2ee4-20cd-4563-9101-077d95d75eac" CreationDate="2022-09-15T16:09:59.183" UserId="2548" Text="|substrate-node|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18104" PostHistoryTypeId="2" PostId="4845" RevisionGUID="33df56d1-4387-49a5-b8ab-a604278d8078" CreationDate="2022-09-15T16:33:31.520" UserId="251" Text="As you said, you are using `OptionQuery`.&#xD;&#xA;&#xD;&#xA;So the value you get is an `Option` value.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let maybe_contract_sender = &lt;ContractSender&lt;T&gt;&gt;::get(&amp;from);&#xD;&#xA;&#xD;&#xA;if let Some(contract_sender) = maybe_contract_sender {&#xD;&#xA;    let work_days_in_block_number = contract_sender.work_days_in_block_number;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18106" PostHistoryTypeId="2" PostId="4846" RevisionGUID="b5e8a761-e5b9-4377-94f3-ebaad747ac4c" CreationDate="2022-09-15T16:59:02.597" UserId="3178" Text="I have observed few pallets have type alias for primitive types for chain state. &#xD;&#xA;&#xD;&#xA;For eg- Grandpa pallet has one storage **setIdSession** which shows type as **SetId** even though its primitive type is **u64**. [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ORmfN.png&#xD;&#xA;&#xD;&#xA;How can i impl same for custom pallet? I have tried creating type alias like PoolId but it always shows primitive type why? " ContentLicense="CC BY-SA 4.0" />
  <row Id="18108" PostHistoryTypeId="1" PostId="4846" RevisionGUID="b5e8a761-e5b9-4377-94f3-ebaad747ac4c" CreationDate="2022-09-15T16:59:02.597" UserId="3178" Text="Display type alias for primitive types" ContentLicense="CC BY-SA 4.0" />
  <row Id="18109" PostHistoryTypeId="3" PostId="4846" RevisionGUID="b5e8a761-e5b9-4377-94f3-ebaad747ac4c" CreationDate="2022-09-15T16:59:02.597" UserId="3178" Text="|polkadot-js|substrate-front-end|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18110" PostHistoryTypeId="2" PostId="4847" RevisionGUID="1f3f8c61-3f03-4de5-9e6e-7d910380c987" CreationDate="2022-09-15T17:00:48.263" UserId="3179" Text="**cargo-contract** latest release currently is **v1.5.0** which was released on **15th August 2022**.&#xD;&#xA;So I used rust nightly build of that day and it worked. I have ran the following commands and I am able to build the contract.&#xD;&#xA;&#xD;&#xA;    rustup toolchain install nightly-2022-08-15&#xD;&#xA;    rustup target add wasm32-unknown-unknown --toolchain nightly-2022-08-15&#xD;&#xA;    rustup component add rust-src --toolchain nightly-2022-08-15&#xD;&#xA;    cargo +nightly-2022-08-15 contract build" ContentLicense="CC BY-SA 4.0" />
  <row Id="18112" PostHistoryTypeId="2" PostId="4848" RevisionGUID="63bd2fde-7dde-4ebd-ac08-658e61c1a208" CreationDate="2022-09-15T17:42:01.040" UserId="3180" Text="I am working on an XC20 implementation of an existing ERC20. I am basing the contract off of the Astar [here](https://github.com/AstarNetwork/astar-frame/blob/polkadot-v0.9.28/examples/assets-erc20/XcBurrito.sol#L12). &#xD;&#xA;&#xD;&#xA;I noticed there is some code inherited from the ERC20 contract via the ERC20Wrapper contract that is not needed for this implementation. The ERC20Wrapper is usually used to create a wrapped version of an existing token, but in the case with XC20, the wrapped token already exists and just needs to be bridged to the underlying token. I am curious why the example still has this unused code. &#xD;&#xA;&#xD;&#xA;I implemented it with removing all of the extra ERC20 code and was able to get a successful run, being able to mint/burn my xcToken by depositing/withdrawing my underlying token. &#xD;&#xA;&#xD;&#xA;Here is my contract code for reference. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// SPDX-License-Identifier: MIT&#xD;&#xA;pragma solidity 0.8.13;&#xD;&#xA;&#xD;&#xA;import {IERC20} from './Dependencies/IERC20.sol';&#xD;&#xA;import {BAIToken} from './BAIToken.sol';&#xD;&#xA;import {Ownable} from &quot;./Dependencies/Ownable.sol&quot;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// This xBai interface was recieved from the astar XCM documentation &#xD;&#xA;// (https://github.com/AstarNetwork/astar-frame/blob/674356e7b611e561aaf9bf581452cab965cf8e87/examples/assets-erc20/XcBurrito.sol#L12)&#xD;&#xA;interface IERC20Plus is IERC20 {&#xD;&#xA;    function mint(address beneficiary, uint256 amount) external returns (bool);&#xD;&#xA;    function burn(address who, uint256 amount) external returns (bool);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;contract XBaiWrapper is Ownable{&#xD;&#xA;&#xD;&#xA;    IERC20 public immutable underlyingToken;&#xD;&#xA;    IERC20Plus public crossChainToken;&#xD;&#xA;&#xD;&#xA;    constructor(IERC20 _underlyingToken, IERC20Plus _crossChainToken) {&#xD;&#xA;        underlyingToken = _underlyingToken;&#xD;&#xA;        crossChainToken = _crossChainToken;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // --- Events --- &#xD;&#xA;&#xD;&#xA;    event xBaiMinted(address to, uint256 amount);&#xD;&#xA;    event xBaiBurned(address from, uint256 amount);&#xD;&#xA;    event baiSupplyChanged(uint256 newTotalSupply);&#xD;&#xA;&#xD;&#xA;    // --- Admin functions ---&#xD;&#xA;&#xD;&#xA;    function mintXBai(address _to, uint256 _amount) public onlyOwner {&#xD;&#xA;&#xD;&#xA;        require( // Make sure amount to mint is greater than 0&#xD;&#xA;            _amount != 0, &#xD;&#xA;            &quot;Mint amount must be greater than 0&quot;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        _mintCrossChainToken(_to, _amount);&#xD;&#xA;        emit xBaiMinted(_to, _amount);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    function burnXBai(address _from, uint256 _amount) public onlyOwner {&#xD;&#xA;&#xD;&#xA;        require( // Make sure amount to burn is greater than 0&#xD;&#xA;            _amount != 0, &#xD;&#xA;            &quot;Burn amount must be greater than 0&quot;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        _burnCrossChainToken(_from, _amount);&#xD;&#xA;        emit xBaiBurned(_from, _amount);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    //=====================================================================&#xD;&#xA;    // This functiontion is to be used if the total supply of xBai is &#xD;&#xA;    // greater than the amount of Bai in this contract. The caller should&#xD;&#xA;    // supply this contract with Bai so that the total supply of xBai is&#xD;&#xA;    // equal to this contract's balance of Bai. &#xD;&#xA;    //=====================================================================&#xD;&#xA;    function supplyBai(address _from, uint256 _amount) public onlyOwner {&#xD;&#xA;&#xD;&#xA;        require( // Make sure amount to recover is greater than 0&#xD;&#xA;            _amount != 0, &#xD;&#xA;            &quot;Burn amount must be greater than 0&quot;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        underlyingToken.transferFrom(_from, address(this), _amount);&#xD;&#xA;&#xD;&#xA;        uint256 newBaiSupply = underlyingToken.balanceOf(address(this));&#xD;&#xA;        emit baiSupplyChanged(newBaiSupply);&#xD;&#xA;    }  &#xD;&#xA;&#xD;&#xA;    //=====================================================================&#xD;&#xA;    // This function is to be used if the total supply of xBai is less than&#xD;&#xA;    // the amount of Bai in this contract. The call should recover enough &#xD;&#xA;    // Bai so this contract's balance of Bai is equal to the total supply&#xD;&#xA;    // of xBai. &#xD;&#xA;    //=====================================================================&#xD;&#xA;    function recoverBai(address _to, uint256 _amount) public onlyOwner {&#xD;&#xA;        &#xD;&#xA;        require( // Make sure amount to recover is greater than 0&#xD;&#xA;            _amount != 0, &#xD;&#xA;            &quot;Burn amount must be greater than 0&quot;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        underlyingToken.transfer(_to, _amount);&#xD;&#xA;&#xD;&#xA;        uint256 newBaiSupply = underlyingToken.balanceOf(address(this));&#xD;&#xA;        emit baiSupplyChanged(newBaiSupply);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // --- Public functions ---&#xD;&#xA;&#xD;&#xA;    //=====================================================================&#xD;&#xA;    // Allow a user to deposit underlying tokens and mint the corresponding &#xD;&#xA;    // number of wrapped tokens.&#xD;&#xA;    //=====================================================================&#xD;&#xA;    function depositFor(address _account, uint256 _amount) public returns (bool) {&#xD;&#xA;&#xD;&#xA;        require( // Make sure amount to deposit is greater than 0&#xD;&#xA;            _amount != 0, &#xD;&#xA;            &quot;Deposit amount must be greater than 0&quot;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        underlyingToken.transferFrom(msg.sender, address(this), _amount);&#xD;&#xA;        _mintCrossChainToken(_account, _amount);&#xD;&#xA;&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    //=====================================================================&#xD;&#xA;    // Allow a user to burn a number of wrapped tokens and withdraw the &#xD;&#xA;    // corresponding number of underlying tokens.&#xD;&#xA;    //=====================================================================&#xD;&#xA;    function withdrawTo(address _account, uint256 _amount) public returns (bool) {&#xD;&#xA;&#xD;&#xA;        require( // Make sure amount to withdraw is greater than 0&#xD;&#xA;            _amount != 0, &#xD;&#xA;            &quot;Withdrawal amount must be greater than 0&quot;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        _burnCrossChainToken(msg.sender, _amount);&#xD;&#xA;        underlyingToken.transfer(_account, _amount);&#xD;&#xA;&#xD;&#xA;        return true;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // --- Internal functions ---&#xD;&#xA;&#xD;&#xA;    function _mintCrossChainToken(address _to, uint256 _amount) internal {&#xD;&#xA;&#xD;&#xA;        // add here your pre-mint hooks hooks if needed&#xD;&#xA;        &#xD;&#xA;        require(&#xD;&#xA;            crossChainToken.mint(_to, _amount), &#xD;&#xA;            &quot;Minting xc token failed&quot;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        // add here your post-mint hooks hooks if needed&#xD;&#xA;        emit xBaiMinted(_to, _amount);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    function _burnCrossChainToken(address _from, uint256 _amount) internal {&#xD;&#xA;&#xD;&#xA;        // add here your pre-burn hooks hooks if needed&#xD;&#xA;&#xD;&#xA;        require(&#xD;&#xA;            crossChainToken.burn(_from, _amount), &#xD;&#xA;            &quot;Burning xc token failed&quot;&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        // add here your post-burn hooks hooks if needed&#xD;&#xA;        emit xBaiBurned(_from, _amount);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18114" PostHistoryTypeId="1" PostId="4848" RevisionGUID="63bd2fde-7dde-4ebd-ac08-658e61c1a208" CreationDate="2022-09-15T17:42:01.040" UserId="3180" Text="Why does the Astar XC20 wrapper example use the ERC20 wrapper functionality?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18115" PostHistoryTypeId="3" PostId="4848" RevisionGUID="63bd2fde-7dde-4ebd-ac08-658e61c1a208" CreationDate="2022-09-15T17:42:01.040" UserId="3180" Text="|smart-contract|xcm|astar|erc20|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18116" PostHistoryTypeId="2" PostId="4849" RevisionGUID="821d3faa-bce1-4756-83ba-74627de9a0b1" CreationDate="2022-09-15T18:38:45.220" UserId="529" Text="The BAI is existing ERC20 token on Astar EVM. In order to make that token xChain it needs to be connected via Astar precompile ERC20Plus with the new xcBAI asset. For this connection to happen we need some kind of contract to wrap the connection between evm token and xChain asset. I believe you understood this part and made this wrapper contract.&#xD;&#xA;&#xD;&#xA;You are right in saying that ERC20Wrapper.sol by OpenZeppelin is not mandatory for this operation. It is used in the example since existing UIs are familiar with ERC20Wrapper interface while your new wrapper contract will require custom implementation." ContentLicense="CC BY-SA 4.0" />
  <row Id="18118" PostHistoryTypeId="2" PostId="4850" RevisionGUID="2a33724e-31b6-4fac-a2b6-f2c0d97dd51e" CreationDate="2022-09-15T19:35:28.570" UserId="3181" Text="The title is pretty much it. Can I use Polkadot API to stake dot programmatically?&#xD;&#xA;&#xD;&#xA;Can't seem to find that in the docs." ContentLicense="CC BY-SA 4.0" />
  <row Id="18120" PostHistoryTypeId="1" PostId="4850" RevisionGUID="2a33724e-31b6-4fac-a2b6-f2c0d97dd51e" CreationDate="2022-09-15T19:35:28.570" UserId="3181" Text="Is it possible to stake DOT programmatically?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18121" PostHistoryTypeId="3" PostId="4850" RevisionGUID="2a33724e-31b6-4fac-a2b6-f2c0d97dd51e" CreationDate="2022-09-15T19:35:28.570" UserId="3181" Text="|polkadot-js|smart-contract|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18122" PostHistoryTypeId="2" PostId="4851" RevisionGUID="cae46c56-d93e-4a8d-817c-3af04fca8f78" CreationDate="2022-09-15T20:16:12.657" UserId="608" Text="Seems that I cannot find anything that explains how to do hard forks and revert the chain to previous block/state." ContentLicense="CC BY-SA 4.0" />
  <row Id="18124" PostHistoryTypeId="1" PostId="4851" RevisionGUID="cae46c56-d93e-4a8d-817c-3af04fca8f78" CreationDate="2022-09-15T20:16:12.657" UserId="608" Text="How to do a hard fork and go to a previous block on the chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18125" PostHistoryTypeId="3" PostId="4851" RevisionGUID="cae46c56-d93e-4a8d-817c-3af04fca8f78" CreationDate="2022-09-15T20:16:12.657" UserId="608" Text="|substrate-node|fork|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18126" PostHistoryTypeId="2" PostId="4852" RevisionGUID="b43390ea-c252-4b71-8eba-3142ed5d83d3" CreationDate="2022-09-15T20:44:40.813" UserId="703" Text="This answer [here][1] also contains more details on cross-contract testing. There are some new features that will be coming out soon to help make this process easier (such as exposing an API to a deployed contract).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/4379/2696" ContentLicense="CC BY-SA 4.0" />
  <row Id="18128" PostHistoryTypeId="6" PostId="4848" RevisionGUID="f933d42a-8c9c-407b-b242-8fe5b9673a55" CreationDate="2022-09-16T00:21:27.893" UserId="529" Comment="added evm tag" Text="|smart-contract|xcm|evm|astar|erc20|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18129" PostHistoryTypeId="24" PostId="4848" RevisionGUID="f933d42a-8c9c-407b-b242-8fe5b9673a55" CreationDate="2022-09-16T00:21:27.893" Comment="Proposed by 529 approved by 34 edit id of 284" ContentLicense="CC BY-SA 4.0" />
  <row Id="18130" PostHistoryTypeId="5" PostId="1247" RevisionGUID="c0cf1ec0-3e42-4d1e-b993-35416b8a3bb1" CreationDate="2022-09-16T00:21:39.523" UserId="151" Comment="Add description with link to official doc" Text="[Off-chain Workers](https://docs.substrate.io/fundamentals/offchain-operations/#off-chain-workers) run in their own Wasm execution environment outside of the Substrate runtime. This separation of concerns makes sure that block production is not impacted by long-running offchain tasks. However, because offchain workers are declared in the same code as the runtime, they can easily access on-chain state for their computations." ContentLicense="CC BY-SA 4.0" />
  <row Id="18131" PostHistoryTypeId="24" PostId="1247" RevisionGUID="c0cf1ec0-3e42-4d1e-b993-35416b8a3bb1" CreationDate="2022-09-16T00:21:39.523" Comment="Proposed by 151 approved by 34 edit id of 283" ContentLicense="CC BY-SA 4.0" />
  <row Id="18132" PostHistoryTypeId="2" PostId="4853" RevisionGUID="80c9dd44-d310-49a6-8589-27ea1607b46c" CreationDate="2022-09-16T00:43:04.677" UserId="2384" Text="In my node, `Balance` type is `u128`. I have following variable&#xD;&#xA;```rust&#xD;&#xA;let per_block = 100_000_000_000_000_000_u128;&#xD;&#xA;let total = 50_000_000_000_000_000_000_000_u128;&#xD;&#xA;let ratio = per_block.checked_div(total);&#xD;&#xA;&#xD;&#xA;assert!(ratio.is_some());&#xD;&#xA;let user_a = 10_000_000_000_000_000_000_000_u128 * ratio;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But ratio is `0` even in above case. How do I perform such calculation to get `user_a` finally?&#xD;&#xA;&#xD;&#xA;Playground: https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2021&amp;gist=3d556bfb809632b885bf008680dfec8e" ContentLicense="CC BY-SA 4.0" />
  <row Id="18134" PostHistoryTypeId="1" PostId="4853" RevisionGUID="80c9dd44-d310-49a6-8589-27ea1607b46c" CreationDate="2022-09-16T00:43:04.677" UserId="2384" Text="Perform Arithmetic operation with highly differing value" ContentLicense="CC BY-SA 4.0" />
  <row Id="18135" PostHistoryTypeId="3" PostId="4853" RevisionGUID="80c9dd44-d310-49a6-8589-27ea1607b46c" CreationDate="2022-09-16T00:43:04.677" UserId="2384" Text="|rust|balances|math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18136" PostHistoryTypeId="4" PostId="4853" RevisionGUID="c4c1c1bc-e3a1-456c-8eaf-034365b0e94b" CreationDate="2022-09-16T01:08:31.880" UserId="2384" Comment="edited title" Text="Division operation in `u128` results false value" ContentLicense="CC BY-SA 4.0" />
  <row Id="18137" PostHistoryTypeId="2" PostId="4854" RevisionGUID="91ed0ed2-7c2b-4467-b0e4-9cc230af86bd" CreationDate="2022-09-16T01:36:15.530" UserId="251" Text="Check out the [`per_things`](https://paritytech.github.io/substrate/master/sp_arithmetic/per_things/index.html).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You could use `Perquintill` here:&#xD;&#xA;```rust&#xD;&#xA;use sp_runtime::Perquintill;&#xD;&#xA;&#xD;&#xA;let ratio = Perquintill::from_rational(per_block, total);&#xD;&#xA;let user_a = 10_000_000_000_000_000_000_000_u128 * ratio;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18139" PostHistoryTypeId="5" PostId="4827" RevisionGUID="3e5907f8-abb8-494a-a79d-654dfce421d2" CreationDate="2022-09-16T01:43:48.350" UserId="251" Comment="deleted 122 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 and its original code is here https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd&#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot: Here is Moonbeam recent code on precompile https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;Here is another example of the ERC20 `transfer` function written as a precompile:&#xD;&#xA;```rust&#xD;&#xA;fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;    handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;    // Parse input.&#xD;&#xA;    let mut input = handle.read_input()?;&#xD;&#xA;    input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;    let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;    let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;    // Build call with origin.&#xD;&#xA;    {&#xD;&#xA;        let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;        let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;        let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;        // Dispatch call (if enough gas).&#xD;&#xA;        RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;            handle,&#xD;&#xA;            Some(origin).into(),&#xD;&#xA;            pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                value: amount,&#xD;&#xA;            },&#xD;&#xA;        )?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    LogsBuilder::new(handle.context().address)&#xD;&#xA;        .log3(&#xD;&#xA;            SELECTOR_LOG_TRANSFER,&#xD;&#xA;            handle.context().caller,&#xD;&#xA;            to,&#xD;&#xA;            EvmDataWriter::new().write(amount).build(),&#xD;&#xA;        )&#xD;&#xA;        .record(handle)?;&#xD;&#xA;&#xD;&#xA;    // Build output.&#xD;&#xA;    Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;it seems this &#xD;&#xA;`handle.record_log_costs_manual(3, 32)?;` has something to do with fee...&#xD;&#xA;&#xD;&#xA;inside precompiles/utils/src/lib.rs, I found how `record_log_costs_manual()` is implemented:&#xD;&#xA;```rust&#xD;&#xA;pub trait PrecompileHandleExt: PrecompileHandle {&#xD;&#xA;    #[must_use]&#xD;&#xA;    /// Record cost of a log manually.&#xD;&#xA;    /// This can be useful to record log costs early when their content have static size.&#xD;&#xA;    fn record_log_costs_manual(&amp;mut self, topics: usize, data_len: usize) -&gt; EvmResult;&#xD;&#xA;```&#xD;&#xA;how can I set this precompile function transaction fee to zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18140" PostHistoryTypeId="2" PostId="4855" RevisionGUID="a14f8c1b-88d3-4715-8677-224fa8eeed1e" CreationDate="2022-09-16T01:51:58.617" UserId="251" Text="It's a feature of PolkadotJS. It was pre-registered [here](https://vscode.dev/github.com/polkadot-js/docs/blob/a523a0157cd72b9c86350c17865fd97413782150/docs/api/examples/promise/typegen/src/interfaces/augment-types.ts#L575).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Type alias can't work here. But I'm wondering if `PoolId(u64)` works." ContentLicense="CC BY-SA 4.0" />
  <row Id="18142" PostHistoryTypeId="2" PostId="4856" RevisionGUID="3c660c7e-ecec-4cfd-8386-5e2efbaf5517" CreationDate="2022-09-16T02:03:06.503" UserId="2307" Text="I implemented contract-pallet in runtime:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct FetchRandomExtension;&#xD;&#xA;&#xD;&#xA;impl ChainExtension&lt;Runtime&gt; for FetchRandomExtension {&#xD;&#xA;	fn call&lt;E: Ext&gt;(func_id: u32, env: Environment&lt;E, InitState&gt;) -&gt; Result&lt;RetVal, DispatchError&gt;&#xD;&#xA;	where&#xD;&#xA;		&lt;E::T as SysConfig&gt;::AccountId: UncheckedFrom&lt;&lt;E::T as SysConfig&gt;::Hash&gt; + AsRef&lt;[u8]&gt;,&#xD;&#xA;	{&#xD;&#xA;		match func_id {&#xD;&#xA;            1101 =&gt; {&#xD;&#xA;                let mut env = env.buf_in_buf_out();&#xD;&#xA;				let (from, to, brand_id, amount) = env.read_as()?;&#xD;&#xA;				crate::Template1::do_something(amount)?;&#xD;&#xA;                trace!(&#xD;&#xA;                    target: &quot;runtime&quot;,&#xD;&#xA;                    &quot;[ChainExtension]|call|func_id:{:}&quot;,&#xD;&#xA;                    func_id&#xD;&#xA;                );&#xD;&#xA;				let slice_encode = true.encode();&#xD;&#xA;                env.write(&amp;slice_encode, false, None).map_err(|_| {&#xD;&#xA;                    DispatchError::Other(&quot;ChainExtension failed to call&quot;)&#xD;&#xA;                })?;&#xD;&#xA;            }&#xD;&#xA;			1102 =&gt; {&#xD;&#xA;				let mut env = env.buf_in_buf_out();&#xD;&#xA;				let (from, to, amount) = env.read_as()?;&#xD;&#xA;				crate::Template1::do_something(amount)?;&#xD;&#xA;                trace!(&#xD;&#xA;                    target: &quot;runtime&quot;,&#xD;&#xA;                    &quot;[ChainExtension]|call|func_id:{:}&quot;,&#xD;&#xA;                    func_id&#xD;&#xA;                );&#xD;&#xA;				let slice_encode = true.encode();&#xD;&#xA;                env.write(&amp;slice_encode, false, None).map_err(|_| {&#xD;&#xA;                    DispatchError::Other(&quot;ChainExtension failed to call&quot;)&#xD;&#xA;                })?;&#xD;&#xA;			}&#xD;&#xA;            _ =&gt; {&#xD;&#xA;                log::error!(&quot;Called an unregistered `func_id`: {:}&quot;, func_id);&#xD;&#xA;                return Err(DispatchError::Other(&quot;Unimplemented func_id&quot;))&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;		Ok(RetVal::Converging(0))&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn enabled() -&gt; bool {&#xD;&#xA;		true&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DepositPerItem: Balance = deposit(1, 0);&#xD;&#xA;	pub const DepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;	pub const DeletionQueueDepth: u32 = 128;&#xD;&#xA;	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * BlockWeights::get().max_block;&#xD;&#xA;	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type CallFilter = frame_support::traits::Nothing;&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = FetchRandomExtension;&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	// type ContractAccessWeight = pallet_contracts::DefaultContractAccessWeight&lt;RuntimeBlockWeights&gt;;&#xD;&#xA;	// type MaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;	// type RelaxedMaxCodeLen = ConstU32&lt;{ 512 * 1024 }&gt;;&#xD;&#xA;	// type MaxStorageKeyLen = ConstU32&lt;{ 512 * 1024 }&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;When I upload .contract file, console log 'f.rpc.contracts.instantiate is not a function' error. Then I click next after filling parameter for constructor, console log 'Your runtime does not expose the api.call.contractsApi.call runtime interfaces' error. I tried polkadotjs and contract-ui but both returned the same result. How can I fix these errors? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="18144" PostHistoryTypeId="1" PostId="4856" RevisionGUID="3c660c7e-ecec-4cfd-8386-5e2efbaf5517" CreationDate="2022-09-16T02:03:06.503" UserId="2307" Text="Upload compiled smart contract got 'f.rpc.contracts.instantiate is not a function'" ContentLicense="CC BY-SA 4.0" />
  <row Id="18145" PostHistoryTypeId="3" PostId="4856" RevisionGUID="3c660c7e-ecec-4cfd-8386-5e2efbaf5517" CreationDate="2022-09-16T02:03:06.503" UserId="2307" Text="|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18146" PostHistoryTypeId="5" PostId="4856" RevisionGUID="ad6ab5f4-d893-4421-872d-b9e117b78a2e" CreationDate="2022-09-16T02:10:24.533" UserId="2307" Comment="added 53 characters in body" Text="I implemented contract-pallet in runtime:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct FetchRandomExtension;&#xD;&#xA;&#xD;&#xA;impl ChainExtension&lt;Runtime&gt; for FetchRandomExtension {&#xD;&#xA;	fn call&lt;E: Ext&gt;(func_id: u32, env: Environment&lt;E, InitState&gt;) -&gt; Result&lt;RetVal, DispatchError&gt;&#xD;&#xA;	where&#xD;&#xA;		&lt;E::T as SysConfig&gt;::AccountId: UncheckedFrom&lt;&lt;E::T as SysConfig&gt;::Hash&gt; + AsRef&lt;[u8]&gt;,&#xD;&#xA;	{&#xD;&#xA;		match func_id {&#xD;&#xA;            1101 =&gt; {&#xD;&#xA;                let mut env = env.buf_in_buf_out();&#xD;&#xA;				let (from, to, brand_id, amount) = env.read_as()?;&#xD;&#xA;				crate::Template1::do_something(amount)?;&#xD;&#xA;                trace!(&#xD;&#xA;                    target: &quot;runtime&quot;,&#xD;&#xA;                    &quot;[ChainExtension]|call|func_id:{:}&quot;,&#xD;&#xA;                    func_id&#xD;&#xA;                );&#xD;&#xA;				let slice_encode = true.encode();&#xD;&#xA;                env.write(&amp;slice_encode, false, None).map_err(|_| {&#xD;&#xA;                    DispatchError::Other(&quot;ChainExtension failed to call&quot;)&#xD;&#xA;                })?;&#xD;&#xA;            }&#xD;&#xA;			1102 =&gt; {&#xD;&#xA;				let mut env = env.buf_in_buf_out();&#xD;&#xA;				let (from, to, amount) = env.read_as()?;&#xD;&#xA;				crate::Template1::do_something(amount)?;&#xD;&#xA;                trace!(&#xD;&#xA;                    target: &quot;runtime&quot;,&#xD;&#xA;                    &quot;[ChainExtension]|call|func_id:{:}&quot;,&#xD;&#xA;                    func_id&#xD;&#xA;                );&#xD;&#xA;				let slice_encode = true.encode();&#xD;&#xA;                env.write(&amp;slice_encode, false, None).map_err(|_| {&#xD;&#xA;                    DispatchError::Other(&quot;ChainExtension failed to call&quot;)&#xD;&#xA;                })?;&#xD;&#xA;			}&#xD;&#xA;            _ =&gt; {&#xD;&#xA;                log::error!(&quot;Called an unregistered `func_id`: {:}&quot;, func_id);&#xD;&#xA;                return Err(DispatchError::Other(&quot;Unimplemented func_id&quot;))&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;		Ok(RetVal::Converging(0))&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn enabled() -&gt; bool {&#xD;&#xA;		true&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DepositPerItem: Balance = deposit(1, 0);&#xD;&#xA;	pub const DepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;	pub const DeletionQueueDepth: u32 = 128;&#xD;&#xA;	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * BlockWeights::get().max_block;&#xD;&#xA;	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type CallFilter = frame_support::traits::Nothing;&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = FetchRandomExtension;&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	// type ContractAccessWeight = pallet_contracts::DefaultContractAccessWeight&lt;RuntimeBlockWeights&gt;;&#xD;&#xA;	// type MaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;	// type RelaxedMaxCodeLen = ConstU32&lt;{ 512 * 1024 }&gt;;&#xD;&#xA;	// type MaxStorageKeyLen = ConstU32&lt;{ 512 * 1024 }&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;When I upload .contract file, console log 'f.rpc.contracts.instantiate is not a function' error. Then I click next after filling parameter for constructor, console log 'Your runtime does not expose the api.call.contractsApi.call runtime interfaces' error. I tried polkadotjs and contract-ui but both returned the same result. How can I fix these errors? Thanks&#xD;&#xA;&#xD;&#xA;Btw I'm using node template tag polkadot-v0.9.17." ContentLicense="CC BY-SA 4.0" />
  <row Id="18147" PostHistoryTypeId="12" PostId="4856" RevisionGUID="537c223f-f036-42ed-9ad8-b8235eb9c001" CreationDate="2022-09-16T02:22:23.677" UserId="2307" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2307,&quot;DisplayName&quot;:&quot;marethyu&quot;}]}" />
  <row Id="18148" PostHistoryTypeId="2" PostId="4857" RevisionGUID="cda84bc9-ae35-4536-9712-9f5627848fe9" CreationDate="2022-09-16T03:05:20.847" UserId="544" Text="According to the [polkadot.js docs](https://polkadot.js.org/docs/keyring/start/sign-verify/#using-known-pairs), both `ed25519` and `ecdsa` signatures are deterministic (given the message and private key, it always produces the same signature). However `sr25519` is not.&#xD;&#xA;&#xD;&#xA;I understand a nonce value is usually required to sign a message. It's the source of the randomness of the signature. We can use the RFC6979 trick in `ecdsa` to generate deterministic nonce, but why cannot we use the same trick in `sr25519`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18150" PostHistoryTypeId="1" PostId="4857" RevisionGUID="cda84bc9-ae35-4536-9712-9f5627848fe9" CreationDate="2022-09-16T03:05:20.847" UserId="544" Text="Why are sr25519 signatures non-deterministic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18151" PostHistoryTypeId="3" PostId="4857" RevisionGUID="cda84bc9-ae35-4536-9712-9f5627848fe9" CreationDate="2022-09-16T03:05:20.847" UserId="544" Text="|cryptography|sr25519|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18152" PostHistoryTypeId="2" PostId="4858" RevisionGUID="d7ed5675-245e-4855-a32b-e5ceb124e3aa" CreationDate="2022-09-16T04:15:54.497" UserId="1789" Text="I tried to use ansi_term to print logs because it is used in the Substrate repository for logging: &#xD;&#xA;https://github.com/paritytech/substrate/blob/fece0657f20e15df94be5833b164dfacd44823eb/client/informant/src/lib.rs&#xD;&#xA;which is mentioned also in https://substrate.stackexchange.com/questions/3061/how-to-change-colors-of-node-terminal-output&#xD;&#xA;```&#xD;&#xA;use ansi_term::Colour;&#xD;&#xA;...&#xD;&#xA; info!(&quot;♻️  Reorg on #{},{} to #{},{}, common ancestor #{},{}&quot;,&#xD;&#xA;						Colour::Red.bold().paint(format!(&quot;{}&quot;, last_num)),...);&#xD;&#xA;```&#xD;&#xA;then I found `ansi_term` cannot be used in my parachain precompile because my runtime must support `no_std` as I see `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]` in the beginning of my precompile lib.rs file.&#xD;&#xA;&#xD;&#xA;Substrate docs does not say much about color logs:&#xD;&#xA;https://docs.substrate.io/test/debug/&#xD;&#xA;&#xD;&#xA;So how can I make colorful logs and support `no_std`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18154" PostHistoryTypeId="1" PostId="4858" RevisionGUID="d7ed5675-245e-4855-a32b-e5ceb124e3aa" CreationDate="2022-09-16T04:15:54.497" UserId="1789" Text="How to print color log in terminal with no_std requirement?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18155" PostHistoryTypeId="3" PostId="4858" RevisionGUID="d7ed5675-245e-4855-a32b-e5ceb124e3aa" CreationDate="2022-09-16T04:15:54.497" UserId="1789" Text="|substrate-node-template|runtime|log|precompile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18156" PostHistoryTypeId="2" PostId="4859" RevisionGUID="6763f29a-3a90-484e-bebb-31e499388709" CreationDate="2022-09-16T04:31:37.467" UserId="251" Text="You could use the color code directly.&#xD;&#xA;&#xD;&#xA;Those crates just made a wrapper for the color code.&#xD;&#xA;&#xD;&#xA;Check:&#xD;&#xA;https://stackoverflow.com/questions/4842424/list-of-ansi-color-escape-sequences&#xD;&#xA;&#xD;&#xA;https://chrisyeh96.github.io/2020/03/28/terminal-colors.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="18162" PostHistoryTypeId="5" PostId="4859" RevisionGUID="7030473c-4369-4499-9246-404863c05cb6" CreationDate="2022-09-16T04:38:43.197" UserId="251" Comment="added 178 characters in body" Text="You could use the color code directly.&#xD;&#xA;&#xD;&#xA;Those crates just made a wrapper for the color code.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Check:&#xD;&#xA;- https://stackoverflow.com/questions/4842424/list-of-ansi-color-escape-sequences&#xD;&#xA;- https://chrisyeh96.github.io/2020/03/28/terminal-colors.html&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;```rust&#xD;&#xA;fn main() {&#xD;&#xA;    // you could replace `println!` with `log::info!` in no_std&#xD;&#xA;    println!(&quot;\u{1b}[35mtest\u{001b}[0ming&quot;);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iSFq5.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18166" PostHistoryTypeId="5" PostId="4827" RevisionGUID="0fb7242d-b10b-4ee0-ac9a-ac3ac46a1780" CreationDate="2022-09-16T04:53:30.700" UserId="1789" Comment="added 295 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 and its original code is here https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd&#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot: Here is Moonbeam recent code on precompile https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;My file structure:&#xD;&#xA;```&#xD;&#xA;project/precompiles&#xD;&#xA;|- balances-erc20 -&gt; src/lib.rs&#xD;&#xA;|- utils -&gt; src/lib.rs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From Parallel Finance's `transfer()` function in  precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;    handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;    // Parse input.&#xD;&#xA;    let mut input = handle.read_input()?;&#xD;&#xA;    input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;    let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;    let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;    // Build call with origin.&#xD;&#xA;    {&#xD;&#xA;        let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;        let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;        let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;        // Dispatch call (if enough gas).&#xD;&#xA;        RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;            handle,&#xD;&#xA;            Some(origin).into(),&#xD;&#xA;            pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                value: amount,&#xD;&#xA;            },&#xD;&#xA;        )?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    LogsBuilder::new(handle.context().address)&#xD;&#xA;        .log3(&#xD;&#xA;            SELECTOR_LOG_TRANSFER,&#xD;&#xA;            handle.context().caller,&#xD;&#xA;            to,&#xD;&#xA;            EvmDataWriter::new().write(amount).build(),&#xD;&#xA;        )&#xD;&#xA;        .record(handle)?;&#xD;&#xA;&#xD;&#xA;    // Build output.&#xD;&#xA;    Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found out this `RuntimeHelper::&lt;Runtime&gt;::try_dispatch()` function was imported from my precompiles/utils/src/lib.rs:&#xD;&#xA;&#xD;&#xA;inside try_dispatch() in precompiles/utils/src/lib.rs ... see https://github.com/parallel-finance/parallel/blob/master/precompiles/utils/src/lib.rs#L171:&#xD;&#xA;```rust&#xD;&#xA;let required_gas = Runtime::GasWeightMapping::weight_to_gas(dispatch_info.weight);&#xD;&#xA;```&#xD;&#xA;so I tried to set that required_gas to 0 in my precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;let mut call = pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;   dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;   value: amount,&#xD;&#xA;};&#xD;&#xA;call.get_dispatch_info().weight= 0;&#xD;&#xA;&#xD;&#xA;RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;   handle,&#xD;&#xA;   Some(origin).into(),&#xD;&#xA;   call,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;But that does not change the gas fee!?? Why?&#xD;&#xA;&#xD;&#xA;How can I set this gas fee to zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18167" PostHistoryTypeId="5" PostId="4858" RevisionGUID="ad2aa68c-6654-4113-b457-12d5f76d4f89" CreationDate="2022-09-16T05:02:45.510" UserId="1789" Comment="added 195 characters in body" Text="I tried to use ansi_term to print logs because it is used in the Substrate repository for logging: &#xD;&#xA;https://github.com/paritytech/substrate/blob/fece0657f20e15df94be5833b164dfacd44823eb/client/informant/src/lib.rs&#xD;&#xA;which is mentioned also in https://substrate.stackexchange.com/questions/3061/how-to-change-colors-of-node-terminal-output&#xD;&#xA;```&#xD;&#xA;use ansi_term::Colour;&#xD;&#xA;...&#xD;&#xA; info!(&quot;♻️  Reorg on #{},{} to #{},{}, common ancestor #{},{}&quot;,&#xD;&#xA;						Colour::Red.bold().paint(format!(&quot;{}&quot;, last_num)),...);&#xD;&#xA;```&#xD;&#xA;then I found `ansi_term` cannot be used in my parachain precompile because my runtime must support `no_std` as I see `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]` in the beginning of my precompile lib.rs file.&#xD;&#xA;&#xD;&#xA;Substrate docs does not say much about color logs:&#xD;&#xA;https://docs.substrate.io/test/debug/&#xD;&#xA;&#xD;&#xA;I am aware of using `log::warn!()` and `log::error!()` AND running your parachain with `--execution Native` can produce a tiny colorful log in yellow and red... but that is not really enough.&#xD;&#xA;&#xD;&#xA;So how can I make colorful logs and support `no_std`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18168" PostHistoryTypeId="50" PostId="4309" RevisionGUID="fe4fa2a9-8183-4166-9793-c613a38af2aa" CreationDate="2022-09-16T06:02:30.330" UserId="-1" />
  <row Id="18169" PostHistoryTypeId="50" PostId="4306" RevisionGUID="99797de2-382f-47be-9f87-274edc6f006c" CreationDate="2022-09-16T07:07:05.510" UserId="-1" />
  <row Id="18170" PostHistoryTypeId="5" PostId="4838" RevisionGUID="370821ad-d954-471a-acb5-8cd92bb5cedb" CreationDate="2022-09-16T07:48:13.370" UserId="167" Comment="added 28 characters in body" Text="Since the [9.2.2 release of Polkadot JS API](https://github.com/polkadot-js/api/blob/master/CHANGELOG.md#922-aug-16-2022), we need to not only update all apis to the latest, but also some are replaced. in my case:&#xD;&#xA;&#xD;&#xA;`api.rpc.payment.queryInfo`&#xD;&#xA;&#xD;&#xA;is replaced with&#xD;&#xA;&#xD;&#xA;`api.call.transactionPaymentApi.queryInfo`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18175" PostHistoryTypeId="5" PostId="4827" RevisionGUID="e5328758-4bb1-4218-964d-ce1c04581cd0" CreationDate="2022-09-16T08:09:24.953" UserId="1789" Comment="added 286 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 and its original code is here https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd&#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot: Here is Moonbeam recent code on precompile https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;My file structure:&#xD;&#xA;```&#xD;&#xA;project/precompiles&#xD;&#xA;|- balances-erc20 -&gt; src/lib.rs&#xD;&#xA;|- utils -&gt; src/lib.rs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From Parallel Finance's `transfer()` function in  precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;    handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;    // Parse input.&#xD;&#xA;    let mut input = handle.read_input()?;&#xD;&#xA;    input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;    let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;    let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;    // Build call with origin.&#xD;&#xA;    {&#xD;&#xA;        let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;        let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;        let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;        // Dispatch call (if enough gas).&#xD;&#xA;        RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;            handle,&#xD;&#xA;            Some(origin).into(),&#xD;&#xA;            pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                value: amount,&#xD;&#xA;            },&#xD;&#xA;        )?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    LogsBuilder::new(handle.context().address)&#xD;&#xA;        .log3(&#xD;&#xA;            SELECTOR_LOG_TRANSFER,&#xD;&#xA;            handle.context().caller,&#xD;&#xA;            to,&#xD;&#xA;            EvmDataWriter::new().write(amount).build(),&#xD;&#xA;        )&#xD;&#xA;        .record(handle)?;&#xD;&#xA;&#xD;&#xA;    // Build output.&#xD;&#xA;    Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found out this `RuntimeHelper::&lt;Runtime&gt;::try_dispatch()` function was imported from my precompiles/utils/src/lib.rs:&#xD;&#xA;&#xD;&#xA;inside try_dispatch() in precompiles/utils/src/lib.rs ... see https://github.com/parallel-finance/parallel/blob/master/precompiles/utils/src/lib.rs#L171:&#xD;&#xA;```rust&#xD;&#xA;pub fn try_dispatch&lt;Call&gt;(...){&#xD;&#xA;  let call = Runtime::Call::from(call);&#xD;&#xA;  let dispatch_info = call.get_dispatch_info();&#xD;&#xA;&#xD;&#xA;  let required_gas = Runtime::GasWeightMapping::weight_to_gas(dispatch_info.weight);&#xD;&#xA;&#xD;&#xA;  let used_weight = call.dispatch(origin)&#xD;&#xA;      .map_err(|e| revert(alloc::format!(&quot;Dispatched call failed with error: {:?}&quot;, e)))?&#xD;&#xA;      .actual_weight;&#xD;&#xA;```&#xD;&#xA;so I tried to set that required_gas to 0 in my precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;let mut call = pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;   dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;   value: amount,&#xD;&#xA;};&#xD;&#xA;call.get_dispatch_info().weight= 0;&#xD;&#xA;&#xD;&#xA;RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;   handle,&#xD;&#xA;   Some(origin).into(),&#xD;&#xA;   call,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;But that does not change the gas fee!?? Why?&#xD;&#xA;&#xD;&#xA;How can I set this gas fee to zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18180" PostHistoryTypeId="13" PostId="4856" RevisionGUID="406b8d87-37ea-4811-a039-c34fc1b4a80f" CreationDate="2022-09-16T09:08:19.107" UserId="2307" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2307,&quot;DisplayName&quot;:&quot;marethyu&quot;}]}" />
  <row Id="18181" PostHistoryTypeId="5" PostId="4856" RevisionGUID="244fee4a-4a2e-4518-8b3a-2ba15668e880" CreationDate="2022-09-16T09:11:13.600" UserId="2307" Comment="deleted 1126 characters in body" Text="I implemented contract-pallet in runtime:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use pallet_contracts::migration;&#xD;&#xA;&#xD;&#xA;pub struct Migrations;&#xD;&#xA;impl OnRuntimeUpgrade for Migrations {&#xD;&#xA;fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA; migration::migrate::&lt;Runtime&gt;()&#xD;&#xA;}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DepositPerItem: Balance = deposit(1, 0);&#xD;&#xA;	pub const DepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;	pub const MaxValueSize: u32 = 16 * 1024;&#xD;&#xA;	pub const DeletionQueueDepth: u32 = 128;&#xD;&#xA;	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * BlockWeights::get().max_block;&#xD;&#xA;	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type CallFilter = Nothing;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type ContractAccessWeight = pallet_contracts::DefaultContractAccessWeight&lt;BlockWeights&gt;;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 128 * 1024 }&gt;;&#xD;&#xA;	type RelaxedMaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;	type MaxStorageKeyLen = ConstU32&lt;128&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;When I upload .contract file, console log 'f.rpc.contracts.instantiate is not a function' error. Then I click next after filling parameter for constructor, console log 'The runtime does not expose api.tx.contracts.instantiateWithCode with storageDepositLimit' error. I tried polkadotjs and contract-ui but both returned the same result. How can I fix these errors? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="18182" PostHistoryTypeId="5" PostId="4827" RevisionGUID="2fec0ab1-e29f-4614-b45a-b23009311555" CreationDate="2022-09-16T10:12:24.960" UserId="1789" Comment="added 340 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 and its original code is here https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd&#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot... I think the Zero fee shown on MetaMask in the video above is caused by setting pallet_evm::Config:&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;  type FeeCalculator = ();// FixedGasPrice;&#xD;&#xA;  type GasWeightMapping = ();// HeroGasWeightMapping;&#xD;&#xA;```&#xD;&#xA;BUT in my parachain, that makes such feeless transactions not to be accepted showhow...&#xD;&#xA;&#xD;&#xA;Here is Moonbeam recent code on precompile https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;My file structure:&#xD;&#xA;```&#xD;&#xA;project/precompiles&#xD;&#xA;|- balances-erc20 -&gt; src/lib.rs&#xD;&#xA;|- utils -&gt; src/lib.rs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From Parallel Finance's `transfer()` function in  precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;    handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;    // Parse input.&#xD;&#xA;    let mut input = handle.read_input()?;&#xD;&#xA;    input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;    let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;    let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;    // Build call with origin.&#xD;&#xA;    {&#xD;&#xA;        let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;        let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;        let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;        // Dispatch call (if enough gas).&#xD;&#xA;        RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;            handle,&#xD;&#xA;            Some(origin).into(),&#xD;&#xA;            pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                value: amount,&#xD;&#xA;            },&#xD;&#xA;        )?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    LogsBuilder::new(handle.context().address)&#xD;&#xA;        .log3(&#xD;&#xA;            SELECTOR_LOG_TRANSFER,&#xD;&#xA;            handle.context().caller,&#xD;&#xA;            to,&#xD;&#xA;            EvmDataWriter::new().write(amount).build(),&#xD;&#xA;        )&#xD;&#xA;        .record(handle)?;&#xD;&#xA;&#xD;&#xA;    // Build output.&#xD;&#xA;    Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found out this `RuntimeHelper::&lt;Runtime&gt;::try_dispatch()` function was imported from my precompiles/utils/src/lib.rs:&#xD;&#xA;&#xD;&#xA;inside try_dispatch() in precompiles/utils/src/lib.rs ... see https://github.com/parallel-finance/parallel/blob/master/precompiles/utils/src/lib.rs#L171:&#xD;&#xA;```rust&#xD;&#xA;pub fn try_dispatch&lt;Call&gt;(...){&#xD;&#xA;  let call = Runtime::Call::from(call);&#xD;&#xA;  let dispatch_info = call.get_dispatch_info();&#xD;&#xA;&#xD;&#xA;  let required_gas = Runtime::GasWeightMapping::weight_to_gas(dispatch_info.weight);&#xD;&#xA;&#xD;&#xA;  let used_weight = call.dispatch(origin)&#xD;&#xA;      .map_err(|e| revert(alloc::format!(&quot;Dispatched call failed with error: {:?}&quot;, e)))?&#xD;&#xA;      .actual_weight;&#xD;&#xA;```&#xD;&#xA;so I tried to set that required_gas to 0 in my precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;let mut call = pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;   dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;   value: amount,&#xD;&#xA;};&#xD;&#xA;call.get_dispatch_info().weight= 0;&#xD;&#xA;&#xD;&#xA;RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;   handle,&#xD;&#xA;   Some(origin).into(),&#xD;&#xA;   call,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;But that does not change the gas fee!?? Why?&#xD;&#xA;&#xD;&#xA;How can I set this gas fee to zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18183" PostHistoryTypeId="5" PostId="4827" RevisionGUID="af9ff1ad-d0b0-4a71-b372-9861cb661bcd" CreationDate="2022-09-16T10:27:00.780" UserId="1789" Comment="added 79 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 and its original code is here https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd&#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot... I think the Zero fee shown on MetaMask in the video above is caused by setting pallet_evm::Config:&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;  type FeeCalculator = ();// FixedGasPrice;&#xD;&#xA;  type GasWeightMapping = ();// HeroGasWeightMapping;&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;BUT that makes ALL transactions gasless! Not good. And in my parachain, that makes such feeless transactions not to be accepted by the validators somehow...&#xD;&#xA;&#xD;&#xA;Here is Moonbeam recent code on precompile https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;My file structure:&#xD;&#xA;```&#xD;&#xA;project/precompiles&#xD;&#xA;|- balances-erc20 -&gt; src/lib.rs&#xD;&#xA;|- utils -&gt; src/lib.rs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From Parallel Finance's `transfer()` function in  precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;    handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;    // Parse input.&#xD;&#xA;    let mut input = handle.read_input()?;&#xD;&#xA;    input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;    let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;    let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;    // Build call with origin.&#xD;&#xA;    {&#xD;&#xA;        let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;        let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;        let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;        // Dispatch call (if enough gas).&#xD;&#xA;        RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;            handle,&#xD;&#xA;            Some(origin).into(),&#xD;&#xA;            pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                value: amount,&#xD;&#xA;            },&#xD;&#xA;        )?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    LogsBuilder::new(handle.context().address)&#xD;&#xA;        .log3(&#xD;&#xA;            SELECTOR_LOG_TRANSFER,&#xD;&#xA;            handle.context().caller,&#xD;&#xA;            to,&#xD;&#xA;            EvmDataWriter::new().write(amount).build(),&#xD;&#xA;        )&#xD;&#xA;        .record(handle)?;&#xD;&#xA;&#xD;&#xA;    // Build output.&#xD;&#xA;    Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found out this `RuntimeHelper::&lt;Runtime&gt;::try_dispatch()` function was imported from my precompiles/utils/src/lib.rs:&#xD;&#xA;&#xD;&#xA;inside try_dispatch() in precompiles/utils/src/lib.rs ... see https://github.com/parallel-finance/parallel/blob/master/precompiles/utils/src/lib.rs#L171:&#xD;&#xA;```rust&#xD;&#xA;pub fn try_dispatch&lt;Call&gt;(...){&#xD;&#xA;  let call = Runtime::Call::from(call);&#xD;&#xA;  let dispatch_info = call.get_dispatch_info();&#xD;&#xA;&#xD;&#xA;  let required_gas = Runtime::GasWeightMapping::weight_to_gas(dispatch_info.weight);&#xD;&#xA;&#xD;&#xA;  let used_weight = call.dispatch(origin)&#xD;&#xA;      .map_err(|e| revert(alloc::format!(&quot;Dispatched call failed with error: {:?}&quot;, e)))?&#xD;&#xA;      .actual_weight;&#xD;&#xA;```&#xD;&#xA;so I tried to set that required_gas to 0 in my precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;let mut call = pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;   dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;   value: amount,&#xD;&#xA;};&#xD;&#xA;call.get_dispatch_info().weight= 0;&#xD;&#xA;&#xD;&#xA;RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;   handle,&#xD;&#xA;   Some(origin).into(),&#xD;&#xA;   call,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;But that does not change the gas fee!?? Why?&#xD;&#xA;&#xD;&#xA;How can I set this gas fee to zero?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18184" PostHistoryTypeId="5" PostId="4827" RevisionGUID="7381829e-5c1b-4ad3-8bfc-fbc4d7a5ba41" CreationDate="2022-09-16T10:38:57.097" UserId="1789" Comment="added 230 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 and its original code is here https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd&#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot... I think the Zero fee shown on MetaMask in the video above is caused by setting pallet_evm::Config:&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;  type FeeCalculator = ();// FixedGasPrice;&#xD;&#xA;  type GasWeightMapping = ();// HeroGasWeightMapping;&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;BUT that makes ALL transactions gasless! Not good. And in my parachain, that makes such feeless transactions not to be accepted by the validators somehow...&#xD;&#xA;&#xD;&#xA;Here is Moonbeam recent code on precompile https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;My file structure:&#xD;&#xA;```&#xD;&#xA;project/precompiles&#xD;&#xA;|- balances-erc20 -&gt; src/lib.rs&#xD;&#xA;|- utils -&gt; src/lib.rs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From Parallel Finance's `transfer()` function in  precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;    handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;    // Parse input.&#xD;&#xA;    let mut input = handle.read_input()?;&#xD;&#xA;    input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;    let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;    let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;    // Build call with origin.&#xD;&#xA;    {&#xD;&#xA;        let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;        let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;        let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;        // Dispatch call (if enough gas).&#xD;&#xA;        RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;            handle,&#xD;&#xA;            Some(origin).into(),&#xD;&#xA;            pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                value: amount,&#xD;&#xA;            },&#xD;&#xA;        )?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    LogsBuilder::new(handle.context().address)&#xD;&#xA;        .log3(&#xD;&#xA;            SELECTOR_LOG_TRANSFER,&#xD;&#xA;            handle.context().caller,&#xD;&#xA;            to,&#xD;&#xA;            EvmDataWriter::new().write(amount).build(),&#xD;&#xA;        )&#xD;&#xA;        .record(handle)?;&#xD;&#xA;&#xD;&#xA;    // Build output.&#xD;&#xA;    Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found out this `RuntimeHelper::&lt;Runtime&gt;::try_dispatch()` function was imported from my precompiles/utils/src/lib.rs:&#xD;&#xA;&#xD;&#xA;inside try_dispatch() in precompiles/utils/src/lib.rs ... see https://github.com/parallel-finance/parallel/blob/master/precompiles/utils/src/lib.rs#L171:&#xD;&#xA;```rust&#xD;&#xA;pub fn try_dispatch&lt;Call&gt;(...){&#xD;&#xA;  let call = Runtime::Call::from(call);&#xD;&#xA;  let dispatch_info = call.get_dispatch_info();&#xD;&#xA;&#xD;&#xA;  let required_gas = Runtime::GasWeightMapping::weight_to_gas(dispatch_info.weight);&#xD;&#xA;&#xD;&#xA;  let used_weight = call.dispatch(origin)&#xD;&#xA;      .map_err(|e| revert(alloc::format!(&quot;Dispatched call failed with error: {:?}&quot;, e)))?&#xD;&#xA;      .actual_weight;&#xD;&#xA;```&#xD;&#xA;so I tried to set that required_gas to 0 in my precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;let mut call = pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;   dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;   value: amount,&#xD;&#xA;};&#xD;&#xA;call.get_dispatch_info().weight= 0;&#xD;&#xA;&#xD;&#xA;RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;   handle,&#xD;&#xA;   Some(origin).into(),&#xD;&#xA;   call,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;But that does not change the gas fee!??&#xD;&#xA;&#xD;&#xA;For invoking token `transfer` function, It seems the gas/fee comes automatically from the pallet_balances's weight macro... perhaps I can write my own doSomething() function and remove that weight macro? &#xD;&#xA;&#xD;&#xA;But how to set a function's weight from a functional argument?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18189" PostHistoryTypeId="2" PostId="4865" RevisionGUID="dd8e551c-6cfc-454a-a981-d700953156de" CreationDate="2022-09-16T12:38:10.973" UserId="3184" Text="I am trying to get the stash id of a validator from the host of the node. I have a list of candidate validators. How would I achieve this?&#xD;&#xA;&#xD;&#xA;I tried the following using Polkadot.js&#xD;&#xA;```&#xD;&#xA;var validator = &quot;H3DL157HL7DkvV2kXocanmKaGXNyQphUDVW33Fnfk8KNhsv&quot; // dummy key&#xD;&#xA;var hasKey = await api.rpc.author.hasKey(validator, &quot;acco&quot;)&#xD;&#xA;```&#xD;&#xA;But it always returns false even from a known match&#xD;&#xA;&#xD;&#xA;when running it via shell:&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;athor_hasKey&quot;, &quot;params&quot;:[&quot;H3DL157HL7DkvV2kXocanmKaGXNyQphUDVW33Fnfk8KNhsv&quot;, &quot;acco&quot;]}' http://localhost:9933&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the following error&#xD;&#xA;```&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;invalid hex character: H, at 0 at line 1 column 49&quot;},&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I also tried the keys returned from api.query.session.nextKeys, but I did not get a match. Not sure what I should use." ContentLicense="CC BY-SA 4.0" />
  <row Id="18191" PostHistoryTypeId="1" PostId="4865" RevisionGUID="dd8e551c-6cfc-454a-a981-d700953156de" CreationDate="2022-09-16T12:38:10.973" UserId="3184" Text="How to associate stash accounts with host via RPC/JS/shell" ContentLicense="CC BY-SA 4.0" />
  <row Id="18192" PostHistoryTypeId="3" PostId="4865" RevisionGUID="dd8e551c-6cfc-454a-a981-d700953156de" CreationDate="2022-09-16T12:38:10.973" UserId="3184" Text="|rpc|validator|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18193" PostHistoryTypeId="2" PostId="4866" RevisionGUID="17738e8a-30af-4a30-befe-e2fcf8aa18ff" CreationDate="2022-09-16T12:39:09.793" UserId="2555" Text="Is there a way to tell if a given Polkadot's address can be used in a nomination transaction? (aka if it's a validator) &#xD;&#xA;&#xD;&#xA;It seems like the chain itself doesn't perform any checks and one can nominate to any account on the network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18195" PostHistoryTypeId="1" PostId="4866" RevisionGUID="17738e8a-30af-4a30-befe-e2fcf8aa18ff" CreationDate="2022-09-16T12:39:09.793" UserId="2555" Text="How to check if an address is a validator?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18196" PostHistoryTypeId="3" PostId="4866" RevisionGUID="17738e8a-30af-4a30-befe-e2fcf8aa18ff" CreationDate="2022-09-16T12:39:09.793" UserId="2555" Text="|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18197" PostHistoryTypeId="2" PostId="4867" RevisionGUID="6e7c8206-b73f-43aa-9093-1921b84f1d9f" CreationDate="2022-09-16T13:01:00.163" UserId="3185" Text="&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am a blockchain developer.Trying to explore blockchain interoperability.&#xD;&#xA;&#xD;&#xA;Using substrate node template (https://github.com/substrate-developer-hub/substrate-node-template), start a local substrate based blockchain then install a fronted template to interact with local blockchain node.This fronted template is responsible for submit transaction and get result.This part i have achieved.&#xD;&#xA;&#xD;&#xA;Sorry for asking silly questions,but I am not able to understand how I can create parachain and relay chain and two blockchain communicate.&#xD;&#xA;&#xD;&#xA;Pls explain.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18199" PostHistoryTypeId="1" PostId="4867" RevisionGUID="6e7c8206-b73f-43aa-9093-1921b84f1d9f" CreationDate="2022-09-16T13:01:00.163" UserId="3185" Text="Blockchain interoperability with polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="18200" PostHistoryTypeId="3" PostId="4867" RevisionGUID="6e7c8206-b73f-43aa-9093-1921b84f1d9f" CreationDate="2022-09-16T13:01:00.163" UserId="3185" Text="|polkadot|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18201" PostHistoryTypeId="2" PostId="4868" RevisionGUID="87dd9256-b469-41fc-9cc9-75cd637f8939" CreationDate="2022-09-16T13:33:40.647" UserId="29" Text="There is a tutorial on this here:&#xD;&#xA;- https://docs.substrate.io/tutorials/connect-other-chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="18203" PostHistoryTypeId="2" PostId="4869" RevisionGUID="49facfc6-63bb-42b9-bd12-6fd68963342c" CreationDate="2022-09-16T14:08:16.807" UserId="620" Text="Yes, you can check if it is a key in the `Validators` storage map." ContentLicense="CC BY-SA 4.0" />
  <row Id="18205" PostHistoryTypeId="2" PostId="4870" RevisionGUID="664cbaa1-a76a-40d0-a1b1-46e1da5f3370" CreationDate="2022-09-16T17:03:38.967" UserId="1858" Text="Looking to write call that could return all the contract addresses matching a code hash of a contract via RPC.&#xD;&#xA;&#xD;&#xA;What would be the best way to go about getting the list of contract instances matching the hash?&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="18207" PostHistoryTypeId="1" PostId="4870" RevisionGUID="664cbaa1-a76a-40d0-a1b1-46e1da5f3370" CreationDate="2022-09-16T17:03:38.967" UserId="1858" Text="Query returning all instances of a contract based on it's code hash?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18208" PostHistoryTypeId="3" PostId="4870" RevisionGUID="664cbaa1-a76a-40d0-a1b1-46e1da5f3370" CreationDate="2022-09-16T17:03:38.967" UserId="1858" Text="|substrate-node|smart-contract|storage|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18210" PostHistoryTypeId="2" PostId="4871" RevisionGUID="e9e090ad-5ba5-4722-9393-6d8a88494104" CreationDate="2022-09-16T19:19:17.273" UserId="3059" Text="I want to interact with the pre-defined public address. I want to use a map function to hide the public address with any name I want" ContentLicense="CC BY-SA 4.0" />
  <row Id="18212" PostHistoryTypeId="1" PostId="4871" RevisionGUID="e9e090ad-5ba5-4722-9393-6d8a88494104" CreationDate="2022-09-16T19:19:17.273" UserId="3059" Text="How to interact with the pre-defined public address" ContentLicense="CC BY-SA 4.0" />
  <row Id="18213" PostHistoryTypeId="3" PostId="4871" RevisionGUID="e9e090ad-5ba5-4722-9393-6d8a88494104" CreationDate="2022-09-16T19:19:17.273" UserId="3059" Text="|polkadot-js|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18214" PostHistoryTypeId="2" PostId="4872" RevisionGUID="b576c872-a8ef-4d44-9a7e-211732a845c1" CreationDate="2022-09-16T20:04:18.613" UserId="703" Text="In addition to what you added to the runtime, there are some other code snippets you need as well. I recommend finding all areas where `pallet_contracts` is used in the [substrate-contracts-node][1].&#xD;&#xA;&#xD;&#xA;In your runtime, inside the `impl_runtime_apis!` you will need to add the following snippet (found [here][2]):&#xD;&#xA;```&#xD;&#xA;impl pallet_contracts_rpc_runtime_api::ContractsApi&lt;Block, AccountId, Balance, BlockNumber, Hash&gt;&#xD;&#xA;		for Runtime&#xD;&#xA;	{&#xD;&#xA;		fn call(&#xD;&#xA;			origin: AccountId,&#xD;&#xA;			dest: AccountId,&#xD;&#xA;			value: Balance,&#xD;&#xA;			gas_limit: u64,&#xD;&#xA;			storage_deposit_limit: Option&lt;Balance&gt;,&#xD;&#xA;			input_data: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; pallet_contracts_primitives::ContractExecResult&lt;Balance&gt; {&#xD;&#xA;			Contracts::bare_call(origin, dest, value, Weight::from_ref_time(gas_limit), storage_deposit_limit, input_data, CONTRACTS_DEBUG_OUTPUT)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn instantiate(&#xD;&#xA;			origin: AccountId,&#xD;&#xA;			value: Balance,&#xD;&#xA;			gas_limit: u64,&#xD;&#xA;			storage_deposit_limit: Option&lt;Balance&gt;,&#xD;&#xA;			code: pallet_contracts_primitives::Code&lt;Hash&gt;,&#xD;&#xA;			data: Vec&lt;u8&gt;,&#xD;&#xA;			salt: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; pallet_contracts_primitives::ContractInstantiateResult&lt;AccountId, Balance&gt;&#xD;&#xA;		{&#xD;&#xA;			Contracts::bare_instantiate(origin, value,  Weight::from_ref_time(gas_limit), storage_deposit_limit, code, data, salt, CONTRACTS_DEBUG_OUTPUT)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn upload_code(&#xD;&#xA;			origin: AccountId,&#xD;&#xA;			code: Vec&lt;u8&gt;,&#xD;&#xA;			storage_deposit_limit: Option&lt;Balance&gt;,&#xD;&#xA;		) -&gt; pallet_contracts_primitives::CodeUploadResult&lt;Hash, Balance&gt;&#xD;&#xA;		{&#xD;&#xA;			Contracts::bare_upload_code(origin, code, storage_deposit_limit)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn get_storage(&#xD;&#xA;			address: AccountId,&#xD;&#xA;			key: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; pallet_contracts_primitives::GetStorageResult {&#xD;&#xA;			Contracts::get_storage(address, key)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Additionally, you will need to slightly modify the client RPC as well.&#xD;&#xA;Inside of `node/src/rpc.rs` modify `create_full` (found [here][3]):&#xD;&#xA;```&#xD;&#xA;pub fn create_full&lt;C, P&gt;(&#xD;&#xA;	deps: FullDeps&lt;C, P&gt;,&#xD;&#xA;) -&gt; Result&lt;RpcModule&lt;()&gt;, Box&lt;dyn std::error::Error + Send + Sync&gt;&gt;&#xD;&#xA;where&#xD;&#xA;   // ... snip ...&#xD;&#xA;&#xD;&#xA;    // **** ADD THIS ****&#xD;&#xA;	C::Api: pallet_contracts_rpc::ContractsRuntimeApi&lt;Block, AccountId,Balance, BlockNumber, Hash&gt;,&#xD;&#xA;{&#xD;&#xA;    // **** ADD THIS ****&#xD;&#xA;	use pallet_contracts_rpc::{Contracts, ContractsApiServer};&#xD;&#xA;&#xD;&#xA;    // ... snip ...&#xD;&#xA;&#xD;&#xA;	// Contracts RPC API extension&#xD;&#xA;    // **** ADD THIS ****&#xD;&#xA;	module.merge(Contracts::new(client.clone()).into_rpc())?;&#xD;&#xA;&#xD;&#xA;   // ... snip ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/src/lib.rs#L544&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/rpc.rs#L30" ContentLicense="CC BY-SA 4.0" />
  <row Id="18216" PostHistoryTypeId="2" PostId="4873" RevisionGUID="11941be7-6a76-4c00-87ce-052c3bb5ab51" CreationDate="2022-09-16T20:09:17.920" UserId="620" Text="Where are you getting this list of candidate validators from?&#xD;&#xA;&#xD;&#xA;The `hasKey` query is for checking if a node contains a specific set of _session keys_. That is, you would not pass an account ID or address to it. I see that you are connected to `localhost`. Is this actually a validator with keys?&#xD;&#xA;&#xD;&#xA;If you want to check if your local node is a validator, you can look up the `nextKeys` for the address you're interested in, and then call `api.rpc.author.hasKeys(&lt;keys&gt;)`. If it returns `true`, then that node has the session keys for that validator.&#xD;&#xA;&#xD;&#xA;Note that this does not guarantee that you are safe from equivocation, i.e. that another node does not have the keys as well. Only that this node does have the keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="18218" PostHistoryTypeId="52" PostId="4866" RevisionGUID="9469ee10-a3a7-4389-9714-5dcd85532116" CreationDate="2022-09-16T20:41:59.293" />
  <row Id="18219" PostHistoryTypeId="2" PostId="4874" RevisionGUID="26c20332-1678-4c6f-8b60-f428f43424d5" CreationDate="2022-09-16T22:03:55.780" UserId="2752" Text="I could not get the openbrush apporach get to work by using a wrapper.&#xD;&#xA;However I found a low level approach ([here][1]) which works just fine for now.&#xD;&#xA;&#xD;&#xA;    let method_selector = [0xDE, 0xAD, 0xBE, 0xEF];&#xD;&#xA;&#xD;&#xA;    build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;        .call_type(Call::new().callee(self.contract))&#xD;&#xA;        .exec_input(&#xD;&#xA;             ExecutionInput::new(Selector::new(method_selector)))&#xD;&#xA;             .call_flags(CallFlags::default()&#xD;&#xA;             .returns::&lt;()&gt;()&#xD;&#xA;             .fire()&#xD;&#xA;             .unwrap();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ink_env/3.0.0-rc3/ink_env/call/fn.build_call.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="18221" PostHistoryTypeId="50" PostId="4284" RevisionGUID="fe19c661-035f-4d21-b266-74c7712b64df" CreationDate="2022-09-16T23:03:45.363" UserId="-1" />
  <row Id="18222" PostHistoryTypeId="6" PostId="4870" RevisionGUID="d83daf79-06f0-491f-b120-2eba092b4b44" CreationDate="2022-09-17T02:30:42.670" UserId="34" Comment="edited tags" Text="|ink|smart-contract|storage|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18224" PostHistoryTypeId="5" PostId="4870" RevisionGUID="8ed79d21-9e0c-43b0-bc7b-a1712c64a73c" CreationDate="2022-09-17T04:12:57.083" UserId="1858" Comment="added 19 characters in body" Text="Looking to write call that could return all the contract addresses of ink contracts matching a code hash of the contract via RPC.&#xD;&#xA;&#xD;&#xA;What would be the best way to go about getting the list of contract instances matching the hash?&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="18225" PostHistoryTypeId="5" PostId="4870" RevisionGUID="64847060-e853-442e-882f-66247aa8ec4a" CreationDate="2022-09-17T04:15:26.037" UserId="1858" Comment="added 2 characters in body" Text="Looking to write a call that could return all the contract addresses of ink contracts matching a code hash of the contract via RPC.&#xD;&#xA;&#xD;&#xA;What would be the best way to go about getting the list of contract instances matching the hash?&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="18226" PostHistoryTypeId="5" PostId="4873" RevisionGUID="69d4678c-a222-4285-bd84-511749a30cd1" CreationDate="2022-09-17T05:23:28.123" UserId="620" Comment="added 1516 characters in body" Text="Where are you getting this list of candidate validators from?&#xD;&#xA;&#xD;&#xA;The `hasKey` query is for checking if a node contains a specific _session key_. That is, you would not pass an account ID or address to it. I see that you are connected to `localhost`. Is this actually a validator with keys?&#xD;&#xA;&#xD;&#xA;If you want to check if your local node is a validator, you can look up the `nextKeys` for the address you're interested in, and then call `api.rpc.author.hasSessionKeys(&lt;keys&gt;)` for the concatenation of all the keys. If it returns `true`, then that node has the session keys for that validator.&#xD;&#xA;&#xD;&#xA;Note that this does not guarantee that you are safe from equivocation, i.e. that another node does not have the keys as well. Only that this node does have the keys.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;EDIT: Here is a more complete example:&#xD;&#xA;&#xD;&#xA;First, I'll check if the stash I'm interested in has signaled intent to be a validator with `staking.validators`.&#xD;&#xA;&#xD;&#xA;[![staking-validators][1]][1]&#xD;&#xA;&#xD;&#xA;It is, so let's look up its session keys with `session.nextKeys(1NDRMvN7FH9YtJLVPf9doF5zbuUwn6hdH1b4WmVyZDr5joM)`.&#xD;&#xA;&#xD;&#xA;[![session-nextKeys][2]][2]&#xD;&#xA;&#xD;&#xA;Now, I SSH into the node that I know is using those keys. Of course, you need RPC access to whatever node you want to check the keys on. To make the storage key, I concatenate all of the keys into one value:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x53a51c848834661c92e74b3c2492b8de2591f914ab75345d70e61c79be9699d73a80d898638dccd4aaa472e7948e7394969cc443335c494159948915c097c03624299947ecf9410e9dc4e439da8cec932a6584affd6026055e0718b8850fa0380658f8f3a64ec6949a26916ae2cd976fe531947a9c9e93e6d587bac746cb08263451595f904e1bcc1ecaffb327a9375f9f09251fd12a66f7cbd6faf86fe90243aa63a6245db826d277bf7bed80169db1bccdc7a3eb0ae7852317a5fb2628982a&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And calling `author.hasSessionKeys(&lt;long hex value&gt;)`, I get `true` :tada:&#xD;&#xA;&#xD;&#xA;[![author-hasSessionKeys][3]][3]&#xD;&#xA;&#xD;&#xA;If I just want to check one, I can do so with `session.hasKey(&lt;key&gt;, &lt;type&gt;)`. In this case I'll use `babe`, so the key is `0x3a80d898638dccd4aaa472e7948e7394969cc443335c494159948915c097c036`.&#xD;&#xA;&#xD;&#xA;[![session-hasKey][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ns2sq.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/nNx9d.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/STB25.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/0MFnr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18227" PostHistoryTypeId="50" PostId="4015" RevisionGUID="2e181fbd-1776-43a2-990c-12132d9c8be0" CreationDate="2022-09-17T11:07:10.753" UserId="-1" />
  <row Id="18228" PostHistoryTypeId="2" PostId="4875" RevisionGUID="77041dc5-8cc7-4a3b-9a25-02f1a097cd2c" CreationDate="2022-09-17T12:43:45.310" UserId="2760" Text="How to get accounts from dev node?  &#xD;&#xA;By default dev node start with accounts derived from mnemonic  &#xD;&#xA;`bottom drive obey lake curtain smoke basket hold race lonely fit walk`  &#xD;&#xA;As mentioned here&#xD;&#xA;https://substrate.stackexchange.com/questions/4487/how-can-i-get-predefined-built-in-account-s-key-pair-from-polkadotjs-app-such-a  &#xD;&#xA;However you can also change those accounts (derivation path) or mnemonic.&#xD;&#xA;&#xD;&#xA;polkadot.js.org app gets those accounts using direct storage calls.&#xD;&#xA;For example Alice account is fetched by&#xD;&#xA;`state.getStorage('0x5c0d1176a568c1f92944340dbfed9e9c530ebca703c85910e7164cb7d1c9e47b')`  &#xD;&#xA;Which more flexible solution than hardcoding mnemonic in app. However I don't know where that storage key comes from.. &#xD;&#xA;Any idea how to programmatically fetch all managed accounts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18230" PostHistoryTypeId="1" PostId="4875" RevisionGUID="77041dc5-8cc7-4a3b-9a25-02f1a097cd2c" CreationDate="2022-09-17T12:43:45.310" UserId="2760" Text="Get accounts managed by dev node" ContentLicense="CC BY-SA 4.0" />
  <row Id="18231" PostHistoryTypeId="3" PostId="4875" RevisionGUID="77041dc5-8cc7-4a3b-9a25-02f1a097cd2c" CreationDate="2022-09-17T12:43:45.310" UserId="2760" Text="|account|dev-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18232" PostHistoryTypeId="2" PostId="4876" RevisionGUID="e10c88bf-04c1-45df-93a8-848156fc4203" CreationDate="2022-09-17T12:51:07.950" UserId="2844" Text="On master branch after merged [this][1] PR, I try to build example contract and got this error. Has anyone faced this issue?&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/pull/1223&#xD;&#xA;  [2]: https://i.stack.imgur.com/gbWan.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="18234" PostHistoryTypeId="1" PostId="4876" RevisionGUID="e10c88bf-04c1-45df-93a8-848156fc4203" CreationDate="2022-09-17T12:51:07.950" UserId="2844" Text="ERROR: No 'ink_lang' dependency found" ContentLicense="CC BY-SA 4.0" />
  <row Id="18235" PostHistoryTypeId="3" PostId="4876" RevisionGUID="e10c88bf-04c1-45df-93a8-848156fc4203" CreationDate="2022-09-17T12:51:07.950" UserId="2844" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18236" PostHistoryTypeId="2" PostId="4877" RevisionGUID="2d28b1ed-2791-43a7-b04f-eae972fe451b" CreationDate="2022-09-17T17:27:14.597" UserId="3186" Text="I just wonder if there is any way to deploy my ink! contract to ethereum network. As far as I know, ink! contract compiles to WASM bytecode, not EVM, so it's not possible, right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18238" PostHistoryTypeId="1" PostId="4877" RevisionGUID="2d28b1ed-2791-43a7-b04f-eae972fe451b" CreationDate="2022-09-17T17:27:14.597" UserId="3186" Text="Is there any way to compile ink contract to EVM bytecode?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18239" PostHistoryTypeId="3" PostId="4877" RevisionGUID="2d28b1ed-2791-43a7-b04f-eae972fe451b" CreationDate="2022-09-17T17:27:14.597" UserId="3186" Text="|ink|smart-contract|evm|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18240" PostHistoryTypeId="5" PostId="4877" RevisionGUID="f1e6fd59-8940-4d7a-8806-4d8b52c9a7eb" CreationDate="2022-09-17T17:28:46.280" UserId="3186" Comment="added 52 characters in body" Text="I just wonder if there is any way to deploy my ink! contract to ethereum network. As far as I know, ink! contract compiles to WASM bytecode, not EVM, so it's not possible, right? Or maybe there are some WASM-EVM converter-tools..?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18245" PostHistoryTypeId="2" PostId="4879" RevisionGUID="e87267b9-9489-4176-85af-2af41d15d1b0" CreationDate="2022-09-18T10:13:56.097" UserId="3118" Text="I am trying the tutorials &quot;Authorize specific nodes&quot; to authorize access for the third node &quot;Charlie&quot; to the network. I have followed the guide to submit sudo for the Charlie's node and the result is ok, but the node stills not connect to the network. Is there any configuration missing/how can I inspect the issue? Thanks.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/coHAi.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ru5ln.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18247" PostHistoryTypeId="1" PostId="4879" RevisionGUID="e87267b9-9489-4176-85af-2af41d15d1b0" CreationDate="2022-09-18T10:13:56.097" UserId="3118" Text="Authorize specific nodes - Charlie" ContentLicense="CC BY-SA 4.0" />
  <row Id="18248" PostHistoryTypeId="3" PostId="4879" RevisionGUID="e87267b9-9489-4176-85af-2af41d15d1b0" CreationDate="2022-09-18T10:13:56.097" UserId="3118" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18249" PostHistoryTypeId="2" PostId="4880" RevisionGUID="703bf770-5dd7-42cb-aeee-c71a5cd1fbdb" CreationDate="2022-09-18T10:34:05.487" UserId="3121" Text="I am trying to use the `cargo +nightly-2022-08-15 contract build` command, but am experiencing the error below.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Finished dev [unoptimized + debuginfo] target(s) in 0.15s&#xD;&#xA; [2/5] Building cargo project&#xD;&#xA;ERROR: No path specified, and the default `src/main.rs` was not found&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `cargo +nightly-2022-08-15 contract test` was executed successfully.&#xD;&#xA;&#xD;&#xA;Can someone please help with a workaround please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18251" PostHistoryTypeId="1" PostId="4880" RevisionGUID="703bf770-5dd7-42cb-aeee-c71a5cd1fbdb" CreationDate="2022-09-18T10:34:05.487" UserId="3121" Text="cargo +nightly contract build ERROR: no path specified, and the default `src/main.rs` was not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="18252" PostHistoryTypeId="3" PostId="4880" RevisionGUID="703bf770-5dd7-42cb-aeee-c71a5cd1fbdb" CreationDate="2022-09-18T10:34:05.487" UserId="3121" Text="|smart-contract|build|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18253" PostHistoryTypeId="4" PostId="4880" RevisionGUID="2cd3b403-2bf8-4f35-8fa7-cc14d8bac1fb" CreationDate="2022-09-18T10:43:28.797" UserId="3121" Comment="edited title" Text="&quot;cargo +nightly contract build&quot; ERROR: no path specified, and the default `src/main.rs` was not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="18254" PostHistoryTypeId="2" PostId="4881" RevisionGUID="5239b23e-6d7e-4318-a421-dc4ae14e8205" CreationDate="2022-09-18T12:05:26.927" UserId="309" Text="for some reason, the answer above does not work for me.&#xD;&#xA;if I try: &#xD;&#xA;&#xD;&#xA;    let nbr:u32 = 10;&#xD;&#xA;    let val:AssetId = nbr.into();&#xD;&#xA;&#xD;&#xA;I get: &#xD;&#xA;&#xD;&#xA;    the trait From&lt;u32&gt; is not implemented for &lt;T as pallet_assets::Config&gt;::AssetId&#xD;&#xA;&#xD;&#xA;Any advice on how to solve it?&#xD;&#xA;Kazu." ContentLicense="CC BY-SA 4.0" />
  <row Id="18256" PostHistoryTypeId="5" PostId="4880" RevisionGUID="610abf41-c5ae-4be0-b4ad-376a68dd5b13" CreationDate="2022-09-18T12:30:55.853" UserId="3121" Comment="added 30 characters in body" Text="I am trying to use the `cargo +nightly-2022-08-15 contract build` command on a `cargo contract new ___`, but am experiencing the error below.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Finished dev [unoptimized + debuginfo] target(s) in 0.15s&#xD;&#xA; [2/5] Building cargo project&#xD;&#xA;ERROR: No path specified, and the default `src/main.rs` was not found&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `cargo +nightly-2022-08-15 contract test` was executed successfully.&#xD;&#xA;&#xD;&#xA;Can someone please help with a workaround please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18257" PostHistoryTypeId="2" PostId="4882" RevisionGUID="c7fe4b1b-122c-4dc8-9a8f-3d634af9317a" CreationDate="2022-09-18T13:09:26.857" UserId="309" Text="I am trying to use the pallet_asset, but the AssetId type is giving me some trouble.&#xD;&#xA;&#xD;&#xA;**Try nbr.1:** &#xD;&#xA;&#xD;&#xA; - Create a storage value TokenId that takes a u32&#xD;&#xA; - Create the AssetId from the u32 inside the storage:&#xD;&#xA;&#xD;&#xA;    `let token_id: T::AssetId = TokenId::&lt;T&gt;::get().unwrap().into();`&#xD;&#xA;&#xD;&#xA; - I get the following error:&#xD;&#xA;&#xD;&#xA;    `the trait 'From&lt;u32&gt;' is not implemented for '&lt;T as pallet_assets::Config&gt;::AssetId'`&#xD;&#xA;&#xD;&#xA;**Try nbr.2:**&#xD;&#xA;&#xD;&#xA; - Use the type AssetId instead of u32 inside the storage&#xD;&#xA; - After using `pallet_assets::Pallet::&lt;T&gt;::force_create(...,AssetId,...);`, update the AssetId&#xD;&#xA;   inside the storage as demonstrated&#xD;&#xA;   here: https://github.com/paritytech/substrate/tree/master/frame/assets&#xD;&#xA;&#xD;&#xA;    `TokenId::&lt;T&gt;::mutate(|val|{*val +=1});`&#xD;&#xA;&#xD;&#xA; - This time I get:&#xD;&#xA;&#xD;&#xA;    `cannot use '+=' on type 'core::option::Option&lt;&lt;T as pallet_assets::Config&gt;::AssetId&gt;'`&#xD;&#xA;&#xD;&#xA;Any idea on how I can solve this problem? what am I missing?&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="18259" PostHistoryTypeId="1" PostId="4882" RevisionGUID="c7fe4b1b-122c-4dc8-9a8f-3d634af9317a" CreationDate="2022-09-18T13:09:26.857" UserId="309" Text="Updating AssetId when using pallet_assets" ContentLicense="CC BY-SA 4.0" />
  <row Id="18260" PostHistoryTypeId="3" PostId="4882" RevisionGUID="c7fe4b1b-122c-4dc8-9a8f-3d634af9317a" CreationDate="2022-09-18T13:09:26.857" UserId="309" Text="|pallet|assets|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18261" PostHistoryTypeId="5" PostId="4875" RevisionGUID="3776f6fa-7ea9-469b-bc93-716e0302b655" CreationDate="2022-09-18T13:45:47.510" UserId="2760" Comment="added 357 characters in body" Text="How to get accounts from dev node?  &#xD;&#xA;By default dev node start with accounts derived from mnemonic  &#xD;&#xA;`bottom drive obey lake curtain smoke basket hold race lonely fit walk`  &#xD;&#xA;As mentioned here&#xD;&#xA;https://substrate.stackexchange.com/questions/4487/how-can-i-get-predefined-built-in-account-s-key-pair-from-polkadotjs-app-such-a  &#xD;&#xA;However you can also change those accounts (derivation path) or mnemonic.&#xD;&#xA;&#xD;&#xA;polkadot.js.org app gets those accounts using direct storage calls.&#xD;&#xA;For example Alice account is fetched by&#xD;&#xA;`state.getStorage('0x5c0d1176a568c1f92944340dbfed9e9c530ebca703c85910e7164cb7d1c9e47b')`  &#xD;&#xA;Which more flexible solution than hardcoding mnemonic in app. However I don't know where that storage key comes from.. &#xD;&#xA;Any idea how to programmatically fetch all managed accounts?&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;What I'm trying to do - I want to get those accounts with RPC call.  &#xD;&#xA;It is possible to change those accounts in dev node (in code) and I don't want to reflect those changes in testing env. It is for sure possible cuz polkadot.js.org (using on local node) gets those accounts.&#xD;&#xA;[![accounts][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JVOp8.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18262" PostHistoryTypeId="2" PostId="4883" RevisionGUID="8014f87b-c7bc-48d8-b5a1-2ea883fc9829" CreationDate="2022-09-18T15:27:15.410" UserId="3171" Text="I wonder if there is some example of (parachain)runtime with xcm-pallet and orml-xtokens configuration for education purpose." ContentLicense="CC BY-SA 4.0" />
  <row Id="18264" PostHistoryTypeId="1" PostId="4883" RevisionGUID="8014f87b-c7bc-48d8-b5a1-2ea883fc9829" CreationDate="2022-09-18T15:27:15.410" UserId="3171" Text="Is there anywhere simple parachain runtime example with XCM reserved transfer functionality from relay chain to parachain and back?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18265" PostHistoryTypeId="3" PostId="4883" RevisionGUID="8014f87b-c7bc-48d8-b5a1-2ea883fc9829" CreationDate="2022-09-18T15:27:15.410" UserId="3171" Text="|parachain|runtime|xcm|relay-chain|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18269" PostHistoryTypeId="5" PostId="2858" RevisionGUID="258c751f-0a94-4295-9ab2-89dad2acae7f" CreationDate="2022-09-18T16:58:06.793" UserId="560" Comment="added 169 characters in body" Text="Because AssetId's are mostly a fancy way of saying u32, It's as simple as:&#xD;&#xA;&#xD;&#xA;    let first_asset_id: T::AssetId = 1u32.into();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Dont forget to Add `From&lt;u32&gt;` in :&#xD;&#xA;```rust&#xD;&#xA;type AssetId: IsType&lt;&lt;Self as pallet_assets::Config&gt;::AssetId&gt;&#xD;&#xA;			+ Parameter&#xD;&#xA;			+ From&lt;u32&gt;&#xD;&#xA;			+ Ord&#xD;&#xA;			+ Copy;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The implementation can be found here:&#xD;&#xA;https://github.com/liberland/liberland_substrate/blob/65edb6bab3/frame/llm/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="18275" PostHistoryTypeId="2" PostId="4886" RevisionGUID="84210b43-95d6-4bca-a7f1-e053d3102405" CreationDate="2022-09-19T01:45:46.827" UserId="1959" Text="First, you have to confirm that the parachain supports the assets of the relay chain.&#xD;&#xA;&#xD;&#xA;For example: &#xD;&#xA;1. Kusama transfer KSM to parachain(2000) use `xcm-pallet`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;2. parachain(2000) transfer KSM to Kusama use `xtokens`&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xQtOS.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/u0rx0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18277" PostHistoryTypeId="5" PostId="4880" RevisionGUID="af502d9e-23c5-43c1-ad26-054b71db0202" CreationDate="2022-09-19T01:48:30.433" UserId="3121" Comment="added 49 characters in body" Text="I am trying to use the `cargo +nightly-2022-08-15 contract build` command on a `cargo contract new ___`, but am experiencing the error below.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Finished dev [unoptimized + debuginfo] target(s) in 0.15s&#xD;&#xA; [2/5] Building cargo project&#xD;&#xA;ERROR: No path specified, and the default `src/main.rs` was not found&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `cargo +nightly-2022-08-15 contract test` was executed successfully.&#xD;&#xA;&#xD;&#xA;Can someone please help me understand why I'm seeing this error with a possible workaround please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18279" PostHistoryTypeId="5" PostId="4880" RevisionGUID="d710cc16-3421-4375-868d-adc5637d6416" CreationDate="2022-09-19T05:04:39.210" UserId="3121" Comment="added 147 characters in body" Text="I am trying to use the `cargo +nightly-2022-08-15 contract build` command on a `cargo contract new ___`, but am experiencing the error below.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Finished dev [unoptimized + debuginfo] target(s) in 0.15s&#xD;&#xA; [2/5] Building cargo project&#xD;&#xA;ERROR: No path specified, and the default `src/main.rs` was not found&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `cargo +nightly-2022-08-15 contract test` was executed successfully.&#xD;&#xA;&#xD;&#xA;Can someone please help me understand why I'm seeing this error with a possible workaround please?&#xD;&#xA;I guess another way to phrase my question is, where exactly from the root directory does the build command expect there to be a an &quot;src/main.rs&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18280" PostHistoryTypeId="2" PostId="4887" RevisionGUID="3e8c43c4-cf2f-4f71-a8cc-a53ea150cc89" CreationDate="2022-09-19T05:53:56.437" UserId="70" Text="I am creating the reward pool concept that allows users to claim reward pool. For scalability, we used Child Storage trie for different pool as trie_index. &#xD;&#xA;&#xD;&#xA;Each trie_index has [wallet, claimable_amount]. How do we add the claimable data of 100s of [wallet, claimable_amount] into child storage trie without inserting one by one?&#xD;&#xA;&#xD;&#xA;I am curious, if there is a way we can encode an array of dictionary [wallet,claimable_amount] and then insert it into child trie. " ContentLicense="CC BY-SA 4.0" />
  <row Id="18282" PostHistoryTypeId="1" PostId="4887" RevisionGUID="3e8c43c4-cf2f-4f71-a8cc-a53ea150cc89" CreationDate="2022-09-19T05:53:56.437" UserId="70" Text="How to encode data off-chain and push to child storage trie on Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18283" PostHistoryTypeId="3" PostId="4887" RevisionGUID="3e8c43c4-cf2f-4f71-a8cc-a53ea150cc89" CreationDate="2022-09-19T05:53:56.437" UserId="70" Text="|storage|runtime|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18284" PostHistoryTypeId="2" PostId="4888" RevisionGUID="35bd4ea4-900b-4daf-97fd-321efca223c3" CreationDate="2022-09-19T05:57:02.400" UserId="2281" Text="I am trying to add **evm_pallet** with NPOS consensus( i.e babe and staking) but while adding **evm_pallet** to runtime getting error.[![][1]][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;1.59-x86_64-unknown-linux-gnu (default)&#xD;&#xA;&#xD;&#xA;rustc 1.59.0 (9d1b2106e 2022-02-23)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vBDW4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18286" PostHistoryTypeId="1" PostId="4888" RevisionGUID="35bd4ea4-900b-4daf-97fd-321efca223c3" CreationDate="2022-09-19T05:57:02.400" UserId="2281" Text="cannot find function `memory_teardown` in module `sandbox`" ContentLicense="CC BY-SA 4.0" />
  <row Id="18287" PostHistoryTypeId="3" PostId="4888" RevisionGUID="35bd4ea4-900b-4daf-97fd-321efca223c3" CreationDate="2022-09-19T05:57:02.400" UserId="2281" Text="|substrate-node|polkadot|frontier|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18288" PostHistoryTypeId="5" PostId="4808" RevisionGUID="929d4220-20fc-4b05-8ab0-3dabe0a61b05" CreationDate="2022-09-19T06:13:59.773" UserId="251" Comment="deleted 1 character in body" Text="### Why&#xD;&#xA;&#xD;&#xA;Check the PolkadotJS [algorithm](https://github.com/polkadot-js/api/blob/master/packages/api-derive/src/session/progress.ts#L31).&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;info.currentIndex.sub(activeEraStartSessionIndex).imul(info.sessionLength).iadd(sessionProgress);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Due to the election failure. [`ErasStartSessionIndex`](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/frame/staking/src/pallet/impls.rs#L417) won't be updated. So, the PolkadotApps get a ridiculously big number.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You could check your log:&#xD;&#xA;```sh&#xD;&#xA;journalctl -u darwinia-node.service | grep &quot;election provider failed&quot;&#xD;&#xA;Sep 08 06:32:18 pangoro-g1 drml[136952]: 2022-09-08 06:32:18 [14058]  election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I guess you encounter the same error as me.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;### The easiest way to fix&#xD;&#xA;To solve this, you just need to change the [`Fallback`](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/bin/node/runtime/src/lib.rs#L713) to `frame_election_provider_support::onchain::OnChainSequentialPhragmen&lt;Runtime&gt;`. I guess you have set it to `NoFallback` before.&#xD;&#xA;&#xD;&#xA;Because your validator set is pretty small, on-chain computation is totally fine.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;### Debug &amp; fix&#xD;&#xA;Check the logs in [`feasibility_check`](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L1453) to find out what's the root cause.&#xD;&#xA;&#xD;&#xA;You need to know that once you enter the emergency mode with `NoFallback`, that is a [deep loop](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L733-L808).&#xD;&#xA;&#xD;&#xA;You've to do one of these to recover the election:&#xD;&#xA;- force set [`CurrentPhase`](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L1217) with root&#xD;&#xA;- calculate the result with offchain tool then submit it through [`set_emergency_election_result `](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L956)&#xD;&#xA;- change `NoFallback` to `OnChainSequentialPhragmen`&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3A3og.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18289" PostHistoryTypeId="2" PostId="4889" RevisionGUID="4d1a75fc-d5ab-4e1e-a610-1f8309b38a45" CreationDate="2022-09-19T07:41:01.983" UserId="2484" Text="I read this post of Shawn https://substrate.stackexchange.com/a/128/2484 and found out, that random numbers for lotteries are not reliable, even with VRF on GRANDPA since the validators could earn more money through the lottery than for the block production. So I would derive, that the usage of random numbers for lotteries is not safe in production, when the stake is high enough. So therefore the question: Is `pallet_lottery` safe in production? If yes or no, please post why?&#xD;&#xA;&#xD;&#xA;I am not regarding the problem of the [modulus bias for `pallet_lottery` ](https://github.com/paritytech/substrate/issues/8311) ." ContentLicense="CC BY-SA 4.0" />
  <row Id="18291" PostHistoryTypeId="1" PostId="4889" RevisionGUID="4d1a75fc-d5ab-4e1e-a610-1f8309b38a45" CreationDate="2022-09-19T07:41:01.983" UserId="2484" Text="Is the random number generation safe for pallet_lottery?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18292" PostHistoryTypeId="3" PostId="4889" RevisionGUID="4d1a75fc-d5ab-4e1e-a610-1f8309b38a45" CreationDate="2022-09-19T07:41:01.983" UserId="2484" Text="|grandpa|random|crowdfunding|game-theory|verifiable-random-function|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18293" PostHistoryTypeId="2" PostId="4890" RevisionGUID="e3989349-750e-4cbd-8585-e0cfbf7233a7" CreationDate="2022-09-19T08:19:00.393" UserId="1810" Text="It's answered in the question you linked, but..&#xD;&#xA;&#xD;&#xA;We only generate safe-ish randomness in babe, not grandpa.  We might add better randomness generation to grandpa in the future if we first optimized https://github.com/kobigurk/aggregatable-dkg better, just no critical use cases right now.&#xD;&#xA;&#xD;&#xA;Regardless, there is no way any blockchain can simultaneously close participants in a lottery and pick the winner, even if you generate good fresh threshold randomness in finality then you could only use the randomness after finality and worse adversaries could fork the chain so events finalize differently.  You always need multi-block actions like waiting periods or commit-reveal, even an instant finality chain only provides the randomness in the next block.&#xD;&#xA;&#xD;&#xA;All block producers learn their babe VRFs like two babe epochs in advance, and sassafras shall likely makes this three epochs, so several hours.  If you've very low value operations then you could ignore the problem and use them directly, but otherwise you should either commit to participation far enough in advance for the epoch based one, aka close the lottery and wait for epoch randomness, which remains biasable, but much less so.  There exist other tricks too..&#xD;&#xA;&#xD;&#xA;We'll add cumulative VRF randomness in sassafras, but this actually makes high value lotteries worse." ContentLicense="CC BY-SA 4.0" />
  <row Id="18295" PostHistoryTypeId="5" PostId="4808" RevisionGUID="5bc23d2d-d572-49ac-9724-0ac65d50cefa" CreationDate="2022-09-19T08:41:05.850" UserId="251" Comment="added 8 characters in body" Text="### Why&#xD;&#xA;&#xD;&#xA;Check the PolkadotJS [algorithm](https://github.com/polkadot-js/api/blob/master/packages/api-derive/src/session/progress.ts#L31).&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;info.currentIndex.sub(activeEraStartSessionIndex).imul(info.sessionLength).iadd(sessionProgress);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Due to the election failure. [`ErasStartSessionIndex`](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/frame/staking/src/pallet/impls.rs#L417) won't be updated. So, the PolkadotApps get a ridiculously big number.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You could check your log:&#xD;&#xA;```sh&#xD;&#xA;journalctl -u darwinia-node.service | grep &quot;election provider failed&quot;&#xD;&#xA;Sep 08 06:32:18 pangoro-g1 drml[136952]: 2022-09-08 06:32:18 [14058]  election provider failed due to ElectionError::Fallback(&quot;NoFallback.&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I guess you encounter the same error as me.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;### The easiest way to fix&#xD;&#xA;To solve this, you just need to change the [`Fallback`](https://github.com/paritytech/substrate/blob/23bb5a6255bbcd7ce2999044710428bc4a7a924f/bin/node/runtime/src/lib.rs#L713) to `frame_election_provider_support::onchain::OnChainSequentialPhragmen&lt;Runtime&gt;`. I guess you have set it to `NoFallback` before.&#xD;&#xA;&#xD;&#xA;Because your validator set is pretty small, on-chain computation is totally fine.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;### Debug &amp; other fixes&#xD;&#xA;Check the logs in [`feasibility_check`](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L1453) to find out what's the root cause.&#xD;&#xA;&#xD;&#xA;You need to know that once you enter the emergency mode with `NoFallback`, that is a [dead loop](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L733-L808).&#xD;&#xA;&#xD;&#xA;You've to do one of these to recover the election:&#xD;&#xA;- force set [`CurrentPhase`](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L1217) with root&#xD;&#xA;- calculate the result with offchain tool then submit it through [`set_emergency_election_result `](https://github.com/paritytech/substrate/blob/1dcb9ceea7e252eb779f044448bc693ec6161baf/frame/election-provider-multi-phase/src/lib.rs#L956)&#xD;&#xA;- change `NoFallback` to `OnChainSequentialPhragmen`&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3A3og.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18296" PostHistoryTypeId="2" PostId="4891" RevisionGUID="a7bd07da-50b7-480a-bfd4-b3ff5f8f9972" CreationDate="2022-09-19T08:42:47.670" UserId="251" Text="```&#xD;&#xA;git checkout 91b97b016618fcc515f55a15b1f008b68e13f5a2&#xD;&#xA;cargo check --features runtime-benchmarks&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `sc-network-bitswap v0.10.0-dev (/root/code/self/substrate/client/network/bitswap)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/root/code/self/substrate/target/debug/build/sc-network-bitswap-23c560e6e0d6a1a2/build-script-build` (exit status: 101)&#xD;&#xA;  --- stderr&#xD;&#xA;  thread 'main' panicked at '&#xD;&#xA;  Could not find `protoc` installation and this build crate cannot proceed without&#xD;&#xA;  this knowledge. If `protoc` is installed and this crate had trouble finding&#xD;&#xA;  it, you can set the `PROTOC` environment variable with the specific path to your&#xD;&#xA;  installed `protoc` binary.&#xD;&#xA;&#xD;&#xA;  For more information: https://docs.rs/prost-build/#sourcing-protoc&#xD;&#xA;  ', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.11.1/src/lib.rs:1227:10&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18298" PostHistoryTypeId="1" PostId="4891" RevisionGUID="a7bd07da-50b7-480a-bfd4-b3ff5f8f9972" CreationDate="2022-09-19T08:42:47.670" UserId="251" Text="Substrate build failure with `--runtime-benchmarks` flag" ContentLicense="CC BY-SA 4.0" />
  <row Id="18299" PostHistoryTypeId="3" PostId="4891" RevisionGUID="a7bd07da-50b7-480a-bfd4-b3ff5f8f9972" CreationDate="2022-09-19T08:42:47.670" UserId="251" Text="|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18300" PostHistoryTypeId="2" PostId="4892" RevisionGUID="67eb0ac5-f9eb-4495-9c44-441c6523faf1" CreationDate="2022-09-19T09:14:23.870" UserId="251" Text="What's the meaning of `weightLimit: Unlimited` in `BuyExecution`?&#xD;&#xA;&#xD;&#xA;When should I use a certain amount? Because I found that people always use `Unlimited`." ContentLicense="CC BY-SA 4.0" />
  <row Id="18302" PostHistoryTypeId="1" PostId="4892" RevisionGUID="67eb0ac5-f9eb-4495-9c44-441c6523faf1" CreationDate="2022-09-19T09:14:23.870" UserId="251" Text="What's the meaning of `weightLimit: Unlimited` in `BuyExecution`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18303" PostHistoryTypeId="3" PostId="4892" RevisionGUID="67eb0ac5-f9eb-4495-9c44-441c6523faf1" CreationDate="2022-09-19T09:14:23.870" UserId="251" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18304" PostHistoryTypeId="2" PostId="4893" RevisionGUID="248339a1-e184-4bae-9ceb-7aef91f5a5b5" CreationDate="2022-09-19T09:17:08.843" UserId="73" Text="Looks like you are using some older Substrate version?&#xD;&#xA;&#xD;&#xA;Nevertheless, it looks like you didn't enabled the `std` feature for `evm_pallet` when building for native. This should solve your problem." ContentLicense="CC BY-SA 4.0" />
  <row Id="18306" PostHistoryTypeId="2" PostId="4894" RevisionGUID="38010f11-f2ba-4047-ac74-e6763f77382c" CreationDate="2022-09-19T09:19:41.643" UserId="73" Text="You posted the solution to your own question:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Could not find `protoc` installation and this build crate cannot proceed without&#xD;&#xA;this knowledge. If `protoc` is installed and this crate had trouble finding&#xD;&#xA;it, you can set the `PROTOC` environment variable with the specific path to your &#xD;&#xA;installed `protoc` binary.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As this is saying. Please install `protoc` and make sure that the binary is available in the global `PATH` or set the `PROTOC` environment variable pointing to the binary." ContentLicense="CC BY-SA 4.0" />
  <row Id="18308" PostHistoryTypeId="2" PostId="4895" RevisionGUID="bbf76253-d46d-46e5-9cfa-f3a8122e482a" CreationDate="2022-09-19T09:41:00.483" UserId="620" Text="First, you will have to provide some funds into the holding register using an instruction like `WithdrawAsset` or `ClaimAsset`, so buying execution assumes that you have something in the holding register to buy with.&#xD;&#xA;&#xD;&#xA;At the beginning of execution, the executor will [weigh the entire message](https://github.com/paritytech/polkadot/blob/2b0d832/xcm/xcm-executor/src/lib.rs#L83), given what it knows about the weight of each `Instruction` in the array (some instructions, like `Transact`, need to be told a max weight).&#xD;&#xA;&#xD;&#xA;Now that it knows the weight, it can check if it [`should_execute`](https://github.com/paritytech/polkadot/blob/2b0d832/xcm/xcm-executor/src/lib.rs#L112). The key here is how it constructs the `BuyExecution` instruction:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;match i {&#xD;&#xA;	BuyExecution { weight_limit: Limited(ref mut weight), .. } if *weight &gt;= max_weight =&gt; {&#xD;&#xA;		*weight = max_weight;&#xD;&#xA;		Ok(())&#xD;&#xA;	},&#xD;&#xA;	BuyExecution { ref mut weight_limit, .. } if weight_limit == &amp;Unlimited =&gt; {&#xD;&#xA;		*weight_limit = Limited(max_weight);&#xD;&#xA;		Ok(())&#xD;&#xA;	},&#xD;&#xA;	_ =&gt; Err(()),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If the weight is `Unlimited`, it will just try to use whatever funds are in the holding register to buy enough weight to execute the instructions. By putting in `Limited(weight)`, you are basically saying &quot;I'm only willing to buy this much weight, and if the message comes out to be heavier, then don't execute it.&quot;&#xD;&#xA;&#xD;&#xA;Of course, even with `Limited(weight)`, it can still fail. Depending on the weight to fee rate, you may not have provided enough funds in the holding register, in which case you'll get a `TooExpensive` error." ContentLicense="CC BY-SA 4.0" />
  <row Id="18310" PostHistoryTypeId="2" PostId="4896" RevisionGUID="afb16aa9-181d-4742-9b2b-7064021c394c" CreationDate="2022-09-19T09:47:32.547" UserId="1959" Text="If you use a certain amount like `WeightLimit::Limited(5000000000)`, it means the upper limit of weight you are willing to pay for XCM, if the actual need over than this amount, the XCM will not be executed.&#xD;&#xA;&#xD;&#xA;Let's take a look at the code:&#xD;&#xA;1. Before XCM is executed, the required weight will be calculated by your `weigher`(config in `XcmCExecutorConfig`)  https://github.com/paritytech/polkadot/blob/release-v0.9.26/xcm/xcm-executor/src/lib.rs#L84&#xD;&#xA;```&#xD;&#xA;let xcm_weight = match Config::Weigher::weight(&amp;mut message)&#xD;&#xA;```&#xD;&#xA;2. Then enter the barrier, your `BuyExecution` instruction will be modified. https://github.com/paritytech/polkadot/blob/release-v0.9.26/xcm/xcm-builder/src/barriers.rs#L80&#xD;&#xA;```&#xD;&#xA;		match i {&#xD;&#xA;			BuyExecution { weight_limit: Limited(ref mut weight), .. } if *weight &gt;= max_weight =&gt; {&#xD;&#xA;				*weight = max_weight;&#xD;&#xA;				Ok(())&#xD;&#xA;			},&#xD;&#xA;			BuyExecution { ref mut weight_limit, .. } if weight_limit == &amp;Unlimited =&gt; {&#xD;&#xA;				*weight_limit = Limited(max_weight);&#xD;&#xA;				Ok(())&#xD;&#xA;			},&#xD;&#xA;			_ =&gt; Err(()),&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;As you can see, if you use `Unlimited` or a certain weight lager than the required weight, it will be replaced by the weight caculated in the first step. &#xD;&#xA;&#xD;&#xA;But if you use a certain weight smaller than the required weight, it will be error and blocked by the barrier.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18312" PostHistoryTypeId="2" PostId="4897" RevisionGUID="f133d7f3-1cf5-446f-a8a6-989abb784118" CreationDate="2022-09-19T11:15:40.980" UserId="3188" Text="None of the given solutions worked for me.&#xD;&#xA;&#xD;&#xA;Later when I had my whole directory in the WSL2 file system (instead of the windows file system like earlier) and tried the build command, it worked for me." ContentLicense="CC BY-SA 4.0" />
  <row Id="18315" PostHistoryTypeId="2" PostId="4898" RevisionGUID="23a02c7d-e473-49ae-a992-b5dd24f5a629" CreationDate="2022-09-19T11:48:26.840" UserId="3192" Text="I'm trying to test offchain workers in my local substrate node.&#xD;&#xA;It seems that by default the ocw is not enabled? I've only been able to see logs from ocw's when running the node with the `--dev` option (e.g. when using --chain local there are no ocw logs) - but AFAIU `--dev` will not persist the chain state nor the keystore when I run it multiple times.&#xD;&#xA;&#xD;&#xA;I would definitely like the keys to persist, since my ocw needs to submit unsigned tx's with:&#xD;&#xA;```&#xD;&#xA;		let (_, result) = Signer::&lt;T, T::AuthorityId&gt;::any_account()&#xD;&#xA;			.send_unsigned_transaction(&#xD;&#xA;				|account| SomePayload {&#xD;&#xA;					value: value.clone(),&#xD;&#xA;					public: account.public.clone(),&#xD;&#xA;				},&#xD;&#xA;				|payload, signature| Call::submit_value_from_unsigned_transaction {&#xD;&#xA;					some_payload: payload,&#xD;&#xA;					signature,&#xD;&#xA;				},&#xD;&#xA;			)&#xD;&#xA;			.ok_or(&quot;No local accounts accounts available.&quot;)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I also define the key for ocw to be `pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;abcd&quot;);`, so I will need to generate a key and add it to keystore, right? Well I don't want to be adding it to keystore everytime I make a change to my node and rerun it with `--dev` flag.&#xD;&#xA;&#xD;&#xA;What's the best practice for testing whether my ocw functions as expected? I suppose that my question encompasses two questions really:&#xD;&#xA;- how to add keys to the keystore such that they persist&#xD;&#xA;- how to run the local node s.t. the ocw is enabled AND it picks up the added keys, without having to re-add them every time?&#xD;&#xA;&#xD;&#xA;Many thanks for help on this one!" ContentLicense="CC BY-SA 4.0" />
  <row Id="18317" PostHistoryTypeId="1" PostId="4898" RevisionGUID="23a02c7d-e473-49ae-a992-b5dd24f5a629" CreationDate="2022-09-19T11:48:26.840" UserId="3192" Text="Enabling off-chain workers for substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="18318" PostHistoryTypeId="3" PostId="4898" RevisionGUID="23a02c7d-e473-49ae-a992-b5dd24f5a629" CreationDate="2022-09-19T11:48:26.840" UserId="3192" Text="|substrate-node-template|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18319" PostHistoryTypeId="2" PostId="4899" RevisionGUID="ac00a6ca-dd42-4029-814c-8b7e637224d9" CreationDate="2022-09-19T11:53:59.233" UserId="2147" Text="Here's my babe pallet configuration: I suppose that for PoA we want to keep the same&#xD;&#xA;authority set&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;impl pallet_babe::Config for Runtime {&#xD;&#xA;    type EpochDuration = EpochDuration;&#xD;&#xA;    type ExpectedBlockTime = ExpectedBlockTime;&#xD;&#xA;    type EpochChangeTrigger = pallet_babe::SameAuthoritiesForever;&#xD;&#xA;    type DisabledValidators = Session;&#xD;&#xA;&#xD;&#xA;    type KeyOwnerProofSystem = Historical;&#xD;&#xA;&#xD;&#xA;    type KeyOwnerProof = &lt;Self::KeyOwnerProofSystem as KeyOwnerProofSystem&lt;(&#xD;&#xA;        KeyTypeId,&#xD;&#xA;        pallet_babe::AuthorityId,&#xD;&#xA;    )&gt;&gt;::Proof;&#xD;&#xA;&#xD;&#xA;    type KeyOwnerIdentification = &lt;Self::KeyOwnerProofSystem as KeyOwnerProofSystem&lt;(&#xD;&#xA;        KeyTypeId,&#xD;&#xA;        pallet_babe::AuthorityId,&#xD;&#xA;    )&gt;&gt;::IdentificationTuple;&#xD;&#xA;&#xD;&#xA;    type HandleEquivocation =&#xD;&#xA;        pallet_babe::EquivocationHandler&lt;Self::KeyOwnerIdentification, Offences, ReportLongevity&gt;;&#xD;&#xA;&#xD;&#xA;    type WeightInfo = ();&#xD;&#xA;    type MaxAuthorities = MaxAuthorities;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What would possible happen during a migration from PoA to NPoS when I change&#xD;&#xA;the line `ExternalTrigger`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18321" PostHistoryTypeId="1" PostId="4899" RevisionGUID="ac00a6ca-dd42-4029-814c-8b7e637224d9" CreationDate="2022-09-19T11:53:59.233" UserId="2147" Text="Babe PoA to NPoS migration" ContentLicense="CC BY-SA 4.0" />
  <row Id="18322" PostHistoryTypeId="3" PostId="4899" RevisionGUID="ac00a6ca-dd42-4029-814c-8b7e637224d9" CreationDate="2022-09-19T11:53:59.233" UserId="2147" Text="|runtime|migration|babe|npos|poa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18323" PostHistoryTypeId="2" PostId="4900" RevisionGUID="2131953a-3894-4df4-b61d-d9140bbbaf5c" CreationDate="2022-09-19T12:24:28.810" UserId="1839" Text="I am trying to update the code of a smart contract using the chain-extension functionality instead of using the `ink_env::set_code_hash` method. The contract pallet successfully emits the `ContractCodeUpdated` event with the expected values. Still, after the execution of the contract, the state changes are not persisted and the contract continues to use its original code hash (though changes made in the contract's own storage persists).&#xD;&#xA;&#xD;&#xA;The sample code can be found here (https://github.com/realnimish/contract-upgrade-test).&#xD;&#xA;&#xD;&#xA;**Reproduction steps**&#xD;&#xA;&#xD;&#xA;1. Create a chain extension that takes an input - `(Contract Address, New Code Hash)` and calls the Contracts::set_code extrinsic and returns the result. [impl-chain-ext](https://github.com/realnimish/contract-upgrade-test/blob/main/runtime/src/chain_extension.rs)&#xD;&#xA;2. Create an ink! contract (C1) which interacts with the chain-extension and deploy it. [impl-C1](https://github.com/realnimish/contract-upgrade-test/tree/main/contracts/set_code)&#xD;&#xA;3. Create another ink! contract (C2) which can call C1 to update its code and deploy it. [impl-C2](https://github.com/realnimish/contract-upgrade-test/tree/main/contracts/test_demo1)&#xD;&#xA;4. Create an ink! contract (C3) to which C2 should update to and upload it. [impl-C3](https://github.com/realnimish/contract-upgrade-test/tree/main/contracts/test_demo2)&#xD;&#xA;5. Call the C2 contract method which calls C1 and updates itself to C3 code. [impl-unit-test](https://github.com/realnimish/contract-upgrade-test/tree/main/runtime/tests)&#xD;&#xA;&#xD;&#xA;*Expected Outcome:* Contract C2 now has the code_hash of C3  &#xD;&#xA;*Actual Outcome:* Contract C2's code_hash doesn't change after the execution even though Contract pallet emits that the contract code has been updated and the smart contract call doesn't fail." ContentLicense="CC BY-SA 4.0" />
  <row Id="18325" PostHistoryTypeId="1" PostId="4900" RevisionGUID="2131953a-3894-4df4-b61d-d9140bbbaf5c" CreationDate="2022-09-19T12:24:28.810" UserId="1839" Text="Cannot upgrade contract using chain extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="18326" PostHistoryTypeId="3" PostId="4900" RevisionGUID="2131953a-3894-4df4-b61d-d9140bbbaf5c" CreationDate="2022-09-19T12:24:28.810" UserId="1839" Text="|ink|chain-extension|upgradable-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18327" PostHistoryTypeId="2" PostId="4901" RevisionGUID="f661b7eb-4c13-4b73-8246-994eddc1e610" CreationDate="2022-09-19T12:33:41.913" UserId="445" Text="This is a good resource for converting POA to NPOS&#xD;&#xA; &#xD;&#xA;https://github.com/kaichaosun/substrate-stencil/commits/master" ContentLicense="CC BY-SA 4.0" />
  <row Id="18329" PostHistoryTypeId="2" PostId="4902" RevisionGUID="5edb7853-ebce-40cc-8501-155a813fca30" CreationDate="2022-09-19T12:52:25.690" UserId="351" Text="So go to node -&gt; service and inside new_partial fn add if config.offchain_worker enabled then add the keys to the keystore.&#xD;&#xA;&#xD;&#xA;Example https://github.com/MrishoLukamba/sub-harbour/blob/ml-offchain-workers/node/src/service.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="18331" PostHistoryTypeId="5" PostId="4902" RevisionGUID="825b5389-dbc8-43e6-a2a2-19bd45cf5589" CreationDate="2022-09-19T14:31:59.320" UserId="3192" Comment="More explicit instructions and explanation" Text="So go to node -&gt; service and inside `new_partial` fn add:&#xD;&#xA;```&#xD;&#xA;if config.offchain_worker.enabled{&#xD;&#xA;	sp_keystore::SyncCryptoStore::sr25519_generate_new(&#xD;&#xA;		&amp;*keystore,&#xD;&#xA;		node_template_runtime::&lt;your-pallet-name&gt;::KEY_TYPE,&#xD;&#xA;		Some(&quot;//Alice&quot;),&#xD;&#xA;	).expect(&quot;Creating key with account Alice should work&quot;);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Example: https://github.com/MrishoLukamba/sub-harbour/blob/ml-offchain-workers/node/src/service.rs&#xD;&#xA;&#xD;&#xA;Then every time an offchain-worker runs (e.g. with `--dev` option), the specified Alice key will be generated &amp; added to the keystore." ContentLicense="CC BY-SA 4.0" />
  <row Id="18332" PostHistoryTypeId="24" PostId="4902" RevisionGUID="825b5389-dbc8-43e6-a2a2-19bd45cf5589" CreationDate="2022-09-19T14:31:59.320" Comment="Proposed by 3192 approved by 34 edit id of 285" ContentLicense="CC BY-SA 4.0" />
  <row Id="18333" PostHistoryTypeId="2" PostId="4903" RevisionGUID="0a7f92d5-9807-40bf-b97b-df3f3d349a58" CreationDate="2022-09-19T15:33:15.387" UserId="3194" Text="I have some rust libraries and they have no no_std implementation。&#xD;&#xA;Can i use runtime interface to call those libraries？" ContentLicense="CC BY-SA 4.0" />
  <row Id="18335" PostHistoryTypeId="1" PostId="4903" RevisionGUID="0a7f92d5-9807-40bf-b97b-df3f3d349a58" CreationDate="2022-09-19T15:33:15.387" UserId="3194" Text="Use std only rust libraray to extend substrate runtime interface？" ContentLicense="CC BY-SA 4.0" />
  <row Id="18336" PostHistoryTypeId="3" PostId="4903" RevisionGUID="0a7f92d5-9807-40bf-b97b-df3f3d349a58" CreationDate="2022-09-19T15:33:15.387" UserId="3194" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18337" PostHistoryTypeId="52" PostId="4889" RevisionGUID="2186c5f2-ba3a-43da-8d20-7c41364ff12b" CreationDate="2022-09-19T15:42:13.847" />
  <row Id="18338" PostHistoryTypeId="5" PostId="4725" RevisionGUID="960e0a98-09a9-4a6f-8e14-529ae145546e" CreationDate="2022-09-19T16:07:54.597" UserId="2441" Comment="Link related issues" Text="I have noticed on Moonbeam that the `Normal system.blockWeight` is often much higher than the sum of Normal class extrinsics included in the block. Example:&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/explorer/query/0x438d0a0323d6434a5426ec02dfbfe1847cbfafcf05517c1515029428e5f5b85d&#xD;&#xA;&#xD;&#xA;(block 1813141 / 0x438d0a0323d6434a5426ec02dfbfe1847cbfafcf05517c1515029428e5f5b85d)&#xD;&#xA;&#xD;&#xA;This block includes some `ethereum.transact` transactions totaling `14_967_850_000` Normal weight, but the `system.blockWeight` Normal class for the same block is `221_040_085_000`.&#xD;&#xA;&#xD;&#xA;It is common for these to be different, although the two numbers are sometimes identical as well. Sometimes they are both 0 for a block.&#xD;&#xA;&#xD;&#xA;Where could this discrepancy be coming from?&#xD;&#xA;&#xD;&#xA;EDIT: This question led to both this issue: https://github.com/paritytech/substrate/issues/12252 and this fix: https://github.com/paritytech/frontier/pull/851" ContentLicense="CC BY-SA 4.0" />
  <row Id="18339" PostHistoryTypeId="52" PostId="4892" RevisionGUID="2c92fd5d-788c-451c-a295-5df81af77dac" CreationDate="2022-09-19T17:14:27.703" />
  <row Id="18342" PostHistoryTypeId="2" PostId="4905" RevisionGUID="5fc7edc1-b12b-4be5-b61e-54a1a2f97c8a" CreationDate="2022-09-19T18:07:53.767" UserId="3184" Text="working JS code (thank you @joepetrowski)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;var validatorAddress = ''; // add your address here&#xD;&#xA;var keys = await api.query.session.nextKeys(validatorAddress);&#xD;&#xA;var keysJson = JSON.parse(JSON.stringify(keys));&#xD;&#xA;// typescript Struct has a .toArray() function&#xD;&#xA;var grandpa = keysJson.grandpa;&#xD;&#xA;var babe = keysJson.babe;&#xD;&#xA;var imOnline = keysJson.imOnline;&#xD;&#xA;var paraValidator = keysJson.paraValidator;&#xD;&#xA;var paraAssignment = keysJson.paraAssignment;&#xD;&#xA;var authorityDiscovery = keysJson.authorityDiscovery;&#xD;&#xA;var keys = [grandpa, babe, imOnline, paraValidator, paraAssignment, authorityDiscovery];&#xD;&#xA;var sessionKeys = &quot;0x&quot;;&#xD;&#xA;for (const key of keys) {&#xD;&#xA;  if (key != undefined) {&#xD;&#xA;    sessionKeys += key.replace(/^(0x)/,'');&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;var result = await api.rpc.author.hasSessionKeys(sessionKeys)&#xD;&#xA;console.log(result)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18344" PostHistoryTypeId="5" PostId="4905" RevisionGUID="4e515ec2-92ac-4d22-a00a-6dcf8bb12620" CreationDate="2022-09-19T18:08:26.340" UserId="3184" Comment="added 4 characters in body" Text="working JS code (thank you @joepetrowski)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;var validatorAddress = ''; // add your address here&#xD;&#xA;var keys = await api.query.session.nextKeys(validatorAddress);&#xD;&#xA;var keysJson = JSON.parse(JSON.stringify(keys));&#xD;&#xA;// typescript Struct has a .toArray() function&#xD;&#xA;var grandpa = keysJson.grandpa;&#xD;&#xA;var babe = keysJson.babe;&#xD;&#xA;var imOnline = keysJson.imOnline;&#xD;&#xA;var paraValidator = keysJson.paraValidator;&#xD;&#xA;var paraAssignment = keysJson.paraAssignment;&#xD;&#xA;var authorityDiscovery = keysJson.authorityDiscovery;&#xD;&#xA;var keys = [grandpa, babe, imOnline, paraValidator, paraAssignment, authorityDiscovery];&#xD;&#xA;//&#xD;&#xA;var sessionKeys = &quot;0x&quot;;&#xD;&#xA;for (const key of keys) {&#xD;&#xA;  if (key != undefined) {&#xD;&#xA;    sessionKeys += key.replace(/^(0x)/,'');&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;var result = await api.rpc.author.hasSessionKeys(sessionKeys)&#xD;&#xA;console.log(result)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18345" PostHistoryTypeId="2" PostId="4906" RevisionGUID="d52022ed-26b9-40d1-824f-065a2d912028" CreationDate="2022-09-19T19:03:18.850" UserId="2635" Text="A customer has a substrate blockchain based on Tag 3.0.0&#xD;&#xA;It uses pallet-contracts = { git = &quot;https://github.com/paritytech/substrate.git&quot;,  tag = &quot;v3.0.0&quot;  }&#xD;&#xA;&#xD;&#xA;The problem is that when I compile a smart contract with cargo contract and try to upload it (it uses the old-ui, see image below), it complains that the ABI is invalid.&#xD;&#xA;&#xD;&#xA;'''Invalid ABI file — Error: Invalid JSON ABI structure supplied, expected a recent metadata version'''&#xD;&#xA;&#xD;&#xA;It works Ok with the last version of substrate from the repo.&#xD;&#xA;&#xD;&#xA;So my questions are:&#xD;&#xA;.- Is it possible for cargo contract build contracts compatible with 3.0.0?&#xD;&#xA;.- Is it possible to upgrade just the contract pallet on a substrate based on 3.0.0?&#xD;&#xA;&#xD;&#xA;Thanks very much.&#xD;&#xA;Regads;&#xD;&#xA;Fernando&#xD;&#xA;&#xD;&#xA;[![Code Upload Functionality][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hCvAF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18347" PostHistoryTypeId="1" PostId="4906" RevisionGUID="d52022ed-26b9-40d1-824f-065a2d912028" CreationDate="2022-09-19T19:03:18.850" UserId="2635" Text="Contracts in substrate 3.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="18348" PostHistoryTypeId="3" PostId="4906" RevisionGUID="d52022ed-26b9-40d1-824f-065a2d912028" CreationDate="2022-09-19T19:03:18.850" UserId="2635" Text="|substrate-node|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18354" PostHistoryTypeId="2" PostId="4908" RevisionGUID="516d50f0-edec-4800-9ad8-0c9fdd6dd780" CreationDate="2022-09-19T20:12:39.143" UserId="3197" Text="web3Enable returns an array of all the injected sources/extensions. Is there any way to prevent it from prompting permissions for every installed extension and instead have it only throw out the one the user selects? I want the user to be able to choose from a list of extensions (like singular.app does it) without getting hit with unnecessary popups.&#xD;&#xA;&#xD;&#xA;code Example:&#xD;&#xA;const allInjected = await web3Enable('my cool dapp');" ContentLicense="CC BY-SA 4.0" />
  <row Id="18356" PostHistoryTypeId="1" PostId="4908" RevisionGUID="516d50f0-edec-4800-9ad8-0c9fdd6dd780" CreationDate="2022-09-19T20:12:39.143" UserId="3197" Text="web3Enable prompts sign-in to all of my installed extensions when I only want a single prompt for a single extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="18357" PostHistoryTypeId="3" PostId="4908" RevisionGUID="516d50f0-edec-4800-9ad8-0c9fdd6dd780" CreationDate="2022-09-19T20:12:39.143" UserId="3197" Text="|polkadot-js-extension|browser-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18358" PostHistoryTypeId="2" PostId="4909" RevisionGUID="2fe640c0-593d-4a60-89b8-81217ac9e383" CreationDate="2022-09-19T20:12:59.883" UserId="2936" Text="I am trying to understand what is in a transaction specifically the payload.  While the documentation references the term payload, it is not explicit/clear about what exactly it is.  It seems to include the block number and block hash for determining mortality but what else does it include?  I need an &quot;explain payload to me like I was 5&quot;, I can sort out the details but I need a clear, conceptual model of what is in the extrinsic/transaction.  Furthermore, the payload is then signed and then serialized.  Was it not serialized before being signed?&#xD;&#xA;&#xD;&#xA;This is the documentation I have looked at:&#xD;&#xA;[https://wiki.polkadot.network/docs/build-transaction-construction][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/build-transaction-construction" ContentLicense="CC BY-SA 4.0" />
  <row Id="18360" PostHistoryTypeId="1" PostId="4909" RevisionGUID="2fe640c0-593d-4a60-89b8-81217ac9e383" CreationDate="2022-09-19T20:12:59.883" UserId="2936" Text="What exactly is the payload?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18361" PostHistoryTypeId="3" PostId="4909" RevisionGUID="2fe640c0-593d-4a60-89b8-81217ac9e383" CreationDate="2022-09-19T20:12:59.883" UserId="2936" Text="|substrate-node|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18362" PostHistoryTypeId="5" PostId="4909" RevisionGUID="7ba34831-71be-4fa4-afb2-54f1db305948" CreationDate="2022-09-19T20:31:48.337" UserId="2936" Comment="added further detail" Text="I am trying to understand what is in a transaction specifically the payload.  While the documentation references the term payload, it is not explicit/clear about what exactly it is.  It seems to include the block number and block hash for determining mortality but what else does it include?  I need an &quot;explain payload to me like I was 5&quot;, I can sort out the details but I need a clear, conceptual model of what is in the extrinsic/transaction.  Furthermore, the payload is then signed and then serialized.  Was it not serialized before being signed?&#xD;&#xA;&#xD;&#xA;This is the documentation I have looked at:&#xD;&#xA;https://wiki.polkadot.network/docs/build-transaction-construction&#xD;&#xA;&#xD;&#xA;Is the payload, this information?  If so, the metadata is already encoded, so does it get encoded again?&#xD;&#xA;&#xD;&#xA;    Address: The SS58-encoded address of the sending account.&#xD;&#xA;    Block Hash: The hash of the checkpoint block.&#xD;&#xA;    Block Number: The number of the checkpoint block.&#xD;&#xA;    Genesis Hash: The genesis hash of the chain.&#xD;&#xA;    Metadata: The SCALE-encoded metadata for the runtime when submitted.&#xD;&#xA;    Nonce: The nonce for this transaction.*&#xD;&#xA;    Spec Version: The current spec version for the runtime.&#xD;&#xA;    Transaction Version: The current version for transaction format.&#xD;&#xA;    Tip: Optional, the tip to increase transaction priority.&#xD;&#xA;    Era Period: Optional, the number of blocks after the checkpoint for which a transaction is valid. If zero, the transaction is immortal " ContentLicense="CC BY-SA 4.0" />
  <row Id="18363" PostHistoryTypeId="2" PostId="4910" RevisionGUID="213a43b8-b060-4419-84c6-97463d5c2121" CreationDate="2022-09-19T20:33:28.660" UserId="167" Text="BABE does not really care about being PoA or NPoS. &#xD;&#xA;&#xD;&#xA;Babe expects a set of authorities at the end of the day, and these authotities are received via implementing `SessionHandler`. In other words, through [`SessionHandler`](https://paritytech.github.io/substrate/master/pallet_session/trait.SessionHandler.html), the `pallet-babe` is informed of new authorities (coming from the `pallet-session`). &#xD;&#xA;&#xD;&#xA;Whether those authorities are hardcoded or actually being elected via an election process determines if a chain is PoA or NPoS/DPoS. &#xD;&#xA;&#xD;&#xA;If you want to mimic the path that Polkadot took, you can use the `pallet-staking`. With this pallet, you can have both PoA and NPoS (read [here](https://hackmd.io/KQLaAnOJTMS3xmet3Gle_g) for more information about configuring the staking pallet). If you set the [`Forcing`](https://paritytech.github.io/substrate/master/pallet_staking/enum.Forcing.html) to be `None`, then no new eras are triggered in the staking pallet, and the initial authorities configured via genesis remain active forever, which is what a PoA chain essentially is. Once you allow new eras to be created, the staking pallet will enact new validators through whatever `ElectionProvider` it is given to it. You can still mimic a PoA chain by implementing a custom `ElectionProvider` that always elects the same set of validators.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;In general, this is the structure of the Consensus/PoS pallets in substrate, in their default mode. Of course, as you see they are all connected with Rust traits so they have be swapped out when needed. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Consensus Pallets&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ┌──────────┐&#xD;&#xA;    │          │&#xD;&#xA;    │          │&#xD;&#xA;    │          │&#xD;&#xA;    │  BABE    │                  ┌─────────────────┐                 ┌──────────────────┐&#xD;&#xA;    │          │                  │                 │                 │                  │&#xD;&#xA;    │          │                  │                 │                 │                  │&#xD;&#xA;    │          │                  │                 │                 │                  │&#xD;&#xA;    │          │◄─┐               │                 │                 │                  │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    ├──────────┤  │               │                 │                 │                  │&#xD;&#xA;    ├──────────┤  │               │                 │                 │                  │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    │          │  │ SessionHandler│                 │  SessionManager │                  │&#xD;&#xA;    │   AURA   ◄──┼───────────────┤    SESSION      ◄─────────────────┤     STAKING      │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    ├──────────┤  │               │                 │                 │                  │&#xD;&#xA;    ├──────────┤  │               │                 │                 │                  │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    │          │  │               │                 │                 │                  │&#xD;&#xA;    │          │◄─┘               │                 │                 │                  │&#xD;&#xA;    │          │                  │                 │                 │                  │&#xD;&#xA;    │  GRANDPA │                  └─────────────────┘                 └──────────────────┘&#xD;&#xA;    │          │&#xD;&#xA;    │          │&#xD;&#xA;    │          │&#xD;&#xA;    │          │&#xD;&#xA;    │          │&#xD;&#xA;    └──────────┘&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18365" PostHistoryTypeId="2" PostId="4911" RevisionGUID="570c727f-54d0-4973-be39-c1f582bab7a6" CreationDate="2022-09-19T21:22:26.130" UserId="1803" Text="**Problem statement:**&#xD;&#xA;While indexing it's impossible to extract information from the Extrinsic call when Extrinsic has optional parameters (default if none).&#xD;&#xA;&#xD;&#xA;Solutions:&#xD;&#xA;- storage lookup (seems suboptimal due to the direct chain access);&#xD;&#xA;- extending the Event (it becomes big).&#xD;&#xA;&#xD;&#xA;I assume it is not a common practice to have an Event with 10-15+ fields. The only downside I see - it takes up some space in the block.&#xD;&#xA;Another upside of Event extension - it simplifies indexing code since an Extrinsic handler or storage lookup is no longer needed.&#xD;&#xA;&#xD;&#xA;**Questions:**&#xD;&#xA;Are there any other downsides to having &quot;thick&quot; Events?&#xD;&#xA;Trade-offs: big events vs. storage lookup?&#xD;&#xA;&#xD;&#xA;Some related links:&#xD;&#xA; - [appending an event is a constant time operation][1];&#xD;&#xA; - [events are flushed from the state every block][2].&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/4452/1803&#xD;&#xA;  [2]: https://stackoverflow.com/questions/57219830/what-is-the-cost-of-event-storage-in-substrate?_gl=1*sftly5*_ga*OTM1NzA4MDU0LjE2NDcwMDkwNTQ.*_ga_S812YQPLT2*MTY2MzYxNzYyOS4zLjEuMTY2MzYxODEwNi4wLjAuMA.." ContentLicense="CC BY-SA 4.0" />
  <row Id="18367" PostHistoryTypeId="1" PostId="4911" RevisionGUID="570c727f-54d0-4973-be39-c1f582bab7a6" CreationDate="2022-09-19T21:22:26.130" UserId="1803" Text="Indexing: big Events vs. storage lookup. Downsides of having big Events" ContentLicense="CC BY-SA 4.0" />
  <row Id="18368" PostHistoryTypeId="3" PostId="4911" RevisionGUID="570c727f-54d0-4973-be39-c1f582bab7a6" CreationDate="2022-09-19T21:22:26.130" UserId="1803" Text="|events|indexing|subsquid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18369" PostHistoryTypeId="2" PostId="4912" RevisionGUID="f4d3ed30-4cc8-452f-9cb9-c24d9a6ba4d1" CreationDate="2022-09-19T21:39:46.610" UserId="703" Text="&gt; Is it possible to upgrade just the contract pallet on a substrate based on 3.0.0?&#xD;&#xA;&#xD;&#xA;Yes, this is definitely possible! Substrate enables forkless runtime upgrades. [This tutorial here][1] walks through the steps of upgrading Substrate. Just be cautious when doing this and ensure the `pallet_contracts` is configured correctly for the new version. I recommend comparing the current [substrate-contracts-node][2] with your Substrate node and adding any differences relating to `pallet_contracts`. Note: The substrate-contracts-node uses instant block sealing, so make sure not to edit your node's consensus when comparing.&#xD;&#xA;&#xD;&#xA;&gt; Is it possible for cargo contract build contracts compatible with 3.0.0?&#xD;&#xA;&#xD;&#xA;Yes, it is also possible to use a `cargo-contract` version that is compatible with ink! `v3.0.0`. To do this, you will likely need to downgrade `cargo-contract`. However, it is recommended to use the newest release of ink! (upgrade `pallet_contracts`, see above).&#xD;&#xA;&#xD;&#xA;See [here][3] for `cargo-contract` releases.&#xD;&#xA;&#xD;&#xA;For example, to downgrade:&#xD;&#xA;```&#xD;&#xA;cargo install cargo-contract --version 1.4.0 --force&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/get-started/forkless-upgrade/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [3]: https://github.com/paritytech/cargo-contract/releases" ContentLicense="CC BY-SA 4.0" />
  <row Id="18375" PostHistoryTypeId="2" PostId="4914" RevisionGUID="c148f2dc-1aa9-4de2-9b04-7b49dfbc9caf" CreationDate="2022-09-20T06:09:34.930" UserId="2873" Text="I have configured an asset in the `GenesisConfig` of my node's chain_spec as following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;		assets: AssetsConfig {&#xD;&#xA;			assets: vec![(1000, root_key.clone(), true, 1)], // Genesis assets: id, owner, is_sufficient, min_balance&#xD;&#xA;			metadata: vec![(1000, &quot;Asset name&quot;.into(), &quot;ASSET_NAME&quot;.into(), 0)], // Genesis metadata: id, name, symbol, decimals&#xD;&#xA;			accounts: vec![], // Genesis accounts: id, account_id, balance&#xD;&#xA;		},&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would like to mint this asset using pallet-assets and I am doing this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&lt;pallet_assets::Pallet&lt;T&gt; as Mutate&lt;T::AccountId&gt;&gt;::mint_into(&#xD;&#xA;		  T::MyAssetId::get(),&#xD;&#xA;		  &amp;accountId,&#xD;&#xA;		  amount)?;&#xD;&#xA;```&#xD;&#xA;but I get error &#xD;&#xA;```&#xD;&#xA;    Token(&#xD;&#xA;        UnknownAsset,&#xD;&#xA;    ),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I mint assets configured in the GenesisConfig?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18377" PostHistoryTypeId="1" PostId="4914" RevisionGUID="c148f2dc-1aa9-4de2-9b04-7b49dfbc9caf" CreationDate="2022-09-20T06:09:34.930" UserId="2873" Text="How to mint assets configured in GenesisConfig" ContentLicense="CC BY-SA 4.0" />
  <row Id="18378" PostHistoryTypeId="3" PostId="4914" RevisionGUID="c148f2dc-1aa9-4de2-9b04-7b49dfbc9caf" CreationDate="2022-09-20T06:09:34.930" UserId="2873" Text="|pallet|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18379" PostHistoryTypeId="5" PostId="4914" RevisionGUID="8d53b860-4732-49ca-8638-8420fef648f7" CreationDate="2022-09-20T06:27:18.533" UserId="2873" Comment="added 58 characters in body" Text="I have configured an asset in the `GenesisConfig` of my node's chain_spec as following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;		assets: AssetsConfig {&#xD;&#xA;			assets: vec![(1000, root_key.clone(), true, 1)], // Genesis assets: id, owner, is_sufficient, min_balance&#xD;&#xA;			metadata: vec![(1000, &quot;Asset name&quot;.into(), &quot;ASSET_NAME&quot;.into(), 0)], // Genesis metadata: id, name, symbol, decimals&#xD;&#xA;			accounts: vec![], // Genesis accounts: id, account_id, balance&#xD;&#xA;		},&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would like to mint this asset using pallet-assets and I am doing this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&lt;pallet_assets::Pallet&lt;T&gt; as Mutate&lt;T::AccountId&gt;&gt;::mint_into(&#xD;&#xA;		  T::MyAssetId::get(),&#xD;&#xA;		  &amp;accountId,&#xD;&#xA;		  amount)?;&#xD;&#xA;```&#xD;&#xA;but I get error &#xD;&#xA;```&#xD;&#xA;    Token(&#xD;&#xA;        UnknownAsset,&#xD;&#xA;    ),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I mint assets configured in the GenesisConfig? I was convinced that I did not need to `create` it first." ContentLicense="CC BY-SA 4.0" />
  <row Id="18384" PostHistoryTypeId="2" PostId="4916" RevisionGUID="3058f688-7006-42c3-80ef-4ed2f3856923" CreationDate="2022-09-20T07:57:56.007" UserId="2762" Text="Something may have been wrong when authorising Charlie.&#xD;&#xA;I'd suggest you try to restart the nodes, purging the data:&#xD;&#xA;&#xD;&#xA;    rm -rf /tmp/validator1 (Alice)&#xD;&#xA;    rm -rf /tmp/validator2 (Bob)&#xD;&#xA;    rm -rf /tmp/validator3 (Charlie)&#xD;&#xA;&#xD;&#xA;And when go to Developer -&gt; Sudo -&gt; nodeAuthorization -&gt; addWellKnownNode be sure you are adding Charlie's peer identifier decoded to hex: 0x002408011220876a7b4984f98006dc8d666e28b60de307309835d775e7755cc770328cdacf2e &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;  &#xD;&#xA;After it you should see this in the console you are running Charlie's node:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    2022-09-20 09:52:22  Idle (0 peers), best: #0 (0x6831…07a8), finalized #0 (0x6831…07a8), ⬇ 0.8kiB/s ⬆ 0.8kiB/s  &#xD;&#xA;     2022-09-20 09:52:27  Idle (2 peers), best: #15 (0x66e8…67e1), finalized #13 (0x56b8…3364), ⬇ 2.0kiB/s ⬆ 0.6kiB/s  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/tQCR9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18388" PostHistoryTypeId="2" PostId="4918" RevisionGUID="4f12f2af-5f79-4a0e-84ce-4381e99606a5" CreationDate="2022-09-20T08:59:40.087" UserId="2873" Text="After looking how PolkadotJS app was managing to mint the asset, I figured that I was trying to call the wrong function. I actually do need to call&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(T::WeightInfo::mint())]&#xD;&#xA;		pub fn mint(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			#[pallet::compact] id: T::AssetId,&#xD;&#xA;			beneficiary: AccountIdLookupOf&lt;T&gt;,&#xD;&#xA;			#[pallet::compact] amount: T::Balance,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;```&#xD;&#xA;which inside calls `do_mint` which eventually does the check that I was expecting (i.e. check if the asset already exists - created from GenesisConfig)&#xD;&#xA;```rust&#xD;&#xA;Asset::&lt;T, I&gt;::get(id)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18390" PostHistoryTypeId="2" PostId="4919" RevisionGUID="01ca17b7-5bb4-4e1b-a30c-bcf162188d04" CreationDate="2022-09-20T11:16:26.533" UserId="73" Text="Yes you can use `runtime-interface` to create a host function that calls your rust library. However, you need to be aware that any call to the host is not for free and adds some overhead. &#xD;&#xA;You also need to ensure that the code you are calling is deterministic, if you want to call this code from some on chain code. This means that it should always return the same result, when you pass the same arguments.&#xD;&#xA;When you are building a Parachain, you will also not be able to use any custom host functions from your on chain code. The host functions need to be available on the relay chain and that clearly isn't working for custom host functions.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18392" PostHistoryTypeId="2" PostId="4920" RevisionGUID="73d46255-a81d-4765-a119-29245bc82b0f" CreationDate="2022-09-20T12:46:01.817" UserId="3171" Text="Is it technically possible to call wasm contract from evm contract inside substrate chain that include pallet-contracts and pallet-evm?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18394" PostHistoryTypeId="1" PostId="4920" RevisionGUID="73d46255-a81d-4765-a119-29245bc82b0f" CreationDate="2022-09-20T12:46:01.817" UserId="3171" Text="Is it possible call wasm from evm smart contract on substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18395" PostHistoryTypeId="3" PostId="4920" RevisionGUID="73d46255-a81d-4765-a119-29245bc82b0f" CreationDate="2022-09-20T12:46:01.817" UserId="3171" Text="|ink|smart-contract|evm|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18396" PostHistoryTypeId="2" PostId="4921" RevisionGUID="1f875a5e-3c01-4d29-8c66-808dac7f29bc" CreationDate="2022-09-20T12:57:01.043" UserId="2844" Text="It will possible through Astar Network xvm_pallet, interaction between WASAM and EVM Contract. You can go through [this][1] article&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://medium.com/astar-network/building-a-multichain-network-with-xvm-4e905e93cd7e" ContentLicense="CC BY-SA 4.0" />
  <row Id="18398" PostHistoryTypeId="5" PostId="4921" RevisionGUID="ec32cc4a-de74-4689-b836-2e789f41e1b4" CreationDate="2022-09-20T12:59:34.803" UserId="2844" Comment="added 2 characters in body" Text="It may be possible through Astar Network xvm_pallet, interaction between WASAM and EVM Contract. You can go through [this][1] article&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://medium.com/astar-network/building-a-multichain-network-with-xvm-4e905e93cd7e" ContentLicense="CC BY-SA 4.0" />
  <row Id="18399" PostHistoryTypeId="5" PostId="4921" RevisionGUID="87e98f29-a16a-4ddc-b7c2-8a21fc136e06" CreationDate="2022-09-20T13:06:16.760" UserId="2844" Comment="added 90 characters in body" Text="It is be possible through Astar Network xvm_pallet, interaction between WASAM and EVM Contract. You can go through [this][1] article and there is also video for [this][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://medium.com/astar-network/building-a-multichain-network-with-xvm-4e905e93cd7e&#xD;&#xA;  [2]: https://www.youtube.com/watch?v=86M5w8UjHjU" ContentLicense="CC BY-SA 4.0" />
  <row Id="18400" PostHistoryTypeId="2" PostId="4922" RevisionGUID="d37d83ca-a4f9-49d9-88aa-14bf463321e2" CreationDate="2022-09-20T13:48:20.557" UserId="45" Text="It's definitely technically possible.&#xD;&#xA;&#xD;&#xA;1. It's possible to extend pallet-contracts with so-called [chain extensions](https://ink.substrate.io/macros-attributes/chain-extension/). One could write such an extension that allows calling pallet-evm.&#xD;&#xA;1. The typical way of extending EVM is via adding new &quot;precompiles&quot;. pallet-evm allows adding new precompiles by modifying the [precompiles configuration](https://docs.rs/pallet-evm/latest/pallet_evm/trait.Config.html#associatedtype.Precompiles).&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="18402" PostHistoryTypeId="2" PostId="4923" RevisionGUID="3f7bec70-b5d3-4752-817c-f5a7908cee9f" CreationDate="2022-09-20T14:45:21.560" UserId="703" Text="Moving comment to answer:&#xD;&#xA;&#xD;&#xA;&gt; Double check if there is a parent directory with a Cargo.toml as outlined here [https://stackoverflow.com/questions/61134990/cargo-would-not-build-even-when-src-main-rs-is-available][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/61134990/cargo-would-not-build-even-when-src-main-rs-is-available" ContentLicense="CC BY-SA 4.0" />
  <row Id="18404" PostHistoryTypeId="5" PostId="4903" RevisionGUID="0ea0971b-d862-4f3d-ad4e-055e298761ae" CreationDate="2022-09-20T15:04:43.640" UserId="34" Comment="added 12 characters in body; edited tags; edited title" Text="I have some rust libraries and they have don't have a `no_std` implementation.&#xD;&#xA;Can I use runtime interface to call those libraries？" ContentLicense="CC BY-SA 4.0" />
  <row Id="18405" PostHistoryTypeId="4" PostId="4903" RevisionGUID="0ea0971b-d862-4f3d-ad4e-055e298761ae" CreationDate="2022-09-20T15:04:43.640" UserId="34" Comment="added 12 characters in body; edited tags; edited title" Text="Use std only rust library to extend substrate runtime interface？" ContentLicense="CC BY-SA 4.0" />
  <row Id="18406" PostHistoryTypeId="6" PostId="4903" RevisionGUID="0ea0971b-d862-4f3d-ad4e-055e298761ae" CreationDate="2022-09-20T15:04:43.640" UserId="34" Comment="added 12 characters in body; edited tags; edited title" Text="|pallet|runtime|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18407" PostHistoryTypeId="2" PostId="4924" RevisionGUID="fbbf6c83-aa56-4aae-81d6-fb0d04cbeec7" CreationDate="2022-09-20T16:42:24.250" UserId="3171" Text="I want to open HRMP channel with Rockmine on rococo. But I got the Barrier error and can't understand what is wrong with my request.&#xD;&#xA;&#xD;&#xA;[![Here is the error that I found on rococo side.][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vf5Aw.jpg&#xD;&#xA;&#xD;&#xA;This is my encoded call data&#xD;&#xA;0x29000101000210000400000000070010a5d4e81300000000070010a5d4e800060003005ed0b2381700e8030000e8030000009001000d010004000100a10f&#xD;&#xA;&#xD;&#xA;There is no additional events that can help me to figure out what exactly wrong.&#xD;&#xA;Does anybody has any suggestion?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18409" PostHistoryTypeId="1" PostId="4924" RevisionGUID="fbbf6c83-aa56-4aae-81d6-fb0d04cbeec7" CreationDate="2022-09-20T16:42:24.250" UserId="3171" Text="Barrier error during initiating HRMP channel with Rockmine on Rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="18410" PostHistoryTypeId="3" PostId="4924" RevisionGUID="fbbf6c83-aa56-4aae-81d6-fb0d04cbeec7" CreationDate="2022-09-20T16:42:24.250" UserId="3171" Text="|polkadot|parachain|xcm|rococo|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18411" PostHistoryTypeId="50" PostId="2442" RevisionGUID="777072d7-a0f9-4ccd-ab5c-8aa222209676" CreationDate="2022-09-20T17:08:25.767" UserId="-1" />
  <row Id="18412" PostHistoryTypeId="5" PostId="3961" RevisionGUID="9f39b26e-4d8e-454c-be6d-4948fcc64583" CreationDate="2022-09-20T21:48:41.567" UserId="494" Comment="added 270 characters in body" Text="`polkadot-launch` is being deprecated in favor of [zombienet](https://github.com/paritytech/zombienet).&#xD;&#xA;&#xD;&#xA;You can find some examples on [polkadot](https://github.com/paritytech/polkadot/tree/master/zombienet_tests) and [cumulus](https://github.com/paritytech/cumulus/tree/master/zombienet_tests), although some might be depending on Parity internal infrastructure and you won't necessarily get the full picture.&#xD;&#xA;&#xD;&#xA;Also, check [parachains-integration-tests](https://github.com/paritytech/parachains-integration-tests). It is the tool Parity uses for Common Good Parachains. You can find the tests here: https://github.com/paritytech/cumulus/tree/master/parachains/integration-tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="18413" PostHistoryTypeId="2" PostId="4925" RevisionGUID="37791b9a-d599-4d5a-9590-c71abc9f7771" CreationDate="2022-09-21T02:50:59.780" UserId="1959" Text="Try this encoded call:&#xD;&#xA;0x29000101000214000400000000070010a5d4e81300000000070010a5d4e80006000700f2052a01381700e8030000e803000000900100140d0100040001003121" ContentLicense="CC BY-SA 4.0" />
  <row Id="18415" PostHistoryTypeId="5" PostId="4925" RevisionGUID="066ded15-d90c-4992-b364-5cf31d01eacd" CreationDate="2022-09-21T03:07:28.403" UserId="1959" Comment="added 227 characters in body" Text="First, this is because you use a non-root account or governance to send the XCM. You should use sudo or governance to do this.&#xD;&#xA;Then, there are several questions, although it will not cause `barrier`, but you need to know:&#xD;&#xA;this is the encoded call:&#xD;&#xA;0x29000101000214000400000000070010a5d4e81300000000070010a5d4e80006000700f2052a01381700e8030000e803000000900100140d0100040001003121" ContentLicense="CC BY-SA 4.0" />
  <row Id="18416" PostHistoryTypeId="5" PostId="4925" RevisionGUID="e3cc093f-99b9-4f35-a942-4c8c353c1461" CreationDate="2022-09-21T03:14:08.493" UserId="1959" Comment="added 227 characters in body" Text="First, this is because you use a non-root account or governance to send the XCM. **You should use sudo or governance to do this.**&#xD;&#xA;&#xD;&#xA;Then, there are several questions, although it will not cause `barrier`, but you need to know:&#xD;&#xA;1. Add a `RefundSurplus` instruction between `Transact` and `DepositAsset`, it can refund your surplus weight for transact.&#xD;&#xA;2. The `beneficiary` of `DepositAsset` should be your sovereign account on rococo, your paraId is 2124, so it should be `{0, X1(Parachain(2124))}`, rather than `Parachain(1000)`. It will put unspent tokens into your sovereign account on rococo.&#xD;&#xA;&#xD;&#xA;This is the encoded call:&#xD;&#xA;0x29000101000214000400000000070010a5d4e81300000000070010a5d4e80006000700f2052a01381700e8030000e803000000900100140d0100040001003121" ContentLicense="CC BY-SA 4.0" />
  <row Id="18417" PostHistoryTypeId="5" PostId="4925" RevisionGUID="6c15f375-6dcb-4234-8802-295db0f6b48d" CreationDate="2022-09-21T03:23:40.357" UserId="1959" Comment="added 3 characters in body" Text="First, this is because you use a non-root account or governance to send the XCM. **You should use sudo or governance to do this.**&#xD;&#xA;&#xD;&#xA;Then, there are several questions you need to know, although it will not cause `barrier`:&#xD;&#xA;1. You can add a `RefundSurplus` instruction between `Transact` and `DepositAsset`, it can refund your surplus weight for transact.&#xD;&#xA;2. The `beneficiary` of `DepositAsset` should be your sovereign account on rococo, your paraId is 2124, so it should be `{0, X1(Parachain(2124))}`, rather than `Parachain(1000)`. It will put unspent tokens into your sovereign account on rococo.&#xD;&#xA;&#xD;&#xA;This is the encoded call:&#xD;&#xA;0x29000101000214000400000000070010a5d4e81300000000070010a5d4e80006000700f2052a01381700e8030000e803000000900100140d0100040001003121" ContentLicense="CC BY-SA 4.0" />
  <row Id="18418" PostHistoryTypeId="5" PostId="4925" RevisionGUID="81829448-b95a-4868-919e-e5a87b5d10be" CreationDate="2022-09-21T04:01:23.683" UserId="1959" Comment="added 8 characters in body" Text="First, this is  because you're using a non-root account to send the XCM of HRMP request. **You should use sudo or governance to do this.**&#xD;&#xA;&#xD;&#xA;Then, there are several questions you need to know, although it will not cause `barrier`:&#xD;&#xA;1. You can add a `RefundSurplus` instruction between `Transact` and `DepositAsset`, it can refund your surplus weight for transact.&#xD;&#xA;2. The `beneficiary` of `DepositAsset` should be your sovereign account on rococo, your paraId is 2124, so it should be `{0, X1(Parachain(2124))}`, rather than `Parachain(1000)`. It will put unspent tokens into your sovereign account on rococo.&#xD;&#xA;&#xD;&#xA;This is the encoded call:&#xD;&#xA;0x29000101000214000400000000070010a5d4e81300000000070010a5d4e80006000700f2052a01381700e8030000e803000000900100140d0100040001003121" ContentLicense="CC BY-SA 4.0" />
  <row Id="18419" PostHistoryTypeId="5" PostId="4925" RevisionGUID="925b103c-7760-455f-99a1-b9a26a52d639" CreationDate="2022-09-21T05:18:52.147" UserId="1959" Comment="added 21 characters in body" Text="First, this is  because you're using a non-root account to send the XCM of HRMP request. **You should use sudo or governance to do this.**&#xD;&#xA;&#xD;&#xA;Then, there are several improvements you need to pay attention to, although they're not releated to `barrier`:&#xD;&#xA;1. You can add a `RefundSurplus` instruction between `Transact` and `DepositAsset`, it can refund your surplus weight for transact.&#xD;&#xA;2. The `beneficiary` of `DepositAsset` should be your sovereign account on rococo, your paraId is 2124, so it should be `{0, X1(Parachain(2124))}`, rather than `Parachain(1000)`. It will put unspent tokens into your sovereign account on rococo.&#xD;&#xA;&#xD;&#xA;This is the encoded call:&#xD;&#xA;0x29000101000214000400000000070010a5d4e81300000000070010a5d4e80006000700f2052a01381700e8030000e803000000900100140d0100040001003121" ContentLicense="CC BY-SA 4.0" />
  <row Id="18420" PostHistoryTypeId="5" PostId="4895" RevisionGUID="f4a2897d-61c2-4ca9-a654-a47aadaabb55" CreationDate="2022-09-21T05:36:27.973" UserId="620" Comment="deleted 6 characters in body" Text="First, you will have to provide some funds into the holding register using an instruction like `WithdrawAsset` or `ClaimAsset`, so buying execution assumes that you have something in the holding register to buy with.&#xD;&#xA;&#xD;&#xA;At the beginning of execution, the executor will [weigh the entire message](https://github.com/paritytech/polkadot/blob/2b0d832/xcm/xcm-executor/src/lib.rs#L83), given what it knows about the weight of each `Instruction` in the array (some instructions, like `Transact`, need to be told a max weight).&#xD;&#xA;&#xD;&#xA;Now that it knows the weight, it can check if it [`should_execute`](https://github.com/paritytech/polkadot/blob/2b0d832/xcm/xcm-executor/src/lib.rs#L112). The key here is how it constructs the `BuyExecution` instruction:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;match i {&#xD;&#xA;	BuyExecution { weight_limit: Limited(ref mut weight), .. } if *weight &gt;= max_weight =&gt; {&#xD;&#xA;		*weight = max_weight;&#xD;&#xA;		Ok(())&#xD;&#xA;	},&#xD;&#xA;	BuyExecution { ref mut weight_limit, .. } if weight_limit == &amp;Unlimited =&gt; {&#xD;&#xA;		*weight_limit = Limited(max_weight);&#xD;&#xA;		Ok(())&#xD;&#xA;	},&#xD;&#xA;	_ =&gt; Err(()),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If the weight is `Unlimited`, it will just try to use whatever funds are in the holding register to buy enough weight to execute the instructions. By putting in `Limited(weight)`, you are basically saying &quot;I'm only willing to buy this much weight, and if the message comes out to be heavier, then don't execute it.&quot;&#xD;&#xA;&#xD;&#xA;Of course, even with `Unlimited`, it can still fail. Depending on the weight to fee rate, you may not have provided enough funds in the holding register, in which case you'll get a `TooExpensive` error." ContentLicense="CC BY-SA 4.0" />
  <row Id="18421" PostHistoryTypeId="2" PostId="4926" RevisionGUID="fc0da228-33a3-431e-a074-130aeb07e22a" CreationDate="2022-09-21T07:46:51.567" UserId="1789" Text="I was adding a new precompile function to my parachain,&#xD;&#xA;&#xD;&#xA;then when I ran my parachain and invoked one of the precompile functions, I got this error from one of the polkadot validators:&#xD;&#xA;`Relaychain Collation wasn't advertised to any validator`&#xD;&#xA;&#xD;&#xA;and that validator went from connecting to 2 peers(the other validator and the parachain) to 1 peer(the other validator).&#xD;&#xA;&#xD;&#xA;and this error showed up from my parachain collator:&#xD;&#xA;`ERROR main runtime: panicked at 'Digest item must match that calculated.'`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18423" PostHistoryTypeId="1" PostId="4926" RevisionGUID="fc0da228-33a3-431e-a074-130aeb07e22a" CreationDate="2022-09-21T07:46:51.567" UserId="1789" Text="Precompile error.. main runtime: panicked at 'Digest item must match that calculated,'" ContentLicense="CC BY-SA 4.0" />
  <row Id="18424" PostHistoryTypeId="3" PostId="4926" RevisionGUID="fc0da228-33a3-431e-a074-130aeb07e22a" CreationDate="2022-09-21T07:46:51.567" UserId="1789" Text="|parachain|frontier|validator|evm|precompile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18425" PostHistoryTypeId="2" PostId="4927" RevisionGUID="22118d52-bc3d-4a1c-986e-fb22bf065a49" CreationDate="2022-09-21T07:46:51.567" UserId="1789" Text="Need to build a new WASM again following the tutorial https://docs.substrate.io/tutorials/connect-other-chains/connect-a-local-parachain/&#xD;&#xA;```&#xD;&#xA;./parachain-collator build-spec \&#xD;&#xA;--disable-default-bootnode &gt; rococo-local-parachain-plain.json \&#xD;&#xA;&amp;&amp; ./parachain-collator build-spec --chain rococo-local-parachain-plain.json \&#xD;&#xA;--raw --disable-default-bootnode &gt; parachain-raw.json \&#xD;&#xA;&amp;&amp; ./parachain-collator export-genesis-wasm \&#xD;&#xA;--chain parachain-raw.json &gt; para-wasm \&#xD;&#xA;&amp;&amp; ./parachain-collator export-genesis-state \&#xD;&#xA;--chain parachain-raw.json &gt; para-genesis&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18427" PostHistoryTypeId="5" PostId="4926" RevisionGUID="4f719048-2d19-40f2-aaa8-303c0f1d8e93" CreationDate="2022-09-21T08:03:00.483" UserId="1789" Comment="added 495 characters in body" Text="I was adding a new precompile function to my parachain,&#xD;&#xA;&#xD;&#xA;then when I ran my parachain and invoked one of the precompile functions, I got this error from one of the polkadot validators:&#xD;&#xA;`Relaychain Collation wasn't advertised to any validator`&#xD;&#xA;&#xD;&#xA;and that validator went from connecting to 2 peers(the other validator and the parachain) to 1 peer(the other validator).&#xD;&#xA;&#xD;&#xA;and this error showed up from my parachain collator:&#xD;&#xA;```&#xD;&#xA;ERROR main runtime: panicked at 'Digest item must match that calculated.'&#xD;&#xA;&#xD;&#xA;[Parachain] Could not find the header of the genesis block in the database! &#xD;&#xA;&#xD;&#xA;runtime::storage: Corrupted state at [29, 186, 24, 76, 175, 197, 232, 114, 222, 94, 248, 240, 95, 69, 38, 7, 232, 157, 0, 204, 183, 181, 2, 22, 12, 248, 168, 34, 221, 252, 65, 168, 174, 167, 89, 124, 78, 203, 37, 115, 239, 230, 87, 126, 236, 129, 58, 120, 13, 109, 47, 202, 237, 47, 44, 205, 92, 29, 92, 134, 70, 132, 144, 242, 170, 254, 236, 139, 124, 177, 74, 245, 18, 205, 248, 199, 152, 1, 131, 163]&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18428" PostHistoryTypeId="2" PostId="4928" RevisionGUID="4ea38d1b-68d7-49ed-ab44-7b65014195b5" CreationDate="2022-09-21T08:28:10.220" UserId="1779" Text="It seems like the substrate [client::cli::init](https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/client/cli/src/lib.rs#L240) code is not properly initializing the logger: any `log::info!` calls (or even `log::error!` calls) are not being shown in the terminal. All `println!` outputs _are_ being shown fwiw. The init code is called by [client::cli::create_runner](https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/client/cli/src/lib.rs#L199), and I am starting the node with `RUST_LOG=info`. I also tried the various logging options such as the `--tracing-targets`, but to no avail.&#xD;&#xA;&#xD;&#xA;The reason why I think there is going something wrong in the initialization, is because if I call `env_logger::init()` prior to `create_runner`, my logs _do_ work, but obviously that will cause `create_runner` to fail when it tries to initialize the logger again.&#xD;&#xA;&#xD;&#xA;Any help would be much appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="18430" PostHistoryTypeId="1" PostId="4928" RevisionGUID="4ea38d1b-68d7-49ed-ab44-7b65014195b5" CreationDate="2022-09-21T08:28:10.220" UserId="1779" Text="Log messages not displayed" ContentLicense="CC BY-SA 4.0" />
  <row Id="18431" PostHistoryTypeId="3" PostId="4928" RevisionGUID="4ea38d1b-68d7-49ed-ab44-7b65014195b5" CreationDate="2022-09-21T08:28:10.220" UserId="1779" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18432" PostHistoryTypeId="2" PostId="4929" RevisionGUID="b535bd32-240d-478e-a4c5-23966d4d6c50" CreationDate="2022-09-21T09:21:05.113" UserId="2884" Text="I'm trying to do a reserve-backed transfer from statemint to my own parachain of a token minted with the pallet_assets. I've been using the [xcm-emulator][1] that lets me plug in my own runtimes and do tests on them.&#xD;&#xA;&#xD;&#xA;I managed to get this working, except that my parachain doesn't accept this token to pay for execution in the BuyExecution instruction (intended behaviour), so I wanted to also add some DOT tokens on the reserve_transfer_assets pallet call, and specify on the fee_asset_item parameter the index of DOT to use for paying the transaction. It looks something like this:&#xD;&#xA;```rust&#xD;&#xA;	StatemintParachain::execute_with(|| {&#xD;&#xA;		let xcm = StatemintXcmPallet::reserve_transfer_assets(&#xD;&#xA;			statemint_runtime::Origin::signed(ALICE),&#xD;&#xA;			Box::new(MultiLocation{parents: 1, interior: X1(Parachain(2000))}.into()),&#xD;&#xA;			Box::new(X1(Junction::AccountId32 {&#xD;&#xA;				network: NetworkId::Any,&#xD;&#xA;				id: ALICE.into()&#xD;&#xA;			}).into().into()),&#xD;&#xA;			Box::new(vec![&#xD;&#xA;				MultiAsset {&#xD;&#xA;					id: Concrete(X2(PalletInstance(50), GeneralIndex(1)).into()),&#xD;&#xA;					fun: Fungible(500)&#xD;&#xA;				},&#xD;&#xA;				MultiAsset {&#xD;&#xA;					id: Concrete(Parent.into()),&#xD;&#xA;					fun: Fungible(INITIAL_BALANCE/10)&#xD;&#xA;				},&#xD;&#xA;			].into()),&#xD;&#xA;			1,&#xD;&#xA;		);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The problem is that when adding DOT to the assets parameter, there seems to be an XCMP decoding error on the receiving parachain side:&#xD;&#xA;&#xD;&#xA;    Invalid incoming XCMP message data&#xD;&#xA;    thread 'tests::new_fungible_reserve_transfer' panicked at 'Invalid incoming XCMP message data', /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/d08055d/pallets/xcmp-queue/src/lib.rs:679:25&#xD;&#xA;    stack backtrace:&#xD;&#xA;       0: rust_begin_unwind&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5&#xD;&#xA;       1: core::panicking::panic_fmt&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14&#xD;&#xA;       2: cumulus_pallet_xcmp_queue::&lt;impl cumulus_pallet_xcmp_queue::pallet::Pallet&lt;T&gt;&gt;::process_xcmp_message&#xD;&#xA;                 at /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/d08055d/pallets/xcmp-queue/src/lib.rs:679:7&#xD;&#xA;       3: cumulus_pallet_xcmp_queue::&lt;impl cumulus_pallet_xcmp_queue::pallet::Pallet&lt;T&gt;&gt;::service_xcmp_queue&#xD;&#xA;                 at /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/d08055d/pallets/xcmp-queue/src/lib.rs:832:40&#xD;&#xA;       4: cumulus_pallet_xcmp_queue::&lt;impl polkadot_parachain::primitives::XcmpMessageHandler for cumulus_pallet_xcmp_queue::pallet::Pallet&lt;T&gt;&gt;::handle_xcmp_messages&#xD;&#xA;                 at /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/d08055d/pallets/xcmp-queue/src/lib.rs:979:3&#xD;&#xA;       5: &lt;xcm_emulator_example::AcurastParachain as polkadot_parachain::primitives::XcmpMessageHandler&gt;::handle_xcmp_messages::{{closure}}&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:90:28&#xD;&#xA;       6: environmental::using::{{closure}}&#xD;&#xA;                 at /Users/juan/.cargo/registry/src/github.com-1ecc6299db9ec823/environmental-1.1.3/src/lib.rs:125:3&#xD;&#xA;       7: std::thread::local::LocalKey&lt;T&gt;::try_with&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/local.rs:445:16&#xD;&#xA;       8: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/local.rs:421:9&#xD;&#xA;       9: environmental::using&#xD;&#xA;                 at /Users/juan/.cargo/registry/src/github.com-1ecc6299db9ec823/environmental-1.1.3/src/lib.rs:106:2&#xD;&#xA;      10: sp_externalities::scope_limited::ext::using&#xD;&#xA;                 at /Users/juan/.cargo/registry/src/github.com-1ecc6299db9ec823/environmental-1.1.3/src/lib.rs:252:5&#xD;&#xA;      11: sp_externalities::scope_limited::set_and_run_with_externalities&#xD;&#xA;                 at /Users/juan/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/externalities/src/scope_limited.rs:31:2&#xD;&#xA;      12: sp_state_machine::testing::TestExternalities&lt;H&gt;::execute_with&#xD;&#xA;                 at /Users/juan/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/state-machine/src/testing.rs:196:3&#xD;&#xA;      13: &lt;xcm_emulator_example::AcurastParachain as xcm_emulator::TestExt&gt;::execute_with::{{closure}}&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:230:32&#xD;&#xA;      14: std::thread::local::LocalKey&lt;T&gt;::try_with&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/local.rs:445:16&#xD;&#xA;      15: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/local.rs:421:9&#xD;&#xA;      16: &lt;xcm_emulator_example::AcurastParachain as xcm_emulator::TestExt&gt;::execute_with&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:230:13&#xD;&#xA;      17: &lt;xcm_emulator_example::AcurastParachain as polkadot_parachain::primitives::XcmpMessageHandler&gt;::handle_xcmp_messages&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:90:5&#xD;&#xA;      18: xcm_emulator_example::_process_horizontal_messages&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:381:8&#xD;&#xA;      19: xcm_emulator_example::_process_messages&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:330:5&#xD;&#xA;      20: &lt;xcm_emulator_example::StatemintParachain as xcm_emulator::TestExt&gt;::execute_with&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:272:5&#xD;&#xA;      21: xcm_emulator_example::tests::new_fungible_reserve_transfer&#xD;&#xA;                 at ./src/lib.rs:547:3&#xD;&#xA;      22: xcm_emulator_example::tests::new_fungible_reserve_transfer::{{closure}}&#xD;&#xA;                 at ./src/lib.rs:474:2&#xD;&#xA;      23: core::ops::function::FnOnce::call_once&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:248:5&#xD;&#xA;      24: core::ops::function::FnOnce::call_once&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:248:5&#xD;&#xA;    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.&#xD;&#xA;    &#xD;&#xA;    error: test failed, to rerun pass '--lib'&#xD;&#xA;&#xD;&#xA;I tried instead of sending DOT, to send another minted asset, and that seems to be decoded correctly on the receiving chain. What am I Missing here?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/shaunxw/xcm-simulator/tree/master/xcm-emulator&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18434" PostHistoryTypeId="1" PostId="4929" RevisionGUID="b535bd32-240d-478e-a4c5-23966d4d6c50" CreationDate="2022-09-21T09:21:05.113" UserId="2884" Text="Invalid Incoming XCMP message data" ContentLicense="CC BY-SA 4.0" />
  <row Id="18435" PostHistoryTypeId="3" PostId="4929" RevisionGUID="b535bd32-240d-478e-a4c5-23966d4d6c50" CreationDate="2022-09-21T09:21:05.113" UserId="2884" Text="|xcm|assets|xcmp|statemint|panic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18436" PostHistoryTypeId="5" PostId="4911" RevisionGUID="0e5955c6-c706-4955-bb63-6711a5f8f45e" CreationDate="2022-09-21T09:53:51.060" UserId="1803" Comment="Add information that Subsquid is used for indexing" Text="**Problem statement:**&#xD;&#xA;While indexing it's impossible to extract information from the Extrinsic call when Extrinsic has optional parameters (default if none).&#xD;&#xA;&#xD;&#xA;Solutions:&#xD;&#xA; - storage lookup (seems suboptimal due to the direct chain access). Subsquid is used for indexing, and it doesn't support off-chain storage lookups;&#xD;&#xA; - extending the Event (it becomes big).&#xD;&#xA;&#xD;&#xA;I assume it is not a common practice to have an Event with 10-15+ fields. The only downside I see - it takes up some space in the block.&#xD;&#xA;Another upside of Event extension - it simplifies indexing code since an Extrinsic handler or storage lookup is no longer needed.&#xD;&#xA;&#xD;&#xA;**Questions:**&#xD;&#xA;Are there any other downsides to having &quot;thick&quot; Events?&#xD;&#xA;Trade-offs: big events vs. storage lookup?&#xD;&#xA;&#xD;&#xA;Some related links:&#xD;&#xA; - [appending an event is a constant time operation][1];&#xD;&#xA; - [events are flushed from the state every block][2].&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/4452/1803&#xD;&#xA;  [2]: https://stackoverflow.com/questions/57219830/what-is-the-cost-of-event-storage-in-substrate?_gl=1*sftly5*_ga*OTM1NzA4MDU0LjE2NDcwMDkwNTQ.*_ga_S812YQPLT2*MTY2MzYxNzYyOS4zLjEuMTY2MzYxODEwNi4wLjAuMA.." ContentLicense="CC BY-SA 4.0" />
  <row Id="18437" PostHistoryTypeId="2" PostId="4930" RevisionGUID="a7f60e1e-ba32-48fa-b4d2-c31041a21725" CreationDate="2022-09-21T12:38:04.653" UserId="2844" Text="It's because of cargo-contract branch hasn't merged and which is in progress, you can view details [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/pull/1404#issuecomment-1253595858" ContentLicense="CC BY-SA 4.0" />
  <row Id="18439" PostHistoryTypeId="2" PostId="4931" RevisionGUID="3892e7ff-0167-4b1a-82cf-96b9c4e91c7d" CreationDate="2022-09-21T13:25:09.547" UserId="298" Text="[![enter image description here][1]][1]I'm trying to run a substrate node through docker container but i am not able to with this command:&#xD;&#xA;&#xD;&#xA;`docker run -p 9944:9944 -p 30333:30333 -p 9933:9933 -p 9615:9615  docker.io/decentration/supersig-node:latest --dev --port 30333 --ws-port 9944 --rpc-port 9933`&#xD;&#xA;&#xD;&#xA;The logs look like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-21 13:21:19 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-09-21 13:21:19 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=None    &#xD;&#xA;2022-09-21 13:21:19 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=None &#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but im not going any errors from the console.&#xD;&#xA;&#xD;&#xA;What am i missing from the command?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: https://i.stack.imgur.com/cdrox.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18441" PostHistoryTypeId="1" PostId="4931" RevisionGUID="3892e7ff-0167-4b1a-82cf-96b9c4e91c7d" CreationDate="2022-09-21T13:25:09.547" UserId="298" Text="Docker container...-p 9944:9944 running Node Template not working on polkadot js apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="18442" PostHistoryTypeId="3" PostId="4931" RevisionGUID="3892e7ff-0167-4b1a-82cf-96b9c4e91c7d" CreationDate="2022-09-21T13:25:09.547" UserId="298" Text="|polkadot-js|substrate-node-template|substrate-front-end|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18443" PostHistoryTypeId="2" PostId="4932" RevisionGUID="39c1de7a-ce76-4681-adda-ff030812e072" CreationDate="2022-09-21T14:14:50.160" UserId="1959" Text="Have you tried allowing Insecure content？Chrome allows you to connect to wss by default, but you are using ws. So you could try to allow `insecure content` for development&#xD;&#xA;1. [![enter image description here][1]][1]&#xD;&#xA;2. [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3TcI1.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/gD74H.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18445" PostHistoryTypeId="5" PostId="4931" RevisionGUID="d8174333-aef1-439c-9230-104474f77425" CreationDate="2022-09-21T14:23:42.330" UserId="298" Comment="deleted 39 characters in body" Text="I'm trying to run a substrate node through docker container but i am not able to with this command:&#xD;&#xA;&#xD;&#xA;`docker run -p 9944:9944 -p 30333:30333 -p 9933:9933 -p 9615:9615  docker.io/decentration/supersig-node:latest --dev --port 30333 --ws-port 9944 --rpc-port 9933`&#xD;&#xA;&#xD;&#xA;The logs look like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-21 13:21:19 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-09-21 13:21:19 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=None    &#xD;&#xA;2022-09-21 13:21:19 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=None &#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but i'm not getting any errors from the console.&#xD;&#xA;&#xD;&#xA;What am i missing from the command?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: https://i.stack.imgur.com/cdrox.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18446" PostHistoryTypeId="2" PostId="4933" RevisionGUID="7a08c3cc-973e-4345-9fb9-031034a9e156" CreationDate="2022-09-21T14:29:34.707" UserId="251" Text="Try boot with:&#xD;&#xA;```&#xD;&#xA;--unsafe-ws-external --rpc-cors all&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18448" PostHistoryTypeId="5" PostId="4933" RevisionGUID="ccd9371c-56e8-461e-bb23-e9cdbd4d21e9" CreationDate="2022-09-21T14:47:29.007" UserId="251" Comment="edited body" Text="Try boot with:&#xD;&#xA;```&#xD;&#xA;--unsafe-ws-external --rpc-cros all&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18449" PostHistoryTypeId="5" PostId="4933" RevisionGUID="2a529f25-25b0-4921-93d7-3ec426f4a506" CreationDate="2022-09-21T14:47:48.027" UserId="251" Comment="edited body" Text="Try boot with:&#xD;&#xA;```&#xD;&#xA;--unsafe-ws-external --rpc-cors all&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18450" PostHistoryTypeId="5" PostId="4931" RevisionGUID="9a126f0a-aaf4-4f8d-b03e-712211a4bb96" CreationDate="2022-09-21T15:12:18.953" UserId="298" Comment="added 164 characters in body" Text="I'm trying to run a substrate node through docker container but i am not able to with this command:&#xD;&#xA;&#xD;&#xA;`docker run -p 9944:9944 -p 30333:30333 -p 9933:9933 -p 9615:9615  docker.io/decentration/supersig-node:latest --dev --port 30333 --ws-port 9944 --rpc-port 9933`&#xD;&#xA;&#xD;&#xA;The logs look like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-21 13:21:19 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-09-21 13:21:19 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=None    &#xD;&#xA;2022-09-21 13:21:19 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=None &#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but i'm not getting any errors from the console.&#xD;&#xA;&#xD;&#xA;What am i missing from the command?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Update: i am allowing insecure messages but still not working from docker*&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/p2EXS.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/cdrox.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18451" PostHistoryTypeId="2" PostId="4934" RevisionGUID="b60aed97-6943-44bd-8547-d6fd84e2fa75" CreationDate="2022-09-21T15:30:58.640" UserId="3211" Text="Currently working inside the Moonbeam interface as was wondering if it was possible to pull the group of transactions that the Moonbeam collators are sending to the Polkadot Relay Chain before they are finalized by the validators? &#xD;&#xA;&#xD;&#xA;Is this possible to accomplish through the py-substrate-interface or the polkadot.js interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18453" PostHistoryTypeId="1" PostId="4934" RevisionGUID="b60aed97-6943-44bd-8547-d6fd84e2fa75" CreationDate="2022-09-21T15:30:58.640" UserId="3211" Text="Is it possible to pull the transactions that the Moonbeam collators are sending to the Polkadot relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18454" PostHistoryTypeId="3" PostId="4934" RevisionGUID="b60aed97-6943-44bd-8547-d6fd84e2fa75" CreationDate="2022-09-21T15:30:58.640" UserId="3211" Text="|polkadot-js|polkadot|collator|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18455" PostHistoryTypeId="2" PostId="4935" RevisionGUID="ae550504-6e31-46e8-a3b7-29fb7d406689" CreationDate="2022-09-21T17:29:20.190" UserId="279" Text="I think that version (v0.9.26) have a version of `tracing-core` as dep that cause the issue. You can fix it by pin the crate version &#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;tracing-core = &quot;=0.1.26&quot;&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;Or update to `v0.9.28` where the issue is already fixed.&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="18457" PostHistoryTypeId="2" PostId="4936" RevisionGUID="0c65b162-35f6-4bd5-a95d-0806268fc40b" CreationDate="2022-09-21T18:25:18.397" UserId="246" Text="Different substrate chains have different denominations for native tokens. &#xD;&#xA;&#xD;&#xA;For example, to get human readable amounts with [Polkadot you have to divide by 1e10, Kusama by 1e12](https://wiki.polkadot.network/docs/build-protocol-info), [Acala by 1e12](https://wiki.acala.network/integrate/integration/protocol-info) etc. &#xD;&#xA;&#xD;&#xA;Is there a way to find the denomination by querying the chain itself rather than googling protocol information? In a storage function or the metadata for example?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18459" PostHistoryTypeId="1" PostId="4936" RevisionGUID="0c65b162-35f6-4bd5-a95d-0806268fc40b" CreationDate="2022-09-21T18:25:18.397" UserId="246" Text="Is there a way query the denomination information of a substrate token from the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18460" PostHistoryTypeId="3" PostId="4936" RevisionGUID="0c65b162-35f6-4bd5-a95d-0806268fc40b" CreationDate="2022-09-21T18:25:18.397" UserId="246" Text="|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18461" PostHistoryTypeId="2" PostId="4937" RevisionGUID="416c93ff-d45a-4958-a6f4-d662ddaf7968" CreationDate="2022-09-21T18:40:53.500" UserId="3213" Text="I want to collect some transfer fee besides base, weight, length fee before user makes a transaction.&#xD;&#xA;&#xD;&#xA;Like if the base + weight + length fee = 0.1&#xD;&#xA;And For every transaction I want to add additional 0.2 then total fee should become 0.3.&#xD;&#xA;&#xD;&#xA;This 0.2 will go in treasury.&#xD;&#xA;&#xD;&#xA;How can I implement this in substrate/parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18463" PostHistoryTypeId="1" PostId="4937" RevisionGUID="416c93ff-d45a-4958-a6f4-d662ddaf7968" CreationDate="2022-09-21T18:40:53.500" UserId="3213" Text="Collect some transfer fees before any transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="18464" PostHistoryTypeId="3" PostId="4937" RevisionGUID="416c93ff-d45a-4958-a6f4-d662ddaf7968" CreationDate="2022-09-21T18:40:53.500" UserId="3213" Text="|substrate-node|transactions|fee|transfer|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18465" PostHistoryTypeId="2" PostId="4938" RevisionGUID="99fe4eb3-0a16-45d0-a17b-15d654f77533" CreationDate="2022-09-21T18:52:46.973" UserId="94" Text="PolkadotJS offers it. Simple as:  &#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;const decimals = api.registry.chainDecimals;&#xD;&#xA;console.log(`Polkadot has ${decimals} decimals`);&#xD;&#xA;// Polkadot has 10 decimals&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18467" PostHistoryTypeId="2" PostId="4939" RevisionGUID="a3117b14-dee7-44c4-8a87-a496a61c78e6" CreationDate="2022-09-21T19:29:25.770" UserId="3064" Text="I would like to extract the validator that a given nominator is bonding? Is this possible given the extrinsic or should it be done some other way?&#xD;&#xA;&#xD;&#xA;Here is my code:&#xD;&#xA;```lang-js&#xD;&#xA;const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;    // Initialise the provider to connect to the local node&#xD;&#xA;    const provider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;&#xD;&#xA;    // Create the API and wait until ready&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;    const blockNumber = 11833484; &#xD;&#xA;&#xD;&#xA;    // returns Hash&#xD;&#xA;    const blockHash = await api.rpc.chain.getBlockHash(blockNumber);&#xD;&#xA;    // returns SignedBlock&#xD;&#xA;    const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;&#xD;&#xA;    const apiAt = await api.at(signedBlock.block.header.hash);&#xD;&#xA;    const allRecords = await apiAt.query.system.events();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    const bondingEvents = allRecords.filter(ev =&gt; ev.event.method == 'Bonded');&#xD;&#xA;    const bondingExtrinsics = bondingEvents&#xD;&#xA;        .map(ev =&gt; &#xD;&#xA;            signedBlock.block.extrinsics.at(ev.phase.asApplyExtrinsic)&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;    console.log(bondingExtrinsics[0].toHuman());&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;main().catch((error) =&gt; {&#xD;&#xA;    console.error(error);&#xD;&#xA;    process.exit(-1);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;output:&#xD;&#xA;```lang-js&#xD;&#xA;{&#xD;&#xA;  isSigned: true,&#xD;&#xA;  method: {&#xD;&#xA;    args: { max_additional: '13,428,193,000,000' },&#xD;&#xA;    method: 'bondExtra',&#xD;&#xA;    section: 'staking'&#xD;&#xA;  },&#xD;&#xA;  era: { MortalEra: { period: '64', phase: '7' } },&#xD;&#xA;  nonce: '283',&#xD;&#xA;  signature: '0x04aebb51e2b2b1947e3e344537caa45cad9caa170808d8ed2f448ef4e0433b69820e5f60b35065ed7c7adc0ecb88d03b9e1fdf46e6873b8f9263738dbc874080',&#xD;&#xA;  signer: { Id: '15V25oBZGu7wAfV7LPP8YBwaWRgBAyfiVUtVywGHAcDAw9cD' },&#xD;&#xA;  tip: '0'&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The amount bonded and the account which is bonding are both clearly visible in the output. How, then, should I go about retrieving the validator which is being bonded to?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18469" PostHistoryTypeId="1" PostId="4939" RevisionGUID="a3117b14-dee7-44c4-8a87-a496a61c78e6" CreationDate="2022-09-21T19:29:25.770" UserId="3064" Text="How can I tell which validator is being bonded to for a given bonding extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18470" PostHistoryTypeId="3" PostId="4939" RevisionGUID="a3117b14-dee7-44c4-8a87-a496a61c78e6" CreationDate="2022-09-21T19:29:25.770" UserId="3064" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18471" PostHistoryTypeId="2" PostId="4940" RevisionGUID="a397621a-1a17-4c9f-8f35-2341b0b267fd" CreationDate="2022-09-21T20:41:43.903" UserId="2442" Text="I have some pallet that provide storage `SomeValue`, and this storage was exposed through `#[pallet::getter(fn some_value)]`. Having removed this getter in favour of a paged RPC API, I was thinking that this would allow avoiding a malicious client to query repeatedly the entire storage, that potentially could contain a lot of data.&#xD;&#xA;&#xD;&#xA;I may have missed the point here, since in the [Runtime storage documentation][1] is stated:&#xD;&#xA;&#xD;&#xA;&gt; The optional getter extension only impact the way that a storage item can be accessed from within Substrate code—you will always be able to query the storage of your runtime to get the value of a storage item.&#xD;&#xA;&#xD;&#xA;Therefore, &#xD;&#xA; * is the continued and complete availability of the storage a wanted behaviour of a blockchain? &#xD;&#xA; * Is limiting the amount of data on chain the only strategy preventing an attacker that queries continuously a storage to introduce instability in the system?&#xD;&#xA; * is there a possibility to define some weights in retrieving the chain state?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/runtime-storage/" ContentLicense="CC BY-SA 4.0" />
  <row Id="18473" PostHistoryTypeId="1" PostId="4940" RevisionGUID="a397621a-1a17-4c9f-8f35-2341b0b267fd" CreationDate="2022-09-21T20:41:43.903" UserId="2442" Text="is #[pallet::storage] exploitable for a DDoS attack?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18474" PostHistoryTypeId="3" PostId="4940" RevisionGUID="a397621a-1a17-4c9f-8f35-2341b0b267fd" CreationDate="2022-09-21T20:41:43.903" UserId="2442" Text="|storage|performance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18475" PostHistoryTypeId="2" PostId="4941" RevisionGUID="07cd921e-eb55-43b4-8580-19187e01f84f" CreationDate="2022-09-21T22:51:53.750" UserId="28" Text="`#[pallet::getter(fn some_value)]` does not affect the ability for storage to be queried. It's purpose is only to provide an internal Rust function which can be used in pallet development.&#xD;&#xA;&#xD;&#xA;From the node side, the RPC [`getStorage`](https://polkadot.js.org/docs/substrate/rpc#getstoragekey-storagekey-at-blockhash-storagedata) and the other [`state`](https://polkadot.js.org/docs/substrate/rpc#state) RPCs are always available.&#xD;&#xA;&#xD;&#xA;So yes, technically it is possible to waste the resources of a node by continually querying lots of storage, but this is true for basically any RPC the node exposes, since they all take some computation to execute.&#xD;&#xA;&#xD;&#xA;To protect against these kinds of attacks here are some suggestions&#xD;&#xA;&#xD;&#xA;- Do not expose your node to the public internet, at least not without some kind of network traffic controller in front of it like cloudflare.&#xD;&#xA;- Adjust your RPC limits with CLI flags:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--rpc-max-request-size &lt;RPC_MAX_REQUEST_SIZE&gt;&#xD;&#xA;    Set the the maximum RPC request payload size for both HTTP and WS in megabytes. Default&#xD;&#xA;    is 15MiB&#xD;&#xA;&#xD;&#xA;--rpc-max-response-size &lt;RPC_MAX_RESPONSE_SIZE&gt;&#xD;&#xA;    Set the the maximum RPC response payload size for both HTTP and WS in megabytes. Default&#xD;&#xA;    is 15MiB&#xD;&#xA;&#xD;&#xA;--rpc-max-subscriptions-per-connection &lt;RPC_MAX_SUBSCRIPTIONS_PER_CONNECTION&gt;&#xD;&#xA;    Set the the maximum concurrent subscriptions per connection. Default is 1024&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;More suggestions for running a node safely can be found here:&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/build-node-management&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18477" PostHistoryTypeId="4" PostId="4940" RevisionGUID="64ad7a97-3860-4f5f-895d-f0481c10249a" CreationDate="2022-09-21T22:52:37.787" UserId="28" Comment="edited tags; edited title" Text="Is Substrate Storage Queries exploitable for a DDoS attack?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18478" PostHistoryTypeId="6" PostId="4940" RevisionGUID="64ad7a97-3860-4f5f-895d-f0481c10249a" CreationDate="2022-09-21T22:52:37.787" UserId="28" Comment="edited tags; edited title" Text="|storage|rpc|performance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18479" PostHistoryTypeId="2" PostId="4942" RevisionGUID="a89cd613-45ac-4c2c-92ce-b1611e1a710e" CreationDate="2022-09-21T23:00:22.207" UserId="28" Text="In this case, the user is not changing their nominations, but simply bonding more funds.&#xD;&#xA;&#xD;&#xA;For this, you will need to query the nominations of the user, which can be done with something like:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let result = (await substrate.query.staking.nominators(&quot;15V25oBZGu7wAfV7LPP8YBwaWRgBAyfiVUtVywGHAcDAw9cD&quot;)).unwrap();&#xD;&#xA;&#xD;&#xA;result.targets.toHuman()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;  &quot;13s9RrQSFbnp2TneY7nkdLmGc3ijBw12YQct8pc8km36Z9hg&quot;,&#xD;&#xA;  &quot;126RwaHn4MDekLWfUYfiqcVbiQHapwDSAT9vZZS15HLqfDJh&quot;,&#xD;&#xA;  &quot;15qomv8YFTpHrbiJKicP4oXfxRDyG4XEHZH7jdfJScnw2xnV&quot;,&#xD;&#xA;  &quot;123kFHVth2udmM79sn3RPQ81HukrQWCxA1vmTWkGHSvkR4k1&quot;,&#xD;&#xA;  &quot;167ShbHu769mP5jbtt7AHayJhzEied6s8M5kN5nBSAQewnRz&quot;,&#xD;&#xA;  &quot;13AxLFBLRACDWzjqEQn3YhHH2iErmyj3kC1HivYiSahkN2Fh&quot;,&#xD;&#xA;  &quot;131RTKxEkG6o1HZRRmETxj8ywpSsoF8KgoQp6twnMUf7W4Nu&quot;,&#xD;&#xA;  &quot;14aWupX88TM23UCmUTx69S9x9r7JNTLUZ4oprbdwy2s2xWyJ&quot;,&#xD;&#xA;  &quot;153RzmMmQ2ueHgD71nRcfcs96VKhFRPYkW2h1qw18Bn1Jkrv&quot;,&#xD;&#xA;  &quot;15dMdEYxCM9EWtbBdDf1vEvRV3se1tpvvxitFCURXV2jWArs&quot;,&#xD;&#xA;  &quot;1xzAes4aS1EK2hDBcuK3ZSrwvH4Hn4b5hs6aKrsoC8scLGK&quot;,&#xD;&#xA;  &quot;16aXLhFh9mZoyW5emqZM6fJWTqbWENGrJkAoGwtR1S8XoFwY&quot;,&#xD;&#xA;  &quot;13fj8s7NEamwDw2PmHVJ9acHApBMCLuRX2exbnovkxNa2fQV&quot;,&#xD;&#xA;  &quot;15ovsfcNsVc666r55fi4D6qiXpgP23ReRmPZL6Ss1THJ4rf2&quot;,&#xD;&#xA;  &quot;1KPeYhx2k2D4Fy7iw9CSykbTYN1UbtYxHpBceL85xQhAJdo&quot;,&#xD;&#xA;  &quot;16XwmL8Kh4fxXa4TyEAjaJRr1JLevnQsZ2GVF68ND9SqQWY4&quot;&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18481" PostHistoryTypeId="2" PostId="4943" RevisionGUID="ea608b32-2924-46b3-894e-72a25e5d774c" CreationDate="2022-09-21T23:37:56.230" UserId="28" Text="All of the logic around the transaction fee pallet is wrapped into the trait `OnChargeTransaction`:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/pallet_transaction_payment/trait.OnChargeTransaction.html&#xD;&#xA;&#xD;&#xA;So you just need to implement this with the logic you want.&#xD;&#xA;&#xD;&#xA;You can look at the implementation [`CurrencyAdapter`](https://paritytech.github.io/substrate/master/pallet_transaction_payment/struct.CurrencyAdapter.html) which is used in Polkadot to see how it can be implemented, and probably you can modify it to do what you want.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct CustomCurrencyAdapter&lt;C, OU&gt;(PhantomData&lt;(C, OU)&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;T, C, OU&gt; OnChargeTransaction&lt;T&gt; for CustomCurrencyAdapter&lt;C, OU&gt;&#xD;&#xA;where&#xD;&#xA;	T: Config,&#xD;&#xA;	C: Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;,&#xD;&#xA;	C::PositiveImbalance: Imbalance&lt;&#xD;&#xA;		&lt;C as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance,&#xD;&#xA;		Opposite = C::NegativeImbalance,&#xD;&#xA;	&gt;,&#xD;&#xA;	C::NegativeImbalance: Imbalance&lt;&#xD;&#xA;		&lt;C as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance,&#xD;&#xA;		Opposite = C::PositiveImbalance,&#xD;&#xA;	&gt;,&#xD;&#xA;	OU: OnUnbalanced&lt;NegativeImbalanceOf&lt;C, T&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	type LiquidityInfo = Option&lt;NegativeImbalanceOf&lt;C, T&gt;&gt;;&#xD;&#xA;	type Balance = &lt;C as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;	/// Withdraw the predicted fee from the transaction origin.&#xD;&#xA;	///&#xD;&#xA;	/// Note: The `fee` already includes the `tip`.&#xD;&#xA;	fn withdraw_fee(&#xD;&#xA;		who: &amp;T::AccountId,&#xD;&#xA;		_call: &amp;T::RuntimeCall,&#xD;&#xA;		_info: &amp;DispatchInfoOf&lt;T::RuntimeCall&gt;,&#xD;&#xA;		fee: Self::Balance,&#xD;&#xA;		tip: Self::Balance,&#xD;&#xA;	) -&gt; Result&lt;Self::LiquidityInfo, TransactionValidityError&gt; {&#xD;&#xA;		if fee.is_zero() {&#xD;&#xA;			return Ok(None)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		let withdraw_reason = if tip.is_zero() {&#xD;&#xA;			WithdrawReasons::TRANSACTION_PAYMENT&#xD;&#xA;		} else {&#xD;&#xA;			WithdrawReasons::TRANSACTION_PAYMENT | WithdrawReasons::TIP&#xD;&#xA;		};&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;//here---&gt;&#xD;&#xA;		let fee = fee + whatever_you_want;&#xD;&#xA;&#xD;&#xA;		match C::withdraw(who, fee, withdraw_reason, ExistenceRequirement::KeepAlive) {&#xD;&#xA;			Ok(imbalance) =&gt; Ok(Some(imbalance)),&#xD;&#xA;			Err(_) =&gt; Err(InvalidTransaction::Payment.into()),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	/// Hand the fee and the tip over to the `[OnUnbalanced]` implementation.&#xD;&#xA;	/// Since the predicted fee might have been too high, parts of the fee may&#xD;&#xA;	/// be refunded.&#xD;&#xA;	///&#xD;&#xA;	/// Note: The `corrected_fee` already includes the `tip`.&#xD;&#xA;	fn correct_and_deposit_fee(&#xD;&#xA;		who: &amp;T::AccountId,&#xD;&#xA;		_dispatch_info: &amp;DispatchInfoOf&lt;T::RuntimeCall&gt;,&#xD;&#xA;		_post_info: &amp;PostDispatchInfoOf&lt;T::RuntimeCall&gt;,&#xD;&#xA;		corrected_fee: Self::Balance,&#xD;&#xA;		tip: Self::Balance,&#xD;&#xA;		already_withdrawn: Self::LiquidityInfo,&#xD;&#xA;	) -&gt; Result&lt;(), TransactionValidityError&gt; {&#xD;&#xA;		if let Some(paid) = already_withdrawn {&#xD;&#xA;			// Calculate how much refund we should return&#xD;&#xA;			let refund_amount = paid.peek().saturating_sub(corrected_fee);&#xD;&#xA;			// refund to the the account that paid the fees. If this fails, the&#xD;&#xA;			// account might have dropped below the existential balance. In&#xD;&#xA;			// that case we don't refund anything.&#xD;&#xA;			let refund_imbalance = C::deposit_into_existing(who, refund_amount)&#xD;&#xA;				.unwrap_or_else(|_| C::PositiveImbalance::zero());&#xD;&#xA;			// merge the imbalance caused by paying the fees and refunding parts of it again.&#xD;&#xA;			let adjusted_paid = paid&#xD;&#xA;				.offset(refund_imbalance)&#xD;&#xA;				.same()&#xD;&#xA;				.map_err(|_| TransactionValidityError::Invalid(InvalidTransaction::Payment))?;&#xD;&#xA;			// Call someone else to handle the imbalance (fee and tip separately)&#xD;&#xA;			let (tip, fee) = adjusted_paid.split(tip);&#xD;&#xA;			OU::on_unbalanceds(Some(fee).into_iter().chain(Some(tip)));&#xD;&#xA;		}&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Search `here---&gt;` in the code above." ContentLicense="CC BY-SA 4.0" />
  <row Id="18484" PostHistoryTypeId="2" PostId="4944" RevisionGUID="66cdcb24-9cb9-4863-b188-b1256e73734f" CreationDate="2022-09-22T00:00:33.387" UserId="28" Text="In the page https://wiki.polkadot.network/docs/build-transaction-construction&#xD;&#xA;&#xD;&#xA;`payload` refers to the entire object which must be signed and submitted with the signature to the node.&#xD;&#xA;&#xD;&#xA;The `payload` may have different things in it depending on the configuration of the Substrate chain, which makes it very flexible for developers, but of course hard to explain here.&#xD;&#xA;&#xD;&#xA;If that is the case, you can look at the answer here: https://substrate.stackexchange.com/questions/471/what-are-the-steps-for-encoding-an-extrinsic-in-substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="18486" PostHistoryTypeId="2" PostId="4945" RevisionGUID="0f616800-af96-45cf-8a85-842d6dfe0ca5" CreationDate="2022-09-22T00:15:29.810" UserId="28" Text="Yes, of course.&#xD;&#xA;&#xD;&#xA;You can read the documentation to learn how to submit extrinsics using Polkadot JS API:&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/docs/api/start/api.tx&#xD;&#xA;&#xD;&#xA;Then, you just need to submit two extrinsics from the Staking Pallet:&#xD;&#xA;&#xD;&#xA;1. Bond: https://paritytech.github.io/substrate/master/pallet_staking/pallet/enum.Call.html#variant.bond&#xD;&#xA;&#xD;&#xA;   This will lock a users funds so they can start to stake as a validator or nominator.&#xD;&#xA;&#xD;&#xA;2. Either:&#xD;&#xA;&#xD;&#xA;    1. Nominate: https://paritytech.github.io/substrate/master/pallet_staking/pallet/enum.Call.html#variant.nominate&#xD;&#xA;&#xD;&#xA;       If you want to set up the account as a nominator.&#xD;&#xA;&#xD;&#xA;    2. Validate: https://paritytech.github.io/substrate/master/pallet_staking/pallet/enum.Call.html#variant.validate&#xD;&#xA;&#xD;&#xA;       If you want to set up the account as a validator.&#xD;&#xA;&#xD;&#xA;There are more details needed specifically if you are setting up to be a validator which you can learn about here: https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="18488" PostHistoryTypeId="52" PostId="4936" RevisionGUID="a12d8c23-0a34-4598-b992-6834ec4b2274" CreationDate="2022-09-22T02:30:10.873" />
  <row Id="18489" PostHistoryTypeId="6" PostId="4667" RevisionGUID="3b2980c8-0f89-405c-b261-a0618866482b" CreationDate="2022-09-22T02:52:11.230" UserId="2065" Comment="edited tags" Text="|frontier|evm|testing|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18490" PostHistoryTypeId="2" PostId="4946" RevisionGUID="ec81b9f5-3b1e-4b7f-85b7-01ce2972eebf" CreationDate="2022-09-22T03:04:07.430" UserId="2844" Text="In simple terms, payload is just a chunk of data carried with transmission unit. You can go through [this link][1] which has awesome description of payload concept.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://softwareengineering.stackexchange.com/questions/158603/what-does-the-term-payload-mean-in-programming/158604#158604?newreg=e35b6a4dfcae4d82b06bf23df9b3bed5" ContentLicense="CC BY-SA 4.0" />
  <row Id="18492" PostHistoryTypeId="50" PostId="4395" RevisionGUID="b7e21d5b-1716-47a7-b7ad-d477f03974af" CreationDate="2022-09-22T04:02:03.957" UserId="-1" />
  <row Id="18493" PostHistoryTypeId="2" PostId="4947" RevisionGUID="e2da2203-f7df-4dce-b03d-4c7774f8712b" CreationDate="2022-09-22T05:13:10.723" UserId="3216" Text="Example: If we are doing 10DOT Transfer from one address to another address, Can we attach some description like &quot;test transaction&quot; or &quot;investment&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18495" PostHistoryTypeId="1" PostId="4947" RevisionGUID="e2da2203-f7df-4dce-b03d-4c7774f8712b" CreationDate="2022-09-22T05:13:10.723" UserId="3216" Text="Is there a way to add a some transaction message to the dot transfer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18496" PostHistoryTypeId="3" PostId="4947" RevisionGUID="e2da2203-f7df-4dce-b03d-4c7774f8712b" CreationDate="2022-09-22T05:13:10.723" UserId="3216" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18497" PostHistoryTypeId="2" PostId="4948" RevisionGUID="4ee95404-e883-4312-bd77-e9aa7bea1e58" CreationDate="2022-09-22T05:44:20.437" UserId="251" Text="The `balances::transfer` did not provide a field for this.&#xD;&#xA;&#xD;&#xA;But I think you could do this with `utility::batch`.&#xD;&#xA;&#xD;&#xA;Call data:&#xD;&#xA;```&#xD;&#xA;0x1a000800012c54697020666f72204761760500006af08f6bb841825b168ddf79837e70d88d75e1c5b290b74fa97cedfd668dd22c0700e40b5402&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You could decode the call data [here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/extrinsics/decode)." ContentLicense="CC BY-SA 4.0" />
  <row Id="18499" PostHistoryTypeId="5" PostId="4399" RevisionGUID="092d9a83-b66b-4d6a-bbf0-f61da4749b18" CreationDate="2022-09-22T05:45:53.577" UserId="251" Comment="added 4 characters in body" Text="```rust&#xD;&#xA;Listings::&lt;T&gt;::mutate(&amp;property_id, &amp;who, |listing| {&#xD;&#xA;    // you don't need to use `as_mut` here. listing is already a `&amp;mut _`&#xD;&#xA;    if let Some(is_active) = is_active {&#xD;&#xA;        listing.is_active = is_active;&#xD;&#xA;    }&#xD;&#xA;    if let Some(content) = content {&#xD;&#xA;        listing.content = content;&#xD;&#xA;    }&#xD;&#xA;    // you can not return a local reference to outside, take the ownership first &#xD;&#xA;    // Some(listing.to_owned())&#xD;&#xA;    // or&#xD;&#xA;    Some(listing.clone())&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Furthermore, you could use `try_mutate` or `get/insert`. While the `listing` is not changed, you could save one DB write cost." ContentLicense="CC BY-SA 4.0" />
  <row Id="18500" PostHistoryTypeId="5" PostId="4399" RevisionGUID="f01831bd-ac51-4688-ae95-3d454058bd67" CreationDate="2022-09-22T05:56:39.160" UserId="251" Comment="added 4 characters in body" Text="```rust&#xD;&#xA;Listings::&lt;T&gt;::mutate(&amp;property_id, &amp;who, |listing| {&#xD;&#xA;    // you don't need to use `as_mut` here. listing is already a `&amp;mut _`&#xD;&#xA;    if let Some(is_active) = is_active {&#xD;&#xA;        listing.is_active = is_active;&#xD;&#xA;    }&#xD;&#xA;    if let Some(content) = content {&#xD;&#xA;        listing.content = content;&#xD;&#xA;    }&#xD;&#xA;    // you can not return a local reference to outside, take the ownership first &#xD;&#xA;    // Some(listing.to_owned())&#xD;&#xA;    // or&#xD;&#xA;    Some(listing.clone())&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Furthermore, you could use `try_mutate` or `get/insert`. While the `listing` is not changed, you could save one DB write cost.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Update for the `OptionQuery`:&#xD;&#xA;```rust&#xD;&#xA;Listings::&lt;T&gt;::mutate(&amp;property_id, &amp;who, |maybe_listing| {&#xD;&#xA;    maybe_listing.as_mut().map(|listing| {&#xD;&#xA;        if let Some(is_active) = is_active {&#xD;&#xA;            listing.is_active = is_active;&#xD;&#xA;        }&#xD;&#xA;        if let Some(content) = content {&#xD;&#xA;            listing.content = content;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        Some(listing.clone())&#xD;&#xA;    })&#xD;&#xA;});&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18501" PostHistoryTypeId="2" PostId="4949" RevisionGUID="554c7a52-8479-42d1-8799-ac9330a1a569" CreationDate="2022-09-22T06:56:45.037" UserId="2844" Text="I think it may not be possible to compile ink smart contract to evm bytecode. As per [ink doc here][1], ink contract can compile in **ANY WASM VM** and If anyhow if we try to compile then, I think we may face some issue, which are point out in [this article][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://ink.substrate.io/ink-vs-solidity&#xD;&#xA;  [2]: https://www.parity.io/blog/wasm-smart-contract-development/" ContentLicense="CC BY-SA 4.0" />
  <row Id="18503" PostHistoryTypeId="5" PostId="4948" RevisionGUID="5cb3cc95-138a-462e-a066-f3d2d31e88de" CreationDate="2022-09-22T07:20:37.170" UserId="251" Comment="added 196 characters in body" Text="The `balances::transfer` did not provide a field for this.&#xD;&#xA;&#xD;&#xA;But I think you could do this with `utility::batch`.&#xD;&#xA;&#xD;&#xA;Call data:&#xD;&#xA;```&#xD;&#xA;0x1a000800012c54697020666f72204761760500006af08f6bb841825b168ddf79837e70d88d75e1c5b290b74fa97cedfd668dd22c0700e40b5402&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You could decode the call data [here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/extrinsics/decode).&#xD;&#xA;&#xD;&#xA;Here is the [README](https://github.com/paritytech/substrate/blob/master/frame/utility/README.md). In this case, It just combines the &#xD;&#xA;&#xD;&#xA;In this case, `batch` just combines the two calls into one.&#xD;&#xA;&#xD;&#xA;The `system::remark` is simply left something/message on the chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="18504" PostHistoryTypeId="5" PostId="4948" RevisionGUID="57a3441a-b6d4-415c-b591-e10fb6a2e817" CreationDate="2022-09-22T07:34:52.637" UserId="251" Comment="deleted 4 characters in body" Text="The `balances::transfer` did not provide a field for this.&#xD;&#xA;&#xD;&#xA;But I think you could do this with `utility::batch`.&#xD;&#xA;&#xD;&#xA;Call data:&#xD;&#xA;```&#xD;&#xA;0x1a000800012c54697020666f72204761760500006af08f6bb841825b168ddf79837e70d88d75e1c5b290b74fa97cedfd668dd22c0700e40b5402&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You could decode the call data [here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/extrinsics/decode).&#xD;&#xA;&#xD;&#xA;Here is the [README](https://github.com/paritytech/substrate/blob/master/frame/utility/README.md).&#xD;&#xA;&#xD;&#xA;In this case, `batch` combines the two calls into one.&#xD;&#xA;&#xD;&#xA;What the `system::remark` does is left a message on the chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="18505" PostHistoryTypeId="5" PostId="4934" RevisionGUID="5d29555c-9241-486e-a641-cccf93e23809" CreationDate="2022-09-22T07:40:59.287" UserId="3211" Comment="added 1 character in body" Text="Currently working inside the Moonbeam interface and was wondering if it was possible to pull the group of transactions that the Moonbeam collators are sending to the Polkadot Relay Chain before they are finalized by the validators? &#xD;&#xA;&#xD;&#xA;Is this possible to accomplish through the py-substrate-interface or the polkadot.js interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18506" PostHistoryTypeId="50" PostId="2430" RevisionGUID="92af68ad-6fa9-471b-9d4c-d87ad5c5f1d8" CreationDate="2022-09-22T09:06:25.557" UserId="-1" />
  <row Id="18507" PostHistoryTypeId="2" PostId="4950" RevisionGUID="4b647f77-d63e-4989-a787-c6fa1564dff2" CreationDate="2022-09-22T10:09:40.900" UserId="3217" Text="I'm trying to benchmark the pallet_template from the substrate-node-template example but am getting the error: `Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context`. I have already built the runtime with the `runtime-benchmarks` flag enabled, and included the `list_benchmark!(list, extra, pallet_template, TemplateModule)` and `add_benchmark!(params, batches, pallet_template, TemplateModule)` in the `runtime/lib.rs`. But when I run the command - &#xD;&#xA;```./target/release/node-template benchmark pallet \&#xD;&#xA;    --chain dev \&#xD;&#xA;    --execution=wasm \&#xD;&#xA;    --wasm-execution=compiled \&#xD;&#xA;    --pallet pallet_template \&#xD;&#xA;    --extrinsic * \&#xD;&#xA;    --steps 50 \&#xD;&#xA;    --repeat 20 \&#xD;&#xA;    --output pallets/template/src/weight.rs&#xD;&#xA;```&#xD;&#xA;I get the error afforementioned error `Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context`. I have followed the tutorials from the official substrate docs, but if I'm still missing something please let me know. &#xD;&#xA;&#xD;&#xA;Please help me understand where I'm missing it." ContentLicense="CC BY-SA 4.0" />
  <row Id="18509" PostHistoryTypeId="1" PostId="4950" RevisionGUID="4b647f77-d63e-4989-a787-c6fa1564dff2" CreationDate="2022-09-22T10:09:40.900" UserId="3217" Text="Error when trying to benchmark the substrate-node-template -- &quot;Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18510" PostHistoryTypeId="3" PostId="4950" RevisionGUID="4b647f77-d63e-4989-a787-c6fa1564dff2" CreationDate="2022-09-22T10:09:40.900" UserId="3217" Text="|substrate-node-template|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18511" PostHistoryTypeId="2" PostId="4951" RevisionGUID="61f3fd08-7dfe-4e90-97b8-3d974f50b147" CreationDate="2022-09-22T10:10:16.453" UserId="220" Text="I'm looking for a high level overview of the [SS58 format][1]&#xD;&#xA;&#xD;&#xA;I found [this][2] but can't seem to find an overview description&#xD;&#xA;&#xD;&#xA; 1. What is the SS58 format?&#xD;&#xA; 2. Where is it used?&#xD;&#xA; 3. What are the whys and wherefores?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/keyring/start/ss58/&#xD;&#xA;  [2]: https://github.com/paritytech/ss58-registry/" ContentLicense="CC BY-SA 4.0" />
  <row Id="18513" PostHistoryTypeId="1" PostId="4951" RevisionGUID="61f3fd08-7dfe-4e90-97b8-3d974f50b147" CreationDate="2022-09-22T10:10:16.453" UserId="220" Text="What is the SS58 Format?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18514" PostHistoryTypeId="3" PostId="4951" RevisionGUID="61f3fd08-7dfe-4e90-97b8-3d974f50b147" CreationDate="2022-09-22T10:10:16.453" UserId="220" Text="|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18515" PostHistoryTypeId="5" PostId="4950" RevisionGUID="cc085bbe-a803-42da-bc9a-20d17ae4862d" CreationDate="2022-09-22T10:10:56.533" UserId="3217" Comment="added 14 characters in body" Text="I'm trying to benchmark the pallet_template from the substrate-node-template example but am getting the error: `Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context`. &#xD;&#xA;&#xD;&#xA;I have already built the runtime with the `runtime-benchmarks` flag enabled, and have also included the `list_benchmark!(list, extra, pallet_template, TemplateModule)` and `add_benchmark!(params, batches, pallet_template, TemplateModule)` in the `runtime/lib.rs`. But when I run the command - &#xD;&#xA;```./target/release/node-template benchmark pallet \&#xD;&#xA;    --chain dev \&#xD;&#xA;    --execution=wasm \&#xD;&#xA;    --wasm-execution=compiled \&#xD;&#xA;    --pallet pallet_template \&#xD;&#xA;    --extrinsic * \&#xD;&#xA;    --steps 50 \&#xD;&#xA;    --repeat 20 \&#xD;&#xA;    --output pallets/template/src/weight.rs&#xD;&#xA;```&#xD;&#xA;I get the error afforementioned error `Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context`. I have followed the tutorials from the official substrate docs, but if I'm still missing something please let me know. &#xD;&#xA;&#xD;&#xA;Please help me understand where I'm missing it." ContentLicense="CC BY-SA 4.0" />
  <row Id="18516" PostHistoryTypeId="5" PostId="4950" RevisionGUID="df5d0277-35d7-43c3-88a4-fd0cb233f160" CreationDate="2022-09-22T10:11:22.497" UserId="3217" Comment="added 2 characters in body" Text="I'm trying to benchmark the pallet_template from the substrate-node-template example but am getting the error: `Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context`. &#xD;&#xA;&#xD;&#xA;I have already built the runtime with the `runtime-benchmarks` flag enabled, and have also included the `list_benchmark!(list, extra, pallet_template, TemplateModule)` and `add_benchmark!(params, batches, pallet_template, TemplateModule)` in the `runtime/lib.rs`. But when I run the command - &#xD;&#xA;```&#xD;&#xA;./target/release/node-template benchmark pallet \&#xD;&#xA;    --chain dev \&#xD;&#xA;    --execution=wasm \&#xD;&#xA;    --wasm-execution=compiled \&#xD;&#xA;    --pallet pallet_template \&#xD;&#xA;    --extrinsic * \&#xD;&#xA;    --steps 50 \&#xD;&#xA;    --repeat 20 \&#xD;&#xA;    --output pallets/template/src/weight.rs&#xD;&#xA;```&#xD;&#xA;I get the error afforementioned error `Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context`. I have followed the tutorials from the official substrate docs, but if I'm still missing something please let me know. &#xD;&#xA;&#xD;&#xA;Please help me understand where I'm missing it." ContentLicense="CC BY-SA 4.0" />
  <row Id="18517" PostHistoryTypeId="5" PostId="4950" RevisionGUID="caa5ed46-11e4-430f-8225-8adfd23c63df" CreationDate="2022-09-22T10:16:04.633" UserId="3217" Comment="added 160 characters in body" Text="I'm trying to benchmark the pallet_template from the substrate-node-template example but am getting the error: `Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context`. &#xD;&#xA;&#xD;&#xA;I have already built the runtime with the `runtime-benchmarks` flag enabled, and have also included the `list_benchmark!(list, extra, pallet_template, TemplateModule)` and `add_benchmark!(params, batches, pallet_template, TemplateModule)` in the `runtime/lib.rs`. But when I run the command - &#xD;&#xA;```&#xD;&#xA;./target/release/node-template benchmark pallet \&#xD;&#xA;    --chain dev \&#xD;&#xA;    --execution=wasm \&#xD;&#xA;    --wasm-execution=compiled \&#xD;&#xA;    --pallet pallet_template \&#xD;&#xA;    --extrinsic * \&#xD;&#xA;    --steps 50 \&#xD;&#xA;    --repeat 20 \&#xD;&#xA;    --output pallets/template/src/weight.rs&#xD;&#xA;```&#xD;&#xA;I keep getting this weird error: `Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context`. I have used the exact same command mentioned on the official substrate benchmarking tutorial and don't understand why the compiler is telling me that I'm passing `Cargo.toml` as an argument. I'm still a beginner in Substrate so please forgive me if I'm asking a very dumb question .&#xD;&#xA;&#xD;&#xA;Please help me understand where I'm missing it." ContentLicense="CC BY-SA 4.0" />
  <row Id="18518" PostHistoryTypeId="2" PostId="4952" RevisionGUID="efb6414b-8b22-4499-9404-e88db3efa81e" CreationDate="2022-09-22T10:58:07.537" UserId="379" Text="Found similar behaviour on one of our networks. After spitting out errors like&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-22 12:17:10  Verification failed for block 0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3 received from peer: 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm, &quot;Bad signature on 0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3&quot;    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0x4ff8f2d4afa5fe8ba85c01fff2da3879530ed04fb48f6734ede824a3da4f4be3: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0x31032caf935bda7e701a77f642c9c409c901d54962ce80b7cd2e7f4ce658fa03: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0xb3c7bc381923bebd2b60bb7044994df9b3ce3ea47e03080d43cfc1fa73a3f7e9: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0x19a7a12c81cb6e9ad6252f98e8b5cb5077b780d8e0407a9cbee09eb7ca18e36f: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0xe7dfc86ae36d0df2aae2803f3d382afde92fbdd9b3f33d3d137982a9075b8167: block has an unknown parent &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It loses all its peer and cannot sync anymore:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-22 12:17:25  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 1.5kiB/s ⬆ 1.5kiB/s    &#xD;&#xA;2022-09-22 12:17:30  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 4.6kiB/s ⬆ 5.7kiB/s    &#xD;&#xA;2022-09-22 12:17:35  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 2.3kiB/s ⬆ 3.2kiB/s    &#xD;&#xA;2022-09-22 12:17:40  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 20.5kiB/s ⬆ 12.5kiB/s    &#xD;&#xA;2022-09-22 12:17:45  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 1.1kiB/s ⬆ 1.9kiB/s    &#xD;&#xA;2022-09-22 12:17:50  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 3.3kiB/s ⬆ 3.5kiB/s    &#xD;&#xA;2022-09-22 12:17:55  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 1.7kiB/s ⬆ 1.9kiB/s   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Something to note: We recently upgraded our network from substrate V3 to substrate (polkadot-0.9.24). If we try to sync a node with a release that is still on substrate V3 we don't receive this error. But then it stops syncing at the block where we upgraded to polkadot-0.9.24.&#xD;&#xA;&#xD;&#xA;To me, this is kind of weird. The code should be backward compatible, I should be able to sync the entire chain even with the code being on polkadot-0.9.24" ContentLicense="CC BY-SA 4.0" />
  <row Id="18520" PostHistoryTypeId="2" PostId="4953" RevisionGUID="88996937-f367-492f-a84d-38a39f09617a" CreationDate="2022-09-22T10:59:08.473" UserId="94" Text="Depending on your shell you have to escape the `*` symbol or put it into quotes.  &#xD;&#xA;Please try again with `--extrinsic &quot;&quot;`, `--extrinsic &quot;\*&quot;` or `--extrinsic &quot;*&quot;` which should all be equialent." ContentLicense="CC BY-SA 4.0" />
  <row Id="18526" PostHistoryTypeId="2" PostId="4955" RevisionGUID="7602980c-c5b1-456d-91de-5e5b2832a204" CreationDate="2022-09-22T11:45:49.677" UserId="220" Text="From the [docs][1]:&#xD;&#xA;&#xD;&#xA;&gt; The SS58 address format is a public key address based on the Bitcoin&#xD;&#xA;&gt; Base-58-check encoding. Each Substrate SS58 address uses a base-58&#xD;&#xA;&gt; encoded value to identify a specific account on a specific&#xD;&#xA;&gt; Substrate-based chain. These are represented by a base-58 encoded&#xD;&#xA;&gt; value to identify a specific account on a specific Substrate chain.&#xD;&#xA;&gt; The canonical ss58-registry provide additional details about the&#xD;&#xA;&gt; address format used by different Substrate-based chains, including the&#xD;&#xA;&gt; network prefix and website used for different networks.&#xD;&#xA;&#xD;&#xA;See also:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/sp_core/crypto/trait.Ss58Codec.html&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/glossary/" ContentLicense="CC BY-SA 4.0" />
  <row Id="18528" PostHistoryTypeId="2" PostId="4956" RevisionGUID="d4176296-81ea-4dd9-8605-4ba98f774879" CreationDate="2022-09-22T11:49:51.243" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="18530" PostHistoryTypeId="1" PostId="4956" RevisionGUID="d4176296-81ea-4dd9-8605-4ba98f774879" CreationDate="2022-09-22T11:49:51.243" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="18531" PostHistoryTypeId="2" PostId="4957" RevisionGUID="c5d0e6f2-4f6a-49cf-9f98-cd62648e3147" CreationDate="2022-09-22T11:49:51.243" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="18533" PostHistoryTypeId="1" PostId="4957" RevisionGUID="c5d0e6f2-4f6a-49cf-9f98-cd62648e3147" CreationDate="2022-09-22T11:49:51.243" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="18534" PostHistoryTypeId="5" PostId="4952" RevisionGUID="ea2154b9-e505-4a29-af03-9b897c5a97f0" CreationDate="2022-09-22T12:50:03.583" UserId="379" Comment="added 10531 characters in body" Text="Found similar behaviour on one of our networks. After spitting out errors like&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-22 12:17:10  Verification failed for block 0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3 received from peer: 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm, &quot;Bad signature on 0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3&quot;    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0x4ff8f2d4afa5fe8ba85c01fff2da3879530ed04fb48f6734ede824a3da4f4be3: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0x31032caf935bda7e701a77f642c9c409c901d54962ce80b7cd2e7f4ce658fa03: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0xb3c7bc381923bebd2b60bb7044994df9b3ce3ea47e03080d43cfc1fa73a3f7e9: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0x19a7a12c81cb6e9ad6252f98e8b5cb5077b780d8e0407a9cbee09eb7ca18e36f: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0xe7dfc86ae36d0df2aae2803f3d382afde92fbdd9b3f33d3d137982a9075b8167: block has an unknown parent &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It loses all its peer and cannot sync anymore:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-22 12:17:25  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 1.5kiB/s ⬆ 1.5kiB/s    &#xD;&#xA;2022-09-22 12:17:30  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 4.6kiB/s ⬆ 5.7kiB/s    &#xD;&#xA;2022-09-22 12:17:35  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 2.3kiB/s ⬆ 3.2kiB/s    &#xD;&#xA;2022-09-22 12:17:40  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 20.5kiB/s ⬆ 12.5kiB/s    &#xD;&#xA;2022-09-22 12:17:45  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 1.1kiB/s ⬆ 1.9kiB/s    &#xD;&#xA;2022-09-22 12:17:50  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 3.3kiB/s ⬆ 3.5kiB/s    &#xD;&#xA;2022-09-22 12:17:55  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 1.7kiB/s ⬆ 1.9kiB/s   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Something to note: We recently upgraded our network from substrate V3 to substrate (polkadot-0.9.24). If we try to sync a node with a release that is still on substrate V3 we don't receive this error. But then it stops syncing at the block where we upgraded to polkadot-0.9.24.&#xD;&#xA;&#xD;&#xA;To me, this is kind of weird. The code should be backward compatible, I should be able to sync the entire chain even with the code being on polkadot-0.9.24&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After running the same coomand with `-l sync trace` I see following output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-22 14:42:41.220  INFO                 main sc_rpc_server: Running JSON-RPC WS server: addr=0.0.0.0:9944, allowed origins=Some([&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;])    &#xD;&#xA;2022-09-22 14:42:41.221  INFO tokio-runtime-worker libp2p_mdns::behaviour::iface: creating instance on iface 192.168.8.106    &#xD;&#xA;2022-09-22 14:42:41.221  INFO tokio-runtime-worker libp2p_mdns::behaviour::iface: creating instance on iface 192.168.8.98    &#xD;&#xA;2022-09-22 14:42:41.221  INFO tokio-runtime-worker libp2p_mdns::behaviour::iface: creating instance on iface 192.168.49.1    &#xD;&#xA;2022-09-22 14:42:41.221  INFO tokio-runtime-worker libp2p_mdns::behaviour::iface: creating instance on iface 172.17.0.1    &#xD;&#xA;2022-09-22 14:42:41.221  INFO tokio-runtime-worker libp2p_mdns::behaviour::iface: creating instance on iface 192.168.8.117    &#xD;&#xA;2022-09-22 14:42:41.233 TRACE tokio-runtime-worker sync: New peer 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta BlockAnnouncesHandshake { roles: AUTHORITY, best_number: 2433159, best_hash: 0xe6ba5b10461adb68dc1d094127d92556437a95df0d5f3be1e8fd648f59d7d333, genesis_hash: 0xbb7f298ba5fca8802040061ddd0ca6406832238b7825ebfa66927cc25ec666be }    &#xD;&#xA;2022-09-22 14:42:41.233 DEBUG tokio-runtime-worker sync: New peer with unknown best hash 0xe6ba…d333 (2433159), searching for common ancestor.    &#xD;&#xA;2022-09-22 14:42:41.233 DEBUG tokio-runtime-worker sync: Connected 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta    &#xD;&#xA;2022-09-22 14:42:41.234 TRACE tokio-runtime-worker sync: New peer 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm BlockAnnouncesHandshake { roles: AUTHORITY, best_number: 2433159, best_hash: 0xe6ba5b10461adb68dc1d094127d92556437a95df0d5f3be1e8fd648f59d7d333, genesis_hash: 0xbb7f298ba5fca8802040061ddd0ca6406832238b7825ebfa66927cc25ec666be }    &#xD;&#xA;2022-09-22 14:42:41.234 DEBUG tokio-runtime-worker sync: New peer with unknown best hash 0xe6ba…d333 (2433159), searching for common ancestor.    &#xD;&#xA;2022-09-22 14:42:41.234 DEBUG tokio-runtime-worker sync: Connected 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm    &#xD;&#xA;2022-09-22 14:42:41.264 TRACE tokio-runtime-worker sync: New peer 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK BlockAnnouncesHandshake { roles: AUTHORITY, best_number: 2433159, best_hash: 0xe6ba5b10461adb68dc1d094127d92556437a95df0d5f3be1e8fd648f59d7d333, genesis_hash: 0xbb7f298ba5fca8802040061ddd0ca6406832238b7825ebfa66927cc25ec666be }    &#xD;&#xA;2022-09-22 14:42:41.264 DEBUG tokio-runtime-worker sync: New peer with unknown best hash 0xe6ba…d333 (2433159), searching for common ancestor.    &#xD;&#xA;2022-09-22 14:42:41.264 DEBUG tokio-runtime-worker sync: Connected 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK    &#xD;&#xA;2022-09-22 14:42:41.264 TRACE tokio-runtime-worker sync: BlockResponse 0 from 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta with 1 blocks  (113254)    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: Got ancestry block #113254 (0x9511…8c92) from peer 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: Ancestry search complete. Ours=0x9511…8c92 (113254), Theirs=0xe6ba…d333 (2433159), Common=Some(0x95119158e50bd9ed70e9b986560737aa09ff1e935a4102781464e4c499ca8c92) (113254)    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: New block request for 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta, (best:2433159, common:113254) BlockRequest { id: 0, fields: HEADER | BODY | JUSTIFICATION, from: Number(113318), to: None, direction: Descending, max: Some(64) }    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: BlockResponse 0 from 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm with 1 blocks  (113254)    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: Got ancestry block #113254 (0x9511…8c92) from peer 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: Ancestry search complete. Ours=0x9511…8c92 (113254), Theirs=0xe6ba…d333 (2433159), Common=Some(0x95119158e50bd9ed70e9b986560737aa09ff1e935a4102781464e4c499ca8c92) (113254)    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: New block request for 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm, (best:2433159, common:113254) BlockRequest { id: 0, fields: HEADER | BODY | JUSTIFICATION, from: Number(113382), to: None, direction: Descending, max: Some(64) }    &#xD;&#xA;2022-09-22 14:42:41.269 DEBUG tokio-runtime-worker sync: Request to peer PeerId(&quot;12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta&quot;) failed: Refused.    &#xD;&#xA;2022-09-22 14:42:41.269 DEBUG tokio-runtime-worker sync: 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta disconnected    &#xD;&#xA;2022-09-22 14:42:41.269 TRACE tokio-runtime-worker sync: 0 blocks ready for import    &#xD;&#xA;2022-09-22 14:42:41.269 DEBUG tokio-runtime-worker sync: Request to peer PeerId(&quot;12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm&quot;) failed: Refused.    &#xD;&#xA;2022-09-22 14:42:41.269 DEBUG tokio-runtime-worker sync: 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm disconnected    &#xD;&#xA;2022-09-22 14:42:41.269 TRACE tokio-runtime-worker sync: 0 blocks ready for import    &#xD;&#xA;2022-09-22 14:42:41.271 TRACE tokio-runtime-worker sync: BlockResponse 0 from 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK with 1 blocks  (113254)    &#xD;&#xA;2022-09-22 14:42:41.271 TRACE tokio-runtime-worker sync: Got ancestry block #113254 (0x9511…8c92) from peer 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK    &#xD;&#xA;2022-09-22 14:42:41.271 TRACE tokio-runtime-worker sync: Ancestry search complete. Ours=0x9511…8c92 (113254), Theirs=0xe6ba…d333 (2433159), Common=Some(0x95119158e50bd9ed70e9b986560737aa09ff1e935a4102781464e4c499ca8c92) (113254)    &#xD;&#xA;2022-09-22 14:42:41.271 TRACE tokio-runtime-worker sync: New block request for 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK, (best:2433159, common:113254) BlockRequest { id: 0, fields: HEADER | BODY | JUSTIFICATION, from: Number(113318), to: None, direction: Descending, max: Some(64) }    &#xD;&#xA;2022-09-22 14:42:41.276 DEBUG tokio-runtime-worker sync: Request to peer PeerId(&quot;12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK&quot;) failed: Refused.    &#xD;&#xA;2022-09-22 14:42:41.276 DEBUG tokio-runtime-worker sync: 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK disconnected    &#xD;&#xA;2022-09-22 14:42:41.276 TRACE tokio-runtime-worker sync: 0 blocks ready for import    &#xD;&#xA;2022-09-22 14:42:41.372 TRACE tokio-runtime-worker sync: New peer 12D3KooWPWC1mBZwpWBNHRNeqo4MgoRmAos5wBSCZeD2KezEt3LE BlockAnnouncesHandshake { roles: FULL, best_number: 3841554, best_hash: 0xf7977dc2ef88656ef44389fa14c4296d9c93eb0bd3b5d5a49b1fdc17a51b7da1, genesis_hash: 0x225a01072ee42d335861e6a76ed457556d3e7ded16c577cc669ed15550815579 }    &#xD;&#xA;2022-09-22 14:42:41.372 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0xbb7f…66be theirs: 0x225a…5579)    &#xD;&#xA;2022-09-22 14:42:41.372 DEBUG tokio-runtime-worker sync: 12D3KooWPWC1mBZwpWBNHRNeqo4MgoRmAos5wBSCZeD2KezEt3LE disconnected    &#xD;&#xA;2022-09-22 14:42:41.372 TRACE tokio-runtime-worker sync: Disconnected peer which had earlier been refused by on_sync_peer_connected 12D3KooWPWC1mBZwpWBNHRNeqo4MgoRmAos5wBSCZeD2KezEt3LE    &#xD;&#xA;2022-09-22 14:42:41.382 TRACE tokio-runtime-worker sync: New peer 12D3KooWP77QXcz6DcSn98udtbrirgfefjLRE9w5t5sYUxZTz8WX BlockAnnouncesHandshake { roles: AUTHORITY, best_number: 1620862, best_hash: 0xf2428b3e76685ec67a77a01f9220709eed1c7d478eceb691ac2a91f01efe11df, genesis_hash: 0xffe36f258bba7f5ea972b6a74c094c96bf50fd36438143e28ed6a48783986562 }    &#xD;&#xA;2022-09-22 14:42:41.382 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0xbb7f…66be theirs: 0xffe3…6562)    &#xD;&#xA;2022-09-22 14:42:41.382 DEBUG tokio-runtime-worker sync: 12D3KooWP77QXcz6DcSn98udtbrirgfefjLRE9w5t5sYUxZTz8WX disconnected    &#xD;&#xA;2022-09-22 14:42:41.382 TRACE tokio-runtime-worker sync: Disconnected peer which had earlier been refused by on_sync_peer_connected 12D3KooWP77QXcz6DcSn98udtbrirgfefjLRE9w5t5sYUxZTz8WX    &#xD;&#xA;2022-09-22 14:42:41.384 TRACE tokio-runtime-worker sync: New peer 12D3KooWB9zsBmpvGhQ7BSBN4GHLbqt3pmgmgiGvHJ1LcWaYJvFF BlockAnnouncesHandshake { roles: AUTHORITY, best_number: 4869697, best_hash: 0xf038ba7f9d6ff94aaf91fdeff622052dd455e55f6de453dae288efd3e33d1974, genesis_hash: 0x0378abe88c21bd382106e7977902eef4f542bb2d3e67e8a318151e323b2d0660 }    &#xD;&#xA;2022-09-22 14:42:41.384 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0xbb7f…66be theirs: 0x0378…0660)    &#xD;&#xA;2022-09-22 14:42:41.384 DEBUG tokio-runtime-worker sync: 12D3KooWB9zsBmpvGhQ7BSBN4GHLbqt3pmgmgiGvHJ1LcWaYJvFF disconnected    &#xD;&#xA;2022-09-22 14:42:41.384 TRACE tokio-runtime-worker sync: Disconnected peer which had earlier been refused by on_sync_peer_connected 12D3KooWB9zsBmpvGhQ7BSBN4GHLbqt3pmgmgiGvHJ1LcWaYJvFF    &#xD;&#xA;2022-09-22 14:42:41.386 TRACE tokio-runtime-worker sync: New peer 12D3KooWRaCqbuBvTWs2SgVTfYwqVdTunvGAbFo7dS4sBnXFaykK BlockAnnouncesHandshake { roles: FULL, best_number: 1620862, best_hash: 0xf2428b3e76685ec67a77a01f9220709eed1c7d478eceb691ac2a91f01efe11df, genesis_hash: 0xffe36f258bba7f5ea972b6a74c094c96bf50fd36438143e28ed6a48783986562 }    &#xD;&#xA;2022-09-22 14:42:41.386 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0xbb7f…66be theirs: 0xffe3…6562)    &#xD;&#xA;2022-09-22 14:42:41.386 DEBUG tokio-runtime-worker sync: 12D3KooWRaCqbuBvTWs2SgVTfYwqVdTunvGAbFo7dS4sBnXFaykK disconnected    &#xD;&#xA;2022-09-22 14:42:41.386 TRACE tokio-runtime-worker sync: Disconnected peer which had earlier been refused by on_sync_peer_connected 12D3KooWRaCqbuBvTWs2SgVTfYwqVdTunvGAbFo7dS4sBnXFaykK    &#xD;&#xA;2022-09-22 14:42:41.388 TRACE tokio-runtime-worker sync: New peer 12D3KooWJ2np78u3hSQrLXbJp1EsRyiwzs7S6DXxq1vdFeS5cPQa BlockAnnouncesHandshake { roles: FULL, best_number: 3841554, best_hash: 0xf7977dc2ef88656ef44389fa14c4296d9c93eb0bd3b5d5a49b1fdc17a51b7da1, genesis_hash: 0x225a01072ee42d335861e6a76ed457556d3e7ded16c577cc669ed15550815579 }    &#xD;&#xA;2022-09-22 14:42:41.388 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0xbb7f…66be theirs: 0x225a…5579)    &#xD;&#xA;2022-09-22 14:42:41.388 DEBUG tokio-runtime-worker sync: 12D3KooWJ2np78u3hSQrLXbJp1EsRyiwzs7S6DXxq1vdFeS5cPQa disconnected    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get's &quot;refused&quot; from my bootstrap peerlist, disconnects them and then receives connection requests from different kind of unknown peers.." ContentLicense="CC BY-SA 4.0" />
  <row Id="18535" PostHistoryTypeId="5" PostId="4955" RevisionGUID="7b648060-b1ad-4d12-9f74-bef4a4932219" CreationDate="2022-09-22T13:11:12.837" UserId="220" Comment="added 154 characters in body" Text="From the [docs][1]:&#xD;&#xA;&#xD;&#xA;&gt; The SS58 address format is a public key address based on the Bitcoin&#xD;&#xA;&gt; Base-58-check encoding. Each Substrate SS58 address uses a base-58&#xD;&#xA;&gt; encoded value to identify a specific account on a specific&#xD;&#xA;&gt; Substrate-based chain. These are represented by a base-58 encoded&#xD;&#xA;&gt; value to identify a specific account on a specific Substrate chain.&#xD;&#xA;&gt; The canonical ss58-registry provide additional details about the&#xD;&#xA;&gt; address format used by different Substrate-based chains, including the&#xD;&#xA;&gt; network prefix and website used for different networks.&#xD;&#xA;&#xD;&#xA;I'm guessing that the *SS* stands for [secret string][2]&#xD;&#xA;&#xD;&#xA;See also:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/sp_core/crypto/trait.Ss58Codec.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/glossary/&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sp_core/crypto/type.SecretString.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="18536" PostHistoryTypeId="52" PostId="4947" RevisionGUID="eb70e0f2-1075-4520-af05-5bbe9ce2281c" CreationDate="2022-09-22T13:13:21.123" />
  <row Id="18537" PostHistoryTypeId="5" PostId="4952" RevisionGUID="4e3f1bd4-205e-4fb6-86a8-3eead1309520" CreationDate="2022-09-22T13:27:06.473" UserId="379" Comment="edited body" Text="Found similar behaviour on one of our networks. After spitting out errors like&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-22 12:17:10  Verification failed for block 0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3 received from peer: 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm, &quot;Bad signature on 0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3&quot;    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0x4ff8f2d4afa5fe8ba85c01fff2da3879530ed04fb48f6734ede824a3da4f4be3: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0x31032caf935bda7e701a77f642c9c409c901d54962ce80b7cd2e7f4ce658fa03: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0xb3c7bc381923bebd2b60bb7044994df9b3ce3ea47e03080d43cfc1fa73a3f7e9: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0x19a7a12c81cb6e9ad6252f98e8b5cb5077b780d8e0407a9cbee09eb7ca18e36f: block has an unknown parent    &#xD;&#xA;2022-09-22 12:17:10  Error importing block 0xe7dfc86ae36d0df2aae2803f3d382afde92fbdd9b3f33d3d137982a9075b8167: block has an unknown parent &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It loses all its peer and cannot sync anymore:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-22 12:17:25  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 1.5kiB/s ⬆ 1.5kiB/s    &#xD;&#xA;2022-09-22 12:17:30  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 4.6kiB/s ⬆ 5.7kiB/s    &#xD;&#xA;2022-09-22 12:17:35  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 2.3kiB/s ⬆ 3.2kiB/s    &#xD;&#xA;2022-09-22 12:17:40  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 20.5kiB/s ⬆ 12.5kiB/s    &#xD;&#xA;2022-09-22 12:17:45  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 1.1kiB/s ⬆ 1.9kiB/s    &#xD;&#xA;2022-09-22 12:17:50  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 3.3kiB/s ⬆ 3.5kiB/s    &#xD;&#xA;2022-09-22 12:17:55  Idle (0 peers), best: #113254 (0x9511…8c92), finalized #113152 (0x5062…70ed), ⬇ 1.7kiB/s ⬆ 1.9kiB/s   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Something to note: We recently upgraded our network from substrate V3 to substrate (polkadot-0.9.24). If we try to sync a node with a release that is still on substrate V3 we don't receive this error. But then it stops syncing at the block where we upgraded to polkadot-0.9.24.&#xD;&#xA;&#xD;&#xA;To me, this is kind of weird. The code should be backward compatible, I should be able to sync the entire chain even with the code being on polkadot-0.9.24&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After running the same coomand with `-l sync trace` I see following output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-22 14:42:41.220  INFO                 main sc_rpc_server: Running JSON-RPC WS server: addr=0.0.0.0:9944, allowed origins=Some([&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;])    &#xD;&#xA;2022-09-22 14:42:41.221  INFO tokio-runtime-worker libp2p_mdns::behaviour::iface: creating instance on iface 192.168.8.106    &#xD;&#xA;2022-09-22 14:42:41.221  INFO tokio-runtime-worker libp2p_mdns::behaviour::iface: creating instance on iface 192.168.8.98    &#xD;&#xA;2022-09-22 14:42:41.221  INFO tokio-runtime-worker libp2p_mdns::behaviour::iface: creating instance on iface 192.168.49.1    &#xD;&#xA;2022-09-22 14:42:41.221  INFO tokio-runtime-worker libp2p_mdns::behaviour::iface: creating instance on iface 172.17.0.1    &#xD;&#xA;2022-09-22 14:42:41.221  INFO tokio-runtime-worker libp2p_mdns::behaviour::iface: creating instance on iface 192.168.8.117    &#xD;&#xA;2022-09-22 14:42:41.233 TRACE tokio-runtime-worker sync: New peer 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta BlockAnnouncesHandshake { roles: AUTHORITY, best_number: 2433159, best_hash: 0xe6ba5b10461adb68dc1d094127d92556437a95df0d5f3be1e8fd648f59d7d333, genesis_hash: 0xbb7f298ba5fca8802040061ddd0ca6406832238b7825ebfa66927cc25ec666be }    &#xD;&#xA;2022-09-22 14:42:41.233 DEBUG tokio-runtime-worker sync: New peer with unknown best hash 0xe6ba…d333 (2433159), searching for common ancestor.    &#xD;&#xA;2022-09-22 14:42:41.233 DEBUG tokio-runtime-worker sync: Connected 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta    &#xD;&#xA;2022-09-22 14:42:41.234 TRACE tokio-runtime-worker sync: New peer 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm BlockAnnouncesHandshake { roles: AUTHORITY, best_number: 2433159, best_hash: 0xe6ba5b10461adb68dc1d094127d92556437a95df0d5f3be1e8fd648f59d7d333, genesis_hash: 0xbb7f298ba5fca8802040061ddd0ca6406832238b7825ebfa66927cc25ec666be }    &#xD;&#xA;2022-09-22 14:42:41.234 DEBUG tokio-runtime-worker sync: New peer with unknown best hash 0xe6ba…d333 (2433159), searching for common ancestor.    &#xD;&#xA;2022-09-22 14:42:41.234 DEBUG tokio-runtime-worker sync: Connected 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm    &#xD;&#xA;2022-09-22 14:42:41.264 TRACE tokio-runtime-worker sync: New peer 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK BlockAnnouncesHandshake { roles: AUTHORITY, best_number: 2433159, best_hash: 0xe6ba5b10461adb68dc1d094127d92556437a95df0d5f3be1e8fd648f59d7d333, genesis_hash: 0xbb7f298ba5fca8802040061ddd0ca6406832238b7825ebfa66927cc25ec666be }    &#xD;&#xA;2022-09-22 14:42:41.264 DEBUG tokio-runtime-worker sync: New peer with unknown best hash 0xe6ba…d333 (2433159), searching for common ancestor.    &#xD;&#xA;2022-09-22 14:42:41.264 DEBUG tokio-runtime-worker sync: Connected 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK    &#xD;&#xA;2022-09-22 14:42:41.264 TRACE tokio-runtime-worker sync: BlockResponse 0 from 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta with 1 blocks  (113254)    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: Got ancestry block #113254 (0x9511…8c92) from peer 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: Ancestry search complete. Ours=0x9511…8c92 (113254), Theirs=0xe6ba…d333 (2433159), Common=Some(0x95119158e50bd9ed70e9b986560737aa09ff1e935a4102781464e4c499ca8c92) (113254)    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: New block request for 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta, (best:2433159, common:113254) BlockRequest { id: 0, fields: HEADER | BODY | JUSTIFICATION, from: Number(113318), to: None, direction: Descending, max: Some(64) }    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: BlockResponse 0 from 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm with 1 blocks  (113254)    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: Got ancestry block #113254 (0x9511…8c92) from peer 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: Ancestry search complete. Ours=0x9511…8c92 (113254), Theirs=0xe6ba…d333 (2433159), Common=Some(0x95119158e50bd9ed70e9b986560737aa09ff1e935a4102781464e4c499ca8c92) (113254)    &#xD;&#xA;2022-09-22 14:42:41.265 TRACE tokio-runtime-worker sync: New block request for 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm, (best:2433159, common:113254) BlockRequest { id: 0, fields: HEADER | BODY | JUSTIFICATION, from: Number(113382), to: None, direction: Descending, max: Some(64) }    &#xD;&#xA;2022-09-22 14:42:41.269 DEBUG tokio-runtime-worker sync: Request to peer PeerId(&quot;12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta&quot;) failed: Refused.    &#xD;&#xA;2022-09-22 14:42:41.269 DEBUG tokio-runtime-worker sync: 12D3KooWMPnWPkAi9UhVgGv9QmozXiPDE94rymPCsXLJ5EKynwta disconnected    &#xD;&#xA;2022-09-22 14:42:41.269 TRACE tokio-runtime-worker sync: 0 blocks ready for import    &#xD;&#xA;2022-09-22 14:42:41.269 DEBUG tokio-runtime-worker sync: Request to peer PeerId(&quot;12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm&quot;) failed: Refused.    &#xD;&#xA;2022-09-22 14:42:41.269 DEBUG tokio-runtime-worker sync: 12D3KooWBkwH8LfJsz48Q8LHXSQnuqKJK8YdoQokDeS9wQX1j8mm disconnected    &#xD;&#xA;2022-09-22 14:42:41.269 TRACE tokio-runtime-worker sync: 0 blocks ready for import    &#xD;&#xA;2022-09-22 14:42:41.271 TRACE tokio-runtime-worker sync: BlockResponse 0 from 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK with 1 blocks  (113254)    &#xD;&#xA;2022-09-22 14:42:41.271 TRACE tokio-runtime-worker sync: Got ancestry block #113254 (0x9511…8c92) from peer 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK    &#xD;&#xA;2022-09-22 14:42:41.271 TRACE tokio-runtime-worker sync: Ancestry search complete. Ours=0x9511…8c92 (113254), Theirs=0xe6ba…d333 (2433159), Common=Some(0x95119158e50bd9ed70e9b986560737aa09ff1e935a4102781464e4c499ca8c92) (113254)    &#xD;&#xA;2022-09-22 14:42:41.271 TRACE tokio-runtime-worker sync: New block request for 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK, (best:2433159, common:113254) BlockRequest { id: 0, fields: HEADER | BODY | JUSTIFICATION, from: Number(113318), to: None, direction: Descending, max: Some(64) }    &#xD;&#xA;2022-09-22 14:42:41.276 DEBUG tokio-runtime-worker sync: Request to peer PeerId(&quot;12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK&quot;) failed: Refused.    &#xD;&#xA;2022-09-22 14:42:41.276 DEBUG tokio-runtime-worker sync: 12D3KooWAnibsVN4yBcKNKnnRm8pxmHkEf3DUT65dpb3P252RpZK disconnected    &#xD;&#xA;2022-09-22 14:42:41.276 TRACE tokio-runtime-worker sync: 0 blocks ready for import    &#xD;&#xA;2022-09-22 14:42:41.372 TRACE tokio-runtime-worker sync: New peer 12D3KooWPWC1mBZwpWBNHRNeqo4MgoRmAos5wBSCZeD2KezEt3LE BlockAnnouncesHandshake { roles: FULL, best_number: 3841554, best_hash: 0xf7977dc2ef88656ef44389fa14c4296d9c93eb0bd3b5d5a49b1fdc17a51b7da1, genesis_hash: 0x225a01072ee42d335861e6a76ed457556d3e7ded16c577cc669ed15550815579 }    &#xD;&#xA;2022-09-22 14:42:41.372 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0xbb7f…66be theirs: 0x225a…5579)    &#xD;&#xA;2022-09-22 14:42:41.372 DEBUG tokio-runtime-worker sync: 12D3KooWPWC1mBZwpWBNHRNeqo4MgoRmAos5wBSCZeD2KezEt3LE disconnected    &#xD;&#xA;2022-09-22 14:42:41.372 TRACE tokio-runtime-worker sync: Disconnected peer which had earlier been refused by on_sync_peer_connected 12D3KooWPWC1mBZwpWBNHRNeqo4MgoRmAos5wBSCZeD2KezEt3LE    &#xD;&#xA;2022-09-22 14:42:41.382 TRACE tokio-runtime-worker sync: New peer 12D3KooWP77QXcz6DcSn98udtbrirgfefjLRE9w5t5sYUxZTz8WX BlockAnnouncesHandshake { roles: AUTHORITY, best_number: 1620862, best_hash: 0xf2428b3e76685ec67a77a01f9220709eed1c7d478eceb691ac2a91f01efe11df, genesis_hash: 0xffe36f258bba7f5ea972b6a74c094c96bf50fd36438143e28ed6a48783986562 }    &#xD;&#xA;2022-09-22 14:42:41.382 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0xbb7f…66be theirs: 0xffe3…6562)    &#xD;&#xA;2022-09-22 14:42:41.382 DEBUG tokio-runtime-worker sync: 12D3KooWP77QXcz6DcSn98udtbrirgfefjLRE9w5t5sYUxZTz8WX disconnected    &#xD;&#xA;2022-09-22 14:42:41.382 TRACE tokio-runtime-worker sync: Disconnected peer which had earlier been refused by on_sync_peer_connected 12D3KooWP77QXcz6DcSn98udtbrirgfefjLRE9w5t5sYUxZTz8WX    &#xD;&#xA;2022-09-22 14:42:41.384 TRACE tokio-runtime-worker sync: New peer 12D3KooWB9zsBmpvGhQ7BSBN4GHLbqt3pmgmgiGvHJ1LcWaYJvFF BlockAnnouncesHandshake { roles: AUTHORITY, best_number: 4869697, best_hash: 0xf038ba7f9d6ff94aaf91fdeff622052dd455e55f6de453dae288efd3e33d1974, genesis_hash: 0x0378abe88c21bd382106e7977902eef4f542bb2d3e67e8a318151e323b2d0660 }    &#xD;&#xA;2022-09-22 14:42:41.384 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0xbb7f…66be theirs: 0x0378…0660)    &#xD;&#xA;2022-09-22 14:42:41.384 DEBUG tokio-runtime-worker sync: 12D3KooWB9zsBmpvGhQ7BSBN4GHLbqt3pmgmgiGvHJ1LcWaYJvFF disconnected    &#xD;&#xA;2022-09-22 14:42:41.384 TRACE tokio-runtime-worker sync: Disconnected peer which had earlier been refused by on_sync_peer_connected 12D3KooWB9zsBmpvGhQ7BSBN4GHLbqt3pmgmgiGvHJ1LcWaYJvFF    &#xD;&#xA;2022-09-22 14:42:41.386 TRACE tokio-runtime-worker sync: New peer 12D3KooWRaCqbuBvTWs2SgVTfYwqVdTunvGAbFo7dS4sBnXFaykK BlockAnnouncesHandshake { roles: FULL, best_number: 1620862, best_hash: 0xf2428b3e76685ec67a77a01f9220709eed1c7d478eceb691ac2a91f01efe11df, genesis_hash: 0xffe36f258bba7f5ea972b6a74c094c96bf50fd36438143e28ed6a48783986562 }    &#xD;&#xA;2022-09-22 14:42:41.386 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0xbb7f…66be theirs: 0xffe3…6562)    &#xD;&#xA;2022-09-22 14:42:41.386 DEBUG tokio-runtime-worker sync: 12D3KooWRaCqbuBvTWs2SgVTfYwqVdTunvGAbFo7dS4sBnXFaykK disconnected    &#xD;&#xA;2022-09-22 14:42:41.386 TRACE tokio-runtime-worker sync: Disconnected peer which had earlier been refused by on_sync_peer_connected 12D3KooWRaCqbuBvTWs2SgVTfYwqVdTunvGAbFo7dS4sBnXFaykK    &#xD;&#xA;2022-09-22 14:42:41.388 TRACE tokio-runtime-worker sync: New peer 12D3KooWJ2np78u3hSQrLXbJp1EsRyiwzs7S6DXxq1vdFeS5cPQa BlockAnnouncesHandshake { roles: FULL, best_number: 3841554, best_hash: 0xf7977dc2ef88656ef44389fa14c4296d9c93eb0bd3b5d5a49b1fdc17a51b7da1, genesis_hash: 0x225a01072ee42d335861e6a76ed457556d3e7ded16c577cc669ed15550815579 }    &#xD;&#xA;2022-09-22 14:42:41.388 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0xbb7f…66be theirs: 0x225a…5579)    &#xD;&#xA;2022-09-22 14:42:41.388 DEBUG tokio-runtime-worker sync: 12D3KooWJ2np78u3hSQrLXbJp1EsRyiwzs7S6DXxq1vdFeS5cPQa disconnected    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It gets &quot;refused&quot; from my bootstrap peerlist, disconnects them and then receives connection requests from different kind of unknown peers.." ContentLicense="CC BY-SA 4.0" />
  <row Id="18538" PostHistoryTypeId="2" PostId="4958" RevisionGUID="2c5042b1-89f9-47bc-bd70-b2c4a49b569c" CreationDate="2022-09-22T13:41:44.463" UserId="2752" Text="I want to dynamically call contract functions. The only problem with this is,&#xD;&#xA;that all of the functions have a different amount of variables.&#xD;&#xA;As of now, the function looks like this:&#xD;&#xA;&#xD;&#xA;    async call(message: string, args, accountId: string){&#xD;&#xA;    &#xD;&#xA;        const provider =  new WsProvider(this.providerAddress)&#xD;&#xA;        const api = await ApiPromise.create({ provider })&#xD;&#xA;        const contract = new ContractPromise(api, this.abi, this.contractAddress)&#xD;&#xA;    &#xD;&#xA;        const gasLimit = this.gasLimit&#xD;&#xA;        const storageDepositLimit = this.storageDepositLimit&#xD;&#xA;                &#xD;&#xA;    &#xD;&#xA;        if(args.length == 1) {&#xD;&#xA;             const { gasRequired, storageDeposit, result, output } = await   contract.query[message](&#xD;&#xA;                        accountId,&#xD;&#xA;                        {&#xD;&#xA;                         gasLimit,&#xD;&#xA;                         storageDepositLimit,&#xD;&#xA;                        },&#xD;&#xA;                        args[0]&#xD;&#xA;                    )&#xD;&#xA;                        return{gasRequired, storageDeposit, result, output}&#xD;&#xA;         }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;'args' is an array of the arguments passed to the contract query.&#xD;&#xA;Is it possible to loop through all args in the contract call,instead of calling them all individually using their index?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18540" PostHistoryTypeId="1" PostId="4958" RevisionGUID="2c5042b1-89f9-47bc-bd70-b2c4a49b569c" CreationDate="2022-09-22T13:41:44.463" UserId="2752" Text="JavaScript/TypeScript: How to pass arguments of an array individually to a function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18541" PostHistoryTypeId="3" PostId="4958" RevisionGUID="2c5042b1-89f9-47bc-bd70-b2c4a49b569c" CreationDate="2022-09-22T13:41:44.463" UserId="2752" Text="|polkadot-js|smart-contract|javascript|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18542" PostHistoryTypeId="5" PostId="4955" RevisionGUID="e2cbe54b-2aee-456b-b08b-a2ccc4ec90e1" CreationDate="2022-09-22T13:46:20.237" UserId="220" Comment="added 90 characters in body" Text="From the [docs][1]:&#xD;&#xA;&#xD;&#xA;&gt; The SS58 address format is a public key address based on the Bitcoin&#xD;&#xA;&gt; Base-58-check encoding. Each Substrate SS58 address uses a base-58&#xD;&#xA;&gt; encoded value to identify a specific account on a specific&#xD;&#xA;&gt; Substrate-based chain. These are represented by a base-58 encoded&#xD;&#xA;&gt; value to identify a specific account on a specific Substrate chain.&#xD;&#xA;&gt; The canonical ss58-registry provide additional details about the&#xD;&#xA;&gt; address format used by different Substrate-based chains, including the&#xD;&#xA;&gt; network prefix and website used for different networks.&#xD;&#xA;&#xD;&#xA;I'm guessing that the *SS* stands for [secret string][2]&#xD;&#xA;&#xD;&#xA;See also:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/sp_core/crypto/trait.Ss58Codec.html&#xD;&#xA;&#xD;&#xA;https://web.archive.org/web/20220211124735/https://docs.substrate.io/v3/advanced/ss58/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/glossary/&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sp_core/crypto/type.SecretString.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="18543" PostHistoryTypeId="10" PostId="3470" RevisionGUID="e20d85e9-8647-4133-bb42-fe80acde3b3a" CreationDate="2022-09-22T15:09:29.407" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[3646],&quot;Voters&quot;:[{&quot;Id&quot;:2025,&quot;DisplayName&quot;:&quot;Iker&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="18544" PostHistoryTypeId="2" PostId="4959" RevisionGUID="1e4ef8cf-556c-4cb8-8402-191de6c93315" CreationDate="2022-09-22T17:07:00.747" UserId="3123" Text="I want to add custom error types to a working pallet (permalink [duniter-wot/src/lib.rs](https://git.duniter.org/nodes/rust/duniter-v2s/-/blob/e714b76c30a5bde7a073681cd6fdfdcdcae75807/pallets/duniter-wot/src/lib.rs)). In this current state, `cargo check` pass successfully.&#xD;&#xA;&#xD;&#xA;According to Substrate documentation [frame-macros/#palleterror](https://docs.substrate.io/reference/frame-macros/#palleterror), I'm adding inside the `#[frame_support::pallet]` block a `#[pallet::error]` macro with an enumeration named `Error` with a generic type like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::error]&#xD;&#xA;pub enum Error&lt;T&gt; {&#xD;&#xA;	/// variant one&#xD;&#xA;	VariantOne,&#xD;&#xA;	/// variant two&#xD;&#xA;	VariantTwo,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But as soon as I do this, `cargo check` returns a long (&gt; 700 lines) error trace in which the first element is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: Invalid generic declaration, trait is defined with instance but generic use none&#xD;&#xA;  --&gt; pallets/duniter-wot/src/lib.rs:99:20&#xD;&#xA;   |&#xD;&#xA;99 |     pub enum Error&lt;T&gt; {&#xD;&#xA;   |                    ^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The question, more than &quot;how to fix this&quot; would be &quot;how am I supposed to understand this hint&quot; and &quot;what resources/tools/documentation could help me debug myself&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="18546" PostHistoryTypeId="1" PostId="4959" RevisionGUID="1e4ef8cf-556c-4cb8-8402-191de6c93315" CreationDate="2022-09-22T17:07:00.747" UserId="3123" Text="Invalid generic declaration when using FRAME macro pallet::error" ContentLicense="CC BY-SA 4.0" />
  <row Id="18547" PostHistoryTypeId="3" PostId="4959" RevisionGUID="1e4ef8cf-556c-4cb8-8402-191de6c93315" CreationDate="2022-09-22T17:07:00.747" UserId="3123" Text="|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18548" PostHistoryTypeId="2" PostId="4960" RevisionGUID="7bf7afa3-3820-4110-a334-f2ddbd07565a" CreationDate="2022-09-22T17:28:12.917" UserId="94" Text="It looks like your pallet is instantiatable. This requires you to additionally pass in the instance type like such. In the easiest case it looks like this:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::error]&#xD;&#xA;pub enum Error&lt;T, I = ()&gt; {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Making a pallet instantiatable is useful when you plan on having more than one instance deployed within the same runtime.&#xD;&#xA;&#xD;&#xA;&gt; what resources/tools/documentation could help me debug myself&#xD;&#xA;&#xD;&#xA;For me personally it is enough to read examples from the Substrate repo. For example [pallet-referenda](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/referenda/src/lib.rs#L352)." ContentLicense="CC BY-SA 4.0" />
  <row Id="18550" PostHistoryTypeId="6" PostId="4959" RevisionGUID="2506a7d6-082c-4110-b077-18f45bb924f3" CreationDate="2022-09-22T17:31:11.477" UserId="94" Comment="edited tags" Text="|pallet|frame|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18551" PostHistoryTypeId="2" PostId="4961" RevisionGUID="595bebec-75d4-46c9-8877-3cc604957bf9" CreationDate="2022-09-22T19:26:24.223" UserId="716" Text="I am trying to following the tutorials at substrate.dev and I am getting stuck on [this one](https://docs.substrate.io/tutorials/get-started/upgrade-a-running-network/).  Specifically, when I add this code to my runtime/src/lib.rs file: &#xD;&#xA;```&#xD;&#xA;impl pallet_scheduler::Config for Runtime {&#xD;&#xA;  type Event = Event;&#xD;&#xA;  type Origin = Origin;&#xD;&#xA;  type PalletsOrigin = OriginCaller;&#xD;&#xA;  type Call = Call;&#xD;&#xA;  type MaximumWeight = MaximumSchedulerWeight;&#xD;&#xA;  type ScheduleOrigin = frame_system::EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;  type MaxScheduledPerBlock = MaxScheduledPerBlock;&#xD;&#xA;  type WeightInfo = ();&#xD;&#xA;  type OriginPrivilegeCmp = EqualPrivilegeOnly;&#xD;&#xA;  type PreimageProvider = ();&#xD;&#xA;  type NoPreimagePostponement = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I get this error when I try to build:&#xD;&#xA;```&#xD;&#xA;--- stderr&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/home/bosr/rust/substrate-node-template/runtime)&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `pallet_scheduler`&#xD;&#xA;     --&gt; /home/bosr/rust/substrate-node-template/runtime/src/lib.rs:151:6&#xD;&#xA;      |&#xD;&#xA;  151 | impl pallet_scheduler::Config for Runtime {&#xD;&#xA;      |      ^^^^^^^^^^^^^^^^ use of undeclared crate or module `pallet_scheduler`&#xD;&#xA;```&#xD;&#xA;I do have this line in the [dependencies] section:&#xD;&#xA;```&#xD;&#xA;pallet-scheduler = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;```&#xD;&#xA;and the version and branch match the rest of the dependencies.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18553" PostHistoryTypeId="1" PostId="4961" RevisionGUID="595bebec-75d4-46c9-8877-3cc604957bf9" CreationDate="2022-09-22T19:26:24.223" UserId="716" Text="Undeclared crate error (pallet_scheduler) when trying to follow the getting started tutorial &quot;Upgrade a running network&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18554" PostHistoryTypeId="3" PostId="4961" RevisionGUID="595bebec-75d4-46c9-8877-3cc604957bf9" CreationDate="2022-09-22T19:26:24.223" UserId="716" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18557" PostHistoryTypeId="2" PostId="4963" RevisionGUID="6cef9a79-c344-430d-9f77-0a1d20aa51cf" CreationDate="2022-09-23T02:56:26.933" UserId="251" Text="Is that a standalone chain?&#xD;&#xA;&#xD;&#xA;If yes, then I suggest you follow this [example](https://subalfred.hack.ink/user/cli/state.html#fork-off)." ContentLicense="CC BY-SA 4.0" />
  <row Id="18559" PostHistoryTypeId="2" PostId="4964" RevisionGUID="57c3b9c9-f105-45ba-b670-4d6453cb3605" CreationDate="2022-09-23T03:57:22.700" UserId="251" Text="Through the [`DustCleaner`](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L737).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Take [`transfer`](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L1483) as an example.&#xD;&#xA;&#xD;&#xA;When you call the `transfer` it will call [`try_mutate_account_with_dust`](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L926) internally.&#xD;&#xA;&#xD;&#xA;Let's go back to the `transfer`. The closure which pass to the `try_mutate_account_with_dust` will return an `Ok(())` after the [`allow_death`](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L1522-L1530) check.&#xD;&#xA;&#xD;&#xA;Then if the result is `Ok(())`. A `DustCleaner` instance will be [created](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L940-L946). Just a Rust tip: if the `result` is `Err(..)` then the `result.map(..)` does nothing.&#xD;&#xA;&#xD;&#xA;Finally, when the `DustCleaner` instance gets dropped somewhere, the [`Drop`](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L741-L748) will be triggered. Then the account gets killed/recycled." ContentLicense="CC BY-SA 4.0" />
  <row Id="18561" PostHistoryTypeId="50" PostId="2129" RevisionGUID="6ce59f4b-c4a4-405b-b156-121bc801af8b" CreationDate="2022-09-23T05:08:05.880" UserId="-1" />
  <row Id="18562" PostHistoryTypeId="4" PostId="3482" RevisionGUID="1cec35c4-c600-4cc4-8304-7c810bf544e0" CreationDate="2022-09-23T05:19:41.737" UserId="283" Comment="edited title" Text="How does Substrate clean up accounts whose balance is below the existential deposit?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18563" PostHistoryTypeId="52" PostId="4959" RevisionGUID="b7d6929f-96f4-4dd0-a614-045203f22450" CreationDate="2022-09-23T05:24:04.680" />
  <row Id="18564" PostHistoryTypeId="5" PostId="4964" RevisionGUID="b8ee13de-637d-484e-a6e7-02d7e640d24d" CreationDate="2022-09-23T05:44:45.903" UserId="251" Comment="deleted 3 characters in body" Text="Through the [`DustCleaner`](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L737).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Take [`transfer`](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L1483) as an example.&#xD;&#xA;&#xD;&#xA;When you call the `transfer` it will call [`try_mutate_account_with_dust`](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L926) internally.&#xD;&#xA;&#xD;&#xA;Let's go back to the `transfer`. The closure which pass to the `try_mutate_account_with_dust` will return a result after the [`allow_death`](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L1522-L1530) check.&#xD;&#xA;&#xD;&#xA;Then if the result is `Ok(())`. A `DustCleaner` instance will be [created](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L940-L946). Just a Rust tip: if the result is `Err(..)` then the `result.map(..)` does nothing.&#xD;&#xA;&#xD;&#xA;Finally, when the `DustCleaner` instance gets dropped somewhere, the [`Drop`](https://github.com/paritytech/substrate/blob/1f720c11b90d45bba0c4ddad60d3b9a27ca85441/frame/balances/src/lib.rs#L741-L748) will be triggered. Then the account gets killed/recycled." ContentLicense="CC BY-SA 4.0" />
  <row Id="18565" PostHistoryTypeId="2" PostId="4965" RevisionGUID="c4ee56bc-84b0-4be1-9c7b-da2d8c9d4201" CreationDate="2022-09-23T08:31:54.343" UserId="2484" Text="Hey Substrate Community,&#xD;&#xA;&#xD;&#xA;is there a way to annotate a extrinsic call function with the Rust `cfg` condition compile execution?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg_attr(feature = &quot;with-global-disputes&quot;, pallet::weight(T::WeightInfo::start_global_dispute(CacheSize::get())))]&#xD;&#xA;#[cfg_attr(feature = &quot;with-global-disputes&quot;, transactional)]&#xD;&#xA;#[cfg(feature = &quot;with-global-disputes&quot;)]&#xD;&#xA;pub fn start_global_dispute(origin: OriginFor&lt;T&gt;, #[pallet::compact] market_id: MarketIdOf&lt;T&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;   ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This produces an error:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;  error: Invalid pallet::call, requires weight attribute i.e. `#[pallet::weight($expr)]`&#xD;&#xA;     --&gt; /Users/tesst/dev/random/test-project.rs&#xD;&#xA;      |&#xD;&#xA;  963 |         pub fn start_global_dispute(origin: OriginFor&lt;T&gt;, #[pallet::compact] market_id: MarketIdOf&lt;T&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18567" PostHistoryTypeId="1" PostId="4965" RevisionGUID="c4ee56bc-84b0-4be1-9c7b-da2d8c9d4201" CreationDate="2022-09-23T08:31:54.343" UserId="2484" Text="How to conditionally include an extrinsic with a rustc feature?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18568" PostHistoryTypeId="3" PostId="4965" RevisionGUID="c4ee56bc-84b0-4be1-9c7b-da2d8c9d4201" CreationDate="2022-09-23T08:31:54.343" UserId="2484" Text="|extrinsic|call|configuration|command|features|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18569" PostHistoryTypeId="2" PostId="4966" RevisionGUID="33f7b92d-4483-4a5d-a7bf-0c34c648e0cd" CreationDate="2022-09-23T10:04:50.690" UserId="94" Text="I don't completely understand your problem here, but you can do:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;benchmark_with_pruning {&#xD;&#xA;    // Components must be named with a single char. _ does not work.&#xD;&#xA;    let c in 0 .. 3;&#xD;&#xA;    T::HeadersToKeep::set(c);&#xD;&#xA;} …" ContentLicense="CC BY-SA 4.0" />
  <row Id="18571" PostHistoryTypeId="5" PostId="4966" RevisionGUID="c8f9cd7b-faea-4c64-bac4-7f14b65d1774" CreationDate="2022-09-23T10:10:46.667" UserId="94" Comment="added 4 characters in body" Text="I don't completely understand your problem here, but you can do:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;benchmark_with_pruning {&#xD;&#xA;    // Components must be named with a single char. _ does not work.&#xD;&#xA;    let c in 0 .. 3;&#xD;&#xA;    HeadersToKeepArgument::set(c);&#xD;&#xA;} …&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that you have to define the `parameter_types` in the benchmarking and then use it in your mock file as `super::benchmarking::HeadersToKeepArgument`. The other way around does not work as the benchmarking cannot access the mock.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18572" PostHistoryTypeId="2" PostId="4967" RevisionGUID="1a45bea0-bf3d-4384-9668-30510c749fa4" CreationDate="2022-09-23T10:15:17.983" UserId="3171" Text="Great tutorial for opening channel with Common good parachain. &#xD;&#xA;&#xD;&#xA;[link][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://hackmd.io/ECywP_7_SLeTvWCTfQPkqw?view" ContentLicense="CC BY-SA 4.0" />
  <row Id="18574" PostHistoryTypeId="5" PostId="4931" RevisionGUID="9b68ca1f-3393-4bac-8f30-3970e1ed95c6" CreationDate="2022-09-23T10:58:15.543" UserId="298" Comment="added 147 characters in body" Text="I'm trying to run a substrate node through docker container but i am not able to with this command:&#xD;&#xA;&#xD;&#xA;`docker run -p 9944:9944 -p 30333:30333 -p 9933:9933 -p 9615:9615  docker.io/decentration/supersig-node:latest --dev --port 30333 --ws-port 9944 --rpc-port 9933`&#xD;&#xA;&#xD;&#xA;The logs look like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-21 13:21:19 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-09-21 13:21:19 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=None    &#xD;&#xA;2022-09-21 13:21:19 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=None &#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but i'm not getting any errors from the console.&#xD;&#xA;&#xD;&#xA;What am i missing from the command?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;*Update: i am allowing insecure messages but still not working from docker. Also i have a mac m2. I found that it can work on mac Intel chip. also if you add `--unsafe-ws-external` to the command then it should work fine.*&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/p2EXS.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/cdrox.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18575" PostHistoryTypeId="50" PostId="4419" RevisionGUID="fc70cfe6-eb85-422f-bb7b-232f4f75798b" CreationDate="2022-09-23T11:05:15.467" UserId="-1" />
  <row Id="18576" PostHistoryTypeId="2" PostId="4968" RevisionGUID="4e61606a-8293-450e-938d-223142714fb2" CreationDate="2022-09-23T11:38:16.487" UserId="379" Text="We recently upgraded our chain from substrate V3 to polkadot-0.9.24. When we try to sync a node from 0, the block import fails on the first block where the authorities were changes (some block creator was added at that point). We are using `aura` consensus.&#xD;&#xA;&#xD;&#xA;output of our node:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-23 13:26:18 ⚙️  Syncing 22.0 bps, target=#2446795 (5 peers), best: #112556 (0xca60…3cc9), finalized #112128 (0x1dcd…ad78), ⬇ 13.1kiB/s ⬆ 2.8kiB/s    &#xD;&#xA;2022-09-23 13:26:23 ⚙️  Syncing 21.2 bps, target=#2446795 (5 peers), best: #112662 (0x345f…5f0e), finalized #112640 (0x3c2b…c601), ⬇ 13.1kiB/s ⬆ 2.5kiB/s    &#xD;&#xA;2022-09-23 13:26:28 ⚙️  Syncing 22.6 bps, target=#2446796 (5 peers), best: #112775 (0x470d…c04a), finalized #112640 (0x3c2b…c601), ⬇ 12.8kiB/s ⬆ 1.2kiB/s    &#xD;&#xA;2022-09-23 13:26:33 ⚙️  Syncing 22.2 bps, target=#2446797 (5 peers), best: #112886 (0x5742…1446), finalized #112640 (0x3c2b…c601), ⬇ 25.1kiB/s ⬆ 7.0kiB/s    &#xD;&#xA;2022-09-23 13:26:38 ⚙️  Syncing 22.2 bps, target=#2446798 (5 peers), best: #112997 (0x169a…ab2a), finalized #112640 (0x3c2b…c601), ⬇ 14.1kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-09-23 13:26:43 ⚙️  Syncing 22.8 bps, target=#2446799 (5 peers), best: #113111 (0xb42d…1792), finalized #112640 (0x3c2b…c601), ⬇ 14.8kiB/s ⬆ 2.3kiB/s    &#xD;&#xA;2022-09-23 13:26:48 ⚙️  Syncing 22.6 bps, target=#2446800 (5 peers), best: #113224 (0x41a5…a8fc), finalized #113152 (0x5062…70ed), ⬇ 12.4kiB/s ⬆ 2.7kiB/s    &#xD;&#xA;2022-09-23 13:26:50  Verification failed for block 0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3 received from peer: 12D3KooWQ5zzNP458fPfY2eAEDaXsxPsLMNSd73D2ywJWMznHBDu, &quot;Bad signature on 0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3&quot;    &#xD;&#xA;2022-09-23 13:26:50  Error importing block 0x43907aee965aa2455ce149bb1565aeaa8370d0aa496472f0de55ffd7375f0338: block has an unknown parent    &#xD;&#xA;2022-09-23 13:26:50  Error importing block 0xe2ffa1d2f46c777828ee6b0bb4b37d0f250bffb3fc9bba3fc2801c528c3c95c6: block has an unknown parent    &#xD;&#xA;2022-09-23 13:26:50  Error importing block 0x322cd39b6d55fd9da9d9f603e1847c17c4c53d3e0b2d930584b2a9c9b3b0a246: block has an unknown parent  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;At block `0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3` we went from 2 blockcreators to 3 blockcreators. We went digging in the aura consensus client and we believe the issue comes from:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/397da2753081b3cbe4cbb0893f17b4188f0d5997/client/consensus/aura/src/import_queue.rs#L83&#xD;&#xA;&#xD;&#xA;It tries to get the author for this block to verify the signature but this seems to be failing somehow. Either it does not fetch the right author or the verification of the signature has changed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18578" PostHistoryTypeId="1" PostId="4968" RevisionGUID="4e61606a-8293-450e-938d-223142714fb2" CreationDate="2022-09-23T11:38:16.487" UserId="379" Text="Block import crashes on block where authorities have changed" ContentLicense="CC BY-SA 4.0" />
  <row Id="18579" PostHistoryTypeId="3" PostId="4968" RevisionGUID="4e61606a-8293-450e-938d-223142714fb2" CreationDate="2022-09-23T11:38:16.487" UserId="379" Text="|substrate-node|block-import|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18580" PostHistoryTypeId="5" PostId="4949" RevisionGUID="4381226a-0e28-49ec-af5d-bbe6c7ed176f" CreationDate="2022-09-23T12:18:07.883" UserId="2844" Comment="deleted 5 characters in body" Text="I think it's not possible to compile ink smart contract to evm bytecode. As per [ink doc here][1], ink contract can compile in **ANY WASM VM** and If anyhow if we try to compile then, I think we may face some issue, which are point out in [this article][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://ink.substrate.io/ink-vs-solidity&#xD;&#xA;  [2]: https://www.parity.io/blog/wasm-smart-contract-development/" ContentLicense="CC BY-SA 4.0" />
  <row Id="18581" PostHistoryTypeId="2" PostId="4969" RevisionGUID="df777f9c-b170-4ccb-b1a9-53e9d55108b9" CreationDate="2022-09-23T12:56:38.570" UserId="2844" Text="As per this [issue][1], right now it can't possible to iterate over storage.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/11410" ContentLicense="CC BY-SA 4.0" />
  <row Id="18583" PostHistoryTypeId="2" PostId="4970" RevisionGUID="2bc94572-6206-4a53-9de5-04fad0464df5" CreationDate="2022-09-23T13:44:47.990" UserId="2663" Text="There is a way to see what node authoring a specific block in the Polkadot app?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18585" PostHistoryTypeId="1" PostId="4970" RevisionGUID="2bc94572-6206-4a53-9de5-04fad0464df5" CreationDate="2022-09-23T13:44:47.990" UserId="2663" Text="How to check what node authoring a block with Aura in the Polkadot.js App?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18586" PostHistoryTypeId="3" PostId="4970" RevisionGUID="2bc94572-6206-4a53-9de5-04fad0464df5" CreationDate="2022-09-23T13:44:47.990" UserId="2663" Text="|substrate-node|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18587" PostHistoryTypeId="5" PostId="4925" RevisionGUID="08ca56b0-5b72-4be8-9547-c1f94dcb07f3" CreationDate="2022-09-23T13:48:44.893" UserId="1959" Comment="added 89 characters in body" Text="First, this is  because you're using a non-root account to send the XCM of HRMP request. **You should use sudo or governance to do this.**&#xD;&#xA;&#xD;&#xA;Then, there are several improvements you need to pay attention to, although they're not releated to `barrier`:&#xD;&#xA;1. You can add a `RefundSurplus` instruction between `Transact` and `DepositAsset`, it can refund your surplus weight for transact.&#xD;&#xA;2. The `beneficiary` of `DepositAsset` should be your sovereign account on rococo, your paraId is 2124, so it should be `{0, X1(Parachain(2124))}`, rather than `Parachain(1000)`. It will put unspent tokens into your sovereign account on rococo.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/W4TcG.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18588" PostHistoryTypeId="5" PostId="4886" RevisionGUID="2aa03aad-0c16-4bbe-bbbf-2fc35311a7c6" CreationDate="2022-09-23T14:14:03.023" UserId="1959" Comment="added 122 characters in body" Text="First, you have to confirm that the parachain supports the assets of the relay chain. (Check their assets pallet or other assets releated pallet)&#xD;&#xA;&#xD;&#xA;Then follow the example to transfer between kusama(1000) and karura(2000): &#xD;&#xA;1. Kusama transfer KSM to parachain(2000) use `xcm-pallet`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;2. parachain(2000) transfer KSM to Kusama use `xtokens`&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xQtOS.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/u0rx0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18589" PostHistoryTypeId="5" PostId="4827" RevisionGUID="2f2264db-01cc-4f9f-bae3-8ee61626b05a" CreationDate="2022-09-23T14:41:16.190" UserId="1789" Comment="added 40 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 and its original code is here https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd&#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot... I think the Zero fee shown on MetaMask in the video above is caused by setting pallet_evm::Config:&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;  type FeeCalculator = ();// FixedGasPrice;&#xD;&#xA;  type GasWeightMapping = ();// GasWeightMapping;&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;BUT that makes ALL transactions gasless! Not good. And in my parachain, that makes such feeless transactions not to be accepted by the validators somehow...&#xD;&#xA;&#xD;&#xA;Here is Moonbeam recent code on precompile https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;My file structure:&#xD;&#xA;```&#xD;&#xA;project/precompiles&#xD;&#xA;|- balances-erc20 -&gt; src/lib.rs&#xD;&#xA;|- utils -&gt; src/lib.rs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From Parallel Finance's `transfer()` function in  precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;    handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;    // Parse input.&#xD;&#xA;    let mut input = handle.read_input()?;&#xD;&#xA;    input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;    let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;    let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;    // Build call with origin.&#xD;&#xA;    {&#xD;&#xA;        let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;        let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;        let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;        // Dispatch call (if enough gas).&#xD;&#xA;        RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;            handle,&#xD;&#xA;            Some(origin).into(),&#xD;&#xA;            pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                value: amount,&#xD;&#xA;            },&#xD;&#xA;        )?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    LogsBuilder::new(handle.context().address)&#xD;&#xA;        .log3(&#xD;&#xA;            SELECTOR_LOG_TRANSFER,&#xD;&#xA;            handle.context().caller,&#xD;&#xA;            to,&#xD;&#xA;            EvmDataWriter::new().write(amount).build(),&#xD;&#xA;        )&#xD;&#xA;        .record(handle)?;&#xD;&#xA;&#xD;&#xA;    // Build output.&#xD;&#xA;    Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found out this `RuntimeHelper::&lt;Runtime&gt;::try_dispatch()` function was imported from my precompiles/utils/src/lib.rs:&#xD;&#xA;&#xD;&#xA;inside try_dispatch() in precompiles/utils/src/lib.rs ... see https://github.com/parallel-finance/parallel/blob/master/precompiles/utils/src/lib.rs#L171:&#xD;&#xA;```rust&#xD;&#xA;pub fn try_dispatch&lt;Call&gt;(...){&#xD;&#xA;  let call = Runtime::Call::from(call);&#xD;&#xA;  let dispatch_info = call.get_dispatch_info();&#xD;&#xA;&#xD;&#xA;  let required_gas = Runtime::GasWeightMapping::weight_to_gas(dispatch_info.weight);&#xD;&#xA;&#xD;&#xA;  let used_weight = call.dispatch(origin)&#xD;&#xA;      .map_err(|e| revert(alloc::format!(&quot;Dispatched call failed with error: {:?}&quot;, e)))?&#xD;&#xA;      .actual_weight;&#xD;&#xA;```&#xD;&#xA;so I tried to set that required_gas to 0 in my precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;let mut call = pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;   dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;   value: amount,&#xD;&#xA;};&#xD;&#xA;call.get_dispatch_info().weight= 0;&#xD;&#xA;&#xD;&#xA;RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;   handle,&#xD;&#xA;   Some(origin).into(),&#xD;&#xA;   call,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;But that does not change the gas fee!??&#xD;&#xA;&#xD;&#xA;Now, I have made a simple `feeless_transfer()` function from the above `transfer()` function. And my `feeless_transfer()` will call another `feeless_transfer()` that is in my pallet. &#xD;&#xA;&#xD;&#xA;Although I have `Ok(Pays::No.into())` at the end of that `feeless_transfer()` pallet function, I still see a fee on MetaMask..." ContentLicense="CC BY-SA 4.0" />
  <row Id="18590" PostHistoryTypeId="50" PostId="4417" RevisionGUID="55ce89df-6458-4351-8756-02ff33191ca0" CreationDate="2022-09-23T15:08:05.783" UserId="-1" />
  <row Id="18591" PostHistoryTypeId="5" PostId="4925" RevisionGUID="30fa4db4-a37a-4e60-ae0d-00d96c3e0a07" CreationDate="2022-09-23T15:35:15.467" UserId="1959" Comment="added 410 characters in body" Text="First, this is because you're using a non-root account to send the XCM of HRMP request. **You should use sudo or governance to do this.**&#xD;&#xA;If you use a non-root account to call `polkadotXcm.send`, [it will add the `DescendOrigin` instruction as the first instruction](https://github.com/paritytech/polkadot/blob/release-v0.9.26/xcm/pallet-xcm/src/lib.rs#L1068) into your messsage, and then [blocked by rococo `AllowTopLevelPaidExecutionFrom` barrier](https://github.com/paritytech/polkadot/blob/release-v0.9.26/xcm/xcm-builder/src/barriers.rs#L69).&#xD;&#xA;&#xD;&#xA;Then, there are several improvements you need to pay attention to, although they're not releated to `barrier`:&#xD;&#xA;1. You can add a `RefundSurplus` instruction between `Transact` and `DepositAsset`, it can refund your surplus weight for transact.&#xD;&#xA;2. The `beneficiary` of `DepositAsset` should be your sovereign account on rococo, your paraId is 2124, so it should be `{0, X1(Parachain(2124))}`, rather than `Parachain(1000)`. It will put unspent tokens into your sovereign account on rococo.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/W4TcG.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18592" PostHistoryTypeId="2" PostId="4971" RevisionGUID="4f02b374-3ebe-498c-a38b-46eecdcca87b" CreationDate="2022-09-23T16:19:51.083" UserId="3171" Text="I created a motion and want to know when code will be executed?&#xD;&#xA;When all voters voted for motion and someone execute &quot;close&quot; transaction. &#xD;&#xA;Will it be executed immediately? " ContentLicense="CC BY-SA 4.0" />
  <row Id="18594" PostHistoryTypeId="1" PostId="4971" RevisionGUID="4f02b374-3ebe-498c-a38b-46eecdcca87b" CreationDate="2022-09-23T16:19:51.083" UserId="3171" Text="I created a motion and want to know when code will be executed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18595" PostHistoryTypeId="3" PostId="4971" RevisionGUID="4f02b374-3ebe-498c-a38b-46eecdcca87b" CreationDate="2022-09-23T16:19:51.083" UserId="3171" Text="|polkadot|parachain|motion|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18596" PostHistoryTypeId="5" PostId="4929" RevisionGUID="637e61a7-4845-4cfa-b971-0ddd0f345ac6" CreationDate="2022-09-23T16:24:40.830" UserId="2884" Comment="added 167 characters in body" Text="[Link to repo][1]&#xD;&#xA;&#xD;&#xA;I'm trying to do a reserve-backed transfer from statemint to my own parachain of a token minted with the pallet_assets. I've been using the [xcm-emulator][2] that lets me plug in my own runtimes and do tests on them.&#xD;&#xA;&#xD;&#xA;I managed to get this working, except that my parachain doesn't accept this token to pay for execution in the BuyExecution instruction (intended behaviour), so I wanted to also add some DOT tokens on the reserve_transfer_assets pallet call, and specify on the fee_asset_item parameter the index of DOT to use for paying the transaction. It looks something like this:&#xD;&#xA;```rust&#xD;&#xA;	StatemintParachain::execute_with(|| {&#xD;&#xA;		let xcm = StatemintXcmPallet::reserve_transfer_assets(&#xD;&#xA;			statemint_runtime::Origin::signed(ALICE),&#xD;&#xA;			Box::new(MultiLocation{parents: 1, interior: X1(Parachain(2000))}.into()),&#xD;&#xA;			Box::new(X1(Junction::AccountId32 {&#xD;&#xA;				network: NetworkId::Any,&#xD;&#xA;				id: ALICE.into()&#xD;&#xA;			}).into().into()),&#xD;&#xA;			Box::new(vec![&#xD;&#xA;				MultiAsset {&#xD;&#xA;					id: Concrete(X2(PalletInstance(50), GeneralIndex(1)).into()),&#xD;&#xA;					fun: Fungible(500)&#xD;&#xA;				},&#xD;&#xA;				MultiAsset {&#xD;&#xA;					id: Concrete(Parent.into()),&#xD;&#xA;					fun: Fungible(INITIAL_BALANCE/10)&#xD;&#xA;				},&#xD;&#xA;			].into()),&#xD;&#xA;			1,&#xD;&#xA;		);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The problem is that when adding DOT to the assets parameter, there seems to be an XCMP decoding error on the receiving parachain side:&#xD;&#xA;&#xD;&#xA;    Invalid incoming XCMP message data&#xD;&#xA;    thread 'tests::new_fungible_reserve_transfer' panicked at 'Invalid incoming XCMP message data', /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/d08055d/pallets/xcmp-queue/src/lib.rs:679:25&#xD;&#xA;    stack backtrace:&#xD;&#xA;       0: rust_begin_unwind&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5&#xD;&#xA;       1: core::panicking::panic_fmt&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14&#xD;&#xA;       2: cumulus_pallet_xcmp_queue::&lt;impl cumulus_pallet_xcmp_queue::pallet::Pallet&lt;T&gt;&gt;::process_xcmp_message&#xD;&#xA;                 at /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/d08055d/pallets/xcmp-queue/src/lib.rs:679:7&#xD;&#xA;       3: cumulus_pallet_xcmp_queue::&lt;impl cumulus_pallet_xcmp_queue::pallet::Pallet&lt;T&gt;&gt;::service_xcmp_queue&#xD;&#xA;                 at /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/d08055d/pallets/xcmp-queue/src/lib.rs:832:40&#xD;&#xA;       4: cumulus_pallet_xcmp_queue::&lt;impl polkadot_parachain::primitives::XcmpMessageHandler for cumulus_pallet_xcmp_queue::pallet::Pallet&lt;T&gt;&gt;::handle_xcmp_messages&#xD;&#xA;                 at /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/d08055d/pallets/xcmp-queue/src/lib.rs:979:3&#xD;&#xA;       5: &lt;xcm_emulator_example::AcurastParachain as polkadot_parachain::primitives::XcmpMessageHandler&gt;::handle_xcmp_messages::{{closure}}&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:90:28&#xD;&#xA;       6: environmental::using::{{closure}}&#xD;&#xA;                 at /Users/juan/.cargo/registry/src/github.com-1ecc6299db9ec823/environmental-1.1.3/src/lib.rs:125:3&#xD;&#xA;       7: std::thread::local::LocalKey&lt;T&gt;::try_with&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/local.rs:445:16&#xD;&#xA;       8: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/local.rs:421:9&#xD;&#xA;       9: environmental::using&#xD;&#xA;                 at /Users/juan/.cargo/registry/src/github.com-1ecc6299db9ec823/environmental-1.1.3/src/lib.rs:106:2&#xD;&#xA;      10: sp_externalities::scope_limited::ext::using&#xD;&#xA;                 at /Users/juan/.cargo/registry/src/github.com-1ecc6299db9ec823/environmental-1.1.3/src/lib.rs:252:5&#xD;&#xA;      11: sp_externalities::scope_limited::set_and_run_with_externalities&#xD;&#xA;                 at /Users/juan/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/externalities/src/scope_limited.rs:31:2&#xD;&#xA;      12: sp_state_machine::testing::TestExternalities&lt;H&gt;::execute_with&#xD;&#xA;                 at /Users/juan/.cargo/git/checkouts/substrate-7e08433d4c370a21/3348e14/primitives/state-machine/src/testing.rs:196:3&#xD;&#xA;      13: &lt;xcm_emulator_example::AcurastParachain as xcm_emulator::TestExt&gt;::execute_with::{{closure}}&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:230:32&#xD;&#xA;      14: std::thread::local::LocalKey&lt;T&gt;::try_with&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/local.rs:445:16&#xD;&#xA;      15: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/local.rs:421:9&#xD;&#xA;      16: &lt;xcm_emulator_example::AcurastParachain as xcm_emulator::TestExt&gt;::execute_with&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:230:13&#xD;&#xA;      17: &lt;xcm_emulator_example::AcurastParachain as polkadot_parachain::primitives::XcmpMessageHandler&gt;::handle_xcmp_messages&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:90:5&#xD;&#xA;      18: xcm_emulator_example::_process_horizontal_messages&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:381:8&#xD;&#xA;      19: xcm_emulator_example::_process_messages&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:330:5&#xD;&#xA;      20: &lt;xcm_emulator_example::StatemintParachain as xcm_emulator::TestExt&gt;::execute_with&#xD;&#xA;                 at /Users/juan/Desktop/acurast-jobs/xcm-simulator/xcm-emulator/src/lib.rs:272:5&#xD;&#xA;      21: xcm_emulator_example::tests::new_fungible_reserve_transfer&#xD;&#xA;                 at ./src/lib.rs:547:3&#xD;&#xA;      22: xcm_emulator_example::tests::new_fungible_reserve_transfer::{{closure}}&#xD;&#xA;                 at ./src/lib.rs:474:2&#xD;&#xA;      23: core::ops::function::FnOnce::call_once&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:248:5&#xD;&#xA;      24: core::ops::function::FnOnce::call_once&#xD;&#xA;                 at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:248:5&#xD;&#xA;    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.&#xD;&#xA;    &#xD;&#xA;    error: test failed, to rerun pass '--lib'&#xD;&#xA;&#xD;&#xA;I tried instead of sending DOT, to send another minted asset, and that seems to be decoded correctly on the receiving chain. What am I Missing here?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/JuaniRios/xcm-emulator/blob/xcmp-bug/xcm-emulator/xcmp-bug/src/lib.rs#:~:text=fn%20new_fungible_reserve_transfer()%20%7B&#xD;&#xA;  [2]: https://github.com/shaunxw/xcm-simulator/tree/master/xcm-emulator" ContentLicense="CC BY-SA 4.0" />
  <row Id="18597" PostHistoryTypeId="5" PostId="4934" RevisionGUID="436cb45e-b82d-41cb-815d-eb66fcd8bfb2" CreationDate="2022-09-23T16:48:53.277" UserId="3211" Comment="More clarity around my thought process, and specific example of the mentioned consensus process I was referencing from Moonbeam." Text="Currently, working inside the Moonbeam interface and was wondering if it was possible to pull the group of transactions that the Moonbeam collators are sending to the Polkadot Relay Chain before the validators finalize them? &#xD;&#xA;&#xD;&#xA;I got the notion that this would be possible from the line in Coinbase's overview of the Moonbeam Consensus system:&#xD;&#xA;&quot;Collators on Moonbeam and Moonriver collect transactions from the network and submit them to the Relay Chain’s validators to be finalized, and help to secure the chain.&quot;&#xD;&#xA;&#xD;&#xA;I am specifically referencing the collection of transactions that the Collators on both Moonbeam and Moonriver have sent to the Polkadot and Co. relay chains. Is this possible to accomplish through the py-substrate-interface or the polkadot.js interface? Or any correction on my thought process would be greatly appreciated. " ContentLicense="CC BY-SA 4.0" />
  <row Id="18598" PostHistoryTypeId="2" PostId="4972" RevisionGUID="be19c583-24c6-42e2-bfea-f67fba331075" CreationDate="2022-09-23T21:03:10.960" UserId="504" Text="We bumped txver on a testnet when we didn't need to and then dowgraded it, bumping txver again, so testnet is now 2 txvers ahead of `prod`.&#xD;&#xA;&#xD;&#xA;We want to apply the same runtime upgrade as production to that testnet without having to reset it and I believe we would thus have to increment transaction_version by 2 to get the upgrade to apply to both prod and testnet.&#xD;&#xA;&#xD;&#xA;Is this a safe thing to do (considering metadata-sensitive services like indexers)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18600" PostHistoryTypeId="1" PostId="4972" RevisionGUID="be19c583-24c6-42e2-bfea-f67fba331075" CreationDate="2022-09-23T21:03:10.960" UserId="504" Text="Are there negative consequences to bumping `transaction_version` by more than one in a release?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18601" PostHistoryTypeId="3" PostId="4972" RevisionGUID="be19c583-24c6-42e2-bfea-f67fba331075" CreationDate="2022-09-23T21:03:10.960" UserId="504" Text="|runtime|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18602" PostHistoryTypeId="5" PostId="4972" RevisionGUID="980ad180-55d6-4562-be3c-2cc05284ce3b" CreationDate="2022-09-23T21:11:20.983" UserId="504" Comment="added 144 characters in body" Text="We bumped txver on a testnet when we didn't need to and then dowgraded it, bumping txver again, so testnet is now 2 txvers ahead of `prod`.&#xD;&#xA;&#xD;&#xA;We want to apply the runtime upgrade we have ready to both `prod` and this testnet without having to reset it or create two different runtime binaries (with a changed version for the testnet).&#xD;&#xA;I believe we would thus have to increment `transaction_version` by 2 to get the upgrade to apply to both prod and testnet.&#xD;&#xA;&#xD;&#xA;This would skip one `transaction_version` on prod. Is this a safe thing to do (considering metadata-sensitive services like indexers)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18603" PostHistoryTypeId="5" PostId="4972" RevisionGUID="49e7f205-e883-4497-8f94-6813c3009f11" CreationDate="2022-09-23T22:00:32.270" UserId="504" Comment="deleted 3 characters in body" Text="We bumped txver on a testnet when we didn't need to and then dowgraded it, bumping txver again, so testnet is now 2 txvers ahead of `prod`.&#xD;&#xA;&#xD;&#xA;We want to apply the runtime upgrade we have ready to both `prod` and this testnet without having to reset it or create two different runtime wasms (with a changed version for the testnet).&#xD;&#xA;I believe we would thus have to increment `transaction_version` by 2 to get the upgrade to apply to both prod and testnet.&#xD;&#xA;&#xD;&#xA;This would skip one `transaction_version` on prod. Is this a safe thing to do (considering metadata-sensitive services like indexers)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18604" PostHistoryTypeId="4" PostId="4972" RevisionGUID="61c33506-89cc-4c6c-95da-953992d1ef55" CreationDate="2022-09-23T22:53:26.313" UserId="504" Comment="edited title" Text="Negative consequences of bumping `transaction_version` by more than one in a single release?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18605" PostHistoryTypeId="5" PostId="4972" RevisionGUID="61c33506-89cc-4c6c-95da-953992d1ef55" CreationDate="2022-09-23T22:53:26.313" UserId="504" Comment="edited title" Text="We bumped txver on a testnet when we didn't need to and then downgraded it, bumping txver again, so testnet is now 2 txvers ahead of `prod`.&#xD;&#xA;&#xD;&#xA;We want to apply the runtime upgrade we have ready to both `prod` and this testnet without having to reset it or create two different runtime wasms (with a changed version for the testnet).&#xD;&#xA;I believe we would thus have to increment `transaction_version` by 2 to get the upgrade to apply to both prod and testnet.&#xD;&#xA;&#xD;&#xA;This would skip one `transaction_version` on prod. Is this a safe thing to do (considering metadata-sensitive services like indexers)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18606" PostHistoryTypeId="5" PostId="4925" RevisionGUID="fb9d5ff9-83d2-4555-8640-8aba43af641d" CreationDate="2022-09-23T23:23:50.960" UserId="1959" Comment="added 132 characters in body" Text="First, this is because you're using a non-root account to send the XCM of HRMP request. **You should use sudo or governance to do this.**&#xD;&#xA;If you use a non-root account to call `polkadotXcm.send`, [it will add the `DescendOrigin` instruction as the first instruction](https://github.com/paritytech/polkadot/blob/release-v0.9.26/xcm/pallet-xcm/src/lib.rs#L1068) into your messsage, and then [blocked by rococo `AllowTopLevelPaidExecutionFrom` barrier](https://github.com/paritytech/polkadot/blob/release-v0.9.26/xcm/xcm-builder/src/barriers.rs#L69).&#xD;&#xA;&#xD;&#xA;Make sure your sovereign account in the relaychain has sufficient balance to withdraw, otherwise it will `FailedToTransactAsset`&#xD;&#xA;&#xD;&#xA;Then, there are several improvements you need to pay attention to, although they're not releated to `barrier`:&#xD;&#xA;1. You can add a `RefundSurplus` instruction between `Transact` and `DepositAsset`, it can refund your surplus weight for transact.&#xD;&#xA;2. The `beneficiary` of `DepositAsset` should be your sovereign account on rococo, your paraId is 2124, so it should be `{0, X1(Parachain(2124))}`, rather than `Parachain(1000)`. It will put unspent tokens into your sovereign account on rococo.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/W4TcG.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18607" PostHistoryTypeId="2" PostId="4973" RevisionGUID="8887759e-fea5-4ad3-aa5c-19511d6b1f76" CreationDate="2022-09-23T23:26:08.543" UserId="716" Text="I am following [this tutorial](https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/) and when I add this code to my untime/Cargo.toml&#xD;&#xA;```&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;  &quot;codec/std&quot;,&#xD;&#xA;  &quot;scale-info/std&quot;,&#xD;&#xA;  &quot;frame-executive/std&quot;,&#xD;&#xA;  &quot;frame-support/std&quot;,&#xD;&#xA;  &quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;  &quot;frame-system/std&quot;,&#xD;&#xA;  &quot;pallet-aura/std&quot;,&#xD;&#xA;  &quot;pallet-balances/std&quot;,&#xD;&#xA;  &quot;pallet-contracts/std&quot;,&#xD;&#xA;  &quot;pallet-contracts-primitives/std&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;but when I test it out with `cargo check -p node-template-runtime` I get this error:&#xD;&#xA;```&#xD;&#xA;error: failed to load manifest for workspace member `/home/bosr/rust/substrate-node-template/node`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to parse manifest at `/home/bosr/rust/substrate-node-template/node/Cargo.toml`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  feature `std` includes `codec/std`, but `codec` is not a dependency&#xD;&#xA;```&#xD;&#xA;What is the name of the dependency I need to add to make it work?  I tried `codec` but the compiler tells me `error: no matching package named `codec` found`&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18609" PostHistoryTypeId="1" PostId="4973" RevisionGUID="8887759e-fea5-4ad3-aa5c-19511d6b1f76" CreationDate="2022-09-23T23:26:08.543" UserId="716" Text="How to add `codec/std` as a std feature to the substrate-node-template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18610" PostHistoryTypeId="3" PostId="4973" RevisionGUID="8887759e-fea5-4ad3-aa5c-19511d6b1f76" CreationDate="2022-09-23T23:26:08.543" UserId="716" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18611" PostHistoryTypeId="2" PostId="4974" RevisionGUID="a4a203fe-7cbb-4bf5-9ad8-cb2f12a35c64" CreationDate="2022-09-24T01:08:14.040" UserId="2844" Text="By default `codec` dependency exists, if you doesn't find it you can use this&#xD;&#xA;`codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GXOWG.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="18613" PostHistoryTypeId="2" PostId="4975" RevisionGUID="ebea2c2f-2419-4f78-a3bf-f1a72c995299" CreationDate="2022-09-24T02:13:08.100" UserId="3225" Text="Talisman and I are looking into building a simple JS module that helps developers build XCM for transactions and abstract common patterns like cross chain transfers into a simple JS function taking inputs like: `fromParachain, toParachain, assetId, recipient etc.` These functions would then return the XCM object and allow the developer to encode it into hex so that it can be submitted to the network via the `submitExtrinsic` call.&#xD;&#xA;&#xD;&#xA;I am currently working on an example transfer which would allow a user to transfer an asset from one parachain to another. You can see it here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbasilisk-rpc.dwellir.com#/extrinsics/decode/0x34030208000400010200e12e0500000b00e057eb481b0e010004010100411f081300010200e12e050000070010a5d4e80107001c040a5d0d010004000101008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48001c040a5d000000 &#xD;&#xA;&#xD;&#xA;However, I am running into the following difficulties:&#xD;&#xA;&#xD;&#xA;* How does one encode the XCM into hex? I know that this is possible as it is done on the web interface but there is very little insight into how this is actually done in practice. I have tried looking through the web portal's code but it is so abstract. I want to be able to build and encode the XCM I have in the above link. &#xD;&#xA;* XCM itself is not parsable in JavaScript, it looks like JSON but it isn’t. I am struggling to understand how we can formulate such a simple XCM message in JavaScript and then encode it into hex so it can be submitted as a transaction. I know that it is using something called SCALE but I am at a loss as to how to use it and import the types available in XCM v2. &#xD;&#xA;&#xD;&#xA;I am also curious to hear from developers as to whether they believe such a module would be useful for them. I know that it is currently very difficult to make an XCM transaction in polkadot.js so I imagine this would be a very important piece of infrastructure. &#xD;&#xA;&#xD;&#xA;Please help." ContentLicense="CC BY-SA 4.0" />
  <row Id="18615" PostHistoryTypeId="1" PostId="4975" RevisionGUID="ebea2c2f-2419-4f78-a3bf-f1a72c995299" CreationDate="2022-09-24T02:13:08.100" UserId="3225" Text="How to handle XCM encoding and building in JavaScript" ContentLicense="CC BY-SA 4.0" />
  <row Id="18616" PostHistoryTypeId="3" PostId="4975" RevisionGUID="ebea2c2f-2419-4f78-a3bf-f1a72c995299" CreationDate="2022-09-24T02:13:08.100" UserId="3225" Text="|xcm|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18617" PostHistoryTypeId="2" PostId="4976" RevisionGUID="b199b179-7f27-4a36-ab81-d18d82845d47" CreationDate="2022-09-24T03:15:22.840" UserId="3225" Text="I know that similar questions have been asked before but I am not able to resolve this issue with my setup. I am trying to run a basilisk node but keep running into the errors below.&#xD;&#xA;&#xD;&#xA;The error log: &#xD;&#xA;&#xD;&#xA;    error: failed to run custom build command for `basilisk-runtime v75.0.0 (/Users/james/Documents/projects/Basilisk-node/runtime/basilisk)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/Users/james/Documents/projects/Basilisk-node/target/release/build/basilisk-runtime-70afc7cb3e70cae3/build-script-build` (exit status: 1)&#xD;&#xA;      --- stderr&#xD;&#xA;      Rust WASM toolchain not installed, please install it!&#xD;&#xA;    &#xD;&#xA;      Further error information:&#xD;&#xA;      ------------------------------------------------------------&#xD;&#xA;         Compiling wasm-test v1.0.0 (/var/folders/0s/45y2fdk967b8qxthgx6038k00000gn/T/.tmpJBpfH5)&#xD;&#xA;      error[E0463]: can't find crate for `std`&#xD;&#xA;        |&#xD;&#xA;        = note: the `wasm32-unknown-unknown` target may not be installed&#xD;&#xA;        = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`&#xD;&#xA;    &#xD;&#xA;      error: requires `sized` lang_item&#xD;&#xA;    &#xD;&#xA;      For more information about this error, try `rustc --explain E0463`.&#xD;&#xA;      error: could not compile `wasm-test` due to 2 previous errors&#xD;&#xA;      warning: build failed, waiting for other jobs to finish...&#xD;&#xA;      error: cannot find macro `println` in this scope&#xD;&#xA;       --&gt; src/main.rs:3:5&#xD;&#xA;        |&#xD;&#xA;      3 |                 println!(&quot;{}&quot;, env!(&quot;RUSTC_VERSION&quot;));&#xD;&#xA;        |                 ^^^^^^^&#xD;&#xA;    &#xD;&#xA;      error: could not compile `wasm-test` due to 3 previous errors&#xD;&#xA;      ------------------------------------------------------------&#xD;&#xA;    &#xD;&#xA;    make: *** [build] Error 101&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Current setup: &#xD;&#xA;  &#xD;&#xA;    $ rustup show Default host: x86_64-apple-darwin rustup home:  /Users/james/.rustup&#xD;&#xA;    &#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-apple-darwin (default) nightly-2022-02-19-x86_64-apple-darwin nightly-2022-06-19-x86_64-apple-darwin nightly-x86_64-apple-darwin&#xD;&#xA;    1.51.0-x86_64-apple-darwin&#xD;&#xA;    &#xD;&#xA;    installed targets for active toolchain&#xD;&#xA;    --------------------------------------&#xD;&#xA;    &#xD;&#xA;    wasm32-unknown-unknown x86_64-apple-darwin&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    nightly-2022-06-19-x86_64-apple-darwin (overridden by '/Users/james/Documents/projects/Basilisk-node/rust-toolchain') rustc 1.63.0-nightly (21e9336fe 2022-06-18)" ContentLicense="CC BY-SA 4.0" />
  <row Id="18619" PostHistoryTypeId="1" PostId="4976" RevisionGUID="b199b179-7f27-4a36-ab81-d18d82845d47" CreationDate="2022-09-24T03:15:22.840" UserId="3225" Text="Rust WASM toolchain not installed, please install it! -- Basilisk node" ContentLicense="CC BY-SA 4.0" />
  <row Id="18620" PostHistoryTypeId="3" PostId="4976" RevisionGUID="b199b179-7f27-4a36-ab81-d18d82845d47" CreationDate="2022-09-24T03:15:22.840" UserId="3225" Text="|substrate-node|rust|macos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18621" PostHistoryTypeId="2" PostId="4977" RevisionGUID="632d1edf-2c79-4e3a-9683-da550974bdcc" CreationDate="2022-09-24T03:37:42.833" UserId="283" Text="SCALE is a binary encoding format which is described here: https://docs.substrate.io/reference/scale-codec/&#xD;&#xA;&#xD;&#xA;You can use the TypeScript scale library by ParityTech here: https://github.com/paritytech/parity-scale-codec-ts&#xD;&#xA;&#xD;&#xA;There are some examples I'll copy from the repo on encoding and decoding:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import * as $ from &quot;https://deno.land/x/scale/mod.ts&quot;;&#xD;&#xA;&#xD;&#xA;const $person = $.object(&#xD;&#xA;  [&quot;name&quot;, $.str],&#xD;&#xA;  [&quot;nickName&quot;, $.str],&#xD;&#xA;  [&quot;superPower&quot;, $.option($.str)],&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;const valueToEncode = {&#xD;&#xA;  name: &quot;Magdalena&quot;,&#xD;&#xA;  nickName: &quot;Magz&quot;,&#xD;&#xA;  superPower: &quot;Hydrokinesis&quot;,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const encodedBytes: Uint8Array = $person.encode(valueToEncode);&#xD;&#xA;const decodedValue: Person = $person.decode(encodedBytes);&#xD;&#xA;&#xD;&#xA;assertEquals(decodedValue, valueToEncode);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Encoded objects have the type `Uint8Array` which can be converted into hex easily. There are a variety of answers to the question of converting byte arrays to hex strings here: https://stackoverflow.com/questions/39225161/convert-uint8array-into-hex-string-equivalent-in-node-js ." ContentLicense="CC BY-SA 4.0" />
  <row Id="18623" PostHistoryTypeId="5" PostId="4977" RevisionGUID="cbf05c01-cc52-4919-b00a-0c323dbf8ff8" CreationDate="2022-09-24T03:44:12.833" UserId="283" Comment="added 75 characters in body" Text="XCM messages are simply SCALE-encoded according to their specification.&#xD;&#xA;&#xD;&#xA;SCALE is a binary encoding format which is described here: https://docs.substrate.io/reference/scale-codec/&#xD;&#xA;&#xD;&#xA;You can use the TypeScript scale library by ParityTech here: https://github.com/paritytech/parity-scale-codec-ts&#xD;&#xA;&#xD;&#xA;There are some examples I'll copy from the repo on encoding and decoding:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import * as $ from &quot;https://deno.land/x/scale/mod.ts&quot;;&#xD;&#xA;&#xD;&#xA;const $person = $.object(&#xD;&#xA;  [&quot;name&quot;, $.str],&#xD;&#xA;  [&quot;nickName&quot;, $.str],&#xD;&#xA;  [&quot;superPower&quot;, $.option($.str)],&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;const valueToEncode = {&#xD;&#xA;  name: &quot;Magdalena&quot;,&#xD;&#xA;  nickName: &quot;Magz&quot;,&#xD;&#xA;  superPower: &quot;Hydrokinesis&quot;,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const encodedBytes: Uint8Array = $person.encode(valueToEncode);&#xD;&#xA;const decodedValue: Person = $person.decode(encodedBytes);&#xD;&#xA;&#xD;&#xA;assertEquals(decodedValue, valueToEncode);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Encoded objects have the type `Uint8Array` which can be converted into hex easily. There are a variety of answers to the question of converting byte arrays to hex strings here: https://stackoverflow.com/questions/39225161/convert-uint8array-into-hex-string-equivalent-in-node-js ." ContentLicense="CC BY-SA 4.0" />
  <row Id="18624" PostHistoryTypeId="2" PostId="4978" RevisionGUID="b95013a8-1285-4179-90ab-3e9f269a1b69" CreationDate="2022-09-24T05:36:22.913" UserId="251" Text="There are two conditions.&#xD;&#xA;&#xD;&#xA;Once the motion gets closed:&#xD;&#xA;1. If the motion gets enough votes, it will be executed immediately.&#xD;&#xA;2. If the motion doesn't get enough votes, it will be dropped." ContentLicense="CC BY-SA 4.0" />
  <row Id="18626" PostHistoryTypeId="2" PostId="4979" RevisionGUID="2ef91ead-f839-4ff6-928e-cb479213d0ee" CreationDate="2022-09-24T05:40:14.613" UserId="251" Text="This is a Rust question.&#xD;&#xA;&#xD;&#xA;If you want to enable some features of a crate. Apparently, you must ensure you have that crate already.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;# you need to add x first&#xD;&#xA;#&#xD;&#xA;# usually, people enable std feature by default&#xD;&#xA;# so, you probably need to disable the default-features here &#xD;&#xA;x = { version = &quot;0.1.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;# then enable the std here&#xD;&#xA;std = [&quot;x/std&quot;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18628" PostHistoryTypeId="2" PostId="4980" RevisionGUID="3bc3db0d-d6b6-4d00-a223-6d7093e71d6d" CreationDate="2022-09-24T05:50:55.673" UserId="3226" Text="I'm in the process of making a tutorial on how to register a dApp on Shiden Network, for The Kusamarian YouTube channel.&#xD;&#xA;&#xD;&#xA;I went through all the stepd, but at the last one it didn't worked&#xD;&#xA;&#xD;&#xA;Could you please tell me whats wrong. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2INjC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18630" PostHistoryTypeId="1" PostId="4980" RevisionGUID="3bc3db0d-d6b6-4d00-a223-6d7093e71d6d" CreationDate="2022-09-24T05:50:55.673" UserId="3226" Text="dApp registration issue - Shiden Network" ContentLicense="CC BY-SA 4.0" />
  <row Id="18631" PostHistoryTypeId="3" PostId="4980" RevisionGUID="3bc3db0d-d6b6-4d00-a223-6d7093e71d6d" CreationDate="2022-09-24T05:50:55.673" UserId="3226" Text="|polkadot-js|parachain|validation|address|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18632" PostHistoryTypeId="5" PostId="4980" RevisionGUID="66b81c79-8e92-4aed-b032-00c3a8310156" CreationDate="2022-09-24T05:52:27.487" UserId="3226" Comment="deleted 6 characters in body" Text="I'm in the process of making a video tutorial for The Kusamarian YouTube channel :&quot;How to register a dApp on Shiden Network&quot;&#xD;&#xA;&#xD;&#xA;I went through all the steps, but it failed at the end.&#xD;&#xA;&#xD;&#xA;Could you please tell me what's wrong. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2INjC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18633" PostHistoryTypeId="6" PostId="4980" RevisionGUID="acbbb975-3060-4b8c-87eb-a7eec6788c71" CreationDate="2022-09-24T05:54:42.330" UserId="3226" Comment="edited tags" Text="|polkadot-js|astar|validation|address|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18634" PostHistoryTypeId="2" PostId="4981" RevisionGUID="551cb3df-d2b6-4c60-b2cc-9ca48c4f16c1" CreationDate="2022-09-24T07:50:50.230" UserId="3175" Text="You need to be whitelisted to be able to join dApp staking:&#xD;&#xA;Please check the requirements here: https://docs.astar.network/docs/dapp-staking/for-devs/requirements&#xD;&#xA;&#xD;&#xA;Please contact me on Astar Discord if you need more information (Maarten)." ContentLicense="CC BY-SA 4.0" />
  <row Id="18636" PostHistoryTypeId="2" PostId="4982" RevisionGUID="90a8cdab-67b0-4f6c-8c8e-d0b5cec23977" CreationDate="2022-09-24T08:02:05.093" UserId="3175" Text="Now that USDt is released on Statemint, we want to use this in our parachain 'Astar'. It was no problem to send USDt from Tether to Statemint but not possible to sent the asset to another parachain.&#xD;&#xA;&#xD;&#xA;Call data used:&#xD;&#xA;&#xD;&#xA;    0x1f0801010100591f01000101008419a4ac409fa4e7bec032c696c526fac10ff9114d928df56ca0bf9e9ae291490104000002043205011f0082841e000000000000&#xD;&#xA;&#xD;&#xA;Error displayed on PolkadotJS:&#xD;&#xA;&#xD;&#xA;    error: 1000000000: &#xD;&#xA;    FailedToTransactAsset&#xD;&#xA;&#xD;&#xA;We are aware that USDt on Statemint is not set as isSufficients so we have DOT in our wallet to be used as transaction fee. What the difference of `approvals` (see image)?&#xD;&#xA;&#xD;&#xA;[![Statemint vs Statemine][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/FGp75.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18638" PostHistoryTypeId="1" PostId="4982" RevisionGUID="90a8cdab-67b0-4f6c-8c8e-d0b5cec23977" CreationDate="2022-09-24T08:02:05.093" UserId="3175" Text="FailedToTransactAsset when sending USDt from Statemint to another parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="18639" PostHistoryTypeId="3" PostId="4982" RevisionGUID="90a8cdab-67b0-4f6c-8c8e-d0b5cec23977" CreationDate="2022-09-24T08:02:05.093" UserId="3175" Text="|xcm|statemint|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18640" PostHistoryTypeId="2" PostId="4983" RevisionGUID="83a91943-16ce-49d4-ab67-9fb8202732bd" CreationDate="2022-09-24T09:55:20.640" UserId="220" Text="The substrate `/client/*` and `sc-*` code is [licenced under GPL3][1].&#xD;&#xA;&#xD;&#xA;GPL3 contains this clause:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;  **5. Conveying Modified Source Versions.**&#xD;&#xA;&gt;&#xD;&#xA;&gt;  You may convey **a work based on the Program**, or the modifications to produce it from the Program, in the form of source code under the&#xD;&#xA;&gt; terms of section 4, provided that you also meet all of these&#xD;&#xA;&gt; conditions:&#xD;&#xA;&gt; &#xD;&#xA;&gt; a) ..&#xD;&#xA;&gt;&#xD;&#xA;&gt; b) ..&#xD;&#xA;&gt;&#xD;&#xA;&gt; c) You **must license the entire work, as a whole**, under this License to anyone who comes into possession of a copy. This License&#xD;&#xA;&gt; will therefore apply, along with any applicable section 7 additional&#xD;&#xA;&gt; terms, to the whole of the work, and all its parts, regardless of how&#xD;&#xA;&gt; they are packaged. This License gives no permission to license the&#xD;&#xA;&gt; work in any other way, but it does not invalidate such permission if&#xD;&#xA;&gt; you have separately received it.&#xD;&#xA;&gt;&#xD;&#xA;&gt; d) ..&#xD;&#xA;&#xD;&#xA;(Emphasis mine)&#xD;&#xA;&#xD;&#xA;Is the `/client/*` and `sc-*` code fundamental to the operation of a substrate node (seems to be from my reading)?&#xD;&#xA;&#xD;&#xA;Does this mean that if someone uses substrate (with `/client/*` and `sc-*` code) then their entire project must become GPL3? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate#license" ContentLicense="CC BY-SA 4.0" />
  <row Id="18642" PostHistoryTypeId="1" PostId="4983" RevisionGUID="83a91943-16ce-49d4-ab67-9fb8202732bd" CreationDate="2022-09-24T09:55:20.640" UserId="220" Text="Must all code in projects using substrate `/client/*` and `sc-*` code be GPL licenced?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18643" PostHistoryTypeId="3" PostId="4983" RevisionGUID="83a91943-16ce-49d4-ab67-9fb8202732bd" CreationDate="2022-09-24T09:55:20.640" UserId="220" Text="|substrate-node|software-licence|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18644" PostHistoryTypeId="2" PostId="4984" RevisionGUID="adf682c7-773a-44a6-ae80-e9631fbfda8d" CreationDate="2022-09-24T09:56:55.613" UserId="3175" Text="Problem solved!&#xD;&#xA;Because the asset is not set as `isSufficient` the sovereign account of the parachain needs to hold DOT on Statemint to transfer the asset through XCM." ContentLicense="CC BY-SA 4.0" />
  <row Id="18646" PostHistoryTypeId="2" PostId="4985" RevisionGUID="5d72d54c-efe0-4d23-8dee-f65f64dba666" CreationDate="2022-09-24T09:59:21.647" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="18648" PostHistoryTypeId="1" PostId="4985" RevisionGUID="5d72d54c-efe0-4d23-8dee-f65f64dba666" CreationDate="2022-09-24T09:59:21.647" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="18649" PostHistoryTypeId="2" PostId="4986" RevisionGUID="76c02dec-9129-45c8-873a-d09d437097a3" CreationDate="2022-09-24T09:59:21.647" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="18651" PostHistoryTypeId="1" PostId="4986" RevisionGUID="76c02dec-9129-45c8-873a-d09d437097a3" CreationDate="2022-09-24T09:59:21.647" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="18652" PostHistoryTypeId="5" PostId="4983" RevisionGUID="82c60e3d-1d5c-4db6-abc9-db3275032af0" CreationDate="2022-09-24T10:03:36.020" UserId="220" Comment="edited body; edited title" Text="The substrate `/client/*` and `sc-*` code is [licenced under GPL3][1].&#xD;&#xA;&#xD;&#xA;GPL3 contains this clause:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;  **5. Conveying Modified Source Versions.**&#xD;&#xA;&gt;&#xD;&#xA;&gt;  You may convey **a work based on the Program**, or the modifications to produce it from the Program, in the form of source code under the&#xD;&#xA;&gt; terms of section 4, provided that you also meet all of these&#xD;&#xA;&gt; conditions:&#xD;&#xA;&gt; &#xD;&#xA;&gt; a) ..&#xD;&#xA;&gt;&#xD;&#xA;&gt; b) ..&#xD;&#xA;&gt;&#xD;&#xA;&gt; c) You **must license the entire work, as a whole, under this License** to anyone who comes into possession of a copy. This License&#xD;&#xA;&gt; will therefore apply, along with any applicable section 7 additional&#xD;&#xA;&gt; terms, to the whole of the work, and all its parts, regardless of how&#xD;&#xA;&gt; they are packaged. This License gives no permission to license the&#xD;&#xA;&gt; work in any other way, but it does not invalidate such permission if&#xD;&#xA;&gt; you have separately received it.&#xD;&#xA;&gt;&#xD;&#xA;&gt; d) ..&#xD;&#xA;&#xD;&#xA;(Emphasis mine)&#xD;&#xA;&#xD;&#xA;Is the `/client/*` and `sc-*` code fundamental to the operation of a substrate node (seems to be from my reading)?&#xD;&#xA;&#xD;&#xA;Does this mean that if someone uses substrate (with `/client/*` and `sc-*` code) then their entire project must become GPL3? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate#license" ContentLicense="CC BY-SA 4.0" />
  <row Id="18653" PostHistoryTypeId="4" PostId="4983" RevisionGUID="82c60e3d-1d5c-4db6-abc9-db3275032af0" CreationDate="2022-09-24T10:03:36.020" UserId="220" Comment="edited body; edited title" Text="Must all code in projects using substrate /client/* and sc-* code be GPL licenced?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18654" PostHistoryTypeId="5" PostId="4983" RevisionGUID="c2e60c95-d89f-4f30-9cc9-720e12ec93ac" CreationDate="2022-09-24T10:10:56.673" UserId="220" Comment="added 98 characters in body" Text="The substrate `/client/*` and `sc-*` code is [licenced under GPL3][1].&#xD;&#xA;&#xD;&#xA;GPL3 contains this clause (emphasis mine):&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;  **5. Conveying Modified Source Versions.**&#xD;&#xA;&gt;&#xD;&#xA;&gt;  You may convey **a work based on the Program**, or the modifications to produce it from the Program, in the form of source code under the&#xD;&#xA;&gt; terms of section 4, provided that you also meet all of these&#xD;&#xA;&gt; conditions:&#xD;&#xA;&gt; &#xD;&#xA;&gt; a) ..&#xD;&#xA;&gt;&#xD;&#xA;&gt; b) ..&#xD;&#xA;&gt;&#xD;&#xA;&gt; c) You **must license the entire work, as a whole, under this License** to anyone who comes into possession of a copy. This License&#xD;&#xA;&gt; will therefore apply, along with any applicable section 7 additional&#xD;&#xA;&gt; terms, to the whole of the work, and all its parts, regardless of how&#xD;&#xA;&gt; they are packaged. This License gives no permission to license the&#xD;&#xA;&gt; work in any other way, but it does not invalidate such permission if&#xD;&#xA;&gt; you have separately received it.&#xD;&#xA;&gt;&#xD;&#xA;&gt; d) ..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is the `/client/*` and `sc-*` code fundamental to the operation of a substrate node (seems to be from my reading)?&#xD;&#xA;&#xD;&#xA;Does this mean that if someone uses substrate (with `/client/*` and `sc-*` code) then their entire project must become GPL3? &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;See also:&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/594/how-should-we-choose-a-license&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate#license" ContentLicense="CC BY-SA 4.0" />
  <row Id="18655" PostHistoryTypeId="2" PostId="4987" RevisionGUID="e2f1d34e-a3c2-4def-9dc1-ea48232e1c07" CreationDate="2022-09-24T11:54:07.360" UserId="3118" Text="I have a question about the sub-node &quot;Dave&quot;. I have allowed the connection for the sub-node and I can see from the Charlie's node that showing there is a 3 peers, but just only in the next block it turned back to 2 peers. And in the Dave's node, it always shows 0 peers. Any suggestions for that? Thank you!&#xD;&#xA;&#xD;&#xA;Charlie's Node&#xD;&#xA;```&#xD;&#xA;2022-09-24 19:47:12 ✨ Imported #160 (0xbbac…7a03)    &#xD;&#xA;2022-09-24 19:47:16  Idle (3 peers), best: #160 (0xbbac…7a03), finalized #158 (0x3070…d509), ⬇ 2.6kiB/s ⬆ 3.4kiB/s    &#xD;&#xA;2022-09-24 19:47:18 ✨ Imported #161 (0xd746…7a88)    &#xD;&#xA;2022-09-24 19:47:21  Idle (2 peers), best: #161 (0xd746…7a88), finalized #159 (0x41c4…cdfe), ⬇ 1.4kiB/s ⬆ 1.3kiB/s    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18657" PostHistoryTypeId="1" PostId="4987" RevisionGUID="e2f1d34e-a3c2-4def-9dc1-ea48232e1c07" CreationDate="2022-09-24T11:54:07.360" UserId="3118" Text="Authorize specific nodes - Allow connections from a sub-node &quot;Dave&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18658" PostHistoryTypeId="3" PostId="4987" RevisionGUID="e2f1d34e-a3c2-4def-9dc1-ea48232e1c07" CreationDate="2022-09-24T11:54:07.360" UserId="3118" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18659" PostHistoryTypeId="2" PostId="4988" RevisionGUID="3fcba5a9-3d12-4d51-bfd7-66d4d7537bbd" CreationDate="2022-09-24T14:37:20.580" UserId="251" Text="It's totally safe.&#xD;&#xA;&#xD;&#xA;We usually use this to identify if the extrinsic is compatible. A higher version means a new extrinsic specification.&#xD;&#xA;&#xD;&#xA;Just make sure you don't decrease that number.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;More detail:&#xD;&#xA;&gt; https://docs.substrate.io/build/upgrade-the-runtime/&#xD;&#xA;&gt; &#xD;&#xA;&gt; The version of the interface for handling transactions. This parameter can be useful to synchronize firmware updates for hardware wallets or other signing devices to verify that runtime transactions are valid. The parameter allows hardware wallets to know which transactions they can safely sign. This number must be bumped if there is a change in the index of the pallets in the construct_runtime! macro or if there are any changes to dispatchable functions, such as the number of parameters or parameter types. If this number is updated, then the spec_version must also be updated." ContentLicense="CC BY-SA 4.0" />
  <row Id="18661" PostHistoryTypeId="6" PostId="4970" RevisionGUID="503f540e-8df6-4e80-abe0-d47f77819e77" CreationDate="2022-09-24T15:49:04.350" UserId="34" Comment="edited tags" Text="|polkadot-js|aura|ui|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18662" PostHistoryTypeId="10" PostId="2002" RevisionGUID="b02c4c82-87c3-4899-b135-de1cfda2bdc2" CreationDate="2022-09-24T15:53:38.353" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:45,&quot;DisplayName&quot;:&quot;pepyakin&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[1]}" />
  <row Id="18663" PostHistoryTypeId="6" PostId="4850" RevisionGUID="3e555b8f-462e-4abc-9ea3-7b9e2dabb1ea" CreationDate="2022-09-24T15:58:33.753" UserId="2673" Comment="Removed `smart-contract` tag as it doesn't apply" Text="|polkadot-js|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18664" PostHistoryTypeId="24" PostId="4850" RevisionGUID="3e555b8f-462e-4abc-9ea3-7b9e2dabb1ea" CreationDate="2022-09-24T15:58:33.753" Comment="Proposed by 2673 approved by 34 edit id of 287" ContentLicense="CC BY-SA 4.0" />
  <row Id="18665" PostHistoryTypeId="6" PostId="594" RevisionGUID="a7c8c304-ca9d-42ce-adac-7e72668ecd4c" CreationDate="2022-09-24T15:59:30.693" UserId="220" Comment="added software licence tag" Text="|substrate-node|substrate-node-template|software-licence|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18666" PostHistoryTypeId="24" PostId="594" RevisionGUID="a7c8c304-ca9d-42ce-adac-7e72668ecd4c" CreationDate="2022-09-24T15:59:30.693" Comment="Proposed by 220 approved by 34 edit id of 292" ContentLicense="CC BY-SA 4.0" />
  <row Id="18667" PostHistoryTypeId="5" PostId="4957" RevisionGUID="67222122-5985-4f9a-905b-770e4a0bba21" CreationDate="2022-09-24T15:59:42.510" UserId="220" Comment="added 48 characters in body" Text="Questions related to the Substrate SS58 address." ContentLicense="CC BY-SA 4.0" />
  <row Id="18668" PostHistoryTypeId="24" PostId="4957" RevisionGUID="67222122-5985-4f9a-905b-770e4a0bba21" CreationDate="2022-09-24T15:59:42.510" Comment="Proposed by 220 approved by 34 edit id of 289" ContentLicense="CC BY-SA 4.0" />
  <row Id="18669" PostHistoryTypeId="5" PostId="4956" RevisionGUID="fa50c76e-9c21-4ae3-baf8-a2a6af0ea0ec" CreationDate="2022-09-24T15:59:53.730" UserId="220" Comment="added 592 characters in body" Text="&gt; The SS58 address format is a public key address based on the Bitcoin&#xD;&#xA;&gt; Base-58-check encoding. Each Substrate SS58 address uses a base-58&#xD;&#xA;&gt; encoded value to identify a specific account on a specific&#xD;&#xA;&gt; Substrate-based chain. These are represented by a base-58 encoded&#xD;&#xA;&gt; value to identify a specific account on a specific Substrate chain.&#xD;&#xA;&gt; The canonical ss58-registry provide additional details about the&#xD;&#xA;&gt; address format used by different Substrate-based chains, including the&#xD;&#xA;&gt; network prefix and website used for different networks.&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/reference/glossary/" ContentLicense="CC BY-SA 4.0" />
  <row Id="18670" PostHistoryTypeId="24" PostId="4956" RevisionGUID="fa50c76e-9c21-4ae3-baf8-a2a6af0ea0ec" CreationDate="2022-09-24T15:59:53.730" Comment="Proposed by 220 approved by 34 edit id of 288" ContentLicense="CC BY-SA 4.0" />
  <row Id="18671" PostHistoryTypeId="5" PostId="4986" RevisionGUID="fb2e8631-ff0a-4735-b0aa-f0140bc73759" CreationDate="2022-09-24T16:00:06.333" UserId="220" Comment="added 88 characters in body" Text="Questions related to the software licences used in the Substrate and Polkadot ecosystem." ContentLicense="CC BY-SA 4.0" />
  <row Id="18672" PostHistoryTypeId="24" PostId="4986" RevisionGUID="fb2e8631-ff0a-4735-b0aa-f0140bc73759" CreationDate="2022-09-24T16:00:06.333" Comment="Proposed by 220 approved by 34 edit id of 291" ContentLicense="CC BY-SA 4.0" />
  <row Id="18673" PostHistoryTypeId="5" PostId="4905" RevisionGUID="b752f96f-e849-464d-afd0-c9cf02232afd" CreationDate="2022-09-24T16:00:15.013" UserId="2673" Comment="Added JS syntax highlighting" Text="working JS code (thank you @joepetrowski)&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;var validatorAddress = ''; // add your address here&#xD;&#xA;var keys = await api.query.session.nextKeys(validatorAddress);&#xD;&#xA;var keysJson = JSON.parse(JSON.stringify(keys));&#xD;&#xA;// typescript Struct has a .toArray() function&#xD;&#xA;var grandpa = keysJson.grandpa;&#xD;&#xA;var babe = keysJson.babe;&#xD;&#xA;var imOnline = keysJson.imOnline;&#xD;&#xA;var paraValidator = keysJson.paraValidator;&#xD;&#xA;var paraAssignment = keysJson.paraAssignment;&#xD;&#xA;var authorityDiscovery = keysJson.authorityDiscovery;&#xD;&#xA;var keys = [grandpa, babe, imOnline, paraValidator, paraAssignment, authorityDiscovery];&#xD;&#xA;//&#xD;&#xA;var sessionKeys = &quot;0x&quot;;&#xD;&#xA;for (const key of keys) {&#xD;&#xA;  if (key != undefined) {&#xD;&#xA;    sessionKeys += key.replace(/^(0x)/,'');&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;var result = await api.rpc.author.hasSessionKeys(sessionKeys)&#xD;&#xA;console.log(result)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18674" PostHistoryTypeId="24" PostId="4905" RevisionGUID="b752f96f-e849-464d-afd0-c9cf02232afd" CreationDate="2022-09-24T16:00:15.013" Comment="Proposed by 2673 approved by 34 edit id of 286" ContentLicense="CC BY-SA 4.0" />
  <row Id="18675" PostHistoryTypeId="52" PostId="4982" RevisionGUID="548f546e-2ffb-4a3f-8bc7-becfe4550a79" CreationDate="2022-09-24T16:02:13.827" />
  <row Id="18676" PostHistoryTypeId="2" PostId="4989" RevisionGUID="f5734ab6-9d70-40f1-9fa3-361e5ccd09da" CreationDate="2022-09-24T18:38:55.300" UserId="3228" Text="I am trying to convert my solo chain to parachain but I am facing some trouble. First, I ran parachain template as well as the relaychain template of Polkadot and it worked fine. Next, I just copied my pallets from my solo chain to the parachain refered above and built. Then I ran my code and on https://polkadot.js.org/apps I didn't see my custom pallets. I also tried to add more extrinsics of the pallet template but I also did't see it on https://polkadot.js.org/apps. I really appreciate the help from all of you. Thanks very much." ContentLicense="CC BY-SA 4.0" />
  <row Id="18678" PostHistoryTypeId="1" PostId="4989" RevisionGUID="f5734ab6-9d70-40f1-9fa3-361e5ccd09da" CreationDate="2022-09-24T18:38:55.300" UserId="3228" Text="Problem with converting a solo chain to a parachain in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="18679" PostHistoryTypeId="3" PostId="4989" RevisionGUID="f5734ab6-9d70-40f1-9fa3-361e5ccd09da" CreationDate="2022-09-24T18:38:55.300" UserId="3228" Text="|polkadot|parachain|rust|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18680" PostHistoryTypeId="2" PostId="4990" RevisionGUID="1e3f7329-0883-456d-b134-bf79dee8ef49" CreationDate="2022-09-25T01:24:15.617" UserId="2384" Text="An instance is already running a parachain collator node and is producing block.&#xD;&#xA;```&#xD;&#xA;Is collating: yes&#xD;&#xA;[Relaychain]   Local node identity is: 12D3KooWLhkaoFSGV2JfXea1BGTEAv2R5PE4v2b1nHZMo1ZGtXDG&#xD;&#xA;[Relaychain]  Highest known block at #2080175&#xD;&#xA;[Relaychain] Unable to bind RPC server to 127.0.0.1:9934. Trying random port.&#xD;&#xA;[Relaychain] Listening for new connections on 127.0.0.1:8787.&#xD;&#xA;[Parachain]   Local node identity is: 12D3KooWKgc4sx9atvXWksbsVtmHTS8Km48zXVJ1eeMgU1Keuxxx&#xD;&#xA;[Parachain]  Highest known block at #106120&#xD;&#xA;[Parachain] Unable to bind RPC server to 0.0.0.0:9933. Trying random port.&#xD;&#xA;[Parachain] Listening for new connections on 0.0.0.0:8788.&#xD;&#xA;[Relaychain] ✨ Imported #2080176 (0x4198…2361)&#xD;&#xA;[Relaychain] ✨ Imported #2080177 (0x57e4…cbcd)&#xD;&#xA;[Parachain] Starting collation. relay_parent=0x4198af66d84a05fe8d1d27cf8f7df30c694a10033187c104de80df2a491c2361 at=0x8eca06571a2dbef7c6b5c4a7753db8f6d25e62a52304e4163e218b22ebf9597a&#xD;&#xA;Accepted a new tcp connection from 172.31.1.116:36660.&#xD;&#xA;[Relaychain]  Discovered new external address for our node: /ip4/3.xx.xx.53/tcp/7676/ws/p2p/12D3KooWLhkaoFSGV2JfXea1BGTEAv2R5PE4v2b1nHZMo1ZGtxxx&#xD;&#xA;[Parachain] Starting collation. relay_parent=0x57e43d64681b435fe6747815882cec49614ba1016d3d5ddcd3bad72efd74cbcd at=0x8eca06571a2dbef7c6b5c4a7753db8f6d25e62a52304e4163e218b22ebf9597a&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While starting another chain, I used the following as bootnode&#xD;&#xA;```&#xD;&#xA;/ip4/3.xx.xx.53/tcp/7677/ws/p2p/12D3KooWKgc4sx9atvXWksbsVtmHTS8Km48zXVJ1eeMgU1Keuxxx&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Started another node with `--bootnode $BOOTNODE` but this is the part of log which shows only relay chain is connected to peers but not parachain&#xD;&#xA;```&#xD;&#xA;[Relaychain] ✨ Imported #2080239 (0x0e33…c7cd)&#xD;&#xA;[Relaychain]  Idle (13 peers), best: #2080239 (0x0e33…c7cd), finalized #2080236 (0xbcd8…bcd4), ⬇ 27.0kiB/s ⬆ 85.8kiB/s&#xD;&#xA;[Parachain]  Idle (0 peers), best: #0 (0x0de0…a7c2), finalized #0 (0x0de0…a7c2), ⬇ 0 ⬆ 0&#xD;&#xA;[Relaychain] ✨ Imported #2080240 (0x7a79…eebf)&#xD;&#xA;[Relaychain]  Idle (13 peers), best: #2080240 (0x7a79…eebf), finalized #2080236 (0xbcd8…bcd4), ⬇ 12.2kiB/s ⬆ 8.3kiB/s&#xD;&#xA;[Parachain]  Idle (0 peers), best: #0 (0x0de0…a7c2), finalized #0 (0x0de0…a7c2), ⬇ 0 ⬆ 0&#xD;&#xA;[Relaychain]  Idle (13 peers), best: #2080240 (0x7a79…eebf), finalized #2080237 (0xb4e2…fa9a), ⬇ 17.8kiB/s ⬆ 53.9kiB/s&#xD;&#xA;[Relaychain] ✨ Imported #2080241 (0xc61c…72eb)&#xD;&#xA;[Parachain]  Idle (0 peers), best: #0 (0x0de0…a7c2), finalized #0 (0x0de0…a7c2), ⬇ 0 ⬆ 0&#xD;&#xA;[Relaychain]  Idle (13 peers), best: #2080241 (0xc61c…72eb), finalized #2080237 (0xb4e2…fa9a), ⬇ 8.1kiB/s ⬆ 12.4kiB/s&#xD;&#xA;[Relaychain] ✨ Imported #2080242 (0x01d7…88a5)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While relay chain's block are being synced but parachain block is not imported and always stays at genesis block." ContentLicense="CC BY-SA 4.0" />
  <row Id="18682" PostHistoryTypeId="1" PostId="4990" RevisionGUID="1e3f7329-0883-456d-b134-bf79dee8ef49" CreationDate="2022-09-25T01:24:15.617" UserId="2384" Text="Parachain not syncing with peers" ContentLicense="CC BY-SA 4.0" />
  <row Id="18683" PostHistoryTypeId="3" PostId="4990" RevisionGUID="1e3f7329-0883-456d-b134-bf79dee8ef49" CreationDate="2022-09-25T01:24:15.617" UserId="2384" Text="|parachain|parachain-collator|block|bootnode|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18684" PostHistoryTypeId="5" PostId="4987" RevisionGUID="bdb0a588-0354-4d6c-8e02-6ea1cd297ed1" CreationDate="2022-09-25T04:54:00.473" UserId="3118" Comment="added 251 characters in body" Text="I am following the Get Started tutorials &quot;Authorize specific nodes&quot;. I have allowed the connection from the sub-node &quot;Dave&quot; to the parent node &quot;Charlie&quot;, but it seems that the sub-node &quot;Dave&quot; is not connected to &quot;Charlie&quot;.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;I can see from the Charlie's node that showing there is a 3 peers after submit add connection transaction, but just only in the next block it turned back to 2 peers. And in the Dave's node, it always shows 0 peers. Any suggestions for that? Thank you!&#xD;&#xA;&#xD;&#xA;Charlie's Node&#xD;&#xA;```&#xD;&#xA;2022-09-24 19:47:12 ✨ Imported #160 (0xbbac…7a03)    &#xD;&#xA;2022-09-24 19:47:16  Idle (3 peers), best: #160 (0xbbac…7a03), finalized #158 (0x3070…d509), ⬇ 2.6kiB/s ⬆ 3.4kiB/s    &#xD;&#xA;2022-09-24 19:47:18 ✨ Imported #161 (0xd746…7a88)    &#xD;&#xA;2022-09-24 19:47:21  Idle (2 peers), best: #161 (0xd746…7a88), finalized #159 (0x41c4…cdfe), ⬇ 1.4kiB/s ⬆ 1.3kiB/s    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Z8MFQ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18685" PostHistoryTypeId="5" PostId="4989" RevisionGUID="393dac45-9f45-49b2-bd35-870ccb283464" CreationDate="2022-09-25T05:45:48.107" UserId="3228" Comment="added 310 characters in body" Text="I am trying to convert my solo chain to parachain but I am facing some trouble. First, I ran parachain template as well as the relaychain template of Polkadot and it worked fine. Next, I just copied my pallets from my solo chain to the parachain refered above and built. Then I ran my code and on https://polkadot.js.org/apps I didn't see my custom pallets. I also tried to add more extrinsics of the pallet template but I also did't see it on https://polkadot.js.org/apps. I really appreciate the help from all of you. Thanks very much.&#xD;&#xA;&#xD;&#xA;The pallet template that I have added an extrinsic named &quot;do_more&quot;:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This is no change with the pallet template on the website&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hnNqc.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/7IKeq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18686" PostHistoryTypeId="2" PostId="4991" RevisionGUID="687ce799-6cfe-4847-8986-3af0d4e89db7" CreationDate="2022-09-25T06:18:11.770" UserId="3229" Text="I deployed subtrate-node-template on 2 AWS instances after testing successfully on my local machine. I'm trying to add a trusted node to the bootnode, fork from substrate-node-template, but I meet this error:&#xD;&#xA;&#xD;&#xA;    Bootnode with peer id `12D3xxxxxxxx` is on a different chain (our genesis: 0xe5e2…0852 theirs: 0x411d…6454)&#xD;&#xA;&#xD;&#xA;I use **scp** to save that file - customSpecRaw.json - to my machine and upload to the second node. In addition, I check md5sum 2 files with the same hash result.&#xD;&#xA;&#xD;&#xA;Please help me." ContentLicense="CC BY-SA 4.0" />
  <row Id="18688" PostHistoryTypeId="1" PostId="4991" RevisionGUID="687ce799-6cfe-4847-8986-3af0d4e89db7" CreationDate="2022-09-25T06:18:11.770" UserId="3229" Text="Can't add trusted node to the first node" ContentLicense="CC BY-SA 4.0" />
  <row Id="18689" PostHistoryTypeId="3" PostId="4991" RevisionGUID="687ce799-6cfe-4847-8986-3af0d4e89db7" CreationDate="2022-09-25T06:18:11.770" UserId="3229" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18690" PostHistoryTypeId="2" PostId="4992" RevisionGUID="a80365f4-5908-42fd-9928-28675c82409e" CreationDate="2022-09-25T09:51:29.910" UserId="2976" Text="error: failed to load manifest for workspace member `/home/kaioh/dropbox-clone/node`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load manifest for dependency `node-dropbox-runtime`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load manifest for dependency `pallet-dropbox`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to read `/home/kaioh/dropbox-clone/pallets/template/Cargo.toml`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  No such file or directory (os error 2)&#xD;&#xA;&#xD;&#xA;I am trying to create a custom pallet in substrate for a dropbox clone. I forked the substrate node template and tried to edit it to suit what I want to do. I have tried checking through my cargo.toml files for node, runtime and also pallet template and cant find any thing wrong. " ContentLicense="CC BY-SA 4.0" />
  <row Id="18692" PostHistoryTypeId="1" PostId="4992" RevisionGUID="a80365f4-5908-42fd-9928-28675c82409e" CreationDate="2022-09-25T09:51:29.910" UserId="2976" Text="Failed to load manifest for workspace member error" ContentLicense="CC BY-SA 4.0" />
  <row Id="18693" PostHistoryTypeId="3" PostId="4992" RevisionGUID="a80365f4-5908-42fd-9928-28675c82409e" CreationDate="2022-09-25T09:51:29.910" UserId="2976" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18694" PostHistoryTypeId="5" PostId="4992" RevisionGUID="d60f47de-2186-438e-8192-9bb5b03f16d3" CreationDate="2022-09-25T09:52:24.787" UserId="2976" Comment="added 49 characters in body" Text="error: failed to load manifest for workspace member `/home/kaioh/dropbox-clone/node`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load manifest for dependency `node-dropbox-runtime`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load manifest for dependency `pallet-dropbox`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to read `/home/kaioh/dropbox-clone/pallets/template/Cargo.toml`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  No such file or directory (os error 2)&#xD;&#xA;&#xD;&#xA;I am trying to create a custom pallet in substrate for a dropbox clone. I forked the substrate node template and tried to edit it to suit what I want to do. I have tried checking through my cargo.toml files for node, runtime and also pallet template and cant find any thing wrong. Can someone give me any tips on what to look for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18695" PostHistoryTypeId="2" PostId="4993" RevisionGUID="34cf8624-691e-483c-aebb-f959a0d5af1f" CreationDate="2022-09-25T09:57:11.073" UserId="3109" Text="**What is ?**&#xD;&#xA;SS58 is a straightforward address design intended for Substrate based chains. Everything looks great with utilizing other address designs for a chain, however this fills in as a vigorous default.&#xD;&#xA;**Use:**&#xD;&#xA;The fundamental thought is a base-58 encoded esteem that can recognize a particular record on the Substrate chain. Various chains have various method for distinguishing accounts. SS58 is intended to be extensible hence.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18701" PostHistoryTypeId="2" PostId="4995" RevisionGUID="8164104e-6875-4fce-adce-d53252cfb244" CreationDate="2022-09-25T12:36:00.197" UserId="354" Text="I have compiled my code successfully and it is running fine in development mode, when I make the staging environment for the same with 3 nodes the code written inside `#[cfg(feature = &quot;std&quot;)]` is not working properly, means the code inside `#[cfg(feature = &quot;std&quot;)]` is just skipping during runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="18703" PostHistoryTypeId="1" PostId="4995" RevisionGUID="8164104e-6875-4fce-adce-d53252cfb244" CreationDate="2022-09-25T12:36:00.197" UserId="354" Text="Compiled code withe #[cfg(feature = &quot;std&quot;)] and facing issues while setting up staging environment" ContentLicense="CC BY-SA 4.0" />
  <row Id="18704" PostHistoryTypeId="3" PostId="4995" RevisionGUID="8164104e-6875-4fce-adce-d53252cfb244" CreationDate="2022-09-25T12:36:00.197" UserId="354" Text="|substrate-node|polkadot|pallet|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18705" PostHistoryTypeId="2" PostId="4996" RevisionGUID="ac1730fa-1cae-46b5-88a5-685f9340f476" CreationDate="2022-09-25T13:56:00.123" UserId="523" Text="yes, you need to set `Pays::No` as return value for a feeless transaction. And for eip1559 at least `base_fee` is required for gas fee calculation. not sure fully understand what you mean and better add more detail here" ContentLicense="CC BY-SA 4.0" />
  <row Id="18707" PostHistoryTypeId="2" PostId="4997" RevisionGUID="2aeb0063-023b-48c3-8d67-9c37c7d77d4b" CreationDate="2022-09-25T15:07:45.460" UserId="2340" Text="In my pallet I use the `pallet_balances`, through loose coupling via trait `Currency`.&#xD;&#xA;I use `T::Currency::transfer` in my `on_initialize` hook. In this hook I'm supposed to keep track of the weight I'm consuming, and return it at the end of the hook call.&#xD;&#xA;&#xD;&#xA;I know that the weight for a call to `Balances::transfer` is set to:&#xD;&#xA;```rust&#xD;&#xA;// Storage: System Account (r:1 w:1)&#xD;&#xA;	fn transfer() -&gt; Weight {&#xD;&#xA;		(41_860_000 as Weight)&#xD;&#xA;			.saturating_add(T::DbWeight::get().reads(1 as Weight))&#xD;&#xA;			.saturating_add(T::DbWeight::get().writes(1 as Weight))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;because I looked at it in the pallet `weight.rs` file.&#xD;&#xA;&#xD;&#xA;What I want to do is access this value in my hook, so I can increase my weight counter and return an accurate measurement of what I used.&#xD;&#xA;&#xD;&#xA;How can I achieve this? Where is the data available?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18709" PostHistoryTypeId="1" PostId="4997" RevisionGUID="2aeb0063-023b-48c3-8d67-9c37c7d77d4b" CreationDate="2022-09-25T15:07:45.460" UserId="2340" Text="How can I access another pallet extrinsic WeightInfo" ContentLicense="CC BY-SA 4.0" />
  <row Id="18710" PostHistoryTypeId="3" PostId="4997" RevisionGUID="2aeb0063-023b-48c3-8d67-9c37c7d77d4b" CreationDate="2022-09-25T15:07:45.460" UserId="2340" Text="|weight|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18711" PostHistoryTypeId="2" PostId="4998" RevisionGUID="417ce92e-6b8d-4837-ad41-499e54271464" CreationDate="2022-09-25T15:29:17.753" UserId="3231" Text="I have StorageDoubleMap for ERC1155 balances u32 -&gt; AccountId -&gt; u32; &#xD;&#xA;How can i mutate this map like &quot;balances[1][SomeAccountId] -= 4&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18713" PostHistoryTypeId="1" PostId="4998" RevisionGUID="417ce92e-6b8d-4837-ad41-499e54271464" CreationDate="2022-09-25T15:29:17.753" UserId="3231" Text="How can i mutate value in StorageDoubleMap" ContentLicense="CC BY-SA 4.0" />
  <row Id="18714" PostHistoryTypeId="3" PostId="4998" RevisionGUID="417ce92e-6b8d-4837-ad41-499e54271464" CreationDate="2022-09-25T15:29:17.753" UserId="3231" Text="|pallet|substrate-node-template|storage|frame|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18715" PostHistoryTypeId="2" PostId="4999" RevisionGUID="38044e6c-52a1-475d-bbb4-60bbfda3ea2e" CreationDate="2022-09-25T19:00:45.910" UserId="3127" Text="Generally, you would use this syntax of [try_mutate][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/frame-support/3.0.0/frame_support/storage/trait.StorageDoubleMap.html#tymethod.try_mutate&#xD;&#xA;&#xD;&#xA;similar to e.g.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&lt;Balances&lt;T&gt;&gt;::try_mutate(&amp;asset_id, &amp;owner, |balance| {&#xD;&#xA;    balance -= 4;&#xD;&#xA;	Ok(())&#xD;&#xA;})&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18717" PostHistoryTypeId="5" PostId="4999" RevisionGUID="fbe9773f-298e-4415-9146-fe0bcd0a334a" CreationDate="2022-09-25T19:06:16.637" UserId="3127" Comment="added 1 character in body" Text="Generally, you would use this syntax of [try_mutate][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/frame-support/3.0.0/frame_support/storage/trait.StorageDoubleMap.html#tymethod.try_mutate&#xD;&#xA;&#xD;&#xA;similar to e.g.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&lt;Balances&lt;T&gt;&gt;::try_mutate(&amp;asset_id, &amp;owner, |balance| {&#xD;&#xA;    *balance -= 4;&#xD;&#xA;	Ok(())&#xD;&#xA;})&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18718" PostHistoryTypeId="2" PostId="5000" RevisionGUID="c4046b99-f0f9-4e99-bd48-e3c021a19434" CreationDate="2022-09-25T19:46:06.707" UserId="2976" Text="Apparently in my runtime/Cargo.toml, I had not changed the path from the default which is &quot;../pallets/template&quot; to &quot;../pallets/dropbox&quot; and pallets/dropbox was declared twice under std features. Doing this fixed my issues." ContentLicense="CC BY-SA 4.0" />
  <row Id="18720" PostHistoryTypeId="50" PostId="4460" RevisionGUID="a6ab0f69-67bf-44ec-86f8-fb66f043319e" CreationDate="2022-09-25T20:07:05.790" UserId="-1" />
  <row Id="18721" PostHistoryTypeId="2" PostId="5001" RevisionGUID="379d5323-12c7-48bd-8ece-dcbef57c0a5c" CreationDate="2022-09-25T20:12:20.773" UserId="304" Text="Usually this error means that something isn't formatted correctly in the cargo.toml file I think, or you have some dependency listed that doesn't exist or you gave the wrong folder path to it. Also related to this stuff, you should make sure the version of polkadot you are using is the same for everything. Don't just look in the file, search your whole project to see if you missed updating a dependency to the same version as everything else. If you miss even 1, it probably won't compile." ContentLicense="CC BY-SA 4.0" />
  <row Id="18723" PostHistoryTypeId="2" PostId="5002" RevisionGUID="d51d31e6-a575-4cfb-a8cc-051eacdf455c" CreationDate="2022-09-25T22:00:32.140" UserId="28" Text="To extend Lana's answer, you can just use `mutate` in the case that your operation is infallible:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&lt;Balances&lt;T&gt;&gt;::mutate(&amp;asset_id, &amp;owner, |balance| {&#xD;&#xA;    *balance = balance.saturating_sub(4);&#xD;&#xA;})" ContentLicense="CC BY-SA 4.0" />
  <row Id="18725" PostHistoryTypeId="2" PostId="5003" RevisionGUID="31173f86-6276-4f0b-82bf-c6b0e418f613" CreationDate="2022-09-25T22:05:09.233" UserId="28" Text="You should simply write a benchmark for your `on_initialize` hook, which when executed, will also run the appropriate balance transfers, and automatically add their weight into your final weight output.&#xD;&#xA;&#xD;&#xA;This is the same for any pallet hook you use, since benchmarks simply execute the written code, any of those hooks should execute and be measured as a part of the benchmarking process." ContentLicense="CC BY-SA 4.0" />
  <row Id="18728" PostHistoryTypeId="2" PostId="5004" RevisionGUID="9a47f563-ab1d-4238-91dd-54c1cd776a5c" CreationDate="2022-09-25T22:16:27.457" UserId="28" Text="The problem here is probably that you have added your new pallets, but have not properly reset or upgraded your chain.&#xD;&#xA;&#xD;&#xA;The easiest thing to do is make sure to reset your chain with the latest build. So:&#xD;&#xA;&#xD;&#xA;1. Rebuild your node with the new runtime code: `cargo build --release`&#xD;&#xA;2. Run `./target/release/template-parachain purge-chain --dev`&#xD;&#xA;3. Run `./target/release/template-parachain --dev`&#xD;&#xA;&#xD;&#xA;You might need to adjust the commands based on how you run your node, but the main idea is to `purge-chain` and run the latest binary with the latest code." ContentLicense="CC BY-SA 4.0" />
  <row Id="18730" PostHistoryTypeId="50" PostId="4472" RevisionGUID="cb695cb3-ea49-4afb-b8d5-4843d6e67e5e" CreationDate="2022-09-25T23:00:45.117" UserId="-1" />
  <row Id="18731" PostHistoryTypeId="2" PostId="5005" RevisionGUID="cc3aebc1-185c-4061-859d-00915c15fb5e" CreationDate="2022-09-25T23:03:13.820" UserId="28" Text="This is not currently possible, and something I might not encourage anyway due to the intended deterministic nature of the runtime.&#xD;&#xA;&#xD;&#xA;You can see here we have had a similar need, and there is note that this is not handled yet:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L371&#xD;&#xA;&#xD;&#xA;If this is a feature you think is needed, please [open an issue on Substrate](https://github.com/paritytech/substrate/issues/new/choose), and describe how you would like to use this feature." ContentLicense="CC BY-SA 4.0" />
  <row Id="18733" PostHistoryTypeId="5" PostId="4976" RevisionGUID="3747a456-cb21-4798-9588-47dea72d128f" CreationDate="2022-09-26T01:12:37.483" UserId="3225" Comment="add step by step details" Text="I know that similar questions have been asked before but I am not able to resolve this issue with my setup. I am trying to run a basilisk node but keep running into the errors below.&#xD;&#xA;&#xD;&#xA;The error log: &#xD;&#xA;&#xD;&#xA;    error: failed to run custom build command for `basilisk-runtime v75.0.0 (/Users/james/Documents/projects/Basilisk-node/runtime/basilisk)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/Users/james/Documents/projects/Basilisk-node/target/release/build/basilisk-runtime-70afc7cb3e70cae3/build-script-build` (exit status: 1)&#xD;&#xA;      --- stderr&#xD;&#xA;      Rust WASM toolchain not installed, please install it!&#xD;&#xA;    &#xD;&#xA;      Further error information:&#xD;&#xA;      ------------------------------------------------------------&#xD;&#xA;         Compiling wasm-test v1.0.0 (/var/folders/0s/45y2fdk967b8qxthgx6038k00000gn/T/.tmpJBpfH5)&#xD;&#xA;      error[E0463]: can't find crate for `std`&#xD;&#xA;        |&#xD;&#xA;        = note: the `wasm32-unknown-unknown` target may not be installed&#xD;&#xA;        = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`&#xD;&#xA;    &#xD;&#xA;      error: requires `sized` lang_item&#xD;&#xA;    &#xD;&#xA;      For more information about this error, try `rustc --explain E0463`.&#xD;&#xA;      error: could not compile `wasm-test` due to 2 previous errors&#xD;&#xA;      warning: build failed, waiting for other jobs to finish...&#xD;&#xA;      error: cannot find macro `println` in this scope&#xD;&#xA;       --&gt; src/main.rs:3:5&#xD;&#xA;        |&#xD;&#xA;      3 |                 println!(&quot;{}&quot;, env!(&quot;RUSTC_VERSION&quot;));&#xD;&#xA;        |                 ^^^^^^^&#xD;&#xA;    &#xD;&#xA;      error: could not compile `wasm-test` due to 3 previous errors&#xD;&#xA;      ------------------------------------------------------------&#xD;&#xA;    &#xD;&#xA;    make: *** [build] Error 101&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Current setup: &#xD;&#xA;  &#xD;&#xA;    $ rustup show &#xD;&#xA;    Default host: x86_64-apple-darwin rustup home:  /Users/james/.rustup&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-apple-darwin (default) nightly-2022-02-19-x86_64-apple-darwin nightly-2022-06-19-x86_64-apple-darwin nightly-x86_64-apple-darwin&#xD;&#xA;    1.51.0-x86_64-apple-darwin&#xD;&#xA;    &#xD;&#xA;    installed targets for active toolchain&#xD;&#xA;    --------------------------------------&#xD;&#xA;    &#xD;&#xA;    wasm32-unknown-unknown x86_64-apple-darwin&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    nightly-2022-06-19-x86_64-apple-darwin (overridden by '/Users/james/Documents/projects/Basilisk-node/rust-toolchain') rustc 1.63.0-nightly (21e9336fe 2022-06-18)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What I did step by step:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA; 1. To ensure my installation of rust is clean, I uninstall it with `$ rustup self uninstall`&#xD;&#xA;&#xD;&#xA; 2. I install substrate and the rust tools via `$ curl https://getsubstrate.io -sSf | bash -s -- --fast` as per the instructions in https://github.com/galacticcouncil/Basilisk-node&#xD;&#xA;&#xD;&#xA;3. I run `make build` on the Basilisk node and it complains with the error above. I note that it says `wasm32-unknown-unknown` is not installed so I install it with `rustup target add wasm32-unknown-unknown`&#xD;&#xA;4. `make build` still errors with the above error&#xD;&#xA;&#xD;&#xA;New rustup configuration: &#xD;&#xA;&#xD;&#xA;    $ rustup show&#xD;&#xA;    &#xD;&#xA;    Default host: x86_64-apple-darwin&#xD;&#xA;    rustup home:  /Users/jamessangalli/.rustup&#xD;&#xA;    &#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-apple-darwin (default)&#xD;&#xA;    nightly-2022-06-19-x86_64-apple-darwin&#xD;&#xA;    nightly-x86_64-apple-darwin&#xD;&#xA;    &#xD;&#xA;    installed targets for active toolchain&#xD;&#xA;    --------------------------------------&#xD;&#xA;    &#xD;&#xA;    wasm32-unknown-unknown&#xD;&#xA;    x86_64-apple-darwin&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    nightly-2022-06-19-x86_64-apple-darwin (overridden by '/Users/jamessangalli/Documents/projects/Basilisk-node/rust-toolchain')&#xD;&#xA;    rustc 1.63.0-nightly (21e9336fe 2022-06-18)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18734" PostHistoryTypeId="2" PostId="5006" RevisionGUID="3c871859-ffed-437d-be7e-63754605eb6f" CreationDate="2022-09-26T02:51:43.647" UserId="251" Text="It's always good to search in the Substrate repository first.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[`/frame/im-online/src/lib.rs::mutate`](https://github.com/paritytech/substrate/blob/badc92ac20dbf006595a6af9418da9942527cbd7/frame/im-online/src/lib.rs#L647-L651)&#xD;&#xA;```rust&#xD;&#xA;AuthoredBlocks::&lt;T&gt;::mutate(&amp;current_session, author, |authored| *authored += 1);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[`/frame/assets/src/lib.rs::try_mutate`](https://github.com/paritytech/substrate/blob/badc92ac20dbf006595a6af9418da9942527cbd7/frame/assets/src/lib.rs#L789-L792)&#xD;&#xA;```rust&#xD;&#xA;Account::&lt;T, I&gt;::try_mutate(id, &amp;who, |maybe_account| -&gt; DispatchResult {&#xD;&#xA;	maybe_account.as_mut().ok_or(Error::&lt;T, I&gt;::NoAccount)?.is_frozen = true;&#xD;&#xA;	Ok(())&#xD;&#xA;})?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;There are still a lot of examples. Check the Substrate repository." ContentLicense="CC BY-SA 4.0" />
  <row Id="18736" PostHistoryTypeId="5" PostId="4998" RevisionGUID="ee0f9592-42ed-4667-8de1-b08e90df4831" CreationDate="2022-09-26T02:53:31.460" UserId="251" Comment="added 6 characters in body; edited title" Text="I have `StorageDoubleMap` for `ERC1155 balances u32 -&gt; AccountId -&gt; u32`;&#xD;&#xA; &#xD;&#xA;How can I mutate this map like `balances[1][SomeAccountId] -= 4`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18737" PostHistoryTypeId="4" PostId="4998" RevisionGUID="ee0f9592-42ed-4667-8de1-b08e90df4831" CreationDate="2022-09-26T02:53:31.460" UserId="251" Comment="added 6 characters in body; edited title" Text="How to mutate a `StorageDoubleMap` value?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18738" PostHistoryTypeId="2" PostId="5007" RevisionGUID="eac2e23f-b50f-4c3d-b481-76ab5d23c52f" CreationDate="2022-09-26T04:53:44.020" UserId="233" Text="Yes, any project that uses GPL3 licensed code (i.e. is a &quot;derivative work&quot;) must in turn be GPL3 licensed. The exact definition of what constitutes a &quot;derivative work&quot; has not been thoroughly tested in courts, but the most common understanding is that linking your own code with GPL3 code means that your own code must also be GPL3. Put differently, if your project can be distributed separately from `/client/*` and `sc-*` then it would *not* be required to be GPL3 but I don't see how that is possible in Rust today.&#xD;&#xA;&#xD;&#xA;This property of GPL is why it is often referred to as a &quot;viral&quot; license: it propagates." ContentLicense="CC BY-SA 4.0" />
  <row Id="18741" PostHistoryTypeId="2" PostId="5008" RevisionGUID="534b51ca-2ab0-4b56-b49d-e7b190f00f35" CreationDate="2022-09-26T05:49:06.607" UserId="354" Text="I have a piece of code written in `std`, and it is bypassing/not-included in runtime as it should work but I want to use it in runtime environment, is there a way to use it. As the code written in `std` will not compile with native substrate `no_std` build. &#xD;&#xA;&#xD;&#xA;Basically code is parsing a json and storing its key value in a `StorageMap` which we will get during runtime and it is a dynamic value which will change after every era. &#xD;&#xA;&#xD;&#xA;Piece of code is as follows:&#xD;&#xA;&#xD;&#xA;    #[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]&#xD;&#xA;		pub fn esg_score(origin: OriginFor&lt;T&gt;, json_data: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;			let signer = ensure_signed(origin)?;&#xD;&#xA;            #[cfg(feature = &quot;std&quot;)]&#xD;&#xA;        	let parseAndStoreData = |jsonStr: &amp;str| {&#xD;&#xA;        		let parsed: ListOfScores = serde_json::from_str(jsonStr).unwrap()&#xD;&#xA;    			for item in parsed.0 {&#xD;&#xA;    				&lt;GetScore::&lt;T&gt;&gt;::insert(item.account.clone(), item.score);&#xD;&#xA;    			}&#xD;&#xA;    				    			&#xD;&#xA;    			#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;    			parseAndStoreEsgData(&amp;String::from_utf8_lossy(&amp;json_data[..])[..]);			&#xD;&#xA;    			Self::deposit_event(Event::Stored(json_data, signer.clone()));&#xD;&#xA;    			Ok(())&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18743" PostHistoryTypeId="1" PostId="5008" RevisionGUID="534b51ca-2ab0-4b56-b49d-e7b190f00f35" CreationDate="2022-09-26T05:49:06.607" UserId="354" Text="How to use code written in `std` in `no_std` during runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18744" PostHistoryTypeId="3" PostId="5008" RevisionGUID="534b51ca-2ab0-4b56-b49d-e7b190f00f35" CreationDate="2022-09-26T05:49:06.607" UserId="354" Text="|substrate-node|pallet|rust|json|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18745" PostHistoryTypeId="2" PostId="5009" RevisionGUID="85748e11-97d3-4811-8dc3-90ef5f968c3e" CreationDate="2022-09-26T07:24:09.947" UserId="251" Text="With `--execution native`, you can force your node to run in native mode. If the local `spec_version` match with the on-chain `spec_version`, some code will be executed in native mode automatically.&#xD;&#xA;&#xD;&#xA;But there are a few things you need to know:&#xD;&#xA;1. the code must be no side-effect on the result&#xD;&#xA;2. your native node must compile from the latest runtime version code, different runtime versions might have different wasm code&#xD;&#xA;3. once the chain gets runtime upgrade, you should upgrade your native node or don't use the native mode&#xD;&#xA;&#xD;&#xA;Generally, the std code is some logging code. It doesn't affect the execution result.&#xD;&#xA;&#xD;&#xA;All in all, you must not get two different results between native and wasm env. Otherwise, this will cause a consensus problem." ContentLicense="CC BY-SA 4.0" />
  <row Id="18747" PostHistoryTypeId="2" PostId="5010" RevisionGUID="d6226945-2df2-4f7e-9ba9-6c848abdc961" CreationDate="2022-09-26T07:29:52.780" UserId="251" Text="Check my previous answer: https://substrate.stackexchange.com/questions/4995/compiled-code-withe-cfgfeature-std-and-facing-issues-while-setting-up-s&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You should transform that code/lib to `no_std`.&#xD;&#xA;&#xD;&#xA;For your example, `String` is a `Vec` actually. You should use the `Vec&lt;u8&gt;` directly.&#xD;&#xA;&#xD;&#xA;If you want to play with JSON object, I think there are some crates that provide a `json::from_bytes(&amp;json_data)` method.&#xD;&#xA;&#xD;&#xA;- [`serde_json` no-std support](https://github.com/serde-rs/json#no-std-support)" ContentLicense="CC BY-SA 4.0" />
  <row Id="18749" PostHistoryTypeId="2" PostId="5011" RevisionGUID="62aaeb36-cd81-48b7-b037-b5c102201799" CreationDate="2022-09-26T07:37:32.483" UserId="251" Text="I think that is impossible.&#xD;&#xA;&#xD;&#xA;Some nodes even run in a private network address.&#xD;&#xA;&#xD;&#xA;How did you identify that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18752" PostHistoryTypeId="2" PostId="5012" RevisionGUID="31ba364a-317e-469b-b1aa-5e6e3d044eca" CreationDate="2022-09-26T08:35:35.693" UserId="2762" Text="After this last step: Allow connections to the sub-node stop Dave node, and restart it:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --chain=local \&#xD;&#xA;    --base-path /tmp/validator4 \&#xD;&#xA;    --name dave \&#xD;&#xA;    --node-key=a99331ff4f0e0a0434a6263da0a5823ea3afcfffe590c9f3014e6cf620f2b19a \&#xD;&#xA;    --port 30336 \&#xD;&#xA;    --ws-port 9947 \&#xD;&#xA;    --offchain-worker always&#xD;&#xA;&#xD;&#xA;You should see now it connected in Charlie's node:&#xD;&#xA;&#xD;&#xA;    2022-09-26 10:31:30  Idle (2 peers), best: #123 (0x447b…0998), finalized #120 (0x5985…a18c), ⬇ 1.4kiB/s ⬆ 1.3kiB/s    &#xD;&#xA;    2022-09-26 10:31:35  Idle (3 peers), best: #123 (0x447b…0998), finalized #121 (0xa6d6…b261), ⬇ 2.2kiB/s ⬆ 5.0kiB/s    &#xD;&#xA;    2022-09-26 10:31:36 ✨ Imported #124 (0x19f9…4eb4)    &#xD;&#xA;    2022-09-26 10:31:40  Idle (3 peers), best: #124 (0x19f9…4eb4), finalized #122 (0x277f…14b0), ⬇ 1.9kiB/s ⬆ 2.1kiB/s &#xD;&#xA;&#xD;&#xA;And in Dave's node:&#xD;&#xA;&#xD;&#xA;    2022-09-26 10:31:36 ✨ Imported #124 (0x19f9…4eb4)    &#xD;&#xA;    2022-09-26 10:31:39  Idle (1 peers), best: #124 (0x19f9…4eb4), finalized #122 (0x277f…14b0), ⬇ 4.9kiB/s ⬆ 1.6kiB/s &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18754" PostHistoryTypeId="5" PostId="5012" RevisionGUID="e48d4986-31b1-4e21-b43f-6ce82582ed86" CreationDate="2022-09-26T08:41:49.050" UserId="2762" Comment="added 16 characters in body" Text="After this last step: Allow connections to the sub-node yo have to stop Dave node, and then restart it:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --chain=local \&#xD;&#xA;    --base-path /tmp/validator4 \&#xD;&#xA;    --name dave \&#xD;&#xA;    --node-key=a99331ff4f0e0a0434a6263da0a5823ea3afcfffe590c9f3014e6cf620f2b19a \&#xD;&#xA;    --port 30336 \&#xD;&#xA;    --ws-port 9947 \&#xD;&#xA;    --offchain-worker always&#xD;&#xA;&#xD;&#xA;You should see now it connected in Charlie's node:&#xD;&#xA;&#xD;&#xA;    2022-09-26 10:31:30  Idle (2 peers), best: #123 (0x447b…0998), finalized #120 (0x5985…a18c), ⬇ 1.4kiB/s ⬆ 1.3kiB/s    &#xD;&#xA;    2022-09-26 10:31:35  Idle (3 peers), best: #123 (0x447b…0998), finalized #121 (0xa6d6…b261), ⬇ 2.2kiB/s ⬆ 5.0kiB/s    &#xD;&#xA;    2022-09-26 10:31:36 ✨ Imported #124 (0x19f9…4eb4)    &#xD;&#xA;    2022-09-26 10:31:40  Idle (3 peers), best: #124 (0x19f9…4eb4), finalized #122 (0x277f…14b0), ⬇ 1.9kiB/s ⬆ 2.1kiB/s &#xD;&#xA;&#xD;&#xA;And in Dave's node:&#xD;&#xA;&#xD;&#xA;    2022-09-26 10:31:36 ✨ Imported #124 (0x19f9…4eb4)    &#xD;&#xA;    2022-09-26 10:31:39  Idle (1 peers), best: #124 (0x19f9…4eb4), finalized #122 (0x277f…14b0), ⬇ 4.9kiB/s ⬆ 1.6kiB/s &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18755" PostHistoryTypeId="2" PostId="5013" RevisionGUID="86493c2f-ee97-4bc5-a38c-414d85a0eefd" CreationDate="2022-09-26T09:07:30.177" UserId="53" Text="Any software distributed which builds upon the Substrate Client part of the codebase must have its source code published as per GPLv3.&#xD;&#xA;&#xD;&#xA;Substrate Frame and the Substrate Primitives are licensed under Apache, implying that software building upon only those (and not relying on changes to the Substrate Client) would not need to have its source code published.&#xD;&#xA;&#xD;&#xA;Basically, if you're just using Substrate to launch your own chain with some new business logic in the runtime, then you're under the very permissive Apache license. However, if you're making underlying improvements to the internals of Substrate then they should make their way back into the Substrate community.&#xD;&#xA;&#xD;&#xA;Currently when altering the runtime, you do generally need to rebuild a binary which includes both the new runtime and the old client code, potentially implying the creation of what the GPL calls a &quot;derivate work&quot;. This is legally untested and in this case I personally would probably argue otherwise since the runtime essentially functions as an &quot;input programme&quot; to the client, in much the same way as an interpreter accepts code to run without it being considered a derivative work." ContentLicense="CC BY-SA 4.0" />
  <row Id="18757" PostHistoryTypeId="2" PostId="5014" RevisionGUID="24742f54-d1db-4777-91bf-a43ecbb31f92" CreationDate="2022-09-26T09:43:55.177" UserId="298" Text="It seems we have found what the problem could be. There is a problem for Mac M1/M2 chips related to port forwarding with Docker. &#xD;&#xA;&#xD;&#xA;https://forums.docker.com/t/port-forward-not-working-on-a-macos-installation-but-works-on-others/77401/6" ContentLicense="CC BY-SA 4.0" />
  <row Id="18759" PostHistoryTypeId="2" PostId="5015" RevisionGUID="12b90ca0-0c2e-4ca1-b22e-853d359251c3" CreationDate="2022-09-26T09:48:04.720" UserId="94" Text="You can use a config variable like `EnableFeatureX` and then require that to be true in the Extrinsic.  &#xD;&#xA;This should be a safer way of archiving what you want since you are not reliant on rust features, which must be handled carefully to fulfill their objective.  &#xD;&#xA;The extrinsic ordering also stays the same in this approach, allowing you to re-use metadata definitions." ContentLicense="CC BY-SA 4.0" />
  <row Id="18761" PostHistoryTypeId="2" PostId="5016" RevisionGUID="95f7bdbf-7f8d-4bcd-a5e3-a176a01d4b76" CreationDate="2022-09-26T10:05:25.040" UserId="94" Text="The [init script](https://github.com/galacticcouncil/Basilisk-node/blob/00ce0a3cbfc03a2eecdeebd55950b5657ad830f8/scripts/init.sh) specifically mentions to install wasm for the nightly toolchain. So you could try:  &#xD;&#xA;```bash&#xD;&#xA;rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18764" PostHistoryTypeId="2" PostId="5017" RevisionGUID="67918e85-887a-4738-93b0-b0e693385a1d" CreationDate="2022-09-26T13:07:23.403" UserId="426" Text="I've noticed that `ShouldExecute` implementation for `AllowTopLevelPaidExecutionFrom`([here][1]) doesn't allow execution of XCM if it starts with `DescendOrigin` instruction. This will always be the case when `xcm-&gt;send(...)` is used by non-sovereign account. I haven't executed **xcm-&gt;send** without *sudo* until recently so this little bit has eluded me so far.&#xD;&#xA;&#xD;&#xA;I'd like to understand if this is intentional or not - is there a known security risk of allowing such execution type?&#xD;&#xA;&#xD;&#xA;I cannot think of any issue since user can only manipulate origin either by clearing it or descending it further.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/xcm/xcm-builder/src/barriers.rs#L56" ContentLicense="CC BY-SA 4.0" />
  <row Id="18766" PostHistoryTypeId="1" PostId="5017" RevisionGUID="67918e85-887a-4738-93b0-b0e693385a1d" CreationDate="2022-09-26T13:07:23.403" UserId="426" Text="AllowTopLevelPaidExecutionFrom not supporting DescendOrigin" ContentLicense="CC BY-SA 4.0" />
  <row Id="18767" PostHistoryTypeId="3" PostId="5017" RevisionGUID="67918e85-887a-4738-93b0-b0e693385a1d" CreationDate="2022-09-26T13:07:23.403" UserId="426" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18768" PostHistoryTypeId="2" PostId="5018" RevisionGUID="4cab3674-0dd9-4037-9bc1-96bac55f6912" CreationDate="2022-09-26T13:20:54.213" UserId="2663" Text="Any tips, links and examples to go deep with custom consensus implementation?&#xD;&#xA;&#xD;&#xA;I like to create a very light consensus where the majority of the node are well known nodes and I want to implement checks on their work, from an external more resilient blockchain, only one time every x blocks. " ContentLicense="CC BY-SA 4.0" />
  <row Id="18770" PostHistoryTypeId="1" PostId="5018" RevisionGUID="4cab3674-0dd9-4037-9bc1-96bac55f6912" CreationDate="2022-09-26T13:20:54.213" UserId="2663" Text="Where to learn more about custom consensus implementation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18771" PostHistoryTypeId="3" PostId="5018" RevisionGUID="4cab3674-0dd9-4037-9bc1-96bac55f6912" CreationDate="2022-09-26T13:20:54.213" UserId="2663" Text="|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18772" PostHistoryTypeId="4" PostId="3405" RevisionGUID="53aa8d63-ddc2-4ed3-9293-4dd913de4c7c" CreationDate="2022-09-26T14:18:07.417" UserId="2065" Comment="edited title" Text="Error: 'tikv-jemalloc-sys' fails to build after upgrading substrate-based chain on WSL2" ContentLicense="CC BY-SA 4.0" />
  <row Id="18773" PostHistoryTypeId="5" PostId="4827" RevisionGUID="5ce3167d-ec04-4020-8114-fb24293504b3" CreationDate="2022-09-26T14:37:18.440" UserId="1789" Comment="added 681 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 and its original code is here https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd&#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot... I think the Zero fee shown on MetaMask in the video above is caused by setting pallet_evm::Config:&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;  type FeeCalculator = ();// FixedGasPrice;&#xD;&#xA;  type GasWeightMapping = ();// GasWeightMapping;&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;BUT that makes ALL transactions gasless! Not good. And in my parachain, that makes such feeless transactions not to be accepted by the validators somehow...&#xD;&#xA;&#xD;&#xA;Here is Moonbeam recent code on precompile https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;My file structure:&#xD;&#xA;```&#xD;&#xA;project/precompiles&#xD;&#xA;|- balances-erc20 -&gt; src/lib.rs&#xD;&#xA;|- utils -&gt; src/lib.rs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From Parallel Finance's `transfer()` function in  precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;    handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;    // Parse input.&#xD;&#xA;    let mut input = handle.read_input()?;&#xD;&#xA;    input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;    let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;    let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;    // Build call with origin.&#xD;&#xA;    {&#xD;&#xA;        let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;        let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;        let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;        // Dispatch call (if enough gas).&#xD;&#xA;        RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;            handle,&#xD;&#xA;            Some(origin).into(),&#xD;&#xA;            pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                value: amount,&#xD;&#xA;            },&#xD;&#xA;        )?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    LogsBuilder::new(handle.context().address)&#xD;&#xA;        .log3(&#xD;&#xA;            SELECTOR_LOG_TRANSFER,&#xD;&#xA;            handle.context().caller,&#xD;&#xA;            to,&#xD;&#xA;            EvmDataWriter::new().write(amount).build(),&#xD;&#xA;        )&#xD;&#xA;        .record(handle)?;&#xD;&#xA;&#xD;&#xA;    // Build output.&#xD;&#xA;    Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found out this `RuntimeHelper::&lt;Runtime&gt;::try_dispatch()` function was imported from my precompiles/utils/src/lib.rs:&#xD;&#xA;&#xD;&#xA;inside try_dispatch() in precompiles/utils/src/lib.rs ... see https://github.com/parallel-finance/parallel/blob/master/precompiles/utils/src/lib.rs#L171:&#xD;&#xA;```rust&#xD;&#xA;pub fn try_dispatch&lt;Call&gt;(...){&#xD;&#xA;  let call = Runtime::Call::from(call);&#xD;&#xA;  let dispatch_info = call.get_dispatch_info();&#xD;&#xA;&#xD;&#xA;  let required_gas = Runtime::GasWeightMapping::weight_to_gas(dispatch_info.weight);&#xD;&#xA;&#xD;&#xA;  let used_weight = call.dispatch(origin)&#xD;&#xA;      .map_err(|e| revert(alloc::format!(&quot;Dispatched call failed with error: {:?}&quot;, e)))?&#xD;&#xA;      .actual_weight;&#xD;&#xA;```&#xD;&#xA;so I tried to set that required_gas to 0 in my precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;let mut call = pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;   dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;   value: amount,&#xD;&#xA;};&#xD;&#xA;call.get_dispatch_info().weight= 0;&#xD;&#xA;&#xD;&#xA;RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;   handle,&#xD;&#xA;   Some(origin).into(),&#xD;&#xA;   call,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;But that does not change the gas fee!??&#xD;&#xA;&#xD;&#xA;This post talks briefly about base_fee but not very clear on how to do it... https://substrate.stackexchange.com/questions/281/how-to-set-base-fee-and-len-fee-to-zero&#xD;&#xA;&#xD;&#xA;And docs talking about base fee and length fee, etc... https://docs.substrate.io/build/tx-weights-fees/&#xD;&#xA;&#xD;&#xA;Now, I have made a simple `feeless_transfer()` function from the above `transfer()` function. And my `feeless_transfer()` calls another `feeless_transfer()` that is in my pallet. &#xD;&#xA;&#xD;&#xA;This `Ok(Pays::No.into())` in the pallet functions will make the `actual_weight` to become `None` inside `precompiles/utils/src/lib.rs: dispatch()`:&#xD;&#xA;```rust&#xD;&#xA;let actual_weight = call&#xD;&#xA;            .dispatch(origin)&#xD;&#xA;            .map_err(|e| revert(alloc::format!(&quot;Dispatched call failed with error: {:?}&quot;, e)))?&#xD;&#xA;            .actual_weight;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And setting the &#xD;&#xA;`#[pallet::weight(0)]` above the pallet functions will make `call.get_dispatch_info().weight` to produce zero weight_fee.&#xD;&#xA;&#xD;&#xA;Still, how can I get zero fee on MetaMask ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18774" PostHistoryTypeId="2" PostId="5019" RevisionGUID="94df3696-934d-492c-969f-40b43b579573" CreationDate="2022-09-26T15:28:45.573" UserId="2163" Text="For example, if a have a variable of type `&lt;T as frame_system::Config&gt;::BlockNumber` how could I convert it into a `u64`, simply putting `u64::from` doesn't work." ContentLicense="CC BY-SA 4.0" />
  <row Id="18776" PostHistoryTypeId="1" PostId="5019" RevisionGUID="94df3696-934d-492c-969f-40b43b579573" CreationDate="2022-09-26T15:28:45.573" UserId="2163" Text="How to convert `BlockNumber` to `u64`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18777" PostHistoryTypeId="3" PostId="5019" RevisionGUID="94df3696-934d-492c-969f-40b43b579573" CreationDate="2022-09-26T15:28:45.573" UserId="2163" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18778" PostHistoryTypeId="2" PostId="5020" RevisionGUID="35f3ba26-2321-450c-95e6-9327986ed6cb" CreationDate="2022-09-26T15:36:37.817" UserId="251" Text="```rust&#xD;&#xA;use sp_runtime::traits::SaturatedConversion;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fn f(block_number: BlockNumber) {&#xD;&#xA;    block_number.saturated_into::&lt;u64&gt;();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18780" PostHistoryTypeId="5" PostId="4827" RevisionGUID="ece67d58-7652-45fb-a369-06018125a134" CreationDate="2022-09-26T15:37:30.697" UserId="1789" Comment="added 42 characters in body" Text="Regarding the EVM gas fee used for calling precompile functions, how can I set that fee to zero so that the MetaMask will show zero fee at invoking those precompile functions?&#xD;&#xA;&#xD;&#xA;I saw a demonstration of that zero gas transaction from Moombeam's tutorial https://youtu.be/V9KfvhoqLJ4?t=5348 and its original code is here https://github.com/PureStake/substrate-node-template/commit/142fe9a5ca9ca787925d3bd51c55db44caf444cd&#xD;&#xA;&#xD;&#xA;But that video was posted about 1 year ago, so now the code has changed quite a lot... &#xD;&#xA;&#xD;&#xA;I can achieve zero fee on MetaMask as the video above did by setting FixedGasPrice and GasWeightMapping below to return zeros in pallet_evm::Config:&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;  type FeeCalculator = FixedGasPrice;&#xD;&#xA;  type GasWeightMapping = GasWeightMapping;&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;BUT that makes ALL transactions gasless! Not good. And in my parachain, that makes such feeless transactions not to be accepted by the validators somehow...&#xD;&#xA;&#xD;&#xA;Here is Moonbeam recent code on precompile https://github.com/PureStake/moonbeam/blob/v0.26.0/precompiles/balances-erc20/src/lib.rs&#xD;&#xA;&#xD;&#xA;My file structure:&#xD;&#xA;```&#xD;&#xA;project/precompiles&#xD;&#xA;|- balances-erc20 -&gt; src/lib.rs&#xD;&#xA;|- utils -&gt; src/lib.rs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From Parallel Finance's `transfer()` function in  precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;fn transfer(handle: &amp;mut impl PrecompileHandle) -&gt; EvmResult&lt;PrecompileOutput&gt; {&#xD;&#xA;    handle.record_log_costs_manual(3, 32)?;&#xD;&#xA;&#xD;&#xA;    // Parse input.&#xD;&#xA;    let mut input = handle.read_input()?;&#xD;&#xA;    input.expect_arguments(2)?;&#xD;&#xA;&#xD;&#xA;    let to: H160 = input.read::&lt;Address&gt;()?.into();&#xD;&#xA;    let amount: U256 = input.read()?;&#xD;&#xA;&#xD;&#xA;    // Build call with origin.&#xD;&#xA;    {&#xD;&#xA;        let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;        let to = Runtime::AddressMapping::into_account_id(to);&#xD;&#xA;        let amount = Self::u256_to_amount(amount)?;&#xD;&#xA;&#xD;&#xA;        // Dispatch call (if enough gas).&#xD;&#xA;        RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;            handle,&#xD;&#xA;            Some(origin).into(),&#xD;&#xA;            pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;                dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;                value: amount,&#xD;&#xA;            },&#xD;&#xA;        )?;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    LogsBuilder::new(handle.context().address)&#xD;&#xA;        .log3(&#xD;&#xA;            SELECTOR_LOG_TRANSFER,&#xD;&#xA;            handle.context().caller,&#xD;&#xA;            to,&#xD;&#xA;            EvmDataWriter::new().write(amount).build(),&#xD;&#xA;        )&#xD;&#xA;        .record(handle)?;&#xD;&#xA;&#xD;&#xA;    // Build output.&#xD;&#xA;    Ok(succeed(EvmDataWriter::new().write(true).build()))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found out this `RuntimeHelper::&lt;Runtime&gt;::try_dispatch()` function was imported from my precompiles/utils/src/lib.rs:&#xD;&#xA;&#xD;&#xA;inside try_dispatch() in precompiles/utils/src/lib.rs ... see https://github.com/parallel-finance/parallel/blob/master/precompiles/utils/src/lib.rs#L171:&#xD;&#xA;```rust&#xD;&#xA;pub fn try_dispatch&lt;Call&gt;(...){&#xD;&#xA;  let call = Runtime::Call::from(call);&#xD;&#xA;  let dispatch_info = call.get_dispatch_info();&#xD;&#xA;&#xD;&#xA;  let required_gas = Runtime::GasWeightMapping::weight_to_gas(dispatch_info.weight);&#xD;&#xA;&#xD;&#xA;  let used_weight = call.dispatch(origin)&#xD;&#xA;      .map_err(|e| revert(alloc::format!(&quot;Dispatched call failed with error: {:?}&quot;, e)))?&#xD;&#xA;      .actual_weight;&#xD;&#xA;```&#xD;&#xA;so I tried to set that required_gas to 0 in my precompiles/balances-erc20/src/lib.rs:&#xD;&#xA;```rust&#xD;&#xA;let mut call = pallet_balances::Call::&lt;Runtime, Instance&gt;::transfer {&#xD;&#xA;   dest: Runtime::Lookup::unlookup(to),&#xD;&#xA;   value: amount,&#xD;&#xA;};&#xD;&#xA;call.get_dispatch_info().weight= 0;&#xD;&#xA;&#xD;&#xA;RuntimeHelper::&lt;Runtime&gt;::try_dispatch(&#xD;&#xA;   handle,&#xD;&#xA;   Some(origin).into(),&#xD;&#xA;   call,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;But that does not change the gas fee!??&#xD;&#xA;&#xD;&#xA;This post talks briefly about base_fee but not very clear on how to do it... https://substrate.stackexchange.com/questions/281/how-to-set-base-fee-and-len-fee-to-zero&#xD;&#xA;&#xD;&#xA;And docs talking about base fee and length fee, etc... https://docs.substrate.io/build/tx-weights-fees/&#xD;&#xA;&#xD;&#xA;Now, I have made a simple `feeless_transfer()` function from the above `transfer()` function. And my `feeless_transfer()` calls another `feeless_transfer()` that is in my pallet. &#xD;&#xA;&#xD;&#xA;This `Ok(Pays::No.into())` in the pallet functions will make the `actual_weight` to become `None` inside `precompiles/utils/src/lib.rs: dispatch()`:&#xD;&#xA;```rust&#xD;&#xA;let actual_weight = call&#xD;&#xA;            .dispatch(origin)&#xD;&#xA;            .map_err(|e| revert(alloc::format!(&quot;Dispatched call failed with error: {:?}&quot;, e)))?&#xD;&#xA;            .actual_weight;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And setting the &#xD;&#xA;`#[pallet::weight(0)]` above the pallet functions will make `call.get_dispatch_info().weight` to produce zero weight_fee.&#xD;&#xA;&#xD;&#xA;Still, how can I get zero fee on MetaMask ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18781" PostHistoryTypeId="2" PostId="5021" RevisionGUID="1fe2604e-5270-4aa2-822b-6e66ead039f8" CreationDate="2022-09-26T15:44:03.077" UserId="19" Text="When I have issues with building Substrate project, my first take is: `rustup update`.&#xD;&#xA;&#xD;&#xA;In most cases, the command helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="18783" PostHistoryTypeId="2" PostId="5022" RevisionGUID="fa85fcb5-27cc-4817-b0bf-e38c6644410e" CreationDate="2022-09-26T16:26:28.783" UserId="3171" Text="[![upward message event][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What is the reason of OverweightEnqueued event?&#xD;&#xA;&#xD;&#xA;There is the place of code where event OverweightEnqueued produced...&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/t53db.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/khNjY.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="18785" PostHistoryTypeId="1" PostId="5022" RevisionGUID="fa85fcb5-27cc-4817-b0bf-e38c6644410e" CreationDate="2022-09-26T16:26:28.783" UserId="3171" Text="XCM error. OverweightEnqueued event instead of opening HRMP channel" ContentLicense="CC BY-SA 4.0" />
  <row Id="18786" PostHistoryTypeId="3" PostId="5022" RevisionGUID="fa85fcb5-27cc-4817-b0bf-e38c6644410e" CreationDate="2022-09-26T16:26:28.783" UserId="3171" Text="|parachain|xcm|error|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18787" PostHistoryTypeId="2" PostId="5023" RevisionGUID="cb6e7064-920c-49f9-ac93-5755bb95aa7f" CreationDate="2022-09-26T16:28:54.260" UserId="555" Text="**I'm adding a pallet2 to pallet1's runtime cargo.toml then I'm getting this error.&#xD;&#xA;Thanks in advance!!**&#xD;&#xA;```     &#xD;&#xA;Compiling secp256k1-sys v0.4.2&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /Users/pankajchaudhary/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:235:9&#xD;&#xA;      |&#xD;&#xA;  235 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  236 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  237 | |                         For more information see: \&#xD;&#xA;  238 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /Users/pankajchaudhary/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:262:5&#xD;&#xA;      |&#xD;&#xA;  262 |     imp::getrandom_inner(dest)&#xD;&#xA;      |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0433`.&#xD;&#xA;  error: could not compile `getrandom` due to 2 previous errors&#xD;&#xA;  warning: build failed, waiting for other jobs to finish...&#xD;&#xA;  The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;  warning: error: unable to create target: 'No available targets are compatible with triple &quot;wasm32-unknown-unknown&quot;'&#xD;&#xA;  warning: 1 error generated.&#xD;&#xA;  warning: In file included from depend/secp256k1/src/secp256k1.c:12:&#xD;&#xA;  warning: In file included from depend/secp256k1/src/assumptions.h:12:&#xD;&#xA;  warning: In file included from depend/secp256k1/src/util.h:16:&#xD;&#xA;  warning: wasm-sysroot/stdio.h:4:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;  warning: extern const unsigned char WASM32_INT_SIZE = sizeof(int);&#xD;&#xA;  warning:                            ^&#xD;&#xA;  warning: wasm-sysroot/stdio.h:5:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;  warning: extern const unsigned char WASM32_INT_ALIGN = alignof(int);&#xD;&#xA;  warning:                            ^&#xD;&#xA;  warning: wasm-sysroot/stdio.h:7:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;  warning: extern const unsigned char WASM32_UNSIGNED_INT_SIZE = sizeof(unsigned int);&#xD;&#xA;  warning:                            ^&#xD;&#xA;  warning: wasm-sysroot/stdio.h:8:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;  warning: extern const unsigned char WASM32_UNSIGNED_INT_ALIGN = alignof(unsigned int);&#xD;&#xA;  warning:                            ^&#xD;&#xA;  warning: wasm-sysroot/stdio.h:10:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;  warning: extern const unsigned char WASM32_SIZE_T_SIZE = sizeof(size_t);&#xD;&#xA;  warning:                            ^&#xD;&#xA;  warning: wasm-sysroot/stdio.h:11:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;  warning: extern const unsigned char WASM32_SIZE_T_ALIGN = alignof(size_t);&#xD;&#xA;  warning:                            ^&#xD;&#xA;  warning: wasm-sysroot/stdio.h:13:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;  warning: extern const unsigned char WASM32_UNSIGNED_CHAR_SIZE = sizeof(unsigned char);&#xD;&#xA;  warning:                            ^&#xD;&#xA;  warning: wasm-sysroot/stdio.h:14:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;  warning: extern const unsigned char WASM32_UNSIGNED_CHAR_ALIGN = alignof(unsigned char);&#xD;&#xA;  warning:                            ^&#xD;&#xA;  warning: wasm-sysroot/stdio.h:16:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;  warning: extern const unsigned char WASM32_PTR_SIZE = sizeof(void*);&#xD;&#xA;  warning:                            ^&#xD;&#xA;  warning: wasm-sysroot/stdio.h:17:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;  warning: extern const unsigned char WASM32_PTR_ALIGN = alignof(void*);&#xD;&#xA;  warning:                            ^&#xD;&#xA;  warning: In file included from depend/secp256k1/src/secp256k1.c:20:&#xD;&#xA;  warning: depend/secp256k1/src/ecdsa_impl.h:312:12: warning: use of bitwise '&amp;' with boolean operands [-Wbitwise-instead-of-logical]&#xD;&#xA;  warning:     return !rustsecp256k1_v0_4_1_scalar_is_zero(sigr) &amp; !rustsecp256k1_v0_4_1_scalar_is_zero(sigs);&#xD;&#xA;  warning:            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&#xD;&#xA;  warning:                                                       &amp;&amp;&#xD;&#xA;  warning: depend/secp256k1/src/ecdsa_impl.h:312:12: note: cast one or both operands to int to silence this warning&#xD;&#xA;  warning: In file included from depend/secp256k1/src/secp256k1.c:17:&#xD;&#xA;  warning: In file included from depend/secp256k1/src/ecmult_impl.h:16:&#xD;&#xA;  warning: In file included from depend/secp256k1/src/ecmult.h:12:&#xD;&#xA;  warning: depend/secp256k1/src/scratch.h:24:38: warning: unused function 'rustsecp256k1_v0_4_1_scratch_create' [-Wunused-function]&#xD;&#xA;  warning: static rustsecp256k1_v0_4_1_scratch* rustsecp256k1_v0_4_1_scratch_create(const rustsecp256k1_v0_4_1_callback* error_callback, size_t max_size);&#xD;&#xA;  warning:                                      ^&#xD;&#xA;  warning: depend/secp256k1/src/scratch.h:26:13: warning: unused function 'rustsecp256k1_v0_4_1_scratch_destroy' [-Wunused-function]&#xD;&#xA;  warning: static void rustsecp256k1_v0_4_1_scratch_destroy(const rustsecp256k1_v0_4_1_callback* error_callback, rustsecp256k1_v0_4_1_scratch* scratch);&#xD;&#xA;  warning:             ^&#xD;&#xA;  warning: In file included from depend/secp256k1/src/secp256k1.c:17:&#xD;&#xA;  warning: depend/secp256k1/src/ecmult_impl.h:1035:12: warning: unused function 'rustsecp256k1_v0_4_1_ecmult_multi_var' [-Wunused-function]&#xD;&#xA;  warning: static int rustsecp256k1_v0_4_1_ecmult_multi_var(const rustsecp256k1_v0_4_1_callback* error_callback, const rustsecp256k1_v0_4_1_ecmult_context *ctx, rustsecp256k1_v0_4_1_scratch *scratch, rustsecp256k1_v0_4_1_gej *r, const rustsecp256k1_v0_4_1_scalar *inp_g_sc, rustsecp256k1_v0_4_1_ecmult_multi_callback cb, void *cbdata, size_t n) {&#xD;&#xA;  warning:            ^&#xD;&#xA;  warning: depend/secp256k1/src/ecmult_impl.h:621:12: warning: unused function 'rustsecp256k1_v0_4_1_ecmult_strauss_batch_single' [-Wunused-function]&#xD;&#xA;  warning: static int rustsecp256k1_v0_4_1_ecmult_strauss_batch_single(const rustsecp256k1_v0_4_1_callback* error_callback, const rustsecp256k1_v0_4_1_ecmult_context *actx, rustsecp256k1_v0_4_1_scratch *scratch, rustsecp256k1_v0_4_1_gej *r, const rustsecp256k1_v0_4_1_scalar *inp_g_sc, rustsecp256k1_v0_4_1_ecmult_multi_callback cb, void *cbdata, size_t n) {&#xD;&#xA;  warning:            ^&#xD;&#xA;  warning: depend/secp256k1/src/ecmult_impl.h:863:15: warning: unused function 'rustsecp256k1_v0_4_1_pippenger_scratch_size' [-Wunused-function]&#xD;&#xA;  warning: static size_t rustsecp256k1_v0_4_1_pippenger_scratch_size(size_t n_points, int bucket_window) {&#xD;&#xA;  warning:               ^&#xD;&#xA;  warning: depend/secp256k1/src/ecmult_impl.h:944:12: warning: unused function 'rustsecp256k1_v0_4_1_ecmult_pippenger_batch_single' [-Wunused-function]&#xD;&#xA;  warning: static int rustsecp256k1_v0_4_1_ecmult_pippenger_batch_single(const rustsecp256k1_v0_4_1_callback* error_callback, const rustsecp256k1_v0_4_1_ecmult_context *actx, rustsecp256k1_v0_4_1_scratch *scratch, rustsecp256k1_v0_4_1_gej *r, const rustsecp256k1_v0_4_1_scalar *inp_g_sc, rustsecp256k1_v0_4_1_ecmult_multi_callback cb, void *cbdata, size_t n) {&#xD;&#xA;  warning:            ^&#xD;&#xA;  warning: error: unable to create target: 'No available targets are compatible with triple &quot;wasm32-unknown-unknown&quot;'&#xD;&#xA;  warning: 17 warnings and 1 error generated.&#xD;&#xA;&#xD;&#xA;  error: failed to run custom build command for `secp256k1-sys v0.4.2`&#xD;&#xA;&#xD;&#xA;  Caused by:&#xD;&#xA;    process didn't exit successfully: `/Users/pankajchaudhary/Desktop/hero/target/release/wbuild/hero-runtime/target/release/build/secp256k1-sys-b827f0c0aca6da27/build-script-build` (exit status: 1)&#xD;&#xA;    --- stdout&#xD;&#xA;    TARGET = Some(&quot;wasm32-unknown-unknown&quot;)&#xD;&#xA;    OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;    HOST = Some(&quot;aarch64-apple-darwin&quot;)&#xD;&#xA;    CC_wasm32-unknown-unknown = None&#xD;&#xA;    CC_wasm32_unknown_unknown = None&#xD;&#xA;    TARGET_CC = None&#xD;&#xA;    CC = None&#xD;&#xA;    CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;    CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;    TARGET_CFLAGS = None&#xD;&#xA;    CFLAGS = None&#xD;&#xA;    CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;    DEBUG = Some(&quot;false&quot;)&#xD;&#xA;    CC_wasm32-unknown-unknown = None&#xD;&#xA;    CC_wasm32_unknown_unknown = None&#xD;&#xA;    TARGET_CC = None&#xD;&#xA;    CC = None&#xD;&#xA;    CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;    CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;    TARGET_CFLAGS = None&#xD;&#xA;    CFLAGS = None&#xD;&#xA;    CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;    running: &quot;clang&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-I&quot; &quot;depend/secp256k1/&quot; &quot;-I&quot; &quot;depend/secp256k1/include&quot; &quot;-I&quot; &quot;depend/secp256k1/src&quot; &quot;-I&quot; &quot;wasm-sysroot&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DSECP256K1_API=&quot; &quot;-DENABLE_MODULE_ECDH=1&quot; &quot;-DENABLE_MODULE_SCHNORRSIG=1&quot; &quot;-DENABLE_MODULE_EXTRAKEYS=1&quot; &quot;-DUSE_NUM_NONE=1&quot; &quot;-DUSE_FIELD_INV_BUILTIN=1&quot; &quot;-DUSE_SCALAR_INV_BUILTIN=1&quot; &quot;-DECMULT_GEN_PREC_BITS=4&quot; &quot;-DECMULT_WINDOW_SIZE=15&quot; &quot;-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1&quot; &quot;-DENABLE_MODULE_RECOVERY=1&quot; &quot;-o&quot; &quot;/Users/pankajchaudhary/Desktop/hero/target/release/wbuild/hero-runtime/target/wasm32-unknown-unknown/release/build/secp256k1-sys-a050440d4b849ccc/out/depend/secp256k1/contrib/lax_der_parsing.o&quot; &quot;-c&quot; &quot;depend/secp256k1/contrib/lax_der_parsing.c&quot;&#xD;&#xA;    running: &quot;clang&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-I&quot; &quot;depend/secp256k1/&quot; &quot;-I&quot; &quot;depend/secp256k1/include&quot; &quot;-I&quot; &quot;depend/secp256k1/src&quot; &quot;-I&quot; &quot;wasm-sysroot&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DSECP256K1_API=&quot; &quot;-DENABLE_MODULE_ECDH=1&quot; &quot;-DENABLE_MODULE_SCHNORRSIG=1&quot; &quot;-DENABLE_MODULE_EXTRAKEYS=1&quot; &quot;-DUSE_NUM_NONE=1&quot; &quot;-DUSE_FIELD_INV_BUILTIN=1&quot; &quot;-DUSE_SCALAR_INV_BUILTIN=1&quot; &quot;-DECMULT_GEN_PREC_BITS=4&quot; &quot;-DECMULT_WINDOW_SIZE=15&quot; &quot;-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1&quot; &quot;-DENABLE_MODULE_RECOVERY=1&quot; &quot;-o&quot; &quot;/Users/pankajchaudhary/Desktop/hero/target/release/wbuild/hero-runtime/target/wasm32-unknown-unknown/release/build/secp256k1-sys-a050440d4b849ccc/out/depend/secp256k1/src/secp256k1.o&quot; &quot;-c&quot; &quot;depend/secp256k1/src/secp256k1.c&quot;&#xD;&#xA;    cargo:warning=error: unable to create target: 'No available targets are compatible with triple &quot;wasm32-unknown-unknown&quot;'&#xD;&#xA;    cargo:warning=1 error generated.&#xD;&#xA;    exit status: 1&#xD;&#xA;    cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:12:&#xD;&#xA;    cargo:warning=In file included from depend/secp256k1/src/assumptions.h:12:&#xD;&#xA;    cargo:warning=In file included from depend/secp256k1/src/util.h:16:&#xD;&#xA;    cargo:warning=wasm-sysroot/stdio.h:4:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;    cargo:warning=extern const unsigned char WASM32_INT_SIZE = sizeof(int);&#xD;&#xA;    cargo:warning=                           ^&#xD;&#xA;    cargo:warning=wasm-sysroot/stdio.h:5:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;    cargo:warning=extern const unsigned char WASM32_INT_ALIGN = alignof(int);&#xD;&#xA;    cargo:warning=                           ^&#xD;&#xA;    cargo:warning=wasm-sysroot/stdio.h:7:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;    cargo:warning=extern const unsigned char WASM32_UNSIGNED_INT_SIZE = sizeof(unsigned int);&#xD;&#xA;    cargo:warning=                           ^&#xD;&#xA;    cargo:warning=wasm-sysroot/stdio.h:8:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;    cargo:warning=extern const unsigned char WASM32_UNSIGNED_INT_ALIGN = alignof(unsigned int);&#xD;&#xA;    cargo:warning=                           ^&#xD;&#xA;    cargo:warning=wasm-sysroot/stdio.h:10:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;    cargo:warning=extern const unsigned char WASM32_SIZE_T_SIZE = sizeof(size_t);&#xD;&#xA;    cargo:warning=                           ^&#xD;&#xA;    cargo:warning=wasm-sysroot/stdio.h:11:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;    cargo:warning=extern const unsigned char WASM32_SIZE_T_ALIGN = alignof(size_t);&#xD;&#xA;    cargo:warning=                           ^&#xD;&#xA;    cargo:warning=wasm-sysroot/stdio.h:13:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;    cargo:warning=extern const unsigned char WASM32_UNSIGNED_CHAR_SIZE = sizeof(unsigned char);&#xD;&#xA;    cargo:warning=                           ^&#xD;&#xA;    cargo:warning=wasm-sysroot/stdio.h:14:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;    cargo:warning=extern const unsigned char WASM32_UNSIGNED_CHAR_ALIGN = alignof(unsigned char);&#xD;&#xA;    cargo:warning=                           ^&#xD;&#xA;    cargo:warning=wasm-sysroot/stdio.h:16:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;    cargo:warning=extern const unsigned char WASM32_PTR_SIZE = sizeof(void*);&#xD;&#xA;    cargo:warning=                           ^&#xD;&#xA;    cargo:warning=wasm-sysroot/stdio.h:17:28: warning: 'extern' variable has an initializer [-Wextern-initializer]&#xD;&#xA;    cargo:warning=extern const unsigned char WASM32_PTR_ALIGN = alignof(void*);&#xD;&#xA;    cargo:warning=                           ^&#xD;&#xA;    cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:20:&#xD;&#xA;    cargo:warning=depend/secp256k1/src/ecdsa_impl.h:312:12: warning: use of bitwise '&amp;' with boolean operands [-Wbitwise-instead-of-logical]&#xD;&#xA;    cargo:warning=    return !rustsecp256k1_v0_4_1_scalar_is_zero(sigr) &amp; !rustsecp256k1_v0_4_1_scalar_is_zero(sigs);&#xD;&#xA;    cargo:warning=           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&#xD;&#xA;    cargo:warning=                                                      &amp;&amp;&#xD;&#xA;    cargo:warning=depend/secp256k1/src/ecdsa_impl.h:312:12: note: cast one or both operands to int to silence this warning&#xD;&#xA;    cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:17:&#xD;&#xA;    cargo:warning=In file included from depend/secp256k1/src/ecmult_impl.h:16:&#xD;&#xA;    cargo:warning=In file included from depend/secp256k1/src/ecmult.h:12:&#xD;&#xA;    cargo:warning=depend/secp256k1/src/scratch.h:24:38: warning: unused function 'rustsecp256k1_v0_4_1_scratch_create' [-Wunused-function]&#xD;&#xA;    cargo:warning=static rustsecp256k1_v0_4_1_scratch* rustsecp256k1_v0_4_1_scratch_create(const rustsecp256k1_v0_4_1_callback* error_callback, size_t max_size);&#xD;&#xA;    cargo:warning=                                     ^&#xD;&#xA;    cargo:warning=depend/secp256k1/src/scratch.h:26:13: warning: unused function 'rustsecp256k1_v0_4_1_scratch_destroy' [-Wunused-function]&#xD;&#xA;    cargo:warning=static void rustsecp256k1_v0_4_1_scratch_destroy(const rustsecp256k1_v0_4_1_callback* error_callback, rustsecp256k1_v0_4_1_scratch* scratch);&#xD;&#xA;    cargo:warning=            ^&#xD;&#xA;    cargo:warning=In file included from depend/secp256k1/src/secp256k1.c:17:&#xD;&#xA;    cargo:warning=depend/secp256k1/src/ecmult_impl.h:1035:12: warning: unused function 'rustsecp256k1_v0_4_1_ecmult_multi_var' [-Wunused-function]&#xD;&#xA;    cargo:warning=static int rustsecp256k1_v0_4_1_ecmult_multi_var(const rustsecp256k1_v0_4_1_callback* error_callback, const rustsecp256k1_v0_4_1_ecmult_context *ctx, rustsecp256k1_v0_4_1_scratch *scratch, rustsecp256k1_v0_4_1_gej *r, const rustsecp256k1_v0_4_1_scalar *inp_g_sc, rustsecp256k1_v0_4_1_ecmult_multi_callback cb, void *cbdata, size_t n) {&#xD;&#xA;    cargo:warning=           ^&#xD;&#xA;    cargo:warning=depend/secp256k1/src/ecmult_impl.h:621:12: warning: unused function 'rustsecp256k1_v0_4_1_ecmult_strauss_batch_single' [-Wunused-function]&#xD;&#xA;    cargo:warning=static int rustsecp256k1_v0_4_1_ecmult_strauss_batch_single(const rustsecp256k1_v0_4_1_callback* error_callback, const rustsecp256k1_v0_4_1_ecmult_context *actx, rustsecp256k1_v0_4_1_scratch *scratch, rustsecp256k1_v0_4_1_gej *r, const rustsecp256k1_v0_4_1_scalar *inp_g_sc, rustsecp256k1_v0_4_1_ecmult_multi_callback cb, void *cbdata, size_t n) {&#xD;&#xA;    cargo:warning=           ^&#xD;&#xA;    cargo:warning=depend/secp256k1/src/ecmult_impl.h:863:15: warning: unused function 'rustsecp256k1_v0_4_1_pippenger_scratch_size' [-Wunused-function]&#xD;&#xA;    cargo:warning=static size_t rustsecp256k1_v0_4_1_pippenger_scratch_size(size_t n_points, int bucket_window) {&#xD;&#xA;    cargo:warning=              ^&#xD;&#xA;    cargo:warning=depend/secp256k1/src/ecmult_impl.h:944:12: warning: unused function 'rustsecp256k1_v0_4_1_ecmult_pippenger_batch_single' [-Wunused-function]&#xD;&#xA;    cargo:warning=static int rustsecp256k1_v0_4_1_ecmult_pippenger_batch_single(const rustsecp256k1_v0_4_1_callback* error_callback, const rustsecp256k1_v0_4_1_ecmult_context *actx, rustsecp256k1_v0_4_1_scratch *scratch, rustsecp256k1_v0_4_1_gej *r, const rustsecp256k1_v0_4_1_scalar *inp_g_sc, rustsecp256k1_v0_4_1_ecmult_multi_callback cb, void *cbdata, size_t n) {&#xD;&#xA;    cargo:warning=           ^&#xD;&#xA;    cargo:warning=error: unable to create target: 'No available targets are compatible with triple &quot;wasm32-unknown-unknown&quot;'&#xD;&#xA;    cargo:warning=17 warnings and 1 error generated.&#xD;&#xA;    exit status: 1&#xD;&#xA;&#xD;&#xA;    --- stderr&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    error occurred: Command &quot;clang&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-I&quot; &quot;depend/secp256k1/&quot; &quot;-I&quot; &quot;depend/secp256k1/include&quot; &quot;-I&quot; &quot;depend/secp256k1/src&quot; &quot;-I&quot; &quot;wasm-sysroot&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DSECP256K1_API=&quot; &quot;-DENABLE_MODULE_ECDH=1&quot; &quot;-DENABLE_MODULE_SCHNORRSIG=1&quot; &quot;-DENABLE_MODULE_EXTRAKEYS=1&quot; &quot;-DUSE_NUM_NONE=1&quot; &quot;-DUSE_FIELD_INV_BUILTIN=1&quot; &quot;-DUSE_SCALAR_INV_BUILTIN=1&quot; &quot;-DECMULT_GEN_PREC_BITS=4&quot; &quot;-DECMULT_WINDOW_SIZE=15&quot; &quot;-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1&quot; &quot;-DENABLE_MODULE_RECOVERY=1&quot; &quot;-o&quot; &quot;/Users/pankajchaudhary/Desktop/hero/target/release/wbuild/hero-runtime/target/wasm32-unknown-unknown/release/build/secp256k1-sys-a050440d4b849ccc/out/depend/secp256k1/contrib/lax_der_parsing.o&quot; &quot;-c&quot; &quot;depend/secp256k1/contrib/lax_der_parsing.c&quot; with args &quot;clang&quot; did not execute successfully (status code exit status: 1).&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18789" PostHistoryTypeId="1" PostId="5023" RevisionGUID="cb6e7064-920c-49f9-ac93-5755bb95aa7f" CreationDate="2022-09-26T16:28:54.260" UserId="555" Text="How to solve the error secp256k1-sys v0.4.2?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18790" PostHistoryTypeId="3" PostId="5023" RevisionGUID="cb6e7064-920c-49f9-ac93-5755bb95aa7f" CreationDate="2022-09-26T16:28:54.260" UserId="555" Text="|substrate-node|polkadot-js|wasm|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18791" PostHistoryTypeId="2" PostId="5024" RevisionGUID="ed89e222-6269-4ee1-8e54-329eca7e44eb" CreationDate="2022-09-26T17:01:15.640" UserId="298" Text="I am following the guide in [polkadot-js/typegen][1], the github source is shared. I am trying to follow along and decorate the api for my custom node-template called [supersig-template][2]&#xD;&#xA;&#xD;&#xA;I have successfully created an output of the metadata:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:&quot;1&quot;, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getMetadata&quot;, &quot;params&quot;:[]}' http://localhost:9933 &gt; supersig-template.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but i am not very clearly in the github source where i should be running `yarn build`. I try in the root of forking [/docs][3] repo. But I dont think that is the correct place.&#xD;&#xA;&#xD;&#xA;So i made&#xD;&#xA;&#xD;&#xA;Then i went into `/docs/api/examples/promise/typegen` separated it into its own repo, changed package json to include `--endpoint ./supersig-template.json` then ran `yarn build` and got this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;typegen % yarn build&#xD;&#xA;yarn run v1.22.19&#xD;&#xA;$ yarn generate:defs &amp;&amp; yarn generate:meta&#xD;&#xA;$ ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package sample-polkadotjs-typegen/interfaces --input /src/interfaces --endpoint /Users/ramsey/decentration/typegen/supersig-template.json&#xD;&#xA;Options:&#xD;&#xA;  --help     Show help                                                 [boolean]&#xD;&#xA;  --version  Show version number                                       [boolean]&#xD;&#xA;  --input    The directory to use for the user definitions   [string] [required]&#xD;&#xA;  --package  The package name &amp; path to use for the user types&#xD;&#xA;                                                             [string] [required]&#xD;&#xA;&#xD;&#xA;Unknown argument: endpoint&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;a few questions:&#xD;&#xA;&#xD;&#xA;- is typegen still up to date and something that can be used to decorate APIs?&#xD;&#xA;- has endpoint been removed as an argument?&#xD;&#xA;- am i going about thing the correct way to decorate the api?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/typegen&#xD;&#xA;  [2]: https://github.com/decentration/substrate-supersig-template&#xD;&#xA;  [3]: https://github.com/polkadot-js/docs" ContentLicense="CC BY-SA 4.0" />
  <row Id="18793" PostHistoryTypeId="1" PostId="5024" RevisionGUID="ed89e222-6269-4ee1-8e54-329eca7e44eb" CreationDate="2022-09-26T17:01:15.640" UserId="298" Text="How to use polkadot js typesript Typegen to decorate api for runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="18794" PostHistoryTypeId="3" PostId="5024" RevisionGUID="ed89e222-6269-4ee1-8e54-329eca7e44eb" CreationDate="2022-09-26T17:01:15.640" UserId="298" Text="|substrate-node|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18795" PostHistoryTypeId="2" PostId="5025" RevisionGUID="7c8f81e1-38f7-41f3-af99-a9b2726d82ad" CreationDate="2022-09-26T20:47:03.273" UserId="1798" Text="I found the `as_derivative()` function call in the [FRAME Utility pallet][1] which suggests that I can use it to call a function from address_A on behalf of address_B, provided that address_B was made as a derivative account from address_A.&#xD;&#xA;&#xD;&#xA;Using the polkadot.js extension I created a derivative account from address_A and funded it with some test tokens. Then using the polkadot.js/apps extrinsics tab I wrapped a basic `transfer_keep_alive()` in a call to `as_derivative()` so that I would be able to submit and pay for transaction fees using address_A, but the transfer amount would be sent from address_B.&#xD;&#xA;&#xD;&#xA;However, when I submit the transaction I receive a Balance.InsufficientBalance error. I have double-checked that the derivative address I made with the polkadot.js extension does in fact have a sufficient amount of tokens, so I am not sure what I am missing. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/utility/src/lib.rs#L262" ContentLicense="CC BY-SA 4.0" />
  <row Id="18797" PostHistoryTypeId="1" PostId="5025" RevisionGUID="7c8f81e1-38f7-41f3-af99-a9b2726d82ad" CreationDate="2022-09-26T20:47:03.273" UserId="1798" Text="How to use as_derivative function found in the Utility pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18798" PostHistoryTypeId="3" PostId="5025" RevisionGUID="7c8f81e1-38f7-41f3-af99-a9b2726d82ad" CreationDate="2022-09-26T20:47:03.273" UserId="1798" Text="|polkadot-js|transactions|frame|extrinsic|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18799" PostHistoryTypeId="2" PostId="5026" RevisionGUID="c38b0ac9-b94e-44d4-b2ad-b9b828b93493" CreationDate="2022-09-26T20:47:03.273" UserId="1798" Text="It turns out this is a bit of a naming collision. The derived account that I created using the polkadot.js extension (known as /soft-path or //hard-path derivation) is different from the type of derived address the Utility pallet requires for the `as_derivative()` function.&#xD;&#xA;&#xD;&#xA;In order to create a derived address that works with `as_derivative()`, I needed to use a different function found in the polkdot-js/util-crypto library called [`encodeDerivedAddress()`][1]&#xD;&#xA;&#xD;&#xA;By passing in the raw byte array along with an index number, I was able to generate a usable derivative address. Once funded, the `as_derivative()` function call I attempted above worked as expected. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/common/blob/master/packages/util-crypto/src/address/encodeDerived.ts" ContentLicense="CC BY-SA 4.0" />
  <row Id="18801" PostHistoryTypeId="2" PostId="5027" RevisionGUID="2b8ac5c6-416e-4128-ab19-f256bc19bb7b" CreationDate="2022-09-27T02:06:03.173" UserId="1959" Text="Well, you should use the values from [my answer in your other question(5,000,000,000).](https://substrate.stackexchange.com/a/4925/1959) And I'll explain to you why.&#xD;&#xA;&#xD;&#xA;First, you need to know that resources available to chains are limited, and weights are the mechanism used to manage the time it takes to validate a block.**The amount of weight a block may contain is limited**. Therefore, relaychain limits the max used weight of individual ump's transact, to ensure that other transactions can be successfully executed. You can find the limit in configuration. Obviously, your `7,000,000,000,000` is greater than `20,000,000,000`[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Afo8O.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18803" PostHistoryTypeId="5" PostId="5027" RevisionGUID="146ab2ae-17a0-4ec6-ae60-90baba18bdeb" CreationDate="2022-09-27T02:18:07.167" UserId="1959" Comment="added 437 characters in body" Text="Well, you should use the values from [my answer in your other question(5,000,000,000).](https://substrate.stackexchange.com/a/4925/1959) And I'll explain to you why.&#xD;&#xA;&#xD;&#xA;First, you need to know that resources available to chains are limited, and weights are the mechanism used to manage the time it takes to validate a block.**The amount of weight a block may contain is limited**. Therefore, relaychain limits the max used weight of individual ump's transact, to ensure that other transactions can be successfully executed. You can find the limit in configuration. Obviously, your `7,000,000,000,000` is greater than `20,000,000,000`[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Then, &#xD;&#xA;&#xD;&#xA;&gt; what does parameter means?&#xD;&#xA;&#xD;&#xA;It means the most weight you are willing to pay for the transact call(here is `hrmp.hrmpInitOpenChannel`).If the weight required by this transact call exceeds the `requireWeightAtMost` you specified, it will fail. If not and lower than `umpMaxIndividualWeight`, it'll be executed(make sure other values are correct) and the surplus weight will be refunded by the `RefundSurplus` instruction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Afo8O.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18804" PostHistoryTypeId="5" PostId="5027" RevisionGUID="ea5d6e4e-cbd0-4d8a-b8a0-3b211815185f" CreationDate="2022-09-27T02:34:10.593" UserId="1959" Comment="added 43 characters in body" Text="Well, you should use the values from [my answer in your other question(5,000,000,000).](https://substrate.stackexchange.com/a/4925/1959) And I'll explain to you why.&#xD;&#xA;&#xD;&#xA;First, you need to know that resources available to chains are limited, and weights are the mechanism used to manage the time it takes to validate a block.**The amount of weight a block may contain is limited**. Therefore, relaychain limits the max used weight of individual ump's transact, to ensure that other transactions can be successfully executed. You can find the limit in configuration. Obviously, your `7,000,000,000,000` is greater than `20,000,000,000`[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Then, &#xD;&#xA;&#xD;&#xA;&gt; what does parameter means?&#xD;&#xA;&#xD;&#xA;It means the most weight you are willing to pay for the transact call(here is `hrmp.hrmpInitOpenChannel`).If the weight required by this transact call(about `786524000`) exceeds the `requireWeightAtMost` you specified, it will fail with `MaxWeightInvalid`. If not and lower than `umpMaxIndividualWeight`, it'll be executed(make sure other values are correct) and the surplus weight will be refunded by the `RefundSurplus` instruction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Afo8O.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18805" PostHistoryTypeId="5" PostId="5027" RevisionGUID="0b174049-875f-4a2d-be2a-7c7fa6fdd675" CreationDate="2022-09-27T03:05:19.663" UserId="1959" Comment="added 274 characters in body" Text="Well, you should use the values from [my answer in your other question(5,000,000,000),](https://substrate.stackexchange.com/a/4925/1959) `hrmp.hrmpInitOpenChannel` does not need so much weight. And I'll explain to you why.&#xD;&#xA;&#xD;&#xA;First, you need to know that resources available to chains are limited, and weights are the mechanism used to manage the time it takes to validate a block.**The amount of weight a block may contain is limited**. Therefore, relaychain limits the max used weight of individual ump's transact, to ensure that other transactions can be successfully executed. You can find the limit in configuration. Obviously, your `7,000,000,000,000` is greater than `20,000,000,000`, then put into the overweight queue and may be dispatched later by `service_overweight`(still may error due to `WeightOverLimit`). [![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;Then, &#xD;&#xA;&#xD;&#xA;&gt; what does parameter means?&#xD;&#xA;&#xD;&#xA;It means the most weight you are willing to pay for the transact call(here is `hrmp.hrmpInitOpenChannel`).If the weight required by this transact call(about `786524000`) exceeds the `requireWeightAtMost` you specified, it will fail with `MaxWeightInvalid`. If not and lower than `umpMaxIndividualWeight`, it'll be executed(make sure other values are correct) and the surplus weight will be refunded by the `RefundSurplus` instruction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Afo8O.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/J86Z9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18806" PostHistoryTypeId="5" PostId="5027" RevisionGUID="56a58b1f-4e90-4327-87c5-b232ab416c74" CreationDate="2022-09-27T03:11:37.193" UserId="1959" Comment="added 98 characters in body" Text="Well, you should use the values from [my answer in your other question(5,000,000,000),](https://substrate.stackexchange.com/a/4925/1959) `hrmp.hrmpInitOpenChannel` does not need so much weight. And I'll explain to you why.&#xD;&#xA;&#xD;&#xA;First, you need to know that resources available to chains are limited, and weights are the mechanism used to manage the time it takes to validate a block.**The amount of weight a block may contain is limited**. Therefore, relaychain limits the max used weight of individual ump's transact, to ensure that other transactions can be successfully executed. You can find the limit in configuration. Obviously, your `7,000,000,000,000` is greater than `20,000,000,000`, then put into the overweight queue and may be dispatched later by [`service_overweight`](https://github.com/paritytech/polkadot/blob/release-v0.9.26/runtime/parachains/src/ump.rs#L349)(still may error due to `WeightOverLimit`). [![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;Then, &#xD;&#xA;&#xD;&#xA;&gt; what does parameter means?&#xD;&#xA;&#xD;&#xA;It means the most weight you are willing to pay for the transact call(here is `hrmp.hrmpInitOpenChannel`).If the weight required by this transact call(about `786524000`) exceeds the `requireWeightAtMost` you specified, it will fail with `MaxWeightInvalid`. If not and lower than `umpMaxIndividualWeight`, it'll be executed(make sure other values are correct) and the surplus weight will be refunded by the `RefundSurplus` instruction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Afo8O.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/J86Z9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18807" PostHistoryTypeId="5" PostId="5027" RevisionGUID="39ebbea7-e99e-4aa3-a4e3-b10cf74bff90" CreationDate="2022-09-27T03:36:20.977" UserId="1959" Comment="added 98 characters in body" Text="Well, this is because **`requireWeightAtMost` you specified is greater than `umpMaxIndividualWeight`**, you should use the values from [my answer in your other question(5,000,000,000),](https://substrate.stackexchange.com/a/4925/1959) `hrmp.hrmpInitOpenChannel` does not need so much weight. And I'll explain to you why.&#xD;&#xA;&#xD;&#xA;First, you need to know that resources available to chains are limited, and weights are the mechanism used to manage the time it takes to validate a block.**The amount of weight a block may contain is limited**. Therefore, relaychain limits the max used weight of individual ump's transact, to ensure that other transactions can be successfully executed. You can find the limit in configuration. Obviously, your `7,000,000,000,000` is greater than `20,000,000,000`, then put into the overweight queue and may be dispatched later by [`service_overweight`](https://github.com/paritytech/polkadot/blob/release-v0.9.26/runtime/parachains/src/ump.rs#L349)(still may error due to `WeightOverLimit`). [![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;Then, &#xD;&#xA;&#xD;&#xA;&gt; what does parameter means?&#xD;&#xA;&#xD;&#xA;It means the most weight you are willing to pay for the transact call(here is `hrmp.hrmpInitOpenChannel`).If the weight required by this transact call(about `786524000`) exceeds the `requireWeightAtMost` you specified, it will fail with `MaxWeightInvalid`. If not and lower than `umpMaxIndividualWeight`, it'll be executed(make sure other values are correct) and the surplus weight will be refunded by the `RefundSurplus` instruction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Afo8O.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/J86Z9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18808" PostHistoryTypeId="2" PostId="5028" RevisionGUID="6e169448-52f0-404c-ae41-51f69f312a2b" CreationDate="2022-09-27T03:36:58.727" UserId="3040" Text="I'm working on UMP message development recently, but I'm confused about the order of execution of multiple ump messages within 1 block,&#xD;&#xA;For example the following transactions&#xD;&#xA;&#xD;&#xA;https://kusama.subscan.io/event?address=&amp;module=ump&amp;event=all&amp;startDate=&amp;endDate=&amp;startBlock=12135562&amp;endBlock=12135562&amp;timeType=block&amp;version=9280&#xD;&#xA;&#xD;&#xA;This block has 3 ump messages. According to the ump (UpwardMessagesReceived) event, we can get 2 messages with para id = 2023 and 1 message with 2085.&#xD;&#xA;It is executed like this&#xD;&#xA;&#xD;&#xA;2023(0x6c072fec7e1c937e6beb64d8287cdd9cb57db806db018e9c752951f65846ffdb)&#xD;&#xA;2085(0x47621c0c081513b75fade4a748e92bf83d32ee79f5200877b08ac1e8d8781777)&#xD;&#xA;2023(0x440a65f382df28a3394e6af5ad1dd9d506ebc67fa9a727e35aee4dd8c8d2c99f)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18810" PostHistoryTypeId="1" PostId="5028" RevisionGUID="6e169448-52f0-404c-ae41-51f69f312a2b" CreationDate="2022-09-27T03:36:58.727" UserId="3040" Text="What is the execution order of the ump message?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18811" PostHistoryTypeId="3" PostId="5028" RevisionGUID="6e169448-52f0-404c-ae41-51f69f312a2b" CreationDate="2022-09-27T03:36:58.727" UserId="3040" Text="|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18812" PostHistoryTypeId="5" PostId="5028" RevisionGUID="910bf237-592e-403d-bd20-9ce13d58fcd7" CreationDate="2022-09-27T03:44:32.173" UserId="3040" Comment="added 7 characters in body" Text="I'm working on UMP message development recently, but I'm confused about the order of execution of multiple ump messages within 1 block,&#xD;&#xA;For example the following transactions&#xD;&#xA;&#xD;&#xA;https://kusama.subscan.io/event?address=&amp;module=ump&amp;event=all&amp;startDate=&amp;endDate=&amp;startBlock=12135562&amp;endBlock=12135562&amp;timeType=block&amp;version=9280&#xD;&#xA;&#xD;&#xA;This block has 3 ump messages. According to the ump (UpwardMessagesReceived) event, we can get 2 messages with para id = 2023 and 1 message with 2085.&#xD;&#xA;&#xD;&#xA;The actual execution order is&#xD;&#xA;&#xD;&#xA;2023(0x6c072fec7e1c937e6beb64d8287cdd9cb57db806db018e9c752951f65846ffdb)&#xD;&#xA;2085(0x47621c0c081513b75fade4a748e92bf83d32ee79f5200877b08ac1e8d8781777)&#xD;&#xA;2023(0x440a65f382df28a3394e6af5ad1dd9d506ebc67fa9a727e35aee4dd8c8d2c99f)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18813" PostHistoryTypeId="2" PostId="5029" RevisionGUID="f07ad6b2-57d4-4668-87b8-d9696bebed71" CreationDate="2022-09-27T04:47:51.120" UserId="3229" Text="I expose RPC from the second node with command:&#xD;&#xA;```&#xD;&#xA;./target/release/node-template   \&#xD;&#xA;--base-path /tmp/node02   \&#xD;&#xA;--chain ./customSpecRaw.json   \&#xD;&#xA;--listen-addr /ip4/0.0.0.0/tcp/30333   \&#xD;&#xA;--ws-port 9946   \&#xD;&#xA;--rpc-port 9934   \&#xD;&#xA;--telemetry-url 'wss://telemetry.polkadot.io/submit/ 0'   \&#xD;&#xA;--validator   \&#xD;&#xA;--rpc-methods Unsafe   \&#xD;&#xA;--name MyNode02   \&#xD;&#xA;--bootnodes /ip4/&lt;boot_node_ip&gt;/tcp/30333/p2p/12xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   \&#xD;&#xA;--password-interactive \&#xD;&#xA;--ws-external&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I checked this socket port is running with telnet:&#xD;&#xA;```&#xD;&#xA;telnet 54.254.180.131 9946&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I got error **The operation is insecure** from explorer site: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F54.254.180.131%3A9946#/explorer&#xD;&#xA;&#xD;&#xA;How I explore my node from polkadot.js?&#xD;&#xA;&#xD;&#xA;Many thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="18815" PostHistoryTypeId="1" PostId="5029" RevisionGUID="f07ad6b2-57d4-4668-87b8-d9696bebed71" CreationDate="2022-09-27T04:47:51.120" UserId="3229" Text="Can't access substrate node explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="18816" PostHistoryTypeId="3" PostId="5029" RevisionGUID="f07ad6b2-57d4-4668-87b8-d9696bebed71" CreationDate="2022-09-27T04:47:51.120" UserId="3229" Text="|substrate-node|substrate-node-template|rpc|explorer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18817" PostHistoryTypeId="2" PostId="5030" RevisionGUID="bcaaf081-bdc4-4d6d-a13d-2399e160c252" CreationDate="2022-09-27T05:53:01.967" UserId="251" Text="I didn't come out with a security reason yet. Maybe I don't have too much knowledge of this.&#xD;&#xA;&#xD;&#xA;It's a downgrade privilege operation.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;IMHO, the XCMP is not fully ready yet. It's still HRMP.&#xD;&#xA;&#xD;&#xA;If we allow anyone to use that, it might cause some network/storage issues.&#xD;&#xA;&#xD;&#xA;Just a personal idea." ContentLicense="CC BY-SA 4.0" />
  <row Id="18819" PostHistoryTypeId="2" PostId="5031" RevisionGUID="2cf986f3-46a9-4f82-9447-2f6a22ed90c8" CreationDate="2022-09-27T06:06:29.143" UserId="620" Text="Messages over UMP, DMP, and later XCMP are asynchronous, so there is no guarantee that a message that was sent first will be executed first. However, messages within _a channel_ are executed in the order they were sent.&#xD;&#xA;&#xD;&#xA;So, in your example, the two messages from 2023 will be executed in the order they were sent relative to each other (0x6c, then 0x44), but there is no information there about whether 2023 or 2085 sent its message first." ContentLicense="CC BY-SA 4.0" />
  <row Id="18825" PostHistoryTypeId="2" PostId="5033" RevisionGUID="b31dc79e-a043-4851-a4a0-68d3044aaa11" CreationDate="2022-09-27T06:09:26.457" UserId="3217" Text="I'm trying to run the following benchmark test:&#xD;&#xA;```&#xD;&#xA;use primitives::{CurrencyId, TokenId};&#xD;&#xA;&#xD;&#xA;benchmarks! {&#xD;&#xA;	onboard_asset {&#xD;&#xA;		let caller: T::AccountId = whitelisted_caller();&#xD;&#xA;		let currency_id: CurrencyId = CurrencyId::NativeToken(TokenId::GasToken);&#xD;&#xA;		let enabled: bool = true;&#xD;&#xA;	}: _(RawOrigin::Root, currency_id.clone(), enabled.clone())&#xD;&#xA;	verify {&#xD;&#xA;		assert_eq!(FeeAssets::&lt;T&gt;::get(currency_id), Some(enabled));&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;but am getting this error:&#xD;&#xA;```&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;  --&gt; pallets/fee-enablement/src/benchmarking.rs:14:24&#xD;&#xA;   |&#xD;&#xA;9  | / benchmarks! {&#xD;&#xA;10 | |     onboard_asset {&#xD;&#xA;11 | |         let caller: T::AccountId = whitelisted_caller();&#xD;&#xA;12 | |         let currency_id: CurrencyId = CurrencyId::NativeToken(TokenId::GasToken);&#xD;&#xA;13 | |         let enabled: bool = true;&#xD;&#xA;14 | |     }: _(RawOrigin::Root, currency_id.clone(), enabled.clone())&#xD;&#xA;   | |                           ^^^^^^^^^^^^^^^^^^^ expected associated type, found enum `CurrencyId`&#xD;&#xA;...  |&#xD;&#xA;36 | |     impl_benchmark_test_suite!(FeeEnablement, crate::mock::ExtBuilder::default().build(), crate::mock::Runtime);&#xD;&#xA;37 | | }&#xD;&#xA;   | |_- arguments to this function are incorrect&#xD;&#xA;   |&#xD;&#xA;   = note: expected associated type `&lt;&lt;T as pallet::Config&gt;::MultiCurrency as orml_traits::MultiCurrency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::CurrencyId`&#xD;&#xA;                         found enum `CurrencyId`&#xD;&#xA;   = help: consider constraining the associated type `&lt;&lt;T as pallet::Config&gt;::MultiCurrency as orml_traits::MultiCurrency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::CurrencyId` to `CurrencyId` or calling a method that returns `&lt;&lt;T as pallet::Config&gt;::MultiCurrency as orml_traits::MultiCurrency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::CurrencyId`&#xD;&#xA;   = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html&#xD;&#xA;note: associated function defined here&#xD;&#xA;  --&gt; pallets/fee-enablement/src/lib.rs:77:10&#xD;&#xA;   |&#xD;&#xA;74 |        #[pallet::call]&#xD;&#xA;   |   _______________-&#xD;&#xA;   |  |_______________|&#xD;&#xA;   | ||&#xD;&#xA;75 | ||     impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;76 | ||         #[pallet::weight(1000]&#xD;&#xA;77 | ||         pub fn onboard_asset(&#xD;&#xA;   | ||                ^^^^^^^^^^^^^&#xD;&#xA;78 | ||             origin: OriginFor&lt;T&gt;,&#xD;&#xA;79 | ||             asset_id: CurrencyOf&lt;T, T::MultiCurrency&gt;,&#xD;&#xA;   | ||____________-&#xD;&#xA;80 | |              enabled: bool,&#xD;&#xA;   | |_____________-&#xD;&#xA;```&#xD;&#xA;The associated type `&lt;&lt;T as pallet::Config&gt;::MultiCurrency as orml_traits::MultiCurrency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::CurrencyId` is declared to be the enum `CurrencyId`in the mock runtime definition. &#xD;&#xA;&#xD;&#xA;The same function accepts `CurrencyId` enum as input parameter when I run it in unit tests, but throws this mismatched types error for benchmark tests. Please help me fix this error. Thanks in advance :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="18827" PostHistoryTypeId="1" PostId="5033" RevisionGUID="b31dc79e-a043-4851-a4a0-68d3044aaa11" CreationDate="2022-09-27T06:09:26.457" UserId="3217" Text="Error: Expected associated type but found enum. I'm getting this error even after defining the associated type as a custom enum in the mock runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="18828" PostHistoryTypeId="3" PostId="5033" RevisionGUID="b31dc79e-a043-4851-a4a0-68d3044aaa11" CreationDate="2022-09-27T06:09:26.457" UserId="3217" Text="|benchmarking|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18829" PostHistoryTypeId="2" PostId="5034" RevisionGUID="acb534cc-ba02-41e8-aba9-023e7d7c9327" CreationDate="2022-09-27T06:23:11.943" UserId="251" Text="You should convert the `CurrencyId` to the associated type.&#xD;&#xA;&#xD;&#xA;I'm not familiar with your code.&#xD;&#xA;&#xD;&#xA;But here is a simple example.&#xD;&#xA;&#xD;&#xA;Note, these are pseudo codes.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;trait Currency {&#xD;&#xA;    type Balance: From&lt;u128&gt;;&#xD;&#xA;}&#xD;&#xA;type Balance = Currency::Balance;&#xD;&#xA;fn mint(origin, balance: Balance) {}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;benchmarks! {&#xD;&#xA;    let amount: Balance = 100_u128.into();&#xD;&#xA;    mint(someone, amount);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Although, we config the `Balance = u128` in mock/runtime.&#xD;&#xA;&#xD;&#xA;You can not use `u128` directly, you need to convert it to the `Balance` associated type.&#xD;&#xA;&#xD;&#xA;Just like you can not use `CurrencyId` directly, you need to convert it to the `CurrencyOf&lt;T, T::MultiCurrency&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="18833" PostHistoryTypeId="2" PostId="5035" RevisionGUID="c9db61e8-5cd9-4c33-8998-f31749a09697" CreationDate="2022-09-27T07:01:42.233" UserId="1959" Text="Have you tried allowing Insecure content？Chrome allows you to connect to wss by default, but you are using ws. So you could try to allow insecure content for development. Also try Xavier's answer in another question https://substrate.stackexchange.com/a/4933/1959&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WAfo8.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/y56DP.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18836" PostHistoryTypeId="2" PostId="5036" RevisionGUID="d01231d8-6cc9-4230-bbba-a22dc9442dcf" CreationDate="2022-09-27T08:49:43.290" UserId="2673" Text="You can add a `where_clause` to your benchmarks which allows to enforce that associated types from the pallet's config are some particular concrete types.&#xD;&#xA;&#xD;&#xA;I believe something along this lines should work for your case:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;benchmarks! {&#xD;&#xA;    where_clause {&#xD;&#xA;        where&#xD;&#xA;            T: pallet::Config,&#xD;&#xA;            T::MultiCurrency: orml_traits::MultiCurrency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;,&#xD;&#xA;            T::MultiCurrency::CurrencyId: CurrencyId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18838" PostHistoryTypeId="2" PostId="5037" RevisionGUID="8e42a128-859d-448c-90a1-13f85d4baae6" CreationDate="2022-09-27T09:43:47.723" UserId="3237" Text="In the below code, I'm passing something of u32 type. How can I pass a text(String) instead of u32?&#xD;&#xA;```&#xD;&#xA;pub fn do_something(origin, something: u32) -&gt; dispatch::DispatchResult {&#xD;&#xA;			&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// Update storage.&#xD;&#xA;			Something::put(something);&#xD;&#xA;&#xD;&#xA;			// Emit an event.&#xD;&#xA;			Self::deposit_event(RawEvent::SomethingStored(something, who));&#xD;&#xA;			// Return a successful DispatchResult&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18840" PostHistoryTypeId="1" PostId="5037" RevisionGUID="8e42a128-859d-448c-90a1-13f85d4baae6" CreationDate="2022-09-27T09:43:47.723" UserId="3237" Text="How to pass a String argument to a custom pallet function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18841" PostHistoryTypeId="3" PostId="5037" RevisionGUID="8e42a128-859d-448c-90a1-13f85d4baae6" CreationDate="2022-09-27T09:43:47.723" UserId="3237" Text="|polkadot|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18842" PostHistoryTypeId="2" PostId="5038" RevisionGUID="99d2eaf2-2980-44d9-9da5-d55078edd5ce" CreationDate="2022-09-27T09:45:56.760" UserId="2663" Text="I'm trying to get the authors of the blocks using the `pallet_authorship` but when I inspect the authorship on the polkadot.js app I get `none` as result.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/IXcCf.png&#xD;&#xA;&#xD;&#xA;This is my implementation of the `pallet_authorship` for the runtime: https://github.com/Datagen-Project/Datagen-Substrate-Grant/blob/744d01400825f7b4ebd8a1ab621739a13e19a09a/fast_blockchain/runtime/src/lib.rs#L302&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18844" PostHistoryTypeId="1" PostId="5038" RevisionGUID="99d2eaf2-2980-44d9-9da5-d55078edd5ce" CreationDate="2022-09-27T09:45:56.760" UserId="2663" Text="pallet_authorship implementation doesn't work with Aura consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="18845" PostHistoryTypeId="3" PostId="5038" RevisionGUID="99d2eaf2-2980-44d9-9da5-d55078edd5ce" CreationDate="2022-09-27T09:45:56.760" UserId="2663" Text="|aura|authorship|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18846" PostHistoryTypeId="2" PostId="5039" RevisionGUID="7530e553-b84b-4c6d-ad0a-7144a92483c8" CreationDate="2022-09-27T09:48:28.390" UserId="251" Text="`String` is a special `Vec&lt;u8&gt;` actually.&#xD;&#xA;&#xD;&#xA;You could use `Vec&lt;u8&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="18848" PostHistoryTypeId="2" PostId="5040" RevisionGUID="a4415fae-0be8-44e9-835f-ba90a04b4c20" CreationDate="2022-09-27T10:52:08.943" UserId="2136" Text="When I call instantiateWithCode, I need around 288,000,000 gas. But to call instantiate (having already uploaded the code separately) I need 75,000,000,000. &#xD;&#xA;&#xD;&#xA;I would have expected the more simple instantiate to require less gas but the opposite is the case.&#xD;&#xA;&#xD;&#xA;Why is this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18850" PostHistoryTypeId="1" PostId="5040" RevisionGUID="a4415fae-0be8-44e9-835f-ba90a04b4c20" CreationDate="2022-09-27T10:52:08.943" UserId="2136" Text="Why is so much more gas used by instantiate than instantiateWithCode in the contracts pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18851" PostHistoryTypeId="3" PostId="5040" RevisionGUID="a4415fae-0be8-44e9-835f-ba90a04b4c20" CreationDate="2022-09-27T10:52:08.943" UserId="2136" Text="|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18852" PostHistoryTypeId="12" PostId="5021" RevisionGUID="472bf805-338b-4b0a-bd4b-d1b3872ccc65" CreationDate="2022-09-27T10:58:48.887" UserId="19" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:19,&quot;DisplayName&quot;:&quot;Tomasz Waszczyk&quot;}]}" />
  <row Id="18853" PostHistoryTypeId="13" PostId="5021" RevisionGUID="3fef53ba-6e65-4b9b-8e54-8c0201315b6c" CreationDate="2022-09-27T10:59:01.540" UserId="19" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:19,&quot;DisplayName&quot;:&quot;Tomasz Waszczyk&quot;}]}" />
  <row Id="18854" PostHistoryTypeId="2" PostId="5041" RevisionGUID="7f0f4147-07d6-4ff7-993a-fc634068d17f" CreationDate="2022-09-27T11:00:16.047" UserId="3121" Text="My elementary understanding is that a Crate is a collection of modules or pallets, and a Package is a collection of Crates.&#xD;&#xA;But I came across [this](https://crates.io/crates/pallet-balances) &quot;pallet&quot; in crates.io and am now unsure why it is self-referred to as a pallet instead of a crate.&#xD;&#xA;&#xD;&#xA;Can someone please help me better understand with respect to this example?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18856" PostHistoryTypeId="1" PostId="5041" RevisionGUID="7f0f4147-07d6-4ff7-993a-fc634068d17f" CreationDate="2022-09-27T11:00:16.047" UserId="3121" Text="Confused on terminology - Module/Pallet vs Crate vs Package" ContentLicense="CC BY-SA 4.0" />
  <row Id="18857" PostHistoryTypeId="3" PostId="5041" RevisionGUID="7f0f4147-07d6-4ff7-993a-fc634068d17f" CreationDate="2022-09-27T11:00:16.047" UserId="3121" Text="|pallet|substrate-recipes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18858" PostHistoryTypeId="2" PostId="5042" RevisionGUID="779f2dbb-3989-4d2e-8875-62d552ff4734" CreationDate="2022-09-27T11:32:03.920" UserId="16" Text="First, you need to understand the difference between `gas_consumed` and `gas_required`. The latter one is what you need to set as `gas_limit` and the former one is what is actually consumed and what is payed fees on. I assume that you are referring to `gas_required` here.&#xD;&#xA;&#xD;&#xA;The reason for that value being higher for `instantiate` is that we cannot know how big a contract code is before loading it from storage. Hence we need to pre-charge the maximum contract size and then refund it after loading. This leads to a spike in gas which can push `gas_required` higher than `gas_consumed`. If that actually is the case depends on how much gas is consumed later during contract execution. `instantiate_with_code` doesn't have this issue as the code is not loaded from storage but passed as part of the extrinsic.&#xD;&#xA;&#xD;&#xA;When comparing the value of `gas_consumed` instead of `gas_required` it should be in fact higher for `instantiate_with_code`." ContentLicense="CC BY-SA 4.0" />
  <row Id="18860" PostHistoryTypeId="2" PostId="5043" RevisionGUID="214473af-3742-4e42-ad4b-08594ff14cd2" CreationDate="2022-09-27T11:36:17.250" UserId="19" Text="I will do my best to explain it because in the beginning of my journey I was also confused of that all terms.&#xD;&#xA;&#xD;&#xA;`Crate` - the term comes from directly of Rust language and is the smallest amount of code that the Rust compiler considers at a time.&#xD;&#xA;&#xD;&#xA;`Package` - the term also comes from directly of Rust language and is a bundle of one or more crates that provides concrete functionalities.&#xD;&#xA;&#xD;&#xA;`Pallet` - the term comes from Substrate terminology and provides some set of functionalities within Substrate chain, below you can see set of pallets:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Additionally, you can be confused with meaning of `Frame` - `Frame` is like dialect of Rust language used in Substrate, but `Frame` is NOT Rust language term, `Frame` is the term used in `Substrate` framework.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SsOzK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18862" PostHistoryTypeId="6" PostId="4420" RevisionGUID="4e76e237-8e3f-4548-99c8-e17f1bf2cb80" CreationDate="2022-09-27T11:38:43.793" UserId="16" Comment="edited tags" Text="|ink|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18863" PostHistoryTypeId="4" PostId="4420" RevisionGUID="4e76e237-8e3f-4548-99c8-e17f1bf2cb80" CreationDate="2022-09-27T11:38:43.793" UserId="16" Comment="edited tags" Text="Access to chain extension method from another module in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="18864" PostHistoryTypeId="5" PostId="4420" RevisionGUID="4e76e237-8e3f-4548-99c8-e17f1bf2cb80" CreationDate="2022-09-27T11:38:43.793" UserId="16" Comment="edited tags" Text="# Summary &#xD;&#xA;&#xD;&#xA;I am using an Ink! smart contract (implemented in contract.rs) code calling a chain extension method. &#xD;&#xA;&#xD;&#xA;This works well. &#xD;&#xA;&#xD;&#xA;However, I want to split my code and call the extension method in a new module (let's call it util.rs). &#xD;&#xA;&#xD;&#xA;What is the idiomatic way to share the same env with this module.&#xD;&#xA;In other words I want to be able to call self.env().extension.my_method from utils.rs method.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Update&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I will ask my question in a more concise and concrete way, suppose the following code in a ink! smart contract:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use crate::CustomEnvironment;&#xD;&#xA;&#xD;&#xA;// use ink_env::chain_extension::ChainExtension; NOT EXPOSED PUBLICLY&#xD;&#xA;&#xD;&#xA;// Suppose we want to define this method that takes the extension as parameter&#xD;&#xA;fn call_a_method_extension(ext: &lt;&lt;CustomEnvironment&gt;::ChainExtension as ChainExtensionInstance&gt;::Instance) {&#xD;&#xA;    // use ext here&#xD;&#xA;    // ext.call_on_chain_method&#xD;&#xA;}&#xD;&#xA;// ...&#xD;&#xA;let ext = Self::env().extension();&#xD;&#xA;// Info from rust-analyser:&#xD;&#xA;// ChainExtensionInstance&lt;Self = Environment&lt;Self = E&gt;::ChainExtension&gt;::Instance&#xD;&#xA;// &lt;&lt;E as Environment&gt;::ChainExtension as ChainExtensionInstance&gt;::Instance&#xD;&#xA;&#xD;&#xA;// we want to pass ext to call_a_method_extension&#xD;&#xA;call_a_method_extension(ext);&#xD;&#xA;&#xD;&#xA;// ...&#xD;&#xA;#[derive(Debug, Copy, Clone, PartialEq, Eq)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;pub enum CustomEnvironment {}&#xD;&#xA;&#xD;&#xA;impl Environment for CustomEnvironment {&#xD;&#xA;    const MAX_EVENT_TOPICS: usize = &lt;ink_env::DefaultEnvironment as Environment&gt;::MAX_EVENT_TOPICS;&#xD;&#xA;&#xD;&#xA;    type AccountId = &lt;ink_env::DefaultEnvironment as Environment&gt;::AccountId;&#xD;&#xA;    type Balance = &lt;ink_env::DefaultEnvironment as Environment&gt;::Balance;&#xD;&#xA;    type Hash = &lt;ink_env::DefaultEnvironment as Environment&gt;::Hash;&#xD;&#xA;    type BlockNumber = &lt;ink_env::DefaultEnvironment as Environment&gt;::BlockNumber;&#xD;&#xA;    type Timestamp = &lt;ink_env::DefaultEnvironment as Environment&gt;::Timestamp;&#xD;&#xA;&#xD;&#xA;    type ChainExtension = ConcreteOps;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;What type need to be written to the ext parameter in call_a_method_extension method ? &#xD;&#xA;&#xD;&#xA;# Archive&#xD;&#xA;&#xD;&#xA;## First attempt&#xD;&#xA;&#xD;&#xA;I try to overlad the + operation with a basic functions for now.&#xD;&#xA;&#xD;&#xA;## Share the EnvAccess to a struct defined in util.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// utils.rs&#xD;&#xA;use crate::CustomEnvironment;&#xD;&#xA;use ink_lang::EnvAccess;&#xD;&#xA;&#xD;&#xA;#[derive(Debug)]&#xD;&#xA;pub struct VeryUtil&lt;'a&gt; {&#xD;&#xA;    pub value: ink_prelude::vec::Vec&lt;u8&gt;,&#xD;&#xA;    pub extension: EnvAccess&lt;'a, CustomEnvironment&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;'a&gt; VeryUtil&lt;'a&gt; {&#xD;&#xA;    pub fn new(&#xD;&#xA;        value: ink_prelude::vec::Vec&lt;u8&gt;,&#xD;&#xA;        extension: EnvAccess&lt;'a, CustomEnvironment&gt;,&#xD;&#xA;    ) -&gt; Self {&#xD;&#xA;        VeryUtil { value, extension }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl core::ops::Add&lt;VeryUtil&lt;'_&gt;&gt; for VeryUtil&lt;'_&gt; {&#xD;&#xA;    // For the next line I get&#xD;&#xA;    // generic associated types are unstable&#xD;&#xA;    // type Output&lt;'a&gt; = VeryUtil&lt;'a&gt;;&#xD;&#xA;&#xD;&#xA;    // for now I tested with&#xD;&#xA;    type Output = Vec&lt;u8&gt;;&#xD;&#xA;&#xD;&#xA;    fn add(self, rhs: VeryUtil) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;        println!(&quot;&gt; add is called&quot;);&#xD;&#xA;&#xD;&#xA;        let val = self&#xD;&#xA;            .extension&#xD;&#xA;            .extension()&#xD;&#xA;            .add_values(&amp;self.value, &amp;rhs.value);&#xD;&#xA;&#xD;&#xA;        val.unwrap()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here I get a warning when the output was the same struct, I commented in the code. &#xD;&#xA;A subsidiary question is how to avoid to share for each struct the env, but without it I would not be able to call the extension method in the Add overload part!&#xD;&#xA;&#xD;&#xA;## Use the defined  struct in one of the exposed contract methods: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// contract.rs&#xD;&#xA;1 let very_util_val1 = crate::util::VeryUtil::new(my_vec1.clone(), self.env());&#xD;&#xA;2 let very_util_val2 = crate::util::VeryUtil::new(my_vec2.clone(), self.env());&#xD;&#xA;3 // All the code purpose is to be able to do this!!!&#xD;&#xA;4 let result = very_util_val1 + very_util_val2 &#xD;&#xA;```&#xD;&#xA;I get the following error for line 1 and 2 : &#xD;&#xA;```&#xD;&#xA;cannot borrow `*self` as mutable because it is also borrowed as immutable&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My initial choice was to share a *__ink_ConreteOpsInstance* (self.env().extension) but I did not know how to define this type in my struct. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Another idea&#xD;&#xA;&#xD;&#xA;Maybe I can ask access like the contract module with the following macro ...&#xD;&#xA;```rust&#xD;&#xA;#[ink::contract(env = crate::CustomEnvironment)]&#xD;&#xA;```&#xD;&#xA;... but this module is not a contract just a sub module.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18865" PostHistoryTypeId="5" PostId="5043" RevisionGUID="04f50ca7-5991-4f50-ac1b-324c3370cf0a" CreationDate="2022-09-27T11:42:34.807" UserId="19" Comment="added 91 characters in body" Text="I will do my best to explain it because in the beginning of my journey I was also confused of that all terms.&#xD;&#xA;&#xD;&#xA;`Crate` - the term comes from directly of Rust language and is the smallest amount of code that the Rust compiler considers at a time.&#xD;&#xA;&#xD;&#xA;`Package` - the term also comes from directly of Rust language and is a bundle of one or more crates that provides concrete functionalities. A package contains a `Cargo.toml` file that describes how included crates should be build.&#xD;&#xA;&#xD;&#xA;`Pallet` - the term comes from Substrate terminology and provides some set of functionalities within Substrate chain, below you can see set of pallets:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Additionally, you can be confused with meaning of `Frame` - `Frame` is like dialect of Rust language used in Substrate, but `Frame` is NOT Rust language term, `Frame` is the term used in `Substrate` framework.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SsOzK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18866" PostHistoryTypeId="5" PostId="4449" RevisionGUID="92dffdfe-71ab-4dfa-941e-c14c537a6fa9" CreationDate="2022-09-27T11:47:51.173" UserId="16" Comment="added 4 characters in body" Text="I am trying to validate an ink contract:&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;    &quot;source&quot;: {&#xD;&#xA;        &quot;hash&quot;: &quot;0xb7233c251935e3ea430f99396cbb9430dd44ac2d07e447fd2003e81ad1d4a577&quot;,&#xD;&#xA;        &quot;language&quot;: &quot;ink! 3.3.1&quot;,&#xD;&#xA;        &quot;compiler&quot;: &quot;rustc 1.65.0-nightly&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;contract&quot;: {&#xD;&#xA;        &quot;name&quot;: &quot;my_psp22_metadata&quot;,&#xD;&#xA;        &quot;version&quot;: &quot;2.2.0&quot;,&#xD;&#xA;        &quot;authors&quot;: [&#xD;&#xA;            &quot;Author's email&quot;&#xD;&#xA;        ]&#xD;&#xA;    },&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The contract was successfully [deployed on shiden][1] so i am sure that metadata is correct.&#xD;&#xA;&#xD;&#xA;The problem is that i can't validate the metadata and interact with the contract.&#xD;&#xA;I tested validation on the latest json schema from the ink master branch.&#xD;&#xA;Here is the errors - https://www.jsonschemavalidator.net/s/EyN4d6Az&#xD;&#xA;&#xD;&#xA;I guess the schema is incorrect or outdated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkaholic.io/tx/0x2c986a6cb47b94a9e50f5d3f660e0f37177989594eb087bf7309c2e15e2340c8" ContentLicense="CC BY-SA 4.0" />
  <row Id="18867" PostHistoryTypeId="5" PostId="5043" RevisionGUID="5e1dede2-67c4-4785-a225-a73a4f5a8f69" CreationDate="2022-09-27T11:53:01.393" UserId="19" Comment="added 91 characters in body" Text="I will do my best to explain it because in the beginning of my journey I was also confused with of that all terms.&#xD;&#xA;&#xD;&#xA;`Crate` - the term comes from directly of Rust language and is the smallest amount of code that the Rust compiler considers at a time.&#xD;&#xA;&#xD;&#xA;`Package` - the term also comes from directly of Rust language and is a bundle of one or more crates that provides concrete functionalities. A package contains a `Cargo.toml` file that describes how included crates should be build. `Package` is a feature of `Cargo` that lets you just build, test and share crates.&#xD;&#xA;&#xD;&#xA;`Module` - the term also comes from directly of Rust language and is a place for [your code](https://doc.rust-lang.org/book/ch07-02-defining-modules-to-control-scope-and-privacy.html) where you can control scope of your implementation and logic of source code.&#xD;&#xA;&#xD;&#xA;`Pallet` - the term comes from Substrate terminology and provides some set of functionalities within Substrate chain, below you can see set of pallets:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Additionally, you can be confused with meaning of `Frame` - `Frame` is like dialect of Rust language used in Substrate, but `Frame` is NOT Rust language term, `Frame` is the term used in `Substrate` framework.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SsOzK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18868" PostHistoryTypeId="6" PostId="5023" RevisionGUID="03419bad-9f51-4de3-8934-55ab130d9681" CreationDate="2022-09-27T12:03:14.950" UserId="627" Comment="edited tags" Text="|substrate-node|wasm|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18869" PostHistoryTypeId="6" PostId="4980" RevisionGUID="2316c955-ebfa-41d5-bffe-1a182ed2ff1b" CreationDate="2022-09-27T12:06:01.650" UserId="627" Comment="edited tags" Text="|astar|validation|address|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18870" PostHistoryTypeId="5" PostId="5043" RevisionGUID="5623230e-8161-4e13-9686-89c4c6e50d1f" CreationDate="2022-09-27T12:10:09.523" UserId="19" Comment="edited body" Text="I will do my best to explain it because in the beginning of my journey I was also confused with of all that terms.&#xD;&#xA;&#xD;&#xA;`Crate` - the term comes from directly of Rust language and is the smallest amount of code that the Rust compiler considers at a time.&#xD;&#xA;&#xD;&#xA;`Package` - the term also comes from directly of Rust language and is a bundle of one or more crates that provides concrete functionalities. A package contains a `Cargo.toml` file that describes how included crates should be build. `Package` is a feature of `Cargo` that lets you just build, test and share crates.&#xD;&#xA;&#xD;&#xA;`Module` - the term also comes from directly of Rust language and is a place for [your code](https://doc.rust-lang.org/book/ch07-02-defining-modules-to-control-scope-and-privacy.html) where you can control scope of your implementation and logic of source code.&#xD;&#xA;&#xD;&#xA;`Pallet` - the term comes from Substrate terminology and provides some set of functionalities within Substrate chain, below you can see set of pallets:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Additionally, you can be confused with meaning of `Frame` - `Frame` is like dialect of Rust language used in Substrate, but `Frame` is NOT Rust language term, `Frame` is the term used in `Substrate` framework.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SsOzK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18871" PostHistoryTypeId="2" PostId="5044" RevisionGUID="39711524-d104-46df-9c84-b52f2843cb72" CreationDate="2022-09-27T12:16:48.537" UserId="2731" Text="I am currently using the polkadot sdk in my typescript project and while I was attempting to upgrade their versions, I deleted my yarn.lock file and reran yarn install but now I get this when I try and run the project&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I saw online that yarn dedupe would help but since I am already using yarn v2, it should be built in and thus I am not able to run that command manually.&#xD;&#xA;&#xD;&#xA;Here are the three polkadot dependencies I am trying to import into my project: [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I'm struggling to figure out how to fix this as I dont want to have to rely on manually going in and deleting duplicate packets every time I do a fresh yarn install.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Ytcx2.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/zpwaY.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18873" PostHistoryTypeId="1" PostId="5044" RevisionGUID="39711524-d104-46df-9c84-b52f2843cb72" CreationDate="2022-09-27T12:16:48.537" UserId="2731" Text="Resolving duplicate polkadot dependencies polkadot typescript sdk" ContentLicense="CC BY-SA 4.0" />
  <row Id="18874" PostHistoryTypeId="3" PostId="5044" RevisionGUID="39711524-d104-46df-9c84-b52f2843cb72" CreationDate="2022-09-27T12:16:48.537" UserId="2731" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18875" PostHistoryTypeId="2" PostId="5045" RevisionGUID="3ac391e4-3b0f-4bb8-95dc-c2cac6f60cdf" CreationDate="2022-09-27T13:36:01.693" UserId="2884" Text="I'm using Transact to execute an extrinsic from one parachain to another. This extrinsic requires the origin to be a signed account which I'm verifying with ensure_signed.&#xD;&#xA;&#xD;&#xA;The way I'm getting a signed account from an xcm origin is through the OriginConverter type defined on xcm_executor::Config in the runtime. I had to implement my own struct to retrieve the account id sent down and converted into a signed accountId:&#xD;&#xA;```rust&#xD;&#xA;pub struct SignedAccountId32FromXcm&lt;Origin&gt;(PhantomData&lt;(Origin)&gt;);&#xD;&#xA;impl&lt; Origin: OriginTrait&gt; ConvertOrigin&lt;Origin&gt;&#xD;&#xA;for SignedAccountId32FromXcm&lt;Origin&gt;&#xD;&#xA;	where&#xD;&#xA;		Origin::AccountId: From&lt;[u8; 32]&gt;,&#xD;&#xA;{&#xD;&#xA;	fn convert_origin(&#xD;&#xA;		origin: impl Into&lt;MultiLocation&gt;,&#xD;&#xA;		kind: OriginKind,&#xD;&#xA;	) -&gt; Result&lt;Origin, MultiLocation&gt; {&#xD;&#xA;		let origin = origin.into();&#xD;&#xA;		log::trace!(&#xD;&#xA;			target: &quot;xcm::origin_conversion&quot;,&#xD;&#xA;			&quot;SignedAccountId32AsNative origin: {:?}, kind: {:?}&quot;,&#xD;&#xA;			origin, kind,&#xD;&#xA;		);&#xD;&#xA; 		match (kind, origin) {&#xD;&#xA;			(&#xD;&#xA;				OriginKind::Xcm,&#xD;&#xA;				MultiLocation { parents: 1, interior: X2(Junction::Parachain(para_id), Junction::AccountId32 { id, network }) },&#xD;&#xA;			) =&gt;&#xD;&#xA;				Ok(Origin::signed(id.into())),&#xD;&#xA;			(_, origin) =&gt; Err(origin),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The way I see it, there is no actual check that the person who sent the xcm is the owner of the accountId. There is no signature on the message or anything. I am just creating a Origin::signed(id) from the id extracted.&#xD;&#xA;&#xD;&#xA;So how would I go about ensuring that an origin sent with DescendOrigin is signed, or trusted to be from the person who own the private key of that account? " ContentLicense="CC BY-SA 4.0" />
  <row Id="18877" PostHistoryTypeId="1" PostId="5045" RevisionGUID="3ac391e4-3b0f-4bb8-95dc-c2cac6f60cdf" CreationDate="2022-09-27T13:36:01.693" UserId="2884" Text="How to avoid impersonation when using DescendOrigin XCM" ContentLicense="CC BY-SA 4.0" />
  <row Id="18878" PostHistoryTypeId="3" PostId="5045" RevisionGUID="3ac391e4-3b0f-4bb8-95dc-c2cac6f60cdf" CreationDate="2022-09-27T13:36:01.693" UserId="2884" Text="|xcm|xcmp|key|origin|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18879" PostHistoryTypeId="2" PostId="5046" RevisionGUID="6ef21882-f1b3-43d7-9af0-96640f394f53" CreationDate="2022-09-27T13:49:53.200" UserId="1959" Text="&gt; So how would I go about ensuring that an origin sent with DescendOrigin is signed, or trusted to be from the person who own the private key of that account&#xD;&#xA;&#xD;&#xA;Note the `ConvertOrigin` you mentioned is executed on receiver chain, it can trust any `DescendOrigin` instruction. And the security should be guaranteed by the sender chain.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;ParaA send `DescendOrigin(Alice)` to ParaB, ParaA need to make sure Alic has signed, then can add DescendOrigin(Alice) to the message, and then send it to ParaB. ParaB only needs to execute the DescendOrigin instruction." ContentLicense="CC BY-SA 4.0" />
  <row Id="18881" PostHistoryTypeId="2" PostId="5047" RevisionGUID="66be35ce-5fe1-445d-9dcb-7e532cbd71b8" CreationDate="2022-09-27T13:54:42.920" UserId="3237" Text="I'm storing a vector of struct data inside a StorageValue, like this..&#xD;&#xA;```&#xD;&#xA;StorageValue&lt;_, BoundedVec&lt;RootClubForm&lt;T&gt;, T::MaxValue&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Is there any way I can automatically remove data from the storage value based on a time Interval, for ex: I want to remove data older than 10 minutes!" ContentLicense="CC BY-SA 4.0" />
  <row Id="18883" PostHistoryTypeId="1" PostId="5047" RevisionGUID="66be35ce-5fe1-445d-9dcb-7e532cbd71b8" CreationDate="2022-09-27T13:54:42.920" UserId="3237" Text="How to remove storage item(vector data) automatically after a time interval?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18884" PostHistoryTypeId="3" PostId="5047" RevisionGUID="66be35ce-5fe1-445d-9dcb-7e532cbd71b8" CreationDate="2022-09-27T13:54:42.920" UserId="3237" Text="|substrate-node|polkadot|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18885" PostHistoryTypeId="5" PostId="5046" RevisionGUID="3316de5a-735b-4eda-aa82-a602e510529a" CreationDate="2022-09-27T14:00:47.630" UserId="1959" Comment="added 441 characters in body" Text="&gt; So how would I go about ensuring that an origin sent with DescendOrigin is signed, or trusted to be from the person who own the private key of that account&#xD;&#xA;&#xD;&#xA;Note the `ConvertOrigin` you mentioned is executed on receiver chain, it can trust any `DescendOrigin` instruction. And the security should be guaranteed by the sender chain.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;ParaA send `DescendOrigin(Alice)` to ParaB, ParaA need to make sure Alice has signed, then can add `DescendOrigin(Alice)` to the message, and then send it to ParaB. ParaB only needs to execute the `DescendOrigin` instruction.&#xD;&#xA;&#xD;&#xA;In addition, please note that the highest authority the sender chain has on the receiver chain is the authority of [its sovereign account](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.26/pallets/xcmp-queue/src/lib.rs#L606). So if the sender does not do enough security, the biggest loss is the loss of the sender's sovereign account. Therefore, it is better that the signature security is guaranteed by the sender chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="18886" PostHistoryTypeId="2" PostId="5048" RevisionGUID="b08d40c0-2efb-49dd-849d-8ecfc42a9aba" CreationDate="2022-09-27T14:10:25.343" UserId="73" Text="No there is no automatic way to do this. You would need to implement this on your own. Something like the following should work:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn on_initialize(now: T::BlockNumber) -&gt; Weight {&#xD;&#xA;    if now % MY_INTERVAL == 0 {&#xD;&#xA;        // your clean up logic&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here you would use the `on_initialize` hook that is called for each block at initialization. Then you would check if your clean up interval has passed to run your clean up code. If it is only about deleting on `StorageValue`, it should be fine. However, if you start doing any kind iteration you need to ensure that you will not touch too many storage elements." ContentLicense="CC BY-SA 4.0" />
  <row Id="18888" PostHistoryTypeId="2" PostId="5049" RevisionGUID="694e0adf-157f-442b-83c8-759d386f7ef1" CreationDate="2022-09-27T14:49:42.087" UserId="3164" Text="When I add and run a new benchmark via &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo test --package pallet-&lt;name&gt;  --features runtime-benchmarks&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get an error which is unclear and unrelated to the actual benchmark i added:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;error: recursion limit reached while expanding `stringify!`&#xD;&#xA;   --&gt; frame/assets/src/benchmarking.rs:154:1&#xD;&#xA;    |&#xD;&#xA;154 | / benchmarks_instance_pallet! {&#xD;&#xA;155 | |     create {&#xD;&#xA;156 | |         let caller: T::AccountId = whitelisted_caller();&#xD;&#xA;157 | |         let caller_lookup = T::Lookup::unlookup(caller.clone());&#xD;&#xA;...   |&#xD;&#xA;485 | |     impl_benchmark_test_suite!(Assets, crate::mock::new_test_ext(), crate::mock::Test)&#xD;&#xA;486 | | }&#xD;&#xA;    | |_^&#xD;&#xA;    |&#xD;&#xA;    = help: consider increasing the recursion limit by adding a `#![recursion_limit = &quot;256&quot;]` attribute to your crate (`pallet_assets`)&#xD;&#xA;    = note: this error originates in the macro `$crate::impl_bench_name_tests` which comes from the expansion of the macro `benchmarks_instance_pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error: could not compile `pallet-assets` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18890" PostHistoryTypeId="1" PostId="5049" RevisionGUID="694e0adf-157f-442b-83c8-759d386f7ef1" CreationDate="2022-09-27T14:49:42.087" UserId="3164" Text="Problem with running Benchmarks on substrate pallet: recursion limit reached while expanding `stringify!`" ContentLicense="CC BY-SA 4.0" />
  <row Id="18891" PostHistoryTypeId="3" PostId="5049" RevisionGUID="694e0adf-157f-442b-83c8-759d386f7ef1" CreationDate="2022-09-27T14:49:42.087" UserId="3164" Text="|frame|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18892" PostHistoryTypeId="2" PostId="5050" RevisionGUID="15c4ba44-c404-4493-bdb9-726cccd4f5cd" CreationDate="2022-09-27T14:52:59.590" UserId="94" Text="Looks like you are the first one to find the case where there are too many benchmarks in a file and the macro fails.  &#xD;&#xA;This is easily fixed in your case by putting `#![recursion_limit = &quot;1024&quot;]` at the top of your `lib.rs` file.  &#xD;&#xA;Often these &quot;expansion limit reached&quot; mean that something went wrong, but in this case it's just the large number of benchmarks." ContentLicense="CC BY-SA 4.0" />
  <row Id="18894" PostHistoryTypeId="5" PostId="5049" RevisionGUID="328b6252-c63e-42bc-a947-72d992b48082" CreationDate="2022-09-27T15:02:03.497" UserId="3164" Comment="added 218 characters in body" Text="When I add and run a new benchmark via &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo test --package pallet-&lt;name&gt;  --features runtime-benchmarks&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get an error which is unclear and unrelated to the actual benchmark i added:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;error: recursion limit reached while expanding `stringify!`&#xD;&#xA;   --&gt; frame/assets/src/benchmarking.rs:154:1&#xD;&#xA;    |&#xD;&#xA;154 | / benchmarks_instance_pallet! {&#xD;&#xA;155 | |     create {&#xD;&#xA;156 | |         let caller: T::AccountId = whitelisted_caller();&#xD;&#xA;157 | |         let caller_lookup = T::Lookup::unlookup(caller.clone());&#xD;&#xA;...   |&#xD;&#xA;485 | |     impl_benchmark_test_suite!(Assets, crate::mock::new_test_ext(), crate::mock::Test)&#xD;&#xA;486 | | }&#xD;&#xA;    | |_^&#xD;&#xA;    |&#xD;&#xA;    = help: consider increasing the recursion limit by adding a `#![recursion_limit = &quot;256&quot;]` attribute to your crate (`pallet_assets`)&#xD;&#xA;    = note: this error originates in the macro `$crate::impl_bench_name_tests` which comes from the expansion of the macro `benchmarks_instance_pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error: could not compile `pallet-assets` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;This is a permalink to the benchmark which I added that lead to this error: https://github.com/paritytech/substrate/blob/2d3b6507817d66f6e2e697074bfc806e4a6eb2a8/frame/assets/src/benchmarking.rs#L180-L180 " ContentLicense="CC BY-SA 4.0" />
  <row Id="18895" PostHistoryTypeId="2" PostId="5051" RevisionGUID="6e7e6355-cbec-4d27-bb23-b9574eebb3ae" CreationDate="2022-09-27T15:08:22.367" UserId="2752" Text="An option to do this is using apply. The code would look like this:&#xD;&#xA;&#xD;&#xA;    const { gasRequired, storageDeposit, result, output } = await contract.query[message].apply(null, [&#xD;&#xA;           accountId,&#xD;&#xA;           {&#xD;&#xA;               gasLimit,&#xD;&#xA;               storageDepositLimit,&#xD;&#xA;           },&#xD;&#xA;           ...this.args&#xD;&#xA;    ])&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18897" PostHistoryTypeId="5" PostId="5039" RevisionGUID="0f8c88a1-f399-4e84-a998-745c5b1f5e02" CreationDate="2022-09-27T15:23:29.163" UserId="251" Comment="added 590 characters in body" Text="`String` is a special `Vec&lt;u8&gt;` actually.&#xD;&#xA;&#xD;&#xA;You could use `Vec&lt;u8&gt;`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Actually, we can use `String`. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;extern crate alloc;&#xD;&#xA;&#xD;&#xA;use alloc::string::String;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But we don't do that. It makes things complicated.&#xD;&#xA;&#xD;&#xA;As I said, `String` is a `Vec&lt;u8&gt;`. You could do anything with `Vec&lt;u8&gt;`. &#xD;&#xA;&#xD;&#xA;`b&quot;hello world&quot;.to_vec()` is also a `Vec&lt;u8&gt;`.&#xD;&#xA;&#xD;&#xA;There is no `println!` in no_std. So, you don't need the `Display`. &#xD;&#xA;&#xD;&#xA;If you want to log something you could use `#[cfg(features = &quot;std&quot;)]`, then you can use `String`. &#xD;&#xA;&#xD;&#xA;For events, you could let apps decode the `Vec&lt;u8&gt;` to `String`. That's not our job.&#xD;&#xA;&#xD;&#xA;IMO, `Vec&lt;u8&gt;` is more efficient." ContentLicense="CC BY-SA 4.0" />
  <row Id="18898" PostHistoryTypeId="50" PostId="3996" RevisionGUID="e2c7c4d2-4fdd-4bc7-83cb-fcd2d5d7b243" CreationDate="2022-09-27T17:01:55.303" UserId="-1" />
  <row Id="18899" PostHistoryTypeId="50" PostId="4475" RevisionGUID="08e7b57f-616f-4389-bf95-591c83814c91" CreationDate="2022-09-27T18:00:10.027" UserId="-1" />
  <row Id="18900" PostHistoryTypeId="52" PostId="5041" RevisionGUID="6630c4e3-53c0-4577-9207-b0c47bcfbbe0" CreationDate="2022-09-27T19:02:59.570" />
  <row Id="18901" PostHistoryTypeId="2" PostId="5052" RevisionGUID="ea541c9a-aa63-4e8a-afed-e6514f42b1b5" CreationDate="2022-09-27T19:16:21.077" UserId="3231" Text="I have a loop in call which depends on array from arguments, so how can i specify weight to be multiplied to array length from arguments" ContentLicense="CC BY-SA 4.0" />
  <row Id="18903" PostHistoryTypeId="1" PostId="5052" RevisionGUID="ea541c9a-aa63-4e8a-afed-e6514f42b1b5" CreationDate="2022-09-27T19:16:21.077" UserId="3231" Text="How to specify weight for call with loop" ContentLicense="CC BY-SA 4.0" />
  <row Id="18904" PostHistoryTypeId="3" PostId="5052" RevisionGUID="ea541c9a-aa63-4e8a-afed-e6514f42b1b5" CreationDate="2022-09-27T19:16:21.077" UserId="3231" Text="|pallet|substrate-node-template|weight|fee|weighttofee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18905" PostHistoryTypeId="2" PostId="5053" RevisionGUID="2060fe8e-708a-442b-a54f-53e7fd35fa11" CreationDate="2022-09-27T19:18:33.363" UserId="3197" Text="This talisman-connect package offers a solution to the problem that seems to be working well for us. &#xD;&#xA;&#xD;&#xA;https://github.com/TalismanSociety/talisman-connect/blob/d5152e8a4d0f7236ef9775beb69f0981669d3508/packages/connect-wallets/README.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="18907" PostHistoryTypeId="5" PostId="5053" RevisionGUID="9a317646-e56d-4120-ad7b-aea50ed018e0" CreationDate="2022-09-27T19:20:37.983" UserId="3197" Comment="added 150 characters in body" Text="This [talisman-Connect][1] package offers a solution to the problem that seems to be working well for us. &#xD;&#xA;&#xD;&#xA;https://github.com/TalismanSociety/talisman-connect/blob/d5152e8a4d0f7236ef9775beb69f0981669d3508/packages/connect-wallets/README.md&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/TalismanSociety/talisman-connect/blob/d5152e8a4d0f7236ef9775beb69f0981669d3508/packages/connect-wallets/README.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="18908" PostHistoryTypeId="5" PostId="5053" RevisionGUID="5f73a047-6367-46e3-8ba8-1af7f3665646" CreationDate="2022-09-27T19:21:06.550" UserId="3197" Comment="deleted 138 characters in body" Text="This [talisman-Connect][1] package offers a solution to the problem that seems to be working well for us. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/TalismanSociety/talisman-connect/blob/d5152e8a4d0f7236ef9775beb69f0981669d3508/packages/connect-wallets/README.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="18909" PostHistoryTypeId="5" PostId="5053" RevisionGUID="4e5f15f0-8e7d-4041-b66b-863ffb7eb6b8" CreationDate="2022-09-27T19:21:35.133" UserId="3197" Comment="edited body" Text="This [talisman-connect][1] package offers a solution to the problem that seems to be working well for us. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/TalismanSociety/talisman-connect/blob/d5152e8a4d0f7236ef9775beb69f0981669d3508/packages/connect-wallets/README.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="18910" PostHistoryTypeId="2" PostId="5054" RevisionGUID="a3c93cd4-ccfd-4349-94eb-42ec4f912fab" CreationDate="2022-09-27T19:44:14.560" UserId="94" Text="You can use a linear component if your call accepts a collection.  &#xD;&#xA;As example take this one:&#xD;&#xA;```rust&#xD;&#xA;pub fn do_something(origin: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;) -&gt; DispatchResult&#xD;&#xA;{&#xD;&#xA;    // Loop over data.&#xD;&#xA;    Ok(())&#xD;&#xA;}    &#xD;&#xA;```&#xD;&#xA;Which can then be benchmarked by defining a linear component over the length of the input vector.  &#xD;&#xA;```rust&#xD;&#xA;benchmarks! {&#xD;&#xA;    do_something {&#xD;&#xA;        // Define linear component l. Must have one letter as name.&#xD;&#xA;        let l in 0 .. T::MaxDataLen::get() as u32;&#xD;&#xA;&#xD;&#xA;        let data = vec![255u8; l as usize];&#xD;&#xA;    }: _(RawOrigin::Root, data)&#xD;&#xA;    verify { /*optional*/ }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It is important that your function has at most a linear complexity over each component, otherwise the weight formulas will be calculated incorrectly.  &#xD;&#xA;&#xD;&#xA;Finally you can use the newly generated weight function as such:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(&#xD;&#xA;    T::WeightInfo::do_something(data.len() as u32)&#xD;&#xA;)]&#xD;&#xA;pub fn do_something(origin: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;) -&gt; DispatchResult&#xD;&#xA;{&#xD;&#xA;    // Loop over data.&#xD;&#xA;    Ok(())&#xD;&#xA;}    &#xD;&#xA;```&#xD;&#xA;You can see how the weight now depends on the vectors length." ContentLicense="CC BY-SA 4.0" />
  <row Id="18912" PostHistoryTypeId="52" PostId="5047" RevisionGUID="562e692e-e996-4048-884a-865331cb03e1" CreationDate="2022-09-27T21:59:01.740" />
  <row Id="18913" PostHistoryTypeId="52" PostId="5049" RevisionGUID="f412b9a5-cca7-47e1-8641-0b9c633b4c76" CreationDate="2022-09-27T22:50:18.503" />
  <row Id="18914" PostHistoryTypeId="5" PostId="4975" RevisionGUID="8c5ae1ad-0c0d-40d0-83fd-e4f6e9f48442" CreationDate="2022-09-28T03:17:14.353" UserId="3225" Comment="Add update section " Text="Talisman and I are looking into building a simple JS module that helps developers build XCM for transactions and abstract common patterns like cross chain transfers into a simple JS function taking inputs like: `fromParachain, toParachain, assetId, recipient etc.` These functions would then return the XCM object and allow the developer to encode it into hex so that it can be submitted to the network via the `submitExtrinsic` call.&#xD;&#xA;&#xD;&#xA;I am currently working on an example transfer which would allow a user to transfer an asset from one parachain to another. You can see it here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbasilisk-rpc.dwellir.com#/extrinsics/decode/0x34030208000400010200e12e0500000b00e057eb481b0e010004010100411f081300010200e12e050000070010a5d4e80107001c040a5d0d010004000101008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48001c040a5d000000 &#xD;&#xA;&#xD;&#xA;However, I am running into the following difficulties:&#xD;&#xA;&#xD;&#xA;* How does one encode the XCM into hex? I know that this is possible as it is done on the web interface but there is very little insight into how this is actually done in practice. I have tried looking through the web portal's code but it is so abstract. I want to be able to build and encode the XCM I have in the above link. &#xD;&#xA;* XCM itself is not parsable in JavaScript, it looks like JSON but it isn’t. I am struggling to understand how we can formulate such a simple XCM message in JavaScript and then encode it into hex so it can be submitted as a transaction. I know that it is using something called SCALE but I am at a loss as to how to use it and import the types available in XCM v2. &#xD;&#xA;&#xD;&#xA;I am also curious to hear from developers as to whether they believe such a module would be useful for them. I know that it is currently very difficult to make an XCM transaction in polkadot.js so I imagine this would be a very important piece of infrastructure. &#xD;&#xA;&#xD;&#xA;Please help.&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;I am trying to encode my XCM message by doing the following (using the `WithdrawAsset` section as an example):&#xD;&#xA;1. Convert the XCM into JSON `const data = {&quot;WithdrawAsset&quot;:[{&quot;id&quot;:{[...]},&quot;fun&quot;:{[...]}}]}`    &#xD;&#xA;2. Define the SCALE codec object&#xD;&#xA;`const withdrawAssetCodec = scale.object([&quot;WithdrawAsset&quot;, scale.array(idCodex, fungibleCodex)]);`&#xD;&#xA;3. Encode with data&#xD;&#xA;`const encoded = withdrawAssetCodec.encode(data);`&#xD;&#xA;4. Grab the hex string representation of the data and submit it via `api.rpc.author.submitAndWatchExtrinsic('0x' + Buffer.from(encoded).toString('hex'));`&#xD;&#xA;&#xD;&#xA;Further questions:&#xD;&#xA;1. If we have to represent the XCM as JSON to use the scale codec library, why isn't XCM represented as JSON? Why use a totally new format? Are we safe in assuming that this XCM:&#xD;&#xA;`interior: { X2: [ { Parachain: 3,000 } { GeneralIndex: 0 } ] } }` can be represented as this: `&quot;interior&quot;: { &quot;X2&quot;: [ { &quot;Parachain&quot;: 3000 }, { &quot;GeneralIndex&quot;: 0 } ] }`, in JSON? &#xD;&#xA;2. How do we encode the call function signature into this XCM call? In this instance it is `polkadotXcm.execute(message, maxWeight)` and I noticed that in my link above, the first two bytes `3403` are a call index which tells the polkadot portal I am using the `polkadotXcm.execute` function. &#xD;&#xA;&#xD;&#xA;Many of the types used in my XCM sample are not defined in the codec library, but Rob has referenced capi and there are such types defined here: https://github.com/paritytech/capi/issues/241. &#xD;&#xA;&#xD;&#xA;It would be great if someone could include an example of a transaction that shows how we get from an XCM message to an encoded transaction that can be submitted to the network. It is so far poorly explained in the documentation...&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18915" PostHistoryTypeId="5" PostId="4975" RevisionGUID="a6d6e3ce-b594-408b-94f1-c6ded015aaf2" CreationDate="2022-09-28T03:29:35.307" UserId="3225" Comment="add link to sample implementation" Text="Talisman and I are looking into building a simple JS module that helps developers build XCM for transactions and abstract common patterns like cross chain transfers into a simple JS function taking inputs like: `fromParachain, toParachain, assetId, recipient etc.` These functions would then return the XCM object and allow the developer to encode it into hex so that it can be submitted to the network via the `submitExtrinsic` call.&#xD;&#xA;&#xD;&#xA;I am currently working on an example transfer which would allow a user to transfer an asset from one parachain to another. You can see it here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbasilisk-rpc.dwellir.com#/extrinsics/decode/0x34030208000400010200e12e0500000b00e057eb481b0e010004010100411f081300010200e12e050000070010a5d4e80107001c040a5d0d010004000101008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48001c040a5d000000 &#xD;&#xA;&#xD;&#xA;However, I am running into the following difficulties:&#xD;&#xA;&#xD;&#xA;* How does one encode the XCM into hex? I know that this is possible as it is done on the web interface but there is very little insight into how this is actually done in practice. I have tried looking through the web portal's code but it is so abstract. I want to be able to build and encode the XCM I have in the above link. &#xD;&#xA;* XCM itself is not parsable in JavaScript, it looks like JSON but it isn’t. I am struggling to understand how we can formulate such a simple XCM message in JavaScript and then encode it into hex so it can be submitted as a transaction. I know that it is using something called SCALE but I am at a loss as to how to use it and import the types available in XCM v2. &#xD;&#xA;&#xD;&#xA;I am also curious to hear from developers as to whether they believe such a module would be useful for them. I know that it is currently very difficult to make an XCM transaction in polkadot.js so I imagine this would be a very important piece of infrastructure. &#xD;&#xA;&#xD;&#xA;Please help.&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;I am trying to encode my XCM message by doing the following (using the `WithdrawAsset` section as an example):&#xD;&#xA;1. Convert the XCM into JSON `const data = {&quot;WithdrawAsset&quot;:[{&quot;id&quot;:{[...]},&quot;fun&quot;:{[...]}}]}`    &#xD;&#xA;2. Define the SCALE codec object&#xD;&#xA;`const withdrawAssetCodec = scale.object([&quot;WithdrawAsset&quot;, scale.array(idCodex, fungibleCodex)]);`&#xD;&#xA;3. Encode with data&#xD;&#xA;`const encoded = withdrawAssetCodec.encode(data);`&#xD;&#xA;4. Grab the hex string representation of the data and submit it via `api.rpc.author.submitAndWatchExtrinsic('0x' + Buffer.from(encoded).toString('hex'));`&#xD;&#xA;&#xD;&#xA;I have hacked something together here, with the steps above: https://github.com/James-Sangalli/xcm-module-sample/blob/master/index.js#L153&#xD;&#xA;&#xD;&#xA;Further questions:&#xD;&#xA;1. If we have to represent the XCM as JSON to use the scale codec library, why isn't XCM represented as JSON? Why use a totally new format? Are we safe in assuming that this XCM:&#xD;&#xA;`interior: { X2: [ { Parachain: 3,000 } { GeneralIndex: 0 } ] } }` can be represented as this: `&quot;interior&quot;: { &quot;X2&quot;: [ { &quot;Parachain&quot;: 3000 }, { &quot;GeneralIndex&quot;: 0 } ] }`, in JSON? &#xD;&#xA;2. How do we encode the call function signature into this XCM call? In this instance it is `polkadotXcm.execute(message, maxWeight)` and I noticed that in my link above, the first two bytes `3403` are a call index which tells the polkadot portal I am using the `polkadotXcm.execute` function. &#xD;&#xA;&#xD;&#xA;Many of the types used in my XCM sample are not defined in the codec library, but Rob has referenced capi and there are such types defined here: https://github.com/paritytech/capi/issues/241. &#xD;&#xA;&#xD;&#xA;It would be great if someone could include an example of a transaction that shows how we get from an XCM message to an encoded transaction that can be submitted to the network. It is so far poorly explained in the documentation...&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18916" PostHistoryTypeId="5" PostId="4975" RevisionGUID="fb6b8b2b-ea80-4152-8934-04944fa57630" CreationDate="2022-09-28T04:15:29.473" UserId="3225" Comment="Remove comment about docs " Text="Talisman and I are looking into building a simple JS module that helps developers build XCM for transactions and abstract common patterns like cross chain transfers into a simple JS function taking inputs like: `fromParachain, toParachain, assetId, recipient etc.` These functions would then return the XCM object and allow the developer to encode it into hex so that it can be submitted to the network via the `submitExtrinsic` call.&#xD;&#xA;&#xD;&#xA;I am currently working on an example transfer which would allow a user to transfer an asset from one parachain to another. You can see it here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbasilisk-rpc.dwellir.com#/extrinsics/decode/0x34030208000400010200e12e0500000b00e057eb481b0e010004010100411f081300010200e12e050000070010a5d4e80107001c040a5d0d010004000101008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48001c040a5d000000 &#xD;&#xA;&#xD;&#xA;However, I am running into the following difficulties:&#xD;&#xA;&#xD;&#xA;* How does one encode the XCM into hex? I know that this is possible as it is done on the web interface but there is very little insight into how this is actually done in practice. I have tried looking through the web portal's code but it is so abstract. I want to be able to build and encode the XCM I have in the above link. &#xD;&#xA;* XCM itself is not parsable in JavaScript, it looks like JSON but it isn’t. I am struggling to understand how we can formulate such a simple XCM message in JavaScript and then encode it into hex so it can be submitted as a transaction. I know that it is using something called SCALE but I am at a loss as to how to use it and import the types available in XCM v2. &#xD;&#xA;&#xD;&#xA;I am also curious to hear from developers as to whether they believe such a module would be useful for them. I know that it is currently very difficult to make an XCM transaction in polkadot.js so I imagine this would be a very important piece of infrastructure. &#xD;&#xA;&#xD;&#xA;Please help.&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;I am trying to encode my XCM message by doing the following (using the `WithdrawAsset` section as an example):&#xD;&#xA;1. Convert the XCM into JSON `const data = {&quot;WithdrawAsset&quot;:[{&quot;id&quot;:{[...]},&quot;fun&quot;:{[...]}}]}`    &#xD;&#xA;2. Define the SCALE codec object&#xD;&#xA;`const withdrawAssetCodec = scale.object([&quot;WithdrawAsset&quot;, scale.array(idCodex, fungibleCodex)]);`&#xD;&#xA;3. Encode with data&#xD;&#xA;`const encoded = withdrawAssetCodec.encode(data);`&#xD;&#xA;4. Grab the hex string representation of the data and submit it via `api.rpc.author.submitAndWatchExtrinsic('0x' + Buffer.from(encoded).toString('hex'));`&#xD;&#xA;&#xD;&#xA;I have hacked something together here, with the steps above: https://github.com/James-Sangalli/xcm-module-sample/blob/master/index.js#L153&#xD;&#xA;&#xD;&#xA;Further questions:&#xD;&#xA;1. If we have to represent the XCM as JSON to use the scale codec library, why isn't XCM represented as JSON? Why use a totally new format? Are we safe in assuming that this XCM:&#xD;&#xA;`interior: { X2: [ { Parachain: 3,000 } { GeneralIndex: 0 } ] } }` can be represented as this: `&quot;interior&quot;: { &quot;X2&quot;: [ { &quot;Parachain&quot;: 3000 }, { &quot;GeneralIndex&quot;: 0 } ] }`, in JSON? &#xD;&#xA;2. How do we encode the call function signature into this XCM call? In this instance it is `polkadotXcm.execute(message, maxWeight)` and I noticed that in my link above, the first two bytes `3403` are a call index which tells the polkadot portal I am using the `polkadotXcm.execute` function. &#xD;&#xA;&#xD;&#xA;Many of the types used in my XCM sample are not defined in the codec library, but Rob has referenced capi and there are such types defined here: https://github.com/paritytech/capi/issues/241. &#xD;&#xA;&#xD;&#xA;It would be great if someone could include an example of a transaction that shows how we get from an XCM message to an encoded transaction that can be submitted to the network.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18917" PostHistoryTypeId="2" PostId="5055" RevisionGUID="255505b7-044a-42e5-903e-89c648a0404d" CreationDate="2022-09-28T06:04:53.573" UserId="2281" Text="I have Added EVM pallet to my NPOS based Substrate chain but i am facing **staking.StakingElectionFailed The election failed. No new era is planned.** how to solve this issue.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/pXdvl.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/KrVGq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18919" PostHistoryTypeId="1" PostId="5055" RevisionGUID="255505b7-044a-42e5-903e-89c648a0404d" CreationDate="2022-09-28T06:04:53.573" UserId="2281" Text="Staking Election Failed (staking.StakingElectionFailed The election failed. No new era is planned. ) after adding EVM with NPOS(i.e BABE)" ContentLicense="CC BY-SA 4.0" />
  <row Id="18920" PostHistoryTypeId="3" PostId="5055" RevisionGUID="255505b7-044a-42e5-903e-89c648a0404d" CreationDate="2022-09-28T06:04:53.573" UserId="2281" Text="|substrate-node|polkadot-js|pallet-staking|pallet-election-phragmen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18921" PostHistoryTypeId="2" PostId="5056" RevisionGUID="00f1942a-9a3f-484d-89cc-3e2fe9be1728" CreationDate="2022-09-28T06:46:57.367" UserId="2065" Text="I have recently upgraded our blockchain to use polkadot-v0.9.26 but when I am building the code I get the following &#xD;&#xA;&#xD;&#xA;    error: cannot find macro `vec` in this scope&#xD;&#xA;       --&gt; /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:900:39&#xD;&#xA;        |&#xD;&#xA;    900 |                         ToReserve | ToNonReserve =&gt; Xcm(vec![&#xD;&#xA;        |                                                         ^^^&#xD;&#xA;        |&#xD;&#xA;        = note: consider importing one of these items:&#xD;&#xA;                codec::alloc::vec&#xD;&#xA;                scale_info::prelude::vec&#xD;&#xA;                sp_std::vec&#xD;&#xA;    &#xD;&#xA;    error: cannot find macro `vec` in this scope&#xD;&#xA;       --&gt; /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:895:31&#xD;&#xA;        |&#xD;&#xA;    895 |                         SelfReserveAsset =&gt; Xcm(vec![TransferReserveAsset {&#xD;&#xA;        |                                                 ^^^&#xD;&#xA;        |&#xD;&#xA;        = note: consider importing one of these items:&#xD;&#xA;                codec::alloc::vec&#xD;&#xA;                scale_info::prelude::vec&#xD;&#xA;                sp_std::vec&#xD;&#xA;    &#xD;&#xA;    error: cannot find macro `vec` in this scope&#xD;&#xA;       --&gt; /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:837:39&#xD;&#xA;        |&#xD;&#xA;    837 |                         ToReserve | ToNonReserve =&gt; Xcm(vec![&#xD;&#xA;        |                                                         ^^^&#xD;&#xA;        |&#xD;&#xA;        = note: consider importing one of these items:&#xD;&#xA;                codec::alloc::vec&#xD;&#xA;                scale_info::prelude::vec&#xD;&#xA;                sp_std::vec&#xD;&#xA;    &#xD;&#xA;    error: cannot find macro `vec` in this scope&#xD;&#xA;       --&gt; /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:832:31&#xD;&#xA;        |&#xD;&#xA;    832 |                         SelfReserveAsset =&gt; Xcm(vec![TransferReserveAsset {&#xD;&#xA;        |                                                 ^^^&#xD;&#xA;        |&#xD;&#xA;        = note: consider importing one of these items:&#xD;&#xA;                codec::alloc::vec&#xD;&#xA;                scale_info::prelude::vec&#xD;&#xA;                sp_std::vec&#xD;&#xA;    &#xD;&#xA;    error: cannot find macro `vec` in this scope&#xD;&#xA;       --&gt; /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:740:12&#xD;&#xA;        |&#xD;&#xA;    740 |                 Ok(Xcm(vec![&#xD;&#xA;        |                        ^^^&#xD;&#xA;        |&#xD;&#xA;        = note: consider importing one of these items:&#xD;&#xA;                codec::alloc::vec&#xD;&#xA;                scale_info::prelude::vec&#xD;&#xA;                sp_std::vec&#xD;&#xA;    &#xD;&#xA;    error: cannot find macro `vec` in this scope&#xD;&#xA;       --&gt; /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:720:12&#xD;&#xA;        |&#xD;&#xA;    720 |                 Ok(Xcm(vec![&#xD;&#xA;        |                        ^^^&#xD;&#xA;        |&#xD;&#xA;        = note: consider importing one of these items:&#xD;&#xA;                codec::alloc::vec&#xD;&#xA;                scale_info::prelude::vec&#xD;&#xA;                sp_std::vec&#xD;&#xA;    &#xD;&#xA;    error: cannot find macro `vec` in this scope&#xD;&#xA;       --&gt; /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:684:11&#xD;&#xA;        |&#xD;&#xA;    684 |             Ok(Xcm(vec![&#xD;&#xA;        |                    ^^^&#xD;&#xA;        |&#xD;&#xA;        = note: consider importing one of these items:&#xD;&#xA;                codec::alloc::vec&#xD;&#xA;                scale_info::prelude::vec&#xD;&#xA;                sp_std::vec&#xD;&#xA;    &#xD;&#xA;    error: cannot find macro `vec` in this scope&#xD;&#xA;       --&gt; /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:667:11&#xD;&#xA;        |&#xD;&#xA;    667 |             Ok(Xcm(vec![TransferReserveAsset {&#xD;&#xA;        |                    ^^^&#xD;&#xA;        |&#xD;&#xA;        = note: consider importing one of these items:&#xD;&#xA;                codec::alloc::vec&#xD;&#xA;                scale_info::prelude::vec&#xD;&#xA;                sp_std::vec&#xD;&#xA;    &#xD;&#xA;    error: cannot find macro `vec` in this scope&#xD;&#xA;       --&gt; /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:438:39&#xD;&#xA;        |&#xD;&#xA;    438 |             Self::do_transfer_multiassets(who, vec![asset.clone()].into(), asset, dest, dest_weight)&#xD;&#xA;        |                                                ^^^&#xD;&#xA;        |&#xD;&#xA;        = note: consider importing one of these items:&#xD;&#xA;                codec::alloc::vec&#xD;&#xA;                scale_info::prelude::vec&#xD;&#xA;                sp_std::vec&#xD;&#xA;    &#xD;&#xA;    error: cannot find macro `vec` in this scope&#xD;&#xA;       --&gt; /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:400:39&#xD;&#xA;        |&#xD;&#xA;    400 |             Self::do_transfer_multiassets(who, vec![asset.clone()].into(), asset, dest, dest_weight)&#xD;&#xA;        |                                                ^^^&#xD;&#xA;        |&#xD;&#xA;        = note: consider importing one of these items:&#xD;&#xA;                codec::alloc::vec&#xD;&#xA;                scale_info::prelude::vec&#xD;&#xA;                sp_std::vec&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;for `orml-xtokens` . I have tried to import all of the suggested items but still get the same error. Any idea how I can fix this? You can find the code [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chexware/Bit-Country-Blockchain/tree/runtime-upgrade/polkadot-v0.9.26&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18923" PostHistoryTypeId="1" PostId="5056" RevisionGUID="00f1942a-9a3f-484d-89cc-3e2fe9be1728" CreationDate="2022-09-28T06:46:57.367" UserId="2065" Text="Build error for orml_xtokens" ContentLicense="CC BY-SA 4.0" />
  <row Id="18924" PostHistoryTypeId="3" PostId="5056" RevisionGUID="00f1942a-9a3f-484d-89cc-3e2fe9be1728" CreationDate="2022-09-28T06:46:57.367" UserId="2065" Text="|error|build|orml-xtokens|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18925" PostHistoryTypeId="2" PostId="5057" RevisionGUID="60e467c0-fc9d-4285-896e-dc5a413327fc" CreationDate="2022-09-28T07:10:57.050" UserId="251" Text="I think you missed something like `orml-xtokens/std` in the `Cargo.toml`." ContentLicense="CC BY-SA 4.0" />
  <row Id="18927" PostHistoryTypeId="2" PostId="5058" RevisionGUID="048f9a60-873f-42f0-a76e-89fe1a930d8c" CreationDate="2022-09-28T09:02:55.670" UserId="165" Text="I am wondering if it is possible to set a value to an arbitrary storage key at genesis.&#xD;&#xA;&#xD;&#xA;Let's say I want to populate the key `0x3fba98689ebed1138735e0e7a5a790abee99a84ccbfb4b82e714617e5e06f6f7` at genesis, but this key is not part of any `GenesisConfig` of any pallet I have installed in my runtime.&#xD;&#xA;&#xD;&#xA;Is there a way to work around this ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18929" PostHistoryTypeId="1" PostId="5058" RevisionGUID="048f9a60-873f-42f0-a76e-89fe1a930d8c" CreationDate="2022-09-28T09:02:55.670" UserId="165" Text="Setting a value to an arbitrary key at genesis?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18930" PostHistoryTypeId="3" PostId="5058" RevisionGUID="048f9a60-873f-42f0-a76e-89fe1a930d8c" CreationDate="2022-09-28T09:02:55.670" UserId="165" Text="|storage|frame|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18931" PostHistoryTypeId="2" PostId="5059" RevisionGUID="7fb406a6-b000-49bd-b27a-55e2faa563ce" CreationDate="2022-09-28T09:29:56.727" UserId="251" Text="Just insert the key/value into `chain_spec[&quot;genesis&quot;][&quot;raw&quot;][&quot;top&quot;]`.&#xD;&#xA;&#xD;&#xA;This is what Subalfred does to fork off the chain https://github.com/hack-ink/subalfred/blob/3994cfe31dd13d3aaf757503da3e73afd186c319/src/subalfred/core/state/fork_off.rs#L142." ContentLicense="CC BY-SA 4.0" />
  <row Id="18933" PostHistoryTypeId="2" PostId="5060" RevisionGUID="5a8a6d36-71f4-44ae-8e76-8af265d03bf4" CreationDate="2022-09-28T10:22:41.103" UserId="1959" Text="After debugging I think it's a bug (`pallet-xcm` or `cumulus-pallet-xcmp-queue`), you can track it here: https://github.com/paritytech/cumulus/issues/1700" ContentLicense="CC BY-SA 4.0" />
  <row Id="18935" PostHistoryTypeId="2" PostId="5061" RevisionGUID="e42aa5ed-8e4a-4da2-9c23-58f28dc69d52" CreationDate="2022-09-28T11:20:46.563" UserId="1981" Text="Is there any way to access to ECDSA capabilities (like `sign`) inside the Runtime?&#xD;&#xA;&#xD;&#xA;I need to create benchmarks where the parameter of one extrinsic needs to be signed using ECDSA. I could create some 'hosted-functions' to do that, but I think it should be already done for each crypto schema (`ed25519`, `sr25519`, and `ecdsa`)." ContentLicense="CC BY-SA 4.0" />
  <row Id="18937" PostHistoryTypeId="1" PostId="5061" RevisionGUID="e42aa5ed-8e4a-4da2-9c23-58f28dc69d52" CreationDate="2022-09-28T11:20:46.563" UserId="1981" Text="Access to ECDSA sign inside Runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="18938" PostHistoryTypeId="3" PostId="5061" RevisionGUID="e42aa5ed-8e4a-4da2-9c23-58f28dc69d52" CreationDate="2022-09-28T11:20:46.563" UserId="1981" Text="|runtime|benchmark|cryptography|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18939" PostHistoryTypeId="5" PostId="5055" RevisionGUID="e7f1731a-faf9-46b3-93bc-7b004e4c299e" CreationDate="2022-09-28T11:26:58.917" UserId="2281" Comment="added 249 characters in body" Text="I have Added EVM pallet to my NPOS based Substrate chain but i am facing **staking.StakingElectionFailed The election failed. No new era is planned.** how to solve this issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have implemented the NPOS with EVM blockchain using the substrate.&#xD;&#xA;&#xD;&#xA;NPOS working fine but after adding EVM to Genesis config in node the NPOS is not working and the staking election failed.&#xD;&#xA;&#xD;&#xA;Smart Contracts working fine on the chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/pXdvl.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/KrVGq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18940" PostHistoryTypeId="2" PostId="5062" RevisionGUID="893e875d-a174-4233-a50b-2b038b42922f" CreationDate="2022-09-28T11:34:06.283" UserId="2731" Text="With the update to the Polkadot-JS api depreciating rpc.payment.queryInfo in favor for api.call.transactionPaymentApi.queryInfo I am currently trying to migrate my code over. However I used to get the gas fee on the polkadot side by getting the partialFee attribute and now I am noticing even for a simple transfer this fee comes out to 0. I am attempting to call it with an unsigned transfer transaction &#xD;&#xA;&#xD;&#xA;&gt; {&quot;signature&quot;:{&quot;signer&quot;:{&quot;id&quot;:&quot;111111111111111111111111111111111HC1&quot;},&quot;signature&quot;:{&quot;ed25519&quot;:&quot;0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&quot;},&quot;era&quot;:{&quot;immortalEra&quot;:&quot;0x00&quot;},&quot;nonce&quot;:0,&quot;tip&quot;:0},&quot;method&quot;:{&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;15JeACFd4oFAVxPdz9j9Uc5DGpm9oejH7hApQu548Yx2bNWR&quot;},&quot;value&quot;:100000000}}}&#xD;&#xA;&#xD;&#xA;and my len parameter is the previous blockhash. I know the result should not be 0 so I am a little confused why I can get a real answer.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18942" PostHistoryTypeId="1" PostId="5062" RevisionGUID="893e875d-a174-4233-a50b-2b038b42922f" CreationDate="2022-09-28T11:34:06.283" UserId="2731" Text="api.call.transactionPaymentApi.queryInfo returns partial fee 0" ContentLicense="CC BY-SA 4.0" />
  <row Id="18943" PostHistoryTypeId="3" PostId="5062" RevisionGUID="893e875d-a174-4233-a50b-2b038b42922f" CreationDate="2022-09-28T11:34:06.283" UserId="2731" Text="|polkadot-js|api|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18944" PostHistoryTypeId="2" PostId="5063" RevisionGUID="14b0ccb5-ecc6-4f4d-9753-f37fa4e34e1c" CreationDate="2022-09-28T11:41:30.040" UserId="406" Text="I had setup the private network of 3/3 validators with 3 nodes(one node for one validator), after that I connected the fourth node to that private network and added the fourth validtor which goes in waiting state. After the completion of era I had increased the validator count, now my validator count is 4/4 everything is working fine.&#xD;&#xA;Now, the issue is when I added more validators on fourth node and increase the validator count and make the network of 7/7 validtators, my block generation time is increased and block finalization is stopped.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SNyyC.png&#xD;&#xA;But if i am applying the process of one node for one validator and make the network of 7/7 validators everything is working fine.&#xD;&#xA;Now I want to know that why this issue occurs when I added multiple validators from a single node.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18946" PostHistoryTypeId="1" PostId="5063" RevisionGUID="14b0ccb5-ecc6-4f4d-9753-f37fa4e34e1c" CreationDate="2022-09-28T11:41:30.040" UserId="406" Text="Block finalization stopped" ContentLicense="CC BY-SA 4.0" />
  <row Id="18947" PostHistoryTypeId="3" PostId="5063" RevisionGUID="14b0ccb5-ecc6-4f4d-9753-f37fa4e34e1c" CreationDate="2022-09-28T11:41:30.040" UserId="406" Text="|substrate-node|polkadot|substrate-node-template|kusama|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18948" PostHistoryTypeId="2" PostId="5064" RevisionGUID="f014b0cd-b78c-42e7-9865-1146f8f50edd" CreationDate="2022-09-28T12:08:57.563" UserId="3241" Text="i know that this is a duplicate, but problem must be resolved...&#xD;&#xA;&#xD;&#xA;So, there are 2 &quot;solutions&quot;:&#xD;&#xA;&#xD;&#xA; 1. https://substrate.stackexchange.com/questions/4810/contract-flipper-build-fails&#xD;&#xA; 2. https://substrate.stackexchange.com/questions/4785/errore0158-when-testing-default-contract-from-flipper&#xD;&#xA;&#xD;&#xA;But not a single one worked for me. I still get error that :&#xD;&#xA;&quot;associated consts cannot be referenced in patter&quot; rustc(E0158).&#xD;&#xA;&#xD;&#xA;Is there anything else that could be done to resolve this?&#xD;&#xA;&#xD;&#xA;Versions:&#xD;&#xA; 1. cargo contract: cargo-contract 1.5.0-unknown-x86_64-pc-windows-msvc&#xD;&#xA; 2. rustc: rustc 1.66.0-nightly (470e518c4 2022-09-27)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18950" PostHistoryTypeId="1" PostId="5064" RevisionGUID="f014b0cd-b78c-42e7-9865-1146f8f50edd" CreationDate="2022-09-28T12:08:57.563" UserId="3241" Text="Ink! playground contract flipper not building due to errors" ContentLicense="CC BY-SA 4.0" />
  <row Id="18951" PostHistoryTypeId="3" PostId="5064" RevisionGUID="f014b0cd-b78c-42e7-9865-1146f8f50edd" CreationDate="2022-09-28T12:08:57.563" UserId="3241" Text="|ink|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18952" PostHistoryTypeId="2" PostId="5065" RevisionGUID="3d978828-53a1-4f3f-9259-5bd6c4d79730" CreationDate="2022-09-28T12:09:50.530" UserId="529" Text="To query Polkadot node with [subxt](https://github.com/paritytech/subxt) this is the code I used and that works fine.&#xD;&#xA;```rust&#xD;&#xA;use subxt::{OnlineClient, SubstrateConfig};&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime {}&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;&#xD;&#xA;    let api = OnlineClient::&lt;SubstrateConfig&gt;::from_url(&quot;wss://rpc.polkadot.io:443&quot;).await?;&#xD;&#xA;&#xD;&#xA;    let address = runtime::constants().balances().existential_deposit();&#xD;&#xA;    let existential_deposit = api.constants().at(&amp;address)?;&#xD;&#xA;    println!(&quot;Existential Deposit: {}&quot;, existential_deposit);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The metadata should be the same for common pallets and I used local Astar dev node to fetch metadata with:&#xD;&#xA;```&#xD;&#xA;subxt metadata -f bytes &gt; metadata.scale&#xD;&#xA;```&#xD;&#xA;However, when I change rpc url to connect to Kusama, Shiden or Astar I get rpc timeout.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;OnlineClient::&lt;SubstrateConfig&gt;::from_url(&quot;wss://kusama-rpc.polkadot.io:433&quot;).await?;&#xD;&#xA;```&#xD;&#xA;Error printout:&#xD;&#xA;```&#xD;&#xA;Error: Rpc(RpcError(&quot;Networking or low-level protocol error: Connection timeout exceeded: 10s&quot;))&#xD;&#xA;```&#xD;&#xA;What is it that I'm doing wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18954" PostHistoryTypeId="1" PostId="5065" RevisionGUID="3d978828-53a1-4f3f-9259-5bd6c4d79730" CreationDate="2022-09-28T12:09:50.530" UserId="529" Text="Use subxt to connect to any live node" ContentLicense="CC BY-SA 4.0" />
  <row Id="18955" PostHistoryTypeId="3" PostId="5065" RevisionGUID="3d978828-53a1-4f3f-9259-5bd6c4d79730" CreationDate="2022-09-28T12:09:50.530" UserId="529" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18956" PostHistoryTypeId="2" PostId="5066" RevisionGUID="3a322002-b011-4409-b9ee-46f3cd36c573" CreationDate="2022-09-28T12:11:23.047" UserId="426" Text="I've had a discussion with colleagues from Crust Shadow and Moonbeam(check [here][1]) about `OriginKind` usage in XCM's `Transact` instruction and thought it'd be best to ask here for further explanation.&#xD;&#xA;&#xD;&#xA;Let's assume the following scenario between Shiden &amp; Crust Shadow (because they share the same account scheme).&#xD;&#xA;* I want to send a XCM from Shiden to Crust Shadow, as a normal user (no special privileges)&#xD;&#xA;* on Shiden, I prepare a XCM which will be sent to Crust Shadow&#xD;&#xA;* instructions are `DescendOrigin`, `WithdrawAsset`, `BuyExecution` and `Transact`&#xD;&#xA;  * Crust supports this instruction set and ordering&#xD;&#xA;* as part of `Transact` instruction, I have to select `OriginKind`&#xD;&#xA;  * this can be either `Native`, `SovereignAccount`, `Superuser` or `Xcm`&#xD;&#xA;&#xD;&#xA;I am aware of the `OriginKind` enum description [here][2] but am unsure which type is the correct one to use here.&#xD;&#xA;My understanding was that I should use `Native` since I want the destination (Crust) to interpret this as if I'm just a normal user (not with sovereign account privileges). In case I'd specify `SovereignAccount`, this would imply I want to execute something with Shiden's sovereign account privileges. I'd expect to be rejected in this case.&#xD;&#xA;&#xD;&#xA;After discussion and repeated looks at the code, I guess my understanding was incorrect but it's still unclear to me how `OriginKind` should be interpreted.&#xD;&#xA;&#xD;&#xA;Is `Native` only for cases when I want to execute XCM locally (e.g. via `polkadot-xcm =&gt; execute` call)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/PureStake/moonbeam/issues/1836&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/53253de77f1649ecbb650df2ec3e29d0d1110a2d/xcm/src/v0/mod.rs#L60" ContentLicense="CC BY-SA 4.0" />
  <row Id="18958" PostHistoryTypeId="1" PostId="5066" RevisionGUID="3a322002-b011-4409-b9ee-46f3cd36c573" CreationDate="2022-09-28T12:11:23.047" UserId="426" Text="OriginKind in XCM's `Transact`" ContentLicense="CC BY-SA 4.0" />
  <row Id="18959" PostHistoryTypeId="3" PostId="5066" RevisionGUID="3a322002-b011-4409-b9ee-46f3cd36c573" CreationDate="2022-09-28T12:11:23.047" UserId="426" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18960" PostHistoryTypeId="5" PostId="5065" RevisionGUID="e8a28bd0-7391-4196-b851-28a97fb652ce" CreationDate="2022-09-28T12:25:22.257" UserId="529" Comment="code formatting" Text="To query Polkadot node with [subxt](https://github.com/paritytech/subxt) this is the code I used and that works fine.&#xD;&#xA;```rust&#xD;&#xA;use subxt::{OnlineClient, SubstrateConfig};&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime {}&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;&#xD;&#xA;    let api = OnlineClient::&lt;SubstrateConfig&gt;::from_url(&quot;wss://rpc.polkadot.io:443&quot;).await?;&#xD;&#xA;&#xD;&#xA;    let address = runtime::constants().balances().existential_deposit();&#xD;&#xA;    let existential_deposit = api.constants().at(&amp;address)?;&#xD;&#xA;    println!(&quot;Existential Deposit: {}&quot;, existential_deposit);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The metadata should be the same for common pallets and I used local Astar dev node to fetch metadata with:&#xD;&#xA;```&#xD;&#xA;subxt metadata -f bytes &gt; metadata.scale&#xD;&#xA;```&#xD;&#xA;However, when I change rpc url to connect to Kusama, Shiden or Astar I get rpc timeout.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;OnlineClient::&lt;SubstrateConfig&gt;::from_url(&quot;wss://kusama-rpc.polkadot.io:433&quot;).await?;&#xD;&#xA;```&#xD;&#xA;Error printout:&#xD;&#xA;```&#xD;&#xA;Error: Rpc(RpcError(&quot;Networking or low-level protocol error: Connection timeout exceeded: 10s&quot;))&#xD;&#xA;```&#xD;&#xA;What is it that I'm doing wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18961" PostHistoryTypeId="2" PostId="5067" RevisionGUID="ce7903bc-353c-4ce2-ba2c-3a4ff8e689e0" CreationDate="2022-09-28T12:44:09.067" UserId="1820" Text="I'm trying to understand the following behaviour:&#xD;&#xA;- A user delegates their vote (X DOT) with 1x conviction&#xD;&#xA;- Then they change their delegation to a smaller amount (Y DOT) with the same 1x convinction&#xD;&#xA;- Then they undelegate (at time t)&#xD;&#xA;- Before the lock period expires, they delegate Y DOT again with 1x conviction and then undelegate them once more (at time t1)&#xD;&#xA;&#xD;&#xA;The apparent result is that the lock period of the initial amount (X DOT) is &quot;reset&quot; when they undelegated the second time. So, X DOT is locked for t1 + 28 days, not t + 28 days, as one would expect. &#xD;&#xA;&#xD;&#xA;This is defined in chain state, by `prior`, when querying `democracy.votingOf`&#xD;&#xA;&#xD;&#xA;If I understand the [`prior.accumulate` function](https://github.com/paritytech/substrate/blob/17c07af0b953b84dbe89341294e98e586f9b4591/frame/democracy/src/vote.rs#L116) correctly that does this [here](https://github.com/paritytech/substrate/blob/17c07af0b953b84dbe89341294e98e586f9b4591/frame/democracy/src/lib.rs#L1580), it locks the max amount for the max length, effectively perpetuating the initial lock in the above scenario.&#xD;&#xA;&#xD;&#xA;Is this correct? Is this a feature or a bug? If it's a feature, what's the reasoning behind it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="18963" PostHistoryTypeId="1" PostId="5067" RevisionGUID="ce7903bc-353c-4ce2-ba2c-3a4ff8e689e0" CreationDate="2022-09-28T12:44:09.067" UserId="1820" Text="Delegating and undelegating during the lock period extends it for the initial amount" ContentLicense="CC BY-SA 4.0" />
  <row Id="18964" PostHistoryTypeId="3" PostId="5067" RevisionGUID="ce7903bc-353c-4ce2-ba2c-3a4ff8e689e0" CreationDate="2022-09-28T12:44:09.067" UserId="1820" Text="|pallet|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18965" PostHistoryTypeId="2" PostId="5068" RevisionGUID="93aa27f8-bd26-4b8f-b211-723ae5f4a5d0" CreationDate="2022-09-28T13:07:42.230" UserId="73" Text="yes you can sign some data for your benchmarking code. In `sp-io` there is the function [`crypto::ecdsa_sign`][1]. You can use [`crypto::ecdsa_generate`][2] to generate you some public/private key to use for signing.&#xD;&#xA;&#xD;&#xA;BTW: All of the things I mentioned above are also available through the [`RuntimePublic`][3] trait.&#xD;&#xA;&#xD;&#xA;So, your code using this trait would look like this:&#xD;&#xA;```&#xD;&#xA;use sp_application_crypto::ecdsa::Public;&#xD;&#xA;&#xD;&#xA;let public = Public::generate_pair(sp_core::testing::ECDSA, None);&#xD;&#xA;public.sign(sp_core::testing::ECDSA, &quot;my message&quot;).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While `sp_core::testing::ECDSA` being the `KeyTypeId`. If you already have a custom `KeyTypeId` for your application, you can use this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/1b1a5e12c0e391c7ed4e3ffa332eb2fe928d257f/primitives/io/src/lib.rs#L904-L909&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/1b1a5e12c0e391c7ed4e3ffa332eb2fe928d257f/primitives/io/src/lib.rs#L892&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/1b1a5e12c0e391c7ed4e3ffa332eb2fe928d257f/primitives/application-crypto/src/traits.rs#L94-L123" ContentLicense="CC BY-SA 4.0" />
  <row Id="18967" PostHistoryTypeId="2" PostId="5069" RevisionGUID="982d8e9b-4ef5-4cfa-b0c0-edb391f281af" CreationDate="2022-09-28T14:20:35.533" UserId="3142" Text="If run this RPC query via curl:&#xD;&#xA;&#xD;&#xA;    curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getStorage&quot;, &quot;params&quot;: [&quot;0xc2261276cc9d1f8598ea4b6a74b15c2fb99d880ec681799c0cf30e8886371da9de1e86a9a8c739864cf3cc5ec2bea59fd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;]}' http://127.0.0.1:9933&#xD;&#xA;&#xD;&#xA;The output is null when it should display the balance of the ALICE account.  WHY?&#xD;&#xA;&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:null,&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;[![Polkadot UI][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/pFSo3.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="18969" PostHistoryTypeId="1" PostId="5069" RevisionGUID="982d8e9b-4ef5-4cfa-b0c0-edb391f281af" CreationDate="2022-09-28T14:20:35.533" UserId="3142" Text="Can't get balance of ALICE account from RPC via curl" ContentLicense="CC BY-SA 4.0" />
  <row Id="18970" PostHistoryTypeId="3" PostId="5069" RevisionGUID="982d8e9b-4ef5-4cfa-b0c0-edb391f281af" CreationDate="2022-09-28T14:20:35.533" UserId="3142" Text="|substrate-node|polkadot|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18971" PostHistoryTypeId="5" PostId="5024" RevisionGUID="a88e4e58-929d-43ed-b7f3-c182116e222f" CreationDate="2022-09-28T15:15:06.507" UserId="298" Comment="deleted 13 characters in body" Text="I am following the guide in [polkadot-js/typegen][1], the github source is shared. I am trying to follow along and decorate the api for my custom node-template called [supersig-template][2]&#xD;&#xA;&#xD;&#xA;I have successfully created an output of the metadata:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:&quot;1&quot;, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getMetadata&quot;, &quot;params&quot;:[]}' http://localhost:9933 &gt; supersig-template.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but i am not very clearly in the github source where i should be running `yarn build`. I try in the root of forking [/docs][3] repo. But I dont think that is the correct place.&#xD;&#xA;&#xD;&#xA;Then i went into `/docs/api/examples/promise/typegen` separated it into its own repo, changed package json to include `--endpoint ./supersig-template.json` then ran `yarn build` and got this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;typegen % yarn build&#xD;&#xA;yarn run v1.22.19&#xD;&#xA;$ yarn generate:defs &amp;&amp; yarn generate:meta&#xD;&#xA;$ ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package sample-polkadotjs-typegen/interfaces --input /src/interfaces --endpoint /Users/ramsey/decentration/typegen/supersig-template.json&#xD;&#xA;Options:&#xD;&#xA;  --help     Show help                                                 [boolean]&#xD;&#xA;  --version  Show version number                                       [boolean]&#xD;&#xA;  --input    The directory to use for the user definitions   [string] [required]&#xD;&#xA;  --package  The package name &amp; path to use for the user types&#xD;&#xA;                                                             [string] [required]&#xD;&#xA;&#xD;&#xA;Unknown argument: endpoint&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;a few questions:&#xD;&#xA;&#xD;&#xA;- is typegen still up to date and something that can be used to decorate APIs?&#xD;&#xA;- has endpoint been removed as an argument?&#xD;&#xA;- am i going about thing the correct way to decorate the api?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/typegen&#xD;&#xA;  [2]: https://github.com/decentration/substrate-supersig-template&#xD;&#xA;  [3]: https://github.com/polkadot-js/docs" ContentLicense="CC BY-SA 4.0" />
  <row Id="18972" PostHistoryTypeId="2" PostId="5070" RevisionGUID="347f0f18-fac9-4edc-a3d2-82f53f88cf74" CreationDate="2022-09-28T15:22:38.393" UserId="3127" Text="The `substrate-node-template` allows you to query the `system.account` storage item, see screenshot [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The corresponding command is &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getStorage&quot;, &quot;params&quot;: [&quot;0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9de1e86a9a8c739864cf3cc5ec2bea59fd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;]}' http://127.0.0.1:9933&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x01000000000000000100000000000000dcb114568172fc0f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&quot;,&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `frame_system` declares an `AccountInfo` struct that [details][2] the data field of an account: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Information of an account.&#xD;&#xA;#[derive(Clone, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode)]&#xD;&#xA;pub struct AccountInfo&lt;Index, AccountData&gt; {&#xD;&#xA;	/// The number of transactions this account has sent.&#xD;&#xA;	pub nonce: Index,&#xD;&#xA;	/// The number of other modules that currently depend on this account's existence. The account&#xD;&#xA;	/// cannot be reaped until this is zero.&#xD;&#xA;	pub consumers: RefCount,&#xD;&#xA;	/// The number of other modules that allow this account to exist. The account may not be reaped&#xD;&#xA;	/// until this is zero.&#xD;&#xA;	pub providers: RefCount,&#xD;&#xA;	/// The additional data that belongs to this account. Used to store the balance(s) in a lot of&#xD;&#xA;	/// chains.&#xD;&#xA;	pub data: AccountData,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vqLFm.jpg&#xD;&#xA;  [2]: https://docs.rs/frame-system/latest/src/frame_system/lib.rs.html#744" ContentLicense="CC BY-SA 4.0" />
  <row Id="18974" PostHistoryTypeId="5" PostId="5070" RevisionGUID="2c364681-ac17-4c93-a3fe-255eb1cb49f5" CreationDate="2022-09-28T15:31:06.787" UserId="3127" Comment="added 439 characters in body" Text="The `substrate-node-template` allows you to query the `system.account` storage item, see screenshot [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The corresponding command is &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getStorage&quot;, &quot;params&quot;: [&quot;0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9de1e86a9a8c739864cf3cc5ec2bea59fd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;]}' http://127.0.0.1:9933&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x01000000000000000100000000000000dcb114568172fc0f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&quot;,&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `frame_system` declares an `AccountInfo` struct that [details][2] the data field of an account: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Information of an account.&#xD;&#xA;#[derive(Clone, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode)]&#xD;&#xA;pub struct AccountInfo&lt;Index, AccountData&gt; {&#xD;&#xA;	/// The number of transactions this account has sent.&#xD;&#xA;	pub nonce: Index,&#xD;&#xA;	/// The number of other modules that currently depend on this account's existence. The account&#xD;&#xA;	/// cannot be reaped until this is zero.&#xD;&#xA;	pub consumers: RefCount,&#xD;&#xA;	/// The number of other modules that allow this account to exist. The account may not be reaped&#xD;&#xA;	/// until this is zero.&#xD;&#xA;	pub providers: RefCount,&#xD;&#xA;	/// The additional data that belongs to this account. Used to store the balance(s) in a lot of&#xD;&#xA;	/// chains.&#xD;&#xA;	pub data: AccountData,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vqLFm.jpg&#xD;&#xA;  [2]: https://docs.rs/frame-system/latest/src/frame_system/lib.rs.html#744&#xD;&#xA;&#xD;&#xA;The `runtime/lib.rs` is where all of your configs are created. If you look carefully at &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;	...&#xD;&#xA;	type AccountData = pallet_balances::AccountData&lt;Balance&gt;;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_balances::Config for Runtime {&#xD;&#xA;	...&#xD;&#xA;	type AccountStore = System;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;you will see why the `system` storage exposes the balances in the data, not the `balances` storage. Use `type AccountStore = Balances;` instead to leverage the usage of `pallet-balances`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="18975" PostHistoryTypeId="5" PostId="5070" RevisionGUID="830cb781-303f-49a8-8c90-9ae870909b6b" CreationDate="2022-09-28T15:39:21.760" UserId="3127" Comment="added 4 characters in body" Text="The `substrate-node-template` allows you to query the `system.account` storage item, see screenshot [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The corresponding command is &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getStorage&quot;, &quot;params&quot;: [&quot;0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9de1e86a9a8c739864cf3cc5ec2bea59fd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;]}' http://127.0.0.1:9933&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x01000000000000000100000000000000dcb114568172fc0f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&quot;,&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `frame_system` declares an `AccountInfo` struct that [details][2] the data field of an account: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Information of an account.&#xD;&#xA;#[derive(Clone, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode)]&#xD;&#xA;pub struct AccountInfo&lt;Index, AccountData&gt; {&#xD;&#xA;	/// The number of transactions this account has sent.&#xD;&#xA;	pub nonce: Index,&#xD;&#xA;	/// The number of other modules that currently depend on this account's existence. The account&#xD;&#xA;	/// cannot be reaped until this is zero.&#xD;&#xA;	pub consumers: RefCount,&#xD;&#xA;	/// The number of other modules that allow this account to exist. The account may not be reaped&#xD;&#xA;	/// until this is zero.&#xD;&#xA;	pub providers: RefCount,&#xD;&#xA;	/// The additional data that belongs to this account. Used to store the balance(s) in a lot of&#xD;&#xA;	/// chains.&#xD;&#xA;	pub data: AccountData,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vqLFm.jpg&#xD;&#xA;  [2]: https://docs.rs/frame-system/latest/src/frame_system/lib.rs.html#744&#xD;&#xA;&#xD;&#xA;The `runtime/src/lib.rs` is where all of your configs are created. If you look carefully at &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;	...&#xD;&#xA;	type AccountData = pallet_balances::AccountData&lt;Balance&gt;;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_balances::Config for Runtime {&#xD;&#xA;	...&#xD;&#xA;	type AccountStore = System;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;you will see why the `system` storage exposes the balances in the data, not the `balances` storage. Use `type AccountStore = Balances;` instead to leverage the usage of `pallet-balances`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="18976" PostHistoryTypeId="2" PostId="5071" RevisionGUID="c1cec6e5-6002-46a9-9660-ffc55458483e" CreationDate="2022-09-28T16:38:04.517" UserId="3237" Text="I'm writing a test case for the on_initalize hook!&#xD;&#xA;```&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;		fn on_initialize(_now: T::BlockNumber) -&gt; Weight {&#xD;&#xA;		 &#xD;&#xA;             /// my logic			&#xD;&#xA;		&#xD;&#xA;					&#xD;&#xA;			T::DbWeight::get().writes(1)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And, when I write a test case, its throws an error: ---- tests::valid_weights stdout ----&#xD;&#xA;thread 'tests::valid_weights' panicked at 'attempt to subtract with overflow', pallets/pallet_oracle_feed/src/lib.rs:86:29&#xD;&#xA;note: run with the `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[test]&#xD;&#xA;fn valid_weights() {&#xD;&#xA;    use frame_support::pallet_prelude::*;&#xD;&#xA;    use frame_support::weights::RuntimeDbWeight;&#xD;&#xA;&#xD;&#xA;    new_test_ext().execute_with(|| {&#xD;&#xA;      let db_weights: RuntimeDbWeight = &lt;Test as frame_system::Config&gt;::DbWeight::get();&#xD;&#xA;     &#xD;&#xA;&#xD;&#xA;        assert_eq!(&#xD;&#xA;            ClubPalletTesting::on_initialize(1),&#xD;&#xA;            db_weights.writes(2));&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18978" PostHistoryTypeId="1" PostId="5071" RevisionGUID="c1cec6e5-6002-46a9-9660-ffc55458483e" CreationDate="2022-09-28T16:38:04.517" UserId="3237" Text="Test Case failing on on_initialize hook!" ContentLicense="CC BY-SA 4.0" />
  <row Id="18979" PostHistoryTypeId="3" PostId="5071" RevisionGUID="c1cec6e5-6002-46a9-9660-ffc55458483e" CreationDate="2022-09-28T16:38:04.517" UserId="3237" Text="|polkadot|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18980" PostHistoryTypeId="2" PostId="5072" RevisionGUID="172fbbfa-4361-428d-b295-93a87e42871e" CreationDate="2022-09-28T16:41:44.903" UserId="2417" Text="In 3.* version, I can use `::ink_storage::traits::push_spread_root::&lt;Self&gt;(self, &amp;root_key);` very well.&#xD;&#xA;&#xD;&#xA;What is the substitution in `ink 4.0.0-alpha.3`? I cannot find it anymore~" ContentLicense="CC BY-SA 4.0" />
  <row Id="18982" PostHistoryTypeId="1" PostId="5072" RevisionGUID="172fbbfa-4361-428d-b295-93a87e42871e" CreationDate="2022-09-28T16:41:44.903" UserId="2417" Text="What is the substitution of `::ink_storage::traits::push_spread_root::&lt;Self&gt;(self, &amp;root_key);` in `ink 4.0.0-alpha.3`" ContentLicense="CC BY-SA 4.0" />
  <row Id="18983" PostHistoryTypeId="3" PostId="5072" RevisionGUID="172fbbfa-4361-428d-b295-93a87e42871e" CreationDate="2022-09-28T16:41:44.903" UserId="2417" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18984" PostHistoryTypeId="2" PostId="5073" RevisionGUID="d1d2af1e-e8c3-4c81-b677-f762aa73eca7" CreationDate="2022-09-28T16:43:40.553" UserId="1810" Text="We definitely should clean up these behaviors obviously, but right now afaik nobody clearly articulated all the concerns, so what fixes happen maybe lacking somehow unless someone spells out the various perceived shortcomings.&#xD;&#xA;&#xD;&#xA;You'll find https://github.com/paritytech/substrate/pull/12359 interesting, but again I do not know what portion of those concerns it covers, likely only staking actions. " ContentLicense="CC BY-SA 4.0" />
  <row Id="18986" PostHistoryTypeId="52" PostId="5058" RevisionGUID="0fd8bd86-8d7a-4357-91dc-cd8604a89197" CreationDate="2022-09-28T17:03:09.760" />
  <row Id="18987" PostHistoryTypeId="2" PostId="5074" RevisionGUID="e8679b80-702f-49e1-a9ed-d7a0236b72ba" CreationDate="2022-09-28T17:31:34.477" UserId="1959" Text="You could find a lot of info in this file: [origin_conversion.rs](https://github.com/paritytech/polkadot/blob/master/xcm/xcm-builder/src/origin_conversion.rs)&#xD;&#xA;&#xD;&#xA;Your focus is the **difference between `Native` and `SovereignAccount`**, I will try to explain these two first.&#xD;&#xA;&#xD;&#xA;If you use `SovereignAccount`, it just [signed(location)](https://github.com/paritytech/polkadot/blob/master/xcm/xcm-builder/src/origin_conversion.rs#L49). Buf if you use `Native` and send it to other chain, it will be wrapped in an Origin, may be [`Origin::Parachain(paraId)`](https://github.com/paritytech/polkadot/blob/master/xcm/xcm-builder/src/origin_conversion.rs#L136), or [`Origin::SiblingParachain(paraId)`](https://github.com/paritytech/polkadot/blob/master/xcm/xcm-builder/src/origin_conversion.rs#L162), or [`Origin::Relay`](https://github.com/paritytech/polkadot/blob/master/xcm/xcm-builder/src/origin_conversion.rs#L182), it depends on what is the sender chain and the xcm_config of receiver chain. And please note that **if you choose `Native` and send from a parachain, it owns the parachain privileges**, and you should use **sudo or governance to send it**(like request initOpenHrmp), otherwise it will [`match`](https://github.com/paritytech/polkadot/blob/master/xcm/xcm-builder/src/origin_conversion.rs#L161) failed due to `DescendOrigin` change the origin location.&#xD;&#xA;&lt;hr&gt; &#xD;&#xA;&#xD;&#xA;Let's see **an example to compare SovereignAccount and Native**：&#xD;&#xA;ParaA send XCM to relay_chain, transact call `hrmp.hrmpCloseChannelRequests`.&#xD;&#xA;&#xD;&#xA;If you use `SovereignAccount` and send it to relay_chain, it will failed because [`ensure_parachain`](https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/hrmp.rs#L504) needs to make sure the account have sender chain privileges and is `Origin::Parachain(paraId)`.&#xD;&#xA;&#xD;&#xA;Then we should use `Native` and send it to relay_chain, converted by [`ChildParachainAsNative`](https://github.com/paritytech/polkadot/blob/master/xcm/xcm-builder/src/origin_conversion.rs#L136), it will be `Origin::Parachain(paraId)`, and can pass the [`ensure_parachain`](https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/origin.rs#L27).&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;**`OriginKind::Superuser`** can be used in a scenario like call `assets.forceCreate`(on statemint) from relaychain. We should send the XCM via sudo or governance, then origin will be converted by [`ParentAsSuperuser`](https://github.com/paritytech/polkadot/blob/master/xcm/xcm-builder/src/origin_conversion.rs#L65), it will be root and can pass [`AssetsForceOrigin`](https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/assets/statemint/src/lib.rs#L258).&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="18989" PostHistoryTypeId="5" PostId="5071" RevisionGUID="0645e9a1-a8f3-4577-a30c-368ece75dc09" CreationDate="2022-09-28T17:36:13.367" UserId="3237" Comment="added 247 characters in body" Text="I'm writing a test case for the on_initalize hook!&#xD;&#xA;```&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;		fn on_initialize(_now: T::BlockNumber) -&gt; Weight {&#xD;&#xA;		 &#xD;&#xA;             let time: u64 = T::TimeProvider::now().as_secs() - 180 ;&#xD;&#xA;			&#xD;&#xA;			&lt;RootOracleEvent&lt;T&gt;&gt;::mutate(|event_list| {&#xD;&#xA;				if let Some(index) = event_list.iter().position(|member| member.time_stamp &lt;= time) {&#xD;&#xA;					event_list.remove(index);&#xD;&#xA;					&#xD;&#xA;				}&#xD;&#xA;				&#xD;&#xA;			});		&#xD;&#xA;		&#xD;&#xA;					&#xD;&#xA;			T::DbWeight::get().writes(1)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And, when I write a test case, its throws an error: ---- tests::valid_weights stdout ----&#xD;&#xA;thread 'tests::valid_weights' panicked at 'attempt to subtract with overflow', pallets/pallet_oracle_feed/src/lib.rs:86:29&#xD;&#xA;note: run with the `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[test]&#xD;&#xA;fn valid_weights() {&#xD;&#xA;    use frame_support::pallet_prelude::*;&#xD;&#xA;    use frame_support::weights::RuntimeDbWeight;&#xD;&#xA;&#xD;&#xA;    new_test_ext().execute_with(|| {&#xD;&#xA;      let db_weights: RuntimeDbWeight = &lt;Test as frame_system::Config&gt;::DbWeight::get();&#xD;&#xA;     &#xD;&#xA;&#xD;&#xA;        assert_eq!(&#xD;&#xA;            ClubPalletTesting::on_initialize(1),&#xD;&#xA;            db_weights.writes(2));&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="18990" PostHistoryTypeId="2" PostId="5075" RevisionGUID="d9c3bebf-9a94-455a-a4d8-b19d79411438" CreationDate="2022-09-28T17:57:58.490" UserId="94" Text="Three things:  &#xD;&#xA;1. Could be that you are not initializing the block number, it is therefore 0. This can lead to various errors when subtracting from it. You can easily fix this by modifying your `new_test_ext` function to do so. `1` may not be enough in your case. &#xD;&#xA;```rust&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;    let mut ext: sp_io::TestExternalities = system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap().into();&#xD;&#xA;    ext.execute_with(|| System::set_block_number(1));&#xD;&#xA;    ext&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Ensure that the `TimeProvider` is initialized before your pallet. A good example is in [pallet-gilt](https://github.com/paritytech/substrate/blob/1b1a5e12c0e391c7ed4e3ffa332eb2fe928d257f/frame/gilt/src/mock.rs#L128). I dont know what your time provider does, but it seems to return something less than 180 secs, hence the error. &#xD;&#xA;3. Always use `saturating` or `checked` arithmetic operations in the runtime.  &#xD;&#xA;You can change the code to `let time: u64 = T::TimeProvider::now().as_secs().saturating_sub(180);`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="18992" PostHistoryTypeId="52" PostId="5061" RevisionGUID="c6a6e021-cc93-4861-9e3e-ef2c287a6cea" CreationDate="2022-09-28T19:21:18.460" />
  <row Id="18993" PostHistoryTypeId="2" PostId="5076" RevisionGUID="81f64b99-3250-45e1-ac24-55273dbf4f72" CreationDate="2022-09-28T20:26:50.313" UserId="1780" Text="I don't why the nodes you are connecting to are so slow but you could try to increase the connection timeout as follows (you need include jsonrpsee in your Cargo.toml as well):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use subxt::{OnlineClient, SubstrateConfig};&#xD;&#xA;use jsonrpsee::ws_client::WsClientBuilder;&#xD;&#xA;use std::time::Duration;&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime {}&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;    let rpc_client = WsClientBuilder::default()&#xD;&#xA;        .connection_timeout(Duration::from_seconds(60))&#xD;&#xA;        .build(&quot;wss://kusama-rpc.polkadot.io:433&quot;)&#xD;&#xA;        .await?;&#xD;&#xA;&#xD;&#xA;    let api = SubxtClient::from_rpc_client(rpc).await?;&#xD;&#xA;&#xD;&#xA;    let address = runtime::constants().balances().existential_deposit();&#xD;&#xA;    let existential_deposit = api.constants().at(&amp;address)?;&#xD;&#xA;    println!(&quot;Existential Deposit: {}&quot;, existential_deposit);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In addition make sure your compile the program in `--release mode`" ContentLicense="CC BY-SA 4.0" />
  <row Id="18995" PostHistoryTypeId="2" PostId="5077" RevisionGUID="5e00f1ce-2453-4d4d-af23-6e483710ebe4" CreationDate="2022-09-28T20:57:32.077" UserId="3142" Text="I could not find any example code that shows how to call `mutate()` for offchain storage. Looking for an example. I could only find onchain examples.&#xD;&#xA;&#xD;&#xA;https://docs.rs/sp-runtime/latest/sp_runtime/offchain/storage/struct.StorageValueRef.html#method.mutate" ContentLicense="CC BY-SA 4.0" />
  <row Id="18997" PostHistoryTypeId="1" PostId="5077" RevisionGUID="5e00f1ce-2453-4d4d-af23-6e483710ebe4" CreationDate="2022-09-28T20:57:32.077" UserId="3142" Text="Example for sp_runtime::offchain::storage::mutate()" ContentLicense="CC BY-SA 4.0" />
  <row Id="18998" PostHistoryTypeId="3" PostId="5077" RevisionGUID="5e00f1ce-2453-4d4d-af23-6e483710ebe4" CreationDate="2022-09-28T20:57:32.077" UserId="3142" Text="|substrate-node|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="18999" PostHistoryTypeId="2" PostId="5078" RevisionGUID="4974f5f6-8928-4aa4-8fbf-4ae293d139cc" CreationDate="2022-09-28T21:15:11.143" UserId="3142" Text="https://github.com/paritytech/substrate/blob/master/frame/examples/offchain-worker/src/lib.rs&#xD;&#xA;&#xD;&#xA;	let val = StorageValueRef::persistent(b&quot;example_ocw::last_send&quot;);&#xD;&#xA;	// The Local Storage is persisted and shared between runs of the offchain workers,&#xD;&#xA;	// and offchain workers may run concurrently. We can use the `mutate` function, to&#xD;&#xA;	// write a storage entry in an atomic fashion. Under the hood it uses `compare_and_set`&#xD;&#xA;	// low-level method of local storage API, which means that only one worker&#xD;&#xA;	// will be able to &quot;acquire a lock&quot; and send a transaction if multiple workers&#xD;&#xA;	// happen to be executed concurrently.&#xD;&#xA;	let res = val.mutate(|last_send: Result&lt;Option&lt;T::BlockNumber&gt;, StorageRetrievalError&gt;| {&#xD;&#xA;		match last_send {&#xD;&#xA;			// If we already have a value in storage and the block number is recent enough&#xD;&#xA;			// we avoid sending another transaction at this time.&#xD;&#xA;			Ok(Some(block)) if block_number &lt; block + T::GracePeriod::get() =&gt;&#xD;&#xA;				Err(RECENTLY_SENT),&#xD;&#xA;			// In every other case we attempt to acquire the lock and send a transaction.&#xD;&#xA;			_ =&gt; Ok(block_number),&#xD;&#xA;		}&#xD;&#xA;	});" ContentLicense="CC BY-SA 4.0" />
  <row Id="19009" PostHistoryTypeId="2" PostId="5081" RevisionGUID="be3ec0e0-7c19-430c-af48-68ee68be1e5c" CreationDate="2022-09-29T01:25:34.263" UserId="3236" Text="Personally, while writing the Treasury contract, it was necessary to change the string type to the account ID type. Even if I google how to do it, I can't find a proper solution, so I'm curious what the solution is." ContentLicense="CC BY-SA 4.0" />
  <row Id="19011" PostHistoryTypeId="1" PostId="5081" RevisionGUID="be3ec0e0-7c19-430c-af48-68ee68be1e5c" CreationDate="2022-09-29T01:25:34.263" UserId="3236" Text="How to convert str type to AccountID type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19012" PostHistoryTypeId="3" PostId="5081" RevisionGUID="be3ec0e0-7c19-430c-af48-68ee68be1e5c" CreationDate="2022-09-29T01:25:34.263" UserId="3236" Text="|polkadot|ink|smart-contract|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19013" PostHistoryTypeId="50" PostId="4503" RevisionGUID="cd0a0043-8414-4be9-bb7a-8dd9c6e70855" CreationDate="2022-09-29T03:06:00.660" UserId="-1" />
  <row Id="19014" PostHistoryTypeId="2" PostId="5082" RevisionGUID="d849f294-d600-4d5a-a2d0-37dc13f562f7" CreationDate="2022-09-29T05:31:32.870" UserId="2551" Text="# Problem&#xD;&#xA;When executing the following command, an error occurred.&#xD;&#xA;```&#xD;&#xA;cargo contract build&#xD;&#xA;ERROR: Mismatching versions of `parity-scale-codec` were found!&#xD;&#xA;Please ensure that your contract and your ink! dependencies use a compatible version of this package.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# Environment&#xD;&#xA;- OS: Ubuntu 20.04 wsl&#xD;&#xA;- cargo-contract: 2.0.0-alpha.3-unknown-x86_64-unknown-linux-gnu&#xD;&#xA;- ink: &#xD;&#xA;  ink = { version = &quot;4.0.0-alpha.3&quot;, default-features = false }&#xD;&#xA;  scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;  scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;- rustc: 1.66.0-nightly&#xD;&#xA;&#xD;&#xA;# Code&#xD;&#xA;The template code&#xD;&#xA;```&#xD;&#xA;cargo contract new alpha403&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have checked the version of `parity-scale-codec`, it is version `3` in both my ink! project and in the ink package of version `4.0.0-alpha.3`." ContentLicense="CC BY-SA 4.0" />
  <row Id="19016" PostHistoryTypeId="1" PostId="5082" RevisionGUID="d849f294-d600-4d5a-a2d0-37dc13f562f7" CreationDate="2022-09-29T05:31:32.870" UserId="2551" Text="Mismatching versions of `parity-scale-codec` were found!" ContentLicense="CC BY-SA 4.0" />
  <row Id="19017" PostHistoryTypeId="3" PostId="5082" RevisionGUID="d849f294-d600-4d5a-a2d0-37dc13f562f7" CreationDate="2022-09-29T05:31:32.870" UserId="2551" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19018" PostHistoryTypeId="5" PostId="5082" RevisionGUID="010df1cb-43de-488c-a36d-e2ec2f7d76e0" CreationDate="2022-09-29T06:13:16.490" UserId="251" Comment="added 18 characters in body" Text="# Problem&#xD;&#xA;When executing the following command, an error occurred.&#xD;&#xA;```&#xD;&#xA;cargo contract build&#xD;&#xA;ERROR: Mismatching versions of `parity-scale-codec` were found!&#xD;&#xA;Please ensure that your contract and your ink! dependencies use a compatible version of this package.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# Environment&#xD;&#xA;- OS: Ubuntu 20.04 wsl&#xD;&#xA;- cargo-contract: 2.0.0-alpha.3-unknown-x86_64-unknown-linux-gnu&#xD;&#xA;- ink: &#xD;&#xA;  ```toml&#xD;&#xA;  ink = { version = &quot;4.0.0-alpha.3&quot;, default-features = false }&#xD;&#xA;  scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;  scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;  ```&#xD;&#xA;- rustc: 1.66.0-nightly&#xD;&#xA;&#xD;&#xA;# Code&#xD;&#xA;The template code&#xD;&#xA;```&#xD;&#xA;cargo contract new alpha403&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have checked the version of `parity-scale-codec`, it is version `3` in both my ink! project and in the ink package of version `4.0.0-alpha.3`." ContentLicense="CC BY-SA 4.0" />
  <row Id="19019" PostHistoryTypeId="5" PostId="5072" RevisionGUID="e74b0aaf-a15c-4af9-b82f-e652fda84bfd" CreationDate="2022-09-29T07:14:15.487" UserId="2417" Comment="added 91 characters in body" Text="In 3.* version, I can use `::ink_storage::traits::push_spread_root::&lt;Self&gt;(self, &amp;root_key);` very well.&#xD;&#xA;&#xD;&#xA;What is the substitution in `ink 4.0.0-alpha.3`? I cannot find it anymore~&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Lryx0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19020" PostHistoryTypeId="2" PostId="5083" RevisionGUID="2fdc81cc-3c5a-47fb-8b87-4250c3d27b14" CreationDate="2022-09-29T08:06:03.923" UserId="251" Text="Did you restart the node after inserting the GRANDPA key? I remember there is an issue about that.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/issues/7268" ContentLicense="CC BY-SA 4.0" />
  <row Id="19022" PostHistoryTypeId="2" PostId="5084" RevisionGUID="d2101ff9-ab9c-4aed-b80f-1f5c4bea95bf" CreationDate="2022-09-29T09:08:24.347" UserId="1942" Text="rustc --version&#xD;&#xA;rustc 1.66.0-nightly (2019147c5 2022-09-19)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;% cargo check                             &#xD;&#xA;    Checking sp-core v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;   Compiling librocksdb-sys v0.6.1+6.28.2&#xD;&#xA;   Compiling node-runtime v2.0.1 (/Users/li/Documents/GitHub/xx-chain/runtime)&#xD;&#xA;    Checking sp-trie v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-keystore v0.12.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-allocator v4.1.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-rpc v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-state-machine v0.12.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-io v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-application-crypto v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-sandbox v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-tasks v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-sysinfo v6.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-executor-common v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-runtime v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-keystore v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-executor-wasmi v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-executor-wasmtime v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-version v5.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-inherents v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-api v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-staking v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-executor v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-finality-grandpa v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-session v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-offchain v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-transaction-pool v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-keyring v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-consensus-vrf v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking pallet-contracts-primitives v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking fp-consensus v2.0.0-dev (https://github.com/xx-chain/frontier.git?branch=dev/polkadot-v0.9.29#c4623288)&#xD;&#xA;    Checking sp-mmr-primitives v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-authority-discovery v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-npos-elections v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking pallet-contracts-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking frame-system-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking frame-support v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-consensus v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-timestamp v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-block-builder v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-blockchain v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-consensus-slots v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-transaction-storage-proof v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-authorship v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-transaction-pool-api v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sp-consensus-babe v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking fp-dynamic-fee v1.0.0 (https://github.com/xx-chain/frontier.git?branch=dev/polkadot-v0.9.29#c4623288)&#xD;&#xA;    Checking sc-client-api v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking pallet-contracts-rpc v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking pallet-mmr-rpc v3.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-consensus v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-block-builder v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-state-db v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-network-common v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-tracing v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-chain-spec v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-network v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-rpc-api v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-network-sync v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-rpc v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-informant v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-network-light v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-offchain v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-transaction-pool v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-network-gossip v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-consensus-slots v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-consensus-epochs v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-finality-grandpa v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-consensus-babe v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-consensus-babe-rpc v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking substrate-frame-rpc-system v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-authority-discovery v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-finality-grandpa-rpc v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-sync-state-rpc v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-basic-authorship v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking sc-consensus-uncles v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking frame-system v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking fp-evm v3.0.0-dev (https://github.com/xx-chain/frontier.git?branch=dev/polkadot-v0.9.29#c4623288)&#xD;&#xA;    Checking pallet-timestamp v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking pallet-balances v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking node-primitives v2.0.0 (/Users/li/Documents/GitHub/xx-chain/primitives)&#xD;&#xA;    Checking pallet-treasury v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking pallet-uniques v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;    Checking pallet-user-privileges v4.0.0 (/Users/li/Documents/GitHub/xx-chain/pallets/user-privileges)&#xD;&#xA;error: generic arguments must come before the first constraint&#xD;&#xA;   --&gt; /Users/li/.cargo/git/checkouts/substrate-7e08433d4c370a21/7c4ac35/frame/uniques/src/lib.rs:113:4&#xD;&#xA;    |&#xD;&#xA;112 |             Success = Self::AccountId,&#xD;&#xA;    |             ------------------------- constraint&#xD;&#xA;113 |             Self::Origin,&#xD;&#xA;    |             ^^^^^^^^^^^^&#xD;&#xA;114 |             Self::CollectionId,&#xD;&#xA;    |             ^^^^^^^^^^^^^^^^^^ generic arguments&#xD;&#xA;    |&#xD;&#xA;help: move the constraint after the generic arguments&#xD;&#xA;    |&#xD;&#xA;111 |         type CreateOrigin: EnsureOriginWithArg&lt;Self::Origin, Self::CollectionId, Success = Self::AccountId&gt;;&#xD;&#xA;    |                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&#xD;&#xA;&#xD;&#xA;    Checking pallet-evm v6.0.0-dev (https://github.com/xx-chain/frontier.git?branch=dev/polkadot-v0.9.29#c4623288)&#xD;&#xA;error: could not compile `pallet-uniques` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: failed to run custom build command for `node-runtime v2.0.1 (/Users/li/Documents/GitHub/xx-chain/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/li/Documents/GitHub/xx-chain/target/debug/build/node-runtime-2d7feed94b5a307b/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;/Users/li/.rustup/toolchains/nightly-2022-09-20-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/li/Documents/GitHub/xx-chain/target/debug/wbuild/node-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.66.0-nightly (2019147c5 2022-09-19)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling proc-macro2 v1.0.46&#xD;&#xA;     Compiling quote v1.0.21&#xD;&#xA;     Compiling unicode-ident v1.0.4&#xD;&#xA;     Compiling syn v1.0.101&#xD;&#xA;     Compiling version_check v0.9.4&#xD;&#xA;     Compiling serde_derive v1.0.145&#xD;&#xA;     Compiling serde v1.0.145&#xD;&#xA;     Compiling thiserror v1.0.37&#xD;&#xA;     Compiling typenum v1.15.0&#xD;&#xA;     Compiling once_cell v1.15.0&#xD;&#xA;     Compiling generic-array v0.14.6&#xD;&#xA;     Compiling bytes v1.2.1&#xD;&#xA;     Compiling autocfg v1.1.0&#xD;&#xA;     Compiling byteorder v1.4.3&#xD;&#xA;     Compiling unicode-xid v0.2.4&#xD;&#xA;     Compiling arrayvec v0.7.2&#xD;&#xA;     Compiling byte-slice-cast v1.2.1&#xD;&#xA;     Compiling cfg-if v1.0.0&#xD;&#xA;     Compiling crunchy v0.2.2&#xD;&#xA;     Compiling rustc-hex v2.1.0&#xD;&#xA;     Compiling static_assertions v1.1.0&#xD;&#xA;     Compiling rlp v0.5.1&#xD;&#xA;     Compiling num-traits v0.2.15&#xD;&#xA;     Compiling fixed-hash v0.7.0&#xD;&#xA;     Compiling memchr v2.5.0&#xD;&#xA;     Compiling impl-rlp v0.3.0&#xD;&#xA;     Compiling hex v0.4.3&#xD;&#xA;     Compiling log v0.4.17&#xD;&#xA;     Compiling serde_json v1.0.85&#xD;&#xA;     Compiling uint v0.9.4&#xD;&#xA;     Compiling aho-corasick v0.7.19&#xD;&#xA;     Compiling itoa v1.0.3&#xD;&#xA;     Compiling regex-syntax v0.6.27&#xD;&#xA;     Compiling ryu v1.0.11&#xD;&#xA;     Compiling lazy_static v1.4.0&#xD;&#xA;     Compiling ahash v0.7.6&#xD;&#xA;     Compiling libc v0.2.133&#xD;&#xA;     Compiling sp-std v4.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling pin-project-lite v0.2.9&#xD;&#xA;     Compiling hash-db v0.15.2&#xD;&#xA;     Compiling ref-cast v1.0.9&#xD;&#xA;     Compiling synstructure v0.12.6&#xD;&#xA;     Compiling hashbrown v0.12.3&#xD;&#xA;     Compiling regex v1.6.0&#xD;&#xA;     Compiling parity-util-mem v0.11.0&#xD;&#xA;     Compiling tracing-core v0.1.29&#xD;&#xA;     Compiling tracing v0.1.36&#xD;&#xA;     Compiling Inflector v0.11.4&#xD;&#xA;     Compiling hash256-std-hasher v0.15.2&#xD;&#xA;     Compiling environmental v1.1.3&#xD;&#xA;     Compiling bitflags v1.3.2&#xD;&#xA;     Compiling integer-sqrt v0.1.5&#xD;&#xA;     Compiling subtle v2.4.1&#xD;&#xA;     Compiling thiserror-impl v1.0.37&#xD;&#xA;     Compiling impl-trait-for-tuples v0.2.2&#xD;&#xA;     Compiling derive_more v0.99.17&#xD;&#xA;     Compiling zeroize_derive v1.3.2&#xD;&#xA;     Compiling zeroize v1.5.7&#xD;&#xA;     Compiling sp-debug-derive v4.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling ref-cast-impl v1.0.9&#xD;&#xA;     Compiling parity-util-mem-derive v0.1.0&#xD;&#xA;     Compiling secrecy v0.8.0&#xD;&#xA;     Compiling either v1.8.0&#xD;&#xA;     Compiling paste v1.0.9&#xD;&#xA;     Compiling block-buffer v0.10.3&#xD;&#xA;     Compiling crypto-common v0.1.6&#xD;&#xA;     Compiling cpufeatures v0.2.5&#xD;&#xA;     Compiling digest v0.10.5&#xD;&#xA;     Compiling blake2 v0.10.4&#xD;&#xA;     Compiling keccak v0.1.2&#xD;&#xA;     Compiling twox-hash v1.6.3&#xD;&#xA;     Compiling sha3 v0.10.5&#xD;&#xA;     Compiling sha2 v0.10.6&#xD;&#xA;     Compiling sp-core-hashing v4.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling rand_core v0.6.4&#xD;&#xA;     Compiling digest v0.9.0&#xD;&#xA;     Compiling const-oid v0.7.1&#xD;&#xA;     Compiling ff v0.11.1&#xD;&#xA;     Compiling signature v1.4.0&#xD;&#xA;     Compiling crypto-bigint v0.3.2&#xD;&#xA;     Compiling sp-core-hashing-proc-macro v5.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling der v0.5.1&#xD;&#xA;     Compiling crypto-mac v0.11.1&#xD;&#xA;     Compiling group v0.11.0&#xD;&#xA;     Compiling base16ct v0.1.1&#xD;&#xA;     Compiling hmac v0.11.0&#xD;&#xA;     Compiling frame-support-procedural-tools-derive v3.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling smallvec v1.9.0&#xD;&#xA;     Compiling itertools v0.10.5&#xD;&#xA;     Compiling sec1 v0.2.1&#xD;&#xA;     Compiling rfc6979 v0.1.0&#xD;&#xA;     Compiling cfg-expr v0.10.3&#xD;&#xA;     Compiling tt-call v1.0.8&#xD;&#xA;     Compiling elliptic-curve v0.11.12&#xD;&#xA;     Compiling ecdsa v0.13.4&#xD;&#xA;     Compiling k256 v0.10.4&#xD;&#xA;     Compiling tiny-keccak v2.0.2&#xD;&#xA;     Compiling proc-macro-error-attr v1.0.4&#xD;&#xA;     Compiling proc-macro-error v1.0.4&#xD;&#xA;     Compiling rlp-derive v0.1.0&#xD;&#xA;     Compiling triehash v0.8.4&#xD;&#xA;     Compiling enumflags2_derive v0.7.4&#xD;&#xA;     Compiling rand_core v0.5.1&#xD;&#xA;     Compiling jobserver v0.1.25&#xD;&#xA;     Compiling num-integer v0.1.45&#xD;&#xA;     Compiling generic-array v0.12.4&#xD;&#xA;     Compiling toml v0.5.9&#xD;&#xA;     Compiling enumflags2 v0.7.5&#xD;&#xA;     Compiling cc v1.0.73&#xD;&#xA;     Compiling futures-core v0.3.24&#xD;&#xA;     Compiling proc-macro-crate v1.2.1&#xD;&#xA;     Compiling zstd-safe v5.0.2+zstd.1.5.2&#xD;&#xA;     Compiling frame-support-procedural-tools v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling zstd-sys v2.0.1+zstd.1.5.2&#xD;&#xA;     Compiling ss58-registry v1.29.1&#xD;&#xA;     Compiling futures-task v0.3.24&#xD;&#xA;     Compiling auto_impl v0.5.0&#xD;&#xA;     Compiling byte-tools v0.3.1&#xD;&#xA;     Compiling parity-scale-codec-derive v3.1.3&#xD;&#xA;     Compiling scale-info-derive v2.2.0&#xD;&#xA;     Compiling sp-runtime-interface-proc-macro v5.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-api-proc-macro v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling frame-support-procedural v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling rustversion v1.0.9&#xD;&#xA;     Compiling parity-scale-codec v3.2.1&#xD;&#xA;     Compiling block-padding v0.1.5&#xD;&#xA;     Compiling sp-version-proc-macro v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling digest v0.8.1&#xD;&#xA;     Compiling trie-db v0.24.0&#xD;&#xA;     Compiling trie-root v0.17.0&#xD;&#xA;     Compiling semver v1.0.14&#xD;&#xA;     Compiling scale-info v2.2.0&#xD;&#xA;     Compiling impl-codec v0.6.0&#xD;&#xA;     Compiling sp-storage v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-wasm-interface v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-tracing v5.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling futures-sink v0.3.24&#xD;&#xA;     Compiling camino v1.1.1&#xD;&#xA;     Compiling arrayvec v0.4.12&#xD;&#xA;     Compiling futures-channel v0.3.24&#xD;&#xA;     Compiling futures-util v0.3.24&#xD;&#xA;     Compiling sp-externalities v0.12.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling primitive-types v0.11.1&#xD;&#xA;     Compiling sp-arithmetic v5.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling frame-metadata v15.0.0&#xD;&#xA;     Compiling ethbloom v0.12.1&#xD;&#xA;     Compiling block-buffer v0.7.3&#xD;&#xA;     Compiling sp-runtime-interface v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling ethereum-types v0.13.1&#xD;&#xA;     Compiling evm-core v0.35.0 (https://github.com/rust-blockchain/evm?rev=51b8c2ce3104265e1fd5bb0fe5cdfd2e0938239c#51b8c2ce)&#xD;&#xA;     Compiling ethereum v0.12.0&#xD;&#xA;     Compiling evm-runtime v0.35.0 (https://github.com/rust-blockchain/evm?rev=51b8c2ce3104265e1fd5bb0fe5cdfd2e0938239c#51b8c2ce)&#xD;&#xA;     Compiling memory-db v0.29.0&#xD;&#xA;     Compiling num-rational v0.2.4&#xD;&#xA;     Compiling sp-core v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling num-bigint v0.4.3&#xD;&#xA;     Compiling pin-utils v0.1.0&#xD;&#xA;     Compiling semver-parser v0.7.0&#xD;&#xA;     Compiling ppv-lite86 v0.2.16&#xD;&#xA;     Compiling opaque-debug v0.2.3&#xD;&#xA;     Compiling evm-gasometer v0.35.0 (https://github.com/rust-blockchain/evm?rev=51b8c2ce3104265e1fd5bb0fe5cdfd2e0938239c#51b8c2ce)&#xD;&#xA;     Compiling sp-io v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-inherents v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-trie v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling nodrop v0.1.14&#xD;&#xA;     Compiling evm v0.35.0 (https://github.com/rust-blockchain/evm?rev=51b8c2ce3104265e1fd5bb0fe5cdfd2e0938239c#51b8c2ce)&#xD;&#xA;     Compiling fake-simd v0.1.2&#xD;&#xA;     Compiling arrayref v0.3.6&#xD;&#xA;     Compiling parity-wasm v0.42.2&#xD;&#xA;     Compiling libm v0.2.5&#xD;&#xA;     Compiling heck v0.4.0&#xD;&#xA;     Compiling sp-application-crypto v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sha2 v0.8.2&#xD;&#xA;     Compiling strum_macros v0.24.3&#xD;&#xA;     Compiling sp-runtime v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling rand_chacha v0.2.2&#xD;&#xA;     Compiling semver v0.6.0&#xD;&#xA;     Compiling curve25519-dalek v2.1.3&#xD;&#xA;     Compiling cargo-platform v0.1.2&#xD;&#xA;     Compiling merlin v2.0.1&#xD;&#xA;     Compiling parity-wasm v0.32.0&#xD;&#xA;     Compiling num-iter v0.1.43&#xD;&#xA;     Compiling num-rational v0.4.1&#xD;&#xA;     Compiling futures-io v0.3.24&#xD;&#xA;     Compiling async-trait v0.1.57&#xD;&#xA;     Compiling arrayvec v0.5.2&#xD;&#xA;     Compiling rustc-demangle v0.1.21&#xD;&#xA;     Compiling constant_time_eq v0.1.5&#xD;&#xA;     Compiling remove_dir_all v0.5.3&#xD;&#xA;     Compiling fastrand v1.8.0&#xD;&#xA;     Compiling same-file v1.0.6&#xD;&#xA;     Compiling schnorrkel v0.9.1&#xD;&#xA;     Compiling walkdir v2.3.2&#xD;&#xA;     Compiling tempfile v3.3.0&#xD;&#xA;     Compiling blake2-rfc v0.2.18&#xD;&#xA;     Compiling sp-version v5.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-staking v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-authorship v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling wasm-gc-api v0.1.11&#xD;&#xA;     Compiling futures v0.3.24&#xD;&#xA;     Compiling strum v0.24.1&#xD;&#xA;     Compiling cargo_metadata v0.14.2&#xD;&#xA;     Compiling build-helper v0.1.1&#xD;&#xA;     Compiling wasmi-validation v0.4.1&#xD;&#xA;     Compiling block-buffer v0.9.0&#xD;&#xA;     Compiling filetime v0.2.17&#xD;&#xA;     Compiling memory_units v0.3.0&#xD;&#xA;     Compiling ansi_term v0.12.1&#xD;&#xA;     Compiling sp-api v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling hex-literal v0.3.4&#xD;&#xA;     Compiling opaque-debug v0.3.0&#xD;&#xA;     Compiling downcast-rs v1.2.0&#xD;&#xA;     Compiling spin v0.5.2&#xD;&#xA;     Compiling sha2 v0.9.9&#xD;&#xA;     Compiling wasmi v0.9.1&#xD;&#xA;     Compiling frame-support v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-timestamp v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-session v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling finality-grandpa v0.16.0&#xD;&#xA;     Compiling sp-consensus-slots v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling pallet-contracts-primitives v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-consensus-vrf v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-npos-elections v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling rand v0.7.3&#xD;&#xA;     Compiling curve25519-dalek v3.2.0&#xD;&#xA;     Compiling ed25519 v1.5.2&#xD;&#xA;     Compiling rand v0.8.5&#xD;&#xA;     Compiling num-complex v0.4.2&#xD;&#xA;     Compiling cfg-if v0.1.10&#xD;&#xA;     Compiling ckb-merkle-mountain-range v0.3.2&#xD;&#xA;     Compiling ed25519-dalek v1.0.1&#xD;&#xA;     Compiling num v0.4.0&#xD;&#xA;     Compiling fp-dynamic-fee v1.0.0 (https://github.com/xx-chain/frontier.git?branch=dev/polkadot-v0.9.29#c4623288)&#xD;&#xA;     Compiling substrate-bn v0.6.0&#xD;&#xA;     Compiling sp-consensus-babe v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-sandbox v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-finality-grandpa v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-authority-discovery v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-mmr-primitives v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling fp-consensus v2.0.0-dev (https://github.com/xx-chain/frontier.git?branch=dev/polkadot-v0.9.29#c4623288)&#xD;&#xA;     Compiling wasm-instrument v0.1.1&#xD;&#xA;     Compiling fp-storage v2.0.0 (https://github.com/xx-chain/frontier.git?branch=dev/polkadot-v0.9.29#c4623288)&#xD;&#xA;     Compiling ripemd v0.1.3&#xD;&#xA;     Compiling curve25519-dalek v4.0.0-pre.1&#xD;&#xA;     Compiling pallet-contracts-proc-macro v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling safe-mix v1.0.1&#xD;&#xA;     Compiling pallet-contracts-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling frame-system-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-transaction-pool v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-block-builder v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling sp-offchain v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling frame-system v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling fp-evm v3.0.0-dev (https://github.com/xx-chain/frontier.git?branch=dev/polkadot-v0.9.29#c4623288)&#xD;&#xA;     Compiling pallet-timestamp v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling pallet-balances v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling node-primitives v2.0.0 (/Users/li/Documents/GitHub/xx-chain/primitives)&#xD;&#xA;     Compiling pallet-uniques v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;     Compiling pallet-treasury v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;  error: generic arguments must come before the first constraint&#xD;&#xA;     --&gt; /Users/li/.cargo/git/checkouts/substrate-7e08433d4c370a21/7c4ac35/frame/uniques/src/lib.rs:113:4&#xD;&#xA;      |&#xD;&#xA;  112 |             Success = Self::AccountId,&#xD;&#xA;      |             ------------------------- constraint&#xD;&#xA;  113 |             Self::Origin,&#xD;&#xA;      |             ^^^^^^^^^^^^&#xD;&#xA;  114 |             Self::CollectionId,&#xD;&#xA;      |             ^^^^^^^^^^^^^^^^^^ generic arguments&#xD;&#xA;      |&#xD;&#xA;  help: move the constraint after the generic arguments&#xD;&#xA;      |&#xD;&#xA;  111 |         type CreateOrigin: EnsureOriginWithArg&lt;Self::Origin, Self::CollectionId, Success = Self::AccountId&gt;;&#xD;&#xA;      |                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&#xD;&#xA;&#xD;&#xA;  error: could not compile `pallet-uniques` due to previous error&#xD;&#xA;  warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19024" PostHistoryTypeId="1" PostId="5084" RevisionGUID="d2101ff9-ab9c-4aed-b80f-1f5c4bea95bf" CreationDate="2022-09-29T09:08:24.347" UserId="1942" Text="custom chain upgrage substrate to 0.9.29, report error in uniques: &quot;generic arguments must come before the first constraint&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19025" PostHistoryTypeId="3" PostId="5084" RevisionGUID="d2101ff9-ab9c-4aed-b80f-1f5c4bea95bf" CreationDate="2022-09-29T09:08:24.347" UserId="1942" Text="|substrate-node|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19026" PostHistoryTypeId="2" PostId="5085" RevisionGUID="0e8e39cd-a90d-43df-99ad-d4a377a5685f" CreationDate="2022-09-29T09:14:16.500" UserId="73" Text="We also did not really understood how it stopped compiling from one moment to the next moment. [Here][1] you find the commit that fixed this on master. So, the only solution is to update your Substrate deps.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/commit/c24431eb6a95197550b30715a4c124be1aea79de" ContentLicense="CC BY-SA 4.0" />
  <row Id="19028" PostHistoryTypeId="2" PostId="5086" RevisionGUID="f1bda210-0af5-4394-b0c3-576b0d30a662" CreationDate="2022-09-29T09:38:57.667" UserId="116" Text="I was upgrading a para chain from polkadot version 0.9.28 to v0.9.29 when I encountered a few suspicious looking build errors originating from deep inside substrate.&#xD;&#xA;&#xD;&#xA;To eliminate the risk of some integration error I first built the branch `polkadot-v0.9.28` on [cumulus repo][1] without any problems then checked out `polkadot-v0.9.29` and were able to reproduce the same build error.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cumulus$ cargo build --release&#xD;&#xA;   Compiling sp-keystore v0.12.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;   Compiling sp-state-machine v0.12.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;   Compiling sc-allocator v4.1.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;   Compiling sp-rpc v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;   Compiling librocksdb-sys v0.6.1+6.28.2&#xD;&#xA;   Compiling rococo-runtime v0.9.29 (https://github.com/paritytech/polkadot?branch=release-v0.9.29#94078b44)&#xD;&#xA;   Compiling polkadot-runtime v0.9.29 (https://github.com/paritytech/polkadot?branch=release-v0.9.29#94078b44)&#xD;&#xA;   Compiling kusama-runtime v0.9.29 (https://github.com/paritytech/polkadot?branch=release-v0.9.29#94078b44)&#xD;&#xA;   Compiling polkadot-test-runtime v0.9.29 (https://github.com/paritytech/polkadot?branch=release-v0.9.29#94078b44)&#xD;&#xA;   Compiling cumulus-test-runtime v0.1.0 (/home/simson/nodle/cumulus/test/runtime)&#xD;&#xA;   Compiling cumulus-test-relay-validation-worker-provider v0.1.0 (/home/simson/nodle/cumulus/test/relay-validation-worker-provider)&#xD;&#xA;   Compiling parachain-template-runtime v0.1.0 (/home/simson/nodle/cumulus/parachain-template/runtime)&#xD;&#xA;   Compiling statemine-runtime v2.0.0 (/home/simson/nodle/cumulus/parachains/runtimes/assets/statemine)&#xD;&#xA;   Compiling collectives-polkadot-runtime v1.0.0 (/home/simson/nodle/cumulus/parachains/runtimes/collectives/collectives-polkadot)&#xD;&#xA;   Compiling shell-runtime v0.1.0 (/home/simson/nodle/cumulus/parachains/runtimes/starters/shell)&#xD;&#xA;   Compiling rococo-parachain-runtime v0.1.0 (/home/simson/nodle/cumulus/parachains/runtimes/testing/rococo-parachain)&#xD;&#xA;   Compiling seedling-runtime v0.1.0 (/home/simson/nodle/cumulus/parachains/runtimes/starters/seedling)&#xD;&#xA;   Compiling statemint-runtime v1.0.0 (/home/simson/nodle/cumulus/parachains/runtimes/assets/statemint)&#xD;&#xA;   Compiling contracts-rococo-runtime v0.2.0 (/home/simson/nodle/cumulus/parachains/runtimes/contracts/contracts-rococo)&#xD;&#xA;error: `sp_trie::recorder::Recorder&lt;H&gt;::as_trie_recorder::{opaque#0}&lt;'_&gt;` does not live long enough&#xD;&#xA;   --&gt; /home/simson/.cargo/git/checkouts/substrate-7e08433d4c370a21/7c4ac35/primitives/state-machine/src/trie_backend_essence.rs:181:44&#xD;&#xA;    |&#xD;&#xA;181 |         let recorder = recorder.as_mut().map(|r| r as _);&#xD;&#xA;    |                                                  ^&#xD;&#xA;&#xD;&#xA;error: `sp_trie::recorder::Recorder&lt;H&gt;::as_trie_recorder::{opaque#0}&lt;'_&gt;` does not live long enough&#xD;&#xA;   --&gt; /home/simson/.cargo/git/checkouts/substrate-7e08433d4c370a21/7c4ac35/primitives/state-machine/src/trie_backend_essence.rs:219:44&#xD;&#xA;    |&#xD;&#xA;219 |         let recorder = recorder.as_mut().map(|r| r as _);&#xD;&#xA;    |                                                  ^&#xD;&#xA;&#xD;&#xA;error: could not compile `sp-state-machine` due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: failed to run custom build command for `cumulus-test-relay-validation-worker-provider v0.1.0 (/home/simson/nodle/cumulus/test/relay-validation-worker-provider)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/simson/nodle/cumulus/target/release/build/cumulus-test-relay-validation-worker-provider-12e504f71174b33a/build-script-build` (exit status: 1)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any ideas what could be the problem here and how to solve it?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus" ContentLicense="CC BY-SA 4.0" />
  <row Id="19030" PostHistoryTypeId="1" PostId="5086" RevisionGUID="f1bda210-0af5-4394-b0c3-576b0d30a662" CreationDate="2022-09-29T09:38:57.667" UserId="116" Text="sp_trie::recorder::Recorder does not live long enough when upgrading para-chain project from polkadot-v0.9.28 to polkadot-v0.9.29" ContentLicense="CC BY-SA 4.0" />
  <row Id="19031" PostHistoryTypeId="3" PostId="5086" RevisionGUID="f1bda210-0af5-4394-b0c3-576b0d30a662" CreationDate="2022-09-29T09:38:57.667" UserId="116" Text="|cumulus|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19032" PostHistoryTypeId="2" PostId="5087" RevisionGUID="3c27cddd-6d7f-46fa-9044-79535b7d6aa0" CreationDate="2022-09-29T10:04:28.410" UserId="73" Text="Yeah that is a recent breakage. [Here][1] is the commit that fixed it on master. I think this is some regression in rustc: https://github.com/rust-lang/rust/issues/100544&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/commit/1763ff2273c4649fa969167503951371141a0272" ContentLicense="CC BY-SA 4.0" />
  <row Id="19034" PostHistoryTypeId="2" PostId="5088" RevisionGUID="e998e13a-69c8-4750-964a-27587846c9e3" CreationDate="2022-09-29T10:48:48.193" UserId="2663" Text="I wonder if it's possible to get the peerid of the author node of a specific block in a custom pallet, I implemented the authorship pallet for the runtime in [this way](https://github.com/Datagen-Project/Datagen-Substrate-Grant/blob/cbaa29ca4042ad9c4afa31e98c6b9b9d01ed4a5f/fast_blockchain/runtime/src/lib.rs#L302).&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19036" PostHistoryTypeId="1" PostId="5088" RevisionGUID="e998e13a-69c8-4750-964a-27587846c9e3" CreationDate="2022-09-29T10:48:48.193" UserId="2663" Text="How to get the author of specific block in a custom pallet using Aura and pallet_authorship?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19037" PostHistoryTypeId="3" PostId="5088" RevisionGUID="e998e13a-69c8-4750-964a-27587846c9e3" CreationDate="2022-09-29T10:48:48.193" UserId="2663" Text="|authorship|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19038" PostHistoryTypeId="5" PostId="5083" RevisionGUID="366c7219-3e64-4ff3-8577-610a1492c0f8" CreationDate="2022-09-29T11:20:54.430" UserId="251" Comment="added 185 characters in body" Text="Did you restart the node after inserting the GRANDPA key? I remember there is an issue about that.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/issues/7268&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;No, you can not add multiple validators into a single node.&#xD;&#xA; &#xD;&#xA;- https://github.com/darwinia-network/darwinia/issues/663&#xD;&#xA;- https://github.com/paritytech/substrate/issues/3324" ContentLicense="CC BY-SA 4.0" />
  <row Id="19039" PostHistoryTypeId="2" PostId="5089" RevisionGUID="50e43790-2a8a-4807-a290-b0b41f3f6d3e" CreationDate="2022-09-29T12:41:20.587" UserId="427" Text="In substrate runtime and in many frame pallets the type Balance/BalanceOf uses u128 type everywhere. How to change that type to U256 from primitive-types crate in runtime and all frame pallets and make that type as native currency in the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19041" PostHistoryTypeId="1" PostId="5089" RevisionGUID="50e43790-2a8a-4807-a290-b0b41f3f6d3e" CreationDate="2022-09-29T12:41:20.587" UserId="427" Text="How to change Balance type from u128 type to U256 in runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19042" PostHistoryTypeId="3" PostId="5089" RevisionGUID="50e43790-2a8a-4807-a290-b0b41f3f6d3e" CreationDate="2022-09-29T12:41:20.587" UserId="427" Text="|runtime|data-type|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19043" PostHistoryTypeId="2" PostId="5090" RevisionGUID="60eafd08-b2c9-4099-bb0f-16e3cf0986a7" CreationDate="2022-09-29T12:50:32.967" UserId="251" Text="```&#xD;&#xA;// u128 -&gt; U256&#xD;&#xA;let u_128: u128 = 0_u128;&#xD;&#xA;let u_256: U256 = U256::from(u_128);&#xD;&#xA;&#xD;&#xA;// U256 -&gt; u128&#xD;&#xA;let u_128: u128 = u_256.low_u128();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// ---&#xD;&#xA;&#xD;&#xA;// u128 to Balance&#xD;&#xA;use sp_runtime::traits::SaturatedConversion;&#xD;&#xA;let balance: Balance = u_128.saturated_into::&lt;Balance&gt;();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19045" PostHistoryTypeId="5" PostId="5090" RevisionGUID="8f941fe4-daff-48b9-bdbd-124f5212a319" CreationDate="2022-09-29T12:52:28.607" UserId="251" Comment="added 4 characters in body" Text="```rust&#xD;&#xA;// u128 -&gt; U256&#xD;&#xA;let u_128: u128 = 0_u128;&#xD;&#xA;let u_256: U256 = U256::from(u_128);&#xD;&#xA;&#xD;&#xA;// U256 -&gt; u128&#xD;&#xA;let u_128: u128 = u_256.low_u128();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// ---&#xD;&#xA;&#xD;&#xA;// u128 to Balance&#xD;&#xA;use sp_runtime::traits::SaturatedConversion;&#xD;&#xA;let balance: Balance = u_128.saturated_into::&lt;Balance&gt;();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19046" PostHistoryTypeId="12" PostId="5090" RevisionGUID="60a17b33-1357-4465-b0c0-d0627149791e" CreationDate="2022-09-29T12:56:01.323" UserId="251" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;}]}" />
  <row Id="19047" PostHistoryTypeId="5" PostId="5090" RevisionGUID="7ad055c9-fe21-41bb-9576-3f174a2129ce" CreationDate="2022-09-29T14:00:39.507" UserId="251" Comment="added 341 characters in body" Text="That is impossible.&#xD;&#xA;&#xD;&#xA;Take a look at the `pallet_balances::Config::Balance`'s definition:&#xD;&#xA;```rust&#xD;&#xA;pub trait Config&lt;I: 'static = ()&gt;: Config {&#xD;&#xA;    type Balance: Parameter + Member + AtLeast32BitUnsigned + Codec + Default + Copy + MaybeSerializeDeserialize + Debug + MaxEncodedLen + TypeInfo + FixedPointOperand;&#xD;&#xA;    ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`U256` must satisfy those traits bound.&#xD;&#xA;&#xD;&#xA;AFAIK, `U256` doesn't implement `AtLeast32BitUnsigned`.&#xD;&#xA;&#xD;&#xA;If you want to do that, you have to write your own `pallet-balances` or `primitives-types`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Use `u128` and convert it to `U256`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// u128 -&gt; U256&#xD;&#xA;let u_128: u128 = 0_u128;&#xD;&#xA;let u_256: U256 = U256::from(u_128);&#xD;&#xA;&#xD;&#xA;// U256 -&gt; u128&#xD;&#xA;let u_128: u128 = u_256.low_u128();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// ---&#xD;&#xA;&#xD;&#xA;// u128 to Balance&#xD;&#xA;use sp_runtime::traits::SaturatedConversion;&#xD;&#xA;let balance: Balance = u_128.saturated_into::&lt;Balance&gt;();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19048" PostHistoryTypeId="13" PostId="5090" RevisionGUID="7459197a-fe8a-47ba-8df9-540496a4d565" CreationDate="2022-09-29T14:00:44.443" UserId="251" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;}]}" />
  <row Id="19049" PostHistoryTypeId="5" PostId="5076" RevisionGUID="f05662da-8cb8-4987-8677-fcbee35aa0fe" CreationDate="2022-09-29T14:03:00.730" UserId="529" Comment="fixed compile problems" Text="I don't why the nodes you are connecting to are so slow but you could try to increase the connection timeout as follows (you need include jsonrpsee in your Cargo.toml as well):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use subxt::{OnlineClient, SubstrateConfig};&#xD;&#xA;use jsonrpsee::ws_client::WsClientBuilder;&#xD;&#xA;use std::time::Duration;&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime {}&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;    let rpc_client = WsClientBuilder::default()&#xD;&#xA;        .connection_timeout(Duration::from_secs(60))&#xD;&#xA;        .build(&quot;wss://kusama-rpc.polkadot.io:433&quot;)&#xD;&#xA;        .await?;&#xD;&#xA;&#xD;&#xA;    let api = SubxtClient::from_rpc_client(rpc_client).await?;&#xD;&#xA;&#xD;&#xA;    let address = runtime::constants().balances().existential_deposit();&#xD;&#xA;    let existential_deposit = api.constants().at(&amp;address)?;&#xD;&#xA;    println!(&quot;Existential Deposit: {}&quot;, existential_deposit);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In addition make sure your compile the program in `--release mode`" ContentLicense="CC BY-SA 4.0" />
  <row Id="19050" PostHistoryTypeId="24" PostId="5076" RevisionGUID="f05662da-8cb8-4987-8677-fcbee35aa0fe" CreationDate="2022-09-29T14:03:00.730" Comment="Proposed by 529 approved by 1780 edit id of 293" ContentLicense="CC BY-SA 4.0" />
  <row Id="19051" PostHistoryTypeId="2" PostId="5091" RevisionGUID="58df2c69-5efc-4f83-bb2a-cec77e00be47" CreationDate="2022-09-29T14:16:27.327" UserId="1780" Text="Ah, all right I see you are using the wrong port.&#xD;&#xA;&#xD;&#xA;Change the URI to `&quot;wss://kusama-rpc.polkadot.io:443`&quot; should make it work." ContentLicense="CC BY-SA 4.0" />
  <row Id="19053" PostHistoryTypeId="5" PostId="5090" RevisionGUID="24fcb639-410d-4387-8ff0-71bcb4d58c36" CreationDate="2022-09-29T14:21:18.750" UserId="251" Comment="added 114 characters in body" Text="That is impossible.&#xD;&#xA;&#xD;&#xA;Take a look at the `pallet_balances::Config::Balance`'s definition:&#xD;&#xA;```rust&#xD;&#xA;pub trait Config&lt;I: 'static = ()&gt;: Config {&#xD;&#xA;    type Balance: Parameter + Member + AtLeast32BitUnsigned + Codec + Default + Copy + MaybeSerializeDeserialize + Debug + MaxEncodedLen + TypeInfo + FixedPointOperand;&#xD;&#xA;    ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`U256` must satisfy those traits bound.&#xD;&#xA;&#xD;&#xA;AFAIK, `U256` doesn't implement `AtLeast32BitUnsigned`.&#xD;&#xA;&#xD;&#xA;If you want to do that, you have to write your own `pallet-balances` or `primitives-types`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Moonbeam is an Ethereum-like chain. But it also uses `u128` on the Substrate side. And use `U256` in EVM side.&#xD;&#xA;&#xD;&#xA;Use `u128` and convert it to `U256`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// u128 -&gt; U256&#xD;&#xA;let u_128: u128 = 0_u128;&#xD;&#xA;let u_256: U256 = U256::from(u_128);&#xD;&#xA;&#xD;&#xA;// U256 -&gt; u128&#xD;&#xA;let u_128: u128 = u_256.low_u128();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// ---&#xD;&#xA;&#xD;&#xA;// u128 to Balance&#xD;&#xA;use sp_runtime::traits::SaturatedConversion;&#xD;&#xA;let balance: Balance = u_128.saturated_into::&lt;Balance&gt;();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19054" PostHistoryTypeId="5" PostId="5091" RevisionGUID="b27333d4-3640-4abe-aacc-360eb5c15bfa" CreationDate="2022-09-29T14:41:19.433" UserId="1780" Comment="edited body" Text="Ah, all right I see you are using the wrong port.&#xD;&#xA;&#xD;&#xA;Change the URI to `&quot;wss://kusama-rpc.polkadot.io:443&quot;` should make it work." ContentLicense="CC BY-SA 4.0" />
  <row Id="19055" PostHistoryTypeId="5" PostId="5076" RevisionGUID="f783ea05-12f3-47f7-bdf9-c7bc9072f853" CreationDate="2022-09-29T15:24:50.603" UserId="1780" Comment="deleted 1 character in body" Text="I don't why the nodes you are connecting to are so slow but you could try to increase the connection timeout as follows (you need include jsonrpsee in your Cargo.toml as well):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use subxt::{OnlineClient, SubstrateConfig};&#xD;&#xA;use jsonrpsee::ws_client::WsClientBuilder;&#xD;&#xA;use std::time::Duration;&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod runtime {}&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;    let rpc_client = WsClientBuilder::default()&#xD;&#xA;        .connection_timeout(Duration::from_secs(60))&#xD;&#xA;        .build(&quot;wss://kusama-rpc.polkadot.io:433&quot;)&#xD;&#xA;        .await?;&#xD;&#xA;&#xD;&#xA;    let api = SubxtClient::from_rpc_client(rpc_client).await?;&#xD;&#xA;&#xD;&#xA;    let address = runtime::constants().balances().existential_deposit();&#xD;&#xA;    let existential_deposit = api.constants().at(&amp;address)?;&#xD;&#xA;    println!(&quot;Existential Deposit: {}&quot;, existential_deposit);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In addition make sure you compile the program in `--release mode`" ContentLicense="CC BY-SA 4.0" />
  <row Id="19056" PostHistoryTypeId="2" PostId="5092" RevisionGUID="a4c5b53a-d3fb-490e-8b31-a45c6bfc3243" CreationDate="2022-09-29T17:03:02.457" UserId="1824" Text="I agree with Adam, you should prefer to take an `AccountId` directly&#xD;&#xA;instead of a `String`.&#xD;&#xA;&#xD;&#xA;That said, if you do want to do this here is an option:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn convert(&amp;mut self, s: ink::prelude::string::String) -&gt; AccountId {&#xD;&#xA;    let bytes = s.as_bytes();&#xD;&#xA;    let account = AccountId::try_from(bytes).expect(&quot;You should handle this properly.&quot;);&#xD;&#xA;    account&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19060" PostHistoryTypeId="52" PostId="5084" RevisionGUID="4bbe4bbb-0280-4977-be46-b277426939f7" CreationDate="2022-09-29T17:09:52.897" />
  <row Id="19063" PostHistoryTypeId="2" PostId="5095" RevisionGUID="c304ac55-cd65-4c83-a0af-036dabf31d32" CreationDate="2022-09-29T17:37:20.123" UserId="3142" Text="I have an off-chain worker that needs to write a `HashMap&lt;u64,Vec&lt;u64&gt;&gt;` to local storage.  I can see how to write a single value using `StorageValueRef` and how I could possibly store a `HashMap` with it.  However, storing a large map as a single value is not efficient.  I don't think I can use `StorageMap` for off-chain local storage but that's the functionality I am looking for.  What should I use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19065" PostHistoryTypeId="1" PostId="5095" RevisionGUID="c304ac55-cd65-4c83-a0af-036dabf31d32" CreationDate="2022-09-29T17:37:20.123" UserId="3142" Text="Off-chain local storage map?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19066" PostHistoryTypeId="3" PostId="5095" RevisionGUID="c304ac55-cd65-4c83-a0af-036dabf31d32" CreationDate="2022-09-29T17:37:20.123" UserId="3142" Text="|substrate-node|offchain-storage|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19067" PostHistoryTypeId="52" PostId="5086" RevisionGUID="2ba26a97-bcf5-4ae9-8c43-bb568c285fed" CreationDate="2022-09-29T17:39:54.393" />
  <row Id="19068" PostHistoryTypeId="5" PostId="5095" RevisionGUID="231ffedd-6a93-44ed-8251-29c7402b7984" CreationDate="2022-09-29T17:40:33.310" UserId="3142" Comment="added 20 characters in body" Text="I have an off-chain worker that needs to write a `HashMap&lt;u64,Vec&lt;u64&gt;&gt;` to local storage.  I can see how to write a single value using `StorageValueRef` and how I could possibly store a `HashMap` with it.  However, storing a large map (thousands of keys) as a single value is not efficient.  I don't think I can use `StorageMap` for off-chain local storage but that's the functionality I am looking for.  What should I use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19069" PostHistoryTypeId="2" PostId="5096" RevisionGUID="be15c138-c8a5-4e66-9bd0-87c05ec5ebe3" CreationDate="2022-09-29T17:41:12.937" UserId="1824" Text="I haven't checked whether or not this compiles, but it should give you a starting point.&#xD;&#xA;&#xD;&#xA;The original code I based this off [this example](https://github.com/justinFrevert/Runtime-Contract-Interactions/blob/master/pallets/template/src/lib.rs#L88).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// We need to add the Contracts pallet here&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config + pallet_contracts::Config {&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// -- snip --&#xD;&#xA;&#xD;&#xA;#[pallet::weight(10_000))]&#xD;&#xA;pub fn total_supply(origin: OriginFor&lt;T&gt;, dest: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;	let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;    // As mentioned in https://github.com/w3f/PSPs/blob/master/PSPs/psp-22.md#total_supply--balance&#xD;&#xA;    // The `PSP22::total_supply` method has a selector of `0x162df8c2`&#xD;&#xA;	let mut selector: crate::Vec&lt;u8&gt; = [0x16, 0x2d, 0xF8, 0xC2].into();&#xD;&#xA;                                                                                         &#xD;&#xA;	// For this example this is arbitrary&#xD;&#xA;	let gas_limit: Weight = 10_000_000_000;&#xD;&#xA;	let value: BalanceOf&lt;T&gt; = Default::default();&#xD;&#xA;                                                                                         &#xD;&#xA;	let mut data = Vec::new();&#xD;&#xA;	data.append(&amp;mut selector);&#xD;&#xA;                                                                                         &#xD;&#xA;	// Do the actual call to the smart contract function&#xD;&#xA;	pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;		who,&#xD;&#xA;		dest.clone(),&#xD;&#xA;		value,&#xD;&#xA;		gas_limit,&#xD;&#xA;		data,&#xD;&#xA;		false,&#xD;&#xA;	)&#xD;&#xA;	.result?;&#xD;&#xA;                                                                                         &#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19071" PostHistoryTypeId="52" PostId="5089" RevisionGUID="162aefb0-9ac4-44ee-9a5b-5cf5a01ecfc1" CreationDate="2022-09-29T20:42:08.500" />
  <row Id="19073" PostHistoryTypeId="2" PostId="5097" RevisionGUID="452764dc-958c-4037-bf40-b98afec2c336" CreationDate="2022-09-30T02:01:50.113" UserId="251" Text="AFAIK, there isn't an implemented `OffchainStorageMap` for you.&#xD;&#xA;&#xD;&#xA;But you could follow this to build your off-chain storage map. https://github.com/paritytech/substrate/blob/61b9a4d1a8a9bf39c1d89a8dd02f82785c10860c/frame/merkle-mountain-range/src/lib.rs#L289-L297&#xD;&#xA;&#xD;&#xA;You just need to define a way to calculate the **unique** keys for those values." ContentLicense="CC BY-SA 4.0" />
  <row Id="19075" PostHistoryTypeId="2" PostId="5098" RevisionGUID="3633a167-1c15-4b98-8cce-86653315e77d" CreationDate="2022-09-30T06:11:31.583" UserId="3217" Text="I read in [this answer][1] that you can access everything from mock runtime in the benchmarking file by just adding `#[cfg(test)]` above the import `use crate::mock::*;` and that it is not a good idea since it only applies when running benchmark tests and not during the actual benchmarking against the real runtime. &#xD;&#xA;&#xD;&#xA;In my case, I need to deploy a smart contract, get its address from the events emitted and then use that to benchmark a `Pallet::&lt;T&gt;::transfer()` function. How can I access the `Events` enum and the `Contracts`, `Systems` pallets compiled using the `construct_runtime!()` (i.e., how can I make it general so that I don't need to import it from the mock runtime)? Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1106/how-to-mock-trait-in-benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="19077" PostHistoryTypeId="1" PostId="5098" RevisionGUID="3633a167-1c15-4b98-8cce-86653315e77d" CreationDate="2022-09-30T06:11:31.583" UserId="3217" Text="How to use the Events enum and other pallets from the mock runtime (or real runtime at the time of actual benchmarking) in the benchmarking file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19078" PostHistoryTypeId="3" PostId="5098" RevisionGUID="3633a167-1c15-4b98-8cce-86653315e77d" CreationDate="2022-09-30T06:11:31.583" UserId="3217" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19079" PostHistoryTypeId="2" PostId="5099" RevisionGUID="de37bbdd-2fca-409b-804d-5f6efb4c8622" CreationDate="2022-09-30T06:31:38.027" UserId="406" Text="your node connectivity is disconnected that's why you are facing this issue  " ContentLicense="CC BY-SA 4.0" />
  <row Id="19081" PostHistoryTypeId="5" PostId="5099" RevisionGUID="f19e4d56-84c2-4467-b06b-d3ff68808732" CreationDate="2022-09-30T06:55:32.137" UserId="406" Comment="added 1 character in body" Text="your node connectivity is disconnected that's why you are getting this issue  " ContentLicense="CC BY-SA 4.0" />
  <row Id="19082" PostHistoryTypeId="5" PostId="5098" RevisionGUID="65e282a9-6b1e-4217-9d8d-a164c609b672" CreationDate="2022-09-30T08:33:36.217" UserId="3217" Comment="deleted 139 characters in body; edited title" Text="I read in [this answer][1] that you can access everything from mock runtime in the benchmarking file by just adding `#[cfg(test)]` above the import `use crate::mock::*;` and that it is not a good idea since it only applies when running benchmark tests and not during the actual benchmarking against the real runtime. &#xD;&#xA;&#xD;&#xA;In my case, I need to deploy a smart contract, get its address from the events emitted and then use that to benchmark a `Pallet::&lt;T&gt;::transfer(to, erc20_address, amount)` function. How can I access the `Systems::events()` inside the benchmark file? Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1106/how-to-mock-trait-in-benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="19083" PostHistoryTypeId="4" PostId="5098" RevisionGUID="65e282a9-6b1e-4217-9d8d-a164c609b672" CreationDate="2022-09-30T08:33:36.217" UserId="3217" Comment="deleted 139 characters in body; edited title" Text="How can I access the emitted runtime events inside the benchmarking.rs file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19084" PostHistoryTypeId="2" PostId="5100" RevisionGUID="7b8a933c-1032-4d69-bac4-f2fdfdacc998" CreationDate="2022-09-30T08:43:16.097" UserId="298" Text="After fixing stalled finality which was due to 5 of 13 valdidators broken, finality is now 502 blocks behind, but it is not catching up to production. &#xD;&#xA;&#xD;&#xA;We get this error: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-29 20:13:03 Safeguard enforced finalization of child forced_target=0xd0df478b4bf96df1871fa22890f73c526c4d79b840496c9543bb2b080009e5ca&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can view the chain here: https://apps.decentration.org/?rpc=wss%3A%2F%2Fpopart1.jelliedowl.com#/explorer&#xD;&#xA;&#xD;&#xA;It seems like block production may have also gone into a “slow mode” because finality is so far behind?  &#xD;&#xA;&#xD;&#xA;We are running Rococo `release-v0.9.26-1`&#xD;&#xA;&#xD;&#xA;How can we remedy this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19086" PostHistoryTypeId="1" PostId="5100" RevisionGUID="7b8a933c-1032-4d69-bac4-f2fdfdacc998" CreationDate="2022-09-30T08:43:16.097" UserId="298" Text="Finality 502 blocks behind production on our relay testnet" ContentLicense="CC BY-SA 4.0" />
  <row Id="19087" PostHistoryTypeId="3" PostId="5100" RevisionGUID="7b8a933c-1032-4d69-bac4-f2fdfdacc998" CreationDate="2022-09-30T08:43:16.097" UserId="298" Text="|rococo|relay-chain|finality|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19088" PostHistoryTypeId="5" PostId="5100" RevisionGUID="a7befc9a-befa-4ba2-91e3-e198212d9040" CreationDate="2022-09-30T09:11:38.673" UserId="298" Comment="added 91 characters in body" Text="After fixing stalled finality which was due to 5 of 13 valdidators broken, finality is now 502 blocks behind, but it is not catching up to production. &#xD;&#xA;&#xD;&#xA;We get this error: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-29 20:13:03 Safeguard enforced finalization of child forced_target=0xd0df478b4bf96df1871fa22890f73c526c4d79b840496c9543bb2b080009e5ca&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can view the chain here: https://apps.decentration.org/?rpc=wss%3A%2F%2Fpopart1.jelliedowl.com#/explorer&#xD;&#xA;&#xD;&#xA;It seems like block production may have also gone into a “slow mode” because finality is so far behind?  &#xD;&#xA;&#xD;&#xA;We are running Rococo `release-v0.9.26-1`&#xD;&#xA;&#xD;&#xA;How can we remedy this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eSDwP.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19089" PostHistoryTypeId="2" PostId="5101" RevisionGUID="f87683e3-20fc-4443-8304-e0e5d52daa03" CreationDate="2022-09-30T09:21:50.180" UserId="94" Text="You can directly access the events. For example like this:  &#xD;&#xA;```rust&#xD;&#xA;benchmarks! {&#xD;&#xA;	something {&#xD;&#xA;		assert!(frame_system::Pallet::&lt;T&gt;::events().is_empty());&#xD;&#xA;	}: _(…)&#xD;&#xA;	verify {&#xD;&#xA;		assert!(!frame_system::Pallet::&lt;T&gt;::events().is_empty());&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;One gotcha here is to initialize the block number in your `new_test_ext` functions. Otherwise the event emission does not work:  &#xD;&#xA;```rust&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;	let mut ext = sp_io::TestExternalities::new(t);&#xD;&#xA;	ext.execute_with(|| System::set_block_number(1));&#xD;&#xA;	ext&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19091" PostHistoryTypeId="2" PostId="5102" RevisionGUID="e49d2d82-d26b-4566-ab77-27b1fcb64ff2" CreationDate="2022-09-30T10:27:47.533" UserId="2281" Text="I am trying  to add Evm pallet to my substrate runtime i am using **Polkadotv0.9.25** for both substrate and frontier but getting error  of  **trait bound** for almost every pallet.&#xD;&#xA;error:-  **within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_evm::Pallet&lt;Runtime&gt;`** how to solve this error i have added evm to my runtime and also added its dependency in **cargo.toml**&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/RzI13.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19093" PostHistoryTypeId="1" PostId="5102" RevisionGUID="e49d2d82-d26b-4566-ab77-27b1fcb64ff2" CreationDate="2022-09-30T10:27:47.533" UserId="2281" Text="getting Error's while adding pallet_evm to runtime &quot; the trait bound `pallet_evm::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19094" PostHistoryTypeId="3" PostId="5102" RevisionGUID="e49d2d82-d26b-4566-ab77-27b1fcb64ff2" CreationDate="2022-09-30T10:27:47.533" UserId="2281" Text="|substrate-node|polkadot-js|polkadot|frontier|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19095" PostHistoryTypeId="2" PostId="5103" RevisionGUID="25128a1d-2c45-4510-a9b2-8418fba0e425" CreationDate="2022-09-30T11:17:10.833" UserId="3247" Text="I am trying to incorporate benchmark overhead command to our parachain. The issue i have is that runtime api methods are not available right away after client is created. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://github.com/mangata-finance/mangata-node/blob/68b327b9230c248af562a33884e0b72ba0a2496a/node/src/command.rs#L353-L356&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;					BenchmarkCmd::Overhead(cmd) =&gt; runner.sync_run(|config| {&#xD;&#xA;						env_logger::try_init();&#xD;&#xA;						log::info!(&quot;overhead command start&quot;);&#xD;&#xA;						let partials = new_partial::&lt;&#xD;&#xA;							service::mangata_kusama_runtime::RuntimeApi,&#xD;&#xA;							service::MangataKusamaRuntimeExecutor,&#xD;&#xA;						&gt;(&amp;config)?;&#xD;&#xA;						let inherent_data = inherent_benchmark_data().unwrap();&#xD;&#xA;						let empty_data = sp_inherents::InherentData::new();&#xD;&#xA;						let at = sp_runtime::generic::BlockId::Number(0u32.into());&#xD;&#xA;						let api = partials.client.runtime_api();&#xD;&#xA;&#xD;&#xA;						api.can_enqueue_txs(&amp;at).unwrap();&#xD;&#xA;&#xD;&#xA;						api.inherent_extrinsics_with_context(&#xD;&#xA;							&amp;at,&#xD;&#xA;							sp_core::ExecutionContext::BlockConstruction,&#xD;&#xA;							empty_data,&#xD;&#xA;						)&#xD;&#xA;						.unwrap();&#xD;&#xA;						Ok(())&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;it fails immediately&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run --release --features=runtime-benchmarks,mangata-kusama benchmark overhead&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Version: 0.1.0-90f07d533ca&#xD;&#xA;&#xD;&#xA;   0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:702:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:588:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:584:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/core/src/panicking.rs:142:14&#xD;&#xA;   6: core::result::unwrap_failed&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/core/src/result.rs:1785:5&#xD;&#xA;   7: mangata_node::service::start_node_impl::{{closure}}&#xD;&#xA;   8: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;   9: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  10: tokio::park::thread::CachedParkThread::block_on&#xD;&#xA;  11: tokio::runtime::Runtime::block_on&#xD;&#xA;  12: sc_cli::runner::Runner&lt;C&gt;::run_node_until_exit&#xD;&#xA;  13: mangata_node::command::run&#xD;&#xA;  14: mangata_node::main&#xD;&#xA;  15: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  16: std::rt::lang_start::{{closure}}&#xD;&#xA;  17: core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/core/src/ops/function.rs:280:13&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:492:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:456:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panic.rs:137:14&#xD;&#xA;      std::rt::lang_start_internal::{{closure}}&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/rt.rs:128:48&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:492:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:456:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panic.rs:137:14&#xD;&#xA;      std::rt::lang_start_internal&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/rt.rs:128:20&#xD;&#xA;  18: main&#xD;&#xA;  19: &lt;unknown&gt;&#xD;&#xA;  20: __libc_start_main&#xD;&#xA;  21: _start&#xD;&#xA;             at /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Application(Execution(Other(&quot;Exported method VerApi_can_enqueue_txs is not found&quot;)))', node/src/service.rs:368&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;above method is of course implemented &#xD;&#xA;&#xD;&#xA;https://github.com/mangata-finance/mangata-node/blob/68b327b9230c248af562a33884e0b72ba0a2496a/runtime/mangata-kusama/src/lib.rs#L1262-L1264&#xD;&#xA;&#xD;&#xA;Whats weird is that in the same time node runs fine... But when i modify service command &#xD;&#xA;&#xD;&#xA;https://github.com/mangata-finance/mangata-node/blob/d31fa75ea116651419a09e5c9683e088e59434ed/node/src/service.rs#L368-L370&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;to run some runtime api method (the one that fails for me when setting proper env for running overhead benchmark) immediately after client instance is created it fails as well...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run --release --features=runtime-benchmarks,mangata-kusama -- --chain local  -- --chain kusama-local&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;====================&#xD;&#xA;&#xD;&#xA;Version: 0.1.0-68b327b9230&#xD;&#xA;&#xD;&#xA;   0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:702:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:588:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:584:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/core/src/panicking.rs:142:14&#xD;&#xA;   6: core::result::unwrap_failed&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/core/src/result.rs:1785:5&#xD;&#xA;   7: mangata_node::service::start_node_impl::{{closure}}&#xD;&#xA;   8: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;   9: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  10: tokio::park::thread::CachedParkThread::block_on&#xD;&#xA;  11: tokio::runtime::Runtime::block_on&#xD;&#xA;  12: sc_cli::runner::Runner&lt;C&gt;::run_node_until_exit&#xD;&#xA;  13: mangata_node::command::run&#xD;&#xA;  14: mangata_node::main&#xD;&#xA;  15: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  16: std::rt::lang_start::{{closure}}&#xD;&#xA;  17: core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/core/src/ops/function.rs:280:13&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:492:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:456:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panic.rs:137:14&#xD;&#xA;      std::rt::lang_start_internal::{{closure}}&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/rt.rs:128:48&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:492:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panicking.rs:456:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/panic.rs:137:14&#xD;&#xA;      std::rt::lang_start_internal&#xD;&#xA;             at /rustc/ecd44958e0a21110d09862ee080d95a4ca6c52f8/library/std/src/rt.rs:128:20&#xD;&#xA;  18: main&#xD;&#xA;  19: &lt;unknown&gt;&#xD;&#xA;  20: __libc_start_main&#xD;&#xA;  21: _start&#xD;&#xA;             at /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Application(Execution(AbortedDueToTrap(MessageWithBacktrace { message: &quot;wasm trap: wasm `unreachable` instruction executed&quot;, backtrace: Some(Backtrace { backtrace_string: &quot;\n    0: 0x3d54 - &lt;unknown&gt;!rust_begin_unwind\n    1: 0x24f6 - &lt;unknown&gt;!core::panicking::panic_fmt::h8f11323637b4db3b\n    2: 0x4870 - &lt;unknown&gt;!core::panicking::panic_display::h0b0fc4d9da8b83e3\n    3: 0x331f - &lt;unknown&gt;!core::option::expect_failed::h83d8066bdd552df6\n    4: 0x2eb3e1 - &lt;unknown&gt;!BlockBuilder_inherent_extrinsics\n&quot; }) })))', node/src/service.rs:370&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;&#xD;&#xA;	https://github.com/paritytech/cumulus/issues/new&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but when i just start the node, without any modyfications everything works as expected ... Not sure how is that possible, can it be that some of the client functionalities are not enabled right away after client is created - that doesnt seems right as in reference from substrate repo, it seems to work fine ...&#xD;&#xA;&#xD;&#xA;https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/bin/node-template/node/src/command.rs#L138-L143&#xD;&#xA;&#xD;&#xA;Does anyone have an idea what can be wrong here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19097" PostHistoryTypeId="1" PostId="5103" RevisionGUID="25128a1d-2c45-4510-a9b2-8418fba0e425" CreationDate="2022-09-30T11:17:10.833" UserId="3247" Text="Runtime api not available just after client creation? Exported method is not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="19098" PostHistoryTypeId="3" PostId="5103" RevisionGUID="25128a1d-2c45-4510-a9b2-8418fba0e425" CreationDate="2022-09-30T11:17:10.833" UserId="3247" Text="|benchmarking|client|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19103" PostHistoryTypeId="2" PostId="5104" RevisionGUID="4b24fb56-1cc9-4586-9ac9-9151aa9dd29b" CreationDate="2022-09-30T15:28:06.067" UserId="3142" Text="I need to get a list of all events of a specific custom type.  In the documentation, it said that I can query the System pallet's storage for events.  I am looking for an example (in Rust) of how to get a list of specific events.  I am planning to do this in an OCW.&#xD;&#xA;&#xD;&#xA;&gt; Listening to events The Substrate RPC does not directly expose an&#xD;&#xA;&gt; endpoint for querying events. If you used the default implementation,&#xD;&#xA;&gt; you can see the list of events for the current block by querying the&#xD;&#xA;&gt; storage of the System pallet. Otherwise, the Polkadot-JS API supports&#xD;&#xA;&gt; a WebSocket subscription on runtime events." ContentLicense="CC BY-SA 4.0" />
  <row Id="19105" PostHistoryTypeId="1" PostId="5104" RevisionGUID="4b24fb56-1cc9-4586-9ac9-9151aa9dd29b" CreationDate="2022-09-30T15:28:06.067" UserId="3142" Text="How to query events?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19106" PostHistoryTypeId="3" PostId="5104" RevisionGUID="4b24fb56-1cc9-4586-9ac9-9151aa9dd29b" CreationDate="2022-09-30T15:28:06.067" UserId="3142" Text="|substrate-node|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19107" PostHistoryTypeId="52" PostId="5098" RevisionGUID="d1871647-0049-43ab-a4ad-e5c376a8e1c5" CreationDate="2022-09-30T15:35:51.477" />
  <row Id="19108" PostHistoryTypeId="5" PostId="5098" RevisionGUID="b59d1e0a-d8a3-4e30-9656-09a5e84e1361" CreationDate="2022-09-30T15:40:08.000" UserId="3217" Comment="added 1259 characters in body" Text="I read in [this answer][1] that you can access everything from mock runtime in the benchmarking file by just adding `#[cfg(test)]` above the import `use crate::mock::*;` and that it is not a good idea since it only applies when running benchmark tests and not during the actual benchmarking against the real runtime. &#xD;&#xA;&#xD;&#xA;In my case, I need to deploy a smart contract, get its address from the events emitted and then use that to benchmark a `Pallet::&lt;T&gt;::transfer(to, erc20_address, amount)` function. How can I access the `Systems::events()` inside the benchmark file? Thanks.&#xD;&#xA;&#xD;&#xA;Edit: [This solution][2] worked for getting all the events emitted by the `frame_system` pallet. However, I need to match the contract instantiation event with all the events returned from the `frame_system::Pallet::&lt;T&gt;::events()` to extract the deployed contract code. I defined an `Event = &lt;T as frame_system::Config&gt;::Event` but it gave the error -- &#xD;&#xA;```&#xD;&#xA;let Event = &lt;T as frame_system::Config&gt;::Event;&#xD;&#xA;   |         ----- help: `Event` is defined here, but is not a type&#xD;&#xA;...&#xD;&#xA;60 |             if let Event::Contracts(pallet_contracts::Event::Instantiated {&#xD;&#xA;   |                    ^^^^^ use of undeclared type `Event`&#xD;&#xA;&#xD;&#xA;error[E0575]: expected method or associated constant, found associated type `frame_system::Config::Event`&#xD;&#xA;```&#xD;&#xA;I've added the code snippet for more context below:&#xD;&#xA;```&#xD;&#xA;    let evts = frame_system::Pallet::&lt;T&gt;::events();&#xD;&#xA;	let Event = &lt;T as frame_system::Config&gt;::Event;&#xD;&#xA;	let deployed = evts&#xD;&#xA;		.iter()&#xD;&#xA;		.rev()&#xD;&#xA;		.find_map(|rec| {&#xD;&#xA;			if let Event::Contracts(pallet_contracts::Event::Instantiated {&#xD;&#xA;				deployer: _,&#xD;&#xA;				contract,&#xD;&#xA;			}) = &amp;rec.event&#xD;&#xA;			{&#xD;&#xA;				Some(contract)&#xD;&#xA;			} else {&#xD;&#xA;				None&#xD;&#xA;			}&#xD;&#xA;		})&#xD;&#xA;		.expect(&quot;unable to find deployed contract&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1106/how-to-mock-trait-in-benchmarking&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/5101/3217" ContentLicense="CC BY-SA 4.0" />
  <row Id="19109" PostHistoryTypeId="5" PostId="5104" RevisionGUID="0c321913-740e-49bf-a69f-1993dd9a2c5c" CreationDate="2022-09-30T15:48:33.827" UserId="3142" Comment="added 31 characters in body" Text="I need to get a list of all events of a specific custom type.  In the documentation, it said that I can query the System pallet's storage for events.  I am looking for an example (in Rust) of how to get a list of specific events.  I am planning to do this in an OCW and I need this for ALL blocks.&#xD;&#xA;&#xD;&#xA;&gt; Listening to events The Substrate RPC does not directly expose an&#xD;&#xA;&gt; endpoint for querying events. If you used the default implementation,&#xD;&#xA;&gt; you can see the list of events for the current block by querying the&#xD;&#xA;&gt; storage of the System pallet. Otherwise, the Polkadot-JS API supports&#xD;&#xA;&gt; a WebSocket subscription on runtime events." ContentLicense="CC BY-SA 4.0" />
  <row Id="19110" PostHistoryTypeId="2" PostId="5105" RevisionGUID="94005851-c741-4af2-8ea6-39ecb221cd32" CreationDate="2022-09-30T15:56:42.353" UserId="3217" Text="You can do `frame_system::Pallet::&lt;T&gt;::events()` to fetch all the events emitted. [Example][1]&#xD;&#xA;&#xD;&#xA;If you are working with mock runtime then you can directly use `System::events()` (System being the instantiation of pallet_frame_system that you generated using the construct_runtime!() macro). You can then iterate over all the events and match with the ones that you are concerned about. &#xD;&#xA;&#xD;&#xA;In the below example, I'm trying to extract the address of the smart contract I deployed by matching with the `Instantiated` event from the pallet-contracts. &#xD;&#xA;```&#xD;&#xA;    let evts = System::events();&#xD;&#xA;	let deployed_address = evts&#xD;&#xA;		.iter()&#xD;&#xA;		.rev()&#xD;&#xA;		.find_map(|rec| {&#xD;&#xA;			if let Event::Contracts(pallet_contracts::Event::Instantiated {&#xD;&#xA;				deployer: _,&#xD;&#xA;				contract,&#xD;&#xA;			}) = &amp;rec.event&#xD;&#xA;			{&#xD;&#xA;				Some(contract)&#xD;&#xA;			} else {&#xD;&#xA;				None&#xD;&#xA;			}&#xD;&#xA;		})&#xD;&#xA;		.expect(&quot;unable to find deployed contract&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Hope this answers your question :)&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5098/how-can-i-access-the-emitted-runtime-events-inside-the-benchmarking-rs-file/5101#5101" ContentLicense="CC BY-SA 4.0" />
  <row Id="19112" PostHistoryTypeId="2" PostId="5106" RevisionGUID="995e7737-9da1-46f0-8cfc-8d59e84c1bb5" CreationDate="2022-09-30T16:01:01.477" UserId="1824" Text="Your problem is that you're using a `nightly` compiler to build your contract. With the recent alphas it is now possible to build contracts using the `stable` toolchain.&#xD;&#xA;&#xD;&#xA;If you run `cargo +stable contract build` everything should work as expected." ContentLicense="CC BY-SA 4.0" />
  <row Id="19114" PostHistoryTypeId="2" PostId="5107" RevisionGUID="2b0e45e2-306a-461e-b214-1b4c6e6b6644" CreationDate="2022-09-30T20:34:24.780" UserId="560" Text="check out cargo tree, than just:&#xD;&#xA;```shell&#xD;&#xA;$ cargo tree | grep scale-codec&#xD;&#xA;```&#xD;&#xA;To find out if you have multiple dependencies with different versions in the repo" ContentLicense="CC BY-SA 4.0" />
  <row Id="19116" PostHistoryTypeId="2" PostId="5108" RevisionGUID="cddd03e9-7eca-439c-b2b8-857c37f389f8" CreationDate="2022-09-30T20:59:35.500" UserId="235" Text="We are dealing with a runtime panic. We are looking for advice on how to best debug and are looking for help to get past it. &#xD;&#xA;&#xD;&#xA;At the change of an epoch we want a function to scan for a specific asset status and if it's there we want to initiate a series of other actions. Which might be heavy on the block transition. We will work on benchmarking as we think this is result of bad weight settings or the absence of them, but we are not sure hence this post. &#xD;&#xA;&#xD;&#xA;*The process is as following:*&#xD;&#xA;1. Checks if there are the funds to bid on the asset&#xD;&#xA;2. Check if the investment conditions meet the requirements.&#xD;&#xA;3. Assemble a list of investors for that specific asset based on on-chain rules and give them a share of the assets. &#xD;&#xA;&#xD;&#xA;The epoch changes when there are no successful actions, when there is an asset with the status finalized the runtime panics, the chain bricks stoppes just before the epoch change.	&#xD;&#xA;&#xD;&#xA;**the intialization**:&#xD;&#xA;```rust &#xD;&#xA;fn begin_block(now: T::BlockNumber) -&gt; Weight {&#xD;&#xA;		let max_block_weight: u64 = 1000;&#xD;&#xA;&#xD;&#xA;		if (now % T::NewAssetScanPeriod::get()).is_zero() {&#xD;&#xA;			Self::process_onboarded_assets();&#xD;&#xA;			Self::process_finalised_assets();&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		max_block_weight&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;		/// Weight: see `begin_block`&#xD;&#xA;		fn on_initialize(n: T::BlockNumber) -&gt; Weight {&#xD;&#xA;			Self::begin_block(n)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the node-logs the panic report is long, the main parts that reference to our code-base are the lines below. How can we best debug this? &#xD;&#xA;```&#xD;&#xA;snippet&#xD;&#xA;&#xD;&#xA;   8: pallet_share_distributor::pallet::Pallet&lt;T&gt;::create_virtual&#xD;&#xA;   9: &lt;(TupleElement0,) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize&#xD;&#xA;...&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'called `Option::unwrap()` on a `None` value', /Users/ilhan/dev/fair-squares/pallets/share_distributor/src/functions.rs:63&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The code-block the tokio-runtime-worker panicked is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;///Collect contributors to the bid, and their shares&#xD;&#xA;pub fn owner_and_shares(collection_id: T::NftCollectionId, item_id: T::NftItemId) -&gt; Vec&lt;(T::AccountId, Percent)&gt;{&#xD;&#xA;&#xD;&#xA;    //Get owners and their reserved contribution to the bid&#xD;&#xA;    &#xD;&#xA;    let reservation_infos = HousingFund::Reservations::&lt;T&gt;::get((collection_id,item_id)).unwrap();&#xD;&#xA;    let vec0 = reservation_infos.contributions;&#xD;&#xA;    let price = reservation_infos.amount;&#xD;&#xA;    let mut vec = Vec::new() ;&#xD;&#xA;    for i in vec0.iter(){&#xD;&#xA;        let price0 = Self::balance_to_u64_option(price).unwrap();&#xD;&#xA;        let contribution = Self::balance_to_u64_option(i.1).unwrap();&#xD;&#xA;        let share = Percent::from_rational(contribution,price0);&#xD;&#xA;        debug_assert!(!share.is_zero()); &#xD;&#xA;        vec.push((i.0.clone(),share));&#xD;&#xA;        //Update Virtual_account storage&#xD;&#xA;        Virtual::&lt;T&gt;::mutate(collection_id,item_id,|val|{&#xD;&#xA;            let mut val0 = val.clone().unwrap();&#xD;&#xA;            val0.owners.push(i.0.clone());&#xD;&#xA;            *val = Some(val0);&#xD;&#xA;&#xD;&#xA;        }); &#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;    vec&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Full logs can be found [here](https://paste.ubuntu.com/p/pdXMwktmBD/). The pallet we think is the issue resides in is can be found in our [repo](https://github.com/Fair-Squares/fair-squares/blob/main/pallets/bidding/src/lib.rs)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19118" PostHistoryTypeId="1" PostId="5108" RevisionGUID="cddd03e9-7eca-439c-b2b8-857c37f389f8" CreationDate="2022-09-30T20:59:35.500" UserId="235" Text="panic_with_hook in session change" ContentLicense="CC BY-SA 4.0" />
  <row Id="19119" PostHistoryTypeId="3" PostId="5108" RevisionGUID="cddd03e9-7eca-439c-b2b8-857c37f389f8" CreationDate="2022-09-30T20:59:35.500" UserId="235" Text="|polkadot|pallet|substrate-node-template|panic|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19120" PostHistoryTypeId="5" PostId="5104" RevisionGUID="4ec14faf-548b-4e09-8d72-41e15c37a4d7" CreationDate="2022-09-30T21:16:06.727" UserId="3142" Comment="added attempt with question" Text="I need to get a list of all events of a specific custom type.  In the documentation, it said that I can query the System pallet's storage for events.  I am looking for an example (in Rust) of how to get a list of specific events.  I am planning to do this in an OCW and I need this for ALL blocks.&#xD;&#xA;&#xD;&#xA;&gt; Listening to events The Substrate RPC does not directly expose an&#xD;&#xA;&gt; endpoint for querying events. If you used the default implementation,&#xD;&#xA;&gt; you can see the list of events for the current block by querying the&#xD;&#xA;&gt; storage of the System pallet. Otherwise, the Polkadot-JS API supports&#xD;&#xA;&gt; a WebSocket subscription on runtime events.&#xD;&#xA;&#xD;&#xA;I tried this:&#xD;&#xA;&#xD;&#xA;		let evts = &lt;frame_system::Pallet&lt;T&gt;&gt;::read_events_no_consensus();&#xD;&#xA;		for evt in evts {&#xD;&#xA;			frame_support::log::info!(&quot;evt={:?}&quot;, evt.event);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;which works BUT it prints: &#xD;&#xA;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;&#xD;&#xA;**How can I dump the fields of each event so I can understand what events occurred?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19121" PostHistoryTypeId="2" PostId="5109" RevisionGUID="71a48169-28d3-4187-973c-d24eddfa967b" CreationDate="2022-09-30T22:42:12.170" UserId="3171" Text="Why I have this Error?&#xD;&#xA;&#xD;&#xA;    Tokens: orml_tokens::{Pallet, Storage, Event&lt;T&gt;, Config&lt;T&gt;} = 50,&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vcm5N.jpg&#xD;&#xA;&#xD;&#xA;this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;this error originates in the macro `orml_tokens::__substrate_genesis_config_check::is_std_enabled_for_genesis` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;`Tokens` does not have the std feature enabled, this will cause the `orml_tokens::GenesisConfig` type to be undefined&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    use codec::{Decode, Encode, MaxEncodedLen};&#xD;&#xA;    use scale_info::TypeInfo;&#xD;&#xA;    &#xD;&#xA;    #[derive(&#xD;&#xA;    	Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen,&#xD;&#xA;    )]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;    pub enum CurrencyId {&#xD;&#xA;    	// The Native token, representing AIR in Altair and CFG in Centrifuge.&#xD;&#xA;    	Native,&#xD;&#xA;    &#xD;&#xA;    	KSM,&#xD;&#xA;    &#xD;&#xA;    	AUSD,&#xD;&#xA;    	/// A foreign asset&#xD;&#xA;    	ForeignAsset(ForeignAssetId),&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub type ForeignAssetId = u32;&#xD;&#xA;    &#xD;&#xA;    impl Default for CurrencyId {&#xD;&#xA;    	fn default() -&gt; Self {&#xD;&#xA;    		CurrencyId::Native&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    parameter_type_with_key! {&#xD;&#xA;    	pub ExistentialDeposits: |currency_id: CurrencyId| -&gt; Balance {&#xD;&#xA;    		match currency_id {&#xD;&#xA;    			CurrencyId::Native =&gt; ExistentialDeposit::get(),&#xD;&#xA;    			_ =&gt; 0,&#xD;&#xA;    		}&#xD;&#xA;    	};&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub type IBalance = i128;&#xD;&#xA;    impl orml_tokens::Config for Runtime {&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type Balance = Balance;&#xD;&#xA;    	type Amount = IBalance;&#xD;&#xA;    	type CurrencyId = CurrencyId;&#xD;&#xA;    	type WeightInfo = ();&#xD;&#xA;    	type ExistentialDeposits = ExistentialDeposits;&#xD;&#xA;    	type OnDust = ();&#xD;&#xA;    	type MaxLocks = MaxLocks;&#xD;&#xA;    	type MaxReserves = MaxReserves;&#xD;&#xA;    	type ReserveIdentifier = [u8; 8];&#xD;&#xA;    	type DustRemovalWhitelist = frame_support::traits::Nothing;&#xD;&#xA;    	type OnNewTokenAccount = ();&#xD;&#xA;    	type OnKilledTokenAccount = ();&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="19123" PostHistoryTypeId="1" PostId="5109" RevisionGUID="71a48169-28d3-4187-973c-d24eddfa967b" CreationDate="2022-09-30T22:42:12.170" UserId="3171" Text="Error while adding orml_tokens. 'Orml_tokens` does not have the std feature enabled" ContentLicense="CC BY-SA 4.0" />
  <row Id="19124" PostHistoryTypeId="3" PostId="5109" RevisionGUID="71a48169-28d3-4187-973c-d24eddfa967b" CreationDate="2022-09-30T22:42:12.170" UserId="3171" Text="|runtime|error|token|orml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19125" PostHistoryTypeId="5" PostId="5109" RevisionGUID="d85f460f-60dc-47a5-ac7f-671ce9ea8faa" CreationDate="2022-09-30T23:05:00.770" UserId="3171" Comment="deleted 70 characters in body" Text="Why I have this Error?&#xD;&#xA;&#xD;&#xA;    Tokens: orml_tokens::{Pallet, Storage, Event&lt;T&gt;, Config&lt;T&gt;} = 50,&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vcm5N.jpg&#xD;&#xA;&#xD;&#xA;this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;this error originates in the macro `orml_tokens::__substrate_genesis_config_check::is_std_enabled_for_genesis` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;`Tokens` does not have the std feature enabled, this will cause the `orml_tokens::GenesisConfig` type to be undefined&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    use codec::{Decode, Encode, MaxEncodedLen};&#xD;&#xA;    use scale_info::TypeInfo;&#xD;&#xA;    &#xD;&#xA;    #[derive(&#xD;&#xA;    	Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen,&#xD;&#xA;    )]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;    pub enum CurrencyId {&#xD;&#xA;    	&#xD;&#xA;    	Native,&#xD;&#xA;    &#xD;&#xA;    	KSM,&#xD;&#xA;    &#xD;&#xA;    	AUSD,&#xD;&#xA;    	/// A foreign asset&#xD;&#xA;    	ForeignAsset(ForeignAssetId),&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub type ForeignAssetId = u32;&#xD;&#xA;    &#xD;&#xA;    impl Default for CurrencyId {&#xD;&#xA;    	fn default() -&gt; Self {&#xD;&#xA;    		CurrencyId::Native&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    parameter_type_with_key! {&#xD;&#xA;    	pub ExistentialDeposits: |currency_id: CurrencyId| -&gt; Balance {&#xD;&#xA;    		match currency_id {&#xD;&#xA;    			CurrencyId::Native =&gt; ExistentialDeposit::get(),&#xD;&#xA;    			_ =&gt; 0,&#xD;&#xA;    		}&#xD;&#xA;    	};&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub type IBalance = i128;&#xD;&#xA;    impl orml_tokens::Config for Runtime {&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type Balance = Balance;&#xD;&#xA;    	type Amount = IBalance;&#xD;&#xA;    	type CurrencyId = CurrencyId;&#xD;&#xA;    	type WeightInfo = ();&#xD;&#xA;    	type ExistentialDeposits = ExistentialDeposits;&#xD;&#xA;    	type OnDust = ();&#xD;&#xA;    	type MaxLocks = MaxLocks;&#xD;&#xA;    	type MaxReserves = MaxReserves;&#xD;&#xA;    	type ReserveIdentifier = [u8; 8];&#xD;&#xA;    	type DustRemovalWhitelist = frame_support::traits::Nothing;&#xD;&#xA;    	type OnNewTokenAccount = ();&#xD;&#xA;    	type OnKilledTokenAccount = ();&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="19126" PostHistoryTypeId="2" PostId="5110" RevisionGUID="ae8c6ec5-fd7e-4c92-b275-86d62263e7a1" CreationDate="2022-09-30T23:26:05.117" UserId="3250" Text="Im working on the substrate for the first time.&#xD;&#xA;https://docs.substrate.io/tutorials/get-started/build-local-blockchain/&#xD;&#xA;&#xD;&#xA;stuck right here:&#xD;&#xA;Open http://localhost:8000/ in a browser to view the front-end template.&#xD;&#xA;&#xD;&#xA;File has moved. Any clue where it is or the specs i need to continue step 3 on the front end template. Also, does this mean my chain is working? " ContentLicense="CC BY-SA 4.0" />
  <row Id="19128" PostHistoryTypeId="1" PostId="5110" RevisionGUID="ae8c6ec5-fd7e-4c92-b275-86d62263e7a1" CreationDate="2022-09-30T23:26:05.117" UserId="3250" Text="stuck starting substrate local host has moved" ContentLicense="CC BY-SA 4.0" />
  <row Id="19129" PostHistoryTypeId="3" PostId="5110" RevisionGUID="ae8c6ec5-fd7e-4c92-b275-86d62263e7a1" CreationDate="2022-09-30T23:26:05.117" UserId="3250" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19131" PostHistoryTypeId="5" PostId="4618" RevisionGUID="e05e7fc8-63f2-4fe0-bbff-a9ac10e6a618" CreationDate="2022-10-01T04:16:30.843" UserId="1824" Comment="Cleaned up question" Text="I want to write a method which takes a `String` and converts it to an `AccountId`, like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn send(&#xD;&#xA;    &amp;mut self,&#xD;&#xA;    address: String&#xD;&#xA;) -&gt; Result&lt;()&gt; {&#xD;&#xA;    // Some type conversion `address` to `account`&#xD;&#xA;    self.env().transfer(account, value)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There's no type conversion from `String` to `AccountId` as part of the traits implemented on `AccountId`. How can I do this conversion?  &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19132" PostHistoryTypeId="4" PostId="4618" RevisionGUID="e05e7fc8-63f2-4fe0-bbff-a9ac10e6a618" CreationDate="2022-10-01T04:16:30.843" UserId="1824" Comment="Cleaned up question" Text="Convert `String` to `AccountId` in ink! contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="19133" PostHistoryTypeId="6" PostId="4618" RevisionGUID="e05e7fc8-63f2-4fe0-bbff-a9ac10e6a618" CreationDate="2022-10-01T04:16:30.843" UserId="1824" Comment="Cleaned up question" Text="|ink|smart-contract|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19134" PostHistoryTypeId="24" PostId="4618" RevisionGUID="e05e7fc8-63f2-4fe0-bbff-a9ac10e6a618" CreationDate="2022-10-01T04:16:30.843" Comment="Proposed by 1824 approved by 34 edit id of 294" ContentLicense="CC BY-SA 4.0" />
  <row Id="19135" PostHistoryTypeId="2" PostId="5111" RevisionGUID="7c7ab951-dce2-4046-b446-b51c922fb274" CreationDate="2022-10-01T06:20:39.023" UserId="3247" Text="&gt;What do you need the can_enqueue_txs and inherent_extrinsics_with_context for? – &#xD;&#xA;&#xD;&#xA;inherent extrinsics is called in block builder when new block is initialized (to convert inherent data into extrinsics and include these into the block) i need to create new blocks to benchmark block execution overhead " ContentLicense="CC BY-SA 4.0" />
  <row Id="19137" PostHistoryTypeId="5" PostId="5098" RevisionGUID="75c1f55a-a848-41de-9257-add992b04187" CreationDate="2022-10-01T07:06:13.593" UserId="3217" Comment="added 26 characters in body" Text="I read in [this answer][1] that you can access everything from mock runtime in the benchmarking file by just adding `#[cfg(test)]` above the import `use crate::mock::*;` and that it is not a good idea since it only applies when running benchmark tests and not during the actual benchmarking against the real runtime. &#xD;&#xA;&#xD;&#xA;In my case, I need to deploy a smart contract, get its address from the events emitted and then use that to benchmark a `Pallet::&lt;T&gt;::transfer(to, erc20_address, amount)` function. How can I access the `Systems::events()` inside the benchmark file? Thanks.&#xD;&#xA;&#xD;&#xA;Edit: [This solution][2] worked for getting all the events emitted by the `frame_system` pallet. However, I need to match the contract instantiation event with all the events returned from the `frame_system::Pallet::&lt;T&gt;::events()` to extract the deployed contract code. I defined an `Event = &lt;T as frame_system::Config&gt;::Event` but it gave the error -- &#xD;&#xA;```&#xD;&#xA;let Event = &lt;T as frame_system::Config&gt;::Event;&#xD;&#xA;   |         ----- help: `Event` is defined here, but is not a type&#xD;&#xA;...&#xD;&#xA;60 |             if let Event::Contracts(pallet_contracts::Event::Instantiated {&#xD;&#xA;   |                    ^^^^^ use of undeclared type `Event`&#xD;&#xA;&#xD;&#xA;error[E0575]: expected method or associated constant, found associated type `frame_system::Config::Event`&#xD;&#xA;```&#xD;&#xA;I've added the code snippet for more context below:&#xD;&#xA;```&#xD;&#xA;    let evts = frame_system::Pallet::&lt;T&gt;::events();&#xD;&#xA;	let Event = &lt;T as frame_system::Config&gt;::Event; // This line doesn't work&#xD;&#xA;	let deployed = evts&#xD;&#xA;		.iter()&#xD;&#xA;		.rev()&#xD;&#xA;		.find_map(|rec| {&#xD;&#xA;			if let Event::Contracts(pallet_contracts::Event::Instantiated {&#xD;&#xA;				deployer: _,&#xD;&#xA;				contract,&#xD;&#xA;			}) = &amp;rec.event&#xD;&#xA;			{&#xD;&#xA;				Some(contract)&#xD;&#xA;			} else {&#xD;&#xA;				None&#xD;&#xA;			}&#xD;&#xA;		})&#xD;&#xA;		.expect(&quot;unable to find deployed contract&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1106/how-to-mock-trait-in-benchmarking&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/5101/3217" ContentLicense="CC BY-SA 4.0" />
  <row Id="19138" PostHistoryTypeId="2" PostId="5112" RevisionGUID="8ddb5388-2636-40bf-9168-0b12b0211777" CreationDate="2022-10-01T07:16:27.677" UserId="18" Text="Any pallets that are added to the runtime needs to be no_std enabled &#xD;&#xA;&#xD;&#xA;Have a look at how [we][1](or any other chain) implemented it&#xD;&#xA;&#xD;&#xA;Check your Cargo file and make sure you configured it correctly &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ImbueNetwork/imbue/blob/main/runtime/imbue-kusama/Cargo.toml#L137" ContentLicense="CC BY-SA 4.0" />
  <row Id="19140" PostHistoryTypeId="2" PostId="5113" RevisionGUID="ae0cde07-55d9-438a-bc1a-d1d54f7245ea" CreationDate="2022-10-01T07:57:55.263" UserId="354" Text="I want to change the weight/score of targets on the basis of values got during runtime, in my research I found the score of a target is being calculated in `primitives/npos-elections/phragmen.rs` in `fn seq_phragmen_core` by adding something in `let temp = Rational128::from(temp_n.saturating_add(something), temp_d);`, the code snippet of the same is below.&#xD;&#xA;&#xD;&#xA;&gt;      // loop 2: increment score&#xD;&#xA;&gt;     		for voter in &amp;voters {&#xD;&#xA;&gt;     			for edge in &amp;voter.edges {&#xD;&#xA;&gt;     				let mut candidate = edge.candidate.borrow_mut();&#xD;&#xA;&gt;     				if !candidate.elected &amp;&amp; !candidate.approval_stake.is_zero() {&#xD;&#xA;&gt;     					let temp_n = multiply_by_rational(&#xD;&#xA;&gt;     						voter.load.n(),&#xD;&#xA;&gt;     						voter.budget,&#xD;&#xA;&gt;     						candidate.approval_stake,&#xD;&#xA;&gt;     					)&#xD;&#xA;&gt;     					.unwrap_or(Bounded::max_value());&#xD;&#xA;&gt;     					let temp_d = voter.load.d();&#xD;&#xA;&gt;     					let temp = Rational128::from(temp_n.saturating_add(something), temp_d);&#xD;&#xA;&gt;     					candidate.score = candidate.score.lazy_saturating_add(temp);&#xD;&#xA;&gt;     				}&#xD;&#xA;&gt;     			}&#xD;&#xA;&gt;     		}&#xD;&#xA;&#xD;&#xA;I found the inputs in the function are coming from `staking-&gt;targets`, so i want to know how do i add something to the score in `phragmen.rs` after getting something during runtime.&#xD;&#xA;&#xD;&#xA;The one solution that I thought was to add somthing as a field in `pub struct Candidate&lt;AccountId&gt;`, and add it as  `let temp = Rational128::from(temp_n.saturating_add(candidate.something), temp_d);`, but was unable to  get the value of something during.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19142" PostHistoryTypeId="1" PostId="5113" RevisionGUID="ae0cde07-55d9-438a-bc1a-d1d54f7245ea" CreationDate="2022-10-01T07:57:55.263" UserId="354" Text="How can I access a value obtained at runtime in primitives npos elections?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19143" PostHistoryTypeId="3" PostId="5113" RevisionGUID="ae0cde07-55d9-438a-bc1a-d1d54f7245ea" CreationDate="2022-10-01T07:57:55.263" UserId="354" Text="|substrate-node|pallet|rust|runtime|primitive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19144" PostHistoryTypeId="2" PostId="5114" RevisionGUID="3b914f45-01d0-49a6-8362-3f9de9b509ff" CreationDate="2022-10-01T08:51:16.747" UserId="16" Text="The problem here is that you were upgrading between `pallet-contracts` versions which offered no upgrade path. Neither they offered compatibility for already deployed contracts nor did we include storage migrations.&#xD;&#xA;&#xD;&#xA;This changed with `v0.8.30`. You still need to make sure to include the storage migrations contained in `pallet-contracts` in your runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="19148" PostHistoryTypeId="2" PostId="5116" RevisionGUID="cc82346a-93ca-44eb-a1b3-db14652dae52" CreationDate="2022-10-01T12:09:41.333" UserId="3253" Text="The docs are wrong. It's running on port 8080" ContentLicense="CC BY-SA 4.0" />
  <row Id="19150" PostHistoryTypeId="2" PostId="5117" RevisionGUID="0413ab23-aad0-4bb5-981a-dea96101b61e" CreationDate="2022-10-01T14:27:14.937" UserId="309" Text="I asked a similar question a month ago [here][1], and the answer/explanation was found in a failing `cargo t -p pallet-nft --features runtime-benchmarks` command.&#xD;&#xA;This time, the building part works, the testing (command above) succeded, but in the end I get the following error&#xD;&#xA;&#xD;&#xA;    Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;    WASM backtrace:&#xD;&#xA;    &#xD;&#xA;        0: 0x3940eb - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;        1: 0x4097 - &lt;unknown&gt;!core::panicking::panic_fmt::hc0f1a745489a812e&#xD;&#xA;        2: 0x4058 - &lt;unknown&gt;!core::panicking::panic::h8bed5bf163926af5&#xD;&#xA;        3: 0x2b21c5 - &lt;unknown&gt;!pallet_onboarding::functions::&lt;impl pallet_onboarding::pallet::Pallet&lt;T&gt;&gt;::status::hc38e51a95e1f40c3&#xD;&#xA;        4: 0x193b6c - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::h52bc32ba1bfdf570&#xD;&#xA;        5: 0x595a4 - &lt;unknown&gt;!&lt;pallet_share_distributor::benchmarking::SelectedBenchmark as frame_benchmarking::utils::BenchmarkingSetup&lt;T&gt;&gt;::instance::ha831dc7a67fa6d5e&#xD;&#xA;        6: 0x30ec9a - &lt;unknown&gt;!pallet_share_distributor::benchmarking::&lt;impl frame_benchmarking::utils::Benchmarking for pallet_share_distributor::pallet::Pallet&lt;T&gt;&gt;::run_benchmark::h31fd450e96802663&#xD;&#xA;        7: 0x203708 - &lt;unknown&gt;!&lt;fs_node_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_Benchmark::Benchmark&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,fs_node_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_spec_version::CheckSpecVersion&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;fs_node_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;fs_node_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::dispatch_benchmark::h43f9fdd5b8f895d2&#xD;&#xA;        8: 0x3466be - &lt;unknown&gt;!Benchmark_dispatch_benchmark&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Any idea on How to fix it please?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4372/benchmarking-wasm-error?noredirect=1#comment4139_4372" ContentLicense="CC BY-SA 4.0" />
  <row Id="19152" PostHistoryTypeId="1" PostId="5117" RevisionGUID="0413ab23-aad0-4bb5-981a-dea96101b61e" CreationDate="2022-10-01T14:27:14.937" UserId="309" Text="Another Benchmarking Wasm error" ContentLicense="CC BY-SA 4.0" />
  <row Id="19153" PostHistoryTypeId="3" PostId="5117" RevisionGUID="0413ab23-aad0-4bb5-981a-dea96101b61e" CreationDate="2022-10-01T14:27:14.937" UserId="309" Text="|benchmarking|wasm|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19156" PostHistoryTypeId="2" PostId="5119" RevisionGUID="be0c8ac6-45f7-4cd1-93b7-c6ffa7dc7e80" CreationDate="2022-10-01T17:15:29.833" UserId="2147" Text="### Context &#xD;&#xA;I have achieved PoA by setting `StakingConfig::force_era` to `Forcing::ForceNone`.&#xD;&#xA;This will prevent eras and election to be triggered, so that the validator set will be effectively constant.&#xD;&#xA;Polkadot did the same at mainnet launch : https://github.com/paritytech/polkadot/blob/00fed3bc47dcb9cb591bdec1b2b2e703051241ae/node/service/src/chain_spec.rs&#xD;&#xA;&#xD;&#xA;In order to switch to NPoS I will issue a `pallet_staking::force_new_era(sudo_origin)` so that election cycles and era can occur again.&#xD;&#xA;The authorities however will continue to accrue era points during the length of the whole era and they would be able to claim them before `HISTORY_DEPTH` eras have passed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Question&#xD;&#xA;Did polkadot allowed for PoA authorities to claim their era payouts? If not how did it make sure that authorities could not collect era reward?&#xD;&#xA;&#xD;&#xA;thanks in advance&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19158" PostHistoryTypeId="1" PostId="5119" RevisionGUID="be0c8ac6-45f7-4cd1-93b7-c6ffa7dc7e80" CreationDate="2022-10-01T17:15:29.833" UserId="2147" Text="Genesis Authorities getting payout rewards in PoA" ContentLicense="CC BY-SA 4.0" />
  <row Id="19159" PostHistoryTypeId="3" PostId="5119" RevisionGUID="be0c8ac6-45f7-4cd1-93b7-c6ffa7dc7e80" CreationDate="2022-10-01T17:15:29.833" UserId="2147" Text="|staking|validator|era|poa|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19160" PostHistoryTypeId="2" PostId="5120" RevisionGUID="013638de-536d-483a-aff4-3d383dd91277" CreationDate="2022-10-01T20:22:02.497" UserId="3247" Text="&gt;Can you confirm that the node is running on a clean DB path? If not, the genesis-hash will still contain the old runtime code without the Runtime API. The --tmp flag is useful for this. – &#xD;&#xA;&#xD;&#xA;now it doesnt complain about `can_enqueue_txs` but `inherent_extrinsics` still does not work&#xD;&#xA;&#xD;&#xA;&gt; Can you confirm that the node is running on a clean DB path? If not, the genesis-hash will still contain the old runtime code without the Runtime API. The --tmp flag is useful for this. – &#xD;&#xA;&#xD;&#xA;that solved `Exported method is not found` problem, thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="19162" PostHistoryTypeId="5" PostId="5117" RevisionGUID="7bcd07ed-ffd3-49e4-b8ea-fbfdd702cc41" CreationDate="2022-10-01T22:59:59.510" UserId="309" Comment="added 348 characters in body" Text="I asked a similar question a month ago [here][1], and the answer/explanation was found in a failing `cargo t -p pallet-nft --features runtime-benchmarks` command.&#xD;&#xA;This time, the building part works, the testing (command above) succeded, but in the end I get the following error&#xD;&#xA;&#xD;&#xA;    Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;    WASM backtrace:&#xD;&#xA;    &#xD;&#xA;        0: 0x3940eb - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;        1: 0x4097 - &lt;unknown&gt;!core::panicking::panic_fmt::hc0f1a745489a812e&#xD;&#xA;        2: 0x4058 - &lt;unknown&gt;!core::panicking::panic::h8bed5bf163926af5&#xD;&#xA;        3: 0x2b21c5 - &lt;unknown&gt;!pallet_onboarding::functions::&lt;impl pallet_onboarding::pallet::Pallet&lt;T&gt;&gt;::status::hc38e51a95e1f40c3&#xD;&#xA;        4: 0x193b6c - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::h52bc32ba1bfdf570&#xD;&#xA;        5: 0x595a4 - &lt;unknown&gt;!&lt;pallet_share_distributor::benchmarking::SelectedBenchmark as frame_benchmarking::utils::BenchmarkingSetup&lt;T&gt;&gt;::instance::ha831dc7a67fa6d5e&#xD;&#xA;        6: 0x30ec9a - &lt;unknown&gt;!pallet_share_distributor::benchmarking::&lt;impl frame_benchmarking::utils::Benchmarking for pallet_share_distributor::pallet::Pallet&lt;T&gt;&gt;::run_benchmark::h31fd450e96802663&#xD;&#xA;        7: 0x203708 - &lt;unknown&gt;!&lt;fs_node_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_Benchmark::Benchmark&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,fs_node_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_spec_version::CheckSpecVersion&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;fs_node_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;fs_node_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::dispatch_benchmark::h43f9fdd5b8f895d2&#xD;&#xA;        8: 0x3466be - &lt;unknown&gt;!Benchmark_dispatch_benchmark&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Any idea on How to fix it please?&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;I get the error after executing the following command&#xD;&#xA;`./target/release/fs-node&#xD;&#xA;benchmark&#xD;&#xA;pallet&#xD;&#xA;--chain&#xD;&#xA;dev&#xD;&#xA;--execution=wasm&#xD;&#xA;--wasm-execution=compiled&#xD;&#xA;--pallet&#xD;&#xA;pallet_share_distributor&#xD;&#xA;--extrinsic&#xD;&#xA;*&#xD;&#xA;--steps&#xD;&#xA;100&#xD;&#xA;--repeat&#xD;&#xA;40&#xD;&#xA;--output&#xD;&#xA;pallets/share_distributor/src/weights.rs&#xD;&#xA;--template&#xD;&#xA;assets/frame-weight-template.hbs`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4372/benchmarking-wasm-error?noredirect=1#comment4139_4372" ContentLicense="CC BY-SA 4.0" />
  <row Id="19163" PostHistoryTypeId="2" PostId="5121" RevisionGUID="86c71e68-7cc9-49f9-b64a-c27a3efd2962" CreationDate="2022-10-02T01:56:36.790" UserId="3221" Text="Hello Substrate community&#xD;&#xA;&#xD;&#xA;I've been trying to integrate an offchain worker capable of API calls on top of my the cluster I already have up and running successfully (based on [Substrate Node Template][1])&#xD;&#xA;&#xD;&#xA;I already:&#xD;&#xA;&#xD;&#xA; 1. Went through https://docs.substrate.io/reference/how-to-guides/offchain-workers/&#xD;&#xA; 2. Tried to integrate [the Paritytech official offchain exemple pallet][2] (reference from 1.)&#xD;&#xA; 3. Tried to run [this end-to-end demo][3] (also a reference from 1.)&#xD;&#xA; 4. Tried to integrate [this exemple][4] (also a reference from 1.)&#xD;&#xA;&#xD;&#xA;But there's always a problem, either the code is few years old (point 4), or at least one year old and based on Substrate node template v3 instead of v4. (point 3). The reference pallet from Parity (point 2) is just the pallet, without the code for the runtime, so a lot of dependencies are broken.&#xD;&#xA;&#xD;&#xA;Would anyone here able to share a working end-to-end exemple (runtime + pallet) based on node-template v4, or be able to guide me on how to successfully update the runtime for the pallet in point 3 to start working?&#xD;&#xA;&#xD;&#xA;Any help is appreciated :)&#xD;&#xA;&#xD;&#xA;Lucas&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/commit/278e2438f5c3f1167dea8d2c4c7b4d570045140c&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.29/frame/examples/offchain-worker&#xD;&#xA;  [3]: https://github.com/jimmychu0807/substrate-offchain-worker-demo&#xD;&#xA;  [4]: https://gnunicorn.github.io/substrate-offchain-cb/" ContentLicense="CC BY-SA 4.0" />
  <row Id="19165" PostHistoryTypeId="1" PostId="5121" RevisionGUID="86c71e68-7cc9-49f9-b64a-c27a3efd2962" CreationDate="2022-10-02T01:56:36.790" UserId="3221" Text="Working up-to-date complete source code for offchain workers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19166" PostHistoryTypeId="3" PostId="5121" RevisionGUID="86c71e68-7cc9-49f9-b64a-c27a3efd2962" CreationDate="2022-10-02T01:56:36.790" UserId="3221" Text="|offchain-worker|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19167" PostHistoryTypeId="5" PostId="5121" RevisionGUID="3d461ab6-74ce-4caa-90c3-0e7b1c0a6186" CreationDate="2022-10-02T05:01:19.127" UserId="3221" Comment="added 164 characters in body" Text="Hello Substrate community&#xD;&#xA;&#xD;&#xA;I've been trying to integrate an offchain worker capable of API calls on top of an existing Substrate cluster of 3 nodes I already have up and running successfully (based on [Substrate Node Template][1])&#xD;&#xA;&#xD;&#xA;I already:&#xD;&#xA;&#xD;&#xA; 1. Went through https://docs.substrate.io/reference/how-to-guides/offchain-workers/&#xD;&#xA; 2. Tried to integrate [the Paritytech official offchain exemple pallet][2] (reference from 1.)&#xD;&#xA; 3. Tried to run [this end-to-end demo][3] (also a reference from 1.)&#xD;&#xA; 4. Tried to integrate [this exemple][4] (also a reference from 1.)&#xD;&#xA;&#xD;&#xA;But there's always a problem:&#xD;&#xA;&#xD;&#xA; - Either the code is few years old (point 4)&#xD;&#xA; - Or at least one year old and based on Substrate node template v3 instead of v4 (point 3, and it doesn't even start anyway..)&#xD;&#xA; - The reference pallet from Parity (point 2) is just the pallet, without the code for the runtime, so a lot of dependencies are broken...&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;Would anyone here able to share a working end-to-end exemple (runtime + pallet) based on node-template v4, or be able to guide me on how to successfully update the runtime for the pallet in point 3 to start working?&#xD;&#xA;&#xD;&#xA;Any help is appreciated :)&#xD;&#xA;&#xD;&#xA;Lucas&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/commit/278e2438f5c3f1167dea8d2c4c7b4d570045140c&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.29/frame/examples/offchain-worker&#xD;&#xA;  [3]: https://github.com/jimmychu0807/substrate-offchain-worker-demo&#xD;&#xA;  [4]: https://gnunicorn.github.io/substrate-offchain-cb/&#xD;&#xA;  [5]: https://i.stack.imgur.com/rE2xX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19168" PostHistoryTypeId="5" PostId="5117" RevisionGUID="f1b1477a-c84d-4804-8866-08fc5727a87a" CreationDate="2022-10-02T05:37:52.940" UserId="309" Comment="added 6 characters in body" Text="I asked a similar question a month ago [here][1], and the answer/explanation was found in a failing `cargo t -p pallet-nft --features runtime-benchmarks` command.&#xD;&#xA;This time, the building part works, the testing (command above) succeded, but in the end I get the following error&#xD;&#xA;&#xD;&#xA;    Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;    WASM backtrace:&#xD;&#xA;    &#xD;&#xA;        0: 0x3940eb - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;        1: 0x4097 - &lt;unknown&gt;!core::panicking::panic_fmt::hc0f1a745489a812e&#xD;&#xA;        2: 0x4058 - &lt;unknown&gt;!core::panicking::panic::h8bed5bf163926af5&#xD;&#xA;        3: 0x2b21c5 - &lt;unknown&gt;!pallet_onboarding::functions::&lt;impl pallet_onboarding::pallet::Pallet&lt;T&gt;&gt;::status::hc38e51a95e1f40c3&#xD;&#xA;        4: 0x193b6c - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::h52bc32ba1bfdf570&#xD;&#xA;        5: 0x595a4 - &lt;unknown&gt;!&lt;pallet_share_distributor::benchmarking::SelectedBenchmark as frame_benchmarking::utils::BenchmarkingSetup&lt;T&gt;&gt;::instance::ha831dc7a67fa6d5e&#xD;&#xA;        6: 0x30ec9a - &lt;unknown&gt;!pallet_share_distributor::benchmarking::&lt;impl frame_benchmarking::utils::Benchmarking for pallet_share_distributor::pallet::Pallet&lt;T&gt;&gt;::run_benchmark::h31fd450e96802663&#xD;&#xA;        7: 0x203708 - &lt;unknown&gt;!&lt;fs_node_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_Benchmark::Benchmark&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,fs_node_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_spec_version::CheckSpecVersion&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;fs_node_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;fs_node_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;fs_node_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::dispatch_benchmark::h43f9fdd5b8f895d2&#xD;&#xA;        8: 0x3466be - &lt;unknown&gt;!Benchmark_dispatch_benchmark&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Any idea on How to fix it please?&#xD;&#xA;&#xD;&#xA;**EDIT:**&#xD;&#xA;&#xD;&#xA;I get the error after executing the following command&#xD;&#xA;`./target/release/fs-node&#xD;&#xA;benchmark&#xD;&#xA;pallet&#xD;&#xA;--chain&#xD;&#xA;dev&#xD;&#xA;--execution=wasm&#xD;&#xA;--wasm-execution=compiled&#xD;&#xA;--pallet&#xD;&#xA;pallet_share_distributor&#xD;&#xA;--extrinsic&#xD;&#xA;*&#xD;&#xA;--steps&#xD;&#xA;100&#xD;&#xA;--repeat&#xD;&#xA;40&#xD;&#xA;--output&#xD;&#xA;pallets/share_distributor/src/weights.rs&#xD;&#xA;--template&#xD;&#xA;assets/frame-weight-template.hbs`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4372/benchmarking-wasm-error?noredirect=1#comment4139_4372" ContentLicense="CC BY-SA 4.0" />
  <row Id="19169" PostHistoryTypeId="2" PostId="5122" RevisionGUID="4ce83ba7-bb15-453a-aba2-9c6de09147e5" CreationDate="2022-10-02T10:12:35.723" UserId="3247" Text="for some reason running overhead benchmarks fails in our parachain.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run --release --features=runtime-benchmarks benchmark overhead --chain local&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;results with following stacktrace&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Client(Application(Application(Execution(AbortedDueToTrap(MessageWithBacktrace { message: &quot;wasm trap: wasm `unreachable` instruction executed&quot;, backtrace: Some(Backtrace { backtrace_string: &quot;&#xD;&#xA;    0: 0x3fe0f6 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x664b - &lt;unknown&gt;!core::panicking::panic_fmt::h0a20ba97f16cb738&#xD;&#xA;    2: 0x660c - &lt;unknown&gt;!core::panicking::panic::h20cc6242ae6ad8e6&#xD;&#xA;    3: 0x26732d - &lt;unknown&gt;!&lt;mangata_kusama_runtime::Runtime as sp_block_builder::runtime_decl_for_BlockBuilder::BlockBuilder&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header_ver::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,mangata_kusama_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;mangata_kusama_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;mangata_kusama_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::inherent_extrinsics::heebd5e387a87c636&#xD;&#xA;    4: 0x398ecb - &lt;unknown&gt;!BlockBuilder_inherent_extrinsics&#xD;&#xA;&quot; }) })))))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Backtrace seems to pointing out to [BlockBuilderApi::inherent_extrinsics][1] runtime api call in [BlockBuilder::create_inherents][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	/// Create the inherents for the block.&#xD;&#xA;	///&#xD;&#xA;	/// Returns the inherents created by the runtime or an error if something failed.&#xD;&#xA;	pub fn create_inherents(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		inherent_data: sp_inherents::InherentData,&#xD;&#xA;	) -&gt; Result&lt;Vec&lt;Block::Extrinsic&gt;, Error&gt; {&#xD;&#xA;		let block_id = self.block_id;&#xD;&#xA;		self.api&#xD;&#xA;			.execute_in_transaction(move |api| {&#xD;&#xA;				// `create_inherents` should not change any state, to ensure this we always rollback&#xD;&#xA;				// the transaction.&#xD;&#xA;				TransactionOutcome::Rollback(api.inherent_extrinsics_with_context(&#xD;&#xA;					&amp;block_id,&#xD;&#xA;					ExecutionContext::BlockConstruction,&#xD;&#xA;					inherent_data,&#xD;&#xA;				))&#xD;&#xA;			})&#xD;&#xA;			.map_err(|e| Error::Application(Box::new(e)))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which seems to be very weird because both in [origin substrate runtime][3] and [our runtime][4] is same and depends on macro generated impl of [create_extrinsics][5]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	impl sp_block_builder::BlockBuilder&lt;Block&gt; for Runtime {&#xD;&#xA;		fn inherent_extrinsics(data: InherentData) -&gt; Vec&lt;&lt;Block as BlockT&gt;::Extrinsic&gt; {&#xD;&#xA;			data.create_extrinsics()&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is even more weird when i replace runtime impl of [BlockBuilder::inherent_extrinsics][0] with just some `panic` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;it still produces the same error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  git diff&#xD;&#xA;diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs&#xD;&#xA;index 087ece535..826cf78f5 100644&#xD;&#xA;--- a/runtime/mangata-kusama/src/lib.rs&#xD;&#xA;+++ b/runtime/mangata-kusama/src/lib.rs&#xD;&#xA;@@ -1444,6 +1444,7 @@ impl_runtime_apis! {&#xD;&#xA;                }&#xD;&#xA; &#xD;&#xA;                fn inherent_extrinsics(data: sp_inherents::InherentData) -&gt; Vec&lt;&lt;Block as BlockT&gt;::Extrinsic&gt; {&#xD;&#xA;+                       panic!(&quot;blah blah&quot;);&#xD;&#xA;                        data.create_extrinsics()&#xD;&#xA;                }&#xD;&#xA; &#xD;&#xA;  cargo run --release --features=runtime-benchmarks benchmark overhead --chain local&#xD;&#xA; ...&#xD;&#xA;warning: `mangata-node` (lib) generated 15 warnings&#xD;&#xA;    Finished release [optimized] target(s) in 2.67s&#xD;&#xA;     Running `target/release/mangata-node benchmark overhead --chain local`&#xD;&#xA;Error: Client(Application(Application(Execution(AbortedDueToTrap(MessageWithBacktrace { message: &quot;wasm trap: wasm `unreachable` instruction executed&quot;, backtrace: Some(Backtrace { backtrace_string: &quot;&#xD;&#xA;    0: 0x3fe0f6 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x664b - &lt;unknown&gt;!core::panicking::panic_fmt::h0a20ba97f16cb738&#xD;&#xA;    2: 0x660c - &lt;unknown&gt;!core::panicking::panic::h20cc6242ae6ad8e6&#xD;&#xA;    3: 0x26732d - &lt;unknown&gt;!&lt;mangata_kusama_runtime::Runtime as sp_block_builder::runtime_decl_for_BlockBuilder::BlockBuilder&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header_ver::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,mangata_kusama_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;mangata_kusama_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;mangata_kusama_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::inherent_extrinsics::heebd5e387a87c636&#xD;&#xA;    4: 0x398ecb - &lt;unknown&gt;!BlockBuilder_inherent_extrinsics&#xD;&#xA;&quot; }) })))))&#xD;&#xA;cargo run --release --features=runtime-benchmarks benchmark overhead --chain   16.96s user 1.19s system 417% cpu 4.351 total&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;so it feels like some problem with [sp_inherents::InherentData::create_inherents call][5] but with dispatching of runtime api calls?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**and yes i tried purging local chain data, purging cargo cache etc...**&#xD;&#xA;&#xD;&#xA;&gt;How to reproduce?&#xD;&#xA;```&#xD;&#xA;git clone git@github.com:mangata-finance/mangata-node.git&#xD;&#xA;git checkout 35b5c154fe75f94c611f6e4d7f85e775d56c68ee&#xD;&#xA;cargo run --release --features=runtime-benchmarks benchmark overhead --chain local&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/primitives/block-builder/src/lib.rs#L45-L47&#xD;&#xA;  [2]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/client/block-builder/src/lib.rs#L279-L295&#xD;&#xA;  [3]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/bin/node/runtime/src/lib.rs#L1774-L1776&#xD;&#xA;  [4]: https://github.com/mangata-finance/mangata-node/blob/35b5c154fe75f94c611f6e4d7f85e775d56c68ee/runtime/mangata-kusama/src/lib.rs#L1446-L1448&#xD;&#xA;  [5]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/frame/support/procedural/src/construct_runtime/expand/inherent.rs#L48-L52" ContentLicense="CC BY-SA 4.0" />
  <row Id="19171" PostHistoryTypeId="1" PostId="5122" RevisionGUID="4ce83ba7-bb15-453a-aba2-9c6de09147e5" CreationDate="2022-10-02T10:12:35.723" UserId="3247" Text="unreachable` instruction executed when running overhead benchmark" ContentLicense="CC BY-SA 4.0" />
  <row Id="19172" PostHistoryTypeId="3" PostId="5122" RevisionGUID="4ce83ba7-bb15-453a-aba2-9c6de09147e5" CreationDate="2022-10-02T10:12:35.723" UserId="3247" Text="|runtime|wasm|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19173" PostHistoryTypeId="2" PostId="5123" RevisionGUID="ab17f35a-ffa1-44e5-97b2-d20453180e4f" CreationDate="2022-10-02T14:59:21.927" UserId="167" Text="It seems like you want to implement a custom election algorithm here, and the easiest thing to do is to just implement it as a brand new function (or set of functions). &#xD;&#xA;&#xD;&#xA;Then, if you want to use it in the runtime, alongside the staking pallet, all you have to do is implement [`trait NpoSolver`](https://paritytech.github.io/substrate/master/frame_election_provider_support/trait.NposSolver.html) for your new implementation. &#xD;&#xA;&#xD;&#xA;As an example, the default Phragmen algorithm is used in the runtime not directly, but instead as an implementation of the aforementioned trait. For example, you would do something like: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct CustomElection&lt;AccountId&gt;(sp_std::marker::PhantomData&lt;(AccountId)&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;AccountId&gt; NposSolver for CustomElection&lt;AccountId&gt;&#xD;&#xA;{&#xD;&#xA;	type AccountId = AccountId;&#xD;&#xA;	type Accuracy = Perbill;&#xD;&#xA;	type Error = ();&#xD;&#xA;	fn solve(&#xD;&#xA;		winners: usize,&#xD;&#xA;		targets: Vec&lt;Self::AccountId&gt;,&#xD;&#xA;		voters: Vec&lt;(Self::AccountId, VoteWeight, impl IntoIterator&lt;Item = Self::AccountId&gt;)&gt;,&#xD;&#xA;	) -&gt; Result&lt;ElectionResult&lt;Self::AccountId, Self::Accuracy&gt;, Self::Error&gt; {&#xD;&#xA;		// your custom algorithm, similar to seq-phragmen. &#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19175" PostHistoryTypeId="2" PostId="5124" RevisionGUID="a7faed35-9d4e-4031-a988-5b6d413620d6" CreationDate="2022-10-02T15:12:54.147" UserId="167" Text="I believe the PoA period had staking rewards normally. Nonetheless, because no one was nominating, it basically only went into the initial authorities. &#xD;&#xA;&#xD;&#xA;If you want to control this, you can easily do it at the top level runtime, by overwriting the `RewardCurve` type in `pallet_staking::Config`. For example, the default implementation in substrate's `kitchensink-runtime` is using [`pallet_staking::ConvertCurve`](https://paritytech.github.io/substrate/master/pallet_staking/struct.ConvertCurve.html). This merely takes a pre-generated reward curve and translates it to the appropriate inflation rate.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;  pub const RewardCurve: &amp;'static PiecewiseLinear&lt;'static&gt; = &amp;REWARD_CURVE;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_staking::Config for Runtime {&#xD;&#xA;  type EraPayout = pallet_staking::ConvertCurve&lt;RewardCurve&gt;;&#xD;&#xA;  ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can provide your own implementation that slightly adjusts this for the PoA mode. Recall that at the end of the day, [`type EraPayout`](https://paritytech.github.io/substrate/master/pallet_staking/pallet/trait.Config.html#associatedtype.EraPayout) in `pallet_staking::Config` must be anything that implements `trait EraPayout`. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct NoInflationIfNoEras;&#xD;&#xA;impl EraPayout&lt;Balance&gt; for NoInflationIfNoEras {&#xD;&#xA;  fn era_payout(&#xD;&#xA;    total_staked: Balance,&#xD;&#xA;    total_issuance: Balance,&#xD;&#xA;    era_duration_millis: u64,&#xD;&#xA;  ) -&gt; (Balance, Balance) {&#xD;&#xA;    if pallet_staking::Forcing::&lt;Runtime&gt;::get() == Forcing::None {&#xD;&#xA;      // PoA mode: no inflation.&#xD;&#xA;      (0, 0)&#xD;&#xA;    } else {&#xD;&#xA;      // proxy to whatever else is the default: &#xD;&#xA;      &lt;pallet_staking::ConvertCurve as EraPayout&lt;Balance&gt;&gt;::era_payout(&#xD;&#xA;         total_staked,&#xD;&#xA;         total_issuance,&#xD;&#xA;         era_duration_millis,&#xD;&#xA;      )&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}" ContentLicense="CC BY-SA 4.0" />
  <row Id="19177" PostHistoryTypeId="2" PostId="5125" RevisionGUID="8e0c4d91-7fa4-4b1d-840f-3cb31508fce5" CreationDate="2022-10-02T15:18:26.497" UserId="3252" Text="As a developer，I want to use the interface to search this information: which can get the validator detail information like the count of  nominators and the commission  and others information," ContentLicense="CC BY-SA 4.0" />
  <row Id="19179" PostHistoryTypeId="1" PostId="5125" RevisionGUID="8e0c4d91-7fa4-4b1d-840f-3cb31508fce5" CreationDate="2022-10-02T15:18:26.497" UserId="3252" Text="How to get the validators detail information" ContentLicense="CC BY-SA 4.0" />
  <row Id="19180" PostHistoryTypeId="3" PostId="5125" RevisionGUID="8e0c4d91-7fa4-4b1d-840f-3cb31508fce5" CreationDate="2022-10-02T15:18:26.497" UserId="3252" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19181" PostHistoryTypeId="2" PostId="5126" RevisionGUID="b7a733af-b814-4761-877d-034ae27200b6" CreationDate="2022-10-02T15:28:51.917" UserId="167" Text="Everything that can be read onchain is listed [here](https://polkadot.js.org/docs/substrate/storage#staking).&#xD;&#xA;&#xD;&#xA;For example, to read the commission: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;console.log((await api.query.staking.validators(&quot;11uMPbeaEDJhUxzU4ZfWW9VQEsryP9XqFcNRfPdYda6aFWJ&quot;)).commission)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which is a [`Perbill`](https://paritytech.github.io/substrate/master/sp_arithmetic/per_things/struct.Perbill.html), fixed point parts per billion, and `11uMPbeaEDJhUxzU4ZfWW9VQEsryP9XqFcNRfPdYda6aFWJ` is a totally arbitrary validator of Polkadot today.&#xD;&#xA;&#xD;&#xA;You can directly paste this into https://polkadot.js.org/apps/#/js. &#xD;&#xA;&#xD;&#xA;To get the count of active nominator who end up backing a validator in era: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const lastEra = (await api.query.staking.currentEra()).unwrap();&#xD;&#xA;const exposures = await api.query.staking.erasStakers(lastEra, &quot;11uMPbeaEDJhUxzU4ZfWW9VQEsryP9XqFcNRfPdYda6aFWJ&quot;);&#xD;&#xA;console.log(exposures.others.length)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To get the list of all the nominators who casted a vote for `11uMPbeaEDJhUxzU4ZfWW9VQEsryP9XqFcNRfPdYda6aFWJ`, you have to iterate the [`nominators`](https://polkadot.js.org/docs/substrate/storage#nominatorsaccountid32-optionpalletstakingnominations) map, but I will leave that up to you to figure out. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19183" PostHistoryTypeId="50" PostId="4591" RevisionGUID="77332154-cc9c-419c-ab0b-a7ec14e13fe5" CreationDate="2022-10-02T16:02:45.377" UserId="-1" />
  <row Id="19184" PostHistoryTypeId="2" PostId="5127" RevisionGUID="401361e3-5d56-4e79-8c74-6a3bc4dcd8c8" CreationDate="2022-10-03T01:31:44.230" UserId="116" Text="One of our nodes is struggling to keep its peers and often gets disconnected from the other nodes. This node is in our set of bootnodes.&#xD;&#xA;&#xD;&#xA;Is there a way to flag the peers connection between (boot)nodes so they will try harder to stay connected?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19186" PostHistoryTypeId="1" PostId="5127" RevisionGUID="401361e3-5d56-4e79-8c74-6a3bc4dcd8c8" CreationDate="2022-10-03T01:31:44.230" UserId="116" Text="Node is loosing peers, it there a way to force lock a connection" ContentLicense="CC BY-SA 4.0" />
  <row Id="19187" PostHistoryTypeId="3" PostId="5127" RevisionGUID="401361e3-5d56-4e79-8c74-6a3bc4dcd8c8" CreationDate="2022-10-03T01:31:44.230" UserId="116" Text="|nodes|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19188" PostHistoryTypeId="2" PostId="5128" RevisionGUID="c5f99047-e3c5-4ba2-bd32-22c2929d9501" CreationDate="2022-10-03T01:51:53.813" UserId="3255" Text="I can see this phrase, while I am building 3 parachains on rococo testnet.&#xD;&#xA;Are there any ways to I can see this phrase, while I am building 3 parachains on rococo testnet.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/nwapo.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19190" PostHistoryTypeId="1" PostId="5128" RevisionGUID="c5f99047-e3c5-4ba2-bd32-22c2929d9501" CreationDate="2022-10-03T01:51:53.813" UserId="3255" Text="Build the parachain ecosystem" ContentLicense="CC BY-SA 4.0" />
  <row Id="19191" PostHistoryTypeId="3" PostId="5128" RevisionGUID="c5f99047-e3c5-4ba2-bd32-22c2929d9501" CreationDate="2022-10-03T01:51:53.813" UserId="3255" Text="|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19192" PostHistoryTypeId="5" PostId="5128" RevisionGUID="3a100cc2-16b9-42b7-9a5a-ebc2501b9b61" CreationDate="2022-10-03T01:53:26.563" UserId="3255" Comment="deleted 12 characters in body" Text="I can see this phrase, while I am building 3 parachains on rococo testnet.&#xD;&#xA;Are there any ways to use the different runtime codes customized for each parachain?[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/nwapo.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19193" PostHistoryTypeId="5" PostId="5128" RevisionGUID="edc61237-3f6d-4490-8d23-680de3a5f4d0" CreationDate="2022-10-03T01:54:30.450" UserId="3255" Comment="added 2 characters in body" Text="I can see this phrase, while I am building 3 parachains on rococo testnet.&#xD;&#xA;Are there any ways to use the different runtime codes customized for each parachain?&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wxJb8.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19202" PostHistoryTypeId="2" PostId="5130" RevisionGUID="6e7153ad-442a-45b3-a7d0-0308548a53c8" CreationDate="2022-10-03T09:01:41.843" UserId="3231" Text="I have approvals map in my pallet&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;So when i try to get value from my storage, I'm getting this error&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;So how to properly use pallet storage in tests?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/D7khh.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/9y8OR.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/mp40E.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19204" PostHistoryTypeId="1" PostId="5130" RevisionGUID="6e7153ad-442a-45b3-a7d0-0308548a53c8" CreationDate="2022-10-03T09:01:41.843" UserId="3231" Text="How to get access to pallet storage from tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="19205" PostHistoryTypeId="3" PostId="5130" RevisionGUID="6e7153ad-442a-45b3-a7d0-0308548a53c8" CreationDate="2022-10-03T09:01:41.843" UserId="3231" Text="|pallet|substrate-node-template|storage|frame|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19206" PostHistoryTypeId="2" PostId="5131" RevisionGUID="42f12862-294c-449b-9d31-14a576295673" CreationDate="2022-10-03T09:01:55.143" UserId="2909" Text="Hey if your question is about how to bring liquidity from stablecoins like USDT into Polkadot and Kusama ecosystem? Currently it is available with Bitfinex withdrawals to Statemint and Statemine parachains for Polkadot and Kusama ecosystem respectively.&#xD;&#xA;&#xD;&#xA;**1) You withdraw your USDT from Bitfinex into Statemint/Statemine**&#xD;&#xA;See Statemine example:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181634-how-to-withdraw-usdt-from-bitfinex-on-statemine&#xD;&#xA;&#xD;&#xA;See that Statemint (Polkadot) is also now recently available:&#xD;&#xA;https://www.bitfinex.com/posts/840&#xD;&#xA;&#xD;&#xA;**2) You then transfer it across the Polkadot/Kusama ecosystem respectively:**&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181118-how-to-transfer-tether-usdt-on-statemine&#xD;&#xA;&#xD;&#xA;FYI on what is Statemint and Statemine:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-" ContentLicense="CC BY-SA 4.0" />
  <row Id="19208" PostHistoryTypeId="5" PostId="5131" RevisionGUID="8ad62d1b-880b-4b40-8740-9ecc920704b0" CreationDate="2022-10-03T09:02:34.743" UserId="2909" Comment="added 28 characters in body" Text="Hey if your question is about how to bring liquidity from stablecoins like USDT into Polkadot and Kusama ecosystem? Currently it is available with Bitfinex withdrawals to Statemint and Statemine parachains for Polkadot and Kusama ecosystem respectively.&#xD;&#xA;&#xD;&#xA;**1) You withdraw your USDT from centralized exchange like Bitfinex into Statemint/Statemine**&#xD;&#xA;&#xD;&#xA;See Statemine example:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181634-how-to-withdraw-usdt-from-bitfinex-on-statemine&#xD;&#xA;&#xD;&#xA;See that Statemint (Polkadot) is also now recently available:&#xD;&#xA;https://www.bitfinex.com/posts/840&#xD;&#xA;&#xD;&#xA;**2) You then transfer it across the Polkadot/Kusama ecosystem respectively:**&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181118-how-to-transfer-tether-usdt-on-statemine&#xD;&#xA;&#xD;&#xA;FYI on what is Statemint and Statemine:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-" ContentLicense="CC BY-SA 4.0" />
  <row Id="19209" PostHistoryTypeId="5" PostId="5131" RevisionGUID="34723520-5c8f-4968-9934-141dd1e0bb4a" CreationDate="2022-10-03T09:03:09.833" UserId="2909" Comment="added 26 characters in body" Text="Hey if your question is about how to bring liquidity from stablecoins like USDT into Polkadot and Kusama ecosystem? Currently it is available with Bitfinex withdrawals to Statemint and Statemine parachains for Polkadot and Kusama ecosystem respectively.&#xD;&#xA;&#xD;&#xA;**1) You withdraw your USDT from centralized exchange like Bitfinex into Statemint/Statemine**&#xD;&#xA;&#xD;&#xA;See Statemine example:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181634-how-to-withdraw-usdt-from-bitfinex-on-statemine&#xD;&#xA;&#xD;&#xA;See that Statemint (Polkadot) is also now recently available:&#xD;&#xA;https://www.bitfinex.com/posts/840&#xD;&#xA;&#xD;&#xA;**2) You then transfer it across the Polkadot/Kusama ecosystem respectively:**&#xD;&#xA;&#xD;&#xA;See Statemine example:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181118-how-to-transfer-tether-usdt-on-statemine&#xD;&#xA;&#xD;&#xA;FYI on what is Statemint and Statemine:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-" ContentLicense="CC BY-SA 4.0" />
  <row Id="19210" PostHistoryTypeId="5" PostId="5131" RevisionGUID="78761a3a-797e-4d08-b1d4-7decbbf4b20b" CreationDate="2022-10-03T09:11:12.510" UserId="2909" Comment="deleted 9 characters in body" Text="Hey if your question is about how to bring liquidity from stablecoins like USDT into Polkadot and Kusama ecosystem? Currently it is available with Bitfinex withdrawals to Statemint and Statemine parachains for Polkadot and Kusama ecosystem respectively.&#xD;&#xA;&#xD;&#xA;**1) You withdraw your USDT from an exchange like Bitfinex into Statemint/Statemine**&#xD;&#xA;&#xD;&#xA;See Statemine example:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181634-how-to-withdraw-usdt-from-bitfinex-on-statemine&#xD;&#xA;&#xD;&#xA;See that Statemint (Polkadot) is also now recently available:&#xD;&#xA;https://www.bitfinex.com/posts/840&#xD;&#xA;&#xD;&#xA;**2) You then transfer it across the Polkadot/Kusama ecosystem respectively:**&#xD;&#xA;&#xD;&#xA;See Statemine example:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181118-how-to-transfer-tether-usdt-on-statemine&#xD;&#xA;&#xD;&#xA;FYI on what is Statemint and Statemine:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-" ContentLicense="CC BY-SA 4.0" />
  <row Id="19211" PostHistoryTypeId="2" PostId="5132" RevisionGUID="96f723d1-ec8e-4f38-a4f4-b3f036f84f13" CreationDate="2022-10-03T09:18:34.700" UserId="2673" Text="You could add a getter for your storage.&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn approvals)]&#xD;&#xA;pub type Approvals&lt;T: Config&gt; = StorageDoubleMap&lt;...&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then it could be used in your test.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert_eq!(TemplateModule::approvals(whitelisted_caller(), recipient), Some(true));&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19213" PostHistoryTypeId="2" PostId="5133" RevisionGUID="385f9895-1412-4c6b-b33f-c717f4955291" CreationDate="2022-10-03T09:22:46.390" UserId="18" Text="Hi I heard USDT and USDC is now on statemine. How do I get access to that? &#xD;&#xA;&#xD;&#xA;Assuming I have USDT on my ERC20 wallet, how do I get that to a substrate-based chain/parachain? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19215" PostHistoryTypeId="1" PostId="5133" RevisionGUID="385f9895-1412-4c6b-b33f-c717f4955291" CreationDate="2022-10-03T09:22:46.390" UserId="18" Text="How do I move my USDC/USDT to statemine?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19216" PostHistoryTypeId="3" PostId="5133" RevisionGUID="385f9895-1412-4c6b-b33f-c717f4955291" CreationDate="2022-10-03T09:22:46.390" UserId="18" Text="|rust|statemine|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19217" PostHistoryTypeId="2" PostId="5134" RevisionGUID="3782043f-7a8b-4058-86e6-e10b60d42100" CreationDate="2022-10-03T09:31:08.993" UserId="2673" Text="Yes, you can deploy parachains with different runtimes on Rococo testnet. Please take a look at [this tutorial](https://docs.substrate.io/tutorials/connect-relay-and-parachains/acquire-a-testnet-slot/) for more details." ContentLicense="CC BY-SA 4.0" />
  <row Id="19219" PostHistoryTypeId="2" PostId="5135" RevisionGUID="ad744010-8585-42a5-a103-a2d93b0111dc" CreationDate="2022-10-03T09:31:52.137" UserId="2762" Text="After run the command `yarn start` in the **substrate-front-end-template** you will see in the command line how to view it in the browser:&#xD;&#xA;&#xD;&#xA;    Compiled successfully!&#xD;&#xA;    &#xD;&#xA;    You can now view substrate-front-end-template in the browser.&#xD;&#xA;    &#xD;&#xA;      Local:            http://localhost:8000/substrate-front-end-template&#xD;&#xA;      On Your Network:  http://your-ip:8000/substrate-front-end-template&#xD;&#xA;&#xD;&#xA;Open one of this urls in your browser to see it.&#xD;&#xA;&#xD;&#xA;If you don't have the substrate-node-template running you will see something like this:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/RgE85.png&#xD;&#xA;If this happens come back to the tutorial to check how to start the local node: &#xD;&#xA;`./target/release/node-template --dev`" ContentLicense="CC BY-SA 4.0" />
  <row Id="19221" PostHistoryTypeId="2" PostId="5136" RevisionGUID="24da1b72-429c-4dd6-9358-a96354910726" CreationDate="2022-10-03T09:54:57.840" UserId="3263" Text="I can't register my parathread.&#xD;&#xA;&#xD;&#xA;Origin must be one of the following:&#xD;&#xA; - the para owner&#xD;&#xA;&#xD;&#xA;Extrinsic History：&#xD;&#xA;https://polkadot.subscan.io/extrinsic/0xfaff3ab8e13b9aff79c3b53a0f8e853fc222520b1b162bba26db8ce6744b69c6" ContentLicense="CC BY-SA 4.0" />
  <row Id="19223" PostHistoryTypeId="5" PostId="460" RevisionGUID="0b41fe62-2461-41db-b4c7-d72464dbab99" CreationDate="2022-10-03T10:52:51.960" UserId="165" Comment="added 25 characters in body" Text="In order to deregister one parathread a call [`deregister`](https://github.com/paritytech/polkadot/blob/master/runtime/common/src/paras_registrar.rs#L257) needs to be sent to the relay chain.&#xD;&#xA;&#xD;&#xA;Origin must be one of the following:&#xD;&#xA; - root&#xD;&#xA; - the para owner (depends on lock status)&#xD;&#xA; - the para itself&#xD;&#xA;&#xD;&#xA;The para to deregister must be a parathread.&#xD;&#xA;&#xD;&#xA;This call will proceed freeing all the data previously registered for that para, and consequently all deposits paid for that storage will be returned to the relevant address." ContentLicense="CC BY-SA 4.0" />
  <row Id="19224" PostHistoryTypeId="2" PostId="5137" RevisionGUID="dbcd74c5-f29d-480e-8a65-56e94db5fa8d" CreationDate="2022-10-03T11:21:33.930" UserId="3265" Text="I'm just following the basic steps from the [quickstart][1] and am running into the following:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    error: failed to select a version for the requirement `parity-scale-codec = &quot;^3.0.0&quot;`&#xD;&#xA;      candidate versions found which didn't match: 3.1.5, 3.1.3, 3.1.2, ...&#xD;&#xA;      location searched: crates.io index&#xD;&#xA;      required by package `node-template-runtime v4.0.0-dev (/Users/xxx/Projects/dot/substrate-node-template/runtime)`&#xD;&#xA;          ... which satisfies path dependency `wasm-project` (locked to 4.0.0-dev) of package `node-template-runtime-wasm v1.0.0 (/Users/xxx/Projects/dot/substrate-node-template/target/release/wbuild/node-template-runtime)`&#xD;&#xA;&#xD;&#xA;I already [found out][2] that this version seems to no longer exist. However, simply upgrading in the toml file to a newer version raises the same error. I tried deleting the Cargo.lock file as well.&#xD;&#xA;&#xD;&#xA;I'm new to this, so I might be missing something obvious.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/quick-start/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1045/reason-for-yanked-parity-scale-codec-versions-3-0-3-1-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="19226" PostHistoryTypeId="1" PostId="5137" RevisionGUID="dbcd74c5-f29d-480e-8a65-56e94db5fa8d" CreationDate="2022-10-03T11:21:33.930" UserId="3265" Text="Unable to build substrate-node-template: parity-scale-codec version mismatch" ContentLicense="CC BY-SA 4.0" />
  <row Id="19227" PostHistoryTypeId="3" PostId="5137" RevisionGUID="dbcd74c5-f29d-480e-8a65-56e94db5fa8d" CreationDate="2022-10-03T11:21:33.930" UserId="3265" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19228" PostHistoryTypeId="5" PostId="5078" RevisionGUID="53a84297-5059-4442-a438-ed6cef9fee4b" CreationDate="2022-10-03T12:19:27.580" UserId="2673" Comment="Rust syntax highlighting" Text="https://github.com/paritytech/substrate/blob/master/frame/examples/offchain-worker/src/lib.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	let val = StorageValueRef::persistent(b&quot;example_ocw::last_send&quot;);&#xD;&#xA;	// The Local Storage is persisted and shared between runs of the offchain workers,&#xD;&#xA;	// and offchain workers may run concurrently. We can use the `mutate` function, to&#xD;&#xA;	// write a storage entry in an atomic fashion. Under the hood it uses `compare_and_set`&#xD;&#xA;	// low-level method of local storage API, which means that only one worker&#xD;&#xA;	// will be able to &quot;acquire a lock&quot; and send a transaction if multiple workers&#xD;&#xA;	// happen to be executed concurrently.&#xD;&#xA;	let res = val.mutate(|last_send: Result&lt;Option&lt;T::BlockNumber&gt;, StorageRetrievalError&gt;| {&#xD;&#xA;		match last_send {&#xD;&#xA;			// If we already have a value in storage and the block number is recent enough&#xD;&#xA;			// we avoid sending another transaction at this time.&#xD;&#xA;			Ok(Some(block)) if block_number &lt; block + T::GracePeriod::get() =&gt;&#xD;&#xA;				Err(RECENTLY_SENT),&#xD;&#xA;			// In every other case we attempt to acquire the lock and send a transaction.&#xD;&#xA;			_ =&gt; Ok(block_number),&#xD;&#xA;		}&#xD;&#xA;	});&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19229" PostHistoryTypeId="24" PostId="5078" RevisionGUID="53a84297-5059-4442-a438-ed6cef9fee4b" CreationDate="2022-10-03T12:19:27.580" Comment="Proposed by 2673 approved by 3142 edit id of 295" ContentLicense="CC BY-SA 4.0" />
  <row Id="19230" PostHistoryTypeId="2" PostId="5138" RevisionGUID="380790d6-6519-4346-8eeb-51e04a761629" CreationDate="2022-10-03T12:26:24.177" UserId="85" Text="(Not financial advice)&#xD;&#xA;One new way as of end of Sep 22 (and there will be other ways on different chains given time) and this is not an endorsement of the services and I have not personally tested this route (if you're going to try it, do it with little values first):&#xD;&#xA;&#xD;&#xA; 1. https://app.multichain.org/#/router can transfer over `USDT` to moonbeam which seems to be called `multiUSDT`.&#xD;&#xA; 1. https://app.beamswap.io/exchange/swap can then be used to swap `multiUSDT` to `xcUSDT`&#xD;&#xA;&#xD;&#xA;This would get you `xcUSDT` on moonbeam which is a derivative token backed by the `USDT` on statemint, and thus ought to be isolated from future bridge hacks. It should only be exposed to the governance risk of statemint and moonbeam.&#xD;&#xA;&#xD;&#xA;Read more here:&#xD;&#xA;https://medium.com/beamswap/native-usdt-landed-on-moonbeam-and-the-beamswap-dex-7a2dd0b10b91" ContentLicense="CC BY-SA 4.0" />
  <row Id="19232" PostHistoryTypeId="5" PostId="5104" RevisionGUID="8695c0bf-c9b6-4309-92b2-138f1b448527" CreationDate="2022-10-03T12:42:51.670" UserId="3142" Comment="added 75 characters in body" Text="I need to get a list of all events of a specific custom type.  In the documentation, it said that I can query the System pallet's storage for events.  I am looking for an example (in Rust) of how to get a list of specific events.  I am planning to do this in an OCW and I need this for ALL blocks.&#xD;&#xA;&#xD;&#xA;&gt; Listening to events The Substrate RPC does not directly expose an&#xD;&#xA;&gt; endpoint for querying events. If you used the default implementation,&#xD;&#xA;&gt; you can see the list of events for the current block by querying the&#xD;&#xA;&gt; storage of the System pallet. Otherwise, the Polkadot-JS API supports&#xD;&#xA;&gt; a WebSocket subscription on runtime events.&#xD;&#xA;&#xD;&#xA;I tried this:&#xD;&#xA;&#xD;&#xA;		let evts = &lt;frame_system::Pallet&lt;T&gt;&gt;::read_events_no_consensus();&#xD;&#xA;		for evt in evts {&#xD;&#xA;			frame_support::log::info!(&quot;evt={:?}&quot;, evt.event);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;which works BUT it prints: &#xD;&#xA;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;&#xD;&#xA;How can I dump the fields of each event so I can understand what events occurred?&#xD;&#xA;&#xD;&#xA;For efficiency, how can I get just the events for the current block?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19233" PostHistoryTypeId="5" PostId="5104" RevisionGUID="5757de82-a539-49cc-a3e8-a6c5ca1477b5" CreationDate="2022-10-03T12:56:50.553" UserId="3142" Comment="added 39 characters in body" Text="I need to get a list of all events of a specific custom type.  In the documentation, it said that I can query the System pallet's storage for events.  I am looking for an example (in Rust) of how to get a list of specific events.  I am planning to do this in an OCW and I need this for the current block but also need it for all blocks.&#xD;&#xA;&#xD;&#xA;&gt; Listening to events The Substrate RPC does not directly expose an&#xD;&#xA;&gt; endpoint for querying events. If you used the default implementation,&#xD;&#xA;&gt; you can see the list of events for the current block by querying the&#xD;&#xA;&gt; storage of the System pallet. Otherwise, the Polkadot-JS API supports&#xD;&#xA;&gt; a WebSocket subscription on runtime events.&#xD;&#xA;&#xD;&#xA;I tried this:&#xD;&#xA;&#xD;&#xA;		let evts = &lt;frame_system::Pallet&lt;T&gt;&gt;::read_events_no_consensus();&#xD;&#xA;		for evt in evts {&#xD;&#xA;			frame_support::log::info!(&quot;evt={:?}&quot;, evt.event);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;which works BUT it prints: &#xD;&#xA;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;    evt=&lt;wasm:stripped&gt;&#xD;&#xA;&#xD;&#xA;How can I dump the fields of each event so I can understand what events occurred?&#xD;&#xA;&#xD;&#xA;For efficiency, how can I get just the events for the current block?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19234" PostHistoryTypeId="5" PostId="5131" RevisionGUID="71326780-4f05-443d-938d-49a15bab2444" CreationDate="2022-10-03T13:23:32.373" UserId="2909" Comment="added 19 characters in body" Text="(Not financial advice) If your question is about how to bring liquidity from stablecoins like USDT into Polkadot and Kusama ecosystem? Currently it is available with Bitfinex withdrawals to Statemint and Statemine parachains for Polkadot and Kusama ecosystem respectively.&#xD;&#xA;&#xD;&#xA;**1) You withdraw your USDT from an exchange like Bitfinex into Statemint/Statemine**&#xD;&#xA;&#xD;&#xA;See Statemine example:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181634-how-to-withdraw-usdt-from-bitfinex-on-statemine&#xD;&#xA;&#xD;&#xA;See that Statemint (Polkadot) is also now recently available:&#xD;&#xA;https://www.bitfinex.com/posts/840&#xD;&#xA;&#xD;&#xA;**2) You then transfer it across the Polkadot/Kusama ecosystem respectively:**&#xD;&#xA;&#xD;&#xA;See Statemine example:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181118-how-to-transfer-tether-usdt-on-statemine&#xD;&#xA;&#xD;&#xA;FYI on what is Statemint and Statemine:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-" ContentLicense="CC BY-SA 4.0" />
  <row Id="19235" PostHistoryTypeId="33" PostId="5100" RevisionGUID="3582059f-f8ed-4200-b80d-e707a7c17597" CreationDate="2022-10-03T13:50:30.603" UserId="298" Comment="13" />
  <row Id="19236" PostHistoryTypeId="50" PostId="4603" RevisionGUID="03c9da58-9c21-4e3b-9fda-aeb9a253a7f6" CreationDate="2022-10-03T14:01:15.150" UserId="-1" />
  <row Id="19238" PostHistoryTypeId="2" PostId="5139" RevisionGUID="a38663df-5343-4771-bf17-c1b8f5990b9d" CreationDate="2022-10-03T14:34:09.123" UserId="3142" Text="I need to determine whether RPCs are enabled in a OCW.  I am thinking that I could check `rpc_external` and/or `ws_external` in `sc_cli::commands::run_cmd` but (1) is this the best way and (2) if it is, how do I access it?  For the latter, I tried adding `sc-cli` as a `Cargo.toml` dependency but it generated a bunch of errors." ContentLicense="CC BY-SA 4.0" />
  <row Id="19240" PostHistoryTypeId="1" PostId="5139" RevisionGUID="a38663df-5343-4771-bf17-c1b8f5990b9d" CreationDate="2022-10-03T14:34:09.123" UserId="3142" Text="RPC enabled? CLI configuration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19241" PostHistoryTypeId="3" PostId="5139" RevisionGUID="a38663df-5343-4771-bf17-c1b8f5990b9d" CreationDate="2022-10-03T14:34:09.123" UserId="3142" Text="|rpc|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19242" PostHistoryTypeId="2" PostId="5140" RevisionGUID="51fbf8f3-12ef-4de4-8257-d242d10d7954" CreationDate="2022-10-03T14:36:35.363" UserId="3231" Text="I want to loose couple my MultiToken pallet to new Dex pallet, so I created MultiToken trait for interface.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;Here I need Config to infer AccountId and OriginFor types&#xD;&#xA;&#xD;&#xA;In my Dex pallet I need to add this trati in config&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;But I don't really understand what I need to pass in generic of MultiToken&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/PdeJz.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/sg0wx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19244" PostHistoryTypeId="1" PostId="5140" RevisionGUID="51fbf8f3-12ef-4de4-8257-d242d10d7954" CreationDate="2022-10-03T14:36:35.363" UserId="3231" Text="How to loose couple trait with config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19245" PostHistoryTypeId="3" PostId="5140" RevisionGUID="51fbf8f3-12ef-4de4-8257-d242d10d7954" CreationDate="2022-10-03T14:36:35.363" UserId="3231" Text="|pallet|substrate-node-template|frame|loose-coupling|config|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19246" PostHistoryTypeId="5" PostId="5139" RevisionGUID="1b2c19fe-e9bd-40d8-8757-fffa7bced96e" CreationDate="2022-10-03T14:43:13.193" UserId="3142" Comment="added 161 characters in body" Text="I need to determine whether RPCs are enabled in a OCW.  I am thinking that I could check `rpc_external` and/or `ws_external` in `sc_cli::commands::run_cmd` but (1) is this the best way and (2) if it is, how do I access it?  For the latter, I tried adding `sc-cli` as a `Cargo.toml` dependency but it generated a bunch of errors.&#xD;&#xA;&#xD;&#xA;`lib.rs`:&#xD;&#xA;&#xD;&#xA;		if sc_cli::commands::run_cmd::rpc_external {&#xD;&#xA;			frame_support::log::info!(&quot;RPCs enabled&quot;);&#xD;&#xA;		} else {&#xD;&#xA;			frame_support::log::info!(&quot;RPC disabled&quot;);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;`Cargo.toml`:&#xD;&#xA;&#xD;&#xA;    sc-cli = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot;}&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19247" PostHistoryTypeId="2" PostId="5141" RevisionGUID="778746b6-df87-46f4-9e7a-256c8b9e0f6d" CreationDate="2022-10-03T14:44:49.513" UserId="3252" Text="As a developer，I want to use the interface to search this information: which can get the amount which nominator has been rewarded at every era and staking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19249" PostHistoryTypeId="1" PostId="5141" RevisionGUID="778746b6-df87-46f4-9e7a-256c8b9e0f6d" CreationDate="2022-10-03T14:44:49.513" UserId="3252" Text="How could I get that reward amount of the nominator" ContentLicense="CC BY-SA 4.0" />
  <row Id="19250" PostHistoryTypeId="3" PostId="5141" RevisionGUID="778746b6-df87-46f4-9e7a-256c8b9e0f6d" CreationDate="2022-10-03T14:44:49.513" UserId="3252" Text="|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19251" PostHistoryTypeId="6" PostId="5141" RevisionGUID="fae8d1e8-b339-47aa-8f02-9ba3766906ef" CreationDate="2022-10-03T15:26:06.703" UserId="34" Comment="edited tags" Text="|polkadot|staking|pallet-staking|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19252" PostHistoryTypeId="2" PostId="5142" RevisionGUID="4f698a11-8bb0-4333-9999-2474c71e0498" CreationDate="2022-10-03T15:52:13.237" UserId="28" Text="Rather than making your trait generic over `T: Config`, you should make it generic over `AccountId`, and you probably should not include `Origin` anywhere in your interface.&#xD;&#xA;&#xD;&#xA;Then, rather than passing `Self`, you should pass `Self::AccountId` into the generic parameter of the configuration.&#xD;&#xA;&#xD;&#xA;If you posted your text, instead of screenshots, it would be helpful for us to show you the modified code." ContentLicense="CC BY-SA 4.0" />
  <row Id="19259" PostHistoryTypeId="2" PostId="5144" RevisionGUID="12cb2c4e-6602-4c80-b3db-e9e11546850c" CreationDate="2022-10-03T17:32:28.397" UserId="2442" Text="I'm trying to implement the following sequence:&#xD;&#xA;&#xD;&#xA;1. Alice calls extrinsicA&#xD;&#xA;2. extrinsicA calls off-chain worker&#xD;&#xA;3. off-chain worker uses Alice for a signed transaction to call extrinsicB&#xD;&#xA;&#xD;&#xA;And I would like that when Bob does the same call to extrinsicA, it is him that the off-chain worker uses for the signed transaction to call extrinsicB.&#xD;&#xA;&#xD;&#xA;However, I'm hitting a wall because [all accounts suitable to call a signed transaction from off-chain must be &quot;injected&quot;][1]:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    sp_keystore::SyncCryptoStore::sr25519_generate_new(&#xD;&#xA;		&amp;*keystore,&#xD;&#xA;		node_template_runtime::pallet_your_ocw_pallet::KEY_TYPE,&#xD;&#xA;		Some(&quot;//Alice&quot;),&#xD;&#xA;	)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But this is a huge limitation. I would like that both Alice and Bob are able to perform the sequence without knowing in advance that they are going to do it or not.&#xD;&#xA;&#xD;&#xA;Moreover, even if I had all the accounts injected, I'm not understanding how to select the appropriate one to sign the transaction:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let public_key = ???&#xD;&#xA;let signer = Signer::&lt;T, T::AuthorityId&gt;::all_accounts().with_filter(vec![public_key]);&#xD;&#xA;```&#xD;&#xA;I have saved in the indexed storage the `T::AccountId` of the initiator (being Alice or Bob), but I don't see a way to recover the public key out of that.&#xD;&#xA;&#xD;&#xA;* Is it possible to somehow inject the account in the keystore upon call to extrinsicA or it only works at chain bootstrap ?&#xD;&#xA;&#xD;&#xA;* Can I recover an account public key from its `T::AccountId` or is there another way to use `with_filter` to identify the originator of the call to extrinsicA ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-transactions/#sending-signed-transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="19261" PostHistoryTypeId="1" PostId="5144" RevisionGUID="12cb2c4e-6602-4c80-b3db-e9e11546850c" CreationDate="2022-10-03T17:32:28.397" UserId="2442" Text="using any account for offchain worker signed transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="19262" PostHistoryTypeId="3" PostId="5144" RevisionGUID="12cb2c4e-6602-4c80-b3db-e9e11546850c" CreationDate="2022-10-03T17:32:28.397" UserId="2442" Text="|extrinsic|account|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19263" PostHistoryTypeId="2" PostId="5145" RevisionGUID="d7555cdf-8fba-4763-b1eb-9ac7acfff25f" CreationDate="2022-10-03T17:52:05.637" UserId="3262" Text="ı'm trying to compile the smart contract with &quot;cargo +nightly contract build&quot; but it gives this error below. I can't seem to find the answer. Please help me on this matter.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Updating crates.io index&#xD;&#xA;   Compiling flipper v0.1.0 (/private/var/folders/0n/pj5x0p_n66q348m2wdhdm3w00000gn/T/cargo-contract_43QsMb)&#xD;&#xA;error[E0158]: associated consts cannot be referenced in patterns&#xD;&#xA;  --&gt; /Users/arifburakkorkmaz/flipper/lib.rs:8:5&#xD;&#xA;   |&#xD;&#xA;8  | /     /// Defines the storage of your contract.&#xD;&#xA;9  | |     /// Add new fields to the below struct in order&#xD;&#xA;10 | |     /// to add new static storage fields to your contract.&#xD;&#xA;11 | |     #[ink(storage)]&#xD;&#xA;...  |&#xD;&#xA;14 | |         value: bool,&#xD;&#xA;15 | |     }&#xD;&#xA;   | |_____^&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0158`.&#xD;&#xA;error: could not compile `flipper` due to previous error&#xD;&#xA;ERROR: `&quot;/Users/arifburakkorkmaz/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo&quot; &quot;build&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Zbuild-std&quot; &quot;--no-default-features&quot; &quot;--release&quot; &quot;--target-dir=/Users/arifburakkorkmaz/flipper/target/ink&quot; &quot;--features=ink_env/ink-debug&quot;` failed with exit code: Some(101)" ContentLicense="CC BY-SA 4.0" />
  <row Id="19265" PostHistoryTypeId="1" PostId="5145" RevisionGUID="d7555cdf-8fba-4763-b1eb-9ac7acfff25f" CreationDate="2022-10-03T17:52:05.637" UserId="3262" Text="compile smart contract error[E0158]" ContentLicense="CC BY-SA 4.0" />
  <row Id="19266" PostHistoryTypeId="3" PostId="5145" RevisionGUID="d7555cdf-8fba-4763-b1eb-9ac7acfff25f" CreationDate="2022-10-03T17:52:05.637" UserId="3262" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19267" PostHistoryTypeId="5" PostId="5145" RevisionGUID="ae605489-36fe-4e12-80a1-2b76bb7be073" CreationDate="2022-10-03T17:54:46.587" UserId="3262" Comment="added some info" Text="ı'm trying to compile the smart contract with &quot;cargo +nightly contract build&quot; but it gives this error below. Everything is up to date. I can't seem to find the answer. Please help me on this matter. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Updating crates.io index&#xD;&#xA;   Compiling flipper v0.1.0 (/private/var/folders/0n/pj5x0p_n66q348m2wdhdm3w00000gn/T/cargo-contract_43QsMb)&#xD;&#xA;error[E0158]: associated consts cannot be referenced in patterns&#xD;&#xA;  --&gt; /Users/arifburakkorkmaz/flipper/lib.rs:8:5&#xD;&#xA;   |&#xD;&#xA;8  | /     /// Defines the storage of your contract.&#xD;&#xA;9  | |     /// Add new fields to the below struct in order&#xD;&#xA;10 | |     /// to add new static storage fields to your contract.&#xD;&#xA;11 | |     #[ink(storage)]&#xD;&#xA;...  |&#xD;&#xA;14 | |         value: bool,&#xD;&#xA;15 | |     }&#xD;&#xA;   | |_____^&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0158`.&#xD;&#xA;error: could not compile `flipper` due to previous error&#xD;&#xA;ERROR: `&quot;/Users/arifburakkorkmaz/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo&quot; &quot;build&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Zbuild-std&quot; &quot;--no-default-features&quot; &quot;--release&quot; &quot;--target-dir=/Users/arifburakkorkmaz/flipper/target/ink&quot; &quot;--features=ink_env/ink-debug&quot;` failed with exit code: Some(101)" ContentLicense="CC BY-SA 4.0" />
  <row Id="19271" PostHistoryTypeId="5" PostId="5145" RevisionGUID="deff3103-9ee5-48ef-bb29-068425a3e7de" CreationDate="2022-10-03T23:08:04.667" UserId="29" Comment="added 8 characters in body" Text="ı'm trying to compile the smart contract with &quot;cargo +nightly contract build&quot; but it gives this error below. Everything is up to date. I can't seem to find the answer. Please help me on this matter. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Updating crates.io index&#xD;&#xA;   Compiling flipper v0.1.0 (/private/var/folders/0n/pj5x0p_n66q348m2wdhdm3w00000gn/T/cargo-contract_43QsMb)&#xD;&#xA;error[E0158]: associated consts cannot be referenced in patterns&#xD;&#xA;  --&gt; /Users/arifburakkorkmaz/flipper/lib.rs:8:5&#xD;&#xA;   |&#xD;&#xA;8  | /     /// Defines the storage of your contract.&#xD;&#xA;9  | |     /// Add new fields to the below struct in order&#xD;&#xA;10 | |     /// to add new static storage fields to your contract.&#xD;&#xA;11 | |     #[ink(storage)]&#xD;&#xA;...  |&#xD;&#xA;14 | |         value: bool,&#xD;&#xA;15 | |     }&#xD;&#xA;   | |_____^&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0158`.&#xD;&#xA;error: could not compile `flipper` due to previous error&#xD;&#xA;ERROR: `&quot;/Users/arifburakkorkmaz/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo&quot; &quot;build&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Zbuild-std&quot; &quot;--no-default-features&quot; &quot;--release&quot; &quot;--target-dir=/Users/arifburakkorkmaz/flipper/target/ink&quot; &quot;--features=ink_env/ink-debug&quot;` failed with exit code: Some(101)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19272" PostHistoryTypeId="10" PostId="5145" RevisionGUID="a2be8be5-28e8-4167-a095-191f32ee4919" CreationDate="2022-10-04T00:10:41.847" UserId="28" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[4785],&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="19273" PostHistoryTypeId="2" PostId="5147" RevisionGUID="29561fb9-9bc4-423f-b797-0d881726d8f8" CreationDate="2022-10-04T07:33:04.917" UserId="2749" Text="I am working on a Substrate node update.&#xD;&#xA;&#xD;&#xA;I have a [node from Substrate repository][1] that runs on [v0.9.16][2]. When I am executing forkless upgrade to [v0.9.17][3] via [polkadot apps][4] (v0.121.2-89-x) it fails and I can see a transaction status in browser console `&quot;status&quot;:{&quot;invalid&quot;:null}`. I receive the same error if I execute the upgrade programmatically via polkadot/api (v7.15.2-15). &#xD;&#xA;&#xD;&#xA;I’ve checked the node’s logs with debug log level and did not find related errors or warnings.&#xD;&#xA;&#xD;&#xA;If I run the [v0.9.17][3] node in `--dev` mode it works as expected.&#xD;&#xA;&#xD;&#xA;I’ve tried to skip [v0.9.17][3] and update to [v0.9.18][5] and received `1010: Invalid Transaction: Transaction would exhaust the block limits`. To avoid this error I’ve tried to use [sudo.sudoUncheckedWeight][6] but the result is the same. &#xD;&#xA;&#xD;&#xA;Any ideas how can I:&#xD;&#xA;&#xD;&#xA; 1. Identify an issue of invalid status during forkless upgrade execution?&#xD;&#xA; 2. Avoid `1010` error?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/bin/node&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.16&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.17&#xD;&#xA;  [4]: https://polkadot.js.org/apps/#/explorer&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.18&#xD;&#xA;  [6]: https://stackoverflow.com/a/65932003/1694083" ContentLicense="CC BY-SA 4.0" />
  <row Id="19275" PostHistoryTypeId="1" PostId="5147" RevisionGUID="29561fb9-9bc4-423f-b797-0d881726d8f8" CreationDate="2022-10-04T07:33:04.917" UserId="2749" Text="Forkless upgrade from v0.9.16 to v0.9.17 fails" ContentLicense="CC BY-SA 4.0" />
  <row Id="19276" PostHistoryTypeId="3" PostId="5147" RevisionGUID="29561fb9-9bc4-423f-b797-0d881726d8f8" CreationDate="2022-10-04T07:33:04.917" UserId="2749" Text="|substrate-node|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19277" PostHistoryTypeId="5" PostId="5144" RevisionGUID="7bff0adc-0bf4-4ef4-b76f-b59636a439d2" CreationDate="2022-10-04T08:19:12.767" UserId="2442" Comment="added 49 characters in body" Text="I'm trying to implement the following sequence:&#xD;&#xA;&#xD;&#xA;1. Alice calls extrinsicA&#xD;&#xA;2. extrinsicA calls off-chain worker&#xD;&#xA;3. off-chain worker invokes an external service&#xD;&#xA;4. off-chain worker uses Alice for a signed transaction to call extrinsicB&#xD;&#xA;&#xD;&#xA;And I would like that when Bob does the same call to extrinsicA, it is him that the off-chain worker uses for the signed transaction to call extrinsicB.&#xD;&#xA;&#xD;&#xA;However, I'm hitting a wall because [all accounts suitable to call a signed transaction from off-chain must be &quot;injected&quot;][1]:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    sp_keystore::SyncCryptoStore::sr25519_generate_new(&#xD;&#xA;		&amp;*keystore,&#xD;&#xA;		node_template_runtime::pallet_your_ocw_pallet::KEY_TYPE,&#xD;&#xA;		Some(&quot;//Alice&quot;),&#xD;&#xA;	)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But this is a huge limitation. I would like that both Alice and Bob are able to perform the sequence without knowing in advance that they are going to do it or not.&#xD;&#xA;&#xD;&#xA;Moreover, even if I had all the accounts injected, I'm not understanding how to select the appropriate one to sign the transaction:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let public_key = ???&#xD;&#xA;let signer = Signer::&lt;T, T::AuthorityId&gt;::all_accounts().with_filter(vec![public_key]);&#xD;&#xA;```&#xD;&#xA;I have saved in the indexed storage the `T::AccountId` of the initiator (being Alice or Bob), but I don't see a way to recover the public key out of that.&#xD;&#xA;&#xD;&#xA;* Is it possible to somehow inject the account in the keystore upon call to extrinsicA or it only works at chain bootstrap ?&#xD;&#xA;&#xD;&#xA;* Can I recover an account public key from its `T::AccountId` or is there another way to use `with_filter` to identify the originator of the call to extrinsicA ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-transactions/#sending-signed-transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="19278" PostHistoryTypeId="2" PostId="5148" RevisionGUID="ebaf8268-d613-46b5-82fe-0f4ac098bb3b" CreationDate="2022-10-04T09:26:13.630" UserId="179" Text="Let's say that team A has successfully won a parachain slot on a relay chain, and they did so with an account hold by a team member (not a multisig). After some time, this team member decides to leave, and therefore they need to transition ownership of their parachain account somehow to a new key. &#xD;&#xA;&#xD;&#xA;What would the best way for the possible scenarios be?&#xD;&#xA;&#xD;&#xA;1. The former team member is willing to perform some on-chain extrinsic to transfer ownership to a new account. &#xD;&#xA;2. The former team member does not want to do anything.&#xD;&#xA;&#xD;&#xA;On top of this, could the [`swap`](https://github.com/paritytech/polkadot/blob/789ef2fe52b8ca6b71128124b94a0f9e128ef823/runtime/common/src/paras_registrar.rs#L262) function between parachains be used? Team A could get a new paraID owned by a new account, and then they could swap leases to the new paraID? What would happen with the previous state of the original parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19280" PostHistoryTypeId="1" PostId="5148" RevisionGUID="ebaf8268-d613-46b5-82fe-0f4ac098bb3b" CreationDate="2022-10-04T09:26:13.630" UserId="179" Text="How can I transfer ownership of Parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19281" PostHistoryTypeId="3" PostId="5148" RevisionGUID="ebaf8268-d613-46b5-82fe-0f4ac098bb3b" CreationDate="2022-10-04T09:26:13.630" UserId="179" Text="|polkadot|parachain|kusama|paraid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19282" PostHistoryTypeId="5" PostId="5122" RevisionGUID="e3586343-60d0-419a-a867-8f7d45b5c67e" CreationDate="2022-10-04T11:28:25.573" UserId="3247" Comment="added 309 characters in body" Text="for some reason running overhead benchmarks fails in our parachain.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run --release --features=runtime-benchmarks benchmark overhead --chain local&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;results with following stacktrace&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Client(Application(Application(Execution(AbortedDueToTrap(MessageWithBacktrace { message: &quot;wasm trap: wasm `unreachable` instruction executed&quot;, backtrace: Some(Backtrace { backtrace_string: &quot;&#xD;&#xA;    0: 0x3fe0f6 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x664b - &lt;unknown&gt;!core::panicking::panic_fmt::h0a20ba97f16cb738&#xD;&#xA;    2: 0x660c - &lt;unknown&gt;!core::panicking::panic::h20cc6242ae6ad8e6&#xD;&#xA;    3: 0x26732d - &lt;unknown&gt;!&lt;mangata_kusama_runtime::Runtime as sp_block_builder::runtime_decl_for_BlockBuilder::BlockBuilder&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header_ver::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,mangata_kusama_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;mangata_kusama_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;mangata_kusama_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::inherent_extrinsics::heebd5e387a87c636&#xD;&#xA;    4: 0x398ecb - &lt;unknown&gt;!BlockBuilder_inherent_extrinsics&#xD;&#xA;&quot; }) })))))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Backtrace seems to pointing out to [BlockBuilderApi::inherent_extrinsics][1] runtime api call in [BlockBuilder::create_inherents][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	/// Create the inherents for the block.&#xD;&#xA;	///&#xD;&#xA;	/// Returns the inherents created by the runtime or an error if something failed.&#xD;&#xA;	pub fn create_inherents(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		inherent_data: sp_inherents::InherentData,&#xD;&#xA;	) -&gt; Result&lt;Vec&lt;Block::Extrinsic&gt;, Error&gt; {&#xD;&#xA;		let block_id = self.block_id;&#xD;&#xA;		self.api&#xD;&#xA;			.execute_in_transaction(move |api| {&#xD;&#xA;				// `create_inherents` should not change any state, to ensure this we always rollback&#xD;&#xA;				// the transaction.&#xD;&#xA;				TransactionOutcome::Rollback(api.inherent_extrinsics_with_context(&#xD;&#xA;					&amp;block_id,&#xD;&#xA;					ExecutionContext::BlockConstruction,&#xD;&#xA;					inherent_data,&#xD;&#xA;				))&#xD;&#xA;			})&#xD;&#xA;			.map_err(|e| Error::Application(Box::new(e)))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which seems to be very weird because both in [origin substrate runtime][3] and [our runtime][4] is same and depends on macro generated impl of [create_extrinsics][5]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	impl sp_block_builder::BlockBuilder&lt;Block&gt; for Runtime {&#xD;&#xA;		fn inherent_extrinsics(data: InherentData) -&gt; Vec&lt;&lt;Block as BlockT&gt;::Extrinsic&gt; {&#xD;&#xA;			data.create_extrinsics()&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is even more weird when i replace runtime impl of [BlockBuilder::inherent_extrinsics][0] with just some `panic` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;it still produces the same error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  git diff&#xD;&#xA;diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs&#xD;&#xA;index 087ece535..826cf78f5 100644&#xD;&#xA;--- a/runtime/mangata-kusama/src/lib.rs&#xD;&#xA;+++ b/runtime/mangata-kusama/src/lib.rs&#xD;&#xA;@@ -1444,6 +1444,7 @@ impl_runtime_apis! {&#xD;&#xA;                }&#xD;&#xA; &#xD;&#xA;                fn inherent_extrinsics(data: sp_inherents::InherentData) -&gt; Vec&lt;&lt;Block as BlockT&gt;::Extrinsic&gt; {&#xD;&#xA;+                       panic!(&quot;blah blah&quot;);&#xD;&#xA;                        data.create_extrinsics()&#xD;&#xA;                }&#xD;&#xA; &#xD;&#xA;  cargo run --release --features=runtime-benchmarks benchmark overhead --chain local&#xD;&#xA; ...&#xD;&#xA;warning: `mangata-node` (lib) generated 15 warnings&#xD;&#xA;    Finished release [optimized] target(s) in 2.67s&#xD;&#xA;     Running `target/release/mangata-node benchmark overhead --chain local`&#xD;&#xA;Error: Client(Application(Application(Execution(AbortedDueToTrap(MessageWithBacktrace { message: &quot;wasm trap: wasm `unreachable` instruction executed&quot;, backtrace: Some(Backtrace { backtrace_string: &quot;&#xD;&#xA;    0: 0x3fe0f6 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x664b - &lt;unknown&gt;!core::panicking::panic_fmt::h0a20ba97f16cb738&#xD;&#xA;    2: 0x660c - &lt;unknown&gt;!core::panicking::panic::h20cc6242ae6ad8e6&#xD;&#xA;    3: 0x26732d - &lt;unknown&gt;!&lt;mangata_kusama_runtime::Runtime as sp_block_builder::runtime_decl_for_BlockBuilder::BlockBuilder&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header_ver::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,mangata_kusama_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;mangata_kusama_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;mangata_kusama_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::inherent_extrinsics::heebd5e387a87c636&#xD;&#xA;    4: 0x398ecb - &lt;unknown&gt;!BlockBuilder_inherent_extrinsics&#xD;&#xA;&quot; }) })))))&#xD;&#xA;cargo run --release --features=runtime-benchmarks benchmark overhead --chain   16.96s user 1.19s system 417% cpu 4.351 total&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;so it feels like some problem with [sp_inherents::InherentData::create_inherents call][5] but with dispatching of runtime api calls?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**and yes i tried purging local chain data, purging cargo cache etc...**&#xD;&#xA;&#xD;&#xA;&gt;How to reproduce?&#xD;&#xA;```&#xD;&#xA;git clone git@github.com:mangata-finance/mangata-node.git&#xD;&#xA;git checkout 35b5c154fe75f94c611f6e4d7f85e775d56c68ee&#xD;&#xA;cargo run --release --features=runtime-benchmarks benchmark overhead --chain local&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**It works fine when i force wasm method in benchmark config to be `WasmExecutionMethod::Interpreted` instead of `Compiled { instantiation_strategy: PoolingCopyOnWrite } ` but im not sure if its good enough for benchmarking overhead ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/primitives/block-builder/src/lib.rs#L45-L47ill go with interpreter for now to proceed with benchmarks, and try to&#xD;&#xA;  [2]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/client/block-builder/src/lib.rs#L279-L295&#xD;&#xA;  [3]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/bin/node/runtime/src/lib.rs#L1774-L1776&#xD;&#xA;  [4]: https://github.com/mangata-It works fine when i force wasm method in benchmark config to be `WasmExecutionMethod::Interpreted` instead of `Compiled { instantiation_strategy: PoolingCopyOnWrite } ` but im not sure if its good enough for benchmarking overhead ?finance/mangata-node/blob/35b5c154fe75f94c611f6e4d7f85e775d56c68ee/runtime/mangata-kusama/src/lib.rs#L1446-L1448&#xD;&#xA;  [5]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/frame/support/procedural/src/construct_runtime/expand/inherent.rs#L48-L52" ContentLicense="CC BY-SA 4.0" />
  <row Id="19283" PostHistoryTypeId="2" PostId="5149" RevisionGUID="c28acbad-1fbb-417a-865a-2676f35bd073" CreationDate="2022-10-04T11:55:35.373" UserId="94" Text="There is inherent data missing that the `parachain-system` pallet expects.  &#xD;&#xA;It needs to be added in your `inherent_benchmark_data` function which currently only injects timestamp data. The exact inherent data that is needed depends on your chain config.  &#xD;&#xA;Polkadot for example needs the para inherent data for a relay chain, whereas you need the para inherent data for a parachain.   &#xD;&#xA;Running the benchmarks with `--execution native` gets rid of any error stripping that happens in WASM.  &#xD;&#xA;If you add the changes below it will error on the next missing inherent data `Could not find AuRa author index`. So you also need to inject inherent data for Aura.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Generates inherent data for the `benchmark overhead` command.&#xD;&#xA;pub fn inherent_benchmark_data() -&gt; Result&lt;InherentData&gt; {&#xD;&#xA;	let mut inherent_data = InherentData::new();&#xD;&#xA;	let d = Duration::from_millis(0);&#xD;&#xA;	let timestamp = sp_timestamp::InherentDataProvider::new(d.into());&#xD;&#xA;&#xD;&#xA;	timestamp&#xD;&#xA;		.provide_inherent_data(&amp;mut inherent_data)&#xD;&#xA;		.map_err(|e| format!(&quot;creating inherent data: {:?}&quot;, e))?;&#xD;&#xA;&#xD;&#xA;	// ADDED&#xD;&#xA;	let mock_para_inherent_provider = cumulus_primitives_parachain_inherent::MockValidationDataInherentDataProvider {&#xD;&#xA;		current_para_block: 0,&#xD;&#xA;		relay_offset: 0,&#xD;&#xA;		relay_blocks_per_para_block: 2,&#xD;&#xA;		xcm_config: Default::default(),&#xD;&#xA;		raw_downward_messages: Default::default(),&#xD;&#xA;		raw_horizontal_messages: Default::default(),&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	mock_para_inherent_provider.provide_inherent_data(&amp;mut inherent_data).expect(&quot;Mock must provide inherent data; qed&quot;);&#xD;&#xA;	// END ADDED&#xD;&#xA;&#xD;&#xA;	Ok(inherent_data)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19285" PostHistoryTypeId="5" PostId="5149" RevisionGUID="ecee521b-4164-4557-879a-90ce7f2ede9b" CreationDate="2022-10-04T12:03:18.867" UserId="94" Comment="added 49 characters in body" Text="There is inherent data missing that the `parachain-system` pallet expects.  &#xD;&#xA;It needs to be added in your `inherent_benchmark_data` function which currently only injects timestamp data. The exact inherent data that is needed depends on your chain config.  &#xD;&#xA;Polkadot for example needs the para inherent data for a relay chain, whereas you need the para inherent data for a parachain.   &#xD;&#xA;Running the benchmarks with `--execution native` gets rid of any error stripping that happens in WASM.  &#xD;&#xA;If you add the changes below it will error on the next missing inherent data `Could not find AuRa author index`. So you also need to inject inherent data or [a pre-runtime digest](https://github.com/paritytech/substrate/pull/12159) for Aura, not sure which of those.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Generates inherent data for the `benchmark overhead` command.&#xD;&#xA;pub fn inherent_benchmark_data() -&gt; Result&lt;InherentData&gt; {&#xD;&#xA;	let mut inherent_data = InherentData::new();&#xD;&#xA;	let d = Duration::from_millis(0);&#xD;&#xA;	let timestamp = sp_timestamp::InherentDataProvider::new(d.into());&#xD;&#xA;&#xD;&#xA;	timestamp&#xD;&#xA;		.provide_inherent_data(&amp;mut inherent_data)&#xD;&#xA;		.map_err(|e| format!(&quot;creating inherent data: {:?}&quot;, e))?;&#xD;&#xA;&#xD;&#xA;	// ADDED&#xD;&#xA;	let mock_para_inherent_provider = cumulus_primitives_parachain_inherent::MockValidationDataInherentDataProvider {&#xD;&#xA;		current_para_block: 0,&#xD;&#xA;		relay_offset: 0,&#xD;&#xA;		relay_blocks_per_para_block: 2,&#xD;&#xA;		xcm_config: Default::default(),&#xD;&#xA;		raw_downward_messages: Default::default(),&#xD;&#xA;		raw_horizontal_messages: Default::default(),&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	mock_para_inherent_provider.provide_inherent_data(&amp;mut inherent_data).expect(&quot;Mock must provide inherent data; qed&quot;);&#xD;&#xA;	// END ADDED&#xD;&#xA;&#xD;&#xA;	Ok(inherent_data)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19286" PostHistoryTypeId="2" PostId="5150" RevisionGUID="2356569c-e3da-4d9b-a266-b189d28047a4" CreationDate="2022-10-04T12:49:45.747" UserId="167" Text="Probably what you are looking for is to inspect the `Rewarded` event and find the one that corresponds to your nominator of choice. Some useful links to docs/tools: &#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/pallet_staking/enum.Event.html#variant.Rewarded&#xD;&#xA;https://polkadot.js.org/docs/substrate/events#rewardedaccountid32-u128&#xD;&#xA;https://polkadot.subscan.io/event?address=&amp;module=staking&amp;event=rewarded&amp;startDate=&amp;endDate=&amp;startBlock=&amp;endBlock=&amp;timeType=date&amp;version=9281" ContentLicense="CC BY-SA 4.0" />
  <row Id="19288" PostHistoryTypeId="2" PostId="5151" RevisionGUID="04228772-e260-4e27-aaf3-d4b70a08979d" CreationDate="2022-10-04T13:27:30.337" UserId="406" Text="There is a condition in the substrate for the validators like if the validator misbehaves for example if the validator goes to offline than the stake of the validator will be slash, I setup a network of 5/5 and add one more validator and it goes to active state, after that i stopped the validator node and everything is working fine there is an event which show the offence of the offline validator but the stake of the validator not goes to slash [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8nVZ2.png&#xD;&#xA;&#xD;&#xA;So, how can I slash the validator stake" ContentLicense="CC BY-SA 4.0" />
  <row Id="19290" PostHistoryTypeId="1" PostId="5151" RevisionGUID="04228772-e260-4e27-aaf3-d4b70a08979d" CreationDate="2022-10-04T13:27:30.337" UserId="406" Text="No slash after the validator is offline" ContentLicense="CC BY-SA 4.0" />
  <row Id="19291" PostHistoryTypeId="3" PostId="5151" RevisionGUID="04228772-e260-4e27-aaf3-d4b70a08979d" CreationDate="2022-10-04T13:27:30.337" UserId="406" Text="|substrate-node|polkadot|rust|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19292" PostHistoryTypeId="2" PostId="5152" RevisionGUID="c5b26b32-91fd-4228-bc41-84a34cddb951" CreationDate="2022-10-04T15:33:06.487" UserId="3231" Text="I want to create dex pallet(without using pallet-contracts) with functionality like uniswap with pools of liquidity, this dex gonna work with my multi-token-pallet. So now I'm thinking about how to propperly implement that. So for exmple every pool of liquidity will be some struct in double storrage map, in my multi-token-pallet tokens are associated with AccountId but how can I transfer them to dex pallet, does it have AccountId? Maybe I can create fake signed accounts to deal with multi-token-pallet? Can somone give some ideas how to implement that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19294" PostHistoryTypeId="1" PostId="5152" RevisionGUID="c5b26b32-91fd-4228-bc41-84a34cddb951" CreationDate="2022-10-04T15:33:06.487" UserId="3231" Text="How to create dex pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19295" PostHistoryTypeId="3" PostId="5152" RevisionGUID="c5b26b32-91fd-4228-bc41-84a34cddb951" CreationDate="2022-10-04T15:33:06.487" UserId="3231" Text="|pallet|substrate-node-template|frame|token|loose-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19296" PostHistoryTypeId="5" PostId="5122" RevisionGUID="7740469a-f221-412e-9a93-e0068b529fe4" CreationDate="2022-10-04T15:39:45.090" UserId="2673" Comment="Rust syntax highlighting" Text="for some reason running overhead benchmarks fails in our parachain.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run --release --features=runtime-benchmarks benchmark overhead --chain local&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;results with following stacktrace&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Client(Application(Application(Execution(AbortedDueToTrap(MessageWithBacktrace { message: &quot;wasm trap: wasm `unreachable` instruction executed&quot;, backtrace: Some(Backtrace { backtrace_string: &quot;&#xD;&#xA;    0: 0x3fe0f6 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x664b - &lt;unknown&gt;!core::panicking::panic_fmt::h0a20ba97f16cb738&#xD;&#xA;    2: 0x660c - &lt;unknown&gt;!core::panicking::panic::h20cc6242ae6ad8e6&#xD;&#xA;    3: 0x26732d - &lt;unknown&gt;!&lt;mangata_kusama_runtime::Runtime as sp_block_builder::runtime_decl_for_BlockBuilder::BlockBuilder&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header_ver::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,mangata_kusama_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;mangata_kusama_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;mangata_kusama_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::inherent_extrinsics::heebd5e387a87c636&#xD;&#xA;    4: 0x398ecb - &lt;unknown&gt;!BlockBuilder_inherent_extrinsics&#xD;&#xA;&quot; }) })))))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Backtrace seems to pointing out to [BlockBuilderApi::inherent_extrinsics][1] runtime api call in [BlockBuilder::create_inherents][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	/// Create the inherents for the block.&#xD;&#xA;	///&#xD;&#xA;	/// Returns the inherents created by the runtime or an error if something failed.&#xD;&#xA;	pub fn create_inherents(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		inherent_data: sp_inherents::InherentData,&#xD;&#xA;	) -&gt; Result&lt;Vec&lt;Block::Extrinsic&gt;, Error&gt; {&#xD;&#xA;		let block_id = self.block_id;&#xD;&#xA;		self.api&#xD;&#xA;			.execute_in_transaction(move |api| {&#xD;&#xA;				// `create_inherents` should not change any state, to ensure this we always rollback&#xD;&#xA;				// the transaction.&#xD;&#xA;				TransactionOutcome::Rollback(api.inherent_extrinsics_with_context(&#xD;&#xA;					&amp;block_id,&#xD;&#xA;					ExecutionContext::BlockConstruction,&#xD;&#xA;					inherent_data,&#xD;&#xA;				))&#xD;&#xA;			})&#xD;&#xA;			.map_err(|e| Error::Application(Box::new(e)))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which seems to be very weird because both in [origin substrate runtime][3] and [our runtime][4] is same and depends on macro generated impl of [create_extrinsics][5]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	impl sp_block_builder::BlockBuilder&lt;Block&gt; for Runtime {&#xD;&#xA;		fn inherent_extrinsics(data: InherentData) -&gt; Vec&lt;&lt;Block as BlockT&gt;::Extrinsic&gt; {&#xD;&#xA;			data.create_extrinsics()&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is even more weird when i replace runtime impl of [BlockBuilder::inherent_extrinsics][0] with just some `panic` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;it still produces the same error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  git diff&#xD;&#xA;diff --git a/runtime/mangata-kusama/src/lib.rs b/runtime/mangata-kusama/src/lib.rs&#xD;&#xA;index 087ece535..826cf78f5 100644&#xD;&#xA;--- a/runtime/mangata-kusama/src/lib.rs&#xD;&#xA;+++ b/runtime/mangata-kusama/src/lib.rs&#xD;&#xA;@@ -1444,6 +1444,7 @@ impl_runtime_apis! {&#xD;&#xA;                }&#xD;&#xA; &#xD;&#xA;                fn inherent_extrinsics(data: sp_inherents::InherentData) -&gt; Vec&lt;&lt;Block as BlockT&gt;::Extrinsic&gt; {&#xD;&#xA;+                       panic!(&quot;blah blah&quot;);&#xD;&#xA;                        data.create_extrinsics()&#xD;&#xA;                }&#xD;&#xA; &#xD;&#xA;  cargo run --release --features=runtime-benchmarks benchmark overhead --chain local&#xD;&#xA; ...&#xD;&#xA;warning: `mangata-node` (lib) generated 15 warnings&#xD;&#xA;    Finished release [optimized] target(s) in 2.67s&#xD;&#xA;     Running `target/release/mangata-node benchmark overhead --chain local`&#xD;&#xA;Error: Client(Application(Application(Execution(AbortedDueToTrap(MessageWithBacktrace { message: &quot;wasm trap: wasm `unreachable` instruction executed&quot;, backtrace: Some(Backtrace { backtrace_string: &quot;&#xD;&#xA;    0: 0x3fe0f6 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x664b - &lt;unknown&gt;!core::panicking::panic_fmt::h0a20ba97f16cb738&#xD;&#xA;    2: 0x660c - &lt;unknown&gt;!core::panicking::panic::h20cc6242ae6ad8e6&#xD;&#xA;    3: 0x26732d - &lt;unknown&gt;!&lt;mangata_kusama_runtime::Runtime as sp_block_builder::runtime_decl_for_BlockBuilder::BlockBuilder&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header_ver::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,mangata_kusama_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;mangata_kusama_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;mangata_kusama_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;mangata_kusama_runtime::Runtime&gt;)&gt;&gt;&gt;&gt;::inherent_extrinsics::heebd5e387a87c636&#xD;&#xA;    4: 0x398ecb - &lt;unknown&gt;!BlockBuilder_inherent_extrinsics&#xD;&#xA;&quot; }) })))))&#xD;&#xA;cargo run --release --features=runtime-benchmarks benchmark overhead --chain   16.96s user 1.19s system 417% cpu 4.351 total&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;so it feels like some problem with [sp_inherents::InherentData::create_inherents call][5] but with dispatching of runtime api calls?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**and yes i tried purging local chain data, purging cargo cache etc...**&#xD;&#xA;&#xD;&#xA;&gt;How to reproduce?&#xD;&#xA;```&#xD;&#xA;git clone git@github.com:mangata-finance/mangata-node.git&#xD;&#xA;git checkout 35b5c154fe75f94c611f6e4d7f85e775d56c68ee&#xD;&#xA;cargo run --release --features=runtime-benchmarks benchmark overhead --chain local&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**It works fine when i force wasm method in benchmark config to be `WasmExecutionMethod::Interpreted` instead of `Compiled { instantiation_strategy: PoolingCopyOnWrite } ` but im not sure if its good enough for benchmarking overhead ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/primitives/block-builder/src/lib.rs#L45-L47ill go with interpreter for now to proceed with benchmarks, and try to&#xD;&#xA;  [2]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/client/block-builder/src/lib.rs#L279-L295&#xD;&#xA;  [3]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/bin/node/runtime/src/lib.rs#L1774-L1776&#xD;&#xA;  [4]: https://github.com/mangata-It works fine when i force wasm method in benchmark config to be `WasmExecutionMethod::Interpreted` instead of `Compiled { instantiation_strategy: PoolingCopyOnWrite } ` but im not sure if its good enough for benchmarking overhead ?finance/mangata-node/blob/35b5c154fe75f94c611f6e4d7f85e775d56c68ee/runtime/mangata-kusama/src/lib.rs#L1446-L1448&#xD;&#xA;  [5]: https://github.com/mangata-finance/substrate/blob/73c58904ba958bc9596e7a4624bf8c2afd99f111/frame/support/procedural/src/construct_runtime/expand/inherent.rs#L48-L52" ContentLicense="CC BY-SA 4.0" />
  <row Id="19297" PostHistoryTypeId="24" PostId="5122" RevisionGUID="7740469a-f221-412e-9a93-e0068b529fe4" CreationDate="2022-10-04T15:39:45.090" Comment="Proposed by 2673 approved by 34 edit id of 296" ContentLicense="CC BY-SA 4.0" />
  <row Id="19298" PostHistoryTypeId="2" PostId="5153" RevisionGUID="d96f8722-82c4-4170-986b-19d7c60cad2f" CreationDate="2022-10-04T18:37:29.543" UserId="555" Text="I want to start a function automatically after a certain Period of time in our chain. How can I do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19300" PostHistoryTypeId="1" PostId="5153" RevisionGUID="d96f8722-82c4-4170-986b-19d7c60cad2f" CreationDate="2022-10-04T18:37:29.543" UserId="555" Text="How to start a function automatically after certain period of time?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19301" PostHistoryTypeId="3" PostId="5153" RevisionGUID="d96f8722-82c4-4170-986b-19d7c60cad2f" CreationDate="2022-10-04T18:37:29.543" UserId="555" Text="|substrate-node|pallet|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19303" PostHistoryTypeId="2" PostId="5154" RevisionGUID="9c527835-b9ac-4464-a4a1-90cedf211a2b" CreationDate="2022-10-04T19:12:20.383" UserId="452" Text="The default behavior is to only slash if more than 10% of the validators are offline (https://github.com/paritytech/substrate/blob/master/frame/im-online/src/lib.rs#L961-L971). The validator will be kicked out of the validator set in all cases." ContentLicense="CC BY-SA 4.0" />
  <row Id="19305" PostHistoryTypeId="2" PostId="5155" RevisionGUID="24d026f3-a124-45c7-9ddb-b2efab0b453e" CreationDate="2022-10-04T19:13:02.527" UserId="73" Text="You could use the `pallet-scheduler`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet_scheduler::Pallet::&lt;T&gt;::schedule(&#xD;&#xA;     Origin::root(), // Depending on what you have configured as `ScheduleOrigin` in the runtime for scheduler&#xD;&#xA;     when,&#xD;&#xA;     None, // or Some if it should be periodic&#xD;&#xA;     priority,&#xD;&#xA;     Box::new(Call::Whatever {}), // The actual call that should be scheduled&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can also program this on your own using `on_initialize`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn on_initialize(now: T::BlockNumber) -&gt; Weight {&#xD;&#xA;    if now == expected_number {&#xD;&#xA;        // do whatever you want to do.&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19307" PostHistoryTypeId="2" PostId="5156" RevisionGUID="de69b714-d5ab-401a-ac87-1907d5564728" CreationDate="2022-10-04T19:15:14.810" UserId="94" Text="There exists the `scheduler` pallet which archives this. The downside is that only the `ScheduleOrigin` may schedule calls. But your question does not state who should be able to schedule calls.  &#xD;&#xA;The signature looks like this:  &#xD;&#xA;```rust&#xD;&#xA;pub fn schedule(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	when: T::BlockNumber,&#xD;&#xA;	maybe_periodic: Option&lt;schedule::Period&lt;T::BlockNumber&gt;&gt;,&#xD;&#xA;	priority: schedule::Priority,&#xD;&#xA;	call: Box&lt;CallOrHashOf&lt;T&gt;&gt;,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;```&#xD;&#xA;The call may be executed by the scheduler at any block after `when`, giving no guarantees *if* it ever happens. Reasons for non-execution could be full blocks, full schedules or an over-weight call. On successful execution a `Dispatched` event will be emitted for your convenience.&#xD;&#xA;&#xD;&#xA;Usage in tests looks like this:  &#xD;&#xA;```rust&#xD;&#xA;// Some example call to be scheduled.&#xD;&#xA;let call = Box::new(RuntimeCall::Logger(LoggerCall::log {&#xD;&#xA;	i: 69,&#xD;&#xA;	weight: Weight::from_ref_time(10),&#xD;&#xA;}));&#xD;&#xA;assert_ok!(Scheduler::schedule(RuntimeOrigin::root(), 4, None, 127, call));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Another way would be to write a pallet and utilize its `on_initialize`/`on_idle` hooks. In these hooks you can then check the block number and run a specific task. The `scheduler` uses the same mechanism." ContentLicense="CC BY-SA 4.0" />
  <row Id="19309" PostHistoryTypeId="2" PostId="5157" RevisionGUID="66957a2c-33bd-4351-8e94-96fe6c87da3f" CreationDate="2022-10-04T19:19:13.590" UserId="29" Text="Like @bkchr mentioned, you can use `on_initialize` hook. &#xD;&#xA;Here is a concrete example in the treasury pallet:&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;	impl&lt;T: Config&lt;I&gt;, I: 'static&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T, I&gt; {&#xD;&#xA;		fn on_initialize(n: T::BlockNumber) -&gt; Weight {&#xD;&#xA;			// Check to see if we should spend some funds!&#xD;&#xA;			if (n % T::SpendPeriod::get()).is_zero() {&#xD;&#xA;				Self::spend_funds()&#xD;&#xA;			} else {&#xD;&#xA;				Weight::zero()&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/d11dd02dda6a00800a13cd59a0c2f07ac75e082d/frame/treasury/src/lib.rs#L309-L326&#xD;&#xA;&#xD;&#xA;`spend_funds()` is only called on the `T::SpendPeriod::get()` - which in Polkadot's case, is every 24 days." ContentLicense="CC BY-SA 4.0" />
  <row Id="19311" PostHistoryTypeId="2" PostId="5158" RevisionGUID="66083bf6-1b30-447c-a454-228d600ebd94" CreationDate="2022-10-04T19:27:42.200" UserId="351" Text="A clear explanation will be appreciated as to why Decode trait is not implemented while encode is. What are the design reason for this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19313" PostHistoryTypeId="1" PostId="5158" RevisionGUID="66083bf6-1b30-447c-a454-228d600ebd94" CreationDate="2022-10-04T19:27:42.200" UserId="351" Text="Why BoundedVec does not implement a Decode trait" ContentLicense="CC BY-SA 4.0" />
  <row Id="19314" PostHistoryTypeId="3" PostId="5158" RevisionGUID="66083bf6-1b30-447c-a454-228d600ebd94" CreationDate="2022-10-04T19:27:42.200" UserId="351" Text="|runtime|boundedvec|trait|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19315" PostHistoryTypeId="2" PostId="5159" RevisionGUID="b26a169c-be84-4b6c-8936-9b77bd8754ce" CreationDate="2022-10-04T19:39:51.453" UserId="94" Text="What? It is definetly decodable. Code from [here](https://github.com/paritytech/substrate/blob/91d072df4273bbc04f8152099b23a66a0c1d531b/primitives/core/src/bounded/bounded_vec.rs#L279):  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Decode, S: Get&lt;u32&gt;&gt; Decode for BoundedVec&lt;T, S&gt; {&#xD;&#xA;	fn decode&lt;I: codec::Input&gt;(input: &amp;mut I) -&gt; Result&lt;Self, codec::Error&gt; {&#xD;&#xA;		let inner = Vec::&lt;T&gt;::decode(input)?;&#xD;&#xA;		if inner.len() &gt; S::get() as usize {&#xD;&#xA;			return Err(&quot;BoundedVec exceeds its limit&quot;.into())&#xD;&#xA;		}&#xD;&#xA;		Ok(Self(inner, PhantomData))&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn skip&lt;I: codec::Input&gt;(input: &amp;mut I) -&gt; Result&lt;(), codec::Error&gt; {&#xD;&#xA;		Vec::&lt;T&gt;::skip(input)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and a small test:  &#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn encode_decode_works() {&#xD;&#xA;	let bounded: BoundedVec&lt;u32, ConstU32&lt;7&gt;&gt; = bounded_vec![1, 2, 3, 4, 5, 6];&#xD;&#xA;	let encoded = bounded.encode();&#xD;&#xA;	let decoded: BoundedVec&lt;u32, ConstU32&lt;7&gt;&gt; = Decode::decode(&amp;mut &amp;encoded[..]).unwrap();&#xD;&#xA;&#xD;&#xA;	assert_eq!(bounded, decoded);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19317" PostHistoryTypeId="2" PostId="5160" RevisionGUID="5e1beb67-c653-4d10-9a90-d4aab2c018e1" CreationDate="2022-10-04T20:00:15.603" UserId="73" Text="You can send:&#xD;&#xA;```&#xD;&#xA;Initializer::ForceApprove(Root, HighestBlock)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Send this as transaction to the chain and it should start finalizing." ContentLicense="CC BY-SA 4.0" />
  <row Id="19319" PostHistoryTypeId="2" PostId="5161" RevisionGUID="60cf9854-2ddc-468c-b49c-5712d53737e2" CreationDate="2022-10-04T20:37:11.190" UserId="2484" Text="Hey valuable Substrate pros,&#xD;&#xA;&#xD;&#xA;do you know a way to use `impl_benchmark_test_suite` inside another crate like the runtime? I have multiple pallets. There are no mocks inside these pallets. There is only one runtime mock in my project. Since `impl_benchmark_test_suite` needs the mock, I would like to find a way to call the benchmark tests in an outer crate like the runtime.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benchmark_tests {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_benchmarking::impl_benchmark_test_suite;&#xD;&#xA;&#xD;&#xA;	impl_benchmark_test_suite!(&#xD;&#xA;		my_pallet_1::Pallet,&#xD;&#xA;		crate::mock::ExtBuilder::default().build(),&#xD;&#xA;		crate::mock::Test,&#xD;&#xA;		benchmarks_path = my_pallet_1::benchmarking,&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	impl_benchmark_test_suite!(&#xD;&#xA;		my_pallet_2::Pallet,&#xD;&#xA;		crate::mock::ExtBuilder::default().build(),&#xD;&#xA;		crate::mock::Test,&#xD;&#xA;		benchmarks_path = my_pallet_2::benchmarking,&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	impl_benchmark_test_suite!(&#xD;&#xA;		my_pallet_3::Pallet,&#xD;&#xA;		crate::mock::ExtBuilder::default().build(),&#xD;&#xA;		crate::mock::Test,&#xD;&#xA;		benchmarks_path = my_pallet_3::benchmarking,&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This produces that error:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;error: no rules expected the token `::`&#xD;&#xA;&#xD;&#xA;my_pallet_1::Pallet&#xD;&#xA;&#xD;&#xA;no rules expected this token in macro call&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19321" PostHistoryTypeId="1" PostId="5161" RevisionGUID="60cf9854-2ddc-468c-b49c-5712d53737e2" CreationDate="2022-10-04T20:37:11.190" UserId="2484" Text="How to test benchmarks in the runtime crate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19322" PostHistoryTypeId="3" PostId="5161" RevisionGUID="60cf9854-2ddc-468c-b49c-5712d53737e2" CreationDate="2022-10-04T20:37:11.190" UserId="2484" Text="|pallet|runtime|benchmarking|testing|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19323" PostHistoryTypeId="5" PostId="5161" RevisionGUID="fd2487a0-0c65-426b-98f8-66f30b072cbd" CreationDate="2022-10-04T20:58:13.870" UserId="2484" Comment="added 772 characters in body" Text="Hey valuable Substrate pros,&#xD;&#xA;&#xD;&#xA;do you know a way to use `impl_benchmark_test_suite` inside another crate like the runtime? I have multiple pallets. There are no mocks inside these pallets. There is only one runtime mock in my project. Since `impl_benchmark_test_suite` needs the mock, I would like to find a way to call the benchmark tests in an outer crate like the runtime.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benchmark_tests {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_benchmarking::impl_benchmark_test_suite;&#xD;&#xA;&#xD;&#xA;	impl_benchmark_test_suite!(&#xD;&#xA;		my_pallet_1::Pallet,&#xD;&#xA;		crate::mock::ExtBuilder::default().build(),&#xD;&#xA;		crate::mock::Test,&#xD;&#xA;		benchmarks_path = my_pallet_1::benchmarking,&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	impl_benchmark_test_suite!(&#xD;&#xA;		my_pallet_2::Pallet,&#xD;&#xA;		crate::mock::ExtBuilder::default().build(),&#xD;&#xA;		crate::mock::Test,&#xD;&#xA;		benchmarks_path = my_pallet_2::benchmarking,&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	impl_benchmark_test_suite!(&#xD;&#xA;		my_pallet_3::Pallet,&#xD;&#xA;		crate::mock::ExtBuilder::default().build(),&#xD;&#xA;		crate::mock::Test,&#xD;&#xA;		benchmarks_path = my_pallet_3::benchmarking,&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This produces that error:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;error: no rules expected the token `::`&#xD;&#xA;&#xD;&#xA;my_pallet_1::Pallet&#xD;&#xA;&#xD;&#xA;no rules expected this token in macro call&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Trying to use the benchmark test module inside the mock of the runtime:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benchmark_tests {&#xD;&#xA;    use frame_benchmarking::impl_benchmark_test_suite;&#xD;&#xA;&#xD;&#xA;	use my_pallet::Pallet;&#xD;&#xA;&#xD;&#xA;    impl_benchmark_test_suite!(&#xD;&#xA;        Pallet,&#xD;&#xA;        ExtBuilder::default().build(),&#xD;&#xA;        Test,&#xD;&#xA;        benchmarks_path = my_pallet::benchmarking,&#xD;&#xA;    );&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This produces this error:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;error: no rules expected the token `)`&#xD;&#xA;375 | /     impl_benchmark_test_suite!(&#xD;&#xA;376 | |         Pallet,&#xD;&#xA;377 | |         ExtBuilder::default().build(),&#xD;&#xA;378 | |         Test,&#xD;&#xA;379 | |         benchmarks_path = my_pallet::benchmarking,&#xD;&#xA;380 | |     );&#xD;&#xA;    | |_____^ no rules expected this token in macro call&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19324" PostHistoryTypeId="2" PostId="5162" RevisionGUID="762f2c40-1d8c-4037-b224-307958d58289" CreationDate="2022-10-04T21:49:59.310" UserId="703" Text="[Adam Wierzbicki][1] has created just this. It is based on Uniswap V1. You can find his pallet here: [https://github.com/Wiezzel/substrate-dex][2]. &#xD;&#xA;&#xD;&#xA;The pallet is not production ready, but is very useful for learning. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/users/2673/adam-wierzbicki&#xD;&#xA;  [2]: https://github.com/Wiezzel/substrate-dex" ContentLicense="CC BY-SA 4.0" />
  <row Id="19326" PostHistoryTypeId="10" PostId="5152" RevisionGUID="6d00c23e-2f12-4722-8ef6-d186b2ed2a14" CreationDate="2022-10-04T22:38:33.247" UserId="28" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="19327" PostHistoryTypeId="2" PostId="5163" RevisionGUID="b337fd40-2a8a-4dc2-be47-717af6ada28b" CreationDate="2022-10-04T22:39:22.740" UserId="3140" Text="I'm running substrate-contracts-node locally with `--dev` (instant seals). I created a custom react hook to wrap events, but it never gets finalized. Am I doing something wrong, is there a caveat in using instant seals?&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;type Status = 'pending' | 'finalized' | 'none';&#xD;&#xA;&#xD;&#xA;type Response = {&#xD;&#xA;  send: () =&gt; void;&#xD;&#xA;  events: EventRecord[];&#xD;&#xA;  status: Status;&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;export const useExecuteFunc = (): Response =&gt; {&#xD;&#xA;  const game = useGameContract();&#xD;&#xA;  const { activeAccount, activeSigner } = useInk();&#xD;&#xA;  const [pixels, setPixels] = useState&lt;EventRecord[]&gt;([]);&#xD;&#xA;  const [status, setStatus] = useState&lt;Status&gt;('none');&#xD;&#xA;&#xD;&#xA;  const send = useMemo(() =&gt; {&#xD;&#xA;    return async () =&gt; {&#xD;&#xA;      if (!activeAccount || !game || !activeSigner) return () =&gt; null;&#xD;&#xA;&#xD;&#xA;      const unsub = await game.tx&#xD;&#xA;        .executeTurns({&#xD;&#xA;          gasLimit: -1,&#xD;&#xA;        })&#xD;&#xA;        .signAndSend(activeAccount?.address, { signer: activeSigner.signer }, async (result) =&gt; {&#xD;&#xA;          console.log('result', result);&#xD;&#xA;&#xD;&#xA;          if (result.status.isInBlock) {&#xD;&#xA;            console.log('status is pending');&#xD;&#xA;            setStatus('pending');&#xD;&#xA;          } else if (result.status.isFinalized) {&#xD;&#xA;            console.log('status is finalized');&#xD;&#xA;            setStatus('finalized');&#xD;&#xA;            unsub();&#xD;&#xA;          }&#xD;&#xA;        });&#xD;&#xA;    };&#xD;&#xA;  }, [activeAccount, activeSigner, game]);&#xD;&#xA;&#xD;&#xA;  return {&#xD;&#xA;    send,&#xD;&#xA;    events: pixels,&#xD;&#xA;    status,&#xD;&#xA;  };&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I then use this like this:&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;const executeGameFunc = useExecuteGameFunc()&#xD;&#xA;&#xD;&#xA;// ...&#xD;&#xA;&#xD;&#xA;&lt;button onClick={() =&gt; executeGameFunc.send()}&gt;Play Game&lt;/button&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;polkadotjs explorer shows that the transaction was successful." ContentLicense="CC BY-SA 4.0" />
  <row Id="19329" PostHistoryTypeId="1" PostId="5163" RevisionGUID="b337fd40-2a8a-4dc2-be47-717af6ada28b" CreationDate="2022-10-04T22:39:22.740" UserId="3140" Text="Contract transactions do not resolve as finalized in ContractPromise" ContentLicense="CC BY-SA 4.0" />
  <row Id="19330" PostHistoryTypeId="3" PostId="5163" RevisionGUID="b337fd40-2a8a-4dc2-be47-717af6ada28b" CreationDate="2022-10-04T22:39:22.740" UserId="3140" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19335" PostHistoryTypeId="52" PostId="5153" RevisionGUID="3d5cdea0-b20a-4193-82b7-29c37e4fa12a" CreationDate="2022-10-05T02:42:24.247" />
  <row Id="19336" PostHistoryTypeId="50" PostId="4617" RevisionGUID="82506135-9b34-4996-b5aa-12c68f644515" CreationDate="2022-10-05T04:08:20.940" UserId="-1" />
  <row Id="19337" PostHistoryTypeId="4" PostId="5128" RevisionGUID="c052fd12-cbad-49cb-9068-05f4634cd1bb" CreationDate="2022-10-05T05:09:37.813" UserId="283" Comment="edited title" Text="Can you register parachains with custom code on Rococo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19338" PostHistoryTypeId="2" PostId="5165" RevisionGUID="5f4cb498-2eb2-4331-9791-3cdb1e640766" CreationDate="2022-10-05T05:20:24.037" UserId="3252" Text="Why i search the exposures.others.length not same as the expore show ? exposures.others.length=302 but the the expore show 342 ?Should i use currentEra or activeEra?&#xD;&#xA;&#xD;&#xA;const activeEra = (await api.query.staking.activeEra()).unwrap();//获取当前活跃的纪元&#xD;&#xA;const exposures = await api.query.staking.erasStakers.at(blockHash,activeEra.index, address);&#xD;&#xA;&#xD;&#xA;or  &#xD;&#xA;&#xD;&#xA;const lastEra = (await api.query.staking.currentEra()).unwrap();//获取当前最新的纪元&#xD;&#xA;const exposures = await api.query.staking.erasStakers.at(blockHash,lastEra, address);&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19340" PostHistoryTypeId="1" PostId="5165" RevisionGUID="5f4cb498-2eb2-4331-9791-3cdb1e640766" CreationDate="2022-10-05T05:20:24.037" UserId="3252" Text="What is the difference between currentEra and activeEra" ContentLicense="CC BY-SA 4.0" />
  <row Id="19341" PostHistoryTypeId="3" PostId="5165" RevisionGUID="5f4cb498-2eb2-4331-9791-3cdb1e640766" CreationDate="2022-10-05T05:20:24.037" UserId="3252" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19342" PostHistoryTypeId="2" PostId="5166" RevisionGUID="fcb96402-4bd0-4963-9305-c482352df332" CreationDate="2022-10-05T05:33:25.703" UserId="3279" Text="I have tried to explore https://github.com/polkascan/py-substrate-interface, but didn't find any example, so I am wondering if I want to send asset like USDT from statemine parachain to another parachain? " ContentLicense="CC BY-SA 4.0" />
  <row Id="19344" PostHistoryTypeId="1" PostId="5166" RevisionGUID="fcb96402-4bd0-4963-9305-c482352df332" CreationDate="2022-10-05T05:33:25.703" UserId="3279" Text="Is that possible to implement bridge to send USDT from statemint to other parachains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19345" PostHistoryTypeId="3" PostId="5166" RevisionGUID="fcb96402-4bd0-4963-9305-c482352df332" CreationDate="2022-10-05T05:33:25.703" UserId="3279" Text="|python|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19346" PostHistoryTypeId="2" PostId="5167" RevisionGUID="ed055392-41a7-419e-ba51-0b39b52ecbd1" CreationDate="2022-10-05T05:42:04.123" UserId="251" Text="`ActiveEra` is the era that we are on.&#xD;&#xA;&#xD;&#xA;`CurrentEra` is the era that staking is on.&#xD;&#xA;&#xD;&#xA;For example, if the election failed. `ActiveEra` will be increased, but the `CurrentEra` not. And one day you found they are not equal, which means your chain's election stalled. `ActiveEra - CurrentEra` eras is the stalled time." ContentLicense="CC BY-SA 4.0" />
  <row Id="19348" PostHistoryTypeId="5" PostId="5167" RevisionGUID="ece431c2-f0df-474c-bc3a-ac2f6e1572cb" CreationDate="2022-10-05T05:54:26.480" UserId="251" Comment="added 6 characters in body" Text="Sorry, there are some mistakes. editing..." ContentLicense="CC BY-SA 4.0" />
  <row Id="19349" PostHistoryTypeId="5" PostId="5167" RevisionGUID="f1460be4-5fb7-44c2-9761-dbbe60ecc595" CreationDate="2022-10-05T06:18:50.707" UserId="251" Comment="added 6 characters in body" Text="`ActiveEra` is the era that we are on.&#xD;&#xA;&#xD;&#xA;`CurrentEra` is the era that staking is on.&#xD;&#xA;&#xD;&#xA;For example, if the election failed. `ActiveEra` will still be increased, but the `CurrentEra` not. And one day you found they are not equal, which means your chain's election stalled. `ActiveEra - CurrentEra` eras is the stalled time.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt; https://github.com/paritytech/substrate/blob/master/frame/session/src/lib.rs&#xD;&#xA;&gt; https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs&#xD;&#xA;&#xD;&#xA;Here are the processes of how these two storage changes:&#xD;&#xA;```&#xD;&#xA;start_session -&gt; start_era -&gt; increase ActiveEra&#xD;&#xA;new_session -&gt; try_trigger_new_era -&gt; trigger_new_era -&gt; increase CurrentEra&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`start_session` and `new_session` will be called [at the same time](https://github.com/paritytech/substrate/blob/241b0d0455453499763d0db0b4ea4188012b372f/frame/session/src/lib.rs#L661-L664). So, we should focus on the `start_era` and `try_trigger_new_era`.&#xD;&#xA;&#xD;&#xA;`ActiveEra` will be increased immediately when [`start_era`](https://github.com/paritytech/substrate/blob/241b0d0455453499763d0db0b4ea4188012b372f/frame/staking/src/pallet/impls.rs#L356-L364).&#xD;&#xA;&#xD;&#xA;But if the `elect` failed [here](https://github.com/paritytech/substrate/blob/241b0d0455453499763d0db0b4ea4188012b372f/frame/staking/src/pallet/impls.rs#L463), `try_trigger_new_era` will return `None`. The [`trigger_new_era`](https://github.com/paritytech/substrate/blob/241b0d0455453499763d0db0b4ea4188012b372f/frame/staking/src/pallet/impls.rs#L498) will be skipped. So, the `CurrentEra` won't be updated." ContentLicense="CC BY-SA 4.0" />
  <row Id="19350" PostHistoryTypeId="2" PostId="5168" RevisionGUID="76bb3f55-5034-4dc6-b52e-3e3cbaae724b" CreationDate="2022-10-05T06:27:34.047" UserId="16" Text="You are doing nothing wrong. Instant seal does not finalize the blocks for some reason. However, a change was [recently merged](https://github.com/paritytech/substrate/pull/12106) to allow just that. We are yet to adapt it in `substrate-contracts-node`." ContentLicense="CC BY-SA 4.0" />
  <row Id="19352" PostHistoryTypeId="5" PostId="5163" RevisionGUID="3961424e-6b9a-475f-b67a-8fa062c252ab" CreationDate="2022-10-05T06:28:30.573" UserId="16" Comment="added 16 characters in body" Text="I'm running substrate-contracts-node locally with `--dev` (instant seals). I created a custom react hook to wrap events, but it never gets finalized. Am I doing something wrong, is there a caveat in using instant seals?&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;type Status = 'pending' | 'finalized' | 'none';&#xD;&#xA;&#xD;&#xA;type Response = {&#xD;&#xA;  send: () =&gt; void;&#xD;&#xA;  events: EventRecord[];&#xD;&#xA;  status: Status;&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;export const useExecuteFunc = (): Response =&gt; {&#xD;&#xA;  const game = useGameContract();&#xD;&#xA;  const { activeAccount, activeSigner } = useInk();&#xD;&#xA;  const [pixels, setPixels] = useState&lt;EventRecord[]&gt;([]);&#xD;&#xA;  const [status, setStatus] = useState&lt;Status&gt;('none');&#xD;&#xA;&#xD;&#xA;  const send = useMemo(() =&gt; {&#xD;&#xA;    return async () =&gt; {&#xD;&#xA;      if (!activeAccount || !game || !activeSigner) return () =&gt; null;&#xD;&#xA;&#xD;&#xA;      const unsub = await game.tx&#xD;&#xA;        .executeTurns({&#xD;&#xA;          gasLimit: -1,&#xD;&#xA;        })&#xD;&#xA;        .signAndSend(activeAccount?.address, { signer: activeSigner.signer }, async (result) =&gt; {&#xD;&#xA;          console.log('result', result);&#xD;&#xA;&#xD;&#xA;          if (result.status.isInBlock) {&#xD;&#xA;            console.log('status is pending');&#xD;&#xA;            setStatus('pending');&#xD;&#xA;          } else if (result.status.isFinalized) {&#xD;&#xA;            console.log('status is finalized');&#xD;&#xA;            setStatus('finalized');&#xD;&#xA;            unsub();&#xD;&#xA;          }&#xD;&#xA;        });&#xD;&#xA;    };&#xD;&#xA;  }, [activeAccount, activeSigner, game]);&#xD;&#xA;&#xD;&#xA;  return {&#xD;&#xA;    send,&#xD;&#xA;    events: pixels,&#xD;&#xA;    status,&#xD;&#xA;  };&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I then use this like this:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const executeGameFunc = useExecuteGameFunc()&#xD;&#xA;&#xD;&#xA;// ...&#xD;&#xA;&#xD;&#xA;&lt;button onClick={() =&gt; executeGameFunc.send()}&gt;Play Game&lt;/button&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;polkadotjs explorer shows that the transaction was successful." ContentLicense="CC BY-SA 4.0" />
  <row Id="19355" PostHistoryTypeId="2" PostId="5170" RevisionGUID="55f4891f-3ea0-4697-9316-b16906601548" CreationDate="2022-10-05T06:37:45.537" UserId="632" Text="is it possible to calculate the weight (and transform to fees) for a given transaction ? &#xD;&#xA;I mean, I need to create a custom RPC method which will calculate that and return the fees.&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19357" PostHistoryTypeId="1" PostId="5170" RevisionGUID="55f4891f-3ea0-4697-9316-b16906601548" CreationDate="2022-10-05T06:37:45.537" UserId="632" Text="Calculate fee for a given transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="19358" PostHistoryTypeId="3" PostId="5170" RevisionGUID="55f4891f-3ea0-4697-9316-b16906601548" CreationDate="2022-10-05T06:37:45.537" UserId="632" Text="|substrate-node|rpc|weight|fee|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19359" PostHistoryTypeId="5" PostId="5161" RevisionGUID="0c1dd4b3-686d-46d4-b398-4c7cf37ea164" CreationDate="2022-10-05T06:46:29.553" UserId="2484" Comment="added 535 characters in body" Text="Hey valuable Substrate pros,&#xD;&#xA;&#xD;&#xA;do you know a way to use `impl_benchmark_test_suite` inside another crate like the runtime? I have multiple pallets. There are no mocks inside these pallets. There is only one runtime mock in my project. Since `impl_benchmark_test_suite` needs the mock, I would like to find a way to call the benchmark tests in an outer crate like the runtime.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benchmark_tests {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_benchmarking::impl_benchmark_test_suite;&#xD;&#xA;&#xD;&#xA;	impl_benchmark_test_suite!(&#xD;&#xA;		my_pallet_1::Pallet,&#xD;&#xA;		crate::mock::ExtBuilder::default().build(),&#xD;&#xA;		crate::mock::Test,&#xD;&#xA;		benchmarks_path = my_pallet_1::benchmarking,&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	impl_benchmark_test_suite!(&#xD;&#xA;		my_pallet_2::Pallet,&#xD;&#xA;		crate::mock::ExtBuilder::default().build(),&#xD;&#xA;		crate::mock::Test,&#xD;&#xA;		benchmarks_path = my_pallet_2::benchmarking,&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	impl_benchmark_test_suite!(&#xD;&#xA;		my_pallet_3::Pallet,&#xD;&#xA;		crate::mock::ExtBuilder::default().build(),&#xD;&#xA;		crate::mock::Test,&#xD;&#xA;		benchmarks_path = my_pallet_3::benchmarking,&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This produces that error:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;error: no rules expected the token `::`&#xD;&#xA;&#xD;&#xA;my_pallet_1::Pallet&#xD;&#xA;&#xD;&#xA;no rules expected this token in macro call&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Trying to use the benchmark test module inside the mock of the runtime:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benchmark_tests {&#xD;&#xA;    use frame_benchmarking::impl_benchmark_test_suite;&#xD;&#xA;&#xD;&#xA;	use my_pallet::Pallet;&#xD;&#xA;&#xD;&#xA;    impl_benchmark_test_suite!(&#xD;&#xA;        Pallet,&#xD;&#xA;        ExtBuilder::default().build(),&#xD;&#xA;        Test,&#xD;&#xA;        benchmarks_path = my_pallet::benchmarking,&#xD;&#xA;    );&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This produces this error:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;error: no rules expected the token `)`&#xD;&#xA;375 | /     impl_benchmark_test_suite!(&#xD;&#xA;376 | |         Pallet,&#xD;&#xA;377 | |         ExtBuilder::default().build(),&#xD;&#xA;378 | |         Test,&#xD;&#xA;379 | |         benchmarks_path = my_pallet::benchmarking,&#xD;&#xA;380 | |     );&#xD;&#xA;    | |_____^ no rules expected this token in macro call&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;EDIT 2: &#xD;&#xA;&#xD;&#xA;I tried another approach: Just using the mock runtime and ExtBuilder from another pallet.&#xD;&#xA;&#xD;&#xA;Inside my_pallet/benchmarking.rs:&#xD;&#xA;```rust&#xD;&#xA;impl_benchmark_test_suite!(Pallet, pallet_tests::ExtBuilder::default().build(), pallet_tests::Test);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Although ExtBuilder and Test is public in `pallet_tests` it produces the following error:&#xD;&#xA;&#xD;&#xA;```text&#xD;&#xA;failed to resolve: could not find `ExtBuilder` in `pallet_tests`&#xD;&#xA;&#xD;&#xA;could not find `ExtBuilder` in `pallet_tests`&#xD;&#xA;&#xD;&#xA;cannot find type `Test` in crate `pallet_tests`&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19360" PostHistoryTypeId="4" PostId="5161" RevisionGUID="0c1dd4b3-686d-46d4-b398-4c7cf37ea164" CreationDate="2022-10-05T06:46:29.553" UserId="2484" Comment="added 535 characters in body" Text="How to use an outer mock inside `impl_benchmark_test_suite`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19361" PostHistoryTypeId="2" PostId="5171" RevisionGUID="94d00331-0670-4811-b1bd-289a0386e856" CreationDate="2022-10-05T07:02:00.503" UserId="2762" Text="Yes, take a look at this [How-to-guide][1] in the Substrate website to see how to do it with the [Transaction Payment Pallet][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then you can apply this code to your pallet and create the custom RPC, I leave here a [guide about how to create a custom RPC][3] too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/weights/calculate-fees/&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/pallet_transaction_payment/index.html&#xD;&#xA;  [3]: https://hackmd.io/JpJCbu0nTa2jym0za1Tggw" ContentLicense="CC BY-SA 4.0" />
  <row Id="19363" PostHistoryTypeId="5" PostId="5171" RevisionGUID="06766b7c-a03c-42ad-be59-a0813d366389" CreationDate="2022-10-05T07:07:24.370" UserId="2762" Comment="added 174 characters in body" Text="Yes, take a look at this [How-to-guide][1] in the Substrate website to see how to do it with the [Transaction Payment Pallet][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then you can apply this code to your pallet and create the custom RPC, I leave here a [guide about how to create a custom RPC][3] too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/weights/calculate-fees/&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/pallet_transaction_payment/index.html&#xD;&#xA;  [3]: https://hackmd.io/JpJCbu0nTa2jym0za1Tggw&#xD;&#xA;  [4]: https://i.stack.imgur.com/W2Mx0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19364" PostHistoryTypeId="2" PostId="5172" RevisionGUID="06b74714-971a-4386-80e0-933bc141dfd3" CreationDate="2022-10-05T07:18:32.330" UserId="3252" Text="how to use api.events.staking.Rewarded.is to get reward?  &#xD;&#xA;like this:&#xD;&#xA;``` &#xD;&#xA;let event:IEventLike={&#xD;&#xA;			index:9281,&#xD;&#xA;			method:&quot;staking&quot;,&#xD;&#xA;			section:&quot;rewarded&quot;,&#xD;&#xA;		};&#xD;&#xA;		const nominatorReward = api.events.staking.Rewarded.is(event)&#xD;&#xA;		console.log(nominatorReward)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19366" PostHistoryTypeId="1" PostId="5172" RevisionGUID="06b74714-971a-4386-80e0-933bc141dfd3" CreationDate="2022-10-05T07:18:32.330" UserId="3252" Text="How to use api.events.staking.Rewarded.is to get nominator reward?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19367" PostHistoryTypeId="3" PostId="5172" RevisionGUID="06b74714-971a-4386-80e0-933bc141dfd3" CreationDate="2022-10-05T07:18:32.330" UserId="3252" Text="|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19370" PostHistoryTypeId="2" PostId="5173" RevisionGUID="51a3afa2-55cd-4522-9f8b-e4fb3b95d83b" CreationDate="2022-10-05T07:21:35.980" UserId="3281" Text="To encode and decode data the way we do in solidity i am using [ethabi][1]. It is working fine in compilation and testing but when I am running `cargo contract build` cmd, it is giving me build error.&#xD;&#xA;&#xD;&#xA;Let me know if someone help me on this issue or have any other way&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ethabi/latest/ethabi/" ContentLicense="CC BY-SA 4.0" />
  <row Id="19372" PostHistoryTypeId="1" PostId="5173" RevisionGUID="51a3afa2-55cd-4522-9f8b-e4fb3b95d83b" CreationDate="2022-10-05T07:21:35.980" UserId="3281" Text="Ink smart contracts are giving build error when i am using ethabi rust crate" ContentLicense="CC BY-SA 4.0" />
  <row Id="19373" PostHistoryTypeId="3" PostId="5173" RevisionGUID="51a3afa2-55cd-4522-9f8b-e4fb3b95d83b" CreationDate="2022-10-05T07:21:35.980" UserId="3281" Text="|ink|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19374" PostHistoryTypeId="5" PostId="5168" RevisionGUID="1425e369-b3a3-4bbf-b128-6acf332ce542" CreationDate="2022-10-05T07:58:20.327" UserId="16" Comment="added 286 characters in body" Text="You are doing nothing wrong. Instant seal does not finalize the blocks for some reason. However, a change was [recently merged](https://github.com/paritytech/substrate/pull/12106) to allow just that. We are yet to adapt it in `substrate-contracts-node`.&#xD;&#xA;&#xD;&#xA;That said, you should really reconsider if you need to wait for finalization anyways. Only if a later reversion of the state would be really bad you should wait for it. Like acting on some payment you received. Displaying the current state of a game should not require finalization." ContentLicense="CC BY-SA 4.0" />
  <row Id="19375" PostHistoryTypeId="2" PostId="5174" RevisionGUID="113f706c-5a5a-4051-b37f-290ab6416b42" CreationDate="2022-10-05T08:00:37.387" UserId="620" Text="You don't need a bridge at all, Polkadot includes a message transport protocol for its parachains. I'd check out Subscan's [XCM explorer](https://statemine.subscan.io/xcm_transfer) to look at examples of asset transfers and how those transactions are constructed. For example, here is a transfer of some USDT from [Statemine to Moonriver](https://statemine.subscan.io/xcm_transfer/kusama-1000-2978330-5)." ContentLicense="CC BY-SA 4.0" />
  <row Id="19377" PostHistoryTypeId="2" PostId="5175" RevisionGUID="366e2c66-c248-4c20-9e12-0f6b640ee447" CreationDate="2022-10-05T08:04:42.687" UserId="3252" Text="1. How to build and send a staking transaction? What steps and rpc should be used ？&#xD;&#xA;2.  which steps is difference between building a balance thansfer ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19379" PostHistoryTypeId="1" PostId="5175" RevisionGUID="366e2c66-c248-4c20-9e12-0f6b640ee447" CreationDate="2022-10-05T08:04:42.687" UserId="3252" Text="Staking：How to build and send a staking transaction? can you give me a example?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19380" PostHistoryTypeId="3" PostId="5175" RevisionGUID="366e2c66-c248-4c20-9e12-0f6b640ee447" CreationDate="2022-10-05T08:04:42.687" UserId="3252" Text="|transactions|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19381" PostHistoryTypeId="2" PostId="5176" RevisionGUID="0343794e-e73a-4013-ae7d-5a13c670c856" CreationDate="2022-10-05T08:29:30.820" UserId="251" Text="Yep, there is a threshold as @André said.&#xD;&#xA;&#xD;&#xA;But I think `1/5` is more than `10%`.&#xD;&#xA;&#xD;&#xA;There is one more thing that you need to know.&#xD;&#xA;&#xD;&#xA;There is a [`SlashDeferDuration`](https://github.com/paritytech/substrate/blob/241b0d0455453499763d0db0b4ea4188012b372f/frame/staking/src/pallet/mod.rs#L179). Check your runtime configurations. The slash might not be executed immediately.&#xD;&#xA;&#xD;&#xA;You could try querying the [`UnappliedSlashes`](https://github.com/paritytech/substrate/blob/241b0d0455453499763d0db0b4ea4188012b372f/frame/staking/src/pallet/mod.rs#L480) from PolkadotApps." ContentLicense="CC BY-SA 4.0" />
  <row Id="19383" PostHistoryTypeId="2" PostId="5177" RevisionGUID="92a35642-7a11-4160-9067-3d3f33ba9590" CreationDate="2022-10-05T08:43:01.710" UserId="251" Text="I think [staking-payout](https://github.com/canontech/staking-payouts) is a good example for you.&#xD;&#xA;&#xD;&#xA;You could start from the [`signAndSendTxs`](https://github.com/canontech/staking-payouts/blob/718192448ffccf36a667355bd0498ecf75c66483/src/services.ts#L397)." ContentLicense="CC BY-SA 4.0" />
  <row Id="19385" PostHistoryTypeId="2" PostId="5178" RevisionGUID="ca62ab26-7bde-45b5-80d4-b255f9462a8c" CreationDate="2022-10-05T09:08:03.670" UserId="2673" Text="I suspect the problem in your approach is using fully qualified paths for the first and fourth argument. Checking in [the docs](https://paritytech.github.io/substrate/master/frame_benchmarking/macro.impl_benchmark_test_suite.html#arguments) I found the following information:&#xD;&#xA;&gt; because of macro syntax limitations, neither Pallet nor benches can be paths, but both have to be idents in the scope of `impl_benchmark_test_suite`.&#xD;&#xA;&#xD;&#xA;So I guess you might try doing something like this:&#xD;&#xA;```rust&#xD;&#xA;use my_pallet_1::{Pallet as Pallet1, benchmarking as bench1};&#xD;&#xA;&#xD;&#xA;impl_benchmark_test_suite!(&#xD;&#xA;    Pallet1,&#xD;&#xA;    crate::mock::ExtBuilder::default().build(),&#xD;&#xA;    crate::mock::Test,&#xD;&#xA;    benchmarks_path = bench1&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I haven't tested it though, it's just my suggestion based on the docs." ContentLicense="CC BY-SA 4.0" />
  <row Id="19387" PostHistoryTypeId="2" PostId="5179" RevisionGUID="db5e29bb-0f0e-4d43-9f5f-6e48bcf592a5" CreationDate="2022-10-05T09:09:12.860" UserId="620" Text="&gt; Should i use currentEra or activeEra?&#xD;&#xA;&#xD;&#xA;Probably `activeEra`. Current Era is mostly used to plan upcoming eras and prepare the network for the validator set change according to a new election. The `currentEra` sets up what will become `active`.&#xD;&#xA;&#xD;&#xA;There's a little description of how these relate in Sidecar's [staking progress](https://github.com/paritytech/substrate-api-sidecar/blob/8906816/src/controllers/pallets/PalletsStakingProgressController.ts#L61L75) endpoint." ContentLicense="CC BY-SA 4.0" />
  <row Id="19390" PostHistoryTypeId="2" PostId="5180" RevisionGUID="6885a7c3-189b-4e71-b60e-be15d459c673" CreationDate="2022-10-05T09:24:48.130" UserId="2909" Text="**Just in case others may not see my earlier answer to a different question:**&#xD;&#xA;&#xD;&#xA;(Not financial advice) Currently it is available with Bitfinex withdrawals to Statemint and Statemine parachains for Polkadot and Kusama ecosystem respectively.&#xD;&#xA;&#xD;&#xA;1) Withdraw your USDT from an exchange like Bitfinex into Statemint/Statemine&#xD;&#xA;&#xD;&#xA;See Statemine example: https://support.polkadot.network/support/solutions/articles/65000181634-how-to-withdraw-usdt-from-bitfinex-on-statemine&#xD;&#xA;&#xD;&#xA;See that Statemint (Polkadot) is also now recently available: https://www.bitfinex.com/posts/840&#xD;&#xA;&#xD;&#xA;2) Transfer it across the Polkadot/Kusama ecosystem respectively:&#xD;&#xA;&#xD;&#xA;See Statemine example: https://support.polkadot.network/support/solutions/articles/65000181118-how-to-transfer-tether-usdt-on-statemine&#xD;&#xA;&#xD;&#xA;FYI on what is Statemint and Statemine: https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-" ContentLicense="CC BY-SA 4.0" />
  <row Id="19392" PostHistoryTypeId="2" PostId="5181" RevisionGUID="c472a06e-9c81-4be6-be79-6ac853d595a4" CreationDate="2022-10-05T10:11:24.683" UserId="2762" Text="With the block hash when the event was triggered and the index number of the event you can query all the events and parse it to find your specific event, and check the data in it.&#xD;&#xA;&#xD;&#xA;See an example:&#xD;&#xA;&#xD;&#xA;    const blockHash = &quot;0xaef9fe68122e5659638f426077e45dee30dc7d62f9627b3a0896fa3392ff263c&quot;;&#xD;&#xA;    const eventNumber = 547;&#xD;&#xA;    const at = await api.at(blockHash);&#xD;&#xA;    const events = await at.query.system.events(); &#xD;&#xA;    console.log(events[eventNumber].event.data.toHuman());&#xD;&#xA;&#xD;&#xA;The result of the console log is:&#xD;&#xA;&#xD;&#xA;    [ '15SpxEyZszSGKsYDqCSDgHr4CHUgx79qNwd4GW8T5AZQGCCc', '588,174,178' ]&#xD;&#xA;Which is the stash account and the amount rewarded.&#xD;&#xA;&#xD;&#xA;This code is to retrieve the information of an Event used as an example that you can find in [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/extrinsic/12343544-3?event=12343544-547" ContentLicense="CC BY-SA 4.0" />
  <row Id="19394" PostHistoryTypeId="2" PostId="5182" RevisionGUID="2ccbfb97-1e12-4018-916d-6d34e293f9cb" CreationDate="2022-10-05T12:07:01.580" UserId="19" Text="I want to setup my local environment for `ink` development and I follow the [link][1], during execution of `cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.17.0 --force --locked` I got following error:&#xD;&#xA;&#xD;&#xA;    warning: Could not find `Cargo.lock` for `/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/daaac3d/runtime/Cargo.toml`, while searching from `/tmp/cargo-installKPguNj/release/build/contracts-node-runtime-21cc57cc944aa03f/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;    &#xD;&#xA;    error: failed to run custom build command for `contracts-node-runtime v0.17.0 (/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/daaac3d/runtime)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/tmp/cargo-installKPguNj/release/build/contracts-node-runtime-c001dd92872a3133/build-script-build` (exit status: 1)&#xD;&#xA;      --- stdout&#xD;&#xA;      cargo:warning=Could not find `Cargo.lock` for `/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/daaac3d/runtime/Cargo.toml`, while searching from `/tmp/cargo-installKPguNj/release/build/contracts-node-runtime-21cc57cc944aa03f/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;      cargo:warning=Could not find `Cargo.lock` for `/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/daaac3d/runtime/Cargo.toml`, while searching from `/tmp/cargo-installKPguNj/release/build/contracts-node-runtime-21cc57cc944aa03f/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;      Information that should be included in a bug report.&#xD;&#xA;      Executing build command: &quot;/home/tomek/.rustup/toolchains/nightly-2022-05-23-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/tmp/cargo-installKPguNj/release/wbuild/contracts-node-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;      Using rustc version: rustc 1.63.0-nightly (b2eed72a6 2022-05-22)&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;          Updating crates.io index&#xD;&#xA;          Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;      error: no matching package named `pallet-contracts-rpc-runtime-api` found&#xD;&#xA;      location searched: https://github.com/paritytech/substrate&#xD;&#xA;      required by package `contracts-node-runtime v0.17.0 (/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/daaac3d/runtime)`&#xD;&#xA;          ... which satisfies path dependency `wasm-project` of package `contracts-node-runtime-wasm v1.0.0 (/tmp/cargo-installKPguNj/release/wbuild/contracts-node-runtime)`&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    error: failed to compile `contracts-node v0.17.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.17.0#daaac3db)`, intermediate artifacts can be found at `/tmp/cargo-installKPguNj`&#xD;&#xA;&#xD;&#xA;All previous steps passed smoothly. I would appreciate any advice how to solve it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/getting-started/setup" ContentLicense="CC BY-SA 4.0" />
  <row Id="19396" PostHistoryTypeId="1" PostId="5182" RevisionGUID="2ccbfb97-1e12-4018-916d-6d34e293f9cb" CreationDate="2022-10-05T12:07:01.580" UserId="19" Text="Failed to run custom build command for `contracts-node-runtime v0.17.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="19397" PostHistoryTypeId="3" PostId="5182" RevisionGUID="2ccbfb97-1e12-4018-916d-6d34e293f9cb" CreationDate="2022-10-05T12:07:01.580" UserId="19" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19398" PostHistoryTypeId="5" PostId="5182" RevisionGUID="aee28a04-dba1-45c7-bf78-752fdd112cf4" CreationDate="2022-10-05T12:14:21.803" UserId="19" Comment="added context of the question" Text="I want to setup my local environment for `ink` development and I follow the [link][1], during execution of `cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.17.0 --force --locked` I got following error:&#xD;&#xA;&#xD;&#xA;    warning: Could not find `Cargo.lock` for `/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/daaac3d/runtime/Cargo.toml`, while searching from `/tmp/cargo-installKPguNj/release/build/contracts-node-runtime-21cc57cc944aa03f/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;    &#xD;&#xA;    error: failed to run custom build command for `contracts-node-runtime v0.17.0 (/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/daaac3d/runtime)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/tmp/cargo-installKPguNj/release/build/contracts-node-runtime-c001dd92872a3133/build-script-build` (exit status: 1)&#xD;&#xA;      --- stdout&#xD;&#xA;      cargo:warning=Could not find `Cargo.lock` for `/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/daaac3d/runtime/Cargo.toml`, while searching from `/tmp/cargo-installKPguNj/release/build/contracts-node-runtime-21cc57cc944aa03f/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;      cargo:warning=Could not find `Cargo.lock` for `/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/daaac3d/runtime/Cargo.toml`, while searching from `/tmp/cargo-installKPguNj/release/build/contracts-node-runtime-21cc57cc944aa03f/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;      Information that should be included in a bug report.&#xD;&#xA;      Executing build command: &quot;/home/tomek/.rustup/toolchains/nightly-2022-05-23-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/tmp/cargo-installKPguNj/release/wbuild/contracts-node-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;      Using rustc version: rustc 1.63.0-nightly (b2eed72a6 2022-05-22)&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;          Updating crates.io index&#xD;&#xA;          Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;      error: no matching package named `pallet-contracts-rpc-runtime-api` found&#xD;&#xA;      location searched: https://github.com/paritytech/substrate&#xD;&#xA;      required by package `contracts-node-runtime v0.17.0 (/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/daaac3d/runtime)`&#xD;&#xA;          ... which satisfies path dependency `wasm-project` of package `contracts-node-runtime-wasm v1.0.0 (/tmp/cargo-installKPguNj/release/wbuild/contracts-node-runtime)`&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    error: failed to compile `contracts-node v0.17.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.17.0#daaac3db)`, intermediate artifacts can be found at `/tmp/cargo-installKPguNj`&#xD;&#xA;&#xD;&#xA;All previous steps passed smoothly. I would appreciate any advice how to solve it.&#xD;&#xA;&#xD;&#xA;PS. The context of the question is that I want to build `Scaffold Ink` repository for `ink` smart contracts, that is why I want to setup installation/configuration process that works smoothly without any errors.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/getting-started/setup" ContentLicense="CC BY-SA 4.0" />
  <row Id="19399" PostHistoryTypeId="2" PostId="5183" RevisionGUID="d744f056-8f5e-43fb-a1d8-94de1ac42c68" CreationDate="2022-10-05T12:47:29.563" UserId="2762" Text="I suggest you follow the [Substrate tutorial][1] to setup the installation, following the steps:&#xD;&#xA;&#xD;&#xA;1- Open the [Releases][2] page.&#xD;&#xA;&#xD;&#xA;2- Download the appropriate compressed archive for your local computer.&#xD;&#xA;&#xD;&#xA;3- Open the downloaded file and extract the contents to a working directory.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/smart-contracts/prepare-your-first-contract/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-contracts-node/releases" ContentLicense="CC BY-SA 4.0" />
  <row Id="19401" PostHistoryTypeId="52" PostId="5165" RevisionGUID="9444bf62-e560-4be1-a1c8-c3273a19978a" CreationDate="2022-10-05T13:28:18.927" />
  <row Id="19402" PostHistoryTypeId="2" PostId="5184" RevisionGUID="e1a82dca-85ea-4700-b604-15082760062a" CreationDate="2022-10-05T15:00:31.430" UserId="73" Text="The parachain account is not owned by anyone. It is only controllable by the parachain through XCM. When the following [pr][1] is implemented, the owner that registered the parachain will have some more rights until it is locked. This would be especially useful at the beginning to fix up potential issues with the deployment or a failed upgrade.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/pull/5451" ContentLicense="CC BY-SA 4.0" />
  <row Id="19404" PostHistoryTypeId="2" PostId="5185" RevisionGUID="1a382ab7-bcd3-46a3-97d4-208ec93bd998" CreationDate="2022-10-05T15:12:39.473" UserId="1777" Text="I'm planning to write a pallet to distribute token to many users in substrate blockchain (Ex: 500k-1m users). Should I do a for loop in a user list and transfer token to them? Do you have any example?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19406" PostHistoryTypeId="1" PostId="5185" RevisionGUID="1a382ab7-bcd3-46a3-97d4-208ec93bd998" CreationDate="2022-10-05T15:12:39.473" UserId="1777" Text="Token distribution to many users in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="19407" PostHistoryTypeId="3" PostId="5185" RevisionGUID="1a382ab7-bcd3-46a3-97d4-208ec93bd998" CreationDate="2022-10-05T15:12:39.473" UserId="1777" Text="|substrate-node|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19408" PostHistoryTypeId="5" PostId="638" RevisionGUID="fb7839aa-c61f-4c77-bd5c-986357760171" CreationDate="2022-10-05T15:59:06.150" UserId="172" Comment="Updated Rust doc link for EXTRINSIC_FORMAT_VERSION" Text="More generally, if you were to SCALE encode a **_signed transaction_**, you'd follow these steps: &#xD;&#xA;1. Combine the `call`, `extra` and `additional` data and SCALE encode it:&#xD;&#xA;   - `call` data: the pallet index, call index and other fields relevant to this call (e.g. if this is a transfer call from the Balances pallet, this would be `address` and `balance`).&#xD;&#xA;   - `extra` data (signed extensions): e.g. era, nonce and some tip value.&#xD;&#xA;   - `additional` data: the spec version, transaction version and genesis hash of the target chain.&#xD;&#xA;2. If the resulting payload is more than 256 bytes, hash it then sign the result (e.g. using Alice). If not, just sign the SCALE encoded bytes from (1).&#xD;&#xA;3. Format the signature by combining the sender's account ID + the signature from (2) + the `extra` data.&#xD;&#xA;4. Encode the formatted signature.&#xD;&#xA;5. Encode the `call` itself.&#xD;&#xA;6. Construct the extrinsic by creating an array of bytes whereby:&#xD;&#xA;   - The first byte contains the first bit as 1 (denoting that the transaction is signed) and 7 bits containing the [transaction version](https://paritytech.github.io/substrate/master/sp_runtime/generic/struct.UncheckedExtrinsic.html#associatedconstant.VERSION) (currently 4 for all Substrate based chains).&#xD;&#xA;   - The remaining bytes contain the result from (4) and (5) (in that order).&#xD;&#xA;7. Prefix the encoded data from (6) with its compact encoded length.&#xD;&#xA;&#xD;&#xA;Have a look at [this example](https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/05_transfer_balance.rs) to see these steps in action. If you were to encode an **_unsigned transaction_**, you'd follow the same procedure except:&#xD;&#xA;1. The first bit of the first byte set in (6) is 0 (the bit following the compact length added in (7)), denoting that the transaction is unsigned.&#xD;&#xA;2. There are no signature bytes following this first byte encoded in (6); we append the call data from (5) next.&#xD;&#xA;&#xD;&#xA;For encoding an extrinsic with different signed extensions, you'll need to know what they are and add them to the `extra` data you SCALE encode.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;A couple clarifications on key terms:&#xD;&#xA;&#xD;&#xA;* An [**unsigned transaction**](https://docs.substrate.io/v3/concepts/extrinsics/#unsigned-transactions) in Substrate is just a type of transaction which instead of requiring a signature, requires a set of conditions to be met in order for the transaction to be validated. This implies that developers must carefully implement their own protection mechanisms and economic deterrents against bad actors. &#xD;&#xA;&#xD;&#xA;* A [**signed extension**](https://docs.substrate.io/v3/concepts/tx-pool/#signed-extensions) is a way to extend the information packed into a transaction (signed or unsigned) so that the transaction pool can perform certain validation checks on it. Examples of these checks include: *what's the weight for this transaction and will it fit in the block? Has this transaction already expired? Is the nonce for the same account unique? Is there a tip attached to this transaction?* See the list of signed extensions in FRAME [here](https://docs.substrate.io/rustdocs/latest/frame_system/index.html#signed-extensions). " ContentLicense="CC BY-SA 4.0" />
  <row Id="19410" PostHistoryTypeId="2" PostId="5186" RevisionGUID="0fd429ba-57b2-46b6-ac1c-78907714a5a3" CreationDate="2022-10-05T17:53:23.260" UserId="427" Text="Consider we have a ETH keypair in the keystore inserted using this command &#xD;&#xA;&#xD;&#xA;`curl -H &quot;Content-Type:application/json&quot; -d '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;author_insertKey&quot;,&quot;params&quot;: [&quot;eths&quot;,&quot;0x606640b4efd5a1a0bc9839dfce7a7bb5a0c1402d8d02cbee9dabe5d88f977640&quot;,&quot;0x0209bb17d85c86ad4812103248b6b73e67f96ea66829c3b18f4d1b5df2c72cab63&quot;]}' http://127.0.0.1:9936`&#xD;&#xA;&#xD;&#xA;How we can access this keystore in a substrate pallet to sign an Ethereum transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19412" PostHistoryTypeId="1" PostId="5186" RevisionGUID="0fd429ba-57b2-46b6-ac1c-78907714a5a3" CreationDate="2022-10-05T17:53:23.260" UserId="427" Text="How to Sign an Ethereum transaction from substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19413" PostHistoryTypeId="3" PostId="5186" RevisionGUID="0fd429ba-57b2-46b6-ac1c-78907714a5a3" CreationDate="2022-10-05T17:53:23.260" UserId="427" Text="|ethereum|signing|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19415" PostHistoryTypeId="2" PostId="5187" RevisionGUID="e7e0cc64-5b61-42f3-a921-8ad8648862f1" CreationDate="2022-10-05T18:42:30.890" UserId="29" Text="Like Joe is saying, you need to open HRMP channels and then send an XCM.&#xD;&#xA;You can see the actual XCM Joe referenced here:&#xD;&#xA;- https://statemine.subscan.io/extrinsic/2978330-2?event=2978330-5&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;More info here:&#xD;&#xA;- https://docs.substrate.io/reference/how-to-guides/parachains/add-hrmp-channels&#xD;&#xA;- https://www.youtube.com/watch?v=UfxU3hUprKo" ContentLicense="CC BY-SA 4.0" />
  <row Id="19417" PostHistoryTypeId="5" PostId="5153" RevisionGUID="a382d101-b8d1-478c-9b07-24dc89953998" CreationDate="2022-10-05T18:47:52.400" UserId="1918" Comment="Copy edited (e.g. ref. &lt;https://en.wiktionary.org/wiki/period#Noun&gt;). Used more standard formatting (we have italics and bold on this platform).  " Text="I want to start a function automatically after a certain *period* of time in our chain. How can I do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19418" PostHistoryTypeId="4" PostId="5153" RevisionGUID="a382d101-b8d1-478c-9b07-24dc89953998" CreationDate="2022-10-05T18:47:52.400" UserId="1918" Comment="Copy edited (e.g. ref. &lt;https://en.wiktionary.org/wiki/period#Noun&gt;). Used more standard formatting (we have italics and bold on this platform).  " Text="How can I start a function automatically after a certain period of time?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19419" PostHistoryTypeId="24" PostId="5153" RevisionGUID="a382d101-b8d1-478c-9b07-24dc89953998" CreationDate="2022-10-05T18:47:52.400" Comment="Proposed by 1918 approved by 555 edit id of 299" ContentLicense="CC BY-SA 4.0" />
  <row Id="19420" PostHistoryTypeId="5" PostId="5165" RevisionGUID="a33d0895-ae20-4f25-8228-c59a080a74be" CreationDate="2022-10-05T18:49:16.333" UserId="2102" Comment="Fix some grammar issues and format code" Text="When I look for the `exposures.others.length`, it is not same as the explorer show. The `exposures.others.length` is 302 but the explorer shows 342. Why? Should I use the currentEra or activeEra?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;const activeEra = (await api.query.staking.activeEra()).unwrap();//获取当前活跃的纪元&#xD;&#xA;const exposures = await api.query.staking.erasStakers.at(blockHash,activeEra.index, address);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;const lastEra = (await api.query.staking.currentEra()).unwrap();//获取当前最新的纪元&#xD;&#xA;const exposures = await api.query.staking.erasStakers.at(blockHash,lastEra, address);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19421" PostHistoryTypeId="6" PostId="5165" RevisionGUID="a33d0895-ae20-4f25-8228-c59a080a74be" CreationDate="2022-10-05T18:49:16.333" UserId="2102" Comment="Fix some grammar issues and format code" Text="|staking|era|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19422" PostHistoryTypeId="24" PostId="5165" RevisionGUID="a33d0895-ae20-4f25-8228-c59a080a74be" CreationDate="2022-10-05T18:49:16.333" Comment="Proposed by 2102 approved by 251, 29 edit id of 297" ContentLicense="CC BY-SA 4.0" />
  <row Id="19423" PostHistoryTypeId="2" PostId="5188" RevisionGUID="9f52b8f7-6198-4467-a81e-5f39c0a493c6" CreationDate="2022-10-05T19:01:59.647" UserId="235" Text="So the problem of this issue was about the logic we had defined and not about the weights or anything else. The finalization call we made should not have taken place, before the status of an asset had the onboarded status and an investorsList was created. So it was not about the hook itself. The use-case panicked the runtime. " ContentLicense="CC BY-SA 4.0" />
  <row Id="19425" PostHistoryTypeId="2" PostId="5189" RevisionGUID="c9a5563a-4ce3-4e34-8c63-2024818f6c38" CreationDate="2022-10-05T19:56:57.477" UserId="87" Text="So the question is quite simple. Let's say I have an original definition of nested enums like so:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;#[derive(MaxEncodedLen, Debug, Encode, Decode, Copy, Clone, Eq, PartialEq, TypeInfo)]&#xD;&#xA;pub enum MyNestedEnum {&#xD;&#xA;    Thing1(A),&#xD;&#xA;    Thing2(B),&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(MaxEncodedLen, Debug, Encode, Decode, Copy, Clone, Eq, PartialEq, TypeInfo)]&#xD;&#xA;pub enum A {&#xD;&#xA;    AThing1,&#xD;&#xA;    AThing2,&#xD;&#xA;    AThing3,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(MaxEncodedLen, Debug, Encode, Decode, Copy, Clone, Eq, PartialEq, TypeInfo)]&#xD;&#xA;pub enum B {&#xD;&#xA;    BThing1,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And this enum is referenced for used in storage:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn account_enum_unit)]&#xD;&#xA;    pub type AccountEnumUnit&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;        _, &#xD;&#xA;        Blake2_128Concat, T::AccountId, &#xD;&#xA;        Blake2_128Concat, MyNestedEnum,&#xD;&#xA;        SomeUnit,&#xD;&#xA;        &gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, assume that the chain has been in operation and some data has been stored, using for example one of the paths to the element:&#xD;&#xA;&#xD;&#xA;`MyNestedEnum::Thing2(B::BThing1)`&#xD;&#xA;&#xD;&#xA;But now I want to upgrade my chain so that `enum B` is enhanced with another new element changing it to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub enum B {&#xD;&#xA;    BThing1,&#xD;&#xA;    BThing2,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;...and in future I should be able to store some new data using the new element, `MyNestedEnum::Thing2(B::BThing2)`&#xD;&#xA;&#xD;&#xA;As the structure of `enum B` has changed, must I perform a storage migration during the upgrade or is it sufficient to simply add the new element at the end in the enum? In other words will adding this new element corrupt storage even if it has not been used yet?&#xD;&#xA;&#xD;&#xA;As a general remark I am assuming that as long as elements are not removed, no migration would need to happen, and also no migration would need to happen if you can be sure that an element nested or otherwise has never been used/stored at any time.&#xD;&#xA;&#xD;&#xA;There are many other possibilities for change that could happen, but I wondered what the experience was for others." ContentLicense="CC BY-SA 4.0" />
  <row Id="19427" PostHistoryTypeId="1" PostId="5189" RevisionGUID="c9a5563a-4ce3-4e34-8c63-2024818f6c38" CreationDate="2022-10-05T19:56:57.477" UserId="87" Text="Must I migrate storage during upgrade if it uses an enum that has a new element?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19428" PostHistoryTypeId="3" PostId="5189" RevisionGUID="c9a5563a-4ce3-4e34-8c63-2024818f6c38" CreationDate="2022-10-05T19:56:57.477" UserId="87" Text="|substrate-node|runtime-upgrade|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19429" PostHistoryTypeId="2" PostId="5190" RevisionGUID="9993c470-297c-4bd9-b6df-a6887a278306" CreationDate="2022-10-05T21:12:08.790" UserId="73" Text="You can not sign from your on chain code. Your on chain code needs to be deterministic. If you don't provide your private key to every node in the network, they could not import the block and while doing this, running the signing code again." ContentLicense="CC BY-SA 4.0" />
  <row Id="19431" PostHistoryTypeId="2" PostId="5191" RevisionGUID="908e3bea-d92d-43aa-999e-d7f931334a6b" CreationDate="2022-10-05T22:29:16.173" UserId="235" Text="We are unable to get the asset-pallet to mint according to shareInfo that is being passed along from contributions and is passed along as percentage calculation. The `from` is a virtual account, that get's generated by unique-id. &#xD;&#xA;&#xD;&#xA;The creation of the tokens are working, we can see back in the chain state `AssetDetails` that the amount of tokens (100) are minted&#xD;&#xA;&#xD;&#xA;When it comes to distribution of the tokens, we don't see back the balances of the users that have a share. In our tests with 2 users it works and we can see the balance of the fungible assets back.&#xD;&#xA;&#xD;&#xA;Below we there are two snippets of code, that show the calculation of the shares and then the distribution. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**We collecting at first the contributors and their share percentage in an asset**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;///Collect contributors to the bid, and their shares&#xD;&#xA;pub fn owner_and_shares(collection_id: T::NftCollectionId, item_id: T::NftItemId) -&gt; Vec&lt;(T::AccountId, Percent)&gt;{&#xD;&#xA;&#xD;&#xA;//Get owners and their reserved contribution to the bid&#xD;&#xA;    &#xD;&#xA;    let reservation_infos = HousingFund::Reservations::&lt;T&gt;::get((collection_id.clone(),item_id.clone())).unwrap();&#xD;&#xA;    let vec0 = reservation_infos.contributions;&#xD;&#xA;    let price = reservation_infos.amount;&#xD;&#xA;    let mut vec = Vec::new() ;&#xD;&#xA;    for i in vec0.iter(){&#xD;&#xA;        let price0 = Self::balance_to_u64_option(price).unwrap();&#xD;&#xA;        let contribution = Self::balance_to_u64_option(i.1.clone()).unwrap();&#xD;&#xA;        let share = Percent::from_rational(contribution,price0);&#xD;&#xA;        debug_assert!(!share.is_zero()); &#xD;&#xA;        vec.push((i.0.clone(),share));&#xD;&#xA;        //Update Virtual_account storage&#xD;&#xA;        Virtual::&lt;T&gt;::mutate(collection_id.clone(),item_id.clone(),|val|{&#xD;&#xA;            let mut val0 = val.clone().unwrap();&#xD;&#xA;            val0.owners.push(i.0.clone());&#xD;&#xA;            *val = Some(val0);&#xD;&#xA;        }); &#xD;&#xA;    }&#xD;&#xA;    vec&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Distribute the ownership tokens to the group of new owners**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	pub fn distribute_tokens(&#xD;&#xA;		account: T::AccountId,&#xD;&#xA;		collection_id: T::NftCollectionId,&#xD;&#xA;		item_id: T::NftItemId,&#xD;&#xA;	) -&gt; DispatchResult {&#xD;&#xA;		let shares = Self::owner_and_shares(collection_id.clone(), item_id.clone());&#xD;&#xA;		ensure!(Virtual::&lt;T&gt;::get(collection_id, item_id).is_some(), Error::&lt;T&gt;::InvalidValue);&#xD;&#xA;		let token_id = Virtual::&lt;T&gt;::get(collection_id, item_id).unwrap().token_id;&#xD;&#xA;		let total_tokens = Assets::Pallet::&lt;T&gt;::total_supply(token_id.into());&#xD;&#xA;		debug_assert!(total_tokens == Self::u32_to_balance_option(100).unwrap());&#xD;&#xA;&#xD;&#xA;		let from = T::Lookup::unlookup(account.clone());&#xD;&#xA;		let origin: OriginFor&lt;T&gt; = RawOrigin::Signed(account.clone()).into();&#xD;&#xA;&#xD;&#xA;		for share in shares.iter() {&#xD;&#xA;			let amount: &lt;T as Assets::Config&gt;::Balance = share.clone().1 * total_tokens.clone();&#xD;&#xA;			debug_assert!(!amount.clone().is_zero());&#xD;&#xA;			let to = T::Lookup::unlookup(share.clone().0);&#xD;&#xA;			Assets::Pallet::&lt;T&gt;::force_transfer(&#xD;&#xA;				origin.clone(),&#xD;&#xA;				token_id.clone().into(),&#xD;&#xA;				from.clone(),&#xD;&#xA;				to,&#xD;&#xA;				amount,&#xD;&#xA;			)&#xD;&#xA;			.ok();&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19433" PostHistoryTypeId="1" PostId="5191" RevisionGUID="908e3bea-d92d-43aa-999e-d7f931334a6b" CreationDate="2022-10-05T22:29:16.173" UserId="235" Text="Failing to distribute fungible tokens with a virtual account" ContentLicense="CC BY-SA 4.0" />
  <row Id="19434" PostHistoryTypeId="3" PostId="5191" RevisionGUID="908e3bea-d92d-43aa-999e-d7f931334a6b" CreationDate="2022-10-05T22:29:16.173" UserId="235" Text="|substrate-node-template|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19435" PostHistoryTypeId="2" PostId="5192" RevisionGUID="5a7ac71a-00b1-4037-93ee-954c8e29f3b8" CreationDate="2022-10-06T01:52:47.260" UserId="1876" Text="As per your PS., you could just use [Swanky suite][1]:&#xD;&#xA;https://www.npmjs.com/package/@astar-network/swanky-cli&#xD;&#xA;&#xD;&#xA;It allows you to easily scaffold an ink! project, and comes with a node included.&#xD;&#xA;&#xD;&#xA;Disclaimer: I'm on the core team.&#xD;&#xA;&#xD;&#xA;  [1]: https://www.npmjs.com/package/@astar-network/swanky-cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="19437" PostHistoryTypeId="2" PostId="5193" RevisionGUID="41a7d0da-de38-4c7c-ad34-100c30a3d1c8" CreationDate="2022-10-06T02:46:52.850" UserId="300" Text="I'm trying to test a Custom RPC. Let's make it a simple pass through.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;p_api::decl_runtime_apis! {&#xD;&#xA;	pub trait SimpleApi&lt;AccountId&gt; where&#xD;&#xA;		AccountId: Codec,&#xD;&#xA;	{&#xD;&#xA;		fn is_true() -&gt; Result&lt;bool, DispatchError&gt;;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Client Server Trait&#xD;&#xA;```rust&#xD;&#xA;#[rpc(client, server)]&#xD;&#xA;pub trait SimpleApi&lt;BlockHash, AccountId&gt; {&#xD;&#xA;	#[method(name = &quot;simple_isTrue&quot;)]&#xD;&#xA;	fn is_true(&#xD;&#xA;		&amp;self,&#xD;&#xA;	) -&gt; RpcResult&lt;bool&gt;&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct SimpleHandler&lt;C, M&gt; {&#xD;&#xA;	client: Arc&lt;C&gt;,&#xD;&#xA;	_marker: std::marker::PhantomData&lt;M&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;C, M&gt; SimpleHandler&lt;C, M&gt; {&#xD;&#xA;	pub fn new(client: Arc&lt;C&gt;) -&gt; Self {&#xD;&#xA;		Self { client, _marker: Default::default() }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[async_trait]&#xD;&#xA;impl&lt;C, Block, AccountId&gt; SimpleServer&lt;&lt;Block as BlockT&gt;::Hash, AccountId&gt; for SimpleHandler&lt;C, Block&gt;&#xD;&#xA;where&#xD;&#xA;	Block: BlockT,&#xD;&#xA;	C: Send + Sync + 'static,&#xD;&#xA;	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;	C: HeaderBackend&lt;Block&gt;,&#xD;&#xA;	C::Api: SimpleRuntimeApi&lt;Block, AccountId&gt;,&#xD;&#xA;	AccountId: Codec,&#xD;&#xA;{&#xD;&#xA;  fn is_true(&amp;self) -&gt; RpcResult&lt;bool&gt; {&#xD;&#xA;	let api = self.client.runtime_api();&#xD;&#xA;	let at = BlockId::hash(self.client.info().best_hash);&#xD;&#xA;	let runtime_api_result = api.is_true(&amp;at);&#xD;&#xA;	map_rpc_result(runtime_api_result)&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So following the test setup from https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/tests.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use substrate_test_runtime_client::{&#xD;&#xA;    runtime::Block, Client, Backend, DefaultTestClientBuilderExt,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;struct TestSetup {&#xD;&#xA;	pub client: Arc&lt;Client&lt;Backend&gt;&gt;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl Default for TestSetup {&#xD;&#xA;	fn default() -&gt; Self {&#xD;&#xA;		let client_builder = substrate_test_runtime_client::TestClientBuilder::new();&#xD;&#xA;		let client = Arc::new(client_builder.build());&#xD;&#xA;&#xD;&#xA;		TestSetup { client }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl TestSetup {&#xD;&#xA;	fn simple(&amp;self) -&gt; SimpleHandler&lt;Client&lt;Backend&gt;,Block&gt; {&#xD;&#xA;		SimpleHandler {&#xD;&#xA;			client: self.client.clone(),&#xD;&#xA;			_marker: Default::default(),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn into_rpc() -&gt; RpcModule&lt;SimpleHandler&lt;Client&lt;Backend&gt;, Block&gt;&gt; {&#xD;&#xA;		Self::default().simple().into_rpc()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[tokio::test]&#xD;&#xA;async fn testing_simple() {&#xD;&#xA;    let api = TestSetup::default().simple();&#xD;&#xA;&#xD;&#xA;    let rpc = api.into_rpc();&#xD;&#xA;&#xD;&#xA;    let response = rpc.call(&quot;&quot;).await.unwrap();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This fails with:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let rpc = api.into_rpc();&#xD;&#xA;         ^^^^^^^^ method cannot be called on `SimpleHandler&lt;...&gt;` due to unsatisfied trait bounds&#xD;&#xA;// ...&#xD;&#xA;C::Api: SimpleRuntimeApi&lt;Block, AccountId&gt;,&#xD;&#xA;             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound introduced here&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which makes since, as nothing in the test setup has an implementation for `SimpleRuntimeApi`. So how do I mock one and tell the client?&#xD;&#xA;&#xD;&#xA;My assumption is that I am missing part of the setup for [substrate_test_runtime_client][1] (Or perhaps I should actually be using [substrate_test_client][2] ?) but the examples around it are few. Always possible I'm barking up the wrong tree entirely.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate_test_runtime_client&#xD;&#xA;  [2]: https://crates.parity.io/substrate_test_client/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="19439" PostHistoryTypeId="1" PostId="5193" RevisionGUID="41a7d0da-de38-4c7c-ad34-100c30a3d1c8" CreationDate="2022-10-06T02:46:52.850" UserId="300" Text="Testing Custom RPC with a Mock Runtime API" ContentLicense="CC BY-SA 4.0" />
  <row Id="19440" PostHistoryTypeId="3" PostId="5193" RevisionGUID="41a7d0da-de38-4c7c-ad34-100c30a3d1c8" CreationDate="2022-10-06T02:46:52.850" UserId="300" Text="|testing|custom-rpc|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19441" PostHistoryTypeId="2" PostId="5194" RevisionGUID="2bf498f8-3cf3-4e99-b684-cc7333351e07" CreationDate="2022-10-06T04:45:56.517" UserId="251" Text="Both are easy to implement. But if it is an extrinsic call, you might need to pay more attention to the bandwidth/weight costs.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;One-time job in migration way.&#xD;&#xA;&#xD;&#xA;Find your `Executive` type in the runtime `lib.rs` and add a `TokenDistribution`:&#xD;&#xA;```rust&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;+	TokenDistribution,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Define the struct `TokenDistribution` and implement `OnRuntimeUpgrade` for it:&#xD;&#xA;```rust&#xD;&#xA;use frame_support::traits::OnRuntimeUpgrade;&#xD;&#xA;&#xD;&#xA;pub struct TokenDistribution;&#xD;&#xA;impl OnRuntimeUpgrade for TokenDistribution {&#xD;&#xA;	fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA;		let fund_account = x;&#xD;&#xA;		let distribute_amount = y;&#xD;&#xA;&#xD;&#xA;		load_user_list().into_iter().for_each(|user: AccountId| {&#xD;&#xA;				// `Balances` is the pallet name of your `pallet-balances` instance which defines in the runtime `lib.rs`			Balances::transfer(&#xD;&#xA;				Origin::signed(fund_account),&#xD;&#xA;				user.into(),&#xD;&#xA;				distribute_amount&#xD;&#xA;			);&#xD;&#xA;		});&#xD;&#xA;		&#xD;&#xA;		// Or you could calculate a more precise weight here&#xD;&#xA;		RuntimeBlockWeights::get().max_block&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In the next runtime upgrade, the distribution will be applied.&#xD;&#xA;&#xD;&#xA;I believe this is the cleanest way to do it.&#xD;&#xA;&#xD;&#xA;And remember to remove these codes before the next-next runtime upgrade." ContentLicense="CC BY-SA 4.0" />
  <row Id="19443" PostHistoryTypeId="5" PostId="5194" RevisionGUID="c150b152-2fe9-4d87-b83a-24ca03b67ab7" CreationDate="2022-10-06T04:51:06.980" UserId="251" Comment="added 23 characters in body" Text="Both are easy to implement. But if it is an extrinsic call, you might need to pay more attention to the bandwidth/weight costs.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;One-time job in migration way.&#xD;&#xA;&#xD;&#xA;Find your `Executive` type in the runtime `lib.rs` and add a `TokenDistribution`:&#xD;&#xA;```rust&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;+	TokenDistribution,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Define the struct `TokenDistribution` and implement `OnRuntimeUpgrade` for it:&#xD;&#xA;```rust&#xD;&#xA;use frame_support::traits::OnRuntimeUpgrade;&#xD;&#xA;&#xD;&#xA;pub struct TokenDistribution;&#xD;&#xA;impl OnRuntimeUpgrade for TokenDistribution {&#xD;&#xA;	fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA;		let fund_account = x;&#xD;&#xA;		let distribute_amount = y;&#xD;&#xA;&#xD;&#xA;		load_user_list().into_iter().for_each(|user: AccountId| {&#xD;&#xA;			// `Balances` is the pallet name of your `pallet-balances` &#xD;&#xA;			// instance which defines in the runtime `lib.rs`			&#xD;&#xA;			Balances::transfer(&#xD;&#xA;				Origin::signed(fund_account),&#xD;&#xA;				user.into(),&#xD;&#xA;				distribute_amount&#xD;&#xA;			);&#xD;&#xA;		});&#xD;&#xA;		&#xD;&#xA;		// Or you could calculate a more precise weight here&#xD;&#xA;		RuntimeBlockWeights::get().max_block&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In the next runtime upgrade, the distribution will be applied.&#xD;&#xA;&#xD;&#xA;I believe this is the cleanest way to do it.&#xD;&#xA;&#xD;&#xA;And remember to remove these codes before the next-next runtime upgrade." ContentLicense="CC BY-SA 4.0" />
  <row Id="19444" PostHistoryTypeId="2" PostId="5195" RevisionGUID="19102662-de64-459f-825e-33c54600bf11" CreationDate="2022-10-06T06:20:30.437" UserId="251" Text="If you don't need to change the existing items then you don't need a migration.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Actually, you could write some tests yourself. It's easy to verify that.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use parity_scale_codec::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;#[derive(Encode, Decode)]&#xD;&#xA;enum A {&#xD;&#xA;    B(B),&#xD;&#xA;    C(C),&#xD;&#xA;}&#xD;&#xA;#[derive(Encode, Decode)]&#xD;&#xA;enum B {&#xD;&#xA;    Ba,&#xD;&#xA;    Bb,&#xD;&#xA;    Bc,&#xD;&#xA;}&#xD;&#xA;#[derive(Encode, Decode)]&#xD;&#xA;enum C {&#xD;&#xA;    Ca,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(Encode, Decode)]&#xD;&#xA;enum NewA {&#xD;&#xA;    B(B),&#xD;&#xA;    NewC(NewC),&#xD;&#xA;}&#xD;&#xA;#[derive(Encode, Decode)]&#xD;&#xA;enum NewC {&#xD;&#xA;    Ca,&#xD;&#xA;    Cb,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    let a_ba = A::B(B::Ba);&#xD;&#xA;    let new_a_ba = NewA::B(B::Ba);&#xD;&#xA;&#xD;&#xA;    assert_eq!(a_ba.encode(), new_a_ba.encode());&#xD;&#xA;&#xD;&#xA;    let a_ca = A::C(C::Ca);&#xD;&#xA;    let new_a_ca = NewA::NewC(NewC::Ca);&#xD;&#xA;&#xD;&#xA;    assert_eq!(a_ca.encode(), new_a_ca.encode());&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19446" PostHistoryTypeId="2" PostId="5196" RevisionGUID="82b1b071-0d57-42ee-83ca-8cf0cb51a5ec" CreationDate="2022-10-06T06:46:15.967" UserId="2281" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LkQAV.png&#xD;&#xA;&#xD;&#xA;How can i generate this information while starting my chain???" ContentLicense="CC BY-SA 4.0" />
  <row Id="19448" PostHistoryTypeId="1" PostId="5196" RevisionGUID="82b1b071-0d57-42ee-83ca-8cf0cb51a5ec" CreationDate="2022-10-06T06:46:15.967" UserId="2281" Text="How to generate node information?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19449" PostHistoryTypeId="3" PostId="5196" RevisionGUID="82b1b071-0d57-42ee-83ca-8cf0cb51a5ec" CreationDate="2022-10-06T06:46:15.967" UserId="2281" Text="|substrate-node|polkadot-js|substrateinterface|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19450" PostHistoryTypeId="6" PostId="5196" RevisionGUID="ef4deb24-8c93-41bb-b8f1-2b851389fcd6" CreationDate="2022-10-06T07:16:29.607" UserId="627" Comment="edited tags" Text="|substrate-node|substrateinterface|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19451" PostHistoryTypeId="2" PostId="5197" RevisionGUID="d64991fe-97d5-4997-a13c-101cb12974c4" CreationDate="2022-10-06T07:27:21.640" UserId="3281" Text="I am trying to solve the following problem statement:-&#xD;&#xA;Contract A(*func1*) -&gt; Contract A(*func2*) -&gt; Contract B(*funcB*)&#xD;&#xA;&#xD;&#xA;so, *func1* will call *func2* and then *func2* will invoke multiple calls on different B contracts as per the payload. If any contract B call will revert, I need to revert all previous execution happened on contract B'. But at the same time some acknowledgement needs to be updated on Contract A. &#xD;&#xA;&#xD;&#xA;So, Just like in solidity I am reverting from *func2* and receiving that success flag in *func1* and then performing the business logic.&#xD;&#xA;So, How can i implement same *func1* to *func2* implementation in ink smart contracts?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19453" PostHistoryTypeId="1" PostId="5197" RevisionGUID="d64991fe-97d5-4997-a13c-101cb12974c4" CreationDate="2022-10-06T07:27:21.640" UserId="3281" Text="How can i implement re-entrancey in ink smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19454" PostHistoryTypeId="3" PostId="5197" RevisionGUID="d64991fe-97d5-4997-a13c-101cb12974c4" CreationDate="2022-10-06T07:27:21.640" UserId="3281" Text="|ink|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19455" PostHistoryTypeId="2" PostId="5198" RevisionGUID="b9e3e16f-1fdf-4614-b9db-68ee2d6c8ce0" CreationDate="2022-10-06T08:25:04.703" UserId="251" Text="I'm not sure if `sc_cli` provides these. AFAIK it didn't.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;But here is a general solution.&#xD;&#xA;&#xD;&#xA;Check this https://github.com/darwinia-network/darwinia/blob/12f3123d8c4d6fb8896d3f42dadb7b99a168fde1/cli/src/command.rs#L117-L122.&#xD;&#xA;&#xD;&#xA;You could put any log in your startup function.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&gt; https://github.com/zsiciarz/rust-cpuid&#xD;&#xA;```rust&#xD;&#xA;match cpuid::identify() {&#xD;&#xA;    Ok(info) =&gt; {&#xD;&#xA;        log::info!(&quot;Found: {} CPU, model: {}&quot;, info.vendor, info.codename);&#xD;&#xA;        log::info!(&quot;The full brand string is: {}&quot;, info.brand);&#xD;&#xA;        log::info!(&quot;Hardware AES support: {}&quot;, if info.has_feature(cpuid::CpuFeature::AES) { &quot;yes&quot; } else { &quot;no&quot; });&#xD;&#xA;    },&#xD;&#xA;    Err(err) =&gt; log::info!(&quot;cpuid error: {}&quot;, err),&#xD;&#xA;};&#xD;&#xA;match cpuid::clock_frequency() {&#xD;&#xA;    Some(frequency) =&gt; log::info!(&quot;CPU speed: {} MHz&quot;, frequency),&#xD;&#xA;    None =&gt; log::info!(&quot;Couldn't get CPU speed.&quot;),&#xD;&#xA;};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19457" PostHistoryTypeId="2" PostId="5199" RevisionGUID="8447735d-4ad3-4011-b46f-0633cd77d051" CreationDate="2022-10-06T08:35:03.220" UserId="567" Text="You can use [call_builder][1] to allow reentrancy&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AstarNetwork/astar-wasm-contracts-examples/blob/5c6312ec1492f1d018508103408690b6391e997e/uniswap-v2/logics/impls/pair/pair.rs#L316" ContentLicense="CC BY-SA 4.0" />
  <row Id="19459" PostHistoryTypeId="2" PostId="5200" RevisionGUID="9f7e27a6-c406-4dc3-8be0-67fdea3f4502" CreationDate="2022-10-06T08:38:40.657" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="19461" PostHistoryTypeId="1" PostId="5200" RevisionGUID="9f7e27a6-c406-4dc3-8be0-67fdea3f4502" CreationDate="2022-10-06T08:38:40.657" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="19462" PostHistoryTypeId="2" PostId="5201" RevisionGUID="c996eec1-5656-4331-8ec2-d57883ee45d0" CreationDate="2022-10-06T08:38:40.657" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="19464" PostHistoryTypeId="1" PostId="5201" RevisionGUID="c996eec1-5656-4331-8ec2-d57883ee45d0" CreationDate="2022-10-06T08:38:40.657" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="19465" PostHistoryTypeId="2" PostId="5202" RevisionGUID="4f758906-77fb-4141-9c1e-fc42dadc0563" CreationDate="2022-10-06T09:20:48.430" UserId="3122" Text="Got the same issue. In my case it was an extra dependency in a custom pallet.&#xD;&#xA;After remove `frame-benchmarking = { version = &quot;4.0.0-dev&quot;, path = &quot;../../frame/benchmarking&quot; }` it compiled." ContentLicense="CC BY-SA 4.0" />
  <row Id="19467" PostHistoryTypeId="2" PostId="5203" RevisionGUID="fb653bc0-b4b3-45d1-a453-63fe79b9e1ff" CreationDate="2022-10-06T09:25:04.433" UserId="1867" Text="`pallet-contract` has a build in re-entrancy detection and re-entrancy is prevented by default. Indeed, you can allow for re-entrancy by setting the correct `CallFlags`, see:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/ink/ink_env/struct.CallFlags.html&#xD;&#xA;&#xD;&#xA;I'd advise you to check how cross contract calls are build in the upgradable contracts example:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/ink/blob/master/examples/upgradeable-contracts/forward-calls/lib.rs#L72&#xD;&#xA;&#xD;&#xA;Just that you need to set `.set_forward_input(true)` flag in addition when building the cross-contract call." ContentLicense="CC BY-SA 4.0" />
  <row Id="19469" PostHistoryTypeId="5" PostId="5202" RevisionGUID="a72dc436-8671-4e60-8c8e-32277c1418c2" CreationDate="2022-10-06T09:26:25.887" UserId="3122" Comment="added 2 characters in body" Text="Got the same issue. In my case it was an extra dependency in a custom pallet.&#xD;&#xA;After removштп `frame-benchmarking = { version = &quot;4.0.0-dev&quot;, path = &quot;../../frame/benchmarking&quot; }` it compiled." ContentLicense="CC BY-SA 4.0" />
  <row Id="19470" PostHistoryTypeId="5" PostId="5202" RevisionGUID="5e60b342-f470-434b-9568-e1b0c4e0021c" CreationDate="2022-10-06T09:26:57.500" UserId="3122" Comment="added 13 characters in body" Text="I've just solved the same issue. In my case it was an extra dependency in a custom pallet.&#xD;&#xA;After removштп `frame-benchmarking = { version = &quot;4.0.0-dev&quot;, path = &quot;../../frame/benchmarking&quot; }` it compiled." ContentLicense="CC BY-SA 4.0" />
  <row Id="19471" PostHistoryTypeId="5" PostId="5202" RevisionGUID="3b96e1da-d73d-49b7-83b5-e8b9e6d04992" CreationDate="2022-10-06T09:27:20.477" UserId="3122" Comment="edited body" Text="I've just solved the same issue. In my case it was an extra dependency in a custom pallet.&#xD;&#xA;After removing `frame-benchmarking = { version = &quot;4.0.0-dev&quot;, path = &quot;../../frame/benchmarking&quot; }` it compiled." ContentLicense="CC BY-SA 4.0" />
  <row Id="19472" PostHistoryTypeId="5" PostId="5202" RevisionGUID="a258122a-d299-42e0-a4a7-451064dd4bbf" CreationDate="2022-10-06T09:28:09.920" UserId="3122" Comment="added 16 characters in body" Text="I've just solved the same issue. In my case it was an extra dependency in a custom pallet.&#xD;&#xA;After removing `frame-benchmarking = { version = &quot;4.0.0-dev&quot;, path = &quot;../../frame/benchmarking&quot; }` from Cargo.toml it compiled." ContentLicense="CC BY-SA 4.0" />
  <row Id="19478" PostHistoryTypeId="4" PostId="5197" RevisionGUID="7dffca3a-4155-42d3-bbe1-948bcfc03f3e" CreationDate="2022-10-06T09:33:03.950" UserId="1867" Comment="fixed spelling, write ink! with exclamation mark" Text="How can i implement re-entrancy in ink! smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19479" PostHistoryTypeId="24" PostId="5197" RevisionGUID="7dffca3a-4155-42d3-bbe1-948bcfc03f3e" CreationDate="2022-10-06T09:33:03.950" Comment="Proposed by 1867 approved by 3281 edit id of 301" ContentLicense="CC BY-SA 4.0" />
  <row Id="19480" PostHistoryTypeId="2" PostId="5205" RevisionGUID="5ba05c7b-1b03-4262-8e52-583957e3df42" CreationDate="2022-10-06T09:42:46.547" UserId="2663" Text="I'm trying to use `frame_support::traits::FindAuthor` in my pallet for a custom logic.&#xD;&#xA;&#xD;&#xA;I imported the traits and I tried to loose coupling it.&#xD;&#xA;&#xD;&#xA;this is my config:&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;&#xD;&#xA;		type FindAuthor: FindAuthor&lt;Self::AccountId&gt;;&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;So now I want to use `find_author()` function of this trait &#xD;&#xA;```rust&#xD;&#xA;let author = T::FindAuthor::find_author(digests???);&#xD;&#xA;```&#xD;&#xA;but I'm stuck with the digests param, I don't understand what &quot;digests&quot; means and how to pass it in order to get the author." ContentLicense="CC BY-SA 4.0" />
  <row Id="19482" PostHistoryTypeId="1" PostId="5205" RevisionGUID="5ba05c7b-1b03-4262-8e52-583957e3df42" CreationDate="2022-10-06T09:42:46.547" UserId="2663" Text="How to use frame support FindAuthor trait in a custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="19483" PostHistoryTypeId="3" PostId="5205" RevisionGUID="5ba05c7b-1b03-4262-8e52-583957e3df42" CreationDate="2022-10-06T09:42:46.547" UserId="2663" Text="|pallet|authorship|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19484" PostHistoryTypeId="2" PostId="5206" RevisionGUID="ab582d5c-b96b-494a-a727-9319b8bedf42" CreationDate="2022-10-06T09:57:10.267" UserId="2673" Text="These are pre-runtime digests, which as [the documentation](https://paritytech.github.io/substrate/master/sp_runtime/generic/enum.DigestItem.html#variant.PreRuntime) says are&#xD;&#xA;&#xD;&#xA;&gt; messages from the consensus engine to the runtime, although the consensus engine can (and should) read them itself to avoid code and state duplication. It is erroneous for a runtime to produce these, but this is not (yet) checked.&#xD;&#xA;&#xD;&#xA;You can obtain digests for the current block like this:&#xD;&#xA;```rust&#xD;&#xA;let block_digest = &lt;frame_system::Pallet&lt;T&gt;&gt;::digest();&#xD;&#xA;let digests = block_digest.logs.iter().filter_map(|d| d.as_pre_runtime());&#xD;&#xA;let author = T::FindAuthor::find_author(digests);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19486" PostHistoryTypeId="5" PostId="5178" RevisionGUID="a80126d3-6893-44da-9a11-89557066ae07" CreationDate="2022-10-06T09:59:19.687" UserId="2673" Comment="added 66 characters in body" Text="I suspect the problem in your approach is using fully qualified paths for the first and fourth argument. Checking in [the docs](https://paritytech.github.io/substrate/master/frame_benchmarking/macro.impl_benchmark_test_suite.html#arguments) I found the following information:&#xD;&#xA;&gt; because of macro syntax limitations, neither Pallet nor benches can be paths, but both have to be idents in the scope of `impl_benchmark_test_suite`.&#xD;&#xA;&#xD;&#xA;So I guess you might try doing something like this:&#xD;&#xA;```rust&#xD;&#xA;use my_pallet_1::{Pallet as Pallet1, benchmarking as bench1};&#xD;&#xA;&#xD;&#xA;impl_benchmark_test_suite!(&#xD;&#xA;    Pallet1,&#xD;&#xA;    crate::mock::ExtBuilder::default().build(),&#xD;&#xA;    crate::mock::Test,&#xD;&#xA;    benchmarks_path = bench1&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I haven't tested it though, it's just my suggestion based on the docs.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;EDIT: This **doesn't work**, unfortunately. See comments." ContentLicense="CC BY-SA 4.0" />
  <row Id="19487" PostHistoryTypeId="5" PostId="3819" RevisionGUID="bec78c90-fd58-4fc8-8b3c-4c77ee7201f4" CreationDate="2022-10-06T09:59:52.253" UserId="2025" Comment="add new tools relevant to the question" Text="Not a direct answer to the question but I think this will be useful:&#xD;&#xA;&#xD;&#xA;Polkaholic.io just released [this block indexer](https://polkaholic.io/chain/polkadot#recentblocks) where you can monitor every XCM message [sent](https://polkaholic.io/xcmmessages/polkadot/all) and [received](https://polkaholic.io/xcmmessages/all/polkadot) from/in the relay chain. You can also explore submitted extrinsics from the XCM pallet and monitor [their timeline](https://polkaholic.io/timeline/0xb1776894d4b57807c8d27e15c5b93f5bf234bc331efecb2c37844e8723a9ec0c) from chain to chain.&#xD;&#xA;&#xD;&#xA;Note that it is the first version of this indexer tool so expect changes and improvements to be made.&#xD;&#xA;&#xD;&#xA;**Edit**: Subscan added recently [this beautiful interface](https://polkadot.subscan.io/xcm_dashboard) to keep track of every XCM message sent between parachain-parachain and parachain-relay chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="19488" PostHistoryTypeId="5" PostId="5155" RevisionGUID="0d242104-435d-4407-a380-4113c457410d" CreationDate="2022-10-06T11:19:41.310" UserId="2673" Comment="Rust syntax highlighting" Text="You could use the `pallet-scheduler`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pallet_scheduler::Pallet::&lt;T&gt;::schedule(&#xD;&#xA;     Origin::root(), // Depending on what you have configured as `ScheduleOrigin` in the runtime for scheduler&#xD;&#xA;     when,&#xD;&#xA;     None, // or Some if it should be periodic&#xD;&#xA;     priority,&#xD;&#xA;     Box::new(Call::Whatever {}), // The actual call that should be scheduled&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can also program this on your own using `on_initialize`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn on_initialize(now: T::BlockNumber) -&gt; Weight {&#xD;&#xA;    if now == expected_number {&#xD;&#xA;        // do whatever you want to do.&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19489" PostHistoryTypeId="24" PostId="5155" RevisionGUID="0d242104-435d-4407-a380-4113c457410d" CreationDate="2022-10-06T11:19:41.310" Comment="Proposed by 2673 approved by 94, 85 edit id of 302" ContentLicense="CC BY-SA 4.0" />
  <row Id="19490" PostHistoryTypeId="6" PostId="4174" RevisionGUID="c28a5fa9-5667-4a1c-8254-d27156035c01" CreationDate="2022-10-06T11:32:25.120" UserId="45" Comment="edited tags" Text="|pallet|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19491" PostHistoryTypeId="2" PostId="5207" RevisionGUID="d7be6a36-1931-4191-9c82-7a3759653bf4" CreationDate="2022-10-06T11:32:38.267" UserId="3281" Text="Add the following changes in your contact **Cargo.toml** &#xD;&#xA;&#xD;&#xA;    [dependencies]&#xD;&#xA;    ethabi = { path = &quot;../ethabi&quot;, default-features = false } &#xD;&#xA;    hex = { version = &quot;0.4.3&quot;, default-features = false } &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [profile.release] &#xD;&#xA;    overflow-checks = false" ContentLicense="CC BY-SA 4.0" />
  <row Id="19493" PostHistoryTypeId="2" PostId="5208" RevisionGUID="1fcca323-1332-4640-bdc5-8d3d67b771e6" CreationDate="2022-10-06T12:18:50.203" UserId="298" Text="We're updating our relay chain test and its time to create a chain spec. &#xD;&#xA;&#xD;&#xA;When i try to add validators and balances to the new chain spec I dont know where to add it. I append it to the end after `&quot;childrenDefault&quot;: {},` but i get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: &#xD;&#xA;   0: Other: Error parsing spec file: unknown field `babe`, expected `top` or `childrenDefault` at line 11677 column 12&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The docs on substrate don't tell me how i can add anything. Where can i find how to structure a plain chain spec, so that i can then make a raw chain spec?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19497" PostHistoryTypeId="1" PostId="5208" RevisionGUID="1fcca323-1332-4640-bdc5-8d3d67b771e6" CreationDate="2022-10-06T12:18:50.203" UserId="298" Text="When there is a new Chain Spec version how do we know where to add things?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19499" PostHistoryTypeId="3" PostId="5208" RevisionGUID="1fcca323-1332-4640-bdc5-8d3d67b771e6" CreationDate="2022-10-06T12:18:50.203" UserId="298" Text="|polkadot|rococo|relay-chain|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19501" PostHistoryTypeId="5" PostId="5208" RevisionGUID="7f7b3eb0-2f54-4dee-8de6-94e671f94841" CreationDate="2022-10-06T12:34:42.337" UserId="298" Comment="added 6901 characters in body" Text="We're updating our relay chain test and its time to create a chain spec. &#xD;&#xA;&#xD;&#xA;When i try to add validators and balances to the new chain spec I dont know where to add it. I append it to the end after `&quot;childrenDefault&quot;: {},` but i get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: &#xD;&#xA;   0: Other: Error parsing spec file: unknown field `babe`, expected `top` or `childrenDefault` at line 11677 column 12&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The docs on substrate don't tell me where to add things like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;babe&quot;: {&#xD;&#xA;          &quot;authorities&quot;: [],&#xD;&#xA;          &quot;epochConfig&quot;: {&#xD;&#xA;            &quot;c&quot;: [&#xD;&#xA;              1,&#xD;&#xA;              4&#xD;&#xA;            ],&#xD;&#xA;            &quot;allowed_slots&quot;: &quot;PrimaryAndSecondaryVRFSlots&quot;&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;indices&quot;: {&#xD;&#xA;          &quot;indices&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;balances&quot;: {&#xD;&#xA;          &quot;balances&quot;: [&#xD;&#xA;            [&#xD;&#xA;              &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;              1000000000000000000&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5CdEXeeTzGDxgtMtXPTte71ManNn39QmFCSxCTzsqdwdejrs&quot;,&#xD;&#xA;              100000000000000&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5H6bg61yQzQBXcnuBbDzX4Nue5mJgGqhPj9HDJ8Kg5nn9Jem&quot;,&#xD;&#xA;              100000000000000&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5CQ7S9CMzpqft1zEk6fr5uzxLhsc7zhNScvVa3YiGmmoSSVg&quot;,&#xD;&#xA;              100000000000000&#xD;&#xA;            ]&#xD;&#xA;          ]&#xD;&#xA;        },&#xD;&#xA;        &quot;transactionPayment&quot;: null,&#xD;&#xA;        &quot;session&quot;: {&#xD;&#xA;          &quot;keys&quot;: [&#xD;&#xA;            [&#xD;&#xA;              &quot;5CdEXeeTzGDxgtMtXPTte71ManNn39QmFCSxCTzsqdwdejrs&quot;,&#xD;&#xA;              &quot;5CdEXeeTzGDxgtMtXPTte71ManNn39QmFCSxCTzsqdwdejrs&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5GboBX4hqNVopiBQVsXWAw3SzD5dpKxqjK3iDA38GPxJEi6w&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5HTALD3kTwmDHNKEKxsquepU56Quzq59xKGmhksekpcF3C5T&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5ELHgNfi7bXWmmoyjdmBnY3B2MPBXgyAesdRkpC4Kgwm5ZUd&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5GxMs7yfgUtsG8zqU2412HAihc8NZ1jtMX69z6sdnSQKPwY2&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5Dqxxx4CbppCEuMFqiHNNVXNGBptsG1PJyDW7kv7GTmPQQGR&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5DksLz7S316tdyDg554mhCCYmBhkYbR7XQnWHtft3Kowatat&quot;,&#xD;&#xA;                &quot;beefy&quot;: &quot;KWBh8XBfoyenpdXN5qY1deY6tpkN2Hvw4skhERZRi2neimHBR&quot;&#xD;&#xA;              }&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5H6bg61yQzQBXcnuBbDzX4Nue5mJgGqhPj9HDJ8Kg5nn9Jem&quot;,&#xD;&#xA;              &quot;5H6bg61yQzQBXcnuBbDzX4Nue5mJgGqhPj9HDJ8Kg5nn9Jem&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5FUibppET3z3SRqbfgGAzMTRUgBcdVzWw2Kv9pCsQLd6qsp8&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5CcLtfQuroSgXRYgcVacAAopnF8gN1PrJEGdqxTgh9ZvUzHK&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5HpSZnVXxhFpfVdBRxxnPgg4okeMKEHyxR7c2zU5TcTJZiq8&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5HjAJp37Bjamrnc1vsGGG2aqWDh7osgszzc9Eb7NP3S7GPEa&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5Cu9mwCPHm6uybwLJy4zQFTH5TjTLBu37uUgaUogWqZjpv4e&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5D5VTDy2mwbC51yuco6SsafSjxqqz3SrtakDr2T23Lavhh6p&quot;,&#xD;&#xA;                &quot;beefy&quot;: &quot;KW3FkcrJAy6Z5ysiRQupzvP4dcwfSnJCBwjtGsSsgcBwhapCv&quot;&#xD;&#xA;              }&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5CQ7S9CMzpqft1zEk6fr5uzxLhsc7zhNScvVa3YiGmmoSSVg&quot;,&#xD;&#xA;              &quot;5CQ7S9CMzpqft1zEk6fr5uzxLhsc7zhNScvVa3YiGmmoSSVg&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5EX7Uw8VbNgDtdEbTa3rGVkR7VsGcPoFpFfPYs4iexyKVw72&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5Gekpirt85FG8J3eaZGyCbx8CT64oPrTPXCXmUqAU1tvrb1U&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5FLZ8nsw6v1tKQ4dAfbMX5z6cH33m4iVBmKiABR5uRx1x1Ay&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5Gmub5hEKcrmS53QE2Ls6afE7YhsFQTepPUqhF9vFipkterU&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5Hg2T4obKFrXyrCvtdpVSMT7Fru7VSBTdtKEDXFXQaXUHXk9&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5CcgDBN7sWqf5bq3AnVXffAX2rCApivCPGc4imRmB6Da3gyX&quot;,&#xD;&#xA;                &quot;beefy&quot;: &quot;KWDc8ncrJx3NtMFeKxNMGpqU1FrnJTR2Yf1aqFdxNRP2ihJex&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          ]&#xD;&#xA;        },&#xD;&#xA;        &quot;grandpa&quot;: {&#xD;&#xA;          &quot;authorities&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;imOnline&quot;: {&#xD;&#xA;          &quot;keys&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;authorityDiscovery&quot;: {&#xD;&#xA;          &quot;keys&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;configuration&quot;: {&#xD;&#xA;          &quot;config&quot;: {&#xD;&#xA;            &quot;max_code_size&quot;: 3145728,&#xD;&#xA;            &quot;max_head_data_size&quot;: 32768,&#xD;&#xA;            &quot;max_upward_queue_count&quot;: 8,&#xD;&#xA;            &quot;max_upward_queue_size&quot;: 1048576,&#xD;&#xA;            &quot;max_upward_message_size&quot;: 1048576,&#xD;&#xA;            &quot;max_upward_message_num_per_candidate&quot;: 5,&#xD;&#xA;            &quot;hrmp_max_message_num_per_candidate&quot;: 5,&#xD;&#xA;            &quot;validation_upgrade_cooldown&quot;: 2,&#xD;&#xA;            &quot;validation_upgrade_delay&quot;: 2,&#xD;&#xA;            &quot;max_pov_size&quot;: 5242880,&#xD;&#xA;            &quot;max_downward_message_size&quot;: 1048576,&#xD;&#xA;            &quot;ump_service_total_weight&quot;: 100000000000,&#xD;&#xA;            &quot;hrmp_max_parachain_outbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_max_parathread_outbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_sender_deposit&quot;: 0,&#xD;&#xA;            &quot;hrmp_recipient_deposit&quot;: 0,&#xD;&#xA;            &quot;hrmp_channel_max_capacity&quot;: 8,&#xD;&#xA;            &quot;hrmp_channel_max_total_size&quot;: 8192,&#xD;&#xA;            &quot;hrmp_max_parachain_inbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_max_parathread_inbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_channel_max_message_size&quot;: 1048576,&#xD;&#xA;            &quot;code_retention_period&quot;: 1200,&#xD;&#xA;            &quot;parathread_cores&quot;: 0,&#xD;&#xA;            &quot;parathread_retries&quot;: 0,&#xD;&#xA;            &quot;group_rotation_frequency&quot;: 20,&#xD;&#xA;            &quot;chain_availability_period&quot;: 4,&#xD;&#xA;            &quot;thread_availability_period&quot;: 4,&#xD;&#xA;            &quot;scheduling_lookahead&quot;: 0,&#xD;&#xA;            &quot;max_validators_per_core&quot;: null,&#xD;&#xA;            &quot;max_validators&quot;: null,&#xD;&#xA;            &quot;dispute_period&quot;: 6,&#xD;&#xA;            &quot;dispute_post_conclusion_acceptance_period&quot;: 100,&#xD;&#xA;            &quot;dispute_max_spam_slots&quot;: 2,&#xD;&#xA;            &quot;dispute_conclusion_by_time_out_period&quot;: 200,&#xD;&#xA;            &quot;no_show_slots&quot;: 2,&#xD;&#xA;            &quot;n_delay_tranches&quot;: 25,&#xD;&#xA;            &quot;zeroth_delay_tranche_width&quot;: 0,&#xD;&#xA;            &quot;needed_approvals&quot;: 2,&#xD;&#xA;            &quot;relay_vrf_modulo_samples&quot;: 2,&#xD;&#xA;            &quot;ump_max_individual_weight&quot;: 20000000000,&#xD;&#xA;            &quot;pvf_checking_enabled&quot;: false,&#xD;&#xA;            &quot;pvf_voting_ttl&quot;: 2,&#xD;&#xA;            &quot;minimum_validation_upgrade_delay&quot;: 5&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;paras&quot;: {&#xD;&#xA;          &quot;paras&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;hrmp&quot;: {&#xD;&#xA;          &quot;preopenHrmpChannels&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;registrar&quot;: {&#xD;&#xA;          &quot;nextFreeParaId&quot;: 2000&#xD;&#xA;        },&#xD;&#xA;        &quot;sudo&quot;: {&#xD;&#xA;          &quot;key&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;beefy&quot;: {&#xD;&#xA;          &quot;authorities&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeRococoGrandpa&quot;: {&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;initData&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeWococoGrandpa&quot;: {&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;initData&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeRococoMessages&quot;: {&#xD;&#xA;          &quot;operatingMode&quot;: &quot;Normal&quot;,&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;phantom&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeWococoMessages&quot;: {&#xD;&#xA;          &quot;operatingMode&quot;: &quot;Normal&quot;,&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;phantom&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;collective&quot;: {&#xD;&#xA;          &quot;phantom&quot;: null,&#xD;&#xA;          &quot;members&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;membership&quot;: {&#xD;&#xA;          &quot;members&quot;: [],&#xD;&#xA;          &quot;phantom&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;xcmPallet&quot;: {&#xD;&#xA;          &quot;safeXcmVersion&quot;: 2&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;session_length_in_blocks&quot;: null&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;Where can i find how to structure a plain chain spec?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19505" PostHistoryTypeId="5" PostId="5208" RevisionGUID="362c6011-c214-4582-b347-742d258d8a71" CreationDate="2022-10-06T12:53:14.143" UserId="298" Comment="added 610 characters in body" Text="We're updating our relay chain test and its time to create a chain spec. &#xD;&#xA;&#xD;&#xA;When i generate a plain chain spec it seems i still get some raw output:&#xD;&#xA;&#xD;&#xA;`./target/release/polkadot build-spec &gt; new-spec.json`&#xD;&#xA;&#xD;&#xA;I get a structure i am not familiar with, something called codeSubstitutes, where it seems the wasm blob goes. but in genesis &gt; raw &gt; top, where the wasm used to go is now encoded data. &#xD;&#xA;&#xD;&#xA;In a plain spec file i do not want encoded data. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;codeSubstitutes&quot;: {&#xD;&#xA;    &quot;5203203&quot;: &quot;0x0061736d01000000...&#xD;&#xA;  }&#xD;&#xA;&quot;genesis&quot;: {&#xD;&#xA;    &quot;raw&quot;: {&#xD;&#xA;      &quot;top&quot;: {&#xD;&#xA;        &quot;0x0b76934f4cc08dee01012d059e1b83ee5e0621c4869aa60c02be9adcc98a0d1d&quot;: &quot;0x1856f0bb1f6307...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When i try to add validators and balances to the new chain spec I am not sure where it should be put. I append it to the end after `&quot;childrenDefault&quot;: {},` but i get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: &#xD;&#xA;   0: Other: Error parsing spec file: unknown field `babe`, expected `top` or `childrenDefault` at line 11677 column 12&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The docs on substrate don't tell me where to add things like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;babe&quot;: {&#xD;&#xA;          &quot;authorities&quot;: [],&#xD;&#xA;          &quot;epochConfig&quot;: {&#xD;&#xA;            &quot;c&quot;: [&#xD;&#xA;              1,&#xD;&#xA;              4&#xD;&#xA;            ],&#xD;&#xA;            &quot;allowed_slots&quot;: &quot;PrimaryAndSecondaryVRFSlots&quot;&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;indices&quot;: {&#xD;&#xA;          &quot;indices&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;balances&quot;: {&#xD;&#xA;          &quot;balances&quot;: [&#xD;&#xA;            [&#xD;&#xA;              &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;              1000000000000000000&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5CdEXeeTzGDxgtMtXPTte71ManNn39QmFCSxCTzsqdwdejrs&quot;,&#xD;&#xA;              100000000000000&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5H6bg61yQzQBXcnuBbDzX4Nue5mJgGqhPj9HDJ8Kg5nn9Jem&quot;,&#xD;&#xA;              100000000000000&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5CQ7S9CMzpqft1zEk6fr5uzxLhsc7zhNScvVa3YiGmmoSSVg&quot;,&#xD;&#xA;              100000000000000&#xD;&#xA;            ]&#xD;&#xA;          ]&#xD;&#xA;        },&#xD;&#xA;        &quot;transactionPayment&quot;: null,&#xD;&#xA;        &quot;session&quot;: {&#xD;&#xA;          &quot;keys&quot;: [&#xD;&#xA;            [&#xD;&#xA;              &quot;5CdEXeeTzGDxgtMtXPTte71ManNn39QmFCSxCTzsqdwdejrs&quot;,&#xD;&#xA;              &quot;5CdEXeeTzGDxgtMtXPTte71ManNn39QmFCSxCTzsqdwdejrs&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5GboBX4hqNVopiBQVsXWAw3SzD5dpKxqjK3iDA38GPxJEi6w&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5HTALD3kTwmDHNKEKxsquepU56Quzq59xKGmhksekpcF3C5T&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5ELHgNfi7bXWmmoyjdmBnY3B2MPBXgyAesdRkpC4Kgwm5ZUd&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5GxMs7yfgUtsG8zqU2412HAihc8NZ1jtMX69z6sdnSQKPwY2&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5Dqxxx4CbppCEuMFqiHNNVXNGBptsG1PJyDW7kv7GTmPQQGR&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5DksLz7S316tdyDg554mhCCYmBhkYbR7XQnWHtft3Kowatat&quot;,&#xD;&#xA;                &quot;beefy&quot;: &quot;KWBh8XBfoyenpdXN5qY1deY6tpkN2Hvw4skhERZRi2neimHBR&quot;&#xD;&#xA;              }&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5H6bg61yQzQBXcnuBbDzX4Nue5mJgGqhPj9HDJ8Kg5nn9Jem&quot;,&#xD;&#xA;              &quot;5H6bg61yQzQBXcnuBbDzX4Nue5mJgGqhPj9HDJ8Kg5nn9Jem&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5FUibppET3z3SRqbfgGAzMTRUgBcdVzWw2Kv9pCsQLd6qsp8&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5CcLtfQuroSgXRYgcVacAAopnF8gN1PrJEGdqxTgh9ZvUzHK&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5HpSZnVXxhFpfVdBRxxnPgg4okeMKEHyxR7c2zU5TcTJZiq8&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5HjAJp37Bjamrnc1vsGGG2aqWDh7osgszzc9Eb7NP3S7GPEa&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5Cu9mwCPHm6uybwLJy4zQFTH5TjTLBu37uUgaUogWqZjpv4e&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5D5VTDy2mwbC51yuco6SsafSjxqqz3SrtakDr2T23Lavhh6p&quot;,&#xD;&#xA;                &quot;beefy&quot;: &quot;KW3FkcrJAy6Z5ysiRQupzvP4dcwfSnJCBwjtGsSsgcBwhapCv&quot;&#xD;&#xA;              }&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5CQ7S9CMzpqft1zEk6fr5uzxLhsc7zhNScvVa3YiGmmoSSVg&quot;,&#xD;&#xA;              &quot;5CQ7S9CMzpqft1zEk6fr5uzxLhsc7zhNScvVa3YiGmmoSSVg&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5EX7Uw8VbNgDtdEbTa3rGVkR7VsGcPoFpFfPYs4iexyKVw72&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5Gekpirt85FG8J3eaZGyCbx8CT64oPrTPXCXmUqAU1tvrb1U&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5FLZ8nsw6v1tKQ4dAfbMX5z6cH33m4iVBmKiABR5uRx1x1Ay&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5Gmub5hEKcrmS53QE2Ls6afE7YhsFQTepPUqhF9vFipkterU&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5Hg2T4obKFrXyrCvtdpVSMT7Fru7VSBTdtKEDXFXQaXUHXk9&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5CcgDBN7sWqf5bq3AnVXffAX2rCApivCPGc4imRmB6Da3gyX&quot;,&#xD;&#xA;                &quot;beefy&quot;: &quot;KWDc8ncrJx3NtMFeKxNMGpqU1FrnJTR2Yf1aqFdxNRP2ihJex&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          ]&#xD;&#xA;        },&#xD;&#xA;        &quot;grandpa&quot;: {&#xD;&#xA;          &quot;authorities&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;imOnline&quot;: {&#xD;&#xA;          &quot;keys&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;authorityDiscovery&quot;: {&#xD;&#xA;          &quot;keys&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;configuration&quot;: {&#xD;&#xA;          &quot;config&quot;: {&#xD;&#xA;            &quot;max_code_size&quot;: 3145728,&#xD;&#xA;            &quot;max_head_data_size&quot;: 32768,&#xD;&#xA;            &quot;max_upward_queue_count&quot;: 8,&#xD;&#xA;            &quot;max_upward_queue_size&quot;: 1048576,&#xD;&#xA;            &quot;max_upward_message_size&quot;: 1048576,&#xD;&#xA;            &quot;max_upward_message_num_per_candidate&quot;: 5,&#xD;&#xA;            &quot;hrmp_max_message_num_per_candidate&quot;: 5,&#xD;&#xA;            &quot;validation_upgrade_cooldown&quot;: 2,&#xD;&#xA;            &quot;validation_upgrade_delay&quot;: 2,&#xD;&#xA;            &quot;max_pov_size&quot;: 5242880,&#xD;&#xA;            &quot;max_downward_message_size&quot;: 1048576,&#xD;&#xA;            &quot;ump_service_total_weight&quot;: 100000000000,&#xD;&#xA;            &quot;hrmp_max_parachain_outbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_max_parathread_outbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_sender_deposit&quot;: 0,&#xD;&#xA;            &quot;hrmp_recipient_deposit&quot;: 0,&#xD;&#xA;            &quot;hrmp_channel_max_capacity&quot;: 8,&#xD;&#xA;            &quot;hrmp_channel_max_total_size&quot;: 8192,&#xD;&#xA;            &quot;hrmp_max_parachain_inbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_max_parathread_inbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_channel_max_message_size&quot;: 1048576,&#xD;&#xA;            &quot;code_retention_period&quot;: 1200,&#xD;&#xA;            &quot;parathread_cores&quot;: 0,&#xD;&#xA;            &quot;parathread_retries&quot;: 0,&#xD;&#xA;            &quot;group_rotation_frequency&quot;: 20,&#xD;&#xA;            &quot;chain_availability_period&quot;: 4,&#xD;&#xA;            &quot;thread_availability_period&quot;: 4,&#xD;&#xA;            &quot;scheduling_lookahead&quot;: 0,&#xD;&#xA;            &quot;max_validators_per_core&quot;: null,&#xD;&#xA;            &quot;max_validators&quot;: null,&#xD;&#xA;            &quot;dispute_period&quot;: 6,&#xD;&#xA;            &quot;dispute_post_conclusion_acceptance_period&quot;: 100,&#xD;&#xA;            &quot;dispute_max_spam_slots&quot;: 2,&#xD;&#xA;            &quot;dispute_conclusion_by_time_out_period&quot;: 200,&#xD;&#xA;            &quot;no_show_slots&quot;: 2,&#xD;&#xA;            &quot;n_delay_tranches&quot;: 25,&#xD;&#xA;            &quot;zeroth_delay_tranche_width&quot;: 0,&#xD;&#xA;            &quot;needed_approvals&quot;: 2,&#xD;&#xA;            &quot;relay_vrf_modulo_samples&quot;: 2,&#xD;&#xA;            &quot;ump_max_individual_weight&quot;: 20000000000,&#xD;&#xA;            &quot;pvf_checking_enabled&quot;: false,&#xD;&#xA;            &quot;pvf_voting_ttl&quot;: 2,&#xD;&#xA;            &quot;minimum_validation_upgrade_delay&quot;: 5&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;paras&quot;: {&#xD;&#xA;          &quot;paras&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;hrmp&quot;: {&#xD;&#xA;          &quot;preopenHrmpChannels&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;registrar&quot;: {&#xD;&#xA;          &quot;nextFreeParaId&quot;: 2000&#xD;&#xA;        },&#xD;&#xA;        &quot;sudo&quot;: {&#xD;&#xA;          &quot;key&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;beefy&quot;: {&#xD;&#xA;          &quot;authorities&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeRococoGrandpa&quot;: {&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;initData&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeWococoGrandpa&quot;: {&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;initData&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeRococoMessages&quot;: {&#xD;&#xA;          &quot;operatingMode&quot;: &quot;Normal&quot;,&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;phantom&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeWococoMessages&quot;: {&#xD;&#xA;          &quot;operatingMode&quot;: &quot;Normal&quot;,&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;phantom&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;collective&quot;: {&#xD;&#xA;          &quot;phantom&quot;: null,&#xD;&#xA;          &quot;members&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;membership&quot;: {&#xD;&#xA;          &quot;members&quot;: [],&#xD;&#xA;          &quot;phantom&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;xcmPallet&quot;: {&#xD;&#xA;          &quot;safeXcmVersion&quot;: 2&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;session_length_in_blocks&quot;: null&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;Where can i find how to structure a plain chain spec?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19506" PostHistoryTypeId="5" PostId="5208" RevisionGUID="e222fbd5-b6d4-4728-b751-f50ec44a5a49" CreationDate="2022-10-06T13:01:32.260" UserId="298" Comment="added 52 characters in body" Text="We're updating our relay chain test and its time to create a chain spec. &#xD;&#xA;&#xD;&#xA;When i generate a plain chain spec (from polkadot repo) it seems i still get some raw output:&#xD;&#xA;&#xD;&#xA;`./target/release/polkadot build-spec &gt; new-spec.json`&#xD;&#xA;&#xD;&#xA;I get a structure i am not familiar with, something called codeSubstitutes, where it seems the wasm blob goes. but in genesis &gt; raw &gt; top, where the wasm used to go is now encoded data plus wasm wedged in between it. &#xD;&#xA;&#xD;&#xA;In a plain spec file i do not want encoded data. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;codeSubstitutes&quot;: {&#xD;&#xA;    &quot;5203203&quot;: &quot;0x0061736d01000000...&#xD;&#xA;  }&#xD;&#xA;&quot;genesis&quot;: {&#xD;&#xA;    &quot;raw&quot;: {&#xD;&#xA;      &quot;top&quot;: {&#xD;&#xA;        &quot;0x0b76934f4cc08dee01012d059e1b83ee5e0621c4869aa60c02be9adcc98a0d1d&quot;: &quot;0x1856f0bb1f6307...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When i try to add validators and balances to the new chain spec I am not sure where it should be put. I append it to the end after `&quot;childrenDefault&quot;: {},` but i get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: &#xD;&#xA;   0: Other: Error parsing spec file: unknown field `babe`, expected `top` or `childrenDefault` at line 11677 column 12&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The docs on substrate don't tell me where to add things like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;babe&quot;: {&#xD;&#xA;          &quot;authorities&quot;: [],&#xD;&#xA;          &quot;epochConfig&quot;: {&#xD;&#xA;            &quot;c&quot;: [&#xD;&#xA;              1,&#xD;&#xA;              4&#xD;&#xA;            ],&#xD;&#xA;            &quot;allowed_slots&quot;: &quot;PrimaryAndSecondaryVRFSlots&quot;&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;indices&quot;: {&#xD;&#xA;          &quot;indices&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;balances&quot;: {&#xD;&#xA;          &quot;balances&quot;: [&#xD;&#xA;            [&#xD;&#xA;              &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;              1000000000000000000&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5CdEXeeTzGDxgtMtXPTte71ManNn39QmFCSxCTzsqdwdejrs&quot;,&#xD;&#xA;              100000000000000&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5H6bg61yQzQBXcnuBbDzX4Nue5mJgGqhPj9HDJ8Kg5nn9Jem&quot;,&#xD;&#xA;              100000000000000&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5CQ7S9CMzpqft1zEk6fr5uzxLhsc7zhNScvVa3YiGmmoSSVg&quot;,&#xD;&#xA;              100000000000000&#xD;&#xA;            ]&#xD;&#xA;          ]&#xD;&#xA;        },&#xD;&#xA;        &quot;transactionPayment&quot;: null,&#xD;&#xA;        &quot;session&quot;: {&#xD;&#xA;          &quot;keys&quot;: [&#xD;&#xA;            [&#xD;&#xA;              &quot;5CdEXeeTzGDxgtMtXPTte71ManNn39QmFCSxCTzsqdwdejrs&quot;,&#xD;&#xA;              &quot;5CdEXeeTzGDxgtMtXPTte71ManNn39QmFCSxCTzsqdwdejrs&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5GboBX4hqNVopiBQVsXWAw3SzD5dpKxqjK3iDA38GPxJEi6w&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5HTALD3kTwmDHNKEKxsquepU56Quzq59xKGmhksekpcF3C5T&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5ELHgNfi7bXWmmoyjdmBnY3B2MPBXgyAesdRkpC4Kgwm5ZUd&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5GxMs7yfgUtsG8zqU2412HAihc8NZ1jtMX69z6sdnSQKPwY2&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5Dqxxx4CbppCEuMFqiHNNVXNGBptsG1PJyDW7kv7GTmPQQGR&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5DksLz7S316tdyDg554mhCCYmBhkYbR7XQnWHtft3Kowatat&quot;,&#xD;&#xA;                &quot;beefy&quot;: &quot;KWBh8XBfoyenpdXN5qY1deY6tpkN2Hvw4skhERZRi2neimHBR&quot;&#xD;&#xA;              }&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5H6bg61yQzQBXcnuBbDzX4Nue5mJgGqhPj9HDJ8Kg5nn9Jem&quot;,&#xD;&#xA;              &quot;5H6bg61yQzQBXcnuBbDzX4Nue5mJgGqhPj9HDJ8Kg5nn9Jem&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5FUibppET3z3SRqbfgGAzMTRUgBcdVzWw2Kv9pCsQLd6qsp8&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5CcLtfQuroSgXRYgcVacAAopnF8gN1PrJEGdqxTgh9ZvUzHK&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5HpSZnVXxhFpfVdBRxxnPgg4okeMKEHyxR7c2zU5TcTJZiq8&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5HjAJp37Bjamrnc1vsGGG2aqWDh7osgszzc9Eb7NP3S7GPEa&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5Cu9mwCPHm6uybwLJy4zQFTH5TjTLBu37uUgaUogWqZjpv4e&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5D5VTDy2mwbC51yuco6SsafSjxqqz3SrtakDr2T23Lavhh6p&quot;,&#xD;&#xA;                &quot;beefy&quot;: &quot;KW3FkcrJAy6Z5ysiRQupzvP4dcwfSnJCBwjtGsSsgcBwhapCv&quot;&#xD;&#xA;              }&#xD;&#xA;            ],&#xD;&#xA;            [&#xD;&#xA;              &quot;5CQ7S9CMzpqft1zEk6fr5uzxLhsc7zhNScvVa3YiGmmoSSVg&quot;,&#xD;&#xA;              &quot;5CQ7S9CMzpqft1zEk6fr5uzxLhsc7zhNScvVa3YiGmmoSSVg&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5EX7Uw8VbNgDtdEbTa3rGVkR7VsGcPoFpFfPYs4iexyKVw72&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5Gekpirt85FG8J3eaZGyCbx8CT64oPrTPXCXmUqAU1tvrb1U&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5FLZ8nsw6v1tKQ4dAfbMX5z6cH33m4iVBmKiABR5uRx1x1Ay&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5Gmub5hEKcrmS53QE2Ls6afE7YhsFQTepPUqhF9vFipkterU&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5Hg2T4obKFrXyrCvtdpVSMT7Fru7VSBTdtKEDXFXQaXUHXk9&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5CcgDBN7sWqf5bq3AnVXffAX2rCApivCPGc4imRmB6Da3gyX&quot;,&#xD;&#xA;                &quot;beefy&quot;: &quot;KWDc8ncrJx3NtMFeKxNMGpqU1FrnJTR2Yf1aqFdxNRP2ihJex&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          ]&#xD;&#xA;        },&#xD;&#xA;        &quot;grandpa&quot;: {&#xD;&#xA;          &quot;authorities&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;imOnline&quot;: {&#xD;&#xA;          &quot;keys&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;authorityDiscovery&quot;: {&#xD;&#xA;          &quot;keys&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;configuration&quot;: {&#xD;&#xA;          &quot;config&quot;: {&#xD;&#xA;            &quot;max_code_size&quot;: 3145728,&#xD;&#xA;            &quot;max_head_data_size&quot;: 32768,&#xD;&#xA;            &quot;max_upward_queue_count&quot;: 8,&#xD;&#xA;            &quot;max_upward_queue_size&quot;: 1048576,&#xD;&#xA;            &quot;max_upward_message_size&quot;: 1048576,&#xD;&#xA;            &quot;max_upward_message_num_per_candidate&quot;: 5,&#xD;&#xA;            &quot;hrmp_max_message_num_per_candidate&quot;: 5,&#xD;&#xA;            &quot;validation_upgrade_cooldown&quot;: 2,&#xD;&#xA;            &quot;validation_upgrade_delay&quot;: 2,&#xD;&#xA;            &quot;max_pov_size&quot;: 5242880,&#xD;&#xA;            &quot;max_downward_message_size&quot;: 1048576,&#xD;&#xA;            &quot;ump_service_total_weight&quot;: 100000000000,&#xD;&#xA;            &quot;hrmp_max_parachain_outbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_max_parathread_outbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_sender_deposit&quot;: 0,&#xD;&#xA;            &quot;hrmp_recipient_deposit&quot;: 0,&#xD;&#xA;            &quot;hrmp_channel_max_capacity&quot;: 8,&#xD;&#xA;            &quot;hrmp_channel_max_total_size&quot;: 8192,&#xD;&#xA;            &quot;hrmp_max_parachain_inbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_max_parathread_inbound_channels&quot;: 4,&#xD;&#xA;            &quot;hrmp_channel_max_message_size&quot;: 1048576,&#xD;&#xA;            &quot;code_retention_period&quot;: 1200,&#xD;&#xA;            &quot;parathread_cores&quot;: 0,&#xD;&#xA;            &quot;parathread_retries&quot;: 0,&#xD;&#xA;            &quot;group_rotation_frequency&quot;: 20,&#xD;&#xA;            &quot;chain_availability_period&quot;: 4,&#xD;&#xA;            &quot;thread_availability_period&quot;: 4,&#xD;&#xA;            &quot;scheduling_lookahead&quot;: 0,&#xD;&#xA;            &quot;max_validators_per_core&quot;: null,&#xD;&#xA;            &quot;max_validators&quot;: null,&#xD;&#xA;            &quot;dispute_period&quot;: 6,&#xD;&#xA;            &quot;dispute_post_conclusion_acceptance_period&quot;: 100,&#xD;&#xA;            &quot;dispute_max_spam_slots&quot;: 2,&#xD;&#xA;            &quot;dispute_conclusion_by_time_out_period&quot;: 200,&#xD;&#xA;            &quot;no_show_slots&quot;: 2,&#xD;&#xA;            &quot;n_delay_tranches&quot;: 25,&#xD;&#xA;            &quot;zeroth_delay_tranche_width&quot;: 0,&#xD;&#xA;            &quot;needed_approvals&quot;: 2,&#xD;&#xA;            &quot;relay_vrf_modulo_samples&quot;: 2,&#xD;&#xA;            &quot;ump_max_individual_weight&quot;: 20000000000,&#xD;&#xA;            &quot;pvf_checking_enabled&quot;: false,&#xD;&#xA;            &quot;pvf_voting_ttl&quot;: 2,&#xD;&#xA;            &quot;minimum_validation_upgrade_delay&quot;: 5&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;paras&quot;: {&#xD;&#xA;          &quot;paras&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;hrmp&quot;: {&#xD;&#xA;          &quot;preopenHrmpChannels&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;registrar&quot;: {&#xD;&#xA;          &quot;nextFreeParaId&quot;: 2000&#xD;&#xA;        },&#xD;&#xA;        &quot;sudo&quot;: {&#xD;&#xA;          &quot;key&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;beefy&quot;: {&#xD;&#xA;          &quot;authorities&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeRococoGrandpa&quot;: {&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;initData&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeWococoGrandpa&quot;: {&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;initData&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeRococoMessages&quot;: {&#xD;&#xA;          &quot;operatingMode&quot;: &quot;Normal&quot;,&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;phantom&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;bridgeWococoMessages&quot;: {&#xD;&#xA;          &quot;operatingMode&quot;: &quot;Normal&quot;,&#xD;&#xA;          &quot;owner&quot;: &quot;5D7DGQNjk5gAwatPSMf555VB1W8UCq1sQomHX2eRwiLqhc4t&quot;,&#xD;&#xA;          &quot;phantom&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;collective&quot;: {&#xD;&#xA;          &quot;phantom&quot;: null,&#xD;&#xA;          &quot;members&quot;: []&#xD;&#xA;        },&#xD;&#xA;        &quot;membership&quot;: {&#xD;&#xA;          &quot;members&quot;: [],&#xD;&#xA;          &quot;phantom&quot;: null&#xD;&#xA;        },&#xD;&#xA;        &quot;xcmPallet&quot;: {&#xD;&#xA;          &quot;safeXcmVersion&quot;: 2&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;session_length_in_blocks&quot;: null&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;Where can i find how to structure a plain chain spec?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19507" PostHistoryTypeId="5" PostId="5193" RevisionGUID="2d7d3be9-f516-49d3-946e-b1066587862b" CreationDate="2022-10-06T13:39:19.500" UserId="300" Comment="added 39 characters in body" Text="I'm trying to test a Custom RPC. Let's make it a simple pass through.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;p_api::decl_runtime_apis! {&#xD;&#xA;	pub trait SimpleApi&lt;AccountId&gt; where&#xD;&#xA;		AccountId: Codec,&#xD;&#xA;	{&#xD;&#xA;		fn is_true() -&gt; Result&lt;bool, DispatchError&gt;;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Client Server Trait&#xD;&#xA;```rust&#xD;&#xA;#[rpc(client, server)]&#xD;&#xA;pub trait SimpleApi&lt;BlockHash, AccountId&gt; {&#xD;&#xA;	#[method(name = &quot;simple_isTrue&quot;)]&#xD;&#xA;	fn is_true(&#xD;&#xA;		&amp;self,&#xD;&#xA;	) -&gt; RpcResult&lt;bool&gt;&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct SimpleHandler&lt;C, M&gt; {&#xD;&#xA;	client: Arc&lt;C&gt;,&#xD;&#xA;	_marker: std::marker::PhantomData&lt;M&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;C, M&gt; SimpleHandler&lt;C, M&gt; {&#xD;&#xA;	pub fn new(client: Arc&lt;C&gt;) -&gt; Self {&#xD;&#xA;		Self { client, _marker: Default::default() }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[async_trait]&#xD;&#xA;impl&lt;C, Block, AccountId&gt; SimpleServer&lt;&lt;Block as BlockT&gt;::Hash, AccountId&gt; for SimpleHandler&lt;C, Block&gt;&#xD;&#xA;where&#xD;&#xA;	Block: BlockT,&#xD;&#xA;	C: Send + Sync + 'static,&#xD;&#xA;	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;	C: HeaderBackend&lt;Block&gt;,&#xD;&#xA;	C::Api: SimpleRuntimeApi&lt;Block, AccountId&gt;,&#xD;&#xA;	AccountId: Codec,&#xD;&#xA;{&#xD;&#xA;  fn is_true(&amp;self) -&gt; RpcResult&lt;bool&gt; {&#xD;&#xA;	let api = self.client.runtime_api();&#xD;&#xA;	let at = BlockId::hash(self.client.info().best_hash);&#xD;&#xA;	let runtime_api_result = api.is_true(&amp;at);&#xD;&#xA;	map_rpc_result(runtime_api_result)&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So following the test setup from https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/tests.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use substrate_test_runtime_client::{&#xD;&#xA;    runtime::Block, Client, Backend, DefaultTestClientBuilderExt,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;struct TestSetup {&#xD;&#xA;	pub client: Arc&lt;Client&lt;Backend&gt;&gt;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl Default for TestSetup {&#xD;&#xA;	fn default() -&gt; Self {&#xD;&#xA;		let client_builder = substrate_test_runtime_client::TestClientBuilder::new();&#xD;&#xA;		let client = Arc::new(client_builder.build());&#xD;&#xA;&#xD;&#xA;		TestSetup { client }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl TestSetup {&#xD;&#xA;	fn simple(&amp;self) -&gt; SimpleHandler&lt;Client&lt;Backend&gt;,Block&gt; {&#xD;&#xA;		SimpleHandler {&#xD;&#xA;			client: self.client.clone(),&#xD;&#xA;			_marker: Default::default(),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn into_rpc() -&gt; RpcModule&lt;SimpleHandler&lt;Client&lt;Backend&gt;, Block&gt;&gt; {&#xD;&#xA;		Self::default().simple().into_rpc()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[tokio::test]&#xD;&#xA;async fn testing_simple() {&#xD;&#xA;    let api = TestSetup::default().simple();&#xD;&#xA;&#xD;&#xA;    let rpc = api.into_rpc();&#xD;&#xA;&#xD;&#xA;    let response = rpc.call(&quot;&quot;).await.unwrap();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This fails with:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let rpc = api.into_rpc();&#xD;&#xA;         ^^^^^^^^ method cannot be called on `SimpleHandler&lt;...&gt;` due to unsatisfied trait bounds&#xD;&#xA;// ...&#xD;&#xA;C::Api: SimpleRuntimeApi&lt;Block, AccountId&gt;,&#xD;&#xA;             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound introduced here&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which makes since, as nothing in the test setup has an implementation for `SimpleRuntimeApi`. So how do I mock one and tell the client?&#xD;&#xA;&#xD;&#xA;My assumption is that I am missing part of the setup for [substrate_test_runtime_client][1] (Or perhaps I should actually be using [substrate_test_client][2] ?) but the examples around it are few. Always possible I'm barking up the wrong tree entirely.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://subspace.github.io/subspace/substrate_test_runtime_client/index.html&#xD;&#xA;  [2]: https://crates.parity.io/substrate_test_client/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="19508" PostHistoryTypeId="5" PostId="5173" RevisionGUID="ea86792a-a9a1-4654-b36d-ea280c7e1ed9" CreationDate="2022-10-06T14:27:16.020" UserId="2" Comment="grammar corrections" Text="To encode and decode data the way we do in solidity I am using [ethabi][1]. It is working fine in compilation and testing but when I am running the command `cargo contract build`, it is giving me a build error.&#xD;&#xA;&#xD;&#xA;Let me know if someone can help me on this issue or has any other way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ethabi/latest/ethabi/" ContentLicense="CC BY-SA 4.0" />
  <row Id="19509" PostHistoryTypeId="24" PostId="5173" RevisionGUID="ea86792a-a9a1-4654-b36d-ea280c7e1ed9" CreationDate="2022-10-06T14:27:16.020" Comment="Proposed by 2 approved by 3281 edit id of 304" ContentLicense="CC BY-SA 4.0" />
  <row Id="19510" PostHistoryTypeId="50" PostId="4643" RevisionGUID="0a86e1ff-9178-4af5-a972-9cdf9946d7da" CreationDate="2022-10-06T15:03:35.513" UserId="-1" />
  <row Id="19511" PostHistoryTypeId="52" PostId="5197" RevisionGUID="bfb7b58d-71a8-4a3c-8343-fa928cb156c6" CreationDate="2022-10-06T15:27:40.757" />
  <row Id="19512" PostHistoryTypeId="5" PostId="5172" RevisionGUID="27298833-9a85-44fb-8941-4d1b5ce6e6d1" CreationDate="2022-10-06T15:49:22.920" UserId="2762" Comment="style improved" Text="How to use api.events.staking.Rewarded.is to get reward?  &#xD;&#xA;Like this:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;let event:IEventLike={&#xD;&#xA;  index:9281,&#xD;&#xA;  method:&quot;staking&quot;,&#xD;&#xA;  section:&quot;rewarded&quot;,&#xD;&#xA;};&#xD;&#xA;const nominatorReward = api.events.staking.Rewarded.is(event)&#xD;&#xA;console.log(nominatorReward)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19513" PostHistoryTypeId="6" PostId="5172" RevisionGUID="27298833-9a85-44fb-8941-4d1b5ce6e6d1" CreationDate="2022-10-06T15:49:22.920" UserId="2762" Comment="style improved" Text="|polkadot-js|staking|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19514" PostHistoryTypeId="24" PostId="5172" RevisionGUID="27298833-9a85-44fb-8941-4d1b5ce6e6d1" CreationDate="2022-10-06T15:49:22.920" Comment="Proposed by 2762 approved by 85, 34 edit id of 298" ContentLicense="CC BY-SA 4.0" />
  <row Id="19515" PostHistoryTypeId="5" PostId="5105" RevisionGUID="6c507747-849c-4b00-aaaa-48348e4a05e9" CreationDate="2022-10-06T15:49:33.783" UserId="2673" Comment="Rust syntax highlighting" Text="You can do `frame_system::Pallet::&lt;T&gt;::events()` to fetch all the events emitted. [Example][1]&#xD;&#xA;&#xD;&#xA;If you are working with mock runtime then you can directly use `System::events()` (System being the instantiation of pallet_frame_system that you generated using the `construct_runtime!()` macro). You can then iterate over all the events and match with the ones that you are concerned about.&#xD;&#xA;&#xD;&#xA;In the below example, I'm trying to extract the address of the smart contract I deployed by matching with the `Instantiated` event from the pallet-contracts.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    let evts = System::events();&#xD;&#xA;	let deployed_address = evts&#xD;&#xA;		.iter()&#xD;&#xA;		.rev()&#xD;&#xA;		.find_map(|rec| {&#xD;&#xA;			if let Event::Contracts(pallet_contracts::Event::Instantiated {&#xD;&#xA;				deployer: _,&#xD;&#xA;				contract,&#xD;&#xA;			}) = &amp;rec.event&#xD;&#xA;			{&#xD;&#xA;				Some(contract)&#xD;&#xA;			} else {&#xD;&#xA;				None&#xD;&#xA;			}&#xD;&#xA;		})&#xD;&#xA;		.expect(&quot;unable to find deployed contract&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Hope this answers your question :)&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5098/how-can-i-access-the-emitted-runtime-events-inside-the-benchmarking-rs-file/5101#5101" ContentLicense="CC BY-SA 4.0" />
  <row Id="19516" PostHistoryTypeId="24" PostId="5105" RevisionGUID="6c507747-849c-4b00-aaaa-48348e4a05e9" CreationDate="2022-10-06T15:49:33.783" Comment="Proposed by 2673 approved by 85, 34 edit id of 303" ContentLicense="CC BY-SA 4.0" />
  <row Id="19521" PostHistoryTypeId="5" PostId="5201" RevisionGUID="56fe3ef6-1189-4aa5-89a5-448b320e7986" CreationDate="2022-10-06T15:49:55.527" UserId="251" Comment="added 57 characters in body" Text="Questions about the most popular Substrate EVM framework." ContentLicense="CC BY-SA 4.0" />
  <row Id="19522" PostHistoryTypeId="24" PostId="5201" RevisionGUID="56fe3ef6-1189-4aa5-89a5-448b320e7986" CreationDate="2022-10-06T15:49:55.527" Comment="Proposed by 251 approved by 85, 34 edit id of 300" ContentLicense="CC BY-SA 4.0" />
  <row Id="19524" PostHistoryTypeId="10" PostId="2557" RevisionGUID="78eae99e-53dd-425d-bb28-2300058f7182" CreationDate="2022-10-06T15:57:09.213" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="19532" PostHistoryTypeId="2" PostId="5214" RevisionGUID="7f3b39d3-05ba-4a43-baa4-c78f68d3e5e6" CreationDate="2022-10-06T16:45:57.697" UserId="505" Text="Hey guys I'm seeing a weird thing with the following migration code:&#xD;&#xA;```&#xD;&#xA;pub struct SomeMigration;&#xD;&#xA;impl OnRuntimeUpgrade for SomeMigration {&#xD;&#xA;    fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA;        let pallet_prefix: &amp;[u8] = b&quot;SomeName&quot;;&#xD;&#xA;        let storage_item_prefix: &amp;[u8] = b&quot;TestMe&quot;;&#xD;&#xA;&#xD;&#xA;        let value = match take_storage_value::&lt;u32&gt;(pallet_prefix, storage_item_prefix, &amp;[]) {&#xD;&#xA;            Some(value) =&gt; value,&#xD;&#xA;            None =&gt; {&#xD;&#xA;                return 0;&#xD;&#xA;            }&#xD;&#xA;        };&#xD;&#xA;        let new_value: u128 = value as u128;&#xD;&#xA;        put_storage_value::&lt;u128&gt;(pallet_prefix, storage_item_prefix, &amp;[], new_value);&#xD;&#xA;&#xD;&#xA;        1&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;    fn pre_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;        let pallet_prefix: &amp;[u8] = b&quot;SomeName&quot;;&#xD;&#xA;        let storage_item_prefix: &amp;[u8] = b&quot;TestMe&quot;;&#xD;&#xA;        assert!(get_storage_value::&lt;u32&gt;(pallet_prefix, storage_item_prefix, &amp;[]).is_none());&#xD;&#xA;        put_storage_value(pallet_prefix, storage_item_prefix, &amp;[], 10u32);&#xD;&#xA;        assert!(get_storage_value::&lt;u32&gt;(pallet_prefix, storage_item_prefix, &amp;[]).is_some());&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;    fn post_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;        let pallet_prefix: &amp;[u8] = b&quot;SomeName&quot;;&#xD;&#xA;        let storage_item_prefix: &amp;[u8] = b&quot;TestMe&quot;;&#xD;&#xA;        assert!(get_storage_value::&lt;u32&gt;(pallet_prefix, storage_item_prefix, &amp;[]).is_none());&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;What's happening here is is the following&#xD;&#xA;1. pre-upgrade: Check that no item exists for u32 storage value `TestMe`&#xD;&#xA;2. pre-upgrade: Write a u32 storage value `TestMe`&#xD;&#xA;3. pre-upgrade: Check that the u32 storage value is_some()&#xD;&#xA;4. on-runtime-upgrade: take_storage_value of the u32 `TestMe`, expecting it to be drained&#xD;&#xA;5. on-runtime-upgrade: write the same value back but as u128&#xD;&#xA;6. on-post-upgrade: check that the old u32 value is_none() &#xD;&#xA;&#xD;&#xA;The problem is that when I use the `try-runtime` tool the assert on step 6 fails, as if the value was not drained in step 4.&#xD;&#xA;But if I actually perform this runtime upgrade on a local network I can see that the old storage key of the u32 storage value is empty after the upgrade and only the new u128 storage value exists.&#xD;&#xA;&#xD;&#xA;This seems like some issue with the try-runtime tool, but I may be using it wrong.&#xD;&#xA;&#xD;&#xA;Thanks for the attention.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19534" PostHistoryTypeId="1" PostId="5214" RevisionGUID="7f3b39d3-05ba-4a43-baa4-c78f68d3e5e6" CreationDate="2022-10-06T16:45:57.697" UserId="505" Text="Potential storage issue with try-runtime tool" ContentLicense="CC BY-SA 4.0" />
  <row Id="19535" PostHistoryTypeId="3" PostId="5214" RevisionGUID="7f3b39d3-05ba-4a43-baa4-c78f68d3e5e6" CreationDate="2022-10-06T16:45:57.697" UserId="505" Text="|storage|testing|migration|try-runtime|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19536" PostHistoryTypeId="2" PostId="5215" RevisionGUID="26fbb030-c31d-448b-ba0f-df2b7bd70dbf" CreationDate="2022-10-06T17:18:00.080" UserId="172" Text="Substrate has the concept of a `transaction_version` and an `EXTRINSIC_FORMAT_VERSION`. What are these used for and when are they changed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19538" PostHistoryTypeId="1" PostId="5215" RevisionGUID="26fbb030-c31d-448b-ba0f-df2b7bd70dbf" CreationDate="2022-10-06T17:18:00.080" UserId="172" Text="What's the difference between `transaction_version` and `EXTRINSIC_FORMAT_VERSION`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19539" PostHistoryTypeId="3" PostId="5215" RevisionGUID="26fbb030-c31d-448b-ba0f-df2b7bd70dbf" CreationDate="2022-10-06T17:18:00.080" UserId="172" Text="|extrinsic|scale-codec|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19540" PostHistoryTypeId="2" PostId="5216" RevisionGUID="89b8ace2-66f3-4035-ab60-219eb19a3241" CreationDate="2022-10-06T17:18:00.080" UserId="172" Text="The [`transaction_version`](https://paritytech.github.io/substrate/master/sp_version/struct.RuntimeVersion.html#structfield.transaction_version) is a field in the `RuntimeVersion` struct, specific to a runtime implementation. A bump to this value happens whenever there's a change to a pallet's runtime index and/or when there's a change to the index of a pallet's dispatchable functions. In a world of runtime upgrades, a practical reason for this is that hardware wallets need to know how to correctly encode calls for a given runtime.&#xD;&#xA;&#xD;&#xA;The [`EXTRINSIC_FORMAT_VERSION`](https://paritytech.github.io/substrate/master/sp_runtime/traits/trait.ExtrinsicMetadata.html#associatedconstant.VERSION) is a constant in Substrate's primitives used to track upgrades of the _format_ of an extrinsic, a.k.a. its encoding representation. This would typically be changes in the ordering of an extrinsic's byte fields for example. This version number is more of an indicator for all Substrate chains to ensure compatibility with how extrinsics are formatted for a runtime rather than one unique to a specific chain. From the Rust docs:&#xD;&#xA;&gt; It ensures that if the representation is changed and the format is not known, the decoding fails.&#xD;&#xA;&#xD;&#xA;In other words, changing the _extrinsic format_ value will break the APIs of libraries like Polkadot JS API or Subxt, as they need to know how to correctly format a call (byte-wise). Whereas bumping the _transaction version_ indicates that there's been a change in the call indices in a node's metadata, which libraries need to know to correctly encode/decode calls." ContentLicense="CC BY-SA 4.0" />
  <row Id="19542" PostHistoryTypeId="50" PostId="4657" RevisionGUID="3c4b06dc-99f5-4d55-b3fe-4618f2ca4f92" CreationDate="2022-10-06T19:05:25.720" UserId="-1" />
  <row Id="19543" PostHistoryTypeId="2" PostId="5217" RevisionGUID="c3112e9e-c417-4d33-8ce4-23312c4812b5" CreationDate="2022-10-06T19:32:21.777" UserId="300" Text="tldr: used the `sp_api::mock_impl_runtime_apis!` macro to mock the implementation.&#xD;&#xA;&#xD;&#xA;Example is in this PR along with a lot of other changes:&#xD;&#xA;&#xD;&#xA;https://github.com/LibertyDSNP/frequency/pull/490&#xD;&#xA;&#xD;&#xA;See `pallets/messages/src/rpc/src/lib.rs` for the rpc, `pallets/messages/src/rpc/src/tests/mod.rs` for the test, and `pallets/messages/src/rpc/src/tests/rpc_mock.rs` for the general mock setup." ContentLicense="CC BY-SA 4.0" />
  <row Id="19545" PostHistoryTypeId="2" PostId="5218" RevisionGUID="39b466ad-fb7b-41d7-a375-9b4c8c0194c6" CreationDate="2022-10-06T20:39:59.580" UserId="87" Text="In Polkadot staking validators are identified as either Relaychain validators or Para Validators.&#xD;&#xA;&#xD;&#xA;This appears to mean that a validator has is started with arguments that allows it to validate (randomly selected?) parachain blocks but I cannot find that argument in the options to run a Polkadot node. &#xD;&#xA;&#xD;&#xA;So what is the difference between the two types of Validator?&#xD;&#xA;&#xD;&#xA;I may be looking at this the wrong way round. Perhaps it is a collator from a Parachain, that has it's Polkadot startup arguments set to validate on the Polkadot chain as well - in which case I could see how this could be both a Relaychain Validator and a Parachain Collator at the same time. Is this the answer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19547" PostHistoryTypeId="1" PostId="5218" RevisionGUID="39b466ad-fb7b-41d7-a375-9b4c8c0194c6" CreationDate="2022-10-06T20:39:59.580" UserId="87" Text="In polkadot staking what's the different between Validators and Para Validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19548" PostHistoryTypeId="3" PostId="5218" RevisionGUID="39b466ad-fb7b-41d7-a375-9b4c8c0194c6" CreationDate="2022-10-06T20:39:59.580" UserId="87" Text="|polkadot|staking|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19549" PostHistoryTypeId="5" PostId="5218" RevisionGUID="3bf14ebb-84e4-44c5-8a32-cab4406713c5" CreationDate="2022-10-06T21:46:16.447" UserId="32" Comment="improved formatting" Text="In Polkadot staking, validators are identified as either Relaychain validators or Para Validators.&#xD;&#xA;&#xD;&#xA;This appears to mean that a validator has is started with arguments that allow it to validate (randomly selected?) parachain blocks. Still, I cannot find that argument in the options to run a Polkadot node. &#xD;&#xA;&#xD;&#xA;So what is the difference between the two types of validators?&#xD;&#xA;&#xD;&#xA;I may be looking at this the wrong way around. Perhaps it is a collator from a Parachain that has its Polkadot startup arguments set to validate on the Polkadot chain as well - in which case, I could see how this could be both a Relaychain Validator and a Parachain Collator at the same time. Is this the answer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19550" PostHistoryTypeId="4" PostId="5218" RevisionGUID="3bf14ebb-84e4-44c5-8a32-cab4406713c5" CreationDate="2022-10-06T21:46:16.447" UserId="32" Comment="improved formatting" Text="In polkadot staking what's the difference between Validators and Para Validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19551" PostHistoryTypeId="24" PostId="5218" RevisionGUID="3bf14ebb-84e4-44c5-8a32-cab4406713c5" CreationDate="2022-10-06T21:46:16.447" Comment="Proposed by 32 approved by 28 edit id of 305" ContentLicense="CC BY-SA 4.0" />
  <row Id="19552" PostHistoryTypeId="2" PostId="5219" RevisionGUID="77d8237b-bc85-4d5b-ac34-b87bc3d157bf" CreationDate="2022-10-06T21:52:16.073" UserId="32" Text="Validators are selected and assigned to parachains by the randomized Validator Assignment routine. Let's look at this snapshot of parachain validation on [https://polkadot.js.org/apps/#/parachains][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;At the time of writing this response, there are 28 parachains that are assigned 5 validators each. That would be 140 para validators in this era. The remaining (297 - 140 = 157) validators in the active set will only participate in the relay chain block production and finality.&#xD;&#xA;&#xD;&#xA;Proof of Validity (PoV) check on parachain blocks is computationally more intensive. Hence, for that work, para validators earn more era points, resulting in an uptick in the earned rewards.&#xD;&#xA;&#xD;&#xA;As more parachains run on Polkadot, more validators will take part in para validation. If you are interested in learning about the validation protocol, please refer to [this protocol overview document][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/#/parachains&#xD;&#xA;  [2]: https://i.stack.imgur.com/v1VDB.png&#xD;&#xA;  [3]: https://paritytech.github.io/polkadot/book/protocol-overview.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="19556" PostHistoryTypeId="5" PostId="5219" RevisionGUID="55db5293-d37d-486a-a1f7-6b2457d8b5b9" CreationDate="2022-10-06T21:58:37.807" UserId="32" Comment="added 9 characters in body" Text="Validators are selected and assigned to parachains by the randomized Validator Assignment routine on-chain. Let's look at this snapshot of parachain validation on [https://polkadot.js.org/apps/#/parachains][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;At the time of writing this response, there are 28 parachains that are assigned 5 validators each. That would be 140 para validators in this era. The remaining (297 - 140 = 157) validators in the active set will only participate in the relay chain block production and finality.&#xD;&#xA;&#xD;&#xA;Proof of Validity (PoV) check on parachain blocks is computationally more intensive. Hence, for that work, para validators earn more era points, resulting in an uptick in the earned rewards.&#xD;&#xA;&#xD;&#xA;As more parachains run on Polkadot, more validators will take part in para validation. If you are interested in learning about the validation protocol, please refer to [this protocol overview document][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/#/parachains&#xD;&#xA;  [2]: https://i.stack.imgur.com/v1VDB.png&#xD;&#xA;  [3]: https://paritytech.github.io/polkadot/book/protocol-overview.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="19557" PostHistoryTypeId="2" PostId="5221" RevisionGUID="1ffb786c-ab01-4f54-a1bb-878a44226729" CreationDate="2022-10-06T22:26:05.097" UserId="590" Text="We have changed the decimal places of our currency to 10e8 and trying to understand how to adjust the WeightToFeePolynomial. When reading the code I noticed that filling up a block can produce a range in fees and was flabbergasted.&#xD;&#xA;&#xD;&#xA;Can you please explain why there is a range of fees for a full block?&#xD;&#xA;[full_block_fee_correct() test](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/constants/src/lib.rs#L114)" ContentLicense="CC BY-SA 4.0" />
  <row Id="19559" PostHistoryTypeId="1" PostId="5221" RevisionGUID="1ffb786c-ab01-4f54-a1bb-878a44226729" CreationDate="2022-10-06T22:26:05.097" UserId="590" Text="weight to fee computation" ContentLicense="CC BY-SA 4.0" />
  <row Id="19560" PostHistoryTypeId="3" PostId="5221" RevisionGUID="1ffb786c-ab01-4f54-a1bb-878a44226729" CreationDate="2022-10-06T22:26:05.097" UserId="590" Text="|weight|weighttofee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19561" PostHistoryTypeId="2" PostId="5222" RevisionGUID="035fc3ba-844f-4e8a-82ef-d79504d7ac9d" CreationDate="2022-10-06T22:37:24.550" UserId="590" Text="We currently have the expected block time to `MILLISECS_PER_BLOCK = 12000`.&#xD;&#xA;&#xD;&#xA;We also set the `MAXIMUM_BLOCK_WEIGHT = WEIGHT_PER_SECOND.saturating_div(2) // 500_000_000_000`.&#xD;&#xA;&#xD;&#xA;This seems low, given that we have 12 seconds to produce a block.&#xD;&#xA;&#xD;&#xA;How to determine how much computing time to allocate per block?&#xD;&#xA;&#xD;&#xA;How do I decide how to set MILLISECS_PER_BLOCK and MAXIMUM_BLOCK_WEIGHT?&#xD;&#xA;&#xD;&#xA;Given that we are launching a parachain, what impact does the relay chain have in determining how we should set these variables?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19563" PostHistoryTypeId="1" PostId="5222" RevisionGUID="035fc3ba-844f-4e8a-82ef-d79504d7ac9d" CreationDate="2022-10-06T22:37:24.550" UserId="590" Text="How to determine how much compute time to allocate" ContentLicense="CC BY-SA 4.0" />
  <row Id="19564" PostHistoryTypeId="3" PostId="5222" RevisionGUID="035fc3ba-844f-4e8a-82ef-d79504d7ac9d" CreationDate="2022-10-06T22:37:24.550" UserId="590" Text="|runtime|weight|configuration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19569" PostHistoryTypeId="2" PostId="5224" RevisionGUID="7a9cedb5-53eb-403a-94de-c2f9a7dfd467" CreationDate="2022-10-06T23:36:26.790" UserId="590" Text="I am trying to understand how to make modifications to the WeightToFee implementation after updating our decimal places by looking at how [Polkadot](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L85) and [Rococo](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/constants/src/lib.rs#L85) differ. &#xD;&#xA;&#xD;&#xA;Rococos decimal places are set to 10e12 [here](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/constants/src/lib.rs#L28) and Polkadots decimal places are set to 10e10 [here](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L30).&#xD;&#xA;&#xD;&#xA;Given that they have different decimal places, I expected their `WeightToFeePolynomial` implementation to differ slightly. However, they are both the same. Why?&#xD;&#xA; &#xD;&#xA;Can you please provide clarity on the following comment left [here](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L88)?&#xD;&#xA;&gt; // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:&#xD;&#xA;&#xD;&#xA;For example, what does the &quot;smallest non-zero weight&quot; mean? And how is it that both Rococo and Polkadot are mapped to 1/10 CENT when their decimal places are different?&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="19571" PostHistoryTypeId="1" PostId="5224" RevisionGUID="7a9cedb5-53eb-403a-94de-c2f9a7dfd467" CreationDate="2022-10-06T23:36:26.790" UserId="590" Text="Clarity on WeightToFee comment" ContentLicense="CC BY-SA 4.0" />
  <row Id="19572" PostHistoryTypeId="3" PostId="5224" RevisionGUID="7a9cedb5-53eb-403a-94de-c2f9a7dfd467" CreationDate="2022-10-06T23:36:26.790" UserId="590" Text="|weighttofee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19573" PostHistoryTypeId="52" PostId="5215" RevisionGUID="b1681d27-f601-44d7-83a9-783f7b04924c" CreationDate="2022-10-07T01:19:29.323" />
  <row Id="19575" PostHistoryTypeId="52" PostId="5218" RevisionGUID="05596ccf-1407-42df-ace0-216a3ab198c8" CreationDate="2022-10-07T06:41:20.520" />
  <row Id="19576" PostHistoryTypeId="2" PostId="5225" RevisionGUID="3ac07f6c-09ca-48ed-9449-9ce6ddae1aad" CreationDate="2022-10-07T07:41:44.490" UserId="73" Text="There are two types of chain spec: &quot;raw&quot; and &quot;human readable&quot;. Where the difference between both is that `genesis` entry is either hex key and values or a json that contains the runtime pallets. You want to have the human readable version to add validator etc to experiment. &#xD;&#xA;&#xD;&#xA;Your problem is that you take a `raw` chain spec and export this into a new chain spec. A `raw` chain spec can only be converted into a `raw` chain spec and not into the `human readable` one. You used the polkadot mainnet chain spec to start with.&#xD;&#xA;&#xD;&#xA;The solution to your problem is to use a chain spec that is &quot;present&quot; as `human readable` or better can be converted into this. This would be for example `poladot-dev`, `kusama-dev`, etc. So, you need to use the following command:&#xD;&#xA;&#xD;&#xA;`polkadot build-spec --chain &quot;polkadot-dev&quot; &gt; new-spec.json`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To your question on what `code-substitutes` are: When there is a bug in the on chain wasm file, a code substitute can be used to replace the this on chain wasm file. The format is `block_number: wasm_file`, where block number is the first block number from where the wasm file should be replaced on chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="19578" PostHistoryTypeId="2" PostId="5226" RevisionGUID="b7dca29a-c78a-446e-9dd6-3f4a0884bdec" CreationDate="2022-10-07T08:00:38.307" UserId="3254" Text="    error: encountered unexpected ink! attribute&#xD;&#xA;      --&gt; lib.rs:80:15&#xD;&#xA;       |&#xD;&#xA;    80 |         #[ink(constructor)]&#xD;&#xA;       |               ^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;when I execute `$cargo +nightly contract test` , the above error is happened.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The code is based on the following article.&#xD;&#xA;https://learn.figment.io/tutorials/build-polkadot-amm-using-ink#creating-a-frontend-in-react&#xD;&#xA;&#xD;&#xA;Here is the code for the part pointed out.&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(_fees: Balance) -&gt; Self {&#xD;&#xA;            // Sets fees to zero if not in valid range&#xD;&#xA;            Self {&#xD;&#xA;                fees: if _fees &gt;= 1000 { 0 } else { _fees },&#xD;&#xA;                ..Default::default()&#xD;&#xA;            }&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="19580" PostHistoryTypeId="1" PostId="5226" RevisionGUID="b7dca29a-c78a-446e-9dd6-3f4a0884bdec" CreationDate="2022-10-07T08:00:38.307" UserId="3254" Text="#[ink(constructor)] cause some error, What is wrong with it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19581" PostHistoryTypeId="3" PostId="5226" RevisionGUID="b7dca29a-c78a-446e-9dd6-3f4a0884bdec" CreationDate="2022-10-07T08:00:38.307" UserId="3254" Text="|ink|smart-contract|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19582" PostHistoryTypeId="4" PostId="5226" RevisionGUID="58f89d9e-ac50-4954-98a7-819ecefe91d9" CreationDate="2022-10-07T08:02:53.953" UserId="3254" Comment="edited title" Text="#[ink(constructor)] cause a error, What is wrong with it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19583" PostHistoryTypeId="2" PostId="5227" RevisionGUID="8c0dfcf1-2668-420c-a7a0-c07aa9cd548f" CreationDate="2022-10-07T08:34:56.153" UserId="2025" Text="My understanding of the test you are referencing is that it is just a sanity check for the fee implied by the value of the constant `MAXIMUM_BLOCK_WEIGHT` in a Substrate chain. You can see how the range of the test varies depending on the use intended for the chain. This is the range for the test for [Polkadot relay chain](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L114) for example, which is orders of magnitude larger than [Rococo](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/constants/src/lib.rs#L114) or [Westend](https://github.com/paritytech/polkadot/blob/master/runtime/westend/constants/src/lib.rs#L114) testnets.&#xD;&#xA;&#xD;&#xA;Since the value of `MAXIMUM_BLOCK_WEIGHT` is critical for the correct functioning of a Substrate chain, it makes sense to check that it was assigned a &quot;reasonable&quot; value. But this test does not make any implication beyond this sanity check." ContentLicense="CC BY-SA 4.0" />
  <row Id="19585" PostHistoryTypeId="5" PostId="5227" RevisionGUID="c7968106-ec5d-49c8-9abf-c4fca1a042a9" CreationDate="2022-10-07T08:48:28.827" UserId="2025" Comment="improve explanation" Text="My understanding of the test you are referencing is that it is just a sanity check for the fee implied by the value of the constant `MAXIMUM_BLOCK_WEIGHT` in a Substrate chain. You can see how the range of the test varies depending on the use intended for the chain. This is the range for the test for [Polkadot relay chain](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L114) for example, which is orders of magnitude larger than [Rococo](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/constants/src/lib.rs#L114) or [Westend](https://github.com/paritytech/polkadot/blob/master/runtime/westend/constants/src/lib.rs#L114) testnets.&#xD;&#xA;&#xD;&#xA;Since the value of `MAXIMUM_BLOCK_WEIGHT` and the definition of the function `weightToFee` are critical for the correct functioning of a Substrate chain, it makes sense to check that the output of `weight_to_fee(&amp;MAXIMUM_BLOCK_WEIGHT)` is a &quot;reasonable&quot; value. But this test does not make any implication beyond this sanity check." ContentLicense="CC BY-SA 4.0" />
  <row Id="19586" PostHistoryTypeId="2" PostId="5228" RevisionGUID="a904d728-b688-47dc-a404-e469bbbe9983" CreationDate="2022-10-07T11:20:50.993" UserId="94" Text="That test in particular is just a sanity check. We cannot hard-code a specific value since these values change every time we re-run the benchmark for `ExtrinsicBaseWeight`. You can see it in the comment above:  &#xD;&#xA;```rust&#xD;&#xA;pub struct WeightToFee;&#xD;&#xA;impl WeightToFeePolynomial for WeightToFee {&#xD;&#xA;	type Balance = Balance;&#xD;&#xA;	fn polynomial() -&gt; WeightToFeeCoefficients&lt;Self::Balance&gt; {&#xD;&#xA;		// in Rococo, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:&#xD;&#xA;		let p = super::currency::CENTS;&#xD;&#xA;		let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time());&#xD;&#xA;		smallvec![WeightToFeeCoefficient {&#xD;&#xA;			degree: 1,&#xD;&#xA;			negative: false,&#xD;&#xA;			coeff_frac: Perbill::from_rational(p % q, q),&#xD;&#xA;			coeff_integer: p / q,&#xD;&#xA;		}]&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;There needs to be some leeway for the production process, since otherwise these tests would fail on every release." ContentLicense="CC BY-SA 4.0" />
  <row Id="19588" PostHistoryTypeId="2" PostId="5229" RevisionGUID="64153663-197c-422c-a756-8b5a9f3f40dd" CreationDate="2022-10-07T11:26:12.843" UserId="94" Text="1/10 Cent is just an abstraction. It does not make any implications about the number of decimals. Have a look at how their are defined in the `test-runtime` as compared to Polkadot:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// test-runtime&#xD;&#xA;pub const DOTS: Balance = 1_000_000_000_000;&#xD;&#xA;pub const DOLLARS: Balance = DOTS;&#xD;&#xA;pub const CENTS: Balance = DOLLARS / 100;&#xD;&#xA;pub const MILLICENTS: Balance = CENTS / 1_000;&#xD;&#xA;&#xD;&#xA;// Polkadot&#xD;&#xA;pub const UNITS: Balance = 10_000_000_000;&#xD;&#xA;pub const DOLLARS: Balance = UNITS; // 10_000_000_000&#xD;&#xA;pub const CENTS: Balance = DOLLARS / 100; // 100_000_000&#xD;&#xA;pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000&#xD;&#xA;```&#xD;&#xA;You can see that the concrete value of a `CENTS` is different. I both cases a `CENTS` is assumed to be `DOLLARS/100`. The definitions of `CENTS` and `DOLLARS` are meant to help humans understand them.  &#xD;&#xA;You can define own constants in your chain if you think that is confusing.  &#xD;&#xA;&#xD;&#xA;The smallest weight is normally `ExtrinsicBaseWeight`." ContentLicense="CC BY-SA 4.0" />
  <row Id="19590" PostHistoryTypeId="2" PostId="5230" RevisionGUID="cc4342cc-e7f6-4f96-ad02-548866001170" CreationDate="2022-10-07T12:32:00.783" UserId="3235" Text="Most of substrate tutorials are based on on-chain logic so there's not much information on this topic. Is there a way to use Substrate's in-built p2p network for other purposes such as constant sharing of nontext files eg live stream videos, across the blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19592" PostHistoryTypeId="1" PostId="5230" RevisionGUID="cc4342cc-e7f6-4f96-ad02-548866001170" CreationDate="2022-10-07T12:32:00.783" UserId="3235" Text="Is there a way to create a peer to peer network on top of substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19593" PostHistoryTypeId="3" PostId="5230" RevisionGUID="cc4342cc-e7f6-4f96-ad02-548866001170" CreationDate="2022-10-07T12:32:00.783" UserId="3235" Text="|substrate-node|offchain-worker|substrate-front-end|offchain-storage|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19594" PostHistoryTypeId="5" PostId="5214" RevisionGUID="ce98e8e9-40f8-4cda-b296-ebe201bee1de" CreationDate="2022-10-07T12:50:08.657" UserId="505" Comment="added 782 characters in body" Text="Hey guys I'm seeing a weird thing with the following migration code:&#xD;&#xA;```&#xD;&#xA;pub struct SomeMigration;&#xD;&#xA;impl OnRuntimeUpgrade for SomeMigration {&#xD;&#xA;    fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA;        let pallet_prefix: &amp;[u8] = b&quot;SomeName&quot;;&#xD;&#xA;        let storage_item_prefix: &amp;[u8] = b&quot;TestMe&quot;;&#xD;&#xA;&#xD;&#xA;        let value = match take_storage_value::&lt;u32&gt;(pallet_prefix, storage_item_prefix, &amp;[]) {&#xD;&#xA;            Some(value) =&gt; value,&#xD;&#xA;            None =&gt; {&#xD;&#xA;                return 0;&#xD;&#xA;            }&#xD;&#xA;        };&#xD;&#xA;        let new_value: u128 = value as u128;&#xD;&#xA;        put_storage_value::&lt;u128&gt;(pallet_prefix, storage_item_prefix, &amp;[], new_value);&#xD;&#xA;&#xD;&#xA;        1&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;    fn pre_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;        let pallet_prefix: &amp;[u8] = b&quot;SomeName&quot;;&#xD;&#xA;        let storage_item_prefix: &amp;[u8] = b&quot;TestMe&quot;;&#xD;&#xA;        assert!(get_storage_value::&lt;u32&gt;(pallet_prefix, storage_item_prefix, &amp;[]).is_none());&#xD;&#xA;        put_storage_value(pallet_prefix, storage_item_prefix, &amp;[], 10u32);&#xD;&#xA;        assert!(get_storage_value::&lt;u32&gt;(pallet_prefix, storage_item_prefix, &amp;[]).is_some());&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;    fn post_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;        let pallet_prefix: &amp;[u8] = b&quot;SomeName&quot;;&#xD;&#xA;        let storage_item_prefix: &amp;[u8] = b&quot;TestMe&quot;;&#xD;&#xA;        assert!(get_storage_value::&lt;u32&gt;(pallet_prefix, storage_item_prefix, &amp;[]).is_none());&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;What's happening here is is the following&#xD;&#xA;1. pre-upgrade: Check that no item exists for u32 storage value `TestMe`&#xD;&#xA;2. pre-upgrade: Write a u32 storage value `TestMe`&#xD;&#xA;3. pre-upgrade: Check that the u32 storage value is_some()&#xD;&#xA;4. on-runtime-upgrade: take_storage_value of the u32 `TestMe`, expecting it to be drained&#xD;&#xA;5. on-runtime-upgrade: write the same value back but as u128&#xD;&#xA;6. on-post-upgrade: check that the old u32 value is_none() &#xD;&#xA;&#xD;&#xA;The problem is that when I use the `try-runtime` tool the assert on step 6 fails, as if the value was not drained in step 4.&#xD;&#xA;But if I actually perform this runtime upgrade on a local network I can see that the old storage key of the u32 storage value is empty after the upgrade and only the new u128 storage value exists.&#xD;&#xA;&#xD;&#xA;This seems like some issue with the try-runtime tool, but I may be using it wrong.&#xD;&#xA;&#xD;&#xA;Thanks for the attention.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;`storage_alias` minimal example:&#xD;&#xA;```&#xD;&#xA;pub mod old {&#xD;&#xA;    #[storage_alias]&#xD;&#xA;    pub type SomeName = StorageValue&lt;PalletName, u32, ValueQuery&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[storage_alias]&#xD;&#xA;pub type SomeName = StorageValue&lt;PalletName, u128, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;pub struct SomeMigration;&#xD;&#xA;impl OnRuntimeUpgrade for SomeMigration {&#xD;&#xA;    fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA;        let value = old::SomeName::take();&#xD;&#xA;        SomeName::set(value as u128);&#xD;&#xA;&#xD;&#xA;        1&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;    fn pre_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;        old::SomeName::set(10u32);&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;    fn post_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;        assert_eq!(old::SomeName::get(), 10u32);&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19595" PostHistoryTypeId="2" PostId="5231" RevisionGUID="61a50e96-4916-4ebd-80b0-48e3585acac2" CreationDate="2022-10-07T13:17:04.427" UserId="94" Text="There is no magic involved here. The key of the storage location is &#xD;&#xA;```js&#xD;&#xA;Twox128(Prefix::pallet_prefix()) ++ Twox128(Prefix::STORAGE_PREFIX)&#xD;&#xA;```&#xD;&#xA;(explained [here](https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc/))&#xD;&#xA;&#xD;&#xA;In your case the old storage hash and the new one are identical. You will therefore still see a value at that location. This is perfectly fine.  &#xD;&#xA;In some migrations you can check that the old value does not decode anymore, but in your case it can decode since `u32` decodes from a `u128`. The SCALE coded is an acronym for  &quot;simple concatenated aggregate little-endian&quot; and therefore the little-endianness here makes it possible.   &#xD;&#xA;You can double-check that with a simple test:  &#xD;&#xA;```rust&#xD;&#xA;let short = 0xffffffffu32.encode();&#xD;&#xA;let long = 0xffffffffu128.encode();&#xD;&#xA;assert_eq!(short, long[..4);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;One example of checking whether old values in a map are still decodable would be in the [scheduler migration](https://github.com/paritytech/substrate/blob/4a5a9dea00c9b4e4d34ff56368451aa4dac09d77/frame/scheduler/src/migration.rs#L105).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19597" PostHistoryTypeId="2" PostId="5232" RevisionGUID="1fef3720-92e0-491c-b5b5-98b3cf4e5718" CreationDate="2022-10-07T14:02:55.357" UserId="292" Text="Another thing, based on the `prior.accumulate` function the largest DOT period and longest conviction amount will be used. Meaning that if the first delegation is 200 DOT with 3x conviction, and the delegation is changed to 500 DOT with 1x conviction, the lock period will reset for 500 DOT with 3x conviction. Which would be buggy behavior. &#xD;&#xA;&#xD;&#xA;Also, another question: If the lock hasn't been removed even after its period has expired, can we assume the same behavior?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19599" PostHistoryTypeId="50" PostId="4601" RevisionGUID="b48a8f0e-25a1-43e9-bb65-71c6d847775d" CreationDate="2022-10-07T14:06:30.813" UserId="-1" />
  <row Id="19600" PostHistoryTypeId="2" PostId="5233" RevisionGUID="724f420c-3393-450e-af19-6b10c7cb3da0" CreationDate="2022-10-07T15:09:09.100" UserId="590" Text="Can you please explain the reasoning for choosing the following coefficient p and q for the [WeightToFeePolynomial](https://github.com/paritytech/polkadot/blob/850d1f5a819de5a9bf52a149ffd8b7d584ba1076/runtime/polkadot/constants/src/lib.rs#L85) in Polkadot?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	pub struct WeightToFee;&#xD;&#xA;	impl WeightToFeePolynomial for WeightToFee {&#xD;&#xA;		type Balance = Balance;&#xD;&#xA;		fn polynomial() -&gt; WeightToFeeCoefficients&lt;Self::Balance&gt; {&#xD;&#xA;			// in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:&#xD;&#xA;			let p = super::currency::CENTS;&#xD;&#xA;			let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time());&#xD;&#xA;			smallvec![WeightToFeeCoefficient {&#xD;&#xA;				degree: 1,&#xD;&#xA;				negative: false,&#xD;&#xA;				coeff_frac: Perbill::from_rational(p % q, q),&#xD;&#xA;				coeff_integer: p / q,&#xD;&#xA;			}]&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Why is P set `super::currency::CENTS` and q is set to `10 * Balance::from(ExtrinsicBaseWeight::get().ref_time())`;?&#xD;&#xA;&#xD;&#xA;What is the reason for choosing these values to calculate the weight to fee instead of a 1-to-1 mapping using the IdentityFee?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19602" PostHistoryTypeId="1" PostId="5233" RevisionGUID="724f420c-3393-450e-af19-6b10c7cb3da0" CreationDate="2022-10-07T15:09:09.100" UserId="590" Text="Polkadot WeightToFee Coefficient" ContentLicense="CC BY-SA 4.0" />
  <row Id="19603" PostHistoryTypeId="3" PostId="5233" RevisionGUID="724f420c-3393-450e-af19-6b10c7cb3da0" CreationDate="2022-10-07T15:09:09.100" UserId="590" Text="|weighttofee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19605" PostHistoryTypeId="5" PostId="5224" RevisionGUID="3b034537-02a7-4aff-8945-4fc01f9e0e79" CreationDate="2022-10-07T15:30:31.593" UserId="590" Comment="added 309 characters in body" Text="I am trying to understand how to make modifications to the WeightToFee implementation after updating our decimal places by looking at how [Polkadot](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L85) and [Rococo](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/constants/src/lib.rs#L85) differ. &#xD;&#xA;&#xD;&#xA;Rococos decimal places are set to 10e12 [here](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/constants/src/lib.rs#L28) and Polkadots decimal places are set to 10e10 [here](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L30).&#xD;&#xA;&#xD;&#xA;Given that they have different decimal places, I expected their `WeightToFeePolynomial` implementation to differ slightly. However, they are both the same. Why?&#xD;&#xA;&#xD;&#xA;**Questions**:&#xD;&#xA;1. Can you please provide clarity on the following comment left [here](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L88)?&#xD;&#xA;&gt; // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:&#xD;&#xA;&#xD;&#xA;For example, what does the &quot;smallest non-zero weight&quot; mean? And how is it that both Rococo and Polkadot are mapped to 1/10 CENT when their decimal places are different?&#xD;&#xA;&#xD;&#xA;2. how is it that in Polkadot the &quot;extrinsic base weight is mapped 1/10 of a cent&quot;?&#xD;&#xA;&#xD;&#xA;Below the extrinsic base weight does not look like it maps to 1/10 of a cent. Maybe I am misunderstanding the comment?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;CENTS = 100_000_000&#xD;&#xA;extrinsic_base_weight = 1_000 * 85_212 = 85_212_000 ~ 100_000_000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Why is Rococo and Polkadot's implementation of WeightToFeePolynomial the same when they both have different decimal places?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19606" PostHistoryTypeId="5" PostId="5233" RevisionGUID="e94a7560-91ae-4a1e-a335-354136a07b6b" CreationDate="2022-10-07T15:37:36.983" UserId="590" Comment="added 114 characters in body" Text="Can you please explain the reasoning for choosing the following coefficient p and q for the [WeightToFeePolynomial](https://github.com/paritytech/polkadot/blob/850d1f5a819de5a9bf52a149ffd8b7d584ba1076/runtime/polkadot/constants/src/lib.rs#L85) in Polkadot?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	pub struct WeightToFee;&#xD;&#xA;	impl WeightToFeePolynomial for WeightToFee {&#xD;&#xA;		type Balance = Balance;&#xD;&#xA;		fn polynomial() -&gt; WeightToFeeCoefficients&lt;Self::Balance&gt; {&#xD;&#xA;			// in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:&#xD;&#xA;			let p = super::currency::CENTS;&#xD;&#xA;			let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time());&#xD;&#xA;			smallvec![WeightToFeeCoefficient {&#xD;&#xA;				degree: 1,&#xD;&#xA;				negative: false,&#xD;&#xA;				coeff_frac: Perbill::from_rational(p % q, q),&#xD;&#xA;				coeff_integer: p / q,&#xD;&#xA;			}]&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;**Questions:**&#xD;&#xA; 1. Why is P set `super::currency::CENTS` and q is set to `10 * Balance::from(ExtrinsicBaseWeight::get().ref_time())`;?&#xD;&#xA;&#xD;&#xA; 2. What is **the reasoning** for choosing these values to calculate the weight to fee instead of a 1-to-1 mapping using the IdentityFee?&#xD;&#xA;&#xD;&#xA; 3. Why is `Balance::from(ExtrinsicBaseWeight::get().ref_time())` multiplied by 10 in q?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19607" PostHistoryTypeId="5" PostId="5224" RevisionGUID="ab242f8c-3c81-48f8-83a7-2758fccd7d12" CreationDate="2022-10-07T15:46:05.347" UserId="590" Comment="added 25 characters in body" Text="I am trying to understand how to make modifications to the WeightToFee implementation after updating our decimal places by looking at how [Polkadot](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L85) and [Rococo](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/constants/src/lib.rs#L85) differ. &#xD;&#xA;&#xD;&#xA;Rococos decimal places are set to 10e12 [here](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/constants/src/lib.rs#L28) and Polkadots decimal places are set to 10e10 [here](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L30).&#xD;&#xA;&#xD;&#xA;Given that they have different decimal places, I expected their `WeightToFeePolynomial` implementation to differ slightly. However, they are both the same. Why?&#xD;&#xA;&#xD;&#xA;**Questions**:&#xD;&#xA;1. Can you please provide clarity on the following comment left [here](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/constants/src/lib.rs#L88)?&#xD;&#xA;&gt; // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:&#xD;&#xA;&#xD;&#xA;For example, what does the &quot;smallest non-zero weight&quot; mean? And how is it that both Rococo and Polkadot are mapped to 1/10 CENT when their decimal places are different?&#xD;&#xA;&#xD;&#xA;2. how is it that in Polkadot the &quot;extrinsic base weight is mapped 1/10 of a cent&quot;? They appear equivalent.&#xD;&#xA;&#xD;&#xA;Below the extrinsic base weight does not look like it maps to 1/10 of a cent. Maybe I am misunderstanding the comment?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;CENTS = 100_000_000&#xD;&#xA;extrinsic_base_weight = 1_000 * 85_212 = 85_212_000 ~ 100_000_000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Why is Rococo and Polkadot's implementation of WeightToFeePolynomial the same when they both have different decimal places?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19608" PostHistoryTypeId="5" PostId="5231" RevisionGUID="33985de2-4283-48e6-9ccd-ace5c3ff1ec5" CreationDate="2022-10-07T19:10:37.080" UserId="94" Comment="added 1 character in body" Text="There is no magic involved here. The key of the storage location is &#xD;&#xA;```js&#xD;&#xA;Twox128(Prefix::pallet_prefix()) ++ Twox128(Prefix::STORAGE_PREFIX)&#xD;&#xA;```&#xD;&#xA;(explained [here](https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc/))&#xD;&#xA;&#xD;&#xA;In your case the old storage hash and the new one are identical. You will therefore still see a value at that location. This is perfectly fine.  &#xD;&#xA;In some migrations you can check that the old value does not decode anymore, but in your case it can decode since `u32` decodes from a `u128`. The SCALE coded is an acronym for  &quot;simple concatenated aggregate little-endian&quot; and therefore the little-endianness here makes it possible.   &#xD;&#xA;You can double-check that with a simple test:  &#xD;&#xA;```rust&#xD;&#xA;let short = 0xffffffffu32.encode();&#xD;&#xA;let long = 0xffffffffu128.encode();&#xD;&#xA;assert_eq!(short, long[..4]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;One example of checking whether old values in a map are still decodable would be in the [scheduler migration](https://github.com/paritytech/substrate/blob/4a5a9dea00c9b4e4d34ff56368451aa4dac09d77/frame/scheduler/src/migration.rs#L105).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19611" PostHistoryTypeId="2" PostId="5235" RevisionGUID="bf68c474-8b97-48d1-83a9-98946d252292" CreationDate="2022-10-07T21:30:51.420" UserId="3171" Text="I was updating the runtime via sudo with some specific wasm file.&#xD;&#xA;&#xD;&#xA;What is the reason of error while upgrading the runtime?&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UILxx.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="19613" PostHistoryTypeId="1" PostId="5235" RevisionGUID="bf68c474-8b97-48d1-83a9-98946d252292" CreationDate="2022-10-07T21:30:51.420" UserId="3171" Text="Failed To Extract Runtime Version when calling set_code on system pallet. What is the reason?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19614" PostHistoryTypeId="3" PostId="5235" RevisionGUID="bf68c474-8b97-48d1-83a9-98946d252292" CreationDate="2022-10-07T21:30:51.420" UserId="3171" Text="|parachain|runtime|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19615" PostHistoryTypeId="2" PostId="5236" RevisionGUID="c2e2b927-edb6-47f8-b46a-1a12faf1ce02" CreationDate="2022-10-08T01:37:16.073" UserId="1959" Text="If you want to upgrade the parachain runtime, please use `parachainSystem.authorizeUpgrade`, upload your wasm and then `parachainSystem.enactAuthorizedUpgrade` and upload your wasm.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/EDWz2.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/GHPg7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19617" PostHistoryTypeId="2" PostId="5237" RevisionGUID="2032380c-dade-4c3d-9329-fd3a821c9762" CreationDate="2022-10-08T04:55:08.410" UserId="28" Text="1. As stated in the comment:&#xD;&#xA;&#xD;&#xA;   &gt; // in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT&#xD;&#xA;&#xD;&#xA;   This is just an arbitrary choice that one extrinsic should cost whatever CENT represents in the system. There is no hard science here, and ultimately a combination of the dynamic weight to fee coefficient + base fees and all that will be figured out by supply and demand.&#xD;&#xA;&#xD;&#xA;   What you want to do here, is just figure out how many extrinsics could fit in a block, and approximately how much people should pay at a minimum to fill a whole block with their transactions.&#xD;&#xA;&#xD;&#xA;   Choosing a number too low will make your fees very low, but your network easy to attack. A number too high will make your fees higher than they need to be to protect your network. Usually you can only know what these numbers should be through measuring activity on the network, and probably will need to be updated anyway, as all fees on all long running networks have done.&#xD;&#xA;&#xD;&#xA;2. 1-to-1 mapping is an awful choice because you assume that Weight, which is some arbitrary unit of measurement, is 1-1 with your network token, which is also arbitrary. It will almost never be the case these two things align. Instead, as we do here, we compare the size of an average extrinsic, and say that a user must pay at least some minimum amount of our network token. These are things that are in your control, and should have some high level relationship.&#xD;&#xA;&#xD;&#xA;3. We want 1 / 10 cent = 1 base extrinsic. To make the math better for whatever reason, perhaps to ensure that CENT does not saturate before we do the calculations, we do 1 / (10 * base extrinsic). Its all the same.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19622" PostHistoryTypeId="2" PostId="5238" RevisionGUID="9c70dd6b-5918-4fa6-89ea-437cd7ada481" CreationDate="2022-10-08T06:53:36.983" UserId="3252" Text="Which faucet can get many westend test coins ? I want to staking ,but only can get 1wnd every day at https://app.element.io/#/room/#westend_faucet:matrix.org," ContentLicense="CC BY-SA 4.0" />
  <row Id="19624" PostHistoryTypeId="1" PostId="5238" RevisionGUID="9c70dd6b-5918-4fa6-89ea-437cd7ada481" CreationDate="2022-10-08T06:53:36.983" UserId="3252" Text="Which faucet can get many westend test coins?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19625" PostHistoryTypeId="3" PostId="5238" RevisionGUID="9c70dd6b-5918-4fa6-89ea-437cd7ada481" CreationDate="2022-10-08T06:53:36.983" UserId="3252" Text="|faucet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19626" PostHistoryTypeId="2" PostId="5239" RevisionGUID="b5d5c988-4361-459c-9d48-a20fc635c8ed" CreationDate="2022-10-08T07:05:24.040" UserId="28" Text="This is entirely controlled by the relay chain right now, as the limits enforced on your chain must be less than the limits enforced by the relay chain validators whom will validate your blocks.&#xD;&#xA;&#xD;&#xA;&gt; This seems low, given that we have 12 seconds to produce a block.&#xD;&#xA;&#xD;&#xA;Indeed it is, and getting these numbers to a better spot is the primary focus of the parachain team. To learn more about that, you should look at the work they are doing on [asynchronous backing](https://polkadot.network/blog/polkadot-roadmap-roundup/#asynchronous-backing).&#xD;&#xA;&#xD;&#xA;&gt; Asynchronous Backing is the first set of major optimizations to&#xD;&#xA;&gt; Polkadot’s parachain consensus protocol since its launch on Polkadot&#xD;&#xA;&gt; in December 2021. Scalability is a huge topic in the blockchain&#xD;&#xA;&gt; ecosystem, and the goal of Parity and the Web3 Foundation as protocol&#xD;&#xA;&gt; designers is to meet the demand of parachains by providing each&#xD;&#xA;&gt; parachain with a large increase in block capacity. If Asynchronous&#xD;&#xA;&gt; Backing is enabled by the network, the block time of 12 seconds for&#xD;&#xA;&gt; parachains will be shortened to 6 seconds, which will mean lower&#xD;&#xA;&gt; latency and faster finality for transactions executed on parachains.&#xD;&#xA;&gt; Furthermore, the parachain blocks themselves will be allocated more&#xD;&#xA;&gt; time for execution, meaning that they get even more throughput.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Asynchronous Backing is a large upgrade spanning the runtime, the&#xD;&#xA;&gt; networking protocol, and the logic of collators which is designed to&#xD;&#xA;&gt; do 3 things: decrease the parachain block time to 6 seconds, increase&#xD;&#xA;&gt; the amount of block space available to each block by a factor of 5-10,&#xD;&#xA;&gt; and allow parachain blocks to be ‘reused’ when they don’t make it onto&#xD;&#xA;&gt; the relay chain in the first attempt. This is a major scalability&#xD;&#xA;&gt; improvement which will both increase the amount of work every&#xD;&#xA;&gt; parachain can do and will optimize network performance to allow for&#xD;&#xA;&gt; more parachains to be registered. We estimate that this update will&#xD;&#xA;&gt; bring the TPS capacity of the network in aggregate to between 100,000&#xD;&#xA;&gt; and 1,000,000, without affecting the security guarantees made by the&#xD;&#xA;&gt; network.&#xD;&#xA;&gt; &#xD;&#xA;&gt; We estimate that Asynchronous Backing will be ready for deployment on&#xD;&#xA;&gt; Kusama by EOY 2022 and then on Polkadot, pending the results of audits&#xD;&#xA;&gt; and testing.&#xD;&#xA;&#xD;&#xA;At the moment, Polkadot relay chain is configured to produce new parachain blocks every 12 seconds, and each block has a maximum weight of .5 seconds computation, and 5 MB proof size." ContentLicense="CC BY-SA 4.0" />
  <row Id="19631" PostHistoryTypeId="6" PostId="5226" RevisionGUID="139a6b21-3c93-4d8e-a795-c3dcb521d4df" CreationDate="2022-10-08T08:01:42.500" UserId="3254" Comment="edited tags" Text="|ink|smart-contract|rust|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19632" PostHistoryTypeId="2" PostId="5240" RevisionGUID="bed3970e-7a5b-42a9-a44d-3a5140f6d7d0" CreationDate="2022-10-08T08:25:53.970" UserId="3252" Text="How to search the dynamic minimum nomination amount? &#xD;&#xA;I use this.api.query.staking.minNominatorBond can not get the dynamic amount;&#xD;&#xA;like this:&#xD;&#xA;```&#xD;&#xA;const blockhash = await this.api.rpc.chain.getFinalizedHead()&#xD;&#xA;const minNominatorBondValue = await this.api.query.staking.minNominatorBond.at(blockhash)&#xD;&#xA;console.log(`minNominatorBond:${minNominatorBondValue.toNumber()}`)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19634" PostHistoryTypeId="1" PostId="5240" RevisionGUID="bed3970e-7a5b-42a9-a44d-3a5140f6d7d0" CreationDate="2022-10-08T08:25:53.970" UserId="3252" Text="How to search the dynamic minimum nomination amount?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19635" PostHistoryTypeId="3" PostId="5240" RevisionGUID="bed3970e-7a5b-42a9-a44d-3a5140f6d7d0" CreationDate="2022-10-08T08:25:53.970" UserId="3252" Text="|minnominated|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19636" PostHistoryTypeId="5" PostId="5240" RevisionGUID="81b3c0b4-93bc-42a3-83f1-d63836c30acc" CreationDate="2022-10-08T08:28:51.253" UserId="251" Comment="added 15 characters in body" Text="How to search the dynamic minimum nomination amount? &#xD;&#xA;&#xD;&#xA;I use `this.api.query.staking.minNominatorBond` and it can not get the dynamic amount;&#xD;&#xA;like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const blockhash = await this.api.rpc.chain.getFinalizedHead()&#xD;&#xA;const minNominatorBondValue = await this.api.query.staking.minNominatorBond.at(blockhash)&#xD;&#xA;console.log(`minNominatorBond:${minNominatorBondValue.toNumber()}`)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19637" PostHistoryTypeId="2" PostId="5241" RevisionGUID="ccbb4e72-355f-444f-9c41-d5865f71bc1d" CreationDate="2022-10-08T08:35:08.820" UserId="3301" Text="I am a beginner learning the substrate framework, So am actually following the documentation on the substrate website where it references the use of macros in a custom pallet, after implementing all the code, am facing some import errors, due to the lines posted below.&#xD;&#xA;&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;Now the error says ``` ^^^^^^ help: a similar path exists: `frame_system::pallet``` and also redlines the ```#[frame_support::pallet]``` line. i have tried replacing the ```frame_support``` with ```frame_system``` to no avail, any pointers" ContentLicense="CC BY-SA 4.0" />
  <row Id="19639" PostHistoryTypeId="1" PostId="5241" RevisionGUID="ccbb4e72-355f-444f-9c41-d5865f71bc1d" CreationDate="2022-10-08T08:35:08.820" UserId="3301" Text="Error on building the Pallet Runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="19640" PostHistoryTypeId="3" PostId="5241" RevisionGUID="ccbb4e72-355f-444f-9c41-d5865f71bc1d" CreationDate="2022-10-08T08:35:08.820" UserId="3301" Text="|pallet|substrate-node-template|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19641" PostHistoryTypeId="2" PostId="5242" RevisionGUID="25ce8811-41fa-4999-98bd-6508bf87f733" CreationDate="2022-10-08T08:39:27.433" UserId="251" Text="Check your `Cargo.toml`. I think you missed the `frame-support` dependency." ContentLicense="CC BY-SA 4.0" />
  <row Id="19643" PostHistoryTypeId="5" PostId="5241" RevisionGUID="3f093a98-b91b-4156-bd95-f6eeb799164b" CreationDate="2022-10-08T08:49:04.510" UserId="3301" Comment="added 801 characters in body" Text="I am a beginner learning the substrate framework, So am actually following the documentation on the substrate website where it references the use of macros in a custom pallet, after implementing all the code, am facing some import errors, due to the lines posted below.&#xD;&#xA;&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;Below is the complete error trace&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    Compiling pallet-template v4.0.0-dev (/Users/mac/Desktop/pallet-identity/pallets/template)&#xD;&#xA;  error: Invalid usage of RuntimeEvent, `Config` contains no associated type `RuntimeEvent`, but enum `Event` is declared (in use of `#[pallet::event]`). An RuntimeEvent associated type must be declare on trait `Config`.&#xD;&#xA;    --&gt; /Users/mac/Desktop/pallet-identity/pallets/template/src/lib.rs:11:1&#xD;&#xA;     |&#xD;&#xA;  11 | #[frame_support::pallet]&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0432]: unresolved import `pallet`&#xD;&#xA;   --&gt; /Users/mac/Desktop/pallet-identity/pallets/template/src/lib.rs:7:9&#xD;&#xA;    |&#xD;&#xA;  7 | pub use pallet::*;&#xD;&#xA;    |         ^^^^^^ help: a similar path exists: `frame_system::pallet`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0432`.&#xD;&#xA;  error: could not compile `pallet-template` due to 2 previous errors&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19644" PostHistoryTypeId="5" PostId="5242" RevisionGUID="e4e7f58f-3c12-4638-ab92-a80c11fff632" CreationDate="2022-10-08T08:54:09.320" UserId="251" Comment="added 540 characters in body" Text="Outdated&#xD;&#xA;~~Check your `Cargo.toml`. I think you missed the `frame-support` dependency.~~&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After you updated the detail.&#xD;&#xA;&#xD;&#xA;The main error is:&#xD;&#xA;```rs&#xD;&#xA;error: Invalid usage of RuntimeEvent, `Config` contains no associated type `RuntimeEvent`, but enum `Event` is declared (in use of `#[pallet::event]`). An RuntimeEvent associated type must be declare on trait `Config`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, follow the message to add the `RuntimeEvent` field back to your `Config` trait.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;type RuntimeEvent: From&lt;Event&lt;Self, I&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;```&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0432]: unresolved import `pallet`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This error is because the macro will generate a mod `pallet`. But there another error occurred, so the mod `pallet` can not be generated. Thus, it reports can not find the pallet`" ContentLicense="CC BY-SA 4.0" />
  <row Id="19645" PostHistoryTypeId="4" PostId="5241" RevisionGUID="c18c2ed2-eb87-45e2-ac9f-77adad2a3425" CreationDate="2022-10-08T08:58:54.467" UserId="251" Comment="edited title" Text="Invalid usage of `RuntimeEvent`" ContentLicense="CC BY-SA 4.0" />
  <row Id="19646" PostHistoryTypeId="5" PostId="5242" RevisionGUID="21874eff-67b1-49a7-9fe4-8fd1772edbcc" CreationDate="2022-10-08T09:00:33.290" UserId="251" Comment="added 540 characters in body" Text="Outdated&#xD;&#xA;~~Check your `Cargo.toml`. I think you missed the `frame-support` dependency.~~&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After you updated the detail.&#xD;&#xA;&#xD;&#xA;The main error is:&#xD;&#xA;```rs&#xD;&#xA;error: Invalid usage of RuntimeEvent, `Config` contains no associated type `RuntimeEvent`, but enum `Event` is declared (in use of `#[pallet::event]`). An RuntimeEvent associated type must be declare on trait `Config`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, follow the message to add the `RuntimeEvent` field back to your `Config` trait.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;type RuntimeEvent: From&lt;Event&lt;Self, I&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After taking a look at your source code.&#xD;&#xA;&#xD;&#xA;I believe you have updated your Substrate version.&#xD;&#xA;&#xD;&#xA;There is a breaking change.&#xD;&#xA;&#xD;&#xA;`Config::Event` was renamed to `Config::RuntimeEvent`.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/11981.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0432]: unresolved import `pallet`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This error is because the macro will generate a mod `pallet`. But another error occurred whiling expending/executing the macro, so the mod `pallet` can not be generated. Thus, it reports can not find the `pallet`" ContentLicense="CC BY-SA 4.0" />
  <row Id="19647" PostHistoryTypeId="6" PostId="5241" RevisionGUID="988d5f5d-4816-49e3-a4d2-ed115d95975f" CreationDate="2022-10-08T09:05:04.613" UserId="251" Comment="edited tags" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19648" PostHistoryTypeId="2" PostId="5243" RevisionGUID="1b635cb8-f7f8-41e6-9246-26f1f60fc82f" CreationDate="2022-10-08T09:39:37.227" UserId="2551" Text="# Problem&#xD;&#xA;I upgraded my project to ink4.0.0, and upgrate @polkadot/api-contract to the latest version, then I encountered an error when sending transaction.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: createType(Call):: Call: failed decoding contracts.call:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;value&quot;:&quot;Lookup78&quot;,&quot;gas_limit&quot;:&quot;Lookup93&quot;,&quot;storage_deposit_limit&quot;:&quot;Option&lt;Compact&lt;u128&gt;&gt;&quot;,&quot;data&quot;:&quot;Bytes&quot;}:: Struct: failed on gas_limit: Compact&lt;Weight&gt;:: u64: Negative number passed to unsigned type&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# Code&#xD;&#xA;My code is like this&#xD;&#xA;```&#xD;&#xA;let value = 0;&#xD;&#xA;            let gasLimit = -1;&#xD;&#xA;            await contract.tx[methodName]({ value, gasLimit }, ...arguments).signAndSend(sender, (result) =&gt; {&#xD;&#xA;                if (result.status.isInBlock) {&#xD;&#xA;                    console.log('in a block');&#xD;&#xA;                } else if (result.status.isFinalized) {&#xD;&#xA;                    console.log('finalized');&#xD;&#xA;                }&#xD;&#xA;            });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It worked well for ink3.0.&#xD;&#xA;&#xD;&#xA;I wonder if I have to estimate gas in ink4.0.0, or I can set gaslimit 10**12?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19650" PostHistoryTypeId="1" PostId="5243" RevisionGUID="1b635cb8-f7f8-41e6-9246-26f1f60fc82f" CreationDate="2022-10-08T09:39:37.227" UserId="2551" Text="Gaslimit can not be set -1 in ink4.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="19651" PostHistoryTypeId="3" PostId="5243" RevisionGUID="1b635cb8-f7f8-41e6-9246-26f1f60fc82f" CreationDate="2022-10-08T09:39:37.227" UserId="2551" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19652" PostHistoryTypeId="50" PostId="4668" RevisionGUID="63c4fa31-8280-47fd-91a3-54ad0c01d908" CreationDate="2022-10-08T10:06:30.883" UserId="-1" />
  <row Id="19653" PostHistoryTypeId="2" PostId="5244" RevisionGUID="20117331-ef3c-4be4-8132-b2b1db975b8c" CreationDate="2022-10-08T10:12:38.470" UserId="1867" Text="I did check out your repo: you need to move the constructor as well as all message's and other parts of the Smart Contract logic within the actual implementation `impl Amm { /* code here */ }`&#xD;&#xA;&#xD;&#xA;I did a PR to your repo which fixes this part:https://github.com/tnkshuuhei/WasmAMM/pull/1. The code will still not compile, as I've already mentioned in my comment you need to replace the `HashMap` with the `Mapping` struct to get it working with an up to date version of ink!. See: https://use.ink/datastructures/mapping/ for details." ContentLicense="CC BY-SA 4.0" />
  <row Id="19657" PostHistoryTypeId="2" PostId="5245" RevisionGUID="ff6db92e-3c6b-466d-97b7-359a79313036" CreationDate="2022-10-08T17:19:06.457" UserId="2548" Text="I do have a native app written in Java/Kotlin and I would like to connect it with my substrate node.&#xD;&#xA;&#xD;&#xA;Which is the best way to do it? Any open-source library? &#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="19659" PostHistoryTypeId="1" PostId="5245" RevisionGUID="ff6db92e-3c6b-466d-97b7-359a79313036" CreationDate="2022-10-08T17:19:06.457" UserId="2548" Text="Best way to connect my substrate node with android app" ContentLicense="CC BY-SA 4.0" />
  <row Id="19660" PostHistoryTypeId="3" PostId="5245" RevisionGUID="ff6db92e-3c6b-466d-97b7-359a79313036" CreationDate="2022-10-08T17:19:06.457" UserId="2548" Text="|substrate-node|rust|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19661" PostHistoryTypeId="5" PostId="5100" RevisionGUID="7785cd7c-80a1-4f92-a4a7-fb6d6585c1ec" CreationDate="2022-10-08T18:33:43.053" UserId="298" Comment="added 171 characters in body" Text="After fixing stalled finality which was due to 5 of 13 valdidators broken, finality is now 502 blocks behind, but it is not catching up to production. &#xD;&#xA;&#xD;&#xA;We get this error: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-29 20:13:03 Safeguard enforced finalization of child forced_target=0xd0df478b4bf96df1871fa22890f73c526c4d79b840496c9543bb2b080009e5ca&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can view the chain here: https://apps.decentration.org/?rpc=wss%3A%2F%2Fpopart1.jelliedowl.com#/explorer&#xD;&#xA;&#xD;&#xA;It seems like block production may have also gone into a “slow mode” because finality is so far behind?  &#xD;&#xA;&#xD;&#xA;We are running Rococo `release-v0.9.26-1`&#xD;&#xA;&#xD;&#xA;How can we remedy this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eSDwP.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19662" PostHistoryTypeId="2" PostId="5246" RevisionGUID="60d60733-3040-4f5b-bea9-3483a7c221d4" CreationDate="2022-10-08T19:31:44.370" UserId="28" Text="Not sure how up to date this library stays, but here is a Substrate library written in Java:&#xD;&#xA;&#xD;&#xA;https://github.com/emeraldpay/polkaj&#xD;&#xA;&#xD;&#xA;And here is one in Kotlin:&#xD;&#xA;&#xD;&#xA;https://github.com/NodleCode/substrate-client-kotlin" ContentLicense="CC BY-SA 4.0" />
  <row Id="19664" PostHistoryTypeId="5" PostId="5203" RevisionGUID="5dbce297-843a-42c6-aa28-98a7858c8138" CreationDate="2022-10-08T21:31:03.670" UserId="1867" Comment="deleted 4 characters in body" Text="`pallet-contract` has a build in re-entrancy detection and re-entrancy is prevented by default. Indeed, you can allow for re-entrancy by setting the correct `CallFlags`, see:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/ink/ink_env/struct.CallFlags.html&#xD;&#xA;&#xD;&#xA;I'd advise you to check how cross contract calls are build in the upgradable contracts example:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/ink/blob/master/examples/upgradeable-contracts/forward-calls/lib.rs#L72&#xD;&#xA;&#xD;&#xA;Just that you need to set `.allow_reentry(true)` flag in addition when building the cross-contract call." ContentLicense="CC BY-SA 4.0" />
  <row Id="19666" PostHistoryTypeId="10" PostId="5117" RevisionGUID="4cfb6bae-22f7-4a6e-8cda-e6a118cb92de" CreationDate="2022-10-09T01:38:49.670" UserId="28" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="19667" PostHistoryTypeId="2" PostId="5247" RevisionGUID="a8e3a58a-c5b7-4b57-bd15-295bd58e605c" CreationDate="2022-10-09T01:45:11.547" UserId="3121" Text="I tried removing the `transaction-payment-pallet` section from the `construct_runtime!` macro to test if that would set all transaction fees to zero. However, `cargo build` threw an error saying the impl of the pallet is required for the `Config` trait of some primitive.&#xD;&#xA;&#xD;&#xA;Is there a right way to accomplish the removal of a pallet or say in the example above, will I be required to go through the code more manually?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19669" PostHistoryTypeId="1" PostId="5247" RevisionGUID="a8e3a58a-c5b7-4b57-bd15-295bd58e605c" CreationDate="2022-10-09T01:45:11.547" UserId="3121" Text="What is the right way to remove a pallet from the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19670" PostHistoryTypeId="3" PostId="5247" RevisionGUID="a8e3a58a-c5b7-4b57-bd15-295bd58e605c" CreationDate="2022-10-09T01:45:11.547" UserId="3121" Text="|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19671" PostHistoryTypeId="2" PostId="5248" RevisionGUID="5edc7094-1835-4aa3-b809-465e0dbb5298" CreationDate="2022-10-09T01:53:37.570" UserId="28" Text="The transaction payment pallet is not that easy to remove since it is used in a lot of different parts of the runtime. If you goal is to remove this pallet, indeed you will need to go through the code of the runtime more manually, and remove all uses of it.&#xD;&#xA;&#xD;&#xA;However, if your goal is just to make everything zero fees, you can do that by updating your config of the pallet's `WeighToFee` and `LengthToFee` types.&#xD;&#xA;&#xD;&#xA;Easiest is probably to use `ConstantMultiplier`: https://paritytech.github.io/substrate/master/frame_support/weights/struct.ConstantMultiplier.html&#xD;&#xA;&#xD;&#xA;Then set the multiplier to zero.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;5&gt;;&#xD;&#xA;	type WeightToFee = ConstantMultiplier&lt;Balance, Constu128&lt;0u128&gt;&gt;;&#xD;&#xA;	type LengthToFee = ConstantMultiplier&lt;Balance, Constu128&lt;0u128&gt;&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ConstFeeMultiplier&lt;FeeMultiplier&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19673" PostHistoryTypeId="5" PostId="5247" RevisionGUID="1eb50613-5501-460d-9d29-8e6c122b6ab6" CreationDate="2022-10-09T02:00:57.253" UserId="3121" Comment="added 73 characters in body" Text="After going through some of the posts here, as an experiment I tried removing the `transaction-payment-pallet` section from the `construct_runtime!` macro to test if that would set all transaction fees to zero. However, `cargo build` threw an error saying the impl of the pallet is required for the `Config` trait of some primitive.&#xD;&#xA;&#xD;&#xA;Is there a right way to accomplish the removal of any pallet, or say in the example above, will I be required to go through the code more manually?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19675" PostHistoryTypeId="5" PostId="5248" RevisionGUID="d9c564b2-8876-4497-ba7f-a22638e09254" CreationDate="2022-10-09T05:44:29.887" UserId="3121" Comment="import and upper case U for ConstU128, just to save others time" Text="The transaction payment pallet is not that easy to remove since it is used in a lot of different parts of the runtime. If you goal is to remove this pallet, indeed you will need to go through the code of the runtime more manually, and remove all uses of it.&#xD;&#xA;&#xD;&#xA;However, if your goal is just to make everything zero fees, you can do that by updating your config of the pallet's `WeighToFee` and `LengthToFee` types.&#xD;&#xA;&#xD;&#xA;Easiest is probably to use `ConstantMultiplier`: https://paritytech.github.io/substrate/master/frame_support/weights/struct.ConstantMultiplier.html&#xD;&#xA;&#xD;&#xA;Then set the multiplier to zero.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use frame_support::weights::ConstantMultiplier; // ADD THIS TOO&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;5&gt;;&#xD;&#xA;	type WeightToFee = ConstantMultiplier&lt;Balance, ConstU128&lt;0u128&gt;&gt;;&#xD;&#xA;	type LengthToFee = ConstantMultiplier&lt;Balance, ConstU128&lt;0u128&gt;&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ConstFeeMultiplier&lt;FeeMultiplier&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19676" PostHistoryTypeId="24" PostId="5248" RevisionGUID="d9c564b2-8876-4497-ba7f-a22638e09254" CreationDate="2022-10-09T05:44:29.887" Comment="Proposed by 3121 approved by 28 edit id of 306" ContentLicense="CC BY-SA 4.0" />
  <row Id="19677" PostHistoryTypeId="5" PostId="5247" RevisionGUID="662121e0-77b9-45d2-82b8-fb3887758b76" CreationDate="2022-10-09T05:51:19.547" UserId="3121" Comment="deleted 32 characters in body; edited title" Text="After going through some of the posts here, as an experiment I tried removing the `transaction-payment-pallet` from the `construct_runtime!` to test if that would set all transaction fees to zero. However, `cargo build` threw an error saying the impl of the pallet is required for the `Config` trait of some primitive.&#xD;&#xA;&#xD;&#xA;Is there a right way to remove this pallet, or say in the example above, will I be required to go through the code more manually?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19678" PostHistoryTypeId="4" PostId="5247" RevisionGUID="662121e0-77b9-45d2-82b8-fb3887758b76" CreationDate="2022-10-09T05:51:19.547" UserId="3121" Comment="deleted 32 characters in body; edited title" Text="What is the right way to remove a transaction-payment-pallet from the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19679" PostHistoryTypeId="2" PostId="5249" RevisionGUID="089da32c-578e-40c4-8abd-561d266bf7f7" CreationDate="2022-10-09T06:56:56.750" UserId="183" Text="I came across this [basic example][1] in the substrate repo, where a range `1..1000` is used when [benchmarking][2] it. The generated `weights.rs` shows&#xD;&#xA;```&#xD;&#xA;	fn set_dummy_benchmark(b: u32, ) -&gt; Weight {&#xD;&#xA;		Weight::from_ref_time(5_834_000 as u64)&#xD;&#xA;			.saturating_add(Weight::from_ref_time(24_000 as u64).saturating_mul(b as u64))&#xD;&#xA;			.saturating_add(T::DbWeight::get().writes(1 as u64))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've got two questions:&#xD;&#xA;1. Isn't that a bit counterintuitive? I understand the whole benchmarking will finally build a linear model, but why would `set_dummy(1)` and `set_dummy(1000)` make such a big difference? I mean the `saturating_mul(b as u64)` part: if `b` is big enough it can consume a significant amount of weights? OK `b` is set to be 1000 max, but I thought it was as simple as updating storage with an integer(or alike) so it should be constant?&#xD;&#xA;&#xD;&#xA;2. If there's no such range variance, I could imagine the benchmarking outcome would be constant. So which one is correct? And which one should we follow in real practice? I'm just concerned that defining the upper bound for every value would be infeasible..&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/460fff965a2fd25d3a75ef436ec265b4c2af47a0/frame/examples/basic/src/lib.rs#L545-L547&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/460fff965a2fd25d3a75ef436ec265b4c2af47a0/frame/examples/basic/src/benchmarking.rs#L38-L40" ContentLicense="CC BY-SA 4.0" />
  <row Id="19681" PostHistoryTypeId="1" PostId="5249" RevisionGUID="089da32c-578e-40c4-8abd-561d266bf7f7" CreationDate="2022-10-09T06:56:56.750" UserId="183" Text="Why would benchmarking a simple setter has a linear behaviour" ContentLicense="CC BY-SA 4.0" />
  <row Id="19682" PostHistoryTypeId="3" PostId="5249" RevisionGUID="089da32c-578e-40c4-8abd-561d266bf7f7" CreationDate="2022-10-09T06:56:56.750" UserId="183" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19683" PostHistoryTypeId="5" PostId="5249" RevisionGUID="5a32388b-531c-4847-955a-7e03ce6773f3" CreationDate="2022-10-09T08:31:06.167" UserId="251" Comment="deleted 3 characters in body" Text="I came across this [basic example][1] in the substrate repo, where a range `1..1000` is used when [benchmarking][2] it. The generated `weights.rs` shows&#xD;&#xA;```rs&#xD;&#xA;fn set_dummy_benchmark(b: u32, ) -&gt; Weight {&#xD;&#xA;	Weight::from_ref_time(5_834_000 as u64)&#xD;&#xA;		.saturating_add(Weight::from_ref_time(24_000 as u64).saturating_mul(b as u64))&#xD;&#xA;		.saturating_add(T::DbWeight::get().writes(1 as u64))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've got two questions:&#xD;&#xA;1. Isn't that a bit counterintuitive? I understand the whole benchmarking will finally build a linear model, but why would `set_dummy(1)` and `set_dummy(1000)` make such a big difference? I mean the `saturating_mul(b as u64)` part: if `b` is big enough it can consume a significant amount of weights? OK `b` is set to be 1000 max, but I thought it was as simple as updating storage with an integer(or alike) so it should be constant?&#xD;&#xA;&#xD;&#xA;2. If there's no such range variance, I could imagine the benchmarking outcome would be constant. So which one is correct? And which one should we follow in real practice? I'm just concerned that defining the upper bound for every value would be infeasible..&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/460fff965a2fd25d3a75ef436ec265b4c2af47a0/frame/examples/basic/src/lib.rs#L545-L547&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/460fff965a2fd25d3a75ef436ec265b4c2af47a0/frame/examples/basic/src/benchmarking.rs#L38-L40" ContentLicense="CC BY-SA 4.0" />
  <row Id="19684" PostHistoryTypeId="5" PostId="5165" RevisionGUID="a8166584-4060-4a0d-8d0c-c1f869f69c80" CreationDate="2022-10-09T09:05:51.477" UserId="251" Comment="deleted 14 characters in body" Text="When I look for the `exposures.others.length`, it is not the same as the explorer show. The `exposures.others.length` is 302 but the explorer shows 342. Why? Should I use the `currentEra` or `activeEra`?&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const activeEra = (await api.query.staking.activeEra()).unwrap();&#xD;&#xA;const exposures = await api.query.staking.erasStakers.at(blockHash,activeEra.index, address);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const lastEra = (await api.query.staking.currentEra()).unwrap();&#xD;&#xA;const exposures = await api.query.staking.erasStakers.at(blockHash,lastEra, address);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19685" PostHistoryTypeId="2" PostId="5250" RevisionGUID="a42221c4-fdb6-4789-be97-71729bb9727c" CreationDate="2022-10-09T10:26:05.497" UserId="167" Text="[This](https://github.com/paritytech/polkadot-scripts/blob/581b0e7ff146a3e87ce7f3a92e0ed12517a4350f/src/services/index.ts#L103) is how you calculate it, among all other staking metrics. To re-summarize it here: &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;// a map from all nominators to their total stake.&#xD;&#xA;const assignments = new Map();&#xD;&#xA;const currentEra = (await api.query.staking.currentEra()).unwrap();&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries(currentEra);&#xD;&#xA;&#xD;&#xA;// populate the map&#xD;&#xA;stakers&#xD;&#xA;	.map(([x, y]) =&gt; x.others)&#xD;&#xA;	.flat(1)&#xD;&#xA;	.forEach((x) =&gt; {&#xD;&#xA;		const nominator = x.who.toString();&#xD;&#xA;		const amount = x.value;&#xD;&#xA;		const val = assignments.get(nominator);&#xD;&#xA;        // note that a nominator might have multiple validators, so we might need to add here.&#xD;&#xA;		assignments.set(nominator, val ? amount.toBn().add(val) : amount.toBn());&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;const nominatorStakes = Array.from(assignments);&#xD;&#xA;nominatorStakes.sort((a, b) =&gt; a[1].cmp(b[1]));&#xD;&#xA;const minActiveThreshold = nominatorStakes[0][1];&#xD;&#xA;&#xD;&#xA;// 171.8319 DOT at era 859. &#xD;&#xA;console.log(api.createType('Balance', minActiveThreshold).toHuman())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`erasStakers` is the storage entry that is storing the final map of validators and their `Exposure`, which contains all of the active nominators as well. In essence, we are iterating over this data, and finding the smallest nominator. &#xD;&#xA;&#xD;&#xA;`minNominatorBond` is a fixed storage item that is keeping the minimum to set a *nomination intention*. See [this staking update report](https://polkadot.network/blog/staking-update-february-2022/#staking-terminology) for more info. " ContentLicense="CC BY-SA 4.0" />
  <row Id="19691" PostHistoryTypeId="2" PostId="5252" RevisionGUID="aac63172-bce0-43c9-8d85-e4150fb27d43" CreationDate="2022-10-09T10:38:19.880" UserId="3254" Text="Sorry for the rudimentary question, I'm new to Rust and ink!&#xD;&#xA;&#xD;&#xA;I get a lot of errors when I run `cargo +nightly contract test`.&#xD;&#xA;I have checked [the official site][1] for the usage of `ink_storage::Mapping`, but am I implementing it properly?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    error[E0614]: type `u128` cannot be dereferenced&#xD;&#xA;       --&gt; lib.rs:102:26&#xD;&#xA;        |&#xD;&#xA;    102 |             let token1 = *self.token1Balance.get(&amp;caller).unwrap_or(0);&#xD;&#xA;        |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;repo is bellow:https://github.com/tnkshuuhei/WasmAMMcontract/lib.rs  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/datastructures/mapping/&#xD;&#xA;  [2]: https://i.stack.imgur.com/uHcm1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19693" PostHistoryTypeId="1" PostId="5252" RevisionGUID="aac63172-bce0-43c9-8d85-e4150fb27d43" CreationDate="2022-10-09T10:38:19.880" UserId="3254" Text="Cannot reference a value that should have been mapped" ContentLicense="CC BY-SA 4.0" />
  <row Id="19694" PostHistoryTypeId="3" PostId="5252" RevisionGUID="aac63172-bce0-43c9-8d85-e4150fb27d43" CreationDate="2022-10-09T10:38:19.880" UserId="3254" Text="|ink|rust|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19696" PostHistoryTypeId="2" PostId="5253" RevisionGUID="8e4f6c02-cd00-490e-95e8-8b1563a5d907" CreationDate="2022-10-09T11:01:11.000" UserId="251" Text="IMO, this is a pure-rust question. You'd better ask at https://stackoverflow.com/questions/tagged/rust.&#xD;&#xA;&#xD;&#xA;Check https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html.&#xD;&#xA;&#xD;&#xA;Remove the `*` before the expression.&#xD;&#xA;&#xD;&#xA;`u128` is can not be dereferenced.&#xD;&#xA;&#xD;&#xA;You only need to do that if the type is `&amp;u128`." ContentLicense="CC BY-SA 4.0" />
  <row Id="19698" PostHistoryTypeId="6" PostId="5252" RevisionGUID="695e861d-b28a-4a47-9769-a769372ccd9e" CreationDate="2022-10-09T11:01:55.020" UserId="251" Comment="edited tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19699" PostHistoryTypeId="2" PostId="5254" RevisionGUID="e42fff4e-8932-495d-9148-1d1ba878f8f1" CreationDate="2022-10-09T11:18:48.367" UserId="3254" Text="As you can see [here][1], I have changed `HashMap` to `Mapping`. &#xD;&#xA;&#xD;&#xA;Then I got a lot of errors like this, does it mean that there is no `entry` in Mapping?&#xD;&#xA;version is bellow `ink_storage = { version = &quot;3.3&quot;, default-features = false }`&#xD;&#xA;&#xD;&#xA;    error[E0599]: no method named `entry` found for struct `Mapping` in the current scope&#xD;&#xA;&#xD;&#xA;`method not found in Mapping&lt;ink_env::AccountId, u128&gt;`&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5226/inkconstructor-cause-a-error-what-is-wrong-with-it/5244?noredirect=1#comment5007_5244&#xD;&#xA;  [2]: https://i.stack.imgur.com/N5GLs.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19701" PostHistoryTypeId="1" PostId="5254" RevisionGUID="e42fff4e-8932-495d-9148-1d1ba878f8f1" CreationDate="2022-10-09T11:18:48.367" UserId="3254" Text="I got this error when I converted HashMap to Mapping" ContentLicense="CC BY-SA 4.0" />
  <row Id="19702" PostHistoryTypeId="3" PostId="5254" RevisionGUID="e42fff4e-8932-495d-9148-1d1ba878f8f1" CreationDate="2022-10-09T11:18:48.367" UserId="3254" Text="|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19703" PostHistoryTypeId="2" PostId="5255" RevisionGUID="cb97e6d9-064d-4e31-b912-eacd6f82f333" CreationDate="2022-10-09T14:50:14.657" UserId="1867" Text="Correct, you need to read the state variable with `.get`, modify it and then write the updated result back to contract state with `.insert`.&#xD;&#xA;&#xD;&#xA;Check the details [here](https://docs.rs/ink_storage/3.3.1/ink_storage/struct.Mapping.html)" ContentLicense="CC BY-SA 4.0" />
  <row Id="19705" PostHistoryTypeId="5" PostId="5243" RevisionGUID="a65997e5-52f0-4c70-b585-ad63726ea523" CreationDate="2022-10-09T15:16:24.760" UserId="251" Comment="deleted 92 characters in body" Text="# Problem&#xD;&#xA;I upgraded my project to ink4.0.0, and upgrate @polkadot/api-contract to the latest version, then I encountered an error when sending transaction.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;Error: createType(Call):: Call: failed decoding contracts.call:: Struct: failed on args: {&quot;dest&quot;:&quot;MultiAddress&quot;,&quot;value&quot;:&quot;Lookup78&quot;,&quot;gas_limit&quot;:&quot;Lookup93&quot;,&quot;storage_deposit_limit&quot;:&quot;Option&lt;Compact&lt;u128&gt;&gt;&quot;,&quot;data&quot;:&quot;Bytes&quot;}:: Struct: failed on gas_limit: Compact&lt;Weight&gt;:: u64: Negative number passed to unsigned type&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# Code&#xD;&#xA;My code is like this&#xD;&#xA;```js&#xD;&#xA;let value = 0;&#xD;&#xA;let gasLimit = -1;&#xD;&#xA;await contract.tx[methodName]({ value, gasLimit }, ...arguments).signAndSend(sender, (result) =&gt; {&#xD;&#xA;    if (result.status.isInBlock) {&#xD;&#xA;        console.log('in a block');&#xD;&#xA;    } else if (result.status.isFinalized) {&#xD;&#xA;        console.log('finalized');&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It worked well for ink3.0.&#xD;&#xA;&#xD;&#xA;I wonder if I have to estimate gas in ink4.0.0, or I can set gaslimit 10**12?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19706" PostHistoryTypeId="4" PostId="5235" RevisionGUID="fdf4241c-34f8-46a3-851b-133fbdcc2b18" CreationDate="2022-10-09T15:19:26.937" UserId="251" Comment="edited tags; edited title" Text="`FailedToExtractRuntimeVersion` when calling `set_code` during a parachain runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="19707" PostHistoryTypeId="6" PostId="5235" RevisionGUID="fdf4241c-34f8-46a3-851b-133fbdcc2b18" CreationDate="2022-10-09T15:19:26.937" UserId="251" Comment="edited tags; edited title" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19709" PostHistoryTypeId="2" PostId="5256" RevisionGUID="c297ffdc-eb08-4f1e-9ffd-a1f9200428c6" CreationDate="2022-10-09T20:09:06.937" UserId="16" Text="`-1` is not a valid value for a **transaction**. For a transaction you should dry run the contract first and set the `gas_limit` for the transaction to the `gas_required` field as returned by the dry run.&#xD;&#xA;&#xD;&#xA;As a side node: `-1` is not a valid value for the dry run either as it is an unsigned number in substrate. I assume polkadot.js transforms this `-1` into some big number for you." ContentLicense="CC BY-SA 4.0" />
  <row Id="19711" PostHistoryTypeId="2" PostId="5257" RevisionGUID="13009eca-8d63-49db-a0ad-23e7311a6b2a" CreationDate="2022-10-09T20:33:21.210" UserId="2147" Text="Consider a substrate double map&#xD;&#xA;``` rust&#xD;&#xA;pub Foo get(fn category_by_moderator): double_map&#xD;&#xA;            hasher(blake2_128_concat) T::K1, hasher(blake2_128_concat) T::K2 =&gt; T::V;&#xD;&#xA;```&#xD;&#xA;Suppose I want to delete all elements having `k1` as prefix. This is the behavior guaranteed&#xD;&#xA;by `Foo::remove_prefix(k1)`. &#xD;&#xA;Will this result in a `O(1)` time complexity since I am accessing one key only or will it result in a `O(n)` time complexity (with `n` being the all the elements having `k1` as prefix) ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19713" PostHistoryTypeId="1" PostId="5257" RevisionGUID="13009eca-8d63-49db-a0ad-23e7311a6b2a" CreationDate="2022-10-09T20:33:21.210" UserId="2147" Text="storage double map key deletion" ContentLicense="CC BY-SA 4.0" />
  <row Id="19714" PostHistoryTypeId="3" PostId="5257" RevisionGUID="13009eca-8d63-49db-a0ad-23e7311a6b2a" CreationDate="2022-10-09T20:33:21.210" UserId="2147" Text="|rust|runtime|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19715" PostHistoryTypeId="2" PostId="5258" RevisionGUID="bebcf7d8-5140-45ba-88f2-bb58c4227139" CreationDate="2022-10-09T20:59:27.567" UserId="73" Text="This results in `O(n)` time complexity. We need to iterate the storage from the first key starting with `k1` until there are no more elements starting with `k1`." ContentLicense="CC BY-SA 4.0" />
  <row Id="19717" PostHistoryTypeId="2" PostId="5259" RevisionGUID="6723c415-5960-423d-a9e0-34322d2666c2" CreationDate="2022-10-09T21:23:15.313" UserId="19" Text="I have working `substrate-contracts-node` and `contracts-ui` and I want to deploy a `flipper` smart contract. When I try to deploy flipper smart contract I got:&#xD;&#xA;&#xD;&#xA;    DEBUG tokio-runtime-worker runtime::contracts: Execution finished with debug buffer: panicked at 'dispatching ink! constructor failed: could not read input', /home/tomek/workspaces/flipper/lib.rs:8:5&#xD;&#xA;&#xD;&#xA;I did not change flipper source code at all, what I do wrongly? My goal is to have fully working development environment for ink smart contracts.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/jKDVj.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19719" PostHistoryTypeId="1" PostId="5259" RevisionGUID="6723c415-5960-423d-a9e0-34322d2666c2" CreationDate="2022-10-09T21:23:15.313" UserId="19" Text="Rust Ink - Execution finished with debug buffer" ContentLicense="CC BY-SA 4.0" />
  <row Id="19720" PostHistoryTypeId="3" PostId="5259" RevisionGUID="6723c415-5960-423d-a9e0-34322d2666c2" CreationDate="2022-10-09T21:23:15.313" UserId="19" Text="|ink|flipper|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19723" PostHistoryTypeId="2" PostId="5260" RevisionGUID="6848f4d2-a276-4472-be17-ab2137812f9c" CreationDate="2022-10-09T22:09:07.253" UserId="28" Text="The benchmarking process is not an exact science. Rather it is simply measuring the real time execution of a process.&#xD;&#xA;&#xD;&#xA;In this case, the benchmark creator has implied there should be a linear weight function by providing a range of 0 - 1000. The function, you are right, is constant time, but small variance in executing the code my have created enough to make the linear fitting function think there is some amount of linear fit.&#xD;&#xA;&#xD;&#xA;The solution here is to update the benchmark to remove the linear range as I have done here: https://github.com/paritytech/substrate/pull/12456&#xD;&#xA;&#xD;&#xA;So thanks, this is basically a &quot;bug&quot; report." ContentLicense="CC BY-SA 4.0" />
  <row Id="19725" PostHistoryTypeId="2" PostId="5261" RevisionGUID="026261e9-c5b1-4b8d-8bb5-32d7c0f49ea7" CreationDate="2022-10-10T04:06:26.220" UserId="3304" Text="Can anyone help me in understanding the polka dot concepts with some real world example..&#xD;&#xA;I am new to block chain technology...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please help me..&#xD;&#xA;i have tried HTTP://GitHub/substrate-developer-hub/substrate-front-end-template.git&#xD;&#xA;&#xD;&#xA;Thank you &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19727" PostHistoryTypeId="1" PostId="5261" RevisionGUID="026261e9-c5b1-4b8d-8bb5-32d7c0f49ea7" CreationDate="2022-10-10T04:06:26.220" UserId="3304" Text="Basic understanding of polka dot with some real time example" ContentLicense="CC BY-SA 4.0" />
  <row Id="19728" PostHistoryTypeId="3" PostId="5261" RevisionGUID="026261e9-c5b1-4b8d-8bb5-32d7c0f49ea7" CreationDate="2022-10-10T04:06:26.220" UserId="3304" Text="|polkadot|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19729" PostHistoryTypeId="5" PostId="5207" RevisionGUID="fe534faf-13a0-4112-8f28-412b1f0618ab" CreationDate="2022-10-10T08:12:06.237" UserId="3281" Comment="added 679 characters in body; added 20 characters in body" Text="Add the following changes in your contact **Cargo.toml** &#xD;&#xA;&#xD;&#xA;    [dependencies]&#xD;&#xA;    ink = { version =&quot;4.0.0-alpha.3&quot;, default-features = false }&#xD;&#xA;    ethabi = { path = &quot;../ethabi&quot;, default-features = false } &#xD;&#xA;    hex = { version = &quot;0.4.3&quot;, default-features = false } &#xD;&#xA;    scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3.2.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [profile.release] &#xD;&#xA;    overflow-checks = false&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Earlier it was as following&#xD;&#xA;&#xD;&#xA;    [dependencies]&#xD;&#xA;    ink = { version =&quot;4.0.0-alpha.3&quot;, default-features = false }&#xD;&#xA;    ethabi = { path = &quot;../ethabi&quot; }&#xD;&#xA;    hex = { version = &quot;0.4.3&quot; }&#xD;&#xA;    &#xD;&#xA;    scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3.2.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }" ContentLicense="CC BY-SA 4.0" />
  <row Id="19734" PostHistoryTypeId="2" PostId="5263" RevisionGUID="b1054dd5-caf0-4074-b9d1-6d3f5394a05f" CreationDate="2022-10-10T09:14:46.920" UserId="3281" Text="I want to deploy my contract on Rococo contract test net. Apart from *polkadot.js/apps*, do we have any other way to upload and then instantiate the contract?&#xD;&#xA;&#xD;&#xA;My goal is to create a script for the contract deployment for the provided network configurations." ContentLicense="CC BY-SA 4.0" />
  <row Id="19736" PostHistoryTypeId="1" PostId="5263" RevisionGUID="b1054dd5-caf0-4074-b9d1-6d3f5394a05f" CreationDate="2022-10-10T09:14:46.920" UserId="3281" Text="Do we have CLI support for ink! smart contract deployment on configured test-net?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19737" PostHistoryTypeId="3" PostId="5263" RevisionGUID="b1054dd5-caf0-4074-b9d1-6d3f5394a05f" CreationDate="2022-10-10T09:14:46.920" UserId="3281" Text="|ink|smart-contract|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19738" PostHistoryTypeId="2" PostId="5264" RevisionGUID="c0a65a6f-1983-439a-9ef0-f09d92221773" CreationDate="2022-10-10T09:27:31.183" UserId="16" Text="Yes. You can use [`cargo contract`](https://github.com/paritytech/cargo-contract) to interact with a chain. It supports the full range of interactions: `upload`, `instantiate`, `call`. Use the `--url` option to point it to your testnet." ContentLicense="CC BY-SA 4.0" />
  <row Id="19740" PostHistoryTypeId="2" PostId="5265" RevisionGUID="3aa894f3-fb87-43d4-8e35-bf19259128f1" CreationDate="2022-10-10T09:53:12.110" UserId="3308" Text="I'm having trouble determining values for param num_slashing_spans for api.tx.staking.withdrawUnbonded. &#xD;&#xA;I see that the most popular value is ```0```, but sometimes people also use ```2``` and ```84```.&#xD;&#xA;Is there any documents/ instruction on this? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="19742" PostHistoryTypeId="1" PostId="5265" RevisionGUID="3aa894f3-fb87-43d4-8e35-bf19259128f1" CreationDate="2022-10-10T09:53:12.110" UserId="3308" Text="How to determine value for param num_slashing_spans for a withdrawUnbonded tx?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19743" PostHistoryTypeId="3" PostId="5265" RevisionGUID="3aa894f3-fb87-43d4-8e35-bf19259128f1" CreationDate="2022-10-10T09:53:12.110" UserId="3308" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19744" PostHistoryTypeId="5" PostId="5265" RevisionGUID="63715d79-03fb-491d-8b42-933a27fbc520" CreationDate="2022-10-10T09:54:18.247" UserId="3308" Comment="added 6 characters in body" Text="I'm having trouble determining values for param _num_slashing_spans_ for **api.tx.staking.withdrawUnbonded**. &#xD;&#xA;I see that the most popular value is ```0```, but sometimes people also use ```2``` and ```84```.&#xD;&#xA;Is there any documents/ instruction on this? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="19745" PostHistoryTypeId="2" PostId="5266" RevisionGUID="54f1a4a4-0b38-48e6-a804-1d5cbc30daca" CreationDate="2022-10-10T10:05:42.630" UserId="620" Text="When an account withdraws unbonded, there is a chance that it will no longer be a stash account at all (i.e., if it has unbonded its entire stake). When a validator gets slashed, it and its nominators get a _slashing span_ in storage that will need to be cleaned up if this stash is removed from staking.&#xD;&#xA;&#xD;&#xA;So this param is used by the weight calculator to determine the weight of the transaction (more storage items to remove means more weight). Note that if you provide too low of a number in the transaction, it will fail, but if you provide too high of a number it will still work, you will just pay a higher transaction fee.&#xD;&#xA;&#xD;&#xA;To see what value to use, you need to look up the `SlashingSpans`, keyed by the _stash_ account. A really easy way to do this is just to use [Substrate API Sidecar](https://github.com/paritytech/substrate-api-sidecar), which has an account staking info endpoint, which returns [slashing spans](https://github.com/paritytech/substrate-api-sidecar/blob/eb368aeec34b7c8a85802ff0e3e01c94553aca2f/src/controllers/accounts/AccountsStakingInfoController.ts#L41). For more info on how that is fetched, you can check [the implementation](https://github.com/paritytech/substrate-api-sidecar/blob/eb368aeec34b7c8a85802ff0e3e01c94553aca2f/src/services/accounts/AccountsStakingInfoService.ts) of that endpoint." ContentLicense="CC BY-SA 4.0" />
  <row Id="19750" PostHistoryTypeId="2" PostId="5268" RevisionGUID="27e5bfa8-aacc-4c9a-ad6b-017c0a261182" CreationDate="2022-10-10T12:05:56.853" UserId="213" Text="Struct&#xD;&#xA;&#xD;&#xA;    #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, TypeInfo)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;    pub struct Post&lt;PostId, AccountId&gt; {&#xD;&#xA;        pub id: PostId,&#xD;&#xA;    &#xD;&#xA;        pub edited: bool,&#xD;&#xA;    &#xD;&#xA;        pub owner: AccountId,&#xD;&#xA;    &#xD;&#xA;        pub content: Vec&lt;u8&gt;,&#xD;&#xA;    &#xD;&#xA;        pub hidden: bool,&#xD;&#xA;    &#xD;&#xA;        pub upvotes_count: u32,&#xD;&#xA;    &#xD;&#xA;        pub downvotes_count: u32,&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Declaring type&#xD;&#xA;&#xD;&#xA;    type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;    pub type PostOf&lt;T&gt; = Post&lt;PostId, AccountIdOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;Writing impl gives error:&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; PostOf&lt;T&gt; {&#xD;&#xA;    	pub fn new(id: PostId, created_by: AccountIdOf&lt;T&gt;, content: Vec&lt;u8&gt;) -&gt; Self {&#xD;&#xA;    		Post { id, edited: false, owner: created_by, content, hidden: false, upvotes_count: 0, downvotes_count: 0 }&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; PostOf&lt;T&gt; {&#xD;&#xA;      |      ^ unconstrained type parameter&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19752" PostHistoryTypeId="1" PostId="5268" RevisionGUID="27e5bfa8-aacc-4c9a-ad6b-017c0a261182" CreationDate="2022-10-10T12:05:56.853" UserId="213" Text="impl&lt;T: Config&gt; unconstrained type parameter" ContentLicense="CC BY-SA 4.0" />
  <row Id="19753" PostHistoryTypeId="3" PostId="5268" RevisionGUID="27e5bfa8-aacc-4c9a-ad6b-017c0a261182" CreationDate="2022-10-10T12:05:56.853" UserId="213" Text="|substrate-node|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19754" PostHistoryTypeId="2" PostId="5269" RevisionGUID="a24638c0-9df5-4e51-bf27-82806a0e600c" CreationDate="2022-10-10T12:09:18.890" UserId="73" Text="Write:&#xD;&#xA;```&#xD;&#xA;impl&lt;PostId, AccountId&gt; Post&lt;PostId, AccountId&gt; {&#xD;&#xA;    pub fn new(id: PostId, created_by: AccountId, content: Vec&lt;u8&gt;) -&gt; Self {&#xD;&#xA;        Post { id, edited: false, owner: created_by, content, hidden: false, upvotes_count: 0, downvotes_count: 0 }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will fix your compile error.&#xD;&#xA;&#xD;&#xA;You tried to implement a type aliases, not sure if this is supported. Nevertheless, there is no need to do this here." ContentLicense="CC BY-SA 4.0" />
  <row Id="19756" PostHistoryTypeId="5" PostId="5255" RevisionGUID="895d2dc0-dc88-4cf6-b1fc-33eb6ae78832" CreationDate="2022-10-10T12:30:16.233" UserId="1867" Comment="added 199 characters in body" Text="Correct, you need to read the state variable with `.get`, modify it and then write the updated result back to contract state with `.insert`.&#xD;&#xA;&#xD;&#xA;Check the details [here](https://docs.rs/ink_storage/3.3.1/ink_storage/struct.Mapping.html)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So updating an entry from a `mapping` between a `key` and a struct would roughly look like:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let mut entry = mapping.get(key);&#xD;&#xA;entry.field = value;&#xD;&#xA;mapping.insert(&amp;key, &amp;entry);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19757" PostHistoryTypeId="2" PostId="5270" RevisionGUID="075e9d2f-49b7-4d18-ada6-69576f8b660a" CreationDate="2022-10-10T12:47:03.217" UserId="1876" Text="[Swanky suite][1] does exactly that. You can scaffold, compile, and deploy the contract to the network you specify.&#xD;&#xA;Still under heavy development, but all of the above is usable already.&#xD;&#xA;&#xD;&#xA;(I am on the team that's working on it)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.npmjs.com/package/@astar-network/swanky-cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="19759" PostHistoryTypeId="10" PostId="748" RevisionGUID="271901b5-2223-4393-9cce-9b6dcd4b591d" CreationDate="2022-10-10T13:16:35.280" UserId="28" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="19760" PostHistoryTypeId="2" PostId="5271" RevisionGUID="e889032b-0985-4075-92ee-e203a0c3f89d" CreationDate="2022-10-10T13:34:54.693" UserId="28" Text="This problem should be resolved now that the state cache has been removed in favor for a trie cache:&#xD;&#xA;&#xD;&#xA;See: https://github.com/paritytech/substrate/pull/11407" ContentLicense="CC BY-SA 4.0" />
  <row Id="19762" PostHistoryTypeId="6" PostId="5265" RevisionGUID="380526f3-55d1-464b-a8b5-894b230fecdf" CreationDate="2022-10-10T14:02:46.807" UserId="2673" Comment="Polkadot-js tag" Text="|polkadot-js|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19763" PostHistoryTypeId="24" PostId="5265" RevisionGUID="380526f3-55d1-464b-a8b5-894b230fecdf" CreationDate="2022-10-10T14:02:46.807" Comment="Proposed by 2673 approved by 29 edit id of 308" ContentLicense="CC BY-SA 4.0" />
  <row Id="19764" PostHistoryTypeId="5" PostId="5254" RevisionGUID="839a64c8-0406-421d-b250-f0c08df5a2b7" CreationDate="2022-10-10T14:14:59.700" UserId="3254" Comment="added 708 characters in body" Text="As you can see [here][1], I have changed `HashMap` to `Mapping`. &#xD;&#xA;&#xD;&#xA;Then I got a lot of errors like this, does it mean that there is no `entry` in Mapping?&#xD;&#xA;version is bellow `ink_storage = { version = &quot;3.3&quot;, default-features = false }`&#xD;&#xA;&#xD;&#xA;    error[E0599]: no method named `entry` found for struct `Mapping` in the current scope&#xD;&#xA;&#xD;&#xA;`method not found in Mapping&lt;ink_env::AccountId, u128&gt;`&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;======================&#xD;&#xA;&#xD;&#xA;This is within the Withdraw function in AMM.&#xD;&#xA;In my case, the bellow code is before I change.&#xD;&#xA;&#xD;&#xA;Token1balance = amount of Token1 each user have&#xD;&#xA;&#xD;&#xA;amountToken1,2 = withdrawal amount of Token1,2 from pool&#xD;&#xA;&#xD;&#xA;                &#xD;&#xA;            self.token1Balance &#xD;&#xA;                .entry(caller)&#xD;&#xA;                .and_modify(|val| *val += amountToken1);&#xD;&#xA;            self.token2Balance&#xD;&#xA;                .entry(caller)&#xD;&#xA;                .and_modify(|val| *val += amountToken2);&#xD;&#xA;            Ok((amountToken1, amountToken2))&#xD;&#xA;&#xD;&#xA; Does the above code update the `token1Balance`, which is the amount of tokens held by each user, and add the `amoutToken1` that was `withdrawn` from the pool?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5226/inkconstructor-cause-a-error-what-is-wrong-with-it/5244?noredirect=1#comment5007_5244&#xD;&#xA;  [2]: https://i.stack.imgur.com/N5GLs.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19765" PostHistoryTypeId="5" PostId="5254" RevisionGUID="b7373c61-c20a-489a-b0cb-948725075316" CreationDate="2022-10-10T14:16:36.667" UserId="3254" Comment="added 8 characters in body" Text="As you can see [here][1], I have changed `HashMap` to `Mapping`. &#xD;&#xA;&#xD;&#xA;Then I got a lot of errors like this, does it mean that there is no `entry` in Mapping?&#xD;&#xA;version is bellow `ink_storage = { version = &quot;3.3&quot;, default-features = false }`&#xD;&#xA;&#xD;&#xA;    error[E0599]: no method named `entry` found for struct `Mapping` in the current scope&#xD;&#xA;&#xD;&#xA;`method not found in Mapping&lt;ink_env::AccountId, u128&gt;`&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;======================&#xD;&#xA;&#xD;&#xA;This is within the Withdraw function in AMM.&#xD;&#xA;In my case, the bellow code is before I change.&#xD;&#xA;&#xD;&#xA;Token1balance = Mapping,Amount of Token1 each user have&#xD;&#xA;&#xD;&#xA;amountToken1,2 = withdrawal amount of Token1,2 from pool&#xD;&#xA;&#xD;&#xA;                &#xD;&#xA;            self.token1Balance &#xD;&#xA;                .entry(caller)&#xD;&#xA;                .and_modify(|val| *val += amountToken1);&#xD;&#xA;            self.token2Balance&#xD;&#xA;                .entry(caller)&#xD;&#xA;                .and_modify(|val| *val += amountToken2);&#xD;&#xA;            Ok((amountToken1, amountToken2))&#xD;&#xA;&#xD;&#xA; Does the above code update the `token1Balance`, which is the amount of tokens held by each user, and add the `amoutToken1` that was `withdrawn` from the pool?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5226/inkconstructor-cause-a-error-what-is-wrong-with-it/5244?noredirect=1#comment5007_5244&#xD;&#xA;  [2]: https://i.stack.imgur.com/N5GLs.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19766" PostHistoryTypeId="2" PostId="5272" RevisionGUID="3e082b97-75c4-4e1e-b5ab-3e414a627ae0" CreationDate="2022-10-10T14:19:36.743" UserId="29" Text="You can start here:&#xD;&#xA;- https://polkadot.network&#xD;&#xA;&#xD;&#xA;Then delve into the Polkadot concepts:&#xD;&#xA;- https://wiki.polkadot.network/docs/getting-started&#xD;&#xA;&#xD;&#xA;Polkadot uses Substrate so it is good that you have a solid understanding of it. &#xD;&#xA;&#xD;&#xA;Familiarize yourself with all the Substrate documentation:&#xD;&#xA;- https://docs.substrate.io/fundamentals&#xD;&#xA;&#xD;&#xA;More beginner friendly resources can be found here:&#xD;&#xA;- https://substrate.stackexchange.com/questions/1074/how-do-i-become-a-substrate-developer/1082#1082" ContentLicense="CC BY-SA 4.0" />
  <row Id="19768" PostHistoryTypeId="5" PostId="5261" RevisionGUID="1ec0d098-378b-4480-94ae-2f241bb0e413" CreationDate="2022-10-10T14:20:41.760" UserId="29" Comment="deleted 103 characters in body; edited tags; edited title" Text="I am new to blockchain and I would like to understand what Polkadot is. &#xD;&#xA;&#xD;&#xA;Are there any resources that can be helpful for me to learn?&#xD;&#xA;&#xD;&#xA;Thank you &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19769" PostHistoryTypeId="4" PostId="5261" RevisionGUID="1ec0d098-378b-4480-94ae-2f241bb0e413" CreationDate="2022-10-10T14:20:41.760" UserId="29" Comment="deleted 103 characters in body; edited tags; edited title" Text="What is Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19770" PostHistoryTypeId="6" PostId="5261" RevisionGUID="1ec0d098-378b-4480-94ae-2f241bb0e413" CreationDate="2022-10-10T14:20:41.760" UserId="29" Comment="deleted 103 characters in body; edited tags; edited title" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19771" PostHistoryTypeId="5" PostId="5255" RevisionGUID="f59d869d-b1c0-4369-9167-ad0157f6e24b" CreationDate="2022-10-10T14:52:45.067" UserId="1867" Comment="added 30 characters in body" Text="Correct, you need to read the state variable with `.get`, modify it and then write the updated result back to contract state with `.insert`.&#xD;&#xA;&#xD;&#xA;Check the details [here](https://docs.rs/ink_storage/3.3.1/ink_storage/struct.Mapping.html)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So updating an entry from a `mapping` between a `key` and a struct would roughly look like:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let balance = self.token1Balance.get(&amp;caller).unwrap();&#xD;&#xA;self.token1Balance.insert(&amp;caller, balance + amountToken1);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19772" PostHistoryTypeId="5" PostId="5255" RevisionGUID="b01546ae-08db-4a12-8cf2-c9d7daaa1882" CreationDate="2022-10-10T15:00:34.123" UserId="1867" Comment="added 11 characters in body" Text="Correct, you need to read the state variable with `.get`, modify it and then write the updated result back to contract state with `.insert`.&#xD;&#xA;&#xD;&#xA;Check the details [here](https://docs.rs/ink_storage/3.3.1/ink_storage/struct.Mapping.html)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So updating an entry from a `mapping` between a `key` and a struct would roughly look like:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let old_balance1 = self.token1Balance.get(&amp;caller).unwrap();&#xD;&#xA;self.token1Balance.insert(&amp;caller, &amp;(old_balance1 + amountToken1));&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19773" PostHistoryTypeId="10" PostId="5261" RevisionGUID="39b6d267-a77b-4cf0-8af5-7163a9c47f6c" CreationDate="2022-10-10T15:31:17.017" UserId="-1" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:2025,&quot;DisplayName&quot;:&quot;Iker&quot;},{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:2673,&quot;DisplayName&quot;:&quot;Adam Wierzbicki&quot;},{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Alejandro Martínez&quot;}]}" />
  <row Id="19774" PostHistoryTypeId="34" PostId="5100" RevisionGUID="074f0b3d-ae43-4c2d-8d99-e6c2fdd685c3" CreationDate="2022-10-10T15:49:04.383" UserId="298" Comment="13" />
  <row Id="19775" PostHistoryTypeId="2" PostId="5273" RevisionGUID="d984e7a0-21bc-4f5b-98a9-49b2c4adcf18" CreationDate="2022-10-10T15:54:25.950" UserId="219" Text="Approximately, what is the size of the state trie (in example on Polkadot for a recent block)?&#xD;&#xA;&#xD;&#xA;For example how many nodes are in the trie? Even better would be the total bytes of node partial keys, and total bytes of node subvalues.&#xD;&#xA;&#xD;&#xA;It might be possible to do this by inspecting the disk storage of substrate, but I thought someone could enlighten me with rough/approximate numbers, which could be useful to others.&#xD;&#xA;&#xD;&#xA;Thanks!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="19777" PostHistoryTypeId="1" PostId="5273" RevisionGUID="d984e7a0-21bc-4f5b-98a9-49b2c4adcf18" CreationDate="2022-10-10T15:54:25.950" UserId="219" Text="What's the size of the current state trie?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19778" PostHistoryTypeId="3" PostId="5273" RevisionGUID="d984e7a0-21bc-4f5b-98a9-49b2c4adcf18" CreationDate="2022-10-10T15:54:25.950" UserId="219" Text="|polkadot|storage|trie|state|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19779" PostHistoryTypeId="2" PostId="5274" RevisionGUID="76d225a8-3718-4e27-8640-bac5a64402a5" CreationDate="2022-10-10T16:51:47.303" UserId="3121" Text="I was trying to have a close look at how `chain_spec.rs` was constructed, and wanted to output to the console for debugging purposes, but was having some trouble executing `print` and `log::info`. So, I would like to know if there are any workarounds?&#xD;&#xA;&#xD;&#xA;For example, in order to test the output of [from_string_with_seed](https://paritytech.github.io/substrate/master/sp_core/crypto/trait.Pair.html#method.from_string_with_seed), I tried displaying the type returned, but realized the type didn't have the appropriate implementations of the required traits in order for the `print()` or `info!()` to work without manually adding them." ContentLicense="CC BY-SA 4.0" />
  <row Id="19781" PostHistoryTypeId="1" PostId="5274" RevisionGUID="76d225a8-3718-4e27-8640-bac5a64402a5" CreationDate="2022-10-10T16:51:47.303" UserId="3121" Text="How to debug chain_spec.rs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19782" PostHistoryTypeId="3" PostId="5274" RevisionGUID="76d225a8-3718-4e27-8640-bac5a64402a5" CreationDate="2022-10-10T16:51:47.303" UserId="3121" Text="|chainspec|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19783" PostHistoryTypeId="10" PostId="1535" RevisionGUID="99f35cc2-987c-4300-b36b-47933abd68b9" CreationDate="2022-10-10T17:41:00.487" UserId="28" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="19784" PostHistoryTypeId="10" PostId="1466" RevisionGUID="9bd3b50e-2e4a-46fd-9bcb-cc5cd4541743" CreationDate="2022-10-10T17:44:39.843" UserId="28" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="19785" PostHistoryTypeId="52" PostId="5265" RevisionGUID="94e700fa-5cec-4839-9742-e7554ed6d370" CreationDate="2022-10-10T17:55:35.480" />
  <row Id="19786" PostHistoryTypeId="2" PostId="5275" RevisionGUID="51eeb60f-5dab-4f29-b66d-bac713026bb2" CreationDate="2022-10-10T17:57:09.313" UserId="2019" Text="Our chain spec does not endow any of the test accounts yet we are still seeing them shown (with zero balances) in the Polkadot UI. How do we hide them?&#xD;&#xA;&#xD;&#xA;[![test accounts][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GsIEI.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19788" PostHistoryTypeId="1" PostId="5275" RevisionGUID="51eeb60f-5dab-4f29-b66d-bac713026bb2" CreationDate="2022-10-10T17:57:09.313" UserId="2019" Text="How do you hide test accounts when they are not endowed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19789" PostHistoryTypeId="3" PostId="5275" RevisionGUID="51eeb60f-5dab-4f29-b66d-bac713026bb2" CreationDate="2022-10-10T17:57:09.313" UserId="2019" Text="|testing|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19790" PostHistoryTypeId="2" PostId="5276" RevisionGUID="ba4c814a-2e8e-41ed-be38-b98fc94b0c18" CreationDate="2022-10-10T19:29:49.287" UserId="2548" Text="As the title is descriptive I would like to call a method on a Sample contract deployed to runtime evm, from the off-chain worker.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;```&#xD;&#xA;Contract Sample {&#xD;&#xA;Public five=5;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Call Sample.five() and receive 5 from the offchain worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="19792" PostHistoryTypeId="1" PostId="5276" RevisionGUID="ba4c814a-2e8e-41ed-be38-b98fc94b0c18" CreationDate="2022-10-10T19:29:49.287" UserId="2548" Text="Call a smart contract method from the offchain worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="19793" PostHistoryTypeId="3" PostId="5276" RevisionGUID="ba4c814a-2e8e-41ed-be38-b98fc94b0c18" CreationDate="2022-10-10T19:29:49.287" UserId="2548" Text="|substrate-node|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19794" PostHistoryTypeId="2" PostId="5277" RevisionGUID="c211ffc2-628a-4435-b9e7-5f3e29b465f4" CreationDate="2022-10-10T20:27:21.340" UserId="29" Text="This is happening on the polkadotJs side, the accounts will appear if the `ChainType` is either Local or Development:&#xD;&#xA;&#xD;&#xA;- https://github.com/polkadot-js/apps/blob/e1497ec2baf9a4009ce658e968406d312a604c83/packages/react-api/src/Api.tsx#L188&#xD;&#xA;&#xD;&#xA;So try to create a staging or live chain spec." ContentLicense="CC BY-SA 4.0" />
  <row Id="19797" PostHistoryTypeId="10" PostId="1388" RevisionGUID="775142bb-9383-41ea-829b-b22ca80fa29e" CreationDate="2022-10-10T22:24:22.153" UserId="28" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="19798" PostHistoryTypeId="2" PostId="5278" RevisionGUID="2ed460de-a089-4c8a-a693-0c1f023c590b" CreationDate="2022-10-10T23:53:26.600" UserId="3312" Text="I can't quite figure out what I am doing wrong so any help is appreciated. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;git clone --depth 1 --branch polkadot-v0.9.28 https://github.com/paritytech/cumulus.git&#xD;&#xA;cd cumulus&#xD;&#xA;cargo build --release --locked -p polkadot-parachain&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;gives me this error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: There are multiple `polkadot-parachain` packages in your project, and the specification `polkadot-parachain` is ambiguous.&#xD;&#xA;Please re-run this command with `-p &lt;spec&gt;` where `&lt;spec&gt;` is one of the following:&#xD;&#xA;  polkadot-parachain@0.9.28&#xD;&#xA;  polkadot-parachain@0.9.230&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So I run with the former command&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo build --release --locked -p polkadot-parachain@0.9.28&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Compilation appears to be successful&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;Compiling frame-support v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#b4db7298)&#xD;&#xA;   Compiling polkadot-parachain v0.9.28 (https://github.com/paritytech/polkadot?branch=release-v0.9.28#314298c3)&#xD;&#xA;    Finished release [optimized] target(s) in 4m 13s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, there is no polkadot-parachain binary in my release folder and the node can't run.All I have in my release folder are libpolkadot_parachain.d and libpolkadot_parachain.rlib libraries." ContentLicense="CC BY-SA 4.0" />
  <row Id="19800" PostHistoryTypeId="1" PostId="5278" RevisionGUID="2ed460de-a089-4c8a-a693-0c1f023c590b" CreationDate="2022-10-10T23:53:26.600" UserId="3312" Text="Issue building polkadot-parachain binary" ContentLicense="CC BY-SA 4.0" />
  <row Id="19801" PostHistoryTypeId="3" PostId="5278" RevisionGUID="2ed460de-a089-4c8a-a693-0c1f023c590b" CreationDate="2022-10-10T23:53:26.600" UserId="3312" Text="|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19804" PostHistoryTypeId="2" PostId="5279" RevisionGUID="32cec609-8282-45da-9d15-ffc68b1137b9" CreationDate="2022-10-11T00:37:14.523" UserId="28" Text="This has been resolved with a PR from @shabanovd&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/11314&#xD;&#xA;&#xD;&#xA;Should not be an issue anymore." ContentLicense="CC BY-SA 4.0" />
  <row Id="19806" PostHistoryTypeId="2" PostId="5280" RevisionGUID="69bf0e32-d7d7-4cbf-92be-5f417f8f6152" CreationDate="2022-10-11T00:40:12.830" UserId="28" Text="Any data you want to retrieve from the runtime and runtime logic must be stored.&#xD;&#xA;&#xD;&#xA;So if you want to be able to get a transaction by the hash within the on-chain environment, you will need to store a map of all the transaction hash values to the corresponding data.&#xD;&#xA;&#xD;&#xA;However, this will make your state really large, and is probably not the recommended thing to do." ContentLicense="CC BY-SA 4.0" />
  <row Id="19810" PostHistoryTypeId="2" PostId="5281" RevisionGUID="7629f405-6404-4623-9364-b9cfefdaa2f7" CreationDate="2022-10-11T00:44:28.377" UserId="28" Text="There is no faucet that gives away a large amount of Westend tokens.&#xD;&#xA;&#xD;&#xA;If you need Westend tokens beyond what the faucet provides, you should reach out to the development team with clarification of how much you need and why.&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/community" ContentLicense="CC BY-SA 4.0" />
  <row Id="19812" PostHistoryTypeId="2" PostId="5282" RevisionGUID="d308f048-0eee-492f-b231-277338c47d5d" CreationDate="2022-10-11T00:53:40.767" UserId="28" Text="I am not sure what specific pallet you are calling, but likely the error here is due to the way the extrinsic is designed.&#xD;&#xA;&#xD;&#xA;The extrinsic in question probably has:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Check the origin is from an account.&#xD;&#xA;let caller = ensure_signed(origin)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These kinds of dispatchable functions can only accept extrinsics which come from a signed origin, which is why you observe: &quot;It does work if I submit an extrinsic instead&quot;.&#xD;&#xA;&#xD;&#xA;When you perform an action with Sudo, the resulting origin is `Root`, which will not pass this check.&#xD;&#xA;&#xD;&#xA;The solution here would be to call with a regular user account, which is expected to work, or, if you need to use Sudo because you do not have access to the account, you can use another utility to turn a `Root` call into a call from any user account:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn dispatch_as(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	as_origin: Box&lt;T::PalletsOrigin&gt;,&#xD;&#xA;	call: Box&lt;&lt;T as Config&gt;::RuntimeCall&gt;,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;	ensure_root(origin)?;&#xD;&#xA;&#xD;&#xA;	let res = call.dispatch_bypass_filter((*as_origin).into());&#xD;&#xA;&#xD;&#xA;	Self::deposit_event(Event::DispatchedAs {&#xD;&#xA;		result: res.map(|_| ()).map_err(|e| e.error),&#xD;&#xA;	});&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is from the Utility Pallet.&#xD;&#xA;&#xD;&#xA;So you want to do: Sudo -&gt; Dispatch As -&gt; Set Owner (with the right user account origin)" ContentLicense="CC BY-SA 4.0" />
  <row Id="19816" PostHistoryTypeId="2" PostId="5283" RevisionGUID="f8b3fe13-a319-47f7-9a50-e2ac5b295d33" CreationDate="2022-10-11T00:54:53.807" UserId="29" Text="Thank you for this information. I was able to replicate it as well.&#xD;&#xA;&#xD;&#xA;I have filed an issue here:&#xD;&#xA;- https://github.com/paritytech/cumulus/issues/1753&#xD;&#xA;&#xD;&#xA;I recommend you compile using the following command which is noted here:&#xD;&#xA;- https://github.com/paritytech/cumulus#local-setup&#xD;&#xA;```&#xD;&#xA;cargo build --release&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19822" PostHistoryTypeId="10" PostId="5023" RevisionGUID="087e596d-0e9a-437a-b0a4-f80a61b973b0" CreationDate="2022-10-11T01:09:53.550" UserId="28" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[529],&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="19824" PostHistoryTypeId="2" PostId="5284" RevisionGUID="f1a49f11-651d-43f9-aad7-610e0e049ba8" CreationDate="2022-10-11T01:15:05.250" UserId="28" Text="The issue here is probably you added your dependency in the `[dev-dependencies]` section rather than directly in the `[dependencies]` section of the Cargo.toml file.&#xD;&#xA;&#xD;&#xA;This will cause the crate to only be included when running tests. If this is not correct, then please share the full Cargo.toml file you edited.&#xD;&#xA;&#xD;&#xA;https://doc.rust-lang.org/rust-by-example/testing/dev_dependencies.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19826" PostHistoryTypeId="5" PostId="4961" RevisionGUID="e52964b4-cc5f-41b6-b388-7ea176db3cb7" CreationDate="2022-10-11T02:01:01.220" UserId="251" Comment="added 4 characters in body" Text="I am trying to following the tutorials at substrate.dev and I am getting stuck on [this one](https://docs.substrate.io/tutorials/get-started/upgrade-a-running-network/).  Specifically, when I add this code to my runtime/src/lib.rs file: &#xD;&#xA;```rs&#xD;&#xA;impl pallet_scheduler::Config for Runtime {&#xD;&#xA;  type Event = Event;&#xD;&#xA;  type Origin = Origin;&#xD;&#xA;  type PalletsOrigin = OriginCaller;&#xD;&#xA;  type Call = Call;&#xD;&#xA;  type MaximumWeight = MaximumSchedulerWeight;&#xD;&#xA;  type ScheduleOrigin = frame_system::EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;  type MaxScheduledPerBlock = MaxScheduledPerBlock;&#xD;&#xA;  type WeightInfo = ();&#xD;&#xA;  type OriginPrivilegeCmp = EqualPrivilegeOnly;&#xD;&#xA;  type PreimageProvider = ();&#xD;&#xA;  type NoPreimagePostponement = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I get this error when I try to build:&#xD;&#xA;```rs&#xD;&#xA;--- stderr&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/home/bosr/rust/substrate-node-template/runtime)&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `pallet_scheduler`&#xD;&#xA;     --&gt; /home/bosr/rust/substrate-node-template/runtime/src/lib.rs:151:6&#xD;&#xA;      |&#xD;&#xA;  151 | impl pallet_scheduler::Config for Runtime {&#xD;&#xA;      |      ^^^^^^^^^^^^^^^^ use of undeclared crate or module `pallet_scheduler`&#xD;&#xA;```&#xD;&#xA;I do have this line in the [dependencies] section:&#xD;&#xA;```&#xD;&#xA;pallet-scheduler = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;```&#xD;&#xA;and the version and branch match the rest of the dependencies.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19827" PostHistoryTypeId="2" PostId="5285" RevisionGUID="2037b2dc-bc2f-498b-9aae-9e6cef6fa5b1" CreationDate="2022-10-11T05:40:53.203" UserId="426" Text="I apologize for the vague intro in advance :)&#xD;&#xA;&#xD;&#xA;Some time ago, I was told by someone or read somewhere that Rococo testnet will reset every so often. By this I mean a complete DB wipe, starting from block **1**.&#xD;&#xA;&#xD;&#xA;I tried to find more info about this but haven't managed so far - I'm interested in particular how often does it reset? Is there a schedule?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19829" PostHistoryTypeId="1" PostId="5285" RevisionGUID="2037b2dc-bc2f-498b-9aae-9e6cef6fa5b1" CreationDate="2022-10-11T05:40:53.203" UserId="426" Text="Rococo reset schedule" ContentLicense="CC BY-SA 4.0" />
  <row Id="19830" PostHistoryTypeId="3" PostId="5285" RevisionGUID="2037b2dc-bc2f-498b-9aae-9e6cef6fa5b1" CreationDate="2022-10-11T05:40:53.203" UserId="426" Text="|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19831" PostHistoryTypeId="2" PostId="5286" RevisionGUID="0f64663e-b41f-434e-b498-556debb5f670" CreationDate="2022-10-11T05:59:25.843" UserId="251" Text="There is no plan for that.&#xD;&#xA;&#xD;&#xA;It depends on if there is an unrecoverable error happened.&#xD;&#xA;&#xD;&#xA;Rococo is a place to test the latest parachain features. So we don't know when the new-features/operations will cause an unrecoverable error.&#xD;&#xA;&#xD;&#xA;And you could find some other informations here:&#xD;&#xA;https://github.com/paritytech/subport" ContentLicense="CC BY-SA 4.0" />
  <row Id="19833" PostHistoryTypeId="5" PostId="5286" RevisionGUID="230c1f72-74fc-43ac-a674-25c0c7a339e8" CreationDate="2022-10-11T06:28:11.243" UserId="251" Comment="added 16 characters in body" Text="There is no plan for that.&#xD;&#xA;&#xD;&#xA;It depends on if there is an unrecoverable error happened.&#xD;&#xA;&#xD;&#xA;Rococo is a place to test the latest parachain features. So we don't know when the new-features/operations will cause an unrecoverable error.&#xD;&#xA;&#xD;&#xA;And you could find some other information about Rococo here:&#xD;&#xA;https://github.com/paritytech/subport" ContentLicense="CC BY-SA 4.0" />
  <row Id="19834" PostHistoryTypeId="2" PostId="5287" RevisionGUID="5b6b154c-6e5f-4bc9-b5a9-e356122e4551" CreationDate="2022-10-11T06:44:16.293" UserId="2736" Text="I have problems with trying to benchmark my custom pallet. I tried different scenarios and received different errors:&#xD;&#xA;&#xD;&#xA;*Using the same binary:*&#xD;&#xA;1. I built my node with `cargo build --release --features runtime-benchmarks`&#xD;&#xA;2. I generated a chainspec with the binary (`/tmp/chainspec.json`)&#xD;&#xA;3. When running `./bench --execution wasm benchmark pallet --chain /tmp/chainspec.json --list` (or the actual benchmarking command) I get:&#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;Did not find the benchmarking metadata. This could mean that you either did not build&#xD;&#xA;the node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was&#xD;&#xA;not created by a node that was compiled with the flag: runtime requires function imports which are&#xD;&#xA;not present on the host:&#xD;&#xA;'env:ext_benchmarking_proof_size_version_1', 'env:ext_benchmarking_wipe_db_version_1', &#xD;&#xA;'env:ext_benchmarking_current_time_version_1', &#xD;&#xA;'env:ext_benchmarking_get_read_and_written_keys_version_1', &#xD;&#xA;'env:ext_benchmarking_reset_read_write_count_version_1', &#xD;&#xA;'env:ext_benchmarking_read_write_count_version_1', &#xD;&#xA;'env:ext_benchmarking_set_whitelist_version_1', &#xD;&#xA;'env:ext_benchmarking_commit_db_version_1'&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;*Using different binaries*:&#xD;&#xA;1. I built my node with `cargo build --release` (no `--features runtime-benchmarks`)&#xD;&#xA;2. I generated a chainspec with the binary (`/tmp/chainspec.json`)&#xD;&#xA;3. I built my node (overwriting the old binary) with `cargo build --release --features runtime-benchmarks`&#xD;&#xA;4. I run `./bench --execution wasm benchmark pallet --chain /tmp/chainspec.json --list` and got expected result: &#xD;&#xA;```&#xD;&#xA;pallet, benchmark&#xD;&#xA;pallet_custom, custom_method&#xD;&#xA;```&#xD;&#xA;5. I ran `./bench benchmark pallet --chain /tmp/chainspec.json --execution=wasm --wasm-execution=compiled --pallet pallet_custom --extrinsic &quot;*&quot; --steps 50 --repeat 20` and got error:&#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;Did not find the benchmarking metadata. This could mean that you either did not build the &#xD;&#xA;node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was not&#xD;&#xA;created by a node that was compiled with the flag: Other: Exported method Benchmark_benchmark_metadata is &#xD;&#xA;not found&quot;)&#xD;&#xA;```&#xD;&#xA;which makes perfect sense, since the wasm blob in the chainspec has been built without the feature.&#xD;&#xA;6. I ran `./bench benchmark pallet --chain /tmp/chainspec.json --pallet pallet_custom --extrinsic &quot;*&quot; --steps 50 --repeat 20` and this succeeds, however it's the wasm execution that should be used for benchmarking.&#xD;&#xA;&#xD;&#xA;I suspect that this may be connected with misimplementing `frame_benchmarking::Benchmark`:&#xD;&#xA;```&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;#[macro_use]&#xD;&#xA;extern crate frame_benchmarking;&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benches {&#xD;&#xA;    define_benchmarks!([pallet_custom, Custom]);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl_runtime_apis! {&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    impl frame_benchmarking::Benchmark&lt;Block&gt; for Runtime {&#xD;&#xA;        fn benchmark_metadata(extra: bool) -&gt; (&#xD;&#xA;            Vec&lt;frame_benchmarking::BenchmarkList&gt;,&#xD;&#xA;            Vec&lt;frame_support::traits::StorageInfo&gt;,&#xD;&#xA;        ) {&#xD;&#xA;            use frame_benchmarking::{Benchmarking, BenchmarkList};&#xD;&#xA;            use frame_support::traits::StorageInfoTrait;&#xD;&#xA;&#xD;&#xA;            let mut list = Vec::&lt;BenchmarkList&gt;::new();&#xD;&#xA;            list_benchmarks!(list, extra);&#xD;&#xA;&#xD;&#xA;            let storage_info = AllPalletsWithSystem::storage_info();&#xD;&#xA;&#xD;&#xA;            (list, storage_info)&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn dispatch_benchmark(&#xD;&#xA;            config: frame_benchmarking::BenchmarkConfig&#xD;&#xA;        ) -&gt; Result&lt;Vec&lt;frame_benchmarking::BenchmarkBatch&gt;, sp_runtime::RuntimeString&gt; {&#xD;&#xA;            use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey};&#xD;&#xA;&#xD;&#xA;            // I'm using Substrate in version polkadot-v0.9.26 so the new API is not available yet:&#xD;&#xA;            // let whitelist: Vec&lt;TrackedStorageKey&gt; = AllPalletsWithSystem::whitelisted_storage_keys();&#xD;&#xA;            let whitelist: Vec&lt;TrackedStorageKey&gt; = vec![&#xD;&#xA;                // Block Number&#xD;&#xA;                // Total Issuance&#xD;&#xA;                // Execution Phase&#xD;&#xA;                // Event Count&#xD;&#xA;                // System Events&#xD;&#xA;            ];&#xD;&#xA;&#xD;&#xA;            let params = (&amp;config, &amp;whitelist);&#xD;&#xA;            let mut batches = Vec::&lt;BenchmarkBatch&gt;::new();&#xD;&#xA;            add_benchmarks!(params, batches);&#xD;&#xA;&#xD;&#xA;            Ok(batches)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19836" PostHistoryTypeId="1" PostId="5287" RevisionGUID="5b6b154c-6e5f-4bc9-b5a9-e356122e4551" CreationDate="2022-10-11T06:44:16.293" UserId="2736" Text="Cannot run benchmarking: &quot;Did not find the benchmarking metadata.&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19837" PostHistoryTypeId="3" PostId="5287" RevisionGUID="5b6b154c-6e5f-4bc9-b5a9-e356122e4551" CreationDate="2022-10-11T06:44:16.293" UserId="2736" Text="|runtime|benchmarking|wasm|benchmark|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19843" PostHistoryTypeId="5" PostId="5287" RevisionGUID="66816232-632f-4d8f-91b0-d5b447f16a42" CreationDate="2022-10-11T08:02:36.373" UserId="2736" Comment="added 80 characters in body" Text="I have problems with trying to benchmark my custom pallet. I tried different scenarios and received different errors:&#xD;&#xA;&#xD;&#xA;*Using the same binary:*&#xD;&#xA;1. I built my node with `cargo build --release --features runtime-benchmarks`&#xD;&#xA;2. I generated a chainspec with the binary (`/tmp/chainspec.json`)&#xD;&#xA;3. When running `./target/release/aleph_node --execution wasm benchmark pallet --chain /tmp/chainspec.json --list` (or the actual benchmarking command) I get:&#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;Did not find the benchmarking metadata. This could mean that you either did not build&#xD;&#xA;the node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was&#xD;&#xA;not created by a node that was compiled with the flag: runtime requires function imports which are&#xD;&#xA;not present on the host:&#xD;&#xA;'env:ext_benchmarking_proof_size_version_1', 'env:ext_benchmarking_wipe_db_version_1', &#xD;&#xA;'env:ext_benchmarking_current_time_version_1', &#xD;&#xA;'env:ext_benchmarking_get_read_and_written_keys_version_1', &#xD;&#xA;'env:ext_benchmarking_reset_read_write_count_version_1', &#xD;&#xA;'env:ext_benchmarking_read_write_count_version_1', &#xD;&#xA;'env:ext_benchmarking_set_whitelist_version_1', &#xD;&#xA;'env:ext_benchmarking_commit_db_version_1'&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;*Using different binaries*:&#xD;&#xA;1. I built my node with `cargo build --release` (no `--features runtime-benchmarks`)&#xD;&#xA;2. I generated a chainspec with the binary (`/tmp/chainspec.json`)&#xD;&#xA;3. I built my node (overwriting the old binary) with `cargo build --release --features runtime-benchmarks`&#xD;&#xA;4. I run `./target/release/aleph_node --execution wasm benchmark pallet --chain /tmp/chainspec.json --list` and got expected result: &#xD;&#xA;```&#xD;&#xA;pallet, benchmark&#xD;&#xA;pallet_custom, custom_method&#xD;&#xA;```&#xD;&#xA;5. I ran `./target/release/aleph_node benchmark pallet --chain /tmp/chainspec.json --execution=wasm --wasm-execution=compiled --pallet pallet_custom --extrinsic &quot;*&quot; --steps 50 --repeat 20` and got error:&#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;Did not find the benchmarking metadata. This could mean that you either did not build the &#xD;&#xA;node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was not&#xD;&#xA;created by a node that was compiled with the flag: Other: Exported method Benchmark_benchmark_metadata is &#xD;&#xA;not found&quot;)&#xD;&#xA;```&#xD;&#xA;which makes perfect sense, since the wasm blob in the chainspec has been built without the feature.&#xD;&#xA;6. I ran `./target/release/aleph_node benchmark pallet --chain /tmp/chainspec.json --pallet pallet_custom --extrinsic &quot;*&quot; --steps 50 --repeat 20` and this succeeds, however it's the wasm execution that should be used for benchmarking.&#xD;&#xA;&#xD;&#xA;I suspect that this may be connected with misimplementing `frame_benchmarking::Benchmark`:&#xD;&#xA;```&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;#[macro_use]&#xD;&#xA;extern crate frame_benchmarking;&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benches {&#xD;&#xA;    define_benchmarks!([pallet_custom, Custom]);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl_runtime_apis! {&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    impl frame_benchmarking::Benchmark&lt;Block&gt; for Runtime {&#xD;&#xA;        fn benchmark_metadata(extra: bool) -&gt; (&#xD;&#xA;            Vec&lt;frame_benchmarking::BenchmarkList&gt;,&#xD;&#xA;            Vec&lt;frame_support::traits::StorageInfo&gt;,&#xD;&#xA;        ) {&#xD;&#xA;            use frame_benchmarking::{Benchmarking, BenchmarkList};&#xD;&#xA;            use frame_support::traits::StorageInfoTrait;&#xD;&#xA;&#xD;&#xA;            let mut list = Vec::&lt;BenchmarkList&gt;::new();&#xD;&#xA;            list_benchmarks!(list, extra);&#xD;&#xA;&#xD;&#xA;            let storage_info = AllPalletsWithSystem::storage_info();&#xD;&#xA;&#xD;&#xA;            (list, storage_info)&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn dispatch_benchmark(&#xD;&#xA;            config: frame_benchmarking::BenchmarkConfig&#xD;&#xA;        ) -&gt; Result&lt;Vec&lt;frame_benchmarking::BenchmarkBatch&gt;, sp_runtime::RuntimeString&gt; {&#xD;&#xA;            use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey};&#xD;&#xA;&#xD;&#xA;            // I'm using Substrate in version polkadot-v0.9.26 so the new API is not available yet:&#xD;&#xA;            // let whitelist: Vec&lt;TrackedStorageKey&gt; = AllPalletsWithSystem::whitelisted_storage_keys();&#xD;&#xA;            let whitelist: Vec&lt;TrackedStorageKey&gt; = vec![&#xD;&#xA;                // Block Number&#xD;&#xA;                // Total Issuance&#xD;&#xA;                // Execution Phase&#xD;&#xA;                // Event Count&#xD;&#xA;                // System Events&#xD;&#xA;            ];&#xD;&#xA;&#xD;&#xA;            let params = (&amp;config, &amp;whitelist);&#xD;&#xA;            let mut batches = Vec::&lt;BenchmarkBatch&gt;::new();&#xD;&#xA;            add_benchmarks!(params, batches);&#xD;&#xA;&#xD;&#xA;            Ok(batches)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19844" PostHistoryTypeId="2" PostId="5289" RevisionGUID="b437f56d-7a8d-404d-abf0-591f105e5686" CreationDate="2022-10-11T08:32:25.320" UserId="2909" Text="You can check out this presentation which has Centrifuge's solochain to parachain migration as a case study&#xD;&#xA;(Sub0 Online: Storage Migration - Standalone chain to Parachain&#xD;&#xA;):&#xD;&#xA;https://www.youtube.com/watch?v=sIgvyRFs-N4" ContentLicense="CC BY-SA 4.0" />
  <row Id="19846" PostHistoryTypeId="2" PostId="5290" RevisionGUID="9aacf644-0871-4ea7-95bf-dbcc1eae638e" CreationDate="2022-10-11T09:26:06.613" UserId="1810" Text="A simple sr25519 signature remains secure even with actively malicious system randomness, and you can pass in your own `RngCore` to have deterministic test vectors, but..&#xD;&#xA;&#xD;&#xA;In future, schnorrkel shall support protocols like (threshold) multi-signatures which cannot be derandomized by any mechanism.  I decided to rip the band-aid off and make all sr25519 signatures non-deterministic to prevent anyone depending upon determinism elsewhere.&#xD;&#xA;&#xD;&#xA;In the code, we inherit non-determinism from merlin, which made this choice for exactly the same reasons.&#xD;&#xA;&#xD;&#xA;In blockchains, we distinguish between on-chain (runtime) and off-chain (host) code, but only off-chain code supports secrets and system randomness.  It's good we break a signer used in the runtime.  There is no reasons off-chain workers cannot have system randomness and secrets, but not sure the current status." ContentLicense="CC BY-SA 4.0" />
  <row Id="19852" PostHistoryTypeId="2" PostId="5292" RevisionGUID="ac25dc06-c077-4ac2-9613-0038096eeb1a" CreationDate="2022-10-11T09:33:36.230" UserId="3319" Text="In the second [tutorial][1] where we simulate a network with two nodes, we add Bob however we use `--bootnodes` option and we didn't specify the keys for bob.&#xD;&#xA;&#xD;&#xA;what does that option do specifically, i assume it is used only for learning purposes (since it is copying the alice private key)?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/get-started/simulate-network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="19854" PostHistoryTypeId="1" PostId="5292" RevisionGUID="ac25dc06-c077-4ac2-9613-0038096eeb1a" CreationDate="2022-10-11T09:33:36.230" UserId="3319" Text="in the second tutorial i didn't had to specify a key for bob, how did it work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19855" PostHistoryTypeId="3" PostId="5292" RevisionGUID="ac25dc06-c077-4ac2-9613-0038096eeb1a" CreationDate="2022-10-11T09:33:36.230" UserId="3319" Text="|substrate-node-template|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19857" PostHistoryTypeId="2" PostId="5293" RevisionGUID="db7ecd80-cff3-4541-8f05-d39ba02cee03" CreationDate="2022-10-11T09:50:45.263" UserId="3320" Text="recently I developed an extrinsic to proxy the votes accumulated from our on-chain service to referendums with the function VoteSplit in pallet democracy. But I'm wondering if substrate features capabilities to proxy votes to the council? And if it has, we may eager to learn the mechanic.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19859" PostHistoryTypeId="1" PostId="5293" RevisionGUID="db7ecd80-cff3-4541-8f05-d39ba02cee03" CreationDate="2022-10-11T09:50:45.263" UserId="3320" Text="if substrate features capabilities to proxy votes to the council?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19860" PostHistoryTypeId="3" PostId="5293" RevisionGUID="db7ecd80-cff3-4541-8f05-d39ba02cee03" CreationDate="2022-10-11T09:50:45.263" UserId="3320" Text="|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19861" PostHistoryTypeId="2" PostId="5294" RevisionGUID="80f01089-5e28-4682-9fb3-dd6355ea00d6" CreationDate="2022-10-11T10:47:52.623" UserId="73" Text="You specified the keys for `Bob` by passing the `--bob` cli flag. If you check the cli docs, you see the following above `--bob`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The private key for `Bob` is build by the following secret uri:&#xD;&#xA;```&#xD;&#xA;{DEV_PHRASE}//Bob&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where `DEV_PHRASE` is some known constant phrase, present in the Substrate code:&#xD;&#xA;```&#xD;&#xA;bottom drive obey lake curtain smoke basket hold race lonely fit walk&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19863" PostHistoryTypeId="2" PostId="5295" RevisionGUID="63dbdb74-7b6b-4a2f-8e18-7eba726a707a" CreationDate="2022-10-11T11:39:35.677" UserId="2762" Text="The [Proxy Pallet][1] allows users to set proxy accounts to perform a number of actions on their behalf.&#xD;&#xA;&#xD;&#xA;There is a different types of proxies Polkadot offers: Any, Non-transfer, Stakings.... and Governance.&#xD;&#xA;For more information about proxy account check:&#xD;&#xA;&#xD;&#xA; - The [Polkadot wiki][2] &#xD;&#xA;- This [video][3] that shows how to setup proxy accounts.&#xD;&#xA;&#xD;&#xA;This Governance type will allow proxies to make transactions related to governance (i.e., from the Democracy, Council, Treasury, Technical Committee, and Elections pallets).&#xD;&#xA;&#xD;&#xA;Check this video about Governance Proxies on Polkadot: https://www.youtube.com/watch?v=q5qLFhG4SDw&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/pallet-proxy/latest/pallet_proxy/&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-proxies&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=1tcygkq52tU" ContentLicense="CC BY-SA 4.0" />
  <row Id="19865" PostHistoryTypeId="50" PostId="2371" RevisionGUID="50373d11-c571-4cd3-b1a2-77cf090df47f" CreationDate="2022-10-11T12:04:15.517" UserId="-1" />
  <row Id="19871" PostHistoryTypeId="5" PostId="5274" RevisionGUID="04c1bc91-9495-4d22-b59d-c6262be2484e" CreationDate="2022-10-11T13:58:56.637" UserId="3121" Comment="added 581 characters in body" Text="I was trying to have a close look at how `chain_spec.rs` was constructed, and wanted to output to the console for debugging purposes, but was having some trouble executing `print` and `log::info`. So, I would like to know if there are any workarounds?&#xD;&#xA;&#xD;&#xA;For example, in order to test the output of [from_string_with_seed](https://paritytech.github.io/substrate/master/sp_core/crypto/trait.Pair.html#method.from_string_with_seed), I tried displaying the type returned, but realized the type didn't have the appropriate implementations of the required traits in order for the `print()` or `info!()` to work without manually adding them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;***Adding info***&#xD;&#xA;&#xD;&#xA;What I originally wanted to understand was how the default seed string `//Alice` generated the root key. The reason for my question was because my understanding is that seeds or mnemonic are generated from private keys, not vice versa. I do understand seeds can be used to recover keys, but that didn't seem like what `from_string_with_seed` was doing for a few reasons.&#xD;&#xA;&#xD;&#xA;Therefore, I decided to play around with the parameter for the function to see what it would return in different scenarios, but ran into a wall actually printing it to the console." ContentLicense="CC BY-SA 4.0" />
  <row Id="19875" PostHistoryTypeId="5" PostId="5238" RevisionGUID="0b2564a3-9fa0-47b4-8052-a0b8d91a9ca5" CreationDate="2022-10-11T14:10:52.697" UserId="32" Comment="Improved context" Text="Which faucet can provide a large number of Westend tokens (WND)? I want to stake on Westend, but I cannot do it right away as I can only get 1 WND every day at https://app.element.io/#/room/#westend_faucet:matrix.org," ContentLicense="CC BY-SA 4.0" />
  <row Id="19876" PostHistoryTypeId="4" PostId="5238" RevisionGUID="0b2564a3-9fa0-47b4-8052-a0b8d91a9ca5" CreationDate="2022-10-11T14:10:52.697" UserId="32" Comment="Improved context" Text="How to get a large number of Westend (Polkadot Testnet) tokens" ContentLicense="CC BY-SA 4.0" />
  <row Id="19877" PostHistoryTypeId="24" PostId="5238" RevisionGUID="0b2564a3-9fa0-47b4-8052-a0b8d91a9ca5" CreationDate="2022-10-11T14:10:52.697" Comment="Proposed by 32 approved by 34 edit id of 309" ContentLicense="CC BY-SA 4.0" />
  <row Id="19884" PostHistoryTypeId="2" PostId="5298" RevisionGUID="ddc463cf-a52f-4ddf-a691-8016428f4b4a" CreationDate="2022-10-11T17:26:01.707" UserId="2548" Text="Is any option to get data to off-chain workers from runtime? &#xD;&#xA;For example, I have used runtime to store something.&#xD;&#xA;How can I access this data from off-chain woker without using HTTP calls? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19886" PostHistoryTypeId="1" PostId="5298" RevisionGUID="ddc463cf-a52f-4ddf-a691-8016428f4b4a" CreationDate="2022-10-11T17:26:01.707" UserId="2548" Text="How to get data to off-chain worker from runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19887" PostHistoryTypeId="3" PostId="5298" RevisionGUID="ddc463cf-a52f-4ddf-a691-8016428f4b4a" CreationDate="2022-10-11T17:26:01.707" UserId="2548" Text="|substrate-node|rust|runtime|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19888" PostHistoryTypeId="52" PostId="5292" RevisionGUID="a8447da5-f31b-4fb7-bc5d-8e2d2aea05f3" CreationDate="2022-10-11T17:41:06.783" />
  <row Id="19889" PostHistoryTypeId="2" PostId="5299" RevisionGUID="2925dca1-0263-4a5f-a73f-c6cfef86b308" CreationDate="2022-10-11T20:56:44.107" UserId="283" Text="You can't. There is no cryptographic protocol for telling what software someone used to create a signature for a transaction. Instead, the on-chain logic should be designed such that it doesn't matter _how_ the transaction was submitted but only _that_ it was submitted." ContentLicense="CC BY-SA 4.0" />
  <row Id="19892" PostHistoryTypeId="2" PostId="5300" RevisionGUID="02fe91a5-d7aa-43c3-91f0-d9fb1bbea7c7" CreationDate="2022-10-12T00:45:36.747" UserId="2844" Text="I [follow this reference tutorial][1] to subkey-generate. While compiling subkey program using `cargo +nightly build --package subkey --release`, I faced this issue.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Someone explain what's wrong with this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/command-line-tools/subkey/#subkey-generate&#xD;&#xA;  [2]: https://i.stack.imgur.com/EiNI6.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="19894" PostHistoryTypeId="1" PostId="5300" RevisionGUID="02fe91a5-d7aa-43c3-91f0-d9fb1bbea7c7" CreationDate="2022-10-12T00:45:36.747" UserId="2844" Text="Error while Compile the subkey program using the nightly toolchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="19895" PostHistoryTypeId="3" PostId="5300" RevisionGUID="02fe91a5-d7aa-43c3-91f0-d9fb1bbea7c7" CreationDate="2022-10-12T00:45:36.747" UserId="2844" Text="|substrate-node|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19896" PostHistoryTypeId="2" PostId="5301" RevisionGUID="6fe3e4bc-d9b2-4eb1-8105-5aa634812ee6" CreationDate="2022-10-12T02:19:40.293" UserId="251" Text="I think it's the same as https://substrate.stackexchange.com/questions/4891/substrate-build-failure-with-runtime-benchmarks-flag.&#xD;&#xA;&#xD;&#xA;Try install `protobuf` with your system package manager." ContentLicense="CC BY-SA 4.0" />
  <row Id="19905" PostHistoryTypeId="2" PostId="5303" RevisionGUID="fd59bb0c-688c-4acb-98b7-e7ff57364fd5" CreationDate="2022-10-12T07:16:07.403" UserId="225" Text="Not replying (I had the number last year while testing trie migration, but would not want to give a wrong one), but modifying https://github.com/paritytech/substrate/blob/master/utils/frame/rpc/state-trie-migration-rpc/src/lib.rs#L48 may be suited to count it (the whole trie state is iterated at node level but only count value items).&#xD;&#xA;related: https://github.com/paritytech/cumulus/pull/1424&#xD;&#xA;&#xD;&#xA;I remember we also did export the whole state at a given block with `try_runtime` (querying rpc) but it can take a while.&#xD;&#xA;&#xD;&#xA;Last idea to get a very rough number is to do a warpsync so only the state at the head of the chain will be in db (then looking at the size of the STATE column), note that the total size downloaded displayed while doing warpsync can be a little bigger than the size of the state because it dowloads chunks of proof size (so there is a small redundancy in node content between chunks).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19907" PostHistoryTypeId="2" PostId="5304" RevisionGUID="342db497-c0c8-4ba1-b607-81463cbd8d67" CreationDate="2022-10-12T07:35:14.873" UserId="73" Text="There is a [pr open for `sub-du`][1]. This will be able to output the size of the state. In the [issue][2] for this feature you see an example output of 2020:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;60  M ├─┬ polkadot&#xD;&#xA;55  M │ │─┬ Staking&#xD;&#xA;28  M │ │ │─ ErasStakers =&gt; Map(29,915,344 bytes, 17691 keys)&#xD;&#xA;20  M │ │ │─ ErasStakersClipped =&gt; Map(21,571,602 bytes, 17691 keys)&#xD;&#xA;3   M │ │ │─ Ledger =&gt; Map(3,830,167 bytes, 10881 keys)&#xD;&#xA;2   M │ │ │─ Nominators =&gt; Map(2,235,784 bytes, 8476 keys)&#xD;&#xA;622 K │ │ │─ ErasRewardPoints =&gt; Map(637,242 bytes, 85 keys)&#xD;&#xA;340 K │ │ │─ Bonded =&gt; Map(348,192 bytes, 10881 keys)&#xD;&#xA;65  K │ │ │─ ErasValidatorPrefs =&gt; Map(67,533 bytes, 17691 keys)&#xD;&#xA;17  K │ │ │─ Payee =&gt; Map(18,177 bytes, 10881 keys)&#xD;&#xA;2   K │ │ │─ SpanSlash =&gt; Map(2,688 bytes, 84 keys)&#xD;&#xA;2   K │ │ │─ Validators =&gt; Map(2,173 bytes, 580 keys)&#xD;&#xA;1   K │ │ │─ SlashingSpans =&gt; Map(1,795 bytes, 103 keys)&#xD;&#xA;1   K │ │ │─ ErasTotalStake =&gt; Map(1,360 bytes, 85 keys)&#xD;&#xA;1   K │ │ │─ ErasValidatorReward =&gt; Map(1,344 bytes, 84 keys)&#xD;&#xA;340 B │ │ │─ ErasStartSessionIndex =&gt; Map(340 bytes, 85 keys)&#xD;&#xA;233 B │ │ │─ BondedEras =&gt; Value(233 bytes)&#xD;&#xA;16  B │ │ │─ CanceledSlashPayout =&gt; Value(16 bytes)&#xD;&#xA;13  B │ │ │─ ActiveEra =&gt; Value(13 bytes)&#xD;&#xA;4   B │ │ │─ EarliestUnappliedSlash =&gt; Value(4 bytes)&#xD;&#xA;4   B │ │ │─ SlashRewardFraction =&gt; Value(4 bytes)\&#xD;&#xA;..&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/12439&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/issues/12409" ContentLicense="CC BY-SA 4.0" />
  <row Id="19911" PostHistoryTypeId="2" PostId="5306" RevisionGUID="679af03e-8a4d-49ae-93c7-8f40d1ecd360" CreationDate="2022-10-12T07:47:53.107" UserId="2909" Text="As a quick update, the basics are also incredibly important! The Web3 Foundation has launched with EdX (The same platform used by MIT, Harvard, Berkley University of California, Boston University) educational courses:&#xD;&#xA;&#xD;&#xA;https://medium.com/web3foundation/polkadot-web3-educational-courses-launching-on-edx-9a67f4f6f731&#xD;&#xA;&#xD;&#xA;The courses will start on Oct 27, and will be archived for your benefit:&#xD;&#xA;&#xD;&#xA; - https://www.edx.org/course/introduction-to-polkadot&#xD;&#xA;   https://www.edx.org/course/introduction-to-blockchain-and-web3" ContentLicense="CC BY-SA 4.0" />
  <row Id="19913" PostHistoryTypeId="2" PostId="5307" RevisionGUID="b38b046c-2c82-4bb4-842e-d476e8462a4c" CreationDate="2022-10-12T08:04:18.333" UserId="3252" Text="What is the staking payload ?  I want to achieve three functions:&#xD;&#xA;```&#xD;&#xA;The one is becoming a nominator and staking my amount;&#xD;&#xA;The two is appending the staking my amount;&#xD;&#xA;The three is unbounding my staking amount;&#xD;&#xA;Can you give me the example about  how to build the payload:&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="19915" PostHistoryTypeId="1" PostId="5307" RevisionGUID="b38b046c-2c82-4bb4-842e-d476e8462a4c" CreationDate="2022-10-12T08:04:18.333" UserId="3252" Text="What is the staking payload?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19916" PostHistoryTypeId="3" PostId="5307" RevisionGUID="b38b046c-2c82-4bb4-842e-d476e8462a4c" CreationDate="2022-10-12T08:04:18.333" UserId="3252" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19917" PostHistoryTypeId="5" PostId="5307" RevisionGUID="b3f07507-6eba-44ee-81d3-6e3b7acf9338" CreationDate="2022-10-12T08:27:58.250" UserId="3252" Comment="added 6 characters in body; edited title" Text="I want to achieve three functions but I do not know how to build the staking payload and send transaction,&#xD;&#xA;&#xD;&#xA;The three functions are these: &#xD;&#xA;The one is becoming a nominator and staking my amount;&#xD;&#xA;The two is appending the staking my amount;&#xD;&#xA;The three is unbounding my staking amount;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19918" PostHistoryTypeId="4" PostId="5307" RevisionGUID="b3f07507-6eba-44ee-81d3-6e3b7acf9338" CreationDate="2022-10-12T08:27:58.250" UserId="3252" Comment="added 6 characters in body; edited title" Text="Staking: How to build the staking payload and send transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19919" PostHistoryTypeId="2" PostId="5308" RevisionGUID="b48cdd49-acee-456f-ba4f-6d2dacbc239a" CreationDate="2022-10-12T08:35:33.530" UserId="2673" Text="Do you mean accessing the pallet's storage? Yes, off-chain workers can do this. Take a look e.g. [here](https://github.com/paritytech/substrate/blob/ce10b9f29353e89fc3e59d447041bb29622def3f/frame/examples/offchain-worker/src/lib.rs#L196) – `average_price` is reading data from the `Prices` storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="19921" PostHistoryTypeId="2" PostId="5309" RevisionGUID="6807d05a-50a4-43df-bb5e-bc7f33fce2cf" CreationDate="2022-10-12T09:07:43.247" UserId="501" Text="after playing with the *Substrate Cumulus Parachain Template* and the *ping-pallet* to get an idea of how to use XCM, I built a local Rococo testnet connected to two parachains.&#xD;&#xA;&#xD;&#xA;In my code, at some point, the two parachains exchange XCM messages like in this image:&#xD;&#xA;&#xD;&#xA;[![simple xcm exchange example][2]][2]&#xD;&#xA;&#xD;&#xA; - &quot;step 1&quot; Alice send a signed extrinsic call to parachain A, which triggers a XCM transact call towards parachain B&#xD;&#xA; - &quot;step 2&quot; parachain B receive the XCM transact call, execute the extrinsic function, and triggers a reply XCM transact call towards parachain A &#xD;&#xA; - &quot;step 3&quot; parachain A receive the XCM transact call, execute the extrinsic function&#xD;&#xA;&#xD;&#xA;My question is: **How are the costs of XCM messages designed?**&#xD;&#xA;&#xD;&#xA;I see that Alice pays for the extrinsic execution in &quot;step 1&quot;. But in &quot;step 2&quot; and &quot;step 3&quot; there is no extrinsic costs for the XCM transact call, despite using a weight higher than 0 on the called extrinsic !?&#xD;&#xA;&#xD;&#xA;Maybe the XCM transact `origin_type` has to do something with it but I don't understand it well.&#xD;&#xA;&#xD;&#xA;Note: All XCM transact are using `origin_type: OriginKind::Native`. Also all the code works, my question is only about how the XCM interaction are being paid and how incentivization mechanism around XCM works.&#xD;&#xA;&#xD;&#xA;  [2]: https://i.stack.imgur.com/r5GZx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19923" PostHistoryTypeId="1" PostId="5309" RevisionGUID="6807d05a-50a4-43df-bb5e-bc7f33fce2cf" CreationDate="2022-10-12T09:07:43.247" UserId="501" Text="How are the costs of XCM messages designed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19924" PostHistoryTypeId="3" PostId="5309" RevisionGUID="6807d05a-50a4-43df-bb5e-bc7f33fce2cf" CreationDate="2022-10-12T09:07:43.247" UserId="501" Text="|xcm|weight|balances|cumulus|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19929" PostHistoryTypeId="5" PostId="5306" RevisionGUID="351145a0-4b04-453a-9ee0-a50c1e59db19" CreationDate="2022-10-12T10:54:07.237" UserId="2" Comment="formatting" Text="As a quick update, the basics are also incredibly important! The [Web3 Foundation has launched educational courses with EdX][1] (the same platform used by MIT, Harvard, Berkley University of California, Boston University).&#xD;&#xA;&#xD;&#xA;[1]: https://medium.com/web3foundation/polkadot-web3-educational-courses-launching-on-edx-9a67f4f6f731&#xD;&#xA;&#xD;&#xA;The courses will start on Oct 27, and will be archived for your benefit:&#xD;&#xA;&#xD;&#xA;* [Introduction to Polkadot](https://www.edx.org/course/introduction-to-polkadot)&#xD;&#xA;* [Introduction to Blockchain and Web3](https://www.edx.org/course/introduction-to-blockchain-and-web3)" ContentLicense="CC BY-SA 4.0" />
  <row Id="19930" PostHistoryTypeId="24" PostId="5306" RevisionGUID="351145a0-4b04-453a-9ee0-a50c1e59db19" CreationDate="2022-10-12T10:54:07.237" Comment="Proposed by 2 approved by 2909 edit id of 310" ContentLicense="CC BY-SA 4.0" />
  <row Id="19932" PostHistoryTypeId="5" PostId="5198" RevisionGUID="ebde9e36-0fd3-4783-8df6-0fb678777944" CreationDate="2022-10-12T12:22:14.900" UserId="251" Comment="added 174 characters in body" Text="I'm not sure if `sc_cli` provides these. AFAIK it didn't.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;But here is a general solution.&#xD;&#xA;&#xD;&#xA;Check this https://github.com/darwinia-network/darwinia/blob/12f3123d8c4d6fb8896d3f42dadb7b99a168fde1/cli/src/command.rs#L117-L122.&#xD;&#xA;&#xD;&#xA;You could put any log in your startup function.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&gt; https://github.com/zsiciarz/rust-cpuid&#xD;&#xA;```rust&#xD;&#xA;match cpuid::identify() {&#xD;&#xA;    Ok(info) =&gt; {&#xD;&#xA;        log::info!(&quot;Found: {} CPU, model: {}&quot;, info.vendor, info.codename);&#xD;&#xA;        log::info!(&quot;The full brand string is: {}&quot;, info.brand);&#xD;&#xA;        log::info!(&quot;Hardware AES support: {}&quot;, if info.has_feature(cpuid::CpuFeature::AES) { &quot;yes&quot; } else { &quot;no&quot; });&#xD;&#xA;    },&#xD;&#xA;    Err(err) =&gt; log::info!(&quot;cpuid error: {}&quot;, err),&#xD;&#xA;};&#xD;&#xA;match cpuid::clock_frequency() {&#xD;&#xA;    Some(frequency) =&gt; log::info!(&quot;CPU speed: {} MHz&quot;, frequency),&#xD;&#xA;    None =&gt; log::info!(&quot;Couldn't get CPU speed.&quot;),&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Now, I think the question duplicates with https://substrate.stackexchange.com/questions/3147/node-startup-message-missing-after-upgrade-to-polkadot-v0-9-23?noredirect=1&amp;lq=1." ContentLicense="CC BY-SA 4.0" />
  <row Id="19933" PostHistoryTypeId="2" PostId="5311" RevisionGUID="04cfa241-2024-46f7-bc03-3c5547edb92d" CreationDate="2022-10-12T12:56:42.077" UserId="3325" Text="We are currently running a 5 validator standalone network, after about ~1000 blocks the peers disconnect and block production stalls, all the nodes continue to produce blocks but does not gossip to each other. We are able to reproduce the issue after multiple retries.&#xD;&#xA;&#xD;&#xA;Non validator node logs:&#xD;&#xA;```&#xD;&#xA;2022-10-11 21:13:15.020  INFO tokio-runtime-worker substrate:  Idle (4 peers), best: #1193 (0x7cde…4646), finalized #1190 (0xe8ad…b51d), ⬇ 0 ⬆ 0&#xD;&#xA;2022-10-11 21:13:20.020  INFO tokio-runtime-worker substrate:  Idle (2 peers), best: #1193 (0x7cde…4646), finalized #1190 (0xe8ad…b51d), ⬇ 0 ⬆ 0&#xD;&#xA;2022-10-11 21:13:20.130 DEBUG tokio-runtime-worker dkg_gadget::gossip_engine::network: Peer 12D3KooWDhesPWmWcwyL5WsPG1eC3isnPqbHJRoBZCHybmMX9eKo disconnected from gossip protocol&#xD;&#xA;2022-10-11 21:13:20.130 DEBUG tokio-runtime-worker dkg_gadget::gossip_engine::network: Peer 12D3KooWDhesPWmWcwyL5WsPG1eC3isnPqbHJRoBZCHybmMX9eKo disconnected from gossip protocol&#xD;&#xA;2022-10-11 21:13:22.124 DEBUG tokio-runtime-worker dkg_gadget::gossip_engine::network: Peer 12D3KooWHXiHVg1YX9PHsa8NrS5ZWEoaKBydqZvLoegw2bcTiCtf disconnected from gossip protocol&#xD;&#xA;2022-10-11 21:13:22.125 DEBUG tokio-runtime-worker dkg_gadget::gossip_engine::network: Peer 12D3KooWHXiHVg1YX9PHsa8NrS5ZWEoaKBydqZvLoegw2bcTiCtf disconnected from gossip protocol&#xD;&#xA;2022-10-11 21:13:25.021  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #1193 (0x7cde…4646), finalized #1190 (0xe8ad…b51d), ⬇ 0 ⬆ 12 B/s&#xD;&#xA;2022-10-11 21:13:30.022  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #1193 (0x7cde…4646), finalized #1190 (0xe8ad…b51d), ⬇ 0 ⬆ 37 B/s&#xD;&#xA;2022-10-11 21:13:35.023  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #1193 (0x7cde…4646), finalized #1190 &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Validator node logs :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-11 21:12:31.508 DEBUG tokio-runtime-worker dkg_gadget::gossip_engine::network: Sending message to all peers&#xD;&#xA;2022-10-11 21:12:42.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0xd6343bee26f09a8ab36b7de40e3c7e16f60e6061b4b3c0bf430c3ae4d0051af6&#xD;&#xA;2022-10-11 21:12:42.011  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 1193 (9 ms) [hash: 0x7789595157ee0d3d31559b6fe90154c471b97eb5d76466824e4f5600801774c3; parent_hash: 0xd634…1af6; extrinsics (11): [0x0ed8…2350, 0xf99e…8844, 0x9da9…5be4, 0x8a26…9e1e, 0x6a0d…3092, 0xa7b1…be54, 0xf20c…3d50, 0xd284…da13, 0x27ac…f326, 0xfd0c…8260, 0x381a…b461]]&#xD;&#xA;2022-10-11 21:12:42.013  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 1193. Hash now 0x43236d6a42ad6ecf7d667aa444e74912825270062947dd4c3c7013d9e9796d67, previously 0x7789595157ee0d3d31559b6fe90154c471b97eb5d76466824e4f5600801774c3.&#xD;&#xA;2022-10-11 21:13:12.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x43236d6a42ad6ecf7d667aa444e74912825270062947dd4c3c7013d9e9796d67&#xD;&#xA;2022-10-11 21:13:13.635  WARN tokio-runtime-worker sc_basic_authorship::basic_authorship: Timeout fired waiting for transaction pool at block #1193. Proceeding with production.&#xD;&#xA;2022-10-11 21:13:13.637  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 1194 (1635 ms) [hash: 0x7535a79d22e45e07b89e712382fac195466c2fbe430eb9adcac2c0366a24b29d; parent_hash: 0x4323…6d67; extrinsics (1): [0xea7b…480a]]&#xD;&#xA;2022-10-11 21:13:13.638  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 1194. Hash now 0x1ab409a29c55c41932fc708ecea433cf8ee98b97fabac9aa0cf24566a34825ed, previously 0x7535a79d22e45e07b89e712382fac195466c2fbe430eb9adcac2c0366a24b29d.&#xD;&#xA;2022-10-11 21:13:42.000  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x1ab409a29c55c41932fc708ecea433cf8ee98b97fabac9aa0cf24566a34825ed&#xD;&#xA;2022-10-11 21:13:42.009  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 1195 (1 ms) [hash: 0xc5cbc8d26a78762d5326cb9c200ad8354f5629053de24c1407d5625a6b5d7973; parent_hash: 0x1ab4…25ed; extrinsics (1): [0x0019…7ffb]]&#xD;&#xA;2022-10-11 21:13:42.011  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 1195. Hash now 0x9116b721793b7ab809cfa65c00516e6142511183b70085309d63ac722dbbba85, previously 0xc5cbc8d26a78762d5326cb9c200ad8354f5629053de24c1407d5625a6b5d7973.&#xD;&#xA;2022-10-11 21:14:12.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x9116b721793b7ab809cfa65c00516e6142511183b70085309d63ac722dbbba85&#xD;&#xA;2022-10-11 21:14:12.002  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 1196 (0 ms) [hash: 0xd8d86809bf02ceeb8575110817323dfab2b5099a976615b1cb7421fc72ab0dd5; parent_hash: 0x9116…ba85; extrinsics (1): [0x98bf…b349]]&#xD;&#xA;2022-10-11 21:14:12.003  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 1196. Hash now 0xae78d95b47b8e1c9b01187334ef62683c297d5c776d343f40adcabed1eda75f2, previously 0xd8d86809bf02ceeb8575110817323dfab2b5099a976615b1cb7421fc72ab0dd5.&#xD;&#xA;2022-10-11 21:14:42.000  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0xae78d95b47b8e1c9b01187334ef62683c297d5c776d343f40adcabed1eda75f2&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What would be the possible reason for this stall? Could a runtime panic cause this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19935" PostHistoryTypeId="1" PostId="5311" RevisionGUID="04cfa241-2024-46f7-bc03-3c5547edb92d" CreationDate="2022-10-12T12:56:42.077" UserId="3325" Text="Substrate standalone network : Peers disconnect and block production halts" ContentLicense="CC BY-SA 4.0" />
  <row Id="19936" PostHistoryTypeId="3" PostId="5311" RevisionGUID="04cfa241-2024-46f7-bc03-3c5547edb92d" CreationDate="2022-10-12T12:56:42.077" UserId="3325" Text="|substrate-node|networking|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19937" PostHistoryTypeId="2" PostId="5312" RevisionGUID="5ca623d4-1a6c-4575-9aac-12aebb86d9be" CreationDate="2022-10-12T12:59:43.423" UserId="372" Text="The goal of only producing blocks when a block is needed makes sense. This is similar to how parathreads will behave on Polkadot. You will most likely need to write your own consensus logic to achieve this in a production-ready manner.&#xD;&#xA;&#xD;&#xA;At minimum, you will need to write logic to reject empty blocks as instant seal does not currently do this. While it's true that instant seal only authors blocks when it has a transaction to include, it still needs to reject blocks authored by other potentially-malicious nodes, and it does not do this.&#xD;&#xA;&#xD;&#xA;Instant seal, as it is written in Substrate today, allows anyone to produce a block at any time. Practically speaking, you will also need to throttle block production in some way so that a malicious user does not spam the network with trivial blocks. I can think of two ways that might work.&#xD;&#xA;&#xD;&#xA;1. Use some kind of PoA or PoS scheme to restrict authors so that only certain trusted or staked accounts can author. This makes it similar to Aura.&#xD;&#xA;2. Make transaction fees high enough to account for the overhead of importing an entire block. This is higher than the typical fees that are just for including a transaction in a block." ContentLicense="CC BY-SA 4.0" />
  <row Id="19939" PostHistoryTypeId="2" PostId="5313" RevisionGUID="93387be6-fc31-42ad-b233-04f03039ef06" CreationDate="2022-10-12T13:01:33.830" UserId="154" Text="I'd like to know if there is a dedicated function or if someone knows where to find a good portion of code (nodejs) in order to get details about a tx error code ?&#xD;&#xA;I found out that the error description is stored in the metadata of the chain, and we can get it with api.rpc.state.getMetadata(), but its content is somehow obscure for me&#xD;&#xA;&#xD;&#xA;eg If I sign a tx in Khala parachain, which fail, I get this :&#xD;&#xA;```&#xD;&#xA;system.ExtrinsicFailed [{&quot;module&quot;:{&quot;index&quot;:88,&quot;error&quot;:&quot;0x0e000000&quot;}},{&quot;weight&quot;:195000000,&quot;class&quot;:&quot;Normal&quot;,&quot;paysFee&quot;:&quot;Yes&quot;}]&#xD;&#xA;```&#xD;&#xA;which I can convert to error index:88 module:14 (0e in hex to dec)&#xD;&#xA;but then I don't know how to lookup the error within the metadata&#xD;&#xA;&#xD;&#xA;thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="19941" PostHistoryTypeId="1" PostId="5313" RevisionGUID="93387be6-fc31-42ad-b233-04f03039ef06" CreationDate="2022-10-12T13:01:33.830" UserId="154" Text="lookup error description from an error id in tx" ContentLicense="CC BY-SA 4.0" />
  <row Id="19942" PostHistoryTypeId="3" PostId="5313" RevisionGUID="93387be6-fc31-42ad-b233-04f03039ef06" CreationDate="2022-10-12T13:01:33.830" UserId="154" Text="|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19943" PostHistoryTypeId="2" PostId="5314" RevisionGUID="be0499aa-3e23-42fa-815a-31b39c0ebb81" CreationDate="2022-10-12T13:06:49.033" UserId="251" Text="Let's take Polkadot as an example.&#xD;&#xA;&#xD;&#xA;If the error is `module: 5 error: 0`.&#xD;&#xA;&#xD;&#xA;Then it is [the 5th module](https://github.com/paritytech/polkadot/blob/15709eee181d927ec80d566e882931776182bdcd/runtime/polkadot/src/lib.rs#L1435)(starting from 0, you know that programmer counts starting from 0) of the runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And [the 0th error](https://github.com/paritytech/substrate/blob/06a9f0a5da9681287f8a1c7b53497921238ece81/frame/balances/src/lib.rs#L477) of the pallet-balances.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If they didn't specify the index in `construct_runtime!` then the list order is the index." ContentLicense="CC BY-SA 4.0" />
  <row Id="19945" PostHistoryTypeId="2" PostId="5315" RevisionGUID="e8dd9de6-19c4-45f3-903e-27f511f2d133" CreationDate="2022-10-12T14:01:50.817" UserId="3326" Text="I am trying to split our validators of a substrate chain into signing subgroups for key signing purposes.&#xD;&#xA;The [OneSessionHandler][1] gives me the perfect information I need to do this. On the end of each session I get to know have the validator set changed, what it changed from to what it changed to&#xD;&#xA;&#xD;&#xA;It seems like the event only gets propagated to pallets that are contained in the [key type][2]. I do not need another key type however I want the event to get propagated to my custom pallet.&#xD;&#xA;&#xD;&#xA;Is there a way to get this event triggered in my custom pallet or maybe am I thinking about this wrong and there is a better way to get this information on validator changes?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/support/src/traits/validation.rs#L78&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L511" ContentLicense="CC BY-SA 4.0" />
  <row Id="19947" PostHistoryTypeId="1" PostId="5315" RevisionGUID="e8dd9de6-19c4-45f3-903e-27f511f2d133" CreationDate="2022-10-12T14:01:50.817" UserId="3326" Text="Trying to get OneSessionHandler to trigger in custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="19948" PostHistoryTypeId="3" PostId="5315" RevisionGUID="e8dd9de6-19c4-45f3-903e-27f511f2d133" CreationDate="2022-10-12T14:01:50.817" UserId="3326" Text="|pallet|runtime|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19949" PostHistoryTypeId="5" PostId="1210" RevisionGUID="139c7afb-965b-4862-9ba6-5c2737091fdc" CreationDate="2022-10-12T14:39:05.713" UserId="85" Comment="better method" Text="*UPDATE*:&#xD;&#xA;[shawn's utils website][1] has a &quot;Para ID&quot; to Address utility.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is parachain sovereign account 2000 (the AcountId32):&#xD;&#xA;&#xD;&#xA;0x70617261 + d0070000 + 000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;0x70617261 = b&quot;para&quot; (up/down) or 0x7369626c = b&quot;sibl&quot; (side-to-side)&#xD;&#xA;&#xD;&#xA;d0070000 = scale encoded number 2000&#xD;&#xA;&#xD;&#xA;You can see the scale encoding of a u32 by typing the number into collatorSelection/setDesiredCandidates and looking at the encoded call details on the bottom right by `max` that is the encoded version of 2000.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2] &#xD;&#xA;&#xD;&#xA;To copy and paste:&#xD;&#xA;&#xD;&#xA;1000: 0x70617261e8030000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;2000: 0x70617261d0070000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;2001: 0x70617261d1070000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;2002: 0x70617261d2070000000000000000000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;(That's also enough examples that you could guess the rest. I do think that we need an easy way to get these from polkadot-js maybe from the parachain screen? - PRs welcome!)&#xD;&#xA;&#xD;&#xA;If you want a normal polkadot/kusama address then you can use the &quot;AccountId to Hex&quot; at https://www.shawntabrizi.com/substrate-js-utilities/ - paste in the above on the right hand side as the hex and you will get the address calculated. For example, for 1000 parachain id it returns 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate-js-utilities/&#xD;&#xA;  [2]: https://i.stack.imgur.com/OzbQT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19950" PostHistoryTypeId="2" PostId="5316" RevisionGUID="380b7505-77d9-4293-8eae-c6fb16fbaefe" CreationDate="2022-10-12T15:10:40.460" UserId="251" Text="Now, we have another choice `Subalfred`, a CLI toolbox.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# Sovereign address on relaychain.&#xD;&#xA;subalfred key --type parachain 2000&#xD;&#xA;public-key 0x70617261d0070000000000000000000000000000000000000000000000000000 ParaId(2000)&#xD;&#xA;Substrate 5Ec4AhPUwPeyTFyuhGuBbD224mY85LKLMSqSSo33JYWCazU4&#xD;&#xA;&#xD;&#xA;# Sovereign address on sibling chain.&#xD;&#xA;subalfred key --type sibling 2000&#xD;&#xA;public-key 0x7369626cd0070000000000000000000000000000000000000000000000000000 SiblId(2000)&#xD;&#xA;Substrate 5Eg2fntJ27qsari4FGrGhrMqKFDRnkNSR6UshkZYBGXmSuC8&#xD;&#xA;&#xD;&#xA;# Note that, if you are on Moonbeam-link chain, remove 24 trailing zeros from the public-key.&#xD;&#xA;public-key 0x7369626cd0070000000000000000000000000000000000000000000000000000 SiblId(2000)&#xD;&#xA;public-key 0x7369626cd0070000000000000000000000000000 SiblId(2000)&#xD;&#xA;&#xD;&#xA;# Subalfred will detect if this is a sovereign address automatically.&#xD;&#xA;subalfred key 5Eg2fntJ27qsari4FGrGhrMqKFDRnkNSR6UshkZYBGXmSuC8&#xD;&#xA;public-key 0x7369626cd0070000000000000000000000000000000000000000000000000000 SiblId(2000)&#xD;&#xA;Substrate 5Eg2fntJ27qsari4FGrGhrMqKFDRnkNSR6UshkZYBGXmSuC8&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For more details, check the https://subalfred.hack.ink/user/cli/key.html." ContentLicense="CC BY-SA 4.0" />
  <row Id="19952" PostHistoryTypeId="2" PostId="5317" RevisionGUID="6de64208-6372-4076-9db6-622fc2cb05f3" CreationDate="2022-10-12T15:39:29.833" UserId="424" Text="i am proud owner of a rococo Parathread with the ID 3025 - once there was the slot rotation and from time to time ( 3 days interval ) the parathread became a parachain. I am wondering if there is a problem or anything has changed. The parathread hasn't been upgraded for while now.&#xD;&#xA;Thx in advance.&#xD;&#xA;tom" ContentLicense="CC BY-SA 4.0" />
  <row Id="19954" PostHistoryTypeId="1" PostId="5317" RevisionGUID="6de64208-6372-4076-9db6-622fc2cb05f3" CreationDate="2022-10-12T15:39:29.833" UserId="424" Text="Rococo Parathread / Parachain -&gt; Slot Rotation still working?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19955" PostHistoryTypeId="3" PostId="5317" RevisionGUID="6de64208-6372-4076-9db6-622fc2cb05f3" CreationDate="2022-10-12T15:39:29.833" UserId="424" Text="|rococo|parathread|slot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19956" PostHistoryTypeId="5" PostId="5315" RevisionGUID="c640f91a-c319-4b48-b75b-86fe4d3a87a0" CreationDate="2022-10-12T15:56:55.397" UserId="3326" Comment="added 343 characters in body" Text="I am trying to split our validators of a substrate chain into signing subgroups for key signing purposes.&#xD;&#xA;The [OneSessionHandler][1] gives me the perfect information I need to do this. On the end of each session I get to know have the validator set changed, what it changed from to what it changed to&#xD;&#xA;&#xD;&#xA;It seems like the event only gets propagated to pallets that are contained in the [key type][2]. I do not need another key type however I want the event to get propagated to my custom pallet.&#xD;&#xA;&#xD;&#xA;Is there a way to get this event triggered in my custom pallet or maybe am I thinking about this wrong and there is a better way to get this information on validator changes?&#xD;&#xA;&#xD;&#xA;Edit: Additional info &#xD;&#xA;&#xD;&#xA;When I add the pallet types manually and add in my custom pallet straight to the config of pallet session&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type SessionHandler = (Grandpa, Babe, ImOnline, AuthorityDiscovery, CustomPallet);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get a runtime panic&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/support/src/traits/validation.rs#L78&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L511&#xD;&#xA;  [3]: https://i.stack.imgur.com/0TAHn.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="19957" PostHistoryTypeId="5" PostId="5311" RevisionGUID="3115328c-e3e7-437f-96d5-68b6ab969fd8" CreationDate="2022-10-12T16:34:05.927" UserId="3325" Comment="added 24 characters in body" Text="We are currently running a 5 validator standalone network, after about ~1000 blocks the peers disconnect and block production stalls, all the nodes continue to produce blocks but does not gossip to each other. We are able to reproduce the issue after multiple retries.&#xD;&#xA;&#xD;&#xA;Non validator node logs:&#xD;&#xA;```&#xD;&#xA;2022-10-11 21:13:15.020  INFO tokio-runtime-worker substrate:  Idle (4 peers), best: #1193 (0x7cde…4646), finalized #1190 (0xe8ad…b51d), ⬇ 0 ⬆ 0&#xD;&#xA;2022-10-11 21:13:20.020  INFO tokio-runtime-worker substrate:  Idle (2 peers), best: #1193 (0x7cde…4646), finalized #1190 (0xe8ad…b51d), ⬇ 0 ⬆ 0&#xD;&#xA;2022-10-11 21:13:20.130 DEBUG tokio-runtime-worker dkg_gadget::gossip_engine::network: Peer 12D3KooWDhesPWmWcwyL5WsPG1eC3isnPqbHJRoBZCHybmMX9eKo disconnected from gossip protocol&#xD;&#xA;2022-10-11 21:13:20.130 DEBUG tokio-runtime-worker dkg_gadget::gossip_engine::network: Peer 12D3KooWDhesPWmWcwyL5WsPG1eC3isnPqbHJRoBZCHybmMX9eKo disconnected from gossip protocol&#xD;&#xA;2022-10-11 21:13:22.124 DEBUG tokio-runtime-worker dkg_gadget::gossip_engine::network: Peer 12D3KooWHXiHVg1YX9PHsa8NrS5ZWEoaKBydqZvLoegw2bcTiCtf disconnected from gossip protocol&#xD;&#xA;2022-10-11 21:13:22.125 DEBUG tokio-runtime-worker dkg_gadget::gossip_engine::network: Peer 12D3KooWHXiHVg1YX9PHsa8NrS5ZWEoaKBydqZvLoegw2bcTiCtf disconnected from gossip protocol&#xD;&#xA;2022-10-11 21:13:25.021  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #1193 (0x7cde…4646), finalized #1190 (0xe8ad…b51d), ⬇ 0 ⬆ 12 B/s&#xD;&#xA;2022-10-11 21:13:30.022  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #1193 (0x7cde…4646), finalized #1190 (0xe8ad…b51d), ⬇ 0 ⬆ 37 B/s&#xD;&#xA;2022-10-11 21:13:35.023  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #1193 (0x7cde…4646), finalized #1190 &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Validator node logs :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-11 21:12:31.508 DEBUG tokio-runtime-worker dkg_gadget::gossip_engine::network: Sending message to all peers&#xD;&#xA;2022-10-11 21:12:42.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0xd6343bee26f09a8ab36b7de40e3c7e16f60e6061b4b3c0bf430c3ae4d0051af6&#xD;&#xA;2022-10-11 21:12:42.011  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 1193 (9 ms) [hash: 0x7789595157ee0d3d31559b6fe90154c471b97eb5d76466824e4f5600801774c3; parent_hash: 0xd634…1af6; extrinsics (11): [0x0ed8…2350, 0xf99e…8844, 0x9da9…5be4, 0x8a26…9e1e, 0x6a0d…3092, 0xa7b1…be54, 0xf20c…3d50, 0xd284…da13, 0x27ac…f326, 0xfd0c…8260, 0x381a…b461]]&#xD;&#xA;2022-10-11 21:12:42.013  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 1193. Hash now 0x43236d6a42ad6ecf7d667aa444e74912825270062947dd4c3c7013d9e9796d67, previously 0x7789595157ee0d3d31559b6fe90154c471b97eb5d76466824e4f5600801774c3.&#xD;&#xA;2022-10-11 21:13:12.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x43236d6a42ad6ecf7d667aa444e74912825270062947dd4c3c7013d9e9796d67&#xD;&#xA;2022-10-11 21:13:13.635  WARN tokio-runtime-worker sc_basic_authorship::basic_authorship: Timeout fired waiting for transaction pool at block #1193. Proceeding with production.&#xD;&#xA;2022-10-11 21:13:13.637  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 1194 (1635 ms) [hash: 0x7535a79d22e45e07b89e712382fac195466c2fbe430eb9adcac2c0366a24b29d; parent_hash: 0x4323…6d67; extrinsics (1): [0xea7b…480a]]&#xD;&#xA;2022-10-11 21:13:13.638  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 1194. Hash now 0x1ab409a29c55c41932fc708ecea433cf8ee98b97fabac9aa0cf24566a34825ed, previously 0x7535a79d22e45e07b89e712382fac195466c2fbe430eb9adcac2c0366a24b29d.&#xD;&#xA;2022-10-11 21:13:42.000  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x1ab409a29c55c41932fc708ecea433cf8ee98b97fabac9aa0cf24566a34825ed&#xD;&#xA;2022-10-11 21:13:42.009  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 1195 (1 ms) [hash: 0xc5cbc8d26a78762d5326cb9c200ad8354f5629053de24c1407d5625a6b5d7973; parent_hash: 0x1ab4…25ed; extrinsics (1): [0x0019…7ffb]]&#xD;&#xA;2022-10-11 21:13:42.011  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 1195. Hash now 0x9116b721793b7ab809cfa65c00516e6142511183b70085309d63ac722dbbba85, previously 0xc5cbc8d26a78762d5326cb9c200ad8354f5629053de24c1407d5625a6b5d7973.&#xD;&#xA;2022-10-11 21:14:12.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x9116b721793b7ab809cfa65c00516e6142511183b70085309d63ac722dbbba85&#xD;&#xA;2022-10-11 21:14:12.002  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 1196 (0 ms) [hash: 0xd8d86809bf02ceeb8575110817323dfab2b5099a976615b1cb7421fc72ab0dd5; parent_hash: 0x9116…ba85; extrinsics (1): [0x98bf…b349]]&#xD;&#xA;2022-10-11 21:14:12.003  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 1196. Hash now 0xae78d95b47b8e1c9b01187334ef62683c297d5c776d343f40adcabed1eda75f2, previously 0xd8d86809bf02ceeb8575110817323dfab2b5099a976615b1cb7421fc72ab0dd5.&#xD;&#xA;2022-10-11 21:14:42.000  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0xae78d95b47b8e1c9b01187334ef62683c297d5c776d343f40adcabed1eda75f2&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What would be the possible reason for this stall? Could a runtime panic cause this issue?&#xD;&#xA;using polkadot-v0.9.29" ContentLicense="CC BY-SA 4.0" />
  <row Id="19958" PostHistoryTypeId="5" PostId="5315" RevisionGUID="383adb8e-1da7-49e4-872e-1c6e6245430c" CreationDate="2022-10-12T16:45:39.697" UserId="3326" Comment="added 3930 characters in body" Text="I am trying to split our validators of a substrate chain into signing subgroups for key signing purposes.&#xD;&#xA;The [OneSessionHandler][1] gives me the perfect information I need to do this. On the end of each session I get to know have the validator set changed, what it changed from to what it changed to&#xD;&#xA;&#xD;&#xA;It seems like the event only gets propagated to pallets that are contained in the [key type][2]. I do not need another key type however I want the event to get propagated to my custom pallet.&#xD;&#xA;&#xD;&#xA;Is there a way to get this event triggered in my custom pallet or maybe am I thinking about this wrong and there is a better way to get this information on validator changes?&#xD;&#xA;&#xD;&#xA;Edit: Additional info &#xD;&#xA;&#xD;&#xA;When I add the pallet types manually and add in my custom pallet straight to the config of pallet session&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type SessionHandler = (Grandpa, Babe, ImOnline, AuthorityDiscovery, CustomPallet);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get a runtime panic&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;022-10-12 11:55:44 Substrate Node    &#xD;&#xA;2022-10-12 11:55:44 ✌️  version 3.0.0-monthly-2021-10-9ec3350-x86_64-macos    &#xD;&#xA;2022-10-12 11:55:44 ❤️  by Substrate DevHub &lt;https://github. Fm/substrate-developer-hub&gt;, 2017-2022    &#xD;&#xA;2022-10-12 11:55:44  Chain specification: Development    &#xD;&#xA;2022-10-12 11:55:44   Node name: foregoing-seat-4750    &#xD;&#xA;2022-10-12 11:55:44  Role: AUTHORITY    &#xD;&#xA;2022-10-12 11:55:44  Database: RocksDb at /var/folders/gr/dhyt1nqs0_v9rcrz70wgf5lr0000gn/T/substrate30JPcz/chains/dev/db/full    &#xD;&#xA;2022-10-12 11:55:44 ⛓  Native runtime: node-267 (substrate-node-1.tx2.au10)    &#xD;&#xA;&#xD;&#xA;====================&#xD;&#xA;&#xD;&#xA;Version: 3.0.0-monthly-2021-10-9ec3350-x86_64-macos&#xD;&#xA;&#xD;&#xA;   0: backtrace::capture::Backtrace::new&#xD;&#xA;   1: sp_panic_handler::set::{{closure}}&#xD;&#xA;   2: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panicking.rs:702:17&#xD;&#xA;   3: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panicking.rs:586:13&#xD;&#xA;   4: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   5: rust_begin_unwind&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panicking.rs:584:5&#xD;&#xA;   6: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/core/src/panicking.rs:142:14&#xD;&#xA;   7: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;   8: sp_state_machine::basic::BasicExternalities::execute_with_storage&#xD;&#xA;   9: &lt;entropy_runtime::GenesisConfig as sp_runtime::BuildStorage&gt;::assimilate_storage&#xD;&#xA;  10: sp_runtime::BuildStorage::build_storage&#xD;&#xA;  11: &lt;sc_chain_spec::chain_spec::ChainSpec&lt;G,E&gt; as sp_runtime::BuildStorage&gt;::build_storage&#xD;&#xA;  12: sc_service::client::client::Client&lt;B,E,Block,RA&gt;::new&#xD;&#xA;  13: sc_service::builder::new_full_parts&#xD;&#xA;  14: entropy::service::new_partial&#xD;&#xA;  15: entropy::service::new_full_base&#xD;&#xA;  16: entropy::service::new_full&#xD;&#xA;  17: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  18: tokio::park::thread::CachedParkThread::block_on&#xD;&#xA;  19: tokio::runtime::thread_pool::ThreadPool::block_on&#xD;&#xA;  20: sc_cli::runner::Runner&lt;C&gt;::run_node_until_exit&#xD;&#xA;  21: entropy::command::run&#xD;&#xA;  22: entropy::main&#xD;&#xA;  23: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  24: std::rt::lang_start::{{closure}}&#xD;&#xA;  25: core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/core/src/ops/function.rs:280:13&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panicking.rs:492:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panicking.rs:456:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panic.rs:137:14&#xD;&#xA;      std::rt::lang_start_internal::{{closure}}&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/rt.rs:128:48&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panicking.rs:492:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panicking.rs:456:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/panic.rs:137:14&#xD;&#xA;      std::rt::lang_start_internal&#xD;&#xA;             at /rustc/29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6/library/std/src/rt.rs:128:20&#xD;&#xA;  26: _main&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'main' panicked at 'Number of keys in session handler and session keys does not match', /Users/jesseabramowitz/.cargo/git/checkouts/substrate-7e08433d4c370a21/c89d524/frame/session/src/lib.rs:433&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;&#xD;&#xA;	https://github.com/paritytech/substrate/issues/new&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/support/src/traits/validation.rs#L78&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L511" ContentLicense="CC BY-SA 4.0" />
  <row Id="19959" PostHistoryTypeId="2" PostId="5318" RevisionGUID="06c87f24-2b2b-44e2-829f-ffee8102df1b" CreationDate="2022-10-12T17:35:35.793" UserId="29" Text="It should be working but just in case we assigned you again a temporary slot.&#xD;&#xA;&#xD;&#xA;Let us know if you see this issue again. We will be attentive." ContentLicense="CC BY-SA 4.0" />
  <row Id="19961" PostHistoryTypeId="52" PostId="5313" RevisionGUID="44810929-ee46-4f98-a639-46bc1e4a0bc5" CreationDate="2022-10-12T21:06:19.437" />
  <row Id="19963" PostHistoryTypeId="2" PostId="5319" RevisionGUID="7a96d577-7b20-402c-866e-28630198e0ea" CreationDate="2022-10-13T05:32:10.783" UserId="116" Text="There is a commit on substrate which I think is related to the compiler version you are using:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;commit c6ebc1e73f85deba349db0ea785ad53addb6f69f&#xD;&#xA;Author: Bastian Köcher &lt;git@kchr.de&gt;&#xD;&#xA;Date:   Tue Sep 27 11:37:45 2022 +0200&#xD;&#xA;&#xD;&#xA;    Fix compilation on 1.66 nightly (#12363)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Currently you are using substrate commit `7c4ac358c29c9748c6e8ed4e05910504cd01a3b9` which does not include the fix above.&#xD;&#xA;&#xD;&#xA;Run `cargo update` and rebuild should solve this&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19965" PostHistoryTypeId="2" PostId="5320" RevisionGUID="913f2ff1-8619-4cff-a289-7fcbc80fa56e" CreationDate="2022-10-13T06:36:55.793" UserId="2909" Text="Other than the information presented (shown below), is there a way to keep track of the Gov2 technical specifications?&#xD;&#xA;&#xD;&#xA; - https://polkadot.network/blog/gov2-polkadots-next-generation-of-decentralised-governance/&#xD;&#xA; - https://www.youtube.com/watch?v=EF93ZM_P_Oc" ContentLicense="CC BY-SA 4.0" />
  <row Id="19967" PostHistoryTypeId="1" PostId="5320" RevisionGUID="913f2ff1-8619-4cff-a289-7fcbc80fa56e" CreationDate="2022-10-13T06:36:55.793" UserId="2909" Text="Where can I find more information of Gov2 specifications/documentation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19968" PostHistoryTypeId="3" PostId="5320" RevisionGUID="913f2ff1-8619-4cff-a289-7fcbc80fa56e" CreationDate="2022-10-13T06:36:55.793" UserId="2909" Text="|polkadot|pallet|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19969" PostHistoryTypeId="2" PostId="5321" RevisionGUID="dab84a66-b5d5-48cb-909e-0a135eb4e8ae" CreationDate="2022-10-13T07:13:19.497" UserId="2673" Text="I suggest you take a look at [this PR](https://github.com/paritytech/polkadot/pull/5205) adding Gov v2 on Kusama. It might also be worthwhile checking out the [ranked_collective](https://paritytech.github.io/substrate/master/pallet_ranked_collective/index.html) pallet, which seems crucial for the new governance model." ContentLicense="CC BY-SA 4.0" />
  <row Id="19971" PostHistoryTypeId="2" PostId="5322" RevisionGUID="e72dbb88-e1fb-46c6-8885-1c3f0376957e" CreationDate="2022-10-13T07:40:04.257" UserId="2673" Text="I suggest you to familiarize yourself with the following resources:&#xD;&#xA; * [Transactions](https://polkadot.js.org/docs/api/start/api.tx) – how to submit extrinsics from polkadot.js,&#xD;&#xA; * [Complex transactions](https://polkadot.js.org/docs/api/start/api.tx.wrap) – a bit more about the above,&#xD;&#xA; * [extrinsics#staking](https://polkadot.js.org/docs/substrate/extrinsics#staking) – full documentation of the extrinsics from the staking pallet.&#xD;&#xA;&#xD;&#xA;Regarding the three 'functions' you want to achieve, I believe it should be done the following way:&#xD;&#xA; 1. &quot;becoming a nominator and staking my amount&quot; -&gt; `api.tx.staking.bond(..)` and then `api.tx.staking.nominate(..)`,&#xD;&#xA; 2. &quot;appending the staking my amount&quot; -&gt; `api.tx.staking.bondExtra(..)`,&#xD;&#xA; 3. &quot;unbounding my staking amount&quot; -&gt; `api.tx.staking.unbound(..)` and the `api.tx.staking.withdrawUnbounded(..)`&#xD;&#xA;&#xD;&#xA;Regarding the &quot;staking payload&quot; I don't really know what that means and if it's necessary.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19973" PostHistoryTypeId="2" PostId="5323" RevisionGUID="28be8e72-33af-4e49-9231-9c894d2f779f" CreationDate="2022-10-13T08:30:14.833" UserId="393" Text="**Background**&#xD;&#xA;&#xD;&#xA;Our front end use state call to query custom RuntimeApi of our solo chain.&#xD;&#xA;We try to use state call to replace custom rpcs.&#xD;&#xA;&#xD;&#xA;**Definition**&#xD;&#xA;&#xD;&#xA;Balance is our chain is u128.&#xD;&#xA;&#xD;&#xA;**RuntimeApi Definition**&#xD;&#xA;&#xD;&#xA;    impl parami_ad_runtime_api::AdRuntimeApi&lt;Block, &lt;BlakeTwo256 as sp_runtime::traits::Hash&gt;::Output, NftId, DecentralizedId, Balance&gt; for Runtime {&#xD;&#xA;       fn cal_reward(ad_id: &lt;BlakeTwo256 as sp_runtime::traits::Hash&gt;::Output, nft_id: NftId, did: DecentralizedId, referrer: Option&lt;DecentralizedId&gt;) -&gt; Result&lt;Balance, DispatchError&gt; {&#xD;&#xA;            let visitor_in_runtime = Ad::cal_reward(ad_id, nft_id, did, referrer).unwrap();&#xD;&#xA;            Ok(visitor_in_runtime)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**Frontend implementation**&#xD;&#xA;&#xD;&#xA;    let resultOfFrontEnd = await api.call.adRuntimeApi.calReward(&quot;0x9cefa96e26ba9767a8c21fcc73d3b0912850e712b1a38945a1d2aaf8ccff5c58&quot;, 3, &quot;0x5bc69eda41a4e6cf8b0a257b1c16b0d451eb95ee&quot;, null);&#xD;&#xA;&#xD;&#xA;**Problem**&#xD;&#xA;When i run the frontend, and debug run a local substrate node, I got the following confusing result;&#xD;&#xA;&#xD;&#xA;1. `resultOfFronEnd` in the front end code is &quot;256 Unit&quot;&#xD;&#xA;2. `result_in_runtime` in the runtime api implementation code is &quot;1 Unit&quot;&#xD;&#xA;&#xD;&#xA;I also try other return value, the **regular pattern** is `resultOfFrontEnd = 256 * result_in_runtime`.&#xD;&#xA;&#xD;&#xA;I really want to know why, or how can I reason about it." ContentLicense="CC BY-SA 4.0" />
  <row Id="19975" PostHistoryTypeId="1" PostId="5323" RevisionGUID="28be8e72-33af-4e49-9231-9c894d2f779f" CreationDate="2022-10-13T08:30:14.833" UserId="393" Text="Use state call to query from custom Runtime Api, Balance in frontend is not equal to Balance in Runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="19976" PostHistoryTypeId="3" PostId="5323" RevisionGUID="28be8e72-33af-4e49-9231-9c894d2f779f" CreationDate="2022-10-13T08:30:14.833" UserId="393" Text="|polkadot-js|custom-rpc|runtime-api|frontend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19977" PostHistoryTypeId="2" PostId="5324" RevisionGUID="48572bdb-509a-4904-b957-d63a053e5dea" CreationDate="2022-10-13T09:24:48.893" UserId="2344" Text="I don't get any response from `json-rpc` subscription.&#xD;&#xA;&#xD;&#xA;It seems I need a `type` paramater, but the `provider.subscribe()` method does not document the `type` parameter. (I checked the [js, java and python code][1], can't find any explanation of this param).&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const { WsProvider } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;(async () =&gt; {&#xD;&#xA;&#xD;&#xA;  const provider = new WsProvider('wss://kusama-rpc.polkadot.io');&#xD;&#xA;  var count = 0&#xD;&#xA;&#xD;&#xA;  const type = '' // @param string &lt;==== what should this be?&#xD;&#xA;  const method = 'chain_subscribeAllHeads'&#xD;&#xA;  // const method = 'subscribeAllHeads' // =&gt; method not found&#xD;&#xA;  // const method = 'state_subscribeRuntimeVersion'&#xD;&#xA;  const params = []&#xD;&#xA;&#xD;&#xA;  const unsub = await provider.subscribe(type, method, params, (err, response) =&gt; {&#xD;&#xA;    count++&#xD;&#xA;    console.log(err, response)&#xD;&#xA;    if(count &gt; 2) {&#xD;&#xA;      unsub()&#xD;&#xA;      process.exit(0)&#xD;&#xA;    }&#xD;&#xA;  })&#xD;&#xA;})()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/d64a1fcfd3bcbe6fba589937bbba13d928b2007b/packages/rpc-provider/src/ws/index.ts#L377" ContentLicense="CC BY-SA 4.0" />
  <row Id="19979" PostHistoryTypeId="1" PostId="5324" RevisionGUID="48572bdb-509a-4904-b957-d63a053e5dea" CreationDate="2022-10-13T09:24:48.893" UserId="2344" Text="Subscribe via json-rpc has no response" ContentLicense="CC BY-SA 4.0" />
  <row Id="19980" PostHistoryTypeId="3" PostId="5324" RevisionGUID="48572bdb-509a-4904-b957-d63a053e5dea" CreationDate="2022-10-13T09:24:48.893" UserId="2344" Text="|polkadot-js|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19981" PostHistoryTypeId="2" PostId="5325" RevisionGUID="b2e75d98-f5ee-4385-8fdd-8facec2a7549" CreationDate="2022-10-13T09:49:38.403" UserId="3329" Text="am using the guide here https://docs.substrate.io/tutorials/smart-contracts/prepare-your-first-contract/ &lt;br/&gt;&#xD;&#xA;&#xD;&#xA;To deploy the flipper after filling the second form as required i the page goes blank&lt;br/&gt;&#xD;&#xA;&#xD;&#xA;The black page consoler log is&#xD;&#xA;&#xD;&#xA;    Uncaught Error: The runtime does not expose api.tx.contracts.instantiateWithCode with storageDepositLimit&#xD;&#xA;    at new Base$1 (polkadot.4d4418f9.js:5:29341)&#xD;&#xA;    at new Code (polkadot.4d4418f9.js:5:32770)&#xD;&#xA;    at new CodePromise (polkadot.4d4418f9.js:5:33828)&#xD;&#xA;    at pS (index.a53e7976.js:160:53012)&#xD;&#xA;    at index.a53e7976.js:254:13061&#xD;&#xA;    at il (react.ec1551b3.js:32:24312)&#xD;&#xA;    at Gn (react.ec1551b3.js:32:42382)&#xD;&#xA;    at id (react.ec1551b3.js:32:41193)&#xD;&#xA;    at gn (react.ec1551b3.js:32:40232)&#xD;&#xA;    at Fi (react.ec1551b3.js:32:36884)&#xD;&#xA;instantiate:1 Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received&#xD;&#xA;&#xD;&#xA;what could I be doing wrong?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="19983" PostHistoryTypeId="1" PostId="5325" RevisionGUID="b2e75d98-f5ee-4385-8fdd-8facec2a7549" CreationDate="2022-10-13T09:49:38.403" UserId="3329" Text="a blank page when deplying substrate smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="19984" PostHistoryTypeId="3" PostId="5325" RevisionGUID="b2e75d98-f5ee-4385-8fdd-8facec2a7549" CreationDate="2022-10-13T09:49:38.403" UserId="3329" Text="|polkadot|ink|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19985" PostHistoryTypeId="2" PostId="5326" RevisionGUID="95431d4f-594a-4510-9f60-938884e38128" CreationDate="2022-10-13T10:45:16.113" UserId="3121" Text="I have been having the same issue all day where the following commands return the subsequent types of telemetry errors.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;  --base-path /tmp/node01 \&#xD;&#xA;  --chain ./customSpecRaw.json \&#xD;&#xA;  --port 30333 \&#xD;&#xA;  --ws-port 9945 \&#xD;&#xA;  --rpc-port 9933 \&#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;  --validator \&#xD;&#xA;  --rpc-methods Unsafe \&#xD;&#xA;  --name MyNode01 \&#xD;&#xA;  --password-interactive&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-13 19:20:51 ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Timeout }   &#xD;&#xA;2022-10-13 19:21:16 ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Other(A(Handshake(Io(Kind(UnexpectedEof))))) }    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The only things that I changed from the node-template are the following;&#xD;&#xA;&#xD;&#xA; - `pub const EXISTENTIAL_DEPOSIT = 0`&#xD;&#xA; - limiting the `initial_authorities` and `endowed_accounts` to just Alice&#xD;&#xA; - adding local keys to add as `aura` and `grandpa` authorities&#xD;&#xA;&#xD;&#xA;It was working fine last night, and although I did play around with `ChainType::Live` since then, I am having issues regardless of any `ChainType` now. Can anyone tell me what I am doing incorrectly please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19987" PostHistoryTypeId="1" PostId="5326" RevisionGUID="95431d4f-594a-4510-9f60-938884e38128" CreationDate="2022-10-13T10:45:16.113" UserId="3121" Text="Error while dialing /dns/telemetry... error: Other(A(Handshake(Io(Kind(UnexpectedEof))))) - not just Timeout" ContentLicense="CC BY-SA 4.0" />
  <row Id="19988" PostHistoryTypeId="3" PostId="5326" RevisionGUID="95431d4f-594a-4510-9f60-938884e38128" CreationDate="2022-10-13T10:45:16.113" UserId="3121" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19989" PostHistoryTypeId="5" PostId="5326" RevisionGUID="52c6e1d4-b464-4529-854a-daa17440f768" CreationDate="2022-10-13T10:58:30.443" UserId="3121" Comment="added 38 characters in body" Text="I have been having the same issue all day where the following commands return the subsequent types of telemetry errors.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;  --base-path /tmp/node01 \&#xD;&#xA;  --chain ./customSpecRaw.json \&#xD;&#xA;  --port 30333 \&#xD;&#xA;  --ws-port 9945 \&#xD;&#xA;  --rpc-port 9933 \&#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;  --validator \&#xD;&#xA;  --rpc-methods Unsafe \&#xD;&#xA;  --name MyNode01 \&#xD;&#xA;  --password-interactive&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-13 19:20:51 ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Timeout }   &#xD;&#xA;2022-10-13 19:21:16 ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Other(A(Handshake(Io(Kind(UnexpectedEof))))) }    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The only things that I changed from the node-template are the following;&#xD;&#xA;&#xD;&#xA; - `pub const EXISTENTIAL_DEPOSIT = 0`&#xD;&#xA; - setting all initial balances to 0&#xD;&#xA; - limiting the `initial_authorities` and `endowed_accounts` to just Alice&#xD;&#xA; - adding local keys to add as `aura` and `grandpa` authorities&#xD;&#xA;&#xD;&#xA;It was working fine last night, and although I did play around with `ChainType::Live` since then, I am having issues regardless of any `ChainType` now. Can anyone tell me what I am doing incorrectly please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19990" PostHistoryTypeId="5" PostId="5326" RevisionGUID="4233a6bf-c521-4ef7-8f07-3e290d850a86" CreationDate="2022-10-13T12:37:25.607" UserId="3121" Comment="added 21 characters in body" Text="I have been having the same issue all day where the following commands return the subsequent types of telemetry errors.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;  --base-path /tmp/node01 \&#xD;&#xA;  --chain ./customSpecRaw.json \&#xD;&#xA;  --port 30333 \&#xD;&#xA;  --ws-port 9945 \&#xD;&#xA;  --rpc-port 9933 \&#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;  --validator \&#xD;&#xA;  --rpc-methods Unsafe \&#xD;&#xA;  --name MyNode01 \&#xD;&#xA;  --password-interactive&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-13 19:20:51 ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Timeout }   &#xD;&#xA;2022-10-13 19:21:16 ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Other(A(Handshake(Io(Kind(UnexpectedEof))))) }    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The only things that I changed from the node-template are the following;&#xD;&#xA;&#xD;&#xA; - `pub const EXISTENTIAL_DEPOSIT = 0`&#xD;&#xA; - setting all initial balances to 0&#xD;&#xA; - limiting the `initial_authorities` and `endowed_accounts` to just Alice&#xD;&#xA; - adding local keys to add as `aura` and `grandpa` authorities&#xD;&#xA;&#xD;&#xA;It was working fine last night, and although I did play around with `ChainType::Live` since then, I am having issues regardless of any `ChainType`. /tmp/* have been purged. Can anyone tell me what I am doing incorrectly please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19991" PostHistoryTypeId="2" PostId="5327" RevisionGUID="12ca7950-29a4-48d6-811e-fe387ec5519a" CreationDate="2022-10-13T12:39:14.970" UserId="2379" Text="If the &quot;sovereign account&quot; has some balance or vesting balance on a parachain, how to operate the sovereign address's balance?&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;para2000's sovereign account has 100Unit on para2001. &#xD;&#xA;Can para2000 transfer 1Unit to another address on para2001?&#xD;&#xA;Can para2000 send an XCM to para2001 to operate their sovereign account balance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="19993" PostHistoryTypeId="1" PostId="5327" RevisionGUID="12ca7950-29a4-48d6-811e-fe387ec5519a" CreationDate="2022-10-13T12:39:14.970" UserId="2379" Text="how to operate the sovereign address's balance" ContentLicense="CC BY-SA 4.0" />
  <row Id="19994" PostHistoryTypeId="3" PostId="5327" RevisionGUID="12ca7950-29a4-48d6-811e-fe387ec5519a" CreationDate="2022-10-13T12:39:14.970" UserId="2379" Text="|xcm|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="19995" PostHistoryTypeId="2" PostId="5328" RevisionGUID="2956113e-4aaa-486a-b4db-61fb1415a071" CreationDate="2022-10-13T14:01:06.687" UserId="251" Text="Just send an XCM message with root origin (use sudo or democracy).&#xD;&#xA;&#xD;&#xA;The root origin of your chain is the sovereign account on other parachains in XCMP. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And this is how the attacker did to stole 11700 KSMs on Mangata. &#xD;&#xA;&#xD;&#xA;Check:&#xD;&#xA;&#xD;&#xA;https://blog.mangata.finance/blog/2022-10-08-council-incident-report/&#xD;&#xA;https://mangatax.stg.subscan.io/council/0?tab=proposal" ContentLicense="CC BY-SA 4.0" />
  <row Id="19997" PostHistoryTypeId="2" PostId="5329" RevisionGUID="e332fe11-28d3-439b-be62-6e2a7b681314" CreationDate="2022-10-13T14:03:36.870" UserId="300" Text="Works: Use normal iteration in a custom RPC with a `runtime_api()` call.&#xD;&#xA;Goal: Use rayon parallel iteration instead.&#xD;&#xA;Result: Panic&#xD;&#xA;&#xD;&#xA;Working code Simplified [Real Code in GitHub][1]&#xD;&#xA;```&#xD;&#xA;let api = self.client.runtime_api();&#xD;&#xA;let at = BlockId::hash(self.client.info().best_hash);&#xD;&#xA;&#xD;&#xA;let provider = Provider(provider_msa_id);&#xD;&#xA;&#xD;&#xA;Ok(delegator_msa_ids&#xD;&#xA;	.iter()&#xD;&#xA;	.map(|&amp;id| {&#xD;&#xA;	    let delegator = Delegator(id);&#xD;&#xA;		let has_delegation =&#xD;&#xA;		    api.has_delegation(&amp;at, delegator, provider, block_number).unwrap();&#xD;&#xA;		(id, has_delegation)&#xD;&#xA;	}).collect())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to swap out `.iter` with `par_iter` from https://github.com/rayon-rs/rayon&#xD;&#xA;&#xD;&#xA;It works if I only pass 1 `delegator_msa_ids` into the request.&#xD;&#xA;&#xD;&#xA;If I do more, I get this panic:&#xD;&#xA;```&#xD;&#xA;   0: backtrace::capture::Backtrace::new&#xD;&#xA;   1: sp_panic_handler::set::{{closure}}&#xD;&#xA;   2: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/848090dcd18553b790461132ca9d2a020aeea9a2/library/std/src/panicking.rs:702:17&#xD;&#xA;   3: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/848090dcd18553b790461132ca9d2a020aeea9a2/library/std/src/panicking.rs:588:13&#xD;&#xA;   4: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/848090dcd18553b790461132ca9d2a020aeea9a2/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   5: rust_begin_unwind&#xD;&#xA;             at /rustc/848090dcd18553b790461132ca9d2a020aeea9a2/library/std/src/panicking.rs:584:5&#xD;&#xA;   6: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/848090dcd18553b790461132ca9d2a020aeea9a2/library/core/src/panicking.rs:142:14&#xD;&#xA;   7: core::result::unwrap_failed&#xD;&#xA;             at /rustc/848090dcd18553b790461132ca9d2a020aeea9a2/library/core/src/result.rs:1814:5&#xD;&#xA;   8: &lt;frequency_rococo_runtime::RuntimeApiImpl&lt;__SR_API_BLOCK__,RuntimeApiImplCall&gt; as sp_api::Core&lt;__SR_API_BLOCK__&gt;&gt;::__runtime_api_internal_call_api_at&#xD;&#xA;   9: pallet_msa_runtime_api::MsaApi::has_delegation&#xD;&#xA;  10: core::ops::function::impls::&lt;impl core::ops::function::FnMut&lt;A&gt; for &amp;F&gt;::call_mut&#xD;&#xA;  11: rayon::iter::plumbing::bridge_producer_consumer::helper&#xD;&#xA;  12: &lt;rayon_core::job::StackJob&lt;L,F,R&gt; as rayon_core::job::Job&gt;::execute&#xD;&#xA;  13: rayon_core::registry::WorkerThread::wait_until_cold&#xD;&#xA;  14: rayon_core::registry::ThreadBuilder::run&#xD;&#xA;  15: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  16: core::ops::function::FnOnce::call_once{{vtable.shim}}&#xD;&#xA;  17: &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/848090dcd18553b790461132ca9d2a020aeea9a2/library/alloc/src/boxed.rs:1935:9&#xD;&#xA;      &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/848090dcd18553b790461132ca9d2a020aeea9a2/library/alloc/src/boxed.rs:1935:9&#xD;&#xA;      std::sys::unix::thread::Thread::new::thread_start&#xD;&#xA;             at /rustc/848090dcd18553b790461132ca9d2a020aeea9a2/library/std/src/sys/unix/thread.rs:108:17&#xD;&#xA;  18: __pthread_deallocate&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread '&lt;unnamed&gt;' panicked at 'already borrowed: BorrowMutError', /Users/wilwade/dev/mrc/runtime/frequency-rococo/src/lib.rs:713&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `lib.rs:713` is just the macro `impl_runtime_apis!` around the runtime api impl which does no mutation.&#xD;&#xA;- [Impl Link][2]&#xD;&#xA;- [Pallet Logic Link][3]&#xD;&#xA;&#xD;&#xA;Current theories:&#xD;&#xA; 1. The [`runtime_api`][4] CAN do a mutation, and so something there is causing the borrow issue&#xD;&#xA; 2. I am accessing state wrong in the pallet logic and that is providing a mutation lock when it shouldn't&#xD;&#xA; 3. Bug in substrate?&#xD;&#xA;&#xD;&#xA;Current Fix Ideas:&#xD;&#xA; - See current theories&#xD;&#xA; - A different way entirely to access the runtime state that is clear that I am not, and cannot mutate state.&#xD;&#xA; - A different type that makes it clear I am not mutating.&#xD;&#xA; - Create a new runtime_api inside of the `par_iter` (This works, but it warns that it runs out of wasm instances and also feels like a waste)&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/LibertyDSNP/frequency/blob/be72f52d8fb2d84451ba5bf55224f6c07ca3b2c5/pallets/msa/src/rpc/src/lib.rs#L68-L88&#xD;&#xA;  [2]: https://github.com/LibertyDSNP/frequency/blob/be72f52d8fb2d84451ba5bf55224f6c07ca3b2c5/runtime/frequency-rococo/src/lib.rs#L870-L875&#xD;&#xA;  [3]: https://github.com/LibertyDSNP/frequency/blob/a4a76756e5e4532c20bb17da45c76d9bde8f4697/pallets/msa/src/lib.rs#L712-L742&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sp_api/trait.ProvideRuntimeApi.html#tymethod.runtime_api" ContentLicense="CC BY-SA 4.0" />
  <row Id="19999" PostHistoryTypeId="1" PostId="5329" RevisionGUID="e332fe11-28d3-439b-be62-6e2a7b681314" CreationDate="2022-10-13T14:03:36.870" UserId="300" Text="Panic when Using Rayon with runtime_api in a custom RPC" ContentLicense="CC BY-SA 4.0" />
  <row Id="20000" PostHistoryTypeId="3" PostId="5329" RevisionGUID="e332fe11-28d3-439b-be62-6e2a7b681314" CreationDate="2022-10-13T14:03:36.870" UserId="300" Text="|custom-rpc|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20001" PostHistoryTypeId="2" PostId="5330" RevisionGUID="dbc35615-f434-4b83-8191-afd42ed91dcb" CreationDate="2022-10-13T14:23:50.047" UserId="3332" Text="we are trying to integrate polkadot support for our exchange. Currently we want to monitor the blockchain and see if any of our address receive deposits, I am currently doing this by checking the extrinsics and see if the method transfer or transfer_keep_alive is called and see the destination of the transfer is equal to our address. Is this enough of do i need to check the events as well not quite sure" ContentLicense="CC BY-SA 4.0" />
  <row Id="20003" PostHistoryTypeId="1" PostId="5330" RevisionGUID="dbc35615-f434-4b83-8191-afd42ed91dcb" CreationDate="2022-10-13T14:23:50.047" UserId="3332" Text="Monitoring transfers and keep transfer alive" ContentLicense="CC BY-SA 4.0" />
  <row Id="20004" PostHistoryTypeId="3" PostId="5330" RevisionGUID="dbc35615-f434-4b83-8191-afd42ed91dcb" CreationDate="2022-10-13T14:23:50.047" UserId="3332" Text="|transactions|polkdadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20005" PostHistoryTypeId="2" PostId="5331" RevisionGUID="aad81457-8373-4e4e-8c84-d0efd6be1391" CreationDate="2022-10-13T14:32:45.640" UserId="251" Text="I think this should depend on what you want to support for the target chain.&#xD;&#xA;&#xD;&#xA;If you want to support XCM, then you should also check that pallet's logic.&#xD;&#xA;&#xD;&#xA;For the `pallet-balances`, I think `transfer`, `transfer_keep_alive` and `transfer_all` is enough." ContentLicense="CC BY-SA 4.0" />
  <row Id="20007" PostHistoryTypeId="2" PostId="5332" RevisionGUID="4c3c1afb-44ef-41bc-89ec-89837659fad3" CreationDate="2022-10-13T14:35:17.427" UserId="2089" Text="Is there any API to calculate each block? How much size does it occupy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20009" PostHistoryTypeId="1" PostId="5332" RevisionGUID="4c3c1afb-44ef-41bc-89ec-89837659fad3" CreationDate="2022-10-13T14:35:17.427" UserId="2089" Text="How to calculate block memory size(MB,GB...) for each transaction block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20010" PostHistoryTypeId="3" PostId="5332" RevisionGUID="4c3c1afb-44ef-41bc-89ec-89837659fad3" CreationDate="2022-10-13T14:35:17.427" UserId="2089" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20013" PostHistoryTypeId="5" PostId="5331" RevisionGUID="5ebf3e22-71a7-4d74-b0a3-f20c872beb05" CreationDate="2022-10-13T14:37:51.130" UserId="251" Comment="added 1 character in body" Text="I think this should depend on what you want to support for the target chain.&#xD;&#xA;&#xD;&#xA;If you want to support XCM, then you should also check those pallets' logic.&#xD;&#xA;&#xD;&#xA;For the `pallet-balances`, I think `transfer`, `transfer_keep_alive` and `transfer_all` are enough." ContentLicense="CC BY-SA 4.0" />
  <row Id="20014" PostHistoryTypeId="5" PostId="5331" RevisionGUID="50b5a83d-6063-4d15-abd3-fbb4f9a08e0a" CreationDate="2022-10-13T14:58:58.207" UserId="251" Comment="added 52 characters in body" Text="I think this should depend on what you want to support for the target chain. (allow the users to deposit tokens to your exchange in what way)&#xD;&#xA;&#xD;&#xA;If you want to support XCM, then you should also check those pallets' logic.&#xD;&#xA;&#xD;&#xA;For the `pallet-balances`, I think `transfer`, `transfer_keep_alive` and `transfer_all` are enough." ContentLicense="CC BY-SA 4.0" />
  <row Id="20016" PostHistoryTypeId="2" PostId="5334" RevisionGUID="71dbef87-ff4d-48d1-b6ef-38e8c6233a72" CreationDate="2022-10-13T15:44:57.377" UserId="94" Text="&gt; I am currently doing this by checking the extrinsics and see if the method transfer or transfer_keep_alive is called and see the destination of the transfer is equal to our address&#xD;&#xA;&#xD;&#xA;Calling methods does not guarantee success. It is best to ALWAYS listen for events. In many cases an Event can also be emitted from an Extrinsic where you would not expect it. This applies to many other blockchains as well. In the case of Substrate you probably also only want Finalized Events.  &#xD;&#xA;&#xD;&#xA;There are indexing services which conveniently ingress the events and make them queryable et. al in case you need to quickly bootstrap your backend." ContentLicense="CC BY-SA 4.0" />
  <row Id="20018" PostHistoryTypeId="2" PostId="5335" RevisionGUID="95e6f7c8-11fd-4015-9f89-9f5a56e24f30" CreationDate="2022-10-13T16:09:46.753" UserId="94" Text="Specifically about the Polkadot Fellowship, which makes up a large part of it, you can take a look at the manifesto: https://github.com/polkadot-fellows/manifesto/blob/main/manifesto.pdf  &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20020" PostHistoryTypeId="52" PostId="5320" RevisionGUID="7fe4e754-d012-4bfe-9a43-f308b636025c" CreationDate="2022-10-13T16:24:09.970" />
  <row Id="20021" PostHistoryTypeId="2" PostId="5336" RevisionGUID="f2d4f3fc-6959-415d-9c0a-bae5acad9c77" CreationDate="2022-10-13T17:35:21.797" UserId="3331" Text="I'm using the [Parity Tech Github][1] as source for the Relay, with some simple modifications in the `node\service\src\chain_spec.rs` and `cli\src\command.rs` to build a personalized chain specification file. &#xD;&#xA;&#xD;&#xA;So, I can input my seed(s) and it writes the keys and session keys in the `ChainSpec.json` file. After generating and transforming it to the raw format, I use the raw chain spec to add the keys into the node's keystore.&#xD;&#xA;&#xD;&#xA;I'm using those 3 key types: gran, babe and imon.&#xD;&#xA;&#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 3-raw.json --scheme ed25519 --suri &quot;&lt;key&gt;&quot; --key-type gran    &#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 3-raw.json --scheme sr25519 --suri &quot;&lt;key&gt;&quot; --key-type babe&#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 3-raw.json --scheme sr25519 --suri &quot;&lt;key&gt;&quot; --key-type imon&#xD;&#xA;&#xD;&#xA;Everything on the Relay runs without any problems. The issue appears when I deploy a Parachain.&#xD;&#xA;The Parachain Node is discovered, and can be seen as a FULL node on the Network&gt;Node Info.&#xD;&#xA;&#xD;&#xA;So, what I need to do? I have to add session keys for the parachain as well? If so, where?&#xD;&#xA;What I'm missing here? Why it tries over and over to start collating but nothing happens?&#xD;&#xA;&#xD;&#xA;[Output Log from the Parachain][2]&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;Some additional info:&#xD;&#xA;&#xD;&#xA;Error that appears when I try to do a Runtime call to generate session keys on the parachain ws.&#xD;&#xA;```&#xD;&#xA; 0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:702:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14&#xD;&#xA;   6: core::panicking::panic_display&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:72:5&#xD;&#xA;   7: core::panicking::panic_str&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:56:5&#xD;&#xA;   8: core::option::expect_failed&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/option.rs:1874:5&#xD;&#xA;   9: &lt;&amp;mut dyn sp_externalities::Externalities as sp_io::crypto::Crypto&gt;::sr25519_generate_version_1&#xD;&#xA;  10: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  11: tracing::span::Span::in_scope&#xD;&#xA;  12: sp_io::crypto::sr25519_generate_version_1&#xD;&#xA;  13: sp_io::crypto::ExtCryptoSr25519GenerateVersion1::call&#xD;&#xA;  14: &lt;sc_executor_wasmtime::imports::Registry as sp_wasm_interface::HostFunctionRegistry&gt;::with_function_context&#xD;&#xA;  15: &lt;core::panic::unwind_safe::AssertUnwindSafe&lt;F&gt; as core::ops::function::FnOnce&lt;()&gt;&gt;::call_once&#xD;&#xA;  16: &lt;F as wasmtime::func::IntoFunc&lt;T,(wasmtime::func::Caller&lt;T&gt;,A1,A2),R&gt;&gt;::into_func::wasm_to_host_shim&#xD;&#xA;  17: &lt;unknown&gt;&#xD;&#xA;  18: &lt;unknown&gt;&#xD;&#xA;  19: wasmtime_runtime::traphandlers::catch_traps::call_closure&#xD;&#xA;  20: wasmtime_setjmp&#xD;&#xA;  21: wasmtime_runtime::traphandlers::catch_traps&#xD;&#xA;  22: wasmtime::func::invoke_wasm_and_catch_traps&#xD;&#xA;  23: sc_executor_wasmtime::instance_wrapper::EntryPoint::call&#xD;&#xA;  24: sc_executor_wasmtime::runtime::perform_call&#xD;&#xA;  25: &lt;sc_executor_wasmtime::runtime::WasmtimeInstance as sc_executor_common::wasm_runtime::WasmInstance&gt;::call&#xD;&#xA;  26: sc_executor_common::wasm_runtime::WasmInstance::call_export&#xD;&#xA;  27: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  28: sc_executor::native_executor::WasmExecutor&lt;H&gt;::with_instance::{{closure}}&#xD;&#xA;  29: sc_executor::wasm_runtime::RuntimeCache::with_instance&#xD;&#xA;  30: &lt;sc_executor::native_executor::NativeElseWasmExecutor&lt;D&gt; as sp_core::traits::CodeExecutor&gt;::call&#xD;&#xA;  31: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_aux&#xD;&#xA;  32: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_using_consensus_failure_handler&#xD;&#xA;  33: &lt;sc_service::client::call_executor::LocalCallExecutor&lt;Block,B,E&gt; as sc_client_api::call_executor::CallExecutor&lt;Block&gt;&gt;::call&#xD;&#xA;  34: &lt;sc_rpc::state::state_full::FullState&lt;BE,Block,Client&gt; as sc_rpc::state::StateBackend&lt;Block,Client&gt;&gt;::call&#xD;&#xA;  35: &lt;tokio::runtime::blocking::task::BlockingTask&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  36: tokio::runtime::task::core::CoreStage&lt;T&gt;::poll&#xD;&#xA;  37: tokio::runtime::task::harness::Harness&lt;T,S&gt;::poll&#xD;&#xA;  38: tokio::runtime::blocking::pool::Inner::run&#xD;&#xA;  39: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  40: core::ops::function::FnOnce::call_once{{vtable.shim}}&#xD;&#xA;  41: &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9&#xD;&#xA;      &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9&#xD;&#xA;      std::sys::unix::thread::Thread::new::thread_start&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys/unix/thread.rs:108:17&#xD;&#xA;  42: start_thread&#xD;&#xA;  43: clone&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'No keystore associated for the current context!', /home/amrm/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:846&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks for any hint or help in advance! x)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot&#xD;&#xA;  [2]: https://i.stack.imgur.com/EDTrU.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="20023" PostHistoryTypeId="1" PostId="5336" RevisionGUID="f2d4f3fc-6959-415d-9c0a-bae5acad9c77" CreationDate="2022-10-13T17:35:21.797" UserId="3331" Text="Parachain keeps trying to start collation over and over again, without success. But no Error or Panic occurred" ContentLicense="CC BY-SA 4.0" />
  <row Id="20024" PostHistoryTypeId="3" PostId="5336" RevisionGUID="f2d4f3fc-6959-415d-9c0a-bae5acad9c77" CreationDate="2022-10-13T17:35:21.797" UserId="3331" Text="|substrate-node|parachain|relay-chain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20025" PostHistoryTypeId="5" PostId="5336" RevisionGUID="76468c70-4011-4284-bd5c-27684d35e960" CreationDate="2022-10-13T17:36:43.723" UserId="3331" Comment="added 2024 characters in body" Text="I'm using the [Parity Tech Github][1] as source for the Relay, with some simple modifications in the `node\service\src\chain_spec.rs` and `cli\src\command.rs` to build a personalized chain specification file. &#xD;&#xA;&#xD;&#xA;So, I can input my seed(s) and it writes the keys and session keys in the `ChainSpec.json` file. After generating and transforming it to the raw format, I use the raw chain spec to add the keys into the node's keystore.&#xD;&#xA;&#xD;&#xA;I'm using those 3 key types: gran, babe and imon.&#xD;&#xA;&#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 3-raw.json --scheme ed25519 --suri &quot;&lt;key&gt;&quot; --key-type gran    &#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 3-raw.json --scheme sr25519 --suri &quot;&lt;key&gt;&quot; --key-type babe&#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 3-raw.json --scheme sr25519 --suri &quot;&lt;key&gt;&quot; --key-type imon&#xD;&#xA;&#xD;&#xA;Everything on the Relay runs without any problems. The issue appears when I deploy a Parachain.&#xD;&#xA;The Parachain Node is discovered, and can be seen as a FULL node on the Network&gt;Node Info.&#xD;&#xA;&#xD;&#xA;So, what I need to do? I have to add session keys for the parachain as well? If so, where?&#xD;&#xA;What I'm missing here? Why it tries over and over to start collating but nothing happens?&#xD;&#xA;&#xD;&#xA;[Output Log from the Parachain][2]&#xD;&#xA;```&#xD;&#xA;2022-10-13 14:35:12.039  INFO tokio-runtime-worker substrate: ✨ Imported #655 (0x7f2c…0759)&#xD;&#xA;2022-10-13 14:35:12.043  INFO tokio-runtime-worker cumulus-collator: Starting collation. relay_parent=0x88da0da170e12fe60447128581d6507e3faf82cdb355e3ea1d8cd7f22dc2d26e at=0x448337c11caa11ea07e126518e2c439e65b53e0ce223cf40ca040aa8d81a4800&#xD;&#xA;2022-10-13 14:35:12.045  INFO tokio-runtime-worker cumulus-collator: Starting collation. relay_parent=0x7f2ccf7c492abf73210caf96e1d280d4cfdce2ff310e7ad05f1bb12515500759 at=0x448337c11caa11ea07e126518e2c439e65b53e0ce223cf40ca040aa8d81a4800&#xD;&#xA;2022-10-13 14:35:12.989  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #0 (0x4483…4800), finalized #0 (0x4483…4800), ⬇ 0 ⬆ 0&#xD;&#xA;2022-10-13 14:35:13.112  INFO tokio-runtime-worker substrate:  Idle (2 peers), best: #655 (0x88da…d26e), finalized #652 (0xe496…e47e), ⬇ 1.2kiB/s ⬆ 0.5kiB/s&#xD;&#xA;2022-10-13 14:35:17.989  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #0 (0x4483…4800), finalized #0 (0x4483…4800), ⬇ 0 ⬆ 0&#xD;&#xA;2022-10-13 14:35:18.015 DEBUG tokio-runtime-worker runtime::inclusion-inherent: [enter_inner] parent_header=0x88da0da170e12fe60447128581d6507e3faf82cdb355e3ea1d8cd7f22dc2d26e bitfields.len(): 0, backed_candidates.len(): 0, disputes.len(): 0&#xD;&#xA;2022-10-13 14:35:18.016 TRACE tokio-runtime-worker runtime: Batch-verification: 0 pending tasks, 0 sr25519 signatures&#xD;&#xA;2022-10-13 14:35:18.016 TRACE tokio-runtime-worker runtime: Finalization of batch verification took 0 ms&#xD;&#xA;2022-10-13 14:35:18.016 DEBUG tokio-runtime-worker runtime::system: [656] length: 344 (normal 0%, op: 0%, mandatory 0%) / normal weight: 0 (0%) / op weight 0 (0%) / mandatory weight 6038475000 (0%)&#xD;&#xA;2022-10-13 14:35:18.018  INFO tokio-runtime-worker substrate: ✨ Imported #656 (0x3c1d…70da)&#xD;&#xA;2022-10-13 14:35:18.021  INFO tokio-runtime-worker cumulus-collator: Starting collation. relay_parent=0x3c1d92f510cfb8ef59bd9eaf47734109f3cba6ce51981e749cdd40de9fc670da at=0x448337c11caa11ea07e126518e2c439e65b53e0ce223cf40ca040aa8d81a4800&#xD;&#xA;```&#xD;&#xA;----------&#xD;&#xA;Some additional info:&#xD;&#xA;&#xD;&#xA;Error that appears when I try to do a Runtime call to generate session keys on the parachain ws.&#xD;&#xA;```&#xD;&#xA; 0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:702:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14&#xD;&#xA;   6: core::panicking::panic_display&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:72:5&#xD;&#xA;   7: core::panicking::panic_str&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:56:5&#xD;&#xA;   8: core::option::expect_failed&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/option.rs:1874:5&#xD;&#xA;   9: &lt;&amp;mut dyn sp_externalities::Externalities as sp_io::crypto::Crypto&gt;::sr25519_generate_version_1&#xD;&#xA;  10: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  11: tracing::span::Span::in_scope&#xD;&#xA;  12: sp_io::crypto::sr25519_generate_version_1&#xD;&#xA;  13: sp_io::crypto::ExtCryptoSr25519GenerateVersion1::call&#xD;&#xA;  14: &lt;sc_executor_wasmtime::imports::Registry as sp_wasm_interface::HostFunctionRegistry&gt;::with_function_context&#xD;&#xA;  15: &lt;core::panic::unwind_safe::AssertUnwindSafe&lt;F&gt; as core::ops::function::FnOnce&lt;()&gt;&gt;::call_once&#xD;&#xA;  16: &lt;F as wasmtime::func::IntoFunc&lt;T,(wasmtime::func::Caller&lt;T&gt;,A1,A2),R&gt;&gt;::into_func::wasm_to_host_shim&#xD;&#xA;  17: &lt;unknown&gt;&#xD;&#xA;  18: &lt;unknown&gt;&#xD;&#xA;  19: wasmtime_runtime::traphandlers::catch_traps::call_closure&#xD;&#xA;  20: wasmtime_setjmp&#xD;&#xA;  21: wasmtime_runtime::traphandlers::catch_traps&#xD;&#xA;  22: wasmtime::func::invoke_wasm_and_catch_traps&#xD;&#xA;  23: sc_executor_wasmtime::instance_wrapper::EntryPoint::call&#xD;&#xA;  24: sc_executor_wasmtime::runtime::perform_call&#xD;&#xA;  25: &lt;sc_executor_wasmtime::runtime::WasmtimeInstance as sc_executor_common::wasm_runtime::WasmInstance&gt;::call&#xD;&#xA;  26: sc_executor_common::wasm_runtime::WasmInstance::call_export&#xD;&#xA;  27: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  28: sc_executor::native_executor::WasmExecutor&lt;H&gt;::with_instance::{{closure}}&#xD;&#xA;  29: sc_executor::wasm_runtime::RuntimeCache::with_instance&#xD;&#xA;  30: &lt;sc_executor::native_executor::NativeElseWasmExecutor&lt;D&gt; as sp_core::traits::CodeExecutor&gt;::call&#xD;&#xA;  31: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_aux&#xD;&#xA;  32: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_using_consensus_failure_handler&#xD;&#xA;  33: &lt;sc_service::client::call_executor::LocalCallExecutor&lt;Block,B,E&gt; as sc_client_api::call_executor::CallExecutor&lt;Block&gt;&gt;::call&#xD;&#xA;  34: &lt;sc_rpc::state::state_full::FullState&lt;BE,Block,Client&gt; as sc_rpc::state::StateBackend&lt;Block,Client&gt;&gt;::call&#xD;&#xA;  35: &lt;tokio::runtime::blocking::task::BlockingTask&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  36: tokio::runtime::task::core::CoreStage&lt;T&gt;::poll&#xD;&#xA;  37: tokio::runtime::task::harness::Harness&lt;T,S&gt;::poll&#xD;&#xA;  38: tokio::runtime::blocking::pool::Inner::run&#xD;&#xA;  39: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  40: core::ops::function::FnOnce::call_once{{vtable.shim}}&#xD;&#xA;  41: &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9&#xD;&#xA;      &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9&#xD;&#xA;      std::sys::unix::thread::Thread::new::thread_start&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys/unix/thread.rs:108:17&#xD;&#xA;  42: start_thread&#xD;&#xA;  43: clone&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'No keystore associated for the current context!', /home/amrm/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:846&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks for any hint or help in advance! x)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot&#xD;&#xA;  [2]: https://i.stack.imgur.com/EDTrU.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="20032" PostHistoryTypeId="2" PostId="5338" RevisionGUID="269b3ce7-0a15-44fa-b265-8609d70ba1ed" CreationDate="2022-10-13T21:10:09.377" UserId="73" Text="You should use the `SessionManager`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;struct SessionManager&lt;I&gt;(sp_std::marker::PhantomData&lt;I&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;I: pallet_session::SessionManager&lt;ValidatorId&gt;, ValidatorId&gt; pallet_session::SessionManager&lt;ValidatorId&gt; for SessionManager&lt;I&gt; {&#xD;&#xA;    fn new_session(new_index: SessionIndex) -&gt; Option&lt;Vec&lt;ValidatorId&gt;&gt; {&#xD;&#xA;        let new_session = I::new_session(new_index);&#xD;&#xA;&#xD;&#xA;        if let Some(validators) = &amp;new_session {&#xD;&#xA;            // Note the validators&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        new_session&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;	fn new_session_genesis(new_index: SessionIndex) -&gt; Option&lt;Vec&lt;ValidatorId&gt;&gt; {&#xD;&#xA;		I::new_session_genesis(new_index)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn end_session(end_index: SessionIndex) { I::end_session(end_index); }&#xD;&#xA;	fn start_session(start_index: SessionIndex) { I::start_session(start_index); }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you use this custom `SessionManager` and pass the original session manager `I`." ContentLicense="CC BY-SA 4.0" />
  <row Id="20034" PostHistoryTypeId="2" PostId="5339" RevisionGUID="b59a790e-a9a1-4844-9512-d0ac3d244fa6" CreationDate="2022-10-13T22:54:21.730" UserId="3239" Text="I'm using NodeTemplate to build my blockchain and it seems that NetworkWorker is too low level kind of thing. Particularly I need a way to manage connected peers (list, disconnect)." ContentLicense="CC BY-SA 4.0" />
  <row Id="20036" PostHistoryTypeId="1" PostId="5339" RevisionGUID="b59a790e-a9a1-4844-9512-d0ac3d244fa6" CreationDate="2022-10-13T22:54:21.730" UserId="3239" Text="How to use NetworkWorker methods from a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20037" PostHistoryTypeId="3" PostId="5339" RevisionGUID="b59a790e-a9a1-4844-9512-d0ac3d244fa6" CreationDate="2022-10-13T22:54:21.730" UserId="3239" Text="|substrate-node-template|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20038" PostHistoryTypeId="50" PostId="4677" RevisionGUID="6cb1f883-3836-495a-8f63-031a49864a1e" CreationDate="2022-10-14T02:03:10.420" UserId="-1" />
  <row Id="20039" PostHistoryTypeId="2" PostId="5340" RevisionGUID="1c954159-43c4-4071-8e82-1d5ed6b13264" CreationDate="2022-10-14T02:08:45.870" UserId="2844" Text="I use `cargo +nightly-2022-08-15 test` rather `cargo +nightly test` to test and `cargo +nightly-2022-08-15 contract build` to build rather `cargo +nightly contract build` today and it works for me. My `cargo contract version cargo-contract 1.5.0-unknown-x86_64-apple-darwin` and `rustc 1.66.0-nightly (c0983a9aa 2022-10-12))`" ContentLicense="CC BY-SA 4.0" />
  <row Id="20042" PostHistoryTypeId="2" PostId="5341" RevisionGUID="e9136d48-182f-4ba2-b9a9-c9b2a365ec1a" CreationDate="2022-10-14T09:06:51.437" UserId="3252" Text="I send a staking bond_extra tranaction and max_additional is 2000000000000,&#xD;&#xA;send status is successful, but the value is 0, like:https://westend.subscan.io/extrinsic/0x804f40765b09361f0ce8380a2dc6a70c3e2a22cefa7da2c07742103c48322de8" ContentLicense="CC BY-SA 4.0" />
  <row Id="20044" PostHistoryTypeId="1" PostId="5341" RevisionGUID="e9136d48-182f-4ba2-b9a9-c9b2a365ec1a" CreationDate="2022-10-14T09:06:51.437" UserId="3252" Text="Why staking bond_extra tranaction is successful, but the value is 0,?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20045" PostHistoryTypeId="3" PostId="5341" RevisionGUID="e9136d48-182f-4ba2-b9a9-c9b2a365ec1a" CreationDate="2022-10-14T09:06:51.437" UserId="3252" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20046" PostHistoryTypeId="2" PostId="5342" RevisionGUID="60c9de98-a6c6-4d70-bd3b-6b1aa439812b" CreationDate="2022-10-14T09:17:43.647" UserId="3281" Text="You can use the following configuration&#xD;&#xA;&#xD;&#xA;    cargo-contract v2.0.0-alpha.4 (https://github.com/paritytech/cargo-contract#6626f56f):&#xD;&#xA;    cargo-contract&#xD;&#xA;    cargo 1.64.0 (387270bc7 2022-09-16)&#xD;&#xA;and use ink! version 4  https://crates.io/crates/ink/4.0.0-alpha.3" ContentLicense="CC BY-SA 4.0" />
  <row Id="20052" PostHistoryTypeId="2" PostId="5344" RevisionGUID="8c39912b-3be1-4192-9f02-3fc42c31029c" CreationDate="2022-10-14T10:12:27.657" UserId="354" Text="I want to know is it possible to convert solochain to a relaychain so that parachain can connect with the chain but I was not able to see any tutorial, i came across [this][1] tutorial which converts a solochian to a parachain which will connect to a relaychain, is there a similar type of document that describes how to convert solochain to a relaychain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="20054" PostHistoryTypeId="1" PostId="5344" RevisionGUID="8c39912b-3be1-4192-9f02-3fc42c31029c" CreationDate="2022-10-14T10:12:27.657" UserId="354" Text="Can we convert a solochain to a relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20055" PostHistoryTypeId="3" PostId="5344" RevisionGUID="8c39912b-3be1-4192-9f02-3fc42c31029c" CreationDate="2022-10-14T10:12:27.657" UserId="354" Text="|substrate-node|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20057" PostHistoryTypeId="2" PostId="5345" RevisionGUID="94448ec4-aac5-4ee1-8ab8-87f4fd0ad171" CreationDate="2022-10-14T10:58:08.600" UserId="2149" Text="I have a chain with 4 validators. When I chilled 1 old validator and added 1 new, the chain has stopped finalization.&#xD;&#xA;Nodes show the following error:&#xD;&#xA;```&#xD;&#xA;Oct 14 09:48:42 node4 polkadot[24877]: 2022-10-14 09:48:42  ✨ Imported #7735136 (0x81cc…c93f)&#xD;&#xA;Oct 14 09:58:48 node4 polkadot[24877]: 2022-10-14 09:58:48   Starting consensus session on top of parent 0x81cca4dbb445e52a2cd6c329f4fc7c35ebf9cbdca0ab6dd1aee252da8089c93f&#xD;&#xA;Oct 14 09:58:48 node4 polkadot[24877]: 2022-10-14 09:58:48  could not get provisioner inherent data; injecting default data err=ClosedChannelAwaitingInherentData&#xD;&#xA;Oct 14 09:58:48 node4 polkadot[24877]: 2022-10-14 09:58:48   Prepared block for proposing at 7735137 [hash: 0x06a7cdf092dcb5ba8cf7cbdc3c94dce94f3f83fc75110d2e43005edbfb4455b4; parent_hash: 0x81cc…c93f; extrinsics (1): [0x3d39…5756]]&#xD;&#xA;```&#xD;&#xA;How to fix it?&#xD;&#xA;&#xD;&#xA;The chain:&#xD;&#xA;http://ws.slonigiraf.org/#/explorer&#xD;&#xA;Telemetry:&#xD;&#xA;https://telemetry.polkadot.io/#list/0x596245dfe0d724c621946ae8b63c3ab850d3bc0f867592857092dc062f49e3e4" ContentLicense="CC BY-SA 4.0" />
  <row Id="20059" PostHistoryTypeId="1" PostId="5345" RevisionGUID="94448ec4-aac5-4ee1-8ab8-87f4fd0ad171" CreationDate="2022-10-14T10:58:08.600" UserId="2149" Text="could not get provisioner inherent data; injecting default data err=ClosedChannelAwaitingInherentData" ContentLicense="CC BY-SA 4.0" />
  <row Id="20060" PostHistoryTypeId="3" PostId="5345" RevisionGUID="94448ec4-aac5-4ee1-8ab8-87f4fd0ad171" CreationDate="2022-10-14T10:58:08.600" UserId="2149" Text="|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20061" PostHistoryTypeId="2" PostId="5346" RevisionGUID="f9f600fb-ab75-47c7-abb3-7cd0b9f3c73f" CreationDate="2022-10-14T11:29:13.130" UserId="3127" Text="In the tutorial you posted the term `solochain` refers actually to a regular node based off the node template, and the guide allows you to &quot;convert&quot; it to an actual parachain by adding Cumulus to the node's codebase, so it can communicate with the relay chain. If you want to run a relay chain, you need to use the [Polkadot node][1]. This repo has the details how to run a two node relay chain, for example. To this relay chain you can connect your parachain, which you can create from your `solochain`. Hope this provides a bit more clarity. You can read more about [Polkadot architecture][2] here. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-architecture" ContentLicense="CC BY-SA 4.0" />
  <row Id="20065" PostHistoryTypeId="2" PostId="5347" RevisionGUID="5ee84e60-ef4d-4fd0-b6c4-f01108ef6a05" CreationDate="2022-10-14T12:09:46.140" UserId="94" Text="You called `bond_extra` with `0`, as evident from the call data:&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    name: &quot;max_additional&quot;,&#xD;&#xA;    type: &quot;compact&lt;U128&gt;&quot;,&#xD;&#xA;    type_name: &quot;BalanceOf&quot;,&#xD;&#xA;    value: &quot;0&quot;&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Obviously nothing will happen. You then afterwards called it with [non zero](https://westend.subscan.io/extrinsic/12886574-2):  &#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    name: &quot;max_additional&quot;,&#xD;&#xA;    type: &quot;compact&lt;U128&gt;&quot;,&#xD;&#xA;    type_name: &quot;BalanceOf&quot;,&#xD;&#xA;    value: &quot;100000000000&quot;&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;So this should be solved?!" ContentLicense="CC BY-SA 4.0" />
  <row Id="20067" PostHistoryTypeId="2" PostId="5348" RevisionGUID="6a6bb5de-a4b8-4a13-b114-727c07e19b54" CreationDate="2022-10-14T12:25:33.603" UserId="94" Text="You can load the block and then print the encoded size with PolkadotJS like such:  &#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const wsProvider = new WsProvider('wss://kusama-rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;// Load the last block&#xD;&#xA;const lastBlock = await api.rpc.chain.getBlock();&#xD;&#xA;console.log(`Block ${lastBlock.block.header.number} with ${lastBlock.block.extrinsics.length} \&#xD;&#xA;extrinsics has ${lastBlock.encodedLength} bytes`);&#xD;&#xA;```&#xD;&#xA;Prints something like `Block 14878286 with 2 extrinsics has 32567 bytes`.&#xD;&#xA;Should be easy to extend for subscribing to new blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="20069" PostHistoryTypeId="2" PostId="5349" RevisionGUID="d26e7911-6c81-497d-ab02-4d345b16363c" CreationDate="2022-10-14T13:10:02.597" UserId="298" Text="The answer from Lana shows a more practical way to start a relay chain, as she mentioned you can launch a relay chain testnet from the polkadot repo, and i would recommend launching a Rococo chain. There are substrate docs to [launch a local relay chain][1].&#xD;&#xA;&#xD;&#xA;If instead of local relay chain you want to create a Live staging testnet network, so that other validators can connect to it, then you would need to change the chain spec to &quot;Live&quot; instead of Local and then add some initial validator keys. &#xD;&#xA;&#xD;&#xA;To answer the question: &#xD;&#xA;&#xD;&#xA;&gt; is it possible to convert a solo chain (substrate node-template) to a&#xD;&#xA;&gt; relay chain?&#xD;&#xA;&#xD;&#xA;The answer is yes you can, but it is not practical to do so. You will need to add the necessary pallets and perhaps some changes in the node outside of the runtime. There is a learning adventure required in order to really understand what is going on there though. &#xD;&#xA;&#xD;&#xA;I started a community run relay chain test net called [Pop-Art][2], which is a Rococo fork. But i havent yet tried to convert a substrate node template to a relay chain, and makes its not practical there are not much docs on that workflow yet. &#xD;&#xA;&#xD;&#xA;A great step is to add a validator to an already live relay network, before creating a relay network. Follow this tutorial [how to add validators to a relay chain][3] (and here is a similar [issue][4] to gain more breadcrumb insights.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/prepare-a-local-relay-chain/&#xD;&#xA;  [2]: https://apps.decentration.org/?rpc=wss%3A%2F%2Fpopart1.jelliedowl.com#/explorer&#xD;&#xA;  [3]: https://decentration.medium.com/set-up-public-relay-validators-with-a-partner-3ef409c675c7&#xD;&#xA;[4]: https://substrate.stackexchange.com/questions/198/how-do-you-add-new-validators-for-your-blockchain-testnet/199#199" ContentLicense="CC BY-SA 4.0" />
  <row Id="20071" PostHistoryTypeId="2" PostId="5350" RevisionGUID="28f99e11-afdf-4bb7-8676-51e858f9db7c" CreationDate="2022-10-14T13:26:32.440" UserId="298" Text="In the error it says `No keystore associated for the current context!`&#xD;&#xA;&#xD;&#xA;This means that your parachain node does not have the aura key that it needs to start collating. &#xD;&#xA;&#xD;&#xA;Try adding `--alice` and `--bob` to your collator commands e.g. (./target/release/parachain-collator --collator --alice...`), which should add the keys to the keystore of your nodes automatically. &#xD;&#xA;&#xD;&#xA;But if you have added specific keys to the chain spec of your parachain node then you will need add those keys, just like you did with `key-insert` for your relay chain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="20073" PostHistoryTypeId="2" PostId="5351" RevisionGUID="e220649f-eb24-4ce0-a179-d97e0e6ac9ee" CreationDate="2022-10-14T13:49:25.227" UserId="2548" Text="I do have an old laptop and I would like to know the minimum specs for running a Substrate node.&#xD;&#xA;This node should be also a validator.&#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="20075" PostHistoryTypeId="1" PostId="5351" RevisionGUID="e220649f-eb24-4ce0-a179-d97e0e6ac9ee" CreationDate="2022-10-14T13:49:25.227" UserId="2548" Text="What are the latest minimum specs for running a Substrate node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20076" PostHistoryTypeId="3" PostId="5351" RevisionGUID="e220649f-eb24-4ce0-a179-d97e0e6ac9ee" CreationDate="2022-10-14T13:49:25.227" UserId="2548" Text="|substrate-node|rust|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20077" PostHistoryTypeId="2" PostId="5352" RevisionGUID="e30d91c1-5303-4d9f-aa94-84fc7f085293" CreationDate="2022-10-14T14:16:42.160" UserId="2163" Text="In https://forum.polkadot.network/t/security-vulnerability-executing-unauthorized-xcm-messages/553 it is explained how someone could provide some incorrect inherents to the `batch` call in the utility pallet. Timestamp is used as an example of a possible incorrect inherent. I am not sure I understand why this is only possible when the origin is `None`, wouldn't the same be possible with `Signed` origin?&#xD;&#xA;&#xD;&#xA;I would really appreciate some explanation on this." ContentLicense="CC BY-SA 4.0" />
  <row Id="20079" PostHistoryTypeId="1" PostId="5352" RevisionGUID="e30d91c1-5303-4d9f-aa94-84fc7f085293" CreationDate="2022-10-14T14:16:42.160" UserId="2163" Text="Why does restricting `None` fix incorrect inherents vulnerability in `batch`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20080" PostHistoryTypeId="3" PostId="5352" RevisionGUID="e30d91c1-5303-4d9f-aa94-84fc7f085293" CreationDate="2022-10-14T14:16:42.160" UserId="2163" Text="|learning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20081" PostHistoryTypeId="2" PostId="5353" RevisionGUID="3f87a140-aed0-4347-a283-4bb1c5034891" CreationDate="2022-10-14T14:42:24.963" UserId="2025" Text="In [the Polkadot wiki][1] I see that &quot;validators are paid proportionally to the amount of era points they have collected&quot; after every era. However there is no info about how many DOTs an era point is or what is the exact proportional relationship between the two.&#xD;&#xA;&#xD;&#xA;Moreover, digging into polkadot.js staking interface, one can see that these two variables are directly proportional (see image below). But if we go to the detail, we see that the coefficient of proportionality is not constant between eras and there is a small variance. How is this coefficient calculated? Is there an explicit formula linking era points and rewards in DOTs per validator?&#xD;&#xA;&#xD;&#xA;[![era points and rewards in DOTs for a given validator][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-validator-payout#era-points&#xD;&#xA;  [2]: https://i.stack.imgur.com/7ZbtLl.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20083" PostHistoryTypeId="1" PostId="5353" RevisionGUID="3f87a140-aed0-4347-a283-4bb1c5034891" CreationDate="2022-10-14T14:42:24.963" UserId="2025" Text="How are rewards in DOT calculated from the era points earned by validators in Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20084" PostHistoryTypeId="3" PostId="5353" RevisionGUID="3f87a140-aed0-4347-a283-4bb1c5034891" CreationDate="2022-10-14T14:42:24.963" UserId="2025" Text="|staking|era|rewards|payouts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20085" PostHistoryTypeId="2" PostId="5354" RevisionGUID="4b094b7d-4baa-4bfb-b282-9446730d2b27" CreationDate="2022-10-14T14:42:24.963" UserId="2025" Text="Indeed, the exact DOT value of each era point is not known in advance since it depends on the total number of points earned by all validators in a given era. This is designed this way so that the total payout per era depends on Polkadot's inflation model, and not on the number of payable actions (f.e., authoring a new block) executed.&#xD;&#xA;&#xD;&#xA;Concretely, if we define:&#xD;&#xA;&#xD;&#xA; - `p` as the number of points earned by the relevant validator in the era,&#xD;&#xA; - `Tp` as the total number of points earned by all validators in the era, and&#xD;&#xA; - `M` as the target total payout to all validators, and their nominators, in that era,&#xD;&#xA;&#xD;&#xA;then the rewards in DOT payed to a validator per era is given by: &#xD;&#xA;&#xD;&#xA;`R = p * M / Tp`&#xD;&#xA;&#xD;&#xA;[This article by Web3 Foundation Research](https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html) explains all the details and how to the constant `M` is calculated.&#xD;&#xA;&#xD;&#xA;From here, we can deduce that the coefficient of proportionality between era points and rewards in DOT is `M/Tp`, which depends on the total number of points earned by all validators per era, `Tp`, and this parameter is not constant." ContentLicense="CC BY-SA 4.0" />
  <row Id="20087" PostHistoryTypeId="5" PostId="5272" RevisionGUID="2a60877a-0140-410e-8547-00cf70e0eadd" CreationDate="2022-10-14T14:53:34.243" UserId="2909" Comment="Added EdX course" Text="You can start here:&#xD;&#xA;- https://polkadot.network&#xD;&#xA;&#xD;&#xA;Then delve into the Polkadot concepts:&#xD;&#xA;- https://wiki.polkadot.network/docs/getting-started&#xD;&#xA;&#xD;&#xA;Polkadot uses Substrate so it is good that you have a solid understanding of it. &#xD;&#xA;&#xD;&#xA;Familiarize yourself with all the Substrate documentation:&#xD;&#xA;- https://docs.substrate.io/fundamentals&#xD;&#xA;&#xD;&#xA;More beginner friendly resources can be found here:&#xD;&#xA; - https://substrate.stackexchange.com/questions/1074/how-do-i-become-a-substrate-developer/1082#1082&#xD;&#xA;&#xD;&#xA;Futhermore, the [Web3 Foundation has launched educational courses with EdX][1] (the same platform used by MIT, Harvard, Berkley University of California, Boston University).&#xD;&#xA;&#xD;&#xA;[1]: https://medium.com/web3foundation/polkadot-web3-educational-courses-launching-on-edx-9a67f4f6f731&#xD;&#xA;&#xD;&#xA;The courses will start on Oct 27 2022, and will be archived for your benefit:&#xD;&#xA;&#xD;&#xA;* [Introduction to Polkadot](https://www.edx.org/course/introduction-to-polkadot)&#xD;&#xA;* [Introduction to Blockchain and Web3](https://www.edx.org/course/introduction-to-blockchain-and-web3)" ContentLicense="CC BY-SA 4.0" />
  <row Id="20088" PostHistoryTypeId="24" PostId="5272" RevisionGUID="2a60877a-0140-410e-8547-00cf70e0eadd" CreationDate="2022-10-14T14:53:34.243" Comment="Proposed by 2909 approved by 29 edit id of 311" ContentLicense="CC BY-SA 4.0" />
  <row Id="20089" PostHistoryTypeId="2" PostId="5355" RevisionGUID="c73f913a-a444-4a08-8d10-e7f77a48c512" CreationDate="2022-10-14T15:23:00.883" UserId="3252" Text="When i submit a WND  staking chill and staking unbond transaction,the console appears the err, How to deal with the RpcError: 1010 ?&#xD;&#xA;2022-10-14 23:16:49 error: RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1010: Invalid Transaction: Transaction is outdated&#xD;&#xA;2022-10-14 23:16:49 error: txsubmit RpcError: 1010: Invalid Transaction: Transaction is outdated&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20091" PostHistoryTypeId="1" PostId="5355" RevisionGUID="c73f913a-a444-4a08-8d10-e7f77a48c512" CreationDate="2022-10-14T15:23:00.883" UserId="3252" Text="How to deal with the RpcError: 1010?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20092" PostHistoryTypeId="3" PostId="5355" RevisionGUID="c73f913a-a444-4a08-8d10-e7f77a48c512" CreationDate="2022-10-14T15:23:00.883" UserId="3252" Text="|staking|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20093" PostHistoryTypeId="2" PostId="5356" RevisionGUID="f55dd3be-5558-4b50-ae80-916becd1f5d2" CreationDate="2022-10-14T16:17:07.333" UserId="300" Text="We've tried to use the scheduler pallet using both `enact_authorized_upgrade` and `setCode`, but because the scheduler pallet executes [on_initialize][1] and it appears that the upgrades cannot happen without the validation data which doesn't exist yet `on_initialize` (See: https://substrate.stackexchange.com/questions/2309/runtime-upgrade-error-parachainsystem-validationdatanotavailable)&#xD;&#xA;&#xD;&#xA;Is there some other way that I have missed to be able to predetermine the block of a sudo upgrade?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/scheduler/src/lib.rs#L305-L314" ContentLicense="CC BY-SA 4.0" />
  <row Id="20095" PostHistoryTypeId="1" PostId="5356" RevisionGUID="f55dd3be-5558-4b50-ae80-916becd1f5d2" CreationDate="2022-10-14T16:17:07.333" UserId="300" Text="Is it possible to schedule a sudo upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20096" PostHistoryTypeId="3" PostId="5356" RevisionGUID="f55dd3be-5558-4b50-ae80-916becd1f5d2" CreationDate="2022-10-14T16:17:07.333" UserId="300" Text="|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20099" PostHistoryTypeId="2" PostId="5357" RevisionGUID="9514f302-e3ae-42f3-b84e-695aeaacda6e" CreationDate="2022-10-14T16:50:05.350" UserId="3309" Text="Perhaps overly complex, but until a nicely formatted page is available you can see this file here for the current parameters Kusama has been configured with:&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/governance/tracks.rs&#xD;&#xA;&#xD;&#xA;e.g. for a small tip:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet_referenda::TrackInfo {&#xD;&#xA;		name: &quot;small_tipper&quot;,&#xD;&#xA;		max_deciding: 200,&#xD;&#xA;		decision_deposit: 5 * QUID,&#xD;&#xA;		prepare_period: 4,&#xD;&#xA;		decision_period: 28 * DAYS,&#xD;&#xA;		confirm_period: 3 * HOURS,&#xD;&#xA;		min_enactment_period: 28 * DAYS,&#xD;&#xA;		min_approval: APP_SMALL_TIPPER,&#xD;&#xA;		min_support: SUP_SMALL_TIPPER,&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20101" PostHistoryTypeId="5" PostId="5336" RevisionGUID="564108d5-f507-4233-bbac-aed7911e8041" CreationDate="2022-10-14T16:57:30.220" UserId="3331" Comment="added 77 characters in body" Text="I'm using the [Parity Tech Github][1] as source for the Relay, with some simple modifications in the `node\service\src\chain_spec.rs` and `cli\src\command.rs` to build a personalized chain specification file. &#xD;&#xA;&#xD;&#xA;So, I can input my seed(s) and it writes the keys and session keys in the `ChainSpec.json` file. After generating and transforming it to the raw format, I use the raw chain spec to add the keys into the node's keystore.&#xD;&#xA;&#xD;&#xA;I'm using those 3 key types: gran, babe and imon.&#xD;&#xA;&#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 3-raw.json --scheme ed25519 --suri &quot;&lt;key&gt;&quot; --key-type gran    &#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 3-raw.json --scheme sr25519 --suri &quot;&lt;key&gt;&quot; --key-type babe&#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 3-raw.json --scheme sr25519 --suri &quot;&lt;key&gt;&quot; --key-type imon&#xD;&#xA;&#xD;&#xA;&gt; I'm not using the Dev/Testing accounts. I'm using keys generated by me.&#xD;&#xA;&#xD;&#xA;Everything on the Relay runs without any problems. The issue appears when I deploy a Parachain.&#xD;&#xA;The Parachain Node is discovered, and can be seen as a FULL node on the Network&gt;Node Info.&#xD;&#xA;&#xD;&#xA;So, what I need to do? I have to add session keys for the parachain as well? If so, where?&#xD;&#xA;What I'm missing here? Why it tries over and over to start collating but nothing happens?&#xD;&#xA;&#xD;&#xA;[Output Log from the Parachain][2]&#xD;&#xA;```&#xD;&#xA;2022-10-13 14:35:12.039  INFO tokio-runtime-worker substrate: ✨ Imported #655 (0x7f2c…0759)&#xD;&#xA;2022-10-13 14:35:12.043  INFO tokio-runtime-worker cumulus-collator: Starting collation. relay_parent=0x88da0da170e12fe60447128581d6507e3faf82cdb355e3ea1d8cd7f22dc2d26e at=0x448337c11caa11ea07e126518e2c439e65b53e0ce223cf40ca040aa8d81a4800&#xD;&#xA;2022-10-13 14:35:12.045  INFO tokio-runtime-worker cumulus-collator: Starting collation. relay_parent=0x7f2ccf7c492abf73210caf96e1d280d4cfdce2ff310e7ad05f1bb12515500759 at=0x448337c11caa11ea07e126518e2c439e65b53e0ce223cf40ca040aa8d81a4800&#xD;&#xA;2022-10-13 14:35:12.989  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #0 (0x4483…4800), finalized #0 (0x4483…4800), ⬇ 0 ⬆ 0&#xD;&#xA;2022-10-13 14:35:13.112  INFO tokio-runtime-worker substrate:  Idle (2 peers), best: #655 (0x88da…d26e), finalized #652 (0xe496…e47e), ⬇ 1.2kiB/s ⬆ 0.5kiB/s&#xD;&#xA;2022-10-13 14:35:17.989  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #0 (0x4483…4800), finalized #0 (0x4483…4800), ⬇ 0 ⬆ 0&#xD;&#xA;2022-10-13 14:35:18.015 DEBUG tokio-runtime-worker runtime::inclusion-inherent: [enter_inner] parent_header=0x88da0da170e12fe60447128581d6507e3faf82cdb355e3ea1d8cd7f22dc2d26e bitfields.len(): 0, backed_candidates.len(): 0, disputes.len(): 0&#xD;&#xA;2022-10-13 14:35:18.016 TRACE tokio-runtime-worker runtime: Batch-verification: 0 pending tasks, 0 sr25519 signatures&#xD;&#xA;2022-10-13 14:35:18.016 TRACE tokio-runtime-worker runtime: Finalization of batch verification took 0 ms&#xD;&#xA;2022-10-13 14:35:18.016 DEBUG tokio-runtime-worker runtime::system: [656] length: 344 (normal 0%, op: 0%, mandatory 0%) / normal weight: 0 (0%) / op weight 0 (0%) / mandatory weight 6038475000 (0%)&#xD;&#xA;2022-10-13 14:35:18.018  INFO tokio-runtime-worker substrate: ✨ Imported #656 (0x3c1d…70da)&#xD;&#xA;2022-10-13 14:35:18.021  INFO tokio-runtime-worker cumulus-collator: Starting collation. relay_parent=0x3c1d92f510cfb8ef59bd9eaf47734109f3cba6ce51981e749cdd40de9fc670da at=0x448337c11caa11ea07e126518e2c439e65b53e0ce223cf40ca040aa8d81a4800&#xD;&#xA;```&#xD;&#xA;----------&#xD;&#xA;Some additional info:&#xD;&#xA;&#xD;&#xA;Error that appears when I try to do a Runtime call to generate session keys on the parachain ws.&#xD;&#xA;```&#xD;&#xA; 0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:702:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14&#xD;&#xA;   6: core::panicking::panic_display&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:72:5&#xD;&#xA;   7: core::panicking::panic_str&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:56:5&#xD;&#xA;   8: core::option::expect_failed&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/option.rs:1874:5&#xD;&#xA;   9: &lt;&amp;mut dyn sp_externalities::Externalities as sp_io::crypto::Crypto&gt;::sr25519_generate_version_1&#xD;&#xA;  10: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  11: tracing::span::Span::in_scope&#xD;&#xA;  12: sp_io::crypto::sr25519_generate_version_1&#xD;&#xA;  13: sp_io::crypto::ExtCryptoSr25519GenerateVersion1::call&#xD;&#xA;  14: &lt;sc_executor_wasmtime::imports::Registry as sp_wasm_interface::HostFunctionRegistry&gt;::with_function_context&#xD;&#xA;  15: &lt;core::panic::unwind_safe::AssertUnwindSafe&lt;F&gt; as core::ops::function::FnOnce&lt;()&gt;&gt;::call_once&#xD;&#xA;  16: &lt;F as wasmtime::func::IntoFunc&lt;T,(wasmtime::func::Caller&lt;T&gt;,A1,A2),R&gt;&gt;::into_func::wasm_to_host_shim&#xD;&#xA;  17: &lt;unknown&gt;&#xD;&#xA;  18: &lt;unknown&gt;&#xD;&#xA;  19: wasmtime_runtime::traphandlers::catch_traps::call_closure&#xD;&#xA;  20: wasmtime_setjmp&#xD;&#xA;  21: wasmtime_runtime::traphandlers::catch_traps&#xD;&#xA;  22: wasmtime::func::invoke_wasm_and_catch_traps&#xD;&#xA;  23: sc_executor_wasmtime::instance_wrapper::EntryPoint::call&#xD;&#xA;  24: sc_executor_wasmtime::runtime::perform_call&#xD;&#xA;  25: &lt;sc_executor_wasmtime::runtime::WasmtimeInstance as sc_executor_common::wasm_runtime::WasmInstance&gt;::call&#xD;&#xA;  26: sc_executor_common::wasm_runtime::WasmInstance::call_export&#xD;&#xA;  27: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  28: sc_executor::native_executor::WasmExecutor&lt;H&gt;::with_instance::{{closure}}&#xD;&#xA;  29: sc_executor::wasm_runtime::RuntimeCache::with_instance&#xD;&#xA;  30: &lt;sc_executor::native_executor::NativeElseWasmExecutor&lt;D&gt; as sp_core::traits::CodeExecutor&gt;::call&#xD;&#xA;  31: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_aux&#xD;&#xA;  32: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_using_consensus_failure_handler&#xD;&#xA;  33: &lt;sc_service::client::call_executor::LocalCallExecutor&lt;Block,B,E&gt; as sc_client_api::call_executor::CallExecutor&lt;Block&gt;&gt;::call&#xD;&#xA;  34: &lt;sc_rpc::state::state_full::FullState&lt;BE,Block,Client&gt; as sc_rpc::state::StateBackend&lt;Block,Client&gt;&gt;::call&#xD;&#xA;  35: &lt;tokio::runtime::blocking::task::BlockingTask&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  36: tokio::runtime::task::core::CoreStage&lt;T&gt;::poll&#xD;&#xA;  37: tokio::runtime::task::harness::Harness&lt;T,S&gt;::poll&#xD;&#xA;  38: tokio::runtime::blocking::pool::Inner::run&#xD;&#xA;  39: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  40: core::ops::function::FnOnce::call_once{{vtable.shim}}&#xD;&#xA;  41: &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9&#xD;&#xA;      &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9&#xD;&#xA;      std::sys::unix::thread::Thread::new::thread_start&#xD;&#xA;             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys/unix/thread.rs:108:17&#xD;&#xA;  42: start_thread&#xD;&#xA;  43: clone&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'No keystore associated for the current context!', /home/amrm/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:846&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks for any hint or help in advance! x)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot&#xD;&#xA;  [2]: https://i.stack.imgur.com/EDTrU.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="20102" PostHistoryTypeId="2" PostId="5358" RevisionGUID="0a143e18-9e35-4be3-b0b4-760cfa90be5a" CreationDate="2022-10-14T17:17:03.153" UserId="284" Text="You can also find a tutorial here:&#xD;&#xA;https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts/" ContentLicense="CC BY-SA 4.0" />
  <row Id="20104" PostHistoryTypeId="5" PostId="5346" RevisionGUID="dc26a6ce-61f4-42f0-9cf7-78a71853e15d" CreationDate="2022-10-14T17:22:54.860" UserId="3127" Comment="added 6 characters in body" Text="In the tutorial you posted the term `solochain` refers actually to a regular node based off the node template, and the guide allows you to &quot;convert&quot; it to an actual parachain by adding Cumulus to the node's codebase, so it can communicate with the relay chain. If you want to run a relay chain, you need to use the [Polkadot node][1]. This repo has the details how to run a local two node relay chain, for example. To this relay chain you can connect your parachain, which you can create from your `solochain`. Hope this provides a bit more clarity. You can read more about [Polkadot architecture][2] here. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-architecture" ContentLicense="CC BY-SA 4.0" />
  <row Id="20105" PostHistoryTypeId="2" PostId="5359" RevisionGUID="7f63f821-ad93-4e9f-882a-44cc5c730bc6" CreationDate="2022-10-14T18:15:10.367" UserId="94" Text="There are no hardware requirements for running a *Substrate* node itself, but for running a Polkadot validator or collator.  &#xD;&#xA;You can toy around with a local Substrate network by appending the `--dev` flag to your node startup command.&#xD;&#xA;&#xD;&#xA;The Polkadot reference hardware is described in the [wiki](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#reference-hardware).  &#xD;&#xA;An &quot;old laptop&quot; is most likely insufficient for running a validator. Keep in mind that a validator will loose money for being offline. Especially when you enable nominations and thereby risk getting other peoples funds' slashed. &#xD;&#xA;&#xD;&#xA;The 1KV program on Kusama is meant to help onboard new validators: https://thousand-validators.kusama.network/#/  " ContentLicense="CC BY-SA 4.0" />
  <row Id="20107" PostHistoryTypeId="5" PostId="5354" RevisionGUID="9ca61e9a-6446-4d29-b9db-a9f1552cc5f6" CreationDate="2022-10-14T18:53:26.310" UserId="2025" Comment="fix typo" Text="Indeed, the exact DOT value of each era point is not known in advance since it depends on the total number of points earned by all validators in a given era. This is designed this way so that the total payout per era depends on Polkadot's inflation model, and not on the number of payable actions (f.e., authoring a new block) executed.&#xD;&#xA;&#xD;&#xA;Concretely, if we define:&#xD;&#xA;&#xD;&#xA; - `p` as the number of points earned by the relevant validator in the era,&#xD;&#xA; - `Tp` as the total number of points earned by all validators in the era, and&#xD;&#xA; - `M` as the target total payout to all validators, and their nominators, in that era (in DOTs),&#xD;&#xA;&#xD;&#xA;then the rewards in DOT payed to a validator per era are given by: &#xD;&#xA;&#xD;&#xA;`R = p * M / Tp`&#xD;&#xA;&#xD;&#xA;[This article by Web3 Foundation Research](https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html) explains all the details and how the constant `M` is calculated.&#xD;&#xA;&#xD;&#xA;From here, we can deduce that the coefficient of proportionality between era points and rewards in DOT is `M/Tp`, which depends on the total number of points earned by all validators per era, `Tp`, and this parameter is not constant." ContentLicense="CC BY-SA 4.0" />
  <row Id="20110" PostHistoryTypeId="2" PostId="5361" RevisionGUID="becb87dd-8045-453d-b8f4-cd6c9cce55d9" CreationDate="2022-10-14T19:29:35.417" UserId="28" Text="Parachains need to schedule runtime upgrades with the relay chain. This process is already handled for you with a set of custom extrinsics coming from the `parachain-system` pallet.&#xD;&#xA;&#xD;&#xA;There are details here: https://decentration.medium.com/how-to-make-a-parachain-runtime-upgrade-2b0e063fe1f7" ContentLicense="CC BY-SA 4.0" />
  <row Id="20114" PostHistoryTypeId="2" PostId="5363" RevisionGUID="1a5b15d2-9245-4f7e-8acc-02113f289ac4" CreationDate="2022-10-14T19:48:26.513" UserId="3239" Text="Right now by benchmarks look like the following&#xD;&#xA;```&#xD;&#xA;some_pallet_func_using_storage{&#xD;&#xA;..filling storage with garbage data to create the worst scenario..&#xD;&#xA;&#xD;&#xA;}:_(RawOrigin::Signed(caller), bla,bla,bla)&#xD;&#xA;verify{&#xD;&#xA;...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;But from the answer on [this question](https://substrate.stackexchange.com/questions/4371/how-to-weight-on-initialize) it seems that filling storage with garbage is not needed. Is my understanding correct? If not then what reasonable garbage volume shall be put into storage that will affect extrinsic weight? Does this volume matter at all?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20116" PostHistoryTypeId="1" PostId="5363" RevisionGUID="1a5b15d2-9245-4f7e-8acc-02113f289ac4" CreationDate="2022-10-14T19:48:26.513" UserId="3239" Text="How setup Storage for a proper benchmarking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20117" PostHistoryTypeId="3" PostId="5363" RevisionGUID="1a5b15d2-9245-4f7e-8acc-02113f289ac4" CreationDate="2022-10-14T19:48:26.513" UserId="3239" Text="|benchmarking|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20118" PostHistoryTypeId="2" PostId="5364" RevisionGUID="aed166f2-7ee3-46e6-9c02-787e06f81871" CreationDate="2022-10-14T20:18:51.550" UserId="73" Text="&gt; Is there some other way that I have missed to be able to predetermine the block of a sudo upgrade?&#xD;&#xA;&#xD;&#xA;If you want to use `scheduler`, you have to use `authorize_upgrade` and then anyone can send the `enact_authorized_upgrade` transaction. However, exactly determining the point on when the runtime upgrade will happen is not that easy. When the Parachain has signaled to the relay chain the intend to upgrade, there is some minimum time until the upgrade is applied. However, as the majority of relay chain validators need to approve the upgrade (to check that it compiles etc), the actual time between signaling and enacting can be longer.&#xD;&#xA;&#xD;&#xA;TDLR, you can not predetermine for sure the exact block when it will happen." ContentLicense="CC BY-SA 4.0" />
  <row Id="20120" PostHistoryTypeId="2" PostId="5365" RevisionGUID="e1a153c4-3614-4eb4-957b-81b5c132543f" CreationDate="2022-10-14T20:25:42.683" UserId="73" Text="The convention when writing inherents is to ensure that the origin is `None` doing:&#xD;&#xA;```&#xD;&#xA;ensure_none(origin)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;At the top of the inherent. `batch` et all are forwarding the origin that called them to the inner calls. Meaning if the origin is `Signed` the inner calls will also see this `Signed` origin and as we have the `ensure_none` it will fail. " ContentLicense="CC BY-SA 4.0" />
  <row Id="20122" PostHistoryTypeId="5" PostId="5350" RevisionGUID="a917d890-f65f-4aa1-ba4e-84f31cbc658b" CreationDate="2022-10-14T20:52:38.350" UserId="298" Comment="added 321 characters in body" Text="In the error it says `No keystore associated for the current context!`&#xD;&#xA;&#xD;&#xA;This means that your parachain node does not have the aura key that it needs to start collating. &#xD;&#xA;&#xD;&#xA;Try adding `--alice` and `--bob` to your collator commands e.g. (./target/release/parachain-collator --collator --alice...`), which should add the keys to the keystore of your nodes automatically. &#xD;&#xA;&#xD;&#xA;But if you have added specific keys to the chain spec of your parachain node then you will need add those keys, just like you did with `key-insert` for your relay chain. &#xD;&#xA;&#xD;&#xA;Or you can make a curl request:&#xD;&#xA;&#xD;&#xA;`curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;aura&quot;, &quot;0x153d8db5f7ef35f18a456c049d6f6e2c723d6c18d1f9f6c9fbee880c2a171c73&quot;, &quot;0x408f99b525d90cce76288245cb975771282c2cefa89d693b9da2cdbed6cd9152&quot;],&quot;id&quot;:1 }' localhost:9933`" ContentLicense="CC BY-SA 4.0" />
  <row Id="20123" PostHistoryTypeId="2" PostId="5366" RevisionGUID="49b67624-2bf9-4f75-bebc-4e685951d884" CreationDate="2022-10-14T22:16:07.147" UserId="2065" Text="We implemented decentralised reward campaigns using child tries. Currently we are using the **AccountId** together with  **TrieIndex** and **Balance** or **NftId** as parameters (depending on the type of campaign rewards). However, we want to implement amore scalable solution which uses a merkle root instead of AccountId. This will allow adding multiple entries using a single extrinsic call. We managed to implement this solution for setting rewards but we need to decode the root in order to check if an account submitted a valid reward claim call. What would be the best way to approach this?&#xD;&#xA;&#xD;&#xA;P.S. You can find the current version of the implementation [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chexware/Bit-Country-Blockchain/tree/feature/campaigns-scalability" ContentLicense="CC BY-SA 4.0" />
  <row Id="20125" PostHistoryTypeId="1" PostId="5366" RevisionGUID="49b67624-2bf9-4f75-bebc-4e685951d884" CreationDate="2022-10-14T22:16:07.147" UserId="2065" Text="Decoding merkle root passed as child trie parameter" ContentLicense="CC BY-SA 4.0" />
  <row Id="20126" PostHistoryTypeId="3" PostId="5366" RevisionGUID="49b67624-2bf9-4f75-bebc-4e685951d884" CreationDate="2022-10-14T22:16:07.147" UserId="2065" Text="|trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20129" PostHistoryTypeId="52" PostId="5356" RevisionGUID="b911fe6c-ba75-49be-8c08-94c7d51bd489" CreationDate="2022-10-15T00:17:33.523" />
  <row Id="20132" PostHistoryTypeId="50" PostId="4816" RevisionGUID="330bc06a-25c1-42d1-b6cb-b51e5b7e5fe7" CreationDate="2022-10-15T03:07:10.870" UserId="-1" />
  <row Id="20133" PostHistoryTypeId="2" PostId="5367" RevisionGUID="1c9a910b-6474-4310-993d-bc63bd52a6c5" CreationDate="2022-10-15T03:11:56.190" UserId="34" Text="The state matters primarily for reading and writing to the merkelized key value database is the largest consideration in weight calculation typically, and that may change rather as the state changes. For example IO within a rather unbalanced trie (that FRAME should help you avoid but doesn't explicitly stop you from creating) could really impact the weight of the same call for the same runtime.&#xD;&#xA;&#xD;&#xA;Your pallet calls may also be full of branching code where some scenarios are quite inexpensive (like a fast this of an origin error and no other operations) and others are very computationally heavy with lots more IO than some branches. Thus you want to benchmark the actual weight of minimal to worst case scenario.&#xD;&#xA;&#xD;&#xA;#### Example from balances pallet testing worst and best cases of branching behavior: &#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/balances/src/benchmarking.rs#L35-L76&#xD;&#xA;&#xD;&#xA;#### Videos to explain much better:&#xD;&#xA;&#xD;&#xA;- Short form with overview: https://www.youtube.com/watch?v=i3zW4wGexAc&#xD;&#xA;- As above, but long form with demo: https://www.youtube.com/watch?v=Qa6sTyUqgek" ContentLicense="CC BY-SA 4.0" />
  <row Id="20135" PostHistoryTypeId="5" PostId="5367" RevisionGUID="a02b56c0-8464-4a06-a3ec-53a6af181c40" CreationDate="2022-10-15T03:18:14.613" UserId="34" Comment="added 468 characters in body" Text="The state matters primarily for reading and writing to the merkelized data structure operations database FRAME abstracts from you in familiar things like storage maps. But overhead in database operations because of that merkelized stuff is typically the largest weight contribution typically, and those operations and their weight may change significantly as the state becomes more populated. For example IO within a rather unbalanced trie (that FRAME should help you avoid but doesn't explicitly stop you from creating) could really negatively impact the weight of the same call for the same runtime.&#xD;&#xA;&#xD;&#xA;Your pallet calls may also be full of branching code where some scenarios are quite inexpensive (like a fast this of an origin error and no other operations) and others are very computationally heavy with lots more IO than some branches. Thus you want to benchmark the actual weight of minimal to worst case scenario. The worst case is what we want to use as the weight is a _protective_ measure to ensure we never go over weight in a block. Unused weight if used to charge proportional fees can refund excess charged after the fact if the weight used was less than worst case too.&#xD;&#xA;&#xD;&#xA;#### Example from balances pallet testing worst and best cases of branching behavior: &#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/balances/src/benchmarking.rs#L35-L76&#xD;&#xA;&#xD;&#xA;#### Videos to explain much better:&#xD;&#xA;&#xD;&#xA;- Short form with overview: https://www.youtube.com/watch?v=i3zW4wGexAc&#xD;&#xA;- As above, but long form with demo: https://www.youtube.com/watch?v=Qa6sTyUqgek" ContentLicense="CC BY-SA 4.0" />
  <row Id="20136" PostHistoryTypeId="50" PostId="4794" RevisionGUID="b1e7a245-0ffa-4730-8879-b0d402842669" CreationDate="2022-10-15T05:00:30.070" UserId="-1" />
  <row Id="20137" PostHistoryTypeId="2" PostId="5368" RevisionGUID="77c2eec1-f925-4118-af65-ed42f959fa57" CreationDate="2022-10-15T10:22:16.617" UserId="3336" Text="I am following the Get Started tutorials &quot;Authorize specific nodes&quot;.&#xD;&#xA;I'm always waiting when I add charlie nodes&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20139" PostHistoryTypeId="1" PostId="5368" RevisionGUID="77c2eec1-f925-4118-af65-ed42f959fa57" CreationDate="2022-10-15T10:22:16.617" UserId="3336" Text="Authorize specific nodes - Allow connections from a sub-node &quot;Charlie&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20140" PostHistoryTypeId="3" PostId="5368" RevisionGUID="77c2eec1-f925-4118-af65-ed42f959fa57" CreationDate="2022-10-15T10:22:16.617" UserId="3336" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20141" PostHistoryTypeId="5" PostId="5368" RevisionGUID="3bc7bcd4-15d8-407f-b27d-58e776d8b9f7" CreationDate="2022-10-15T10:24:53.787" UserId="3336" Comment="added 887 characters in body" Text="I am following the Get Started tutorials &quot;Authorize specific nodes&quot;.&#xD;&#xA;I'm always waiting when I add charlie nodes&#xD;&#xA;```&#xD;&#xA;sudo.sudo&#xD;&#xA;Authenticates the sudo key and dispatches a function call with Root origin. &#xD;&#xA;call: Call&#xD;&#xA;nodeAuthorization.addWellKnownNode&#xD;&#xA;node: OpaquePeerId&#xD;&#xA;&lt;空的&gt;&#xD;&#xA;owner: MultiAddress&#xD;&#xA;{&#xD;&#xA;  Id: 5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y&#xD;&#xA;}&#xD;&#xA;signature&#xD;&#xA;0xf2e4af6420cf22d6f323495bcc23eddd2299d4906ab97313003c81007cb9b01421557fdf866d206eaa976d0f9cb73540c42006c833a0c36a9f0a50518183258a&#xD;&#xA;&#xD;&#xA;交易哈希&#xD;&#xA;0xe03c82c76b6b13ac9b91eae748fd2a408ed3a86a9401e0da0d0c08e31adcebaf&#xD;&#xA;&#xD;&#xA;生命周期&#xD;&#xA;存在的，有效期从#0 到 #64&#xD;&#xA;#/extrinsics/decode/0xcd028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01f2e4af6420cf22d6f323495bcc23eddd2299d4906ab97313003c81007cb9b01421557fdf866d206eaa976d0f9cb73540c42006c833a0c36a9f0a50518183258a050000000700090098002408011220876a7b4984f98006dc8d666e28b60de307309835d775e7755cc770328cdacf2e0090b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20146" PostHistoryTypeId="2" PostId="5370" RevisionGUID="c4c62499-a0d7-4a22-ae8b-6f29f4d15f3e" CreationDate="2022-10-15T10:54:07.663" UserId="3337" Text="There seems to have been 2 wallets delegating to one another at one point on the chain.&#xD;&#xA;&#xD;&#xA;How is this possible?&#xD;&#xA;&#xD;&#xA;I am retrieving all nested delegations and this is giving me an infinite loop in my indexer:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Delegation {&#xD;&#xA;    id: '73',&#xD;&#xA;    blockNumberStart: 9044165,&#xD;&#xA;    blockNumberEnd: null,&#xD;&#xA;    wallet: 'Eyd3x5a8KearHpJLw9PFgYVNDCQiTMBHSLr9yCtox2bqMFL',&#xD;&#xA;    to: 'Gk1Ys5TE4uMucnVovKYNf7pzF8DVB2dyTTAWxijgXys1gDN',&#xD;&#xA;    balance: 1000000000n,&#xD;&#xA;    lockPeriod: 0,&#xD;&#xA;    timestamp: 2021-09-02T03:22:36.004Z&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;Delegation {&#xD;&#xA;    id: '74',&#xD;&#xA;    blockNumberStart: 9044201,&#xD;&#xA;    blockNumberEnd: null,&#xD;&#xA;    wallet: 'Gk1Ys5TE4uMucnVovKYNf7pzF8DVB2dyTTAWxijgXys1gDN',&#xD;&#xA;    to: 'Eyd3x5a8KearHpJLw9PFgYVNDCQiTMBHSLr9yCtox2bqMFL',&#xD;&#xA;    balance: 10000000n,&#xD;&#xA;    lockPeriod: 0,&#xD;&#xA;    timestamp: 2021-09-02T03:26:13.879Z&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Ey...FL delegating to GK...DN:&#xD;&#xA;https://kusama.subscan.io/extrinsic/9044165-2&#xD;&#xA;&#xD;&#xA;A few blocks later, GK...DN delegating to Ey...FL: https://kusama.subscan.io/extrinsic/9044201-3" ContentLicense="CC BY-SA 4.0" />
  <row Id="20148" PostHistoryTypeId="1" PostId="5370" RevisionGUID="c4c62499-a0d7-4a22-ae8b-6f29f4d15f3e" CreationDate="2022-10-15T10:54:07.663" UserId="3337" Text="Circular delegation" ContentLicense="CC BY-SA 4.0" />
  <row Id="20149" PostHistoryTypeId="3" PostId="5370" RevisionGUID="c4c62499-a0d7-4a22-ae8b-6f29f4d15f3e" CreationDate="2022-10-15T10:54:07.663" UserId="3337" Text="|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20151" PostHistoryTypeId="5" PostId="5370" RevisionGUID="5c20d66a-4f4a-49c2-a4e3-6fe810e6a684" CreationDate="2022-10-15T11:03:51.140" UserId="3337" Comment="added 7 characters in body" Text="There seems to have been 2 wallets delegating to one another at one point on the Kusama chain.&#xD;&#xA;&#xD;&#xA;How is this possible?&#xD;&#xA;&#xD;&#xA;I am retrieving all nested delegations and this is giving me an infinite loop in my indexer:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Delegation {&#xD;&#xA;    id: '73',&#xD;&#xA;    blockNumberStart: 9044165,&#xD;&#xA;    blockNumberEnd: null,&#xD;&#xA;    wallet: 'Eyd3x5a8KearHpJLw9PFgYVNDCQiTMBHSLr9yCtox2bqMFL',&#xD;&#xA;    to: 'Gk1Ys5TE4uMucnVovKYNf7pzF8DVB2dyTTAWxijgXys1gDN',&#xD;&#xA;    balance: 1000000000n,&#xD;&#xA;    lockPeriod: 0,&#xD;&#xA;    timestamp: 2021-09-02T03:22:36.004Z&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;Delegation {&#xD;&#xA;    id: '74',&#xD;&#xA;    blockNumberStart: 9044201,&#xD;&#xA;    blockNumberEnd: null,&#xD;&#xA;    wallet: 'Gk1Ys5TE4uMucnVovKYNf7pzF8DVB2dyTTAWxijgXys1gDN',&#xD;&#xA;    to: 'Eyd3x5a8KearHpJLw9PFgYVNDCQiTMBHSLr9yCtox2bqMFL',&#xD;&#xA;    balance: 10000000n,&#xD;&#xA;    lockPeriod: 0,&#xD;&#xA;    timestamp: 2021-09-02T03:26:13.879Z&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Ey...FL delegating to GK...DN:&#xD;&#xA;https://kusama.subscan.io/extrinsic/9044165-2&#xD;&#xA;&#xD;&#xA;A few blocks later, GK...DN delegating to Ey...FL: https://kusama.subscan.io/extrinsic/9044201-3" ContentLicense="CC BY-SA 4.0" />
  <row Id="20152" PostHistoryTypeId="2" PostId="5371" RevisionGUID="13330417-0f39-44ab-a1ed-04a217d57911" CreationDate="2022-10-15T13:02:06.860" UserId="3286" Text="When I start the development version of the [Polkadot.js extension](https://github.com/polkadot-js/extension) on Firefox after installing it, I'm getting the error: File not found. Firefox cannot find the file on moz-extension://.../index.html. &#xD;&#xA;&#xD;&#xA;Before installing I build the extension using yarn build as described in the README.md file. Starting the extension on Google Chrome does work.&#xD;&#xA;&#xD;&#xA;How to start a development version of the extension on Firefox?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20154" PostHistoryTypeId="1" PostId="5371" RevisionGUID="13330417-0f39-44ab-a1ed-04a217d57911" CreationDate="2022-10-15T13:02:06.860" UserId="3286" Text="Index.html file not found on Firefox after building dev version of Polkadot.js extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="20155" PostHistoryTypeId="3" PostId="5371" RevisionGUID="13330417-0f39-44ab-a1ed-04a217d57911" CreationDate="2022-10-15T13:02:06.860" UserId="3286" Text="|polkadot-js|polkadot-js-extension|browser-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20156" PostHistoryTypeId="2" PostId="5372" RevisionGUID="33904c98-2be0-4df8-b512-4ff25366bcbe" CreationDate="2022-10-15T18:23:57.783" UserId="3171" Text="I have a solidity smart contract that I compile using Solang to substrate wasm.&#xD;&#xA;&#xD;&#xA;    contract Pool {&#xD;&#xA;    address xxx;&#xD;&#xA;    constructor(address _test){&#xD;&#xA;      xxx = _test;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    function callFoo(address _test) external returns (bool){&#xD;&#xA;      _test.call(abi.encodeWithSignature(&quot;flip()&quot;));&#xD;&#xA;      return true;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;But I received the error trying deploy the contract using polkadot js org&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;How to specify the substrate wasm contract address?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kgIek.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="20158" PostHistoryTypeId="1" PostId="5372" RevisionGUID="33904c98-2be0-4df8-b512-4ff25366bcbe" CreationDate="2022-10-15T18:23:57.783" UserId="3171" Text="Expected input with 32 bytes (256 bits), found 48 bytes" ContentLicense="CC BY-SA 4.0" />
  <row Id="20159" PostHistoryTypeId="3" PostId="5372" RevisionGUID="33904c98-2be0-4df8-b512-4ff25366bcbe" CreationDate="2022-10-15T18:23:57.783" UserId="3171" Text="|ink|wasm|pallet-contracts|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20161" PostHistoryTypeId="5" PostId="2286" RevisionGUID="9d140ca8-db3c-4f48-8a24-82c55dc3ef39" CreationDate="2022-10-16T00:55:06.990" UserId="3319" Comment="Signed instead of unsigned" Text="Yes, in Substrate, transactions can generally be thought of as any piece of data that's intended for the transaction pool (and consequently, could potentially be included in a block). But there are technical nuances needed to be spelled out: the term &quot;transaction&quot; is in fact quite misleading, although does have merit from a user friendliness perspective (yes, technically *extrinsic pool* would be more accurate). &#xD;&#xA; &#xD;&#xA;## Extrinsics (a.k.a. Types of Transactions)&#xD;&#xA;&#xD;&#xA;In Substrate, a &quot;*thing that could exist in the transaction pool*&quot; &amp;mdash; more commonly known as &quot;a transaction&quot; in the non-Substrate world &amp;mdash; can be one of 3 distinct types, all of which fall under a broader category called  &quot;**extrinsics**&quot;. Extrinsics is just a general term to mean *&quot;any information that originates from _outside_ a runtime&quot;*. These are:&#xD;&#xA;&#xD;&#xA;* **Signed transactions**: these must contain the signature of the account sending the inbound request to the runtime.&#xD;&#xA;  With signed transactions, the account used to submit the request typically pays a transaction fee and must sign it using the account's private key.&#xD;&#xA;* **Unsigned transactions**: these don't carry any information about who submitted the transaction, since the format of this type of transaction doesn't require a signature.&#xD;&#xA;You can define what conditions must be met for such a transaction to be valid (FRAME has an [attribute macro](https://docs.substrate.io/rustdocs/latest/frame_support/attr.pallet.html#validate-unsigned-palletvalidate_unsigned-optional) to do this).&#xD;&#xA;* **Inherents**: are a special type of unsigned transaction made by block authors which carry information required to build a block such as timestamps, storage proofs and uncle blocks.&#xD;&#xA;&#xD;&#xA;## Key differences&#xD;&#xA;&#xD;&#xA;Here are some key differences between the different types of extrinsics:&#xD;&#xA;&#xD;&#xA;* Signed transactions consume more resources because some custom validation logic must be checked to validate the request.&#xD;&#xA;* Unsigned transactions have no economic deterrent to prevent spam or replay attacks, so custom logic is required to protect the network from these types of transactions being misused.&#xD;&#xA;* Inherents exist to address the need of adding some data to a block, whereas signed or unsigned transactions exist to potentially change the state of the blockchain.&#xD;&#xA;&#xD;&#xA;## Examples&#xD;&#xA;&#xD;&#xA;Here are some examples of each type of extrinsic being used in different scenarios:&#xD;&#xA;&#xD;&#xA;| Scenario | Function call example | Type | Reason |&#xD;&#xA;| -------- | ---- | -------------- | ----------- &#xD;&#xA;| Bob wants to send some tokens to Alice and tip the block author to give this transaction more priority, using the Balances pallet. | `pallet_balances::Call::transfer` in [Polkadot](https://polkadot.subscan.io/extrinsic/8749664-2) | Signed transaction | This function can be called by any account, so we must ensure that the caller signs the transaction and pays a fee for it to be processed.&#xD;&#xA;| Charlie proposes a tip to reward Dave using the Tipping pallet. | `pallet_tips::Call::report_awesome` in [Polkadot](https://polkadot.subscan.io/extrinsic/8818237-2) | Signed transaction | This function is designed so that any account can call it, by depositing some amount and giving a reason for the tip which will be stored on-chain.&#xD;&#xA;| The on-chain council passes some motion that includes submitting a batch of valid transactions to be executed. | `pallet_utility::Call::batch` in [Polkadot](https://polkadot.subscan.io/council/131) | Unsigned transaction | This type of extrinsic can only be submitted if a majority of the council approves it and cannot be executed by any single account.&#xD;&#xA;| A validator node sends a signal to the network to indicate it's online. | `pallet_im_online::Call::heartbeat` in [Kusama](https://kusama.subscan.io/extrinsic/11232100-5) | Unsigned transaction | This can only be called by a node that's registered as a validator in the network, which is verified as part of an internal check of the function's logic and allows the node to call it without paying any fees. &#xD;&#xA;| The network wants block authoring nodes to include the current timestamp into the blocks they produce. | `pallet_timestamp::Call::now` in [Kusama](https://kusama.subscan.io/extrinsic/11232115-0) | Inherent | This is a special extrinsic that can only be included in a block by an authoring node. &#xD;&#xA;| A parachain needs to send its relay chain the validation data the relay chain expects. | `paras_inherent::Call::enter` in [Kusama](https://kusama.subscan.io/extrinsic/11232398-1) | Inherent | This is a special type of extrinsic that can only be sent by a collator node. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20162" PostHistoryTypeId="24" PostId="2286" RevisionGUID="9d140ca8-db3c-4f48-8a24-82c55dc3ef39" CreationDate="2022-10-16T00:55:06.990" Comment="Proposed by 3319 approved by 34 edit id of 312" ContentLicense="CC BY-SA 4.0" />
  <row Id="20163" PostHistoryTypeId="50" PostId="4853" RevisionGUID="96020352-363b-47ec-9045-d8b08831ab6d" CreationDate="2022-10-16T02:02:50.350" UserId="-1" />
  <row Id="20165" PostHistoryTypeId="2" PostId="5373" RevisionGUID="26528a96-42e1-4b46-9bac-c9692949279a" CreationDate="2022-10-16T08:49:01.410" UserId="73" Text="The `impl_runtime_apis!` macro added some invalid unsafe trait implementations of `Sync` and `Send`. These are going to be removed by this [pr][1].&#xD;&#xA;&#xD;&#xA;Creating the `runtime_api` would be the correct way, as you already have done this. The warning that you are running out of wasm instances would also be the result of sharing the `runtime_api`, because internally the wasm executor uses one instance per runtime call. The executor caches these instances, but when the upper number is reached you see this warning as it will create instances on the fly that are being destroyed afterwards. So, I would propose that you may change your `has_delegation` to take a `Vec&lt;Delegate&gt;` or maybe add a second function to do this. Then you could fetch all the required information in one call to the runtime. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/12502" ContentLicense="CC BY-SA 4.0" />
  <row Id="20167" PostHistoryTypeId="2" PostId="5374" RevisionGUID="5ce12f31-03ff-4db5-8d89-e07919818939" CreationDate="2022-10-16T11:02:58.643" UserId="3338" Text="Check the total amount on stake - if it goes under the  specific limit, the Granpa stops finalizing. We had the same issue last year and had to hack it in substrate libs to finalize deep below the threshold." ContentLicense="CC BY-SA 4.0" />
  <row Id="20169" PostHistoryTypeId="5" PostId="5374" RevisionGUID="6b157142-9c28-42bc-ada7-7d5a13393977" CreationDate="2022-10-16T11:25:38.203" UserId="3338" Comment="added 72 characters in body" Text="Check the total amount on stake - if it goes under the  specific limit, the Granpa stops finalizing. We had the same issue last year and had to hack it in substrate libs to finalize deep below the threshold. см. https://github.com/kl3eo/room-house/blob/main/skypirl/sp_build.txt " ContentLicense="CC BY-SA 4.0" />
  <row Id="20170" PostHistoryTypeId="2" PostId="5375" RevisionGUID="0f370e67-044e-4881-9916-800336039337" CreationDate="2022-10-16T11:49:56.993" UserId="2548" Text="Currently using Postman I can make requests to my node and get a response.&#xD;&#xA;The code below is a request:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;     &quot;jsonrpc&quot;:&quot;2.0&quot;,&#xD;&#xA;      &quot;id&quot;:3,&#xD;&#xA;      &quot;method&quot;:&quot;sumStorage_getSum&quot;,&#xD;&#xA;       &quot;params&quot;: [&quot;4&quot;]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and I get the following response: &#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;result&quot;: 8,&#xD;&#xA;    &quot;id&quot;: 3&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;which is fine for simple things.&#xD;&#xA;&#xD;&#xA;But I would like to make a custom request like this one: &#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;     &quot;jsonrpc&quot;:&quot;2.0&quot;,&#xD;&#xA;      &quot;id&quot;:3,&#xD;&#xA;      &quot;method&quot;:&quot;silly_double&quot;,&#xD;&#xA;      &quot;params&quot;: [{&quot;id&quot;:4}]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and receive a response like this one: &#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;success&quot;: { &quot;code&quot;: 200, &quot;sum&quot;, 18 },&#xD;&#xA;    &quot;id&quot;: 3&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Do you have any examples of how can I do this? I did not find any examples.&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20172" PostHistoryTypeId="1" PostId="5375" RevisionGUID="0f370e67-044e-4881-9916-800336039337" CreationDate="2022-10-16T11:49:56.993" UserId="2548" Text="RPC custom request/response" ContentLicense="CC BY-SA 4.0" />
  <row Id="20173" PostHistoryTypeId="3" PostId="5375" RevisionGUID="0f370e67-044e-4881-9916-800336039337" CreationDate="2022-10-16T11:49:56.993" UserId="2548" Text="|substrate-node|rust|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20174" PostHistoryTypeId="2" PostId="5376" RevisionGUID="a49c8095-b3b2-45c2-ae07-20ee43c3c82c" CreationDate="2022-10-16T12:16:46.390" UserId="1778" Text="wondering if this is how the architecture works.&#xD;&#xA;&#xD;&#xA;For instance is that full node stops running does that mean the light client also stops running?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20176" PostHistoryTypeId="1" PostId="5376" RevisionGUID="a49c8095-b3b2-45c2-ae07-20ee43c3c82c" CreationDate="2022-10-16T12:16:46.390" UserId="1778" Text="Are light clients connected to a particular full node and stay connected to it throuhout?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20177" PostHistoryTypeId="3" PostId="5376" RevisionGUID="a49c8095-b3b2-45c2-ae07-20ee43c3c82c" CreationDate="2022-10-16T12:16:46.390" UserId="1778" Text="|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20178" PostHistoryTypeId="4" PostId="5376" RevisionGUID="ae72ee6d-231a-4176-a896-b2609192c96a" CreationDate="2022-10-16T12:17:19.137" UserId="1778" Comment="edited title" Text="Are light clients connected to a particular full node and stay connected to it throughout?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20179" PostHistoryTypeId="5" PostId="2249" RevisionGUID="4e96df30-ac53-4244-9352-72d9c6692afb" CreationDate="2022-10-16T14:24:47.017" UserId="29" Comment="deleted 261 characters in body" Text="Broadly speaking an extrinsic is data that is external to the blockchain that is included in a block - think of the extrinsic root in a block with all its children ([example](https://explorer.polkascan.io/kusama/block/12457588)). You can think of an extrinsic as a broader term to encompass, as the definition says, [inherents](https://docs.substrate.io/v3/concepts/extrinsics/#inherents), signed transactions, and unsigned transactions - these are all types of extrinsics.&#xD;&#xA;&#xD;&#xA;**Is a transaction an extrinsic?**&#xD;&#xA;&#xD;&#xA;&gt; Yes, in the same sense that a rose is a flower.&#xD;&#xA;&#xD;&#xA;A transaction is a type of extrinsic." ContentLicense="CC BY-SA 4.0" />
  <row Id="20180" PostHistoryTypeId="2" PostId="5377" RevisionGUID="868f7bc6-8239-4a95-9640-cf363cbbac75" CreationDate="2022-10-16T15:00:28.120" UserId="3286" Text="Fixed it by loading the index.html file instead of the manifest.json file. I created a [pull request](https://github.com/polkadot-js/extension/pull/1156)." ContentLicense="CC BY-SA 4.0" />
  <row Id="20182" PostHistoryTypeId="2" PostId="5378" RevisionGUID="8b6ba521-3b04-4f48-82a2-efa6ba4c3374" CreationDate="2022-10-16T15:01:29.037" UserId="29" Text="Adding a bit more context to this issue as it may help you solve the issue.&#xD;&#xA;&#xD;&#xA;Looks like the error is coming from the [parachain inherent data provider](https://github.com/paritytech/polkadot/blob/release-v0.9.29/node/core/parachains-inherent/src/lib.rs#L17-L23) logic.&#xD;&#xA;&#xD;&#xA;For context on the parachain inherent data provider:&#xD;&#xA;&#xD;&#xA;&gt; Parachain backing and approval is an off-chain process, but the&#xD;&#xA;&gt; parachain needs to progress on chain as well. To make it progress on&#xD;&#xA;&gt; chain a block producer needs to forward information about the state of&#xD;&#xA;&gt; a parachain to the runtime. This information is forwarded through an&#xD;&#xA;&gt; inherent to the runtime. Here we provide the&#xD;&#xA;&gt; [`ParachainInherentDataProvider`] that requests the relevant data from&#xD;&#xA;&gt; the provisioner subsystem and creates the the inherent data that the&#xD;&#xA;&gt; runtime will use to create an inherent.&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/94078b44fb6c9767bf60ffcaaa3be40681be5a76/node/core/parachains-inherent/src/lib.rs#L17-L23&#xD;&#xA;&#xD;&#xA;The error is originating from here:&#xD;&#xA;```rust&#xD;&#xA;let inherent_data = match res {&#xD;&#xA;	Ok(pd) =&gt; ParachainsInherentData {&#xD;&#xA;		bitfields: pd.bitfields.into_iter().map(Into::into).collect(),&#xD;&#xA;		backed_candidates: pd.backed_candidates,&#xD;&#xA;		disputes: pd.disputes,&#xD;&#xA;		parent_header,&#xD;&#xA;	},&#xD;&#xA;	Err(err) =&gt; {&#xD;&#xA;		gum::debug!(&#xD;&#xA;			target: LOG_TARGET,&#xD;&#xA;			%err,&#xD;&#xA;			&quot;Could not get provisioner inherent data; injecting default data&quot;,&#xD;&#xA;		);&#xD;&#xA;		ParachainsInherentData {&#xD;&#xA;			bitfields: Vec::new(),&#xD;&#xA;			backed_candidates: Vec::new(),&#xD;&#xA;			disputes: Vec::new(),&#xD;&#xA;			parent_header,&#xD;&#xA;		}&#xD;&#xA;	},&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/94078b44fb6c9767bf60ffcaaa3be40681be5a76/node/core/parachains-inherent/src/lib.rs#L90-L110&#xD;&#xA;&#xD;&#xA;And the `pd` is not available because of this error:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;receiver.await.map_err(|_| Error::ClosedChannelAwaitingInherentData)&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/94078b44fb6c9767bf60ffcaaa3be40681be5a76/node/core/parachains-inherent/src/lib.rs#L74&#xD;&#xA;&#xD;&#xA;Some context on requesting the inherent data:&#xD;&#xA;&#xD;&#xA;&gt; When a validator is selected by BABE to author a block, it becomes a&#xD;&#xA;&gt; block producer. The provisioner is the subsystem best suited to&#xD;&#xA;&gt; choosing which specific backed candidates and availability bitfields&#xD;&#xA;&gt; should be assembled into the block. To engage this functionality, a&#xD;&#xA;&gt; ProvisionerMessage::RequestInherentData is sent; the response is a&#xD;&#xA;&gt; ParaInherentData.&#xD;&#xA;- https://paritytech.github.io/polkadot/book/node/utility/provisioner.html#block-production&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20184" PostHistoryTypeId="2" PostId="5379" RevisionGUID="71890480-e671-4fa7-99cb-3bec6d8fd088" CreationDate="2022-10-16T17:37:01.263" UserId="3339" Text="Following the instructions at (https://bruno.id/preparation-for-the-substrate-workshop/) until I received a build error, executing the instructions under the 'Error' heading, I received the following error E0635.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I executed: `rustc --explain E0635` which provided the following output:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;My ubuntu and rust toochain versions are as follows:[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;How might I fix this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zh3EI.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/1C2EK.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/C9a25.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/pRAmt.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="20186" PostHistoryTypeId="1" PostId="5379" RevisionGUID="71890480-e671-4fa7-99cb-3bec6d8fd088" CreationDate="2022-10-16T17:37:01.263" UserId="3339" Text="How do I fix a failed build error [E0635]: unknown feature 'proc_macro_span_shrink'?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20187" PostHistoryTypeId="3" PostId="5379" RevisionGUID="71890480-e671-4fa7-99cb-3bec6d8fd088" CreationDate="2022-10-16T17:37:01.263" UserId="3339" Text="|substrate-node-template|error|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20192" PostHistoryTypeId="2" PostId="5381" RevisionGUID="276f347e-12ee-40bb-8f90-72357830928e" CreationDate="2022-10-16T20:15:18.233" UserId="73" Text="You need to update your nightly. You are using one from 2020, that is quite old. Running `rustup update` should do it." ContentLicense="CC BY-SA 4.0" />
  <row Id="20194" PostHistoryTypeId="50" PostId="4856" RevisionGUID="c0d32c49-25ab-4b3b-8f3d-9d44b4487e2c" CreationDate="2022-10-16T21:06:15.740" UserId="-1" />
  <row Id="20195" PostHistoryTypeId="50" PostId="4825" RevisionGUID="fc1e4d88-8799-4fab-9341-d210c4b47aee" CreationDate="2022-10-16T22:05:50.700" UserId="-1" />
  <row Id="20196" PostHistoryTypeId="2" PostId="5382" RevisionGUID="c8d68fd9-ae1a-4e31-bdd2-6cd362672b33" CreationDate="2022-10-17T03:13:56.963" UserId="698" Text="For queries such as `api.query.identity.indentityOf(AccountID32)` it is possible within Polkadot.JS.org/apps to include or not include a parameter:&#xD;&#xA;&#xD;&#xA;[![Option not included][1]][1] &#xD;&#xA;&#xD;&#xA;[![Option included][2]][2]&#xD;&#xA;&#xD;&#xA;I would like to do the same via typescript but I'm unable to determine the right syntax.  I have tried:&#xD;&#xA;&#xD;&#xA;- api.query.identity.identityOf()&#xD;&#xA;- api.query.identity.identityOf(null)&#xD;&#xA;- api.query.identity.identityOf(undefined)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/u9sZ7.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/sXfv4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20198" PostHistoryTypeId="1" PostId="5382" RevisionGUID="c8d68fd9-ae1a-4e31-bdd2-6cd362672b33" CreationDate="2022-10-17T03:13:56.963" UserId="698" Text="How to submit null options using Polkadot.js/api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20199" PostHistoryTypeId="3" PostId="5382" RevisionGUID="c8d68fd9-ae1a-4e31-bdd2-6cd362672b33" CreationDate="2022-10-17T03:13:56.963" UserId="698" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20200" PostHistoryTypeId="8" PostId="2286" RevisionGUID="800b92ff-1a5e-4956-9a86-7e1fae49c142" CreationDate="2022-10-17T08:03:16.420" UserId="172" Comment="Rollback to [e0eaf188-97be-4984-be57-40105707d3fa]" Text="Yes, in Substrate, transactions can generally be thought of as any piece of data that's intended for the transaction pool (and consequently, could potentially be included in a block). But there are technical nuances needed to be spelled out: the term &quot;transaction&quot; is in fact quite misleading, although does have merit from a user friendliness perspective (yes, technically *extrinsic pool* would be more accurate). &#xD;&#xA; &#xD;&#xA;## Extrinsics (a.k.a. Types of Transactions)&#xD;&#xA;&#xD;&#xA;In Substrate, a &quot;*thing that could exist in the transaction pool*&quot; &amp;mdash; more commonly known as &quot;a transaction&quot; in the non-Substrate world &amp;mdash; can be one of 3 distinct types, all of which fall under a broader category called  &quot;**extrinsics**&quot;. Extrinsics is just a general term to mean *&quot;any information that originates from _outside_ a runtime&quot;*. These are:&#xD;&#xA;&#xD;&#xA;* **Signed transactions**: these must contain the signature of the account sending the inbound request to the runtime.&#xD;&#xA;  With signed transactions, the account used to submit the request typically pays a transaction fee and must sign it using the account's private key.&#xD;&#xA;* **Unsigned transactions**: these don't carry any information about who submitted the transaction, since the format of this type of transaction doesn't require a signature.&#xD;&#xA;You can define what conditions must be met for such a transaction to be valid (FRAME has an [attribute macro](https://docs.substrate.io/rustdocs/latest/frame_support/attr.pallet.html#validate-unsigned-palletvalidate_unsigned-optional) to do this).&#xD;&#xA;* **Inherents**: are a special type of unsigned transaction made by block authors which carry information required to build a block such as timestamps, storage proofs and uncle blocks.&#xD;&#xA;&#xD;&#xA;## Key differences&#xD;&#xA;&#xD;&#xA;Here are some key differences between the different types of extrinsics:&#xD;&#xA;&#xD;&#xA;* Unsigned transaction types consume more resources because some custom validation logic must be checked to validate the request.&#xD;&#xA;* Unsigned transactions have no economic deterrent to prevent spam or replay attacks, so custom logic is required to protect the network from these types of transactions being misused.&#xD;&#xA;* Inherents exist to address the need of adding some data to a block, whereas signed or unsigned transactions exist to potentially change the state of the blockchain.&#xD;&#xA;&#xD;&#xA;## Examples&#xD;&#xA;&#xD;&#xA;Here are some examples of each type of extrinsic being used in different scenarios:&#xD;&#xA;&#xD;&#xA;| Scenario | Function call example | Type | Reason |&#xD;&#xA;| -------- | ---- | -------------- | ----------- &#xD;&#xA;| Bob wants to send some tokens to Alice and tip the block author to give this transaction more priority, using the Balances pallet. | `pallet_balances::Call::transfer` in [Polkadot](https://polkadot.subscan.io/extrinsic/8749664-2) | Signed transaction | This function can be called by any account, so we must ensure that the caller signs the transaction and pays a fee for it to be processed.&#xD;&#xA;| Charlie proposes a tip to reward Dave using the Tipping pallet. | `pallet_tips::Call::report_awesome` in [Polkadot](https://polkadot.subscan.io/extrinsic/8818237-2) | Signed transaction | This function is designed so that any account can call it, by depositing some amount and giving a reason for the tip which will be stored on-chain.&#xD;&#xA;| The on-chain council passes some motion that includes submitting a batch of valid transactions to be executed. | `pallet_utility::Call::batch` in [Polkadot](https://polkadot.subscan.io/council/131) | Unsigned transaction | This type of extrinsic can only be submitted if a majority of the council approves it and cannot be executed by any single account.&#xD;&#xA;| A validator node sends a signal to the network to indicate it's online. | `pallet_im_online::Call::heartbeat` in [Kusama](https://kusama.subscan.io/extrinsic/11232100-5) | Unsigned transaction | This can only be called by a node that's registered as a validator in the network, which is verified as part of an internal check of the function's logic and allows the node to call it without paying any fees. &#xD;&#xA;| The network wants block authoring nodes to include the current timestamp into the blocks they produce. | `pallet_timestamp::Call::now` in [Kusama](https://kusama.subscan.io/extrinsic/11232115-0) | Inherent | This is a special extrinsic that can only be included in a block by an authoring node. &#xD;&#xA;| A parachain needs to send its relay chain the validation data the relay chain expects. | `paras_inherent::Call::enter` in [Kusama](https://kusama.subscan.io/extrinsic/11232398-1) | Inherent | This is a special type of extrinsic that can only be sent by a collator node. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20201" PostHistoryTypeId="5" PostId="2286" RevisionGUID="b13033f3-8db0-427e-93d4-3f53e4d2e210" CreationDate="2022-10-17T08:26:20.527" UserId="172" Comment="Clarified key differences." Text="Yes, in Substrate, transactions can generally be thought of as any piece of data that's intended for the transaction pool (and consequently, could potentially be included in a block). But there are technical nuances needed to be spelled out: the term &quot;transaction&quot; is in fact quite misleading, although does have merit from a user friendliness perspective (yes, technically *extrinsic pool* would be more accurate). &#xD;&#xA; &#xD;&#xA;## Extrinsics (a.k.a. Types of Transactions)&#xD;&#xA;&#xD;&#xA;In Substrate, a &quot;*thing that could exist in the transaction pool*&quot; &amp;mdash; more commonly known as &quot;a transaction&quot; in the non-Substrate world &amp;mdash; can be one of 3 distinct types, all of which fall under a broader category called  &quot;**extrinsics**&quot;. Extrinsics is just a general term to mean *&quot;any information that originates from _outside_ a runtime&quot;*. These are:&#xD;&#xA;&#xD;&#xA;* **Signed transactions**: these must contain the signature of the account sending the inbound request to the runtime.&#xD;&#xA;  With signed transactions, the account used to submit the request typically pays a transaction fee and must sign it using the account's private key.&#xD;&#xA;* **Unsigned transactions**: these don't carry any information about who submitted the transaction, since the format of this type of transaction doesn't require a signature.&#xD;&#xA;You can define what conditions must be met for such a transaction to be valid (FRAME has an [attribute macro](https://docs.substrate.io/rustdocs/latest/frame_support/attr.pallet.html#validate-unsigned-palletvalidate_unsigned-optional) to do this).&#xD;&#xA;* **Inherents**: are a special type of unsigned transaction made by block authors which carry information required to build a block such as timestamps, storage proofs and uncle blocks.&#xD;&#xA;&#xD;&#xA;## Key differences&#xD;&#xA;&#xD;&#xA;Here are some key differences between the different types of extrinsics:&#xD;&#xA;&#xD;&#xA;* Contrary to signed transactions, unsigned transaction types require implementing custom validation logic which can consume more resources for checking validity compared to signed transactions.&#xD;&#xA;* Unsigned transactions have no economic deterrent to prevent spam or replay attacks, so custom logic must account for protecting the network from these types of transactions being misused.&#xD;&#xA;* Inherents exist to address the need of adding some data to a block, whereas signed or unsigned transactions exist to potentially change the state of the blockchain.&#xD;&#xA;&#xD;&#xA;## Examples&#xD;&#xA;&#xD;&#xA;Here are some examples of each type of extrinsic being used in different scenarios:&#xD;&#xA;&#xD;&#xA;| Scenario | Function call example | Type | Reason |&#xD;&#xA;| -------- | ---- | -------------- | ----------- &#xD;&#xA;| Bob wants to send some tokens to Alice and tip the block author to give this transaction more priority, using the Balances pallet. | `pallet_balances::Call::transfer` in [Polkadot](https://polkadot.subscan.io/extrinsic/8749664-2) | Signed transaction | This function can be called by any account, so we must ensure that the caller signs the transaction and pays a fee for it to be processed.&#xD;&#xA;| Charlie proposes a tip to reward Dave using the Tipping pallet. | `pallet_tips::Call::report_awesome` in [Polkadot](https://polkadot.subscan.io/extrinsic/8818237-2) | Signed transaction | This function is designed so that any account can call it, by depositing some amount and giving a reason for the tip which will be stored on-chain.&#xD;&#xA;| The on-chain council passes some motion that includes submitting a batch of valid transactions to be executed. | `pallet_utility::Call::batch` in [Polkadot](https://polkadot.subscan.io/council/131) | Unsigned transaction | This type of extrinsic can only be submitted if a majority of the council approves it and cannot be executed by any single account.&#xD;&#xA;| A validator node sends a signal to the network to indicate it's online. | `pallet_im_online::Call::heartbeat` in [Kusama](https://kusama.subscan.io/extrinsic/11232100-5) | Unsigned transaction | This can only be called by a node that's registered as a validator in the network, which is verified as part of an internal check of the function's logic and allows the node to call it without paying any fees. &#xD;&#xA;| The network wants block authoring nodes to include the current timestamp into the blocks they produce. | `pallet_timestamp::Call::now` in [Kusama](https://kusama.subscan.io/extrinsic/11232115-0) | Inherent | This is a special extrinsic that can only be included in a block by an authoring node. &#xD;&#xA;| A parachain needs to send its relay chain the validation data the relay chain expects. | `paras_inherent::Call::enter` in [Kusama](https://kusama.subscan.io/extrinsic/11232398-1) | Inherent | This is a special type of extrinsic that can only be sent by a collator node. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20202" PostHistoryTypeId="2" PostId="5383" RevisionGUID="fd036660-bed8-4222-9293-5faf11019167" CreationDate="2022-10-17T10:38:45.253" UserId="94" Text="Querying all entries of a map can be done with the `.entries()` function:  &#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;const identities = await api.query.identity.identityOf.entries();&#xD;&#xA;&#xD;&#xA;identities.forEach(([key, identity]) =&gt; {&#xD;&#xA;	  console.log(key.toHuman(), identity.toHuman());&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;In this case, however, you probably want to use the `entriesPaged` function since it are so many entries and the probably cannot be loaded at once:  &#xD;&#xA;```js&#xD;&#xA;... // Setup same as above&#xD;&#xA;&#xD;&#xA;const PAGE_SIZE = 50;&#xD;&#xA;let last_key = null;&#xD;&#xA;let identities = [];&#xD;&#xA;&#xD;&#xA;for (;;) {&#xD;&#xA;	const new_identities = await api.query.identity.identityOf.entriesPaged({ args: [], pageSize: PAGE_SIZE, startKey: last_key });&#xD;&#xA;	console.log(`Loading ${new_identities.length} more identities…`);&#xD;&#xA;	identities = identities.concat(new_identities);&#xD;&#xA;	if (new_identities.length &lt; PAGE_SIZE) {&#xD;&#xA;		console.log(`Done! Loaded ${identities.length} identities.`);&#xD;&#xA;		break;&#xD;&#xA;	}&#xD;&#xA;	last_key = new_identities[new_identities.length - 1][0];&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20204" PostHistoryTypeId="5" PostId="5349" RevisionGUID="62673bd5-7fa1-4e12-88e9-a5b1542f2516" CreationDate="2022-10-17T12:00:42.720" UserId="298" Comment="deleted 40 characters in body" Text="You can launch a relay chain testnet from the polkadot repo (as Lana mentioned), and i would recommend launching a Rococo chain. There are substrate docs to [launch a local relay chain][1]. That is the most practical way. &#xD;&#xA;&#xD;&#xA;If instead of local relay chain you want to create a Live staging relay chain, so that other validators can connect to it, then you would need to change the chain spec to &quot;Live&quot; instead of Local and then add some initial validator keys. &#xD;&#xA;&#xD;&#xA;To answer the question: &#xD;&#xA;&#xD;&#xA;&gt; is it possible to convert a solo chain (substrate node-template) to a&#xD;&#xA;&gt; relay chain?&#xD;&#xA;&#xD;&#xA;The answer is yes you can, but it is not practical to do so. You will need to add the necessary pallets and perhaps some changes in the node outside of the runtime. There is a learning adventure required in order to really understand what is going on there though. &#xD;&#xA;&#xD;&#xA;I started a community run relay chain test net called [Pop-Art][2], which is a Rococo fork. But i havent yet tried to convert a substrate node template to a relay chain, and makes its not practical there are not much docs on that workflow yet. &#xD;&#xA;&#xD;&#xA;A great step is to add a validator to an already live relay network, before creating a relay network. Follow this tutorial [how to add validators to a relay chain][3] (and here is a similar [issue][4] to gain more breadcrumb insights.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/prepare-a-local-relay-chain/&#xD;&#xA;  [2]: https://apps.decentration.org/?rpc=wss%3A%2F%2Fpopart1.jelliedowl.com#/explorer&#xD;&#xA;  [3]: https://decentration.medium.com/set-up-public-relay-validators-with-a-partner-3ef409c675c7&#xD;&#xA;[4]: https://substrate.stackexchange.com/questions/198/how-do-you-add-new-validators-for-your-blockchain-testnet/199#199" ContentLicense="CC BY-SA 4.0" />
  <row Id="20205" PostHistoryTypeId="2" PostId="5384" RevisionGUID="d0e7986a-4eb1-49e1-b4e4-3513c762ab7e" CreationDate="2022-10-17T12:45:47.093" UserId="480" Text="Both of these have `on_initialize` calls. What's the difference? When is one run vs the other? Why are these separate concepts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20207" PostHistoryTypeId="1" PostId="5384" RevisionGUID="d0e7986a-4eb1-49e1-b4e4-3513c762ab7e" CreationDate="2022-10-17T12:45:47.093" UserId="480" Text="frame_support::traits::OnInitialize vs frame_support::traits::Hooks" ContentLicense="CC BY-SA 4.0" />
  <row Id="20208" PostHistoryTypeId="3" PostId="5384" RevisionGUID="d0e7986a-4eb1-49e1-b4e4-3513c762ab7e" CreationDate="2022-10-17T12:45:47.093" UserId="480" Text="|traits|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20209" PostHistoryTypeId="5" PostId="5376" RevisionGUID="277490c4-13c6-4c86-91df-1268c6cb0b45" CreationDate="2022-10-17T13:14:34.433" UserId="29" Comment="edited body" Text="Wondering if this is how the architecture works.&#xD;&#xA;&#xD;&#xA;For instance if that full node stops running does that mean the light client also stops running?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20210" PostHistoryTypeId="2" PostId="5385" RevisionGUID="a16f1e9b-dac7-4b8d-b448-ec50374e74bb" CreationDate="2022-10-17T13:50:33.057" UserId="3142" Text="This code is from `common/primitives/src/node.rs` in *Substrate*.  Can someone do a part by part break down of this type and explain the intent of each part and the overall intent?&#xD;&#xA;&#xD;&#xA;    pub type AccountId = &lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20212" PostHistoryTypeId="1" PostId="5385" RevisionGUID="a16f1e9b-dac7-4b8d-b448-ec50374e74bb" CreationDate="2022-10-17T13:50:33.057" UserId="3142" Text="Deciphering a complex type declaration for AccountId" ContentLicense="CC BY-SA 4.0" />
  <row Id="20213" PostHistoryTypeId="3" PostId="5385" RevisionGUID="a16f1e9b-dac7-4b8d-b448-ec50374e74bb" CreationDate="2022-10-17T13:50:33.057" UserId="3142" Text="|substrate-node|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20214" PostHistoryTypeId="2" PostId="5386" RevisionGUID="17865b24-b314-4bc7-bbce-aa6774765647" CreationDate="2022-10-17T13:55:57.630" UserId="3317" Text="It works exactly the same way as full nodes. When two full nodes are connected to each other, and one disconnects, the other simply connects to a different full node instead. Same for a light client." ContentLicense="CC BY-SA 4.0" />
  <row Id="20216" PostHistoryTypeId="2" PostId="5387" RevisionGUID="e549d840-2e6c-4672-954b-00c3b5ee0d0f" CreationDate="2022-10-17T14:52:35.950" UserId="2673" Text="Let's assume we have a frontier-based node with smart contract X. From an off-chain worker we want to call X.some_method() which will return data, and then the worker would use this data to make some business decision and submit a transaction back to update the contract state. Would that be possible by directly calling the evm pallet from the off-chain worker, without the need to make RPC calls?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20218" PostHistoryTypeId="1" PostId="5387" RevisionGUID="e549d840-2e6c-4672-954b-00c3b5ee0d0f" CreationDate="2022-10-17T14:52:35.950" UserId="2673" Text="Can an off-chain worker read/write the state of an EVM contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20219" PostHistoryTypeId="3" PostId="5387" RevisionGUID="e549d840-2e6c-4672-954b-00c3b5ee0d0f" CreationDate="2022-10-17T14:52:35.950" UserId="2673" Text="|frontier|evm|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20220" PostHistoryTypeId="2" PostId="5388" RevisionGUID="1022e9c3-f1d7-45e1-8dde-4ecff101f464" CreationDate="2022-10-17T15:26:20.817" UserId="251" Text="This is a more clear one. Check it out https://github.com/darwinia-network/darwinia/blob/4edd24d3cc5ce3bf44fca40e48d79fbd6c94df14/primitives/src/lib.rs#L52-L62.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Alias to type for a signature for a transaction on the relay chain. This allows one of several&#xD;&#xA;/// kinds of underlying crypto to be used, so isn't a fixed size when encoded.&#xD;&#xA;pub type Signature = MultiSignature;&#xD;&#xA;&#xD;&#xA;/// Alias to the public key used for this chain, actually a `MultiSigner`. Like the signature, this&#xD;&#xA;/// also isn't a fixed size when encoded, as different cryptos have different size public keys.&#xD;&#xA;pub type AccountPublic = &lt;Signature as Verify&gt;::Signer;&#xD;&#xA;&#xD;&#xA;/// Alias to the opaque account ID type for this chain, actually a `AccountId32`. This is always&#xD;&#xA;/// 32 bytes.&#xD;&#xA;pub type AccountId = &lt;AccountPublic as IdentifyAccount&gt;::AccountId;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;First, we define the `Signature` type.&#xD;&#xA;&#xD;&#xA;Then, we require that the `Signature` is verify-able. How? We require it has implemented the `Verify` trait.&#xD;&#xA;&#xD;&#xA;And then, the `Verify` trait has an associate type `Signer`. We take that `Signer` as our `AccountPublic`.&#xD;&#xA;&#xD;&#xA;Finally, we require the `AccountPublic` has implemented the `IdentifyAccount`. So, we can use its associate type `AccountId` as our `AccountId`." ContentLicense="CC BY-SA 4.0" />
  <row Id="20222" PostHistoryTypeId="2" PostId="5389" RevisionGUID="09c1ac6e-603d-4627-b65d-dc2f95e4b108" CreationDate="2022-10-17T15:46:23.283" UserId="251" Text="To my understanding:&#xD;&#xA;&#xD;&#xA;`Hooks` is for pallet level. The most common usage is:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::hooks]&#xD;&#xA;impl&lt;T Config&gt; Hooks for Pallet&lt;T&gt; {}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`OnInitialize` is for the runtime level. There are so many other hooks in `Hooks`, but sometimes the runtime only focuses on `on_initialize`.&#xD;&#xA;&#xD;&#xA;And the following code does the same thing:&#xD;&#xA;```rust&#xD;&#xA;&lt;frame_system::Pallet&lt;T&gt; as frame_support::traits::OnInitialize&lt;_&gt;&gt;::on_initialize(0_u32.into());&#xD;&#xA;&lt;frame_system::Pallet&lt;T&gt; as frame_support::traits::Hooks&lt;_&gt;&gt;::on_initialize(0_u32.into());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20224" PostHistoryTypeId="5" PostId="5388" RevisionGUID="43cc86f7-8455-4b13-bf1f-9401a2afb2b7" CreationDate="2022-10-17T15:49:57.573" UserId="251" Comment="added 131 characters in body" Text="This is a more clear one. Check it out https://github.com/darwinia-network/darwinia/blob/4edd24d3cc5ce3bf44fca40e48d79fbd6c94df14/primitives/src/lib.rs#L52-L62.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Alias to type for a signature for a transaction on the relay chain. This allows one of several&#xD;&#xA;/// kinds of underlying crypto to be used, so isn't a fixed size when encoded.&#xD;&#xA;pub type Signature = MultiSignature;&#xD;&#xA;&#xD;&#xA;/// Alias to the public key used for this chain, actually a `MultiSigner`. Like the signature, this&#xD;&#xA;/// also isn't a fixed size when encoded, as different cryptos have different size public keys.&#xD;&#xA;pub type AccountPublic = &lt;Signature as Verify&gt;::Signer;&#xD;&#xA;&#xD;&#xA;/// Alias to the opaque account ID type for this chain, actually a `AccountId32`. This is always&#xD;&#xA;/// 32 bytes.&#xD;&#xA;pub type AccountId = &lt;AccountPublic as IdentifyAccount&gt;::AccountId;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;First, we define the `Signature` type.&#xD;&#xA;&#xD;&#xA;Then, we require that the `Signature` is verify-able. How? We require it has implemented the `Verify` trait.&#xD;&#xA;&#xD;&#xA;And then, the `Verify` trait has an associate type `Signer`. We take that `Signer` as our `AccountPublic`.&#xD;&#xA;&#xD;&#xA;Finally, we require the `AccountPublic` has implemented the `IdentifyAccount`. So, we can use its associate type `AccountId` as our `AccountId`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Why do we do this?&#xD;&#xA;&#xD;&#xA;Because this builds a relationship between these primitives types. We can easily convert/use them." ContentLicense="CC BY-SA 4.0" />
  <row Id="20225" PostHistoryTypeId="2" PostId="5390" RevisionGUID="7b8bc109-69b8-401e-8a4b-485edde2b92c" CreationDate="2022-10-17T16:14:51.693" UserId="2663" Text="I want to test my pallet that get digest info to collect the author of the current block.&#xD;&#xA;So, is it possible to set, for example, Alice as a block author in the mock.rs so I can test it?&#xD;&#xA;&#xD;&#xA;I set up the mock.rs in [this way](https://github.com/Datagen-Project/Datagen-Substrate-Grant/blob/testing_pallet_computational_work/fast_blockchain/pallets/computational-work/src/mock.rs) configuring `pallet_session`, `pallet_node_authorization` and `pallet_aura`.&#xD;&#xA;&#xD;&#xA;but when I try to call a test with `cargo test`:&#xD;&#xA;```rust &#xD;&#xA;#[test]&#xD;&#xA;fn hash_work() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;&#xD;&#xA;		run_to_block(10);&#xD;&#xA;		assert_ok!(ComputationalWork::hash_work(Origin::signed(get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;))));&#xD;&#xA;	})&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I get this error:&#xD;&#xA;```shell&#xD;&#xA;thread 'tests::check_x_block_index_change_by_1' panicked at 'called `Option::unwrap()` on a `None` value', pallets/computational-work/src/lib.rs:140:62&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the lines that cause the error:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Get the block author.&#xD;&#xA;let block_digest = &lt;frame_system::Pallet&lt;T&gt;&gt;::digest();&#xD;&#xA;let digests = block_digest.logs.iter().filter_map(|d| d.as_pre_runtime());&#xD;&#xA;let author = T::FindAuthor::find_author(digests).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think the problem is author that is none in this context." ContentLicense="CC BY-SA 4.0" />
  <row Id="20227" PostHistoryTypeId="1" PostId="5390" RevisionGUID="7b8bc109-69b8-401e-8a4b-485edde2b92c" CreationDate="2022-10-17T16:14:51.693" UserId="2663" Text="How to set Alice as author in the mock.rs for testing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20228" PostHistoryTypeId="3" PostId="5390" RevisionGUID="7b8bc109-69b8-401e-8a4b-485edde2b92c" CreationDate="2022-10-17T16:14:51.693" UserId="2663" Text="|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20229" PostHistoryTypeId="2" PostId="5391" RevisionGUID="6a96b378-628b-4a4a-b8df-d0f4bf472dd2" CreationDate="2022-10-17T16:27:21.967" UserId="251" Text="Add these to your mock file.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_computational_work::Config for Test {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type FindAuthor = AuthorGiven;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct AuthorGiven;&#xD;&#xA;impl FindAuthor&lt;u64&gt; for AuthorGiven {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;u64&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		Some(AliceOrAnyYouWant)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20231" PostHistoryTypeId="5" PostId="5387" RevisionGUID="a5dad406-220d-41ea-8689-2f3bb4f542aa" CreationDate="2022-10-17T16:31:28.950" UserId="251" Comment="added 2 characters in body" Text="Let's assume we have a frontier-based node with smart contract `X`. From an off-chain worker, we want to call `X.some_method()` which will return data, and then the worker would use this data to make some business decisions and submit a transaction back to update the contract state. Would that be possible by directly calling the evm pallet from the off-chain worker, without the need to make RPC calls?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20232" PostHistoryTypeId="2" PostId="5392" RevisionGUID="899fb874-5bd4-4ebc-9408-d156549a97a5" CreationDate="2022-10-17T16:35:21.160" UserId="251" Text="```&#xD;&#xA;rustup default nightly-2022-07-24 &amp;&amp; rustup target add wasm32-unknown-unknown&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;IMO, it's always good to follow the latest Polkadot release CI's Rust toolchain.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/releases/tag/v0.9.30" ContentLicense="CC BY-SA 4.0" />
  <row Id="20234" PostHistoryTypeId="5" PostId="5391" RevisionGUID="dc5f2819-7c33-493d-8525-9f2fe95a0a9e" CreationDate="2022-10-17T16:37:15.220" UserId="251" Comment="added 14 characters in body" Text="Add these to your mock file.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_computational_work::Config for Test {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type FindAuthor = AuthorGiven;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct AuthorGiven;&#xD;&#xA;impl FindAuthor&lt;YourAccountIdType&gt; for AuthorGiven {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;YourAccountIdType&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		Some(AliceOrAnyYouWant)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20235" PostHistoryTypeId="5" PostId="5391" RevisionGUID="e4856357-588c-4c54-9025-e404087cbcfc" CreationDate="2022-10-17T16:51:01.870" UserId="251" Comment="added 23 characters in body" Text="Add these to your mock file.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_computational_work::Config for Test {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type FindAuthor = AuthorGiven;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct AuthorGiven;&#xD;&#xA;impl frame_support::traits::FindAuthor&lt;YourAccountIdType&gt; for AuthorGiven {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;YourAccountIdType&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (sp_runtime::ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		Some(AliceOrAnyYouWant)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20236" PostHistoryTypeId="2" PostId="5393" RevisionGUID="00760ac2-c067-4b23-ae8e-c1ff984b19f9" CreationDate="2022-10-17T18:12:03.687" UserId="484" Text="I am trying to `polkadotXcm.reserveTransferAssets` of KSM on from Rockmine to Dali https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f02010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400000000070010a5d4e800000000  .&#xD;&#xA;&#xD;&#xA;It fails on client side with with`polkadotXcm.UnweighableMessage` from Rococo node.   So message is not sent even. &#xD;&#xA;&#xD;&#xA;When I use `polkadotXcm.teleportAssets`  https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f01010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400010000070010a5d4e800000000  messages reaches our parachain. But that is not configured to receive teleport assets. &#xD;&#xA;&#xD;&#xA;Should we receive teleports from Rockmine? What would be origin? " ContentLicense="CC BY-SA 4.0" />
  <row Id="20238" PostHistoryTypeId="1" PostId="5393" RevisionGUID="00760ac2-c067-4b23-ae8e-c1ff984b19f9" CreationDate="2022-10-17T18:12:03.687" UserId="484" Text="Is teleport of KSM from Rockmine to my parachain should be used instead of reserve transfer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20239" PostHistoryTypeId="3" PostId="5393" RevisionGUID="00760ac2-c067-4b23-ae8e-c1ff984b19f9" CreationDate="2022-10-17T18:12:03.687" UserId="484" Text="|xcm|xcmp|test-network|teleport|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20240" PostHistoryTypeId="5" PostId="5393" RevisionGUID="e1f23975-63f0-48bc-9208-344c45252f06" CreationDate="2022-10-17T18:38:25.417" UserId="29" Comment="edited body; edited title" Text="I am trying to `polkadotXcm.reserveTransferAssets` of ROC on from Rockmine to Dali https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f02010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400000000070010a5d4e800000000  .&#xD;&#xA;&#xD;&#xA;It fails on client side with with`polkadotXcm.UnweighableMessage` from Rococo node.   So message is not sent even. &#xD;&#xA;&#xD;&#xA;When I use `polkadotXcm.teleportAssets`  https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f01010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400010000070010a5d4e800000000  messages reaches our parachain. But that is not configured to receive teleport assets. &#xD;&#xA;&#xD;&#xA;Should we receive teleports from Rockmine? What would be origin? " ContentLicense="CC BY-SA 4.0" />
  <row Id="20241" PostHistoryTypeId="4" PostId="5393" RevisionGUID="e1f23975-63f0-48bc-9208-344c45252f06" CreationDate="2022-10-17T18:38:25.417" UserId="29" Comment="edited body; edited title" Text="Is teleport of ROC from Rockmine to my parachain should be used instead of reserve transfer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20242" PostHistoryTypeId="2" PostId="5394" RevisionGUID="de41cd12-e89f-43fc-ad70-f09cbf40d6ea" CreationDate="2022-10-17T19:37:54.057" UserId="3319" Text="I am creating a new pallet, i have a simple task, get the current block author, i want to check whether I am the current one that is proposing the block or not by comparing the current block author with my id.&#xD;&#xA;&#xD;&#xA;Unfortunately i have been looking and asking everywhere but there is no clear straightforward way of doing it in aura. it would be great if someone show me a step by step guide on how to solve this and how to properly think about solving such problems.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20244" PostHistoryTypeId="1" PostId="5394" RevisionGUID="de41cd12-e89f-43fc-ad70-f09cbf40d6ea" CreationDate="2022-10-17T19:37:54.057" UserId="3319" Text="how to get the current block author?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20245" PostHistoryTypeId="3" PostId="5394" RevisionGUID="de41cd12-e89f-43fc-ad70-f09cbf40d6ea" CreationDate="2022-10-17T19:37:54.057" UserId="3319" Text="|pallet|frame|consensus|aura|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20246" PostHistoryTypeId="2" PostId="5395" RevisionGUID="1c8aa0c9-0083-4a4e-8da8-8f06f66b63d5" CreationDate="2022-10-17T21:02:20.623" UserId="167" Text="You can do so by implementing the [`pallet_authorship::EventHandler`](https://paritytech.github.io/substrate/master/pallet_authorship/trait.EventHandler.html). `pallet-collator-selection` [does exactly this](https://github.com/paritytech/cumulus/blob/220bc559f064d38485d5a21e2ba91a8a237e9d16/pallets/collator-selection/src/lib.rs#L472-L498), which is a pretty straightforward example. &#xD;&#xA;&#xD;&#xA;Then, in the top level runtime, any pallet who's interested in receiving these events about block authorship has to be passed to the authorship pallet: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// in your pallet&#xD;&#xA;impl&lt;T: Config&gt; pallet_authorship::EventHandler for Pallet&lt;T&gt; {..}&#xD;&#xA;&#xD;&#xA;// in `runtime/lib.rs`&#xD;&#xA;impl pallet_authorship::Config {&#xD;&#xA;  type EventHandler: (PalletA, PalletB, ...)&#xD;&#xA;  ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[Example](https://github.com/paritytech/cumulus/blob/220bc559f064d38485d5a21e2ba91a8a237e9d16/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs#L189-L194). &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20249" PostHistoryTypeId="2" PostId="5396" RevisionGUID="188050c7-3133-457c-bdb1-c67904e9e95c" CreationDate="2022-10-17T21:06:16.157" UserId="167" Text="I don't know much about EVM and Frontier, but in general offchain workers cannot write to the state directly, so if they call into a function directly that has some side effect, it will be ignored. The **only** way for them to write to state is to emit a transaction back to the local node and the rest of the network.&#xD;&#xA;&#xD;&#xA;Thus, &#xD;&#xA;&#xD;&#xA;&gt; Would that be possible by directly calling the evm pallet from the off-chain worker, without the need to make RPC calls?&#xD;&#xA;&#xD;&#xA;I believe no. " ContentLicense="CC BY-SA 4.0" />
  <row Id="20251" PostHistoryTypeId="2" PostId="5397" RevisionGUID="13d6b676-6fb3-4d95-9235-fb7cd85de63a" CreationDate="2022-10-17T23:43:09.577" UserId="3331" Text="I'm having problems when using custom keys in the Relay and Parachain. While I can insert the session keys needed to the Relay, I can't make the Parachain start collating.&#xD;&#xA;&#xD;&#xA; - What I'm doing in the Relay Chain:&#xD;&#xA;&#xD;&#xA;Before starting the validator nodes, I insert the keys to the keystore manually for each validator.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme ed25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type gran&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type babe&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type imon&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type para&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme ecdsa --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type beef&#xD;&#xA;&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme ed25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type gran&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type babe&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type imon&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type para&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme ecdsa --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type beef&#xD;&#xA;``` &#xD;&#xA;It works as intended, as the Relay produce and finalize blocks when I start the nodes.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA; - What I'm doing in the Parachain:&#xD;&#xA;&#xD;&#xA;I've tried to start a Parachain with the Alice dev account so it starts with the Alice session keys in the Parachain keystore. But I get:&#xD;&#xA; &#xD;&#xA;`2022-10-17 20:00:18.027  WARN tokio-runtime-worker parachain::collator-protocol: Collation wasn't advertised to any validator.`&#xD;&#xA;&#xD;&#xA;I've also tried using generated accounts and adding the keys using the RPC call&#xD;&#xA;```&#xD;&#xA;curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;aura&quot;, &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot;, &quot;0x6c35ba69b3215cc2d623fc8916640e75bc016b4eb9c7929a8d97fab4d226a342&quot;],&quot;id&quot;:1 }' http://127.0.0.1:9022&#xD;&#xA;```&#xD;&#xA;In this specific case, I'm using the same account that is a Validator in the Relay Chain as a Collator in my Parachain. And I get the same WARN that the collation wasn't advertised to any validator.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What am I doing wrong? I suppose that I'm not inserting the correct keys on the Relay Chain because when I tried using `--alice` in the Parachain I got the same error.&#xD;&#xA;&#xD;&#xA;What are the key types I need to insert in the Relay Chain? &#xD;&#xA;&#xD;&#xA;Appreciate any help/hint or documentation to read to better understand what I'm missing." ContentLicense="CC BY-SA 4.0" />
  <row Id="20253" PostHistoryTypeId="1" PostId="5397" RevisionGUID="13d6b676-6fb3-4d95-9235-fb7cd85de63a" CreationDate="2022-10-17T23:43:09.577" UserId="3331" Text="How to properly set session keys for Relay and Parachain with custom keys" ContentLicense="CC BY-SA 4.0" />
  <row Id="20254" PostHistoryTypeId="3" PostId="5397" RevisionGUID="13d6b676-6fb3-4d95-9235-fb7cd85de63a" CreationDate="2022-10-17T23:43:09.577" UserId="3331" Text="|substrate-node|parachain|parachain-collator|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20256" PostHistoryTypeId="5" PostId="5393" RevisionGUID="c757ae19-cbd3-4f4b-b9ad-39fada30a7ba" CreationDate="2022-10-18T00:56:56.527" UserId="484" Comment="added 47 characters in body" Text="I am trying to `polkadotXcm.reserveTransferAssets` of ROC on from Rockmine to Dali https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f02010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400000000070010a5d4e800000000  .&#xD;&#xA;&#xD;&#xA;It fails on client side with with`polkadotXcm.UnweighableMessage` from Rococo node.   So message is not sent even. &#xD;&#xA;&#xD;&#xA;When I use `polkadotXcm.teleportAssets`  https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f01010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400010000070010a5d4e800000000  messages reaches our parachain. But that is not configured to receive teleport assets. &#xD;&#xA;&#xD;&#xA;Should we receive teleports from Rockmine? What would be origin? Is planned to have Statemine also use Teleport?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20257" PostHistoryTypeId="6" PostId="5393" RevisionGUID="c757ae19-cbd3-4f4b-b9ad-39fada30a7ba" CreationDate="2022-10-18T00:56:56.527" UserId="484" Comment="added 47 characters in body" Text="|xcm|xcmp|statemine|test-network|teleport|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20259" PostHistoryTypeId="2" PostId="5398" RevisionGUID="f04a594f-532b-40c4-ae2d-110660a8f7ed" CreationDate="2022-10-18T03:03:49.327" UserId="251" Text="I think this warning is not related to the session keys. Try add more validators to the relaychain.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And if you are using `--alice` or something like that. You don't need to insert the key manually. These are well-known keys.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And if you want to insert your custom keys, check the runtime session keys configurations.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/cumulus/blob/220bc559f064d38485d5a21e2ba91a8a237e9d16/parachain-template/runtime/src/lib.rs#L168-L172&#xD;&#xA;&#xD;&#xA;Let's take parachain-template as an example. As you can see from the link, you only need to insert the `Aura` key." ContentLicense="CC BY-SA 4.0" />
  <row Id="20261" PostHistoryTypeId="5" PostId="5393" RevisionGUID="3e751bd9-abd2-4695-8081-075e6f30ee9d" CreationDate="2022-10-18T06:34:10.960" UserId="484" Comment="deleted 1 character in body" Text="I am trying to `polkadotXcm.reserveTransferAssets` of ROC on from Rockmine to Dali https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f02010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400000000070010a5d4e800000000  .&#xD;&#xA;&#xD;&#xA;It fails on client side with with`polkadotXcm.UnweighableMessage` from Rococo node.   So message is not sent even. &#xD;&#xA;&#xD;&#xA;When I use `polkadotXcm.teleportAssets`  https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f01010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400010000070010a5d4e800000000  message reaches our parachain. But that is not configured to receive teleport assets. &#xD;&#xA;&#xD;&#xA;Should we receive teleports from Rockmine? What would be origin? Is planned to have Statemine also use Teleport?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20262" PostHistoryTypeId="2" PostId="5399" RevisionGUID="27e4cb8f-55bc-4e3b-9b9c-c077f5c2f78f" CreationDate="2022-10-18T07:38:40.070" UserId="251" Text="`reserveTransferAssets` is okay. That's not the root cause `UnweighableMessage`. &#xD;&#xA;&#xD;&#xA;Check the [documentation](https://github.com/paritytech/polkadot/blob/9d4e1a18b30885af52ae655d2df9a05e041ee88d/xcm/src/v2/mod.rs#L48-L51).&#xD;&#xA;&#xD;&#xA;You should set a reasonable weight. Otherwise, the call will fail." ContentLicense="CC BY-SA 4.0" />
  <row Id="20264" PostHistoryTypeId="5" PostId="5393" RevisionGUID="e4f3d0b1-95d8-4bc2-8691-f0ea6f45b1d4" CreationDate="2022-10-18T08:44:33.437" UserId="484" Comment="added 63 characters in body" Text="I am trying to `polkadotXcm.reserveTransferAssets` of ROC on from Rockmine to Dali https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f02010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400000000070010a5d4e800000000  .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It fails on client side with with`polkadotXcm.UnweighableMessage` from Rococo node. There is no field in `reserveTransferAssets` to set weight. And message is not sent at all. &#xD;&#xA;&#xD;&#xA;When I use `polkadotXcm.teleportAssets`  https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f01010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400010000070010a5d4e800000000  message reaches our parachain. But that is not configured to receive teleport assets. &#xD;&#xA;&#xD;&#xA;Should we receive teleports from Rockmine? What would be origin? Is planned to have Statemine also use Teleport?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20265" PostHistoryTypeId="5" PostId="5393" RevisionGUID="fcdb8b7c-6180-4582-a0f6-61d5f3acff40" CreationDate="2022-10-18T08:49:33.957" UserId="484" Comment="added 63 characters in body" Text="I am trying to `polkadotXcm.reserveTransferAssets` of ROC on from Rockmine to Dali https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f02010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400010000070088526a7400000000  .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It fails on client side with with`polkadotXcm.UnweighableMessage` from Rococo node. There is no field in `reserveTransferAssets` to set weight. And message is not sent at all. &#xD;&#xA;&#xD;&#xA;When I use `polkadotXcm.teleportAssets`  https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f01010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400010000070088526a7400000000  message reaches our parachain. But it is not configured to receive teleport assets. &#xD;&#xA;&#xD;&#xA;Should we receive teleports from Rockmine? What would be origin? Is planned to have Statemine also use Teleport?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20266" PostHistoryTypeId="2" PostId="5400" RevisionGUID="21160a6b-b691-4eff-9958-9ef88392acaa" CreationDate="2022-10-18T09:41:10.943" UserId="3002" Text="To update a parachain in a dev environment without redeploying the relaychain and other parachains I used `sudoScheduleParaCleanup` extrinsic.&#xD;&#xA;&#xD;&#xA;The cleanup and new onboarding seemed successful initially. The problem happened after a few blocks when the collator crashed with the following error:&#xD;&#xA;&#xD;&#xA;```log&#xD;&#xA;2022-10-18 09:03:30 Starting collation. relay_parent=0x9e5e9e6dcbf78cf17346e6573d3fe257d430059408745031dec80dd8d66e0ff4 at=0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52&#xD;&#xA;2022-10-18 09:03:31  Idle (4 peers), best: #10141 (0x3bfb…8afe), finalized #10138 (0x6950…3eae), ⬇ 10.2kiB/s ⬆ 4.6kiB/s    &#xD;&#xA;2022-10-18 09:03:31  Idle (0 peers), best: #23 (0x94e9…8e52), finalized #23 (0x94e9…8e52), ⬇ 1.9kiB/s ⬆ 2.2kiB/s    &#xD;&#xA;2022-10-18 09:03:36  Idle (4 peers), best: #10141 (0x3bfb…8afe), finalized #10139 (0xd224…475b), ⬇ 3.9kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-10-18 09:03:36 ✨ Imported #10142 (0xc883…f8d4)    &#xD;&#xA;2022-10-18 09:03:36 Starting collation. relay_parent=0xc883fc56364e142ba5a9f85fb138dc0993e58be2dce9b122b8fdd6cf7e84f8d4 at=0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52&#xD;&#xA;2022-10-18 09:03:36  Starting consensus session on top of parent 0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52    &#xD;&#xA;2022-10-18 09:03:36 panicked at 'assertion failed: `(left == right)`&#xD;&#xA;  left: `0x3e6a5c84463407e77553ef347433d4a572c8231b3ffd2354122b64d03acd273d`,&#xD;&#xA; right: `0x0000000000000000000000000000000000000000000000000000000000000000`', /usr/local/cargo/git/checkouts/cumulus-59522f43471fa161/e43b8b8/pallets/parachain-system/src/lib.rs:837:9    &#xD;&#xA;2022-10-18 09:03:36 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2022-10-18 09:03:36 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2022-10-18 09:03:36 ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x25c39b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x1b0ae6 - &lt;unknown&gt;!core::panicking::panic_fmt::h63691436dedafe6d&#xD;&#xA;    2: 0x1b1062 - &lt;unknown&gt;!core::panicking::assert_failed_inner::h1d186295e5367630&#xD;&#xA;    3: 0x16e7dd - &lt;unknown&gt;!core::panicking::assert_failed::h4b0117c0b1dd3f55&#xD;&#xA;    4: 0x4510c - &lt;unknown&gt;!cumulus_pallet_parachain_system::pallet::Pallet&lt;T&gt;::set_validation_data::hd7af8de3e13ce66d&#xD;&#xA;    5: 0x90f50 - &lt;unknown&gt;!frame_support::storage::transactional::in_storage_layer::h7baa97a0134057d0&#xD;&#xA;    6: 0x156698 - &lt;unknown&gt;!&lt;acurast_runtime::Call as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::hf20466489c06f7c1&#xD;&#xA;    7: 0x1564f4 - &lt;unknown&gt;!&lt;acurast_runtime::Call as sp_runtime::traits::Dispatchable&gt;::dispatch::h9e89655c23bde5b8&#xD;&#xA;    8: 0x173fdb - &lt;unknown&gt;!&lt;sp_runtime::generic::checked_extrinsic::CheckedExtrinsic&lt;AccountId,Call,Extra&gt; as sp_runtime::traits::Applyable&gt;::apply::h81eadf6a6d516e25&#xD;&#xA;    9: 0x1107d9 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::apply_extrinsic::h3fcb07763bfcee8a&#xD;&#xA;   10: 0x64903 - &lt;unknown&gt;!BlockBuilder_apply_extrinsic&#xD;&#xA;. Dropping.    &#xD;&#xA;2022-10-18 09:03:36 panicked at 'set_validation_data inherent needs to be present in every block!', /usr/local/cargo/git/checkouts/cumulus-59522f43471fa161/e43b8b8/pallets/parachain-system/src/lib.rs:191:13    &#xD;&#xA;2022-10-18 09:03:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x25c39b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x1b0ae6 - &lt;unknown&gt;!core::panicking::panic_fmt::h63691436dedafe6d&#xD;&#xA;    2: 0x3480c - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnFinalize&lt;BlockNumber&gt;&gt;::on_finalize::ha360e62e0930872d&#xD;&#xA;    3: 0x110bc0 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::finalize_block::h586a07c505998964&#xD;&#xA;    4: 0x649b5 - &lt;unknown&gt;!BlockBuilder_finalize_block&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After the cleanup, I noticed a delay in block production of ~10 seconds from the target, which is 12s.&#xD;&#xA;&#xD;&#xA;Does anyone have any hint about what may be causing this error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20268" PostHistoryTypeId="1" PostId="5400" RevisionGUID="21160a6b-b691-4eff-9958-9ef88392acaa" CreationDate="2022-10-18T09:41:10.943" UserId="3002" Text="Sudo parachain cleanup issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="20269" PostHistoryTypeId="3" PostId="5400" RevisionGUID="21160a6b-b691-4eff-9958-9ef88392acaa" CreationDate="2022-10-18T09:41:10.943" UserId="3002" Text="|parachain|sudo|cleanup|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20270" PostHistoryTypeId="5" PostId="5400" RevisionGUID="fcfa3dfb-6bf1-40bc-b977-90b64675f98d" CreationDate="2022-10-18T09:59:47.510" UserId="3002" Comment="added 106 characters in body" Text="To update a parachain in a dev environment without redeploying the relaychain and other parachains I used `sudoScheduleParaCleanup` extrinsic.&#xD;&#xA;&#xD;&#xA;The cleanup and new onboarding seemed successful initially. The problem happened after a few blocks when the collator crashed with the following error:&#xD;&#xA;&#xD;&#xA;```log&#xD;&#xA;2022-10-18 09:03:30 Starting collation. relay_parent=0x9e5e9e6dcbf78cf17346e6573d3fe257d430059408745031dec80dd8d66e0ff4 at=0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52&#xD;&#xA;2022-10-18 09:03:31  Idle (4 peers), best: #10141 (0x3bfb…8afe), finalized #10138 (0x6950…3eae), ⬇ 10.2kiB/s ⬆ 4.6kiB/s    &#xD;&#xA;2022-10-18 09:03:31  Idle (0 peers), best: #23 (0x94e9…8e52), finalized #23 (0x94e9…8e52), ⬇ 1.9kiB/s ⬆ 2.2kiB/s    &#xD;&#xA;2022-10-18 09:03:36  Idle (4 peers), best: #10141 (0x3bfb…8afe), finalized #10139 (0xd224…475b), ⬇ 3.9kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-10-18 09:03:36 ✨ Imported #10142 (0xc883…f8d4)    &#xD;&#xA;2022-10-18 09:03:36 Starting collation. relay_parent=0xc883fc56364e142ba5a9f85fb138dc0993e58be2dce9b122b8fdd6cf7e84f8d4 at=0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52&#xD;&#xA;2022-10-18 09:03:36  Starting consensus session on top of parent 0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52    &#xD;&#xA;2022-10-18 09:03:36 panicked at 'assertion failed: `(left == right)`&#xD;&#xA;  left: `0x3e6a5c84463407e77553ef347433d4a572c8231b3ffd2354122b64d03acd273d`,&#xD;&#xA; right: `0x0000000000000000000000000000000000000000000000000000000000000000`', /usr/local/cargo/git/checkouts/cumulus-59522f43471fa161/e43b8b8/pallets/parachain-system/src/lib.rs:837:9    &#xD;&#xA;2022-10-18 09:03:36 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2022-10-18 09:03:36 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2022-10-18 09:03:36 ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x25c39b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x1b0ae6 - &lt;unknown&gt;!core::panicking::panic_fmt::h63691436dedafe6d&#xD;&#xA;    2: 0x1b1062 - &lt;unknown&gt;!core::panicking::assert_failed_inner::h1d186295e5367630&#xD;&#xA;    3: 0x16e7dd - &lt;unknown&gt;!core::panicking::assert_failed::h4b0117c0b1dd3f55&#xD;&#xA;    4: 0x4510c - &lt;unknown&gt;!cumulus_pallet_parachain_system::pallet::Pallet&lt;T&gt;::set_validation_data::hd7af8de3e13ce66d&#xD;&#xA;    5: 0x90f50 - &lt;unknown&gt;!frame_support::storage::transactional::in_storage_layer::h7baa97a0134057d0&#xD;&#xA;    6: 0x156698 - &lt;unknown&gt;!&lt;acurast_runtime::Call as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::hf20466489c06f7c1&#xD;&#xA;    7: 0x1564f4 - &lt;unknown&gt;!&lt;acurast_runtime::Call as sp_runtime::traits::Dispatchable&gt;::dispatch::h9e89655c23bde5b8&#xD;&#xA;    8: 0x173fdb - &lt;unknown&gt;!&lt;sp_runtime::generic::checked_extrinsic::CheckedExtrinsic&lt;AccountId,Call,Extra&gt; as sp_runtime::traits::Applyable&gt;::apply::h81eadf6a6d516e25&#xD;&#xA;    9: 0x1107d9 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::apply_extrinsic::h3fcb07763bfcee8a&#xD;&#xA;   10: 0x64903 - &lt;unknown&gt;!BlockBuilder_apply_extrinsic&#xD;&#xA;. Dropping.    &#xD;&#xA;2022-10-18 09:03:36 panicked at 'set_validation_data inherent needs to be present in every block!', /usr/local/cargo/git/checkouts/cumulus-59522f43471fa161/e43b8b8/pallets/parachain-system/src/lib.rs:191:13    &#xD;&#xA;2022-10-18 09:03:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x25c39b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x1b0ae6 - &lt;unknown&gt;!core::panicking::panic_fmt::h63691436dedafe6d&#xD;&#xA;    2: 0x3480c - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnFinalize&lt;BlockNumber&gt;&gt;::on_finalize::ha360e62e0930872d&#xD;&#xA;    3: 0x110bc0 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::finalize_block::h586a07c505998964&#xD;&#xA;    4: 0x649b5 - &lt;unknown&gt;!BlockBuilder_finalize_block&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After the cleanup, I noticed a delay in block production of ~10 seconds from the target, which is 12s.&#xD;&#xA;&#xD;&#xA;Does anyone have any hint about what may be causing this error?&#xD;&#xA;&#xD;&#xA;**UPDATE 1:** It seems that the crash occurs when I call `sudoEstablishHrmpChannel` on the relaychain." ContentLicense="CC BY-SA 4.0" />
  <row Id="20271" PostHistoryTypeId="5" PostId="5400" RevisionGUID="f24ad437-3b1a-4725-8dc8-ada83da63763" CreationDate="2022-10-18T10:08:05.893" UserId="3002" Comment="added 1 character in body" Text="To update a parachain in a dev environment without redeploying the relaychain and other parachains I used `sudoScheduleParaCleanup` extrinsic.&#xD;&#xA;&#xD;&#xA;The cleanup and new onboarding seemed successful initially. The problem happened after a few blocks when the collator crashed with the following error:&#xD;&#xA;&#xD;&#xA;```log&#xD;&#xA;2022-10-18 09:03:30 Starting collation. relay_parent=0x9e5e9e6dcbf78cf17346e6573d3fe257d430059408745031dec80dd8d66e0ff4 at=0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52&#xD;&#xA;2022-10-18 09:03:31  Idle (4 peers), best: #10141 (0x3bfb…8afe), finalized #10138 (0x6950…3eae), ⬇ 10.2kiB/s ⬆ 4.6kiB/s    &#xD;&#xA;2022-10-18 09:03:31  Idle (0 peers), best: #23 (0x94e9…8e52), finalized #23 (0x94e9…8e52), ⬇ 1.9kiB/s ⬆ 2.2kiB/s    &#xD;&#xA;2022-10-18 09:03:36  Idle (4 peers), best: #10141 (0x3bfb…8afe), finalized #10139 (0xd224…475b), ⬇ 3.9kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-10-18 09:03:36 ✨ Imported #10142 (0xc883…f8d4)    &#xD;&#xA;2022-10-18 09:03:36 Starting collation. relay_parent=0xc883fc56364e142ba5a9f85fb138dc0993e58be2dce9b122b8fdd6cf7e84f8d4 at=0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52&#xD;&#xA;2022-10-18 09:03:36  Starting consensus session on top of parent 0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52    &#xD;&#xA;2022-10-18 09:03:36 panicked at 'assertion failed: `(left == right)`&#xD;&#xA;  left: `0x3e6a5c84463407e77553ef347433d4a572c8231b3ffd2354122b64d03acd273d`,&#xD;&#xA; right: `0x0000000000000000000000000000000000000000000000000000000000000000`', /usr/local/cargo/git/checkouts/cumulus-59522f43471fa161/e43b8b8/pallets/parachain-system/src/lib.rs:837:9    &#xD;&#xA;2022-10-18 09:03:36 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2022-10-18 09:03:36 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2022-10-18 09:03:36 ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x25c39b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x1b0ae6 - &lt;unknown&gt;!core::panicking::panic_fmt::h63691436dedafe6d&#xD;&#xA;    2: 0x1b1062 - &lt;unknown&gt;!core::panicking::assert_failed_inner::h1d186295e5367630&#xD;&#xA;    3: 0x16e7dd - &lt;unknown&gt;!core::panicking::assert_failed::h4b0117c0b1dd3f55&#xD;&#xA;    4: 0x4510c - &lt;unknown&gt;!cumulus_pallet_parachain_system::pallet::Pallet&lt;T&gt;::set_validation_data::hd7af8de3e13ce66d&#xD;&#xA;    5: 0x90f50 - &lt;unknown&gt;!frame_support::storage::transactional::in_storage_layer::h7baa97a0134057d0&#xD;&#xA;    6: 0x156698 - &lt;unknown&gt;!&lt;acurast_runtime::Call as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::hf20466489c06f7c1&#xD;&#xA;    7: 0x1564f4 - &lt;unknown&gt;!&lt;acurast_runtime::Call as sp_runtime::traits::Dispatchable&gt;::dispatch::h9e89655c23bde5b8&#xD;&#xA;    8: 0x173fdb - &lt;unknown&gt;!&lt;sp_runtime::generic::checked_extrinsic::CheckedExtrinsic&lt;AccountId,Call,Extra&gt; as sp_runtime::traits::Applyable&gt;::apply::h81eadf6a6d516e25&#xD;&#xA;    9: 0x1107d9 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::apply_extrinsic::h3fcb07763bfcee8a&#xD;&#xA;   10: 0x64903 - &lt;unknown&gt;!BlockBuilder_apply_extrinsic&#xD;&#xA;. Dropping.    &#xD;&#xA;2022-10-18 09:03:36 panicked at 'set_validation_data inherent needs to be present in every block!', /usr/local/cargo/git/checkouts/cumulus-59522f43471fa161/e43b8b8/pallets/parachain-system/src/lib.rs:191:13    &#xD;&#xA;2022-10-18 09:03:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x25c39b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x1b0ae6 - &lt;unknown&gt;!core::panicking::panic_fmt::h63691436dedafe6d&#xD;&#xA;    2: 0x3480c - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnFinalize&lt;BlockNumber&gt;&gt;::on_finalize::ha360e62e0930872d&#xD;&#xA;    3: 0x110bc0 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::finalize_block::h586a07c505998964&#xD;&#xA;    4: 0x649b5 - &lt;unknown&gt;!BlockBuilder_finalize_block&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After the cleanup, I noticed a delay in block production of ~10 seconds from the target, which is 12s.&#xD;&#xA;&#xD;&#xA;Does anyone have any hint about what may be causing this error?&#xD;&#xA;&#xD;&#xA;**UPDATE 1:** It seems that the crash occurs when calling `sudoEstablishHrmpChannel` on the relaychain." ContentLicense="CC BY-SA 4.0" />
  <row Id="20272" PostHistoryTypeId="5" PostId="5399" RevisionGUID="6a95090a-0123-44e2-a43f-d42f202a1adb" CreationDate="2022-10-18T10:16:17.990" UserId="251" Comment="added 572 characters in body" Text="`reserveTransferAssets` is okay. That's not the root cause `UnweighableMessage`. &#xD;&#xA;&#xD;&#xA;Check the [documentation](https://github.com/paritytech/polkadot/blob/9d4e1a18b30885af52ae655d2df9a05e041ee88d/xcm/src/v2/mod.rs#L48-L51).&#xD;&#xA;&#xD;&#xA;You should set a reasonable weight. Otherwise, the call will fail.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;[`reserve_transfer_assets `](https://github.com/paritytech/polkadot/blob/9d4e1a18b30885af52ae655d2df9a05e041ee88d/xcm/pallet-xcm/src/lib.rs#L549) will call the [`do_reserve_transfer_assets`](https://github.com/paritytech/polkadot/blob/9d4e1a18b30885af52ae655d2df9a05e041ee88d/xcm/pallet-xcm/src/lib.rs#L781) internally with the weight `None`. Then it will enter [here](https://github.com/paritytech/polkadot/blob/9d4e1a18b30885af52ae655d2df9a05e041ee88d/xcm/pallet-xcm/src/lib.rs#L820-L821). So, check the `Weighter`. IIUC, &quot;you should set a reasonable weighter in `runtime/lib.rs`&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="20273" PostHistoryTypeId="12" PostId="5400" RevisionGUID="08d52921-215c-4b9a-b5eb-5c46a7991f7a" CreationDate="2022-10-18T10:55:57.753" UserId="3002" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3002,&quot;DisplayName&quot;:&quot;Rodrigo Quelhas&quot;}]}" />
  <row Id="20274" PostHistoryTypeId="13" PostId="5400" RevisionGUID="8d01b5f5-5511-4e58-ae23-804256d4f3eb" CreationDate="2022-10-18T10:56:48.797" UserId="3002" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3002,&quot;DisplayName&quot;:&quot;Rodrigo Quelhas&quot;}]}" />
  <row Id="20275" PostHistoryTypeId="2" PostId="5401" RevisionGUID="e25a768c-00d0-46a2-821b-92aab1e54d72" CreationDate="2022-10-18T11:02:43.077" UserId="3304" Text="I am running two para chains(para chain A and Para chain B)  and a relay chain with two validators Alice and bob.&#xD;&#xA;I need to implement the use-case below:&#xD;&#xA;For para chain A the chain spec is newSpec.json and for para chain B the chain spec is newSpec1.json(updated) and for relay chain i am using newSpec1.json.&#xD;&#xA;Will the para chain and relay chain produce new blocks if yes how to test it.&#xD;&#xA;&#xD;&#xA;Thank you in advance...... " ContentLicense="CC BY-SA 4.0" />
  <row Id="20277" PostHistoryTypeId="1" PostId="5401" RevisionGUID="e25a768c-00d0-46a2-821b-92aab1e54d72" CreationDate="2022-10-18T11:02:43.077" UserId="3304" Text="chain-spec for parachains and relaychans" ContentLicense="CC BY-SA 4.0" />
  <row Id="20278" PostHistoryTypeId="3" PostId="5401" RevisionGUID="e25a768c-00d0-46a2-821b-92aab1e54d72" CreationDate="2022-10-18T11:02:43.077" UserId="3304" Text="|polkadot|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20279" PostHistoryTypeId="2" PostId="5402" RevisionGUID="71901c25-83e4-41bd-9696-335c87a5bab6" CreationDate="2022-10-18T11:09:05.063" UserId="1732" Text="You assume that both para B and relay chain use the same chain specs `newSpec1`, this can't work.&#xD;&#xA;Each chain needs its own chainspecs.&#xD;&#xA;&#xD;&#xA;2 validators will not be enough for a standard relay chain but this should work if your relay is a fork of Rococo (still that is very small, I would recommend 5 validators at least).&#xD;&#xA;&#xD;&#xA;For a proper setup:&#xD;&#xA;1. Deploy the relay chain with its validators&#xD;&#xA;2. Register the 2 parachains (you will need a RPC endpoint to do this from pjs portal)&#xD;&#xA;3. Deploy the 2 parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="20281" PostHistoryTypeId="2" PostId="5403" RevisionGUID="4d8c8479-d33c-4efb-8917-3b41cbfd2af4" CreationDate="2022-10-18T11:24:11.770" UserId="1959" Text="First, you should use `reserve_transfer`, because `teleport` requires both the source and destination of have a high level of mutual trust. Details can be found [here](https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm/38#38).&#xD;&#xA;&#xD;&#xA;About `UnweighableMessage`, I think there may be a bug in statemint runtime 9290 and it's ok in RT9220. Please wait for my debugging results for specific reasons, and I will update the answer soon." ContentLicense="CC BY-SA 4.0" />
  <row Id="20283" PostHistoryTypeId="2" PostId="5404" RevisionGUID="c7d1141d-5fe7-4aad-819e-3ee8cf858845" CreationDate="2022-10-18T11:34:42.690" UserId="3265" Text="This sounds to me like a silly question - but how do I actually return something from a pallet call?&#xD;&#xA;&#xD;&#xA;e.g. in the most basic example:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    #[pallet::weight(0)]&#xD;&#xA;	pub fn get_answer_to_everything(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;		Ok(42)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my concrete example I have something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	pub(super) type Names&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;		(BoundedVec&lt;u8, T::MaxLength&gt;, T::AccountId)&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and I want to have a custom getter because polkadot.js seems to not play nicely with boundedvec and i want to have something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::weight(0)]&#xD;&#xA;pub fn get_name(_origin: OriginFor&lt;T&gt;, name_id: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;  let bounded_name_id: BoundedVec&lt;_, _&gt; = name_id.try_into().map_err(|_| Error::&lt;T&gt;::NameIdInvalidLengthTooLong)?;&#xD;&#xA;  ensure!(&lt;Names&lt;T&gt;&gt;::contains_key(&amp;bounded_name_id), Error::&lt;T&gt;::NameDoesNotExist);&#xD;&#xA;&#xD;&#xA;  // return &lt;Names&lt;T&gt;&gt;::get(bounded_name_id) here&#xD;&#xA;  Ok(())&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20285" PostHistoryTypeId="1" PostId="5404" RevisionGUID="c7d1141d-5fe7-4aad-819e-3ee8cf858845" CreationDate="2022-10-18T11:34:42.690" UserId="3265" Text="How to return values from pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20286" PostHistoryTypeId="3" PostId="5404" RevisionGUID="c7d1141d-5fe7-4aad-819e-3ee8cf858845" CreationDate="2022-10-18T11:34:42.690" UserId="3265" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20287" PostHistoryTypeId="5" PostId="5404" RevisionGUID="36ad16a5-ba97-4fe3-87bb-52f0afe7a685" CreationDate="2022-10-18T11:49:06.400" UserId="251" Comment="deleted 11 characters in body" Text="This sounds to me like a silly question - but how do I actually return something from a pallet call?&#xD;&#xA;&#xD;&#xA;e.g. in the most basic example:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::weight(0)]&#xD;&#xA;pub fn get_answer_to_everything(_origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;	Ok(42)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my concrete example I have something like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type Names&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;	_,&#xD;&#xA;	Blake2_128Concat,&#xD;&#xA;	BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;	(BoundedVec&lt;u8, T::MaxLength&gt;, T::AccountId)&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and I want to have a custom getter because polkadot.js seems to not play nicely with boundedvec and i want to have something like:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::weight(0)]&#xD;&#xA;pub fn get_name(_origin: OriginFor&lt;T&gt;, name_id: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;  let bounded_name_id: BoundedVec&lt;_, _&gt; = name_id.try_into().map_err(|_| Error::&lt;T&gt;::NameIdInvalidLengthTooLong)?;&#xD;&#xA;  ensure!(&lt;Names&lt;T&gt;&gt;::contains_key(&amp;bounded_name_id), Error::&lt;T&gt;::NameDoesNotExist);&#xD;&#xA;&#xD;&#xA;  // return &lt;Names&lt;T&gt;&gt;::get(bounded_name_id) here&#xD;&#xA;  Ok(())&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20288" PostHistoryTypeId="2" PostId="5405" RevisionGUID="e31885ea-07ea-492a-8815-558129dcbb17" CreationDate="2022-10-18T11:53:12.980" UserId="251" Text="No. And that's not a good idea.&#xD;&#xA;&#xD;&#xA;You are making a query into an extrinsic. This means it will cost a fee when you query some storage. (if possible)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Maybe you should wrap `BoundedVec` with a struct and add a special decoding method on JS side. I'm not sure about this. It's another question.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Or make a custom RPC method like pallet-transaction-payment or others, but I think this makes things complicated." ContentLicense="CC BY-SA 4.0" />
  <row Id="20290" PostHistoryTypeId="2" PostId="5406" RevisionGUID="a7f1390f-36d6-432c-81ff-3e32a5c190c7" CreationDate="2022-10-18T12:42:09.880" UserId="3344" Text="There appear to be 2 two substrate forks addressing offchain data storage with a IPFS backend:&#xD;&#xA;&#xD;&#xA;- https://github.com/iridium-labs/substrate/tree/iris&#xD;&#xA;- https://github.com/WunderbarNetwork/substrate/tree/ipfs-ocw&#xD;&#xA;&#xD;&#xA;As best I can tell (very new here so could be wrong) they take 2 different approaches: Pallet vs chain extension.&#xD;&#xA;&#xD;&#xA;1. What are the relative merits of each approach?&#xD;&#xA;2. Which is more likely to land upstream?&#xD;&#xA;3. Is it possible to track/estimate the timeframe in which these might land upstream?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20292" PostHistoryTypeId="1" PostId="5406" RevisionGUID="a7f1390f-36d6-432c-81ff-3e32a5c190c7" CreationDate="2022-10-18T12:42:09.880" UserId="3344" Text="Storing data Offchain to IPFS: Pallet vs chain extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="20293" PostHistoryTypeId="3" PostId="5406" RevisionGUID="a7f1390f-36d6-432c-81ff-3e32a5c190c7" CreationDate="2022-10-18T12:42:09.880" UserId="3344" Text="|storage|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20294" PostHistoryTypeId="2" PostId="5407" RevisionGUID="4a928603-f8bf-44e6-800e-d30d840ba329" CreationDate="2022-10-18T12:42:41.107" UserId="501" Text="Its been a while, but I think I solved it using this code bellow.&#xD;&#xA;&#xD;&#xA;Note the `.method.toU8a()` to get the call.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const destination = {&#xD;&#xA;    V0: {&#xD;&#xA;        X1: {&#xD;&#xA;            Parachain: parachainId.toNumber(),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;let templatePalletcall = await parachainApiInstInsurance.tx.templatePallet.doXcmMessage(account.address, &quot;Hello world&quot;).method.toU8a()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;const message = {&#xD;&#xA;    V0: {&#xD;&#xA;        Transact: {&#xD;&#xA;            originType: &quot;Native&quot;,&#xD;&#xA;            requireWeightAtMost: 100000,&#xD;&#xA;            call: {&#xD;&#xA;                encoded: compactAddLength(templatePalletcall)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const txHash = await relaychainApiInst.tx.xcmPallet.send(destination, message).signAndSend(account);&#xD;&#xA;&#xD;&#xA;console.log(&quot;txHash: &quot;, txHash.toHex())&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20296" PostHistoryTypeId="2" PostId="5408" RevisionGUID="ebd47180-76ad-42ef-9956-df93a979cec6" CreationDate="2022-10-18T12:45:41.627" UserId="2455" Text="I am running a local testnet of a 2-validator-node polkadot Relay Chain (release-v0.9.27) and I am trying to connect a parachain-template to it (v0.9.27), with custom keys. The Relay Chain is working as intended, producing and finalizing blocks.&#xD;&#xA;&#xD;&#xA;When I connect the parachain (have tried with 1 collator and 2 collators) to the Relay Chain, the parachain tries to import the first block but never does it, and all I get is `Collation wasn't advertised to any validator`. That procedure continues for a while (5-10mins) and then I get the following errors:&#xD;&#xA;&#xD;&#xA;`[Parachain] Block import error: State Database error: Too many sibling blocks inserted`&#xD;&#xA;&#xD;&#xA;`[Parachain] Error with block built on 0xda79ce961787fcc5e5a97a19cd2a03695b30ee1791fb94a5045cf58f164951d0: Import failed: State Database error: Too many sibling blocks inserted`&#xD;&#xA;&#xD;&#xA;`[Parachain] Failed to collect collation info. error=Application(UnknownBlock(&quot;Header was not found in the database: 0x89acf273da66c70e14bd8c5daac0f82235522d15a61ef0a06d925dcf08a3340d&quot;))`&#xD;&#xA;&#xD;&#xA;I have checked everything in this sanity checklist (https://substrate.stackexchange.com/questions/178/how-can-i-get-my-parachain-to-produce-blocks-sanity-checklist and https://substrate.stackexchange.com/questions/1394/our-parachain-doesnt-produce-blocks-checklist) and everything should work.&#xD;&#xA;&#xD;&#xA;I have also tried increasing the Validator count of the Relay Chain to 3 and I am still getting the same results." ContentLicense="CC BY-SA 4.0" />
  <row Id="20298" PostHistoryTypeId="1" PostId="5408" RevisionGUID="ebd47180-76ad-42ef-9956-df93a979cec6" CreationDate="2022-10-18T12:45:41.627" UserId="2455" Text="Parachain isn't producing blocks (collation wasn't advertised to any validator)" ContentLicense="CC BY-SA 4.0" />
  <row Id="20299" PostHistoryTypeId="3" PostId="5408" RevisionGUID="ebd47180-76ad-42ef-9956-df93a979cec6" CreationDate="2022-10-18T12:45:41.627" UserId="2455" Text="|parachain|parachain-collator|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20300" PostHistoryTypeId="2" PostId="5409" RevisionGUID="34651ac7-bd91-4c29-8748-fe54d8b961e2" CreationDate="2022-10-18T12:45:42.893" UserId="567" Text="Will it be possible to upgrade from ink! 3.3.1 to ink 4.0 on-chain via set_code_hash while keeping the contract storage?&#xD;&#xA;&#xD;&#xA;A lot of questions are rising from ink! 4.0 so any other clarification is welcomed" ContentLicense="CC BY-SA 4.0" />
  <row Id="20302" PostHistoryTypeId="1" PostId="5409" RevisionGUID="34651ac7-bd91-4c29-8748-fe54d8b961e2" CreationDate="2022-10-18T12:45:42.893" UserId="567" Text="Migration from ink! 3.3.1 to upcoming 4.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="20303" PostHistoryTypeId="3" PostId="5409" RevisionGUID="34651ac7-bd91-4c29-8748-fe54d8b961e2" CreationDate="2022-10-18T12:45:42.893" UserId="567" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20304" PostHistoryTypeId="2" PostId="5410" RevisionGUID="423d4dbc-fd1c-4c38-9cfb-05a45aa136ca" CreationDate="2022-10-18T12:56:30.970" UserId="3345" Text="how to check the rate limits of concrete RPC?&#xD;&#xA;it works until some time and then starts throwing an error. I suspect it's the rate limits&#xD;&#xA;&#xD;&#xA;I connect to the remote node. For example &quot;wss://acala-rpc.dwellir.com&quot;.&#xD;&#xA;It is interesting that when this RPC throws an error, all &quot;wss://*-rpc.dwellir.com&quot; throws the same error. So looks like it's some generic mechanism.  I assume it simply bans by IP.&#xD;&#xA;&#xD;&#xA;With other remote RPC endpoints situation is the same.&#xD;&#xA;&#xD;&#xA;These 2 logs are consecutive:&#xD;&#xA;&#xD;&#xA;    2022-10-09 19:27:04          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;    2022-10-09 19:27:04          API-WS: disconnected from wss://acala-rpc.dwellir.com: 1006:: connection failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="20306" PostHistoryTypeId="1" PostId="5410" RevisionGUID="423d4dbc-fd1c-4c38-9cfb-05a45aa136ca" CreationDate="2022-10-18T12:56:30.970" UserId="3345" Text="RPC connection errors(rate limits?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="20307" PostHistoryTypeId="3" PostId="5410" RevisionGUID="423d4dbc-fd1c-4c38-9cfb-05a45aa136ca" CreationDate="2022-10-18T12:56:30.970" UserId="3345" Text="|rpc|wss|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20308" PostHistoryTypeId="2" PostId="5411" RevisionGUID="decd231a-f7e1-41a2-a41f-97aec0858b5b" CreationDate="2022-10-18T13:00:17.650" UserId="3002" Text="The error above happens when `genesis.runtime.parachainInfo.parachainId` differs from `para_id` in the chain spec.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;para_id&quot;: 2000,&#xD;&#xA;  &quot;genesis&quot;: {&#xD;&#xA;   &quot;runtime&quot;: {&#xD;&#xA;    &quot;parachainInfo&quot;: { &quot;parachainId&quot;: 2001 }&#xD;&#xA;   }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When calling `sudoEstablishHrmpChannel`, it causes the collator to crash because the identifiers differ." ContentLicense="CC BY-SA 4.0" />
  <row Id="20310" PostHistoryTypeId="4" PostId="5400" RevisionGUID="7a5f0f38-2f12-41b7-a542-f625434a5d6c" CreationDate="2022-10-18T13:03:38.070" UserId="3002" Comment="Update title and tags" Text="Failure on HRMP channel creation" ContentLicense="CC BY-SA 4.0" />
  <row Id="20311" PostHistoryTypeId="6" PostId="5400" RevisionGUID="7a5f0f38-2f12-41b7-a542-f625434a5d6c" CreationDate="2022-10-18T13:03:38.070" UserId="3002" Comment="Update title and tags" Text="|parachain|genesis|hrmp|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20312" PostHistoryTypeId="5" PostId="5400" RevisionGUID="7a5f0f38-2f12-41b7-a542-f625434a5d6c" CreationDate="2022-10-18T13:03:38.070" UserId="3002" Comment="Update title and tags" Text="To update a parachain in a dev environment without redeploying the relaychain and other parachains I used `sudoScheduleParaCleanup` extrinsic.&#xD;&#xA;&#xD;&#xA;The cleanup and new onboarding seemed successful initially. The problem happened after a few blocks when the collator crashed with the following error:&#xD;&#xA;&#xD;&#xA;```log&#xD;&#xA;2022-10-18 09:03:30 Starting collation. relay_parent=0x9e5e9e6dcbf78cf17346e6573d3fe257d430059408745031dec80dd8d66e0ff4 at=0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52&#xD;&#xA;2022-10-18 09:03:31  Idle (4 peers), best: #10141 (0x3bfb…8afe), finalized #10138 (0x6950…3eae), ⬇ 10.2kiB/s ⬆ 4.6kiB/s    &#xD;&#xA;2022-10-18 09:03:31  Idle (0 peers), best: #23 (0x94e9…8e52), finalized #23 (0x94e9…8e52), ⬇ 1.9kiB/s ⬆ 2.2kiB/s    &#xD;&#xA;2022-10-18 09:03:36  Idle (4 peers), best: #10141 (0x3bfb…8afe), finalized #10139 (0xd224…475b), ⬇ 3.9kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-10-18 09:03:36 ✨ Imported #10142 (0xc883…f8d4)    &#xD;&#xA;2022-10-18 09:03:36 Starting collation. relay_parent=0xc883fc56364e142ba5a9f85fb138dc0993e58be2dce9b122b8fdd6cf7e84f8d4 at=0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52&#xD;&#xA;2022-10-18 09:03:36  Starting consensus session on top of parent 0x94e9c7738a66713e577ad027fb099160ca44eb72426b8e110669645e22928e52    &#xD;&#xA;2022-10-18 09:03:36 panicked at 'assertion failed: `(left == right)`&#xD;&#xA;  left: `0x3e6a5c84463407e77553ef347433d4a572c8231b3ffd2354122b64d03acd273d`,&#xD;&#xA; right: `0x0000000000000000000000000000000000000000000000000000000000000000`', /usr/local/cargo/git/checkouts/cumulus-59522f43471fa161/e43b8b8/pallets/parachain-system/src/lib.rs:837:9    &#xD;&#xA;2022-10-18 09:03:36 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2022-10-18 09:03:36 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2022-10-18 09:03:36 ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x25c39b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x1b0ae6 - &lt;unknown&gt;!core::panicking::panic_fmt::h63691436dedafe6d&#xD;&#xA;    2: 0x1b1062 - &lt;unknown&gt;!core::panicking::assert_failed_inner::h1d186295e5367630&#xD;&#xA;    3: 0x16e7dd - &lt;unknown&gt;!core::panicking::assert_failed::h4b0117c0b1dd3f55&#xD;&#xA;    4: 0x4510c - &lt;unknown&gt;!cumulus_pallet_parachain_system::pallet::Pallet&lt;T&gt;::set_validation_data::hd7af8de3e13ce66d&#xD;&#xA;    5: 0x90f50 - &lt;unknown&gt;!frame_support::storage::transactional::in_storage_layer::h7baa97a0134057d0&#xD;&#xA;    6: 0x156698 - &lt;unknown&gt;!&lt;acurast_runtime::Call as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::hf20466489c06f7c1&#xD;&#xA;    7: 0x1564f4 - &lt;unknown&gt;!&lt;acurast_runtime::Call as sp_runtime::traits::Dispatchable&gt;::dispatch::h9e89655c23bde5b8&#xD;&#xA;    8: 0x173fdb - &lt;unknown&gt;!&lt;sp_runtime::generic::checked_extrinsic::CheckedExtrinsic&lt;AccountId,Call,Extra&gt; as sp_runtime::traits::Applyable&gt;::apply::h81eadf6a6d516e25&#xD;&#xA;    9: 0x1107d9 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::apply_extrinsic::h3fcb07763bfcee8a&#xD;&#xA;   10: 0x64903 - &lt;unknown&gt;!BlockBuilder_apply_extrinsic&#xD;&#xA;. Dropping.    &#xD;&#xA;2022-10-18 09:03:36 panicked at 'set_validation_data inherent needs to be present in every block!', /usr/local/cargo/git/checkouts/cumulus-59522f43471fa161/e43b8b8/pallets/parachain-system/src/lib.rs:191:13    &#xD;&#xA;2022-10-18 09:03:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x25c39b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x1b0ae6 - &lt;unknown&gt;!core::panicking::panic_fmt::h63691436dedafe6d&#xD;&#xA;    2: 0x3480c - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnFinalize&lt;BlockNumber&gt;&gt;::on_finalize::ha360e62e0930872d&#xD;&#xA;    3: 0x110bc0 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::finalize_block::h586a07c505998964&#xD;&#xA;    4: 0x649b5 - &lt;unknown&gt;!BlockBuilder_finalize_block&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does anyone have any hint about what may be causing this error?&#xD;&#xA;&#xD;&#xA;**UPDATE 1:** It seems that the crash occurs when calling `sudoEstablishHrmpChannel` on the relaychain." ContentLicense="CC BY-SA 4.0" />
  <row Id="20313" PostHistoryTypeId="5" PostId="5405" RevisionGUID="c0a1507a-6bcd-4170-85bd-6ab2fdd4563e" CreationDate="2022-10-18T14:14:25.650" UserId="251" Comment="added 363 characters in body" Text="No. And that's not a good idea.&#xD;&#xA;&#xD;&#xA;You are making a query into an extrinsic. This means it will cost a fee when you query some storage. (if possible)&#xD;&#xA;&#xD;&#xA;It is impossible to return a value from the pallet call.&#xD;&#xA;&#xD;&#xA;But if you want a getter of the storage.&#xD;&#xA;&#xD;&#xA;Add `#[pallet::getter(fn name)]` above the `Names`. Then, you get a rpc method `name`. You could find that in PolkadotApps - ChainState - Pallet - name.&#xD;&#xA;&#xD;&#xA;But if you complain about the `BoundedVec` display style in PolkadotApps, try the following things.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Maybe you should wrap `BoundedVec` with a struct and add a special decoding method on JS side. I'm not sure about this. It's another question.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Or make a custom RPC method like pallet-transaction-payment or others, but I think this makes things complicated." ContentLicense="CC BY-SA 4.0" />
  <row Id="20319" PostHistoryTypeId="5" PostId="5403" RevisionGUID="45b4aa0a-eb8a-4f14-996b-85c97dd6159a" CreationDate="2022-10-18T15:16:35.530" UserId="1959" Comment="added 872 characters in body" Text="First, you should use `reserve_transfer`, because `teleport` requires both the source and destination of have a high level of mutual trust. Details can be found [here](https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm/38#38).&#xD;&#xA;&#xD;&#xA;About `UnweighableMessage`, I think there may be a bug in statemint runtime 9290 and it's ok in RT9220. Please wait for my debugging results for specific reasons, and I will update the answer soon.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;Well, some prs related to `UnweighableMessage` : &#xD;&#xA;&#xD;&#xA;1. https://github.com/paritytech/cumulus/pull/1454&#xD;&#xA;2. https://github.com/paritytech/cumulus/pull/1629&#xD;&#xA;&#xD;&#xA;Focus this line: https://github.com/paritytech/cumulus/pull/1629/files#diff-ba0e9507c93c11e6a5cc354264540f9fab51dcaf97cfe7e28aebf08bb8c915f8R60&#xD;&#xA;```&#xD;&#xA;// Currently there is no trusted reserve&#xD;&#xA;fn reserve_asset_deposited(_assets: &amp;MultiAssets) -&gt; XCMWeight {&#xD;&#xA;	u64::MAX&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This will make the weight of the `reserve_asset_deposited` instruction fail on `check_add` due to **u64 overflow**. And then `UnweighableMessage`.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;However, **you could use `limited_reserve_transfer_assets`** instead of `reserve_transfer_assets` to avoid this error. Because it will not call weigher to compute the weight here. https://github.com/paritytech/polkadot/blob/release-v0.9.29/xcm/pallet-xcm/src/lib.rs#L796" ContentLicense="CC BY-SA 4.0" />
  <row Id="20320" PostHistoryTypeId="5" PostId="5403" RevisionGUID="23f29b96-29e4-4612-b7aa-ff13a8d5d8bd" CreationDate="2022-10-18T15:24:30.763" UserId="1959" Comment="added 872 characters in body" Text="First, you should use `reserve_transfer`, because `teleport` requires both the source and destination of have a high level of mutual trust. Details can be found [here](https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm/38#38).&#xD;&#xA;&#xD;&#xA;About `UnweighableMessage`, I think there may be a bug in statemint runtime 9290 and it's ok in RT9220. Please wait for my debugging results for specific reasons, and I will update the answer soon.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;Well, some prs related to `UnweighableMessage` : &#xD;&#xA;&#xD;&#xA;1. https://github.com/paritytech/cumulus/pull/1454&#xD;&#xA;2. https://github.com/paritytech/cumulus/pull/1629&#xD;&#xA;&#xD;&#xA;Focus on this line: https://github.com/paritytech/cumulus/pull/1629/files#diff-ba0e9507c93c11e6a5cc354264540f9fab51dcaf97cfe7e28aebf08bb8c915f8R60&#xD;&#xA;```&#xD;&#xA;// Currently there is no trusted reserve&#xD;&#xA;fn reserve_asset_deposited(_assets: &amp;MultiAssets) -&gt; XCMWeight {&#xD;&#xA;	u64::MAX&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This will make the weight of the `reserve_asset_deposited` instruction fail on [`check_add`](https://github.com/paritytech/polkadot/blob/release-v0.9.29/xcm/xcm-builder/src/weight.rs#L97) due to **u64 overflow**. And then `UnweighableMessage`.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;However, **you could use `limited_reserve_transfer_assets`** instead of `reserve_transfer_assets` to avoid this error. Because it will not call weigher to compute the weight [here]( https://github.com/paritytech/polkadot/blob/release-v0.9.29/xcm/pallet-xcm/src/lib.rs#L796).&#xD;&#xA;&#xD;&#xA;like this: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rockmine-rpc.polkadot.io#/extrinsics/decode/0x1f08010101009d2001000101002aa47c41b763a16946b6cc7e051174877b14fafe5d8daf075b0e39e2398c8e4c010400010000070088526a740000000000&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20321" PostHistoryTypeId="2" PostId="5413" RevisionGUID="79edb354-85f9-428c-98c8-1f53bfb4c4e1" CreationDate="2022-10-18T15:26:50.370" UserId="3346" Text="**We are getting the below canonicalization issue and we are wondering:**&#xD;&#xA;&#xD;&#xA; - Is it a problem or is it normal and can be ignored?&#xD;&#xA; - Has anyone found a method to resolve it?&#xD;&#xA;&#xD;&#xA; **Here's what we know:**&#xD;&#xA;&#xD;&#xA; - It consistently begins at block 2400, and occurs in every block thereafter&#xD;&#xA; - It occurs on --dev, --pruning archive, --unsafe-pruning (for any number) but only on validator nodes (not on sync nodes - that part makes sense)&#xD;&#xA; - It occurs on all node accounts, including Bob and other development node accounts&#xD;&#xA; - Sometimes it is followed by the comment *Offchain: could not prune: no entry in pruning map for block*, but not always.&#xD;&#xA; - It does not seem to affect latency, block production, etc&#xD;&#xA; - We are running the Substrate kitchen sink master 09.26&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Log Sample:**&#xD;&#xA;&#xD;&#xA;2022-10-03 10:21:57 ✨ Imported #2400 (0xbcf6…a1d1)    &#xD;&#xA;2022-10-03 10:21:57 Could not canonicalize elem at pos 0 using key [12, 109, 109, 114, 179, 231, 150, 242, 116, 82, 112, 40, 61, 105, 19, 211, 47, 138, 252, 83, 183, 123, 184, 153, 192, 116, 137, 163, 141, 85, 35, 94, 41, 140, 112, 6, 0, 0, 0, 0, 0, 0, 0, 0]    &#xD;&#xA;2022-10-03 10:21:57 Offchain: could not prune: no entry in pruning map for block 0    &#xD;&#xA;2022-10-03 10:21:57 ♻️  Reorg on #2400,0xbcf6…a1d1 to #2400,0xf59d…0abd, common ancestor #2399,0xe757…9679    &#xD;&#xA;2022-10-03 10:21:57 ✨ Imported #2400 (0xf59d…0abd)    &#xD;&#xA;2022-10-03 10:21:57 Could not canonicalize elem at pos 0 using key [12, 109, 109, 114, 179, 231, 150, 242, 116, 82, 112, 40, 61, 105, 19, 211, 47, 138, 252, 83, 183, 123, 184, 153, 192, 116, 137, 163, 141, 85, 35, 94, 41, 140, 112, 6, 0, 0, 0, 0, 0, 0, 0, 0]    &#xD;&#xA;2022-10-03 10:21:57 Offchain: could not prune: no entry in pruning map for block 0    &#xD;&#xA;2022-10-03 10:22:00  New epoch 12 launching at block 0x716f…5741 (block slot 554935640 &gt;= start slot 554935640).    &#xD;&#xA;2022-10-03 10:22:00  Next epoch starts at slot 554935840    &#xD;&#xA;2022-10-03 10:22:00 ✨ Imported #2401 (0x716f…5741)    &#xD;&#xA;2022-10-03 10:22:00 Could not canonicalize elem at pos 1 using key [12, 109, 109, 114, 231, 162, 175, 129, 3, 105, 243, 83, 25, 239, 92, 131, 52, 160, 52, 125, 39, 24, 187, 185, 18, 0, 111, 70, 240, 16, 197, 70, 27, 241, 63, 19, 1, 0, 0, 0, 0, 0, 0, 0]    &#xD;&#xA;2022-10-03 10:22:00 Could not canonicalize elem at pos 2 using key [12, 109, 109, 114, 231, 162, 175, 129, 3, 105, 243, 83, 25, 239, 92, 131, 52, 160, 52, 125, 39, 24, 187, 185, 18, 0, 111, 70, 240, 16, 197, 70, 27, 241, 63, 19, 2, 0, 0, 0, 0, 0, 0, 0]    " ContentLicense="CC BY-SA 4.0" />
  <row Id="20323" PostHistoryTypeId="1" PostId="5413" RevisionGUID="79edb354-85f9-428c-98c8-1f53bfb4c4e1" CreationDate="2022-10-18T15:26:50.370" UserId="3346" Text="Is this canonicalization issue a problem and if so, has anyone solved it? - &quot;Could not canonicalize elem at pos x using key&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20324" PostHistoryTypeId="3" PostId="5413" RevisionGUID="79edb354-85f9-428c-98c8-1f53bfb4c4e1" CreationDate="2022-10-18T15:26:50.370" UserId="3346" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20326" PostHistoryTypeId="2" PostId="5414" RevisionGUID="39b01936-be59-4a27-b228-6476a1e7a6a9" CreationDate="2022-10-18T16:08:12.847" UserId="3347" Text="Extrinsic transactions are sent to the validation pool, set to ready state and then broadcasted. After this, they are re-submitted to the validation pool until it reaches its validity period (valid_till). At this point the transaction is completely removed from the pendingExtrinsics. None of the transactions are successfully validated and are getting added to the block.&#xD;&#xA;&#xD;&#xA;More context: The chain has been running as expected for 8 weeks and the last wasm upgrade was done 3 weeks ago. The validators are still producing and finalizing new blocks.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-18 15:03:38.561 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255432, tv_nsec: 535242295 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:38.561 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:38.561 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Ready (replaced with None)&#xD;&#xA;2022-10-18 15:03:38.561 DEBUG tokio-runtime-worker txpool: Pool Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:38.562 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Broadcasted&#xD;&#xA;2022-10-18 15:03:39.360  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931829 (0x88a9…e42d), finalized #931827 (0xd50e…8666), ⬇ 7.2kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:03:39.802  INFO tokio-runtime-worker jsonrpsee_ws_server::server: Accepting new connection, 8/1000&#xD;&#xA;2022-10-18 15:03:42.028 TRACE tokio-runtime-worker txpool: Pruning transactions: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d]&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:42.028  INFO tokio-runtime-worker substrate: ✨ Imported #931830 (0x1293…e8e8)&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8)&#xD;&#xA;2022-10-18 15:03:42.028 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d] Pruned at 0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931830. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931830}&#xD;&#xA;2022-10-18 15:03:42.198 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:42.198 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255436, tv_nsec: 171786265 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:42.891 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x469f…5660&#xD;&#xA;2022-10-18 15:03:42.891 DEBUG tokio-runtime-worker txpool: [0x007249e1fa512b1c41c02a616f1c6d1692035bb4f3baf549fe1249927eeffeab] Sent finalization event (block 0x469f2370f05adb57fd6b4022bbe51c7b439c622bb7ff24ccd335b095c13a5660)&#xD;&#xA;2022-10-18 15:03:44.361  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931830 (0x1293…e8e8), finalized #931828 (0x469f…5660), ⬇ 7.4kiB/s ⬆ 6.9kiB/s&#xD;&#xA;2022-10-18 15:03:48.015 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x082ac78b0d0c4b181a5ce30c3448c5229cb6a34c3971c482a5fd4b65d8e2ebb8]&#xD;&#xA;2022-10-18 15:03:48.015 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:48.015  INFO tokio-runtime-worker substrate: ✨ Imported #931831 (0x646e…1107)&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107)&#xD;&#xA;2022-10-18 15:03:48.019 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: [0x082ac78b0d0c4b181a5ce30c3448c5229cb6a34c3971c482a5fd4b65d8e2ebb8] Pruned at 0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931831. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931831}&#xD;&#xA;2022-10-18 15:03:48.206 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:48.207 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255442, tv_nsec: 180733891 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:49.362  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931831 (0x646e…1107), finalized #931828 (0x469f…5660), ⬇ 6.0kiB/s ⬆ 6.0kiB/s&#xD;&#xA;2022-10-18 15:03:49.594 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x88a9…e42d&#xD;&#xA;2022-10-18 15:03:49.594 DEBUG tokio-runtime-worker txpool: [0x8520c0056df9322315ecec98acd45cfb394d8fdbe85013a0d910ad9a4c68374a] Sent finalization event (block 0x88a9da21e21049ffd13c9652de3ed41c75c518123f15428f84fa625333f5e42d)&#xD;&#xA;2022-10-18 15:03:54.022 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x324ddc150236de28c1aae13853deb7adba0280d77f7f6b0a6db8ae46d6a3c150]&#xD;&#xA;2022-10-18 15:03:54.022 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:54.022  INFO tokio-runtime-worker substrate: ✨ Imported #931832 (0x2dca…d137)&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137)&#xD;&#xA;2022-10-18 15:03:54.027 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: [0x324ddc150236de28c1aae13853deb7adba0280d77f7f6b0a6db8ae46d6a3c150] Pruned at 0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931832. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931832}&#xD;&#xA;2022-10-18 15:03:54.216 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:54.216 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255448, tv_nsec: 189970246 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:54.363  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931832 (0x2dca…d137), finalized #931829 (0x88a9…e42d), ⬇ 6.9kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:03:54.958 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x1293…e8e8&#xD;&#xA;2022-10-18 15:03:54.958 DEBUG tokio-runtime-worker txpool: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d] Sent finalization event (block 0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8)&#xD;&#xA;2022-10-18 15:03:59.364  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931832 (0x2dca…d137), finalized #931830 (0x1293…e8e8), ⬇ 6.6kiB/s ⬆ 5.9kiB/s&#xD;&#xA;2022-10-18 15:04:00.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137&#xD;&#xA;2022-10-18 15:04:00.002 TRACE tokio-runtime-worker txpool: Transaction pool already processed block  #931832&#xD;&#xA;2022-10-18 15:04:00.002 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Reported as invalid. Will skip sub-chains while iterating.&#xD;&#xA;2022-10-18 15:04:00.003  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 931833 (1 ms) [hash: 0x141d8a7c342833701ac236f3fdb4bb7237b4591481207c658d7352dbacd939d2; parent_hash: 0x2dca…d137; extrinsics (1): [0xa19a…0f44]]&#xD;&#xA;2022-10-18 15:04:00.006  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 931833. Hash now 0x93bf36a7dc5c61f076a69859cee8aa9ba0602e97b8dd6547b9591c9c4ef74453, previously 0x141d8a7c342833701ac236f3fdb4bb7237b4591481207c658d7352dbacd939d2.&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;(revalidations)&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;2022-10-18 15:09:24.021 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x0a1f07340f857ea719b161d1c842edb555911dfcfb82c55899ec7678ce1c882d]&#xD;&#xA;2022-10-18 15:09:24.021 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175)&#xD;&#xA;2022-10-18 15:09:24.023 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: [0x0a1f07340f857ea719b161d1c842edb555911dfcfb82c55899ec7678ce1c882d] Pruned at 0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Removing invalid transactions: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a]&#xD;&#xA;2022-10-18 15:09:24.023 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Removed invalid transactions: [Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}]&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Extrinsic invalid&#xD;&#xA;2022-10-18 15:09:24.023  INFO tokio-runtime-worker substrate: ✨ Imported #931887 (0x4de6…5175)&#xD;&#xA;2022-10-18 15:09:24.434  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931887 (0x4de6…5175), finalized #931884 (0x1eed…1a6c), ⬇ 7.1kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:09:24.902 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x7727…fd97&#xD;&#xA;2022-10-18 15:09:24.902 DEBUG tokio-runtime-worker txpool: [0x117ccd88df4751c4c5e6e282b7633207915597befcc01e9af21e95a1944fd764] Sent finalization event (block 0x77273c2754b1fa43c8ad7b8f1022b886b93750f794192358e6ed7dcd3086fd97)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20328" PostHistoryTypeId="1" PostId="5414" RevisionGUID="39b01936-be59-4a27-b228-6476a1e7a6a9" CreationDate="2022-10-18T16:08:12.847" UserId="3347" Text="No Extrinsics/Transactions are validating and getting added to the block successfully" ContentLicense="CC BY-SA 4.0" />
  <row Id="20329" PostHistoryTypeId="3" PostId="5414" RevisionGUID="39b01936-be59-4a27-b228-6476a1e7a6a9" CreationDate="2022-10-18T16:08:12.847" UserId="3347" Text="|substrate-node|substrate-node-template|transactions|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20330" PostHistoryTypeId="2" PostId="5415" RevisionGUID="0c9fc267-c5ac-4018-a38b-8af1ccf77562" CreationDate="2022-10-18T16:09:01.977" UserId="3346" Text="We have been experimenting with lots of different configurations to avoid this error, with no luck. Eventually, this error takes the entire network down. **The most interesting part is that the keystores are found deleted.** Has anyone solved this?&#xD;&#xA;&#xD;&#xA;**What We Have Tried And What We Know:**&#xD;&#xA;&#xD;&#xA; - various flags do not correct the problem: --unsafe-pruning, --pruning archive, --validator (only)&#xD;&#xA; - We are running the substrate kitchen sink node 09.26 in all instances&#xD;&#xA; - We have double checked that the Granpa keys are the correct type (ed25519)&#xD;&#xA; - We have double checked that the keys are correct and that the passwords are entered correctly when starting up.&#xD;&#xA; - This problem seems to occur anywhere from 1600 to 183,257 blocks in (not predictable)&#xD;&#xA; - **Consistently, when the error occurs, you will find the keystore suddenly EMPTY** (if the keystore is being emptied, that would certainly cause the error BUT why would the keystore be deleted?). We cannot tell if the keystore was deleted before or after the grandpa voter error.&#xD;&#xA;&#xD;&#xA;**Log Sample:**&#xD;&#xA;&#xD;&#xA;2022-10-07 20:04:53 GRANDPA voter error: could not sign outgoing message: Failed to sign GRANDPA vote for round 1669 targetting 0xfc773739b96844d15df0146e218a608b51bd02b0e525a20a8c6b6520074e3ad7    &#xD;&#xA;2022-10-07 20:04:53 Essential task `grandpa-voter` failed. Shutting down service.    &#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;)) &#xD;&#xA;&#xD;&#xA;**Has anyone else had this problem? What we are missing?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="20332" PostHistoryTypeId="1" PostId="5415" RevisionGUID="0c9fc267-c5ac-4018-a38b-8af1ccf77562" CreationDate="2022-10-18T16:09:01.977" UserId="3346" Text="How To Prevent &quot;Grandpa Voter Error&quot; And Randomly Deleted Keystore" ContentLicense="CC BY-SA 4.0" />
  <row Id="20333" PostHistoryTypeId="3" PostId="5415" RevisionGUID="0c9fc267-c5ac-4018-a38b-8af1ccf77562" CreationDate="2022-10-18T16:09:01.977" UserId="3346" Text="|substrate-node|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20334" PostHistoryTypeId="5" PostId="5415" RevisionGUID="ddce22a5-8952-42ed-859c-689065f9fea1" CreationDate="2022-10-18T16:23:53.730" UserId="251" Comment="added 10 characters in body" Text="We have been experimenting with lots of different configurations to avoid this error, with no luck. Eventually, this error takes the entire network down. **The most interesting part is that the keystores are found deleted.** Has anyone solved this?&#xD;&#xA;&#xD;&#xA;**What We Have Tried And What We Know:**&#xD;&#xA;&#xD;&#xA; - various flags do not correct the problem: --unsafe-pruning, --pruning archive, --validator (only)&#xD;&#xA; - We are running the substrate kitchen sink node 09.26 in all instances&#xD;&#xA; - We have double checked that the Granpa keys are the correct type (ed25519)&#xD;&#xA; - We have double checked that the keys are correct and that the passwords are entered correctly when starting up.&#xD;&#xA; - This problem seems to occur anywhere from 1600 to 183,257 blocks in (not predictable)&#xD;&#xA; - **Consistently, when the error occurs, you will find the keystore suddenly EMPTY** (if the keystore is being emptied, that would certainly cause the error BUT why would the keystore be deleted?). We cannot tell if the keystore was deleted before or after the grandpa voter error.&#xD;&#xA;&#xD;&#xA;**Log Sample:**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-07 20:04:53 GRANDPA voter error: could not sign outgoing message: Failed to sign GRANDPA vote for round 1669 targetting 0xfc773739b96844d15df0146e218a608b51bd02b0e525a20a8c6b6520074e3ad7    &#xD;&#xA;2022-10-07 20:04:53 Essential task `grandpa-voter` failed. Shutting down service.    &#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;)) &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Has anyone else had this problem? What we are missing?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="20335" PostHistoryTypeId="5" PostId="5415" RevisionGUID="7224f158-a65d-4ded-a242-d224c43807fa" CreationDate="2022-10-18T16:50:31.933" UserId="3346" Comment="edited body" Text="We have been experimenting with lots of different configurations to avoid this error, with no luck. Eventually, this error takes the entire network down. **The most interesting part is that the keystores are found deleted.** Has anyone solved this?&#xD;&#xA;&#xD;&#xA;**What We Have Tried And What We Know:**&#xD;&#xA;&#xD;&#xA; - various flags do not correct the problem: --unsafe-pruning, --pruning archive, --validator (only)&#xD;&#xA; - We are running the substrate kitchen sink node 09.26 in all instances&#xD;&#xA; - We have double checked that the Granpa keys are the correct type (ed25519)&#xD;&#xA; - We have double checked that the keys are correct and that the passwords are entered correctly when starting up.&#xD;&#xA; - This problem seems to occur anywhere from 1600 to 183,257 blocks in (not predictable)&#xD;&#xA; - **Consistently, when the error occurs, you will find the keystore suddenly EMPTY** (if the keystore is being emptied, that would certainly cause the error BUT why would the keystore be deleted?). We cannot tell if the keystore was deleted before or after the grandpa voter error.&#xD;&#xA;&#xD;&#xA;**Log Sample:**&#xD;&#xA;&#xD;&#xA;2022-10-07 20:04:53 GRANDPA voter error: could not sign outgoing message: Failed to sign GRANDPA vote for round 1669 targetting 0xfc773739b96844d15df0146e218a608b51bd02b0e525a20a8c6b6520074e3ad7    &#xD;&#xA;2022-10-07 20:04:53 Essential task `grandpa-voter` failed. Shutting down service.    &#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;)) &#xD;&#xA;&#xD;&#xA;**Has anyone else had this problem? What are we missing?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="20336" PostHistoryTypeId="2" PostId="5416" RevisionGUID="fe5a80fa-0a96-48ba-a243-bc85bf76392c" CreationDate="2022-10-18T17:07:41.560" UserId="3000" Text="i need to add item in storage but when i build the project , show me this error : &#xD;&#xA;&#xD;&#xA;&gt;error[E0609]: no field `storeId` on type `&amp;mut std::option::Option&lt;BusinessInfo&lt;T&gt;&gt;`&#xD;&#xA;   --&gt; pallets/bussines/src/lib.rs:171:25&#xD;&#xA;    |&#xD;&#xA;171 |                 ensure!((Some(store.storeId) == Some(store_id)), &lt;Error&lt;T&gt;&gt;::StoreItemNotFound);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i dont know what is the problem . &#xD;&#xA;&#xD;&#xA;this is `BusinessInfo` struct : &#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub struct BusinessInfo&lt;T: Config&gt; {&#xD;&#xA;		logo: Vec&lt;u8&gt;,&#xD;&#xA;		storeId: [u8; 16],&#xD;&#xA;		owner: &lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;		description: Vec&lt;u8&gt;,&#xD;&#xA;		name: Vec&lt;u8&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i tried to check if business exsists add item if not show error : &#xD;&#xA;&#xD;&#xA;    		#[pallet::weight(10000)]&#xD;&#xA;		#[transactional]&#xD;&#xA;		pub fn add_item(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			store_id: [u8; 16],&#xD;&#xA;			media: Vec&lt;u8&gt;,&#xD;&#xA;			title: Vec&lt;u8&gt;,&#xD;&#xA;			description: Vec&lt;u8&gt;,&#xD;&#xA;			price: u32,&#xD;&#xA;			count: u32,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let item_id = Self::gen_dna();&#xD;&#xA;&#xD;&#xA;			let item_info = BusinessItem {&#xD;&#xA;				media: media.clone(),&#xD;&#xA;				title: title.clone(),&#xD;&#xA;				description: description.clone(),&#xD;&#xA;				price: price.clone(),&#xD;&#xA;				count: count.clone(),&#xD;&#xA;				itemId: item_id,&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			Business::&lt;T&gt;::mutate(who.clone(), |store| -&gt; DispatchResult {&#xD;&#xA;				ensure!((Some(store.storeId) == Some(store_id)), &lt;Error&lt;T&gt;&gt;::StoreItemNotFound);&#xD;&#xA;				let mut store_item_vec: Vec&lt;BusinessItem&gt; = Vec::new();&#xD;&#xA;				store_item_vec.push(item_info);&#xD;&#xA;				&lt;Items&lt;T&gt;&gt;::insert(item_id, who.clone(), store_item_vec);&#xD;&#xA;				Ok(())&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ItemCreated(Some(item_id)));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;and this is `Business Storage` : &#xD;&#xA;&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn business)]&#xD;&#xA;	pub(super) type Business&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Twox64Concat, T::AccountId, BusinessInfo&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20338" PostHistoryTypeId="1" PostId="5416" RevisionGUID="fe5a80fa-0a96-48ba-a243-bc85bf76392c" CreationDate="2022-10-18T17:07:41.560" UserId="3000" Text="no field `storeId` on type `&amp;mut std::option::Option&lt;BusinessInfo&lt;T&gt;&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="20339" PostHistoryTypeId="3" PostId="5416" RevisionGUID="fe5a80fa-0a96-48ba-a243-bc85bf76392c" CreationDate="2022-10-18T17:07:41.560" UserId="3000" Text="|substrate-node|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20340" PostHistoryTypeId="5" PostId="5397" RevisionGUID="60b8fdd1-5fc3-4c7a-92e4-1ae92e497014" CreationDate="2022-10-18T17:45:18.560" UserId="3331" Comment="added 761 characters in body" Text="I'm having problems when using custom keys in the Relay and Parachain. While I can insert the session keys needed to the Relay, I can't make the Parachain start collating.&#xD;&#xA;&#xD;&#xA; - What I'm doing in the Relay Chain:&#xD;&#xA;&#xD;&#xA;Before starting the validator nodes, I insert the keys to the keystore manually for each validator.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme ed25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type gran&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type babe&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type imon&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type para&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme ecdsa --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type beef&#xD;&#xA;&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme ed25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type gran&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type babe&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type imon&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type para&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme ecdsa --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type beef&#xD;&#xA;``` &#xD;&#xA;It works as intended, as the Relay produce and finalize blocks when I start the nodes.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA; - What I'm doing in the Parachain:&#xD;&#xA;&#xD;&#xA;I've tried to start a Parachain with the Alice dev account so it starts with the Alice session keys in the Parachain keystore. But I get:&#xD;&#xA; &#xD;&#xA;`2022-10-17 20:00:18.027  WARN tokio-runtime-worker parachain::collator-protocol: Collation wasn't advertised to any validator.`&#xD;&#xA;&#xD;&#xA;I've also tried using generated accounts and adding the keys using the RPC call&#xD;&#xA;```&#xD;&#xA;curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;aura&quot;, &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot;, &quot;0x6c35ba69b3215cc2d623fc8916640e75bc016b4eb9c7929a8d97fab4d226a342&quot;],&quot;id&quot;:1 }' http://127.0.0.1:9022&#xD;&#xA;```&#xD;&#xA;In this specific case, I'm using the same account that is a Validator in the Relay Chain as a Collator in my Parachain. And I get the same WARN that the collation wasn't advertised to any validator.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What am I doing wrong? I suppose that I'm not inserting the correct keys on the Relay Chain because when I tried using `--alice` in the Parachain I got the same error.&#xD;&#xA;&#xD;&#xA;What are the key types I need to insert in the Relay Chain? &#xD;&#xA;&#xD;&#xA;Appreciate any help/hint or documentation to read to better understand what I'm missing.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt; &#xD;&#xA;&#xD;&#xA;## Atualization ## &#xD;&#xA;&#xD;&#xA;Just made a new build using v0.9.29 and just edited the Chain Specification files for the Relay Chain adding my custom keys.&#xD;&#xA;&#xD;&#xA;Inserted the session keys the same way mentioned above, and started a Parachain without any modifications to the Chain Specification using `--alice` and still getting the error &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-18 14:37:42.029  WARN tokio-runtime-worker parachain::collator-protocol: [Relaychain] Collation wasn't advertised to any validator. candidate_hash=0x7be034d1af8346f78109df62afb5a901bb396b2ac7ca746a167faa7208912933 pov_hash=0x3450b320be2fe22139335fe413a79cfa97b9c2ad4d2c3c9f2e4c59083e91e971 traceID=164659189276160390256470400950758385921&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is odd, now I can share code/chainSpec if needed. As I'm using the templates." ContentLicense="CC BY-SA 4.0" />
  <row Id="20341" PostHistoryTypeId="2" PostId="5417" RevisionGUID="34a501aa-e177-43ca-84c8-ea8c8858f47d" CreationDate="2022-10-18T18:00:24.097" UserId="73" Text="Each storage item has a `QueryKind` set at declaration. This `QueryKind` defines the behavior/return value of functions like `get` and also `mutate`. There are currently three different query kinds defined in Substrate:&#xD;&#xA;&#xD;&#xA;- [`ValueQuery`][1]: Returns `Default::default()` if the value doesn't exist in the state or the value from the state.&#xD;&#xA;- [`OptionQuery`][2] Returns `None` if the value doesn't exist in the state or the value from the state wrapped in `Some(_)`.&#xD;&#xA;- [`ResultQuery`][3] Returns `Err(_)` if the value doesn't exist in the state or the value from the state wrapped in `Ok(_)`.&#xD;&#xA;&#xD;&#xA;The default `QueryKind` is `OptionQuery`. In your example this would mean that your closure that you pass to `mutate` gets passed a `&amp;mut Option&lt;BusinessInfo&lt;T&gt;&gt;`. So, writing:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Business::&lt;T&gt;::mutate(who.clone(), |store| -&gt; DispatchResult {&#xD;&#xA;    if let Some(store) = &amp;mut store {&#xD;&#xA;        let mut store_item_vec: Vec&lt;BusinessItem&gt; = Vec::new();&#xD;&#xA;        store_item_vec.push(item_info);&#xD;&#xA;        &lt;Items&lt;T&gt;&gt;::insert(item_id, who.clone(), store_item_vec);&#xD;&#xA;        Ok(())&#xD;&#xA;    } else {&#xD;&#xA;        Err(&lt;Error&lt;T&gt;&gt;::StoreItemNotFound.into())&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Will fix your compile error.&#xD;&#xA;&#xD;&#xA;[Here][4] you see some examples on how to declare the query kind.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0ee03277c33b6334ddba7434e014fa637dcb6107/frame/support/src/storage/types/mod.rs#L115&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/0ee03277c33b6334ddba7434e014fa637dcb6107/frame/support/src/storage/types/mod.rs#L71&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/0ee03277c33b6334ddba7434e014fa637dcb6107/frame/support/src/storage/types/mod.rs#L91&#xD;&#xA;  [4]: https://docs.substrate.io/build/runtime-storage/" ContentLicense="CC BY-SA 4.0" />
  <row Id="20343" PostHistoryTypeId="5" PostId="5417" RevisionGUID="b97e260c-e1d3-4fb2-bf07-ea45ddbedb63" CreationDate="2022-10-18T18:13:07.907" UserId="73" Comment="added 24 characters in body" Text="Each storage item has a `QueryKind` set at declaration. This `QueryKind` defines the behavior/return value of functions like `get` and also `mutate`. There are currently three different query kinds defined in Substrate:&#xD;&#xA;&#xD;&#xA;- [`ValueQuery`][1]: Returns `Default::default()` if the value doesn't exist in the state or the value from the state.&#xD;&#xA;- [`OptionQuery`][2] Returns `None` if the value doesn't exist in the state or the value from the state wrapped in `Some(_)`.&#xD;&#xA;- [`ResultQuery`][3] Returns `Err(_)` if the value doesn't exist in the state or the value from the state wrapped in `Ok(_)`.&#xD;&#xA;&#xD;&#xA;The default `QueryKind` is `OptionQuery`. In your example this would mean that your closure that you pass to `mutate` gets passed a `&amp;mut Option&lt;BusinessInfo&lt;T&gt;&gt;`. So, writing:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Business::&lt;T&gt;::mutate(who.clone(), |store| -&gt; DispatchResult {&#xD;&#xA;    if let Some(store) = &amp;mut store {&#xD;&#xA;        let mut store_item_vec: Vec&lt;BusinessItem&gt; = Vec::new();&#xD;&#xA;        store_item_vec.push(item_info);&#xD;&#xA;        &lt;Items&lt;T&gt;&gt;::insert(item_id, who.clone(), store_item_vec);&#xD;&#xA;        Ok(())&#xD;&#xA;    } else {&#xD;&#xA;        Err(&lt;Error&lt;T&gt;&gt;::StoreItemNotFound.into())&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Will fix your compile error.&#xD;&#xA;&#xD;&#xA;[Here][4] you see some examples on how to declare the query kind.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0ee03277c33b6334ddba7434e014fa637dcb6107/frame/support/src/storage/types/mod.rs#L115&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/0ee03277c33b6334ddba7434e014fa637dcb6107/frame/support/src/storage/types/mod.rs#L71&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/0ee03277c33b6334ddba7434e014fa637dcb6107/frame/support/src/storage/types/mod.rs#L91&#xD;&#xA;  [4]: https://docs.substrate.io/build/runtime-storage/#declaring-storage-items" ContentLicense="CC BY-SA 4.0" />
  <row Id="20344" PostHistoryTypeId="2" PostId="5418" RevisionGUID="1cbe524e-ef6c-4c42-a590-b752e6980c61" CreationDate="2022-10-18T18:31:47.797" UserId="2451" Text="I have some javascript code that I need to embed in my substrate runtime.  It's not possible / practical to rewrite the javascript code in rust.  I was wondering if instead it would be possible to convert the javascript code to wasm and embed the wasm in the runtime.  Intuitively it seems like this should be possible however I'm not sure on the technical details of how the integration should work.  Would appreciate if anyone could provide some guidance / direction." ContentLicense="CC BY-SA 4.0" />
  <row Id="20346" PostHistoryTypeId="1" PostId="5418" RevisionGUID="1cbe524e-ef6c-4c42-a590-b752e6980c61" CreationDate="2022-10-18T18:31:47.797" UserId="2451" Text="Embedding javascript (wasm) in substrate runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="20347" PostHistoryTypeId="3" PostId="5418" RevisionGUID="1cbe524e-ef6c-4c42-a590-b752e6980c61" CreationDate="2022-10-18T18:31:47.797" UserId="2451" Text="|runtime|wasm|javascript|wasmi|wasmtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20348" PostHistoryTypeId="2" PostId="5419" RevisionGUID="580680e1-b6fd-45a0-a1ab-9ea5c1056bfd" CreationDate="2022-10-18T18:51:35.377" UserId="45" Text="I don't think that compiling JS to wasm is possible currently. &#xD;&#xA;&#xD;&#xA;Effective compilation requires GC at least, and that Wasm extension proposal is still under development. It's also not clear if a proposal like that would be incorporated into Substrate since it ultimately depends on how it will work. &#xD;&#xA;&#xD;&#xA;Then there are inherent problems with compiling a dynamic language such as JS ahead-of-time. This is especially so when targeting Wasm.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20350" PostHistoryTypeId="6" PostId="5418" RevisionGUID="ce48bde3-2d2b-4308-8f6c-9bc3b4e7d08c" CreationDate="2022-10-18T18:51:44.940" UserId="45" Comment="edited tags" Text="|runtime|wasm|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20351" PostHistoryTypeId="5" PostId="5414" RevisionGUID="cc542827-8b5f-445c-8772-ccfa04d27c09" CreationDate="2022-10-18T19:52:26.520" UserId="3347" Comment="added 81 characters in body" Text="Extrinsic transactions are sent to the validation pool, set to ready state and then broadcasted. After this, they are re-submitted to the validation pool until it reaches its validity period (valid_till). At this point the transaction is completely removed from the pendingExtrinsics. None of the transactions are successfully validated and are getting added to the block.&#xD;&#xA;&#xD;&#xA;More context: The chain has been running as expected for 8 weeks and the last wasm upgrade was done 3 weeks ago. It is a 4 validator network. The validators are still producing and finalizing new blocks.&#xD;&#xA;&#xD;&#xA;substrate version: `branch = &quot;polkadot-v0.9.25&quot;`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-18 15:03:38.561 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255432, tv_nsec: 535242295 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:38.561 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:38.561 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Ready (replaced with None)&#xD;&#xA;2022-10-18 15:03:38.561 DEBUG tokio-runtime-worker txpool: Pool Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:38.562 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Broadcasted&#xD;&#xA;2022-10-18 15:03:39.360  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931829 (0x88a9…e42d), finalized #931827 (0xd50e…8666), ⬇ 7.2kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:03:39.802  INFO tokio-runtime-worker jsonrpsee_ws_server::server: Accepting new connection, 8/1000&#xD;&#xA;2022-10-18 15:03:42.028 TRACE tokio-runtime-worker txpool: Pruning transactions: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d]&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:42.028  INFO tokio-runtime-worker substrate: ✨ Imported #931830 (0x1293…e8e8)&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8)&#xD;&#xA;2022-10-18 15:03:42.028 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d] Pruned at 0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931830. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931830}&#xD;&#xA;2022-10-18 15:03:42.198 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:42.198 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255436, tv_nsec: 171786265 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:42.891 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x469f…5660&#xD;&#xA;2022-10-18 15:03:42.891 DEBUG tokio-runtime-worker txpool: [0x007249e1fa512b1c41c02a616f1c6d1692035bb4f3baf549fe1249927eeffeab] Sent finalization event (block 0x469f2370f05adb57fd6b4022bbe51c7b439c622bb7ff24ccd335b095c13a5660)&#xD;&#xA;2022-10-18 15:03:44.361  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931830 (0x1293…e8e8), finalized #931828 (0x469f…5660), ⬇ 7.4kiB/s ⬆ 6.9kiB/s&#xD;&#xA;2022-10-18 15:03:48.015 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x082ac78b0d0c4b181a5ce30c3448c5229cb6a34c3971c482a5fd4b65d8e2ebb8]&#xD;&#xA;2022-10-18 15:03:48.015 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:48.015  INFO tokio-runtime-worker substrate: ✨ Imported #931831 (0x646e…1107)&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107)&#xD;&#xA;2022-10-18 15:03:48.019 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: [0x082ac78b0d0c4b181a5ce30c3448c5229cb6a34c3971c482a5fd4b65d8e2ebb8] Pruned at 0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931831. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931831}&#xD;&#xA;2022-10-18 15:03:48.206 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:48.207 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255442, tv_nsec: 180733891 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:49.362  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931831 (0x646e…1107), finalized #931828 (0x469f…5660), ⬇ 6.0kiB/s ⬆ 6.0kiB/s&#xD;&#xA;2022-10-18 15:03:49.594 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x88a9…e42d&#xD;&#xA;2022-10-18 15:03:49.594 DEBUG tokio-runtime-worker txpool: [0x8520c0056df9322315ecec98acd45cfb394d8fdbe85013a0d910ad9a4c68374a] Sent finalization event (block 0x88a9da21e21049ffd13c9652de3ed41c75c518123f15428f84fa625333f5e42d)&#xD;&#xA;2022-10-18 15:03:54.022 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x324ddc150236de28c1aae13853deb7adba0280d77f7f6b0a6db8ae46d6a3c150]&#xD;&#xA;2022-10-18 15:03:54.022 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:54.022  INFO tokio-runtime-worker substrate: ✨ Imported #931832 (0x2dca…d137)&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137)&#xD;&#xA;2022-10-18 15:03:54.027 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: [0x324ddc150236de28c1aae13853deb7adba0280d77f7f6b0a6db8ae46d6a3c150] Pruned at 0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931832. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931832}&#xD;&#xA;2022-10-18 15:03:54.216 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:54.216 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255448, tv_nsec: 189970246 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:54.363  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931832 (0x2dca…d137), finalized #931829 (0x88a9…e42d), ⬇ 6.9kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:03:54.958 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x1293…e8e8&#xD;&#xA;2022-10-18 15:03:54.958 DEBUG tokio-runtime-worker txpool: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d] Sent finalization event (block 0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8)&#xD;&#xA;2022-10-18 15:03:59.364  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931832 (0x2dca…d137), finalized #931830 (0x1293…e8e8), ⬇ 6.6kiB/s ⬆ 5.9kiB/s&#xD;&#xA;2022-10-18 15:04:00.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137&#xD;&#xA;2022-10-18 15:04:00.002 TRACE tokio-runtime-worker txpool: Transaction pool already processed block  #931832&#xD;&#xA;2022-10-18 15:04:00.002 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Reported as invalid. Will skip sub-chains while iterating.&#xD;&#xA;2022-10-18 15:04:00.003  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 931833 (1 ms) [hash: 0x141d8a7c342833701ac236f3fdb4bb7237b4591481207c658d7352dbacd939d2; parent_hash: 0x2dca…d137; extrinsics (1): [0xa19a…0f44]]&#xD;&#xA;2022-10-18 15:04:00.006  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 931833. Hash now 0x93bf36a7dc5c61f076a69859cee8aa9ba0602e97b8dd6547b9591c9c4ef74453, previously 0x141d8a7c342833701ac236f3fdb4bb7237b4591481207c658d7352dbacd939d2.&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;(revalidations)&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;2022-10-18 15:09:24.021 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x0a1f07340f857ea719b161d1c842edb555911dfcfb82c55899ec7678ce1c882d]&#xD;&#xA;2022-10-18 15:09:24.021 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175)&#xD;&#xA;2022-10-18 15:09:24.023 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: [0x0a1f07340f857ea719b161d1c842edb555911dfcfb82c55899ec7678ce1c882d] Pruned at 0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Removing invalid transactions: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a]&#xD;&#xA;2022-10-18 15:09:24.023 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Removed invalid transactions: [Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}]&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Extrinsic invalid&#xD;&#xA;2022-10-18 15:09:24.023  INFO tokio-runtime-worker substrate: ✨ Imported #931887 (0x4de6…5175)&#xD;&#xA;2022-10-18 15:09:24.434  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931887 (0x4de6…5175), finalized #931884 (0x1eed…1a6c), ⬇ 7.1kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:09:24.902 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x7727…fd97&#xD;&#xA;2022-10-18 15:09:24.902 DEBUG tokio-runtime-worker txpool: [0x117ccd88df4751c4c5e6e282b7633207915597befcc01e9af21e95a1944fd764] Sent finalization event (block 0x77273c2754b1fa43c8ad7b8f1022b886b93750f794192358e6ed7dcd3086fd97)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20352" PostHistoryTypeId="5" PostId="5414" RevisionGUID="c91c9174-b76e-4e06-8ef4-6870f1c6b7c0" CreationDate="2022-10-18T20:41:55.150" UserId="3347" Comment="added 483 characters in body" Text="Extrinsic transactions are sent to the validation pool, set to ready state and then broadcasted. After this, they are re-submitted to the validation pool until it reaches its validity period (valid_till). At this point the transaction is completely removed from the pendingExtrinsics. None of the transactions are successfully validated and are getting added to the block.&#xD;&#xA;&#xD;&#xA;substrate version: `branch = &quot;polkadot-v0.9.25&quot;`&#xD;&#xA;&#xD;&#xA;More context: The chain has been running as expected for 8 weeks and the last wasm upgrade was done 3 weeks ago. It is a 4 validator network. The validators are still producing and finalizing new blocks.&#xD;&#xA;&#xD;&#xA;Every 24 hrs, we distribute some rewards to the stakers lazily (5 stakers per block) in an on-initialize hook via a single escrow account.&#xD;&#xA;We have 2500+ stakers. This reward distribution happened for around 600 blocks, however it did not consume the full block weight. &#xD;&#xA;Testnet worked fine before this process started. Wondering if it could be one of the culprits?&#xD;&#xA;&#xD;&#xA;Our dev and mainnet networks are all working as expected but they have way less stakers than Testnet.&#xD;&#xA;&#xD;&#xA;Log:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-18 15:03:38.561 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255432, tv_nsec: 535242295 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:38.561 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:38.561 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Ready (replaced with None)&#xD;&#xA;2022-10-18 15:03:38.561 DEBUG tokio-runtime-worker txpool: Pool Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:38.562 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Broadcasted&#xD;&#xA;2022-10-18 15:03:39.360  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931829 (0x88a9…e42d), finalized #931827 (0xd50e…8666), ⬇ 7.2kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:03:39.802  INFO tokio-runtime-worker jsonrpsee_ws_server::server: Accepting new connection, 8/1000&#xD;&#xA;2022-10-18 15:03:42.028 TRACE tokio-runtime-worker txpool: Pruning transactions: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d]&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:42.028  INFO tokio-runtime-worker substrate: ✨ Imported #931830 (0x1293…e8e8)&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8)&#xD;&#xA;2022-10-18 15:03:42.028 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d] Pruned at 0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931830. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931830}&#xD;&#xA;2022-10-18 15:03:42.198 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:42.198 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255436, tv_nsec: 171786265 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:42.891 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x469f…5660&#xD;&#xA;2022-10-18 15:03:42.891 DEBUG tokio-runtime-worker txpool: [0x007249e1fa512b1c41c02a616f1c6d1692035bb4f3baf549fe1249927eeffeab] Sent finalization event (block 0x469f2370f05adb57fd6b4022bbe51c7b439c622bb7ff24ccd335b095c13a5660)&#xD;&#xA;2022-10-18 15:03:44.361  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931830 (0x1293…e8e8), finalized #931828 (0x469f…5660), ⬇ 7.4kiB/s ⬆ 6.9kiB/s&#xD;&#xA;2022-10-18 15:03:48.015 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x082ac78b0d0c4b181a5ce30c3448c5229cb6a34c3971c482a5fd4b65d8e2ebb8]&#xD;&#xA;2022-10-18 15:03:48.015 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:48.015  INFO tokio-runtime-worker substrate: ✨ Imported #931831 (0x646e…1107)&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107)&#xD;&#xA;2022-10-18 15:03:48.019 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: [0x082ac78b0d0c4b181a5ce30c3448c5229cb6a34c3971c482a5fd4b65d8e2ebb8] Pruned at 0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931831. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931831}&#xD;&#xA;2022-10-18 15:03:48.206 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:48.207 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255442, tv_nsec: 180733891 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:49.362  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931831 (0x646e…1107), finalized #931828 (0x469f…5660), ⬇ 6.0kiB/s ⬆ 6.0kiB/s&#xD;&#xA;2022-10-18 15:03:49.594 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x88a9…e42d&#xD;&#xA;2022-10-18 15:03:49.594 DEBUG tokio-runtime-worker txpool: [0x8520c0056df9322315ecec98acd45cfb394d8fdbe85013a0d910ad9a4c68374a] Sent finalization event (block 0x88a9da21e21049ffd13c9652de3ed41c75c518123f15428f84fa625333f5e42d)&#xD;&#xA;2022-10-18 15:03:54.022 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x324ddc150236de28c1aae13853deb7adba0280d77f7f6b0a6db8ae46d6a3c150]&#xD;&#xA;2022-10-18 15:03:54.022 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:54.022  INFO tokio-runtime-worker substrate: ✨ Imported #931832 (0x2dca…d137)&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137)&#xD;&#xA;2022-10-18 15:03:54.027 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: [0x324ddc150236de28c1aae13853deb7adba0280d77f7f6b0a6db8ae46d6a3c150] Pruned at 0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931832. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931832}&#xD;&#xA;2022-10-18 15:03:54.216 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:54.216 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255448, tv_nsec: 189970246 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:54.363  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931832 (0x2dca…d137), finalized #931829 (0x88a9…e42d), ⬇ 6.9kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:03:54.958 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x1293…e8e8&#xD;&#xA;2022-10-18 15:03:54.958 DEBUG tokio-runtime-worker txpool: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d] Sent finalization event (block 0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8)&#xD;&#xA;2022-10-18 15:03:59.364  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931832 (0x2dca…d137), finalized #931830 (0x1293…e8e8), ⬇ 6.6kiB/s ⬆ 5.9kiB/s&#xD;&#xA;2022-10-18 15:04:00.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137&#xD;&#xA;2022-10-18 15:04:00.002 TRACE tokio-runtime-worker txpool: Transaction pool already processed block  #931832&#xD;&#xA;2022-10-18 15:04:00.002 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Reported as invalid. Will skip sub-chains while iterating.&#xD;&#xA;2022-10-18 15:04:00.003  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 931833 (1 ms) [hash: 0x141d8a7c342833701ac236f3fdb4bb7237b4591481207c658d7352dbacd939d2; parent_hash: 0x2dca…d137; extrinsics (1): [0xa19a…0f44]]&#xD;&#xA;2022-10-18 15:04:00.006  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 931833. Hash now 0x93bf36a7dc5c61f076a69859cee8aa9ba0602e97b8dd6547b9591c9c4ef74453, previously 0x141d8a7c342833701ac236f3fdb4bb7237b4591481207c658d7352dbacd939d2.&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;(revalidations)&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;2022-10-18 15:09:24.021 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x0a1f07340f857ea719b161d1c842edb555911dfcfb82c55899ec7678ce1c882d]&#xD;&#xA;2022-10-18 15:09:24.021 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175)&#xD;&#xA;2022-10-18 15:09:24.023 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: [0x0a1f07340f857ea719b161d1c842edb555911dfcfb82c55899ec7678ce1c882d] Pruned at 0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Removing invalid transactions: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a]&#xD;&#xA;2022-10-18 15:09:24.023 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Removed invalid transactions: [Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}]&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Extrinsic invalid&#xD;&#xA;2022-10-18 15:09:24.023  INFO tokio-runtime-worker substrate: ✨ Imported #931887 (0x4de6…5175)&#xD;&#xA;2022-10-18 15:09:24.434  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931887 (0x4de6…5175), finalized #931884 (0x1eed…1a6c), ⬇ 7.1kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:09:24.902 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x7727…fd97&#xD;&#xA;2022-10-18 15:09:24.902 DEBUG tokio-runtime-worker txpool: [0x117ccd88df4751c4c5e6e282b7633207915597befcc01e9af21e95a1944fd764] Sent finalization event (block 0x77273c2754b1fa43c8ad7b8f1022b886b93750f794192358e6ed7dcd3086fd97)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20353" PostHistoryTypeId="5" PostId="5414" RevisionGUID="9df5a810-65ad-4b84-ad80-c20ea378bc9e" CreationDate="2022-10-18T20:47:01.147" UserId="3347" Comment="added 483 characters in body" Text="Extrinsic transactions are sent to the validation pool, set to ready state and then broadcasted. After this, they are re-submitted to the validation pool until it reaches its validity period (valid_till). At this point the transaction is completely removed from the pendingExtrinsics. None of the transactions are successfully validated and are getting added to the block.&#xD;&#xA;&#xD;&#xA;substrate version: `branch = &quot;polkadot-v0.9.25&quot;`&#xD;&#xA;&#xD;&#xA;Can someone help debug this? Do you know in what scenarios would a transaction/extrinsic not be considered valid?&#xD;&#xA;&#xD;&#xA;More context: The chain has been running as expected for 8 weeks and the last wasm upgrade was done 3 weeks ago. It is a 4 validator network. The validators are still producing and finalizing new blocks.&#xD;&#xA;&#xD;&#xA;Every 24 hrs, we distribute some rewards to the stakers lazily (5 stakers per block) in an on-initialize hook via a single escrow account.&#xD;&#xA;We have 2500+ stakers. This reward distribution happened for around 600 blocks, however it did not consume the full block weight. &#xD;&#xA;Testnet worked fine before this process started. Wondering if it could be one of the culprits?&#xD;&#xA;&#xD;&#xA;Our dev and mainnet networks are all working as expected but they have way less stakers than Testnet.&#xD;&#xA;&#xD;&#xA;Log:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-18 15:03:38.561 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255432, tv_nsec: 535242295 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:38.561 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:38.561 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Ready (replaced with None)&#xD;&#xA;2022-10-18 15:03:38.561 DEBUG tokio-runtime-worker txpool: Pool Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:38.562 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Broadcasted&#xD;&#xA;2022-10-18 15:03:39.360  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931829 (0x88a9…e42d), finalized #931827 (0xd50e…8666), ⬇ 7.2kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:03:39.802  INFO tokio-runtime-worker jsonrpsee_ws_server::server: Accepting new connection, 8/1000&#xD;&#xA;2022-10-18 15:03:42.028 TRACE tokio-runtime-worker txpool: Pruning transactions: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d]&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:42.028  INFO tokio-runtime-worker substrate: ✨ Imported #931830 (0x1293…e8e8)&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8)&#xD;&#xA;2022-10-18 15:03:42.028 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d] Pruned at 0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:42.028 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931830. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931830}&#xD;&#xA;2022-10-18 15:03:42.198 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:42.198 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255436, tv_nsec: 171786265 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:42.198 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:42.891 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x469f…5660&#xD;&#xA;2022-10-18 15:03:42.891 DEBUG tokio-runtime-worker txpool: [0x007249e1fa512b1c41c02a616f1c6d1692035bb4f3baf549fe1249927eeffeab] Sent finalization event (block 0x469f2370f05adb57fd6b4022bbe51c7b439c622bb7ff24ccd335b095c13a5660)&#xD;&#xA;2022-10-18 15:03:44.361  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931830 (0x1293…e8e8), finalized #931828 (0x469f…5660), ⬇ 7.4kiB/s ⬆ 6.9kiB/s&#xD;&#xA;2022-10-18 15:03:48.015 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x082ac78b0d0c4b181a5ce30c3448c5229cb6a34c3971c482a5fd4b65d8e2ebb8]&#xD;&#xA;2022-10-18 15:03:48.015 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:48.015  INFO tokio-runtime-worker substrate: ✨ Imported #931831 (0x646e…1107)&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107)&#xD;&#xA;2022-10-18 15:03:48.019 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: [0x082ac78b0d0c4b181a5ce30c3448c5229cb6a34c3971c482a5fd4b65d8e2ebb8] Pruned at 0x646eac4219f6c338b4ef72aedf928e083fde97d11f733e8b00d2cac9ffbd1107&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:48.019 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931831. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931831}&#xD;&#xA;2022-10-18 15:03:48.206 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:48.207 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255442, tv_nsec: 180733891 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:48.207 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:49.362  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931831 (0x646e…1107), finalized #931828 (0x469f…5660), ⬇ 6.0kiB/s ⬆ 6.0kiB/s&#xD;&#xA;2022-10-18 15:03:49.594 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x88a9…e42d&#xD;&#xA;2022-10-18 15:03:49.594 DEBUG tokio-runtime-worker txpool: [0x8520c0056df9322315ecec98acd45cfb394d8fdbe85013a0d910ad9a4c68374a] Sent finalization event (block 0x88a9da21e21049ffd13c9652de3ed41c75c518123f15428f84fa625333f5e42d)&#xD;&#xA;2022-10-18 15:03:54.022 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x324ddc150236de28c1aae13853deb7adba0280d77f7f6b0a6db8ae46d6a3c150]&#xD;&#xA;2022-10-18 15:03:54.022 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:03:54.022  INFO tokio-runtime-worker substrate: ✨ Imported #931832 (0x2dca…d137)&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137)&#xD;&#xA;2022-10-18 15:03:54.027 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: [0x324ddc150236de28c1aae13853deb7adba0280d77f7f6b0a6db8ae46d6a3c150] Pruned at 0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Sent 1 transactions to revalidation queue&#xD;&#xA;2022-10-18 15:03:54.027 DEBUG tokio-runtime-worker txpool: Updated revalidation queue at 931832. Transactions: {0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a: 931832}&#xD;&#xA;2022-10-18 15:03:54.216 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:03:54.216 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] WaitingTransaction { imported_at: Instant { tv_sec: 7255448, tv_nsec: 189970246 }, transaction: Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}, missing_tags: {}}&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Importing to ready&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 0 ms. Status: PoolStatus { ready: 1, ready_bytes: 147, future: 0, future_bytes: 0 }&#xD;&#xA;2022-10-18 15:03:54.216 DEBUG tokio-runtime-worker txpool: Revalidated 1 transactions. Left in the queue for revalidation: 0.&#xD;&#xA;2022-10-18 15:03:54.363  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931832 (0x2dca…d137), finalized #931829 (0x88a9…e42d), ⬇ 6.9kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:03:54.958 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x1293…e8e8&#xD;&#xA;2022-10-18 15:03:54.958 DEBUG tokio-runtime-worker txpool: [0xdb794ee3756cfc2bd7d6e8c1ced211dbdaf34a560ad580741b267487744b3d9d] Sent finalization event (block 0x1293b4630dcdd7ab2a0dcc2f933e08ed5c28e93a960ac1bbc391ca833e77e8e8)&#xD;&#xA;2022-10-18 15:03:59.364  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931832 (0x2dca…d137), finalized #931830 (0x1293…e8e8), ⬇ 6.6kiB/s ⬆ 5.9kiB/s&#xD;&#xA;2022-10-18 15:04:00.001  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x2dca896d347b5e8dd01491faf8eb5a4e3c76887c29fdf84b6d8cf7a51dcad137&#xD;&#xA;2022-10-18 15:04:00.002 TRACE tokio-runtime-worker txpool: Transaction pool already processed block  #931832&#xD;&#xA;2022-10-18 15:04:00.002 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Reported as invalid. Will skip sub-chains while iterating.&#xD;&#xA;2022-10-18 15:04:00.003  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 931833 (1 ms) [hash: 0x141d8a7c342833701ac236f3fdb4bb7237b4591481207c658d7352dbacd939d2; parent_hash: 0x2dca…d137; extrinsics (1): [0xa19a…0f44]]&#xD;&#xA;2022-10-18 15:04:00.006  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 931833. Hash now 0x93bf36a7dc5c61f076a69859cee8aa9ba0602e97b8dd6547b9591c9c4ef74453, previously 0x141d8a7c342833701ac236f3fdb4bb7237b4591481207c658d7352dbacd939d2.&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;(revalidations)&#xD;&#xA;...&#xD;&#xA;...&#xD;&#xA;2022-10-18 15:09:24.021 TRACE tokio-runtime-worker txpool: Pruning transactions: [0x0a1f07340f857ea719b161d1c842edb555911dfcfb82c55899ec7678ce1c882d]&#xD;&#xA;2022-10-18 15:09:24.021 DEBUG tokio-runtime-worker txpool: Starting pruning of block BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175) (extrinsics: 1)&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175)&#xD;&#xA;2022-10-18 15:09:24.023 TRACE tokio-runtime-worker txpool: Pruning at BlockId::Hash(0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175). Resubmitting transactions.&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: [0x0a1f07340f857ea719b161d1c842edb555911dfcfb82c55899ec7678ce1c882d] Pruned at 0x4de672d4b8067e85d1f78266783688ffe195ed0564658ca5048f64275f995175&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Removing invalid transactions: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a]&#xD;&#xA;2022-10-18 15:09:24.023 TRACE tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Removed as part of the subtree.&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: Removed invalid transactions: [Transaction { hash: 0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a, priority: 11986, valid_till: 931887, bytes: 147, propagate: true, source: TransactionSource::External, requires: [], provides: [78a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c374156000000], data: 840078a64a89f33cac983967b0ebb8c7a853af69722d8493a516c97f0ef7e33c37410128a86910a046cffdd5e5008297bff002b71f5e89e76e52100550c7463af18c66f45543b617928d300c7d599ba914c75d5b6a096266f34ff7d37e3f702c21d98c0503590100020000b4d1b6c9de239f4070cf74287d22d53d5854e4b975bed2771398a74bd25eab45070010a5d4e8}]&#xD;&#xA;2022-10-18 15:09:24.023 DEBUG tokio-runtime-worker txpool: [0xba6c1ea7d678160b0a81950f70e81becebe7663740c0670be44c5a85c39dd15a] Extrinsic invalid&#xD;&#xA;2022-10-18 15:09:24.023  INFO tokio-runtime-worker substrate: ✨ Imported #931887 (0x4de6…5175)&#xD;&#xA;2022-10-18 15:09:24.434  INFO tokio-runtime-worker substrate:  Idle (7 peers), best: #931887 (0x4de6…5175), finalized #931884 (0x1eed…1a6c), ⬇ 7.1kiB/s ⬆ 7.0kiB/s&#xD;&#xA;2022-10-18 15:09:24.902 TRACE tokio-runtime-worker txpool: Attempting to notify watchers of finalization for 0x7727…fd97&#xD;&#xA;2022-10-18 15:09:24.902 DEBUG tokio-runtime-worker txpool: [0x117ccd88df4751c4c5e6e282b7633207915597befcc01e9af21e95a1944fd764] Sent finalization event (block 0x77273c2754b1fa43c8ad7b8f1022b886b93750f794192358e6ed7dcd3086fd97)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20354" PostHistoryTypeId="5" PostId="5406" RevisionGUID="f9a49b0d-ac30-4e57-af76-9ba169fd4a60" CreationDate="2022-10-18T20:49:09.513" UserId="3344" Comment="Clarified" Text="There appear to be 2 two substrate forks addressing offchain data storage with a IPFS backend:&#xD;&#xA;&#xD;&#xA;- https://github.com/iridium-labs/substrate/tree/iris&#xD;&#xA;- https://github.com/WunderbarNetwork/substrate/tree/ipfs-ocw&#xD;&#xA;&#xD;&#xA;As best I can tell (very new here so could be wrong) they take 2 different approaches: Pallet vs chain extension.&#xD;&#xA;&#xD;&#xA;1. What are the relative merits of each approach to implementing IPFS: pallet vs extension chain?&#xD;&#xA;2. Which is more likely to land upstream?&#xD;&#xA;3. Is it possible to track/estimate the time frame in which these might land upstream?&#xD;&#xA;&#xD;&#xA;This is not a question: what are the ways to store offchain data&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20355" PostHistoryTypeId="5" PostId="5406" RevisionGUID="d64e6d7e-bc67-49be-b8a5-5231961ed519" CreationDate="2022-10-18T20:49:59.017" UserId="3344" Comment="grammar" Text="There appear to be 2 two substrate forks addressing offchain data storage with a IPFS backend:&#xD;&#xA;&#xD;&#xA;- https://github.com/iridium-labs/substrate/tree/iris&#xD;&#xA;- https://github.com/WunderbarNetwork/substrate/tree/ipfs-ocw&#xD;&#xA;&#xD;&#xA;As best I can tell (very new here so could be wrong) they take 2 different approaches: Pallet vs chain extension.&#xD;&#xA;&#xD;&#xA;1. What are the relative merits of each approach to implementing IPFS: pallet vs extension chain?&#xD;&#xA;2. Which is more likely to land upstream?&#xD;&#xA;3. Is it possible to track/estimate the time frame in which these might land upstream?&#xD;&#xA;&#xD;&#xA;This is not the question: what are the ways to store offchain data&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20356" PostHistoryTypeId="5" PostId="5397" RevisionGUID="9624f863-3b8e-4189-b200-8b2352b5ceed" CreationDate="2022-10-18T22:22:03.533" UserId="3331" Comment="added 557 characters in body" Text="#### KEY TYPES AND DERIVED KEYS #### &#xD;&#xA;What are the key-types I need to insert in the validator nodes?&#xD;&#xA;&#xD;&#xA;I'm using: `gran` `imon` `babe` `beef`, grandpa's schema is `Ed25519` and beefy's `ECDSA`. &#xD;&#xA;&#xD;&#xA;Are those correct? Do I need to insert another type with another schema?&#xD;&#xA;&#xD;&#xA;About derived keys, when inserting to the node's keystore do I need to use hard derivation for controller and stash?&#xD;&#xA;For example: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme ed25519 --suri &quot;&lt;key&gt;//controller&quot; --key-type gran&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;I'm having problems when using custom keys in the Relay and Parachain. While I can insert the session keys needed to the Relay, I can't make the Parachain start collating.&#xD;&#xA;&#xD;&#xA; - What I'm doing in the Relay Chain:&#xD;&#xA;&#xD;&#xA;Before starting the validator nodes, I insert the keys to the keystore manually for each validator.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme ed25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type gran&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type babe&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type imon&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type para&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi1 --chain 2v-raw.json --scheme ecdsa --suri &quot;0x13164ca800e353c3e4319bb6e1b19945db14202f782313ee86fbefbe4c2f9d76&quot; --key-type beef&#xD;&#xA;&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme ed25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type gran&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type babe&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type imon&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme sr25519 --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type para&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/multi2 --chain 2v-raw.json --scheme ecdsa --suri &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot; --key-type beef&#xD;&#xA;``` &#xD;&#xA;It works as intended, as the Relay produce and finalize blocks when I start the nodes.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA; - What I'm doing in the Parachain:&#xD;&#xA;&#xD;&#xA;I've tried to start a Parachain with the Alice dev account so it starts with the Alice session keys in the Parachain keystore. But I get:&#xD;&#xA; &#xD;&#xA;`2022-10-17 20:00:18.027  WARN tokio-runtime-worker parachain::collator-protocol: Collation wasn't advertised to any validator.`&#xD;&#xA;&#xD;&#xA;I've also tried using generated accounts and adding the keys using the RPC call&#xD;&#xA;```&#xD;&#xA;curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;aura&quot;, &quot;0x503bde061938568a2d677fe4b233ab77ecc0a947304db98973050906e5a8aba7&quot;, &quot;0x6c35ba69b3215cc2d623fc8916640e75bc016b4eb9c7929a8d97fab4d226a342&quot;],&quot;id&quot;:1 }' http://127.0.0.1:9022&#xD;&#xA;```&#xD;&#xA;In this specific case, I'm using the same account that is a Validator in the Relay Chain as a Collator in my Parachain. And I get the same WARN that the collation wasn't advertised to any validator.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What am I doing wrong? I suppose that I'm not inserting the correct keys on the Relay Chain because when I tried using `--alice` in the Parachain I got the same error.&#xD;&#xA;&#xD;&#xA;What are the key types I need to insert in the Relay Chain? &#xD;&#xA;&#xD;&#xA;Appreciate any help/hint or documentation to read to better understand what I'm missing.&#xD;&#xA;&#xD;&#xA;&lt;hr&gt; &#xD;&#xA;&#xD;&#xA;## UPDATE ## &#xD;&#xA;&#xD;&#xA;Just made a new build using v0.9.29 and just edited the Chain Specification files for the Relay Chain adding my custom keys.&#xD;&#xA;&#xD;&#xA;Inserted the session keys the same way mentioned above, and started a Parachain without any modifications to the Chain Specification using `--alice` and still getting the error &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-18 14:37:42.029  WARN tokio-runtime-worker parachain::collator-protocol: [Relaychain] Collation wasn't advertised to any validator. candidate_hash=0x7be034d1af8346f78109df62afb5a901bb396b2ac7ca746a167faa7208912933 pov_hash=0x3450b320be2fe22139335fe413a79cfa97b9c2ad4d2c3c9f2e4c59083e91e971 traceID=164659189276160390256470400950758385921&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is odd, now I can share code/chainSpec if needed. As I'm using the templates.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20362" PostHistoryTypeId="2" PostId="5421" RevisionGUID="b89de9c1-9a50-4583-88c5-3fb03453f5f4" CreationDate="2022-10-19T03:35:49.400" UserId="3344" Text="1. Use a pallet&#xD;&#xA;2. It is unclear. See here for more detail behind this summary:&#xD;&#xA;  - Upstream changes to Substrate are required (things have been tried).&#xD;&#xA;  - [Upstream is not resistant](https://github.com/rs-ipfs/offchain-ipfs-manual/issues/22#issuecomment-877354507)&#xD;&#xA;  - Upstream changes won't be easy/quick&#xD;&#xA;  - Web3 Foundation have made two grants related/using IPFS, but not focused on getting IPFS in the native Substrate runtime&#xD;&#xA;  - The Iris grant project completed&#xD;&#xA;  - The offchain_ipfs project review/merge of contributions stalled due to lack of resources&#xD;&#xA;  - Substrate forks proliferate.... &#xD;&#xA;3. No" ContentLicense="CC BY-SA 4.0" />
  <row Id="20364" PostHistoryTypeId="4" PostId="5406" RevisionGUID="ba7e8a4f-ef73-4341-a287-d6af005bfb53" CreationDate="2022-10-19T03:37:39.967" UserId="3344" Comment="edited title" Text="Native Substrate runtime support for storing data Offchain to IPFS" ContentLicense="CC BY-SA 4.0" />
  <row Id="20365" PostHistoryTypeId="5" PostId="5421" RevisionGUID="53e1128d-248e-4734-9f46-8f92632032dd" CreationDate="2022-10-19T03:39:11.243" UserId="3344" Comment="added 86 characters in body" Text="1. Use a pallet&#xD;&#xA;2. It is unclear. See my comment [here](https://github.com/w3f/Grants-Program/pull/1187#issuecomment-1283354955) for more detail behind this summary:&#xD;&#xA;  - Upstream changes to Substrate are required (things have been tried).&#xD;&#xA;  - [Upstream is not resistant](https://github.com/rs-ipfs/offchain-ipfs-manual/issues/22#issuecomment-877354507)&#xD;&#xA;  - Upstream changes won't be easy/quick&#xD;&#xA;  - Web3 Foundation have made two grants related/using IPFS, but not focused on getting IPFS in the native Substrate runtime&#xD;&#xA;  - The Iris grant project completed&#xD;&#xA;  - The offchain_ipfs project review/merge of contributions stalled due to lack of resources&#xD;&#xA;  - Substrate forks proliferate.... &#xD;&#xA;3. No" ContentLicense="CC BY-SA 4.0" />
  <row Id="20366" PostHistoryTypeId="5" PostId="5421" RevisionGUID="77f653a1-abad-4443-98a4-3b1ab357a454" CreationDate="2022-10-19T03:43:42.757" UserId="3344" Comment="added 14 characters in body" Text="1. Use a pallet&#xD;&#xA;2. It is unclear. See my comment [here](https://github.com/w3f/Grants-Program/pull/1187#issuecomment-1283354955) for more detail behind this summary:&#xD;&#xA;    - Upstream changes to Substrate are required (things have been tried).&#xD;&#xA;    - [Upstream is not resistant](https://github.com/rs-ipfs/offchain-ipfs-manual/issues/22#issuecomment-877354507)&#xD;&#xA;    - Upstream changes won't be easy/quick&#xD;&#xA;    - Web3 Foundation have made two grants related/using IPFS, but not focused on getting IPFS in the native Substrate runtime&#xD;&#xA;    - The Iris grant project completed&#xD;&#xA;    - The offchain_ipfs project review/merge of contributions stalled due to lack of resources&#xD;&#xA;    - Substrate forks proliferate.... &#xD;&#xA;3. No" ContentLicense="CC BY-SA 4.0" />
  <row Id="20367" PostHistoryTypeId="5" PostId="5421" RevisionGUID="0c761e6f-dedd-49be-870a-cc654ae0522c" CreationDate="2022-10-19T03:46:55.197" UserId="3344" Comment="added 37 characters in body" Text="1. Use a pallet&#xD;&#xA;2. It is unclear. See my comment [here](https://github.com/w3f/Grants-Program/pull/1187#issuecomment-1283354955) for more detail behind this summary:&#xD;&#xA;    - Upstream changes to Substrate are required for native Substrate runtime support (things have been tried).&#xD;&#xA;    - [Upstream is not resistant](https://github.com/rs-ipfs/offchain-ipfs-manual/issues/22#issuecomment-877354507)&#xD;&#xA;    - Upstream changes won't be easy/quick&#xD;&#xA;    - Web3 Foundation have made two grants related/using IPFS, but not focused on getting IPFS in the native Substrate runtime&#xD;&#xA;    - The Iris grant project completed&#xD;&#xA;    - The offchain_ipfs project review/merge of contributions stalled due to lack of resources&#xD;&#xA;    - Substrate forks proliferate.... &#xD;&#xA;3. No" ContentLicense="CC BY-SA 4.0" />
  <row Id="20368" PostHistoryTypeId="5" PostId="5421" RevisionGUID="5f52b978-adcf-4d45-bf5b-98b331ade5cf" CreationDate="2022-10-19T03:47:30.587" UserId="3344" Comment="added 8 characters in body" Text="1. Use a pallet&#xD;&#xA;2. It is unclear. See my comment [here](https://github.com/w3f/Grants-Program/pull/1187#issuecomment-1283354955) for more detail behind this summary:&#xD;&#xA;    - Upstream changes to Substrate are required for native Substrate runtime support of IPFS (things have been tried).&#xD;&#xA;    - [Upstream is not resistant](https://github.com/rs-ipfs/offchain-ipfs-manual/issues/22#issuecomment-877354507)&#xD;&#xA;    - Upstream changes won't be easy/quick&#xD;&#xA;    - Web3 Foundation have made two grants related/using IPFS, but not focused on getting IPFS in the native Substrate runtime&#xD;&#xA;    - The Iris grant project completed&#xD;&#xA;    - The offchain_ipfs project review/merge of contributions stalled due to lack of resources&#xD;&#xA;    - Substrate forks proliferate.... &#xD;&#xA;3. No" ContentLicense="CC BY-SA 4.0" />
  <row Id="20369" PostHistoryTypeId="2" PostId="5422" RevisionGUID="7ee4df59-b669-41f6-b2df-b3a014377781" CreationDate="2022-10-19T04:21:44.427" UserId="1777" Text="I have a hash string `&quot;0xf8dd02cc2a3174933fac4e87d7f6360c3cc67167db105b28d0bc434a60674e49&quot;`. How can i convert back to H256.&#xD;&#xA;&#xD;&#xA;I used function below but it return difference H256 `0xa8fb46593dfc218a4de6fcf14e0c9baa4bcf947b953c181689015793883b3a1d`&#xD;&#xA;&#xD;&#xA;	let hex_string = &quot;0xf8dd02cc2a3174933fac4e87d7f6360c3cc67167db105b28d0bc434a60674e49&quot;.as_bytes().to_vec();&#xD;&#xA;	info!(&quot;{:?}&quot;, hex_string);&#xD;&#xA;	let hex_string_hash = hash::&lt;Runtime&gt;(&amp;hex_string);&#xD;&#xA;	info!(&quot;{:?}&quot;, hex_string_hash);&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    pub fn hash&lt;Runtime&gt;(data: &amp;[u8]) -&gt; H256&#xD;&#xA;    where&#xD;&#xA;    	Runtime: frame_system::Config,&#xD;&#xA;    	H256: From&lt;&lt;Runtime as frame_system::Config&gt;::Hash&gt;,&#xD;&#xA;    {&#xD;&#xA;    	&lt;Runtime as frame_system::Config&gt;::Hashing::hash(data).into()&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="20371" PostHistoryTypeId="1" PostId="5422" RevisionGUID="7ee4df59-b669-41f6-b2df-b3a014377781" CreationDate="2022-10-19T04:21:44.427" UserId="1777" Text="Convert a H256 string to H256" ContentLicense="CC BY-SA 4.0" />
  <row Id="20372" PostHistoryTypeId="3" PostId="5422" RevisionGUID="7ee4df59-b669-41f6-b2df-b3a014377781" CreationDate="2022-10-19T04:21:44.427" UserId="1777" Text="|rust|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20373" PostHistoryTypeId="2" PostId="5423" RevisionGUID="f7963294-28d2-46ea-a6ef-54ea5407226d" CreationDate="2022-10-19T05:46:11.873" UserId="251" Text="I recommend using [array-bytes](https://crates.io/crates/array-bytes), see https://github.com/paritytech/substrate/pull/12190.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let hex = &quot;0xf8dd02cc2a3174933fac4e87d7f6360c3cc67167db105b28d0bc434a60674e49&quot;;&#xD;&#xA;if let Ok(h256) = array_bytes::hex_n_into::&lt;H256, 32&gt;() {&#xD;&#xA;    info!(&quot;{:?}&quot;, h256);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For your steps, you should remove the `0x` prefix. It isn't a part of bytes.&#xD;&#xA;&#xD;&#xA;With `array-bytes`, it will handle this automatically." ContentLicense="CC BY-SA 4.0" />
  <row Id="20375" PostHistoryTypeId="5" PostId="5422" RevisionGUID="3db02285-7a8f-4e28-8121-7bd09bb6e098" CreationDate="2022-10-19T05:51:49.947" UserId="251" Comment="added 2 characters in body" Text="I have a hash string `&quot;0xf8dd02cc2a3174933fac4e87d7f6360c3cc67167db105b28d0bc434a60674e49&quot;`. How can i convert back to H256.&#xD;&#xA;&#xD;&#xA;I used function below but it return difference H256 `0xa8fb46593dfc218a4de6fcf14e0c9baa4bcf947b953c181689015793883b3a1d`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let hex_string = &quot;0xf8dd02cc2a3174933fac4e87d7f6360c3cc67167db105b28d0bc434a60674e49&quot;.as_bytes().to_vec();&#xD;&#xA;info!(&quot;{:?}&quot;, hex_string);&#xD;&#xA;let hex_string_hash = hash::&lt;Runtime&gt;(&amp;hex_string);&#xD;&#xA;info!(&quot;{:?}&quot;, hex_string_hash);&#xD;&#xA;```&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn hash&lt;Runtime&gt;(data: &amp;[u8]) -&gt; H256&#xD;&#xA;where&#xD;&#xA;  	Runtime: frame_system::Config,&#xD;&#xA;   	H256: From&lt;&lt;Runtime as frame_system::Config&gt;::Hash&gt;,&#xD;&#xA;{&#xD;&#xA;   	&lt;Runtime as frame_system::Config&gt;::Hashing::hash(data).into()&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20376" PostHistoryTypeId="5" PostId="5422" RevisionGUID="73d16db5-5556-43a2-950f-0bf49a64b984" CreationDate="2022-10-19T06:32:07.927" UserId="1777" Comment="added 460 characters in body" Text="I have a hash string `&quot;0xf8dd02cc2a3174933fac4e87d7f6360c3cc67167db105b28d0bc434a60674e49&quot;`. How can i convert back to H256.&#xD;&#xA;&#xD;&#xA;I used function below but it return difference H256 `0xa8fb46593dfc218a4de6fcf14e0c9baa4bcf947b953c181689015793883b3a1d`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let hex_string = &quot;0xf8dd02cc2a3174933fac4e87d7f6360c3cc67167db105b28d0bc434a60674e49&quot;.as_bytes().to_vec();&#xD;&#xA;info!(&quot;{:?}&quot;, hex_string);&#xD;&#xA;let hex_string_hash = hash::&lt;Runtime&gt;(&amp;hex_string);&#xD;&#xA;info!(&quot;{:?}&quot;, hex_string_hash);&#xD;&#xA;```&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn hash&lt;Runtime&gt;(data: &amp;[u8]) -&gt; H256&#xD;&#xA;where&#xD;&#xA;  	Runtime: frame_system::Config,&#xD;&#xA;   	H256: From&lt;&lt;Runtime as frame_system::Config&gt;::Hash&gt;,&#xD;&#xA;{&#xD;&#xA;   	&lt;Runtime as frame_system::Config&gt;::Hashing::hash(data).into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: As [aurevoirxavier][1] answer. I have updated my code like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use primitive_types::H256;&#xD;&#xA;fn main() {&#xD;&#xA;    let hex = &quot;0xf8dd02cc2a3174933fac4e87d7f6360c3cc67167db105b28d0bc434a60674e49&quot;;&#xD;&#xA;    match array_bytes::hex_n_into::&lt;H256, 32&gt;(hex) {&#xD;&#xA;        Ok(h256) =&gt; {&#xD;&#xA;            println!(&quot;{:?}&quot;, h256);&#xD;&#xA;        }&#xD;&#xA;        _ =&gt; (),&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/users/251/aurevoirxavier" ContentLicense="CC BY-SA 4.0" />
  <row Id="20378" PostHistoryTypeId="2" PostId="5424" RevisionGUID="64b3687a-4ab3-457f-a528-53baf7f13131" CreationDate="2022-10-19T07:00:20.113" UserId="2423" Text="I am working on a system that allows users to send and receive on the Polkadot network. The system tracks the amount of DOT controlled by a user, and this may be spread across multiple Polkadot accounts.&#xD;&#xA;&#xD;&#xA;Scenario&#xD;&#xA;--------&#xD;&#xA;* A user controls many DOT addresses on our system&#xD;&#xA;* They wish to transfer balance to a DOT address&#xD;&#xA;* The balance to be transferred is greater than the balance of any one account that they control&#xD;&#xA;* We cannot allow sending accounts to be reaped&#xD;&#xA;&#xD;&#xA;My solution is to broadcast multiple balance transfer Extrinsics (&quot;components&quot;) such that the total amount transferred matches the total target balance transfer amount.&#xD;&#xA;&#xD;&#xA;This is obviously inefficient since multiple inclusion fees/tips are paid, but this inefficiency is not a problem. &#xD;&#xA;&#xD;&#xA;To prevent reaping of accounts controlled by our system, &quot;component&quot; Extrinsics either spend their full account balance or spend such that the Existential Balance on that account is maintained.&#xD;&#xA;&#xD;&#xA;Is this (multiple &quot;component&quot; Extrinsics) my only option, or am I missing a better solution?&#xD;&#xA;&#xD;&#xA;I have the following assumptions:&#xD;&#xA;1. A balance transfer Extrinsic that sends less than the Existential Deposit to a new (zero-balance) address is considered invalid and not accepted by the network.&#xD;&#xA;2. It is not possible to batch inputs in a Substrate/Polkadot Extrinsic - a single balance transfer cannot have multiple senders&#xD;&#xA;3. If two extrinsics are broadcast together and each sends (0.6 x Existential Deposit) to the same zero-balance address, both Extrinsics are invalid and will fail&#xD;&#xA;&#xD;&#xA;Are these assumptions correct?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20380" PostHistoryTypeId="1" PostId="5424" RevisionGUID="64b3687a-4ab3-457f-a528-53baf7f13131" CreationDate="2022-10-19T07:00:20.113" UserId="2423" Text="Is it possible to transfer balance from multiple accounts to the same receiver in a single Extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20381" PostHistoryTypeId="3" PostId="5424" RevisionGUID="64b3687a-4ab3-457f-a528-53baf7f13131" CreationDate="2022-10-19T07:00:20.113" UserId="2423" Text="|polkadot|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20383" PostHistoryTypeId="2" PostId="5425" RevisionGUID="5fdf9f78-51d0-403c-ac72-4fbd19f2c0a7" CreationDate="2022-10-19T08:38:41.603" UserId="620" Text="You can do this using _derivative accounts_. See this [blog post](https://www.parity.io/blog/building-a-hot-wallet-with-substrate-primitives/) for an example, although it's not exactly what you're looking for.&#xD;&#xA;&#xD;&#xA;You've correctly spotted that a `batch` of extrinsics all must come from the same `origin`, which in general is an account. However, using `utility.as_derivative`, you can create derivative origins for a single account. So then you can do a `batch` with multiple `as_derivative` calls, since those will take on the derived origin.&#xD;&#xA;&#xD;&#xA;&gt; A user controls many DOT addresses on our system&#xD;&#xA;&#xD;&#xA;I assume here you mean that _you_ control the keys, and allow users access to those accounts?&#xD;&#xA;&#xD;&#xA;The `as_derivative` approach assumes that you control the address generation process, since if your users were generating their own addresses then you'd have no way to make sure their accounts are siblings." ContentLicense="CC BY-SA 4.0" />
  <row Id="20385" PostHistoryTypeId="2" PostId="5426" RevisionGUID="2253fe38-ead9-4249-b2d6-ae161f5a6fc7" CreationDate="2022-10-19T08:55:11.787" UserId="3171" Text="Solang works with Parity Substrate 3.0. Note that for recent Substrate Version, **cross-contract calls** as well as **using address type as function argument** or return values **ARE NOT SUPPORTED**. We are currently **working on** fixing any regressions.&#xD;&#xA;&#xD;&#xA;https://solang.readthedocs.io/en/latest/targets/substrate.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="20387" PostHistoryTypeId="2" PostId="5427" RevisionGUID="5856c59b-e385-4154-8953-66013907003b" CreationDate="2022-10-19T08:59:48.927" UserId="3352" Text="I added a new account using this command in polkadotjs.&#xD;&#xA;```const { pair, json } = keyring.addUri(mnemonic, 'myStr0ngP@ssworD', { name: 'mnemonic acc' });```&#xD;&#xA;And now, I want to forget the account. &#xD;&#xA;I used ```keyring.forgetAddress```, but it doesn't really remove account.&#xD;&#xA;I always load accounts using ```keyring.getAccounts()``` after ```forgetAddress```.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I just wanted to know how the **Forget Account** action works in polkadotjs extension.&#xD;&#xA;What function or API is called?&#xD;&#xA;Please help me.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OsP5f.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20389" PostHistoryTypeId="1" PostId="5427" RevisionGUID="5856c59b-e385-4154-8953-66013907003b" CreationDate="2022-10-19T08:59:48.927" UserId="3352" Text="How to remove account using polkadotjs? What function should I call to forget an account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20390" PostHistoryTypeId="3" PostId="5427" RevisionGUID="5856c59b-e385-4154-8953-66013907003b" CreationDate="2022-10-19T08:59:48.927" UserId="3352" Text="|polkadot-js|substrate-front-end|polkadot-js-extension|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20391" PostHistoryTypeId="5" PostId="5427" RevisionGUID="0705ba3e-c14a-45d0-bf38-a88543c25a66" CreationDate="2022-10-19T09:05:16.017" UserId="3352" Comment="deleted 9 characters in body" Text="I added a new account using this command in polkadotjs.&#xD;&#xA;```const { pair, json } = keyring.addUri(mnemonic, 'myStr0ngP@ssworD', { name: 'mnemonic acc' });```&#xD;&#xA;And now, I want to forget the account. &#xD;&#xA;I used ```keyring.forgetAddress```, but it doesn't really remove account.&#xD;&#xA;I always load accounts using ```keyring.getAccounts()``` after ```forgetAddress```.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;For example, how the **Forget Account** action works in polkadotjs extension.&#xD;&#xA;What function or API is called?&#xD;&#xA;Please help me.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OsP5f.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20392" PostHistoryTypeId="2" PostId="5428" RevisionGUID="77ee78f6-01ef-4d60-ae49-75d4713e41d1" CreationDate="2022-10-19T09:13:22.357" UserId="16" Text="No. The way ink! 4.0 does storage was completely reworked. In general, you cannot expect to be able to re-use the storage during such an upgrade." ContentLicense="CC BY-SA 4.0" />
  <row Id="20394" PostHistoryTypeId="4" PostId="5408" RevisionGUID="59d434bf-84f6-467a-a902-0b64dec79e5c" CreationDate="2022-10-19T09:16:26.193" UserId="1959" Comment="Update the title" Text="Parachain doesn't produce blocks (collation wasn't advertised to any validator)" ContentLicense="CC BY-SA 4.0" />
  <row Id="20395" PostHistoryTypeId="24" PostId="5408" RevisionGUID="59d434bf-84f6-467a-a902-0b64dec79e5c" CreationDate="2022-10-19T09:16:26.193" Comment="Proposed by 1959 approved by 2455 edit id of 313" ContentLicense="CC BY-SA 4.0" />
  <row Id="20396" PostHistoryTypeId="5" PostId="5408" RevisionGUID="4f32dbec-625a-45dd-ba42-510a0858cf31" CreationDate="2022-10-19T09:36:09.153" UserId="251" Comment="added 3 characters in body" Text="I am running a local testnet of a 2-validator-node polkadot Relay Chain (release-v0.9.27) and I am trying to connect a parachain-template to it (v0.9.27), with custom keys. The Relay Chain is working as intended, producing and finalizing blocks.&#xD;&#xA;&#xD;&#xA;When I connect the parachain (have tried with 1 collator and 2 collators) to the Relay Chain, the parachain tries to import the first block but never does it, and all I get is `Collation wasn't advertised to any validator`. That procedure continues for a while (5-10mins) and then I get the following errors:&#xD;&#xA;&#xD;&#xA;```log&#xD;&#xA;[Parachain] Block import error: State Database error: Too many sibling blocks inserted&#xD;&#xA;[Parachain] Error with block built on 0xda79ce961787fcc5e5a97a19cd2a03695b30ee1791fb94a5045cf58f164951d0: Import failed: State Database error: Too many sibling blocks inserted&#xD;&#xA;[Parachain] Failed to collect collation info. error=Application(UnknownBlock(&quot;Header was not found in the database: 0x89acf273da66c70e14bd8c5daac0f82235522d15a61ef0a06d925dcf08a3340d&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have checked everything in this sanity checklist (https://substrate.stackexchange.com/questions/178/how-can-i-get-my-parachain-to-produce-blocks-sanity-checklist and https://substrate.stackexchange.com/questions/1394/our-parachain-doesnt-produce-blocks-checklist) and everything should work.&#xD;&#xA;&#xD;&#xA;I have also tried increasing the Validator count of the Relay Chain to 3 and I am still getting the same results." ContentLicense="CC BY-SA 4.0" />
  <row Id="20397" PostHistoryTypeId="5" PostId="5427" RevisionGUID="4b04ec63-04fd-4980-930e-50e1f022942a" CreationDate="2022-10-19T09:37:55.527" UserId="251" Comment="deleted 3 characters in body" Text="I added a new account using this command in PolkadotJS.&#xD;&#xA;```js&#xD;&#xA;const { pair, json } = keyring.addUri(mnemonic, 'myStr0ngP@ssworD', { name: 'mnemonic acc' });&#xD;&#xA;```&#xD;&#xA;And now, I want to forget the account. &#xD;&#xA;I used `keyring.forgetAddress`, but it doeslly remove the account.&#xD;&#xA;I always load accounts using `keyring.getAccounts()` after `forgetAddress`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;For example, how does the **Forget Account** action work in the PolkadotJS extension?&#xD;&#xA;What function or API is called?&#xD;&#xA;Please help me.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OsP5f.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20398" PostHistoryTypeId="2" PostId="5429" RevisionGUID="2a34963c-b8fc-4af0-95b2-1caf0c7385ad" CreationDate="2022-10-19T09:38:56.987" UserId="2673" Text="I believe the method to use here is `forgetAccount`, not `forgetAddress`." ContentLicense="CC BY-SA 4.0" />
  <row Id="20400" PostHistoryTypeId="5" PostId="5413" RevisionGUID="e18de0f0-cb0d-4a13-ad83-6eac9a492654" CreationDate="2022-10-19T09:41:42.687" UserId="251" Comment="added 13 characters in body" Text="**We are getting the below canonicalization issue and we are wondering:**&#xD;&#xA;&#xD;&#xA; - Is it a problem or is it normal and can be ignored?&#xD;&#xA; - Has anyone found a method to resolve it?&#xD;&#xA;&#xD;&#xA; **Here's what we know:**&#xD;&#xA;&#xD;&#xA; - It consistently begins at block 2400, and occurs in every block thereafter&#xD;&#xA; - It occurs on --dev, --pruning archive, --unsafe-pruning (for any number) but only on validator nodes (not on sync nodes - that part makes sense)&#xD;&#xA; - It occurs on all node accounts, including Bob and other development node accounts&#xD;&#xA; - Sometimes it is followed by the comment *Offchain: could not prune: no entry in pruning map for block*, but not always.&#xD;&#xA; - It does not seem to affect latency, block production, etc&#xD;&#xA; - We are running the Substrate kitchen sink master 09.26&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Log Sample:**&#xD;&#xA;&#xD;&#xA;```log&#xD;&#xA;2022-10-03 10:21:57 ✨ Imported #2400 (0xbcf6…a1d1)    &#xD;&#xA;2022-10-03 10:21:57 Could not canonicalize elem at pos 0 using key [12, 109, 109, 114, 179, 231, 150, 242, 116, 82, 112, 40, 61, 105, 19, 211, 47, 138, 252, 83, 183, 123, 184, 153, 192, 116, 137, 163, 141, 85, 35, 94, 41, 140, 112, 6, 0, 0, 0, 0, 0, 0, 0, 0]    &#xD;&#xA;2022-10-03 10:21:57 Offchain: could not prune: no entry in pruning map for block 0    &#xD;&#xA;2022-10-03 10:21:57 ♻️  Reorg on #2400,0xbcf6…a1d1 to #2400,0xf59d…0abd, common ancestor #2399,0xe757…9679    &#xD;&#xA;2022-10-03 10:21:57 ✨ Imported #2400 (0xf59d…0abd)    &#xD;&#xA;2022-10-03 10:21:57 Could not canonicalize elem at pos 0 using key [12, 109, 109, 114, 179, 231, 150, 242, 116, 82, 112, 40, 61, 105, 19, 211, 47, 138, 252, 83, 183, 123, 184, 153, 192, 116, 137, 163, 141, 85, 35, 94, 41, 140, 112, 6, 0, 0, 0, 0, 0, 0, 0, 0]    &#xD;&#xA;2022-10-03 10:21:57 Offchain: could not prune: no entry in pruning map for block 0    &#xD;&#xA;2022-10-03 10:22:00  New epoch 12 launching at block 0x716f…5741 (block slot 554935640 &gt;= start slot 554935640).    &#xD;&#xA;2022-10-03 10:22:00  Next epoch starts at slot 554935840    &#xD;&#xA;2022-10-03 10:22:00 ✨ Imported #2401 (0x716f…5741)    &#xD;&#xA;2022-10-03 10:22:00 Could not canonicalize elem at pos 1 using key [12, 109, 109, 114, 231, 162, 175, 129, 3, 105, 243, 83, 25, 239, 92, 131, 52, 160, 52, 125, 39, 24, 187, 185, 18, 0, 111, 70, 240, 16, 197, 70, 27, 241, 63, 19, 1, 0, 0, 0, 0, 0, 0, 0]    &#xD;&#xA;2022-10-03 10:22:00 Could not canonicalize elem at pos 2 using key [12, 109, 109, 114, 231, 162, 175, 129, 3, 105, 243, 83, 25, 239, 92, 131, 52, 160, 52, 125, 39, 24, 187, 185, 18, 0, 111, 70, 240, 16, 197, 70, 27, 241, 63, 19, 2, 0, 0, 0, 0, 0, 0, 0]    &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20401" PostHistoryTypeId="6" PostId="5413" RevisionGUID="e18de0f0-cb0d-4a13-ad83-6eac9a492654" CreationDate="2022-10-19T09:41:42.687" UserId="251" Comment="added 13 characters in body" Text="|substrate-node|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20402" PostHistoryTypeId="50" PostId="4888" RevisionGUID="b1ef3426-e771-4b58-97aa-41b70ebffb1c" CreationDate="2022-10-19T10:03:00.357" UserId="-1" />
  <row Id="20403" PostHistoryTypeId="2" PostId="5430" RevisionGUID="5f1518ba-0bbb-4df9-b6b6-c123091ebf90" CreationDate="2022-10-19T10:06:27.620" UserId="426" Text="Since XCM is configurable, this can depend from chain to chain. However, most(if not all) Dotsama chains adopt the same approach. We rely on parity's implementation of `XcmExecutor` ([here][1]) and various _off-the-shelf_ implementation of various traits from the `xcm-builder` [crate][2].&#xD;&#xA;&#xD;&#xA;### XCM Instruction Weight&#xD;&#xA;&#xD;&#xA;Each XCM instruction has a certain _weight_ since executing it takes some time. How XCM instructions are weighed is configured via `XcmConfig`,by setting `type Weigher` to some type.&#xD;&#xA;&#xD;&#xA;E.g `polkadot` uses `FixedWeightBounds`([here][3] and [here][4]) which will assign fixed weight to each XCM instruction with few exceptions. E.g. `Transact`'s weight will consist of fixed weight + the weight of the call being transacted.&#xD;&#xA;&#xD;&#xA;Using this approach, we can calculate the sum of weights for all the XCM instructions in a sequence. E.g. sequence `{ WithdrawAsset, BuyExecution, Transact }` can be weighed as `Weigher::weigh(WithdrawAsset) + Weigher::weigh(BuyExecution) + Weigher::weigh(Transact)`.&#xD;&#xA;&#xD;&#xA;### Paying For Xcm Execution&#xD;&#xA;&#xD;&#xA;Let's assume for the sake of this example that we receive a XCM sent by a user with normal privileges (not `root` or `sovereign-account`). Like in you case above, `Alice` sends XCM from one chain to another.&#xD;&#xA;&#xD;&#xA;Since `Alice` isn't a privileged user, she has to pay for executing transaction on _Parachain-A_, as you already noted. She also has to pay for XCM execution on the _Parachain-B_.&#xD;&#xA;&#xD;&#xA;How much she has to pay and what currencies are supported for payment is once again configured by each chain. The setting type related to this is `type Trader`([here][5]). In case of `Polkadot`, it just supports native `DOT` as payment asset ([here][6] and [here][7]). Same as with any other transaction on `Polkadot`, execution fee is correlated with weight - the more _heavy_ the XCM is, the more you have to pay.&#xD;&#xA;&#xD;&#xA;It's worth noting that many parachains allow XCM execution payment to be done in non-native asset. E.g. `Astar` has a configurable pallet that allows us to configure non-native asset as payment assets ([here][8]). Other parachains also use basically the same approach.&#xD;&#xA;&#xD;&#xA;If you don't intend to pay for execution, chains will simply block your XCM and discard it. This is configured via `type Barrier` ([here][9] and [here][10]). Most relevant `Barrier` for `Alice` in this example is probably `AllowTopLevelPaidExecutionFrom` ([here][11]). It requires that the first message in XCM sequence is one that will put some assets into the holding register. This command should be followed-up by `BuyExecution` command which ensures you can pay for the follow-up XCM instructions you want to execute on the destination chain.&#xD;&#xA;&#xD;&#xA;For the sake of example, let's assume the first XCM instruction is `WithdrawAsset`. Executing this in _Parachain-B_ will attempt to withdraw some funds from `Alice`-derived account there. Which account is used, yet again depends on chain configuration. In case you're sending XCM from e.g. `Astar` to `Polkadot`, no new account would be derived and your public key would just be used on `Polkadot`. This would mean that `Alice` has to have some `DOT` in her account on `Polkadot`.&#xD;&#xA;&#xD;&#xA;After this, `BuyExecution` is executed and some `DOTs` are spent to pay for XCM execution on `Polkadot`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Hope this helps you :)&#xD;&#xA;&#xD;&#xA;EDIT: regarding `OriginKind`, maybe [this][12] topic can be of help to you. It was quite confusing to me as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/tree/53253de77f1649ecbb650df2ec3e29d0d1110a2d/xcm/xcm-executor&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/tree/53253de77f1649ecbb650df2ec3e29d0d1110a2d/xcm/xcm-builder&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/2b0d83258089578b65712e143c794cf4922941de/xcm/xcm-builder/src/weight.rs#L31&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/xcm_config.rs#L144&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot/blob/master/xcm/xcm-executor/src/config.rs#L54&#xD;&#xA;  [6]: https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/xcm_config.rs#L146&#xD;&#xA;  [7]: https://github.com/paritytech/polkadot/blob/2b0d83258089578b65712e143c794cf4922941de/xcm/xcm-builder/src/weight.rs#L244&#xD;&#xA;  [8]: https://github.com/AstarNetwork/Astar/blob/master/runtime/astar/src/xcm_config.rs#L151&#xD;&#xA;  [9]: https://github.com/paritytech/polkadot/blob/master/xcm/xcm-executor/src/config.rs#L48&#xD;&#xA;  [10]: https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/xcm_config.rs#L122&#xD;&#xA;  [11]: https://github.com/paritytech/polkadot/blob/53253de77f1649ecbb650df2ec3e29d0d1110a2d/xcm/xcm-builder/src/barriers.rs#L55&#xD;&#xA;  [12]: https://substrate.stackexchange.com/questions/5066/originkind-in-xcms-transact" ContentLicense="CC BY-SA 4.0" />
  <row Id="20406" PostHistoryTypeId="5" PostId="5408" RevisionGUID="8554a178-916c-441e-afde-aba1580edfc5" CreationDate="2022-10-19T10:33:58.253" UserId="2455" Comment="added 2 characters in body" Text="I am running a local testnet of a 2-validator-node polkadot Relay Chain (release-v0.9.27) and I am trying to connect a parachain-template to it (v0.9.27), with custom keys. The Relay Chain is working as intended, producing and finalizing blocks.&#xD;&#xA;&#xD;&#xA;When I connect the parachain (have tried with 1 collator and 2 collators) to the Relay Chain, the parachain tries to import the first block but never does it, and all I get is `Collation wasn't advertised to any validator`. That procedure continues for a while (5-10mins) and then I get the following errors:&#xD;&#xA;&#xD;&#xA;```log&#xD;&#xA;[Parachain] Block import error: State Database error: Too many sibling blocks inserted&#xD;&#xA;[Parachain] Error with block built on 0xda79ce961787fcc5e5a97a19cd2a03695b30ee1791fb94a5045cf58f164951d0: Import failed: State Database error: Too many sibling blocks inserted&#xD;&#xA;[Parachain] Failed to collect collation info. error=Application(UnknownBlock(&quot;Header was not found in the database: 0x89acf273da66c70e14bd8c5daac0f82235522d15a61ef0a06d925dcf08a3340d&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have checked everything in these sanity checklists (https://substrate.stackexchange.com/questions/178/how-can-i-get-my-parachain-to-produce-blocks-sanity-checklist and https://substrate.stackexchange.com/questions/1394/our-parachain-doesnt-produce-blocks-checklist) and everything should work.&#xD;&#xA;&#xD;&#xA;I have also tried increasing the Validator count of the Relay Chain to 3 and I am still getting the same results." ContentLicense="CC BY-SA 4.0" />
  <row Id="20407" PostHistoryTypeId="5" PostId="5421" RevisionGUID="6b163215-186f-4719-9b57-1111d30de78d" CreationDate="2022-10-19T10:51:11.770" UserId="3344" Comment="added 392 characters in body" Text="1. Use a pallet&#xD;&#xA;2. It is unclear. See my comment [here](https://github.com/w3f/Grants-Program/pull/1187#issuecomment-1283354955) for more detail behind this summary:&#xD;&#xA;    - Upstream changes to Substrate are required for native Substrate runtime support of IPFS (things have been tried).&#xD;&#xA;    - [Upstream is not resistant](https://github.com/rs-ipfs/offchain-ipfs-manual/issues/22#issuecomment-877354507)&#xD;&#xA;    - Upstream changes won't be easy/quick&#xD;&#xA;    - Web3 Foundation have made two grants related/using IPFS, but not focused on getting IPFS in the native Substrate runtime&#xD;&#xA;    - The Iris grant project completed&#xD;&#xA;    - The offchain_ipfs project review/merge of contributions stalled due to lack of resources&#xD;&#xA;    - Substrate forks proliferate.... &#xD;&#xA;3. No&#xD;&#xA;&#xD;&#xA;**Update:**&#xD;&#xA;rs-ipfs is in a state of flux, possibly being [archived](https://github.com/rs-ipfs/rust-ipfs/pull/512), with [iroh](https://github.com/n0-computer/iroh) being a new candidate. Performance is [impressive (presentation)](https://www.youtube.com/watch?v=qPBR2K2X6cs&amp;t=161s) but it is early days.&#xD;&#xA;&#xD;&#xA;Substrate forking seems unavoidable for the foreseeable future, say 12+ months" ContentLicense="CC BY-SA 4.0" />
  <row Id="20408" PostHistoryTypeId="52" PostId="5422" RevisionGUID="da211388-9d6e-4277-a96e-4bdbdd04ebe1" CreationDate="2022-10-19T12:22:54.953" />
  <row Id="20409" PostHistoryTypeId="2" PostId="5431" RevisionGUID="33838e02-0702-455a-92c1-2596aef9dc8c" CreationDate="2022-10-19T14:00:14.283" UserId="3346" Text="Potential answer found in this issue on GitHub... https://github.com/paritytech/substrate/issues/12531&#xD;&#xA;&#xD;&#xA;Quoting user acatangiu...&#xD;&#xA;&#xD;&#xA;&gt; pallet-mmr&#xD;&#xA;&gt; &#xD;&#xA;&gt; uses sp_io::offchain_index API to save full MMR leaves content to&#xD;&#xA;&gt; offchain db, it also defines an offchain_worker() fn that does&#xD;&#xA;&gt; canonicalization of data in offchain db. Issue When&#xD;&#xA;&gt; --enable-offchain-indexing=true is not set, (1) doesn't write anything to offchain db, while (2) keeps on spamming error logs on failures to&#xD;&#xA;&gt; do canonicalization.&#xD;&#xA;&#xD;&#xA;So the answer might be simply to use the flag  --enable-offchain-indexing=true when starting up the node.&#xD;&#xA;&#xD;&#xA;We will test this today and report back." ContentLicense="CC BY-SA 4.0" />
  <row Id="20411" PostHistoryTypeId="2" PostId="5432" RevisionGUID="571868e8-0df3-41e2-8eb8-47aa9e70e85e" CreationDate="2022-10-19T14:02:59.957" UserId="382" Text="This is coming from `pallet-mmr`: opened https://github.com/paritytech/substrate/issues/12531 to fix it.&#xD;&#xA;&#xD;&#xA;------&#xD;&#xA;&#xD;&#xA;&gt; Is it a problem or is it normal and can be ignored?&#xD;&#xA;&#xD;&#xA;You can definitely ignore those error logs (my guess is you are not actually using `pallet-mmr`).&#xD;&#xA;&#xD;&#xA;&gt; Has anyone found a method to resolve it?&#xD;&#xA;&#xD;&#xA;Possible workarounds:&#xD;&#xA;- remove `pallet-mmr` from your runtime (if you can, and don't need it),&#xD;&#xA;- run node with extra `--enable-offchain-indexing=true` param,&#xD;&#xA;- filter out logs with `target=runtime::mmr::offchain` (&quot;problem&quot; is still there, but you won't see these logs anymore)." ContentLicense="CC BY-SA 4.0" />
  <row Id="20413" PostHistoryTypeId="5" PostId="5374" RevisionGUID="cbb8ae9d-5c11-4b15-bac7-88d9afcf5f79" CreationDate="2022-10-19T14:11:30.553" UserId="3338" Comment="deleted 179 characters in body" Text="Check the total amount on stake - if it goes under the  specific limit, the Granpa stops finalizing." ContentLicense="CC BY-SA 4.0" />
  <row Id="20414" PostHistoryTypeId="2" PostId="5433" RevisionGUID="ead33fa6-34ba-439e-9d8c-65e07d3d1011" CreationDate="2022-10-19T14:29:14.087" UserId="3309" Text="Ultimately you're at the behest of that service provider's internal logic of how they deal with load and spam - there is no set way to respond (e.g. if you 500 error, 404, actively ban ip, redirect it into a blackhole etc).&#xD;&#xA;&#xD;&#xA;I'd recommend:&#xD;&#xA;&#xD;&#xA; - use a throttle like [bottleneck][1] to prevent yourself from getting banned&#xD;&#xA;- Not using the acala dwellir rpc endpoint, if i remember correctly, that one is highly limited&#xD;&#xA;- writing some code (like a connection singleton) which reuses the same wss connection and reconnects to different endpoint if you're booted off&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.npmjs.com/package/bottleneck" ContentLicense="CC BY-SA 4.0" />
  <row Id="20416" PostHistoryTypeId="52" PostId="5424" RevisionGUID="047ba9ed-594a-4d34-affb-aac3e67e6a99" CreationDate="2022-10-19T15:01:00.893" />
  <row Id="20417" PostHistoryTypeId="2" PostId="5434" RevisionGUID="208be9e2-78c7-4d91-a05f-62464df0a45b" CreationDate="2022-10-19T15:52:35.450" UserId="1833" Text="Just a reminder, if we're using the `on_initialize` hook, we should ensure that we don't do any heavy computation in that and also the weights are properly calculated with benchmarks. Recently, we faced this exact issue because of heavy computations on the `on_initialize` hook.&#xD;&#xA;&#xD;&#xA;The `on_initialize` hook is part of the block [initialisation process][1] which will be executed before executing the transactions to be included in a block. One way to check if your on_intialize (mandatory class) is causing this issue is to check the BlockWeights in system storage as below&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]    &#xD;&#xA;&#xD;&#xA;The *mandatory* class of the Blockweights should be as limited as possible if your `on_initilize` is heavier, then the *mandatory* class value would be very high and could potentially cause the other extrinsic (which falls under *normal* or *operational* class) may not be included in the block. More info on BlockWeights is available [here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/fundamentals/transaction-lifecycle/#executing-transactions-and-producing-blocks&#xD;&#xA;  [2]: https://i.stack.imgur.com/UhPm4.png&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/07e1b6d72747f3cde49e85e4ff68ff158daebe16/frame/system/src/limits.rs#L124" ContentLicense="CC BY-SA 4.0" />
  <row Id="20419" PostHistoryTypeId="2" PostId="5435" RevisionGUID="cbfa0fda-7938-40f7-a094-746ee1b2c16a" CreationDate="2022-10-19T15:56:21.280" UserId="512" Text="We're writing a proxy extrinsic that dispatches a child call and consumes a 'free call'. We want to return the error of the child call to the user, but we want to consume a free call regardless.&#xD;&#xA;&#xD;&#xA;Since I believe transactions are now transactional by default (ie rollback on error), what's the best way to return the results of the call to the user?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20421" PostHistoryTypeId="1" PostId="5435" RevisionGUID="cbfa0fda-7938-40f7-a094-746ee1b2c16a" CreationDate="2022-10-19T15:56:21.280" UserId="512" Text="Prevent state from being rolled back during an error (transactional)" ContentLicense="CC BY-SA 4.0" />
  <row Id="20422" PostHistoryTypeId="3" PostId="5435" RevisionGUID="cbfa0fda-7938-40f7-a094-746ee1b2c16a" CreationDate="2022-10-19T15:56:21.280" UserId="512" Text="|state|transactional|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20423" PostHistoryTypeId="2" PostId="5436" RevisionGUID="4e2ed826-0964-4ea3-bfac-c083902366bc" CreationDate="2022-10-19T16:02:24.740" UserId="246" Text="Using [py-substrate-interface][1] to parse block data, we noticed that some events return `None` for the `extrinsic_idx` parameter. &#xD;&#xA;&#xD;&#xA;Would someone please be so kind to explain why an event wouldn't have an extrinsic (idx) associated to it? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;See below code and output for example: &#xD;&#xA;&#xD;&#xA;**Code:**&#xD;&#xA;&#xD;&#xA;    from base64 import decode&#xD;&#xA;    from substrateinterface import SubstrateInterface&#xD;&#xA;    &#xD;&#xA;    substrate = SubstrateInterface(&#xD;&#xA;                url='wss://rpc.polkadot.io')&#xD;&#xA;    &#xD;&#xA;    block_hash = substrate.get_block_hash(12449658)&#xD;&#xA;    &#xD;&#xA;    test_block = substrate.get_block(block_hash=block_hash)&#xD;&#xA;    &#xD;&#xA;    test_events = substrate.get_events(block_hash)&#xD;&#xA;    &#xD;&#xA;    #visualising events in polkadot block 12449658&#xD;&#xA;    for idx,event in enumerate(test_events):&#xD;&#xA;        decoded_event = event.decode()&#xD;&#xA;        print(&quot;event_idx &quot;,idx,&#xD;&#xA;        &quot;phase &quot;,decoded_event['phase'],&#xD;&#xA;        &quot;module_id &quot;,decoded_event['module_id'],&#xD;&#xA;        &quot;event_id &quot;,decoded_event['event_id'],&#xD;&#xA;        &quot;extrinsic_idx&quot;, decoded_event['extrinsic_idx'])&#xD;&#xA;&#xD;&#xA;**Output:**&#xD;&#xA;&#xD;&#xA;    event_idx  0 phase  Initialization module_id  ImOnline event_id  AllGood extrinsic_idx None&#xD;&#xA;    event_idx  1 phase  Initialization module_id  Staking event_id  EraPaid extrinsic_idx None&#xD;&#xA;    event_idx  2 phase  Initialization module_id  Balances event_id  Deposit extrinsic_idx None&#xD;&#xA;    event_idx  3 phase  Initialization module_id  Treasury event_id  Deposit extrinsic_idx None&#xD;&#xA;    event_idx  4 phase  Initialization module_id  Session event_id  NewSession extrinsic_idx None&#xD;&#xA;    event_idx  5 phase  ApplyExtrinsic module_id  System event_id  ExtrinsicSuccess extrinsic_idx 0&#xD;&#xA;    event_idx  6 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateIncluded extrinsic_idx 1&#xD;&#xA;    event_idx  7 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateIncluded extrinsic_idx 1&#xD;&#xA;    event_idx  8 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateIncluded extrinsic_idx 1&#xD;&#xA;    event_idx  9 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateIncluded extrinsic_idx 1&#xD;&#xA;    event_idx  10 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateIncluded extrinsic_idx 1&#xD;&#xA;    event_idx  11 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateIncluded extrinsic_idx 1&#xD;&#xA;    event_idx  12 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateIncluded extrinsic_idx 1&#xD;&#xA;    event_idx  13 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateIncluded extrinsic_idx 1&#xD;&#xA;    event_idx  14 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateIncluded extrinsic_idx 1&#xD;&#xA;    event_idx  15 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateIncluded extrinsic_idx 1&#xD;&#xA;    event_idx  16 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  17 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  18 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  19 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  20 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  21 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  22 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  23 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  24 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  25 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  26 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  27 phase  ApplyExtrinsic module_id  ParaInclusion event_id  CandidateBacked extrinsic_idx 1&#xD;&#xA;    event_idx  28 phase  ApplyExtrinsic module_id  System event_id  ExtrinsicSuccess extrinsic_idx 1&#xD;&#xA;    event_idx  29 phase  Finalization module_id  Grandpa event_id  NewAuthorities extrinsic_idx None&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkascan/py-substrate-interface&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20425" PostHistoryTypeId="1" PostId="5436" RevisionGUID="4e2ed826-0964-4ea3-bfac-c083902366bc" CreationDate="2022-10-19T16:02:24.740" UserId="246" Text="Why do are some events in a block missing an extrinsic_idx?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20426" PostHistoryTypeId="3" PostId="5436" RevisionGUID="4e2ed826-0964-4ea3-bfac-c083902366bc" CreationDate="2022-10-19T16:02:24.740" UserId="246" Text="|events|python|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20427" PostHistoryTypeId="2" PostId="5437" RevisionGUID="0d6217d8-0a50-43e6-bb21-0260792af156" CreationDate="2022-10-19T16:12:45.333" UserId="292" Text="The &quot;native&quot; approach uses the off-chain worker(ocw) functionality to interact with IPFS. I'd guess a Substrate pallet for IPFS doesn't exist because each implementation will have its differences and require somewhat of a custom implementation. I think the projects you've linked and discussed are the ones to watch. Maybe search some big parachain projects to see if they have any IPFS ocws. " ContentLicense="CC BY-SA 4.0" />
  <row Id="20429" PostHistoryTypeId="2" PostId="5438" RevisionGUID="acfaaafd-6925-46fa-8beb-7029ee9c1cdc" CreationDate="2022-10-19T16:18:40.417" UserId="94" Text="Only the events in phase `ApplyExtrinsic` have an extrinsic index attached.  &#xD;&#xA;Everything that runs before is from `on_initialize` hooks and everything afterwards from `on_finalize`.  &#xD;&#xA;These always run in every block and cannot be triggered through an extrinsic, hence no index." ContentLicense="CC BY-SA 4.0" />
  <row Id="20431" PostHistoryTypeId="5" PostId="5434" RevisionGUID="d2455f75-1b48-49f8-9172-2006030d754e" CreationDate="2022-10-19T16:21:01.403" UserId="1833" Comment="added 14 characters in body" Text="Just a reminder, if we're using the `on_initialize` hook, we should ensure that we don't do any heavy computation in that and also the weights are properly calculated with benchmarks. Recently, we faced this exact issue because of heavy computations on the `on_initialize` hook.&#xD;&#xA;&#xD;&#xA;The `on_initialize` hook is part of the block [initialisation process][1] which will be executed before executing the transactions to be included in a block. One way to check if our on_intialize (which falls under *mandatory* class) is causing this issue is to check the BlockWeights in system storage as below&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]    &#xD;&#xA;&#xD;&#xA;The *mandatory* class of the Blockweights should be as limited as possible if our `on_initilize` is heavier, then the *mandatory* class value would be very high and could potentially cause the extrinsic (which falls under *normal* or *operational* class) to not to be included in the block. More info on BlockWeights is available [here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/fundamentals/transaction-lifecycle/#executing-transactions-and-producing-blocks&#xD;&#xA;  [2]: https://i.stack.imgur.com/UhPm4.png&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/07e1b6d72747f3cde49e85e4ff68ff158daebe16/frame/system/src/limits.rs#L124" ContentLicense="CC BY-SA 4.0" />
  <row Id="20436" PostHistoryTypeId="2" PostId="5440" RevisionGUID="a1332901-6cee-4270-bc6e-e98954f918e2" CreationDate="2022-10-19T16:52:11.623" UserId="94" Text="In general you cannot prevent the state from being rolled back on an error. &#xD;&#xA;&#xD;&#xA;Did you have a look at the `pallet-utility` pallet?  &#xD;&#xA;The [`force_batch`](https://github.com/paritytech/substrate/blob/07e1b6d72747f3cde49e85e4ff68ff158daebe16/frame/utility/src/lib.rs#L464) call has a similar semantic where errors are reported through events. It does not abort on an error but rather emits them as events. The respective event definitions look like this:  &#xD;&#xA;```rust&#xD;&#xA;/// A single item within a Batch of dispatches has completed with no error.&#xD;&#xA;ItemCompleted,&#xD;&#xA;&#xD;&#xA;/// A single item within a Batch of dispatches has completed with error.&#xD;&#xA;ItemFailed { error: DispatchError },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It then emits these events depending on the result of a previous dispatch:  &#xD;&#xA;```rust&#xD;&#xA;if let Err(e) = result {&#xD;&#xA;	Self::deposit_event(Event::ItemFailed { error: e.error });&#xD;&#xA;} else {&#xD;&#xA;	Self::deposit_event(Event::ItemCompleted);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So you could probably define similar events for `FreeCallConsumed` and `ChildCallFailed`." ContentLicense="CC BY-SA 4.0" />
  <row Id="20438" PostHistoryTypeId="2" PostId="5441" RevisionGUID="28ed4f39-b72e-45fb-aca9-5ed9787ccc91" CreationDate="2022-10-19T17:28:52.027" UserId="29" Text="This has to do with [Transaction Validity](https://docs.substrate.io/fundamentals/transaction-lifecycle/#validating-and-queuing-transactions). &#xD;&#xA;&#xD;&#xA;Here is the error in Substrate:&#xD;&#xA;```rust&#xD;&#xA;InvalidTransaction::Stale =&gt; &quot;Transaction is outdated&quot;,&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/25388397aab20a24e2be55103dda95011aa04d7c/primitives/runtime/src/transaction_validity.rs#L98&#xD;&#xA;&#xD;&#xA;If you look up the enum variant `InvalidTransaction::Stale` you will find the following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// General error to do with the transaction being outdated (e.g. nonce too low).&#xD;&#xA;	Stale,&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/07e1b6d72747f3cde49e85e4ff68ff158daebe16/primitives/runtime/src/transaction_validity.rs#L47-L48&#xD;&#xA;&#xD;&#xA;It could be that your nonce is too low (old).&#xD;&#xA;&#xD;&#xA;&gt; In case the runtime returns an Invalid error it means the transaction&#xD;&#xA;&gt; cannot be added to a block at all. Extracting the actual reason of&#xD;&#xA;&gt; invalidity gives more details about the source. For instance Stale&#xD;&#xA;&gt; transaction just indicates the transaction was already included in a&#xD;&#xA;&gt; block&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/client/transaction-pool/README.md#invalid-transaction&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20441" PostHistoryTypeId="2" PostId="5442" RevisionGUID="0965d713-cdac-4134-97c3-ac8b5eb44755" CreationDate="2022-10-19T18:11:18.853" UserId="2163" Text="In the tests of a pallet, I would like to use the council as the origin.&#xD;&#xA;&#xD;&#xA;I did the following:&#xD;&#xA;1. Imported the collective pallet&#xD;&#xA;2. Implemented `pallet_collective::Config` for `Test`:&#xD;&#xA;```rs&#xD;&#xA;type CouncilCollective = pallet_collective::Instance1;&#xD;&#xA;impl pallet_collective::Config&lt;CouncilCollective&gt; for Test {&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	type Proposal = RuntimeCall;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type MotionDuration = MotionDuration;&#xD;&#xA;	type MaxProposals = MaxProposals;&#xD;&#xA;	type MaxMembers = MaxMembers;&#xD;&#xA;	type DefaultVote = pallet_collective::PrimeDefaultVote;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;3. Set the `GenesisConfig`:&#xD;&#xA;```rs&#xD;&#xA;	pallet_collective::GenesisConfig::&lt;Test, Instance1&gt; {&#xD;&#xA;		members: vec![1, 2, 3],&#xD;&#xA;		phantom: Default::default(),&#xD;&#xA;	}&#xD;&#xA;	.assimilate_storage(&amp;mut t)&#xD;&#xA;	.unwrap();&#xD;&#xA;```&#xD;&#xA;4. Wrote the test like this:&#xD;&#xA;```rs&#xD;&#xA;        // this returns a RuntimeCall that can be called by council&#xD;&#xA;		let proposal = make_proposal() &#xD;&#xA;		let proposal_len: u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;		let proposal_weight = proposal.get_dispatch_info().weight;&#xD;&#xA;		let hash = BlakeTwo256::hash_of(&amp;proposal);&#xD;&#xA;&#xD;&#xA;		assert_ok!(Council::propose(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			3,&#xD;&#xA;			Box::new(proposal.clone()),&#xD;&#xA;			proposal_len&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Council::vote(RuntimeOrigin::signed(1), hash, 0, true));&#xD;&#xA;		assert_ok!(Council::vote(RuntimeOrigin::signed(2), hash, 0, true));&#xD;&#xA;		assert_ok!(Council::vote(RuntimeOrigin::signed(3), hash, 0, true));&#xD;&#xA;&#xD;&#xA;		System::set_block_number(4);&#xD;&#xA;		assert_ok!(Council::close(&#xD;&#xA;			RuntimeOrigin::signed(4),&#xD;&#xA;			hash,&#xD;&#xA;			0,&#xD;&#xA;			proposal_weight,&#xD;&#xA;			proposal_len&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;        // The test fails at this assertion, the result is not Ok	&#xD;&#xA;        System::assert_last_event(RuntimeEvent::Council(pallet_collective::Event::Executed {&#xD;&#xA;			proposal_hash: hash,&#xD;&#xA;			result: Ok(()),&#xD;&#xA;		}));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am not sure what I am doing wrong here." ContentLicense="CC BY-SA 4.0" />
  <row Id="20443" PostHistoryTypeId="1" PostId="5442" RevisionGUID="0965d713-cdac-4134-97c3-ac8b5eb44755" CreationDate="2022-10-19T18:11:18.853" UserId="2163" Text="How to make calls with council origin?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20444" PostHistoryTypeId="3" PostId="5442" RevisionGUID="0965d713-cdac-4134-97c3-ac8b5eb44755" CreationDate="2022-10-19T18:11:18.853" UserId="2163" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20445" PostHistoryTypeId="2" PostId="5443" RevisionGUID="da7cba6e-d6c2-45ec-afc7-1b370cf080cb" CreationDate="2022-10-19T18:46:02.607" UserId="3355" Text="I have a funny problem, hopefully, someone can help. &#xD;&#xA;&#xD;&#xA;I have an environment similar to the [delegator example contract][1]: one delegator-like contract, one accumulator-like contract, and one adder-like contract. I'm running a local test node. I can't deploy my contracts on the [contracts UI interface][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I can't compile the delegator contract because I get &quot;ERROR: No 'ink_lang' dependency found&quot;. So I changed my dependencies on my contracts such that they look like this: https://gist.github.com/RafaelAPB/5b0d36f56dfc3d83c55ca857f38e8d85&#xD;&#xA;&#xD;&#xA;Code compiles for my three contracts. When deploying the adder-like and accumulator-like (in this order). However, when invoking the method from the accumulator contract that calls the adder contract, I obtain:&#xD;&#xA;&#xD;&#xA;    calling &quot;delegator-add&quot;&#xD;&#xA;    panicked at 'encountered error while calling Adder::add: NotCallable', &#xD;&#xA;&#xD;&#xA;Why wouldn't it be callable? Of course, the delegator contract also does not work (and in fact breaks the interface)&#xD;&#xA;I thought that the first problem could be a code problem, but i follow the tutorial very closely and it compiles. So I thought the dependencies might be the problem.&#xD;&#xA;&#xD;&#xA;How can i change the dependency ink = { path = &quot;../../crates/ink&quot;, default-features = false } to a non-local reference, such that I can have it instead of lines 8-13 of the gist I shared?&#xD;&#xA;&#xD;&#xA;Unfortunately, [this similar question does not answer][3] my question because I can't run the original delegator code nor use my version (fails on the mentioned occasion, but can call any function that is not doing a cross-contract call). I'm also not trying to explore the usage of  `ink_env::call::Call::new()`, but rather instantiate a delegator contract with references to deployed contracts so that I can call them directly.&#xD;&#xA;&#xD;&#xA;Bonus points if you can point me to other smart contracts using the delegator design pattern. &#xD;&#xA;&#xD;&#xA;Any help would be greatly appreciated!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/tree/master/examples/delegator&#xD;&#xA;  [2]: https://%20https://contracts-ui.substrate.io/&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/28/how-to-test-cross-contract-ink-contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="20447" PostHistoryTypeId="1" PostId="5443" RevisionGUID="da7cba6e-d6c2-45ec-afc7-1b370cf080cb" CreationDate="2022-10-19T18:46:02.607" UserId="3355" Text="Delegator-based contract causes UI interface to crash" ContentLicense="CC BY-SA 4.0" />
  <row Id="20448" PostHistoryTypeId="3" PostId="5443" RevisionGUID="da7cba6e-d6c2-45ec-afc7-1b370cf080cb" CreationDate="2022-10-19T18:46:02.607" UserId="3355" Text="|ink|rust|ui|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20449" PostHistoryTypeId="2" PostId="5444" RevisionGUID="2a27ebb1-b319-44a8-acfb-dae23897db27" CreationDate="2022-10-19T19:26:56.500" UserId="73" Text="If you want to execute something using the council origin, you can construct it on your own:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Pallet::run_whatever(pallet_collective::RawOrigin::Members(5, 5).into(), args);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20451" PostHistoryTypeId="2" PostId="5445" RevisionGUID="272d400c-44d7-4595-95c6-559f6c08c384" CreationDate="2022-10-19T20:19:20.687" UserId="29" Text="I can see that many parachains have opened HRMP channels on Rococo and are beginning to experiment with XCM:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Source:&#xD;&#xA;- https://dotsama-channels.vercel.app&#xD;&#xA;&#xD;&#xA;I would like to open HRMP channels between parachains on a local Rococo test network. &#xD;&#xA;&#xD;&#xA;How do I do this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/G7mkx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20453" PostHistoryTypeId="1" PostId="5445" RevisionGUID="272d400c-44d7-4595-95c6-559f6c08c384" CreationDate="2022-10-19T20:19:20.687" UserId="29" Text="How to open HRMP channels between parachains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20454" PostHistoryTypeId="3" PostId="5445" RevisionGUID="272d400c-44d7-4595-95c6-559f6c08c384" CreationDate="2022-10-19T20:19:20.687" UserId="29" Text="|xcm|rococo|zombienet|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20455" PostHistoryTypeId="2" PostId="5446" RevisionGUID="180d5d08-7fc3-4b6a-ac5b-1bb7540d2f8e" CreationDate="2022-10-19T20:19:20.687" UserId="29" Text="&gt; Feel free to update/modify this if you see something that can be improved upon&#xD;&#xA;&#xD;&#xA;# Opening HRMP channels between parachains&#xD;&#xA;&#xD;&#xA;&gt; If you are new to XCM, read the following:&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-the-cross-consensus-message-format&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-part-two-versioning-and-compatibility&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-part-three-execution-and-error-management&#xD;&#xA;&gt; - https://github.com/paritytech/xcm-format&#xD;&#xA;&#xD;&#xA;Here is the setup for this tutorial:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/RoUeZ.png)&#xD;&#xA;&#xD;&#xA;You will need the following:&#xD;&#xA;- rococo-local relay chain&#xD;&#xA;- parachain with paraId 1001&#xD;&#xA;- parachain with paraId 1002&#xD;&#xA;&gt; You can read up more on how to set up a test network here:&#xD;&#xA;&gt; - https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet&#xD;&#xA;&#xD;&#xA;Since this tutorial is for example purposes, both parachains should have the sudo pallet configured. In a production chain this would be substituted with governance.&#xD;&#xA;&#xD;&#xA;## What is HRMP (also known as XCMP-Lite)?&#xD;&#xA;&#xD;&#xA;Here is an excerpt from the Polkadot Wiki:&#xD;&#xA;&#xD;&#xA;&gt; While XCMP is still being implemented, a stop-gap&#xD;&#xA;&gt; protocol (see definition below) known as Horizontal Relay-routed&#xD;&#xA;&gt; Message Passing (HRMP) exists in its place. HRMP has the same&#xD;&#xA;&gt; interface and functionality as XCMP but is much more demanding on&#xD;&#xA;&gt; resources since it stores all messages in the Relay Chain storage.&#xD;&#xA;&gt; When XCMP has been implemented, HRMP is planned to be deprecated and&#xD;&#xA;&gt; phased out in favor of it.&#xD;&#xA;&#xD;&#xA;Source:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-xcm#hrmp-xcmp-lite&#xD;&#xA;&#xD;&#xA;**HRMP channels are unidirectional**&#xD;&#xA;&#xD;&#xA;The parachain that wants to open an HRMP channel must make a request to the parachain it wishes to have an open channel with. Once that is done, the other parachain needs to accept this request. This is what we mean by unidirectional flow. For bidirectional communication we need to open another channel in the opposite direction.&#xD;&#xA;&#xD;&#xA;A channel can be opened only after the recipient confirms it and only on a session change.&#xD;&#xA;&#xD;&#xA;So in recap, for this tutorial, the idea is that we want a bidirectional channel between parachain 1001 and parachain 1002 so that they can exchange XCM's.&#xD;&#xA;&#xD;&#xA;## Create an HRMP open channel request&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. First we need to create an [`hrmpInitOpenChannel`](https://github.com/paritytech/polkadot/blob/efcaa57d5f9d72c1c3fa79dcd929da9cced3af74/runtime/parachains/src/hrmp.rs#L451-L462) call. **Do not submit the call**, instead copy the encoded call data for later use:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Yvakr.png)&#xD;&#xA;&#xD;&#xA;- `proposed_max_capacity` - specifies how many messages can be in the channel at once.&#xD;&#xA;- `proposed_max_message_size` - specifies the maximum size of the messages.&#xD;&#xA;&#xD;&#xA;These numbers are a subject to the relay chain's configuration limits.&#xD;&#xA;&#xD;&#xA;You can find this in the relay chain's active configuration:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/fHgdV.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Fund the parachain's sovereign account&#xD;&#xA;&#xD;&#xA;The next step will be to create and submit an XCM on parachain 1001 with our encoded call data from above, but before we can do this we need to make sure parachain 1001's sovereign account on the relay chain is funded so it can take care of any XCM transact fees.&#xD;&#xA;&#xD;&#xA;Let's add parachain 1001's sovereign account to our address book.&#xD;&#xA;&#xD;&#xA;On the relay chain, open the address book and add the following contact:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Svqpy.png)&#xD;&#xA;&#xD;&#xA;&gt; If you're unsure as to how to calculate the parachain's sovereign account checkout this post:&#xD;&#xA;&gt; - https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain&#xD;&#xA;&gt; ![](https://i.stack.imgur.com/yoDMV.png)&#xD;&#xA;&gt; &#xD;&#xA;&gt; Note that if the parachain's `paraId` changes, then sovereign account will also change. Therefore, as a rule-of-thumb, avoid hard coding the parachain's sovereign account.&#xD;&#xA;&#xD;&#xA;We can now transfer some tokens from Alice to the sovereign account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/XHrwT.png)&#xD;&#xA;&#xD;&#xA;And the account is now funded!&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/KP7wQ.png)&#xD;&#xA;&#xD;&#xA;## Create the XCM to initiate the open channel request&#xD;&#xA;&#xD;&#xA;We can now create the XCM on parachain 1001:&#xD;&#xA;&#xD;&#xA;&gt; A few things to note. &#xD;&#xA;&gt; - Below you will see we use `sudo`, in the real-world this would be done via governance.&#xD;&#xA;&gt; - Always check what the XCM configuration is for the relay chain you are working with. The numbers below are for example purposes.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/P9gHr.png)&#xD;&#xA;![](https://i.stack.imgur.com/Jxt40.png)&#xD;&#xA;![](https://i.stack.imgur.com/Vxz1r.png)&#xD;&#xA;![](https://i.stack.imgur.com/B4qqq.png)&#xD;&#xA;![](https://i.stack.imgur.com/4dYO4.png)&#xD;&#xA;![](https://i.stack.imgur.com/9u1gb.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Notice the encoded call that we created in the beginning of this tutorial is now used in the `Transact`.&#xD;&#xA;&#xD;&#xA;In the above call, we are executing a few instructions:&#xD;&#xA;- [`WithdrawAsset`](https://github.com/paritytech/xcm-format#withdrawasset) - Removes the on-chain asset(s) and accrue them into the XCVM Holding Register. More info [here](https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-the-holding-register).&#xD;&#xA;- [`BuyExecution`](https://github.com/paritytech/xcm-format#buyexecution) - Pays for the execution of the current message using the asset(s) that were deposited in the XCVM Holding Register from our previous `WithdrawAsset` instruction. More info [here](https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-fee-payment-in-xcm).&#xD;&#xA;- [`RefundSurplus`](https://github.com/paritytech/xcm-format#refundsurplus) - Increases Refunded Weight Register to the value of Surplus Weight Register. Attempts to accrue fees previously paid via `BuyExecution` into the XCVM Holding Register for the amount that Refunded Weight Register is increased.&#xD;&#xA;- [`DepositAsset`](https://github.com/paritytech/xcm-format#depositasset) - Subtracts the asset(s) from the XCVM Holding Register and deposits on-chain equivalent assets under the ownership of the beneficiary. The operands are:&#xD;&#xA;    - assets: The asset(s) to remove from the Holding Register.&#xD;&#xA;    - max_assets: The maximum number of unique assets/asset instances to remove from the Holding Register. Only the first max_assets assets/instances of those matched by assets will be removed, prioritized under standard asset ordering. Any others will remain in holding.&#xD;&#xA;    - beneficiary: The new owner for the assets.&#xD;&#xA;&#xD;&#xA;Read more on how `RefundSurplus` and `DepositAsset` work here:&#xD;&#xA;- https://polkadot.network/blog/xcm-part-three-execution-and-error-management/#-weight&#xD;&#xA;&#xD;&#xA;The first part of this call is the destination - where we want to send the XCM to be executed. In our case we are saying `parent: 1` - the parent of parachain 1001 is the relay chain and in the context of the `parent` we are specifying an `interior: Here` meaning that we want the relay chain to execute the XCM. This is all done by using `MultiLocation`. If you're not familiar with `MultiLocation` then read up here:&#xD;&#xA;- https://github.com/paritytech/xcm-format#7-universal-consensus-location-identifiers&#xD;&#xA;&#xD;&#xA;Additionally, the actual XCM instructions themselves e.g. `WithdrawAsset`, `BuyExecution`, etc. also use `MultiLocation`. In this case the `MultiLocation` is in respect to the system that will be executing the XCM message:&#xD;&#xA;&#xD;&#xA;&gt; Throughout XCM, messages are authored such that when interpreted from the receiver's point of view they will have the desired meaning/effect. This means that relative paths should always by constructed to be read from the point of view of the receiving system, which may have a completely different meaning in the authoring system.&#xD;&#xA;&#xD;&#xA;More info here:&#xD;&#xA;- https://github.com/paritytech/xcm-format#concrete-identifiers&#xD;&#xA;&#xD;&#xA;As far as the amount that is needed to withdraw to cover execution, this is something that you will need to calculate ahead of time. More info can be found here:&#xD;&#xA;- https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-fee-payment-in-xcm&#xD;&#xA;&#xD;&#xA;And a nice StackExchange write up from a community member on weights and paying for execution here:&#xD;&#xA;- https://substrate.stackexchange.com/a/5430/29&#xD;&#xA;&#xD;&#xA;So in summary, we are going to withdraw some amount from the parachain sovereign account to the XCVM Holding Register. Use the amount in there to &quot;buy&quot; execution time for our XCM `Transact` instruction. Execute the `Transact`. And whatever amount is left over (determined by `RefundSurplus` ) is deposited into an account we specify by using the `DepositAsset` instruction.&#xD;&#xA;&#xD;&#xA;Before submitting this call, let's open the parachain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/egbma.png)&#xD;&#xA;&#xD;&#xA;Also, open the relay chain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/3LFor.png)&#xD;&#xA;&#xD;&#xA;You can now submit the XCM extrinsic and you will see the events.&#xD;&#xA;&#xD;&#xA;First you will see the events in the parachain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Mg7zj.png)&#xD;&#xA;&#xD;&#xA;Then you will see the events in the relay chain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/1HjTD.png)&#xD;&#xA;&#xD;&#xA;Success!&#xD;&#xA;&#xD;&#xA;But let's double check. Check the chain state on the relay chain to see if there is now an HRMP open channel request from parachain 1001 to parachain 1002:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/P0WNR.png)&#xD;&#xA;&#xD;&#xA;You can also check here:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/CNtJm.png)&#xD;&#xA;&#xD;&#xA;And note that some amount has been deducted from the sovereign account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/gXIZ8.png)&#xD;&#xA;&#xD;&#xA;The surplus has gone to Eve's account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Vnx77.png)&#xD;&#xA;&#xD;&#xA;Their balance went from 1,000,000,000,000,000,000 to 1,000,000,885,011,945,986!&#xD;&#xA;&#xD;&#xA;Awesome!&#xD;&#xA;&#xD;&#xA;We have succeeded in creating an HRMP open channel request. The next step is for parachain 1002 to accept the request.&#xD;&#xA;&#xD;&#xA;## Accept the HRMP open channel request&#xD;&#xA;&#xD;&#xA;On the relay chain create the following call:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/0slRE.png)&#xD;&#xA;&#xD;&#xA;Copy the encoded call data for later use in our XCM.&#xD;&#xA;&#xD;&#xA;## Fund the parachain's sovereign account&#xD;&#xA;&#xD;&#xA;Make sure that parachain 1002's sovereign account is funded. &#xD;&#xA;&gt; You will have to repeat the process of adding and funding parachain 1002's sovereign account which was documented above for parachain 1001.&#xD;&#xA;&#xD;&#xA;## Create the XCM to accept the HRMP open channel request&#xD;&#xA;&#xD;&#xA;Now, create the XCM on parachain 1002:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/2BMAJ.png)&#xD;&#xA;![](https://i.stack.imgur.com/JhxsL.png)&#xD;&#xA;![](https://i.stack.imgur.com/4BQSG.png)&#xD;&#xA;![](https://i.stack.imgur.com/tvcbq.png)&#xD;&#xA;![](https://i.stack.imgur.com/qZwa9.png)&#xD;&#xA;&#xD;&#xA;Submit.&#xD;&#xA;&#xD;&#xA;Wait one epoch for the change to take place.&#xD;&#xA;&#xD;&#xA;You now have established a unidirectional HRMP channel between parachain 1001 and parachain 1002!&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/oD2T1.png)&#xD;&#xA;&#xD;&#xA;## Create an HRMP channel from parachain 1002 to parachain 1001&#xD;&#xA;&#xD;&#xA;And finally, we **repeat** the same process documented throughout this article but instead we do it from parachain 1002 to parachain 1001 and in doing so we will have succefully created a **bidirectional** HRMP channel.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20457" PostHistoryTypeId="5" PostId="5446" RevisionGUID="6bb14f11-0bcf-4906-aaeb-bf25e1ce0d4c" CreationDate="2022-10-19T20:27:43.130" UserId="29" Comment="added 135 characters in body" Text="&gt; Feel free to update/modify this if you see something that can be improved upon&#xD;&#xA;&#xD;&#xA;# Opening HRMP channels between parachains&#xD;&#xA;&#xD;&#xA;&gt; If you are new to XCM, read the following:&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-the-cross-consensus-message-format&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-part-two-versioning-and-compatibility&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-part-three-execution-and-error-management&#xD;&#xA;&gt; - https://github.com/paritytech/xcm-format&#xD;&#xA;&#xD;&#xA;Here is the setup for this tutorial:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/RoUeZ.png)&#xD;&#xA;&#xD;&#xA;You will need the following:&#xD;&#xA;- rococo-local relay chain&#xD;&#xA;- parachain with paraId 1001&#xD;&#xA;- parachain with paraId 1002&#xD;&#xA;&gt; You can read up more on how to set up a test network here:&#xD;&#xA;&gt; - https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet&#xD;&#xA;&#xD;&#xA;Since this tutorial is for example purposes, both parachains should have the sudo pallet configured. In a production chain this would be substituted with governance.&#xD;&#xA;&#xD;&#xA;## What is HRMP (also known as XCMP-Lite)?&#xD;&#xA;&#xD;&#xA;Here is an excerpt from the Polkadot Wiki:&#xD;&#xA;&#xD;&#xA;&gt; While XCMP is still being implemented, a stop-gap&#xD;&#xA;&gt; protocol (see definition below) known as Horizontal Relay-routed&#xD;&#xA;&gt; Message Passing (HRMP) exists in its place. HRMP has the same&#xD;&#xA;&gt; interface and functionality as XCMP but is much more demanding on&#xD;&#xA;&gt; resources since it stores all messages in the Relay Chain storage.&#xD;&#xA;&gt; When XCMP has been implemented, HRMP is planned to be deprecated and&#xD;&#xA;&gt; phased out in favor of it.&#xD;&#xA;&#xD;&#xA;Source:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-xcm#hrmp-xcmp-lite&#xD;&#xA;&#xD;&#xA;**HRMP channels are unidirectional**&#xD;&#xA;&#xD;&#xA;The parachain that wants to open an HRMP channel must make a request to the parachain it wishes to have an open channel with. Once that is done, the other parachain needs to accept this request. This is what we mean by unidirectional flow. For bidirectional communication we need to open another channel in the opposite direction.&#xD;&#xA;&#xD;&#xA;A channel can be opened only after the recipient confirms it and only on a session change.&#xD;&#xA;&#xD;&#xA;So in recap, for this tutorial, the idea is that we want a bidirectional channel between parachain 1001 and parachain 1002 so that they can exchange XCM's.&#xD;&#xA;&#xD;&#xA;## Create an HRMP open channel request&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. First we need to create an [`hrmpInitOpenChannel`](https://github.com/paritytech/polkadot/blob/efcaa57d5f9d72c1c3fa79dcd929da9cced3af74/runtime/parachains/src/hrmp.rs#L451-L462) call. **Do not submit the call**, instead copy the encoded call data for later use:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Yvakr.png)&#xD;&#xA;&#xD;&#xA;- `proposed_max_capacity` - specifies how many messages can be in the channel at once.&#xD;&#xA;- `proposed_max_message_size` - specifies the maximum size of the messages.&#xD;&#xA;&#xD;&#xA;These numbers are a subject to the relay chain's configuration limits.&#xD;&#xA;&#xD;&#xA;You can find this in the relay chain's active configuration:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/fHgdV.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Fund the parachain's sovereign account&#xD;&#xA;&#xD;&#xA;The next step will be to create and submit an XCM on parachain 1001 with our encoded call data from above, but before we can do this we need to make sure parachain 1001's sovereign account on the relay chain is funded so it can take care of any XCM transact fees.&#xD;&#xA;&#xD;&#xA;Let's add parachain 1001's sovereign account to our address book.&#xD;&#xA;&#xD;&#xA;On the relay chain, open the address book and add the following contact:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Svqpy.png)&#xD;&#xA;&#xD;&#xA;&gt; If you're unsure as to how to calculate the parachain's sovereign account checkout this post:&#xD;&#xA;&gt; - https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain&#xD;&#xA;&gt; ![](https://i.stack.imgur.com/yoDMV.png)&#xD;&#xA;&gt; &#xD;&#xA;&gt; Note that if the parachain's `paraId` changes, then sovereign account will also change. Therefore, as a rule-of-thumb, avoid hard coding the parachain's sovereign account.&#xD;&#xA;&#xD;&#xA;We can now transfer some tokens from Alice to the sovereign account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/XHrwT.png)&#xD;&#xA;&#xD;&#xA;And the account is now funded!&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/KP7wQ.png)&#xD;&#xA;&#xD;&#xA;## Create the XCM to initiate the open channel request&#xD;&#xA;&#xD;&#xA;We can now create the XCM on parachain 1001:&#xD;&#xA;&#xD;&#xA;&gt; A few things to note. &#xD;&#xA;&gt; - Below you will see we use `sudo`, in the real-world this would be done via governance.&#xD;&#xA;&gt; - Always check what the XCM configuration is for the relay chain you are working with. The numbers below are for example purposes.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/P9gHr.png)&#xD;&#xA;![](https://i.stack.imgur.com/Jxt40.png)&#xD;&#xA;![](https://i.stack.imgur.com/Vxz1r.png)&#xD;&#xA;![](https://i.stack.imgur.com/B4qqq.png)&#xD;&#xA;![](https://i.stack.imgur.com/4dYO4.png)&#xD;&#xA;![](https://i.stack.imgur.com/9u1gb.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Notice the encoded call that we created in the beginning of this tutorial is now used in the `Transact`.&#xD;&#xA;&#xD;&#xA;In the above call, we are executing a few instructions:&#xD;&#xA;- [`WithdrawAsset`](https://github.com/paritytech/xcm-format#withdrawasset) - Removes the on-chain asset(s) and accrue them into the XCVM Holding Register. More info [here](https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-the-holding-register).&#xD;&#xA;- [`BuyExecution`](https://github.com/paritytech/xcm-format#buyexecution) - Pays for the execution of the current message using the asset(s) that were deposited in the XCVM Holding Register from our previous `WithdrawAsset` instruction. More info [here](https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-fee-payment-in-xcm).&#xD;&#xA;- [`RefundSurplus`](https://github.com/paritytech/xcm-format#refundsurplus) - Increases Refunded Weight Register to the value of Surplus Weight Register. Attempts to accrue fees previously paid via `BuyExecution` into the XCVM Holding Register for the amount that Refunded Weight Register is increased.&#xD;&#xA;- [`DepositAsset`](https://github.com/paritytech/xcm-format#depositasset) - Subtracts the asset(s) from the XCVM Holding Register and deposits on-chain equivalent assets under the ownership of the beneficiary. The operands are:&#xD;&#xA;    - assets: The asset(s) to remove from the Holding Register.&#xD;&#xA;    - max_assets: The maximum number of unique assets/asset instances to remove from the Holding Register. Only the first max_assets assets/instances of those matched by assets will be removed, prioritized under standard asset ordering. Any others will remain in holding.&#xD;&#xA;    - beneficiary: The new owner for the assets.&#xD;&#xA;&#xD;&#xA;Notice that with `DepositAsset` we are specifying an account where the surplus will go. In this example we have used Eve's account.&#xD;&#xA;&#xD;&#xA;Read more on how `RefundSurplus` and `DepositAsset` work here:&#xD;&#xA;- https://polkadot.network/blog/xcm-part-three-execution-and-error-management/#-weight&#xD;&#xA;&#xD;&#xA;The first part of this call is the destination - where we want to send the XCM to be executed. In our case we are saying `parent: 1` - the parent of parachain 1001 is the relay chain and in the context of the `parent` we are specifying an `interior: Here` meaning that we want the relay chain to execute the XCM. This is all done by using `MultiLocation`. If you're not familiar with `MultiLocation` then read up here:&#xD;&#xA;- https://github.com/paritytech/xcm-format#7-universal-consensus-location-identifiers&#xD;&#xA;&#xD;&#xA;Additionally, the actual XCM instructions themselves e.g. `WithdrawAsset`, `BuyExecution`, etc. also use `MultiLocation`. In this case the `MultiLocation` is in respect to the system that will be executing the XCM message:&#xD;&#xA;&#xD;&#xA;&gt; Throughout XCM, messages are authored such that when interpreted from the receiver's point of view they will have the desired meaning/effect. This means that relative paths should always by constructed to be read from the point of view of the receiving system, which may have a completely different meaning in the authoring system.&#xD;&#xA;&#xD;&#xA;More info here:&#xD;&#xA;- https://github.com/paritytech/xcm-format#concrete-identifiers&#xD;&#xA;&#xD;&#xA;As far as the amount that is needed to withdraw to cover execution, this is something that you will need to calculate ahead of time. More info can be found here:&#xD;&#xA;- https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-fee-payment-in-xcm&#xD;&#xA;&#xD;&#xA;And a nice StackExchange write up from a community member on weights and paying for execution here:&#xD;&#xA;- https://substrate.stackexchange.com/a/5430/29&#xD;&#xA;&#xD;&#xA;So in summary, we are going to withdraw some amount from the parachain sovereign account to the XCVM Holding Register. Use the amount in there to &quot;buy&quot; execution time for our XCM `Transact` instruction. Execute the `Transact`. And whatever amount is left over (determined by `RefundSurplus` ) is deposited into an account we specify by using the `DepositAsset` instruction.&#xD;&#xA;&#xD;&#xA;Before submitting this call, let's open the parachain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/egbma.png)&#xD;&#xA;&#xD;&#xA;Also, open the relay chain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/3LFor.png)&#xD;&#xA;&#xD;&#xA;You can now submit the XCM extrinsic and you will see the events.&#xD;&#xA;&#xD;&#xA;First you will see the events in the parachain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Mg7zj.png)&#xD;&#xA;&#xD;&#xA;Then you will see the events in the relay chain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/1HjTD.png)&#xD;&#xA;&#xD;&#xA;Success!&#xD;&#xA;&#xD;&#xA;But let's double check. Check the chain state on the relay chain to see if there is now an HRMP open channel request from parachain 1001 to parachain 1002:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/P0WNR.png)&#xD;&#xA;&#xD;&#xA;You can also check here:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/CNtJm.png)&#xD;&#xA;&#xD;&#xA;And note that some amount has been deducted from the sovereign account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/gXIZ8.png)&#xD;&#xA;&#xD;&#xA;The surplus has gone to Eve's account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Vnx77.png)&#xD;&#xA;&#xD;&#xA;Their balance went from 1,000,000,000,000,000,000 to 1,000,000,885,011,945,986!&#xD;&#xA;&#xD;&#xA;Awesome!&#xD;&#xA;&#xD;&#xA;We have succeeded in creating an HRMP open channel request. The next step is for parachain 1002 to accept the request.&#xD;&#xA;&#xD;&#xA;## Accept the HRMP open channel request&#xD;&#xA;&#xD;&#xA;On the relay chain create the following call:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/0slRE.png)&#xD;&#xA;&#xD;&#xA;Copy the encoded call data for later use in our XCM.&#xD;&#xA;&#xD;&#xA;## Fund the parachain's sovereign account&#xD;&#xA;&#xD;&#xA;Make sure that parachain 1002's sovereign account is funded. &#xD;&#xA;&gt; You will have to repeat the process of adding and funding parachain 1002's sovereign account which was documented above for parachain 1001.&#xD;&#xA;&#xD;&#xA;## Create the XCM to accept the HRMP open channel request&#xD;&#xA;&#xD;&#xA;Now, create the XCM on parachain 1002:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/2BMAJ.png)&#xD;&#xA;![](https://i.stack.imgur.com/JhxsL.png)&#xD;&#xA;![](https://i.stack.imgur.com/4BQSG.png)&#xD;&#xA;![](https://i.stack.imgur.com/tvcbq.png)&#xD;&#xA;![](https://i.stack.imgur.com/qZwa9.png)&#xD;&#xA;&#xD;&#xA;Submit.&#xD;&#xA;&#xD;&#xA;Wait one epoch for the change to take place.&#xD;&#xA;&#xD;&#xA;You now have established a unidirectional HRMP channel between parachain 1001 and parachain 1002!&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/oD2T1.png)&#xD;&#xA;&#xD;&#xA;## Create an HRMP channel from parachain 1002 to parachain 1001&#xD;&#xA;&#xD;&#xA;And finally, we **repeat** the same process documented throughout this article but instead we do it from parachain 1002 to parachain 1001 and in doing so we will have succefully created a **bidirectional** HRMP channel.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20458" PostHistoryTypeId="5" PostId="5014" RevisionGUID="bc4f67f8-f1f0-433f-9127-2516ad4a1f10" CreationDate="2022-10-19T20:48:48.790" UserId="298" Comment="added 116 characters in body" Text="It seems we have found one of the problems could be. There is a problem for Mac M1/M2 chips related to port forwarding with Docker. &#xD;&#xA;&#xD;&#xA;https://forums.docker.com/t/port-forward-not-working-on-a-macos-installation-but-works-on-others/77401/6&#xD;&#xA;&#xD;&#xA;To guarantee it works, you need to run it over wss:// secure websocket connection, using reverse nginx proxy." ContentLicense="CC BY-SA 4.0" />
  <row Id="20459" PostHistoryTypeId="2" PostId="5447" RevisionGUID="8c2b1ba3-c961-47ae-a4ed-15916fe6a6ed" CreationDate="2022-10-19T21:18:03.087" UserId="341" Text="In the code of the Nicks pallet, there is [some logic][1] to make sure the name passed as parameter is long enough.&#xD;&#xA;&#xD;&#xA;    ensure!(bounded_name.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;&#xD;&#xA;Now when I call the extrinsic with a name too short, the condition is false, yet the extrinsic is included into a block. Polkadot-js/apps as well as the substrate-UI-template don't show any error (beside one event for the latter). Shouldn't it fail with `TooShort`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs#L144" ContentLicense="CC BY-SA 4.0" />
  <row Id="20461" PostHistoryTypeId="1" PostId="5447" RevisionGUID="8c2b1ba3-c961-47ae-a4ed-15916fe6a6ed" CreationDate="2022-10-19T21:18:03.087" UserId="341" Text="The ensure! macro with a false condition doesn't make an extrinsic fail, why?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20462" PostHistoryTypeId="3" PostId="5447" RevisionGUID="8c2b1ba3-c961-47ae-a4ed-15916fe6a6ed" CreationDate="2022-10-19T21:18:03.087" UserId="341" Text="|pallet|runtime|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20463" PostHistoryTypeId="50" PostId="4906" RevisionGUID="40439c91-0e01-452b-a09a-4e0fdbb1969c" CreationDate="2022-10-19T22:01:20.140" UserId="-1" />
  <row Id="20464" PostHistoryTypeId="2" PostId="5448" RevisionGUID="e4b1bce7-e552-4673-8d27-445443ca4098" CreationDate="2022-10-19T22:11:54.080" UserId="29" Text="I am compiling the [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template) tag version [v0.9.30](https://github.com/substrate-developer-hub/substrate-node-template/tree/polkadot-v0.9.30) on my Apple M1 and I get the following error:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;   Compiling multiaddr v0.14.0&#xD;&#xA;   Compiling cid v0.8.6&#xD;&#xA;   Compiling scale-info v2.2.0&#xD;&#xA;   Compiling impl-codec v0.6.0&#xD;&#xA;   Compiling sp-storage v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.30#a3ed0119)&#xD;&#xA;   Compiling sp-tracing v5.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.30#a3ed0119)&#xD;&#xA;   Compiling fork-tree v3.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.30#a3ed0119)&#xD;&#xA;   Compiling sp-version-proc-macro v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.30#a3ed0119)&#xD;&#xA;   Compiling k256 v0.10.4&#xD;&#xA;   Compiling sp-panic-handler v4.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.30#a3ed0119)&#xD;&#xA;error: failed to run custom build command for `sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.30#a3ed0119)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/bruno/src/substrate-node-template/target/release/build/sc-network-bitswap-b81f77b4f38731d7/build-script-build` (exit status: 101)&#xD;&#xA;  --- stderr&#xD;&#xA;  thread 'main' panicked at '&#xD;&#xA;  Could not find `protoc` installation and this build crate cannot proceed without&#xD;&#xA;  this knowledge. If `protoc` is installed and this crate had trouble finding&#xD;&#xA;  it, you can set the `PROTOC` environment variable with the specific path to your&#xD;&#xA;  installed `protoc` binary.&#xD;&#xA;&#xD;&#xA;  For more information: https://docs.rs/prost-build/#sourcing-protoc&#xD;&#xA;  ', /Users/bruno/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.11.1/src/lib.rs:1227:10&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is my rust toolchain:&#xD;&#xA;```&#xD;&#xA;$ rustup show&#xD;&#xA;Default host: x86_64-apple-darwin&#xD;&#xA;rustup home:  /Users/bruno/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;stable-x86_64-apple-darwin&#xD;&#xA;nightly-2022-02-10-x86_64-apple-darwin&#xD;&#xA;nightly-2022-02-19-x86_64-apple-darwin&#xD;&#xA;nightly-2022-02-20-x86_64-apple-darwin&#xD;&#xA;nightly-2022-03-14-x86_64-apple-darwin&#xD;&#xA;nightly-2022-04-01-x86_64-apple-darwin&#xD;&#xA;nightly-x86_64-apple-darwin&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.63.0 (4b91a6ea7 2022-08-08)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20466" PostHistoryTypeId="1" PostId="5448" RevisionGUID="e4b1bce7-e552-4673-8d27-445443ca4098" CreationDate="2022-10-19T22:11:54.080" UserId="29" Text="Could not find `protoc` installation when compiling substrate-node-template v0.9.30" ContentLicense="CC BY-SA 4.0" />
  <row Id="20467" PostHistoryTypeId="3" PostId="5448" RevisionGUID="e4b1bce7-e552-4673-8d27-445443ca4098" CreationDate="2022-10-19T22:11:54.080" UserId="29" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20468" PostHistoryTypeId="2" PostId="5449" RevisionGUID="751c3b71-c766-4843-8b48-93fc82513b33" CreationDate="2022-10-19T22:13:04.727" UserId="29" Text="```sh&#xD;&#xA;arch -x86_64 brew install protobuf&#xD;&#xA;```&#xD;&#xA;Seemed to have done the job." ContentLicense="CC BY-SA 4.0" />
  <row Id="20470" PostHistoryTypeId="2" PostId="5450" RevisionGUID="91c05c19-f873-438b-9ca5-82a1985d251f" CreationDate="2022-10-19T22:15:46.953" UserId="2065" Text="We decided to solve this issue by calculating the **mekrle proof** when claiming the reward, using claiming information (**AccountId** and **Balance /  list of NftIds**) together with passing a **sorted list of all relevant leaf and inner nodes hashes** as extrinsic parameters." ContentLicense="CC BY-SA 4.0" />
  <row Id="20473" PostHistoryTypeId="5" PostId="5441" RevisionGUID="b4f5d595-b90f-4ec6-ac12-dfa259955abe" CreationDate="2022-10-19T23:15:54.053" UserId="29" Comment="added 249 characters in body" Text="This has to do with [Transaction Validity](https://docs.substrate.io/fundamentals/transaction-lifecycle/#validating-and-queuing-transactions). &#xD;&#xA;&#xD;&#xA;Here is the error in Substrate:&#xD;&#xA;```rust&#xD;&#xA;InvalidTransaction::Stale =&gt; &quot;Transaction is outdated&quot;,&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/25388397aab20a24e2be55103dda95011aa04d7c/primitives/runtime/src/transaction_validity.rs#L98&#xD;&#xA;&#xD;&#xA;If you look up the enum variant `InvalidTransaction::Stale` you will find the following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// General error to do with the transaction being outdated (e.g. nonce too low).&#xD;&#xA;	Stale,&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/07e1b6d72747f3cde49e85e4ff68ff158daebe16/primitives/runtime/src/transaction_validity.rs#L47-L48&#xD;&#xA;&#xD;&#xA;It could be that your nonce is too low (old).&#xD;&#xA;&#xD;&#xA;&gt; In case the runtime returns an Invalid error it means the transaction&#xD;&#xA;&gt; cannot be added to a block at all. Extracting the actual reason of&#xD;&#xA;&gt; invalidity gives more details about the source. For instance Stale&#xD;&#xA;&gt; transaction just indicates the transaction was already included in a&#xD;&#xA;&gt; block&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/client/transaction-pool/README.md#invalid-transaction&#xD;&#xA;&#xD;&#xA;As noted in the [Polkadot wiki](https://wiki.polkadot.network/docs/maintain-errors#common-errors), try increasing the nonce to +1 of the current nonce. You can check the current nonce by inspecting the address you're using to send the transaction." ContentLicense="CC BY-SA 4.0" />
  <row Id="20474" PostHistoryTypeId="2" PostId="5451" RevisionGUID="38ad33ed-70df-44ee-a1ad-db2c6b9b186f" CreationDate="2022-10-19T23:25:47.160" UserId="2060" Text="We need to perform a `clear_prefix` on a StorageDoubleMap every N blocks in `on_initialize()`, and we want to make sure the WeightInfo call properly accounts for read/writes. Should we simply pass `unique` in the `MultiRemovalResults` returned, or something else?  Benchmarks generated a function with only one parameter. The `on_initialize` function touches storage only via `clear_prefix`. Genericized code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let multi_removal_result = &lt;DoubleMapRegistry&lt;T&gt;&gt;::clear_prefix(&#xD;&#xA;			key1,&#xD;&#xA;			T::ConfigMaxItemsToRemove::get(),&#xD;&#xA;			None,&#xD;&#xA;		);&#xD;&#xA;		T::WeightInfo::on_initialize(multi_removal_result.unique)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20476" PostHistoryTypeId="1" PostId="5451" RevisionGUID="38ad33ed-70df-44ee-a1ad-db2c6b9b186f" CreationDate="2022-10-19T23:25:47.160" UserId="2060" Text="How does one figure what the total db reads &amp; writes are for a clear_prefix call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20477" PostHistoryTypeId="3" PostId="5451" RevisionGUID="38ad33ed-70df-44ee-a1ad-db2c6b9b186f" CreationDate="2022-10-19T23:25:47.160" UserId="2060" Text="|storage|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20478" PostHistoryTypeId="2" PostId="5452" RevisionGUID="822ccdf0-fa18-4caf-b93b-534734f2398e" CreationDate="2022-10-19T23:37:06.130" UserId="29" Text="Exactly what Adam said.&#xD;&#xA;&#xD;&#xA;According to the docs:&#xD;&#xA;- https://polkadot.js.org/docs/ui-keyring/start/addresses#removing-an-address&#xD;&#xA;&#xD;&#xA;`forgetAddress` mirrors `forgetAccount` and if we look in the code we will see the minor difference in the two:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  public forgetAddress (address: string): void {&#xD;&#xA;    this.addresses.remove(this._store, address);&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;- https://github.com/polkadot-js/ui/blob/b06e35bd032caf5e727f4cc36da29a71a53d3702/packages/ui-keyring/src/Keyring.ts#L128-L130&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  public forgetAccount (address: string): void {&#xD;&#xA;    this.keyring.removePair(address);&#xD;&#xA;    this.accounts.remove(this._store, address);&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;- https://github.com/polkadot-js/ui/blob/b06e35bd032caf5e727f4cc36da29a71a53d3702/packages/ui-keyring/src/Keyring.ts#L123-L126&#xD;&#xA;&#xD;&#xA;The reason you are still seeing the account when you call `getAccounts` is because `forgetAddress()` does not call `this.accounts.remove(this._store, address)` where as `forgetAccount()` does." ContentLicense="CC BY-SA 4.0" />
  <row Id="20480" PostHistoryTypeId="10" PostId="5448" RevisionGUID="f980c9bb-f55c-4727-9ad8-0021f266aa80" CreationDate="2022-10-20T01:13:06.000" UserId="29" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[4891],&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="20481" PostHistoryTypeId="2" PostId="5453" RevisionGUID="3f7f22bc-cab7-467f-9e36-e09406806c58" CreationDate="2022-10-20T02:07:27.497" UserId="3252" Text="I send two undound transactions,but the explore is showing that is a unbounding transaction ?https://westend.subscan.io/account/5Crhv9SAQsvtnMDNQZekEk9oQEcSjWepdguCA3NP9VKddkr4?tab=unbonding" ContentLicense="CC BY-SA 4.0" />
  <row Id="20483" PostHistoryTypeId="1" PostId="5453" RevisionGUID="3f7f22bc-cab7-467f-9e36-e09406806c58" CreationDate="2022-10-20T02:07:27.497" UserId="3252" Text="Why two undound transactions is becoming a unbounding transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20484" PostHistoryTypeId="3" PostId="5453" RevisionGUID="3f7f22bc-cab7-467f-9e36-e09406806c58" CreationDate="2022-10-20T02:07:27.497" UserId="3252" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20485" PostHistoryTypeId="5" PostId="5453" RevisionGUID="8d1d15f0-42e8-45c6-81a0-10e899c60b16" CreationDate="2022-10-20T02:51:35.923" UserId="251" Comment="added 3 characters in body; edited title" Text="I send two unbond transactions, but the explore is showing that is an unbonding transaction?&#xD;&#xA;&#xD;&#xA;https://westend.subscan.io/account/5Crhv9SAQsvtnMDNQZekEk9oQEcSjWepdguCA3NP9VKddkr4?tab=unbonding" ContentLicense="CC BY-SA 4.0" />
  <row Id="20486" PostHistoryTypeId="4" PostId="5453" RevisionGUID="8d1d15f0-42e8-45c6-81a0-10e899c60b16" CreationDate="2022-10-20T02:51:35.923" UserId="251" Comment="added 3 characters in body; edited title" Text="Why two unbond transactions is becoming an unbonding transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20487" PostHistoryTypeId="2" PostId="5454" RevisionGUID="f97f8d2e-b98d-48a3-a553-97ccc6ef0868" CreationDate="2022-10-20T02:58:03.937" UserId="251" Text="That's the design.&#xD;&#xA;&#xD;&#xA;If you want to participate in staking, you need to stake. And you can not unstake immediately. &#xD;&#xA;&#xD;&#xA;For Kusama, you need to wait 7 days. Polkadot 28 days.&#xD;&#xA;&#xD;&#xA;Why? I could just say, due to the economic model.&#xD;&#xA;&#xD;&#xA;E.g there is price volatility, you can not unstake and sell the tokens immediately." ContentLicense="CC BY-SA 4.0" />
  <row Id="20489" PostHistoryTypeId="5" PostId="5447" RevisionGUID="ae2ee43e-8761-47ea-aa37-6228848077f4" CreationDate="2022-10-20T02:59:31.523" UserId="251" Comment="added 8 characters in body" Text="In the code of the Nicks pallet, there is [some logic][1] to make sure the name passed as parameter is long enough.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;ensure!(bounded_name.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I call the extrinsic with a name too short, the condition is false, yet the extrinsic is included into a block. Polkadot-js/apps as well as the substrate-UI-template don't show any error (beside one event for the latter). Shouldn't it fail with `TooShort`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs#L144" ContentLicense="CC BY-SA 4.0" />
  <row Id="20498" PostHistoryTypeId="5" PostId="5451" RevisionGUID="c2f46014-39f2-4180-a0f1-807f1554f8a7" CreationDate="2022-10-20T03:10:00.053" UserId="251" Comment="deleted 8 characters in body" Text="We need to perform a `clear_prefix` on a StorageDoubleMap every N blocks in `on_initialize()`, and we want to make sure the WeightInfo call properly accounts for read/writes. Should we simply pass `unique` in the `MultiRemovalResults` returned, or something else?  Benchmarks generated a function with only one parameter. The `on_initialize` function touches storage only via `clear_prefix`. Genericized code:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let multi_removal_result = &lt;DoubleMapRegistry&lt;T&gt;&gt;::clear_prefix(&#xD;&#xA;	key1,&#xD;&#xA;	T::ConfigMaxItemsToRemove::get(),&#xD;&#xA;	None,&#xD;&#xA;);&#xD;&#xA;T::WeightInfo::on_initialize(multi_removal_result.unique)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20499" PostHistoryTypeId="52" PostId="5445" RevisionGUID="5e4dbc51-af7a-4691-a3c0-396d682b453d" CreationDate="2022-10-20T04:24:46.630" />
  <row Id="20500" PostHistoryTypeId="2" PostId="5455" RevisionGUID="9022201b-8efd-4c0f-b1ad-9b646661a5bc" CreationDate="2022-10-20T06:28:40.820" UserId="2862" Text="Since the Wasm runtime is stored on-chain under consensus rules, if a bug is discovered, what is the procedure to switch to a different Wasm runtime? What if the bug affects the block production? Does it require to use the native runtime?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="20502" PostHistoryTypeId="1" PostId="5455" RevisionGUID="9022201b-8efd-4c0f-b1ad-9b646661a5bc" CreationDate="2022-10-20T06:28:40.820" UserId="2862" Text="Switch between different Wasm runtimes in case of a bugs" ContentLicense="CC BY-SA 4.0" />
  <row Id="20503" PostHistoryTypeId="3" PostId="5455" RevisionGUID="9022201b-8efd-4c0f-b1ad-9b646661a5bc" CreationDate="2022-10-20T06:28:40.820" UserId="2862" Text="|runtime|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20504" PostHistoryTypeId="2" PostId="5456" RevisionGUID="75bb6808-4894-4e99-a4a5-60e8a62702ca" CreationDate="2022-10-20T06:46:14.260" UserId="251" Text="### Fork-less&#xD;&#xA;If the chain could produce blocks.&#xD;&#xA;&#xD;&#xA;Set a new WASM through the runtime upgrade.&#xD;&#xA;&#xD;&#xA;### Hard fork&#xD;&#xA;If the chain could produce blocks in native.&#xD;&#xA;&#xD;&#xA;Use `--native`, and contact other validators to switch to `--native` (otherwise, your finalization will stall, then the chain bricked). Make a runtime upgrade and let all validators switch back to WASM mode. After this, I think you might need to mark some blocks as bad/fork blocks. Otherwise the new node can not finish the sync.&#xD;&#xA;&#xD;&#xA;*I'm not sure about this, I haven't tried this before.*&#xD;&#xA;&#xD;&#xA;### Hard spoon&#xD;&#xA;If you have tried all the ways and the chain could not produce blocks.&#xD;&#xA;&#xD;&#xA;Export the chain state and start a new chain base on those exported data." ContentLicense="CC BY-SA 4.0" />
  <row Id="20506" PostHistoryTypeId="2" PostId="5457" RevisionGUID="46c41d5b-01c3-470d-9b17-e9dc4f70784f" CreationDate="2022-10-20T07:16:20.070" UserId="3252" Text="What is the numSlashingSpans meaning at &quot;staking-withdrawUnbonded&quot; ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20508" PostHistoryTypeId="1" PostId="5457" RevisionGUID="46c41d5b-01c3-470d-9b17-e9dc4f70784f" CreationDate="2022-10-20T07:16:20.070" UserId="3252" Text="What is the numSlashingSpans meaning at &quot;staking-withdrawUnbonded&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20509" PostHistoryTypeId="3" PostId="5457" RevisionGUID="46c41d5b-01c3-470d-9b17-e9dc4f70784f" CreationDate="2022-10-20T07:16:20.070" UserId="3252" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20510" PostHistoryTypeId="2" PostId="5458" RevisionGUID="74e01eb7-cd52-4e5b-81a1-2f11cd8516b3" CreationDate="2022-10-20T07:23:38.447" UserId="251" Text="We need to benchmark the weight this extrinsic will cost.&#xD;&#xA;&#xD;&#xA;And it doesn't know how many `SlashingSpans` exist before the execution.&#xD;&#xA;&#xD;&#xA;So, you give a num to calculate the weight." ContentLicense="CC BY-SA 4.0" />
  <row Id="20512" PostHistoryTypeId="5" PostId="5457" RevisionGUID="b7394508-940b-486f-b508-5bf9afce2f96" CreationDate="2022-10-20T07:24:05.267" UserId="251" Comment="added 2 characters in body; edited title" Text="What is the `numSlashingSpans` meaning at `staking::withdrawUnbonded`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20513" PostHistoryTypeId="4" PostId="5457" RevisionGUID="b7394508-940b-486f-b508-5bf9afce2f96" CreationDate="2022-10-20T07:24:05.267" UserId="251" Comment="added 2 characters in body; edited title" Text="What is the `numSlashingSpans` meaning at `staking::withdrawUnbonded`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20514" PostHistoryTypeId="5" PostId="5242" RevisionGUID="329c7c87-361d-4d3d-9002-e6b6ae423045" CreationDate="2022-10-20T07:47:29.137" UserId="251" Comment="deleted 2 characters in body" Text="Outdated&#xD;&#xA;~~Check your `Cargo.toml`. I think you missed the `frame-support` dependency.~~&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After you updated the detail.&#xD;&#xA;&#xD;&#xA;The main error is:&#xD;&#xA;```rs&#xD;&#xA;error: Invalid usage of RuntimeEvent, `Config` contains no associated type `RuntimeEvent`, but enum `Event` is declared (in use of `#[pallet::event]`). An RuntimeEvent associated type must be declare on trait `Config`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, follow the message to add the `RuntimeEvent` field back to your `Config` trait.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;type RuntimeEvent: From&lt;Event&lt;Self, I&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After taking a look at your source code.&#xD;&#xA;&#xD;&#xA;I believe you have updated your Substrate version.&#xD;&#xA;&#xD;&#xA;There is a breaking change.&#xD;&#xA;&#xD;&#xA;`Config::Event` was renamed to `Config::RuntimeEvent`.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/11981.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0432]: unresolved import `pallet`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This error is because the macro will generate a mod `pallet`. But another error occurred while expending/executing the macro, so the mod `pallet` can not be generated. Thus, it reports can not find the `pallet`" ContentLicense="CC BY-SA 4.0" />
  <row Id="20515" PostHistoryTypeId="5" PostId="5241" RevisionGUID="9db33e8f-b7a7-45c5-84e7-bd42d90fe79e" CreationDate="2022-10-20T07:49:06.413" UserId="251" Comment="edited body" Text="I am a beginner learning the substrate framework, So am actually following the documentation on the substrate website where it references the use of macros in a custom pallet, after implementing all the code, am facing some import errors, due to the lines posted below.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub use pallet::*;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;    use frame_support::pallet_prelude::*;&#xD;&#xA;    use frame_system::pallet_prelude::*;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Below is the complete error trace&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    Compiling pallet-template v4.0.0-dev (/Users/mac/Desktop/pallet-identity/pallets/template)&#xD;&#xA;  error: Invalid usage of RuntimeEvent, `Config` contains no associated type `RuntimeEvent`, but enum `Event` is declared (in use of `#[pallet::event]`). An RuntimeEvent associated type must be declare on trait `Config`.&#xD;&#xA;    --&gt; /Users/mac/Desktop/pallet-identity/pallets/template/src/lib.rs:11:1&#xD;&#xA;     |&#xD;&#xA;  11 | #[frame_support::pallet]&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0432]: unresolved import `pallet`&#xD;&#xA;   --&gt; /Users/mac/Desktop/pallet-identity/pallets/template/src/lib.rs:7:9&#xD;&#xA;    |&#xD;&#xA;  7 | pub use pallet::*;&#xD;&#xA;    |         ^^^^^^ help: a similar path exists: `frame_system::pallet`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0432`.&#xD;&#xA;  error: could not compile `pallet-template` due to 2 previous errors&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20516" PostHistoryTypeId="5" PostId="5355" RevisionGUID="8138d9b9-9722-43d0-8ac5-d6d2d5d53040" CreationDate="2022-10-20T07:50:11.597" UserId="251" Comment="added 10 characters in body" Text="When i submit a WND  staking chill and staking unbond transaction,the console appears the err, How to deal with the RpcError: 1010?&#xD;&#xA;```log&#xD;&#xA;2022-10-14 23:16:49 error: RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1010: Invalid Transaction: Transaction is outdated&#xD;&#xA;2022-10-14 23:16:49 error: txsubmit RpcError: 1010: Invalid Transaction: Transaction is outdated&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20517" PostHistoryTypeId="2" PostId="5459" RevisionGUID="ce2c4438-adb2-44c7-8963-d0bf93e67c2c" CreationDate="2022-10-20T08:27:55.177" UserId="3252" Text="Wether or not i can understand these:&#xD;&#xA;&#xD;&#xA;If i not a nomidator and unbound a little money not the all money ,the 'numSlashingSpans' should be 0 it will be send successful;&#xD;&#xA;&#xD;&#xA;If i not a nomidator and unbound the all money ,the 'numSlashingSpans' should be 0 ,it will be send successful;&#xD;&#xA;&#xD;&#xA;If i am a nomidator and unbound a little money not the all money ,the 'numSlashingSpans' should be calculted ,it will be send successfu;&#xD;&#xA;&#xD;&#xA;If i am a nomidator and unbound  the all money ,what is the 'numSlashingSpans' should be calculted it will be send successful;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20530" PostHistoryTypeId="2" PostId="5463" RevisionGUID="1dea3b2f-8a5f-4df1-be6f-c1c0e5b52b24" CreationDate="2022-10-20T09:08:16.283" UserId="2762" Text="You have to change the code of your function to return a struct instead of a  u32 value.&#xD;&#xA;&#xD;&#xA;With the response you are looking for, the struct would be:&#xD;&#xA;&#xD;&#xA;    pub struct CustomResponse {&#xD;&#xA;	  code: u32,&#xD;&#xA;	  sum: u32,&#xD;&#xA;    }&#xD;&#xA;In order to Serialize/Deserialize this struct for the RpcResponse you will have to add a library to do that.&#xD;&#xA;&#xD;&#xA;Import it in your Cargo.toml file:&#xD;&#xA;&#xD;&#xA;    serde = &quot;1.0.136&quot;&#xD;&#xA;    serde_json = &quot;1.0.85&quot;&#xD;&#xA;&#xD;&#xA;And include the decorator to your struct:&#xD;&#xA;&#xD;&#xA;    #[derive(serde::Deserialize, serde::Serialize)]&#xD;&#xA;    pub struct CustomResponse {&#xD;&#xA;	    code: u32,&#xD;&#xA;	    sum: u32,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The RPC's implementation has to be modified too for returning the new struct in the response. &#xD;&#xA;&#xD;&#xA;Change the get_sum declaration to use the new struct.&#xD;&#xA;    &#xD;&#xA;    #[rpc]&#xD;&#xA;    pub trait SumStorageApi&lt;BlockHash&gt; {&#xD;&#xA;     #[rpc(name = &quot;sumStorage_getSum&quot;)]&#xD;&#xA;     fn get_sum(&#xD;&#xA;         &amp;self,&#xD;&#xA;         at: Option&lt;BlockHash&gt;&#xD;&#xA;     ) -&gt; Result&lt;CustomResponse&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And finally change the implementation of the get_sum function from:&#xD;&#xA;&#xD;&#xA;    fn get_sum(&#xD;&#xA;        &amp;self,&#xD;&#xA;        at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;&#xD;&#xA;    ) -&gt; Result&lt;u32&gt; {&#xD;&#xA;&#xD;&#xA;        let api = self.client.runtime_api();&#xD;&#xA;        let at = BlockId::hash(at.unwrap_or_else(||&#xD;&#xA;            // If the block hash is not supplied assume the best block.&#xD;&#xA;            self.client.info().best_hash&#xD;&#xA;        ));&#xD;&#xA;&#xD;&#xA;        let runtime_api_result = api.get_sum(&amp;at);&#xD;&#xA;        runtime_api_result.map_err(|e| RpcError {&#xD;&#xA;            code: ErrorCode::ServerError(9876), // No real reason for this value&#xD;&#xA;            message: &quot;Something wrong&quot;.into(),&#xD;&#xA;            data: Some(format!(&quot;{:?}&quot;, e).into()),&#xD;&#xA;        })&#xD;&#xA;    }&#xD;&#xA;To:&#xD;&#xA;&#xD;&#xA;    fn get_sum(&#xD;&#xA;        &amp;self,&#xD;&#xA;        at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;&#xD;&#xA;    ) -&gt; Result&lt;CustomResponse&gt; {&#xD;&#xA;&#xD;&#xA;        let api = self.client.runtime_api();&#xD;&#xA;        let at = BlockId::hash(at.unwrap_or_else(||&#xD;&#xA;            // If the block hash is not supplied assume the best block.&#xD;&#xA;            self.client.info().best_hash&#xD;&#xA;        ));&#xD;&#xA;&#xD;&#xA;        let runtime_api_result = api.get_sum(&amp;at);&#xD;&#xA;        runtime_api_result.map_err(|e| RpcError {&#xD;&#xA;            code: ErrorCode::ServerError(9876), // No real reason for this value&#xD;&#xA;            message: &quot;Something wrong&quot;.into(),&#xD;&#xA;            data: Some(format!(&quot;{:?}&quot;, e).into()),&#xD;&#xA;        });&#xD;&#xA;        Ok(CustomResponse{ code: 200, sum: value.unwrap()})&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;When query this RPC call you should get something like it now:&#xD;&#xA;&#xD;&#xA;     {&#xD;&#xA;      &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;      &quot;result&quot;: {&#xD;&#xA;          &quot;code&quot;: 200,&#xD;&#xA;          &quot;sum&quot;: 18&#xD;&#xA;      },&#xD;&#xA;      &quot;id&quot;: 3&#xD;&#xA;     }" ContentLicense="CC BY-SA 4.0" />
  <row Id="20539" PostHistoryTypeId="2" PostId="5465" RevisionGUID="b54fd3d0-d3da-4bbf-9219-11d95969a284" CreationDate="2022-10-20T09:40:11.380" UserId="2762" Text="If send the extrinsic setName with a name shorter than the number you set when configured the pallet you can will see that the extrinsic is included in the block, but it fails to perform the operation.&#xD;&#xA;&#xD;&#xA;With PolkadotJS you will see in the top-right of the screen when the extrinsic ends:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And if you go to the Network explorer and find the Block where your extrinsic was included you can see too, that the extrinsic was included in the block and the reason it failed:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you still can't see, I suggest you check your configuration as someone suggested in the comments.&#xD;&#xA;&#xD;&#xA;Go to your node runtime/src/lib.rs and check the `MinNickLength` value&#xD;&#xA;&#xD;&#xA;    parameter_types! {&#xD;&#xA;	// Choose a fee that incentivizes desireable behavior.&#xD;&#xA;	pub const NickReservationFee: u128 = 100;&#xD;&#xA;	pub const MinNickLength: u32 = 8;&#xD;&#xA;	// Maximum bounds on storage are important to secure your chain.&#xD;&#xA;	pub const MaxNickLength: u32 = 32;&#xD;&#xA;    }&#xD;&#xA;    // Nicks pallet&#xD;&#xA;    impl pallet_nicks::Config for Runtime {&#xD;&#xA;    	type Currency = Balances;&#xD;&#xA;    	// Use the NickReservationFee from the parameter_types block.&#xD;&#xA;    	type ReservationFee = NickReservationFee;&#xD;&#xA;    	// No action is taken when deposits are forfeited.&#xD;&#xA;    	type Slashed = ();&#xD;&#xA;    	// Configure the FRAME System Root origin as the Nick pallet admin..&#xD;&#xA;    	type ForceOrigin = frame_system::EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;    	// Use the MinNickLength from the parameter_types block.&#xD;&#xA;    	type MinLength = MinNickLength;&#xD;&#xA;    	// Use the MaxNickLength from the parameter_types block.&#xD;&#xA;    	type MaxLength = MaxNickLength;&#xD;&#xA;    	// The ubiquitous event type.&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/IQXjM.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Lqsll.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20543" PostHistoryTypeId="2" PostId="5466" RevisionGUID="ded189ac-a3ec-4c33-956d-0911802ef316" CreationDate="2022-10-20T11:17:59.390" UserId="2792" Text="I am trying to restart our network using data left by previous collators. How do I apply that data to start a new ( or the same ) network without losing data? I am looking for a solution similar polkashot for kusama." ContentLicense="CC BY-SA 4.0" />
  <row Id="20545" PostHistoryTypeId="1" PostId="5466" RevisionGUID="ded189ac-a3ec-4c33-956d-0911802ef316" CreationDate="2022-10-20T11:17:59.390" UserId="2792" Text="How to restart network from parachain data that was left on the disk?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20546" PostHistoryTypeId="3" PostId="5466" RevisionGUID="ded189ac-a3ec-4c33-956d-0911802ef316" CreationDate="2022-10-20T11:17:59.390" UserId="2792" Text="|parachain|kusama|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20547" PostHistoryTypeId="2" PostId="5467" RevisionGUID="fa68656a-3019-4379-8bbe-7831bb932e47" CreationDate="2022-10-20T11:41:19.100" UserId="251" Text="Use `--base-dir &lt;PREVIOUS COLLATOR DATA PATH&gt;` or `-d &lt;PREVIOUS COLLATOR DATA PATH&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="20549" PostHistoryTypeId="5" PostId="5447" RevisionGUID="8656c0cd-7e9e-456a-9847-0e1d4d7204fe" CreationDate="2022-10-20T11:52:57.113" UserId="341" Comment="added 359 characters in body" Text="In the code of the Nicks pallet, there is [some logic][1] to make sure the name passed as parameter is long enough.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;ensure!(bounded_name.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I call the extrinsic with a name too short, the condition is false, yet the extrinsic is included into a block. Polkadot-js/apps as well as the substrate-UI-template don't show any error (beside one event for the latter). Shouldn't it fail with `TooShort`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA;- I confirm that the `MinLength` is 8 char, and that I set a name smaller than this.&#xD;&#xA;&#xD;&#xA;- Now the one reason why the UI may not be able to see that the extrinsic failed, is that it seems to have issues decoding the system events. All the blocks (not only the one with my extrinsic) have the following:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs#L144&#xD;&#xA;  [2]: https://i.stack.imgur.com/p7Dhc.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20552" PostHistoryTypeId="5" PostId="5467" RevisionGUID="34cb63ad-3aff-424b-9586-29813dc424ef" CreationDate="2022-10-20T12:02:32.943" UserId="251" Comment="added 6 characters in body" Text="Boot with `--base-dir &lt;PREVIOUS COLLATOR DATA PATH&gt;` or `-d &lt;PREVIOUS COLLATOR DATA PATH&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="20553" PostHistoryTypeId="2" PostId="5469" RevisionGUID="cfcf7b60-6657-4a84-b648-4b2d73924511" CreationDate="2022-10-20T12:18:19.297" UserId="341" Text="I can't comment yet, so all I'm left with is to answer:&#xD;&#xA;&#xD;&#xA;I implemented this feature a couple months ago https://github.com/polkadot-js/extension/pull/1068 I published an article about it too: https://blog.chainsafe.io/polkadot-js-extension-new-privacy-feature-3f80900589ec&#xD;&#xA;&#xD;&#xA;It will be part of the next release in production hopefully in the coming weeks. Releases of the extension are taken very seriously because the time it takes between the submission and going live can be very long (like a week). If you push something that hasn't been sufficiently tested, leaving users without a fix for a week is disastrous." ContentLicense="CC BY-SA 4.0" />
  <row Id="20555" PostHistoryTypeId="5" PostId="5447" RevisionGUID="b1bf5e6d-6fa1-4a8e-ae46-69329134bb0d" CreationDate="2022-10-20T13:02:54.870" UserId="341" Comment="added 99 characters in body" Text="In the code of the Nicks pallet, there is [some logic][1] to make sure the name passed as parameter is long enough.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;ensure!(bounded_name.len() &gt;= T::MinLength::get() as usize, Error::&lt;T&gt;::TooShort);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when I call the extrinsic with a name too short, the condition is false, yet the extrinsic is included into a block. Polkadot-js/apps as well as the substrate-UI-template don't show any error (beside one event for the latter). Shouldn't it fail with `TooShort`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA; - I confirm that the `MinLength` is 8 char, and that I set a name smaller than this.&#xD;&#xA; - Here is the code: https://github.com/Tbaut/substrate-node-template/compare/main...nicks-pallet&#xD;&#xA; - Now the one reason why the UI may not be able to see that the extrinsic failed, is that it seems to have issues decoding the system events. All the blocks (not only the one with my extrinsic) have the following:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs#L144&#xD;&#xA;  [2]: https://i.stack.imgur.com/p7Dhc.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20556" PostHistoryTypeId="2" PostId="5470" RevisionGUID="506bb86e-34a8-444e-b232-dc4795518b1e" CreationDate="2022-10-20T13:12:38.913" UserId="3344" Text="Are open ended block production times/lengths possible?&#xD;&#xA;&#xD;&#xA;- Under what constraints (e.g. chain type, etc.)?&#xD;&#xA;- With what costs/tradeoffs?&#xD;&#xA;&#xD;&#xA;If not a first-class citizen, can that property be approximated? &#xD;&#xA;&#xD;&#xA;Any examples, tutorials, blogs etc.?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20558" PostHistoryTypeId="1" PostId="5470" RevisionGUID="506bb86e-34a8-444e-b232-dc4795518b1e" CreationDate="2022-10-20T13:12:38.913" UserId="3344" Text="Open ended block production times/lengths" ContentLicense="CC BY-SA 4.0" />
  <row Id="20559" PostHistoryTypeId="3" PostId="5470" RevisionGUID="506bb86e-34a8-444e-b232-dc4795518b1e" CreationDate="2022-10-20T13:12:38.913" UserId="3344" Text="|substrate-node|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20560" PostHistoryTypeId="2" PostId="5471" RevisionGUID="0cfe1078-e03d-4774-9d22-3ee058316df2" CreationDate="2022-10-20T17:00:26.300" UserId="110" Text="we have an existing parachain network consisting of one archive node and 4 rpc nodes that are peering and synced with the relay chain.&#xD;&#xA;They run inside docker containers in different virtual machines. We wanted to add a single collator node to this set, by specifying as bootNodes the four rpc nodes of the network. But for some reason, the collator node won't see any peers. I can confirm that the ProtocolId and the version of the nodes is the same (v0.9.24).&#xD;&#xA;&#xD;&#xA;The RPC nodes are running with the following parameters (some were skipped):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--allow-private-ipv4 --unsafe-ws-external --rpc-cors all&#xD;&#xA;--rpc-external --rpc-methods Unsafe&#xD;&#xA;--enable-offchain-indexing=TRUE&#xD;&#xA;--ws-port 8844 --port 30335 --rpc-port 9955&#xD;&#xA;--chain chain_spec_raw.json --execution=wasm&#xD;&#xA;--node-key-file node-key-file.txt&#xD;&#xA;--&#xD;&#xA;--port 30334 --chain kusama.json&#xD;&#xA;--execution=wasm --unsafe-pruning&#xD;&#xA;--pruning=256&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;When running our collator node, basically with similar parameters but indicating `--collator`, the node doesn't find any peer. I tried adding `-lsync=debug` to see what information could we get regarding not finding any peers (the bootNodes exist, and they are running), and what I found is a flood of messages like these:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-20 15:16:44.215 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWB1ctQt4yhs5CTzKArW9TgWbVdY2z5BLw6SPbTSed45YY    &#xD;&#xA;2022-10-20 15:16:44.215 DEBUG tokio-runtime-worker sync: 12D3KooWB1ctQt4yhs5CTzKArW9TgWbVdY2z5BLw6SPbTSed45YY disconnected    &#xD;&#xA;2022-10-20 15:16:44.228 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWQBrCAKiXydGW4Ab2J9X29Bvd6V54Awvzj8BWAi2xXQ22    &#xD;&#xA;2022-10-20 15:16:44.228 DEBUG tokio-runtime-worker sync: 12D3KooWQBrCAKiXydGW4Ab2J9X29Bvd6V54Awvzj8BWAi2xXQ22 disconnected    &#xD;&#xA;2022-10-20 15:16:44.238 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWJzrRnu9So3JfPaBcfYUuzERrL6712aLoGfW4YQzAURmB    &#xD;&#xA;2022-10-20 15:16:44.238 DEBUG tokio-runtime-worker sync: 12D3KooWJzrRnu9So3JfPaBcfYUuzERrL6712aLoGfW4YQzAURmB disconnected    &#xD;&#xA;2022-10-20 15:16:44.238 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWP51x2EsLiNssP61JVHJCgGDqLpCCkZMFBVFRE95xAfSy    &#xD;&#xA;2022-10-20 15:16:44.238 DEBUG tokio-runtime-worker sync: 12D3KooWP51x2EsLiNssP61JVHJCgGDqLpCCkZMFBVFRE95xAfSy disconnected    &#xD;&#xA;2022-10-20 15:16:44.254 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWGFiLPZ7dE3Arx3TWAdweTCKwYwkxpkJ33REbpvrU5p6v    &#xD;&#xA;2022-10-20 15:16:44.254 DEBUG tokio-runtime-worker sync: 12D3KooWGFiLPZ7dE3Arx3TWAdweTCKwYwkxpkJ33REbpvrU5p6v disconnected    &#xD;&#xA;2022-10-20 15:16:44.259 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWHRABR98BfKMbKp6J4dMuSRNCdMsCTGJ9sovQxA8XjbPg &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What does it mean that there are too many full nodes, while our node has 0 peers?&#xD;&#xA;What could be the reason that the network is rejecting the new node?&#xD;&#xA;Do you know about other levels of logging or filtering that we can use to tackle down the problem here?&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20562" PostHistoryTypeId="1" PostId="5471" RevisionGUID="0cfe1078-e03d-4774-9d22-3ee058316df2" CreationDate="2022-10-20T17:00:26.300" UserId="110" Text="Node doesn't peer with a network specifying bootNodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="20563" PostHistoryTypeId="3" PostId="5471" RevisionGUID="0cfe1078-e03d-4774-9d22-3ee058316df2" CreationDate="2022-10-20T17:00:26.300" UserId="110" Text="|networking|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20564" PostHistoryTypeId="5" PostId="5442" RevisionGUID="d6e8dffc-42a2-49c0-8ce2-ba9f60f3635b" CreationDate="2022-10-20T17:21:52.163" UserId="2163" Comment="added 302 characters in body" Text="In the tests of a pallet, I would like to use the council as the origin.&#xD;&#xA;&#xD;&#xA;I did the following:&#xD;&#xA;1. Imported the collective pallet&#xD;&#xA;2. Implemented `pallet_collective::Config` for `Test`:&#xD;&#xA;```rs&#xD;&#xA;type CouncilCollective = pallet_collective::Instance1;&#xD;&#xA;impl pallet_collective::Config&lt;CouncilCollective&gt; for Test {&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	type Proposal = RuntimeCall;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type MotionDuration = MotionDuration;&#xD;&#xA;	type MaxProposals = MaxProposals;&#xD;&#xA;	type MaxMembers = MaxMembers;&#xD;&#xA;	type DefaultVote = pallet_collective::PrimeDefaultVote;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;3. Set the `GenesisConfig`:&#xD;&#xA;```rs&#xD;&#xA;	pallet_collective::GenesisConfig::&lt;Test, Instance1&gt; {&#xD;&#xA;		members: vec![1, 2, 3],&#xD;&#xA;		phantom: Default::default(),&#xD;&#xA;	}&#xD;&#xA;	.assimilate_storage(&amp;mut t)&#xD;&#xA;	.unwrap();&#xD;&#xA;```&#xD;&#xA;4. Wrote the test like this:&#xD;&#xA;```rs&#xD;&#xA;        // this returns a RuntimeCall that can be called by council&#xD;&#xA;		let proposal = make_proposal() &#xD;&#xA;		let proposal_len: u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;		let proposal_weight = proposal.get_dispatch_info().weight;&#xD;&#xA;		let hash = BlakeTwo256::hash_of(&amp;proposal);&#xD;&#xA;&#xD;&#xA;		assert_ok!(Council::propose(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			3,&#xD;&#xA;			Box::new(proposal.clone()),&#xD;&#xA;			proposal_len&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Council::vote(RuntimeOrigin::signed(1), hash, 0, true));&#xD;&#xA;		assert_ok!(Council::vote(RuntimeOrigin::signed(2), hash, 0, true));&#xD;&#xA;		assert_ok!(Council::vote(RuntimeOrigin::signed(3), hash, 0, true));&#xD;&#xA;&#xD;&#xA;		System::set_block_number(4);&#xD;&#xA;		assert_ok!(Council::close(&#xD;&#xA;			RuntimeOrigin::signed(4),&#xD;&#xA;			hash,&#xD;&#xA;			0,&#xD;&#xA;			proposal_weight,&#xD;&#xA;			proposal_len&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;        // The test fails at this assertion, the result is not Ok	&#xD;&#xA;        System::assert_last_event(RuntimeEvent::Council(pallet_collective::Event::Executed {&#xD;&#xA;			proposal_hash: hash,&#xD;&#xA;			result: Ok(()),&#xD;&#xA;		}));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am not sure what I am doing wrong here.&#xD;&#xA;&#xD;&#xA;EDIT: Even though @bkchr suggested a simpler approach I realized I need the approach shown in this question. The test I have written(step 4) is 100% correct(I have tested the same test in the collective pallet) so either one of step 1, 2, 3 has something wrong or I am completely missing something." ContentLicense="CC BY-SA 4.0" />
  <row Id="20565" PostHistoryTypeId="5" PostId="2581" RevisionGUID="34ffd8ca-8df1-4406-97bc-05ca5fd2c3b5" CreationDate="2022-10-20T18:25:20.277" UserId="116" Comment="Spellcheck and language" Text="Here is a simplified example of what I encounter:&#xD;&#xA;&#xD;&#xA;I have this function in my pallet:&#xD;&#xA;&#xD;&#xA;    fn(...) -&gt; ... {&#xD;&#xA;        let idx = get_index(); //&#xD;&#xA;        let address = T::PalletId::get().into_sub_account(idx);&#xD;&#xA;        transfer(address, 1000); //i transfer the existential deposit on my new address, its 1000&#xD;&#xA;        index::T::put(idx + 1);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and this test:&#xD;&#xA;&#xD;&#xA;    fn test_fn {&#xD;&#xA;        assert_eq(Pallet::index(), 0) // pass&#xD;&#xA;        assert_ok(Pallet::fn(...));   // pass&#xD;&#xA;        assert_eq(Pallet::index(), 1) // pass&#xD;&#xA;        assert_ok(Pallet::fn(...));   // pass&#xD;&#xA;        assert_eq(Pallet::index(), 2) // pass&#xD;&#xA;        assert_ok(Pallet::fn(...));   // pass&#xD;&#xA;    &#xD;&#xA;        assert_ok(Balances::free_balance(get_acc_id(0), 1000) // error: left = 3000, right = 1000&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fn get_acc_id(index) -&gt; AccountId {&#xD;&#xA;        Pallet::get().into_sub_account(index)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I don't understand why i have this `error: left = 3000, right = 1000`, unless into_sub_account(0) and into_sub_account(2) give me the same output. Am I doing something wrong?&#xD;&#xA;&#xD;&#xA;bonus: this test pass:&#xD;&#xA;&#xD;&#xA;    assert_eq!(get_account_id(0), get_account_id(100000));&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20566" PostHistoryTypeId="24" PostId="2581" RevisionGUID="34ffd8ca-8df1-4406-97bc-05ca5fd2c3b5" CreationDate="2022-10-20T18:25:20.277" Comment="Proposed by 116 approved by 2355 edit id of 317" ContentLicense="CC BY-SA 4.0" />
  <row Id="20567" PostHistoryTypeId="5" PostId="5427" RevisionGUID="fcd84bc0-a2ba-4b63-a496-5ec1ffe67ef4" CreationDate="2022-10-20T20:15:36.823" UserId="3352" Comment="added 7 characters in body" Text="I added a new account using this command in PolkadotJS.&#xD;&#xA;```js&#xD;&#xA;const { pair, json } = keyring.addUri(mnemonic, 'myStr0ngP@ssworD', { name: 'mnemonic acc' });&#xD;&#xA;```&#xD;&#xA;And now, I want to forget the account. &#xD;&#xA;I used `keyring.forgetAddress`, but it doesn't really remove the account.&#xD;&#xA;I always load accounts using `keyring.getAccounts()` after `forgetAddress`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;For example, how does the **Forget Account** action work in the PolkadotJS extension?&#xD;&#xA;What function or API is called?&#xD;&#xA;Please help me.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OsP5f.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20568" PostHistoryTypeId="2" PostId="5472" RevisionGUID="37d0d65b-32c6-4689-8b51-c8ed3418c807" CreationDate="2022-10-20T20:17:30.430" UserId="3344" Text="I'll add more as come across information:&#xD;&#xA;&#xD;&#xA;- Time in the network is measured in *finalized* blocks. So &quot;time&quot; would stand still." ContentLicense="CC BY-SA 4.0" />
  <row Id="20570" PostHistoryTypeId="2" PostId="5473" RevisionGUID="72fd79e8-1919-44f2-9b59-d97f67309c35" CreationDate="2022-10-20T20:22:34.143" UserId="2548" Text="My node is compatible with EVM and I would like to connect it to metamask? &#xD;&#xA;&#xD;&#xA;How can I do it?&#xD;&#xA;What should I put in RPC URL and chain id? (Where can I find my chain id)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/1zxOb.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20572" PostHistoryTypeId="1" PostId="5473" RevisionGUID="72fd79e8-1919-44f2-9b59-d97f67309c35" CreationDate="2022-10-20T20:22:34.143" UserId="2548" Text="How to connect substrate node to metamask?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20573" PostHistoryTypeId="3" PostId="5473" RevisionGUID="72fd79e8-1919-44f2-9b59-d97f67309c35" CreationDate="2022-10-20T20:22:34.143" UserId="2548" Text="|substrate-node|rust|evm|ethereum|metamask|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20574" PostHistoryTypeId="5" PostId="5472" RevisionGUID="a40f5fee-047f-44e0-863c-742477b70037" CreationDate="2022-10-20T20:23:12.643" UserId="3344" Comment="added 21 characters in body" Text="I'll add more as come across information:&#xD;&#xA;&#xD;&#xA;- Costs/tradeoffs&#xD;&#xA;  - Time in the network is measured in *finalized* blocks. So &quot;time&quot; would stand still." ContentLicense="CC BY-SA 4.0" />
  <row Id="20575" PostHistoryTypeId="5" PostId="5442" RevisionGUID="86a69df1-567c-48b9-8ea9-721f48768ae1" CreationDate="2022-10-20T20:25:34.990" UserId="2163" Comment="deleted 302 characters in body" Text="In the tests of a pallet, I would like to use the council as the origin.&#xD;&#xA;&#xD;&#xA;I did the following:&#xD;&#xA;1. Imported the collective pallet&#xD;&#xA;2. Implemented `pallet_collective::Config` for `Test`:&#xD;&#xA;```rs&#xD;&#xA;type CouncilCollective = pallet_collective::Instance1;&#xD;&#xA;impl pallet_collective::Config&lt;CouncilCollective&gt; for Test {&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	type Proposal = RuntimeCall;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type MotionDuration = MotionDuration;&#xD;&#xA;	type MaxProposals = MaxProposals;&#xD;&#xA;	type MaxMembers = MaxMembers;&#xD;&#xA;	type DefaultVote = pallet_collective::PrimeDefaultVote;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;3. Set the `GenesisConfig`:&#xD;&#xA;```rs&#xD;&#xA;	pallet_collective::GenesisConfig::&lt;Test, Instance1&gt; {&#xD;&#xA;		members: vec![1, 2, 3],&#xD;&#xA;		phantom: Default::default(),&#xD;&#xA;	}&#xD;&#xA;	.assimilate_storage(&amp;mut t)&#xD;&#xA;	.unwrap();&#xD;&#xA;```&#xD;&#xA;4. Wrote the test like this:&#xD;&#xA;```rs&#xD;&#xA;        // this returns a RuntimeCall that can be called by council&#xD;&#xA;		let proposal = make_proposal() &#xD;&#xA;		let proposal_len: u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;		let proposal_weight = proposal.get_dispatch_info().weight;&#xD;&#xA;		let hash = BlakeTwo256::hash_of(&amp;proposal);&#xD;&#xA;&#xD;&#xA;		assert_ok!(Council::propose(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			3,&#xD;&#xA;			Box::new(proposal.clone()),&#xD;&#xA;			proposal_len&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Council::vote(RuntimeOrigin::signed(1), hash, 0, true));&#xD;&#xA;		assert_ok!(Council::vote(RuntimeOrigin::signed(2), hash, 0, true));&#xD;&#xA;		assert_ok!(Council::vote(RuntimeOrigin::signed(3), hash, 0, true));&#xD;&#xA;&#xD;&#xA;		System::set_block_number(4);&#xD;&#xA;		assert_ok!(Council::close(&#xD;&#xA;			RuntimeOrigin::signed(4),&#xD;&#xA;			hash,&#xD;&#xA;			0,&#xD;&#xA;			proposal_weight,&#xD;&#xA;			proposal_len&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;        // The test fails at this assertion, the result is not Ok	&#xD;&#xA;        System::assert_last_event(RuntimeEvent::Council(pallet_collective::Event::Executed {&#xD;&#xA;			proposal_hash: hash,&#xD;&#xA;			result: Ok(()),&#xD;&#xA;		}));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am not sure what I am doing wrong here." ContentLicense="CC BY-SA 4.0" />
  <row Id="20576" PostHistoryTypeId="10" PostId="1320" RevisionGUID="1e9fa4de-1e00-4679-95f2-deb4a23b08ba" CreationDate="2022-10-20T20:27:26.790" UserId="28" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="20577" PostHistoryTypeId="5" PostId="4197" RevisionGUID="797baaa3-edb5-451f-b58c-6f52a316efef" CreationDate="2022-10-20T21:28:40.477" UserId="116" Comment="Spellcheck and language" Text="I Need to create a pallet in substrate and I changed genesis build in substrate in my pallet.&#xD;&#xA;&#xD;&#xA;When I run this command it show me this error:&#xD;&#xA;&#xD;&#xA;&gt;GenesisConfig { ^^^^^^^^^^^^^ missing template_module&#xD;&#xA;&#xD;&#xA;**I don't know what the problem is, please guide me to solve this problem .**&#xD;&#xA;&#xD;&#xA;This code is the genesis build in my pallet:&#xD;&#xA;&#xD;&#xA;	#[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		default_price: BalanceOf&lt;T&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;std&quot;)]&#xD;&#xA;    impl&lt;T: Config&gt; Default for GenesisConfig&lt;T&gt; {&#xD;&#xA;        fn default() -&gt; GenesisConfig&lt;T&gt; {&#xD;&#xA;            GenesisConfig { default_price: T::DefaultMembershipPrice::get().saturated_into() }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[pallet::genesis_build]&#xD;&#xA;    impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;        fn build(&amp;self) {&#xD;&#xA;            let n = T::DefaultNumMembership::get();&#xD;&#xA;            for i in 0u64..n {&#xD;&#xA;                let val = DaoMembership {&#xD;&#xA;                    dna: None,&#xD;&#xA;                    owner: None,&#xD;&#xA;                    price: Some(self.default_price.clone()),&#xD;&#xA;                    name: None,&#xD;&#xA;                };&#xD;&#xA;                &lt;MembershipsPooled&lt;T&gt;&gt;::insert(i, val);&#xD;&#xA;                log::info!(&quot;[info!!] generated membership and pooled: [{:?}]&quot;, i);&#xD;&#xA;            }&#xD;&#xA;            &lt;CountForPooled&lt;T&gt;&gt;::put(n);&#xD;&#xA;            &lt;CountForOwned&lt;T&gt;&gt;::put(0);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and this is configuration in `chain_spec`:&#xD;&#xA;&#xD;&#xA;    use node_template_runtime::{&#xD;&#xA;        AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, Signature, SudoConfig,&#xD;&#xA;        SystemConfig, WASM_BINARY,&#xD;&#xA;    };&#xD;&#xA;    use sc_service::ChainType;&#xD;&#xA;    use sp_consensus_aura::sr25519::AuthorityId as AuraId;&#xD;&#xA;    use sp_core::{sr25519, Pair, Public};&#xD;&#xA;    use sp_finality_grandpa::AuthorityId as GrandpaId;&#xD;&#xA;    use sp_runtime::traits::{IdentifyAccount, Verify};&#xD;&#xA;    &#xD;&#xA;    // The URL for the telemetry server.&#xD;&#xA;    // const STAGING_TELEMETRY_URL: &amp;str = &quot;wss://telemetry.polkadot.io/submit/&quot;;&#xD;&#xA;    &#xD;&#xA;    /// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.&#xD;&#xA;    pub type ChainSpec = sc_service::GenericChainSpec&lt;GenesisConfig&gt;;&#xD;&#xA;    &#xD;&#xA;    /// Generate a crypto pair from seed.&#xD;&#xA;    pub fn get_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; &lt;TPublic::Pair as Pair&gt;::Public {&#xD;&#xA;        TPublic::Pair::from_string(&amp;format!(&quot;//{}&quot;, seed), None)&#xD;&#xA;            .expect(&quot;static values are valid; qed&quot;)&#xD;&#xA;            .public()&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    type AccountPublic = &lt;Signature as Verify&gt;::Signer;&#xD;&#xA;    &#xD;&#xA;    /// Generate an account ID from seed.&#xD;&#xA;    pub fn get_account_id_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; AccountId&#xD;&#xA;    where&#xD;&#xA;        AccountPublic: From&lt;&lt;TPublic::Pair as Pair&gt;::Public&gt;,&#xD;&#xA;    {&#xD;&#xA;        AccountPublic::from(get_from_seed::&lt;TPublic&gt;(seed)).into_account()&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Generate an Aura authority key.&#xD;&#xA;    pub fn authority_keys_from_seed(s: &amp;str) -&gt; (AuraId, GrandpaId) {&#xD;&#xA;        (get_from_seed::&lt;AuraId&gt;(s), get_from_seed::&lt;GrandpaId&gt;(s))&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub fn development_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;        let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;    &#xD;&#xA;        Ok(ChainSpec::from_genesis(&#xD;&#xA;            // Name&#xD;&#xA;            &quot;Development&quot;,&#xD;&#xA;            // ID&#xD;&#xA;            &quot;dev&quot;,&#xD;&#xA;            ChainType::Development,&#xD;&#xA;            move || {&#xD;&#xA;                testnet_genesis(&#xD;&#xA;                    wasm_binary,&#xD;&#xA;                    // Initial PoA authorities&#xD;&#xA;                    vec![authority_keys_from_seed(&quot;Alice&quot;)],&#xD;&#xA;                    // Sudo account&#xD;&#xA;                    get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;                    // Pre-funded accounts&#xD;&#xA;                    vec![&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;                    ],&#xD;&#xA;                    true,&#xD;&#xA;                )&#xD;&#xA;            },&#xD;&#xA;            // Bootnodes&#xD;&#xA;            vec![],&#xD;&#xA;            // Telemetry&#xD;&#xA;            None,&#xD;&#xA;            // Protocol ID&#xD;&#xA;            None,&#xD;&#xA;            None,&#xD;&#xA;            // Properties&#xD;&#xA;            None,&#xD;&#xA;            // Extensions&#xD;&#xA;            None,&#xD;&#xA;        ))&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub fn local_testnet_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;        let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;    &#xD;&#xA;        Ok(ChainSpec::from_genesis(&#xD;&#xA;            // Name&#xD;&#xA;            &quot;Local Testnet&quot;,&#xD;&#xA;            // ID&#xD;&#xA;            &quot;local_testnet&quot;,&#xD;&#xA;            ChainType::Local,&#xD;&#xA;            move || {&#xD;&#xA;                testnet_genesis(&#xD;&#xA;                    wasm_binary,&#xD;&#xA;                    // Initial PoA authorities&#xD;&#xA;                    vec![authority_keys_from_seed(&quot;Alice&quot;), authority_keys_from_seed(&quot;Bob&quot;)],&#xD;&#xA;                    // Sudo account&#xD;&#xA;                    get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;                    // Pre-funded accounts&#xD;&#xA;                    vec![&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;                        get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;                    ],&#xD;&#xA;                    true,&#xD;&#xA;                )&#xD;&#xA;            },&#xD;&#xA;            // Bootnodes&#xD;&#xA;            vec![],&#xD;&#xA;            // Telemetry&#xD;&#xA;            None,&#xD;&#xA;            // Protocol ID&#xD;&#xA;            None,&#xD;&#xA;            // Properties&#xD;&#xA;            None,&#xD;&#xA;            None,&#xD;&#xA;            // Extensions&#xD;&#xA;            None,&#xD;&#xA;        ))&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Configure initial storage state for FRAME modules.&#xD;&#xA;    fn testnet_genesis(&#xD;&#xA;        wasm_binary: &amp;[u8],&#xD;&#xA;        initial_authorities: Vec&lt;(AuraId, GrandpaId)&gt;,&#xD;&#xA;        root_key: AccountId,&#xD;&#xA;        endowed_accounts: Vec&lt;AccountId&gt;,&#xD;&#xA;        _enable_println: bool,&#xD;&#xA;    ) -&gt; GenesisConfig {&#xD;&#xA;        GenesisConfig {&#xD;&#xA;            system: SystemConfig {&#xD;&#xA;                // Add Wasm runtime to storage.&#xD;&#xA;                code: wasm_binary.to_vec(),&#xD;&#xA;            },&#xD;&#xA;            balances: BalancesConfig {&#xD;&#xA;                // Configure endowed accounts with initial balance of 1 &lt;&lt; 60.&#xD;&#xA;                balances: endowed_accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect(),&#xD;&#xA;            },&#xD;&#xA;            aura: AuraConfig {&#xD;&#xA;                authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),&#xD;&#xA;            },&#xD;&#xA;            grandpa: GrandpaConfig {&#xD;&#xA;                authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(),&#xD;&#xA;            },&#xD;&#xA;            sudo: SudoConfig {&#xD;&#xA;                // Assign network admin rights.&#xD;&#xA;                key: Some(root_key),&#xD;&#xA;            },&#xD;&#xA;            transaction_payment: Default::default(),&#xD;&#xA;        }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="20578" PostHistoryTypeId="24" PostId="4197" RevisionGUID="797baaa3-edb5-451f-b58c-6f52a316efef" CreationDate="2022-10-20T21:28:40.477" Comment="Proposed by 116 approved by 34 edit id of 318" ContentLicense="CC BY-SA 4.0" />
  <row Id="20579" PostHistoryTypeId="5" PostId="5416" RevisionGUID="7c2ab655-9b87-4bfb-a344-a3e8b388fe8d" CreationDate="2022-10-20T21:28:47.763" UserId="116" Comment="Spellcheck and language" Text="I need to add an item in storage but when I build the project, I get this error: &#xD;&#xA;&#xD;&#xA;&gt;error[E0609]: no field `storeId` on type `&amp;mut std::option::Option&lt;BusinessInfo&lt;T&gt;&gt;`&#xD;&#xA;   --&gt; pallets/bussines/src/lib.rs:171:25&#xD;&#xA;    |&#xD;&#xA;171 |                 ensure!((Some(store.storeId) == Some(store_id)), &lt;Error&lt;T&gt;&gt;::StoreItemNotFound);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I don't know what the problem is. &#xD;&#xA;&#xD;&#xA;this is `BusinessInfo` struct: &#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub struct BusinessInfo&lt;T: Config&gt; {&#xD;&#xA;		logo: Vec&lt;u8&gt;,&#xD;&#xA;		storeId: [u8; 16],&#xD;&#xA;		owner: &lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;		description: Vec&lt;u8&gt;,&#xD;&#xA;		name: Vec&lt;u8&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried to check if business exists add item if not show error: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    	#[pallet::weight(10000)]&#xD;&#xA;		#[transactional]&#xD;&#xA;		pub fn add_item(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			store_id: [u8; 16],&#xD;&#xA;			media: Vec&lt;u8&gt;,&#xD;&#xA;			title: Vec&lt;u8&gt;,&#xD;&#xA;			description: Vec&lt;u8&gt;,&#xD;&#xA;			price: u32,&#xD;&#xA;			count: u32,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let item_id = Self::gen_dna();&#xD;&#xA;&#xD;&#xA;			let item_info = BusinessItem {&#xD;&#xA;				media: media.clone(),&#xD;&#xA;				title: title.clone(),&#xD;&#xA;				description: description.clone(),&#xD;&#xA;				price: price.clone(),&#xD;&#xA;				count: count.clone(),&#xD;&#xA;				itemId: item_id,&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			Business::&lt;T&gt;::mutate(who.clone(), |store| -&gt; DispatchResult {&#xD;&#xA;				ensure!((Some(store.storeId) == Some(store_id)), &lt;Error&lt;T&gt;&gt;::StoreItemNotFound);&#xD;&#xA;				let mut store_item_vec: Vec&lt;BusinessItem&gt; = Vec::new();&#xD;&#xA;				store_item_vec.push(item_info);&#xD;&#xA;				&lt;Items&lt;T&gt;&gt;::insert(item_id, who.clone(), store_item_vec);&#xD;&#xA;				Ok(())&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ItemCreated(Some(item_id)));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;and this is `Business Storage`: &#xD;&#xA;&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn business)]&#xD;&#xA;	pub(super) type Business&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Twox64Concat, T::AccountId, BusinessInfo&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20580" PostHistoryTypeId="4" PostId="5416" RevisionGUID="7c2ab655-9b87-4bfb-a344-a3e8b388fe8d" CreationDate="2022-10-20T21:28:47.763" UserId="116" Comment="Spellcheck and language" Text="No field `storeId` on type `&amp;mut std::option::Option&lt;BusinessInfo&lt;T&gt;&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="20581" PostHistoryTypeId="24" PostId="5416" RevisionGUID="7c2ab655-9b87-4bfb-a344-a3e8b388fe8d" CreationDate="2022-10-20T21:28:47.763" Comment="Proposed by 116 approved by 34 edit id of 319" ContentLicense="CC BY-SA 4.0" />
  <row Id="20582" PostHistoryTypeId="5" PostId="4238" RevisionGUID="db0c9afa-81bb-4fb9-a8b2-bc50d8148541" CreationDate="2022-10-20T21:29:18.150" UserId="116" Comment="Spellcheck and language" Text="We just migrated from *substrate v3* to *substrate v4*, after that I expected to have metadata *V14* when I'll call `state_getMetadata` rpc method.&#xD;&#xA;but I still get *V12* metadata and I don't understand why.&#xD;&#xA;&#xD;&#xA;If you have an idea.. &#xD;&#xA;thank you. " ContentLicense="CC BY-SA 4.0" />
  <row Id="20583" PostHistoryTypeId="24" PostId="4238" RevisionGUID="db0c9afa-81bb-4fb9-a8b2-bc50d8148541" CreationDate="2022-10-20T21:29:18.150" Comment="Proposed by 116 approved by 34 edit id of 316" ContentLicense="CC BY-SA 4.0" />
  <row Id="20584" PostHistoryTypeId="5" PostId="4222" RevisionGUID="8a4c7135-b631-438f-8e12-bdea962a78de" CreationDate="2022-10-20T21:29:23.063" UserId="116" Comment="Spellcheck and language" Text="Hello I am creating custom rpc call, I need metadata to be able to decode extrinsics call inside my calls.&#xD;&#xA;&#xD;&#xA;But I don't know how to get substrate metadata inside my rpc call?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20585" PostHistoryTypeId="24" PostId="4222" RevisionGUID="8a4c7135-b631-438f-8e12-bdea962a78de" CreationDate="2022-10-20T21:29:23.063" Comment="Proposed by 116 approved by 34 edit id of 315" ContentLicense="CC BY-SA 4.0" />
  <row Id="20586" PostHistoryTypeId="10" PostId="5457" RevisionGUID="38be3ee8-1ec6-4c50-9261-d8615ba7199d" CreationDate="2022-10-20T21:30:39.370" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[5265],&quot;Voters&quot;:[{&quot;Id&quot;:620,&quot;DisplayName&quot;:&quot;joepetrowski&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:2025,&quot;DisplayName&quot;:&quot;Iker&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="20588" PostHistoryTypeId="5" PostId="5397" RevisionGUID="509314f8-20e8-47d4-a7cd-cf67c44faeb9" CreationDate="2022-10-20T21:51:35.043" UserId="3331" Comment="deleted 4893 characters in body" Text="## solved ##&#xD;&#xA;&#xD;&#xA;:) I will update the solution on a later moment." ContentLicense="CC BY-SA 4.0" />
  <row Id="20596" PostHistoryTypeId="2" PostId="5475" RevisionGUID="c77db052-7157-4d83-973c-6f1e2d194e2b" CreationDate="2022-10-21T02:15:37.580" UserId="2844" Text="I am using [`Swanky Suite`][1], contract compile successfully but while deploy using `swanky deploy --account alice --contract flipper --gas 100000000 --args true` throws `ENOENT: no such file or directory, open` error. `Swanky node` also run in next tab. Why contract doesn't deploy?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.astar.network/docs/wasm/sc-dev/swanky&#xD;&#xA;  [2]: https://i.stack.imgur.com/xB3AK.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="20598" PostHistoryTypeId="1" PostId="5475" RevisionGUID="c77db052-7157-4d83-973c-6f1e2d194e2b" CreationDate="2022-10-21T02:15:37.580" UserId="2844" Text="swanky deploy throws error &quot; ENOENT: no such file or directory&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20599" PostHistoryTypeId="3" PostId="5475" RevisionGUID="c77db052-7157-4d83-973c-6f1e2d194e2b" CreationDate="2022-10-21T02:15:37.580" UserId="2844" Text="|ink|smart-contract|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20600" PostHistoryTypeId="5" PostId="5470" RevisionGUID="2a8575e1-9aad-4a4c-b358-3d5bf1c2de73" CreationDate="2022-10-21T07:30:24.753" UserId="3344" Comment="Clarified" Text="Is it possible to create a block and &#xD;&#xA;- never finalize it (is it truly never, or an upper bound) ?&#xD;&#xA;- keep adding transactions (given the node has available storage)?&#xD;&#xA;&#xD;&#xA;This assumes the same node creates additional similarly 'open' blocks along side each other. &#xD;&#xA;&#xD;&#xA;If this is possible&#xD;&#xA;- Under what constraints (e.g. chain type, etc.)?&#xD;&#xA;- With what costs/tradeoffs?&#xD;&#xA;&#xD;&#xA;If not a first-class citizen, can that property be approximated? &#xD;&#xA;&#xD;&#xA;Any examples, tutorials, blogs etc.?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20601" PostHistoryTypeId="5" PostId="5472" RevisionGUID="65101030-cad6-4f53-a2ab-ca1bc565ec7f" CreationDate="2022-10-21T07:43:34.333" UserId="3344" Comment="Clarified" Text="I'll add more as come across information:&#xD;&#xA;&#xD;&#xA;- Costs/tradeoffs&#xD;&#xA;  - [Time in the network is measured in (*finalized*?) blocks](https://github.com/paritytech/substrate/blob/61b9a4d1a8a9bf39c1d89a8dd02f82785c10860c/bin/node-template/runtime/src/lib.rs#L125). So &quot;time&quot; would stand still.&#xD;&#xA;     - [A session is...measured in block numbers](https://github.com/paritytech/substrate/blob/03c2c2fe44b405c4b84561cc2c65e5cf7d2c263a/frame/session/README.md#terminology)" ContentLicense="CC BY-SA 4.0" />
  <row Id="20602" PostHistoryTypeId="5" PostId="5470" RevisionGUID="5daa549f-214b-451e-80fa-7c96326a7b6a" CreationDate="2022-10-21T07:52:22.400" UserId="3344" Comment="added 29 characters in body" Text="Is it possible (with std pallets or custom) to create a block and &#xD;&#xA;- never finalize it (is it truly never, or an upper bound) ?&#xD;&#xA;- keep adding transactions (given the node has available storage)?&#xD;&#xA;&#xD;&#xA;This assumes the same node creates additional similarly 'open' blocks along side each other. &#xD;&#xA;&#xD;&#xA;If this is possible&#xD;&#xA;- Under what constraints (e.g. chain type, etc.)?&#xD;&#xA;- With what costs/tradeoffs?&#xD;&#xA;&#xD;&#xA;If not a first-class citizen, can that property be approximated? &#xD;&#xA;&#xD;&#xA;Any examples, tutorials, blogs etc.?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20603" PostHistoryTypeId="5" PostId="5472" RevisionGUID="b84963cf-6db5-462f-be1f-c305c4969191" CreationDate="2022-10-21T08:01:55.583" UserId="3344" Comment="added 153 characters in body" Text="I'll add more as come across information:&#xD;&#xA;&#xD;&#xA;- Costs/tradeoffs&#xD;&#xA;  - [Time in the network is measured in (*finalized*?) blocks](https://github.com/paritytech/substrate/blob/61b9a4d1a8a9bf39c1d89a8dd02f82785c10860c/bin/node-template/runtime/src/lib.rs#L125). So &quot;time&quot; would stand still.&#xD;&#xA;     - [A session is...measured in block numbers](https://github.com/paritytech/substrate/blob/03c2c2fe44b405c4b84561cc2c65e5cf7d2c263a/frame/session/README.md#terminology)&#xD;&#xA;     - [In the optimistic scenario, the latency for this message should be at least two blocks...](https://wiki.polkadot.network/docs/learn-parachains)" ContentLicense="CC BY-SA 4.0" />
  <row Id="20604" PostHistoryTypeId="2" PostId="5476" RevisionGUID="ce83670b-6fef-4cbd-832a-193a11f89840" CreationDate="2022-10-21T08:29:15.197" UserId="167" Text="Substrate already has a [`export-state`](https://paritytech.github.io/substrate/master/node_cli/enum.Subcommand.html#variant.ExportState) sub-command that exports the state of a running chain at a given block into a chain-spec. Then you can run a new chain, with the `--chain` pointing to this newly created chain-spec.&#xD;&#xA;&#xD;&#xA;The only thing you need to be careful about, is that the authorities/validators in the chain-spec probably do not exist (i.e. there are no nodes running with those keys) and you want to remove them from the chain-spec. If you are running your new node with `--dev`, you want to replace all of those accounts with `Alice`'s account (`bottom drive obey lake curtain smoke basket hold race lonely fit walk//Alice`, which is [`15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5`](https://kusama.subscan.io/tools/format_transform?input=15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5&amp;type=All)).&#xD;&#xA;&#xD;&#xA;[`fork-of-substrate`](https://github.com/maxsam4/fork-off-substrate) is a very useful tool that simplifies the above process." ContentLicense="CC BY-SA 4.0" />
  <row Id="20606" PostHistoryTypeId="2" PostId="5477" RevisionGUID="48c575e7-2747-4596-ace0-5e91e5e86d33" CreationDate="2022-10-21T09:06:31.190" UserId="3255" Text="I am gonna transfer the customized message which is actually the string in JSON format for representing some information from one parachain to another one.&#xD;&#xA;But I can't find the right functions or specific steps, while there are some XCM demos for transfer the tokens between multiple parachains.&#xD;&#xA;If anyone have some idea, please contact here to give me your hand, thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="20608" PostHistoryTypeId="1" PostId="5477" RevisionGUID="48c575e7-2747-4596-ace0-5e91e5e86d33" CreationDate="2022-10-21T09:06:31.190" UserId="3255" Text="XCM between multiple parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="20609" PostHistoryTypeId="3" PostId="5477" RevisionGUID="48c575e7-2747-4596-ace0-5e91e5e86d33" CreationDate="2022-10-21T09:06:31.190" UserId="3255" Text="|parachain|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20610" PostHistoryTypeId="5" PostId="5471" RevisionGUID="4ab6f8f9-225d-41bc-941e-93abf58b8ba3" CreationDate="2022-10-21T09:40:35.553" UserId="110" Comment="added 186 characters in body" Text="we have an existing parachain network consisting of one archive node and 4 rpc nodes that are peering and synced with the relay chain.&#xD;&#xA;They run inside docker containers in different virtual machines. We wanted to add a single collator node to this set, by specifying as bootNodes the four rpc nodes of the network. But for some reason, the collator node won't see any peers. I can confirm that the ProtocolId and the version of the nodes is the same (v0.9.24).&#xD;&#xA;&#xD;&#xA;The RPC nodes are running with the following parameters (some were skipped):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--allow-private-ipv4 --unsafe-ws-external --rpc-cors all&#xD;&#xA;--rpc-external --rpc-methods Unsafe&#xD;&#xA;--enable-offchain-indexing=TRUE&#xD;&#xA;--ws-port 8844 --port 30335 --rpc-port 9955&#xD;&#xA;--chain chain_spec_raw.json --execution=wasm&#xD;&#xA;--node-key-file node-key-file.txt&#xD;&#xA;--&#xD;&#xA;--port 30334 --chain kusama.json&#xD;&#xA;--execution=wasm --unsafe-pruning&#xD;&#xA;--pruning=256&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;When running our collator node, basically with similar parameters but indicating `--collator`, the node doesn't find any peer. I tried adding `-lsync=debug` to see what information could we get regarding not finding any peers (the bootNodes exist, and they are running), and what I found is a flood of messages like these:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-10-20 15:16:44.215 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWB1ctQt4yhs5CTzKArW9TgWbVdY2z5BLw6SPbTSed45YY    &#xD;&#xA;2022-10-20 15:16:44.215 DEBUG tokio-runtime-worker sync: 12D3KooWB1ctQt4yhs5CTzKArW9TgWbVdY2z5BLw6SPbTSed45YY disconnected    &#xD;&#xA;2022-10-20 15:16:44.228 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWQBrCAKiXydGW4Ab2J9X29Bvd6V54Awvzj8BWAi2xXQ22    &#xD;&#xA;2022-10-20 15:16:44.228 DEBUG tokio-runtime-worker sync: 12D3KooWQBrCAKiXydGW4Ab2J9X29Bvd6V54Awvzj8BWAi2xXQ22 disconnected    &#xD;&#xA;2022-10-20 15:16:44.238 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWJzrRnu9So3JfPaBcfYUuzERrL6712aLoGfW4YQzAURmB    &#xD;&#xA;2022-10-20 15:16:44.238 DEBUG tokio-runtime-worker sync: 12D3KooWJzrRnu9So3JfPaBcfYUuzERrL6712aLoGfW4YQzAURmB disconnected    &#xD;&#xA;2022-10-20 15:16:44.238 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWP51x2EsLiNssP61JVHJCgGDqLpCCkZMFBVFRE95xAfSy    &#xD;&#xA;2022-10-20 15:16:44.238 DEBUG tokio-runtime-worker sync: 12D3KooWP51x2EsLiNssP61JVHJCgGDqLpCCkZMFBVFRE95xAfSy disconnected    &#xD;&#xA;2022-10-20 15:16:44.254 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWGFiLPZ7dE3Arx3TWAdweTCKwYwkxpkJ33REbpvrU5p6v    &#xD;&#xA;2022-10-20 15:16:44.254 DEBUG tokio-runtime-worker sync: 12D3KooWGFiLPZ7dE3Arx3TWAdweTCKwYwkxpkJ33REbpvrU5p6v disconnected    &#xD;&#xA;2022-10-20 15:16:44.259 DEBUG tokio-runtime-worker sync: Too many full nodes, rejecting 12D3KooWHRABR98BfKMbKp6J4dMuSRNCdMsCTGJ9sovQxA8XjbPg &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What does it mean that there are too many full nodes, while our node has 0 peers?&#xD;&#xA;What could be the reason that the network is rejecting the new node?&#xD;&#xA;Do you know about other levels of logging or filtering that we can use to tackle down the problem here?&#xD;&#xA;&#xD;&#xA;EDIT: Adding more logs first 100 lines with debug level (https://logpaste.com/jd8tbxaB) and here maybe some relevant logs grepping by warning messages (https://logpaste.com/eaFlkjVJ)&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20611" PostHistoryTypeId="2" PostId="5478" RevisionGUID="a1584c1e-6f87-45c9-a4fe-cf67c4436e9b" CreationDate="2022-10-21T10:00:24.167" UserId="3309" Text="The HTTP RPC url is what you want, which is what you see at the beginning of the logs. By default this is localhost and port 9933, but you can change this with the flag `--rpc-port`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;In terms of chainId, if you just want to connect to it, you can just enter whatever you like and it'll publish what ChainId is detected at that address:&#xD;&#xA; &#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;However if you are interested on where this is derived, it depends on your implementation. e.g. for moonbeam: https://github.com/PureStake/moonbeam/blob/6d7206efed3892e8a371666104c33b3113b57eaa/runtime/moonbeam/src/lib.rs#L237&#xD;&#xA;&#xD;&#xA;and here for astar:     &#xD;&#xA;https://github.com/AstarNetwork/Astar/blob/5d58da413005db8e61a53673507c0e502e22e646/runtime/astar/src/lib.rs#L683&#xD;&#xA;&#xD;&#xA;------------&#xD;&#xA;Note: If you are trying to connect your metamask to a node not on the same machine, you'll need to use the flag `--rpc-external` to accept connections from a different IP.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Qqkvq.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/MQaQy.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20613" PostHistoryTypeId="2" PostId="5479" RevisionGUID="7e809eec-47ed-467a-a68d-4c05d2f7845a" CreationDate="2022-10-21T11:04:53.890" UserId="1914" Text="At the time of creating the user and keys, I need a way to add a field or fields related to this particular blockchain network, such as role.&#xD;&#xA;Is there a solution?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20615" PostHistoryTypeId="1" PostId="5479" RevisionGUID="7e809eec-47ed-467a-a68d-4c05d2f7845a" CreationDate="2022-10-21T11:04:53.890" UserId="1914" Text="Add additional information for substrate user account" ContentLicense="CC BY-SA 4.0" />
  <row Id="20616" PostHistoryTypeId="3" PostId="5479" RevisionGUID="7e809eec-47ed-467a-a68d-4c05d2f7845a" CreationDate="2022-10-21T11:04:53.890" UserId="1914" Text="|account|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20617" PostHistoryTypeId="2" PostId="5480" RevisionGUID="64c4455b-0fde-45a6-925e-a169e28fa44c" CreationDate="2022-10-21T12:32:01.363" UserId="2844" Text="I recently update `Swanky Suite` latest version `@astar-network/swanky-cli/0.2.1 darwin-x64 node-v16.14.0`. I create new project with `swanky init my_project` but throws `Error Installing dependencies`. Is there any issue in latest release? or I am doing something wrong? I also compile the project and error `Error: command compile not found`.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/T0Lob.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20619" PostHistoryTypeId="1" PostId="5480" RevisionGUID="64c4455b-0fde-45a6-925e-a169e28fa44c" CreationDate="2022-10-21T12:32:01.363" UserId="2844" Text="Error Installing dependencies on Swanky project init" ContentLicense="CC BY-SA 4.0" />
  <row Id="20620" PostHistoryTypeId="3" PostId="5480" RevisionGUID="64c4455b-0fde-45a6-925e-a169e28fa44c" CreationDate="2022-10-21T12:32:01.363" UserId="2844" Text="|ink|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20621" PostHistoryTypeId="2" PostId="5481" RevisionGUID="6e5a061a-5057-4b4d-ac9f-dc73d3f0c5e7" CreationDate="2022-10-21T12:53:49.240" UserId="3254" Text="    ReferenceError: window is not defined&#xD;&#xA;&#xD;&#xA;I reload my browser, I get the error shown in the attached image.&#xD;&#xA;&#xD;&#xA;However, once I disable bellow imports, the screen works fine.&#xD;&#xA;&#xD;&#xA;And also error message say that bellow code is related.&#xD;&#xA;`node_modules/@polkadot/extension-dapp/bundle.js:10:13`&#xD;&#xA;&#xD;&#xA;`@polkadot/extension-dapp`&#xD;&#xA;&#xD;&#xA;`@polkadot/identicon`&#xD;&#xA;&#xD;&#xA;If anyone has a kind mind, please see repo.&#xD;&#xA;&#xD;&#xA;https://github.com/Interoperable-swap/frontend/issues/2&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/EbNVi.png&#xD;&#xA;&#xD;&#xA;*Using:Next.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="20623" PostHistoryTypeId="1" PostId="5481" RevisionGUID="6e5a061a-5057-4b4d-ac9f-dc73d3f0c5e7" CreationDate="2022-10-21T12:53:49.240" UserId="3254" Text="'window is not defined' issue when I integrate polkadot{js} extension into my dapp" ContentLicense="CC BY-SA 4.0" />
  <row Id="20624" PostHistoryTypeId="3" PostId="5481" RevisionGUID="6e5a061a-5057-4b4d-ac9f-dc73d3f0c5e7" CreationDate="2022-10-21T12:53:49.240" UserId="3254" Text="|polkadot-js|polkadot|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20625" PostHistoryTypeId="2" PostId="5482" RevisionGUID="f2cf0296-8353-4a51-903e-bef84fb8df7d" CreationDate="2022-10-21T13:03:07.777" UserId="1876" Text="Only dependency is swanky itself. Can you check the package.json in the newly created project, and what happens if you run `yarn` (`npm i`) manually?&#xD;&#xA;&#xD;&#xA;The compile command has been updated. It is now under `contract` command.&#xD;&#xA;So the correct way to call it is:&#xD;&#xA;`swanky contract compile flipper`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20627" PostHistoryTypeId="2" PostId="5483" RevisionGUID="e8e6fd8a-5489-44c8-a5ce-5d1d1dd87c02" CreationDate="2022-10-21T13:08:49.803" UserId="19" Text="I had the same issue. Upgrade your NodeJS version to `v18.10.0`.&#xD;&#xA;&#xD;&#xA;You can also look at [the pull request][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AstarNetwork/swanky-cli/pull/23" ContentLicense="CC BY-SA 4.0" />
  <row Id="20629" PostHistoryTypeId="2" PostId="5484" RevisionGUID="12988902-52c9-48b2-bd5f-76779c8d8ac0" CreationDate="2022-10-21T13:26:18.313" UserId="427" Text="As a substrate developer I have gained some experience in writing pallets, benchmarking extrinsincs and aggregating those to the runtime. But now I wanted to understand the system very deeply. I am confused about the code flow. From where the execution starts, which pallet uses which pallets, how node is coded, what is the entire flow look like?&#xD;&#xA;&#xD;&#xA;Can anyone put some guidance on this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20631" PostHistoryTypeId="1" PostId="5484" RevisionGUID="12988902-52c9-48b2-bd5f-76779c8d8ac0" CreationDate="2022-10-21T13:26:18.313" UserId="427" Text="Complete code flow understanding of substrate and frame pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="20632" PostHistoryTypeId="3" PostId="5484" RevisionGUID="12988902-52c9-48b2-bd5f-76779c8d8ac0" CreationDate="2022-10-21T13:26:18.313" UserId="427" Text="|substrate-node|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20633" PostHistoryTypeId="2" PostId="5485" RevisionGUID="3121ca49-02f9-4e60-892c-d6e1247b8717" CreationDate="2022-10-21T14:09:37.550" UserId="1959" Text="In fact, when you send a cross-chain message, you actually want to either transfer the token or call the method on target chain. &#xD;&#xA;&#xD;&#xA;As you said **customized message**, what do you want the message to do after it reaches the target chain? Call a function with it as an argument? If so, you could use the `transact` instruction in XCM. " ContentLicense="CC BY-SA 4.0" />
  <row Id="20635" PostHistoryTypeId="2" PostId="5486" RevisionGUID="fcc769d8-060d-4e2c-9783-9cf58873aa3b" CreationDate="2022-10-21T14:16:06.293" UserId="110" Text="I solved the problem, and it was related to the multiaddress specification of the bootNodes in the chain spec.&#xD;&#xA;&#xD;&#xA;I specified them as&#xD;&#xA;```&#xD;&#xA;/dns4/penrpc-kus-00.pendulumchain.tech/tcp/30335/p2p/12D3KooWPNRRYr8XZpPrjbugepo48PLF5URFoDh1epT5oRfNRQ8E&#xD;&#xA;```&#xD;&#xA;but apparently the correct form was to add the ws protocol also  like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/dns4/penrpc-kus-00.pendulumchain.tech/tcp/30335/ws/p2p/12D3KooWPNRRYr8XZpPrjbugepo48PLF5URFoDh1epT5oRfNRQ8E&#xD;&#xA;```&#xD;&#xA;It's the first time I see this on a node, in general `p2p` is enough. I only found out by taking a look at the exposed address of one of the RPC nodes.&#xD;&#xA;&#xD;&#xA;Can it be that the way they are constructed depends on parameters like `--unsafe-rpc-external` or `--unsafe-ws-external`?  " ContentLicense="CC BY-SA 4.0" />
  <row Id="20637" PostHistoryTypeId="5" PostId="5485" RevisionGUID="3564fdaf-2284-492b-afd1-782bb8893ef3" CreationDate="2022-10-21T15:05:58.023" UserId="1959" Comment="added 445 characters in body" Text="In fact, when you send a cross-chain message, you actually want to either transfer the token or call the method on target chain. &#xD;&#xA;&#xD;&#xA;As you said **customized message**, what do you want the message to do after it reaches the target chain? Call a function with it as an argument? If so, you could use the `transact` instruction in XCM. &#xD;&#xA;&#xD;&#xA;For example: Send XCM to Polkadot and call `remark` on Polkadot with customized message &quot;hello world&quot; as parameter.&#xD;&#xA;&#xD;&#xA;1. Get the encoded call data `0x00012c68656c6c6f20776f726c64`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;2. Send XCM to Polkadot via `polkadotXcm.send`&#xD;&#xA;```&#xD;&#xA;WithdrawAsset(...)&#xD;&#xA;BuyExecution(...)&#xD;&#xA;Transact(0x00012c68656c6c6f20776f726c64) &#xD;&#xA;RefundSurplus&#xD;&#xA;DepositAsset(...)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Z7Z8E.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20638" PostHistoryTypeId="2" PostId="5487" RevisionGUID="f2852c77-796e-4a8f-8e0e-296329ee9b92" CreationDate="2022-10-21T15:15:52.117" UserId="2383" Text="The length limit for each block in Polkadot is set to 5Mb as seen [in the code](https://github.com/paritytech/polkadot/blob/e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4/runtime/common/src/lib.rs#L112).&#xD;&#xA;&#xD;&#xA;But why exactly 5Mb? Could you point me to the decision process or the benchmark results for that exact value?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="20640" PostHistoryTypeId="1" PostId="5487" RevisionGUID="f2852c77-796e-4a8f-8e0e-296329ee9b92" CreationDate="2022-10-21T15:15:52.117" UserId="2383" Text="Why is 5MB the limit for the block length?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20641" PostHistoryTypeId="3" PostId="5487" RevisionGUID="f2852c77-796e-4a8f-8e0e-296329ee9b92" CreationDate="2022-10-21T15:15:52.117" UserId="2383" Text="|polkadot|block|block-size|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20642" PostHistoryTypeId="2" PostId="5488" RevisionGUID="3f1480ce-ee67-4368-920a-97dc90a52645" CreationDate="2022-10-21T15:20:50.960" UserId="341" Text="While Alex Bean's answer would be perfectly right if things were running normally, in this particular case, the question was asked because something went wrong, while using the latest node-template v9.30&#xD;&#xA;&#xD;&#xA;The issue here is that the `RuntimeEvent` could not be decoded by the api, and hence the UI. Because of this the Error event could also not be decoded and the UI was therefore only showing the green notification that the extrinsic was in a block, but NOT followed by any subsequent red notification, that would mean that something went wrong at run time. This is something that will be dealt with in [the pjs api level][1], or when node-template uses weight v2.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/issues/8259" ContentLicense="CC BY-SA 4.0" />
  <row Id="20644" PostHistoryTypeId="2" PostId="5489" RevisionGUID="e7f98a8f-4a2a-4d59-b4ef-3c8a3c00e49e" CreationDate="2022-10-21T15:46:47.233" UserId="29" Text="The formal definition and reasoning can be found in W3F's Polkadot spec, specifically Definition 158 on Block Limits:&#xD;&#xA;&#xD;&#xA;- https://spec.polkadot.network/#defn-polkadot-block-limits&#xD;&#xA;&#xD;&#xA;And more info from Web3 Foundation's research can be found here:&#xD;&#xA;- https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#limits-on-resource-usage" ContentLicense="CC BY-SA 4.0" />
  <row Id="20650" PostHistoryTypeId="2" PostId="5491" RevisionGUID="cfb08fe1-ee03-4353-a7a3-76ea0f3bbb64" CreationDate="2022-10-21T17:01:10.130" UserId="2264" Text="This makes absolutely no sense, but maybe someone has a good suggestion.&#xD;&#xA;&#xD;&#xA;We wrote our own client implementation to send extrinsics to a Substrate chain and it has been working fine, until just today, when I changed a string to be longer in the pallet call parameters.&#xD;&#xA;&#xD;&#xA;The extrinsic started failing with error code 1010 `BadProof` (invalid signature) all of a sudden.&#xD;&#xA;&#xD;&#xA;I managed to validate all the data again, against the Polkadot UI and the payload is fine. But, once the string gets long enough that it makes the signed payload longer than 256 bytes, the error shows up again.&#xD;&#xA;&#xD;&#xA;Under the hood, we use the `schnorrkel` Rust package to sign, but looking at the code I saw nothing about size limits.&#xD;&#xA;&#xD;&#xA;Any ideas?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20652" PostHistoryTypeId="1" PostId="5491" RevisionGUID="cfb08fe1-ee03-4353-a7a3-76ea0f3bbb64" CreationDate="2022-10-21T17:01:10.130" UserId="2264" Text="Sending extrinsic fails when signed payload goes over 256 bytes" ContentLicense="CC BY-SA 4.0" />
  <row Id="20653" PostHistoryTypeId="3" PostId="5491" RevisionGUID="cfb08fe1-ee03-4353-a7a3-76ea0f3bbb64" CreationDate="2022-10-21T17:01:10.130" UserId="2264" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20654" PostHistoryTypeId="2" PostId="5492" RevisionGUID="d97cdf7a-1a98-4c46-9678-db0981442d44" CreationDate="2022-10-21T17:41:21.227" UserId="620" Text="When the payload is more than 256 bytes, you need to sign the Blake2-256 hash of the data to sign.&#xD;&#xA;&#xD;&#xA;Ref: https://github.com/paritytech/substrate/blob/9a6d706/primitives/runtime/src/generic/unchecked_extrinsic.rs#L207L224&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;Call, Extra&gt; Encode for SignedPayload&lt;Call, Extra&gt;&#xD;&#xA;where&#xD;&#xA;	Call: Encode,&#xD;&#xA;	Extra: SignedExtension,&#xD;&#xA;{&#xD;&#xA;	/// Get an encoded version of this payload.&#xD;&#xA;	///&#xD;&#xA;	/// Payloads longer than 256 bytes are going to be `blake2_256`-hashed.&#xD;&#xA;	fn using_encoded&lt;R, F: FnOnce(&amp;[u8]) -&gt; R&gt;(&amp;self, f: F) -&gt; R {&#xD;&#xA;		self.0.using_encoded(|payload| {&#xD;&#xA;			if payload.len() &gt; 256 {&#xD;&#xA;				f(&amp;blake2_256(payload)[..])&#xD;&#xA;			} else {&#xD;&#xA;				f(payload)&#xD;&#xA;			}&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20656" PostHistoryTypeId="2" PostId="5493" RevisionGUID="6c513184-3e54-42c0-9a79-8cf209c7c1d3" CreationDate="2022-10-21T20:05:37.673" UserId="29" Text="In the [Polkadot Staking Dashboard](https://staking.polkadot.network) it says:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/WJTBq.png)&#xD;&#xA;&#xD;&#xA;But then under [Nominate](https://staking.polkadot.network/#/nominate) it specifies the minimum active bond as 171.832 DOTs:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/bCAsi.png)&#xD;&#xA;&#xD;&#xA;What is the difference between the 10 DOT minimum and the minimum active bond?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20658" PostHistoryTypeId="1" PostId="5493" RevisionGUID="6c513184-3e54-42c0-9a79-8cf209c7c1d3" CreationDate="2022-10-21T20:05:37.673" UserId="29" Text="What is the difference between minimum nominator bonding amount and minimum active bond?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20659" PostHistoryTypeId="3" PostId="5493" RevisionGUID="6c513184-3e54-42c0-9a79-8cf209c7c1d3" CreationDate="2022-10-21T20:05:37.673" UserId="29" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20660" PostHistoryTypeId="52" PostId="5480" RevisionGUID="f63cc314-6792-4eba-ba32-7a1112db5372" CreationDate="2022-10-21T20:37:17.147" />
  <row Id="20662" PostHistoryTypeId="2" PostId="5494" RevisionGUID="7a3b5672-5943-4228-9e1b-736712a8ba13" CreationDate="2022-10-21T22:02:05.657" UserId="165" Text="[minimum nominator bond](https://github.com/paritytech/substrate/blob/1802a115e8480fd7a4654d45c85b58c2189c508a/frame/staking/src/pallet/mod.rs#L288-L290) is the balance needs at least to be able to start nominating. This one being configured at runtime level.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Whereas minimum active bond refers to, based on the actual state of the whole nominations, how much stake you will need to nominate to start seeing rewards.&#xD;&#xA;As per that page description:&#xD;&#xA;&#xD;&#xA;&gt; The minimum active bond statistic is the minimum DOT being bonded by a nominator for the current era.&#xD;&#xA;&#xD;&#xA;Nomination pools address this to offer a easier experience.&#xD;&#xA;&#xD;&#xA;Some more concrete details from [proposal#1224](https://polkadot.polkassembly.io/post/1224)&#xD;&#xA;&#xD;&#xA;&gt; First, let’s recap on the current status quo: Currently, nominators&#xD;&#xA;&gt; can freely set their intention to nominate in Polkadot, as long as&#xD;&#xA;&gt; they meet two limits: a minimum of 10 DOTs is staked, and a maximum of&#xD;&#xA;&gt; 50_000 nominators is not filled. This creates a nomination market,&#xD;&#xA;&gt; where in every era, the top 22_500 nominators from this open market&#xD;&#xA;&gt; are chosen to participate in the election process, and possibly&#xD;&#xA;&gt; receive staking rewards (if other conditions like over-subscription&#xD;&#xA;&gt; are not met).&#xD;&#xA;&gt; &#xD;&#xA;&gt;     This is a complicated and involved process. Nomination pools are exactly here to combat this and provide a simpler experience for&#xD;&#xA;&gt; DOT-holders to participate in staking.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Based on this, let’s cluster Polkadot nominators into two groups:&#xD;&#xA;&gt; active (in the top 22500), and waiting. The main concern at this point&#xD;&#xA;&gt; is to&#xD;&#xA;&gt; &#xD;&#xA;&gt; 1. Encourage all existing waiting nominators to join pools. This is mainly a task for the Wallet/UI development ecosystem, and is beyond&#xD;&#xA;&gt; the scope of this discussion.&#xD;&#xA;&gt; 2. Prevent too many waiting nominators to be created. The reason being that I speculate that most of these nominators have erroneously&#xD;&#xA;&gt; in the waiting queue, and prefer joining pools instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="20664" PostHistoryTypeId="2" PostId="5495" RevisionGUID="ffc827cc-01e3-4ca4-a0ee-fe348d76095b" CreationDate="2022-10-21T22:29:50.140" UserId="165" Text="Aside from pointing your node to use the db dir of your previous collator keep in mind that you can also use `export-state` subcommand to generate a chainspec based on that db state, and from there you can generate genesis wasm and genesis state if needed. " ContentLicense="CC BY-SA 4.0" />
  <row Id="20666" PostHistoryTypeId="50" PostId="4939" RevisionGUID="47108065-02c6-4f59-9baa-f094c8f9bccd" CreationDate="2022-10-21T23:07:25.863" UserId="-1" />
  <row Id="20667" PostHistoryTypeId="50" PostId="4937" RevisionGUID="dbbc2df7-a9d8-4628-8d6d-bddc4a94ffa7" CreationDate="2022-10-22T01:01:25.147" UserId="-1" />
  <row Id="20668" PostHistoryTypeId="52" PostId="5491" RevisionGUID="cbb008c7-50de-4bb8-afc7-8683d07eecb3" CreationDate="2022-10-22T01:03:34.443" />
  <row Id="20670" PostHistoryTypeId="2" PostId="5496" RevisionGUID="6bcba13e-e6b7-4369-bea7-6a807a9c5496" CreationDate="2022-10-22T08:01:44.537" UserId="2565" Text="I am using Cumulus SDK for my parachain.  Works well, but I need to be able to upload smart contracts into my parachain.  How can I do this, Cumulus polkadot-parachain does not have smart contracts." ContentLicense="CC BY-SA 4.0" />
  <row Id="20672" PostHistoryTypeId="1" PostId="5496" RevisionGUID="6bcba13e-e6b7-4369-bea7-6a807a9c5496" CreationDate="2022-10-22T08:01:44.537" UserId="2565" Text="How to add smart contracts support in parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20673" PostHistoryTypeId="3" PostId="5496" RevisionGUID="6bcba13e-e6b7-4369-bea7-6a807a9c5496" CreationDate="2022-10-22T08:01:44.537" UserId="2565" Text="|polkadot|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20674" PostHistoryTypeId="2" PostId="5497" RevisionGUID="2af96984-060e-4636-a3bf-a07aee1ea3c7" CreationDate="2022-10-22T10:51:22.970" UserId="3127" Text="In the Substrate tutorials you can find the [guide][1] on adding the `pallet-contracts` to the runtime. Then you can use polkadot-js-apps to upload contract code. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/" ContentLicense="CC BY-SA 4.0" />
  <row Id="20676" PostHistoryTypeId="2" PostId="5498" RevisionGUID="01bf5d79-2453-48cc-998c-3362a38a3bc1" CreationDate="2022-10-22T11:18:32.970" UserId="3000" Text="I write codes for add item in storage but when I run this command `cargo build --release` it show me this error : &#xD;&#xA;&#xD;&#xA;&gt;&#xD;&#xA;&#xD;&#xA;    error[E0308]: `match` arms have incompatible types&#xD;&#xA;         --&gt; /home/kianoush/projects/dortaj_pay/pallets/bussines/src/lib.rs:248:6&#xD;&#xA;          |&#xD;&#xA;      230 | /             match _itemInfo{&#xD;&#xA;      231 | |                 _ =&gt; Err(&lt;Error&lt;T&gt;&gt;::StoreItemNotFound),&#xD;&#xA;          | |                      ---------------------------------- this is found to be of type `Result&lt;_, pallet::Error&lt;T&gt;&gt;`&#xD;&#xA;      232 | |                 Some(item) =&gt; {&#xD;&#xA;      233 | |                     let user_basket_item = UserBasketItemItem {&#xD;&#xA;      ...   |&#xD;&#xA;      248 | |                     &lt;Baskets&lt;T&gt;&gt;::insert(storeId, store_basket);&#xD;&#xA;          | |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`&#xD;&#xA;      249 | |                 }&#xD;&#xA;      250 | |             }&#xD;&#xA;          | |_____________- `match` arms have incompatible types&#xD;&#xA;          |&#xD;&#xA;          = note:   expected enum `Result&lt;_, pallet::Error&lt;T&gt;&gt;`&#xD;&#xA;                  found unit type `()`&#xD;&#xA;      note: return type inferred to be `Result&lt;_, pallet::Error&lt;T&gt;&gt;` here&#xD;&#xA;&#xD;&#xA;this is my code : &#xD;&#xA;&#xD;&#xA;    match _itemInfo{&#xD;&#xA;				None =&gt; Err(&lt;Error&lt;T&gt;&gt;::StoreItemNotFound),&#xD;&#xA;				Some(item) =&gt; {&#xD;&#xA;					let user_basket_item = UserBasketItemItem {&#xD;&#xA;						itemId: item_id,&#xD;&#xA;						price: item.price,&#xD;&#xA;						count: count_item,&#xD;&#xA;					};&#xD;&#xA;&#xD;&#xA;					let mut add_item: Vec&lt;UserBasketItemItem&gt; = Vec::new();&#xD;&#xA;					add_item.push(user_basket_item);&#xD;&#xA;&#xD;&#xA;					let store_basket = Basket {&#xD;&#xA;						itemId: Self::gen_dna(),&#xD;&#xA;						confirmPay: false,&#xD;&#xA;						customerPay: false,&#xD;&#xA;						items: add_item,&#xD;&#xA;					};&#xD;&#xA;					&lt;Baskets&lt;T&gt;&gt;::insert(storeId, store_basket);&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;**what is the problem ? how can i solve that ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="20678" PostHistoryTypeId="1" PostId="5498" RevisionGUID="01bf5d79-2453-48cc-998c-3362a38a3bc1" CreationDate="2022-10-22T11:18:32.970" UserId="3000" Text="expected enum `Result&lt;_, pallet::Error&lt;T&gt;&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="20679" PostHistoryTypeId="3" PostId="5498" RevisionGUID="01bf5d79-2453-48cc-998c-3362a38a3bc1" CreationDate="2022-10-22T11:18:32.970" UserId="3000" Text="|substrate-node|polkadot|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20682" PostHistoryTypeId="5" PostId="5498" RevisionGUID="008e6852-2f1c-4f4f-b1b2-9b570c45889e" CreationDate="2022-10-22T11:43:09.433" UserId="251" Comment="deleted 109 characters in body" Text="I write codes for add item in storage but when I run this command `cargo build --release` it show me this error : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0308]: `match` arms have incompatible types&#xD;&#xA;     --&gt; /home/kianoush/projects/dortaj_pay/pallets/bussines/src/lib.rs:248:6&#xD;&#xA;      |&#xD;&#xA;  230 | /             match _itemInfo{&#xD;&#xA;  231 | |                 _ =&gt; Err(&lt;Error&lt;T&gt;&gt;::StoreItemNotFound),&#xD;&#xA;      | |                      ---------------------------------- this is found to be of type `Result&lt;_, pallet::Error&lt;T&gt;&gt;`&#xD;&#xA;  232 | |                 Some(item) =&gt; {&#xD;&#xA;  233 | |                     let user_basket_item = UserBasketItemItem {&#xD;&#xA;  ...   |&#xD;&#xA;  248 | |                     &lt;Baskets&lt;T&gt;&gt;::insert(storeId, store_basket);&#xD;&#xA;      | |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`&#xD;&#xA;  249 | |                 }&#xD;&#xA;  250 | |             }&#xD;&#xA;      | |_____________- `match` arms have incompatible types&#xD;&#xA;      |&#xD;&#xA;      = note:   expected enum `Result&lt;_, pallet::Error&lt;T&gt;&gt;`&#xD;&#xA;              found unit type `()`&#xD;&#xA;  note: return type inferred to be `Result&lt;_, pallet::Error&lt;T&gt;&gt;` here&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;this is my code : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;match _itemInfo{&#xD;&#xA;	None =&gt; Err(&lt;Error&lt;T&gt;&gt;::StoreItemNotFound),&#xD;&#xA;	Some(item) =&gt; {&#xD;&#xA;		let user_basket_item = UserBasketItemItem {&#xD;&#xA;			itemId: item_id,&#xD;&#xA;			price: item.price,&#xD;&#xA;			count: count_item,&#xD;&#xA;		};&#xD;&#xA;&#xD;&#xA;		let mut add_item: Vec&lt;UserBasketItemItem&gt; = Vec::new();&#xD;&#xA;		add_item.push(user_basket_item);&#xD;&#xA;&#xD;&#xA;		let store_basket = Basket {&#xD;&#xA;			itemId: Self::gen_dna(),&#xD;&#xA;			confirmPay: false,&#xD;&#xA;			customerPay: false,&#xD;&#xA;			items: add_item,&#xD;&#xA;		};&#xD;&#xA;		&lt;Baskets&lt;T&gt;&gt;::insert(storeId, store_basket);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**what is the problem ? how can i solve that ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="20685" PostHistoryTypeId="6" PostId="5498" RevisionGUID="008e6852-2f1c-4f4f-b1b2-9b570c45889e" CreationDate="2022-10-22T11:43:09.433" UserId="251" Comment="deleted 109 characters in body" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20687" PostHistoryTypeId="2" PostId="5500" RevisionGUID="786a0d6a-3789-4021-853c-9e0c0a2555dd" CreationDate="2022-10-22T11:49:10.330" UserId="251" Text="```&#xD;&#xA;`match` arms have incompatible types&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;That's the reason. This is a pure Rust problem. So, I edited the tags.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let foo = match bar {&#xD;&#xA;  &quot;baz&quot; =&gt; Err(()),&#xD;&#xA;  // The previous return type is a `Result`, so you also need to return a `Result` here&#xD;&#xA;  &quot;qux&quot; =&gt; Ok(()),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let foo = match bar {&#xD;&#xA;  // If you want to ignore the `Result`, make it returning empty here&#xD;&#xA;  &quot;baz&quot; =&gt; { Err(()); }&#xD;&#xA;  &quot;qux&quot; =&gt; (),&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20689" PostHistoryTypeId="2" PostId="5501" RevisionGUID="9d49df64-e9a3-4797-b6c5-a62d5edc316d" CreationDate="2022-10-22T13:33:21.967" UserId="3265" Text="I receive:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   Compiling pallet-assets v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.30#a3ed0119)&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;   --&gt; /Users/chp/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/frame/assets/src/functions.rs:673:46&#xD;&#xA;    |&#xD;&#xA;673 |         let mut dead_accounts: Vec&lt;T::AccountId&gt; = vec![];&#xD;&#xA;    |                                                    ^^^&#xD;&#xA;    |&#xD;&#xA;    = note: consider importing one of these items:&#xD;&#xA;            codec::alloc::vec&#xD;&#xA;            scale_info::prelude::vec&#xD;&#xA;            sp_std::vec&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when I add pallet-assets.&#xD;&#xA;&#xD;&#xA;Is this an error in my code? It feels like it is in the pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="20691" PostHistoryTypeId="1" PostId="5501" RevisionGUID="9d49df64-e9a3-4797-b6c5-a62d5edc316d" CreationDate="2022-10-22T13:33:21.967" UserId="3265" Text="Cannot compile pallet_assets" ContentLicense="CC BY-SA 4.0" />
  <row Id="20692" PostHistoryTypeId="3" PostId="5501" RevisionGUID="9d49df64-e9a3-4797-b6c5-a62d5edc316d" CreationDate="2022-10-22T13:33:21.967" UserId="3265" Text="|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20693" PostHistoryTypeId="5" PostId="5472" RevisionGUID="414940f6-8809-4c8e-8ee4-8080c45ded50" CreationDate="2022-10-22T13:59:55.003" UserId="3344" Comment="added 276 characters in body" Text="I'll add more as come across information:&#xD;&#xA;&#xD;&#xA;- Costs/tradeoffs&#xD;&#xA;  - [Time in the network is measured in (*finalized*?) blocks](https://github.com/paritytech/substrate/blob/61b9a4d1a8a9bf39c1d89a8dd02f82785c10860c/bin/node-template/runtime/src/lib.rs#L125). So &quot;time&quot; would stand still.&#xD;&#xA;     - [A session is...measured in block numbers](https://github.com/paritytech/substrate/blob/03c2c2fe44b405c4b84561cc2c65e5cf7d2c263a/frame/session/README.md#terminology)&#xD;&#xA;     - [In the optimistic scenario, the latency for this message should be at least two blocks...](https://wiki.polkadot.network/docs/learn-parachains)&#xD;&#xA;  - [Polkadot block size is a maximum 5MB](https://github.com/paritytech/polkadot/blob/e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4/runtime/common/src/lib.rs#L112)&#xD;&#xA;    - [More Polkadot limits set out here](https://spec.polkadot.network/#defn-polkadot-block-limits)&#xD;&#xA;    - [Some reasoning here](https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#limits-on-resource-usage)&#xD;&#xA;  - Substrate..." ContentLicense="CC BY-SA 4.0" />
  <row Id="20694" PostHistoryTypeId="2" PostId="5502" RevisionGUID="36e2a386-d995-469b-97a5-90baeeda66bf" CreationDate="2022-10-22T14:57:31.853" UserId="94" Text="Please ensure that your `Cargo.toml` adds the pallet with the correct features:  &#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;# Default features are disabled.&#xD;&#xA;pallet-assets = { git = &quot;https://github.com/paritytech/substrate&quot;, default-features = false, branch = &quot;polkadot-v0.9.31&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [ &quot;std&quot; ]&#xD;&#xA;std = [ &quot;pallet-assets/std&quot; ]&#xD;&#xA;runtime-benchmarks = [ &quot;pallet-assets&quot; ]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20696" PostHistoryTypeId="6" PostId="5498" RevisionGUID="b5545b95-937b-4b12-8150-a80ac929c5cc" CreationDate="2022-10-22T17:49:14.677" UserId="3000" Comment="edited tags" Text="|substrate-node|polkadot|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20697" PostHistoryTypeId="50" PostId="4376" RevisionGUID="06562ee6-4f2e-4f76-9a9f-d549b7b11e8d" CreationDate="2022-10-23T03:01:55.203" UserId="-1" />
  <row Id="20698" PostHistoryTypeId="2" PostId="5503" RevisionGUID="edf8af25-be3a-4628-b53e-4a79686ab58e" CreationDate="2022-10-23T10:03:09.113" UserId="1820" Text="Here is the scenario:&#xD;&#xA;&#xD;&#xA;You get X DOT in vested transfer (with schedule A) and you stake them and compound the rewards (transferable = 0). After some time, you have X + Y staked and you get another Z DOT in vested transfer (with schedule B), where Z &gt; X + Y. What you would expect to happen is:&#xD;&#xA;&#xD;&#xA;- Total locked = Z + X + Y (i.e. the whole balance and transferable is still zero)&#xD;&#xA;- 3 locks: X with vesting schedule A, Z with vesting schedule B, and X + Y for staking&#xD;&#xA;&#xD;&#xA;However, what happens is:&#xD;&#xA;&#xD;&#xA;- Total locked = Z + X&#xD;&#xA;- Transferable = Y&#xD;&#xA;- 3 locks as above&#xD;&#xA;&#xD;&#xA;So, the user basically gets a &quot;free&quot; unstake of their staking rewards thus far (Y). As far as I can tell there's no security risk, since the total staked amount is still `X + Y` and the user can be slashed for that amount. In the case of a 100% slash, the excess will effectively be &quot;taken&quot; from Z, and they'll end up with vested balance of `Z - X - Y`, as they should.&#xD;&#xA;&#xD;&#xA;However, is this the expected behavior? Because it was unexpected for me.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20700" PostHistoryTypeId="1" PostId="5503" RevisionGUID="edf8af25-be3a-4628-b53e-4a79686ab58e" CreationDate="2022-10-23T10:03:09.113" UserId="1820" Text="When a vested transfer is sent to an account with vested and staked funds, the rewards become transferable. Is this expected?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20701" PostHistoryTypeId="3" PostId="5503" RevisionGUID="edf8af25-be3a-4628-b53e-4a79686ab58e" CreationDate="2022-10-23T10:03:09.113" UserId="1820" Text="|staking|vesting-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20702" PostHistoryTypeId="50" PostId="2129" RevisionGUID="f3764c7d-d800-4608-8e78-d484e0800bb8" CreationDate="2022-10-23T11:03:50.443" UserId="-1" />
  <row Id="20703" PostHistoryTypeId="2" PostId="5504" RevisionGUID="9f865231-0a14-419e-9ec8-30f725670c75" CreationDate="2022-10-23T12:33:31.780" UserId="3319" Text="I am trying to execute some logic whenever a block is received, specifically i want to create custom transactions validation of a received block.&#xD;&#xA;&#xD;&#xA;can someone provide a clear example (simple code) on how to provide extra verification of a received block in aura?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20705" PostHistoryTypeId="1" PostId="5504" RevisionGUID="9f865231-0a14-419e-9ec8-30f725670c75" CreationDate="2022-10-23T12:33:31.780" UserId="3319" Text="how to run custom block validation logic when importing a block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20706" PostHistoryTypeId="3" PostId="5504" RevisionGUID="9f865231-0a14-419e-9ec8-30f725670c75" CreationDate="2022-10-23T12:33:31.780" UserId="3319" Text="|extrinsic|block|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20707" PostHistoryTypeId="5" PostId="5504" RevisionGUID="7722c4ce-8d20-4ab3-9ff8-bd1443bc34e7" CreationDate="2022-10-23T12:39:27.037" UserId="3319" Comment="added 349 characters in body" Text="I am trying to execute some logic whenever a block is received, specifically i want to create custom transactions validation of a received block.&#xD;&#xA;&#xD;&#xA;can someone provide a clear example (simple code) on how to provide extra verification of a received block in aura?&#xD;&#xA;&#xD;&#xA;ps: i noticed that aura use grandpa when it creates its BlockImport, i assume this has something to with verifying the block if so why aura is using grandpa validation logic of having its own, and is there a way to simply extend it by pluging extra verification logic without copy and paste, if that is indeed the correct place for verification." ContentLicense="CC BY-SA 4.0" />
  <row Id="20708" PostHistoryTypeId="50" PostId="4877" RevisionGUID="abf60a1e-47ff-4960-a5c4-d3ba2f170c28" CreationDate="2022-10-23T13:03:20.490" UserId="-1" />
  <row Id="20709" PostHistoryTypeId="5" PostId="5504" RevisionGUID="2c4411f4-8d79-43ae-aca8-f2bb32c64dc6" CreationDate="2022-10-23T13:33:38.357" UserId="3319" Comment="deleted 22 characters in body" Text="I am trying to execute some logic whenever a block is received, specifically i want to create custom transactions validation of a received block.&#xD;&#xA;&#xD;&#xA;can someone provide a clear example (simple code) on how to provide extra verification of a received block in aura?&#xD;&#xA;&#xD;&#xA;ps: i noticed that aura use grandpa when it creates its BlockImport, i assume this has something to with verifying the block if so why aura is using grandpa validation logic of having its own, and is there a way to simply extend it by plugging extra verification logic, if that is indeed the correct place for verification." ContentLicense="CC BY-SA 4.0" />
  <row Id="20710" PostHistoryTypeId="50" PostId="4660" RevisionGUID="1ab49a1c-ba5e-42e9-8ef5-6d661f37a60e" CreationDate="2022-10-23T14:01:40.167" UserId="-1" />
  <row Id="20711" PostHistoryTypeId="2" PostId="5505" RevisionGUID="99d5dee9-a510-4bf5-9c6d-6d8b305b2020" CreationDate="2022-10-23T20:30:06.090" UserId="73" Text="You could write your own [`BlockImport`][1]:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;struct BlockImport&lt;I&gt;(I);&#xD;&#xA;&#xD;&#xA;impl&lt;I: sc_consensus::BlockImport&gt; sc_consensus::BlockImport for BlockImport for BlockImport&lt;I&gt; {&#xD;&#xA;    type Error = I::Error;&#xD;&#xA;	type Transaction = I::Transaction;&#xD;&#xA;&#xD;&#xA;	async fn check_block(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		block: BlockCheckParams&lt;B&gt;,&#xD;&#xA;	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;        self.0.check_block(block).await&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;	async fn import_block(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		block: BlockImportParams&lt;B, Self::Transaction&gt;,&#xD;&#xA;		cache: HashMap&lt;CacheKeyId, Vec&lt;u8&gt;&gt;,&#xD;&#xA;	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;        if let Some(transactions) = &amp;block.body {&#xD;&#xA;             // Do whatever check you need with the transactions&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        self.0.import_block(block, cache).await&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then in your service you stack `BlockImport(AuraBlockImport(GrandpaBlockImport(Client)))` and each external block will be checked with your custom logic.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/4d29da2156d587a6b8e4efbe10e412efaedbbd4e/client/consensus/common/src/block_import.rs#L338" ContentLicense="CC BY-SA 4.0" />
  <row Id="20713" PostHistoryTypeId="2" PostId="5506" RevisionGUID="54d56b51-1533-4225-894a-d461d680cb6f" CreationDate="2022-10-23T21:53:23.130" UserId="2147" Text="Just a clarification, suppose that the `pallet_session::rotate_session` is not able to retrieve the next validation set due to an election failure inside the `pallet_staking::new_session` function. &#xD;&#xA;Is then the current validation set re-used to solve the problem of missing validators?&#xD;&#xA;Is it possible also that such failure arise when the `election_multi_phase` pallet doesn’t complete an offline election process?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20715" PostHistoryTypeId="1" PostId="5506" RevisionGUID="54d56b51-1533-4225-894a-d461d680cb6f" CreationDate="2022-10-23T21:53:23.130" UserId="2147" Text="Failure of election for next session" ContentLicense="CC BY-SA 4.0" />
  <row Id="20716" PostHistoryTypeId="3" PostId="5506" RevisionGUID="54d56b51-1533-4225-894a-d461d680cb6f" CreationDate="2022-10-23T21:53:23.130" UserId="2147" Text="|staking|validator|session|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20718" PostHistoryTypeId="2" PostId="5507" RevisionGUID="a47d9550-4fac-46f6-9bb5-fe8ea156ebe1" CreationDate="2022-10-24T06:34:42.483" UserId="2736" Text="It turned out that I was missing one crucial thing:&#xD;&#xA;```rust&#xD;&#xA;impl sc_executor::NativeExecutionDispatch for ExecutorDispatch {&#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;&#xD;&#xA;    #[cfg(not(feature = &quot;runtime-benchmarks&quot;))]&#xD;&#xA;    type ExtendHostFunctions = ();&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20720" PostHistoryTypeId="2" PostId="5508" RevisionGUID="e8594b18-61fd-48dd-90dc-47d04edfbc8e" CreationDate="2022-10-24T07:22:57.767" UserId="2762" Text="The issue is about how Next.js renders the frontend code. From their docs:&#xD;&#xA;&#xD;&#xA;&gt; Next.js is universal, which means it executes code first server-side,&#xD;&#xA;&gt; then client-side. The window object is only present client-side.&#xD;&#xA;&#xD;&#xA;In order to get around that problem you will need to use a dynamic import as opposed to the normal import you currently have: https://nextjs.org/docs/advanced-features/dynamic-import&#xD;&#xA;&#xD;&#xA;In your code it will be something like this. &#xD;&#xA;In `client/context/TransactionContext.js` change the import of the library from:&#xD;&#xA;&#xD;&#xA;    import { web3Accounts,web3Enable  } from '@polkadot/extension-dapp'&#xD;&#xA;To:&#xD;&#xA;&#xD;&#xA;    import dynamic from 'next/dynamic'&#xD;&#xA;    const web3Accounts = dynamic(() =&gt; import('@polkadot/extension-dapp'), { ssr: false });&#xD;&#xA;    const web3Enable = dynamic(() =&gt; import('@polkadot/extension-dapp'), { ssr: false });&#xD;&#xA;&#xD;&#xA;And in the file `client/components/Header.js` change the import:&#xD;&#xA;&#xD;&#xA;    import Identicon from '@polkadot/react-identicon'&#xD;&#xA;&#xD;&#xA;To:&#xD;&#xA;&#xD;&#xA;    import dynamic from 'next/dynamic'&#xD;&#xA;    const Identicon = dynamic(() =&gt; import('@polkadot/react-identicon'), { ssr: false });&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20722" PostHistoryTypeId="2" PostId="5509" RevisionGUID="7946d251-0259-4f1f-8452-c8ed19d796a4" CreationDate="2022-10-24T07:35:47.083" UserId="2762" Text="Yes it is possible and as @kianenigma mentioned, Substrate has the export-state command to do it.&#xD;&#xA;&#xD;&#xA;To export the chain state from a specific block number:&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node export-state --chain=raw-parachain-chainspec.json --base-path /tmp/parachain/alice 20 &gt; chain-exported-20.json&#xD;&#xA;&#xD;&#xA;In case you are running a parachain and want generate the genesis state and the WebAssembly runtime:&#xD;&#xA;&#xD;&#xA; 1. Generate the chain genesis state, indicating the chain file created above.&#xD;&#xA;`./target/release/parachain-template-node export-genesis-state --chain=chain-exported-20.json &gt; chain-exported-genesis-state-20`&#xD;&#xA;&#xD;&#xA; 2. Export the WebAssembly runtime for the chain, indicating the chain file created above.&#xD;&#xA;&#xD;&#xA;    `./target/release/parachain-template-node export-genesis-wasm --chain=chain-exported-20.json &gt; chain-exported-genesis-wasm-20`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now you can restart the chain specifying the new chain in the command line:&#xD;&#xA;&#xD;&#xA;    --chain chain-exported-20.json \&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20724" PostHistoryTypeId="2" PostId="5510" RevisionGUID="3f190912-1f12-42e9-ba1d-ada28e8a3a6d" CreationDate="2022-10-24T07:45:36.920" UserId="116" Text="This *is* a pure rust problem both arms of the match must return the same type. I assume you intend to return the result of this match&#xD;&#xA;&#xD;&#xA;but since &#xD;&#xA;```&#xD;&#xA;        &lt;Baskets&lt;T&gt;&gt;::insert(storeId, store_basket);&#xD;&#xA;```&#xD;&#xA;ends with a `;` this arm will return `()` instead of a `Result&lt; ... &gt;` remove this and the return type will be that from the last statement in the block, hopefully the type you are expecting.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20726" PostHistoryTypeId="5" PostId="5472" RevisionGUID="152c8726-8484-4f79-85f0-445d56ede49b" CreationDate="2022-10-24T08:25:13.277" UserId="3344" Comment="added 267 characters in body" Text="I'll add more as come across information:&#xD;&#xA;&#xD;&#xA;In general ...[it is not necessary that a parachain even needs to be a blockchain. For example, a parachain just needs to satisfy the two constraints listed above: state transition function and collator node.](https://wiki.polkadot.network/docs/build-pdk#cumulus)&#xD;&#xA;&#xD;&#xA;- Costs/tradeoffs&#xD;&#xA;  - [Time in the network is measured in (*finalized*?) blocks](https://github.com/paritytech/substrate/blob/61b9a4d1a8a9bf39c1d89a8dd02f82785c10860c/bin/node-template/runtime/src/lib.rs#L125). So &quot;time&quot; would stand still.&#xD;&#xA;     - [A session is...measured in block numbers](https://github.com/paritytech/substrate/blob/03c2c2fe44b405c4b84561cc2c65e5cf7d2c263a/frame/session/README.md#terminology)&#xD;&#xA;     - [In the optimistic scenario, the latency for this message should be at least two blocks...](https://wiki.polkadot.network/docs/learn-parachains)&#xD;&#xA;  - [Polkadot block size is a maximum 5MB](https://github.com/paritytech/polkadot/blob/e6fa871e39bab8ccec27070b3b93a2e5e50ff0a4/runtime/common/src/lib.rs#L112)&#xD;&#xA;    - [More Polkadot limits set out here](https://spec.polkadot.network/#defn-polkadot-block-limits)&#xD;&#xA;    - [Some reasoning here](https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#limits-on-resource-usage)&#xD;&#xA;  - Substrate..." ContentLicense="CC BY-SA 4.0" />
  <row Id="20727" PostHistoryTypeId="2" PostId="5511" RevisionGUID="99dd43a9-e585-43d1-a808-e9921e1bee22" CreationDate="2022-10-24T09:25:36.657" UserId="2548" Text="I would like to set up a testnet for my substrate chain.&#xD;&#xA;&#xD;&#xA;I did not find much information around. Can you please help me with articles/tutorials? &#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="20729" PostHistoryTypeId="1" PostId="5511" RevisionGUID="99dd43a9-e585-43d1-a808-e9921e1bee22" CreationDate="2022-10-24T09:25:36.657" UserId="2548" Text="How to Configure a testnet for my substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20730" PostHistoryTypeId="3" PostId="5511" RevisionGUID="99dd43a9-e585-43d1-a808-e9921e1bee22" CreationDate="2022-10-24T09:25:36.657" UserId="2548" Text="|substrate-node|rust|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20732" PostHistoryTypeId="2" PostId="5512" RevisionGUID="dbc06f13-6b04-4950-accc-24850a86dd73" CreationDate="2022-10-24T09:42:03.973" UserId="552" Text="I was checking the rpc methods in polkadot explorer and I see a lot of rpc shown as output when queried rpc-&gt; methods. &#xD;&#xA;But I don't see some of them inside the rpc field. for example rpc methods returned `chain_getRuntimeVersion`&#xD;&#xA;but when I checked through field `chain` it shows only `chain_getBlock`, `chain_getFinalizedHead`etc but no `chain_getRuntimeVersion`. &#xD;&#xA;&#xD;&#xA;Is there any particular reason behind this? " ContentLicense="CC BY-SA 4.0" />
  <row Id="20734" PostHistoryTypeId="1" PostId="5512" RevisionGUID="dbc06f13-6b04-4950-accc-24850a86dd73" CreationDate="2022-10-24T09:42:03.973" UserId="552" Text="Some RPC not shown in polkadot explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="20735" PostHistoryTypeId="3" PostId="5512" RevisionGUID="dbc06f13-6b04-4950-accc-24850a86dd73" CreationDate="2022-10-24T09:42:03.973" UserId="552" Text="|substrate-node|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20736" PostHistoryTypeId="2" PostId="5513" RevisionGUID="cb2c2ebe-d529-4bf9-9ce6-51a3730ea9a7" CreationDate="2022-10-24T10:16:13.470" UserId="167" Text="&gt; Is then the current validation set re-used to solve the problem of missing validators?&#xD;&#xA;&#xD;&#xA;Correct. &#xD;&#xA;&#xD;&#xA;&gt; Is it possible also that such failure arise when the election_multi_phase pallet doesn’t complete an offline election process?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Yes, and in fact, if `type ElectionProvider` of `pallet_staking::Config` is set to an instance of `election_multi_phase`, then it is `election_multi_phase` that is first failing, possible in the offline election process, then staking is notified, and the same failure is finally passed down to `pallet_sesion` on `new_session `. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20742" PostHistoryTypeId="5" PostId="5501" RevisionGUID="85a76958-1937-4782-8f9b-ce69226a5324" CreationDate="2022-10-24T10:54:51.050" UserId="116" Comment="Added section from comments which is an important part of the question if referenced in the future" Text="I receive:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   Compiling pallet-assets v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.30#a3ed0119)&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;   --&gt; /Users/chp/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/frame/assets/src/functions.rs:673:46&#xD;&#xA;    |&#xD;&#xA;673 |         let mut dead_accounts: Vec&lt;T::AccountId&gt; = vec![];&#xD;&#xA;    |                                                    ^^^&#xD;&#xA;    |&#xD;&#xA;    = note: consider importing one of these items:&#xD;&#xA;            codec::alloc::vec&#xD;&#xA;            scale_info::prelude::vec&#xD;&#xA;            sp_std::vec&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when I add pallet-assets.&#xD;&#xA;&#xD;&#xA;Is this an error in my code? It feels like it is in the pallet.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;I run `cargo test` and this is in Cargo.toml &#xD;&#xA;```&#xD;&#xA;pallet-assets = { &#xD;&#xA;    version = &quot;4.0.0-dev&quot;,&#xD;&#xA;    default-features = false,&#xD;&#xA;    git = &quot;https://github.com/paritytech/substrate.git&quot;,&#xD;&#xA;    branch = &quot;polkadot-v0.9.30&quot; &#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20743" PostHistoryTypeId="24" PostId="5501" RevisionGUID="85a76958-1937-4782-8f9b-ce69226a5324" CreationDate="2022-10-24T10:54:51.050" Comment="Proposed by 116 approved by 3265 edit id of 321" ContentLicense="CC BY-SA 4.0" />
  <row Id="20744" PostHistoryTypeId="2" PostId="5515" RevisionGUID="c73d175e-5688-4bf2-8817-1fd2962eb16e" CreationDate="2022-10-24T11:43:18.510" UserId="3317" Text="You could look at the tutorials for working with Substrate-based blockchain nodes: https://docs.substrate.io/tutorials/get-started/&#xD;&#xA;&#xD;&#xA;I also found this article which could maybe help you with deciding what kind of testnet you want to setup, plus the required steps involved: https://vimukthi.com/how-to-configure-a-new-testnet-for-substrate-chain-2cfdce951b9f" ContentLicense="CC BY-SA 4.0" />
  <row Id="20748" PostHistoryTypeId="10" PostId="5498" RevisionGUID="2d26ff45-bf3d-413f-9b38-6f0481bf996b" CreationDate="2022-10-24T12:54:00.050" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="20749" PostHistoryTypeId="10" PostId="5501" RevisionGUID="19a6b110-2baa-4d5c-a8df-d86e688683e1" CreationDate="2022-10-24T12:54:55.690" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[656],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="20750" PostHistoryTypeId="5" PostId="3667" RevisionGUID="86a8d806-f9c5-4c45-9293-2c5277f19751" CreationDate="2022-10-24T12:55:30.283" UserId="116" Comment="Spelling dont -&gt; don't" Text="I'm currently building a listener for KSM blocks. I used the `api.rpc.chain.subscribeFinalizedHeads` method with the RPC node `wss://kusama-rpc.polkadot.io`. As a simple test, I had the callback simply console log the block number. One thing I noticed is that there are some blocks being skipped by the subscriber. 1 out of every 6 blocks seems to not be picked up. If I type the missing block into a scanner online, it exists and shows up. However, the built-in subscriber seems to be missing it.&#xD;&#xA;&#xD;&#xA;Does anyone have any insight into why this could be? I don't want to be missing transactions." ContentLicense="CC BY-SA 4.0" />
  <row Id="20751" PostHistoryTypeId="24" PostId="3667" RevisionGUID="86a8d806-f9c5-4c45-9293-2c5277f19751" CreationDate="2022-10-24T12:55:30.283" Comment="Proposed by 116 approved by 34 edit id of 320" ContentLicense="CC BY-SA 4.0" />
  <row Id="20753" PostHistoryTypeId="12" PostId="5515" RevisionGUID="ff0c91b4-2ddb-4330-84cd-7546f6fe8f33" CreationDate="2022-10-24T13:07:33.657" UserId="3317" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;}]}" />
  <row Id="20754" PostHistoryTypeId="13" PostId="5515" RevisionGUID="eb6198e1-5c5d-4539-82cf-6f4b3ce292de" CreationDate="2022-10-24T13:09:04.530" UserId="3317" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;}]}" />
  <row Id="20755" PostHistoryTypeId="2" PostId="5516" RevisionGUID="65d7178e-8496-4613-a327-9ed1701d576c" CreationDate="2022-10-24T13:36:42.290" UserId="480" Text="If I'm running a benchmark and I get the current block number from inside the benchmark code (i.e. in the setup before I actually call the call I'm trying to benchmark) using `frame_system::Pallet::&lt;T&gt;::block_number()` the block number I get is 0. &#xD;&#xA;&#xD;&#xA;I then call the call I'm trying to benchmark and inside that call I get a block number of 1.&#xD;&#xA;&#xD;&#xA;I'm assuming the benchmark setup code is run like / after genesis, in block 0, and then the chain progresses to 1 for the calls?&#xD;&#xA;&#xD;&#xA;Not exactly clear why this is the case if I haven't told it to progress, especially because you do have to explicitly tell the `TestExternalities` in a test that you are at block 1." ContentLicense="CC BY-SA 4.0" />
  <row Id="20757" PostHistoryTypeId="1" PostId="5516" RevisionGUID="65d7178e-8496-4613-a327-9ed1701d576c" CreationDate="2022-10-24T13:36:42.290" UserId="480" Text="Block number in the benchmark code is 0, but is 1 in the running code" ContentLicense="CC BY-SA 4.0" />
  <row Id="20758" PostHistoryTypeId="3" PostId="5516" RevisionGUID="65d7178e-8496-4613-a327-9ed1701d576c" CreationDate="2022-10-24T13:36:42.290" UserId="480" Text="|benchmarking|blocknumber|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20759" PostHistoryTypeId="5" PostId="5516" RevisionGUID="ec011b57-a2ae-4ea0-a114-6ff6a3e351da" CreationDate="2022-10-24T13:59:30.370" UserId="480" Comment="deleted 25 characters in body" Text="If I'm running a benchmark and I get the current block number from inside the benchmark code (i.e. in the setup before I actually call the call I'm trying to benchmark) using `frame_system::Pallet::&lt;T&gt;::block_number()` the block number I get is 0. &#xD;&#xA;&#xD;&#xA;Then within call I'm trying to benchmark I get a block number of 1.&#xD;&#xA;&#xD;&#xA;I'm assuming the benchmark setup code is run like / after genesis, in block 0, and then the chain progresses to 1 for the calls?&#xD;&#xA;&#xD;&#xA;Not exactly clear why this is the case if I haven't told it to progress, especially because you do have to explicitly tell the `TestExternalities` in a test that you are at block 1." ContentLicense="CC BY-SA 4.0" />
  <row Id="20760" PostHistoryTypeId="2" PostId="5517" RevisionGUID="ef7662d9-5d84-4757-88e2-47a9fc789800" CreationDate="2022-10-24T14:46:20.390" UserId="1864" Text="I developped a [custom pallet](https://github.com/Apolixit/pallet_money_pot/blob/master/pallets/money-pot/src/lib.rs) and I would like to allow to try it easily for others developpers.&#xD;&#xA;&#xD;&#xA;Is it possible for me to share a [Substrate Playground](https://playground.substrate.dev) workspace and make it public ? I found I can save a workspace but it's only link to my Github account.&#xD;&#xA;&#xD;&#xA;Thanks a lot for your help !" ContentLicense="CC BY-SA 4.0" />
  <row Id="20762" PostHistoryTypeId="1" PostId="5517" RevisionGUID="ef7662d9-5d84-4757-88e2-47a9fc789800" CreationDate="2022-10-24T14:46:20.390" UserId="1864" Text="Substrate Playground - Share workspace" ContentLicense="CC BY-SA 4.0" />
  <row Id="20763" PostHistoryTypeId="3" PostId="5517" RevisionGUID="ef7662d9-5d84-4757-88e2-47a9fc789800" CreationDate="2022-10-24T14:46:20.390" UserId="1864" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20764" PostHistoryTypeId="2" PostId="5518" RevisionGUID="56a700af-c62c-48d2-b2dc-9891fc1f225d" CreationDate="2022-10-24T16:06:41.707" UserId="3361" Text="Looks like you are missing a crate dependency....&#xD;&#xA;&#xD;&#xA;Try installing this: *sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler*" ContentLicense="CC BY-SA 4.0" />
  <row Id="20766" PostHistoryTypeId="2" PostId="5519" RevisionGUID="7489750b-eae6-4a50-98d4-662532ef28b7" CreationDate="2022-10-24T16:20:22.913" UserId="2762" Text="Well done!&#xD;&#xA;&#xD;&#xA;Follow [this tutorial][1] to make it public for other developers publishing the pallet on [crates.io][2], the Rust community’s crate registry or on GitHub (You already did it).&#xD;&#xA;&#xD;&#xA;It would be great to have it on the [Substrate Marketplace][3] too, check this [blog][4] about how to feature on Substrate Marketplace. &#xD;&#xA;&#xD;&#xA;Also I would recommend to document the pallet README, it makes it easy to know what is about and have a high-level understanding about it.&#xD;&#xA;&#xD;&#xA;You can take the [Balances pallet][5] from Substrate FRAME as an example, in my opinion that README is a really great documentation of the pallet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/work-with-pallets/publish-custom-pallets/&#xD;&#xA;  [2]: https://crates.io/&#xD;&#xA;  [3]: https://marketplace.substrate.io/&#xD;&#xA;  [4]: https://www.parity.io/blog/introducing-substrate-marketplace-your-one-stop-resource-for-substrate-pallets&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/tree/master/frame/balances" ContentLicense="CC BY-SA 4.0" />
  <row Id="20768" PostHistoryTypeId="5" PostId="5505" RevisionGUID="661d4670-0431-4228-b72c-9e575b13c4e7" CreationDate="2022-10-24T17:06:39.020" UserId="3319" Comment="redundant for BlockImport" Text="You could write your own [`BlockImport`][1]:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;struct BlockImport&lt;I&gt;(I);&#xD;&#xA;&#xD;&#xA;impl&lt;I: sc_consensus::BlockImport&gt; sc_consensus::BlockImport for BlockImport&lt;I&gt; {&#xD;&#xA;    type Error = I::Error;&#xD;&#xA;	type Transaction = I::Transaction;&#xD;&#xA;&#xD;&#xA;	async fn check_block(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		block: BlockCheckParams&lt;B&gt;,&#xD;&#xA;	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;        self.0.check_block(block).await&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;	async fn import_block(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		block: BlockImportParams&lt;B, Self::Transaction&gt;,&#xD;&#xA;		cache: HashMap&lt;CacheKeyId, Vec&lt;u8&gt;&gt;,&#xD;&#xA;	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;        if let Some(transactions) = &amp;block.body {&#xD;&#xA;             // Do whatever check you need with the transactions&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        self.0.import_block(block, cache).await&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then in your service you stack `BlockImport(AuraBlockImport(GrandpaBlockImport(Client)))` and each external block will be checked with your custom logic.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/4d29da2156d587a6b8e4efbe10e412efaedbbd4e/client/consensus/common/src/block_import.rs#L338" ContentLicense="CC BY-SA 4.0" />
  <row Id="20769" PostHistoryTypeId="24" PostId="5505" RevisionGUID="661d4670-0431-4228-b72c-9e575b13c4e7" CreationDate="2022-10-24T17:06:39.020" Comment="Proposed by 3319 approved by 73 edit id of 322" ContentLicense="CC BY-SA 4.0" />
  <row Id="20770" PostHistoryTypeId="2" PostId="5520" RevisionGUID="38e1dd01-4e67-4536-98bb-e8e2755bf605" CreationDate="2022-10-24T20:52:40.747" UserId="3265" Text="I struggle understanding conversion. I found a lot of questions here and online that state that converting between substrate primitives and rust primitives can easily be handled with `into()` calls or the `Saturated` package or other stuff.&#xD;&#xA;&#xD;&#xA;I'm trying this with https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs#L197&#xD;&#xA;&#xD;&#xA;There is this (hopelessly outdated) example here: https://github.com/paritytech/substrate/tree/master/frame/assets#simple-code-snippet&#xD;&#xA;&#xD;&#xA;... that does not work with the current version of pallet assets for ages.&#xD;&#xA;&#xD;&#xA;However, so I have:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type AssetIdOf&lt;T&gt; = &lt;T as pallet_assets::Config&gt;::AssetId;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn get_next_asset_id)]&#xD;&#xA;pub type NextAssetId&lt;T&gt; = StorageValue&lt;_, AssetIdOf&lt;T&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and basically all I want to do is add `1` to NextAssetId.&#xD;&#xA;&#xD;&#xA;I tried everything but it says that it missed `From&lt;u32&gt;` (on into) or can't add if I do something like `&lt;NextAssetId&lt;T&gt;&gt;::mutate(|asset_id| *asset_id += 1);` or even `&lt;NextAssetId&lt;T&gt;&gt;::mutate(|asset_id| *asset_id += One::one());` as in a very old commit on the repo.&#xD;&#xA; &#xD;&#xA;I'm not sure if i attack this problem correctly at all.&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2857/how-do-i-hardcode-asset-ids" ContentLicense="CC BY-SA 4.0" />
  <row Id="20772" PostHistoryTypeId="1" PostId="5520" RevisionGUID="38e1dd01-4e67-4536-98bb-e8e2755bf605" CreationDate="2022-10-24T20:52:40.747" UserId="3265" Text="How to increment / work with AssetId" ContentLicense="CC BY-SA 4.0" />
  <row Id="20773" PostHistoryTypeId="3" PostId="5520" RevisionGUID="38e1dd01-4e67-4536-98bb-e8e2755bf605" CreationDate="2022-10-24T20:52:40.747" UserId="3265" Text="|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20774" PostHistoryTypeId="2" PostId="5521" RevisionGUID="1fb89a85-1914-452a-ba5f-1a964d700fad" CreationDate="2022-10-24T21:03:09.967" UserId="94" Text="Your observation is correct that the block number is being set to `1` if it is `0` between the setup and call phase. This is confusing and should be improved, I opened [substrate #12559](https://github.com/paritytech/substrate/issues/12559) for that.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The current safe way of doing it is to always set the block-number in the setup phase of the benchmarks to something non-zero. Eg:  &#xD;&#xA;```rust&#xD;&#xA;block_does_not_change {&#xD;&#xA;	frame_system::Pallet::&lt;T&gt;::set_block_number(2u32.into());&#xD;&#xA;}: {&#xD;&#xA;	assert_eq!(frame_system::Pallet::&lt;T&gt;::block_number(), 2u32.into());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;In this case it will not be modified." ContentLicense="CC BY-SA 4.0" />
  <row Id="20776" PostHistoryTypeId="2" PostId="5522" RevisionGUID="e2e78cd1-8609-48d2-aef6-144a3ce0e2f7" CreationDate="2022-10-24T23:06:14.083" UserId="3346" Text="We have been losing anywhere from one to three nodes at a time with Grandpa Voter Errors at random block numbers ranging from 1600 to over 183K. Thus far we have not found any configuration in the JSON or in the node subcommands, or in the hardware that solves it. **This is my question: is it simply a fact of blockchain life that Grandpa voter errors will sometimes take your node down?** I am asking this because right now we are focused on solving the issue ([see this question to track us working the issue][1]) but perhaps we should be focused on mitigation instead, i.e. how to get the node back up and running quickly when it strikes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5415/how-to-prevent-grandpa-voter-error-and-randomly-deleted-keystore" ContentLicense="CC BY-SA 4.0" />
  <row Id="20778" PostHistoryTypeId="1" PostId="5522" RevisionGUID="e2e78cd1-8609-48d2-aef6-144a3ce0e2f7" CreationDate="2022-10-24T23:06:14.083" UserId="3346" Text="Are Periodic Grandpa Voter Errors To Be Expected?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20779" PostHistoryTypeId="3" PostId="5522" RevisionGUID="e2e78cd1-8609-48d2-aef6-144a3ce0e2f7" CreationDate="2022-10-24T23:06:14.083" UserId="3346" Text="|substrate-node|grandpa|error|nodes|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20780" PostHistoryTypeId="2" PostId="5523" RevisionGUID="054b07a4-8eb8-4624-87e3-7fdb4f174c8a" CreationDate="2022-10-25T04:59:20.360" UserId="3344" Text="I'm guessing by placing a parachain between them?&#xD;&#xA;&#xD;&#xA;But that begs the question: Can one parachain join/belong to two relay chains?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20782" PostHistoryTypeId="1" PostId="5523" RevisionGUID="054b07a4-8eb8-4624-87e3-7fdb4f174c8a" CreationDate="2022-10-25T04:59:20.360" UserId="3344" Text="What is the blessed way to link two (2) relay chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="20783" PostHistoryTypeId="3" PostId="5523" RevisionGUID="054b07a4-8eb8-4624-87e3-7fdb4f174c8a" CreationDate="2022-10-25T04:59:20.360" UserId="3344" Text="|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20784" PostHistoryTypeId="2" PostId="5524" RevisionGUID="fb38720e-5e24-415e-82c5-68a22bf1f117" CreationDate="2022-10-25T05:28:58.643" UserId="3114" Text="- Problem&#xD;&#xA;  - The following program does not work with pallet-contract &quot;polkadot-v0.9.29&quot;.&#xD;&#xA;  - &quot;polkadot-v0.9.27&quot; in pallet-contract works as expected.&#xD;&#xA;  - Anyone know how to get around this issue?&#xD;&#xA; &#xD;&#xA;- Source Code&#xD;&#xA;```&#xD;&#xA;  const gasLimit = 100000 * 1000000;&#xD;&#xA;  const storageDepositLimit = null;&#xD;&#xA;&#xD;&#xA;  const deployContract = async () =&gt; {&#xD;&#xA;    const { web3FromSource } = await import(&quot;@polkadot/extension-dapp&quot;);&#xD;&#xA;    const wsProvider = new WsProvider(blockchainUrl);&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const contractWasm = contract_file.source.wasm;&#xD;&#xA;    const code = new CodePromise(api, abi, contractWasm);&#xD;&#xA;    const initValue = false;&#xD;&#xA;    const performingAccount = accounts[0];&#xD;&#xA;    const injector = await web3FromSource(performingAccount.meta.source);&#xD;&#xA;    &#xD;&#xA;    const tx = code.tx.new({ value:0, gasLimit:gasLimit,storageDepositLimit }, initValue);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- I get the following error:&#xD;&#xA;```&#xD;&#xA;Unhandled Runtime Error&#xD;&#xA;Error: createType(Call):: Call: failed decoding contracts.instantiateWithCode:: Struct: failed on args: {&quot;value&quot;:&quot;Compact&lt;u128&gt;&quot;,&quot;gas_limit&quot;:&quot;Compact&lt;FrameSupportWeightsWeightV2Weight&gt;&quot;,&quot;storage_deposit_limit&quot;:&quot;Option&lt;Compact&lt;u128&gt;&gt;&quot;,&quot;code&quot;:&quot;Bytes&quot;,&quot;data&quot;:&quot;Bytes&quot;,&quot;salt&quot;:&quot;Bytes&quot;}:: Struct: failed on gas_limit: Compact&lt;FrameSupportWeightsWeightV2Weight&gt;:: Struct: Cannot decode value 100000000000 (typeof number), expected an input object, map or array&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Somebody please help me.&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="20786" PostHistoryTypeId="1" PostId="5524" RevisionGUID="fb38720e-5e24-415e-82c5-68a22bf1f117" CreationDate="2022-10-25T05:28:58.643" UserId="3114" Text="I'm getting an error with the gas limit definition when deploying a smart contract using CodePromise" ContentLicense="CC BY-SA 4.0" />
  <row Id="20787" PostHistoryTypeId="3" PostId="5524" RevisionGUID="fb38720e-5e24-415e-82c5-68a22bf1f117" CreationDate="2022-10-25T05:28:58.643" UserId="3114" Text="|polkadot-js|ink|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20788" PostHistoryTypeId="2" PostId="5525" RevisionGUID="b5344209-2cb8-428b-82a1-37851649c492" CreationDate="2022-10-25T05:32:59.787" UserId="3327" Text="Can any one please point to me some very good step by step resource/course to learn substrate? I cant find any resource/course that guide you step by step starting from substrate architecture and guide you through the whole processes of building your own frame." ContentLicense="CC BY-SA 4.0" />
  <row Id="20790" PostHistoryTypeId="1" PostId="5525" RevisionGUID="b5344209-2cb8-428b-82a1-37851649c492" CreationDate="2022-10-25T05:32:59.787" UserId="3327" Text="Substrate learning resources" ContentLicense="CC BY-SA 4.0" />
  <row Id="20791" PostHistoryTypeId="3" PostId="5525" RevisionGUID="b5344209-2cb8-428b-82a1-37851649c492" CreationDate="2022-10-25T05:32:59.787" UserId="3327" Text="|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20794" PostHistoryTypeId="2" PostId="5527" RevisionGUID="d74961d2-dae1-4c8b-b74b-9e3d5bef47ce" CreationDate="2022-10-25T07:31:54.413" UserId="3000" Text="&#xD;&#xA;I Wanna to create a StoreBasket in Substrate . &#xD;&#xA;&#xD;&#xA;I Have Two `Struct` one for `BusinessItem `. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub struct BusinessItem {&#xD;&#xA;		media: Vec&lt;u8&gt;,&#xD;&#xA;		title: Vec&lt;u8&gt;,&#xD;&#xA;		description: Vec&lt;u8&gt;,&#xD;&#xA;		price: u32,&#xD;&#xA;		count: u32,&#xD;&#xA;		itemId: [u8; 16],&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;also i Defined Storage For Item: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn items)]&#xD;&#xA;	pub(super) type Items&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, T::AccountId, Vec&lt;BusinessItem&gt;&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I wanna to find item in item Storage with itemid , for exmaple i have itemId : `X0o788dfgg` and i need to find item with this id in storage . &#xD;&#xA;&#xD;&#xA;i wrote this code bit it dose not work : &#xD;&#xA;&#xD;&#xA;		let _itemInfo: Option&lt;&amp;BusinessItem&gt; = items.iter().find(|item| item.itemId == item_id);&#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this problem ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20796" PostHistoryTypeId="1" PostId="5527" RevisionGUID="d74961d2-dae1-4c8b-b74b-9e3d5bef47ce" CreationDate="2022-10-25T07:31:54.413" UserId="3000" Text="iter storage in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="20797" PostHistoryTypeId="3" PostId="5527" RevisionGUID="d74961d2-dae1-4c8b-b74b-9e3d5bef47ce" CreationDate="2022-10-25T07:31:54.413" UserId="3000" Text="|substrate-node|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20798" PostHistoryTypeId="2" PostId="5528" RevisionGUID="a54d78fc-e5cf-4438-96db-9931e550839d" CreationDate="2022-10-25T07:38:07.210" UserId="2762" Text="What you are looking for is the [Substrate Tutorials][1].&#xD;&#xA;&#xD;&#xA;Also this [post][2] in StackExchange from Bruno is the best summary out there to start learning Substrate.&#xD;&#xA;&#xD;&#xA;And I would like to add a few links to it that help me and some that I found interesting too.&#xD;&#xA;&#xD;&#xA;From Github:&#xD;&#xA;&#xD;&#xA; - A [list of awesome][3] things curated by the Substrate community.&#xD;&#xA; - The [developer hub][4] in Github.&#xD;&#xA;&#xD;&#xA;Some interesting videos:&#xD;&#xA; - [Substrate: A Rustic Vision for Polkadot by Gavin Wood][5]&#xD;&#xA; - [Substrate: Blockchain Framework in Rust][6]&#xD;&#xA; - [Deep dive into FRAME V2 pallet macros][7] &#xD;&#xA; - [Substrate Seminar][8]&#xD;&#xA;&#xD;&#xA;As an extra:&#xD;&#xA; - If you want to go even more deeper, apply for the [Polkadot Blockchain Academy][9].&#xD;&#xA;&#xD;&#xA; - Join [here][10] to attend biweekly seminars with different topics about Substrate.&#xD;&#xA; - Join the [Polkadot Forum][11] to see the latest news/discussions in the space.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/1082/2762&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/awesome-substrate/blob/master/README.md&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub&#xD;&#xA;  [5]: https://www.youtube.com/watch?v=0IoUZdDi5Is&#xD;&#xA;  [6]: https://www.youtube.com/watch?v=NrG3co6UWEg&#xD;&#xA;  [7]: https://www.youtube.com/watch?v=5pLHzKMCEtg&#xD;&#xA;  [8]: https://www.crowdcast.io/e/substrate-seminar/41&#xD;&#xA;  [9]: https://polkadot.network/academy/&#xD;&#xA;  [10]: https://substrate.io/ecosystem/resources/seminar/&#xD;&#xA;  [11]: https://forum.polkadot.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="20801" PostHistoryTypeId="5" PostId="5527" RevisionGUID="5c9dc69a-f82d-4916-8c3e-500362a33afe" CreationDate="2022-10-25T08:05:59.610" UserId="251" Comment="deleted 1 character in body" Text="&#xD;&#xA;I Wanna to create a StoreBasket in Substrate . &#xD;&#xA;&#xD;&#xA;I Have Two `Struct` one for `BusinessItem `. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub struct BusinessItem {&#xD;&#xA;		media: Vec&lt;u8&gt;,&#xD;&#xA;		title: Vec&lt;u8&gt;,&#xD;&#xA;		description: Vec&lt;u8&gt;,&#xD;&#xA;		price: u32,&#xD;&#xA;		count: u32,&#xD;&#xA;		itemId: [u8; 16],&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;also i Defined Storage For Item: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn items)]&#xD;&#xA;	pub(super) type Items&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, T::AccountId, Vec&lt;BusinessItem&gt;&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I wanna to find item in item Storage with itemid , for exmaple i have itemId : `X0o788dfgg` and i need to find item with this id in storage . &#xD;&#xA;&#xD;&#xA;i wrote this code bit it dose not work : &#xD;&#xA;&#xD;&#xA;	let _itemInfo: Option&lt;&amp;BusinessItem&gt; = items.iter().find(|item| item.itemId == item_id);&#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this problem ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20802" PostHistoryTypeId="2" PostId="5529" RevisionGUID="9acaedf8-a625-49b0-9338-d7195bd07c2a" CreationDate="2022-10-25T08:09:41.730" UserId="251" Text="```rs&#xD;&#xA;if let Some(item) = &lt;Items&lt;T&gt;&gt;::get().iter().find(|i| i.id == id) {&#xD;&#xA;  log::info!(&quot;got {:#?}&quot;, item);&#xD;&#xA;}&#xD;&#xA;// or&#xD;&#xA;if let Some(item) = Self::items().iter().find(|i| i.id == id) {&#xD;&#xA;  log::info!(&quot;got {:#?}&quot;, item);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20804" PostHistoryTypeId="5" PostId="5529" RevisionGUID="8bd84da0-444e-47c4-b196-80dbde6b7b74" CreationDate="2022-10-25T08:28:12.987" UserId="251" Comment="added 92 characters in body" Text="[`IterableStorageMap` doc](https://paritytech.github.io/substrate/master/frame_support/storage/trait.IterableStorageMap.html).&#xD;&#xA;```rs&#xD;&#xA;if let Some(item) = &lt;Items&lt;T&gt;&gt;::iter().find(|i| i.id == id) {&#xD;&#xA;  log::info!(&quot;got {:#?}&quot;, item);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I don't recommend using this. Because it will do a lot of r/w, which costs a lot of resources.&#xD;&#xA;&#xD;&#xA;Maybe you should add another map to record the mapping `ItemId -&gt; AccountId`. Or something like that." ContentLicense="CC BY-SA 4.0" />
  <row Id="20805" PostHistoryTypeId="5" PostId="5529" RevisionGUID="733d1074-fd6b-4e5f-85b4-1826259c4c2a" CreationDate="2022-10-25T08:49:37.280" UserId="251" Comment="added 5 characters in body" Text="[`IterableStorageMap` doc](https://paritytech.github.io/substrate/master/frame_support/storage/trait.IterableStorageMap.html).&#xD;&#xA;```rs&#xD;&#xA;if let Some(item) = &lt;Items&lt;T&gt;&gt;::iter().find(|(_, i)| i.id == id) {&#xD;&#xA;  log::info!(&quot;got {:#?}&quot;, item);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I don't recommend using this. Because it will do a lot of r/w, which costs a lot of resources.&#xD;&#xA;&#xD;&#xA;Maybe you should add another map to record the mapping `ItemId -&gt; AccountId`. Or something like that." ContentLicense="CC BY-SA 4.0" />
  <row Id="20806" PostHistoryTypeId="5" PostId="5529" RevisionGUID="79c053ff-e954-4c5d-b7df-335ec58fd2af" CreationDate="2022-10-25T09:44:43.983" UserId="251" Comment="added 293 characters in body" Text="----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[`IterableStorageMap` doc](https://paritytech.github.io/substrate/master/frame_support/storage/trait.IterableStorageMap.html).&#xD;&#xA;```rs&#xD;&#xA;if let Some(item) = &lt;Items&lt;T&gt;&gt;::iter().find(|(_, i)| i.id == id) {&#xD;&#xA;  log::info!(&quot;got {:#?}&quot;, item);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I don't recommend using this. Because it will do a lot of r/w, which costs a lot of resources.&#xD;&#xA;&#xD;&#xA;Maybe you should add another map to record the mapping `ItemId -&gt; AccountId`. Or something like that.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Okay, I found you are trying to store a `Vec&lt;Item&gt;` under each `AccountId` key. I have to say, this has a really bad performance.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let mut matched_items = Vec::new();&#xD;&#xA;&lt;Items&lt;T&gt;&gt;::iter().for_each(|(_, items)| {&#xD;&#xA;  items.iter().for_each(|i| {&#xD;&#xA;    if i.id == id {&#xD;&#xA;      matched_items.push(i.clone());&#xD;&#xA;    }&#xD;&#xA;  })&#xD;&#xA;});&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20807" PostHistoryTypeId="2" PostId="5530" RevisionGUID="2fc2c9dd-0524-4ce0-94ed-f80d82fac024" CreationDate="2022-10-25T09:45:10.887" UserId="3114" Text="I was using &quot;8.4.1&quot; from &quot;polkadot/api-contract&quot;. I solved it by just upgrading to the latest &quot;9.6.1&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="20809" PostHistoryTypeId="2" PostId="5531" RevisionGUID="ac688e2f-01fa-4fd5-8dd4-4f7326d93a6a" CreationDate="2022-10-25T10:03:28.713" UserId="3362" Text="I run the tutorials to prepare a local relay chain form Substrate: &#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/connect-relay-and-parachains/prepare-a-local-relay-chain/&#xD;&#xA;&#xD;&#xA;And it worked as expected. However if run the nodes again I am getting this issue:&#xD;&#xA;&#xD;&#xA;    Error with block built on 0x9001e151c98fa89bfef8faa81e517f0b28b32fb6e327721f0a8ca99519b8e0e9: Import failed: Unexpected epoch change &#xD;&#xA;&#xD;&#xA;And when I try to send a transaction, it got stuck and doesn't work.&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="20811" PostHistoryTypeId="1" PostId="5531" RevisionGUID="ac688e2f-01fa-4fd5-8dd4-4f7326d93a6a" CreationDate="2022-10-25T10:03:28.713" UserId="3362" Text="Unexpected epoch change" ContentLicense="CC BY-SA 4.0" />
  <row Id="20812" PostHistoryTypeId="3" PostId="5531" RevisionGUID="ac688e2f-01fa-4fd5-8dd4-4f7326d93a6a" CreationDate="2022-10-25T10:03:28.713" UserId="3362" Text="|substrate-node|polkadot|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20813" PostHistoryTypeId="2" PostId="5532" RevisionGUID="096595c7-ff80-439b-a54c-23592f9386fd" CreationDate="2022-10-25T10:08:17.200" UserId="251" Text="This is an error from BABE. &#xD;&#xA;Relate to the consensus algorithm.&#xD;&#xA;&#xD;&#xA;You didn't produce any blocks during the whole session.&#xD;&#xA;So the chain stops working.&#xD;&#xA;&#xD;&#xA;There is no easy way to recover this.&#xD;&#xA;And you are in the test env.&#xD;&#xA;The best choice is clean the old data and restart the chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="20815" PostHistoryTypeId="5" PostId="5488" RevisionGUID="f807b024-fc6c-46d1-8db7-2694838f3a44" CreationDate="2022-10-25T11:01:04.373" UserId="341" Comment="update dfor the current state of things." Text="While Alex Bean's answer would be perfectly right if things were running normally, in this particular case, the question was asked because something went wrong, while using the latest node-template v9.30&#xD;&#xA;&#xD;&#xA;The issue here is that the `RuntimeEvent` could not be decoded by the api, and hence the UI. Because of this the Error event could also not be decoded and the UI was therefore only showing the green notification that the extrinsic was in a block, but NOT followed by any subsequent red notification, that would mean that something went wrong at run time. This is something that has subsequently been fixed at [the pjs api level][1], another fix would have been if the node-template used weight v2.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/issues/8259" ContentLicense="CC BY-SA 4.0" />
  <row Id="20816" PostHistoryTypeId="2" PostId="5533" RevisionGUID="96499ad5-6e8d-4b7f-a77f-41150e186b34" CreationDate="2022-10-25T13:15:01.663" UserId="2673" Text="I think that in order to achieve what you're trying to do, you need to put an explicit trait bound in your pallet's config, enforcing `AssetId` type to be incrementable.&#xD;&#xA;&#xD;&#xA;I would do it like this (assuming we're tightly coupling):&#xD;&#xA;```rust&#xD;&#xA;use frame_support::sp_runtime::traits::{Saturating, One};&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: pallet_assets::Config {&#xD;&#xA;    type AssetId: IsType&lt;&lt;T as pallet_assets::Config&gt;::AssetId&gt;&#xD;&#xA;        + Saturating&#xD;&#xA;        + One;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type AssetIdOf&lt;T&gt; = &lt;T as Config&gt;::AssetId;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you should be able to increment values of type `AssetId` like this:&#xD;&#xA;```rust&#xD;&#xA;asset_id.saturating_inc();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20818" PostHistoryTypeId="2" PostId="5534" RevisionGUID="39d1c8cc-6ba5-4237-89fd-19280c72ce25" CreationDate="2022-10-25T16:05:48.577" UserId="2898" Text="I am running substrate-dev node. Made a transaction using Polkadot-explorer. After fetching the block using subxt I am getting extrinsic hex as:&#xD;&#xA;&#xD;&#xA;`&#xD;&#xA;8400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d016a0d5d23b65049765a0141666edf0108dc326ced62c96a3092a74471c3bd00382aa84dfd9b12ce199560a26ac6126e1f5f50a59bd50c798f408979843153908c66071000000008081234&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;I want to convert this hex into a readable form in rust." ContentLicense="CC BY-SA 4.0" />
  <row Id="20820" PostHistoryTypeId="1" PostId="5534" RevisionGUID="39d1c8cc-6ba5-4237-89fd-19280c72ce25" CreationDate="2022-10-25T16:05:48.577" UserId="2898" Text="Decoding extrinsic hex into readable form in Rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="20821" PostHistoryTypeId="3" PostId="5534" RevisionGUID="39d1c8cc-6ba5-4237-89fd-19280c72ce25" CreationDate="2022-10-25T16:05:48.577" UserId="2898" Text="|rust|extrinsic|subxt|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20822" PostHistoryTypeId="2" PostId="5535" RevisionGUID="509b4e30-0209-4a80-9b28-b2be827371c6" CreationDate="2022-10-25T16:11:41.353" UserId="251" Text="You need to confirm the `Type` first.&#xD;&#xA;&#xD;&#xA;Then:&#xD;&#xA;```rs&#xD;&#xA;use parity_scale_codec::Decode;&#xD;&#xA;&#xD;&#xA;#[derive(Debug, Decode)]&#xD;&#xA;struct MockExtrinsicType { .. }&#xD;&#xA;&#xD;&#xA;let extrinsic = MockExtrinsicType::decode(&amp;mut &amp;*array_bytes::hex2bytes_unchecked(&quot;8400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d016a0d5d23b65049765a0141666edf0108dc326ced62c96a3092a74471c3bd00382aa84dfd9b12ce199560a26ac6126e1f5f50a59bd50c798f408979843153908c66071000000008081234&quot;));&#xD;&#xA;println!(&quot;{:?}&quot;, extrinsic);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20824" PostHistoryTypeId="5" PostId="5535" RevisionGUID="16f2b455-7084-4667-8bc8-3f1a98f83405" CreationDate="2022-10-25T16:27:11.643" UserId="251" Comment="added 312 characters in body" Text="You need to confirm the `Type` first.&#xD;&#xA;&#xD;&#xA;Then:&#xD;&#xA;```rs&#xD;&#xA;use parity_scale_codec::Decode;&#xD;&#xA;&#xD;&#xA;#[derive(Debug, Decode)]&#xD;&#xA;struct MockExtrinsicType { .. }&#xD;&#xA;&#xD;&#xA;let extrinsic = MockExtrinsicType::decode(&amp;mut &amp;*array_bytes::hex2bytes_unchecked(&quot;8400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d016a0d5d23b65049765a0141666edf0108dc326ced62c96a3092a74471c3bd00382aa84dfd9b12ce199560a26ac6126e1f5f50a59bd50c798f408979843153908c66071000000008081234&quot;));&#xD;&#xA;println!(&quot;{:?}&quot;, extrinsic);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Usually, the block type is https://github.com/paritytech/substrate/blob/f2bc08a3071a91b71fec63cf2b22c707411cec0e/primitives/runtime/src/generic/block.rs#L92.&#xD;&#xA;&#xD;&#xA;And the extrinsic type is https://github.com/paritytech/substrate/blob/f2bc08a3071a91b71fec63cf2b22c707411cec0e/primitives/runtime/src/lib.rs#L868.&#xD;&#xA;&#xD;&#xA;Finally, you need to decode the `OpaqueExtrinsic` into this https://github.com/paritytech/substrate/blob/f2bc08a3071a91b71fec63cf2b22c707411cec0e/primitives/runtime/src/generic/unchecked_extrinsic.rs#L44." ContentLicense="CC BY-SA 4.0" />
  <row Id="20825" PostHistoryTypeId="5" PostId="5534" RevisionGUID="65ffaefe-0466-492c-bec3-9151b4df3988" CreationDate="2022-10-25T16:32:39.917" UserId="251" Comment="added 8 characters in body" Text="I am running the substrate-dev node. Made a transaction using Polkadot-explorer. After fetching the block using subxt I am getting extrinsic hex as:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;8400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d016a0d5d23b65049765a0141666edf0108dc326ced62c96a3092a74471c3bd00382aa84dfd9b12ce199560a26ac6126e1f5f50a59bd50c798f408979843153908c66071000000008081234&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to convert this hex into a readable form in Rust." ContentLicense="CC BY-SA 4.0" />
  <row Id="20826" PostHistoryTypeId="5" PostId="5517" RevisionGUID="c7a9652d-e65b-4387-9d18-a13bd0525e3a" CreationDate="2022-10-25T18:04:51.870" UserId="3362" Comment="corrected spelling" Text="I developed a [custom pallet](https://github.com/Apolixit/pallet_money_pot/blob/master/pallets/money-pot/src/lib.rs) and I would like to allow to try it easily for others developers.&#xD;&#xA;&#xD;&#xA;Is it possible for me to share a [Substrate Playground](https://playground.substrate.dev) workspace and make it public? &#xD;&#xA;I found I can save a workspace but it's only a link to my Github account.&#xD;&#xA;&#xD;&#xA;Thanks a lot for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="20827" PostHistoryTypeId="24" PostId="5517" RevisionGUID="c7a9652d-e65b-4387-9d18-a13bd0525e3a" CreationDate="2022-10-25T18:04:51.870" Comment="Proposed by 3362 approved by 1864 edit id of 325" ContentLicense="CC BY-SA 4.0" />
  <row Id="20828" PostHistoryTypeId="2" PostId="5536" RevisionGUID="b7bb1d9e-951b-4186-9e1f-0bbc44e92367" CreationDate="2022-10-25T19:06:19.723" UserId="377" Text="I want to launch my own token with Substrate chain. What is the best way to implement it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20830" PostHistoryTypeId="1" PostId="5536" RevisionGUID="b7bb1d9e-951b-4186-9e1f-0bbc44e92367" CreationDate="2022-10-25T19:06:19.723" UserId="377" Text="What is the best way to create own token in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20831" PostHistoryTypeId="3" PostId="5536" RevisionGUID="b7bb1d9e-951b-4186-9e1f-0bbc44e92367" CreationDate="2022-10-25T19:06:19.723" UserId="377" Text="|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20832" PostHistoryTypeId="2" PostId="5537" RevisionGUID="dee0dfb4-47f2-44ce-b779-c5cf34fb24e0" CreationDate="2022-10-25T19:50:22.913" UserId="3344" Text="Long term bridges seem the right way: [bridge pallets](https://wiki.polkadot.network/docs/learn-bridges#via-bridge-pallets)&#xD;&#xA;&#xD;&#xA;Right now they are under heavy development, but there are some [docs](https://github.com/paritytech/parity-bridges-common/blob/master/docs/high-level-overview.md) and there are nine (9) [relay clients](https://github.com/paritytech/parity-bridges-common/tree/master/relays) implemented at this time." ContentLicense="CC BY-SA 4.0" />
  <row Id="20834" PostHistoryTypeId="5" PostId="5537" RevisionGUID="a1943de6-6c5a-439e-ad33-e37e1e5b680b" CreationDate="2022-10-25T19:57:30.867" UserId="3344" Comment="added 194 characters in body" Text="Long term bridges seem the right way: [bridge pallets](https://wiki.polkadot.network/docs/learn-bridges#via-bridge-pallets)&#xD;&#xA;&#xD;&#xA;In fact right now the [testing document](https://github.com/paritytech/parity-bridges-common/blob/master/docs/testing-scenarios.md#testing-scenarios) deals with a Polkadot-Kusama bridge.&#xD;&#xA; &#xD;&#xA;The code is currently under heavy development, but there are some [docs](https://github.com/paritytech/parity-bridges-common/blob/master/docs/high-level-overview.md) and there are nine (9) [relay clients](https://github.com/paritytech/parity-bridges-common/tree/master/relays) implemented at this time." ContentLicense="CC BY-SA 4.0" />
  <row Id="20835" PostHistoryTypeId="2" PostId="5538" RevisionGUID="9df5c025-2eeb-414f-afed-0ec510ba9872" CreationDate="2022-10-25T20:17:30.060" UserId="28" Text="The answer to this was mentioned in the validator channel.&#xD;&#xA;&#xD;&#xA;The issue was that the node was started with the `--tmp` or `--dev` flag which places all of the node generated files like the keystore into a temporary directory which is cleaned up when the node is shut down.&#xD;&#xA;&#xD;&#xA;The answer is to provide a `--base-path` argument, which will place all of those files into a specified path, and that folder wont be cleaned up." ContentLicense="CC BY-SA 4.0" />
  <row Id="20837" PostHistoryTypeId="2" PostId="5539" RevisionGUID="4c13255c-956e-4053-bb18-246699a921ae" CreationDate="2022-10-25T20:26:05.183" UserId="3265" Text="The pallet-balance that comes preconfigured with https://github.com/substrate-developer-hub/substrate-node-template is the way to go." ContentLicense="CC BY-SA 4.0" />
  <row Id="20843" PostHistoryTypeId="2" PostId="5541" RevisionGUID="69e2a026-f91e-4141-a469-d3680378ddaf" CreationDate="2022-10-25T22:57:26.463" UserId="3346" Text="After some great insight from the Web3 Foundation folks on the Polkadot Discord, we have found that Grandpa Voter errors are NOT at all normal or to be expected and we have found some potential solutions! Closing this question out now to focus on the solutions. Details on solutions will be posted on https://substrate.stackexchange.com/questions/5415/how-to-prevent-grandpa-voter-error-and-randomly-deleted-keystore/5538#5538 " ContentLicense="CC BY-SA 4.0" />
  <row Id="20845" PostHistoryTypeId="5" PostId="5524" RevisionGUID="d183d82d-2404-4a6d-a8bd-232bc5f15e8f" CreationDate="2022-10-25T23:09:02.233" UserId="2673" Comment="JS syntax highlighting" Text="- Problem&#xD;&#xA;  - The following program does not work with pallet-contract &quot;polkadot-v0.9.29&quot;.&#xD;&#xA;  - &quot;polkadot-v0.9.27&quot; in pallet-contract works as expected.&#xD;&#xA;  - Anyone know how to get around this issue?&#xD;&#xA; &#xD;&#xA;- Source Code&#xD;&#xA;```javascript&#xD;&#xA;  const gasLimit = 100000 * 1000000;&#xD;&#xA;  const storageDepositLimit = null;&#xD;&#xA;&#xD;&#xA;  const deployContract = async () =&gt; {&#xD;&#xA;    const { web3FromSource } = await import(&quot;@polkadot/extension-dapp&quot;);&#xD;&#xA;    const wsProvider = new WsProvider(blockchainUrl);&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const contractWasm = contract_file.source.wasm;&#xD;&#xA;    const code = new CodePromise(api, abi, contractWasm);&#xD;&#xA;    const initValue = false;&#xD;&#xA;    const performingAccount = accounts[0];&#xD;&#xA;    const injector = await web3FromSource(performingAccount.meta.source);&#xD;&#xA;    &#xD;&#xA;    const tx = code.tx.new({ value:0, gasLimit:gasLimit,storageDepositLimit }, initValue);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- I get the following error:&#xD;&#xA;```&#xD;&#xA;Unhandled Runtime Error&#xD;&#xA;Error: createType(Call):: Call: failed decoding contracts.instantiateWithCode:: Struct: failed on args: {&quot;value&quot;:&quot;Compact&lt;u128&gt;&quot;,&quot;gas_limit&quot;:&quot;Compact&lt;FrameSupportWeightsWeightV2Weight&gt;&quot;,&quot;storage_deposit_limit&quot;:&quot;Option&lt;Compact&lt;u128&gt;&gt;&quot;,&quot;code&quot;:&quot;Bytes&quot;,&quot;data&quot;:&quot;Bytes&quot;,&quot;salt&quot;:&quot;Bytes&quot;}:: Struct: failed on gas_limit: Compact&lt;FrameSupportWeightsWeightV2Weight&gt;:: Struct: Cannot decode value 100000000000 (typeof number), expected an input object, map or array&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Somebody please help me.&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="20846" PostHistoryTypeId="24" PostId="5524" RevisionGUID="d183d82d-2404-4a6d-a8bd-232bc5f15e8f" CreationDate="2022-10-25T23:09:02.233" Comment="Proposed by 2673 approved by 3114 edit id of 324" ContentLicense="CC BY-SA 4.0" />
  <row Id="20847" PostHistoryTypeId="2" PostId="5542" RevisionGUID="7e4fff4a-9a9c-4853-81f6-f281b53c6d58" CreationDate="2022-10-25T23:17:27.797" UserId="3368" Text="I have a question for polkadot-js api.&#xD;&#xA;is there any method in polakdot-js api to multi-call smart-contract's function like multi-call (https://github.com/makerdao/multicall)&#xD;&#xA;&#xD;&#xA;Especially, I want to fetch balances of multiples psp22 token's balance.&#xD;&#xA;for example, let's say, Alice who holds USDC(psp22), USDT(psp22), and WETH(psp22). and we want to fetch Alices's all tokens balance at once like we can do multi-call in EVM compatible chain. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20849" PostHistoryTypeId="1" PostId="5542" RevisionGUID="7e4fff4a-9a9c-4853-81f6-f281b53c6d58" CreationDate="2022-10-25T23:17:27.797" UserId="3368" Text="is there any method in polakdot.js api to multi-call smart-contract's function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20850" PostHistoryTypeId="3" PostId="5542" RevisionGUID="7e4fff4a-9a9c-4853-81f6-f281b53c6d58" CreationDate="2022-10-25T23:17:27.797" UserId="3368" Text="|polkadot-js|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20851" PostHistoryTypeId="2" PostId="5543" RevisionGUID="1e959532-9521-4072-b3a0-956e69ef66cf" CreationDate="2022-10-26T00:08:44.677" UserId="3142" Text="Is it possible to use `std` for benchmarks?  If not, how can I get timestamps in a benchmark?&#xD;&#xA;&#xD;&#xA;I tried using this but it didn't compile:&#xD;&#xA;&#xD;&#xA;     #[cfg(feature = &quot;runtime-benchmarks&quot;)] extern crate std;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20853" PostHistoryTypeId="1" PostId="5543" RevisionGUID="1e959532-9521-4072-b3a0-956e69ef66cf" CreationDate="2022-10-26T00:08:44.677" UserId="3142" Text="Use std in benchmarks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20854" PostHistoryTypeId="3" PostId="5543" RevisionGUID="1e959532-9521-4072-b3a0-956e69ef66cf" CreationDate="2022-10-26T00:08:44.677" UserId="3142" Text="|rust|benchmarking|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20855" PostHistoryTypeId="50" PostId="4995" RevisionGUID="83aa89cf-6950-4955-9690-f8ae39149d29" CreationDate="2022-10-26T08:05:10.597" UserId="-1" />
  <row Id="20856" PostHistoryTypeId="2" PostId="5544" RevisionGUID="01afea5a-721c-45e5-865d-268175978991" CreationDate="2022-10-26T08:05:42.950" UserId="3364" Text="At my current company we are using Substrate for our developments, we have an automated setup with test and whatnot. We are now evaulating our options regarding code coverage.&#xD;&#xA;&#xD;&#xA;We are thinking of a combination of `cargo-tarpaulin` with `codecov` since we use Github actions for our CI.&#xD;&#xA;&#xD;&#xA;We were wondering though, what recommended setups are there, specially because although substrate code is based on Rust, the specific macro usage in some scenarios makes code coverage analysis a bit more complicated.&#xD;&#xA;&#xD;&#xA;Our end goal is to mainly cover our own developed pallets, like so:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;cargo tarpaulin&#xD;&#xA;  --no-fail-fast \&#xD;&#xA;  --workspace \&#xD;&#xA;  --exclude-files node/* primitives/* rpc/* runtime/*&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in the end, my question is: **What is the recommended approach for code coverage in Substrate?**&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20858" PostHistoryTypeId="1" PostId="5544" RevisionGUID="01afea5a-721c-45e5-865d-268175978991" CreationDate="2022-10-26T08:05:42.950" UserId="3364" Text="Code coverage setup in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="20859" PostHistoryTypeId="3" PostId="5544" RevisionGUID="01afea5a-721c-45e5-865d-268175978991" CreationDate="2022-10-26T08:05:42.950" UserId="3364" Text="|rust|cicd|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20860" PostHistoryTypeId="50" PostId="4970" RevisionGUID="bb3812a2-2d75-41e8-873e-6bed9ea5e784" CreationDate="2022-10-26T09:11:11.417" UserId="-1" />
  <row Id="20861" PostHistoryTypeId="2" PostId="5545" RevisionGUID="802599a5-98db-4707-8aee-bf504326c9d4" CreationDate="2022-10-26T09:26:10.450" UserId="2762" Text="You have several options to launch your own token on Substrate:&#xD;&#xA;&#xD;&#xA; - Using the Contract pallet to implement a token, take a look at this [ERC20 token tutorial][1]&#xD;&#xA; - With the [balances pallet][2]&#xD;&#xA; - Using the EVM pallet to implement a Solidity ERC20 token&#xD;&#xA; - Use the [Assets pallet][3].&#xD;&#xA; - Create your [own pallet][4].&#xD;&#xA;&#xD;&#xA;Take a look into this great [Substrate Seminar][5], for more information.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/smart-contracts/build-a-token-contract/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/frame/balances&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/master/frame/assets&#xD;&#xA;  [4]: https://docs.substrate.io/tutorials/work-with-pallets/use-macros-in-a-custom-pallet/&#xD;&#xA;  [5]: https://www.youtube.com/watch?v=7qkqEfToH8w" ContentLicense="CC BY-SA 4.0" />
  <row Id="20874" PostHistoryTypeId="2" PostId="5548" RevisionGUID="99f251d4-41da-435b-b600-aef9c1551d7c" CreationDate="2022-10-26T11:47:18.350" UserId="620" Text="When a collator passes a PoV to a validator, how does the validator know that the node is a valid collator for a given parachain, and that they had permission to author a block in that slot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20876" PostHistoryTypeId="1" PostId="5548" RevisionGUID="99f251d4-41da-435b-b600-aef9c1551d7c" CreationDate="2022-10-26T11:47:18.350" UserId="620" Text="How does a validator know that a given collator can author?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20877" PostHistoryTypeId="3" PostId="5548" RevisionGUID="99f251d4-41da-435b-b600-aef9c1551d7c" CreationDate="2022-10-26T11:47:18.350" UserId="620" Text="|substrate-node|validator|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20878" PostHistoryTypeId="2" PostId="5549" RevisionGUID="c1b48c44-27cd-4ea3-863c-fcdfb2454323" CreationDate="2022-10-26T12:03:35.307" UserId="620" Text="I'm trying to run a Statemint node using the [parity/polkadot-parachain](https://hub.docker.com/r/parity/polkadot-parachain/tags) docker image. However, I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;docker run --rm -it --entrypoint bash parity/polkadot-parachain&#xD;&#xA;&#xD;&#xA;polkadot-parachain --chain statemint&#xD;&#xA;&#xD;&#xA;2022-10-26 10:14:17 Failed to run the sequential write disk benchmark: failed to create a test file: No such file or directory (os error 2)&#xD;&#xA;2022-10-26 10:14:17 Failed to run the random write disk benchmark: failed to create a test file: No such file or directory (os error 2)&#xD;&#xA;Error: Service(Keystore(Io(Os { code: 13, kind: PermissionDenied, message: &quot;Permission denied&quot; })))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is a docker run command to make a parachain node work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20880" PostHistoryTypeId="1" PostId="5549" RevisionGUID="c1b48c44-27cd-4ea3-863c-fcdfb2454323" CreationDate="2022-10-26T12:03:35.307" UserId="620" Text="How to run parachain node in Docker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20881" PostHistoryTypeId="3" PostId="5549" RevisionGUID="c1b48c44-27cd-4ea3-863c-fcdfb2454323" CreationDate="2022-10-26T12:03:35.307" UserId="620" Text="|substrate-node|cumulus|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20882" PostHistoryTypeId="2" PostId="5550" RevisionGUID="b16f0241-8197-4dd5-bcfc-9844b4045593" CreationDate="2022-10-26T12:35:50.813" UserId="73" Text="The relay chain validator can not know this and doesn't know this. It will accept any PoV and it should fail at validation if the author isn't the correct one. This is the job of the validation code to ensure that only eligible author(s) are producing blocks. &#xD;&#xA;&#xD;&#xA;In the future there will be some changes on the relay chain side to have some lightweight check. This would be used by the validators when a collator opens a connection to ensure that this collator is eligible to build the PoV. This check could for example be the verifying of the signature in the header. Putting this into some extra check before downloading the actual PoV reduces the bandwidth requirements as you only need to send the header plus a proof to verify the signature." ContentLicense="CC BY-SA 4.0" />
  <row Id="20886" PostHistoryTypeId="5" PostId="5542" RevisionGUID="bd38adea-e47e-4b2d-9001-7aea6be1a1f5" CreationDate="2022-10-26T13:35:05.567" UserId="34" Comment="deleted 68 characters in body" Text="Is there any method in polakdot-js api to multi-call smart-contract's function similar to https://github.com/makerdao/multicall ?&#xD;&#xA;&#xD;&#xA;I want to fetch balances of multiples psp22 token's balance.&#xD;&#xA;For example: Alice who holds USDC(psp22), USDT(psp22), and WETH(psp22). and we want to fetch Alices's all tokens balance at once like we can do multi-call in EVM compatible chain. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20891" PostHistoryTypeId="2" PostId="5553" RevisionGUID="0e835900-dcf0-4ad6-aa08-d5b16984ca11" CreationDate="2022-10-26T13:55:11.697" UserId="3088" Text="According to substrate and polkadot guides i learned that parathreads must participate in per block auctions. But I can't figure out how to do this exactly. How to participate in such auctions and set a bid? From where can I manage that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20893" PostHistoryTypeId="1" PostId="5553" RevisionGUID="0e835900-dcf0-4ad6-aa08-d5b16984ca11" CreationDate="2022-10-26T13:55:11.697" UserId="3088" Text="How to produce in block auctions as a parathread?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20894" PostHistoryTypeId="3" PostId="5553" RevisionGUID="0e835900-dcf0-4ad6-aa08-d5b16984ca11" CreationDate="2022-10-26T13:55:11.697" UserId="3088" Text="|parathread|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20896" PostHistoryTypeId="2" PostId="5554" RevisionGUID="6f6225a3-fd9f-414c-9ed7-e14e443fb38d" CreationDate="2022-10-26T16:06:39.160" UserId="2762" Text="I have the template pallet in the  [Substrate node template][1]. &#xD;&#xA;This pallet template has a function `do_something` that store a value in the storage.&#xD;&#xA;&#xD;&#xA;I would like to create an RPC call that queries that value in the storage and make it accessible from my node.&#xD;&#xA;&#xD;&#xA;How do I do this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="20898" PostHistoryTypeId="1" PostId="5554" RevisionGUID="6f6225a3-fd9f-414c-9ed7-e14e443fb38d" CreationDate="2022-10-26T16:06:39.160" UserId="2762" Text="How to add custom RPCs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20899" PostHistoryTypeId="3" PostId="5554" RevisionGUID="6f6225a3-fd9f-414c-9ed7-e14e443fb38d" CreationDate="2022-10-26T16:06:39.160" UserId="2762" Text="|substrate-node-template|rpc|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20900" PostHistoryTypeId="2" PostId="5555" RevisionGUID="83e263d8-fef4-4ed4-bee1-277417a03117" CreationDate="2022-10-26T16:07:08.363" UserId="2762" Text="&gt; Remote Procedure Calls, or RPCs, are a way for an external program—for example, a browser or front-end application—to communicate with a Substrate node.&#xD;&#xA;Substrate comes with several default [RPCs][1] and you can also add your [custom RPC][2] calls.&#xD;&#xA;&#xD;&#xA;First of all create the custom RPC call in the template pallet and after set up the node for the pallet-template custom RPC.&#xD;&#xA;&#xD;&#xA;# Add custom RPC in our pallet&#xD;&#xA;&#xD;&#xA;Inside the pallet template folder create a new folder called rpc: `pallets/template/src/rpc`&#xD;&#xA;&#xD;&#xA;The RPC call interacts with the pallet-tempate runtime API to call the function that gets the value. For that you need to create a pallet-template-runtime-api. Create a new folder inside the rpc folder: `pallets/template/src/rpc/runtime-api`&#xD;&#xA;&#xD;&#xA;This folder can live anywhere you like, but because it defines an API that is closely related to a particular pallet, it makes sense to include the API definition in the pallet’s directory.&#xD;&#xA;&#xD;&#xA;Create the `Cargo.toml` file for the runtime-api package. In `pallets/template/src/rpc/runtime-api/Cargo.toml`&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-template-runtime-api&quot;&#xD;&#xA;authors = [&quot;Alex Bean &lt;https://github.com/AlexD10S&gt;&quot;]&#xD;&#xA;version = &quot;1.0.0&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;sp-api = { git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;sp-api/std&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;And define the runtime API interface: `pallets/template/src/rpc/runtime-api/src/lib.rs`&#xD;&#xA;&#xD;&#xA;The code to define the API is quite simple, and looks almost like any old Rust trait. The one addition is that it must be placed in the decl_runtime_apis! macro. This macro allows the outer node to query the runtime API at specific blocks. Although this runtime API only provides a single function, you may write as many as you like.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;// Here we declare the runtime API. It is implemented it the `impl` block in&#xD;&#xA;// runtime file (the `runtime/src/lib.rs`)&#xD;&#xA;sp_api::decl_runtime_apis! {&#xD;&#xA;	pub trait TemplateApi {&#xD;&#xA;		fn get_value() -&gt; u32;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Now define the RPC. Create a folder `Cargo.toml` in the rpc folder: `pallets/template/src/rpc/Cargo.toml`&#xD;&#xA;&#xD;&#xA;Here import the runtime-api defined before:&#xD;&#xA;&#xD;&#xA;    pallet-template-runtime-api = { path = &quot;./runtime-api&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;And the [JSON-RPC library][3] for Rust.&#xD;&#xA;&#xD;&#xA;    jsonrpsee = { version = &quot;0.15.1&quot;, features = [&quot;server&quot;, &quot;macros&quot;] }&#xD;&#xA;&#xD;&#xA;Full file:&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-template-rpc&quot;&#xD;&#xA;version = &quot;1.0.0&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;authors = [&quot;Alex Bean &lt;https://github.com/AlexD10S&gt;&quot;]&#xD;&#xA;description = 'RPC methods for the template pallet'&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;&#xD;&#xA;jsonrpsee = { version = &quot;0.15.1&quot;, features = [&quot;server&quot;, &quot;macros&quot;] }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Substrate packages&#xD;&#xA;&#xD;&#xA;sp-api = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;sp-blockchain = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;sp-runtime = { default-features = false, version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.28&quot; }&#xD;&#xA;&#xD;&#xA;# local packages&#xD;&#xA;pallet-template-runtime-api = { path = &quot;./runtime-api&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;  &quot;sp-api/std&quot;,&#xD;&#xA;  &quot;sp-runtime/std&quot;,&#xD;&#xA;  &quot;pallet-template-runtime-api/std&quot;&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Inside the rpc folder create a src folder with a lib.rs where define the Pallet Template RPC:&#xD;&#xA;&#xD;&#xA;**First define the RPC interface.**&#xD;&#xA;Notice that the struct that implements the RPC needs a reference to the client. This is necessary so you can actually call into the runtime.&#xD;&#xA;&#xD;&#xA;And the struct is generic over the BlockHash type. This is because it will call a runtime API, and runtime APIs must always be called at a specific block.&#xD;&#xA;```&#xD;&#xA;#[rpc(client, server)]&#xD;&#xA;pub trait TemplateApi&lt;BlockHash&gt; {&#xD;&#xA;	#[method(name = &quot;template_getValue&quot;)]&#xD;&#xA;	fn get_value(&amp;self, at: Option&lt;BlockHash&gt;) -&gt; RpcResult&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// A struct that implements the `TemplateApi`.&#xD;&#xA;pub struct TemplatePallet&lt;C, Block&gt; {&#xD;&#xA;	// If you have more generics, no need to TemplatePallet&lt;C, M, N, P, ...&gt;&#xD;&#xA;	// just use a tuple like TemplatePallet&lt;C, (M, N, P, ...)&gt;&#xD;&#xA;	client: Arc&lt;C&gt;,&#xD;&#xA;	_marker: std::marker::PhantomData&lt;Block&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;C, Block&gt; TemplatePallet&lt;C, Block&gt; {&#xD;&#xA;	/// Create new `TemplatePallet` instance with the given reference to the client.&#xD;&#xA;	pub fn new(client: Arc&lt;C&gt;) -&gt; Self {&#xD;&#xA;		Self { client, _marker: Default::default() }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**Now the RPC’s implementation.**&#xD;&#xA;The additional syntax here is related to calling the runtime at a specific block, as well as ensuring that the runtime you’re calling actually has the correct runtime API available.&#xD;&#xA;```&#xD;&#xA;impl&lt;C, Block&gt; TemplateApiServer&lt;&lt;Block as BlockT&gt;::Hash&gt; for TemplatePallet&lt;C, Block&gt;&#xD;&#xA;where&#xD;&#xA;	Block: BlockT,&#xD;&#xA;	C: Send + Sync + 'static + ProvideRuntimeApi&lt;Block&gt; + HeaderBackend&lt;Block&gt;,&#xD;&#xA;	C::Api: TemplateRuntimeApi&lt;Block&gt;,&#xD;&#xA;{&#xD;&#xA;	fn get_value(&amp;self, at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;) -&gt; RpcResult&lt;u32&gt; {&#xD;&#xA;		let api = self.client.runtime_api();&#xD;&#xA;		let at = BlockId::hash(at.unwrap_or_else(||self.client.info().best_hash));&#xD;&#xA;&#xD;&#xA;		api.get_value(&amp;at).map_err(runtime_error_into_rpc_err)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const RUNTIME_ERROR: i32 = 1;&#xD;&#xA;&#xD;&#xA;/// Converts a runtime trap into an RPC error.&#xD;&#xA;fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -&gt; JsonRpseeError {&#xD;&#xA;	CallError::Custom(ErrorObject::owned(&#xD;&#xA;		RUNTIME_ERROR,&#xD;&#xA;		&quot;Runtime error&quot;,&#xD;&#xA;		Some(format!(&quot;{:?}&quot;, err)),&#xD;&#xA;	))&#xD;&#xA;	.into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**The full file** in `pallets/template/src/rpc/src/lib.rs`:&#xD;&#xA;```&#xD;&#xA;pub use pallet_template_runtime_api::TemplateApi as TemplateRuntimeApi;&#xD;&#xA;use jsonrpsee::{&#xD;&#xA;	core::{Error as JsonRpseeError, RpcResult},&#xD;&#xA;	proc_macros::rpc,&#xD;&#xA;	types::error::{CallError, ErrorObject},&#xD;&#xA;};&#xD;&#xA;use sp_api::ProvideRuntimeApi;&#xD;&#xA;use sp_blockchain::HeaderBackend;&#xD;&#xA;use sp_runtime::{generic::BlockId, traits::Block as BlockT};&#xD;&#xA;use std::sync::Arc;&#xD;&#xA;&#xD;&#xA;#[rpc(client, server)]&#xD;&#xA;pub trait TemplateApi&lt;BlockHash&gt; {&#xD;&#xA;	#[method(name = &quot;template_getValue&quot;)]&#xD;&#xA;	fn get_value(&amp;self, at: Option&lt;BlockHash&gt;) -&gt; RpcResult&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// A struct that implements the `TemplateApi`.&#xD;&#xA;pub struct TemplatePallet&lt;C, Block&gt; {&#xD;&#xA;	// If you have more generics, no need to TemplatePallet&lt;C, M, N, P, ...&gt;&#xD;&#xA;	// just use a tuple like TemplatePallet&lt;C, (M, N, P, ...)&gt;&#xD;&#xA;	client: Arc&lt;C&gt;,&#xD;&#xA;	_marker: std::marker::PhantomData&lt;Block&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;C, Block&gt; TemplatePallet&lt;C, Block&gt; {&#xD;&#xA;	/// Create new `TemplatePallet` instance with the given reference to the client.&#xD;&#xA;	pub fn new(client: Arc&lt;C&gt;) -&gt; Self {&#xD;&#xA;		Self { client, _marker: Default::default() }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;C, Block&gt; TemplateApiServer&lt;&lt;Block as BlockT&gt;::Hash&gt; for TemplatePallet&lt;C, Block&gt;&#xD;&#xA;where&#xD;&#xA;	Block: BlockT,&#xD;&#xA;	C: Send + Sync + 'static + ProvideRuntimeApi&lt;Block&gt; + HeaderBackend&lt;Block&gt;,&#xD;&#xA;	C::Api: TemplateRuntimeApi&lt;Block&gt;,&#xD;&#xA;{&#xD;&#xA;	fn get_value(&amp;self, at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;) -&gt; RpcResult&lt;u32&gt; {&#xD;&#xA;		let api = self.client.runtime_api();&#xD;&#xA;		let at = BlockId::hash(at.unwrap_or_else(||self.client.info().best_hash));&#xD;&#xA;&#xD;&#xA;		api.get_value(&amp;at).map_err(runtime_error_into_rpc_err)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const RUNTIME_ERROR: i32 = 1;&#xD;&#xA;&#xD;&#xA;/// Converts a runtime trap into an RPC error.&#xD;&#xA;fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -&gt; JsonRpseeError {&#xD;&#xA;	CallError::Custom(ErrorObject::owned(&#xD;&#xA;		RUNTIME_ERROR,&#xD;&#xA;		&quot;Runtime error&quot;,&#xD;&#xA;		Some(format!(&quot;{:?}&quot;, err)),&#xD;&#xA;	))&#xD;&#xA;	.into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Now modify the pallet implementation** to have a function called `get_value()`, in `pallets/template/src/lib.rs`&#xD;&#xA;Change:&#xD;&#xA;&#xD;&#xA;    #[pallet::getter(fn something)]&#xD;&#xA;&#xD;&#xA;with&#xD;&#xA;&#xD;&#xA;    #[pallet::getter(fn get_value)]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Set up the node for the pallet-template Custom RPC&#xD;&#xA;Implement now in the runtime of the node the function `get_value()` declared in the pallet-template-runtime-api&#xD;&#xA;&#xD;&#xA;Add the runtime-api pallet in the configuration file of the pallet, in:&#xD;&#xA;&#xD;&#xA;    runtime/Cargo.toml&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# local packages&#xD;&#xA;pallet-template-runtime-api = { path = &quot;./runtime-api&quot;, default-features = false }}&#xD;&#xA;And add in the std:&#xD;&#xA;&#xD;&#xA;std = [&#xD;&#xA;    ...,&#xD;&#xA;    &quot;pallet-template-runtime-api/std&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Add the implementation of the runtime function in the pallet:&#xD;&#xA;&#xD;&#xA;    runtime/src/lib.rs&#xD;&#xA;```&#xD;&#xA;impl pallet_template_runtime_api::TemplateApi&lt;Block&gt; for Runtime {&#xD;&#xA;    fn get_value() -&gt; u32 {&#xD;&#xA;        TemplateModule::get_value().unwrap_or(0)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**Install the RPC in the node**&#xD;&#xA;To add the node-specific RPC methods modify the files in the node to include the pallet RPC code manually.&#xD;&#xA;First adding the new pallet in the configuration file in the `node/Config.toml`:&#xD;&#xA;&#xD;&#xA;    pallet-template-rpc = { version = &quot;1.0.0&quot;, path = &quot;../pallets/template/rpc&quot; }&#xD;&#xA;&#xD;&#xA;Then adding the node-specific RPC methods. Modify the file `node/rpc.rs` and there include the pallet template RPC code.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; /// Instantiate all full RPC extensions.&#xD;&#xA;pub fn create_full&lt;C, P&gt;(&#xD;&#xA;	deps: FullDeps&lt;C, P&gt;,&#xD;&#xA;) -&gt; Result&lt;RpcModule&lt;()&gt;, Box&lt;dyn std::error::Error + Send + Sync&gt;&gt;&#xD;&#xA;where&#xD;&#xA;	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;	C: HeaderBackend&lt;Block&gt; + HeaderMetadata&lt;Block, Error = BlockChainError&gt; + 'static,&#xD;&#xA;	C: Send + Sync + 'static,&#xD;&#xA;	C::Api: substrate_frame_rpc_system::AccountNonceApi&lt;Block, AccountId, Index&gt;,&#xD;&#xA;	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi&lt;Block, Balance&gt;,&#xD;&#xA;	C::Api: pallet_template_rpc::TemplateRuntimeApi&lt;Block&gt;,&#xD;&#xA;	C::Api: BlockBuilder&lt;Block&gt;,&#xD;&#xA;	P: TransactionPool + 'static,&#xD;&#xA;{&#xD;&#xA;	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};&#xD;&#xA;	use substrate_frame_rpc_system::{System, SystemApiServer};&#xD;&#xA;	use pallet_template_rpc::{TemplatePallet, TemplateApiServer};&#xD;&#xA;&#xD;&#xA;	let mut module = RpcModule::new(());&#xD;&#xA;	let FullDeps { client, pool, deny_unsafe } = deps;&#xD;&#xA;&#xD;&#xA;	module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?;&#xD;&#xA;	module.merge(TransactionPayment::new(client.clone()).into_rpc())?;&#xD;&#xA;	module.merge(TemplatePallet::new(client).into_rpc())?;&#xD;&#xA;&#xD;&#xA;	// Extend this RPC with a custom API by using the following syntax.&#xD;&#xA;	// `YourRpcStruct` should have a reference to a client, which is needed&#xD;&#xA;	// to call into the runtime.&#xD;&#xA;	// `module.merge(YourRpcTrait::into_rpc(YourRpcStruct::new(ReferenceToClient, ...)))?;`&#xD;&#xA;&#xD;&#xA;	Ok(module)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Run the node and query the RPC using for an example CURL, in the command line:&#xD;&#xA;&#xD;&#xA;    curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;template_getValue&quot;, &quot;params&quot;: []}' http://localhost:9933/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/rpc/&#xD;&#xA;  [2]: https://docs.substrate.io/build/custom-rpc/&#xD;&#xA;  [3]: https://github.com/paritytech/jsonrpsee" ContentLicense="CC BY-SA 4.0" />
  <row Id="20902" PostHistoryTypeId="5" PostId="5553" RevisionGUID="219f1c67-544e-416a-b92f-917438416c7d" CreationDate="2022-10-26T16:13:34.580" UserId="3088" Comment="added 9 characters in body; edited title" Text="According to substrate and polkadot guides i learned that parathreads must participate in per block auctions (right?). But I can't figure out how to do this exactly. How to participate in such auctions and set a bid? From where can I manage that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20903" PostHistoryTypeId="4" PostId="5553" RevisionGUID="219f1c67-544e-416a-b92f-917438416c7d" CreationDate="2022-10-26T16:13:34.580" UserId="3088" Comment="added 9 characters in body; edited title" Text="How to participate in block auctions as a parathread?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20908" PostHistoryTypeId="2" PostId="5557" RevisionGUID="bb5b34aa-0977-4357-b768-a9cc73487172" CreationDate="2022-10-26T17:19:55.030" UserId="2099" Text="After bumping my substrate branch to 0.9.31 along some other changes,&#xD;&#xA;I came across a test case failure which I have a hard time getting to the bottom of.&#xD;&#xA;The node compiles and runs just fine after adjusting to the newest changes.&#xD;&#xA;However the test case error is as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;     Running unittests src/lib.rs (target/debug/deps/node_runtime-663c74491703509f)&#xD;&#xA;&#xD;&#xA;running 3 tests&#xD;&#xA;test __pallet_staking_reward_curve_test_module::reward_curve_piece_count ... ok&#xD;&#xA;test __construct_runtime_integrity_test::runtime_integrity_tests ... FAILED&#xD;&#xA;test __pallet_staking_reward_curve_test_module::reward_curve_precision ... ok&#xD;&#xA;&#xD;&#xA;failures:&#xD;&#xA;&#xD;&#xA;---- __construct_runtime_integrity_test::runtime_integrity_tests stdout ----&#xD;&#xA;thread '__construct_runtime_integrity_test::runtime_integrity_tests' panicked at 'Sensible defaults are tested to be valid; qed: ValidationErrors { has_errors: true, errors: [&quot;[DispatchClass::Normal] Weight { ref_time: 1500000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 5346284000, proof_size: 0 } (base block) &amp; Weight { ref_time: 86298000, proof_size: 0 } (base extrinsic)&quot;, &quot;[DispatchClass::Normal] Some(Weight { ref_time: 1299913702000, proof_size: 0 }) (max_extrinsic) must not be 0. Check base cost and average initialization cost.&quot;, &quot;[DispatchClass::Normal] Weight { ref_time: 2000000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 5432582000, proof_size: 0 } (base weight)&quot;, &quot;[DispatchClass::Operational] Weight { ref_time: 2000000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 5346284000, proof_size: 0 } (base block) &amp; Weight { ref_time: 86298000, proof_size: 0 } (base extrinsic)&quot;, &quot;[DispatchClass::Operational] Some(Weight { ref_time: 1799913702000, proof_size: 0 }) (max_extrinsic) must not be 0. Check base cost and average initialization cost.&quot;, &quot;[DispatchClass::Operational] Weight { ref_time: 500000000000, proof_size: 0 } (reserved) has to be greater than Weight { ref_time: 86298000, proof_size: 0 } (base extrinsic) if set&quot;, &quot;[DispatchClass::Operational] Weight { ref_time: 2000000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 5432582000, proof_size: 0 } (base weight)&quot;, &quot;[DispatchClass::Mandatory] Weight { ref_time: 2000000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 5432582000, proof_size: 0 } (base weight)&quot;] }', /home/magewe/.cargo/git/checkouts/substrate-7e08433d4c370a21/399ab89/frame/system/src/limits.rs:335:14&#xD;&#xA;stack backtrace:&#xD;&#xA;   0:     0x55e8e8237b9d - std::backtrace_rs::backtrace::libunwind::trace::h9135f25bc195152c&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5&#xD;&#xA;   1:     0x55e8e8237b9d - std::backtrace_rs::backtrace::trace_unsynchronized::h015ee85be510df51&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5&#xD;&#xA;   2:     0x55e8e8237b9d - std::sys_common::backtrace::_print_fmt::h5fad03caa9652a2c&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:66:5&#xD;&#xA;   3:     0x55e8e8237b9d - &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt::h2b42ca28d244e5c7&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:45:22&#xD;&#xA;   4:     0x55e8e825b26c - core::fmt::write::h401e827d053130ed&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/fmt/mod.rs:1198:17&#xD;&#xA;   5:     0x55e8e82344b1 - std::io::Write::write_fmt::h1da442c9e1df41d6&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/io/mod.rs:1672:15&#xD;&#xA;   6:     0x55e8e8239665 - std::sys_common::backtrace::_print::h180c4c706ee1d3fb&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:48:5&#xD;&#xA;   7:     0x55e8e8239665 - std::sys_common::backtrace::print::hd0c35d18765761c9&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:35:9&#xD;&#xA;   8:     0x55e8e8239665 - std::panicking::default_hook::{{closure}}::h1f023310983bc730&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:295:22&#xD;&#xA;   9:     0x55e8e8239304 - std::panicking::default_hook::h188fec3334afd5be&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:311:9&#xD;&#xA;  10:     0x55e8e8239bf6 - std::panicking::rust_panic_with_hook::hf26e9d4f97b40096&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:698:17&#xD;&#xA;  11:     0x55e8e8239ae7 - std::panicking::begin_panic_handler::{{closure}}::hfab912107608087a&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:588:13&#xD;&#xA;  12:     0x55e8e8238094 - std::sys_common::backtrace::__rust_end_short_backtrace::h434b685ce8d9965b&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;  13:     0x55e8e8239819 - rust_begin_unwind&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5&#xD;&#xA;  14:     0x55e8e7f44783 - core::panicking::panic_fmt::ha6dc7f2ab2479463&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14&#xD;&#xA;  15:     0x55e8e7f44873 - core::result::unwrap_failed::h42ad8e915aa0a906&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1814:5&#xD;&#xA;  16:     0x55e8e7fed325 - core::result::Result&lt;T,E&gt;::expect::h508fdebde2aaf018&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1064:23&#xD;&#xA;  17:     0x55e8e7fec4a4 - frame_system::limits::BlockWeights::with_sensible_defaults::h2cffca24e7eea67c&#xD;&#xA;                               at /home/magewe/.cargo/git/checkouts/substrate-7e08433d4c370a21/399ab89/frame/system/src/limits.rs:325:3&#xD;&#xA;  18:     0x55e8e7f9b57b - node_runtime::BlockWeights::get::h02bef90c7721618d&#xD;&#xA;                               at /home/magewe/rust/gensyn/node/chain_node/runtime/src/lib.rs:120:57&#xD;&#xA;  19:     0x55e8e7f7684a - &lt;node_runtime::BlockWeights as sp_core::Get&lt;_I&gt;&gt;::get::h777a43037976e2d1&#xD;&#xA;                               at /home/magewe/.cargo/git/checkouts/substrate-7e08433d4c370a21/399ab89/frame/support/src/lib.rs:352:14&#xD;&#xA;  20:     0x55e8e7f4d8e4 - &lt;frame_system::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::Hooks&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::integrity_test::hdd296d2b547ea053&#xD;&#xA;                               at /home/magewe/.cargo/git/checkouts/substrate-7e08433d4c370a21/399ab89/frame/system/src/lib.rs:367:4&#xD;&#xA;  21:     0x55e8e7f4d7e6 - &lt;frame_system::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::IntegrityTest&gt;::integrity_test::hf93211ba02b17b2f&#xD;&#xA;                               at /home/magewe/.cargo/git/checkouts/substrate-7e08433d4c370a21/399ab89/frame/system/src/lib.rs:364:12&#xD;&#xA;  22:     0x55e8e7f4d936 - &lt;(TupleElement0,TupleElement1,TupleElement2,TupleElement3,TupleElement4,TupleElement5,TupleElement6,TupleElement7,TupleElement8,TupleElement9,TupleElement10,TupleElement11,TupleElement12,TupleElement13,TupleElement14,TupleElement15,TupleElement16) as frame_support::traits::hooks::IntegrityTest&gt;::integrity_test::h3b73eb8016b71165&#xD;&#xA;                               at /home/magewe/.cargo/git/checkouts/substrate-7e08433d4c370a21/399ab89/frame/support/src/traits/hooks.rs:219:74&#xD;&#xA;  23:     0x55e8e7f96be6 - node_runtime::__construct_runtime_integrity_test::runtime_integrity_tests::he4135feb2e1f8c75&#xD;&#xA;                               at /home/magewe/rust/gensyn/node/chain_node/runtime/src/lib.rs:544:1&#xD;&#xA;  24:     0x55e8e7f8beaa - node_runtime::__construct_runtime_integrity_test::runtime_integrity_tests::{{closure}}::h05b265d6f91bae10&#xD;&#xA;                               at /home/magewe/rust/gensyn/node/chain_node/runtime/src/lib.rs:544:1&#xD;&#xA;  25:     0x55e8e7f9955e - core::ops::function::FnOnce::call_once::h1ef3cb1884ef51ed&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5&#xD;&#xA;  26:     0x55e8e7fe5f13 - core::ops::function::FnOnce::call_once::h2da14387562cd1a6&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5&#xD;&#xA;  27:     0x55e8e7fe5f13 - test::__rust_begin_short_backtrace::h307c198d88e9e51a&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/test/src/lib.rs:572:5&#xD;&#xA;  28:     0x55e8e7fe4d1a - &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once::h42564b04a6d1df41&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/boxed.rs:1935:9&#xD;&#xA;  29:     0x55e8e7fe4d1a - &lt;core::panic::unwind_safe::AssertUnwindSafe&lt;F&gt; as core::ops::function::FnOnce&lt;()&gt;&gt;::call_once::h286b0e8427b9af31&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panic/unwind_safe.rs:271:9&#xD;&#xA;  30:     0x55e8e7fe4d1a - std::panicking::try::do_call::h0b094c8aa8626e3b&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:492:40&#xD;&#xA;  31:     0x55e8e7fe4d1a - std::panicking::try::h253dd43de0385d2d&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:456:19&#xD;&#xA;  32:     0x55e8e7fe4d1a - std::panic::catch_unwind::h8a89f69958871bf1&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panic.rs:137:14&#xD;&#xA;  33:     0x55e8e7fe4d1a - test::run_test_in_process::h79875496f9bc15c6&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/test/src/lib.rs:595:18&#xD;&#xA;  34:     0x55e8e7fe4d1a - test::run_test::run_test_inner::{{closure}}::hf979093fbdf02646&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/test/src/lib.rs:489:39&#xD;&#xA;  35:     0x55e8e7fb0f4d - test::run_test::run_test_inner::{{closure}}::he01c2dd4903b57d1&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/test/src/lib.rs:516:37&#xD;&#xA;  36:     0x55e8e7fb0f4d - std::sys_common::backtrace::__rust_begin_short_backtrace::hece2f1c514466a0a&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:122:18&#xD;&#xA;  37:     0x55e8e7fb68b8 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h658be5979f99b3a5&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/thread/mod.rs:505:17&#xD;&#xA;  38:     0x55e8e7fb68b8 - &lt;core::panic::unwind_safe::AssertUnwindSafe&lt;F&gt; as core::ops::function::FnOnce&lt;()&gt;&gt;::call_once::h9dbd94372ee944af&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panic/unwind_safe.rs:271:9&#xD;&#xA;  39:     0x55e8e7fb68b8 - std::panicking::try::do_call::hff71896f3757c3b2&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:492:40&#xD;&#xA;  40:     0x55e8e7fb68b8 - std::panicking::try::hbb4c2c2616b6a189&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:456:19&#xD;&#xA;  41:     0x55e8e7fb68b8 - std::panic::catch_unwind::h72f47810ab7e379e&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panic.rs:137:14&#xD;&#xA;  42:     0x55e8e7fb68b8 - std::thread::Builder::spawn_unchecked_::{{closure}}::h6331fb85a785812c&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/thread/mod.rs:504:30&#xD;&#xA;  43:     0x55e8e7fb68b8 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h467656fda03180e5&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5&#xD;&#xA;  44:     0x55e8e823e483 - &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once::h56d5fc072706762b&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/boxed.rs:1935:9&#xD;&#xA;  45:     0x55e8e823e483 - &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once::h41deef8e33b824bb&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/boxed.rs:1935:9&#xD;&#xA;  46:     0x55e8e823e483 - std::sys::unix::thread::Thread::new::thread_start::ha6436304a1170bba&#xD;&#xA;                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys/unix/thread.rs:108:17&#xD;&#xA;  47:     0x7f90e95268fd - &lt;unknown&gt;&#xD;&#xA;  48:     0x7f90e95a8a60 - &lt;unknown&gt;&#xD;&#xA;  49:                0x0 - &lt;unknown&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;failures:&#xD;&#xA;    __construct_runtime_integrity_test::runtime_integrity_tests&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From this I infer that the error originates from inside the construct_runtime! macro, specifically when generating the BlockWeights inside parameter_types!, which I do in the standard way as such:&#xD;&#xA;```&#xD;&#xA;pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights&#xD;&#xA;		::with_sensible_defaults(WEIGHT_PER_SECOND.saturating_mul(2), NORMAL_DISPATCH_RATIO);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm not sure where to look next for the source of this error.&#xD;&#xA;Any hint or suggestion is appreciated!&#xD;&#xA;&#xD;&#xA;Kind regards,&#xD;&#xA;Mathis&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20910" PostHistoryTypeId="1" PostId="5557" RevisionGUID="bb5b34aa-0977-4357-b768-a9cc73487172" CreationDate="2022-10-26T17:19:55.030" UserId="2099" Text="construct_runtime_integrity_test failing" ContentLicense="CC BY-SA 4.0" />
  <row Id="20911" PostHistoryTypeId="3" PostId="5557" RevisionGUID="bb5b34aa-0977-4357-b768-a9cc73487172" CreationDate="2022-10-26T17:19:55.030" UserId="2099" Text="|runtime|weight|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20912" PostHistoryTypeId="2" PostId="5558" RevisionGUID="6e53b555-5c62-4783-828d-62a976c62dee" CreationDate="2022-10-26T19:36:19.723" UserId="94" Text="Good question!  &#xD;&#xA;The reason for this is the [recent introduction](https://github.com/paritytech/substrate/pull/12277) of a new component in the Weight struct; the `proof size`.  &#xD;&#xA;This makes it mandatory to slightly adjust your definition of `BlockWeights` to account for this:  &#xD;&#xA;&#xD;&#xA;This expression&#xD;&#xA;```rust&#xD;&#xA;WEIGHT_PER_SECOND.saturating_mul(2)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;now needs to also needs to declare a maximum proof size:  &#xD;&#xA;```rust&#xD;&#xA;WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(MAX_POV_SIZE)&#xD;&#xA;```&#xD;&#xA;The concrete PoV size limit depends on your chain. Similar to how the maximum normal block weight needs to be defined in the runtime config.  &#xD;&#xA;&#xD;&#xA;Since Calls currently do not expose pre-dispatch PoV size info; you can set this to `u64::MAX`. However this should be changed once the benchmarking produces PoV weights.&#xD;&#xA;&#xD;&#xA;PS: It is better to use `Weight::from_parts` instead of `set_proof_size` since that will cause a compilation error on the next breaking change and you will notice it earlier." ContentLicense="CC BY-SA 4.0" />
  <row Id="20914" PostHistoryTypeId="2" PostId="5559" RevisionGUID="26c1b732-a57f-4e26-9b45-538cabc4bee6" CreationDate="2022-10-26T20:03:39.687" UserId="94" Text="As far as I understand your trait approach is correct.  &#xD;&#xA;The only way of how Pallets are supposed to interact with each other, be it storage or calls, is through traits.  &#xD;&#xA;So you cannot use a storage Item of `PalletA` in `PalletB`. This does just not make sense from a pallet perspective - since pallets are sovereign and independent.  &#xD;&#xA;`PalletB` should not have the possibility to just invalidate the state invariants of `PalletA`. Otherwise `PalletA` will not work correctly.  &#xD;&#xA;&#xD;&#xA;One way is put your storage accesses into a trait and then implementa that in `PalletA`. So `T::Commitments::Commits::&lt;T, I&gt;::contains_key(k1, k2);` becomes `T::CommitmentProvider::has_commitment(k1, k2)` or however you want to call it.  &#xD;&#xA;You can then have a `CommitmentProvider` and `CommitmentStorer` trait which provides and stores commitments respectively - both being implemented by `PalletA`.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20916" PostHistoryTypeId="2" PostId="5560" RevisionGUID="491c7aec-1cac-41e7-9e1a-cbba0e3bfdc2" CreationDate="2022-10-26T20:16:29.317" UserId="94" Text="&gt;What is the recommended approach for code coverage in Substrate?&#xD;&#xA;&#xD;&#xA;TBH I dont think there is any. This topic is under-valued IMO.    &#xD;&#xA;&#xD;&#xA;I have used `kcov` with `Tarpaulin` for a Pallet project in the past and it works reasonably well.  &#xD;&#xA;You can see the GH actions file [here](https://github.com/perun-network/perun-polkadot-pallet/blob/9ef1476028ae53011f51ed7f55bdbfb8f4fc82a7/.github/workflows/rust.yml#L125).  &#xD;&#xA;It needs some manual tweaking for Rust integration tests, since `kvoc` only assumes unit tests and some other annoyances but in general it provides usable coverage info. Especially missing error paths. It also works together with [`Codecov`](https://app.codecov.io/gh/perun-network/perun-polkadot-pallet/).&#xD;&#xA;&#xD;&#xA;There is one [shortcoming](https://github.com/paritytech/substrate/issues/10479) in Substrate of which the TLDR is to not use thread locals in tests *ever*.  &#xD;&#xA;Just use `parameter_types` or storage instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="20918" PostHistoryTypeId="2" PostId="5561" RevisionGUID="22710f2a-4018-43ae-a434-5c148fcf2245" CreationDate="2022-10-26T20:22:42.143" UserId="94" Text="&gt; We faced a situation the other day where we needed some result of std operations inside of our benchmarks.&#xD;&#xA;&#xD;&#xA;There is two ways this goes:  &#xD;&#xA;- It runs in the runtime and is therefore no-std: Use the pallet benchmarking.&#xD;&#xA;- It is std and does not run in the runtime: Use some other benchmarking tools like criterion. However I dont see where this could be needed, since pallet benchmarks cover everything that is normally needed.&#xD;&#xA;&#xD;&#xA;&gt; I imagine there are plenty of other use cases for performing operations depending on std though.&#xD;&#xA;&#xD;&#xA;No. Since the runtime is entirely no-std and the benchmarks only cover on-chain code.  &#xD;&#xA;The only exception is the setup phase, where it would be reasonable to have no-std access for convenience. Otherwise all setup code needs to be no-std as well which is annoying.&#xD;&#xA;&#xD;&#xA;&gt; Specifically, we were looking to generate key pairs and signatures from types given by app_crypto!(Pair and Signature).&#xD;&#xA;&#xD;&#xA;I dont understand why you generate key-pairs on-chain. These are public for everyone to see." ContentLicense="CC BY-SA 4.0" />
  <row Id="20920" PostHistoryTypeId="2" PostId="5562" RevisionGUID="76063706-000c-42ce-9ff5-0bd8526056b6" CreationDate="2022-10-26T20:33:22.567" UserId="94" Text="It is perfectly fine to emit events from `on_initialize`/`on_finalize`. These events get tagged with a different phase. Normally events have phase `ApplyExtrinsic(ext_id)` but here they get `Initialization` and `Finalization` respectively. Just something to look out for in the frontend.&#xD;&#xA;&#xD;&#xA;&gt; Also what is more efficient a) emit burst of 1000 events or b) combine events information in a large Vec&lt;&gt; and then send it wrapping in an event?&#xD;&#xA;&#xD;&#xA;Efficient in what way? Events are a vector in storage to which each new one is appended.  &#xD;&#xA;I would probably just go with the standard approach of *one event per event* to keep the code simple, but I dont think there is a general downside of large events." ContentLicense="CC BY-SA 4.0" />
  <row Id="20922" PostHistoryTypeId="2" PostId="5563" RevisionGUID="adf2b940-8a1a-46ed-a56f-58f21ed49aa7" CreationDate="2022-10-26T20:33:23.977" UserId="635" Text="I was wondering if there is an RPC method similar to [`eth_getLogs`][1].&#xD;&#xA;&#xD;&#xA;What I would like to accomplish is to query all the events of for a given pallet, that meet a certain criteria, and that happened after a certain block. I'm sure that there must be a way to accomplish this, but I haven't found any documentation that explains this.&#xD;&#xA;&#xD;&#xA;Could anyone please let me know what's the RPC method that should be used and how it should be consumed? I would also like to know what's the correct way to encode the topics so that I can query events that meet a certain criteria.&#xD;&#xA;&#xD;&#xA;For instance, how could I query all the `balances.Transfer` events that took place for a certain &quot;sending&quot; Address after a given block? Could anyone please share an example of how that RPC call would look like?&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs" ContentLicense="CC BY-SA 4.0" />
  <row Id="20924" PostHistoryTypeId="1" PostId="5563" RevisionGUID="adf2b940-8a1a-46ed-a56f-58f21ed49aa7" CreationDate="2022-10-26T20:33:23.977" UserId="635" Text="Is there an RPC method similar to `eth_getLogs`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20925" PostHistoryTypeId="3" PostId="5563" RevisionGUID="adf2b940-8a1a-46ed-a56f-58f21ed49aa7" CreationDate="2022-10-26T20:33:23.977" UserId="635" Text="|events|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20926" PostHistoryTypeId="52" PostId="5554" RevisionGUID="4647fd1c-abc6-4e23-b0a9-a263852dd6c2" CreationDate="2022-10-27T00:09:45.767" />
  <row Id="20927" PostHistoryTypeId="5" PostId="358" RevisionGUID="ae6272ae-3037-40c9-b8f5-537e33c4784d" CreationDate="2022-10-27T02:53:23.307" UserId="2673" Comment="Rust syntax highlighting" Text="This error usually occurs when you have forgotten to enable the `runtime-benchmarks` feature flag for dependent crates.&#xD;&#xA;&#xD;&#xA;Inside of `pallet-collective` this trait is implemented, but is hidden behind a feature flag:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;fn successful_origin() -&gt; O {&#xD;&#xA;	let zero_account_id =&#xD;&#xA;		AccountId::decode(&amp;mut sp_runtime::traits::TrailingZeroInput::zeroes())&#xD;&#xA;			.expect(&quot;infinite length input; no invalid inputs for type; qed&quot;);&#xD;&#xA;	O::from(RawOrigin::Member(zero_account_id))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To get this code active, this crate needs to enable the `runtime-benchmarks` feature flag.&#xD;&#xA;&#xD;&#xA;For example, if you are writing your runtime library, you will need to include your pallet like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pallet-collective = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For all of these dependencies, you need to make sure to enable the feature flags for the downstream crates. For example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;frame-collective/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-collective/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20928" PostHistoryTypeId="24" PostId="358" RevisionGUID="ae6272ae-3037-40c9-b8f5-537e33c4784d" CreationDate="2022-10-27T02:53:23.307" Comment="Proposed by 2673 approved by 28 edit id of 326" ContentLicense="CC BY-SA 4.0" />
  <row Id="20929" PostHistoryTypeId="5" PostId="5520" RevisionGUID="39e54194-01a6-4490-b9bb-05cd3ab12457" CreationDate="2022-10-27T02:53:38.537" UserId="2673" Comment="rust syntax highlighting" Text="I struggle understanding conversion. I found a lot of questions here and online that state that converting between substrate primitives and rust primitives can easily be handled with `into()` calls or the `Saturated` package or other stuff.&#xD;&#xA;&#xD;&#xA;I'm trying this with https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs#L197&#xD;&#xA;&#xD;&#xA;There is this (hopelessly outdated) example here: https://github.com/paritytech/substrate/tree/master/frame/assets#simple-code-snippet&#xD;&#xA;&#xD;&#xA;... that does not work with the current version of pallet assets for ages.&#xD;&#xA;&#xD;&#xA;However, so I have:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type AssetIdOf&lt;T&gt; = &lt;T as pallet_assets::Config&gt;::AssetId;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn get_next_asset_id)]&#xD;&#xA;pub type NextAssetId&lt;T&gt; = StorageValue&lt;_, AssetIdOf&lt;T&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and basically all I want to do is add `1` to `NextAssetId`.&#xD;&#xA;&#xD;&#xA;I tried everything but it says that it missed `From&lt;u32&gt;` (on into) or can't add if I do something like `&lt;NextAssetId&lt;T&gt;&gt;::mutate(|asset_id| *asset_id += 1);` or even `&lt;NextAssetId&lt;T&gt;&gt;::mutate(|asset_id| *asset_id += One::one());` as in a very old commit on the repo.&#xD;&#xA; &#xD;&#xA;I'm not sure if i attack this problem correctly at all.&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2857/how-do-i-hardcode-asset-ids" ContentLicense="CC BY-SA 4.0" />
  <row Id="20930" PostHistoryTypeId="24" PostId="5520" RevisionGUID="39e54194-01a6-4490-b9bb-05cd3ab12457" CreationDate="2022-10-27T02:53:38.537" Comment="Proposed by 2673 approved by 28 edit id of 323" ContentLicense="CC BY-SA 4.0" />
  <row Id="20932" PostHistoryTypeId="5" PostId="5563" RevisionGUID="e1d6372e-7ff2-40c1-8bce-18293b54e7ed" CreationDate="2022-10-27T07:16:58.430" UserId="635" Comment="added 17 characters in body; edited title" Text="I was wondering if there is a JSON-RPC method similar to [`eth_getLogs`][1].&#xD;&#xA;&#xD;&#xA;What I would like to accomplish is to query all the events that meet a certain criteria, and that happened after a certain block. I'm sure that there must be a way to accomplish this, but I haven't found any documentation that explains how.&#xD;&#xA;&#xD;&#xA;Could anyone please let me know what's the JSON-RPC method that should be used and how it should be consumed? I would also like to know what's the correct way to encode the topics so that I can query events that meet a certain criteria.&#xD;&#xA;&#xD;&#xA;For instance, how could I query all the `balances.Transfer` events that took place for a certain &quot;sending&quot; Address after a given block? If someone could please share an example of how that JSON-RPC call would look like, that would be perfect.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs" ContentLicense="CC BY-SA 4.0" />
  <row Id="20933" PostHistoryTypeId="4" PostId="5563" RevisionGUID="e1d6372e-7ff2-40c1-8bce-18293b54e7ed" CreationDate="2022-10-27T07:16:58.430" UserId="635" Comment="added 17 characters in body; edited title" Text="Is there a JSON-RPC method similar to `eth_getLogs`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20934" PostHistoryTypeId="2" PostId="5564" RevisionGUID="d24e444f-ab5b-4ca4-ab11-e740483484a5" CreationDate="2022-10-27T07:27:43.357" UserId="3373" Text="Could you show your package.json file? I've faced this error before. The cause is the version of @polkadot/api and @polkadot/typegen do not match. They should have the same version." ContentLicense="CC BY-SA 4.0" />
  <row Id="20936" PostHistoryTypeId="2" PostId="5565" RevisionGUID="63241724-6ba4-4537-aa8a-5a8aba8cb87f" CreationDate="2022-10-27T07:44:07.180" UserId="707" Text="The maintained project for substrate-based chains and Unity integration is covered here in this substrate seminar and the linked GitHub.&#xD;&#xA;&#xD;&#xA;Build .NET and Unity Parachain apps | Substrate Seminar&#xD;&#xA;https://youtu.be/IAdvCbK0kQI&#xD;&#xA;&#xD;&#xA;Substrate C# Toolchain that generates a NET API and more&#xD;&#xA;https://github.com/ajuna-network/Ajuna.SDK&#xD;&#xA;&#xD;&#xA;Basic NET API for Substrate (follow-up project of SubstrateNetApi) &#xD;&#xA;https://github.com/ajuna-network/Ajuna.NetApi&#xD;&#xA;&#xD;&#xA;I hope that helps with the Unity integration.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20938" PostHistoryTypeId="2" PostId="5566" RevisionGUID="e4eaa51c-c3ba-4123-a735-8f39ff4ebb22" CreationDate="2022-10-27T08:01:16.813" UserId="635" Text="I'm under the impression that the browser extension wallet is not meant to be used from outside the browser. So, unless you are using unity for creating a WASM module that can only be consumed from the browser, and then you add some layer so that the Web-Worker that will be serving the WASM module somehow has access to the global scope where the browser wallet is injected, then unless that's the case... I'm afraid that nope, you can't consume the browser wallet from a unity project.&#xD;&#xA;&#xD;&#xA;However, have you considered integrating your unity application with [Parity Signer][1] instead?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/parity-signer" ContentLicense="CC BY-SA 4.0" />
  <row Id="20940" PostHistoryTypeId="2" PostId="5567" RevisionGUID="6b78c6d7-7e72-432e-9c4e-035c9c564c18" CreationDate="2022-10-27T08:30:34.293" UserId="2673" Text="I believe you'll need to iterate over blocks to query events (see [this answer](https://substrate.stackexchange.com/a/243/2673) for tips), or use an indexer (look [here](https://substrate.stackexchange.com/a/56/2673) for an overview of available solutions)." ContentLicense="CC BY-SA 4.0" />
  <row Id="20942" PostHistoryTypeId="5" PostId="243" RevisionGUID="06f5f88c-1180-4685-bd77-069064340360" CreationDate="2022-10-27T09:29:31.570" UserId="2673" Comment="JS syntax highlighting" Text="Extrinsics are stored as part of a block and events are &quot;intrinsic&quot; to the chain's state so they are stored separately in the chain's system storage. You can query events based on block hash using the system state. With RPC, you would have to iterate per block and query the events based on the block. Here is example code:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const getAllData = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;    let blockNumber = lastHeader.number;&#xD;&#xA;&#xD;&#xA;    while (blockNumber &gt; 0) {&#xD;&#xA;        blockNumber = blockNumber - 1&#xD;&#xA;        const blockHash = await api.rpc.chain.getBlockHash(blockNumber);&#xD;&#xA;        const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;        signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;            console.log(index, ex.toHuman());&#xD;&#xA;            const { method: { args, method, section } } = ex;&#xD;&#xA;            console.log(&quot;******EXTRINSIC--BEGIN***&quot;);&#xD;&#xA;            console.log(`${section}.${method}(${args.map((a) =&gt; a.toString()).join(', ')})`);&#xD;&#xA;            console.log(&quot;******EXTRINSIC--END*****&quot;);&#xD;&#xA;            &#xD;&#xA;            const allRecords = await api.query.system.events.at(blockHash);&#xD;&#xA;            // filter the specific events based on the phase and then the&#xD;&#xA;            // index of our extrinsic in the block&#xD;&#xA;            const events = allRecords&#xD;&#xA;                .filter(({ phase }) =&gt;&#xD;&#xA;                    phase.isApplyExtrinsic &amp;&amp;&#xD;&#xA;                    phase.asApplyExtrinsic.eq(index)&#xD;&#xA;                )&#xD;&#xA;                .map(({ event }) =&gt; `${event.section}.${event.method}`);&#xD;&#xA;&#xD;&#xA;            console.log(&quot;******EVENT--BEGIN*****&quot;);&#xD;&#xA;            console.log(`${section}.${method}:: ${events.join(', ') || 'no events'}`);&#xD;&#xA;            console.log(&quot;******EVENT--END*******&quot;);&#xD;&#xA;        });&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-map-extrinsics-to-their-events&#xD;&#xA;&#xD;&#xA;If you're not interested in iterating per block than you may want to consider an [indexer](https://substrate.stackexchange.com/a/56/29)." ContentLicense="CC BY-SA 4.0" />
  <row Id="20943" PostHistoryTypeId="24" PostId="243" RevisionGUID="06f5f88c-1180-4685-bd77-069064340360" CreationDate="2022-10-27T09:29:31.570" Comment="Proposed by 2673 approved by 29 edit id of 327" ContentLicense="CC BY-SA 4.0" />
  <row Id="20944" PostHistoryTypeId="4" PostId="5024" RevisionGUID="b59f2f9a-162c-4dac-b62f-e24a6cad1218" CreationDate="2022-10-27T10:09:37.643" UserId="29" Comment="edited title" Text="How to use polkadot js typescript Typegen to decorate api for runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="20947" PostHistoryTypeId="2" PostId="5568" RevisionGUID="01858e9e-6d14-4e14-817b-ea8c777935fd" CreationDate="2022-10-27T10:50:22.090" UserId="29" Text="The &quot;pay-as-you-go&quot; functionality is not yet implemented for parathreads.&#xD;&#xA;&#xD;&#xA;It is on the [roadmap](https://polkadot.network/launch-roadmap).&#xD;&#xA;&#xD;&#xA;Currently, becoming a parathread is a first step prior to becoming a parachain. First you register as a parathread, then, upon winning a slot auction, the parathread becomes a parachain. More info on this process can be found here:&#xD;&#xA;- https://docs.substrate.io/reference/how-to-guides/parachains/auctions-and-crowdloans/&#xD;&#xA;&#xD;&#xA;You can read more about the envisioned mechanics of parathreads here:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-parathreads#how-do-parathreads-operate" ContentLicense="CC BY-SA 4.0" />
  <row Id="20949" PostHistoryTypeId="2" PostId="5569" RevisionGUID="52f40699-c1a3-4ab3-955e-9f3f2c807a8c" CreationDate="2022-10-27T11:39:49.077" UserId="3" Text="Using `pallet-proxy`, you can execute the following sequence of calls:&#xD;&#xA;&#xD;&#xA;- Create a new pure proxy account using `anonymous`. Let's say this reserves 10 DEV on your main account.&#xD;&#xA;- (Optional) Call some function which reserves 15 DEV on the newly created anonymous account.&#xD;&#xA;- Call `remove_proxy` from the anonymous account.&#xD;&#xA;&#xD;&#xA;The result is: You lose control over the anonymous account (obviously), but the funds that you reserved for creating the account remain reserved because instead of being reserved on _your_ account, they are reserved on anonymous account, leaving the anonymous account with 10 free and 5 reserved DEV, which might confuse whoever reserved those 15 DEV in step 2.&#xD;&#xA;&#xD;&#xA;Judging by [this comment](https://github.com/paritytech/substrate/blob/37cca710eed3dadd4ed5364c7686608f5175cce1/frame/proxy/src/lib.rs#L270-L271), this is (sort-of) intended behavior. Why?&#xD;&#xA;&#xD;&#xA;Sure, you can probably burn money in more creative ways, but why doesn't `pallet-proxy` manage anonymous accounts and conventional proxies separately to prevent this strange interaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20951" PostHistoryTypeId="1" PostId="5569" RevisionGUID="52f40699-c1a3-4ab3-955e-9f3f2c807a8c" CreationDate="2022-10-27T11:39:49.077" UserId="3" Text="Why is it allowed to call `remove_proxy` on a pure proxy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20952" PostHistoryTypeId="3" PostId="5569" RevisionGUID="52f40699-c1a3-4ab3-955e-9f3f2c807a8c" CreationDate="2022-10-27T11:39:49.077" UserId="3" Text="|proxy|pallet-proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20957" PostHistoryTypeId="2" PostId="5571" RevisionGUID="f69e8acc-39d6-408e-9405-de83b3cbe62f" CreationDate="2022-10-27T13:53:12.100" UserId="3319" Text="i have read their official [documentation][1] and im not sure i completely understand the process of block creation or finalization.&#xD;&#xA;&#xD;&#xA;i know that after each period of time, there is a block author that creates a block and broadcast it to the other validators, does the others need to sign the block and resend it and only after 2/3 collected signatures the block gets added? or they simply accept it based on the `BlockImport` rules? &#xD;&#xA;&#xD;&#xA;in other words is it like proof of work where when you receive a block you need to verify its validaity based on some rules and you dont care whether others added it or not, or is it that you need another round to make sure everyone received the same block from the author and then add it?&#xD;&#xA;&#xD;&#xA;what is finality in aura and how is it achieved?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://openethereum.github.io/Aura" ContentLicense="CC BY-SA 4.0" />
  <row Id="20959" PostHistoryTypeId="1" PostId="5571" RevisionGUID="f69e8acc-39d6-408e-9405-de83b3cbe62f" CreationDate="2022-10-27T13:53:12.100" UserId="3319" Text="does the block gets signed by all authorities in aura?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20960" PostHistoryTypeId="3" PostId="5571" RevisionGUID="f69e8acc-39d6-408e-9405-de83b3cbe62f" CreationDate="2022-10-27T13:53:12.100" UserId="3319" Text="|consensus|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20961" PostHistoryTypeId="2" PostId="5572" RevisionGUID="ced2228d-433f-492d-8196-b47c532ee0b5" CreationDate="2022-10-27T14:15:16.360" UserId="501" Text="I wanted to try out starting multple parachain node and not only one node-collator like in this [documentation][1].&#xD;&#xA;&#xD;&#xA;How can I **remove the force-authoring** successfully and have multiple nodes that **uses the AURA consensus**. Lets imagine there would be only one collator and 3-4 parachain nodes.&#xD;&#xA;&#xD;&#xA;I suppose the collator would still look like:&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-collator \&#xD;&#xA;--alice \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--base-path /tmp/parachain/alice \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain &lt;relay chain raw chain spec&gt; \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But what about the other nodes ? How would the setup look like ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: I was thinking of using [substrate-validator-set][2] to add aura authorities one by one. But I don't get the &quot;startup command&quot; to work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/parachains/add-paranodes/&#xD;&#xA;  [2]: https://github.com/gautamdhameja/substrate-validator-set" ContentLicense="CC BY-SA 4.0" />
  <row Id="20963" PostHistoryTypeId="1" PostId="5572" RevisionGUID="ced2228d-433f-492d-8196-b47c532ee0b5" CreationDate="2022-10-27T14:15:16.360" UserId="501" Text="production-like parachain setup and launch" ContentLicense="CC BY-SA 4.0" />
  <row Id="20964" PostHistoryTypeId="3" PostId="5572" RevisionGUID="ced2228d-433f-492d-8196-b47c532ee0b5" CreationDate="2022-10-27T14:15:16.360" UserId="501" Text="|parachain|parachain-collator|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20965" PostHistoryTypeId="2" PostId="5573" RevisionGUID="cda40a2a-218d-41b6-8643-45665c44b41e" CreationDate="2022-10-27T15:24:15.747" UserId="2548" Text="I am having a versioning issue with the AUTHORIZATION pallet. &#xD;&#xA;I pushed all my changes in the authorization_issue branch: https://github.com/herou/ferrum-x-network-elio/tree/authorization_issue&#xD;&#xA;&#xD;&#xA;I am following this documentation: https://docs.substrate.io/tutorials/get-started/authorize-specific-nodes/&#xD;&#xA;&#xD;&#xA;I am stuck at this step which can be found in the documentation:  “6. &#xD;&#xA;&#xD;&#xA;Check that the configuration can compile by running the following command:”&#xD;&#xA;&#xD;&#xA;Logs error:&#xD;&#xA;```&#xD;&#xA;elioprifti@pc-193-62 ferrum-x-network-elio % cargo build --release&#xD;&#xA;   Compiling ferrum-x-runtime v0.0.1 (/Users/elioprifti/ferrum-x-network-elio/runtime)&#xD;&#xA;error: failed to run custom build command for `ferrum-x-runtime v0.0.1 (/Users/elioprifti/ferrum-x-network-elio/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/elioprifti/ferrum-x-network-elio/target/release/build/ferrum-x-runtime-14cf937d724cf97a/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.65.0-nightly (2e35f954a 2022-09-01)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  warning: unused import: `sp_std::str`&#xD;&#xA;    --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/lib.rs:59:7&#xD;&#xA;     |&#xD;&#xA;  59 |         use sp_std::str;&#xD;&#xA;     |             ^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `#[warn(unused_imports)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: crate-level attribute should be in the root module&#xD;&#xA;   --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/chain_queries.rs:1:35&#xD;&#xA;    |&#xD;&#xA;  1 | #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    |                                   ^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = note: `#[warn(unused_attributes)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: crate-level attribute should be in the root module&#xD;&#xA;   --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/erc_20_client.rs:1:35&#xD;&#xA;    |&#xD;&#xA;  1 | #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    |                                   ^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: crate-level attribute should be in the root module&#xD;&#xA;   --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/quantum_portal_client.rs:1:35&#xD;&#xA;    |&#xD;&#xA;  1 | #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    |                                   ^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: `pallet-quantum-portal` (lib) generated 4 warnings&#xD;&#xA;     Compiling ferrum-x-runtime v0.0.1 (/Users/elioprifti/ferrum-x-network-elio/runtime)&#xD;&#xA;  error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-0eeab11c114f6fcf.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-68be5c5d1b108e5b.rmeta&#xD;&#xA;&#xD;&#xA;  error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `oom`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-0eeab11c114f6fcf.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-68be5c5d1b108e5b.rmeta&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:339:6&#xD;&#xA;      |&#xD;&#xA;  339 | impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;      |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required by a bound in `pallet_node_authorization::Config`&#xD;&#xA;     --&gt; /Users/elioprifti/.cargo/git/checkouts/substrate-7e08433d4c370a21/616d33e/frame/node-authorization/src/lib.rs:65:20&#xD;&#xA;      |&#xD;&#xA;  65  |     pub trait Config: frame_system::Config {&#xD;&#xA;      |                       ^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_node_authorization::Config`&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:408:3&#xD;&#xA;      |&#xD;&#xA;  408 |         Call: From&lt;LocalCall&gt;,&#xD;&#xA;      |         ^^^^^^^^^^^^^^^^^^^^^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;  note: required because it appears within the type `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;      = help: see issue #48214&#xD;&#xA;      = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:448:3&#xD;&#xA;      |&#xD;&#xA;  448 |         Call: From&lt;C&gt;,&#xD;&#xA;      |         ^^^^^^^^^^^^^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;  note: required because it appears within the type `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;      = help: see issue #48214&#xD;&#xA;      = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `pallet_node_authorization::Event&lt;Runtime&gt;`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;      = note: required because it appears within the type `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;      = note: no field of an enum variant may have a dynamically sized type&#xD;&#xA;      = help: change the field's type to have a statically known size&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;  help: borrowed types always have a statically known size&#xD;&#xA;      |&#xD;&#xA;  455 | &amp;construct_runtime!(&#xD;&#xA;      | +&#xD;&#xA;  help: the `Box` type always has a statically known size and allocates its contents in the heap&#xD;&#xA;      |&#xD;&#xA;  455 ~ Box&lt;construct_runtime!(&#xD;&#xA;  456 |     pub enum Runtime where&#xD;&#xA;    ...&#xD;&#xA;  475 |     }&#xD;&#xA;  476 ~ )&gt;;&#xD;&#xA;      |&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `core::clone::Clone`&#xD;&#xA;      = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `EncodeLike`&#xD;&#xA;     --&gt; /Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.5/src/encode_like.rs:73:41&#xD;&#xA;      |&#xD;&#xA;  73  | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;      |                                         ^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;      = note: this error originates in the derive macro `self::sp_api_hidden_includes_construct_runtime::hidden_include::codec::Encode` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `Decode`&#xD;&#xA;     --&gt; /Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.5/src/codec.rs:295:19&#xD;&#xA;      |&#xD;&#xA;  295 | pub trait Decode: Sized {&#xD;&#xA;      |                   ^^^^^ required by this bound in `Decode`&#xD;&#xA;      = note: this error originates in the derive macro `self::sp_api_hidden_includes_construct_runtime::hidden_include::codec::Decode` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `From`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `TryInto`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `pallet_node_authorization::Event&lt;Runtime&gt;`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;      = note: required because it appears within the type `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;  note: required by a bound in `From`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `pallet_node_authorization::Event&lt;Runtime&gt;`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;      = note: required because it appears within the type `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;  note: required by a bound in `TryInto`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;  note: required because it appears within the type `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `core::clone::Clone`&#xD;&#xA;      = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;.............&#xD;&#xA;&#xD;&#xA;elioprifti@pc-193-62 ferrum-x-network-elio % &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20967" PostHistoryTypeId="1" PostId="5573" RevisionGUID="cda40a2a-218d-41b6-8643-45665c44b41e" CreationDate="2022-10-27T15:24:15.747" UserId="2548" Text="Substrate AUTHORIZATION pallet runtime issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="20968" PostHistoryTypeId="3" PostId="5573" RevisionGUID="cda40a2a-218d-41b6-8643-45665c44b41e" CreationDate="2022-10-27T15:24:15.747" UserId="2548" Text="|substrate-node|rust|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20969" PostHistoryTypeId="50" PostId="4958" RevisionGUID="61389f42-0db9-427f-a93c-97257e16906d" CreationDate="2022-10-27T16:06:35.807" UserId="-1" />
  <row Id="20970" PostHistoryTypeId="2" PostId="5574" RevisionGUID="fa9c1942-0034-42df-973f-e2bab5642bac" CreationDate="2022-10-27T16:19:59.220" UserId="198" Text="You need to mount the data folder y adding the following to your command:&#xD;&#xA;````&#xD;&#xA;-v /tmp:/polkadot&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;The following should solve your issue:&#xD;&#xA;```&#xD;&#xA;docker run -v /tmp:/polkadot --rm -it parity/polkadot-parachain --chain statemint&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It does not really matter what local folder you use (I used `/tmp` in my example) as long as it exists and has sufficient space left.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20972" PostHistoryTypeId="5" PostId="5574" RevisionGUID="9697cd2c-f68b-425b-a038-c76e49eba373" CreationDate="2022-10-27T16:35:24.310" UserId="198" Comment="Add explanations" Text="## Solution&#xD;&#xA;&#xD;&#xA;You need to mount the data folder y adding the following to your command:&#xD;&#xA;````&#xD;&#xA;-v /tmp:/polkadot&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;The following should solve your issue:&#xD;&#xA;```&#xD;&#xA;docker run -v /tmp:/polkadot --rm -it parity/polkadot-parachain --chain statemint&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Explanation&#xD;&#xA;&#xD;&#xA;The issue comes from the fact that the container does not run as `root` by default and does not grant access to the local filesystem.&#xD;&#xA;You can see where this is done [here](https://github.com/paritytech/cumulus/blob/master/docker/injected.Dockerfile#L43).&#xD;&#xA;&#xD;&#xA;The issue is actually not related to the parachain node and the following would fail as well:&#xD;&#xA;```&#xD;&#xA;touch test&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I almost do not want to mention that running as `root` would be a **bad solution**.&#xD;&#xA;&#xD;&#xA;The proper solution is to mount a folder as shown in the solution.&#xD;&#xA;&#xD;&#xA;## Which folder&#xD;&#xA;It does not really matter what local folder you use (I used `/tmp` in my example) as long as it exists and has sufficient space left.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20973" PostHistoryTypeId="5" PostId="5573" RevisionGUID="eaacc622-b4f3-4dcd-b38e-343054d8d579" CreationDate="2022-10-27T17:44:44.270" UserId="2548" Comment="added 7756 characters in body" Text="I am having a versioning issue with the AUTHORIZATION pallet. &#xD;&#xA;I pushed all my changes in the authorization_issue branch: https://github.com/herou/ferrum-x-network-elio/tree/authorization_issue&#xD;&#xA;&#xD;&#xA;I am following this documentation: https://docs.substrate.io/tutorials/get-started/authorize-specific-nodes/&#xD;&#xA;&#xD;&#xA;I am stuck at this step which can be found in the documentation:  “6. &#xD;&#xA;&#xD;&#xA;Check that the configuration can compile by running the following command:”&#xD;&#xA;&#xD;&#xA;Logs error:&#xD;&#xA;```&#xD;&#xA;elioprifti@pc-193-62 ferrum-x-network-elio % cargo build --release&#xD;&#xA;   Compiling ferrum-x-runtime v0.0.1 (/Users/elioprifti/ferrum-x-network-elio/runtime)&#xD;&#xA;error: failed to run custom build command for `ferrum-x-runtime v0.0.1 (/Users/elioprifti/ferrum-x-network-elio/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/elioprifti/ferrum-x-network-elio/target/release/build/ferrum-x-runtime-14cf937d724cf97a/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.65.0-nightly (2e35f954a 2022-09-01)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  warning: unused import: `sp_std::str`&#xD;&#xA;    --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/lib.rs:59:7&#xD;&#xA;     |&#xD;&#xA;  59 |         use sp_std::str;&#xD;&#xA;     |             ^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `#[warn(unused_imports)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: crate-level attribute should be in the root module&#xD;&#xA;   --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/chain_queries.rs:1:35&#xD;&#xA;    |&#xD;&#xA;  1 | #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    |                                   ^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = note: `#[warn(unused_attributes)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: crate-level attribute should be in the root module&#xD;&#xA;   --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/erc_20_client.rs:1:35&#xD;&#xA;    |&#xD;&#xA;  1 | #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    |                                   ^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: crate-level attribute should be in the root module&#xD;&#xA;   --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/quantum_portal_client.rs:1:35&#xD;&#xA;    |&#xD;&#xA;  1 | #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    |                                   ^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: `pallet-quantum-portal` (lib) generated 4 warnings&#xD;&#xA;     Compiling ferrum-x-runtime v0.0.1 (/Users/elioprifti/ferrum-x-network-elio/runtime)&#xD;&#xA;  error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-0eeab11c114f6fcf.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-68be5c5d1b108e5b.rmeta&#xD;&#xA;&#xD;&#xA;  error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `oom`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-0eeab11c114f6fcf.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-68be5c5d1b108e5b.rmeta&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:339:6&#xD;&#xA;      |&#xD;&#xA;  339 | impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;      |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required by a bound in `pallet_node_authorization::Config`&#xD;&#xA;     --&gt; /Users/elioprifti/.cargo/git/checkouts/substrate-7e08433d4c370a21/616d33e/frame/node-authorization/src/lib.rs:65:20&#xD;&#xA;      |&#xD;&#xA;  65  |     pub trait Config: frame_system::Config {&#xD;&#xA;      |                       ^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_node_authorization::Config`&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:408:3&#xD;&#xA;      |&#xD;&#xA;  408 |         Call: From&lt;LocalCall&gt;,&#xD;&#xA;      |         ^^^^^^^^^^^^^^^^^^^^^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;  note: required because it appears within the type `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;      = help: see issue #48214&#xD;&#xA;      = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:448:3&#xD;&#xA;      |&#xD;&#xA;  448 |         Call: From&lt;C&gt;,&#xD;&#xA;      |         ^^^^^^^^^^^^^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;  note: required because it appears within the type `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;      = help: see issue #48214&#xD;&#xA;      = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `pallet_node_authorization::Event&lt;Runtime&gt;`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;      = note: required because it appears within the type `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;      = note: no field of an enum variant may have a dynamically sized type&#xD;&#xA;      = help: change the field's type to have a statically known size&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;  help: borrowed types always have a statically known size&#xD;&#xA;      |&#xD;&#xA;  455 | &amp;construct_runtime!(&#xD;&#xA;      | +&#xD;&#xA;  help: the `Box` type always has a statically known size and allocates its contents in the heap&#xD;&#xA;      |&#xD;&#xA;  455 ~ Box&lt;construct_runtime!(&#xD;&#xA;  456 |     pub enum Runtime where&#xD;&#xA;    ...&#xD;&#xA;  475 |     }&#xD;&#xA;  476 ~ )&gt;;&#xD;&#xA;      |&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `core::clone::Clone`&#xD;&#xA;      = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `EncodeLike`&#xD;&#xA;     --&gt; /Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.5/src/encode_like.rs:73:41&#xD;&#xA;      |&#xD;&#xA;  73  | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;      |                                         ^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;      = note: this error originates in the derive macro `self::sp_api_hidden_includes_construct_runtime::hidden_include::codec::Encode` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `Decode`&#xD;&#xA;     --&gt; /Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.5/src/codec.rs:295:19&#xD;&#xA;      |&#xD;&#xA;  295 | pub trait Decode: Sized {&#xD;&#xA;      |                   ^^^^^ required by this bound in `Decode`&#xD;&#xA;      = note: this error originates in the derive macro `self::sp_api_hidden_includes_construct_runtime::hidden_include::codec::Decode` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `From`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `TryInto`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `pallet_node_authorization::Event&lt;Runtime&gt;`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;      = note: required because it appears within the type `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;  note: required by a bound in `From`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `pallet_node_authorization::Event&lt;Runtime&gt;`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;      = note: required because it appears within the type `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;  note: required by a bound in `TryInto`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;  note: required because it appears within the type `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `core::clone::Clone`&#xD;&#xA;      = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;.............&#xD;&#xA;&#xD;&#xA;elioprifti@pc-193-62 ferrum-x-network-elio % &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Cargo.toml&#xD;&#xA;```&#xD;&#xA;[build-dependencies.substrate-wasm-builder]&#xD;&#xA;branch = 'master'&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '5.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.codec]&#xD;&#xA;default-features = false&#xD;&#xA;features = ['derive']&#xD;&#xA;package = 'parity-scale-codec'&#xD;&#xA;version = '3.1.5'&#xD;&#xA;&#xD;&#xA;[dependencies.fp-rpc]&#xD;&#xA;default-features = false&#xD;&#xA;version = &quot;3.0.0-dev&quot;&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-quantum-portal]&#xD;&#xA;default-features = false&#xD;&#xA;version = '1.0.0-dev'&#xD;&#xA;path = '../pallets/quamtum-portal'&#xD;&#xA;&#xD;&#xA;[dependencies.fp-self-contained]&#xD;&#xA;default-features = false&#xD;&#xA;version = '1.0.0-dev'&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-benchmarking]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;optional = true&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-node-authorization]&#xD;&#xA;branch = &quot;polkadot-v0.9.22&quot;&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-executive]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-support]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-system]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-system-benchmarking]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;optional = true&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-system-rpc-runtime-api]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-aura]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-balances]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-base-fee]&#xD;&#xA;default-features = false&#xD;&#xA;git = &quot;https://github.com/paritytech/frontier/&quot;&#xD;&#xA;version = &quot;1.0.0&quot;&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-dynamic-fee]&#xD;&#xA;default-features = false&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-ethereum]&#xD;&#xA;default-features = false&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-evm]&#xD;&#xA;version = '6.0.0-dev'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-evm-precompile-modexp]&#xD;&#xA;version = &quot;2.0.0-dev&quot;&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;default-features = false&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-evm-precompile-sha3fips]&#xD;&#xA;version = &quot;2.0.0-dev&quot;&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;default-features = false&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-evm-precompile-simple]&#xD;&#xA;version = &quot;2.0.0-dev&quot;&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;default-features = false&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-grandpa]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-randomness-collective-flip]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-sudo]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-timestamp]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-transaction-payment]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-transaction-payment-rpc-runtime-api]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.scale-info]&#xD;&#xA;default-features = false&#xD;&#xA;features = ['derive']&#xD;&#xA;version = '2.1.2'&#xD;&#xA;&#xD;&#xA;[dependencies.serde]&#xD;&#xA;features = ['derive']&#xD;&#xA;optional = true&#xD;&#xA;version = '1.0.101'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-api]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-block-builder]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-consensus-aura]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '0.10.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-core]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '6.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-inherents]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-io]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '6.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-offchain]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-runtime]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '6.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-session]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-std]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-transaction-pool]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-version]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '5.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.log]&#xD;&#xA;version = &quot;0.4.14&quot;&#xD;&#xA;default-features = false&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;aura = []&#xD;&#xA;default = [&#xD;&#xA;    'std',&#xD;&#xA;    'aura',&#xD;&#xA;]&#xD;&#xA;manual-seal = []&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;    'frame-benchmarking',&#xD;&#xA;    'frame-system-benchmarking',&#xD;&#xA;    'frame-system/runtime-benchmarks',&#xD;&#xA;    'pallet-ethereum/runtime-benchmarks',&#xD;&#xA;    'pallet-evm/runtime-benchmarks',&#xD;&#xA;]&#xD;&#xA;std = [&#xD;&#xA;    'serde',&#xD;&#xA;    'codec/std',&#xD;&#xA;    'scale-info/std',&#xD;&#xA;    'sp-api/std',&#xD;&#xA;    'sp-block-builder/std',&#xD;&#xA;    'sp-consensus-aura/std',&#xD;&#xA;    'sp-core/std',&#xD;&#xA;    'sp-inherents/std',&#xD;&#xA;    'sp-io/std',&#xD;&#xA;    'sp-offchain/std',&#xD;&#xA;    'sp-runtime/std',&#xD;&#xA;    'sp-session/std',&#xD;&#xA;    'sp-std/std',&#xD;&#xA;    'log/std',&#xD;&#xA;    'sp-transaction-pool/std',&#xD;&#xA;    'sp-version/std',&#xD;&#xA;    'frame-executive/std',&#xD;&#xA;    'frame-support/std',&#xD;&#xA;    'frame-system-rpc-runtime-api/std',&#xD;&#xA;    'frame-system/std',&#xD;&#xA;    'pallet-aura/std',&#xD;&#xA;    'pallet-balances/std',&#xD;&#xA;    'pallet-grandpa/std',&#xD;&#xA;    'pallet-randomness-collective-flip/std',&#xD;&#xA;    'pallet-sudo/std',&#xD;&#xA;    'pallet-timestamp/std',&#xD;&#xA;    'pallet-transaction-payment-rpc-runtime-api/std',&#xD;&#xA;    'pallet-transaction-payment/std',&#xD;&#xA;    'fp-rpc/std',&#xD;&#xA;    'fp-self-contained/std',&#xD;&#xA;    'pallet-base-fee/std',&#xD;&#xA;    'pallet-dynamic-fee/std',&#xD;&#xA;    'pallet-ethereum/std',&#xD;&#xA;    'pallet-evm/std',&#xD;&#xA;    'pallet-evm-precompile-simple/std',&#xD;&#xA;    'pallet-evm-precompile-sha3fips/std',&#xD;&#xA;    'frame-benchmarking/std',&#xD;&#xA;    'pallet-node-authorization/std',&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;authors = ['Ferrum Network &lt;https://github.com/ferrumnet/ferrum-x-network&gt;']&#xD;&#xA;edition = '2021'&#xD;&#xA;homepage = 'https://ferrum.network'&#xD;&#xA;license = 'Unlicense'&#xD;&#xA;name = 'ferrum-x-runtime'&#xD;&#xA;publish = false&#xD;&#xA;repository = 'https://github.com/ferrumnet/ferrum-x-network'&#xD;&#xA;version = '0.0.1'&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = ['x86_64-unknown-linux-gnu']&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20974" PostHistoryTypeId="2" PostId="5575" RevisionGUID="159966b8-f74b-4784-aa3c-1ba82f16b004" CreationDate="2022-10-27T18:09:44.883" UserId="702" Text="For our BEEFY-powered bridge, we need to determine the relay chain block in which a parachain header was included. It seems this happens roughly 2-3 blocks after the relay chain block which backed the candidate.&#xD;&#xA;&#xD;&#xA;I was wondering if there is some limit on the maximum block gap between backing and inclusion? For example, could the candidate ever be included like 20 blocks after it was backed?&#xD;&#xA;&#xD;&#xA;Knowing this limit if there is one would help improve our code for determining the inclusion block number.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20976" PostHistoryTypeId="1" PostId="5575" RevisionGUID="159966b8-f74b-4784-aa3c-1ba82f16b004" CreationDate="2022-10-27T18:09:44.883" UserId="702" Text="Maximum duration between candidate backing and inclusion" ContentLicense="CC BY-SA 4.0" />
  <row Id="20977" PostHistoryTypeId="3" PostId="5575" RevisionGUID="159966b8-f74b-4784-aa3c-1ba82f16b004" CreationDate="2022-10-27T18:09:44.883" UserId="702" Text="|parachain|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20978" PostHistoryTypeId="5" PostId="5573" RevisionGUID="3059fbe0-ef92-481a-a952-a197506e3743" CreationDate="2022-10-27T18:12:17.153" UserId="2548" Comment="added 597 characters in body" Text="I am having a versioning issue with the AUTHORIZATION pallet. &#xD;&#xA;I pushed all my changes in the authorization_issue branch: https://github.com/herou/ferrum-x-network-elio/tree/authorization_issue&#xD;&#xA;&#xD;&#xA;I am following this documentation: https://docs.substrate.io/tutorials/get-started/authorize-specific-nodes/&#xD;&#xA;&#xD;&#xA;I am stuck at this step which can be found in the documentation:  “6. &#xD;&#xA;&#xD;&#xA;Check that the configuration can compile by running the following command:”&#xD;&#xA;&#xD;&#xA;Logs error:&#xD;&#xA;```&#xD;&#xA;elioprifti@pc-193-62 ferrum-x-network-elio % cargo build --release&#xD;&#xA;   Compiling ferrum-x-runtime v0.0.1 (/Users/elioprifti/ferrum-x-network-elio/runtime)&#xD;&#xA;error: failed to run custom build command for `ferrum-x-runtime v0.0.1 (/Users/elioprifti/ferrum-x-network-elio/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/elioprifti/ferrum-x-network-elio/target/release/build/ferrum-x-runtime-14cf937d724cf97a/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.65.0-nightly (2e35f954a 2022-09-01)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  warning: unused import: `sp_std::str`&#xD;&#xA;    --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/lib.rs:59:7&#xD;&#xA;     |&#xD;&#xA;  59 |         use sp_std::str;&#xD;&#xA;     |             ^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `#[warn(unused_imports)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: crate-level attribute should be in the root module&#xD;&#xA;   --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/chain_queries.rs:1:35&#xD;&#xA;    |&#xD;&#xA;  1 | #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    |                                   ^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = note: `#[warn(unused_attributes)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: crate-level attribute should be in the root module&#xD;&#xA;   --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/erc_20_client.rs:1:35&#xD;&#xA;    |&#xD;&#xA;  1 | #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    |                                   ^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: crate-level attribute should be in the root module&#xD;&#xA;   --&gt; /Users/elioprifti/ferrum-x-network-elio/pallets/quamtum-portal/src/quantum_portal_client.rs:1:35&#xD;&#xA;    |&#xD;&#xA;  1 | #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    |                                   ^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: `pallet-quantum-portal` (lib) generated 4 warnings&#xD;&#xA;     Compiling ferrum-x-runtime v0.0.1 (/Users/elioprifti/ferrum-x-network-elio/runtime)&#xD;&#xA;  error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-0eeab11c114f6fcf.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-68be5c5d1b108e5b.rmeta&#xD;&#xA;&#xD;&#xA;  error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `oom`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-0eeab11c114f6fcf.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /Users/elioprifti/ferrum-x-network-elio/target/release/wbuild/ferrum-x-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-68be5c5d1b108e5b.rmeta&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:339:6&#xD;&#xA;      |&#xD;&#xA;  339 | impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;      |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required by a bound in `pallet_node_authorization::Config`&#xD;&#xA;     --&gt; /Users/elioprifti/.cargo/git/checkouts/substrate-7e08433d4c370a21/616d33e/frame/node-authorization/src/lib.rs:65:20&#xD;&#xA;      |&#xD;&#xA;  65  |     pub trait Config: frame_system::Config {&#xD;&#xA;      |                       ^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_node_authorization::Config`&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:408:3&#xD;&#xA;      |&#xD;&#xA;  408 |         Call: From&lt;LocalCall&gt;,&#xD;&#xA;      |         ^^^^^^^^^^^^^^^^^^^^^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;  note: required because it appears within the type `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;      = help: see issue #48214&#xD;&#xA;      = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:448:3&#xD;&#xA;      |&#xD;&#xA;  448 |         Call: From&lt;C&gt;,&#xD;&#xA;      |         ^^^^^^^^^^^^^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;  note: required because it appears within the type `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;      = help: see issue #48214&#xD;&#xA;      = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `pallet_node_authorization::Event&lt;Runtime&gt;`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;      = note: required because it appears within the type `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;      = note: no field of an enum variant may have a dynamically sized type&#xD;&#xA;      = help: change the field's type to have a statically known size&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;  help: borrowed types always have a statically known size&#xD;&#xA;      |&#xD;&#xA;  455 | &amp;construct_runtime!(&#xD;&#xA;      | +&#xD;&#xA;  help: the `Box` type always has a statically known size and allocates its contents in the heap&#xD;&#xA;      |&#xD;&#xA;  455 ~ Box&lt;construct_runtime!(&#xD;&#xA;  456 |     pub enum Runtime where&#xD;&#xA;    ...&#xD;&#xA;  475 |     }&#xD;&#xA;  476 ~ )&gt;;&#xD;&#xA;      |&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `core::clone::Clone`&#xD;&#xA;      = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `EncodeLike`&#xD;&#xA;     --&gt; /Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.5/src/encode_like.rs:73:41&#xD;&#xA;      |&#xD;&#xA;  73  | pub trait EncodeLike&lt;T: Encode = Self&gt;: Sized + Encode {}&#xD;&#xA;      |                                         ^^^^^ required by this bound in `EncodeLike`&#xD;&#xA;      = note: this error originates in the derive macro `self::sp_api_hidden_includes_construct_runtime::hidden_include::codec::Encode` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `Decode`&#xD;&#xA;     --&gt; /Users/elioprifti/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.5/src/codec.rs:295:19&#xD;&#xA;      |&#xD;&#xA;  295 | pub trait Decode: Sized {&#xD;&#xA;      |                   ^^^^^ required by this bound in `Decode`&#xD;&#xA;      = note: this error originates in the derive macro `self::sp_api_hidden_includes_construct_runtime::hidden_include::codec::Decode` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `From`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Event`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;  note: required because it appears within the type `Event`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `TryInto`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `pallet_node_authorization::Event&lt;Runtime&gt;`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;      = note: required because it appears within the type `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;  note: required by a bound in `From`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `pallet_node_authorization::Event&lt;Runtime&gt;`, the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;      |&#xD;&#xA;      = note: required because it appears within the type `pallet_node_authorization::Event&lt;Runtime&gt;`&#xD;&#xA;  note: required by a bound in `TryInto`&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;      = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;  note: required because it appears within the type `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^&#xD;&#xA;  note: required by a bound in `core::clone::Clone`&#xD;&#xA;      = note: this error originates in the derive macro `Clone` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `pallet_node_authorization::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `Call`&#xD;&#xA;     --&gt; /Users/elioprifti/ferrum-x-network-elio/runtime/src/lib.rs:455:1&#xD;&#xA;      |&#xD;&#xA;  455 | / construct_runtime!(&#xD;&#xA;  456 | |     pub enum Runtime where&#xD;&#xA;  457 | |         Block = Block,&#xD;&#xA;  458 | |         NodeBlock = opaque::Block,&#xD;&#xA;  ...   |&#xD;&#xA;  475 | |     }&#xD;&#xA;  476 | | );&#xD;&#xA;      | |_^ within `Call`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_node_authorization::Pallet&lt;Runtime&gt;`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                frame_system::Pallet&lt;T&gt;&#xD;&#xA;                pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                pallet_base_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_dynamic_fee::Pallet&lt;T&gt;&#xD;&#xA;                pallet_ethereum::Pallet&lt;T&gt;&#xD;&#xA;                pallet_evm::Pallet&lt;T&gt;&#xD;&#xA;              and 7 others&#xD;&#xA;.............&#xD;&#xA;&#xD;&#xA;elioprifti@pc-193-62 ferrum-x-network-elio % &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Cargo.toml&#xD;&#xA;```&#xD;&#xA;[build-dependencies.substrate-wasm-builder]&#xD;&#xA;branch = 'master'&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '5.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.codec]&#xD;&#xA;default-features = false&#xD;&#xA;features = ['derive']&#xD;&#xA;package = 'parity-scale-codec'&#xD;&#xA;version = '3.1.5'&#xD;&#xA;&#xD;&#xA;[dependencies.fp-rpc]&#xD;&#xA;default-features = false&#xD;&#xA;version = &quot;3.0.0-dev&quot;&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-quantum-portal]&#xD;&#xA;default-features = false&#xD;&#xA;version = '1.0.0-dev'&#xD;&#xA;path = '../pallets/quamtum-portal'&#xD;&#xA;&#xD;&#xA;[dependencies.fp-self-contained]&#xD;&#xA;default-features = false&#xD;&#xA;version = '1.0.0-dev'&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-benchmarking]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;optional = true&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-node-authorization]&#xD;&#xA;branch = &quot;polkadot-v0.9.22&quot;&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-executive]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-support]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-system]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-system-benchmarking]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;optional = true&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.frame-system-rpc-runtime-api]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-aura]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-balances]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-base-fee]&#xD;&#xA;default-features = false&#xD;&#xA;git = &quot;https://github.com/paritytech/frontier/&quot;&#xD;&#xA;version = &quot;1.0.0&quot;&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-dynamic-fee]&#xD;&#xA;default-features = false&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-ethereum]&#xD;&#xA;default-features = false&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-evm]&#xD;&#xA;version = '6.0.0-dev'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-evm-precompile-modexp]&#xD;&#xA;version = &quot;2.0.0-dev&quot;&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;default-features = false&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-evm-precompile-sha3fips]&#xD;&#xA;version = &quot;2.0.0-dev&quot;&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;default-features = false&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-evm-precompile-simple]&#xD;&#xA;version = &quot;2.0.0-dev&quot;&#xD;&#xA;git = 'https://github.com/paritytech/frontier.git'&#xD;&#xA;default-features = false&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-grandpa]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-randomness-collective-flip]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-sudo]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-timestamp]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-transaction-payment]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.pallet-transaction-payment-rpc-runtime-api]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.scale-info]&#xD;&#xA;default-features = false&#xD;&#xA;features = ['derive']&#xD;&#xA;version = '2.1.2'&#xD;&#xA;&#xD;&#xA;[dependencies.serde]&#xD;&#xA;features = ['derive']&#xD;&#xA;optional = true&#xD;&#xA;version = '1.0.101'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-api]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-block-builder]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-consensus-aura]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '0.10.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-core]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '6.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-inherents]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-io]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '6.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-offchain]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-runtime]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '6.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-session]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-std]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-transaction-pool]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '4.0.0-dev'&#xD;&#xA;&#xD;&#xA;[dependencies.sp-version]&#xD;&#xA;branch = 'master'&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/paritytech/substrate'&#xD;&#xA;version = '5.0.0'&#xD;&#xA;&#xD;&#xA;[dependencies.log]&#xD;&#xA;version = &quot;0.4.14&quot;&#xD;&#xA;default-features = false&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;aura = []&#xD;&#xA;default = [&#xD;&#xA;    'std',&#xD;&#xA;    'aura',&#xD;&#xA;]&#xD;&#xA;manual-seal = []&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;    'frame-benchmarking',&#xD;&#xA;    'frame-system-benchmarking',&#xD;&#xA;    'frame-system/runtime-benchmarks',&#xD;&#xA;    'pallet-ethereum/runtime-benchmarks',&#xD;&#xA;    'pallet-evm/runtime-benchmarks',&#xD;&#xA;]&#xD;&#xA;std = [&#xD;&#xA;    'serde',&#xD;&#xA;    'codec/std',&#xD;&#xA;    'scale-info/std',&#xD;&#xA;    'sp-api/std',&#xD;&#xA;    'sp-block-builder/std',&#xD;&#xA;    'sp-consensus-aura/std',&#xD;&#xA;    'sp-core/std',&#xD;&#xA;    'sp-inherents/std',&#xD;&#xA;    'sp-io/std',&#xD;&#xA;    'sp-offchain/std',&#xD;&#xA;    'sp-runtime/std',&#xD;&#xA;    'sp-session/std',&#xD;&#xA;    'sp-std/std',&#xD;&#xA;    'log/std',&#xD;&#xA;    'sp-transaction-pool/std',&#xD;&#xA;    'sp-version/std',&#xD;&#xA;    'frame-executive/std',&#xD;&#xA;    'frame-support/std',&#xD;&#xA;    'frame-system-rpc-runtime-api/std',&#xD;&#xA;    'frame-system/std',&#xD;&#xA;    'pallet-aura/std',&#xD;&#xA;    'pallet-balances/std',&#xD;&#xA;    'pallet-grandpa/std',&#xD;&#xA;    'pallet-randomness-collective-flip/std',&#xD;&#xA;    'pallet-sudo/std',&#xD;&#xA;    'pallet-timestamp/std',&#xD;&#xA;    'pallet-transaction-payment-rpc-runtime-api/std',&#xD;&#xA;    'pallet-transaction-payment/std',&#xD;&#xA;    'fp-rpc/std',&#xD;&#xA;    'fp-self-contained/std',&#xD;&#xA;    'pallet-base-fee/std',&#xD;&#xA;    'pallet-dynamic-fee/std',&#xD;&#xA;    'pallet-ethereum/std',&#xD;&#xA;    'pallet-evm/std',&#xD;&#xA;    'pallet-evm-precompile-simple/std',&#xD;&#xA;    'pallet-evm-precompile-sha3fips/std',&#xD;&#xA;    'frame-benchmarking/std',&#xD;&#xA;    'pallet-node-authorization/std',&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;authors = ['Ferrum Network &lt;https://github.com/ferrumnet/ferrum-x-network&gt;']&#xD;&#xA;edition = '2021'&#xD;&#xA;homepage = 'https://ferrum.network'&#xD;&#xA;license = 'Unlicense'&#xD;&#xA;name = 'ferrum-x-runtime'&#xD;&#xA;publish = false&#xD;&#xA;repository = 'https://github.com/ferrumnet/ferrum-x-network'&#xD;&#xA;version = '0.0.1'&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = ['x86_64-unknown-linux-gnu']&#xD;&#xA;```&#xD;&#xA;runtime/lib.rs&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	// Add parameter const for node-authorization pallet&#xD;&#xA;	pub const MaxWellKnownNodes: u32 = 10;&#xD;&#xA;	pub const MaxPeerIdLength: u32 = 128;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Configure the pallet-node-authorization&#xD;&#xA;impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type MaxWellKnownNodes = MaxWellKnownNodes;&#xD;&#xA;	type MaxPeerIdLength = MaxPeerIdLength;&#xD;&#xA;	type AddOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type RemoveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type ResetOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type SwapOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20979" PostHistoryTypeId="5" PostId="5575" RevisionGUID="2a501fc6-84aa-43a6-a18b-a21a93c98632" CreationDate="2022-10-27T18:16:26.373" UserId="702" Comment="added 10 characters in body" Text="For our BEEFY-powered bridge, we need to determine the relay chain block in which a finalized parachain header was included. It seems this happens roughly 2-3 blocks after the relay chain block which backed the candidate.&#xD;&#xA;&#xD;&#xA;I was wondering if there is some limit on the maximum block gap between backing and inclusion, before verification times out? For example, could the candidate ever be included like 20 blocks after it was backed?&#xD;&#xA;&#xD;&#xA;Knowing this limit if there is one would help improve our code for determining the inclusion block number.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20980" PostHistoryTypeId="5" PostId="5575" RevisionGUID="86dfd25b-edff-42d0-9bd7-a5c70c134061" CreationDate="2022-10-27T18:24:25.943" UserId="702" Comment="deleted 1 character in body" Text="For our BEEFY-powered bridge, we need to determine the relay chain block in which a finalized parachain header was included. It seems this happens roughly 2-3 blocks after the relay chain block which backed the candidate.&#xD;&#xA;&#xD;&#xA;I was wondering if there is some limit on the maximum block gap between backing and inclusion, before the process times out? For example, could the candidate ever be included like 20 blocks after it was backed?&#xD;&#xA;&#xD;&#xA;Knowing this limit if there is one would help improve our code for determining the inclusion block number.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20981" PostHistoryTypeId="2" PostId="5576" RevisionGUID="b9ad7b25-4463-419b-ad5e-74004d619ae7" CreationDate="2022-10-27T19:16:02.427" UserId="198" Text="It would be useful if you could provide details on how you deployed and what  your problem exactly is. &#xD;&#xA;&#xD;&#xA;My 2 cents would be to first try running your image locally using docker and check if you run into the same issue.&#xD;&#xA;&#xD;&#xA;Please note that using `EXPOSE 9944` does **not** actually expose port `9944` but only document that your node should serve something on port `9944`.&#xD;&#xA;&#xD;&#xA;The command to test your image will then have to look like:&#xD;&#xA;```&#xD;&#xA;docker run --rm -it -p 9966:944 &lt;your_image&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This would make your node reachable locally on port `9966` (I used another port than `9944` to point out that you do not **have** to use the same port number.&#xD;&#xA;&#xD;&#xA;This however **still** will not be enough since your node is inside a Docker image and will only listen to request from within the Docker image (which is rather useless...) and likely filter the rpc requests you are interested in.&#xD;&#xA;&#xD;&#xA;You should look at the [Polkadot Dockerfile](https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/polkadot/polkadot_builder.Dockerfile) for inspiration and check out the [documentation](https://github.com/paritytech/polkadot/blob/master/doc/docker.md) to see how to start your container." ContentLicense="CC BY-SA 4.0" />
  <row Id="20983" PostHistoryTypeId="2" PostId="5577" RevisionGUID="13342d9c-2159-40b7-bafe-1ff6b9bf2df1" CreationDate="2022-10-27T19:25:00.807" UserId="198" Text="You can check the answer provided in [this question](https://substrate.stackexchange.com/questions/5549/how-to-run-parachain-node-in-docker) but here are some details.&#xD;&#xA;&#xD;&#xA;While the Polkadot Docker images **used to** run as `root`, this is no longer the case. You are shooting in your foot with `USER nobody:nogroup&#xD;&#xA;` but while this is annoying you now, this is indeed the right option.&#xD;&#xA;&#xD;&#xA;As a result, the user running your `node` does not have the right to write almost everywhere.&#xD;&#xA;&#xD;&#xA;There a few options, some bad, some ok for testing and the good one:&#xD;&#xA;&#xD;&#xA;## Not recommended&#xD;&#xA;&#xD;&#xA;The quickest and **not** recommended (so I won't provide too many details about that..): run your container as `root`. No need to mention this would be a **very** bad idea for anything else than a quick test.&#xD;&#xA;&#xD;&#xA;## Good for quick tests&#xD;&#xA;&#xD;&#xA;A good solution for a quick test: use the `-d` flag and tell your node to put the data under `/tmp` inside your container, this folder is writable for the `polkadot` user.&#xD;&#xA;&#xD;&#xA;## The best solution&#xD;&#xA;&#xD;&#xA;The proper solution is to mount a volume for your data. You do this with:&#xD;&#xA;```&#xD;&#xA;docker run --rm -it -v /tmp:/polkadot &lt;your_image&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You may pick any folder instead of `/tmp` in the example above but you must use `/polkadot` as shown above (or also provide the `-d` flag and point to the folder you want the node to use). " ContentLicense="CC BY-SA 4.0" />
  <row Id="20985" PostHistoryTypeId="2" PostId="5578" RevisionGUID="af9811c0-ce6d-484e-84ba-30a2826ed428" CreationDate="2022-10-27T19:31:34.757" UserId="198" Text="You first will have to sort out the networking with your cloud provider.&#xD;&#xA;I would suggest doing your test locally first to remain away from networking issues between your machines and once that works, you can add your cloud networking to the picture.&#xD;&#xA;&#xD;&#xA;The following blog post is now old but you still may find relevant information: https://medium.com/@wilfried.kopp/your-very-own-local-polkadot-substrate-network-in-less-than-30s-300ed7913895&#xD;&#xA;&#xD;&#xA;Regarding the networking between your machine and some cloud machine, you will probably need to open some ports and configure your firewall and/or setup a VPN such as Wireguard and turn it on.&#xD;&#xA;&#xD;&#xA;Before testing further, try pinging your various machines to ensure that your networking looks decent. Once you confirm the pings are working, if you need to troubleshoot further, you may wan to use `nmap`.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20987" PostHistoryTypeId="50" PostId="4908" RevisionGUID="897859a3-cf9e-4dbf-af31-ebe9bb3317c0" CreationDate="2022-10-27T20:03:20.400" UserId="-1" />
  <row Id="20988" PostHistoryTypeId="2" PostId="5579" RevisionGUID="d6f880a5-cc56-4592-8920-99046be99237" CreationDate="2022-10-27T20:57:12.090" UserId="3231" Text="What does #[pallet::compact] do? [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VCZUD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="20990" PostHistoryTypeId="1" PostId="5579" RevisionGUID="d6f880a5-cc56-4592-8920-99046be99237" CreationDate="2022-10-27T20:57:12.090" UserId="3231" Text="What does #[pallet::compact] do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20991" PostHistoryTypeId="3" PostId="5579" RevisionGUID="d6f880a5-cc56-4592-8920-99046be99237" CreationDate="2022-10-27T20:57:12.090" UserId="3231" Text="|pallet|frame|assets|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="20992" PostHistoryTypeId="5" PostId="5574" RevisionGUID="4707b722-6f54-4c40-8986-8da18d0fe6ce" CreationDate="2022-10-27T21:10:43.840" UserId="198" Comment="typo" Text="## Solution&#xD;&#xA;&#xD;&#xA;You need to mount the data folder, try adding the following to your command:&#xD;&#xA;````&#xD;&#xA;-v /tmp:/polkadot&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;The following should solve your issue:&#xD;&#xA;```&#xD;&#xA;docker run -v /tmp:/polkadot --rm -it parity/polkadot-parachain --chain statemint&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Explanation&#xD;&#xA;&#xD;&#xA;The issue comes from the fact that the container does not run as `root` by default and does not grant access to the local filesystem.&#xD;&#xA;You can see where this is done [here](https://github.com/paritytech/cumulus/blob/master/docker/injected.Dockerfile#L43).&#xD;&#xA;&#xD;&#xA;The issue is actually not related to the parachain node and the following would fail as well:&#xD;&#xA;```&#xD;&#xA;touch test&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I almost do not want to mention that running as `root` would be a **bad solution**.&#xD;&#xA;&#xD;&#xA;The proper solution is to mount a folder as shown in the solution.&#xD;&#xA;&#xD;&#xA;## Which folder&#xD;&#xA;It does not really matter what local folder you use (I used `/tmp` in my example) as long as it exists and has sufficient space left.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20993" PostHistoryTypeId="2" PostId="5580" RevisionGUID="74803a57-ec64-4776-8234-7b44e019f2a3" CreationDate="2022-10-28T01:11:57.540" UserId="251" Text="It looks like you forgot the system part in the runtime/lib.rs.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl frame_system::Config for Runtime { .. }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="20995" PostHistoryTypeId="2" PostId="5581" RevisionGUID="0b342370-d520-4680-8025-01bf2e8fb43e" CreationDate="2022-10-28T01:15:24.953" UserId="251" Text="https://paritytech.github.io/substrate/master/frame_support/pallet_macros/attr.compact.html&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Compact encoding for arguments can be achieved via #[pallet::compact].&#xD;&#xA;The function must return a DispatchResultWithPostInfo or DispatchResult.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It can make the args size smaller when you send a tx.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="20997" PostHistoryTypeId="50" PostId="4975" RevisionGUID="a4e86c8b-7893-406a-b529-56b07606f1fe" CreationDate="2022-10-28T05:04:45.610" UserId="-1" />
  <row Id="20998" PostHistoryTypeId="5" PostId="3455" RevisionGUID="36fb3721-a0a1-432c-839b-30a0051d4faf" CreationDate="2022-10-28T07:22:20.787" UserId="2025" Comment="improve readability" Text="Is it okay to emit event from hooks like `on_initialize()`?&#xD;&#xA;For example, I have ~1000 items in storage and in a loop in `on_initialize()` I want to emit an event if certain process is completed, then is it fine?&#xD;&#xA;Also, what is more efficient:&#xD;&#xA;&#xD;&#xA; a) emit a burst of 1000 events, or&#xD;&#xA;&#xD;&#xA; b) combine events information in a large `Vec&lt;&gt;` and then send it wrapping in an event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="20999" PostHistoryTypeId="24" PostId="3455" RevisionGUID="36fb3721-a0a1-432c-839b-30a0051d4faf" CreationDate="2022-10-28T07:22:20.787" Comment="Proposed by 2025 approved by 34 edit id of 328" ContentLicense="CC BY-SA 4.0" />
  <row Id="21002" PostHistoryTypeId="2" PostId="5582" RevisionGUID="d08847d3-7a17-4bf5-bf3a-fc5d2844509b" CreationDate="2022-10-28T08:38:08.287" UserId="3127" Text="The 2/3 number actually comes from another mechanism, grandpa, which achieves finality. The logic of block authoring and block finalization is split between aura and grandpa. The aura authorities take turns producing blocks, and each authority indeed seals the block. Then the grandpa authorities take votes on the correct block and that's where the 2/3 threshold appears. &#xD;&#xA;&#xD;&#xA;[This talk][1] by Bill Laboon about hybrid consensus (one that uses a finality gadget) is very helpful, although it talks about BABE rather then AuRa (another block production mechanism). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://youtu.be/1CuTSluL7v4?t=604" ContentLicense="CC BY-SA 4.0" />
  <row Id="21004" PostHistoryTypeId="2" PostId="5583" RevisionGUID="e6fe512e-80c0-4205-a5e3-7889a0aa9c9e" CreationDate="2022-10-28T09:12:30.747" UserId="251" Text="I want to convert the `[u8; 2]` back to `u16`.&#xD;&#xA;&#xD;&#xA;I found this isn't simplily a `u16::from_be_bytes` or `u16::from_le_bytes`." ContentLicense="CC BY-SA 4.0" />
  <row Id="21006" PostHistoryTypeId="1" PostId="5583" RevisionGUID="e6fe512e-80c0-4205-a5e3-7889a0aa9c9e" CreationDate="2022-10-28T09:12:30.747" UserId="251" Text="Is possible to recover the SS58 `u16` prefix from bytes `[u8; 2]`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21007" PostHistoryTypeId="3" PostId="5583" RevisionGUID="e6fe512e-80c0-4205-a5e3-7889a0aa9c9e" CreationDate="2022-10-28T09:12:30.747" UserId="251" Text="|ss58|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21011" PostHistoryTypeId="5" PostId="5583" RevisionGUID="8815ac5b-dd86-4dca-9b62-9e4cda7c0a77" CreationDate="2022-10-28T10:37:00.687" UserId="29" Comment="deleted 2 characters in body" Text="I want to convert the `[u8; 2]` back to `u16`.&#xD;&#xA;&#xD;&#xA;I found this isn't simply a `u16::from_be_bytes` or `u16::from_le_bytes`." ContentLicense="CC BY-SA 4.0" />
  <row Id="21012" PostHistoryTypeId="6" PostId="113" RevisionGUID="3bb4c877-cb53-423e-ae1d-1d09938e844f" CreationDate="2022-10-28T10:46:44.083" UserId="29" Comment="edited tags" Text="|kitties|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21013" PostHistoryTypeId="6" PostId="94" RevisionGUID="51109a1e-000b-4d97-82d4-b5f6cf7120a4" CreationDate="2022-10-28T10:47:45.803" UserId="29" Comment="edited tags" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21014" PostHistoryTypeId="6" PostId="46" RevisionGUID="81fc019f-2328-42ba-8480-0e4f64f4302f" CreationDate="2022-10-28T10:48:01.993" UserId="29" Comment="edited tags" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21015" PostHistoryTypeId="6" PostId="120" RevisionGUID="a04cf488-644c-4b83-8293-12520cd6118c" CreationDate="2022-10-28T10:48:14.173" UserId="29" Comment="edited tags" Text="|ink|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21016" PostHistoryTypeId="6" PostId="168" RevisionGUID="79c24bf5-9a71-47b4-bd22-d7ec5946c4a3" CreationDate="2022-10-28T10:48:27.053" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21017" PostHistoryTypeId="6" PostId="180" RevisionGUID="d44ca795-be19-496a-97f3-9fc53f327572" CreationDate="2022-10-28T10:48:39.447" UserId="29" Comment="edited tags" Text="|polkadot|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21018" PostHistoryTypeId="6" PostId="178" RevisionGUID="7299edc2-be98-4f92-9b0f-e3ae233f3b09" CreationDate="2022-10-28T10:48:49.753" UserId="29" Comment="edited tags" Text="|parachain|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21019" PostHistoryTypeId="6" PostId="152" RevisionGUID="aa2fd847-fe46-4d4c-897c-3699da31ddc8" CreationDate="2022-10-28T10:49:21.757" UserId="29" Comment="edited tags" Text="|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21020" PostHistoryTypeId="6" PostId="198" RevisionGUID="ff9d695b-4193-4018-8be7-f09c3607d0b2" CreationDate="2022-10-28T10:49:32.893" UserId="29" Comment="edited tags" Text="|polkadot|rococo|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21021" PostHistoryTypeId="6" PostId="200" RevisionGUID="941f6eb9-e303-4164-b706-493c1eb1347a" CreationDate="2022-10-28T10:49:44.557" UserId="29" Comment="edited tags" Text="|polkadot|rpc|python|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21022" PostHistoryTypeId="6" PostId="246" RevisionGUID="3d598341-f3fc-4228-954c-d0ca6540bf4d" CreationDate="2022-10-28T10:49:53.890" UserId="29" Comment="edited tags" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21023" PostHistoryTypeId="6" PostId="257" RevisionGUID="b2e1485d-3331-4d3f-87fe-13a2f8f0f2e5" CreationDate="2022-10-28T10:50:12.913" UserId="29" Comment="edited tags" Text="|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21024" PostHistoryTypeId="6" PostId="260" RevisionGUID="50d8b9a8-1088-4423-82d0-9965dedf2ac0" CreationDate="2022-10-28T10:50:20.950" UserId="29" Comment="edited tags" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21025" PostHistoryTypeId="6" PostId="292" RevisionGUID="45d02401-c6e3-42b6-aa42-68aafa990878" CreationDate="2022-10-28T10:50:29.520" UserId="29" Comment="edited tags" Text="|pallet|subkey|palletid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21026" PostHistoryTypeId="6" PostId="290" RevisionGUID="cf5564fa-72e2-4c6c-9845-31cf8c356373" CreationDate="2022-10-28T10:50:41.400" UserId="29" Comment="edited tags" Text="|polkadot|substrate-node-template|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21027" PostHistoryTypeId="6" PostId="416" RevisionGUID="3d29dbe2-08c4-491a-a86e-a611648f057a" CreationDate="2022-10-28T10:50:53.750" UserId="29" Comment="edited tags" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21028" PostHistoryTypeId="6" PostId="377" RevisionGUID="e2c03873-ff8f-4201-8077-eb9f74751e29" CreationDate="2022-10-28T10:51:04.157" UserId="29" Comment="edited tags" Text="|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21029" PostHistoryTypeId="6" PostId="308" RevisionGUID="997285e5-483f-4cfc-ac6b-9b2b5ba8da78" CreationDate="2022-10-28T10:51:14.417" UserId="29" Comment="edited tags" Text="|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21030" PostHistoryTypeId="6" PostId="190" RevisionGUID="18bfd773-f0ed-48c1-bc34-1cb4dadda728" CreationDate="2022-10-28T10:51:22.297" UserId="29" Comment="edited tags" Text="|sdk|java|library|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21031" PostHistoryTypeId="6" PostId="321" RevisionGUID="d0a42a58-0795-4914-b143-749a59c0df4e" CreationDate="2022-10-28T10:51:30.747" UserId="29" Comment="edited tags" Text="|offchain-worker|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21032" PostHistoryTypeId="6" PostId="289" RevisionGUID="f658dabe-6af1-4103-bf25-2036a2271a16" CreationDate="2022-10-28T10:51:39.017" UserId="29" Comment="edited tags" Text="|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21033" PostHistoryTypeId="6" PostId="511" RevisionGUID="2088f9b1-a696-43b1-b090-15a94d7a90bb" CreationDate="2022-10-28T10:51:58.383" UserId="29" Comment="edited tags" Text="|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21034" PostHistoryTypeId="6" PostId="194" RevisionGUID="ca95526e-bc89-4ce4-b4a8-078dfc02aede" CreationDate="2022-10-28T10:52:07.277" UserId="29" Comment="edited tags" Text="|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21035" PostHistoryTypeId="6" PostId="529" RevisionGUID="4f1c5af0-0a48-4945-b3c9-612b415d0a18" CreationDate="2022-10-28T10:52:16.660" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21036" PostHistoryTypeId="6" PostId="554" RevisionGUID="429532ba-7e84-4f66-a635-02a730dd5d3c" CreationDate="2022-10-28T10:52:31.453" UserId="29" Comment="edited tags" Text="|polkadot-js|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21037" PostHistoryTypeId="6" PostId="560" RevisionGUID="05f3fb97-7c1c-4d9b-9d84-94ddab37bd2e" CreationDate="2022-10-28T10:52:43.617" UserId="29" Comment="edited tags" Text="|polkadot-js|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21038" PostHistoryTypeId="6" PostId="515" RevisionGUID="0061a2e8-535e-4b25-96e0-e027cbc6ee5c" CreationDate="2022-10-28T10:54:20.650" UserId="29" Comment="edited tags" Text="|prometheus|metrics|monitoring|alerts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21039" PostHistoryTypeId="6" PostId="571" RevisionGUID="7dd56451-35ff-4e55-8b79-aba6a9a519b6" CreationDate="2022-10-28T10:54:25.910" UserId="29" Comment="edited tags" Text="|database|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21040" PostHistoryTypeId="6" PostId="517" RevisionGUID="a94ca340-f43f-4b72-85b4-95a6d06a6c5b" CreationDate="2022-10-28T10:54:31.930" UserId="29" Comment="edited tags" Text="|struct|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21041" PostHistoryTypeId="6" PostId="657" RevisionGUID="543d13c3-9e7f-453b-a067-653ba59f6211" CreationDate="2022-10-28T10:54:37.900" UserId="29" Comment="edited tags" Text="|polkadot-js|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21042" PostHistoryTypeId="6" PostId="670" RevisionGUID="05e58109-b394-42aa-a976-b4a8ead6bfee" CreationDate="2022-10-28T10:55:09.990" UserId="29" Comment="edited tags" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21043" PostHistoryTypeId="6" PostId="692" RevisionGUID="7336d594-95d9-4ee1-8b3c-a7fbf8471d77" CreationDate="2022-10-28T10:55:22.943" UserId="29" Comment="edited tags" Text="|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21044" PostHistoryTypeId="6" PostId="651" RevisionGUID="92dc46c9-be7e-4692-a09b-d4b4f236dafc" CreationDate="2022-10-28T10:55:27.523" UserId="29" Comment="edited tags" Text="|runtime|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21045" PostHistoryTypeId="6" PostId="707" RevisionGUID="9231ec64-13c3-4f57-a7f0-194a700456af" CreationDate="2022-10-28T10:55:31.787" UserId="29" Comment="edited tags" Text="|consensus|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21046" PostHistoryTypeId="6" PostId="724" RevisionGUID="3b6ab7e0-8ace-420f-8dff-edc047770806" CreationDate="2022-10-28T10:55:52.757" UserId="29" Comment="edited tags" Text="|trait|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21047" PostHistoryTypeId="6" PostId="719" RevisionGUID="8c2258a8-dde1-423e-b696-2f158c998a65" CreationDate="2022-10-28T10:55:59.237" UserId="29" Comment="edited tags" Text="|configuration|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21048" PostHistoryTypeId="6" PostId="740" RevisionGUID="0c1ce6e7-cd2b-44cc-9c72-4ecc4d2232b4" CreationDate="2022-10-28T10:56:07.317" UserId="29" Comment="edited tags" Text="|polkadot-js|polkadot|substrate-node-template|substrate-kitties-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21049" PostHistoryTypeId="6" PostId="750" RevisionGUID="b9d503c6-0e28-41bb-bfe7-cd63eb9bd2e4" CreationDate="2022-10-28T10:56:12.493" UserId="29" Comment="edited tags" Text="|rust|types|traits|generics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21050" PostHistoryTypeId="6" PostId="369" RevisionGUID="3dd5d563-8879-45b2-842c-ee144061d537" CreationDate="2022-10-28T10:56:22.893" UserId="29" Comment="edited tags" Text="|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21051" PostHistoryTypeId="6" PostId="770" RevisionGUID="afd98cd7-0811-485b-ae9b-cad46d9256a1" CreationDate="2022-10-28T10:56:27.767" UserId="29" Comment="edited tags" Text="|extrinsic|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21052" PostHistoryTypeId="6" PostId="815" RevisionGUID="96eea92b-7f39-43b5-b819-f8df80abebf3" CreationDate="2022-10-28T10:56:32.020" UserId="29" Comment="edited tags" Text="|pallet|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21053" PostHistoryTypeId="6" PostId="778" RevisionGUID="d0ae8aa1-eefe-4e35-bbd8-a8cfb26be966" CreationDate="2022-10-28T10:56:36.247" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21054" PostHistoryTypeId="6" PostId="788" RevisionGUID="6c8f71cc-b94e-4067-9345-73cee4ce8d8c" CreationDate="2022-10-28T10:56:44.720" UserId="29" Comment="edited tags" Text="|rust|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21055" PostHistoryTypeId="6" PostId="883" RevisionGUID="57931ea5-f1e8-487e-a919-e8a5f928b7ad" CreationDate="2022-10-28T10:56:49.693" UserId="29" Comment="edited tags" Text="|substrate-node-template|packages|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21056" PostHistoryTypeId="6" PostId="818" RevisionGUID="c92a3f6b-5c3a-46aa-9496-f8bbbde7e16b" CreationDate="2022-10-28T10:56:55.393" UserId="29" Comment="edited tags" Text="|telemetry|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21057" PostHistoryTypeId="6" PostId="889" RevisionGUID="51366f3e-5fe8-44ce-8a8f-26250c3718d6" CreationDate="2022-10-28T10:57:01.207" UserId="29" Comment="edited tags" Text="|proxy|websocket|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21058" PostHistoryTypeId="6" PostId="900" RevisionGUID="df839470-5d35-486d-94cc-ba5edddef8fe" CreationDate="2022-10-28T10:57:05.990" UserId="29" Comment="edited tags" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21059" PostHistoryTypeId="6" PostId="907" RevisionGUID="b729f1ee-93f8-4111-9c90-6f367f1d782f" CreationDate="2022-10-28T10:57:09.930" UserId="29" Comment="edited tags" Text="|build|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21060" PostHistoryTypeId="6" PostId="896" RevisionGUID="de57cbee-732b-417a-8028-cfff8daf7f99" CreationDate="2022-10-28T10:57:13.627" UserId="29" Comment="edited tags" Text="|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21061" PostHistoryTypeId="6" PostId="921" RevisionGUID="808dcd2e-89b9-4641-8a08-01d0ef852bd5" CreationDate="2022-10-28T10:57:39.590" UserId="29" Comment="edited tags" Text="|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21062" PostHistoryTypeId="6" PostId="980" RevisionGUID="3b95d085-d6fe-45a0-85ea-22e450d86821" CreationDate="2022-10-28T10:57:49.633" UserId="29" Comment="edited tags" Text="|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21063" PostHistoryTypeId="6" PostId="941" RevisionGUID="948be19b-aa85-49c2-aec2-e7584f647c00" CreationDate="2022-10-28T10:57:54.310" UserId="29" Comment="edited tags" Text="|accountdata|convert|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21064" PostHistoryTypeId="6" PostId="993" RevisionGUID="fafdd6fa-89e0-4c7c-8988-9f1861e86f7b" CreationDate="2022-10-28T10:57:59.413" UserId="29" Comment="edited tags" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21065" PostHistoryTypeId="6" PostId="1021" RevisionGUID="57d9cee2-ec87-4fd5-b880-201f4c44b7d8" CreationDate="2022-10-28T10:58:07.590" UserId="29" Comment="edited tags" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21066" PostHistoryTypeId="6" PostId="984" RevisionGUID="9e0b18e9-55ab-4595-a168-57ca35866937" CreationDate="2022-10-28T10:58:14.273" UserId="29" Comment="edited tags" Text="|polkadot|runtime-upgrade|chainspec|authorship|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21067" PostHistoryTypeId="6" PostId="472" RevisionGUID="1427befd-be81-43d5-83e4-4e0ae761fcac" CreationDate="2022-10-28T10:58:19.940" UserId="29" Comment="edited tags" Text="|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21068" PostHistoryTypeId="6" PostId="1060" RevisionGUID="cf2ab854-dac8-41ae-8f0e-f8256d086856" CreationDate="2022-10-28T10:58:25.313" UserId="29" Comment="edited tags" Text="|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21069" PostHistoryTypeId="6" PostId="1071" RevisionGUID="9bba1b4c-ca38-48f5-b245-0bc5b63daf08" CreationDate="2022-10-28T10:58:30.650" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21070" PostHistoryTypeId="6" PostId="1145" RevisionGUID="e01f6785-f31f-4182-83c5-0d149cb4ceef" CreationDate="2022-10-28T10:58:36.417" UserId="29" Comment="edited tags" Text="|polkadot|kusama|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21071" PostHistoryTypeId="6" PostId="1141" RevisionGUID="773863a6-4651-4450-abc5-576de46dc948" CreationDate="2022-10-28T10:58:42.793" UserId="29" Comment="edited tags" Text="|string|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21072" PostHistoryTypeId="6" PostId="1202" RevisionGUID="64ead7c2-9b8e-49cd-9f88-3b5b7a0a7291" CreationDate="2022-10-28T10:58:52.937" UserId="29" Comment="edited tags" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21073" PostHistoryTypeId="6" PostId="1218" RevisionGUID="940bd136-4606-4e3e-9bc2-0873b7992bd4" CreationDate="2022-10-28T10:58:58.140" UserId="29" Comment="edited tags" Text="|polkadot|kusama|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21074" PostHistoryTypeId="6" PostId="1256" RevisionGUID="09b6db5e-0f53-4779-83c6-19e091b5886c" CreationDate="2022-10-28T10:59:02.440" UserId="29" Comment="edited tags" Text="|parachain|parachain-collator|oracles|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21075" PostHistoryTypeId="6" PostId="1289" RevisionGUID="2a4c22a8-8639-44e5-b622-ff753246ded0" CreationDate="2022-10-28T10:59:07.223" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21076" PostHistoryTypeId="6" PostId="1328" RevisionGUID="406851bf-ebc0-4595-be68-af03fe46c199" CreationDate="2022-10-28T10:59:15.223" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21077" PostHistoryTypeId="6" PostId="1333" RevisionGUID="eed5cc1f-c721-4ba1-bec7-14566f5df0f4" CreationDate="2022-10-28T10:59:19.780" UserId="29" Comment="edited tags" Text="|substrate-node-template|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21078" PostHistoryTypeId="6" PostId="1411" RevisionGUID="d699524d-a08c-4bfb-be79-acc6a355a829" CreationDate="2022-10-28T10:59:28.463" UserId="29" Comment="edited tags" Text="|pallet|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21079" PostHistoryTypeId="6" PostId="1425" RevisionGUID="9706d157-980f-4c81-9070-d09d4b568d71" CreationDate="2022-10-28T10:59:34.477" UserId="29" Comment="edited tags" Text="|polkadot|kusama|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21080" PostHistoryTypeId="6" PostId="1451" RevisionGUID="b878379b-50c8-4f12-8ddd-18f3c3aeff63" CreationDate="2022-10-28T10:59:42.903" UserId="29" Comment="edited tags" Text="|substrate-node-template|rust|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21081" PostHistoryTypeId="6" PostId="1467" RevisionGUID="14d9f9e1-8936-4250-a699-dfa84048021c" CreationDate="2022-10-28T10:59:47.267" UserId="29" Comment="edited tags" Text="|pallet|ink|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21082" PostHistoryTypeId="6" PostId="1475" RevisionGUID="6b75ea7f-99af-4ddf-82f2-e35bc9a02d5e" CreationDate="2022-10-28T10:59:53.270" UserId="29" Comment="edited tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21083" PostHistoryTypeId="6" PostId="1266" RevisionGUID="6fd1b528-9953-4d0b-a88c-1252e2cf296e" CreationDate="2022-10-28T10:59:57.980" UserId="29" Comment="edited tags" Text="|polkadot|kusama|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21084" PostHistoryTypeId="6" PostId="1456" RevisionGUID="58e3889e-1709-4f8c-909e-6b97971f3860" CreationDate="2022-10-28T11:00:01.980" UserId="29" Comment="edited tags" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21085" PostHistoryTypeId="6" PostId="1565" RevisionGUID="79b48057-3aa8-429d-8304-26dab3e78e5a" CreationDate="2022-10-28T11:00:07.200" UserId="29" Comment="edited tags" Text="|untagged|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21086" PostHistoryTypeId="6" PostId="1597" RevisionGUID="bd0db69f-5095-4ffa-9f41-12d2d4b412b9" CreationDate="2022-10-28T11:00:11.803" UserId="29" Comment="edited tags" Text="|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21087" PostHistoryTypeId="6" PostId="1634" RevisionGUID="25b33de5-cca2-4ba0-a73a-92c8ed415e12" CreationDate="2022-10-28T11:00:17.997" UserId="29" Comment="edited tags" Text="|polkadot|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21088" PostHistoryTypeId="6" PostId="2574" RevisionGUID="0eb221f3-3a61-43f2-8bc7-300ac69cd1eb" CreationDate="2022-10-28T11:01:47.480" UserId="29" Comment="edited tags" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21089" PostHistoryTypeId="6" PostId="748" RevisionGUID="6f8175a9-99aa-4f43-a74a-e8a2f38e0e8c" CreationDate="2022-10-28T11:01:54.380" UserId="29" Comment="edited tags" Text="|babe|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21090" PostHistoryTypeId="6" PostId="2525" RevisionGUID="c3673b1c-dd66-4677-a253-4d1d8d5860f5" CreationDate="2022-10-28T11:02:01.143" UserId="29" Comment="edited tags" Text="|substrate-node-template|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21091" PostHistoryTypeId="6" PostId="2557" RevisionGUID="82443735-8b37-480c-bf2c-cb4f40294f8d" CreationDate="2022-10-28T11:02:07.580" UserId="29" Comment="edited tags" Text="|polkadot|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21092" PostHistoryTypeId="6" PostId="1940" RevisionGUID="3ccef001-f083-4946-9e90-bbe6560a9a1b" CreationDate="2022-10-28T11:02:12.387" UserId="29" Comment="edited tags" Text="|ink|pallet-contracts|code-hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21093" PostHistoryTypeId="6" PostId="2521" RevisionGUID="f66ba902-fd59-4277-ace9-d5f919cdf8c4" CreationDate="2022-10-28T11:02:18.840" UserId="29" Comment="edited tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21094" PostHistoryTypeId="6" PostId="1862" RevisionGUID="30627459-355e-46ee-9e06-dce24b2b3f04" CreationDate="2022-10-28T11:02:25.567" UserId="29" Comment="edited tags" Text="|runtime-upgrade|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21095" PostHistoryTypeId="6" PostId="2224" RevisionGUID="57fa94bc-9c94-431b-9777-63b24f2430df" CreationDate="2022-10-28T11:02:33.310" UserId="29" Comment="edited tags" Text="|pallet|rpc|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21096" PostHistoryTypeId="6" PostId="2462" RevisionGUID="13ac1e9c-f5a8-4e0d-a1cf-c1c649bf6a97" CreationDate="2022-10-28T11:02:38.553" UserId="29" Comment="edited tags" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21098" PostHistoryTypeId="6" PostId="2400" RevisionGUID="465d75e9-645c-4df8-b559-1461acb6e9f7" CreationDate="2022-10-28T11:03:14.427" UserId="29" Comment="edited tags" Text="|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21099" PostHistoryTypeId="6" PostId="2262" RevisionGUID="0fb8f0cf-3727-4567-a8cb-91118e053315" CreationDate="2022-10-28T11:03:32.400" UserId="29" Comment="edited tags" Text="|design|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21100" PostHistoryTypeId="6" PostId="2307" RevisionGUID="e840cc95-d222-4b63-be43-6cc24d3c282e" CreationDate="2022-10-28T11:03:37.980" UserId="29" Comment="edited tags" Text="|pallet|frame|wasm|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21101" PostHistoryTypeId="6" PostId="2047" RevisionGUID="0e31ce32-3cca-41e1-bf97-48d879b0335e" CreationDate="2022-10-28T11:03:43.483" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21102" PostHistoryTypeId="6" PostId="2186" RevisionGUID="affc9193-9aaa-493e-9e1c-9e9a48557fab" CreationDate="2022-10-28T11:03:48.030" UserId="29" Comment="edited tags" Text="|consensus|cumulus|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21103" PostHistoryTypeId="6" PostId="2252" RevisionGUID="84fc39be-4f0d-4ff0-9af3-a1534a7b85a8" CreationDate="2022-10-28T11:03:52.890" UserId="29" Comment="edited tags" Text="|substrate-node-template|extrinsic|call|validation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21104" PostHistoryTypeId="6" PostId="2280" RevisionGUID="79a12563-12de-4811-b247-1f756fc9ab43" CreationDate="2022-10-28T11:03:56.800" UserId="29" Comment="edited tags" Text="|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21105" PostHistoryTypeId="6" PostId="1033" RevisionGUID="e23b495d-a10d-4af2-835a-a671a941b72f" CreationDate="2022-10-28T11:04:02.457" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21106" PostHistoryTypeId="6" PostId="2237" RevisionGUID="3480bc43-ce4a-4ffc-8429-d493f87b2fdc" CreationDate="2022-10-28T11:04:06.857" UserId="29" Comment="edited tags" Text="|pallet|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21107" PostHistoryTypeId="6" PostId="2255" RevisionGUID="ceebcec8-4a06-4588-92f3-c8b9e5540e9d" CreationDate="2022-10-28T11:04:12.077" UserId="29" Comment="edited tags" Text="|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21108" PostHistoryTypeId="6" PostId="2165" RevisionGUID="80a37a62-baa5-4cb2-83af-cf7f6afd73a0" CreationDate="2022-10-28T11:04:16.047" UserId="29" Comment="edited tags" Text="|substrate-node-template|telemetry|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21109" PostHistoryTypeId="6" PostId="2216" RevisionGUID="aa353788-7653-4f42-b5d8-179b8cd1178a" CreationDate="2022-10-28T11:04:19.957" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21111" PostHistoryTypeId="6" PostId="2180" RevisionGUID="4f875c11-dd24-4105-9461-2a246bc46d88" CreationDate="2022-10-28T11:04:29.620" UserId="29" Comment="edited tags" Text="|substrate-node-template|cryptography|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21112" PostHistoryTypeId="6" PostId="2141" RevisionGUID="c3627b55-6a9a-4dcc-a7f5-f14acc291d29" CreationDate="2022-10-28T11:04:34.077" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21113" PostHistoryTypeId="6" PostId="2113" RevisionGUID="d126802a-9aa9-45ec-922a-7edcb5eda786" CreationDate="2022-10-28T11:04:39.310" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21114" PostHistoryTypeId="6" PostId="2108" RevisionGUID="ce5f2eec-54e1-4a81-bcb0-b3cee98f48db" CreationDate="2022-10-28T11:04:43.740" UserId="29" Comment="edited tags" Text="|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21115" PostHistoryTypeId="6" PostId="2111" RevisionGUID="c59e88cc-7f1e-48a8-9731-b08a249f8d78" CreationDate="2022-10-28T11:04:50.213" UserId="29" Comment="edited tags" Text="|networking|offchain|gossip|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21116" PostHistoryTypeId="6" PostId="2117" RevisionGUID="fbfefd4c-75fb-4b1d-89d5-7bc0536c0eee" CreationDate="2022-10-28T11:04:55.200" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21118" PostHistoryTypeId="6" PostId="2045" RevisionGUID="aec6fb2a-f54e-4447-a89a-b7ede90e3831" CreationDate="2022-10-28T11:05:03.877" UserId="29" Comment="edited tags" Text="|pallet|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21119" PostHistoryTypeId="6" PostId="2032" RevisionGUID="6b18daba-1818-427f-a1a8-dcd3d276c7a1" CreationDate="2022-10-28T11:05:09.433" UserId="29" Comment="edited tags" Text="|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21120" PostHistoryTypeId="6" PostId="1991" RevisionGUID="5534aa45-36dd-47a5-bce5-44229580885d" CreationDate="2022-10-28T11:05:14.377" UserId="29" Comment="edited tags" Text="|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21121" PostHistoryTypeId="6" PostId="1613" RevisionGUID="e74e7c4e-a63c-43cd-ba3b-8924bd885dec" CreationDate="2022-10-28T11:05:18.273" UserId="29" Comment="edited tags" Text="|rpc|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21122" PostHistoryTypeId="6" PostId="1978" RevisionGUID="258acd2b-7989-4f35-845e-676fc43d2c74" CreationDate="2022-10-28T11:05:23.660" UserId="29" Comment="edited tags" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21123" PostHistoryTypeId="6" PostId="1939" RevisionGUID="6ae75536-db3a-4084-95a0-ea6a4cbd085d" CreationDate="2022-10-28T11:05:27.647" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21124" PostHistoryTypeId="6" PostId="1932" RevisionGUID="97ad3653-ee08-4226-b99b-60e0e9b82707" CreationDate="2022-10-28T11:05:33.923" UserId="29" Comment="edited tags" Text="|pallet|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21125" PostHistoryTypeId="6" PostId="771" RevisionGUID="4217dda7-04b3-4612-a5c4-d03180ffc80e" CreationDate="2022-10-28T11:05:37.703" UserId="29" Comment="edited tags" Text="|polkadot-js|staking|testing|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21126" PostHistoryTypeId="6" PostId="1855" RevisionGUID="523cb52b-8315-4093-b762-ea4057fa1a7a" CreationDate="2022-10-28T11:05:42.657" UserId="29" Comment="edited tags" Text="|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21127" PostHistoryTypeId="6" PostId="1850" RevisionGUID="ead97d4f-b063-4711-bc6c-1878188cc44b" CreationDate="2022-10-28T11:05:47.980" UserId="29" Comment="edited tags" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21128" PostHistoryTypeId="6" PostId="1752" RevisionGUID="da564930-6395-4afc-b3ae-847a999adc19" CreationDate="2022-10-28T11:05:52.117" UserId="29" Comment="edited tags" Text="|account|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21129" PostHistoryTypeId="6" PostId="281" RevisionGUID="fdf82e93-cb63-476d-a09f-563d21247185" CreationDate="2022-10-28T11:05:57.507" UserId="29" Comment="edited tags" Text="|polkadot|rust|fee|feeless|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21130" PostHistoryTypeId="6" PostId="1787" RevisionGUID="da83bfa7-213b-4aa7-8c58-6613e88534c4" CreationDate="2022-10-28T11:07:08.833" UserId="29" Comment="edited tags" Text="|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21131" PostHistoryTypeId="6" PostId="1777" RevisionGUID="b5111c8a-9798-4cf4-9771-6940a309842a" CreationDate="2022-10-28T11:07:14.087" UserId="29" Comment="edited tags" Text="|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21132" PostHistoryTypeId="6" PostId="793" RevisionGUID="8d41d1e3-e5a5-45c9-907a-63f24ab93fec" CreationDate="2022-10-28T11:07:18.327" UserId="29" Comment="edited tags" Text="|frontier|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21133" PostHistoryTypeId="6" PostId="1729" RevisionGUID="feb515ee-894b-44b9-b143-d0265f215070" CreationDate="2022-10-28T11:07:22.393" UserId="29" Comment="edited tags" Text="|blockchain-events|streams|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21134" PostHistoryTypeId="6" PostId="1695" RevisionGUID="1e97e222-6b9e-41d8-aa61-628dff4f210d" CreationDate="2022-10-28T11:07:27.160" UserId="29" Comment="edited tags" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21135" PostHistoryTypeId="6" PostId="1686" RevisionGUID="7c305fb1-3eed-487c-a449-4e1517935be9" CreationDate="2022-10-28T11:07:31.037" UserId="29" Comment="edited tags" Text="|networking|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21136" PostHistoryTypeId="6" PostId="1517" RevisionGUID="7516b335-a52d-4b44-aec5-feeeb1df7316" CreationDate="2022-10-28T11:07:35.573" UserId="29" Comment="edited tags" Text="|parachain|parathread|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21137" PostHistoryTypeId="6" PostId="1341" RevisionGUID="39ba9df0-a5be-436c-b829-054dfac77507" CreationDate="2022-10-28T11:07:41.310" UserId="29" Comment="edited tags" Text="|polkadot-js|parachain|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21138" PostHistoryTypeId="6" PostId="3415" RevisionGUID="73c32fbd-46c8-431a-8770-344fab6eb510" CreationDate="2022-10-28T11:09:24.640" UserId="29" Comment="edited tags" Text="|runtime|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21139" PostHistoryTypeId="6" PostId="3427" RevisionGUID="0a500786-7e90-45d6-8feb-67e9a566df97" CreationDate="2022-10-28T11:09:29.763" UserId="29" Comment="edited tags" Text="|polkadot|substrate-node-template|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21140" PostHistoryTypeId="6" PostId="3356" RevisionGUID="1b45ad80-6d32-42d4-a315-28b905e93443" CreationDate="2022-10-28T11:09:33.847" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21141" PostHistoryTypeId="6" PostId="3363" RevisionGUID="72cb2ab2-7deb-44dc-8d71-de3880e027aa" CreationDate="2022-10-28T11:09:38.140" UserId="29" Comment="edited tags" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21142" PostHistoryTypeId="5" PostId="5503" RevisionGUID="667d0915-a59f-4755-9228-32525508f300" CreationDate="2022-10-28T11:09:41.473" UserId="1820" Comment="added 218 characters in body" Text="Here is the scenario:&#xD;&#xA;&#xD;&#xA;You get X DOT in vested transfer (with schedule A) and you stake them and compound the rewards (transferable = 0). After some time, you have X + Y staked and you get another Z DOT in vested transfer (with schedule B), where Z &gt; X + Y. What you would expect to happen is:&#xD;&#xA;&#xD;&#xA;- Total locked = Z + X + Y (i.e. the whole balance and transferable is still zero)&#xD;&#xA;- 3 locks: X with vesting schedule A, Z with vesting schedule B, and X + Y for staking&#xD;&#xA;&#xD;&#xA;However, what happens is:&#xD;&#xA;&#xD;&#xA;- Total locked = Z + X&#xD;&#xA;- Transferable = Y&#xD;&#xA;- 3 locks as above&#xD;&#xA;&#xD;&#xA;So, the user basically gets a &quot;free&quot; unstake of their staking rewards thus far (Y). As far as I can tell there's no security risk, since the total staked amount is still `X + Y` and the user can be slashed for that amount. In the case of a 100% slash, the excess will effectively be &quot;taken&quot; from Z, and they'll end up with vested balance of `Z - X - Y`, as they should.&#xD;&#xA;&#xD;&#xA;However, is this the expected behavior? Because it was unexpected for me.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA; - Original vesting/staking: X = 1000&#xD;&#xA; - Compounded rewards: Y = 100&#xD;&#xA; - Second vesting: Z = 2000&#xD;&#xA; - Vesting lock = Total lock: Z + X = 3000&#xD;&#xA; - Staking lock: X + Y = 1100&#xD;&#xA; - Total balance: Z + X + Y = 3100&#xD;&#xA; - Transferable: Y = 100&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21143" PostHistoryTypeId="6" PostId="3341" RevisionGUID="6468a6b5-df55-42e5-a6a2-5ab39ffa9a3d" CreationDate="2022-10-28T11:09:46.560" UserId="29" Comment="edited tags" Text="|frame|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21144" PostHistoryTypeId="6" PostId="3347" RevisionGUID="6945f694-3fdd-459b-b82f-1d5a7c5c23fa" CreationDate="2022-10-28T11:09:51.130" UserId="29" Comment="edited tags" Text="|polkadot|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21146" PostHistoryTypeId="6" PostId="3154" RevisionGUID="af190e4c-a230-4df0-9c25-cc992cc08378" CreationDate="2022-10-28T11:10:01.770" UserId="29" Comment="edited tags" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21147" PostHistoryTypeId="6" PostId="3210" RevisionGUID="04567c09-c051-4697-8812-35a0d9dbd2ff" CreationDate="2022-10-28T11:10:06.827" UserId="29" Comment="edited tags" Text="|pallet|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21148" PostHistoryTypeId="6" PostId="2345" RevisionGUID="09fe1a15-20b6-4476-8f45-6a75643a337c" CreationDate="2022-10-28T11:10:14.377" UserId="29" Comment="edited tags" Text="|networking|nodes|network|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21149" PostHistoryTypeId="6" PostId="3217" RevisionGUID="d88c5057-e32b-4d89-b8ba-71b7b8e6adda" CreationDate="2022-10-28T11:10:20.800" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21150" PostHistoryTypeId="6" PostId="3205" RevisionGUID="b3aa371d-939e-485e-9801-529b1202aea0" CreationDate="2022-10-28T11:10:25.367" UserId="29" Comment="edited tags" Text="|weight|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21151" PostHistoryTypeId="6" PostId="3213" RevisionGUID="dbacf3de-a7ad-4912-ab47-593ec0616d96" CreationDate="2022-10-28T11:10:29.143" UserId="29" Comment="edited tags" Text="|polkadot-js|ink|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21152" PostHistoryTypeId="6" PostId="3206" RevisionGUID="03c39224-617a-43e8-b2b5-bde4591d865e" CreationDate="2022-10-28T11:10:33.147" UserId="29" Comment="edited tags" Text="|storage|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21153" PostHistoryTypeId="6" PostId="3212" RevisionGUID="be04e9e0-911f-47c7-99e8-dc3ece153830" CreationDate="2022-10-28T11:10:48.413" UserId="29" Comment="edited tags" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21154" PostHistoryTypeId="6" PostId="3209" RevisionGUID="9886a45f-d1c7-4d09-8ad5-d2c981785daf" CreationDate="2022-10-28T11:10:52.887" UserId="29" Comment="edited tags" Text="|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21156" PostHistoryTypeId="6" PostId="3207" RevisionGUID="b012ae8c-96ab-4f77-8a70-a6f474e3ae16" CreationDate="2022-10-28T11:11:01.563" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21157" PostHistoryTypeId="6" PostId="3202" RevisionGUID="1168f437-8a12-4ac1-a24c-3c2c196a87e6" CreationDate="2022-10-28T11:11:07.947" UserId="29" Comment="edited tags" Text="|polkadot|kusama|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21158" PostHistoryTypeId="6" PostId="3100" RevisionGUID="16d4c403-ecba-49dc-8ea1-068c91aff70e" CreationDate="2022-10-28T11:11:12.250" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21159" PostHistoryTypeId="6" PostId="3190" RevisionGUID="24d4db07-2338-41cb-8a93-c2151e6da1e1" CreationDate="2022-10-28T11:11:16.333" UserId="29" Comment="edited tags" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21160" PostHistoryTypeId="6" PostId="2797" RevisionGUID="f0ae7146-dfcb-4324-bd9d-ff56f9244aee" CreationDate="2022-10-28T11:11:21.287" UserId="29" Comment="edited tags" Text="|ink|smart-contract|substrate-contracts-node|blockchaincross-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21161" PostHistoryTypeId="6" PostId="3155" RevisionGUID="83b2efc0-069f-4175-a90e-4594ce55accc" CreationDate="2022-10-28T11:11:25.927" UserId="29" Comment="edited tags" Text="|runtime-upgrade|upgrade|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21162" PostHistoryTypeId="6" PostId="2865" RevisionGUID="b80103ab-7e57-422c-8912-4f150e216640" CreationDate="2022-10-28T11:11:36.337" UserId="29" Comment="edited tags" Text="|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21163" PostHistoryTypeId="6" PostId="3115" RevisionGUID="ec001c02-c154-44ad-9fa1-ff48fc419cea" CreationDate="2022-10-28T11:11:41.217" UserId="29" Comment="edited tags" Text="|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21164" PostHistoryTypeId="6" PostId="3069" RevisionGUID="a76269ed-c468-44a1-837f-917478fb2243" CreationDate="2022-10-28T11:11:48.573" UserId="29" Comment="edited tags" Text="|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21165" PostHistoryTypeId="6" PostId="3109" RevisionGUID="141a8d77-2097-4d8b-a464-d96d3193e74f" CreationDate="2022-10-28T11:11:53.483" UserId="29" Comment="edited tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21166" PostHistoryTypeId="6" PostId="2780" RevisionGUID="b32a09e4-1e6d-4444-8c30-f6449009390c" CreationDate="2022-10-28T11:11:58.013" UserId="29" Comment="edited tags" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21167" PostHistoryTypeId="6" PostId="552" RevisionGUID="3539ea5c-b5c8-41b7-b6fe-764a88af1600" CreationDate="2022-10-28T11:12:01.937" UserId="29" Comment="edited tags" Text="|polkadot-js|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21168" PostHistoryTypeId="6" PostId="3032" RevisionGUID="9a4c0c32-65dd-4b0c-8903-fe76577c4f9f" CreationDate="2022-10-28T11:12:22.910" UserId="29" Comment="edited tags" Text="|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21169" PostHistoryTypeId="6" PostId="2177" RevisionGUID="db81306f-db35-449a-84f7-d9cc586fb2f5" CreationDate="2022-10-28T11:12:27.050" UserId="29" Comment="edited tags" Text="|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21170" PostHistoryTypeId="6" PostId="2554" RevisionGUID="ed6feb45-86e6-4d68-98cb-cbdeb457fa5e" CreationDate="2022-10-28T11:12:33.263" UserId="29" Comment="edited tags" Text="|substrate-node-template|runtime-upgrade|on-runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21171" PostHistoryTypeId="6" PostId="2963" RevisionGUID="07796c98-cb20-4196-a7a5-895a8f462a18" CreationDate="2022-10-28T11:12:37.517" UserId="29" Comment="edited tags" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21172" PostHistoryTypeId="6" PostId="2923" RevisionGUID="19edf868-7388-4f44-8c4b-6a1822e18052" CreationDate="2022-10-28T11:12:41.897" UserId="29" Comment="edited tags" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21173" PostHistoryTypeId="6" PostId="2845" RevisionGUID="f0c7d768-1b49-4e82-8a3a-8f46cf832ce7" CreationDate="2022-10-28T11:12:47.510" UserId="29" Comment="edited tags" Text="|nodes|prometheus|metrics|telemetry|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21174" PostHistoryTypeId="6" PostId="2894" RevisionGUID="2267f919-6e89-4110-8c47-ae13afbedd18" CreationDate="2022-10-28T11:12:51.613" UserId="29" Comment="edited tags" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21175" PostHistoryTypeId="6" PostId="2879" RevisionGUID="1d662cc4-3c70-4825-aa22-f5cba3c2c0d5" CreationDate="2022-10-28T11:12:55.127" UserId="29" Comment="edited tags" Text="|polkadot|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21176" PostHistoryTypeId="6" PostId="2851" RevisionGUID="3da289b8-1c21-4ae4-b05b-4319a99e84de" CreationDate="2022-10-28T11:12:58.727" UserId="29" Comment="edited tags" Text="|rpc|evm|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21177" PostHistoryTypeId="6" PostId="2828" RevisionGUID="4b4f582c-9914-4ff9-93fd-8d2b3c7ff2b9" CreationDate="2022-10-28T11:13:16.470" UserId="29" Comment="edited tags" Text="|error|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21179" PostHistoryTypeId="6" PostId="2527" RevisionGUID="58e9b8e0-feb9-4882-a28c-e1655e4358dc" CreationDate="2022-10-28T11:13:40.980" UserId="29" Comment="edited tags" Text="|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21181" PostHistoryTypeId="6" PostId="2801" RevisionGUID="d5059802-b086-4f65-83f9-b7504d42859c" CreationDate="2022-10-28T11:13:50.273" UserId="29" Comment="edited tags" Text="|blockchain|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21182" PostHistoryTypeId="6" PostId="2773" RevisionGUID="0b09aab0-aac0-47a5-a34f-3d555b9dd465" CreationDate="2022-10-28T11:13:58.260" UserId="29" Comment="edited tags" Text="|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21183" PostHistoryTypeId="6" PostId="2762" RevisionGUID="70009ddc-edde-40e2-abad-932d6b7d11d1" CreationDate="2022-10-28T11:14:02.567" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21185" PostHistoryTypeId="6" PostId="2737" RevisionGUID="44de3786-2ec8-463c-bf53-581bc00acc9f" CreationDate="2022-10-28T11:14:12.973" UserId="29" Comment="edited tags" Text="|polkadot-js|transactions|substrate-front-end|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21186" PostHistoryTypeId="6" PostId="2735" RevisionGUID="fcf5b66b-8102-45e0-8a7b-75f366e7db3b" CreationDate="2022-10-28T11:14:22.373" UserId="29" Comment="edited tags" Text="|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21187" PostHistoryTypeId="6" PostId="2724" RevisionGUID="8703fc9b-583c-43cc-87b2-815a0d2217c4" CreationDate="2022-10-28T11:14:26.773" UserId="29" Comment="edited tags" Text="|polkadot-js|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21188" PostHistoryTypeId="6" PostId="2700" RevisionGUID="ebf1ab84-135f-4816-b291-84ef488085d8" CreationDate="2022-10-28T11:14:30.843" UserId="29" Comment="edited tags" Text="|prometheus|metrics|monitoring|alerts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21189" PostHistoryTypeId="6" PostId="4140" RevisionGUID="0beb0978-b99d-4595-89bf-00695cd83986" CreationDate="2022-10-28T11:16:02.810" UserId="29" Comment="edited tags" Text="|parachain|extrinsic|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21190" PostHistoryTypeId="6" PostId="4055" RevisionGUID="aadfee14-86a5-4ea0-a989-00936e3b45ca" CreationDate="2022-10-28T11:16:08.087" UserId="29" Comment="edited tags" Text="|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21191" PostHistoryTypeId="6" PostId="3595" RevisionGUID="766df3d5-8302-4054-8536-a61ad0eea4b9" CreationDate="2022-10-28T11:16:11.837" UserId="29" Comment="edited tags" Text="|frontier|evm|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21192" PostHistoryTypeId="6" PostId="3288" RevisionGUID="82cf078f-5778-42c4-9405-8e938e4dc1ae" CreationDate="2022-10-28T11:16:19.747" UserId="29" Comment="edited tags" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21193" PostHistoryTypeId="6" PostId="4029" RevisionGUID="66ac964e-efd8-4a98-9854-8e5102a78ec3" CreationDate="2022-10-28T11:16:23.470" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21194" PostHistoryTypeId="6" PostId="4013" RevisionGUID="51c101c1-2c66-4823-a614-dc5ef19bb641" CreationDate="2022-10-28T11:16:27.100" UserId="29" Comment="edited tags" Text="|ink|rust|substrate-contracts-node|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21195" PostHistoryTypeId="6" PostId="4008" RevisionGUID="2307ba7c-fd8d-45d3-8acb-a55dc76e9789" CreationDate="2022-10-28T11:16:33.987" UserId="29" Comment="edited tags" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21196" PostHistoryTypeId="6" PostId="3977" RevisionGUID="19306d35-6185-4e9e-9bd4-bf55e6fdb2c7" CreationDate="2022-10-28T11:16:41.017" UserId="29" Comment="edited tags" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21197" PostHistoryTypeId="6" PostId="3935" RevisionGUID="8c664f45-b832-4943-a456-f114ac76937a" CreationDate="2022-10-28T11:16:45.107" UserId="29" Comment="edited tags" Text="|rust|constants|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21198" PostHistoryTypeId="6" PostId="3880" RevisionGUID="905deabb-eb1e-4e22-979b-da7a0a4475e3" CreationDate="2022-10-28T11:16:49.520" UserId="29" Comment="edited tags" Text="|substrate-node-template|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21199" PostHistoryTypeId="6" PostId="3901" RevisionGUID="f0bcdffc-f44a-4acc-8180-42556f7aa3a3" CreationDate="2022-10-28T11:16:58.383" UserId="29" Comment="edited tags" Text="|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21200" PostHistoryTypeId="6" PostId="3892" RevisionGUID="62763293-a8c6-42ea-8a5d-fb895b735f15" CreationDate="2022-10-28T11:17:03.937" UserId="29" Comment="edited tags" Text="|substrate-node-template|identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21201" PostHistoryTypeId="6" PostId="3891" RevisionGUID="c47fa3c3-fb93-4277-bca5-8824dec66f98" CreationDate="2022-10-28T11:17:07.800" UserId="29" Comment="edited tags" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21202" PostHistoryTypeId="6" PostId="3864" RevisionGUID="5c67f1ab-6ed1-4de7-b31e-8f8d7c00bede" CreationDate="2022-10-28T11:17:14.330" UserId="29" Comment="edited tags" Text="|rpc|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21203" PostHistoryTypeId="6" PostId="3868" RevisionGUID="79a85553-04d1-4c2d-9202-15e01e09838a" CreationDate="2022-10-28T11:17:19.470" UserId="29" Comment="edited tags" Text="|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21204" PostHistoryTypeId="6" PostId="263" RevisionGUID="e96e6b9c-2c11-4080-9bca-06790a7e452d" CreationDate="2022-10-28T11:17:28.103" UserId="29" Comment="edited tags" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21205" PostHistoryTypeId="6" PostId="3735" RevisionGUID="b2290285-27f1-4b23-9570-f6aef2cc6f75" CreationDate="2022-10-28T11:17:31.740" UserId="29" Comment="edited tags" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21206" PostHistoryTypeId="6" PostId="3365" RevisionGUID="d012b0f0-6a68-4a6c-9534-af89ac2fb847" CreationDate="2022-10-28T11:17:37.053" UserId="29" Comment="edited tags" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21207" PostHistoryTypeId="6" PostId="3823" RevisionGUID="424c3d32-b83c-485b-8661-d4bc5a560108" CreationDate="2022-10-28T11:17:41.827" UserId="29" Comment="edited tags" Text="|networking|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21208" PostHistoryTypeId="6" PostId="3811" RevisionGUID="9f6c6116-0776-4f01-84f6-cb70a8f6530d" CreationDate="2022-10-28T11:17:46.880" UserId="29" Comment="edited tags" Text="|pallet|runtime|node-primitives|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21209" PostHistoryTypeId="6" PostId="3657" RevisionGUID="b82f32d7-7a12-4cde-936f-c903c4dc85e4" CreationDate="2022-10-28T11:17:51.490" UserId="29" Comment="edited tags" Text="|polkadot|validator|parachain-collator|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21210" PostHistoryTypeId="6" PostId="2322" RevisionGUID="90d12365-5dba-4734-b18e-99a91a46c58c" CreationDate="2022-10-28T11:17:58.197" UserId="29" Comment="edited tags" Text="|nodes|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21211" PostHistoryTypeId="6" PostId="3788" RevisionGUID="5521368c-0277-431a-a62a-f14c9ddab01a" CreationDate="2022-10-28T11:18:04.567" UserId="29" Comment="edited tags" Text="|nodes|memory|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21212" PostHistoryTypeId="6" PostId="3635" RevisionGUID="aa28b020-ce83-40ef-8c7e-964d8b01b97c" CreationDate="2022-10-28T11:18:11.747" UserId="29" Comment="edited tags" Text="|parachain|parachain-collator|relay-chain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21213" PostHistoryTypeId="6" PostId="3707" RevisionGUID="d6765ce4-622b-4f9f-bbad-ec22fdb7a17c" CreationDate="2022-10-28T11:18:15.653" UserId="29" Comment="edited tags" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21214" PostHistoryTypeId="6" PostId="3172" RevisionGUID="134e4725-036e-4642-bf7e-664d9d25fbce" CreationDate="2022-10-28T11:18:22.570" UserId="29" Comment="edited tags" Text="|polkadot|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21215" PostHistoryTypeId="6" PostId="3601" RevisionGUID="e90c05ae-a562-4d23-99e2-bd7a9e86eb18" CreationDate="2022-10-28T11:18:28.720" UserId="29" Comment="edited tags" Text="|offchain-worker|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21216" PostHistoryTypeId="6" PostId="2036" RevisionGUID="d2f0260d-a43d-4f77-a9a9-c712625be268" CreationDate="2022-10-28T11:18:34.180" UserId="29" Comment="edited tags" Text="|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21217" PostHistoryTypeId="6" PostId="3716" RevisionGUID="8d9584b2-774e-4c31-95e3-470badf19108" CreationDate="2022-10-28T11:18:39.163" UserId="29" Comment="edited tags" Text="|substrate-node-template|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21218" PostHistoryTypeId="6" PostId="3708" RevisionGUID="4bbb4927-3274-49e7-b54b-a5b9f25af7dc" CreationDate="2022-10-28T11:18:44.567" UserId="29" Comment="edited tags" Text="|parachain|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21219" PostHistoryTypeId="6" PostId="3698" RevisionGUID="d0d5225b-78e8-4016-9f7d-b207070e2aff" CreationDate="2022-10-28T11:18:49.670" UserId="29" Comment="edited tags" Text="|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21220" PostHistoryTypeId="6" PostId="3136" RevisionGUID="99535dbf-33a0-40d5-8e42-69d498c4397a" CreationDate="2022-10-28T11:19:01.697" UserId="29" Comment="edited tags" Text="|data-type|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21221" PostHistoryTypeId="6" PostId="3649" RevisionGUID="e35cb16b-0057-4bdb-83e4-5f4d06159c64" CreationDate="2022-10-28T11:19:06.380" UserId="29" Comment="edited tags" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21222" PostHistoryTypeId="6" PostId="3301" RevisionGUID="176c0964-b3fa-4737-a6a2-87a0ae27f057" CreationDate="2022-10-28T11:19:11.353" UserId="29" Comment="edited tags" Text="|runtime-upgrade|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21223" PostHistoryTypeId="6" PostId="2781" RevisionGUID="c75d74ee-0207-4703-a203-901546aab623" CreationDate="2022-10-28T11:19:16.833" UserId="29" Comment="edited tags" Text="|polkadot|election|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21224" PostHistoryTypeId="6" PostId="2841" RevisionGUID="f960a66d-3006-4cf6-8885-4707aebcaf77" CreationDate="2022-10-28T11:19:20.443" UserId="29" Comment="edited tags" Text="|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21225" PostHistoryTypeId="6" PostId="3606" RevisionGUID="11d65983-7a57-46f5-8398-c284cf23bbbb" CreationDate="2022-10-28T11:19:25.307" UserId="29" Comment="edited tags" Text="|substrate-node-template|babe|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21226" PostHistoryTypeId="6" PostId="3599" RevisionGUID="d5a51232-90d9-4389-91c4-9343ad72a23a" CreationDate="2022-10-28T11:19:29.603" UserId="29" Comment="edited tags" Text="|polkadot-js|evm|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21227" PostHistoryTypeId="6" PostId="3594" RevisionGUID="470b157a-4072-4546-8b6f-b854fc15f3a9" CreationDate="2022-10-28T11:19:34.040" UserId="29" Comment="edited tags" Text="|pallet|runtime|config|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21228" PostHistoryTypeId="6" PostId="3576" RevisionGUID="5286bd0a-7125-4a6f-ab0c-054d04e60471" CreationDate="2022-10-28T11:19:38.013" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21229" PostHistoryTypeId="6" PostId="3583" RevisionGUID="a5de5c8c-ccd8-4491-8d0a-114dd78e42a4" CreationDate="2022-10-28T11:19:42.913" UserId="29" Comment="edited tags" Text="|validator|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21230" PostHistoryTypeId="6" PostId="3546" RevisionGUID="c2518b5d-5610-4d13-bf3e-f490f1f1d6e7" CreationDate="2022-10-28T11:19:46.680" UserId="29" Comment="edited tags" Text="|pallet|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21231" PostHistoryTypeId="6" PostId="3529" RevisionGUID="ab29d5e8-b92e-4ee7-86f8-5954c79994dd" CreationDate="2022-10-28T11:19:51.177" UserId="29" Comment="edited tags" Text="|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21232" PostHistoryTypeId="6" PostId="3534" RevisionGUID="257af3f8-829b-40d8-b739-7df9779c6f0e" CreationDate="2022-10-28T11:19:54.883" UserId="29" Comment="edited tags" Text="|polkadot|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21233" PostHistoryTypeId="6" PostId="3498" RevisionGUID="bb8199f4-bcfc-4ee4-a68f-e6345e1fe99e" CreationDate="2022-10-28T11:19:59.567" UserId="29" Comment="edited tags" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21234" PostHistoryTypeId="6" PostId="3488" RevisionGUID="9af45155-8f58-4450-a853-fa34b52137d4" CreationDate="2022-10-28T11:20:08.277" UserId="29" Comment="edited tags" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21235" PostHistoryTypeId="6" PostId="3450" RevisionGUID="6d444dca-217e-4c2b-bb2e-333f0c0cfa23" CreationDate="2022-10-28T11:20:17.223" UserId="29" Comment="edited tags" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21236" PostHistoryTypeId="6" PostId="3463" RevisionGUID="4aea2ee7-ca7e-4c91-9432-1dc4701bc905" CreationDate="2022-10-28T11:20:22.460" UserId="29" Comment="edited tags" Text="|polkadot|polkadot-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21237" PostHistoryTypeId="6" PostId="2833" RevisionGUID="415f4b24-cf6e-4612-962f-9bc5afa6be1f" CreationDate="2022-10-28T11:20:26.267" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21238" PostHistoryTypeId="6" PostId="3379" RevisionGUID="d8663898-ad98-4543-9a4e-7ad9baf88b2c" CreationDate="2022-10-28T11:20:31.653" UserId="29" Comment="edited tags" Text="|benchmarking|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21239" PostHistoryTypeId="6" PostId="4791" RevisionGUID="de7fb40d-bba5-4904-b345-f99e7af9481c" CreationDate="2022-10-28T11:22:17.647" UserId="29" Comment="edited tags" Text="|networking|gossip|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21240" PostHistoryTypeId="6" PostId="4789" RevisionGUID="7f0cf5e0-9771-475f-b749-4dde8259bf94" CreationDate="2022-10-28T11:22:24.687" UserId="29" Comment="edited tags" Text="|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21241" PostHistoryTypeId="6" PostId="4788" RevisionGUID="9299b229-298a-44b7-b9e4-0db76c295f18" CreationDate="2022-10-28T11:22:28.447" UserId="29" Comment="edited tags" Text="|polkadot-js|polkadot|kusama|ledger|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21242" PostHistoryTypeId="6" PostId="4769" RevisionGUID="d62c48e9-ae77-469c-8c5c-ee59fd817f39" CreationDate="2022-10-28T11:22:41.637" UserId="29" Comment="edited tags" Text="|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21243" PostHistoryTypeId="6" PostId="4756" RevisionGUID="30c7c8db-68b2-411b-9d19-79550cf6ad75" CreationDate="2022-10-28T11:22:47.567" UserId="29" Comment="edited tags" Text="|private-network|websocket|wss|nginx|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21245" PostHistoryTypeId="6" PostId="4750" RevisionGUID="1f52aca5-9ca9-474e-886d-9d34673f3ae1" CreationDate="2022-10-28T11:23:05.087" UserId="29" Comment="edited tags" Text="|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21246" PostHistoryTypeId="6" PostId="4721" RevisionGUID="9e702118-a166-40d4-a2e9-23e41019fe1e" CreationDate="2022-10-28T11:23:12.230" UserId="29" Comment="edited tags" Text="|substrate-node-template|features|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21247" PostHistoryTypeId="6" PostId="4732" RevisionGUID="deaf686c-e2cb-481d-a598-aee9c39a4b0a" CreationDate="2022-10-28T11:23:19.290" UserId="29" Comment="edited tags" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21248" PostHistoryTypeId="6" PostId="4672" RevisionGUID="310a555c-471c-4ad0-9ad6-b0d20c0ee970" CreationDate="2022-10-28T11:23:25.897" UserId="29" Comment="edited tags" Text="|polkadot|pallet|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21249" PostHistoryTypeId="6" PostId="4726" RevisionGUID="9f8ce3fa-faf9-4bc3-ad3e-a5b6c6a348e7" CreationDate="2022-10-28T11:23:31.253" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21250" PostHistoryTypeId="6" PostId="4701" RevisionGUID="75ec7d51-fb7f-49d5-a357-66ddae9a86e2" CreationDate="2022-10-28T11:23:35.073" UserId="29" Comment="edited tags" Text="|rust|runtime|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21251" PostHistoryTypeId="6" PostId="4707" RevisionGUID="d519a7dc-bcde-414e-a6c0-4ab7753b067e" CreationDate="2022-10-28T11:23:38.880" UserId="29" Comment="edited tags" Text="|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21252" PostHistoryTypeId="6" PostId="4681" RevisionGUID="4b44cb7a-a9d1-4bd1-b3a5-0766adc2df9a" CreationDate="2022-10-28T11:23:43.297" UserId="29" Comment="edited tags" Text="|polkadot|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21253" PostHistoryTypeId="6" PostId="4020" RevisionGUID="e523e2e0-0c0c-4619-8a0d-c2291451502b" CreationDate="2022-10-28T11:23:49.340" UserId="29" Comment="edited tags" Text="|rpc|websocket|wss|fork|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21254" PostHistoryTypeId="6" PostId="4119" RevisionGUID="87223705-d81f-4595-b3bc-6e824fe4dbed" CreationDate="2022-10-28T11:23:55.293" UserId="29" Comment="edited tags" Text="|pallet|frame|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21255" PostHistoryTypeId="6" PostId="4659" RevisionGUID="efc00454-396c-4bb1-9a7a-b30bcf877b02" CreationDate="2022-10-28T11:23:59.590" UserId="29" Comment="edited tags" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21256" PostHistoryTypeId="6" PostId="4106" RevisionGUID="7b80f727-fb31-4ab5-98a6-c3c7528b01f8" CreationDate="2022-10-28T11:24:03.760" UserId="29" Comment="edited tags" Text="|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21257" PostHistoryTypeId="6" PostId="4649" RevisionGUID="fc2b261a-8c36-48c7-9c25-6cbb49ca19ae" CreationDate="2022-10-28T11:24:08.010" UserId="29" Comment="edited tags" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21258" PostHistoryTypeId="6" PostId="4624" RevisionGUID="845148c4-b26b-40a6-9b22-0cbf4dc3eff2" CreationDate="2022-10-28T11:24:12.707" UserId="29" Comment="edited tags" Text="|peers|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21259" PostHistoryTypeId="6" PostId="1988" RevisionGUID="0e3ad76f-bd1d-4aea-89e4-328dc4ae6037" CreationDate="2022-10-28T11:24:20.640" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21260" PostHistoryTypeId="6" PostId="4625" RevisionGUID="011938c2-812f-4deb-8c90-39a78d9b171c" CreationDate="2022-10-28T11:24:24.517" UserId="29" Comment="edited tags" Text="|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21261" PostHistoryTypeId="6" PostId="4581" RevisionGUID="4d0d6dbb-83c9-44fd-baec-012a94f00b80" CreationDate="2022-10-28T11:24:30.053" UserId="29" Comment="edited tags" Text="|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21262" PostHistoryTypeId="6" PostId="4557" RevisionGUID="0eaf4399-ac21-48c1-9257-8c53473cf73f" CreationDate="2022-10-28T11:24:33.923" UserId="29" Comment="edited tags" Text="|peers|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21263" PostHistoryTypeId="6" PostId="4558" RevisionGUID="a2af0227-6d6e-4de4-b9c1-ca03afcc2331" CreationDate="2022-10-28T11:24:38.347" UserId="29" Comment="edited tags" Text="|substrate-node-template|block-production|substrate-block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21264" PostHistoryTypeId="6" PostId="4545" RevisionGUID="ca82507a-c1c3-4c78-bcfa-2974961739d9" CreationDate="2022-10-28T11:24:46.473" UserId="29" Comment="edited tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21265" PostHistoryTypeId="6" PostId="1732" RevisionGUID="b2a46628-bb25-4e0c-98f1-10062993acda" CreationDate="2022-10-28T11:24:50.273" UserId="29" Comment="edited tags" Text="|polkadot|rococo|rococo-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21266" PostHistoryTypeId="6" PostId="4510" RevisionGUID="c670987a-3ff9-455b-8306-24e1bc29e488" CreationDate="2022-10-28T11:24:56.127" UserId="29" Comment="edited tags" Text="|loose-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21267" PostHistoryTypeId="6" PostId="4498" RevisionGUID="f45c2b2a-f5d2-4938-8683-72a247a17909" CreationDate="2022-10-28T11:25:00.487" UserId="29" Comment="edited tags" Text="|parachain|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21268" PostHistoryTypeId="6" PostId="4476" RevisionGUID="ad281e30-1611-4176-833d-dd5bd4e9633c" CreationDate="2022-10-28T11:25:03.887" UserId="29" Comment="edited tags" Text="|pallet|storage|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21269" PostHistoryTypeId="6" PostId="3972" RevisionGUID="0655b2a7-ffcd-44f1-8c43-cec258d6207a" CreationDate="2022-10-28T11:25:08.130" UserId="29" Comment="edited tags" Text="|polkadot|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21270" PostHistoryTypeId="6" PostId="4446" RevisionGUID="dac09fa5-144b-4cf0-bafd-4f96f6c68c32" CreationDate="2022-10-28T11:25:13.193" UserId="29" Comment="edited tags" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21271" PostHistoryTypeId="6" PostId="4383" RevisionGUID="58aed298-5821-475b-9da4-e7bd3447980e" CreationDate="2022-10-28T11:25:19.957" UserId="29" Comment="edited tags" Text="|transactions|rpc|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21272" PostHistoryTypeId="6" PostId="3931" RevisionGUID="2d754651-f8fd-42a2-b9e6-51c9aa6d6d8c" CreationDate="2022-10-28T11:25:24.797" UserId="29" Comment="edited tags" Text="|polkadot|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21273" PostHistoryTypeId="6" PostId="4410" RevisionGUID="32110d04-3cde-48d1-90f6-58c0123ed691" CreationDate="2022-10-28T11:25:28.383" UserId="29" Comment="edited tags" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21274" PostHistoryTypeId="6" PostId="4375" RevisionGUID="b0eb45e9-9df5-4c5c-818c-9959c5f50676" CreationDate="2022-10-28T11:25:32.197" UserId="29" Comment="edited tags" Text="|parachain|storage|kusama|kabocha|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21275" PostHistoryTypeId="6" PostId="4367" RevisionGUID="7ea77775-14ad-4a41-bef2-3b7dd2dc3b43" CreationDate="2022-10-28T11:25:38.503" UserId="29" Comment="edited tags" Text="|substrate-node-template|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21276" PostHistoryTypeId="6" PostId="4348" RevisionGUID="977ab4de-3917-4768-96ee-9fce5091d8d6" CreationDate="2022-10-28T11:25:43.990" UserId="29" Comment="edited tags" Text="|rust|evm|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21277" PostHistoryTypeId="6" PostId="4363" RevisionGUID="07c455ed-4d5d-4691-9a58-b2b10c7a3f3e" CreationDate="2022-10-28T11:25:47.877" UserId="29" Comment="edited tags" Text="|validator|private-network|peers|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21278" PostHistoryTypeId="6" PostId="4240" RevisionGUID="58b69537-f072-4102-911a-e2381ee1bbde" CreationDate="2022-10-28T11:25:52.100" UserId="29" Comment="edited tags" Text="|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21279" PostHistoryTypeId="6" PostId="4313" RevisionGUID="39d346d2-a79f-4aa9-a446-6e22ab6e27c9" CreationDate="2022-10-28T11:25:55.860" UserId="29" Comment="edited tags" Text="|transactions|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21280" PostHistoryTypeId="6" PostId="3720" RevisionGUID="50610e21-1879-4528-a7e3-3bfac5c7418c" CreationDate="2022-10-28T11:26:00.883" UserId="29" Comment="edited tags" Text="|ink|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21281" PostHistoryTypeId="6" PostId="3295" RevisionGUID="2409584a-6955-4616-95b6-a18287a79cc8" CreationDate="2022-10-28T11:26:13.180" UserId="29" Comment="edited tags" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21282" PostHistoryTypeId="6" PostId="4234" RevisionGUID="6b24371c-559a-4e2b-a693-e71d1d20826f" CreationDate="2022-10-28T11:26:22.383" UserId="29" Comment="edited tags" Text="|origin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21283" PostHistoryTypeId="6" PostId="4201" RevisionGUID="8303c447-3e7a-4a5b-9c2d-0f3abc52f3bf" CreationDate="2022-10-28T11:26:26.943" UserId="29" Comment="edited tags" Text="|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21284" PostHistoryTypeId="6" PostId="3479" RevisionGUID="70a56f5a-08c5-49ed-a2df-d41da619f146" CreationDate="2022-10-28T11:26:32.287" UserId="29" Comment="edited tags" Text="|polkadot|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21285" PostHistoryTypeId="6" PostId="3721" RevisionGUID="5f0173ca-a3b7-4025-be68-235e345e29aa" CreationDate="2022-10-28T11:26:38.950" UserId="29" Comment="edited tags" Text="|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21286" PostHistoryTypeId="6" PostId="4148" RevisionGUID="fbfc709c-270a-4530-89a3-7f0d79a5578b" CreationDate="2022-10-28T11:26:42.763" UserId="29" Comment="edited tags" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21287" PostHistoryTypeId="6" PostId="3302" RevisionGUID="75ca32fc-079b-4d11-9260-657ddb2dcbf1" CreationDate="2022-10-28T11:26:48.513" UserId="29" Comment="edited tags" Text="|pallet|benchmarking|weight|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21288" PostHistoryTypeId="6" PostId="2670" RevisionGUID="06dd8188-5119-420b-bb7a-9d62d523fd3a" CreationDate="2022-10-28T11:26:53.247" UserId="29" Comment="edited tags" Text="|polkadot|frame|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21289" PostHistoryTypeId="6" PostId="5268" RevisionGUID="420bed3a-d60b-4a7f-9706-9c5d2b07af6c" CreationDate="2022-10-28T11:28:18.117" UserId="29" Comment="edited tags" Text="|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21290" PostHistoryTypeId="6" PostId="5245" RevisionGUID="e1839b1e-8488-45db-bf51-825882661ae6" CreationDate="2022-10-28T11:28:27.557" UserId="29" Comment="edited tags" Text="|rust|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21291" PostHistoryTypeId="6" PostId="4601" RevisionGUID="ea7c9511-82df-4434-83ce-c9f3b87df73e" CreationDate="2022-10-28T11:28:34.457" UserId="29" Comment="edited tags" Text="|substrate-node-template|runtime|light-client|blockchain-frameworks|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21292" PostHistoryTypeId="6" PostId="5230" RevisionGUID="e911e7c5-ef25-419c-830f-1eae49253460" CreationDate="2022-10-28T11:28:39.463" UserId="29" Comment="edited tags" Text="|offchain-worker|substrate-front-end|offchain-storage|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21293" PostHistoryTypeId="6" PostId="4657" RevisionGUID="1b8ca0db-8cd2-4c5c-a020-995249f9343d" CreationDate="2022-10-28T11:28:45.497" UserId="29" Comment="edited tags" Text="|polkadot|substrate-node-template|rust|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21294" PostHistoryTypeId="6" PostId="5104" RevisionGUID="b16a46ed-43b7-4df9-ba1e-bc88392a7ce9" CreationDate="2022-10-28T11:28:50.857" UserId="29" Comment="edited tags" Text="|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21295" PostHistoryTypeId="6" PostId="5153" RevisionGUID="6994f36f-8303-4c63-9606-aa77ae882cc3" CreationDate="2022-10-28T11:28:54.493" UserId="29" Comment="edited tags" Text="|pallet|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21296" PostHistoryTypeId="6" PostId="5189" RevisionGUID="755bb9fe-09da-49d8-9a2a-f62e71b36cdd" CreationDate="2022-10-28T11:29:00.270" UserId="29" Comment="edited tags" Text="|runtime-upgrade|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21297" PostHistoryTypeId="6" PostId="5185" RevisionGUID="a3b929e2-08a2-4634-a519-e7b2577c016e" CreationDate="2022-10-28T11:29:04.797" UserId="29" Comment="edited tags" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21298" PostHistoryTypeId="6" PostId="5151" RevisionGUID="40f5c3ed-713b-449e-ac2d-019b59d11d0c" CreationDate="2022-10-28T11:29:11.250" UserId="29" Comment="edited tags" Text="|polkadot|rust|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21299" PostHistoryTypeId="6" PostId="5170" RevisionGUID="68734136-501d-4b93-a037-86cc94a1d734" CreationDate="2022-10-28T11:29:15.827" UserId="29" Comment="edited tags" Text="|rpc|weight|fee|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21300" PostHistoryTypeId="6" PostId="4617" RevisionGUID="6b712549-374f-4a85-9f60-0d41b99aef52" CreationDate="2022-10-28T11:29:21.507" UserId="29" Comment="edited tags" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21301" PostHistoryTypeId="6" PostId="5147" RevisionGUID="91cbec6a-68e8-4305-9d1d-c1a352af6b4e" CreationDate="2022-10-28T11:29:30.163" UserId="29" Comment="edited tags" Text="|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21302" PostHistoryTypeId="6" PostId="4603" RevisionGUID="a9aeaac3-6bea-4f34-be71-1d5e9b668dac" CreationDate="2022-10-28T11:29:34.177" UserId="29" Comment="edited tags" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21303" PostHistoryTypeId="6" PostId="5077" RevisionGUID="c0cf966d-18ff-4e2d-88f9-fbb0e4caf657" CreationDate="2022-10-28T11:29:37.587" UserId="29" Comment="edited tags" Text="|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21304" PostHistoryTypeId="6" PostId="5113" RevisionGUID="0d868710-766b-4109-ba3c-99d1a426abe4" CreationDate="2022-10-28T11:29:43.520" UserId="29" Comment="edited tags" Text="|pallet|rust|runtime|primitive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21305" PostHistoryTypeId="6" PostId="4679" RevisionGUID="d4dcee7b-da71-4fd0-995f-3392ebce310f" CreationDate="2022-10-28T11:29:48.357" UserId="29" Comment="edited tags" Text="|ink|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21306" PostHistoryTypeId="6" PostId="5102" RevisionGUID="4ea9674f-8b0a-485a-83f8-d6d59f1301a5" CreationDate="2022-10-28T11:29:53.780" UserId="29" Comment="edited tags" Text="|polkadot-js|polkadot|frontier|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21307" PostHistoryTypeId="6" PostId="1543" RevisionGUID="13e9c474-52a1-42af-b3a7-b46055e588c7" CreationDate="2022-10-28T11:30:01.080" UserId="29" Comment="edited tags" Text="|stalled|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21308" PostHistoryTypeId="6" PostId="5095" RevisionGUID="e07ac2b5-ada1-497b-a5cd-2cf0ad42ce0b" CreationDate="2022-10-28T11:30:05.240" UserId="29" Comment="edited tags" Text="|offchain-storage|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21309" PostHistoryTypeId="6" PostId="4638" RevisionGUID="47cc2e4d-e5bd-45f8-8253-6480d44e90c8" CreationDate="2022-10-28T11:30:09.530" UserId="29" Comment="edited tags" Text="|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21310" PostHistoryTypeId="6" PostId="5063" RevisionGUID="488c9a74-4e08-4ba2-af90-f3ee3ea04ceb" CreationDate="2022-10-28T11:30:14.103" UserId="29" Comment="edited tags" Text="|polkadot|substrate-node-template|kusama|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21311" PostHistoryTypeId="6" PostId="5069" RevisionGUID="901e7f1c-6082-446d-936a-1765f6a53576" CreationDate="2022-10-28T11:30:19.097" UserId="29" Comment="edited tags" Text="|polkadot|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21312" PostHistoryTypeId="6" PostId="5055" RevisionGUID="3b6d482c-f21c-42b2-8491-25308c6476e6" CreationDate="2022-10-28T11:30:24.383" UserId="29" Comment="edited tags" Text="|polkadot-js|pallet-staking|pallet-election-phragmen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21313" PostHistoryTypeId="6" PostId="4475" RevisionGUID="3c30aa99-51c7-43f1-b609-d4d1b02f4f72" CreationDate="2022-10-28T11:30:32.723" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21314" PostHistoryTypeId="6" PostId="5047" RevisionGUID="9f500efb-567a-4d71-a39c-3c9168f18115" CreationDate="2022-10-28T11:30:36.757" UserId="29" Comment="edited tags" Text="|polkadot|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21315" PostHistoryTypeId="6" PostId="5023" RevisionGUID="4a0624dc-9715-42d9-b0fb-2c5e04771fde" CreationDate="2022-10-28T11:30:44.480" UserId="29" Comment="edited tags" Text="|wasm|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21316" PostHistoryTypeId="6" PostId="5029" RevisionGUID="2c76ee79-489f-4427-a365-73f47521355d" CreationDate="2022-10-28T11:30:49.540" UserId="29" Comment="edited tags" Text="|substrate-node-template|rpc|explorer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21317" PostHistoryTypeId="6" PostId="4976" RevisionGUID="5571a21a-76a5-4260-b1d6-6f5a74383a5c" CreationDate="2022-10-28T11:30:56.580" UserId="29" Comment="edited tags" Text="|rust|macos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21318" PostHistoryTypeId="6" PostId="4983" RevisionGUID="3ef7256d-b5de-4f76-8cc7-da3e5e0f8840" CreationDate="2022-10-28T11:31:01.473" UserId="29" Comment="edited tags" Text="|software-licence|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21319" PostHistoryTypeId="6" PostId="5008" RevisionGUID="f2c4813c-cdb6-439a-b8ab-f1a54aafe3fc" CreationDate="2022-10-28T11:31:06.533" UserId="29" Comment="edited tags" Text="|pallet|rust|json|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21320" PostHistoryTypeId="6" PostId="4991" RevisionGUID="16f1ee43-ef31-4015-af3a-2834182fc775" CreationDate="2022-10-28T11:31:12.160" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21321" PostHistoryTypeId="6" PostId="594" RevisionGUID="8c41fbb8-d8db-43f9-95ff-24d4a3da7fa1" CreationDate="2022-10-28T11:31:16.300" UserId="29" Comment="edited tags" Text="|substrate-node-template|software-licence|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21322" PostHistoryTypeId="6" PostId="4968" RevisionGUID="761ad7ae-aa3d-4313-82ec-46ab1ee78963" CreationDate="2022-10-28T11:31:21.443" UserId="29" Comment="edited tags" Text="|block-import|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21323" PostHistoryTypeId="6" PostId="4419" RevisionGUID="5c0fac5c-13c5-4946-b263-7562a3eb461c" CreationDate="2022-10-28T11:31:25.197" UserId="29" Comment="edited tags" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21324" PostHistoryTypeId="6" PostId="2002" RevisionGUID="b106f3cf-6101-4d54-840f-b63d30bfb538" CreationDate="2022-10-28T11:31:31.173" UserId="29" Comment="edited tags" Text="|parachain|rococo|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21325" PostHistoryTypeId="6" PostId="4909" RevisionGUID="7f0d6a8e-4a3d-489d-8c89-93454ea0412d" CreationDate="2022-10-28T11:31:36.043" UserId="29" Comment="edited tags" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21326" PostHistoryTypeId="6" PostId="4928" RevisionGUID="c60f2774-d976-4f52-9eec-0129de6fcc2e" CreationDate="2022-10-28T11:31:44.667" UserId="29" Comment="edited tags" Text="|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21327" PostHistoryTypeId="6" PostId="2442" RevisionGUID="9e8401f3-47ff-44cf-a1d2-64df1c9e0b6e" CreationDate="2022-10-28T11:31:49.117" UserId="29" Comment="edited tags" Text="|substrate-node-template|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21328" PostHistoryTypeId="6" PostId="4802" RevisionGUID="599d89e4-53e2-415c-98b0-e1beabb5b820" CreationDate="2022-10-28T11:31:54.530" UserId="29" Comment="edited tags" Text="|polkadot|substrate-node-template|kusama|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21329" PostHistoryTypeId="6" PostId="2857" RevisionGUID="baf0630f-6bf1-4b6b-b874-554e6d09ec21" CreationDate="2022-10-28T11:31:59.683" UserId="29" Comment="edited tags" Text="|pallet|assets|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21330" PostHistoryTypeId="6" PostId="4851" RevisionGUID="1dfe5f30-8c06-478a-9f4a-9432bbed1c74" CreationDate="2022-10-28T11:32:03.373" UserId="29" Comment="edited tags" Text="|fork|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21331" PostHistoryTypeId="6" PostId="4785" RevisionGUID="5516f47a-6f28-4af7-8cf1-23e6d229761b" CreationDate="2022-10-28T11:32:09.260" UserId="29" Comment="edited tags" Text="|ink|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21332" PostHistoryTypeId="6" PostId="4844" RevisionGUID="041f83aa-e925-45f1-9ee5-8325a7656a19" CreationDate="2022-10-28T11:32:14.677" UserId="29" Comment="edited tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21333" PostHistoryTypeId="6" PostId="4818" RevisionGUID="84c58740-9383-42f5-982b-992e6c0473ce" CreationDate="2022-10-28T11:32:18.873" UserId="29" Comment="edited tags" Text="|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21334" PostHistoryTypeId="6" PostId="681" RevisionGUID="68e489b4-c3ef-4064-ba21-cb9f0aa2d3ff" CreationDate="2022-10-28T11:32:23.073" UserId="29" Comment="edited tags" Text="|validator|rococo-local|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21335" PostHistoryTypeId="6" PostId="4828" RevisionGUID="01524ecc-1bf0-4125-9064-a55d18836a9b" CreationDate="2022-10-28T11:32:26.563" UserId="29" Comment="edited tags" Text="|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21336" PostHistoryTypeId="6" PostId="4826" RevisionGUID="477985e1-2acc-4b95-bc8b-17bcaa6f3da3" CreationDate="2022-10-28T11:32:30.743" UserId="29" Comment="edited tags" Text="|weight|block|frame-system|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21337" PostHistoryTypeId="6" PostId="4823" RevisionGUID="ac16d2ba-5c6a-42d3-bce4-0766c1c406b8" CreationDate="2022-10-28T11:32:35.000" UserId="29" Comment="edited tags" Text="|polkadot-js|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21338" PostHistoryTypeId="6" PostId="4276" RevisionGUID="2d87b7c4-606a-40e9-bdc9-886bb9f5014e" CreationDate="2022-10-28T11:32:38.417" UserId="29" Comment="edited tags" Text="|polkadot|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21339" PostHistoryTypeId="6" PostId="5276" RevisionGUID="97fd9c40-c052-49c4-aa27-09b73dca7550" CreationDate="2022-10-28T11:34:12.323" UserId="29" Comment="edited tags" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21340" PostHistoryTypeId="6" PostId="2434" RevisionGUID="2a2f5e73-6280-416d-99f1-35528f724701" CreationDate="2022-10-28T11:34:16.727" UserId="29" Comment="edited tags" Text="|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21342" PostHistoryTypeId="6" PostId="2371" RevisionGUID="aefed8bb-2601-4eb1-b565-8f085e8f20f7" CreationDate="2022-10-28T11:34:25.540" UserId="29" Comment="edited tags" Text="|networking|proxy|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21343" PostHistoryTypeId="6" PostId="5300" RevisionGUID="8d71452b-0db0-4203-a896-c266f3bba1c9" CreationDate="2022-10-28T11:34:32.220" UserId="29" Comment="edited tags" Text="|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21344" PostHistoryTypeId="6" PostId="5298" RevisionGUID="a0c24173-ba18-475f-8454-c907077020b8" CreationDate="2022-10-28T11:34:36.177" UserId="29" Comment="edited tags" Text="|rust|runtime|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21345" PostHistoryTypeId="6" PostId="5196" RevisionGUID="0ea041d7-fe7c-4467-8d1e-0856309cf87f" CreationDate="2022-10-28T11:34:40.590" UserId="29" Comment="edited tags" Text="|substrateinterface|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21346" PostHistoryTypeId="6" PostId="5311" RevisionGUID="4e611e42-fe92-428c-8d1d-753df349d5c5" CreationDate="2022-10-28T11:34:45.353" UserId="29" Comment="edited tags" Text="|networking|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21347" PostHistoryTypeId="6" PostId="5084" RevisionGUID="513272d7-dcee-4278-b1b9-120fb85de57e" CreationDate="2022-10-28T11:34:51.173" UserId="29" Comment="edited tags" Text="|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21348" PostHistoryTypeId="6" PostId="5351" RevisionGUID="a542fc53-6f72-4d9e-9878-4db3b6076ff4" CreationDate="2022-10-28T11:34:54.810" UserId="29" Comment="edited tags" Text="|rust|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21349" PostHistoryTypeId="6" PostId="5336" RevisionGUID="474a4e96-03df-4b9f-8cd2-29542cdbadb8" CreationDate="2022-10-28T11:35:02.173" UserId="29" Comment="edited tags" Text="|parachain|relay-chain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21351" PostHistoryTypeId="6" PostId="4816" RevisionGUID="df9f4d30-5b2a-4427-b4fb-f60026f23637" CreationDate="2022-10-28T11:35:09.167" UserId="29" Comment="edited tags" Text="|networking|private-network|rococo-local|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21352" PostHistoryTypeId="6" PostId="5368" RevisionGUID="f9caf2db-f929-4027-a2ee-c88cc3f52c20" CreationDate="2022-10-28T11:35:14.257" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21353" PostHistoryTypeId="6" PostId="5344" RevisionGUID="885b03c4-9e24-428e-a7b4-50470c1f09e0" CreationDate="2022-10-28T11:35:18.033" UserId="29" Comment="edited tags" Text="|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21354" PostHistoryTypeId="6" PostId="5385" RevisionGUID="009e6a69-c898-4092-906b-a14379f6cb90" CreationDate="2022-10-28T11:35:21.023" UserId="29" Comment="edited tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21355" PostHistoryTypeId="6" PostId="4888" RevisionGUID="56ecac21-68b3-42bf-83e6-5c62f2a37e94" CreationDate="2022-10-28T11:35:26.283" UserId="29" Comment="edited tags" Text="|polkadot|frontier|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21356" PostHistoryTypeId="6" PostId="5413" RevisionGUID="4ea76d43-f1e4-4663-b325-90696e849294" CreationDate="2022-10-28T11:35:30.173" UserId="29" Comment="edited tags" Text="|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21357" PostHistoryTypeId="6" PostId="5414" RevisionGUID="4415802d-900a-45c7-ba63-0cc168d1cc54" CreationDate="2022-10-28T11:35:38.293" UserId="29" Comment="edited tags" Text="|substrate-node-template|transactions|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21358" PostHistoryTypeId="6" PostId="4906" RevisionGUID="c8d47922-cd1f-4684-97fb-3593338e5633" CreationDate="2022-10-28T11:35:45.057" UserId="29" Comment="edited tags" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21360" PostHistoryTypeId="6" PostId="5375" RevisionGUID="e4b360bf-bb1d-40fc-8a91-2c848bb53259" CreationDate="2022-10-28T11:35:55.017" UserId="29" Comment="edited tags" Text="|rust|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21361" PostHistoryTypeId="6" PostId="4197" RevisionGUID="a1564bca-4138-4e3f-9ba0-46194259b1cf" CreationDate="2022-10-28T11:36:01.897" UserId="29" Comment="edited tags" Text="|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21362" PostHistoryTypeId="6" PostId="5416" RevisionGUID="1fc37526-30ad-4c47-9c45-b8545ceebb81" CreationDate="2022-10-28T11:36:07.743" UserId="29" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21363" PostHistoryTypeId="6" PostId="4238" RevisionGUID="e46fbd9f-0e0c-44c3-a311-56f94e441ee3" CreationDate="2022-10-28T11:36:11.227" UserId="29" Comment="edited tags" Text="|json-rpc|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21364" PostHistoryTypeId="6" PostId="4222" RevisionGUID="02828a1e-2819-4746-8f96-a3ffb5cf0f25" CreationDate="2022-10-28T11:36:14.553" UserId="29" Comment="edited tags" Text="|rust|rpc|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21365" PostHistoryTypeId="6" PostId="5397" RevisionGUID="bd52993a-5a03-42cd-bb1e-a60a242fbd65" CreationDate="2022-10-28T11:36:17.660" UserId="29" Comment="edited tags" Text="|parachain|parachain-collator|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21366" PostHistoryTypeId="6" PostId="5473" RevisionGUID="cbe3e874-2ba2-4f21-b631-8ebaec6c0c5b" CreationDate="2022-10-28T11:36:22.380" UserId="29" Comment="edited tags" Text="|rust|evm|ethereum|metamask|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21367" PostHistoryTypeId="6" PostId="5484" RevisionGUID="addae61e-da64-43d0-90b1-f05609bb1ee9" CreationDate="2022-10-28T11:36:25.923" UserId="29" Comment="edited tags" Text="|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21368" PostHistoryTypeId="6" PostId="5491" RevisionGUID="3f85b8fd-cd3e-47b7-86ab-cc6198439a7f" CreationDate="2022-10-28T11:36:32.917" UserId="29" Comment="edited tags" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21369" PostHistoryTypeId="6" PostId="4937" RevisionGUID="51295a33-3faa-464a-87bd-37313d2373cb" CreationDate="2022-10-28T11:36:37.230" UserId="29" Comment="edited tags" Text="|transactions|fee|transfer|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21370" PostHistoryTypeId="6" PostId="5498" RevisionGUID="33031110-9730-4f33-81e7-a1ac2616e16a" CreationDate="2022-10-28T11:36:44.030" UserId="29" Comment="edited tags" Text="|polkadot|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21371" PostHistoryTypeId="6" PostId="5470" RevisionGUID="2066c0c7-27ad-4daf-8ce6-a65f28b19a23" CreationDate="2022-10-28T11:36:49.810" UserId="29" Comment="edited tags" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21372" PostHistoryTypeId="6" PostId="5512" RevisionGUID="3bfce39f-3d32-4f7e-922d-3da28d65560d" CreationDate="2022-10-28T11:36:53.500" UserId="29" Comment="edited tags" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21373" PostHistoryTypeId="6" PostId="5511" RevisionGUID="23b58575-7e7d-4aed-a12c-0ba2598502c4" CreationDate="2022-10-28T11:36:57.283" UserId="29" Comment="edited tags" Text="|rust|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21374" PostHistoryTypeId="6" PostId="5527" RevisionGUID="7811888a-8107-4919-b0fa-547cfc25c50c" CreationDate="2022-10-28T11:37:01.800" UserId="29" Comment="edited tags" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21375" PostHistoryTypeId="6" PostId="5531" RevisionGUID="b37c0da1-0097-4079-978b-63639432b87b" CreationDate="2022-10-28T11:37:05.310" UserId="29" Comment="edited tags" Text="|polkadot|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21376" PostHistoryTypeId="6" PostId="5415" RevisionGUID="1e654858-945b-467e-84a3-c95700661a1d" CreationDate="2022-10-28T11:37:11.460" UserId="29" Comment="edited tags" Text="|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21377" PostHistoryTypeId="6" PostId="5522" RevisionGUID="4eb81700-1333-41ba-8a24-d6ef24d777ef" CreationDate="2022-10-28T11:37:14.807" UserId="29" Comment="edited tags" Text="|error|grandpa|babe|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21378" PostHistoryTypeId="6" PostId="4995" RevisionGUID="267f09ba-dc31-4785-afe2-891fdb71cd1a" CreationDate="2022-10-28T11:37:18.577" UserId="29" Comment="edited tags" Text="|polkadot|pallet|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21380" PostHistoryTypeId="6" PostId="5548" RevisionGUID="fbc46c65-43c5-46d4-8a32-11ca894bdd20" CreationDate="2022-10-28T11:37:29.687" UserId="29" Comment="edited tags" Text="|validator|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21384" PostHistoryTypeId="6" PostId="220" RevisionGUID="8cb5972d-0c8c-45d9-837f-bb71cdef19e1" CreationDate="2022-10-28T11:38:00.647" UserId="29" Comment="edited tags" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21385" PostHistoryTypeId="6" PostId="5024" RevisionGUID="310b85a5-b9e3-43f7-856e-36ca36a04aa7" CreationDate="2022-10-28T11:38:05.480" UserId="29" Comment="edited tags" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21386" PostHistoryTypeId="6" PostId="2312" RevisionGUID="7abf71cd-6ef8-46b1-a72b-7c494ad9be5a" CreationDate="2022-10-28T11:38:11.407" UserId="29" Comment="edited tags" Text="|substrate-node-template|nodes|docker|private-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21387" PostHistoryTypeId="6" PostId="5549" RevisionGUID="903091d9-9678-4f02-a654-f3d8250998dc" CreationDate="2022-10-28T11:38:15.540" UserId="29" Comment="edited tags" Text="|cumulus|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21388" PostHistoryTypeId="6" PostId="5573" RevisionGUID="6d8948e7-fbcf-4f7f-89d2-5c7de354ee6a" CreationDate="2022-10-28T11:38:23.677" UserId="29" Comment="edited tags" Text="|rust|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21389" PostHistoryTypeId="5" PostId="5580" RevisionGUID="274d0e52-132d-4e5d-a679-26f7067a8a86" CreationDate="2022-10-28T11:46:22.813" UserId="251" Comment="added 287 characters in body" Text="It looks like you forgot the system part in the runtime/lib.rs.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl frame_system::Config for Runtime { .. }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After some discussion. The problem is that you are trying to use different versions.&#xD;&#xA;&#xD;&#xA;`pallet-node-authorization` is on `branch = &quot;polkadot-v0.9.22&quot;` and others dependencies is on `branch = &quot;master&quot;`. You can't do this.&#xD;&#xA;&#xD;&#xA;All the dependencies must stay at the same version." ContentLicense="CC BY-SA 4.0" />
  <row Id="21390" PostHistoryTypeId="2" PostId="5585" RevisionGUID="876abae3-912d-4e9e-beaf-fb3715f962f3" CreationDate="2022-10-28T11:50:40.577" UserId="544" Text="I want to write runtime storage migration for our parachain. This time it will scan large storage maps with more than 10k entries. This may results in very large PoV block size. I'm wondering what the limitation is, and how I can check the PoV block size created by the migration.&#xD;&#xA;&#xD;&#xA;In the past, I have the impression that after running `try_runtime`, it prints the PoV block size. But it looks like the log was removed in the recent version. It only prints weights now." ContentLicense="CC BY-SA 4.0" />
  <row Id="21392" PostHistoryTypeId="1" PostId="5585" RevisionGUID="876abae3-912d-4e9e-beaf-fb3715f962f3" CreationDate="2022-10-28T11:50:40.577" UserId="544" Text="How to determine if a parachain runtime migration is too big?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21393" PostHistoryTypeId="3" PostId="5585" RevisionGUID="876abae3-912d-4e9e-beaf-fb3715f962f3" CreationDate="2022-10-28T11:50:40.577" UserId="544" Text="|parachain|storage|migration|try-runtime|pov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21396" PostHistoryTypeId="2" PostId="5586" RevisionGUID="1a047a80-29fa-4c1e-9693-a7d1a436993d" CreationDate="2022-10-28T22:52:19.297" UserId="3312" Text="I know the way to enable ocw in a solo chain is to edit the service.rs as per the documentation and it works perfectly. I have tried making equivalent changes to the service.rs in my parachain but offchain_workers function is never triggered. Can anyone tell me if there is a way to make it happen for a parachain because I can't quite figure out all the configuration changes that need to be done in this case ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="21398" PostHistoryTypeId="1" PostId="5586" RevisionGUID="1a047a80-29fa-4c1e-9693-a7d1a436993d" CreationDate="2022-10-28T22:52:19.297" UserId="3312" Text="Enabling Offchain workers in a parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="21399" PostHistoryTypeId="3" PostId="5586" RevisionGUID="1a047a80-29fa-4c1e-9693-a7d1a436993d" CreationDate="2022-10-28T22:52:19.297" UserId="3312" Text="|parachain|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21400" PostHistoryTypeId="2" PostId="5587" RevisionGUID="a280fa23-645f-4cb7-8c61-4877cb1b19d8" CreationDate="2022-10-28T23:40:34.877" UserId="590" Text="What are the attack vectors of leaving out `ensured_signed` in&#xD;&#xA;one of my extrinsic?&#xD;&#xA;&#xD;&#xA;It seems that SignedExtensions already checks if the transactions are signed. When I try to submit an unsigned transaction, it automatically fails.&#xD;&#xA;&#xD;&#xA;It seems that this is a convention everyone follows when writing extrinsic, but I am not sure why.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21402" PostHistoryTypeId="1" PostId="5587" RevisionGUID="a280fa23-645f-4cb7-8c61-4877cb1b19d8" CreationDate="2022-10-28T23:40:34.877" UserId="590" Text="what happens if I leave out ensure_signed from extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21403" PostHistoryTypeId="3" PostId="5587" RevisionGUID="a280fa23-645f-4cb7-8c61-4877cb1b19d8" CreationDate="2022-10-28T23:40:34.877" UserId="590" Text="|transactions|extrinsic|signed-extensions|origin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21404" PostHistoryTypeId="2" PostId="5588" RevisionGUID="897316e3-401f-4343-adf7-833e4b750509" CreationDate="2022-10-28T23:47:23.820" UserId="590" Text="How can I check the origin in a SignedExtension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21406" PostHistoryTypeId="1" PostId="5588" RevisionGUID="897316e3-401f-4343-adf7-833e4b750509" CreationDate="2022-10-28T23:47:23.820" UserId="590" Text="How can I check origin in a SignedExtension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21407" PostHistoryTypeId="3" PostId="5588" RevisionGUID="897316e3-401f-4343-adf7-833e4b750509" CreationDate="2022-10-28T23:47:23.820" UserId="590" Text="|transactions|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21408" PostHistoryTypeId="2" PostId="5589" RevisionGUID="fd3c8e8b-68f0-412a-be05-eef284d84308" CreationDate="2022-10-29T00:01:34.353" UserId="590" Text="I am trying to understand how to develop an attack vector for when the pre-dispatch function leaves out the same checks in the validate function.&#xD;&#xA;&#xD;&#xA;Can you please help me understand what the attack vector looks like?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21410" PostHistoryTypeId="1" PostId="5589" RevisionGUID="fd3c8e8b-68f0-412a-be05-eef284d84308" CreationDate="2022-10-29T00:01:34.353" UserId="590" Text="why does pre-dispatch in SignedExtension require you to call validate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21411" PostHistoryTypeId="3" PostId="5589" RevisionGUID="fd3c8e8b-68f0-412a-be05-eef284d84308" CreationDate="2022-10-29T00:01:34.353" UserId="590" Text="|transactions|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21412" PostHistoryTypeId="2" PostId="5590" RevisionGUID="6da37b14-b179-45eb-9801-468f40600df0" CreationDate="2022-10-29T04:29:30.123" UserId="251" Text="Have you tried `submit_unsigned`?&#xD;&#xA;&#xD;&#xA;I think people could submit the unsigned transactions on your chain without paying any fee." ContentLicense="CC BY-SA 4.0" />
  <row Id="21414" PostHistoryTypeId="2" PostId="5591" RevisionGUID="62618798-a734-4edc-93e7-f626a667e61d" CreationDate="2022-10-29T05:39:55.367" UserId="251" Text="https://github.com/paritytech/substrate/blob/c4d36065764ee23aeb3ccd181c4b6ecea8d2447a/primitives/core/src/crypto.rs#L315-L336&#xD;&#xA;&#xD;&#xA;It's impossible.&#xD;&#xA;&#xD;&#xA;We lost information in this algorithm." ContentLicense="CC BY-SA 4.0" />
  <row Id="21416" PostHistoryTypeId="5" PostId="5591" RevisionGUID="cf83d2ae-3c33-4be6-aa61-3706324ee973" CreationDate="2022-10-29T05:57:34.453" UserId="251" Comment="added 5 characters in body" Text="https://github.com/paritytech/substrate/blob/c4d36065764ee23aeb3ccd181c4b6ecea8d2447a/primitives/core/src/crypto.rs#L315-L336&#xD;&#xA;&#xD;&#xA;It's impossible.&#xD;&#xA;&#xD;&#xA;The information was lost in this algorithm." ContentLicense="CC BY-SA 4.0" />
  <row Id="21421" PostHistoryTypeId="2" PostId="5593" RevisionGUID="ce7b97f0-1b5d-4c18-b565-04a00d4b644a" CreationDate="2022-10-29T08:42:02.073" UserId="94" Text="The problem with allowing unsigned extrinsics is that nobody pays for the consumed weight.  &#xD;&#xA;So you are basically doing work for free - normally undesirable. &#xD;&#xA;   &#xD;&#xA;The only use-case where it is a good idea are cleanup operations which remove storage items.  &#xD;&#xA;A smaller state means less PoV of storage READ/REMOVE operations and is therefore desirable.  &#xD;&#xA;One could say that storage cleanups have an amortized &quot;negative&quot; weight and should therefore be free." ContentLicense="CC BY-SA 4.0" />
  <row Id="21423" PostHistoryTypeId="5" PostId="5590" RevisionGUID="994abe65-0c8e-4f75-b18b-167a36dd9df9" CreationDate="2022-10-29T11:22:42.027" UserId="251" Comment="added 503 characters in body" Text="Have you tried `submit_unsigned`?&#xD;&#xA;&#xD;&#xA;I think people could submit unsigned transactions on your chain without paying any fee.&#xD;&#xA;&#xD;&#xA;Obviously, this will cause something like DDOS. Use a script to submit the unsigned transactions.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Why do we need unsigned?&#xD;&#xA;&#xD;&#xA;1. Airdrop, like the Polkadot claim module. It's not a good idea to require a user to own some token first and then to claim the airdrop. So they set the claim extrinsic feeless.&#xD;&#xA;2. For some public-welfare calls, like the sync finality proof in the cross-chain bridge pallet. It's a one-time verification/call, after the first successful call it will reject the others.&#xD;&#xA;3. Something like @Oliver described.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21424" PostHistoryTypeId="2" PostId="5594" RevisionGUID="28debed2-fd40-4383-8d9c-4599caee8372" CreationDate="2022-10-29T18:00:59.787" UserId="3171" Text="Attempt to upgrade validation function while existing upgrade pending&#xD;&#xA;&#xD;&#xA;I stuck with this error. &#xD;&#xA;Can anyone have idea how fix it?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XnAKv.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="21426" PostHistoryTypeId="1" PostId="5594" RevisionGUID="28debed2-fd40-4383-8d9c-4599caee8372" CreationDate="2022-10-29T18:00:59.787" UserId="3171" Text="parachainSystem.OverlappingUpgrades" ContentLicense="CC BY-SA 4.0" />
  <row Id="21427" PostHistoryTypeId="3" PostId="5594" RevisionGUID="28debed2-fd40-4383-8d9c-4599caee8372" CreationDate="2022-10-29T18:00:59.787" UserId="3171" Text="|parachain|runtime-upgrade|sudo|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21428" PostHistoryTypeId="2" PostId="5595" RevisionGUID="7e9fd208-3647-403a-bef4-be51ee6cd8c1" CreationDate="2022-10-29T18:22:02.353" UserId="251" Text="It looks like you are trying to do this multiple times.&#xD;&#xA;&#xD;&#xA;Sometimes, I make mistakes on my testnet (upload wrong WASM). Then I use sudo to kill the storage.&#xD;&#xA;&#xD;&#xA;Kill the `ParachainSystem::PendingValidationCode` storage.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21432" PostHistoryTypeId="2" PostId="5597" RevisionGUID="d197f43f-33dd-479a-9503-8a19687acd6a" CreationDate="2022-10-29T19:30:35.667" UserId="3171" Text="The validation function has been scheduled to apply. &#xD;&#xA;What does this event mean? &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ExG1P.jpg&#xD;&#xA;&#xD;&#xA;When my upgrade will be executed? " ContentLicense="CC BY-SA 4.0" />
  <row Id="21434" PostHistoryTypeId="1" PostId="5597" RevisionGUID="d197f43f-33dd-479a-9503-8a19687acd6a" CreationDate="2022-10-29T19:30:35.667" UserId="3171" Text="parachainSystem.ValidationFunctionStored" ContentLicense="CC BY-SA 4.0" />
  <row Id="21435" PostHistoryTypeId="3" PostId="5597" RevisionGUID="d197f43f-33dd-479a-9503-8a19687acd6a" CreationDate="2022-10-29T19:30:35.667" UserId="3171" Text="|parachain|runtime-upgrade|upgrade|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21436" PostHistoryTypeId="2" PostId="5598" RevisionGUID="3b308f15-719c-478b-b435-d75966ba558c" CreationDate="2022-10-29T19:53:23.600" UserId="1792" Text="I have a pallet that has it's own origin (which then gets appended to the overarching Origin made by construct_runtime), this pallet dispatches calls using it's own custom origin, but I would like this origin to be compatible with ensure_signed so it works naturally with other pallets, and to do that I need to implement Into&lt;Result&lt;RawOrigin&lt;AccountId&gt;, Origin&gt;&gt; for the overarching Origin of the runtime, which is already implemented by the construct_runtime macro.&#xD;&#xA;&#xD;&#xA;I assume it just uses the _ pattern to return Err(origin) for anything that is not already Signed(accountid), but I want to override this impl to also return Ok(Signed(accountid)) when my custom origin's enum variant matches, but since it's inside the macro I'd assume there is a specific way to do that which I can't seem to find documented.&#xD;&#xA;&#xD;&#xA;There's also the possibility that I'm completely missing some other simpler way to have ensure_signed accept my custom origin, which I wouldn't know, again, because of the lack of documentation." ContentLicense="CC BY-SA 4.0" />
  <row Id="21438" PostHistoryTypeId="1" PostId="5598" RevisionGUID="3b308f15-719c-478b-b435-d75966ba558c" CreationDate="2022-10-29T19:53:23.600" UserId="1792" Text="Ensure_signed with custom origin" ContentLicense="CC BY-SA 4.0" />
  <row Id="21439" PostHistoryTypeId="3" PostId="5598" RevisionGUID="3b308f15-719c-478b-b435-d75966ba558c" CreationDate="2022-10-29T19:53:23.600" UserId="1792" Text="|pallet|frame|origin|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21440" PostHistoryTypeId="2" PostId="5599" RevisionGUID="a375c9c0-8250-4974-8d71-a712d3f8f143" CreationDate="2022-10-29T20:18:58.360" UserId="620" Text="That means the upgrade has been scheduled. You can see when the upgrade will take place by checking the [`FutureCodeUpgrade(id)` storage item](https://github.com/paritytech/polkadot/blob/15709ee/runtime/parachains/src/paras/mod.rs#L615) on the Relay Chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="21442" PostHistoryTypeId="2" PostId="5601" RevisionGUID="e992de41-b1b9-4f8d-a9a8-25f9c3bb1954" CreationDate="2022-10-29T21:28:53.067" UserId="529" Text="I'm using PSP34 from openbrush in ink! contract and want to override `mint()` function that comes with `PSP34Mintable` trait.&#xD;&#xA;Since this contract should accept payments for the `mint()` call, a `payable` is added to the message.&#xD;&#xA;&#xD;&#xA;pseudo code&#xD;&#xA;```&#xD;&#xA;impl PSP34Mintable for MyContract {&#xD;&#xA;    #[ink(message, payable)]&#xD;&#xA;    fn mint(&amp;mut self, account: AccountId, id: Id) -&gt; Result&lt;(), PSP34Error&gt; {&#xD;&#xA;        // ... my custom code&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;gives following compile error&#xD;&#xA;```&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA; --&gt; src/lib.rs:4:1&#xD;&#xA;  |&#xD;&#xA;4 | #[openbrush::contract]&#xD;&#xA;  | ^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`&#xD;&#xA;  |&#xD;&#xA;  = note: expected struct `TraitMessagePayable&lt;false&gt;`&#xD;&#xA;             found struct `TraitMessagePayable&lt;true&gt;`&#xD;&#xA;  = note: this error originates in the attribute macro `openbrush::contract`&#xD;&#xA;```&#xD;&#xA;Is it possible to change this mint() to become payable message or I need to implement custom mintXXX() function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21447" PostHistoryTypeId="1" PostId="5601" RevisionGUID="e992de41-b1b9-4f8d-a9a8-25f9c3bb1954" CreationDate="2022-10-29T21:28:53.067" UserId="529" Text="PSP34Mintable::mint() as payable function" ContentLicense="CC BY-SA 4.0" />
  <row Id="21449" PostHistoryTypeId="3" PostId="5601" RevisionGUID="e992de41-b1b9-4f8d-a9a8-25f9c3bb1954" CreationDate="2022-10-29T21:28:53.067" UserId="529" Text="|ink|smart-contract|contracts|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21450" PostHistoryTypeId="2" PostId="5602" RevisionGUID="53a317aa-7927-4711-989a-40a8c8f540ef" CreationDate="2022-10-30T05:30:55.683" UserId="2565" Text="```&#xD;&#xA;pub fn create_full&lt;C, P&gt;(&#xD;&#xA;	deps: FullDeps&lt;C, P&gt;,&#xD;&#xA;) -&gt; Result&lt;RpcExtension, Box&lt;dyn std::error::Error + Send + Sync&gt;&gt;&#xD;&#xA;where&#xD;&#xA;	C: ProvideRuntimeApi&lt;Block&gt;&#xD;&#xA;		+ HeaderBackend&lt;Block&gt;&#xD;&#xA;		+ AuxStore&#xD;&#xA;		+ HeaderMetadata&lt;Block, Error = BlockChainError&gt;&#xD;&#xA;		+ Send&#xD;&#xA;		+ Sync&#xD;&#xA;		+ 'static,&#xD;&#xA;	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi&lt;Block, Balance&gt;,&#xD;&#xA;	C::Api: substrate_frame_rpc_system::AccountNonceApi&lt;Block, AccountId, Nonce&gt;,&#xD;&#xA;	C::Api: pallet_contracts_rpc::ContractsRuntimeApi&lt;Block, AccountId, Balance, BlockNumber, Hash&gt;,&#xD;&#xA;	C::Api: BlockBuilder&lt;Block&gt;,&#xD;&#xA;	P: TransactionPool + Sync + Send + 'static,&#xD;&#xA;{&#xD;&#xA;	use pallet_contracts_rpc::{Contracts, ContractsApiServer};&#xD;&#xA;	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};&#xD;&#xA;	use substrate_frame_rpc_system::{System, SystemApiServer};&#xD;&#xA;&#xD;&#xA;	let mut module = RpcExtension::new(());&#xD;&#xA;	let FullDeps { client, pool, deny_unsafe } = deps;&#xD;&#xA;&#xD;&#xA;	module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?;&#xD;&#xA;	module.merge(TransactionPayment::new(client.clone()).into_rpc())?;&#xD;&#xA;	module.merge(Contracts::new(client).into_rpc())?;&#xD;&#xA;&#xD;&#xA;	Ok(module)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I inserted a constraint to the standard rpc.rs create_full function:&#xD;&#xA;```&#xD;&#xA;C::Api: pallet_contracts_rpc::ContractsRuntimeApi&lt;Block, AccountId, Balance, BlockNumber, Hash&gt;,&#xD;&#xA;```&#xD;&#xA;I got an error:&#xD;&#xA;```&#xD;&#xA;C::Api: pallet_contracts_rpc::ContractsRuntimeApi&lt;Block, AccountId, Balance, BlockNumber, Hash&gt;,&#xD;&#xA;        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `create_full`&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA; -&gt; Result&lt;Box&lt;dyn ParachainConsensus&lt;Block&gt;&gt;, sc_service::Error&gt;, &lt;RuntimeApi as ConstructRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_service::client::client::Client&lt;sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, NativeElseWasmExecutor&lt;Executor&gt;&gt;, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, RuntimeApi&gt;&gt;&gt;::RuntimeApi: ContractsRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sp_runtime::AccountId32, u128, u32, H256&gt;&#xD;&#xA;```&#xD;&#xA;Any suggestion what should I do is greatly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="21452" PostHistoryTypeId="1" PostId="5602" RevisionGUID="53a317aa-7927-4711-989a-40a8c8f540ef" CreationDate="2022-10-30T05:30:55.683" UserId="2565" Text="Problem adding pallet_contracts_rpc in parachain-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="21453" PostHistoryTypeId="3" PostId="5602" RevisionGUID="53a317aa-7927-4711-989a-40a8c8f540ef" CreationDate="2022-10-30T05:30:55.683" UserId="2565" Text="|parachain|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21454" PostHistoryTypeId="2" PostId="5603" RevisionGUID="a24d01c7-bf6b-4af5-b375-9d530712b550" CreationDate="2022-10-30T06:17:04.020" UserId="1959" Text="Xavier is right, and I'll show you how to kill it.&#xD;&#xA;1. Get the storage key from chain state&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;2. Then kill it by `system.killStorage` (sudo or governance)&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/imNkE.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/eh1HS.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21457" PostHistoryTypeId="2" PostId="5604" RevisionGUID="6dae3a9a-10c0-40b1-bf78-c8c433511259" CreationDate="2022-10-30T08:27:41.883" UserId="251" Text="It means that `C` doesn't implement this trait.&#xD;&#xA;&#xD;&#xA;Check the `C`, the `create_fuill&lt;C, P&gt;`'s `C`." ContentLicense="CC BY-SA 4.0" />
  <row Id="21459" PostHistoryTypeId="5" PostId="5602" RevisionGUID="ed4ffd1e-0788-4642-8d4d-c230e038d0fd" CreationDate="2022-10-30T08:28:12.800" UserId="251" Comment="added 2 characters in body" Text="```rs&#xD;&#xA;pub fn create_full&lt;C, P&gt;(&#xD;&#xA;	deps: FullDeps&lt;C, P&gt;,&#xD;&#xA;) -&gt; Result&lt;RpcExtension, Box&lt;dyn std::error::Error + Send + Sync&gt;&gt;&#xD;&#xA;where&#xD;&#xA;	C: ProvideRuntimeApi&lt;Block&gt;&#xD;&#xA;		+ HeaderBackend&lt;Block&gt;&#xD;&#xA;		+ AuxStore&#xD;&#xA;		+ HeaderMetadata&lt;Block, Error = BlockChainError&gt;&#xD;&#xA;		+ Send&#xD;&#xA;		+ Sync&#xD;&#xA;		+ 'static,&#xD;&#xA;	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi&lt;Block, Balance&gt;,&#xD;&#xA;	C::Api: substrate_frame_rpc_system::AccountNonceApi&lt;Block, AccountId, Nonce&gt;,&#xD;&#xA;	C::Api: pallet_contracts_rpc::ContractsRuntimeApi&lt;Block, AccountId, Balance, BlockNumber, Hash&gt;,&#xD;&#xA;	C::Api: BlockBuilder&lt;Block&gt;,&#xD;&#xA;	P: TransactionPool + Sync + Send + 'static,&#xD;&#xA;{&#xD;&#xA;	use pallet_contracts_rpc::{Contracts, ContractsApiServer};&#xD;&#xA;	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};&#xD;&#xA;	use substrate_frame_rpc_system::{System, SystemApiServer};&#xD;&#xA;&#xD;&#xA;	let mut module = RpcExtension::new(());&#xD;&#xA;	let FullDeps { client, pool, deny_unsafe } = deps;&#xD;&#xA;&#xD;&#xA;	module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?;&#xD;&#xA;	module.merge(TransactionPayment::new(client.clone()).into_rpc())?;&#xD;&#xA;	module.merge(Contracts::new(client).into_rpc())?;&#xD;&#xA;&#xD;&#xA;	Ok(module)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I inserted a constraint to the standard rpc.rs create_full function:&#xD;&#xA;```&#xD;&#xA;C::Api: pallet_contracts_rpc::ContractsRuntimeApi&lt;Block, AccountId, Balance, BlockNumber, Hash&gt;,&#xD;&#xA;```&#xD;&#xA;I got an error:&#xD;&#xA;```&#xD;&#xA;C::Api: pallet_contracts_rpc::ContractsRuntimeApi&lt;Block, AccountId, Balance, BlockNumber, Hash&gt;,&#xD;&#xA;        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `create_full`&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA; -&gt; Result&lt;Box&lt;dyn ParachainConsensus&lt;Block&gt;&gt;, sc_service::Error&gt;, &lt;RuntimeApi as ConstructRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_service::client::client::Client&lt;sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, NativeElseWasmExecutor&lt;Executor&gt;&gt;, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, RuntimeApi&gt;&gt;&gt;::RuntimeApi: ContractsRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sp_runtime::AccountId32, u128, u32, H256&gt;&#xD;&#xA;```&#xD;&#xA;Any suggestion what should I do is greatly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="21460" PostHistoryTypeId="2" PostId="5605" RevisionGUID="1bec1531-41d5-4673-beb2-323246ec948f" CreationDate="2022-10-30T10:36:10.753" UserId="3171" Text="I am trying to move relay native currency back to relay chain. &#xD;&#xA;But I got the error and can't figure out what is the problem? &#xD;&#xA;&#xD;&#xA;Hey is my call, xcm configuration setting and error.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/icXBL.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/dKQgm.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/xGUje.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="21462" PostHistoryTypeId="1" PostId="5605" RevisionGUID="1bec1531-41d5-4673-beb2-323246ec948f" CreationDate="2022-10-30T10:36:10.753" UserId="3171" Text="XTransfer fail with error" ContentLicense="CC BY-SA 4.0" />
  <row Id="21463" PostHistoryTypeId="3" PostId="5605" RevisionGUID="1bec1531-41d5-4673-beb2-323246ec948f" CreationDate="2022-10-30T10:36:10.753" UserId="3171" Text="|parachain|xcm|xcmp|orml-xtokens|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21464" PostHistoryTypeId="2" PostId="5606" RevisionGUID="f6d7dea9-38de-43db-bc97-331ea47c0de4" CreationDate="2022-10-30T10:58:25.660" UserId="3317" Text="There is such a thing as a timeout in the approvals process, and backing is time gated because the parachain block candidate needs to be authored using the latest relay chain block as a checkpoint (6s max backing time). But availability (inclusion) isn't time capped in a fundamental way.&#xD;&#xA;&#xD;&#xA;That said, under non-byzantine circumstances you can expect that the 2-3 blocks wait time will be consistent." ContentLicense="CC BY-SA 4.0" />
  <row Id="21466" PostHistoryTypeId="5" PostId="5601" RevisionGUID="6d261f6e-8c23-4728-a659-68f6c380532b" CreationDate="2022-10-30T11:23:14.680" UserId="251" Comment="added 4 characters in body" Text="I'm using PSP34 from openbrush in ink! contract and want to override `mint()` function that comes with `PSP34Mintable` trait.&#xD;&#xA;Since this contract should accept payments for the `mint()` call, a `payable` is added to the message.&#xD;&#xA;&#xD;&#xA;pseudo code&#xD;&#xA;```rs&#xD;&#xA;impl PSP34Mintable for MyContract {&#xD;&#xA;    #[ink(message, payable)]&#xD;&#xA;    fn mint(&amp;mut self, account: AccountId, id: Id) -&gt; Result&lt;(), PSP34Error&gt; {&#xD;&#xA;        // ... my custom code&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;gives following compile error&#xD;&#xA;```rs&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA; --&gt; src/lib.rs:4:1&#xD;&#xA;  |&#xD;&#xA;4 | #[openbrush::contract]&#xD;&#xA;  | ^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`&#xD;&#xA;  |&#xD;&#xA;  = note: expected struct `TraitMessagePayable&lt;false&gt;`&#xD;&#xA;             found struct `TraitMessagePayable&lt;true&gt;`&#xD;&#xA;  = note: this error originates in the attribute macro `openbrush::contract`&#xD;&#xA;```&#xD;&#xA;Is it possible to change this `mint()` to become a payable message or do I need to implement a custom `mintXXX()` function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21467" PostHistoryTypeId="2" PostId="5607" RevisionGUID="19d960c9-9cba-49cc-a8f0-de60e9dbda2c" CreationDate="2022-10-30T11:29:54.103" UserId="1959" Text="First, this error occurs in your sender chain, you could add `--log xcm=trace` when you run your node, and send the XCM again to get more logs about XCM for troubleshooting.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;BTW, you seems to be using a little less weight, if the XCM is barriered by relay chain, you could try a bigger weight like 4000000000." ContentLicense="CC BY-SA 4.0" />
  <row Id="21471" PostHistoryTypeId="5" PostId="5607" RevisionGUID="bdce6d72-5662-4f8f-b944-988fc9085955" CreationDate="2022-10-30T11:36:14.330" UserId="1959" Comment="added 166 characters in body" Text="First, this error occurs in your sender chain, you could add `--log xcm=trace` when you run your node, and send the XCM again to get more logs about XCM for troubleshooting.&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;BTW, you seems to be using a little less weight, if the XCM is barriered by relay chain, you could try a bigger weight like 4000000000.&#xD;&#xA;&#xD;&#xA;And in general, you should add these two barriers: `AllowKnownQueryResponses`, `AllowSubscriptionsFrom`, it would be useful when versions of XCM are inconsistent." ContentLicense="CC BY-SA 4.0" />
  <row Id="21474" PostHistoryTypeId="2" PostId="5610" RevisionGUID="bac063ac-b052-43b8-8e64-3ee87adb9394" CreationDate="2022-10-30T11:59:10.337" UserId="18" Text="This could fail for a variety of reasons, as @Guantong mentioned, you are best looking at the logs of the collator to know the exact reason &#xD;&#xA;&#xD;&#xA;Here is an [example][1] transfer from our Imbue chain on Rococo &#xD;&#xA;&#xD;&#xA;Also, [here][2] is the barriers we set&#xD;&#xA;&#xD;&#xA;Re weight, we are using 5_000_000_000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, documentation around XCM is not great right now because we are really early, the good news is all the teams are working on it. &#xD;&#xA;I understand that it can be quite frustrating and time-consuming to get things right. What worked for us is setting up a unit test to help us understand the flow of an XCM transaction and its much faster to get an end to end test working than it is to go through trial and error on the polkadotjs UI&#xD;&#xA;&#xD;&#xA;Here is an [example][3] of our XCM tests to the relay chain&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fcollator.staging.imbue.network#/explorer/query/0xdf6f9e93d8bab00ebadec16e3d4ef6fa52835549280486bde786e854d1482849&#xD;&#xA;  [2]: https://github.com/ImbueNetwork/imbue/blob/main/runtime/imbue-kusama/src/xcm_config.rs#L118&#xD;&#xA;  [3]: https://github.com/ImbueNetwork/imbue/blob/main/runtime/integration-tests/src/xcm_transfers.rs#L288" ContentLicense="CC BY-SA 4.0" />
  <row Id="21476" PostHistoryTypeId="5" PostId="5606" RevisionGUID="9bfb048b-7381-4fab-963b-804adec3531a" CreationDate="2022-10-30T12:08:50.987" UserId="3317" Comment="deleted 208 characters in body" Text="The longest any backed block candidate is considered for availability/inclusion is 4 blocks. It is dropped on the 4th block after the block on which availability distribution efforts started.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21477" PostHistoryTypeId="2" PostId="5611" RevisionGUID="8cb61734-ddaa-4fee-9975-4c86f588a378" CreationDate="2022-10-30T14:51:37.730" UserId="3317" Text="You could check the 'who' parameter in the 'fn validate()' function.&#xD;&#xA;&#xD;&#xA;An example from the chech_non_zero_sender extension: https://github.com/paritytech/substrate/blob/master/frame/system/src/extensions/check_non_zero_sender.rs&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21480" PostHistoryTypeId="2" PostId="5612" RevisionGUID="517bed48-86a1-4d39-997d-81d77a0f1a49" CreationDate="2022-10-30T18:53:34.950" UserId="3080" Text="I wanted have through understanding of Substrate Pallet structure  in general and the utility pallet in particular.  If any one can please point me to some resource&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21482" PostHistoryTypeId="1" PostId="5612" RevisionGUID="517bed48-86a1-4d39-997d-81d77a0f1a49" CreationDate="2022-10-30T18:53:34.950" UserId="3080" Text="Substrate pallets structure" ContentLicense="CC BY-SA 4.0" />
  <row Id="21483" PostHistoryTypeId="3" PostId="5612" RevisionGUID="517bed48-86a1-4d39-997d-81d77a0f1a49" CreationDate="2022-10-30T18:53:34.950" UserId="3080" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21484" PostHistoryTypeId="2" PostId="5613" RevisionGUID="7e7708a0-3720-47cd-9deb-f1d9c4c7f024" CreationDate="2022-10-30T19:27:01.473" UserId="18" Text="Force authoring is only required if you are setting up a single node, what you could do is set up multiple ones and point them to each other using &#xD;&#xA;&#xD;&#xA;1) Adding bootnodes in the spec, see how it's done for statemine [here][1]&#xD;&#xA;2) the --bootnode flag, see [docs][2] and an [example][3]&#xD;&#xA;&#xD;&#xA;Personally I think you are best setting the bootnodes in the spec that is generated as this seems to be the best practice among most running chains including the relay (rococo/westend/kusama/dot) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://raw.githubusercontent.com/paritytech/cumulus/master/parachains/chain-specs/statemine.json&#xD;&#xA;  [2]: https://docs.substrate.io/reference/command-line-tools/node-template/&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot#local-two-node-testnet" ContentLicense="CC BY-SA 4.0" />
  <row Id="21486" PostHistoryTypeId="2" PostId="5614" RevisionGUID="dbd84aa8-c424-4669-9ad6-448b4954e5e7" CreationDate="2022-10-30T19:30:43.737" UserId="1793" Text="We are doing upgrade to polkadot version 29. Everything works fine until we run the command&#xD;&#xA;&#xD;&#xA;    cargo build -r --features try-runtime&#xD;&#xA;&#xD;&#xA;we got error trait bounds. In this version there was change from **execute_block_no_check** to **try_execute_block**&#xD;&#xA;&#xD;&#xA;Here we change to this in [runtime][1]&#xD;&#xA;&#xD;&#xA;and here is the error we see in the [console][2] &#xD;&#xA;&#xD;&#xA;Is we missing something ? We could not find any issue.&#xD;&#xA;&#xD;&#xA;Here is the link to [repo][3]&#xD;&#xA;&#xD;&#xA;Thanks for any help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mangata-finance/mangata-node/blob/develop-v0.9.29/runtime/mangata-rococo/src/lib.rs#L1438&#xD;&#xA;  [2]: https://gist.github.com/devdanco/70e3556e04a15ad49ede6fe1ecfb2164&#xD;&#xA;  [3]: https://github.com/mangata-finance/mangata-node/tree/develop-v0.9.29" ContentLicense="CC BY-SA 4.0" />
  <row Id="21488" PostHistoryTypeId="1" PostId="5614" RevisionGUID="dbd84aa8-c424-4669-9ad6-448b4954e5e7" CreationDate="2022-10-30T19:30:43.737" UserId="1793" Text="Polkadot 29 update - try-runtime feature (trait bounds error)" ContentLicense="CC BY-SA 4.0" />
  <row Id="21489" PostHistoryTypeId="3" PostId="5614" RevisionGUID="dbd84aa8-c424-4669-9ad6-448b4954e5e7" CreationDate="2022-10-30T19:30:43.737" UserId="1793" Text="|runtime|upgrade|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21490" PostHistoryTypeId="2" PostId="5615" RevisionGUID="b49e1e5d-4ff4-416c-961d-828694c33226" CreationDate="2022-10-30T20:13:54.947" UserId="2736" Text="You can start with Substrate docs:&#xD;&#xA; - https://docs.substrate.io/fundamentals/runtime-development/&#xD;&#xA; - https://docs.substrate.io/reference/frame-pallets/&#xD;&#xA; - https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/&#xD;&#xA; - https://paritytech.github.io/substrate/master/pallet_utility/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="21492" PostHistoryTypeId="2" PostId="5616" RevisionGUID="8fccf2e5-04ea-4fa7-960a-83453a82f7c9" CreationDate="2022-10-30T20:21:49.543" UserId="2736" Text="I have a question about reading data in a chain extension. To be precise, I'm concerned about methods `Environment&lt;_,_,_,S: BufIn&gt;::read*`. Do I understand correctly, that every such function doesn't move starting pointer and thus I can make only a single read?&#xD;&#xA;&#xD;&#xA;If so, then I would like to ask whether there are any reasons for that. My use case where it is kinda onerous, is when my chain extension has such an API:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn extension(a: SomeSizedType, b: Vec&lt;u8&gt;) {...}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The approach that would be natural for me would be to do parsing like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let env = env.buf_in_buf_out();&#xD;&#xA;&#xD;&#xA;let a = env.read_as&lt;SomeSizedType&gt;()?;&#xD;&#xA;// The caller is expected to pass length hint&#xD;&#xA;let b_len = env.read_as&lt;u32&gt;()?;&#xD;&#xA;let b = env.read(b_len);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, when I can invoke `read*` only once, I have to handle decoding and byte array mess on my site. Please notice, that I cannot pack `a` and `b` into a single struct, and use `read_as`, because `Vec&lt;_&gt;` is not `MaxEncodedLen`." ContentLicense="CC BY-SA 4.0" />
  <row Id="21494" PostHistoryTypeId="1" PostId="5616" RevisionGUID="8fccf2e5-04ea-4fa7-960a-83453a82f7c9" CreationDate="2022-10-30T20:21:49.543" UserId="2736" Text="Reading arguments in chain extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="21495" PostHistoryTypeId="3" PostId="5616" RevisionGUID="8fccf2e5-04ea-4fa7-960a-83453a82f7c9" CreationDate="2022-10-30T20:21:49.543" UserId="2736" Text="|chain-extension|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21496" PostHistoryTypeId="5" PostId="5614" RevisionGUID="b33bb897-e763-4a3d-b313-01394153f438" CreationDate="2022-10-30T20:49:31.357" UserId="1793" Comment="added 1 character in body" Text="We are doing upgrade to polkadot version 29. Everything works fine until we run the command&#xD;&#xA;&#xD;&#xA;    cargo build -r --features try-runtime&#xD;&#xA;&#xD;&#xA;we got error trait bounds. In this version there was change from **execute_block_no_check** to **try_execute_block**&#xD;&#xA;&#xD;&#xA;Here we change to this in [runtime][1]&#xD;&#xA;&#xD;&#xA;and here is the error we see in the [console][2] &#xD;&#xA;&#xD;&#xA;Are we missing something ? We could not find any issue.&#xD;&#xA;&#xD;&#xA;Here is the link to [repo][3]&#xD;&#xA;&#xD;&#xA;Thanks for any help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mangata-finance/mangata-node/blob/develop-v0.9.29/runtime/mangata-rococo/src/lib.rs#L1438&#xD;&#xA;  [2]: https://gist.github.com/devdanco/70e3556e04a15ad49ede6fe1ecfb2164&#xD;&#xA;  [3]: https://github.com/mangata-finance/mangata-node/tree/develop-v0.9.29" ContentLicense="CC BY-SA 4.0" />
  <row Id="21497" PostHistoryTypeId="2" PostId="5617" RevisionGUID="d5d85ef6-8085-4230-933f-608ae4b49400" CreationDate="2022-10-30T21:08:04.153" UserId="3382" Text="@PoCk3T if you solved it, could you share it here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21499" PostHistoryTypeId="2" PostId="5618" RevisionGUID="56589e02-9ad8-48cb-94da-1836aeef3d59" CreationDate="2022-10-30T22:00:43.617" UserId="94" Text="The auto-generated implementation for the `TryState` trait is feature gated behind `try-runtime`.  &#xD;&#xA;This requires all pallets to support `try-runtime` as well.  &#xD;&#xA;You can try it out for a single pallet by putting this line above the error-producing `try_execute_block`:  &#xD;&#xA;```rust&#xD;&#xA;&lt;frame_system::Pallet&lt;Runtime&gt; as frame_support::traits::TryState&lt;_&gt;&gt;::try_state();&#xD;&#xA;```&#xD;&#xA;This will produce an error claiming that `frame_system::Pallet` does not implement `TryState`. It can be fixed by adding `frame-system/try-runtime`, `frame-support/try-runtime` and `frame-executive/try-runtime` to the `try-runtime` feature list of the runtime `Cargo.toml`.  &#xD;&#xA;Sadly it looks like some pallets that you have deployed do currently not support that feature.  &#xD;&#xA;They need to be updated to support the feature and propagate it to all dependencies.  &#xD;&#xA;&#xD;&#xA;The feature system of Rust is really annoying when it comes to this. We are slowly cleaning up Substrate and remove any feature-bleed; eg https://github.com/paritytech/substrate/pull/11976 and  https://github.com/paritytech/substrate/pull/12341.  &#xD;&#xA;In this case we case it is a bit unfortunate that the pallets all need to support it. If you are really lucky you can try removing [this](https://github.com/mangata-finance/substrate/blob/mangata-dev-v0.9.29/frame/support/procedural/src/pallet/expand/hooks.rs#L207) line and do some feature hacking to maybe get it working without that.  &#xD;&#xA;But then you have non-production hooks in production code; also not good." ContentLicense="CC BY-SA 4.0" />
  <row Id="21505" PostHistoryTypeId="5" PostId="5604" RevisionGUID="78eb0a6d-a00b-43eb-be52-aca5c9f23949" CreationDate="2022-10-31T02:28:05.217" UserId="251" Comment="added 261 characters in body" Text="It means that `C` doesn't implement this trait.&#xD;&#xA;&#xD;&#xA;Check the `C`, the `create_fuill&lt;C, P&gt;`'s `C`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After taking a look at your code.&#xD;&#xA;&#xD;&#xA;I think you missed the trait bound here https://github.com/hgminerva/humidefi-parachain/blob/015d477ee6a73479760d4ea072ce871e970a0d43/node/src/service.rs#L86-L93.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;RuntimeApi::RuntimeApi: ContractApi&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="21507" PostHistoryTypeId="5" PostId="5604" RevisionGUID="26cbe36c-863a-49e5-bbe1-4229e7935121" CreationDate="2022-10-31T03:46:34.000" UserId="251" Comment="added 89 characters in body" Text="It means that `C` doesn't implement this trait.&#xD;&#xA;&#xD;&#xA;Check the `C`, the `create_fuill&lt;C, P&gt;`'s `C`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After taking a look at your code.&#xD;&#xA;&#xD;&#xA;I think you missed the trait bound here https://github.com/hgminerva/humidefi-parachain/blob/015d477ee6a73479760d4ea072ce871e970a0d43/node/src/service.rs#L86-L93.&#xD;&#xA;&#xD;&#xA;pseudo-code:&#xD;&#xA;```rs&#xD;&#xA;RuntimeApi::RuntimeApi: ContractApi&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Made a PR to your repo https://github.com/hgminerva/humidefi-parachain/pull/1." ContentLicense="CC BY-SA 4.0" />
  <row Id="21508" PostHistoryTypeId="4" PostId="5602" RevisionGUID="e98435d3-cecc-4b8e-b247-0e832391683f" CreationDate="2022-10-31T04:10:01.187" UserId="251" Comment="edited tags; edited title" Text="Problem while adding new API to runtime, RPC, and service" ContentLicense="CC BY-SA 4.0" />
  <row Id="21509" PostHistoryTypeId="6" PostId="5602" RevisionGUID="e98435d3-cecc-4b8e-b247-0e832391683f" CreationDate="2022-10-31T04:10:01.187" UserId="251" Comment="edited tags; edited title" Text="|runtime|rpc|service|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21511" PostHistoryTypeId="2" PostId="5620" RevisionGUID="ea0ce3c6-06f4-4988-8c7c-1bab56e24325" CreationDate="2022-10-31T09:39:05.083" UserId="3317" Text="It depends on the situation so one is not better than the other. Unsigned extrinsics can be used by validators, very similar to inherents (adding information to a block). Maybe when the use case is very generic you might find good use with it. &#xD;&#xA;However, for transactions it is usual the case that you want to check the signer and if it is a more specific use case, it is advised to use the SignedExtension Pays::No.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21513" PostHistoryTypeId="2" PostId="5621" RevisionGUID="04a7e64a-35c5-4446-956d-d27a42f66c80" CreationDate="2022-10-31T11:54:35.480" UserId="351" Text="Very interesting problem but I believe you cannot modify ensure_signed as per this answer.&#xD;&#xA;https://substrate.stackexchange.com/questions/1389/is-it-possible-to-define-a-custom-origin-in-my-pallet?rq=1" ContentLicense="CC BY-SA 4.0" />
  <row Id="21515" PostHistoryTypeId="2" PostId="5622" RevisionGUID="51bdf125-6b87-4062-9027-d39f2d509920" CreationDate="2022-10-31T12:03:43.423" UserId="3345" Text="I want to run the substrate node locally(with docker) to use it as an RPC provider(via ws). I want to use &quot;author.pendingExtrinsics&quot; method as well as &quot;chain.subscribeNewHeads&quot; and other RPC methods and I'm expecting to see the real-time result. Is it possible? Which flags I should set for the docker container to achieve this?&#xD;&#xA;&#xD;&#xA;I tried &quot;--rpc-external --ws-external --rpc-cors=all --unsafe-ws-external --unsafe-rpc-external&quot;, but at some point, the node stopping to see new blocks(I can see recent events in the https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer, but the last block is not updated). " ContentLicense="CC BY-SA 4.0" />
  <row Id="21517" PostHistoryTypeId="1" PostId="5622" RevisionGUID="51bdf125-6b87-4062-9027-d39f2d509920" CreationDate="2022-10-31T12:03:43.423" UserId="3345" Text="No new blocks with dockerized local RPC node" ContentLicense="CC BY-SA 4.0" />
  <row Id="21518" PostHistoryTypeId="3" PostId="5622" RevisionGUID="51bdf125-6b87-4062-9027-d39f2d509920" CreationDate="2022-10-31T12:03:43.423" UserId="3345" Text="|docker|block-production|wss|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21519" PostHistoryTypeId="2" PostId="5623" RevisionGUID="d4f315de-0e97-4f30-81c6-b49afef956b6" CreationDate="2022-10-31T12:08:45.463" UserId="2759" Text="From what I see in the code, the Executive pallet controls the hook order via one of the passed parameters `AllPallets, AllPalletsReversed, etc.` that depend upon the declaration order in `construct_runtime!`. &#xD;&#xA;&#xD;&#xA;I'm finding it difficult to figure out, what determines the Genesis build order, e.g. balances before staking. Is it purely dependent also on the declaration order in `construct_runtime!`? If yes, is it possible to somehow change the order as well?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21521" PostHistoryTypeId="1" PostId="5623" RevisionGUID="d4f315de-0e97-4f30-81c6-b49afef956b6" CreationDate="2022-10-31T12:08:45.463" UserId="2759" Text="Genesis build order" ContentLicense="CC BY-SA 4.0" />
  <row Id="21522" PostHistoryTypeId="3" PostId="5623" RevisionGUID="d4f315de-0e97-4f30-81c6-b49afef956b6" CreationDate="2022-10-31T12:08:45.463" UserId="2759" Text="|genesis|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21523" PostHistoryTypeId="5" PostId="5598" RevisionGUID="0be697ba-e69f-45bf-8da2-d33c985a3a76" CreationDate="2022-10-31T13:27:15.157" UserId="1792" Comment="added 1090 characters in body" Text="I have a pallet that has it's own origin (which then gets appended to the overarching Origin made by construct_runtime), this pallet dispatches calls using it's own custom origin, but I would like this origin to be compatible with ensure_signed so it works naturally with other pallets, and to do that I need to implement Into&lt;Result&lt;RawOrigin&lt;AccountId&gt;, Origin&gt;&gt; for the overarching Origin of the runtime, which is already implemented by the construct_runtime macro.&#xD;&#xA;&#xD;&#xA;I assume it just uses the _ pattern to return Err(origin) for anything that is not already Signed(accountid), but I want to override this impl to also return Ok(Signed(accountid)) when my custom origin's enum variant matches, but since it's inside the macro I'd assume there is a specific way to do that which I can't seem to find documented.&#xD;&#xA;&#xD;&#xA;There's also the possibility that I'm completely missing some other simpler way to have ensure_signed accept my custom origin, which I wouldn't know, again, because of the lack of documentation.&#xD;&#xA;&#xD;&#xA;Edit: I'm going to go further into what I want to modify:&#xD;&#xA;&#xD;&#xA;From this line in the construct_runtime macro expansion: https://github.com/paritytech/substrate/blob/master/frame/support/procedural/src/construct_runtime/expand/origin.rs#L287&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl From&lt;RuntimeOrigin&gt; for #scrate::sp_std::result::Result&lt;#system_path::Origin&lt;#runtime&gt;, RuntimeOrigin&gt; {&#xD;&#xA;	fn from(val: RuntimeOrigin) -&gt; Self {&#xD;&#xA;		if let OriginCaller::system(l) = val.caller {&#xD;&#xA;			Ok(l)&#xD;&#xA;		} else {&#xD;&#xA;			Err(val)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This piece of macro gets expanded inside my own runtime code, not in an external crate, so it's not just a matter of replacing it, I have no access to it simply because it's a macro that gets expanded on compile time. But here's what I want it to look like:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl From&lt;RuntimeOrigin&gt; for #scrate::sp_std::result::Result&lt;#system_path::Origin&lt;#runtime&gt;, RuntimeOrigin&gt; {&#xD;&#xA;	fn from(val: RuntimeOrigin) -&gt; Self {&#xD;&#xA;		match val.caller {&#xD;&#xA;			OriginCaller::system(l) =&gt; Ok(l),&#xD;&#xA;			OriginCaller::my_origin(c) =&gt; Ok(function_that_converts(c)),&#xD;&#xA;			_ =&gt; Err(val)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="21524" PostHistoryTypeId="2" PostId="5624" RevisionGUID="b8745b35-11e9-453a-8f92-227939e1c2af" CreationDate="2022-10-31T13:58:53.987" UserId="3385" Text="**tl;dr;**&#xD;&#xA;&#xD;&#xA;How do I access salt, used for contract's instantiation, in its constructor?&#xD;&#xA;&#xD;&#xA;**Longer version**&#xD;&#xA;&#xD;&#xA;Contract's address is computed as `hash(caller ++ code_hash ++ salt)` meaning it is deterministic. Having an access to the `salt` part in the constructor would allow for creating access-guarded subcontracts, without having to resort to the *access control pattern* as the `AccountId` address can be calculated in the constructor itself and passed in as an argument.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct MyInnerContract {&#xD;&#xA;  owner: AccountId&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl MyInnerContract {&#xD;&#xA;  pub fn new(owner: AccountId) -&gt; Self {&#xD;&#xA;    instantiate_contract(|instance: &amp;mut MyInnerContract) {&#xD;&#xA;      self.owner = owner;&#xD;&#xA;    })&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;//&#xD;&#xA;&#xD;&#xA;struct MyOuterContract {&#xD;&#xA;  subcontract_address: AccountId&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl MyOuterContract {&#xD;&#xA;  pub fn new(inner_contract_code_hash: Hash) -&gt; Self {&#xD;&#xA;     let my_new_account_id = hash(Self::env().caller() ++ Self::env().own_code_hash() ++ Self::env().salt());&#xD;&#xA;     &#xD;&#xA;     MyInnerContractRef::new()&#xD;&#xA;       .code_hash(inner_contract_code_hash)&#xD;&#xA;       .exec_input(my_new_account_id)&#xD;&#xA;       .instantiate().unwrap()&#xD;&#xA;     ...&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="21526" PostHistoryTypeId="1" PostId="5624" RevisionGUID="b8745b35-11e9-453a-8f92-227939e1c2af" CreationDate="2022-10-31T13:58:53.987" UserId="3385" Text="Accessing salt in the constructor" ContentLicense="CC BY-SA 4.0" />
  <row Id="21527" PostHistoryTypeId="3" PostId="5624" RevisionGUID="b8745b35-11e9-453a-8f92-227939e1c2af" CreationDate="2022-10-31T13:58:53.987" UserId="3385" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21528" PostHistoryTypeId="5" PostId="5598" RevisionGUID="43cd8207-80b6-44b4-a325-d15d7bba7b23" CreationDate="2022-10-31T15:25:56.553" UserId="1792" Comment="added 673 characters in body" Text="I have a pallet that has it's own origin (which then gets appended to the overarching Origin made by construct_runtime), this pallet dispatches calls using it's own custom origin, but I would like this origin to be compatible with ensure_signed so it works naturally with other pallets, and to do that I need to implement Into&lt;Result&lt;RawOrigin&lt;AccountId&gt;, Origin&gt;&gt; for the overarching Origin of the runtime, which is already implemented by the construct_runtime macro.&#xD;&#xA;&#xD;&#xA;I assume it just uses the _ pattern to return Err(origin) for anything that is not already Signed(accountid), but I want to override this impl to also return Ok(Signed(accountid)) when my custom origin's enum variant matches, but since it's inside the macro I'd assume there is a specific way to do that which I can't seem to find documented.&#xD;&#xA;&#xD;&#xA;There's also the possibility that I'm completely missing some other simpler way to have ensure_signed accept my custom origin, which I wouldn't know, again, because of the lack of documentation.&#xD;&#xA;&#xD;&#xA;Edit: I'm going to go further into what I want to modify:&#xD;&#xA;&#xD;&#xA;From this line in the construct_runtime macro expansion: https://github.com/paritytech/substrate/blob/master/frame/support/procedural/src/construct_runtime/expand/origin.rs#L287&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl From&lt;RuntimeOrigin&gt; for #scrate::sp_std::result::Result&lt;#system_path::Origin&lt;#runtime&gt;, RuntimeOrigin&gt; {&#xD;&#xA;	fn from(val: RuntimeOrigin) -&gt; Self {&#xD;&#xA;		if let OriginCaller::system(l) = val.caller {&#xD;&#xA;			Ok(l)&#xD;&#xA;		} else {&#xD;&#xA;			Err(val)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This piece of macro gets expanded inside my own runtime code, not in an external crate, so it's not just a matter of replacing it, I have no access to it simply because it's a macro that gets expanded on compile time. But here's what I want it to look like:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl From&lt;RuntimeOrigin&gt; for #scrate::sp_std::result::Result&lt;#system_path::Origin&lt;#runtime&gt;, RuntimeOrigin&gt; {&#xD;&#xA;	fn from(val: RuntimeOrigin) -&gt; Self {&#xD;&#xA;		match val.caller {&#xD;&#xA;			OriginCaller::system(l) =&gt; Ok(l),&#xD;&#xA;			OriginCaller::my_origin(c) =&gt; Ok(function_that_converts(c)),&#xD;&#xA;			_ =&gt; Err(val)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Edit 2: I found an open issue in paritytech/substrate about SignedExtension (https://github.com/paritytech/substrate/issues/3419#issuecomment-587387100) that, if implemented, would allow for me to do this by simply making a SignedExtension.&#xD;&#xA;&#xD;&#xA;The linked comment mentions that with the implementation you would be able to mutate the origin of a call in the extension, which would be perfect as I could simply write logic to convert my custom origin to Signed(account_id) in the validate function.&#xD;&#xA;&#xD;&#xA;However, as you can see, the issue is from 2019 and is still open, so either a better and undocumented solution was introduced, or this has just been ignored ever since." ContentLicense="CC BY-SA 4.0" />
  <row Id="21529" PostHistoryTypeId="5" PostId="5617" RevisionGUID="cb8bc815-ba48-4fb0-9003-dbf8a8eb6320" CreationDate="2022-10-31T15:41:27.143" UserId="3382" Comment="added 327 characters in body" Text="[Here](https://github.com/mns23/substrate-node-template/tree/offchain-worker-example) I installed the official example [offchain-worker](https://github.com/paritytech/substrate/tree/master/frame/examples/offchain-worker) pallet into a v0.9.28 Substrate node template.&#xD;&#xA;Just check last commit to see the integration through runtime/lib.rs, node/src/service.rs and Cargo files.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21530" PostHistoryTypeId="5" PostId="5617" RevisionGUID="38245092-c3be-4030-bcfd-76023cbf4934" CreationDate="2022-10-31T15:43:30.457" UserId="3382" Comment="deleted 5 characters in body" Text="[Here](https://github.com/mns23/substrate-node-template/tree/offchain-worker-example) I installed the official example [offchain-worker](https://github.com/paritytech/substrate/tree/master/frame/examples/offchain-worker) pallet into a v0.9.28 Substrate node template.&#xD;&#xA;Check last commit to see the integration through runtime/lib.rs, node/src/service.rs and Cargo files.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21531" PostHistoryTypeId="5" PostId="5617" RevisionGUID="86fe5b4b-4ebe-4aca-982c-b65f0d8133f6" CreationDate="2022-10-31T15:43:53.000" UserId="3382" Comment="added 4 characters in body" Text="[Here](https://github.com/mns23/substrate-node-template/tree/offchain-worker-example) I installed the official example [offchain-worker](https://github.com/paritytech/substrate/tree/master/frame/examples/offchain-worker) pallet into a v0.9.28 Substrate node template.&#xD;&#xA;Check last commit to see the integration through runtime/src/lib.rs, node/src/service.rs and Cargo files.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21532" PostHistoryTypeId="2" PostId="5625" RevisionGUID="1df5d08f-96aa-4d8c-b564-0eda4c96281f" CreationDate="2022-10-31T17:13:08.217" UserId="425" Text="My question is quite simple - can I use conditional compilation via `cfg` attribute macros in ink! contracts?&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;Cargo.toml&#xD;&#xA;```&#xD;&#xA;cross_contract_emit = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;lib.rs&#xD;&#xA;```&#xD;&#xA;            #[cfg(not(feature = &quot;cross_contract_emit&quot;))]&#xD;&#xA;            Self::emit_event(&#xD;&#xA;                self.env(),&#xD;&#xA;                Event::Event1(Event1 {&#xD;&#xA;                    who: caller,&#xD;&#xA;                    value: self.value,&#xD;&#xA;                }),&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            #[cfg(feature = &quot;cross_contract_emit&quot;)]&#xD;&#xA;            build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(Call::new().callee(AccountId::from(EMITTER_PUBKEY)))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ExecutionInput::new(Selector::new(EMIT_FLIP_EVENT_SELECTOR))&#xD;&#xA;                        .push_arg(caller)&#xD;&#xA;                        .push_arg(self.value),&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;()&gt;()&#xD;&#xA;                .fire();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and I want to compile &amp; upload two versions of the contract, once by passing the `--features &quot;cross_contract_emit&quot;` feature flag, and once without. " ContentLicense="CC BY-SA 4.0" />
  <row Id="21534" PostHistoryTypeId="1" PostId="5625" RevisionGUID="1df5d08f-96aa-4d8c-b564-0eda4c96281f" CreationDate="2022-10-31T17:13:08.217" UserId="425" Text="Using conditional compilation in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="21535" PostHistoryTypeId="3" PostId="5625" RevisionGUID="1df5d08f-96aa-4d8c-b564-0eda4c96281f" CreationDate="2022-10-31T17:13:08.217" UserId="425" Text="|ink|smart-contract|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21536" PostHistoryTypeId="5" PostId="5617" RevisionGUID="b308a5ed-e9ce-4139-9087-0d40637bcdb6" CreationDate="2022-10-31T17:28:43.043" UserId="3382" Comment="added 1 character in body" Text="[Here](https://github.com/mns23/substrate-node-template/tree/offchain-worker-example) I integrated the official example [offchain-worker](https://github.com/paritytech/substrate/tree/master/frame/examples/offchain-worker) pallet into a v0.9.28 Substrate node template.&#xD;&#xA;Check last commit to see the integration through runtime/src/lib.rs, node/src/service.rs and Cargo files.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21537" PostHistoryTypeId="2" PostId="5626" RevisionGUID="f49eeda3-5852-4674-a9a7-03eb9cf3b3ea" CreationDate="2022-10-31T18:00:59.170" UserId="3387" Text="Branch(polkadot-v0.9.31)&#xD;&#xA;https://github.com/paritytech/substrate/tree/polkadot-v0.9.31/frame/contracts&#xD;&#xA;&#xD;&#xA;Branch(polkadot-v0.9.30)&#xD;&#xA;https://github.com/paritytech/substrate/tree/polkadot-v0.9.30/frame/contracts/rpc&#xD;&#xA;&#xD;&#xA;Since for the branch &quot;polkadot-v0.9.30&quot; the pallet-contracts-rpc was there. I would like to upgrade my outer node file rpc.rs to accommodate the branch &quot;polkadot-v0.9.31&quot;. please.&#xD;&#xA;&#xD;&#xA;I tried to search in the release notes but I was not able to find anything about this.&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21539" PostHistoryTypeId="1" PostId="5626" RevisionGUID="f49eeda3-5852-4674-a9a7-03eb9cf3b3ea" CreationDate="2022-10-31T18:00:59.170" UserId="3387" Text="The crate &quot;pallet-contracts-rpc&quot; does not exists for the branch &quot;polkadot-v0.9.31&quot;. There is any replacement?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21540" PostHistoryTypeId="3" PostId="5626" RevisionGUID="f49eeda3-5852-4674-a9a7-03eb9cf3b3ea" CreationDate="2022-10-31T18:00:59.170" UserId="3387" Text="|polkadot|smart-contract|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21541" PostHistoryTypeId="2" PostId="5627" RevisionGUID="b090a390-dc9b-46e9-b5d1-8805bf36efa1" CreationDate="2022-10-31T18:06:17.963" UserId="14" Text="Have you checked [this PR](https://github.com/paritytech/substrate/pull/12358)?&#xD;&#xA;&#xD;&#xA;I think that checking the files it changed you'll be able to update accordingly." ContentLicense="CC BY-SA 4.0" />
  <row Id="21543" PostHistoryTypeId="4" PostId="5626" RevisionGUID="6fa397a2-356b-4acc-85e6-51d507277eaa" CreationDate="2022-10-31T18:24:35.253" UserId="251" Comment="edited title" Text="The crate &quot;pallet-contracts-rpc&quot; does not exists for the branch &quot;polkadot-v0.9.31&quot;. Is there any replacement?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21549" PostHistoryTypeId="50" PostId="5103" RevisionGUID="42ea5b27-444f-427d-b5d4-d00c3873cdff" CreationDate="2022-10-31T21:18:57.123" UserId="-1" />
  <row Id="21550" PostHistoryTypeId="2" PostId="5629" RevisionGUID="3ee11bac-c2f3-4a85-9894-9d9c6deae28b" CreationDate="2022-11-01T00:22:31.543" UserId="2403" Text="I have pretty simple extrinsic code which stores data to substrate storage hashmap and tries to load it after from another nested function. But result looks like nothing stored.&#xD;&#xA;In pseudo:&#xD;&#xA;```&#xD;&#xA;storage[&quot;key&quot;] = 1&#xD;&#xA;...&#xD;&#xA;storage.get(&quot;key&quot;)  // it is None&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I know that all operations of extrinsic are transactional, but... is this expected behavior, or I did something wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21552" PostHistoryTypeId="1" PostId="5629" RevisionGUID="3ee11bac-c2f3-4a85-9894-9d9c6deae28b" CreationDate="2022-11-01T00:22:31.543" UserId="2403" Text="Do extrinsic respect changes to storage due on call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21553" PostHistoryTypeId="3" PostId="5629" RevisionGUID="3ee11bac-c2f3-4a85-9894-9d9c6deae28b" CreationDate="2022-11-01T00:22:31.543" UserId="2403" Text="|storage|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21554" PostHistoryTypeId="5" PostId="5598" RevisionGUID="66f351a7-d311-4f6d-b09b-c694cbe8b8a8" CreationDate="2022-11-01T02:03:19.693" UserId="1792" Comment="added 296 characters in body" Text="**Please see edits 2 and beyond, as they reshape the question a lot.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have a pallet that has it's own origin (which then gets appended to the overarching Origin made by construct_runtime), this pallet dispatches calls using it's own custom origin, but I would like this origin to be compatible with ensure_signed so it works naturally with other pallets, and to do that I need to implement Into&lt;Result&lt;RawOrigin&lt;AccountId&gt;, Origin&gt;&gt; for the overarching Origin of the runtime, which is already implemented by the construct_runtime macro.&#xD;&#xA;&#xD;&#xA;I assume it just uses the _ pattern to return Err(origin) for anything that is not already Signed(accountid), but I want to override this impl to also return Ok(Signed(accountid)) when my custom origin's enum variant matches, but since it's inside the macro I'd assume there is a specific way to do that which I can't seem to find documented.&#xD;&#xA;&#xD;&#xA;There's also the possibility that I'm completely missing some other simpler way to have ensure_signed accept my custom origin, which I wouldn't know, again, because of the lack of documentation.&#xD;&#xA;&#xD;&#xA;Edit: I'm going to go further into what I want to modify:&#xD;&#xA;&#xD;&#xA;From this line in the construct_runtime macro expansion: https://github.com/paritytech/substrate/blob/master/frame/support/procedural/src/construct_runtime/expand/origin.rs#L287&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl From&lt;RuntimeOrigin&gt; for #scrate::sp_std::result::Result&lt;#system_path::Origin&lt;#runtime&gt;, RuntimeOrigin&gt; {&#xD;&#xA;	fn from(val: RuntimeOrigin) -&gt; Self {&#xD;&#xA;		if let OriginCaller::system(l) = val.caller {&#xD;&#xA;			Ok(l)&#xD;&#xA;		} else {&#xD;&#xA;			Err(val)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This piece of macro gets expanded inside my own runtime code, not in an external crate, so it's not just a matter of replacing it, I have no access to it simply because it's a macro that gets expanded on compile time. But here's what I want it to look like:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl From&lt;RuntimeOrigin&gt; for #scrate::sp_std::result::Result&lt;#system_path::Origin&lt;#runtime&gt;, RuntimeOrigin&gt; {&#xD;&#xA;	fn from(val: RuntimeOrigin) -&gt; Self {&#xD;&#xA;		match val.caller {&#xD;&#xA;			OriginCaller::system(l) =&gt; Ok(l),&#xD;&#xA;			OriginCaller::my_origin(c) =&gt; Ok(function_that_converts(c)),&#xD;&#xA;			_ =&gt; Err(val)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Edit 2: I found an open issue in paritytech/substrate about SignedExtension (https://github.com/paritytech/substrate/issues/3419#issuecomment-587387100) that, if implemented, would allow for me to do this by simply making a SignedExtension.&#xD;&#xA;&#xD;&#xA;The linked comment mentions that with the implementation you would be able to mutate the origin of a call in the extension, which would be perfect as I could simply write logic to convert my custom origin to Signed(account_id) in the validate function.&#xD;&#xA;&#xD;&#xA;However, as you can see, the issue is from 2019 and is still open, so either a better and undocumented solution was introduced, or this has just been ignored ever since.&#xD;&#xA;&#xD;&#xA;Edit 3: The issue mentioned in the previous edit really seems to be what I'd actually need, as it would also allow me to properly charge fees for those transactions by placing them before the ChargeTransactionPayment SignedExtension and making them go through it like any other Signed origin." ContentLicense="CC BY-SA 4.0" />
  <row Id="21555" PostHistoryTypeId="4" PostId="5598" RevisionGUID="66f351a7-d311-4f6d-b09b-c694cbe8b8a8" CreationDate="2022-11-01T02:03:19.693" UserId="1792" Comment="added 296 characters in body" Text="SignedExtension to mutate Origin" ContentLicense="CC BY-SA 4.0" />
  <row Id="21556" PostHistoryTypeId="6" PostId="5598" RevisionGUID="66f351a7-d311-4f6d-b09b-c694cbe8b8a8" CreationDate="2022-11-01T02:03:19.693" UserId="1792" Comment="added 296 characters in body" Text="|pallet|frame|signed-extensions|origin|unsigned|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21557" PostHistoryTypeId="5" PostId="5598" RevisionGUID="9f3797b7-a4f5-40ea-ba0f-cc86ae0dedb0" CreationDate="2022-11-01T02:11:06.167" UserId="1792" Comment="added 296 characters in body" Text="**Please see edits 2 and beyond, as they reshape the question a lot.**&#xD;&#xA;&#xD;&#xA;**TLDR: I need a way to mutate an origin for all but some specific calls so that it's dispatched as RawOrigin::Signed to pass ensure_signed and also so that it goes through pallet-transaction-payment's SignedExtension to charge fees.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have a pallet that has it's own origin (which then gets appended to the overarching Origin made by construct_runtime), this pallet dispatches calls using it's own custom origin, but I would like this origin to be compatible with ensure_signed so it works naturally with other pallets, and to do that I need to implement Into&lt;Result&lt;RawOrigin&lt;AccountId&gt;, Origin&gt;&gt; for the overarching Origin of the runtime, which is already implemented by the construct_runtime macro.&#xD;&#xA;&#xD;&#xA;I assume it just uses the _ pattern to return Err(origin) for anything that is not already Signed(accountid), but I want to override this impl to also return Ok(Signed(accountid)) when my custom origin's enum variant matches, but since it's inside the macro I'd assume there is a specific way to do that which I can't seem to find documented.&#xD;&#xA;&#xD;&#xA;There's also the possibility that I'm completely missing some other simpler way to have ensure_signed accept my custom origin, which I wouldn't know, again, because of the lack of documentation.&#xD;&#xA;&#xD;&#xA;Edit: I'm going to go further into what I want to modify:&#xD;&#xA;&#xD;&#xA;From this line in the construct_runtime macro expansion: https://github.com/paritytech/substrate/blob/master/frame/support/procedural/src/construct_runtime/expand/origin.rs#L287&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl From&lt;RuntimeOrigin&gt; for #scrate::sp_std::result::Result&lt;#system_path::Origin&lt;#runtime&gt;, RuntimeOrigin&gt; {&#xD;&#xA;	fn from(val: RuntimeOrigin) -&gt; Self {&#xD;&#xA;		if let OriginCaller::system(l) = val.caller {&#xD;&#xA;			Ok(l)&#xD;&#xA;		} else {&#xD;&#xA;			Err(val)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This piece of macro gets expanded inside my own runtime code, not in an external crate, so it's not just a matter of replacing it, I have no access to it simply because it's a macro that gets expanded on compile time. But here's what I want it to look like:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl From&lt;RuntimeOrigin&gt; for #scrate::sp_std::result::Result&lt;#system_path::Origin&lt;#runtime&gt;, RuntimeOrigin&gt; {&#xD;&#xA;	fn from(val: RuntimeOrigin) -&gt; Self {&#xD;&#xA;		match val.caller {&#xD;&#xA;			OriginCaller::system(l) =&gt; Ok(l),&#xD;&#xA;			OriginCaller::my_origin(c) =&gt; Ok(function_that_converts(c)),&#xD;&#xA;			_ =&gt; Err(val)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Edit 2: I found an open issue in paritytech/substrate about SignedExtension (https://github.com/paritytech/substrate/issues/3419#issuecomment-587387100) that, if implemented, would allow for me to do this by simply making a SignedExtension.&#xD;&#xA;&#xD;&#xA;The linked comment mentions that with the implementation you would be able to mutate the origin of a call in the extension, which would be perfect as I could simply write logic to convert my custom origin to Signed(account_id) in the validate function.&#xD;&#xA;&#xD;&#xA;However, as you can see, the issue is from 2019 and is still open, so either a better and undocumented solution was introduced, or this has just been ignored ever since.&#xD;&#xA;&#xD;&#xA;Edit 3: The issue mentioned in the previous edit really seems to be what I'd actually need, as it would also allow me to properly charge fees for those transactions by placing them before the ChargeTransactionPayment SignedExtension and making them go through it like any other Signed origin." ContentLicense="CC BY-SA 4.0" />
  <row Id="21558" PostHistoryTypeId="2" PostId="5630" RevisionGUID="ce1776fd-283c-4e4d-9e15-6a09b8f58cbd" CreationDate="2022-11-01T04:21:24.090" UserId="3254" Text="I'm building an application that allows anyone to deploy PSP34 using Openbrush contract.&#xD;&#xA;&#xD;&#xA;I want to allow users to deploy a new contract from the UI and upload an image to mint the NFT.&#xD;&#xA;&#xD;&#xA;I have successfully called the function to mint from the UI, but I am stumped by the code for each user to deploy the contract from the UI.&#xD;&#xA;&#xD;&#xA;--- &#xD;&#xA;Specifically, I want users to be able to call new to create a new contract from the UI. (total supply at this point is 0)&#xD;&#xA;&#xD;&#xA;I guess I would use CodePromise, but I am having trouble understanding what the argument wasm is. Can someone please tell me what it is?&#xD;&#xA;https://polkadot.js.org/docs/api-contract/start/code&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;#![feature(min_specialization)]&#xD;&#xA;&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[openbrush::contract]&#xD;&#xA;mod psp34_contract {&#xD;&#xA;    use openbrush::contracts::psp34::extensions::metadata::*;&#xD;&#xA;    use openbrush::contracts::psp34::extensions::burnable::*;&#xD;&#xA;    use openbrush::contracts::psp34::extensions::enumerable::*;&#xD;&#xA;    use openbrush::contracts::psp34::*;&#xD;&#xA;    use ink_prelude::string::String;&#xD;&#xA;    use ink_prelude::vec::Vec;&#xD;&#xA;    use ink_storage::Mapping;&#xD;&#xA;    use ink_storage::traits::SpreadAllocate;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    /// Defines the storage of your contract.&#xD;&#xA;    /// Add new fields to the below struct in order&#xD;&#xA;    /// to add new static storage fields to your contract.&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(Default, SpreadAllocate, PSP34Storage, PSP34MetadataStorage)]&#xD;&#xA;    pub struct Psp34Contract {&#xD;&#xA;        #[PSP34StorageField]&#xD;&#xA;        psp34: PSP34Data&lt;EnumerableBalances&gt;,&#xD;&#xA;        last_token_id: u8,&#xD;&#xA;        cid_list: Mapping&lt;String, Vec&lt;String&gt;&gt;,&#xD;&#xA;        #[PSP34MetadataStorageField]&#xD;&#xA;        metadata: PSP34MetadataData,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl PSP34 for Psp34Contract {}&#xD;&#xA;    impl PSP34Metadata for Psp34Contract {}&#xD;&#xA;    // Optionally you can add more default implementations&#xD;&#xA;    impl PSP34Internal for Psp34Contract {}&#xD;&#xA;    impl PSP34MetadataInternal for Psp34Contract {}&#xD;&#xA;    impl PSP34Burnable for Psp34Contract {}&#xD;&#xA;    impl PSP34Enumerable for Psp34Contract {}&#xD;&#xA;&#xD;&#xA;    impl Psp34Contract {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(id: Id, name: String, symbol: String) -&gt; Self {&#xD;&#xA;            ink_lang::codegen::initialize_contract(|instance: &amp;mut Self| {&#xD;&#xA;                instance._set_attribute(id.clone(), String::from(&quot;name&quot;).into_bytes(), name.into_bytes());&#xD;&#xA;                instance._set_attribute(id, String::from(&quot;symbol&quot;).into_bytes(), symbol.into_bytes());&#xD;&#xA;            })&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mint_token(&amp;mut self) -&gt; Result&lt;(), PSP34Error&gt; {&#xD;&#xA;            self._mint_to(Self::env().caller(), Id::U8(self.last_token_id))?;&#xD;&#xA;            self.last_token_id += 1;&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mint_with_attribute(&amp;mut self, title: String, author: String, date: String, cid: String) -&gt; Result&lt;(), PSP34Error&gt; {&#xD;&#xA;            self._mint_to(Self::env().caller(), Id::U8(self.last_token_id))?;&#xD;&#xA;            self.last_token_id += 1;&#xD;&#xA;            let mut attributes = Vec::new();&#xD;&#xA;            attributes.push(title);&#xD;&#xA;            attributes.push(author);&#xD;&#xA;            attributes.push(date);&#xD;&#xA;            self.cid_list.insert(cid, &amp;attributes);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="21560" PostHistoryTypeId="1" PostId="5630" RevisionGUID="ce1776fd-283c-4e4d-9e15-6a09b8f58cbd" CreationDate="2022-11-01T04:21:24.090" UserId="3254" Text="What is the 'wasm' argument in CodePromise?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21561" PostHistoryTypeId="3" PostId="5630" RevisionGUID="ce1776fd-283c-4e4d-9e15-6a09b8f58cbd" CreationDate="2022-11-01T04:21:24.090" UserId="3254" Text="|ink|wasm|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21562" PostHistoryTypeId="2" PostId="5631" RevisionGUID="d3e6d33d-74bf-498c-8509-6aad342be71a" CreationDate="2022-11-01T07:00:51.090" UserId="445" Text="I find out 1 piece of code in substrate&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct IsValidator(Box&lt;dyn Fn() -&gt; bool + Send + Sync&gt;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I implement Debug for `IsValidator` Struct" ContentLicense="CC BY-SA 4.0" />
  <row Id="21564" PostHistoryTypeId="1" PostId="5631" RevisionGUID="d3e6d33d-74bf-498c-8509-6aad342be71a" CreationDate="2022-11-01T07:00:51.090" UserId="445" Text="How i implement Debug for trait object" ContentLicense="CC BY-SA 4.0" />
  <row Id="21565" PostHistoryTypeId="3" PostId="5631" RevisionGUID="d3e6d33d-74bf-498c-8509-6aad342be71a" CreationDate="2022-11-01T07:00:51.090" UserId="445" Text="|rust|transactions|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21566" PostHistoryTypeId="2" PostId="5632" RevisionGUID="9e2387ca-b1ed-4e30-9ce7-02cf5023be03" CreationDate="2022-11-01T07:11:51.120" UserId="3389" Text="I'm trying syncing a new Khala node (based on `polkadot-v0.9.30` branch) from 0,&#xD;&#xA;few hours later, I can see the output like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-11-01 07:08:54 [Parachain] Block import error: Backend error: Can't canonicalize missing block number #2482945 when importing 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead (#2487041)&#xD;&#xA;2022-11-01 07:08:54 [Parachain]  Error importing block 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead: consensus error: Import failed: Backend error: Can't canonicalize missing block number #2482945 when importing 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead (#2487041)&#xD;&#xA;2022-11-01 07:08:55 [Parachain] ⚙️  Syncing  0.0 bps, target=#2629792 (11 peers), best: #2482944 (0x7272…aac6), finalized #405357 (0x2ba4…5c69), ⬇ 1.8MiB/s ⬆ 2.7kiB/s&#xD;&#xA;2022-11-01 07:08:56 [Relaychain] ⚙️  Syncing 48.7 bps, target=#15134037 (30 peers), best: #9247717 (0x6478…a2cc), finalized #9247232 (0xd3a2…417d), ⬇ 1.2MiB/s ⬆ 132.9kiB/s&#xD;&#xA;2022-11-01 07:09:00 [Parachain] ⚙️  Syncing  0.0 bps, target=#2629792 (11 peers), best: #2482944 (0x7272…aac6), finalized #405357 (0x2ba4…5c69), ⬇ 8.8MiB/s ⬆ 3.3kiB/s&#xD;&#xA;2022-11-01 07:09:01 [Relaychain] ⚙️  Syncing 43.5 bps, target=#15134037 (30 peers), best: #9247935 (0x9a21…f6fe), finalized #9247744 (0xc1c1…b50c), ⬇ 1.0MiB/s ⬆ 139.8kiB/s&#xD;&#xA;2022-11-01 07:09:05 [Parachain] Block import error: Backend error: Can't canonicalize missing block number #2482945 when importing 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead (#2487041)&#xD;&#xA;2022-11-01 07:09:05 [Parachain]  Error importing block 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead: consensus error: Import failed: Backend error: Can't canonicalize missing block number #2482945 when importing 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead (#2487041)&#xD;&#xA;2022-11-01 07:09:05 [Parachain] ⚙️  Syncing  0.0 bps, target=#2629792 (11 peers), best: #2482944 (0x7272…aac6), finalized #405593 (0x89a5…6ff9), ⬇ 9.0MiB/s ⬆ 4.2kiB/s&#xD;&#xA;2022-11-01 07:09:06 [Relaychain] ⚙️  Syncing 48.3 bps, target=#15134037 (30 peers), best: #9248177 (0xb440…3ff2), finalized #9247744 (0xc1c1…b50c), ⬇ 1.0MiB/s ⬆ 121.6kiB/s&#xD;&#xA;2022-11-01 07:09:10 [Parachain] ⚙️  Syncing  0.0 bps, target=#2629792 (13 peers), best: #2482944 (0x7272…aac6), finalized #405593 (0x89a5…6ff9), ⬇ 9.7MiB/s ⬆ 4.6kiB/s&#xD;&#xA;2022-11-01 07:09:11 [Relaychain] ⚙️  Syncing 42.5 bps, target=#15134037 (30 peers), best: #9248390 (0xdbc3…aad9), finalized #9248256 (0xb48f…6a96), ⬇ 953.1kiB/s ⬆ 120.9kiB/s&#xD;&#xA;2022-11-01 07:09:15 [Parachain] ⚙️  Syncing  0.0 bps, target=#2629793 (11 peers), best: #2482944 (0x7272…aac6), finalized #405593 (0x89a5…6ff9), ⬇ 9.0MiB/s ⬆ 4.2kiB/s&#xD;&#xA;2022-11-01 07:09:15 [Parachain] Block import error: Backend error: Can't canonicalize missing block number #2482945 when importing 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead (#2487041)&#xD;&#xA;2022-11-01 07:09:15 [Parachain]  Error importing block 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead: consensus error: Import failed: Backend error: Can't canonicalize missing block number #2482945 when importing 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead (#2487041)&#xD;&#xA;2022-11-01 07:09:16 [Relaychain] ⚙️  Syncing 47.7 bps, target=#15134045 (30 peers), best: #9248629 (0x0da6…9e37), finalized #9248256 (0xb48f…6a96), ⬇ 1.0MiB/s ⬆ 130.5kiB/s&#xD;&#xA;2022-11-01 07:09:20 [Parachain] ⚙️  Syncing  0.0 bps, target=#2629793 (13 peers), best: #2482944 (0x7272…aac6), finalized #405829 (0x92bb…2cd7), ⬇ 5.7MiB/s ⬆ 7.7kiB/s&#xD;&#xA;2022-11-01 07:09:21 [Relaychain] ⚙️  Syncing 43.3 bps, target=#15134046 (30 peers), best: #9248846 (0x4dff…ab5b), finalized #9248769 (0xeb85…0f4a), ⬇ 956.7kiB/s ⬆ 123.9kiB/s&#xD;&#xA;2022-11-01 07:09:25 [Parachain] ⚙️  Syncing  0.0 bps, target=#2629795 (13 peers), best: #2482944 (0x7272…aac6), finalized #405829 (0x92bb…2cd7), ⬇ 6.9MiB/s ⬆ 5.7kiB/s&#xD;&#xA;2022-11-01 07:09:26 [Relaychain] ⚙️  Syncing 43.1 bps, target=#15134046 (30 peers), best: #9249062 (0xf167…12a9), finalized #9248769 (0xeb85…0f4a), ⬇ 889.9kiB/s ⬆ 140.6kiB/s&#xD;&#xA;2022-11-01 07:09:30 [Parachain] ⚙️  Syncing  0.0 bps, target=#2629798 (14 peers), best: #2482944 (0x7272…aac6), finalized #406070 (0x49b1…c151), ⬇ 9.4MiB/s ⬆ 5.5kiB/s&#xD;&#xA;2022-11-01 07:09:31 [Relaychain] ⚙️  Syncing 45.6 bps, target=#15134046 (30 peers), best: #9249290 (0x88d5…5cf9), finalized #9249281 (0x2c85…36a1), ⬇ 1.1MiB/s ⬆ 146.0kiB/s&#xD;&#xA;2022-11-01 07:09:35 [Parachain] ⚙️  Syncing  0.0 bps, target=#2629798 (15 peers), best: #2482944 (0x7272…aac6), finalized #406070 (0x49b1…c151), ⬇ 5.8MiB/s ⬆ 3.6kiB/s&#xD;&#xA;2022-11-01 07:09:36 [Relaychain] ⚙️  Syncing 45.9 bps, target=#15134046 (30 peers), best: #9249520 (0x9522…56f7), finalized #9249281 (0x2c85…36a1), ⬇ 1000.6kiB/s ⬆ 112.3kiB/s&#xD;&#xA;2022-11-01 07:09:38 [Parachain] Block import error: Backend error: Can't canonicalize missing block number #2482945 when importing 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead (#2487041)&#xD;&#xA;2022-11-01 07:09:38 [Parachain]  Error importing block 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead: consensus error: Import failed: Backend error: Can't canonicalize missing block number #2482945 when importing 0xa0000aacfc918561284868cba29427613320594d3b129dc5981b0946f8368ead (#2487041)&#xD;&#xA;2022-11-01 07:09:38 [Parachain]  Error importing block 0x27939286e6722c962d6c964e4bfc4a3371b2ac6d78f6b2ee534a6a1ad7543786: block has an unknown parent&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The parachain syncing seems stuck for hours, and no sign to continue." ContentLicense="CC BY-SA 4.0" />
  <row Id="21568" PostHistoryTypeId="1" PostId="5632" RevisionGUID="9e2387ca-b1ed-4e30-9ce7-02cf5023be03" CreationDate="2022-11-01T07:11:51.120" UserId="3389" Text="Block import error: Backend error: Can't canonicalize missing block number #{BLOCK_NUMBER} when importing {BLOCK_HASH}" ContentLicense="CC BY-SA 4.0" />
  <row Id="21569" PostHistoryTypeId="3" PostId="5632" RevisionGUID="9e2387ca-b1ed-4e30-9ce7-02cf5023be03" CreationDate="2022-11-01T07:11:51.120" UserId="3389" Text="|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21570" PostHistoryTypeId="2" PostId="5633" RevisionGUID="e3cd0f9d-3f02-4548-afda-bb79eba03083" CreationDate="2022-11-01T09:30:58.767" UserId="139" Text="Fn traits do not come with `Debug` constraints as such you cannot derive `Debug` on it. You could write a derive implementation for this struct but I doubt it would be useful as you are still missing information on the inner `Fn` type. You may however implement debug with the return type of the `dyn Fn` as it does implement `Debug` in this case. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct IsValidator(Box&lt;dyn Fn() -&gt; bool + Send + Sync &gt;);&#xD;&#xA;use std::fmt::{Debug, Error, Formatter};&#xD;&#xA;impl Debug for IsValidator {&#xD;&#xA;    fn fmt(&amp;self, f: &amp;mut Formatter&lt;'_&gt;) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;         f&#xD;&#xA;        .debug_struct(&quot;IsValidator&quot;)&#xD;&#xA;        .field(&quot;Fn Results&quot;, &amp;self.0())&#xD;&#xA;        .finish()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;    &#xD;&#xA;fn main() {&#xD;&#xA;    let a : IsValidator = IsValidator(Box::new(|| true));&#xD;&#xA;    println!(&quot;{a:?}&quot;);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;prints `IsValidator { Fn Results : true }`" ContentLicense="CC BY-SA 4.0" />
  <row Id="21572" PostHistoryTypeId="2" PostId="5634" RevisionGUID="d41879e3-a3a6-4e90-a01a-99f43f034a9a" CreationDate="2022-11-01T10:32:34.070" UserId="521" Text="After the latest upgrade of Westend runtime to version 9310 the RPC call `payment_queryFeeInfo` fails with the following error message:&#xD;&#xA;``` json&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:1,&quot;message&quot;:&quot;Unable to query dispatch info.&quot;,&quot;data&quot;:&quot;Failed to decode return value of TransactionPaymentApi_query_info&quot;},&quot;id&quot;:604352276}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, execution of `state_call` with the following arguments: `[&quot;TransactionPaymentApi_query_info&quot;, &lt;Encoded extrinsic here&gt;]` successfully completes.&#xD;&#xA;&#xD;&#xA;Also we noticed that polkadot-js uses `state_call` for fetching the fee.&#xD;&#xA;Does it mean that `payment_queryFeeInfo` should be considered deprectated? Or is it a bug in the 9310 runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21574" PostHistoryTypeId="1" PostId="5634" RevisionGUID="d41879e3-a3a6-4e90-a01a-99f43f034a9a" CreationDate="2022-11-01T10:32:34.070" UserId="521" Text="Rpc payment_queryFeeInfo fails on Westend 9310" ContentLicense="CC BY-SA 4.0" />
  <row Id="21575" PostHistoryTypeId="3" PostId="5634" RevisionGUID="d41879e3-a3a6-4e90-a01a-99f43f034a9a" CreationDate="2022-11-01T10:32:34.070" UserId="521" Text="|rpc|fee|json-rpc|westend|bug|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21582" PostHistoryTypeId="2" PostId="5636" RevisionGUID="e4fe35fa-509b-4ef2-86bd-04297fdd9850" CreationDate="2022-11-01T11:20:12.873" UserId="507" Text="We have been spoiled with free, almost unlimited public websocker rpcs in Kusama and Polkadot ecosystem, but this is changing fast, so we are exploring paid RPC API services. But we have noticed that when using websocket rpc with polkadot.js it does `system_health` call every 10 seconds, which can be costly. If a single client subscribes to balance changes and keeps the client/connection active for 24h that's 8640 calls. On Popular dapps like NFT marketplace or a defi, this can get quite expensive. Some well known RPC API services count each response towards your limits. So I am wondering if there's a way to perhaps opt-out from system_health calls? Ofcourse alternative is to adjust front-end code to check for balance on-demand instead of having an open websocket subscription and use https rpcs instead, but this is worse dev and end-user user-experience." ContentLicense="CC BY-SA 4.0" />
  <row Id="21584" PostHistoryTypeId="1" PostId="5636" RevisionGUID="e4fe35fa-509b-4ef2-86bd-04297fdd9850" CreationDate="2022-11-01T11:20:12.873" UserId="507" Text="Opt-out of polkadot.js/api system_health calls for wss rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="21585" PostHistoryTypeId="3" PostId="5636" RevisionGUID="e4fe35fa-509b-4ef2-86bd-04297fdd9850" CreationDate="2022-11-01T11:20:12.873" UserId="507" Text="|polkadot-js|rpc|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21586" PostHistoryTypeId="2" PostId="5637" RevisionGUID="ab638279-8ed8-4f6b-a7f7-51072fcc7b03" CreationDate="2022-11-01T13:09:17.960" UserId="1840" Text="the identicon style on Parachains is not aligned with Polkadot, as you can see as below.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;How can parachain team make the same style or override the default settings?&#xD;&#xA;&#xD;&#xA;According to the Polkdaot.js/UI settings: https://github.com/paritytech/substrate-ui/blob/master/src/Identicon.jsx#L48,  parachains should be able to override it to `polkadot` style.&#xD;&#xA;&#xD;&#xA;But the code here: https://github.com/polkadot-js/common/blob/master/packages/networks/src/defaults/icons.ts seems does not work. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/e95WJ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21588" PostHistoryTypeId="1" PostId="5637" RevisionGUID="ab638279-8ed8-4f6b-a7f7-51072fcc7b03" CreationDate="2022-11-01T13:09:17.960" UserId="1840" Text="Use the Polkadot identicon styles for Parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="21589" PostHistoryTypeId="3" PostId="5637" RevisionGUID="ab638279-8ed8-4f6b-a7f7-51072fcc7b03" CreationDate="2022-11-01T13:09:17.960" UserId="1840" Text="|polkadot-js|ui|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21590" PostHistoryTypeId="2" PostId="5638" RevisionGUID="af167c6b-a398-4a04-8a5a-47c7781507d7" CreationDate="2022-11-01T13:56:55.760" UserId="2792" Text="We would like to force all our local node traffic to use the local network instead of the internet to communicate between eachother. Any best practice to do this? " ContentLicense="CC BY-SA 4.0" />
  <row Id="21592" PostHistoryTypeId="1" PostId="5638" RevisionGUID="af167c6b-a398-4a04-8a5a-47c7781507d7" CreationDate="2022-11-01T13:56:55.760" UserId="2792" Text="Forcing node traffic to local network" ContentLicense="CC BY-SA 4.0" />
  <row Id="21593" PostHistoryTypeId="3" PostId="5638" RevisionGUID="af167c6b-a398-4a04-8a5a-47c7781507d7" CreationDate="2022-11-01T13:56:55.760" UserId="2792" Text="|nodes|private-network|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21594" PostHistoryTypeId="2" PostId="5639" RevisionGUID="93d440c9-75da-410b-8910-cb3e1dee6d51" CreationDate="2022-11-01T14:24:07.550" UserId="539" Text="To allow a node to connect to other nodes in the local network you will want to use the following flags:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--allow-private-ipv4: Always accept connecting to private IPv4 addresses.&#xD;&#xA;--discover-local: Enable peer discovery on local networks.&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;As is explained in `polkadot --help`, those options are `Enabled by default for chains marked as &quot;local&quot; in their chain specifications, or when `--dev` is passed&quot;`.&#xD;&#xA;&#xD;&#xA;Moreover if you want to restrict connection only to certain peers, you should look into the `--reserved-nodes` and `--reserved-only` flags." ContentLicense="CC BY-SA 4.0" />
  <row Id="21596" PostHistoryTypeId="2" PostId="5640" RevisionGUID="5fdd24a7-7e07-4c39-8545-35297725608d" CreationDate="2022-11-01T14:29:55.843" UserId="6" Text="Is it possible to have both a long term slot and also a short term slot on the Rococo test relay chain?  We currently have a long term slot but would like the possibility of having a short term slot to validate another runtime version." ContentLicense="CC BY-SA 4.0" />
  <row Id="21598" PostHistoryTypeId="1" PostId="5640" RevisionGUID="5fdd24a7-7e07-4c39-8545-35297725608d" CreationDate="2022-11-01T14:29:55.843" UserId="6" Text="Having both long term and short term slots on Rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="21599" PostHistoryTypeId="3" PostId="5640" RevisionGUID="5fdd24a7-7e07-4c39-8545-35297725608d" CreationDate="2022-11-01T14:29:55.843" UserId="6" Text="|rococo|slot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21600" PostHistoryTypeId="52" PostId="5631" RevisionGUID="c5fd8435-f9fe-4730-a8b9-196b40916d3c" CreationDate="2022-11-01T15:03:08.467" />
  <row Id="21601" PostHistoryTypeId="2" PostId="5641" RevisionGUID="e0c3b52d-cbee-4ce9-aaed-e735c3c1f05e" CreationDate="2022-11-01T16:17:35.127" UserId="251" Text="I think you need to add the identity pallet to your parachain runtime.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/tree/master/frame/identity" ContentLicense="CC BY-SA 4.0" />
  <row Id="21607" PostHistoryTypeId="2" PostId="5643" RevisionGUID="cebb800a-1076-43db-bf2d-7bcfc95518a7" CreationDate="2022-11-01T21:00:08.120" UserId="2441" Text="I have a situation where I have a constant defined in my `runtime` (but not in any `pallet`) which I want to expose with the runtime itself in some way.&#xD;&#xA;&#xD;&#xA;Specifically, there is a constant used as a multiplier in our runtime's `WeightToFee` implementation. This multiplier used to be part of `transaction-payment`'s constants until https://github.com/paritytech/substrate/pull/11415 converted `WeightToFee` into a trait.&#xD;&#xA;&#xD;&#xA;Before this change, we were able to query `api.consts.transactionPayment.weightToFee[0]` to effectively obtain this constant. This allowed a client to have all the information it needed to precisely calculate fees, which is something we used very extensively in testing.&#xD;&#xA;&#xD;&#xA;What tools are available to expose this now? I believe a custom `RPC` endpoint would work, but this seems like a lot of bloat to add such a small piece of information." ContentLicense="CC BY-SA 4.0" />
  <row Id="21609" PostHistoryTypeId="1" PostId="5643" RevisionGUID="cebb800a-1076-43db-bf2d-7bcfc95518a7" CreationDate="2022-11-01T21:00:08.120" UserId="2441" Text="How can we expose a runtime constant?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21610" PostHistoryTypeId="3" PostId="5643" RevisionGUID="cebb800a-1076-43db-bf2d-7bcfc95518a7" CreationDate="2022-11-01T21:00:08.120" UserId="2441" Text="|runtime|query|constants|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21615" PostHistoryTypeId="2" PostId="5645" RevisionGUID="6c326b3c-c788-4756-a6c3-43a28f1a6a1c" CreationDate="2022-11-01T21:17:53.903" UserId="3331" Text="I've changed the desiredCandidates to 2 in the Chain Specification file, and when I try to add a new collator using the `collatorSelection` pallet I got the error : `collatorSelection.ValidatorNotRegistered` [![Error][1]][1]&#xD;&#xA;&#xD;&#xA;How can I solve this?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cjdYA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21617" PostHistoryTypeId="1" PostId="5645" RevisionGUID="6c326b3c-c788-4756-a6c3-43a28f1a6a1c" CreationDate="2022-11-01T21:17:53.903" UserId="3331" Text="How to add new collators on a running parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21618" PostHistoryTypeId="3" PostId="5645" RevisionGUID="6c326b3c-c788-4756-a6c3-43a28f1a6a1c" CreationDate="2022-11-01T21:17:53.903" UserId="3331" Text="|parachain|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21619" PostHistoryTypeId="5" PostId="5645" RevisionGUID="2b285983-791a-48c9-8ef7-477b6a2e7eae" CreationDate="2022-11-01T21:38:45.473" UserId="3331" Comment="added 130 characters in body" Text="I'm running a Relay Chain with 4 validators. I've deployed a Parachain with one collator in the Chain Specification.&#xD;&#xA;Also I've changed the desiredCandidates from 0 to 2 in the Chain Specification file, and when I try to add a new collator using the `collatorSelection` pallet I got the error : `collatorSelection.ValidatorNotRegistered` [![Error][1]][1]&#xD;&#xA;&#xD;&#xA;How can I solve this?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cjdYA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21620" PostHistoryTypeId="5" PostId="5645" RevisionGUID="5826ae14-8b23-4972-8fec-79f31373442a" CreationDate="2022-11-01T21:46:58.463" UserId="3331" Comment="deleted 12 characters in body" Text="I'm running a Relay Chain with 4 validators. And trying to add a new collator to a running parachain.&#xD;&#xA;&#xD;&#xA;Which I've changed the desiredCandidates from 0 to 2 in the Chain Specification file. And when I try to add a new collator using the `collatorSelection` pallet I get the error : `collatorSelection.ValidatorNotRegistered` [![Error][1]][1]&#xD;&#xA;&#xD;&#xA;How can I solve this?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cjdYA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21622" PostHistoryTypeId="2" PostId="5646" RevisionGUID="a36ae3d1-cdea-4220-9ea5-ca8a838c128a" CreationDate="2022-11-01T23:19:49.227" UserId="100" Text="The wasm argument represents the actual contract code that will run on-chain.&#xD;&#xA;&#xD;&#xA;After building your contract you get 3 files:&#xD;&#xA;- metadata.json&#xD;&#xA;- a wasm file&#xD;&#xA;- a `.contract` file that contains both the metadata and Wasm blob&#xD;&#xA;&#xD;&#xA;The `.contract` file is valid JSON and can be parsed as such. &#xD;&#xA;You would then access the wasm code like so: &#xD;&#xA;`json.info.source.wasm`&#xD;&#xA;&#xD;&#xA;Check Contracts UI for a possible implementation https://github.com/paritytech/contracts-ui&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21624" PostHistoryTypeId="2" PostId="5647" RevisionGUID="ec6793ef-0a25-4e6b-86bb-252fb27215ce" CreationDate="2022-11-02T00:07:16.347" UserId="2060" Text="We're trying to understand the signed transaction vs. unsigned transaction lifecycle, and what ensure_signed *actually* does for you.&#xD;&#xA;&#xD;&#xA;What it seemed was, if you submitted an unsigned transaction to our pallet that it would put the failed txn in the block because it should fail `ensure_signed` correct?  Just like any other failure inside of an extrinsic. IF you assume this, then it's fine for Pays::Yes txns.&#xD;&#xA;&#xD;&#xA;However in Pays::No txns, one would think submitting unsigned txns would be an attack vector. Yet running our chain locally, we can submit unsigned txns all day long, and they will never be put in a block as a failed transaction, it will be invalid, because it reaches, (we think) [this generated/macro code in `validate_unsigned`][1], displaying `UnknownTransaction::NoUnsignedValidator` in the Polkadot dashboard, without our having to do anything extra.&#xD;&#xA;&#xD;&#xA;So next, SignedExtension's default validate_unsigned has [something very different][2]:&#xD;&#xA;```&#xD;&#xA;	fn validate_unsigned(&#xD;&#xA;		_call: &amp;Self::Call,&#xD;&#xA;		_info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;		_len: usize,&#xD;&#xA;	) -&gt; TransactionValidity {&#xD;&#xA;		Ok(ValidTransaction::default())&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Basically it seems that unsigned transactions are not calling the above default implementation, but instead the first one which is automagically generated for pallets regardless of whether they have a SignedExtension implemented. Following the code, this `expand_outer_validate_unsigned` function is called (probably self-evident by now) in construct_runtime.&#xD;&#xA;&#xD;&#xA;Question is what is the use of the default for the trait? Are we correct in thinking that unsigned transactions are default rejected before getting to the extrinsic code, unless you explicitly allow them?  What is then the real purpose of ensure_signed?  We were thinking it would also prevent Root from executing such a transaction.&#xD;&#xA;&#xD;&#xA;Lastly, for something called **Signed**Extension, why is there a validate_unsigned function at all? The trait name would seem to imply it's really just for signed transactions.&#xD;&#xA;&#xD;&#xA;Yes, we are confused :)  Please help.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/8fb4138d73ad88a19331c30c36ba91796c5846e1/frame/support/procedural/src/construct_runtime/expand/unsigned.rs#L84&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/8fb4138d73ad88a19331c30c36ba91796c5846e1/primitives/runtime/src/traits.rs#L1120" ContentLicense="CC BY-SA 4.0" />
  <row Id="21626" PostHistoryTypeId="1" PostId="5647" RevisionGUID="ec6793ef-0a25-4e6b-86bb-252fb27215ce" CreationDate="2022-11-02T00:07:16.347" UserId="2060" Text="Difference between SignedExtension default behavior vs. actual behavior (expand_outer_validate_unsigned)" ContentLicense="CC BY-SA 4.0" />
  <row Id="21627" PostHistoryTypeId="3" PostId="5647" RevisionGUID="ec6793ef-0a25-4e6b-86bb-252fb27215ce" CreationDate="2022-11-02T00:07:16.347" UserId="2060" Text="|signed-extensions|validation|unsigned|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21628" PostHistoryTypeId="5" PostId="5647" RevisionGUID="5ca21da9-06d0-45c4-beb5-f2c293961f4e" CreationDate="2022-11-02T00:15:39.947" UserId="2060" Comment="added 149 characters in body" Text="We're trying to understand the signed transaction vs. unsigned transaction lifecycle, and what ensure_signed *actually* does for you.&#xD;&#xA;&#xD;&#xA;What it seemed was, if you submitted an unsigned transaction to our pallet that it would put the failed txn in the block because it should fail `ensure_signed` with `BadOrigin`, correct?  Just like any other failure inside of an extrinsic. IF you assume this, then it's fine for Pays::Yes txns.&#xD;&#xA;&#xD;&#xA;However in Pays::No txns, one would think submitting unsigned txns would be an attack vector. Yet running our chain locally, we can submit unsigned txns all day long, and they will never be put in a block as a failed transaction, it will be invalid, because it reaches, (we think) [this generated/macro code in `validate_unsigned`][1], displaying `UnknownTransaction::NoUnsignedValidator` in the Polkadot dashboard, without our having to do anything extra.&#xD;&#xA;&#xD;&#xA;And in fact if we call this extrinsic using Sudo, it fails with `BadOrigin`, and the failed transaction is included in a block...so I guess we shouldn't DoS ourselves.&#xD;&#xA;&#xD;&#xA;So next, SignedExtension's default validate_unsigned has [something very different][2]:&#xD;&#xA;```&#xD;&#xA;	fn validate_unsigned(&#xD;&#xA;		_call: &amp;Self::Call,&#xD;&#xA;		_info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;		_len: usize,&#xD;&#xA;	) -&gt; TransactionValidity {&#xD;&#xA;		Ok(ValidTransaction::default())&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Basically it seems that unsigned transactions are not calling the above default implementation, but instead the first one which is automagically generated for pallets regardless of whether they have a SignedExtension implemented. Following the code, this `expand_outer_validate_unsigned` function is called (probably self-evident by now) in construct_runtime.&#xD;&#xA;&#xD;&#xA;Question is what is the use of the default for the trait? Are we correct in thinking that unsigned transactions are default rejected before getting to the extrinsic code, unless you explicitly allow them?  What is then the real purpose of ensure_signed?  We were thinking it would also prevent Root from executing such a transaction.&#xD;&#xA;&#xD;&#xA;Lastly, for something called **Signed**Extension, why is there a validate_unsigned function at all? The trait name would seem to imply it's really just for signed transactions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/8fb4138d73ad88a19331c30c36ba91796c5846e1/frame/support/procedural/src/construct_runtime/expand/unsigned.rs#L84&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/8fb4138d73ad88a19331c30c36ba91796c5846e1/primitives/runtime/src/traits.rs#L1120" ContentLicense="CC BY-SA 4.0" />
  <row Id="21629" PostHistoryTypeId="5" PostId="5647" RevisionGUID="2bebb719-8728-400d-aea0-780ac23273cc" CreationDate="2022-11-02T02:11:07.063" UserId="251" Comment="deleted 4 characters in body" Text="We're trying to understand the signed transaction vs. unsigned transaction lifecycle, and what ensure_signed *actually* does for you.&#xD;&#xA;&#xD;&#xA;What it seemed was, if you submitted an unsigned transaction to our pallet that it would put the failed txn in the block because it should fail `ensure_signed` with `BadOrigin`, correct?  Just like any other failure inside of an extrinsic. IF you assume this, then it's fine for Pays::Yes txns.&#xD;&#xA;&#xD;&#xA;However in Pays::No txns, one would think submitting unsigned txns would be an attack vector. Yet running our chain locally, we can submit unsigned txns all day long, and they will never be put in a block as a failed transaction, it will be invalid, because it reaches, (we think) [this generated/macro code in `validate_unsigned`][1], displaying `UnknownTransaction::NoUnsignedValidator` in the Polkadot dashboard, without our having to do anything extra.&#xD;&#xA;&#xD;&#xA;And in fact if we call this extrinsic using Sudo, it fails with `BadOrigin`, and the failed transaction is included in a block...so I guess we shouldn't DoS ourselves.&#xD;&#xA;&#xD;&#xA;So next, SignedExtension's default validate_unsigned has [something very different][2]:&#xD;&#xA;```rs&#xD;&#xA;fn validate_unsigned(&#xD;&#xA;	_call: &amp;Self::Call,&#xD;&#xA;	_info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;	_len: usize,&#xD;&#xA;) -&gt; TransactionValidity {&#xD;&#xA;	Ok(ValidTransaction::default())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Basically it seems that unsigned transactions are not calling the above default implementation, but instead the first one which is automagically generated for pallets regardless of whether they have a SignedExtension implemented. Following the code, this `expand_outer_validate_unsigned` function is called (probably self-evident by now) in construct_runtime.&#xD;&#xA;&#xD;&#xA;Question is what is the use of the default for the trait? Are we correct in thinking that unsigned transactions are default rejected before getting to the extrinsic code, unless you explicitly allow them?  What is then the real purpose of ensure_signed?  We were thinking it would also prevent Root from executing such a transaction.&#xD;&#xA;&#xD;&#xA;Lastly, for something called **Signed**Extension, why is there a validate_unsigned function at all? The trait name would seem to imply it's really just for signed transactions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/8fb4138d73ad88a19331c30c36ba91796c5846e1/frame/support/procedural/src/construct_runtime/expand/unsigned.rs#L84&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/8fb4138d73ad88a19331c30c36ba91796c5846e1/primitives/runtime/src/traits.rs#L1120" ContentLicense="CC BY-SA 4.0" />
  <row Id="21630" PostHistoryTypeId="5" PostId="5630" RevisionGUID="7707ad45-37d3-4029-bc33-5a7a8e771955" CreationDate="2022-11-02T02:11:35.647" UserId="251" Comment="added 2 characters in body" Text="I'm building an application that allows anyone to deploy PSP34 using Openbrush contract.&#xD;&#xA;&#xD;&#xA;I want to allow users to deploy a new contract from the UI and upload an image to mint the NFT.&#xD;&#xA;&#xD;&#xA;I have successfully called the function to mint from the UI, but I am stumped by the code for each user to deploy the contract from the UI.&#xD;&#xA;&#xD;&#xA;--- &#xD;&#xA;Specifically, I want users to be able to call new to create a new contract from the UI. (total supply at this point is 0)&#xD;&#xA;&#xD;&#xA;I guess I would use CodePromise, but I am having trouble understanding what the argument wasm is. Can someone please tell me what it is?&#xD;&#xA;https://polkadot.js.org/docs/api-contract/start/code&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;#![feature(min_specialization)]&#xD;&#xA;&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[openbrush::contract]&#xD;&#xA;mod psp34_contract {&#xD;&#xA;    use openbrush::contracts::psp34::extensions::metadata::*;&#xD;&#xA;    use openbrush::contracts::psp34::extensions::burnable::*;&#xD;&#xA;    use openbrush::contracts::psp34::extensions::enumerable::*;&#xD;&#xA;    use openbrush::contracts::psp34::*;&#xD;&#xA;    use ink_prelude::string::String;&#xD;&#xA;    use ink_prelude::vec::Vec;&#xD;&#xA;    use ink_storage::Mapping;&#xD;&#xA;    use ink_storage::traits::SpreadAllocate;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    /// Defines the storage of your contract.&#xD;&#xA;    /// Add new fields to the below struct in order&#xD;&#xA;    /// to add new static storage fields to your contract.&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(Default, SpreadAllocate, PSP34Storage, PSP34MetadataStorage)]&#xD;&#xA;    pub struct Psp34Contract {&#xD;&#xA;        #[PSP34StorageField]&#xD;&#xA;        psp34: PSP34Data&lt;EnumerableBalances&gt;,&#xD;&#xA;        last_token_id: u8,&#xD;&#xA;        cid_list: Mapping&lt;String, Vec&lt;String&gt;&gt;,&#xD;&#xA;        #[PSP34MetadataStorageField]&#xD;&#xA;        metadata: PSP34MetadataData,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl PSP34 for Psp34Contract {}&#xD;&#xA;    impl PSP34Metadata for Psp34Contract {}&#xD;&#xA;    // Optionally you can add more default implementations&#xD;&#xA;    impl PSP34Internal for Psp34Contract {}&#xD;&#xA;    impl PSP34MetadataInternal for Psp34Contract {}&#xD;&#xA;    impl PSP34Burnable for Psp34Contract {}&#xD;&#xA;    impl PSP34Enumerable for Psp34Contract {}&#xD;&#xA;&#xD;&#xA;    impl Psp34Contract {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(id: Id, name: String, symbol: String) -&gt; Self {&#xD;&#xA;            ink_lang::codegen::initialize_contract(|instance: &amp;mut Self| {&#xD;&#xA;                instance._set_attribute(id.clone(), String::from(&quot;name&quot;).into_bytes(), name.into_bytes());&#xD;&#xA;                instance._set_attribute(id, String::from(&quot;symbol&quot;).into_bytes(), symbol.into_bytes());&#xD;&#xA;            })&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mint_token(&amp;mut self) -&gt; Result&lt;(), PSP34Error&gt; {&#xD;&#xA;            self._mint_to(Self::env().caller(), Id::U8(self.last_token_id))?;&#xD;&#xA;            self.last_token_id += 1;&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mint_with_attribute(&amp;mut self, title: String, author: String, date: String, cid: String) -&gt; Result&lt;(), PSP34Error&gt; {&#xD;&#xA;            self._mint_to(Self::env().caller(), Id::U8(self.last_token_id))?;&#xD;&#xA;            self.last_token_id += 1;&#xD;&#xA;            let mut attributes = Vec::new();&#xD;&#xA;            attributes.push(title);&#xD;&#xA;            attributes.push(author);&#xD;&#xA;            attributes.push(date);&#xD;&#xA;            self.cid_list.insert(cid, &amp;attributes);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="21631" PostHistoryTypeId="5" PostId="5645" RevisionGUID="99587523-9f89-47c7-874d-d84a60a1e60f" CreationDate="2022-11-02T02:13:26.973" UserId="251" Comment="added 2 characters in body" Text="I'm running a Relay Chain with 4 validators. And trying to add a new collator to a running parachain.&#xD;&#xA;&#xD;&#xA;Which I've changed the `desiredCandidates` from 0 to 2 in the Chain Specification file. And when I try to add a new collator using the `collatorSelection` pallet I get the error : `collatorSelection.ValidatorNotRegistered` [![Error][1]][1]&#xD;&#xA;&#xD;&#xA;How can I solve this?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cjdYA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21633" PostHistoryTypeId="2" PostId="5648" RevisionGUID="73055d60-1747-4b79-a235-a950cd46e270" CreationDate="2022-11-02T05:58:39.513" UserId="627" Text="Generally (this is not the first time this happens), this indicates a mismatch between the node and runtime versions, i.e. the RPC node calls into the runtime and then cannot decode the response. &#xD;&#xA;&#xD;&#xA;Basically it means that the RPC nodes would need to be upgraded to match the runtime version (or if newer, downgraded). With this in place the node would be able to decode the responses from the runtime and provide the results over RPC.&#xD;&#xA;&#xD;&#xA;For the `state_call` question - this doesn't suffer from the same issues (since there is no node &lt;-&gt; runtime encoding involved), hence the JS API using `api.call.*` to make these payment queries. &#xD;&#xA;&#xD;&#xA;Generally if functionality is available on the runtime calls and RPCs, you would rather use the runtime calls." ContentLicense="CC BY-SA 4.0" />
  <row Id="21635" PostHistoryTypeId="2" PostId="5649" RevisionGUID="711885ef-c772-4e85-a066-f3e44ebbcdcd" CreationDate="2022-11-02T06:30:38.067" UserId="1950" Text="I'm looking for a place in Substrate where it stores ` validator heartbeat `. I have gone through the staking pallet and I was unable to find it. Where do I need to look for it ?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21637" PostHistoryTypeId="1" PostId="5649" RevisionGUID="711885ef-c772-4e85-a066-f3e44ebbcdcd" CreationDate="2022-11-02T06:30:38.067" UserId="1950" Text="Where to find validator heartbeat stored on substrate Blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="21638" PostHistoryTypeId="3" PostId="5649" RevisionGUID="711885ef-c772-4e85-a066-f3e44ebbcdcd" CreationDate="2022-11-02T06:30:38.067" UserId="1950" Text="|validator|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21639" PostHistoryTypeId="2" PostId="5650" RevisionGUID="abfa6dc8-351e-41cb-948e-07063ca83156" CreationDate="2022-11-02T06:44:25.843" UserId="251" Text="You should check that in pallet-im-online.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/8fb4138d73ad88a19331c30c36ba91796c5846e1/frame/im-online/src/lib.rs#L416." ContentLicense="CC BY-SA 4.0" />
  <row Id="21643" PostHistoryTypeId="10" PostId="5631" RevisionGUID="8a494ad7-e051-4fc7-a22d-89945504490c" CreationDate="2022-11-02T07:14:06.867" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[1]}" />
  <row Id="21645" PostHistoryTypeId="10" PostId="5397" RevisionGUID="7429305e-239b-4349-a777-cb1c0827cc06" CreationDate="2022-11-02T07:18:17.580" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="21646" PostHistoryTypeId="10" PostId="2851" RevisionGUID="4b5855f9-8bdf-4cb8-9087-610e5c5a533b" CreationDate="2022-11-02T07:19:20.913" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="21647" PostHistoryTypeId="2" PostId="5651" RevisionGUID="2e49d630-59aa-4a8a-ab66-33c6e0173997" CreationDate="2022-11-02T07:36:22.987" UserId="3393" Text="Polkadot.js App reads the value from two parts: ui-settings and from an *IdentityNode list*&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-js/apps/blob/51835328db5f0eb90a9efcc7bf5510704a7ab279/packages/react-components/src/IdentityIcon/index.tsx#L29&#xD;&#xA;&#xD;&#xA;ui-settings: the user can pick their preferred icon theme. This will apply to all networks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And for IdentityNode list, you could do a pull request to add your node name and your preferred icon theme&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-js/apps/blob/51835328db5f0eb90a9efcc7bf5510704a7ab279/packages/apps-config/src/ui/identityIcons/index.ts#L7" ContentLicense="CC BY-SA 4.0" />
  <row Id="21650" PostHistoryTypeId="2" PostId="5652" RevisionGUID="c0303fd3-a475-401a-8b3d-b4ad6bea05ca" CreationDate="2022-11-02T08:04:10.623" UserId="3000" Text="&#xD;&#xA;I Created custome pallet with substrate in my local system . &#xD;&#xA;&#xD;&#xA;I gonna to connect my custome front-end ( Angular ) to my local substrate . &#xD;&#xA;&#xD;&#xA;i tryied to do it in angular with these codes : &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    import { Component } from '@angular/core';&#xD;&#xA;    // import { ApiPromise } from &quot;@polkadot/api&quot;;&#xD;&#xA;    import {&#xD;&#xA;      ScProvider,&#xD;&#xA;      WellKnownChain,&#xD;&#xA;    } from &quot;@polkadot/rpc-provider/substrate-connect&quot;;&#xD;&#xA;    &#xD;&#xA;    @Component({&#xD;&#xA;      selector: 'app-root',&#xD;&#xA;      templateUrl: './app.component.html',&#xD;&#xA;      styleUrls: ['./app.component.scss']&#xD;&#xA;    })&#xD;&#xA;    export class AppComponent {&#xD;&#xA;      title = 'pay-qr';&#xD;&#xA;      /**&#xD;&#xA;       *&#xD;&#xA;       */&#xD;&#xA;       constructor() {&#xD;&#xA;        this.test().then();&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      async test():Promise&lt;void&gt; {&#xD;&#xA;        const provider = new ScProvider(ScProvider.WellKnownChain.polkadot);&#xD;&#xA;    &#xD;&#xA;        await provider.connect();&#xD;&#xA;        &#xD;&#xA;        const version = await provider.send('chain_getBlockHash', []);&#xD;&#xA;        console.log('latest block Hash', version);&#xD;&#xA;        // const polkadotApi = await ApiPromise.create({ provider });&#xD;&#xA;        // await polkadotApi.rpc.chain.subscribeNewHeads((lastHeader) =&gt; {&#xD;&#xA;        //   console.log(lastHeader.number.toString());&#xD;&#xA;        // });&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;but i did not work and did not connect to my lcoal substrate . &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**how can i do that ?** &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21652" PostHistoryTypeId="1" PostId="5652" RevisionGUID="c0303fd3-a475-401a-8b3d-b4ad6bea05ca" CreationDate="2022-11-02T08:04:10.623" UserId="3000" Text="connect custom frontend to my local substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="21653" PostHistoryTypeId="3" PostId="5652" RevisionGUID="c0303fd3-a475-401a-8b3d-b4ad6bea05ca" CreationDate="2022-11-02T08:04:10.623" UserId="3000" Text="|substrate-node-template|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21654" PostHistoryTypeId="2" PostId="5653" RevisionGUID="54950ced-e5fd-49b7-b82b-2d20741f25fc" CreationDate="2022-11-02T08:48:07.017" UserId="2102" Text="Is it possible to split the execution of an extrinsic into several continuous blocks?&#xD;&#xA;Looking at this [post](https://substrate.stackexchange.com/questions/1329/how-to-perform-a-large-migration), it is possible to create migrations, but I was wondering if the same can be applied to an extrinsic.&#xD;&#xA;&#xD;&#xA;So for example, let's say I have the following enum (keep in mind this is a dummy example):&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub enum ItemType {&#xD;&#xA;	A(u32),&#xD;&#xA;	B(u32),&#xD;&#xA;	C(u32),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, let's imagine that there's a list (with millions of entries) declared as:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn items)]&#xD;&#xA;pub(super) type AllItems&lt;T: Config&gt; = StorageValue&lt;_, Vec&lt;ItemType&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to create an extrinsic that changes all the elements stored within the `AllItems` structure from `ItemType::A` to `ItemType::B`, but a single run will certainly require a lot of time to modify the whole vector, so I want to split the execution into multiple blocks, so the execution does not exceed the maximum block weight and also allow the chain to process other transactions and not only this.&#xD;&#xA;&#xD;&#xA;This is just a simple example to get the idea, but imagine that is not a simple modification and it has to perform updates on different structures at the same time." ContentLicense="CC BY-SA 4.0" />
  <row Id="21656" PostHistoryTypeId="1" PostId="5653" RevisionGUID="54950ced-e5fd-49b7-b82b-2d20741f25fc" CreationDate="2022-11-02T08:48:07.017" UserId="2102" Text="Split extrinsic execution across multiple blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="21657" PostHistoryTypeId="3" PostId="5653" RevisionGUID="54950ced-e5fd-49b7-b82b-2d20741f25fc" CreationDate="2022-11-02T08:48:07.017" UserId="2102" Text="|substrate-node-template|rust|extrinsic|migration|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21658" PostHistoryTypeId="5" PostId="5477" RevisionGUID="76993418-a5c8-457d-913e-7b20206d3d91" CreationDate="2022-11-02T08:53:25.193" UserId="3255" Comment="added 1017 characters in body" Text="I am gonna transfer the customized message which is actually the string in JSON format for representing some information from one parachain to another one.&#xD;&#xA;But I can't find the right functions or specific steps, while there are some XCM demos for transfer the tokens between multiple parachains.&#xD;&#xA;If anyone have some idea, please contact here to give me your hand, thanks.&#xD;&#xA;&#xD;&#xA;-----------------------------------------------------&#xD;&#xA;I tested XCM between parachain 2000 and parachain 2001.&#xD;&#xA;At the moment I could see the &quot;Barrier error&quot; just like the image below.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][6]][6]&#xD;&#xA;&#xD;&#xA;All parameters of XCM were almost same as here, https://substrate.stackexchange.com/questions/5445/how-to-open-hrmp-channels-between-parachains.&#xD;&#xA;&#xD;&#xA;But I couldn't create a new HRMP channel via this XCM.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][7]][7]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aiGhI.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/JoZOE.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/zs4Un.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/rQAqc.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/ESg3E.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/sUfkm.png&#xD;&#xA;  [7]: https://i.stack.imgur.com/sOCGM.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21659" PostHistoryTypeId="5" PostId="5485" RevisionGUID="7524ff6b-c779-40da-b6ef-6120f2273d0b" CreationDate="2022-11-02T09:12:52.540" UserId="1959" Comment="for question's update" Text="In fact, when you send a cross-chain message, you actually want to either transfer the token or call the method on target chain. &#xD;&#xA;&#xD;&#xA;As you said **customized message**, what do you want the message to do after it reaches the target chain? Call a function with it as an argument? If so, you could use the `transact` instruction in XCM. &#xD;&#xA;&#xD;&#xA;For example: Send XCM to Polkadot and call `remark` on Polkadot with customized message &quot;hello world&quot; as parameter.&#xD;&#xA;&#xD;&#xA;1. Get the encoded call data `0x00012c68656c6c6f20776f726c64`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;2. Send XCM to Polkadot via `polkadotXcm.send`&#xD;&#xA;```&#xD;&#xA;WithdrawAsset(...)&#xD;&#xA;BuyExecution(...)&#xD;&#xA;Transact(0x00012c68656c6c6f20776f726c64) &#xD;&#xA;RefundSurplus&#xD;&#xA;DepositAsset(...)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;*Updates to follow up on question*:&#xD;&#xA;&#xD;&#xA;You should use **sudo or Governance** to send the XCM to open HRMP.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Z7Z8E.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21660" PostHistoryTypeId="5" PostId="5485" RevisionGUID="62fc32f7-a4b1-4799-b952-3d8e3f6f25aa" CreationDate="2022-11-02T09:17:54.257" UserId="1959" Comment="for question's update" Text="In fact, when you send a cross-chain message, you actually want to either transfer the token or call the method on target chain. &#xD;&#xA;&#xD;&#xA;As you said **customized message**, what do you want the message to do after it reaches the target chain? Call a function with it as an argument? If so, you could use the `transact` instruction in XCM. &#xD;&#xA;&#xD;&#xA;For example: Send XCM to Polkadot and call `remark` on Polkadot with customized message &quot;hello world&quot; as parameter.&#xD;&#xA;&#xD;&#xA;1. Get the encoded call data `0x00012c68656c6c6f20776f726c64`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;2. Send XCM to Polkadot via `polkadotXcm.send`&#xD;&#xA;```&#xD;&#xA;WithdrawAsset(...)&#xD;&#xA;BuyExecution(...)&#xD;&#xA;Transact(0x00012c68656c6c6f20776f726c64) &#xD;&#xA;RefundSurplus&#xD;&#xA;DepositAsset(...)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;*Updates to follow up on question*:&#xD;&#xA;&#xD;&#xA;You should use **sudo or Governance** to send the XCM to open HRMP.&#xD;&#xA;&#xD;&#xA;Refer to: https://substrate.stackexchange.com/a/4925/1959&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Z7Z8E.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21661" PostHistoryTypeId="2" PostId="5654" RevisionGUID="791f15a2-e684-47c3-83e1-2c125b586710" CreationDate="2022-11-02T09:25:35.293" UserId="3255" Text="I am testing XCM between parachain 2000 and parachain 2001 while referencing this link, https://substrate.stackexchange.com/questions/5445/how-to-open-hrmp-channels-between-parachains.&#xD;&#xA;But I couldn't open a new HRMP channel, I faced the &quot;Barrier&quot; error.&#xD;&#xA;&#xD;&#xA;It seems I should use Sudo or Governance as you said, but I could find neither of them in the &quot;Developer&quot; tag on the Polkadot.JS App.&#xD;&#xA;&#xD;&#xA;What am I missing in this situation? Please help me if someone knows the solution." ContentLicense="CC BY-SA 4.0" />
  <row Id="21663" PostHistoryTypeId="1" PostId="5654" RevisionGUID="791f15a2-e684-47c3-83e1-2c125b586710" CreationDate="2022-11-02T09:25:35.293" UserId="3255" Text="I can't open a HRMP channel between the parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="21664" PostHistoryTypeId="3" PostId="5654" RevisionGUID="791f15a2-e684-47c3-83e1-2c125b586710" CreationDate="2022-11-02T09:25:35.293" UserId="3255" Text="|polkadot-js|parachain|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21665" PostHistoryTypeId="2" PostId="5655" RevisionGUID="2cc3e168-fcde-413e-8fab-9458075cada0" CreationDate="2022-11-02T09:35:27.703" UserId="251" Text="The sudo tab will show up only when you have the sudo key in your wallet.&#xD;&#xA;&#xD;&#xA;The governance tab will show up only when the runtime have pallet-democracy." ContentLicense="CC BY-SA 4.0" />
  <row Id="21667" PostHistoryTypeId="2" PostId="5656" RevisionGUID="9bbb0ed8-c10a-45c0-8988-839f4c95bc34" CreationDate="2022-11-02T09:35:54.570" UserId="2762" Text="If you are running a local substrate node you must specify the local address to connect to it, if you haven't change anything in your node should be `ws://127.0.0.1:9944`&#xD;&#xA;&#xD;&#xA;A code example in your front-end code to test it: &#xD;&#xA;&#xD;&#xA;    const provider = new WsProvider(&quot;ws://127.0.0.1:9944&quot;);&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const chain = await api.rpc.system.chain();&#xD;&#xA;    console.log(`----- Chain: ${chain} -----`)" ContentLicense="CC BY-SA 4.0" />
  <row Id="21669" PostHistoryTypeId="2" PostId="5657" RevisionGUID="65810462-914a-49b3-a17c-8729533a65f7" CreationDate="2022-11-02T09:57:05.930" UserId="1795" Text="Currently there does not seem to be an easy way to query the content of multiple blocks in the same RPC operation, I guess for spam protection reasons?&#xD;&#xA;&#xD;&#xA;What is then the best way to know how many concurrent requests can be fired to an RPC node from a client, and why is there no RPC to allow for more than a single block to be fetched? Not knowing the former means that if too many requests are fired, the node responds by closing the connection to the client, which is not desirable.&#xD;&#xA;&#xD;&#xA;I am thinking to something like `api.rpc.chain.getBlocks([hash_1, hash_2, hash_3])`" ContentLicense="CC BY-SA 4.0" />
  <row Id="21671" PostHistoryTypeId="1" PostId="5657" RevisionGUID="65810462-914a-49b3-a17c-8729533a65f7" CreationDate="2022-11-02T09:57:05.930" UserId="1795" Text="Best way to query multiple blocks via chain RPC endpoint?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21672" PostHistoryTypeId="3" PostId="5657" RevisionGUID="65810462-914a-49b3-a17c-8729533a65f7" CreationDate="2022-11-02T09:57:05.930" UserId="1795" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21673" PostHistoryTypeId="2" PostId="5658" RevisionGUID="f4ad0ea1-e727-4e37-b817-659828436354" CreationDate="2022-11-02T09:57:49.637" UserId="2762" Text="&gt; Since this tutorial is for example purposes, both parachains should&#xD;&#xA;&gt; have the sudo pallet configured. In a production chain this would be&#xD;&#xA;&gt; substituted with governance.&#xD;&#xA;&#xD;&#xA;If you followed the [Zombienet][1] tutorial to launch the parachains, make sure your chain has the sudo pallet and create the binaries again.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="21675" PostHistoryTypeId="2" PostId="5659" RevisionGUID="bf555ff8-b797-452d-b3d2-dbeff9813404" CreationDate="2022-11-02T09:59:44.040" UserId="1959" Text="First, check if your runtime has a sudo pallet(like [this line](https://github.com/darwinia-network/darwinia-parachain/blob/main/runtime/crab-parachain/src/lib.rs#L170)), if not, refer to this answer https://substrate.stackexchange.com/a/3203/1959 to introduce it.&#xD;&#xA;&#xD;&#xA;And then, as xavier said, make sure the sudo key(like [this line](https://github.com/darwinia-network/darwinia-parachain/blob/main/src/chain_spec/crab_parachain.rs#L121)) in your wallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="21677" PostHistoryTypeId="2" PostId="5660" RevisionGUID="49ef40b0-ba4b-4dcb-b433-7e1a251e8b1c" CreationDate="2022-11-02T10:18:24.937" UserId="94" Text="Depends on what node you have. For a local node you can send as many requests as you want.  &#xD;&#xA;There are some additional flags like `--rpc-max-request-size` and `--rpc-max-response-size` that can be tweaked.  &#xD;&#xA;Keep in mind that an RPC node is not a database server. It is primarily a blockchain node which follows consensus. That it exposes RPC is more of a curtesy. If you want to query massive amounts of data; use an indexer which exposes proper DB operations.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Some naive JS implementation could use `Promise.all` to batch requests:  &#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const wsProvider = new WsProvider('ws://localhost:9944');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;// Load the last block number:&#xD;&#xA;const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;var last_number = lastHeader.number.toBigInt();&#xD;&#xA;console.log(`Last block number: ${last_number}`);&#xD;&#xA;&#xD;&#xA;// Load all past blocks in batches of 10.&#xD;&#xA;var total_blocks = 0;&#xD;&#xA;for (;last_number &gt; 0;) {&#xD;&#xA;	var promises = [];&#xD;&#xA;	for (var i = 0; i &lt; 10 &amp;&amp; last_number &gt; 0; i++) {&#xD;&#xA;		promises.push(api.rpc.chain.getBlockHash(last_number).then((hash) =&gt; &#xD;&#xA;			api.rpc.chain.getBlock(hash)&#xD;&#xA;		));&#xD;&#xA;		last_number--;&#xD;&#xA;	}&#xD;&#xA;	var blocks = await Promise.all(promises);&#xD;&#xA;	total_blocks += blocks.length;&#xD;&#xA;	console.log(`Loaded ${blocks.length} more blocks, ${total_blocks} in total`);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;If you do this with a non-archive node you will probably end up with a [`State already discarded`](https://substrate.stackexchange.com/questions/4769) error after 256 blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="21679" PostHistoryTypeId="2" PostId="5661" RevisionGUID="aa8b752c-4577-453e-8e25-27ea0fc3e1c6" CreationDate="2022-11-02T10:26:14.410" UserId="2025" Text="To complete Oliver's answer, the required functionality is already available on [API Sidecar](https://github.com/paritytech/substrate-api-sidecar/) with the endpoint `GET /blocks?range=0-499`. You can query a max of 500 blocks at a time by specifying the initial and the final height to query at." ContentLicense="CC BY-SA 4.0" />
  <row Id="21681" PostHistoryTypeId="5" PostId="5646" RevisionGUID="3fd0552b-3f58-47b5-a16e-3fb61d90fb49" CreationDate="2022-11-02T10:36:49.097" UserId="100" Comment="deleted 5 characters in body" Text="The wasm argument represents the actual contract code that will run on-chain.&#xD;&#xA;&#xD;&#xA;After building your contract you get 3 files:&#xD;&#xA;- metadata.json&#xD;&#xA;- a wasm file&#xD;&#xA;- a `.contract` file that contains both the metadata and Wasm blob&#xD;&#xA;&#xD;&#xA;The `.contract` file is valid JSON and can be parsed as such. &#xD;&#xA;You would then access the wasm code like so: &#xD;&#xA;`json.source.wasm`&#xD;&#xA;&#xD;&#xA;Check Contracts UI for a possible implementation https://github.com/paritytech/contracts-ui&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21682" PostHistoryTypeId="2" PostId="5662" RevisionGUID="88384e9b-8647-45f4-87d8-191fc8f660b4" CreationDate="2022-11-02T11:11:09.577" UserId="3383" Text="I am using &#xD;&#xA;&#xD;&#xA;github.com/centrifuge/go-substrate-rpc-client&#xD;&#xA;&#xD;&#xA;And able to get list of events from each block and also able to filter it out but is there a way to identify which contract triggered the event. " ContentLicense="CC BY-SA 4.0" />
  <row Id="21684" PostHistoryTypeId="1" PostId="5662" RevisionGUID="88384e9b-8647-45f4-87d8-191fc8f660b4" CreationDate="2022-11-02T11:11:09.577" UserId="3383" Text="How to get the contract address for a events" ContentLicense="CC BY-SA 4.0" />
  <row Id="21685" PostHistoryTypeId="3" PostId="5662" RevisionGUID="88384e9b-8647-45f4-87d8-191fc8f660b4" CreationDate="2022-11-02T11:11:09.577" UserId="3383" Text="|rust|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21686" PostHistoryTypeId="2" PostId="5663" RevisionGUID="ad5e860a-e085-4cf5-9112-7952be5b4839" CreationDate="2022-11-02T11:28:33.370" UserId="3319" Text="i have an asynchronous task that i need to execute but it appears that substrate node already has a runtime for doing that, if i simply make main function in `node/main.rs` asynchronous like this:&#xD;&#xA;&#xD;&#xA;    #[tokio::main]&#xD;&#xA;    async fn main() -&gt; Result&lt;(),sc_cli::Error&gt;{ &#xD;&#xA;        tokio::spawn(myasyncFunction);&#xD;&#xA;        command::run()&#xD;&#xA;    }&#xD;&#xA;it gives me this error: &#xD;&#xA;&#xD;&#xA;    Thread 'main' panicked at 'Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks&#xD;&#xA;&#xD;&#xA;can someone explain to me the error and what is the right place to add my async tasks in node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21688" PostHistoryTypeId="1" PostId="5663" RevisionGUID="ad5e860a-e085-4cf5-9112-7952be5b4839" CreationDate="2022-11-02T11:28:33.370" UserId="3319" Text="how to run an asynchronous task in node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21689" PostHistoryTypeId="3" PostId="5663" RevisionGUID="ad5e860a-e085-4cf5-9112-7952be5b4839" CreationDate="2022-11-02T11:28:33.370" UserId="3319" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21690" PostHistoryTypeId="5" PostId="5446" RevisionGUID="9f441ada-3ae0-43ea-b6ca-18ac02f82088" CreationDate="2022-11-02T11:44:44.023" UserId="1959" Comment="Suggest to deposit the surplus into the sovereign account." Text="&gt; Feel free to update/modify this if you see something that can be improved upon&#xD;&#xA;&#xD;&#xA;# Opening HRMP channels between parachains&#xD;&#xA;&#xD;&#xA;&gt; If you are new to XCM, read the following:&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-the-cross-consensus-message-format&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-part-two-versioning-and-compatibility&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-part-three-execution-and-error-management&#xD;&#xA;&gt; - https://github.com/paritytech/xcm-format&#xD;&#xA;&#xD;&#xA;Here is the setup for this tutorial:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/RoUeZ.png)&#xD;&#xA;&#xD;&#xA;You will need the following:&#xD;&#xA;- rococo-local relay chain&#xD;&#xA;- parachain with paraId 1001&#xD;&#xA;- parachain with paraId 1002&#xD;&#xA;&gt; You can read up more on how to set up a test network here:&#xD;&#xA;&gt; - https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet&#xD;&#xA;&#xD;&#xA;Since this tutorial is for example purposes, both parachains should have the sudo pallet configured. In a production chain this would be substituted with governance.&#xD;&#xA;&#xD;&#xA;## What is HRMP (also known as XCMP-Lite)?&#xD;&#xA;&#xD;&#xA;Here is an excerpt from the Polkadot Wiki:&#xD;&#xA;&#xD;&#xA;&gt; While XCMP is still being implemented, a stop-gap&#xD;&#xA;&gt; protocol (see definition below) known as Horizontal Relay-routed&#xD;&#xA;&gt; Message Passing (HRMP) exists in its place. HRMP has the same&#xD;&#xA;&gt; interface and functionality as XCMP but is much more demanding on&#xD;&#xA;&gt; resources since it stores all messages in the Relay Chain storage.&#xD;&#xA;&gt; When XCMP has been implemented, HRMP is planned to be deprecated and&#xD;&#xA;&gt; phased out in favor of it.&#xD;&#xA;&#xD;&#xA;Source:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-xcm#hrmp-xcmp-lite&#xD;&#xA;&#xD;&#xA;**HRMP channels are unidirectional**&#xD;&#xA;&#xD;&#xA;The parachain that wants to open an HRMP channel must make a request to the parachain it wishes to have an open channel with. Once that is done, the other parachain needs to accept this request. This is what we mean by unidirectional flow. For bidirectional communication we need to open another channel in the opposite direction.&#xD;&#xA;&#xD;&#xA;A channel can be opened only after the recipient confirms it and only on a session change.&#xD;&#xA;&#xD;&#xA;So in recap, for this tutorial, the idea is that we want a bidirectional channel between parachain 1001 and parachain 1002 so that they can exchange XCM's.&#xD;&#xA;&#xD;&#xA;## Create an HRMP open channel request&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. First we need to create an [`hrmpInitOpenChannel`](https://github.com/paritytech/polkadot/blob/efcaa57d5f9d72c1c3fa79dcd929da9cced3af74/runtime/parachains/src/hrmp.rs#L451-L462) call. **Do not submit the call**, instead copy the encoded call data for later use:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Yvakr.png)&#xD;&#xA;&#xD;&#xA;- `proposed_max_capacity` - specifies how many messages can be in the channel at once.&#xD;&#xA;- `proposed_max_message_size` - specifies the maximum size of the messages.&#xD;&#xA;&#xD;&#xA;These numbers are a subject to the relay chain's configuration limits.&#xD;&#xA;&#xD;&#xA;You can find this in the relay chain's active configuration:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/fHgdV.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Fund the parachain's sovereign account&#xD;&#xA;&#xD;&#xA;The next step will be to create and submit an XCM on parachain 1001 with our encoded call data from above, but before we can do this we need to make sure parachain 1001's sovereign account on the relay chain is funded so it can take care of any XCM transact fees.&#xD;&#xA;&#xD;&#xA;Let's add parachain 1001's sovereign account to our address book.&#xD;&#xA;&#xD;&#xA;On the relay chain, open the address book and add the following contact:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Svqpy.png)&#xD;&#xA;&#xD;&#xA;&gt; If you're unsure as to how to calculate the parachain's sovereign account checkout this post:&#xD;&#xA;&gt; - https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain&#xD;&#xA;&gt; ![](https://i.stack.imgur.com/yoDMV.png)&#xD;&#xA;&gt; &#xD;&#xA;&gt; Note that if the parachain's `paraId` changes, then sovereign account will also change. Therefore, as a rule-of-thumb, avoid hard coding the parachain's sovereign account.&#xD;&#xA;&#xD;&#xA;We can now transfer some tokens from Alice to the sovereign account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/XHrwT.png)&#xD;&#xA;&#xD;&#xA;And the account is now funded!&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/KP7wQ.png)&#xD;&#xA;&#xD;&#xA;## Create the XCM to initiate the open channel request&#xD;&#xA;&#xD;&#xA;We can now create the XCM on parachain 1001:&#xD;&#xA;&#xD;&#xA;&gt; A few things to note. &#xD;&#xA;&gt; - Below you will see we use `sudo`, in the real-world this would be done via governance.&#xD;&#xA;&gt; - Always check what the XCM configuration is for the relay chain you are working with. The numbers below are for example purposes.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/P9gHr.png)&#xD;&#xA;![](https://i.stack.imgur.com/Jxt40.png)&#xD;&#xA;![](https://i.stack.imgur.com/Vxz1r.png)&#xD;&#xA;![](https://i.stack.imgur.com/B4qqq.png)&#xD;&#xA;![](https://i.stack.imgur.com/4dYO4.png)&#xD;&#xA;![](https://i.stack.imgur.com/9u1gb.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Notice the encoded call that we created in the beginning of this tutorial is now used in the `Transact`.&#xD;&#xA;&#xD;&#xA;In the above call, we are executing a few instructions:&#xD;&#xA;- [`WithdrawAsset`](https://github.com/paritytech/xcm-format#withdrawasset) - Removes the on-chain asset(s) and accrue them into the XCVM Holding Register. More info [here](https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-the-holding-register).&#xD;&#xA;- [`BuyExecution`](https://github.com/paritytech/xcm-format#buyexecution) - Pays for the execution of the current message using the asset(s) that were deposited in the XCVM Holding Register from our previous `WithdrawAsset` instruction. More info [here](https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-fee-payment-in-xcm).&#xD;&#xA;- [`RefundSurplus`](https://github.com/paritytech/xcm-format#refundsurplus) - Increases Refunded Weight Register to the value of Surplus Weight Register. Attempts to accrue fees previously paid via `BuyExecution` into the XCVM Holding Register for the amount that Refunded Weight Register is increased.&#xD;&#xA;- [`DepositAsset`](https://github.com/paritytech/xcm-format#depositasset) - Subtracts the asset(s) from the XCVM Holding Register and deposits on-chain equivalent assets under the ownership of the beneficiary. The operands are:&#xD;&#xA;    - assets: The asset(s) to remove from the Holding Register.&#xD;&#xA;    - max_assets: The maximum number of unique assets/asset instances to remove from the Holding Register. Only the first max_assets assets/instances of those matched by assets will be removed, prioritized under standard asset ordering. Any others will remain in holding.&#xD;&#xA;    - beneficiary: The new owner for the assets.&#xD;&#xA;&#xD;&#xA;Notice that with `DepositAsset` we are specifying an account where the surplus will go. In this example we have used Eve's account. *In general, we can use the sovereign account of our sender chain(here is `{0, X1(Parachain(1001))}`), so that we can use the surplus tokens to open the next HRMP channel.*&#xD;&#xA;&#xD;&#xA;Read more on how `RefundSurplus` and `DepositAsset` work here:&#xD;&#xA;- https://polkadot.network/blog/xcm-part-three-execution-and-error-management/#-weight&#xD;&#xA;&#xD;&#xA;The first part of this call is the destination - where we want to send the XCM to be executed. In our case we are saying `parent: 1` - the parent of parachain 1001 is the relay chain and in the context of the `parent` we are specifying an `interior: Here` meaning that we want the relay chain to execute the XCM. This is all done by using `MultiLocation`. If you're not familiar with `MultiLocation` then read up here:&#xD;&#xA;- https://github.com/paritytech/xcm-format#7-universal-consensus-location-identifiers&#xD;&#xA;&#xD;&#xA;Additionally, the actual XCM instructions themselves e.g. `WithdrawAsset`, `BuyExecution`, etc. also use `MultiLocation`. In this case the `MultiLocation` is in respect to the system that will be executing the XCM message:&#xD;&#xA;&#xD;&#xA;&gt; Throughout XCM, messages are authored such that when interpreted from the receiver's point of view they will have the desired meaning/effect. This means that relative paths should always by constructed to be read from the point of view of the receiving system, which may have a completely different meaning in the authoring system.&#xD;&#xA;&#xD;&#xA;More info here:&#xD;&#xA;- https://github.com/paritytech/xcm-format#concrete-identifiers&#xD;&#xA;&#xD;&#xA;As far as the amount that is needed to withdraw to cover execution, this is something that you will need to calculate ahead of time. More info can be found here:&#xD;&#xA;- https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-fee-payment-in-xcm&#xD;&#xA;&#xD;&#xA;And a nice StackExchange write up from a community member on weights and paying for execution here:&#xD;&#xA;- https://substrate.stackexchange.com/a/5430/29&#xD;&#xA;&#xD;&#xA;So in summary, we are going to withdraw some amount from the parachain sovereign account to the XCVM Holding Register. Use the amount in there to &quot;buy&quot; execution time for our XCM `Transact` instruction. Execute the `Transact`. And whatever amount is left over (determined by `RefundSurplus` ) is deposited into an account we specify by using the `DepositAsset` instruction.&#xD;&#xA;&#xD;&#xA;Before submitting this call, let's open the parachain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/egbma.png)&#xD;&#xA;&#xD;&#xA;Also, open the relay chain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/3LFor.png)&#xD;&#xA;&#xD;&#xA;You can now submit the XCM extrinsic and you will see the events.&#xD;&#xA;&#xD;&#xA;First you will see the events in the parachain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Mg7zj.png)&#xD;&#xA;&#xD;&#xA;Then you will see the events in the relay chain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/1HjTD.png)&#xD;&#xA;&#xD;&#xA;Success!&#xD;&#xA;&#xD;&#xA;But let's double check. Check the chain state on the relay chain to see if there is now an HRMP open channel request from parachain 1001 to parachain 1002:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/P0WNR.png)&#xD;&#xA;&#xD;&#xA;You can also check here:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/CNtJm.png)&#xD;&#xA;&#xD;&#xA;And note that some amount has been deducted from the sovereign account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/gXIZ8.png)&#xD;&#xA;&#xD;&#xA;The surplus has gone to Eve's account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Vnx77.png)&#xD;&#xA;&#xD;&#xA;Their balance went from 1,000,000,000,000,000,000 to 1,000,000,885,011,945,986!&#xD;&#xA;&#xD;&#xA;Awesome!&#xD;&#xA;&#xD;&#xA;We have succeeded in creating an HRMP open channel request. The next step is for parachain 1002 to accept the request.&#xD;&#xA;&#xD;&#xA;## Accept the HRMP open channel request&#xD;&#xA;&#xD;&#xA;On the relay chain create the following call:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/0slRE.png)&#xD;&#xA;&#xD;&#xA;Copy the encoded call data for later use in our XCM.&#xD;&#xA;&#xD;&#xA;## Fund the parachain's sovereign account&#xD;&#xA;&#xD;&#xA;Make sure that parachain 1002's sovereign account is funded. &#xD;&#xA;&gt; You will have to repeat the process of adding and funding parachain 1002's sovereign account which was documented above for parachain 1001.&#xD;&#xA;&#xD;&#xA;## Create the XCM to accept the HRMP open channel request&#xD;&#xA;&#xD;&#xA;Now, create the XCM on parachain 1002:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/2BMAJ.png)&#xD;&#xA;![](https://i.stack.imgur.com/JhxsL.png)&#xD;&#xA;![](https://i.stack.imgur.com/4BQSG.png)&#xD;&#xA;![](https://i.stack.imgur.com/tvcbq.png)&#xD;&#xA;![](https://i.stack.imgur.com/qZwa9.png)&#xD;&#xA;&#xD;&#xA;Submit.&#xD;&#xA;&#xD;&#xA;Wait one epoch for the change to take place.&#xD;&#xA;&#xD;&#xA;You now have established a unidirectional HRMP channel between parachain 1001 and parachain 1002!&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/oD2T1.png)&#xD;&#xA;&#xD;&#xA;## Create an HRMP channel from parachain 1002 to parachain 1001&#xD;&#xA;&#xD;&#xA;And finally, we **repeat** the same process documented throughout this article but instead we do it from parachain 1002 to parachain 1001 and in doing so we will have succefully created a **bidirectional** HRMP channel.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21691" PostHistoryTypeId="24" PostId="5446" RevisionGUID="9f441ada-3ae0-43ea-b6ca-18ac02f82088" CreationDate="2022-11-02T11:44:44.023" Comment="Proposed by 1959 approved by 34 edit id of 329" ContentLicense="CC BY-SA 4.0" />
  <row Id="21692" PostHistoryTypeId="6" PostId="5662" RevisionGUID="f2a288ad-7067-4e6a-8a36-414125a7d13e" CreationDate="2022-11-02T11:47:03.190" UserId="34" Comment="edited tags" Text="|rpc|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21693" PostHistoryTypeId="2" PostId="5664" RevisionGUID="10837172-6e0a-4eff-9e24-e527f7233963" CreationDate="2022-11-02T11:53:00.783" UserId="2110" Text="We recently tried to remove `pallet-randomness-collective-flip` from our runtime. This pallet has been in our runtime since it was created as it was included in the `template-node-runtime`, but we never used its functionality. Our node binary still compiles and runs after we removed the pallet.&#xD;&#xA;&#xD;&#xA;But now when we submit an extrinsic we receive this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RPC call failed: ErrorObject { code: ServerError(1002), message: \&quot;Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\\nWASM backtrace:\\n\\n    0: 0x61c87 - &lt;unknown&gt;!rust_begin_unwind\\n    1: 0x136ee - &lt;unknown&gt;!core::panicking::panic_fmt::h8b1b9291c42fd987\\n    2: 0x1055a7 - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\\n\&quot;, data: Some(RawValue(\&quot;RuntimeApi(\\\&quot;Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\\\\nWASM backtrace:\\\\n\\\\n    0: 0x61c87 - &lt;unknown&gt;!rust_begin_unwind\\\\n    1: 0x136ee - &lt;unknown&gt;!core::panicking::panic_fmt::h8b1b9291c42fd987\\\\n    2: 0x1055a7 - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\\\\n\\\&quot;)\&quot;)) }.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We are using the `monthly-2022-06` pre-release of substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="21695" PostHistoryTypeId="1" PostId="5664" RevisionGUID="10837172-6e0a-4eff-9e24-e527f7233963" CreationDate="2022-11-02T11:53:00.783" UserId="2110" Text="Removing randomness-collective-flip pallet from runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="21696" PostHistoryTypeId="3" PostId="5664" RevisionGUID="10837172-6e0a-4eff-9e24-e527f7233963" CreationDate="2022-11-02T11:53:00.783" UserId="2110" Text="|extrinsic|rpc|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21697" PostHistoryTypeId="33" PostId="5569" RevisionGUID="eb773134-2ade-43ca-b439-a32fc43fde44" CreationDate="2022-11-02T12:05:23.663" UserId="3" Comment="14" />
  <row Id="21698" PostHistoryTypeId="5" PostId="5569" RevisionGUID="a7f8c740-f51e-496d-97a4-c6f856e2be3a" CreationDate="2022-11-02T12:09:34.297" UserId="3" Comment="added 4 characters in body" Text="Using `pallet-proxy`, you can execute the following sequence of calls:&#xD;&#xA;&#xD;&#xA;- Create a new pure proxy account using `anonymous`. Let's say this reserves 10 DEV on your main account.&#xD;&#xA;- (Optional) Call some function which reserves 15 DEV on the newly created anonymous account.&#xD;&#xA;- Call `remove_proxy` from the anonymous account.&#xD;&#xA;&#xD;&#xA;The result is: You lose control over the anonymous account (obviously), but the funds that you reserved for creating the account remain reserved because instead of being unreserved on _your_ account, they are unreserved on anonymous account, leaving the anonymous account with 10 free and 5 reserved DEV, which might confuse whoever reserved those 15 DEV in step 2.&#xD;&#xA;&#xD;&#xA;Judging by [this comment](https://github.com/paritytech/substrate/blob/37cca710eed3dadd4ed5364c7686608f5175cce1/frame/proxy/src/lib.rs#L270-L271), this is (sort-of) intended behavior. Why?&#xD;&#xA;&#xD;&#xA;Sure, you can probably burn money in more creative ways, but why doesn't `pallet-proxy` manage anonymous accounts and conventional proxies separately to prevent this strange interaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21699" PostHistoryTypeId="2" PostId="5665" RevisionGUID="e8f06c33-de82-4916-9510-e21cd63611f1" CreationDate="2022-11-02T12:14:39.047" UserId="2898" Text="I am looking into rosetta-api for substrate. I have two questions regarding one of its endpoint `construction/metadata`&#xD;&#xA; - Does substrate maintain an `account_sequence` number somewhere? where&#xD;&#xA;   can I find it?&#xD;&#xA; - How can I calculate `suggested fee`. I guess the idea is max generated fee where acc balance should be more than that.&#xD;&#xA;&#xD;&#xA;[Reference](https://www.rosetta-api.org/docs/ConstructionApi.html#constructionmetadata)" ContentLicense="CC BY-SA 4.0" />
  <row Id="21701" PostHistoryTypeId="1" PostId="5665" RevisionGUID="e8f06c33-de82-4916-9510-e21cd63611f1" CreationDate="2022-11-02T12:14:39.047" UserId="2898" Text="account_sequence and suggested_fee in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="21702" PostHistoryTypeId="3" PostId="5665" RevisionGUID="e8f06c33-de82-4916-9510-e21cd63611f1" CreationDate="2022-11-02T12:14:39.047" UserId="2898" Text="|runtime|account|accountdata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21708" PostHistoryTypeId="2" PostId="5667" RevisionGUID="6a06f85e-1e43-4e7a-b013-9b40b6eaeb95" CreationDate="2022-11-02T12:50:44.703" UserId="2025" Text="If for account sequence you mean the nonce of the account (number of outgoing transactions from the account), it is stored in the system account info together with other account data like free and reserved balances. You can query it via [the `rpc.system.accountNextIndex` RPC method](https://polkadot.js.org/docs/substrate/rpc#accountnextindexaccountid-accountid-index).&#xD;&#xA;&#xD;&#xA;More interestingly, you can achieve both of your points with [API Sidecar](https://github.com/paritytech/substrate-api-sidecar), which by the way, Rosetta based its implementation on:&#xD;&#xA;&#xD;&#xA; - For the nonce (account sequence) and the rest of the account info, you can use the `GET accounts/{account-id}/balance-info` endpoint.&#xD;&#xA; - For the suggested fee, you can use the `POST transaction/fee-estimate` endpoint with the transaction payload as the request body.&#xD;&#xA;&#xD;&#xA;[Here you have](https://paritytech.github.io/substrate-api-sidecar/dist/) a complete list of endpoints for API Sidecar." ContentLicense="CC BY-SA 4.0" />
  <row Id="21710" PostHistoryTypeId="2" PostId="5668" RevisionGUID="7efe21e4-8eb8-45c2-aaa4-0a99a0f7657b" CreationDate="2022-11-02T13:06:18.467" UserId="2884" Text="For anyone wondering how to do it in rust for use in the Runtime: You can use the method ```.iter()``` of StorageMap combined with the itertools method ```.collect_vec()```.&#xD;&#xA;&#xD;&#xA;So for example if you wish to get all accounts that hold balance in frame_system::Account, you would do as following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use itertools::Itertools // imports .collect_vec()&#xD;&#xA;let balances_tuples = frame_system::Account::&lt;ParaRuntime&gt;::iter().collect_vec();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="21716" PostHistoryTypeId="2" PostId="5670" RevisionGUID="dcd533b1-0889-405e-86a4-8a8359109e61" CreationDate="2022-11-02T14:42:50.173" UserId="34" Text="Given a relay chain block, is there some way to construct a proving system for any connected parachain's state at that relay block?&#xD;&#xA;&#xD;&#xA;I imaging there _could_ be some information persisted on the relay that a(n archive) parachain node could be instructed to generate something like a vector commitment that anyone could verify out of band.&#xD;&#xA;&#xD;&#xA;Meaning you could that a relay block + that commitment to verify a specific part of state for a parachain at that time.&#xD;&#xA;&#xD;&#xA;Specifically a  [Substrate Devs](https://matrix.to/#/#substratedevs:matrix.org) chat member asked a [question](https://matrix.to/#/!qVNPvUpmVkuNjHcYVQ:matrix.org/$hJ9kMWpz3_Uc9PYVw1IaGIVcBGrRTfl8SEWrBP708U0?via=matrix.parity.io&amp;via=t2bot.io&amp;via=matrix.org) related to verifying state across parachains (on the same relay) is why I am asking here." ContentLicense="CC BY-SA 4.0" />
  <row Id="21718" PostHistoryTypeId="1" PostId="5670" RevisionGUID="dcd533b1-0889-405e-86a4-8a8359109e61" CreationDate="2022-11-02T14:42:50.173" UserId="34" Text="Is there a way to verify existence of some state on a sibling parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21719" PostHistoryTypeId="3" PostId="5670" RevisionGUID="dcd533b1-0889-405e-86a4-8a8359109e61" CreationDate="2022-11-02T14:42:50.173" UserId="34" Text="|parachain|relay-chain|state|proof-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21720" PostHistoryTypeId="2" PostId="5671" RevisionGUID="debdca16-451b-499a-9b7f-1c3f8f1ab3b8" CreationDate="2022-11-02T15:29:43.573" UserId="73" Text="When using Cumulus for building your runtime, the head data of your parachain stored in the relay chain state corresponds to the header of your parachain. The header of the parachain contains the storage root. With the storage root you can proof a certain storage value being present in the state of the parachain.&#xD;&#xA;&#xD;&#xA;So, yes you can build a proof system that based on a relay chain block can proof some storage value in the parachain state. " ContentLicense="CC BY-SA 4.0" />
  <row Id="21723" PostHistoryTypeId="2" PostId="5672" RevisionGUID="16205f72-c536-404f-a0a7-2b9a5ffbb876" CreationDate="2022-11-02T17:23:39.220" UserId="3255" Text="I wanted to purge all chains, a relay chain with 3 validators and 2 parachain with 1 collator per each, so that removed all of their DB folders by using &quot;rm -rf&quot; command.&#xD;&#xA;E.g ;&#xD;&#xA;&quot;rm -rf /tmp/parachain&quot;,&#xD;&#xA;&quot;rm -rf /tmp/relay&quot;,&#xD;&#xA;&quot;rm -rf /tmp/relay-bob&quot;,&#xD;&#xA;&quot;rm -rf /tmp/relay-charlie&quot;&#xD;&#xA;&#xD;&#xA;But when I re-ran the validators, I could see the chain state was not initialized yet.&#xD;&#xA;Why it happened?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21725" PostHistoryTypeId="1" PostId="5672" RevisionGUID="16205f72-c536-404f-a0a7-2b9a5ffbb876" CreationDate="2022-11-02T17:23:39.220" UserId="3255" Text="I can't purge all chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="21726" PostHistoryTypeId="3" PostId="5672" RevisionGUID="16205f72-c536-404f-a0a7-2b9a5ffbb876" CreationDate="2022-11-02T17:23:39.220" UserId="3255" Text="|parachain|validator|relay-chain|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21727" PostHistoryTypeId="2" PostId="5673" RevisionGUID="a9e4cab6-affe-4e9e-bc56-5db23a4a5a68" CreationDate="2022-11-02T18:05:59.983" UserId="2834" Text="Is it possible to configure a full node to remember a list of last peers it connected to so when it restarts it doesn't need to rely on boot nodes to connect successfully to the chain network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21729" PostHistoryTypeId="1" PostId="5673" RevisionGUID="a9e4cab6-affe-4e9e-bc56-5db23a4a5a68" CreationDate="2022-11-02T18:05:59.983" UserId="2834" Text="Can a node reconnect to a network without boot nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="21730" PostHistoryTypeId="3" PostId="5673" RevisionGUID="a9e4cab6-affe-4e9e-bc56-5db23a4a5a68" CreationDate="2022-11-02T18:05:59.983" UserId="2834" Text="|networking|peers|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21731" PostHistoryTypeId="5" PostId="5654" RevisionGUID="01d4bc85-ae10-4d6f-b4fa-ec9df1e19478" CreationDate="2022-11-02T18:10:23.357" UserId="3255" Comment="added 262 characters in body" Text="I am testing XCM between parachain 2000 and parachain 2001 while referencing this link, https://substrate.stackexchange.com/questions/5445/how-to-open-hrmp-channels-between-parachains.&#xD;&#xA;But I couldn't open a new HRMP channel, I faced the &quot;Barrier&quot; error.&#xD;&#xA;&#xD;&#xA;It seems I should use Sudo or Governance as you said, but I could find neither of them in the &quot;Developer&quot; tag on the Polkadot.JS App.&#xD;&#xA;&#xD;&#xA;So I added Sudo option as referencing the link - https://github.com/paritytech/polkadot/commit/791c8b8f9e6fe00b631f2cace0d6d65151487eb4.&#xD;&#xA;But after clicking the &quot;Entrinsic-&gt;Sudo-&gt;sudo(call)&quot; button, the Polkadot-js App crashed.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zeYIJ.png&#xD;&#xA;&#xD;&#xA;What am I missing now?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21732" PostHistoryTypeId="5" PostId="5654" RevisionGUID="daf1a4af-6b6c-4314-8349-7e1fb25ab2ba" CreationDate="2022-11-02T18:15:24.667" UserId="3255" Comment="added 262 characters in body" Text="I am testing XCM between parachain 2000 and parachain 2001 while referencing this link, https://substrate.stackexchange.com/questions/5445/how-to-open-hrmp-channels-between-parachains.&#xD;&#xA;But I couldn't open a new HRMP channel, I faced the &quot;Barrier&quot; error.&#xD;&#xA;&#xD;&#xA;It seems I should use Sudo or Governance as you said, but I could find neither of them in the &quot;Developer&quot; tag on the Polkadot.JS App.&#xD;&#xA;&#xD;&#xA;So I added Sudo option as referencing the link - https://github.com/paritytech/polkadot/commit/791c8b8f9e6fe00b631f2cace0d6d65151487eb4.&#xD;&#xA;But after clicking the &quot;Extrinsics-&gt;Sudo-&gt;sudo(call)&quot; button, the Polkadot-js App crashed.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zeYIJ.png&#xD;&#xA;&#xD;&#xA;What am I missing now?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21733" PostHistoryTypeId="2" PostId="5674" RevisionGUID="979ffb4a-170a-4a3a-8e83-bfaa15e048f5" CreationDate="2022-11-02T23:24:07.240" UserId="318" Text="The order of building genesis is the same as the declaration order in construct_runtime. I don't think you can change that without touching construct_runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="21735" PostHistoryTypeId="5" PostId="5672" RevisionGUID="8c3bd4a2-86ae-424a-bc58-7c04c36bdee2" CreationDate="2022-11-03T02:10:42.330" UserId="251" Comment="added 1 character in body" Text="I wanted to purge all chains, a relay chain with 3 validators and 2 parachains with 1 collator per each, so I removed all of their DB folders by using `rm -rf` command.&#xD;&#xA;E.g ;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;rm -rf /tmp/parachain&#xD;&#xA;rm -rf /tmp/relay&#xD;&#xA;rm -rf /tmp/relay-bob&#xD;&#xA;rm -rf /tmp/relay-charlie&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I re-ran the validators, I could see the chain state was not initialized yet.&#xD;&#xA;Why did it happen?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21736" PostHistoryTypeId="2" PostId="5675" RevisionGUID="2a2b8a66-1226-4f07-a097-88656849ea5e" CreationDate="2022-11-03T02:27:08.850" UserId="251" Text="How did you purge the DB?&#xD;&#xA;&#xD;&#xA;Did you stop all nodes before the purge?&#xD;&#xA;&#xD;&#xA;I guess you:&#xD;&#xA;1. stop relay&#xD;&#xA;2. purge relay&#xD;&#xA;3. restart relay (it will sync the data from the running chain)&#xD;&#xA;4. stop relay-bob&#xD;&#xA;5. purge relay-bob&#xD;&#xA;6. restart relay-bob (it will sync the data from the running chain)" ContentLicense="CC BY-SA 4.0" />
  <row Id="21740" PostHistoryTypeId="2" PostId="5677" RevisionGUID="c412b565-eb14-4ead-b8a6-244805a29138" CreationDate="2022-11-03T04:51:29.243" UserId="521" Text="An example of splitting large transactions between several blocks can be found in [crowdloan.refund][1]. The basic idea is that you define a limit `L` of items that can be processed at once based on the weights of a single operation. Then you only allow to process up to `L` items in a single transaction.  Above mentioned pallet also emits events for partial/full refunds to allow clients to see whether the process is finished completely or not&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/d6fad72d620e63f34935c16a49c91fb5fc7d0d4c/runtime/common/src/crowdloan/mod.rs#L507" ContentLicense="CC BY-SA 4.0" />
  <row Id="21742" PostHistoryTypeId="2" PostId="5678" RevisionGUID="7e2a4ddc-96e7-4583-8a7d-70559c2c1c13" CreationDate="2022-11-03T08:32:35.653" UserId="3080" Text="While compiling substrate recipes,I encounter the following error (error message copied below as well as the screen shot is attached. &#xD;&#xA;&#xD;&#xA;error: duplicate lang item in crate `std` (which `serde` depends on): `panic_impl`.&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `ocw_demo` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /home/kamran/Substrate/recipes/target/debug/wbuild/ocw-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ebd74ffdd043ce0a.rmeta&#xD;&#xA;&#xD;&#xA;    = note: second definition in `std` loaded from /home/kamran/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-a237209e92b55a70.rlib&#xD;&#xA;&#xD;&#xA;  error: duplicate lang item in crate `std` (which `serde` depends on): `oom`.&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `ocw_demo` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /home/kamran/Substrate/recipes/target/debug/wbuild/ocw-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ebd74ffdd043ce0a.rmeta&#xD;&#xA;&#xD;&#xA;    = note: second definition in `std` loaded from /home/kamran/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-a237209e92b55a70.rlib&#xD;&#xA;&#xD;&#xA;  error: could not compile `ocw-demo` due to 2 previous errors&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bVl3b.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21744" PostHistoryTypeId="1" PostId="5678" RevisionGUID="7e2a4ddc-96e7-4583-8a7d-70559c2c1c13" CreationDate="2022-11-03T08:32:35.653" UserId="3080" Text="Error while compiling substrate recipes" ContentLicense="CC BY-SA 4.0" />
  <row Id="21745" PostHistoryTypeId="3" PostId="5678" RevisionGUID="7e2a4ddc-96e7-4583-8a7d-70559c2c1c13" CreationDate="2022-11-03T08:32:35.653" UserId="3080" Text="|substrate-recipes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21746" PostHistoryTypeId="2" PostId="5679" RevisionGUID="cb3a0f9d-047a-4464-af81-8eff5962b57d" CreationDate="2022-11-03T08:57:15.273" UserId="2762" Text="The error is with the **serde** dependency.&#xD;&#xA;&#xD;&#xA;    error: duplicate lang item in crate `std` (which `serde` depends on)&#xD;&#xA;This is a dependency that does have no-std support but can have std enabled by default.&#xD;&#xA;&#xD;&#xA;To fix it add `default-features = false`, in the Cargo.toml in the runtime:&#xD;&#xA;&#xD;&#xA;    serde = { version = '1.0', optional = true, default-features = false, features = ['derive'] }" ContentLicense="CC BY-SA 4.0" />
  <row Id="21748" PostHistoryTypeId="2" PostId="5680" RevisionGUID="d9be1992-d319-4202-851d-9b84b4d9463c" CreationDate="2022-11-03T11:01:43.983" UserId="2384" Text="Chain spec `primary_chain` is defined under `node/src/chain_spec.rs`&#xD;&#xA;&#xD;&#xA;**Steps to reproduce:**&#xD;&#xA;1) generate default chain spec for `primary_chain`&#xD;&#xA;```&#xD;&#xA;./collator build-spec --chain primary_chain &gt; spec.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 1. Edit `session.keys` array with updated sets of keys&#xD;&#xA; 2. Generate genesis-state for updated chain state&#xD;&#xA;```&#xD;&#xA;./collator export-genesis-state --chain spec.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Error:**&#xD;&#xA;```&#xD;&#xA;Error: thread 'main' panicked at 'Validator in session 1 missing keys!', /home/deployer/.cargo/git/checkouts/substrate-7e08433d4c370a21/fc3fd07/frame/session/src/lib.rs:487:52&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="21750" PostHistoryTypeId="1" PostId="5680" RevisionGUID="d9be1992-d319-4202-851d-9b84b4d9463c" CreationDate="2022-11-03T11:01:43.983" UserId="2384" Text="Change session keys in new chain spec" ContentLicense="CC BY-SA 4.0" />
  <row Id="21751" PostHistoryTypeId="3" PostId="5680" RevisionGUID="d9be1992-d319-4202-851d-9b84b4d9463c" CreationDate="2022-11-03T11:01:43.983" UserId="2384" Text="|nodes|chainspec|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21756" PostHistoryTypeId="2" PostId="5682" RevisionGUID="08c2ffcb-77bf-4de7-82ac-f80ecb7e4ac1" CreationDate="2022-11-03T11:41:04.003" UserId="539" Text="This is not currently implemented in Substrate however there is an open issue: https://github.com/paritytech/substrate/issues/4750" ContentLicense="CC BY-SA 4.0" />
  <row Id="21758" PostHistoryTypeId="2" PostId="5683" RevisionGUID="e5525e69-2292-4012-848b-7f0f548d5815" CreationDate="2022-11-03T11:41:30.930" UserId="251" Text="The easiest way is to modifier the [code](https://github.com/paritytech/substrate/blob/a88f75eb54414405ffa785072d38548793f0009e/bin/node/cli/src/chain_spec.rs#L90-L170), then re-generate the chain spec.&#xD;&#xA;&#xD;&#xA;If you modify the chain spec json file directly, you might need to update all the related pallets." ContentLicense="CC BY-SA 4.0" />
  <row Id="21760" PostHistoryTypeId="2" PostId="5684" RevisionGUID="e372a21e-24ad-4d11-99d2-14cc93658bb4" CreationDate="2022-11-03T13:19:24.673" UserId="479" Text="At the moment I try to figure out why PolkadotJS UI (https://polkadot.js.org/) is not able to show my custom RPC endpoints or runtime APIs. They are available in general and also available in the list of RPC methods but not shown under &quot;RPC calls&quot; or &quot;Runtime calls&quot;. I am able to call it from our custom UI via PolkdatJS lib. Has anyone an idea why they are not shown?&#xD;&#xA;&#xD;&#xA;Maybe important as additional information:&#xD;&#xA;&#xD;&#xA;1. All RuntimeAPIs are implemented and defined directly inside the runtime&#xD;&#xA;2. All RPC endpoints are defined in a separate single crate&#xD;&#xA;3. All traits have rust-doc comments&#xD;&#xA;&#xD;&#xA;Thanks for the help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="21762" PostHistoryTypeId="1" PostId="5684" RevisionGUID="e372a21e-24ad-4d11-99d2-14cc93658bb4" CreationDate="2022-11-03T13:19:24.673" UserId="479" Text="Show custom RPCs/RuntimeAPIs in PolkadotJS UI" ContentLicense="CC BY-SA 4.0" />
  <row Id="21763" PostHistoryTypeId="3" PostId="5684" RevisionGUID="e372a21e-24ad-4d11-99d2-14cc93658bb4" CreationDate="2022-11-03T13:19:24.673" UserId="479" Text="|polkadot-js|custom-rpc|runtime-api|ui|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21764" PostHistoryTypeId="2" PostId="5685" RevisionGUID="ecc50dbc-bd5f-41c7-8327-befd8b9be98e" CreationDate="2022-11-03T14:07:43.497" UserId="425" Text="I have a question regarding costs of executing a cross-contract call, in whuch one contract calls the method of another, already instantiated contract.&#xD;&#xA;&#xD;&#xA;Specifically how much more overhead (understood as gas costs) does the caller incur versus executing an inline instruction?&#xD;&#xA;&#xD;&#xA;Is it charged for reading the *entire* callee code from the storage (certainly looks like it)?&#xD;&#xA;&#xD;&#xA;Is there any caching - say I make two consecutive calls from A to B, will it double the fee?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21766" PostHistoryTypeId="1" PostId="5685" RevisionGUID="ecc50dbc-bd5f-41c7-8327-befd8b9be98e" CreationDate="2022-11-03T14:07:43.497" UserId="425" Text="Gas costs of performing cross-contract calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="21767" PostHistoryTypeId="3" PostId="5685" RevisionGUID="ecc50dbc-bd5f-41c7-8327-befd8b9be98e" CreationDate="2022-11-03T14:07:43.497" UserId="425" Text="|ink|pallet-contracts|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21768" PostHistoryTypeId="2" PostId="5686" RevisionGUID="af2a0a4b-e985-4071-bfe1-69bead44589f" CreationDate="2022-11-03T19:53:15.413" UserId="3002" Text="Is it possible to recover a parachain from a backup that is around ~500 blocks behind the head block known by the relay chain?&#xD;&#xA;&#xD;&#xA;In single-chains, this is usually not difficult when you control all the validators(collators), but in a multi-chain system, I suspect that it becomes a lot more complex.&#xD;&#xA;&#xD;&#xA;If this is possible, I would like to know how complex would it be. And if possible, the recovery steps.&#xD;&#xA;&#xD;&#xA;**More information:**&#xD;&#xA;&#xD;&#xA;The parachain is running the **BABE** algorithm and has a single collator." ContentLicense="CC BY-SA 4.0" />
  <row Id="21770" PostHistoryTypeId="1" PostId="5686" RevisionGUID="af2a0a4b-e985-4071-bfe1-69bead44589f" CreationDate="2022-11-03T19:53:15.413" UserId="3002" Text="Parachain recovery" ContentLicense="CC BY-SA 4.0" />
  <row Id="21771" PostHistoryTypeId="3" PostId="5686" RevisionGUID="af2a0a4b-e985-4071-bfe1-69bead44589f" CreationDate="2022-11-03T19:53:15.413" UserId="3002" Text="|parachain|relay-chain|collator|recovery|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21772" PostHistoryTypeId="2" PostId="5687" RevisionGUID="d38864d1-91dd-4b0a-b688-7473fb08d157" CreationDate="2022-11-03T22:14:42.717" UserId="3402" Text="I want to try and use Mapping with Sha2x256 or any other value that is large enough so that each of these will be unique.&#xD;&#xA;&#xD;&#xA;I want mapping to be like this:&#xD;&#xA;unique_ids: Mapping &lt;Sha2x256 ,u128&gt;&#xD;&#xA;&#xD;&#xA;Whenever I try to make Mapping &lt;String, u128&gt; I get an error &quot;contract doesn't have a size known at compile-time&quot;&#xD;&#xA;&#xD;&#xA;So I'm trying anything else that can act as an unique id and will not repeat itself. It can be Sha2x256, Blake2s256 etc.&#xD;&#xA;&#xD;&#xA;Does anyone have any advice?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21774" PostHistoryTypeId="1" PostId="5687" RevisionGUID="d38864d1-91dd-4b0a-b688-7473fb08d157" CreationDate="2022-11-03T22:14:42.717" UserId="3402" Text="How to use Mapping with Sha2x256 in ink smart contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="21775" PostHistoryTypeId="3" PostId="5687" RevisionGUID="d38864d1-91dd-4b0a-b688-7473fb08d157" CreationDate="2022-11-03T22:14:42.717" UserId="3402" Text="|ink|rust|smart-contract|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21776" PostHistoryTypeId="2" PostId="5688" RevisionGUID="8166c940-c874-4423-9330-af0ab8e2f243" CreationDate="2022-11-04T01:06:15.507" UserId="2844" Text="You can't use `String` in `ink!` to store data because `String processing comes with a lot of overhead` and alternatively you can use `Vec&lt;u8&gt;` instead and if you really need `String` you can use `ink_prelude::String` [view the link](https://paritytech.github.io/ink/ink_prelude/string/index.html). You can go through this [Question](https://substrate.stackexchange.com/questions/1174/why-is-it-a-bad-idea-to-use-string-in-an-ink-smart-contract) for further details" ContentLicense="CC BY-SA 4.0" />
  <row Id="21778" PostHistoryTypeId="2" PostId="5689" RevisionGUID="c5ec4a5d-5a36-47e0-ba08-dc47658a818c" CreationDate="2022-11-04T04:27:54.393" UserId="3403" Text="Error message&#xD;&#xA;```&#xD;&#xA; fn panic(info: &amp;core::panic::PanicInfo) -&gt; ! {&#xD;&#xA;   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;   |&#xD;&#xA;   = note: the lang item is first defined in crate `std` (which `parity_scale_codec` depends on)&#xD;&#xA;   = note: first definition in `std` loaded from /home/pinetree/PDAO/polkadot/target/ink/treasury/wasm32-unknown-unknown/release/deps/libstd-466d0a37b6ee82d4.rmeta&#xD;&#xA;   = note: second definition in the local crate (`ink_env`)&#xD;&#xA;```&#xD;&#xA;I want to import my own crate on ink! contract&#xD;&#xA;&#xD;&#xA;my own crate(pdao-beacon-chain-common) is composed like this.&#xD;&#xA;```&#xD;&#xA;#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;    feature = &quot;polkadot&quot;,&#xD;&#xA;    derive(scale::Encode, scale::Decode, scale_info::TypeInfo)&#xD;&#xA;)]&#xD;&#xA;#[cfg_attr(feature = &quot;cosmos&quot;, derive(schemars::JsonSchema))]&#xD;&#xA;pub enum DeliverableMessage {&#xD;&#xA;    FungibleTokenTransfer(FungibleTokenTransfer),&#xD;&#xA;    NonFungibleTokenTransfer(NonFungibleTokenTransfer),&#xD;&#xA;    Custom(Custom),&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]&#xD;&#xA;#[cfg_attr(&#xD;&#xA;    feature = &quot;polkadot&quot;,&#xD;&#xA;    derive(scale::Encode, scale::Decode, scale_info::TypeInfo)&#xD;&#xA;)]&#xD;&#xA;pub struct FungibleTokenTransfer {&#xD;&#xA;    pub token_id: String,&#xD;&#xA;    pub amount: u128,&#xD;&#xA;    pub receiver_address: String,&#xD;&#xA;    pub contract_sequence: u64,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;(refer to https://use.ink/faq#what-are-the-scaleencode-and-scaledecode-traits, to import struct, they should inlcude &quot;scale:Encode, scale:Decode&quot;)&#xD;&#xA;&#xD;&#xA;and It's dependency is like this&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;scale-info = { version = &quot;2.0.0&quot;, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;...&#xD;&#xA;[features]&#xD;&#xA;polkadot = [&quot;scale&quot;, &quot;scale-info&quot;]&#xD;&#xA;```&#xD;&#xA;And, My Contract import that enum or struct, &#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;    use pdao_beacon_chain_common::*;&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And Contract dependency in Cargo.toml,&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;ink_prelude = { version = &quot;3&quot;, default-features = false }&#xD;&#xA;ink_primitives = { version = &quot;3&quot;, default-features = false }&#xD;&#xA;ink_metadata = { version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;ink_env = { version = &quot;3&quot;, default-features = false }&#xD;&#xA;ink_storage = { version = &quot;3&quot;, default-features = false }&#xD;&#xA;ink_lang = { version = &quot;3&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;]}&#xD;&#xA;scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;pdao-beacon-chain-common = { path=&quot;../../beacon-chain/common&quot;, version = &quot;0.1.0&quot;, features = [&quot;polkadot&quot;] }&#xD;&#xA;...&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink_prelude/std&quot;,&#xD;&#xA;    &quot;ink_metadata/std&quot;,&#xD;&#xA;    &quot;ink_env/std&quot;,&#xD;&#xA;    &quot;ink_storage/std&quot;,&#xD;&#xA;    &quot;ink_primitives/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems that parity-scale-codec has some dependecy problem. But I still don't know how to resolve it.&#xD;&#xA;&#xD;&#xA;Do you have any Ideas..? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21780" PostHistoryTypeId="1" PostId="5689" RevisionGUID="c5ec4a5d-5a36-47e0-ba08-dc47658a818c" CreationDate="2022-11-04T04:27:54.393" UserId="3403" Text="error[E0152]: found duplicate lang item `panic_impl`" ContentLicense="CC BY-SA 4.0" />
  <row Id="21781" PostHistoryTypeId="3" PostId="5689" RevisionGUID="c5ec4a5d-5a36-47e0-ba08-dc47658a818c" CreationDate="2022-11-04T04:27:54.393" UserId="3403" Text="|ink|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21782" PostHistoryTypeId="2" PostId="5690" RevisionGUID="64eb6029-c444-41f2-a443-c4f3b4bfd595" CreationDate="2022-11-04T06:44:52.793" UserId="3255" Text="I was compiling the runtime by cloning this source, https://github.com/szout/substrate-parachain-template, but at the moment I met this issue.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rc7Kp.png&#xD;&#xA;&#xD;&#xA;I tried to solve this issue by referencing these QAs, but none of them helped me.&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/3479/error-building-substrate-contract-nodeerrore0603-module-group-is-private&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/3341/node-that-was-not-modified-fails-to-build&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/4305/substrate-node-template-build-error-syngroup-private/4312#4312&#xD;&#xA;&#xD;&#xA;Please answer my question if you have some idea.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21784" PostHistoryTypeId="1" PostId="5690" RevisionGUID="64eb6029-c444-41f2-a443-c4f3b4bfd595" CreationDate="2022-11-04T06:44:52.793" UserId="3255" Text="Error building the parachain template" ContentLicense="CC BY-SA 4.0" />
  <row Id="21785" PostHistoryTypeId="3" PostId="5690" RevisionGUID="64eb6029-c444-41f2-a443-c4f3b4bfd595" CreationDate="2022-11-04T06:44:52.793" UserId="3255" Text="|polkadot|parachain|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21786" PostHistoryTypeId="5" PostId="5686" RevisionGUID="a8bf20fe-8650-45a4-a51d-a46be57e7f0c" CreationDate="2022-11-04T07:23:47.123" UserId="3002" Comment="Fix information" Text="Is it possible to recover a parachain from a backup that is around ~500 blocks behind the head block known by the relay chain?&#xD;&#xA;&#xD;&#xA;In single-chains, this is usually not difficult when you control all the validators(collators), but in a multi-chain system, I suspect that it becomes a lot more complex.&#xD;&#xA;&#xD;&#xA;If this is possible, I would like to know how complex would it be. And if possible, the recovery steps.&#xD;&#xA;&#xD;&#xA;**More information:**&#xD;&#xA;&#xD;&#xA;The relay chain is running the **BABE** and has a single collator." ContentLicense="CC BY-SA 4.0" />
  <row Id="21787" PostHistoryTypeId="2" PostId="5691" RevisionGUID="c208c63f-626f-47cf-afd5-79c02cda328a" CreationDate="2022-11-04T08:11:06.503" UserId="2898" Text="I have two functions. &#xD;&#xA;The first function: Generates payload of unsigned_transaction:&#xD;&#xA;The second function: Needs to generate a signed transaction, using unsigned_transaction and signature.&#xD;&#xA;&#xD;&#xA;**Process:**&#xD;&#xA;First one generates unsigned_tx hex using the data its provided and then caller of function signs the payload generated by first functions and call the second function to generate signed transaction.&#xD;&#xA;&#xD;&#xA;**What i looked into:**&#xD;&#xA;subxt [create_signed_with_nonce](https://github.com/paritytech/subxt/blob/da507fa6d29a1583f1ef0e6cdfd0760290f67f7e/subxt/src/tx/tx_client.rs#L124) takes the signer to generate a signature but I already have a generated signature which i want to use so can't use it. Any suggested solution for this problem?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21789" PostHistoryTypeId="1" PostId="5691" RevisionGUID="c208c63f-626f-47cf-afd5-79c02cda328a" CreationDate="2022-11-04T08:11:06.503" UserId="2898" Text="Create a signed transaction using a signature and unsigned_transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="21790" PostHistoryTypeId="3" PostId="5691" RevisionGUID="c208c63f-626f-47cf-afd5-79c02cda328a" CreationDate="2022-11-04T08:11:06.503" UserId="2898" Text="|rust|transactions|subxt|unsigned|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21791" PostHistoryTypeId="5" PostId="4312" RevisionGUID="18106780-a279-44a5-9180-749b443c1e3e" CreationDate="2022-11-04T08:59:41.960" UserId="251" Comment="deleted 51 characters in body" Text="Just simply do this (you don't have to modify the lock file manually):&#xD;&#xA;```&#xD;&#xA;cargo update -p syn --precise 1.0.96&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If you have the plan to update your Substrate version.&#xD;&#xA;&#xD;&#xA;Update the Substrate to this [commit](https://github.com/paritytech/substrate/pull/11707), which could fix this problem permanently." ContentLicense="CC BY-SA 4.0" />
  <row Id="21792" PostHistoryTypeId="2" PostId="5692" RevisionGUID="ab478440-ce5d-4ad9-bc9d-ddfc52de0667" CreationDate="2022-11-04T09:07:00.493" UserId="620" Text="Take a look at TxWrapper, it has exactly this function.&#xD;&#xA;https://github.com/paritytech/txwrapper-core/blob/v4.0.1/packages/txwrapper-core/src/core/construct/createSignedTx.ts&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;function createSignedTx(&#xD;&#xA;	unsigned: UnsignedTransaction,&#xD;&#xA;	signature: `0x${string}`,&#xD;&#xA;	options: OptionsWithMeta&#xD;&#xA;): string&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="21794" PostHistoryTypeId="5" PostId="5678" RevisionGUID="0f75809b-013a-4f12-99ce-36275aeaccb9" CreationDate="2022-11-04T10:07:55.813" UserId="2762" Comment="improved formatting" Text="While compiling substrate recipes, I encounter the following error (error message copied below as well as the screenshot is attached. &#xD;&#xA;&#xD;&#xA;    error: duplicate lang item in crate `std` (which `serde` depends on): `panic_impl`.&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `ocw_demo` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /home/kamran/Substrate/recipes/target/debug/wbuild/ocw-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ebd74ffdd043ce0a.rmeta&#xD;&#xA;&#xD;&#xA;    = note: second definition in `std` loaded from /home/kamran/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-a237209e92b55a70.rlib&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    error: duplicate lang item in crate `std` (which `serde` depends on): `oom`.&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `ocw_demo` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /home/kamran/Substrate/recipes/target/debug/wbuild/ocw-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ebd74ffdd043ce0a.rmeta&#xD;&#xA;&#xD;&#xA;    = note: second definition in `std` loaded from /home/kamran/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-a237209e92b55a70.rlib &#xD;&#xA;&#xD;&#xA;    error: could not compile `ocw-demo` due to 2 previous errors&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bVl3b.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="21795" PostHistoryTypeId="24" PostId="5678" RevisionGUID="0f75809b-013a-4f12-99ce-36275aeaccb9" CreationDate="2022-11-04T10:07:55.813" Comment="Proposed by 2762 approved by 34 edit id of 330" ContentLicense="CC BY-SA 4.0" />
  <row Id="21798" PostHistoryTypeId="2" PostId="5693" RevisionGUID="39b2f568-9839-47bd-b8f7-7b757142faa6" CreationDate="2022-11-04T10:34:59.403" UserId="406" Text="I am using polkadot v0.9.25 and run it on dev mode, it's **role is authority** and after 256 block when I try to fetch the data of 1 block it shows error `Unable to retrieve the specified block details. -32000: Client error: UnknownBlock: State already discarded for BlockId::Hash(0xe6e95f56950c847fc44b59ad41a5060750a3b10f60fb4fe2c20fb9b1472098f9)` &#xD;&#xA;Is there any way to fetch the data of historical blocks without stopping the chain or is there any other flag which help me to fetch the block data." ContentLicense="CC BY-SA 4.0" />
  <row Id="21800" PostHistoryTypeId="1" PostId="5693" RevisionGUID="39b2f568-9839-47bd-b8f7-7b757142faa6" CreationDate="2022-11-04T10:34:59.403" UserId="406" Text="Not able to fetch historical blocks with Role: Authority" ContentLicense="CC BY-SA 4.0" />
  <row Id="21801" PostHistoryTypeId="3" PostId="5693" RevisionGUID="39b2f568-9839-47bd-b8f7-7b757142faa6" CreationDate="2022-11-04T10:34:59.403" UserId="406" Text="|polkadot|validator|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21802" PostHistoryTypeId="2" PostId="5694" RevisionGUID="72b2a0b9-8bc8-4b52-8019-2ba144abb687" CreationDate="2022-11-04T11:44:44.600" UserId="251" Text="Did you use any `--pruning xxx`/`--unsafe-pruning` flag?&#xD;&#xA;&#xD;&#xA;Or maybe it is the default behavior in Substrate.&#xD;&#xA;&#xD;&#xA;Try booting with `--pruning archive`. And I think it will make a fully resync." ContentLicense="CC BY-SA 4.0" />
  <row Id="21804" PostHistoryTypeId="2" PostId="5695" RevisionGUID="b0383e6c-445f-46ce-b60a-9fdc94a7a5df" CreationDate="2022-11-04T13:17:25.550" UserId="300" Text="Polkadot/api has a way to detail signed extensions and I want to understand (so I can use it for our own custom signed extension) what the extrinsic and payload parameters map to.&#xD;&#xA;&#xD;&#xA;Here's an example using some of the built in signed extensions (From: [substrate.ts][1])&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;  signedExtensions: {&#xD;&#xA;    CheckMortality: {&#xD;&#xA;      extrinsic: {&#xD;&#xA;        era: 'ExtrinsicEra'&#xD;&#xA;      },&#xD;&#xA;      payload: {&#xD;&#xA;        blockHash: 'Hash'&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    CheckNonce: {&#xD;&#xA;      extrinsic: {&#xD;&#xA;        nonce: 'Compact&lt;Index&gt;'&#xD;&#xA;      },&#xD;&#xA;      payload: {}&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These should both map to parts of the transaction format: https://docs.substrate.io/reference/transaction-format/#signed-extensions&#xD;&#xA;&#xD;&#xA;My semi-wrong understanding currently:&#xD;&#xA;- **Wrong**: `extrinsic`: Maps to the `Pre` section of the Signed Extension&#xD;&#xA;- **Right?**: `payload`: Maps to the `AdditionalSigned` section of the Signed Extension&#xD;&#xA;&#xD;&#xA;This doesn't quite work as [check_nonce.rs][2] has `Pre = ();`&#xD;&#xA;&#xD;&#xA;So how do I know that `CheckNonce` needs `extrinsic: { nonce }` for Polkadotjs or that `CheckMortality` needs `extrinsic: { era }`?&#xD;&#xA;&#xD;&#xA;Nothing really appears to map to the `Pre` section of a signed extension, so also not sure how to tell polkadot/api about additional information there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/master/packages/types/src/extrinsic/signedExtensions/substrate.ts&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/b2a914c09739478c63d318f6b294901a3290e548/frame/system/src/extensions/check_nonce.rs#L67-L68" ContentLicense="CC BY-SA 4.0" />
  <row Id="21806" PostHistoryTypeId="1" PostId="5695" RevisionGUID="b0383e6c-445f-46ce-b60a-9fdc94a7a5df" CreationDate="2022-11-04T13:17:25.550" UserId="300" Text="Informing polkadot/api about additional signed extensions" ContentLicense="CC BY-SA 4.0" />
  <row Id="21807" PostHistoryTypeId="3" PostId="5695" RevisionGUID="b0383e6c-445f-46ce-b60a-9fdc94a7a5df" CreationDate="2022-11-04T13:17:25.550" UserId="300" Text="|polkadot-js|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21808" PostHistoryTypeId="2" PostId="5696" RevisionGUID="6c948e9a-b7be-4b4a-9cdb-7ae47cf67618" CreationDate="2022-11-04T14:16:22.747" UserId="2455" Text="I am running a simple 2-validator substrate chain with my own keys (https://github.com/paritytech/substrate, branch = polkadot-v0.9.27). I have removed `pallet-gilt` from the runtime and what I am trying to do is a runtime upgrade (with the `setCode` extrinsic) and add `pallet-gilt` to the runtime. The upgrade is successful but the chain bricks just before the `intake_duration` of pallet-gilt. The error I am getting is the following:&#xD;&#xA;```bash&#xD;&#xA;2022-11-04 16:04:18 panicked at 'index out of bounds: the len is 0 but the index is 299', /Users/zycon/cherry/substrate/frame/gilt/src/lib.rs:600:28&#xD;&#xA;2022-11-04 16:04:18 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x4a57eb - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The function that contains the line of code that breaks is the following:&#xD;&#xA;https://github.com/paritytech/substrate/blob/5bfdbab8ba28523ef10e365627fed64ef2b77cbf/frame/gilt/src/lib.rs#L585-L660&#xD;&#xA;&#xD;&#xA;That only happens when I try to add `pallet-gilt` to an already running chain. If I add `pallet-gilt` to genesis and start the chain with the pallet, I have no errors." ContentLicense="CC BY-SA 4.0" />
  <row Id="21810" PostHistoryTypeId="1" PostId="5696" RevisionGUID="6c948e9a-b7be-4b4a-9cdb-7ae47cf67618" CreationDate="2022-11-04T14:16:22.747" UserId="2455" Text="Adding pallet-gilt to a running chain bricks the chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="21811" PostHistoryTypeId="3" PostId="5696" RevisionGUID="6c948e9a-b7be-4b4a-9cdb-7ae47cf67618" CreationDate="2022-11-04T14:16:22.747" UserId="2455" Text="|substrate-node-template|runtime|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21812" PostHistoryTypeId="2" PostId="5697" RevisionGUID="a9638018-4e72-4fd4-80d9-bf0b50505f14" CreationDate="2022-11-04T16:17:03.797" UserId="3402" Text="I want to hash string using sha256 and then store it inside of my ink smart contract.&#xD;&#xA;&#xD;&#xA;I tested this code in Rust and it works out for me:&#xD;&#xA;&#xD;&#xA;    use crypto::sha2::Sha256;&#xD;&#xA;    use crypto::digest::Digest;&#xD;&#xA;    &#xD;&#xA;    let phrase = &quot;purchase hobby popular celery evil fantasy someone party position gossip host gather&quot;;&#xD;&#xA;    let mut seed = Sha256::new();&#xD;&#xA;    seed.input_str(&amp;phrase);&#xD;&#xA;    let mut bytes = vec![0; seed.output_bytes()];&#xD;&#xA;&#xD;&#xA;However, this code doesn't compile in ink, because ink can't seem to use crypto crate...&#xD;&#xA;&#xD;&#xA;How can I use keccak256 inside of an ink smart contract to return me Vec&lt;u8&gt; ?&#xD;&#xA;&#xD;&#xA;I found package Sha2x256, but I'm unsure how I should use this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21814" PostHistoryTypeId="1" PostId="5697" RevisionGUID="a9638018-4e72-4fd4-80d9-bf0b50505f14" CreationDate="2022-11-04T16:17:03.797" UserId="3402" Text="How to use keccak256 sha256 in ink smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21815" PostHistoryTypeId="3" PostId="5697" RevisionGUID="a9638018-4e72-4fd4-80d9-bf0b50505f14" CreationDate="2022-11-04T16:17:03.797" UserId="3402" Text="|ink|storage|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21816" PostHistoryTypeId="2" PostId="5698" RevisionGUID="db27ba44-2dcb-4da1-8b13-5ff7d2dcff01" CreationDate="2022-11-04T16:34:56.443" UserId="494" Text="The `enlarge` function is called by `pursue_target`, which is called periodically (every `n % IntakePeriod` blocks) by the `on_initialize` hook.&#xD;&#xA;&#xD;&#xA;If you check [line 600](https://github.com/paritytech/substrate/blob/5bfdbab8ba28523ef10e365627fed64ef2b77cbf/frame/gilt/src/lib.rs#L600) (exactly where the code breaks), you'll see that `enlarge` is trying to read the `qs` array, where `qs` is the current state of the `QueueTotals` Storage Item (read up on [Rust Closures](https://doc.rust-lang.org/book/ch13-01-closures.html) to understand how `mutate` is working to modify `QueueTotals`).&#xD;&#xA;&#xD;&#xA;The problem is that because the `gilt` pallet was introduced via Runtime Upgrade (and most likely, you didn't perform any Storage Migration), the `QueueTotals` Storage Item is empty. Therefore, the pallet's Rust code breaks when it tries to read the empty `qs` array.&#xD;&#xA;&gt; 'index out of bounds: the len is 0 but the index is 299'&#xD;&#xA;&#xD;&#xA;If you check the pallet's [`GenesisBuild`](https://github.com/paritytech/substrate/blob/b2a914c09739478c63d318f6b294901a3290e548/frame/gilt/src/lib.rs#L278), you'll see that `QueueTotals` is being populated there. So when you add `gilt: Default::default(),` into [`GenesisConfig`](https://github.com/substrate-developer-hub/substrate-node-template/blob/378a3e5ae41df1af0ef1a66b2076342bce678688/node/src/chain_spec.rs#L135) of your `node/src/chain_spec.rs` (which I'm assuming you did), the `QueueTotals` is properly bootstrapped at genesis and the pallet runs smoothly whenever the `on_initialize` hook is triggered.&#xD;&#xA;&#xD;&#xA;The only solution to this problem is to implement a [Storage Migration](https://substrate-developer-hub.github.io/substrate-how-to-guides/docs/storage-migrations/nicks-migration/) to be performed during your Runtime Upgrade. It shouldn't be too complex, all you have to do is reproduce whatever the pallet's `GenesisBuild` is already doing." ContentLicense="CC BY-SA 4.0" />
  <row Id="21818" PostHistoryTypeId="5" PostId="5690" RevisionGUID="0cb9571b-9753-41f6-b30c-940b3696197f" CreationDate="2022-11-04T16:48:31.680" UserId="3255" Comment="added 289 characters in body" Text="I was compiling the runtime by cloning this source, https://github.com/szout/substrate-parachain-template, but at the moment I met this issue.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried to solve this issue by referencing these QAs, but none of them helped me.&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/3479/error-building-substrate-contract-nodeerrore0603-module-group-is-private&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/3341/node-that-was-not-modified-fails-to-build&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/4305/substrate-node-template-build-error-syngroup-private/4312#4312&#xD;&#xA;&#xD;&#xA;So I added this phrase in the runtime/Cargo.toml to solve the issue, and it worked for me;&#xD;&#xA;syn = { version = &quot;=1.0.82&quot;}&#xD;&#xA;&#xD;&#xA;But after adding it, I faced another error like below while building the runtime.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rc7Kp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ByNNL.png&#xD;&#xA;&#xD;&#xA;Are here anyone who can tell me what it is?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21819" PostHistoryTypeId="6" PostId="5690" RevisionGUID="0cb9571b-9753-41f6-b30c-940b3696197f" CreationDate="2022-11-04T16:48:31.680" UserId="3255" Comment="added 289 characters in body" Text="|polkadot|parachain|rust|build|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21820" PostHistoryTypeId="10" PostId="5690" RevisionGUID="aef23733-02b4-4545-ac42-3e9dbe6150cc" CreationDate="2022-11-04T18:25:04.153" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[4305],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="21821" PostHistoryTypeId="2" PostId="5699" RevisionGUID="2d123955-d866-44a1-aaf5-e2fda08f217c" CreationDate="2022-11-04T19:59:42.903" UserId="3346" Text="We are using the kitchen sink substrate node with the standard balances pallet. No changes. The chain mints native tokens using the usual processes. My question is: **what token standard is used in the standard Substrate balances pallet**? ERC-20, or BEP or EVM Compatible? Or something else? I have not seen this discussed. " ContentLicense="CC BY-SA 4.0" />
  <row Id="21823" PostHistoryTypeId="1" PostId="5699" RevisionGUID="2d123955-d866-44a1-aaf5-e2fda08f217c" CreationDate="2022-11-04T19:59:42.903" UserId="3346" Text="What is the Token Standard used by the balances pallet to issue the native token for the chain in the substrate kitchen sink node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21824" PostHistoryTypeId="3" PostId="5699" RevisionGUID="2d123955-d866-44a1-aaf5-e2fda08f217c" CreationDate="2022-11-04T19:59:42.903" UserId="3346" Text="|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21825" PostHistoryTypeId="50" PostId="5108" RevisionGUID="5cd61cf4-cfea-40a1-bddf-0488a21d9473" CreationDate="2022-11-04T20:05:00.573" UserId="-1" />
  <row Id="21826" PostHistoryTypeId="2" PostId="5700" RevisionGUID="a2d10a27-78d0-4d8f-8c42-d260f6d9f705" CreationDate="2022-11-04T20:34:52.287" UserId="3405" Text="I'm writing a pallet, which depends on `pallet-rmrk-core`, based on `pallet-template`.&#xD;&#xA;&#xD;&#xA;In `lib.rs` I wrote:&#xD;&#xA;```&#xD;&#xA;#[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config + pallet_rmrk_core::Config {&#xD;&#xA;        type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now the `mock.rs` from pallet-template errors:&#xD;&#xA;```&#xD;&#xA;impl pallet_cases::Config for Test {&#xD;&#xA;     ^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    type Event = Event;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;the trait bound `mock::Test: pallet_rmrk_core::Config` is not satisfied&#xD;&#xA;the trait `pallet_rmrk_core::Config` is not implemented for `mock::Test`rustcE0277&#xD;&#xA;lib.rs(33, 46): required by a bound in `pallet::Config`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My full mock.rs looks like this:&#xD;&#xA;```&#xD;&#xA;use crate as pallet_cases;&#xD;&#xA;use frame_support::traits::{ConstU16, ConstU64};&#xD;&#xA;use frame_system as system;&#xD;&#xA;use sp_core::H256;&#xD;&#xA;use sp_runtime::{&#xD;&#xA;    testing::Header,&#xD;&#xA;    traits::{BlakeTwo256, IdentityLookup},&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic&lt;Test&gt;;&#xD;&#xA;type Block = frame_system::mocking::MockBlock&lt;Test&gt;;&#xD;&#xA;&#xD;&#xA;// Configure a mock runtime to test the pallet.&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;    pub enum Test where&#xD;&#xA;        Block = Block,&#xD;&#xA;        NodeBlock = Block,&#xD;&#xA;        UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;    {&#xD;&#xA;        System: frame_system,&#xD;&#xA;        PalletCases: pallet_cases,&#xD;&#xA;    }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl system::Config for Test {&#xD;&#xA;    type BaseCallFilter = frame_support::traits::Everything;&#xD;&#xA;    type BlockWeights = ();&#xD;&#xA;    type BlockLength = ();&#xD;&#xA;    type DbWeight = ();&#xD;&#xA;    type Origin = Origin;&#xD;&#xA;    type Call = Call;&#xD;&#xA;    type Index = u64;&#xD;&#xA;    type BlockNumber = u64;&#xD;&#xA;    type Hash = H256;&#xD;&#xA;    type Hashing = BlakeTwo256;&#xD;&#xA;    type AccountId = u64;&#xD;&#xA;    type Lookup = IdentityLookup&lt;Self::AccountId&gt;;&#xD;&#xA;    type Header = Header;&#xD;&#xA;    type Event = Event;&#xD;&#xA;    type BlockHashCount = ConstU64&lt;250&gt;;&#xD;&#xA;    type Version = ();&#xD;&#xA;    type PalletInfo = PalletInfo;&#xD;&#xA;    type AccountData = ();&#xD;&#xA;    type OnNewAccount = ();&#xD;&#xA;    type OnKilledAccount = ();&#xD;&#xA;    type SystemWeightInfo = ();&#xD;&#xA;    type SS58Prefix = ConstU16&lt;42&gt;;&#xD;&#xA;    type OnSetCode = ();&#xD;&#xA;    type MaxConsumers = frame_support::traits::ConstU32&lt;16&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_cases::Config for Test {&#xD;&#xA;    type Event = Event;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Build genesis storage according to the mock runtime.&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;    system::GenesisConfig::default()&#xD;&#xA;        .build_storage::&lt;Test&gt;()&#xD;&#xA;        .unwrap()&#xD;&#xA;        .into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I already tried to add pallet_rmrk_core to the runtime and did a `impl pallet_rmrk_core::Config for Test` but it ended in just much more errors.&#xD;&#xA;&#xD;&#xA;What do I miss?&#xD;&#xA;&#xD;&#xA;Regards" ContentLicense="CC BY-SA 4.0" />
  <row Id="21828" PostHistoryTypeId="1" PostId="5700" RevisionGUID="a2d10a27-78d0-4d8f-8c42-d260f6d9f705" CreationDate="2022-11-04T20:34:52.287" UserId="3405" Text="the trait bound `mock::Test: pallet_rmrk_core::Config` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="21829" PostHistoryTypeId="3" PostId="5700" RevisionGUID="a2d10a27-78d0-4d8f-8c42-d260f6d9f705" CreationDate="2022-11-04T20:34:52.287" UserId="3405" Text="|pallet|mock|rmrk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21830" PostHistoryTypeId="2" PostId="5701" RevisionGUID="62d3d898-b1bb-403c-a00a-02d13c55ed89" CreationDate="2022-11-04T21:58:59.467" UserId="3255" Text="I want to remove this wildcard import, but don't know how to do.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/28ZKd.png&#xD;&#xA;&#xD;&#xA;I am working on the &quot;pallet/xxx/src/lib.rs&quot;, while this file is very similar to the one from &quot;substrate-node-template&quot; repository.&#xD;&#xA;How can I write the certain crates in the line?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21832" PostHistoryTypeId="1" PostId="5701" RevisionGUID="62d3d898-b1bb-403c-a00a-02d13c55ed89" CreationDate="2022-11-04T21:58:59.467" UserId="3255" Text="How to avoid the wildcard Import?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21833" PostHistoryTypeId="3" PostId="5701" RevisionGUID="62d3d898-b1bb-403c-a00a-02d13c55ed89" CreationDate="2022-11-04T21:58:59.467" UserId="3255" Text="|pallet|rust|crates|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21834" PostHistoryTypeId="2" PostId="5702" RevisionGUID="280bc4cc-4b61-46ef-bcc2-946c196d5dfa" CreationDate="2022-11-04T22:01:00.767" UserId="73" Text="&gt; I already tried to add pallet_rmrk_core to the runtime and did a impl pallet_rmrk_core::Config for Test but it ended in just much more errors.&#xD;&#xA;&#xD;&#xA;This is the correct solution. You have specified in your trait that the `rmrk_core::Config` is a super trait. This means when implementing your `Config` trait the type also needs to implement the `rmrk_core::Config` trait. Whatever the errors are that you are getting in this case, you will also need to fix them." ContentLicense="CC BY-SA 4.0" />
  <row Id="21836" PostHistoryTypeId="2" PostId="5703" RevisionGUID="de800017-bab8-4cad-acf6-2f2a4e8120e8" CreationDate="2022-11-04T22:14:27.940" UserId="73" Text="There is no problem in using the wildcard export. The FRAME macros currently require that you have this artificial module and then re-export all the types from there to the top of your crate as the module doesn't exist. When Rust will support macros to be declared on the crate level these artificial module can be removed.&#xD;&#xA;&#xD;&#xA;If you really don't like the wildcard export, you can switch it to using individual exports:&#xD;&#xA;```&#xD;&#xA;pub use pallet::{Pallet, Config};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, that is a tedious manual approach." ContentLicense="CC BY-SA 4.0" />
  <row Id="21838" PostHistoryTypeId="52" PostId="5696" RevisionGUID="aacd12d5-275f-488e-97a3-50ba08f97047" CreationDate="2022-11-04T22:17:12.867" />
  <row Id="21839" PostHistoryTypeId="5" PostId="5696" RevisionGUID="c6fae0da-3190-4d1d-8fda-69aef82db1c9" CreationDate="2022-11-04T22:48:11.590" UserId="234" Comment="Replaced &quot;bricks&quot; with &quot;breaks&quot;" Text="I am running a simple 2-validator substrate chain with my own keys (https://github.com/paritytech/substrate, branch = polkadot-v0.9.27). I have removed `pallet-gilt` from the runtime and what I am trying to do is a runtime upgrade (with the `setCode` extrinsic) and add `pallet-gilt` to the runtime. The upgrade is successful but the chain breaks just before the `intake_duration` of pallet-gilt. The error I am getting is the following:&#xD;&#xA;```bash&#xD;&#xA;2022-11-04 16:04:18 panicked at 'index out of bounds: the len is 0 but the index is 299', /Users/zycon/cherry/substrate/frame/gilt/src/lib.rs:600:28&#xD;&#xA;2022-11-04 16:04:18 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x4a57eb - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The function that contains the line of code that breaks is the following:&#xD;&#xA;https://github.com/paritytech/substrate/blob/5bfdbab8ba28523ef10e365627fed64ef2b77cbf/frame/gilt/src/lib.rs#L585-L660&#xD;&#xA;&#xD;&#xA;That only happens when I try to add `pallet-gilt` to an already running chain. If I add `pallet-gilt` to genesis and start the chain with the pallet, I have no errors." ContentLicense="CC BY-SA 4.0" />
  <row Id="21840" PostHistoryTypeId="4" PostId="5696" RevisionGUID="c6fae0da-3190-4d1d-8fda-69aef82db1c9" CreationDate="2022-11-04T22:48:11.590" UserId="234" Comment="Replaced &quot;bricks&quot; with &quot;breaks&quot;" Text="Adding pallet-gilt to a running chain breaks the chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="21841" PostHistoryTypeId="24" PostId="5696" RevisionGUID="c6fae0da-3190-4d1d-8fda-69aef82db1c9" CreationDate="2022-11-04T22:48:11.590" Comment="Proposed by 234 approved by 2455 edit id of 331" ContentLicense="CC BY-SA 4.0" />
  <row Id="21842" PostHistoryTypeId="5" PostId="5701" RevisionGUID="c4f38d56-f212-45d2-a776-94e34d0c0eea" CreationDate="2022-11-04T23:25:14.557" UserId="3255" Comment="added 1548 characters in body" Text="I want to remove this wildcard import, but don't know how to do.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am working on the &quot;pallet/xxx/src/lib.rs&quot;, while this file is very similar to the one from &quot;substrate-node-template&quot; repository.&#xD;&#xA;When I modify the part like below as you said, I can see this error messages.&#xD;&#xA;&#xD;&#xA;pub use pallet::{Pallet, Config};&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;At the moment, I modify the part again following the messages like below, and get the other error messages.&#xD;&#xA;&#xD;&#xA;pub use pallet::{Config, Error, Pallet, PostById, PostReactionKindByAccount,};&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][6]][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][7]][7]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][8]][8]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][9]][9]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][10]][10]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][11]][11]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][12]][12]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][13]][13]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][14]][14]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/28ZKd.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/hlfhH.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/86OOo.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/m1WwA.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/F3SBu.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/oakft.png&#xD;&#xA;  [7]: https://i.stack.imgur.com/oaB1L.png&#xD;&#xA;  [8]: https://i.stack.imgur.com/rYLW0.png&#xD;&#xA;  [9]: https://i.stack.imgur.com/VrqdW.png&#xD;&#xA;  [10]: https://i.stack.imgur.com/6qQxd.png&#xD;&#xA;  [11]: https://i.stack.imgur.com/NkamN.png&#xD;&#xA;  [12]: https://i.stack.imgur.com/P7ONj.png&#xD;&#xA;  [13]: https://i.stack.imgur.com/ZnP5B.png&#xD;&#xA;  [14]: https://i.stack.imgur.com/SUfsp.png&#xD;&#xA;&#xD;&#xA;I am trying to fix these errors, but don't know how to do because of my knowledge's lack.&#xD;&#xA;What should I do now?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21843" PostHistoryTypeId="4" PostId="5690" RevisionGUID="b5a45428-9285-423e-9f9b-f6af9f1c31f8" CreationDate="2022-11-05T00:11:06.893" UserId="3255" Comment="edited question" Text="Error building the parachain template - 2" ContentLicense="CC BY-SA 4.0" />
  <row Id="21844" PostHistoryTypeId="5" PostId="5690" RevisionGUID="b5a45428-9285-423e-9f9b-f6af9f1c31f8" CreationDate="2022-11-05T00:11:06.893" UserId="3255" Comment="edited question" Text="I was compiling the runtime by cloning this source, https://github.com/szout/substrate-parachain-template, but at the moment I met this issue.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried to solve this issue by referencing these QAs, but none of them helped me.&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/3479/error-building-substrate-contract-nodeerrore0603-module-group-is-private&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/3341/node-that-was-not-modified-fails-to-build&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/4305/substrate-node-template-build-error-syngroup-private/4312#4312&#xD;&#xA;&#xD;&#xA;So I added this phrase in the runtime/Cargo.toml to solve the issue, and it worked for me;&#xD;&#xA;syn = { version = &quot;=1.0.82&quot;}&#xD;&#xA;&#xD;&#xA;'**But after adding it, I faced another error like below while building the runtime.**'&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rc7Kp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ByNNL.png&#xD;&#xA;&#xD;&#xA;'**Are here anyones who can guide me?**'" ContentLicense="CC BY-SA 4.0" />
  <row Id="21847" PostHistoryTypeId="2" PostId="5704" RevisionGUID="968e22d2-dae0-4b6f-972b-c711679d417f" CreationDate="2022-11-05T01:23:37.643" UserId="2712" Text="By default, the Substrate node is configured with a maximum number of &quot;consumers&quot; of the address equal to 16.&#xD;&#xA;This means, for example, that a maximum of 16 different tokens (generated by the `assets` pallet) can be stored on one account.&#xD;&#xA;&#xD;&#xA;Seems like a pretty strict restriction. What is the core reason to set the limit to 16? Can we safely increase this limit to 1024?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[pallet system](https://github.com/paritytech/substrate/blob/0d64ba4268106fffe430d41b541c1aeedd4f8da5/frame/system/src/lib.rs#L357)&#xD;&#xA;&#xD;&#xA;[runtime config](https://github.com/paritytech/substrate/blob/0d64ba4268106fffe430d41b541c1aeedd4f8da5/bin/node/runtime/src/lib.rs#L227)" ContentLicense="CC BY-SA 4.0" />
  <row Id="21849" PostHistoryTypeId="1" PostId="5704" RevisionGUID="968e22d2-dae0-4b6f-972b-c711679d417f" CreationDate="2022-11-05T01:23:37.643" UserId="2712" Text="Why is the max number of consumers set to 16?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21850" PostHistoryTypeId="3" PostId="5704" RevisionGUID="968e22d2-dae0-4b6f-972b-c711679d417f" CreationDate="2022-11-05T01:23:37.643" UserId="2712" Text="|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21851" PostHistoryTypeId="2" PostId="5705" RevisionGUID="a2c3af19-3520-41f9-a601-46b62ca17ceb" CreationDate="2022-11-05T07:37:33.003" UserId="3383" Text="Can two pallets have exactly same event name and event parameters. If yes then is there a way to distinguish the event came from which pallet in golang.   " ContentLicense="CC BY-SA 4.0" />
  <row Id="21853" PostHistoryTypeId="1" PostId="5705" RevisionGUID="a2c3af19-3520-41f9-a601-46b62ca17ceb" CreationDate="2022-11-05T07:37:33.003" UserId="3383" Text="Event reuse in substrate pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="21854" PostHistoryTypeId="3" PostId="5705" RevisionGUID="a2c3af19-3520-41f9-a601-46b62ca17ceb" CreationDate="2022-11-05T07:37:33.003" UserId="3383" Text="|pallet|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21855" PostHistoryTypeId="2" PostId="5706" RevisionGUID="d9be0722-937d-4e8d-9164-c0b4fcf56232" CreationDate="2022-11-05T09:51:55.810" UserId="73" Text="Nothing in the kitchensink runtime are maximum values or anything similar. You could call these numbers reasonable default values or most of the times configurations to make it work. These values are not audited. This entire runtime is just to for testing. You can set these values in your own runtime as you like and then do proper benchmarking and auditing. The entire reason that these values are configurable is to give the user the possibility to set values as they like. However, this also requires that the developer knows on what certain values are doing. " ContentLicense="CC BY-SA 4.0" />
  <row Id="21857" PostHistoryTypeId="50" PostId="5161" RevisionGUID="2dd00dc0-ceaf-4857-ba8c-8573ec1ce0d4" CreationDate="2022-11-05T10:00:20.093" UserId="-1" />
  <row Id="21862" PostHistoryTypeId="2" PostId="5708" RevisionGUID="e9fce1b4-f0b2-4f6c-8355-8390c00d89ce" CreationDate="2022-11-05T17:52:18.633" UserId="2275" Text="Having storage like&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn account_assets)]&#xD;&#xA;	pub type AccountAssets&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_, Twox64Concat,&#xD;&#xA;		T::AccountId, OwnedAssets&lt;T&gt;,&#xD;&#xA;		ValueQuery&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How do I query entries by T::AccountId (u64) from substrate-frontend-template?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've tried something like this (following code in https://polkadot.js.org/docs/api/start/api.query.subs)&#xD;&#xA;&#xD;&#xA;    await api.query.nftsModule.accountAssets**.entries(&quot;accout_id_here&quot;, assets** =&gt; { /* Logic goes here*/ });&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But it gives error like:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    Error: Iteration nftsModule.accountAssets needs arguments to be at least one less than the full arguments, found [my_argumnet_here]&#xD;&#xA;&#xD;&#xA;Without passing first argument it works (but returns all entries (not filtered))." ContentLicense="CC BY-SA 4.0" />
  <row Id="21864" PostHistoryTypeId="1" PostId="5708" RevisionGUID="e9fce1b4-f0b2-4f6c-8355-8390c00d89ce" CreationDate="2022-11-05T17:52:18.633" UserId="2275" Text="Querying StorageMap by Id" ContentLicense="CC BY-SA 4.0" />
  <row Id="21865" PostHistoryTypeId="3" PostId="5708" RevisionGUID="e9fce1b4-f0b2-4f6c-8355-8390c00d89ce" CreationDate="2022-11-05T17:52:18.633" UserId="2275" Text="|substrate-node-template|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21866" PostHistoryTypeId="2" PostId="5709" RevisionGUID="2621bb1d-958c-4e83-9602-8eb7e3afcf8a" CreationDate="2022-11-05T19:26:38.577" UserId="3407" Text="The specific error that you are seeing here is because you haven't previously registered the new node as a validator candidate. [Here][1] is the source code that generates the error.&#xD;&#xA;&#xD;&#xA;The relevant bits are below:&#xD;&#xA;```rust&#xD;&#xA;/// Register this account as a collator candidate. The account must (a) already have&#xD;&#xA;/// registered session keys and (b) be able to reserve the `CandidacyBond`.&#xD;&#xA;///&#xD;&#xA;/// This call is not available to `Invulnerable` collators.&#xD;&#xA;...&#xD;&#xA;pub fn register_as_candidate(origin: OriginFor&lt;T&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;		let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;		...&#xD;&#xA;&#xD;&#xA;		let validator_key = T::ValidatorIdOf::convert(who.clone())&#xD;&#xA;			.ok_or(Error::&lt;T&gt;::NoAssociatedValidatorId)?;&#xD;&#xA;		ensure!(&#xD;&#xA;			T::ValidatorRegistration::is_registered(&amp;validator_key),&#xD;&#xA;			Error::&lt;T&gt;::ValidatorNotRegistered&#xD;&#xA;		);&#xD;&#xA;        ...&#xD;&#xA;```&#xD;&#xA;You can see that it asks the config's ValidatorRegistration if the validator key has been registered. Assuming you are using the most common pallets, `pallet-session` is the one that implements the trait, and it has a `set_keys` extrinsic which can be called by the account attempting to become a validator.&#xD;&#xA;&#xD;&#xA;You can get session keys from the (usually protected) runtime call `author - rotate_keys`.&#xD;&#xA;&#xD;&#xA;So the most likely steps are:&#xD;&#xA;1. Make the runtime call `rotate_keys` in the `author` pallet.&#xD;&#xA;2. Use the keys you get to submit a `set_keys` extrinsic in the `session` pallet. This might require some SCALE-decoding, depending on how you do it.&#xD;&#xA;3. Register as a candidate the way you already do.&#xD;&#xA;&#xD;&#xA;However, this might change depending on your chain setup.&#xD;&#xA;&#xD;&#xA;  [1]:https://github.com/paritytech/cumulus/blob/master/pallets/collator-selection/src/lib.rs#L360" ContentLicense="CC BY-SA 4.0" />
  <row Id="21868" PostHistoryTypeId="2" PostId="5710" RevisionGUID="b3f6fed1-3a77-4508-8877-4100e92bd2d6" CreationDate="2022-11-05T19:44:05.693" UserId="3407" Text="Right now, you are using the `entries` method which retrieves all entries contained in a storage map. [Here][1] are the docs for it. In general, this should only be used if you need to access *all* the data contained in a map.&#xD;&#xA;&#xD;&#xA;However, it would be better for your use case to get a single entry from the map, which is described [here][2]. The code to retrieve the data (`OwnedAssets`) for a given account ID would look like&#xD;&#xA;```javascript&#xD;&#xA;const ownedAssets = await api.query.nftsModule.AccountAssets(accountId);&#xD;&#xA;```&#xD;&#xA;and would assign `ownedAssets` to the corresponding value in the storage, and you can then apply the desired logic to it.&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries&#xD;&#xA;  [2]: https://polkadot.js.org/docs/api/start/api.query" ContentLicense="CC BY-SA 4.0" />
  <row Id="21870" PostHistoryTypeId="5" PostId="5710" RevisionGUID="816d8d84-d99c-4b92-a386-625308be9878" CreationDate="2022-11-05T19:45:34.937" UserId="3407" Comment="Include docs on accountId" Text="Right now, you are using the `entries` method which retrieves all entries contained in a storage map. [Here][1] are the docs for it. In general, this should only be used if you need to access *all* the data contained in a map.&#xD;&#xA;&#xD;&#xA;However, it would be better for your use case to get a single entry from the map, which is described [here][2]. The code to retrieve the data (`OwnedAssets`) for a given account ID would look like&#xD;&#xA;```javascript&#xD;&#xA;const ownedAssets = await api.query.nftsModule.AccountAssets(accountId);&#xD;&#xA;```&#xD;&#xA;and would assign `ownedAssets` to the corresponding value in the storage, and you can then apply the desired logic to it.&#xD;&#xA;&#xD;&#xA;Also note the docs [here][3] on how the parameters are treated by the API.&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries&#xD;&#xA;  [2]: https://polkadot.js.org/docs/api/start/api.query&#xD;&#xA;  [3]: https://polkadot.js.org/docs/api/start/api.query#parameters--return-values" ContentLicense="CC BY-SA 4.0" />
  <row Id="21871" PostHistoryTypeId="2" PostId="5711" RevisionGUID="aa335270-9d73-46b6-ae91-f224e29c4f00" CreationDate="2022-11-05T19:57:09.680" UserId="3000" Text="I Wanna know about off-chain in the substrate ( Polkadot ) how does work?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How is it mine from the onchain ( main chain in Polkadot )?&#xD;&#xA;&#xD;&#xA;maybe somebody wants to hack the off-chain and they do it a success, in this situation what does the onchain for reject the block or off-chain data?&#xD;&#xA;&#xD;&#xA;and please explain how does work off-chain and how can send off-chain data to onchain ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="21873" PostHistoryTypeId="1" PostId="5711" RevisionGUID="aa335270-9d73-46b6-ae91-f224e29c4f00" CreationDate="2022-11-05T19:57:09.680" UserId="3000" Text="how does work offchain in substrate ( pokadot )" ContentLicense="CC BY-SA 4.0" />
  <row Id="21874" PostHistoryTypeId="3" PostId="5711" RevisionGUID="aa335270-9d73-46b6-ae91-f224e29c4f00" CreationDate="2022-11-05T19:57:09.680" UserId="3000" Text="|polkadot-js|polkadot|substrate-node-template|offchain-worker|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21875" PostHistoryTypeId="2" PostId="5712" RevisionGUID="160ae0fd-3553-4c84-9760-77178f532d4a" CreationDate="2022-11-05T20:19:15.800" UserId="3171" Text="Here is detailed docs on substrate.io&#xD;&#xA;https://docs.substrate.io/reference/how-to-guides/offchain-workers/" ContentLicense="CC BY-SA 4.0" />
  <row Id="21878" PostHistoryTypeId="10" PostId="5711" RevisionGUID="c1fae82a-e1e8-45ee-979f-74b651618030" CreationDate="2022-11-05T21:26:10.967" UserId="28" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="21879" PostHistoryTypeId="2" PostId="5713" RevisionGUID="30d8e3da-0b36-42de-aaa1-ff0031cafd62" CreationDate="2022-11-05T21:41:54.687" UserId="28" Text="Yes, event name is superficial. What actually matters is how the pallet event is encoded into bytes.&#xD;&#xA;&#xD;&#xA;Pallet events are encoded such that the first byte represents the pallet index, and the second byte represents the event index. Pallet index is determined by the ordering or explicit numbering in the `construct_runtime!` macro, and event index is determined by the ordering in the Event enum.&#xD;&#xA;&#xD;&#xA;Here is a minimal example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;},&#xD;&#xA;		Pallet1: pallet_example::&lt;Instance1&gt;,&#xD;&#xA;		Pallet2: pallet_example::&lt;Instance2&gt;,&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see in this example, we are actually using the exact same pallet twice in our runtime via pallet instancing. Thus, these two pallet instances will have all of the exact same events, parameters, and even functions.&#xD;&#xA;&#xD;&#xA;The way we distinguish these two, is that we also prepend the encoded bytes with the pallet index first.&#xD;&#xA;&#xD;&#xA;So the second event (index 1) of `Pallet1` will be encoded as `0x0101`, whereas the same event in `Pallet2` will be encoded as `0x0201`.&#xD;&#xA;&#xD;&#xA;The same can be said for extrinsics, errors, and other &quot;aggregated&quot; types." ContentLicense="CC BY-SA 4.0" />
  <row Id="21881" PostHistoryTypeId="4" PostId="5705" RevisionGUID="bbf42aad-55ff-4b2f-8cd8-70d1fd4a1053" CreationDate="2022-11-05T21:43:47.020" UserId="28" Comment="edited tags; edited title" Text="Event encoding in substrate pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="21882" PostHistoryTypeId="6" PostId="5705" RevisionGUID="bbf42aad-55ff-4b2f-8cd8-70d1fd4a1053" CreationDate="2022-11-05T21:43:47.020" UserId="28" Comment="edited tags; edited title" Text="|pallet|rust|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21883" PostHistoryTypeId="2" PostId="5714" RevisionGUID="cf204ca5-f4cd-4456-9b75-5c3d60597c3d" CreationDate="2022-11-05T21:43:50.787" UserId="474" Text="At the time of writing, the master branch of Subxt now supports asking for (recent) blocks and iterating over the extrinsics and their associated events; check out this example for more:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/subxt/blob/33a9ec91afd16c459871e24ae18576f7afbb87c1/examples/examples/subscribe_blocks.rs&#xD;&#xA;&#xD;&#xA;Essentially something like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let block = api.blocks().at(block_hash).await?;&#xD;&#xA;let body = block.body().await?;&#xD;&#xA;&#xD;&#xA;for ext in body.extrinsics() {&#xD;&#xA;    // print the bytes in each extrinsic:&#xD;&#xA;    println!(&quot;0x{}&quot;, hex::encode(ext.bytes()));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will give you back `0x` prefixed hex encoded bytes for each extrinsic in the block, which you can do as you wish with." ContentLicense="CC BY-SA 4.0" />
  <row Id="21888" PostHistoryTypeId="2" PostId="5715" RevisionGUID="71678717-95f0-4e30-9e79-b379d570bc57" CreationDate="2022-11-05T22:00:42.923" UserId="474" Text="Subxt should be able to do anything that makes sense in this area.&#xD;&#xA;&#xD;&#xA;For your first function, Subxt can help to construct the &quot;call data&quot; part of an extrinsic (check out the examples in general to see how we can build a transaction, eg here: https://github.com/paritytech/subxt/blob/33a9ec91afd16c459871e24ae18576f7afbb87c1/examples/examples/balance_transfer.rs#L34, and then with that you can call `api.tx().call_data(the_tx)` to get the call data bytes from it).&#xD;&#xA;&#xD;&#xA;For your second function, I'm not exactly clear what the &quot;signature&quot; is that you're referring to (ie is it in fact a combination of signature and extra params?). To step back, a signed extrinsic consists roughly of the following, in order (SCALE encoded):&#xD;&#xA;- compact encoded length in bytes of the extrinsic&#xD;&#xA;- 1 byte: `0b10000000 + 4u8` (for &quot;this is signed&quot; + &quot;version 4 format&quot;)&#xD;&#xA;- Address that extrinsic is sent from&#xD;&#xA;- Signature (not only the call data but additional and extra params are also signed)&#xD;&#xA;- The call data.&#xD;&#xA;&#xD;&#xA;So depending on what you actually have already, it should be fairly straightforward to piece the parts together. The subxt source on building an extrinsic is, IMO, very readable too, and might help:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/subxt/blob/33a9ec91afd16c459871e24ae18576f7afbb87c1/subxt/src/tx/tx_client.rs#L124&#xD;&#xA;&#xD;&#xA;And finally, just to say that the &quot;standard&quot; approach here would be that you would construct and sign an extrinsic all via Subxt (by providing any `Signer` implementation to do the actual signing), optionally entirely offline, and then use Subxt to then submit those bytes from a network enabled device." ContentLicense="CC BY-SA 4.0" />
  <row Id="21890" PostHistoryTypeId="2" PostId="5716" RevisionGUID="27f294b6-85ea-434b-a4df-87bcf24cd4ea" CreationDate="2022-11-05T22:16:52.797" UserId="474" Text="The questions you pose are more general in scope really; if you want to store anything private in local storage, a good bet is probably to find a good secure symmetric encryption algorithm (maybe aes256?) to encrypt the information first before putting it into local storage, and then requiring the same (strong) password to decrypt the information into memory when you need to make use of it. With that approach, you don't need to store a hashed password or anything like that (I'm not sure why you would offhand); you just use the user submitted password to decrypt and encrypt as needed." ContentLicense="CC BY-SA 4.0" />
  <row Id="21892" PostHistoryTypeId="2" PostId="5717" RevisionGUID="86e3c9dd-a529-4ea3-9e87-ff89cea83993" CreationDate="2022-11-06T01:54:10.597" UserId="3408" Text="If I have a StorageValue which is for example a rust BTree, and my custom pallets interacts with that BTree which should an invariant - let's say it's a BTree of integers, and `n` can be added to that BTree if and only if `n-1` and `n+1` are not present in that BTree.&#xD;&#xA;&#xD;&#xA;How does it deal with synchronization issues between nodes? For example, let's say I am the one who created the block, and I tried inserting the number 8 to it. Then, another node tries inserting the number 9 to it. I assume that since I am the one who created the block, 8 was added and 9 was not. But how does the other node verify that I altered the storage item according to protocol and that it still holds the invariant we assume that BTree should always hold? What if my node is a malicious node and added 8 and 9 together? How is it checked?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21894" PostHistoryTypeId="1" PostId="5717" RevisionGUID="86e3c9dd-a529-4ea3-9e87-ff89cea83993" CreationDate="2022-11-06T01:54:10.597" UserId="3408" Text="How do nodes reach a consensus on storage items from a custom pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21895" PostHistoryTypeId="3" PostId="5717" RevisionGUID="86e3c9dd-a529-4ea3-9e87-ff89cea83993" CreationDate="2022-11-06T01:54:10.597" UserId="3408" Text="|storage|nodes|sync|storagenmap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21896" PostHistoryTypeId="2" PostId="5718" RevisionGUID="e5e4d0ac-3e73-4c33-b3c5-041cca742fd9" CreationDate="2022-11-06T05:13:17.037" UserId="3409" Text="I have been trying to pull the validator-level data for Polkadot for a project I am working on. I am using [this API][1] and have been unable to find a command I need. Ideally, the request URL would either return the number of validators for each day/era/epoch (any of those work), or even better, would return validator-level information for each validator staking during each day/era/epoch. I see requests for current validator information, but I can't see how to access historical data. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Does anyone know of a request URL that would work for this, or another API which would have this information? Thanks in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.subscan.io" ContentLicense="CC BY-SA 4.0" />
  <row Id="21898" PostHistoryTypeId="1" PostId="5718" RevisionGUID="e5e4d0ac-3e73-4c33-b3c5-041cca742fd9" CreationDate="2022-11-06T05:13:17.037" UserId="3409" Text="Accessing historical data for validators from the API" ContentLicense="CC BY-SA 4.0" />
  <row Id="21899" PostHistoryTypeId="3" PostId="5718" RevisionGUID="e5e4d0ac-3e73-4c33-b3c5-041cca742fd9" CreationDate="2022-11-06T05:13:17.037" UserId="3409" Text="|polkadot|validator|api|python|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21900" PostHistoryTypeId="5" PostId="5694" RevisionGUID="1250ea56-665d-42b3-b85d-18540a67e48e" CreationDate="2022-11-06T08:17:58.537" UserId="251" Comment="added 4 characters in body" Text="Did you use any `--pruning xxx`/`--unsafe-pruning` flag?&#xD;&#xA;&#xD;&#xA;Or maybe it is the default behavior in Substrate now.&#xD;&#xA;&#xD;&#xA;Try booting with `--pruning archive`. And I think it will make a fully resync." ContentLicense="CC BY-SA 4.0" />
  <row Id="21908" PostHistoryTypeId="2" PostId="5721" RevisionGUID="0d1b057e-c575-4df8-a063-016b577e6b45" CreationDate="2022-11-06T16:55:38.817" UserId="521" Text=".&#xD;&#xA;&#xD;&#xA;Let's start with consensus. Nodes do not directly agree on what storage values your custom pallet has but on what block should be included next in the chain. Block, in turn, consists of transactions, each of which may or may not modify the storage state. When a node receives a block, it executes sequentially all of its transactions thus actualizing the storage state as well, so all nodes will have the same storage state after executing the same set of blocks given that transactions are deterministic.&#xD;&#xA;&#xD;&#xA;Regarding the maintenance of the B-tree invariant - that is actually the responsibility of the node's Runtime - the business logic compiled to wasm that all nodes currently agreed on to be active based on transactions from the blocks, as mentioned above. So here we have two options:&#xD;&#xA; * Either B-tree structure validates the invariant you mentioned&#xD;&#xA; * Or your business logic should validate it each time access happens and emit an error if the invariant is violated&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21910" PostHistoryTypeId="5" PostId="5721" RevisionGUID="ee98db40-d895-4b0d-b819-6428fa62ebfd" CreationDate="2022-11-06T17:02:46.470" UserId="521" Comment="added 23 characters in body" Text=".&#xD;&#xA;&#xD;&#xA;Let's start with consensus. Nodes do not directly agree on what storage values your custom pallet has but on what block should be included next in the chain. Block, in turn, consists of transactions, each of which may or may not modify the storage state. When a node receives a block, it executes sequentially all of its transactions thus actualizing the storage state as well, so all nodes will have the same storage state after executing the same set of blocks given that transactions are deterministic.&#xD;&#xA;&#xD;&#xA;Regarding the maintenance of the B-tree invariant - that is actually the responsibility of the node's Runtime - the business logic compiled to wasm that all nodes currently agreed on to be active based on transactions from the blocks, as mentioned above. So here we have two options:&#xD;&#xA; * Either B-tree structure validates the invariant you mentioned&#xD;&#xA; * Or your business logic (aka your pallet code) should validate it each time access happens and emit an error if the invariant is violated&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="21911" PostHistoryTypeId="2" PostId="5722" RevisionGUID="4d847658-cb8c-4d5f-9d50-deaec028e436" CreationDate="2022-11-07T00:05:19.383" UserId="3410" Text="I am developing polkadot version from 0.9.25 to 0.9.31.&#xD;&#xA;When I run cargo build --release, it shows&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/gdCzD.png&#xD;&#xA;&#xD;&#xA;Any body has experience about this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21913" PostHistoryTypeId="1" PostId="5722" RevisionGUID="4d847658-cb8c-4d5f-9d50-deaec028e436" CreationDate="2022-11-07T00:05:19.383" UserId="3410" Text="failed to select a version for `parity-util-mem` when upgrade polkadot version to 0.9.31" ContentLicense="CC BY-SA 4.0" />
  <row Id="21914" PostHistoryTypeId="3" PostId="5722" RevisionGUID="4d847658-cb8c-4d5f-9d50-deaec028e436" CreationDate="2022-11-07T00:05:19.383" UserId="3410" Text="|polkadot|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21915" PostHistoryTypeId="2" PostId="5723" RevisionGUID="de039214-dbad-41c7-b9b7-5fe5dd699b62" CreationDate="2022-11-07T01:14:51.383" UserId="3407" Text="From looking at the subscan API, I also couldn't find a way to pull validator-level data from a historic session.&#xD;&#xA;&#xD;&#xA;However, you can find the [session info][1] for a given sessionIndex by using [this call][2] from the polkadot.js API. As sessions on polkadot are the [same length as epochs][3], you can get the current session index, and then just decrement the index to query backwards and get a list of validators for each past epoch.&#xD;&#xA;&#xD;&#xA;There may be an undocumented way to do this in subscan, but based only on API documentation, this is probably the best way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:https://github.com/paritytech/polkadot/blob/143a30874f618c9f3c1e8eca09a526e432382572/roadmap/implementers-guide/src/runtime/session_info.md&#xD;&#xA;[2]:https://polkadot.js.org/docs/substrate/runtime#sessioninfoindex-sessionindex-optionsessioninfo&#xD;&#xA;[3]:https://wiki.polkadot.network/docs/maintain-polkadot-parameters" ContentLicense="CC BY-SA 4.0" />
  <row Id="21917" PostHistoryTypeId="2" PostId="5724" RevisionGUID="ef67ec9f-8731-4d69-bd8f-e0abfa685fd2" CreationDate="2022-11-07T02:39:25.947" UserId="3109" Text="&#xD;&#xA;I generate key pairs on my first machine and modify the customspec.json and generate customspecRaw.json and distribute my customspecRaw.json to other machines I want to add. Okay My question is that It is necessary to generate keys on other machines too and modify their customspec.json or just share first machine customespecRaw.json and run the command to start the 2nd node.??" ContentLicense="CC BY-SA 4.0" />
  <row Id="21919" PostHistoryTypeId="1" PostId="5724" RevisionGUID="ef67ec9f-8731-4d69-bd8f-e0abfa685fd2" CreationDate="2022-11-07T02:39:25.947" UserId="3109" Text="Add Validators to your substrate node template" ContentLicense="CC BY-SA 4.0" />
  <row Id="21920" PostHistoryTypeId="3" PostId="5724" RevisionGUID="ef67ec9f-8731-4d69-bd8f-e0abfa685fd2" CreationDate="2022-11-07T02:39:25.947" UserId="3109" Text="|substrate-node-template|nodes|substrate-front-end|substrate-parachain-template|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21921" PostHistoryTypeId="2" PostId="5725" RevisionGUID="da9b5632-5287-4b2b-8c5d-b98a619ef914" CreationDate="2022-11-07T02:59:25.160" UserId="3410" Text="I have error while cargo build -- release on polkadot v0.9.31&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;error: failed to select a version for `parity-util-mem`.&#xD;&#xA;    ... required by package `sp-core v6.0.0`&#xD;&#xA;    ... which satisfies dependency `sp-core = &quot;^6.0.0&quot;` of package `sp-keyring v6.0.0`&#xD;&#xA;    ... which satisfies dependency `sp-keyring = &quot;^6.0.0&quot;` of package `integration-tests v4.0.0-dev (/eric/VoiceBanBackend/integration-tests)`&#xD;&#xA;versions that meet the requirements `^0.11.0` are: 0.11.0&#xD;&#xA;&#xD;&#xA;the package `parity-util-mem` links to the native library `parity-util-mem-ban-duplicates`, but it conflicts with a previous package which links to `parity-util-mem-ban-duplicates` as well:&#xD;&#xA;package `parity-util-mem v0.12.0`&#xD;&#xA;    ... which satisfies dependency `parity-util-mem = &quot;^0.12.0&quot;` of package `sc-informant v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#7a4e5163)`&#xD;&#xA;    ... which satisfies git dependency `sc-informant` of package `sc-service v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#7a4e5163)`&#xD;&#xA;    ... which satisfies git dependency `sc-service` of package `node-template v4.0.0-dev (/eric/VoiceBanBackend/node)`&#xD;&#xA;Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='parity-util-mem' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I saw niklasad1's commit, it is still under review.&#xD;&#xA;I'd like to use the latest polkadot version that include sp-core v7.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="21923" PostHistoryTypeId="1" PostId="5725" RevisionGUID="da9b5632-5287-4b2b-8c5d-b98a619ef914" CreationDate="2022-11-07T02:59:25.160" UserId="3410" Text="How can I use sp-core v7.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="21924" PostHistoryTypeId="3" PostId="5725" RevisionGUID="da9b5632-5287-4b2b-8c5d-b98a619ef914" CreationDate="2022-11-07T02:59:25.160" UserId="3410" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21927" PostHistoryTypeId="5" PostId="5725" RevisionGUID="f2af1146-765e-4cc0-8d5e-910e5e75431a" CreationDate="2022-11-07T03:15:37.063" UserId="251" Comment="added 13 characters in body" Text="I have an error while cargo build -- release on polkadot v0.9.31&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to select a version for `parity-util-mem`.&#xD;&#xA;    ... required by package `sp-core v6.0.0`&#xD;&#xA;    ... which satisfies dependency `sp-core = &quot;^6.0.0&quot;` of package `sp-keyring v6.0.0`&#xD;&#xA;    ... which satisfies dependency `sp-keyring = &quot;^6.0.0&quot;` of package `integration-tests v4.0.0-dev (/eric/VoiceBanBackend/integration-tests)`&#xD;&#xA;versions that meet the requirements `^0.11.0` are: 0.11.0&#xD;&#xA;&#xD;&#xA;the package `parity-util-mem` links to the native library `parity-util-mem-ban-duplicates`, but it conflicts with a previous package which links to `parity-util-mem-ban-duplicates` as well:&#xD;&#xA;package `parity-util-mem v0.12.0`&#xD;&#xA;    ... which satisfies dependency `parity-util-mem = &quot;^0.12.0&quot;` of package `sc-informant v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#7a4e5163)`&#xD;&#xA;    ... which satisfies git dependency `sc-informant` of package `sc-service v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#7a4e5163)`&#xD;&#xA;    ... which satisfies git dependency `sc-service` of package `node-template v4.0.0-dev (/eric/VoiceBanBackend/node)`&#xD;&#xA;Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='parity-util-mem' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I saw niklasad1's commit, it is still under review.&#xD;&#xA;I'd like to use the latest polkadot version that include sp-core v7.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="21928" PostHistoryTypeId="2" PostId="5726" RevisionGUID="665bf333-a585-4542-a74e-9e98059a1af5" CreationDate="2022-11-07T04:11:54.297" UserId="2678" Text="I am observing strange behavior with the Substrate Parachain Template. Our pallet uses [off-chain workers][1] (OCW), and the functionality successfully runs when we attach it to the Substrate Node Template.&#xD;&#xA;&#xD;&#xA;However, when I add our pallet to the [Cumulus Parachain Template][2] and follow the [Connect a Local Parachain guide][3], the functionality that requires off-chain workers stops running completely. I have tried adding events that are emitted directly after the OCW initializes, and they are not successfully emitted.&#xD;&#xA;&#xD;&#xA;Is there a reason that OCWs are not initializing on the Cumulus Parachain Template while they do run on the Node Template? Does the chainspec need to be altered in some way?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/SequesterChain/pallets/tree/main/donations&#xD;&#xA;  [2]: https://github.com/SequesterChain/sequester-parachain-template&#xD;&#xA;  [3]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/connect-a-local-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="21930" PostHistoryTypeId="1" PostId="5726" RevisionGUID="665bf333-a585-4542-a74e-9e98059a1af5" CreationDate="2022-11-07T04:11:54.297" UserId="2678" Text="Offchain Worker Not Initializing" ContentLicense="CC BY-SA 4.0" />
  <row Id="21931" PostHistoryTypeId="3" PostId="5726" RevisionGUID="665bf333-a585-4542-a74e-9e98059a1af5" CreationDate="2022-11-07T04:11:54.297" UserId="2678" Text="|substrate-node-template|offchain-worker|cumulus|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21932" PostHistoryTypeId="4" PostId="5726" RevisionGUID="00ee3049-e9d3-4204-8953-ee71a8a4fbfe" CreationDate="2022-11-07T04:23:30.170" UserId="2678" Comment="edited title" Text="Offchain Worker Not Initializing - Cumulus Parachain Template" ContentLicense="CC BY-SA 4.0" />
  <row Id="21935" PostHistoryTypeId="5" PostId="5726" RevisionGUID="6f92577d-2a6e-4ef5-b317-07f18480735c" CreationDate="2022-11-07T04:41:39.157" UserId="2678" Comment="deleted 2 characters in body" Text="I am observing strange behavior with the Cumulus Parachain Template. Our pallet uses [off-chain workers][1] (OCW), and the functionality successfully runs when we attach it to the Substrate Node Template.&#xD;&#xA;&#xD;&#xA;However, when I add our pallet to the [Cumulus Parachain Template][2] and follow the [Connect a Local Parachain guide][3], the functionality that requires off-chain workers stops running completely. I have tried adding events that are emitted directly after the OCW initializes, and they are not successfully emitted.&#xD;&#xA;&#xD;&#xA;Is there a reason that OCWs are not initializing on the Cumulus Parachain Template while they do run on the Node Template? Does the chainspec need to be altered in some way?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/SequesterChain/pallets/tree/main/donations&#xD;&#xA;  [2]: https://github.com/SequesterChain/sequester-parachain-template&#xD;&#xA;  [3]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/connect-a-local-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="21936" PostHistoryTypeId="2" PostId="5728" RevisionGUID="1a8f332d-b778-4908-a9d8-485a6b301869" CreationDate="2022-11-07T04:42:07.373" UserId="354" Text="It happens due to dependencies, you have to use the same dependency in every pallet so that there are no further conflicts." ContentLicense="CC BY-SA 4.0" />
  <row Id="21938" PostHistoryTypeId="2" PostId="5729" RevisionGUID="f93c741c-c9d3-48ff-b774-9e9ea75ccb8b" CreationDate="2022-11-07T04:50:07.127" UserId="354" Text="You don't need to create a new `customSpecRaw.json` for every node, just share the first nodes `customSpecRaw.json` and provides it node ID and IP address to the node that needs to join the network. You can refer to this [link][1] , for further instructions everything is explained step by step there.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/get-started/simulate-network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="21940" PostHistoryTypeId="2" PostId="5730" RevisionGUID="d033046c-e991-4a9c-ab5f-a11e3b6ea2fa" CreationDate="2022-11-07T04:50:45.557" UserId="3412" Text="I am running polkadot node with docker  - parity/polkadot:v0.9.30 &#xD;&#xA;and sidecar with parity/substrate-api-sidecar:v14.0.1 , the node synched to the latest, but when tried to query the sidecar, getting bad gateway error.&#xD;&#xA;&#xD;&#xA;Earlier to this I have parity/substrate-api-sidecar:v12.4.3 and parity/polkadot:v0.9.27 ;  using these I am able to get the data, after moving to latest version getting error&#xD;&#xA;Please suggest me here " ContentLicense="CC BY-SA 4.0" />
  <row Id="21942" PostHistoryTypeId="1" PostId="5730" RevisionGUID="d033046c-e991-4a9c-ab5f-a11e3b6ea2fa" CreationDate="2022-11-07T04:50:45.557" UserId="3412" Text="Substrate API not working with parity polkador node after upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="21943" PostHistoryTypeId="3" PostId="5730" RevisionGUID="d033046c-e991-4a9c-ab5f-a11e3b6ea2fa" CreationDate="2022-11-07T04:50:45.557" UserId="3412" Text="|sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21944" PostHistoryTypeId="5" PostId="5726" RevisionGUID="08d22729-cd79-4b4a-b4ee-449cd8acb4ba" CreationDate="2022-11-07T05:25:01.947" UserId="2678" Comment="added 3 characters in body" Text="I am observing unexpected behavior with the Cumulus Parachain Template. Our pallet uses [off-chain workers][1] (OCW), and the functionality successfully runs when we attach it to the Substrate Node Template.&#xD;&#xA;&#xD;&#xA;However, when I add our pallet to the [Cumulus Parachain Template][2] and follow the [Connect a Local Parachain guide][3], the functionality that requires off-chain workers stops running completely. I have tried adding events that are emitted directly after the OCW initializes, and they are not successfully emitted.&#xD;&#xA;&#xD;&#xA;Is there a reason that OCWs are not initializing on the Cumulus Parachain Template while they do run on the Node Template? Does the chainspec need to be altered in some way?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/SequesterChain/pallets/tree/main/donations&#xD;&#xA;  [2]: https://github.com/SequesterChain/sequester-parachain-template&#xD;&#xA;  [3]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/connect-a-local-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="21945" PostHistoryTypeId="2" PostId="5731" RevisionGUID="f6c5eae9-ef19-4d22-b4c3-58c35e64ebc4" CreationDate="2022-11-07T06:45:42.937" UserId="429" Text="If you want to execute your own asynchronous task, [service.rs][1] is the right place to trigger your functionality.&#xD;&#xA;&#xD;&#xA;If we go with the flow, `main()` function is calling the `command::run()`, which actually parses and runs the command line args (if you specify any), and by default, it will go to the `none` case, which builds the new service for the full client.&#xD;&#xA;&#xD;&#xA;    None =&gt; {&#xD;&#xA;			let runner = cli.create_runner(&amp;cli.run)?;&#xD;&#xA;			runner.run_node_until_exit(|config| async move {&#xD;&#xA;				service::new_full(config).map_err(sc_cli::Error::Service)&#xD;&#xA;			})&#xD;&#xA;		},&#xD;&#xA;&#xD;&#xA;Inside this `new_full()` function you can spawn your task in the task_manager like this:&#xD;&#xA;&#xD;&#xA;    task_manager.spawn_handle().spawn(&quot;name&quot;, &quot;group_name&quot;, myasyncFunction);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/service.rs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The error species that the current thread is already set to derive the asynchronous tasks so we cannot block that thread by adding any other calls.&#xD;&#xA;So, after initializing the flow, inside the node-&gt;service.rs we can trigger any asynchronous tasks.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="21951" PostHistoryTypeId="2" PostId="5733" RevisionGUID="5181e74f-9053-459d-a08e-145a27ebd9cf" CreationDate="2022-11-07T08:45:20.503" UserId="2673" Text="I don't think any external 'token standard' is applicable here. If you would like to know what kind of operations are supported you can look at the traits implemented by `balances` pallet: [Currency](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/currency/trait.Currency.html), [LockableCurrency](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/currency/trait.LockableCurrency.html), [ReservableCurrency](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/currency/trait.ReservableCurrency.html)." ContentLicense="CC BY-SA 4.0" />
  <row Id="21953" PostHistoryTypeId="2" PostId="5734" RevisionGUID="40daf6f9-bf7d-4404-959e-81b966ec7ee6" CreationDate="2022-11-07T09:44:56.647" UserId="3413" Text="I've created test address in westend network. Topped up it using faucet. https://westend.subscan.io/account/5FpS4PkRzLmJZcwvJM6jxPU3N3481nbnTe6nzFwwQUVvu9LF?tab=transfer. In explorer I see 1WND balance, but if I try to retrive it using rpc func I receive wrong amount&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;package main&#xD;&#xA;&#xD;&#xA;import (&#xD;&#xA;	&quot;encoding/hex&quot;&#xD;&#xA;	&quot;fmt&quot;&#xD;&#xA;	gsrpc &quot;github.com/centrifuge/go-substrate-rpc-client/v4&quot;&#xD;&#xA;	config2 &quot;github.com/centrifuge/go-substrate-rpc-client/v4/config&quot;&#xD;&#xA;	&quot;github.com/centrifuge/go-substrate-rpc-client/v4/types&quot;&#xD;&#xA;	&quot;github.com/vedhavyas/go-subkey&quot;&#xD;&#xA;	&quot;github.com/vedhavyas/go-subkey/sr25519&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;func GetBalance(api *gsrpc.SubstrateAPI) {&#xD;&#xA;&#xD;&#xA;	uri := balanceURI&#xD;&#xA;	key, err := GetKey(uri)&#xD;&#xA;	if err != nil {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;	addr := PrintAddr(&quot;test balance addr&quot;, key)&#xD;&#xA;	fmt.Println(&quot;addr = &quot;, addr)&#xD;&#xA;	public := key.Public()&#xD;&#xA;	fmt.Println(&quot;public: &quot;, &quot;0x&quot;+hex.EncodeToString(public))&#xD;&#xA;&#xD;&#xA;	meta, err := api.RPC.State.GetMetadataLatest()&#xD;&#xA;	if err != nil {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;	storageKey, err := types.CreateStorageKey(&#xD;&#xA;		meta, &quot;System&quot;, &quot;Account&quot;, public, nil)&#xD;&#xA;	if err != nil {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;	// Retrieve the initial balance&#xD;&#xA;	var accountInfo types.AccountInfo&#xD;&#xA;	ok, err := api.RPC.State.GetStorageLatest(storageKey, &amp;accountInfo)&#xD;&#xA;	if err != nil || !ok {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;	fmt.Println(accountInfo)&#xD;&#xA;	fmt.Println(&quot;Free balance: &quot;, accountInfo.Data.Free)&#xD;&#xA;	fmt.Println(&quot;FreeFrozen balance: &quot;, accountInfo.Data.FreeFrozen)&#xD;&#xA;	fmt.Println(&quot;MiscFrozen balance: &quot;, accountInfo.Data.MiscFrozen)&#xD;&#xA;	fmt.Println(&quot;Reserved balance: &quot;, accountInfo.Data.Reserved)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;func main() {&#xD;&#xA;	config := config2.Default()&#xD;&#xA;	config.RPCURL = WestEndUrl&#xD;&#xA;&#xD;&#xA;	api, err := gsrpc.NewSubstrateAPI(config.RPCURL)&#xD;&#xA;	if err != nil {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;	fmt.Println(api)&#xD;&#xA;&#xD;&#xA;	GetBalance(api)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;func GetKey(uri string) (subkey.KeyPair, error) {&#xD;&#xA;	scheme := sr25519.Scheme{}&#xD;&#xA;	kr, err := subkey.DeriveKeyPair(scheme, uri)&#xD;&#xA;	if err != nil {&#xD;&#xA;		return nil, err&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	return kr, nil&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;func PrintAddr(caption string, key subkey.KeyPair) string {&#xD;&#xA;	addr, err := key.SS58Address(42)&#xD;&#xA;	if err != nil {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fmt.Println(caption, addr)&#xD;&#xA;	return addr&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const WestEndUrl = &quot;wss://westend-rpc.polkadot.io&quot;&#xD;&#xA;const balanceURI = &quot;...//foo//42///password&quot;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the output:&#xD;&#xA;```&#xD;&#xA;GOROOT=/usr/local/go #gosetup&#xD;&#xA;GOPATH=/home/andrew/go #gosetup&#xD;&#xA;/usr/local/go/bin/go build -o /tmp/GoLand/___go_build_sample_westend_with_faucet sample/westend_with_faucet #gosetup&#xD;&#xA;/tmp/GoLand/___go_build_sample_westend_with_faucet&#xD;&#xA;2022/11/07 11:39:28 Connecting to wss://westend-rpc.polkadot.io...&#xD;&#xA;&amp;{0xc0000da580 0xc0001d2090}&#xD;&#xA;test balance addr 5FpS4PkRzLmJZcwvJM6jxPU3N3481nbnTe6nzFwwQUVvu9LF&#xD;&#xA;addr =  5FpS4PkRzLmJZcwvJM6jxPU3N3481nbnTe6nzFwwQUVvu9LF&#xD;&#xA;public:  0xa60e515cdbf7e1426e9d708bc78ee0ed7d0f4c5c04951be09e37e70ad31a487c&#xD;&#xA;{0 0 1 {4294967296000000000000 0 0 0}}&#xD;&#xA;Free balance:  4294967296000000000000&#xD;&#xA;FreeFrozen balance:  0&#xD;&#xA;MiscFrozen balance:  0&#xD;&#xA;Reserved balance:  0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;amount is 4294967296000000000000 - it's not equal to 1WND" ContentLicense="CC BY-SA 4.0" />
  <row Id="21955" PostHistoryTypeId="1" PostId="5734" RevisionGUID="40daf6f9-bf7d-4404-959e-81b966ec7ee6" CreationDate="2022-11-07T09:44:56.647" UserId="3413" Text="incorrect balance response" ContentLicense="CC BY-SA 4.0" />
  <row Id="21956" PostHistoryTypeId="3" PostId="5734" RevisionGUID="40daf6f9-bf7d-4404-959e-81b966ec7ee6" CreationDate="2022-11-07T09:44:56.647" UserId="3413" Text="|rpc|balances|westend|golang|free-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21957" PostHistoryTypeId="2" PostId="5735" RevisionGUID="f99e19b1-b811-4508-ad19-d5a8b592584c" CreationDate="2022-11-07T10:39:41.293" UserId="3385" Text="Given a contract's state:&#xD;&#xA;```rust&#xD;&#xA;struct MyContract {&#xD;&#xA;  my_map: Mapping&lt;AccountId, BlockNumber&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I efficiently read all of `my_map` entries? " ContentLicense="CC BY-SA 4.0" />
  <row Id="21959" PostHistoryTypeId="1" PostId="5735" RevisionGUID="f99e19b1-b811-4508-ad19-d5a8b592584c" CreationDate="2022-11-07T10:39:41.293" UserId="3385" Text="Reading contract's map" ContentLicense="CC BY-SA 4.0" />
  <row Id="21960" PostHistoryTypeId="3" PostId="5735" RevisionGUID="f99e19b1-b811-4508-ad19-d5a8b592584c" CreationDate="2022-11-07T10:39:41.293" UserId="3385" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21962" PostHistoryTypeId="2" PostId="5736" RevisionGUID="c400b5cf-675d-4e1e-9e44-c9102cb27e6c" CreationDate="2022-11-07T11:08:23.667" UserId="2762" Text="This is an issue with versions, sp-core uses the parity-util-mem but there is conflict which another dependdency that is using parity-util-mem too but in a different version.&#xD;&#xA;&#xD;&#xA;Make sure you have all dependencies in the same version.&#xD;&#xA;&#xD;&#xA;Check the runtime/Cargo.toml and make sure all are importing from the branch `polkadot-v0.9.31` :&#xD;&#xA;&#xD;&#xA;    sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.31&quot; }&#xD;&#xA;&#xD;&#xA;And in the Cargo.toml of your pallets too.&#xD;&#xA;&#xD;&#xA;For more info about how to make the update to the polakdot v0.9.31 you can check this [PR][1] that updates it in the Substrate Node Template.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/commit/378a3e5ae41df1af0ef1a66b2076342bce678688" ContentLicense="CC BY-SA 4.0" />
  <row Id="21964" PostHistoryTypeId="2" PostId="5737" RevisionGUID="a8176bad-ed41-4332-a930-74cd88bedf98" CreationDate="2022-11-07T11:09:36.267" UserId="3304" Text="how to describe the transactional flow of polkadot using relaychains and bridges using sequence diagram describing any usecase can anyone help in doing so..." ContentLicense="CC BY-SA 4.0" />
  <row Id="21966" PostHistoryTypeId="1" PostId="5737" RevisionGUID="a8176bad-ed41-4332-a930-74cd88bedf98" CreationDate="2022-11-07T11:09:36.267" UserId="3304" Text="Polkadot Transaction flow using relaychains and bridges" ContentLicense="CC BY-SA 4.0" />
  <row Id="21967" PostHistoryTypeId="3" PostId="5737" RevisionGUID="a8176bad-ed41-4332-a930-74cd88bedf98" CreationDate="2022-11-07T11:09:36.267" UserId="3304" Text="|polkadot|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21968" PostHistoryTypeId="2" PostId="5738" RevisionGUID="133dc20a-21a7-44f2-9619-f1e5c390ddba" CreationDate="2022-11-07T11:16:54.440" UserId="16" Text="No, you cannot access the salt. For good reasons: The account id derivation algorithm isn't fixed and can be differ between chains. It would make your contract non portable. So you should not rely on that and this is why we don't expose this information.&#xD;&#xA;&#xD;&#xA;That said, I think we might have a X Y problem here. In order to get help recommend to open a new question where you explain what you are trying to do and most importantly **why**. Then we might find a solution which does not require to rely on the implementation details of the account id derivation." ContentLicense="CC BY-SA 4.0" />
  <row Id="21971" PostHistoryTypeId="12" PostId="5728" RevisionGUID="a953da6f-c8db-4e5d-88f7-6b034f67f152" CreationDate="2022-11-07T11:58:55.233" UserId="354" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:354,&quot;DisplayName&quot;:&quot;Shubham Gupta&quot;}]}" />
  <row Id="21972" PostHistoryTypeId="13" PostId="5728" RevisionGUID="4b5d5576-6c92-429b-be03-6e8eb8cca3e2" CreationDate="2022-11-07T11:59:02.907" UserId="354" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:354,&quot;DisplayName&quot;:&quot;Shubham Gupta&quot;}]}" />
  <row Id="21973" PostHistoryTypeId="2" PostId="5739" RevisionGUID="2c456f97-ed83-4202-8f40-02547835f20e" CreationDate="2022-11-07T12:02:10.793" UserId="2762" Text=" - Take a look into this blog post [Polkadot Bridges - Connecting the Polkadot Ecosystem with External Networks][1] &#xD;&#xA;- The Polkadot Wiki about [bridges][2]&#xD;&#xA;- An a more concrete example: [Interlay][3] they are building a trustless bridge from Bitcoin to Polkadot.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/blog/polkadot-bridges-connecting-the-polkadot-ecosystem-with-external-networks/&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-bridges&#xD;&#xA;  [3]: https://docs.interlay.io/#/getting-started/interbtc" ContentLicense="CC BY-SA 4.0" />
  <row Id="21975" PostHistoryTypeId="2" PostId="5740" RevisionGUID="fe7253cb-6849-4b72-8fe8-a3f2640c7391" CreationDate="2022-11-07T12:23:31.413" UserId="2762" Text="Take a look into this tool [substrate-api-sidecar][1], it makes easy to interact with blockchain nodes via API queries.&#xD;&#xA;&#xD;&#xA;Connect the tool into your local network or into Polkadot creating a .env file with:&#xD;&#xA;&#xD;&#xA;    SAS_SUBSTRATE_URL=wss://rpc.polkadot.io&#xD;&#xA;&#xD;&#xA;Take a look here in all the queries available with the tool: https://paritytech.github.io/substrate-api-sidecar/dist/&#xD;&#xA;&#xD;&#xA;You can query the staking data in a certain block with `/pallets/staking/progress` or payouts and info of certain accounts with the queries `/accounts/{accountId}/staking-payouts`  and `/accounts/{accountId}/staking-info` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-api-sidecar" ContentLicense="CC BY-SA 4.0" />
  <row Id="21977" PostHistoryTypeId="2" PostId="5741" RevisionGUID="2e89c6e5-4013-4691-b0ed-e8b73c82e6b1" CreationDate="2022-11-07T12:29:36.317" UserId="16" Text="The way you would handle that is to pack `a` and `b` into a single struct. As you pointed out you can't use `read_as` in that case since that type will not be bounded. Do this instead:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let env = env.buf_in_buf_out();&#xD;&#xA;let len = env.in_len();&#xD;&#xA;// TODO: sanity check len and maybe charge some weight based on that&#xD;&#xA;let input: MyStruct = env.read_as_unbounded(len)?;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="21979" PostHistoryTypeId="2" PostId="5742" RevisionGUID="bd545c86-96a4-46b4-a899-818b9633fc5f" CreationDate="2022-11-07T12:52:03.043" UserId="2762" Text="Be extremely careful when store something sensitive in Local Storage.&#xD;&#xA;&#xD;&#xA;I suggest you take a look into what Metamask is doing to store this data.&#xD;&#xA;&#xD;&#xA;They take the seed phrase and all accounts data bundled together, encrypted with an encryption key generated from the user password.&#xD;&#xA;&#xD;&#xA;You can check your encrypted data:&#xD;&#xA;&#xD;&#xA;    chrome.storage.local.get('data', result =&gt; {&#xD;&#xA;       var vault = result.data.KeyringController.vault&#xD;&#xA;       console.log(vault)&#xD;&#xA;    })&#xD;&#xA;&#xD;&#xA;And it decrypts it with the [Vault Decryptor][1].&#xD;&#xA;&#xD;&#xA;Check the full article about [How to recover your Secret Recovery Phrase][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/MetaMask/vault-decryptor&#xD;&#xA;  [2]: https://metamask.zendesk.com/hc/en-us/articles/360018766351-How-to-use-the-Vault-Decryptor-with-the-MetaMask-Vault-Data" ContentLicense="CC BY-SA 4.0" />
  <row Id="21981" PostHistoryTypeId="6" PostId="5699" RevisionGUID="c9b79c51-4766-42dc-b0c8-8805830d69de" CreationDate="2022-11-07T13:34:13.020" UserId="2673" Comment="Added 'balances' tag" Text="|balances|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21982" PostHistoryTypeId="24" PostId="5699" RevisionGUID="c9b79c51-4766-42dc-b0c8-8805830d69de" CreationDate="2022-11-07T13:34:13.020" Comment="Proposed by 2673 approved by 3346 edit id of 333" ContentLicense="CC BY-SA 4.0" />
  <row Id="21987" PostHistoryTypeId="6" PostId="5616" RevisionGUID="ddaa77ae-fb91-4566-b2fe-477b31899020" CreationDate="2022-11-07T14:43:21.127" UserId="29" Comment="edited tags" Text="|ink|chain-extension|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="21988" PostHistoryTypeId="5" PostId="5734" RevisionGUID="5ac485ae-476b-460a-a40c-f6c085f56383" CreationDate="2022-11-07T14:52:18.570" UserId="2673" Comment="Golang syntax highlighting" Text="I've created test address in westend network. Topped up it using faucet. https://westend.subscan.io/account/5FpS4PkRzLmJZcwvJM6jxPU3N3481nbnTe6nzFwwQUVvu9LF?tab=transfer. In explorer I see 1WND balance, but if I try to retrive it using rpc func I receive wrong amount&#xD;&#xA;&#xD;&#xA;```golang&#xD;&#xA;package main&#xD;&#xA;&#xD;&#xA;import (&#xD;&#xA;	&quot;encoding/hex&quot;&#xD;&#xA;	&quot;fmt&quot;&#xD;&#xA;	gsrpc &quot;github.com/centrifuge/go-substrate-rpc-client/v4&quot;&#xD;&#xA;	config2 &quot;github.com/centrifuge/go-substrate-rpc-client/v4/config&quot;&#xD;&#xA;	&quot;github.com/centrifuge/go-substrate-rpc-client/v4/types&quot;&#xD;&#xA;	&quot;github.com/vedhavyas/go-subkey&quot;&#xD;&#xA;	&quot;github.com/vedhavyas/go-subkey/sr25519&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;func GetBalance(api *gsrpc.SubstrateAPI) {&#xD;&#xA;&#xD;&#xA;	uri := balanceURI&#xD;&#xA;	key, err := GetKey(uri)&#xD;&#xA;	if err != nil {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;	addr := PrintAddr(&quot;test balance addr&quot;, key)&#xD;&#xA;	fmt.Println(&quot;addr = &quot;, addr)&#xD;&#xA;	public := key.Public()&#xD;&#xA;	fmt.Println(&quot;public: &quot;, &quot;0x&quot;+hex.EncodeToString(public))&#xD;&#xA;&#xD;&#xA;	meta, err := api.RPC.State.GetMetadataLatest()&#xD;&#xA;	if err != nil {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;	storageKey, err := types.CreateStorageKey(&#xD;&#xA;		meta, &quot;System&quot;, &quot;Account&quot;, public, nil)&#xD;&#xA;	if err != nil {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;	// Retrieve the initial balance&#xD;&#xA;	var accountInfo types.AccountInfo&#xD;&#xA;	ok, err := api.RPC.State.GetStorageLatest(storageKey, &amp;accountInfo)&#xD;&#xA;	if err != nil || !ok {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;	fmt.Println(accountInfo)&#xD;&#xA;	fmt.Println(&quot;Free balance: &quot;, accountInfo.Data.Free)&#xD;&#xA;	fmt.Println(&quot;FreeFrozen balance: &quot;, accountInfo.Data.FreeFrozen)&#xD;&#xA;	fmt.Println(&quot;MiscFrozen balance: &quot;, accountInfo.Data.MiscFrozen)&#xD;&#xA;	fmt.Println(&quot;Reserved balance: &quot;, accountInfo.Data.Reserved)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;func main() {&#xD;&#xA;	config := config2.Default()&#xD;&#xA;	config.RPCURL = WestEndUrl&#xD;&#xA;&#xD;&#xA;	api, err := gsrpc.NewSubstrateAPI(config.RPCURL)&#xD;&#xA;	if err != nil {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;	fmt.Println(api)&#xD;&#xA;&#xD;&#xA;	GetBalance(api)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;func GetKey(uri string) (subkey.KeyPair, error) {&#xD;&#xA;	scheme := sr25519.Scheme{}&#xD;&#xA;	kr, err := subkey.DeriveKeyPair(scheme, uri)&#xD;&#xA;	if err != nil {&#xD;&#xA;		return nil, err&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	return kr, nil&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;func PrintAddr(caption string, key subkey.KeyPair) string {&#xD;&#xA;	addr, err := key.SS58Address(42)&#xD;&#xA;	if err != nil {&#xD;&#xA;		panic(err)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fmt.Println(caption, addr)&#xD;&#xA;	return addr&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const WestEndUrl = &quot;wss://westend-rpc.polkadot.io&quot;&#xD;&#xA;const balanceURI = &quot;...//foo//42///password&quot;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the output:&#xD;&#xA;```&#xD;&#xA;GOROOT=/usr/local/go #gosetup&#xD;&#xA;GOPATH=/home/andrew/go #gosetup&#xD;&#xA;/usr/local/go/bin/go build -o /tmp/GoLand/___go_build_sample_westend_with_faucet sample/westend_with_faucet #gosetup&#xD;&#xA;/tmp/GoLand/___go_build_sample_westend_with_faucet&#xD;&#xA;2022/11/07 11:39:28 Connecting to wss://westend-rpc.polkadot.io...&#xD;&#xA;&amp;{0xc0000da580 0xc0001d2090}&#xD;&#xA;test balance addr 5FpS4PkRzLmJZcwvJM6jxPU3N3481nbnTe6nzFwwQUVvu9LF&#xD;&#xA;addr =  5FpS4PkRzLmJZcwvJM6jxPU3N3481nbnTe6nzFwwQUVvu9LF&#xD;&#xA;public:  0xa60e515cdbf7e1426e9d708bc78ee0ed7d0f4c5c04951be09e37e70ad31a487c&#xD;&#xA;{0 0 1 {4294967296000000000000 0 0 0}}&#xD;&#xA;Free balance:  4294967296000000000000&#xD;&#xA;FreeFrozen balance:  0&#xD;&#xA;MiscFrozen balance:  0&#xD;&#xA;Reserved balance:  0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;amount is 4294967296000000000000 - it's not equal to 1WND" ContentLicense="CC BY-SA 4.0" />
  <row Id="21989" PostHistoryTypeId="24" PostId="5734" RevisionGUID="5ac485ae-476b-460a-a40c-f6c085f56383" CreationDate="2022-11-07T14:52:18.570" Comment="Proposed by 2673 approved by 29 edit id of 334" ContentLicense="CC BY-SA 4.0" />
  <row Id="21990" PostHistoryTypeId="5" PostId="5731" RevisionGUID="2e13863b-9210-4a6a-bc89-c565ca1630d8" CreationDate="2022-11-07T14:56:57.020" UserId="29" Comment="added 2 characters in body" Text="If you want to execute your own asynchronous task, [service.rs][1] is the right place to trigger your functionality.&#xD;&#xA;&#xD;&#xA;If we go with the flow, `main()` function is calling the `command::run()`, which actually parses and runs the command line args (if you specify any), and by default, it will go to the `none` case, which builds the new service for the full client.&#xD;&#xA;&#xD;&#xA;    None =&gt; {&#xD;&#xA;			let runner = cli.create_runner(&amp;cli.run)?;&#xD;&#xA;			runner.run_node_until_exit(|config| async move {&#xD;&#xA;				service::new_full(config).map_err(sc_cli::Error::Service)&#xD;&#xA;			})&#xD;&#xA;		},&#xD;&#xA;&#xD;&#xA;Inside this `new_full()` function you can spawn your task in the task_manager like this:&#xD;&#xA;&#xD;&#xA;    task_manager.spawn_handle().spawn(&quot;name&quot;, &quot;group_name&quot;, myasyncFunction);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/service.rs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The error specifies that the current thread is already set to derive the asynchronous tasks so we cannot block that thread by adding any other calls.&#xD;&#xA;So, after initializing the flow, inside the node-&gt;service.rs we can trigger any asynchronous tasks.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="21991" PostHistoryTypeId="4" PostId="5730" RevisionGUID="1e198a9c-17c1-49c3-9a60-d44348b16730" CreationDate="2022-11-07T15:05:24.203" UserId="29" Comment="edited title" Text="Substrate API not working with parity polkadot node after upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="21992" PostHistoryTypeId="5" PostId="5569" RevisionGUID="ec9477c6-e697-4cd2-88e1-c771258c27ae" CreationDate="2022-11-07T15:15:39.890" UserId="3" Comment="added 4 characters in body" Text="Using `pallet-proxy`, you can execute the following sequence of calls:&#xD;&#xA;&#xD;&#xA;- Create a new pure proxy account using `anonymous`. Let's say this reserves 10 DEV on your main account.&#xD;&#xA;- (Optional) Call some function which reserves 15 DEV on the newly created anonymous account.&#xD;&#xA;- Call `remove_proxy` from the anonymous account.&#xD;&#xA;&#xD;&#xA;The result is: You lose control over the anonymous account (obviously), but the funds that you reserved for creating the account remain reserved because instead of being unreserved on _your_ account, they are unreserved on the anonymous account, leaving the anonymous account with 10 free and 5 reserved DEV, which might confuse whoever reserved those 15 DEV in step 2.&#xD;&#xA;&#xD;&#xA;Judging by [this comment](https://github.com/paritytech/substrate/blob/37cca710eed3dadd4ed5364c7686608f5175cce1/frame/proxy/src/lib.rs#L270-L271), this is (sort-of) intended behavior. Why?&#xD;&#xA;&#xD;&#xA;Sure, you can probably burn money in more creative ways, but why doesn't `pallet-proxy` manage anonymous accounts and conventional proxies separately to prevent this strange interaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="21993" PostHistoryTypeId="5" PostId="5397" RevisionGUID="4f7333ad-a256-405b-968e-3ecb1c680266" CreationDate="2022-11-07T15:51:21.273" UserId="3331" Comment="Added the solution." Text="## The Goal:&#xD;&#xA;Deploying a Relay Chain with Custom Validator Keys, that a Parachain can start collation successfully.&#xD;&#xA;&#xD;&#xA;## The Issue I've Got:&#xD;&#xA;Using the `key` subcommand in the Relay, I wasn't able to properly insert the Session Keys to the Relay nodes' keystore. And haven't found any mention whatsoever in how-to.&#xD;&#xA;&#xD;&#xA;## The Solution:&#xD;&#xA;After trying a lot of things, I've found from an RPC call that there's 7 keys needed for each Validator node. Those are, `gran` `babe` `imon` `para` `asgn` `audi` `beef`. And for each key-type there's a scheme, there's a table to reference.&#xD;&#xA;&#xD;&#xA;| Key-Type | Scheme  |&#xD;&#xA;| :------: | :-----: |&#xD;&#xA;|   gran   | ed25519 |&#xD;&#xA;|   babe   | sr25519 |&#xD;&#xA;|   imon   | sr25519 |&#xD;&#xA;|   para   | sr25519 |&#xD;&#xA;|   asgn   | sr25519 |&#xD;&#xA;|   audi   | sr25519 |&#xD;&#xA;|   beef   |  ecdsa  |&#xD;&#xA;&#xD;&#xA;Insert them like this,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot key insert \&#xD;&#xA;--base-path /tmp/relay/relay \&#xD;&#xA;--chain relay-raw.json \&#xD;&#xA;--scheme ed25519 \&#xD;&#xA;--suri &quot;&lt;your mnemonic&gt;&quot; \&#xD;&#xA;--key-type gran&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So to properly insert the session keys in order to a Parachain start collating successfully 7 different key-types are needed. " ContentLicense="CC BY-SA 4.0" />
  <row Id="21995" PostHistoryTypeId="2" PostId="5744" RevisionGUID="b7887495-0ee2-4a38-9eda-818eb2d68ada" CreationDate="2022-11-07T15:59:14.657" UserId="521" Text="Looks like the library you are using is not up-to-date with the current Westend version. In particular - it decodes the response of `System.account` using the old definition of `AccountInfo`.&#xD;&#xA;&#xD;&#xA;Notice that the printed structure contains three number values besides the nested structure with balances - `0 0 1`. However, if you will take a look at the same query in the Polkadot.js apps UI, you will see that there are actually four of them:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  nonce: 0&#xD;&#xA;  consumers: 0&#xD;&#xA;  providers: 1&#xD;&#xA;  sufficients: 0&#xD;&#xA;  data: {&#xD;&#xA;    free: 1,000,000,000,000&#xD;&#xA;    reserved: 0&#xD;&#xA;    miscFrozen: 0&#xD;&#xA;    feeFrozen: 0&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;So the library does not know about `sufficients` field and tries to decode the bytes of `sufficients` as being nested `data` structure, thus causing corruption&#xD;&#xA;&#xD;&#xA;Worth to mention that addition of `sufficients` is rather old change - so if the library you are using is maintained - there should be already new version available that is compatible with abovementioned changes." ContentLicense="CC BY-SA 4.0" />
  <row Id="21997" PostHistoryTypeId="5" PostId="5397" RevisionGUID="0e63bea3-3626-4f83-9c5c-ac34b7411bc5" CreationDate="2022-11-07T16:08:28.440" UserId="3331" Comment="typos and clarification" Text="## The Goal:&#xD;&#xA;Deploying a Relay Chain with Custom Validator Keys, that a Parachain can start collation successfully.&#xD;&#xA;&#xD;&#xA;## The Issue I've Had:&#xD;&#xA;Using the `key` subcommand in the Relay, I wasn't able to properly insert the Session Keys to the Relay nodes' keystore. And haven't found any mention whatsoever in how-to.&#xD;&#xA;&#xD;&#xA;## The Solution:&#xD;&#xA;After trying a lot of things, I've found from an RPC call that there's 7 keys needed for each Validator node. Those are, `gran` `babe` `imon` `para` `asgn` `audi` `beef`. And for each key-type there's a scheme, there's a table to reference.&#xD;&#xA;&#xD;&#xA;| Key-Type | Scheme  |&#xD;&#xA;| :------: | :-----: |&#xD;&#xA;|   gran   | ed25519 |&#xD;&#xA;|   babe   | sr25519 |&#xD;&#xA;|   imon   | sr25519 |&#xD;&#xA;|   para   | sr25519 |&#xD;&#xA;|   asgn   | sr25519 |&#xD;&#xA;|   audi   | sr25519 |&#xD;&#xA;|   beef   |  ecdsa  |&#xD;&#xA;&#xD;&#xA;Insert them like this,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot key insert \&#xD;&#xA;--base-path &lt;path for this validator&gt; \&#xD;&#xA;--chain &lt;raw relay chainSpec&gt; \&#xD;&#xA;--scheme &lt;see table&gt; \&#xD;&#xA;--suri &quot;&lt;mnemonic of this validator&gt;&quot; \&#xD;&#xA;--key-type &lt;see table&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Pay attention to the `base-path` you're choosing, you need separate paths for different validators. And to each path, you insert 7 keys using the same validators' private `seed`.&#xD;&#xA;&#xD;&#xA;So to properly insert the session keys in order to a Parachain start collating successfully 7 different key-types are needed. " ContentLicense="CC BY-SA 4.0" />
  <row Id="21998" PostHistoryTypeId="5" PostId="5397" RevisionGUID="2e911aae-6aa7-4dcb-bca8-fff8628dc0db" CreationDate="2022-11-07T16:17:33.940" UserId="3331" Comment="more clarification" Text="## The Goal:&#xD;&#xA;Deploying a Relay Chain with Custom Validator Keys, that a Parachain can start collation successfully.&#xD;&#xA;&#xD;&#xA;## The Issue I've Had:&#xD;&#xA;Using the `key` subcommand in the Relay, I wasn't able to properly insert the Session Keys to the Relay nodes' keystore.&#xD;&#xA;&#xD;&#xA;The Relay was working fine producing and finalizing blocks, but when deploying a Parachain the Para wasn't able to start collating. And I haven't found any mention whatsoever in how to do so.&#xD;&#xA;&#xD;&#xA;## The Solution:&#xD;&#xA;After trying a lot of things, I've found from an RPC call that there's 7 keys needed for each Validator node. Those are, `gran` `babe` `imon` `para` `asgn` `audi` `beef`. And for each key-type there's a scheme, there's a table to reference.&#xD;&#xA;&#xD;&#xA;| Key-Type | Scheme  |&#xD;&#xA;| :------: | :-----: |&#xD;&#xA;|   gran   | ed25519 |&#xD;&#xA;|   babe   | sr25519 |&#xD;&#xA;|   imon   | sr25519 |&#xD;&#xA;|   para   | sr25519 |&#xD;&#xA;|   asgn   | sr25519 |&#xD;&#xA;|   audi   | sr25519 |&#xD;&#xA;|   beef   |  ecdsa  |&#xD;&#xA;&#xD;&#xA;Insert them like this,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot key insert \&#xD;&#xA;--base-path &lt;path for this validator&gt; \&#xD;&#xA;--chain &lt;raw relay chainSpec&gt; \&#xD;&#xA;--scheme &lt;see table&gt; \&#xD;&#xA;--suri &quot;&lt;mnemonic of this validator&gt;&quot; \&#xD;&#xA;--key-type &lt;see table&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Pay attention to the `base-path` you're choosing, you need separate paths for different validators. And to each path, you insert 7 keys using the same validators' private `seed`.&#xD;&#xA;&#xD;&#xA;So to properly insert the session keys in order to a Parachain start collating successfully 7 different key-types are needed. " ContentLicense="CC BY-SA 4.0" />
  <row Id="21999" PostHistoryTypeId="6" PostId="5662" RevisionGUID="d4b34c15-a2bf-4a08-ab49-dee4c93fda2b" CreationDate="2022-11-07T17:26:57.353" UserId="116" Comment="I think this is go related" Text="|rpc|events|golang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22000" PostHistoryTypeId="24" PostId="5662" RevisionGUID="d4b34c15-a2bf-4a08-ab49-dee4c93fda2b" CreationDate="2022-11-07T17:26:57.353" Comment="Proposed by 116 approved by 34 edit id of 332" ContentLicense="CC BY-SA 4.0" />
  <row Id="22002" PostHistoryTypeId="10" PostId="4810" RevisionGUID="c2cafeb8-f77a-4ca4-81f2-eaea7054b2fe" CreationDate="2022-11-07T17:29:44.197" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[4785],&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="22003" PostHistoryTypeId="10" PostId="5737" RevisionGUID="acca3fe2-ff51-4d72-a0f4-1d1c2431804e" CreationDate="2022-11-07T17:30:13.737" UserId="34" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2025,&quot;DisplayName&quot;:&quot;Iker&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="22004" PostHistoryTypeId="11" PostId="5397" RevisionGUID="ae92fde0-cfce-4e8c-9a14-84e381376ae0" CreationDate="2022-11-07T17:31:27.273" UserId="34" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="22005" PostHistoryTypeId="2" PostId="5745" RevisionGUID="73806370-48d2-4bbf-a776-9a260e56e379" CreationDate="2022-11-07T17:58:15.263" UserId="2762" Text="Maybe add more prints to check if is doing the proper calls.&#xD;&#xA;&#xD;&#xA;I have tried the same using a basic script with [PolkadotJS][1]&#xD;&#xA;&#xD;&#xA;    const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;    async function getBalance() {&#xD;&#xA;      const wsProvider = new WsProvider('wss://westend-rpc.polkadot.io');&#xD;&#xA;      const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;      const chain = await api.rpc.system.chain();&#xD;&#xA;      console.log(`----- Chain: ${chain} -----`);&#xD;&#xA;      // The actual address that we will use&#xD;&#xA;      const ADDR = '5FpS4PkRzLmJZcwvJM6jxPU3N3481nbnTe6nzFwwQUVvu9LF';&#xD;&#xA;      // Retrieve the account balance &amp; nonce via the system module&#xD;&#xA;      const data = await api.query.system.account(ADDR);&#xD;&#xA;      console.log(`Balance of the account ${ADDR} is: `);&#xD;&#xA;      console.log(JSON.stringify(data));&#xD;&#xA;&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;And the result is what you should have 1WND:&#xD;&#xA;&#xD;&#xA;    {&quot;nonce&quot;:0,&quot;consumers&quot;:0,&quot;providers&quot;:1,&quot;sufficients&quot;:0,&quot;data&quot;:{&quot;free&quot;:1000000000000,&quot;reserved&quot;:0,&quot;miscFrozen&quot;:0,&quot;feeFrozen&quot;:0}}&#xD;&#xA;&#xD;&#xA;Trying to manually query the RPC query state_getStorage of your account:&#xD;&#xA;&#xD;&#xA;    curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getStorage&quot;, &quot;params&quot;:[&quot;0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95e0bd5326aa7e9fa72c036a33d96d381a60e515cdbf7e1426e9d708bc78ee0ed7d0f4c5c04951be09e37e70ad31a487c&quot;]}' https://westend-rpc.polkadot.io&#xD;&#xA;&#xD;&#xA;It returns you the same value too.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/docs" ContentLicense="CC BY-SA 4.0" />
  <row Id="22007" PostHistoryTypeId="2" PostId="5746" RevisionGUID="e9ee3f6f-d2aa-4fb5-b932-a16626c79f7c" CreationDate="2022-11-07T18:16:30.323" UserId="3415" Text="I'm trying to experiment with the substrate playground, but after accepting terms and starting an instance, there is no UI, just a blank screen where the IDE should be. I have attached an image. I've tried in both Chrome and Firefox. In chrome the console logs the following:&#xD;&#xA;&#xD;&#xA; ```Failed to load resource: the server responded with a status of 503 ()```&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;```Failed to load resource: the server responded with a status of 404 ()```&#xD;&#xA;&#xD;&#xA;Under Firefox, the following:&#xD;&#xA;&#xD;&#xA;```Loading failed for the &lt;script&gt; with source “https://myusername.playground.substrate.dev/bundle.js”.```&#xD;&#xA;&#xD;&#xA;All ad/cookie blockers are disabled, as well as any NoScript addons or settings.&#xD;&#xA;&#xD;&#xA;I have attached an image of the screen I am seeing when I should get the IDE.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for any help!&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5y1JF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22009" PostHistoryTypeId="1" PostId="5746" RevisionGUID="e9ee3f6f-d2aa-4fb5-b932-a16626c79f7c" CreationDate="2022-11-07T18:16:30.323" UserId="3415" Text="No UI on Substrate Playground from firefox or chrome under Ubuntu 22.04" ContentLicense="CC BY-SA 4.0" />
  <row Id="22010" PostHistoryTypeId="3" PostId="5746" RevisionGUID="e9ee3f6f-d2aa-4fb5-b932-a16626c79f7c" CreationDate="2022-11-07T18:16:30.323" UserId="3415" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22011" PostHistoryTypeId="2" PostId="5747" RevisionGUID="6aef013a-0e97-4fa4-868b-e7a1dffcbdc0" CreationDate="2022-11-07T19:01:49.403" UserId="3331" Text="I'll post the solution as an answer as well to set the question as answered.&#xD;&#xA;&#xD;&#xA;## The Solution:&#xD;&#xA;After trying a lot of things, I've found from an RPC call that there's 7 keys needed for each Validator node. Those are, `gran` `babe` `imon` `para` `asgn` `audi` `beef`. And for each key-type there's a scheme, there's a table to reference.&#xD;&#xA;&#xD;&#xA;| Key-Type | Scheme  |&#xD;&#xA;| :------: | :-----: |&#xD;&#xA;|   gran   | ed25519 |&#xD;&#xA;|   babe   | sr25519 |&#xD;&#xA;|   imon   | sr25519 |&#xD;&#xA;|   para   | sr25519 |&#xD;&#xA;|   asgn   | sr25519 |&#xD;&#xA;|   audi   | sr25519 |&#xD;&#xA;|   beef   |  ecdsa  |&#xD;&#xA;&#xD;&#xA;Insert them like this,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot key insert \&#xD;&#xA;--base-path &lt;path for this validator&gt; \&#xD;&#xA;--chain &lt;raw relay chainSpec&gt; \&#xD;&#xA;--scheme &lt;see table&gt; \&#xD;&#xA;--suri &quot;&lt;mnemonic of this validator&gt;&quot; \&#xD;&#xA;--key-type &lt;see table&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Pay attention to the `base-path` you're choosing, you need separate paths for different validators. &#xD;&#xA;And to each path, you insert 7 keys using the same validators' private `seed`.&#xD;&#xA;&#xD;&#xA;## Parachain Session Keys:&#xD;&#xA;In the Para, run the node and specify a RPC port to make a call later on.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/&lt;parachain binary&gt; --collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain &lt;raw parachainSpec&gt; \&#xD;&#xA;--base-path /tmp/&lt;para&gt;/&lt;path&gt; \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;--rpc-port 9022 \&#xD;&#xA;--unsafe-ws-external \&#xD;&#xA;--rpc-methods=unsafe \&#xD;&#xA;--rpc-external \&#xD;&#xA;--rpc-cors=all \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain relay-raw.json \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977 \&#xD;&#xA;--bootnodes /ip4/&lt;relay bootnode ip&gt;/tcp/30333/p2p/&lt;bootnode peerId&gt;&#xD;&#xA;``` &#xD;&#xA;Using this command as an example, the port open for RPC was **9022** so the insert key call should be:&#xD;&#xA;```&#xD;&#xA;curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;aura&quot;, &quot;&lt;private seed in hex&gt;&quot;, &quot;&lt;public key in hex&gt;&quot;],&quot;id&quot;:1 }' http://127.0.0.1:9022&#xD;&#xA;```&#xD;&#xA;&gt; The private and public key here should be the **collator** keys. And it's for **aura**. So it is using the `sr25519` scheme.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And it's output:&#xD;&#xA;```&#xD;&#xA;* Connection #0 to host 127.0.0.1 left intact&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:null,&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22013" PostHistoryTypeId="5" PostId="5747" RevisionGUID="8ffcfa53-6649-4f9b-b400-c9f239e07606" CreationDate="2022-11-07T19:50:50.817" UserId="3331" Comment="deleted 80 characters in body" Text="## The Solution:&#xD;&#xA;After trying a lot of things, I've found from an RPC call that there's 7 keys needed for each Validator node. Those are, `gran` `babe` `imon` `para` `asgn` `audi` `beef`. And for each key-type there's a scheme, there's a table to reference.&#xD;&#xA;&#xD;&#xA;| Key-Type | Scheme  |&#xD;&#xA;| :------: | :-----: |&#xD;&#xA;|   gran   | ed25519 |&#xD;&#xA;|   babe   | sr25519 |&#xD;&#xA;|   imon   | sr25519 |&#xD;&#xA;|   para   | sr25519 |&#xD;&#xA;|   asgn   | sr25519 |&#xD;&#xA;|   audi   | sr25519 |&#xD;&#xA;|   beef   |  ecdsa  |&#xD;&#xA;&#xD;&#xA;Insert them like this,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot key insert \&#xD;&#xA;--base-path &lt;path for this validator&gt; \&#xD;&#xA;--chain &lt;raw relay chainSpec&gt; \&#xD;&#xA;--scheme &lt;see table&gt; \&#xD;&#xA;--suri &quot;&lt;mnemonic of this validator&gt;&quot; \&#xD;&#xA;--key-type &lt;see table&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Pay attention to the `base-path` you're choosing, you need separate paths for different validators. &#xD;&#xA;And to each path, you insert 7 keys using the same validators' private `seed`.&#xD;&#xA;&#xD;&#xA;## Parachain Session Keys:&#xD;&#xA;In the Para, run the node and specify a RPC port to make a call later on.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/&lt;parachain binary&gt; --collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain &lt;raw parachainSpec&gt; \&#xD;&#xA;--base-path /tmp/&lt;para&gt;/&lt;path&gt; \&#xD;&#xA;--port 40333 \&#xD;&#xA;--ws-port 8844 \&#xD;&#xA;--rpc-port 9022 \&#xD;&#xA;--unsafe-ws-external \&#xD;&#xA;--rpc-methods=unsafe \&#xD;&#xA;--rpc-external \&#xD;&#xA;--rpc-cors=all \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain relay-raw.json \&#xD;&#xA;--port 30343 \&#xD;&#xA;--ws-port 9977 \&#xD;&#xA;--bootnodes /ip4/&lt;relay bootnode ip&gt;/tcp/30333/p2p/&lt;bootnode peerId&gt;&#xD;&#xA;``` &#xD;&#xA;Using this command as an example, the port open for RPC was **9022** so the insert key call should be:&#xD;&#xA;```&#xD;&#xA;curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;aura&quot;, &quot;&lt;private seed in hex&gt;&quot;, &quot;&lt;public key in hex&gt;&quot;],&quot;id&quot;:1 }' http://127.0.0.1:9022&#xD;&#xA;```&#xD;&#xA;&gt; The private and public key here should be the **collator** keys. And it's for **aura**. So it is using the `sr25519` scheme.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And it's output:&#xD;&#xA;```&#xD;&#xA;* Connection #0 to host 127.0.0.1 left intact&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:null,&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22014" PostHistoryTypeId="5" PostId="5397" RevisionGUID="7fd425b1-d731-4b53-9649-57a4526ed40a" CreationDate="2022-11-07T20:05:18.413" UserId="3331" Comment="deleted 894 characters in body" Text="## The Goal:&#xD;&#xA;Deploying a Relay Chain with Custom Validator Keys, that a Parachain can start collation successfully.&#xD;&#xA;&#xD;&#xA;## The Issue:&#xD;&#xA;Using the `key` subcommand in the Relay, I wasn't able to properly insert the Session Keys to the Relay nodes' keystore.&#xD;&#xA;&#xD;&#xA;The Relay with 2 validators was working fine, producing and finalizing blocks, but when I deployed a Parachain it outputted a `WARN`:  `collation wasn't advertised to any validator`.&#xD;&#xA;&#xD;&#xA;And it started to output the WARN for 5 minutes +- until it started to output an error. Finally I haven't found any mention whatsoever in how to do so.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22015" PostHistoryTypeId="2" PostId="5748" RevisionGUID="5815b5cb-af65-45b7-9985-54ed9b3595c2" CreationDate="2022-11-07T23:07:50.670" UserId="3346" Text="We have started a test chain with tokenDecimals = 10 in the chain spec JSON. The chain is running beautifully BUT fees are astronomical. For example, it takes 2.6 Billion to run for council. We are about 7-9 decimal places off from what fees should be across the board. We would like to try changing tokenDecimals to 12 to see if that fixes the problem. How would one do that on a running chain? We understand updating the WASM and doing a forkless upgrade but this property is in the JSON, not the WASM. I think we are missing something simple here as we are still learning. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22017" PostHistoryTypeId="1" PostId="5748" RevisionGUID="5815b5cb-af65-45b7-9985-54ed9b3595c2" CreationDate="2022-11-07T23:07:50.670" UserId="3346" Text="tokenDecimals = 10 Causes Astronomical Fees - How To Change tokenDecimals On A Running Chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22018" PostHistoryTypeId="3" PostId="5748" RevisionGUID="5815b5cb-af65-45b7-9985-54ed9b3595c2" CreationDate="2022-11-07T23:07:50.670" UserId="3346" Text="|nodes|fee|upgrade|chainspec|json|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22019" PostHistoryTypeId="2" PostId="5749" RevisionGUID="61a6922c-5bf6-4a4d-b6d5-1aee96849839" CreationDate="2022-11-07T23:26:11.230" UserId="3416" Text="OnFinality plans to discount all `system_health` RPC calls from paid API plan response counts to zero cost to alleviate this issue for now. This should be in place in the coming weeks." ContentLicense="CC BY-SA 4.0" />
  <row Id="22021" PostHistoryTypeId="5" PostId="5746" RevisionGUID="b8f18c50-2c7c-4e16-82a2-8721a6c83b8c" CreationDate="2022-11-07T23:27:45.683" UserId="34" Comment="added 43 characters in body; edited tags" Text="I'm trying to experiment with [substrate playground](https://substrate.io/developers/playground/), but after accepting terms and starting an instance, there is no UI, just a blank screen where the IDE should be. I have attached an image. I've tried in both Chrome and Firefox. In chrome the console logs the following:&#xD;&#xA;&#xD;&#xA; ```Failed to load resource: the server responded with a status of 503 ()```&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;```Failed to load resource: the server responded with a status of 404 ()```&#xD;&#xA;&#xD;&#xA;Under Firefox, the following:&#xD;&#xA;&#xD;&#xA;```Loading failed for the &lt;script&gt; with source “https://myusername.playground.substrate.dev/bundle.js”.```&#xD;&#xA;&#xD;&#xA;All ad/cookie blockers are disabled, as well as any NoScript addons or settings.&#xD;&#xA;&#xD;&#xA;I have attached an image of the screen I am seeing when I should get the IDE.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for any help!&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5y1JF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22022" PostHistoryTypeId="6" PostId="5746" RevisionGUID="b8f18c50-2c7c-4e16-82a2-8721a6c83b8c" CreationDate="2022-11-07T23:27:45.683" UserId="34" Comment="added 43 characters in body; edited tags" Text="|playground|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22023" PostHistoryTypeId="5" PostId="1390" RevisionGUID="aba6b434-eb6d-4051-bee0-a70d69f6d3c0" CreationDate="2022-11-07T23:55:05.817" UserId="283" Comment="deleted 9 characters in body" Text="You can add and create custom origins in pallets.&#xD;&#xA;&#xD;&#xA;In your pallet, you define the origin type.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_support::pallet_prelude::*;&#xD;&#xA;use pallet::*;&#xD;&#xA;use sp_runtime::traits::BadOrigin;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use super::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {}&#xD;&#xA;&#xD;&#xA;	/// My custom origin!&#xD;&#xA;	#[pallet::origin]&#xD;&#xA;	#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;	pub enum Origin {&#xD;&#xA;		/// Custom Origin type.&#xD;&#xA;		CustomOrigin(InternalStruct),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]&#xD;&#xA;pub struct InternalStruct {&#xD;&#xA;	item: u64,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// This is an analogue of `ensure_signed` for the custom origin type.&#xD;&#xA;pub fn ensure_custom_origin&lt;OuterOrigin&gt;(o: OuterOrigin) -&gt; Result&lt;InternalStruct, BadOrigin&gt;&#xD;&#xA;where&#xD;&#xA;	OuterOrigin: Into&lt;Result&lt;Origin, OuterOrigin&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	match o.into() {&#xD;&#xA;		Ok(Origin::CustomOrigin(internal)) =&gt; Ok(internal),&#xD;&#xA;		_ =&gt; Err(BadOrigin),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then you can integrate this in `construct_runtime!` to add your custom origin type to the overarching runtime origin.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;construct_runtime! {&#xD;&#xA;    pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = OpaqueBlock,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;        // .. other pallets&#xD;&#xA;        CustomOriginPallet: custom_origin_pallet::{Pallet, Origin},&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Per your question about whether you can create a custom origin which modifies the behavior of `ensure_signed`, the answer is 'no'. `ensure_signed` only accepts origins of the form `frame_system::RawOrigin::Signed(AccountId)`." ContentLicense="CC BY-SA 4.0" />
  <row Id="22024" PostHistoryTypeId="2" PostId="5750" RevisionGUID="c03b0df5-d47b-447e-b750-ccde6d8ba2b0" CreationDate="2022-11-08T00:40:12.890" UserId="2844" Text="You can't read all of `my_map` entries because `Mapping` works on `key &amp; value` and it has only `insert &amp; get` operation through which you can  insert one element and get one element at one time.&#xD;&#xA;&#xD;&#xA;If you want to efficiently read all of `my_map` entries then you can use Vec like this:&#xD;&#xA;&#xD;&#xA;use ink_prelude::vec::Vec;&#xD;&#xA;&#xD;&#xA;    struct MyContract {&#xD;&#xA;&#xD;&#xA;         my_map: Mapping&lt;AccountId, BlockNumber&gt;,&#xD;&#xA;&#xD;&#xA;         all_entries: Vec&lt;BlockNumber&gt;&#xD;&#xA;&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="22026" PostHistoryTypeId="5" PostId="5750" RevisionGUID="61ed2899-eecf-4ab5-bc08-2e7e172d2614" CreationDate="2022-11-08T01:08:36.853" UserId="2844" Comment="added 159 characters in body" Text="You can't read all of `my_map` entries because `Mapping` works on `key &amp; value` and it has only `insert &amp; get` operation through which you can  insert one element and get one element at one time.&#xD;&#xA;&#xD;&#xA;If you want to efficiently read all of `my_map` entries then you can use Vec to store `key` like this:&#xD;&#xA;&#xD;&#xA;use ink_prelude::vec::Vec;&#xD;&#xA;&#xD;&#xA;    struct MyContract {&#xD;&#xA;&#xD;&#xA;         my_map: Mapping&lt;AccountId, BlockNumber&gt;,&#xD;&#xA;&#xD;&#xA;         all_entries: Vec&lt;AccountId&gt;&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;and when you input new `my_map` you can do like this:&#xD;&#xA;&#xD;&#xA;    self.my_map.insert(AccountId, &amp;BlockNumber)&#xD;&#xA;&#xD;&#xA;    self.all_entries.push(AccountId)" ContentLicense="CC BY-SA 4.0" />
  <row Id="22027" PostHistoryTypeId="5" PostId="5750" RevisionGUID="55810bed-cb58-45af-8b31-a1e0e7b00c0d" CreationDate="2022-11-08T01:17:05.003" UserId="2844" Comment="added 159 characters in body" Text="You can't read all of `my_map` entries because `Mapping` works on `key &amp; value` and it has only `insert &amp; get` operation through which you can  insert one element and get one element at one time.&#xD;&#xA;&#xD;&#xA;If you want to efficiently read all of `my_map` entries then you can use `Vec` to store `key` like this:&#xD;&#xA;&#xD;&#xA;use ink_prelude::vec::Vec;&#xD;&#xA;&#xD;&#xA;    struct MyContract {&#xD;&#xA;&#xD;&#xA;         my_map: Mapping&lt;AccountId, BlockNumber&gt;,&#xD;&#xA;&#xD;&#xA;         all_entries: Vec&lt;AccountId&gt;&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;and when you input new `my_map` you can do like this:&#xD;&#xA;&#xD;&#xA;    self.my_map.insert(AccountId, &amp;BlockNumber)&#xD;&#xA;&#xD;&#xA;    self.all_entries.push(AccountId)&#xD;&#xA;&#xD;&#xA;But `Vec` we are using from `use ink_prelude::vec::Vec;` has also caveat. It is fully loaded into the memory which is not appropriate for holding large amount of data. They are planning to migrate `ink_storage::Vec`, which is not available yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="22028" PostHistoryTypeId="5" PostId="5746" RevisionGUID="5d427630-7e3d-494e-8839-bc51ccaeea46" CreationDate="2022-11-08T02:38:16.307" UserId="251" Comment="added 14 characters in body" Text="I'm trying to experiment with [substrate playground](https://substrate.io/developers/playground/), but after accepting terms and starting an instance, there is no UI, just a blank screen where the IDE should be. I have attached an image. I've tried it in both Chrome and Firefox. In chrome the console logs the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Failed to load resource: the server responded with a status of 503 ()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Failed to load resource: the server responded with a status of 404 ()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Under Firefox, the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Loading failed for the &lt;script&gt; with source “https://myusername.playground.substrate.dev/bundle.js”.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All ad/cookie blockers are disabled, as well as any NoScript addons or settings.&#xD;&#xA;&#xD;&#xA;I have attached an image of the screen I am seeing when I should get the IDE.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks for any help!&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5y1JF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22029" PostHistoryTypeId="2" PostId="5751" RevisionGUID="25e653a0-1c95-4434-a133-65ffe0d41fcc" CreationDate="2022-11-08T05:41:50.820" UserId="3418" Text="I am running a substrate-permissioned network,  we configure the SUDO account using the keys on polkadot UI account and use it to perform node authorization, etc. &#xD;&#xA;&#xD;&#xA;Since last week, SUDO option is not showing up Polkadot UI. We are following the same steps and we haven't made changes to the code.&#xD;&#xA;&#xD;&#xA;FYI, SUDO pallet was configured from begin.&#xD;&#xA;&#xD;&#xA;Please through some light on this[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ONXko.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22031" PostHistoryTypeId="1" PostId="5751" RevisionGUID="25e653a0-1c95-4434-a133-65ffe0d41fcc" CreationDate="2022-11-08T05:41:50.820" UserId="3418" Text="Sudo option is showing up on PolkadotUI - Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="22032" PostHistoryTypeId="3" PostId="5751" RevisionGUID="25e653a0-1c95-4434-a133-65ffe0d41fcc" CreationDate="2022-11-08T05:41:50.820" UserId="3418" Text="|polkadot-js|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22033" PostHistoryTypeId="4" PostId="5751" RevisionGUID="83664589-e0a4-4841-a221-da6c859d19b2" CreationDate="2022-11-08T05:42:16.223" UserId="3418" Comment="edited title" Text="Sudo option is not showing up on PolkadotUI - Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="22034" PostHistoryTypeId="2" PostId="5752" RevisionGUID="91aaf2ca-a9b0-4736-96d3-7365cf864357" CreationDate="2022-11-08T06:24:24.327" UserId="251" Text="Only when the PolkadotApps detect the sudo key in your wallet, the sudo component will be loaded." ContentLicense="CC BY-SA 4.0" />
  <row Id="22036" PostHistoryTypeId="2" PostId="5753" RevisionGUID="9b4b682a-9b64-438f-9a8f-d45e82f5b881" CreationDate="2022-11-08T06:59:13.520" UserId="489" Text="## Problem&#xD;&#xA;How can I get the correct vec&lt;u8&gt; in the pallet when i use vsc&lt;u8&gt; as the parameter of pallet. I can get the correct vec&lt;u8&gt; in the front end, but not in the pallet.&#xD;&#xA;&#xD;&#xA;**In Polkadot js**:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**In the pallet——Maci-verifier**&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fzeBe.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/wtDf6.png&#xD;&#xA;&#xD;&#xA;So, why does it ?&#xD;&#xA;&#xD;&#xA;This is my source code: https://github.com/VegeBun-csj/substrate-zk/blob/master/pallets/maci-verifier/src/lib.rs#L69" ContentLicense="CC BY-SA 4.0" />
  <row Id="22038" PostHistoryTypeId="1" PostId="5753" RevisionGUID="9b4b682a-9b64-438f-9a8f-d45e82f5b881" CreationDate="2022-11-08T06:59:13.520" UserId="489" Text="About passing Vec&lt;u8&gt; parameters in pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="22039" PostHistoryTypeId="3" PostId="5753" RevisionGUID="9b4b682a-9b64-438f-9a8f-d45e82f5b881" CreationDate="2022-11-08T06:59:13.520" UserId="489" Text="|pallet|vec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22040" PostHistoryTypeId="2" PostId="5754" RevisionGUID="722c0a28-7fc1-4043-85a0-ad9e6af2042a" CreationDate="2022-11-08T06:59:46.673" UserId="116" Text="I have just ran benchmarks ans updated all the weights of my parachain... or have I?&#xD;&#xA;&#xD;&#xA;How can I verify that all my changes &quot;bite&quot;?&#xD;&#xA;Is there a way to check the weights of a running chain and detect if some extrinsics still evaluates to the default e.g. `10_000`?&#xD;&#xA;&#xD;&#xA;*Included the parachain tag, I'm not sure if that is important.*" ContentLicense="CC BY-SA 4.0" />
  <row Id="22042" PostHistoryTypeId="1" PostId="5754" RevisionGUID="722c0a28-7fc1-4043-85a0-ad9e6af2042a" CreationDate="2022-11-08T06:59:46.673" UserId="116" Text="How to get the current weights of a chain for all extrinsics to verify all benchmarks has been integrated?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22043" PostHistoryTypeId="3" PostId="5754" RevisionGUID="722c0a28-7fc1-4043-85a0-ad9e6af2042a" CreationDate="2022-11-08T06:59:46.673" UserId="116" Text="|parachain|benchmarking|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22044" PostHistoryTypeId="2" PostId="5755" RevisionGUID="874ceb10-8ac2-4951-b2e8-2669df8409d3" CreationDate="2022-11-08T07:29:52.233" UserId="251" Text="PolkadotJs did the `decode` for you.&#xD;&#xA;&#xD;&#xA;In Rust, you need to do:&#xD;&#xA;```rs&#xD;&#xA;let proof = ProofStr::decode(&amp;mut &amp;*the_vec_output).unwrap();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22046" PostHistoryTypeId="2" PostId="5756" RevisionGUID="d294cf7d-cf0b-4f7f-bebd-4d03509bcc8e" CreationDate="2022-11-08T08:17:05.610" UserId="167" Text="It seems like `tokenDecimlas` are part of the custom properties of the chain spec, and are not really interpreted internally by substrate, so I guess they can be changed post-launch. Try running a chain with the same chain specification file, but provide a:&#xD;&#xA;&#xD;&#xA;```JSON&#xD;&#xA;properties: {&#xD;&#xA;  tokenDeciamls: 6&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To obtain a chain-spec from a running chain, you can use the `build-spec` sub-command. But note that you have to pass the same `--chain` as you did the first time you ran your chain to obtain a chain-spec that is compatible. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22048" PostHistoryTypeId="2" PostId="5757" RevisionGUID="aa8ee0e8-4121-43bc-8187-d4479f2c8c84" CreationDate="2022-11-08T08:47:17.050" UserId="3327" Text="I am using python substrate Interface (https://github.com/polkascan/py-substrate-interface) to interact with the substrate node. &#xD;&#xA;&#xD;&#xA;I need to execute Pallet::Balances::force_transfer function, this function can only be run with the root/sudo  account. How I can achieve this plesae" ContentLicense="CC BY-SA 4.0" />
  <row Id="22050" PostHistoryTypeId="1" PostId="5757" RevisionGUID="aa8ee0e8-4121-43bc-8187-d4479f2c8c84" CreationDate="2022-11-08T08:47:17.050" UserId="3327" Text="How to submit a transaction form the root/sudo acount using python substrate interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="22051" PostHistoryTypeId="3" PostId="5757" RevisionGUID="aa8ee0e8-4121-43bc-8187-d4479f2c8c84" CreationDate="2022-11-08T08:47:17.050" UserId="3327" Text="|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22052" PostHistoryTypeId="2" PostId="5758" RevisionGUID="69b02368-f1be-4729-9060-ab87a2ed1bb0" CreationDate="2022-11-08T09:12:16.760" UserId="2102" Text="I'm trying to get the `regex` crate to work on a pallet to check for an extrinsic input, but I can't get node to compile. Although I don't have the specific error to show, the question is if it is possible to include this crate in a pallet or how you can know which crates are compatible in a pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="22054" PostHistoryTypeId="1" PostId="5758" RevisionGUID="69b02368-f1be-4729-9060-ab87a2ed1bb0" CreationDate="2022-11-08T09:12:16.760" UserId="2102" Text="Is it possible to use Regex crate within a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22055" PostHistoryTypeId="3" PostId="5758" RevisionGUID="69b02368-f1be-4729-9060-ab87a2ed1bb0" CreationDate="2022-11-08T09:12:16.760" UserId="2102" Text="|substrate-node-template|nodes|crates|crates-io|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22056" PostHistoryTypeId="2" PostId="5759" RevisionGUID="2c4bf140-2151-4b6e-b212-ea177f03e155" CreationDate="2022-11-08T09:17:28.057" UserId="3317" Text="It is case dependent.&#xD;&#xA;&#xD;&#xA;When a variable in a struct needs to be changed, the whole struct needs to be re-written. Therefore, it can be more gas efficient to separate the M variables by storing them in another struct in another Mapping. The re-write operation is now of smaller size. &#xD;&#xA;&#xD;&#xA;However, if the M/N ratio is fairly big. Each time all N variables need to be changed a search needs to be done twice for each AcccountId which might exceed the gas usage in the case where all variables are stored in one struct, one mapping.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22059" PostHistoryTypeId="2" PostId="5760" RevisionGUID="5ea00651-32ed-461d-b9df-66ce94369ae0" CreationDate="2022-11-08T09:28:31.623" UserId="139" Text="I have a pallet that can be used to dispatch other calls to the runtime and it's defined as &#xD;&#xA;```rust&#xD;&#xA;internal_call : Box&lt;&lt;T as Config&gt;::Call&gt;&#xD;&#xA;```&#xD;&#xA;Given that `Call` is just an enum, I want to check if the dispatchable is for a certain pallet, let's say `pallet_kitties::create_kitty` . How can I go about doing that? &#xD;&#xA;If I debug print `internal_call` I get `Call::Kitties(Call::create_kitty)` but this doesn't work in my pallet due to multiple errors : &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;match internal_call {&#xD;&#xA;  &lt;T as Config&gt;::Call::Kitties(Call::create_kitty) =&gt; {do_something();}&#xD;&#xA;   ^^^^^^^^^^^^^^^^^^ error    ^^^^ error&#xD;&#xA;  _ =&gt; {}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;one of which is `Kitties` is not found for associated type `&lt;T as pallet::Config&gt;::Call`.&#xD;&#xA;I know this is happening probably because the runtime is being built after the fact that all pallets have been built and that the Runtime itself cannot be a dependency for the pallets in order to be able to use `Call::Kitties` as that would cause a dependency cycle.&#xD;&#xA;&#xD;&#xA;Is there any easier way to get access to the internal call ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="22061" PostHistoryTypeId="1" PostId="5760" RevisionGUID="5ea00651-32ed-461d-b9df-66ce94369ae0" CreationDate="2022-11-08T09:28:31.623" UserId="139" Text="Is it possible to pattern match on the runtime call enum inside a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22062" PostHistoryTypeId="3" PostId="5760" RevisionGUID="5ea00651-32ed-461d-b9df-66ce94369ae0" CreationDate="2022-11-08T09:28:31.623" UserId="139" Text="|runtime|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22063" PostHistoryTypeId="5" PostId="5759" RevisionGUID="3f422ae1-dee2-4a59-97e2-1b1021dfb68b" CreationDate="2022-11-08T09:28:43.633" UserId="3317" Comment="added 76 characters in body" Text="It is case dependent.&#xD;&#xA;&#xD;&#xA;When a variable in a struct needs to be changed, the whole struct needs to be re-written. Therefore, it can be more gas efficient to separate the M variables by storing them in another struct in another Mapping. The re-write operation is now of smaller size. &#xD;&#xA;&#xD;&#xA;However, if the M/N ratio is fairly big. Each time all N variables need to be changed a search needs to be done twice for each AcccountId which might exceed the gas usage in the case where all variables are stored in one struct, one mapping.&#xD;&#xA;&#xD;&#xA;addtional information (ink! docs): https://use.ink/datastructures/overview&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22069" PostHistoryTypeId="5" PostId="5754" RevisionGUID="ed48814a-d367-41e7-9455-43f2b0f94198" CreationDate="2022-11-08T10:58:17.343" UserId="116" Comment="added 15 characters in body" Text="I have just ran benchmarks and updated all the weights of the pallets in my parachain... or have I?&#xD;&#xA;&#xD;&#xA;How can I verify that all my changes &quot;bite&quot;?&#xD;&#xA;Is there a way to check the weights of a running chain and detect if some extrinsics still evaluates to the default e.g. `10_000`?&#xD;&#xA;&#xD;&#xA;*Included the parachain tag, I'm not sure if that is important.*" ContentLicense="CC BY-SA 4.0" />
  <row Id="22070" PostHistoryTypeId="6" PostId="5754" RevisionGUID="ed48814a-d367-41e7-9455-43f2b0f94198" CreationDate="2022-11-08T10:58:17.343" UserId="116" Comment="added 15 characters in body" Text="|parachain|runtime|benchmarking|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22071" PostHistoryTypeId="2" PostId="5762" RevisionGUID="3b49ae80-ba56-4c40-8095-f04605ed0a4a" CreationDate="2022-11-08T11:38:46.763" UserId="140" Text="All pallet dependencies should support `no_std`. `regex` does not support `no_std`.&#xD;&#xA;&#xD;&#xA;You can use `safe-regex` as an alternative or any other dependency which supports `no_std`.&#xD;&#xA;&#xD;&#xA;    [dependencies]&#xD;&#xA;    safe-regex = &quot;0.2.5&quot;&#xD;&#xA;Add this in your `Cargo.toml` and it would work." ContentLicense="CC BY-SA 4.0" />
  <row Id="22073" PostHistoryTypeId="2" PostId="5763" RevisionGUID="7af80d30-5e88-4852-857d-843e095000bb" CreationDate="2022-11-08T11:48:32.850" UserId="234" Text="I am trying to figure out in which Polkadot release the `Deposit` and `Withdraw` events were introduced. &#xD;&#xA;&#xD;&#xA;I was looking at the corresponding PR, [Add Deposit and Withdraw Events to Balances Pallet][1] in the [Substrate repo][2] and it looks like it was merged on Oct 11th, 2021. &#xD;&#xA;&#xD;&#xA;So then I was checking in the [Polkadot repo][3] the releases by date and the first one after Oct 11th, 2021 was the [release v0.9.12][4] on Oct 21, 2021. So my assumption is that this change got in the release v0.9.12.&#xD;&#xA;&#xD;&#xA;Is there another way to check the same ?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/9425&#xD;&#xA;  [2]: https://github.com/paritytech/substrate&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/releases/tag/v0.9.12" ContentLicense="CC BY-SA 4.0" />
  <row Id="22075" PostHistoryTypeId="1" PostId="5763" RevisionGUID="7af80d30-5e88-4852-857d-843e095000bb" CreationDate="2022-11-08T11:48:32.850" UserId="234" Text="How do I know in which Polkadot release a Substrate PR (hence change) got in?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22076" PostHistoryTypeId="3" PostId="5763" RevisionGUID="7af80d30-5e88-4852-857d-843e095000bb" CreationDate="2022-11-08T11:48:32.850" UserId="234" Text="|polkadot|releases|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22077" PostHistoryTypeId="2" PostId="5764" RevisionGUID="b00b2366-59bc-49ce-a24c-cbe46f989b85" CreationDate="2022-11-08T11:48:32.850" UserId="234" Text="We can also go to the [Substrate repo][1] and from the dropdown box that mentions all the existing branches&#xD;&#xA;&#xD;&#xA;[![substrate choose branch screenshot][2]][2]&#xD;&#xA;&#xD;&#xA;choose the  branch that corresponds to polkadot releases, e.g. branch `polkadot-v0.9.10` or `polkadot-v0.9.21`. It is a somehow manual way but if we know approximately the date that the PR was merged then we can check only the releases close to that date. &#xD;&#xA;Whenever we choose the branch of a specific release, we can then look all the commits of this branch/release. &#xD;&#xA;&#xD;&#xA;If the merged commit (or we can also search by the PR description) we are looking for is present then it means it was introduced in that release.&#xD;&#xA;&#xD;&#xA;[![substrate repo - PR found in commits of release][3]][3]&#xD;&#xA;&#xD;&#xA;Thank you Iker, Alejandro, Alex &amp; Bruno for the help &amp; feedback on this one!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate&#xD;&#xA;  [2]: https://i.stack.imgur.com/jTwn4.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/gCT3Y.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22080" PostHistoryTypeId="2" PostId="5765" RevisionGUID="9a722ab4-e8b0-4ddd-a38b-cb28ff659e0e" CreationDate="2022-11-08T12:01:58.883" UserId="140" Text="I am not sure if this helps but can fetch pallet id and call id from a call.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    let (pallet_idx, call_idx): (u8, u8) = call&#xD;&#xA;            .using_encoded(|mut bytes| Decode::decode(&amp;mut bytes))&#xD;&#xA;            .expect(&#xD;&#xA;                &quot;decode input is output of Call encode; Call guaranteed to have two enums; qed&quot;,&#xD;&#xA;            );&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22082" PostHistoryTypeId="2" PostId="5766" RevisionGUID="c1d7db7b-f9dc-43f3-9626-09206a5fc026" CreationDate="2022-11-08T12:02:28.533" UserId="2673" Text="You can use the [`queryInfo`](https://polkadot.js.org/docs/substrate/rpc/#queryinfoextrinsic-bytes-at-blockhash-runtimedispatchinfo) RPC enpoint to get weight of a particular extrinsic." ContentLicense="CC BY-SA 4.0" />
  <row Id="22084" PostHistoryTypeId="5" PostId="5765" RevisionGUID="19e1fbbd-16be-4b3e-b799-fc5bb55736ac" CreationDate="2022-11-08T12:10:09.973" UserId="2673" Comment="Rust syntax highlighting" Text="I am not sure if this helps but can fetch pallet id and call id from a call.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let (pallet_idx, call_idx): (u8, u8) = call&#xD;&#xA;        .using_encoded(|mut bytes| Decode::decode(&amp;mut bytes))&#xD;&#xA;        .expect(&#xD;&#xA;            &quot;decode input is output of Call encode; Call guaranteed to have two enums; qed&quot;,&#xD;&#xA;        );&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22085" PostHistoryTypeId="24" PostId="5765" RevisionGUID="19e1fbbd-16be-4b3e-b799-fc5bb55736ac" CreationDate="2022-11-08T12:10:09.973" Comment="Proposed by 2673 approved by 140 edit id of 336" ContentLicense="CC BY-SA 4.0" />
  <row Id="22086" PostHistoryTypeId="2" PostId="5767" RevisionGUID="90c7055c-f180-4825-8e7b-8c0f4e1d3389" CreationDate="2022-11-08T12:34:37.120" UserId="194" Text="The `xcm` crate at some point imports the `sp-io` that  contains its own implementation of the allocator making conflicts with the global_allocator of ink!&#xD;&#xA;&#xD;&#xA;This can be solved importing the `sp-io` as well and use a set of specific features that explicitly excludes th:&#xD;&#xA;&#xD;&#xA;`sp-io = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.30&quot;, default-features = false, features = [&quot;disable_panic_handler&quot;, &quot;disable_oom&quot;, &quot;disable_allocator&quot;] }&#xD;&#xA;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="22088" PostHistoryTypeId="5" PostId="5752" RevisionGUID="0a1ab98e-5f31-44c4-8011-c5c797746385" CreationDate="2022-11-08T13:11:06.783" UserId="251" Comment="added 262 characters in body" Text="Only when the PolkadotApps detect the sudo key in your wallet, the sudo component will be loaded.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After some discussions.&#xD;&#xA;&#xD;&#xA;I found the Substrate version is quite old. If you open your browser console, you will see a lot of errors. Your node be incompatible with the latest PolkadotApps. I guess this is the reason why the sudo pallet fails to load." ContentLicense="CC BY-SA 4.0" />
  <row Id="22089" PostHistoryTypeId="2" PostId="5768" RevisionGUID="72d836df-eed6-44bb-bd1c-041033744e45" CreationDate="2022-11-08T13:19:05.613" UserId="94" Text="You need to have the `Sudo` pallet deployed, which is often the case in development networks.  &#xD;&#xA;Then you can wrap the call in `Sudo::sudo` and sign it with the sudo key.  &#xD;&#xA;&#xD;&#xA;Example of Alice being sudo and stealing funds from Bob via sudo force_transfer;  &#xD;&#xA;You can try this code on a `substrate --dev` node to see it working.  &#xD;&#xA;  &#xD;&#xA;```python&#xD;&#xA;from substrateinterface import SubstrateInterface, Keypair&#xD;&#xA;from substrateinterface.exceptions import SubstrateRequestException&#xD;&#xA;&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=&quot;ws://127.0.0.1:9944&quot;,&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;# Derive the Alice and Bob accounts&#xD;&#xA;alice = Keypair.create_from_uri('//Alice')&#xD;&#xA;bob = Keypair.create_from_uri('//Bob')&#xD;&#xA;&#xD;&#xA;# Query the sudo key&#xD;&#xA;sudo_key = substrate.query(&#xD;&#xA;    module='Sudo',&#xD;&#xA;    storage_function='Key',&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;print(&quot;Sudo key: {}&quot;.format(sudo_key.value))&#xD;&#xA;if sudo_key.value == alice.ss58_address:&#xD;&#xA;    print(&quot;Alice is the sudo key&quot;)&#xD;&#xA;else:&#xD;&#xA;    raise Exception(&quot;Unknown or no sudo key&quot;)&#xD;&#xA;&#xD;&#xA;# Alice steals funds from Bob via sudo force_transfer:&#xD;&#xA;call = substrate.compose_call(&#xD;&#xA;    call_module='Balances',&#xD;&#xA;    call_function='force_transfer',&#xD;&#xA;    call_params={&#xD;&#xA;        'source': bob.ss58_address,&#xD;&#xA;        'dest': alice.ss58_address,&#xD;&#xA;        'value': 100000000000000000000,&#xD;&#xA;    }&#xD;&#xA;)&#xD;&#xA;# Wrap it in sudo.&#xD;&#xA;call = substrate.compose_call(&#xD;&#xA;    call_module='Sudo',&#xD;&#xA;    call_function='sudo',&#xD;&#xA;    call_params={&#xD;&#xA;        'call': call.value,&#xD;&#xA;    }&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;# Signed by Alice&#xD;&#xA;extrinsic = substrate.create_signed_extrinsic(call=call, keypair=alice)&#xD;&#xA;&#xD;&#xA;try:&#xD;&#xA;    receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)&#xD;&#xA;    print(&quot;Extrinsic '{}' sent and included in block '{}'&quot;.format(receipt.extrinsic_hash, receipt.block_hash))&#xD;&#xA;&#xD;&#xA;except SubstrateRequestException as e:&#xD;&#xA;    print(&quot;Failed to send: {}&quot;.format(e))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22091" PostHistoryTypeId="2" PostId="5769" RevisionGUID="ecaebc9c-94c4-4d32-b1e0-6bad5b115e76" CreationDate="2022-11-08T13:21:59.847" UserId="251" Text="It is possible to match the pallet's own calls.&#xD;&#xA;&#xD;&#xA;Check the example: https://github.com/paritytech/substrate/blob/eae25c901ccd4ef5c3ceb082e3f2c66753879062/frame/election-provider-multi-phase/src/lib.rs#L1197-L1200.&#xD;&#xA;&#xD;&#xA;If you want to match other pallets' calls. You could use a trait.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// in your pallet/lib.rs&#xD;&#xA;trait Config {&#xD;&#xA;  type MatchOtherCalls: CallMatch;&#xD;&#xA;}&#xD;&#xA;trait CallMatch {&#xD;&#xA;  fn match(c) -&gt; bool;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// in your runtime/lib.rs&#xD;&#xA;struct CallMatcher;&#xD;&#xA;impl CallMatch for CallMatcher {&#xD;&#xA;  fn match(c) -&gt; bool {&#xD;&#xA;    matches!(c, System::remark(..))&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet::Config for Runtime {&#xD;&#xA;  type MachOtherCalls = CallMatcher;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22093" PostHistoryTypeId="2" PostId="5770" RevisionGUID="01802de6-b672-4e67-b22e-0e74b618a137" CreationDate="2022-11-08T13:50:07.863" UserId="1820" Text="Let's say Account A delegates to Account B and then Account B delegates to Account C. If Account C votes, Account B's vote is included, but not Account A's. And Account B or Account A cannot vote separately since they're delegating.&#xD;&#xA;&#xD;&#xA;So, unbeknownst to Account A, their vote isn't included in the referendum. Should perhaps delegations propagate from one account to the other?&#xD;&#xA;&#xD;&#xA;Otherwise, if we assume that Account A delegated to Account B with the premise that they'll make their own decisions, and as a result their delegation should **not** propagate, then:&#xD;&#xA;- An account should not be allowed to delegate when they have other accounts delegating to them&#xD;&#xA;- Or they should lose their delegations if they themselves delegate" ContentLicense="CC BY-SA 4.0" />
  <row Id="22095" PostHistoryTypeId="1" PostId="5770" RevisionGUID="01802de6-b672-4e67-b22e-0e74b618a137" CreationDate="2022-11-08T13:50:07.863" UserId="1820" Text="Should delegations propagate from one account to another?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22096" PostHistoryTypeId="3" PostId="5770" RevisionGUID="01802de6-b672-4e67-b22e-0e74b618a137" CreationDate="2022-11-08T13:50:07.863" UserId="1820" Text="|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22098" PostHistoryTypeId="5" PostId="5769" RevisionGUID="f902bc8e-f7dc-4e42-a6a8-bb02937e89ba" CreationDate="2022-11-08T14:02:05.483" UserId="251" Comment="added 52 characters in body" Text="It is possible to match the pallet's own calls.&#xD;&#xA;&#xD;&#xA;Check the example: https://github.com/paritytech/substrate/blob/eae25c901ccd4ef5c3ceb082e3f2c66753879062/frame/election-provider-multi-phase/src/lib.rs#L1197-L1200.&#xD;&#xA;&#xD;&#xA;If you want to match other pallets' calls. You could use a trait.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// in your pallet/lib.rs&#xD;&#xA;trait Config {&#xD;&#xA;  type MatchOtherCalls: CallMatch;&#xD;&#xA;}&#xD;&#xA;trait CallMatch {&#xD;&#xA;  // you could make a more complicative logic here&#xD;&#xA;  fn match(c) -&gt; bool;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// in your runtime/lib.rs&#xD;&#xA;struct CallMatcher;&#xD;&#xA;impl CallMatch for CallMatcher {&#xD;&#xA;  fn match(c) -&gt; bool {&#xD;&#xA;    matches!(c, System::remark(..))&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet::Config for Runtime {&#xD;&#xA;  type MachOtherCalls = CallMatcher;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22103" PostHistoryTypeId="2" PostId="5772" RevisionGUID="e541e186-1b6b-4aff-b094-d8241fc6f154" CreationDate="2022-11-08T14:18:03.187" UserId="2635" Text="In the polkadot js/ts library there is a method to estimate tx fee:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const info = await api.tx.balances&#xD;&#xA;  .transfer(recipient, 123)&#xD;&#xA;  .paymentInfo(sender);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We want to do the same (estimate tx fee) using the Rust substrate_api_client library. But the method (paymentInfo) seems not to be implemented in this client. Anyone know how to do this (estimate tx fee) from rust?&#xD;&#xA;&#xD;&#xA;Thanks very much&#xD;&#xA;Regards;&#xD;&#xA;Fernando &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22105" PostHistoryTypeId="1" PostId="5772" RevisionGUID="e541e186-1b6b-4aff-b094-d8241fc6f154" CreationDate="2022-11-08T14:18:03.187" UserId="2635" Text="Polkadot/Substrate estimate tx fee from Rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="22106" PostHistoryTypeId="3" PostId="5772" RevisionGUID="e541e186-1b6b-4aff-b094-d8241fc6f154" CreationDate="2022-11-08T14:18:03.187" UserId="2635" Text="|polkadot|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22108" PostHistoryTypeId="2" PostId="5773" RevisionGUID="550c075c-8f98-46a9-b6ff-d46d8253bf64" CreationDate="2022-11-08T15:07:39.140" UserId="3327" Text="I am using python substrate Interface (https://github.com/polkascan/py-substrate-interface) to interact with the substrate node.&#xD;&#xA;&#xD;&#xA;I need to execute Pallet::Balances::transfer twice by combine both of my transaction in the  utility batch. Now I wanted to retrieve the status and other details of my transaction. How  Can I do that. Following is the code that I am using:&#xD;&#xA;&#xD;&#xA;'''python&#xD;&#xA;&#xD;&#xA;from substrateinterface import SubstrateInterface, Keypair&#xD;&#xA;from tools.utils import show_extrinsic, WS_URL, TOKEN_NUM_BASE,transfer&#xD;&#xA;from tools.two_address_substrate_with_extrinsic import show_account &#xD;&#xA;  &#xD;&#xA;def pallet_utility_test():&#xD;&#xA;    substrate = SubstrateInterface (&#xD;&#xA;        url=WS_URL&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;    kp_src = Keypair.create_from_uri('//Alice')&#xD;&#xA;    kp_dst=Keypair.create_from_uri('//Bob')&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;   &#xD;&#xA;    nonce = substrate.get_account_nonce(kp_src.ss58_address)&#xD;&#xA;    amount_to_be_transfered= 10  &#xD;&#xA;    &#xD;&#xA;    #first valid transaciton&#xD;&#xA;    payload_first = substrate.compose_call(&#xD;&#xA;        call_module='Balances',&#xD;&#xA;        call_function='transfer',&#xD;&#xA;        call_params={&#xD;&#xA;            'dest': kp_dst.ss58_address,&#xD;&#xA;            'value': amount_to_be_transfered * TOKEN_NUM_BASE&#xD;&#xA;        })&#xD;&#xA;&#xD;&#xA;    #Second invalid transaciton&#xD;&#xA;    payload_second = substrate.compose_call(&#xD;&#xA;        call_module='Balances',&#xD;&#xA;        call_function='force_transfer',&#xD;&#xA;        call_params={&#xD;&#xA;            'source': kp_src.ss58_address, &#xD;&#xA;            'dest': kp_dst.ss58_address,&#xD;&#xA;            'value': amount_to_be_transfered * TOKEN_NUM_BASE&#xD;&#xA;        })&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    batch = substrate.compose_call(&#xD;&#xA;        call_module='Utility',&#xD;&#xA;        call_function='batch',&#xD;&#xA;        call_params={&#xD;&#xA;            'calls': [payload_first.value, payload_second.value],&#xD;&#xA;        })&#xD;&#xA;&#xD;&#xA;    extrinsic = substrate.create_signed_extrinsic(&#xD;&#xA;        call=batch,&#xD;&#xA;        keypair= kp_src,&#xD;&#xA;        era={'period': 64},&#xD;&#xA;        nonce=nonce&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;    receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)&#xD;&#xA;    &#xD;&#xA;    if not receipt.is_success:&#xD;&#xA;        print(substrate.get_events(receipt.block_hash))&#xD;&#xA;        raise IOError&#xD;&#xA;'''&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22110" PostHistoryTypeId="1" PostId="5773" RevisionGUID="550c075c-8f98-46a9-b6ff-d46d8253bf64" CreationDate="2022-11-08T15:07:39.140" UserId="3327" Text="How to get specific extrinsic using python substrate interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="22111" PostHistoryTypeId="3" PostId="5773" RevisionGUID="550c075c-8f98-46a9-b6ff-d46d8253bf64" CreationDate="2022-11-08T15:07:39.140" UserId="3327" Text="|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22112" PostHistoryTypeId="5" PostId="5773" RevisionGUID="31464b75-ade7-40cd-8cca-ced04eb39517" CreationDate="2022-11-08T15:13:01.537" UserId="3327" Comment="deleted 4 characters in body" Text="I am using python substrate Interface (https://github.com/polkascan/py-substrate-interface) to interact with the substrate node.&#xD;&#xA;&#xD;&#xA;I need to execute Pallet::Balances::transfer twice by combine both of my transaction in the  utility batch. Now I wanted to retrieve the status and other details of my transaction. How  Can I do that. Following is the code that I am using:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;&#xD;&#xA;from substrateinterface import SubstrateInterface, Keypair&#xD;&#xA;from tools.utils import show_extrinsic, WS_URL, TOKEN_NUM_BASE,transfer&#xD;&#xA;from tools.two_address_substrate_with_extrinsic import show_account &#xD;&#xA;  &#xD;&#xA;def pallet_utility_test():&#xD;&#xA;    substrate = SubstrateInterface (&#xD;&#xA;        url=WS_URL&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;    kp_src = Keypair.create_from_uri('//Alice')&#xD;&#xA;    kp_dst=Keypair.create_from_uri('//Bob')&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;   &#xD;&#xA;    nonce = substrate.get_account_nonce(kp_src.ss58_address)&#xD;&#xA;    amount_to_be_transfered= 10  &#xD;&#xA;    &#xD;&#xA;    #first valid transaciton&#xD;&#xA;    payload_first = substrate.compose_call(&#xD;&#xA;        call_module='Balances',&#xD;&#xA;        call_function='transfer',&#xD;&#xA;        call_params={&#xD;&#xA;            'dest': kp_dst.ss58_address,&#xD;&#xA;            'value': amount_to_be_transfered * TOKEN_NUM_BASE&#xD;&#xA;        })&#xD;&#xA;&#xD;&#xA;    #Second invalid transaciton&#xD;&#xA;    payload_second = substrate.compose_call(&#xD;&#xA;        call_module='Balances',&#xD;&#xA;        call_function='force_transfer',&#xD;&#xA;        call_params={&#xD;&#xA;            'source': kp_src.ss58_address, &#xD;&#xA;            'dest': kp_dst.ss58_address,&#xD;&#xA;            'value': amount_to_be_transfered * TOKEN_NUM_BASE&#xD;&#xA;        })&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    batch = substrate.compose_call(&#xD;&#xA;        call_module='Utility',&#xD;&#xA;        call_function='batch',&#xD;&#xA;        call_params={&#xD;&#xA;            'calls': [payload_first.value, payload_second.value],&#xD;&#xA;        })&#xD;&#xA;&#xD;&#xA;    extrinsic = substrate.create_signed_extrinsic(&#xD;&#xA;        call=batch,&#xD;&#xA;        keypair= kp_src,&#xD;&#xA;        era={'period': 64},&#xD;&#xA;        nonce=nonce&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;    receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)&#xD;&#xA;    &#xD;&#xA;    if not receipt.is_success:&#xD;&#xA;        print(substrate.get_events(receipt.block_hash))&#xD;&#xA;        raise IOError&#xD;&#xA;```&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22113" PostHistoryTypeId="2" PostId="5774" RevisionGUID="42881607-b944-40d3-b7fd-f2c74665d44f" CreationDate="2022-11-08T15:49:41.010" UserId="3327" Text="I am using python substrate Interface (https://github.com/polkascan/py-substrate-interface) to interact with the substrate node.&#xD;&#xA;&#xD;&#xA;How to start my local substrate-node-template using python for substrate interface?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22115" PostHistoryTypeId="1" PostId="5774" RevisionGUID="42881607-b944-40d3-b7fd-f2c74665d44f" CreationDate="2022-11-08T15:49:41.010" UserId="3327" Text="How to start a local substrate node using python substrate interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="22116" PostHistoryTypeId="3" PostId="5774" RevisionGUID="42881607-b944-40d3-b7fd-f2c74665d44f" CreationDate="2022-11-08T15:49:41.010" UserId="3327" Text="|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22117" PostHistoryTypeId="2" PostId="5775" RevisionGUID="b931ab63-16ed-4be5-8049-0cb4348ad206" CreationDate="2022-11-08T16:02:42.663" UserId="3407" Text="If you wait for the extrinsic to be finalized by setting `wait_for_finalization=True` in the `submit_extrinsic` call, you will get back relevant information in the receipt. The best resource for this is the [docs][1] or in the [extrinsic receipt source code][2].&#xD;&#xA;&#xD;&#xA;For instance, you can look at&#xD;&#xA;- `receipt.triggered_events` to get the events that were triggered by the transaction&#xD;&#xA;- `receipt.is_success` like you already do to see if it succeeded&#xD;&#xA;- `receipt.extrinsic` to get info about the extrinsic itself&#xD;&#xA;- `receipt.error_message` to get info about how it failed, if it failed&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]:https://github.com/polkascan/py-substrate-interface#examining-the-extrinsicreceipt-object&#xD;&#xA;[2]:https://github.com/polkascan/py-substrate-interface/blob/master/substrateinterface/base.py#L3312" ContentLicense="CC BY-SA 4.0" />
  <row Id="22119" PostHistoryTypeId="2" PostId="5776" RevisionGUID="357c91a1-5dc7-4bd6-bd06-c36889646eb9" CreationDate="2022-11-08T16:11:57.260" UserId="165" Text="A cool and easy way of checking whether a commit is in which branches is by using the command&#xD;&#xA;&#xD;&#xA;`git branch --contains &lt;commit&gt;`&#xD;&#xA;&#xD;&#xA;This will prompt your **local branches** where the specified commit is present. Take into account that this will only check for you the branches fetched locally." ContentLicense="CC BY-SA 4.0" />
  <row Id="22121" PostHistoryTypeId="2" PostId="5777" RevisionGUID="0438e6e5-402c-4479-b9e4-6d2229e0a394" CreationDate="2022-11-08T16:31:21.260" UserId="2762" Text="What PolkadotJS is doing under the hood is a query the node via the [RPC call payment_queryInfo][1] to retrieve the fee information for an encoded extrinsic.&#xD;&#xA; &#xD;&#xA;An example using CURL to request this information for a extrinsic of my local node:&#xD;&#xA;&#xD;&#xA;    curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;payment_queryInfo&quot;, &quot;params&quot;:[&quot;0x4d028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018890cd70c7ae36911d36c9a740083788213fb4c815ae570e1ef0a6060987cb159b16d4a20e4404061e9b47689e7a86e2c2b651b3634697021f0190ea80066f8e550200000500008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4813000064a7b3b6e00d&quot;]}' localhost:9933&#xD;&#xA;&#xD;&#xA;With the response you are looking for:&#xD;&#xA;&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:{&quot;weight&quot;:{&quot;ref_time&quot;:166860000,&quot;proof_size&quot;:0},&quot;class&quot;:&quot;normal&quot;,&quot;partialFee&quot;:&quot;253158149&quot;},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;You can do the same in RUST using the [**jsonrpsee**][2] a Rust implementation of JSON-RPC 2.0 Specification. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/rpc/#queryinfoextrinsic-bytes-at-blockhash-runtimedispatchinfo&#xD;&#xA;  [2]: https://github.com/paritytech/jsonrpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="22123" PostHistoryTypeId="6" PostId="5774" RevisionGUID="281f6f92-eedc-4e96-9f16-33fab42b58b3" CreationDate="2022-11-08T16:43:03.567" UserId="165" Comment="edited tags" Text="|substrateinterface|python|polkascan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22124" PostHistoryTypeId="2" PostId="5778" RevisionGUID="3811142f-94ff-4e50-b351-105e5c487c50" CreationDate="2022-11-08T16:45:34.457" UserId="165" Text="As you note in your question py-substrate-interface is just used to interface with a node, a node that is already running. If you are interested in discovering more about how to set up and run your own nodes I would recommend visiting https://docs.substrate.io/&#xD;&#xA;&#xD;&#xA;And a maybe more direct hands on entry point to launch your node: https://docs.substrate.io/tutorials/get-started/build-local-blockchain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22126" PostHistoryTypeId="2" PostId="5779" RevisionGUID="ed887a95-b2be-4843-bb57-3ff626355a1d" CreationDate="2022-11-08T16:47:34.150" UserId="3317" Text="Looping through tuples is not ideal (to put it lightly) since they are not heterogeneous.&#xD;&#xA;&#xD;&#xA;You could tackle this in two ways:&#xD;&#xA;- As you commented yourself: creating another mapping where the associated AccountId's (operator accounts) are mapped to an AccountId.&#xD;&#xA;- Mapping with Vec, an example of such a nested structure: https://github.com/paritytech/ink/blob/f03f2a6d63d85caa0cc8a361e5b78948268d2645/examples/mother/lib.rs#L40" ContentLicense="CC BY-SA 4.0" />
  <row Id="22129" PostHistoryTypeId="5" PostId="5753" RevisionGUID="ff8f28dd-122b-445f-b16e-746f013570e0" CreationDate="2022-11-08T17:04:41.260" UserId="116" Comment="spelling  i-&gt;I" Text="## Problem&#xD;&#xA;How can I get the correct `vec&lt;u8&gt;` in the pallet when I use `vsc&lt;u8&gt;` as the parameter of pallet. I can get the correct `vec&lt;u8&gt;` in the front end, but not in the pallet.&#xD;&#xA;&#xD;&#xA;**In Polkadot js**:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**In the pallet——Maci-verifier**&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fzeBe.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/wtDf6.png&#xD;&#xA;&#xD;&#xA;So, why does it ?&#xD;&#xA;&#xD;&#xA;This is my source code: https://github.com/VegeBun-csj/substrate-zk/blob/master/pallets/maci-verifier/src/lib.rs#L69" ContentLicense="CC BY-SA 4.0" />
  <row Id="22130" PostHistoryTypeId="24" PostId="5753" RevisionGUID="ff8f28dd-122b-445f-b16e-746f013570e0" CreationDate="2022-11-08T17:04:41.260" Comment="Proposed by 116 approved by -1 edit id of 335" ContentLicense="CC BY-SA 4.0" />
  <row Id="22131" PostHistoryTypeId="5" PostId="5753" RevisionGUID="50338df6-35c9-4f9f-b8f5-57836a355d64" CreationDate="2022-11-08T17:04:41.260" UserId="251" Comment="spelling  i-&gt;I" Text="## Problem&#xD;&#xA;How can I get the correct `Vec&lt;u8&gt;` in the pallet when I use `Vec&lt;u8&gt;` as the parameter of the pallet?&#xD;&#xA;&#xD;&#xA;I can get the correct `Vec&lt;u8&gt;` in the front end, but not in the pallet.&#xD;&#xA;&#xD;&#xA;**In Polkadot js**:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**In the pallet——Maci-verifier**&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fzeBe.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/wtDf6.png&#xD;&#xA;&#xD;&#xA;So, why does it?&#xD;&#xA;&#xD;&#xA;This is my source code: https://github.com/VegeBun-csj/substrate-zk/blob/master/pallets/maci-verifier/src/lib.rs#L69" ContentLicense="CC BY-SA 4.0" />
  <row Id="22132" PostHistoryTypeId="52" PostId="5760" RevisionGUID="789a88f4-753c-4763-aff6-4ca2cd0669cb" CreationDate="2022-11-08T17:32:55.520" />
  <row Id="22133" PostHistoryTypeId="2" PostId="5780" RevisionGUID="32e410f2-cd6f-4f4e-9f11-23cbdaeefbbd" CreationDate="2022-11-08T17:41:23.797" UserId="2762" Text="First congratulations for winning a slot to launch your parachain.&#xD;&#xA;&#xD;&#xA;Unlike validators, collators has nothing to do with security of the network, by being a parachain, the network is by default trustless and decentralized, and a parachain only needs one honest collator to be censorship-resistant. Collators are similar to validators on any other blockchain, but they do not need to provide security guarantees because Polkadot provides those.&#xD;&#xA;&#xD;&#xA;The minimal safe ratio of validators per parachain is 5:1. With a sufficiently large set of validators, the randomness of their distribution along with availability and validity will make sure security is on-par.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Your questions are not easy to answer but let me share some resources I think can be useful to help you clarify your doubts and questions with collators. &#xD;&#xA;&#xD;&#xA;- You can check more about this in the Polkadot wiki: [Collators][1] and [Parachains][2]&#xD;&#xA;&#xD;&#xA;- An about [Availability and Validity][3] in the Polkadot Protocol Specification.&#xD;&#xA;&#xD;&#xA;- To go more in deep with the Parachain security check the [research from Web3 Foundation][4].&#xD;&#xA;&#xD;&#xA;- The [Go-To Overview][5] for developing a Parachain with a section when talked about [Para-nomics][6].&#xD;&#xA;&#xD;&#xA;- For testing: [parachain-launch][7] is a script that generates a docker compose file allowing you to launch a testnet of multiple blockchain nodes.&#xD;&#xA;&#xD;&#xA;And finally I encourage you to see what other parachains are doing:&#xD;&#xA;&#xD;&#xA;- Check this Blog in the Polkadot Forum about [Determine Collator node minimal performance requirement][8]&#xD;&#xA;&#xD;&#xA;- [Moonbeam Collator Requierements][9]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-collator&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-parachains&#xD;&#xA;  [3]: https://spec.polkadot.network/?utm_campaign=WiP%20Parity%20Internal%20Newsletter&amp;utm_medium=email&amp;_hsmi=219540124&amp;_hsenc=p2ANqtz-9bkqdU71xuj9pD63dumKbwQLFmoAlUUFyvPsrpSwXUIcjd7pvjBl9fW1UJNyPctdLuqszq7tp7LXy48obojmEIq4MTfg&amp;utm_content=219540124&amp;utm_source=hs_email#chapter-anv&#xD;&#xA;  [4]: https://research.web3.foundation/en/latest/polkadot/networking/1-parachains.html#parachain-security-vs-polkadot-security&#xD;&#xA;  [5]: https://wiki.polkadot.network/docs/build-pdk&#xD;&#xA;  [6]: https://wiki.polkadot.network/docs/build-pdk#things-to-consider&#xD;&#xA;  [7]: https://github.com/open-web3-stack/parachain-launch&#xD;&#xA;  [8]: https://forum.polkadot.network/t/determine-collator-node-minimal-performance-requirement/613&#xD;&#xA;  [9]: https://docs.moonbeam.network/node-operators/networks/collators/requirements/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22135" PostHistoryTypeId="2" PostId="5781" RevisionGUID="1d4714ed-f5ce-4bc0-bfb1-08e0dd3f1ce9" CreationDate="2022-11-08T17:55:38.137" UserId="165" Text="From what I understand you have a stalled parachain, maybe not event running ? From which you kept a db backup.&#xD;&#xA;&#xD;&#xA;If that is the scenario you should be able to launch your para with that backup. Assuming the validation function of your parachain is still the same that the one you used to register it on the relay, then you would only need to update the head information on the relaychain for your para.&#xD;&#xA;&#xD;&#xA;This can be done via &#xD;&#xA;[`force_set_current_head`](https://github.com/paritytech/polkadot/blob/1eb107d26dd7ea692e61d157d9c4c5ec78d1b0ac/runtime/parachains/src/paras/mod.rs#L819)&#xD;&#xA;or&#xD;&#xA;[`set_current_head`](https://github.com/paritytech/polkadot/blob/1eb107d26dd7ea692e61d157d9c4c5ec78d1b0ac/runtime/common/src/paras_registrar.rs#L390). Using as new head the state from the last block of your backup.&#xD;&#xA;&#xD;&#xA;I would recommend `using set_current_head`, but both will result in the same.&#xD;&#xA;&#xD;&#xA;Though, understand that having to set a new head for your para on the relaychain &quot;manually&quot; is something done in very counted occasions." ContentLicense="CC BY-SA 4.0" />
  <row Id="22137" PostHistoryTypeId="2" PostId="5782" RevisionGUID="5563815d-572b-4dbb-9d0e-aaebbee75fe6" CreationDate="2022-11-08T19:29:48.737" UserId="3098" Text="As per https://github.com/paritytech/cargo-contract/issues/527, currently there is no way of conditionally compiling contract. This feature will be added in the next ink! 4.0 release.&#xD;&#xA;&#xD;&#xA;I have attempted to implement conditional compilation, but it doesn't work in intended way, so we had to revert the PR: https://github.com/paritytech/ink/pull/1479&#xD;&#xA;&#xD;&#xA;Please bear with us :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="22139" PostHistoryTypeId="52" PostId="5763" RevisionGUID="2a61b561-f43d-4069-b44f-248d743c2399" CreationDate="2022-11-08T19:48:46.160" />
  <row Id="22140" PostHistoryTypeId="2" PostId="5783" RevisionGUID="a8329729-b5df-464f-a509-209cd9ba1f83" CreationDate="2022-11-08T19:55:43.177" UserId="2960" Text="I get the below error when I run cargo build. &#xD;&#xA;is there a code example on how to implement the missing trait or can someone point me to a detailed explanation or provide one ? thanks &#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `sp_runtime::MultiSignature: Verify` is not satisfied&#xD;&#xA;      --&gt; node/src/chain_spec.rs:27:1&#xD;&#xA;       |&#xD;&#xA;    27 | / pub fn get_account_id_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; AccountId&#xD;&#xA;    28 | | where&#xD;&#xA;    29 | |     AccountPublic: From&lt;&lt;TPublic::Pair as Pair&gt;::Public&gt;,&#xD;&#xA;       | |_________________________________________________________^ the trait `Verify` is not implemented for `sp_runtime::MultiSignature`&#xD;&#xA;       |&#xD;&#xA;       = help: the following other types implement trait `Verify`:&#xD;&#xA;                 AnySignature&#xD;&#xA;                 MultiSignature&#xD;&#xA;                 TestSignature&#xD;&#xA;                 sp_core::ecdsa::Signature&#xD;&#xA;                 sp_core::ed25519::Signature&#xD;&#xA;                 sp_core::sr25519::Signature&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `sp_runtime::MultiSignature: Verify` is not satisfied&#xD;&#xA;      --&gt; node/src/chain_spec.rs:27:1&#xD;&#xA;       |&#xD;&#xA;    27 | / pub fn get_account_id_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; AccountId&#xD;&#xA;    28 | | where&#xD;&#xA;    29 | |     AccountPublic: From&lt;&lt;TPublic::Pair as Pair&gt;::Public&gt;,&#xD;&#xA;    30 | | {&#xD;&#xA;    31 | |     AccountPublic::from(get_from_seed::&lt;TPublic&gt;(seed)).into_account()&#xD;&#xA;    32 | | }&#xD;&#xA;       | |_^ the trait `Verify` is not implemented for `sp_runtime::MultiSignature`&#xD;&#xA;       |&#xD;&#xA;       = help: the following other types implement trait `Verify`:&#xD;&#xA;                 AnySignature&#xD;&#xA;                 MultiSignature&#xD;&#xA;                 TestSignature&#xD;&#xA;                 sp_core::ecdsa::Signature&#xD;&#xA;                 sp_core::ed25519::Signature&#xD;&#xA;                 sp_core::sr25519::Signature&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22142" PostHistoryTypeId="1" PostId="5783" RevisionGUID="a8329729-b5df-464f-a509-209cd9ba1f83" CreationDate="2022-11-08T19:55:43.177" UserId="2960" Text="the trait bound `sp_runtime::MultiSignature: Verify` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="22143" PostHistoryTypeId="3" PostId="5783" RevisionGUID="a8329729-b5df-464f-a509-209cd9ba1f83" CreationDate="2022-11-08T19:55:43.177" UserId="2960" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22144" PostHistoryTypeId="2" PostId="5784" RevisionGUID="6ca83ee6-321f-4b9d-942e-68c15ebab88c" CreationDate="2022-11-08T20:45:48.587" UserId="464" Text="Is there a way to send tx fees of a pallet to an account? Like transactions fees of pallet X is send to an account. We can split the global tx fees between treasury and other but we want to do it as a per pallet basis." ContentLicense="CC BY-SA 4.0" />
  <row Id="22146" PostHistoryTypeId="1" PostId="5784" RevisionGUID="6ca83ee6-321f-4b9d-942e-68c15ebab88c" CreationDate="2022-11-08T20:45:48.587" UserId="464" Text="collect tx fees from a pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="22147" PostHistoryTypeId="3" PostId="5784" RevisionGUID="6ca83ee6-321f-4b9d-942e-68c15ebab88c" CreationDate="2022-11-08T20:45:48.587" UserId="464" Text="|transactions|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22154" PostHistoryTypeId="2" PostId="5786" RevisionGUID="660a8b74-b2e6-41d2-a0fc-29c1fcb1ddf8" CreationDate="2022-11-09T00:06:04.550" UserId="3423" Text="I am a Rust and Ink! novice so please bear with me but, I have a struct that looks like the following:    &#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Contract {&#xD;&#xA;        test: sp_arithmetic::FixedU128,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Unfortunately, I unable to build this project because of the following errors:&#xD;&#xA;&#xD;&#xA;&gt; the trait bound `FixedU128: SpreadLayout` is not satisfied the&#xD;&#xA;&gt; following other types implement trait `SpreadLayout`&#xD;&#xA;&#xD;&#xA;&gt; the trait bound `FixedU128: StorageLayout` is not satisfied the&#xD;&#xA;&gt; following other types implement trait `StorageLayout`&#xD;&#xA;&#xD;&#xA;For the smart contract project I am working on, I really need to use fixed points.&#xD;&#xA;What is the recommended way to solve this issue? To create some wrapper that implements the above traits? If yes, are there any good tutorials for that?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you very much in advance for your time!" ContentLicense="CC BY-SA 4.0" />
  <row Id="22156" PostHistoryTypeId="1" PostId="5786" RevisionGUID="660a8b74-b2e6-41d2-a0fc-29c1fcb1ddf8" CreationDate="2022-11-09T00:06:04.550" UserId="3423" Text="Ink! smart contract struct field issues" ContentLicense="CC BY-SA 4.0" />
  <row Id="22157" PostHistoryTypeId="3" PostId="5786" RevisionGUID="660a8b74-b2e6-41d2-a0fc-29c1fcb1ddf8" CreationDate="2022-11-09T00:06:04.550" UserId="3423" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22158" PostHistoryTypeId="5" PostId="5783" RevisionGUID="40edf423-eddd-4206-a671-4ad59b838cbc" CreationDate="2022-11-09T01:44:11.403" UserId="251" Comment="added 10 characters in body" Text="I get the below error when I run cargo build. &#xD;&#xA;is there a code example on how to implement the missing trait or can someone point me to a detailed explanation or provide one ? thanks &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    error[E0277]: the trait bound `sp_runtime::MultiSignature: Verify` is not satisfied&#xD;&#xA;      --&gt; node/src/chain_spec.rs:27:1&#xD;&#xA;       |&#xD;&#xA;    27 | / pub fn get_account_id_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; AccountId&#xD;&#xA;    28 | | where&#xD;&#xA;    29 | |     AccountPublic: From&lt;&lt;TPublic::Pair as Pair&gt;::Public&gt;,&#xD;&#xA;       | |_________________________________________________________^ the trait `Verify` is not implemented for `sp_runtime::MultiSignature`&#xD;&#xA;       |&#xD;&#xA;       = help: the following other types implement trait `Verify`:&#xD;&#xA;                 AnySignature&#xD;&#xA;                 MultiSignature&#xD;&#xA;                 TestSignature&#xD;&#xA;                 sp_core::ecdsa::Signature&#xD;&#xA;                 sp_core::ed25519::Signature&#xD;&#xA;                 sp_core::sr25519::Signature&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `sp_runtime::MultiSignature: Verify` is not satisfied&#xD;&#xA;      --&gt; node/src/chain_spec.rs:27:1&#xD;&#xA;       |&#xD;&#xA;    27 | / pub fn get_account_id_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; AccountId&#xD;&#xA;    28 | | where&#xD;&#xA;    29 | |     AccountPublic: From&lt;&lt;TPublic::Pair as Pair&gt;::Public&gt;,&#xD;&#xA;    30 | | {&#xD;&#xA;    31 | |     AccountPublic::from(get_from_seed::&lt;TPublic&gt;(seed)).into_account()&#xD;&#xA;    32 | | }&#xD;&#xA;       | |_^ the trait `Verify` is not implemented for `sp_runtime::MultiSignature`&#xD;&#xA;       |&#xD;&#xA;       = help: the following other types implement trait `Verify`:&#xD;&#xA;                 AnySignature&#xD;&#xA;                 MultiSignature&#xD;&#xA;                 TestSignature&#xD;&#xA;                 sp_core::ecdsa::Signature&#xD;&#xA;                 sp_core::ed25519::Signature&#xD;&#xA;                 sp_core::sr25519::Signature&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22159" PostHistoryTypeId="2" PostId="5787" RevisionGUID="13a32ee2-fdcc-4047-b5dc-6c19944f6ec7" CreationDate="2022-11-09T02:43:26.650" UserId="3221" Text="@Mrisho, I can't comment directly your answer due to StackExchange limitations, but OP asked explicitly to NOT have to use the &quot;--dev&quot; option for the offchain worker to run.&#xD;&#xA;&#xD;&#xA;With your answer, as far as I've tested, the offchain worker would still need --dev to run; if not using &quot;--dev&quot;, the offchain worker doesn't print logs; even using &quot;--offchain-worker Always&quot; doesn't help&#xD;&#xA;&#xD;&#xA;Following, I'm also interested in the exact &amp; concrete answers to OP's questions&#xD;&#xA;&gt; how to add keys to the keystore such that they persist&#xD;&#xA;&#xD;&#xA;&gt; how to run the local node s.t. the ocw is enabled AND it picks up the added keys, without having to re-add them every time" ContentLicense="CC BY-SA 4.0" />
  <row Id="22161" PostHistoryTypeId="2" PostId="5788" RevisionGUID="70e8988c-2c8c-4bde-bf6c-e60505ea4659" CreationDate="2022-11-09T02:45:33.317" UserId="170" Text="You can store it in the storage as a `Vec&lt;u8&gt;`, in the function you can decode the FixedU128, and when you want to store the value, you can encode it.&#xD;&#xA;&#xD;&#xA;The problem is that the type does not implement the `SpreadLayout`, which must be implemented for the contract storage struct (therefore for all its members as well)." ContentLicense="CC BY-SA 4.0" />
  <row Id="22163" PostHistoryTypeId="5" PostId="5787" RevisionGUID="7f9ba722-8229-4358-9297-ae46460c4e3e" CreationDate="2022-11-09T02:48:34.343" UserId="3221" Comment="added 25 characters in body" Text="@Mrisho, I can't comment directly your answer due to StackExchange limitations, but OP asked explicitly to NOT have to use the &quot;--dev&quot; option for the offchain worker to run.&#xD;&#xA;&#xD;&#xA;With your answer, as far as I've tested, the offchain worker would still need &quot;--dev&quot; flag to run; if not using &quot;--dev&quot; flag, the offchain worker doesn't print logs; even using &quot;--offchain-worker Always&quot; doesn't help&#xD;&#xA;&#xD;&#xA;Following this thread, I'm also interested in the exact &amp; concrete answers to OP's questions:&#xD;&#xA;&gt; how to add keys to the keystore such that they persist&#xD;&#xA;&#xD;&#xA;&gt; how to run the local node s.t. the ocw is enabled AND it picks up the added keys, without having to re-add them every time" ContentLicense="CC BY-SA 4.0" />
  <row Id="22164" PostHistoryTypeId="5" PostId="5753" RevisionGUID="81ab771e-c429-45a1-afde-affd1b165167" CreationDate="2022-11-09T07:06:50.263" UserId="489" Comment="added 968 characters in body" Text="## Problem&#xD;&#xA;How can I get the correct `Vec&lt;u8&gt;` in the pallet when I use `Vec&lt;u8&gt;` as the parameter of the pallet?&#xD;&#xA;&#xD;&#xA;## code&#xD;&#xA;```rust&#xD;&#xA;pub fn generate_proof_vkey(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof_a: Vec&lt;u8&gt;,&#xD;&#xA;			proof_b: Vec&lt;u8&gt;,&#xD;&#xA;			proof_c: Vec&lt;u8&gt;,&#xD;&#xA;			vk_alpha1: Vec&lt;u8&gt;,&#xD;&#xA;			vk_beta_2: Vec&lt;u8&gt;,&#xD;&#xA;			vk_gamma_2: Vec&lt;u8&gt;,&#xD;&#xA;			vk_delta_2: Vec&lt;u8&gt;,&#xD;&#xA;			vk_ic: Vec&lt;Vec&lt;u8&gt;&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			let proof = ProofStr { pi_a: proof_a, pi_b: proof_b, pi_c: proof_c };&#xD;&#xA;            log::info!(&quot;{:?}&quot;, proof.pi_a);&#xD;&#xA;			let vkey = VkeyStr {&#xD;&#xA;				alpha_1: vk_alpha1, &#xD;&#xA;				beta_2: vk_beta_2,&#xD;&#xA;				gamma_2: vk_gamma_2,&#xD;&#xA;				delta_2: vk_delta_2,&#xD;&#xA;				ic: vk_ic,&#xD;&#xA;			};&#xD;&#xA;			&lt;Pof&lt;T&gt;&gt;::insert(who.clone(), &amp;proof);&#xD;&#xA;			&lt;Vkey&lt;T&gt;&gt;::insert(who.clone(),&amp;vkey);&#xD;&#xA;			Self::deposit_event(Event::&lt;T&gt;::ProofStored(proof, who.clone()));&#xD;&#xA;			Self::deposit_event(Event::&lt;T&gt;::VerificationKeyStore(vkey, who));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can get the correct `Vec&lt;u8&gt;` in the front end, but not in the pallet.&#xD;&#xA;&#xD;&#xA;**In Polkadot js**:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**In the pallet——Maci-verifier**&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fzeBe.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/wtDf6.png&#xD;&#xA;&#xD;&#xA;In the pallet, when i print the `proof.pi_a`, it output the encoded data. However i want to get the vec data like in polkadot js instead of encoded.&#xD;&#xA;&#xD;&#xA;source code link: https://github.com/VegeBun-csj/substrate-zk/blob/master/pallets/maci-verifier/src/lib.rs#L69" ContentLicense="CC BY-SA 4.0" />
  <row Id="22165" PostHistoryTypeId="2" PostId="5789" RevisionGUID="7431fd46-cf79-45ae-8d30-b3117dd7ac42" CreationDate="2022-11-09T08:09:20.683" UserId="3385" Text="I'm going to answer my own question here after some more digging...&#xD;&#xA;&#xD;&#xA;There's no good solution to this in ink! 3 because `Mapping::storage_key` (used in [`Mapping::insert`][1]) has the following [definition][2]:&#xD;&#xA;&#xD;&#xA;    fn storage_key&lt;Q&gt;(&amp;self, key: &amp;Q) -&gt; Key&#xD;&#xA;    where&#xD;&#xA;        Q: scale::EncodeLike&lt;K&gt;,&#xD;&#xA;    {&#xD;&#xA;        let encodedable_key = (&amp;self.offset_key, key);&#xD;&#xA;        let mut output = &lt;Blake2x256 as HashOutput&gt;::Type::default();&#xD;&#xA;        ink_env::hash_encoded::&lt;Blake2x256, _&gt;(&amp;encodedable_key, &amp;mut output);&#xD;&#xA;        output.into()&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It's blake2b hashing the `key` and map's offset before calling pallet's runtime. Meaning, even if we iterate over all keys in the map, we won't be able to recover the original `key` the value was stored under.&#xD;&#xA;&#xD;&#xA;This is fixed ink! 4. See [\[3\]][3] and [\[4\]][4] for more details.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ink_storage/3.4.0/src/ink_storage/lazy/mapping.rs.html#130-136&#xD;&#xA;  [2]: https://docs.rs/ink_storage/3.4.0/src/ink_storage/lazy/mapping.rs.html#203&#xD;&#xA;  [3]: https://docs.rs/ink_storage/4.0.0-alpha.3/src/ink_storage/lazy/mapping.rs.html#140&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/pull/11501" ContentLicense="CC BY-SA 4.0" />
  <row Id="22167" PostHistoryTypeId="2" PostId="5790" RevisionGUID="31d39df2-a896-4ee8-962b-806ac28022bc" CreationDate="2022-11-09T10:00:08.993" UserId="3424" Text="I'm trying to build [Substrate][1] after cloning it it with `git clone`. I'm in the root directory. What am I doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Steps to reproduce:&#xD;&#xA;First attempt:&#xD;&#xA;1. `rustup override set nightly-2022-10-20`&#xD;&#xA;2. `cargo run`&#xD;&#xA;&#xD;&#xA;&lt;details&gt;&#xD;&#xA;&lt;summary&gt;output:&lt;/summary&gt;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run&#xD;&#xA;   Compiling proc-macro2 v1.0.46&#xD;&#xA;   Compiling unicode-ident v1.0.1&#xD;&#xA;[...]&#xD;&#xA;[...]&#xD;&#xA;[...]&#xD;&#xA;   Compiling substrate-wasm-builder v5.0.0-dev (/home/amab/src/substrate/utils/wasm-builder)&#xD;&#xA;   Compiling kitchensink-runtime v3.0.0-dev (/home/amab/src/substrate/bin/node/runtime)&#xD;&#xA;error: failed to run custom build command for `kitchensink-runtime v3.0.0-dev (/home/amab/src/substrate/bin/node/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/amab/src/substrate/target/debug/build/kitchensink-runtime-00f6a898772ead1c/build-script-build` (exit status: 1)&#xD;&#xA;  --- stderr&#xD;&#xA;  Rust WASM toolchain not installed, please install it!&#xD;&#xA;&#xD;&#xA;  Further error information:&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;     Compiling wasm-test v1.0.0 (/tmp/.tmpLkxJdw)&#xD;&#xA;  error[E0463]: can't find crate for `std`&#xD;&#xA;    |&#xD;&#xA;    = note: the `wasm32-unknown-unknown` target may not be installed&#xD;&#xA;    = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`&#xD;&#xA;    = help: consider building the standard library from source with `cargo build -Zbuild-std`&#xD;&#xA;&#xD;&#xA;  error: requires `sized` lang_item&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0463`.&#xD;&#xA;  error: could not compile `wasm-test` due to 2 previous errors&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&lt;/details&gt;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22169" PostHistoryTypeId="1" PostId="5790" RevisionGUID="31d39df2-a896-4ee8-962b-806ac28022bc" CreationDate="2022-11-09T10:00:08.993" UserId="3424" Text="Unable to build Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="22170" PostHistoryTypeId="3" PostId="5790" RevisionGUID="31d39df2-a896-4ee8-962b-806ac28022bc" CreationDate="2022-11-09T10:00:08.993" UserId="3424" Text="|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22171" PostHistoryTypeId="5" PostId="5790" RevisionGUID="f7b63ecc-f89f-4651-94bd-99c028cec34e" CreationDate="2022-11-09T10:01:19.780" UserId="3424" Comment="added 37 characters in body" Text="I'm trying to build Substrate (https://github.com/paritytech/substrate) after cloning it it with `git clone`. I'm in the root directory. What am I doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Steps to reproduce:&#xD;&#xA;First attempt:&#xD;&#xA;1. `rustup override set nightly-2022-10-20`&#xD;&#xA;2. `cargo run`&#xD;&#xA;&#xD;&#xA;&lt;details&gt;&#xD;&#xA;&lt;summary&gt;output:&lt;/summary&gt;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run&#xD;&#xA;   Compiling proc-macro2 v1.0.46&#xD;&#xA;   Compiling unicode-ident v1.0.1&#xD;&#xA;[...]&#xD;&#xA;[...]&#xD;&#xA;[...]&#xD;&#xA;   Compiling substrate-wasm-builder v5.0.0-dev (/home/amab/src/substrate/utils/wasm-builder)&#xD;&#xA;   Compiling kitchensink-runtime v3.0.0-dev (/home/amab/src/substrate/bin/node/runtime)&#xD;&#xA;error: failed to run custom build command for `kitchensink-runtime v3.0.0-dev (/home/amab/src/substrate/bin/node/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/amab/src/substrate/target/debug/build/kitchensink-runtime-00f6a898772ead1c/build-script-build` (exit status: 1)&#xD;&#xA;  --- stderr&#xD;&#xA;  Rust WASM toolchain not installed, please install it!&#xD;&#xA;&#xD;&#xA;  Further error information:&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;     Compiling wasm-test v1.0.0 (/tmp/.tmpLkxJdw)&#xD;&#xA;  error[E0463]: can't find crate for `std`&#xD;&#xA;    |&#xD;&#xA;    = note: the `wasm32-unknown-unknown` target may not be installed&#xD;&#xA;    = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`&#xD;&#xA;    = help: consider building the standard library from source with `cargo build -Zbuild-std`&#xD;&#xA;&#xD;&#xA;  error: requires `sized` lang_item&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0463`.&#xD;&#xA;  error: could not compile `wasm-test` due to 2 previous errors&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&lt;/details&gt;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22172" PostHistoryTypeId="2" PostId="5791" RevisionGUID="eaf3df39-7adf-4093-88f4-17b7cec8cb37" CreationDate="2022-11-09T10:06:27.740" UserId="251" Text="I can't find the `net::*` RPC APIs under the https://github.com/paritytech/substrate/tree/be259234bfee056bef970ac372e04a74411c5224/client/rpc-api.&#xD;&#xA;&#xD;&#xA;I'm curious where it was defined.&#xD;&#xA;&#xD;&#xA;I can find all the other RPC APIs under that folder." ContentLicense="CC BY-SA 4.0" />
  <row Id="22174" PostHistoryTypeId="1" PostId="5791" RevisionGUID="eaf3df39-7adf-4093-88f4-17b7cec8cb37" CreationDate="2022-11-09T10:06:27.740" UserId="251" Text="Where is the `peer_count` function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22175" PostHistoryTypeId="3" PostId="5791" RevisionGUID="eaf3df39-7adf-4093-88f4-17b7cec8cb37" CreationDate="2022-11-09T10:06:27.740" UserId="251" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22176" PostHistoryTypeId="5" PostId="5780" RevisionGUID="24c0877f-a3b9-489f-ac09-2f60e22e71fe" CreationDate="2022-11-09T10:11:40.410" UserId="2762" Comment="added content" Text="First congratulations for winning a slot to launch your parachain.&#xD;&#xA;&#xD;&#xA;Unlike validators, collators has nothing to do with security of the network, by being a parachain, the network is by default trustless and decentralized, and a parachain only needs one honest collator to be censorship-resistant. Collators are similar to validators on any other blockchain, but they do not need to provide security guarantees because Polkadot provides those.&#xD;&#xA;&#xD;&#xA;The minimal safe ratio of validators per parachain is 5:1. With a sufficiently large set of validators, the randomness of their distribution along with availability and validity will make sure security is on-par.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Your questions are not easy to answer but let me share some resources I think can be useful to help you clarify your doubts and questions with collators. &#xD;&#xA;&#xD;&#xA;- You can check more about this in the Polkadot wiki: [Collators][1] and [Parachains][2]&#xD;&#xA;&#xD;&#xA;- An about [Availability and Validity][3] in the Polkadot Protocol Specification.&#xD;&#xA;&#xD;&#xA;- To go more in deep with the Parachain security check the [research from Web3 Foundation][4].&#xD;&#xA;&#xD;&#xA;- The [Go-To Overview][5] for developing a Parachain with a section when talked about [Para-nomics][6].&#xD;&#xA;&#xD;&#xA;- For testing: [parachain-launch][7] is a script that generates a docker compose file allowing you to launch a testnet of multiple blockchain nodes.&#xD;&#xA;&#xD;&#xA;- Check the [Collator memory profiling][8]. It should be done to analyze memory leaks, identify where memory consumption is happening, define temporary allocations, and investigate excessive memory fragmentation within applications.&#xD;&#xA;&#xD;&#xA;And finally I encourage you to see what other parachains are doing:&#xD;&#xA;&#xD;&#xA;- Check this Blog in the Polkadot Forum about [Determine Collator node minimal performance requirement][9]&#xD;&#xA;&#xD;&#xA;- [Moonbeam Collator Requierements][10]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-collator&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-parachains&#xD;&#xA;  [3]: https://spec.polkadot.network/?utm_campaign=WiP%20Parity%20Internal%20Newsletter&amp;utm_medium=email&amp;_hsmi=219540124&amp;_hsenc=p2ANqtz-9bkqdU71xuj9pD63dumKbwQLFmoAlUUFyvPsrpSwXUIcjd7pvjBl9fW1UJNyPctdLuqszq7tp7LXy48obojmEIq4MTfg&amp;utm_content=219540124&amp;utm_source=hs_email#chapter-anv&#xD;&#xA;  [4]: https://research.web3.foundation/en/latest/polkadot/networking/1-parachains.html#parachain-security-vs-polkadot-security&#xD;&#xA;  [5]: https://wiki.polkadot.network/docs/build-pdk&#xD;&#xA;  [6]: https://wiki.polkadot.network/docs/build-pdk#things-to-consider&#xD;&#xA;  [7]: https://github.com/open-web3-stack/parachain-launch&#xD;&#xA;  [8]: https://docs.substrate.io/reference/command-line-tools/memory-profiler/&#xD;&#xA;  [9]: https://forum.polkadot.network/t/determine-collator-node-minimal-performance-requirement/613&#xD;&#xA;  [10]: https://docs.moonbeam.network/node-operators/networks/collators/requirements/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22177" PostHistoryTypeId="2" PostId="5792" RevisionGUID="2e860a6f-2204-4a80-b84e-06d51e25541f" CreationDate="2022-11-09T10:26:33.380" UserId="251" Text="```&#xD;&#xA;rustup target add wasm32-unknown-unknown --toolchain nightly-2022-10-20&#xD;&#xA;cargo +nightly-2022-10-20 run&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;rustup default nightly-2022-10-20&#xD;&#xA;rustup target add wasm32-unknown-unknown&#xD;&#xA;cargo run&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22179" PostHistoryTypeId="5" PostId="5791" RevisionGUID="7387e6c1-9731-46e5-a19d-ccca3506d7a8" CreationDate="2022-11-09T10:28:54.377" UserId="251" Comment="added 74 characters in body" Text="I can't find the `net::*` RPC APIs under https://github.com/paritytech/substrate/tree/be259234bfee056bef970ac372e04a74411c5224/client/rpc-api.&#xD;&#xA;&#xD;&#xA;There are three net APIs, `netListening`, `netPeerCount` and `netVersion`.&#xD;&#xA;&#xD;&#xA;I'm curious about where they were defined.&#xD;&#xA;&#xD;&#xA;I can find all the other RPC APIs under that folder." ContentLicense="CC BY-SA 4.0" />
  <row Id="22180" PostHistoryTypeId="2" PostId="5793" RevisionGUID="81a253a1-abdf-4ba3-9524-763a896bd4f2" CreationDate="2022-11-09T10:43:20.797" UserId="2762" Text="First follow the [installation guide][1] to be sure you set up the environment property.&#xD;&#xA;&#xD;&#xA;Build the code:&#xD;&#xA;&#xD;&#xA;    cargo build&#xD;&#xA;And run it:&#xD;&#xA;&#xD;&#xA;    cargo run -- --dev&#xD;&#xA;    &#xD;&#xA;If you want to run the tests and play with it:&#xD;&#xA;&#xD;&#xA;    cargo test --all --release&#xD;&#xA;&#xD;&#xA;Follow this tutorial to [Build a local blockchain][2]  running a Substrate template node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/install/&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/get-started/build-local-blockchain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22182" PostHistoryTypeId="5" PostId="5686" RevisionGUID="f6600a3d-bb30-4abb-8273-2b3efb7cac3d" CreationDate="2022-11-09T10:45:39.010" UserId="3002" Comment="deleted 4 characters in body" Text="Is it possible to recover a parachain from a backup that is around ~500 blocks behind the head block known by the relay chain?&#xD;&#xA;&#xD;&#xA;In single-chains, this is usually not difficult when you control all the validators(collators), but in a multi-chain system, I suspect that it becomes a lot more complex.&#xD;&#xA;&#xD;&#xA;If this is possible, I would like to know how complex would it be. And if possible, the recovery steps.&#xD;&#xA;&#xD;&#xA;**More information:**&#xD;&#xA;&#xD;&#xA;The relay chain is running **BABE** and the parachain has a single collator." ContentLicense="CC BY-SA 4.0" />
  <row Id="22183" PostHistoryTypeId="5" PostId="5790" RevisionGUID="f5dccde2-832a-4fa5-a59b-67b0f7691100" CreationDate="2022-11-09T11:01:58.127" UserId="3424" Comment="added 2782 characters in body" Text="I'm trying to build Substrate (https://github.com/paritytech/substrate) after cloning it it with `git clone`. I'm in the root directory. What am I doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Steps to reproduce:&#xD;&#xA;First attempt:&#xD;&#xA;1. `rustup override set nightly-2022-10-20`&#xD;&#xA;2. `cargo build`&#xD;&#xA;&#xD;&#xA;&lt;details&gt;&#xD;&#xA;&lt;summary&gt;output:&lt;/summary&gt;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo build&#xD;&#xA;   Compiling proc-macro2 v1.0.46&#xD;&#xA;   Compiling unicode-ident v1.0.1&#xD;&#xA;[...]&#xD;&#xA;[...]&#xD;&#xA;[...]&#xD;&#xA;   Compiling substrate-wasm-builder v5.0.0-dev (/home/amab/src/substrate/utils/wasm-builder)&#xD;&#xA;   Compiling kitchensink-runtime v3.0.0-dev (/home/amab/src/substrate/bin/node/runtime)&#xD;&#xA;error: failed to run custom build command for `kitchensink-runtime v3.0.0-dev (/home/amab/src/substrate/bin/node/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/amab/src/substrate/target/debug/build/kitchensink-runtime-00f6a898772ead1c/build-script-build` (exit status: 1)&#xD;&#xA;  --- stderr&#xD;&#xA;  Rust WASM toolchain not installed, please install it!&#xD;&#xA;&#xD;&#xA;  Further error information:&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;     Compiling wasm-test v1.0.0 (/tmp/.tmpLkxJdw)&#xD;&#xA;  error[E0463]: can't find crate for `std`&#xD;&#xA;    |&#xD;&#xA;    = note: the `wasm32-unknown-unknown` target may not be installed&#xD;&#xA;    = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`&#xD;&#xA;    = help: consider building the standard library from source with `cargo build -Zbuild-std`&#xD;&#xA;&#xD;&#xA;  error: requires `sized` lang_item&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0463`.&#xD;&#xA;  error: could not compile `wasm-test` due to 2 previous errors&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&lt;/details&gt;&#xD;&#xA;&#xD;&#xA;Second attempt:&#xD;&#xA;```&#xD;&#xA;cargo build&#xD;&#xA;   Compiling unicode-ident v1.0.1&#xD;&#xA;   Compiling proc-macro2 v1.0.46&#xD;&#xA;   Compiling syn v1.0.98&#xD;&#xA;[...]&#xD;&#xA;[...]&#xD;&#xA;[...]&#xD;&#xA;   Compiling sp-runtime-interface-test-wasm v2.0.0 (/home/amab/src/substrate/primitives/runtime-interface/test-wasm)&#xD;&#xA;   Compiling sp-runtime-interface-test-wasm-deprecated v2.0.0 (/home/amab/src/substrate/primitives/runtime-interface/test-wasm-deprecated)&#xD;&#xA;error: failed to run custom build command for `substrate-test-runtime v2.0.0 (/home/amab/src/substrate/test-utils/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/amab/src/substrate/target/debug/build/substrate-test-runtime-6372ab7d70979471/build-script-build` (exit status: 1)&#xD;&#xA;  --- stderr&#xD;&#xA;  Rust WASM toolchain not installed, please install it!&#xD;&#xA;&#xD;&#xA;  Further error information:&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;     Compiling wasm-test v1.0.0 (/tmp/.tmpi729zK)&#xD;&#xA;  error[E0463]: can't find crate for `std`&#xD;&#xA;    |&#xD;&#xA;    = note: the `wasm32-unknown-unknown` target may not be installed&#xD;&#xA;    = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`&#xD;&#xA;    = help: consider building the standard library from source with `cargo build -Zbuild-std`&#xD;&#xA;&#xD;&#xA;  error: requires `sized` lang_item&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0463`.&#xD;&#xA;  error: could not compile `wasm-test` due to 2 previous errors&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: failed to run custom build command for `kitchensink-runtime v3.0.0-dev (/home/amab/src/substrate/bin/node/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/amab/src/substrate/target/debug/build/kitchensink-runtime-00f6a898772ead1c/build-script-build` (exit status: 1)&#xD;&#xA;  --- stderr&#xD;&#xA;  Rust WASM toolchain not installed, please install it!&#xD;&#xA;&#xD;&#xA;  Further error information:&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;     Compiling wasm-test v1.0.0 (/tmp/.tmpPESiBy)&#xD;&#xA;  error[E0463]: can't find crate for `std`&#xD;&#xA;    |&#xD;&#xA;    = note: the `wasm32-unknown-unknown` target may not be installed&#xD;&#xA;    = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`&#xD;&#xA;    = help: consider building the standard library from source with `cargo build -Zbuild-std`&#xD;&#xA;&#xD;&#xA;  error: requires `sized` lang_item&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0463`.&#xD;&#xA;  error: could not compile `wasm-test` due to 2 previous errors&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;^Z  Building [=====================&gt; ] 1154/1205: sp-runtime-interface-test-wasm-deprecated(build.rs), librocksdb-sys(build), sp-runtime-interface-test-wasm(build.rs)    &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22184" PostHistoryTypeId="2" PostId="5794" RevisionGUID="c1157e39-722d-4e95-9b57-a5280b0b5695" CreationDate="2022-11-09T11:26:43.463" UserId="170" Text="You can use `ink_env::hash` [module][1]. &#xD;&#xA;&#xD;&#xA;Then your hash function would look something like this&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;    use ink_env::hash;&#xD;&#xA;&#xD;&#xA;    pub fn hash_keccak_256(input: &amp;[u8]) -&gt; [u8; 32] {&#xD;&#xA;        let mut output = &lt;hash::Keccak256 as hash::HashOutput&gt;::Type::default();&#xD;&#xA;        ink_env::hash_bytes::&lt;hash::Keccak256&gt;(input, &amp;mut output);&#xD;&#xA;        output&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`input` ofc is the bytes representation of the hashed value.&#xD;&#xA;&#xD;&#xA;For ink! 4 replace `ink_env` with `ink::env`&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/ink/ink_env/hash/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="22186" PostHistoryTypeId="2" PostId="5795" RevisionGUID="13adab3b-c4ba-43a2-a837-ed24fc6e964d" CreationDate="2022-11-09T11:42:53.090" UserId="2844" Text="    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;    use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;    #[ink::contract]&#xD;&#xA;    mod test {&#xD;&#xA;    use scale::Encode;&#xD;&#xA;    use sp_arithmetic::FixedU128;&#xD;&#xA;    use ink_prelude::vec::Vec;&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    // #[derive(Encode, Decode)]&#xD;&#xA;    pub struct Test {&#xD;&#xA;        test: Vec&lt;u8&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Test {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            Self {test: Default::default() }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn default() -&gt; Self {&#xD;&#xA;            Self::new()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn fixed_point_function(&amp;mut self) {&#xD;&#xA;            // self.test = vec![FixedU128::from_float(0.1515151f64)]&#xD;&#xA;            let fixed_point = FixedU128::from_float(0.1515151f64).encode();&#xD;&#xA;            self.test = fixed_point;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22188" PostHistoryTypeId="5" PostId="5757" RevisionGUID="e528d541-415b-481b-9bb7-7675c3ec6180" CreationDate="2022-11-09T12:16:17.993" UserId="2673" Comment="Added 'python' tag and improved formatting" Text="I am using Python Substrate Interface (https://github.com/polkascan/py-substrate-interface) to interact with the substrate node. &#xD;&#xA;&#xD;&#xA;I need to execute `Pallet::Balances::force_transfer` function, this function can only be run with the root/sudo  account. How I can achieve this please." ContentLicense="CC BY-SA 4.0" />
  <row Id="22189" PostHistoryTypeId="6" PostId="5757" RevisionGUID="e528d541-415b-481b-9bb7-7675c3ec6180" CreationDate="2022-11-09T12:16:17.993" UserId="2673" Comment="Added 'python' tag and improved formatting" Text="|python|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22190" PostHistoryTypeId="24" PostId="5757" RevisionGUID="e528d541-415b-481b-9bb7-7675c3ec6180" CreationDate="2022-11-09T12:16:17.993" Comment="Proposed by 2673 approved by 94, 34 edit id of 337" ContentLicense="CC BY-SA 4.0" />
  <row Id="22191" PostHistoryTypeId="2" PostId="5796" RevisionGUID="16f841b6-ef18-4fc4-9038-0c174e4d774d" CreationDate="2022-11-09T12:28:35.250" UserId="2455" Text="The question is answered [here][1]. Apparently there was a problem inserting the keys. After following all the steps of the solution, my parachain could produce and finalize blocks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5397/how-to-properly-set-session-keys-for-relay-and-parachain-with-custom-keys" ContentLicense="CC BY-SA 4.0" />
  <row Id="22193" PostHistoryTypeId="2" PostId="5797" RevisionGUID="5f9aa356-8972-4e7a-adee-16b8eea0f8e2" CreationDate="2022-11-09T13:31:54.097" UserId="251" Text="Thanks, @bkchr. His comment inspires me.&#xD;&#xA;&#xD;&#xA;I found this is a frontier RPC component." ContentLicense="CC BY-SA 4.0" />
  <row Id="22195" PostHistoryTypeId="2" PostId="5798" RevisionGUID="ad1d2ff7-e4fe-4c24-ac96-2a52dafe1814" CreationDate="2022-11-09T14:15:24.963" UserId="2898" Text="Hey i have some call data which is similar to [this](https://github.com/paritytech/subxt/blob/da507fa6d29a1583f1ef0e6cdfd0760290f67f7e/subxt/src/tx/tx_client.rs#L167).&#xD;&#xA;&#xD;&#xA;I am signing it using [schnorrkel libaray function function](https://github.com/w3f/schnorrkel/blob/master/src/sign.rs#L203). as `secret.sign_simple(&amp;[], msg)` where `secret` is a [Keypair](https://github.com/w3f/schnorrkel/blob/master/src/keys.rs#L692) and msg is in bytes.&#xD;&#xA;&#xD;&#xA;But if i add that signature to make a extrinsic bytes e.g. [here](https://github.com/paritytech/subxt/blob/da507fa6d29a1583f1ef0e6cdfd0760290f67f7e/subxt/src/tx/tx_client.rs#L186)&#xD;&#xA;&#xD;&#xA;I get error `Transaction has a bad signature.`&#xD;&#xA;&#xD;&#xA;And if i send the same extrinsic using subxt and pass the signer as `PairSigner&lt;SubstrateConfig, sr25519::Pair&gt;` it works fine. but i cant use this pair sign function when signing a msg because of nature of architecture. i have to use an independent lib something more generic. How can i solve this error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22197" PostHistoryTypeId="1" PostId="5798" RevisionGUID="ad1d2ff7-e4fe-4c24-ac96-2a52dafe1814" CreationDate="2022-11-09T14:15:24.963" UserId="2898" Text="Signed bytes from Schnorrkel library throws Bad Signature error" ContentLicense="CC BY-SA 4.0" />
  <row Id="22198" PostHistoryTypeId="3" PostId="5798" RevisionGUID="ad1d2ff7-e4fe-4c24-ac96-2a52dafe1814" CreationDate="2022-11-09T14:15:24.963" UserId="2898" Text="|rust|extrinsic|subxt|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22199" PostHistoryTypeId="5" PostId="5798" RevisionGUID="6f97a882-e4cb-4aad-80fc-353d6218af92" CreationDate="2022-11-09T14:28:43.627" UserId="2898" Comment="added 231 characters in body" Text="Hey i have some call data which is similar to [this](https://github.com/paritytech/subxt/blob/da507fa6d29a1583f1ef0e6cdfd0760290f67f7e/subxt/src/tx/tx_client.rs#L167).&#xD;&#xA;&#xD;&#xA;I am signing it using [schnorrkel libaray function function](https://github.com/w3f/schnorrkel/blob/master/src/sign.rs#L203). as `secret.sign_simple(&amp;[], msg)` where `secret` is a [Keypair](https://github.com/w3f/schnorrkel/blob/master/src/keys.rs#L692) and msg is in bytes.&#xD;&#xA;&#xD;&#xA;Then i create a multisignature using &#xD;&#xA;```&#xD;&#xA;let sig_slice: &amp;[u8] = &amp;sig_bytes;&#xD;&#xA;let sig = Signature::try_from(sig_slice).unwrap();&#xD;&#xA;let multisig = MultiSignature::Sr25519(sig);&#xD;&#xA;```&#xD;&#xA;where `&amp;sig_bytes` in bytes returned by signing and if i add that signature to make a extrinsic bytes e.g. [here](https://github.com/paritytech/subxt/blob/da507fa6d29a1583f1ef0e6cdfd0760290f67f7e/subxt/src/tx/tx_client.rs#L186)&#xD;&#xA;&#xD;&#xA;I get error `Transaction has a bad signature.`&#xD;&#xA;&#xD;&#xA;And if i send the same extrinsic using subxt and pass the signer as `PairSigner&lt;SubstrateConfig, sr25519::Pair&gt;` it works fine. but i cant use this pair sign function when signing a msg because of nature of architecture. i have to use an independent lib something more generic. How can i solve this error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22200" PostHistoryTypeId="2" PostId="5799" RevisionGUID="2a681fdd-adc4-4792-aa45-5c2660648445" CreationDate="2022-11-09T14:55:11.243" UserId="527" Text="`extrinsic` maps to the struct where the trait `SignExtension` is implemented. You can see it clearly comparing [`ChargeAssetTxPayment`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/transaction-payment/asset-tx-payment/src/lib.rs#L148-L152) and its definition [here](https://github.com/polkadot-js/api/blob/8ba4ed53776a7a71478e229547c7af3d4dc57d63/packages/types/src/extrinsic/signedExtensions/statemint.ts#L7-L14)&#xD;&#xA;&#xD;&#xA;You are right about `payload` mapping to `AdditionalSigned`" ContentLicense="CC BY-SA 4.0" />
  <row Id="22202" PostHistoryTypeId="2" PostId="5800" RevisionGUID="17177c01-9164-4eff-8aed-b9215f5fd41c" CreationDate="2022-11-09T15:02:56.407" UserId="298" Text="I am trying to fast track a referendum but the runtime has `InstantAllowed` set to `false`. When i try to execute the extrinsic I get a `democracy.InstantNotAllowed` error. &#xD;&#xA;&#xD;&#xA;Also, the `votingPeriod` and `Delay` parameters are slightly ambiguous. Does it require the block number or number of blocks? &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub LaunchPeriod: BlockNumber = prod_or_fast!(2 * DAYS, 1, &quot;KAB_LAUNCH_PERIOD&quot;);&#xD;&#xA;	pub VotingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1 * MINUTES, &quot;KAB_VOTING_PERIOD&quot;);&#xD;&#xA;	pub FastTrackVotingPeriod: BlockNumber = prod_or_fast!(3 * DAYS , 1 * MINUTES, &quot;KAB_FAST_TRACK_VOTING_PERIOD&quot;);&#xD;&#xA;	pub const MinimumDeposit: Balance = 1 * CENTS;&#xD;&#xA;	pub EnactmentPeriod: BlockNumber = prod_or_fast!(1 * DAYS, 1, &quot;KAB_ENACTMENT_PERIOD&quot;);&#xD;&#xA;	pub CooloffPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1 * MINUTES, &quot;KAB_COOLOFF_PERIOD&quot;);&#xD;&#xA;	pub const InstantAllowed: bool = false;&#xD;&#xA;	pub const MaxVotes: u32 = 100;&#xD;&#xA;	pub const MaxProposals: u32 = 100;&#xD;&#xA;	pub const PreimageByteDeposit: Balance = 1 * BILLICENTS;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_democracy::Config for Runtime {&#xD;&#xA;	type Proposal = Call;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type EnactmentPeriod = EnactmentPeriod;&#xD;&#xA;	type VoteLockingPeriod = EnactmentPeriod;&#xD;&#xA;	type LaunchPeriod = LaunchPeriod;&#xD;&#xA;	type VotingPeriod = VotingPeriod;&#xD;&#xA;	type MinimumDeposit = MinimumDeposit;&#xD;&#xA;	type ExternalOrigin = EnsureSigned&lt;AccountId&gt;;&#xD;&#xA;	type ExternalMajorityOrigin = EnsureSigned&lt;AccountId&gt;;&#xD;&#xA;	type ExternalDefaultOrigin = EnsureSigned&lt;AccountId&gt;;&#xD;&#xA;	type FastTrackOrigin = EnsureSigned&lt;AccountId&gt;;&#xD;&#xA;	type InstantOrigin = EnsureSigned&lt;AccountId&gt;;&#xD;&#xA;	type InstantAllowed = InstantAllowed;&#xD;&#xA;	type FastTrackVotingPeriod = FastTrackVotingPeriod;&#xD;&#xA;	type CancellationOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type BlacklistOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type CancelProposalOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type VetoOrigin = EnsureSigned&lt;AccountId&gt;;&#xD;&#xA;	type CooloffPeriod = CooloffPeriod;&#xD;&#xA;	type PreimageByteDeposit = PreimageByteDeposit;&#xD;&#xA;	type OperationalPreimageOrigin = EnsureSigned&lt;AccountId&gt;;&#xD;&#xA;	type Slash = Treasury;&#xD;&#xA;	type Scheduler = Scheduler;&#xD;&#xA;	type PalletsOrigin = OriginCaller;&#xD;&#xA;	type MaxVotes = MaxVotes;&#xD;&#xA;	type WeightInfo = pallet_democracy::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;	type MaxProposals = MaxProposals;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kJE2a.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22204" PostHistoryTypeId="1" PostId="5800" RevisionGUID="17177c01-9164-4eff-8aed-b9215f5fd41c" CreationDate="2022-11-09T15:02:56.407" UserId="298" Text="Is InstantAllowed true required to fastTrack referendum?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22205" PostHistoryTypeId="3" PostId="5800" RevisionGUID="17177c01-9164-4eff-8aed-b9215f5fd41c" CreationDate="2022-11-09T15:02:56.407" UserId="298" Text="|kusama|substrate-parachain-template|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22206" PostHistoryTypeId="2" PostId="5801" RevisionGUID="b29138d3-2516-4658-9cc3-19b32eca5c2d" CreationDate="2022-11-09T15:19:59.873" UserId="2898" Text="Actually we need a context string for substrate signatures &#xD;&#xA;```&#xD;&#xA;let context = schnorrkel::signing_context(b&quot;substrate&quot;);&#xD;&#xA;Signature::Sr25519(secret.sign(context.bytes(msg)))&#xD;&#xA;```&#xD;&#xA;and then we can use the sign function which gives us a valid signature." ContentLicense="CC BY-SA 4.0" />
  <row Id="22208" PostHistoryTypeId="2" PostId="5802" RevisionGUID="a7be6fba-2844-44e0-9196-95723aecb36e" CreationDate="2022-11-09T15:27:53.177" UserId="2673" Text="`votingPeriod` is the period for which voting will be open (in number of blocks). For the extrinsic to succeed one of the two conditions must be met:&#xD;&#xA; * `votingPeriod` is greater or equal to the `FastTrackVotingPeriod` defined in the pallet's config and origin for the call is `FastTrackOrigin`, or&#xD;&#xA; * origin for the call is `InstantOrigin` and `InstantAllowed` is `true`.&#xD;&#xA;&#xD;&#xA;From the error raised (`InstantNotAllowed`) I infer that you must have specified a `votingPeriod` lower than `FastTrackVotingPeriod` so the code assumed that it is supposed to be an *instant* referendum, but this failed because `InstantAllowed` is `false` in your config.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;`delay` is also number of blocks. It's the number of blocks between accepting the proposal in a referendum and enacting it." ContentLicense="CC BY-SA 4.0" />
  <row Id="22211" PostHistoryTypeId="2" PostId="5803" RevisionGUID="afc7c065-2476-4b8f-a41f-43fd17f0f21a" CreationDate="2022-11-09T16:01:38.087" UserId="28" Text="This is definitely possible, but will require some of your own design and elbow grease to make work.&#xD;&#xA;&#xD;&#xA;Specifically, you should look at the `trait OnChargeTransaction`: https://paritytech.github.io/substrate/master/pallet_transaction_payment/trait.OnChargeTransaction.html&#xD;&#xA;&#xD;&#xA;You can see that `withdraw_fee` has a `call` input:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn withdraw_fee(&#xD;&#xA;    who: &amp;T::AccountId,&#xD;&#xA;    call: &amp;T::RuntimeCall,&#xD;&#xA;    dispatch_info: &amp;DispatchInfoOf&lt;T::RuntimeCall&gt;,&#xD;&#xA;    fee: Self::Balance,&#xD;&#xA;    tip: Self::Balance&#xD;&#xA;) -&gt; Result&lt;Self::LiquidityInfo, TransactionValidityError&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With this, you should be able to see what call is triggering a fee payment to occur. When implementing this trait, you can have a match statement which detects which call is being executed, and then have special logic to handle the fees of that call.&#xD;&#xA;&#xD;&#xA;Beyond this, you could also just design a specific fee system for specific pallets, since each pallet has full access to manipulate the balance of a user. There would be no need to touch the transaction fee pallet in this case, however these &quot;extra&quot; fees may be opaque to a user who is not aware of this." ContentLicense="CC BY-SA 4.0" />
  <row Id="22213" PostHistoryTypeId="10" PostId="5770" RevisionGUID="592921c4-596b-4e85-b69c-df56e5c31e1c" CreationDate="2022-11-09T16:03:48.407" UserId="28" Comment="105" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="22214" PostHistoryTypeId="2" PostId="5804" RevisionGUID="9f2a08a8-21b7-4f2e-b112-c569c4a75530" CreationDate="2022-11-09T17:11:20.043" UserId="703" Text="After upgrading a Cumulus based node to use `polkadot-v0.9.30`, and running clippy:&#xD;&#xA;```&#xD;&#xA;cargo +nightly clippy --all --features runtime-benchmarks&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The following errors are thrown:&#xD;&#xA;```&#xD;&#xA;  error[E0599]: no function or associated item named `benchmarks` found for struct `frame_system_benchmarking::Pallet` in the current scope&#xD;&#xA;      --&gt; runtime/src/lib.rs:1103:4&#xD;&#xA;       |&#xD;&#xA;  1103 |             list_benchmarks!(list, extra);&#xD;&#xA;       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `frame_system_benchmarking::Pallet&lt;Runtime&gt;`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the macro `list_benchmark` which comes from the expansion of the macro `list_benchmarks` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0599]: no function or associated item named `run_benchmark` found for struct `frame_system_benchmarking::Pallet` in the current scope&#xD;&#xA;      --&gt; runtime/src/lib.rs:1135:4&#xD;&#xA;       |&#xD;&#xA;  1135 |             add_benchmarks!(params, batches);&#xD;&#xA;       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `frame_system_benchmarking::Pallet&lt;Runtime&gt;`&#xD;&#xA;       |&#xD;&#xA;       = note: this error originates in the macro `add_benchmark` which comes from the expansion of the macro `add_benchmarks` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22216" PostHistoryTypeId="1" PostId="5804" RevisionGUID="9f2a08a8-21b7-4f2e-b112-c569c4a75530" CreationDate="2022-11-09T17:11:20.043" UserId="703" Text="Upgrading to `polkadot-v0.9.30` throws &quot;no function or associated item named `benchmarks`&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22217" PostHistoryTypeId="3" PostId="5804" RevisionGUID="9f2a08a8-21b7-4f2e-b112-c569c4a75530" CreationDate="2022-11-09T17:11:20.043" UserId="703" Text="|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22218" PostHistoryTypeId="2" PostId="5805" RevisionGUID="17f54e2c-75bf-4a7b-ac5a-6c81bd9acb22" CreationDate="2022-11-09T17:11:20.043" UserId="703" Text="Update your `runtime/Cargo.toml` from:&#xD;&#xA;```&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;    &quot;frame-system-benchmarking&quot;,&#xD;&#xA;    ...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;to &#xD;&#xA;```&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;    &quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;    ...&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22220" PostHistoryTypeId="2" PostId="5806" RevisionGUID="6401f66a-c7c8-4091-8827-45347908d54e" CreationDate="2022-11-09T17:28:59.447" UserId="527" Text="The lifecycle of a extrinsic validation is the following:&#xD;&#xA; 1. The transaction pool call the Runtime API [`validate_transaction`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/bin/node/runtime/src/lib.rs#L1839-L1847) method&#xD;&#xA; 2. There, [`validate_transaction`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/executive/src/lib.rs#L538-L570) from the `Executive` pallet is called. `uxt` is of type `Block::Extrinsic`, which for the default substrate runtime equals to `UncheckedExtrinsic` (from [this line](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/bin/node/runtime/src/lib.rs#L1688) and [this one](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/primitives/runtime/src/generic/block.rs#L100).&#xD;&#xA; 3. In `Executive::validate_transaction`, after calculating `encoded_len`, it [`check()`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/executive/src/lib.rs#L559) the `UncheckExtrinsic`. At this point, `UncheckExtrinsic` can be either a signed or unsigned extrinsic, we do not know yet.&#xD;&#xA; 4. In the [`check()`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/primitives/runtime/src/generic/unchecked_extrinsic.rs#L149-L164) method for the generic `UncheckedExtrinsic` is where is checked if the extrinsic is signed or not. In both cases, a `CheckedExtrinsic` is return. If signed, the `signed` attribute will contain the signature information, if unsigned, the `signed` attribute will be set to `None`. That field in the `CheckedExtrinsic` is the one that differentiate between a signed and an unsigned extrinsic.&#xD;&#xA; 5. Next action in `Executive:validate_transaction` is to get the [`dispatch_info`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/primitives/runtime/src/generic/unchecked_extrinsic.rs#L149-L164) from the previously returned `CheckedExtrinsic`. That happens [here](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/support/procedural/src/pallet/expand/call.rs#L245-L275) returning the `DispatchInfo` struct.&#xD;&#xA; 6. Finally, the `CheckedExtrinsic` is [validated](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/executive/src/lib.rs#L568). If we pay attention to its [method](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/primitives/runtime/src/generic/checked_extrinsic.rs#L52-L67), we can see how depending on its `signed` attribute (if it exists or `None`), a different method will be called from its type `Extra`. If it exists (signed tx), it calls `Extra::validate`, if not (unsigned tx), it calls `Extra::validate_unsigned` and `U::validate_unsigned`. Here is where signed and unsigned extrinsic validation flow diverge." ContentLicense="CC BY-SA 4.0" />
  <row Id="22222" PostHistoryTypeId="5" PostId="5797" RevisionGUID="b0e1e96c-6adb-4117-b5c5-b4a01fb4171e" CreationDate="2022-11-09T17:34:34.220" UserId="251" Comment="added 123 characters in body" Text="Thanks, @bkchr. His comment inspires me.&#xD;&#xA;&#xD;&#xA;I found this is a frontier RPC component.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/frontier/blob/eef5723675850166da904b295b7dfa90894b1270/client/rpc-core/src/net.rs#L25-L40" ContentLicense="CC BY-SA 4.0" />
  <row Id="22223" PostHistoryTypeId="5" PostId="5806" RevisionGUID="fb18b332-31c3-489f-8d11-ee18517f9c8f" CreationDate="2022-11-09T17:36:48.370" UserId="527" Comment="added 285 characters in body" Text="The lifecycle of a extrinsic validation is the following:&#xD;&#xA; 1. The transaction pool call the Runtime API [`validate_transaction`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/bin/node/runtime/src/lib.rs#L1839-L1847) method&#xD;&#xA; 2. There, [`validate_transaction`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/executive/src/lib.rs#L538-L570) from the `Executive` pallet is called. `uxt` is of type `Block::Extrinsic`, which for the default substrate runtime equals to `UncheckedExtrinsic` (from [this line](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/bin/node/runtime/src/lib.rs#L1688) and [this one](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/primitives/runtime/src/generic/block.rs#L100).&#xD;&#xA; 3. In `Executive::validate_transaction`, after calculating `encoded_len`, it [`check()`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/executive/src/lib.rs#L559) the `UncheckExtrinsic`. At this point, `UncheckExtrinsic` can be either a signed or unsigned extrinsic, we do not know yet.&#xD;&#xA; 4. In the [`check()`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/primitives/runtime/src/generic/unchecked_extrinsic.rs#L149-L164) method for the generic `UncheckedExtrinsic` is where is checked if the extrinsic is signed or not. In both cases, a `CheckedExtrinsic` is return. If signed, the `signed` attribute will contain the signature information, if unsigned, the `signed` attribute will be set to `None`. That field in the `CheckedExtrinsic` is the one that differentiate between a signed and an unsigned extrinsic.&#xD;&#xA; 5. Next action in `Executive:validate_transaction` is to get the [`dispatch_info`](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/primitives/runtime/src/generic/unchecked_extrinsic.rs#L149-L164) from the previously returned `CheckedExtrinsic`. That happens [here](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/support/procedural/src/pallet/expand/call.rs#L245-L275) returning the `DispatchInfo` struct.&#xD;&#xA; 6. Finally, the `CheckedExtrinsic` is [validated](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/executive/src/lib.rs#L568). If we pay attention to its [method](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/primitives/runtime/src/generic/checked_extrinsic.rs#L52-L67), we can see how depending on its `signed` attribute (if it exists or `None`), a different method will be called from its type `Extra`. If it exists (signed tx), it calls `Extra::validate`, if not (unsigned tx), it calls `Extra::validate_unsigned` and `U::validate_unsigned`. Here is where signed and unsigned extrinsic validation flow diverge.&#xD;&#xA;&#xD;&#xA;`ensure_signed` prevents unsigned extrinsic to execute your dispatchable. I still would need to investigate why all your unsigned transactions are failing.&#xD;&#xA;&#xD;&#xA;It is true that `SignedExtension` name might be a bit misleading since both, signed &amp; unsigned extrinsics go through them." ContentLicense="CC BY-SA 4.0" />
  <row Id="22224" PostHistoryTypeId="2" PostId="5807" RevisionGUID="1da96342-c2f7-44cb-aae4-d257a2cad7d0" CreationDate="2022-11-09T17:51:20.800" UserId="377" Text="I have integrated the vesting pallet to my chain. &#xD;&#xA;Do we have any example how to use it and and how to prepare vesting config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22226" PostHistoryTypeId="1" PostId="5807" RevisionGUID="1da96342-c2f7-44cb-aae4-d257a2cad7d0" CreationDate="2022-11-09T17:51:20.800" UserId="377" Text="Any example to using vesting pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22227" PostHistoryTypeId="3" PostId="5807" RevisionGUID="1da96342-c2f7-44cb-aae4-d257a2cad7d0" CreationDate="2022-11-09T17:51:20.800" UserId="377" Text="|pallet|vesting-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22228" PostHistoryTypeId="2" PostId="5808" RevisionGUID="68f3f581-abf0-4fcc-81af-5c7206b4c318" CreationDate="2022-11-09T18:43:24.087" UserId="140" Text="You can take reference from Substrate Vesting Pallet runtime configuration https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1388" ContentLicense="CC BY-SA 4.0" />
  <row Id="22230" PostHistoryTypeId="2" PostId="5809" RevisionGUID="26d70d2a-f17e-42fb-af0d-bd83cc820123" CreationDate="2022-11-09T19:19:15.097" UserId="3417" Text="Sorry, an unplanned update to kubernetes recently broke the playground. It's now back up and should work fine on any modern OS/browser. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22232" PostHistoryTypeId="2" PostId="5810" RevisionGUID="d7a7de54-11a4-42b9-bc2d-7feb631f95d6" CreationDate="2022-11-09T22:31:38.687" UserId="246" Text="Could anyone help me understand how one reads from a substrate chain the account that sent an extrinsic? &#xD;&#xA;&#xD;&#xA;For example take this Kusama [`xcmpallet.reserve_transfer_assets`](https://kusama.subscan.io/extrinsic/15047372-3) extrinsic sent by address _JHz14NmqDJZ3vGwWNZAAezW4KsiSofw8ptoeg3LtksDqU4L_&#xD;&#xA;&#xD;&#xA;I can parse from the XCM message the account address it's being sent to from the `beneficiary` section but in the XCM message I am unable to see which account sent the extrinsic. &#xD;&#xA;&#xD;&#xA;Does anyone know where the sender address is being read from?&#xD;&#xA;&#xD;&#xA;For context I am using [py-substrate-interface](https://github.com/polkascan/py-substrate-interface) to read data from the block chain using [`substrate.get_block(block_hash=block_hash)`](https://polkascan.github.io/py-substrate-interface/#substrateinterface.SubstrateInterface.get_block) and then parsing the block for extrinsic data. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22234" PostHistoryTypeId="1" PostId="5810" RevisionGUID="d7a7de54-11a4-42b9-bc2d-7feb631f95d6" CreationDate="2022-11-09T22:31:38.687" UserId="246" Text="How to determine which account sent an extrinsic from substrate block data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22235" PostHistoryTypeId="3" PostId="5810" RevisionGUID="d7a7de54-11a4-42b9-bc2d-7feb631f95d6" CreationDate="2022-11-09T22:31:38.687" UserId="246" Text="|extrinsic|xcm|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22236" PostHistoryTypeId="52" PostId="5800" RevisionGUID="b668bca8-9267-48ad-b360-203584bff5dd" CreationDate="2022-11-09T23:07:48.387" />
  <row Id="22237" PostHistoryTypeId="50" PostId="1941" RevisionGUID="edc34bdd-a832-4547-a29c-f0d599cbe9e4" CreationDate="2022-11-10T01:04:40.693" UserId="-1" />
  <row Id="22238" PostHistoryTypeId="2" PostId="5811" RevisionGUID="2e4fcfe5-932b-4341-8b8a-34f2dfa490bd" CreationDate="2022-11-10T01:17:47.583" UserId="2844" Text="I am using `cargo install cargo-contract --version 2.0.0-alpha.3` to install `2.0.0-alpha.3`, I got **`error: failed to compile cargo-contract v2.0.0-alpha.3, intermediate artifacts can be found at /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/cargo-installPMiOKW`** error. Does cargo-contract `Pre-release` installation has issue?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HlBqC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22240" PostHistoryTypeId="1" PostId="5811" RevisionGUID="2e4fcfe5-932b-4341-8b8a-34f2dfa490bd" CreationDate="2022-11-10T01:17:47.583" UserId="2844" Text="While installing cargo-contract --version 2.0.0-alpha.3, I got error" ContentLicense="CC BY-SA 4.0" />
  <row Id="22241" PostHistoryTypeId="3" PostId="5811" RevisionGUID="2e4fcfe5-932b-4341-8b8a-34f2dfa490bd" CreationDate="2022-11-10T01:17:47.583" UserId="2844" Text="|ink|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22242" PostHistoryTypeId="50" PostId="4961" RevisionGUID="077b6880-6138-438e-aa3c-36fc83da696a" CreationDate="2022-11-10T02:06:45.807" UserId="-1" />
  <row Id="22243" PostHistoryTypeId="2" PostId="5812" RevisionGUID="37b1c5f7-edfb-46b2-bd55-0162e6ff9c08" CreationDate="2022-11-10T03:14:46.773" UserId="251" Text="Because some dependencies got updated.&#xD;&#xA;&#xD;&#xA;You should use this to lock the dependencies version:&#xD;&#xA;```&#xD;&#xA;cargo install --force --locked cargo-contract --version 2.0.0-alpha.3&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22246" PostHistoryTypeId="5" PostId="5812" RevisionGUID="aa1637e3-0f4c-4521-9561-c8e495316269" CreationDate="2022-11-10T06:31:49.730" UserId="251" Comment="added 19 characters in body" Text="Because some dependencies got updated (breaking changes).&#xD;&#xA;&#xD;&#xA;You should use this to lock the dependencies version:&#xD;&#xA;```&#xD;&#xA;cargo install --force --locked cargo-contract --version 2.0.0-alpha.3&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22247" PostHistoryTypeId="2" PostId="5813" RevisionGUID="2a3c57d2-bd5c-4238-bc81-2eedf120bcc0" CreationDate="2022-11-10T07:17:38.113" UserId="620" Text="The example in the py-substrate-interface README shows exactly how to do this.&#xD;&#xA;&#xD;&#xA;https://github.com/polkascan/py-substrate-interface/tree/v1.3.3#method-1-access-serialized-value&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;# Set block_hash to None for chaintip&#xD;&#xA;block_hash = &quot;0x51d15792ff3c5ee9c6b24ddccd95b377d5cccc759b8e76e5de9250cf58225087&quot;&#xD;&#xA;&#xD;&#xA;# Retrieve extrinsics in block&#xD;&#xA;result = substrate.get_block(block_hash=block_hash)&#xD;&#xA;&#xD;&#xA;for extrinsic in result['extrinsics']:&#xD;&#xA;&#xD;&#xA;    if 'address' in extrinsic.value:&#xD;&#xA;        signed_by_address = extrinsic.value['address']&#xD;&#xA;    else:&#xD;&#xA;        signed_by_address = None&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22249" PostHistoryTypeId="2" PostId="5814" RevisionGUID="94417cbb-989d-4523-920a-803244d98152" CreationDate="2022-11-10T09:38:44.153" UserId="139" Text="&gt;  Inherent transactions can only be inserted into a block by the block authoring node that calls them. Typically, this type of transaction is not gossiped to other nodes or stored in the transaction queue.&#xD;&#xA;&#xD;&#xA;Since unsigned transactions (utx) and inherents are very similar (they are both unsigned), would it be technically possible to implement `pallet_im_online` entirely in terms of inherents rather than utx? I.E. are there any hard barriers that prevents an inherent from being introduced into the transaction queue? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22251" PostHistoryTypeId="1" PostId="5814" RevisionGUID="94417cbb-989d-4523-920a-803244d98152" CreationDate="2022-11-10T09:38:44.153" UserId="139" Text="Is it possible to gossip inherents?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22252" PostHistoryTypeId="3" PostId="5814" RevisionGUID="94417cbb-989d-4523-920a-803244d98152" CreationDate="2022-11-10T09:38:44.153" UserId="139" Text="|transactions|pallet-imonline|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22253" PostHistoryTypeId="2" PostId="5815" RevisionGUID="9e8c6b4e-6660-48c8-828d-d9c7ed35e064" CreationDate="2022-11-10T11:41:39.903" UserId="251" Text="I don't which version you are using. Need more detail.&#xD;&#xA;&#xD;&#xA;For the latest code.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/parity-bridges-common/blob/267babc79d6ee0f3c35e464383616a397b8c0ba7/primitives/runtime/src/lib.rs#L406-L415&#xD;&#xA;&#xD;&#xA;You just need to go to `PolkadotApps -&gt; Sudo -&gt; bridgeGrandpa -&gt; set_owner`.&#xD;&#xA;&#xD;&#xA;Or, `PolkadotApps -&gt; Extrinsic -&gt; bridgeGrandpa -&gt; set_owner`. (use the current owner account to sign this)" ContentLicense="CC BY-SA 4.0" />
  <row Id="22255" PostHistoryTypeId="50" PostId="5293" RevisionGUID="8319287e-493f-4707-be6e-85fc8fe4c67f" CreationDate="2022-11-10T12:07:10.860" UserId="-1" />
  <row Id="22256" PostHistoryTypeId="2" PostId="5816" RevisionGUID="69bbc2da-7d46-48dc-a98c-6969df3abd41" CreationDate="2022-11-10T12:51:10.333" UserId="73" Text="Inherents are for passing information of the outside to the runtime, e.g. a timestamp. While unsigned extrinsics and inherents are the same, they serve different purposes. You could also gossip inherents to other nodes, if your runtime would have some `UnsignedValidator` so that the extrinsic is not directly rejected by `validate_transaction`. &#xD;&#xA;&#xD;&#xA;As inherents and unsigned extrinsics are serving different purposes, you should keep them separated and not mix them. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22258" PostHistoryTypeId="2" PostId="5817" RevisionGUID="602a8a20-b6ff-40c5-b6a8-8572e581d192" CreationDate="2022-11-10T12:57:49.100" UserId="2898" Text="I have a H256 value which is an extrinsic returned hash&#xD;&#xA;&#xD;&#xA;`0x8d19a2e575d583b8812418c71be304f16a978cfac2bfad54afcad824cb4d3471`&#xD;&#xA;&#xD;&#xA;but when i convert this to String using `.to_string()`&#xD;&#xA;&#xD;&#xA;it does not return complete string&#xD;&#xA;&#xD;&#xA;`0x8d19…3471`" ContentLicense="CC BY-SA 4.0" />
  <row Id="22260" PostHistoryTypeId="1" PostId="5817" RevisionGUID="602a8a20-b6ff-40c5-b6a8-8572e581d192" CreationDate="2022-11-10T12:57:49.100" UserId="2898" Text="H256 to_string() function does not return complete string" ContentLicense="CC BY-SA 4.0" />
  <row Id="22261" PostHistoryTypeId="3" PostId="5817" RevisionGUID="602a8a20-b6ff-40c5-b6a8-8572e581d192" CreationDate="2022-11-10T12:57:49.100" UserId="2898" Text="|extrinsic|hash|string|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22262" PostHistoryTypeId="34" PostId="5569" RevisionGUID="f28f448d-6d52-4262-b659-f4dbec4113f2" CreationDate="2022-11-10T13:05:35.720" UserId="-1" Comment="14" />
  <row Id="22263" PostHistoryTypeId="12" PostId="5817" RevisionGUID="c40a384c-065c-4fea-bc19-7488a3420c52" CreationDate="2022-11-10T13:14:42.793" UserId="2898" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2898,&quot;DisplayName&quot;:&quot;Rusty Pythonic Script&quot;}]}" />
  <row Id="22264" PostHistoryTypeId="13" PostId="5817" RevisionGUID="23b11369-a565-4116-9479-a286605414b0" CreationDate="2022-11-10T13:14:56.953" UserId="2898" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2898,&quot;DisplayName&quot;:&quot;Rusty Pythonic Script&quot;}]}" />
  <row Id="22265" PostHistoryTypeId="2" PostId="5818" RevisionGUID="b71a4980-9516-443d-acc5-0e399e8e190a" CreationDate="2022-11-10T13:15:56.840" UserId="2898" Text="To convert it to string we can use format macro instead&#xD;&#xA;&#xD;&#xA;`let tx_hash = format!(&quot;{:?}&quot;, h256_object);`" ContentLicense="CC BY-SA 4.0" />
  <row Id="22267" PostHistoryTypeId="2" PostId="5819" RevisionGUID="26f78f0b-5859-4ec9-84fe-e529745a27ac" CreationDate="2022-11-10T13:45:00.740" UserId="3331" Text="I'm trying to execute a runtime upgrade on a running parachain. I'm using the cumulus parachainSystem pallet to do, using the authorize -&gt; enact flow.&#xD;&#xA;&#xD;&#xA;My parachain have the contracts pallet, with the standard migration.&#xD;&#xA;&#xD;&#xA;The steps I'm doing are the following:&#xD;&#xA;1. I'm just modifying the spec_version, without adding or removing any pallet.&#xD;&#xA;2. Then I run `cargo build --release -p &lt;runtime pkg&gt;` to build the new runtime blob.&#xD;&#xA;3. To execute the authorize_upgrade, I get the smallest file generated by the command above. Which the file name is something like `&lt;runtime pkg&gt;.compact.compressed.wasm`&#xD;&#xA;4. I execute the enact_upgrade call, and here is where the problem starts!&#xD;&#xA;&#xD;&#xA;I've got mixed outputs, doing with and without the scheduler pallet.&#xD;&#xA;&#xD;&#xA;It outputs this error first:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;And it tries to collate over and over until the error `Import failed: State Database error: Too many sibling blocks inserted` start appearing.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've tried using the scheduler already, but I'm probably doing something wrong? How can I properly set the scheduler with the auth -&gt; enact flow, to successfully execute the runtime upgrade in the parachain?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm calling using sudo, like this:&#xD;&#xA;[![authorize_upgrade][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XXLUL.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/s32z1.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/OMLW0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22269" PostHistoryTypeId="1" PostId="5819" RevisionGUID="26f78f0b-5859-4ec9-84fe-e529745a27ac" CreationDate="2022-11-10T13:45:00.740" UserId="3331" Text="How to execute a runtime upgrade on a running parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="22270" PostHistoryTypeId="3" PostId="5819" RevisionGUID="26f78f0b-5859-4ec9-84fe-e529745a27ac" CreationDate="2022-11-10T13:45:00.740" UserId="3331" Text="|parachain|runtime-upgrade|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22271" PostHistoryTypeId="2" PostId="5820" RevisionGUID="1c51696f-0932-4c95-93fc-24ba827cb671" CreationDate="2022-11-10T13:48:41.973" UserId="3325" Text="We are currently running a standalone network, with the blocktime set to 6000ms, but we are seeing fluctuating values as below[![blocktimes][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2hkjK.png&#xD;&#xA;&#xD;&#xA;As you can see, there is no real relation between blocksizes or extrinsics, wondering what else could be causing issues here and how we can improve this setup.&#xD;&#xA;&#xD;&#xA;Currently running a 5 node setup (all validators) in the same region." ContentLicense="CC BY-SA 4.0" />
  <row Id="22273" PostHistoryTypeId="1" PostId="5820" RevisionGUID="1c51696f-0932-4c95-93fc-24ba827cb671" CreationDate="2022-11-10T13:48:41.973" UserId="3325" Text="Blocktime double than expected (Standalone network)" ContentLicense="CC BY-SA 4.0" />
  <row Id="22274" PostHistoryTypeId="3" PostId="5820" RevisionGUID="1c51696f-0932-4c95-93fc-24ba827cb671" CreationDate="2022-11-10T13:48:41.973" UserId="3325" Text="|substrate-node-template|networking|block-production|substrate-block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22279" PostHistoryTypeId="2" PostId="5822" RevisionGUID="b7da48dc-d241-4781-9966-cd87c7f944e2" CreationDate="2022-11-10T14:01:03.230" UserId="3325" Text="You are most likely missing the offchain worker initialisation in the service.rs file, like this https://github.com/substrate-developer-hub/substrate-node-template/blob/150c6c9e66bd4e866cfd4704d4d2a16799edc2c0/node/src/service.rs#L205" ContentLicense="CC BY-SA 4.0" />
  <row Id="22281" PostHistoryTypeId="5" PostId="5819" RevisionGUID="26a16912-bfc0-4629-bb5e-f73fde396b57" CreationDate="2022-11-10T14:06:22.550" UserId="3331" Comment="added 288 characters in body" Text="I'm trying to execute a runtime upgrade on a running parachain. I'm using the cumulus parachainSystem pallet to do, using the authorize -&gt; enact flow.&#xD;&#xA;&#xD;&#xA;My parachain have the contracts pallet, with the standard migration.&#xD;&#xA;&#xD;&#xA;The steps I'm doing are the following:&#xD;&#xA;1. I'm just modifying the spec_version, without adding or removing any pallet.&#xD;&#xA;2. Then I run `cargo build --release -p &lt;runtime pkg&gt;` to build the new runtime blob.&#xD;&#xA;3. To execute the authorize_upgrade, I get the smallest file generated by the command above. Which the file name is something like `&lt;runtime pkg&gt;.compact.compressed.wasm`&#xD;&#xA;4. I execute the enact_upgrade call, and here is where the problem starts!&#xD;&#xA;&#xD;&#xA;I've got mixed outputs, doing with and without the scheduler pallet.&#xD;&#xA;&#xD;&#xA;It outputs this error first:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;And it tries to collate over and over until the error `Import failed: State Database error: Too many sibling blocks inserted` start appearing.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've tried using the scheduler already, but I'm probably doing something wrong? How can I properly set the scheduler with the auth -&gt; enact flow, to successfully execute the runtime upgrade in the parachain?&#xD;&#xA;&#xD;&#xA;I'm calling using sudo, like this:&#xD;&#xA;[![authorize_upgrade][3]][3]&#xD;&#xA;&#xD;&#xA;**What I understood**&#xD;&#xA;&gt;  The `authorize_upgrade` call advertise the upcoming upgrade to the Relay Chain, right?&#xD;&#xA;&#xD;&#xA;&gt; The `enact_authorize_upgrade` works like the `set_code` to the running Parachain, so we don't have to make a `set_code` after calling the `enact_authorize_upgrade`.&#xD;&#xA;&#xD;&#xA;Please, correct me if I got it wrong! Thanks in advance :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XXLUL.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/s32z1.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/OMLW0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22283" PostHistoryTypeId="5" PostId="5820" RevisionGUID="58a0832c-3683-4a80-9288-bc3ef3c3676e" CreationDate="2022-11-10T14:37:38.573" UserId="3325" Comment="added 24 characters in body" Text="We are currently running a standalone network, with the blocktime set to 6000ms, but we are seeing fluctuating values as below[![blocktimes][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2hkjK.png&#xD;&#xA;&#xD;&#xA;As you can see, there is no real relation between blocksizes or extrinsics, wondering what else could be causing issues here and how we can improve this setup.&#xD;&#xA;&#xD;&#xA;Currently running a 5 node setup (all validators) in the same region.&#xD;&#xA;Using polkadot-v0.9.30" ContentLicense="CC BY-SA 4.0" />
  <row Id="22284" PostHistoryTypeId="2" PostId="5823" RevisionGUID="99406386-4624-46cc-9471-c631bdcd0e3c" CreationDate="2022-11-10T15:10:59.857" UserId="139" Text="&gt; I have no access to it simply because it's a macro that gets expanded on compile time.&#xD;&#xA;&#xD;&#xA;You can actually replace the generated code with the edits as `lib.rs` and it should be possible to use it.&#xD;&#xA;&#xD;&#xA;Next why aren't you considering implementing `Into&lt;CustomOrigin&gt; for RawOrigin` at your module instead and using `ensure_signed(origin.into().)`. I am not versed with custom origins so take this with a grain of salt, I maybe missing something. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22286" PostHistoryTypeId="2" PostId="5824" RevisionGUID="a4a929ae-bc9d-47f1-97ea-ece8b9d7fcab" CreationDate="2022-11-10T15:55:20.510" UserId="139" Text="From `ValidateUnsigned`: &#xD;&#xA;&#xD;&#xA;&gt; Note that any checks done here are only used for determining the&#xD;&#xA;&gt; validity of the transaction for the transaction pool. During block&#xD;&#xA;&gt; execution phase one need to perform the same checks anyway, since this&#xD;&#xA;&gt; function is not being called.&#xD;&#xA;&#xD;&#xA;Which leads me to the question, is writing a `SignedExtension` any better in code than `ValidateUnsigned` since both provide the same pre-dispatch and tx validation checks. Maybe `SignedExtension` is more general but as far as I can see, for unsigned tx, they make no difference.&#xD;&#xA;&#xD;&#xA;I also ask this because `pallet-im-online` uses `ValidateUnsigned` instead of `SignedExtension` and I wonder the motivation behind the choice. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22288" PostHistoryTypeId="1" PostId="5824" RevisionGUID="a4a929ae-bc9d-47f1-97ea-ece8b9d7fcab" CreationDate="2022-11-10T15:55:20.510" UserId="139" Text="Difference between ValidateUnsigned and SignedExtension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22289" PostHistoryTypeId="3" PostId="5824" RevisionGUID="a4a929ae-bc9d-47f1-97ea-ece8b9d7fcab" CreationDate="2022-11-10T15:55:20.510" UserId="139" Text="|transactions|pallet-imonline|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22291" PostHistoryTypeId="2" PostId="5825" RevisionGUID="a7214e7b-a60b-44a8-ab62-c7d3c307edd2" CreationDate="2022-11-10T16:19:52.723" UserId="29" Text="Looks like your migration is &quot;too long&quot;. You may need to try a different migration strategy.&#xD;&#xA;&#xD;&#xA;More on this can be found here:&#xD;&#xA;- https://docs.substrate.io/reference/how-to-guides/parachains/runtime-upgrade/#choose-your-upgrade-approach" ContentLicense="CC BY-SA 4.0" />
  <row Id="22293" PostHistoryTypeId="2" PostId="5826" RevisionGUID="964e4579-6549-4d00-b119-b291da687025" CreationDate="2022-11-10T16:29:47.133" UserId="3427" Text="I'm building an automation for the Gov2 referenda module, testing right now using wss://governance2-testnet.litentry.io test network with polkadot.js app&#xD;&#xA;&#xD;&#xA;Differently from what the democracy module we currently have in Polkadot and Kusama, I cannot retrieve anymore **the list of who is currently voting on what**. Not even from the [api calls](https://polkadot.js.org/docs/substrate/storage/#referenda). Am I missing something ? or is the new system supposed to not store that information anymore?&#xD;&#xA;&#xD;&#xA;Before&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;After&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kxdgg.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/oABs9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22295" PostHistoryTypeId="1" PostId="5826" RevisionGUID="964e4579-6549-4d00-b119-b291da687025" CreationDate="2022-11-10T16:29:47.133" UserId="3427" Text="Gov2: list of who is voting on what | Polkadot.js api" ContentLicense="CC BY-SA 4.0" />
  <row Id="22296" PostHistoryTypeId="3" PostId="5826" RevisionGUID="964e4579-6549-4d00-b119-b291da687025" CreationDate="2022-11-10T16:29:47.133" UserId="3427" Text="|polkadot-js|api|gov2|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22297" PostHistoryTypeId="2" PostId="5827" RevisionGUID="7613f100-f902-4602-bd04-03e6cbe3c537" CreationDate="2022-11-10T16:40:44.273" UserId="3325" Text="The issue was that two of the validator nodes did not have the aura keys inserted, hence when the chance came to these validators the blocks were skipped. Fixed by adding missing aura keys to the validators, now all validators are authoring blocks and everything works as expected." ContentLicense="CC BY-SA 4.0" />
  <row Id="22299" PostHistoryTypeId="5" PostId="5819" RevisionGUID="e3bda375-c9e5-478f-aaf8-8142f91ddc39" CreationDate="2022-11-10T18:29:13.193" UserId="3331" Comment="added 182 characters in body" Text="I'm trying to execute a runtime upgrade on a running parachain. I'm using the cumulus parachainSystem pallet to do, using the authorize -&gt; enact flow.&#xD;&#xA;&#xD;&#xA;My parachain have the contracts pallet, with the standard migration.&#xD;&#xA;&#xD;&#xA;The steps I'm doing are the following:&#xD;&#xA;1. I'm just modifying the spec_version, without adding or removing any pallet.&#xD;&#xA;2. Then I run `cargo build --release -p &lt;runtime pkg&gt;` to build the new runtime blob.&#xD;&#xA;3. To execute the authorize_upgrade, I get the smallest file generated by the command above. Which the file name is something like `&lt;runtime pkg&gt;.compact.compressed.wasm`&#xD;&#xA;4. I execute the enact_upgrade call, and here is where the problem starts!&#xD;&#xA;&#xD;&#xA;I've got mixed outputs, doing with and without the scheduler pallet.&#xD;&#xA;&#xD;&#xA;It outputs this error first:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;And it tries to collate over and over until the error `Import failed: State Database error: Too many sibling blocks inserted` start appearing.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've tried using the scheduler already, but I'm probably doing something wrong? How can I properly set the scheduler with the auth -&gt; enact flow, to successfully execute the runtime upgrade in the parachain?&#xD;&#xA;&#xD;&#xA;I'm calling using sudo, like this:&#xD;&#xA;[![authorize_upgrade][3]][3]&#xD;&#xA;&#xD;&#xA;## The steps I'm doing:&#xD;&#xA;The upgraded runtime just have the spec_version increased, no pallets removed/addded.&#xD;&#xA;&#xD;&#xA;1. Scheduled a `authorize_upgrade` call, to be executed in n+5 blocks.&#xD;&#xA;2. Waited the execution of the n+5 block.&#xD;&#xA;3. After, scheduled the `enact_authorize`to be executed in n+10.&#xD;&#xA;&#xD;&#xA;When the second scheduled call happens, it keeps starting collation until the `too many siblings` error starts popping up.&#xD;&#xA;&#xD;&#xA;Is the order right? &#xD;&#xA;Do I need to make a set_code call in the Parachain, before or after the auth/enact?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XXLUL.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/s32z1.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/OMLW0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22300" PostHistoryTypeId="52" PostId="5817" RevisionGUID="2a6e6ffe-6f5d-4785-a0d3-2ad03794d144" CreationDate="2022-11-10T21:06:30.380" />
  <row Id="22301" PostHistoryTypeId="2" PostId="5828" RevisionGUID="3cce3f6a-4e91-4655-ae3a-c48a3b74cb84" CreationDate="2022-11-10T22:24:53.027" UserId="29" Text="I have seen mention of `codeSubstitutes` in the chain spec before.&#xD;&#xA;&#xD;&#xA;What is this? And when is it applicable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22303" PostHistoryTypeId="1" PostId="5828" RevisionGUID="3cce3f6a-4e91-4655-ae3a-c48a3b74cb84" CreationDate="2022-11-10T22:24:53.027" UserId="29" Text="What is codeSubstitutes in the chain spec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22304" PostHistoryTypeId="3" PostId="5828" RevisionGUID="3cce3f6a-4e91-4655-ae3a-c48a3b74cb84" CreationDate="2022-11-10T22:24:53.027" UserId="29" Text="|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22305" PostHistoryTypeId="2" PostId="5829" RevisionGUID="7ef170d9-54a8-4143-9365-ba637bf30f56" CreationDate="2022-11-10T22:24:53.027" UserId="29" Text="`codeSubstitutes` is a really cool and useful feature to upgrade your chain when a runtime upgrade is not possible. This can be useful when your chain is not producing blocks due to a bug. `codeSubstitutes` replaces the on-chain runtime by specifying the block number and the WASM. When the specified block number is reached the chain will &quot;substitute&quot; the on-chain WASM with the one specified in the `codeSubstitutes`. Keep in mind though, for a parachain, the relay chain will also have to be updated with the substituted WASM (most likely via governance).&#xD;&#xA;&#xD;&#xA;From the [source](https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/client/chain-spec/src/lib.rs#L164-L172):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;//! /// The given `wasm_code` will be used to substitute the on-chain wasm code starting with the&#xD;&#xA;//! /// given block number until the `spec_version` on-chain changes. The given `wasm_code` should&#xD;&#xA;//! /// be as close as possible to the on-chain wasm code. A substitute should be used to fix a bug&#xD;&#xA;//! /// that can not be fixed with a runtime upgrade, if for example the runtime is constantly&#xD;&#xA;//! /// panicking. Introducing new runtime apis isn't supported, because the node&#xD;&#xA;//! /// will read the runtime version from the on-chain wasm code. Use this functionality only when&#xD;&#xA;//! /// there is no other way around it and only patch the problematic bug, the rest should be done&#xD;&#xA;//! /// with a on-chain runtime upgrade.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22307" PostHistoryTypeId="5" PostId="5726" RevisionGUID="89e7c96a-cef2-4e56-9504-3c6fc8b0e124" CreationDate="2022-11-10T23:11:35.830" UserId="2678" Comment="deleted 119 characters in body" Text="I am observing unexpected behavior with the Cumulus Parachain Template. Our pallet uses [off-chain workers][1] (OCW), and the functionality successfully runs when we attach it to the Substrate Node Template.&#xD;&#xA;&#xD;&#xA;However, when I add our pallet to the [Cumulus Parachain Template][2] and follow the [Connect a Local Parachain guide][3], the functionality that requires off-chain workers stops running completely.&#xD;&#xA;&#xD;&#xA;Is there a reason that OCWs are not initializing on the Cumulus Parachain Template while they do run on the Node Template? Does the chainspec need to be altered in some way?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/SequesterChain/pallets/tree/main/donations&#xD;&#xA;  [2]: https://github.com/SequesterChain/sequester-parachain-template&#xD;&#xA;  [3]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/connect-a-local-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22308" PostHistoryTypeId="2" PostId="5830" RevisionGUID="e4ac48c5-0976-4a38-b22c-f2a2ff6de635" CreationDate="2022-11-10T23:56:20.397" UserId="3429" Text="I just started experimenting with substrate and I'm getting this error when running `cargo build --release`:&#xD;&#xA;&#xD;&#xA;&gt;    Compiling semver v1.0.14 error: failed to run custom build command&#xD;&#xA;&gt; for `libp2p-core v0.37.0`&#xD;&#xA;&gt; &#xD;&#xA;&gt; Caused by:   process didn't exit successfully:&#xD;&#xA;&gt; `C:\blockchain\substrate\target\release\build\libp2p-core-b022c239b3d22274\build-script-build`&#xD;&#xA;&gt; (exit code: 101)   --- stdout   Running: &quot;C:\\protoc-21.9-win64\\bin&quot;&#xD;&#xA;&gt; &quot;--include_imports&quot; &quot;--include_source_info&quot; &quot;-o&quot;&#xD;&#xA;&gt; &quot;C:\\Users\\luish\\AppData\\Local\\Temp\\prost-buildu5HDyP\\prost-descriptor-set&quot;&#xD;&#xA;&gt; &quot;-I&quot; &quot;src&quot; &quot;src/keys.proto&quot; &quot;src/envelope.proto&quot;&#xD;&#xA;&gt; &quot;src/peer_record.proto&quot;&#xD;&#xA;&gt; &#xD;&#xA;&gt;   --- stderr   thread 'main' panicked at 'called `Result::unwrap()` on&#xD;&#xA;&gt; an `Err` value: Custom { kind: PermissionDenied, error: &quot;failed to&#xD;&#xA;&gt; invoke protoc (hint: https://docs.rs/prost-build/#sourcing-protoc):&#xD;&#xA;&gt; (path: \&quot;C:\\\\protoc-21.9-win64\\\\bin\&quot;): Access is denied. (os&#xD;&#xA;&gt; error 5)&quot; }',&#xD;&#xA;&gt; C:\Users\luish\.cargo\registry\src\github.com-1ecc6299db9ec823\libp2p-core-0.37.0\build.rs:30:6&#xD;&#xA;&gt; note: run with `RUST_BACKTRACE=1` environment variable to display a&#xD;&#xA;&gt; backtrace" ContentLicense="CC BY-SA 4.0" />
  <row Id="22310" PostHistoryTypeId="1" PostId="5830" RevisionGUID="e4ac48c5-0976-4a38-b22c-f2a2ff6de635" CreationDate="2022-11-10T23:56:20.397" UserId="3429" Text="&quot;error: failed to run custom build command for `libp2p-core v0.37.0`&quot; in windows" ContentLicense="CC BY-SA 4.0" />
  <row Id="22311" PostHistoryTypeId="3" PostId="5830" RevisionGUID="e4ac48c5-0976-4a38-b22c-f2a2ff6de635" CreationDate="2022-11-10T23:56:20.397" UserId="3429" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22312" PostHistoryTypeId="4" PostId="5828" RevisionGUID="15820ca8-0628-47cf-97a6-3d781279e812" CreationDate="2022-11-11T00:06:17.690" UserId="29" Comment="edited title" Text="What is `codeSubstitutes` in the chain spec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22313" PostHistoryTypeId="2" PostId="5831" RevisionGUID="fe8686a2-ef56-46b5-b6ca-5368e25064c4" CreationDate="2022-11-11T00:51:38.740" UserId="3423" Text="Thanks to Coreggon, I figured it out. I wasn't able to decode it to a `Vec&lt;u8&gt;` and vice versa but thankfully FixedU128 also implements CompactAs:&#xD;&#xA;https://docs.rs/parity-scale-codec/3.0.0/parity_scale_codec/trait.CompactAs.html#tymethod.encode_as&#xD;&#xA;&#xD;&#xA;A sample solution:&#xD;&#xA;&#xD;&#xA;    use sp_arithmetic::{FixedU128};&#xD;&#xA;    use scale::CompactAs;&#xD;&#xA;    &#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Contract {&#xD;&#xA;        test_compact: u128,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl Contract {&#xD;&#xA;        fn get_test(&amp;self) -&gt; FixedU128 {&#xD;&#xA;            let res = FixedU128::decode_from(self.test_compact);&#xD;&#xA;            return res.unwrap();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn set_default_exchange_rate(&amp;mut self, new_test: FixedU128) {&#xD;&#xA;            self.test_compact = *new_test.encode_as();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22315" PostHistoryTypeId="2" PostId="5832" RevisionGUID="7b004693-d762-4c31-9202-187e38ce2e47" CreationDate="2022-11-11T04:45:16.807" UserId="2581" Text="I created kusama transfer function using polkadot.js/api.&lt;br/&gt;&#xD;&#xA;I followed https://polkadot.js.org/docs/api/examples/promise/make-transfer.&lt;br/&gt;&lt;br/&gt;&#xD;&#xA;I can get extrinsic hash from above. I want to get extrinsic detail to check if transaction is success or not.&lt;br/&gt;&#xD;&#xA;According to my check, it is impossible to check extrinsic detail with hash only.&lt;br/&gt;&#xD;&#xA;Extrinsic Hash and Block number are both needed.&#xD;&#xA;&lt;br/&gt;&lt;br/&gt;&#xD;&#xA;https://polkadot.js.org/docs/api/examples/promise/transfer-events&lt;br/&gt;&#xD;&#xA;I also tried callback, but it doesn't show blockhash for me.&#xD;&#xA; When I log status, it is just ```{ready: null}```&lt;br/&gt;&lt;br/&gt;&#xD;&#xA;How can I get block number or block hash from transfer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22317" PostHistoryTypeId="1" PostId="5832" RevisionGUID="7b004693-d762-4c31-9202-187e38ce2e47" CreationDate="2022-11-11T04:45:16.807" UserId="2581" Text="Get Block hash from transfer in polkadot.js/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="22318" PostHistoryTypeId="3" PostId="5832" RevisionGUID="7b004693-d762-4c31-9202-187e38ce2e47" CreationDate="2022-11-11T04:45:16.807" UserId="2581" Text="|polkadot-js|extrinsic|kusama|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22319" PostHistoryTypeId="2" PostId="5833" RevisionGUID="88d95746-f462-4655-b1bb-03a7ccfe23e4" CreationDate="2022-11-11T07:34:36.827" UserId="116" Text="Under what circumstances will a parachain experience a fork where blocks later can be rearranged?&#xD;&#xA;&#xD;&#xA;Blocks are created by the collators and if one of the collators are offline and misses its turn there will be a prolonged blocktime until the next collator is ready to produce its block. Finality is generated by the relaychain which will only receive one stream of blocks, where there cannot be any reorganization.&#xD;&#xA;&#xD;&#xA;Are any of above statements incorrect and are there under a set of conditions a possibility of forks and reorganization of the blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22321" PostHistoryTypeId="1" PostId="5833" RevisionGUID="88d95746-f462-4655-b1bb-03a7ccfe23e4" CreationDate="2022-11-11T07:34:36.827" UserId="116" Text="Can a parachain experience a fork?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22322" PostHistoryTypeId="3" PostId="5833" RevisionGUID="88d95746-f462-4655-b1bb-03a7ccfe23e4" CreationDate="2022-11-11T07:34:36.827" UserId="116" Text="|parachain|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22323" PostHistoryTypeId="2" PostId="5834" RevisionGUID="8e718037-8446-405e-b66a-dde3f3277dee" CreationDate="2022-11-11T08:37:19.210" UserId="1793" Text="it looks like that in version of 28 polkadot was change that extrinsics are by default transactional.&#xD;&#xA;&#xD;&#xA;Before that we used attribute `#[transactional]` for specific extrinsic in order to have transactional extrinsics.&#xD;&#xA;&#xD;&#xA;But now it looks like that all extrinsic by default are transactional and in our case we do not want to have all the extrinsics transactional. &#xD;&#xA;&#xD;&#xA;Is there attribute in order to annotate extrinsic as non-transactional ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22325" PostHistoryTypeId="1" PostId="5834" RevisionGUID="8e718037-8446-405e-b66a-dde3f3277dee" CreationDate="2022-11-11T08:37:19.210" UserId="1793" Text="How to annotate extrinsic as non transactional?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22326" PostHistoryTypeId="3" PostId="5834" RevisionGUID="8e718037-8446-405e-b66a-dde3f3277dee" CreationDate="2022-11-11T08:37:19.210" UserId="1793" Text="|extrinsic|transactional|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22327" PostHistoryTypeId="2" PostId="5835" RevisionGUID="6dc2a031-c984-49d4-b596-86754729f4e3" CreationDate="2022-11-11T09:19:30.517" UserId="2762" Text="To get the blockHash where it has been included your transaction, you can send it and then wait until it has been included in the block using a subscription. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    const unsub = await api.tx.balances.transfer(BOB, 12345).signAndSend(alice, (result) =&gt; {&#xD;&#xA;        console.log(`Current status is ${result.status}`);&#xD;&#xA;    &#xD;&#xA;        if (result.status.isInBlock) {&#xD;&#xA;          console.log(`Transaction included at blockHash ${result.status.asInBlock}`);&#xD;&#xA;        } else if (result.status.isFinalized) {&#xD;&#xA;          console.log(`Transaction finalized at blockHash ${result.status.asFinalized}`);&#xD;&#xA;          unsub();&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;Then you can get the block information(number, hash...) and the extrinsics in that block:&#xD;&#xA;&#xD;&#xA;    const blockHash = result.status.asFinalized;&#xD;&#xA;    const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;    console.log(signedBlock.toHuman());&#xD;&#xA;    const extrinsics = signedBlock.block.extrinsics;&#xD;&#xA;    console.log(extrinsics.toHuman())" ContentLicense="CC BY-SA 4.0" />
  <row Id="22329" PostHistoryTypeId="4" PostId="5819" RevisionGUID="60382db5-cf44-4020-9cd3-e25577bd97ea" CreationDate="2022-11-11T09:51:06.630" UserId="165" Comment="edited title" Text="How to execute a runtime upgrade that takes more weight than one block can hold" ContentLicense="CC BY-SA 4.0" />
  <row Id="22330" PostHistoryTypeId="2" PostId="5836" RevisionGUID="6e45cc74-c962-4d44-8d7c-ae1adca8195c" CreationDate="2022-11-11T09:55:29.053" UserId="165" Text="Pasting context from the [PR #10806][1] itself, very well documented, please check.&#xD;&#xA;&#xD;&#xA;&gt; ### Annotation for safe without storage layer&#xD;&#xA;&gt; &#xD;&#xA;&gt; Now that the default behavior of extrinsics will be to spawn at least&#xD;&#xA;&gt; one transactional layer, we can introduce an opt-in optimization where&#xD;&#xA;&gt; a user can state that a function is safe to be executed without its&#xD;&#xA;&gt; own transactional layer.&#xD;&#xA;&gt; &#xD;&#xA;&gt; For example:&#xD;&#xA;&gt; ```rust&#xD;&#xA;&gt;     /// This function is safe to execute without an additional transactional storage layer.&#xD;&#xA;&gt;     #[without_transactional]&#xD;&#xA;&gt;     fn set_value(x: u32) -&gt; DispatchResult {&#xD;&#xA;&gt;         Self::check_value(x)?;&#xD;&#xA;&gt;         MyStorage::set(x);&#xD;&#xA;&gt;         Ok(())&#xD;&#xA;&gt;     }&#xD;&#xA;&gt; ```&#xD;&#xA;&gt; When this function is called directly, a transactional layer should&#xD;&#xA;&gt; not spawn for it.&#xD;&#xA;&gt; &#xD;&#xA;&gt; If a user called `dispatch_with_transactional` to this function, a&#xD;&#xA;&gt; transactional layer also does not need to spawn.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/10806" ContentLicense="CC BY-SA 4.0" />
  <row Id="22332" PostHistoryTypeId="2" PostId="5837" RevisionGUID="9cb68c0e-5255-4f69-8e47-3e8290d1a9d8" CreationDate="2022-11-11T10:40:21.583" UserId="234" Text="These 2 extrinsics :&#xD;&#xA;- [10996284-2][1]&#xD;&#xA;- [10995944-2][2]&#xD;&#xA;&#xD;&#xA;have the same &#xD;&#xA;&#xD;&#xA;- Sender Account (From)&#xD;&#xA;- Destination Account (To)&#xD;&#xA;- Nonce&#xD;&#xA;- Amount&#xD;&#xA;- Transaction Hash&#xD;&#xA;&#xD;&#xA;I would like to know the reason why this happened because I am trying to reproduce the same scenario but unsuccessfully.&#xD;&#xA;&#xD;&#xA;While I try to reproduce, I make a test by executing 2 new extrinsics with again all same arguments (sender, destination, nonce, amount) &#xD;&#xA;- [12850640-2][4]&#xD;&#xA;- [12850689-2][3]&#xD;&#xA;&#xD;&#xA;but now I get a different txHash. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/extrinsic/10996284-2&#xD;&#xA;  [2]: https://polkadot.subscan.io/extrinsic/10995944-2&#xD;&#xA;  [3]: https://polkadot.subscan.io/extrinsic/12850689-2&#xD;&#xA;  [4]: https://polkadot.subscan.io/extrinsic/12850640-2" ContentLicense="CC BY-SA 4.0" />
  <row Id="22334" PostHistoryTypeId="1" PostId="5837" RevisionGUID="9cb68c0e-5255-4f69-8e47-3e8290d1a9d8" CreationDate="2022-11-11T10:40:21.583" UserId="234" Text="Why transactions with same arguments in one case they have same hash but in another case they have a different one?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22335" PostHistoryTypeId="3" PostId="5837" RevisionGUID="9cb68c0e-5255-4f69-8e47-3e8290d1a9d8" CreationDate="2022-11-11T10:40:21.583" UserId="234" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22336" PostHistoryTypeId="2" PostId="5838" RevisionGUID="4428b4e4-1667-4478-9feb-681432d888a1" CreationDate="2022-11-11T10:40:21.583" UserId="234" Text="The transactions from `13u3BwugeQzzD755L7jDV2P81h5vwWveYeTHQMB3BVokkWco` have the same hash because they are **immortals**.&#xD;&#xA;&#xD;&#xA;[![immortal lifetime][1]][1]&#xD;&#xA;&#xD;&#xA;The ones from `16ZbFjyAw1s2xv1bBYBHHGTmbXfokoCE3KYENWL1DDiQAo78` have different hashes because they are **mortal**.&#xD;&#xA;&#xD;&#xA;[![lifetime mortality][2]][2]&#xD;&#xA;[![mortal tx - lifetime][3]][3]&#xD;&#xA;&#xD;&#xA;Assuming that you are using a deterministic signature scheme and since the immortal txs reference the genesis hash, they are the same payload.&#xD;&#xA;&#xD;&#xA;Mortal transactions must reference the block hash of their first valid block, so those are of course different.&#xD;&#xA;&#xD;&#xA;Our recommendation is to use mortal transactions and one of the reasons is mentioned in our [wiki][4] quoted below :&#xD;&#xA;&#xD;&#xA;&gt;  ***NOTE:***  *If an account is reaped and a user re-funds the&#xD;&#xA;&gt; account, then they could replay an immortal transaction. Always&#xD;&#xA;&gt; default to using a mortal extrinsic.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you to the external team that asked the question and presented the examples, to Joe Petrowski for giving a super detailed explanation with screenshots &amp; Iker for reviewing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Kq9ah.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/K6rQ4.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/8Zk06.png&#xD;&#xA;  [4]: https://wiki.polkadot.network/docs/build-protocol-info#transaction-mortality" ContentLicense="CC BY-SA 4.0" />
  <row Id="22338" PostHistoryTypeId="2" PostId="5839" RevisionGUID="df9ed366-9f5b-43c4-b7bc-56ccc486a275" CreationDate="2022-11-11T10:42:55.460" UserId="2192" Text="Is there any way to tell the `construct_runtime!` macro to build/export a top-level `Error` enum type in the same way it provides the top-level `Call` and `Event` types?&#xD;&#xA;&#xD;&#xA;As far as I can tell the only way to decode an Error retrieved from the runtime is to use the Metadata (which is a little cumbersome). &#xD;&#xA;&#xD;&#xA;It would be nice if it was possible to do something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;match dispatch_error {&#xD;&#xA;    DispatchError::ModuleError(module_error) =&gt; RuntimeError::from(module_error),&#xD;&#xA;    _ =&gt; // do something else&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22340" PostHistoryTypeId="1" PostId="5839" RevisionGUID="df9ed366-9f5b-43c4-b7bc-56ccc486a275" CreationDate="2022-11-11T10:42:55.460" UserId="2192" Text="`runtime::Error` type" ContentLicense="CC BY-SA 4.0" />
  <row Id="22341" PostHistoryTypeId="3" PostId="5839" RevisionGUID="df9ed366-9f5b-43c4-b7bc-56ccc486a275" CreationDate="2022-11-11T10:42:55.460" UserId="2192" Text="|runtime|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22342" PostHistoryTypeId="2" PostId="5840" RevisionGUID="d84b8e19-8212-456d-b622-e51de3347b24" CreationDate="2022-11-11T11:02:12.230" UserId="3000" Text="i wanna to change my substrate chain consensus but i dont know how can i do and set my new consensus in substrate . &#xD;&#xA;&#xD;&#xA;i want to set dops consensus for my substrate chain also please guide my for implement dpos in substrate . &#xD;&#xA;&#xD;&#xA;**how can i implement dpos ? how can i set custome for default substrate ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="22344" PostHistoryTypeId="1" PostId="5840" RevisionGUID="d84b8e19-8212-456d-b622-e51de3347b24" CreationDate="2022-11-11T11:02:12.230" UserId="3000" Text="change consensus of substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="22345" PostHistoryTypeId="3" PostId="5840" RevisionGUID="d84b8e19-8212-456d-b622-e51de3347b24" CreationDate="2022-11-11T11:02:12.230" UserId="3000" Text="|polkadot-js|substrate-node-template|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22346" PostHistoryTypeId="2" PostId="5841" RevisionGUID="85eb9c86-90d9-4ef5-8397-69e6d31670aa" CreationDate="2022-11-11T11:17:48.707" UserId="3254" Text="Ive got this error on my console although transaction was succeeded.&#xD;&#xA;&#xD;&#xA;what causes this error..?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JtcEW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22348" PostHistoryTypeId="1" PostId="5841" RevisionGUID="85eb9c86-90d9-4ef5-8397-69e6d31670aa" CreationDate="2022-11-11T11:17:48.707" UserId="3254" Text="Unable to decode contract event: Unable to find event" ContentLicense="CC BY-SA 4.0" />
  <row Id="22349" PostHistoryTypeId="3" PostId="5841" RevisionGUID="85eb9c86-90d9-4ef5-8397-69e6d31670aa" CreationDate="2022-11-11T11:17:48.707" UserId="3254" Text="|polkadot-js|ink|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22350" PostHistoryTypeId="2" PostId="5842" RevisionGUID="4f763044-56d8-4cf3-9414-484db1d009b1" CreationDate="2022-11-11T12:20:42.660" UserId="2960" Text="This is probably a newbie question&#xD;&#xA;Is it correct to execute a for loop which has the potential to loop over and process possibly 5000 or more records in on_initialize hook? could you provide me a detailed answer as to why not? I guess this is related to block size and could slow down the chain if I am correct. &#xD;&#xA;&#xD;&#xA;I do have a list of tasks that have to end at a certain block, I am guessing if this is not the right approach I will have to allow the owner of each task to initiate the end task" ContentLicense="CC BY-SA 4.0" />
  <row Id="22352" PostHistoryTypeId="1" PostId="5842" RevisionGUID="4f763044-56d8-4cf3-9414-484db1d009b1" CreationDate="2022-11-11T12:20:42.660" UserId="2960" Text="on_initialize best practice for executing a large for loop -" ContentLicense="CC BY-SA 4.0" />
  <row Id="22353" PostHistoryTypeId="3" PostId="5842" RevisionGUID="4f763044-56d8-4cf3-9414-484db1d009b1" CreationDate="2022-11-11T12:20:42.660" UserId="2960" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22355" PostHistoryTypeId="2" PostId="5843" RevisionGUID="fd0247ee-64ef-4eca-acac-1aa1af1b93a0" CreationDate="2022-11-11T14:51:41.350" UserId="73" Text="&gt; Is there any way to tell the construct_runtime! macro to build/export a top-level Error enum type in the same way it provides the top-level Call and Event types?&#xD;&#xA;&#xD;&#xA;No that is not possible. &#xD;&#xA;&#xD;&#xA;You also don't have included any reasoning on why you need this, otherwise I could maybe have given an answer with more content." ContentLicense="CC BY-SA 4.0" />
  <row Id="22357" PostHistoryTypeId="2" PostId="5844" RevisionGUID="d930d388-01e8-4a4f-86d3-cd7593e150cb" CreationDate="2022-11-11T16:19:41.803" UserId="2163" Text="The extrinsic uses the argument in the following lines of code:&#xD;&#xA;```rust&#xD;&#xA;let actual_count = &lt;Candidates&lt;T&gt;&gt;::decode_len().unwrap_or(0) as u32;&#xD;&#xA;ensure!(actual_count &lt;= candidate_count, Error::&lt;T&gt;::InvalidWitnessData);&#xD;&#xA;ensure!(&#xD;&#xA;	actual_count &lt;= &lt;T as Config&gt;::MaxCandidates::get(),&#xD;&#xA;	Error::&lt;T&gt;::TooManyCandidates&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;I am not sure I understand why would we provide the number of candidates as an argument if we are going to query the count of candidates in the extrinsic. What is the point of accepting possibly inaccurate information that doesn't seem to serve a purpose here?&#xD;&#xA;&#xD;&#xA;There is probably a reason for this, but I don't seem to understand it." ContentLicense="CC BY-SA 4.0" />
  <row Id="22359" PostHistoryTypeId="1" PostId="5844" RevisionGUID="d930d388-01e8-4a4f-86d3-cd7593e150cb" CreationDate="2022-11-11T16:19:41.803" UserId="2163" Text="What is the purpose of `candidate_count` argument used in `submit_candidacy` extrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="22360" PostHistoryTypeId="3" PostId="5844" RevisionGUID="d930d388-01e8-4a4f-86d3-cd7593e150cb" CreationDate="2022-11-11T16:19:41.803" UserId="2163" Text="|pallet-election-phragmen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22361" PostHistoryTypeId="2" PostId="5845" RevisionGUID="e4e37fea-d126-4aaa-b42f-29dfb85c7b50" CreationDate="2022-11-11T17:20:09.177" UserId="29" Text="I have seen the word Sovereign account used in multiple places in the Polkadot ecosystem yet I cannot find a formal definition of what a Sovereign account is.&#xD;&#xA;&#xD;&#xA;What is a Sovereign account in Polkadot/Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22363" PostHistoryTypeId="1" PostId="5845" RevisionGUID="e4e37fea-d126-4aaa-b42f-29dfb85c7b50" CreationDate="2022-11-11T17:20:09.177" UserId="29" Text="What is a Sovereign Account in Polkadot/Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22364" PostHistoryTypeId="3" PostId="5845" RevisionGUID="e4e37fea-d126-4aaa-b42f-29dfb85c7b50" CreationDate="2022-11-11T17:20:09.177" UserId="29" Text="|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22365" PostHistoryTypeId="2" PostId="5846" RevisionGUID="3351b24b-8f67-4563-b263-4a76dcb24db5" CreationDate="2022-11-11T17:20:09.177" UserId="29" Text="Moonbeam has a nice [definition](https://docs.moonbeam.network/builders/xcm/overview/#general-xcm-definitions):&#xD;&#xA;&#xD;&#xA;&gt; Sovereign account — an account each chain in the ecosystem has, one&#xD;&#xA;&gt; for the relay chain and the other for other parachains. It is&#xD;&#xA;&gt; calculated as the blake2 hash of a specific word and parachain ID&#xD;&#xA;&gt; concatenated (blake2(para+ParachainID) for the sovereign account in&#xD;&#xA;&gt; the relay chain, and blake2(sibl+ParachainID) for the sovereign&#xD;&#xA;&gt; account in other parachains), truncating the hash to the correct&#xD;&#xA;&gt; length. The account is owned by root and can only be used through SUDO&#xD;&#xA;&gt; (if available) or democracy (technical committee or referenda). The&#xD;&#xA;&gt; sovereign account typically signs XCM messages in other chains in the&#xD;&#xA;&gt; ecosystem&#xD;&#xA;&#xD;&#xA;Yet a pallet can also have a sovereign account. For example, the [treasury pallet uses](https://github.com/paritytech/substrate/blob/a47f200eebeb88a5bde6f1ed2be9728b82536dde/frame/treasury/src/lib.rs#L185) a `PalletId` to generate a sovereign account:&#xD;&#xA;```rust&#xD;&#xA;/// The treasury's pallet id, used for deriving its sovereign account ID.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type PalletId: Get&lt;PalletId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There is also a good post on how to calculate sovereign account IDs [here](https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain/5316#5316)." ContentLicense="CC BY-SA 4.0" />
  <row Id="22367" PostHistoryTypeId="2" PostId="5847" RevisionGUID="1c4fd088-63c0-46d6-99b9-cbbb5a7fb1aa" CreationDate="2022-11-11T17:32:16.207" UserId="73" Text="&gt; I guess this is related to block size and could slow down the chain if I am correct.&#xD;&#xA;&#xD;&#xA;Yes this is correct. Storage iterations can be really expensive. If this is for a Parachain, each read will also increase the proof size. If you don't ensure that all of this stays within reasonable limits, you could easily brick your chain.&#xD;&#xA;&#xD;&#xA;&gt; I do have a list of tasks that have to end at a certain block, I am guessing if this is not the right approach I will have to allow the owner of each task to initiate the end task&#xD;&#xA;&#xD;&#xA;Lazy operations should always be favored. If you have the possibility to move this off to the user it would be much better than iterating in `on_initialize`. You could also move the operation into `on_idle` and only process a subset of these tasks per block." ContentLicense="CC BY-SA 4.0" />
  <row Id="22369" PostHistoryTypeId="2" PostId="5848" RevisionGUID="b7b9bdd8-1105-47cc-8c03-f9c7d21ef42d" CreationDate="2022-11-11T17:43:42.267" UserId="73" Text="Take a look at the weight formula:&#xD;&#xA;```&#xD;&#xA;#[pallet::weight(T::WeightInfo::submit_candidacy(*candidate_count))]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `candidate_count` is an input to the formula and a requirement of weights is that they are &quot;static&quot; aka can be calculated before running the extrinsic. If you would read the candidate count as part of calculating the weight, the block producer would spent the resources to get the value from the state and then maybe rejecting the transaction for the current block because there isn't enough space anymore in the block. No one would pay the block producer for this operation. It would may open some attack vector against the chain, so the weight formulas are required to be static." ContentLicense="CC BY-SA 4.0" />
  <row Id="22371" PostHistoryTypeId="2" PostId="5849" RevisionGUID="14d244a5-ab74-4fd5-a5c0-8e3233dd278d" CreationDate="2022-11-11T17:47:32.990" UserId="29" Text="From a parachain's perspective you do not need to change the consensus.&#xD;&#xA;&#xD;&#xA;Take a look at [this](https://medium.com/kilt-protocol/the-continuing-evolution-of-kilt-protocol-limited-delegated-proof-of-stake-640403427c48) blog article by Kilt, a team that has successfully implemented limited delegated proof of stake.&#xD;&#xA;&#xD;&#xA;Note that in [their runtime](https://github.com/KILTprotocol/kilt-node/blob/8fe2c4de746bfee57154e0b970b39f860c75b769/runtimes/spiritnet/src/lib.rs#L909-L911) they use Aura and a [custom staking pallet](https://github.com/KILTprotocol/kilt-node/tree/develop/pallets/parachain-staking).&#xD;&#xA;&#xD;&#xA;There are other chains in the ecosystem who are doing DPoS as well. &#xD;&#xA;&#xD;&#xA;I recommend you start by reviewing their implementations." ContentLicense="CC BY-SA 4.0" />
  <row Id="22373" PostHistoryTypeId="2" PostId="5850" RevisionGUID="9e59bfea-278f-4a9d-9fb5-97a352b70fd6" CreationDate="2022-11-11T19:21:12.493" UserId="3407" Text="There is no feasible situation under which a parachain has finalized blocks rearranged. For all practical purposes, finalized blocks are final and will not change.&#xD;&#xA;&#xD;&#xA;However, there are some situations where something comparable can happen.&#xD;&#xA;&#xD;&#xA;If there are issues in the relay chain, and the validators do not come to a consensus on the best chain for a prolonged period, no new blocks will be finalized, although many are produced. If that goes on long enough, users of parachains will see no value in doing off-chain or cross-chain operations based on finalized blocks, because no forward progress is made. They would then have to use a probabilistic finality mechanism like in other chains, which is susceptible to reorganization.&#xD;&#xA;&#xD;&#xA;Similarly, it is technically possible that &gt;2/3 of the validators could collude and decide the state is now something different, which would be able to bypass consensus mechanisms. However, this is exceedingly unlikely." ContentLicense="CC BY-SA 4.0" />
  <row Id="22375" PostHistoryTypeId="2" PostId="5851" RevisionGUID="c56ff6d7-c9a0-4bca-bdac-b13ea44596c1" CreationDate="2022-11-11T19:25:36.817" UserId="2264" Text="We have an indexing process that subscribes to finalized blocks through the Websocket interface and triggers a lightweight indexing job for that block.&#xD;&#xA;&#xD;&#xA;The indexing job then fetches, in sequence and over HTTP/RPC, block information through `chain_getBlock` and events for that block by calling `state_getStorage` with the block's hash.&#xD;&#xA;&#xD;&#xA;We're seeing an issue in this process where `chain_getBlock` succeeds but `state_getStorage` fails with `-32000 UnknownBlock: Header was not found in the database`. The block can be found in the Polkadot UI.&#xD;&#xA;&#xD;&#xA;How is this possible? Strangely enough, while the indexing process has not changed in over a month, we're seeing this repeatedly as of two days ago, with no other obviously-related changes.&#xD;&#xA;&#xD;&#xA;The only thing I can presume is that given the non-sticky nature of HTTP, the first and the second call can be routed to different nodes and the second node's storage isn't up to sync. Can there be any truth to that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22377" PostHistoryTypeId="1" PostId="5851" RevisionGUID="c56ff6d7-c9a0-4bca-bdac-b13ea44596c1" CreationDate="2022-11-11T19:25:36.817" UserId="2264" Text="How (or how quickly) does block information become available to nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22378" PostHistoryTypeId="3" PostId="5851" RevisionGUID="c56ff6d7-c9a0-4bca-bdac-b13ea44596c1" CreationDate="2022-11-11T19:25:36.817" UserId="2264" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22379" PostHistoryTypeId="2" PostId="5852" RevisionGUID="39827e22-f561-4ecb-b885-490641ca1b52" CreationDate="2022-11-11T19:35:39.870" UserId="29" Text="I noticed that my migration is too big and will take up more than one block.&#xD;&#xA;&#xD;&#xA;How do I do a multi-block migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22381" PostHistoryTypeId="1" PostId="5852" RevisionGUID="39827e22-f561-4ecb-b885-490641ca1b52" CreationDate="2022-11-11T19:35:39.870" UserId="29" Text="How do I do a mult-block migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22382" PostHistoryTypeId="3" PostId="5852" RevisionGUID="39827e22-f561-4ecb-b885-490641ca1b52" CreationDate="2022-11-11T19:35:39.870" UserId="29" Text="|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22383" PostHistoryTypeId="2" PostId="5853" RevisionGUID="16fb99d5-b339-49ca-b0f5-a457bbf4b834" CreationDate="2022-11-11T19:35:39.870" UserId="29" Text="One way is to use the [`fn on_runtime_upgrade()`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_runtime_upgrade) hook with the [`fn on_initialize()`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_initialize) hook.&#xD;&#xA;&#xD;&#xA;[`pallet-xcm`](https://github.com/paritytech/polkadot/blob/master/xcm/pallet-xcm/src/lib.rs) has a good example of a multi-block migration using these hooks:&#xD;&#xA;&#xD;&#xA;When the runtime is upgraded the `on_runtime_upgrade` hook kicks off the migration:&#xD;&#xA;```rust&#xD;&#xA;fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA;    // Start a migration (this happens before on_initialize so it'll happen later in this&#xD;&#xA;    // block, which should be good enough)...&#xD;&#xA;    CurrentMigration::&lt;T&gt;::put(VersionMigrationStage::default());&#xD;&#xA;    T::DbWeight::get().writes(1)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L451-L456&#xD;&#xA;&#xD;&#xA;Then at the beginning of each block the `on_initialize` sets a 10% block limit and kicks off the migrations in respect to that limit:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn on_initialize(_n: BlockNumberFor&lt;T&gt;) -&gt; Weight {&#xD;&#xA;    let mut weight_used = Weight::zero();&#xD;&#xA;    if let Some(migration) = CurrentMigration::&lt;T&gt;::get() {&#xD;&#xA;        // Consume 10% of block at most&#xD;&#xA;        let max_weight = T::BlockWeights::get().max_block / 10;&#xD;&#xA;        let (w, maybe_migration) = Self::check_xcm_version_change(migration, max_weight);&#xD;&#xA;        CurrentMigration::&lt;T&gt;::set(maybe_migration);&#xD;&#xA;        weight_used.saturating_accrue(w);&#xD;&#xA;    }&#xD;&#xA;    ....&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L419-L450&#xD;&#xA;&#xD;&#xA;The migrations starts (being careful not to exceed max weight -&gt; 10%):&#xD;&#xA;```rust&#xD;&#xA;/// Will always make progress, and will do its best not to use much more than `weight_cutoff`&#xD;&#xA;/// in doing so.&#xD;&#xA;pub(crate) fn check_xcm_version_change(&#xD;&#xA;    mut stage: VersionMigrationStage,&#xD;&#xA;    weight_cutoff: Weight,&#xD;&#xA;) -&gt; (Weight, Option&lt;VersionMigrationStage&gt;) {&#xD;&#xA;    let mut weight_used = Weight::zero();&#xD;&#xA;&#xD;&#xA;    // TODO: Correct weights for the components of this:&#xD;&#xA;    let todo_sv_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vn_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_already_notified_weight: Weight = T::DbWeight::get().reads(1);&#xD;&#xA;    let todo_vnt_notify_weight: Weight = T::DbWeight::get().reads_writes(1, 3);&#xD;&#xA;    let todo_vnt_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_migrate_fail_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_notify_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 3);&#xD;&#xA;&#xD;&#xA;    use VersionMigrationStage::*;&#xD;&#xA;&#xD;&#xA;    if stage == MigrateSupportedVersion {&#xD;&#xA;        // We assume that supported XCM version only ever increases, so just cycle through lower&#xD;&#xA;        // XCM versioned from the current.&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in SupportedVersion::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                if let Ok(new_key) = old_key.into_latest() {&#xD;&#xA;                    SupportedVersion::&lt;T&gt;::insert(XCM_VERSION, new_key, value);&#xD;&#xA;                }&#xD;&#xA;                weight_used.saturating_accrue(todo_sv_migrate_weight);&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = MigrateVersionNotifiers;&#xD;&#xA;    }&#xD;&#xA;    if stage == MigrateVersionNotifiers {&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in VersionNotifiers::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                if let Ok(new_key) = old_key.into_latest() {&#xD;&#xA;                    VersionNotifiers::&lt;T&gt;::insert(XCM_VERSION, new_key, value);&#xD;&#xA;                }&#xD;&#xA;                weight_used.saturating_accrue(todo_vn_migrate_weight);&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = NotifyCurrentTargets(None);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    let xcm_version = T::AdvertisedXcmVersion::get();&#xD;&#xA;&#xD;&#xA;    if let NotifyCurrentTargets(maybe_last_raw_key) = stage {&#xD;&#xA;        let mut iter = match maybe_last_raw_key {&#xD;&#xA;            Some(k) =&gt; VersionNotifyTargets::&lt;T&gt;::iter_prefix_from(XCM_VERSION, k),&#xD;&#xA;            None =&gt; VersionNotifyTargets::&lt;T&gt;::iter_prefix(XCM_VERSION),&#xD;&#xA;        };&#xD;&#xA;        while let Some((key, value)) = iter.next() {&#xD;&#xA;            let (query_id, max_weight, target_xcm_version) = value;&#xD;&#xA;            let new_key: MultiLocation = match key.clone().try_into() {&#xD;&#xA;                Ok(k) if target_xcm_version != xcm_version =&gt; k,&#xD;&#xA;                _ =&gt; {&#xD;&#xA;                    // We don't early return here since we need to be certain that we&#xD;&#xA;                    // make some progress.&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_already_notified_weight);&#xD;&#xA;                    continue&#xD;&#xA;                },&#xD;&#xA;            };&#xD;&#xA;            let response = Response::Version(xcm_version);&#xD;&#xA;            let message = Xcm(vec![QueryResponse { query_id, response, max_weight }]);&#xD;&#xA;            let event = match T::XcmRouter::send_xcm(new_key.clone(), message) {&#xD;&#xA;                Ok(()) =&gt; {&#xD;&#xA;                    let value = (query_id, max_weight, xcm_version);&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::insert(XCM_VERSION, key, value);&#xD;&#xA;                    Event::VersionChangeNotified(new_key, xcm_version)&#xD;&#xA;                },&#xD;&#xA;                Err(e) =&gt; {&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::remove(XCM_VERSION, key);&#xD;&#xA;                    Event::NotifyTargetSendFail(new_key, query_id, e.into())&#xD;&#xA;                },&#xD;&#xA;            };&#xD;&#xA;            Self::deposit_event(event);&#xD;&#xA;            weight_used.saturating_accrue(todo_vnt_notify_weight);&#xD;&#xA;            if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                let last = Some(iter.last_raw_key().into());&#xD;&#xA;                return (weight_used, Some(NotifyCurrentTargets(last)))&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = MigrateAndNotifyOldTargets;&#xD;&#xA;    }&#xD;&#xA;    if stage == MigrateAndNotifyOldTargets {&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in VersionNotifyTargets::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                let (query_id, max_weight, target_xcm_version) = value;&#xD;&#xA;                let new_key = match MultiLocation::try_from(old_key.clone()) {&#xD;&#xA;                    Ok(k) =&gt; k,&#xD;&#xA;                    Err(()) =&gt; {&#xD;&#xA;                        Self::deposit_event(Event::NotifyTargetMigrationFail(&#xD;&#xA;                            old_key, value.0,&#xD;&#xA;                        ));&#xD;&#xA;                        weight_used.saturating_accrue(todo_vnt_migrate_fail_weight);&#xD;&#xA;                        if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                            return (weight_used, Some(stage))&#xD;&#xA;                        }&#xD;&#xA;                        continue&#xD;&#xA;                    },&#xD;&#xA;                };&#xD;&#xA;&#xD;&#xA;                let versioned_key = LatestVersionedMultiLocation(&amp;new_key);&#xD;&#xA;                if target_xcm_version == xcm_version {&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::insert(XCM_VERSION, versioned_key, value);&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_migrate_weight);&#xD;&#xA;                } else {&#xD;&#xA;                    // Need to notify target.&#xD;&#xA;                    let response = Response::Version(xcm_version);&#xD;&#xA;                    let message =&#xD;&#xA;                        Xcm(vec![QueryResponse { query_id, response, max_weight }]);&#xD;&#xA;                    let event = match T::XcmRouter::send_xcm(new_key.clone(), message) {&#xD;&#xA;                        Ok(()) =&gt; {&#xD;&#xA;                            VersionNotifyTargets::&lt;T&gt;::insert(&#xD;&#xA;                                XCM_VERSION,&#xD;&#xA;                                versioned_key,&#xD;&#xA;                                (query_id, max_weight, xcm_version),&#xD;&#xA;                            );&#xD;&#xA;                            Event::VersionChangeNotified(new_key, xcm_version)&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; Event::NotifyTargetSendFail(new_key, query_id, e.into()),&#xD;&#xA;                    };&#xD;&#xA;                    Self::deposit_event(event);&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_notify_migrate_weight);&#xD;&#xA;                }&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    (weight_used, None)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L896-L1034&#xD;&#xA;&#xD;&#xA;The stage of the migration is stored in storage, so that the migration can continue in the next block if needed.&#xD;&#xA;```rust&#xD;&#xA;/// The current migration's stage, if any.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type CurrentMigration&lt;T: Config&gt; =&#xD;&#xA;    StorageValue&lt;_, VersionMigrationStage, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L392-L395" ContentLicense="CC BY-SA 4.0" />
  <row Id="22385" PostHistoryTypeId="2" PostId="5854" RevisionGUID="b291dc74-8922-4c39-a47b-2f9be104ab62" CreationDate="2022-11-11T20:01:33.330" UserId="29" Text="Basti's answer is the best but for whatever reason if you wanted to do this in &#xD;&#xA;`on_initialize` then another way is to break it up into &quot;chunks&quot; to process by setting a weight limit per block e.g. 5% of block weight will be allocated to this and store &quot;checkpoints&quot; in storage. Similar to how we do multi-block migrations (example [here](https://substrate.stackexchange.com/questions/5852/how-do-i-do-a-mult-block-migration)).&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22387" PostHistoryTypeId="2" PostId="5855" RevisionGUID="495fff5e-157a-4ab3-9345-9f9401b67794" CreationDate="2022-11-11T20:10:01.560" UserId="29" Text="In the Polkadot node `--help` I see the following:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;--sync &lt;SYNC_MODE&gt;&#xD;&#xA;    Blockchain syncing mode.&#xD;&#xA;    &#xD;&#xA;    - `full`: Download and validate full blockchain history.&#xD;&#xA;    - `fast`: Download blocks and the latest state only.&#xD;&#xA;    - `fast-unsafe`: Same as `fast`, but skip downloading state proofs.&#xD;&#xA;    - `warp`: Download the latest state and proof.&#xD;&#xA;    &#xD;&#xA;    [default: full]&#xD;&#xA;&#xD;&#xA;    Possible values:&#xD;&#xA;    - full:&#xD;&#xA;    Full sync. Download end verify all blocks&#xD;&#xA;    - fast:&#xD;&#xA;    Download blocks without executing them. Download latest state with proofs&#xD;&#xA;    - fast-unsafe:&#xD;&#xA;    Download blocks without executing them. Download latest state without proofs&#xD;&#xA;    - warp:&#xD;&#xA;    Prove finality and download the latest state&#xD;&#xA;```&#xD;&#xA;Two questions:&#xD;&#xA;&#xD;&#xA;1) Is `warp` faster than `fast` sync? &#xD;&#xA;&#xD;&#xA;2) Is there ever a use case where I should use `fast` (or even `full`) instead of `warp` sync or is `warp` sync the better and recommended method for syncing a node?&#xD;&#xA;&#xD;&#xA;If I understand correctly, `warp` sync does not check for transaction validity and does not need to because it uses justifications/finalization proofs." ContentLicense="CC BY-SA 4.0" />
  <row Id="22389" PostHistoryTypeId="1" PostId="5855" RevisionGUID="495fff5e-157a-4ab3-9345-9f9401b67794" CreationDate="2022-11-11T20:10:01.560" UserId="29" Text="Is GRANDPA warp sync the recommended method for syncing a node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22390" PostHistoryTypeId="3" PostId="5855" RevisionGUID="495fff5e-157a-4ab3-9345-9f9401b67794" CreationDate="2022-11-11T20:10:01.560" UserId="29" Text="|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22394" PostHistoryTypeId="50" PostId="5307" RevisionGUID="ba744d5f-cc23-40a7-b665-b28e25cadf98" CreationDate="2022-11-12T08:02:40.320" UserId="-1" />
  <row Id="22399" PostHistoryTypeId="2" PostId="5857" RevisionGUID="ca1349ce-4acf-44a2-8057-beccfc01b00a" CreationDate="2022-11-12T11:08:43.507" UserId="2844" Text="As I tried to implement `PackedAllocate` `it warns cannot find derive macro PackedAllocate in this scope`. How to solve this&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9m2Md.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22401" PostHistoryTypeId="1" PostId="5857" RevisionGUID="ca1349ce-4acf-44a2-8057-beccfc01b00a" CreationDate="2022-11-12T11:08:43.507" UserId="2844" Text="the trait `ink_storage::traits::PackedAllocate` is not implemented" ContentLicense="CC BY-SA 4.0" />
  <row Id="22402" PostHistoryTypeId="3" PostId="5857" RevisionGUID="ca1349ce-4acf-44a2-8057-beccfc01b00a" CreationDate="2022-11-12T11:08:43.507" UserId="2844" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22403" PostHistoryTypeId="5" PostId="5831" RevisionGUID="ea640f70-7676-4d64-b67f-0286d4c97bc4" CreationDate="2022-11-12T12:46:13.140" UserId="3423" Comment="deleted 17 characters in body" Text="Thanks to Coreggon, I figured it out. I wasn't able to decode it to a `Vec&lt;u8&gt;` and vice versa but thankfully FixedU128 also implements CompactAs:&#xD;&#xA;https://docs.rs/parity-scale-codec/3.0.0/parity_scale_codec/trait.CompactAs.html#tymethod.encode_as&#xD;&#xA;&#xD;&#xA;A sample solution:&#xD;&#xA;&#xD;&#xA;    use sp_arithmetic::{FixedU128};&#xD;&#xA;    use scale::CompactAs;&#xD;&#xA;    &#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Contract {&#xD;&#xA;        test_compact: u128,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl Contract {&#xD;&#xA;        fn get_test(&amp;self) -&gt; FixedU128 {&#xD;&#xA;            let res = FixedU128::decode_from(self.test_compact);&#xD;&#xA;            return res.unwrap();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn set_test(&amp;mut self, new_test: FixedU128) {&#xD;&#xA;            self.test_compact = *new_test.encode_as();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22404" PostHistoryTypeId="2" PostId="5858" RevisionGUID="0f6845ad-5c61-408c-b26c-d1d723e2d737" CreationDate="2022-11-12T14:01:08.863" UserId="73" Text="&gt; Is warp faster than fast sync?&#xD;&#xA;&#xD;&#xA;Yes, it is faster. Warp sync only verifies the Era changes from genesis to the tip of the chain. When reaching the tip of the chain, it will download the state for this block and after that the node will sync normally. In the background the node will then download all previous blocks to store them. Fast sync downloads all blocks from genesis to the tip of the chain without executing them. When reaching the tip of the chain the node will download the state for this block.&#xD;&#xA;&#xD;&#xA;Both are doing similar things, but warp sync will get you faster a working node and it is also more secure as you verify the era changes.&#xD;&#xA;&#xD;&#xA;&gt; Is there ever a use case where I should use fast (or even full) instead of warp sync or is warp sync the better and recommended method for syncing a node?&#xD;&#xA;&#xD;&#xA;Currently warp sync in Substrate doesn't work for nodes with a db that already contains some blocks. However, in general you should always use warp sync. There are also some issues in the Substrate issue tracker to make warp sync the default syncing mode.&#xD;&#xA;You will need to use full sync mode if you want to sync an archive node.&#xD;&#xA;&#xD;&#xA;&gt; If I understand correctly, warp sync does not check for transaction validity and does not need to because it uses justifications/finalization proofs.&#xD;&#xA;&#xD;&#xA;Yes, warp sync only verifies the headers of the era changes. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22406" PostHistoryTypeId="2" PostId="5859" RevisionGUID="4d0e8c01-1ba9-4ef9-a9e0-666f22c97690" CreationDate="2022-11-12T16:28:34.087" UserId="3437" Text="I was doing some experiments with Substrate Node Template. I found that for every extrinsic, user is charged with some fee. I explored&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs&#xD;&#xA;&#xD;&#xA;but couldn't understand how this is working internally.&#xD;&#xA;&#xD;&#xA;In Runtime configuration, I found that this pallet does not depend on any other pallet neither this is a dependency for any other pallet. Then how this works internally?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can someone please help me to understand how transaction-payment pallet is being handled internally without any dependent/dependency?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="22408" PostHistoryTypeId="1" PostId="5859" RevisionGUID="4d0e8c01-1ba9-4ef9-a9e0-666f22c97690" CreationDate="2022-11-12T16:28:34.087" UserId="3437" Text="How the transaction payment pallet handles transaction fee of every extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22409" PostHistoryTypeId="3" PostId="5859" RevisionGUID="4d0e8c01-1ba9-4ef9-a9e0-666f22c97690" CreationDate="2022-11-12T16:28:34.087" UserId="3437" Text="|substrate-node-template|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22410" PostHistoryTypeId="2" PostId="5860" RevisionGUID="f63e6382-a982-40e5-b802-f972fd475a15" CreationDate="2022-11-12T17:24:07.850" UserId="139" Text="It handles transaction payments through what is known as Signed Extensions in Substrate. Basically, a signed extension allows you to perform logic that pertains to validating the transaction received from the network/transaction pool, and also allows you to run some logic before and after an extrinsic is executed. The pre-dispatch method is called before a transaction is executed, and the validate method is called to put it in the Transaction Queue.&#xD;&#xA;&#xD;&#xA;In the runtime code you have linked search for the type facilitating this behaviour is :&#xD;&#xA;	`pallet_asset_tx_payment::ChargeAssetTxPayment&lt;Runtime&gt;`&#xD;&#xA;&#xD;&#xA;This is basically validating a transaction and computing the fees that should be charged for a transaction. Of interest are these two methods:&#xD;&#xA;```rust&#xD;&#xA;fn validate(&#xD;&#xA;		&amp;self,&#xD;&#xA;		who: &amp;Self::AccountId,&#xD;&#xA;		call: &amp;Self::Call,&#xD;&#xA;		info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;		len: usize,&#xD;&#xA;	) -&gt; TransactionValidity {&#xD;&#xA;		let (final_fee, _) = self.withdraw_fee(who, call, info, len)?;&#xD;&#xA;		let tip = self.0;&#xD;&#xA;		Ok(ValidTransaction {&#xD;&#xA;			priority: Self::get_priority(info, len, tip, final_fee),&#xD;&#xA;			..Default::default()&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn pre_dispatch(&#xD;&#xA;		self,&#xD;&#xA;		who: &amp;Self::AccountId,&#xD;&#xA;		call: &amp;Self::Call,&#xD;&#xA;		info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;		len: usize,&#xD;&#xA;	) -&gt; Result&lt;Self::Pre, TransactionValidityError&gt; {&#xD;&#xA;		let (_fee, imbalance) = self.withdraw_fee(who, call, info, len)?;&#xD;&#xA;		Ok((self.0, who.clone(), imbalance))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then there is one more piece of the puzzle which is the `query_info` method defined inside the pallet. It is used by the transaction payment runtime api to query for the extrinsic weight, runtime extrinsic base weight and current fee multiplier and compute a fee without having knowledge of additional tips and other charges (which will be obtained by the transaction information itself, i.e. the input to the signed extension):&#xD;&#xA; &#xD;&#xA;https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L2031-2041&#xD;&#xA;&#xD;&#xA;Finally, &#xD;&#xA;The actual fee is deducted using a CurrencyAdapter type that is specified at the runtime configuration.&#xD;&#xA;```rust&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22412" PostHistoryTypeId="2" PostId="5861" RevisionGUID="3efd0eca-907e-435a-aba9-1714a3df57b2" CreationDate="2022-11-12T19:30:00.320" UserId="3142" Text="I want to add logging to Substrate but use the substrate node template to test against my custom build of Substrate.  What's the easiest/fastest way to accomplish this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22414" PostHistoryTypeId="1" PostId="5861" RevisionGUID="3efd0eca-907e-435a-aba9-1714a3df57b2" CreationDate="2022-11-12T19:30:00.320" UserId="3142" Text="How to run a custom build of substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22415" PostHistoryTypeId="3" PostId="5861" RevisionGUID="3efd0eca-907e-435a-aba9-1714a3df57b2" CreationDate="2022-11-12T19:30:00.320" UserId="3142" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22416" PostHistoryTypeId="2" PostId="5862" RevisionGUID="1390def8-b90b-40cd-b45e-bb75144872e5" CreationDate="2022-11-12T19:49:10.037" UserId="28" Text="1. Clone the substrate repo: https://github.com/paritytech/substrate&#xD;&#xA;2. Make the changes you want to substrate.&#xD;&#xA;3. Make the changes you want to the substrate node template, which is in the `substrate/bin/node-template/` folder.&#xD;&#xA;4. Compile the node template with `cargo build --release -p node-template`&#xD;&#xA;5. Run the node template with `./target/release/node-template --dev`" ContentLicense="CC BY-SA 4.0" />
  <row Id="22419" PostHistoryTypeId="2" PostId="5863" RevisionGUID="1537ba1d-470a-4c2e-891c-379c0bfe3e54" CreationDate="2022-11-12T20:13:26.003" UserId="28" Text="I dont think the hosted Polkadot JS UI supports Custom RPCs.&#xD;&#xA;&#xD;&#xA;You need to follow the instructions for defining custom RPCs when initializing your own Polkadot JS instance as documented here:&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/docs/api/start/rpc.custom&#xD;&#xA;&#xD;&#xA;&gt; ## Custom definitions&#xD;&#xA;&gt; &#xD;&#xA;&gt; RPCs are exposed as a method on a specific module. This means that&#xD;&#xA;&gt; once available: you can call any rpc via&#xD;&#xA;&gt; `api.rpc.&lt;module&gt;.&lt;method&gt;(...params[])`. For example, you can define&#xD;&#xA;&gt; a `firstModule_testMethod` on the Rust node and if correctly defined&#xD;&#xA;&gt; it will be callable via `api.rpc.firstModule.testMethod(...`). To&#xD;&#xA;&gt; supply custom RPC methods, you provide an `rpc` object on the options&#xD;&#xA;&gt; to the API.&#xD;&#xA;&gt; &#xD;&#xA;&gt; ```js&#xD;&#xA;&gt; ...&#xD;&#xA;&gt; const api = await ApiPromise.create({&#xD;&#xA;&gt;    rpc: {&#xD;&#xA;&gt;     firstModule: {&#xD;&#xA;&gt;       testMethod: {&#xD;&#xA;&gt;         description: 'Just a test method',&#xD;&#xA;&gt;         params: [&#xD;&#xA;&gt;           {&#xD;&#xA;&gt;             name: 'index',&#xD;&#xA;&gt;             type: 'u64'&#xD;&#xA;&gt;           },&#xD;&#xA;&gt;           {&#xD;&#xA;&gt;             name: 'at',&#xD;&#xA;&gt;             type: 'Hash',&#xD;&#xA;&gt;             isOptional: true&#xD;&#xA;&gt;           }&#xD;&#xA;&gt;         ],&#xD;&#xA;&gt;         type: 'Balance'&#xD;&#xA;&gt;       },&#xD;&#xA;&gt;       anotherMethod: { ... },&#xD;&#xA;&gt;       ...&#xD;&#xA;&gt;     },&#xD;&#xA;&gt;     anotherModule: { ... },&#xD;&#xA;&gt;     ...   },&#xD;&#xA;&gt;   ... });&#xD;&#xA;&gt; ```&#xD;&#xA;&gt;&#xD;&#xA;&gt; In the above example we have defined a new method, which is now&#xD;&#xA;&gt; available on the API as `api.rpc.firstModule.testMethod(index: u64,&#xD;&#xA;&gt; at?: Hash) =&gt; Promise&lt;Balance&gt;`. For the optional parameters, we added&#xD;&#xA;&gt; `isOptional: true` alongside the `name` &amp; `type` in the parameter&#xD;&#xA;&gt; definition.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Even if you define the method it will only appear on the API if it&#xD;&#xA;&gt; appears in the list returned by `api.rpc.rpc.methods()`, which is the&#xD;&#xA;&gt; list of known RPCs the node exposes. So when making changes to the&#xD;&#xA;&gt; node you should double-check that it does announce the RPC method and&#xD;&#xA;&gt; that it conforms to the format `&lt;module&gt;_&lt;method&gt;`.  For example&#xD;&#xA;&gt; `foo_bar` is a valid name whereas `bar` is not. I.E. Methods which do&#xD;&#xA;&gt; not contain both a `module` and `method` component won't be detected&#xD;&#xA;&gt; and cannot be decorated. If in doubt, follow the conventions in&#xD;&#xA;&gt; Substrate master." ContentLicense="CC BY-SA 4.0" />
  <row Id="22421" PostHistoryTypeId="5" PostId="5853" RevisionGUID="d5e8b64a-1f3c-40a9-b587-08a9ecbdf957" CreationDate="2022-11-12T21:14:10.057" UserId="29" Comment="added 211 characters in body" Text="There are some resources (and ongoing effort) here:&#xD;&#xA;- https://docs.substrate.io/build/upgrade-the-runtime/#storage-migration&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-docs/issues/163&#xD;&#xA;&#xD;&#xA;Below is a walkthrough of how `pallet-xcm` does a multi-block migration.&#xD;&#xA;&#xD;&#xA;[`pallet-xcm`](https://github.com/paritytech/polkadot/blob/master/xcm/pallet-xcm/src/lib.rs) uses the [`fn on_runtime_upgrade()`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_runtime_upgrade) hook in combination with the [`fn on_initialize()`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_initialize) hook.&#xD;&#xA;&#xD;&#xA;When the runtime is upgraded the `on_runtime_upgrade` hook kicks off the migration:&#xD;&#xA;```rust&#xD;&#xA;fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA;    // Start a migration (this happens before on_initialize so it'll happen later in this&#xD;&#xA;    // block, which should be good enough)...&#xD;&#xA;    CurrentMigration::&lt;T&gt;::put(VersionMigrationStage::default());&#xD;&#xA;    T::DbWeight::get().writes(1)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L451-L456&#xD;&#xA;&#xD;&#xA;Then at the beginning of each block the `on_initialize` sets a 10% block limit and kicks off the migrations in respect to that limit:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn on_initialize(_n: BlockNumberFor&lt;T&gt;) -&gt; Weight {&#xD;&#xA;    let mut weight_used = Weight::zero();&#xD;&#xA;    if let Some(migration) = CurrentMigration::&lt;T&gt;::get() {&#xD;&#xA;        // Consume 10% of block at most&#xD;&#xA;        let max_weight = T::BlockWeights::get().max_block / 10;&#xD;&#xA;        let (w, maybe_migration) = Self::check_xcm_version_change(migration, max_weight);&#xD;&#xA;        CurrentMigration::&lt;T&gt;::set(maybe_migration);&#xD;&#xA;        weight_used.saturating_accrue(w);&#xD;&#xA;    }&#xD;&#xA;    ....&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L419-L450&#xD;&#xA;&#xD;&#xA;The migrations starts (being careful not to exceed max weight -&gt; 10%):&#xD;&#xA;```rust&#xD;&#xA;/// Will always make progress, and will do its best not to use much more than `weight_cutoff`&#xD;&#xA;/// in doing so.&#xD;&#xA;pub(crate) fn check_xcm_version_change(&#xD;&#xA;    mut stage: VersionMigrationStage,&#xD;&#xA;    weight_cutoff: Weight,&#xD;&#xA;) -&gt; (Weight, Option&lt;VersionMigrationStage&gt;) {&#xD;&#xA;    let mut weight_used = Weight::zero();&#xD;&#xA;&#xD;&#xA;    // TODO: Correct weights for the components of this:&#xD;&#xA;    let todo_sv_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vn_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_already_notified_weight: Weight = T::DbWeight::get().reads(1);&#xD;&#xA;    let todo_vnt_notify_weight: Weight = T::DbWeight::get().reads_writes(1, 3);&#xD;&#xA;    let todo_vnt_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_migrate_fail_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_notify_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 3);&#xD;&#xA;&#xD;&#xA;    use VersionMigrationStage::*;&#xD;&#xA;&#xD;&#xA;    if stage == MigrateSupportedVersion {&#xD;&#xA;        // We assume that supported XCM version only ever increases, so just cycle through lower&#xD;&#xA;        // XCM versioned from the current.&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in SupportedVersion::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                if let Ok(new_key) = old_key.into_latest() {&#xD;&#xA;                    SupportedVersion::&lt;T&gt;::insert(XCM_VERSION, new_key, value);&#xD;&#xA;                }&#xD;&#xA;                weight_used.saturating_accrue(todo_sv_migrate_weight);&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = MigrateVersionNotifiers;&#xD;&#xA;    }&#xD;&#xA;    if stage == MigrateVersionNotifiers {&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in VersionNotifiers::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                if let Ok(new_key) = old_key.into_latest() {&#xD;&#xA;                    VersionNotifiers::&lt;T&gt;::insert(XCM_VERSION, new_key, value);&#xD;&#xA;                }&#xD;&#xA;                weight_used.saturating_accrue(todo_vn_migrate_weight);&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = NotifyCurrentTargets(None);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    let xcm_version = T::AdvertisedXcmVersion::get();&#xD;&#xA;&#xD;&#xA;    if let NotifyCurrentTargets(maybe_last_raw_key) = stage {&#xD;&#xA;        let mut iter = match maybe_last_raw_key {&#xD;&#xA;            Some(k) =&gt; VersionNotifyTargets::&lt;T&gt;::iter_prefix_from(XCM_VERSION, k),&#xD;&#xA;            None =&gt; VersionNotifyTargets::&lt;T&gt;::iter_prefix(XCM_VERSION),&#xD;&#xA;        };&#xD;&#xA;        while let Some((key, value)) = iter.next() {&#xD;&#xA;            let (query_id, max_weight, target_xcm_version) = value;&#xD;&#xA;            let new_key: MultiLocation = match key.clone().try_into() {&#xD;&#xA;                Ok(k) if target_xcm_version != xcm_version =&gt; k,&#xD;&#xA;                _ =&gt; {&#xD;&#xA;                    // We don't early return here since we need to be certain that we&#xD;&#xA;                    // make some progress.&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_already_notified_weight);&#xD;&#xA;                    continue&#xD;&#xA;                },&#xD;&#xA;            };&#xD;&#xA;            let response = Response::Version(xcm_version);&#xD;&#xA;            let message = Xcm(vec![QueryResponse { query_id, response, max_weight }]);&#xD;&#xA;            let event = match T::XcmRouter::send_xcm(new_key.clone(), message) {&#xD;&#xA;                Ok(()) =&gt; {&#xD;&#xA;                    let value = (query_id, max_weight, xcm_version);&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::insert(XCM_VERSION, key, value);&#xD;&#xA;                    Event::VersionChangeNotified(new_key, xcm_version)&#xD;&#xA;                },&#xD;&#xA;                Err(e) =&gt; {&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::remove(XCM_VERSION, key);&#xD;&#xA;                    Event::NotifyTargetSendFail(new_key, query_id, e.into())&#xD;&#xA;                },&#xD;&#xA;            };&#xD;&#xA;            Self::deposit_event(event);&#xD;&#xA;            weight_used.saturating_accrue(todo_vnt_notify_weight);&#xD;&#xA;            if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                let last = Some(iter.last_raw_key().into());&#xD;&#xA;                return (weight_used, Some(NotifyCurrentTargets(last)))&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = MigrateAndNotifyOldTargets;&#xD;&#xA;    }&#xD;&#xA;    if stage == MigrateAndNotifyOldTargets {&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in VersionNotifyTargets::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                let (query_id, max_weight, target_xcm_version) = value;&#xD;&#xA;                let new_key = match MultiLocation::try_from(old_key.clone()) {&#xD;&#xA;                    Ok(k) =&gt; k,&#xD;&#xA;                    Err(()) =&gt; {&#xD;&#xA;                        Self::deposit_event(Event::NotifyTargetMigrationFail(&#xD;&#xA;                            old_key, value.0,&#xD;&#xA;                        ));&#xD;&#xA;                        weight_used.saturating_accrue(todo_vnt_migrate_fail_weight);&#xD;&#xA;                        if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                            return (weight_used, Some(stage))&#xD;&#xA;                        }&#xD;&#xA;                        continue&#xD;&#xA;                    },&#xD;&#xA;                };&#xD;&#xA;&#xD;&#xA;                let versioned_key = LatestVersionedMultiLocation(&amp;new_key);&#xD;&#xA;                if target_xcm_version == xcm_version {&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::insert(XCM_VERSION, versioned_key, value);&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_migrate_weight);&#xD;&#xA;                } else {&#xD;&#xA;                    // Need to notify target.&#xD;&#xA;                    let response = Response::Version(xcm_version);&#xD;&#xA;                    let message =&#xD;&#xA;                        Xcm(vec![QueryResponse { query_id, response, max_weight }]);&#xD;&#xA;                    let event = match T::XcmRouter::send_xcm(new_key.clone(), message) {&#xD;&#xA;                        Ok(()) =&gt; {&#xD;&#xA;                            VersionNotifyTargets::&lt;T&gt;::insert(&#xD;&#xA;                                XCM_VERSION,&#xD;&#xA;                                versioned_key,&#xD;&#xA;                                (query_id, max_weight, xcm_version),&#xD;&#xA;                            );&#xD;&#xA;                            Event::VersionChangeNotified(new_key, xcm_version)&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; Event::NotifyTargetSendFail(new_key, query_id, e.into()),&#xD;&#xA;                    };&#xD;&#xA;                    Self::deposit_event(event);&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_notify_migrate_weight);&#xD;&#xA;                }&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    (weight_used, None)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L896-L1034&#xD;&#xA;&#xD;&#xA;The stage of the migration is stored in storage, so that the migration can continue in the next block if needed.&#xD;&#xA;```rust&#xD;&#xA;/// The current migration's stage, if any.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type CurrentMigration&lt;T: Config&gt; =&#xD;&#xA;    StorageValue&lt;_, VersionMigrationStage, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L392-L395" ContentLicense="CC BY-SA 4.0" />
  <row Id="22422" PostHistoryTypeId="4" PostId="5824" RevisionGUID="f1f8d4e9-b7c8-4c56-a074-9fb17fd72302" CreationDate="2022-11-12T21:31:21.153" UserId="139" Comment="Edited question title to be more specific " Text="Why does ImOnline use ValidateUnsigned over SignedExtension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22423" PostHistoryTypeId="5" PostId="5860" RevisionGUID="e6c8ba80-d688-4bae-89c6-bbe129f22f3f" CreationDate="2022-11-12T21:53:59.553" UserId="29" Comment="use permalinks that way when code is updated it still points to the line you want" Text="It handles transaction payments through what is known as Signed Extensions in Substrate. Basically, a signed extension allows you to perform logic that pertains to validating the transaction received from the network/transaction pool, and also allows you to run some logic before and after an extrinsic is executed. The pre-dispatch method is called before a transaction is executed, and the validate method is called to put it in the Transaction Queue.&#xD;&#xA;&#xD;&#xA;In the runtime code you have linked search for the type facilitating this behaviour is :&#xD;&#xA;	`pallet_asset_tx_payment::ChargeAssetTxPayment&lt;Runtime&gt;`&#xD;&#xA;&#xD;&#xA;This is basically validating a transaction and computing the fees that should be charged for a transaction. Of interest are these two methods:&#xD;&#xA;```rust&#xD;&#xA;fn validate(&#xD;&#xA;		&amp;self,&#xD;&#xA;		who: &amp;Self::AccountId,&#xD;&#xA;		call: &amp;Self::Call,&#xD;&#xA;		info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;		len: usize,&#xD;&#xA;	) -&gt; TransactionValidity {&#xD;&#xA;		let (final_fee, _) = self.withdraw_fee(who, call, info, len)?;&#xD;&#xA;		let tip = self.0;&#xD;&#xA;		Ok(ValidTransaction {&#xD;&#xA;			priority: Self::get_priority(info, len, tip, final_fee),&#xD;&#xA;			..Default::default()&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn pre_dispatch(&#xD;&#xA;		self,&#xD;&#xA;		who: &amp;Self::AccountId,&#xD;&#xA;		call: &amp;Self::Call,&#xD;&#xA;		info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;		len: usize,&#xD;&#xA;	) -&gt; Result&lt;Self::Pre, TransactionValidityError&gt; {&#xD;&#xA;		let (_fee, imbalance) = self.withdraw_fee(who, call, info, len)?;&#xD;&#xA;		Ok((self.0, who.clone(), imbalance))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then there is one more piece of the puzzle which is the `query_info` method defined inside the pallet. It is used by the transaction payment runtime api to query for the extrinsic weight, runtime extrinsic base weight and current fee multiplier and compute a fee without having knowledge of additional tips and other charges (which will be obtained by the transaction information itself, i.e. the input to the signed extension):&#xD;&#xA; &#xD;&#xA;https://github.com/paritytech/substrate/blob/e6768a3bd553ddbed12fe1a0e4a2ef8d4f8fdf52/bin/node/runtime/src/lib.rs#L2031-2041&#xD;&#xA;&#xD;&#xA;Finally, &#xD;&#xA;The actual fee is deducted using a CurrencyAdapter type that is specified at the runtime configuration.&#xD;&#xA;```rust&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22424" PostHistoryTypeId="52" PostId="5859" RevisionGUID="84c7101d-1af0-45c0-9677-ae17ffd9112e" CreationDate="2022-11-13T00:30:18.870" />
  <row Id="22425" PostHistoryTypeId="2" PostId="5864" RevisionGUID="6f76193d-7ae8-4236-a30c-24ff19268e51" CreationDate="2022-11-13T06:49:57.647" UserId="3319" Text="I am writing a custom `gRPC` server(not in runtime) and i want to retrieve the public keys of the validators to verify messages signed by them, but i need their public key addresses, how to do that in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22427" PostHistoryTypeId="1" PostId="5864" RevisionGUID="6f76193d-7ae8-4236-a30c-24ff19268e51" CreationDate="2022-11-13T06:49:57.647" UserId="3319" Text="how to retrieve the list of public key addresses of all validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22428" PostHistoryTypeId="3" PostId="5864" RevisionGUID="6f76193d-7ae8-4236-a30c-24ff19268e51" CreationDate="2022-11-13T06:49:57.647" UserId="3319" Text="|validator|account|address|public|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22429" PostHistoryTypeId="5" PostId="5860" RevisionGUID="db85889b-1697-41ff-be15-923a4cf407f0" CreationDate="2022-11-13T09:20:46.493" UserId="139" Comment="added 1 character in body" Text="It handles transaction payments through what is known as Signed Extensions in Substrate. Basically, a signed extension allows you to perform logic that pertains to validating the transaction received from the network/transaction pool, and also allows you to run some logic before and after an extrinsic is executed. The pre-dispatch method is called before a transaction is executed, and the validate method is called to put it in the Transaction Queue.&#xD;&#xA;&#xD;&#xA;In the runtime code you have linked search for the type facilitating this behaviour is :&#xD;&#xA;	`pallet_asset_tx_payment::ChargeAssetTxPayment&lt;Runtime&gt;`&#xD;&#xA;&#xD;&#xA;This is basically validating a transaction and computing the fees that should be charged for a transaction. Of interest are these two methods:&#xD;&#xA;```rust&#xD;&#xA;fn validate(&#xD;&#xA;		&amp;self,&#xD;&#xA;		who: &amp;Self::AccountId,&#xD;&#xA;		call: &amp;Self::Call,&#xD;&#xA;		info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;		len: usize,&#xD;&#xA;	) -&gt; TransactionValidity {&#xD;&#xA;		let (final_fee, _) = self.withdraw_fee(who, call, info, len)?;&#xD;&#xA;		let tip = self.0;&#xD;&#xA;		Ok(ValidTransaction {&#xD;&#xA;			priority: Self::get_priority(info, len, tip, final_fee),&#xD;&#xA;			..Default::default()&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn pre_dispatch(&#xD;&#xA;		self,&#xD;&#xA;		who: &amp;Self::AccountId,&#xD;&#xA;		call: &amp;Self::Call,&#xD;&#xA;		info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;		len: usize,&#xD;&#xA;	) -&gt; Result&lt;Self::Pre, TransactionValidityError&gt; {&#xD;&#xA;		let (_fee, imbalance) = self.withdraw_fee(who, call, info, len)?;&#xD;&#xA;		Ok((self.0, who.clone(), imbalance))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then there is one more piece of the puzzle which is the `query_info` method defined inside the pallet. It is used by the transaction payment runtime api to query for the extrinsic weight, runtime extrinsic base weight and current fee multiplier and compute a fee without having knowledge of additional tips and other charges (which will be obtained by the transaction information itself, i.e. the input to the signed extension):&#xD;&#xA; &#xD;&#xA;https://github.com/paritytech/substrate/blob/e6768a3bd553ddbed12fe1a0e4a2ef8d4f8fdf52/bin/node/runtime/src/lib.rs#L2031-L2041&#xD;&#xA;&#xD;&#xA;Finally, &#xD;&#xA;The actual fee is deducted using a CurrencyAdapter type that is specified at the runtime configuration.&#xD;&#xA;```rust&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22430" PostHistoryTypeId="50" PostId="5064" RevisionGUID="72181e40-d59b-494c-813c-b298a8576a08" CreationDate="2022-11-13T10:04:50.690" UserId="-1" />
  <row Id="22431" PostHistoryTypeId="50" PostId="5341" RevisionGUID="eb283f57-f29d-4ac5-944b-07261dfe33a8" CreationDate="2022-11-13T13:03:05.377" UserId="-1" />
  <row Id="22432" PostHistoryTypeId="2" PostId="5865" RevisionGUID="342b84a9-abe9-426a-ad8c-ab3e73931773" CreationDate="2022-11-13T13:10:23.533" UserId="251" Text="I think you have the session pallet in your runtime.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;PolkadotApps -&gt; chain state -&gt; session -&gt; queuedKeys&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;If you want to do this in code.&#xD;&#xA;&#xD;&#xA;Query the `twox128(b&quot;Session&quot;) + twox128(b&quot;QueuedKeys&quot;)`.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8IzRA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22434" PostHistoryTypeId="2" PostId="5866" RevisionGUID="3a417772-cc7d-47cf-a262-7d78d1a8c14c" CreationDate="2022-11-13T14:05:24.150" UserId="3030" Text="I am currently writing code for the hooks on_initialize and on_idle. They share functionality in the form of 2 methods, each using these methods multiple times. I would like to accurately benchmark these 2 methods to use when calculating and returning the weight in the mentioned hooks.&#xD;&#xA;&#xD;&#xA;Is this the correct method? or should i be benchmarking the hooks themselves with some worst case scenario. In essence i am trying to dynamically set the weight which feels especially like gas metering. To the best of my knowledge this is not supported in standard extrinsic calls, except it seems possible in the hooks.&#xD;&#xA;&#xD;&#xA;If it is the correct method how can i benchmark code that is not an extrinsic (not annotated with #[pallet::call]).&#xD;&#xA;&#xD;&#xA;Preferably i would like to avoid db::reads_writes(x, y) to manually tally weights, is this best practice?&#xD;&#xA;&#xD;&#xA;Here is some sample code to describe what i am trying to do: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; fn on_initialize(_b: T::BlockNumber) -&gt; Weight { &#xD;&#xA;      let mut weight = Weight::default();&#xD;&#xA;      let mut details = Details::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;      Self::do_something_with_details(rf.1, rf.0, rf.2, rf.3);                    &#xD;&#xA;      weight.saturating_add(T::DbWeight::do_something_with_details());&#xD;&#xA;                   &#xD;&#xA;      Self::mutate_details(details, c);&#xD;&#xA;      weight.saturating_add(T::Dbweight::mutate_details());&#xD;&#xA;&#xD;&#xA;      weight&#xD;&#xA; }&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22436" PostHistoryTypeId="1" PostId="5866" RevisionGUID="3a417772-cc7d-47cf-a262-7d78d1a8c14c" CreationDate="2022-11-13T14:05:24.150" UserId="3030" Text="Benchmarking pallet code which is not an extrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="22437" PostHistoryTypeId="3" PostId="5866" RevisionGUID="3a417772-cc7d-47cf-a262-7d78d1a8c14c" CreationDate="2022-11-13T14:05:24.150" UserId="3030" Text="|runtime|benchmarking|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22438" PostHistoryTypeId="5" PostId="5866" RevisionGUID="181fedb3-744e-48c8-bce2-b1c1ac840ff0" CreationDate="2022-11-13T14:06:56.580" UserId="3030" Comment="deleted 15 characters in body" Text="I am currently writing code for the hooks on_initialize and on_idle. They share functionality in the form of 2 methods, each using these methods multiple times. I would like to accurately benchmark these 2 methods to use when calculating and returning the weight in the mentioned hooks.&#xD;&#xA;&#xD;&#xA;Is this the correct method? or should i be benchmarking the hooks themselves with some worst case scenario. In essence i am trying to dynamically set the weight which feels especially like gas metering. To the best of my knowledge this is not supported in standard extrinsic calls, except it seems possible in the hooks.&#xD;&#xA;&#xD;&#xA;If it is the correct method how can i benchmark code that is not an extrinsic (not annotated with #[pallet::call]).&#xD;&#xA;&#xD;&#xA;Preferably i would like to avoid db::reads_writes(x, y) to manually tally weights, is this best practice?&#xD;&#xA;&#xD;&#xA;Here is some sample code to describe what i am trying to do: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; fn on_initialize(_b: T::BlockNumber) -&gt; Weight { &#xD;&#xA;      let mut weight = Weight::default();&#xD;&#xA;      let mut details = Details::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;      Self::do_something_with_details(details);                    &#xD;&#xA;      weight.saturating_add(T::DbWeight::do_something_with_details());&#xD;&#xA;                   &#xD;&#xA;      Self::mutate_details(details, c);&#xD;&#xA;      weight.saturating_add(T::Dbweight::mutate_details());&#xD;&#xA;&#xD;&#xA;      weight&#xD;&#xA; }&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22439" PostHistoryTypeId="52" PostId="5864" RevisionGUID="c8402dd1-0aaa-46e9-ac00-f1a88373329c" CreationDate="2022-11-13T15:44:36.650" />
  <row Id="22440" PostHistoryTypeId="2" PostId="5867" RevisionGUID="01062c14-e016-407d-9e9a-bf5064bafbef" CreationDate="2022-11-13T17:20:59.580" UserId="3254" Text="`Your API has not been initialized correctly and is not connected to a chain`&#xD;&#xA;&#xD;&#xA;the API is successfully connected and return value, but all `ContractPromise` cause this error.&#xD;&#xA;&#xD;&#xA;Anyone know how to solve this?&#xD;&#xA;[![error screenshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uU7X4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22442" PostHistoryTypeId="1" PostId="5867" RevisionGUID="01062c14-e016-407d-9e9a-bf5064bafbef" CreationDate="2022-11-13T17:20:59.580" UserId="3254" Text="connect Polkadot{js} API correctly" ContentLicense="CC BY-SA 4.0" />
  <row Id="22443" PostHistoryTypeId="3" PostId="5867" RevisionGUID="01062c14-e016-407d-9e9a-bf5064bafbef" CreationDate="2022-11-13T17:20:59.580" UserId="3254" Text="|polkadot-js|polkadot|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22444" PostHistoryTypeId="2" PostId="5868" RevisionGUID="d9602326-ef8b-45e5-a032-033aea2c6025" CreationDate="2022-11-13T18:20:33.420" UserId="28" Text="The benchmarking framework supports any arbitrary logic which is written in rust and compiles to Wasm.&#xD;&#xA;&#xD;&#xA;You can see an example of benchmarking directly the `on_initialize` function in the Treasury pallet:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/treasury/src/benchmarking.rs#L130&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;on_initialize_proposals {&#xD;&#xA;	let p in 0 .. T::MaxApprovals::get();&#xD;&#xA;	setup_pot_account::&lt;T, _&gt;();&#xD;&#xA;	create_approved_proposals::&lt;T, _&gt;(p)?;&#xD;&#xA;}: {&#xD;&#xA;	// You can see here we call the `on_initialize` function.&#xD;&#xA;	Treasury::&lt;T, _&gt;::on_initialize(T::BlockNumber::zero());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can write whatever logic you want in those brackets after the setup. For example you can also benchmark hashing functions something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;hashing {&#xD;&#xA;	let i in 0 .. 100;&#xD;&#xA;	let mut hash = T::Hash::default();&#xD;&#xA;}: {&#xD;&#xA;	(0..=100_000u32).for_each(|j| hash = T::Hashing::hash(&amp;j.to_be_bytes()));&#xD;&#xA;} verify {&#xD;&#xA;	assert!(hash != T::Hash::default());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As seen here: https://github.com/paritytech/substrate/blob/master/frame/benchmarking/src/baseline.rs&#xD;&#xA;&#xD;&#xA;Take a look at the documentation here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/benchmarking/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="22446" PostHistoryTypeId="2" PostId="5869" RevisionGUID="a6c89995-3b1b-4c8a-b89b-83ea4bddad44" CreationDate="2022-11-13T19:01:06.233" UserId="73" Text="`SignedExtension` currently can not be used as a replacement for `ValidateUnsigned`. This has historical reasons, `ValidateUnsigned` was added before `SignedExtension`. There is an [issue][1] to merge both of them. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/4419" ContentLicense="CC BY-SA 4.0" />
  <row Id="22448" PostHistoryTypeId="2" PostId="5870" RevisionGUID="940ce6b1-aa9d-48cb-83e8-a727713b1bc5" CreationDate="2022-11-14T01:00:17.357" UserId="3142" Text="Invalid transactions are dropped.  The only exception is if it is too large for the block and in that case is sent back to the verifying queue.  They are only placed in the Future queue if the nonce on the transaction is greater than the nonce on the account that sent it." ContentLicense="CC BY-SA 4.0" />
  <row Id="22450" PostHistoryTypeId="2" PostId="5871" RevisionGUID="4b365c51-89fa-4df1-8012-ed5ea354665b" CreationDate="2022-11-14T04:40:34.363" UserId="1947" Text="Contract A has a Payable Method and contract B has ContractRef of A saved in storage. I can call other methods on Contract A but not sure how to call the payable method from Contract B.&#xD;&#xA;Tried with call builder as well like this :&#xD;&#xA;```     build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                               .call_type(&#xD;&#xA;                                Call::new()&#xD;&#xA;                                    .callee(contractBRef.get_account())&#xD;&#xA;                                    .gas_limit(0)&#xD;&#xA;                                   .transferred_value(amount))&#xD;&#xA;                        .exec_input(&#xD;&#xA;                         ExecutionInput::new(Selector::new([0xDE, 0xAD, 0xBE, 0xEF]))&#xD;&#xA;                                 .push_arg::&lt;AccountId&gt;(candidate)&#xD;&#xA;                                 .push_arg::&lt;u128&gt;(0)&#xD;&#xA;                                 .push_arg::&lt;u128&gt;(amount)&#xD;&#xA;                                 .push_arg::&lt;u128&gt;(0)&#xD;&#xA;                                 .push_arg::&lt;u128&gt;(100)&#xD;&#xA;                         ).call_flags(CallFlags::default()).returns::&lt;Result&lt;()&gt;&gt;().unwrap()&#xD;&#xA;But the call is returning CalleeTrapped Error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22452" PostHistoryTypeId="1" PostId="5871" RevisionGUID="4b365c51-89fa-4df1-8012-ed5ea354665b" CreationDate="2022-11-14T04:40:34.363" UserId="1947" Text="How can we make a cross contract call to a payable message from parent contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22453" PostHistoryTypeId="3" PostId="5871" RevisionGUID="4b365c51-89fa-4df1-8012-ed5ea354665b" CreationDate="2022-11-14T04:40:34.363" UserId="1947" Text="|ink|substrate-contracts-node|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22454" PostHistoryTypeId="2" PostId="5872" RevisionGUID="094ac5a4-fbc9-4225-8a24-36c05f7043da" CreationDate="2022-11-14T06:02:39.413" UserId="2140" Text="Inside final_checks(header: &amp;System::Header) method &#xD;&#xA;&#xD;&#xA;    fn final_checks() {&#xD;&#xA;        let new_header = &lt;frame_system::Pallet::&lt;System&gt;&gt;::finalize();&#xD;&#xA;        ...&#xD;&#xA;        let storage_root = new_header.state_root();&#xD;&#xA;        assert!(header.state_root() == storage_root, &quot;Storage root must match that..);&#xD;&#xA;        ... &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I am not sure why `header.state_root()` and `storage_root` should be equal. As far as I know, final_checks() are called right after all extrinsincs are executed, which could change the state of the Storage and leads to change of state_root. What am I missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22456" PostHistoryTypeId="1" PostId="5872" RevisionGUID="094ac5a4-fbc9-4225-8a24-36c05f7043da" CreationDate="2022-11-14T06:02:39.413" UserId="2140" Text="final_checks() on Executive module" ContentLicense="CC BY-SA 4.0" />
  <row Id="22457" PostHistoryTypeId="3" PostId="5872" RevisionGUID="094ac5a4-fbc9-4225-8a24-36c05f7043da" CreationDate="2022-11-14T06:02:39.413" UserId="2140" Text="|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22458" PostHistoryTypeId="2" PostId="5873" RevisionGUID="5e219572-9d82-4c16-8350-e8c74b0fcfb7" CreationDate="2022-11-14T08:07:17.940" UserId="125" Text="I noticed that the `OnTimestampSet` differs in the parachains and solo chains. This config must be set in the solo chain as `Aura` or `Babe`. But in parachain, `()` is okay.&#xD;&#xA;&#xD;&#xA;In Cumulus:&#xD;&#xA;```rs&#xD;&#xA;impl pallet_timestamp::Config for Runtime {&#xD;&#xA;	/// A timestamp: milliseconds since the unix epoch.&#xD;&#xA;	type Moment = u64;&#xD;&#xA;	type OnTimestampSet = ();   // here&#xD;&#xA;	type MinimumPeriod = MinimumPeriod;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In substrate-note-template:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl pallet_timestamp::Config for Runtime {&#xD;&#xA;	/// A timestamp: milliseconds since the unix epoch.&#xD;&#xA;	type Moment = u64;&#xD;&#xA;	type OnTimestampSet = Aura;  // here&#xD;&#xA;	type MinimumPeriod = ConstU64&lt;{ SLOT_DURATION / 2 }&gt;;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From the docs in the pallet-timestamp:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Set the current time.&#xD;&#xA;///&#xD;&#xA;/// This call should be invoked exactly once per block. It will panic at the finalization&#xD;&#xA;/// phase, if this call hasn't been invoked by that time.&#xD;&#xA;///&#xD;&#xA;/// The timestamp should be greater than the previous one by the amount specified by&#xD;&#xA;/// `MinimumPeriod`.&#xD;&#xA;///&#xD;&#xA;pub fn set(origin: OriginFor&lt;T&gt;, #[pallet::compact] now: T::Moment) -&gt; DispatchResult {...}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What make this difference?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22460" PostHistoryTypeId="1" PostId="5873" RevisionGUID="5e219572-9d82-4c16-8350-e8c74b0fcfb7" CreationDate="2022-11-14T08:07:17.940" UserId="125" Text="Different `OnTimestampSet` config for solo and para chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="22461" PostHistoryTypeId="3" PostId="5873" RevisionGUID="5e219572-9d82-4c16-8350-e8c74b0fcfb7" CreationDate="2022-11-14T08:07:17.940" UserId="125" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22462" PostHistoryTypeId="2" PostId="5874" RevisionGUID="00c8c8ad-ff91-41fe-9b71-5997f4c45e84" CreationDate="2022-11-14T08:50:24.767" UserId="2673" Text="I believe you need to implement `PackedAllocate` manually for your `Proposal` struct. An example from [the ink! docs](https://use.ink/ink-vs-solidity/#nested-mappings--custom--advanced-structures) how to do this:&#xD;&#xA;```rust&#xD;&#xA;    impl ink_storage::traits::PackedAllocate for Proposal {&#xD;&#xA;        fn allocate_packed(&amp;mut self, at: &amp;Key){&#xD;&#xA;            PackedAllocate::allocate_packed(&amp;mut *self, at)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22464" PostHistoryTypeId="2" PostId="5875" RevisionGUID="38104d9f-ba1d-4337-b96f-788dedd0db58" CreationDate="2022-11-14T08:53:12.210" UserId="1959" Text="It may be related to parachain consensus, you could get more info from [here](&#xD;&#xA;https://wiki.polkadot.network/docs/learn-parachains#what-is-parachain-consensus)." ContentLicense="CC BY-SA 4.0" />
  <row Id="22466" PostHistoryTypeId="2" PostId="5876" RevisionGUID="fd540c81-a43c-475d-9c4e-8d7eb9a58a5c" CreationDate="2022-11-14T08:59:32.910" UserId="3122" Text="I am working on Substrate-based node update.&#xD;&#xA;&#xD;&#xA;After updating from polkadot-v0.9.10 to polkadot-v0.9.11, Council and Technical committee accounts disappeared from the blockchain state.&#xD;&#xA;&#xD;&#xA;Additional info:&#xD;&#xA;&#xD;&#xA;1. [Blockchain state before the update](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/0bc27e05-2f83-4506-96a7-92c1403eb2e1/previous_state_block_3585_to_3588_1667916101728.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&amp;X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20221111%2Fus-west-2%2Fs3%2Faws4_request&amp;X-Amz-Date=20221111T135725Z&amp;X-Amz-Expires=86400&amp;X-Amz-Signature=331703dc866b289a820a28fffd68fc66faa40e153b85d7b29b66f72796bb9f5d&amp;X-Amz-SignedHeaders=host&amp;response-content-disposition=filename%3D%22previous_state_block_3585_to_3588_1667916101728.json%22&amp;x-id=GetObject), collected with our internal tool.&#xD;&#xA;2. [Blockchain State after the update](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/1d7fb8dc-55f4-4365-be12-50156c7219d9/previous_state_block_3594_to_3597_1667916155593.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&amp;X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20221111%2Fus-west-2%2Fs3%2Faws4_request&amp;X-Amz-Date=20221111T135746Z&amp;X-Amz-Expires=86400&amp;X-Amz-Signature=1bb2ca76dd1168f7650fa68bd182bed2c95d0cca846907ab1ffeae8e53d2adc6&amp;X-Amz-SignedHeaders=host&amp;response-content-disposition=filename%3D%22previous_state_block_3594_to_3597_1667916155593.json%22&amp;x-id=GetObject)&#xD;&#xA;3. [Blockchain State diff](https://www.diffchecker.com/hEcdRUtV/)&#xD;&#xA;4. Note that not only Council and Technical committee disappeared but also some fields of  proposalsData has been renamed.&#xD;&#xA;5. [Link](https://github.com/Cerebellum-Network/pos-network-node/pull/161) to my PR with the update. Basically it’s pretty match the same as the original polkadot-v0.9.11 branch.&#xD;&#xA;6. I’ve [Compared v0.9.10 and v0.9.11 tags](https://github.com/paritytech/polkadot/compare/v0.9.10...v0.9.11) in Polkadot repo and found a relevant [PR](https://github.com/paritytech/polkadot/pull/3511) &#xD;&#xA;7. Haven’t found anything relevant between [v0.9.10 and v0.9.11](https://github.com/paritytech/substrate/compare/polkadot-v0.9.10...polkadot-v0.9.11) in Substrate repo.&#xD;&#xA;8. Found several migrations in v0.9.11 for `staking`, `contracts`, `frame_system` `vesting` but it doesn’t seems like it could affect the governance.&#xD;&#xA;&#xD;&#xA;Any ideas:	&#xD;&#xA;&#xD;&#xA;1. Why Council and Technical committee could disappear?&#xD;&#xA;&#xD;&#xA;3. How can I fix the disappearance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22468" PostHistoryTypeId="1" PostId="5876" RevisionGUID="fd540c81-a43c-475d-9c4e-8d7eb9a58a5c" CreationDate="2022-11-14T08:59:32.910" UserId="3122" Text="Council and Technical committee accounts disappeared after runtime update" ContentLicense="CC BY-SA 4.0" />
  <row Id="22469" PostHistoryTypeId="3" PostId="5876" RevisionGUID="fd540c81-a43c-475d-9c4e-8d7eb9a58a5c" CreationDate="2022-11-14T08:59:32.910" UserId="3122" Text="|runtime-upgrade|governance|council|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22470" PostHistoryTypeId="5" PostId="5876" RevisionGUID="67bfdd46-afb0-494c-ad2f-66cdcb5b7f83" CreationDate="2022-11-14T09:06:51.913" UserId="3122" Comment="Added links; edited body" Text="I am working on Substrate-based node update.&#xD;&#xA;&#xD;&#xA;After updating from [polkadot-v0.9.10](https://github.com/paritytech/substrate/tree/polkadot-v0.9.10) to [polkadot-v0.9.11](https://github.com/paritytech/substrate/tree/polkadot-v0.9.11), Council and Technical committee accounts disappeared from the blockchain state.&#xD;&#xA;&#xD;&#xA;Additional info:&#xD;&#xA;&#xD;&#xA;1. [Blockchain state before the update](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/0bc27e05-2f83-4506-96a7-92c1403eb2e1/previous_state_block_3585_to_3588_1667916101728.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&amp;X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20221111%2Fus-west-2%2Fs3%2Faws4_request&amp;X-Amz-Date=20221111T135725Z&amp;X-Amz-Expires=86400&amp;X-Amz-Signature=331703dc866b289a820a28fffd68fc66faa40e153b85d7b29b66f72796bb9f5d&amp;X-Amz-SignedHeaders=host&amp;response-content-disposition=filename%3D%22previous_state_block_3585_to_3588_1667916101728.json%22&amp;x-id=GetObject), collected with our internal tool.&#xD;&#xA;2. [Blockchain State after the update](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/1d7fb8dc-55f4-4365-be12-50156c7219d9/previous_state_block_3594_to_3597_1667916155593.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&amp;X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20221111%2Fus-west-2%2Fs3%2Faws4_request&amp;X-Amz-Date=20221111T135746Z&amp;X-Amz-Expires=86400&amp;X-Amz-Signature=1bb2ca76dd1168f7650fa68bd182bed2c95d0cca846907ab1ffeae8e53d2adc6&amp;X-Amz-SignedHeaders=host&amp;response-content-disposition=filename%3D%22previous_state_block_3594_to_3597_1667916155593.json%22&amp;x-id=GetObject)&#xD;&#xA;3. [Blockchain State diff](https://www.diffchecker.com/hEcdRUtV/)&#xD;&#xA;4. Note that not only Council and Technical committee accounts disappeared but also some fields of  proposalsData has been renamed.&#xD;&#xA;5. [Link](https://github.com/Cerebellum-Network/pos-network-node/pull/161) to my PR with the update. Basically it’s pretty match the same as the original polkadot-v0.9.11 branch.&#xD;&#xA;6. I’ve сompared v0.9.10 and v0.9.11 tags in Polkadot repo and found a relevant [PR](https://github.com/paritytech/polkadot/pull/3511) &#xD;&#xA;7. Haven’t found anything relevant between [v0.9.10 and v0.9.11](https://github.com/paritytech/substrate/compare/polkadot-v0.9.10...polkadot-v0.9.11) in Substrate repo.&#xD;&#xA;8. Found several migrations in v0.9.11 for `staking`, `contracts`, `frame_system` `vesting` but it doesn’t seems like it could affect the governance.&#xD;&#xA;&#xD;&#xA;Any ideas:	&#xD;&#xA;&#xD;&#xA;1. Why Council and Technical committee accounts could disappear?&#xD;&#xA;&#xD;&#xA;3. How can I fix the disappearance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22471" PostHistoryTypeId="5" PostId="5876" RevisionGUID="fbd6e8bd-f3b2-49a1-847e-d2b9e35326ec" CreationDate="2022-11-14T09:15:20.627" UserId="3122" Comment="edited body" Text="I am working on Substrate-based node update.&#xD;&#xA;&#xD;&#xA;After updating from [polkadot-v0.9.10](https://github.com/paritytech/substrate/tree/polkadot-v0.9.10) to [polkadot-v0.9.11](https://github.com/paritytech/substrate/tree/polkadot-v0.9.11), Council and Technical committee accounts disappeared from the blockchain state.&#xD;&#xA;&#xD;&#xA;Additional info:&#xD;&#xA;&#xD;&#xA;1. [Blockchain state before the update](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/0bc27e05-2f83-4506-96a7-92c1403eb2e1/previous_state_block_3585_to_3588_1667916101728.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&amp;X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20221114%2Fus-west-2%2Fs3%2Faws4_request&amp;X-Amz-Date=20221114T091447Z&amp;X-Amz-Expires=86400&amp;X-Amz-Signature=b0938aa75d8a34b4f96c3d50af7375c346777980f97034eace4514ca66e856ef&amp;X-Amz-SignedHeaders=host&amp;response-content-disposition=filename%3D%22previous_state_block_3585_to_3588_1667916101728.json%22&amp;x-id=GetObject), collected with our internal tool.&#xD;&#xA;2. [Blockchain State after the update](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/1d7fb8dc-55f4-4365-be12-50156c7219d9/previous_state_block_3594_to_3597_1667916155593.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&amp;X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20221114%2Fus-west-2%2Fs3%2Faws4_request&amp;X-Amz-Date=20221114T091309Z&amp;X-Amz-Expires=86400&amp;X-Amz-Signature=02a64262b65b9f13b44c1ef00cb1f627c9418f4f985e17dd8417b03959b876c1&amp;X-Amz-SignedHeaders=host&amp;response-content-disposition=filename%3D%22previous_state_block_3594_to_3597_1667916155593.json%22&amp;x-id=GetObject)&#xD;&#xA;3. [Blockchain State diff](https://www.diffchecker.com/hEcdRUtV/)&#xD;&#xA;4. Note that not only Council and Technical committee accounts disappeared but also some fields of  proposalsData has been renamed.&#xD;&#xA;5. [Link](https://github.com/Cerebellum-Network/pos-network-node/pull/161) to my PR with the update. Basically it’s pretty match the same as the original polkadot-v0.9.11 branch.&#xD;&#xA;6. I’ve сompared v0.9.10 and v0.9.11 tags in Polkadot repo and found a relevant [PR](https://github.com/paritytech/polkadot/pull/3511) &#xD;&#xA;7. Haven’t found anything relevant between [v0.9.10 and v0.9.11](https://github.com/paritytech/substrate/compare/polkadot-v0.9.10...polkadot-v0.9.11) in Substrate repo.&#xD;&#xA;8. Found several migrations in v0.9.11 for `staking`, `contracts`, `frame_system` `vesting` but it doesn’t seems like it could affect the governance.&#xD;&#xA;&#xD;&#xA;Any ideas:	&#xD;&#xA;&#xD;&#xA;1. Why Council and Technical committee accounts could disappear?&#xD;&#xA;&#xD;&#xA;3. How can I fix the disappearance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22472" PostHistoryTypeId="5" PostId="5875" RevisionGUID="7eb54c2a-8efb-4c54-8db6-a50a4ff9180d" CreationDate="2022-11-14T09:16:47.937" UserId="1959" Comment="added 231 characters in body" Text="It may be related to &quot;How parachains produce block&quot;, you could get more info from [polkadot wiki](&#xD;&#xA;https://wiki.polkadot.network/docs/learn-parachains#what-is-parachain-consensus) and [the path of a parachain block](https://polkadot.network/blog/the-path-of-a-parachain-block/). &#xD;&#xA;&#xD;&#xA;Aura primarily provides block authoring in solo chains, but in parachains, block producer is **collator**.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22473" PostHistoryTypeId="2" PostId="5877" RevisionGUID="27cb90fc-b93d-4e92-a1ab-b499f6a75728" CreationDate="2022-11-14T09:35:26.533" UserId="3438" Text="When I need to get the timestamp of a block, I usually look for the timestamp(set) extrinsic in the block, But I realised that the older blocks(between #1 - #305203) in statemint don't seem to have the timestamp(set) extrinsic. I have 2 questions about these:&#xD;&#xA;&#xD;&#xA;Why is the extrinsic missing?&#xD;&#xA;&#xD;&#xA;Without the extrinsic, how can I deduce the timestamp of these blocks?&#xD;&#xA;&#xD;&#xA;For reference here is the [subscan][1] link for one of the blocks with missing extrinsic&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://statemint.subscan.io/block/305203" ContentLicense="CC BY-SA 4.0" />
  <row Id="22475" PostHistoryTypeId="1" PostId="5877" RevisionGUID="27cb90fc-b93d-4e92-a1ab-b499f6a75728" CreationDate="2022-11-14T09:35:26.533" UserId="3438" Text="Missing timestamp(set) extrinsic for older blocks of statemint" ContentLicense="CC BY-SA 4.0" />
  <row Id="22476" PostHistoryTypeId="3" PostId="5877" RevisionGUID="27cb90fc-b93d-4e92-a1ab-b499f6a75728" CreationDate="2022-11-14T09:35:26.533" UserId="3438" Text="|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22477" PostHistoryTypeId="2" PostId="5878" RevisionGUID="1ff5a4ea-569e-4440-9d6c-27f54cce021b" CreationDate="2022-11-14T09:47:25.073" UserId="1947" Text="Using export-blocks command we can export parachain blocks but when trying to export relay chain blocks we received error field RelaychainSpec not found. Is there a way to take snapshot of a parachain efficiently?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22479" PostHistoryTypeId="1" PostId="5878" RevisionGUID="1ff5a4ea-569e-4440-9d6c-27f54cce021b" CreationDate="2022-11-14T09:47:25.073" UserId="1947" Text="Is there a way to start an archive node of a parachain using snapshots? How can we export/ import relaychain blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22480" PostHistoryTypeId="3" PostId="5878" RevisionGUID="1ff5a4ea-569e-4440-9d6c-27f54cce021b" CreationDate="2022-11-14T09:47:25.073" UserId="1947" Text="|parachain|parachain-collator|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22481" PostHistoryTypeId="5" PostId="5839" RevisionGUID="a4ea568a-f41c-4d9f-9256-74daf8791dc2" CreationDate="2022-11-14T10:19:12.560" UserId="2192" Comment="added 941 characters in body" Text="Is there any way to tell the `construct_runtime!` macro to build/export a top-level `Error` enum type in the same way it provides the top-level `Call` and `Event` types?&#xD;&#xA;&#xD;&#xA;As far as I can tell the only way to decode an Error retrieved from the runtime is to use the Metadata (which is a little cumbersome). &#xD;&#xA;&#xD;&#xA;It would be nice if it was possible to do something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;match dispatch_error {&#xD;&#xA;    DispatchError::ModuleError(module_error) =&gt; RuntimeError::from(module_error),&#xD;&#xA;    _ =&gt; // do something else&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A concrete use case for this would be a client that wants to submit and watch an extrinsic, and be able to show the user a useful error message. &#xD;&#xA;&#xD;&#xA;Pseudo-code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Imagine we have a top-level runtime::Error type.&#xD;&#xA;fn submit_and_watch(ex: Extrinsic) -&gt; Result&lt;Vec&lt;runtime::Event&gt;, runtime::Error&gt; {&#xD;&#xA;    let ex_hash = author.submitExtrinsic(ex);&#xD;&#xA;    let ex_events = get_extrinsic_events(ex_hash);&#xD;&#xA;&#xD;&#xA;    if let Some(ex_failed) = ex_events.find(|e| matches!(e, System::ExtrinsicFailed { .. })) {&#xD;&#xA;        // Can't convert to string because `dispatch_error` erases&#xD;&#xA;        // the error message.&#xD;&#xA;        // Retrieving the error message currently requires (i think?)&#xD;&#xA;        // parsing the metadata.&#xD;&#xA;        // If we had a top-level Error type with associated conversion&#xD;&#xA;        // traits, we could do it like this:&#xD;&#xA;        Err(runtime::Error::from(ex_failed.dispatch_error))&#xD;&#xA;    } else {&#xD;&#xA;        Ok(ex_events)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22482" PostHistoryTypeId="2" PostId="5879" RevisionGUID="33fe1910-ed69-4af7-9d51-b4a263f69e36" CreationDate="2022-11-14T10:23:50.680" UserId="251" Text="So, why not use [`DispatchError`](https://paritytech.github.io/substrate/master/frame_support/dispatch/enum.DispatchError.html)?&#xD;&#xA;&#xD;&#xA;I think this could provide enough information for users." ContentLicense="CC BY-SA 4.0" />
  <row Id="22484" PostHistoryTypeId="2" PostId="5880" RevisionGUID="b37e6702-0b10-42dc-8cb2-f1050d98daa5" CreationDate="2022-11-14T10:24:56.633" UserId="2762" Text="Following [your code][1] you shared with me in this [question][2] I can see there is an issue with the initialisation of the api variable you are using.&#xD;&#xA;&#xD;&#xA;In the useEffect() of your Main.js file you are using the variable api.&#xD;&#xA;&#xD;&#xA;    const getToken1Contract = new ContractPromise(api, PSP22_ABI, address0)&#xD;&#xA;&#xD;&#xA;You initialize it in the TransactionContext.js file in the method connectWallet()&#xD;&#xA;&#xD;&#xA;    const api = await ApiPromise.create({ provider })&#xD;&#xA;    setapi(api)&#xD;&#xA;&#xD;&#xA;But the issue here is that when app is rendering is trying to access this api variable before the connectWallet() is executed.&#xD;&#xA;&#xD;&#xA;You can do that in the setup in Main.js:&#xD;&#xA;&#xD;&#xA;     const provider = new WsProvider(WS_PROVIDER)&#xD;&#xA;     const api = await ApiPromise.create({ provider })&#xD;&#xA;     setapi(api)&#xD;&#xA;&#xD;&#xA;Or check that the api variable is initialised it before used and show a message to connect the wallet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Interoperable-swap/frontend/tree/develop/interface&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/5841/unable-to-decode-contract-event-unable-to-find-event" ContentLicense="CC BY-SA 4.0" />
  <row Id="22486" PostHistoryTypeId="5" PostId="5839" RevisionGUID="f8c1054d-f41b-4c1f-8f99-ae01c17eb33d" CreationDate="2022-11-14T10:27:27.573" UserId="2192" Comment="added 167 characters in body" Text="Is there any way to tell the `construct_runtime!` macro to build/export a top-level `Error` enum type in the same way it provides the top-level `Call` and `Event` types?&#xD;&#xA;&#xD;&#xA;As far as I can tell the only way to decode an Error retrieved from the runtime is to use the Metadata (which is a little cumbersome), since the inner ModuleError [erases the error message](https://paritytech.github.io/substrate/master/src/sp_runtime/lib.rs.html#485-487) - presumably to save storage. &#xD;&#xA;&#xD;&#xA;It would be nice if it was possible to do something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;match dispatch_error {&#xD;&#xA;    DispatchError::ModuleError(module_error) =&gt; RuntimeError::from(module_error),&#xD;&#xA;    _ =&gt; // do something else&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A concrete use case for this would be a client that wants to submit and watch an extrinsic, and be able to show the user a useful error message. &#xD;&#xA;&#xD;&#xA;Pseudo-code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Imagine we have a top-level runtime::Error type.&#xD;&#xA;fn submit_and_watch(ex: Extrinsic) -&gt; Result&lt;Vec&lt;runtime::Event&gt;, runtime::Error&gt; {&#xD;&#xA;    let ex_hash = author.submitExtrinsic(ex);&#xD;&#xA;    let ex_events = get_extrinsic_events(ex_hash);&#xD;&#xA;&#xD;&#xA;    if let Some(ex_failed) = ex_events.find(|e| matches!(e, System::ExtrinsicFailed { .. })) {&#xD;&#xA;        // Can't convert to string because `dispatch_error` erases&#xD;&#xA;        // the error message.&#xD;&#xA;        // Retrieving the error message currently requires (i think?)&#xD;&#xA;        // parsing the metadata.&#xD;&#xA;        // If we had a top-level Error type with associated conversion&#xD;&#xA;        // traits, we could do it like this:&#xD;&#xA;        Err(runtime::Error::from(ex_failed.dispatch_error))&#xD;&#xA;    } else {&#xD;&#xA;        Ok(ex_events)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22487" PostHistoryTypeId="2" PostId="5881" RevisionGUID="5a4528c6-424a-4bda-b9cf-31aeef98d7aa" CreationDate="2022-11-14T10:34:34.047" UserId="251" Text="You missed this one.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/9115&#xD;&#xA;&#xD;&#xA;Please check the `v0.9.10...v0.9.11` carefully.&#xD;&#xA;&#xD;&#xA;You could click the file changes and search `frame/collective`." ContentLicense="CC BY-SA 4.0" />
  <row Id="22489" PostHistoryTypeId="2" PostId="5882" RevisionGUID="806be9c9-997c-49c5-854f-f069fbeaae4c" CreationDate="2022-11-14T10:50:56.597" UserId="3440" Text="While connecting to substrate node gives the following error &#xD;&#xA;```You need to connect to a chain with a runtime that supports contracts```&#xD;&#xA;&#xD;&#xA;I have started the substrte node using ```  ./target/release/node-template --dev ```&#xD;&#xA;and strted the front-end using ```yarn start```&#xD;&#xA;&#xD;&#xA;THe code executed is &#xD;&#xA;```&#xD;&#xA;import fs from &quot;fs&quot;;&#xD;&#xA;import { create } from 'ipfs-http-client';&#xD;&#xA;&#xD;&#xA;import { ContractPromise } from '@polkadot/api-contract';&#xD;&#xA;import { Keyring } from '@polkadot/api';&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const metadata = JSON.parse(fs.readFileSync('./metadata.json'));&#xD;&#xA;&#xD;&#xA;main()&#xD;&#xA;async function main() {&#xD;&#xA;    const wsProvider = new WsProvider('ws://localhost:9944');&#xD;&#xA;   &#xD;&#xA;    const api = await ApiPromise.create({provider:wsProvider});&#xD;&#xA;    console.log(wsProvider.isConnected); // to check whether connected or not&#xD;&#xA;    console.log(api.isConnected);&#xD;&#xA;&#xD;&#xA;    const address = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';&#xD;&#xA;    const contract = new ContractPromise(api,metadata, address);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Executing the above doce gives output with error&#xD;&#xA;```&#xD;&#xA;true&#xD;&#xA;true&#xD;&#xA;file:///Users/123/Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Base.js:14&#xD;&#xA;      throw new Error('You need to connect to a chain with a runtime that supports contracts');&#xD;&#xA;            ^&#xD;&#xA;&#xD;&#xA;Error: You need to connect to a chain with a runtime that supports contracts&#xD;&#xA;    at new Base (file:///Users/123/Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Base.js:14:13)&#xD;&#xA;    at new Contract (file:///Users/123/Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Contract.js:37:5)&#xD;&#xA;    at new ContractPromise (file:///Users/123/Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/promise/index.js:19:5)&#xD;&#xA;    at main (file:///Users/123/Documents/Study%20related/Learning-JS/ipfs_ink/index_1.js:31:22)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Though i am running the node i am not sure whether i miss anything&#xD;&#xA;&#xD;&#xA;Please help" ContentLicense="CC BY-SA 4.0" />
  <row Id="22491" PostHistoryTypeId="1" PostId="5882" RevisionGUID="806be9c9-997c-49c5-854f-f069fbeaae4c" CreationDate="2022-11-14T10:50:56.597" UserId="3440" Text="'You need to connect to a chain with a runtime that supports contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="22492" PostHistoryTypeId="3" PostId="5882" RevisionGUID="806be9c9-997c-49c5-854f-f069fbeaae4c" CreationDate="2022-11-14T10:50:56.597" UserId="3440" Text="|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22493" PostHistoryTypeId="2" PostId="5883" RevisionGUID="3ed61afe-2200-48b0-adfc-7f97751a469e" CreationDate="2022-11-14T11:57:40.403" UserId="2762" Text="You are probably running the [Substrate Node Template][1], and it is not supporting Smart Contracts by default.&#xD;&#xA;&#xD;&#xA;In order to have the Smart Contracts to functionality in your node you must install the [Contacts pallet][2].&#xD;&#xA;&#xD;&#xA;Check how to do it in this [How-to-guide][3], or use the [substrate-contracts-node][4].&#xD;&#xA;&#xD;&#xA;[This tutorial][5] demonstrates how to build a basic smart contract to run on a Substrate-based chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/frame/contracts&#xD;&#xA;  [3]: https://docs.substrate.io/reference/how-to-guides/pallet-design/add-contracts-pallet/&#xD;&#xA;  [4]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [5]: https://docs.substrate.io/tutorials/smart-contracts/prepare-your-first-contract/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22495" PostHistoryTypeId="5" PostId="5866" RevisionGUID="a87b8983-5e9f-40df-9cdd-0e5a792221bb" CreationDate="2022-11-14T12:36:37.117" UserId="2673" Comment="syntax highlighting" Text="I am currently writing code for the hooks `on_initialize` and `on_idle`. They share functionality in the form of 2 methods, each using these methods multiple times. I would like to accurately benchmark these 2 methods to use when calculating and returning the weight in the mentioned hooks.&#xD;&#xA;&#xD;&#xA;Is this the correct method? or should i be benchmarking the hooks themselves with some worst case scenario. In essence i am trying to dynamically set the weight which feels especially like gas metering. To the best of my knowledge this is not supported in standard extrinsic calls, except it seems possible in the hooks.&#xD;&#xA;&#xD;&#xA;If it is the correct method how can i benchmark code that is not an extrinsic (not annotated with `#[pallet::call]`).&#xD;&#xA;&#xD;&#xA;Preferably i would like to avoid `db::reads_writes(x, y)` to manually tally weights, is this best practice?&#xD;&#xA;&#xD;&#xA;Here is some sample code to describe what i am trying to do: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA; fn on_initialize(_b: T::BlockNumber) -&gt; Weight { &#xD;&#xA;      let mut weight = Weight::default();&#xD;&#xA;      let mut details = Details::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;      Self::do_something_with_details(details);                    &#xD;&#xA;      weight.saturating_add(T::DbWeight::do_something_with_details());&#xD;&#xA;                   &#xD;&#xA;      Self::mutate_details(details, c);&#xD;&#xA;      weight.saturating_add(T::Dbweight::mutate_details());&#xD;&#xA;&#xD;&#xA;      weight&#xD;&#xA; }&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22496" PostHistoryTypeId="24" PostId="5866" RevisionGUID="a87b8983-5e9f-40df-9cdd-0e5a792221bb" CreationDate="2022-11-14T12:36:37.117" Comment="Proposed by 2673 approved by -1 edit id of 339" ContentLicense="CC BY-SA 4.0" />
  <row Id="22497" PostHistoryTypeId="5" PostId="5866" RevisionGUID="743e9014-437f-4aee-9e95-d42a72e7a35b" CreationDate="2022-11-14T12:36:37.117" UserId="3030" Comment="syntax highlighting" Text="I am currently writing code for the hooks `on_initialize` and `on_idle`. They share functionality in the form of 2 methods, each using these methods multiple times. I would like to accurately benchmark these 2 methods to use when calculating and returning the weight in the mentioned hooks.&#xD;&#xA;&#xD;&#xA;Is this the correct method? or should i be benchmarking the hooks themselves with some worst case scenario. In essence i am trying to dynamically set the weight which feels especially like gas metering. To the best of my knowledge this is not supported in standard extrinsic calls, except it seems possible in the hooks.&#xD;&#xA;&#xD;&#xA;If it is the correct method how can i benchmark code that is not an extrinsic (not annotated with `#[pallet::call]`).&#xD;&#xA;&#xD;&#xA;Preferably i would like to avoid `db::reads_writes(x, y)` to manually tally weights, is this best practice?&#xD;&#xA;&#xD;&#xA;Here is some sample code to describe what i am trying to do: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA; fn on_initialize(_b: T::BlockNumber) -&gt; Weight { &#xD;&#xA;      let mut weight = Weight::default();&#xD;&#xA;      let mut details = Details::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;      Self::do_something_with_details(details);                    &#xD;&#xA;      weight.saturating_add(T::WeightInfo::do_something_with_details());&#xD;&#xA;                   &#xD;&#xA;      Self::mutate_details(details, c);&#xD;&#xA;      weight.saturating_add(T::WeightInfo::mutate_details());&#xD;&#xA;&#xD;&#xA;      weight&#xD;&#xA; }&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22498" PostHistoryTypeId="2" PostId="5884" RevisionGUID="0dc44b1f-dd3b-499c-a5e1-5e180ff89446" CreationDate="2022-11-14T13:34:17.650" UserId="251" Text="https://github.com/paritytech/substrate/labels?page=1&amp;sort=name-asc&#xD;&#xA;&#xD;&#xA;Is there a doc for this?&#xD;&#xA;&#xD;&#xA;E.G. `E5-breaksapi`&#xD;&#xA;&#xD;&#xA;What's the meaning of `E`?&#xD;&#xA;&#xD;&#xA;What's the meaning of `5`?&#xD;&#xA;&#xD;&#xA;What labels should I pay attention to if I update the Substrate version?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22500" PostHistoryTypeId="1" PostId="5884" RevisionGUID="0dc44b1f-dd3b-499c-a5e1-5e180ff89446" CreationDate="2022-11-14T13:34:17.650" UserId="251" Text="How to play with the Substrate labels?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22501" PostHistoryTypeId="3" PostId="5884" RevisionGUID="0dc44b1f-dd3b-499c-a5e1-5e180ff89446" CreationDate="2022-11-14T13:34:17.650" UserId="251" Text="|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22502" PostHistoryTypeId="2" PostId="5885" RevisionGUID="0221e657-f7e0-437a-b3b8-ac7534a79386" CreationDate="2022-11-14T13:41:51.643" UserId="2011" Text="We've been investigating an issue that's most likely related to this [post][1], and this [issue][2]. But unsure if the underlying cause is the same, I'm looking for some help to confirm my understanding of this issue.&#xD;&#xA;&#xD;&#xA;We're running PoA network which has been connected to Kusama for about 2 months now, and just recently we've encountered &quot;Detected precommit equivocation&quot; error below: &#xD;&#xA;&#xD;&#xA;``` Detected precommit equivocation in the finality worker: Equivocation { round_number: 7, identity: Public(3b5e36d579368a76c4547f8a35f98fa551ebd601496b228acf722f9410562995 (nhybsE5c...)), first: (Precommit { target_hash: 0xe575faa4b4ab50595e29a81abc937e9a7df8cd2f42fd9c76109132e6582d3f41, target_number: 15294835 }, Signature(8a17c570b17ac891e270b78c5a76f62b4ca040c48f8ecb1762efb454da5ce7a50118529f0f7f35b454b182ae18216d334d9bfb8e2846efd3372103d9dd9c7006)), second: (Precommit { target_hash: 0x5b9632805d70986427f0909dc2015ce741b60a94a46c2444b42721768e4ed90d, target_number: 15294834 }, Signature(cf22cfbc1f2c8e757059c4e4a25af3ffb9640b1c5f6b8007b91864f6f8763434eecc25d58649d3a01ce2dcc3c002ffe21f61a2cdb4f88e75ddbbf63c6f381502)) }```&#xD;&#xA;&#xD;&#xA;The first question I have the public identity would be associated with an authority node on Kusama? I don't think there is a currently away to query node identities.&#xD;&#xA;&#xD;&#xA;The second question, is there away to recover from this without doing a full re-sync from scratch? We had to do a full re-sync for both bootnode and archive nodes.&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1541/equivocation-crash-network-with-100-aura-validators&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/issues/11175" ContentLicense="CC BY-SA 4.0" />
  <row Id="22504" PostHistoryTypeId="1" PostId="5885" RevisionGUID="0221e657-f7e0-437a-b3b8-ac7534a79386" CreationDate="2022-11-14T13:41:51.643" UserId="2011" Text="Equivocations error causing some nodes to crash (Follow up question)" ContentLicense="CC BY-SA 4.0" />
  <row Id="22505" PostHistoryTypeId="3" PostId="5885" RevisionGUID="0221e657-f7e0-437a-b3b8-ac7534a79386" CreationDate="2022-11-14T13:41:51.643" UserId="2011" Text="|kusama|grandpa|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22506" PostHistoryTypeId="2" PostId="5886" RevisionGUID="be1aabc2-00c9-44b7-9b5b-aad31246c3e8" CreationDate="2022-11-14T14:26:00.283" UserId="452" Text="This was due to a bug that has already been fixed: https://github.com/paritytech/substrate/pull/11302 https://github.com/paritytech/finality-grandpa/pull/152. The fix was included in Polkadot v0.9.26 so if you update your collator to that version or later it should resolve the problem (without requiring a re-sync).&#xD;&#xA;&#xD;&#xA;Regarding the question of identity, the key being shown there is the GRANDPA session key. In order to figure out the validator identity associated with that session key you can query on-chain state:&#xD;&#xA;&#xD;&#xA;`session.keyOwner(key_type, public_key_hex)`&#xD;&#xA;&#xD;&#xA;In your example the call should be:&#xD;&#xA;&#xD;&#xA;`session.keyOwner(gran, 0x3b5e36d579368a76c4547f8a35f98fa551ebd601496b228acf722f9410562995)`." ContentLicense="CC BY-SA 4.0" />
  <row Id="22508" PostHistoryTypeId="2" PostId="5887" RevisionGUID="155d3688-e7d2-4377-88bd-65b20057a6e8" CreationDate="2022-11-14T14:42:24.823" UserId="234" Text="The following 2 extrinsics :&#xD;&#xA;&#xD;&#xA;- [10995944-2][1]&#xD;&#xA;- [10996284-2][2]&#xD;&#xA;&#xD;&#xA;were included in the blockchain, that shows that a transaction with exact same input parameters including the signature was executed twice. Why did this happened ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/extrinsic/10995944-2&#xD;&#xA;  [2]: https://polkadot.subscan.io/extrinsic/10996284-2" ContentLicense="CC BY-SA 4.0" />
  <row Id="22510" PostHistoryTypeId="1" PostId="5887" RevisionGUID="155d3688-e7d2-4377-88bd-65b20057a6e8" CreationDate="2022-11-14T14:42:24.823" UserId="234" Text="Why was the same transaction executed twice?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22511" PostHistoryTypeId="3" PostId="5887" RevisionGUID="155d3688-e7d2-4377-88bd-65b20057a6e8" CreationDate="2022-11-14T14:42:24.823" UserId="234" Text="|transactions|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22512" PostHistoryTypeId="2" PostId="5888" RevisionGUID="64e7f67f-8cd0-4aef-8df1-56c75f0b2e7f" CreationDate="2022-11-14T14:42:24.823" UserId="234" Text="This is the typical case of **replaying an immortal transaction** since both mentioned extrinsics have an immortal lifetime.&#xD;&#xA;&#xD;&#xA;[![immortal lifetime][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are the steps that allowed this to happen :&#xD;&#xA;&#xD;&#xA;The first extrinsic [10995944-2][2] was executed and it resulted in :&#xD;&#xA;&#xD;&#xA;- Transferring successfully 4.98 DOT from the Sender to the Destination account as expected&#xD;&#xA;- However, the amount that was withdrawn from the Sender account caused the balance of the account to drop below the existential deposit&#xD;&#xA;- This resulted in the Sender account being **reaped**  ( [wiki-existential deposit][3] &amp; [ED - reaping][4])&#xD;&#xA;- Which implied that the nonce of the account was restarted to 0 &#xD;&#xA;&#xD;&#xA;&gt; *If an account drops below the ED, it will be reaped, i.e. completely*&#xD;&#xA;&gt; *removed from storage and the nonce reset.*&#xD;&#xA;&#xD;&#xA;What happened in the meantime (before we see the second extrinsic executed hence the same transaction executed again) is extrinsic [10996030-3][5] during which :&#xD;&#xA;- The reaped account was funded again with 999.78 DOT&#xD;&#xA;- So it became again active with nonce equals 0. &#xD;&#xA;&#xD;&#xA;Hence the second extrinsic [10996284-2][6] could be validly submitted to the blockchain again. &#xD;&#xA;&#xD;&#xA;This is an expected behavior since the **nonce** set in the extrinsic is again valid respect to the state of the blockchain. However this can be mitigated  by submitting mortal transactions as it is recommended in the [wiki-transaction mortality][7] : &#xD;&#xA;&#xD;&#xA;&gt; *NOTE: If an account is reaped and a user re-funds the account, then*&#xD;&#xA;&gt; *they could replay an immortal transaction. Always default to using a*&#xD;&#xA;&gt; *mortal extrinsic.*&#xD;&#xA;&#xD;&#xA;Credits to the team that reported the case &amp; Joe &amp; Iker that provided extensive explanations to the team.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/d9PX5.png&#xD;&#xA;  [2]: https://polkadot.subscan.io/event?extrinsic=10995944-2&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/build-protocol-info#existential-deposit&#xD;&#xA;  [4]: https://wiki.polkadot.network/docs/learn-accounts#existential-deposit-and-reaping&#xD;&#xA;  [5]: https://polkadot.subscan.io/extrinsic/10996030-3&#xD;&#xA;  [6]: https://polkadot.subscan.io/extrinsic/10996284-2&#xD;&#xA;  [7]: https://wiki.polkadot.network/docs/build-protocol-info#transaction-mortality" ContentLicense="CC BY-SA 4.0" />
  <row Id="22515" PostHistoryTypeId="2" PostId="5889" RevisionGUID="342cddb3-3318-4bf4-a619-3f2e31128d1c" CreationDate="2022-11-14T15:07:58.997" UserId="2548" Text="I was looking for an idea to build on Substrate and I found out this product built on Ethereum: https://create.request.network/&#xD;&#xA;&#xD;&#xA;In a few words is an invoice system that creates/pays invoices between two actors.&#xD;&#xA;&#xD;&#xA;My question is: Does it make sense to store the invoices(date/status etc) in the blockchain? &#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="22517" PostHistoryTypeId="1" PostId="5889" RevisionGUID="342cddb3-3318-4bf4-a619-3f2e31128d1c" CreationDate="2022-11-14T15:07:58.997" UserId="2548" Text="Does it make sense to store it in blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22518" PostHistoryTypeId="3" PostId="5889" RevisionGUID="342cddb3-3318-4bf4-a619-3f2e31128d1c" CreationDate="2022-11-14T15:07:58.997" UserId="2548" Text="|substrate-node-template|rust|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22519" PostHistoryTypeId="4" PostId="5852" RevisionGUID="c7dc08d0-369f-49d5-91ce-a7f28d857426" CreationDate="2022-11-14T15:38:59.070" UserId="165" Comment="little typo" Text="How do I do a multi-block migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22520" PostHistoryTypeId="2" PostId="5890" RevisionGUID="4c8fbc60-ff66-4cf8-95c3-8257470a67f0" CreationDate="2022-11-14T16:32:27.567" UserId="377" Text="I have added the vesting schedule/config to the and passed it to config of vesting pallet in chainspec.rs &#xD;&#xA;Can we test the vesting schedule/configs by unit test cases?&#xD;&#xA;if yes can you provide any sample" ContentLicense="CC BY-SA 4.0" />
  <row Id="22522" PostHistoryTypeId="1" PostId="5890" RevisionGUID="4c8fbc60-ff66-4cf8-95c3-8257470a67f0" CreationDate="2022-11-14T16:32:27.567" UserId="377" Text="How we can test the vesting config given to chainspec.rs by unit testing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22523" PostHistoryTypeId="3" PostId="5890" RevisionGUID="4c8fbc60-ff66-4cf8-95c3-8257470a67f0" CreationDate="2022-11-14T16:32:27.567" UserId="377" Text="|pallet|unit-tests|vesting-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22524" PostHistoryTypeId="2" PostId="5891" RevisionGUID="bb59ff1e-9161-41f7-89a4-ee275f33a90a" CreationDate="2022-11-14T16:47:13.740" UserId="377" Text="Here is the example of full implementation vesting pallet with config. Kilt github: https://github.com/KILTprotocol/kilt-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="22526" PostHistoryTypeId="2" PostId="5892" RevisionGUID="b306941c-5102-4e25-b742-e67d8f603971" CreationDate="2022-11-14T21:27:23.097" UserId="3443" Text="can anyone explain why this module call [parainherent(enter)][1] ended up emitting a BatchCompleted and a couple ItemCompleted events?  I'm unable to find any similar cases in westend.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/extrinsic/12879834-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="22528" PostHistoryTypeId="1" PostId="5892" RevisionGUID="b306941c-5102-4e25-b742-e67d8f603971" CreationDate="2022-11-14T21:27:23.097" UserId="3443" Text="Unexpected Events from parainherit(enter) extrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="22529" PostHistoryTypeId="3" PostId="5892" RevisionGUID="b306941c-5102-4e25-b742-e67d8f603971" CreationDate="2022-11-14T21:27:23.097" UserId="3443" Text="|extrinsic|events|batch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22530" PostHistoryTypeId="5" PostId="5892" RevisionGUID="f0faf4e9-1ce8-4566-a9a3-c4eb0e7fcf26" CreationDate="2022-11-14T21:27:55.207" UserId="3443" Comment="edited body" Text="Can anyone explain why this module call [parainherent(enter)][1] ended up emitting a BatchCompleted and a couple ItemCompleted events?  I'm unable to find any similar cases in westend.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/extrinsic/12879834-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="22531" PostHistoryTypeId="2" PostId="5893" RevisionGUID="0a006a62-1504-4e2e-85f5-5a559d5d728a" CreationDate="2022-11-14T21:36:29.777" UserId="73" Text="There is an upward message that is being executed directly. This upward message was using `batch` internally leading to these events." ContentLicense="CC BY-SA 4.0" />
  <row Id="22533" PostHistoryTypeId="2" PostId="5894" RevisionGUID="27406b97-4442-42ab-95a1-abbea9a0c724" CreationDate="2022-11-14T21:53:25.517" UserId="73" Text="Statemint and Statemine were initially running with the `shell-runtime`. This `shell-runtime` was the most basic runtime that was possible. This means also that it didn't had the timestamp pallet and thus, it also didn't had any timestamp." ContentLicense="CC BY-SA 4.0" />
  <row Id="22535" PostHistoryTypeId="52" PostId="5887" RevisionGUID="d2438919-3b23-4d6f-bf91-274530b1c26e" CreationDate="2022-11-14T22:43:24.497" />
  <row Id="22536" PostHistoryTypeId="2" PostId="5895" RevisionGUID="ddb86a81-4862-4837-b6b3-ba8fff7ea656" CreationDate="2022-11-14T22:44:04.007" UserId="3407" Text="A good rule of thumb question to ask when choosing what makes sense to store on-chain is:&#xD;&#xA;- Does the chain logic need this data, or just people?&#xD;&#xA;&#xD;&#xA;If it's only that people need to read the data, it is usually better to store it somewhere off-chain, and provide a link to the data, as well as its cryptographic hash, which can be used to verify the data. Where it gets stored off-chain might be something like [Crust Network][1], which is tied into the parachain ecosystem.&#xD;&#xA;&#xD;&#xA;Also, if data is very small, it might make sense to store directly on-chain.&#xD;&#xA;&#xD;&#xA;In your particular case, let's look at it through this framework:&#xD;&#xA;- date: This probably needs to be on-chain for dispute resolution, and identifying nonpayment a certain date after the invoice was issued.&#xD;&#xA;- status: This definitely needs to be on chain, if you want the chain to be able to enforce anything about the contract.&#xD;&#xA;- invoice breakdown: Off-chain. Often there might be a document detailing exactly what constitutes the invoice, and this is a large amount of data.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://crust.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22538" PostHistoryTypeId="2" PostId="5896" RevisionGUID="f51243f0-db29-4ea3-b7f8-2acd43bcf580" CreationDate="2022-11-14T23:44:10.757" UserId="3142" Text="It's my understanding that the **relay chain** runs these types of node types (configurations):&#xD;&#xA;&#xD;&#xA;  **validators**, **nominators**, and **archive** nodes.  **fishermen** have been deprecated/removed.&#xD;&#xA;&#xD;&#xA;Does it also run **full**, **rpc**, or **boot**?  Anything else?&#xD;&#xA;&#xD;&#xA;For **parachains**, they run:&#xD;&#xA;&#xD;&#xA;  **collators**, **full**, **archive**, **rpc**, **boot**&#xD;&#xA;&#xD;&#xA;Anything else?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22540" PostHistoryTypeId="1" PostId="5896" RevisionGUID="f51243f0-db29-4ea3-b7f8-2acd43bcf580" CreationDate="2022-11-14T23:44:10.757" UserId="3142" Text="What node types run in the relay chain vs. parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22541" PostHistoryTypeId="3" PostId="5896" RevisionGUID="f51243f0-db29-4ea3-b7f8-2acd43bcf580" CreationDate="2022-11-14T23:44:10.757" UserId="3142" Text="|relay-chain|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22545" PostHistoryTypeId="5" PostId="5872" RevisionGUID="2eb3e9b5-3915-44ed-8dd9-a746fd1a41be" CreationDate="2022-11-15T03:47:37.123" UserId="2673" Comment="Syntax highlighting" Text="Inside `final_checks(header: &amp;System::Header)` method &#xD;&#xA;```rust&#xD;&#xA;fn final_checks() {&#xD;&#xA;    let new_header = &lt;frame_system::Pallet::&lt;System&gt;&gt;::finalize();&#xD;&#xA;    ...&#xD;&#xA;    let storage_root = new_header.state_root();&#xD;&#xA;    assert!(header.state_root() == storage_root, &quot;Storage root must match that..);&#xD;&#xA;    ... &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I am not sure why `header.state_root()` and `storage_root` should be equal. As far as I know, `final_checks()` are called right after all extrinsincs are executed, which could change the state of the storage and leads to change of `state_root`. What am I missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22546" PostHistoryTypeId="24" PostId="5872" RevisionGUID="2eb3e9b5-3915-44ed-8dd9-a746fd1a41be" CreationDate="2022-11-15T03:47:37.123" Comment="Proposed by 2673 approved by 2140 edit id of 338" ContentLicense="CC BY-SA 4.0" />
  <row Id="22547" PostHistoryTypeId="2" PostId="5898" RevisionGUID="e9bb6659-818c-4761-b6cc-0fc89ff85836" CreationDate="2022-11-15T05:06:42.873" UserId="28" Text="The **new** header should have the **new** storage root.&#xD;&#xA;&#xD;&#xA;So when you are done executing the whole block, you can check that your current state root, after all extrinsics and state changes, matches what is expected by the block header. That is what is being checked here if you look carefully, and makes sense to me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// check storage root.&#xD;&#xA;let storage_root = new_header.state_root();&#xD;&#xA;header.state_root().check_equal(storage_root);&#xD;&#xA;assert!(header.state_root() == storage_root, &quot;Storage root must match that calculated.&quot;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22549" PostHistoryTypeId="12" PostId="5898" RevisionGUID="d6cc287d-db1b-44f8-a390-011193fe1ddd" CreationDate="2022-11-15T05:09:03.280" UserId="28" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="22550" PostHistoryTypeId="13" PostId="5898" RevisionGUID="3dc8badf-0752-4df5-bfdf-abd01127f902" CreationDate="2022-11-15T05:09:36.137" UserId="28" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="22551" PostHistoryTypeId="2" PostId="5899" RevisionGUID="84dc5ba5-db86-45d3-a102-638750c0af99" CreationDate="2022-11-15T05:25:26.527" UserId="251" Text="Here is a real-world example.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/pull/673/files#diff-02470251f30c921643bfe724902ce5cc7a76ebac129128e1328c061295e66034R123-R148&#xD;&#xA;&#xD;&#xA;In the past, our MMR pallet records all the nodes.&#xD;&#xA;&#xD;&#xA;And the chain has run for over a year.&#xD;&#xA;&#xD;&#xA;There are around 10,000,000 items that need to be removed.&#xD;&#xA;&#xD;&#xA;Also, the log is useful during the migration.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/pull/673#issuecomment-866571487&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22553" PostHistoryTypeId="5" PostId="5899" RevisionGUID="634407dc-e1d2-482b-8eda-b1a5430ef2ae" CreationDate="2022-11-15T05:30:40.817" UserId="251" Comment="deleted 2 characters in body" Text="Here is a real-world example.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/pull/673/files#diff-02470251f30c921643bfe724902ce5cc7a76ebac129128e1328c061295e66034R123-R148&#xD;&#xA;&#xD;&#xA;In the past, our MMR pallet records all the nodes.&#xD;&#xA;&#xD;&#xA;And the chain has run for over a year.&#xD;&#xA;&#xD;&#xA;We need to prune around 10,000,000 nodes to leaves only.&#xD;&#xA;&#xD;&#xA;Also, the log is useful during the migration.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/pull/673#issuecomment-866571487&#xD;&#xA;&#xD;&#xA;And a migration configuration might be helpful.&#xD;&#xA;&#xD;&#xA;That you could configure how many items are to be migrated in a block.&#xD;&#xA;&#xD;&#xA;If the number is too large it will affect the block production speed.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/pull/673/files#diff-02470251f30c921643bfe724902ce5cc7a76ebac129128e1328c061295e66034R113-R116" ContentLicense="CC BY-SA 4.0" />
  <row Id="22554" PostHistoryTypeId="2" PostId="5900" RevisionGUID="77431ea3-b77d-4346-836c-5fbc1104cbd0" CreationDate="2022-11-15T05:35:45.993" UserId="28" Text="I think your mental model is a little off here, at least the way it is written.&#xD;&#xA;&#xD;&#xA;There is a binary specific for the Polkadot relay chain node, and software specific for each parachain node. Each of these node binaries have a set of configurations on how you want to run that node, and a node can play multiple of those roles.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;- archive node: this is a configuration where a node will keep all blocks and the full state any any block in the database. Lots of nodes do not need all this information, so these choose to prune their blocks, saving disk space. You do not need to be an archive node to participate in the network, but you will need it if you want to easily query data from the past.&#xD;&#xA;&#xD;&#xA;- full node: this is basically a non-archive node, but can still participate in block production. Usually this means keeping enough blocks around to allow for block reorganization before things are finalized.&#xD;&#xA;&#xD;&#xA;- block producing nodes: there are nodes which are configured to produce blocks. For the relay chain these are validators, and for parachains these are collators. Their specific role is different in the overall Polkadot protocol, but at an abstract level, you can think of them both as block producers.&#xD;&#xA;&#xD;&#xA;- boot nodes: these nodes which are not configured in a specific way, but are just nodes which have a well known network address, so that new nodes can start to peer with others on the network. Any node above could play this role.&#xD;&#xA;&#xD;&#xA;- rpc nodes: these are nodes which publicly expose their RPC endpoints. Any of the nodes above could also be an RPC node, but usually it requires a little bit of extra security considerations, since exposing your RPC nodes also exposes you to people who want to DoS spam your node with requests.&#xD;&#xA;&#xD;&#xA;So as you can see, you can have a single node which is an archive, boot, and rpc node based on its configuration.&#xD;&#xA;&#xD;&#xA;The one thing you definitely got wrong is &quot;nominator&quot;. There is no nominator node. As a nominator, you do not need to run any software, you just need to configure your nominations on the blockchain, and everything is handled by the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="22556" PostHistoryTypeId="2" PostId="5901" RevisionGUID="34c809db-b639-47cf-9b92-b19f234a368d" CreationDate="2022-11-15T05:42:59.330" UserId="3304" Text="I an running polkadot bridges from the repository git clone https://github.com/paritytech/parity-bridges-common.git&#xD;&#xA;and while running the briges i am getting the following error[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3YA0T.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22558" PostHistoryTypeId="1" PostId="5901" RevisionGUID="34c809db-b639-47cf-9b92-b19f234a368d" CreationDate="2022-11-15T05:42:59.330" UserId="3304" Text="parity bridges common" ContentLicense="CC BY-SA 4.0" />
  <row Id="22559" PostHistoryTypeId="3" PostId="5901" RevisionGUID="34c809db-b639-47cf-9b92-b19f234a368d" CreationDate="2022-11-15T05:42:59.330" UserId="3304" Text="|polkadot|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22560" PostHistoryTypeId="2" PostId="5902" RevisionGUID="64f337ce-b6a5-4290-bdb3-7d99e69b0a84" CreationDate="2022-11-15T05:56:26.187" UserId="28" Text="There are snapshots available for Polkadot and parachains in a few different places. Here are just a few from a google search:&#xD;&#xA;&#xD;&#xA;- https://polkashots.io/&#xD;&#xA;- https://p2p.org/snapshot/polkadot&#xD;&#xA;- https://polkachu.com/snapshots&#xD;&#xA;&#xD;&#xA;There are many more.&#xD;&#xA;&#xD;&#xA;These are generated by simply copying the folder which holds the state of the chain.&#xD;&#xA;&#xD;&#xA;On mac for example, the default folder is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/Users/&lt;username&gt;/Library/Application Support/&lt;chain_name&gt;/chains/&lt;chain_name&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You would copy that whole folder from one computer to another computer." ContentLicense="CC BY-SA 4.0" />
  <row Id="22562" PostHistoryTypeId="2" PostId="5903" RevisionGUID="70da42ce-3167-4676-944a-81824376fa50" CreationDate="2022-11-15T06:00:41.477" UserId="28" Text="Some of the labels and their meanings are listed here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/docs/CONTRIBUTING.adoc&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; *Labels TLDR:*&#xD;&#xA;&gt; &#xD;&#xA;&gt; - `A-*` Pull request status. ONE REQUIRED.&#xD;&#xA;&gt; - `B-*` Changelog and/or Runtime-upgrade post composition markers. ONE REQUIRED. (used by automation)&#xD;&#xA;&gt; - `C-*` Release notes release-priority markers. EXACTLY ONE REQUIRED. (used by automation)&#xD;&#xA;&gt; - `D-*` More general tags on the PR denoting various implications and requirements.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Please label issues with the following labels:&#xD;&#xA;&gt; &#xD;&#xA;&gt; * `I-*` Issue severity and type. EXACTLY ONE REQUIRED.&#xD;&#xA;&gt; * `P-*` Issue priority. AT MOST ONE ALLOWED.&#xD;&#xA;&gt; * `Q-*` Issue difficulty. AT MOST ONE ALLOWED.&#xD;&#xA;&gt; * `Z-*` More general tags on the issue, denoting context and resolution.&#xD;&#xA;&#xD;&#xA;It seems others are not well documented, and hopefully that will change in the near future as @bkchr mentions." ContentLicense="CC BY-SA 4.0" />
  <row Id="22564" PostHistoryTypeId="2" PostId="5904" RevisionGUID="8c99db4c-7d62-45ab-95d9-dfe02ec16268" CreationDate="2022-11-15T06:05:32.873" UserId="28" Text="Errors like this happen when you mess up the `Cargo.lock` file. (which you shouldn't do)&#xD;&#xA;&#xD;&#xA;You should reset your branch, removing any changes from origin, and try compiling again." ContentLicense="CC BY-SA 4.0" />
  <row Id="22566" PostHistoryTypeId="5" PostId="5873" RevisionGUID="d9e0c4fa-014a-40c6-a39a-1b0989a0f50d" CreationDate="2022-11-15T06:10:15.033" UserId="28" Comment="edited body" Text="I noticed that the `OnTimestampSet` differs in the parachains and solo chains. This config must be set in the solo chain as `Aura` or `Babe`. But in parachain, `()` is okay.&#xD;&#xA;&#xD;&#xA;In Cumulus:&#xD;&#xA;```rs&#xD;&#xA;impl pallet_timestamp::Config for Runtime {&#xD;&#xA;	/// A timestamp: milliseconds since the unix epoch.&#xD;&#xA;	type Moment = u64;&#xD;&#xA;	type OnTimestampSet = ();   // here&#xD;&#xA;	type MinimumPeriod = MinimumPeriod;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In substrate-node-template:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl pallet_timestamp::Config for Runtime {&#xD;&#xA;	/// A timestamp: milliseconds since the unix epoch.&#xD;&#xA;	type Moment = u64;&#xD;&#xA;	type OnTimestampSet = Aura;  // here&#xD;&#xA;	type MinimumPeriod = ConstU64&lt;{ SLOT_DURATION / 2 }&gt;;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From the docs in the pallet-timestamp:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Set the current time.&#xD;&#xA;///&#xD;&#xA;/// This call should be invoked exactly once per block. It will panic at the finalization&#xD;&#xA;/// phase, if this call hasn't been invoked by that time.&#xD;&#xA;///&#xD;&#xA;/// The timestamp should be greater than the previous one by the amount specified by&#xD;&#xA;/// `MinimumPeriod`.&#xD;&#xA;///&#xD;&#xA;pub fn set(origin: OriginFor&lt;T&gt;, #[pallet::compact] now: T::Moment) -&gt; DispatchResult {...}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What make this difference?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22568" PostHistoryTypeId="2" PostId="5905" RevisionGUID="27091bff-afe7-4be4-8eb3-827fd349c8cf" CreationDate="2022-11-15T06:50:09.163" UserId="3319" Text="how do i check a transaction before it gets added to the transaction pool, kind of like BlockImport but for transactions that are coming from outside(from other validators or clients)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22570" PostHistoryTypeId="1" PostId="5905" RevisionGUID="27091bff-afe7-4be4-8eb3-827fd349c8cf" CreationDate="2022-11-15T06:50:09.163" UserId="3319" Text="what is the blockImport equivalent for transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22571" PostHistoryTypeId="3" PostId="5905" RevisionGUID="27091bff-afe7-4be4-8eb3-827fd349c8cf" CreationDate="2022-11-15T06:50:09.163" UserId="3319" Text="|substrate-node-template|transactions|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22572" PostHistoryTypeId="2" PostId="5906" RevisionGUID="bf26d4ac-6197-405f-9bb0-b7165dc03f45" CreationDate="2022-11-15T09:05:20.400" UserId="3445" Text="as I see, you are trying to run `relay-messages-rialto-to-millau.sh`&#xD;&#xA;but before that you need to run also `relay-rialto-to-millau.sh` and `relay-millau-to-rialto.sh`,&#xD;&#xA;&#xD;&#xA;`relay-messages-rialto-to-millau.sh`:&#xD;&#xA;- just relays messages&#xD;&#xA;&#xD;&#xA;`relay-rialto-to-millau.sh / relay-millau-to-rialto.sh`:&#xD;&#xA;- initialize bridge pallets (see the error BridgePalletIsNotInitialized)&#xD;&#xA;- relays finality (headers)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22574" PostHistoryTypeId="2" PostId="5907" RevisionGUID="a34e860b-138d-4e1c-b671-91fe6edffeca" CreationDate="2022-11-15T09:10:03.067" UserId="73" Text="Every transaction is passed to the `validate_transaction` function in your runtime, before it enters the pool. This ensures that the transaction is valid and also gives back information about how longevity and priority of the transaction." ContentLicense="CC BY-SA 4.0" />
  <row Id="22576" PostHistoryTypeId="2" PostId="5908" RevisionGUID="609633de-39f0-4605-9a7b-be0b2374517d" CreationDate="2022-11-15T09:51:16.643" UserId="3438" Text="Is there a way to query whether a chain has a native token and what it is?&#xD;&#xA;&#xD;&#xA;For instance can I query Moonbeam, to find that it's native token is GLMR(Glimmer). Similarly for the rest of the parachains." ContentLicense="CC BY-SA 4.0" />
  <row Id="22578" PostHistoryTypeId="1" PostId="5908" RevisionGUID="609633de-39f0-4605-9a7b-be0b2374517d" CreationDate="2022-11-15T09:51:16.643" UserId="3438" Text="Finding about native token of a parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="22579" PostHistoryTypeId="3" PostId="5908" RevisionGUID="609633de-39f0-4605-9a7b-be0b2374517d" CreationDate="2022-11-15T09:51:16.643" UserId="3438" Text="|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22580" PostHistoryTypeId="2" PostId="5909" RevisionGUID="ccb5d511-5f0a-4dc2-94cd-5425e10f75b1" CreationDate="2022-11-15T10:02:24.043" UserId="2762" Text="You have this information in the chain-spec of the network, if you want to query it, you can use RPC queries for it. &#xD;&#xA;&#xD;&#xA;Specifically the [system_properties RPC call][1]&#xD;&#xA;&#xD;&#xA;You can query it using CURL:&#xD;&#xA;&#xD;&#xA;    curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;system_properties&quot;, &quot;params&quot;: []}' https://moonbeam.public.blastapi.io&#xD;&#xA;&#xD;&#xA;And you will get the token symbol of the network, GLMR in this case.&#xD;&#xA;&#xD;&#xA;    {&quot;SS58Prefix&quot;:1284,&quot;tokenDecimals&quot;:18,&quot;tokenSymbol&quot;:&quot;GLMR&quot;},&quot;id&quot;:1&#xD;&#xA;&#xD;&#xA;Or you can use JS code, with PolkadotJS library.&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://moonbeam.public.blastapi.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const properties = await api.rpc.system.properties();&#xD;&#xA;    console.log(properties.toHuman());&#xD;&#xA;&#xD;&#xA;And you got the token symbol:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      ss58Format: null,&#xD;&#xA;      tokenDecimals: [ '18' ],&#xD;&#xA;      tokenSymbol: [ 'GLMR' ],&#xD;&#xA;      SS58Prefix: 1284&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/rpc/#properties-chainproperties" ContentLicense="CC BY-SA 4.0" />
  <row Id="22582" PostHistoryTypeId="6" PostId="5901" RevisionGUID="ea9a6bdd-846a-4d87-b1cc-7124a299d393" CreationDate="2022-11-15T10:37:45.957" UserId="251" Comment="edited tags" Text="|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22583" PostHistoryTypeId="4" PostId="5901" RevisionGUID="ea9a6bdd-846a-4d87-b1cc-7124a299d393" CreationDate="2022-11-15T10:37:45.957" UserId="251" Comment="edited tags" Text="Failed to run parity-bridges-common message realy demo" ContentLicense="CC BY-SA 4.0" />
  <row Id="22584" PostHistoryTypeId="2" PostId="5910" RevisionGUID="6262224d-472c-4848-943a-d9c249ca393d" CreationDate="2022-11-15T10:50:21.997" UserId="73" Text="&gt; What make this difference?&#xD;&#xA;&#xD;&#xA;This was actually wrong, thank you for bringing this up. On Parachains the `OnTimestampSet` should be set to `Aura` as you pointed out." ContentLicense="CC BY-SA 4.0" />
  <row Id="22586" PostHistoryTypeId="5" PostId="5836" RevisionGUID="703c45cc-75c8-4898-a717-0182c15a93d2" CreationDate="2022-11-15T11:18:23.293" UserId="165" Comment="deleted 7 characters in body" Text="Pasting context from [#10806][1] itself, very well documented, please check.&#xD;&#xA;&#xD;&#xA;&gt; ### Annotation for safe without storage layer&#xD;&#xA;&gt; &#xD;&#xA;&gt; Now that the default behavior of extrinsics will be to spawn at least&#xD;&#xA;&gt; one transactional layer, we can introduce an opt-in optimization where&#xD;&#xA;&gt; a user can state that a function is safe to be executed without its&#xD;&#xA;&gt; own transactional layer.&#xD;&#xA;&gt; &#xD;&#xA;&gt; For example:&#xD;&#xA;&gt; ```rust&#xD;&#xA;&gt;     /// This function is safe to execute without an additional transactional storage layer.&#xD;&#xA;&gt;     #[without_transactional]&#xD;&#xA;&gt;     fn set_value(x: u32) -&gt; DispatchResult {&#xD;&#xA;&gt;         Self::check_value(x)?;&#xD;&#xA;&gt;         MyStorage::set(x);&#xD;&#xA;&gt;         Ok(())&#xD;&#xA;&gt;     }&#xD;&#xA;&gt; ```&#xD;&#xA;&gt; When this function is called directly, a transactional layer should&#xD;&#xA;&gt; not spawn for it.&#xD;&#xA;&gt; &#xD;&#xA;&gt; If a user called `dispatch_with_transactional` to this function, a&#xD;&#xA;&gt; transactional layer also does not need to spawn.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/10806" ContentLicense="CC BY-SA 4.0" />
  <row Id="22587" PostHistoryTypeId="2" PostId="5911" RevisionGUID="6c0d635f-83fe-490c-96f8-095c85e9651b" CreationDate="2022-11-15T13:21:15.517" UserId="3446" Text="I am following the Substrate tutorial at https://docs.substrate.io/tutorials/smart-contracts/prepare-your-first-contract/&#xD;&#xA;&#xD;&#xA;I was able to build/compile the Flipper smart contract but when I'm trying to deploy the contract using contracts-ui I'm getting a blank page&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;In addition to that when running `substrate-contracts-node --dev` I see that no block is produced. &#xD;&#xA;&#xD;&#xA;Only log line produced is:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Do you think this is an expected behavior for the node?&#xD;&#xA;Not sure what I'm missing or if the issue might be related with the substrate node or the substrate contracts ui.&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/d1y82.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/c0sBd.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22589" PostHistoryTypeId="1" PostId="5911" RevisionGUID="6c0d635f-83fe-490c-96f8-095c85e9651b" CreationDate="2022-11-15T13:21:15.517" UserId="3446" Text="Substrate tutorial: Blank page when deploying smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="22590" PostHistoryTypeId="3" PostId="5911" RevisionGUID="6c0d635f-83fe-490c-96f8-095c85e9651b" CreationDate="2022-11-15T13:21:15.517" UserId="3446" Text="|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22591" PostHistoryTypeId="2" PostId="5912" RevisionGUID="c3eef442-1704-4a7a-bae8-3e904810dc22" CreationDate="2022-11-15T13:23:39.330" UserId="2736" Text="I have an auxiliary struct:&#xD;&#xA;```rust&#xD;&#xA;#[derive(SpreadAllocate, SpreadLayout)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(TypeInfo, ink_storage::traits::StorageLayout))]&#xD;&#xA;pub struct MerkleTree&lt;const LEAVES: u32&gt; {&#xD;&#xA;    nodes: Mapping&lt;u32, Hash&gt;,&#xD;&#xA;    next_free_leaf: u32,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// The only way of constructing `MerkleTree`.&#xD;&#xA;impl&lt;const LEAVES: u32&gt; Default for MerkleTree&lt;LEAVES&gt; {&#xD;&#xA;    fn default() -&gt; Self {&#xD;&#xA;        if !LEAVES.is_power_of_two() {&#xD;&#xA;            panic!(&quot;Please have 2^n leaves&quot;)&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        Self {&#xD;&#xA;            nodes: Mapping::default(),&#xD;&#xA;            next_free_leaf: LEAVES,&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I use it in my contract:&#xD;&#xA;```rust&#xD;&#xA;#[ink(storage)]&#xD;&#xA;#[derive(SpreadAllocate)]&#xD;&#xA;pub struct Contract {&#xD;&#xA;    tree: MerkleTree&lt;1024&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The contract has a single constructor:&#xD;&#xA;```rust&#xD;&#xA;impl Contract {&#xD;&#xA;    #[ink(constructor)]&#xD;&#xA;    pub fn new() -&gt; Self {&#xD;&#xA;        ink_lang::utils::initialize_contract(|blender: &amp;mut Self|{})&#xD;&#xA;    }&#xD;&#xA;...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I observe that my struct (`tree` field is not initialized properly) - `next_free_leaf` is set to `0` (which is `Default::default()` for `u32`). Thus my constructor couldn't have been called. I suppose that the mapping inside this struct might not have been initialized properly. How should I initialize such structs properly?&#xD;&#xA;&#xD;&#xA;I'm working with ink 3.4.0 (I have to)." ContentLicense="CC BY-SA 4.0" />
  <row Id="22593" PostHistoryTypeId="1" PostId="5912" RevisionGUID="c3eef442-1704-4a7a-bae8-3e904810dc22" CreationDate="2022-11-15T13:23:39.330" UserId="2736" Text="ink!: Initializing mapping inside custom structure" ContentLicense="CC BY-SA 4.0" />
  <row Id="22594" PostHistoryTypeId="3" PostId="5912" RevisionGUID="c3eef442-1704-4a7a-bae8-3e904810dc22" CreationDate="2022-11-15T13:23:39.330" UserId="2736" Text="|ink|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22595" PostHistoryTypeId="2" PostId="5913" RevisionGUID="9cb035e8-065e-49ee-b0d4-56ecbfe32905" CreationDate="2022-11-15T14:16:56.960" UserId="16" Text="The latest `substrate-contracts-node` uses a new type for `Weight`. The UI is not yet updated to handle those changes. This is also mentioned in the release notes: https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.22.1. I recommend sticking with `0.21.0` for now." ContentLicense="CC BY-SA 4.0" />
  <row Id="22597" PostHistoryTypeId="4" PostId="5912" RevisionGUID="260afd93-0647-4d87-b4ab-726aefadd43f" CreationDate="2022-11-15T14:34:04.080" UserId="2736" Comment="edited title" Text="ink!: Initializing custom structure" ContentLicense="CC BY-SA 4.0" />
  <row Id="22598" PostHistoryTypeId="2" PostId="5914" RevisionGUID="e6ee30fb-1f39-4084-ba75-584340e9c455" CreationDate="2022-11-15T14:42:02.667" UserId="3385" Text="As a followup, there's a smaller version of the contract that suffers from the same problems:&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod test {&#xD;&#xA;    use ink_storage::traits::{SpreadAllocate, SpreadLayout};&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, SpreadAllocate, SpreadLayout)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo, ink_storage::traits::StorageLayout))]&#xD;&#xA;    pub struct Inner {&#xD;&#xA;        value: u32,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for Inner {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Inner {&#xD;&#xA;                value: 100&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Test {&#xD;&#xA;        inner: Inner,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Test {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            ink_lang::utils::initialize_contract(|_: &amp;mut Test| {&#xD;&#xA;&#xD;&#xA;            })&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get(&amp;self) -&gt; u32 {&#xD;&#xA;            self.inner.value&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests {&#xD;&#xA;    use crate::test::Test;&#xD;&#xA;&#xD;&#xA;    use super::*;&#xD;&#xA;&#xD;&#xA;    #[ink::test]&#xD;&#xA;    fn default_works() {&#xD;&#xA;        let t = Test::new();&#xD;&#xA;        assert_eq!(t.get(), 100)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&quot;Fortunately&quot;, the unit test fails as expected - the value returned from `get()` call is not 100 (as set in the default constructor) but 0." ContentLicense="CC BY-SA 4.0" />
  <row Id="22600" PostHistoryTypeId="52" PostId="5908" RevisionGUID="885c315e-332d-4f2d-8492-ded9537cce68" CreationDate="2022-11-15T18:00:20.987" />
  <row Id="22601" PostHistoryTypeId="5" PostId="5853" RevisionGUID="cc27c0c1-663d-4ef0-9da9-97652016e9e5" CreationDate="2022-11-15T20:23:58.650" UserId="29" Comment="added 381 characters in body" Text="There are some resources (and ongoing effort) here:&#xD;&#xA;- https://docs.substrate.io/build/upgrade-the-runtime/#storage-migration&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-docs/issues/163&#xD;&#xA;&#xD;&#xA;&gt; Depending on the migration, you may want to have logic to put the chain in &quot;maintenance-mode&quot;, disable the pallet, or disable the extrinsics or code that can modify that storage or depend on that storage until the migration is fully complete. If the chain is in &quot;maintenance-mode&quot;, it is possible to do the migration outside the `on_initialize` and take up more block weight.&#xD;&#xA;&#xD;&#xA;Below is a walkthrough of how `pallet-xcm` does a multi-block migration.&#xD;&#xA;&#xD;&#xA;[`pallet-xcm`](https://github.com/paritytech/polkadot/blob/master/xcm/pallet-xcm/src/lib.rs) uses the [`fn on_runtime_upgrade()`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_runtime_upgrade) hook in combination with the [`fn on_initialize()`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_initialize) hook.&#xD;&#xA;&#xD;&#xA;When the runtime is upgraded the `on_runtime_upgrade` hook kicks off the migration:&#xD;&#xA;```rust&#xD;&#xA;fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA;    // Start a migration (this happens before on_initialize so it'll happen later in this&#xD;&#xA;    // block, which should be good enough)...&#xD;&#xA;    CurrentMigration::&lt;T&gt;::put(VersionMigrationStage::default());&#xD;&#xA;    T::DbWeight::get().writes(1)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L451-L456&#xD;&#xA;&#xD;&#xA;Then at the beginning of each block the `on_initialize` sets a 10% block limit and kicks off the migrations in respect to that limit:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn on_initialize(_n: BlockNumberFor&lt;T&gt;) -&gt; Weight {&#xD;&#xA;    let mut weight_used = Weight::zero();&#xD;&#xA;    if let Some(migration) = CurrentMigration::&lt;T&gt;::get() {&#xD;&#xA;        // Consume 10% of block at most&#xD;&#xA;        let max_weight = T::BlockWeights::get().max_block / 10;&#xD;&#xA;        let (w, maybe_migration) = Self::check_xcm_version_change(migration, max_weight);&#xD;&#xA;        CurrentMigration::&lt;T&gt;::set(maybe_migration);&#xD;&#xA;        weight_used.saturating_accrue(w);&#xD;&#xA;    }&#xD;&#xA;    ....&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L419-L450&#xD;&#xA;&#xD;&#xA;The migrations starts (being careful not to exceed max weight -&gt; 10%):&#xD;&#xA;```rust&#xD;&#xA;/// Will always make progress, and will do its best not to use much more than `weight_cutoff`&#xD;&#xA;/// in doing so.&#xD;&#xA;pub(crate) fn check_xcm_version_change(&#xD;&#xA;    mut stage: VersionMigrationStage,&#xD;&#xA;    weight_cutoff: Weight,&#xD;&#xA;) -&gt; (Weight, Option&lt;VersionMigrationStage&gt;) {&#xD;&#xA;    let mut weight_used = Weight::zero();&#xD;&#xA;&#xD;&#xA;    // TODO: Correct weights for the components of this:&#xD;&#xA;    let todo_sv_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vn_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_already_notified_weight: Weight = T::DbWeight::get().reads(1);&#xD;&#xA;    let todo_vnt_notify_weight: Weight = T::DbWeight::get().reads_writes(1, 3);&#xD;&#xA;    let todo_vnt_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_migrate_fail_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_notify_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 3);&#xD;&#xA;&#xD;&#xA;    use VersionMigrationStage::*;&#xD;&#xA;&#xD;&#xA;    if stage == MigrateSupportedVersion {&#xD;&#xA;        // We assume that supported XCM version only ever increases, so just cycle through lower&#xD;&#xA;        // XCM versioned from the current.&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in SupportedVersion::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                if let Ok(new_key) = old_key.into_latest() {&#xD;&#xA;                    SupportedVersion::&lt;T&gt;::insert(XCM_VERSION, new_key, value);&#xD;&#xA;                }&#xD;&#xA;                weight_used.saturating_accrue(todo_sv_migrate_weight);&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = MigrateVersionNotifiers;&#xD;&#xA;    }&#xD;&#xA;    if stage == MigrateVersionNotifiers {&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in VersionNotifiers::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                if let Ok(new_key) = old_key.into_latest() {&#xD;&#xA;                    VersionNotifiers::&lt;T&gt;::insert(XCM_VERSION, new_key, value);&#xD;&#xA;                }&#xD;&#xA;                weight_used.saturating_accrue(todo_vn_migrate_weight);&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = NotifyCurrentTargets(None);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    let xcm_version = T::AdvertisedXcmVersion::get();&#xD;&#xA;&#xD;&#xA;    if let NotifyCurrentTargets(maybe_last_raw_key) = stage {&#xD;&#xA;        let mut iter = match maybe_last_raw_key {&#xD;&#xA;            Some(k) =&gt; VersionNotifyTargets::&lt;T&gt;::iter_prefix_from(XCM_VERSION, k),&#xD;&#xA;            None =&gt; VersionNotifyTargets::&lt;T&gt;::iter_prefix(XCM_VERSION),&#xD;&#xA;        };&#xD;&#xA;        while let Some((key, value)) = iter.next() {&#xD;&#xA;            let (query_id, max_weight, target_xcm_version) = value;&#xD;&#xA;            let new_key: MultiLocation = match key.clone().try_into() {&#xD;&#xA;                Ok(k) if target_xcm_version != xcm_version =&gt; k,&#xD;&#xA;                _ =&gt; {&#xD;&#xA;                    // We don't early return here since we need to be certain that we&#xD;&#xA;                    // make some progress.&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_already_notified_weight);&#xD;&#xA;                    continue&#xD;&#xA;                },&#xD;&#xA;            };&#xD;&#xA;            let response = Response::Version(xcm_version);&#xD;&#xA;            let message = Xcm(vec![QueryResponse { query_id, response, max_weight }]);&#xD;&#xA;            let event = match T::XcmRouter::send_xcm(new_key.clone(), message) {&#xD;&#xA;                Ok(()) =&gt; {&#xD;&#xA;                    let value = (query_id, max_weight, xcm_version);&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::insert(XCM_VERSION, key, value);&#xD;&#xA;                    Event::VersionChangeNotified(new_key, xcm_version)&#xD;&#xA;                },&#xD;&#xA;                Err(e) =&gt; {&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::remove(XCM_VERSION, key);&#xD;&#xA;                    Event::NotifyTargetSendFail(new_key, query_id, e.into())&#xD;&#xA;                },&#xD;&#xA;            };&#xD;&#xA;            Self::deposit_event(event);&#xD;&#xA;            weight_used.saturating_accrue(todo_vnt_notify_weight);&#xD;&#xA;            if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                let last = Some(iter.last_raw_key().into());&#xD;&#xA;                return (weight_used, Some(NotifyCurrentTargets(last)))&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = MigrateAndNotifyOldTargets;&#xD;&#xA;    }&#xD;&#xA;    if stage == MigrateAndNotifyOldTargets {&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in VersionNotifyTargets::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                let (query_id, max_weight, target_xcm_version) = value;&#xD;&#xA;                let new_key = match MultiLocation::try_from(old_key.clone()) {&#xD;&#xA;                    Ok(k) =&gt; k,&#xD;&#xA;                    Err(()) =&gt; {&#xD;&#xA;                        Self::deposit_event(Event::NotifyTargetMigrationFail(&#xD;&#xA;                            old_key, value.0,&#xD;&#xA;                        ));&#xD;&#xA;                        weight_used.saturating_accrue(todo_vnt_migrate_fail_weight);&#xD;&#xA;                        if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                            return (weight_used, Some(stage))&#xD;&#xA;                        }&#xD;&#xA;                        continue&#xD;&#xA;                    },&#xD;&#xA;                };&#xD;&#xA;&#xD;&#xA;                let versioned_key = LatestVersionedMultiLocation(&amp;new_key);&#xD;&#xA;                if target_xcm_version == xcm_version {&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::insert(XCM_VERSION, versioned_key, value);&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_migrate_weight);&#xD;&#xA;                } else {&#xD;&#xA;                    // Need to notify target.&#xD;&#xA;                    let response = Response::Version(xcm_version);&#xD;&#xA;                    let message =&#xD;&#xA;                        Xcm(vec![QueryResponse { query_id, response, max_weight }]);&#xD;&#xA;                    let event = match T::XcmRouter::send_xcm(new_key.clone(), message) {&#xD;&#xA;                        Ok(()) =&gt; {&#xD;&#xA;                            VersionNotifyTargets::&lt;T&gt;::insert(&#xD;&#xA;                                XCM_VERSION,&#xD;&#xA;                                versioned_key,&#xD;&#xA;                                (query_id, max_weight, xcm_version),&#xD;&#xA;                            );&#xD;&#xA;                            Event::VersionChangeNotified(new_key, xcm_version)&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; Event::NotifyTargetSendFail(new_key, query_id, e.into()),&#xD;&#xA;                    };&#xD;&#xA;                    Self::deposit_event(event);&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_notify_migrate_weight);&#xD;&#xA;                }&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    (weight_used, None)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L896-L1034&#xD;&#xA;&#xD;&#xA;The stage of the migration is stored in storage, so that the migration can continue in the next block if needed.&#xD;&#xA;```rust&#xD;&#xA;/// The current migration's stage, if any.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type CurrentMigration&lt;T: Config&gt; =&#xD;&#xA;    StorageValue&lt;_, VersionMigrationStage, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L392-L395" ContentLicense="CC BY-SA 4.0" />
  <row Id="22602" PostHistoryTypeId="2" PostId="5915" RevisionGUID="ff0693e7-b819-49e0-835a-8066b4dae536" CreationDate="2022-11-15T21:46:25.520" UserId="1798" Text="After upgrading the node to v0.9.32 I started seeing this error message:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-11-11 14:03:44  Error importing block 0x2062a73f1dee2fd35ad6ac25c641b08bf94cf6390b9fc7a8480d7b8ea9412eab: consensus error: Import failed: Import failed: Potential long-range attack: block not in finalized chain.    &#xD;&#xA;2022-11-11 14:03:44  Error importing block 0xdab08906a732245b361fd46c55c563be85515375b5b244250346e42592a53688: consensus error: Import failed: Parent block of 0xdab0…3688 has no associated weight    &#xD;&#xA;2022-11-11 14:03:44 Block import error: Potential long-range attack: block not in finalized chain. &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I downgraded back to v0.9.30 and the error persists. Any ideas on the cause or remedy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22604" PostHistoryTypeId="1" PostId="5915" RevisionGUID="ff0693e7-b819-49e0-835a-8066b4dae536" CreationDate="2022-11-15T21:46:25.520" UserId="1798" Text="Error importing blocks after upgrading to v0.9.32" ContentLicense="CC BY-SA 4.0" />
  <row Id="22605" PostHistoryTypeId="3" PostId="5915" RevisionGUID="ff0693e7-b819-49e0-835a-8066b4dae536" CreationDate="2022-11-15T21:46:25.520" UserId="1798" Text="|polkadot|validator|nodes|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22606" PostHistoryTypeId="2" PostId="5916" RevisionGUID="da81faf4-5be1-46b4-9fab-47492c75b541" CreationDate="2022-11-15T23:51:51.567" UserId="590" Text="What does the #[extra] macro do in benchmarks?&#xD;&#xA;&#xD;&#xA;I was looking at how benchmarks are being implemented on the Balances pallet. I notice the following [benchmarks](https://github.com/paritytech/substrate/blob/master/frame/balances/src/benchmarking.rs#L59): &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;benchmarks_instance_pallet {&#xD;&#xA;  transfer {}&#xD;&#xA;&#xD;&#xA;  #[extra]&#xD;&#xA;  transfer_best_case {}&#xD;&#xA;&#xD;&#xA; ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;When I searched the code for `T::WeightInfo::transfer_best_case()` I could not find where that was used in the balances code.&#xD;&#xA;&#xD;&#xA;Can you please explain what the macro extra is doing?&#xD;&#xA;&#xD;&#xA;Also, when looking at the benchmarks for transfer extrinsic I was expecting some seeded account data to calculate the worst-case scenario. Can you please explain the decision on not seeded accounts before hand?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22608" PostHistoryTypeId="1" PostId="5916" RevisionGUID="da81faf4-5be1-46b4-9fab-47492c75b541" CreationDate="2022-11-15T23:51:51.567" UserId="590" Text="Benchmark extra macro" ContentLicense="CC BY-SA 4.0" />
  <row Id="22609" PostHistoryTypeId="3" PostId="5916" RevisionGUID="da81faf4-5be1-46b4-9fab-47492c75b541" CreationDate="2022-11-15T23:51:51.567" UserId="590" Text="|benchmarking|weight|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22610" PostHistoryTypeId="2" PostId="5917" RevisionGUID="3b723fe2-501c-4f3c-90f0-af4d35144b63" CreationDate="2022-11-16T00:25:15.127" UserId="1798" Text="I understand that in order to maintain an account in state on the Relay Chain an account needs to hold more than the Existential Deposit (1 DOT/0.000003 KSM), but I am wondering if assets deployed on Statemint/Statmine also need to maintain a minimum balance to avoid being reaped. If so how is this determined?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22612" PostHistoryTypeId="1" PostId="5917" RevisionGUID="3b723fe2-501c-4f3c-90f0-af4d35144b63" CreationDate="2022-11-16T00:25:15.127" UserId="1798" Text="Do assets (from the asset pallet on State[mine/mint]) have an existential deposit?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22613" PostHistoryTypeId="3" PostId="5917" RevisionGUID="3b723fe2-501c-4f3c-90f0-af4d35144b63" CreationDate="2022-11-16T00:25:15.127" UserId="1798" Text="|statemine|statemint|existential-deposit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22614" PostHistoryTypeId="5" PostId="5900" RevisionGUID="c42cf020-b6bf-4206-b585-1f41dd0e066c" CreationDate="2022-11-16T00:47:32.333" UserId="28" Comment="deleted 1 character in body" Text="I think your mental model is a little off here, at least the way it is written.&#xD;&#xA;&#xD;&#xA;There is a binary specific for the Polkadot relay chain node, and software specific for each parachain node. Each of these node binaries have a set of configurations on how you want to run that node, and a node can play multiple of those roles.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;- archive node: this is a configuration where a node will keep all blocks and the full state of any block in the database. Lots of nodes do not need all this information, so these choose to prune their blocks, saving disk space. You do not need to be an archive node to participate in the network, but you will need it if you want to easily query data from the past.&#xD;&#xA;&#xD;&#xA;- full node: this is basically a non-archive node, but can still participate in block production. Usually this means keeping enough blocks around to allow for block reorganization before things are finalized.&#xD;&#xA;&#xD;&#xA;- block producing nodes: there are nodes which are configured to produce blocks. For the relay chain these are validators, and for parachains these are collators. Their specific role is different in the overall Polkadot protocol, but at an abstract level, you can think of them both as block producers.&#xD;&#xA;&#xD;&#xA;- boot nodes: these nodes which are not configured in a specific way, but are just nodes which have a well known network address, so that new nodes can start to peer with others on the network. Any node above could play this role.&#xD;&#xA;&#xD;&#xA;- rpc nodes: these are nodes which publicly expose their RPC endpoints. Any of the nodes above could also be an RPC node, but usually it requires a little bit of extra security considerations, since exposing your RPC nodes also exposes you to people who want to DoS spam your node with requests.&#xD;&#xA;&#xD;&#xA;So as you can see, you can have a single node which is an archive, boot, and rpc node based on its configuration.&#xD;&#xA;&#xD;&#xA;The one thing you definitely got wrong is &quot;nominator&quot;. There is no nominator node. As a nominator, you do not need to run any software, you just need to configure your nominations on the blockchain, and everything is handled by the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="22615" PostHistoryTypeId="2" PostId="5918" RevisionGUID="b3eeaaac-bbce-485d-b4fe-87938396624a" CreationDate="2022-11-16T01:40:02.187" UserId="3109" Text="In substrate node template we can see that blocks are producing and finalizing if no transaction happening so how I can make my node to only generate blocks when there are transactions happening.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22617" PostHistoryTypeId="1" PostId="5918" RevisionGUID="b3eeaaac-bbce-485d-b4fe-87938396624a" CreationDate="2022-11-16T01:40:02.187" UserId="3109" Text="Blocks production and Finalization in substrate node template" ContentLicense="CC BY-SA 4.0" />
  <row Id="22618" PostHistoryTypeId="3" PostId="5918" RevisionGUID="b3eeaaac-bbce-485d-b4fe-87938396624a" CreationDate="2022-11-16T01:40:02.187" UserId="3109" Text="|substrate-node-template|runtime|block-production|finality|substrate-block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22619" PostHistoryTypeId="4" PostId="5918" RevisionGUID="748dbed7-5d9f-4b5e-b367-1ac723147c61" CreationDate="2022-11-16T06:01:39.493" UserId="139" Comment="Added a more meaningful title to the question." Text="How can I make my node generate blocks only when they receive transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22620" PostHistoryTypeId="2" PostId="5919" RevisionGUID="0f4cb623-a704-4803-b2dc-70a1a14a68de" CreationDate="2022-11-16T07:19:20.760" UserId="445" Text="When I walk through the sp_tracing documents, it's an overview and does not show us how to use it&#xD;&#xA;&#xD;&#xA;I have some questions about sp_tracing:&#xD;&#xA;+ How to use it? What command that we run it? (Debug Mode?)&#xD;&#xA;+ What is it different with Debug https://docs.substrate.io/test/debug/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22622" PostHistoryTypeId="1" PostId="5919" RevisionGUID="0f4cb623-a704-4803-b2dc-70a1a14a68de" CreationDate="2022-11-16T07:19:20.760" UserId="445" Text="How to use sp_tracing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22623" PostHistoryTypeId="3" PostId="5919" RevisionGUID="0f4cb623-a704-4803-b2dc-70a1a14a68de" CreationDate="2022-11-16T07:19:20.760" UserId="445" Text="|runtime|frame|substrate-node|modules|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22624" PostHistoryTypeId="2" PostId="5920" RevisionGUID="0e4d0992-321a-419a-8888-aa94a235d1d3" CreationDate="2022-11-16T08:08:30.793" UserId="3317" Text="The Existential Deposit (ED), transfer fees, and the deposits for proxy/multisig operations on Statemint are about 1/10th of the values on the Relay chain. So, the Existential Deposit of a Statemint account is 0.100 DOT, when compared to 1 DOT on Polkadot." ContentLicense="CC BY-SA 4.0" />
  <row Id="22626" PostHistoryTypeId="2" PostId="5921" RevisionGUID="efa07c9f-24d3-466d-b78e-8b0d6a983830" CreationDate="2022-11-16T09:20:25.950" UserId="2673" Text="That's an undocumented tag allowing to skip some benchmarks unless `--extra` flag is given. It was introduced in [this PR](https://github.com/paritytech/substrate/pull/6610). From the description:&#xD;&#xA;&gt; * A new `#[extra]` tag is introduced into the `benchmarks!` macro, allowing users to mark benchmarks as &quot;extra&quot; and have them excluded from the default running benchmarks.&#xD;&#xA;&gt; * Added `--extra` feature flag to benchmarking-cli to enable users to run the extra benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="22628" PostHistoryTypeId="2" PostId="5922" RevisionGUID="2ace24f3-02d7-49f6-817c-35b67f579d6a" CreationDate="2022-11-16T10:00:56.057" UserId="3319" Text="Correct me if i'm wrong: In GRANDPA, validators cast votes for the next finalized Block, which is as far as i understand the Block hash signed + metadata(round number,...etc).&#xD;&#xA;&#xD;&#xA;My question are:&#xD;&#xA; &#xD;&#xA; 1. Are these votes included in the Block itself? if so is it in the justifications field?&#xD;&#xA; 2. when a new validator joins the network or lets say a node crashed for a while and reconnected but missed some blocks and so he imports those blocks, does he check the justification of a block to verify its finality? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22630" PostHistoryTypeId="1" PostId="5922" RevisionGUID="2ace24f3-02d7-49f6-817c-35b67f579d6a" CreationDate="2022-11-16T10:00:56.057" UserId="3319" Text="are justification in the Block the actual votes cast by validators in GRANDPA?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22631" PostHistoryTypeId="3" PostId="5922" RevisionGUID="2ace24f3-02d7-49f6-817c-35b67f579d6a" CreationDate="2022-11-16T10:00:56.057" UserId="3319" Text="|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22632" PostHistoryTypeId="2" PostId="5923" RevisionGUID="84d6342d-2a44-404d-966e-5cc6f27879c1" CreationDate="2022-11-16T10:18:51.027" UserId="234" Text="Assets (from [assets pallet][1]) do not have  existential deposits but the native token ([pallet balances - ED][2]) does.&#xD;&#xA;For example, if you want to [create a new asset in Statemine][3] and since the native token of Statemine is KSM then you need to have in your Statemine account an existential deposit of 0.000003 KSM.&#xD;&#xA;&#xD;&#xA;However, what the asset pallet has is the notion of [Sufficiency][4] and the attribute [is_sufficient][5]&#xD;&#xA;&#xD;&#xA;So if an asset is deemed as sufficient (through governance) then the existential deposit is not needed.&#xD;&#xA;&#xD;&#xA;As mentioned in the [wiki][6] :&#xD;&#xA;&#xD;&#xA;*&gt; Only the network's governance mechanism can deem an asset as&#xD;&#xA;&gt; _sufficient_. A balance of a non-sufficient asset (the default) can only exist on already-existing accounts. That is, a user could not&#xD;&#xA;&gt; create a new account on-chain by transferring an insufficient asset to&#xD;&#xA;&gt; it; the account must already exist by having more than the existential&#xD;&#xA;&gt; deposit in DOT (or a sufficient asset). However, assets deemed&#xD;&#xA;&gt; _sufficient_ can instantiate accounts. In the future, _sufficient_ assets will be able to pay transaction fees, such that users can&#xD;&#xA;&gt; transact on Statemint without the need for DOT .*&#xD;&#xA;&#xD;&#xA;An example [proposal][7] of this case is from RMRK where the notion of `Sufficiency` is again explained &#xD;&#xA;&#xD;&#xA;*&gt; Sufficiency is the concept of allowing a token on Statemine to exist&#xD;&#xA;&gt; and be used without accounts needing an existential deposit of KSM to&#xD;&#xA;&gt; accept the token.*&#xD;&#xA;&#xD;&#xA;and in which they proposed to make the RMRK token sufficient so no need for existential deposit in KSM.&#xD;&#xA;&#xD;&#xA;**Adding additional resources that give more context on the above :**&#xD;&#xA;- [Sufficient and non-sufficient assets][8]&#xD;&#xA;&#xD;&#xA;*&gt; To hold a non-sufficient asset in an account, the account needs to&#xD;&#xA;&gt; exist on-chain, which means it needs to have a balance in the native&#xD;&#xA;&gt; asset at least as much as the [Existential Deposit&#xD;&#xA;&gt; (ED)](https://support.polkadot.network/en/support/solutions/articles/65000168651).&#xD;&#xA;&gt; This means **0.1 DOT** on Statemint and **0.000003333 KSM** on&#xD;&#xA;&gt; Statemine. As you may have noticed, these existential deposits are ten&#xD;&#xA;&gt; times smaller than they are on the Relay Chains.&#xD;&#xA;&gt; So, to send a non-sufficient asset, you need to ensure that the&#xD;&#xA;&gt; recipient account has at least the ED. A sufficient asset doesn't&#xD;&#xA;&gt; require the account to have any balance in the native token in order&#xD;&#xA;&gt; to be received.*&#xD;&#xA;&#xD;&#xA;- [Assets][6]&#xD;&#xA;- [Assets on Polkadot][9] &#xD;&#xA;- [Influence of Existential Deposits on account assets][10]&#xD;&#xA;- [Account Data Structure from Substrate Docs][11] &#xD;&#xA;&#xD;&#xA;*&gt; The `sufficients` reference counter indicates if an account is&#xD;&#xA;&gt; self-sufficient and can exist by itself. For example, in the Assets&#xD;&#xA;&gt; pallet, an account can have sufficient number of certain assets but&#xD;&#xA;&gt; without owning any native account balance.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs#L18&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L41&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/kusama-statemine&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs#L59&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs#L1118&#xD;&#xA;  [6]: https://wiki.polkadot.network/docs/learn-assets#creation-and-management&#xD;&#xA;  [7]: https://kusama.polkassembly.io/post/1482&#xD;&#xA;  [8]: https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-&#xD;&#xA;  [9]: https://wiki.polkadot.network/docs/build-integrate-assets#assets-basics&#xD;&#xA;  [10]: https://substrate.stackexchange.com/questions/2447/influence-of-existential-deposits-on-account-assets&#xD;&#xA;  [11]: https://docs.substrate.io/reference/account-data-structures/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22634" PostHistoryTypeId="5" PostId="5923" RevisionGUID="d1538fce-ecfd-4b07-b97b-bafff30402dc" CreationDate="2022-11-16T10:24:08.733" UserId="234" Comment="deleted 8 characters in body" Text="Assets (from [assets pallet][1]) do not have  existential deposits but the native token ([pallet balances - ED][2]) does.&#xD;&#xA;For example, if you want to [create a new asset in Statemine][3] and since the native token of Statemine is KSM then you need to have in your Statemine account an existential deposit of 0.000003 KSM.&#xD;&#xA;&#xD;&#xA;However, what the asset pallet has is the notion of [Sufficiency][4] and the attribute [is_sufficient][5]&#xD;&#xA;&#xD;&#xA;So if an asset is deemed as sufficient (through governance) then the existential deposit is not needed.&#xD;&#xA;&#xD;&#xA;As mentioned in the [wiki][6] :&#xD;&#xA;&#xD;&#xA;&gt; Only the network's governance mechanism can deem an asset as&#xD;&#xA;&gt; _sufficient_. A balance of a non-sufficient asset (the default) can only exist on already-existing accounts. That is, a user could not&#xD;&#xA;&gt; create a new account on-chain by transferring an insufficient asset to&#xD;&#xA;&gt; it; the account must already exist by having more than the existential&#xD;&#xA;&gt; deposit in DOT (or a sufficient asset). However, assets deemed&#xD;&#xA;&gt; _sufficient_ can instantiate accounts. In the future, _sufficient_ assets will be able to pay transaction fees, such that users can&#xD;&#xA;&gt; transact on Statemint without the need for DOT .&#xD;&#xA;&#xD;&#xA;An example [proposal][7] of this case is from RMRK where the notion of `Sufficiency` is again explained &#xD;&#xA;&#xD;&#xA;&gt; Sufficiency is the concept of allowing a token on Statemine to exist&#xD;&#xA;&gt; and be used without accounts needing an existential deposit of KSM to&#xD;&#xA;&gt; accept the token.&#xD;&#xA;&#xD;&#xA;and in which they proposed to make the RMRK token sufficient so no need for existential deposit in KSM.&#xD;&#xA;&#xD;&#xA;**Adding additional resources that give more context on the above :**&#xD;&#xA;- [Sufficient and non-sufficient assets][8]&#xD;&#xA;&#xD;&#xA;&gt; To hold a non-sufficient asset in an account, the account needs to&#xD;&#xA;&gt; exist on-chain, which means it needs to have a balance in the native&#xD;&#xA;&gt; asset at least as much as the [Existential Deposit&#xD;&#xA;&gt; (ED)](https://support.polkadot.network/en/support/solutions/articles/65000168651).&#xD;&#xA;&gt; This means **0.1 DOT** on Statemint and **0.000003333 KSM** on&#xD;&#xA;&gt; Statemine. As you may have noticed, these existential deposits are ten&#xD;&#xA;&gt; times smaller than they are on the Relay Chains.&#xD;&#xA;&gt; So, to send a non-sufficient asset, you need to ensure that the&#xD;&#xA;&gt; recipient account has at least the ED. A sufficient asset doesn't&#xD;&#xA;&gt; require the account to have any balance in the native token in order&#xD;&#xA;&gt; to be received.&#xD;&#xA;&#xD;&#xA;- [Assets][6]&#xD;&#xA;- [Assets on Polkadot][9] &#xD;&#xA;- [Influence of Existential Deposits on account assets][10]&#xD;&#xA;- [Account Data Structure from Substrate Docs][11] &#xD;&#xA;&#xD;&#xA;&gt; The `sufficients` reference counter indicates if an account is&#xD;&#xA;&gt; self-sufficient and can exist by itself. For example, in the Assets&#xD;&#xA;&gt; pallet, an account can have sufficient number of certain assets but&#xD;&#xA;&gt; without owning any native account balance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs#L18&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L41&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/kusama-statemine&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs#L59&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs#L1118&#xD;&#xA;  [6]: https://wiki.polkadot.network/docs/learn-assets#creation-and-management&#xD;&#xA;  [7]: https://kusama.polkassembly.io/post/1482&#xD;&#xA;  [8]: https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-&#xD;&#xA;  [9]: https://wiki.polkadot.network/docs/build-integrate-assets#assets-basics&#xD;&#xA;  [10]: https://substrate.stackexchange.com/questions/2447/influence-of-existential-deposits-on-account-assets&#xD;&#xA;  [11]: https://docs.substrate.io/reference/account-data-structures/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22635" PostHistoryTypeId="52" PostId="5917" RevisionGUID="52d11a73-18f8-449b-ae18-ba383100943a" CreationDate="2022-11-16T10:54:04.497" />
  <row Id="22636" PostHistoryTypeId="2" PostId="5924" RevisionGUID="9a086d7c-0317-4ab9-ad11-3174be742828" CreationDate="2022-11-16T11:38:27.057" UserId="3414" Text="I have added election_phragmen pallet in westend chain but the elections are still not taking place so i am facing an issue in  adding validators. The validators i am adding remain in waiting state.In the logs there come an error of &quot;Low connectivity - authority lookup failed for too many validators.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ckQeC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22638" PostHistoryTypeId="1" PostId="5924" RevisionGUID="9a086d7c-0317-4ab9-ad11-3174be742828" CreationDate="2022-11-16T11:38:27.057" UserId="3414" Text="Why the elections are not happening in polkadot relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22639" PostHistoryTypeId="3" PostId="5924" RevisionGUID="9a086d7c-0317-4ab9-ad11-3174be742828" CreationDate="2022-11-16T11:38:27.057" UserId="3414" Text="|polkadot-js|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22640" PostHistoryTypeId="2" PostId="5925" RevisionGUID="6b176f2f-f0ab-4b7f-b567-9a3280d6d3b4" CreationDate="2022-11-16T11:44:07.203" UserId="165" Text="As it has been pointed out already here `codeSubstitutes` is a good option only when a fix is needed to be included into the runtime because there is no other way to make it through.&#xD;&#xA;This is the case when a stalled chain needs some change in the runtime, but as it is stalled, cannot produce any block, and thus, a runtime upgrade is not a possible way.&#xD;&#xA;&#xD;&#xA;Usually the steps are:&#xD;&#xA;&#xD;&#xA; - Include the fix in the code(branch/release/version) from which the running, and stalled, runtime has been built out from.&#xD;&#xA; - Do **not** bump the spec version of the runtime. As the documentation reads, this is a code substitution and it will be used until a new runtime with a new spec version is applied.&#xD;&#xA; - Include this new wasm blob in the chain spec of your running chain under the map `codeSubstitutes`. Its key will be a block number, something recent or even the last block the chain has produced. And as value of this map, the wasm itself.&#xD;&#xA; - Then, the code substitution will be effective once the nodes are running again from the block number specified.&#xD;&#xA; - **If a parachain**, next step will be getting this same wasm used in `codeSubstitutes` into the relay storage for your para. Usually a governance proposal would be needed in order to get this done. E.g. of the call that could be proposed:  [force_set_current_code](https://github.com/paritytech/polkadot/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/parachains/src/paras/mod.rs#L792)(`paraId`, wasm_used_in_codeSubstitutes).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="22642" PostHistoryTypeId="5" PostId="5925" RevisionGUID="3389ef8d-52e6-4dc2-954f-5e171838525d" CreationDate="2022-11-16T11:55:35.297" UserId="165" Comment="deleted 2 characters in body" Text="As it has been pointed out already here `codeSubstitutes` is a good option only when a fix is needed to be included into the runtime because there is no other way to make it through.&#xD;&#xA;This is the case when a stalled chain needs some change in the runtime, but as it is stalled, cannot produce any block, and thus, a runtime upgrade is not a possible way.&#xD;&#xA;&#xD;&#xA;Usually the steps are:&#xD;&#xA;&#xD;&#xA; - Include the fix in the code(branch/release/version) from which the running, and stalled, runtime has been built out from.&#xD;&#xA; - Do **not** bump the spec version of the runtime. As the documentation reads, this is a code substitution and it will be used until a new runtime with a new spec version is applied.&#xD;&#xA; - Include this new wasm blob in the chain spec of your running chain under the map `codeSubstitutes`. Its key will be a block number, something recent or even the last block the chain has produced. And as value of this map, the wasm itself.&#xD;&#xA; - Then, the code substitution will be effective once the nodes are running again from the block number specified.&#xD;&#xA; - **If a parachain**, next step will be getting this same wasm used in `codeSubstitutes` into the relay storage for your para. Usually a governance proposal would be needed in order to get this done. E.g. of a call that could be proposed:  [force_set_current_code](https://github.com/paritytech/polkadot/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/parachains/src/paras/mod.rs#L792)(`paraId`, wasm_used_in_codeSubstitutes).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="22643" PostHistoryTypeId="6" PostId="5924" RevisionGUID="5c3f6d77-86ce-47d9-a8ab-8dcbbd75411f" CreationDate="2022-11-16T11:56:40.433" UserId="165" Comment="edited tags" Text="|networking|substrate-parachain-template|election-phragmen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22644" PostHistoryTypeId="2" PostId="5926" RevisionGUID="d7794fc7-4563-4e05-a422-3536579a4d17" CreationDate="2022-11-16T12:07:23.460" UserId="165" Text="That warning is telling you that discovery is failing for at least 1/3 of validators. Which, depending on how many are you running this could be, 1 if the total number is 3.&#xD;&#xA;&#xD;&#xA;This warning is coming from the networking layer, not the runtime. But if validators are not being discovered, or are not reachable, for whatever reason, then it might make sense that elections cannot happen if there are not validators to be elected. (Speaking form the top of my head here, so might not be 100% accurate)&#xD;&#xA;&#xD;&#xA;Try checking how the network is configured, if there might be something avoiding this gossiping to happen between validators. Maybe firewalls, acls... whatever you might have in place.&#xD;&#xA;If that is not the case, launching the nodes again might help ? At least, to check if the scenario can be reproduced, or if the warning maintains over time." ContentLicense="CC BY-SA 4.0" />
  <row Id="22646" PostHistoryTypeId="5" PostId="5922" RevisionGUID="fdf29423-84e7-4d92-9ab8-f9c018950805" CreationDate="2022-11-16T12:20:42.243" UserId="3319" Comment="added 1 character in body" Text="Correct me if i'm wrong: In GRANDPA, validators cast votes for the next finalized Block, which is as far as i understand the Block hash signed + metadata(round number,...etc).&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA; &#xD;&#xA; 1. Are these votes included in the Block itself? if so is it in the justifications field?&#xD;&#xA; 2. when a new validator joins the network or lets say a node crashed for a while and reconnected but missed some blocks and so he imports those blocks, does he check the justification of a block to verify its finality? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22647" PostHistoryTypeId="2" PostId="5927" RevisionGUID="75141128-9886-453b-abe3-c1379f759a8b" CreationDate="2022-11-16T12:20:58.693" UserId="25" Text="I have a slightly custom chain spec that makes regular chain spec serializable with serde to/from JSON.&#xD;&#xA;&#xD;&#xA;In the impl of `sp_runtime::BuildStorage` I just forward `assimilate_storage` call to the underlying chain spec:&#xD;&#xA;```rust&#xD;&#xA;impl&lt;GenesisConfig, Extensions&gt; BuildStorage for SerializableChainSpec&lt;GenesisConfig, Extensions&gt;&#xD;&#xA;where&#xD;&#xA;    GenesisConfig: RuntimeGenesis,&#xD;&#xA;{&#xD;&#xA;    fn assimilate_storage(&amp;self, storage: &amp;mut Storage) -&gt; Result&lt;(), String&gt; {&#xD;&#xA;        self.chain_spec.assimilate_storage(storage)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This worked great until I tried to run benchmarks, when it failed with:&#xD;&#xA;```&#xD;&#xA;Error: SubstrateCli(Input(&quot;`assimilate_storage` not implemented for `ChainSpec`.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Not 100% sure what this means and what implementation should have looked like instead, any suggestions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22649" PostHistoryTypeId="1" PostId="5927" RevisionGUID="75141128-9886-453b-abe3-c1379f759a8b" CreationDate="2022-11-16T12:20:58.693" UserId="25" Text="`assimilate_storage` not implemented for `ChainSpec`" ContentLicense="CC BY-SA 4.0" />
  <row Id="22650" PostHistoryTypeId="3" PostId="5927" RevisionGUID="75141128-9886-453b-abe3-c1379f759a8b" CreationDate="2022-11-16T12:20:58.693" UserId="25" Text="|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22651" PostHistoryTypeId="2" PostId="5928" RevisionGUID="15ebf7df-fbd9-4e9a-9a59-8e1baf257c65" CreationDate="2022-11-16T12:46:48.063" UserId="16" Text="The problem is here that the `Test` value passed to `initialize_contract` is initialized with `SpreadAllocate::allocate_spread`. You are expecting that it would be initialized using your `Default` implementation. This is why you need to manually override this value in `initialize_contract` to make it work as expected.&#xD;&#xA;&#xD;&#xA;This behaviour is really confusing and should have never made it into ink!. This is why we got rid of `SpreadAllocate` and `initialize_contract` in ink!4." ContentLicense="CC BY-SA 4.0" />
  <row Id="22653" PostHistoryTypeId="2" PostId="5929" RevisionGUID="9149b485-3e0d-4853-a35e-268eb875ccb4" CreationDate="2022-11-16T13:44:16.183" UserId="3142" Text="Why is `CheckNonZeroSender` a signed extension rather than part of the `UncheckedExtrinsic::check()` when checking the payload for a bad proof?  What exactly does the non-zero check do?  It appears to be checking all the bytes to see if they are zero?&#xD;&#xA;&#xD;&#xA;    if who.using_encoded(|d| d.iter().all(|x| *x == 0)) {&#xD;&#xA;    	return Err(TransactionValidityError::Invalid(InvalidTransaction::BadSigner))&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="22655" PostHistoryTypeId="1" PostId="5929" RevisionGUID="9149b485-3e0d-4853-a35e-268eb875ccb4" CreationDate="2022-11-16T13:44:16.183" UserId="3142" Text="CheckNonZeroSender" ContentLicense="CC BY-SA 4.0" />
  <row Id="22656" PostHistoryTypeId="3" PostId="5929" RevisionGUID="9149b485-3e0d-4853-a35e-268eb875ccb4" CreationDate="2022-11-16T13:44:16.183" UserId="3142" Text="|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22657" PostHistoryTypeId="5" PostId="5925" RevisionGUID="9a608f26-741e-46a1-bdae-47200acb4f84" CreationDate="2022-11-16T14:11:04.920" UserId="29" Comment="added 4 characters in body" Text="As it has been pointed out already here `codeSubstitutes` is a good option only when a fix is needed to be included into the runtime because there is no other way to make it through.&#xD;&#xA;This is the case when a stalled chain needs some change in the runtime, but as it is stalled, cannot produce any block, and thus, a runtime upgrade is not a possible way.&#xD;&#xA;&#xD;&#xA;Usually the steps are:&#xD;&#xA;&#xD;&#xA; - Include the fix in the code(branch/release/version) from which the running, and stalled, runtime has been built out from.&#xD;&#xA; - Do **not** bump the spec version of the runtime. As the documentation reads, this is a code substitution and it will be used until a new runtime with a new spec version is applied.&#xD;&#xA; - Include this new wasm blob in the chain spec of your running chain under the map `codeSubstitutes`. Its key will be a block number, something recent or even the last block the chain has produced. And as value of this map, the wasm itself.&#xD;&#xA; - Then, the code substitution will be effective once the nodes are running again from the block number specified.&#xD;&#xA; - **If a parachain**, the next step will be getting this same wasm used in `codeSubstitutes` into the relay storage for your para. Usually a governance proposal would be needed in order to get this done. E.g. of a call that could be proposed:  [force_set_current_code](https://github.com/paritytech/polkadot/blob/756ccc35e93d1a78e3c71a0e67ae4da5f1d09f69/runtime/parachains/src/paras/mod.rs#L792)(`paraId`, wasm_used_in_codeSubstitutes).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="22658" PostHistoryTypeId="2" PostId="5930" RevisionGUID="1baf4d1a-3665-4ae2-888c-02099eae2593" CreationDate="2022-11-16T14:59:55.077" UserId="251" Text="I think this because the all-zero address is a 'well-known' key.&#xD;&#xA;&#xD;&#xA;It is dangerous, and people love to use the default value. Maybe get an account from `Vec::default()` in some corner cases.&#xD;&#xA;&#xD;&#xA;So we forbid using this address to send transactions.&#xD;&#xA;&#xD;&#xA;And you might want to learn more detail about the all-zero address.&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/982/why-does-the-all-0-public-key-have-a-known-private-key-in-sr25519-and-ed25519" ContentLicense="CC BY-SA 4.0" />
  <row Id="22660" PostHistoryTypeId="2" PostId="5931" RevisionGUID="86775573-976f-4cfb-844f-4ebc2a813d17" CreationDate="2022-11-16T15:01:54.373" UserId="73" Text="The implementation of `BuildStorage` for `ChainSpec` was implementing `assimilate_storage` by returning the error you mentioned. It seems that back in the days I didn't implemented this function properly, but don't ask me why...&#xD;&#xA;&#xD;&#xA;Nevertheless, after this [pr][1] it will be fixed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/12720" ContentLicense="CC BY-SA 4.0" />
  <row Id="22666" PostHistoryTypeId="2" PostId="5933" RevisionGUID="cc31c312-9c81-4ef3-abd1-1aa6b75dfe4c" CreationDate="2022-11-16T15:51:23.253" UserId="73" Text="`sr25519` and `ed25519` the private key for the all-zeros-public-key is known. However, in `ecdsa` this isn't the case and people used the all-zeros-public-key as destination when they wanted to &quot;burn&quot; tokens, aka make them inaccessible. To mimic the same behavior, there exists this `CheckNonZeroSender` extension in Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="22668" PostHistoryTypeId="2" PostId="5934" RevisionGUID="226e704a-c3f8-4173-a2ef-aec3fde27a49" CreationDate="2022-11-16T15:55:35.800" UserId="3142" Text="I am looking to process deletions in batches yet avoid using `on_initialize()`.  Can I submit an inherent from the call to process next batch in a subsequent block?  If so, what would the code to create/submit the inherent look like?&#xD;&#xA;&#xD;&#xA;        let LIMIT = 256;&#xD;&#xA;&#xD;&#xA;		pub fn delete(origin: OriginFor&lt;T&gt;, id:u32) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let items = getItemsFromStorage(id);&#xD;&#xA;			let num_items = items.count();&#xD;&#xA;			let num_deleted = remove_items_for(items, LIMIT);&#xD;&#xA;			if (num_deleted &lt; num_items) {&#xD;&#xA;			  // Create and submit inherent to delete/remove the remainder of the items&#xD;&#xA;              //&#xD;&#xA;              // Inherent: delete_remaining_items_for(id);&#xD;&#xA;              // &#xD;&#xA;  			}&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}" ContentLicense="CC BY-SA 4.0" />
  <row Id="22670" PostHistoryTypeId="1" PostId="5934" RevisionGUID="226e704a-c3f8-4173-a2ef-aec3fde27a49" CreationDate="2022-11-16T15:55:35.800" UserId="3142" Text="Submit an inherent from an extrinsic call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22671" PostHistoryTypeId="3" PostId="5934" RevisionGUID="226e704a-c3f8-4173-a2ef-aec3fde27a49" CreationDate="2022-11-16T15:55:35.800" UserId="3142" Text="|inherent|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22672" PostHistoryTypeId="5" PostId="5620" RevisionGUID="2c8a3c78-4f90-4e20-80cd-ae8798663969" CreationDate="2022-11-16T17:38:23.600" UserId="3317" Comment="deleted 16 characters in body" Text="It depends on the situation so one is not better than the other. Unsigned extrinsics can be used by validators, very similar to inherents (adding information to a block). Maybe when the use case is very generic you might find good use with it. &#xD;&#xA;However, for transactions it is usual the case that you want to check the signer and if it is a more specific use case, it is advised to use the Pays::No.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22675" PostHistoryTypeId="2" PostId="5935" RevisionGUID="82b6f008-55f5-4898-b816-11c49be4922e" CreationDate="2022-11-16T18:43:25.053" UserId="3142" Text="Why use `pre_dispatch()` vs. `validate()`?  What are some guidelines for using `pre_dispatch()`, `post_dispatch()`, and the various variants of `validate()`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22677" PostHistoryTypeId="1" PostId="5935" RevisionGUID="82b6f008-55f5-4898-b816-11c49be4922e" CreationDate="2022-11-16T18:43:25.053" UserId="3142" Text="pre_dispatch() vs validate()?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22678" PostHistoryTypeId="3" PostId="5935" RevisionGUID="82b6f008-55f5-4898-b816-11c49be4922e" CreationDate="2022-11-16T18:43:25.053" UserId="3142" Text="|validation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22679" PostHistoryTypeId="2" PostId="5936" RevisionGUID="a174e97f-d413-4b91-be6d-e7a4273ca026" CreationDate="2022-11-16T19:48:08.400" UserId="284" Text="Is a parachain sovereign account required to be the sender of XCM calls or can other accounts send messages?&#xD;&#xA;Are there specific XCM instructions that require the use of the sovereign account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22681" PostHistoryTypeId="1" PostId="5936" RevisionGUID="a174e97f-d413-4b91-be6d-e7a4273ca026" CreationDate="2022-11-16T19:48:08.400" UserId="284" Text="Is a parachain sovereign account required to be the sender of XCM calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22682" PostHistoryTypeId="3" PostId="5936" RevisionGUID="a174e97f-d413-4b91-be6d-e7a4273ca026" CreationDate="2022-11-16T19:48:08.400" UserId="284" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22683" PostHistoryTypeId="2" PostId="5937" RevisionGUID="e37f5bdb-60d1-4709-a155-eeea96b33c0d" CreationDate="2022-11-16T20:28:54.080" UserId="590" Text="Those are for hooking into different parts of the transaction lifecycle.&#xD;&#xA;&#xD;&#xA;validate&#xD;&#xA; - used to drop the transaction at the transaction pool and prevents a transaction from being gossiped.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;pre-dispatch&#xD;&#xA; - used to hook in before the transaction runs. For example, weight extrinsic uses it to increase the weight count before the transaction.&#xD;&#xA;&#xD;&#xA;post-dispatch&#xD;&#xA; - used to hook and do something after the transaction runs. For example, the transaction payment pallet uses it to refund a user of any overpaid fees. The weight extrinsic uses it to update the total amount of weight consumed in a block.&#xD;&#xA;&#xD;&#xA;Pre-dispatch also needs to call the validate function. That is because it needs to make sure that the transaction that got processed before it did not cause a modification to the state." ContentLicense="CC BY-SA 4.0" />
  <row Id="22685" PostHistoryTypeId="2" PostId="5938" RevisionGUID="ce0a482a-0091-4022-a22c-c63124f06fcd" CreationDate="2022-11-16T20:38:03.850" UserId="590" Text="[Inherents](https://docs.substrate.io/fundamentals/transaction-types/#inherent-transactions) &#xD;&#xA;&#xD;&#xA;&gt;Typically, this type of transaction is not gossiped to other nodes or stored in the transaction queue. The data inserted using an inherent transaction is assumed to be valid without requiring specific validation.&#xD;&#xA;&#xD;&#xA;Given that you probably want to gossip about this transaction so that it is verified among all collators. Perhaps, inherent is probably not the ideal solution for this." ContentLicense="CC BY-SA 4.0" />
  <row Id="22687" PostHistoryTypeId="5" PostId="5937" RevisionGUID="054968e9-6ae4-4492-a417-a56b8a76411c" CreationDate="2022-11-16T20:42:17.950" UserId="590" Comment="added 40 characters in body" Text="Those are for hooking into different parts of the transaction lifecycle.&#xD;&#xA;&#xD;&#xA;validate&#xD;&#xA; - used to drop the transaction at the transaction pool and prevents a transaction from being gossiped.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;pre-dispatch&#xD;&#xA; - used to hook in before the transaction runs. For example, weight extrinsic uses it to increase the weight count before the transaction.&#xD;&#xA;&#xD;&#xA;post-dispatch&#xD;&#xA; - used to hook and do something after the transaction runs. For example, the transaction payment pallet uses it to refund a user of any overpaid fees. The weight extrinsic uses it to update the total amount of weight consumed in a block.&#xD;&#xA;&#xD;&#xA;Pre-dispatch also needs to call the validate function. That is because it needs to make sure that the transaction that got processed before it did not cause a modification to the state that would make the transaction invalid." ContentLicense="CC BY-SA 4.0" />
  <row Id="22688" PostHistoryTypeId="5" PostId="5937" RevisionGUID="9a6c98bd-ecd9-496d-b634-3d33c6c23436" CreationDate="2022-11-16T20:51:52.910" UserId="590" Comment="added 69 characters in body" Text="Those are for hooking into different parts of the transaction lifecycle. Unlike on_intialize and on_finalize, these run for all transactions.&#xD;&#xA;&#xD;&#xA;validate&#xD;&#xA; - used to drop the transaction at the transaction pool and prevents a transaction from being gossiped.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;pre-dispatch&#xD;&#xA; - used to hook in before the transaction runs. For example, weight extrinsic uses it to increase the weight count before the transaction.&#xD;&#xA;&#xD;&#xA;post-dispatch&#xD;&#xA; - used to hook and do something after the transaction runs. For example, the transaction payment pallet uses it to refund a user of any overpaid fees. The weight extrinsic uses it to update the total amount of weight consumed in a block.&#xD;&#xA;&#xD;&#xA;Pre-dispatch also needs to call the validate function. That is because it needs to make sure that the transaction that got processed before it did not cause a modification to the state that would make the transaction invalid." ContentLicense="CC BY-SA 4.0" />
  <row Id="22689" PostHistoryTypeId="52" PostId="5929" RevisionGUID="94c8c9a8-e03a-4033-affb-a44def3d082f" CreationDate="2022-11-16T21:49:17.517" />
  <row Id="22690" PostHistoryTypeId="2" PostId="5939" RevisionGUID="80ca77ed-4033-4f46-8036-c4775105bc1c" CreationDate="2022-11-16T22:14:48.870" UserId="2060" Text="I think @robert-la-ferla and I may have answered the question that I had originally.  To recap, for an `UnsignedExtension`, looking at [primitives/runtime/src/generic/checked_exstrinsic#validate](https://github.com/paritytech/substrate/blob/8fb4138d73ad88a19331c30c36ba91796c5846e1/primitives/runtime/src/generic/checked_extrinsic.rs#L63), the call of `Extra::validate_unsigned` is where the `SignedExtra` list `validate_unsigned` functions would be called.  Only `check_weights` of the signed extensions we are using has `validate_unsigned` implemented.  For all other pallets, the `SignedExtrinsic` default `validate_unsigned` is called - which returns `Ok(...)`&#xD;&#xA;&#xD;&#xA;To expand on your #6 point, @ignacio-palacios, as you point out the next line is the `U::validate_unsigned` and we believe that this calls that generated in `construct_runtime.rs` (by calling [`expand_outer_validate_unsigned`](https://github.com/paritytech/substrate/blob/8fb4138d73ad88a19331c30c36ba91796c5846e1/frame/support/procedural/src/construct_runtime/expand/unsigned.rs#L24)), where, if the pallet whose function is being called implements `validate_unsigned`, that is called, otherwise it returns `UnknownTransaction::NoUnsignedValidator`.  In short we think line 63 passes for unsigned transactions and goes on to fail in line 64.&#xD;&#xA;&#xD;&#xA;I believe this means by default no pallet will accept unsigned extrinsics, and to accept one must implement `validate_unsigned` in the pallet and do whatever checks are needed to allow a given unsigned extrinsic call.&#xD;&#xA;&#xD;&#xA;Please correct me if I'm wrong." ContentLicense="CC BY-SA 4.0" />
  <row Id="22692" PostHistoryTypeId="2" PostId="5940" RevisionGUID="889b6a12-93d9-4482-994a-5acec7b44d6e" CreationDate="2022-11-16T22:41:43.787" UserId="29" Text="I would like to better understand what the parachain validation function is and how it is used throughout Polkadot.&#xD;&#xA;&#xD;&#xA;In [The Polkadot Parachain Host Implementers' Guide](https://paritytech.github.io/polkadot/book/glossary.html), it says that the parachain validation function (PVF) is:&#xD;&#xA;&gt; The validation code that is run by validators on parachains or parathreads.&#xD;&#xA;&#xD;&#xA;And later it gives a more technical definition:&#xD;&#xA;&#xD;&#xA;&gt; Often referred to as PoV, this is a type-safe wrapper around bytes&#xD;&#xA;&gt; (Vec&lt;u8&gt;) when referring to data that acts as a stateless-client proof&#xD;&#xA;&gt; of validity of a candidate, when used as input to the validation&#xD;&#xA;&gt; function of the para.&#xD;&#xA;&#xD;&#xA;- https://paritytech.github.io/polkadot/book/types/availability.html#proof-of-validity&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22694" PostHistoryTypeId="1" PostId="5940" RevisionGUID="889b6a12-93d9-4482-994a-5acec7b44d6e" CreationDate="2022-11-16T22:41:43.787" UserId="29" Text="What is the parachain validation function (PVF)? And how is it used throughout Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22695" PostHistoryTypeId="3" PostId="5940" RevisionGUID="889b6a12-93d9-4482-994a-5acec7b44d6e" CreationDate="2022-11-16T22:41:43.787" UserId="29" Text="|storage|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22696" PostHistoryTypeId="2" PostId="5941" RevisionGUID="4647a191-1de7-4175-85e5-a7e3f8120edd" CreationDate="2022-11-16T22:41:43.787" UserId="29" Text="Parachain Validation Function (PVF)&#xD;&#xA;```rust&#xD;&#xA;/// A struct that carries code of a parachain validation function and its hash.&#xD;&#xA;///&#xD;&#xA;/// Should be cheap to clone.&#xD;&#xA;#[derive(Clone)]&#xD;&#xA;pub struct Pvf {&#xD;&#xA;	pub(crate) code: Arc&lt;Vec&lt;u8&gt;&gt;,&#xD;&#xA;	pub(crate) code_hash: ValidationCodeHash,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/c289aced8c7f124acd60d0764de35cec1047549f/node/core/pvf/src/pvf.rs#L22-L29&#xD;&#xA;&#xD;&#xA;Remember that a parachain runtime is essentially a state-transition function. &#xD;&#xA;&#xD;&#xA;The parachain validation function or PVF for short, is the current runtime Wasm for a parachain that is stored on the Relay chain.&#xD;&#xA;&#xD;&#xA;One example of where the parachain validation function (PVF) is used is in the Relay chain module: [`paras`](https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/paras/mod.rs#L23). This module tracks the state of parachains as mentioned at the top of its file:&#xD;&#xA;```&#xD;&#xA;//! The most important responsibility of this module is to track which parachains and parathreads&#xD;&#xA;//! are active and what their current state is. The current state of a para consists of the current&#xD;&#xA;//! head data and the current validation code (AKA Parachain Validation Function (PVF)).&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The parachain validation function (PVF) code is hashed and stored in the [`paras`](https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/paras/mod.rs#L23) module:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// The validation code hash of every live para.&#xD;&#xA;///&#xD;&#xA;/// Corresponding code can be retrieved with [`CodeByHash`].&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn current_code_hash)]&#xD;&#xA;pub(super) type CurrentCodeHash&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Twox64Concat, ParaId, ValidationCodeHash&gt;;&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/c289aced8c7f124acd60d0764de35cec1047549f/runtime/parachains/src/paras/mod.rs#L644-L650&#xD;&#xA;&#xD;&#xA;When successfully upgrading a parachain, the parachain's validation code (or parachain validation function) would change and therefore the `CurrentCodeHash` storage would reflect that by having a different `ValidationCodeHash`.&#xD;&#xA;&#xD;&#xA;Another example of where the parachain validation function (PVF) is used is in [candidate validation](https://paritytech.github.io/polkadot/book/node/utility/candidate-validation.html).&#xD;&#xA;&#xD;&#xA;When the parachain produces a new block, it sends a &quot;Proof of Validity&quot; (PoV) block to the Relay chain. This PoV-block or PoV is a parachain block with witness data. You can read more on this [here](https://github.com/paritytech/cumulus/blob/master/docs/overview.md#block-building). The Relay chain uses this PoV block along with the parachain validation function (PVF) and does a series of checks ([one example](https://github.com/paritytech/polkadot/blob/c289aced8c7f124acd60d0764de35cec1047549f/node/core/candidate-validation/src/lib.rs#L679-L707)) including [executing the PVF (Wasm) against the PoV](https://github.com/paritytech/polkadot/blob/c289aced8c7f124acd60d0764de35cec1047549f/node/core/pvf/src/host.rs#L95-L120). This is what is considered as [candidate validation](https://paritytech.github.io/polkadot/book/node/utility/candidate-validation.html) - we are checking to see if this parachain block is a successful candidate to be a block for that parachain. Much of this logic can be found in the [Candidate Validation subsystem](https://github.com/paritytech/polkadot/blob/master/node/core/candidate-validation/src/lib.rs) as noted in the top of its file:&#xD;&#xA;```rust&#xD;&#xA;//! This handles incoming requests from other subsystems to validate candidates&#xD;&#xA;//! according to a validation function. This delegates validation to an underlying&#xD;&#xA;//! pool of processes used for execution of the Wasm.&#xD;&#xA;```&#xD;&#xA;If these checks come out successful then this PoV block is deemed a worthy candidate and is ready for [candidate backing](https://paritytech.github.io/polkadot/book/types/backing.html).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22698" PostHistoryTypeId="4" PostId="5940" RevisionGUID="3ae90ff4-ff4f-4da7-ad03-024ae90634e6" CreationDate="2022-11-16T22:50:39.813" UserId="29" Comment="edited title; edited tags; edited tags" Text="What is the parachain validation function (PVF)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22699" PostHistoryTypeId="6" PostId="5940" RevisionGUID="3ae90ff4-ff4f-4da7-ad03-024ae90634e6" CreationDate="2022-11-16T22:50:39.813" UserId="29" Comment="edited title; edited tags; edited tags" Text="|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22700" PostHistoryTypeId="5" PostId="5940" RevisionGUID="a4b3b547-27f6-43f6-831e-e95b7a0b498c" CreationDate="2022-11-16T23:01:11.123" UserId="29" Comment="deleted 380 characters in body" Text="I would like to better understand what the parachain validation function is and how it is used throughout Polkadot.&#xD;&#xA;&#xD;&#xA;In [The Polkadot Parachain Host Implementers' Guide](https://paritytech.github.io/polkadot/book/glossary.html), it says that the parachain validation function (PVF) is:&#xD;&#xA;&gt; The validation code that is run by validators on parachains or parathreads.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22701" PostHistoryTypeId="2" PostId="5942" RevisionGUID="08c1fd7d-ad02-43bd-8baf-c92326e9f84f" CreationDate="2022-11-17T00:18:12.897" UserId="284" Text="Following the instructions in this post:&#xD;&#xA;https://substrate.stackexchange.com/questions/5445/how-to-open-hrmp-channels-between-parachains&#xD;&#xA;It lloks like the following instructions are required to open an HRMP channel:&#xD;&#xA;&#xD;&#xA;- WithdrawAsset&#xD;&#xA;- BuyExecution&#xD;&#xA;- RefundSurplus&#xD;&#xA;- DepositAsset&#xD;&#xA;- Transact (to hold the encoded call for the request to open a channel)&#xD;&#xA;&#xD;&#xA;But there's also the HrmpNewChannelOpenRequest instruction available to select. What's the use case for that instruction?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22703" PostHistoryTypeId="1" PostId="5942" RevisionGUID="08c1fd7d-ad02-43bd-8baf-c92326e9f84f" CreationDate="2022-11-17T00:18:12.897" UserId="284" Text="Why does opening an HRMP channel use the Transact instruction instead of the HrmpNewChannelOpenRequest instruction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22704" PostHistoryTypeId="3" PostId="5942" RevisionGUID="08c1fd7d-ad02-43bd-8baf-c92326e9f84f" CreationDate="2022-11-17T00:18:12.897" UserId="284" Text="|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22705" PostHistoryTypeId="2" PostId="5943" RevisionGUID="de1922b1-8940-410d-a604-a21ece55e753" CreationDate="2022-11-17T01:18:59.983" UserId="1959" Text="It is not currently implemented, https://github.com/paritytech/polkadot/blob/release-v0.9.31/xcm/xcm-executor/src/lib.rs#L507" ContentLicense="CC BY-SA 4.0" />
  <row Id="22707" PostHistoryTypeId="5" PostId="5943" RevisionGUID="b5ce2496-0f10-46a5-8b9c-e314dd645b08" CreationDate="2022-11-17T01:26:19.413" UserId="1959" Comment="added 47 characters in body" Text="`HrmpNewChannelOpenRequest` instruction is not implemented yet in xcm-executor, https://github.com/paritytech/polkadot/blob/release-v0.9.31/xcm/xcm-executor/src/lib.rs#L507" ContentLicense="CC BY-SA 4.0" />
  <row Id="22708" PostHistoryTypeId="2" PostId="5944" RevisionGUID="ea6caa55-f3d6-41a0-b60f-1112c45668b2" CreationDate="2022-11-17T02:03:30.580" UserId="1959" Text="&gt; [Sovereign Account][1]: An account controlled by a particular Consensus System, **within some other Consensus System**.&#xD;&#xA;&#xD;&#xA;1. So a parachain sovereign account is in other Consensus System and controlled by the parachain, not in the parachain, you can't use its sovereign account in the parachain to send XCM directly. But you could use it via sudo or governance.&#xD;&#xA;&#xD;&#xA;   For Example: There are two parachains ParaA and ParaB. ParaA has a sovereign account on ParaB is `0x12340000`. If ParaA is the sender chain, you want to use its sovereign account(on ParaB), you could send XCM from ParaA to ParaB via **sudo or governance**. In this way, you have the authority of the ParaA sovereign account（on ParaB `0x12340000`).&#xD;&#xA;2. No specific XCM instructions require a sovereign account, it depends on what you want to do. For example if you want to do something as a parachain owner, such as open or close the parachain HRMP channel, or transfer tokens from sovereign account, then you need the parachain sovereign account, and you could use it by sending XCM to relaychain via sudo or governance. BTW, if you want to know the difference between `Native` and `SovereignAccount` in `Transact`, you could check this answer: https://substrate.stackexchange.com/a/5074/1959&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/xcm-format#13-vocabulary" ContentLicense="CC BY-SA 4.0" />
  <row Id="22711" PostHistoryTypeId="2" PostId="5945" RevisionGUID="6ab830f9-f2bb-4d50-a256-00f996be816c" CreationDate="2022-11-17T03:00:38.220" UserId="251" Text="Actually, I think you are testing the Substrate framework. (maybe you want it more security)&#xD;&#xA;&#xD;&#xA;Otherwise, testing the data which was passed to the vesting genesis configuration is enough." ContentLicense="CC BY-SA 4.0" />
  <row Id="22713" PostHistoryTypeId="6" PostId="5908" RevisionGUID="8ba3a466-da59-4c45-bdac-56d835d09b3e" CreationDate="2022-11-17T04:50:00.430" UserId="2762" Comment="Added tags" Text="|parachain|rpc|token|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22714" PostHistoryTypeId="24" PostId="5908" RevisionGUID="8ba3a466-da59-4c45-bdac-56d835d09b3e" CreationDate="2022-11-17T04:50:00.430" Comment="Proposed by 2762 approved by 34 edit id of 341" ContentLicense="CC BY-SA 4.0" />
  <row Id="22715" PostHistoryTypeId="5" PostId="5871" RevisionGUID="9352a32f-0e3e-44fc-aa8e-0e7ea5b7acb5" CreationDate="2022-11-17T04:50:12.443" UserId="170" Comment="edit the example code" Text="Contract A has a Payable Method and contract B has ContractRef of A saved in storage. I can call other methods on Contract A but not sure how to call the payable method from Contract B.&#xD;&#xA;Tried with call builder as well like this :&#xD;&#xA;```     &#xD;&#xA;build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;   .call_type(&#xD;&#xA;      Call::new()&#xD;&#xA;      .callee(contractBRef.get_account())&#xD;&#xA;      .gas_limit(0)&#xD;&#xA;      .transferred_value(amount))&#xD;&#xA;      .exec_input(&#xD;&#xA;         ExecutionInput::new(Selector::new([0xDE, 0xAD, 0xBE, 0xEF]))&#xD;&#xA;         .push_arg::&lt;AccountId&gt;(candidate)&#xD;&#xA;         .push_arg::&lt;u128&gt;(0)&#xD;&#xA;         .push_arg::&lt;u128&gt;(amount)&#xD;&#xA;         .push_arg::&lt;u128&gt;(0)&#xD;&#xA;         .push_arg::&lt;u128&gt;(100)&#xD;&#xA;      ).call_flags(CallFlags::default()).returns::&lt;Result&lt;()&gt;&gt;().unwrap()&#xD;&#xA;```&#xD;&#xA;But the call is returning CalleeTrapped Error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22716" PostHistoryTypeId="24" PostId="5871" RevisionGUID="9352a32f-0e3e-44fc-aa8e-0e7ea5b7acb5" CreationDate="2022-11-17T04:50:12.443" Comment="Proposed by 170 approved by 34 edit id of 340" ContentLicense="CC BY-SA 4.0" />
  <row Id="22717" PostHistoryTypeId="10" PostId="5889" RevisionGUID="5f298dcb-bf01-4b88-bf6d-4f6dd0ca63e6" CreationDate="2022-11-17T04:50:58.757" UserId="34" Comment="105" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2025,&quot;DisplayName&quot;:&quot;Iker&quot;},{&quot;Id&quot;:2762,&quot;DisplayName&quot;:&quot;Alex Bean&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="22718" PostHistoryTypeId="2" PostId="5946" RevisionGUID="9cd720a9-ca7a-491d-a8b2-3c7e52c19d45" CreationDate="2022-11-17T04:56:14.817" UserId="445" Text="&#xD;&#xA;Currently, I am trying to test how frame-executive is working in this repo https://github.com/paritytech/substrate&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I add some logs in executive interface `impl_runtime_apis!` : https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1811&#xD;&#xA;&#xD;&#xA;**Code:**&#xD;&#xA;&#xD;&#xA;	impl sp_api::Core&lt;Block&gt; for Runtime {&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;		fn execute_block(block: Block) {&#xD;&#xA;			log::info!(&quot;RUNTIME : GO IN EXECUTE BLOCK&quot;);&#xD;&#xA;			Executive::execute_block(block);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn initialize_block(header: &amp;&lt;Block as BlockT&gt;::Header) {&#xD;&#xA;			log::info!(&quot;RUNTIME : GO IN INITIALIZE BLOCK&quot;);&#xD;&#xA;			Executive::initialize_block(header)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;      ...&#xD;&#xA;&#xD;&#xA;	impl sp_block_builder::BlockBuilder&lt;Block&gt; for Runtime {&#xD;&#xA;		fn apply_extrinsic(extrinsic: &lt;Block as BlockT&gt;::Extrinsic) -&gt; ApplyExtrinsicResult {&#xD;&#xA;			log::info!(&quot;RUNTIME : GO IN APPLY EXTRINSIC&quot;);&#xD;&#xA;			Executive::apply_extrinsic(extrinsic)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn finalize_block() -&gt; &lt;Block as BlockT&gt;::Header {&#xD;&#xA;			log::info!(&quot;RUNTIME : GO IN FINALIZE BLOCK&quot;);&#xD;&#xA;			Executive::finalize_block()&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Result:**&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bkmno.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Problem:**&#xD;&#xA;&#xD;&#xA;`Executive::execute_block(block);` API doesn't trigger and display in the terminal (although I executed a simple `transfer` extrinsic)&#xD;&#xA;&#xD;&#xA;How should I understand? How do I trigger this `execute_block()` API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22720" PostHistoryTypeId="1" PostId="5946" RevisionGUID="9cd720a9-ca7a-491d-a8b2-3c7e52c19d45" CreationDate="2022-11-17T04:56:14.817" UserId="445" Text="Runtime api execute_block doesnt trigger" ContentLicense="CC BY-SA 4.0" />
  <row Id="22721" PostHistoryTypeId="3" PostId="5946" RevisionGUID="9cd720a9-ca7a-491d-a8b2-3c7e52c19d45" CreationDate="2022-11-17T04:56:14.817" UserId="445" Text="|runtime|api|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22723" PostHistoryTypeId="2" PostId="5947" RevisionGUID="2ec3bd35-476b-4bc9-888e-88119fb6b44f" CreationDate="2022-11-17T06:00:50.693" UserId="3254" Text="Now I'm building ink! smartcontract based AMM, as you know there are needed to approve before adding liquidity in general. but it's bad UX for users cuz we need to approve several times before adding liquidity or swapping.&#xD;&#xA;&#xD;&#xA;Uniswap and other EVM based AMM were overcoming this issue as you know EIP-2612.&#xD;&#xA;&#xD;&#xA;Permit function is implemented in ERC20, are there any kinds of the function like this in PSP22??&#xD;&#xA;&#xD;&#xA;https://eips.ethereum.org/EIPS/eip-2612&#xD;&#xA;&#xD;&#xA;https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20Permit" ContentLicense="CC BY-SA 4.0" />
  <row Id="22725" PostHistoryTypeId="1" PostId="5947" RevisionGUID="2ec3bd35-476b-4bc9-888e-88119fb6b44f" CreationDate="2022-11-17T06:00:50.693" UserId="3254" Text="How can we omit approve function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22726" PostHistoryTypeId="3" PostId="5947" RevisionGUID="2ec3bd35-476b-4bc9-888e-88119fb6b44f" CreationDate="2022-11-17T06:00:50.693" UserId="3254" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22727" PostHistoryTypeId="2" PostId="5948" RevisionGUID="e72ebdc4-6e21-4cd0-908d-b34f162c10ab" CreationDate="2022-11-17T06:16:20.680" UserId="3437" Text="Rococo is testnet for Kusama and Westend is testnet for Polkadot. To prepare parachain for Kusama, we have to test our application on Rococo. Likewise, we should test our parachain on Westend before going to Polkadot. &#xD;&#xA;&#xD;&#xA;For Rococo, there are some instructions provided here https://docs.substrate.io/tutorials/connect-relay-and-parachains/acquire-a-testnet-slot/#request-a-parachain-slot.&#xD;&#xA;&#xD;&#xA;We have to book Rococo slot request here https://github.com/paritytech/subport/issues/new?assignees=&amp;labels=Rococo&amp;template=rococo.yaml&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I couldn't find specific instructions for Westend. &#xD;&#xA;&#xD;&#xA;Is the Westend deployment process same as Rococo? Where should I give slot request for Westend? or Testing on Rococo is good enough to go for Polkadot?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can somebody please help me to know the process for Westend deployment?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22729" PostHistoryTypeId="1" PostId="5948" RevisionGUID="e72ebdc4-6e21-4cd0-908d-b34f162c10ab" CreationDate="2022-11-17T06:16:20.680" UserId="3437" Text="Is the Westend deployment process same as Rococo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22730" PostHistoryTypeId="3" PostId="5948" RevisionGUID="e72ebdc4-6e21-4cd0-908d-b34f162c10ab" CreationDate="2022-11-17T06:16:20.680" UserId="3437" Text="|polkadot|parachain|rococo|substrate-parachain-template|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22731" PostHistoryTypeId="2" PostId="5949" RevisionGUID="a593a8d8-a9a1-48d6-a2de-a0ec9c7158cf" CreationDate="2022-11-17T07:20:08.917" UserId="620" Text="I'm trying to change `pallet_assets` to `pallet_assets::&lt;Instance1&gt;` in preparation for more pallet instances. [Commit here](https://github.com/paritytech/cumulus/commit/91a5cde27017624648688d1c26fea92b55bbf026) and [compilation error here](https://gist.github.com/joepetrowski/9ca0ada7d48a46b1c4ea1d845ba6ddad).&#xD;&#xA;&#xD;&#xA;The trouble seems to come from the `HandleCredit` impl, which assumes some `pallet_assets::Config`, but doesn't reference any instance. I don't understand what it would need to do with an instance; it should take the assets from _any_ configured Assets pallet (even if there are many). How can I fix this?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// A `HandleCredit` implementation that naively transfers the fees to the block author.&#xD;&#xA;/// Will drop and burn the assets in case the transfer fails.&#xD;&#xA;pub struct AssetsToBlockAuthor&lt;R&gt;(PhantomData&lt;R&gt;);&#xD;&#xA;impl&lt;R&gt; HandleCredit&lt;AccountIdOf&lt;R&gt;, pallet_assets::Pallet&lt;R&gt;&gt; for AssetsToBlockAuthor&lt;R&gt;&#xD;&#xA;where&#xD;&#xA;	R: pallet_authorship::Config + pallet_assets::Config,&#xD;&#xA;	AccountIdOf&lt;R&gt;:&#xD;&#xA;		From&lt;polkadot_primitives::v2::AccountId&gt; + Into&lt;polkadot_primitives::v2::AccountId&gt;,&#xD;&#xA;{&#xD;&#xA;	fn handle_credit(credit: CreditOf&lt;AccountIdOf&lt;R&gt;, pallet_assets::Pallet&lt;R&gt;&gt;) {&#xD;&#xA;		if let Some(author) = pallet_authorship::Pallet::&lt;R&gt;::author() {&#xD;&#xA;			// In case of error: Will drop the result triggering the `OnDrop` of the imbalance.&#xD;&#xA;			let _ = pallet_assets::Pallet::&lt;R&gt;::resolve(&amp;author, credit);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22733" PostHistoryTypeId="1" PostId="5949" RevisionGUID="a593a8d8-a9a1-48d6-a2de-a0ec9c7158cf" CreationDate="2022-11-17T07:20:08.917" UserId="620" Text="How to fix broken trait bounds when instantiating a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22734" PostHistoryTypeId="3" PostId="5949" RevisionGUID="a593a8d8-a9a1-48d6-a2de-a0ec9c7158cf" CreationDate="2022-11-17T07:20:08.917" UserId="620" Text="|runtime|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22735" PostHistoryTypeId="2" PostId="5950" RevisionGUID="f6bb6884-1f81-4317-99f2-8fc63e14b5c6" CreationDate="2022-11-17T08:30:26.843" UserId="567" Text="`permit` function from EIP-2612 is really Ethereum-centric but you can still adapt it ink! &amp; substrate. \&#xD;&#xA;But you need to restrict your contract to only be used by ECDSA addresses.\&#xD;&#xA;Have a look at this [issue](https://github.com/paritytech/substrate/issues/9609)&#xD;&#xA;&#xD;&#xA;And the [implementation](https://github.com/paritytech/substrate/pull/9686) of `seal_ecdsa_recovery` in pallet_contract&#xD;&#xA;&#xD;&#xA;And the code snippet in top of `ecdsa_recover` in [ink! repo](https://github.com/paritytech/ink/blob/beccff6409100e30a37144d4acfff2ac83b7bf29/crates/ink/src/env_access.rs#L724)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22737" PostHistoryTypeId="2" PostId="5951" RevisionGUID="e2f554a6-ca5e-4c08-bf0d-2e701ca97d9b" CreationDate="2022-11-17T08:43:11.487" UserId="3327" Text="I watched polkador seminar on benchmarking here:&#xD;&#xA;&#xD;&#xA;https://www.youtube.com/watch?v=Qa6sTyUqgek&amp;t=9177s&#xD;&#xA;&#xD;&#xA;Can any one please guid how to benchmark a pallet public functions? more ever, it will be nice if there is some example with step wise explanation &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22739" PostHistoryTypeId="1" PostId="5951" RevisionGUID="e2f554a6-ca5e-4c08-bf0d-2e701ca97d9b" CreationDate="2022-11-17T08:43:11.487" UserId="3327" Text="How to benchmark a Pallet public functions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22740" PostHistoryTypeId="3" PostId="5951" RevisionGUID="e2f554a6-ca5e-4c08-bf0d-2e701ca97d9b" CreationDate="2022-11-17T08:43:11.487" UserId="3327" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22741" PostHistoryTypeId="2" PostId="5952" RevisionGUID="07fbc894-8c5a-4d2d-aa6b-1d104bfd73ae" CreationDate="2022-11-17T09:04:51.340" UserId="73" Text="This should solve your problem:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// A `HandleCredit` implementation that naively transfers the fees to the block author.&#xD;&#xA;/// Will drop and burn the assets in case the transfer fails.&#xD;&#xA;pub struct AssetsToBlockAuthor&lt;R, I = ()&gt;(PhantomData&lt;(R, I)&gt;);&#xD;&#xA;impl&lt;R, I&gt; HandleCredit&lt;AccountIdOf&lt;R&gt;, pallet_assets::Pallet&lt;R, I&gt;&gt; for AssetsToBlockAuthor&lt;R&gt;&#xD;&#xA;where&#xD;&#xA;    I: 'static,&#xD;&#xA;    R: pallet_authorship::Config + pallet_assets::Config&lt;I&gt;,&#xD;&#xA;    AccountIdOf&lt;R&gt;:&#xD;&#xA;        From&lt;polkadot_primitives::v2::AccountId&gt; + Into&lt;polkadot_primitives::v2::AccountId&gt;,&#xD;&#xA;{&#xD;&#xA;    fn handle_credit(credit: CreditOf&lt;AccountIdOf&lt;R&gt;, pallet_assets::Pallet&lt;R, I&gt;&gt;) {&#xD;&#xA;        if let Some(author) = pallet_authorship::Pallet::&lt;R&gt;::author() {&#xD;&#xA;            // In case of error: Will drop the result triggering the `OnDrop` of the imbalance.&#xD;&#xA;            let _ = pallet_assets::Pallet::&lt;R&gt;::resolve(&amp;author, credit);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22743" PostHistoryTypeId="5" PostId="5952" RevisionGUID="5d7aaaa9-c956-444b-9b79-5902ca935714" CreationDate="2022-11-17T09:17:10.580" UserId="620" Comment="added 3 characters in body" Text="This should solve your problem:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// A `HandleCredit` implementation that naively transfers the fees to the block author.&#xD;&#xA;/// Will drop and burn the assets in case the transfer fails.&#xD;&#xA;pub struct AssetsToBlockAuthor&lt;R, I = ()&gt;(PhantomData&lt;(R, I)&gt;);&#xD;&#xA;impl&lt;R, I&gt; HandleCredit&lt;AccountIdOf&lt;R&gt;, pallet_assets::Pallet&lt;R, I&gt;&gt; for AssetsToBlockAuthor&lt;R&gt;&#xD;&#xA;where&#xD;&#xA;    I: 'static,&#xD;&#xA;    R: pallet_authorship::Config + pallet_assets::Config&lt;I&gt;,&#xD;&#xA;    AccountIdOf&lt;R&gt;:&#xD;&#xA;        From&lt;polkadot_primitives::v2::AccountId&gt; + Into&lt;polkadot_primitives::v2::AccountId&gt;,&#xD;&#xA;{&#xD;&#xA;    fn handle_credit(credit: CreditOf&lt;AccountIdOf&lt;R&gt;, pallet_assets::Pallet&lt;R, I&gt;&gt;) {&#xD;&#xA;        if let Some(author) = pallet_authorship::Pallet::&lt;R&gt;::author() {&#xD;&#xA;            // In case of error: Will drop the result triggering the `OnDrop` of the imbalance.&#xD;&#xA;            let _ = pallet_assets::Pallet::&lt;R, I&gt;::resolve(&amp;author, credit);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22744" PostHistoryTypeId="2" PostId="5953" RevisionGUID="aa292cf4-d325-41de-a567-c44addc3e6a4" CreationDate="2022-11-17T10:19:17.003" UserId="2762" Text="Rococo is a testnet built for testing parachains. Initially conceived to test parachain functionality back in summer 2020, it has now evolved to become the testnet for teams building parachains in the ecosystem.&#xD;&#xA;&#xD;&#xA;Take a look at this great answer from Santiago about the difference between Rococo and Westend: https://substrate.stackexchange.com/a/2759/2762&#xD;&#xA;&#xD;&#xA;And a couple of interesting resources about testing parachains and Rococo:&#xD;&#xA;&#xD;&#xA; - [Launch Parachains Guide][1] &#xD;&#xA; - Polkadot wiki: [Testing a parachain][2]&#xD;&#xA; - [Rococo Revamp – Becoming a Community Parachain Testbed][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/launch-parachains/&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/build-pdk#testing-a-parachain&#xD;&#xA;  [3]: https://polkadot.network/blog/rococo-revamp-becoming-a-community-parachain-testbed/" ContentLicense="CC BY-SA 4.0" />
  <row Id="22746" PostHistoryTypeId="2" PostId="5954" RevisionGUID="156b1229-534b-4c3c-aaa8-8dac8b920565" CreationDate="2022-11-17T10:30:59.167" UserId="3317" Text="&#xD;&#xA;&#xD;&#xA;There are two consensus (or &quot;block authoring&quot; --whichever you prefer to call them) algorithms that might be exactly what you need:&#xD;&#xA;&#xD;&#xA;1- [Manual seal][1]: Where there is one author and it authors a block whenever you tell it via an RPC call.&#xD;&#xA;&#xD;&#xA;2- Instant seal: Where there is one author and it attempts to author a block as soon as it sees a transaction in the pool, most often leading to one transaction per block&#xD;&#xA;&#xD;&#xA;There is a [substrate seminar][2] where they build a substrate node that uses manual seal and instant seal consensus.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/client/consensus/manual-seal/src/lib.rs&#xD;&#xA;  [2]: https://www.youtube.com/watch?v=uhkV0jAcWDY" ContentLicense="CC BY-SA 4.0" />
  <row Id="22748" PostHistoryTypeId="2" PostId="5955" RevisionGUID="26d40ef4-5230-42ab-a492-a40c7900c5be" CreationDate="2022-11-17T11:07:06.940" UserId="80" Text="Having feeless signed transactions could make your chain vulnerable to the chain being spammed. A better approach could be, is to update `DispatchResultWithPostInfo` with `Pays::No` for special conditions or accounts.&#xD;&#xA;&#xD;&#xA;Another idea that can be explored to implement feeless transactions could be:&#xD;&#xA;&#xD;&#xA;- A user is required to deposit/stake an X amount of tokens in order to get Y amount of free transactions in a given epoch.&#xD;&#xA;- Any transaction over the amount Y is charged a fee/slashed from the stake.&#xD;&#xA;- Stake can have a minimum unbonding time to prevent abuse." ContentLicense="CC BY-SA 4.0" />
  <row Id="22750" PostHistoryTypeId="2" PostId="5956" RevisionGUID="0653ed3b-3430-4f07-b1e3-f7d61e40a01d" CreationDate="2022-11-17T11:59:56.877" UserId="234" Text="You can also use [Sidecar][1]'s endpoint `runtime/spec`. &#xD;&#xA;So you would need to :&#xD;&#xA; - Install Sidecar locally&#xD;&#xA; - Add an [.env][2] file that points to one of [Moonbeam's public endpoints][3], e.g. `wss://moonbeam.api.onfinality.io/public-ws` (unless you are running a parachain node yourself)&#xD;&#xA; - Run Sidecar with your new `env profile` as shown in the [README][4] &#xD;&#xA; - Then you can access the endpoint from your browser `http://127.0.0.1:8080/runtime/spec`&#xD;&#xA; - The result is again in JSON format&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;    {&#xD;&#xA;  &quot;at&quot;: {&#xD;&#xA;    &quot;height&quot;: &quot;2316673&quot;,&#xD;&#xA;    &quot;hash&quot;: &quot;0xafdd015b8b04c039d5e6753cf9363e57a9a65ac5127a62b525b57761fc14533e&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;authoringVersion&quot;: &quot;3&quot;,&#xD;&#xA;  &quot;transactionVersion&quot;: &quot;2&quot;,&#xD;&#xA;  &quot;implVersion&quot;: &quot;0&quot;,&#xD;&#xA;  &quot;specName&quot;: &quot;moonbeam&quot;,&#xD;&#xA;  &quot;specVersion&quot;: &quot;1803&quot;,&#xD;&#xA;  &quot;chainType&quot;: {&#xD;&#xA;    &quot;live&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;properties&quot;: {&#xD;&#xA;    &quot;ss58Format&quot;: null,&#xD;&#xA;    &quot;tokenDecimals&quot;: [&#xD;&#xA;      &quot;18&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;tokenSymbol&quot;: [&#xD;&#xA;      &quot;GLMR&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;SS58Prefix&quot;: &quot;1284&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-api-sidecar&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-api-sidecar/blob/master/.env.local&#xD;&#xA;  [3]: https://docs.moonbeam.network/builders/get-started/endpoints/&#xD;&#xA;  [4]: https://github.com/paritytech/substrate-api-sidecar#configuration" ContentLicense="CC BY-SA 4.0" />
  <row Id="22752" PostHistoryTypeId="50" PostId="5401" RevisionGUID="091620ec-b2ff-40d4-92da-ee14ef7e4b2c" CreationDate="2022-11-17T12:05:00.600" UserId="-1" />
  <row Id="22753" PostHistoryTypeId="2" PostId="5957" RevisionGUID="1a19bd00-5d6e-4b49-8d0b-c7276d3479c1" CreationDate="2022-11-17T14:17:18.250" UserId="29" Text="First setup your Relay chain:&#xD;&#xA;- https://docs.substrate.io/tutorials/connect-relay-and-parachains/prepare-a-local-relay-chain&#xD;&#xA;&#xD;&#xA;In the above guide it states:&#xD;&#xA;&#xD;&#xA;&gt; If you wanted to connect two parachains with a single collator each,&#xD;&#xA;&gt; you would need to run three or more relay chain validator nodes. In&#xD;&#xA;&gt; general, you would need to modify the chain specification and&#xD;&#xA;&gt; hard-code additional validators to set up a local test network for two&#xD;&#xA;&gt; or more parachains.&#xD;&#xA;&#xD;&#xA;So in your case you will need a custom Relay chain chain spec with three validators minimum. More info on creating custom chain specs can be found here:&#xD;&#xA;- https://docs.substrate.io/reference/how-to-guides/basics/customize-a-chain-specification&#xD;&#xA;&#xD;&#xA;Once you have a your Relay chain running with three validators minimum and its own custom chain spec you can then proceed to setting up your parachains.&#xD;&#xA;&#xD;&#xA;Each parachain will have its own custom chain spec. One parachain can have one or more collators that can share the same parachain chain spec. Information on setting up a parachain, creating its chain spec, and connecting to the Relay chain can be found here:&#xD;&#xA;- https://docs.substrate.io/tutorials/connect-relay-and-parachains/connect-a-local-parachain&#xD;&#xA;&#xD;&#xA;And of course if you would like to bypass this manual process and spin up a Relay chain with two parachains quickly you can use Zombienet!&#xD;&#xA;- https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="22755" PostHistoryTypeId="5" PostId="5401" RevisionGUID="9d404964-b85f-4819-ba2a-d4dc9fd8230a" CreationDate="2022-11-17T14:18:54.407" UserId="29" Comment="edited body; edited title" Text="I want to run two parachains (parachain A and parachain B)  and a relay chain with two validators Alice and Bob.&#xD;&#xA;&#xD;&#xA;I need to implement the use-case below:&#xD;&#xA;&#xD;&#xA;For parachain A the chain spec is newSpec.json and for parachain B the chain spec is newSpec1.json(updated) and for relay chain I am using newSpec1.json.&#xD;&#xA;&#xD;&#xA;Will the parachain and relay chain produce new blocks? If yes, how to test it?&#xD;&#xA;&#xD;&#xA;Thank you in advance...... " ContentLicense="CC BY-SA 4.0" />
  <row Id="22756" PostHistoryTypeId="4" PostId="5401" RevisionGUID="9d404964-b85f-4819-ba2a-d4dc9fd8230a" CreationDate="2022-11-17T14:18:54.407" UserId="29" Comment="edited body; edited title" Text="How to configure chain specs for parachains and relay chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="22757" PostHistoryTypeId="5" PostId="5846" RevisionGUID="2b4f1f14-54bf-45f7-b2f3-2ffd9331208a" CreationDate="2022-11-17T14:30:20.663" UserId="29" Comment="added 324 characters in body" Text="Moonbeam has a nice [definition](https://docs.moonbeam.network/builders/xcm/overview/#general-xcm-definitions):&#xD;&#xA;&#xD;&#xA;&gt; Sovereign account — an account each chain in the ecosystem has, one&#xD;&#xA;&gt; for the relay chain and the other for other parachains. It is&#xD;&#xA;&gt; calculated as the blake2 hash of a specific word and parachain ID&#xD;&#xA;&gt; concatenated (blake2(para+ParachainID) for the sovereign account in&#xD;&#xA;&gt; the relay chain, and blake2(sibl+ParachainID) for the sovereign&#xD;&#xA;&gt; account in other parachains), truncating the hash to the correct&#xD;&#xA;&gt; length. The account is owned by root and can only be used through SUDO&#xD;&#xA;&gt; (if available) or democracy (technical committee or referenda). The&#xD;&#xA;&gt; sovereign account typically signs XCM messages in other chains in the&#xD;&#xA;&gt; ecosystem&#xD;&#xA;&#xD;&#xA;Yet a pallet can also have a sovereign account. For example, the [treasury pallet uses](https://github.com/paritytech/substrate/blob/a47f200eebeb88a5bde6f1ed2be9728b82536dde/frame/treasury/src/lib.rs#L185) a `PalletId` to generate a sovereign account:&#xD;&#xA;```rust&#xD;&#xA;/// The treasury's pallet id, used for deriving its sovereign account ID.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type PalletId: Get&lt;PalletId&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There is also a good post on how to calculate sovereign account IDs [here](https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain/5316#5316).&#xD;&#xA;&#xD;&#xA;The [XCM Format](https://github.com/paritytech/xcm-format#13-vocabulary) doc also has a good definition:&#xD;&#xA;&#xD;&#xA;&gt; An account controlled by a particular Consensus System, within some&#xD;&#xA;&gt; other Consensus System. There may be many such accounts or just one.&#xD;&#xA;&gt; If many, then this assumes and identifies a unique primary account." ContentLicense="CC BY-SA 4.0" />
  <row Id="22758" PostHistoryTypeId="5" PostId="5845" RevisionGUID="9eaf1038-5c45-4a08-89ac-91de19143449" CreationDate="2022-11-17T14:32:42.690" UserId="29" Comment="edited body; edited title" Text="I have seen the word sovereign account used in multiple places in the Polkadot ecosystem yet I cannot find a formal definition of what a sovereign account is.&#xD;&#xA;&#xD;&#xA;What is a sovereign account in Polkadot/Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22759" PostHistoryTypeId="4" PostId="5845" RevisionGUID="9eaf1038-5c45-4a08-89ac-91de19143449" CreationDate="2022-11-17T14:32:42.690" UserId="29" Comment="edited body; edited title" Text="What is a sovereign Account in Polkadot/Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22760" PostHistoryTypeId="5" PostId="5846" RevisionGUID="1a0030b5-0fb0-491a-8be8-720960a0756e" CreationDate="2022-11-17T14:39:34.050" UserId="29" Comment="added 96 characters in body" Text="In general terms, according to the [Cambridge dictionary](https://dictionary.cambridge.org/us/dictionary/english/sovereign) &quot;sovereign&quot; is defined as:&#xD;&#xA;&#xD;&#xA;&gt; having the highest power or being completely independent&#xD;&#xA;&#xD;&#xA;In regards to Polkadot/Substrate, Moonbeam has a nice [definition](https://docs.moonbeam.network/builders/xcm/overview/#general-xcm-definitions):&#xD;&#xA;&#xD;&#xA;&gt; Sovereign account — an account each chain in the ecosystem has, one&#xD;&#xA;&gt; for the relay chain and the other for other parachains. It is&#xD;&#xA;&gt; calculated as the blake2 hash of a specific word and parachain ID&#xD;&#xA;&gt; concatenated (blake2(para+ParachainID) for the sovereign account in&#xD;&#xA;&gt; the relay chain, and blake2(sibl+ParachainID) for the sovereign&#xD;&#xA;&gt; account in other parachains), truncating the hash to the correct&#xD;&#xA;&gt; length. The account is owned by root and can only be used through SUDO&#xD;&#xA;&gt; (if available) or democracy (technical committee or referenda). The&#xD;&#xA;&gt; sovereign account typically signs XCM messages in other chains in the&#xD;&#xA;&gt; ecosystem&#xD;&#xA;&#xD;&#xA;Yet a pallet can also have a &quot;sovereign&quot; account. For example, the [treasury pallet uses](https://github.com/paritytech/substrate/blob/a47f200eebeb88a5bde6f1ed2be9728b82536dde/frame/treasury/src/lib.rs#L185) a `PalletId` to generate a sovereign account:&#xD;&#xA;```rust&#xD;&#xA;/// The treasury's pallet id, used for deriving its sovereign account ID.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type PalletId: Get&lt;PalletId&gt;;&#xD;&#xA;```&#xD;&#xA;This treasury's sovereign account is the account in which the treasury's pot of funds is held.&#xD;&#xA;&#xD;&#xA;There is also a good post on how to calculate sovereign account IDs [here](https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain/5316#5316).&#xD;&#xA;&#xD;&#xA;Sovereign accounts also exist in the [XCM Format](https://github.com/paritytech/xcm-format#13-vocabulary):&#xD;&#xA;&#xD;&#xA;&gt; An account controlled by a particular Consensus System, within some&#xD;&#xA;&gt; other Consensus System. There may be many such accounts or just one.&#xD;&#xA;&gt; If many, then this assumes and identifies a unique primary account." ContentLicense="CC BY-SA 4.0" />
  <row Id="22761" PostHistoryTypeId="4" PostId="5845" RevisionGUID="0f8f4c4e-61a2-44d6-85c5-d134a8432681" CreationDate="2022-11-17T14:45:42.930" UserId="29" Comment="edited title" Text="What is a &quot;sovereign&quot; account in Polkadot/Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22762" PostHistoryTypeId="5" PostId="5845" RevisionGUID="0f8f4c4e-61a2-44d6-85c5-d134a8432681" CreationDate="2022-11-17T14:45:42.930" UserId="29" Comment="edited title" Text="I have seen &quot;sovereign&quot; accounts used in multiple places in the Polkadot ecosystem yet I cannot find a formal definition of what a &quot;sovereign&quot; account is.&#xD;&#xA;&#xD;&#xA;What is a &quot;sovereign&quot; account in Polkadot/Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22763" PostHistoryTypeId="5" PostId="5846" RevisionGUID="91aa6b6a-f1e9-4009-aac9-9e040523e699" CreationDate="2022-11-17T14:52:20.807" UserId="29" Comment="added 6 characters in body" Text="In general terms, according to the [Cambridge dictionary](https://dictionary.cambridge.org/us/dictionary/english/sovereign) &quot;sovereign&quot; is defined as:&#xD;&#xA;&#xD;&#xA;&gt; having the highest power or being completely independent&#xD;&#xA;&#xD;&#xA;In regards to Polkadot/Substrate, Moonbeam has a nice [definition](https://docs.moonbeam.network/builders/xcm/overview/#general-xcm-definitions):&#xD;&#xA;&#xD;&#xA;&gt; Sovereign account — an account each chain in the ecosystem has, one&#xD;&#xA;&gt; for the relay chain and the other for other parachains. It is&#xD;&#xA;&gt; calculated as the blake2 hash of a specific word and parachain ID&#xD;&#xA;&gt; concatenated (blake2(para+ParachainID) for the sovereign account in&#xD;&#xA;&gt; the relay chain, and blake2(sibl+ParachainID) for the sovereign&#xD;&#xA;&gt; account in other parachains), truncating the hash to the correct&#xD;&#xA;&gt; length. The account is owned by root and can only be used through SUDO&#xD;&#xA;&gt; (if available) or democracy (technical committee or referenda). The&#xD;&#xA;&gt; sovereign account typically signs XCM messages in other chains in the&#xD;&#xA;&gt; ecosystem&#xD;&#xA;&#xD;&#xA;Sovereign accounts are also defined in the [XCM Format](https://github.com/paritytech/xcm-format#13-vocabulary):&#xD;&#xA;&#xD;&#xA;&gt; An account controlled by a particular Consensus System, within some&#xD;&#xA;&gt; other Consensus System. There may be many such accounts or just one.&#xD;&#xA;&gt; If many, then this assumes and identifies a unique primary account.&#xD;&#xA;&#xD;&#xA;Yet a pallet can also have a &quot;sovereign&quot; account. For example, the [treasury pallet uses](https://github.com/paritytech/substrate/blob/a47f200eebeb88a5bde6f1ed2be9728b82536dde/frame/treasury/src/lib.rs#L185) a `PalletId` to generate a sovereign account:&#xD;&#xA;```rust&#xD;&#xA;/// The treasury's pallet id, used for deriving its sovereign account ID.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type PalletId: Get&lt;PalletId&gt;;&#xD;&#xA;```&#xD;&#xA;This treasury's sovereign account is the account in which the treasury's pot of funds is held.&#xD;&#xA;&#xD;&#xA;There is also a good post on how to calculate sovereign account IDs [here](https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain/5316#5316)." ContentLicense="CC BY-SA 4.0" />
  <row Id="22764" PostHistoryTypeId="2" PostId="5958" RevisionGUID="37f4be10-0a9d-445e-944c-1a53c3a76b0f" CreationDate="2022-11-17T15:00:37.500" UserId="29" Text="The treasury pallet has the following code:&#xD;&#xA;```rust&#xD;&#xA;/// The treasury's pallet id, used for deriving its sovereign account ID.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type PalletId: Get&lt;PalletId&gt;;&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/a47f200eebeb88a5bde6f1ed2be9728b82536dde/frame/treasury/src/lib.rs#L185&#xD;&#xA;&#xD;&#xA;Some definitions of sovereign accounts are given here:&#xD;&#xA;- https://substrate.stackexchange.com/questions/5845/what-is-a-sovereign-account-in-polkadot-substrate&#xD;&#xA;&#xD;&#xA;Are there two types of sovereign accounts in Substrate/Polkadot? One from a [consensus perspective](https://github.com/paritytech/xcm-format#13-vocabulary) and the other from a general notion of what it means to be an account that is, for all intents and purposes, sovereign." ContentLicense="CC BY-SA 4.0" />
  <row Id="22766" PostHistoryTypeId="1" PostId="5958" RevisionGUID="37f4be10-0a9d-445e-944c-1a53c3a76b0f" CreationDate="2022-11-17T15:00:37.500" UserId="29" Text="Are there two types of sovereign accounts in Polkadot/Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22767" PostHistoryTypeId="3" PostId="5958" RevisionGUID="37f4be10-0a9d-445e-944c-1a53c3a76b0f" CreationDate="2022-11-17T15:00:37.500" UserId="29" Text="|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22768" PostHistoryTypeId="52" PostId="5949" RevisionGUID="abd1cf50-aa02-4f95-aaa1-ff4ce34ac8b0" CreationDate="2022-11-17T15:20:10.053" />
  <row Id="22769" PostHistoryTypeId="2" PostId="5959" RevisionGUID="9f67c39a-1003-42eb-af7b-07c23b88664a" CreationDate="2022-11-17T16:34:21.860" UserId="73" Text="I assume you are running a one-validator network. `execute_block` is only called when importing blocks from the network. Blocks that the node builds itself are directly imported into the database and will not use `execute_block`. This should explain what you see.&#xD;&#xA;&#xD;&#xA;When you start a second node that syncs from your first node, you should see your log message. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22771" PostHistoryTypeId="2" PostId="5960" RevisionGUID="88118844-d3d6-46fb-ad79-493a6af39c73" CreationDate="2022-11-17T17:09:56.177" UserId="3122" Text="I am working on Substrate-based node upgrades.&#xD;&#xA;&#xD;&#xA;I stick to Polkadot releases and start from [polkadot-v0.8.25](https://github.com/paritytech/polkadot/releases/tag/v0.8.25) to the latest versions. While upgrading I need to make sure that I don’t miss any storage migrations.&#xD;&#xA;I’ve tried this algorithm:&#xD;&#xA; 1. Find migration code in the Substrate repository.&#xD;&#xA; 2. Find the location of the migration execution in the Substrate&#xD;&#xA;    repository.&#xD;&#xA; 3. If the execution location isn’t found in the Substrate repository and is found in the Polkadot repository, I consider adding this migration to my node.&#xD;&#xA;&#xD;&#xA;But this approach is very time consuming so I’m looking for some optimisations. I’ve checked couple of releases along with a [bunch of PRs with “runtimemigration” label](https://github.com/paritytech/substrate/issues?q=label%3AE1-runtimemigration%20) and it looks like there are two ways to execute a migration:&#xD;&#xA; 1. From a pallet itself. Looks like I don’t need to execute this type of migration on my own.&#xD;&#xA; 2. From [runtime/polkadot/src/lib.rs -&gt;&#xD;&#xA;    frame_executive::Executive](https://github.com/paritytech/polkadot/blob/v0.8.28/runtime/polkadot/src/lib.rs#L1066).&#xD;&#xA;&#xD;&#xA;The questions:&#xD;&#xA;  1. Can someone confirm that I should care only about the migrations executed from runtime/polkadot/src/lib.rs -&gt; frame_executive::Executive?&#xD;&#xA;  2. If I am wrong, what are the other places to execute the migrations and how to identify them?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22773" PostHistoryTypeId="1" PostId="5960" RevisionGUID="88118844-d3d6-46fb-ad79-493a6af39c73" CreationDate="2022-11-17T17:09:56.177" UserId="3122" Text="How to identify node update storage migrations?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22774" PostHistoryTypeId="3" PostId="5960" RevisionGUID="88118844-d3d6-46fb-ad79-493a6af39c73" CreationDate="2022-11-17T17:09:56.177" UserId="3122" Text="|storage|runtime-upgrade|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22775" PostHistoryTypeId="2" PostId="5961" RevisionGUID="098e5f2f-3ddf-4158-9e22-6e6809edb6ca" CreationDate="2022-11-17T17:14:14.140" UserId="2849" Text="In some cases the transaction I am signing and sending gets retracted, but its my impression that they are usually included in a future block.&#xD;&#xA;&#xD;&#xA;When using polkadot js with the promise api, if the transaction .isRetracted, will the callback still fire when its in block and/or finalized?&#xD;&#xA;&#xD;&#xA;In this example, will the user be notified of finalized block in case of retracted?&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;tx.signAndSend(address, { signer }, (result: ISubmittableResult) =&gt; {&#xD;&#xA;  if (result.status.isRetracted) {&#xD;&#xA;    notify(&quot;retracted, taking longer than usual.&quot;)     &#xD;&#xA;  }&#xD;&#xA;  if (result.status.isInBlock) {&#xD;&#xA;    notify(&quot;included&quot;)     &#xD;&#xA;  }&#xD;&#xA;  if (result.status.isFinalized) {&#xD;&#xA;    notify(&quot;finalized&quot;)     &#xD;&#xA;  }&#xD;&#xA;})&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22777" PostHistoryTypeId="1" PostId="5961" RevisionGUID="098e5f2f-3ddf-4158-9e22-6e6809edb6ca" CreationDate="2022-11-17T17:14:14.140" UserId="2849" Text="Does callback get called when extrinsic is in block/finalized when the transaction is retracted?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22778" PostHistoryTypeId="3" PostId="5961" RevisionGUID="098e5f2f-3ddf-4158-9e22-6e6809edb6ca" CreationDate="2022-11-17T17:14:14.140" UserId="2849" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22779" PostHistoryTypeId="2" PostId="5962" RevisionGUID="b24bb885-3098-4468-bcf4-a1a5c2964688" CreationDate="2022-11-17T17:20:06.650" UserId="298" Text="&#xD;&#xA;Getting erro: `FailedToTransactAsset`&#xD;&#xA;&#xD;&#xA;**Sender**: 2113&#xD;&#xA;**Receiver**: 2000&#xD;&#xA;**Sovereign account of 2113:** 5Dt6dpkWPwLaH4BBCKJwjiWrFVAGyYk3tLUabvyn4v7KtESG &#xD;&#xA;(contains ~5 ROC)&#xD;&#xA;&#xD;&#xA;This is the [call][1] made to make the HRMP request from 2113 to 2000. &#xD;&#xA;&#xD;&#xA;The transaction from polkadotXcm was successful. But in the relay chain... [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Incomplete Transaction. &#xD;&#xA;FaiedToTransactAsset&#xD;&#xA;&#xD;&#xA;Also i deposited 5 ROC but now my sovereign account has 5.19999 meaning it has gained some ROC somehow. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The main question is what causes this error? Does it need more than 5?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkabsoup1.jelliedowl.com#/extrinsics/decode/0x5d028400da8255623a48e0cff4c515aa835ad22f0f4f4390945e7308f830d09e7ad79e74017e9b2751c1f156a613f338ceeb4d566fdf21a524eade047d4bfe4417c16d882fec06eb7f764f7f5fbc754be7a233d5098973a1ca34e8c6ffc4b48e9b2a4afc8fb4002c0004001f00010100020c000400000000070010a5d4e81300000000070010a5d4e80006000700f2052a01183c0141080000&#xD;&#xA;  [2]: https://i.stack.imgur.com/OjWHi.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22781" PostHistoryTypeId="1" PostId="5962" RevisionGUID="b24bb885-3098-4468-bcf4-a1a5c2964688" CreationDate="2022-11-17T17:20:06.650" UserId="298" Text="FailedToTransactAsset when trying to establish HRMP over XCMP" ContentLicense="CC BY-SA 4.0" />
  <row Id="22782" PostHistoryTypeId="3" PostId="5962" RevisionGUID="b24bb885-3098-4468-bcf4-a1a5c2964688" CreationDate="2022-11-17T17:20:06.650" UserId="298" Text="|xcm|rococo|xcmp|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22783" PostHistoryTypeId="2" PostId="5963" RevisionGUID="d883cd08-1527-46b9-b348-97c4cdb28cae" CreationDate="2022-11-17T17:36:25.817" UserId="87" Text="The Substrate chain and Parachain data directory contains 3 sub-directories, `db`, `keystore`, and `network`. &#xD;&#xA;&#xD;&#xA;A long time ago the `network` directory used to contain the database of peers, but now appears to be unused. However the peer database must exist _somewhere_.&#xD;&#xA;&#xD;&#xA;1) Where is it now?&#xD;&#xA;&#xD;&#xA;2) Can it be removed without having to delete all chain data from the `db` directory (i.e. using `purge-chain`) to force a node to rebuild it? " ContentLicense="CC BY-SA 4.0" />
  <row Id="22785" PostHistoryTypeId="1" PostId="5963" RevisionGUID="d883cd08-1527-46b9-b348-97c4cdb28cae" CreationDate="2022-11-17T17:36:25.817" UserId="87" Text="Is it possible to delete the network peer database without deleting the chain data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22786" PostHistoryTypeId="3" PostId="5963" RevisionGUID="d883cd08-1527-46b9-b348-97c4cdb28cae" CreationDate="2022-11-17T17:36:25.817" UserId="87" Text="|nodes|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22787" PostHistoryTypeId="2" PostId="5964" RevisionGUID="8b90ba33-de40-4b66-bfa7-6df3ee448f9f" CreationDate="2022-11-17T17:41:20.883" UserId="29" Text="Here is the description of the error you are getting:&#xD;&#xA;```rust&#xD;&#xA;/// An asset transaction (like withdraw or deposit) failed (typically due to type conversions).&#xD;&#xA;#[codec(index = 9)]&#xD;&#xA;FailedToTransactAsset(#[codec(skip)] &amp;'static str),&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/53253de77f1649ecbb650df2ec3e29d0d1110a2d/xcm/src/v2/traits.rs#L56-L58&#xD;&#xA;&#xD;&#xA;Looks like the encoded call that you are executing is an `hrmpAcceptOpenChannel` to accept a channel open request from para 2,113:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/KND9Q.png)&#xD;&#xA;&#xD;&#xA;Therefore you need to make sure that the sovereign account for para 2000 is funded. Para 2000 is accepting the `hrmpAcceptOpenChannel` request from para 2,113. And you would want to do this `polkadotXCM` call on para 2000.&#xD;&#xA;&#xD;&#xA;More info here:&#xD;&#xA;- https://substrate.stackexchange.com/questions/5445/how-to-open-hrmp-channels-between-parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="22789" PostHistoryTypeId="5" PostId="5962" RevisionGUID="bd06952f-d601-41b5-a8b9-570afa6c0b78" CreationDate="2022-11-17T17:42:16.813" UserId="29" Comment="added 10 characters in body" Text="&#xD;&#xA;Getting error: `FailedToTransactAsset`&#xD;&#xA;&#xD;&#xA;**Sender**: 2113&#xD;&#xA;&#xD;&#xA;**Receiver**: 2000&#xD;&#xA;&#xD;&#xA;**Sovereign account of 2113:** 5Dt6dpkWPwLaH4BBCKJwjiWrFVAGyYk3tLUabvyn4v7KtESG &#xD;&#xA;(contains ~5 ROC)&#xD;&#xA;&#xD;&#xA;This is the [call][1] made to make the HRMP request from 2113 to 2000. &#xD;&#xA;&#xD;&#xA;The transaction from polkadotXcm was successful. But in the relay chain... [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Incomplete Transaction. &#xD;&#xA;&#xD;&#xA;`FailedToTransactAsset`&#xD;&#xA;&#xD;&#xA;Also I deposited 5 ROC but now my sovereign account has 5.19999 meaning it has gained some ROC somehow. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The main question is what causes this error? Does it need more than 5?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkabsoup1.jelliedowl.com#/extrinsics/decode/0x5d028400da8255623a48e0cff4c515aa835ad22f0f4f4390945e7308f830d09e7ad79e74017e9b2751c1f156a613f338ceeb4d566fdf21a524eade047d4bfe4417c16d882fec06eb7f764f7f5fbc754be7a233d5098973a1ca34e8c6ffc4b48e9b2a4afc8fb4002c0004001f00010100020c000400000000070010a5d4e81300000000070010a5d4e80006000700f2052a01183c0141080000&#xD;&#xA;  [2]: https://i.stack.imgur.com/OjWHi.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22790" PostHistoryTypeId="5" PostId="5853" RevisionGUID="3cf3a563-8c4a-4010-b00c-ac80c5efed19" CreationDate="2022-11-17T18:06:06.233" UserId="29" Comment="added 112 characters in body" Text="There are some resources (and ongoing effort) here:&#xD;&#xA;- https://docs.substrate.io/build/upgrade-the-runtime/#storage-migration&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-docs/issues/163&#xD;&#xA;&#xD;&#xA;&gt; Depending on the migration, you may want to have logic to put the chain in &quot;maintenance-mode&quot;, disable the pallet, or disable the extrinsics or code that can modify that storage or depend on that storage until the migration is fully complete. If the chain is in &quot;maintenance-mode&quot;, it is possible to do the migration outside the `on_initialize` and take up more block weight.&#xD;&#xA;&#xD;&#xA;Below is a walkthrough of how `pallet-xcm` does a multi-block migration.&#xD;&#xA;&#xD;&#xA;[`pallet-xcm`](https://github.com/paritytech/polkadot/blob/master/xcm/pallet-xcm/src/lib.rs) uses the [`fn on_runtime_upgrade()`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_runtime_upgrade) hook in combination with the [`fn on_initialize()`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_initialize) hook.&#xD;&#xA;&#xD;&#xA;When the runtime is upgraded the `on_runtime_upgrade` hook kicks off the migration:&#xD;&#xA;```rust&#xD;&#xA;fn on_runtime_upgrade() -&gt; Weight {&#xD;&#xA;    // Start a migration (this happens before on_initialize so it'll happen later in this&#xD;&#xA;    // block, which should be good enough)...&#xD;&#xA;    CurrentMigration::&lt;T&gt;::put(VersionMigrationStage::default());&#xD;&#xA;    T::DbWeight::get().writes(1)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L451-L456&#xD;&#xA;&#xD;&#xA;Then at the beginning of each block the `on_initialize` sets a 10% block limit and kicks off the migrations in respect to that limit:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn on_initialize(_n: BlockNumberFor&lt;T&gt;) -&gt; Weight {&#xD;&#xA;    let mut weight_used = Weight::zero();&#xD;&#xA;    if let Some(migration) = CurrentMigration::&lt;T&gt;::get() {&#xD;&#xA;        // Consume 10% of block at most&#xD;&#xA;        let max_weight = T::BlockWeights::get().max_block / 10;&#xD;&#xA;        let (w, maybe_migration) = Self::check_xcm_version_change(migration, max_weight);&#xD;&#xA;        CurrentMigration::&lt;T&gt;::set(maybe_migration);&#xD;&#xA;        weight_used.saturating_accrue(w);&#xD;&#xA;    }&#xD;&#xA;    ....&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L419-L450&#xD;&#xA;&#xD;&#xA;The migrations starts (being careful not to exceed max weight -&gt; 10%):&#xD;&#xA;```rust&#xD;&#xA;/// Will always make progress, and will do its best not to use much more than `weight_cutoff`&#xD;&#xA;/// in doing so.&#xD;&#xA;pub(crate) fn check_xcm_version_change(&#xD;&#xA;    mut stage: VersionMigrationStage,&#xD;&#xA;    weight_cutoff: Weight,&#xD;&#xA;) -&gt; (Weight, Option&lt;VersionMigrationStage&gt;) {&#xD;&#xA;    let mut weight_used = Weight::zero();&#xD;&#xA;&#xD;&#xA;    // TODO: Correct weights for the components of this:&#xD;&#xA;    let todo_sv_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vn_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_already_notified_weight: Weight = T::DbWeight::get().reads(1);&#xD;&#xA;    let todo_vnt_notify_weight: Weight = T::DbWeight::get().reads_writes(1, 3);&#xD;&#xA;    let todo_vnt_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_migrate_fail_weight: Weight = T::DbWeight::get().reads_writes(1, 1);&#xD;&#xA;    let todo_vnt_notify_migrate_weight: Weight = T::DbWeight::get().reads_writes(1, 3);&#xD;&#xA;&#xD;&#xA;    use VersionMigrationStage::*;&#xD;&#xA;&#xD;&#xA;    if stage == MigrateSupportedVersion {&#xD;&#xA;        // We assume that supported XCM version only ever increases, so just cycle through lower&#xD;&#xA;        // XCM versioned from the current.&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in SupportedVersion::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                if let Ok(new_key) = old_key.into_latest() {&#xD;&#xA;                    SupportedVersion::&lt;T&gt;::insert(XCM_VERSION, new_key, value);&#xD;&#xA;                }&#xD;&#xA;                weight_used.saturating_accrue(todo_sv_migrate_weight);&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = MigrateVersionNotifiers;&#xD;&#xA;    }&#xD;&#xA;    if stage == MigrateVersionNotifiers {&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in VersionNotifiers::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                if let Ok(new_key) = old_key.into_latest() {&#xD;&#xA;                    VersionNotifiers::&lt;T&gt;::insert(XCM_VERSION, new_key, value);&#xD;&#xA;                }&#xD;&#xA;                weight_used.saturating_accrue(todo_vn_migrate_weight);&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = NotifyCurrentTargets(None);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    let xcm_version = T::AdvertisedXcmVersion::get();&#xD;&#xA;&#xD;&#xA;    if let NotifyCurrentTargets(maybe_last_raw_key) = stage {&#xD;&#xA;        let mut iter = match maybe_last_raw_key {&#xD;&#xA;            Some(k) =&gt; VersionNotifyTargets::&lt;T&gt;::iter_prefix_from(XCM_VERSION, k),&#xD;&#xA;            None =&gt; VersionNotifyTargets::&lt;T&gt;::iter_prefix(XCM_VERSION),&#xD;&#xA;        };&#xD;&#xA;        while let Some((key, value)) = iter.next() {&#xD;&#xA;            let (query_id, max_weight, target_xcm_version) = value;&#xD;&#xA;            let new_key: MultiLocation = match key.clone().try_into() {&#xD;&#xA;                Ok(k) if target_xcm_version != xcm_version =&gt; k,&#xD;&#xA;                _ =&gt; {&#xD;&#xA;                    // We don't early return here since we need to be certain that we&#xD;&#xA;                    // make some progress.&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_already_notified_weight);&#xD;&#xA;                    continue&#xD;&#xA;                },&#xD;&#xA;            };&#xD;&#xA;            let response = Response::Version(xcm_version);&#xD;&#xA;            let message = Xcm(vec![QueryResponse { query_id, response, max_weight }]);&#xD;&#xA;            let event = match T::XcmRouter::send_xcm(new_key.clone(), message) {&#xD;&#xA;                Ok(()) =&gt; {&#xD;&#xA;                    let value = (query_id, max_weight, xcm_version);&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::insert(XCM_VERSION, key, value);&#xD;&#xA;                    Event::VersionChangeNotified(new_key, xcm_version)&#xD;&#xA;                },&#xD;&#xA;                Err(e) =&gt; {&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::remove(XCM_VERSION, key);&#xD;&#xA;                    Event::NotifyTargetSendFail(new_key, query_id, e.into())&#xD;&#xA;                },&#xD;&#xA;            };&#xD;&#xA;            Self::deposit_event(event);&#xD;&#xA;            weight_used.saturating_accrue(todo_vnt_notify_weight);&#xD;&#xA;            if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                let last = Some(iter.last_raw_key().into());&#xD;&#xA;                return (weight_used, Some(NotifyCurrentTargets(last)))&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        stage = MigrateAndNotifyOldTargets;&#xD;&#xA;    }&#xD;&#xA;    if stage == MigrateAndNotifyOldTargets {&#xD;&#xA;        for v in 0..XCM_VERSION {&#xD;&#xA;            for (old_key, value) in VersionNotifyTargets::&lt;T&gt;::drain_prefix(v) {&#xD;&#xA;                let (query_id, max_weight, target_xcm_version) = value;&#xD;&#xA;                let new_key = match MultiLocation::try_from(old_key.clone()) {&#xD;&#xA;                    Ok(k) =&gt; k,&#xD;&#xA;                    Err(()) =&gt; {&#xD;&#xA;                        Self::deposit_event(Event::NotifyTargetMigrationFail(&#xD;&#xA;                            old_key, value.0,&#xD;&#xA;                        ));&#xD;&#xA;                        weight_used.saturating_accrue(todo_vnt_migrate_fail_weight);&#xD;&#xA;                        if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                            return (weight_used, Some(stage))&#xD;&#xA;                        }&#xD;&#xA;                        continue&#xD;&#xA;                    },&#xD;&#xA;                };&#xD;&#xA;&#xD;&#xA;                let versioned_key = LatestVersionedMultiLocation(&amp;new_key);&#xD;&#xA;                if target_xcm_version == xcm_version {&#xD;&#xA;                    VersionNotifyTargets::&lt;T&gt;::insert(XCM_VERSION, versioned_key, value);&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_migrate_weight);&#xD;&#xA;                } else {&#xD;&#xA;                    // Need to notify target.&#xD;&#xA;                    let response = Response::Version(xcm_version);&#xD;&#xA;                    let message =&#xD;&#xA;                        Xcm(vec![QueryResponse { query_id, response, max_weight }]);&#xD;&#xA;                    let event = match T::XcmRouter::send_xcm(new_key.clone(), message) {&#xD;&#xA;                        Ok(()) =&gt; {&#xD;&#xA;                            VersionNotifyTargets::&lt;T&gt;::insert(&#xD;&#xA;                                XCM_VERSION,&#xD;&#xA;                                versioned_key,&#xD;&#xA;                                (query_id, max_weight, xcm_version),&#xD;&#xA;                            );&#xD;&#xA;                            Event::VersionChangeNotified(new_key, xcm_version)&#xD;&#xA;                        },&#xD;&#xA;                        Err(e) =&gt; Event::NotifyTargetSendFail(new_key, query_id, e.into()),&#xD;&#xA;                    };&#xD;&#xA;                    Self::deposit_event(event);&#xD;&#xA;                    weight_used.saturating_accrue(todo_vnt_notify_migrate_weight);&#xD;&#xA;                }&#xD;&#xA;                if weight_used.any_gte(weight_cutoff) {&#xD;&#xA;                    return (weight_used, Some(stage))&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    (weight_used, None)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L896-L1034&#xD;&#xA;&#xD;&#xA;The stage of the migration is stored in storage, so that the migration can continue in the next block if needed.&#xD;&#xA;```rust&#xD;&#xA;/// The current migration's stage, if any.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type CurrentMigration&lt;T: Config&gt; =&#xD;&#xA;    StorageValue&lt;_, VersionMigrationStage, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/0f9244b432cb7b3d22453133e3eaa2bb5214c311/xcm/pallet-xcm/src/lib.rs#L392-L395&#xD;&#xA;&#xD;&#xA;Another example here:&#xD;&#xA;- https://substrate.stackexchange.com/questions/1329/how-to-perform-a-large-migration" ContentLicense="CC BY-SA 4.0" />
  <row Id="22791" PostHistoryTypeId="4" PostId="5962" RevisionGUID="b420a0ce-1d76-4d04-bce9-e99fe06df8d6" CreationDate="2022-11-17T19:12:31.500" UserId="29" Comment="edited title" Text="FailedToTransactAsset when trying to establish HRMP when using XCM" ContentLicense="CC BY-SA 4.0" />
  <row Id="22792" PostHistoryTypeId="2" PostId="5965" RevisionGUID="38299b8e-4cd3-43a3-8335-6ed73ec38f34" CreationDate="2022-11-17T20:00:15.487" UserId="73" Text="We currently don't store the known peers. There is an [issue][1] to bring this back. So, currently you only find the node key file in the `network` directory.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/4750" ContentLicense="CC BY-SA 4.0" />
  <row Id="22795" PostHistoryTypeId="2" PostId="5966" RevisionGUID="6d069bee-fbfe-4f58-a289-879fcccbbf4a" CreationDate="2022-11-18T02:59:03.083" UserId="116" Text="*I know this question is more related to the usage of Brave browser, but the chance of getting a relevant answer would be less in brave forums where the general understanding of polkatot-js is less*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Connecting to a chain on `ws`on localhost fails when running in Brave browser, it used to work up to at least last week but now it get stuck on Initializing connection:&#xD;&#xA;&#xD;&#xA;[![Initializing connection][1]][1]&#xD;&#xA;&#xD;&#xA;The chain is still running, I verified the connection with both Firefox and Chromium with a link like this: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9943#/accounts&#xD;&#xA;&#xD;&#xA;The part of the question relevant in this forum is: *Is there anything in the polkadotjs app changed recently which could cause this?*&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mvoe5.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22797" PostHistoryTypeId="1" PostId="5966" RevisionGUID="6d069bee-fbfe-4f58-a289-879fcccbbf4a" CreationDate="2022-11-18T02:59:03.083" UserId="116" Text="Connecting to a chain on `ws` localhost with polkadot.js app fails when running in brave browser" ContentLicense="CC BY-SA 4.0" />
  <row Id="22798" PostHistoryTypeId="3" PostId="5966" RevisionGUID="6d069bee-fbfe-4f58-a289-879fcccbbf4a" CreationDate="2022-11-18T02:59:03.083" UserId="116" Text="|polkadot-js|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22799" PostHistoryTypeId="2" PostId="5967" RevisionGUID="683bedf5-8584-43a0-b1c0-78393cd8fd03" CreationDate="2022-11-18T03:26:12.110" UserId="251" Text="Interesting viewpoint.&#xD;&#xA;&#xD;&#xA;I just called the `PalletId` a pallet account before.&#xD;&#xA;&#xD;&#xA;Yep, maybe we could call it the sovereign account of a pallet.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;From the low-level, they are using the same algorithm. But with different key type ids.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/ca1f81cd0864ae0614aaff07fa121d2d42110586/primitives/runtime/src/traits.rs#L1715&#xD;&#xA;&#xD;&#xA;https://github.com/hack-ink/subalfred/blob/04d565a79589395d788ea2c091bc2f675b2197ee/lib/core/src/key/mod.rs#L95-L103&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22801" PostHistoryTypeId="2" PostId="5968" RevisionGUID="bd330c5f-5f84-4229-ac17-ba3f9836e1dd" CreationDate="2022-11-18T04:15:47.780" UserId="3456" Text="I met with error when running this command `cargo build --release`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `tikv-jemalloc-sys v0.5.2+5.3.0-patched`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-166d53d735a1d9b3/build-script-build` (exit status: 101)&#xD;&#xA;  --- stdout&#xD;&#xA;  TARGET=x86_64-unknown-linux-gnu&#xD;&#xA;  HOST=x86_64-unknown-linux-gnu&#xD;&#xA;  NUM_JOBS=8&#xD;&#xA;  OUT_DIR=&quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out&quot;&#xD;&#xA;  BUILD_DIR=&quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build&quot;&#xD;&#xA;  SRC_DIR=&quot;/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.5.2+5.3.0-patched&quot;&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_OVERRIDE&#xD;&#xA;  OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu&#xD;&#xA;  CC_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu&#xD;&#xA;  CC_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CC&#xD;&#xA;  HOST_CC = None&#xD;&#xA;  cargo:rerun-if-env-changed=CC&#xD;&#xA;  CC = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CFLAGS&#xD;&#xA;  HOST_CFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS&#xD;&#xA;  CFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  CC=&quot;cc&quot;&#xD;&#xA;  CFLAGS=&quot;-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall&quot;&#xD;&#xA;  JEMALLOC_REPO_DIR=&quot;jemalloc&quot;&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_MALLOC_CONF&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_PAGE&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_HUGEPAGE&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_QUANTUM&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_VADDR&#xD;&#xA;  running: &quot;sh&quot; &quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/configure&quot; &quot;--disable-cxx&quot; &quot;--enable-doc=no&quot; &quot;--enable-shared=no&quot; &quot;--with-private-namespace=_rjem_&quot; &quot;--host=x86_64-unknown-linux-gnu&quot; &quot;--build=x86_64-unknown-linux-gnu&quot; &quot;--prefix=/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out&quot;&#xD;&#xA;  running: &quot;tail&quot; &quot;-n&quot; &quot;100&quot; &quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/config.log&quot;&#xD;&#xA;  XSLROOT=''&#xD;&#xA;  XSLTPROC=''&#xD;&#xA;  a=''&#xD;&#xA;  abi=''&#xD;&#xA;  abs_objroot='/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/'&#xD;&#xA;  abs_srcroot='/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/'&#xD;&#xA;  ac_ct_CC=''&#xD;&#xA;  ac_ct_CXX=''&#xD;&#xA;  bindir='${exec_prefix}/bin'&#xD;&#xA;  build='x86_64-unknown-linux-gnu'&#xD;&#xA;  build_alias='x86_64-unknown-linux-gnu'&#xD;&#xA;  build_cpu=''&#xD;&#xA;  build_os=''&#xD;&#xA;  build_vendor=''&#xD;&#xA;  cfghdrs_in=''&#xD;&#xA;  cfghdrs_out=''&#xD;&#xA;  cfgoutputs_in=''&#xD;&#xA;  cfgoutputs_out=''&#xD;&#xA;  datadir='${datarootdir}'&#xD;&#xA;  datarootdir='${prefix}/share'&#xD;&#xA;  docdir='${datarootdir}/doc/${PACKAGE}'&#xD;&#xA;  dvidir='${docdir}'&#xD;&#xA;  enable_autogen=''&#xD;&#xA;  enable_cache_oblivious=''&#xD;&#xA;  enable_cxx='no'&#xD;&#xA;  enable_debug=''&#xD;&#xA;  enable_doc='no'&#xD;&#xA;  enable_experimental_smallocx=''&#xD;&#xA;  enable_fill=''&#xD;&#xA;  enable_initial_exec_tls=''&#xD;&#xA;  enable_lazy_lock=''&#xD;&#xA;  enable_log=''&#xD;&#xA;  enable_opt_safety_checks=''&#xD;&#xA;  enable_opt_size_checks=''&#xD;&#xA;  enable_prof=''&#xD;&#xA;  enable_readlinkat=''&#xD;&#xA;  enable_shared='no'&#xD;&#xA;  enable_static=''&#xD;&#xA;  enable_stats=''&#xD;&#xA;  enable_tls=''&#xD;&#xA;  enable_uaf_detection=''&#xD;&#xA;  enable_utrace=''&#xD;&#xA;  enable_xmalloc=''&#xD;&#xA;  enable_zone_allocator=''&#xD;&#xA;  exe=''&#xD;&#xA;  exec_prefix='NONE'&#xD;&#xA;  host='x86_64-unknown-linux-gnu'&#xD;&#xA;  host_alias='x86_64-unknown-linux-gnu'&#xD;&#xA;  host_cpu=''&#xD;&#xA;  host_os=''&#xD;&#xA;  host_vendor=''&#xD;&#xA;  htmldir='${docdir}'&#xD;&#xA;  importlib=''&#xD;&#xA;  includedir='${prefix}/include'&#xD;&#xA;  infodir='${datarootdir}/info'&#xD;&#xA;  install_suffix=''&#xD;&#xA;  je_=''&#xD;&#xA;  jemalloc_version=''&#xD;&#xA;  jemalloc_version_bugfix=''&#xD;&#xA;  jemalloc_version_gid=''&#xD;&#xA;  jemalloc_version_major=''&#xD;&#xA;  jemalloc_version_minor=''&#xD;&#xA;  jemalloc_version_nrev=''&#xD;&#xA;  libdir='${exec_prefix}/lib'&#xD;&#xA;  libdl=''&#xD;&#xA;  libexecdir='${exec_prefix}/libexec'&#xD;&#xA;  libprefix=''&#xD;&#xA;  link_whole_archive=''&#xD;&#xA;  localedir='${datarootdir}/locale'&#xD;&#xA;  localstatedir='${prefix}/var'&#xD;&#xA;  mandir='${datarootdir}/man'&#xD;&#xA;  o=''&#xD;&#xA;  objroot=''&#xD;&#xA;  oldincludedir='/usr/include'&#xD;&#xA;  pdfdir='${docdir}'&#xD;&#xA;  prefix='/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out'&#xD;&#xA;  private_namespace=''&#xD;&#xA;  program_transform_name='s,x,x,'&#xD;&#xA;  psdir='${docdir}'&#xD;&#xA;  rev='2'&#xD;&#xA;  sbindir='${exec_prefix}/sbin'&#xD;&#xA;  sharedstatedir='${prefix}/com'&#xD;&#xA;  so=''&#xD;&#xA;  srcroot=''&#xD;&#xA;  sysconfdir='${prefix}/etc'&#xD;&#xA;  target_alias=''&#xD;&#xA;  /* confdefs.h */&#xD;&#xA;  #define PACKAGE_NAME &quot;&quot;&#xD;&#xA;  #define PACKAGE_TARNAME &quot;&quot;&#xD;&#xA;  #define PACKAGE_VERSION &quot;&quot;&#xD;&#xA;  #define PACKAGE_STRING &quot;&quot;&#xD;&#xA;  #define PACKAGE_BUGREPORT &quot;&quot;&#xD;&#xA;  #define PACKAGE_URL &quot;&quot;&#xD;&#xA;&#xD;&#xA;  configure: exit 1&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  configure: error: Prefix should not contain spaces&#xD;&#xA;  thread 'main' panicked at 'command did not execute successfully: &quot;sh&quot; &quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/configure&quot; &quot;--disable-cxx&quot; &quot;--enable-doc=no&quot; &quot;--enable-shared=no&quot; &quot;--with-private-namespace=_rjem_&quot; &quot;--host=x86_64-unknown-linux-gnu&quot; &quot;--build=x86_64-unknown-linux-gnu&quot; &quot;--prefix=/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out&quot;&#xD;&#xA;  expected success, got: exit status: 1', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.5.2+5.3.0-patched/build.rs:330:9&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have no idea what to provide to help giving this issue a context so Ill just list down what im using&#xD;&#xA;&#xD;&#xA;Editor: VS Code&#xD;&#xA;&#xD;&#xA;OS: Windows 10&#xD;&#xA;&#xD;&#xA;rust config: &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/vXuEb.png&#xD;&#xA;&#xD;&#xA;wsl: wsl version 2" ContentLicense="CC BY-SA 4.0" />
  <row Id="22803" PostHistoryTypeId="1" PostId="5968" RevisionGUID="bd330c5f-5f84-4229-ac17-ba3f9836e1dd" CreationDate="2022-11-18T04:15:47.780" UserId="3456" Text="Build error on substrate-note-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="22804" PostHistoryTypeId="3" PostId="5968" RevisionGUID="bd330c5f-5f84-4229-ac17-ba3f9836e1dd" CreationDate="2022-11-18T04:15:47.780" UserId="3456" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22805" PostHistoryTypeId="5" PostId="5968" RevisionGUID="25e31d5f-ddf0-4593-9ce9-ab5b8cf21039" CreationDate="2022-11-18T04:17:29.710" UserId="3456" Comment="added 207 characters in body" Text="I met with error when running this command `cargo build --release` on [substrate-note-template](https://github.com/substrate-developer-hub/substrate-node-template). &#xD;&#xA;&#xD;&#xA;I haven really do anything other than git clone to my directory and run the cargo build mentioned above.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `tikv-jemalloc-sys v0.5.2+5.3.0-patched`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-166d53d735a1d9b3/build-script-build` (exit status: 101)&#xD;&#xA;  --- stdout&#xD;&#xA;  TARGET=x86_64-unknown-linux-gnu&#xD;&#xA;  HOST=x86_64-unknown-linux-gnu&#xD;&#xA;  NUM_JOBS=8&#xD;&#xA;  OUT_DIR=&quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out&quot;&#xD;&#xA;  BUILD_DIR=&quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build&quot;&#xD;&#xA;  SRC_DIR=&quot;/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.5.2+5.3.0-patched&quot;&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_OVERRIDE&#xD;&#xA;  OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu&#xD;&#xA;  CC_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu&#xD;&#xA;  CC_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CC&#xD;&#xA;  HOST_CC = None&#xD;&#xA;  cargo:rerun-if-env-changed=CC&#xD;&#xA;  CC = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CFLAGS&#xD;&#xA;  HOST_CFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS&#xD;&#xA;  CFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  CC=&quot;cc&quot;&#xD;&#xA;  CFLAGS=&quot;-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall&quot;&#xD;&#xA;  JEMALLOC_REPO_DIR=&quot;jemalloc&quot;&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_MALLOC_CONF&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_PAGE&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_HUGEPAGE&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_QUANTUM&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_VADDR&#xD;&#xA;  running: &quot;sh&quot; &quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/configure&quot; &quot;--disable-cxx&quot; &quot;--enable-doc=no&quot; &quot;--enable-shared=no&quot; &quot;--with-private-namespace=_rjem_&quot; &quot;--host=x86_64-unknown-linux-gnu&quot; &quot;--build=x86_64-unknown-linux-gnu&quot; &quot;--prefix=/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out&quot;&#xD;&#xA;  running: &quot;tail&quot; &quot;-n&quot; &quot;100&quot; &quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/config.log&quot;&#xD;&#xA;  XSLROOT=''&#xD;&#xA;  XSLTPROC=''&#xD;&#xA;  a=''&#xD;&#xA;  abi=''&#xD;&#xA;  abs_objroot='/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/'&#xD;&#xA;  abs_srcroot='/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/'&#xD;&#xA;  ac_ct_CC=''&#xD;&#xA;  ac_ct_CXX=''&#xD;&#xA;  bindir='${exec_prefix}/bin'&#xD;&#xA;  build='x86_64-unknown-linux-gnu'&#xD;&#xA;  build_alias='x86_64-unknown-linux-gnu'&#xD;&#xA;  build_cpu=''&#xD;&#xA;  build_os=''&#xD;&#xA;  build_vendor=''&#xD;&#xA;  cfghdrs_in=''&#xD;&#xA;  cfghdrs_out=''&#xD;&#xA;  cfgoutputs_in=''&#xD;&#xA;  cfgoutputs_out=''&#xD;&#xA;  datadir='${datarootdir}'&#xD;&#xA;  datarootdir='${prefix}/share'&#xD;&#xA;  docdir='${datarootdir}/doc/${PACKAGE}'&#xD;&#xA;  dvidir='${docdir}'&#xD;&#xA;  enable_autogen=''&#xD;&#xA;  enable_cache_oblivious=''&#xD;&#xA;  enable_cxx='no'&#xD;&#xA;  enable_debug=''&#xD;&#xA;  enable_doc='no'&#xD;&#xA;  enable_experimental_smallocx=''&#xD;&#xA;  enable_fill=''&#xD;&#xA;  enable_initial_exec_tls=''&#xD;&#xA;  enable_lazy_lock=''&#xD;&#xA;  enable_log=''&#xD;&#xA;  enable_opt_safety_checks=''&#xD;&#xA;  enable_opt_size_checks=''&#xD;&#xA;  enable_prof=''&#xD;&#xA;  enable_readlinkat=''&#xD;&#xA;  enable_shared='no'&#xD;&#xA;  enable_static=''&#xD;&#xA;  enable_stats=''&#xD;&#xA;  enable_tls=''&#xD;&#xA;  enable_uaf_detection=''&#xD;&#xA;  enable_utrace=''&#xD;&#xA;  enable_xmalloc=''&#xD;&#xA;  enable_zone_allocator=''&#xD;&#xA;  exe=''&#xD;&#xA;  exec_prefix='NONE'&#xD;&#xA;  host='x86_64-unknown-linux-gnu'&#xD;&#xA;  host_alias='x86_64-unknown-linux-gnu'&#xD;&#xA;  host_cpu=''&#xD;&#xA;  host_os=''&#xD;&#xA;  host_vendor=''&#xD;&#xA;  htmldir='${docdir}'&#xD;&#xA;  importlib=''&#xD;&#xA;  includedir='${prefix}/include'&#xD;&#xA;  infodir='${datarootdir}/info'&#xD;&#xA;  install_suffix=''&#xD;&#xA;  je_=''&#xD;&#xA;  jemalloc_version=''&#xD;&#xA;  jemalloc_version_bugfix=''&#xD;&#xA;  jemalloc_version_gid=''&#xD;&#xA;  jemalloc_version_major=''&#xD;&#xA;  jemalloc_version_minor=''&#xD;&#xA;  jemalloc_version_nrev=''&#xD;&#xA;  libdir='${exec_prefix}/lib'&#xD;&#xA;  libdl=''&#xD;&#xA;  libexecdir='${exec_prefix}/libexec'&#xD;&#xA;  libprefix=''&#xD;&#xA;  link_whole_archive=''&#xD;&#xA;  localedir='${datarootdir}/locale'&#xD;&#xA;  localstatedir='${prefix}/var'&#xD;&#xA;  mandir='${datarootdir}/man'&#xD;&#xA;  o=''&#xD;&#xA;  objroot=''&#xD;&#xA;  oldincludedir='/usr/include'&#xD;&#xA;  pdfdir='${docdir}'&#xD;&#xA;  prefix='/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out'&#xD;&#xA;  private_namespace=''&#xD;&#xA;  program_transform_name='s,x,x,'&#xD;&#xA;  psdir='${docdir}'&#xD;&#xA;  rev='2'&#xD;&#xA;  sbindir='${exec_prefix}/sbin'&#xD;&#xA;  sharedstatedir='${prefix}/com'&#xD;&#xA;  so=''&#xD;&#xA;  srcroot=''&#xD;&#xA;  sysconfdir='${prefix}/etc'&#xD;&#xA;  target_alias=''&#xD;&#xA;  /* confdefs.h */&#xD;&#xA;  #define PACKAGE_NAME &quot;&quot;&#xD;&#xA;  #define PACKAGE_TARNAME &quot;&quot;&#xD;&#xA;  #define PACKAGE_VERSION &quot;&quot;&#xD;&#xA;  #define PACKAGE_STRING &quot;&quot;&#xD;&#xA;  #define PACKAGE_BUGREPORT &quot;&quot;&#xD;&#xA;  #define PACKAGE_URL &quot;&quot;&#xD;&#xA;&#xD;&#xA;  configure: exit 1&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  configure: error: Prefix should not contain spaces&#xD;&#xA;  thread 'main' panicked at 'command did not execute successfully: &quot;sh&quot; &quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/configure&quot; &quot;--disable-cxx&quot; &quot;--enable-doc=no&quot; &quot;--enable-shared=no&quot; &quot;--with-private-namespace=_rjem_&quot; &quot;--host=x86_64-unknown-linux-gnu&quot; &quot;--build=x86_64-unknown-linux-gnu&quot; &quot;--prefix=/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out&quot;&#xD;&#xA;  expected success, got: exit status: 1', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.5.2+5.3.0-patched/build.rs:330:9&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have no idea what to provide to help giving this issue a context so Ill just list down what im using&#xD;&#xA;&#xD;&#xA;Editor: VS Code&#xD;&#xA;&#xD;&#xA;OS: Windows 10&#xD;&#xA;&#xD;&#xA;rust config: &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/vXuEb.png&#xD;&#xA;&#xD;&#xA;wsl: wsl version 2" ContentLicense="CC BY-SA 4.0" />
  <row Id="22806" PostHistoryTypeId="2" PostId="5969" RevisionGUID="565511b5-55b8-4617-845a-04f745b9da8b" CreationDate="2022-11-18T04:28:00.620" UserId="251" Text="From this line:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  configure: error: Prefix should not contain spaces&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I guess, there are some spaces in your username?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22808" PostHistoryTypeId="2" PostId="5970" RevisionGUID="8947956b-0ffc-405f-b10c-d22ad68dc8a2" CreationDate="2022-11-18T06:26:07.547" UserId="359" Text="[orml-authority](https://github.com/open-web3-stack/open-runtime-module-library/blob/master/authority/src/lib.rs) implements a mechanism to allow origin to dispatch calls after and only after a delay. This is implemented using a pallet origin [`DelayedOrigin`](https://github.com/open-web3-stack/open-runtime-module-library/blob/740f0b83f23f13dc540a8df2773b119446392c57/authority/src/lib.rs#L49).&#xD;&#xA;&#xD;&#xA;The `DealyedOrigin` references the original origin so it can dispatch the call with the original origin later after the delay.&#xD;&#xA;&#xD;&#xA;Something like:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;enum RuntimeOrigin {&#xD;&#xA;    System(frame_system::Origin),&#xD;&#xA;    OtherPallet(other_pallet::Origin),&#xD;&#xA;    Authority(orml_authoirty::DelayedOrigin&lt;BlockNumber, RuntimeOrigin&gt;),&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;struct DelayedOrigin&lt;BlockNumber, RuntimeOrigin&gt; {&#xD;&#xA;    pub delay: BlockNumber,&#xD;&#xA;    pub origin: Box&lt;PalletsOrigin&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With recent version of Substrate, it is required every storage item to have `MaxEncodedLen`.&#xD;&#xA;&#xD;&#xA;The default implementation is something like:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl MaxEncodedLen for RuntimeOrigin {&#xD;&#xA;    fn max_encoded_len() -&gt; usize {&#xD;&#xA;		1 + max(&#xD;&#xA;          frame_system::Origin::max_encoded_len(),&#xD;&#xA;          other_pallet::Origin::max_encoded_len(),&#xD;&#xA;          PalletsOrigin::&lt;BlockNumber, RuntimeOrigin&gt;::max_encoded_len()&#xD;&#xA;        )&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl &lt;BlockNumber, RuntimeOrigin&gt; MaxEncodedLen for DelayedOrigin&lt;BlockNumber, RuntimeOrigin&gt; {&#xD;&#xA;	fn max_encoded_len() -&gt; usize {&#xD;&#xA;		BlockNumber::max_encoded_len() + RuntimeOrigin::max_encoded_len()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, we have an infinite recursion here. Mostly because it is possible to construct an instance that is:&#xD;&#xA;```rs&#xD;&#xA;RuntimeOrigin::Authority(DelayedOrigin {&#xD;&#xA;  delay: 0,&#xD;&#xA;  origin: RuntimeOrigin::Authority(DelayedOrigin {&#xD;&#xA;    delay: 0,&#xD;&#xA;    origin: // keep nesting as much as we need&#xD;&#xA;  })&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Therefore the max encoded len is infinite or memory limit.&#xD;&#xA;&#xD;&#xA;This wasn't an issue previously because the memory usage is O(n) to the tx size. As long as there is a reasonable tx byte fee, it is ok to nest as many as people wants.&#xD;&#xA;&#xD;&#xA;However with recent Weight V2 change, we are required to know the upper size limit of a type. This requirements breaks the current working code.&#xD;&#xA;&#xD;&#xA;It is not unreasonable to not support nested `DelayedOrigin` and therefore break the loop. However implementation wise I don't see an easy way.&#xD;&#xA;&#xD;&#xA;The code will be something like:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl MaxEncodedLen for RuntimeOrigin {&#xD;&#xA;    fn max_encoded_len() -&gt; usize {&#xD;&#xA;		1 + max(&#xD;&#xA;          frame_system::Origin::max_encoded_len(),&#xD;&#xA;          other_pallet::Origin::max_encoded_len(),&#xD;&#xA;          PalletsOrigin::&lt;BlockNumber, RuntimeOrigin&gt;::max_encoded_len()&#xD;&#xA;        )&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl RuntimeOrigin {&#xD;&#xA;    fn max_encoded_len_except_authority() -&gt; usize {&#xD;&#xA;		1 + max(&#xD;&#xA;          frame_system::Origin::max_encoded_len(),&#xD;&#xA;          other_pallet::Origin::max_encoded_len(),&#xD;&#xA;        )&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl &lt;BlockNumber, RuntimeOrigin&gt; MaxEncodedLen for DelayedOrigin&lt;BlockNumber, RuntimeOrigin&gt; {&#xD;&#xA;	fn max_encoded_len() -&gt; usize {&#xD;&#xA;		BlockNumber::max_encoded_len() + RuntimeOrigin::max_encoded_len_except_authority()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;BlockNumber, PalletsOrigin&gt; Decode for DelayedOrigin&lt;BlockNumber, PalletsOrigin&gt; {&#xD;&#xA;	fn decode&lt;I: codec::Input&gt;(input: &amp;mut I) -&gt; Result&lt;Self, codec::Error&gt; {&#xD;&#xA;		let delay = Decode::decode(input)?;&#xD;&#xA;		let origin = Decode::decode(input)?;&#xD;&#xA;        require_no_nesting(origin)?;&#xD;&#xA;		Ok(DelayedOrigin { delay, origin })&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, it is not currently possible to implement `max_encoded_len_except_authority` without modify the `construct_runtime` and it is simply no way to have the `construct_runtime` know what origin may contain nesting.&#xD;&#xA;&#xD;&#xA;Also for `require_no_nesting`, there is also no easy way to implement it. One possible implementation is use global variable to assert no reentrancy. But it will be great if there is a more clean way." ContentLicense="CC BY-SA 4.0" />
  <row Id="22810" PostHistoryTypeId="1" PostId="5970" RevisionGUID="8947956b-0ffc-405f-b10c-d22ad68dc8a2" CreationDate="2022-11-18T06:26:07.547" UserId="359" Text="Implement MaxEncodedLen for Nested Origin" ContentLicense="CC BY-SA 4.0" />
  <row Id="22811" PostHistoryTypeId="3" PostId="5970" RevisionGUID="8947956b-0ffc-405f-b10c-d22ad68dc8a2" CreationDate="2022-11-18T06:26:07.547" UserId="359" Text="|pallet|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22812" PostHistoryTypeId="5" PostId="5970" RevisionGUID="3c94e61b-4b9a-41a4-9ca8-c21a2b327565" CreationDate="2022-11-18T06:32:21.637" UserId="359" Comment="added 164 characters in body" Text="[orml-authority](https://github.com/open-web3-stack/open-runtime-module-library/blob/master/authority/src/lib.rs) implements a mechanism to allow origin to dispatch calls after and only after a delay. This is implemented using a pallet origin [`DelayedOrigin`](https://github.com/open-web3-stack/open-runtime-module-library/blob/740f0b83f23f13dc540a8df2773b119446392c57/authority/src/lib.rs#L49).&#xD;&#xA;&#xD;&#xA;The `DealyedOrigin` references the original origin so it can dispatch the call with the original origin later after the delay.&#xD;&#xA;&#xD;&#xA;Something like:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;enum RuntimeOrigin {&#xD;&#xA;    System(frame_system::Origin),&#xD;&#xA;    OtherPallet(other_pallet::Origin),&#xD;&#xA;    Authority(orml_authoirty::DelayedOrigin&lt;BlockNumber, RuntimeOrigin&gt;),&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;struct DelayedOrigin&lt;BlockNumber, RuntimeOrigin&gt; {&#xD;&#xA;    pub delay: BlockNumber,&#xD;&#xA;    pub origin: Box&lt;PalletsOrigin&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With recent version of Substrate, it is required every storage item to have `MaxEncodedLen`.&#xD;&#xA;&#xD;&#xA;The default implementation is something like:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl MaxEncodedLen for RuntimeOrigin {&#xD;&#xA;    fn max_encoded_len() -&gt; usize {&#xD;&#xA;		1 + max(&#xD;&#xA;          frame_system::Origin::max_encoded_len(),&#xD;&#xA;          other_pallet::Origin::max_encoded_len(),&#xD;&#xA;          PalletsOrigin::&lt;BlockNumber, RuntimeOrigin&gt;::max_encoded_len()&#xD;&#xA;        )&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl &lt;BlockNumber, RuntimeOrigin&gt; MaxEncodedLen for DelayedOrigin&lt;BlockNumber, RuntimeOrigin&gt; {&#xD;&#xA;	fn max_encoded_len() -&gt; usize {&#xD;&#xA;		BlockNumber::max_encoded_len() + RuntimeOrigin::max_encoded_len()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, we have an infinite recursion here. Mostly because it is possible to construct an instance that is:&#xD;&#xA;```rs&#xD;&#xA;RuntimeOrigin::Authority(DelayedOrigin {&#xD;&#xA;  delay: 0,&#xD;&#xA;  origin: RuntimeOrigin::Authority(DelayedOrigin {&#xD;&#xA;    delay: 0,&#xD;&#xA;    origin: // keep nesting as much as we need&#xD;&#xA;  })&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Therefore the max encoded len is infinite or memory limit.&#xD;&#xA;&#xD;&#xA;This wasn't an issue previously because the memory usage is O(n) to the tx size. As long as there is a reasonable tx byte fee, it is ok to nest as many as people wants.&#xD;&#xA;&#xD;&#xA;However with recent Weight V2 change, we are required to know the upper size limit of a type. This requirements breaks the current working code.&#xD;&#xA;&#xD;&#xA;It is not unreasonable to not support nested `DelayedOrigin` and therefore break the loop. However implementation wise I don't see an easy way.&#xD;&#xA;&#xD;&#xA;The code will be something like:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl MaxEncodedLen for RuntimeOrigin {&#xD;&#xA;    fn max_encoded_len() -&gt; usize {&#xD;&#xA;		1 + max(&#xD;&#xA;          frame_system::Origin::max_encoded_len(),&#xD;&#xA;          other_pallet::Origin::max_encoded_len(),&#xD;&#xA;          PalletsOrigin::&lt;BlockNumber, RuntimeOrigin&gt;::max_encoded_len()&#xD;&#xA;        )&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl RuntimeOrigin {&#xD;&#xA;    fn max_encoded_len_except_authority() -&gt; usize {&#xD;&#xA;		1 + max(&#xD;&#xA;          frame_system::Origin::max_encoded_len(),&#xD;&#xA;          other_pallet::Origin::max_encoded_len(),&#xD;&#xA;        )&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl &lt;BlockNumber, RuntimeOrigin&gt; MaxEncodedLen for DelayedOrigin&lt;BlockNumber, RuntimeOrigin&gt; {&#xD;&#xA;	fn max_encoded_len() -&gt; usize {&#xD;&#xA;		BlockNumber::max_encoded_len() + RuntimeOrigin::max_encoded_len_except_authority()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;BlockNumber, PalletsOrigin&gt; Decode for DelayedOrigin&lt;BlockNumber, PalletsOrigin&gt; {&#xD;&#xA;	fn decode&lt;I: codec::Input&gt;(input: &amp;mut I) -&gt; Result&lt;Self, codec::Error&gt; {&#xD;&#xA;		let delay = Decode::decode(input)?;&#xD;&#xA;		let origin = Decode::decode(input)?;&#xD;&#xA;        require_no_nesting(origin)?;&#xD;&#xA;		Ok(DelayedOrigin { delay, origin })&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, it is not currently possible to implement `max_encoded_len_except_authority` without modify the `construct_runtime` and it is simply no way to have the `construct_runtime` know what origin may contain nesting.&#xD;&#xA;&#xD;&#xA;Also for `require_no_nesting`, there is also no easy way to implement it. One possible implementation is use global variable to assert no reentrancy. But it will be great if there is a more clean way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;Side question: What will go wrong if `max_encoded_len` is underestimating the number? i.e. when it returns 200 but the actual answer is max tx length." ContentLicense="CC BY-SA 4.0" />
  <row Id="22813" PostHistoryTypeId="2" PostId="5971" RevisionGUID="4cda15b1-bd88-40ef-929c-4569e99417d5" CreationDate="2022-11-18T08:34:09.650" UserId="445" Text="&#xD;&#xA;Indeed, I don't understand this statement `A type that can be used in runtime structures` in docs: https://paritytech.github.io/substrate/master/sp_runtime/traits/trait.Member.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I noticed that some associated types in `Config` trait (like `Index`, `BlockNumber`, `Hash`,...) have defined `Member` trait, but the rest are not.  &#xD;&#xA;&#xD;&#xA;I have some questions:&#xD;&#xA;&#xD;&#xA;1. When do we use `Member` trait?&#xD;&#xA;2. What is the purpose of `Member` trait? " ContentLicense="CC BY-SA 4.0" />
  <row Id="22815" PostHistoryTypeId="1" PostId="5971" RevisionGUID="4cda15b1-bd88-40ef-929c-4569e99417d5" CreationDate="2022-11-18T08:34:09.650" UserId="445" Text="What is the meaning of trait `Member`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22816" PostHistoryTypeId="3" PostId="5971" RevisionGUID="4cda15b1-bd88-40ef-929c-4569e99417d5" CreationDate="2022-11-18T08:34:09.650" UserId="445" Text="|pallet|runtime|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22817" PostHistoryTypeId="2" PostId="5972" RevisionGUID="fc40c69d-2e1d-4885-9a37-cee3861e9875" CreationDate="2022-11-18T09:03:08.903" UserId="53" Text="You're right that this kind of construct is not directly supported by `MaxEncodedLen` because, just like `Vec&lt;u8&gt;`, it has no strict limit to the encoded length.&#xD;&#xA;&#xD;&#xA;I wouldn't really trying to work around the `MaxEncodedLen` trait in this way as you're essentially undermining the protection given by the type system.&#xD;&#xA;&#xD;&#xA;One possible direction is to adapt the existing macros to allow your runtime to declare a second `RuntimeOrigin` type called e.g. `NonDelayedRuntimeOrigin`. This would not contain the problematic `DelayedOrigin` variant. You can then have `DelayedOrigin` take an inner type of `NonDelayedRuntimeOrigin`, and you avoid the recursion completely.&#xD;&#xA;&#xD;&#xA;&gt; What will go wrong if max_encoded_len is underestimating the number? i.e. when it returns 200 but the actual answer is max tx length.&#xD;&#xA;&#xD;&#xA;Essentially the same thing as if the compute-time `Weight` component is under-estimated: Worst case it will lead to a block whose PoV size is necessarily greater than the maximum valid PoV for a block, which will brick the chain.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22819" PostHistoryTypeId="2" PostId="5973" RevisionGUID="48788670-8562-434d-9d46-c47439c74985" CreationDate="2022-11-18T09:27:14.110" UserId="167" Text="This trait seem to have been added [years ago](https://github.com/paritytech/substrate/pull/169/files#diff-43c34a92d71c44db120a557d303da49f38b3d97135298a18c7b7ad49f1b1ed67R282) and hasn't had much change ever since. I think the primary purpose is to simply be the super-trait number of other sub-traits and be used for any type that needs to be bounded by all the sub-traits. &#xD;&#xA;&#xD;&#xA;You can and should use `Member` in any place where the set of sub-traits is what you already wanted to bound something by." ContentLicense="CC BY-SA 4.0" />
  <row Id="22821" PostHistoryTypeId="5" PostId="5960" RevisionGUID="d198dd00-4a30-4e89-acbb-db001adff4fe" CreationDate="2022-11-18T09:56:32.850" UserId="3122" Comment="added 117 characters in body" Text="I am working on Substrate-based node upgrades.&#xD;&#xA;&#xD;&#xA;I stick to Polkadot releases and start from [polkadot-v0.8.25](https://github.com/paritytech/polkadot/releases/tag/v0.8.25) to the latest versions. While upgrading I need to make sure that I don’t miss any storage migrations.&#xD;&#xA;I’ve tried this algorithm:&#xD;&#xA; 1. Find migration code in the Substrate repository.&#xD;&#xA; 2. Find the location of the migration execution in the Substrate&#xD;&#xA;    repository.&#xD;&#xA; 3. If the execution location isn’t found in the Substrate repository and is found in the Polkadot repository, I consider adding this migration to my node.&#xD;&#xA;&#xD;&#xA;But this approach is very time consuming so I’m looking for some optimisations. I’ve checked couple of releases along with a [bunch of PRs with “E1-runtimemigration” label](https://github.com/paritytech/substrate/issues?q=label%3AE1-runtimemigration%20) and it looks like there are two ways to execute a migration:&#xD;&#xA; 1. From a pallet itself via [onRuntimeUpgrade hook](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html).  Looks like I don’t need to execute this type of migration on my own.&#xD;&#xA; 2. From [runtime/polkadot/src/lib.rs -&gt;&#xD;&#xA;    frame_executive::Executive](https://github.com/paritytech/polkadot/blob/v0.8.28/runtime/polkadot/src/lib.rs#L1066).&#xD;&#xA;&#xD;&#xA;The questions:&#xD;&#xA;  1. Can someone confirm that I should care only about the migrations executed from runtime/polkadot/src/lib.rs -&gt; frame_executive::Executive?&#xD;&#xA;  2. If I am wrong, what are the other places to execute the migrations and how to identify them?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22822" PostHistoryTypeId="5" PostId="5960" RevisionGUID="0a593247-6de3-4e13-bd16-dc8c34051e5a" CreationDate="2022-11-18T10:16:21.900" UserId="3122" Comment="added 22 characters in body" Text="I am working on Substrate-based node upgrades.&#xD;&#xA;&#xD;&#xA;I stick to Polkadot releases and start from [polkadot-v0.8.25](https://github.com/paritytech/polkadot/releases/tag/v0.8.25) to the latest versions. While upgrading I need to make sure that I don’t miss any storage migrations.&#xD;&#xA;I’ve tried this algorithm:&#xD;&#xA; 1. Find migration code in the Substrate repository.&#xD;&#xA; 2. Find the location of the migration execution in the Substrate&#xD;&#xA;    repository.&#xD;&#xA; 3. If the execution location isn’t found in the Substrate repository and is found in the Polkadot repository, I consider adding this migration to my node.&#xD;&#xA;&#xD;&#xA;But this approach is very time consuming so I’m looking for some optimisations. I’ve checked couple of releases along with a [bunch of PRs with “E1-runtimemigration” label](https://github.com/paritytech/substrate/issues?q=label%3AE1-runtimemigration%20) and it looks like there are two ways to execute a migration:&#xD;&#xA; 1. From a pallet itself via [onRuntimeUpgrade hook](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html) or some other handlers. Looks like I don’t need to execute this type of migration on my own.&#xD;&#xA; 2. From [runtime/polkadot/src/lib.rs -&gt;&#xD;&#xA;    frame_executive::Executive](https://github.com/paritytech/polkadot/blob/v0.8.28/runtime/polkadot/src/lib.rs#L1066).&#xD;&#xA;&#xD;&#xA;The questions:&#xD;&#xA;  1. Can someone confirm that I should care only about the migrations executed from runtime/polkadot/src/lib.rs -&gt; frame_executive::Executive?&#xD;&#xA;  2. If I am wrong, what are the other places to execute the migrations and how to identify them?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22823" PostHistoryTypeId="2" PostId="5974" RevisionGUID="be215000-8045-4696-b9fa-c438e0da45d7" CreationDate="2022-11-18T10:51:50.183" UserId="2423" Text="Whilst running a Polkadot node, the VPS ran out of disk space.&#xD;&#xA;&#xD;&#xA;After re-sizing the box, restarting the service gives a DB version error:&#xD;&#xA;&#xD;&#xA;    0: Backend error: Database version cannot be read&#xD;&#xA;&#xD;&#xA;Is this recoverable, or do I need to resync from scratch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22825" PostHistoryTypeId="1" PostId="5974" RevisionGUID="be215000-8045-4696-b9fa-c438e0da45d7" CreationDate="2022-11-18T10:51:50.183" UserId="2423" Text="Recovering From No Space on Device" ContentLicense="CC BY-SA 4.0" />
  <row Id="22826" PostHistoryTypeId="3" PostId="5974" RevisionGUID="be215000-8045-4696-b9fa-c438e0da45d7" CreationDate="2022-11-18T10:51:50.183" UserId="2423" Text="|polkadot|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22827" PostHistoryTypeId="2" PostId="5975" RevisionGUID="5a2c40b0-a7f7-4e26-a6c6-4a7ec860d355" CreationDate="2022-11-18T11:50:52.633" UserId="73" Text="&gt; Is this recoverable, or do I need to resync from scratch?&#xD;&#xA;&#xD;&#xA;No, that is sadly not recoverable. &#xD;&#xA;&#xD;&#xA;We have an [issue][1] open to stop the node when the disk is running full. This should in the future prevent these errors.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/12399" ContentLicense="CC BY-SA 4.0" />
  <row Id="22829" PostHistoryTypeId="5" PostId="5960" RevisionGUID="205bdf5a-a1e9-420b-b4d4-73684c5159d9" CreationDate="2022-11-18T12:14:02.317" UserId="3122" Comment="improved formatting" Text="I am working on Substrate-based node upgrades.&#xD;&#xA;&#xD;&#xA;I stick to Polkadot releases and start from [polkadot-v0.8.25](https://github.com/paritytech/polkadot/releases/tag/v0.8.25) to the latest versions. While upgrading I need to make sure that I don’t miss any storage migrations.&#xD;&#xA;I’ve tried this algorithm:&#xD;&#xA; 1. Find migration code in the Substrate repository.&#xD;&#xA; 2. Find the location of the migration execution in the Substrate&#xD;&#xA;    repository.&#xD;&#xA; 3. If the execution location isn’t found in the Substrate repository and is found in the Polkadot repository, I consider adding this migration to my node.&#xD;&#xA;&#xD;&#xA;But this approach is very time consuming so I’m looking for some optimisations. I’ve checked couple of releases along with a [bunch of PRs with “E1-runtimemigration” label](https://github.com/paritytech/substrate/issues?q=label%3AE1-runtimemigration%20) and it looks like there are two ways to execute a migration:&#xD;&#xA; 1. From a pallet itself via [onRuntimeUpgrade hook](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html) (or some other handlers) and [decl_storage!](https://github.com/paritytech/substrate/pull/8763/files). Looks like I don’t need to execute this type of migration on my own.&#xD;&#xA; 2. From [runtime/polkadot/src/lib.rs -&gt;&#xD;&#xA;    frame_executive::Executive](https://github.com/paritytech/polkadot/blob/v0.8.28/runtime/polkadot/src/lib.rs#L1066).&#xD;&#xA;&#xD;&#xA;The questions:&#xD;&#xA;  1. Can someone confirm that I should care only about the migrations executed from runtime/polkadot/src/lib.rs -&gt; frame_executive::Executive?&#xD;&#xA;  2. If I am wrong, what are the other places to execute the migrations and how to identify them?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22830" PostHistoryTypeId="2" PostId="5976" RevisionGUID="cc5bca0a-67da-4079-aa73-c3271b83e031" CreationDate="2022-11-18T13:25:23.153" UserId="309" Text="Is it possible to use a custom_token created with the `assets_pallet` in the `democracy_pallet` instead of the native_token?&#xD;&#xA;&#xD;&#xA;### *EXPLANATION*&#xD;&#xA;When voting during a referendum, I would like the `balance` parameter of the `vote` extrinsic to be the balance of the custom_token instead of the native token. Every other fees/transactions will still need to use the native_token. Any suggestion, or a concrete example? please?&#xD;&#xA;Kazu&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22832" PostHistoryTypeId="1" PostId="5976" RevisionGUID="cc5bca0a-67da-4079-aa73-c3271b83e031" CreationDate="2022-11-18T13:25:23.153" UserId="309" Text="Assets pallet token and democracy pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="22833" PostHistoryTypeId="3" PostId="5976" RevisionGUID="cc5bca0a-67da-4079-aa73-c3271b83e031" CreationDate="2022-11-18T13:25:23.153" UserId="309" Text="|assets|token|democracy|reserved-balance|locked-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22838" PostHistoryTypeId="52" PostId="5970" RevisionGUID="a6e09495-222b-4161-9aec-e7a8c7a3c7ac" CreationDate="2022-11-18T14:26:15.057" />
  <row Id="22839" PostHistoryTypeId="2" PostId="5978" RevisionGUID="bc47ee36-dda7-4e8c-b658-7fb5132db5c5" CreationDate="2022-11-18T14:29:38.917" UserId="2446" Text="My Polkadot-JS explorer UI[![enter image description here][1]][1] does not load when i connect to the local chain and gives a websocket error. &#xD;&#xA;```&#xD;&#xA; API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure&#xD;&#xA;```&#xD;&#xA;It just started this suddenly. Please how can i resolve this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1zNYz.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="22841" PostHistoryTypeId="1" PostId="5978" RevisionGUID="bc47ee36-dda7-4e8c-b658-7fb5132db5c5" CreationDate="2022-11-18T14:29:38.917" UserId="2446" Text="Can't Connect to Chain through websocket" ContentLicense="CC BY-SA 4.0" />
  <row Id="22842" PostHistoryTypeId="3" PostId="5978" RevisionGUID="bc47ee36-dda7-4e8c-b658-7fb5132db5c5" CreationDate="2022-11-18T14:29:38.917" UserId="2446" Text="|polkadot|websocket|explorer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22843" PostHistoryTypeId="2" PostId="5979" RevisionGUID="912c0ae4-1f86-4b3b-b5d9-fa64049f520b" CreationDate="2022-11-18T14:30:05.707" UserId="620" Text="It's not possible right now, but will be after there's a `fungibles::Lockable` implementation for Assets (https://github.com/paritytech/substrate/issues/11446)" ContentLicense="CC BY-SA 4.0" />
  <row Id="22845" PostHistoryTypeId="2" PostId="5980" RevisionGUID="a280ff60-6ae7-41a1-929c-64f8eeb31010" CreationDate="2022-11-18T14:37:38.573" UserId="452" Text="In GRANDPA there are two phases of voting per round: [prevote](https://github.com/paritytech/finality-grandpa/blob/master/src/lib.rs#L81-L89) and [precommit](https://github.com/paritytech/finality-grandpa/blob/master/src/lib.rs#L98-L106). On a very high-level the first phase of voting will inform other participants on what they &quot;expect&quot; to finalize and it will, in some sense, limit what can be voted on to finalize in the next phase (precommit). As such, the actual finalization of blocks happens after the precommit phase is over. When a round concludes, a [commit](https://github.com/paritytech/finality-grandpa/blob/master/src/lib.rs#L270-L281) message is gossiped that includes all the precommits in the given round that justify a given block being finalized. This commit message is what is included as part of a GRANDPA [justification](https://github.com/paritytech/substrate/blob/master/primitives/finality-grandpa/src/lib.rs#L124-L138), but additionally it may contain extra block headers that might be needed to verify the commit (since voters might have voted for forks that eventually get orphaned and those blocks might no longer be available on the network).&#xD;&#xA;&#xD;&#xA;1) Yes, the precommit votes are included as part of a justification. It exists in the justification field associated with a given block and not on the block itself.&#xD;&#xA;&#xD;&#xA;2) A validator will always verify any justification that comes attached with a block for its validity. Additionally, it will make sure that **all** blocks that change the authority set (end of session/era) include a finality justification. The node will only enact GRANDPA authority set changes when the block that triggered it is finalized.&#xD;&#xA;&#xD;&#xA;It is important to take into account that due to the way GRANDPA works not all blocks are guaranteed to have a justification. Instead, the only blocks that **must** have a justification are the blocks changing authorities." ContentLicense="CC BY-SA 4.0" />
  <row Id="22849" PostHistoryTypeId="50" PostId="5410" RevisionGUID="0a447f5c-f5da-4819-8de7-5af7b881ba90" CreationDate="2022-11-18T15:02:55.330" UserId="-1" />
  <row Id="22850" PostHistoryTypeId="2" PostId="5982" RevisionGUID="1189abe9-9ecc-4c92-ac7a-a46d019f08b8" CreationDate="2022-11-18T15:44:40.327" UserId="87" Text="What you appear to be doing is running a node locally on your machine and attempting to connect to it. &#xD;&#xA;&#xD;&#xA;As noted you have not provided any context on which node you are running or any other details.&#xD;&#xA;&#xD;&#xA;* You should ensure that if you want to connect a UI to your node you need to have the correct arguments supplied during startup. &#xD;&#xA;&#xD;&#xA;    * There is some very good documentation from one of the Parachain teams [here][1] about setting up nodes.&#xD;&#xA;&#xD;&#xA;    * Although it should be noted that these docs refer to using nodes that use docker containers, the [arguments][2] used to start the nodes (that will be connected to polkadotjs apps) are the same. i.e. use these:&#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;--ws-external&#xD;&#xA;--rpc-cors=all&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The default websocket port will be `9944` and reachable from localhost or `127.0.0.1:9944`&#xD;&#xA;&#xD;&#xA;Lastly your node must be running to connect to it!&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.totemaccounting.com/#/nodes-docs/howto-setup-nodes&#xD;&#xA;  [2]: https://docs.totemaccounting.com/#/nodes-docs/howto-docker-uirpc-node?id=start-commands-for-a-uirpc-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="22852" PostHistoryTypeId="2" PostId="5983" RevisionGUID="f4ec96e3-2d28-42d3-9e9f-a6297ccbea68" CreationDate="2022-11-18T15:50:47.340" UserId="87" Text="It is not clear from your description if you are making changes to storage that later need to be applied to an already running Production chain or if you are just developing and change storage.&#xD;&#xA;&#xD;&#xA;If it is the former I would suggest that you very carefully consider what the final storage will look like and just build that. Although technically it can be changed later, there are many risks for a production environment, so storage versions are important to consider.&#xD;&#xA;&#xD;&#xA;If it is the latter, you never need to do this! Just purge your chain data which clears all the storage and start with new data." ContentLicense="CC BY-SA 4.0" />
  <row Id="22854" PostHistoryTypeId="2" PostId="5984" RevisionGUID="b30bd84d-1740-48da-88c7-3078676e4b25" CreationDate="2022-11-18T15:53:59.750" UserId="298" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;There are different sovereign account addresses here, what are the differences?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/StUVR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22856" PostHistoryTypeId="1" PostId="5984" RevisionGUID="b30bd84d-1740-48da-88c7-3078676e4b25" CreationDate="2022-11-18T15:53:59.750" UserId="298" Text="whats the difference between the two different sovereign account addresses?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22857" PostHistoryTypeId="3" PostId="5984" RevisionGUID="b30bd84d-1740-48da-88c7-3078676e4b25" CreationDate="2022-11-18T15:53:59.750" UserId="298" Text="|parachain|xcm|rococo|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22858" PostHistoryTypeId="5" PostId="5978" RevisionGUID="29ba0068-4628-4402-894e-dc11e035c8ca" CreationDate="2022-11-18T16:55:49.970" UserId="2446" Comment="added 77 characters in body" Text="My Polkadot-JS explorer UI[![enter image description here][1]][1] does not load when i connect to the local chain and gives a websocket error. &#xD;&#xA;```&#xD;&#xA; API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure&#xD;&#xA;```&#xD;&#xA;It just started this suddenly. Please how can i resolve this.&#xD;&#xA;&#xD;&#xA;I ran the local chain with &#xD;&#xA;```&#xD;&#xA;./target/release/node-template --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1zNYz.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="22860" PostHistoryTypeId="5" PostId="5978" RevisionGUID="56548e88-f852-4e34-bb6a-20e78455da88" CreationDate="2022-11-18T17:44:32.203" UserId="2446" Comment="added 41 characters in body" Text="My Polkadot-JS explorer UI[![enter image description here][1]][1] does not load when i connect to the local chain and gives a websocket error. &#xD;&#xA;```&#xD;&#xA; API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure&#xD;&#xA;```&#xD;&#xA;It just started this suddenly. Please how can i resolve this.&#xD;&#xA;&#xD;&#xA;I ran the local unmodified ```substrate-node-template``` chain with &#xD;&#xA;```&#xD;&#xA;./target/release/node-template --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1zNYz.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="22861" PostHistoryTypeId="52" PostId="5974" RevisionGUID="4036dd9c-4399-4d96-98d7-e889aef46fc2" CreationDate="2022-11-18T18:55:19.047" />
  <row Id="22864" PostHistoryTypeId="2" PostId="5986" RevisionGUID="18540b0d-b702-44ea-8000-7fe81a7cfd8e" CreationDate="2022-11-19T00:15:35.420" UserId="3407" Text="I am developing a chain in substrate, and am trying to find the best way to run integration tests against certain sets of extrinsic submissions when the network is running in development mode. It's largely for the purpose of testing external code that communicates with the chain via RPC calls, which is why I cannot use the built-in unit tests.&#xD;&#xA;&#xD;&#xA;Is there an existing framework for doing this other than just writing a little script using the javascript or python libraries?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22866" PostHistoryTypeId="1" PostId="5986" RevisionGUID="18540b0d-b702-44ea-8000-7fe81a7cfd8e" CreationDate="2022-11-19T00:15:35.420" UserId="3407" Text="Best way to automate extrinsic submissions for testing" ContentLicense="CC BY-SA 4.0" />
  <row Id="22867" PostHistoryTypeId="3" PostId="5986" RevisionGUID="18540b0d-b702-44ea-8000-7fe81a7cfd8e" CreationDate="2022-11-19T00:15:35.420" UserId="3407" Text="|rpc|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22868" PostHistoryTypeId="5" PostId="5966" RevisionGUID="a2dcf2ef-443e-430a-99a7-28da445063d5" CreationDate="2022-11-19T00:37:57.310" UserId="116" Comment="added 1828 characters in body" Text="*I know this question is more related to the usage of Brave browser, but the chance of getting a relevant answer would be less in brave forums where the general understanding of polkatot-js is less*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Connecting to a chain on `ws`on localhost fails when running in Brave browser, it used to work up to at least last week but now it get stuck on Initializing connection:&#xD;&#xA;&#xD;&#xA;[![Initializing connection][1]][1]&#xD;&#xA;&#xD;&#xA;The chain is still running, I verified the connection with both Firefox and Chromium with a link like this: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9943#/accounts&#xD;&#xA;&#xD;&#xA;The part of the question relevant in this forum is: *Is there anything in the polkadotjs app changed recently which could cause this?*&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;&#xD;&#xA;[![Console log is not happy!][2]][2]&#xD;&#xA;&#xD;&#xA;Here is a transcribed version of above logs if that is a clue:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;WS endpoint= ws://127.0.0.1:9943&#xD;&#xA;polkadot.01.10080f3a.js:1 WebSocket connection to 'ws://127.0.0.1:9943/' failed: &#xD;&#xA;connect @ polkadot.01.10080f3a.js:1&#xD;&#xA;main.3405627c.js:2 EventisTrusted: truebubbles: falsecancelBubble: falsecancelable: falsecomposed: falsecurrentTarget: WebSocket {url: 'ws://127.0.0.1:9943/', readyState: 3, bufferedAmount: 0, onopen: null, onerror: null, …}defaultPrevented: falseeventPhase: 0path: []returnValue: truesrcElement: WebSocket {url: 'ws://127.0.0.1:9943/', readyState: 3, bufferedAmount: 0, onopen: null, onerror: null, …}target: WebSocket {url: 'ws://127.0.0.1:9943/', readyState: 3, bufferedAmount: 0, onopen: null, onerror: null, …}timeStamp: 711.3999999985099type: &quot;error&quot;[[Prototype]]: Event&#xD;&#xA;(anonymous) @ main.3405627c.js:2&#xD;&#xA;polkadot.02.9fdc1d48.js:1 2022-11-19 09:32:02          API-WS: disconnected from ws://127.0.0.1:9943: 1006:: Abnormal Closure&#xD;&#xA;m @ polkadot.02.9fdc1d48.js:1&#xD;&#xA;polkadot.01.10080f3a.js:1 Uncaught (in promise) EventisTrusted: truebubbles: falsecancelBubble: falsecancelable: falsecomposed: falsecurrentTarget: WebSocket {url: 'ws://127.0.0.1:9943/', readyState: 3, bufferedAmount: 0, onopen: null, onerror: null, …}defaultPrevented: falseeventPhase: 0path: []returnValue: truesrcElement: WebSocket {url: 'ws://127.0.0.1:9943/', readyState: 3, bufferedAmount: 0, onopen: null, onerror: null, …}target: WebSocket {url: 'ws://127.0.0.1:9943/', readyState: 3, bufferedAmount: 0, onopen: null, onerror: null, …}timeStamp: 711.3999999985099type: &quot;error&quot;[[Prototype]]: Event&#xD;&#xA;polkadot.01.10080f3a.js:1 WebSocket connection to 'ws://127.0.0.1:9943/' failed: &#xD;&#xA;connect @ polkadot.01.10080f3a.js:1&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;EventisTrusted: truebubbles: falsecancelBubble: falsecancelable: falsecomposed: falsecurrentTarget: WebSocketbinaryType: &quot;blob&quot;bufferedAmount: 0extensions: &quot;&quot;onclose: nullonerror: nullonmessage: nullonopen: nullprotocol: &quot;&quot;readyState: 3url: &quot;ws://127.0.0.1:9943/&quot;[[Prototype]]: WebSocketdefaultPrevented: falseeventPhase: 0path: []returnValue: truesrcElement: WebSocketbinaryType: &quot;blob&quot;bufferedAmount: 0extensions: &quot;&quot;onclose: nullonerror: nullonmessage: nullonopen: nullprotocol: &quot;&quot;readyState: 3url: &quot;ws://127.0.0.1:9943/&quot;[[Prototype]]: WebSockettarget: WebSocketbinaryType: &quot;blob&quot;bufferedAmount: 0extensions: &quot;&quot;onclose: nullonerror: nullonmessage: nullonopen: nullprotocol: &quot;&quot;readyState: 3url: &quot;ws://127.0.0.1:9943/&quot;[[Prototype]]: WebSockettimeStamp: 711.3999999985099type: &quot;error&quot;[[Prototype]]: EventAT_TARGET: 2BUBBLING_PHASE: 3CAPTURING_PHASE: 1NONE: 0bubbles: (...)cancelBubble: (...)cancelable: (...)composed: (...)composedPath: ƒ composedPath()currentTarget: (...)defaultPrevented: (...)eventPhase: (...)initEvent: ƒ initEvent()path: (...)preventDefault: ƒ preventDefault()returnValue: (...)srcElement: (...)stopImmediatePropagation: ƒ stopImmediatePropagation()stopPropagation: ƒ stopPropagation()target: (...)timeStamp: (...)type: (...)constructor: ƒ Event()AT_TARGET: 2BUBBLING_PHASE: 3CAPTURING_PHASE: 1NONE: 0arguments: nullcaller: nulllength: 1name: &quot;Event&quot;prototype: Event {…}[[Prototype]]: ƒ ()[[Scopes]]: Scopes[0]Symbol(Symbol.toStringTag): &quot;Event&quot;get bubbles: ƒ bubbles()get cancelBubble: ƒ cancelBubble()set cancelBubble: ƒ cancelBubble()get cancelable: ƒ cancelable()get composed: ƒ composed()get currentTarget: ƒ currentTarget()get defaultPrevented: ƒ defaultPrevented()get eventPhase: ƒ eventPhase()get path: ƒ path()get returnValue: ƒ returnValue()set returnValue: ƒ returnValue()get srcElement: ƒ srcElement()get target: ƒ target()get timeStamp: ƒ timeStamp()get type: ƒ type()[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()&#xD;&#xA;(anonymous) @ main.3405627c.js:2&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mvoe5.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/KyLe7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22870" PostHistoryTypeId="50" PostId="5453" RevisionGUID="459c14bb-d526-40d9-81c8-d50392e52206" CreationDate="2022-11-19T03:01:55.207" UserId="-1" />
  <row Id="22871" PostHistoryTypeId="50" PostId="5355" RevisionGUID="ada1c501-ae19-4932-a970-73690a1dbc6c" CreationDate="2022-11-19T08:05:45.730" UserId="-1" />
  <row Id="22872" PostHistoryTypeId="2" PostId="5987" RevisionGUID="b23d5dc3-5517-4fd5-b409-9d9a3ddd1317" CreationDate="2022-11-19T08:36:12.917" UserId="3459" Text="I'm trying to compile a local Substrate node and receive the following :&#xD;&#xA;&#xD;&#xA;    caladay@LAPTOP-GTIDPPCA:~/substrate-node-template$ cargo build --release&#xD;&#xA;       Compiling librocksdb-sys v0.8.0+7.4.4&#xD;&#xA;       Compiling sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)&#xD;&#xA;    error: failed to run custom build command for `sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/home/caladay/substrate-node-template/target/release/build/sc-network-bitswap-358d1cd360199f79/build-script-build` (exit status: 101)&#xD;&#xA;      --- stdout&#xD;&#xA;      Running: &quot;/usr/bin/protoc&quot; &quot;--include_imports&quot; &quot;--include_source_info&quot; &quot;-o&quot; &quot;/tmp/prost-build2QKUaS/prost-descriptor-set&quot; &quot;-I&quot; &quot;src/schema&quot; &quot;bitswap.v1.2.0.proto&quot;&#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;      thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: &quot;protoc failed: bitswap.v1.2.0.proto: No such file or directory\n&quot; }', /home/caladay/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/bitswap/build.rs:4:58&#xD;&#xA;      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    The following warnings were emitted during compilation:&#xD;&#xA;    &#xD;&#xA;    warning: snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm&#xD;&#xA;    warning:       : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal));&#xD;&#xA;    warning:                                    ^&#xD;&#xA;    warning: 1 error generated.&#xD;&#xA;    &#xD;&#xA;    error: failed to run custom build command for `librocksdb-sys v0.8.0+7.4.4`&#xD;&#xA;&#xD;&#xA;I tried to install clang (as metioned [here][1]). Do you have any suggestions ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/66583720/some-error-failed-to-run-custom-build-command-for-librocksdb-sys-v6-11-4" ContentLicense="CC BY-SA 4.0" />
  <row Id="22874" PostHistoryTypeId="1" PostId="5987" RevisionGUID="b23d5dc3-5517-4fd5-b409-9d9a3ddd1317" CreationDate="2022-11-19T08:36:12.917" UserId="3459" Text="Error while compiling a local Substrate node: bitswap.v1.2.0.proto" ContentLicense="CC BY-SA 4.0" />
  <row Id="22875" PostHistoryTypeId="3" PostId="5987" RevisionGUID="b23d5dc3-5517-4fd5-b409-9d9a3ddd1317" CreationDate="2022-11-19T08:36:12.917" UserId="3459" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22876" PostHistoryTypeId="4" PostId="5987" RevisionGUID="0e048307-693c-48d6-80b6-f24abe0123cd" CreationDate="2022-11-19T08:36:48.127" UserId="3459" Comment="edited title" Text="Error while compiling a local Substrate node: bitswap.v1.2.0.proto + librocksdb-sys" ContentLicense="CC BY-SA 4.0" />
  <row Id="22877" PostHistoryTypeId="2" PostId="5988" RevisionGUID="e860a71a-caea-44df-a9cc-ac2339ea7e3c" CreationDate="2022-11-19T08:45:59.483" UserId="80" Text="This could happen if the browser does not allow insecure websocket connections from a https (secure) website. It should be possible to look into the site settings for `https://polkadot.js.org/` and allow insecure content.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22880" PostHistoryTypeId="2" PostId="5989" RevisionGUID="9f725872-0a86-4d49-a212-0b8dfbde0134" CreationDate="2022-11-19T09:19:55.337" UserId="251" Text="Did you install the `g++`? I think `librocksdb-sys` requires `g++`." ContentLicense="CC BY-SA 4.0" />
  <row Id="22882" PostHistoryTypeId="5" PostId="5987" RevisionGUID="26e51594-8a69-4b7c-b908-6dc8a998c880" CreationDate="2022-11-19T10:10:05.990" UserId="3459" Comment="added 1377 characters in body" Text="I'm trying to compile a local Substrate node and receive the following :&#xD;&#xA;&#xD;&#xA;    caladay@LAPTOP-GTIDPPCA:~/substrate-node-template$ cargo build --release&#xD;&#xA;       Compiling librocksdb-sys v0.8.0+7.4.4&#xD;&#xA;       Compiling sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)&#xD;&#xA;    error: failed to run custom build command for `sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/home/caladay/substrate-node-template/target/release/build/sc-network-bitswap-358d1cd360199f79/build-script-build` (exit status: 101)&#xD;&#xA;      --- stdout&#xD;&#xA;      Running: &quot;/usr/bin/protoc&quot; &quot;--include_imports&quot; &quot;--include_source_info&quot; &quot;-o&quot; &quot;/tmp/prost-build2QKUaS/prost-descriptor-set&quot; &quot;-I&quot; &quot;src/schema&quot; &quot;bitswap.v1.2.0.proto&quot;&#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;      thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: &quot;protoc failed: bitswap.v1.2.0.proto: No such file or directory\n&quot; }', /home/caladay/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/bitswap/build.rs:4:58&#xD;&#xA;      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    The following warnings were emitted during compilation:&#xD;&#xA;    &#xD;&#xA;    warning: snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm&#xD;&#xA;    warning:       : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal));&#xD;&#xA;    warning:                                    ^&#xD;&#xA;    warning: 1 error generated.&#xD;&#xA;    &#xD;&#xA;    error: failed to run custom build command for `librocksdb-sys v0.8.0+7.4.4`&#xD;&#xA;&#xD;&#xA;I tried to install clang (as metioned [here][1]). Do you have any suggestions ?&#xD;&#xA;&#xD;&#xA;As suggested by @AurevoirXavier I installed g++. It seems that it was already installed but the error message evolved:&#xD;&#xA;&#xD;&#xA;    caladay@LAPTOP-GTIDPPCA:~/substrate-node-template$ cargo build --release&#xD;&#xA;       Compiling sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)&#xD;&#xA;       Compiling kvdb-rocksdb v0.16.0&#xD;&#xA;    error: failed to run custom build command for `sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/home/caladay/substrate-node-template/target/release/build/sc-network-bitswap-358d1cd360199f79/build-script-build` (exit status: 101)&#xD;&#xA;      --- stdout&#xD;&#xA;      Running: &quot;/usr/bin/protoc&quot; &quot;--include_imports&quot; &quot;--include_source_info&quot; &quot;-o&quot; &quot;/tmp/prost-build3AYt6r/prost-descriptor-set&quot; &quot;-I&quot; &quot;src/schema&quot; &quot;bitswap.v1.2.0.proto&quot;&#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;      thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: &quot;protoc failed: bitswap.v1.2.0.proto: No such file or directory\n&quot; }', /home/caladay/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/bitswap/build.rs:4:58&#xD;&#xA;      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/66583720/some-error-failed-to-run-custom-build-command-for-librocksdb-sys-v6-11-4" ContentLicense="CC BY-SA 4.0" />
  <row Id="22883" PostHistoryTypeId="5" PostId="5987" RevisionGUID="e013795f-da3d-4e1e-848c-6528c1f9b13c" CreationDate="2022-11-19T10:22:54.780" UserId="3459" Comment="added 471 characters in body" Text="I'm trying to compile a local Substrate node and receive the following :&#xD;&#xA;&#xD;&#xA;    caladay@LAPTOP-GTIDPPCA:~/substrate-node-template$ cargo build --release&#xD;&#xA;       Compiling librocksdb-sys v0.8.0+7.4.4&#xD;&#xA;       Compiling sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)&#xD;&#xA;    error: failed to run custom build command for `sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/home/caladay/substrate-node-template/target/release/build/sc-network-bitswap-358d1cd360199f79/build-script-build` (exit status: 101)&#xD;&#xA;      --- stdout&#xD;&#xA;      Running: &quot;/usr/bin/protoc&quot; &quot;--include_imports&quot; &quot;--include_source_info&quot; &quot;-o&quot; &quot;/tmp/prost-build2QKUaS/prost-descriptor-set&quot; &quot;-I&quot; &quot;src/schema&quot; &quot;bitswap.v1.2.0.proto&quot;&#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;      thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: &quot;protoc failed: bitswap.v1.2.0.proto: No such file or directory\n&quot; }', /home/caladay/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/bitswap/build.rs:4:58&#xD;&#xA;      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    The following warnings were emitted during compilation:&#xD;&#xA;    &#xD;&#xA;    warning: snappy/snappy.cc:1033:36: error: invalid output constraint '=@ccz' in asm&#xD;&#xA;    warning:       : [tag_type] &quot;+r&quot;(tag_type), &quot;=@ccz&quot;(is_literal));&#xD;&#xA;    warning:                                    ^&#xD;&#xA;    warning: 1 error generated.&#xD;&#xA;    &#xD;&#xA;    error: failed to run custom build command for `librocksdb-sys v0.8.0+7.4.4`&#xD;&#xA;&#xD;&#xA;I tried to install clang (as metioned [here][1]). Do you have any suggestions ?&#xD;&#xA;&#xD;&#xA;As suggested by @AurevoirXavier I installed g++. It seems that it was already installed but the error message evolved:&#xD;&#xA;&#xD;&#xA;    caladay@LAPTOP-GTIDPPCA:~/substrate-node-template$ cargo build --release&#xD;&#xA;       Compiling sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)&#xD;&#xA;       Compiling kvdb-rocksdb v0.16.0&#xD;&#xA;    error: failed to run custom build command for `sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/home/caladay/substrate-node-template/target/release/build/sc-network-bitswap-358d1cd360199f79/build-script-build` (exit status: 101)&#xD;&#xA;      --- stdout&#xD;&#xA;      Running: &quot;/usr/bin/protoc&quot; &quot;--include_imports&quot; &quot;--include_source_info&quot; &quot;-o&quot; &quot;/tmp/prost-build3AYt6r/prost-descriptor-set&quot; &quot;-I&quot; &quot;src/schema&quot; &quot;bitswap.v1.2.0.proto&quot;&#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;      thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: &quot;protoc failed: bitswap.v1.2.0.proto: No such file or directory\n&quot; }', /home/caladay/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/bitswap/build.rs:4:58&#xD;&#xA;      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Rust toolchain:&#xD;&#xA;&#xD;&#xA;    caladay@LAPTOP-GTIDPPCA:~/substrate-node-template$ rustup show&#xD;&#xA;    Default host: x86_64-unknown-linux-gnu&#xD;&#xA;    rustup home:  /home/caladay/.rustup&#xD;&#xA;    &#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    nightly-x86_64-unknown-linux-gnu&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;    rustc 1.65.0 (897e37553 2022-11-02)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/66583720/some-error-failed-to-run-custom-build-command-for-librocksdb-sys-v6-11-4" ContentLicense="CC BY-SA 4.0" />
  <row Id="22884" PostHistoryTypeId="2" PostId="5990" RevisionGUID="bc58a9b8-4900-4a2f-96db-4ee17906eb4c" CreationDate="2022-11-19T11:09:25.317" UserId="1959" Text="&gt; [Sovereign Account][1]: An account controlled by a particular Consensus System, **within** some other Consensus System.&#xD;&#xA;&#xD;&#xA;So sovereign account is in other chains, and for different chains, there may be different account formats, and the relative `MultiLocation` is also different.&#xD;&#xA;&#xD;&#xA;For example: There is a parachainA(paraId2105), its sovereign account in Rococo is encode(&quot;para&quot;+2105), because of parachainA is a parachain attached to Rococo. Its sovereign account in parachainB(paraId2000) is encode(&quot;sibl&quot;+2105), because of parachainA and parachainB are sibling chains. As you see, the encod content is different due to the different relation of the chains. **And if you want to known the detail of the encoding, please check the answers under this question**: https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain/1210&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/xcm-format#13-vocabulary" ContentLicense="CC BY-SA 4.0" />
  <row Id="22887" PostHistoryTypeId="10" PostId="5081" RevisionGUID="a38a0465-8107-42c3-a474-4f742d5028b3" CreationDate="2022-11-19T13:25:42.347" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[4762],&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="22888" PostHistoryTypeId="2" PostId="5991" RevisionGUID="1ae812cd-8bea-4e19-bd18-cfac321b1569" CreationDate="2022-11-19T13:35:44.277" UserId="34" Text="As mentioned in the logs there you need protoc. see the deps needed here https://docs.substrate.io/install/linux/&#xD;&#xA;&#xD;&#xA;If a Debian based distribution, you likely need&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;protoc is part of protobuf-compiler" ContentLicense="CC BY-SA 4.0" />
  <row Id="22890" PostHistoryTypeId="2" PostId="5992" RevisionGUID="672a58e8-26c6-4479-abcc-7f0a777e709c" CreationDate="2022-11-19T19:26:32.067" UserId="2257" Text="For the following struct, I store the author of a post as the AccountId of the content creator which requires a default value. I cannot for the life of me figure out the proper syntax to handle this as nothing seems to work. Could I get a proper example please?&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, Clone, PartialEq, Encode, Decode, scale_info::TypeInfo)]&#xD;&#xA;    struct Post&lt;AccountId&gt; {&#xD;&#xA;    author: AccountId,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;AccountId&gt; Default for Post&lt;AccountId&gt; {&#xD;&#xA;    fn default() -&gt; Self {&#xD;&#xA;    Post : &quot;default address here&quot;,&#xD;&#xA;    }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I have tried using string, string.into(), etc. Could I please get the proper way to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22892" PostHistoryTypeId="1" PostId="5992" RevisionGUID="672a58e8-26c6-4479-abcc-7f0a777e709c" CreationDate="2022-11-19T19:26:32.067" UserId="2257" Text="What is the proper syntax to impl default for accountid?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22893" PostHistoryTypeId="3" PostId="5992" RevisionGUID="672a58e8-26c6-4479-abcc-7f0a777e709c" CreationDate="2022-11-19T19:26:32.067" UserId="2257" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22894" PostHistoryTypeId="2" PostId="5993" RevisionGUID="88bb6377-4a31-4ea7-984e-30ec3de15209" CreationDate="2022-11-19T19:53:01.353" UserId="620" Text="First, be careful with default `AccountId`s. It was [removed from Substrate](https://github.com/paritytech/substrate/pull/10403), so make sure you understand the need for a default and the risks and that you choose it wisely.&#xD;&#xA;&#xD;&#xA;It depends which `AccountId` you've chosen, but it's usually some variant of the [MultiAddress](https://github.com/paritytech/substrate/blob/ded44948e2d5a398abcb4e342b0513cb690961bb/primitives/runtime/src/multiaddress.rs#L26). Assuming that it's a 32 byte AccountId, you'd need to provide a `[u8; 32]`.&#xD;&#xA;&#xD;&#xA;Note that the SS58 _address_ includes a prefix, the 32 byte AccountId, and a checksum, so it actually has more information than just the AccountId. This is handy for address validation and UI rendering." ContentLicense="CC BY-SA 4.0" />
  <row Id="22896" PostHistoryTypeId="5" PostId="5992" RevisionGUID="aa3980af-ce8c-4608-a912-fc028ae418f1" CreationDate="2022-11-20T05:14:20.340" UserId="251" Comment="deleted 9 characters in body" Text="For the following struct, I store the author of a post as the AccountId of the content creator which requires a default value. I cannot for the life of me figure out the proper syntax to handle this as nothing seems to work. Could I get a proper example please?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[derive(Debug, Clone, PartialEq, Encode, Decode, scale_info::TypeInfo)]&#xD;&#xA;struct Post&lt;AccountId&gt; {&#xD;&#xA;    author: AccountId,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;AccountId&gt; Default for Post&lt;AccountId&gt; {&#xD;&#xA;    fn default() -&gt; Self {&#xD;&#xA;        Post: &quot;default address here&quot;,&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have tried using string, string.into(), etc. Could I please get the proper way to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22897" PostHistoryTypeId="2" PostId="5994" RevisionGUID="fd154d00-8477-46b2-9a3c-8f31b53223f0" CreationDate="2022-11-20T10:35:31.817" UserId="2722" Text="I gonna to check and test `TPS` and `bottleneck` in substrate . &#xD;&#xA;&#xD;&#xA;what should i do for that and how can i do that in local ? please guide me for that  . " ContentLicense="CC BY-SA 4.0" />
  <row Id="22899" PostHistoryTypeId="1" PostId="5994" RevisionGUID="fd154d00-8477-46b2-9a3c-8f31b53223f0" CreationDate="2022-11-20T10:35:31.817" UserId="2722" Text="how can test and check TPS in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22900" PostHistoryTypeId="3" PostId="5994" RevisionGUID="fd154d00-8477-46b2-9a3c-8f31b53223f0" CreationDate="2022-11-20T10:35:31.817" UserId="2722" Text="|polkadot|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22901" PostHistoryTypeId="2" PostId="5995" RevisionGUID="8cd508b4-f9b7-4413-9c6b-cca204d84f14" CreationDate="2022-11-20T14:10:11.623" UserId="489" Text="How many tokens are minted in Polkadot and Kusama in the past year? Is there any way to find out?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22903" PostHistoryTypeId="1" PostId="5995" RevisionGUID="8cd508b4-f9b7-4413-9c6b-cca204d84f14" CreationDate="2022-11-20T14:10:11.623" UserId="489" Text="About the total mint token in polkadot and kusama" ContentLicense="CC BY-SA 4.0" />
  <row Id="22904" PostHistoryTypeId="3" PostId="5995" RevisionGUID="8cd508b4-f9b7-4413-9c6b-cca204d84f14" CreationDate="2022-11-20T14:10:11.623" UserId="489" Text="|polkadot|kusama|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22905" PostHistoryTypeId="2" PostId="5996" RevisionGUID="131c482a-b61a-4715-b615-41176fa36456" CreationDate="2022-11-20T14:12:49.760" UserId="489" Text="I have solved this problem when i pass the decimal format of the vec&lt;u8&gt; instead of passing the vec&lt;u8&gt; directly. Because the vec&lt;u8&gt; is used to pass string, so when i pass the vec&lt;u8&gt; directly, it will be judged as the string, so it will be encoded." ContentLicense="CC BY-SA 4.0" />
  <row Id="22907" PostHistoryTypeId="2" PostId="5997" RevisionGUID="2d30c8f3-a276-4362-a616-3ec9f7d3c277" CreationDate="2022-11-20T14:36:48.047" UserId="3142" Text="I could not find much information/documentation on how to use the `provides`/`requires` tags (`TransactionTag`) Can someone please provide an example?  The tag is a vector of bytes.  Should I assume these are user-defined strings?  Where/how do you specify them when creating a transaction?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22909" PostHistoryTypeId="1" PostId="5997" RevisionGUID="2d30c8f3-a276-4362-a616-3ec9f7d3c277" CreationDate="2022-11-20T14:36:48.047" UserId="3142" Text="How to use transaction dependency tags (provides/requires)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22910" PostHistoryTypeId="3" PostId="5997" RevisionGUID="2d30c8f3-a276-4362-a616-3ec9f7d3c277" CreationDate="2022-11-20T14:36:48.047" UserId="3142" Text="|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22911" PostHistoryTypeId="2" PostId="5998" RevisionGUID="2fe2ea06-1f31-4336-bc93-33793a4bb389" CreationDate="2022-11-20T15:09:31.810" UserId="94" Text="Depending on your circumstances it could be better to use the `OnEmpty` of your `StorageValue` or an `OptionQuery`.&#xD;&#xA;&#xD;&#xA;Your Rust syntax looks off to me:&#xD;&#xA;```rust&#xD;&#xA;#[derive(Debug, Clone, PartialEq, Encode, Decode, scale_info::TypeInfo)]&#xD;&#xA;struct Post&lt;AccountId&gt; {&#xD;&#xA;    author: AccountId,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;AccountId&gt; Default for Post&lt;AccountId&gt; {&#xD;&#xA;    fn default() -&gt; Self {&#xD;&#xA;        Self { author: &quot;default address here&quot; }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22913" PostHistoryTypeId="5" PostId="5753" RevisionGUID="b3d9a288-eedc-4bbb-aa50-a81833d77c01" CreationDate="2022-11-20T15:20:05.837" UserId="489" Comment="deleted 112 characters in body" Text="## Problem&#xD;&#xA;How can I get the correct `Vec&lt;u8&gt;` in the pallet when I use `Vec&lt;u8&gt;` as the parameter of the pallet?&#xD;&#xA;&#xD;&#xA;## code&#xD;&#xA;```rust&#xD;&#xA;pub fn generate_proof_vkey(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof_a: Vec&lt;u8&gt;,&#xD;&#xA;			proof_b: Vec&lt;u8&gt;,&#xD;&#xA;			proof_c: Vec&lt;u8&gt;,&#xD;&#xA;			vk_alpha1: Vec&lt;u8&gt;,&#xD;&#xA;			vk_beta_2: Vec&lt;u8&gt;,&#xD;&#xA;			vk_gamma_2: Vec&lt;u8&gt;,&#xD;&#xA;			vk_delta_2: Vec&lt;u8&gt;,&#xD;&#xA;			vk_ic: Vec&lt;Vec&lt;u8&gt;&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			let proof = ProofStr { pi_a: proof_a, pi_b: proof_b, pi_c: proof_c };&#xD;&#xA;            log::info!(&quot;{:?}&quot;, proof.pi_a);&#xD;&#xA;			let vkey = VkeyStr {&#xD;&#xA;				alpha_1: vk_alpha1, &#xD;&#xA;				beta_2: vk_beta_2,&#xD;&#xA;				gamma_2: vk_gamma_2,&#xD;&#xA;				delta_2: vk_delta_2,&#xD;&#xA;				ic: vk_ic,&#xD;&#xA;			};&#xD;&#xA;			&lt;Pof&lt;T&gt;&gt;::insert(who.clone(), &amp;proof);&#xD;&#xA;			&lt;Vkey&lt;T&gt;&gt;::insert(who.clone(),&amp;vkey);&#xD;&#xA;			Self::deposit_event(Event::&lt;T&gt;::ProofStored(proof, who.clone()));&#xD;&#xA;			Self::deposit_event(Event::&lt;T&gt;::VerificationKeyStore(vkey, who));&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can get the correct `Vec&lt;u8&gt;` in the front end, but not in the pallet.&#xD;&#xA;&#xD;&#xA;**In Polkadot js**:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**In the pallet——Maci-verifier**&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fzeBe.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/wtDf6.png&#xD;&#xA;&#xD;&#xA;In the pallet, when i print the `proof.pi_a`, it output the encoded data. However i want to get the vec data like in polkadot js instead of encoded.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22914" PostHistoryTypeId="2" PostId="5999" RevisionGUID="bebe9065-ef10-42ae-8011-164bc1f6e780" CreationDate="2022-11-20T16:50:15.130" UserId="251" Text="You could query the total issuance at different block heights/hash.&#xD;&#xA;&#xD;&#xA;Then compare the results.&#xD;&#xA;&#xD;&#xA;But this will ignore the burned tokens if you don't mind.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YkyU0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="22916" PostHistoryTypeId="2" PostId="6000" RevisionGUID="be89e23a-3bef-480d-97d5-b467b219b6cf" CreationDate="2022-11-20T17:59:29.057" UserId="299" Text="Is there any way to find out how many of the tokens from the new mint on Polkadot/Kusama have been given to treasury?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22918" PostHistoryTypeId="1" PostId="6000" RevisionGUID="be89e23a-3bef-480d-97d5-b467b219b6cf" CreationDate="2022-11-20T17:59:29.057" UserId="299" Text="About Polkadot's new mint token How much of it goes to the treasury?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22919" PostHistoryTypeId="3" PostId="6000" RevisionGUID="be89e23a-3bef-480d-97d5-b467b219b6cf" CreationDate="2022-11-20T17:59:29.057" UserId="299" Text="|treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22920" PostHistoryTypeId="2" PostId="6001" RevisionGUID="29ac4118-38e5-41ad-97b7-47ebaf5b2ac3" CreationDate="2022-11-20T18:17:05.970" UserId="139" Text="AFAIK the most common example cited for explaining this where the `requires`/`provides` tag is used to provide nonce information for the current transaction in order to be properly considered a valid tx. The `provides` tag for a tx with nonce `N` would be the `requires` for a tx with nonce `N+1`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22926" PostHistoryTypeId="2" PostId="6003" RevisionGUID="f264a132-b9d0-48f8-a14e-f03abc0319b2" CreationDate="2022-11-21T08:16:11.273" UserId="359" Text="I implemented the way using global variable to assert no reentrancy.&#xD;&#xA;&#xD;&#xA;https://github.com/open-web3-stack/open-runtime-module-library/pull/845&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl&lt;BlockNumber: Decode, PalletsOrigin: Decode&gt; Decode for DelayedOrigin&lt;BlockNumber, PalletsOrigin&gt; {&#xD;&#xA;	fn decode&lt;I: codec::Input&gt;(input: &amp;mut I) -&gt; Result&lt;Self, codec::Error&gt; {&#xD;&#xA;		if helper::nested_decode() {&#xD;&#xA;			return Err(&quot;Nested DelayedOrigin::decode is not allowed&quot;.into());&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		helper::set_nested_decode(true);&#xD;&#xA;		defer!(helper::set_nested_decode(false));&#xD;&#xA;&#xD;&#xA;		Ok(DelayedOrigin {&#xD;&#xA;			delay: Decode::decode(input)?,&#xD;&#xA;			origin: Decode::decode(input)?,&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;BlockNumber: MaxEncodedLen, PalletsOrigin: MaxEncodedLen&gt; MaxEncodedLen&#xD;&#xA;	for DelayedOrigin&lt;BlockNumber, PalletsOrigin&gt;&#xD;&#xA;{&#xD;&#xA;	fn max_encoded_len() -&gt; usize {&#xD;&#xA;		if helper::nested_max_encoded_len() {&#xD;&#xA;			return 0;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		helper::set_nested_max_encoded_len(true);&#xD;&#xA;		defer!(helper::set_nested_max_encoded_len(false));&#xD;&#xA;&#xD;&#xA;		BlockNumber::max_encoded_len() + PalletsOrigin::max_encoded_len()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This prevents user from submitting tx containing Orign with nested DealyedOrigin and make the `max_encoded_len` return 0 on the reentrancy call, which is fine because it shouldn't be possible to have nesting." ContentLicense="CC BY-SA 4.0" />
  <row Id="22928" PostHistoryTypeId="2" PostId="6004" RevisionGUID="080e2960-cda6-4aa2-a0d3-3383fefa84ed" CreationDate="2022-11-21T08:57:35.420" UserId="2762" Text="Check this website: https://www.dotreasury.com/dot/&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You can see the income of the treasury and you can go [here][2] and see more in detail and see where is coming from and when.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/seWie.png&#xD;&#xA;  [2]: https://www.dotreasury.com/dot/income" ContentLicense="CC BY-SA 4.0" />
  <row Id="22931" PostHistoryTypeId="2" PostId="6005" RevisionGUID="e1960a91-2918-4657-b780-ec6422d036db" CreationDate="2022-11-21T10:38:16.303" UserId="1950" Text="I'm in the process of configuring weights for a pallet &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct GymWeight&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;T: frame_system::Config&gt; WeightInfo for GymWeight&lt;T&gt; {&#xD;&#xA;&#xD;&#xA;	fn register_members() -&gt; Weight {&#xD;&#xA;		(51_977_000 as Weight)&#xD;&#xA;			.saturating_add(T::DbWeight::get().reads(2 as Weight))&#xD;&#xA;			.saturating_add(T::DbWeight::get().writes(2 as Weight))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But Im ended up in the following error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0605]: non-primitive cast: `{integer}` as `Weight`&#xD;&#xA;   --&gt; gym/src/weights.rs:105:3&#xD;&#xA;    |&#xD;&#xA;105 |         (51_977_000 as Weight)&#xD;&#xA;    |         ^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object&#xD;&#xA;&#xD;&#xA;error[E0605]: non-primitive cast: `{integer}` as `Weight`&#xD;&#xA;   --&gt; gym/src/weights.rs:106:45&#xD;&#xA;    |&#xD;&#xA;106 |             .saturating_add(T::DbWeight::get().reads(2 as Weight))&#xD;&#xA;    |                                                      ^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Imports as follows&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(rustfmt, rustfmt_skip)]&#xD;&#xA;#![allow(unused_parens)]&#xD;&#xA;#![allow(unused_imports)]&#xD;&#xA;&#xD;&#xA;use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};&#xD;&#xA;use sp_std::marker::PhantomData;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22933" PostHistoryTypeId="1" PostId="6005" RevisionGUID="e1960a91-2918-4657-b780-ec6422d036db" CreationDate="2022-11-21T10:38:16.303" UserId="1950" Text="Error when Adding weight related configurations" ContentLicense="CC BY-SA 4.0" />
  <row Id="22934" PostHistoryTypeId="3" PostId="6005" RevisionGUID="e1960a91-2918-4657-b780-ec6422d036db" CreationDate="2022-11-21T10:38:16.303" UserId="1950" Text="|pallet|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22935" PostHistoryTypeId="2" PostId="6006" RevisionGUID="b157f4c6-0e0a-4ffb-807a-9fe8580f41b1" CreationDate="2022-11-21T11:13:55.957" UserId="309" Text="First of all I am working on Polkadot-v0.9.29.&#xD;&#xA;I am struggling to understand the right way to format a pallet call before submitting it as a proposal to the democracy pallet.&#xD;&#xA;Let's the pallet call be the famous:&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;    		pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResult {&#xD;&#xA;    &#xD;&#xA;    			let who = ensure_signed(origin)?;&#xD;&#xA;    			// Update storage.&#xD;&#xA;    			&lt;Something&lt;T&gt;&gt;::put(something);&#xD;&#xA;    			// Emit an event.&#xD;&#xA;    			Self::deposit_event(Event::SomethingStored { something, who });&#xD;&#xA;    			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;consider the following code:&#xD;&#xA;&#xD;&#xA;I prepared a function that formats the call as follows:&#xD;&#xA;&#xD;&#xA;    pub fn create_proposal_hash_and_note(caller: T::AccountId,call:&lt;T as Config&gt;::Call) -&gt; T::Hash {&#xD;&#xA;            let origin = RawOrigin::Signed(caller);&#xD;&#xA;            let call_wrap = Box::new(call);&#xD;&#xA;            let proposal_hash = T::Hashing::hash_of(&amp;call_wrap);&#xD;&#xA;            let proposal_encoded: Vec&lt;u8&gt; = call_wrap.encode();&#xD;&#xA;            match Dem::Pallet::&lt;T&gt;::note_preimage(origin.into(), proposal_encoded){&#xD;&#xA;                Ok(_) =&gt; (),&#xD;&#xA;                Err(x) if x == Error::&lt;T&gt;::DuplicatePreimage.into() =&gt; (),&#xD;&#xA;                Err(x) =&gt; panic!(&quot;{:?}&quot;, x),&#xD;&#xA;            }&#xD;&#xA;            proposal_hash&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Then I create the formated call, submit the proposal and start a referendum:&#xD;&#xA;&#xD;&#xA;    let call = Call::&lt;T&gt;::do_something{&#xD;&#xA;    				something:32&#xD;&#xA;    			};&#xD;&#xA;    //Create and add the proposal&#xD;&#xA;    let prop_hash = Self::create_proposal_hash_and_note(virtual_account.clone(),rep_call.into());&#xD;&#xA;    Dem::Pallet::&lt;T&gt;::propose(origin_v.into(),prop_hash,deposit.into()).ok();&#xD;&#xA;    ....&#xD;&#xA;&#xD;&#xA;I Already checked through testing, that:&#xD;&#xA;- the referendum is correctly started&#xD;&#xA;- the proposal hash is registered&#xD;&#xA;- after voting, the referendum completes normally&#xD;&#xA;only problem is the proposal is not enacted.&#xD;&#xA;I think it's because the proposal is not correctly formated, but I really don't know Where/why.&#xD;&#xA;If you want to see the full code:&#xD;&#xA;&#xD;&#xA;[Asset_management_pallet][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Fair-Squares/fair-squares/tree/126-implement-asset-distributor-pallet-fungible-%2B-config-shares-that-get-minted/pallets/asset_management/src" ContentLicense="CC BY-SA 4.0" />
  <row Id="22937" PostHistoryTypeId="1" PostId="6006" RevisionGUID="b157f4c6-0e0a-4ffb-807a-9fe8580f41b1" CreationDate="2022-11-21T11:13:55.957" UserId="309" Text="Democracy proposal not enacted" ContentLicense="CC BY-SA 4.0" />
  <row Id="22938" PostHistoryTypeId="3" PostId="6006" RevisionGUID="b157f4c6-0e0a-4ffb-807a-9fe8580f41b1" CreationDate="2022-11-21T11:13:55.957" UserId="309" Text="|pallet|hash|call|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22939" PostHistoryTypeId="2" PostId="6007" RevisionGUID="94756a35-0052-4794-b691-f5f433d6f065" CreationDate="2022-11-21T11:24:26.847" UserId="3459" Text="I uninstalled Ubuntu and wls and reinstalled it from the Microsoft store and somehow it now works. So if anyone is experiencing a similar problem I would suggest doing the same. &#xD;&#xA;Thank you @AurevoirXavier and @DanShields for your help." ContentLicense="CC BY-SA 4.0" />
  <row Id="22945" PostHistoryTypeId="5" PostId="6006" RevisionGUID="5b4cb504-e9e4-44a5-9d1e-1aba26219ca9" CreationDate="2022-11-21T12:06:51.780" UserId="309" Comment="added 17 characters in body" Text="First of all I am working on Polkadot-v0.9.29.&#xD;&#xA;I am struggling to understand the right way to format a pallet call before submitting it as a proposal to the democracy pallet.&#xD;&#xA;Let's the pallet call be the famous:&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;    		pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResult {&#xD;&#xA;    &#xD;&#xA;    			let who = ensure_signed(origin)?;&#xD;&#xA;    			// Update storage.&#xD;&#xA;    			&lt;Something&lt;T&gt;&gt;::put(something);&#xD;&#xA;    			// Emit an event.&#xD;&#xA;    			Self::deposit_event(Event::SomethingStored { something, who });&#xD;&#xA;    			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;consider the following code:&#xD;&#xA;&#xD;&#xA;I prepared a function that formats the call as follows:&#xD;&#xA;&#xD;&#xA;    pub fn create_proposal_hash_and_note(caller: T::AccountId,call:&lt;T as Config&gt;::Call) -&gt; T::Hash {&#xD;&#xA;            let origin = RawOrigin::Signed(caller);&#xD;&#xA;            let call_wrap = Box::new(call);&#xD;&#xA;            let proposal_hash = T::Hashing::hash_of(&amp;call_wrap);&#xD;&#xA;            let proposal_encoded: Vec&lt;u8&gt; = call_wrap.encode();&#xD;&#xA;            match Dem::Pallet::&lt;T&gt;::note_preimage(origin.into(), proposal_encoded){&#xD;&#xA;                Ok(_) =&gt; (),&#xD;&#xA;                Err(x) if x == Error::&lt;T&gt;::DuplicatePreimage.into() =&gt; (),&#xD;&#xA;                Err(x) =&gt; panic!(&quot;{:?}&quot;, x),&#xD;&#xA;            }&#xD;&#xA;            proposal_hash&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Then I create the formated call, submit the proposal and start a referendum:&#xD;&#xA;&#xD;&#xA;    let call = Call::&lt;T&gt;::do_something{&#xD;&#xA;    				something:32&#xD;&#xA;    			};&#xD;&#xA;    //Create and add the proposal&#xD;&#xA;    let prop_hash = Self::create_proposal_hash_and_note(virtual_account.clone(),rep_call.into());&#xD;&#xA;    Dem::Pallet::&lt;T&gt;::propose(origin_v.into(),prop_hash,deposit.into()).ok();&#xD;&#xA;    ....&#xD;&#xA;&#xD;&#xA;I Already checked through testing, that:&#xD;&#xA;- the referendum is correctly started&#xD;&#xA;- the proposal hash is registered&#xD;&#xA;- after voting, the referendum completes normally&#xD;&#xA;only problem is the proposal is not enacted.&#xD;&#xA;I think it's because the proposal is not correctly formated, but I really don't know Where/why.&#xD;&#xA;If you want to see the full code:&#xD;&#xA;&#xD;&#xA;[Asset_management_pallet][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Fair-Squares/fair-squares/tree/126-implement-asset-distributor-pallet-fungible-%2B-config-shares-that-get-minted/pallets/asset_management/src&#xD;&#xA;&#xD;&#xA;Help, please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22946" PostHistoryTypeId="2" PostId="6009" RevisionGUID="87d0682b-4b5d-4fe2-a16b-da1113b4b31d" CreationDate="2022-11-21T12:14:12.487" UserId="1959" Text="What version of substrate are you using? If it is 0.9.30+, it may be caused by weight v1.5. The type of `Weight` has be changed. Please refer to this PR https://github.com/paritytech/substrate/pull/12138.&#xD;&#xA;&#xD;&#xA;You shoud use weight like this:&#xD;&#xA;```&#xD;&#xA;		Weight::from_ref_time(52_281_000 as u64)&#xD;&#xA;			.saturating_add(T::DbWeight::get().reads(4 as u64))&#xD;&#xA;			.saturating_add(T::DbWeight::get().writes(4 as u64))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22948" PostHistoryTypeId="2" PostId="6010" RevisionGUID="c14284bc-e836-4b01-8c4e-2fc429c75a9e" CreationDate="2022-11-21T12:43:24.350" UserId="298" Text="I'm using [srtool][1] on this [repo][2] with these command steps:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;export RUSTC_VERSION=1.64.0; export PACKAGE=kabocha-runtime; alias srtool='docker run --rm -it -e PACKAGE=$PACKAGE -v $PWD:/build -v $TMPDIR/cargo:/cargo-home paritytech/srtool:$RUSTC_VERSION'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;srtool build --package kabocha-runtime&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;output:&#xD;&#xA;```&#xD;&#xA;root@ubuntu-s-kabocha-01-1627404188468-s-2vcpu-4gb-intel-lon1-01:~/kabocha-parachain# srtool build -r ./runtime/kabocha-runtime --package kabocha-runtime&#xD;&#xA;Found 1.64.0, we will be using paritytech/srtool:1.64.0 for the build&#xD;&#xA; Substrate Runtime Toolbox - srtool v0.9.23 &#xD;&#xA;              - by Chevdor -&#xD;&#xA;info: using existing install for '1.64.0-x86_64-unknown-linux-gnu'&#xD;&#xA;info: override toolchain for '/build' set to '1.64.0-x86_64-unknown-linux-gnu'&#xD;&#xA;&#xD;&#xA;  1.64.0-x86_64-unknown-linux-gnu unchanged - rustc 1.64.0 (a55dd71d5 2022-09-19)&#xD;&#xA;&#xD;&#xA;  Building kabocha as release using rustc 1.64.0 (a55dd71d5 2022-09-19)&#xD;&#xA;⏳ That can take a little while, be patient... subsequent builds will be faster.&#xD;&#xA;   Since you have to wait a little, you may want to learn more about Substrate runtimes:&#xD;&#xA;   https://docs.substrate.io/v3/getting-started/architecture/&#xD;&#xA;Error: Os { code: 2, kind: NotFound, message: &quot;No such file or directory&quot; }&#xD;&#xA;Error: Os { code: 2, kind: NotFound, message: &quot;No such file or directory&quot; }&#xD;&#xA;!!! The PACKAGE 'kabocha' does not match the crate name at 'runtime/kabocha'. Did you mean ''?&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;relevant error snippet:&#xD;&#xA;```&#xD;&#xA;Error: Os { code: 2, kind: NotFound, message: &quot;No such file or directory&quot; }&#xD;&#xA;!!! The PACKAGE 'kabocha' does not match the crate name at 'runtime/kabocha'. Did you mean ''?&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Probably missing something obvious but could you show me how to access the correct directory?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/srtool&#xD;&#xA;  [2]: https://github.com/kabocha-network/parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="22950" PostHistoryTypeId="1" PostId="6010" RevisionGUID="c14284bc-e836-4b01-8c4e-2fc429c75a9e" CreationDate="2022-11-21T12:43:24.350" UserId="298" Text="How to find the runtime using srtool" ContentLicense="CC BY-SA 4.0" />
  <row Id="22951" PostHistoryTypeId="3" PostId="6010" RevisionGUID="c14284bc-e836-4b01-8c4e-2fc429c75a9e" CreationDate="2022-11-21T12:43:24.350" UserId="298" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22956" PostHistoryTypeId="5" PostId="4693" RevisionGUID="01acb1ab-ad2f-417d-ac5f-c08e09d12d8e" CreationDate="2022-11-21T12:50:11.390" UserId="29" Comment="edited body" Text="You'll need to download the Zombienet executable.&#xD;&#xA;&#xD;&#xA;You can find linux and macOS executables of the Zombienet CLI here:&#xD;&#xA;- https://github.com/paritytech/zombienet/releases&#xD;&#xA;&#xD;&#xA;Download the Zombienet CLI according to your operating system.&#xD;&#xA;&#xD;&#xA;&gt; Tip: If you want the executable to be available system-wide then you can follow these steps (otherwise just download the executable to your working directory):&#xD;&#xA;&gt; &#xD;&#xA;&gt; ```&#xD;&#xA;&gt; wget https://github.com/paritytech/zombienet/releases/download/v1.3.18/zombienet-macos&#xD;&#xA;&gt; chmod +x zombienet-macos &#xD;&#xA;&gt; cp zombienet-macos /usr/local/bin&#xD;&#xA;&gt; ```&#xD;&#xA;&#xD;&#xA;Make sure Zombienet CLI is installed correctly:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos --help&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some similar output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Usage: zombienet [options] [command]&#xD;&#xA;&#xD;&#xA;Options:&#xD;&#xA;  -c, --spawn-concurrency &lt;concurrency&gt;  Number of concurrent spawning process to launch, default is 1&#xD;&#xA;  -p, --provider &lt;provider&gt;              Override provider to use (choices: &quot;podman&quot;, &quot;kubernetes&quot;, &quot;native&quot;)&#xD;&#xA;  -m, --monitor                          Start as monitor, do not auto cleanup network&#xD;&#xA;  -h, --help                             display help for command&#xD;&#xA;&#xD;&#xA;Commands:&#xD;&#xA;  spawn &lt;networkConfig&gt; [creds]          Spawn the network defined in the config&#xD;&#xA;  test &lt;testFile&gt; [runningNetworkSpec]   Run tests on the network defined&#xD;&#xA;  setup &lt;binaries...&gt;                    Setup is meant for downloading and making dev environment of Zombienet ready&#xD;&#xA;  version                                Prints zombienet version&#xD;&#xA;  help [command]                         display help for command&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Setting up your config&#xD;&#xA;&#xD;&#xA;Zombienet works with a config. The config is where you specify your test network's configuration. The config is also where you can specify the polkadot/cumulus binaries.&#xD;&#xA;&#xD;&#xA;Create a config file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;touch config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in this example config we are specifying that we want a Rococo relay chain with four validators and two parachains - each with one collator. Make sure you have the compiled binaries available.&#xD;&#xA;&#xD;&#xA;&gt; Zombienet also works with other providers such as Kubernetes and Podman.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot-v0.9.32&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;dave&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1000-collator&quot;&#xD;&#xA;  command = &quot;./bin/parachain-template-node-v0.9.32-1000&quot;&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1001&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1001-collator&quot;&#xD;&#xA;  command = &quot;../bin/parachain-template-node-v0.9.32-1001&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Save the file and run the Zombienet CLI using this config:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos spawn config.toml -p native&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some nicely formatted output stating that the nodes are up and ready.&#xD;&#xA;&#xD;&#xA;You can now interact with your nodes in [polkadotJS apps](https://polkadot.js.org/apps)!" ContentLicense="CC BY-SA 4.0" />
  <row Id="22958" PostHistoryTypeId="2" PostId="6012" RevisionGUID="25673930-00da-4224-83dc-78f160eb4054" CreationDate="2022-11-21T13:04:03.133" UserId="198" Text="By default, the `srtool-cli` expects the runtimes to be organised as it is done in the polkadot repo. This is hystorical and often does not match, this is why the `srtool-cli` lets you tell where the runtime is located.&#xD;&#xA;&#xD;&#xA;Since you did not provide the information, as the error mentions, the `srtool-cli` expects your runtime to be at `runtime/kabocha` and that path does not exist.&#xD;&#xA;&#xD;&#xA;To fix your issue, check out the output of the `srtool build --help` command. You will find the following flag:&#xD;&#xA;```&#xD;&#xA; -r, --runtime-dir &lt;RUNTIME_DIR&gt;&#xD;&#xA;            If your runtime is not in the standard location runtime/&lt;chain_name&gt; you can pass this&#xD;&#xA;            args to help srtool find it [env: RUNTIME_DIR=]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You now have a way to tell `srtool` where to find the runtime and in your case that is:&#xD;&#xA;```&#xD;&#xA;srtool build --package kabocha-runtime --runtime-dir runtime&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22960" PostHistoryTypeId="2" PostId="6013" RevisionGUID="8a9962dd-8e38-4792-a39f-fe4984ad2700" CreationDate="2022-11-21T13:15:59.913" UserId="179" Text="For example, paraID 2000. The slot pallet is holding in reserve only the amount of balance that is reserved, however the total crowlodan account (which should hold the amount of tokens raised on the crowdloan) holds also some free balance.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  {&#xD;&#xA;    paraID: 2000,&#xD;&#xA;    account: '13UVJyLnbVp77Z2t6qZV4fNpRjDHppL6c87bHcZKG48tKJad',&#xD;&#xA;    'slots.leases': 29945909,&#xD;&#xA;    'balance.reserved': 29945909,&#xD;&#xA;    'balance.free': 2570072,&#xD;&#xA;    'balance.free (as %)': 7.9&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've noticed too that the free balance of this crowdloan account is never the same percentage of the total balance, and that not all crowdloan accounts have free balance (for example, moonbeam has everything reserved).&#xD;&#xA;&#xD;&#xA;Note that this is related to the crowdloan account, and not the sovereign account of the parachain on the relay chain. Context on these [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/109/how-do-parachain-crowdloan-accounts-work" ContentLicense="CC BY-SA 4.0" />
  <row Id="22962" PostHistoryTypeId="1" PostId="6013" RevisionGUID="8a9962dd-8e38-4792-a39f-fe4984ad2700" CreationDate="2022-11-21T13:15:59.913" UserId="179" Text="Why do some crowdloan accounts have free balance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22963" PostHistoryTypeId="3" PostId="6013" RevisionGUID="8a9962dd-8e38-4792-a39f-fe4984ad2700" CreationDate="2022-11-21T13:15:59.913" UserId="179" Text="|parachain|account|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22964" PostHistoryTypeId="2" PostId="6014" RevisionGUID="1abd6997-9148-48c5-8d04-02e861e8ef45" CreationDate="2022-11-21T13:20:21.210" UserId="179" Text="Polkadot has an [candle auction mechanism][1] to assign parachain slots to different parachain projects. This mechanism always lasts a fixed amount of blocks, and when it ends, the VRF runs and randomly selects the block at which exactly the candle went off. At that block height, is where the winner is decided.&#xD;&#xA;&#xD;&#xA;With this in mind, all the contributions _before_ the &quot;candle went off&quot; to the crowdloan will be reserved, however all the tokens that were contributed _after_ the &quot;candle went off&quot; will be free balance on the crowdloan account. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-auction" ContentLicense="CC BY-SA 4.0" />
  <row Id="22966" PostHistoryTypeId="5" PostId="6006" RevisionGUID="04bfd775-cc84-4f0d-97e1-b8a273f9c0fd" CreationDate="2022-11-21T14:01:24.213" UserId="309" Comment="added 775 characters in body" Text="First of all I am working on Polkadot-v0.9.29.&#xD;&#xA;I am struggling to understand the right way to format a pallet call before submitting it as a proposal to the democracy pallet.&#xD;&#xA;Let's the pallet call be the famous:&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;    		pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResult {&#xD;&#xA;    &#xD;&#xA;    			let who = ensure_signed(origin)?;&#xD;&#xA;    			// Update storage.&#xD;&#xA;    			&lt;Something&lt;T&gt;&gt;::put(something);&#xD;&#xA;    			// Emit an event.&#xD;&#xA;    			Self::deposit_event(Event::SomethingStored { something, who });&#xD;&#xA;    			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;consider the following code:&#xD;&#xA;&#xD;&#xA;I prepared a function that formats the call as follows:&#xD;&#xA;&#xD;&#xA;    pub fn create_proposal_hash_and_note(caller: T::AccountId,call:&lt;T as Config&gt;::Call) -&gt; T::Hash {&#xD;&#xA;            let origin = RawOrigin::Signed(caller);&#xD;&#xA;            let call_wrap = Box::new(call);&#xD;&#xA;            let proposal_hash = T::Hashing::hash_of(&amp;call_wrap);&#xD;&#xA;            let proposal_encoded: Vec&lt;u8&gt; = call_wrap.encode();&#xD;&#xA;            match Dem::Pallet::&lt;T&gt;::note_preimage(origin.into(), proposal_encoded){&#xD;&#xA;                Ok(_) =&gt; (),&#xD;&#xA;                Err(x) if x == Error::&lt;T&gt;::DuplicatePreimage.into() =&gt; (),&#xD;&#xA;                Err(x) =&gt; panic!(&quot;{:?}&quot;, x),&#xD;&#xA;            }&#xD;&#xA;            proposal_hash&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Then I create the formated call, submit the proposal and start a referendum:&#xD;&#xA;&#xD;&#xA;    let call = Call::&lt;T&gt;::do_something{&#xD;&#xA;    				something:32&#xD;&#xA;    			};&#xD;&#xA;    //Create and add the proposal&#xD;&#xA;    let prop_hash = Self::create_proposal_hash_and_note(virtual_account.clone(),rep_call.into());&#xD;&#xA;    Dem::Pallet::&lt;T&gt;::propose(origin_v.into(),prop_hash,deposit.into()).ok();&#xD;&#xA;    ....&#xD;&#xA;&#xD;&#xA;I Already checked through testing, that:&#xD;&#xA;- the referendum is correctly started&#xD;&#xA;- the proposal hash is registered&#xD;&#xA;- after voting, the referendum completes normally&#xD;&#xA;only problem is the proposal is not enacted.&#xD;&#xA;I think it's because the proposal is not correctly formated, but I really don't know Where/why.&#xD;&#xA;If you want to see the full code:&#xD;&#xA;&#xD;&#xA;[Asset_management_pallet][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Fair-Squares/fair-squares/tree/126-implement-asset-distributor-pallet-fungible-%2B-config-shares-that-get-minted/pallets/asset_management/src&#xD;&#xA;&#xD;&#xA;Help, please?&#xD;&#xA;&#xD;&#xA;### EDIT 1&#xD;&#xA;Code sample of the test I'm using with the **Real pallet call**:&#xD;&#xA;&#xD;&#xA;    let b = match ref_infos{&#xD;&#xA;    			pallet_democracy::ReferendumInfo::Finished{approved,end:_} =&gt; approved,&#xD;&#xA;    			_=&gt; false,&#xD;&#xA;    		} ;&#xD;&#xA;    &#xD;&#xA;    		println!(&quot;\n\nReferendum status after vote is: {:?}\n present block is: {:?}\n\n&quot;,&amp;ref_infos,System::block_number());&#xD;&#xA;    		println!(&quot;\n\nvote result is:{:?}&quot;,b);&#xD;&#xA;    		let prop0 = AssetManagement::proposals(0).unwrap().vote_result;&#xD;&#xA;    		println!(&quot;\n\nVote results:{:?}\n\n&quot;,prop0);&#xD;&#xA;    &#xD;&#xA;    		//Proposal enactement should happen 2 blocks later &#xD;&#xA;    		fast_forward_to(end_block_number&#xD;&#xA;    			.saturating_add(&lt;Test as crate::Config&gt;::Delay::get()));			&#xD;&#xA;    assert_eq!(Roles::RepresentativeLog::&lt;Test&gt;::contains_key(FERDIE), true);	" ContentLicense="CC BY-SA 4.0" />
  <row Id="22967" PostHistoryTypeId="5" PostId="6006" RevisionGUID="05b81ee4-da20-41c9-a2f4-8784abb683b8" CreationDate="2022-11-21T14:09:42.530" UserId="309" Comment="added 83 characters in body" Text="First of all I am working on Polkadot-v0.9.29.&#xD;&#xA;I am struggling to understand the right way to format a pallet call before submitting it as a proposal to the democracy pallet.&#xD;&#xA;Let's the pallet call be the famous:&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;    		pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResult {&#xD;&#xA;    &#xD;&#xA;    			let who = ensure_signed(origin)?;&#xD;&#xA;    			// Update storage.&#xD;&#xA;    			&lt;Something&lt;T&gt;&gt;::put(something);&#xD;&#xA;    			// Emit an event.&#xD;&#xA;    			Self::deposit_event(Event::SomethingStored { something, who });&#xD;&#xA;    			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;consider the following code:&#xD;&#xA;&#xD;&#xA;I prepared a function that formats the call as follows:&#xD;&#xA;&#xD;&#xA;    pub fn create_proposal_hash_and_note(caller: T::AccountId,call:&lt;T as Config&gt;::Call) -&gt; T::Hash {&#xD;&#xA;            let origin = RawOrigin::Signed(caller);&#xD;&#xA;            let call_wrap = Box::new(call);&#xD;&#xA;            let proposal_hash = T::Hashing::hash_of(&amp;call_wrap);&#xD;&#xA;            let proposal_encoded: Vec&lt;u8&gt; = call_wrap.encode();&#xD;&#xA;            match Dem::Pallet::&lt;T&gt;::note_preimage(origin.into(), proposal_encoded){&#xD;&#xA;                Ok(_) =&gt; (),&#xD;&#xA;                Err(x) if x == Error::&lt;T&gt;::DuplicatePreimage.into() =&gt; (),&#xD;&#xA;                Err(x) =&gt; panic!(&quot;{:?}&quot;, x),&#xD;&#xA;            }&#xD;&#xA;            proposal_hash&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Then I create the formated call, submit the proposal and start a referendum:&#xD;&#xA;&#xD;&#xA;    let call = Call::&lt;T&gt;::do_something{&#xD;&#xA;    				something:32&#xD;&#xA;    			};&#xD;&#xA;    //Create and add the proposal&#xD;&#xA;    let prop_hash = Self::create_proposal_hash_and_note(virtual_account.clone(),rep_call.into());&#xD;&#xA;    Dem::Pallet::&lt;T&gt;::propose(origin_v.into(),prop_hash,deposit.into()).ok();&#xD;&#xA;    ....&#xD;&#xA;&#xD;&#xA;I Already checked through testing, that:&#xD;&#xA;- the referendum is correctly started&#xD;&#xA;- the proposal hash is registered&#xD;&#xA;- after voting, the referendum completes normally&#xD;&#xA;only problem is the proposal is not enacted.&#xD;&#xA;I think it's because the proposal is not correctly formated, but I really don't know Where/why.&#xD;&#xA;If you want to see the full code:&#xD;&#xA;&#xD;&#xA;[Asset_management_pallet][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Fair-Squares/fair-squares/tree/126-implement-asset-distributor-pallet-fungible-%2B-config-shares-that-get-minted/pallets/asset_management/src&#xD;&#xA;&#xD;&#xA;Help, please?&#xD;&#xA;&#xD;&#xA;### EDIT 1&#xD;&#xA;Code sample of the test I'm using with the **Real pallet call**:&#xD;&#xA;&#xD;&#xA;    let b = match ref_infos{&#xD;&#xA;    			pallet_democracy::ReferendumInfo::Finished{approved,end:_} =&gt; approved,&#xD;&#xA;    			_=&gt; false,&#xD;&#xA;    		} ;&#xD;&#xA;    &#xD;&#xA;    		println!(&quot;\n\nReferendum status after vote is: {:?}\n present block is: {:?}\n\n&quot;,&amp;ref_infos,System::block_number());&#xD;&#xA;    		println!(&quot;\n\nvote result is:{:?}&quot;,b);&#xD;&#xA;    		let prop0 = AssetManagement::proposals(0).unwrap().vote_result;&#xD;&#xA;    		println!(&quot;\n\nVote results:{:?}\n\n&quot;,prop0);&#xD;&#xA;    &#xD;&#xA;    		//Proposal enactement should happen 2 blocks later &#xD;&#xA;    		fast_forward_to(end_block_number&#xD;&#xA;    			.saturating_add(&lt;Test as crate::Config&gt;::Delay::get()));&#xD;&#xA;&#xD;&#xA;    //The code line below fails as the pallet call is not executed as it should			&#xD;&#xA;    assert_eq!(Roles::RepresentativeLog::&lt;Test&gt;::contains_key(FERDIE), true);	" ContentLicense="CC BY-SA 4.0" />
  <row Id="22968" PostHistoryTypeId="5" PostId="6014" RevisionGUID="ddbb4d45-291c-46de-af0e-3ad83288ff1c" CreationDate="2022-11-21T15:16:46.937" UserId="179" Comment="deleted 1 character in body" Text="Polkadot has a [candle auction mechanism][1] to assign parachain slots to different parachain projects. This mechanism always lasts a fixed amount of blocks, and when it ends, the VRF runs and randomly selects the block at which exactly the candle went off. At that block height, is where the winner is decided.&#xD;&#xA;&#xD;&#xA;With this in mind, all the contributions _before_ the &quot;candle went off&quot; to the crowdloan will be reserved, however all the tokens that were contributed _after_ the &quot;candle went off&quot; will be free balance on the crowdloan account. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-auction" ContentLicense="CC BY-SA 4.0" />
  <row Id="22973" PostHistoryTypeId="2" PostId="6016" RevisionGUID="3e7ab2f6-85be-4103-85ee-3c1966e83bd6" CreationDate="2022-11-21T16:15:14.127" UserId="2897" Text="In https://github.com/polkadot-js/api/releases/tag/v9.8.2 api.rpc.payment.queryInfo is marked as deprecated but how can you build a transaction through polkadotjs without using it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22975" PostHistoryTypeId="1" PostId="6016" RevisionGUID="3e7ab2f6-85be-4103-85ee-3c1966e83bd6" CreationDate="2022-11-21T16:15:14.127" UserId="2897" Text="how to replace api.rpc.payment.queryInfo in polkadotjs now that it is deprecated?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22976" PostHistoryTypeId="3" PostId="6016" RevisionGUID="3e7ab2f6-85be-4103-85ee-3c1966e83bd6" CreationDate="2022-11-21T16:15:14.127" UserId="2897" Text="|polkadot-js|transactions|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22977" PostHistoryTypeId="2" PostId="6017" RevisionGUID="594e8c26-de41-4cf6-95d3-561aeb7abd69" CreationDate="2022-11-21T16:34:15.940" UserId="2025" Text="Now you have to use `state_call` with the following arguments: `[&quot;TransactionPaymentApi_query_info&quot;, &lt;Encoded extrinsic here&gt;]`.&#xD;&#xA;&#xD;&#xA;This was responded in the post (both question and answer) with more detail:&#xD;&#xA;&#xD;&#xA; - [Rpc payment_queryFeeInfo fails on Westend 9310](https://substrate.stackexchange.com/questions/5634/rpc-payment-queryfeeinfo-fails-on-westend-9310/5648#5648).&#xD;&#xA;&#xD;&#xA;For the new Polkadot.js API call, check the answer to this post:&#xD;&#xA;&#xD;&#xA;- [RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash) ... failed on weight: u64](https://substrate.stackexchange.com/questions/4835/rpc-core-queryinfoextrinsic-bytes-at-blockhash-failed-on-weight-u64)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22979" PostHistoryTypeId="5" PostId="6009" RevisionGUID="775c8b6f-ba9c-4a15-ae8e-1188fb894906" CreationDate="2022-11-21T16:40:37.510" UserId="251" Comment="added 21 characters in body" Text="What version of the Substrate you are using? If it is `polkadot-v0.9.30`+, it may be caused by weight v1.5. The type of `Weight` has been changed. Please refer to this PR https://github.com/paritytech/substrate/pull/12138.&#xD;&#xA;&#xD;&#xA;You should use the weight in this way:&#xD;&#xA;```rs&#xD;&#xA;Weight::from_ref_time(52_281_000 as u64)&#xD;&#xA;	.saturating_add(T::DbWeight::get().reads(4 as u64))&#xD;&#xA;	.saturating_add(T::DbWeight::get().writes(4 as u64))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22980" PostHistoryTypeId="2" PostId="6018" RevisionGUID="46f1f088-d9a0-4fa6-a5bc-2816b09f4b88" CreationDate="2022-11-21T16:43:42.637" UserId="698" Text="I'm trying to utilize the Polkadot.JS api to query chain parameters and issue transactions under collatorSelection an example of which is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const x = api.query.collatorSelection.candidates();&#xD;&#xA;console.log(x)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This works when using the built in playground in Polkadot.JS/apps but doesn't work via api.  I am using v9.9.1 of the API." ContentLicense="CC BY-SA 4.0" />
  <row Id="22982" PostHistoryTypeId="1" PostId="6018" RevisionGUID="46f1f088-d9a0-4fa6-a5bc-2816b09f4b88" CreationDate="2022-11-21T16:43:42.637" UserId="698" Text="Issuing extrinsics Polkadot.JS/api using collatorSelection" ContentLicense="CC BY-SA 4.0" />
  <row Id="22983" PostHistoryTypeId="3" PostId="6018" RevisionGUID="46f1f088-d9a0-4fa6-a5bc-2816b09f4b88" CreationDate="2022-11-21T16:43:42.637" UserId="698" Text="|polkadot-js|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22984" PostHistoryTypeId="2" PostId="6019" RevisionGUID="6f22fe50-156a-4fbd-80e9-de55c7ba1e52" CreationDate="2022-11-21T19:07:39.397" UserId="298" Text="```&#xD;&#xA;error: failed to create directory `/build/runtime/target`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Permission denied (os error 13)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I used this command: &#xD;&#xA;`srtool build --package kabocha-runtime -r ./runtime`&#xD;&#xA;&#xD;&#xA;I also tried to use absolute path but it cannot find the directory. " ContentLicense="CC BY-SA 4.0" />
  <row Id="22986" PostHistoryTypeId="1" PostId="6019" RevisionGUID="6f22fe50-156a-4fbd-80e9-de55c7ba1e52" CreationDate="2022-11-21T19:07:39.397" UserId="298" Text="srtool permission denied at end of build" ContentLicense="CC BY-SA 4.0" />
  <row Id="22987" PostHistoryTypeId="3" PostId="6019" RevisionGUID="6f22fe50-156a-4fbd-80e9-de55c7ba1e52" CreationDate="2022-11-21T19:07:39.397" UserId="298" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22988" PostHistoryTypeId="52" PostId="6010" RevisionGUID="ee50f64a-bdeb-49e5-a295-8b0a91bc6ee4" CreationDate="2022-11-21T20:45:47.663" />
  <row Id="22989" PostHistoryTypeId="2" PostId="6020" RevisionGUID="1759c630-eb60-4b42-ba3e-e7afe07c92e1" CreationDate="2022-11-21T20:57:26.030" UserId="3138" Text="Just in case you haven't resolved your last question asked after the above answer was accepted, Shawn's answer at https://substrate.stackexchange.com/questions/3241/error-in-currency-transfer/3242#3242 should explain what is going on with your `expected associated type` issue and how to fix it.&#xD;&#xA;&#xD;&#xA;I was unable to add this as a comment beneath your question unfortunately." ContentLicense="CC BY-SA 4.0" />
  <row Id="22991" PostHistoryTypeId="52" PostId="6013" RevisionGUID="60217a50-dfde-4f73-9b69-1c64de84258e" CreationDate="2022-11-21T21:16:28.297" />
  <row Id="22992" PostHistoryTypeId="2" PostId="6021" RevisionGUID="ee8be152-b136-4e52-84b4-f633d0c560a0" CreationDate="2022-11-21T22:31:39.217" UserId="3114" Text="- I am using ink! to implement the contract.&#xD;&#xA;- I have implemented my own error, and the contract function has this own error as a return value.&#xD;&#xA;- For example, suppose that function implements openbrush's Ownable.&#xD;&#xA;- I implemented openbrush's Error implementation as follows.&#xD;&#xA;- What would be the best way to implement it then?&#xD;&#xA;- Referenced source code:https://github.com/Supercolony-net/openbrush-contracts/blob/main/contracts/src/traits/errors/psp37.rs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum MyError {&#xD;&#xA;        MyError1,&#xD;&#xA;        OwnableErrorCallerIsNotOwner,&#xD;&#xA;        OwnableErrorNewOwnerIsZero,&#xD;&#xA;    }&#xD;&#xA;    impl From&lt;OwnableError&gt; for MyError {&#xD;&#xA;        fn from(ownable: OwnableError) -&gt; Self {&#xD;&#xA;            match ownable {&#xD;&#xA;                OwnableError::CallerIsNotOwner =&gt; MyError::OwnableErrorCallerIsNotOwner,&#xD;&#xA;                OwnableError::NewOwnerIsZero =&gt; MyError::OwnableErrorNewOwnerIsZero,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="22994" PostHistoryTypeId="1" PostId="6021" RevisionGUID="ee8be152-b136-4e52-84b4-f633d0c560a0" CreationDate="2022-11-21T22:31:39.217" UserId="3114" Text="Best practices for handling my own errors and openbrush's errors?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22995" PostHistoryTypeId="3" PostId="6021" RevisionGUID="ee8be152-b136-4e52-84b4-f633d0c560a0" CreationDate="2022-11-21T22:31:39.217" UserId="3114" Text="|ink|astar|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="22996" PostHistoryTypeId="2" PostId="6022" RevisionGUID="057d33a9-b638-4e8a-a0f8-8f57e46543a7" CreationDate="2022-11-22T00:50:08.250" UserId="590" Text="I am trying to understand why there is no complexity parameter on transfer benchmarks.&#xD;&#xA;&#xD;&#xA;The substrate [benchmarks documentation](https://docs.substrate.io/test/benchmark/) states:&#xD;&#xA;&#xD;&#xA;&gt; For benchmarks, you want to execute the most computationally intensive path.&#xD;&#xA;&#xD;&#xA;I noticed benchmarks for [balances transfer](https://github.com/paritytech/substrate/blob/master/frame/balances/src/benchmarking.rs#L38) not have a complexity parameter.&#xD;&#xA;&#xD;&#xA;In the benchmarks, I expected to see some seeding of accounts to get the most computationally intensive. I was surprised when I saw no account seeding or complexity parameters being used.&#xD;&#xA;&#xD;&#xA;Can you explain why a complexity parameter or accounts seeding is unnecessary for benchmarking transfers?&#xD;&#xA;&#xD;&#xA;I have a similar extrinsic that is associated with a storage map that is unbounded.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="22998" PostHistoryTypeId="1" PostId="6022" RevisionGUID="057d33a9-b638-4e8a-a0f8-8f57e46543a7" CreationDate="2022-11-22T00:50:08.250" UserId="590" Text="why are complexity parameter or accounts seeding unnecessary for benchmarking transfers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="22999" PostHistoryTypeId="3" PostId="6022" RevisionGUID="057d33a9-b638-4e8a-a0f8-8f57e46543a7" CreationDate="2022-11-22T00:50:08.250" UserId="590" Text="|extrinsic|benchmarking|benchmark|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23000" PostHistoryTypeId="5" PostId="6022" RevisionGUID="8e14504a-7fc9-4648-8b05-ec1dc0663a52" CreationDate="2022-11-22T01:00:23.943" UserId="590" Comment="added 38 characters in body" Text="I am trying to understand why there is no complexity parameter on transfer benchmarks.&#xD;&#xA;&#xD;&#xA;The substrate [benchmarks documentation](https://docs.substrate.io/test/benchmark/) states:&#xD;&#xA;&#xD;&#xA;&gt; For benchmarks, you want to execute the most computationally intensive path.&#xD;&#xA;&#xD;&#xA;I noticed benchmarks for [balances transfer](https://github.com/paritytech/substrate/blob/master/frame/balances/src/benchmarking.rs#L38) not have a complexity parameter.&#xD;&#xA;&#xD;&#xA;In the benchmarks, I expected to see some seeding of accounts to get the most computationally intensive. I was surprised when I saw no account seeding or complexity parameters being used.&#xD;&#xA;&#xD;&#xA;Can you explain why a complexity parameter or accounts seeding is unnecessary for benchmarking transfers?&#xD;&#xA;&#xD;&#xA;I have a similar extrinsic that is associated with a storage map that is unbounded. I am trying to understand how to properly benchmark something like this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23001" PostHistoryTypeId="2" PostId="6023" RevisionGUID="4aab7e5a-a039-445b-ae46-7e8c4c014ab0" CreationDate="2022-11-22T01:09:07.937" UserId="28" Text="The logic associated with a balance transfer is constant complexity.&#xD;&#xA;&#xD;&#xA;As the number of users in your system grows, there will be an increase in complexity due to the size of the merkle trie, but this is accounted for with database benchmarking, which is explicitly separate from the extrinsic benchmarking.&#xD;&#xA;&#xD;&#xA;You can learn more about storage benchmarks here: https://github.com/paritytech/substrate/blob/master/utils/frame/benchmarking-cli/src/storage/README.md&#xD;&#xA;&#xD;&#xA;&gt; I have a similar extrinsic that is associated with a storage map that is unbounded. I am trying to understand how to properly benchmark something like this.&#xD;&#xA;&#xD;&#xA;You should make sure your database benchmarking uses the storage map with the largest expected size." ContentLicense="CC BY-SA 4.0" />
  <row Id="23005" PostHistoryTypeId="2" PostId="6024" RevisionGUID="50f5416a-6b1a-4997-ab13-b4622d1f548d" CreationDate="2022-11-22T05:22:37.850" UserId="3467" Text="Does the contract limit size information shown in the link below holds true for Frontier EVM also?&#xD;&#xA;https://ethereum.org/en/developers/docs/smart-contracts/#limitations&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23007" PostHistoryTypeId="1" PostId="6024" RevisionGUID="50f5416a-6b1a-4997-ab13-b4622d1f548d" CreationDate="2022-11-22T05:22:37.850" UserId="3467" Text="What is the maximum contract size limit for frontier EMV smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23008" PostHistoryTypeId="3" PostId="6024" RevisionGUID="50f5416a-6b1a-4997-ab13-b4622d1f548d" CreationDate="2022-11-22T05:22:37.850" UserId="3467" Text="|frontier|evm|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23009" PostHistoryTypeId="10" PostId="5325" RevisionGUID="3ae86ecc-3c8d-4385-9030-b60d2e86cb4e" CreationDate="2022-11-22T06:09:05.023" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[5911],&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="23011" PostHistoryTypeId="10" PostId="1783" RevisionGUID="e1f466c9-2293-45ba-b996-81e29a546a9f" CreationDate="2022-11-22T06:10:14.797" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[5918],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="23012" PostHistoryTypeId="2" PostId="6025" RevisionGUID="6d5202e5-b793-42d8-982d-2e9db9dd60f4" CreationDate="2022-11-22T06:10:50.733" UserId="3460" Text="Compact encoding for arguments can be achieved via #[pallet::compact].&#xD;&#xA;The function must return a  DispatchResult. it is useful for getting the compact decode " ContentLicense="CC BY-SA 4.0" />
  <row Id="23014" PostHistoryTypeId="2" PostId="6026" RevisionGUID="90be681a-a403-40fb-9e34-47de2c761795" CreationDate="2022-11-22T06:14:30.690" UserId="3460" Text="[![enter image description here][1]][1]#![cfg_attr(not(feature = &quot;std&quot;), no_std)] in pallet code &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1yh9M.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23016" PostHistoryTypeId="1" PostId="6026" RevisionGUID="90be681a-a403-40fb-9e34-47de2c761795" CreationDate="2022-11-22T06:14:30.690" UserId="3460" Text="what does this line means #![cfg_attr(not(feature = &quot;std&quot;), no_std)]?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23017" PostHistoryTypeId="3" PostId="6026" RevisionGUID="90be681a-a403-40fb-9e34-47de2c761795" CreationDate="2022-11-22T06:14:30.690" UserId="3460" Text="|polkadot|pallet|substrate-node-template|runtime|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23018" PostHistoryTypeId="2" PostId="6027" RevisionGUID="99c65e5b-7ed7-421f-aca9-7e21875e8ead" CreationDate="2022-11-22T07:34:14.327" UserId="139" Text="Those are conditional attributes, a feature of rust. In a nutshell you say if `not(feature = &quot;std&quot;)` is true i.e. feature `std` is disabled, then turn on attribute called `no_std` module wide as indicated by the `!` after pound `#`. Enabling `no_std` prevents you from importing the rust std lib and making use of it. This is necessary for pallets as they run inside a wasm interpreter and do not have access to machine resources which is in turn required by rust std lib. " ContentLicense="CC BY-SA 4.0" />
  <row Id="23020" PostHistoryTypeId="2" PostId="6028" RevisionGUID="5a827720-6bc8-4a77-a4cc-8139fa6a286b" CreationDate="2022-11-22T08:02:22.870" UserId="251" Text="It means: If `&quot;std&quot;` is not enabled, flag/mark this crate/module as `no_std` while compiling.&#xD;&#xA;&#xD;&#xA;All you need is this: https://doc.rust-lang.org/reference/conditional-compilation.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="23022" PostHistoryTypeId="5" PostId="6026" RevisionGUID="f6b6e8aa-0bbe-41e3-9f27-a58407694ae2" CreationDate="2022-11-22T08:03:34.750" UserId="251" Comment="added 14 characters in body; edited tags" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1yh9M.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23023" PostHistoryTypeId="6" PostId="6026" RevisionGUID="f6b6e8aa-0bbe-41e3-9f27-a58407694ae2" CreationDate="2022-11-22T08:03:34.750" UserId="251" Comment="added 14 characters in body; edited tags" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23024" PostHistoryTypeId="5" PostId="6028" RevisionGUID="e033bca7-3010-4129-9caa-de2983cb1c02" CreationDate="2022-11-22T08:08:24.367" UserId="251" Comment="added 10 characters in body" Text="In short, it means: If `&quot;std&quot;` is not enabled, flag/mark this crate/module as `no_std` while compiling.&#xD;&#xA;&#xD;&#xA;All you need is this: https://doc.rust-lang.org/reference/conditional-compilation.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="23025" PostHistoryTypeId="2" PostId="6029" RevisionGUID="5c35279b-d2b5-4bc6-a8c0-f01e79a2cd9c" CreationDate="2022-11-22T08:55:39.370" UserId="3469" Text="How can i call my pallets and it functions in smart contract ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;for exmaple i have a pallet with name dex , this pallet has some function with name A , B , C . now i want to call and use this functions in my smart contract . how can i do that ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="23027" PostHistoryTypeId="1" PostId="6029" RevisionGUID="5c35279b-d2b5-4bc6-a8c0-f01e79a2cd9c" CreationDate="2022-11-22T08:55:39.370" UserId="3469" Text="How can i call my pallets and it functions in smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23028" PostHistoryTypeId="3" PostId="6029" RevisionGUID="5c35279b-d2b5-4bc6-a8c0-f01e79a2cd9c" CreationDate="2022-11-22T08:55:39.370" UserId="3469" Text="|substrate-node-template|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23029" PostHistoryTypeId="2" PostId="6030" RevisionGUID="73313d5e-7202-4fc9-a46a-4ed8da425f39" CreationDate="2022-11-22T08:56:13.627" UserId="198" Text="There are a few options to solve this problem and you can find more information in [this issue](https://github.com/paritytech/srtool/issues/46).&#xD;&#xA;&#xD;&#xA;In short, what you can do is pass the `--root` flag to the `srtool-cli`:&#xD;&#xA;```&#xD;&#xA;srtool build --root ....&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23031" PostHistoryTypeId="5" PostId="6029" RevisionGUID="6a03f262-066c-452f-b220-173e129b08d7" CreationDate="2022-11-22T09:17:49.407" UserId="2762" Comment="correct spelling" Text="How can I call my pallet functions from a smart contract?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For example I have a pallet with name `dex`, this pallet has some function with name A , B , C. Now I want to call and use this functions in my smart contract. How can I do that? " ContentLicense="CC BY-SA 4.0" />
  <row Id="23032" PostHistoryTypeId="4" PostId="6029" RevisionGUID="6a03f262-066c-452f-b220-173e129b08d7" CreationDate="2022-11-22T09:17:49.407" UserId="2762" Comment="correct spelling" Text="How can I call my pallets and it functions in a smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23033" PostHistoryTypeId="6" PostId="6029" RevisionGUID="6a03f262-066c-452f-b220-173e129b08d7" CreationDate="2022-11-22T09:17:49.407" UserId="2762" Comment="correct spelling" Text="|substrate-node-template|smart-contract|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23034" PostHistoryTypeId="24" PostId="6029" RevisionGUID="6a03f262-066c-452f-b220-173e129b08d7" CreationDate="2022-11-22T09:17:49.407" Comment="Proposed by 2762 approved by 3469 edit id of 342" ContentLicense="CC BY-SA 4.0" />
  <row Id="23035" PostHistoryTypeId="2" PostId="6031" RevisionGUID="bad136d1-465a-443c-89d1-496d5a89a75a" CreationDate="2022-11-22T09:22:23.697" UserId="2762" Text="Check this example [A Substrate node demonstrating two-way interactions between the runtime and Ink! smart contracts.][1]&#xD;&#xA;&#xD;&#xA;It shows you a demo for both scenarios: [Pallet-to-contract][2] and the one you are looking for: [Contract-to-pallet][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/justinFrevert/Runtime-Contract-Interactions/&#xD;&#xA;  [2]: https://github.com/justinFrevert/Runtime-Contract-Interactions/#pallet-to-contract&#xD;&#xA;  [3]: https://github.com/justinFrevert/Runtime-Contract-Interactions/#contract-to-pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="23037" PostHistoryTypeId="6" PostId="6019" RevisionGUID="190a8e61-fe3c-4b8a-9c94-a98cceeb3c05" CreationDate="2022-11-22T10:03:39.470" UserId="251" Comment="edited tags" Text="|runtime|srtool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23038" PostHistoryTypeId="5" PostId="6001" RevisionGUID="bd29a23f-a7ee-4b4b-9b46-d3e8a1f48cb8" CreationDate="2022-11-22T10:12:56.127" UserId="139" Comment="Added example showcasing how provides and requires are constructed." Text="AFAIK the most common example cited for explaining this where the `requires`/`provides` tag is used to provide nonce information for the current transaction in order to be properly considered a valid tx. The `provides` tag for a tx with nonce `N` would be the `requires` for a tx with nonce `N+1`. &#xD;&#xA;&#xD;&#xA;Here's an example which constructs the `provides` and `requires` tag for a the checking correct nonce of a transaction:&#xD;&#xA;```rust&#xD;&#xA;fn validate(&#xD;&#xA;		&amp;self,&#xD;&#xA;		who: &amp;Self::AccountId,&#xD;&#xA;		_call: &amp;Self::Call,&#xD;&#xA;		_info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;		_len: usize,&#xD;&#xA;	) -&gt; TransactionValidity {&#xD;&#xA;		// check index&#xD;&#xA;		let account = crate::Account::&lt;T&gt;::get(who);&#xD;&#xA;		if self.0 &lt; account.nonce {&#xD;&#xA;			return InvalidTransaction::Stale.into()&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		let provides = vec![Encode::encode(&amp;(who, self.0))];&#xD;&#xA;		let requires = if account.nonce &lt; self.0 {&#xD;&#xA;			vec![Encode::encode(&amp;(who, self.0 - One::one()))]&#xD;&#xA;		} else {&#xD;&#xA;			vec![]&#xD;&#xA;		};&#xD;&#xA;&#xD;&#xA;		Ok(ValidTransaction {&#xD;&#xA;			priority: 0,&#xD;&#xA;			requires,&#xD;&#xA;			provides,&#xD;&#xA;			longevity: TransactionLongevity::max_value(),&#xD;&#xA;			propagate: true,&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23039" PostHistoryTypeId="2" PostId="6032" RevisionGUID="484b6cd6-2f00-47fe-ad82-35d5a8469d1b" CreationDate="2022-11-22T10:50:38.137" UserId="139" Text="Reading the docs, something confused me : &#xD;&#xA;&#xD;&#xA;&gt;Although older blocks are discarded, full nodes retain all of the block headers from the genesis block to the most recent block to validate that the state is correct. **Because the full node has access to all of the block headers, it can be used to rebuild the state of the entire blockchain by executing all of the blocks from the genesis block.** Thus it requires much more computation to retrieve information about some previous state, and an archive should generally be used instead.&#xD;&#xA;&#xD;&#xA;I find this hard to understand as my understanding is that you need the actual transactions to perform state transitions. T he block header does not contain the extrinsics in and of themselves, but only the cryptographic digest of the state and extrinsic root. IOW, nothing outside this trait definition :&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait Header&#xD;&#xA;    type Number;&#xD;&#xA;    type Hash;&#xD;&#xA;    type Hashing: Hash&lt;Output = Self::Hash&gt;;&#xD;&#xA;&#xD;&#xA;    fn new(&#xD;&#xA;        number: Self::Number,&#xD;&#xA;        extrinsics_root: Self::Hash,&#xD;&#xA;        state_root: Self::Hash,&#xD;&#xA;        parent_hash: Self::Hash,&#xD;&#xA;        digest: Digest&#xD;&#xA;    ) -&gt; Self;&#xD;&#xA;    fn number(&amp;self) -&gt; &amp;Self::Number;&#xD;&#xA;    fn set_number(&amp;mut self, number: Self::Number);&#xD;&#xA;    fn extrinsics_root(&amp;self) -&gt; &amp;Self::Hash;&#xD;&#xA;    fn set_extrinsics_root(&amp;mut self, root: Self::Hash);&#xD;&#xA;    fn state_root(&amp;self) -&gt; &amp;Self::Hash;&#xD;&#xA;    fn set_state_root(&amp;mut self, root: Self::Hash);&#xD;&#xA;    fn parent_hash(&amp;self) -&gt; &amp;Self::Hash;&#xD;&#xA;    fn set_parent_hash(&amp;mut self, hash: Self::Hash);&#xD;&#xA;    fn digest(&amp;self) -&gt; &amp;Digest;&#xD;&#xA;    fn digest_mut(&amp;mut self) -&gt; &amp;mut Digest;&#xD;&#xA;    fn hash(&amp;self) -&gt; Self::Hash { ... }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**Q**: How then is it possible to&#xD;&#xA;&#xD;&#xA;&gt; rebuild the state of the entire blockchain by executing all of the&#xD;&#xA;&gt; blocks from the genesis block.&#xD;&#xA;&#xD;&#xA;? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23041" PostHistoryTypeId="1" PostId="6032" RevisionGUID="484b6cd6-2f00-47fe-ad82-35d5a8469d1b" CreationDate="2022-11-22T10:50:38.137" UserId="139" Text="How can a full node reconstruct the entire chain state using just block headers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23042" PostHistoryTypeId="3" PostId="6032" RevisionGUID="484b6cd6-2f00-47fe-ad82-35d5a8469d1b" CreationDate="2022-11-22T10:50:38.137" UserId="139" Text="|nodes|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23043" PostHistoryTypeId="5" PostId="6032" RevisionGUID="3bfab8d1-656c-437a-984c-581c6005650a" CreationDate="2022-11-22T10:59:19.397" UserId="251" Comment="deleted 2 characters in body" Text="Reading the docs, something confused me : &#xD;&#xA;&#xD;&#xA;&gt;Although older blocks are discarded, full nodes retain all of the block headers from the genesis block to the most recent block to validate that the state is correct. **Because the full node has access to all of the block headers, it can be used to rebuild the state of the entire blockchain by executing all of the blocks from the genesis block.** Thus it requires much more computation to retrieve information about some previous state, and an archive should generally be used instead.&#xD;&#xA;&#xD;&#xA;I find this hard to understand as my understanding is that you need the actual transactions to perform state transitions. The block header does not contain the extrinsic in and of themselves, but only the cryptographic digest of the state and extrinsic root. IOW, nothing outside this trait definition :&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait Header&#xD;&#xA;    type Number;&#xD;&#xA;    type Hash;&#xD;&#xA;    type Hashing: Hash&lt;Output = Self::Hash&gt;;&#xD;&#xA;&#xD;&#xA;    fn new(&#xD;&#xA;        number: Self::Number,&#xD;&#xA;        extrinsics_root: Self::Hash,&#xD;&#xA;        state_root: Self::Hash,&#xD;&#xA;        parent_hash: Self::Hash,&#xD;&#xA;        digest: Digest&#xD;&#xA;    ) -&gt; Self;&#xD;&#xA;    fn number(&amp;self) -&gt; &amp;Self::Number;&#xD;&#xA;    fn set_number(&amp;mut self, number: Self::Number);&#xD;&#xA;    fn extrinsics_root(&amp;self) -&gt; &amp;Self::Hash;&#xD;&#xA;    fn set_extrinsics_root(&amp;mut self, root: Self::Hash);&#xD;&#xA;    fn state_root(&amp;self) -&gt; &amp;Self::Hash;&#xD;&#xA;    fn set_state_root(&amp;mut self, root: Self::Hash);&#xD;&#xA;    fn parent_hash(&amp;self) -&gt; &amp;Self::Hash;&#xD;&#xA;    fn set_parent_hash(&amp;mut self, hash: Self::Hash);&#xD;&#xA;    fn digest(&amp;self) -&gt; &amp;Digest;&#xD;&#xA;    fn digest_mut(&amp;mut self) -&gt; &amp;mut Digest;&#xD;&#xA;    fn hash(&amp;self) -&gt; Self::Hash { ... }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**Q**: How then is it possible to&#xD;&#xA;&#xD;&#xA;&gt; rebuild the state of the entire blockchain by executing all of the&#xD;&#xA;&gt; blocks from the genesis block.&#xD;&#xA;&#xD;&#xA;? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23045" PostHistoryTypeId="2" PostId="6033" RevisionGUID="82985590-2341-4862-9b1b-bd5601961f4a" CreationDate="2022-11-22T11:17:21.063" UserId="3317" Text="It requests the blocks from archive nodes. The reason it is phrased like this is because the full node can verify that the blocks it receives are correct. " ContentLicense="CC BY-SA 4.0" />
  <row Id="23047" PostHistoryTypeId="2" PostId="6034" RevisionGUID="1e8603c2-e1f5-46b9-9f0d-77674586a9ff" CreationDate="2022-11-22T11:19:13.907" UserId="3327" Text="I have written benchmarking functions from my pallet. How I can test these benchmarking functions please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23049" PostHistoryTypeId="1" PostId="6034" RevisionGUID="1e8603c2-e1f5-46b9-9f0d-77674586a9ff" CreationDate="2022-11-22T11:19:13.907" UserId="3327" Text="How to test my bench-marking functions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23050" PostHistoryTypeId="3" PostId="6034" RevisionGUID="1e8603c2-e1f5-46b9-9f0d-77674586a9ff" CreationDate="2022-11-22T11:19:13.907" UserId="3327" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23051" PostHistoryTypeId="5" PostId="6033" RevisionGUID="3e35d612-395e-49b3-9caa-c31717742190" CreationDate="2022-11-22T11:28:01.500" UserId="3317" Comment="added 6 characters in body" Text="It requests the blocks from archive nodes. The reason it might be phrased like this is because the full node can verify that the blocks it receives are correct. " ContentLicense="CC BY-SA 4.0" />
  <row Id="23052" PostHistoryTypeId="12" PostId="6033" RevisionGUID="661be36f-fd90-498d-8d72-378cd1503bf8" CreationDate="2022-11-22T11:33:22.617" UserId="3317" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;}]}" />
  <row Id="23053" PostHistoryTypeId="13" PostId="6033" RevisionGUID="a29e97b6-6d1b-4d95-9f67-96b507152470" CreationDate="2022-11-22T11:34:13.257" UserId="3317" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;}]}" />
  <row Id="23054" PostHistoryTypeId="12" PostId="6033" RevisionGUID="0f3f5909-1950-4675-813a-3e31fd23b526" CreationDate="2022-11-22T11:36:21.560" UserId="3317" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;}]}" />
  <row Id="23055" PostHistoryTypeId="2" PostId="6035" RevisionGUID="3bc90787-813c-4ba5-b54b-b60c27df1520" CreationDate="2022-11-22T11:56:12.827" UserId="3317" Text="It is the same as the main Ethereum chain (it follows all the ETH standards, so also EIP 170). The Frontier pallets are however configurable so you can change some parameters that allow you to change the `BlockGasLimit` which has an impact on the contract limit size.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23057" PostHistoryTypeId="13" PostId="6033" RevisionGUID="44c4788c-f0ed-4003-8c55-0ebf6556b1db" CreationDate="2022-11-22T12:08:20.943" UserId="3317" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;}]}" />
  <row Id="23058" PostHistoryTypeId="2" PostId="6036" RevisionGUID="6e3933b9-0742-4c19-b44f-7fc05712625f" CreationDate="2022-11-22T12:18:22.943" UserId="1947" Text="Thank you all for help. The issue was being caused by contract trying to make a balance transfer less than existential deposit." ContentLicense="CC BY-SA 4.0" />
  <row Id="23060" PostHistoryTypeId="5" PostId="6033" RevisionGUID="67ea75a6-9479-460a-8ccf-09bd8abf69ac" CreationDate="2022-11-22T12:24:33.803" UserId="3317" Comment="added 82 characters in body" Text="I understand the confusion. What they mean here is something like: when a new node wants to join the network it runs the blocks starting from the genesis block. This will create a list of headers which they can/have to verify with full nodes. " ContentLicense="CC BY-SA 4.0" />
  <row Id="23061" PostHistoryTypeId="2" PostId="6037" RevisionGUID="ee7ed2b8-c199-4138-99dc-e5d16226ff4e" CreationDate="2022-11-22T12:34:56.527" UserId="94" Text="You have to add the following line to your benchmarking. For example like in [`pallet-assets`](https://github.com/paritytech/substrate/blob/6cb4b6799de6f784f4c42eb01a76a8fa67039a67/frame/assets/src/benchmarking.rs#L472  &#xD;&#xA;). Make sure to adjust it to your needs.&#xD;&#xA;```rust&#xD;&#xA;impl_benchmark_test_suite!(&#xD;&#xA;    MyPallet,&#xD;&#xA;    crate::mock::new_test_ext(),&#xD;&#xA;    crate::mock::Test&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will create a unit test for each benchmark and run it a few times with different values for each component. Starting the tests looks like this:  &#xD;&#xA;```rust&#xD;&#xA;cargo test -p pallet-whatever --features runtime-benchmarks&#xD;&#xA;```&#xD;&#xA;as described in the [docs](https://docs.substrate.io/test/benchmark/) and [README.md](https://github.com/paritytech/substrate/tree/6cb4b6799de6f784f4c42eb01a76a8fa67039a67/frame/benchmarking#testing-benchmarks).  &#xD;&#xA;If you try this for example for the lottery pallet, you should see the following output:  &#xD;&#xA;```pre&#xD;&#xA;test benchmarking::bench_start_lottery ... ok&#xD;&#xA;test benchmarking::bench_stop_repeat ... ok&#xD;&#xA;test benchmarking::bench_on_initialize_end ... ok&#xD;&#xA;test benchmarking::bench_set_calls ... ok&#xD;&#xA;test benchmarking::bench_buy_ticket ... ok&#xD;&#xA;test benchmarking::bench_on_initialize_repeat ... ok&#xD;&#xA;```&#xD;&#xA;Each line is the output of one benchmark unit-test.  &#xD;&#xA;Please not that benchmark tests are no-std and that normally you cannot use functions from the `mock.rs` since it is std. You can, however, create a `nostd_mock.rs` with helper functions that are usable from tests and benchmarks." ContentLicense="CC BY-SA 4.0" />
  <row Id="23063" PostHistoryTypeId="5" PostId="6033" RevisionGUID="5bc2dd58-4e7e-4f8b-bd3b-7e2696c4ea1a" CreationDate="2022-11-22T12:37:17.493" UserId="3317" Comment="deleted 7 characters in body" Text="I understand the confusion. What I think they mean here is: when a new node wants to join the network it runs the blocks starting from the genesis block. This will create a list of headers which they can/have to verify with full nodes. " ContentLicense="CC BY-SA 4.0" />
  <row Id="23064" PostHistoryTypeId="2" PostId="6038" RevisionGUID="eeeefcdb-4c06-4698-9b6e-ed75e1844901" CreationDate="2022-11-22T12:37:49.527" UserId="3471" Text="A cross chain transfer generates several extrinsics depending on the number of hops. &#xD;&#xA;In this example: https://kusama.subscan.io/xcm_message/kusama-3c38ab02a51980022f63af373d4cad977cb9405b&#xD;&#xA;&#xD;&#xA;we have a UMP transfer from Mangata to Kusama. &#xD;&#xA;&#xD;&#xA;I'd like to be able to parse extrinsics just on the final destination (Kusama in this case) and pick up any KSM transfers happening cross chain (which are not happening with the regular transfer events). &#xD;&#xA;&#xD;&#xA;The [extrinsic on Kusama][1] has a bunch of events but I'm not understanding how I should parse these to detect the transfer, transfer amount and generally any information.&#xD;&#xA;&#xD;&#xA;When reading about XCM there's a lot of documentation explaining how to construct transactions which make up the first extrinsic but then the following extrinsics and events in the other chains seem more cryptic. If someone could point me in the right direction I would greatly appreciate &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://kusama.subscan.io/extrinsic/15271684-1?event=15271684-40" ContentLicense="CC BY-SA 4.0" />
  <row Id="23066" PostHistoryTypeId="1" PostId="6038" RevisionGUID="eeeefcdb-4c06-4698-9b6e-ed75e1844901" CreationDate="2022-11-22T12:37:49.527" UserId="3471" Text="Parsing XCM Inbound Messages" ContentLicense="CC BY-SA 4.0" />
  <row Id="23067" PostHistoryTypeId="3" PostId="6038" RevisionGUID="eeeefcdb-4c06-4698-9b6e-ed75e1844901" CreationDate="2022-11-22T12:37:49.527" UserId="3471" Text="|xcm|parse|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23068" PostHistoryTypeId="2" PostId="6039" RevisionGUID="3ec8e00f-9504-4281-b0cb-7250f2ecb077" CreationDate="2022-11-22T12:47:08.727" UserId="3096" Text="Error: Getting error while following the Parity Bridges common code on github. Got this error while trying to send message.&#xD;&#xA;[Error][1]&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;user@ant-ThinkPad-E14-Gen-2:/data/parity-bridges-common$ ./scripts/send-message-from-millau-rialto.sh remark&#xD;&#xA;error: Found argument '--target-signer' which wasn't expected, or isn't valid in this context&#xD;&#xA;&#xD;&#xA;USAGE:&#xD;&#xA;    substrate-relay send-message &lt;bridge&gt; --source-host &lt;source-host&gt; --source-port &lt;source-port&gt; --source-signer &lt;source-signer&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ynJzD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23070" PostHistoryTypeId="1" PostId="6039" RevisionGUID="3ec8e00f-9504-4281-b0cb-7250f2ecb077" CreationDate="2022-11-22T12:47:08.727" UserId="3096" Text="Getting error: Found argument '--target-signer' while running parity bridges common" ContentLicense="CC BY-SA 4.0" />
  <row Id="23071" PostHistoryTypeId="3" PostId="6039" RevisionGUID="3ec8e00f-9504-4281-b0cb-7250f2ecb077" CreationDate="2022-11-22T12:47:08.727" UserId="3096" Text="|polkadot|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23072" PostHistoryTypeId="5" PostId="6006" RevisionGUID="5d9b4286-6dd4-443e-9cf0-93177c582ff0" CreationDate="2022-11-22T12:48:21.870" UserId="309" Comment="added 119 characters in body" Text="First of all I am working on Polkadot-v0.9.29.&#xD;&#xA;I am struggling to understand the right way to format a pallet call before submitting it as a proposal to the democracy pallet.&#xD;&#xA;Let's the pallet call be the famous:&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;    		pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResult {&#xD;&#xA;    &#xD;&#xA;    			let who = ensure_signed(origin)?;&#xD;&#xA;    			// Update storage.&#xD;&#xA;    			&lt;Something&lt;T&gt;&gt;::put(something);&#xD;&#xA;    			// Emit an event.&#xD;&#xA;    			Self::deposit_event(Event::SomethingStored { something, who });&#xD;&#xA;    			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;consider the following code:&#xD;&#xA;&#xD;&#xA;I prepared a function that formats the call as follows:&#xD;&#xA;&#xD;&#xA;    pub fn create_proposal_hash_and_note(caller: T::AccountId,call:&lt;T as Config&gt;::Call) -&gt; T::Hash {&#xD;&#xA;            let origin = RawOrigin::Signed(caller);&#xD;&#xA;            let call_wrap = Box::new(call);&#xD;&#xA;            let proposal_hash = T::Hashing::hash_of(&amp;call_wrap);&#xD;&#xA;            let proposal_encoded: Vec&lt;u8&gt; = call_wrap.encode();&#xD;&#xA;            match Dem::Pallet::&lt;T&gt;::note_preimage(origin.into(), proposal_encoded){&#xD;&#xA;                Ok(_) =&gt; (),&#xD;&#xA;                Err(x) if x == Error::&lt;T&gt;::DuplicatePreimage.into() =&gt; (),&#xD;&#xA;                Err(x) =&gt; panic!(&quot;{:?}&quot;, x),&#xD;&#xA;            }&#xD;&#xA;            proposal_hash&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Then I create the formated call, submit the proposal and start a referendum:&#xD;&#xA;&#xD;&#xA;    let call = Call::&lt;T&gt;::do_something{&#xD;&#xA;    				something:32&#xD;&#xA;    			};&#xD;&#xA;    //Create and add the proposal&#xD;&#xA;    let prop_hash = Self::create_proposal_hash_and_note(virtual_account.clone(),rep_call.into());&#xD;&#xA;    Dem::Pallet::&lt;T&gt;::propose(origin_v.into(),prop_hash,deposit.into()).ok();&#xD;&#xA;    ....&#xD;&#xA;&#xD;&#xA;I Already checked through testing, that:&#xD;&#xA;- the referendum is correctly started&#xD;&#xA;- the proposal hash is registered&#xD;&#xA;- after voting, the referendum completes normally&#xD;&#xA;only problem is the proposal is not enacted.&#xD;&#xA;I think it's because the proposal is not correctly formated, but I really don't know Where/why.&#xD;&#xA;If you want to see the full code:&#xD;&#xA;&#xD;&#xA;[Asset_management_pallet][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Fair-Squares/fair-squares/tree/126-implement-asset-distributor-pallet-fungible-%2B-config-shares-that-get-minted/pallets/asset_management/src&#xD;&#xA;&#xD;&#xA;Help, please?&#xD;&#xA;&#xD;&#xA;### EDIT 1&#xD;&#xA;Code sample of the test I'm using with the **Real pallet call**:&#xD;&#xA;&#xD;&#xA;    let b = match ref_infos{&#xD;&#xA;    			pallet_democracy::ReferendumInfo::Finished{approved,end:_} =&gt; approved,&#xD;&#xA;    			_=&gt; false,&#xD;&#xA;    		} ;&#xD;&#xA;    &#xD;&#xA;    		println!(&quot;\n\nReferendum status after vote is: {:?}\n present block is: {:?}\n\n&quot;,&amp;ref_infos,System::block_number());&#xD;&#xA;    		println!(&quot;\n\nvote result is:{:?}&quot;,b);&#xD;&#xA;    		let prop0 = AssetManagement::proposals(0).unwrap().vote_result;&#xD;&#xA;    		println!(&quot;\n\nVote results:{:?}\n\n&quot;,prop0);&#xD;&#xA;    &#xD;&#xA;    		//Proposal enactement should happen 2 blocks later &#xD;&#xA;    		fast_forward_to(end_block_number&#xD;&#xA;    			.saturating_add(&lt;Test as crate::Config&gt;::Delay::get()));&#xD;&#xA;&#xD;&#xA;    //The code line below fails as the pallet call is not executed as it should			&#xD;&#xA;    assert_eq!(Roles::RepresentativeLog::&lt;Test&gt;::contains_key(FERDIE), true);	&#xD;&#xA;&#xD;&#xA;### EDIT 2&#xD;&#xA;In the event emitted at The after the vote, I getr the following error message:&#xD;&#xA;&#xD;&#xA;    Invalid preimage" ContentLicense="CC BY-SA 4.0" />
  <row Id="23073" PostHistoryTypeId="2" PostId="6040" RevisionGUID="7267d5ff-f28b-408f-994c-0dc490f11738" CreationDate="2022-11-22T12:48:35.240" UserId="94" Text="You can get the on-chain time from the timestamp pallet with `Timestamp::now()`.  &#xD;&#xA;But this does not make sense for benchmarking. Benchmarks and their code run in WASM no-std. There are two ways this goes:  &#xD;&#xA;&#xD;&#xA;- Your code is `std`:&#xD;&#xA;The code will therefore never be part of the runtime. Use criterion or any other benchmarking library you like and optimize it.&#xD;&#xA;- Your code is `no-std`:&#xD;&#xA;This part is covered by `FRAME` benchmarking. It records timestamps before and after executing the WASM code and calculates the weight of it.&#xD;&#xA;&#xD;&#xA;So I dont see why you want mix `std` timestamps + `FRAME` benchmarking.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23075" PostHistoryTypeId="5" PostId="6033" RevisionGUID="e95785d1-2907-4152-b3c7-d6b7822193fb" CreationDate="2022-11-22T12:58:26.733" UserId="3317" Comment="added 25 characters in body" Text="I understand the confusion. What I think they mean here is: when a new node wants to join the network it executes the blocks in order, starting with the state from genesis block. This will create a list of headers which they can/have to verify with full nodes. " ContentLicense="CC BY-SA 4.0" />
  <row Id="23076" PostHistoryTypeId="2" PostId="6041" RevisionGUID="0c123dbb-f466-476d-8dac-fa3cf15b4a46" CreationDate="2022-11-22T13:00:11.780" UserId="94" Text="A `Call` itself does not have a *weight* but only a *weight annontation* in the form of `#[pallet::weight(…)]`.  &#xD;&#xA;A `Dispatchable`, which is a combination of a `Call` and its encoded arguments, has a concrete weight since the weight can depend on the arguments.  &#xD;&#xA;The difference is that this a `Call` has a formula with variables as weight, not a constant.  &#xD;&#xA;So you cannot say how much concrete weight a call has. Further to this the benchmarking functions do not always 1:1 map to calls, which makes it more difficult to compare.  &#xD;&#xA;&#xD;&#xA;SWC https://github.com/ggwpez/substrate-weight-compare (eg deployed to https://weights.tasty.limo/compare-mr) can compare this if you set the *Evaluation Method* to `Base` which will set all possible components to zero and calculate the concrete value per `Call`.  &#xD;&#xA;However it does this on a source-code level, not a WASM runtime blob or running RPC node." ContentLicense="CC BY-SA 4.0" />
  <row Id="23078" PostHistoryTypeId="5" PostId="6041" RevisionGUID="494fae9c-044d-43d9-b709-f86415d3987f" CreationDate="2022-11-22T13:05:29.237" UserId="94" Comment="added 96 characters in body" Text="A `Call` itself does not have a *weight* but only a *weight annontation* in the form of `#[pallet::weight(…)]`.  &#xD;&#xA;A `Dispatchable`, which is a combination of a `Call` and its encoded arguments, has a concrete weight since the weight can depend on the arguments.  &#xD;&#xA;The difference is that this a `Call` has a formula with variables as weight, not a constant.  &#xD;&#xA;So you cannot say how much concrete weight a call has. Further to this the benchmarking functions do not always 1:1 map to calls, which makes it more difficult to compare.  &#xD;&#xA;&#xD;&#xA;SWC https://github.com/ggwpez/substrate-weight-compare (eg deployed to https://weights.tasty.limo/compare-mr) can compare this if you set the *Evaluation Method* to `Base` which will set all possible components to zero and calculate the concrete value per `Call`.  &#xD;&#xA;However it does this on a source-code level, not a WASM runtime blob or running RPC node.  &#xD;&#xA;It could therefore still happen that you just forget to use the weights in the runtime file." ContentLicense="CC BY-SA 4.0" />
  <row Id="23079" PostHistoryTypeId="5" PostId="6006" RevisionGUID="99b55b05-0768-4b85-84fc-c2019e2c6853" CreationDate="2022-11-22T13:33:56.577" UserId="309" Comment="deleted 8 characters in body" Text="First of all I am working on Polkadot-v0.9.29.&#xD;&#xA;I am struggling to understand the right way to format a pallet call before submitting it as a proposal to the democracy pallet.&#xD;&#xA;Let's the pallet call be the famous:&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;    		pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResult {&#xD;&#xA;    &#xD;&#xA;    			let who = ensure_signed(origin)?;&#xD;&#xA;    			// Update storage.&#xD;&#xA;    			&lt;Something&lt;T&gt;&gt;::put(something);&#xD;&#xA;    			// Emit an event.&#xD;&#xA;    			Self::deposit_event(Event::SomethingStored { something, who });&#xD;&#xA;    			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;consider the following code:&#xD;&#xA;&#xD;&#xA;I prepared a function that formats the call as follows:&#xD;&#xA;&#xD;&#xA;    pub fn create_proposal_hash_and_note(caller: T::AccountId,call:&lt;T as Config&gt;::Call) -&gt; T::Hash {&#xD;&#xA;            let origin = RawOrigin::Signed(caller);&#xD;&#xA;            let call_wrap = Box::new(call);&#xD;&#xA;            let proposal_hash = T::Hashing::hash_of(&amp;call_wrap);&#xD;&#xA;            let proposal_encoded: Vec&lt;u8&gt; = call_wrap.encode();&#xD;&#xA;            match Dem::Pallet::&lt;T&gt;::note_preimage(origin.into(), proposal_encoded){&#xD;&#xA;                Ok(_) =&gt; (),&#xD;&#xA;                Err(x) if x == Error::&lt;T&gt;::DuplicatePreimage.into() =&gt; (),&#xD;&#xA;                Err(x) =&gt; panic!(&quot;{:?}&quot;, x),&#xD;&#xA;            }&#xD;&#xA;            proposal_hash&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Then I create the formated call, submit the proposal and start a referendum:&#xD;&#xA;&#xD;&#xA;    let call = Call::&lt;T&gt;::do_something{&#xD;&#xA;    				something:32&#xD;&#xA;    			};&#xD;&#xA;    //Create and add the proposal&#xD;&#xA;    let prop_hash = Self::create_proposal_hash_and_note(virtual_account.clone(),rep_call.into());&#xD;&#xA;    Dem::Pallet::&lt;T&gt;::propose(origin_v.into(),prop_hash,deposit.into()).ok();&#xD;&#xA;    ....&#xD;&#xA;&#xD;&#xA;I Already checked through testing, that:&#xD;&#xA;- the referendum is correctly started&#xD;&#xA;- the proposal hash is registered&#xD;&#xA;- after voting, the referendum completes normally&#xD;&#xA;only problem is the proposal is not enacted.&#xD;&#xA;I think it's because the proposal is not correctly formated, but I really don't know Where/why.&#xD;&#xA;If you want to see the full code:&#xD;&#xA;&#xD;&#xA;[Asset_management_pallet][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Fair-Squares/fair-squares/tree/126-implement-asset-distributor-pallet-fungible-%2B-config-shares-that-get-minted/pallets/asset_management/src&#xD;&#xA;&#xD;&#xA;Help, please?&#xD;&#xA;&#xD;&#xA;### EDIT 1&#xD;&#xA;Code sample of the test I'm using with the **Real pallet call**:&#xD;&#xA;&#xD;&#xA;    let b = match ref_infos{&#xD;&#xA;    			pallet_democracy::ReferendumInfo::Finished{approved,end:_} =&gt; approved,&#xD;&#xA;    			_=&gt; false,&#xD;&#xA;    		} ;&#xD;&#xA;    &#xD;&#xA;    		println!(&quot;\n\nReferendum status after vote is: {:?}\n present block is: {:?}\n\n&quot;,&amp;ref_infos,System::block_number());&#xD;&#xA;    		println!(&quot;\n\nvote result is:{:?}&quot;,b);&#xD;&#xA;    		let prop0 = AssetManagement::proposals(0).unwrap().vote_result;&#xD;&#xA;    		println!(&quot;\n\nVote results:{:?}\n\n&quot;,prop0);&#xD;&#xA;    &#xD;&#xA;    		//Proposal enactement should happen 2 blocks later &#xD;&#xA;    		fast_forward_to(end_block_number&#xD;&#xA;    			.saturating_add(&lt;Test as crate::Config&gt;::Delay::get()));&#xD;&#xA;&#xD;&#xA;    //The code line below fails as the pallet call is not executed as it should			&#xD;&#xA;    assert_eq!(Roles::RepresentativeLog::&lt;Test&gt;::contains_key(FERDIE), true);	&#xD;&#xA;&#xD;&#xA;### EDIT 2&#xD;&#xA;In the event emitted after the vote, I get the following error message:&#xD;&#xA;&#xD;&#xA;    Invalid preimage" ContentLicense="CC BY-SA 4.0" />
  <row Id="23080" PostHistoryTypeId="2" PostId="6042" RevisionGUID="820af33e-cbc5-45ed-ba34-e34373328c1e" CreationDate="2022-11-22T13:40:23.327" UserId="3468" Text="Hi i have questions i was trying to find documentary of how to change substrate from POA to POS" ContentLicense="CC BY-SA 4.0" />
  <row Id="23082" PostHistoryTypeId="1" PostId="6042" RevisionGUID="820af33e-cbc5-45ed-ba34-e34373328c1e" CreationDate="2022-11-22T13:40:23.327" UserId="3468" Text="Substrate change node tamplate from NPOA TO NPOS" ContentLicense="CC BY-SA 4.0" />
  <row Id="23083" PostHistoryTypeId="3" PostId="6042" RevisionGUID="820af33e-cbc5-45ed-ba34-e34373328c1e" CreationDate="2022-11-22T13:40:23.327" UserId="3468" Text="|substrate-node-template|staking|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23084" PostHistoryTypeId="4" PostId="6042" RevisionGUID="ea317117-be58-47a9-b57a-a9df75754192" CreationDate="2022-11-22T14:13:51.487" UserId="3468" Comment="edited title" Text="Substrate change node template from POA TO POS" ContentLicense="CC BY-SA 4.0" />
  <row Id="23085" PostHistoryTypeId="5" PostId="6042" RevisionGUID="c8bb21d0-8cab-45af-8b2c-2182bd6ec85e" CreationDate="2022-11-22T14:20:27.530" UserId="29" Comment="deleted 25 characters in body; edited title" Text="Is there any documentation on how to change Substrate from PoA to PoS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23086" PostHistoryTypeId="4" PostId="6042" RevisionGUID="c8bb21d0-8cab-45af-8b2c-2182bd6ec85e" CreationDate="2022-11-22T14:20:27.530" UserId="29" Comment="deleted 25 characters in body; edited title" Text="Substrate change node template from PoA to PoS" ContentLicense="CC BY-SA 4.0" />
  <row Id="23087" PostHistoryTypeId="2" PostId="6043" RevisionGUID="d40c0b7b-b2e9-46b9-95f5-2e1d52fb3381" CreationDate="2022-11-22T14:23:14.953" UserId="29" Text="The following posts may help:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/questions/996/how-to-upgrade-consensus-engine-of-a-live-chain-from-poa-to-pos/1038#1038&#xD;&#xA;- https://substrate.stackexchange.com/questions/368/how-to-change-consensus-engine-from-poa-to-pos/389#389&#xD;&#xA;&#xD;&#xA;Also, you may want to consider the parachain route:&#xD;&#xA;- https://substrate.stackexchange.com/questions/5840/change-consensus-of-substrate/5849#5849" ContentLicense="CC BY-SA 4.0" />
  <row Id="23089" PostHistoryTypeId="2" PostId="6044" RevisionGUID="fd69078d-f47e-4056-b637-f69c6448c24a" CreationDate="2022-11-22T15:06:26.337" UserId="181" Text="Ultimately, there's no &quot;right&quot; way to do it. Some script outside of the benchmark would have to be run to generate the values. Here's a FRAME [example][1] where primitive types such as keypairs are generated in a script and recreated in the benchmark using its bytes(which is okay in no-std)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/futureversecom/substrate/blob/5cdb054049980eecb449c36a7ccfe4990329c494/frame/babe/src/benchmarking.rs#L80" ContentLicense="CC BY-SA 4.0" />
  <row Id="23091" PostHistoryTypeId="5" PostId="6044" RevisionGUID="3af2ffb2-63c1-4de6-8fa1-ce6e0c9755d5" CreationDate="2022-11-22T15:21:48.350" UserId="181" Comment="deleted 21 characters in body" Text="Ultimately, there's no &quot;right&quot; way to do it. Some script outside of the benchmark would have to be run to generate the values. Here's a FRAME [example][1] where primitive types such as keypairs are generated and scale-encoded in the script, and decoded in the benchmark.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/futureversecom/substrate/blob/5cdb054049980eecb449c36a7ccfe4990329c494/frame/babe/src/benchmarking.rs#L80" ContentLicense="CC BY-SA 4.0" />
  <row Id="23092" PostHistoryTypeId="5" PostId="6044" RevisionGUID="67fcf465-f71d-420d-a5c6-3def35031000" CreationDate="2022-11-22T15:53:33.343" UserId="181" Comment="deleted 4 characters in body" Text="Ultimately, there's no &quot;right&quot; way to do it. Some script outside of the benchmark would have to be run to generate the values. Here's a FRAME [example][1] where primitive types such as keypairs are generated and scale-encoded in the script, and decoded in the benchmark.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/5cdb054049980eecb449c36a7ccfe4990329c494/frame/babe/src/benchmarking.rs#L80" ContentLicense="CC BY-SA 4.0" />
  <row Id="23097" PostHistoryTypeId="5" PostId="4693" RevisionGUID="9c6eeabc-180b-4f19-83b2-2a2a1fd8d944" CreationDate="2022-11-22T19:21:16.200" UserId="29" Comment="deleted 10 characters in body" Text="You'll need to download the Zombienet executable.&#xD;&#xA;&#xD;&#xA;You can find linux and macOS executables of the Zombienet CLI here:&#xD;&#xA;- https://github.com/paritytech/zombienet/releases&#xD;&#xA;&#xD;&#xA;Download the Zombienet CLI according to your operating system.&#xD;&#xA;&#xD;&#xA;&gt; Tip: If you want the executable to be available system-wide then you can follow these steps (otherwise just download the executable to your working directory):&#xD;&#xA;&gt; &#xD;&#xA;&gt; ```&#xD;&#xA;&gt; wget https://github.com/paritytech/zombienet/releases/download/v1.3.18/zombienet-macos&#xD;&#xA;&gt; chmod +x zombienet-macos &#xD;&#xA;&gt; cp zombienet-macos /usr/local/bin&#xD;&#xA;&gt; ```&#xD;&#xA;&#xD;&#xA;Make sure Zombienet CLI is installed correctly:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos --help&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some similar output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Usage: zombienet [options] [command]&#xD;&#xA;&#xD;&#xA;Options:&#xD;&#xA;  -c, --spawn-concurrency &lt;concurrency&gt;  Number of concurrent spawning process to launch, default is 1&#xD;&#xA;  -p, --provider &lt;provider&gt;              Override provider to use (choices: &quot;podman&quot;, &quot;kubernetes&quot;, &quot;native&quot;)&#xD;&#xA;  -m, --monitor                          Start as monitor, do not auto cleanup network&#xD;&#xA;  -h, --help                             display help for command&#xD;&#xA;&#xD;&#xA;Commands:&#xD;&#xA;  spawn &lt;networkConfig&gt; [creds]          Spawn the network defined in the config&#xD;&#xA;  test &lt;testFile&gt; [runningNetworkSpec]   Run tests on the network defined&#xD;&#xA;  setup &lt;binaries...&gt;                    Setup is meant for downloading and making dev environment of Zombienet ready&#xD;&#xA;  version                                Prints zombienet version&#xD;&#xA;  help [command]                         display help for command&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Setting up your config&#xD;&#xA;&#xD;&#xA;Zombienet works with a config. The config is where you specify your test network's configuration. The config is also where you can specify the Polkadot/Cumulus binaries.&#xD;&#xA;&#xD;&#xA;Create a config file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;touch config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in this example config we are specifying that we want a Rococo Relay chain with four validators and two parachains - each with one collator. Make sure you have the compiled binaries available.&#xD;&#xA;&#xD;&#xA;&gt; Zombienet also works with other providers such as Kubernetes and Podman.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot-v0.9.32&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;dave&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1000-collator&quot;&#xD;&#xA;  command = &quot;./bin/parachain-template-node-v0.9.32&quot;&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1001&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1001-collator&quot;&#xD;&#xA;  command = &quot;../bin/parachain-template-node-v0.9.32&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Save the file and run the Zombienet CLI using this config:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos spawn config.toml -p native&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some nicely formatted output stating that the nodes are up and ready.&#xD;&#xA;&#xD;&#xA;You can now interact with your nodes in [polkadotJS apps](https://polkadot.js.org/apps)!" ContentLicense="CC BY-SA 4.0" />
  <row Id="23098" PostHistoryTypeId="2" PostId="6046" RevisionGUID="064fa3e4-32dd-46d1-9834-67a1111404a6" CreationDate="2022-11-22T22:30:37.720" UserId="496" Text="Im unable to build substrate-node-template using my Macbook pro M1 Pro laptop.&#xD;&#xA;&#xD;&#xA;I updated cmake and followed the official guide:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/quick-start/&#xD;&#xA;&#xD;&#xA;I also tried with the flag ``` --locked ```&#xD;&#xA;&#xD;&#xA;Here is the error log: &#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;error: failed to run custom build command for `libp2p-kad v0.41.0&#xD;&#xA;error: failed to run custom build command for `libp2p-identify v0.40.0`&#xD;&#xA;error: failed to run custom build command for `sc-network-light v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.32#5ea6d953)`&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23100" PostHistoryTypeId="1" PostId="6046" RevisionGUID="064fa3e4-32dd-46d1-9834-67a1111404a6" CreationDate="2022-11-22T22:30:37.720" UserId="496" Text="Failed to build substrate-node-template using Macbook pro M1 pro" ContentLicense="CC BY-SA 4.0" />
  <row Id="23101" PostHistoryTypeId="3" PostId="6046" RevisionGUID="064fa3e4-32dd-46d1-9834-67a1111404a6" CreationDate="2022-11-22T22:30:37.720" UserId="496" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23102" PostHistoryTypeId="2" PostId="6047" RevisionGUID="181b0708-ae42-49eb-bd1b-0ca07638b7c0" CreationDate="2022-11-22T23:04:33.773" UserId="29" Text="I just went through the instructions documented here:&#xD;&#xA;- https://docs.substrate.io/quick-start&#xD;&#xA;&#xD;&#xA;And it works fine for my M1 Pro. &#xD;&#xA;&#xD;&#xA;My CMake version is 3.24.2. What is yours?&#xD;&#xA;&#xD;&#xA;Make sure you have the proper recommended setup:&#xD;&#xA;- https://docs.substrate.io/install/macos&#xD;&#xA;&#xD;&#xA;Additionally you may want to run:&#xD;&#xA;```sh&#xD;&#xA;xcode-select --install&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you are still running into issues, please post the exact steps you went through so we can try to reproduce your issue. And also include the result of running the following commands:&#xD;&#xA;```sh&#xD;&#xA;rustup show&#xD;&#xA;```&#xD;&#xA;```sh&#xD;&#xA;rustup +nightly show&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23104" PostHistoryTypeId="4" PostId="6024" RevisionGUID="9e70f334-7c58-4004-998c-a0a998aed1d7" CreationDate="2022-11-22T23:24:56.637" UserId="29" Comment="edited title" Text="What is the maximum contract size limit for frontier EVM smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23105" PostHistoryTypeId="2" PostId="6048" RevisionGUID="8b97f63c-b37c-4aec-8cd4-e8031f6be0f6" CreationDate="2022-11-22T23:36:48.070" UserId="29" Text="This code works fine for me (using the PolkadotJS API):&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const fetchCollatorCandidates = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const api = new ApiPromise({ provider });&#xD;&#xA;    await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    const candidates = await api.query.collatorSelection.candidates();&#xD;&#xA;    console.log(candidates.toHuman())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Output:&#xD;&#xA;```sh&#xD;&#xA;[&#xD;&#xA;  'ofbMGzDpuJttjypUk7SsV4n1omwSxA2gKYXSEDM3gMahNuN',&#xD;&#xA;  'op7G2ofug2Q2n1Bq3uUGzkNdSp68S93beMQkjjyDxnPREnk',&#xD;&#xA;  'qyf2KVDbBmF3MjRgmyFpQrNUnoxhp9AWCJrywysQcwXaiyb',&#xD;&#xA;  'raCf56Liw9dKJiqXSJMVoVV9eyV9s8DQoQD5r1TMcPoFM4B',&#xD;&#xA;  'rwGFKTBauckjEieq3xauaiDXxjfarZ198KXXVZupa9Dr6xm',&#xD;&#xA;  'sBwVWToF55CbuyBz3WEqDggniu8Gx18DkTQg4cagsCJsgVf',&#xD;&#xA;  'sgxpvRrL2VpAqhLPqC9up2u7gf1pCpR9c8vB7XdxnBpjxUC',&#xD;&#xA;  't4HMEqx3kW8ADAzKn5YWhAUQPdsZw7xFd39WLxRW193HYfh',&#xD;&#xA;  'tbjKCiq9k2p6L4xLJ9H7mAHs8FBE76aG4KcDapUbUnifjnr',&#xD;&#xA;  'tyBG83iCBH5zAx7zd3kvTzEJAGY8nuH2HsTtvf6YwCSwwVL'&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23107" PostHistoryTypeId="2" PostId="6049" RevisionGUID="274caad4-1ccf-4f7a-9fcf-47d6bb153459" CreationDate="2022-11-22T23:56:15.263" UserId="3114" Text="## source code:&#xD;&#xA;```&#xD;&#xA;// SPDX-License-Identifier: UNLICENSED&#xD;&#xA;pragma solidity ^0.8.9;&#xD;&#xA;&#xD;&#xA;import &quot;@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol&quot;;&#xD;&#xA;import &quot;hardhat/console.sol&quot;;&#xD;&#xA;&#xD;&#xA;contract SampleToken is ERC20PresetMinterPauser{&#xD;&#xA;    /** &#xD;&#xA;    * constructor&#xD;&#xA;    */&#xD;&#xA;    constructor(string memory name,string memory symbol) ERC20PresetMinterPauser(name,symbol) {}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## subscan case:&#xD;&#xA;- When I paste the code below and try to verify, the following error occurs.&#xD;&#xA;- The error is : &#xD;&#xA;```&#xD;&#xA;Metadata file is not found. Did you include metadata.json?&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## blockscout case:&#xD;&#xA;- When I paste the code below and try to verify, the following error occurs.&#xD;&#xA;- The error is : &#xD;&#xA;```&#xD;&#xA;Compilation error: [&quot;ParserError: Source \&quot;@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol\&quot; not found: File not found.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23109" PostHistoryTypeId="1" PostId="6049" RevisionGUID="274caad4-1ccf-4f7a-9fcf-47d6bb153459" CreationDate="2022-11-22T23:56:15.263" UserId="3114" Text="How to verify EVM contracts with openzeppelin using subscan or blockscout" ContentLicense="CC BY-SA 4.0" />
  <row Id="23110" PostHistoryTypeId="3" PostId="6049" RevisionGUID="274caad4-1ccf-4f7a-9fcf-47d6bb153459" CreationDate="2022-11-22T23:56:15.263" UserId="3114" Text="|evm|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23116" PostHistoryTypeId="2" PostId="6051" RevisionGUID="12ff4677-390c-41a6-9a84-09f496642ef2" CreationDate="2022-11-23T08:18:34.713" UserId="213" Text="In polkadotjs I have following code:&#xD;&#xA;&#xD;&#xA;    const opts = [{&quot;UniqueIdenfier1&quot;:[0,&quot;challengeprofile&quot;]}]&#xD;&#xA;    let data = api.query.templateModule.periodName(&#xD;&#xA;                ...opts,&#xD;&#xA;                queryResHandler&#xD;&#xA;              )&#xD;&#xA;&#xD;&#xA;I want to convert it to rust subtxt:&#xD;&#xA;&#xD;&#xA;    #[subxt::subxt(runtime_metadata_path = &quot;./artifacts/metadata.scale&quot;)]&#xD;&#xA;    pub mod polkadot {}&#xD;&#xA;    &#xD;&#xA;    let client = subxt::client::OnlineClient::&lt;PolkadotConfig&gt;::from_url(&quot;ws://127.0.0.1:9944&quot;)&#xD;&#xA;                            .await&#xD;&#xA;                            .unwrap();&#xD;&#xA;                    &#xD;&#xA;    let period = polkadot::storage().template_module().period_name(&amp;opts);&#xD;&#xA;&#xD;&#xA;How to convert opts in rust format?&#xD;&#xA;&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="23118" PostHistoryTypeId="1" PostId="6051" RevisionGUID="12ff4677-390c-41a6-9a84-09f496642ef2" CreationDate="2022-11-23T08:18:34.713" UserId="213" Text="How to provide argument to storage call in subxt?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23119" PostHistoryTypeId="3" PostId="6051" RevisionGUID="12ff4677-390c-41a6-9a84-09f496642ef2" CreationDate="2022-11-23T08:18:34.713" UserId="213" Text="|rust|subxt|scale-codec|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23120" PostHistoryTypeId="5" PostId="6051" RevisionGUID="bb618e3d-aa54-42b4-98df-0303dd017be9" CreationDate="2022-11-23T08:26:25.563" UserId="213" Comment="added 270 characters in body" Text="In polkadotjs I have following code:&#xD;&#xA;&#xD;&#xA;    const opts = [{&quot;UniqueIdenfier1&quot;:[0,&quot;challengeprofile&quot;]}]&#xD;&#xA;    let data = api.query.templateModule.periodName(&#xD;&#xA;                ...opts,&#xD;&#xA;                queryResHandler&#xD;&#xA;              )&#xD;&#xA;&#xD;&#xA;I want to convert it to rust subtxt:&#xD;&#xA;&#xD;&#xA;    #[subxt::subxt(runtime_metadata_path = &quot;./artifacts/metadata.scale&quot;)]&#xD;&#xA;    pub mod polkadot {}&#xD;&#xA;    &#xD;&#xA;    let client = subxt::client::OnlineClient::&lt;PolkadotConfig&gt;::from_url(&quot;ws://127.0.0.1:9944&quot;)&#xD;&#xA;                            .await&#xD;&#xA;                            .unwrap();&#xD;&#xA;                    &#xD;&#xA;    let period = polkadot::storage().template_module().period_name(&amp;opts);&#xD;&#xA;&#xD;&#xA;opt is an SumTreeName enum in substrate:&#xD;&#xA;&#xD;&#xA;    #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, TypeInfo)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;    pub enum SumTreeName {&#xD;&#xA;        UniqueIdenfier1 { citizen_id: u128, name: Vec&lt;u8&gt;}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;How to convert opts in rust format?&#xD;&#xA;&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="23121" PostHistoryTypeId="2" PostId="6052" RevisionGUID="0b915ed2-1ec0-405b-8575-db0ac32ad9e0" CreationDate="2022-11-23T08:52:49.980" UserId="213" Text="Solved by importing `SumTreeName`&#xD;&#xA;&#xD;&#xA;     #[subxt::subxt(runtime_metadata_path = &quot;./artifacts/metadata.scale&quot;)]&#xD;&#xA;     pub mod polkadot {}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     let client = subxt::client::OnlineClient::&lt;PolkadotConfig&gt;::from_url(&quot;ws://127.0.0.1:9944&quot;)&#xD;&#xA;                            .await&#xD;&#xA;                            .unwrap();&#xD;&#xA;     let key = polkadot::runtime_types::sortition_sum_game::types::SumTreeName::UniqueIdenfier1 {&#xD;&#xA;                        citizen_id: 0,&#xD;&#xA;                        name: &quot;challengeprofile&quot;.as_bytes().to_vec(),&#xD;&#xA;                    };&#xD;&#xA;     let period = polkadot::storage().template_module().period_name(&amp;key);&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23123" PostHistoryTypeId="50" PostId="5506" RevisionGUID="c0ee40c1-3e37-4ba2-88af-b8f977b5d191" CreationDate="2022-11-23T11:00:50.107" UserId="-1" />
  <row Id="23128" PostHistoryTypeId="2" PostId="6054" RevisionGUID="3ef0fef6-cdfb-41a3-9fcb-4d62d53b077c" CreationDate="2022-11-23T12:12:19.413" UserId="529" Text="In order for Blockscout to verify your source code it requires that you upload the source of each smart contract you want to verify. That means all the source code used to generate binary. Note that this also includes contracts imported from OpenZeppelin.&#xD;&#xA;There are two ways to do it.&#xD;&#xA;1. Upload to Blockscout your contract and upload all imported OpenZeppelin contracts as individual files.&#xD;&#xA;2. Flatten the source code (merge all contracts in one file). You can do flattening with `hardhat flatten` command or include Remix `Flattener` plug-in and use Remix to flatten your files.&#xD;&#xA;&#xD;&#xA;You might face some other challenges with flattened file. &#xD;&#xA;You first have to:&#xD;&#xA;- In the flattened file make sure there is only one license since each imported file will bring it's own&#xD;&#xA;   license.&#xD;&#xA;- Make sure that the pragma solidity in the flattened file is actually the compiler version used to compile. Blockscout will ask you which compiler version was used." ContentLicense="CC BY-SA 4.0" />
  <row Id="23130" PostHistoryTypeId="5" PostId="6038" RevisionGUID="74a1d52c-db23-4ac5-b740-74f3ea7ffc82" CreationDate="2022-11-23T12:52:24.863" UserId="3471" Comment="added 904 characters in body" Text="A cross chain transfer generates several extrinsics depending on the number of hops. &#xD;&#xA;In this example: https://kusama.subscan.io/xcm_message/kusama-3c38ab02a51980022f63af373d4cad977cb9405b&#xD;&#xA;&#xD;&#xA;we have a UMP transfer from Mangata to Kusama. &#xD;&#xA;&#xD;&#xA;I'd like to be able to parse extrinsics just on the final destination (Kusama in this case) and pick up any KSM transfers happening cross chain (which are not happening with the regular transfer events). &#xD;&#xA;&#xD;&#xA;The [extrinsic on Kusama][1] has a bunch of events but I'm not understanding how I should parse these to detect the transfer, transfer amount and generally any information.&#xD;&#xA;&#xD;&#xA;When reading about XCM there's a lot of documentation explaining how to construct transactions which make up the first extrinsic but then the following extrinsics and events in the other chains seem more cryptic. If someone could point me in the right direction I would greatly appreciate &#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Adding to @Bruno's comment:&#xD;&#xA;&#xD;&#xA;+1 for the subscan XCM dashboard links.  &#xD;&#xA;when searching for an XCM transfer hash on Subscan, it’s able to find a result and it links all the extrinsics across all the chains that were involved in the transfer.   As far as I can see, it looks like Subscan is creating its own index after parsing all the blocks and somehow obtaining the XCM Transfer hash for each extrinsic involved.  In the example above the XCM Transfer hash is part of the data on the destination chain block (the messageId: 0x3d3c511af2510f48be09d17bc3ff8897e79c95f850215931e8e42c2a50789ede) but it’s not present anywhere in the originator chain block.   How is the XCM Transfer hash derived?  &#xD;&#xA;&#xD;&#xA;To build something like the dashboard here: https://kusama.subscan.io/xcm_dashboard  is there a way to query the chain for XCM transfers specifically or is Subscan parsing and indexing all blocks across all chains for XCM transfers and then making that information queryable? &#xD;&#xA;&#xD;&#xA;  [1]: https://kusama.subscan.io/extrinsic/15271684-1?event=15271684-40" ContentLicense="CC BY-SA 4.0" />
  <row Id="23131" PostHistoryTypeId="5" PostId="6038" RevisionGUID="6b4d0213-afdb-4500-a8b5-85f216b062e7" CreationDate="2022-11-23T12:57:42.903" UserId="3471" Comment="added 21 characters in body" Text="A cross chain transfer generates several extrinsics depending on the number of hops. &#xD;&#xA;In this example: https://kusama.subscan.io/xcm_message/kusama-3c38ab02a51980022f63af373d4cad977cb9405b&#xD;&#xA;&#xD;&#xA;we have a UMP transfer from Mangata to Kusama. &#xD;&#xA;&#xD;&#xA;I'd like to be able to parse extrinsics just on the final destination (Kusama in this case) and pick up any KSM transfers happening cross chain (which are not happening with the regular transfer events). &#xD;&#xA;&#xD;&#xA;The [extrinsic on Kusama][1] has a bunch of events but I'm not understanding how I should parse these to detect the transfer, transfer amount and generally any information.&#xD;&#xA;&#xD;&#xA;When reading about XCM there's a lot of documentation explaining how to construct transactions which make up the first extrinsic but then the following extrinsics and events in the other chains seem more cryptic. If someone could point me in the right direction I would greatly appreciate &#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Adding to @Bruno's comment:&#xD;&#xA;&#xD;&#xA;+1 for the subscan XCM dashboard links.  &#xD;&#xA;when searching for an XCM transfer hash on Subscan, it’s able to find a result and it links all the extrinsics across all the chains that were involved in the transfer.   As far as I can see, it looks like Subscan is creating its own index after parsing all the blocks and somehow obtaining the XCM Transfer hash for each extrinsic involved.  In the example above the XCM Transfer hash is part of the data on the destination chain block (the messageId: 0x3d3c511af2510f48be09d17bc3ff8897e79c95f850215931e8e42c2a50789ede) but it’s not present anywhere in the originator chain block.   How is the XCM Transfer hash derived?  &#xD;&#xA;&#xD;&#xA;To build something like the dashboard here: https://kusama.subscan.io/xcm_dashboard  is there a way to query the chain for XCM transfers specifically or is Subscan parsing and indexing all blocks across all chains for XCM transfers and then linking together and making that information queryable? &#xD;&#xA;&#xD;&#xA;  [1]: https://kusama.subscan.io/extrinsic/15271684-1?event=15271684-40" ContentLicense="CC BY-SA 4.0" />
  <row Id="23137" PostHistoryTypeId="2" PostId="6056" RevisionGUID="03eff2eb-663e-487d-8284-3a87e24586eb" CreationDate="2022-11-23T13:27:34.127" UserId="3459" Text="I followed [this tutorial][1] to build a local blockchain and everything worked fine.&#xD;&#xA;&#xD;&#xA;Now I would like to change the account balances for instance 0 for all accounts. &#xD;&#xA;&#xD;&#xA;By looking at [this post][2], I thought that I just need to modify balances in chain_spec.rs:&#xD;&#xA;&#xD;&#xA;    balances: BalancesConfig {&#xD;&#xA;			// Configure endowed accounts with initial balance of 1 &lt;&lt; 60.&#xD;&#xA;			balances: endowed_accounts.iter().cloned().map(|k| (k, 0)).collect(),&#xD;&#xA;		},&#xD;&#xA;&#xD;&#xA; However it doesn't work and the balance didn't change (still 1&lt;&lt;60 for Alice and Bob). I also tried purging the chain.&#xD;&#xA;&#xD;&#xA;How can I modify the initial balances of Alice and Bob ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/get-started/build-local-blockchain/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/156/how-to-overwrite-endowed-account-balances-using-additional-accounts-and-balances/355#355" ContentLicense="CC BY-SA 4.0" />
  <row Id="23139" PostHistoryTypeId="1" PostId="6056" RevisionGUID="03eff2eb-663e-487d-8284-3a87e24586eb" CreationDate="2022-11-23T13:27:34.127" UserId="3459" Text="How to overwrite endowed account balance" ContentLicense="CC BY-SA 4.0" />
  <row Id="23140" PostHistoryTypeId="3" PostId="6056" RevisionGUID="03eff2eb-663e-487d-8284-3a87e24586eb" CreationDate="2022-11-23T13:27:34.127" UserId="3459" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23147" PostHistoryTypeId="2" PostId="6058" RevisionGUID="34f2490e-82ec-4965-99d5-d27c935642d7" CreationDate="2022-11-23T14:40:19.790" UserId="2548" Text="Not able to build a project because of this issue: &#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;error: linking with `cc` failed: exit status: 1&#xD;&#xA;  |&#xD;&#xA;  = note: &quot;cc&quot; &quot;-arch&quot; &quot;arm64&quot; &quot;/var/folders/5w/j2mkxftx2xz55c696xp23gzh0000gn/T/rustciwy51y/symbols.o&quot; &quot;/Users/elioprifti/dkg-substrate/target/debug/deps/dkg_standalone_node-3e72bef5f25657ad.10sw7xj1rkq1p2nk.rcgu.o&quot; &quot;/Users/elioprifti/dkg-substrate/target/debug/deps/dkg_standalone_node-3e72bef5f25657ad.10ut9rvejkcsmvr1.rcgu.o&quot; &quot;/Users/elioprifti/dkg-substrate/target/debug/deps/dkg_standalone_node-3e72bef5f25657ad.112iyrdupdm8w5vw.rcgu.o&quot; &quot;/Users/elioprifti/dkg-substrate/target/debug/deps/elioprifti/.rustup/toolchains/nightly-2022-05-15-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-d0e3d0b2f5dc30fb.rlib&quot; &quot;/Users/elioprifti/.rustup/toolchains/nightly-2022-05-15-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunwind-12083e42f9a7d1fc.rlib&quot; &quot;/Users/elioprifti/.rustup/toolchains/nightly-2022-05-15-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-def158ba03cb504e.rlib&quot; &quot;/Users/elioprifti/.rustup/toolchains/nightly-2022-05-15-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liblibc-e83dd9bd71bd52bd.rlib&quot; &quot;/Users/elioprifti/.rustup/toolchains/nightly-2022-05-15-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liballoc-a149d8756e403a5c.rlib&quot; &quot;/Users/elioprifti/.rustup/toolchains/nightly-2022-05-15-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-95a7e52c78a3fba1.rlib&quot; &quot;/Users/elioprifti/.rustup/toolchains/nightly-2022-05-15-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcore-dd6de681850a671c.rlib&quot; &quot;/Users/elioprifti/.rustup/toolchains/nightly-2022-05-15-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-ec608688b97371b8.rlib&quot; &quot;-lgmp&quot; &quot;-framework&quot; &quot;Security&quot; &quot;-framework&quot; &quot;Security&quot; &quot;-lc++&quot; &quot;-framework&quot; &quot;SystemConfiguration&quot; &quot;-framework&quot; &quot;Security&quot; &quot;-framework&quot; &quot;CoreFoundation&quot; &quot;-liconv&quot; &quot;-lSystem&quot; &quot;-lresolv&quot; &quot;-lc&quot; &quot;-lm&quot; &quot;-liconv&quot; &quot;-L&quot; &quot;/Users/elioprifti/.rustup/toolchains/nightly-2022-05-15-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib&quot; &quot;-o&quot; &quot;/Users/elioprifti/dkg-substrate/target/debug/deps/dkg_standalone_node-3e72bef5f25657ad&quot; &quot;-Wl,-dead_strip&quot; &quot;-nodefaultlibs&quot;&#xD;&#xA;  = note: ld: library not found for -lgmp&#xD;&#xA;          clang: error: linker command failed with exit code 1 (use -v to see invocation)&#xD;&#xA;          &#xD;&#xA;&#xD;&#xA;error: could not compile `dkg-standalone-node` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;elioprifti@pc-193-62 dkg-substrate % &#xD;&#xA;``` &#xD;&#xA;I can build other projects but not this one. Any idea? " ContentLicense="CC BY-SA 4.0" />
  <row Id="23149" PostHistoryTypeId="1" PostId="6058" RevisionGUID="34f2490e-82ec-4965-99d5-d27c935642d7" CreationDate="2022-11-23T14:40:19.790" UserId="2548" Text="error: linking with `cc` failed: exit status: 1 (Mac m1)" ContentLicense="CC BY-SA 4.0" />
  <row Id="23150" PostHistoryTypeId="3" PostId="6058" RevisionGUID="34f2490e-82ec-4965-99d5-d27c935642d7" CreationDate="2022-11-23T14:40:19.790" UserId="2548" Text="|substrate-node-template|rust|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23152" PostHistoryTypeId="2" PostId="6059" RevisionGUID="77035cfa-a10e-4b4f-a9f5-a527b3589268" CreationDate="2022-11-23T14:48:59.697" UserId="2762" Text="Depends how you run your node you have to modify the `testnet_genesis()` function or the `local_testnet_config()`. &#xD;&#xA;&#xD;&#xA;To make the balance 0 is as your code (changing the 1 &lt;&lt; 60 with 0):&#xD;&#xA;&#xD;&#xA;    balances: BalancesConfig {&#xD;&#xA;			// Configure endowed accounts with initial balance of 1 &lt;&lt; 60.&#xD;&#xA;			balances: endowed_accounts.iter().cloned().map(|k| (k, 0)).collect(),&#xD;&#xA;		},&#xD;&#xA;&#xD;&#xA;This populates the accounts in the `endowed_accounts` list.&#xD;&#xA; &#xD;&#xA;To add/remove accounts you have to modify the list you are sending in the parameters when calling one of this functions `testnet_genesis()` function or the `local_testnet_config()`:&#xD;&#xA;&#xD;&#xA;    // Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;				],&#xD;&#xA;&#xD;&#xA;After the changes build and run the node again:&#xD;&#xA;&#xD;&#xA;    cargo build --release&#xD;&#xA;    cargo run --release -- --dev&#xD;&#xA;&#xD;&#xA;If you set all the accounts with 0, you will see this error message&#xD;&#xA;&#xD;&#xA;     'the balance of any account should always be at least the existential deposit.'&#xD;&#xA;&#xD;&#xA;Be aware you need at least an account with more than the existential depostit, you can modify the `EXISTENTIAL_DEPOSIT` constant in the runtime: `runtime/src/lib.rs`." ContentLicense="CC BY-SA 4.0" />
  <row Id="23156" PostHistoryTypeId="2" PostId="6060" RevisionGUID="2dfee798-2180-48ba-ad9f-74b21c8133a5" CreationDate="2022-11-23T15:08:38.733" UserId="3464" Text="I need to manually import some blocks, i.e. I am downloading some blocks using an external tool and want to make them pass whole verification pipeline and be included in substrate's db and visible to all other components. I am using AURA with a custom finality-gadget.&#xD;&#xA;&#xD;&#xA;My initial approach was to use a shared instance of ImportQueue. I am just worrying if such approach won't interfere somehow with the Block Sync mechanism - this way it can receive notifications about blocks that it never requested or receive some of them more than once (trait Link; ImportUnknow -&gt; ImportKnown). Is it safe and it won't break block synchronization somehow? Does substrate support such scenario? Is there any other documented and supported way of importing external blocks?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23158" PostHistoryTypeId="1" PostId="6060" RevisionGUID="2dfee798-2180-48ba-ad9f-74b21c8133a5" CreationDate="2022-11-23T15:08:38.733" UserId="3464" Text="Block Sync and manual import of blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="23159" PostHistoryTypeId="3" PostId="6060" RevisionGUID="2dfee798-2180-48ba-ad9f-74b21c8133a5" CreationDate="2022-11-23T15:08:38.733" UserId="3464" Text="|sync|block-import|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23163" PostHistoryTypeId="2" PostId="6061" RevisionGUID="a750585e-cfa5-4dfd-935f-a376e9f8718a" CreationDate="2022-11-23T15:30:49.640" UserId="94" Text="I assume you are trying to build `dkg-substrate`, not `substrate` or the node template.  &#xD;&#xA;In your case the [GMP](https://gmplib.org/) library seems to be missing.  &#xD;&#xA;Their CI file indicates some libs that are needed [here](https://github.com/webb-tools/dkg-substrate/blob/45f135e12d214d7e6680c666c959627d1bf6d9aa/.github/workflows/coverage.yml#L26), eg `libgmp3-dev`. There is also tutorial for building it [here](https://docs.webb.tools/how-to-guides/v1/node-setup/dkg-node/#system-service-setup)." ContentLicense="CC BY-SA 4.0" />
  <row Id="23165" PostHistoryTypeId="2" PostId="6062" RevisionGUID="0423b79a-43a5-4ae2-bfcf-cead7e4b978e" CreationDate="2022-11-23T16:40:04.033" UserId="298" Text="In my srtool output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;== Compressed&#xD;&#xA; Version          : [object]&#xD;&#xA; Metadata         : V14&#xD;&#xA; Size             : 707.47 KB (724453 bytes)&#xD;&#xA; Compression      : 81.25%&#xD;&#xA; setCode          : 0x486de0c2390e07f91cdb69b9eb174dd052e93e1e3d1baa67095ca8e1cc9a0c6b&#xD;&#xA; authorizeUpgrade : 0xfb2e5fabe6c05d7580582ded90ce2cbf7a2022c5f7e385dff6d615ef84e65cbe&#xD;&#xA; IPFS             : QmRyZbLd7oPZNvrx6jbMZKJCwTdvhhrPzGvBGjFzWbE9t1&#xD;&#xA; BLAKE2_256       : 0xea3f3649925bc59d3bbfeddde0fabf2da880d696be15a17a7f410b1b1dd084fd&#xD;&#xA; Wasm             : ./runtime/target/srtool/release/wbuild/kabocha-runtime/kabocha_runtime.compact.compressed.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would like to upgrade parachain:&#xD;&#xA;&#xD;&#xA;The srtool output has the hash already for me:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; authorizeUpgrade : 0xfb2e5fabe6c05d7580582ded90ce2cbf7a2022c5f7e385dff6d615ef84e65cbe&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But if i hash compact compressed file like this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;As you can see i get the blake_256 hash provided in the output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;BLAKE2_256       : 0xea3f3649925bc59d3bbfeddde0fabf2da880d696be15a17a7f410b1b1dd084fd&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which one should i use? I am assuming that what has been hashed by srtool is either a differently compressed file, or it is using a different hasher. &#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/j5YSe.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23167" PostHistoryTypeId="1" PostId="6062" RevisionGUID="0423b79a-43a5-4ae2-bfcf-cead7e4b978e" CreationDate="2022-11-23T16:40:04.033" UserId="298" Text="Which has to use with Srtool when upgrading a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23168" PostHistoryTypeId="3" PostId="6062" RevisionGUID="0423b79a-43a5-4ae2-bfcf-cead7e4b978e" CreationDate="2022-11-23T16:40:04.033" UserId="298" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23169" PostHistoryTypeId="2" PostId="6063" RevisionGUID="dc68865b-f89c-4065-8ee0-5c260871cee5" CreationDate="2022-11-23T16:46:37.823" UserId="251" Text="Why do we introduce srtool?&#xD;&#xA;&#xD;&#xA;It's because we want a deterministic result.&#xD;&#xA;&#xD;&#xA;Your host, rust-toolchain, or something else could affect the generated bytes.&#xD;&#xA;&#xD;&#xA;With srtool, in a fixed docker, a fixed rust toolchain. We can always get the same result." ContentLicense="CC BY-SA 4.0" />
  <row Id="23171" PostHistoryTypeId="6" PostId="6062" RevisionGUID="c0542836-092d-4993-bf62-7524fb5e3108" CreationDate="2022-11-23T16:46:51.460" UserId="251" Comment="edited tags" Text="|runtime-upgrade|srtool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23172" PostHistoryTypeId="5" PostId="6060" RevisionGUID="090adbb1-68c1-4fa4-a159-3aba31d90f04" CreationDate="2022-11-23T17:57:06.820" UserId="3464" Comment="added 4 characters in body" Text="I need to manually import some blocks, i.e. I am downloading some blocks using an external tool and want to make them pass whole verification pipeline and be included in substrate's db and visible to all other components. I am using AURA with a custom finality-gadget.&#xD;&#xA;&#xD;&#xA;My initial approach was to use a shared instance of ImportQueue. I am just worrying if such approach won't interfere somehow with the Block Sync mechanism - this way it can receive notifications about blocks that it never requested or receive some of them more than once (trait Link; ImportedUnknow -&gt; ImportedKnown). Is it safe and it won't break block synchronization somehow? Does substrate support such scenario? Is there any other documented and supported way of importing external blocks?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23173" PostHistoryTypeId="4" PostId="6062" RevisionGUID="a797a1b0-384b-49fd-b559-8c26c9078338" CreationDate="2022-11-23T18:29:20.970" UserId="298" Comment="edited title" Text="Which hash to use with Srtool when upgrading a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23174" PostHistoryTypeId="2" PostId="6064" RevisionGUID="2fa2b015-4dd6-4238-ac21-275d6dfc7b1f" CreationDate="2022-11-23T19:46:24.370" UserId="28" Text="You should use your benchmarking setup to insert a fake timestamp into your runtime, and use that for the execution of your code. Similar to how you would insert fake balances or other storage items into your benchmarking setup in order to properly execute the benchmark." ContentLicense="CC BY-SA 4.0" />
  <row Id="23176" PostHistoryTypeId="4" PostId="5543" RevisionGUID="0db6d7ec-dd3e-4826-bd62-19e95bfb161b" CreationDate="2022-11-23T21:40:41.973" UserId="28" Comment="edited title" Text="How to set timestamp in benchmarks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23177" PostHistoryTypeId="6" PostId="5543" RevisionGUID="0db6d7ec-dd3e-4826-bd62-19e95bfb161b" CreationDate="2022-11-23T21:40:41.973" UserId="28" Comment="edited title" Text="|rust|benchmarking|no-std|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23178" PostHistoryTypeId="5" PostId="6064" RevisionGUID="57b92eef-b86f-43ad-ac04-7ed66acc5b57" CreationDate="2022-11-23T21:42:34.913" UserId="28" Comment="added 751 characters in body" Text="You should use your benchmarking setup to insert a fake timestamp into your runtime, and use that for the execution of your code. Similar to how you would insert fake balances or other storage items into your benchmarking setup in order to properly execute the benchmark.&#xD;&#xA;&#xD;&#xA;As you can see, the `set_timestamp` function is made available to benchmarks: https://github.com/paritytech/substrate/blob/master/frame/timestamp/src/lib.rs#L283&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	/// Get the current time for the current block.&#xD;&#xA;	///&#xD;&#xA;	/// NOTE: if this function is called prior to setting the timestamp,&#xD;&#xA;	/// it will return the timestamp of the previous block.&#xD;&#xA;	pub fn get() -&gt; T::Moment {&#xD;&#xA;		Self::now()&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	/// Set the timestamp to something in particular. Only used for tests.&#xD;&#xA;	#[cfg(any(feature = &quot;runtime-benchmarks&quot;, feature = &quot;std&quot;))]&#xD;&#xA;	pub fn set_timestamp(now: T::Moment) {&#xD;&#xA;		Now::&lt;T&gt;::put(now);&#xD;&#xA;		DidUpdate::&lt;T&gt;::put(true);&#xD;&#xA;		&lt;T::OnTimestampSet as OnTimestampSet&lt;_&gt;&gt;::on_timestamp_set(now);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23185" PostHistoryTypeId="2" PostId="6067" RevisionGUID="1954019d-44c1-4b7b-8970-1764444f6f11" CreationDate="2022-11-23T23:00:09.163" UserId="284" Text="When I select the Transact instruction, I can select an originType (Native, SovereignAccount, Superuser, Xcm) but it isn't clear to me how these different origins are interpreted.&#xD;&#xA;I thought I saw information about this somewhere, but can't find it.&#xD;&#xA;Are there examples of the implications of using different origins or use cases that highlight when to use which origin?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23187" PostHistoryTypeId="1" PostId="6067" RevisionGUID="1954019d-44c1-4b7b-8970-1764444f6f11" CreationDate="2022-11-23T23:00:09.163" UserId="284" Text="Are there descriptions, explanations, examples of the different XCM origin types/XcmV0OriginKind?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23188" PostHistoryTypeId="3" PostId="6067" RevisionGUID="1954019d-44c1-4b7b-8970-1764444f6f11" CreationDate="2022-11-23T23:00:09.163" UserId="284" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23190" PostHistoryTypeId="5" PostId="6039" RevisionGUID="aa838064-ef38-47c2-b62d-c6fa499b6dac" CreationDate="2022-11-24T02:16:48.723" UserId="354" Comment="unnecessary lines " Text="Error: Getting error while following the Parity Bridges common code on github. Got this error while trying to send message.&#xD;&#xA;[Error][1]&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;error: Found argument '--target-signer' which wasn't expected, or isn't valid in this context&#xD;&#xA;&#xD;&#xA;USAGE:&#xD;&#xA;    substrate-relay send-message &lt;bridge&gt; --source-host &lt;source-host&gt; --source-port &lt;source-port&gt; --source-signer &lt;source-signer&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ynJzD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23191" PostHistoryTypeId="24" PostId="6039" RevisionGUID="aa838064-ef38-47c2-b62d-c6fa499b6dac" CreationDate="2022-11-24T02:16:48.723" Comment="Proposed by 354 approved by 34 edit id of 343" ContentLicense="CC BY-SA 4.0" />
  <row Id="23192" PostHistoryTypeId="5" PostId="6063" RevisionGUID="a43404bb-1810-44a0-b002-f34db63870c2" CreationDate="2022-11-24T02:37:42.320" UserId="251" Comment="added 160 characters in body" Text="Why do we introduce srtool?&#xD;&#xA;&#xD;&#xA;It's because we want a deterministic result.&#xD;&#xA;&#xD;&#xA;Your host, rust-toolchain, or something else could affect the generated bytes.&#xD;&#xA;&#xD;&#xA;With srtool, in a fixed docker, a fixed rust toolchain. We can always get the same result.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Use blake2-256. https://github.com/darwinia-network/darwinia-parachain/blob/cdc46c6920d7680b0eda1bbec4ebe613c40cba82/.github/workflows/release.yml#L192-L193" ContentLicense="CC BY-SA 4.0" />
  <row Id="23194" PostHistoryTypeId="2" PostId="6068" RevisionGUID="1b6c38b2-f919-486f-b523-cbae3699ced9" CreationDate="2022-11-24T03:45:16.260" UserId="3474" Text="Good day, everyone!  &#xD;&#xA;&#xD;&#xA;I'm running an Astar validator node.  &#xD;&#xA;When I upgraded the version from v4.23.0 to v4.33.0, an error occurred.  &#xD;&#xA;```bash&#xD;&#xA;2022-11-24 02:06:57 Astar Collator&#xD;&#xA;2022-11-24 02:06:57 :vサイン:  version 4.33.0-9b953e5dafb&#xD;&#xA;2022-11-24 02:06:57 :ハート:  by Stake Technologies &lt;devops@stake.co.jp&gt;, 2019-2022&#xD;&#xA;2022-11-24 02:06:57 :クリップボード: Chain specification: Astar&#xD;&#xA;2022-11-24 02:06:57 :ラベルタグ:  Node name: ginco-astar&#xD;&#xA;2022-11-24 02:06:57 :上半身シルエット_1: Role: AUTHORITY&#xD;&#xA;2022-11-24 02:06:57 :フロッピーディスク: Database: RocksDb at /data/chains/astar/db/full&#xD;&#xA;2022-11-24 02:06:57 :鎖:  Native runtime: astar-43 (astar-0.tx2.au1)&#xD;&#xA;2022-11-24 02:06:58 Parachain id: Id(2006)&#xD;&#xA;2022-11-24 02:06:58 Parachain Account: 5Ec4AhPW97z4ZyYkd3mYkJrSeZWcwVv4wiANES2QrJi1x17F&#xD;&#xA;2022-11-24 02:06:58 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000de2e3567ab0b52f4d9bca7efadf6e7b&#xD;&#xA;fe0f453c356d0a7962e4227cfaefe5ab403170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400&#xD;&#xA;2022-11-24 02:06:58 Is collating: yes&#xD;&#xA;2022-11-24 02:06:58 [Parachain] :ハンマー: Running Frontier DB migration from version 1 to version 2. Please wait.&#xD;&#xA;====================&#xD;&#xA;Version: 4.33.0-9b953e5dafb&#xD;&#xA;   0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at rustc/93ffde6f04d3d24327a4e17a2a2bf4f63c246235/library/std/src/panicking.rs:702:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at rustc/93ffde6f04d3d24327a4e17a2a2bf4f63c246235/library/std/src/panicking.rs:588:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at rustc/93ffde6f04d3d24327a4e17a2a2bf4f63c246235/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at rustc/93ffde6f04d3d24327a4e17a2a2bf4f63c246235/library/std/src/panicking.rs:584:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at rustc/93ffde6f04d3d24327a4e17a2a2bf4f63c246235/library/core/src/panicking.rs:142:14&#xD;&#xA;   6: astar_collator::rpc::open_frontier_backend&#xD;&#xA;   7: astar_collator::parachain::service::start_node_impl::{{closure}}&#xD;&#xA;   8: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;   9: sc_cli::走る人::Runner&lt;C&gt;::run_node_until_exit&#xD;&#xA;  10: astar_collator::command::run&#xD;&#xA;  11: astar_collator::main&#xD;&#xA;  12: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  13: std::rt::lang_start::{{closure}}&#xD;&#xA;  14: main&#xD;&#xA;  15: __libc_start_main&#xD;&#xA;  16: _start&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Parameters are set as follows.  &#xD;&#xA;```bash&#xD;&#xA;- args:&#xD;&#xA;        - '--collator'&#xD;&#xA;        - '--name'&#xD;&#xA;        - astar&#xD;&#xA;        - '--chain'&#xD;&#xA;        - astar&#xD;&#xA;        - '--base-path'&#xD;&#xA;        - /data&#xD;&#xA;        - '--rpc-cors'&#xD;&#xA;        - all&#xD;&#xA;        - '--unsafe-rpc-external'&#xD;&#xA;        - '--execution'&#xD;&#xA;        - wasm&#xD;&#xA;        - '--trie-cache-size'&#xD;&#xA;        - '1'&#xD;&#xA;        - '--telemetry-url'&#xD;&#xA;        - 'wss://telemetry.polkadot.io/submit/ 0'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any advice would be appreciated.  &#xD;&#xA;Best regerd!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="23196" PostHistoryTypeId="1" PostId="6068" RevisionGUID="1b6c38b2-f919-486f-b523-cbae3699ced9" CreationDate="2022-11-24T03:45:16.260" UserId="3474" Text="Astar Startup Error after upgrading from version v4.23.0 to v4.33.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="23197" PostHistoryTypeId="3" PostId="6068" RevisionGUID="1b6c38b2-f919-486f-b523-cbae3699ced9" CreationDate="2022-11-24T03:45:16.260" UserId="3474" Text="|nodes|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23198" PostHistoryTypeId="2" PostId="6069" RevisionGUID="0a7b7ba1-9a32-4fc9-ab3d-2ff39f6c5eba" CreationDate="2022-11-24T03:48:51.387" UserId="481" Text="Ran into an issue transferring a statemine token (ex: USDt) on a local testnet with rococo-local and statemine-local. I'm trying to transfer USDt to a sibling parachain, but it fails on the statemine side, with `Account cannot be created`. It seems to come from [this part of the code in `pallet-assets`][1]. For convenience, [`can_inc_consumer`][2] &#xD;&#xA;&#xD;&#xA;This call works if `USDt` is made to be `isSufficient` on statemine-local, however that is not the case for production.&#xD;&#xA;&#xD;&#xA;There are native UNITS in the sovereign account of the parachain I am trying to transfer to. &#xD;&#xA;[![system_parachain_sovereign_account_info][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried to mirror the USDt deployed on Statemine, although minted a whole bunch of it:&#xD;&#xA;[![local USDt token][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am using a `limitedReserveTransferAssets` call, encoded data:&#xD;&#xA;`0x1f0801010100951f0100010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0104000002043205011f000700e87648170000000000`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Statemine is on `9290`. There is also another (bug?) which results in `UnweighableMessage` if using the normal `reserveTransferAssets` as described [here][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/08d1b2c7846f0280aa57dc1145a2c631b12c0789/frame/assets/src/functions.rs#L135&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L1203&#xD;&#xA;  [3]: https://i.stack.imgur.com/qvQRS.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/JCljP.png&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5393/is-teleport-of-roc-from-rockmine-to-my-parachain-should-be-used-instead-of-reser" ContentLicense="CC BY-SA 4.0" />
  <row Id="23200" PostHistoryTypeId="1" PostId="6069" RevisionGUID="0a7b7ba1-9a32-4fc9-ab3d-2ff39f6c5eba" CreationDate="2022-11-24T03:48:51.387" UserId="481" Text="&quot;Account cannot be created&quot; when trying to transfer statemine token to sibling parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="23201" PostHistoryTypeId="3" PostId="6069" RevisionGUID="0a7b7ba1-9a32-4fc9-ab3d-2ff39f6c5eba" CreationDate="2022-11-24T03:48:51.387" UserId="481" Text="|xcm|assets|rococo-local|statemint|statemine|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23202" PostHistoryTypeId="5" PostId="6069" RevisionGUID="b4a9099f-0563-4b68-bea6-0948d8c17395" CreationDate="2022-11-24T03:54:04.893" UserId="481" Comment="added 49 characters in body" Text="Ran into an issue transferring a statemine token (ex: USDt) on a local testnet with rococo-local and statemine-local. I'm trying to transfer USDt to a sibling parachain, but it fails on the statemine side, with `Account cannot be created`. It seems to come from [this part of the code in `pallet-assets`][1]. For convenience, [`can_inc_consumer`][2] &#xD;&#xA;&#xD;&#xA;This call works if `USDt` is made to be `isSufficient` on statemine-local, however that is not the case for production.&#xD;&#xA;&#xD;&#xA;There are native UNITS in the sovereign account of the parachain I am trying to transfer to. &#xD;&#xA;[![system_parachain_sovereign_account_info][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried to mirror the USDt deployed on Statemine, although minted a whole bunch of it:&#xD;&#xA;[![local USDt token][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am using a `limitedReserveTransferAssets` call, encoded data:&#xD;&#xA;`0x1f0801010100951f0100010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0104000002043205011f000700e87648170000000000`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Statemine is on `9290`. There is a (bug?) which results in `UnweighableMessage` if using the normal `reserveTransferAssets` as described [here][5], which is the reason behind `limitedReserveTransferAssets`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/08d1b2c7846f0280aa57dc1145a2c631b12c0789/frame/assets/src/functions.rs#L135&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L1203&#xD;&#xA;  [3]: https://i.stack.imgur.com/qvQRS.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/JCljP.png&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5393/is-teleport-of-roc-from-rockmine-to-my-parachain-should-be-used-instead-of-reser" ContentLicense="CC BY-SA 4.0" />
  <row Id="23203" PostHistoryTypeId="2" PostId="6070" RevisionGUID="162f57b7-e545-4c29-95e3-2561a1d440c7" CreationDate="2022-11-24T04:25:35.260" UserId="275" Text="Please check release note `v4.29.1` https://github.com/AstarNetwork/Astar/releases/tag/v4.29.1&#xD;&#xA;In case frontier DB migration failure, please delete frontier db.&#xD;&#xA;&#xD;&#xA;`{base-path}/chains/shiden/frontier` or `{base-path}/chains/astar/frontier`" ContentLicense="CC BY-SA 4.0" />
  <row Id="23205" PostHistoryTypeId="5" PostId="6069" RevisionGUID="71c8c033-3502-4437-9d0c-990239c12fb4" CreationDate="2022-11-24T04:42:25.037" UserId="481" Comment="added 6844 characters in body" Text="Ran into an issue transferring a statemine token (ex: USDt) on a local testnet with rococo-local and statemine-local. I'm trying to transfer USDt to a sibling parachain, but it fails on the statemine side, with `Account cannot be created`. It seems to come from [this part of the code in `pallet-assets`][1]. For convenience, [`can_inc_consumer`][2] &#xD;&#xA;&#xD;&#xA;This call works if `USDt` is made to be `isSufficient` on statemine-local, however that is not the case for production.&#xD;&#xA;&#xD;&#xA;There are native UNITS in the sovereign account of the parachain I am trying to transfer to. &#xD;&#xA;[![system_parachain_sovereign_account_info][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried to mirror the USDt deployed on Statemine, although minted a whole bunch of it:&#xD;&#xA;[![local USDt token][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am using a `limitedReserveTransferAssets` call, encoded data:&#xD;&#xA;`0x1f0801010100951f0100010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0104000002043205011f000700e87648170000000000`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Statemine is on `9290`. There is a (bug?) which results in `UnweighableMessage` if using the normal `reserveTransferAssets` as described [here][5], which is the reason behind `limitedReserveTransferAssets`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Logs of the XCM Execution:&#xD;&#xA;```&#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::weight: [Parachain] WeightInfoBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }, xcm: Xcm([]) }])    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::weight: [Parachain] WeightInfoBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, weight_limit: Unlimited }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]) }])    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, weight_limit: Unlimited }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]) }]), weight_limit: 654404000, weight_credit: 654404000    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::weight: [Parachain] WeightInfoBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, weight_limit: Unlimited }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]) }])    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::barriers: [Parachain] TakeWeightCredit origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, weight_limit: Unlimited }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]) }]), max_weight: 654404000, weight_credit: 654404000    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::execute: [Parachain] origin: Some(MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), total_surplus/refunded: 0/0, error_handler_weight: 0    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::currency_adapter: [Parachain] internal_transfer_asset asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, from: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, to: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::fungibles_adapter: [Parachain] internal_transfer_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, from: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, to: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 0, xcm_error: FailedToTransactAsset(&quot;Account cannot be created&quot;), weight: 0 })    &#xD;&#xA;2022-11-23 19:41:12.091 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] Execution errored at 0: FailedToTransactAsset(&quot;Account cannot be created&quot;) (original_origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) })    &#xD;&#xA;2022-11-23 19:41:12.091 DEBUG tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] [0xd6ea01cd2d378517b78a7ad42da163a0a559c3384c6745582e6451f1b9915c42] Pushed to the block.    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/08d1b2c7846f0280aa57dc1145a2c631b12c0789/frame/assets/src/functions.rs#L135&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L1203&#xD;&#xA;  [3]: https://i.stack.imgur.com/qvQRS.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/JCljP.png&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5393/is-teleport-of-roc-from-rockmine-to-my-parachain-should-be-used-instead-of-reser" ContentLicense="CC BY-SA 4.0" />
  <row Id="23206" PostHistoryTypeId="2" PostId="6071" RevisionGUID="91cc7228-5171-42e5-909b-cdf04dda8d34" CreationDate="2022-11-24T06:53:04.217" UserId="2775" Text="There's an referendum open for make USDT sufficient in statemint:&#xD;&#xA;https://polkadot.polkassembly.io/referendum/80&#xD;&#xA;&#xD;&#xA;The referendum already passed, there's 28 days delay to the change be applied" ContentLicense="CC BY-SA 4.0" />
  <row Id="23208" PostHistoryTypeId="5" PostId="6071" RevisionGUID="f953109a-1c82-4323-8b31-0d0526e86322" CreationDate="2022-11-24T06:53:30.027" UserId="2775" Comment="deleted 8 characters in body" Text="There's an referendum open for make USDT sufficient in statemint:&#xD;&#xA;https://polkadot.polkassembly.io/referendum/80&#xD;&#xA;&#xD;&#xA;The referendum passed, there's 28 days delay to the change be applied" ContentLicense="CC BY-SA 4.0" />
  <row Id="23209" PostHistoryTypeId="2" PostId="6072" RevisionGUID="d6aa6257-d46c-4e68-9e8d-eb8ea502edb6" CreationDate="2022-11-24T08:41:47.800" UserId="567" Text="The best way is to have an enum field that will encapsulate the Ownable error, and implement the From trait for it:&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum MyError {&#xD;&#xA;        OwnableError(OwnableError)&#xD;&#xA;        MyError1,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl From&lt;OwnableError&gt; for MyError {&#xD;&#xA;        fn from(error: OwnableError) -&gt; Self {&#xD;&#xA;            MyError::OwnableError(error)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;example [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AstarNetwork/wasm-showcase-dapps/blob/ad0f13f2287211a1d376096a4f7e941f55878a00/farming/logics/traits/master_chef/errors.rs#L10" ContentLicense="CC BY-SA 4.0" />
  <row Id="23211" PostHistoryTypeId="2" PostId="6073" RevisionGUID="8831bc53-3d11-4b97-a9ef-6e84c678da81" CreationDate="2022-11-24T10:27:36.377" UserId="309" Text="So one of our team member solved this, but it also raised a bunch of other questions that I will add above the various code sections:&#xD;&#xA;&#xD;&#xA;1) I don't understand why the solution won't work without the function below. Even the one who figured it out does not...&#xD;&#xA;&#xD;&#xA;    `pub fn get_formatted_call(call: &lt;T as Config&gt;::Call) -&gt; &lt;T as Config&gt;::Call {call}`&#xD;&#xA;&#xD;&#xA;2) Creating the call, nothing special&#xD;&#xA; &#xD;&#xA;			let proposal_call = Call::&lt;T&gt;::representative_approval {&#xD;&#xA;				rep_account: representative.clone(),&#xD;&#xA;				collection: collection_id,&#xD;&#xA;				item: asset_id,&#xD;&#xA;			};&#xD;&#xA;3) I actually thought that democracy was taking care of the call_dispatch, but I guess we have to do it ourselves...also...why do we need `get_formatted_call`?? any Rust/Substrate wizard???&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`let proposal = Box::new(Self::get_formatted_call(proposal_call.into()));`&#xD;&#xA;&#xD;&#xA;    let call = Call::&lt;T&gt;::execute_call_dispatch {&#xD;&#xA;    				account_id: virtual_account.clone(),&#xD;&#xA;    				proposal: proposal.clone(),&#xD;&#xA;    			};&#xD;&#xA;    let call_formatted = Self::get_formatted_call(call.into());&#xD;&#xA;    let call_dispatch = Box::new(call_formatted);&#xD;&#xA;&#xD;&#xA;4) FINALLY!! after these steps, we can create proposal_hash &amp; proposal_encoded!!!&#xD;&#xA;&#xD;&#xA;    `let proposal_hash = T::Hashing::hash_of(&amp;call_dispatch);`&#xD;&#xA;&#xD;&#xA;    `let proposal_encoded: Vec&lt;u8&gt; = call_dispatch.encode();`&#xD;&#xA;&#xD;&#xA;With these I can create a valid preimage, and the proposal is correctly enacted by Democracy pallet. HOWEVER, after spending days reading the democracy pallet tests and benchmarking, this wasn't the solution I was expecting, and I'm pretty confused. If anyone could provide some answers to the questions above...please? Question in the answer....&#xD;&#xA;&#xD;&#xA;Kazu&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23213" PostHistoryTypeId="52" PostId="6068" RevisionGUID="349da43f-9a86-456d-bfbc-f1858c77e0c5" CreationDate="2022-11-24T11:45:34.493" />
  <row Id="23214" PostHistoryTypeId="2" PostId="6074" RevisionGUID="9081ee94-b06e-41c8-ace7-6b481132c946" CreationDate="2022-11-24T11:52:36.310" UserId="527" Text="USDT is sufficient in Statemine. If you want your test to work on your local you will have to make USDT sufficient as well.&#xD;&#xA;&#xD;&#xA;As Lohann pointed, it will be soon also sufficient in Statemint.&#xD;&#xA;&#xD;&#xA;[Here](https://github.com/paritytech/cumulus/blob/master/parachains/integration-tests/statemine/xcm/4_hrmp.yml#L56-L181) you have a test to achieve exactly what you are trying to do. The tests are run with the [`parachains-integration-tests`](https://github.com/paritytech/parachains-integration-tests) tool. Bear in mind that to run those tests you'll need a relay chain runtime with `sudo` in it. In case you want to test with Kusama/Polkadot instead of Rococo, you can find a `v0.9.29` version [here](https://github.com/paritytech/polkadot/tree/it/release-v0.9.29-fast-sudo)." ContentLicense="CC BY-SA 4.0" />
  <row Id="23216" PostHistoryTypeId="52" PostId="6069" RevisionGUID="157d5a47-582e-4fe3-b67e-8828b3baa52b" CreationDate="2022-11-24T11:53:05.827" />
  <row Id="23217" PostHistoryTypeId="2" PostId="6075" RevisionGUID="747feb48-1ddb-40e6-af2e-acdd246269cc" CreationDate="2022-11-24T12:45:16.937" UserId="3475" Text="I am a developer integrating Polkadot JS to my app. I am creating an offline transaction which I am sending via the Polkadot Api RPC. In return I get the txid, but it does not help me to retrieve the transaction once it is mined. I need to get the block index and the extrinsing index in the block that the transaction will be mined. I am using the HTTP provider, the websoccet will not work for me. Can you guide me in the right direction?&#xD;&#xA;&#xD;&#xA;Best regards!" ContentLicense="CC BY-SA 4.0" />
  <row Id="23219" PostHistoryTypeId="1" PostId="6075" RevisionGUID="747feb48-1ddb-40e6-af2e-acdd246269cc" CreationDate="2022-11-24T12:45:16.937" UserId="3475" Text="Retrieve block index after transaction is sent" ContentLicense="CC BY-SA 4.0" />
  <row Id="23220" PostHistoryTypeId="3" PostId="6075" RevisionGUID="747feb48-1ddb-40e6-af2e-acdd246269cc" CreationDate="2022-11-24T12:45:16.937" UserId="3475" Text="|polkadot-js|polkadot|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23221" PostHistoryTypeId="4" PostId="6056" RevisionGUID="fd1d91e1-76df-41fd-baec-7285bf08583a" CreationDate="2022-11-24T12:49:02.463" UserId="3459" Comment="edited title" Text="How to overwrite endowed account balance (Build a local blockchain)" ContentLicense="CC BY-SA 4.0" />
  <row Id="23223" PostHistoryTypeId="5" PostId="6073" RevisionGUID="97a7493d-6ecd-4bf9-a1dc-52c876d73195" CreationDate="2022-11-24T13:23:37.353" UserId="309" Comment="added 401 characters in body" Text="So one of our team member solved this, but it also raised a bunch of other questions that I will add above the various code sections:&#xD;&#xA;&#xD;&#xA;1) I don't understand why the solution won't work without the function below. Even the one who figured it out does not...&#xD;&#xA;&#xD;&#xA;    `pub fn get_formatted_call(call: &lt;T as Config&gt;::Call) -&gt; &lt;T as Config&gt;::Call {call}`&#xD;&#xA;&#xD;&#xA;2) Creating the call, nothing special&#xD;&#xA; &#xD;&#xA;			let proposal_call = Call::&lt;T&gt;::representative_approval {&#xD;&#xA;				rep_account: representative.clone(),&#xD;&#xA;				collection: collection_id,&#xD;&#xA;				item: asset_id,&#xD;&#xA;			};&#xD;&#xA;3) I actually thought that democracy was taking care of the call_dispatch, but I guess we have to do it ourselves...also...why do we need `get_formatted_call`?? any Rust/Substrate wizard???&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`let proposal = Box::new(Self::get_formatted_call(proposal_call.into()));`&#xD;&#xA;&#xD;&#xA;    let call = Call::&lt;T&gt;::execute_call_dispatch {&#xD;&#xA;    				account_id: virtual_account.clone(),&#xD;&#xA;    				proposal: proposal.clone(),&#xD;&#xA;    			};&#xD;&#xA;    let call_formatted = Self::get_formatted_call(call.into());&#xD;&#xA;    let call_dispatch = Box::new(call_formatted);&#xD;&#xA;&#xD;&#xA;4) FINALLY!! after these steps, we can create proposal_hash &amp; proposal_encoded!!!&#xD;&#xA;&#xD;&#xA;    `let proposal_hash = T::Hashing::hash_of(&amp;call_dispatch);`&#xD;&#xA;&#xD;&#xA;    `let proposal_encoded: Vec&lt;u8&gt; = call_dispatch.encode();`&#xD;&#xA;&#xD;&#xA;With these I can create a valid preimage, and the proposal is correctly enacted by Democracy pallet. HOWEVER, after spending days reading the democracy pallet tests and benchmarking, this wasn't the solution I was expecting, and I'm pretty confused. If anyone could provide some answers to the questions above...please? Question in the answer....&#xD;&#xA;&#xD;&#xA;### Edit1:&#xD;&#xA;Forgot to add the content of the call_dispatch function, which HAS TO use Root:&#xD;&#xA;&#xD;&#xA;    pub fn execute_call_dispatch(origin: OriginFor&lt;T&gt;, account_id: AccountIdOf&lt;T&gt;,	proposal: Box&lt;&lt;T as Config&gt;::Call&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    ensure_root(origin)?;&#xD;&#xA;    proposal.dispatch_bypass_filter(frame_system::RawOrigin::Signed(account_id.clone()).into()).ok();&#xD;&#xA;    Ok(().into())}&#xD;&#xA;&#xD;&#xA;Kazu&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23234" PostHistoryTypeId="2" PostId="6077" RevisionGUID="c0271eea-050b-4541-9409-2d3e437636de" CreationDate="2022-11-24T17:52:22.327" UserId="298" Text="Could you explain what is [GeneralKey][1] is for in MultiLocation ?&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Asset Name: Karura Native Token &#xD;&#xA;Asset Symbol:  KAR&#xD;&#xA;Decimals:  12&#xD;&#xA;existentialDeposit: 0.1&#xD;&#xA;Multiloaction: { parents: 1, interior: { X2: [ {Parachain: 2000}, {GeneralKey: 0x0080} ]}}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/8b9f5808a401dbf995f4f13b5e1a2ccb8df1b7a4/xcm/src/v1/junction.rs#L68" ContentLicense="CC BY-SA 4.0" />
  <row Id="23236" PostHistoryTypeId="1" PostId="6077" RevisionGUID="c0271eea-050b-4541-9409-2d3e437636de" CreationDate="2022-11-24T17:52:22.327" UserId="298" Text="What is GeneralKey used for in MultiLocation for XCM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23237" PostHistoryTypeId="3" PostId="6077" RevisionGUID="c0271eea-050b-4541-9409-2d3e437636de" CreationDate="2022-11-24T17:52:22.327" UserId="298" Text="|parachain|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23243" PostHistoryTypeId="2" PostId="6079" RevisionGUID="d2528e2f-86af-4ead-ba4b-cff1ec2989a8" CreationDate="2022-11-24T19:09:28.453" UserId="2762" Text="If you just have transaction hash, note that is not a [unique identifier][1] for a transaction in Polkadot, check this [answer][2].&#xD;&#xA;&#xD;&#xA;What you can do is a function with PolkadotJS that is [listening to the events][3] to see where your transactions has been included.&#xD;&#xA;&#xD;&#xA;Simple script:&#xD;&#xA;&#xD;&#xA;    // Subscribe to system events via storage&#xD;&#xA;    api.query.system.events((events) =&gt; {&#xD;&#xA;      console.log(`\nReceived ${events.length} events:`);&#xD;&#xA;&#xD;&#xA;      // Loop through the Vec&lt;EventRecord&gt;&#xD;&#xA;      events.forEach((record) =&gt; {&#xD;&#xA;        // Extract the phase, event and the event types&#xD;&#xA;        const { event, phase } = record;&#xD;&#xA;        const types = event.typeDef;&#xD;&#xA;        console.log(event.toHuman());&#xD;&#xA;      });&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;If as Oliver suggest you use signAndSend is easier, check [this answer][4] on StackExchange&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/3097/getting-from-addresses-by-passing-transaction-id-or-hash&#xD;&#xA;  [3]: https://polkadot.js.org/docs/api/examples/promise/system-events/&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/5832/get-block-hash-from-transfer-in-polkadot-js-api/5835#5835" ContentLicense="CC BY-SA 4.0" />
  <row Id="23246" PostHistoryTypeId="2" PostId="6080" RevisionGUID="99cc45ef-4a80-40fa-8d4a-b9fdcdce7823" CreationDate="2022-11-24T19:40:48.157" UserId="481" Text="`GeneralKey` refers to a general index that will be interpreted by the receiving chain to correspond to _something_, generally a Token.&#xD;&#xA;&#xD;&#xA;In the example you show, General Key `0x008` is the location of KAR on Karura. When Karura gets an XCM with that MultiLocation, it knows that you want to do something with KAR and not some other token. If you change the `GeneralKey` to something else, Karura will interpet that as corresponding to a different token.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Lets break down the MultiLocation:&#xD;&#xA;&#xD;&#xA;`parents: 1` means the chain has one parent, (which is Kusama)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`X2` means there are two junctions from that parent to get to the KAR token&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`Parachain: 2000` means the `Karura` parachain, which is assigned `id` 2000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`GeneralKey: 0x0080` is the index of the KAR token on Karura " ContentLicense="CC BY-SA 4.0" />
  <row Id="23248" PostHistoryTypeId="2" PostId="6081" RevisionGUID="ff3fe610-f018-4e5e-8b6a-b0e2af6ab4ee" CreationDate="2022-11-24T22:22:40.463" UserId="3114" Text="```&#xD;&#xA;% swanky --version&#xD;&#xA;@astar-network/swanky-cli/1.0.0-beta.4 darwin-x64 node-v16.4.0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- I used &quot;swanky cli&quot; to deploy the contract to swanky-node.&#xD;&#xA;```&#xD;&#xA;% swanky contract deploy flipper --gas 10000000000 --args false --account alice&#xD;&#xA;✔ Initialising OK&#xD;&#xA;✔ Getting WASM OK&#xD;&#xA;✔ Connecting to node OK&#xD;&#xA;✔ Deploying OK&#xD;&#xA;✔ Writing config OK&#xD;&#xA;Contract deployed!&#xD;&#xA;Contract address: 5EbFSCUyZvigPoYnRbQfqKPCANBEt35HauFD7Q1CLRY7BjK8&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- I want to call this contract using the &quot;swanky conatract call&quot; command.&#xD;&#xA;- When I call the &quot;swanky contract call&quot; command without the -t option, I get the following error.&#xD;&#xA;```&#xD;&#xA;% swanky contract call --contractName=flipper -m get -g 10000000000     &#xD;&#xA;ERROR: Module error: Contracts: ContractNotFound&#xD;&#xA;&#xD;&#xA;No contract was found at the specified address.&#xD;&#xA;    Error: Command failed: cargo contract call --contract 5E5Wf6XHHcqZr3wbeqJsVeh4E3aFYA7rgrJ34Yjyu8EZBTZ7 --message get  &#xD;&#xA;    --suri //Alice --gas 10000000000 --url ws://127.0.0.1:9944 &#xD;&#xA;```&#xD;&#xA;- I think I need to use the -t option to specify the contract I just deployed, but I don't know how to specify it.&#xD;&#xA;- Looking at the standard out of swanky node, I can't find anything that looks like a timestamp.&#xD;&#xA;- Can you tell me the correct way to specify this parameter?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23250" PostHistoryTypeId="1" PostId="6081" RevisionGUID="ff3fe610-f018-4e5e-8b6a-b0e2af6ab4ee" CreationDate="2022-11-24T22:22:40.463" UserId="3114" Text="How to find &quot;deploymentTimeStamp&quot; which use when I will execute the command &quot;swanky call&quot; with swanky-cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="23251" PostHistoryTypeId="3" PostId="6081" RevisionGUID="ff3fe610-f018-4e5e-8b6a-b0e2af6ab4ee" CreationDate="2022-11-24T22:22:40.463" UserId="3114" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23252" PostHistoryTypeId="2" PostId="6082" RevisionGUID="b8124384-efc9-499d-ae58-f1e9f7106b3a" CreationDate="2022-11-24T22:47:38.480" UserId="3114" Text="- I found a destination for timestamps on deploy.&#xD;&#xA;- It's &quot;swanky.config.json&quot;!&#xD;&#xA;- Each time I deploy it adds a contract address and a timestamp." ContentLicense="CC BY-SA 4.0" />
  <row Id="23254" PostHistoryTypeId="5" PostId="6068" RevisionGUID="35e08ec8-296c-4b1b-ad6d-09fa69930751" CreationDate="2022-11-25T02:15:04.190" UserId="3474" Comment="deleted 6 characters in body" Text="Good day, everyone!  &#xD;&#xA;&#xD;&#xA;I'm running an Astar validator node.  &#xD;&#xA;When I upgraded the version from v4.23.0 to v4.33.0, an error occurred.  &#xD;&#xA;```bash&#xD;&#xA;2022-11-24 02:06:57 Astar Collator&#xD;&#xA;2022-11-24 02:06:57 :vサイン:  version 4.33.0-9b953e5dafb&#xD;&#xA;2022-11-24 02:06:57 :ハート:  by Stake Technologies &lt;devops@stake.co.jp&gt;, 2019-2022&#xD;&#xA;2022-11-24 02:06:57 :クリップボード: Chain specification: Astar&#xD;&#xA;2022-11-24 02:06:57 :ラベルタグ:  Node name: astar&#xD;&#xA;2022-11-24 02:06:57 :上半身シルエット_1: Role: AUTHORITY&#xD;&#xA;2022-11-24 02:06:57 :フロッピーディスク: Database: RocksDb at /data/chains/astar/db/full&#xD;&#xA;2022-11-24 02:06:57 :鎖:  Native runtime: astar-43 (astar-0.tx2.au1)&#xD;&#xA;2022-11-24 02:06:58 Parachain id: Id(2006)&#xD;&#xA;2022-11-24 02:06:58 Parachain Account: 5Ec4AhPW97z4ZyYkd3mYkJrSeZWcwVv4wiANES2QrJi1x17F&#xD;&#xA;2022-11-24 02:06:58 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000de2e3567ab0b52f4d9bca7efadf6e7b&#xD;&#xA;fe0f453c356d0a7962e4227cfaefe5ab403170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400&#xD;&#xA;2022-11-24 02:06:58 Is collating: yes&#xD;&#xA;2022-11-24 02:06:58 [Parachain] :ハンマー: Running Frontier DB migration from version 1 to version 2. Please wait.&#xD;&#xA;====================&#xD;&#xA;Version: 4.33.0-9b953e5dafb&#xD;&#xA;   0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at rustc/93ffde6f04d3d24327a4e17a2a2bf4f63c246235/library/std/src/panicking.rs:702:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at rustc/93ffde6f04d3d24327a4e17a2a2bf4f63c246235/library/std/src/panicking.rs:588:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at rustc/93ffde6f04d3d24327a4e17a2a2bf4f63c246235/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at rustc/93ffde6f04d3d24327a4e17a2a2bf4f63c246235/library/std/src/panicking.rs:584:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at rustc/93ffde6f04d3d24327a4e17a2a2bf4f63c246235/library/core/src/panicking.rs:142:14&#xD;&#xA;   6: astar_collator::rpc::open_frontier_backend&#xD;&#xA;   7: astar_collator::parachain::service::start_node_impl::{{closure}}&#xD;&#xA;   8: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;   9: sc_cli::走る人::Runner&lt;C&gt;::run_node_until_exit&#xD;&#xA;  10: astar_collator::command::run&#xD;&#xA;  11: astar_collator::main&#xD;&#xA;  12: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  13: std::rt::lang_start::{{closure}}&#xD;&#xA;  14: main&#xD;&#xA;  15: __libc_start_main&#xD;&#xA;  16: _start&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Parameters are set as follows.  &#xD;&#xA;```bash&#xD;&#xA;- args:&#xD;&#xA;        - '--collator'&#xD;&#xA;        - '--name'&#xD;&#xA;        - astar&#xD;&#xA;        - '--chain'&#xD;&#xA;        - astar&#xD;&#xA;        - '--base-path'&#xD;&#xA;        - /data&#xD;&#xA;        - '--rpc-cors'&#xD;&#xA;        - all&#xD;&#xA;        - '--unsafe-rpc-external'&#xD;&#xA;        - '--execution'&#xD;&#xA;        - wasm&#xD;&#xA;        - '--trie-cache-size'&#xD;&#xA;        - '1'&#xD;&#xA;        - '--telemetry-url'&#xD;&#xA;        - 'wss://telemetry.polkadot.io/submit/ 0'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any advice would be appreciated.  &#xD;&#xA;Best regerd!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="23255" PostHistoryTypeId="2" PostId="6083" RevisionGUID="5d367ec0-9b24-4abf-a159-019ec24fe0ea" CreationDate="2022-11-25T02:49:42.590" UserId="1959" Text="&gt; [GeneralKey][1]: Usage will vary widely owing to its generality.&#xD;&#xA;&#xD;&#xA;So it may have different meanings on different chains. And here, @insipx is right. &#xD;&#xA;&#xD;&#xA;Then, you could find the location from the chain state of assets related pallets on other chains. &#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;**In karura:**&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;**In Khala:**&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;**In Moonriver:**&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/xcm/src/v1/junction.rs#L68&#xD;&#xA;  [2]: https://i.stack.imgur.com/Otpk0.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/GQitj.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/viYtq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23258" PostHistoryTypeId="2" PostId="6084" RevisionGUID="4a64062b-2012-4a4c-a6ba-e579b8b07613" CreationDate="2022-11-25T08:22:35.737" UserId="379" Text="Running the example on https://github.com/paritytech/smoldot and I added our chainspec in `bin/` and also added an entry here: https://github.com/paritytech/smoldot/blob/dd27ec825145f75b67ca6bd1d737dc7d7bf03fad/bin/wasm-node/javascript/demo/demo.mjs#L36&#xD;&#xA;&#xD;&#xA;I get the following output when trying to connect to our chain over the websocket served by the example:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[16:03:59.568] [smoldot] Chain initialization complete for tfchain_devnet. Name: &quot;TF Chain Devnet&quot;. Genesis hash: 0xbb7f…66be. State root hash: 0x6a2e10fffcd6d5ffb97ad5a52d89a9cd9681fc6ce59cd4cc9780d201b1b54030. Network identity: 12D3KooWMFHBBUN6X97XJeSHLiBDuXPJcroC329S9RJgmTbovvL4. Chain specification or database starting at: 0xbb7f…66be (#0)&#xD;&#xA;[16:03:59.570] [json-rpc-tfchain_devnet] The JSON-RPC client has just called a JSON-RPC function from the legacy JSON-RPC API (chain_getBlockHash). Legacy JSON-RPC functions have loose semantics and cannot be properly implemented on a light client. You are encouraged to use the new JSON-RPC API &lt;https://github.com/paritytech/json-rpc-interface-spec/&gt; instead. The legacy JSON-RPC API functions will be deprecated and removed in the distant future.&#xD;&#xA;[16:04:09.568] [sync-service-tfchain_devnet] GrandPa warp sync idle&#xD;&#xA;[16:04:09.664] [runtime-tfchain_devnet] Successfully compiled runtime. Spec version: 49. Size of `:code`: 906 kiB.&#xD;&#xA;[16:04:18.921] [smoldot] Smoldot v0.7.8. Current memory usage: 157 MiB. Average download: 2.7 MiB/s. Average upload: 6.2 kiB/s.&#xD;&#xA;[16:04:19.568] [sync-service-tfchain_devnet] GrandPa warp sync idle&#xD;&#xA;[16:04:29.568] [sync-service-tfchain_devnet] GrandPa warp sync idle&#xD;&#xA;[16:04:39.568] [sync-service-tfchain_devnet] GrandPa warp sync idle&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23260" PostHistoryTypeId="1" PostId="6084" RevisionGUID="4a64062b-2012-4a4c-a6ba-e579b8b07613" CreationDate="2022-11-25T08:22:35.737" UserId="379" Text="Unable to connect smoldot to our chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="23261" PostHistoryTypeId="3" PostId="6084" RevisionGUID="4a64062b-2012-4a4c-a6ba-e579b8b07613" CreationDate="2022-11-25T08:22:35.737" UserId="379" Text="|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23267" PostHistoryTypeId="2" PostId="6086" RevisionGUID="a0002574-a136-4ceb-84a5-daf4199cab23" CreationDate="2022-11-25T09:40:33.463" UserId="3122" Text="I am working on Substrate-based node upgrades for solo-chain.&#xD;&#xA;&#xD;&#xA;I stick to Polkadot releases and during the upgrade from [polkadot-release-v0.8.27](https://github.com/paritytech/substrate/tree/polkadot-release-v0.8.27) to [polkadot-v0.8.28](https://github.com/paritytech/substrate/tree/polkadot-v0.8.28) I found a [storage migration](https://github.com/paritytech/substrate/pull/7040/files#diff-3acd0cb73093b0cc01acfd0dc5646b31a309e57526f18d67d7e9d8708c325dbbR96). This migration has two parameters `old_voter_bond` and `old_candidacy_bond`.  I don’t understand what the migration does but according to the parameters names, it looks like I should pass values of [VotingBond](https://github.com/paritytech/polkadot/pull/1719/files#diff-db5840c3c03c740de25aed56b9257559c224a04619c079c94cddbb23f9a855a4L477) and [CandidacyBond](https://github.com/paritytech/polkadot/pull/1719/files#diff-db5840c3c03c740de25aed56b9257559c224a04619c079c94cddbb23f9a855a4R476). But in Polkadot repository this migration [called](https://github.com/paritytech/polkadot/pull/1719/files#diff-db5840c3c03c740de25aed56b9257559c224a04619c079c94cddbb23f9a855a4R958) with the arguments values 100 time lower.&#xD;&#xA;&#xD;&#xA;The questions:&#xD;&#xA;1. How to choose the correct arguments values to pass into the migration?&#xD;&#xA;2. Can I switch from the [hardcoded value for VotingBondFactor](https://github.com/Cerebellum-Network/pos-network-node/pull/124/files#diff-67684005af418e25ff88c2ae5b520f0c040371f1d817e03a3652e76b9485224aR590) to [deposit(X, Y)](https://github.com/paritytech/polkadot/pull/1719/files#diff-db5840c3c03c740de25aed56b9257559c224a04619c079c94cddbb23f9a855a4R480) in later versions?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23269" PostHistoryTypeId="1" PostId="6086" RevisionGUID="a0002574-a136-4ceb-84a5-daf4199cab23" CreationDate="2022-11-25T09:40:33.463" UserId="3122" Text="Elections phragmen migration" ContentLicense="CC BY-SA 4.0" />
  <row Id="23270" PostHistoryTypeId="3" PostId="6086" RevisionGUID="a0002574-a136-4ceb-84a5-daf4199cab23" CreationDate="2022-11-25T09:40:33.463" UserId="3122" Text="|storage|runtime-upgrade|migration|pallet-election-phragmen|election-phragmen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23271" PostHistoryTypeId="2" PostId="6087" RevisionGUID="8f01a951-1bcb-44a5-b923-63545f9e8a26" CreationDate="2022-11-25T10:18:55.240" UserId="3304" Text="Is it possible to connect hyperledger fabric to relaychain as one of the parachain...&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23273" PostHistoryTypeId="1" PostId="6087" RevisionGUID="8f01a951-1bcb-44a5-b923-63545f9e8a26" CreationDate="2022-11-25T10:18:55.240" UserId="3304" Text="Add hyperledger Fabric as a parachain to relaychain in polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="23274" PostHistoryTypeId="3" PostId="6087" RevisionGUID="8f01a951-1bcb-44a5-b923-63545f9e8a26" CreationDate="2022-11-25T10:18:55.240" UserId="3304" Text="|polkadot|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23275" PostHistoryTypeId="2" PostId="6088" RevisionGUID="b030394d-11de-4d5c-aec7-e1bf906f331b" CreationDate="2022-11-25T10:27:19.267" UserId="3517" Text="First, I have looked at several previous posts regarding similar build errors but have yet to get the substrate template to build locally successfully. The exact error I encounter is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `librocksdb-sys v0.8.0+7.4.4`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/brandon/workspace/substrate-node-template/target/release/build/librocksdb-sys-c7956af65347884b/build-script-build` (exit status: 101)&#xD;&#xA;  --- stderr&#xD;&#xA;  thread 'main' panicked at '&quot;enum_(unnamed_at_rocksdb/include/rocksdb/c_h_981_1)&quot; is not a valid Ident', /home/brandon/.cargo/registry/src/GitHub.com-1ecc6299db9ec823/proc-macro2-1.0.47/src/fallback.rs:756:9&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I do have clang and llvm installed. I have even compiled clang + llvm from sources and installed them on the computer in an attempt to make sure the build system should work. I have the `librocksdb-dev` package installed as well. I am running on Debian Sid and have followed all the steps in the Linux Development Environment guide.&#xD;&#xA;&#xD;&#xA;The output of `rustup +nightly show`:&#xD;&#xA;```&#xD;&#xA;Default host: x86_64-unknown-Linux-gnu&#xD;&#xA;rustup home:  /home/brandon/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-Linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-Linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-x86_64-unknown-Linux-gnu (overridden by +toolchain on the command line)&#xD;&#xA;rustic 1.67.0-nightly (b3bc6bf31 2022-11-24)&#xD;&#xA;```&#xD;&#xA;I noticed some people reported issues with the M1 processor; However, I am running a 12900K Intel Processor, so I doubt that is the issue.&#xD;&#xA;&#xD;&#xA;I have entirely uninstalled `librocksdb-dev` `llvm` `clang` and even  `rust` and then reinstalled them. I am unsure how to continue as I am brand new to the substrate platform. " ContentLicense="CC BY-SA 4.0" />
  <row Id="23277" PostHistoryTypeId="1" PostId="6088" RevisionGUID="b030394d-11de-4d5c-aec7-e1bf906f331b" CreationDate="2022-11-25T10:27:19.267" UserId="3517" Text="Unable to compile substrate template `error: failed to run custom build command for `librocksdb-sys v0.8.0+7.4.4`" ContentLicense="CC BY-SA 4.0" />
  <row Id="23278" PostHistoryTypeId="3" PostId="6088" RevisionGUID="b030394d-11de-4d5c-aec7-e1bf906f331b" CreationDate="2022-11-25T10:27:19.267" UserId="3517" Text="|substrate-node-template|build|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23280" PostHistoryTypeId="2" PostId="6089" RevisionGUID="77e454ca-32b6-4f80-bd16-7ea10357afb6" CreationDate="2022-11-25T18:47:56.767" UserId="481" Text="thanks for the responses&#xD;&#xA;&#xD;&#xA;The reason this transfer was not working in this case, is because the _sibling parachain_ account was not created. I had mistakenly assumed that the parachain _relay_ sovereign account is the same on siblings and the relay chain. However, on _sibling_ chains, the MultiLocation for the sibling account is:&#xD;&#xA;&#xD;&#xA;`{ parents: 1, X1(Parachain(SiblingID) }`&#xD;&#xA;&#xD;&#xA;and on the relay:&#xD;&#xA;&#xD;&#xA;`{ parents: 0, X1(Parachain(SiblingId) }`&#xD;&#xA;&#xD;&#xA;So when these are converted to AccountID32, they are different accounts.&#xD;&#xA;&#xD;&#xA;The PolkadotJS UI does not recognize this &quot;Sibling Parachain account&quot; as the sovereign account of the parachain, instead it labels the relay sovereign account as the sovereign account. So I had assumed I had the right account when I did not.&#xD;&#xA;&#xD;&#xA;Therefore, transferring DOT to the sibling Parachain account, or using `assets.touch(1984)` (@Lohann DM'ed me this solution too) for Sibling Account (which I tried, got a decode error, and it is easier to just transfer tokens) &quot;created&quot; the account, and the transfer went through successfully with the XCM call I posted earlier. That would be the missing piece to transferring assets with assets not labeled as sufficient.&#xD;&#xA;&#xD;&#xA;This should work for USDt when it is not sufficient and other not sufficient assets." ContentLicense="CC BY-SA 4.0" />
  <row Id="23282" PostHistoryTypeId="5" PostId="6089" RevisionGUID="e4515c22-bd2a-4c6b-be83-f34678702b73" CreationDate="2022-11-25T18:57:34.467" UserId="481" Comment="added 187 characters in body" Text="thanks for the responses&#xD;&#xA;&#xD;&#xA;The reason this transfer was not working in this case, is because the _sibling parachain_ account was not created. I had mistakenly assumed that the parachain _relay_ sovereign account is the same on siblings and the relay chain. However, on _sibling_ chains, the MultiLocation for the sibling account is:&#xD;&#xA;&#xD;&#xA;`{ parents: 1, X1(Parachain(SiblingID) }`&#xD;&#xA;&#xD;&#xA;and on the relay:&#xD;&#xA;&#xD;&#xA;`{ parents: 0, X1(Parachain(SiblingId) }`&#xD;&#xA;&#xD;&#xA;So when these are converted to AccountID32, they are different accounts.&#xD;&#xA;&#xD;&#xA;The PolkadotJS UI does not recognize this &quot;Sibling Parachain account&quot; as the sovereign account of the parachain, instead it labels the relay sovereign account as the sovereign account. So I had assumed I had the right account when I did not.&#xD;&#xA;&#xD;&#xA;Therefore, transferring DOT to the sibling Parachain account, or using `assets.touch(1984)` (@Lohann DM'ed me this solution too) for Sibling Account (which I tried, got a decode error, and it is easier to just transfer tokens) &quot;created&quot; the account, and the transfer went through successfully with the XCM call I posted earlier. That would be the missing piece to transferring assets with assets not labeled as sufficient.&#xD;&#xA;&#xD;&#xA;This should work for USDt when it is not sufficient and other not sufficient assets.&#xD;&#xA;&#xD;&#xA;Admittedly, this would have been difficult to gather from the original stackexchange post, as i did not screenshot the AccountID data, I did not believe it to be necessary at the time" ContentLicense="CC BY-SA 4.0" />
  <row Id="23283" PostHistoryTypeId="50" PostId="3412" RevisionGUID="3acbf6ae-6dff-46d3-a1eb-e35084932f42" CreationDate="2022-11-25T20:07:40.947" UserId="-1" />
  <row Id="23284" PostHistoryTypeId="5" PostId="6069" RevisionGUID="75a45c46-64f3-4573-a5ad-87396d63f585" CreationDate="2022-11-25T21:45:06.183" UserId="481" Comment="added 17 characters in body" Text="Ran into an issue transferring a statemine token (ex: USDt) on a local testnet with rococo-local and statemine-local. I'm trying to transfer USDt to a sibling parachain, but it fails on the statemine side, with `Account cannot be created`. It seems to come from [this part of the code in `pallet-assets`][1]. For convenience, [`can_inc_consumer`][2] &#xD;&#xA;&#xD;&#xA;This call works if `USDt` is made to be `isSufficient` on statemine-local, however that is not the case for production, or other assets.&#xD;&#xA;&#xD;&#xA;There are native UNITS in the sovereign account of the parachain I am trying to transfer to. &#xD;&#xA;[![system_parachain_sovereign_account_info][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried to mirror the USDt deployed on Statemine, although minted a whole bunch of it:&#xD;&#xA;[![local USDt token][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am using a `limitedReserveTransferAssets` call, encoded data:&#xD;&#xA;`0x1f0801010100951f0100010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0104000002043205011f000700e87648170000000000`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Statemine is on `9290`. There is a (bug?) which results in `UnweighableMessage` if using the normal `reserveTransferAssets` as described [here][5], which is the reason behind `limitedReserveTransferAssets`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Logs of the XCM Execution:&#xD;&#xA;```&#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::weight: [Parachain] WeightInfoBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }, xcm: Xcm([]) }])    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::weight: [Parachain] WeightInfoBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, weight_limit: Unlimited }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]) }])    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, weight_limit: Unlimited }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]) }]), weight_limit: 654404000, weight_credit: 654404000    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::weight: [Parachain] WeightInfoBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, weight_limit: Unlimited }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]) }])    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::barriers: [Parachain] TakeWeightCredit origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, weight_limit: Unlimited }, DepositAsset { assets: Wild(All), max_assets: 1, beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Any, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]) }]), max_weight: 654404000, weight_credit: 654404000    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::execute: [Parachain] origin: Some(MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), total_surplus/refunded: 0/0, error_handler_weight: 0    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::currency_adapter: [Parachain] internal_transfer_asset asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, from: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, to: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::fungibles_adapter: [Parachain] internal_transfer_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(100000000) }, from: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, to: MultiLocation { parents: 1, interior: X1(Parachain(2021)) }    &#xD;&#xA;2022-11-23 19:41:12.091 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 0, xcm_error: FailedToTransactAsset(&quot;Account cannot be created&quot;), weight: 0 })    &#xD;&#xA;2022-11-23 19:41:12.091 DEBUG tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] Execution errored at 0: FailedToTransactAsset(&quot;Account cannot be created&quot;) (original_origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Polkadot, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) })    &#xD;&#xA;2022-11-23 19:41:12.091 DEBUG tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] [0xd6ea01cd2d378517b78a7ad42da163a0a559c3384c6745582e6451f1b9915c42] Pushed to the block.    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/08d1b2c7846f0280aa57dc1145a2c631b12c0789/frame/assets/src/functions.rs#L135&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L1203&#xD;&#xA;  [3]: https://i.stack.imgur.com/qvQRS.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/JCljP.png&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5393/is-teleport-of-roc-from-rockmine-to-my-parachain-should-be-used-instead-of-reser" ContentLicense="CC BY-SA 4.0" />
  <row Id="23285" PostHistoryTypeId="2" PostId="6090" RevisionGUID="d5370516-b08c-46d4-ad8f-b08cf76be659" CreationDate="2022-11-25T22:39:01.693" UserId="629" Text="Smoldot light client can run as a Javascript node script. In Smoldot's (Substrate light client) repo (https://github.com/paritytech/smoldot#wasm-light-node) you can find the way to run a light client locally, and open app the polkadotJS apps with your local light client.&#xD;&#xA;&#xD;&#xA;As a prerequisite I'd say you need node or deno installed in your machine..." ContentLicense="CC BY-SA 4.0" />
  <row Id="23287" PostHistoryTypeId="2" PostId="6091" RevisionGUID="df7f4a93-a08c-42c5-a8d6-5649bb267dd9" CreationDate="2022-11-25T22:48:21.910" UserId="629" Text="FWIW it is not possible to &quot;integrate the substrate-connect light client extension into our application&quot; - I assume that you mean to integrate substrate-connect into your application. &#xD;&#xA;&#xD;&#xA;Having said that, from the little logs I see there it seems like the light client you are running is yet not synchronized as there are no Peers running. That probably means that the chain you try to connect to has no bootnodes available in its chainspec, the chain [is not running with socket listening](https://github.com/paritytech/devops/issues/1593) and/or the chain has no [TLS certificate](https://github.com/paritytech/devops/issues/2093) behind it. I have added links to 2 github issues that refer to the last 2 cases I mentioned.&#xD;&#xA;&#xD;&#xA;The latter one (TLS certificate) will not be needed once Light client starts to support the [WebRtc protocol](https://webrtc.org/).&#xD;&#xA;&#xD;&#xA;P.S. FYI in substrate-connect's repo exists a demo project that connects to a parachain, and you can find it [here](https://github.com/paritytech/substrate-connect/tree/main/projects/demo) - maybe it can help you with your project." ContentLicense="CC BY-SA 4.0" />
  <row Id="23289" PostHistoryTypeId="2" PostId="6092" RevisionGUID="9e3e3431-48cc-4ab9-9666-c9979640624b" CreationDate="2022-11-25T23:14:55.127" UserId="3114" Text=" - I was developing a contract on EVM on Shibuya, Astar Network's testnet.&#xD;&#xA; - I'm using hardhat.&#xD;&#xA; - We successfully deployed to Shibuya testnet and Shiden network using the following settings.&#xD;&#xA; - But it doesn't work well with Astar Network.&#xD;&#xA;```&#xD;&#xA;import { HardhatUserConfig } from &quot;hardhat/config&quot;;&#xD;&#xA;import &quot;@nomicfoundation/hardhat-toolbox&quot;;&#xD;&#xA;&#xD;&#xA;const { privateKey } = require('./private.json');&#xD;&#xA;&#xD;&#xA;const config: HardhatUserConfig = {&#xD;&#xA;  solidity: &quot;0.8.9&quot;,&#xD;&#xA;  networks: {&#xD;&#xA;    localhost: {&#xD;&#xA;      url:&quot;http://localhost:8545&quot;,&#xD;&#xA;      chainId:31337,&#xD;&#xA;      accounts: [privateKey]&#xD;&#xA;    },&#xD;&#xA;    shibuya: {&#xD;&#xA;      url:&quot;https://shibuya.public.blastapi.io&quot;,&#xD;&#xA;      chainId:81,&#xD;&#xA;      accounts: [privateKey]&#xD;&#xA;    },&#xD;&#xA;    shiden: {&#xD;&#xA;      url:&quot;https://shiden.public.blastapi.io&quot;,&#xD;&#xA;      chainId:336,&#xD;&#xA;      accounts: [privateKey],&#xD;&#xA;    },&#xD;&#xA;    astar: {&#xD;&#xA;      url:&quot;https://astar-rpc.dwellir.com&quot;,&#xD;&#xA;      chainId:592,&#xD;&#xA;      accounts: [privateKey]&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;export default config;&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23291" PostHistoryTypeId="1" PostId="6092" RevisionGUID="9e3e3431-48cc-4ab9-9666-c9979640624b" CreationDate="2022-11-25T23:14:55.127" UserId="3114" Text="How to set gasPrice using hardhat in EVM smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="23292" PostHistoryTypeId="3" PostId="6092" RevisionGUID="9e3e3431-48cc-4ab9-9666-c9979640624b" CreationDate="2022-11-25T23:14:55.127" UserId="3114" Text="|evm|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23293" PostHistoryTypeId="2" PostId="6093" RevisionGUID="8dd5441b-a00f-4bd6-83a7-d17e0b32c1d0" CreationDate="2022-11-25T23:14:55.127" UserId="3114" Text=" - I asked a core team engineer how to work around this issue.&#xD;&#xA; - There's a way to use the API to get gas, and a way to let hardhat do it.&#xD;&#xA;&#xD;&#xA;API: https://docs.astar.network/docs/integrations/api/gas_api/#api&#xD;&#xA;&#xD;&#xA;sample settings:&#xD;&#xA;```&#xD;&#xA;import { HardhatUserConfig } from &quot;hardhat/config&quot;;&#xD;&#xA;import &quot;@nomicfoundation/hardhat-toolbox&quot;;&#xD;&#xA;&#xD;&#xA;const { privateKey } = require('./private.json');&#xD;&#xA;&#xD;&#xA;const config: HardhatUserConfig = {&#xD;&#xA;  solidity: &quot;0.8.9&quot;,&#xD;&#xA;  networks: {&#xD;&#xA;    localhost: {&#xD;&#xA;      url:&quot;http://localhost:8545&quot;,&#xD;&#xA;      chainId:31337,&#xD;&#xA;      accounts: [privateKey],&#xD;&#xA;      gasPrice: &quot;auto&quot;&#xD;&#xA;    },&#xD;&#xA;    shibuya: {&#xD;&#xA;      url:&quot;https://shibuya.public.blastapi.io&quot;,&#xD;&#xA;      chainId:81,&#xD;&#xA;      accounts: [privateKey],&#xD;&#xA;      gasPrice: &quot;auto&quot;&#xD;&#xA;    },&#xD;&#xA;    shiden: {&#xD;&#xA;      url:&quot;https://shiden.public.blastapi.io&quot;,&#xD;&#xA;      chainId:336,&#xD;&#xA;      accounts: [privateKey],&#xD;&#xA;    },&#xD;&#xA;    astar: {&#xD;&#xA;      url:&quot;https://astar-rpc.dwellir.com&quot;,&#xD;&#xA;      chainId:592,&#xD;&#xA;      accounts: [privateKey],&#xD;&#xA;      gasPrice: 4000000000&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;export default config;&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23295" PostHistoryTypeId="5" PostId="6089" RevisionGUID="7c9df025-e6e3-4e07-94f4-a8e671bddd5f" CreationDate="2022-11-25T23:26:58.533" UserId="481" Comment="clarity" Text="thanks for the responses&#xD;&#xA;&#xD;&#xA;The reason this transfer was not working in this case, is because the _sibling parachain_ account was not created. I had mistakenly assumed that the parachain _relay_ sovereign account is the same on siblings and the relay chain. However, on _sibling_ chains, the MultiLocation for the sovereign parachain account is:&#xD;&#xA;&#xD;&#xA;`{ parents: 1, X1(Parachain(SiblingID) }`&#xD;&#xA;&#xD;&#xA;and on the relay:&#xD;&#xA;&#xD;&#xA;`{ parents: 0, X1(Parachain(SiblingId) }`&#xD;&#xA;&#xD;&#xA;So when these are converted to AccountID32, they are different accounts.&#xD;&#xA;&#xD;&#xA;The PolkadotJS UI does not recognize this &quot;Sibling Parachain account&quot; as the sovereign account of the parachain, instead it labels the relay sovereign account as the sovereign account. So I had assumed I had the right account when I did not.&#xD;&#xA;&#xD;&#xA;Therefore, transferring DOT to the sibling Parachain account, or using `assets.touch(1984)` (@Lohann DM'ed me this solution too) for Sibling Account (which I tried, got a decode error, and it is easier to just transfer tokens) &quot;created&quot; the account, and the transfer went through successfully with the XCM call I posted earlier. That would be the missing piece to transferring assets with assets not labeled as sufficient.&#xD;&#xA;&#xD;&#xA;This should work for USDt when it is not sufficient and other not sufficient assets.&#xD;&#xA;&#xD;&#xA;Admittedly, this would have been difficult to gather from the original stackexchange post, as i did not screenshot the AccountID data, I did not believe it to be necessary at the time" ContentLicense="CC BY-SA 4.0" />
  <row Id="23296" PostHistoryTypeId="5" PostId="6089" RevisionGUID="38dcfda1-aaf2-4a5e-8997-38b046843559" CreationDate="2022-11-26T07:57:21.780" UserId="481" Comment="deleted 4 characters in body" Text="thanks for the responses&#xD;&#xA;&#xD;&#xA;The reason this transfer was not working in this case, is because the _sibling parachain_ account was not created. I had mistakenly assumed that the parachain relay sovereign account is the same on siblings and the relay chain. However, on sibling chains, the MultiLocation for the sovereign parachain account is:&#xD;&#xA;&#xD;&#xA;`{ parents: 1, X1(Parachain(SiblingID) }`&#xD;&#xA;&#xD;&#xA;and on the relay:&#xD;&#xA;&#xD;&#xA;`{ parents: 0, X1(Parachain(SiblingId) }`&#xD;&#xA;&#xD;&#xA;So when these are converted to AccountID32, they are different accounts.&#xD;&#xA;&#xD;&#xA;The PolkadotJS UI does not recognize this &quot;Sibling Parachain account&quot; as the sovereign account of the parachain, instead it labels the relay sovereign account as the sovereign account. So I had assumed I had the right account when I did not.&#xD;&#xA;&#xD;&#xA;Therefore, transferring DOT to the sibling Parachain account, or using `assets.touch(1984)` (@Lohann DM'ed me this solution too) for Sibling Account (which I tried, got a decode error, and it is easier to just transfer tokens) &quot;created&quot; the account, and the transfer went through successfully with the XCM call I posted earlier. That would be the missing piece to transferring assets with assets not labeled as sufficient.&#xD;&#xA;&#xD;&#xA;This should work for USDt when it is not sufficient and other not sufficient assets.&#xD;&#xA;&#xD;&#xA;Admittedly, this would have been difficult to gather from the original stackexchange post, as i did not screenshot the AccountID data, I did not believe it to be necessary at the time" ContentLicense="CC BY-SA 4.0" />
  <row Id="23297" PostHistoryTypeId="2" PostId="6094" RevisionGUID="14a563bc-e69a-43bd-b49e-e92b5bd18df8" CreationDate="2022-11-26T08:08:58.030" UserId="2668" Text="for example&#xD;&#xA;the blockchain is upgraded at 1000 height(including systems code updates event), and I need to decode the storage data by metadata at 1000 height, which metadata do I need to use,  is it the latest one? or the old metadata of 999 height?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23299" PostHistoryTypeId="1" PostId="6094" RevisionGUID="14a563bc-e69a-43bd-b49e-e92b5bd18df8" CreationDate="2022-11-26T08:08:58.030" UserId="2668" Text="When the blockchain upgrades the runtime, the upgraded height uses which metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23300" PostHistoryTypeId="3" PostId="6094" RevisionGUID="14a563bc-e69a-43bd-b49e-e92b5bd18df8" CreationDate="2022-11-26T08:08:58.030" UserId="2668" Text="|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23303" PostHistoryTypeId="2" PostId="6096" RevisionGUID="de2bc936-7580-43ab-a715-b91ff695f9bf" CreationDate="2022-11-26T09:49:05.487" UserId="73" Text="If you do the upgrade at block 1000, aka setting the `:code` storage item, the new runtime will be used for building block 1001.&#xD;&#xA;&#xD;&#xA;There is actually an open [issue][1] about this topic, as the block that sets the storage item isn't running potential migrations directly. So, you currently get the &quot;wrong&quot; metadata when querying block 1000. Substrate will already return you the metadata of the new runtime while it should return the metadata of the old runtime.&#xD;&#xA;&#xD;&#xA;So to your question, to decode items at height 1000, you should use the metadata of height 999.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/9997" ContentLicense="CC BY-SA 4.0" />
  <row Id="23307" PostHistoryTypeId="52" PostId="6094" RevisionGUID="0773d669-20ba-4eec-9bf0-74de08c97854" CreationDate="2022-11-26T16:09:12.823" />
  <row Id="23308" PostHistoryTypeId="2" PostId="6097" RevisionGUID="9ea797c5-9586-4e60-ac29-b218238cbe14" CreationDate="2022-11-26T16:18:47.477" UserId="2163" Text="I am trying to understand the usage of the `translate` function that is frequently used when writing migrations.&#xD;&#xA;&#xD;&#xA;Is this function only being used to do changes to some existing storage values(I don't think so since why would it be different than the `map` function)?&#xD;&#xA;For example, iterating through a `StorageMap` of `u32`s and increasing the values by 1.&#xD;&#xA;Or is it also possible to use this function to adapt the data for the new type that is being stored for example in a `StorageMap`?&#xD;&#xA;And if so how could something like that be achieved?&#xD;&#xA;&#xD;&#xA;I haven't found any detailed documentation about this." ContentLicense="CC BY-SA 4.0" />
  <row Id="23310" PostHistoryTypeId="1" PostId="6097" RevisionGUID="9ea797c5-9586-4e60-ac29-b218238cbe14" CreationDate="2022-11-26T16:18:47.477" UserId="2163" Text="Substrate `translate` function" ContentLicense="CC BY-SA 4.0" />
  <row Id="23311" PostHistoryTypeId="3" PostId="6097" RevisionGUID="9ea797c5-9586-4e60-ac29-b218238cbe14" CreationDate="2022-11-26T16:18:47.477" UserId="2163" Text="|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23312" PostHistoryTypeId="2" PostId="6098" RevisionGUID="ddc67808-b383-47b6-ba5f-b8ff13223592" CreationDate="2022-11-26T17:46:29.600" UserId="94" Text="`translate`, as compare to `mutate` or `map`, can be used to *translate* values between types.  &#xD;&#xA;It is sometimes used in storage migration exactly for that possibility.   &#xD;&#xA;&#xD;&#xA;Imagine a scenario like this:  &#xD;&#xA;- There is a pallet which stores `OldInfo` in a `StorageMap` called `MyMap`&#xD;&#xA;- Now a migration should *translate* all `OldInfo` into `NewInfo` in that map&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;MyMap::translate::&lt;OldInfo, _&gt;(|_key, old| -&gt; Option&lt;NewInfo&gt; {&#xD;&#xA;    Some(old.to_new_format())&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;Would archive this.&#xD;&#xA;&#xD;&#xA;I personally never use `translate` since it has a flaw. From the docs:  &#xD;&#xA;&gt; NOTE: If a value fail to decode because storage is corrupted then it is skipped.&#xD;&#xA;&#xD;&#xA;This means that if you have a type error in your migration by providing a faulty old type, it will just do nothing and carry over these old values **silently**.  &#xD;&#xA;This is easier to mess up when using `storage_alias`.  &#xD;&#xA;&#xD;&#xA;It is probably a good idea in any case to check that all values still decode in the post-migration hook:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert_eq!(MyMap::iter_values().count(), number_of_decodable_elements);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23314" PostHistoryTypeId="5" PostId="6098" RevisionGUID="14d51555-6f76-432b-974c-f95041b3ba55" CreationDate="2022-11-26T21:52:30.283" UserId="94" Comment="edited body" Text="`translate`, as opposed to `mutate` or `map`, can be used to *translate* values between types.  &#xD;&#xA;It is sometimes used in storage migration exactly for that possibility.   &#xD;&#xA;&#xD;&#xA;Imagine a scenario like this:  &#xD;&#xA;- There is a pallet which stores `OldInfo` in a `StorageMap` called `MyMap`&#xD;&#xA;- Now a migration should *translate* all `OldInfo` into `NewInfo` in that map&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;MyMap::translate::&lt;OldInfo, _&gt;(|_key, old| -&gt; Option&lt;NewInfo&gt; {&#xD;&#xA;    Some(old.to_new_format())&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;Would archive this.&#xD;&#xA;&#xD;&#xA;I personally never use `translate` since it has a flaw. From the docs:  &#xD;&#xA;&gt; NOTE: If a value fail to decode because storage is corrupted then it is skipped.&#xD;&#xA;&#xD;&#xA;This means that if you have a type error in your migration by providing a faulty old type, it will just do nothing and carry over these old values **silently**.  &#xD;&#xA;This is harder to mess up when using a `storage_alias`.  &#xD;&#xA;&#xD;&#xA;It is probably a good idea in any case to check that all values still decode in the post-migration hook:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert_eq!(MyMap::iter_values().count(), number_of_decodable_elements);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23315" PostHistoryTypeId="2" PostId="6099" RevisionGUID="24b2c9f6-56b4-47ce-aa8d-a2dde992f02b" CreationDate="2022-11-27T00:14:07.223" UserId="360" Text="Storage leaks in runtimes can be very damaging and cleaning up with a runtime update migration is non-trivial. I'd like to ensure the absence of storage leaks already in unit testing.&#xD;&#xA;&#xD;&#xA;My strategy would be:&#xD;&#xA;1. measure size of TestExternalities&#xD;&#xA;2. execute a few dispatchables&#xD;&#xA;3. call a cleanup dispatchable that is supposed to purge all storage that has been created by the last step&#xD;&#xA;4. measure size of TestExternalities again and compare&#xD;&#xA;&#xD;&#xA;How can I measure state size before and after a unit test?&#xD;&#xA;&#xD;&#xA;Would it even be possible to get a diff, such that debugging is more comfortable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23317" PostHistoryTypeId="1" PostId="6099" RevisionGUID="24b2c9f6-56b4-47ce-aa8d-a2dde992f02b" CreationDate="2022-11-27T00:14:07.223" UserId="360" Text="how to test for storage leaks in pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="23318" PostHistoryTypeId="3" PostId="6099" RevisionGUID="24b2c9f6-56b4-47ce-aa8d-a2dde992f02b" CreationDate="2022-11-27T00:14:07.223" UserId="360" Text="|pallet|storage|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23319" PostHistoryTypeId="52" PostId="6097" RevisionGUID="c98fcf39-8481-43e3-8e61-02f2f560df85" CreationDate="2022-11-27T00:19:19.373" />
  <row Id="23321" PostHistoryTypeId="5" PostId="6083" RevisionGUID="c5e34c0d-9615-4379-8a65-54004ef9be98" CreationDate="2022-11-27T05:19:54.990" UserId="1959" Comment="added 716 characters in body" Text="&gt; [GeneralKey][1]: Usage will vary widely owing to its generality.&#xD;&#xA;&#xD;&#xA;So it may have different meanings on different chains. And here, @insipx is right. &#xD;&#xA;&#xD;&#xA;Then, you could find the location from the chain state of assets related pallets on other chains. &#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;**In karura:**&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;**In Khala:**&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;**In Moonriver:**&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&lt;hr&gt;&#xD;&#xA;&#xD;&#xA;For local tokens, it depends on its XCM config: you mentioned &#xD;&#xA; [Kabocha config](https://github.com/kabocha-network/parachain/blob/mainnet-kab-release-v0.2.4/runtime/src/xcm_config.rs#L48), but it seems not right. You could refer to the config of [Darwinia]( https://github.com/darwinia-network/darwinia-parachain/blob/main/runtime/darwinia-parachain/src/pallets/polkadot_xcm.rs#L33), for Darwinia, its token could be [{parents: 1, X2(Parachain(2105), PalletInstance(5))}](https://github.com/darwinia-network/darwinia-parachain/blob/main/runtime/darwinia-parachain/src/pallets/polkadot_xcm.rs#L107) relative to other parachains. If this config doesn't have an interior junction, then it would be {parents:1, X1(Parachain(2105))}.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/xcm/src/v1/junction.rs#L68&#xD;&#xA;  [2]: https://i.stack.imgur.com/Otpk0.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/GQitj.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/viYtq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23322" PostHistoryTypeId="50" PostId="3455" RevisionGUID="61169a7b-cc93-4ef2-9236-51ab547b8074" CreationDate="2022-11-27T08:05:55.713" UserId="-1" />
  <row Id="23323" PostHistoryTypeId="2" PostId="6100" RevisionGUID="7e8359ab-f6c1-4cf9-8a49-3163571b774e" CreationDate="2022-11-27T09:29:45.250" UserId="3319" Text="im writing a custom BlockImport and i need to decode the transactions within the block,as we know a transaction is simply a pallet method call for example `store_value(value)`, but at the point where im verifying a block all i got is `OpaqueExtrinsic` which is the transaction encoded.&#xD;&#xA;&#xD;&#xA;How can i take that extrinsic and retrieve the parameter `value` that was passed when the user called my pallet extrinsic `store_value(value)`?&#xD;&#xA;&#xD;&#xA;Extra:&#xD;&#xA;in the following code im just iterating over all the block extrinsics:&#xD;&#xA;&#xD;&#xA;    if let Some(block_extrinsics) = &amp;block.body&#xD;&#xA;    {&#xD;&#xA;    let mut block_extrinsics = block_extrinsics.iter();&#xD;&#xA;    			block_extrinsics.next();&#xD;&#xA;    			for extrinsic in block_extrinsics {&#xD;&#xA;    		     // what to do next ¯\_(ツ)_/¯&#xD;&#xA;                }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="23325" PostHistoryTypeId="1" PostId="6100" RevisionGUID="7e8359ab-f6c1-4cf9-8a49-3163571b774e" CreationDate="2022-11-27T09:29:45.250" UserId="3319" Text="how to transform OpaqueExtrinsic to get the variables withing the transaciton?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23326" PostHistoryTypeId="3" PostId="6100" RevisionGUID="7e8359ab-f6c1-4cf9-8a49-3163571b774e" CreationDate="2022-11-27T09:29:45.250" UserId="3319" Text="|transactions|extrinsic|subxt|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23328" PostHistoryTypeId="2" PostId="6101" RevisionGUID="f60ebc50-be64-4ee3-9915-015f878ac892" CreationDate="2022-11-27T12:59:03.873" UserId="3440" Text="while running the smart contract uisng polkadot api i get the following error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;file:///Users/.../Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Contract.js:81&#xD;&#xA;    gasLimit = BN_ZERO,&#xD;&#xA;    ^&#xD;&#xA;&#xD;&#xA;TypeError: Cannot read properties of undefined (reading 'gasLimit')&#xD;&#xA;    at ContractPromise.#read (file:///Users/.../Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Contract.js:81:5)&#xD;&#xA;    at file:///Users/.../Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Contract.js:40:71&#xD;&#xA;    at Object.addMaterialPassport (file:///Users/.../Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Contract.js:14:57)&#xD;&#xA;    at main (file:///Users/..../Documents/Study%20related/Learning-JS/ipfs_ink/index_1.js:409:78)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;i tried to give gasLimit in the program as 10000n * 1000000n and later i tried with -1;&#xD;&#xA;&#xD;&#xA;but error remains the same.&#xD;&#xA;How to solve it&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23330" PostHistoryTypeId="1" PostId="6101" RevisionGUID="f60ebc50-be64-4ee3-9915-015f878ac892" CreationDate="2022-11-27T12:59:03.873" UserId="3440" Text="while running the smart contract uisng polkadot api i get the following error" ContentLicense="CC BY-SA 4.0" />
  <row Id="23331" PostHistoryTypeId="3" PostId="6101" RevisionGUID="f60ebc50-be64-4ee3-9915-015f878ac892" CreationDate="2022-11-27T12:59:03.873" UserId="3440" Text="|substrate-contracts-node|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23332" PostHistoryTypeId="50" PostId="2371" RevisionGUID="c7d4a637-cd53-4425-b83d-bfdc18de1fca" CreationDate="2022-11-27T13:04:50.677" UserId="-1" />
  <row Id="23333" PostHistoryTypeId="2" PostId="6102" RevisionGUID="27428dec-00b4-4b02-be17-970cbbee74b8" CreationDate="2022-11-27T13:42:51.430" UserId="94" Text="You can use the [`StorageNoopGuard`](https://paritytech.github.io/substrate/master/frame_support/storage/storage_noop_guard/struct.StorageNoopGuard.html) to assert that your storage changes sum up to a No-OP.  &#xD;&#xA;This does the same as [`assert_storage_noop!`](https://paritytech.github.io/substrate/master/frame_support/macro.assert_storage_noop.html) but for a code block. It is not measuring the state size, but comparing the root hash of the Trie. This exactly tells us whether something changed.  &#xD;&#xA;As example:  &#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn cleanup_works() {&#xD;&#xA;	use frame_support::{StorageNoopGuard, storage::unhashed::*};&#xD;&#xA;&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		let _guard = StorageNoopGuard::default();&#xD;&#xA;		&#xD;&#xA;		// Here you are modifying the storage.&#xD;&#xA;		put(b&quot;key&quot;, b&quot;value&quot;);&#xD;&#xA;		// And here is the cleanup - which you did not forget ;)&#xD;&#xA;		kill(b&quot;key&quot;);&#xD;&#xA;		// The guard will not panic because the state did not change since its construction.&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;It works by calculating the storage root has in the beginning with `storage_root(StateVersion::V1)` and then again in the end. The state did not change iff they are equal.  &#xD;&#xA;You can change the key in `kill` to `b&quot;key1&quot;` to simulate an error and see it fail with:  &#xD;&#xA;```pre&#xD;&#xA;thread 'tests::cleanup_works' panicked at 'assertion failed: `(left == right)`&#xD;&#xA;  left: `[124, 55, 174, 141, 90, 56, 20, 107, 57, 116, 85, 28, 128, 109, 139, 53, 156, 61, 56, 117, 109, 227, 115, 247, 235, 180, 147, 215, 81, 174, 223, 144]`,&#xD;&#xA; right: `[235, 68, 37, 78, 47, 204, 154, 99, 92, 28, 105, 55, 55, 229, 121, 115, 249, 23, 80, 192, 245, 244, 195, 146, 103, 68, 36, 175, 217, 246, 86, 194]`:&#xD;&#xA;StorageNoopGuard detected wrongful storage changes.'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I dont think there is a nice state-differ available in FRAME. But it could be done, by storing all keys and traversing the tree and following the differing keys.&#xD;&#xA;&#xD;&#xA;PS: I think these stale-state errors happen the easiest when the pallet is refactored, not when it is originally created. Anyway, probably better than not doing it." ContentLicense="CC BY-SA 4.0" />
  <row Id="23335" PostHistoryTypeId="50" PostId="4419" RevisionGUID="0f9cc782-5218-43a8-a843-67958ba8bf33" CreationDate="2022-11-27T14:06:00.703" UserId="-1" />
  <row Id="23338" PostHistoryTypeId="50" PostId="4222" RevisionGUID="3ae1cf46-3e5f-4375-bff7-894584b61d20" CreationDate="2022-11-27T15:07:25.847" UserId="-1" />
  <row Id="23339" PostHistoryTypeId="2" PostId="6103" RevisionGUID="a597f4a1-d24b-4ba4-a7bc-ab06f9782210" CreationDate="2022-11-27T15:25:45.850" UserId="2136" Text="I have a substrate pallet with a number of extrinsics, some simple, some more complex. Depending on the chain state and the input variables, the amount of computation and the number of DB reads for the same extrinsic call can be quite different.&#xD;&#xA;&#xD;&#xA;I've done my weight annotations based on a worst-case scenario. I'm happy with those for estimating the transaction fees in advance.&#xD;&#xA;&#xD;&#xA;Now I'm trying to return the actual weight via DispatchResultWithPostInfo so that the transaction-payment pallet can calculate the real fee and return the difference to the user. I, perhaps naively, thought that the actual weight of an extrinsic call would be calculated for me somewhere and I could just pass this back in DispatchResultWithPostInfo, but this doesn't seem to be the case.&#xD;&#xA;&#xD;&#xA;So I've created a weight variable in each extrinsic which I update each time there is a DB read/write operation so that I have something to create my PostInfo that reflects what actually happened. This raises a few questions for me:&#xD;&#xA;&#xD;&#xA;1/ When do DB reads get cached, and should therefore not add extra weight?&#xD;&#xA;2/ How can I get the actual computation time? Or can I not and have to use estimates from benchmarking?&#xD;&#xA;3/ Is this really the best way to calculate the actual weight? I feel I have to be missing something.&#xD;&#xA;&#xD;&#xA;Thanks in advance for any help." ContentLicense="CC BY-SA 4.0" />
  <row Id="23341" PostHistoryTypeId="1" PostId="6103" RevisionGUID="a597f4a1-d24b-4ba4-a7bc-ab06f9782210" CreationDate="2022-11-27T15:25:45.850" UserId="2136" Text="Calculating actual weights for extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="23342" PostHistoryTypeId="3" PostId="6103" RevisionGUID="a597f4a1-d24b-4ba4-a7bc-ab06f9782210" CreationDate="2022-11-27T15:25:45.850" UserId="2136" Text="|transactions|extrinsic|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23343" PostHistoryTypeId="50" PostId="4657" RevisionGUID="182a60fe-ae86-4b90-9c6d-2dd80ab62c22" CreationDate="2022-11-27T16:06:40.817" UserId="-1" />
  <row Id="23344" PostHistoryTypeId="2" PostId="6104" RevisionGUID="39e5239e-eb32-4484-9746-26ed3b1e816b" CreationDate="2022-11-27T16:29:48.170" UserId="85" Text="How do I scale decode a `FrameSupportDispatchPerDispatchClassWeight` ?&#xD;&#xA;js seems the only definition I can find - can someone point to a rust definition please so I can decode it." ContentLicense="CC BY-SA 4.0" />
  <row Id="23346" PostHistoryTypeId="1" PostId="6104" RevisionGUID="39e5239e-eb32-4484-9746-26ed3b1e816b" CreationDate="2022-11-27T16:29:48.170" UserId="85" Text="How do I scale decode a FrameSupportDispatchPerDispatchClassWeight (in rust)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23347" PostHistoryTypeId="3" PostId="6104" RevisionGUID="39e5239e-eb32-4484-9746-26ed3b1e816b" CreationDate="2022-11-27T16:29:48.170" UserId="85" Text="|weight|block-size|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23348" PostHistoryTypeId="5" PostId="6046" RevisionGUID="b8235ab5-cf76-401f-8993-d5ace22d2bf9" CreationDate="2022-11-27T16:56:44.123" UserId="496" Comment="added 568 characters in body" Text="Im unable to build substrate-node-template using my Macbook pro M1 Pro laptop.&#xD;&#xA;&#xD;&#xA;I updated cmake and followed the official guide:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/quick-start/&#xD;&#xA;&#xD;&#xA;I also tried with the flag ``` --locked ```&#xD;&#xA;&#xD;&#xA;Here is the error log: &#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;error: failed to run custom build command for `libp2p-kad v0.41.0&#xD;&#xA;error: failed to run custom build command for `libp2p-identify v0.40.0`&#xD;&#xA;error: failed to run custom build command for `sc-network-light v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.32#5ea6d953)`&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;**Update:** &#xD;&#xA;&#xD;&#xA;After following the the MacOs installation:&#xD;&#xA;&#xD;&#xA;* https://docs.substrate.io/install/macos&#xD;&#xA;&#xD;&#xA;Steps:&#xD;&#xA;&#xD;&#xA;1. Updated BREW&#xD;&#xA;2. Installed CMAKE&#xD;&#xA;3. Installed openSSL&#xD;&#xA;4. ```rustup default stable``` and ```rustup update```&#xD;&#xA;5. ```rustup update nightly``` and ```rustup target add wasm32-unknown-unknown --toolchain nightly```&#xD;&#xA;6. ```git clone https://github.com/substrate-developer-hub/substrate-node-template```&#xD;&#xA;7. ```cd substrate-node-template```&#xD;&#xA;8. ```cargo build --release``` and tried ```cargo build --locked```&#xD;&#xA;&#xD;&#xA;And now im getting the following error: &#xD;&#xA;&#xD;&#xA;```error: failed to run custom build command for `libp2p-core v0.37.0```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23349" PostHistoryTypeId="50" PostId="4276" RevisionGUID="9f9630fc-a50b-49b0-b696-378265045fe9" CreationDate="2022-11-27T18:01:35.210" UserId="-1" />
  <row Id="23350" PostHistoryTypeId="2" PostId="6105" RevisionGUID="be9c22e6-9ba2-4436-b72f-6f64faa1c678" CreationDate="2022-11-27T18:32:23.710" UserId="3013" Text="My custom pallet has a couple of XCM calls, for which I have to provide the `Origin` in `mock.rs`. It implements the&#xD;&#xA;```&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;        type Origin: From&lt;&lt;Self as SystemConfig&gt;::Origin&gt;&#xD;&#xA;            + Into&lt;Result&lt;CumulusOrigin, &lt;Self as Config&gt;::Origin&gt;&gt;;&#xD;&#xA;&#xD;&#xA;        type XcmSender: SendXcm;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have tests for the &quot;ordinary, non-XCM&quot; functions and with now adding the XCM, this does not compile (due to requiring `CumulusOrigin`). I do not care for testing XCM calls, so a dummy `Origin` would work well, however I am not sure how to implement it. I do not find any examples with such mocking (XCM pallets on github do not have tests). How can I do this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;**Stuff I tried.**&#xD;&#xA;&#xD;&#xA;I tried to mock everything:&#xD;&#xA;```&#xD;&#xA;use frame_support::{&#xD;&#xA;    parameter_types,&#xD;&#xA;    traits::{ConstU64, Everything},&#xD;&#xA;    weights::{IdentityFee, Weight},&#xD;&#xA;};&#xD;&#xA;use frame_system as system;&#xD;&#xA;&#xD;&#xA;use sp_core::{&#xD;&#xA;    offchain::{testing, OffchainWorkerExt, TransactionPoolExt},&#xD;&#xA;    sr25519::Signature,&#xD;&#xA;    H256,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;use sp_runtime::{&#xD;&#xA;    testing::{Header, TestXt},&#xD;&#xA;    traits::{BlakeTwo256, Extrinsic as ExtrinsicT, IdentifyAccount, IdentityLookup, Verify},&#xD;&#xA;};&#xD;&#xA;use xcm::latest::{prelude::*, Junction, OriginKind, SendXcm, Xcm};&#xD;&#xA;use xcm_builder::{&#xD;&#xA;    AllowUnpaidExecutionFrom, EnsureXcmOrigin, FixedWeightBounds, LocationInverter,&#xD;&#xA;    SignedToAccountId32,&#xD;&#xA;};&#xD;&#xA;use xcm_executor::{&#xD;&#xA;    traits::{InvertLocation, TransactAsset, WeightTrader},&#xD;&#xA;    Assets, XcmExecutor,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic&lt;Test&gt;;&#xD;&#xA;type Block = frame_system::mocking::MockBlock&lt;Test&gt;;&#xD;&#xA;&#xD;&#xA;// Configure a mock runtime to test the pallet.&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;    pub enum Test where&#xD;&#xA;        Block = Block,&#xD;&#xA;        NodeBlock = Block,&#xD;&#xA;        UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;    {&#xD;&#xA;        System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;},&#xD;&#xA;        Balances: pallet_balances::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},&#xD;&#xA;        XcmPallet: pallet_xcm::{Pallet, Call, Event&lt;T&gt;, Origin, Config} = 31,&#xD;&#xA;        CumulusXcm: cumulus_pallet_xcm::{Pallet, Event&lt;T&gt;, Origin} = 32,&#xD;&#xA;        MyPallet: my_pallet::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;    }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;    pub const BlockHashCount: u64 = 250;&#xD;&#xA;    pub const SS58Prefix: u8 = 42;&#xD;&#xA;&#xD;&#xA;    pub static AdvertisedXcmVersion: xcm::prelude::XcmVersion = 2;&#xD;&#xA;    pub const UnitWeightCost: Weight = 10;&#xD;&#xA;    pub const MaxInstructions: u32 = 100;&#xD;&#xA;    pub const RelayNetwork: NetworkId = NetworkId::Any;&#xD;&#xA;&#xD;&#xA;    pub Ancestry: MultiLocation = Parachain(2001).into();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl system::Config for Test {&#xD;&#xA;    type BaseCallFilter = Everything;&#xD;&#xA;    type BlockWeights = ();&#xD;&#xA;    type BlockLength = ();&#xD;&#xA;    type DbWeight = ();&#xD;&#xA;    type Origin = Origin;&#xD;&#xA;    type Call = Call;&#xD;&#xA;    type Index = u64;&#xD;&#xA;    type BlockNumber = u64;&#xD;&#xA;    type Hash = H256;&#xD;&#xA;    type Hashing = BlakeTwo256;&#xD;&#xA;    type AccountId = u64;&#xD;&#xA;    type Lookup = IdentityLookup&lt;Self::AccountId&gt;;&#xD;&#xA;    type Header = Header;&#xD;&#xA;    type Event = Event;&#xD;&#xA;    type BlockHashCount = BlockHashCount;&#xD;&#xA;    type Version = ();&#xD;&#xA;    type PalletInfo = PalletInfo;&#xD;&#xA;    type AccountData = pallet_balances::AccountData&lt;u64&gt;;&#xD;&#xA;    type OnNewAccount = ();&#xD;&#xA;    type OnKilledAccount = ();&#xD;&#xA;    type SystemWeightInfo = ();&#xD;&#xA;    type SS58Prefix = SS58Prefix;&#xD;&#xA;    type OnSetCode = ();&#xD;&#xA;    type MaxConsumers = frame_support::traits::ConstU32&lt;16&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_balances::Config for Test {&#xD;&#xA;    type Balance = u64;&#xD;&#xA;    type DustRemoval = ();&#xD;&#xA;    type Event = Event;&#xD;&#xA;    type ExistentialDeposit = ConstU64&lt;1&gt;;&#xD;&#xA;    type AccountStore = System;&#xD;&#xA;    type WeightInfo = ();&#xD;&#xA;    type MaxLocks = ();&#xD;&#xA;    type MaxReserves = ();&#xD;&#xA;    type ReserveIdentifier = [u8; 8];&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct DummyWeightTrader;&#xD;&#xA;impl WeightTrader for DummyWeightTrader {&#xD;&#xA;    fn new() -&gt; Self {&#xD;&#xA;        DummyWeightTrader&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn buy_weight(&amp;mut self, _weight: Weight, _payment: Assets) -&gt; Result&lt;Assets, XcmError&gt; {&#xD;&#xA;        Ok(Assets::default())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;pub struct DummyAssetTransactor;&#xD;&#xA;impl TransactAsset for DummyAssetTransactor {&#xD;&#xA;    fn deposit_asset(_what: &amp;MultiAsset, _who: &amp;MultiLocation) -&gt; XcmResult {&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn withdraw_asset(_what: &amp;MultiAsset, _who: &amp;MultiLocation) -&gt; Result&lt;Assets, XcmError&gt; {&#xD;&#xA;        let asset: MultiAsset = (Parent, 100_000).into();&#xD;&#xA;        Ok(asset.into())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;pub struct XcmConfig;&#xD;&#xA;pub struct DoNothingRouter;&#xD;&#xA;type AccountId = &lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;&#xD;&#xA;&#xD;&#xA;pub type LocalOriginToLocation = SignedToAccountId32&lt;Origin, AccountId, RelayNetwork&gt;;&#xD;&#xA;pub type Barrier = AllowUnpaidExecutionFrom&lt;Everything&gt;;&#xD;&#xA;&#xD;&#xA;impl SendXcm for DoNothingRouter {&#xD;&#xA;    fn send_xcm(_dest: impl Into&lt;MultiLocation&gt;, _msg: Xcm&lt;()&gt;) -&gt; SendResult {&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl xcm_executor::Config for XcmConfig {&#xD;&#xA;    type Call = Call;&#xD;&#xA;    type XcmSender = DoNothingRouter;&#xD;&#xA;    type AssetTransactor = DummyAssetTransactor;&#xD;&#xA;    type OriginConverter = pallet_xcm::XcmPassthrough&lt;Origin&gt;;&#xD;&#xA;    type IsReserve = ();&#xD;&#xA;    type IsTeleporter = ();&#xD;&#xA;    type LocationInverter = LocationInverter&lt;Ancestry&gt;;&#xD;&#xA;    type Barrier = Barrier;&#xD;&#xA;    type Weigher = FixedWeightBounds&lt;UnitWeightCost, Call, MaxInstructions&gt;;&#xD;&#xA;    type Trader = DummyWeightTrader;&#xD;&#xA;    type ResponseHandler = ();&#xD;&#xA;    type AssetTrap = XcmPallet;&#xD;&#xA;    type AssetClaims = XcmPallet;&#xD;&#xA;    type SubscriptionService = XcmPallet;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_xcm::Config for Test {&#xD;&#xA;    type Event = Event;&#xD;&#xA;    type SendXcmOrigin = EnsureXcmOrigin&lt;Origin, LocalOriginToLocation&gt;;&#xD;&#xA;    type XcmRouter = DoNothingRouter;&#xD;&#xA;    type LocationInverter = LocationInverter&lt;Ancestry&gt;;&#xD;&#xA;    type ExecuteXcmOrigin = EnsureXcmOrigin&lt;Origin, LocalOriginToLocation&gt;;&#xD;&#xA;    type XcmExecuteFilter = Everything;&#xD;&#xA;    type XcmExecutor = XcmExecutor&lt;XcmConfig&gt;;&#xD;&#xA;    type XcmTeleportFilter = Everything;&#xD;&#xA;    type Weigher = FixedWeightBounds&lt;UnitWeightCost, Call, MaxInstructions&gt;;&#xD;&#xA;    type XcmReserveTransferFilter = Everything;&#xD;&#xA;    type Origin = Origin;&#xD;&#xA;    type Call = Call;&#xD;&#xA;    const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;&#xD;&#xA;    type AdvertisedXcmVersion = AdvertisedXcmVersion;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl cumulus_pallet_xcm::Config for Test {&#xD;&#xA;    type Event = Event;&#xD;&#xA;    type XcmExecutor = XcmExecutor&lt;XcmConfig&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but I get:&#xD;&#xA;```&#xD;&#xA;error[E0271]: type mismatch resolving `&lt;OriginCaller as TryInto&lt;RawOrigin&lt;sp_core::sr25519::Public&gt;&gt;&gt;::Error == OriginCaller`&#xD;&#xA;   --&gt; my_pallet/src/mock.rs:154:26&#xD;&#xA;    |&#xD;&#xA;154 |     type SendXcmOrigin = EnsureXcmOrigin&lt;Origin, LocalOriginToLocation&gt;;&#xD;&#xA;    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `OriginCaller`, found enum `std::convert::Infallible`&#xD;&#xA;    |&#xD;&#xA;    = note: required because of the requirements on the impl of `xcm_executor::traits::Convert&lt;mock::Origin, xcm::v1::MultiLocation&gt;` for `SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;`&#xD;&#xA;    = note: required because of the requirements on the impl of `EnsureOrigin&lt;mock::Origin&gt;` for `EnsureXcmOrigin&lt;mock::Origin, SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;&gt;`&#xD;&#xA;note: required by a bound in `pallet_xcm::Config::SendXcmOrigin`&#xD;&#xA;   --&gt; /home/user/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/b017bad/xcm/pallet-xcm/src/lib.rs:78:65&#xD;&#xA;    |&#xD;&#xA;78  |         type SendXcmOrigin: EnsureOrigin&lt;&lt;Self as SysConfig&gt;::Origin, Success = MultiLocation&gt;;&#xD;&#xA;    |                                                                       ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_xcm::Config::SendXcmOrigin`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `OriginCaller: From&lt;RawOrigin&lt;sp_core::sr25519::Public&gt;&gt;` is not satisfied&#xD;&#xA;   --&gt; my_pallet/src/mock.rs:154:26&#xD;&#xA;    |&#xD;&#xA;154 |     type SendXcmOrigin = EnsureXcmOrigin&lt;Origin, LocalOriginToLocation&gt;;&#xD;&#xA;    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;RawOrigin&lt;sp_core::sr25519::Public&gt;&gt;` is not implemented for `OriginCaller`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `From&lt;T&gt;`:&#xD;&#xA;              &lt;OriginCaller as From&lt;RawOrigin&lt;u64&gt;&gt;&gt;&#xD;&#xA;              &lt;OriginCaller as From&lt;cumulus_pallet_xcm::Origin&gt;&gt;&#xD;&#xA;              &lt;OriginCaller as From&lt;pallet_xcm::Origin&gt;&gt;&#xD;&#xA;    = note: required because of the requirements on the impl of `xcm_executor::traits::Convert&lt;mock::Origin, xcm::v1::MultiLocation&gt;` for `SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;`&#xD;&#xA;    = note: required because of the requirements on the impl of `EnsureOrigin&lt;mock::Origin&gt;` for `EnsureXcmOrigin&lt;mock::Origin, SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;&gt;`&#xD;&#xA;note: required by a bound in `pallet_xcm::Config::SendXcmOrigin`&#xD;&#xA;   --&gt; /home/user/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/b017bad/xcm/pallet-xcm/src/lib.rs:78:65&#xD;&#xA;    |&#xD;&#xA;78  |         type SendXcmOrigin: EnsureOrigin&lt;&lt;Self as SysConfig&gt;::Origin, Success = MultiLocation&gt;;&#xD;&#xA;    |                                                                       ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_xcm::Config::SendXcmOrigin`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `RawOrigin&lt;sp_core::sr25519::Public&gt;: From&lt;OriginCaller&gt;` is not satisfied&#xD;&#xA;   --&gt; my_pallet/src/mock.rs:154:26&#xD;&#xA;    |&#xD;&#xA;154 |     type SendXcmOrigin = EnsureXcmOrigin&lt;Origin, LocalOriginToLocation&gt;;&#xD;&#xA;    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;OriginCaller&gt;` is not implemented for `RawOrigin&lt;sp_core::sr25519::Public&gt;`&#xD;&#xA;    |&#xD;&#xA;    = help: the trait `From&lt;std::option::Option&lt;AccountId&gt;&gt;` is implemented for `RawOrigin&lt;AccountId&gt;`&#xD;&#xA;    = note: required because of the requirements on the impl of `Into&lt;RawOrigin&lt;sp_core::sr25519::Public&gt;&gt;` for `OriginCaller`&#xD;&#xA;    = note: required because of the requirements on the impl of `TryFrom&lt;OriginCaller&gt;` for `RawOrigin&lt;sp_core::sr25519::Public&gt;`&#xD;&#xA;    = note: required because of the requirements on the impl of `TryInto&lt;RawOrigin&lt;sp_core::sr25519::Public&gt;&gt;` for `OriginCaller`&#xD;&#xA;    = note: required because of the requirements on the impl of `xcm_executor::traits::Convert&lt;mock::Origin, xcm::v1::MultiLocation&gt;` for `SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;`&#xD;&#xA;    = note: required because of the requirements on the impl of `EnsureOrigin&lt;mock::Origin&gt;` for `EnsureXcmOrigin&lt;mock::Origin, SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;&gt;`&#xD;&#xA;note: required by a bound in `pallet_xcm::Config::SendXcmOrigin`&#xD;&#xA;   --&gt; /home/user/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/b017bad/xcm/pallet-xcm/src/lib.rs:78:65&#xD;&#xA;    |&#xD;&#xA;78  |         type SendXcmOrigin: EnsureOrigin&lt;&lt;Self as SysConfig&gt;::Origin, Success = MultiLocation&gt;;&#xD;&#xA;    |                                                                       ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_xcm::Config::SendXcmOrigin`&#xD;&#xA;&#xD;&#xA;error[E0271]: type mismatch resolving `&lt;OriginCaller as TryInto&lt;RawOrigin&lt;sp_core::sr25519::Public&gt;&gt;&gt;::Error == OriginCaller`&#xD;&#xA;   --&gt; my_pallet/src/mock.rs:157:29&#xD;&#xA;    |&#xD;&#xA;157 |     type ExecuteXcmOrigin = EnsureXcmOrigin&lt;Origin, LocalOriginToLocation&gt;;&#xD;&#xA;    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `OriginCaller`, found enum `std::convert::Infallible`&#xD;&#xA;    |&#xD;&#xA;    = note: required because of the requirements on the impl of `xcm_executor::traits::Convert&lt;mock::Origin, xcm::v1::MultiLocation&gt;` for `SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;`&#xD;&#xA;    = note: required because of the requirements on the impl of `EnsureOrigin&lt;mock::Origin&gt;` for `EnsureXcmOrigin&lt;mock::Origin, SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;&gt;`&#xD;&#xA;note: required by a bound in `pallet_xcm::Config::ExecuteXcmOrigin`&#xD;&#xA;   --&gt; /home/user/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/b017bad/xcm/pallet-xcm/src/lib.rs:86:68&#xD;&#xA;    |&#xD;&#xA;86  |         type ExecuteXcmOrigin: EnsureOrigin&lt;&lt;Self as SysConfig&gt;::Origin, Success = MultiLocation&gt;;&#xD;&#xA;    |                                                                          ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_xcm::Config::ExecuteXcmOrigin`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `OriginCaller: From&lt;RawOrigin&lt;sp_core::sr25519::Public&gt;&gt;` is not satisfied&#xD;&#xA;   --&gt; my_pallet/src/mock.rs:157:29&#xD;&#xA;    |&#xD;&#xA;157 |     type ExecuteXcmOrigin = EnsureXcmOrigin&lt;Origin, LocalOriginToLocation&gt;;&#xD;&#xA;    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;RawOrigin&lt;sp_core::sr25519::Public&gt;&gt;` is not implemented for `OriginCaller`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `From&lt;T&gt;`:&#xD;&#xA;              &lt;OriginCaller as From&lt;RawOrigin&lt;u64&gt;&gt;&gt;&#xD;&#xA;              &lt;OriginCaller as From&lt;cumulus_pallet_xcm::Origin&gt;&gt;&#xD;&#xA;              &lt;OriginCaller as From&lt;pallet_xcm::Origin&gt;&gt;&#xD;&#xA;    = note: required because of the requirements on the impl of `xcm_executor::traits::Convert&lt;mock::Origin, xcm::v1::MultiLocation&gt;` for `SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;`&#xD;&#xA;    = note: required because of the requirements on the impl of `EnsureOrigin&lt;mock::Origin&gt;` for `EnsureXcmOrigin&lt;mock::Origin, SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;&gt;`&#xD;&#xA;note: required by a bound in `pallet_xcm::Config::ExecuteXcmOrigin`&#xD;&#xA;   --&gt; /home/user/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/b017bad/xcm/pallet-xcm/src/lib.rs:86:68&#xD;&#xA;    |&#xD;&#xA;86  |         type ExecuteXcmOrigin: EnsureOrigin&lt;&lt;Self as SysConfig&gt;::Origin, Success = MultiLocation&gt;;&#xD;&#xA;    |                                                                          ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_xcm::Config::ExecuteXcmOrigin`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `RawOrigin&lt;sp_core::sr25519::Public&gt;: From&lt;OriginCaller&gt;` is not satisfied&#xD;&#xA;   --&gt; my_pallet/src/mock.rs:157:29&#xD;&#xA;    |&#xD;&#xA;157 |     type ExecuteXcmOrigin = EnsureXcmOrigin&lt;Origin, LocalOriginToLocation&gt;;&#xD;&#xA;    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;OriginCaller&gt;` is not implemented for `RawOrigin&lt;sp_core::sr25519::Public&gt;`&#xD;&#xA;    |&#xD;&#xA;    = help: the trait `From&lt;std::option::Option&lt;AccountId&gt;&gt;` is implemented for `RawOrigin&lt;AccountId&gt;`&#xD;&#xA;    = note: required because of the requirements on the impl of `Into&lt;RawOrigin&lt;sp_core::sr25519::Public&gt;&gt;` for `OriginCaller`&#xD;&#xA;    = note: required because of the requirements on the impl of `TryFrom&lt;OriginCaller&gt;` for `RawOrigin&lt;sp_core::sr25519::Public&gt;`&#xD;&#xA;    = note: required because of the requirements on the impl of `TryInto&lt;RawOrigin&lt;sp_core::sr25519::Public&gt;&gt;` for `OriginCaller`&#xD;&#xA;    = note: required because of the requirements on the impl of `xcm_executor::traits::Convert&lt;mock::Origin, xcm::v1::MultiLocation&gt;` for `SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;`&#xD;&#xA;    = note: required because of the requirements on the impl of `EnsureOrigin&lt;mock::Origin&gt;` for `EnsureXcmOrigin&lt;mock::Origin, SignedToAccountId32&lt;mock::Origin, sp_core::sr25519::Public, RelayNetwork&gt;&gt;`&#xD;&#xA;note: required by a bound in `pallet_xcm::Config::ExecuteXcmOrigin`&#xD;&#xA;```&#xD;&#xA;At this point I've tried so many things, I am thinking of removing tests rather than making it work. I would rather not do that." ContentLicense="CC BY-SA 4.0" />
  <row Id="23352" PostHistoryTypeId="1" PostId="6105" RevisionGUID="be9c22e6-9ba2-4436-b72f-6f64faa1c678" CreationDate="2022-11-27T18:32:23.710" UserId="3013" Text="How to mock XCM origin in tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23353" PostHistoryTypeId="3" PostId="6105" RevisionGUID="be9c22e6-9ba2-4436-b72f-6f64faa1c678" CreationDate="2022-11-27T18:32:23.710" UserId="3013" Text="|xcm|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23354" PostHistoryTypeId="2" PostId="6106" RevisionGUID="b9ef8353-3170-47d5-9469-e8db60090606" CreationDate="2022-11-27T18:54:46.240" UserId="3312" Text="I have a minimum zombienet configuration with two validators on local rococo testnet and a robonomics parachain node.&#xD;&#xA;&#xD;&#xA;    [relaychain]&#xD;&#xA;    default_command = &quot;./bin/polkadot&quot;&#xD;&#xA;    default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;alice&quot;&#xD;&#xA;        validator = true&#xD;&#xA;&#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;bob&quot;&#xD;&#xA;        validator = true&#xD;&#xA;&#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 2048&#xD;&#xA;    chain = &quot;main-dev&quot;&#xD;&#xA;&#xD;&#xA;        [parachains.collator]&#xD;&#xA;        name = &quot;alice&quot;&#xD;&#xA;        chain = &quot;main-dev&quot;&#xD;&#xA;        command = &quot;./bin/robonomics&quot;&#xD;&#xA;        args = [&quot;-lparachain=debug&quot;,&quot;--force-authoring&quot;]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The relay chain spawns alright but the robonomics parachain fails with&#xD;&#xA;&#xD;&#xA;    Error: Timeout(60) for node : alice-1&#xD;&#xA;    at NativeClient.&lt;anonymous&gt; (/snapshot/javascript/packages/orchestrator/dist/providers/native/nativeClient.js)&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at fulfilled (/snapshot/javascript/packages/orchestrator/dist/providers/native/nativeClient.js)&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;Chain versions&#xD;&#xA;&#xD;&#xA;robonomics 2.6.0-84120838070&#xD;&#xA;&#xD;&#xA;polkadot 0.9.28-314298c32ac&#xD;&#xA;&#xD;&#xA;I have tried the similar configuration with other parachains and it works." ContentLicense="CC BY-SA 4.0" />
  <row Id="23356" PostHistoryTypeId="1" PostId="6106" RevisionGUID="b9ef8353-3170-47d5-9469-e8db60090606" CreationDate="2022-11-27T18:54:46.240" UserId="3312" Text="Robonomics parachain on zombienet times out" ContentLicense="CC BY-SA 4.0" />
  <row Id="23357" PostHistoryTypeId="3" PostId="6106" RevisionGUID="b9ef8353-3170-47d5-9469-e8db60090606" CreationDate="2022-11-27T18:54:46.240" UserId="3312" Text="|parachain|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23358" PostHistoryTypeId="50" PostId="4106" RevisionGUID="f8b18ae6-788e-48de-bb25-7d5e5f0be06d" CreationDate="2022-11-27T19:02:50.370" UserId="-1" />
  <row Id="23359" PostHistoryTypeId="50" PostId="4119" RevisionGUID="8d96a1dd-4e79-41d5-ac99-592ca79543d6" CreationDate="2022-11-27T20:00:10.047" UserId="-1" />
  <row Id="23360" PostHistoryTypeId="50" PostId="4888" RevisionGUID="3feba77d-8f9b-4756-a10b-63380115f716" CreationDate="2022-11-27T21:02:45.293" UserId="-1" />
  <row Id="23361" PostHistoryTypeId="5" PostId="6101" RevisionGUID="29f6f7cc-3eda-4f5b-a112-3c218b6de8e3" CreationDate="2022-11-27T21:22:18.120" UserId="3440" Comment="added 218 characters in body" Text="while running the smart contract uisng polkadot api i get the following error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;file:///Users/.../Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Contract.js:81&#xD;&#xA;    gasLimit = BN_ZERO,&#xD;&#xA;    ^&#xD;&#xA;&#xD;&#xA;TypeError: Cannot read properties of undefined (reading 'gasLimit')&#xD;&#xA;    at ContractPromise.#read (file:///Users/.../Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Contract.js:81:5)&#xD;&#xA;    at file:///Users/.../Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Contract.js:40:71&#xD;&#xA;    at Object.addMaterialPassport (file:///Users/.../Documents/Study%20related/Learning-JS/ipfs_ink/node_modules/@polkadot/api-contract/base/Contract.js:14:57)&#xD;&#xA;    at main (file:///Users/..../Documents/Study%20related/Learning-JS/ipfs_ink/index_1.js:409:78)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;i tried to give gasLimit in the program as 10000n * 1000000n and later i tried with -1;&#xD;&#xA;&#xD;&#xA;but error remains the same.&#xD;&#xA;How to solve it&#xD;&#xA;&#xD;&#xA;Using the developer node of substrate. Made the contract in Ink and trying to access it using metadata.json&#xD;&#xA;&#xD;&#xA;I try to access it using a javascript program with @polkadot/api and @polkadot/api-contract packages.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23362" PostHistoryTypeId="50" PostId="4475" RevisionGUID="e153b136-ba22-4e3f-a059-b021f9d709fb" CreationDate="2022-11-27T22:01:05.167" UserId="-1" />
  <row Id="23363" PostHistoryTypeId="50" PostId="5473" RevisionGUID="faab764d-08a3-48a6-a0e7-b264a5254794" CreationDate="2022-11-27T23:05:35.667" UserId="-1" />
  <row Id="23364" PostHistoryTypeId="50" PostId="5077" RevisionGUID="d53a7d49-d0bf-4e5f-84bc-2a31001e3762" CreationDate="2022-11-28T00:03:05.347" UserId="-1" />
  <row Id="23365" PostHistoryTypeId="50" PostId="5113" RevisionGUID="2fc0f6ed-e54e-47ee-925f-3ae7b32e71aa" CreationDate="2022-11-28T01:04:50.573" UserId="-1" />
  <row Id="23366" PostHistoryTypeId="50" PostId="4617" RevisionGUID="49d2bc9b-1a8d-4642-a693-2df2064152f4" CreationDate="2022-11-28T02:05:35.730" UserId="-1" />
  <row Id="23367" PostHistoryTypeId="50" PostId="4816" RevisionGUID="33d433ef-c608-46bf-be6e-a216b8c9238b" CreationDate="2022-11-28T03:04:35.527" UserId="-1" />
  <row Id="23368" PostHistoryTypeId="50" PostId="3931" RevisionGUID="9ab946ab-db92-4d61-8a11-1142c6a4b85f" CreationDate="2022-11-28T04:06:15.783" UserId="-1" />
  <row Id="23369" PostHistoryTypeId="50" PostId="2442" RevisionGUID="b2e1097e-b38b-4894-948a-fd1e31daf25a" CreationDate="2022-11-28T05:02:20.253" UserId="-1" />
  <row Id="23370" PostHistoryTypeId="2" PostId="6107" RevisionGUID="32d25703-51b8-4254-94ef-8bd95bdfe80b" CreationDate="2022-11-28T05:54:06.573" UserId="3524" Text="I have the substrate setup on AWS EC2 with EBS volume attached to it. I wonder what would be the best way to take substrate DB backup. " ContentLicense="CC BY-SA 4.0" />
  <row Id="23372" PostHistoryTypeId="1" PostId="6107" RevisionGUID="32d25703-51b8-4254-94ef-8bd95bdfe80b" CreationDate="2022-11-28T05:54:06.573" UserId="3524" Text="What is the best available way to take substrate DB backup?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23373" PostHistoryTypeId="3" PostId="6107" RevisionGUID="32d25703-51b8-4254-94ef-8bd95bdfe80b" CreationDate="2022-11-28T05:54:06.573" UserId="3524" Text="|substrate-node-template|substrate-parachain-template|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23374" PostHistoryTypeId="50" PostId="5024" RevisionGUID="73391cfc-de3e-4684-acee-b8055fcbbdc1" CreationDate="2022-11-28T06:03:40.440" UserId="-1" />
  <row Id="23375" PostHistoryTypeId="2" PostId="6108" RevisionGUID="907da41d-cb0e-475e-aba3-2669e2a3eef7" CreationDate="2022-11-28T09:41:19.530" UserId="567" Text="You can estimate gas consumption by doing a `query` first and then passing the value in your `tx`&#xD;&#xA;&#xD;&#xA;Have a look at this [doc][1] about how to use polkadotjs for WASM smart-contracts&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.astar.network/docs/builder-guides/XVM%20and%20WASM/interact_with_wasm_contract#weight-estimation" ContentLicense="CC BY-SA 4.0" />
  <row Id="23377" PostHistoryTypeId="2" PostId="6109" RevisionGUID="d1b7938f-b412-420c-894f-1946c85da44d" CreationDate="2022-11-28T10:50:58.463" UserId="94" Text="It is enough to just backup the Database folder. Normally that is located in `.local/share/` depending on which chain you use there is a sub-folder. You can change the location with the `-d` flag.  &#xD;&#xA;&#xD;&#xA;Another possibility is to use the block export and import, but it is much slower." ContentLicense="CC BY-SA 4.0" />
  <row Id="23379" PostHistoryTypeId="5" PostId="6103" RevisionGUID="7e2cfd6d-c189-40c0-b34a-d1d9df55f2f0" CreationDate="2022-11-28T10:54:40.853" UserId="2136" Comment="added 4 characters in body" Text="I have a substrate pallet with a number of extrinsics, some simple, some more complex. Depending on the chain state and the input variables, the amount of computation and the number of DB reads for the same extrinsic call can be quite different.&#xD;&#xA;&#xD;&#xA;I've done my weight annotations based on a worst-case scenario. I'm happy with those for estimating the transaction fees in advance.&#xD;&#xA;&#xD;&#xA;Now I'm trying to return the actual weight via DispatchResultWithPostInfo so that the transaction-payment pallet can calculate the real fee and return the difference to the user. I, perhaps naively, thought that the actual weight of an extrinsic call would be calculated for me somewhere and I could just pass this back in DispatchResultWithPostInfo, but this doesn't seem to be the case.&#xD;&#xA;&#xD;&#xA;So I've created a weight variable in each extrinsic which I update each time there is a DB read/write operation so that I have something to create my PostInfo that reflects what actually happened. This raises a few questions for me:&#xD;&#xA;&#xD;&#xA;1/ When do DB reads get cached, and should therefore not add extra weight?&#xD;&#xA;&#xD;&#xA;2/ How can I get the actual computation time? Or can I not and have to use estimates from benchmarking?&#xD;&#xA;&#xD;&#xA;3/ Is this really the best way to calculate the actual weight? I feel I have to be missing something.&#xD;&#xA;&#xD;&#xA;Thanks in advance for any help." ContentLicense="CC BY-SA 4.0" />
  <row Id="23380" PostHistoryTypeId="2" PostId="6110" RevisionGUID="233d1652-7aa7-47b2-929c-610653e85935" CreationDate="2022-11-28T11:02:20.900" UserId="85" Text="While one might assume that it would be Compact&lt;u64&gt; for ref_time and proof_size based on [weights v2 source][1], it appears that the answer is they are (not compact) `u32`s when reading this state.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/a92005a5092ebe6a636c96dcae814f9a378f5940/primitives/weights/src/weight_v2.rs#L29" ContentLicense="CC BY-SA 4.0" />
  <row Id="23382" PostHistoryTypeId="2" PostId="6111" RevisionGUID="5502c71b-ab6a-45a4-9f9b-fd3a0feedd6f" CreationDate="2022-11-28T11:17:36.040" UserId="94" Text="I assume the type that you are referring to is the storage type of `System.blockWeight()`.  &#xD;&#xA;It is defined as `PerDispatchClass&lt;Weight&gt;` (also called `ConsumedWeight`). The concrete `Weight` type is dependent in the runtime.  &#xD;&#xA;&#xD;&#xA;As example Polkadot:  &#xD;&#xA;To verify this you can head over to PolkadotJS and get the raw storage key for `System.blockWeight()` which is `0x26aa394eea5630e07c48ae0c9558cef734abf5cb34d6244378cddbf18e849d96`.  &#xD;&#xA;Then acquire a raw storage value for the last block, eg: `0xf0269f0d000000000000000000000000088d002374000000`.  &#xD;&#xA;This can then be decoded in Rust as such:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn test_decode_polkadot_works() {&#xD;&#xA;	use frame_support::dispatch::PerDispatchClass;&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	type ConsumedWeight = PerDispatchClass&lt;u64&gt;;&#xD;&#xA;&#xD;&#xA;	let data = hex::decode(&quot;f0269f0d000000000000000000000000100a0cd874000000&quot;).unwrap();&#xD;&#xA;	let decoded  = ConsumedWeight::decode(&amp;mut &amp;data[..]).unwrap();&#xD;&#xA;	let expected = ConsumedWeight::new(|c| match c {&#xD;&#xA;		DispatchClass::Normal =&gt; 228534000,&#xD;&#xA;		DispatchClass::Operational =&gt; 0,&#xD;&#xA;		DispatchClass::Mandatory =&gt; 501840874000,&#xD;&#xA;	});&#xD;&#xA;	assert_eq!(decoded, expected);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Whereas in Kusama you need to use `PerDispatchClass&lt;Weight&gt;` which is WeightV2. One possible storage value is `0xb2ff8917000000070565d0158800`. Eg:  &#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn test_decode_kusama_works() {&#xD;&#xA;	use frame_support::dispatch::PerDispatchClass;&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	type ConsumedWeight = PerDispatchClass&lt;Weight&gt;;&#xD;&#xA;&#xD;&#xA;	let data = hex::decode(&quot;b2ff8917000000070565d0158800&quot;).unwrap();&#xD;&#xA;	let decoded  = ConsumedWeight::decode(&amp;mut &amp;data[..]).unwrap();&#xD;&#xA;	let expected = ConsumedWeight::new(|c| match c {&#xD;&#xA;		DispatchClass::Normal =&gt; Weight::from_parts(98729964, 0),&#xD;&#xA;		DispatchClass::Operational =&gt; Weight::from_parts(0, 0),&#xD;&#xA;		DispatchClass::Mandatory =&gt; Weight::from_parts(584481531141, 0),&#xD;&#xA;	});&#xD;&#xA;	assert_eq!(decoded, expected);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Which used WeightV2, as you can see." ContentLicense="CC BY-SA 4.0" />
  <row Id="23384" PostHistoryTypeId="2" PostId="6112" RevisionGUID="49a494ff-06ff-4563-b870-dfa158652054" CreationDate="2022-11-28T13:08:13.130" UserId="3525" Text="I'm following [this tutorial][1]. My local node seems to run fine but I can't deploy. The &quot;Next&quot; button is greyed out and there is no message that says what's wrong. What am I missing?&#xD;&#xA;&#xD;&#xA;**Contracts-UI**&#xD;&#xA;[![Contracts-UI][2]][2]&#xD;&#xA;&#xD;&#xA;**Local node**&#xD;&#xA;[![node logs][3]][3]&#xD;&#xA;[![node logs][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/getting-started/deploy-your-contract&#xD;&#xA;  [2]: https://i.stack.imgur.com/yQwNQ.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/WEmSn.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/PbISE.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23386" PostHistoryTypeId="1" PostId="6112" RevisionGUID="49a494ff-06ff-4563-b870-dfa158652054" CreationDate="2022-11-28T13:08:13.130" UserId="3525" Text="Cannot deploy on Contracts-UI using local node" ContentLicense="CC BY-SA 4.0" />
  <row Id="23387" PostHistoryTypeId="3" PostId="6112" RevisionGUID="49a494ff-06ff-4563-b870-dfa158652054" CreationDate="2022-11-28T13:08:13.130" UserId="3525" Text="|substrate-node-template|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23388" PostHistoryTypeId="2" PostId="6113" RevisionGUID="d90f20f1-6416-4a41-af9c-ba12a1dd5738" CreationDate="2022-11-28T13:27:53.233" UserId="3526" Text="Looks like you are using the substrate node template repo. Try to use the [substrate-contracts-node][1] instead.&#xD;&#xA;&#xD;&#xA;## Install and run the node&#xD;&#xA;- Clone the repo: `git clone https://github.com/paritytech/substrate-contracts-node.git`&#xD;&#xA;- Checkout version v0.17: `git checkout v0.17.0`&#xD;&#xA;- There seem to be an issue with the --git flag in Cargo so I would recommend to clone the repo and use the `cargo install --path ./node/ --locked` command instead.&#xD;&#xA;- run the node with the following command: `substrate-contracts-node --dev`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="23390" PostHistoryTypeId="2" PostId="6114" RevisionGUID="b21fb84f-8546-4f92-a174-c0e1ec1c2a17" CreationDate="2022-11-28T17:59:54.050" UserId="3327" Text="How SQA team can test benchmarking functions that it is  logical correct and its really invoke computationally intensive path?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23392" PostHistoryTypeId="1" PostId="6114" RevisionGUID="b21fb84f-8546-4f92-a174-c0e1ec1c2a17" CreationDate="2022-11-28T17:59:54.050" UserId="3327" Text="How to Quality test the benchmarking functions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23393" PostHistoryTypeId="3" PostId="6114" RevisionGUID="b21fb84f-8546-4f92-a174-c0e1ec1c2a17" CreationDate="2022-11-28T17:59:54.050" UserId="3327" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23394" PostHistoryTypeId="50" PostId="3555" RevisionGUID="6383d0a8-012f-4caf-af85-dd8881592c08" CreationDate="2022-11-28T18:08:21.070" UserId="-1" />
  <row Id="23399" PostHistoryTypeId="2" PostId="6116" RevisionGUID="562a6cb5-9cd1-4bc4-ac65-d5893d1ce303" CreationDate="2022-11-28T18:44:22.390" UserId="3438" Text="Is it possible to get either block_number or block_hash of the nearest block for a given timestamp from python substrate interface?&#xD;&#xA;&#xD;&#xA;For example if i pass timestamp of 2022-11-28 10:00:00 (+UTC) I would get block [13121267][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/block/13121267" ContentLicense="CC BY-SA 4.0" />
  <row Id="23401" PostHistoryTypeId="1" PostId="6116" RevisionGUID="562a6cb5-9cd1-4bc4-ac65-d5893d1ce303" CreationDate="2022-11-28T18:44:22.390" UserId="3438" Text="Get a block based on timestamp from python substrate interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="23402" PostHistoryTypeId="3" PostId="6116" RevisionGUID="562a6cb5-9cd1-4bc4-ac65-d5893d1ce303" CreationDate="2022-11-28T18:44:22.390" UserId="3438" Text="|python|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23403" PostHistoryTypeId="10" PostId="6114" RevisionGUID="769cfdf3-d7bd-4d25-a463-50a92abc17ad" CreationDate="2022-11-28T19:39:33.883" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="23404" PostHistoryTypeId="2" PostId="6117" RevisionGUID="e528c7a4-51ce-46dd-bdbc-f7c2fcf257a8" CreationDate="2022-11-28T19:50:54.490" UserId="34" Text="_Opinion: It's almost always a &quot;no-no&quot; idea to manage keys for users directly and by default. This is anti-ethos in Web3._&#xD;&#xA;&#xD;&#xA;There are plenty of suggestions to start listed here for _users_ to create wallets: https://wiki.polkadot.network/docs/build-wallets&#xD;&#xA;&#xD;&#xA;Also checkout https://polkadot.network/blog/introducing-polkadot-kusama-gifts/ - this tool can be used to allow users to claim assets into a wallet they create.&#xD;&#xA;&#xD;&#xA;Also worth a read to understand how you might manage a more complicated accounting setup: https://www.parity.io/blog/building-a-hot-wallet-with-substrate-primitives/&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23406" PostHistoryTypeId="6" PostId="6107" RevisionGUID="efa4c822-d834-4a29-8ad0-6aa612391eea" CreationDate="2022-11-28T19:51:58.570" UserId="34" Comment="edited tags" Text="|database|snapshot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23407" PostHistoryTypeId="10" PostId="6107" RevisionGUID="4b72a5cc-1362-4545-919b-ee596982df6f" CreationDate="2022-11-28T19:52:29.627" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[436],&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="23408" PostHistoryTypeId="52" PostId="6112" RevisionGUID="803558f2-fae8-4ef1-b70b-f146c6325284" CreationDate="2022-11-28T21:08:21.530" />
  <row Id="23409" PostHistoryTypeId="5" PostId="6114" RevisionGUID="8b58aae4-6df2-44a1-9bd7-908fb7074c1e" CreationDate="2022-11-28T21:53:24.627" UserId="3327" Comment="added 102 characters in body; edited title" Text="The purpose of a benchmarking functions is to find the resources consumed by a functions in the worst case scenario. Is there any tools/methodlogy available so that , we can find the most resource intensive path of a function?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23410" PostHistoryTypeId="4" PostId="6114" RevisionGUID="8b58aae4-6df2-44a1-9bd7-908fb7074c1e" CreationDate="2022-11-28T21:53:24.627" UserId="3327" Comment="added 102 characters in body; edited title" Text="How to test a benchmarking funstions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23411" PostHistoryTypeId="4" PostId="6107" RevisionGUID="b4efe2be-ee2b-45e9-95b2-97ef36795d70" CreationDate="2022-11-29T05:02:23.727" UserId="3524" Comment="edited title" Text="What is the best available way to take substrate DB backup without stopping the service?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23417" PostHistoryTypeId="4" PostId="6100" RevisionGUID="601f5778-73da-4c33-83ca-2c7ce6b80432" CreationDate="2022-11-29T13:18:46.057" UserId="3319" Comment="edited title" Text="how to transform OpaqueExtrinsic to get the variables within the transaciton?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23418" PostHistoryTypeId="2" PostId="6119" RevisionGUID="b3455189-6625-4dad-9171-11f7d6685e43" CreationDate="2022-11-29T14:44:44.493" UserId="2809" Text="What's the best project setup to build an NPoS and EVM Compatible chain at this moment? &#xD;&#xA;Which version/branch of polkadot release to use? such as polkadot-v0.9.22 or polkadot-v0.9.18? &#xD;&#xA;Use ORML or Frontiers's EVM-Pallets?&#xD;&#xA;&#xD;&#xA;It looks to me any version above polkadot-v0.9.19 has the same issue. Adding EVM pallet to runtime and adding genesis accounds to genesis config causes StakingElection.failed and era stagnates and never changes, election never occurs, line in [this][1] question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3954/npos-with-aura-no-planned-era" ContentLicense="CC BY-SA 4.0" />
  <row Id="23420" PostHistoryTypeId="1" PostId="6119" RevisionGUID="b3455189-6625-4dad-9171-11f7d6685e43" CreationDate="2022-11-29T14:44:44.493" UserId="2809" Text="build NPOS EVM commpatible chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="23421" PostHistoryTypeId="3" PostId="6119" RevisionGUID="b3455189-6625-4dad-9171-11f7d6685e43" CreationDate="2022-11-29T14:44:44.493" UserId="2809" Text="|staking|frontier|evm|election|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23422" PostHistoryTypeId="2" PostId="6120" RevisionGUID="fc9ae436-320d-45c8-a767-73c99ff35618" CreationDate="2022-11-29T15:35:40.743" UserId="3327" Text="Is there a way to get the amount actual weight consumed when an extrinsic is executed" ContentLicense="CC BY-SA 4.0" />
  <row Id="23424" PostHistoryTypeId="1" PostId="6120" RevisionGUID="fc9ae436-320d-45c8-a767-73c99ff35618" CreationDate="2022-11-29T15:35:40.743" UserId="3327" Text="How to find the actual weight consumed by an extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23425" PostHistoryTypeId="3" PostId="6120" RevisionGUID="fc9ae436-320d-45c8-a767-73c99ff35618" CreationDate="2022-11-29T15:35:40.743" UserId="3327" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23426" PostHistoryTypeId="2" PostId="6121" RevisionGUID="ce57eddd-1187-42e5-acd1-3fee2aacc821" CreationDate="2022-11-29T16:11:41.873" UserId="3529" Text="I'm developing my own client using libp2p to connect to a substrate-based parachain (in this case I'm testing with moonbeam/moonriver).&#xD;&#xA;&#xD;&#xA;However, my client gets disconnected after a while with this error:&#xD;&#xA;&#xD;&#xA;    2022-11-29 17:04:02.095 DEBUG tokio-runtime-worker libp2p_swarm: [] Connection closed with error KeepAliveTimeout: Connected { endpoint: Listener { local_addr: &quot;/ip4/127.0.0.1/tcp/30333&quot;, send_back_addr: &quot;/ip4/127.0.0.1/tcp/9999&quot; }, peer_id: PeerId(&quot;12D3Koo...&quot;) }; Total (peer): 1.&#xD;&#xA;    2022-11-29 17:04:02.095 TRACE tokio-runtime-worker sub-libp2p: [] Libp2p =&gt; Disconnected(12D3Koo..., SetId(0), ConnectionId(136)): Enabled.&#xD;&#xA;    2022-11-29 17:04:02.095 TRACE tokio-runtime-worker sub-libp2p: [] Libp2p =&gt; Disconnected(12D3Koo..., SetId(1), ConnectionId(136)): Enabled.&#xD;&#xA;    2022-11-29 17:04:02.095 DEBUG tokio-runtime-worker sub-libp2p: [] Libp2p =&gt; Disconnected(PeerId(&quot;12D3Koo...&quot;), Some(KeepAliveTimeout))&#xD;&#xA;&#xD;&#xA;This then lowers my score and so on. I'd like to know what possible reasons are there to get this error so that I can try to fix them on my client." ContentLicense="CC BY-SA 4.0" />
  <row Id="23428" PostHistoryTypeId="1" PostId="6121" RevisionGUID="ce57eddd-1187-42e5-acd1-3fee2aacc821" CreationDate="2022-11-29T16:11:41.873" UserId="3529" Text="Connection closed with error KeepAliveTimeout" ContentLicense="CC BY-SA 4.0" />
  <row Id="23429" PostHistoryTypeId="3" PostId="6121" RevisionGUID="ce57eddd-1187-42e5-acd1-3fee2aacc821" CreationDate="2022-11-29T16:11:41.873" UserId="3529" Text="|parachain|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23430" PostHistoryTypeId="2" PostId="6122" RevisionGUID="88cf1529-ac4a-46da-b3b9-e364118345c1" CreationDate="2022-11-29T16:18:07.677" UserId="3331" Text="I'm compiling using the v0.9.32, any hint or solution?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0433]: failed to resolve: could not find `derive_prelude` in `swarm`&#xD;&#xA;  --&gt; /home/amrm/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/src/behaviour.rs:58:10&#xD;&#xA;   |&#xD;&#xA;58 | #[derive(NetworkBehaviour)]&#xD;&#xA;   |          ^^^^^^^^^^^^^^^^ could not find `derive_prelude` in `swarm`&#xD;&#xA;   |&#xD;&#xA;   = note: this error originates in the derive macro `NetworkBehaviour` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0432]: unresolved import `libp2p`&#xD;&#xA;  --&gt; /home/amrm/.cargo/git/checkouts/substrate-7e08433d4c370a21/5ea6d95/client/network/src/behaviour.rs:58:10&#xD;&#xA;   |&#xD;&#xA;58 | #[derive(NetworkBehaviour)]&#xD;&#xA;   |          ^^^^^^^^^^^^^^^^ could not find `derive_prelude` in `swarm`&#xD;&#xA;   |&#xD;&#xA;   = note: this error originates in the derive macro `NetworkBehaviour` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0432, E0433.&#xD;&#xA;For more information about an error, try `rustc --explain E0432`.&#xD;&#xA;error: could not compile `sc-network` due to 2 previous errors&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23432" PostHistoryTypeId="1" PostId="6122" RevisionGUID="88cf1529-ac4a-46da-b3b9-e364118345c1" CreationDate="2022-11-29T16:18:07.677" UserId="3331" Text="error: could not compile `sc-network` when compiling my parachain node in v0.9.32" ContentLicense="CC BY-SA 4.0" />
  <row Id="23433" PostHistoryTypeId="3" PostId="6122" RevisionGUID="88cf1529-ac4a-46da-b3b9-e364118345c1" CreationDate="2022-11-29T16:18:07.677" UserId="3331" Text="|parachain|substrate-contracts-node|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23434" PostHistoryTypeId="2" PostId="6123" RevisionGUID="0b8a0bbb-4c7c-484a-b876-089794ebca63" CreationDate="2022-11-29T18:59:01.200" UserId="73" Text="This was a bug in `libp2p`. They had released a breaking change as patch release. It fixed now in [libp2p][1] and they also yanked the problematic crate. Make sure that you are using version `0.30.2` of `libp2p-swarm-derive`. Reverting your `Cargo.lock` should fix it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/libp2p/rust-libp2p/pull/3178" ContentLicense="CC BY-SA 4.0" />
  <row Id="23436" PostHistoryTypeId="2" PostId="6124" RevisionGUID="755ba63e-941f-4aa1-9478-3d5a159d36f9" CreationDate="2022-11-29T19:32:15.187" UserId="73" Text="Substrate is build in the way that the runtime and the node are separate from each other. The node should not be able to interpret transaction as the runtime can upgrade at any point, which may also changes the transaction encoding. A proper solution here would be to define your own runtime api. Something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sp_api::decl_runtime_apis! {&#xD;&#xA;    trait CheckExtrinsics&lt;Block: BlockT&gt; {&#xD;&#xA;        fn contains_special_extrinsics(extrinsics: Vec&lt;Block::Extrinsic&gt;) -&gt; bool;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then in your code you run this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;if let Some(block_extrinsics) = &amp;block.body&#xD;&#xA;{&#xD;&#xA;    if client.runtime_api().contains_special_extrinsics(block_extrinsics.clone())? {&#xD;&#xA;        // do something&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In your runtime you then need to implement the runtime api in whatever way you want." ContentLicense="CC BY-SA 4.0" />
  <row Id="23438" PostHistoryTypeId="50" PostId="5572" RevisionGUID="bb596449-5e8b-4f14-8ebe-2429f9069850" CreationDate="2022-11-29T20:07:40.973" UserId="-1" />
  <row Id="23439" PostHistoryTypeId="2" PostId="6125" RevisionGUID="4b0c4edf-db17-4781-8279-d51479913786" CreationDate="2022-11-29T20:59:39.220" UserId="94" Text="You mean within a call? No. In contracts there is something like `gas_left` which returns you the remaining gas, but not in FRAME.   &#xD;&#xA;After the call: yes. An extrinsic emits a `System::ExtrinsicSuccess` event which contains the post-dispatch corrected weight. Something like:  &#xD;&#xA;```pre&#xD;&#xA;System::ExtrinsicSuccess {&#xD;&#xA;  weight: {&#xD;&#xA;    refTime: 123,127,795&#xD;&#xA;    proofSize: 0&#xD;&#xA;  }&#xD;&#xA;  class: Normal&#xD;&#xA;  paysFee: Yes&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you actually want to re-benchmark past blocks you can use the [`benchmark block`](https://github.com/paritytech/substrate/tree/master/utils/frame/benchmarking-cli/src/block#the-benchmark-block-command) command to re-execute historic blocks from a chain snapshot. It then compares that to the declared weight of the block, which is described here. Example output:  &#xD;&#xA;```pre&#xD;&#xA;$ cargo run --profile=production -- benchmark block --from 9939453 --to 9939462 --db paritydb&#xD;&#xA;&#xD;&#xA;Block 9939453 with     2 tx used   4.57% of its weight (    26,458,801 of    579,047,053 ns)&#xD;&#xA;Block 9939454 with     3 tx used   4.80% of its weight (    28,335,826 of    590,414,831 ns)&#xD;&#xA;Block 9939455 with     2 tx used   4.76% of its weight (    27,889,567 of    586,484,595 ns)&#xD;&#xA;```&#xD;&#xA;By the nature of weight it needs to be run on the same reference hardware, otherwise the execution time will be off.  &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23441" PostHistoryTypeId="50" PostId="5612" RevisionGUID="c8bc0e68-a447-433b-bde0-4004ec47d85d" CreationDate="2022-11-29T21:04:15.463" UserId="-1" />
  <row Id="23446" PostHistoryTypeId="5" PostId="6117" RevisionGUID="e30a29a2-aa44-4bf3-b8c6-c40110545e49" CreationDate="2022-11-30T01:57:17.373" UserId="34" Comment="added 34 characters in body" Text="_Opinion: It's almost always a bad idea to manage keys for users directly and by default. This is anti-ethos in Web3._&#xD;&#xA;&#xD;&#xA;There are plenty of suggestions to start listed here for _users_ to create wallets: https://wiki.polkadot.network/docs/build-wallets&#xD;&#xA;&#xD;&#xA;Checkout https://polkadot.network/blog/introducing-polkadot-kusama-gifts/ - this tool can be used to allow users to claim assets into a wallet they create. Source: https://github.com/hamidra/dotdrop&#xD;&#xA;&#xD;&#xA;Also worth a read to understand how you might manage a more complicated accounting setup: https://www.parity.io/blog/building-a-hot-wallet-with-substrate-primitives/&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23447" PostHistoryTypeId="2" PostId="6127" RevisionGUID="f65a28d1-7d84-4202-8e48-d3ab38b6c513" CreationDate="2022-11-30T05:30:05.440" UserId="3136" Text="i got solution of this from [runtime upgrade error][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**solution is :- If there are changes not only to the runtime but also to the node, then this issue is normally caused by upgrading the runtime before upgrading the client.**&#xD;&#xA;&#xD;&#xA;**Try upgrading the client, then the runtime.**&#xD;&#xA;&#xD;&#xA;but i don't know how to upgrade the client? How can i upgrade the client?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2554/runtime-upgrade-error-host-doesnt-provide-such-function-envext-storage-root&#xD;&#xA;  [2]: https://i.stack.imgur.com/qJa38.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23449" PostHistoryTypeId="1" PostId="6127" RevisionGUID="f65a28d1-7d84-4202-8e48-d3ab38b6c513" CreationDate="2022-11-30T05:30:05.440" UserId="3136" Text="Getting Error while Runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="23450" PostHistoryTypeId="3" PostId="6127" RevisionGUID="f65a28d1-7d84-4202-8e48-d3ab38b6c513" CreationDate="2022-11-30T05:30:05.440" UserId="3136" Text="|polkadot-js|substrate-node-template|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23451" PostHistoryTypeId="2" PostId="6128" RevisionGUID="b46bc83b-e110-4b66-9074-653b70b556d0" CreationDate="2022-11-30T06:52:13.960" UserId="2449" Text="By settting `&gt;=2` local nodes and make some calls to ensure p2p is working&#xD;&#xA;or refer to&#xD;&#xA;https://docs.substrate.io/tutorials/get-started/simulate-network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="23453" PostHistoryTypeId="2" PostId="6129" RevisionGUID="9656b1b4-e93d-4ba9-8ce7-d870a9477661" CreationDate="2022-11-30T08:46:11.647" UserId="3317" Text="You can upgrade your node by stopping the node, compile the new code (`cargo build --release`) and run the new binary (`./target/...`). " ContentLicense="CC BY-SA 4.0" />
  <row Id="23455" PostHistoryTypeId="5" PostId="6129" RevisionGUID="11565da1-5049-46e2-a1a3-43c48b98b8ed" CreationDate="2022-11-30T09:14:32.530" UserId="3317" Comment="added 256 characters in body" Text="You can upgrade your node by stopping the node, compile the new code (`cargo build --release`) and run the new binary (`./target/...`).&#xD;&#xA;&#xD;&#xA;And to give an example for the error. When there is a new host function in the client which did not exist yet in an older client version, and the upgraded runtime uses this new host function. You need to upgrade the client otherwise you'll get an error." ContentLicense="CC BY-SA 4.0" />
  <row Id="23456" PostHistoryTypeId="2" PostId="6130" RevisionGUID="671a600c-0f6a-4080-8399-838a5a7324de" CreationDate="2022-11-30T09:16:36.743" UserId="496" Text="```brew install protobuf``` fixed the issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="23458" PostHistoryTypeId="2" PostId="6131" RevisionGUID="e39b9626-c2b8-433a-afdc-5fb561feb4a0" CreationDate="2022-11-30T09:27:55.017" UserId="496" Text="Im trying to deploy INK! 3.3.0 smart contract to my local substrate node and Im getting &#xD;&#xA;```CodeRejected; Can't decode wasm code```.&#xD;&#xA;&#xD;&#xA;When I compile my code i get no errors and using the following command to compile and build the smart contract:&#xD;&#xA;&#xD;&#xA;```cargo +nightly-2022-08-15 contract build```&#xD;&#xA;&#xD;&#xA;**Note**: &#xD;&#xA;&#xD;&#xA; * I was able to deploy the contract not long ago, i think its stopped work after i updated rustup nightly.&#xD;&#xA; &#xD;&#xA; * I get no error from the substrate console ```./target/release/node-template --dev -l error,debug```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Rustc nightly version: ```rustc 1.67.0-nightly (b3bc6bf31 2022-11-24)```&#xD;&#xA;&#xD;&#xA;Im using MacBook Pro M1 Pro chip (13.0.1 (22A400) version)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23460" PostHistoryTypeId="1" PostId="6131" RevisionGUID="e39b9626-c2b8-433a-afdc-5fb561feb4a0" CreationDate="2022-11-30T09:27:55.017" UserId="496" Text="&quot;CodeRejected&quot; when trying to deploy INK smart contract using M1 pro" ContentLicense="CC BY-SA 4.0" />
  <row Id="23461" PostHistoryTypeId="3" PostId="6131" RevisionGUID="e39b9626-c2b8-433a-afdc-5fb561feb4a0" CreationDate="2022-11-30T09:27:55.017" UserId="496" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23462" PostHistoryTypeId="2" PostId="6132" RevisionGUID="19408ded-00c3-48c3-ab0b-63af2283d67d" CreationDate="2022-11-30T09:36:58.817" UserId="496" Text="Adding ```--optimization-passes=0``` to the contract build command will fix the issue (only a work-a-round until offical fix)" ContentLicense="CC BY-SA 4.0" />
  <row Id="23464" PostHistoryTypeId="5" PostId="6119" RevisionGUID="e1f92f5b-20ad-48b3-879d-c8fcf3b0bf82" CreationDate="2022-11-30T09:48:04.863" UserId="2809" Comment="added 358 characters in body" Text="What's the best project setup to build an NPoS and EVM Compatible chain at this moment? &#xD;&#xA;Which version/branch of polkadot release to use? such as polkadot-v0.9.22 or polkadot-v0.9.18? &#xD;&#xA;Use ORML or Frontiers's EVM-Pallets?&#xD;&#xA;&#xD;&#xA;It looks to me any version above polkadot-v0.9.19 has the same issue. Adding EVM pallet to runtime and adding genesis accounds to genesis config causes StakingElection.failed and era stagnates and never changes, election never occurs, line in [this][1] question.&#xD;&#xA;&#xD;&#xA;EDIT 1:&#xD;&#xA;I have implemented NPoS using ElectionProviderMultiPhase and pallet Staking, and EVM using frontier's EVM pallets using branches polkadot-v0.9.22 version. Here are the logs and the error that shows up.&#xD;&#xA;&#xD;&#xA;[![terminal logs][2]][2]&#xD;&#xA;&#xD;&#xA;[![explorer logs][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3954/npos-with-aura-no-planned-era&#xD;&#xA;  [2]: https://i.stack.imgur.com/JGQdB.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/s19PY.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="23465" PostHistoryTypeId="5" PostId="4095" RevisionGUID="8c3ba3e8-11c2-411c-ba5b-ca93429e9232" CreationDate="2022-11-30T09:50:37.097" UserId="2809" Comment="added 275 characters in body" Text="As the title says, I have added EVM Compatibility to my NPoS runtime(using [chainsafe/substrate-node-template](https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking)), and when i run my node with Alice and Bob validators, the StakingElection begins to fail.&#xD;&#xA;&#xD;&#xA;**NOTE** The chainsafe template had an issue where eras didn't change hence no election occured, but I have solved that with [this pr](https://github.com/ChainSafe/substrate-node-template/pull/4), the NPoS election works fine not having added the EVM pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**UPDATE 1** I have added pallet_ethereum, changed SubstrateBlockHashMapping to EthereuBlockhashMapping, still the same issue.&#xD;&#xA;If I remove all EVM related stuff, my NPoS works fine. Solution is submitted, election is finalized and a new authority set is chosen.&#xD;&#xA;&#xD;&#xA;**UPDATE 2**&#xD;&#xA;I forgot to add an image of whaat should normally happen(when pallet_evm is not installed)&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;**UPDATE 3**&#xD;&#xA;Here is the branch and repo in question [here][3]&#xD;&#xA;&#xD;&#xA;**UPDATE 4**&#xD;&#xA;It appears using fp_evm::GenesisAccount to create and endow some test accounts in chain_spec for EVMConfig breaks the NPoS election for both polkadotv0.9.22 and polkadotv0.9.25, without endowed test accounts I cannot test any of the EVM compatibility. &#xD;&#xA;It looks like fp_evm is causing the break. Is this an active issue? and will Frontier be fixing this?&#xD;&#xA;**Note** that I am not working with a parachain, it is a **standalone** chain with EVM compatability,&#xD;&#xA;&#xD;&#xA;**UPDATE 5**&#xD;&#xA;I have added 5 accounts in EVMGenesis config, but looks there aren't any&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;**UPDATE 6**&#xD;&#xA;In the block where StakingElection fails, logs show there are 2 consensus engines.&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;**LATEST UPDATE** &#xD;&#xA;Hey guys! I have figured out how to look at node's logs, and here are the results. Can someone please help?&#xD;&#xA;[![terminal logs][6]][6]&#xD;&#xA;&#xD;&#xA;[![explorer logs][7]][7]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2pO2q.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/t6yQZ.png&#xD;&#xA;  [3]: https://github.com/talhadaar/chainsafe-substrate-node-template/tree/question&#xD;&#xA;  [4]: https://i.stack.imgur.com/Pbvrm.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/28FGD.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/jfM0Y.jpg&#xD;&#xA;  [7]: https://i.stack.imgur.com/GdbWw.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="23466" PostHistoryTypeId="2" PostId="6133" RevisionGUID="533585cf-28c1-41ec-bf01-09cdff4dfc46" CreationDate="2022-11-30T09:53:49.063" UserId="1947" Text="Recently did a runtime upgrade on our node which broke all existing ink contracts. Later included the pallet contracts migration in Executive Type which fixed the issue. My impression was all runtime upgrade defined in pallets were invoked by default on forkless upgrade. Do we really need to invoke each migration from Executive?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23468" PostHistoryTypeId="1" PostId="6133" RevisionGUID="533585cf-28c1-41ec-bf01-09cdff4dfc46" CreationDate="2022-11-30T09:53:49.063" UserId="1947" Text="Are pallet migrations triggered automatically by default or we need to pass each pallets migration explicitly in Executive Type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23469" PostHistoryTypeId="3" PostId="6133" RevisionGUID="533585cf-28c1-41ec-bf01-09cdff4dfc46" CreationDate="2022-11-30T09:53:49.063" UserId="1947" Text="|pallet|runtime-upgrade|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23470" PostHistoryTypeId="5" PostId="6129" RevisionGUID="85bd5a48-6c61-4c63-b4dc-5c140858f7c0" CreationDate="2022-11-30T10:12:13.497" UserId="3317" Comment="added 9 characters in body" Text="You can upgrade the client by stopping the node, compile the new code (`cargo build --release`) and run the new binary (`./target/...`).&#xD;&#xA;&#xD;&#xA;And to give an example for the error. When there is a new host function in the client which did not exist yet in an older client version, and the upgraded runtime uses this new host function. You need to upgrade the client otherwise you'll get an error." ContentLicense="CC BY-SA 4.0" />
  <row Id="23471" PostHistoryTypeId="2" PostId="6134" RevisionGUID="24e9e435-2e75-443e-b833-ee3735e5343c" CreationDate="2022-11-30T10:48:37.933" UserId="3317" Text="First, the transaction_payment pallet does this for you with [compute_actual_fee][1] from the [post_dispatch][2] and configuring it in your runtime with ChargeTransactionPatment, as done in [Kusama][3] (compute_actual_fee isn't used in the logic but this is how to configure it). Some additional [info][4].&#xD;&#xA;&#xD;&#xA;Going to your questions.&#xD;&#xA;1) The first thing that needs to be understood is the existence of a Storage Overlay, which caches values which have been read or written to inside of a block. This means, if you read a storage item, the first time, it will need to navigate through the whole merkle trie, and fetch that storage item. But the second time, it just reads from the storage overlay, since that value has been cached by the client ([ref][5]).&#xD;&#xA;&#xD;&#xA;2) Correct, you should benchmark. Regarding your cache concern, the benchmarking tool/framework is smart enough to know that the reads that are cached don't add up the same cost as a read from db ([ref][6]). &#xD;&#xA;&#xD;&#xA;Just in case, for benchmarking in general, check out what [whitelisting][7] is.&#xD;&#xA;&#xD;&#xA;3) Correct again, based on your benchmark results you should do weight annotations based on a worst-case scenario. The post_dispatch will handle the difference between the worst-case and actual weight.&#xD;&#xA;&#xD;&#xA;For people who like to watch a in-depth video about benchmarking, watch the [substrate seminar][8] about it!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L552&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L820&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs/#L785&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/5859/how-the-transaction-payment-pallet-handles-transaction-fee-of-every-extrinsic&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/2574/clarity-on-storage-read-write-caching&#xD;&#xA;  [6]: https://substrate.stackexchange.com/questions/2493/do-benchmarks-consider-cached-reads&#xD;&#xA;  [7]: https://substrate.stackexchange.com/questions/4207/benchmarking-whitelist/4231#4231&#xD;&#xA;  [8]: https://www.youtube.com/watch?v=Qa6sTyUqgek" ContentLicense="CC BY-SA 4.0" />
  <row Id="23473" PostHistoryTypeId="5" PostId="6134" RevisionGUID="e596ac49-5c38-43d7-a6d8-aa92f577a359" CreationDate="2022-11-30T10:55:04.923" UserId="3317" Comment="added 206 characters in body" Text="First, the [transaction_payment pallet][1] does this for you with [compute_actual_fee][2] from the [post_dispatch][3] and configuring it in your runtime with `ChargeTransactionPatment`, as done in [Kusama][4] (`compute_actual_fee` isn't applied in this case but this is how to configure it). Some additional [info][5].&#xD;&#xA;&#xD;&#xA;Going to your questions.&#xD;&#xA;1) The first thing that needs to be understood is the existence of a [Storage Overlay][6], which caches values which have been read or written to inside of a block. This means, if you read a storage item, the first time, it will need to navigate through the whole merkle trie, and fetch that storage item. But the second time, it just reads from the storage overlay, since that value has been cached by the client ([ref][7]).&#xD;&#xA;&#xD;&#xA;2) Correct, you should benchmark. Regarding your cache concern, the benchmarking tool/framework is smart enough to know that the reads that are cached don't add up the same cost as a read from db ([ref][8]). &#xD;&#xA;&#xD;&#xA;Just in case, for benchmarking in general, check out what [whitelisting][9] is.&#xD;&#xA;&#xD;&#xA;3) Correct again, based on your benchmark results you should do weight annotations based on a worst-case scenario. The post_dispatch will handle the difference between the worst-case and actual weight.&#xD;&#xA;&#xD;&#xA;For people who like to watch a in-depth video about benchmarking, watch the [substrate seminar][10] about it!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L552&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L820&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs/#L785&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5859/how-the-transaction-payment-pallet-handles-transaction-fee-of-every-extrinsic&#xD;&#xA;  [6]: https://www.shawntabrizi.com/assets/presentations/substrate-storage-deep-dive.pdf&#xD;&#xA;  [7]: https://substrate.stackexchange.com/questions/2574/clarity-on-storage-read-write-caching&#xD;&#xA;  [8]: https://substrate.stackexchange.com/questions/2493/do-benchmarks-consider-cached-reads&#xD;&#xA;  [9]: https://substrate.stackexchange.com/questions/4207/benchmarking-whitelist/4231#4231&#xD;&#xA;  [10]: https://www.youtube.com/watch?v=Qa6sTyUqgek" ContentLicense="CC BY-SA 4.0" />
  <row Id="23474" PostHistoryTypeId="5" PostId="6134" RevisionGUID="8be98ead-02b5-49c5-845a-4f65ec927da7" CreationDate="2022-11-30T11:01:33.577" UserId="3138" Comment="Corrected spelling of ChargeTransactionPayment and added a little more info on signed extensions" Text="First, the [transaction_payment pallet][1] does this for you with [compute_actual_fee][2] from the [post_dispatch][3] and configuring it in your runtime with the `ChargeTransactionPayment` signed extension via `SignedExtra`, as done in [Kusama][4] (`compute_actual_fee` isn't applied in this case but this is how to configure it). Some additional [info][5].&#xD;&#xA;&#xD;&#xA;Going to your questions.&#xD;&#xA;1) The first thing that needs to be understood is the existence of a [Storage Overlay][6], which caches values which have been read or written to inside of a block. This means, if you read a storage item, the first time, it will need to navigate through the whole merkle trie, and fetch that storage item. But the second time, it just reads from the storage overlay, since that value has been cached by the client ([ref][7]).&#xD;&#xA;&#xD;&#xA;2) Correct, you should benchmark. Regarding your cache concern, the benchmarking tool/framework is smart enough to know that the reads that are cached don't add up the same cost as a read from db ([ref][8]). &#xD;&#xA;&#xD;&#xA;Just in case, for benchmarking in general, check out what [whitelisting][9] is.&#xD;&#xA;&#xD;&#xA;3) Correct again, based on your benchmark results you should do weight annotations based on a worst-case scenario. The `post_dispatch` will handle the difference between the worst-case and actual weight.&#xD;&#xA;&#xD;&#xA;For people who like to watch a in-depth video about benchmarking, watch the [substrate seminar][10] about it!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L552&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L820&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs/#L785&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5859/how-the-transaction-payment-pallet-handles-transaction-fee-of-every-extrinsic&#xD;&#xA;  [6]: https://www.shawntabrizi.com/assets/presentations/substrate-storage-deep-dive.pdf&#xD;&#xA;  [7]: https://substrate.stackexchange.com/questions/2574/clarity-on-storage-read-write-caching&#xD;&#xA;  [8]: https://substrate.stackexchange.com/questions/2493/do-benchmarks-consider-cached-reads&#xD;&#xA;  [9]: https://substrate.stackexchange.com/questions/4207/benchmarking-whitelist/4231#4231&#xD;&#xA;  [10]: https://www.youtube.com/watch?v=Qa6sTyUqgek" ContentLicense="CC BY-SA 4.0" />
  <row Id="23475" PostHistoryTypeId="24" PostId="6134" RevisionGUID="8be98ead-02b5-49c5-845a-4f65ec927da7" CreationDate="2022-11-30T11:01:33.577" Comment="Proposed by 3138 approved by 3317 edit id of 346" ContentLicense="CC BY-SA 4.0" />
  <row Id="23476" PostHistoryTypeId="5" PostId="6134" RevisionGUID="2e1e898f-1cf2-4557-a3a9-e8f4a0d15be2" CreationDate="2022-11-30T11:37:53.620" UserId="3317" Comment="deleted 82 characters in body" Text="First, the [transaction_payment pallet][1] does this for you with [compute_actual_fee][2] from the [post_dispatch][3] and configuring it in your runtime with the `ChargeTransactionPayment` signed extension via `SignedExtra`, as done in [Kusama][4]. Some additional [info][5].&#xD;&#xA;&#xD;&#xA;Going to your questions.&#xD;&#xA;1) The first thing that needs to be understood is the existence of a [Storage Overlay][6], which caches values which have been read or written to inside of a block. This means, if you read a storage item, the first time, it will need to navigate through the whole merkle trie, and fetch that storage item. But the second time, it just reads from the storage overlay, since that value has been cached by the client ([ref][7]).&#xD;&#xA;&#xD;&#xA;2) Correct, you should benchmark. Regarding your cache concern, the benchmarking tool/framework is smart enough to know that the reads that are cached don't add up the same cost as a read from db ([ref][8]). &#xD;&#xA;&#xD;&#xA;Just in case, for benchmarking in general, check out what [whitelisting][9] is.&#xD;&#xA;&#xD;&#xA;3) Correct again, based on your benchmark results you should do weight annotations based on a worst-case scenario. The `post_dispatch` will handle the difference between the worst-case and actual weight.&#xD;&#xA;&#xD;&#xA;For people who like to watch a in-depth video about benchmarking, watch the [substrate seminar][10] about it!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L552&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L820&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs/#L785&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5859/how-the-transaction-payment-pallet-handles-transaction-fee-of-every-extrinsic&#xD;&#xA;  [6]: https://www.shawntabrizi.com/assets/presentations/substrate-storage-deep-dive.pdf&#xD;&#xA;  [7]: https://substrate.stackexchange.com/questions/2574/clarity-on-storage-read-write-caching&#xD;&#xA;  [8]: https://substrate.stackexchange.com/questions/2493/do-benchmarks-consider-cached-reads&#xD;&#xA;  [9]: https://substrate.stackexchange.com/questions/4207/benchmarking-whitelist/4231#4231&#xD;&#xA;  [10]: https://www.youtube.com/watch?v=Qa6sTyUqgek" ContentLicense="CC BY-SA 4.0" />
  <row Id="23477" PostHistoryTypeId="2" PostId="6135" RevisionGUID="0265b430-397b-427f-9dcc-6df1b97b2ce1" CreationDate="2022-11-30T12:07:25.923" UserId="94" Text="Yes. You need to include the migrations into the `Executive` type of your runtime.  &#xD;&#xA;The pallet itself can also have a `on_runtime_upgrade` hook, but normally we dont use that anymore.  &#xD;&#xA;&#xD;&#xA;Migrations now use the [OnRuntimeUpgrade](https://github.com/paritytech/substrate/blob/8161ee1aa1ccd122150e40a8aef23df3d0a16d02/frame/support/src/traits/hooks.rs#L125) trait which allows for better testing. For a relay chain it could be fine to run all migrations automatically, but for a para-chain you need to consider the block weight limit.  &#xD;&#xA;If you just run all migrations in the same block per default without means of preventing it; it could result in an over-weight block.&#xD;&#xA;&#xD;&#xA;But it is probably a good idea to add some automatic testing that checks that all migrations are included -  or at least going to be included soon." ContentLicense="CC BY-SA 4.0" />
  <row Id="23479" PostHistoryTypeId="5" PostId="6134" RevisionGUID="2b703f33-2fc2-4beb-b479-7955a6350076" CreationDate="2022-11-30T13:06:07.710" UserId="3317" Comment="added 511 characters in body" Text="First, the [transaction_payment pallet][1] does this for you with [compute_actual_fee][2] from the [post_dispatch][3] and configuring it in your runtime with the `ChargeTransactionPayment` signed extension via `SignedExtra`, as done in [Kusama][4]. Some additional [info][5].&#xD;&#xA;&#xD;&#xA;Going to your questions.&#xD;&#xA;1) The first thing that needs to be understood is the existence of a [Storage Overlay][6], which caches values which have been read or written to inside of a block. This means, if you read a storage item, the first time, it will need to navigate through the whole merkle trie, and fetch that storage item. But the second time, it just reads from the storage overlay, since that value has been cached by the client ([ref][7]).&#xD;&#xA;&#xD;&#xA;2) Correct, you should benchmark. Regarding your cache concern, the benchmarking tool/framework is smart enough to know that the reads that are cached don't add up the same cost as a read from db ([ref][8]). &#xD;&#xA;&#xD;&#xA;Just in case, for benchmarking in general, check out what [whitelisting][9] is.&#xD;&#xA;&#xD;&#xA;3) Correct again, based on your benchmark results you should do weight annotations based on a worst-case scenario. The `post_dispatch` will handle the difference between the worst-case and actual weight. In the official FRAME docs the weights are generated dynamically with a weight function in the weight.rs file. You could consider this &quot;the best way&quot;.&#xD;&#xA;&#xD;&#xA;Example for answer three: &#xD;&#xA;- extrinsic: [frame/identity/src/lib.rs][10]&#xD;&#xA;- dynamic weight function: [frame/identity/src/weight.rs][11]&#xD;&#xA;&#xD;&#xA;For people who like to watch a in-depth video about benchmarking, watch the [substrate seminar][12] about it!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L552&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L820&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs/#L785&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5859/how-the-transaction-payment-pallet-handles-transaction-fee-of-every-extrinsic&#xD;&#xA;  [6]: https://www.shawntabrizi.com/assets/presentations/substrate-storage-deep-dive.pdf&#xD;&#xA;  [7]: https://substrate.stackexchange.com/questions/2574/clarity-on-storage-read-write-caching&#xD;&#xA;  [8]: https://substrate.stackexchange.com/questions/2493/do-benchmarks-consider-cached-reads&#xD;&#xA;  [9]: https://substrate.stackexchange.com/questions/4207/benchmarking-whitelist/4231#4231&#xD;&#xA;  [10]: https://github.com/paritytech/substrate/blob/357c363f2fbd1ea53687e90d0ca15677c4468b10/frame/identity/src/lib.rs#L288&#xD;&#xA;  [11]: https://github.com/paritytech/substrate/blob/master/frame/identity/src/weights.rs#L73&#xD;&#xA;  [12]: https://www.youtube.com/watch?v=Qa6sTyUqgek" ContentLicense="CC BY-SA 4.0" />
  <row Id="23480" PostHistoryTypeId="52" PostId="6127" RevisionGUID="597c550e-6e69-47c4-b451-4dc32e69dec0" CreationDate="2022-11-30T13:33:22.443" />
  <row Id="23481" PostHistoryTypeId="5" PostId="6129" RevisionGUID="62cbaea3-ba3b-42ab-980c-bb97c8d37a56" CreationDate="2022-11-30T14:13:24.813" UserId="3317" Comment="added 359 characters in body" Text="From the link you shared, you want to upgrade your node to a newer substrate version. If the newer substrate version only requires changes in the runtime, you can do a runtime upgrade &quot;on-chain&quot; (it is not required to shut down the node). However, if the newer substrate version requires changes in the client side , you need to do a client upgrade. &#xD;&#xA;&#xD;&#xA;You can upgrade the client by stopping the node, compile the new code (`cargo build --release`) and run the new binary (`./target/...`).&#xD;&#xA;&#xD;&#xA;And to give an example for the error. When there is a new host function in the client which did not exist yet in an older client version, and the upgraded runtime uses this new host function. You need to upgrade the client otherwise you'll get such an error." ContentLicense="CC BY-SA 4.0" />
  <row Id="23482" PostHistoryTypeId="2" PostId="6136" RevisionGUID="4d0684b1-e270-4f97-80eb-ea35ff9e6fec" CreationDate="2022-11-30T14:28:26.377" UserId="3531" Text="### Description of bug&#xD;&#xA;&#xD;&#xA;I was trying to follow this tutorial https://docs.substrate.io/tutorials/get-started/build-local-blockchain/#install-the-front-end-template but after doing `yarn start` I get the error &quot;Error Connecting to Substrate Connection to websocket 'ws://127.0.0.1:9944/' failed.&quot; on http://localhost:8000/&#xD;&#xA;&#xD;&#xA;Doing `yarn install` also gives me those warnings if they are relevant &#xD;&#xA;```&#xD;&#xA;➤ YN0000: ┌ Resolution step&#xD;&#xA;➤ YN0002: │ eslint-config-react-app@npm:7.0.0 [9c894] doesn't provide @babel/plugin-syntax-flow (p4202d), requested by eslint-plugin-flowtype&#xD;&#xA;➤ YN0002: │ eslint-config-react-app@npm:7.0.0 [9c894] doesn't provide @babel/plugin-transform-react-jsx (pb90d4), requested by eslint-plugin-flowtype&#xD;&#xA;➤ YN0002: │ react-dev-utils@npm:12.0.0 doesn't provide typescript (p08c91), requested by fork-ts-checker-webpack-plugin&#xD;&#xA;➤ YN0002: │ react-dev-utils@npm:12.0.0 doesn't provide webpack (pf80ce), requested by fork-ts-checker-webpack-plugin&#xD;&#xA;➤ YN0002: │ react-scripts@npm:5.0.0 [9c894] doesn't provide autoprefixer (p5a5c8), requested by tailwindcss&#xD;&#xA;➤ YN0002: │ substrate-front-end-template@workspace:. doesn't provide webpack (p9e29f), requested by node-polyfill-webpack-plugin&#xD;&#xA;➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements &lt;hash&gt; for details, where &lt;hash&gt; is the six-letter p-prefixed code&#xD;&#xA;➤ YN0000: └ Completed in 0s 227ms&#xD;&#xA;➤ YN0000: ┌ Fetch step&#xD;&#xA;➤ YN0000: └ Completed in 0s 577ms&#xD;&#xA;➤ YN0000: ┌ Link step&#xD;&#xA;➤ YN0076: │ fsevents@patch:fsevents@npm%3A2.3.2#~builtin&lt;compat/fsevents&gt;::version=2.3.2&amp;hash=18f3a7 The linux-x64 architecture is incompatible with this module, link skipped.&#xD;&#xA;➤ YN0000: └ Completed in 0s 853ms&#xD;&#xA;➤ YN0000: Done with warnings in 1s 760ms&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;    Im on wsl2 Ubuntu 22.04.01 LTS&#xD;&#xA;    yarn version: 3.1.1&#xD;&#xA;    node version: v16.14.0&#xD;&#xA;    npm version: 9.1.2&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Steps to reproduce&#xD;&#xA;&#xD;&#xA;    git clone https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;    cd substrate-front-end-template&#xD;&#xA;    yarn install&#xD;&#xA;    yarn start" ContentLicense="CC BY-SA 4.0" />
  <row Id="23484" PostHistoryTypeId="1" PostId="6136" RevisionGUID="4d0684b1-e270-4f97-80eb-ea35ff9e6fec" CreationDate="2022-11-30T14:28:26.377" UserId="3531" Text="Error Connecting to Substrate Connection to websocket 'ws://127.0.0.1:9944/' failed substrate-frontend-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="23485" PostHistoryTypeId="3" PostId="6136" RevisionGUID="4d0684b1-e270-4f97-80eb-ea35ff9e6fec" CreationDate="2022-11-30T14:28:26.377" UserId="3531" Text="|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23486" PostHistoryTypeId="10" PostId="6136" RevisionGUID="8d214227-1446-4e63-a429-c63b9b876ede" CreationDate="2022-11-30T16:27:12.613" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[3942],&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="23487" PostHistoryTypeId="2" PostId="6137" RevisionGUID="cd88055f-6c3d-4720-90dc-dc4335cbad7d" CreationDate="2022-11-30T17:04:49.653" UserId="251" Text="```&#xD;&#xA;stroage { k: User v: Vec&lt;Item&gt; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I want to give a unique identifier to the item.&#xD;&#xA;&#xD;&#xA;Can I use `UnixTime::now()`?&#xD;&#xA;&#xD;&#xA;If the user sends a batch tx and it creates two items. Will their identifier be different?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23489" PostHistoryTypeId="1" PostId="6137" RevisionGUID="cd88055f-6c3d-4720-90dc-dc4335cbad7d" CreationDate="2022-11-30T17:04:49.653" UserId="251" Text="How to create a unique identifier in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23490" PostHistoryTypeId="3" PostId="6137" RevisionGUID="cd88055f-6c3d-4720-90dc-dc4335cbad7d" CreationDate="2022-11-30T17:04:49.653" UserId="251" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23491" PostHistoryTypeId="5" PostId="6137" RevisionGUID="96dfc3e2-528e-4d35-aec2-8578cb82cc55" CreationDate="2022-11-30T20:38:18.053" UserId="28" Comment="edited body" Text="```&#xD;&#xA;storage { k: User v: Vec&lt;Item&gt; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I want to give a unique identifier to the item.&#xD;&#xA;&#xD;&#xA;Can I use `UnixTime::now()`?&#xD;&#xA;&#xD;&#xA;If the user sends a batch tx and it creates two items. Will their identifier be different?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23492" PostHistoryTypeId="2" PostId="6138" RevisionGUID="50d7cf77-84e4-4ba5-8451-60671615df4d" CreationDate="2022-11-30T20:44:43.187" UserId="28" Text="Timestamp sounds strictly worse than the block number, but this is even not good enough.&#xD;&#xA;&#xD;&#xA;We use something called a &quot;timepoint&quot; in the multisig pallet, which is:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/multisig/src/lib.rs#L94&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// A global extrinsic index, formed as the extrinsic index within a block, together with that&#xD;&#xA;/// block's height. This allows a transaction in which a multisig operation of a particular&#xD;&#xA;/// composite was created to be uniquely identified.&#xD;&#xA;#[derive(&#xD;&#xA;	Copy, Clone, Eq, PartialEq, Encode, Decode, Default, RuntimeDebug, TypeInfo, MaxEncodedLen,&#xD;&#xA;)]&#xD;&#xA;pub struct Timepoint&lt;BlockNumber&gt; {&#xD;&#xA;	/// The height of the chain at the point in time.&#xD;&#xA;	height: BlockNumber,&#xD;&#xA;	/// The index of the extrinsic at the point in time.&#xD;&#xA;	index: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will not work with a batch call, since all the extrinsics in the batch will have the same height and index. In that case, you should track your own unique id, like a u32 counter, in the pallet you are concerned about." ContentLicense="CC BY-SA 4.0" />
  <row Id="23494" PostHistoryTypeId="2" PostId="6139" RevisionGUID="ac642bae-65b1-45c8-8d02-efe964b3504a" CreationDate="2022-11-30T21:59:01.993" UserId="3440" Text="while running the flipper contract i get the following error &#xD;&#xA;```&#xD;&#xA;{ Err: { Module: { index: '9', error: '0x06000000' } } }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What deos it mean?&#xD;&#xA;&#xD;&#xA;I serached https://wiki.polkadot.network/docs/maintain-errors&#xD;&#xA; but didn't get any idea" ContentLicense="CC BY-SA 4.0" />
  <row Id="23496" PostHistoryTypeId="1" PostId="6139" RevisionGUID="ac642bae-65b1-45c8-8d02-efe964b3504a" CreationDate="2022-11-30T21:59:01.993" UserId="3440" Text="Error while running the RPC call" ContentLicense="CC BY-SA 4.0" />
  <row Id="23497" PostHistoryTypeId="3" PostId="6139" RevisionGUID="ac642bae-65b1-45c8-8d02-efe964b3504a" CreationDate="2022-11-30T21:59:01.993" UserId="3440" Text="|error|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23498" PostHistoryTypeId="52" PostId="6137" RevisionGUID="62a686f2-a61c-4292-92ec-b04172a3e942" CreationDate="2022-12-01T01:07:06.827" />
  <row Id="23499" PostHistoryTypeId="2" PostId="6140" RevisionGUID="e365d4e4-6c88-47df-b614-05fddb1a8bf7" CreationDate="2022-12-01T02:30:55.503" UserId="318" Text="I deploy an ink smart contract through a properly configured pallet_contracts (4.0.0-dev from the Substrate branch polkadot-v0.9.29) on chain. Then I use the unique address of that smart contract and through pallet_balances, transfer some funds to that address. If I now go to the contracts panel in polkadot.js.org/apps (version 0.122.2), the transferred fund shows up for that contract instance. However if I check the chain state of the pallet_balances for that address, it is still 0 (both free and reserved). My question is why? Is it a feature or a bug?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23501" PostHistoryTypeId="1" PostId="6140" RevisionGUID="e365d4e4-6c88-47df-b614-05fddb1a8bf7" CreationDate="2022-12-01T02:30:55.503" UserId="318" Text="Fund transferred to smart contract address not showing in balances" ContentLicense="CC BY-SA 4.0" />
  <row Id="23502" PostHistoryTypeId="3" PostId="6140" RevisionGUID="e365d4e4-6c88-47df-b614-05fddb1a8bf7" CreationDate="2022-12-01T02:30:55.503" UserId="318" Text="|balances|account|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23506" PostHistoryTypeId="11" PostId="6114" RevisionGUID="644604bb-6d12-4616-b752-c63d9918ff5c" CreationDate="2022-12-01T04:49:15.030" UserId="34" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="23507" PostHistoryTypeId="2" PostId="6141" RevisionGUID="60b62539-50a0-4231-a177-a95ceadb181c" CreationDate="2022-12-01T05:20:41.513" UserId="2678" Text="We are building [a pallet](https://github.com/SequesterChain/pallets/blob/main/donations/src/lib.rs) that uses the [SpendFunds variable](https://github.com/paritytech/substrate/blob/master/frame/treasury/src/lib.rs#L547-L552) to withdraw funds from Treasuries on chains that implement it. However, with the current implementation of the SpendFunds callback, only 1 pallet can use this technique. Since all of the Relay Chains implement the [Bounties pallet](https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/lib.rs#L858), this means that Relay chains will not be able to implement our pallet (this pallet is being developed for use by all chains, including Relay Chains).&#xD;&#xA;&#xD;&#xA;Can we extend the [SpendFunds](https://github.com/paritytech/substrate/blob/master/frame/treasury/src/lib.rs#L196) type to be an Array of pallets that implement the SpendFunds trait?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23509" PostHistoryTypeId="1" PostId="6141" RevisionGUID="60b62539-50a0-4231-a177-a95ceadb181c" CreationDate="2022-12-01T05:20:41.513" UserId="2678" Text="Extending SpendFunds Type For Use w/ Multiple Pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="23510" PostHistoryTypeId="3" PostId="6141" RevisionGUID="60b62539-50a0-4231-a177-a95ceadb181c" CreationDate="2022-12-01T05:20:41.513" UserId="2678" Text="|relay-chain|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23511" PostHistoryTypeId="2" PostId="6142" RevisionGUID="72e3b7dc-b312-4fa9-b144-eb4a7c28a200" CreationDate="2022-12-01T06:09:39.250" UserId="1947" Text="You can view the account balance info via chainstate-&gt;system-&gt;account(acountID). Not sure why balances pallet account data gives result with 0 values." ContentLicense="CC BY-SA 4.0" />
  <row Id="23513" PostHistoryTypeId="2" PostId="6143" RevisionGUID="9cb0ade7-6773-4c2b-a696-764317a7a3bd" CreationDate="2022-12-01T07:54:16.867" UserId="3534" Text="Hope you are doing well.&#xD;&#xA;&#xD;&#xA;I would need your valuable insights on an issue. Currently I m facing a problem with para-chain set-up locally with relay chain.&#xD;&#xA;&#xD;&#xA;I have setup Relay-chain(release-v0.9.32) with 5 Session keys. Relay-chain is producing blocks and Finalizing and I setup Para-chain(polkadot-v0.9.32) and registered on my Relay chain. Para-chain showing Relay chain's logs but not producing any block.&#xD;&#xA;&#xD;&#xA;Anyone please help me how can I resolve this problem. I will be thankful to you.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/C0UeF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23515" PostHistoryTypeId="1" PostId="6143" RevisionGUID="9cb0ade7-6773-4c2b-a696-764317a7a3bd" CreationDate="2022-12-01T07:54:16.867" UserId="3534" Text="ParaChain blocks are not producing and finalising with Relay chain -" ContentLicense="CC BY-SA 4.0" />
  <row Id="23516" PostHistoryTypeId="3" PostId="6143" RevisionGUID="9cb0ade7-6773-4c2b-a696-764317a7a3bd" CreationDate="2022-12-01T07:54:16.867" UserId="3534" Text="|polkadot|relay-chain|parachain-collator|substrate-parachain-template|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23517" PostHistoryTypeId="5" PostId="6143" RevisionGUID="b849ea88-4ee9-469e-a0ba-e29324e0d199" CreationDate="2022-12-01T07:56:40.413" UserId="3534" Comment="added 149 characters in body" Text="[![enter image description here][1]][1]Hope you are doing well.&#xD;&#xA;&#xD;&#xA;I would need your valuable insights on an issue. Currently I m facing a problem with para-chain set-up locally with relay chain.&#xD;&#xA;&#xD;&#xA;I have setup Relay-chain(release-v0.9.32) with 5 Session keys. Relay-chain is producing blocks and Finalizing and I setup Para-chain(polkadot-v0.9.32) and registered on my Relay chain. Para-chain showing Relay chain's logs but not producing any block.&#xD;&#xA;&#xD;&#xA;Anyone please help me how can I resolve this problem. I will be thankful to you.[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Parachain's log:&#xD;&#xA;  [1]: https://i.stack.imgur.com/NUpfE.png&#xD;&#xA;&#xD;&#xA;Relaychain's log [Connected with 5 validators]&#xD;&#xA;  [2]: https://i.stack.imgur.com/C0UeF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23518" PostHistoryTypeId="5" PostId="6143" RevisionGUID="db33c4c3-d9a7-460a-8306-59e5847231e3" CreationDate="2022-12-01T07:57:51.773" UserId="3534" Comment="added 42 characters in body" Text="[![enter image description here][1]][1]Hope you are doing well.&#xD;&#xA;&#xD;&#xA;I would need your valuable insights on an issue. Currently I m facing a problem with para-chain set-up locally with relay chain.&#xD;&#xA;&#xD;&#xA;I have setup Relay-chain(release-v0.9.32) with 5 Session keys. Relay-chain is producing blocks and Finalizing and I setup Para-chain(polkadot-v0.9.32) and registered on my Relay chain. Para-chain showing Relay chain's logs but not producing any block.&#xD;&#xA;&#xD;&#xA;Anyone please help me how can I resolve this problem. I will be thankful to you.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Parachain's log:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Relaychain's log [Connected with 5 validators]&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/T6duH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23519" PostHistoryTypeId="5" PostId="6143" RevisionGUID="9da4f698-8b38-44ba-992d-a4054233e8cb" CreationDate="2022-12-01T07:58:22.210" UserId="3534" Comment="deleted 39 characters in body" Text="Hope you are doing well.&#xD;&#xA;&#xD;&#xA;I would need your valuable insights on an issue. Currently I m facing a problem with para-chain set-up locally with relay chain.&#xD;&#xA;&#xD;&#xA;I have setup Relay-chain(release-v0.9.32) with 5 Session keys. Relay-chain is producing blocks and Finalizing and I setup Para-chain(polkadot-v0.9.32) and registered on my Relay chain. Para-chain showing Relay chain's logs but not producing any block.&#xD;&#xA;&#xD;&#xA;Anyone please help me how can I resolve this problem. I will be thankful to you.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Parachain's log:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Relaychain's log [Connected with 5 validators]&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/T6duH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23520" PostHistoryTypeId="5" PostId="6143" RevisionGUID="410ff37a-3b70-42ae-ba36-b7346a477f80" CreationDate="2022-12-01T08:01:19.160" UserId="3534" Comment="added 28 characters in body" Text="Hope you are doing well.&#xD;&#xA;&#xD;&#xA;I would need your valuable insights on an issue. Currently I m facing a problem with para-chain(rococo-local) set-up locally with relay chain(rococo-local).&#xD;&#xA;&#xD;&#xA;I have setup Relay-chain(release-v0.9.32) with 5 Session keys. Relay-chain is producing blocks and Finalizing and I setup Para-chain(polkadot-v0.9.32) and registered on my Relay chain. Para-chain showing Relay chain's logs but not producing any block.&#xD;&#xA;&#xD;&#xA;Anyone please help me how can I resolve this problem. I will be thankful to you.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Parachain's log:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Relaychain's log [Connected with 5 validators]&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/T6duH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23521" PostHistoryTypeId="2" PostId="6144" RevisionGUID="d2e1ab35-f17c-415f-8430-a7ebac16f772" CreationDate="2022-12-01T08:38:12.350" UserId="3424" Text="I use archlinux on x64_64 CPU architecture. Steps to reproduce:&#xD;&#xA;1. `git clone https://github.com/paritytech/substrate`&#xD;&#xA;2. `cd substrate`&#xD;&#xA;3. `cargo test`&#xD;&#xA;&#xD;&#xA;it runs up until 1600 out of ~1700 (I don't remember the last number). And I did it carefully with pauses (`ctrl+Z` and `fg 1`) to make sure the CPU doesn't overheat. And with relatively cold CPU, my computer crashed at exactly package/unit 1600.&#xD;&#xA;&#xD;&#xA;How do I solve this? I really would like to contribute to Substrate's development but can't do it if it crashes all the time&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23523" PostHistoryTypeId="1" PostId="6144" RevisionGUID="d2e1ab35-f17c-415f-8430-a7ebac16f772" CreationDate="2022-12-01T08:38:12.350" UserId="3424" Text="Computer crashing on `cargo test`" ContentLicense="CC BY-SA 4.0" />
  <row Id="23524" PostHistoryTypeId="3" PostId="6144" RevisionGUID="d2e1ab35-f17c-415f-8430-a7ebac16f772" CreationDate="2022-12-01T08:38:12.350" UserId="3424" Text="|testing|panic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23525" PostHistoryTypeId="5" PostId="6144" RevisionGUID="0d96b9c3-89b1-41d8-bac6-7d8a640e0411" CreationDate="2022-12-01T09:08:23.890" UserId="3424" Comment="deleted 43 characters in body" Text="I use archlinux on x64_64 CPU architecture. Steps to reproduce:&#xD;&#xA;1. `git clone https://github.com/paritytech/substrate`&#xD;&#xA;2. `cd substrate`&#xD;&#xA;3. `cargo test`&#xD;&#xA;&#xD;&#xA;it runs up until 1600/1706. And I did it carefully with pauses (`ctrl+Z` and `fg 1`) to make sure the CPU doesn't overheat. And with relatively cold CPU, my computer crashed at exactly package/unit 1600.&#xD;&#xA;&#xD;&#xA;How do I solve this? I really would like to contribute to Substrate's development but can't do it if it crashes all the time&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23526" PostHistoryTypeId="2" PostId="6145" RevisionGUID="7d94cdf2-d846-4112-8cb0-c8f55340dafa" CreationDate="2022-12-01T10:12:41.940" UserId="73" Text="You need more RAM. You could add some ramdisk to have more RAM and finish the build. The last step your compilation is &quot;crashing your computer&quot; is the linking that requires quite a lot of RAM." ContentLicense="CC BY-SA 4.0" />
  <row Id="23528" PostHistoryTypeId="2" PostId="6146" RevisionGUID="c934183c-4cd3-49fc-a4f9-1ceb279f4c05" CreationDate="2022-12-01T10:24:24.017" UserId="2025" Text="Assuming (big assumption) you are running the template node (as [you said previously](https://substrate.stackexchange.com/questions/5882/you-need-to-connect-to-a-chain-with-a-runtime-that-supports-contracts)) and you just added the Contracts pallet to it with `index: 9`, the error you are getting is `ContractNotFound`, meaning that no contract was found in the specified address. Probably you are trying to call a contract on-chain without deploying it first. I recommend you to follow carefully the steps in [this tutorial](https://docs.substrate.io/tutorials/smart-contracts/prepare-your-first-contract/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="23530" PostHistoryTypeId="5" PostId="6143" RevisionGUID="366ca099-8e7e-45dc-a47d-84a750684e44" CreationDate="2022-12-01T10:55:32.213" UserId="3534" Comment="[Edit removed during grace period]; added 7 characters in body" Text="Hope you are doing well.&#xD;&#xA;&#xD;&#xA;I would need your valuable insights on an issue. Currently I m facing a problem with para-chain(rococo-local) set-up locally with relay chain(rococo-local).&#xD;&#xA;&#xD;&#xA;I have setup Relay-chain(release-v0.9.32) with 5 Session keys. Relay-chain is producing blocks and Finalizing and I setup Para-chain(polkadot-v0.9.32) and registered on my Relay chain. Para-chain showing Relay chain's logs but not producing any block.&#xD;&#xA;&#xD;&#xA;Anyone please help me how can I resolve this problem. I will be thankful to you.&#xD;&#xA;&#xD;&#xA;Parachain's log:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Relaychain's log [Connected with 5 validators]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YdYaa.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/V41zT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23531" PostHistoryTypeId="2" PostId="6147" RevisionGUID="00c8f67f-dce8-4f13-8de3-58841e0012af" CreationDate="2022-12-01T11:09:30.417" UserId="2762" Text="I am a bit confused with how to do operations with the Balances in the Substrate runtime. More concrete the division.&#xD;&#xA;&#xD;&#xA;The example I want to implement is similar to the [Lottery pallet][1] but with shared prizes distribution:&#xD;&#xA;&#xD;&#xA;&gt; Person A buys 10 UNITS of ticket 1.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Person B buys 10 UNITS of ticket 2.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Person C buys 30 UNITS of ticket 1.&#xD;&#xA;&gt; &#xD;&#xA;&gt; The total Pot is 50 UNITS.&#xD;&#xA;&#xD;&#xA;If ticket 1 is the winner, with weighted distribution the person A have to receive the **25%** of the pot and the person C the **75%**. The maths for this weighted distribution are simple: `the amount that one deposit / the total amount of the winners deposit` in the case of Person A = 10/40 = 0.25&#xD;&#xA;&#xD;&#xA;The normal division shows a 0 when try for example 10/40:&#xD;&#xA;&#xD;&#xA;    let weighted = amount_deposit_winner / total_amount_deposit_winners;&#xD;&#xA;	let amount_to_receive = weighted * total_pot;&#xD;&#xA;&#xD;&#xA;This is because you can not use floating point maths in the runtime, and you got the rounded result.&#xD;&#xA;&#xD;&#xA;You can check this 2 answers from SE for more info:&#xD;&#xA; - https://substrate.stackexchange.com/a/147/2762&#xD;&#xA; - https://substrate.stackexchange.com/a/691/2762&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So what I did was convert the Substrate type Balance into u128 ([How do you convert between Substrate specific types and Rust primitive types?][2]) and do the division using Perquintill as suggested [here][3] and [here][4].&#xD;&#xA;&#xD;&#xA;    let amount_winner_in_u128 = amount_deposit_winner.saturated_into::&lt;u128&gt;();&#xD;&#xA;	let total_winners_in_u128 = total_amount_deposit_winners.saturated_into::&lt;u128&gt;();&#xD;&#xA;&#xD;&#xA;	let weighted = Perquintill::from_rational(amount_winner_in_u128, total_winners_in_u128);&#xD;&#xA;	let amount_to_receive = weighted.mul_floor(total_pot.saturated_into::&lt;u128&gt;());&#xD;&#xA;&#xD;&#xA;And then transform it into Balance again in order to perform the transfer:&#xD;&#xA;&#xD;&#xA;    amount_to_receive.saturated_into()&#xD;&#xA;&#xD;&#xA;Is this a correct way to calculate these weights for Balances in Substrate?, or is there a better way to do it?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/lottery&#xD;&#xA;  [2]: https://stackoverflow.com/questions/56081117/how-do-you-convert-between-substrate-specific-types-and-rust-primitive-types?noredirect=1&amp;lq=1&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/147/2762&#xD;&#xA;  [4]: https://substrate.stackexchange.com/a/4854/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="23533" PostHistoryTypeId="1" PostId="6147" RevisionGUID="00c8f67f-dce8-4f13-8de3-58841e0012af" CreationDate="2022-12-01T11:09:30.417" UserId="2762" Text="Balance division in Substrate runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="23534" PostHistoryTypeId="3" PostId="6147" RevisionGUID="00c8f67f-dce8-4f13-8de3-58841e0012af" CreationDate="2022-12-01T11:09:30.417" UserId="2762" Text="|pallet|rust|floating-point-math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23537" PostHistoryTypeId="2" PostId="6149" RevisionGUID="1737af6c-fbad-4e4e-ae9a-ebcd529ae242" CreationDate="2022-12-01T11:32:09.810" UserId="2762" Text="There is a Pull Request open in Cumulus with a fix to prevents the `StateDbError::TooManySiblingBlocks` error from being triggered.&#xD;&#xA;https://github.com/paritytech/cumulus/pull/1559&#xD;&#xA;&#xD;&#xA;Not sure how you have arrived there but one option if you don't have data you want to preserve (you are testing), is resetting the blockchain state and process.&#xD;&#xA;&#xD;&#xA;To start over with a clean environment for testing, you should completely remove the chain state for the local relay chain nodes and the parachain.&#xD;&#xA;&#xD;&#xA;    rm -rf /tmp/parachain&#xD;&#xA;    rm -rf /tm/relay&#xD;&#xA;&#xD;&#xA;And connect the parachain again: https://docs.substrate.io/tutorials/connect-relay-and-parachains/connect-a-local-parachain/&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23543" PostHistoryTypeId="2" PostId="6151" RevisionGUID="c78e2807-7d6a-4bbe-8c34-ca8ee6036199" CreationDate="2022-12-01T11:58:28.793" UserId="2762" Text="There are two ways of storing balances in Substrate. One way is to store the balance in the pallet_balances where you were looking, and the other is to store the balance in the [frame system][1].&#xD;&#xA;&#xD;&#xA;When you implement the pallet_balances in the runtime you specify where you want to store it, for example in the [template node][2].&#xD;&#xA;&#xD;&#xA;If you take a look into the runtime of your node: runtime/src/lib.rs you will see it:&#xD;&#xA;&#xD;&#xA;    type AccountStore = System;&#xD;&#xA;&#xD;&#xA;If you want more info about this topic check the [Subtrate docs][3].&#xD;&#xA;&#xD;&#xA;So to get the balance you have to check the chain state of the system for that address.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/src/frame_system/lib.rs.html#530&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/src/lib.rs#L254&#xD;&#xA;  [3]: https://docs.substrate.io/reference/account-data-structures/" ContentLicense="CC BY-SA 4.0" />
  <row Id="23545" PostHistoryTypeId="5" PostId="6139" RevisionGUID="f53600eb-c0b2-480b-b045-d8a3b79462be" CreationDate="2022-12-01T12:18:33.080" UserId="2025" Comment="fix typos and bad English" Text="while running the flipper contract I get the following error &#xD;&#xA;```&#xD;&#xA;{ Err: { Module: { index: '9', error: '0x06000000' } } }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What does it mean?&#xD;&#xA;&#xD;&#xA;I searched https://wiki.polkadot.network/docs/maintain-errors&#xD;&#xA; but didn't get any idea" ContentLicense="CC BY-SA 4.0" />
  <row Id="23546" PostHistoryTypeId="24" PostId="6139" RevisionGUID="f53600eb-c0b2-480b-b045-d8a3b79462be" CreationDate="2022-12-01T12:18:33.080" Comment="Proposed by 2025 approved by 3440 edit id of 348" ContentLicense="CC BY-SA 4.0" />
  <row Id="23547" PostHistoryTypeId="5" PostId="6149" RevisionGUID="737b5160-25ea-49e2-b507-5e8d655a09d9" CreationDate="2022-12-01T12:44:08.893" UserId="2762" Comment="added 135 characters in body" Text="There is a Pull Request open in Cumulus with a fix to prevents the `StateDbError::TooManySiblingBlocks` error from being triggered.&#xD;&#xA;https://github.com/paritytech/cumulus/pull/1559&#xD;&#xA;&#xD;&#xA;Not sure how you have arrived there, but in the meantime you have two options you can try:&#xD;&#xA;- Follow this answer to revert the siblings: https://substrate.stackexchange.com/a/3426/2762 &#xD;&#xA;&#xD;&#xA;- If you don't have data you want to preserve (you are testing), reset the blockchain state and process.&#xD;&#xA;To start over with a clean environment for testing, you should completely remove the chain state for the local relay chain nodes and the parachain.&#xD;&#xA;&#xD;&#xA;      rm -rf /tmp/parachain&#xD;&#xA;      rm -rf /tm/relay&#xD;&#xA;&#xD;&#xA;And connect the parachain again: https://docs.substrate.io/tutorials/connect-relay-and-parachains/connect-a-local-parachain/&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23548" PostHistoryTypeId="2" PostId="6152" RevisionGUID="36ced33d-875c-48ae-80de-f04cf02c94b5" CreationDate="2022-12-01T12:50:56.797" UserId="251" Text="I agree with @bkchr.&#xD;&#xA;&#xD;&#xA;And there is an easy way.&#xD;&#xA;&#xD;&#xA;Increasing your swap space.&#xD;&#xA;&#xD;&#xA;I'm on Archlinux too, and I encountered this a few weeks ago.&#xD;&#xA;At that time, I was trying to run `cargo build --workspace --all-features --all-targets`. And this takes around 100G RAM.&#xD;&#xA;&#xD;&#xA;Finally, I solved this by increasing the swap space.&#xD;&#xA;&#xD;&#xA;BTW, you could also compile it with `--release`. This will take more time but it will optimize the size and low down the memory usage significantly." ContentLicense="CC BY-SA 4.0" />
  <row Id="23550" PostHistoryTypeId="2" PostId="6153" RevisionGUID="da7c3043-7c0c-4c0f-a5cd-79569bc66f63" CreationDate="2022-12-01T12:56:29.533" UserId="3331" Text="- The relay you're setting up, are you using custom keys or dev accounts?&#xD;&#xA;- In the parachain log, does it try start collating over and over until errors/warns start appearing? like `too many siblings` or `header not found`?&#xD;&#xA;&#xD;&#xA;If that is the case, you might have the same issue I've had in the past.&#xD;&#xA;https://substrate.stackexchange.com/questions/5397/how-to-properly-set-session-keys-for-relay-and-parachain-with-custom-keys?rq=1&#xD;&#xA;&#xD;&#xA;Let me know if that is your case, and if that helped. " ContentLicense="CC BY-SA 4.0" />
  <row Id="23552" PostHistoryTypeId="2" PostId="6154" RevisionGUID="f1ba7713-ecdc-4ce9-9df3-96398167fa3e" CreationDate="2022-12-01T13:51:54.373" UserId="28" Text="Balances in most substrate chains are u128, however this is usually opaque, allowing developers to change the type if they want. Converting the value explicitly to u128 is definitely not the right thing to do.&#xD;&#xA;&#xD;&#xA;The next thing to remember is that most blockchains use such a large number type because they use a fixed point number. For example, 1.0 UNIT is usually represented as 10,000,000,000 u128 with a 10 decimal place offset.&#xD;&#xA;&#xD;&#xA;If you every have actually just the number 1, you obviously can never divide it into smaller pieces, but 10,000,000,000 can be.&#xD;&#xA;&#xD;&#xA;&gt; The normal division shows a 0 when try for example 10/40:&#xD;&#xA;&#xD;&#xA;So it would never actually be 10/40, but probably 100,000,000,000 / 40, which can all be handled correctly in the runtime.&#xD;&#xA;&#xD;&#xA;Beyond that, whenever you are dealing with fractions or percents, you probably want to start using the types found in `sp-arithmetic`. See:&#xD;&#xA;&#xD;&#xA;- https://crates.parity.io/sp_arithmetic/index.html&#xD;&#xA;- https://substrate.stackexchange.com/questions/129/what-is-perbill-and-where-should-it-be-used" ContentLicense="CC BY-SA 4.0" />
  <row Id="23554" PostHistoryTypeId="5" PostId="6154" RevisionGUID="ef087c6d-7bba-4f78-bcdf-bb5c00c150ff" CreationDate="2022-12-01T13:57:15.667" UserId="28" Comment="deleted 294 characters in body" Text="Balances in most substrate chains are u128, however this is usually opaque, allowing developers to change the type if they want. Converting the value explicitly to u128 is definitely not the right thing to do.&#xD;&#xA;&#xD;&#xA;Whenever you are dealing with fractions or percents, you probably want to start using the types found in `sp-arithmetic`. See:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/questions/129/what-is-perbill-and-where-should-it-be-used&#xD;&#xA;- https://crates.parity.io/sp_arithmetic/index.html&#xD;&#xA;- https://crates.parity.io/sp_arithmetic/per_things/struct.Percent.html#method.from_rational&#xD;&#xA;&#xD;&#xA;So you probably want:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let total = 40;&#xD;&#xA;let fraction = Percent::from_rational(10, 40);&#xD;&#xA;let share = fraction * total;&#xD;&#xA;&#xD;&#xA;// share == 10&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see similar logic in the Staking pallet where we reward users their share of the staking reward: https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs#L181&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// This is how much validator + nominators are entitled to.&#xD;&#xA;let validator_total_payout = validator_total_reward_part * era_payout;&#xD;&#xA;&#xD;&#xA;let validator_prefs = Self::eras_validator_prefs(&amp;era, &amp;validator_stash);&#xD;&#xA;// Validator first gets a cut off the top.&#xD;&#xA;let validator_commission = validator_prefs.commission;&#xD;&#xA;let validator_commission_payout = validator_commission * validator_total_payout;&#xD;&#xA;&#xD;&#xA;let validator_leftover_payout = validator_total_payout - validator_commission_payout;&#xD;&#xA;// Now let's calculate how this is split to the validator.&#xD;&#xA;let validator_exposure_part = Perbill::from_rational(exposure.own, exposure.total);&#xD;&#xA;let validator_staking_payout = validator_exposure_part * validator_leftover_payout;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You will need to make sure your logic is sound for handling all the percents and potential rounding errors." ContentLicense="CC BY-SA 4.0" />
  <row Id="23555" PostHistoryTypeId="5" PostId="6154" RevisionGUID="31ba5126-ff30-46ba-aa53-bda7962a2a7e" CreationDate="2022-12-01T14:02:59.157" UserId="28" Comment="deleted 294 characters in body" Text="Balances in most substrate chains are u128, however this is usually opaque, allowing developers to change the type if they want. Converting the value explicitly to u128 is definitely not the right thing to do.&#xD;&#xA;&#xD;&#xA;Whenever you are dealing with fractions or percents, you probably want to start using the types found in `sp-arithmetic`. See:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/questions/129/what-is-perbill-and-where-should-it-be-used&#xD;&#xA;- https://crates.parity.io/sp_arithmetic/index.html&#xD;&#xA;- https://crates.parity.io/sp_arithmetic/per_things/struct.Percent.html#method.from_rational&#xD;&#xA;&#xD;&#xA;So you probably want:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let total = 40;&#xD;&#xA;let fraction = Perbill::from_rational(10, 40);&#xD;&#xA;let share = fraction * total;&#xD;&#xA;&#xD;&#xA;// share == 10&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see similar logic in the Staking pallet where we reward users their share of the staking reward: https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs#L206&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Lets now calculate how this is split to the nominators.&#xD;&#xA;// Reward only the clipped exposures. Note this is not necessarily sorted.&#xD;&#xA;for nominator in exposure.others.iter() {&#xD;&#xA;	let nominator_exposure_part = Perbill::from_rational(nominator.value, exposure.total);&#xD;&#xA;&#xD;&#xA;	let nominator_reward: BalanceOf&lt;T&gt; =&#xD;&#xA;		nominator_exposure_part * validator_leftover_payout;&#xD;&#xA;	// We can now make nominator payout:&#xD;&#xA;	if let Some(imbalance) = Self::make_payout(&amp;nominator.who, nominator_reward) {&#xD;&#xA;		// Note: this logic does not count payouts for `RewardDestination::None`.&#xD;&#xA;		nominator_payout_count += 1;&#xD;&#xA;		let e =&#xD;&#xA;			Event::&lt;T&gt;::Rewarded { stash: nominator.who.clone(), amount: imbalance.peek() };&#xD;&#xA;		Self::deposit_event(e);&#xD;&#xA;		total_imbalance.subsume(imbalance);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You will need to make sure your logic is sound for handling all the percents and potential rounding errors." ContentLicense="CC BY-SA 4.0" />
  <row Id="23557" PostHistoryTypeId="4" PostId="6114" RevisionGUID="6521aae2-6c36-4f65-a351-ebd349d7796a" CreationDate="2022-12-01T14:29:32.447" UserId="28" Comment="edited title" Text="How to test benchmarking functions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23558" PostHistoryTypeId="2" PostId="6155" RevisionGUID="1a806c7f-5578-4d24-9060-d3d11027690c" CreationDate="2022-12-01T14:39:50.220" UserId="28" Text="&gt; Suppose, there is a function F, it has two paths. Path-A and path-B. Path-A is more resource intensive as compared to Path-B. Now the developer write a benchmarking function targeting path-B (instaed of path-A). I need a way/tool that tells SQA team that the developer has not targeted the most resource intensive path.&#xD;&#xA;&#xD;&#xA;It is not possible for a computer to know which path is more complex as the complexity may also depend on the inputs to the function and any number of other factors.&#xD;&#xA;&#xD;&#xA;If you have two paths, where it is not possible to know which one is more complex, you must benchmark both, and then construct a simple final weight formula which is the max of the two.&#xD;&#xA;&#xD;&#xA;Let's take an abstract example, imagine there is Path-A and Path-B as you described. Let's imagine there is one input, and the final benchmarking formulas for these two paths are:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let path_a = |x: u32| -&gt; Weight { 100 + x };&#xD;&#xA;let path_b = |x: u32| -&gt; Weight { 10 + 5x };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, you cannot say which one of these paths is more expensive, since when `x == 1`, Path-A is worse. But with `x == 500`, Path-B is worse.&#xD;&#xA;&#xD;&#xA;So as mentioned, you need both formulas, so you need benchmarks for both cases, and your final weight formula should be:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let final_weight = path_a(x).max(path_b(x));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You will see concrete examples of this all throughout Substrate. For example:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/multisig/src/lib.rs#L373&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight({&#xD;&#xA;	let s = other_signatories.len() as u32;&#xD;&#xA;	let z = call.using_encoded(|d| d.len()) as u32;&#xD;&#xA;	T::WeightInfo::as_multi_create(s, z)&#xD;&#xA;		.max(T::WeightInfo::as_multi_approve(s, z))&#xD;&#xA;		.max(T::WeightInfo::as_multi_complete(s, z))&#xD;&#xA;		.saturating_add(*max_weight)&#xD;&#xA;})]&#xD;&#xA;pub fn as_multi( ... )&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where there are actually 3 benchmarks needed for just this one function:&#xD;&#xA;&#xD;&#xA;1. `as_multi_create`&#xD;&#xA;2. `as_multi_approve`&#xD;&#xA;3. `as_multi_complete`&#xD;&#xA;&#xD;&#xA;As found here: https://github.com/paritytech/substrate/blob/master/frame/multisig/src/benchmarking.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="23560" PostHistoryTypeId="5" PostId="6155" RevisionGUID="6a02ac8a-7b07-4168-b95f-20665d4a3809" CreationDate="2022-12-01T14:45:04.777" UserId="28" Comment="added 1209 characters in body" Text="&gt; Suppose, there is a function F, it has two paths. Path-A and path-B. Path-A is more resource intensive as compared to Path-B. Now the developer write a benchmarking function targeting path-B (instaed of path-A). I need a way/tool that tells SQA team that the developer has not targeted the most resource intensive path.&#xD;&#xA;&#xD;&#xA;It is not possible for a computer to know which path is more complex as the complexity may also depend on the inputs to the function and any number of other factors.&#xD;&#xA;&#xD;&#xA;If you have two paths, where it is not possible to know which one is more complex, you must benchmark both, and then construct a simple final weight formula which is the max of the two.&#xD;&#xA;&#xD;&#xA;Let's take an abstract example, imagine there is Path-A and Path-B as you described. Let's imagine there is one input, and the final benchmarking formulas for these two paths are:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let path_a = |x: u32| -&gt; Weight { 100 + x };&#xD;&#xA;let path_b = |x: u32| -&gt; Weight { 10 + 5x };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, you cannot say which one of these paths is more expensive, since when `x == 1`, Path-A is worse. But with `x == 500`, Path-B is worse.&#xD;&#xA;&#xD;&#xA;So as mentioned, you need both formulas, so you need benchmarks for both cases, and your final weight formula should be:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let final_weight = path_a(x).max(path_b(x));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You will see concrete examples of this all throughout Substrate. For example:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/multisig/src/lib.rs#L373&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight({&#xD;&#xA;	let s = other_signatories.len() as u32;&#xD;&#xA;	let z = call.using_encoded(|d| d.len()) as u32;&#xD;&#xA;	T::WeightInfo::as_multi_create(s, z)&#xD;&#xA;		.max(T::WeightInfo::as_multi_approve(s, z))&#xD;&#xA;		.max(T::WeightInfo::as_multi_complete(s, z))&#xD;&#xA;		.saturating_add(*max_weight)&#xD;&#xA;})]&#xD;&#xA;pub fn as_multi( ... )&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where there are actually 3 benchmarks needed for just this one function:&#xD;&#xA;&#xD;&#xA;1. `as_multi_create`&#xD;&#xA;2. `as_multi_approve`&#xD;&#xA;3. `as_multi_complete`&#xD;&#xA;&#xD;&#xA;As found here: https://github.com/paritytech/substrate/blob/master/frame/multisig/src/benchmarking.rs&#xD;&#xA;&#xD;&#xA;&gt; Suppose, we have a novice blockchain developer, who write a functions against the best case scenario (instead of worst case scenario). What will happen? The benchmarking functions will obviously not produced a good approximation of weights. Is there any methodology/ framework/ anything that may help SQA team the developer has written his/her benchmark against the worst case scenario and the benchmark functions must be updated to target the worst case scenario.&#xD;&#xA;&#xD;&#xA;There is no purely automated way to catch or test for such an error. This would be equivalent to having some bug in your logic.&#xD;&#xA;&#xD;&#xA;You would be able to notice this problem if you specifically did real world stress tests on your chain in a scenario which is worse than your benchmark, but then you would need to know what that scenario is.&#xD;&#xA;&#xD;&#xA;If you have benchmarks which are under-weighing your functions, you risk users underpaying for transactions, for your blocks to take longer than normal to execute, and at worst, not being able to import these blocks into a relay chain like Polkadot.&#xD;&#xA;&#xD;&#xA;As a best practice, you should try to keep your pallet logic linear, simple, and easy to understand so that problems like this do not occur." ContentLicense="CC BY-SA 4.0" />
  <row Id="23562" PostHistoryTypeId="5" PostId="6127" RevisionGUID="5d855647-f579-499c-8f89-74f5cecc58bb" CreationDate="2022-12-01T14:50:52.600" UserId="3317" Comment="improved formatting" Text="I want to do a runtime upgrade but I got the same error as [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**solution is :- If there are changes not only to the runtime but also to the node, then this issue is normally caused by upgrading the runtime before upgrading the client.**&#xD;&#xA;&#xD;&#xA;**Try upgrading the client, then the runtime.**&#xD;&#xA;&#xD;&#xA;but i don't know how to upgrade the client? How can i upgrade the client?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2554/runtime-upgrade-error-host-doesnt-provide-such-function-envext-storage-root&#xD;&#xA;  [2]: https://i.stack.imgur.com/qJa38.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23563" PostHistoryTypeId="4" PostId="6127" RevisionGUID="5d855647-f579-499c-8f89-74f5cecc58bb" CreationDate="2022-12-01T14:50:52.600" UserId="3317" Comment="improved formatting" Text="How to upgrade the client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23564" PostHistoryTypeId="24" PostId="6127" RevisionGUID="5d855647-f579-499c-8f89-74f5cecc58bb" CreationDate="2022-12-01T14:50:52.600" Comment="Proposed by 3317 approved by 34 edit id of 345" ContentLicense="CC BY-SA 4.0" />
  <row Id="23565" PostHistoryTypeId="2" PostId="6156" RevisionGUID="53f83579-577d-4c53-acef-9d047b699b19" CreationDate="2022-12-01T15:01:02.623" UserId="28" Text="The `SpendFunds` trait supports a tuple of up to 30 pallets:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[impl_trait_for_tuples::impl_for_tuples(30)]&#xD;&#xA;pub trait SpendFunds&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;	fn spend_funds( ... );&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This means you can configure the `SpendFunds` associated type something like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type SpendFunds = (PalletA, PalletB, PalletC);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Assuming Pallet A, B, and C all implement the `SpendFunds` trait. The pallets will be called in that order, each with the opportunity to spend some of the treasury funds." ContentLicense="CC BY-SA 4.0" />
  <row Id="23567" PostHistoryTypeId="2" PostId="6157" RevisionGUID="98e90e13-8b5c-422c-8c60-aab27c98e03a" CreationDate="2022-12-01T15:35:56.457" UserId="28" Text="You can use a binary search for this. There is no API which will give this to you without some kind of search on your side as blocks are not indexed by timestamp.&#xD;&#xA;&#xD;&#xA;You can also estimate the start of your search knowing that each block is approximately 6 seconds. So if you get the timestamp of any starting block, you can guess approximately which block will be at a certain time.&#xD;&#xA;&#xD;&#xA;For example, looking at the latest block:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Block 13,167,731: 12/1/2022, 3:30:06 PM (+UTC)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And you want: `2022-11-28 10:00:00 (+UTC)`&#xD;&#xA;&#xD;&#xA;The difference in time is 279,006 seconds, which is approximately 46,501 blocks.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;13,167,731 - 46,501 = 13,121,230&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which is off by 37 blocks. This should be quick to search for using any alogrithm at this point." ContentLicense="CC BY-SA 4.0" />
  <row Id="23569" PostHistoryTypeId="2" PostId="6158" RevisionGUID="afa6cef0-69c8-4b4f-add8-7bb65ce45273" CreationDate="2022-12-01T15:37:58.897" UserId="629" Text="On the ChainSpec you provided, I can see that there are no bootnodes set, for `substrate-connect` to connnect to. E.g. if you see the `westend` chainspec provided in substrate-connect repository [there are some bootnodes added there](https://github.com/paritytech/substrate-connect/blob/main/packages/connect/src/connector/specs/westend2.json#L4-L15).&#xD;&#xA;&#xD;&#xA;In order to make your collator listening for WebSocket connections add `--listen-addr /ip4/0.0.0.0/tcp/30334/ws --listen-addr /ip6/::/tcp/30334/ws`. Highlighting the `/ws` at the end, the `IP` and `port` can be modified and aren't important)&#xD;&#xA;&#xD;&#xA;Why is it necessary and what it does? Browsers only allow webpages to open WebSocket connections, meaning that the node you want to connect to needs to listen for WebSocket connections. &#xD;&#xA;&#xD;&#xA;In addition it should have an `HTTP reverse-proxy` in front of the node (e.g. `nginx`, but could be something else), connected to the corresponding port (e.g. `30333` above), and with an SSL certificate configured. The domain name of this SSL certificate isn't really important. You will need to have an SSL certificate in order to go around browsers' security measures." ContentLicense="CC BY-SA 4.0" />
  <row Id="23571" PostHistoryTypeId="5" PostId="6067" RevisionGUID="d512057c-f47e-48f4-9ff8-ef3cbbb165e7" CreationDate="2022-12-01T15:55:39.203" UserId="28" Comment="added 2 characters in body" Text="When I select the Transact instruction, I can select an `OriginKind` (Native, SovereignAccount, Superuser, Xcm) but it isn't clear to me how these different origins are interpreted.&#xD;&#xA;I thought I saw information about this somewhere, but can't find it.&#xD;&#xA;Are there examples of the implications of using different origins or use cases that highlight when to use which origin?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23572" PostHistoryTypeId="2" PostId="6159" RevisionGUID="eb011b59-b843-4ea2-a87a-462472c30397" CreationDate="2022-12-01T15:55:41.630" UserId="28" Text="There are descriptions of the origins in the codebase.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/xcm/src/v0/mod.rs#L60&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Basically just the XCM (more general) version of `ParachainDispatchOrigin`.&#xD;&#xA;#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)]&#xD;&#xA;pub enum OriginKind {&#xD;&#xA;	/// Origin should just be the native dispatch origin representation for the sender in the&#xD;&#xA;	/// local runtime framework. For Cumulus/Frame chains this is the `Parachain` or `Relay` origin&#xD;&#xA;	/// if coming from a chain, though there may be others if the `MultiLocation` XCM origin has a&#xD;&#xA;	/// primary/native dispatch origin form.&#xD;&#xA;	Native,&#xD;&#xA;&#xD;&#xA;	/// Origin should just be the standard account-based origin with the sovereign account of&#xD;&#xA;	/// the sender. For Cumulus/Frame chains, this is the `Signed` origin.&#xD;&#xA;	SovereignAccount,&#xD;&#xA;&#xD;&#xA;	/// Origin should be the super-user. For Cumulus/Frame chains, this is the `Root` origin.&#xD;&#xA;	/// This will not usually be an available option.&#xD;&#xA;	Superuser,&#xD;&#xA;&#xD;&#xA;	/// Origin should be interpreted as an XCM native origin and the `MultiLocation` should be&#xD;&#xA;	/// encoded directly in the dispatch origin unchanged. For Cumulus/Frame chains, this will be&#xD;&#xA;	/// the `pallet_xcm::Origin::Xcm` type.&#xD;&#xA;	Xcm,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The implications of using different origins depends on the code you are calling, and if you are able to generate that origin at all.&#xD;&#xA;&#xD;&#xA;For example, it would not be normal for a regular user to be able to generate the `Superuser` origin, but it may be possible for the chain logic itself to do that. Having access to the `Superuser` origin will allow you to use configurations like `ParentAsSuperuser` which specifically check for these things:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct ParentAsSuperuser&lt;RuntimeOrigin&gt;(PhantomData&lt;RuntimeOrigin&gt;);&#xD;&#xA;impl&lt;RuntimeOrigin: OriginTrait&gt; ConvertOrigin&lt;RuntimeOrigin&gt; for ParentAsSuperuser&lt;RuntimeOrigin&gt; {&#xD;&#xA;	fn convert_origin(&#xD;&#xA;		origin: impl Into&lt;MultiLocation&gt;,&#xD;&#xA;		kind: OriginKind,&#xD;&#xA;	) -&gt; Result&lt;RuntimeOrigin, MultiLocation&gt; {&#xD;&#xA;		let origin = origin.into();&#xD;&#xA;		log::trace!(target: &quot;xcm::origin_conversion&quot;, &quot;ParentAsSuperuser origin: {:?}, kind: {:?}&quot;, origin, kind);&#xD;&#xA;		if kind == OriginKind::Superuser &amp;&amp; origin.contains_parents_only(1) {&#xD;&#xA;			Ok(RuntimeOrigin::root())&#xD;&#xA;		} else {&#xD;&#xA;			Err(origin)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23574" PostHistoryTypeId="2" PostId="6160" RevisionGUID="3420e528-b7c1-4b1b-9659-ff7d7ffca0ee" CreationDate="2022-12-01T15:56:53.827" UserId="3424" Text="How can I make the tests pass?&#xD;&#xA;&#xD;&#xA;Steps to reproduce:&#xD;&#xA;1. `git clone https://github.com/paritytech/polkadot`&#xD;&#xA;2. `cd polkadot`&#xD;&#xA;3. `cargo build`&#xD;&#xA;4. `cargo test`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&lt;details&gt;&#xD;&#xA;&lt;summary&gt;$ cargo test&lt;/summary&gt;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;⚡ Found 3 strongly connected components which includes at least one cycle each&#xD;&#xA;cycle(001) ∈ α: DisputeCoordinator ~~{&quot;DisputeDistributionMessage&quot;}~~&gt; DisputeDistribution ~~{&quot;DisputeCoordinatorMessage&quot;}~~&gt;  *&#xD;&#xA;cycle(002) ∈ β: CandidateBacking ~~{&quot;ProvisionerMessage&quot;}~~&gt; Provisioner ~~{&quot;CandidateBackingMessage&quot;}~~&gt;  *&#xD;&#xA;cycle(003) ∈ γ: NetworkBridgeRx ~~{&quot;GossipSupportMessage&quot;}~~&gt; GossipSupport ~~{&quot;NetworkBridgeRxMessage&quot;}~~&gt;  *&#xD;&#xA;    Finished test [unoptimized + debuginfo] target(s) in 2.15s&#xD;&#xA;     Running unittests src/main.rs (target/debug/deps/polkadot-45cd41598fdd19a5)&#xD;&#xA;&#xD;&#xA;running 0 tests&#xD;&#xA;&#xD;&#xA;test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s&#xD;&#xA;&#xD;&#xA;     Running tests/benchmark_block.rs (target/debug/deps/benchmark_block-36e2726cfcdc7e80)&#xD;&#xA;&#xD;&#xA;running 1 test&#xD;&#xA;2022-12-01 16:42:50 Essential task `txpool-background` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:42:50 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:42:50 Block 1 with     2 tx used 212.10% of its weight (    20,145,091 of      9,497,706 ns) - OVER WEIGHT!    &#xD;&#xA;test benchmark_block_works has been running for over 60 seconds&#xD;&#xA;2022-12-01 16:43:57 Essential task `txpool-background` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:43:57 Essential task `transaction-pool-task-0` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:43:57 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:43:57 Block 1 with     2 tx used 446.49% of its weight (    46,758,523 of     10,472,472 ns) - OVER WEIGHT!    &#xD;&#xA;2022-12-01 16:44:55 Essential task `txpool-background` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:44:55 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:44:55 Block 1 with     2 tx used 186.84% of its weight (    16,926,553 of      9,059,511 ns) - OVER WEIGHT!    &#xD;&#xA;2022-12-01 16:45:46 Essential task `txpool-background` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:45:46 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:45:46 Block 1 with     2 tx used 179.78% of its weight (    14,686,623 of      8,169,364 ns) - OVER WEIGHT!    &#xD;&#xA;test benchmark_block_works ... ok&#xD;&#xA;&#xD;&#xA;test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 231.51s&#xD;&#xA;&#xD;&#xA;     Running tests/benchmark_extrinsic.rs (target/debug/deps/benchmark_extrinsic-405b7d564d961c0a)&#xD;&#xA;&#xD;&#xA;running 2 tests&#xD;&#xA;2022-12-01 16:45:46 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-12-01 16:45:46 [0]  generated 1 npos targets    &#xD;&#xA;2022-12-01 16:45:46 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:45:46 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:45:46 Took active validators from set with wrong size.    &#xD;&#xA;2022-12-01 16:45:46 Took active validators from set with wrong size    &#xD;&#xA;Error: &#xD;&#xA;   0: Other: can only use subcommand with --chain [polkadot-dev, kusama-dev, westend-dev, rococo-dev, wococo-dev], got polkadot&#xD;&#xA;&#xD;&#xA;Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.&#xD;&#xA;Run with RUST_BACKTRACE=full to include source snippets.&#xD;&#xA;Error: &#xD;&#xA;   0: Other: can only use subcommand with --chain [polkadot-dev, kusama-dev, westend-dev, rococo-dev, wococo-dev], got ksmcc3&#xD;&#xA;&#xD;&#xA;Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.&#xD;&#xA;Run with RUST_BACKTRACE=full to include source snippets.&#xD;&#xA;Error: &#xD;&#xA;   0: Other: can only use subcommand with --chain [polkadot-dev, kusama-dev, westend-dev, rococo-dev, wococo-dev], got westend2&#xD;&#xA;&#xD;&#xA;Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.&#xD;&#xA;Run with RUST_BACKTRACE=full to include source snippets.&#xD;&#xA;Error: &#xD;&#xA;   0: Other: can only use subcommand with --chain [polkadot-dev, kusama-dev, westend-dev, rococo-dev, wococo-dev], got rococo_v2_2&#xD;&#xA;&#xD;&#xA;Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.&#xD;&#xA;Run with RUST_BACKTRACE=full to include source snippets.&#xD;&#xA;test benchmark_extrinsic_rejects_non_dev_runtimes ... ok&#xD;&#xA;2022-12-01 16:45:56  Initializing Genesis block/state (state: 0xd6e4…c48c, header-hash: 0x300d…9518)    &#xD;&#xA;2022-12-01 16:45:56  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-12-01 16:46:08  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-12-01 16:46:08 Essential task `transaction-pool-task-0` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:46:08 Essential task `txpool-background` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:46:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:08 Running 1 warmups...    &#xD;&#xA;2022-12-01 16:46:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:08 Executing block 1 times    &#xD;&#xA;2022-12-01 16:46:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:08 Building block, this takes some time...    &#xD;&#xA;2022-12-01 16:46:08 Extrinsics per block: 1    &#xD;&#xA;2022-12-01 16:46:08 Running 1 warmups...    &#xD;&#xA;2022-12-01 16:46:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:08 Executing block 1 times    &#xD;&#xA;2022-12-01 16:46:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:08 Executing a system::remark extrinsic takes[ns]:&#xD;&#xA;Total: 2292161&#xD;&#xA;Min: 2292161, Max: 2292161&#xD;&#xA;Average: 2292161, Median: 2292161, Stddev: 0&#xD;&#xA;Percentiles 99th, 95th, 75th: 2292161, 2292161, 2292161    &#xD;&#xA;2022-12-01 16:46:08 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-12-01 16:46:08 [0]  generated 1 npos targets    &#xD;&#xA;2022-12-01 16:46:08 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:46:08 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:46:08 Took active validators from set with wrong size.    &#xD;&#xA;2022-12-01 16:46:08 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:46:19  Initializing Genesis block/state (state: 0xd6e4…c48c, header-hash: 0x300d…9518)    &#xD;&#xA;2022-12-01 16:46:19  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-12-01 16:46:30  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-12-01 16:46:30 Essential task `txpool-background` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:46:30 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:30 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:30 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:30 Running 1 warmups...    &#xD;&#xA;2022-12-01 16:46:30 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:30 Executing block 1 times    &#xD;&#xA;2022-12-01 16:46:30 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:30 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:30 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:30 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:30 Building block, this takes some time...    &#xD;&#xA;2022-12-01 16:46:30 Extrinsics per block: 1    &#xD;&#xA;2022-12-01 16:46:30 Running 1 warmups...    &#xD;&#xA;2022-12-01 16:46:30 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:30 Executing block 1 times    &#xD;&#xA;2022-12-01 16:46:30 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:46:30 Executing a balances::transfer_keep_alive extrinsic takes[ns]:&#xD;&#xA;Total: 2148076&#xD;&#xA;Min: 2148076, Max: 2148076&#xD;&#xA;Average: 2148076, Median: 2148076, Stddev: 0&#xD;&#xA;Percentiles 99th, 95th, 75th: 2148076, 2148076, 2148076    &#xD;&#xA;2022-12-01 16:46:30 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-12-01 16:46:30 [0]  generated 1 npos targets    &#xD;&#xA;2022-12-01 16:46:30 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:46:30 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:46:30 Took active validators from set with wrong size.    &#xD;&#xA;2022-12-01 16:46:30 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:46:43  Initializing Genesis block/state (state: 0x19ee…acdb, header-hash: 0xbf52…a822)    &#xD;&#xA;2022-12-01 16:46:43  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;test benchmark_extrinsic_works has been running for over 60 seconds&#xD;&#xA;2022-12-01 16:46:55  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-12-01 16:46:55 Essential task `txpool-background` failed. Shutting down service.    &#xD;&#xA;&#xD;&#xA;[...] &#xD;&#xA;&#xD;&#xA;2022-12-01 16:49:27 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:27 Per-extrinsic execution overhead [ns]:&#xD;&#xA;Total: 9205765&#xD;&#xA;Min: 1458056, Max: 2569258&#xD;&#xA;Average: 1841153, Median: 1687580, Stddev: 411441.5&#xD;&#xA;Percentiles 99th, 95th, 75th: 2569258, 2569258, 1998034    &#xD;&#xA;2022-12-01 16:49:27 Writing weights to &quot;/tmp/.tmpukovTg/extrinsic_weights.rs&quot;    &#xD;&#xA;2022-12-01 16:49:27 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-12-01 16:49:27 [0]  generated 1 npos targets    &#xD;&#xA;2022-12-01 16:49:27 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:49:27 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:49:27 Took active validators from set with wrong size.    &#xD;&#xA;2022-12-01 16:49:27 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:49:37  Initializing Genesis block/state (state: 0x90f5…9992, header-hash: 0x6556…b1be)    &#xD;&#xA;2022-12-01 16:49:37  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;test benchmark_overhead_works has been running for over 60 seconds&#xD;&#xA;2022-12-01 16:49:47  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-12-01 16:49:47 Essential task `txpool-background` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 Running 5 warmups...    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 Executing block 5 times    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 Per-block execution overhead [ns]:&#xD;&#xA;Total: 74899660&#xD;&#xA;Min: 13700020, Max: 18086693&#xD;&#xA;Average: 14979932, Median: 14000104, Stddev: 1642355.19&#xD;&#xA;Percentiles 99th, 95th, 75th: 18086693, 18086693, 15218890    &#xD;&#xA;2022-12-01 16:49:47 Writing weights to &quot;/tmp/.tmpumO2Ak/block_weights.rs&quot;    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 Running 5 warmups...    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 Executing block 5 times    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:47 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 Building block, this takes some time...    &#xD;&#xA;2022-12-01 16:49:48 Extrinsics per block: 5    &#xD;&#xA;2022-12-01 16:49:48 Running 5 warmups...    &#xD;&#xA;2022-12-01 16:49:48 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 Executing block 5 times    &#xD;&#xA;2022-12-01 16:49:48 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:49:48 Per-extrinsic execution overhead [ns]:&#xD;&#xA;Total: 6517901&#xD;&#xA;Min: 1054132, Max: 1551289&#xD;&#xA;Average: 1303580, Median: 1334773, Stddev: 211142.12&#xD;&#xA;Percentiles 99th, 95th, 75th: 1551289, 1551289, 1510116    &#xD;&#xA;2022-12-01 16:49:48 Writing weights to &quot;/tmp/.tmpumO2Ak/extrinsic_weights.rs&quot;    &#xD;&#xA;2022-12-01 16:49:48 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:49:48 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:49:48 Took active validators from set with wrong size.    &#xD;&#xA;2022-12-01 16:49:48 Took active validators from set with wrong size    &#xD;&#xA;2022-12-01 16:49:58  Initializing Genesis block/state (state: 0x2a6d…a321, header-hash: 0xd5b3…562d)    &#xD;&#xA;2022-12-01 16:49:58  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-12-01 16:50:08  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-12-01 16:50:08 Essential task `transaction-pool-task-0` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:50:08 Essential task `transaction-pool-task-1` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:50:08 Essential task `txpool-background` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:50:08 Essential task `basic-block-import-worker` failed. Shutting down service.    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 Running 5 warmups...    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 Executing block 5 times    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 Per-block execution overhead [ns]:&#xD;&#xA;Total: 40636642&#xD;&#xA;Min: 7998039, Max: 8340508&#xD;&#xA;Average: 8127328, Median: 8123421, Stddev: 125547.9&#xD;&#xA;Percentiles 99th, 95th, 75th: 8340508, 8340508, 8169301    &#xD;&#xA;2022-12-01 16:50:08 Writing weights to &quot;/tmp/.tmpGAgaPp/block_weights.rs&quot;    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 Running 5 warmups...    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 Executing block 5 times    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 Building block, this takes some time...    &#xD;&#xA;2022-12-01 16:50:08 Extrinsics per block: 5    &#xD;&#xA;2022-12-01 16:50:08 Running 5 warmups...    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 Executing block 5 times    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 ParentBlockRandomness did not provide entropy    &#xD;&#xA;2022-12-01 16:50:08 Per-extrinsic execution overhead [ns]:&#xD;&#xA;Total: 6334846&#xD;&#xA;Min: 1069196, Max: 1617444&#xD;&#xA;Average: 1266969, Median: 1081994, Stddev: 239853.73&#xD;&#xA;Percentiles 99th, 95th, 75th: 1617444, 1617444, 1496373    &#xD;&#xA;2022-12-01 16:50:08 Writing weights to &quot;/tmp/.tmpGAgaPp/extrinsic_weights.rs&quot;    &#xD;&#xA;test benchmark_overhead_works ... ok&#xD;&#xA;&#xD;&#xA;test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 89.02s&#xD;&#xA;&#xD;&#xA;     Running tests/benchmark_storage_works.rs (target/debug/deps/benchmark_storage_works-4795d37400fcf997)&#xD;&#xA;&#xD;&#xA;running 1 test&#xD;&#xA;Error: &#xD;&#xA;   0: Invalid input: Compile with --features=runtime-benchmarks to enable storage benchmarks.&#xD;&#xA;&#xD;&#xA;Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.&#xD;&#xA;Run with RUST_BACKTRACE=full to include source snippets.&#xD;&#xA;test benchmark_storage_works ... FAILED&#xD;&#xA;&#xD;&#xA;failures:&#xD;&#xA;&#xD;&#xA;---- benchmark_storage_works stdout ----&#xD;&#xA;thread 'benchmark_storage_works' panicked at 'assertion failed: benchmark_storage(\&quot;rocksdb\&quot;, base_path).success()', tests/benchmark_storage_works.rs:31:5&#xD;&#xA;note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;failures:&#xD;&#xA;    benchmark_storage_works&#xD;&#xA;&#xD;&#xA;test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s&#xD;&#xA;&#xD;&#xA;error: test failed, to rerun pass `--test benchmark_storage_works`&#xD;&#xA;```&#xD;&#xA;&lt;/details&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23576" PostHistoryTypeId="1" PostId="6160" RevisionGUID="3420e528-b7c1-4b1b-9659-ff7d7ffca0ee" CreationDate="2022-12-01T15:56:53.827" UserId="3424" Text="Polkadot - tests fail out-of-the-box" ContentLicense="CC BY-SA 4.0" />
  <row Id="23577" PostHistoryTypeId="3" PostId="6160" RevisionGUID="3420e528-b7c1-4b1b-9659-ff7d7ffca0ee" CreationDate="2022-12-01T15:56:53.827" UserId="3424" Text="|polkadot|testing|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23578" PostHistoryTypeId="5" PostId="6139" RevisionGUID="e52c711d-e246-46aa-bd95-431f8e8065d3" CreationDate="2022-12-01T15:58:28.440" UserId="3440" Comment="added 79 characters in body; edited tags" Text="while running the flipper contract I get the following error &#xD;&#xA;```&#xD;&#xA;{ Err: { Module: { index: '9', error: '0x06000000' } } }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What does it mean?&#xD;&#xA;&#xD;&#xA;I searched https://wiki.polkadot.network/docs/maintain-errors&#xD;&#xA; but didn't get any idea.&#xD;&#xA;&#xD;&#xA;I am using RPC all to connect **metadata.json** through javascript program" ContentLicense="CC BY-SA 4.0" />
  <row Id="23579" PostHistoryTypeId="6" PostId="6139" RevisionGUID="e52c711d-e246-46aa-bd95-431f8e8065d3" CreationDate="2022-12-01T15:58:28.440" UserId="3440" Comment="added 79 characters in body; edited tags" Text="|pallet|pallet-contracts|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23581" PostHistoryTypeId="52" PostId="6144" RevisionGUID="89742627-2111-4668-8c5b-b70235b99674" CreationDate="2022-12-01T16:38:21.757" />
  <row Id="23582" PostHistoryTypeId="2" PostId="6161" RevisionGUID="79a7e5ba-7a45-40ff-a363-ed81b0bd0fed" CreationDate="2022-12-01T17:04:36.767" UserId="481" Text="You should try again but [follow the steps in the `hacking on polkadot`](https://github.com/paritytech/polkadot#hacking-on-polkadot) section. You are probably missing some dependencies" ContentLicense="CC BY-SA 4.0" />
  <row Id="23584" PostHistoryTypeId="2" PostId="6162" RevisionGUID="11fc9e0c-5821-47e4-ad2f-373448e59d99" CreationDate="2022-12-01T17:07:11.000" UserId="3538" Text="I've built an EVM-compatible blockchain using Substrate and connected it with Metamask and PolkadotJs explorer. But I want a more user-friendly explorer that users with a non-technical background can also use to view their transactions, like etherscan. Are there any open-source explorers out there that are compatible with Substrate-based EVM chains? &#xD;&#xA;Thank you! " ContentLicense="CC BY-SA 4.0" />
  <row Id="23586" PostHistoryTypeId="1" PostId="6162" RevisionGUID="11fc9e0c-5821-47e4-ad2f-373448e59d99" CreationDate="2022-12-01T17:07:11.000" UserId="3538" Text="Explorer for Substrate-based EVM chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="23587" PostHistoryTypeId="3" PostId="6162" RevisionGUID="11fc9e0c-5821-47e4-ad2f-373448e59d99" CreationDate="2022-12-01T17:07:11.000" UserId="3538" Text="|pallet|substrate-node-template|evm|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23592" PostHistoryTypeId="2" PostId="6164" RevisionGUID="16e26697-9357-4070-a460-04b477b0aca2" CreationDate="2022-12-01T17:38:46.937" UserId="2855" Text="Could it be possible to submit and extrinsic using JSON-RPC methods.&#xD;&#xA;&#xD;&#xA;1. Say submit a `balance_transfer` along with its parameters to using a curl or postman as a JSON-RPC" ContentLicense="CC BY-SA 4.0" />
  <row Id="23594" PostHistoryTypeId="1" PostId="6164" RevisionGUID="16e26697-9357-4070-a460-04b477b0aca2" CreationDate="2022-12-01T17:38:46.937" UserId="2855" Text="Is it possible to submit an extrinsic using rpc?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23595" PostHistoryTypeId="3" PostId="6164" RevisionGUID="16e26697-9357-4070-a460-04b477b0aca2" CreationDate="2022-12-01T17:38:46.937" UserId="2855" Text="|extrinsic|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23596" PostHistoryTypeId="5" PostId="6164" RevisionGUID="8eba080d-04a8-40bd-9c08-aff808b83d2e" CreationDate="2022-12-01T18:03:43.137" UserId="2855" Comment="deleted 5 characters in body" Text="Could it be possible to submit and extrinsic using JSON-RPC methods.&#xD;&#xA;&#xD;&#xA;1. Say submit a `balance_transfer` along with its parameters using curl or postman as a JSON-RPC" ContentLicense="CC BY-SA 4.0" />
  <row Id="23597" PostHistoryTypeId="2" PostId="6165" RevisionGUID="38d3d550-93d5-410c-a6c6-c8982406ae96" CreationDate="2022-12-01T18:55:43.907" UserId="684" Text="I want to access a specific pallet's storage item (for example: a `StorageMap` or `StorageValue`) in the function `&lt;Runtime as TaggedTransactionQueue&lt;Block&gt;::validate_transaction()` (note: this function is found in runtime/src/lib.rs FYI).&#xD;&#xA;&#xD;&#xA;Therefore, I am wondering, is it possible to access the value of a pallet's storage item outside of the pallet and in runtime/src/lib.rs itself? Thanks &#xD;&#xA;&#xD;&#xA;@shawn-tabrizi :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="23599" PostHistoryTypeId="1" PostId="6165" RevisionGUID="38d3d550-93d5-410c-a6c6-c8982406ae96" CreationDate="2022-12-01T18:55:43.907" UserId="684" Text="Is it possible to access a specific pallet's storage item in the function `&lt;Runtime as TaggedTransactionQueue&lt;Block&gt;::validate_transaction()`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23600" PostHistoryTypeId="3" PostId="6165" RevisionGUID="38d3d550-93d5-410c-a6c6-c8982406ae96" CreationDate="2022-12-01T18:55:43.907" UserId="684" Text="|runtime|storage|validation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23601" PostHistoryTypeId="5" PostId="6165" RevisionGUID="e237d3e5-1eff-428e-baec-7b0c37fbf919" CreationDate="2022-12-01T18:56:27.573" UserId="684" Comment="added 86 characters in body" Text="I want to access a specific pallet's storage item (for example: a `StorageMap` or `StorageValue`) in the function `&lt;Runtime as TaggedTransactionQueue&lt;Block&gt;::validate_transaction()` (note: this function is found in runtime/src/lib.rs FYI).&#xD;&#xA;&#xD;&#xA;Therefore, I am wondering, is it possible to access the value of a pallet's storage item outside of the pallet and in runtime/src/lib.rs (specifically in `&lt;Runtime as TaggedTransactionQueue&lt;Block&gt;::validate_transaction()`) itself? Thanks &#xD;&#xA;&#xD;&#xA;@shawn-tabrizi :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="23606" PostHistoryTypeId="2" PostId="6167" RevisionGUID="36d2b55d-1e5d-4d01-b331-6ed785c9fb8e" CreationDate="2022-12-01T20:27:13.850" UserId="2762" Text="Yes, with the RPC request `author_submitExtrinsic` https://polkadot.js.org/docs/substrate/rpc/#submitextrinsicextrinsic-extrinsic-hash&#xD;&#xA;&#xD;&#xA;You have to get the balance_transfer extrinsic signed and you can submit it using the RPC author_submitExtrinsic like this:&#xD;&#xA;&#xD;&#xA;    curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;author_submitExtrinsic&quot;, &quot;params&quot;: [&quot;0xbd0284007e56c7cbacdc5c990244cbf948bf75bd7826b381ba27cb13992f1dbc1d89a905011e7fc91d60f775573b34458da2c1f70d1853b396398e37c446660e7bd2b13a646f37f0a69e4b7aed97e3f7bec342f622d3997ad49acc4ba9c72edd7c2c312988c5012c001e000004d611d9bfe81218fbb6a46c8220c110878ae2c51b98147a8f6ec3134bc76f32000400007e56c7cbacdc5c990244cbf948bf75bd7826b381ba27cb13992f1dbc1d89a90528]}' http://localhost:9933/&#xD;&#xA;&#xD;&#xA;You can get the signed extrinsic with PolkadotJS UI.&#xD;&#xA;&#xD;&#xA;Go to Developer-&gt; Extrinsic -&gt; balance -&gt; transfer(). Unselect the Sign and Submit option and you will be able to see the signed transaction you will have to use in the RPC.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;or with the @polkadot/apps library:&#xD;&#xA;&#xD;&#xA;    const transferBalance = api.tx.balances.transfer(BOB, 10);&#xD;&#xA;    const signedExtrinsic = await transferBalance.signAsync(alice).toJSON();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SAnjq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23608" PostHistoryTypeId="2" PostId="6168" RevisionGUID="d746821f-d21e-4dc7-9d0e-98444ee35d81" CreationDate="2022-12-01T21:20:49.640" UserId="94" Text="https://github.com/paritytech/polkadot/pull/6376 should fix this.  &#xD;&#xA;Sorry for the inconvenience.  &#xD;&#xA;&#xD;&#xA;In the meantime to make it pass you can use the same command that [the CI](https://github.com/paritytech/polkadot/blob/71a0fadd627e97b5a71c3cc6fa2aefda14328c19/scripts/ci/gitlab/pipeline/test.yml#L25) uses:  &#xD;&#xA;```bash&#xD;&#xA;cargo test --workspace --profile testnet --verbose --locked --features=runtime-benchmarks,runtime-metrics&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23610" PostHistoryTypeId="2" PostId="6169" RevisionGUID="e7c545b7-3b9e-48c6-a603-fb99ebd9ba05" CreationDate="2022-12-01T23:09:51.503" UserId="298" Text="I have custom rpc on a substrate template.&#xD;&#xA;&#xD;&#xA;Here are the rpc_methods:&#xD;&#xA;&#xD;&#xA;[![methods][1]][1]&#xD;&#xA;&#xD;&#xA;I have manually described the methods in [`apps-config/src/api/spec/supersig.ts`][2]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import type { OverrideBundleDefinition } from '@polkadot/types/types';&#xD;&#xA;&#xD;&#xA;export default {&#xD;&#xA;  rpc: {&#xD;&#xA;    superSig: {&#xD;&#xA;      getProposalState: {&#xD;&#xA;        description: 'Get the proposal state',&#xD;&#xA;        params: [&#xD;&#xA;          {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;          },&#xD;&#xA;          {&#xD;&#xA;            name: 'call_id',&#xD;&#xA;            type: 'CallId',&#xD;&#xA;            &#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Result&lt;(ProposalState&lt;AccountId&gt;, u32), DispatchError&gt;'&#xD;&#xA;      },&#xD;&#xA;      get_user_supersigs: {&#xD;&#xA;        description: 'Get supersigs associated to the user.',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'user_account',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            },&#xD;&#xA;        ],&#xD;&#xA;        type: 'Vec&lt;SupersigId&gt;'&#xD;&#xA;      },&#xD;&#xA;      list_members: {&#xD;&#xA;        description: 'List members of the supersig',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Vec&lt;(AccountId, Role)'&#xD;&#xA;      },&#xD;&#xA;      list_proposals: {&#xD;&#xA;        description: 'List proposals associated to a supersig',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Result&lt;(Vec&lt;ProposalState&lt;AccountId&gt;&gt;, u32), DispatchError&gt;'&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA;  },&#xD;&#xA;} as OverrideBundleDefinition;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I then renamed my chain to &quot;supersig&quot; and added the chain to a local hosted polkadot-js/apps:&#xD;&#xA;&#xD;&#xA;[![][3]][3]&#xD;&#xA;&#xD;&#xA;however the rpc still not showing the methods i attempted to decorate. &#xD;&#xA;&#xD;&#xA;1) Could you provide some guidance for what i am missing?&#xD;&#xA;2) `type: 'Result&lt;(Vec&lt;ProposalState&lt;AccountId&gt;&gt;, u32), DispatchError&gt;'` is that a correct way to create the return type in the rpc module?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/n7KF0.png&#xD;&#xA;  [2]: https://github.com/decentration/apps/blob/page-supersig/packages/apps-config/src/api/spec/supersig.ts&#xD;&#xA;  [3]: https://i.stack.imgur.com/LiQtS.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23612" PostHistoryTypeId="1" PostId="6169" RevisionGUID="e7c545b7-3b9e-48c6-a603-fb99ebd9ba05" CreationDate="2022-12-01T23:09:51.503" UserId="298" Text="How to decorate RPC correctly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23613" PostHistoryTypeId="3" PostId="6169" RevisionGUID="e7c545b7-3b9e-48c6-a603-fb99ebd9ba05" CreationDate="2022-12-01T23:09:51.503" UserId="298" Text="|polkadot-js|rpc|substrate-front-end|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23614" PostHistoryTypeId="5" PostId="6169" RevisionGUID="8c9986a8-85cc-44e6-8ef9-529d689dcace" CreationDate="2022-12-01T23:19:17.040" UserId="298" Comment="added 485 characters in body" Text="**The rpc methods (showing in rpc_methods), are still not showing after (attempting to) decorate the rpc.** &#xD;&#xA;&#xD;&#xA;I have custom rpc on a substrate template.&#xD;&#xA;&#xD;&#xA;Here are the rpc_methods:&#xD;&#xA;&#xD;&#xA;[![methods][1]][1]&#xD;&#xA;&#xD;&#xA;I have manually described the methods in [`apps-config/src/api/spec/supersig.ts`][2]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import type { OverrideBundleDefinition } from '@polkadot/types/types';&#xD;&#xA;&#xD;&#xA;export default {&#xD;&#xA;  rpc: {&#xD;&#xA;    superSig: {&#xD;&#xA;      getProposalState: {&#xD;&#xA;        description: 'Get the proposal state',&#xD;&#xA;        params: [&#xD;&#xA;          {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;          },&#xD;&#xA;          {&#xD;&#xA;            name: 'call_id',&#xD;&#xA;            type: 'CallId',&#xD;&#xA;            &#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Result&lt;(ProposalState&lt;AccountId&gt;, u32), DispatchError&gt;'&#xD;&#xA;      },&#xD;&#xA;      get_user_supersigs: {&#xD;&#xA;        description: 'Get supersigs associated to the user.',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'user_account',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            },&#xD;&#xA;        ],&#xD;&#xA;        type: 'Vec&lt;SupersigId&gt;'&#xD;&#xA;      },&#xD;&#xA;      list_members: {&#xD;&#xA;        description: 'List members of the supersig',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Vec&lt;(AccountId, Role)'&#xD;&#xA;      },&#xD;&#xA;      list_proposals: {&#xD;&#xA;        description: 'List proposals associated to a supersig',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Result&lt;(Vec&lt;ProposalState&lt;AccountId&gt;&gt;, u32), DispatchError&gt;'&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA;  },&#xD;&#xA;} as OverrideBundleDefinition;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I then renamed my local custom [node-template][3], using this command:&#xD;&#xA;&#xD;&#xA;`./target/release/node-template  --chain=&quot;./supersig-raw.json&quot; --alice --rpc-cors all --rpc-methods=unsafe` &#xD;&#xA;&#xD;&#xA;I named the chain to &quot;supersig&quot; and id: supersig in theh chain-spec, &#xD;&#xA;&#xD;&#xA;and added the chain to a local hosted polkadot-js/apps ([this branch][4]):&#xD;&#xA;&#xD;&#xA;[![][5]][5]&#xD;&#xA;&#xD;&#xA;However, the rpc still not showing the methods I attempted to decorate. &#xD;&#xA;&#xD;&#xA;1) Could you provide some guidance for what i am missing?&#xD;&#xA;2) `type: 'Result&lt;(Vec&lt;ProposalState&lt;AccountId&gt;&gt;, u32), DispatchError&gt;'` is that a correct way to create the return type in the rpc module?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/n7KF0.png&#xD;&#xA;  [2]: https://github.com/decentration/apps/blob/page-supersig/packages/apps-config/src/api/spec/supersig.ts&#xD;&#xA;  [3]: https://github.com/decentration/substrate-supersig-template&#xD;&#xA;  [4]: https://github.com/decentration/apps/tree/page-supersig&#xD;&#xA;  [5]: https://i.stack.imgur.com/LiQtS.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23617" PostHistoryTypeId="2" PostId="6170" RevisionGUID="3277dd0d-7ce7-42ad-8a26-b04b65933b6e" CreationDate="2022-12-02T05:35:08.637" UserId="3013" Text="I am sending an XCM `Transact` message in `on_finalize` hook, which calls `on_transact_received` function on the receiving side. I would like to assure that this call was called by the hook (trusted data) and not by some random person. I assume I have to use the [DescendOrigin()][1] instruction but I am not sure what to put in on the sending side (a sovereign account? how?) and how to decode it on the receiving side. Can you provide a small code excerpt for both sides?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4627/how-to-see-account-id-origin-when-receiving-an-xcm-message-currently-the-origin" ContentLicense="CC BY-SA 4.0" />
  <row Id="23619" PostHistoryTypeId="1" PostId="6170" RevisionGUID="3277dd0d-7ce7-42ad-8a26-b04b65933b6e" CreationDate="2022-12-02T05:35:08.637" UserId="3013" Text="How to ensure the XCM callback is called by the pallet hook in the sending chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23620" PostHistoryTypeId="3" PostId="6170" RevisionGUID="3277dd0d-7ce7-42ad-8a26-b04b65933b6e" CreationDate="2022-12-02T05:35:08.637" UserId="3013" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23621" PostHistoryTypeId="2" PostId="6171" RevisionGUID="6aa7b2de-fbe3-4546-a716-8c2dc1a158fb" CreationDate="2022-12-02T06:13:56.273" UserId="3543" Text="My aim is to become a core blockchain developer (not just the smart contract developer). So I can create custom blockchain for companies to meet their business needs.&#xD;&#xA;&#xD;&#xA;I am good with rust and previously worked on it and contributed into [rust-clippy][1] project.  &#xD;&#xA;&#xD;&#xA;After reading through [this post][2] I found great learning resources, and now my questions are :&#xD;&#xA;&#xD;&#xA;1. How to find mentorship and land the first job? &#xD;&#xA;&#xD;&#xA;2. What are the possible steps that can be taken to increase the likelihood of a successful career of a substrate developer? &#xD;&#xA;&#xD;&#xA;Please Note : Currently I'm unemployed and therefore I have plenty of time to prepare myself. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/rust-lang/rust-clippy&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1074/how-do-i-become-a-substrate-developer" ContentLicense="CC BY-SA 4.0" />
  <row Id="23623" PostHistoryTypeId="1" PostId="6171" RevisionGUID="6aa7b2de-fbe3-4546-a716-8c2dc1a158fb" CreationDate="2022-12-02T06:13:56.273" UserId="3543" Text="How to find mentorship to become a substrate developer and land the first job?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23624" PostHistoryTypeId="3" PostId="6171" RevisionGUID="6aa7b2de-fbe3-4546-a716-8c2dc1a158fb" CreationDate="2022-12-02T06:13:56.273" UserId="3543" Text="|polkadot|parachain|advice|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23625" PostHistoryTypeId="2" PostId="6172" RevisionGUID="4849854d-6df9-4992-a209-c1c1d66979ee" CreationDate="2022-12-02T06:15:36.673" UserId="1959" Text="1. On the sending side, I think you can send your XCM directly **without including `DescendOrigin` instruction**. &#xD;&#xA;&#xD;&#xA;   The XCM might be:&#xD;&#xA;   ```&#xD;&#xA;   WithdrawAsset(..),&#xD;&#xA;   BuyExecution(..),&#xD;&#xA;   Transact(..)&#xD;&#xA;   ```&#xD;&#xA;2. And then on the receiving side, you need to make sure the `Origin` which call your function is the sending chain's sovereign account.&#xD;&#xA;&#xD;&#xA;Let me explain to you why. &#xD;&#xA;&#xD;&#xA;For the first step, in general, without `DescendOrigin` represent the XCM is sent via sudo or governance or your runtime code, which will be your sovereign account on receiving chain, and it is trustworthy. Because [a `DescendOrigin` will be added](https://github.com/paritytech/polkadot/blob/master/xcm/pallet-xcm/src/lib.rs#L1078) when an ordinary user send a XCM.&#xD;&#xA;&#xD;&#xA;For the second step, maybe you want to know how to calculate the sovereign account, please refer to https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain/1210&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23627" PostHistoryTypeId="5" PostId="6129" RevisionGUID="b1daed08-e485-459e-8e95-79d01c655571" CreationDate="2022-12-02T07:35:58.053" UserId="3317" Comment="edited body" Text="From the link you shared, you want to upgrade your node to a newer substrate version. If the newer substrate version only requires changes in the runtime, you can do a runtime upgrade &quot;on-chain&quot; (it is not required to shut down the node). However, if the newer substrate version requires changes on the client side , you need to do a client upgrade. &#xD;&#xA;&#xD;&#xA;You can upgrade the client by stopping the node, compile the new code (`cargo build --release`) and run the new binary (`./target/...`).&#xD;&#xA;&#xD;&#xA;And to give an example for the error. When there is a new host function in the client which did not exist yet in an older client version, and the upgraded runtime uses this new host function. You need to upgrade the client otherwise you'll get such an error." ContentLicense="CC BY-SA 4.0" />
  <row Id="23628" PostHistoryTypeId="4" PostId="6143" RevisionGUID="5d9f9e94-bafb-4a16-b626-3d3933972e89" CreationDate="2022-12-02T08:07:22.717" UserId="3534" Comment="edited title" Text="ParaChain blocks are not producing and finalising with Relay chain ( when using with custom specs)" ContentLicense="CC BY-SA 4.0" />
  <row Id="23629" PostHistoryTypeId="2" PostId="6173" RevisionGUID="1399dff9-c337-4a57-9629-335a101eba4c" CreationDate="2022-12-02T09:18:44.863" UserId="2762" Text="[The Polkadot Blockchain Academy][1] would be ideal for you as you will about Polkadot and Substrate directly by the core developers of this technologies.&#xD;&#xA;&#xD;&#xA;&gt; The Polkadot Blockchain Academy is a classroom-based educational&#xD;&#xA;&gt; program covering the conceptual underpinnings and the hands-on&#xD;&#xA;&gt; application of blockchain technology, using Polkadot and Substrate as&#xD;&#xA;&gt; the foundations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I recommend you to participate in Hackatons, where you can build things and meet other people from the ecosystem.&#xD;&#xA;&#xD;&#xA;There are a plenty being organised, just as an example a few weeks ago the [Polkadot LATAM Hackathon][2] ends with lot of interesting projects and next week you have [Polkadot Metaverse Championship][3].&#xD;&#xA;&#xD;&#xA;And finally you have [Substrate Seminar][4],  is an online meet-up for learning all things Substrate. You can learn and ask questions to the people building amazing things.&#xD;&#xA;Subscribe on [Twitch][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/academy/&#xD;&#xA;  [2]: https://polkadothackathonlatam.com/en/home-en/&#xD;&#xA;  [3]: https://metaversechampionship.gg/&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/substrate-seminar&#xD;&#xA;  [5]: https://www.twitch.tv/polkadotdev" ContentLicense="CC BY-SA 4.0" />
  <row Id="23631" PostHistoryTypeId="2" PostId="6174" RevisionGUID="7b52c90a-7eeb-44b6-9aa1-0d9009e8bde7" CreationDate="2022-12-02T09:22:52.277" UserId="485" Text="During block authorship, the execution time of each transaction is measured, rather than weights right? &#xD;&#xA;&#xD;&#xA;Doesn't that mean as a runtime developer, you only need weights for pricing your extrinsics, but technically, we could price them dynamically based on execution time?&#xD;&#xA;&#xD;&#xA;Which in turn is a better dev experience, i dunno. Unless i'm missing something?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23633" PostHistoryTypeId="1" PostId="6174" RevisionGUID="7b52c90a-7eeb-44b6-9aa1-0d9009e8bde7" CreationDate="2022-12-02T09:22:52.277" UserId="485" Text="Are weights really neccessary?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23634" PostHistoryTypeId="3" PostId="6174" RevisionGUID="7b52c90a-7eeb-44b6-9aa1-0d9009e8bde7" CreationDate="2022-12-02T09:22:52.277" UserId="485" Text="|weight|block-production|weighttofee|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23635" PostHistoryTypeId="2" PostId="6175" RevisionGUID="54bb060a-6097-408c-af0c-812bf8842886" CreationDate="2022-12-02T09:29:33.580" UserId="3545" Text="Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/home/briza/Desktop/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA; Using rustc version: rustc 1.67.0-nightly (c97b539e4 2022-11-30)&#xD;&#xA;&#xD;&#xA;I followed this doc: https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/ , and when I worked in this step &quot;Implement the Contracts configuration trait&quot;, and I use th&#xD;&#xA;    cargo check -p node-template-runtime --release&#xD;&#xA;&#xD;&#xA; the terminal showed that&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&gt; error[E0432]: unresolved import `pallet_contracts::DefaultContractAccessWeight`&#xD;&#xA;&#xD;&#xA;more information below:&#xD;&#xA;&#xD;&#xA;&gt;   Information that should be included in a bug report.&#xD;&#xA;  Executing build command: &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/home/briza/Desktop/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.67.0-nightly (c97b539e4 2022-11-30)&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/home/briza/Desktop/substrate-node-template/runtime)&#xD;&#xA;  error[E0432]: unresolved import `pallet_contracts::DefaultContractAccessWeight`&#xD;&#xA;    --&gt; /home/briza/Desktop/substrate-node-template/runtime/src/lib.rs:47:5&#xD;&#xA;     |&#xD;&#xA;  47 | use pallet_contracts::DefaultContractAccessWeight; &#xD;&#xA;     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `DefaultContractAccessWeight` in the root&#xD;&#xA;  error[E0437]: type `ContractAccessWeight` is not a member of trait `pallet_contracts::Config`&#xD;&#xA;     --&gt; /home/briza/Desktop/substrate-node-template/runtime/src/lib.rs:167:3&#xD;&#xA;      |&#xD;&#xA;  167 |   type ContractAccessWeight = DefaultContractAccessWeight&lt;BlockWeights&gt;;&#xD;&#xA;      |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `pallet_contracts::Config`&#xD;&#xA;  error[E0437]: type `RelaxedMaxCodeLen` is not a member of trait `pallet_contracts::Config`&#xD;&#xA;     --&gt; /home/briza/Desktop/substrate-node-template/runtime/src/lib.rs:169:3&#xD;&#xA;      |&#xD;&#xA;  169 |   type RelaxedMaxCodeLen = ConstU32&lt;{ 512 * 1024 }&gt;;&#xD;&#xA;      |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `pallet_contracts::Config`&#xD;&#xA;  Some errors have detailed explanations: E0432, E0437.&#xD;&#xA;  For more information about an error, try `rustc --explain E0432`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Cghlv.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23637" PostHistoryTypeId="1" PostId="6175" RevisionGUID="54bb060a-6097-408c-af0c-812bf8842886" CreationDate="2022-12-02T09:29:33.580" UserId="3545" Text="unresolved import `pallet_contracts::DefaultContractAccessWeight`" ContentLicense="CC BY-SA 4.0" />
  <row Id="23638" PostHistoryTypeId="3" PostId="6175" RevisionGUID="54bb060a-6097-408c-af0c-812bf8842886" CreationDate="2022-12-02T09:29:33.580" UserId="3545" Text="|substrate-node-template|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23639" PostHistoryTypeId="2" PostId="6176" RevisionGUID="877cfe6d-31e6-4194-ac7b-229b45c3679b" CreationDate="2022-12-02T09:43:11.877" UserId="359" Text="The main reason is it is impossible to deterministically determine the execution time of a transaction without heavy overhead (e.g. gas metering).&#xD;&#xA;&#xD;&#xA;For example, user send a transaction, the execution time is 10ms on the block producer Alice. Alice created the block, charged 10ms worth of the tx fee and broadcast the produced block. Other fullnode needs to validate this block by replaying it, and remeasure the execution time. For various reason, Bob may need 20ms to evaluate this tx. Should Bob reject this block because it is under charging? How could Alice proof the execution time is 10ms?&#xD;&#xA;&#xD;&#xA;Could a valuator just say I have this magic computer that can execute all the transactions in 1ms and under charge the tx fee to DOS the network? &#xD;&#xA;&#xD;&#xA;Could a valuator just say hey my machine for some reason requires 500ms to execute this tx so I am going to charge you 500ms instead of an executed execution time of 10ms.&#xD;&#xA;&#xD;&#xA;Weight functions provide a way to provide a reasonable estimation of the execution time of a call that is deterministic and reproducible.&#xD;&#xA;&#xD;&#xA;Of course, you can do gas metering just like any other smart contract chain. But you will also need to pay for the overhead of the gas metering, which are significant." ContentLicense="CC BY-SA 4.0" />
  <row Id="23641" PostHistoryTypeId="2" PostId="6177" RevisionGUID="02b0760f-6903-45a0-9040-1f2d6a7f9c24" CreationDate="2022-12-02T09:51:26.867" UserId="73" Text="&gt; During block authorship, the execution time of each transaction is measured, rather than weights right?&#xD;&#xA;&#xD;&#xA;We don't measure the execution time per extrinsic. Each block has a fixed slot for proposing/building it. This slot is measured using the wall clock time. However, this is only used to ensure that you are staying in certain limits. Weights are the much more important factor here. Weights are also measured while building a block, but in the runtime. The runtime rejects a transaction when it would use more weight than we have left in the block. This transaction will then be put back into the transaction pool for the next round. &#xD;&#xA;&#xD;&#xA;&gt; Doesn't that mean as a runtime developer, you only need weights for pricing your extrinsics, but technically, we could price them dynamically based on execution time?&#xD;&#xA;&#xD;&#xA;No, weights are extremely important for your chain. The runtime needs to ensure that each block can be imported by a given minimum hardware on time. This minimum hardware is what is used to run the benchmarks. If you would use the wall clock time for this, a really really powerful validator could build blocks that will take other validators more time to import. In a really bad scenario this &quot;malicious&quot; validator may could produce a block that takes minutes to import while it should take seconds. Then the entire network would run behind and may enable this validator to produce a new block resulting in all nodes taking too much time to import the block again.&#xD;&#xA;&#xD;&#xA;So, weight is really important to ensure that a block is bounded and stays in certain limits. For Parachains where Weight2D will also track the storage proof usage it will be even more important.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23643" PostHistoryTypeId="5" PostId="6134" RevisionGUID="6795c5b3-ff8a-44f2-bcc1-88593dcafe2f" CreationDate="2022-12-02T09:55:48.080" UserId="3317" Comment="added 156 characters in body" Text="First, the [transaction_payment pallet][1] does this for you with [compute_actual_fee][2] from the [post_dispatch][3] and configuring it in your runtime with the `ChargeTransactionPayment` signed extension via `SignedExtra`, as done in [Kusama][4]. Some additional [info][5].&#xD;&#xA;&#xD;&#xA;Going to your questions.&#xD;&#xA;1) The first thing that needs to be understood is the existence of a [Storage Overlay][6], which caches values which have been read or written to inside of a block. This means, if you read a storage item, the first time, it will need to navigate through the whole merkle trie, and fetch that storage item. But the second time, it just reads from the storage overlay, since that value has been cached by the client ([ref][7]).&#xD;&#xA;&#xD;&#xA;2) Correct, you should benchmark. Regarding your cache concern, the benchmarking tool/framework is smart enough to know that the reads that are cached don't add up the same cost as a read from db ([ref][8]). &#xD;&#xA;&#xD;&#xA;Just in case, for benchmarking in general, check out what [whitelisting][9] is.&#xD;&#xA;&#xD;&#xA;3) Correct again, based on your benchmark results you should do weight annotations based on a worst-case scenario. The `post_dispatch` will handle the difference between the worst-case and actual weight. In the official FRAME docs the weights are generated dynamically with a weight function in the weight.rs file. You could consider this &quot;the best way&quot;.&#xD;&#xA;&#xD;&#xA;Example for answer three: &#xD;&#xA;- extrinsic: [frame/identity/src/lib.rs][10]&#xD;&#xA;- dynamic weight function: [frame/identity/src/weight.rs][11]&#xD;&#xA;&#xD;&#xA;For people who like to watch a in-depth video about benchmarking, watch the [substrate seminar][12] about it!&#xD;&#xA;&#xD;&#xA;For a good [explanation][13] about the importance of weights. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L552&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs/#L820&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs/#L785&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5859/how-the-transaction-payment-pallet-handles-transaction-fee-of-every-extrinsic&#xD;&#xA;  [6]: https://www.shawntabrizi.com/assets/presentations/substrate-storage-deep-dive.pdf&#xD;&#xA;  [7]: https://substrate.stackexchange.com/questions/2574/clarity-on-storage-read-write-caching&#xD;&#xA;  [8]: https://substrate.stackexchange.com/questions/2493/do-benchmarks-consider-cached-reads&#xD;&#xA;  [9]: https://substrate.stackexchange.com/questions/4207/benchmarking-whitelist/4231#4231&#xD;&#xA;  [10]: https://github.com/paritytech/substrate/blob/357c363f2fbd1ea53687e90d0ca15677c4468b10/frame/identity/src/lib.rs#L288&#xD;&#xA;  [11]: https://github.com/paritytech/substrate/blob/master/frame/identity/src/weights.rs#L73&#xD;&#xA;  [12]: https://www.youtube.com/watch?v=Qa6sTyUqgek&#xD;&#xA;  [13]: https://substrate.stackexchange.com/questions/6174/are-weights-really-neccessary" ContentLicense="CC BY-SA 4.0" />
  <row Id="23644" PostHistoryTypeId="50" PostId="5652" RevisionGUID="d97ca325-832c-4906-8411-f04b7d4034f9" CreationDate="2022-12-02T10:03:25.380" UserId="-1" />
  <row Id="23645" PostHistoryTypeId="5" PostId="6173" RevisionGUID="1d565a4c-eff6-4308-b2ee-43dd2db4fcae" CreationDate="2022-12-02T10:08:26.453" UserId="3317" Comment="a rewrite suggestion of the first part" Text="First, [The Polkadot Blockchain Academy][1] is a unique opportunity for developers such as yourself where the students will learn everything about Polkadot and Substrate directly from the core developers.&#xD;&#xA;&#xD;&#xA;&gt; The Polkadot Blockchain Academy is a classroom-based educational&#xD;&#xA;&gt; program covering the conceptual underpinnings and the hands-on&#xD;&#xA;&gt; application of blockchain technology, using Polkadot and Substrate as&#xD;&#xA;&gt; the foundations.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I recommend you to participate in Hackatons, where you can build things and meet other people from the ecosystem.&#xD;&#xA;&#xD;&#xA;There are a plenty being organised, just as an example a few weeks ago the [Polkadot LATAM Hackathon][2] ends with lot of interesting projects and next week you have [Polkadot Metaverse Championship][3].&#xD;&#xA;&#xD;&#xA;And finally you have [Substrate Seminar][4],  is an online meet-up for learning all things Substrate. You can learn and ask questions to the people building amazing things.&#xD;&#xA;Subscribe on [Twitch][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/academy/&#xD;&#xA;  [2]: https://polkadothackathonlatam.com/en/home-en/&#xD;&#xA;  [3]: https://metaversechampionship.gg/&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/substrate-seminar&#xD;&#xA;  [5]: https://www.twitch.tv/polkadotdev" ContentLicense="CC BY-SA 4.0" />
  <row Id="23646" PostHistoryTypeId="24" PostId="6173" RevisionGUID="1d565a4c-eff6-4308-b2ee-43dd2db4fcae" CreationDate="2022-12-02T10:08:26.453" Comment="Proposed by 3317 approved by 2762 edit id of 349" ContentLicense="CC BY-SA 4.0" />
  <row Id="23647" PostHistoryTypeId="5" PostId="6173" RevisionGUID="5ec0dac3-2ef3-4fec-acb5-87403964d57a" CreationDate="2022-12-02T10:56:48.040" UserId="3317" Comment="new version" Text="To not replicate any of the great suggestions made in the link you referred to and to add value. &#xD;&#xA;&#xD;&#xA;First, [The Polkadot Blockchain Academy][1] is a unique opportunity for developers such as yourself where students will learn everything about Polkadot and Substrate directly from the core developers.&#xD;&#xA;&#xD;&#xA;Second, I recommend you to participate in Hackatons, where you can build things and meet other people from the ecosystem.&#xD;&#xA;&#xD;&#xA;There are a plenty being organised, just as an example a few weeks ago the [Polkadot LATAM Hackathon][2] ends with lot of interesting projects and next week you have [Polkadot Metaverse Championship][3].&#xD;&#xA;&#xD;&#xA;And finally you have [Substrate Seminar][4],  is an online meet-up for learning all things Substrate. You can learn and ask questions to the people building amazing things.&#xD;&#xA;Subscribe on [Twitch][5].&#xD;&#xA;&#xD;&#xA;There is no one-way answer to your questions, but if you dive into all the information provided and you put in the time, I'm sure you'll come a long way! &#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/academy/&#xD;&#xA;  [2]: https://polkadothackathonlatam.com/en/home-en/&#xD;&#xA;  [3]: https://metaversechampionship.gg/&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/substrate-seminar&#xD;&#xA;  [5]: https://www.twitch.tv/polkadotdev" ContentLicense="CC BY-SA 4.0" />
  <row Id="23648" PostHistoryTypeId="24" PostId="6173" RevisionGUID="5ec0dac3-2ef3-4fec-acb5-87403964d57a" CreationDate="2022-12-02T10:56:48.040" Comment="Proposed by 3317 approved by -1 edit id of 350" ContentLicense="CC BY-SA 4.0" />
  <row Id="23649" PostHistoryTypeId="5" PostId="6173" RevisionGUID="3fc75764-27de-43ee-aed9-5a41e198f1fe" CreationDate="2022-12-02T10:56:48.040" UserId="2762" Comment="new version" Text="First, [The Polkadot Blockchain Academy][1] is a unique opportunity for developers such as yourself where students will learn everything about Polkadot and Substrate directly from the core developers.&#xD;&#xA;&#xD;&#xA;Second, I recommend you to participate in Hackatons, where you can build things and meet other people from the ecosystem.&#xD;&#xA;&#xD;&#xA;There are a plenty being organised, just as an example a few weeks ago the [Polkadot LATAM Hackathon][2] ends with lot of interesting projects and next week you have [Polkadot Metaverse Championship][3].&#xD;&#xA;&#xD;&#xA;And finally you have [Substrate Seminar][4],  is an online meet-up for learning all things Substrate. You can learn and ask questions to the people building amazing things.&#xD;&#xA;Subscribe on [Twitch][5].&#xD;&#xA;&#xD;&#xA;There is no one-way answer to your questions, but if you dive into all the information provided and you put in the time, I'm sure you'll come a long way! &#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/academy/&#xD;&#xA;  [2]: https://polkadothackathonlatam.com/en/home-en/&#xD;&#xA;  [3]: https://metaversechampionship.gg/&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/substrate-seminar&#xD;&#xA;  [5]: https://www.twitch.tv/polkadotdev" ContentLicense="CC BY-SA 4.0" />
  <row Id="23650" PostHistoryTypeId="50" PostId="5657" RevisionGUID="f10d1004-ab93-4e8f-abf0-c830bbc2795a" CreationDate="2022-12-02T11:00:40.173" UserId="-1" />
  <row Id="23651" PostHistoryTypeId="2" PostId="6178" RevisionGUID="bc1c42f2-e869-42d0-b79b-09a8465545b4" CreationDate="2022-12-02T11:17:23.063" UserId="484" Text="I want to rename one of our `collective` pallet instances to be visible in the PolkaddotJs App.&#xD;&#xA;&#xD;&#xA;I think the best option would be to migrate raw data.&#xD;&#xA;&#xD;&#xA;I assume that all pallet data has the same trie path prefix.&#xD;&#xA;&#xD;&#xA;So I can do a copy of all keys with this prefix.&#xD;&#xA;&#xD;&#xA;Will this approach work? &#xD;&#xA;&#xD;&#xA;Rename could be a common operation. Could anybody refer relevant examples?&#xD;&#xA;&#xD;&#xA;Another alternative is to have two pallets instances running, filter out calls to old pallet. Migrate each storage using typed interface. I think this approach is overkill. I need actually do this for 2 pallets. " ContentLicense="CC BY-SA 4.0" />
  <row Id="23653" PostHistoryTypeId="1" PostId="6178" RevisionGUID="bc1c42f2-e869-42d0-b79b-09a8465545b4" CreationDate="2022-12-02T11:17:23.063" UserId="484" Text="How to write pallet rename data migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23654" PostHistoryTypeId="3" PostId="6178" RevisionGUID="bc1c42f2-e869-42d0-b79b-09a8465545b4" CreationDate="2022-12-02T11:17:23.063" UserId="484" Text="|pallet|storage|migration|trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23656" PostHistoryTypeId="2" PostId="6179" RevisionGUID="1eeb54cc-bfb1-45b3-ab90-8927332ae042" CreationDate="2022-12-02T12:38:34.037" UserId="94" Text="&gt;I assume that all pallet data has the same trie path prefix.&#xD;&#xA;&#xD;&#xA;Yes, this makes it much easier to migration.  &#xD;&#xA;There are [move_pallet](https://paritytech.github.io/substrate/master/frame_support/storage/migration/index.html) and `move_storage_from_pallet` which can help.&#xD;&#xA;&#xD;&#xA;There is even a test in the `collective` pallet to test these functions [here](https://github.com/paritytech/substrate/blob/940a458a8eaf05fdeda441dad82b2df186bf260e/frame/collective/src/tests.rs#L1387). Something like:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let old_pallet = &quot;OldCollective&quot;;&#xD;&#xA;let new_pallet = &lt;Collective as PalletInfoAccess&gt;::name();&#xD;&#xA;frame_support::storage::migration::move_pallet(&#xD;&#xA;	new_pallet.as_bytes(),&#xD;&#xA;	old_pallet.as_bytes(),&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Maybe someone else can point you to best-practices when it comes to renaming pallets.  &#xD;&#xA;The only thing that comes to my mind now is that: If you are doing this on a para-chain; it is important that the migration stays within the block weight limit. The `try-runtime` command prints the consumed weight relative to the block weight on completion so you can use that as indication but should still over-estimate." ContentLicense="CC BY-SA 4.0" />
  <row Id="23658" PostHistoryTypeId="2" PostId="6180" RevisionGUID="7e9f5e90-39a5-4bf1-a1b3-5dd61d9e1909" CreationDate="2022-12-02T13:13:00.570" UserId="251" Text="This is a Substrate/Polkadot &quot;official&quot; pallet prefix migration example.&#xD;&#xA;&#xD;&#xA;- https://github.com/paritytech/substrate/pull/9115/files#diff-1dee027b2fa4c245bc171233ac07ec714f3fdc9a83a0f428adf67a2966049717R59-R62&#xD;&#xA;- https://github.com/paritytech/polkadot/pull/3265" ContentLicense="CC BY-SA 4.0" />
  <row Id="23660" PostHistoryTypeId="2" PostId="6181" RevisionGUID="529a50d4-e137-42d5-bf7f-f99664b3473d" CreationDate="2022-12-02T13:46:15.107" UserId="73" Text="Yes that is possible. `validate_transaction` will be called in the context of some block and in this context you can read the pallet storage items.&#xD;&#xA;&#xD;&#xA;While you can read storage items, you also need to ensure that you are staying in certain limits. For example you should not do any kind of storage iteration. The problem with all this is that every node will call `validate_transaction` before adding a transaction to the tx-pool and also when the transaction is in the pool to check if it is still valid. All these operations are &quot;free&quot; and make it possible to dos your node. So, ensure that you are not doing too many storage reads or doing too many calculations." ContentLicense="CC BY-SA 4.0" />
  <row Id="23662" PostHistoryTypeId="5" PostId="6169" RevisionGUID="8a4152cb-8d14-467e-8843-9d01a445d427" CreationDate="2022-12-02T14:18:13.903" UserId="298" Comment="added 21 characters in body" Text="**The rpc methods (showing in rpc_methods), are still not showing after (attempting to) decorate the rpc.** &#xD;&#xA;&#xD;&#xA;I have custom rpc on a substrate template.&#xD;&#xA;&#xD;&#xA;Here are the rpc_methods:&#xD;&#xA;&#xD;&#xA;[![methods][1]][1]&#xD;&#xA;&#xD;&#xA;I have manually described the methods in [`apps-config/src/api/spec/supersig.ts`][2]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import type { OverrideBundleDefinition } from '@polkadot/types/types';&#xD;&#xA;&#xD;&#xA;export default {&#xD;&#xA;  rpc: {&#xD;&#xA;    superSig: {&#xD;&#xA;      getProposalState: {&#xD;&#xA;        description: 'Get the proposal state',&#xD;&#xA;        params: [&#xD;&#xA;          {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;          },&#xD;&#xA;          {&#xD;&#xA;            name: 'call_id',&#xD;&#xA;            type: 'CallId',&#xD;&#xA;            &#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Result&lt;(ProposalState&lt;AccountId&gt;, u32), DispatchError&gt;'&#xD;&#xA;      },&#xD;&#xA;      get_user_supersigs: {&#xD;&#xA;        description: 'Get supersigs associated to the user.',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'user_account',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            },&#xD;&#xA;        ],&#xD;&#xA;        type: 'Vec&lt;SupersigId&gt;'&#xD;&#xA;      },&#xD;&#xA;      list_members: {&#xD;&#xA;        description: 'List members of the supersig',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Vec&lt;(AccountId, Role)'&#xD;&#xA;      },&#xD;&#xA;      list_proposals: {&#xD;&#xA;        description: 'List proposals associated to a supersig',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Result&lt;(Vec&lt;ProposalState&lt;AccountId&gt;&gt;, u32), DispatchError&gt;'&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA;  },&#xD;&#xA;} as OverrideBundleDefinition;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I then renamed my local custom [node-template][3], and then launched it using this command:&#xD;&#xA;&#xD;&#xA;`./target/release/node-template  --chain=&quot;./supersig-raw.json&quot; --alice --rpc-cors all --rpc-methods=unsafe` &#xD;&#xA;&#xD;&#xA;I named the chain to &quot;supersig&quot; and id: supersig in theh chain-spec, &#xD;&#xA;&#xD;&#xA;and added the chain to a local hosted polkadot-js/apps ([this branch][4]):&#xD;&#xA;&#xD;&#xA;[![][5]][5]&#xD;&#xA;&#xD;&#xA;However, the rpc still not showing the methods I attempted to decorate. &#xD;&#xA;&#xD;&#xA;1) Could you provide some guidance for what i am missing?&#xD;&#xA;2) `type: 'Result&lt;(Vec&lt;ProposalState&lt;AccountId&gt;&gt;, u32), DispatchError&gt;'` is that a correct way to create the return type in the rpc module?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/n7KF0.png&#xD;&#xA;  [2]: https://github.com/decentration/apps/blob/page-supersig/packages/apps-config/src/api/spec/supersig.ts&#xD;&#xA;  [3]: https://github.com/decentration/substrate-supersig-template&#xD;&#xA;  [4]: https://github.com/decentration/apps/tree/page-supersig&#xD;&#xA;  [5]: https://i.stack.imgur.com/LiQtS.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23663" PostHistoryTypeId="2" PostId="6182" RevisionGUID="019a245e-0d87-438e-a8e0-64bc08230dda" CreationDate="2022-12-02T14:44:52.180" UserId="3002" Text="You can use [Acurast data providers][1], which allow you to delegate the execution of arbitrary javascript code inside a [TEE][2](Trusted Execution Environment)&#xD;&#xA;&#xD;&#xA;Our solution is currently at phase 0, where you can schedule jobs in this [Tezos smart-contract][3]. There, you provide the IPFS hash of the javascript code you want to execute and the period of execution for the job.&#xD;&#xA;&#xD;&#xA;In phase 0, jobs can only be registered on request. Let me know if you are interested.&#xD;&#xA;&#xD;&#xA;The upcoming Acurast version will have its own parachain with a marketplace (with a reputation system), where anyone can become a data consumer and a processor. &#xD;&#xA;&#xD;&#xA;You can also join our channels for more information about the project:&#xD;&#xA;&#xD;&#xA;- https://twitter.com/Acurast&#xD;&#xA;- https://t.me/acurastnetwork&#xD;&#xA;- https://acurast.medium.com&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://docs.acurast.com/developers/introduction#complete-example&#xD;&#xA;  [2]: https://source.android.com/docs/security/features/trusty&#xD;&#xA;  [3]: https://better-call.dev/mainnet/KT1MFfBe4EtzDofUcfeBmNShJPesY4HhfjMC/storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="23665" PostHistoryTypeId="5" PostId="6182" RevisionGUID="750e65fb-76f6-497a-87c5-dc0fd7401e95" CreationDate="2022-12-02T16:04:58.600" UserId="3002" Comment="deleted 99 characters in body" Text="You can use [Acurast data providers][1], which allow you to delegate the execution of arbitrary javascript code inside a [TEE][2](Trusted Execution Environment)&#xD;&#xA;&#xD;&#xA;Our solution is currently at phase 0, where you can schedule jobs in a smart-contract. There, you provide the IPFS hash of the javascript code you want to execute and the period of execution for the job.&#xD;&#xA;&#xD;&#xA;In phase 0, jobs can only be registered on request. Let me know if you are interested.&#xD;&#xA;&#xD;&#xA;The upcoming Acurast version will have its own parachain with a marketplace and a reputation system, where anyone can become a data consumer and a processor. &#xD;&#xA;&#xD;&#xA;You can also join our channels for more information about the project:&#xD;&#xA;&#xD;&#xA;- https://twitter.com/Acurast&#xD;&#xA;- https://t.me/acurastnetwork&#xD;&#xA;- https://acurast.medium.com&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: http://docs.acurast.com/developers/introduction#complete-example&#xD;&#xA;  [2]: https://source.android.com/docs/security/features/trusty" ContentLicense="CC BY-SA 4.0" />
  <row Id="23666" PostHistoryTypeId="5" PostId="6169" RevisionGUID="2e4eec7e-a43a-409f-b28d-d44a78ee8279" CreationDate="2022-12-02T16:12:28.533" UserId="298" Comment="added 19 characters in body" Text="**The rpc methods (showing in rpc_methods), are still not showing in their own area, after (attempting to) decorate the rpc.** &#xD;&#xA;&#xD;&#xA;I have custom rpc on a substrate template.&#xD;&#xA;&#xD;&#xA;Here are the rpc_methods:&#xD;&#xA;&#xD;&#xA;[![methods][1]][1]&#xD;&#xA;&#xD;&#xA;I have manually described the methods in [`apps-config/src/api/spec/supersig.ts`][2]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import type { OverrideBundleDefinition } from '@polkadot/types/types';&#xD;&#xA;&#xD;&#xA;export default {&#xD;&#xA;  rpc: {&#xD;&#xA;    superSig: {&#xD;&#xA;      getProposalState: {&#xD;&#xA;        description: 'Get the proposal state',&#xD;&#xA;        params: [&#xD;&#xA;          {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;          },&#xD;&#xA;          {&#xD;&#xA;            name: 'call_id',&#xD;&#xA;            type: 'CallId',&#xD;&#xA;            &#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Result&lt;(ProposalState&lt;AccountId&gt;, u32), DispatchError&gt;'&#xD;&#xA;      },&#xD;&#xA;      get_user_supersigs: {&#xD;&#xA;        description: 'Get supersigs associated to the user.',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'user_account',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            },&#xD;&#xA;        ],&#xD;&#xA;        type: 'Vec&lt;SupersigId&gt;'&#xD;&#xA;      },&#xD;&#xA;      list_members: {&#xD;&#xA;        description: 'List members of the supersig',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Vec&lt;(AccountId, Role)'&#xD;&#xA;      },&#xD;&#xA;      list_proposals: {&#xD;&#xA;        description: 'List proposals associated to a supersig',&#xD;&#xA;        params: [&#xD;&#xA;            {&#xD;&#xA;            name: 'supersig_id',&#xD;&#xA;            type: 'AccountId'&#xD;&#xA;            }&#xD;&#xA;        ],&#xD;&#xA;        type: 'Result&lt;(Vec&lt;ProposalState&lt;AccountId&gt;&gt;, u32), DispatchError&gt;'&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA;  },&#xD;&#xA;} as OverrideBundleDefinition;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I then renamed my local custom [node-template][3], and then launched it using this command:&#xD;&#xA;&#xD;&#xA;`./target/release/node-template  --chain=&quot;./supersig-raw.json&quot; --alice --rpc-cors all --rpc-methods=unsafe` &#xD;&#xA;&#xD;&#xA;I named the chain to &quot;supersig&quot; and id: supersig in theh chain-spec, &#xD;&#xA;&#xD;&#xA;and added the chain to a local hosted polkadot-js/apps ([this branch][4]):&#xD;&#xA;&#xD;&#xA;[![][5]][5]&#xD;&#xA;&#xD;&#xA;However, the rpc methods are still not showing in their own area, which I attempted to decorate. &#xD;&#xA;&#xD;&#xA;1) Could you provide some guidance for what i am missing?&#xD;&#xA;2) `type: 'Result&lt;(Vec&lt;ProposalState&lt;AccountId&gt;&gt;, u32), DispatchError&gt;'` is that a correct way to create the return type in the rpc module?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/n7KF0.png&#xD;&#xA;  [2]: https://github.com/decentration/apps/blob/page-supersig/packages/apps-config/src/api/spec/supersig.ts&#xD;&#xA;  [3]: https://github.com/decentration/substrate-supersig-template&#xD;&#xA;  [4]: https://github.com/decentration/apps/tree/page-supersig&#xD;&#xA;  [5]: https://i.stack.imgur.com/LiQtS.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23667" PostHistoryTypeId="10" PostId="6171" RevisionGUID="15502bdd-33f0-4a55-a00c-209a212b394b" CreationDate="2022-12-02T16:15:16.703" UserId="34" Comment="105" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="23668" PostHistoryTypeId="6" PostId="6162" RevisionGUID="564b1a5a-6558-4f0a-9937-4260cd353c29" CreationDate="2022-12-02T16:18:22.200" UserId="34" Comment="edited tags" Text="|evm|frontier|explorer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23669" PostHistoryTypeId="2" PostId="6183" RevisionGUID="edec3e99-e869-4577-b9c6-00fa5681f605" CreationDate="2022-12-02T16:42:28.123" UserId="3545" Text="I add pallet-contract into `substrate-node-template`, and use polkadot-JS to upload ink! contracts. But I get something wrong when I upload a contract.&#xD;&#xA;&#xD;&#xA;logs like this:&#xD;&#xA;&#xD;&#xA;    createType(Call):: Call: failed decoding contracts.instantiateWithCode:: Struct: failed on args: &#xD;&#xA;    {&quot;value&quot;:&quot;Lookup115&quot;,&quot;gas_limit&quot;:&quot;Lookup82&quot;,&quot;storage_deposit_limit&quot;:&quot;Option&lt;Compact&gt;&quot;,&quot;code&quot;:&quot;Bytes&quot;,&quot;data&quot;:&quot;Bytes&quot;,&quot;salt&quot;:&quot;Bytes&quot;}:: Struct: failed on gas_limit: Compact:: Unable to construct number from multi-key object&#xD;&#xA;&#xD;&#xA;[![`enter image description here`][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uL6R9.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried `substrate-contracts-node` to generate blocks, and it can upload a contract successfully using polkadot-JS.&#xD;&#xA;&#xD;&#xA;I have to use `substrate-node-template` to complete my work, what should I do to solve this problem?&#xD;&#xA;&#xD;&#xA;Besides, I've seen other people have this problem: https://github.com/polkadot-js/apps/issues/8427" ContentLicense="CC BY-SA 4.0" />
  <row Id="23671" PostHistoryTypeId="1" PostId="6183" RevisionGUID="edec3e99-e869-4577-b9c6-00fa5681f605" CreationDate="2022-12-02T16:42:28.123" UserId="3545" Text="unable to upload ink! contract in polkadot-JS" ContentLicense="CC BY-SA 4.0" />
  <row Id="23672" PostHistoryTypeId="3" PostId="6183" RevisionGUID="edec3e99-e869-4577-b9c6-00fa5681f605" CreationDate="2022-12-02T16:42:28.123" UserId="3545" Text="|polkadot|substrate-node-template|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23673" PostHistoryTypeId="2" PostId="6184" RevisionGUID="08b158ee-74b9-4f8f-bce0-93ccfa87c4b9" CreationDate="2022-12-02T16:55:12.673" UserId="3371" Text="I'm integrating Frontier EVM into my Substrate chain and facing the following issue while trying to send some funds between accounts via metamask:&#xD;&#xA;&#xD;&#xA;    [ethjs-query] while formatting outputs from RPC '{&quot;value&quot;:{&quot;code&quot;:-32603,&quot;data&quot;:{&quot;code&quot;:-32603,&quot;message&quot;:&quot;submit transaction to pool failed: Ok(UnknownTransaction(UnknownTransaction::NoUnsignedValidator))&quot;}}}'&#xD;&#xA;&#xD;&#xA;Seems like I've integrated everything that was required using the frontier repo as an example:&#xD;&#xA;&#xD;&#xA;- Runtime configuration&#xD;&#xA;- RPC services&#xD;&#xA;- Chain spec&#xD;&#xA;- Node service configuration&#xD;&#xA;&#xD;&#xA;So the blockchain starts well, everything works fine, Metamask connects to the node RPC endpoint and successfully reads the pre-funded accounts. &#xD;&#xA;&#xD;&#xA;However when I'm trying to transfer some chain tokens to another account it fails. &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Perhaps I missed something while configuring the node but I can't get the exact reason.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Have someone faced this problem? Any help is appreciated.&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/S7Xal.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23675" PostHistoryTypeId="1" PostId="6184" RevisionGUID="08b158ee-74b9-4f8f-bce0-93ccfa87c4b9" CreationDate="2022-12-02T16:55:12.673" UserId="3371" Text="Frontier EVM integration: UnknownTransaction::NoUnsignedValidator error occurs while transferring funds via Metamask" ContentLicense="CC BY-SA 4.0" />
  <row Id="23676" PostHistoryTypeId="3" PostId="6184" RevisionGUID="08b158ee-74b9-4f8f-bce0-93ccfa87c4b9" CreationDate="2022-12-02T16:55:12.673" UserId="3371" Text="|rpc|frontier|evm|metamask|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23677" PostHistoryTypeId="52" PostId="6174" RevisionGUID="f2339ba4-359f-4a09-b615-d6417568a807" CreationDate="2022-12-02T17:24:31.563" />
  <row Id="23678" PostHistoryTypeId="2" PostId="6185" RevisionGUID="f47adc53-acf9-404a-bab0-11d3998eecb6" CreationDate="2022-12-02T17:29:09.857" UserId="2477" Text="SignAndSendSuccessResponse that is a result of a contract call does NOT contain all events that are emitted during tx execution. The Object contains only events emitted from the contract that is called but does not contain events that were emitted during cross contract call.&#xD;&#xA;Is it expected behavior?&#xD;&#xA;I am using substrate-contract-node for tests." ContentLicense="CC BY-SA 4.0" />
  <row Id="23680" PostHistoryTypeId="1" PostId="6185" RevisionGUID="f47adc53-acf9-404a-bab0-11d3998eecb6" CreationDate="2022-12-02T17:29:09.857" UserId="2477" Text="polkadot.js | SignAndSendSuccessResponse does NOT contain all events emitted in tx" ContentLicense="CC BY-SA 4.0" />
  <row Id="23681" PostHistoryTypeId="3" PostId="6185" RevisionGUID="f47adc53-acf9-404a-bab0-11d3998eecb6" CreationDate="2022-12-02T17:29:09.857" UserId="2477" Text="|polkadot-js|ink|smart-contract|events|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23682" PostHistoryTypeId="2" PostId="6186" RevisionGUID="891c38f3-8ef0-4f2a-8bc2-c951b0d13dcb" CreationDate="2022-12-02T17:36:53.787" UserId="504" Text="I am trying to achieve logging (as the `tracing` crate does not yet integrate with tracing subscribers like OpenTelemetry) of extrinsic execution time traces on parachain nodes i run myself during block import. I'm doing this through tracing instead of by weights so that I can collect data on long-term trends in actual execution times instead of benchmarking's worst-case assumption on the actual mainnet TXN composition.&#xD;&#xA;&#xD;&#xA;Looking through the docs, most references to in-runtime tracing are 12months or older.&#xD;&#xA;&#xD;&#xA;I have found&#xD;&#xA;- https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/client/rpc-api/src/state/mod.rs#L128 &amp; https://github.com/paritytech/substrate/pull/7780 (rpc to re-execute historic blocks, N/A here)&#xD;&#xA;- https://crates.parity.io/sp_tracing/index.html&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/primitives/tracing/src/lib.rs#L61&#xD;&#xA;- https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/primitives/io/src/lib.rs#L1516&#xD;&#xA;&#xD;&#xA;My runtime forwards block building calls directly to executive, which runs `init_tracing` https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/frame/executive/src/lib.rs#L435 so as long as `sp-io` is built `with-tracing` I get the `PassingTracingSubscriber` and *should* see log output of recorded spans from what I gather reading these docs.&#xD;&#xA;&#xD;&#xA;I have tried&#xD;&#xA;RT cargo.toml&#xD;&#xA;```&#xD;&#xA;with-tracing = [&#xD;&#xA;  &quot;sp-tracing/with-tracing&quot;,&#xD;&#xA;  &quot;polkadot-runtime-metrics/runtime-metrics&quot;,&#xD;&#xA;  &quot;frame-executive/with-tracing&quot;,&#xD;&#xA;  &quot;sp-io/with-tracing&quot;&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&gt; cargo b --release --features=with-tracing&#xD;&#xA;&#xD;&#xA;But I cannot get any trace output to show up in the logs. Trace-level logs show normally when the bin is run with `-ltrace`:&#xD;&#xA;```&#xD;&#xA;2022-12-02 11:09:42.063 TRACE tokio-runtime-worker executor: [Parachain] Executing function method=BlockBuilder_apply_extrinsic&#xD;&#xA;2022-12-02 11:09:42.069 TRACE tokio-runtime-worker executor: [Parachain] Executing function method=BlockBuilder_apply_extrinsic&#xD;&#xA;```&#xD;&#xA;I would expect these to be interspersed with the recorded spans.&#xD;&#xA;&#xD;&#xA;**Is sp-tracing still supported and am I missing something?**&#xD;&#xA;e.g. some client-side configuration to receive/enable the traces from the `PassingTracingSubscriber`&#xD;&#xA;&#xD;&#xA;One caveat with this chain (in case it's relevant) is that I do not have to option of using the native runtime as we force WASM execution even in the case of matching versions." ContentLicense="CC BY-SA 4.0" />
  <row Id="23684" PostHistoryTypeId="1" PostId="6186" RevisionGUID="891c38f3-8ef0-4f2a-8bc2-c951b0d13dcb" CreationDate="2022-12-02T17:36:53.787" UserId="504" Text="Extrinsic execution time traces not showing up in node logs" ContentLicense="CC BY-SA 4.0" />
  <row Id="23685" PostHistoryTypeId="3" PostId="6186" RevisionGUID="891c38f3-8ef0-4f2a-8bc2-c951b0d13dcb" CreationDate="2022-12-02T17:36:53.787" UserId="504" Text="|metrics|log|performance|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23686" PostHistoryTypeId="5" PostId="6186" RevisionGUID="dfc3a088-2e40-4de2-b788-a2cd53b56101" CreationDate="2022-12-02T18:14:24.973" UserId="504" Comment="added 164 characters in body" Text="I am trying to achieve logging (as the `tracing` crate does not yet integrate with tracing subscribers like OpenTelemetry) of extrinsic execution time traces on parachain nodes i run myself during block import. I'm doing this through tracing instead of by weights so that I can collect data on long-term trends in actual execution times instead of benchmarking's worst-case assumption on the actual mainnet TXN composition.&#xD;&#xA;&#xD;&#xA;Looking through the docs, most references to in-runtime tracing are 12months or older.&#xD;&#xA;&#xD;&#xA;I have found&#xD;&#xA;- https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/client/rpc-api/src/state/mod.rs#L128 &amp; https://github.com/paritytech/substrate/pull/7780 (rpc to re-execute historic blocks, N/A here)&#xD;&#xA;- https://crates.parity.io/sp_tracing/index.html&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/primitives/tracing/src/lib.rs#L61&#xD;&#xA;- https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/primitives/io/src/lib.rs#L1516&#xD;&#xA;&#xD;&#xA;My runtime forwards block building calls directly to executive, which runs `init_tracing` https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/frame/executive/src/lib.rs#L435 so as long as `sp-io` is built `with-tracing` I get the `PassingTracingSubscriber` and *should* see log output of recorded spans from what I gather reading these docs.&#xD;&#xA;&#xD;&#xA;I have tried&#xD;&#xA;RT cargo.toml&#xD;&#xA;```&#xD;&#xA;with-tracing = [&#xD;&#xA;  &quot;sp-tracing/with-tracing&quot;,&#xD;&#xA;  &quot;polkadot-runtime-metrics/runtime-metrics&quot;,&#xD;&#xA;  &quot;frame-executive/with-tracing&quot;,&#xD;&#xA;  &quot;sp-io/with-tracing&quot;&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&gt; cargo b --release --features=with-tracing&#xD;&#xA;&#xD;&#xA;But I cannot get any trace output to show up in the logs. Trace-level logs show normally when the bin is run with `-ltrace`:&#xD;&#xA;```&#xD;&#xA;2022-12-02 11:09:42.063 TRACE tokio-runtime-worker executor: [Parachain] Executing function method=BlockBuilder_apply_extrinsic&#xD;&#xA;2022-12-02 11:09:42.069 TRACE tokio-runtime-worker executor: [Parachain] Executing function method=BlockBuilder_apply_extrinsic&#xD;&#xA;```&#xD;&#xA;I would expect these to be interspersed with the recorded spans.&#xD;&#xA;&#xD;&#xA;**Is sp-tracing still supported and am I missing something?**&#xD;&#xA;e.g. some client-side configuration to receive/enable the traces from the `PassingTracingSubscriber`.&#xD;&#xA;I did find reference in the docs to having to call `set_tracing_subscriber` somewhere in the RT, but 0.9.26 substrate code does not seem to have this fn anymore.&#xD;&#xA;&#xD;&#xA;One caveat with this chain (in case it's relevant) is that I do not have to option of using the native runtime as we force WASM execution even in the case of matching versions." ContentLicense="CC BY-SA 4.0" />
  <row Id="23687" PostHistoryTypeId="6" PostId="6183" RevisionGUID="09475440-02a6-4169-8f5d-6bdb2baf4c37" CreationDate="2022-12-02T18:55:15.937" UserId="34" Comment="edited tags" Text="|polkadot-js|ink|pallet-contracts|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23688" PostHistoryTypeId="50" PostId="5654" RevisionGUID="9272604a-5339-4e23-b817-d17e1b4f9541" CreationDate="2022-12-02T19:02:05.197" UserId="-1" />
  <row Id="23689" PostHistoryTypeId="52" PostId="6178" RevisionGUID="cf441b21-caa3-48ae-bce9-ee992a46ff6b" CreationDate="2022-12-02T19:18:28.000" />
  <row Id="23690" PostHistoryTypeId="2" PostId="6187" RevisionGUID="31f5f94b-f4ae-4b09-9c7a-72207be54434" CreationDate="2022-12-02T21:48:16.303" UserId="3550" Text="I have a little problem here.&#xD;&#xA;I have the address of a contract (PSP22 token) with the {}Ref associated with it.&#xD;&#xA;&#xD;&#xA;I want to make a cross-contract call to get the decimals of the contract.&#xD;&#xA;&#xD;&#xA;Its Ref is use lp_token::LpTokenRef;&#xD;&#xA;&#xD;&#xA;Wondering how I can call another contract using an already deployed address to get the metadata such as psp22Metadata::tokenSymbol() and so on." ContentLicense="CC BY-SA 4.0" />
  <row Id="23692" PostHistoryTypeId="1" PostId="6187" RevisionGUID="31f5f94b-f4ae-4b09-9c7a-72207be54434" CreationDate="2022-12-02T21:48:16.303" UserId="3550" Text="PSP22 cross-contract call to get metadata such as token decimals and token name using ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="23693" PostHistoryTypeId="3" PostId="6187" RevisionGUID="31f5f94b-f4ae-4b09-9c7a-72207be54434" CreationDate="2022-12-02T21:48:16.303" UserId="3550" Text="|token|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23696" PostHistoryTypeId="2" PostId="6188" RevisionGUID="66e1dcbf-7001-44aa-b69c-229af999366b" CreationDate="2022-12-03T09:38:06.917" UserId="2163" Text="I have written a migration for the phragmen pallet in Substrate and now I want to test it. I would want to use the current state of Kusama/Polkadot to make sure the migration works correctly. To achieve this AFAIU I need to use the `try-runtime` feature. &#xD;&#xA;&#xD;&#xA;I have a problem and a question regarding the `try-runtime` feature.&#xD;&#xA;&#xD;&#xA;1. When I specify the `--uri` argument to be equal to `wss://rpc.polkadot.io`(as provided in the documentation) I get the following error: &#xD;&#xA;```&#xD;&#xA;2022-12-03 10:28:32 error: &quot;`WsClientBuilder` failed to build: Transport(Invalid URL: No port number in URL (default port is not supported))&quot;    &#xD;&#xA;Error: Input(&quot;failed to build ws client&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. When running the `on-runtime-upgrade` subcommand which runtime upgrade is being executed and how can I specify it so that it executes the `on_runtime_upgrade` function that I have wrote for my migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23698" PostHistoryTypeId="1" PostId="6188" RevisionGUID="66e1dcbf-7001-44aa-b69c-229af999366b" CreationDate="2022-12-03T09:38:06.917" UserId="2163" Text="Testing a migration with `try-runtime`" ContentLicense="CC BY-SA 4.0" />
  <row Id="23699" PostHistoryTypeId="3" PostId="6188" RevisionGUID="66e1dcbf-7001-44aa-b69c-229af999366b" CreationDate="2022-12-03T09:38:06.917" UserId="2163" Text="|migration|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23704" PostHistoryTypeId="50" PostId="5680" RevisionGUID="b79218e3-0d83-4893-94fd-8dd972c80630" CreationDate="2022-12-03T12:04:10.600" UserId="-1" />
  <row Id="23705" PostHistoryTypeId="2" PostId="6190" RevisionGUID="a1558535-d0bc-4969-abd1-471e0a72b6d5" CreationDate="2022-12-03T12:59:20.463" UserId="3552" Text="I'm trying to get started with substrate by looking at Substrate Recipes. &#xD;&#xA;&#xD;&#xA;I installed rust using `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` with WSL with default configuration (stable 1.65 I think)&#xD;&#xA;Then I tried building the kitchen node using `cargo build --release -p kitchen-node`.&#xD;&#xA;&#xD;&#xA;Then I ran into multiple compile errors (in `sp-arithmetic` crate): (for example)&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `i128: Bounded` is not satisfied&#xD;&#xA;      --&gt; /home/thecodingwombat/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-3.0.0/src/fixed_point.rs:37:6&#xD;&#xA;       |&#xD;&#xA;    37 | impl FixedPointOperand for i128 {}&#xD;&#xA;       |      ^^^^^^^^^^^^^^^^^ the trait `Bounded` is not implemented for `i128`&#xD;&#xA;       |&#xD;&#xA;       = help: the following other types implement trait `Bounded`:&#xD;&#xA;                 f32&#xD;&#xA;                 f64&#xD;&#xA;                 i16&#xD;&#xA;                 i32&#xD;&#xA;                 i64&#xD;&#xA;                 i8&#xD;&#xA;                 isize&#xD;&#xA;                 u16&#xD;&#xA;               and 4 others&#xD;&#xA;    note: required by a bound in `FixedPointOperand`&#xD;&#xA;      --&gt; /home/thecodingwombat/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-3.0.0/src/fixed_point.rs:34:45&#xD;&#xA;       |&#xD;&#xA;    34 | pub trait FixedPointOperand: Copy + Clone + Bounded + Zero + Saturating&#xD;&#xA;       |                                             ^^^^^^^ required by this bound in `FixedPointOperand`&#xD;&#xA;&#xD;&#xA;**What am I doing wrong that this isn't working out of the box?** When I use the substrate playground it is working. Am I using the wrong rust version? The compile errors do not give me any insight into what I'm doing wrong." ContentLicense="CC BY-SA 4.0" />
  <row Id="23707" PostHistoryTypeId="1" PostId="6190" RevisionGUID="a1558535-d0bc-4969-abd1-471e0a72b6d5" CreationDate="2022-12-03T12:59:20.463" UserId="3552" Text="Compile errors building Substrate Recipes out of the box" ContentLicense="CC BY-SA 4.0" />
  <row Id="23708" PostHistoryTypeId="3" PostId="6190" RevisionGUID="a1558535-d0bc-4969-abd1-471e0a72b6d5" CreationDate="2022-12-03T12:59:20.463" UserId="3552" Text="|substrate-recipes|wsl|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23709" PostHistoryTypeId="50" PostId="5673" RevisionGUID="da1ccd71-b642-42b7-b8c7-85c9fe505ccd" CreationDate="2022-12-03T13:08:11.063" UserId="-1" />
  <row Id="23710" PostHistoryTypeId="2" PostId="6191" RevisionGUID="8798f630-2b5a-43a2-b578-7dca2bc20d1c" CreationDate="2022-12-03T16:03:56.030" UserId="555" Text="I'm working on substrate node template and their I have adding a pallet where &#xD;&#xA;I have added ```let votes = {&#xD;&#xA;Votes{ayes: vec![], nays: vec![]}&#xD;&#xA;};```&#xD;&#xA;&#xD;&#xA;in my pallet.&#xD;&#xA;&#xD;&#xA;for that I have also added ```use scale_info::prelude::vec;```&#xD;&#xA;&#xD;&#xA;but getting ```error: cannot find macro `vec` in this scope```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23712" PostHistoryTypeId="1" PostId="6191" RevisionGUID="8798f630-2b5a-43a2-b578-7dca2bc20d1c" CreationDate="2022-12-03T16:03:56.030" UserId="555" Text="error: cannot find macro `vec` in this scope" ContentLicense="CC BY-SA 4.0" />
  <row Id="23713" PostHistoryTypeId="3" PostId="6191" RevisionGUID="8798f630-2b5a-43a2-b578-7dca2bc20d1c" CreationDate="2022-12-03T16:03:56.030" UserId="555" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23714" PostHistoryTypeId="2" PostId="6192" RevisionGUID="144f7cd4-afab-49d7-a914-808d61b7ea4f" CreationDate="2022-12-03T17:48:20.820" UserId="377" Text="Some time its just happens due to dependency issue. put the respective dependency inside the pallet module.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23716" PostHistoryTypeId="2" PostId="6193" RevisionGUID="7ccb0765-8cf2-4817-9e53-e0cf16684095" CreationDate="2022-12-03T20:14:33.673" UserId="94" Text="Good question! `try-runtime` is the right idea indeed. (Note for Parity devs at the end)&#xD;&#xA;&#xD;&#xA;Currently the try-runtime CLI scraps the chain state from the an RPC node. Using the public node is probably really slow.  &#xD;&#xA;This is the procedure I use with success:  &#xD;&#xA;&#xD;&#xA;0. Write a new migration in Substrate, eg `MyMigration`.&#xD;&#xA;1. Integrate the migration into the runtime by adding it to the `Executive` type. This needs to be done for all runtimes where you want the migration to execute.&#xD;&#xA; Example from [Kusama](https://github.com/paritytech/polkadot/blob/bc65cf22a359859c20bc4aae94bcffad1846d5b6/runtime/kusama/src/lib.rs#L1466):  &#xD;&#xA;```rust&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;	(&#xD;&#xA;		MyMigration, // Added here&#xD;&#xA;		SomeOtherMigration&#xD;&#xA;	),&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;2. Run [diener](https://github.com/paritytech/diener/) in the Polkadot repo to patch your Substrate version:  &#xD;&#xA;```bash&#xD;&#xA;# If you have it on a branch:&#xD;&#xA;diener update --substrate --branch tmp-oty-debug-bench-bot-revert&#xD;&#xA;# ... or in a local folder:&#xD;&#xA;diener patch --crates-to-patch ../substrate --substrate&#xD;&#xA;```&#xD;&#xA;3. Build a release binary with the `try-runtime` feature. So for example: `cargo b -r --bin polkadot --features try-runtime`.&#xD;&#xA;4. Start a local Polkadot node by using the current [release binary](https://github.com/paritytech/polkadot/releases). This node will be used instead of a public endpoint to speed things up tremendously. The node requires some extra arguments. This works well for me (could probably be optimized): &#xD;&#xA;```bash&#xD;&#xA;./polkadot --chain polkadot --db paritydb -d empty-dir/ --sync warp --rpc-max-request-size 100000 --rpc-max-response-size 100000 --rpc-external --rpc-cors=all --unsafe-ws-external&#xD;&#xA;```&#xD;&#xA;Wait until you see `Warp sync is complete`. Which looks like this:  &#xD;&#xA;```pre&#xD;&#xA;⏩ Warping, Importing state, 1044.21 Mib (32 peers), best: #15600673 (0xef7d…adca), finalized #15600673 (0xef7d…adca), ⬇ 13.8kiB/s ⬆ 0.7kiB/s    &#xD;&#xA;Warp sync is complete (1044 MiB), restarting block sync.    &#xD;&#xA;⏩ Block history, #2688 (32 peers), best: #15600705 (0x53c2…55b1), finalized #15600701 (0x55fc…001a), ⬇ 958.7kiB/s ⬆ 18.3kiB/s&#xD;&#xA;```&#xD;&#xA;5. Start the `try-runtime` CLI from your locally build binary in a second terminal with the same chain-spec:  &#xD;&#xA;```bash&#xD;&#xA;RUST_LOG=remote-ext=debug,runtime=trace ./target/release/polkadot try-runtime --chain=polkadot-dev --execution=Wasm --no-spec-check-panic on-runtime-upgrade live --uri ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;This will first download the whole state from your local node and then run all migrations. Should look like this:  &#xD;&#xA;```pre&#xD;&#xA;# Lots of these:&#xD;&#xA;DEBUG main remote-ext: new total = 241000, full page received: …&#xD;&#xA;&#xD;&#xA;# Lots of these:&#xD;&#xA;DEBUG main remote-ext: progress = 0.05 [40000 / 806314] …&#xD;&#xA;&#xD;&#xA;# Then the interesting part:&#xD;&#xA;main polkadot_runtime: try-runtime::on_runtime_upgrade polkadot&#xD;&#xA;&#xD;&#xA;# Then you will see the log output of your migrations&#xD;&#xA;# Finally if it was successful: &#xD;&#xA;main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. &#xD;&#xA;Consumed weight = (83471000 ps, 0 byte), total weight = (2000000000000 ps, 5242880 byte) (0.00 %, 0.00 %).&#xD;&#xA;```&#xD;&#xA;6. Repeat steps 4 and 5 for all runtimes by changing the `--chain` arguments.&#xD;&#xA;&#xD;&#xA;Note: If you are a Parity dev you can use the try-runtime bot. Usage looks like [this](https://github.com/paritytech/polkadot/pull/6297#issuecomment-1329160666).  &#xD;&#xA;In the future the try-runtime checks will run automatically on all Polkadot MRs in the CI, which should make manual testing superfluous." ContentLicense="CC BY-SA 4.0" />
  <row Id="23718" PostHistoryTypeId="5" PostId="6090" RevisionGUID="1c3a74b7-ecf2-4d53-a3bc-f3921d1e2ba3" CreationDate="2022-12-03T20:54:32.287" UserId="629" Comment="added 234 characters in body" Text="Smoldot light client can run as a Javascript node script. In Smoldot's (Substrate light client) repo (https://github.com/paritytech/smoldot#wasm-light-node) you can find the way to run a light client locally, and open app the polkadotJS apps with your local light client.&#xD;&#xA;&#xD;&#xA;As a prerequisite I'd say you need node or deno installed in your machine...&#xD;&#xA;&#xD;&#xA;**EDIT:** In addition to the &quot;step-by-step&quot; tutorial you can find in [this link](https://docs.substrate.io/tutorials/integrate-with-tools/integrate-a-light-client-node/) a detailed tutorial on how to run light client in your dApp." ContentLicense="CC BY-SA 4.0" />
  <row Id="23719" PostHistoryTypeId="10" PostId="4276" RevisionGUID="10019a55-8508-49aa-bf80-5134a901dc19" CreationDate="2022-12-03T21:46:43.370" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2762,&quot;DisplayName&quot;:&quot;Alex Bean&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="23720" PostHistoryTypeId="10" PostId="6191" RevisionGUID="782eaa31-bf53-41e3-8148-90b6a8dc0378" CreationDate="2022-12-03T21:47:01.497" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[4133],&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="23721" PostHistoryTypeId="6" PostId="6191" RevisionGUID="540f36ce-142e-4792-a5bf-d7a27b48cb26" CreationDate="2022-12-03T21:47:49.433" UserId="377" Comment="added the pallet tag" Text="|polkadot-js|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23722" PostHistoryTypeId="24" PostId="6191" RevisionGUID="540f36ce-142e-4792-a5bf-d7a27b48cb26" CreationDate="2022-12-03T21:47:49.433" Comment="Proposed by 377 approved by -1 edit id of 351" ContentLicense="CC BY-SA 4.0" />
  <row Id="23723" PostHistoryTypeId="6" PostId="6191" RevisionGUID="6d9afaf2-8c03-40d8-a17c-7d3bf9be72f5" CreationDate="2022-12-03T21:47:49.433" UserId="34" Comment="added the pallet tag" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23725" PostHistoryTypeId="5" PostId="6187" RevisionGUID="c3864060-e784-4627-b32f-b6ee2ec2f20e" CreationDate="2022-12-03T21:50:44.967" UserId="34" Comment="added 4 characters in body; edited tags" Text="I have a little problem here.&#xD;&#xA;I have the address of a contract (PSP22 token) with the {}Ref associated with it.&#xD;&#xA;&#xD;&#xA;I want to make a cross-contract call to get the decimals of the contract.&#xD;&#xA;&#xD;&#xA;Its Ref is `use lp_token::LpTokenRef;`&#xD;&#xA;&#xD;&#xA;Wondering how I can call another contract using an already deployed address to get the metadata such as `psp22Metadata::tokenSymbol()` and so on." ContentLicense="CC BY-SA 4.0" />
  <row Id="23726" PostHistoryTypeId="6" PostId="6187" RevisionGUID="c3864060-e784-4627-b32f-b6ee2ec2f20e" CreationDate="2022-12-03T21:50:44.967" UserId="34" Comment="added 4 characters in body; edited tags" Text="|ink|token|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23728" PostHistoryTypeId="5" PostId="6186" RevisionGUID="a714eb48-823a-4e81-a843-76af82fec982" CreationDate="2022-12-04T06:06:33.200" UserId="504" Comment="added 56 characters in body" Text="I am trying to achieve logging (as the `tracing` crate does not yet integrate with tracing subscribers like OpenTelemetry) of extrinsic execution time traces on parachain nodes i run myself during block import. I'm doing this through tracing instead of by weights so that I can collect data on long-term trends in actual execution times instead of benchmarking's worst-case assumption on the actual mainnet TXN composition.&#xD;&#xA;&#xD;&#xA;Looking through the docs, most references to in-runtime tracing are 12months or older.&#xD;&#xA;&#xD;&#xA;I have found&#xD;&#xA;- https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/client/rpc-api/src/state/mod.rs#L128 &amp; https://github.com/paritytech/substrate/pull/7780 (rpc to re-execute historic blocks, N/A here)&#xD;&#xA;- https://crates.parity.io/sp_tracing/index.html&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/primitives/tracing/src/lib.rs#L61&#xD;&#xA;- https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/primitives/io/src/lib.rs#L1516&#xD;&#xA;- https://github.com/paritytech/substrate/issues/11000&#xD;&#xA;&#xD;&#xA;My runtime forwards block building calls directly to executive, which runs `init_tracing` https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/frame/executive/src/lib.rs#L435 so as long as `sp-io` is built `with-tracing` I get the `PassingTracingSubscriber` and *should* see log output of recorded spans from what I gather reading these docs.&#xD;&#xA;&#xD;&#xA;I have tried&#xD;&#xA;RT cargo.toml&#xD;&#xA;```&#xD;&#xA;with-tracing = [&#xD;&#xA;  &quot;sp-tracing/with-tracing&quot;,&#xD;&#xA;  &quot;polkadot-runtime-metrics/runtime-metrics&quot;,&#xD;&#xA;  &quot;frame-executive/with-tracing&quot;,&#xD;&#xA;  &quot;sp-io/with-tracing&quot;&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&gt; cargo b --release --features=with-tracing&#xD;&#xA;&#xD;&#xA;But I cannot get any trace output to show up in the logs. Client-side Trace-level logs show normally when the bin is run with `-ltrace`:&#xD;&#xA;```&#xD;&#xA;2022-12-02 11:09:42.063 TRACE tokio-runtime-worker executor: [Parachain] Executing function method=BlockBuilder_apply_extrinsic&#xD;&#xA;2022-12-02 11:09:42.069 TRACE tokio-runtime-worker executor: [Parachain] Executing function method=BlockBuilder_apply_extrinsic&#xD;&#xA;```&#xD;&#xA;I would expect these to be interspersed with the recorded spans.&#xD;&#xA;&#xD;&#xA;**Is sp-tracing still supported and am I missing something?**&#xD;&#xA;e.g. some client-side configuration to receive/enable the traces from the `PassingTracingSubscriber`.&#xD;&#xA;I did find reference in the docs to having to call `set_tracing_subscriber` somewhere in the RT, but 0.9.26 substrate code does not seem to have this fn anymore.&#xD;&#xA;&#xD;&#xA;One caveat with this chain (in case it's relevant) is that I do not have to option of using the native runtime as we force WASM execution even in the case of matching versions." ContentLicense="CC BY-SA 4.0" />
  <row Id="23729" PostHistoryTypeId="2" PostId="6194" RevisionGUID="dbba0c8e-8928-4755-856f-bf042af02546" CreationDate="2022-12-04T06:58:42.550" UserId="3424" Text="I'm trying to make meaningful code contributions to Substrate/Polkadot ecosystem in the hopes of becoming a Blockchain developer one day. I tried the Substrate approach and discovered that it takes more than 100GB (around 115GB and possibly higher) of storage to have Substrate on my computer. I thought it's quite a lot and decided to try Polkadot instead, which takes about 80GB. But then I discovered that Polkadot apparently requires Substrate as a dependency, which means I would need around 200GB of storage to contribute to Polkadot.&#xD;&#xA;&#xD;&#xA;So now I'm considering having only Substrate without Polkadot. 115GB is a lot, but I guess it's tolerable. This whole software development endeavor must never exceed 200GB in total under any circumstances (and preferably not get too close to 200GB, because I'd like to leave some margins for swap memory), because otherwise I would run out of space on my computer. &#xD;&#xA;&#xD;&#xA;I'm worried that in addition to 115GB of substrate, that I might need additional dependencies (or extra types of builds) that would put the total storage usage above 200GB. &#xD;&#xA;&#xD;&#xA;Is there any feasible way for me to contribute to Polkadot/Substrate software, without occupying more than 200GB of storage, in a way that helps me develop the skills I need to become a blockchain developer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23731" PostHistoryTypeId="1" PostId="6194" RevisionGUID="dbba0c8e-8928-4755-856f-bf042af02546" CreationDate="2022-12-04T06:58:42.550" UserId="3424" Text="Blockchain development under 200GB?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23732" PostHistoryTypeId="3" PostId="6194" RevisionGUID="dbba0c8e-8928-4755-856f-bf042af02546" CreationDate="2022-12-04T06:58:42.550" UserId="3424" Text="|polkadot|blockchain|general|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23736" PostHistoryTypeId="2" PostId="6195" RevisionGUID="e42cd3e8-14da-4d6a-9001-bf9dbf7c9542" CreationDate="2022-12-04T09:51:56.180" UserId="522" Text="I would like to know how to make non-extrinsic function (trait or otherwise) execute in a storage layer, such that if the function fails with an error, all the storage changes made by the function and only that function, are reverted.&#xD;&#xA;&#xD;&#xA;Does it suffice to run it with `frame_support::storage::with_storage_layer`? Is this approach the &quot;right/idiomatic&quot; way?&#xD;&#xA;&#xD;&#xA;Is there also an annotation that I can place over the function definition to always make it run in its own storage layer?&#xD;&#xA;&#xD;&#xA;eg:&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(10_000)]&#xD;&#xA;    pub fn extrinsic_func(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult{&#xD;&#xA;    &#xD;&#xA;    // I want storage changes made by f1 to be retained whether or not any of f1 or f2 fail.&#xD;&#xA;    let _ = f1();&#xD;&#xA;    // I want storage changes made by f2 to be reverted if f2 fails&#xD;&#xA;    let _ = frame_support::storage::with_storage_layer(|| f2());&#xD;&#xA;    &#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="23738" PostHistoryTypeId="1" PostId="6195" RevisionGUID="e42cd3e8-14da-4d6a-9001-bf9dbf7c9542" CreationDate="2022-12-04T09:51:56.180" UserId="522" Text="The correct way to make a non-extrinsic function execute in a storage layer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23739" PostHistoryTypeId="3" PostId="6195" RevisionGUID="e42cd3e8-14da-4d6a-9001-bf9dbf7c9542" CreationDate="2022-12-04T09:51:56.180" UserId="522" Text="|storage|transactional|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23740" PostHistoryTypeId="2" PostId="6196" RevisionGUID="31f81673-f78a-497f-8a9b-e22ab29b51de" CreationDate="2022-12-04T10:13:35.773" UserId="2722" Text="I gonna to install these pallets in `node/Cargo.toml` : &#xD;&#xA;&#xD;&#xA;    # pallet-authority-discovery = '3.0.0'&#xD;&#xA;    # pallet-im-online = '3.0.0'&#xD;&#xA;    # sc-authority-discovery = '0.9.0'&#xD;&#xA;    # sc-consensus-epochs = { version = '0.9.0' }&#xD;&#xA;    # sc-chain-spec = { version = '3.0.0' }&#xD;&#xA;    # sc-consensus-slots = '0.9.0'&#xD;&#xA;    # sc-consensus-babe = { version = '0.9.0' }&#xD;&#xA;    # sc-consensus-babe-rpc = { version = '0.9.0' }&#xD;&#xA;    # sc-finality-grandpa-rpc = '0.9.0'&#xD;&#xA;    # sc-network = '0.9.0'&#xD;&#xA;    # sc-sync-state-rpc = '0.9.0'&#xD;&#xA;    # sp-authority-discovery = '3.0.0'&#xD;&#xA;    # sp-consensus-babe = { version = '0.9.0' }&#xD;&#xA;&#xD;&#xA;but i faced this error : &#xD;&#xA;&gt;error: failed to select a version for `parity-util-mem`.&#xD;&#xA;    ... required by package `sp-core v3.0.0`&#xD;&#xA;    ... which satisfies dependency `sp-core = &quot;^3.0.0&quot;` of package `sp-api v3.0.0`&#xD;&#xA;    ... which satisfies dependency `sp-api = &quot;^3.0.0&quot;` of package `sp-consensus v0.9.0`&#xD;&#xA;    ... which satisfies dependency `sp-consensus = &quot;^0.9.0&quot;` of package `sp-consensus-babe v0.9.0`&#xD;&#xA;    ... which satisfies dependency `sp-consensus-babe = &quot;^0.9.0&quot;` of package `node-template v4.0.0-dev (/home/kianoush/projects/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `^0.9.0` are: 0.9.0&#xD;&#xA;&#xD;&#xA;&gt;the package `parity-util-mem` links to the native library `parity-util-mem-ban-duplicates`, but it conflicts with a previous package which links to `parity-util-mem-ban-duplicates` as well:&#xD;&#xA;package `parity-util-mem v0.12.0`&#xD;&#xA;    ... which satisfies dependency `parity-util-mem = &quot;^0.12&quot;` of package `kvdb v0.12.0`&#xD;&#xA;    ... which satisfies dependency `kvdb = &quot;^0.12.0&quot;` of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/kianoush/projects/substrate-node-template/node)`&#xD;&#xA;Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='parity-util-mem' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.&#xD;&#xA;failed to select a version for `parity-util-mem` which could resolve this conflict&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;what the problem ? how can i solve this problem ? &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;node-template&quot;&#xD;&#xA;    version = &quot;4.0.0-dev&quot;&#xD;&#xA;    description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;    authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;    homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    license = &quot;Unlicense&quot;&#xD;&#xA;    publish = false&#xD;&#xA;    repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;    build = &quot;build.rs&quot;&#xD;&#xA;    &#xD;&#xA;    [package.metadata.docs.rs]&#xD;&#xA;    targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;    &#xD;&#xA;    [[bin]]&#xD;&#xA;    name = &quot;node-template&quot;&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    clap = { version = &quot;4.0.9&quot;, features = [&quot;derive&quot;] }&#xD;&#xA;    futures = { version = '0.3.9', features = ['compat'] }&#xD;&#xA;    hex-literal = '0.3.1'&#xD;&#xA;    # pallet-authority-discovery = '3.0.0'&#xD;&#xA;    # pallet-im-online = '3.0.0'&#xD;&#xA;    # sc-authority-discovery = '0.9.0'&#xD;&#xA;    # sc-consensus-epochs = { version = '0.9.0' }&#xD;&#xA;    # sc-chain-spec = { version = '3.0.0' }&#xD;&#xA;    # sc-consensus-slots = '0.9.0'&#xD;&#xA;    # sc-consensus-babe = { version = '0.9.0' }&#xD;&#xA;    # sc-consensus-babe-rpc = { version = '0.9.0' }&#xD;&#xA;    # sc-finality-grandpa-rpc = '0.9.0'&#xD;&#xA;    # sc-network = '0.9.0'&#xD;&#xA;    # sc-sync-state-rpc = '0.9.0'&#xD;&#xA;    # sp-authority-discovery = '3.0.0'&#xD;&#xA;    # sp-consensus-babe = { version = '0.9.0' }&#xD;&#xA;    sp-keystore = '0.13.0'&#xD;&#xA;    &#xD;&#xA;    sc-cli = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, features = [&quot;wasmtime&quot;] , branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-core = { version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-executor = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, features = [&quot;wasmtime&quot;] , branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-service = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, features = [&quot;wasmtime&quot;] , branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-telemetry = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-keystore = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-transaction-pool = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-transaction-pool-api = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-consensus-aura = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-consensus = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-consensus = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-finality-grandpa = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-finality-grandpa = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-client-api = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-runtime = { version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-timestamp = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-inherents = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-keyring = { version = &quot;6.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    frame-system = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    &#xD;&#xA;    # These dependencies are used for the node template's RPCs&#xD;&#xA;    jsonrpsee = { version = &quot;0.15.1&quot;, features = [&quot;server&quot;] }&#xD;&#xA;    sc-rpc = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-api = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-rpc-api = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-blockchain = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-block-builder = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sc-basic-authorship = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    substrate-frame-rpc-system = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    pallet-transaction-payment-rpc = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    &#xD;&#xA;    # These dependencies are used for runtime benchmarking&#xD;&#xA;    frame-benchmarking = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    frame-benchmarking-cli = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    &#xD;&#xA;    # Local Dependencies&#xD;&#xA;    node-template-runtime = { version = &quot;4.0.0-dev&quot;, path = &quot;../runtime&quot; }&#xD;&#xA;    &#xD;&#xA;    # CLI-specific dependencies&#xD;&#xA;    try-runtime-cli = { version = &quot;0.10.0-dev&quot;, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    &#xD;&#xA;    [build-dependencies]&#xD;&#xA;    substrate-build-script-utils = { version = &quot;3.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    vergen = '7.4.3'&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = []&#xD;&#xA;    # Dependencies that are only required if runtime benchmarking should be build.&#xD;&#xA;    runtime-benchmarks = [&#xD;&#xA;    	&quot;node-template-runtime/runtime-benchmarks&quot;,&#xD;&#xA;    	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;    	&quot;frame-benchmarking-cli/runtime-benchmarks&quot;,&#xD;&#xA;    ]&#xD;&#xA;    # Enable features that allow the runtime to be tried and debugged. Name might be subject to change&#xD;&#xA;    # in the near future.&#xD;&#xA;    try-runtime = [&quot;node-template-runtime/try-runtime&quot;, &quot;try-runtime-cli&quot;]&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23742" PostHistoryTypeId="1" PostId="6196" RevisionGUID="31f81673-f78a-497f-8a9b-e22ab29b51de" CreationDate="2022-12-04T10:13:35.773" UserId="2722" Text="failed to select a version for `parity-util-mem`" ContentLicense="CC BY-SA 4.0" />
  <row Id="23743" PostHistoryTypeId="3" PostId="6196" RevisionGUID="31f81673-f78a-497f-8a9b-e22ab29b51de" CreationDate="2022-12-04T10:13:35.773" UserId="2722" Text="|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23744" PostHistoryTypeId="2" PostId="6197" RevisionGUID="e4ffd83a-a80d-41d1-b53e-861b7d640111" CreationDate="2022-12-04T10:50:42.980" UserId="2548" Text="I would like to store a string/message in substrate storage because I am writing a pallet, later on, I would like to use the Polkadot.js portal to write the message on the front-end and store it, and then later to react it.&#xD;&#xA;&#xD;&#xA;Does Polkadot.js convert Vec&lt;u8&gt; to string automatically? If not how can I test it? Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="23746" PostHistoryTypeId="1" PostId="6197" RevisionGUID="e4ffd83a-a80d-41d1-b53e-861b7d640111" CreationDate="2022-12-04T10:50:42.980" UserId="2548" Text="How to store a string in substrate storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23747" PostHistoryTypeId="3" PostId="6197" RevisionGUID="e4ffd83a-a80d-41d1-b53e-861b7d640111" CreationDate="2022-12-04T10:50:42.980" UserId="2548" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23748" PostHistoryTypeId="50" PostId="5678" RevisionGUID="37a12875-2967-4c69-827e-0e9e26db9640" CreationDate="2022-12-04T11:02:35.440" UserId="-1" />
  <row Id="23749" PostHistoryTypeId="2" PostId="6198" RevisionGUID="380c43c5-dd8d-4d65-b03e-ef40fdcef9b3" CreationDate="2022-12-04T11:32:51.913" UserId="94" Text="`with_storage_layer` is the correct function in that case, it spawns a new layer which can be used independently. However it looks a bid weird to me to ignore the error of `f1`.  &#xD;&#xA;Anyway lets take this as example:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn do_something(origin: OriginFor&lt;T&gt;, fail_f2: bool) -&gt; DispatchResult {&#xD;&#xA;	// Start by always writing 0.&#xD;&#xA;	Something::&lt;T&gt;::put(0);&#xD;&#xA;&#xD;&#xA;	let f1 = || -&gt; DispatchResult {&#xD;&#xA;		Something::&lt;T&gt;::put(1);&#xD;&#xA;		Ok(())&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	let f2 = |fail: bool| -&gt; DispatchResult {&#xD;&#xA;		Something::&lt;T&gt;::put(2);&#xD;&#xA;		if fail {&#xD;&#xA;			Err(Error::&lt;T&gt;::ShouldFail.into())&#xD;&#xA;		} else {&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	// Ignore the error of f1. This is possibly a bad idea.&#xD;&#xA;	let _ = f1();&#xD;&#xA;&#xD;&#xA;	// If f2 fails: f1 should still commit to storage.&#xD;&#xA;	// Ignore the error here again, otherwise it will completely roll-back.&#xD;&#xA;	let _ = frame_support::storage::with_storage_layer(|| f2(fail_f2));&#xD;&#xA;&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;You can now write two tests to check that it works as expected:  &#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn it_works_for_success() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Let F1 and F2 succeed.&#xD;&#xA;		assert_ok!(TemplateModule::do_something(RuntimeOrigin::signed(1), false));&#xD;&#xA;		// F1 and F2 did commit.&#xD;&#xA;		assert_eq!(TemplateModule::something(), Some(2));&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn it_works_for_failing() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Let F1 succeed and F2 fail.&#xD;&#xA;		assert_ok!(TemplateModule::do_something(RuntimeOrigin::signed(1), true));&#xD;&#xA;		// F1 did commit; F2 did not.&#xD;&#xA;		assert_eq!(TemplateModule::something(), Some(1));&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23755" PostHistoryTypeId="2" PostId="6200" RevisionGUID="aa8bd528-ad5b-4a47-9ebc-015f4fcfc4fc" CreationDate="2022-12-04T12:50:06.477" UserId="351" Text="String is represented as Vec&lt;u8&gt;. So in your fn put vec&lt;u8&gt; parameter" ContentLicense="CC BY-SA 4.0" />
  <row Id="23759" PostHistoryTypeId="2" PostId="6202" RevisionGUID="3e7085da-fac7-4edf-a191-c8b164fad89b" CreationDate="2022-12-04T14:31:56.293" UserId="3265" Text="Yes, the way to go is to store it as `Vec&lt;u8&gt;` and to use a `BoundedVec` to limit the max number of chars in order to not let users store the entire internet in your pallet.&#xD;&#xA;&#xD;&#xA;The nicks pallet is a perfect starting point for you to explore this as it has this exact functionality to map readable strings to addresses.&#xD;&#xA;&#xD;&#xA;Here is the storage config: https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs#L112-L114&#xD;&#xA;&#xD;&#xA;And here is the associated extrinsic:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs#L139-L158" ContentLicense="CC BY-SA 4.0" />
  <row Id="23761" PostHistoryTypeId="2" PostId="6203" RevisionGUID="bfa25ad4-f503-4743-8ff5-ad499183b95c" CreationDate="2022-12-04T15:29:12.377" UserId="2163" Text="Probably a dumb question, but is it possible to do something like this?&#xD;&#xA;```rust&#xD;&#xA;#[pallet::hooks]&#xD;&#xA;impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	fn on_initialize(now: BlockNumberFor&lt;T&gt;) -&gt; Weight {&#xD;&#xA;		Self::some_extrinsic(origin, now); // what would the origin be here?&#xD;&#xA;		Weight::zero()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23763" PostHistoryTypeId="1" PostId="6203" RevisionGUID="bfa25ad4-f503-4743-8ff5-ad499183b95c" CreationDate="2022-12-04T15:29:12.377" UserId="2163" Text="Is it possible to call some of the pallet extrinsics from `on_initialize` hook?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23764" PostHistoryTypeId="3" PostId="6203" RevisionGUID="bfa25ad4-f503-4743-8ff5-ad499183b95c" CreationDate="2022-12-04T15:29:12.377" UserId="2163" Text="|frame|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23765" PostHistoryTypeId="5" PostId="6186" RevisionGUID="6a788547-2029-4a5c-b30b-58dfa238026e" CreationDate="2022-12-04T16:56:23.913" UserId="504" Comment="added 33 characters in body" Text="I am trying to achieve logging of extrinsic execution time traces on parachain nodes i run myself during block import. I'm doing this through tracing instead of by weights so that I can collect data on long-term trends in actual execution times on the actual mainnet TXN composition instead of benchmarking's worst-case assumption.&#xD;&#xA;&#xD;&#xA;Looking through the docs, most references to in-runtime tracing are 12months or older.&#xD;&#xA;&#xD;&#xA;I have found&#xD;&#xA;- https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/client/rpc-api/src/state/mod.rs#L128 &amp; https://github.com/paritytech/substrate/pull/7780 (rpc to re-execute historic blocks, N/A here)&#xD;&#xA;- https://crates.parity.io/sp_tracing/index.html&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/primitives/tracing/src/lib.rs#L61&#xD;&#xA;- https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/primitives/io/src/lib.rs#L1516&#xD;&#xA;- https://github.com/paritytech/substrate/issues/11000&#xD;&#xA;&#xD;&#xA;My runtime forwards block building calls directly to executive, which runs `init_tracing` https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/frame/executive/src/lib.rs#L435 so as long as `sp-io` is built `with-tracing` I get the `PassingTracingSubscriber` and *should* see log output of recorded spans from what I gather reading these docs.&#xD;&#xA;&#xD;&#xA;I have tried&#xD;&#xA;RT cargo.toml&#xD;&#xA;```&#xD;&#xA;with-tracing = [&#xD;&#xA;  &quot;sp-tracing/with-tracing&quot;,&#xD;&#xA;  &quot;polkadot-runtime-metrics/runtime-metrics&quot;,&#xD;&#xA;  &quot;frame-executive/with-tracing&quot;,&#xD;&#xA;  &quot;sp-io/with-tracing&quot;&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&gt; cargo b --release --features=with-tracing&#xD;&#xA;&#xD;&#xA;But I cannot get any trace output to show up in the logs. Client-side Trace-level logs show normally when the bin is run with `-ltrace`:&#xD;&#xA;```&#xD;&#xA;2022-12-02 11:09:42.063 TRACE tokio-runtime-worker executor: [Parachain] Executing function method=BlockBuilder_apply_extrinsic&#xD;&#xA;2022-12-02 11:09:42.069 TRACE tokio-runtime-worker executor: [Parachain] Executing function method=BlockBuilder_apply_extrinsic&#xD;&#xA;```&#xD;&#xA;I would expect these to be interspersed with the recorded spans from apply_extrinsic produced [here](https://github.com/paritytech/substrate/blob/polkadot-v0.9.26/frame/executive/src/lib.rs#L438).&#xD;&#xA;&#xD;&#xA;**Is sp-tracing still supported and am I missing something?**&#xD;&#xA;e.g. some client-side configuration to receive/enable the traces from the `PassingTracingSubscriber`.&#xD;&#xA;I did find reference in the docs to having to call `set_tracing_subscriber` somewhere in the RT, but 0.9.26 substrate code does not seem to have this fn anymore.&#xD;&#xA;&#xD;&#xA;One caveat with this chain (in case it's relevant) is that I do not have to option of using the native runtime as we force WASM execution even in the case of matching versions." ContentLicense="CC BY-SA 4.0" />
  <row Id="23766" PostHistoryTypeId="2" PostId="6204" RevisionGUID="43ba7741-c265-4fc7-862e-db9313436a8c" CreationDate="2022-12-04T17:09:23.023" UserId="94" Text="Not a good idea. You can just put the functionality into a new private function and then call that instead.  &#xD;&#xA;If the functionality can be injected then use a trait. Everything in [`frame-support/traits`](https://docs.rs/frame-support/latest/frame_support/traits/index.html#traits) basically.  &#xD;&#xA;For example the [Currency](https://docs.rs/frame-support/latest/frame_support/traits/trait.Currency.html) trait which is implemented by other pallets to allow for re-usability without the need to dispatch another call." ContentLicense="CC BY-SA 4.0" />
  <row Id="23768" PostHistoryTypeId="5" PostId="6204" RevisionGUID="702e3db0-2794-4598-aaf7-aab51178ae36" CreationDate="2022-12-04T17:15:25.447" UserId="94" Comment="[Edit removed during grace period]; added 30 characters in body" Text="Not a good idea. You can just put the functionality into a new private function and then call that instead. Then you wont need an origin.  &#xD;&#xA;If the functionality can be injected then use a trait. Everything in [`frame-support/traits`](https://docs.rs/frame-support/latest/frame_support/traits/index.html#traits) basically.  &#xD;&#xA;For example the [Currency](https://docs.rs/frame-support/latest/frame_support/traits/trait.Currency.html) trait which is implemented by other pallets to allow for re-usability without the need to dispatch another call." ContentLicense="CC BY-SA 4.0" />
  <row Id="23773" PostHistoryTypeId="52" PostId="6195" RevisionGUID="94a43b63-2860-40d2-8500-b4aab0e8a694" CreationDate="2022-12-04T18:17:16.363" />
  <row Id="23774" PostHistoryTypeId="2" PostId="6206" RevisionGUID="597fb108-5090-47f3-be14-da3457c1e175" CreationDate="2022-12-04T18:19:18.433" UserId="28" Text="I believe this can also be done simply with the `#[transactional]` tag, which can be placed over any code block.&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/frame_support_procedural/attr.transactional.html&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[transactional]&#xD;&#xA;fn value_commits(v: u32) -&gt; result::Result&lt;u32, &amp;'static str&gt; {&#xD;&#xA;	Value::set(v);&#xD;&#xA;	Ok(v)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[transactional]&#xD;&#xA;fn value_rollbacks(v: u32) -&gt; result::Result&lt;u32, &amp;'static str&gt; {&#xD;&#xA;	Value::set(v);&#xD;&#xA;	Err(&quot;nah&quot;)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23776" PostHistoryTypeId="2" PostId="6207" RevisionGUID="3a849873-14b7-4783-84ec-b9c02bd61b78" CreationDate="2022-12-04T21:02:24.527" UserId="3385" Text="You can find an example of using the `*Ref` pattern to call another contract, given its `AccountId` in this Bulletin Board example [link][1] from Aleph Zero network.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Cardinal-Cryptography/bulletin-board-example/blob/main/contracts/bulletin_board/lib.rs#L452" ContentLicense="CC BY-SA 4.0" />
  <row Id="23778" PostHistoryTypeId="2" PostId="6208" RevisionGUID="315ef9f5-fbbd-462d-8eea-fc91ba09db02" CreationDate="2022-12-04T21:53:35.733" UserId="73" Text="You need to run with:&#xD;&#xA;```&#xD;&#xA;--tracing-targets target=level,target2=level2&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Tracing targets are handled differently than logging targets." ContentLicense="CC BY-SA 4.0" />
  <row Id="23780" PostHistoryTypeId="2" PostId="6209" RevisionGUID="130b9c60-8e05-4c74-a173-caeedd378705" CreationDate="2022-12-04T22:04:55.500" UserId="73" Text="This should hopefully fix your problem:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo update -p kvdb@0.12.0 -p parity-util-mem@0.12.0&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23783" PostHistoryTypeId="2" PostId="6210" RevisionGUID="07f02c31-5ae0-4704-aeba-1d72b3a903f4" CreationDate="2022-12-05T02:30:14.217" UserId="2844" Text="Is `contract terminate` means `stop the currently executed smart contract` or `delete it from Blockchain?`. `If terminate means stop`, then will it be resume later and `If terminate means delete from blockchain`, then will it delete from every distributed, decentralized blockchain network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23785" PostHistoryTypeId="1" PostId="6210" RevisionGUID="07f02c31-5ae0-4704-aeba-1d72b3a903f4" CreationDate="2022-12-05T02:30:14.217" UserId="2844" Text="What is Contract Terminate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23786" PostHistoryTypeId="3" PostId="6210" RevisionGUID="07f02c31-5ae0-4704-aeba-1d72b3a903f4" CreationDate="2022-12-05T02:30:14.217" UserId="2844" Text="|polkadot-js|polkadot|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23793" PostHistoryTypeId="2" PostId="6212" RevisionGUID="d67bc433-e796-4143-a6d2-ba91eec3fa52" CreationDate="2022-12-05T08:52:52.323" UserId="567" Text="calling `terminate` on a contract will:&#xD;&#xA;- send all of its fund to the beneficiary&#xD;&#xA;- delete its address (it will be inaccessible)&#xD;&#xA;- remove all of its storage&#xD;&#xA;&#xD;&#xA;Source:  &#xD;&#xA;[Substrate repo 1][1]   &#xD;&#xA;[substrate repo 2][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/f465fee723c87b7348839b5140135b17d0a48743/frame/contracts/src/lib.rs#L280&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/f465fee723c87b7348839b5140135b17d0a48743/frame/contracts/src/exec.rs#L156" ContentLicense="CC BY-SA 4.0" />
  <row Id="23796" PostHistoryTypeId="52" PostId="6210" RevisionGUID="62d9ac44-b444-4c64-9abc-15afcba11564" CreationDate="2022-12-05T10:30:28.000" />
  <row Id="23797" PostHistoryTypeId="2" PostId="6213" RevisionGUID="e675f946-a522-47e4-b843-2a14138a0967" CreationDate="2022-12-05T11:08:48.487" UserId="451" Text="The current version of substrate supports a new version of &quot;weights&quot;, whereby it is no longer just the execution time (a.k.a &quot;gas&quot;) but also accounts for the &quot;proof size&quot; i.e. the size of the data sent as part of the message from a parachain to the relaychain for validation. This is know as Weights V2, or 2D Weights.&#xD;&#xA;&#xD;&#xA;The reason for the error you are seeing is that the contract instantiation first does a &quot;dry-run&quot; to estimate some values for the gas/weight limit. Previously it returned a plain `u64`, now it returns a struct with a pair of values: `exection_time` and `proof_size`: hence the decoding error.&#xD;&#xA;&#xD;&#xA;There is an issue relating to upgrading the polkadot-js to Weights V2, see https://github.com/polkadot-js/apps/issues/8364. &#xD;&#xA;&#xD;&#xA;Hope that will be fixed soon, but in the meantime you can try with https://contracts-ui.substrate.io/, or [`cargo-contract`][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://github.com/paritytech/cargo-contract/blob/master/docs/extrinsics.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="23803" PostHistoryTypeId="2" PostId="6215" RevisionGUID="f3590e3e-7254-446c-abba-a051eaade513" CreationDate="2022-12-05T12:25:12.570" UserId="2909" Text="Does anyone know the difference between maxNominatorsCount and maxNominatorRewardedPerValidator in Staking pallet? Which one is responsible for causing oversubscription on validator nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23805" PostHistoryTypeId="1" PostId="6215" RevisionGUID="f3590e3e-7254-446c-abba-a051eaade513" CreationDate="2022-12-05T12:25:12.570" UserId="2909" Text="Help for Staking Pallet! Preventing oversubscription on validator nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="23806" PostHistoryTypeId="3" PostId="6215" RevisionGUID="f3590e3e-7254-446c-abba-a051eaade513" CreationDate="2022-12-05T12:25:12.570" UserId="2909" Text="|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23807" PostHistoryTypeId="6" PostId="6215" RevisionGUID="d29a024e-3d69-4d00-bbfa-bfc1849965fc" CreationDate="2022-12-05T12:43:58.577" UserId="2909" Comment="edited tags" Text="|staking|validator|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23808" PostHistoryTypeId="5" PostId="6215" RevisionGUID="d29a024e-3d69-4d00-bbfa-bfc1849965fc" CreationDate="2022-12-05T12:43:58.577" UserId="2909" Comment="edited tags" Text="Does anyone know the difference between **maxNominatorsCount** and **maxNominatorRewardedPerValidator** in Staking pallet? Which one is responsible for causing oversubscription on validator nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23809" PostHistoryTypeId="2" PostId="6216" RevisionGUID="7f08682e-6cec-4517-9ce0-2167b5ed2bc2" CreationDate="2022-12-05T13:00:23.857" UserId="167" Text="`maxNominatorsCount` is the maximum number of nomination intentions that can be set. In other words, it is limit on the maximum number of nominators. If set to `None`, no limit will exist. &#xD;&#xA;&#xD;&#xA;`maxNominatorRewardedPerValidator` the one causing oversubscription, and means the number of &quot;active nominators&quot; that can be rewarded by a single validator.&#xD;&#xA;&#xD;&#xA;To understand what is a nomination intention and what is an active nominator, see [this link](https://polkadot.network/blog/staking-update-february-2022/#staking-terminology). " ContentLicense="CC BY-SA 4.0" />
  <row Id="23811" PostHistoryTypeId="2" PostId="6217" RevisionGUID="5490820c-6e32-4cc4-8ba6-a2c158bab0a9" CreationDate="2022-12-05T13:42:56.577" UserId="3371" Text="Solved by myself by providing `fp_self_contained::UncheckedExtrinsic` for `UncheckedExtrinsic` type. Then it started to use self contained call for eth like calls." ContentLicense="CC BY-SA 4.0" />
  <row Id="23813" PostHistoryTypeId="5" PostId="6202" RevisionGUID="f61ccb11-98aa-4a38-8d5d-c3a5fc52aa12" CreationDate="2022-12-05T15:14:24.757" UserId="3265" Comment="added 53 characters in body" Text="Yes, the way to go is to store it as `Vec&lt;u8&gt;` and to use a `BoundedVec` to limit the max number of chars in order to not let users store the entire internet in your pallet.&#xD;&#xA;&#xD;&#xA;The nicks pallet is a perfect starting point for you to explore this as it has this exact functionality to map readable strings to addresses.&#xD;&#xA;&#xD;&#xA;Here is the storage config: https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs#L112-L114&#xD;&#xA;&#xD;&#xA;And here is the associated extrinsic:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs#L139-L158&#xD;&#xA;&#xD;&#xA;Yes, it's converted by `polkadot.js` into string!" ContentLicense="CC BY-SA 4.0" />
  <row Id="23814" PostHistoryTypeId="2" PostId="6218" RevisionGUID="f525566b-724d-4b4d-80cd-b7e25aa52189" CreationDate="2022-12-05T16:09:47.283" UserId="251" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5rftN.png&#xD;&#xA;&#xD;&#xA;I implemented my staking pallet, which implemented the `SessionManager`. And pass it to `pallet_session::Config`.&#xD;&#xA;&#xD;&#xA;I can confirm the session keys are set correctly.&#xD;&#xA;&#xD;&#xA;If I stop the `Alice` node, then the `Bob` start to produce blocks.&#xD;&#xA;&#xD;&#xA;Why `Alice` always get the authority to produce block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23816" PostHistoryTypeId="1" PostId="6218" RevisionGUID="f525566b-724d-4b4d-80cd-b7e25aa52189" CreationDate="2022-12-05T16:09:47.283" UserId="251" Text="Why the block author is always `Alice`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23817" PostHistoryTypeId="3" PostId="6218" RevisionGUID="f525566b-724d-4b4d-80cd-b7e25aa52189" CreationDate="2022-12-05T16:09:47.283" UserId="251" Text="|aura|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23818" PostHistoryTypeId="5" PostId="6218" RevisionGUID="d0ca0a1c-ce49-46d6-9fae-f5c93d9a387a" CreationDate="2022-12-05T16:18:59.033" UserId="251" Comment="added 6 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5rftN.png&#xD;&#xA;&#xD;&#xA;I implemented my own staking pallet, which implemented the `SessionManager`. And I pass it to `pallet_session::Config`.&#xD;&#xA;&#xD;&#xA;I can confirm the session keys are set correctly.&#xD;&#xA;&#xD;&#xA;If I stop the `Alice` node, then the `Bob` start to produce blocks.&#xD;&#xA;&#xD;&#xA;Why `Alice` always get the authority to produce block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23823" PostHistoryTypeId="2" PostId="6220" RevisionGUID="50abb407-6c50-434d-a7f8-ae1c1b8e1d01" CreationDate="2022-12-05T16:25:14.033" UserId="298" Text="I am trying to learn about `LocalAssetTransactor`, but can't find much about xcm in general. I know there is a thorough blog post (https://polkadot.network/blog/xcm-the-cross-consensus-message-format/), but is there anything more in rehard to the `IsConcrete` type?&#xD;&#xA;&#xD;&#xA;For example: can you explain the difference between [darwinia set up][1] and [substrate-parachain-template][2]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/darwinia-network/darwinia-parachain/blob/cdc46c6920d7680b0eda1bbec4ebe613c40cba82/runtime/darwinia-parachain/src/pallets/polkadot_xcm.rs#L33&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/664114fe707c089c112a2db770403cccf01c256d/runtime/src/xcm_config.rs#L47" ContentLicense="CC BY-SA 4.0" />
  <row Id="23825" PostHistoryTypeId="1" PostId="6220" RevisionGUID="50abb407-6c50-434d-a7f8-ae1c1b8e1d01" CreationDate="2022-12-05T16:25:14.033" UserId="298" Text="Where to learn about xcm?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23826" PostHistoryTypeId="3" PostId="6220" RevisionGUID="50abb407-6c50-434d-a7f8-ae1c1b8e1d01" CreationDate="2022-12-05T16:25:14.033" UserId="298" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23827" PostHistoryTypeId="5" PostId="6220" RevisionGUID="254c09fc-aeb7-4f71-b805-1dc07c5f59cb" CreationDate="2022-12-05T16:30:35.883" UserId="298" Comment="added 9 characters in body" Text="I am trying to learn about `LocalAssetTransactor`, but can't find much about xcm in general. I know there is a thorough blog post (https://polkadot.network/blog/xcm-the-cross-consensus-message-format/), but is there anything more detailed?&#xD;&#xA;&#xD;&#xA;For example: can you explain the difference between [darwinia set up][1] and [substrate-parachain-template][2] in regard to the `IsConcrete` type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/darwinia-network/darwinia-parachain/blob/cdc46c6920d7680b0eda1bbec4ebe613c40cba82/runtime/darwinia-parachain/src/pallets/polkadot_xcm.rs#L33&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/664114fe707c089c112a2db770403cccf01c256d/runtime/src/xcm_config.rs#L47" ContentLicense="CC BY-SA 4.0" />
  <row Id="23828" PostHistoryTypeId="4" PostId="6220" RevisionGUID="254c09fc-aeb7-4f71-b805-1dc07c5f59cb" CreationDate="2022-12-05T16:30:35.883" UserId="298" Comment="added 9 characters in body" Text="Where to learn about XCM (docs)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23831" PostHistoryTypeId="5" PostId="6218" RevisionGUID="3036a196-6d60-4a6a-9714-4dc369477258" CreationDate="2022-12-05T17:21:28.600" UserId="251" Comment="added 104 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5rftN.png&#xD;&#xA;&#xD;&#xA;I implemented my own staking pallet, which implemented the `SessionManager`. And I pass it to `pallet_session::Config`.&#xD;&#xA;&#xD;&#xA;I can confirm the session keys are set correctly.&#xD;&#xA;&#xD;&#xA;If I stop the `Alice` node, then the `Bob` start to produce blocks.&#xD;&#xA;&#xD;&#xA;Why `Alice` always get the authority to produce block?&#xD;&#xA;&#xD;&#xA;Code: https://github.com/darwinia-network/darwinia-2.0/blob/xavier/staking/pallet/staking/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="23832" PostHistoryTypeId="2" PostId="6221" RevisionGUID="969ae7e7-b647-4dcb-ba20-566623f8600d" CreationDate="2022-12-05T17:30:57.780" UserId="481" Text="Shawn Tabrizi's [xcm workshop](https://www.shawntabrizi.com/xcm-workshop/#/) and [video](https://www.youtube.com/watch?v=5cgq5jOZx9g&amp;t=5s) are a good start for learning how to implement XCM. I've also found that compiling and opening polkadots docs to access public documentation for XCM to be very useful too. It helps to make sense of all the different traits and components used in different xcm configurations. (I'm not sure there's a public site that hosts this documentation yet).&#xD;&#xA;&#xD;&#xA;The `LocalAssetTransactor` type is an abstraction for the xcm-executor to transact assets on a local chain. This includes things like minting new tokens, burning tokens, transferring tokens, etc. &#xD;&#xA;&#xD;&#xA;The documentation on the `AssetTransactor` type describes it as &#xD;&#xA;&#xD;&#xA;`How to withdraw and deposit an asset.` &#xD;&#xA;&#xD;&#xA;And the trait, `TransactAsset` required for it is described with &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Facility for asset transacting.&#xD;&#xA;&#xD;&#xA;This should work with as many asset/location combinations as possible. Locations to support may include non-account locations such as a MultiLocation::X1(Junction::Parachain). Different chains may handle them in different ways.&#xD;&#xA;&#xD;&#xA;Can be amalgamated as a tuple of items that implement this trait. In such executions, if any of the transactors returns Ok(()), then it will short circuit. Else, execution is passed to the next transactor.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `CurrencyAdapter` struct present in both the `parachain-template` and `darwinia` setup you're referencing implements this `TransactAsset` trait. &#xD;&#xA;&#xD;&#xA;We can then learn that the second generic on the trait `CurrencyAdapter` implements a trait `MatchesFungible` which returns an `Option&lt;Balance&gt;` if there is a Fungible asset available on the system. the `IsConcrete` describes which asset we want to match. In `parachain_template`'s case, `IsConcrete` is matching against the Relay chain asset (DOT/KSM/ROC), in Darwinia's case it is matching against Darwinias native asset. Therefore, the currency transactor will transact in Darwinia native currency (in darwinias case) or for parachain template in the relay chain's currency.&#xD;&#xA;&#xD;&#xA;Relay Chain location for parachain-templates 'isConcrete':&#xD;&#xA;```&#xD;&#xA;	pub const RelayLocation: MultiLocation = MultiLocation::parent();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Darwinia Location:&#xD;&#xA;```&#xD;&#xA;	pub AnchoringSelfReserve: MultiLocation = MultiLocation::new(&#xD;&#xA;		0,&#xD;&#xA;		X1(PalletInstance(&lt;Balances as PalletInfoAccess&gt;::index() as u8))&#xD;&#xA;	);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Darwinia location has 0 parents and describes it's own `balances` pallet, which deals with operations for the native token.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23834" PostHistoryTypeId="5" PostId="6221" RevisionGUID="c12e6108-5670-4546-b6cf-7e8a6d729ef3" CreationDate="2022-12-05T17:39:39.850" UserId="481" Comment="added 12 characters in body" Text="Shawn Tabrizi's [xcm workshop](https://www.shawntabrizi.com/xcm-workshop/#/) and [video](https://www.youtube.com/watch?v=5cgq5jOZx9g&amp;t=5s) are a good start for learning how to implement XCM. I've also found that compiling and opening polkadots docs to access public documentation for XCM to be very useful too. It helps to make sense of all the different traits and components used in different xcm configurations. (I'm not sure there's a public site that hosts this documentation yet).&#xD;&#xA;&#xD;&#xA;The `LocalAssetTransactor` type is an abstraction for the xcm-executor to transact assets on a local chain. This includes things like minting new tokens, burning tokens, transferring tokens, etc. &#xD;&#xA;&#xD;&#xA;The documentation on the `AssetTransactor` type describes it as &#xD;&#xA;&#xD;&#xA;`How to withdraw and deposit an asset.` &#xD;&#xA;&#xD;&#xA;And the trait, `TransactAsset` required for it is described with &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Facility for asset transacting.&#xD;&#xA;&#xD;&#xA;This should work with as many asset/location combinations as possible. Locations to support may include non-account locations such as a MultiLocation::X1(Junction::Parachain). Different chains may handle them in different ways.&#xD;&#xA;&#xD;&#xA;Can be amalgamated as a tuple of items that implement this trait. In such executions, if any of the transactors returns Ok(()), then it will short circuit. Else, execution is passed to the next transactor.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `CurrencyAdapter` struct present in both the `parachain-template` and `darwinia` setup you're referencing implements this `TransactAsset` trait. &#xD;&#xA;&#xD;&#xA;We can then learn that the second generic on the trait `CurrencyAdapter` implements a trait `MatchesFungible` which returns an `Option&lt;Balance&gt;` if there is a Fungible asset matching `IsConcrete` on the system. The `IsConcrete` describes which asset we want to match. In `parachain_template`'s case, `IsConcrete` is matching against the Relay chain asset (DOT/KSM/ROC), in Darwinia's case it is matching against Darwinias native asset. Therefore, the currency transactor will transact in Darwinia native currency (in darwinias case) or for parachain template in the relay chain's currency and error if the currency is anything else.&#xD;&#xA;&#xD;&#xA;Relay Chain location for parachain-templates 'isConcrete':&#xD;&#xA;```&#xD;&#xA;	pub const RelayLocation: MultiLocation = MultiLocation::parent();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Darwinia Location:&#xD;&#xA;```&#xD;&#xA;	pub AnchoringSelfReserve: MultiLocation = MultiLocation::new(&#xD;&#xA;		0,&#xD;&#xA;		X1(PalletInstance(&lt;Balances as PalletInfoAccess&gt;::index() as u8))&#xD;&#xA;	);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Darwinia location has 0 parents and describes it's own `balances` pallet, which deals with operations for the native token.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can also learn a bunch by reading through docs other parachains have created for XCM. [Moonbeams](https://docs.moonbeam.network/builders/xcm/overview/) documentation is pretty good and i'm sure there are other parachain team docs out there too&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23835" PostHistoryTypeId="5" PostId="6221" RevisionGUID="701e8d06-2af2-4db8-a60a-dc945612c72b" CreationDate="2022-12-05T17:47:04.393" UserId="481" Comment="deleted 4 characters in body" Text="Shawn Tabrizi's [xcm workshop](https://www.shawntabrizi.com/xcm-workshop/#/) and [video](https://www.youtube.com/watch?v=5cgq5jOZx9g&amp;t=5s) are a good start for learning how to implement XCM. I've also found that compiling and opening polkadots docs to access public documentation for XCM to be very useful too. It helps to make sense of all the different traits and components used in different xcm configurations. (I'm not sure there's a public site that hosts this documentation yet).&#xD;&#xA;&#xD;&#xA;The `LocalAssetTransactor` type is an abstraction for the xcm-executor to transact assets on a local chain. This includes things like depositing assets, withdrawing assests, transferring assets, etc. &#xD;&#xA;&#xD;&#xA;The documentation on the `AssetTransactor` type describes it as &#xD;&#xA;&#xD;&#xA;`How to withdraw and deposit an asset.` &#xD;&#xA;&#xD;&#xA;And the trait, `TransactAsset` required for it is described with &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Facility for asset transacting.&#xD;&#xA;&#xD;&#xA;This should work with as many asset/location combinations as possible. Locations to support may include non-account locations such as a MultiLocation::X1(Junction::Parachain). Different chains may handle them in different ways.&#xD;&#xA;&#xD;&#xA;Can be amalgamated as a tuple of items that implement this trait. In such executions, if any of the transactors returns Ok(()), then it will short circuit. Else, execution is passed to the next transactor.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `CurrencyAdapter` struct present in both the `parachain-template` and `darwinia` setup you're referencing implements this `TransactAsset` trait. &#xD;&#xA;&#xD;&#xA;We can then learn that the second generic on the trait `CurrencyAdapter` implements a trait `MatchesFungible` which returns an `Option&lt;Balance&gt;` if there is a Fungible asset matching `IsConcrete` on the system. The `IsConcrete` describes which asset we want to match. In `parachain_template`'s case, `IsConcrete` is matching against the Relay chain asset (DOT/KSM/ROC), in Darwinia's case it is matching against Darwinias native asset. Therefore, the currency transactor will transact in Darwinia native currency (in darwinias case) or for parachain template in the relay chain's currency and error if the currency is anything else.&#xD;&#xA;&#xD;&#xA;Relay Chain location for parachain-templates 'isConcrete':&#xD;&#xA;```&#xD;&#xA;	pub const RelayLocation: MultiLocation = MultiLocation::parent();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Darwinia Location:&#xD;&#xA;```&#xD;&#xA;	pub AnchoringSelfReserve: MultiLocation = MultiLocation::new(&#xD;&#xA;		0,&#xD;&#xA;		X1(PalletInstance(&lt;Balances as PalletInfoAccess&gt;::index() as u8))&#xD;&#xA;	);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Darwinia location has 0 parents and describes it's own `balances` pallet, which deals with operations for the native token.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can also learn a bunch by reading through docs other parachains have created for XCM. [Moonbeams](https://docs.moonbeam.network/builders/xcm/overview/) documentation is pretty good and i'm sure there are other parachain team docs out there too&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23840" PostHistoryTypeId="5" PostId="6221" RevisionGUID="5432fc6d-3113-4b0f-b481-8fc7b9184e5e" CreationDate="2022-12-05T21:10:24.897" UserId="481" Comment="added 97 characters in body" Text="Shawn Tabrizi's [xcm workshop](https://www.shawntabrizi.com/xcm-workshop/#/) and [video](https://www.youtube.com/watch?v=5cgq5jOZx9g&amp;t=5s) are a good start for learning how to implement XCM. I've also found that compiling and opening polkadots docs to access public documentation for XCM to be very useful too. It helps to make sense of all the different traits and components used in different xcm configurations. (I'm not sure there's a public site that hosts this documentation yet).&#xD;&#xA;&#xD;&#xA;The `LocalAssetTransactor` type is an abstraction for the xcm-executor to transact assets on a local chain. This includes things like depositing assets, withdrawing assests, transferring assets, etc. &#xD;&#xA;&#xD;&#xA;The documentation on the `AssetTransactor` type describes it as &#xD;&#xA;&#xD;&#xA;`How to withdraw and deposit an asset.` &#xD;&#xA;&#xD;&#xA;And the trait, `TransactAsset` required for the type `AssetTransactor` is described with &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Facility for asset transacting.&#xD;&#xA;&#xD;&#xA;This should work with as many asset/location combinations as possible. Locations to support may include non-account locations such as a MultiLocation::X1(Junction::Parachain). Different chains may handle them in different ways.&#xD;&#xA;&#xD;&#xA;Can be amalgamated as a tuple of items that implement this trait. In such executions, if any of the transactors returns Ok(()), then it will short circuit. Else, execution is passed to the next transactor.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `CurrencyAdapter` struct present in both the `parachain-template` and `darwinia` setup you're referencing implements this `TransactAsset` trait. &#xD;&#xA;&#xD;&#xA;We can then learn that the second generic on the struct `CurrencyAdapter` implements a trait `MatchesFungible` which returns an `Option&lt;Balance&gt;` if there is a fungible asset matching `IsConcrete` on the system. The `IsConcrete` describes which asset we want to match. In `parachain_template`'s case, `IsConcrete` is matching against the Relay chain asset (DOT/KSM/ROC), in Darwinia's case it is matching against Darwinias native asset. Therefore, the currency transactor will transact in Darwinia native currency on Darwinia, or in the relay chain's currency on parachain-template. If the currency in the `MultiAsset` does not match in either cases (i.e it's not Dot/Roc/Ksm or not Darwinia), the xcm transaction will error out.&#xD;&#xA;&#xD;&#xA;Relay Chain location for parachain-templates 'isConcrete':&#xD;&#xA;```&#xD;&#xA;	pub const RelayLocation: MultiLocation = MultiLocation::parent();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Darwinia Location:&#xD;&#xA;```&#xD;&#xA;	pub AnchoringSelfReserve: MultiLocation = MultiLocation::new(&#xD;&#xA;		0,&#xD;&#xA;		X1(PalletInstance(&lt;Balances as PalletInfoAccess&gt;::index() as u8))&#xD;&#xA;	);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Darwinia location has 0 parents and describes it's own `balances` pallet, which deals with operations for the native token.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can also learn a bunch by reading through docs other parachains have created for XCM. [Moonbeams](https://docs.moonbeam.network/builders/xcm/overview/) documentation is pretty good and i'm sure there are other parachain team docs out there too&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23841" PostHistoryTypeId="5" PostId="6221" RevisionGUID="be2fdb29-49f4-4008-952e-319e524d45e8" CreationDate="2022-12-05T21:15:27.973" UserId="481" Comment="added 97 characters in body" Text="Shawn Tabrizi's [xcm workshop](https://www.shawntabrizi.com/xcm-workshop/#/) and [video](https://www.youtube.com/watch?v=5cgq5jOZx9g&amp;t=5s) are a good start for learning how to implement XCM. I've also found that compiling and opening polkadots docs to access public documentation for XCM to be very useful too. It helps to make sense of all the different traits and components used in different xcm configurations. (I'm not sure there's a public site that hosts this documentation yet).&#xD;&#xA;&#xD;&#xA;The `LocalAssetTransactor` type is an abstraction for the xcm-executor to transact assets on a local chain. This includes things like depositing assets, withdrawing assests, transferring assets, etc. &#xD;&#xA;&#xD;&#xA;The documentation on the `AssetTransactor` type describes it as &#xD;&#xA;&#xD;&#xA;`How to withdraw and deposit an asset.` &#xD;&#xA;&#xD;&#xA;And the trait, `TransactAsset` required for the type `AssetTransactor` is described with &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Facility for asset transacting.&#xD;&#xA;&#xD;&#xA;This should work with as many asset/location combinations as possible. Locations to support may include non-account locations such as a MultiLocation::X1(Junction::Parachain). Different chains may handle them in different ways.&#xD;&#xA;&#xD;&#xA;Can be amalgamated as a tuple of items that implement this trait. In such executions, if any of the transactors returns Ok(()), then it will short circuit. Else, execution is passed to the next transactor.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `CurrencyAdapter` struct present in both the `parachain-template` and `darwinia` setup you're referencing implements this `TransactAsset` trait. &#xD;&#xA;&#xD;&#xA;We can then learn that the second generic on the struct `CurrencyAdapter` implements a trait `MatchesFungible` which returns an `Option&lt;Balance&gt;` if there is a fungible asset matching `IsConcrete` on the system. The `IsConcrete` describes which asset we want to match. In `parachain_template`'s case, `IsConcrete` is matching against the Relay chain asset (DOT/KSM/ROC), in Darwinia's case it is matching against Darwinias native asset. Therefore, the currency transactor will transact in Darwinia native currency on Darwinia, or in the relay chain's currency on parachain-template. If the currency in the `MultiAsset` does not match in either cases (i.e it's not Dot/Roc/Ksm or not Darwinia), the xcm transaction will error out.&#xD;&#xA;&#xD;&#xA;Relay Chain location for parachain-templates 'isConcrete':&#xD;&#xA;```&#xD;&#xA;	pub const RelayLocation: MultiLocation = MultiLocation::parent();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Darwinia Location:&#xD;&#xA;```&#xD;&#xA;	pub AnchoringSelfReserve: MultiLocation = MultiLocation::new(&#xD;&#xA;		0,&#xD;&#xA;		X1(PalletInstance(&lt;Balances as PalletInfoAccess&gt;::index() as u8))&#xD;&#xA;	);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Darwinia location has 0 parents and describes it's own `balances` pallet, which deals with operations for the native token. The naming for Darwinia's location may be a bit confusing, but it's referencing that Darwinia chain is the reserve (&quot;Self Reserve&quot;) for it's own Darwinia token. &quot;Anchoring&quot; refers to the relative location type, as in the location from the perspective of Darwinia.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can also learn a bunch by reading through docs other parachains have created for XCM. [Moonbeams](https://docs.moonbeam.network/builders/xcm/overview/) documentation is pretty good and i'm sure there are other parachain team docs out there too&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23842" PostHistoryTypeId="52" PostId="6215" RevisionGUID="197c4e46-a49d-40c2-ab6f-778df11b62ae" CreationDate="2022-12-05T21:21:07.277" />
  <row Id="23843" PostHistoryTypeId="2" PostId="6224" RevisionGUID="82a5d06f-4f06-4db0-bd62-27646306ba86" CreationDate="2022-12-05T21:53:58.110" UserId="2548" Text="&#xD;&#xA;```&#xD;&#xA;let contract = Invoice {&#xD;&#xA;				origin: from.clone(),&#xD;&#xA;				to: to.clone(),&#xD;&#xA;				amount,&#xD;&#xA;				status: false,&#xD;&#xA;				id: 0,&#xD;&#xA;				msg: msg.clone(),&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			let mut invoice_vec: Vec&lt;Invoice&lt;T::AccountId, T::AccountId, BalanceOf&lt;T&gt;&gt;&gt; = Vec::new();&#xD;&#xA;			invoice_vec.push(contract);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			// Save in storage the sender and the invoices&#xD;&#xA;			&lt;InvoiceSender&lt;T&gt;&gt;::insert(from.clone(), &amp;invoice_vec);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Above I do have a struct and I put it into an array and then I store it as a value.&#xD;&#xA;&#xD;&#xA;It is very difficult for me to mutate the value in storage. Let's assume I would like to change the status from false to true if the id is equal to 17&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;if(id == 17){&#xD;&#xA;&lt;InvoiceSender&lt;T&gt;&gt;::try_mutate(from.clone(), .....&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Can you help me complete the above line of code? " ContentLicense="CC BY-SA 4.0" />
  <row Id="23845" PostHistoryTypeId="1" PostId="6224" RevisionGUID="82a5d06f-4f06-4db0-bd62-27646306ba86" CreationDate="2022-12-05T21:53:58.110" UserId="2548" Text="How to mutate the value in storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23846" PostHistoryTypeId="3" PostId="6224" RevisionGUID="82a5d06f-4f06-4db0-bd62-27646306ba86" CreationDate="2022-12-05T21:53:58.110" UserId="2548" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23847" PostHistoryTypeId="2" PostId="6225" RevisionGUID="6abb554b-0614-4684-b0a0-24117dd538ac" CreationDate="2022-12-05T22:25:08.543" UserId="73" Text="```&#xD;&#xA;InvoiceSender::&lt;T&gt;::mutate(&amp;from, |invoices| &#xD;&#xA;    invoices.iter_mut().filter(|i| i.id == 17).for_each(|i| {&#xD;&#xA;        i.status = true;&#xD;&#xA;    });&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This should achieve what you want." ContentLicense="CC BY-SA 4.0" />
  <row Id="23849" PostHistoryTypeId="2" PostId="6226" RevisionGUID="e77f52c8-72f1-4dca-8a81-7d1b835e64ed" CreationDate="2022-12-05T22:33:19.833" UserId="73" Text="The [slot duration][1] in your runtime is wrong:&#xD;&#xA;```&#xD;&#xA;pub const MILLISECS_PER_BLOCK: u64 = 6_000;&#xD;&#xA;pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You are running a parachain that can only produce a block every 12 seconds. You have set your slot time to 6 seconds. That means that you always skip `Bob`. Always when it is the turn of `Bob`, there is &quot;no slot&quot; in the relay chain to build a parachain block.&#xD;&#xA;&#xD;&#xA;So, the solution is to set the following as slot duration:&#xD;&#xA;```&#xD;&#xA;pub const MILLISECS_PER_BLOCK: u64 = 12_000;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/darwinia-network/darwinia-2.0/blob/5e760e0a1766ee30ba51540ec5f32a1ee63fb1f7/core/primitives/src/lib.rs#L69" ContentLicense="CC BY-SA 4.0" />
  <row Id="23859" PostHistoryTypeId="2" PostId="6229" RevisionGUID="613d9e5a-ac37-4530-bb1f-0c37951b573a" CreationDate="2022-12-06T07:35:34.617" UserId="3437" Text="I have few questions related to chain spec. I should have asked them separately but they are related to each other. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1) Can we update chain spec json file on the fly while running the node? For example: if I want to change sudo key.&#xD;&#xA;&#xD;&#xA;2) The key specified in the chain spec is picked up only when booting a new chain/node?&#xD;&#xA;&#xD;&#xA;3) Let's say we modify any other parameters in the chain spec, that would require all nodes to reboot to pick up new changes?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can someone please help me to answer these questions? Thanks in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23861" PostHistoryTypeId="1" PostId="6229" RevisionGUID="613d9e5a-ac37-4530-bb1f-0c37951b573a" CreationDate="2022-12-06T07:35:34.617" UserId="3437" Text="Can we modify chain spec while running the node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23862" PostHistoryTypeId="3" PostId="6229" RevisionGUID="613d9e5a-ac37-4530-bb1f-0c37951b573a" CreationDate="2022-12-06T07:35:34.617" UserId="3437" Text="|substrate-node-template|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23863" PostHistoryTypeId="2" PostId="6230" RevisionGUID="253c3f37-165b-4382-ba57-5be262bbb045" CreationDate="2022-12-06T08:54:20.833" UserId="251" Text="It depends on the fields.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You can't modify the storage.&#xD;&#xA;&#xD;&#xA;If you do that, the genesis hash will change. Which means it will be a totally different chain. Even though you sync this to all the nodes. The old state won't be kept/synced.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;You can change the bootnodes field.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23865" PostHistoryTypeId="5" PostId="6230" RevisionGUID="d59fe81d-1938-46bd-83be-884b3154399a" CreationDate="2022-12-06T09:15:21.687" UserId="251" Comment="added 1 character in body" Text="It depends on the fields.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You can't modify the storage.&#xD;&#xA;&#xD;&#xA;If you do that, the genesis hash will change. Which means it will be a totally different chain. Even though you apply this to all the nodes. The old state won't be kept/synced.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;You can change the bootnodes field.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23866" PostHistoryTypeId="2" PostId="6231" RevisionGUID="855cf87f-dc86-41ab-8b38-bc5993db0faa" CreationDate="2022-12-06T09:30:16.803" UserId="251" Text="When we use `ChainSpec::from_genesis`, we need to pass some string to these fields.&#xD;&#xA;&#xD;&#xA;And these fields are not documented. So, how do we deal with these fields?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23868" PostHistoryTypeId="1" PostId="6231" RevisionGUID="855cf87f-dc86-41ab-8b38-bc5993db0faa" CreationDate="2022-12-06T09:30:16.803" UserId="251" Text="What are the meanings of `id` and `protocol_id`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23869" PostHistoryTypeId="3" PostId="6231" RevisionGUID="855cf87f-dc86-41ab-8b38-bc5993db0faa" CreationDate="2022-12-06T09:30:16.803" UserId="251" Text="|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23876" PostHistoryTypeId="5" PostId="6230" RevisionGUID="e690a772-bba0-4012-b96a-618a492764c3" CreationDate="2022-12-06T10:01:14.237" UserId="251" Comment="added 5 characters in body" Text="It depends on the fields.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Examples:&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You can't modify the storage.&#xD;&#xA;&#xD;&#xA;If you do that, the genesis hash will change. Which means it will be a totally different chain. Even though you apply this to all the nodes. The old state won't be kept/synced.&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;&#xD;&#xA;You can change the bootnodes field.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23877" PostHistoryTypeId="2" PostId="6233" RevisionGUID="1b707045-35a1-44a2-9283-c6527b16dd02" CreationDate="2022-12-06T10:42:33.830" UserId="2025" Text="Starting from the EDIT comments:&#xD;&#xA;&#xD;&#xA;I do believe that Subscan's XCM dashboard tool works as you described. They run full nodes for every parachain and look for any XCM emitting extrinsic to track the XCM message in the ecosystem. &#xD;&#xA;&#xD;&#xA;The hash that Subscan is showing is actually the hash of the encoded `vec![XcmInstruction]`. But this is not part of the XCM message itself nor part of the XCM specs currently. The good news is that [XCM V3](https://github.com/paritytech/polkadot/pull/4756) will define a  XCM message hash `XcmHash` to be returned when an XCM message is sent. This should work as a unique identifier for XCM messages in the ecosystem.&#xD;&#xA;&#xD;&#xA;Regarding the events that the processing of an XCM message may emit in the receiving chain, I am afraid there is no concrete answer. It will depend on the config of each chain. However, I think you can have a good starting point by monitoring for:&#xD;&#xA; - `ump(ExecutedUpward)` if the receiving chain is the relay chain (Polkadot/Kusama).&#xD;&#xA; - `xcmpqueue(Success)` or `dmpqueue(ExecutedDownward)` if the receiving chain is a parachain.&#xD;&#xA;&#xD;&#xA;Together with these, you should see other events giving more info on what was the result of processing the relevant XCM message at the receiving chain. &#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="23879" PostHistoryTypeId="2" PostId="6234" RevisionGUID="ad8ff168-3a47-423f-85aa-5b11ccf7fc1f" CreationDate="2022-12-06T12:36:35.873" UserId="3475" Text="I have an issue regarding displaying errors. For errors, the logger @polkadot/api uses will write to console even when the error is caught and handled. I am handling and displaying the messages a certain way to fit my needs but then I recieve two errors, one I created and one from the @polkadot/api .&#xD;&#xA;Is there a way to suppress @polkadot/api messages?&#xD;&#xA;&#xD;&#xA;Best regards!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23881" PostHistoryTypeId="1" PostId="6234" RevisionGUID="ad8ff168-3a47-423f-85aa-5b11ccf7fc1f" CreationDate="2022-12-06T12:36:35.873" UserId="3475" Text="@polkadot/api suppress output messages" ContentLicense="CC BY-SA 4.0" />
  <row Id="23882" PostHistoryTypeId="3" PostId="6234" RevisionGUID="ad8ff168-3a47-423f-85aa-5b11ccf7fc1f" CreationDate="2022-12-06T12:36:35.873" UserId="3475" Text="|polkadot-js|error|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23883" PostHistoryTypeId="2" PostId="6235" RevisionGUID="c55f34ed-02a3-4f8e-821a-6ffb9b26dba1" CreationDate="2022-12-06T13:52:16.467" UserId="73" Text="`protocol_id` was used earlier as some identifier for networking streams. Each network stream is sending this identifier on opening, so that the stream can be redirected to the correct protocol implementation. This `protocol_id` was used to create unique protocol identifiers per chain. As nodes from Acala for example can also connect to nodes from Polkadot, they would not even try to open the sync protocol because the protocol doesn't identifier doesn't match. Recently we &quot;soft-deprecated&quot; the `protocol_id`. Substrate will now take the genesis hash of your chain to make these protocol identifiers unique per chain.&#xD;&#xA;&#xD;&#xA;TLDR for `protocol_id`: Use some unique string for identifying your chain protocols.&#xD;&#xA;&#xD;&#xA;`id` is mainly used to create things like the base path where your database etc is stored. So, the `id` should may not contain spaces etc to make navigation in folders of your chain &quot;easier&quot;. If you for example look at the `Kusama` chain spec you will see that the name is `Kusama`, but the `id` is `ksmcc3`. This `ksmcc3` stands for the Kusama chain candidate 3 as it took three different genesis to the final Kusama chain we have nowadays. &#xD;&#xA;&#xD;&#xA;TLDR for `id`: Use some simple unique identifier for your chain that is &quot;terminal friendly&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="23885" PostHistoryTypeId="33" PostId="6169" RevisionGUID="b1228177-8c87-4fc1-8104-b18a4530515e" CreationDate="2022-12-06T13:53:51.630" UserId="298" Comment="15" />
  <row Id="23886" PostHistoryTypeId="2" PostId="6236" RevisionGUID="e7c30802-4fb3-4490-a8ce-0e5821c1a0e2" CreationDate="2022-12-06T14:41:11.690" UserId="3557" Text="After about 50 blocks my block production slows down because none of the nodes are voting in the finality rounds. I'm working off a codebase that I added the grandpa pallet to, so it's possible I may have screwed something up in the setup, but I can't figure out what it is. Where should I check to make sure I'm doing everything right? Things I've already checked:&#xD;&#xA;* The grandpa RPC is initialized.&#xD;&#xA;* The nodes have the right keys set.&#xD;&#xA;* fg_primitives::GrandpaApi is implemented in the runtime.&#xD;&#xA;* pallet_grandpa::Config is connected to the right stuff.&#xD;&#xA;What have I missed, and is there anywhere I can check to see why the voting isn't happening?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23888" PostHistoryTypeId="1" PostId="6236" RevisionGUID="e7c30802-4fb3-4490-a8ce-0e5821c1a0e2" CreationDate="2022-12-06T14:41:11.690" UserId="3557" Text="Finality lagging" ContentLicense="CC BY-SA 4.0" />
  <row Id="23889" PostHistoryTypeId="3" PostId="6236" RevisionGUID="e7c30802-4fb3-4490-a8ce-0e5821c1a0e2" CreationDate="2022-12-06T14:41:11.690" UserId="3557" Text="|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23890" PostHistoryTypeId="2" PostId="6237" RevisionGUID="a99a993b-e51a-4d61-b675-a5d6c34cb82a" CreationDate="2022-12-06T15:01:33.483" UserId="539" Text="To answer this question, I think we should present a concrete example.&#xD;&#xA;&#xD;&#xA;Here is the current Polkadot chainspec (I replaced the long blobs with `[...]`). You can obtain this by runnning: `polkadot build-spec --chain polkadot`. Note that this is a raw chainspec, you should always use raw chainspecs for launching your chains (see the [substrate chainspec docs](https://docs.substrate.io/build/chain-spec/)).&#xD;&#xA;&#xD;&#xA;Actually most parts of the chainspec file can be changed but this won't change the parameters of the chain itself. As the chainspec can only define the configuration of the genesis block. To change the parameters of an active chain, you have to perform a [runtime upgrade](https://docs.substrate.io/build/upgrade-the-runtime/).&#xD;&#xA;&#xD;&#xA;Here is from my experience how changing different parts of the chainspec file would impact the node (not the chain !):&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;Polkadot&quot;, // Change the chain name reported in Telemetry&#xD;&#xA;  &quot;id&quot;: &quot;polkadot&quot;, // Change the chain db directory on disk, eg. ~/.local/chains/**polkadot**/db/full &#xD;&#xA;  &quot;chainType&quot;: &quot;Live&quot;, // Switch between Live or Development, generally would only affect whether the node can connect to private IPv4 addresses.&#xD;&#xA;  &quot;bootNodes&quot;: [ // Set the list of bootnodes to connect to on startup&#xD;&#xA;    [...]&#xD;&#xA;  ],&#xD;&#xA;  &quot;telemetryEndpoints&quot;: [ // Set the list of telemetry endpoints to report to&#xD;&#xA;    [&#xD;&#xA;      &quot;/dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F&quot;,&#xD;&#xA;      0&#xD;&#xA;    ]&#xD;&#xA;  ],&#xD;&#xA;  &quot;properties&quot;: { // Set the values of various properties returned by the `system_properties` RPC&#xD;&#xA;    &quot;ss58Format&quot;: 0,&#xD;&#xA;    &quot;tokenDecimals&quot;: 10,&#xD;&#xA;    &quot;tokenSymbol&quot;: &quot;DOT&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;genesis&quot;: { // Cannot be changed or will connect to a different chain !&#xD;&#xA;    &quot;raw&quot;: { &#xD;&#xA;      &quot;top&quot;: {&#xD;&#xA;        [...]&#xD;&#xA;      },&#xD;&#xA;      &quot;childrenDefault&quot;: {}&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23892" PostHistoryTypeId="52" PostId="6229" RevisionGUID="a730d752-b12c-4b45-962d-b5fa7f6c5d26" CreationDate="2022-12-06T15:36:40.603" />
  <row Id="23893" PostHistoryTypeId="2" PostId="6238" RevisionGUID="59a53fb0-8b7f-432b-b683-1d77bdffa1d2" CreationDate="2022-12-06T16:52:15.573" UserId="2344" Text="You should be able to trap the provider and api errors, and then do nothing with them...&#xD;&#xA;```js&#xD;&#xA;const provider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;// events: connected, disconnected, error&#xD;&#xA;provider.on('error', (err) =&gt; {&#xD;&#xA;  // console.error(err)&#xD;&#xA;})&#xD;&#xA;&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;// events: connected, disconnected, error, decorated, ready&#xD;&#xA;api.on('error', (err) =&gt;{&#xD;&#xA;  // console.error(err)&#xD;&#xA;})&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23895" PostHistoryTypeId="5" PostId="6236" RevisionGUID="648a0cf4-e470-47d5-b5e7-55ad761b7c71" CreationDate="2022-12-06T17:49:42.170" UserId="3557" Comment="added 2 characters in body" Text="After about 50 blocks my block production slows down because none of the nodes are voting in the finality rounds. I'm working off a codebase that I added the grandpa pallet to, so it's possible I may have screwed something up in the setup, but I can't figure out what it is. Where should I check to make sure I'm doing everything right? Things I've already checked:&#xD;&#xA;* The grandpa RPC is initialized.&#xD;&#xA;* The nodes have the right keys set.&#xD;&#xA;* fg_primitives::GrandpaApi is implemented in the runtime.&#xD;&#xA;* pallet_grandpa::Config is connected to the right stuff.&#xD;&#xA;&#xD;&#xA;What have I missed, and is there anywhere I can check to see why the voting isn't happening?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23896" PostHistoryTypeId="4" PostId="6114" RevisionGUID="6867028b-efaa-437f-b5e0-7745bc091c63" CreationDate="2022-12-06T18:09:52.130" UserId="28" Comment="edited title" Text="How to benchmark functions with multiple logical paths?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23899" PostHistoryTypeId="2" PostId="6239" RevisionGUID="6f68abf6-a89f-44a1-8f8c-3ef92c535daa" CreationDate="2022-12-06T18:40:20.407" UserId="684" Text="When is it appropriate to use `&lt;Runtime as TaggedTransactionQueue&lt;Block&gt;&gt;::validate_transaction()` to check if a transaction is valid (and reject a transaction if it is invalid) and when is it appropriate to use `frame_system::Config::BaseCallFilter` to check if a transaction is valid (and reject a transaction if it is invalid)?&#xD;&#xA;&#xD;&#xA;It seems as though they both do almost the same thing? Except that `validate_transaction()` returns `ValidateTransaction` (https://paritytech.github.io/substrate/master/sp_runtime/transaction_validity/type.TransactionValidity.html) while `&lt;BaseCallFilter as Contains::&lt;RuntimeCall&gt;&gt;::contains()` returns a boolean.&#xD;&#xA;&#xD;&#xA;Thank you :)&#xD;&#xA;&#xD;&#xA;@shawn-tabrizi :)&#xD;&#xA;&#xD;&#xA;@bkchr :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="23901" PostHistoryTypeId="1" PostId="6239" RevisionGUID="6f68abf6-a89f-44a1-8f8c-3ef92c535daa" CreationDate="2022-12-06T18:40:20.407" UserId="684" Text="`&lt;Runtime as TaggedTransactionQueue&lt;Block&gt;&gt;::validate_transaction()` vs `frame_system::Config::BaseCallFilter` for checking for a valid transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="23902" PostHistoryTypeId="3" PostId="6239" RevisionGUID="6f68abf6-a89f-44a1-8f8c-3ef92c535daa" CreationDate="2022-12-06T18:40:20.407" UserId="684" Text="|runtime|transactions|validation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23903" PostHistoryTypeId="2" PostId="6240" RevisionGUID="75654252-6b14-4e2c-a888-5671d6d3eece" CreationDate="2022-12-06T22:35:29.900" UserId="73" Text="Both are serving different purposes:&#xD;&#xA;&#xD;&#xA;1. `validate_transaction`: This is being used by the transaction pool to validate transactions. This means checking that stuff like the nonce is correct and that the user has funds to pay for the fees. This api is also not required to be called by the node, the node could also just skip calling this.&#xD;&#xA;&#xD;&#xA;2. `BaseCallFilter`: This is being used when applying a transaction. It will filter all calls that are being dispatched and if they are not allowed the dispatch will fail. This is for example useful to prevent executing certain calls in your runtime. &#xD;&#xA;&#xD;&#xA;Both are being used in different parts of your chain and also serve quite different purposes. As the node is not required to call `validate_transaction`, your runtime logic also needs to ensure that there is never a transaction being applied that violates certain assumptions. An assumption could for example be that the chain doesn't allow balance transfers in the early stage of the network. So, `validate_transaction` being an utility function the node side to get certain information about a transaction, but not being a tool for you to ensure that only valid state transitions are happening." ContentLicense="CC BY-SA 4.0" />
  <row Id="23906" PostHistoryTypeId="2" PostId="6241" RevisionGUID="6d34b12b-9907-433f-ab3a-73c0dbc44024" CreationDate="2022-12-07T00:32:06.893" UserId="3130" Text="Regarding the [async backing](https://forum.polkadot.network/t/open-discussion-thread-fall-2022-roadmap-roundup/542), I'm struggling to understand how the reduced relay chain block time (of 6 seconds) affect parachain block times?&#xD;&#xA;&#xD;&#xA;We have vesting schedules based on the parachain block numbers (block time of 12 seconds). Will they be affected at all?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23908" PostHistoryTypeId="1" PostId="6241" RevisionGUID="6d34b12b-9907-433f-ab3a-73c0dbc44024" CreationDate="2022-12-07T00:32:06.893" UserId="3130" Text="How does reduced relay chain block time affect parachain blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23909" PostHistoryTypeId="3" PostId="6241" RevisionGUID="6d34b12b-9907-433f-ab3a-73c0dbc44024" CreationDate="2022-12-07T00:32:06.893" UserId="3130" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23910" PostHistoryTypeId="2" PostId="6242" RevisionGUID="d9aba021-c68d-4caf-92b9-33106929e931" CreationDate="2022-12-07T01:34:01.597" UserId="2909" Text="I do think it will depend very much on how your schedule is designed. There is an existing discussion with possible solutions found on the forum thread on the [Polkadot Roadmap][1]. Found here:&#xD;&#xA;https://forum.polkadot.network/t/open-discussion-thread-fall-2022-roadmap-roundup/542/12&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://forum.polkadot.network/t/open-discussion-thread-fall-2022-roadmap-roundup/542/12" ContentLicense="CC BY-SA 4.0" />
  <row Id="23920" PostHistoryTypeId="2" PostId="6245" RevisionGUID="4e4ce076-dee8-40e3-9c15-294b618e4030" CreationDate="2022-12-07T08:40:49.110" UserId="3559" Text="I followed this tutorial https://docs.substrate.io/tutorials/get-started/build-local-blockchain/. I got the below error when run cargo build --release. How can I fix it?&#xD;&#xA;&#xD;&#xA;`&#xD;&#xA;error occurred: Command &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/*/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/compaction/compaction_job.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction_job.cc&quot; with args &quot;c++&quot; did not execute successfully (status code exit status: 1).&#xD;&#xA;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="23922" PostHistoryTypeId="1" PostId="6245" RevisionGUID="4e4ce076-dee8-40e3-9c15-294b618e4030" CreationDate="2022-12-07T08:40:49.110" UserId="3559" Text="build failed with substrate chain on rocksdb in linux" ContentLicense="CC BY-SA 4.0" />
  <row Id="23923" PostHistoryTypeId="3" PostId="6245" RevisionGUID="4e4ce076-dee8-40e3-9c15-294b618e4030" CreationDate="2022-12-07T08:40:49.110" UserId="3559" Text="|substrate-node-template|rust|blockchain|compilation|rocks-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23924" PostHistoryTypeId="2" PostId="6246" RevisionGUID="c4d850b9-0b14-42f7-a403-9117f7f43a2d" CreationDate="2022-12-07T08:48:29.087" UserId="505" Text="We saw that the Cumulus pallet `xcmp-queue` has a configuration for `ReservedXcmpWeight` https://github.com/paritytech/cumulus/blob/polkadot-v0.9.26/pallets/parachain-system/src/lib.rs#L174-L175&#xD;&#xA;The `xcmp-queue` seems to be processed before any extrinsics in `setValidationData`, so I'm wondering if no weight of this ReservedXcmpWeight is used for actualy xcmp messages, will it flow over to be used for extrinsics execution or does it remain unused?&#xD;&#xA;&#xD;&#xA;Thanks for the attention." ContentLicense="CC BY-SA 4.0" />
  <row Id="23926" PostHistoryTypeId="1" PostId="6246" RevisionGUID="c4d850b9-0b14-42f7-a403-9117f7f43a2d" CreationDate="2022-12-07T08:48:29.087" UserId="505" Text="Does unused weight from `ReservedXcmpWeight ` flow-over to extrinsics execution" ContentLicense="CC BY-SA 4.0" />
  <row Id="23927" PostHistoryTypeId="3" PostId="6246" RevisionGUID="c4d850b9-0b14-42f7-a403-9117f7f43a2d" CreationDate="2022-12-07T08:48:29.087" UserId="505" Text="|weight|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23928" PostHistoryTypeId="2" PostId="6247" RevisionGUID="6c889671-6f43-4571-bfc8-399b3ec64bb1" CreationDate="2022-12-07T08:55:11.613" UserId="3317" Text="I also highly recommend [trappist][1] if you want to play around with XCM. Follow the instructions in the README to setup a playground with [zombienet][2] and try out XCM with the [polkadot JS app][3].&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/trappist&#xD;&#xA;  [2]: https://github.com/paritytech/zombienet&#xD;&#xA;  [3]: https://polkadot.js.org/&#xD;&#xA;  [4]: https://i.stack.imgur.com/Bl5Gq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="23930" PostHistoryTypeId="5" PostId="6134" RevisionGUID="6f34bcb0-968b-4253-bc4e-77edfb60146c" CreationDate="2022-12-07T09:07:55.437" UserId="165" Comment="adding some permalinks" Text="First, the [transaction_payment pallet][1] does this for you with [compute_actual_fee][2] from the [post_dispatch][3] and configuring it in your runtime with the `ChargeTransactionPayment` signed extension via `SignedExtra`, as done in [Kusama][4]. Some additional [info][5].&#xD;&#xA;&#xD;&#xA;Going to your questions.&#xD;&#xA;1) The first thing that needs to be understood is the existence of a [Storage Overlay][6], which caches values which have been read or written to inside of a block. This means, if you read a storage item, the first time, it will need to navigate through the whole merkle trie, and fetch that storage item. But the second time, it just reads from the storage overlay, since that value has been cached by the client ([ref][7]).&#xD;&#xA;&#xD;&#xA;2) Correct, you should benchmark. Regarding your cache concern, the benchmarking tool/framework is smart enough to know that the reads that are cached don't add up the same cost as a read from db ([ref][8]). &#xD;&#xA;&#xD;&#xA;Just in case, for benchmarking in general, check out what [whitelisting][9] is.&#xD;&#xA;&#xD;&#xA;3) Correct again, based on your benchmark results you should do weight annotations based on a worst-case scenario. The `post_dispatch` will handle the difference between the worst-case and actual weight. In the official FRAME docs the weights are generated dynamically with a weight function in the weight.rs file. You could consider this &quot;the best way&quot;.&#xD;&#xA;&#xD;&#xA;Example for answer three: &#xD;&#xA;- extrinsic: [frame/identity/src/lib.rs][10]&#xD;&#xA;- dynamic weight function: [frame/identity/src/weight.rs][11]&#xD;&#xA;&#xD;&#xA;For people who like to watch a in-depth video about benchmarking, watch the [substrate seminar][12] about it!&#xD;&#xA;&#xD;&#xA;For a good [explanation][13] about the importance of weights. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/11c50578549969979121577cde987ad3f9d95bd8/frame/transaction-payment/src/lib.rs#L552&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/11c50578549969979121577cde987ad3f9d95bd8/frame/transaction-payment/src/lib.rs#L820&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/d57049f1e4e5b00309cdd0297235a8de821f601d/runtime/kusama/src/lib.rs#L787&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5859/how-the-transaction-payment-pallet-handles-transaction-fee-of-every-extrinsic&#xD;&#xA;  [6]: https://www.shawntabrizi.com/assets/presentations/substrate-storage-deep-dive.pdf&#xD;&#xA;  [7]: https://substrate.stackexchange.com/questions/2574/clarity-on-storage-read-write-caching&#xD;&#xA;  [8]: https://substrate.stackexchange.com/questions/2493/do-benchmarks-consider-cached-reads&#xD;&#xA;  [9]: https://substrate.stackexchange.com/questions/4207/benchmarking-whitelist/4231#4231&#xD;&#xA;  [10]: https://github.com/paritytech/substrate/blob/357c363f2fbd1ea53687e90d0ca15677c4468b10/frame/identity/src/lib.rs#L288&#xD;&#xA;  [11]: https://github.com/paritytech/substrate/blob/master/frame/identity/src/weights.rs#L73&#xD;&#xA;  [12]: https://www.youtube.com/watch?v=Qa6sTyUqgek&#xD;&#xA;  [13]: https://substrate.stackexchange.com/questions/6174/are-weights-really-neccessary" ContentLicense="CC BY-SA 4.0" />
  <row Id="23931" PostHistoryTypeId="2" PostId="6248" RevisionGUID="673b78f8-99ae-4216-81e3-9fa8b37f5add" CreationDate="2022-12-07T09:20:36.570" UserId="165" Text="As per my understanding `ReservedXcmpWeight` seems to be more of a cap in how much weight one block will be able to be filled by XCMP message execution than anything else.&#xD;&#xA;Meaning that if no messages need to be served/executed for block X, then all that available block space is there to be filled by other executions.&#xD;&#xA;&#xD;&#xA;Notice that there is a similar set up for DMP messages.&#xD;&#xA;&#xD;&#xA;I would recommend reading [`service_xcmp_queue`](https://github.com/paritytech/cumulus/blob/fb3837dcc9732ab8912eff51da9c86001d16206b/pallets/xcmp-queue/src/lib.rs#L796) documentation.." ContentLicense="CC BY-SA 4.0" />
  <row Id="23933" PostHistoryTypeId="5" PostId="6248" RevisionGUID="c63ab5bc-c8a0-4695-9d5c-de197aa6e1ac" CreationDate="2022-12-07T09:26:37.447" UserId="165" Comment="added 150 characters in body" Text="As per my understanding `ReservedXcmpWeight` seems to be more of a cap in how much weight one block will be able to be filled by XCMP message execution than anything else.&#xD;&#xA;Meaning that if no messages need to be served/executed for block X, then all that available block space is there to be filled by other executions.&#xD;&#xA;&#xD;&#xA;Notice that there is a similar set up for DMP messages.&#xD;&#xA;&#xD;&#xA;I would recommend reading [`service_xcmp_queue`](https://github.com/paritytech/cumulus/blob/fb3837dcc9732ab8912eff51da9c86001d16206b/pallets/xcmp-queue/src/lib.rs#L796) documentation for some more insight on, and I quote:&#xD;&#xA;&gt; Service the incoming XCMP message queue attempting to execute up to `max_weight` execution weight of messages" ContentLicense="CC BY-SA 4.0" />
  <row Id="23934" PostHistoryTypeId="50" PostId="5624" RevisionGUID="89408dfc-3a00-470e-ac38-9611f8898793" CreationDate="2022-12-07T12:08:16.047" UserId="-1" />
  <row Id="23935" PostHistoryTypeId="2" PostId="6249" RevisionGUID="18ac23b2-6772-4003-8ee2-2bf36b0b129e" CreationDate="2022-12-07T13:19:20.890" UserId="3562" Text="team.&#xD;&#xA;I'd like to get the $ASTR balance of the specific address.&#xD;&#xA;I found that I can do it by calling `api.query.system.account(address)` with polkadot.js, but I have to write the balance fetcher program in Golang.&#xD;&#xA;&#xD;&#xA;I checked json-rpc specification in the doc https://polkadot.js.org/docs/substrate/rpc,  but didn't find it." ContentLicense="CC BY-SA 4.0" />
  <row Id="23937" PostHistoryTypeId="1" PostId="6249" RevisionGUID="18ac23b2-6772-4003-8ee2-2bf36b0b129e" CreationDate="2022-12-07T13:19:20.890" UserId="3562" Text="How to get ASTR balance via json rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="23938" PostHistoryTypeId="3" PostId="6249" RevisionGUID="18ac23b2-6772-4003-8ee2-2bf36b0b129e" CreationDate="2022-12-07T13:19:20.890" UserId="3562" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23939" PostHistoryTypeId="2" PostId="6250" RevisionGUID="b6960d50-06c1-4753-8bcd-f7e0740764aa" CreationDate="2022-12-07T13:20:02.297" UserId="251" Text="Imagine there is an unsigned extrinsic call.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;fn call(something) -&gt; DispatchResult {&#xD;&#xA;    ensure_none()?;&#xD;&#xA;&#xD;&#xA;    // verify(something)?;&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We already do the verification in the transaction pool.&#xD;&#xA;&#xD;&#xA;To my understanding, we should if any validator/collator modifies their node to remove the unsigned validation part. Then he could skip that.&#xD;&#xA;&#xD;&#xA;1. Should we?&#xD;&#xA;2. Why? How will the extrinsic be executed and broadcast in the network in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23941" PostHistoryTypeId="1" PostId="6250" RevisionGUID="b6960d50-06c1-4753-8bcd-f7e0740764aa" CreationDate="2022-12-07T13:20:02.297" UserId="251" Text="Should we re-do the verification?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23942" PostHistoryTypeId="3" PostId="6250" RevisionGUID="b6960d50-06c1-4753-8bcd-f7e0740764aa" CreationDate="2022-12-07T13:20:02.297" UserId="251" Text="|security|unsigned|transaction-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23943" PostHistoryTypeId="2" PostId="6251" RevisionGUID="3670a3fe-8e8b-4828-a149-3c575fa6fbad" CreationDate="2022-12-07T13:31:53.690" UserId="73" Text="Yes, you need to do the same checks while applying the unsigned extrinsic as in `validate_block`.&#xD;&#xA;&#xD;&#xA;As you need to implement [`ValidateUnsigned`][1] for your pallet, it will already do the verification while applying the unsigned extrinsic. This assumes that you don't change the default implementation of `pre_dispatch`. If you implement the method on your own, you need to ensure that `pre_dispatch` and `validate_unsigned` are doing exactly the same checks! I mean they can do different kind of checks, but validity should be checked in both implementations in the same way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/62a85fb07335b957ebb98434fdbd45232b732d85/primitives/runtime/src/traits.rs#L1343-L1370" ContentLicense="CC BY-SA 4.0" />
  <row Id="23945" PostHistoryTypeId="5" PostId="6250" RevisionGUID="459df16b-3519-44c0-98a8-62af14371a96" CreationDate="2022-12-07T13:41:13.873" UserId="251" Comment="added 5 characters in body" Text="Imagine there is an unsigned extrinsic call.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;fn call(something) -&gt; DispatchResult {&#xD;&#xA;    ensure_none()?;&#xD;&#xA;&#xD;&#xA;    // verify(something)?;&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We already do the verification in the transaction pool.&#xD;&#xA;&#xD;&#xA;To my understanding, we should. &#xD;&#xA;&#xD;&#xA;If any validator/collator modifies their node to remove the unsigned validation part. Then he could skip that.&#xD;&#xA;&#xD;&#xA;1. Should we?&#xD;&#xA;2. Why? How will the extrinsic be executed and broadcast in the network in this case?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I found the Polkadot did the first verification here https://github.com/paritytech/polkadot/blob/d57049f1e4e5b00309cdd0297235a8de821f601d/runtime/common/src/claims.rs#L475.&#xD;&#xA;&#xD;&#xA;And second here https://github.com/paritytech/polkadot/blob/d57049f1e4e5b00309cdd0297235a8de821f601d/runtime/common/src/claims.rs#L317.&#xD;&#xA;&#xD;&#xA;Why the second one is necessary?&#xD;&#xA;&#xD;&#xA;If we remove the second one. What would happen? How does the attacker make a successful attack in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23946" PostHistoryTypeId="5" PostId="6251" RevisionGUID="82a79e1e-3ba7-40b1-af2a-a98c4cbb4af2" CreationDate="2022-12-07T13:52:36.050" UserId="73" Comment="added 837 characters in body" Text="Yes, you need to do the same checks while applying the unsigned extrinsic as in `validate_block`.&#xD;&#xA;&#xD;&#xA;As you need to implement [`ValidateUnsigned`][1] for your pallet, it will already do the verification while applying the unsigned extrinsic. This assumes that you don't change the default implementation of `pre_dispatch`. If you implement the method on your own, you need to ensure that `pre_dispatch` and `validate_unsigned` are doing exactly the same checks! I mean they can do different kind of checks, but validity should be checked in both implementations in the same way.&#xD;&#xA;&#xD;&#xA;&gt; Why the second one is necessary?&#xD;&#xA;&#xD;&#xA;In the example you gave above the signer is extracted in `validate_unsigned` to check that it exists in `Claims`. This is done to prevent spam. As unsigned transaction are not paying any fees, you want to ensure that no one is spamming you with these transactions. So, your `validate_unsigned` logic should contain some code to reject these transactions early aka before they can enter the pool. However, as always in the context of `validate_transaction` (the context in that we call `validate_unsigned`) you should ensure that your checks are lightweight as otherwise you may make these checks a dos vector to your network. &#xD;&#xA;&#xD;&#xA;Another point on why we need to call `eth_recover` in the implementation of the call again is that we can not pass data from `pre_dispatch` to the actual call dispatch.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/62a85fb07335b957ebb98434fdbd45232b732d85/primitives/runtime/src/traits.rs#L1343-L1370" ContentLicense="CC BY-SA 4.0" />
  <row Id="23947" PostHistoryTypeId="2" PostId="6252" RevisionGUID="b02cba4b-3a3e-488a-a41e-a52b551e540b" CreationDate="2022-12-07T13:53:42.243" UserId="3317" Text="Does the `SignedExtension` (`validate`) get executed on a nested call (e.g. sudo.call, scheduler.schedule)? In other words, the call within the call." ContentLicense="CC BY-SA 4.0" />
  <row Id="23949" PostHistoryTypeId="1" PostId="6252" RevisionGUID="b02cba4b-3a3e-488a-a41e-a52b551e540b" CreationDate="2022-12-07T13:53:42.243" UserId="3317" Text="SignedExtension and nested calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="23950" PostHistoryTypeId="3" PostId="6252" RevisionGUID="b02cba4b-3a3e-488a-a41e-a52b551e540b" CreationDate="2022-12-07T13:53:42.243" UserId="3317" Text="|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23951" PostHistoryTypeId="2" PostId="6253" RevisionGUID="1eeabc66-cde4-4b7c-be02-d58593a3b8d8" CreationDate="2022-12-07T14:01:51.870" UserId="73" Text="No, the `SignedExtension::validate` will not be called for nested calls. If you want to filter certain calls, you can use `BaseCallFilter` in your runtime. This filter is checked before each dispatch of a call. However, there are also exceptions to this as pallets like `sudo` dispatch without checking any filters." ContentLicense="CC BY-SA 4.0" />
  <row Id="23953" PostHistoryTypeId="6" PostId="6252" RevisionGUID="2b55cc3b-6048-4a02-b016-3f3b00f43a9e" CreationDate="2022-12-07T14:03:28.257" UserId="73" Comment="edited tags" Text="|runtime|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23954" PostHistoryTypeId="5" PostId="6250" RevisionGUID="69ec5abc-a864-4743-bcca-ef7d3d055151" CreationDate="2022-12-07T14:14:41.787" UserId="251" Comment="added 232 characters in body; edited title" Text="Imagine there is an unsigned extrinsic call.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;fn call(something, ..) -&gt; DispatchResult {&#xD;&#xA;    ensure_none()?;&#xD;&#xA;&#xD;&#xA;    // verify(something)?;&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::validate_unsigned]&#xD;&#xA;impl .. {&#xD;&#xA;    fn validate_unsigned(call, ..) {&#xD;&#xA;        match call {&#xD;&#xA;            call(something) =&gt; verify(something),&#xD;&#xA;            _ =&gt; return Err&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        return Ok&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We already do the verification in the `validate_unsigned`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. Should we?&#xD;&#xA;  To my understanding, we should. &#xD;&#xA;  If any validator/collator modifies their node to remove the `validate_unsigned` part. Then he could skip that.&#xD;&#xA;2. Why? How will the extrinsic be executed and broadcast in the network in this case?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I found the Polkadot did the first verification here https://github.com/paritytech/polkadot/blob/d57049f1e4e5b00309cdd0297235a8de821f601d/runtime/common/src/claims.rs#L475.&#xD;&#xA;&#xD;&#xA;And second here https://github.com/paritytech/polkadot/blob/d57049f1e4e5b00309cdd0297235a8de821f601d/runtime/common/src/claims.rs#L317.&#xD;&#xA;&#xD;&#xA;Why the second one is necessary?&#xD;&#xA;&#xD;&#xA;If we remove the second one. What would happen? How does the attacker make a successful attack in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23955" PostHistoryTypeId="4" PostId="6250" RevisionGUID="69ec5abc-a864-4743-bcca-ef7d3d055151" CreationDate="2022-12-07T14:14:41.787" UserId="251" Comment="added 232 characters in body; edited title" Text="Should we re-do the verification in runtime call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23956" PostHistoryTypeId="5" PostId="6250" RevisionGUID="4fc1506c-0d56-4d8c-81bd-f58975382fe0" CreationDate="2022-12-07T14:30:57.717" UserId="251" Comment="added 4 characters in body" Text="Imagine there is an unsigned extrinsic call.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;fn call(something, ..) -&gt; DispatchResult {&#xD;&#xA;    ensure_none()?;&#xD;&#xA;&#xD;&#xA;    // verify(something)?;&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::validate_unsigned]&#xD;&#xA;impl .. {&#xD;&#xA;    fn validate_unsigned(call, ..) {&#xD;&#xA;        match call {&#xD;&#xA;            call(something, ..) =&gt; verify(something),&#xD;&#xA;            _ =&gt; return Err&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        return Ok&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We already do the verification in the `validate_unsigned`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. Should we?&#xD;&#xA;  To my understanding, we should. &#xD;&#xA;  If any validator/collator modifies their node to remove the `validate_unsigned` part. Then he could skip that.&#xD;&#xA;2. Why? How will the extrinsic be executed and broadcast in the network in this case?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I found the Polkadot did the first verification here https://github.com/paritytech/polkadot/blob/d57049f1e4e5b00309cdd0297235a8de821f601d/runtime/common/src/claims.rs#L475.&#xD;&#xA;&#xD;&#xA;And second here https://github.com/paritytech/polkadot/blob/d57049f1e4e5b00309cdd0297235a8de821f601d/runtime/common/src/claims.rs#L317.&#xD;&#xA;&#xD;&#xA;Why the second one is necessary?&#xD;&#xA;&#xD;&#xA;If we remove the second one. What would happen? How does the attacker make a successful attack in this case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23957" PostHistoryTypeId="2" PostId="6254" RevisionGUID="9f18c6d9-a65d-4394-8904-b380c094fa70" CreationDate="2022-12-07T16:09:52.987" UserId="3317" Text="The reason why you need the same logic for checking the validity in both is that a node is not required to call [validate_transaction][1]. This function (which is called [here][2]) is only an optimization for the node to reject transactions early and to clean up the tx pool. The runtime itself needs to ensure that when a transaction is applied to the state, that the transaction is valid. This means that the signature is correct, that the nonce = current_nonce + 1 etc. All these checks are there to ensure that transactions are valid and the runtime can only trust &quot;itself&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/executive/src/lib.rs#L538-L570&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/bin/node/runtime/src/lib.rs#L1839-L1847" ContentLicense="CC BY-SA 4.0" />
  <row Id="23959" PostHistoryTypeId="2" PostId="6255" RevisionGUID="2c0a89dd-6e64-4756-909d-86ff2dfd0500" CreationDate="2022-12-07T16:20:23.603" UserId="2163" Text="This wouldn't be a problem if the CPU-intensive code would be placed inside an extrinsic since we could benchmark it and get the accurate weight for the code.&#xD;&#xA;&#xD;&#xA;But the problem is that we cannot benchmark a hook inside a pallet(e.g. We cannot benchmark the `on_initialize` hook AFAIU).&#xD;&#xA;&#xD;&#xA;If the code inside the hook is intensive because of reads/writes from the runtime we can use the `T::DbWeight::get().reads_writes(reads, writes)` function which calculates the weight it takes for the specified number of reads&amp;writes.&#xD;&#xA;&#xD;&#xA;But what can I do if the code is actually CPU-heavy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23961" PostHistoryTypeId="1" PostId="6255" RevisionGUID="2c0a89dd-6e64-4756-909d-86ff2dfd0500" CreationDate="2022-12-07T16:20:23.603" UserId="2163" Text="Calculating weight for CPU intensive hooks" ContentLicense="CC BY-SA 4.0" />
  <row Id="23962" PostHistoryTypeId="3" PostId="6255" RevisionGUID="2c0a89dd-6e64-4756-909d-86ff2dfd0500" CreationDate="2022-12-07T16:20:23.603" UserId="2163" Text="|weight|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23963" PostHistoryTypeId="2" PostId="6256" RevisionGUID="d7be34be-469a-446b-8ef3-f91a026edeff" CreationDate="2022-12-07T17:14:24.963" UserId="251" Text="Basically, it is:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;http.post/ws.send(payload)&#xD;&#xA;&#xD;&#xA;payload = json {&#xD;&#xA;  &quot;id&quot;: 0,&#xD;&#xA;  &quot;method&quot;: &quot;state_getStorage&quot;,&#xD;&#xA;  &quot;params&quot;: [key, at] // at is an optional param, the block hash, if you don't provide this, it will fetch the latest block's state&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;key = twox128(b&quot;System&quot;) + tweox128(b&quot;Account&quot;) + blake2_128_concat(account_id)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And you just need to implement this http/ws request in Golang.&#xD;&#xA;&#xD;&#xA;For more detail check https://github.com/paritytech/substrate/blob/be259234bfee056bef970ac372e04a74411c5224/client/rpc-api/src/state/mod.rs#L33-L288." ContentLicense="CC BY-SA 4.0" />
  <row Id="23965" PostHistoryTypeId="5" PostId="6245" RevisionGUID="8fa60c26-45e7-4c48-b7b3-57d8bc291446" CreationDate="2022-12-07T17:19:24.057" UserId="251" Comment="added 4 characters in body" Text="I followed this tutorial https://docs.substrate.io/tutorials/get-started/build-local-blockchain/. I got the below error when run cargo build --release. How can I fix it?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error occurred: Command &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/*/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/compaction/compaction_job.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction_job.cc&quot; with args &quot;c++&quot; did not execute successfully (status code exit status: 1).&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23966" PostHistoryTypeId="2" PostId="6257" RevisionGUID="d6189fea-a2f2-43d2-b2ae-ac1f521ad72e" CreationDate="2022-12-07T18:19:22.930" UserId="179" Text="So far the team was aiming for doing something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let batch_tx = subxt::dynamic::tx(&#xD;&#xA;	&quot;Utility&quot;,&#xD;&#xA;	&quot;batch&quot;,&#xD;&#xA;	txes.iter().map(|tx| tx.into_value()).collect::&lt;Vec&lt;Value&lt;_&gt;&gt;&gt;(),&#xD;&#xA;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23968" PostHistoryTypeId="1" PostId="6257" RevisionGUID="d6189fea-a2f2-43d2-b2ae-ac1f521ad72e" CreationDate="2022-12-07T18:19:22.930" UserId="179" Text="How to use subxt to execute a utility.batch call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23969" PostHistoryTypeId="3" PostId="6257" RevisionGUID="d6189fea-a2f2-43d2-b2ae-ac1f521ad72e" CreationDate="2022-12-07T18:19:22.930" UserId="179" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23973" PostHistoryTypeId="2" PostId="6259" RevisionGUID="8621da9f-4686-4638-be88-8b554e3cc144" CreationDate="2022-12-07T19:04:42.597" UserId="3171" Text="IERC20 interface contains methods with uint256 datatype.&#xD;&#xA;If you try to call ink! wasm contract from Solidity (compiled by solang to target subtrate) you will have an issue.&#xD;&#xA;&#xD;&#xA;    interface IERC20{&#xD;&#xA;        function balanceOf(address account) public view virtual override returns (uint256) {&#xD;&#xA;            return _balances[account];&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;How to return `u256` data type from rust ink! smart contract to support compatibility with IERC20?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23975" PostHistoryTypeId="1" PostId="6259" RevisionGUID="8621da9f-4686-4638-be88-8b554e3cc144" CreationDate="2022-12-07T19:04:42.597" UserId="3171" Text="How to return uint256 datatype from ink! wasm contract? How to make compatibility with IERC20?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23976" PostHistoryTypeId="3" PostId="6259" RevisionGUID="8621da9f-4686-4638-be88-8b554e3cc144" CreationDate="2022-12-07T19:04:42.597" UserId="3171" Text="|ink|wasm|pallet-contracts|solidity|solang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23977" PostHistoryTypeId="2" PostId="6260" RevisionGUID="43e38d75-4319-4de6-8c28-9f1d12041495" CreationDate="2022-12-07T19:04:42.597" UserId="3171" Text="The best way is to use ethnum crate: https://crates.io/crates/ethnum&#xD;&#xA;&#xD;&#xA;Code example:&#xD;&#xA;&#xD;&#xA;    #[ink(message]&#xD;&#xA;    pub fn balance(&amp;self, account : AccountId) -&gt; [u128; 2] {&#xD;&#xA;       let balance_u128 : u128 = self.balance_of(account);&#xD;&#xA;       use ethnum::U256;&#xD;&#xA;       let balance_u256: U256 = U256::try_from(b).unwrap();&#xD;&#xA;       balance_u256.0&#xD;&#xA;    }&#xD;&#xA;It works fine while you will call this contract method from Solidity wasm contract(compiled by solang to substrate target)" ContentLicense="CC BY-SA 4.0" />
  <row Id="23979" PostHistoryTypeId="2" PostId="6261" RevisionGUID="4b1069d1-120d-4916-9d7f-a8259b741168" CreationDate="2022-12-07T19:49:48.390" UserId="29" Text="Something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let tx = polkadot::tx()&#xD;&#xA;         .utility()&#xD;&#xA;         .batch(calls);&#xD;&#xA;&#xD;&#xA;let hash = api.tx().sign_and_submit_default(&amp;tx, &amp;signer).await?;&#xD;&#xA;&#xD;&#xA;println!(&quot;Extrinsic submitted: {}&quot;, hash);&#xD;&#xA;&#xD;&#xA;Ok(())&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="23981" PostHistoryTypeId="5" PostId="6261" RevisionGUID="7f697fd3-134b-4278-aaf2-ba0b6d296604" CreationDate="2022-12-07T20:41:45.533" UserId="29" Comment="added 37 characters in body" Text="Something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let tx = polkadot::tx()&#xD;&#xA;         .utility()&#xD;&#xA;         .batch(calls);&#xD;&#xA;&#xD;&#xA;let hash = api.tx().sign_and_submit_default(&amp;tx, &amp;signer).await?;&#xD;&#xA;&#xD;&#xA;println!(&quot;Extrinsic submitted: {}&quot;, hash);&#xD;&#xA;&#xD;&#xA;Ok(())&#xD;&#xA;```&#xD;&#xA;where `calls` is a `vec!` of calls." ContentLicense="CC BY-SA 4.0" />
  <row Id="23982" PostHistoryTypeId="2" PostId="6262" RevisionGUID="c2e2dc6c-fbb2-486c-8667-f08a3dcf9d5e" CreationDate="2022-12-07T21:07:03.100" UserId="167" Text="The given answer does not work and can easily be circumvented with proxy, multi-sig, batch, or any other type of call wrapping. &#xD;&#xA;&#xD;&#xA;The better way to do this would be to set `MaxValidatorCount` to 0. Then no one can call the `validate` transaction.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="23984" PostHistoryTypeId="52" PostId="6250" RevisionGUID="be8811d8-4b3a-417d-9f64-4f106ec5ec22" CreationDate="2022-12-07T21:28:28.197" />
  <row Id="23986" PostHistoryTypeId="2" PostId="6263" RevisionGUID="9c999f64-a75d-4f66-8a22-b8d3f1f87235" CreationDate="2022-12-07T23:00:18.313" UserId="74" Text="Is it possible to make batched storage calls to the runtime using `subxt` or is it only possible to make repeated individual calls against the state?&#xD;&#xA;&#xD;&#xA;Say there are 3 storage variables I would like to query using `subxt`. I can do each of these individually:&#xD;&#xA;```&#xD;&#xA;let storage_addresses = vec![alice, bob, charlie]&#xD;&#xA;    .iter()&#xD;&#xA;    .map(|dest| subxt::dynamic::storage(&#xD;&#xA;        &quot;System&quot;,&#xD;&#xA;        &quot;Account&quot;,&#xD;&#xA;        vec![&#xD;&#xA;            // Something that encodes to an AccountId32 is what we need for the map key here:&#xD;&#xA;            Value::from_bytes(&amp;dest),&#xD;&#xA;        ],&#xD;&#xA;    )&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;let accounts = storage_addresses.iter().map(|a|&#xD;&#xA;    api.storage()&#xD;&#xA;        .fetch_or_default(&amp;a, None)&#xD;&#xA;        .await?&#xD;&#xA;        .to_value()?&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm curious if there is a smarter way to batch all these calls at once?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23988" PostHistoryTypeId="1" PostId="6263" RevisionGUID="9c999f64-a75d-4f66-8a22-b8d3f1f87235" CreationDate="2022-12-07T23:00:18.313" UserId="74" Text="What is the smartest way to make multiple dynamic storage queries using subxt?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23989" PostHistoryTypeId="3" PostId="6263" RevisionGUID="9c999f64-a75d-4f66-8a22-b8d3f1f87235" CreationDate="2022-12-07T23:00:18.313" UserId="74" Text="|rust|api|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23990" PostHistoryTypeId="2" PostId="6264" RevisionGUID="9ef1ef6e-3e53-4bbf-9167-d1c86afa7209" CreationDate="2022-12-08T04:32:24.287" UserId="546" Text="I need to verify the ink smart contract code with deployed contract. Just like solidity verification.&#xD;&#xA;&#xD;&#xA;Anyone can give me a clue how to do so and any existing tool?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23992" PostHistoryTypeId="1" PostId="6264" RevisionGUID="9ef1ef6e-3e53-4bbf-9167-d1c86afa7209" CreationDate="2022-12-08T04:32:24.287" UserId="546" Text="Is there any way to verify ink smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="23993" PostHistoryTypeId="3" PostId="6264" RevisionGUID="9ef1ef6e-3e53-4bbf-9167-d1c86afa7209" CreationDate="2022-12-08T04:32:24.287" UserId="546" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23994" PostHistoryTypeId="2" PostId="6265" RevisionGUID="a5afa8c7-ad84-4776-9c4a-c16bd9c35252" CreationDate="2022-12-08T04:37:29.863" UserId="1947" Text="For standalone nodes we can revert chain using badBlocks on chainspec or by exporting the desired blocks and restarting network by reimporting them. But in case of parachains each block header is incuded in relay block as well so not sure if above methods will work. Wondering if there is a safe way to revert parachain to previous block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23996" PostHistoryTypeId="1" PostId="6265" RevisionGUID="a5afa8c7-ad84-4776-9c4a-c16bd9c35252" CreationDate="2022-12-08T04:37:29.863" UserId="1947" Text="Is it possible to revert a para chain to previous block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="23997" PostHistoryTypeId="3" PostId="6265" RevisionGUID="a5afa8c7-ad84-4776-9c4a-c16bd9c35252" CreationDate="2022-12-08T04:37:29.863" UserId="1947" Text="|parachain|substrate-parachain-template|recovery|" ContentLicense="CC BY-SA 4.0" />
  <row Id="23998" PostHistoryTypeId="52" PostId="6259" RevisionGUID="fa80eecf-a784-4b30-a49b-3208fda3d77f" CreationDate="2022-12-08T05:14:13.307" />
  <row Id="23999" PostHistoryTypeId="2" PostId="6266" RevisionGUID="4efcb9cd-a9b2-4d34-bf1c-664c3bd246bb" CreationDate="2022-12-08T07:28:08.657" UserId="3175" Text="Currently, it's not yet possible. It will be available the moment ink!4.0 is released. Astar is talking with Subscan to make this available when the latest version is ready. &#xD;&#xA;&#xD;&#xA;To give you a more clear idea about how it will work, we have a spec sheet that can help you: https://astarnetwork.notion.site/WASM-ink-smart-contract-verification-061c662fb9854ffe954b6946449c0447" ContentLicense="CC BY-SA 4.0" />
  <row Id="24001" PostHistoryTypeId="2" PostId="6267" RevisionGUID="4c7c4cf4-1727-42a5-bc73-0da30b4d17d9" CreationDate="2022-12-08T08:34:57.063" UserId="94" Text="There is nothing stopping you from benchmarking the `on_initialize` hook.  &#xD;&#xA;The manual Read/Write stuff is just an approximation, so benchmarking it is better,  &#xD;&#xA;Since its a `Hook` and not a `Call`, you need to use the syntax for arbitrary code execution:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;on_initialize {&#xD;&#xA;	// Setup code&#xD;&#xA;}: {&#xD;&#xA;	Pallet::&lt;T&gt;::on_initialize(worst_block_number);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see this being done in the [`Lottery`](https://github.com/paritytech/substrate/blob/a47f200eebeb88a5bde6f1ed2be9728b82536dde/frame/lottery/src/benchmarking.rs#L160) pallet. The generated weight functions are then used [here](https://github.com/paritytech/substrate/blob/a47f200eebeb88a5bde6f1ed2be9728b82536dde/frame/lottery/src/lib.rs#L270)." ContentLicense="CC BY-SA 4.0" />
  <row Id="24003" PostHistoryTypeId="2" PostId="6268" RevisionGUID="9beb8b39-8386-4312-9e1b-074c148f9ba5" CreationDate="2022-12-08T09:12:57.060" UserId="3252" Text="Problem: The handling fee deducted from my account is &quot;fee&quot;: &quot;2906481685620092&quot;,but the &quot;fee_used&quot;: is &quot;3626624538723810&quot;, Which one should I believe, fee or fee_used? What is the fee_used meaning? How to get it?&#xD;&#xA;==&gt;&#xD;&#xA;link: https://astar.subscan.io/extrinsic/0x09754fd0064edf2228a3cc5e0a71db05674b1bba85570031bd823e813beb6cd6&#xD;&#xA;Chain: ASTAR&#xD;&#xA;Block Hash: 0xce29231bc5ca9b6ccdd464b6792ddd66bffd802237ffc21b858938ddd64f62a5&#xD;&#xA;Block Number: 2444067&#xD;&#xA;Hash: 0x09754fd0064edf2228a3cc5e0a71db05674b1bba85570031bd823e813beb6cd6&#xD;&#xA;&quot;fee&quot;: &quot;2906481685620092&quot;,&#xD;&#xA;&quot;fee_used&quot;: &quot;3626624538723810&quot;," ContentLicense="CC BY-SA 4.0" />
  <row Id="24005" PostHistoryTypeId="1" PostId="6268" RevisionGUID="9beb8b39-8386-4312-9e1b-074c148f9ba5" CreationDate="2022-12-08T09:12:57.060" UserId="3252" Text="What is the fee_used meaning? How to get it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24006" PostHistoryTypeId="3" PostId="6268" RevisionGUID="9beb8b39-8386-4312-9e1b-074c148f9ba5" CreationDate="2022-12-08T09:12:57.060" UserId="3252" Text="|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24007" PostHistoryTypeId="5" PostId="6268" RevisionGUID="5474c3d4-796e-484c-b430-ce3596f10d1a" CreationDate="2022-12-08T09:52:00.330" UserId="251" Comment="added 9 characters in body" Text="Problem: The handling fee deducted from my account is `&quot;fee&quot;: &quot;2906481685620092&quot;`,but the `fee_used` is `&quot;fee_used&quot;: &quot;3626624538723810&quot;`, Which one should I believe, `fee` or `fee_used`? What is the `fee_used` meaning? How to get it?&#xD;&#xA;&#xD;&#xA;link: https://astar.subscan.io/extrinsic/0x09754fd0064edf2228a3cc5e0a71db05674b1bba85570031bd823e813beb6cd6&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Chain: ASTAR&#xD;&#xA;Block Hash: 0xce29231bc5ca9b6ccdd464b6792ddd66bffd802237ffc21b858938ddd64f62a5&#xD;&#xA;Block Number: 2444067&#xD;&#xA;Hash: 0x09754fd0064edf2228a3cc5e0a71db05674b1bba85570031bd823e813beb6cd6&#xD;&#xA;&quot;fee&quot;: &quot;2906481685620092&quot;,&#xD;&#xA;&quot;fee_used&quot;: &quot;3626624538723810&quot;,&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24008" PostHistoryTypeId="50" PostId="5748" RevisionGUID="403f83f9-9336-4d19-8db8-48984986c0a3" CreationDate="2022-12-08T10:04:10.477" UserId="-1" />
  <row Id="24009" PostHistoryTypeId="2" PostId="6269" RevisionGUID="611b7668-ab3e-47e1-b554-4adaf1f2676c" CreationDate="2022-12-08T11:27:09.773" UserId="393" Text="If blocks between current block and your revert target block are all pending, you can do it.&#xD;&#xA;&#xD;&#xA;But if not, I think there's no way to achieve that." ContentLicense="CC BY-SA 4.0" />
  <row Id="24011" PostHistoryTypeId="2" PostId="6270" RevisionGUID="d3f03bde-395c-4cc1-9503-2e444171677c" CreationDate="2022-12-08T11:39:03.880" UserId="393" Text="1. Names, which are shown in the rpc.methods, are not related to chain name. So, you change your chain name won't affect those names. These names will only be affected by the annotations on the rpc method. e.g. The following rpc method name is `did_getMetadata`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[method(name = &quot;did_getMetadata&quot;)]&#xD;&#xA;    fn get_metadata(&amp;self, did: DecentralizedId, key: String) -&gt; RpcResult&lt;String&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. RpcResult&lt;(Vec&lt;ProposalState&lt;AccountId&gt;&gt;, u32)&gt; is great. And, if you want to return a struct in RpcResult, you should check if it requires more annotations on that struct. Instead of struct, I suggest to use pure primitive tupple.&#xD;&#xA;&#xD;&#xA;Finally, try use state-call instead of custom rpc, because every time you need to create/modify a rpc api, you'll need to re-deploy the node binary. If you use state-call, its pure wasm runtime, so if some changes are needed, then you just need to upgrade the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="24013" PostHistoryTypeId="2" PostId="6271" RevisionGUID="0a17dffe-76d1-4792-9b7e-81343f6621e8" CreationDate="2022-12-08T14:21:22.433" UserId="73" Text="No, there is no way to revert a parachain block that was accepted by the relay chain. I mean you can revert the block locally in your database, but that will not revert anything in the relay chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="24015" PostHistoryTypeId="2" PostId="6272" RevisionGUID="ffbbee96-a0a2-4d38-ad7c-7ae5d11a2461" CreationDate="2022-12-08T14:41:40.710" UserId="1793" Text="Once we updated to version 0.9.31 and run try-runtime feature&#xD;&#xA;&#xD;&#xA;    cargo run --release --features=try-runtime,mangata-rococo try-runtime --chain=public-testnet --execution=Native on-runtime-upgrade live --uri wss://roccoco-testnet-collator-01.mangatafinance.cloud:443&#xD;&#xA;&#xD;&#xA;we receive errors regarding weights&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Can you someone point me where maybe is the problem ? Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/pjYQm.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="24017" PostHistoryTypeId="1" PostId="6272" RevisionGUID="ffbbee96-a0a2-4d38-ad7c-7ae5d11a2461" CreationDate="2022-12-08T14:41:40.710" UserId="1793" Text="failed to execute TryRuntime_on_runtime_upgrade: Runtime panicked (Update to 0.9.31 version)" ContentLicense="CC BY-SA 4.0" />
  <row Id="24018" PostHistoryTypeId="3" PostId="6272" RevisionGUID="ffbbee96-a0a2-4d38-ad7c-7ae5d11a2461" CreationDate="2022-12-08T14:41:40.710" UserId="1793" Text="|weight|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24019" PostHistoryTypeId="2" PostId="6273" RevisionGUID="5d4e931e-3050-4b9a-ab36-fc5156fc4b1b" CreationDate="2022-12-08T14:57:58.233" UserId="94" Text="Probably the same issue as over here https://substrate.stackexchange.com/questions/5557/construct-runtime-integrity-test-failing.  &#xD;&#xA;You need to set some Proof size into your block limits." ContentLicense="CC BY-SA 4.0" />
  <row Id="24028" PostHistoryTypeId="2" PostId="6275" RevisionGUID="2168daea-3f0e-4e97-99c3-6a10ddb503f4" CreationDate="2022-12-08T19:26:53.857" UserId="3571" Text="I have a local rococo relay chain and my own parachain. &#xD;&#xA;For ```AssetTransactor``` type of ```xcm_executor``` I use my own implementation of ```TransactAsset``` trait.&#xD;&#xA;&#xD;&#xA;When I send tokens from relaychain to parachain from ```Bob``` account to ```Alice``` using reserveTransfer on relaychain. On parachain side the ```deposit_asset``` method of ```TransactAsset``` trait implementation is called and it works well. It looks like I need a Origin Multilocation of a tokens sender(```Bob```) in my custom implementation - but there is no such argument in this function, only the Multilocation of tokens reciever(```Alice```).&#xD;&#xA;&#xD;&#xA;Is there any way to send tokens with the sender address not erased? For example, ```TransactAsset``` trait has a ```transfer_asset``` method that takes the sender Multilocation - can it be used to send tokens in this case - and what XCM message should be used if it possible?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24030" PostHistoryTypeId="1" PostId="6275" RevisionGUID="2168daea-3f0e-4e97-99c3-6a10ddb503f4" CreationDate="2022-12-08T19:26:53.857" UserId="3571" Text="Get sender accountid when transfering assets from relaychain to parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="24031" PostHistoryTypeId="3" PostId="6275" RevisionGUID="2168daea-3f0e-4e97-99c3-6a10ddb503f4" CreationDate="2022-12-08T19:26:53.857" UserId="3571" Text="|parachain|xcm|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24041" PostHistoryTypeId="2" PostId="6278" RevisionGUID="25b13962-ab51-47eb-adfb-1101948d341e" CreationDate="2022-12-08T23:32:26.763" UserId="298" Text="I am trying to send funds from parachain B (1001) to parachain A, but the [substrate docs][1] do not show completely how to send to transfer to parachain A (1000) (or it could at least be clearer).&#xD;&#xA;&#xD;&#xA;In my case parachain b is (2113) and parachain A is (2000).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, at `DepositAsset instruction` section 5. it says:&#xD;&#xA;&#xD;&#xA;_Specify the beneficiary to receive the deposited assets._&#xD;&#xA;&#xD;&#xA;_You can deposit the assets remaining into the sovereign account for parachain A or into a specific account. For this tutorial, the assets are deposited using a specified account address for the previously unfunded account KRIS-PUBS._&#xD;&#xA;&#xD;&#xA;It doesn't explicitly show how to send to Parachain A, either sovereign account or a target account within Parachain A.&#xD;&#xA;&#xD;&#xA;1) How do you send to a sovereign account in Parachain A?&#xD;&#xA;2) How do you send to specific account in Parachain A?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For easy replication here is the encoded call data from the docs: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0xc1028400da8255623a48e0cff4c515aa835ad22f0f4f4390945e7308f830d09e7ad79e74012a384fe857f14f13bf557a09ed42e4d05b2dad593239b430ae0b0c43a04e5374b5416baf52d182b43dfddd71428d0efd078ba8c3f760194e839b8436ce661781f400500004001f00010100020c000400000000070010a5d4e813000000000700e8764817000d01000400010100c0997c4f2b3a83eb07ef74a867cf672a25a2a30cc61abc936dcc994df77ba84a&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please also provide the encoded call data in the docs (or responses) if you can, so the call can be replicated quickly. &#xD;&#xA;&#xD;&#xA;Thanks for your support. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/transfer-assets-with-xcm/" ContentLicense="CC BY-SA 4.0" />
  <row Id="24043" PostHistoryTypeId="1" PostId="6278" RevisionGUID="25b13962-ab51-47eb-adfb-1101948d341e" CreationDate="2022-12-08T23:32:26.763" UserId="298" Text="Clarification needed in substrate xcm docs" ContentLicense="CC BY-SA 4.0" />
  <row Id="24044" PostHistoryTypeId="3" PostId="6278" RevisionGUID="25b13962-ab51-47eb-adfb-1101948d341e" CreationDate="2022-12-08T23:32:26.763" UserId="298" Text="|parachain|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24045" PostHistoryTypeId="10" PostId="3546" RevisionGUID="dc40716d-cd3d-4cf9-ae74-84d1f0732cda" CreationDate="2022-12-09T02:27:54.023" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[3752],&quot;Voters&quot;:[{&quot;Id&quot;:2025,&quot;DisplayName&quot;:&quot;Iker&quot;},{&quot;Id&quot;:2673,&quot;DisplayName&quot;:&quot;Adam Wierzbicki&quot;},{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="24046" PostHistoryTypeId="2" PostId="6279" RevisionGUID="f09c683d-543d-4603-9adf-3b97395b5fa7" CreationDate="2022-12-09T03:01:36.157" UserId="3070" Text="Ink has a great example in the repo's [examples folder](https://github.com/paritytech/ink/tree/master/examples) called the [Delegator](https://github.com/paritytech/ink/tree/master/examples/delegator)&#xD;&#xA;&#xD;&#xA;Its 4 contracts that all work together. The delegator even instantiates the other contracts then calls them later. Looks pretty cool." ContentLicense="CC BY-SA 4.0" />
  <row Id="24048" PostHistoryTypeId="2" PostId="6280" RevisionGUID="a2566147-35de-42fc-a618-912c9ffa4849" CreationDate="2022-12-09T08:50:25.060" UserId="371" Text="I see that there are many events emitted during the process of deploying my contract on Substrate local chain ([SNOW Network to be specific][2]).&#xD;&#xA;1. 4 ICZ was reserved from deployer account   &#xD;&#xA;2. 1 ICZ &amp; 2 ICZ were respectively transferred from deployer account to the Deployed contract as depicted by two different events.  (`I assume this is storageDeposit`)&#xD;&#xA;3. The received 1 ICZ &amp; 2 ICZ got reserved on the deployed contract. &#xD;&#xA;4. Total of 12.719 ICZ was withdrawn and then 11.651 ICZ was deposited to the deployer account (```I assume this is for tx fees```).&#xD;&#xA;5. 0.213 ICZ was deposited into Alice account (*sudo account*). (```I assume this is block rewards```)&#xD;&#xA;6. If we are to terminate this contract, the 1+2 = 3 ICZ is returned (```ReserveRepatriated```) to the Deployer account.&#xD;&#xA;&#xD;&#xA;I have learned that the contract takes some fees for the `storageDeposit` during deployment. I think the 1 ICZ and 2 ICZ transferred in the #2, #3 and #6 above indicates this deposit amount. &#xD;&#xA;&#xD;&#xA;What I would like to understand are:&#xD;&#xA;1. Why 4 ICZ was reserved on the deployer account which doesn't get freed up even when the contract is terminated, and&#xD;&#xA;2. Why the storage deposit is consumed in two steps of 1 ICZ and 2 ICZ, instead of consuming 3 ICZ at once?&#xD;&#xA;&#xD;&#xA;[![Balance Transfers and Reserves during deployment][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ionau.png&#xD;&#xA;  [2]: https://github.com/web3labs/ice-substrate&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24050" PostHistoryTypeId="1" PostId="6280" RevisionGUID="a2566147-35de-42fc-a618-912c9ffa4849" CreationDate="2022-12-09T08:50:25.060" UserId="371" Text="What are the fees associated with ink! contract deployment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24051" PostHistoryTypeId="3" PostId="6280" RevisionGUID="a2566147-35de-42fc-a618-912c9ffa4849" CreationDate="2022-12-09T08:50:25.060" UserId="371" Text="|ink|storage|pallet-contracts|fee|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24052" PostHistoryTypeId="2" PostId="6281" RevisionGUID="97b90b46-cb4b-40dd-86ee-28816093d469" CreationDate="2022-12-09T09:13:36.993" UserId="251" Text="I want to set the root account as the asset's owner in `pallet-assets`'s genesis config.&#xD;&#xA;&#xD;&#xA;How to get `RuntimeOrigin::root()`'s account id?&#xD;&#xA;&#xD;&#xA;Or is there any other way to achieve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24054" PostHistoryTypeId="1" PostId="6281" RevisionGUID="97b90b46-cb4b-40dd-86ee-28816093d469" CreationDate="2022-12-09T09:13:36.993" UserId="251" Text="How to get `RuntimeOrigin::root()`'s account id?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24055" PostHistoryTypeId="3" PostId="6281" RevisionGUID="97b90b46-cb4b-40dd-86ee-28816093d469" CreationDate="2022-12-09T09:13:36.993" UserId="251" Text="|assets|root|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24056" PostHistoryTypeId="2" PostId="6282" RevisionGUID="f664812b-6f60-4ae9-979e-fb3af67fdff1" CreationDate="2022-12-09T09:30:00.593" UserId="73" Text="&gt; How to get RuntimeOrigin::root()'s account id?&#xD;&#xA;&#xD;&#xA;The `RuntimeOrigin::Root` has no account id.&#xD;&#xA;&#xD;&#xA;If you use `pallet-sudo`, there you configure an account id that is allowed to get sudo rights. You could use this account id as your asset owner." ContentLicense="CC BY-SA 4.0" />
  <row Id="24058" PostHistoryTypeId="2" PostId="6283" RevisionGUID="51bee91c-f0c2-41ed-b508-58af81779f0b" CreationDate="2022-12-09T10:01:43.367" UserId="3525" Text="This version of cargo-contract solved it for me:&#xD;&#xA;&#xD;&#xA;```cargo install cargo-contract --version 2.0.0-beta```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24060" PostHistoryTypeId="2" PostId="6284" RevisionGUID="61f9149a-d706-4d56-9515-447f04874dd5" CreationDate="2022-12-09T10:26:02.220" UserId="3553" Text="I would like to know how to achieve native token transfers between different accounts in ink? For example, I would like to initiate transfer from Alice(which will be the caller) to Bob within a method, how should I do? So far I could only find `self.env().transfer()` for transfers from contract to an address. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24062" PostHistoryTypeId="1" PostId="6284" RevisionGUID="61f9149a-d706-4d56-9515-447f04874dd5" CreationDate="2022-12-09T10:26:02.220" UserId="3553" Text="How to achieve native token transfers between accounts in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24063" PostHistoryTypeId="3" PostId="6284" RevisionGUID="61f9149a-d706-4d56-9515-447f04874dd5" CreationDate="2022-12-09T10:26:02.220" UserId="3553" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24064" PostHistoryTypeId="2" PostId="6285" RevisionGUID="9bd39cc5-489c-4f47-8659-723459b02848" CreationDate="2022-12-09T11:17:58.217" UserId="298" Text="I have made succesful runtime upgrades through the sudo pallet, but after trying to do it through referendum using the democracy pallet there was an [error][1]. [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What are the step to make a runtime upgrade through democracy?&#xD;&#xA;&#xD;&#xA;I have a sense that anytime i upload the compact.compressed wasm file it doesnt work but if i copy and past the wasm code from a build-spec it does work. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkabocha.jelliedowl.net#/explorer/query/835200&#xD;&#xA;  [2]: https://i.stack.imgur.com/rvS6Z.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24066" PostHistoryTypeId="1" PostId="6285" RevisionGUID="9bd39cc5-489c-4f47-8659-723459b02848" CreationDate="2022-12-09T11:17:58.217" UserId="298" Text="How to make a main net parachain upgrade through democracy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24067" PostHistoryTypeId="3" PostId="6285" RevisionGUID="9bd39cc5-489c-4f47-8659-723459b02848" CreationDate="2022-12-09T11:17:58.217" UserId="298" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24068" PostHistoryTypeId="2" PostId="6286" RevisionGUID="a7873e1b-8c83-4fe2-985c-8a741465c32e" CreationDate="2022-12-09T11:31:22.743" UserId="1793" Text="Not sure but maybe this will help you ? In mangata this is how we generate types and also RPC methods. [Mangata types][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mangata-finance/types" ContentLicense="CC BY-SA 4.0" />
  <row Id="24070" PostHistoryTypeId="34" PostId="6169" RevisionGUID="74bdf57f-edc9-47a3-8966-523fe9f992b1" CreationDate="2022-12-09T11:43:09.117" UserId="298" Comment="15" />
  <row Id="24071" PostHistoryTypeId="5" PostId="6285" RevisionGUID="b4a8869f-a735-469b-8467-6ebf94d20ed2" CreationDate="2022-12-09T11:53:18.830" UserId="298" Comment="added 14 characters in body" Text="I have made succesful runtime upgrades through the sudo pallet prior to this, but after trying to do it through referendum using the democracy pallet there was an [error][1]. [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What are the step to make a runtime upgrade through democracy?&#xD;&#xA;&#xD;&#xA;I have a sense that anytime i upload the compact.compressed wasm file it doesnt work but if i copy and past the wasm code from a build-spec it does work. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkabocha.jelliedowl.net#/explorer/query/835200&#xD;&#xA;  [2]: https://i.stack.imgur.com/rvS6Z.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24072" PostHistoryTypeId="2" PostId="6287" RevisionGUID="be40563a-bcce-4b40-bbf6-2cb34d22d2c6" CreationDate="2022-12-09T12:10:59.767" UserId="3575" Text="I have made a custom explorer of a substrate based blockchain, and when  i am chilling the staker, its status is not updating to inactive on the custom explorer, is there any RPC call or any other way for the same as it is perfectly updating on the polkadot{.js} explorer. We have the RPC for active status `api.derive.staking.electedInfo` and for waiting also `api.derive.staking.waitingInfo` is there anything similar to this for the chill/inactive mode." ContentLicense="CC BY-SA 4.0" />
  <row Id="24074" PostHistoryTypeId="1" PostId="6287" RevisionGUID="be40563a-bcce-4b40-bbf6-2cb34d22d2c6" CreationDate="2022-12-09T12:10:59.767" UserId="3575" Text="StakerStatus is not updating on my custom explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="24075" PostHistoryTypeId="3" PostId="6287" RevisionGUID="be40563a-bcce-4b40-bbf6-2cb34d22d2c6" CreationDate="2022-12-09T12:10:59.767" UserId="3575" Text="|polkadot-js|substrate-front-end|frontend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24076" PostHistoryTypeId="2" PostId="6288" RevisionGUID="56a99bbf-b4ee-418c-bb79-8427617682a1" CreationDate="2022-12-09T12:35:40.213" UserId="3577" Text="I want to add my polkadot account to the Trust wallet. There is no option to use the json. Is there a w to extract the private key from the json?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24078" PostHistoryTypeId="1" PostId="6288" RevisionGUID="56a99bbf-b4ee-418c-bb79-8427617682a1" CreationDate="2022-12-09T12:35:40.213" UserId="3577" Text="Is there. way to recover the Mnemonic seed (or the secret key) using the restore json?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24079" PostHistoryTypeId="3" PostId="6288" RevisionGUID="56a99bbf-b4ee-418c-bb79-8427617682a1" CreationDate="2022-12-09T12:35:40.213" UserId="3577" Text="|polkadot|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24080" PostHistoryTypeId="2" PostId="6289" RevisionGUID="f1173031-8df0-4bb9-9abe-1451fa2797e1" CreationDate="2022-12-09T12:57:07.303" UserId="2147" Text="Consider the following snippet&#xD;&#xA;``` rust&#xD;&#xA;        #[weight = 100_000_000] //TODO: update weights&#xD;&#xA;        pub fn test(&#xD;&#xA;            _origin,&#xD;&#xA;            _outputs: frame_support::BoundedBTreeSet&lt;JoyBalanceOf&lt;T&gt;, &lt;T as Config&gt;::MaxOutputs&gt;&#xD;&#xA;        ) -&gt; DispatchResult {&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;`MaxOutputs`has been defined in the `Config` trait as &#xD;&#xA;``` rust&#xD;&#xA;pub type MaxOutputs = Get&lt;u32&gt;;&#xD;&#xA;```&#xD;&#xA;When running clippy this will result in the following error&#xD;&#xA;```&#xD;&#xA; error[E0277]: `BoundedBTreeSet&lt;&lt;T as pallet_balances::Config&gt;::Balance, &lt;T as Config&gt;::MaxOutputs&gt;` doesn't implement `core::fmt::Debug`&#xD;&#xA;     --&gt; /home/ignazio/developer/joystream/runtime-modules/project-token/src/lib.rs:219:1&#xD;&#xA;      |&#xD;&#xA;  219 | / decl_module! {&#xD;&#xA;  220 | |     pub struct Module&lt;T: Config&gt; for enum Call&#xD;&#xA;  221 | |     where&#xD;&#xA;  222 | |         origin: T::Origin&#xD;&#xA;  ...   |&#xD;&#xA;  993 | |     }&#xD;&#xA;  994 | | }&#xD;&#xA;      | |_^ `BoundedBTreeSet&lt;&lt;T as pallet_balances::Config&gt;::Balance, &lt;T as Config&gt;::MaxOutputs&gt;` cannot be formatted using `{:?}` because it doesn't implement `core::fmt::Debug`&#xD;&#xA;      |&#xD;&#xA;      = help: the trait `core::fmt::Debug` is not implemented for `BoundedBTreeSet&lt;&lt;T as pallet_balances::Config&gt;::Balance, &lt;T as Config&gt;::MaxOutputs&gt;`&#xD;&#xA;      = help: the following other types implement trait `core::fmt::Debug`:&#xD;&#xA;                ()&#xD;&#xA;                (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)&#xD;&#xA;                (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)&#xD;&#xA;                (T10, T11)&#xD;&#xA;                (T11,)&#xD;&#xA;                (T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)&#xD;&#xA;                (T3, T4, T5, T6, T7, T8, T9, T10, T11)&#xD;&#xA;                (T4, T5, T6, T7, T8, T9, T10, T11)&#xD;&#xA;              and 5 others&#xD;&#xA;      = note: this error originates in the macro `$crate::format_args` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;```&#xD;&#xA;However when replacing the `BoundedBTreeSet` with its unbounded `BTreeSet` version no errors of this kind are thrown.&#xD;&#xA;&#xD;&#xA;#Versions&#xD;&#xA;- frame-support: 4.0.0-dev  &#xD;&#xA;- cargo: 1.62.0-nightly (a44758ac8 2022-05-04)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24082" PostHistoryTypeId="1" PostId="6289" RevisionGUID="f1173031-8df0-4bb9-9abe-1451fa2797e1" CreationDate="2022-12-09T12:57:07.303" UserId="2147" Text="BoundedBTreeMap error with Debug trait" ContentLicense="CC BY-SA 4.0" />
  <row Id="24083" PostHistoryTypeId="3" PostId="6289" RevisionGUID="f1173031-8df0-4bb9-9abe-1451fa2797e1" CreationDate="2022-12-09T12:57:07.303" UserId="2147" Text="|rust|frame|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24084" PostHistoryTypeId="2" PostId="6290" RevisionGUID="54daebe0-f427-4b46-b8bd-ce4ae874cb3a" CreationDate="2022-12-09T12:59:32.890" UserId="3035" Text="I am trying to run `try-runtime` locally to see the execution results of a particular storage migration, using `live` subcommand to upload a production state from a remote node. &#xD;&#xA;&#xD;&#xA;I am getting an error: `RestartNeeded(&quot;Invalid request ID&quot;)`&#xD;&#xA;&#xD;&#xA;What could be wrong?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;╰─➤  RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace \                                                            1 ↵&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;try-runtime \&#xD;&#xA;--execution Native \&#xD;&#xA;--chain kusama-dev \&#xD;&#xA;on-runtime-upgrade \&#xD;&#xA;live \&#xD;&#xA;--uri wss://kusama-rpc.polkadot.io:443&#xD;&#xA;2022-12-06 15:47:45.003 TRACE main runtime::staking: [0]  inserting genesis staker: be5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f (GsvVmjr1...) =&gt; 100000000000000 =&gt; StakerStatus::Validator    &#xD;&#xA;2022-12-06 15:47:45.003 DEBUG main runtime::bags_list: [0]  [VoterList]inserted be5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f (GsvVmjr1...) with score 100000000000000 into bag 103277785738759, new count is 1    &#xD;&#xA;2022-12-06 15:47:45.003 TRACE main runtime::staking: [0]  planning new session 0 at genesis    &#xD;&#xA;2022-12-06 15:47:45.003 DEBUG main runtime::staking: [0]  Starting the first era.    &#xD;&#xA;2022-12-06 15:47:45.004  INFO main runtime::staking: [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2022-12-06 15:47:45.004  INFO main runtime::staking: [0]  generated 1 npos targets    &#xD;&#xA;2022-12-06 15:47:45.004 TRACE main runtime::staking: [0]  planning new session 1 at genesis    &#xD;&#xA;2022-12-06 15:47:45.004  WARN main runtime::parachains: Took active validators from set with wrong size    &#xD;&#xA;2022-12-06 15:47:45.004  WARN main runtime::parachains: Took active validators from set with wrong size    &#xD;&#xA;2022-12-06 15:47:45.004  WARN main runtime::parachains: Took active validators from set with wrong size.    &#xD;&#xA;2022-12-06 15:47:45.004  WARN main runtime::parachains: Took active validators from set with wrong size    &#xD;&#xA;2022-12-06 15:47:45.004 TRACE main runtime::staking: [0]  starting session 0    &#xD;&#xA;2022-12-06 15:47:45.004 DEBUG main runtime::staking: [0]  found 0 slashes scheduled to be executed in era 0    &#xD;&#xA;2022-12-06 15:50:45.349  INFO main jsonrpsee_client_transport::ws: Connection established to target: Target { sockaddrs: [], host: &quot;kusama-rpc.polkadot.io&quot;, host_header: &quot;kusama-rpc.polkadot.io:443&quot;, _mode: Tls, path_and_query: &quot;/&quot; }&#xD;&#xA;2022-12-06 15:50:45.383  INFO main remote-ext: scraping key-pairs from remote @ 0x4a65c043ab64f28f988e5ae54958f8d23e11cfbdba41fe711c06ddaabbedf009    &#xD;&#xA;2022-12-06 15:50:45.383  INFO main remote-ext: downloading data for all pallets.    &#xD;&#xA;2022-12-06 15:56:45.393  WARN tokio-runtime-worker jsonrpsee_core::client::async_client: InvalidRequestId&#xD;&#xA;2022-12-06 15:56:45.393 ERROR                 main remote-ext: failed to execute batch: [c2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6fb00ce09311f4fbcb468430ee0ac7190f42b7fead1bb8eec5d895fb3d3bd145e85f0b6d5c8bb3d7edb4a6fa9dda2c021,&#xD;&#xA;....&#xD;&#xA;.... lots of data&#xD;&#xA;....&#xD;&#xA;296a81d6ead301607072d2bbf9dd308c3606eb1b795a62bcf2f]. Error: RestartNeeded(&quot;Invalid request ID&quot;)    &#xD;&#xA;Error: &#xD;&#xA;   0: Invalid input: batch failed.&#xD;&#xA;&#xD;&#xA;Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.&#xD;&#xA;Run with RUST_BACKTRACE=full to include source snippets.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24086" PostHistoryTypeId="1" PostId="6290" RevisionGUID="54daebe0-f427-4b46-b8bd-ce4ae874cb3a" CreationDate="2022-12-09T12:59:32.890" UserId="3035" Text="try-runtime fails with error RestartNeeded - Invalid request ID" ContentLicense="CC BY-SA 4.0" />
  <row Id="24087" PostHistoryTypeId="3" PostId="6290" RevisionGUID="54daebe0-f427-4b46-b8bd-ce4ae874cb3a" CreationDate="2022-12-09T12:59:32.890" UserId="3035" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24091" PostHistoryTypeId="50" PostId="5697" RevisionGUID="726aa2ac-c565-4658-8d14-47057f2584f9" CreationDate="2022-12-09T13:08:10.983" UserId="-1" />
  <row Id="24092" PostHistoryTypeId="2" PostId="6292" RevisionGUID="d68aa1cf-69e5-4298-99c0-5e084fd64711" CreationDate="2022-12-09T13:10:19.010" UserId="3563" Text="This question is continued from https://substrate.stackexchange.com/questions/6249/how-to-get-astr-balance-via-json-rpc.&#xD;&#xA;&#xD;&#xA;I understood calculating StorageKey from Publickey is needed.&#xD;&#xA;It seems that calculating StorageKey and decoding rpc-json responses are  complicated tasks, so I decided to use the following the library.&#xD;&#xA;https://github.com/centrifuge/go-substrate-rpc-client&#xD;&#xA;&#xD;&#xA;I wrote the following GO code and got response, but the $ASTR balance of the response is different from the one found in Subscan.&#xD;&#xA;https://astar.subscan.io/account/Y29MvHDrJyTiNPWYK5r5LouPdc7kkquZe9c6WfpQLvN4wwj&#xD;&#xA;The response is below. I expected Free field is 246,291,284.31933627.&#xD;&#xA;Free field type is big.Int, so I tried to call String() to convert this to human-readable value, but it showed the same result.&#xD;&#xA;Give me thought about getting $ASTR balance from this response?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{Nonce:1 Consumers:0 Providers:1 Data:{Free:+1057729064290065319908834850671427584 Reserved:+0 MiscFrozen:+0 FreeFrozen:+0}}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The code is here.&#xD;&#xA;```&#xD;&#xA;	pubkey := &quot;0x5c2aa08039c510dbd98643e132a3c82475a09814203d631b44fe530d0208dc66&quot;&#xD;&#xA;	api, err := gsrpc.NewSubstrateAPI(&quot;https://astar-rpc.dwellir.com&quot;)&#xD;&#xA;	meta, err := api.RPC.State.GetMetadataLatest()&#xD;&#xA;	accountID, err := types.NewAccountIDFromHexString(pubkey)&#xD;&#xA;	key, err := types.CreateStorageKey(meta, &quot;System&quot;, &quot;Account&quot;, accountID.ToBytes())&#xD;&#xA;	var accountInfo types.AccountInfo&#xD;&#xA;	ok, err := api.RPC.State.GetStorageLatest(key, &amp;accountInfo)&#xD;&#xA;	fmt.Printf(&quot;%+v&quot;, accountInfo)&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24094" PostHistoryTypeId="1" PostId="6292" RevisionGUID="d68aa1cf-69e5-4298-99c0-5e084fd64711" CreationDate="2022-12-09T13:10:19.010" UserId="3563" Text="How to get human-readable ASTR balance in Golang" ContentLicense="CC BY-SA 4.0" />
  <row Id="24095" PostHistoryTypeId="3" PostId="6292" RevisionGUID="d68aa1cf-69e5-4298-99c0-5e084fd64711" CreationDate="2022-12-09T13:10:19.010" UserId="3563" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24096" PostHistoryTypeId="2" PostId="6293" RevisionGUID="eabe129b-0aef-4a01-9c06-3a4c8df4f210" CreationDate="2022-12-09T13:10:23.377" UserId="251" Text="IIUC, you only need to do the `authorize_upgrade` through referendum which require a root origin.&#xD;&#xA;&#xD;&#xA;After that, anyone can call `enact_authorized_upgrade`.&#xD;&#xA;&#xD;&#xA;As I mentioned in my comment. Check https://substrate.stackexchange.com/questions/2309/runtime-upgrade-error-parachainsystem-validationdatanotavailable.&#xD;&#xA;&#xD;&#xA;You should not run the `enact_authorized_upgrade` in `on_initialize`. And the referendum is a schedule call. That's why you got this error.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/cumulus/blob/f3847ead3c8570a2a6f05924c5fdc8a34686365c/pallets/parachain-system/src/lib.rs#L456&#xD;&#xA;&#xD;&#xA;As you can see, you don't need a root origin to run `enact_authorized_upgrade`." ContentLicense="CC BY-SA 4.0" />
  <row Id="24098" PostHistoryTypeId="2" PostId="6294" RevisionGUID="a4e38bb6-4c74-459f-adfe-448eefd64696" CreationDate="2022-12-09T13:21:59.853" UserId="251" Text="I think the `go-substrate-rpc-client` was no more under maintain.&#xD;&#xA;&#xD;&#xA;Here is their account data type:&#xD;&#xA;https://github.com/centrifuge/go-substrate-rpc-client/blob/ccecb66ef9132c2cea5be0d6aab89a8ca8b00851/types/account_data.go#L19-L30&#xD;&#xA;&#xD;&#xA;Here is the latest Substrate code: https://github.com/paritytech/substrate/blob/f0b6e79a8d21856743acc5370b5d5c3271048cb9/frame/system/src/lib.rs#L733-L750&#xD;&#xA;&#xD;&#xA;As you can see, they don't have the `sufficients` field.&#xD;&#xA;&#xD;&#xA;So there are 4 bytes shifted. Then the scale-codec got a weird result.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;BTW, if you think my previous answer solved your problem, please mark it as the answer. Thanks. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24100" PostHistoryTypeId="2" PostId="6295" RevisionGUID="675286ae-b58a-499c-a4a6-f54f8b6fa3bb" CreationDate="2022-12-09T13:22:12.377" UserId="529" Text="If you talk about ink! that means the contract needs to be involved in the fund transfer.&#xD;&#xA;&#xD;&#xA; 1. Alice signes the tx and includes funds with the call &#xD;&#xA; 2. The contract reads the value used in tx with: `self::env().transferred_value()` &#xD;&#xA; 3. The contract sends funds to Bob by using: `self.env().transfer()`" ContentLicense="CC BY-SA 4.0" />
  <row Id="24102" PostHistoryTypeId="5" PostId="6292" RevisionGUID="877f16c0-63bb-4a39-9187-1032d73cb133" CreationDate="2022-12-09T13:28:26.490" UserId="251" Comment="added 42 characters in body" Text="This question is continued from https://substrate.stackexchange.com/questions/6249/how-to-get-astr-balance-via-json-rpc.&#xD;&#xA;&#xD;&#xA;I understood calculating StorageKey from Publickey is needed.&#xD;&#xA;It seems that calculating StorageKey and decoding rpc-json responses are  complicated tasks, so I decided to use the following the library.&#xD;&#xA;https://github.com/centrifuge/go-substrate-rpc-client&#xD;&#xA;&#xD;&#xA;I wrote the following GO code and got response, but the $ASTR balance of the response is different from the one found in Subscan.&#xD;&#xA;https://astar.subscan.io/account/Y29MvHDrJyTiNPWYK5r5LouPdc7kkquZe9c6WfpQLvN4wwj&#xD;&#xA;The response is below. I expected Free field is 246,291,284.31933627.&#xD;&#xA;Free field type is big.Int, so I tried to call String() to convert this to human-readable value, but it showed the same result.&#xD;&#xA;Give me thought about getting $ASTR balance from this response?&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  Nonce:1 &#xD;&#xA;  Consumers:0 &#xD;&#xA;  Providers:1 &#xD;&#xA;  Data:{&#xD;&#xA;    Free:+1057729064290065319908834850671427584 &#xD;&#xA;    Reserved:+0 &#xD;&#xA;    MiscFrozen:+0 &#xD;&#xA;    FreeFrozen:+0&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The code is here.&#xD;&#xA;```go&#xD;&#xA;pubkey := &quot;0x5c2aa08039c510dbd98643e132a3c82475a09814203d631b44fe530d0208dc66&quot;&#xD;&#xA;api, err := gsrpc.NewSubstrateAPI(&quot;https://astar-rpc.dwellir.com&quot;)&#xD;&#xA;meta, err := api.RPC.State.GetMetadataLatest()&#xD;&#xA;accountID, err := types.NewAccountIDFromHexString(pubkey)&#xD;&#xA;key, err := types.CreateStorageKey(meta, &quot;System&quot;, &quot;Account&quot;, accountID.ToBytes())&#xD;&#xA;var accountInfo types.AccountInfo&#xD;&#xA;ok, err := api.RPC.State.GetStorageLatest(key, &amp;accountInfo)&#xD;&#xA;fmt.Printf(&quot;%+v&quot;, accountInfo)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24103" PostHistoryTypeId="6" PostId="6292" RevisionGUID="877f16c0-63bb-4a39-9187-1032d73cb133" CreationDate="2022-12-09T13:28:26.490" UserId="251" Comment="added 42 characters in body" Text="|scale-codec|astar|go-substrate-rpc-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24104" PostHistoryTypeId="5" PostId="6295" RevisionGUID="641ed5f0-7b42-49f0-814e-58a736d39603" CreationDate="2022-12-09T13:32:46.183" UserId="529" Comment="added payable" Text="If you talk about ink! that means the contract needs to be involved in the fund transfer.&#xD;&#xA;&#xD;&#xA; 1. Alice signes the tx and includes funds with the call &#xD;&#xA; 2. The contract reads the value used in tx with: `self::env().transferred_value()` &#xD;&#xA; 3. The contract sends funds to Bob by using: `self.env().transfer()`&#xD;&#xA;&#xD;&#xA;something like this code:&#xD;&#xA;```&#xD;&#xA;#[ink(message, payable)]&#xD;&#xA;fn send_funds(&amp;mut self, to: AccountId)-&gt; Result&lt;(), ink_env::Error&gt;{&#xD;&#xA;    let balance = Self::env().transferred_value();&#xD;&#xA;    Self::env().transfer(to, balance)?;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24110" PostHistoryTypeId="10" PostId="6114" RevisionGUID="4e92c5a4-d0d7-4970-94fa-b953ff1bf87d" CreationDate="2022-12-09T15:09:56.047" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[6034],&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="24112" PostHistoryTypeId="2" PostId="6296" RevisionGUID="9a280730-9266-4681-9817-cdacddd1e995" CreationDate="2022-12-09T17:00:21.537" UserId="3002" Text="It usually means that you have dependency conflicts.&#xD;&#xA;&#xD;&#xA;You can confirm which dependencies by looking for duplicated references in `Cargo.lock` file. To fix it, you need to update those dependencies to use the same version.&#xD;&#xA;&#xD;&#xA;Sometimes you will have to use the [\[patch\]][1] section in the root `Cargo.toml` of your project to override those dependencies.&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#overriding-dependencies" ContentLicense="CC BY-SA 4.0" />
  <row Id="24114" PostHistoryTypeId="6" PostId="6287" RevisionGUID="fac9a478-f1fb-44b0-a7b5-bcdd5c080fbe" CreationDate="2022-12-09T17:04:11.297" UserId="34" Comment="edited tags" Text="|polkadot-js|rpc|frontend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24115" PostHistoryTypeId="5" PostId="6288" RevisionGUID="b3805abe-91bc-43ed-8d76-de98e0c3423d" CreationDate="2022-12-09T17:11:48.347" UserId="34" Comment="added 14 characters in body; edited tags; edited title" Text="I want to add my polkadot account to the Trust wallet. There is no option to use the json. Is there a way to recover the private keys from the raw json backup?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24116" PostHistoryTypeId="4" PostId="6288" RevisionGUID="b3805abe-91bc-43ed-8d76-de98e0c3423d" CreationDate="2022-12-09T17:11:48.347" UserId="34" Comment="added 14 characters in body; edited tags; edited title" Text="Can you recover the Mnemonic or secret keys from a Polkadot.js JSON backup?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24117" PostHistoryTypeId="6" PostId="6288" RevisionGUID="b3805abe-91bc-43ed-8d76-de98e0c3423d" CreationDate="2022-12-09T17:11:48.347" UserId="34" Comment="added 14 characters in body; edited tags; edited title" Text="|polkadot|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24118" PostHistoryTypeId="5" PostId="4693" RevisionGUID="54b2a801-c3f0-4e89-96b3-089b13152c6e" CreationDate="2022-12-09T18:08:06.903" UserId="279" Comment="Small changes in topology file and cli command." Text="You'll need to download the Zombienet executable.&#xD;&#xA;&#xD;&#xA;You can find linux and macOS executables of the Zombienet CLI here:&#xD;&#xA;- https://github.com/paritytech/zombienet/releases&#xD;&#xA;&#xD;&#xA;Download the Zombienet CLI according to your operating system.&#xD;&#xA;&#xD;&#xA;&gt; Tip: If you want the executable to be available system-wide then you can follow these steps (otherwise just download the executable to your working directory):&#xD;&#xA;&gt; &#xD;&#xA;&gt; ```&#xD;&#xA;&gt; wget https://github.com/paritytech/zombienet/releases/download/v1.3.18/zombienet-macos&#xD;&#xA;&gt; chmod +x zombienet-macos &#xD;&#xA;&gt; cp zombienet-macos /usr/local/bin&#xD;&#xA;&gt; ```&#xD;&#xA;&#xD;&#xA;Make sure Zombienet CLI is installed correctly:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos --help&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some similar output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Usage: zombienet [options] [command]&#xD;&#xA;&#xD;&#xA;Options:&#xD;&#xA;  -c, --spawn-concurrency &lt;concurrency&gt;  Number of concurrent spawning process to launch, default is 1&#xD;&#xA;  -p, --provider &lt;provider&gt;              Override provider to use (choices: &quot;podman&quot;, &quot;kubernetes&quot;, &quot;native&quot;)&#xD;&#xA;  -m, --monitor                          Start as monitor, do not auto cleanup network&#xD;&#xA;  -h, --help                             display help for command&#xD;&#xA;&#xD;&#xA;Commands:&#xD;&#xA;  spawn &lt;networkConfig&gt; [creds]          Spawn the network defined in the config&#xD;&#xA;  test &lt;testFile&gt; [runningNetworkSpec]   Run tests on the network defined&#xD;&#xA;  setup &lt;binaries...&gt;                    Setup is meant for downloading and making dev environment of Zombienet ready&#xD;&#xA;  version                                Prints zombienet version&#xD;&#xA;  help [command]                         display help for command&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Setting up your config&#xD;&#xA;&#xD;&#xA;Zombienet works with a config. The config is where you specify your test network's configuration. The config is also where you can specify the Polkadot/Cumulus binaries.&#xD;&#xA;&#xD;&#xA;Create a config file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;touch config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in this example config we are specifying that we want a Rococo Relay chain with four validators and two parachains - each with one collator. Make sure you have the compiled binaries available.&#xD;&#xA;&#xD;&#xA;&gt; Zombienet also works with other providers such as Kubernetes and Podman.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot-v0.9.32&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;  # relaychain nodes are validators by default&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;dave&quot;&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1000-collator&quot;&#xD;&#xA;  command = &quot;./bin/parachain-template-node-v0.9.32&quot;&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1001&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1001-collator&quot;&#xD;&#xA;  command = &quot;../bin/parachain-template-node-v0.9.32&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Save the file and run the Zombienet CLI using this config:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos -p native spawn config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some nicely formatted output stating that the nodes are up and ready.&#xD;&#xA;&#xD;&#xA;You can now interact with your nodes in [polkadotJS apps](https://polkadot.js.org/apps)!" ContentLicense="CC BY-SA 4.0" />
  <row Id="24119" PostHistoryTypeId="24" PostId="4693" RevisionGUID="54b2a801-c3f0-4e89-96b3-089b13152c6e" CreationDate="2022-12-09T18:08:06.903" Comment="Proposed by 279 approved by 34 edit id of 353" ContentLicense="CC BY-SA 4.0" />
  <row Id="24120" PostHistoryTypeId="5" PostId="6285" RevisionGUID="0294c10e-31b9-4f4a-8cd1-a28e4ee6d406" CreationDate="2022-12-09T18:09:38.743" UserId="34" Comment="added 2 characters in body; edited tags" Text="I have made successful runtime upgrades through the sudo pallet prior to this, but after trying to do it through referendum using the democracy pallet there was an [error][1]. [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What are the step to make a runtime upgrade through democracy?&#xD;&#xA;&#xD;&#xA;I have a sense that anytime i upload the compact.compressed Wasm file it doesn't work but if i copy and past the Wasm code from a build-spec it does work. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkabocha.jelliedowl.net#/explorer/query/835200&#xD;&#xA;  [2]: https://i.stack.imgur.com/rvS6Z.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24121" PostHistoryTypeId="6" PostId="6285" RevisionGUID="0294c10e-31b9-4f4a-8cd1-a28e4ee6d406" CreationDate="2022-12-09T18:09:38.743" UserId="34" Comment="added 2 characters in body; edited tags" Text="|parachain|runtime-upgrade|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24123" PostHistoryTypeId="2" PostId="6297" RevisionGUID="77eb26dc-f26a-4423-bc8f-42f14de33bef" CreationDate="2022-12-10T03:06:16.297" UserId="590" Text="I notice some benchmarks in Frame have #[skip_meta].&#xD;&#xA;&#xD;&#xA;What does this macro do?&#xD;&#xA;&#xD;&#xA;Please explain when one should use this macro when benchmarking." ContentLicense="CC BY-SA 4.0" />
  <row Id="24125" PostHistoryTypeId="1" PostId="6297" RevisionGUID="77eb26dc-f26a-4423-bc8f-42f14de33bef" CreationDate="2022-12-10T03:06:16.297" UserId="590" Text="What does #[skip_meta] do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24126" PostHistoryTypeId="3" PostId="6297" RevisionGUID="77eb26dc-f26a-4423-bc8f-42f14de33bef" CreationDate="2022-12-10T03:06:16.297" UserId="590" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24127" PostHistoryTypeId="2" PostId="6298" RevisionGUID="b0258c41-fa1c-45a3-9efc-ed21b68be94f" CreationDate="2022-12-10T03:21:15.833" UserId="590" Text="Can someone please explain the following output:&#xD;&#xA;&#xD;&#xA;Why did the weights generate a zero input?&#xD;&#xA;-  Weight::from_ref_time(0 as u64) &#xD;&#xA;&#xD;&#xA;What is the fastest way to eyeball this and conclude whether these weights are within reason or telling me I need to rethink my implementation?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn on_initialize(m: u32, ) -&gt; Weight {&#xD;&#xA;	Weight::from_ref_time(0 as u64)&#xD;&#xA;		// Standard Error: 5_000&#xD;&#xA;		.saturating_add(Weight::from_ref_time(1_242_000 as u64).saturating_mul(m as u64))&#xD;&#xA;		.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(m as u64)))&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24129" PostHistoryTypeId="1" PostId="6298" RevisionGUID="b0258c41-fa1c-45a3-9efc-ed21b68be94f" CreationDate="2022-12-10T03:21:15.833" UserId="590" Text="Benchmark weights output" ContentLicense="CC BY-SA 4.0" />
  <row Id="24130" PostHistoryTypeId="3" PostId="6298" RevisionGUID="b0258c41-fa1c-45a3-9efc-ed21b68be94f" CreationDate="2022-12-10T03:21:15.833" UserId="590" Text="|benchmarking|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24131" PostHistoryTypeId="2" PostId="6299" RevisionGUID="6825a921-6956-478e-899d-f61491b5c070" CreationDate="2022-12-10T04:02:47.557" UserId="590" Text="I have the following benchmark that takes a very long time to complete. What measures can I take to improve the time it takes to run the benchmark without losing its effectiveness?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;on_initialize {&#xD;&#xA;		let m in 1 .. 3_000;&#xD;&#xA;		for j in 0 .. m {&#xD;&#xA;			let mortality_block = 49 as u32;&#xD;&#xA;			let sig = generate_test_signature();&#xD;&#xA;			assert_ok!(Msa::&lt;T&gt;::register_signature(&amp;sig, T::BlockNumber::from(mortality_block)));&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		let bucket_zero_iter = PayloadSignatureRegistry::&lt;T&gt;::iter_prefix(T::BlockNumber::from(0u32));&#xD;&#xA;		assert_eq!(bucket_zero_iter.count(), m as usize);&#xD;&#xA;	}: {&#xD;&#xA;		Msa::&lt;T&gt;::on_initialize(100u32.into());&#xD;&#xA;	} verify {&#xD;&#xA;		let bucket_zero_iter = PayloadSignatureRegistry::&lt;T&gt;::iter_prefix(T::BlockNumber::from(0u32));&#xD;&#xA;		assert_eq!(bucket_zero_iter.count(), 0 as usize);&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;Running with the following configurations:&#xD;&#xA;-   --steps 50 &#xD;&#xA;- --repeat 10 " ContentLicense="CC BY-SA 4.0" />
  <row Id="24133" PostHistoryTypeId="1" PostId="6299" RevisionGUID="6825a921-6956-478e-899d-f61491b5c070" CreationDate="2022-12-10T04:02:47.557" UserId="590" Text="How to decrease time it takes to benchmark?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24134" PostHistoryTypeId="3" PostId="6299" RevisionGUID="6825a921-6956-478e-899d-f61491b5c070" CreationDate="2022-12-10T04:02:47.557" UserId="590" Text="|benchmarking|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24135" PostHistoryTypeId="5" PostId="6245" RevisionGUID="df3ce28d-a246-468e-8a0f-f2f977bf8464" CreationDate="2022-12-10T07:06:19.020" UserId="3559" Comment="added 24439 characters in body" Text="I followed this tutorial https://docs.substrate.io/tutorials/get-started/build-local-blockchain/. I got the below error when run cargo build --release. How can I fix it?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo build -v --release    &#xD;&#xA;       &#xD;&#xA;The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;warning: Assembler messages:&#xD;&#xA;warning: Error: can't open /tmp/ccSCYXdI.s for reading: No such file or directory&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for `librocksdb-sys v0.8.0+7.4.4`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-aabd480a2f3b76e0/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  cargo:rerun-if-changed=rocksdb/&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu&#xD;&#xA;  CXX_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu&#xD;&#xA;  CXX_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXX&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX&#xD;&#xA;  CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CXXFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CXXFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXXFLAGS&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu&#xD;&#xA;  CXX_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu&#xD;&#xA;  CXX_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXX&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX&#xD;&#xA;  CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CXXFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CXXFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXXFLAGS&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu&#xD;&#xA;  CXX_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu&#xD;&#xA;  CXX_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXX&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX&#xD;&#xA;  CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CXXFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CXXFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXXFLAGS&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/cache/cache_reservation_manager.o&quot; &quot;-c&quot; &quot;rocksdb/cache/cache_reservation_manager.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/cache/cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/cache.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/cache/cache_key.o&quot; &quot;-c&quot; &quot;rocksdb/cache/cache_key.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/cache/cache_entry_roles.o&quot; &quot;-c&quot; &quot;rocksdb/cache/cache_entry_roles.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/cache/clock_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/clock_cache.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/cache/fast_lru_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/fast_lru_cache.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/cache/lru_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/lru_cache.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/cache/compressed_secondary_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/compressed_secondary_cache.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/cache/sharded_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/sharded_cache.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/arena_wrapped_db_iter.o&quot; &quot;-c&quot; &quot;rocksdb/db/arena_wrapped_db_iter.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_fetcher.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_fetcher.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_file_addition.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_addition.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_file_builder.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_builder.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_file_cache.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_cache.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_file_garbage.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_garbage.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_file_meta.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_meta.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_file_reader.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_reader.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_garbage_meter.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_garbage_meter.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_log_format.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_log_format.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_log_sequential_reader.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_log_sequential_reader.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_log_writer.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_log_writer.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/blob_source.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_source.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/blob/prefetch_buffer_collection.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/prefetch_buffer_collection.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/builder.o&quot; &quot;-c&quot; &quot;rocksdb/db/builder.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  &#xD;&#xA;  cargo:warning=Assembler messages:&#xD;&#xA;  cargo:warning=Error: can't open /tmp/ccSCYXdI.s for reading: No such file or directory&#xD;&#xA;  exit status: 1&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/db_impl/db_impl_compaction_flush.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_impl/db_impl_compaction_flush.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  error occurred: Command &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/kayvan/developer/projects/rust-projects/substrate-node-template/target/release/build/librocksdb-sys-a13da7712a385c02/out/rocksdb/db/compaction/compaction_job.o&quot; &quot;-c&quot; &quot;rocksdb/db/compaction/compaction_job.cc&quot; with args &quot;c++&quot; did not execute successfully (status code exit status: 1).&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24136" PostHistoryTypeId="2" PostId="6300" RevisionGUID="d621bad1-834a-46f9-8e34-dc1e7fa153e0" CreationDate="2022-12-10T07:26:15.123" UserId="251" Text="This is what I found.&#xD;&#xA;&#xD;&#xA;https://github.dev/paritytech/substrate/blob/15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9/frame/benchmarking/src/lib.rs#L1109-L1115&#xD;&#xA;&#xD;&#xA;https://github.dev/paritytech/substrate/blob/15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9/primitives/externalities/src/lib.rs#L306-L311&#xD;&#xA;&#xD;&#xA;It would ignore the `reads_and_writes` if the benchmark was marked as `#[skip_meta]`.&#xD;&#xA;&#xD;&#xA;It won't calculate the `reads_and_writes` and won't put them into the `BenchmarkResult`." ContentLicense="CC BY-SA 4.0" />
  <row Id="24138" PostHistoryTypeId="2" PostId="6301" RevisionGUID="2284cbac-6c17-4caf-9410-99e770f295c0" CreationDate="2022-12-10T07:32:47.973" UserId="251" Text="You can recover the private key but not the mnemonic seed because it uses a one-way algorithm.&#xD;&#xA;&#xD;&#xA;I don't feel familiar with the keystone to private key.&#xD;&#xA;&#xD;&#xA;But I got an idea. Maybe you could use this method https://paritytech.github.io/substrate/master/sp_application_crypto/sr25519/struct.Pair.html#method.from_entropy to get the private key.&#xD;&#xA;&#xD;&#xA;But I don't know how to deal with the keystone file.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;	&quot;encoded&quot;: &quot;...&quot;,&#xD;&#xA;	&quot;encoding&quot;: {&#xD;&#xA;		&quot;content&quot;: [&#xD;&#xA;			&quot;pkcs8&quot;,&#xD;&#xA;			&quot;sr25519&quot;&#xD;&#xA;		],&#xD;&#xA;		&quot;type&quot;: [&#xD;&#xA;			&quot;scrypt&quot;,&#xD;&#xA;			&quot;xsalsa20-poly1305&quot;&#xD;&#xA;		],&#xD;&#xA;		&quot;version&quot;: &quot;3&quot;&#xD;&#xA;	},&#xD;&#xA;	&quot;address&quot;: &quot;...&quot;,&#xD;&#xA;	&quot;meta&quot;: {&#xD;&#xA;		&quot;genesisHash&quot;: &quot;...&quot;,&#xD;&#xA;		&quot;isHardware&quot;: false,&#xD;&#xA;		&quot;name&quot;: &quot;1&quot;,&#xD;&#xA;		&quot;tags&quot;: [],&#xD;&#xA;		&quot;whenCreated&quot;: 1670590064209&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It looks like that we need to decode the `encoded` field to get the raw `entropy`." ContentLicense="CC BY-SA 4.0" />
  <row Id="24140" PostHistoryTypeId="50" PostId="5814" RevisionGUID="10295e50-77ae-4d0c-a424-f782bfa28c8e" CreationDate="2022-12-10T13:01:35.223" UserId="-1" />
  <row Id="24141" PostHistoryTypeId="2" PostId="6302" RevisionGUID="cad478dd-7748-4a0a-8511-080780850848" CreationDate="2022-12-10T14:41:56.850" UserId="94" Text="You are using the public Kusama endpoint; this will not work. The node times out before the batch which tries to download all the state can complete.    &#xD;&#xA;Please follow this description about how to use it: [Testing a migration with `try-runtime`](https://substrate.stackexchange.com/a/6193/94)." ContentLicense="CC BY-SA 4.0" />
  <row Id="24143" PostHistoryTypeId="50" PostId="5598" RevisionGUID="9eda73ae-8324-49bc-9be1-a37fa29a41ca" CreationDate="2022-12-10T16:04:30.547" UserId="-1" />
  <row Id="24144" PostHistoryTypeId="2" PostId="6303" RevisionGUID="2c05fe61-f06e-42c8-9e38-7ee24b1091e4" CreationDate="2022-12-10T19:07:44.500" UserId="3331" Text="I'm implementing an Identity Management pallet for an administrative ecosystem.  &#xD;&#xA;Suppose that using the same architecture as Polkadot. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Questions ### &#xD;&#xA;&#xD;&#xA;1. It would be more secure, efficient and scalable to have the pallet in the Relay Chain?&#xD;&#xA;    - _**I** suppose yes, because it would be taking advantage of the [sharding model][1], managing the identities of the network as a whole, not only managing identities on that specific parachain._&#xD;&#xA;&#xD;&#xA;&gt; **#1** Answer would be false, ***if and only if***, I wanted to access (read and/or write) the Relay pallet's storage from a Parachain, right?&#xD;&#xA;&#xD;&#xA;2. Should it use off-chain operations to store the hash for the operation and use on-chain storage for the data?  &#xD;&#xA;_Assuming that when I read the said storage from another Para or from an RPC, it will be a `query`, neither modifying the chain nor pallet state._&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks in advance, and I would love to get complementar material on the matter.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/blog/polkadot-v1-0-sharding-and-economic-security/" ContentLicense="CC BY-SA 4.0" />
  <row Id="24146" PostHistoryTypeId="1" PostId="6303" RevisionGUID="2c05fe61-f06e-42c8-9e38-7ee24b1091e4" CreationDate="2022-12-10T19:07:44.500" UserId="3331" Text="Implementing an Identity Management pallet, would be more efficient in a Relay or Parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24147" PostHistoryTypeId="3" PostId="6303" RevisionGUID="2c05fe61-f06e-42c8-9e38-7ee24b1091e4" CreationDate="2022-12-10T19:07:44.500" UserId="3331" Text="|polkadot|pallet|parachain|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24148" PostHistoryTypeId="2" PostId="6304" RevisionGUID="5e360721-9751-468b-9003-db73668d3faa" CreationDate="2022-12-10T19:57:20.570" UserId="3171" Text="There is example how to use Alice predefined account to run &#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node \&#xD;&#xA;    --alice \&#xD;&#xA;    --collator \&#xD;&#xA;    --force-authoring \&#xD;&#xA;    --chain raw-parachain-chainspec.json \&#xD;&#xA;    --base-path /tmp/parachain/alice \&#xD;&#xA;    --port 40333 \&#xD;&#xA;    --ws-port 8844 \&#xD;&#xA;    -- \&#xD;&#xA;    --execution wasm \&#xD;&#xA;    --chain ../polkadot/raw-local-chainspec.json \&#xD;&#xA;    --port 30343 \&#xD;&#xA;    --ws-port 9977&#xD;&#xA;&#xD;&#xA;How to specify my custom sercet-key or seed phrase?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24150" PostHistoryTypeId="1" PostId="6304" RevisionGUID="5e360721-9751-468b-9003-db73668d3faa" CreationDate="2022-12-10T19:57:20.570" UserId="3171" Text="Hot to use custom keys for parachain collator instead of predefined Alice or BOB?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24151" PostHistoryTypeId="3" PostId="6304" RevisionGUID="5e360721-9751-468b-9003-db73668d3faa" CreationDate="2022-12-10T19:57:20.570" UserId="3171" Text="|parachain|parachain-collator|substrate-parachain-template|subkey|node-key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24152" PostHistoryTypeId="2" PostId="6305" RevisionGUID="4155b664-f59c-4394-b058-435aba204901" CreationDate="2022-12-10T21:25:03.133" UserId="3142" Text="I have a call to an extrinsic (in Typescript) that is failing but I want to be able to catch the error that the extrinsic is throwing and not just that it failed.&#xD;&#xA;&#xD;&#xA;    const chainEvents: EventMap = await myExtrinsic(api, keys, somedata);&#xD;&#xA;    const failedEvent: Event = chainEvents[&quot;system.ExtrinsicFailed&quot;];&#xD;&#xA;&#xD;&#xA;So how do I find the specific error that the chain is throwing (Rust)?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24154" PostHistoryTypeId="1" PostId="6305" RevisionGUID="4155b664-f59c-4394-b058-435aba204901" CreationDate="2022-12-10T21:25:03.133" UserId="3142" Text="Extracting error from system.ExtrinsicFailed" ContentLicense="CC BY-SA 4.0" />
  <row Id="24155" PostHistoryTypeId="3" PostId="6305" RevisionGUID="4155b664-f59c-4394-b058-435aba204901" CreationDate="2022-12-10T21:25:03.133" UserId="3142" Text="|polkadot-js|extrinsic|error|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24156" PostHistoryTypeId="5" PostId="6305" RevisionGUID="25612796-dddb-4002-b97b-cc2d11a74793" CreationDate="2022-12-10T21:48:31.903" UserId="3142" Comment="added 10 characters in body" Text="I have a call to an extrinsic (in a Typescript client) that is failing but I want to be able to catch the error that the extrinsic is throwing and not just that it failed.&#xD;&#xA;&#xD;&#xA;    const chainEvents: EventMap = await myExtrinsic(api, keys, somedata);&#xD;&#xA;    const failedEvent: Event = chainEvents[&quot;system.ExtrinsicFailed&quot;];&#xD;&#xA;&#xD;&#xA;So how do I find the specific error that the chain is throwing (i.e. from Rust)?&#xD;&#xA;&#xD;&#xA;Furthermore, the output isn't very helpful:&#xD;&#xA;&#xD;&#xA;    failedEvent.index=undefined&#xD;&#xA;    failedEvent.method=ExtrinsicFailed&#xD;&#xA;    failedEvent.section=system&#xD;&#xA;    failedEvent.data=undefined&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24157" PostHistoryTypeId="5" PostId="6305" RevisionGUID="e79c6b01-9a45-4836-9f31-38120ed34b39" CreationDate="2022-12-10T21:53:50.530" UserId="3142" Comment="added 29 characters in body" Text="I have a call to an extrinsic (in a Typescript client) that is failing but I want to be able to catch the error that the extrinsic is throwing and not just that it failed.&#xD;&#xA;&#xD;&#xA;    const chainEvents: EventMap = await myExtrinsic(api, keys, somedata);&#xD;&#xA;    const failedEvent: Event = chainEvents[&quot;system.ExtrinsicFailed&quot;];&#xD;&#xA;&#xD;&#xA;So how do I find the specific error that the chain is throwing (i.e. from Rust)?  I want the `DispatchError`.&#xD;&#xA;&#xD;&#xA;Furthermore, the output isn't very helpful:&#xD;&#xA;&#xD;&#xA;    failedEvent.index=undefined&#xD;&#xA;    failedEvent.method=ExtrinsicFailed&#xD;&#xA;    failedEvent.section=system&#xD;&#xA;    failedEvent.data=undefined&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24158" PostHistoryTypeId="2" PostId="6306" RevisionGUID="4ac74d46-6c0e-414d-af2e-dbb0d87e42c8" CreationDate="2022-12-10T23:01:18.017" UserId="167" Text="The underlying reason for this error is the target not not being able to send back large payloads. You need to run against nodes that execute with:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--rpc-max-request-size 100000 &#xD;&#xA;--rpc-max-response-size 100000&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24160" PostHistoryTypeId="2" PostId="6307" RevisionGUID="20cf757c-8f07-46b4-ac98-1c98659f8177" CreationDate="2022-12-10T23:49:39.463" UserId="275" Text="ink! `v4.0.0` release is incoming. As mentioned in [`v4.0.0` pre-release page][1], substrate pallet-contracts later than [this commit][2] (shows up in [polkadot-v0.9.32][3] branch for the first time) start to support ink! `v4.0.0`.&#xD;&#xA;&#xD;&#xA;Are there any incompatibility issues with ink! v3.4.0 or lower? which contracts developers need to keep in mind.&#xD;&#xA;If yes, what exactly are they?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/releases/tag/v4.0.0-beta&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/commit/265e3f12a2937fe4f71280b3652471627609d04f&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.32" ContentLicense="CC BY-SA 4.0" />
  <row Id="24162" PostHistoryTypeId="1" PostId="6307" RevisionGUID="20cf757c-8f07-46b4-ac98-1c98659f8177" CreationDate="2022-12-10T23:49:39.463" UserId="275" Text="pallet-contracts and ink! version (v3.x.x &amp; v4.0.0) compatibility" ContentLicense="CC BY-SA 4.0" />
  <row Id="24163" PostHistoryTypeId="3" PostId="6307" RevisionGUID="20cf757c-8f07-46b4-ac98-1c98659f8177" CreationDate="2022-12-10T23:49:39.463" UserId="275" Text="|ink|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24164" PostHistoryTypeId="5" PostId="6307" RevisionGUID="109402eb-860b-44dc-ad75-c2b9b6422797" CreationDate="2022-12-10T23:59:39.330" UserId="275" Comment="added 9 characters in body" Text="ink! `v4.0.0` release is incoming. As mentioned in [`v4.0.0` pre-release page][1], substrate pallet-contracts later than [this commit][2] (shows up in [polkadot-v0.9.32][3] branch for the first time) start to support ink! `v4.0.0`.&#xD;&#xA;&#xD;&#xA;Are there any backward incompatibility issues with ink! v3.4.0 or lower? which contracts developers need to keep in mind.&#xD;&#xA;If yes, what exactly are they?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/releases/tag/v4.0.0-beta&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/commit/265e3f12a2937fe4f71280b3652471627609d04f&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.32" ContentLicense="CC BY-SA 4.0" />
  <row Id="24166" PostHistoryTypeId="4" PostId="6304" RevisionGUID="ac2e9e22-2dc1-471d-9fff-2dc166a98de9" CreationDate="2022-12-11T06:12:57.917" UserId="494" Comment="fix typo on title" Text="How to use custom keys for parachain collator instead of predefined Alice or Bob?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24167" PostHistoryTypeId="24" PostId="6304" RevisionGUID="ac2e9e22-2dc1-471d-9fff-2dc166a98de9" CreationDate="2022-12-11T06:12:57.917" Comment="Proposed by 494 approved by 34 edit id of 354" ContentLicense="CC BY-SA 4.0" />
  <row Id="24168" PostHistoryTypeId="2" PostId="6308" RevisionGUID="6dca1678-fbf9-4b8a-813a-1aebef297f5c" CreationDate="2022-12-11T11:07:51.480" UserId="3559" Text="I don't want to compile rocks-db at all. how it would be possible compile parity-db instead of rocks-db?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24170" PostHistoryTypeId="1" PostId="6308" RevisionGUID="6dca1678-fbf9-4b8a-813a-1aebef297f5c" CreationDate="2022-12-11T11:07:51.480" UserId="3559" Text="usage parity-db instead of rocksdb" ContentLicense="CC BY-SA 4.0" />
  <row Id="24171" PostHistoryTypeId="3" PostId="6308" RevisionGUID="6dca1678-fbf9-4b8a-813a-1aebef297f5c" CreationDate="2022-12-11T11:07:51.480" UserId="3559" Text="|substrate-node-template|rust|blockchain|rocks-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24172" PostHistoryTypeId="5" PostId="6284" RevisionGUID="277b4ce1-e043-4da8-9a8d-ed60270592e8" CreationDate="2022-12-11T11:12:40.070" UserId="3553" Comment="added 255 characters in body" Text="I would like to know how to achieve native token transfers between different accounts in ink? For example, I would like to initiate transfer from Alice(which will be the caller) to Bob within a method, how should I do? The transferred value should be calculated within the method which cannot be predetermined, thus cannot be included with the call and cannot be read by self.env().transferred_value(). So far I could only find `self.env().transfer()` for transfers from contract to an address. It should be something similar to `to.call{value}(“”)` in solidity.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24173" PostHistoryTypeId="5" PostId="6308" RevisionGUID="2c9ea925-04d6-4065-8e5b-66307c4b3373" CreationDate="2022-12-11T11:47:25.133" UserId="3559" Comment="added 38 characters in body" Text="in the substrate-node-template case , I don't want to compile rocks-db at all. how it would be possible compile parity-db instead of rocks-db?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24174" PostHistoryTypeId="2" PostId="6309" RevisionGUID="be2935a2-4152-434b-bc71-be8c94263161" CreationDate="2022-12-12T04:53:26.923" UserId="354" Text="The custom key you need to add for collator is `Aura` key, which is of format `sr25519`, which are already defined in the `chain_spec.rs` of parachain-template for Alice and Bob, what you need to do is to add the `sr25519` in the `customSpec.json` of the parachain node for custom collator and add it via the `insert_key` rpc to the node. You can also refer to this [https://substrate.stackexchange.com/questions/5397/how-to-properly-set-session-keys-for-relay-and-parachain-with-custom-keys][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5397/how-to-properly-set-session-keys-for-relay-and-parachain-with-custom-keys" ContentLicense="CC BY-SA 4.0" />
  <row Id="24176" PostHistoryTypeId="2" PostId="6310" RevisionGUID="d49abe02-a32b-42ed-bb96-6b37103f8b00" CreationDate="2022-12-12T08:38:01.307" UserId="707" Text="Yes, there is a .NET library that is dynamically generated from your node's metadata. The current name is a little bit misleading as it is a generic toolchain that works for all substrate-based nodes and is not specific to a project.&#xD;&#xA;&#xD;&#xA;Substrate C# Toolchain that generates a NET API and more https://github.com/ajuna-network/Ajuna.SDK&#xD;&#xA;&#xD;&#xA;And has a lot of tutorials and was showcased at the Sub0 in Lisabon.&#xD;&#xA;[Ajuna sub0 Talk: Substrate .NET Toolchain &amp; Unity][1]&#xD;&#xA;&#xD;&#xA;And can also be used for [Unity][2] or [Maui][3]&#xD;&#xA;https://substrate.stackexchange.com/a/5565/707&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ajuna-network/ajuna-sub0&#xD;&#xA;  [2]: https://unity.com/&#xD;&#xA;  [3]: https://learn.microsoft.com/en-us/dotnet/maui/what-is-maui?view=net-maui-7.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="24178" PostHistoryTypeId="2" PostId="6311" RevisionGUID="8760fdba-a039-4718-af26-a1076d07b3ad" CreationDate="2022-12-12T08:38:09.313" UserId="3577" Text="I want to add my dot address to the trust wallet. For that I need the private key. How to transform the mnemonic to the private key." ContentLicense="CC BY-SA 4.0" />
  <row Id="24180" PostHistoryTypeId="1" PostId="6311" RevisionGUID="8760fdba-a039-4718-af26-a1076d07b3ad" CreationDate="2022-12-12T08:38:09.313" UserId="3577" Text="How to obtain the private key from the mnemonic phrase?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24181" PostHistoryTypeId="3" PostId="6311" RevisionGUID="8760fdba-a039-4718-af26-a1076d07b3ad" CreationDate="2022-12-12T08:38:09.313" UserId="3577" Text="|polkadot|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24182" PostHistoryTypeId="5" PostId="6301" RevisionGUID="5ffd2cd6-e91e-4417-9839-de58fd88fcab" CreationDate="2022-12-12T09:11:12.627" UserId="251" Comment="added 6 characters in body" Text="You can recover the private key but not the mnemonic seed because it uses a one-way algorithm.&#xD;&#xA;&#xD;&#xA;I don't feel familiar with the keystone to private key.&#xD;&#xA;&#xD;&#xA;But I got an idea. Maybe you could use this method https://paritytech.github.io/substrate/master/sp_application_crypto/sr25519/struct.Pair.html#method.from_entropy to get the private key.&#xD;&#xA;&#xD;&#xA;But I don't know how to deal with the keystone file.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;	&quot;encoded&quot;: &quot;...&quot;,&#xD;&#xA;	&quot;encoding&quot;: {&#xD;&#xA;		&quot;content&quot;: [&#xD;&#xA;			&quot;pkcs8&quot;,&#xD;&#xA;			&quot;sr25519&quot;&#xD;&#xA;		],&#xD;&#xA;		&quot;type&quot;: [&#xD;&#xA;			&quot;scrypt&quot;,&#xD;&#xA;			&quot;xsalsa20-poly1305&quot;&#xD;&#xA;		],&#xD;&#xA;		&quot;version&quot;: &quot;3&quot;&#xD;&#xA;	},&#xD;&#xA;	&quot;address&quot;: &quot;...&quot;,&#xD;&#xA;	&quot;meta&quot;: {&#xD;&#xA;		&quot;genesisHash&quot;: &quot;...&quot;,&#xD;&#xA;		&quot;isHardware&quot;: false,&#xD;&#xA;		&quot;name&quot;: &quot;1&quot;,&#xD;&#xA;		&quot;tags&quot;: [],&#xD;&#xA;		&quot;whenCreated&quot;: 1670590064209&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It looks like that we need to decode the `encoded` field to get the raw `entropy` first." ContentLicense="CC BY-SA 4.0" />
  <row Id="24183" PostHistoryTypeId="2" PostId="6312" RevisionGUID="addaa545-9128-4efa-9398-383d819061cb" CreationDate="2022-12-12T10:58:27.387" UserId="3577" Text="I want to transfer the management of my dot account from polkadat.js to trustwallet. The problem I am facing is that the same mnemonic give different key in those applications. How to deal with that? How to add the dot account to my trust wallet? I have both mnemonic phrase and the recovery json file stored.&#xD;&#xA;&#xD;&#xA;Test mnemonic: neck glance normal build soccer reason cotton island story control lemon theme&#xD;&#xA;&#xD;&#xA;public key on polkadot.js: 162LT7DYzo3iHGfk3RDpZWeYq5NUxxmvZCFUMTAwuFYZYp89&#xD;&#xA;&#xD;&#xA;public key in trust wallet: 16GEpjTJJgSX9Saoe7Y7uTDX78h6bAB6uiHhnXJ9AFXmUxby" ContentLicense="CC BY-SA 4.0" />
  <row Id="24185" PostHistoryTypeId="1" PostId="6312" RevisionGUID="addaa545-9128-4efa-9398-383d819061cb" CreationDate="2022-12-12T10:58:27.387" UserId="3577" Text="Same mnemonic gives different keys in trust wallet and in polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="24186" PostHistoryTypeId="3" PostId="6312" RevisionGUID="addaa545-9128-4efa-9398-383d819061cb" CreationDate="2022-12-12T10:58:27.387" UserId="3577" Text="|key|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24187" PostHistoryTypeId="2" PostId="6313" RevisionGUID="aa924311-ea36-49eb-ba14-83e8e828474a" CreationDate="2022-12-12T11:04:28.427" UserId="3035" Text="What also has helped me, is `pallet` option of a `live` subcommand (uploads only a state of a pallet).&#xD;&#xA;Since my test was requiring only a state of a particular pallet, with the option I could do that. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24189" PostHistoryTypeId="5" PostId="6307" RevisionGUID="fa02732b-d71b-406f-a0db-249acc4130a9" CreationDate="2022-12-12T11:46:15.197" UserId="275" Comment="deleted 1 character in body" Text="ink! `v4.0.0` release is incoming. As mentioned in [`v4.0.0` pre-release page][1], substrate pallet-contracts later than [this commit][2] (shows up in [polkadot-v0.9.32][3] branch for the first time) start to support ink! `v4.0.0`.&#xD;&#xA;&#xD;&#xA;Are there any backward incompatibility issues with ink! v3.4.0 or lower? which contracts developers need to be aware of.&#xD;&#xA;If yes, what exactly are they?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/releases/tag/v4.0.0-beta&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/commit/265e3f12a2937fe4f71280b3652471627609d04f&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/polkadot-v0.9.32" ContentLicense="CC BY-SA 4.0" />
  <row Id="24190" PostHistoryTypeId="2" PostId="6314" RevisionGUID="5e7b3a16-d01b-42b6-8dcd-d8bdb8738206" CreationDate="2022-12-12T12:59:41.367" UserId="3563" Text="As a title, I'd like to confirm that api.query.session.validators interface return a Collators list on Astar Network to check if our collator works well." ContentLicense="CC BY-SA 4.0" />
  <row Id="24192" PostHistoryTypeId="1" PostId="6314" RevisionGUID="5e7b3a16-d01b-42b6-8dcd-d8bdb8738206" CreationDate="2022-12-12T12:59:41.367" UserId="3563" Text="Does api.query.session.validators return a Collators list on Astar Network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24193" PostHistoryTypeId="3" PostId="6314" RevisionGUID="5e7b3a16-d01b-42b6-8dcd-d8bdb8738206" CreationDate="2022-12-12T12:59:41.367" UserId="3563" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24194" PostHistoryTypeId="2" PostId="6315" RevisionGUID="2e41b4e5-b46d-4515-bba1-05d1326cc219" CreationDate="2022-12-12T13:01:19.300" UserId="1947" Text="Recently tried to run a collator node with --sync warp flags. The node exited with error &quot;Warp sync enabled, but no warp sync provider configured&quot;. I was not able to find any more info on this. How can we configure a warp provider to run a parachain collator in warp mode?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24196" PostHistoryTypeId="1" PostId="6315" RevisionGUID="2e41b4e5-b46d-4515-bba1-05d1326cc219" CreationDate="2022-12-12T13:01:19.300" UserId="1947" Text="How can we start a node in warp sync mode?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24197" PostHistoryTypeId="3" PostId="6315" RevisionGUID="2e41b4e5-b46d-4515-bba1-05d1326cc219" CreationDate="2022-12-12T13:01:19.300" UserId="1947" Text="|parachain-collator|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24198" PostHistoryTypeId="2" PostId="6316" RevisionGUID="8163c7b6-7353-4422-bb6a-95ae074ad455" CreationDate="2022-12-12T13:26:20.847" UserId="251" Text="I think you might need these codes.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/441106ecbe2bc843adb248c8fab346af58ed9ffc/node/service/src/lib.rs#L908-L923d&#xD;&#xA;&#xD;&#xA;But I think this can only be enabled for the relay chain. (if I'm wrong, please correct me)" ContentLicense="CC BY-SA 4.0" />
  <row Id="24200" PostHistoryTypeId="2" PostId="6317" RevisionGUID="59069920-4750-4e72-aab3-fddfa34f78d7" CreationDate="2022-12-12T13:36:07.793" UserId="251" Text="Yes. It returns a list of current validators.&#xD;&#xA;&#xD;&#xA;Check https://github.com/paritytech/substrate/blob/e5d5d88d0d0e79042393c8bc85e5e9ebe6a24000/frame/session/src/lib.rs#L502-L505.&#xD;&#xA;&#xD;&#xA;But it doesn't mean your collator works well. Suppose your collator stops producing/collecting blocks. It might still be on the list for a while." ContentLicense="CC BY-SA 4.0" />
  <row Id="24202" PostHistoryTypeId="5" PostId="6305" RevisionGUID="e215ef83-686c-43e5-832c-566cc83f9b00" CreationDate="2022-12-12T14:16:55.650" UserId="3142" Comment="Added UI screenshot" Text="I have a call to an extrinsic (in a Typescript client) that is failing but I want to be able to catch the error that the extrinsic is throwing and not just that it failed.&#xD;&#xA;&#xD;&#xA;    const chainEvents: EventMap = await myExtrinsic(api, keys, somedata);&#xD;&#xA;    const failedEvent: Event = chainEvents[&quot;system.ExtrinsicFailed&quot;];&#xD;&#xA;&#xD;&#xA;So how do I find the specific error that the chain is throwing (i.e. from Rust)?  I want the `DispatchError`.&#xD;&#xA;&#xD;&#xA;Furthermore, the output isn't very helpful:&#xD;&#xA;&#xD;&#xA;    failedEvent.index=undefined&#xD;&#xA;    failedEvent.method=ExtrinsicFailed&#xD;&#xA;    failedEvent.section=system&#xD;&#xA;    failedEvent.data=undefined&#xD;&#xA;&#xD;&#xA;[![Error from call to api][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Error in Polkadot.js UI][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/y7GC7.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/YeeKH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24203" PostHistoryTypeId="10" PostId="6311" RevisionGUID="92f590b8-fd67-490e-b51c-9d2394971777" CreationDate="2022-12-12T15:12:17.450" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[2585],&quot;Voters&quot;:[{&quot;Id&quot;:2673,&quot;DisplayName&quot;:&quot;Adam Wierzbicki&quot;},{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="24204" PostHistoryTypeId="5" PostId="6234" RevisionGUID="9a05469a-9761-4068-bf9c-b30a82dc664e" CreationDate="2022-12-12T15:31:21.687" UserId="3475" Comment="added 613 characters in body" Text="I have an issue regarding displaying errors. For errors, the logger @polkadot/api uses will write to console even when the error is caught and handled. I am handling and displaying the messages a certain way to fit my needs but then I recieve two errors, one I created and one from the @polkadot/api .&#xD;&#xA;Is there a way to suppress @polkadot/api messages?&#xD;&#xA;&#xD;&#xA;```const httpProvider = new HttpProvider(this.endpoint, this.config.headers);&#xD;&#xA;this.provider = ApiPromise.create({ provider: httpProvider, noInitWarn: true });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the provider initialization which is in the class constructor.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;try {&#xD;&#xA;    this.provider = await this.provider;&#xD;&#xA;    const nonce = await this.provider.rpc.system.accountNextIndex(address);&#xD;&#xA;    return nonce;&#xD;&#xA;}&#xD;&#xA;catch (e) {&#xD;&#xA;    console.log(e);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I am creating a separate class methods in which I make requests to the node. In the perfect case scenario after receiving an error I would like to handle it on my own without being displayed in the console.&#xD;&#xA;&#xD;&#xA;Best regards!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24208" PostHistoryTypeId="2" PostId="6319" RevisionGUID="9b93f5ef-267f-46e8-8103-bf4a0339a5a1" CreationDate="2022-12-12T17:02:40.557" UserId="167" Text="I am confused about the behavior of the `check-block` command. I was expecting it to re-execute the block, but it seems like this is not the case. &#xD;&#xA;&#xD;&#xA;For example, the following command: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;➜  ~ RUST_LOG=runtime=trace,executor=trace,info ./polkadot check-block --database paritydb --base-path ... --wasm-runtime-overrides ./wasm --chain kusama 0x7a0fcaf6fde9be14aeaf57b84a95f4286ba8d9435bd9c5426a1fbfd0954e8bd6&#xD;&#xA;&#xD;&#xA;2022-12-12 16:58:15.286  INFO main wasm_overrides: Found wasm override. version=kusama-9340 (parity-kusama-0.tx17.au2) file=./wasm/kusama_runtime.wasm&#xD;&#xA;2022-12-12 16:58:17.993 TRACE main executor: Executing function function=BabeApi_configuration&#xD;&#xA;2022-12-12 16:58:20.618 TRACE main executor: Request for native execution failed native=kusama-9300 (parity-kusama-0.tx14.au2) chain=kusama-9340 (parity-kusama-0.tx17.au2)&#xD;&#xA;2022-12-12 16:58:20.922 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `txpool-background` failed. Shutting down service.&#xD;&#xA;2022-12-12 16:58:20.922 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `transaction-pool-task-0` failed. Shutting down service.&#xD;&#xA;2022-12-12 16:58:20.922 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `transaction-pool-task-1` failed. Shutting down service.&#xD;&#xA;Completed in 207 ms.&#xD;&#xA;2022-12-12 16:58:21.129  INFO                 main sc_service::chain_ops::import_blocks:  Imported 1 blocks. Best: #15719798&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Interestingly, the `executor` logs show that `Core_execute_block` runtime API was not called. &#xD;&#xA;&#xD;&#xA;My goal is to re-execute the previous block(s) with a `--wasm-override` that does NOT have the runtime logs disabled, so I can see all the runtime logs. &#xD;&#xA;&#xD;&#xA;So, the real question is, what is `check-block` even doing, and if it is not the above requirement, what alternative exist? `try-runtime-cli` has a command that can also execute past blocks, but it is a bit harder to work with. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24210" PostHistoryTypeId="1" PostId="6319" RevisionGUID="9b93f5ef-267f-46e8-8103-bf4a0339a5a1" CreationDate="2022-12-12T17:02:40.557" UserId="167" Text="`check-blocks` command not re-executing the block" ContentLicense="CC BY-SA 4.0" />
  <row Id="24211" PostHistoryTypeId="3" PostId="6319" RevisionGUID="9b93f5ef-267f-46e8-8103-bf4a0339a5a1" CreationDate="2022-12-12T17:02:40.557" UserId="167" Text="|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24212" PostHistoryTypeId="5" PostId="6305" RevisionGUID="90741a83-1cf3-4d9e-ae7f-f84be788c184" CreationDate="2022-12-12T19:20:58.663" UserId="3142" Comment="added mention of RxJS" Text="I have a call to an extrinsic (in a Typescript/RxJS client) that is failing but I want to be able to catch the error that the extrinsic is throwing and not just that it failed.&#xD;&#xA;&#xD;&#xA;    const chainEvents: EventMap = await myExtrinsic(api, keys, somedata);&#xD;&#xA;    const failedEvent: Event = chainEvents[&quot;system.ExtrinsicFailed&quot;];&#xD;&#xA;&#xD;&#xA;So how do I find the specific error that the chain is throwing (i.e. from Rust)?  I want the `DispatchError`.&#xD;&#xA;&#xD;&#xA;Furthermore, the output isn't very helpful:&#xD;&#xA;&#xD;&#xA;    failedEvent.index=undefined&#xD;&#xA;    failedEvent.method=ExtrinsicFailed&#xD;&#xA;    failedEvent.section=system&#xD;&#xA;    failedEvent.data=undefined&#xD;&#xA;&#xD;&#xA;[![Error from call to api][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Error in Polkadot.js UI][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/y7GC7.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/YeeKH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24213" PostHistoryTypeId="2" PostId="6320" RevisionGUID="aa5fed4b-ea3f-41e9-881d-d80e033eda3a" CreationDate="2022-12-12T20:32:15.140" UserId="83" Text="Prior to cloning the [substrate-front-end-template](https://github.com/substrate-developer-hub/substrate-front-end-template) repo with tag [&quot;monthly-2022-02&quot;](https://github.com/substrate-developer-hub/substrate-front-end-template/releases/tag/monthly-2022-02) I installed the following:&#xD;&#xA;* Yarn 1.22.19 (running `yarn --version` outputs `1.22.19`). This was bundled with node:gallium-alpine pre-built Docker image.&#xD;&#xA;* Node.js LTS v16.18.1 (matching contents of .nvmrc that includes `lts/gallium` and since the CircleCI .circleci/config.yml file is using Node.js 16.14)&#xD;&#xA;&#xD;&#xA;But it appeared as though the repository required Yarn 3.1.1 (hence why there is a .yarn folder containing .yarn/releases/yarn-3.1.1.cjs and a file called .yarnrc.yml whose contents include the line `yarnPath: .yarn/releases/yarn-3.1.1.cjs`)&#xD;&#xA;&#xD;&#xA;But after you clone the repo, install dependencies, and start the server, as follows:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;cd substrate-front-end-template&#xD;&#xA;yarn &amp;&amp; yarn start&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It is then using:&#xD;&#xA;* Yarn 3.1.1 (running `yarn --version` outputs `3.1.1`).&#xD;&#xA;&#xD;&#xA;And it outputs error:&#xD;&#xA;```bash&#xD;&#xA;Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24215" PostHistoryTypeId="1" PostId="6320" RevisionGUID="aa5fed4b-ea3f-41e9-881d-d80e033eda3a" CreationDate="2022-12-12T20:32:15.140" UserId="83" Text="Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)" ContentLicense="CC BY-SA 4.0" />
  <row Id="24216" PostHistoryTypeId="3" PostId="6320" RevisionGUID="aa5fed4b-ea3f-41e9-881d-d80e033eda3a" CreationDate="2022-12-12T20:32:15.140" UserId="83" Text="|polkadot-js|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24217" PostHistoryTypeId="2" PostId="6321" RevisionGUID="d7d2382d-78e5-4b0c-ad0f-1e506b7c11f0" CreationDate="2022-12-12T20:32:15.140" UserId="83" Text="The error appears to be due to a conflict between Yarn versions or an incompatible Yarn version.&#xD;&#xA;&#xD;&#xA;Resolving the issue involved upgrading to Yarn 3.3.0 before running `yarn start`, as follows:&#xD;&#xA;&#xD;&#xA;Remove the .yarn directory. Temporarily backup .yarnrc.yml by renaming it to .yarnrc.yml.old since it has some extra lines of code at the top of the file to retain and reuse when we re-create the file.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;rm -rf .yarn &amp;&amp; mv .yarnrc.yml .yarnrc.yml.old&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running the following to create re-create the .yarn folder with latest Yarn v3.3.0, whilst also re-creating .yarnrc.yml with Yarn v3.3.0 (now with contents `yarnPath: .yarn/releases/yarn-3.3.0.cjs`)&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;yarn policies set-version 3.3.0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Copy remainder of .yarnrc.yml.old back into .yarnrc.yml, so the file became:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;nodeLinker: node-modules&#xD;&#xA;&#xD;&#xA;plugins:&#xD;&#xA;  - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs&#xD;&#xA;    spec: &quot;@yarnpkg/plugin-interactive-tools&quot;&#xD;&#xA;&#xD;&#xA;yarnPath: .yarn/releases/yarn-3.3.0.cjs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Followed these [Yarn instructions](https://yarnpkg.com/getting-started/install) to install its Corepack and the latest Yarn 3.3.0 (since I was using Alpine Linux it was necessary to install Git first since it uses that dependency), then after doing that I was able to run `yarn start` without issue. &#xD;&#xA;&#xD;&#xA;Alpine Linux&#xD;&#xA;```bash&#xD;&#xA;apk update &amp;&amp; apk add --update git &amp;&amp; rm -rf /var/cache/apk/*&#xD;&#xA;corepack enable \&#xD;&#xA;    &amp;&amp; corepack prepare yarn@stable --activate \&#xD;&#xA;    &amp;&amp; yarn set version 3.3.0 \&#xD;&#xA;    &amp;&amp; yarn install&#xD;&#xA;    &amp;&amp; yarn start&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: If you're using Ubuntu rather than Alpine Linux then you'd instead install git with:&#xD;&#xA;```&#xD;&#xA;apt-get update &amp;&amp; apt-get install -y git&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://github.com/substrate-developer-hub/substrate-front-end-template/issues/259" ContentLicense="CC BY-SA 4.0" />
  <row Id="24219" PostHistoryTypeId="2" PostId="6322" RevisionGUID="4d33eca2-43f5-4ede-8a7e-3e1af5e16964" CreationDate="2022-12-12T20:37:23.723" UserId="2163" Text="If I wanted to do some basic arithmetic operations on some weight it would be possible to do so using `saturating_*` methods.&#xD;&#xA;&#xD;&#xA;But what if I wanted to multiply it with a fraction(e.g. Perbill)?&#xD;&#xA;How could I convert the weight into `u64` so that I can do the above mentioned operation, and how could I convert it back to the `Weight` type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24221" PostHistoryTypeId="1" PostId="6322" RevisionGUID="4d33eca2-43f5-4ede-8a7e-3e1af5e16964" CreationDate="2022-12-12T20:37:23.723" UserId="2163" Text="How to convert Weight to u64 and the other way around" ContentLicense="CC BY-SA 4.0" />
  <row Id="24222" PostHistoryTypeId="3" PostId="6322" RevisionGUID="4d33eca2-43f5-4ede-8a7e-3e1af5e16964" CreationDate="2022-12-12T20:37:23.723" UserId="2163" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24223" PostHistoryTypeId="5" PostId="6320" RevisionGUID="c5c99f0d-43d3-43aa-9fce-74c716c7277a" CreationDate="2022-12-12T20:49:16.367" UserId="83" Comment="specifically mention that I was using Alpine Linux" Text="Prior to cloning the [substrate-front-end-template](https://github.com/substrate-developer-hub/substrate-front-end-template) repo with tag [&quot;monthly-2022-02&quot;](https://github.com/substrate-developer-hub/substrate-front-end-template/releases/tag/monthly-2022-02) I installed the following since I was building it from a Dockerfile using pre-built Docker image node:gallium-alpine:&#xD;&#xA;* Yarn 1.22.19 (running `yarn --version` outputs `1.22.19`). This was bundled with node:gallium-alpine pre-built Docker image.&#xD;&#xA;* Node.js LTS v16.18.1 (matching contents of .nvmrc that includes `lts/gallium` and since the CircleCI .circleci/config.yml file is using Node.js 16.14)&#xD;&#xA;&#xD;&#xA;But it appeared as though the repository required Yarn 3.1.1 (hence why there is a .yarn folder containing .yarn/releases/yarn-3.1.1.cjs and a file called .yarnrc.yml whose contents include the line `yarnPath: .yarn/releases/yarn-3.1.1.cjs`)&#xD;&#xA;&#xD;&#xA;But after you clone the repo, install dependencies, and start the server, as follows:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;cd substrate-front-end-template&#xD;&#xA;yarn &amp;&amp; yarn start&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It was then using:&#xD;&#xA;* Yarn 3.1.1 (running `yarn --version` outputs `3.1.1`).&#xD;&#xA;&#xD;&#xA;And it outputs error:&#xD;&#xA;```bash&#xD;&#xA;Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24224" PostHistoryTypeId="5" PostId="6321" RevisionGUID="daa51188-d143-4ac9-a804-829eb150738d" CreationDate="2022-12-12T20:50:09.623" UserId="83" Comment="specifically mention that I was using Alpine Linux" Text="The error appears to be isolated to use on Alpine Linux or due to a conflict between Yarn versions or an incompatible Yarn version.&#xD;&#xA;&#xD;&#xA;Resolving the issue involved upgrading to Yarn 3.3.0 before running `yarn start`, as follows:&#xD;&#xA;&#xD;&#xA;Remove the .yarn directory. Temporarily backup .yarnrc.yml by renaming it to .yarnrc.yml.old since it has some extra lines of code at the top of the file to retain and reuse when we re-create the file.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;rm -rf .yarn &amp;&amp; mv .yarnrc.yml .yarnrc.yml.old&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running the following to create re-create the .yarn folder with latest Yarn v3.3.0, whilst also re-creating .yarnrc.yml with Yarn v3.3.0 (now with contents `yarnPath: .yarn/releases/yarn-3.3.0.cjs`)&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;yarn policies set-version 3.3.0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Copy remainder of .yarnrc.yml.old back into .yarnrc.yml, so the file became:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;nodeLinker: node-modules&#xD;&#xA;&#xD;&#xA;plugins:&#xD;&#xA;  - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs&#xD;&#xA;    spec: &quot;@yarnpkg/plugin-interactive-tools&quot;&#xD;&#xA;&#xD;&#xA;yarnPath: .yarn/releases/yarn-3.3.0.cjs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Followed these [Yarn instructions](https://yarnpkg.com/getting-started/install) to install its Corepack and the latest Yarn 3.3.0 (since I was using Alpine Linux it was necessary to install Git first since it uses that dependency), then after doing that I was able to run `yarn start` without issue. &#xD;&#xA;&#xD;&#xA;Alpine Linux&#xD;&#xA;```bash&#xD;&#xA;apk update &amp;&amp; apk add --update git &amp;&amp; rm -rf /var/cache/apk/*&#xD;&#xA;corepack enable \&#xD;&#xA;    &amp;&amp; corepack prepare yarn@stable --activate \&#xD;&#xA;    &amp;&amp; yarn set version 3.3.0 \&#xD;&#xA;    &amp;&amp; yarn install&#xD;&#xA;    &amp;&amp; yarn start&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: If you're using Ubuntu rather than Alpine Linux then you'd instead install git with:&#xD;&#xA;```&#xD;&#xA;apt-get update &amp;&amp; apt-get install -y git&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://github.com/substrate-developer-hub/substrate-front-end-template/issues/259" ContentLicense="CC BY-SA 4.0" />
  <row Id="24225" PostHistoryTypeId="52" PostId="6314" RevisionGUID="a21ba322-1eb7-46e9-948b-7bd16cde29ae" CreationDate="2022-12-12T21:05:37.507" />
  <row Id="24226" PostHistoryTypeId="2" PostId="6323" RevisionGUID="9e38e19d-d080-4b7f-a8cb-446a32cdfd6f" CreationDate="2022-12-12T22:25:29.527" UserId="94" Text="&gt;How to convert Weight to u64 and the other way around&#xD;&#xA;&#xD;&#xA;You cannot convert `Weigth` to a single `u64`, since it is (currently) two dimensional. You can split and construct it from its components like this:  &#xD;&#xA;```rust&#xD;&#xA;let weight = Weight::from_parts(10, 20);&#xD;&#xA;let ref_time = weight.ref_time();&#xD;&#xA;let proof_size = weight.proof_size();&#xD;&#xA;let weight = Weight::from_parts(ref_time, proof_size);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt;But what if I wanted to multiply it with a fraction(e.g. Perbill)?&#xD;&#xA;&#xD;&#xA;Well... just do it?  &#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn per_thing_mul_works() {&#xD;&#xA;	let weight = Weight::from_parts(80, 60);&#xD;&#xA;	let half = sp_arithmetic::Perbill::from_percent(50);&#xD;&#xA;&#xD;&#xA;	assert_eq!(weight * half, Weight::from_parts(40, 30));&#xD;&#xA;	assert_eq!(half * weight, Weight::from_parts(40, 30));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24228" PostHistoryTypeId="5" PostId="6321" RevisionGUID="afe72e48-2e2f-406f-b649-43e791c1dd28" CreationDate="2022-12-12T22:26:29.573" UserId="83" Comment="add more details " Text="The error appears to be isolated to use on Alpine Linux or due to a conflict between Yarn versions or an incompatible Yarn version. Unfortunately I can't seem to replicate the issue again, but the follow are steps I followed to resolve it.&#xD;&#xA;&#xD;&#xA;Resolving the issue involved upgrading to Yarn 3.3.0 before running `yarn start`, as follows:&#xD;&#xA;&#xD;&#xA;Remove the .yarn directory. Temporarily backup .yarnrc.yml by renaming it to .yarnrc.yml.old since it has some extra lines of code at the top of the file to retain and reuse when we re-create the file.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;rm -rf .yarn &amp;&amp; mv .yarnrc.yml .yarnrc.yml.old&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running the following to create re-create the .yarn folder with latest Yarn v3.3.0, whilst also re-creating .yarnrc.yml with Yarn v3.3.0 (now with contents `yarnPath: .yarn/releases/yarn-3.3.0.cjs`)&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;yarn policies set-version 3.3.0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Copy remainder of .yarnrc.yml.old back into .yarnrc.yml, so the file became:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;nodeLinker: node-modules&#xD;&#xA;&#xD;&#xA;plugins:&#xD;&#xA;  - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs&#xD;&#xA;    spec: &quot;@yarnpkg/plugin-interactive-tools&quot;&#xD;&#xA;&#xD;&#xA;yarnPath: .yarn/releases/yarn-3.3.0.cjs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Followed these [Yarn instructions](https://yarnpkg.com/getting-started/install) to install its Corepack and the latest Yarn 3.3.0 (since I was using Alpine Linux it was necessary to install Git first since it uses that dependency), then after doing that I was able to run `yarn start` without issue. &#xD;&#xA;&#xD;&#xA;Alpine Linux&#xD;&#xA;```bash&#xD;&#xA;apk update &amp;&amp; apk add --update git &amp;&amp; rm -rf /var/cache/apk/*&#xD;&#xA;corepack enable \&#xD;&#xA;    &amp;&amp; corepack prepare yarn@stable --activate \&#xD;&#xA;    &amp;&amp; yarn set version 3.3.0 \&#xD;&#xA;    &amp;&amp; yarn install&#xD;&#xA;    &amp;&amp; yarn start&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: If you're using Ubuntu rather than Alpine Linux then you'd instead install git with:&#xD;&#xA;```&#xD;&#xA;apt-get update &amp;&amp; apt-get install -y git&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://github.com/substrate-developer-hub/substrate-front-end-template/issues/259" ContentLicense="CC BY-SA 4.0" />
  <row Id="24229" PostHistoryTypeId="2" PostId="6324" RevisionGUID="f6631081-fff5-4295-b954-e9fd847e00bd" CreationDate="2022-12-13T08:02:18.233" UserId="2423" Text="I'm writing a client in Go that needs to scan balance transfers in Substrate chains - initially focused on Polkadot.&#xD;&#xA;&#xD;&#xA;My current objective is to determine all balance transfers in a given block, and to record the sender &amp; destination IDs along with the value transferred.&#xD;&#xA;&#xD;&#xA;To simplify decoding &amp; storage access I'm using Sidecar.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Balance Transfer Summary&#xD;&#xA;------------------------&#xD;&#xA;If I understand correctly, balance transfers can be made by methods in the `balances` and `utility` pallets.&#xD;&#xA;&#xD;&#xA;Balance transfer methods in `balances` pallet:&#xD;&#xA;&#xD;&#xA;* `transfer`&#xD;&#xA;* `transferAll`&#xD;&#xA;* `transferKeepAlive`&#xD;&#xA;&#xD;&#xA;Balance transfer methods in `utilities` pallet:&#xD;&#xA;&#xD;&#xA;* `batch`&#xD;&#xA;* `batchAll`&#xD;&#xA;&#xD;&#xA;Data Required&#xD;&#xA;-------------&#xD;&#xA;The data I need is the destination ID, sender ID and the value transferred.&#xD;&#xA;&#xD;&#xA;In all cases, I am getting the sender ID directly from the Extrinsic signature.&#xD;&#xA;&#xD;&#xA;For &quot;standard&quot; balance transfers that use `balances.transfer`, this data is present in the Extrinsic. Westend example [here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwestend-rpc.polkadot.io#/explorer/query/13690231)&#xD;&#xA;&#xD;&#xA;This is not the case for `balances.TransferAll` - the Extrinsic does not directly hold data for `value` of the transfer - this must be obtained from the `balances.Transfer` event for that Extrinsic. Polkadot example [here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/explorer/query/13282388)&#xD;&#xA;&#xD;&#xA;For batched transactions under the `utilities` pallet, data for destination ID and value is obtained by looping over the `Extrinsic.Arg.Calls` and inspecting the `Args` of any balance transfer methods.&#xD;&#xA;&#xD;&#xA;Current Approach&#xD;&#xA;----------------&#xD;&#xA;My app scans for Extrinsics that relate to balance transfers.&#xD;&#xA;&#xD;&#xA;In the case of a `utilities.batch` or `utilities.batchAll`:&#xD;&#xA;&#xD;&#xA;* Get sender ID from Extrinsic&#xD;&#xA;* Loop over the Extrinsic Calls&#xD;&#xA;* Skip Calls whose methods do not relate to balance transfer (`balances` pallet, `transfer`, `transferAll`, `transferKeepAlive` methods)&#xD;&#xA;* Get desination ID and Value for balance transfer events from the call Args&#xD;&#xA;&#xD;&#xA;In the case of `balances.transfer`, `balances.transferAll` or `balances.transferKeepAlive` Extrinsics:&#xD;&#xA;&#xD;&#xA;* Get sender ID from Extrinsic&#xD;&#xA;* Get destination ID from Extrinsic&#xD;&#xA;* Loop over Extrinsic Events&#xD;&#xA;* Skip those that are not: `balances.Transfer`, `balances.TransferAll`, `balances.TransferKeepAlive`&#xD;&#xA;* Get value from the `data` field of the Event&#xD;&#xA;&#xD;&#xA;The `data` field of a balance transfer event as provided by Sidecar is an array of unlabeled strings. For example:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;	&quot;method&quot;: {&#xD;&#xA;		&quot;pallet&quot;: &quot;balances&quot;,&#xD;&#xA;		&quot;method&quot;: &quot;Transfer&quot;&#xD;&#xA;	},&#xD;&#xA;	&quot;data&quot;: [&#xD;&#xA;		&quot;1qnJN7FViy3HZaxZK9tGAA71zxHSBeUweirKqCaox4t8GT7&quot;,&#xD;&#xA;		&quot;15uph1CrsXQgZYKFaumLC7wZEgC6gEnB2fZBpcDejt4xaEGd&quot;,&#xD;&#xA;		&quot;999000000000&quot;&#xD;&#xA;	]&#xD;&#xA;},&#xD;&#xA;&#xD;&#xA;curl http://path-to-polkadot-mainnet-node-with-sidecar:8080/blocks/11555568 | jq '.extrinsics[3].events[3]'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Question&#xD;&#xA;--------&#xD;&#xA;1. Is my understanding of balance transfers correct?&#xD;&#xA;2. Am I missing any potential balance transfer events?&#xD;&#xA;&#xD;&#xA;Most importantly, can I rely on the third element in a balances transfer array provided by sidecar (as shown above) representing value?&#xD;&#xA;&#xD;&#xA;It seems odd that this is not a named field, and it feels hacky accessing this data by means of an array index.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="24231" PostHistoryTypeId="1" PostId="6324" RevisionGUID="f6631081-fff5-4295-b954-e9fd847e00bd" CreationDate="2022-12-13T08:02:18.233" UserId="2423" Text="Parsing Balance Transfer Data" ContentLicense="CC BY-SA 4.0" />
  <row Id="24232" PostHistoryTypeId="3" PostId="6324" RevisionGUID="f6631081-fff5-4295-b954-e9fd847e00bd" CreationDate="2022-12-13T08:02:18.233" UserId="2423" Text="|polkadot|balances|sidecar|substrate-api-sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24233" PostHistoryTypeId="2" PostId="6325" RevisionGUID="8dd0551c-28d3-4b72-a921-16fe3dea2fa9" CreationDate="2022-12-13T11:04:49.010" UserId="3002" Text="Is Kusama parachain auction scheduling broken?&#xD;&#xA;&#xD;&#xA;Looking at [Auction schedule][1], the current action should be **`65`**.&#xD;&#xA;&#xD;&#xA;&gt; Auction #65 is in progress on Kusama, which started on Tue Dec 13 2022 and ends on Mon Dec 19 2022.&#xD;&#xA;&#xD;&#xA;But when checking https://polkadot.js.org/apps it shows that kusama is still in action **`62`** and is inactive:&#xD;&#xA;&#xD;&#xA;[![kusama auction][2]][2]&#xD;&#xA;&#xD;&#xA;Auction **`65`** was supposed to start at block `15724800` but the [scheduled task][3] seems to have failed.&#xD;&#xA;&#xD;&#xA;[![scheduled task][4]][4]&#xD;&#xA;&#xD;&#xA;The image below was taken yesterday on the `scheduler` tab.&#xD;&#xA;&#xD;&#xA;[![scheduled task][5]][5]&#xD;&#xA;&#xD;&#xA;  [1]: https://guide.kusama.network/docs/learn-auction#auction-schedule&#xD;&#xA;  [2]: https://i.stack.imgur.com/l8WRK.png&#xD;&#xA;  [3]: https://kusama.subscan.io/block/15724800?tab=event&amp;&amp;event=15724800-57&#xD;&#xA;  [4]: https://i.stack.imgur.com/dfUzR.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/qy18C.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24235" PostHistoryTypeId="1" PostId="6325" RevisionGUID="8dd0551c-28d3-4b72-a921-16fe3dea2fa9" CreationDate="2022-12-13T11:04:49.010" UserId="3002" Text="Kusama parachain auction scheduling" ContentLicense="CC BY-SA 4.0" />
  <row Id="24236" PostHistoryTypeId="3" PostId="6325" RevisionGUID="8dd0551c-28d3-4b72-a921-16fe3dea2fa9" CreationDate="2022-12-13T11:04:49.010" UserId="3002" Text="|parachain|kusama|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24237" PostHistoryTypeId="2" PostId="6326" RevisionGUID="3771d686-2669-462c-ad96-4ff926fe97a1" CreationDate="2022-12-13T12:34:52.677" UserId="3440" Text="I am working on the substrate contract node to instantiate a contract using RPC call. I use the this [tutorial](https://polkadot.js.org/docs/api-contract/start/code) to do the process. I am getting the message that it is in the block, but not finalized. &#xD;&#xA;```&#xD;&#xA;const code_contract = new CodePromise(api, metadata, wasm_1);&#xD;&#xA;    // console.log(contract)&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;    &#xD;&#xA;    const alicePair = keyring.addFromUri('//Alice', { name: 'Alice default' });&#xD;&#xA;    console.log(alicePair.address);&#xD;&#xA;    const gasLimit = 100000n * 1000000n;&#xD;&#xA;    const storageDepositLimit = null;&#xD;&#xA;    const salt = new Uint8Array();&#xD;&#xA;    const value = 0;&#xD;&#xA;    const initValue = true;&#xD;&#xA;&#xD;&#xA;    const tx = code_contract.tx.new({ gasLimit, storageDepositLimit }, initValue);&#xD;&#xA;    &#xD;&#xA;    const unsub = await tx.signAndSend(alicePair, ({ events =[],contract, status }) =&gt; {&#xD;&#xA;      if (status.isInBlock || status.isFinalized) {&#xD;&#xA;        console.log(status.isInBlock)&#xD;&#xA;        console.log(&quot;type is  &quot;,status.type)&#xD;&#xA;        console.log(status.isFinalized)&#xD;&#xA;        console.log('Included at block hash', status.asInBlock.toHex())&#xD;&#xA;        unsub();&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the following&#xD;&#xA;```&#xD;&#xA;is api connected   :  true&#xD;&#xA;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;true&#xD;&#xA;type is   InBlock&#xD;&#xA;is finalized false&#xD;&#xA;Included at block hash 0x2254bf48bbea0018d939e222e64e42ccb1babf836fbe6f76ac16e8fa230e01fc&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don’t know why isFinalized return false.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The above is when I use substrate-contract-node for running the service.&#xD;&#xA;&#xD;&#xA;For contract I use the basic flipper contract of ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="24239" PostHistoryTypeId="1" PostId="6326" RevisionGUID="3771d686-2669-462c-ad96-4ff926fe97a1" CreationDate="2022-12-13T12:34:52.677" UserId="3440" Text="polkadot RPC instatinate throws error" ContentLicense="CC BY-SA 4.0" />
  <row Id="24240" PostHistoryTypeId="3" PostId="6326" RevisionGUID="3771d686-2669-462c-ad96-4ff926fe97a1" CreationDate="2022-12-13T12:34:52.677" UserId="3440" Text="|substrate-node-template|substrate-contracts-node|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24241" PostHistoryTypeId="2" PostId="6327" RevisionGUID="af028a01-123f-4741-8274-bdbde99e8ef1" CreationDate="2022-12-13T12:51:22.313" UserId="2548" Text="I have the following case: &#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;let contract = Invoice {&#xD;&#xA;  origin: from.clone(),&#xD;&#xA;  to: to.clone(),&#xD;&#xA;  amount,&#xD;&#xA;  status: false,&#xD;&#xA;  id: 17,&#xD;&#xA;  msg: msg.clone(),&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA; let mut invoice_vec: Vec&lt;Invoice&lt;T::AccountId, T::AccountId, BalanceOf&lt;T&gt;&gt;&gt; = Vec::new();&#xD;&#xA; invoice_vec.push(contract);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; // Save in storage the sender and the invoices&#xD;&#xA; &lt;InvoiceSender&lt;T&gt;&gt;::insert(from.clone(), &amp;invoice_vec);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	InvoiceSender::&lt;T&gt;::mutate(&amp;from, |invoice| {&#xD;&#xA;      invoice_vec.iter_mut().filter(|i| i.id == 17).for_each(|i| {&#xD;&#xA;		i.status = false;&#xD;&#xA;		})&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you see, I have created an Invoice object, I have put it inside an array and then I have stored it. &#xD;&#xA;The issue is when I try to mutate one of the contracts.&#xD;&#xA;During debugging I can the line of code ``` i.status = false; ``` is executed but the status is still false, so the state was not mutated.&#xD;&#xA;Can you help me try to understand why? " ContentLicense="CC BY-SA 4.0" />
  <row Id="24243" PostHistoryTypeId="1" PostId="6327" RevisionGUID="af028a01-123f-4741-8274-bdbde99e8ef1" CreationDate="2022-12-13T12:51:22.313" UserId="2548" Text="State/storage does not get mutated" ContentLicense="CC BY-SA 4.0" />
  <row Id="24244" PostHistoryTypeId="3" PostId="6327" RevisionGUID="af028a01-123f-4741-8274-bdbde99e8ef1" CreationDate="2022-12-13T12:51:22.313" UserId="2548" Text="|substrate-node-template|rust|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24245" PostHistoryTypeId="5" PostId="6327" RevisionGUID="64196d3b-78bd-47d5-af9e-bd7845c5d54d" CreationDate="2022-12-13T13:23:07.967" UserId="2548" Comment="deleted 2 characters in body" Text="I have the following case: &#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;let contract = Invoice {&#xD;&#xA;  origin: from.clone(),&#xD;&#xA;  to: to.clone(),&#xD;&#xA;  amount,&#xD;&#xA;  status: false,&#xD;&#xA;  id: 17,&#xD;&#xA;  msg: msg.clone(),&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA; let mut invoice_vec: Vec&lt;Invoice&lt;T::AccountId, T::AccountId, BalanceOf&lt;T&gt;&gt;&gt; = Vec::new();&#xD;&#xA; invoice_vec.push(contract);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; // Save in storage the sender and the invoices&#xD;&#xA; &lt;InvoiceSender&lt;T&gt;&gt;::insert(from.clone(), &amp;invoice_vec);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	InvoiceSender::&lt;T&gt;::mutate(&amp;from, |invoice| {&#xD;&#xA;      invoice_vec.iter_mut().filter(|i| i.id == 17).for_each(|i| {&#xD;&#xA;		i.status = true;&#xD;&#xA;		})&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you see, I have created an Invoice object, I have put it inside an array and then I have stored it. &#xD;&#xA;The issue is when I try to mutate one of the contracts.&#xD;&#xA;During debugging I can the line of code ``` i.status = true; ``` is executed but the status is still false, so the state was not mutated.&#xD;&#xA;Can you help me try to understand why? " ContentLicense="CC BY-SA 4.0" />
  <row Id="24246" PostHistoryTypeId="2" PostId="6328" RevisionGUID="9148ae9b-ae90-4472-8419-bb32dc914fee" CreationDate="2022-12-13T13:25:49.243" UserId="3317" Text="The consensus algorithm is manual-seal which doesn't contain GRANDPA. Blocks are only authored immediately at every transaction and there is no finalization of a block. Manual seal makes development more convenient.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24248" PostHistoryTypeId="5" PostId="6328" RevisionGUID="784b0448-5e3f-4d38-a0a4-276098d05e18" CreationDate="2022-12-13T13:30:52.710" UserId="3317" Comment="added 45 characters in body" Text="The consensus algorithm is manual-seal which doesn't contain GRANDPA.  Manual seal makes development more convenient since blocks are only authored immediately at every transaction. However, since GRANDPA is not used in the runtime, blocks are never finalized.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24249" PostHistoryTypeId="4" PostId="6326" RevisionGUID="82c057f1-9206-492e-8523-2a5a685982ca" CreationDate="2022-12-13T13:36:27.723" UserId="3317" Comment="Changed the title so this quesiton is useful for others in the future and title did not make sense" Text="Why is there no finalization in the substrate-contracts-node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24250" PostHistoryTypeId="6" PostId="6326" RevisionGUID="82c057f1-9206-492e-8523-2a5a685982ca" CreationDate="2022-12-13T13:36:27.723" UserId="3317" Comment="Changed the title so this quesiton is useful for others in the future and title did not make sense" Text="|substrate-contracts-node|json-rpc|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24251" PostHistoryTypeId="24" PostId="6326" RevisionGUID="82c057f1-9206-492e-8523-2a5a685982ca" CreationDate="2022-12-13T13:36:27.723" Comment="Proposed by 3317 approved by 3440 edit id of 355" ContentLicense="CC BY-SA 4.0" />
  <row Id="24252" PostHistoryTypeId="2" PostId="6329" RevisionGUID="f0abc1ed-dd67-4832-9d54-901b21a87a77" CreationDate="2022-12-13T14:01:02.753" UserId="2844" Text="on writing `to: &amp;mut AccountId`, it throws warning to use explicit lifetime name needed here.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;        #[ink(message)] &#xD;&#xA;        pub fn delegate(&amp;mut self, to: &amp;mut AccountId) {&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            let voters = self.voters.get(caller).unwrap_or_default();&#xD;&#xA;            let voters_to = self.voters.get(*to).unwrap_or_default();&#xD;&#xA;            assert!(!voters.voted, &quot;You already voted.&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(*to != caller, &quot;Self-delegation is disallowed&quot;);&#xD;&#xA;&#xD;&#xA;            while voters_to.delegate != [0; 32].into() {&#xD;&#xA;                *to = voters_to.delegate;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;including lifetime, but it throws ink message must not be generic. I remove `#[ink(message)]` and it works fine and `#[inline]` as well&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;        #[ink(message)] &#xD;&#xA;        pub fn delegate&lt;'a&gt;(&amp;mut self, to: &amp;'a mut AccountId) {&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            let voters = self.voters.get(caller).unwrap_or_default();&#xD;&#xA;            let voters_to = self.voters.get(*to).unwrap_or_default();&#xD;&#xA;            assert!(!voters.voted, &quot;You already voted.&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(*to != caller, &quot;Self-delegation is disallowed&quot;);&#xD;&#xA;&#xD;&#xA;            while voters_to.delegate != [0; 32].into() {&#xD;&#xA;                *to = voters_to.delegate;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;Anybody explain me why this is happening? Or am I doing something wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BbiDo.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/xdwoM.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24254" PostHistoryTypeId="1" PostId="6329" RevisionGUID="f0abc1ed-dd67-4832-9d54-901b21a87a77" CreationDate="2022-12-13T14:01:02.753" UserId="2844" Text="Ink Message must not be generic Warning" ContentLicense="CC BY-SA 4.0" />
  <row Id="24255" PostHistoryTypeId="3" PostId="6329" RevisionGUID="f0abc1ed-dd67-4832-9d54-901b21a87a77" CreationDate="2022-12-13T14:01:02.753" UserId="2844" Text="|polkadot|ink|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24256" PostHistoryTypeId="2" PostId="6330" RevisionGUID="4b92da3c-4330-44fe-b30e-a3d56d573fc1" CreationDate="2022-12-13T14:01:50.917" UserId="2673" Text="The auction should had started at the beginning of LP26 and it did not, it failed. The reason behind it is that with the new OpenGov the origin of the extrinsics changed and this one particularly is failing. I should've been solved with the emergency patch of 0.9.34, but unfortunately that's not the case, and it's currently under investigation." ContentLicense="CC BY-SA 4.0" />
  <row Id="24258" PostHistoryTypeId="2" PostId="6331" RevisionGUID="740b8598-9eed-4dcf-a706-2ab36f0207e7" CreationDate="2022-12-13T14:03:35.883" UserId="2102" Text="There a couple of things I don't understand. If you have a `StorageMap&lt;AccountId, Vec&lt;Invoice&gt;&gt;`, when calling mutate, you need to use the `|invoice|` from the closure. You are modifying the outer vector `invoice_vec`, which is not persisted, it's just a temporary variable. &#xD;&#xA;&#xD;&#xA;Does this solve it?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;InvoiceSender::&lt;T&gt;::mutate(&amp;from, |invoice| {&#xD;&#xA;    invoice.iter_mut().filter(|i| i.id == 17).for_each(|i| { // &lt;-- This line changed&#xD;&#xA;        i.status = true;&#xD;&#xA;    })&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm not sure if you are trying to modify all the possible invoices of the user or just that one, but if you want to modify all the invoices that have `id==17`, I would simply use a map like:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;InvoiceSender::&lt;T&gt;::mutate(&amp;from, |all_invoices| {&#xD;&#xA;    all_invoices.iter().map(|invoice| {&#xD;&#xA;      if invoice.status == 17 {&#xD;&#xA;        invoice.status = true;&#xD;&#xA;      }&#xD;&#xA;    })&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I haven't test it, but just to give you the idea" ContentLicense="CC BY-SA 4.0" />
  <row Id="24260" PostHistoryTypeId="5" PostId="6327" RevisionGUID="dfcae38a-1654-4d2e-835c-8b4be2437481" CreationDate="2022-12-13T14:52:02.907" UserId="2102" Comment="Corrected spelling and improved content" Text="I have the following case: &#xD;&#xA;&#xD;&#xA;``` rs&#xD;&#xA;let contract = Invoice {&#xD;&#xA;  origin: from.clone(),&#xD;&#xA;  to: to.clone(),&#xD;&#xA;  amount,&#xD;&#xA;  status: false,&#xD;&#xA;  id: 17,&#xD;&#xA;  msg: msg.clone(),&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;let mut invoice_vec: Vec&lt;Invoice&lt;T::AccountId, T::AccountId, BalanceOf&lt;T&gt;&gt;&gt; = Vec::new();&#xD;&#xA;invoice_vec.push(contract);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// Save in storage the sender and the invoices&#xD;&#xA;&lt;InvoiceSender&lt;T&gt;&gt;::insert(from.clone(), &amp;invoice_vec);&#xD;&#xA;&#xD;&#xA;InvoiceSender::&lt;T&gt;::mutate(&amp;from, |invoice| {&#xD;&#xA;  invoice_vec.iter_mut().filter(|i| i.id == 17).for_each(|i| {&#xD;&#xA;    i.status = true;&#xD;&#xA;  })&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, I have created an Invoice object, I have put it inside an array and then I have stored it. &#xD;&#xA;&#xD;&#xA;The issue happens when I try to mutate one of the contracts.&#xD;&#xA;&#xD;&#xA;During debugging I can see that the following line `i.status = true;` is being executed, but the status is remains false, so the state was not mutated." ContentLicense="CC BY-SA 4.0" />
  <row Id="24261" PostHistoryTypeId="24" PostId="6327" RevisionGUID="dfcae38a-1654-4d2e-835c-8b4be2437481" CreationDate="2022-12-13T14:52:02.907" Comment="Proposed by 2102 approved by 34 edit id of 357" ContentLicense="CC BY-SA 4.0" />
  <row Id="24262" PostHistoryTypeId="5" PostId="6326" RevisionGUID="6272c2b6-2077-4bf5-a633-7d1a9b25a2c2" CreationDate="2022-12-13T14:52:10.770" UserId="2673" Comment="Typescript syntax highlighting" Text="I am working on the substrate contract node to instantiate a contract using RPC call. I use the this [tutorial](https://polkadot.js.org/docs/api-contract/start/code) to do the process. I am getting the message that it is in the block, but not finalized. &#xD;&#xA;```typescript&#xD;&#xA;const code_contract = new CodePromise(api, metadata, wasm_1);&#xD;&#xA;    // console.log(contract)&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;    &#xD;&#xA;    const alicePair = keyring.addFromUri('//Alice', { name: 'Alice default' });&#xD;&#xA;    console.log(alicePair.address);&#xD;&#xA;    const gasLimit = 100000n * 1000000n;&#xD;&#xA;    const storageDepositLimit = null;&#xD;&#xA;    const salt = new Uint8Array();&#xD;&#xA;    const value = 0;&#xD;&#xA;    const initValue = true;&#xD;&#xA;&#xD;&#xA;    const tx = code_contract.tx.new({ gasLimit, storageDepositLimit }, initValue);&#xD;&#xA;    &#xD;&#xA;    const unsub = await tx.signAndSend(alicePair, ({ events =[],contract, status }) =&gt; {&#xD;&#xA;      if (status.isInBlock || status.isFinalized) {&#xD;&#xA;        console.log(status.isInBlock)&#xD;&#xA;        console.log(&quot;type is  &quot;,status.type)&#xD;&#xA;        console.log(status.isFinalized)&#xD;&#xA;        console.log('Included at block hash', status.asInBlock.toHex())&#xD;&#xA;        unsub();&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the following&#xD;&#xA;```&#xD;&#xA;is api connected   :  true&#xD;&#xA;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;true&#xD;&#xA;type is   InBlock&#xD;&#xA;is finalized false&#xD;&#xA;Included at block hash 0x2254bf48bbea0018d939e222e64e42ccb1babf836fbe6f76ac16e8fa230e01fc&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don’t know why `isFinalized` returns false.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The above happens when I use substrate-contract-node for running the service.&#xD;&#xA;&#xD;&#xA;For contract I use the basic flipper contract of ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="24263" PostHistoryTypeId="24" PostId="6326" RevisionGUID="6272c2b6-2077-4bf5-a633-7d1a9b25a2c2" CreationDate="2022-12-13T14:52:10.770" Comment="Proposed by 2673 approved by 34 edit id of 356" ContentLicense="CC BY-SA 4.0" />
  <row Id="24264" PostHistoryTypeId="5" PostId="6324" RevisionGUID="f6834bd8-be35-40f8-b3fe-a4971e45ae65" CreationDate="2022-12-13T15:34:56.557" UserId="2423" Comment="added 1 character in body" Text="I'm writing a client in Go that needs to scan balance transfers in Substrate chains - initially focused on Polkadot.&#xD;&#xA;&#xD;&#xA;My current objective is to determine all balance transfers in a given block, and to record the sender &amp; destination IDs along with the value transferred.&#xD;&#xA;&#xD;&#xA;To simplify decoding &amp; storage access I'm using Sidecar.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Balance Transfer Summary&#xD;&#xA;------------------------&#xD;&#xA;If I understand correctly, balance transfers can be made by methods in the `balances` and `utility` pallets.&#xD;&#xA;&#xD;&#xA;Balance transfer methods in `balances` pallet:&#xD;&#xA;&#xD;&#xA;* `transfer`&#xD;&#xA;* `transferAll`&#xD;&#xA;* `transferKeepAlive`&#xD;&#xA;&#xD;&#xA;Balance transfer methods in `utilities` pallet:&#xD;&#xA;&#xD;&#xA;* `batch`&#xD;&#xA;* `batchAll`&#xD;&#xA;&#xD;&#xA;Data Required&#xD;&#xA;-------------&#xD;&#xA;The data I need is the destination ID, sender ID and the value transferred.&#xD;&#xA;&#xD;&#xA;In all cases, I am getting the sender ID directly from the Extrinsic signature.&#xD;&#xA;&#xD;&#xA;For &quot;standard&quot; balance transfers that use `balances.transfer`, this data is present in the Extrinsic. Westend example [here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwestend-rpc.polkadot.io#/explorer/query/13690231)&#xD;&#xA;&#xD;&#xA;This is not the case for `balances.TransferAll` - the Extrinsic does not directly hold data for `value` of the transfer - this must be obtained from the `balances.Transfer` event for that Extrinsic. Polkadot example [here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/explorer/query/13282388)&#xD;&#xA;&#xD;&#xA;For batched transactions under the `utilities` pallet, data for destination ID and value is obtained by looping over the `Extrinsic.Arg.Calls` and inspecting the `Args` of any balance transfer methods.&#xD;&#xA;&#xD;&#xA;Current Approach&#xD;&#xA;----------------&#xD;&#xA;My app scans for Extrinsics that relate to balance transfers.&#xD;&#xA;&#xD;&#xA;In the case of a `utilities.batch` or `utilities.batchAll`:&#xD;&#xA;&#xD;&#xA;* Get sender ID from Extrinsic&#xD;&#xA;* Loop over the Extrinsic Calls&#xD;&#xA;* Skip Calls whose methods do not relate to balance transfer (`balances` pallet, `transfer`, `transferAll`, `transferKeepAlive` methods)&#xD;&#xA;* Get destination ID and Value for balance transfer events from the call Args&#xD;&#xA;&#xD;&#xA;In the case of `balances.transfer`, `balances.transferAll` or `balances.transferKeepAlive` Extrinsics:&#xD;&#xA;&#xD;&#xA;* Get sender ID from Extrinsic&#xD;&#xA;* Get destination ID from Extrinsic&#xD;&#xA;* Loop over Extrinsic Events&#xD;&#xA;* Skip those that are not: `balances.Transfer`, `balances.TransferAll`, `balances.TransferKeepAlive`&#xD;&#xA;* Get value from the `data` field of the Event&#xD;&#xA;&#xD;&#xA;The `data` field of a balance transfer event as provided by Sidecar is an array of unlabeled strings. For example:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;	&quot;method&quot;: {&#xD;&#xA;		&quot;pallet&quot;: &quot;balances&quot;,&#xD;&#xA;		&quot;method&quot;: &quot;Transfer&quot;&#xD;&#xA;	},&#xD;&#xA;	&quot;data&quot;: [&#xD;&#xA;		&quot;1qnJN7FViy3HZaxZK9tGAA71zxHSBeUweirKqCaox4t8GT7&quot;,&#xD;&#xA;		&quot;15uph1CrsXQgZYKFaumLC7wZEgC6gEnB2fZBpcDejt4xaEGd&quot;,&#xD;&#xA;		&quot;999000000000&quot;&#xD;&#xA;	]&#xD;&#xA;},&#xD;&#xA;&#xD;&#xA;curl http://path-to-polkadot-mainnet-node-with-sidecar:8080/blocks/11555568 | jq '.extrinsics[3].events[3]'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Question&#xD;&#xA;--------&#xD;&#xA;1. Is my understanding of balance transfers correct?&#xD;&#xA;2. Am I missing any potential balance transfer events?&#xD;&#xA;&#xD;&#xA;Most importantly, can I rely on the third element in a balances transfer array provided by sidecar (as shown above) representing value?&#xD;&#xA;&#xD;&#xA;It seems odd that this is not a named field, and it feels hacky accessing this data by means of an array index.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="24265" PostHistoryTypeId="2" PostId="6332" RevisionGUID="48741afa-7231-41d3-8ce8-48290ad130a7" CreationDate="2022-12-13T16:25:48.387" UserId="3331" Text="I'm trying to modify the enum errors that the `CumulusParachainSystem` pallet has, without having to import the pallet to my workspace. &#xD;&#xA;&#xD;&#xA;It would be possible to add new errors as well, if so how? &#xD;&#xA;&#xD;&#xA;Thanks in advance for any help, or documentation/material. :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="24267" PostHistoryTypeId="1" PostId="6332" RevisionGUID="48741afa-7231-41d3-8ce8-48290ad130a7" CreationDate="2022-12-13T16:25:48.387" UserId="3331" Text="How can I personalize the enum errors from a Pallet that isn't in my workspace?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24268" PostHistoryTypeId="3" PostId="6332" RevisionGUID="48741afa-7231-41d3-8ce8-48290ad130a7" CreationDate="2022-12-13T16:25:48.387" UserId="3331" Text="|pallet|parachain|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24269" PostHistoryTypeId="2" PostId="6333" RevisionGUID="4dae442f-ccff-4c63-8127-cacdb9cd2c84" CreationDate="2022-12-13T16:59:23.617" UserId="380" Text="I have used typegen to generate my types from definitions.&#xD;&#xA;&#xD;&#xA;## Definition&#xD;&#xA;```&#xD;&#xA;        Person: {&#xD;&#xA;            status: 'Status',&#xD;&#xA;            balance: 'u128',&#xD;&#xA;&#xD;&#xA;        },&#xD;&#xA;        Status: {&#xD;&#xA;            _enum: ['Active', 'Suspended', 'Deactivated'],&#xD;&#xA;        },&#xD;&#xA;```&#xD;&#xA;## Generated types&#xD;&#xA;&#xD;&#xA;    /** @name Status */&#xD;&#xA;    export interface Status extends Enum {&#xD;&#xA;      readonly isActive: boolean;&#xD;&#xA;      readonly isSuspended: boolean;&#xD;&#xA;      readonly isDeactivated: boolean;&#xD;&#xA;      readonly type: 'Active' | 'Suspended' | 'Deactivated';&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /** @name Person */&#xD;&#xA;    export interface ProsopoProvider extends Struct {&#xD;&#xA;      readonly status: Status;&#xD;&#xA;      readonly balance: u128;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that the `enum` type has fields `isActive`, `isSuspended`, `isDeactivated`.&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;## Decoding my type&#xD;&#xA;&#xD;&#xA;I created a function in my contract that returns `Result&lt;Person, Error&gt;` I decode this result in JS.&#xD;&#xA;&#xD;&#xA;    const decoded = this.contract.api.registry.createType(`Result&lt;Person, Error&gt;`, result.data.toU8a(true))&#xD;&#xA;    if (decoded.isOk) {&#xD;&#xA;        return decoded.asOk.toPrimitive()&#xD;&#xA;&#xD;&#xA;This is where my problem starts. The `toPrimitive` function (and `toJSON`, `toHuman`, etc.) does not output the `isActive`, `isSuspended`, and `isDeactivated` fields of my `Status` enum. They are `undefined`.&#xD;&#xA;&#xD;&#xA;How do I access the `isActive`, `isSuspended`, and `isDeactivated` fields after decoding my type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24271" PostHistoryTypeId="1" PostId="6333" RevisionGUID="4dae442f-ccff-4c63-8127-cacdb9cd2c84" CreationDate="2022-12-13T16:59:23.617" UserId="380" Text="How do we work with polkadot-js enums in TypeScript?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24272" PostHistoryTypeId="3" PostId="6333" RevisionGUID="4dae442f-ccff-4c63-8127-cacdb9cd2c84" CreationDate="2022-12-13T16:59:23.617" UserId="380" Text="|polkadot-js|scale-codec|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24273" PostHistoryTypeId="5" PostId="6333" RevisionGUID="1209e9bc-a807-4512-b50f-18253a635277" CreationDate="2022-12-13T17:06:07.083" UserId="380" Comment="deleted 9 characters in body" Text="I used [typegen](https://github.com/polkadot-js/docs/tree/master/docs/api/examples/promise/typegen) to generate my types from definitions.&#xD;&#xA;&#xD;&#xA;## Definition&#xD;&#xA;```&#xD;&#xA;        Person: {&#xD;&#xA;            status: 'Status',&#xD;&#xA;            balance: 'u128',&#xD;&#xA;&#xD;&#xA;        },&#xD;&#xA;        Status: {&#xD;&#xA;            _enum: ['Active', 'Suspended', 'Deactivated'],&#xD;&#xA;        },&#xD;&#xA;```&#xD;&#xA;## Generated types&#xD;&#xA;&#xD;&#xA;    /** @name Status */&#xD;&#xA;    export interface Status extends Enum {&#xD;&#xA;      readonly isActive: boolean;&#xD;&#xA;      readonly isSuspended: boolean;&#xD;&#xA;      readonly isDeactivated: boolean;&#xD;&#xA;      readonly type: 'Active' | 'Suspended' | 'Deactivated';&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /** @name Person */&#xD;&#xA;    export interface Person extends Struct {&#xD;&#xA;      readonly status: Status;&#xD;&#xA;      readonly balance: u128;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that the `enum` type has fields `isActive`, `isSuspended`, `isDeactivated`.&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;## Decoding my type&#xD;&#xA;&#xD;&#xA;I created a function in my contract that returns `Result&lt;Person, Error&gt;` I decode this result in JS.&#xD;&#xA;&#xD;&#xA;    const decoded = this.contract.api.registry.createType(`Result&lt;Person, Error&gt;`, result.data.toU8a(true))&#xD;&#xA;    if (decoded.isOk) {&#xD;&#xA;        return decoded.asOk.toPrimitive()&#xD;&#xA;&#xD;&#xA;This is where my problem starts. The `toPrimitive` function (and `toJSON`, `toHuman`, etc.) does not output the `isActive`, `isSuspended`, and `isDeactivated` fields of my `Status` enum. They are `undefined`.&#xD;&#xA;&#xD;&#xA;How do I access the `isActive`, `isSuspended`, and `isDeactivated` fields after decoding my type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24274" PostHistoryTypeId="6" PostId="6333" RevisionGUID="1209e9bc-a807-4512-b50f-18253a635277" CreationDate="2022-12-13T17:06:07.083" UserId="380" Comment="deleted 9 characters in body" Text="|polkadot-js|scale-codec|contracts|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24275" PostHistoryTypeId="5" PostId="6321" RevisionGUID="e6d028b2-a480-4b76-a24b-7b0749dd154f" CreationDate="2022-12-13T19:03:25.023" UserId="83" Comment="show how resolved it" Text="The error appears to be isolated to use on Alpine Linux or due to a conflict between Yarn versions or an incompatible Yarn version. Unfortunately I can't seem to replicate the issue again, but the follow are steps I followed to resolve it.&#xD;&#xA;&#xD;&#xA;Resolving the issue involved upgrading to Yarn 3.3.0 before running `yarn start`, as follows:&#xD;&#xA;&#xD;&#xA;Remove the .yarn directory. Temporarily backup .yarnrc.yml by renaming it to .yarnrc.yml.old since it has some extra lines of code at the top of the file to retain and reuse when we re-create the file.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;rm -rf .yarn &amp;&amp; mv .yarnrc.yml .yarnrc.yml.old&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running the following to create re-create the .yarn folder with latest Yarn v3.3.0, whilst also re-creating .yarnrc.yml with Yarn v3.3.0 (now with contents `yarnPath: .yarn/releases/yarn-3.3.0.cjs`)&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;yarn policies set-version 3.3.0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Copy remainder of .yarnrc.yml.old back into .yarnrc.yml, so the file became:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;nodeLinker: node-modules&#xD;&#xA;&#xD;&#xA;plugins:&#xD;&#xA;  - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs&#xD;&#xA;    spec: &quot;@yarnpkg/plugin-interactive-tools&quot;&#xD;&#xA;&#xD;&#xA;yarnPath: .yarn/releases/yarn-3.3.0.cjs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Followed these [Yarn instructions](https://yarnpkg.com/getting-started/install) to install its Corepack and the latest Yarn 3.3.0 (since I was using Alpine Linux it was necessary to install Git first since it uses that dependency), then after doing that I was able to run `yarn start` without issue. &#xD;&#xA;&#xD;&#xA;Alpine Linux&#xD;&#xA;```bash&#xD;&#xA;apk update &amp;&amp; apk add --update git &amp;&amp; rm -rf /var/cache/apk/*&#xD;&#xA;corepack enable \&#xD;&#xA;    &amp;&amp; corepack prepare yarn@stable --activate \&#xD;&#xA;    &amp;&amp; yarn set version 3.3.0 \&#xD;&#xA;    &amp;&amp; yarn install&#xD;&#xA;    &amp;&amp; yarn start&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: If you're using Ubuntu rather than Alpine Linux then you'd instead install git with:&#xD;&#xA;```&#xD;&#xA;apt-get update &amp;&amp; apt-get install -y git&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://github.com/substrate-developer-hub/substrate-front-end-template/issues/259&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;&#xD;&#xA;I was able to isolate the error in a Docker container.&#xD;&#xA;&#xD;&#xA;If it was the following then it compiled without issues&#xD;&#xA;```&#xD;&#xA;FROM node:gallium-alpine&#xD;&#xA;WORKDIR /app&#xD;&#xA;ENV PATH=/app/node_modules/.bin:$PATH&#xD;&#xA;COPY . .&#xD;&#xA;RUN yarn&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But if I changed it to the following to try to first only copy across package.json and the Yarn 3.1.1 files that were already in the repository (except node_modules/ which are in .dockerignore file) before installing dependencies with `yarn install`: &#xD;&#xA;```&#xD;&#xA;FROM node:gallium-alpine&#xD;&#xA;WORKDIR /app&#xD;&#xA;ENV PATH=/app/node_modules/.bin:$PATH&#xD;&#xA;COPY package.json .&#xD;&#xA;COPY ./.yarn ./.yarn&#xD;&#xA;COPY .yarnrc.yml .&#xD;&#xA;RUN corepack enable \&#xD;&#xA;    &amp;&amp; corepack prepare yarn@stable --activate \&#xD;&#xA;    &amp;&amp; yarn set version 3.1.1&#xD;&#xA;RUN yarn&#xD;&#xA;COPY . .&#xD;&#xA;```&#xD;&#xA;Then that generated the following error:&#xD;&#xA;```&#xD;&#xA;#14 [builder  7/10] RUN yarn&#xD;&#xA;#14 sha256:a9de4d28aff53bb65ec1c340abd68d23f91082d9968a98b920f1c9f7d1c28160&#xD;&#xA;#14 1.465 ➤ YN0000: ┌ Resolution step&#xD;&#xA;#14 1.790 ➤ YN0001: │ TypeError: semantic-ui-css@Semantic-Org/Semantic-UI-CSS#master: Cannot set properties of undefined (setting 'message')&#xD;&#xA;#14 1.790     at HAe (/root/.cache/node/corepack/yarn/3.1.1/yarn.js:582:5207)&#xD;&#xA;#14 1.790     at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;#14 1.790     at async lL (/root/.cache/node/corepack/yarn/3.1.1/yarn.js:582:5435)&#xD;&#xA;#14 1.790     at async gL.getCandidates (/root/.cache/node/corepack/yarn/3.1.1/yarn.js:582:11148)&#xD;&#xA;#14 1.790     at async pd.getCandidates (/root/.cache/node/corepack/yarn/3.1.1/yarn.js:432:5235)&#xD;&#xA;#14 1.790     at async pd.getCandidates (/root/.cache/node/corepack/yarn/3.1.1/yarn.js:432:5235)&#xD;&#xA;#14 1.790     at async /root/.cache/node/corepack/yarn/3.1.1/yarn.js:441:7666&#xD;&#xA;#14 1.790     at async du (/root/.cache/node/corepack/yarn/3.1.1/yarn.js:382:3997)&#xD;&#xA;#14 1.790     at async R (/root/.cache/node/corepack/yarn/3.1.1/yarn.js:441:7648)&#xD;&#xA;#14 1.790     at async Promise.all (index 21)&#xD;&#xA;#14 1.791 ➤ YN0000: └ Completed in 0s 325ms&#xD;&#xA;#14 1.793 ➤ YN0000: Failed with errors in 0s 331ms&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Update: 14th Dec 2022**&#xD;&#xA;&#xD;&#xA;The error `TypeError: semantic-ui-css@Semantic-Org/Semantic-UI-CSS#master: Cannot set properties of undefined (setting 'message')` was caused because I wasn't correctly re-creating the .yarnrc.yml file to include plugins and nodeLinker.&#xD;&#xA;&#xD;&#xA;Since we are using Yarn 3.x we still need to explicitly import plugins like [interactive-tools](https://yarnpkg.com/package/@yarnpkg/plugin-interactive-tools) into the file. It is also [necessary](https://yarnpkg.com/getting-started/migration#step-by-step) to have `nodeLinker: &lt;VALUE&gt;` in the file.&#xD;&#xA;So re-creating it as follows in the Dockerfile worked to adequately switch to Yarn 3.1.1 first and also resolved the error `Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)`, so it wasn't necessary to first have to copy across the /.yarn folder and .yarnrc.yml file from the host machine before running `yarn` (i.e. `yarn install`).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RUN corepack enable \&#xD;&#xA;    &amp;&amp; corepack prepare yarn@stable --activate \&#xD;&#xA;    &amp;&amp; yarn set version 3.1.1 \&#xD;&#xA;    &amp;&amp; yarn plugin import interactive-tools \&#xD;&#xA;    &amp;&amp; echo -e &quot;nodeLinker: node-modules\n\n$(cat /usr/local/apps/${APP}/.yarnrc.yml)&quot; &gt; /usr/local/apps/${APP}/.yarnrc.yml \&#xD;&#xA;    &amp;&amp; cat /usr/local/apps/${APP}/.yarnrc.yml \&#xD;&#xA;    &amp;&amp; printf &quot;Switched to Yarn version: &quot;; yarn --version \&#xD;&#xA;    &amp;&amp; yarn install&#xD;&#xA;```&#xD;&#xA;Note: It would also work with Yarn 3.3.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="24276" PostHistoryTypeId="5" PostId="6320" RevisionGUID="296b7876-4e24-43c6-97c9-63d7b6e021a0" CreationDate="2022-12-13T19:11:12.223" UserId="83" Comment="fix question" Text="Prior to cloning the [substrate-front-end-template](https://github.com/substrate-developer-hub/substrate-front-end-template) repo with tag [&quot;monthly-2022-02&quot;](https://github.com/substrate-developer-hub/substrate-front-end-template/releases/tag/monthly-2022-02) I installed the following since I was building it from a Dockerfile using pre-built Docker image node:gallium-alpine:&#xD;&#xA;* Yarn 1.22.19 (running `yarn --version` outputs `1.22.19`). This was bundled with node:gallium-alpine pre-built Docker image.&#xD;&#xA;* Node.js LTS v16.18.1 (matching contents of .nvmrc that includes `lts/gallium` and since the CircleCI .circleci/config.yml file is using Node.js 16.14)&#xD;&#xA;&#xD;&#xA;But it appeared as though the repository required Yarn 3.1.1 (hence why there is a .yarn folder containing .yarn/releases/yarn-3.1.1.cjs,  package.json contains `&quot;packageManager&quot;: &quot;yarn@3.1.1&quot;`, and a file called .yarnrc.yml whose contents include:&#xD;&#xA;```&#xD;&#xA;nodeLinker: node-modules&#xD;&#xA;&#xD;&#xA;plugins:&#xD;&#xA;  - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs&#xD;&#xA;    spec: &quot;@yarnpkg/plugin-interactive-tools&quot;&#xD;&#xA;&#xD;&#xA;yarnPath: .yarn/releases/yarn-3.1.1.cjs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But after you clone the repo and try to install dependencies as follows:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;cd substrate-front-end-template&#xD;&#xA;yarn&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it outputs error:&#xD;&#xA;```bash&#xD;&#xA;Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24277" PostHistoryTypeId="5" PostId="6321" RevisionGUID="8af8039f-9d2e-4c7d-88be-58744504025b" CreationDate="2022-12-13T19:29:44.763" UserId="83" Comment="update answer" Text="&#xD;&#xA;Resolving the issue involved upgrading to Yarn 3.1.1 before running `yarn`. Followed these [Yarn instructions](https://yarnpkg.com/getting-started/install) to install its Corepack and the latest Yarn 3.1.1. &#xD;&#xA;&#xD;&#xA;If I didn't correctly re-create the .yarnrc.yml file to include plugins and nodeLinker before running `yarn` then I would get error: `TypeError: semantic-ui-css@Semantic-Org/Semantic-UI-CSS#master: Cannot set properties of undefined (setting 'message')`.&#xD;&#xA;&#xD;&#xA;Since we are using Yarn 3.x we still need to explicitly import plugins like [interactive-tools](https://yarnpkg.com/package/@yarnpkg/plugin-interactive-tools) into the file. It is also [necessary](https://yarnpkg.com/getting-started/migration#step-by-step) to have `nodeLinker: &lt;VALUE&gt;` in the file.&#xD;&#xA;So re-creating it as follows in the Dockerfile worked to adequately switch to Yarn 3.1.1 first and also resolved the error `Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)`, so it wasn't necessary to first have to copy across the /.yarn folder and .yarnrc.yml file from the host machine before running `yarn` (i.e. `yarn install`).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;FROM node:gallium-alpine&#xD;&#xA;&#xD;&#xA;WORKDIR /app&#xD;&#xA;ENV PATH=/app/node_modules/.bin:$PATH&#xD;&#xA;&#xD;&#xA;COPY package.json .&#xD;&#xA;RUN printf &quot;Pre-built Docker image using built-in Yarn version: &quot;; yarn --version&#xD;&#xA;&#xD;&#xA;# it was necessary to install Git first since it uses that dependency&#xD;&#xA;RUN apk update &amp;&amp; apk add --update git &amp;&amp; rm -rf /var/cache/apk/*&#xD;&#xA;RUN corepack enable \&#xD;&#xA;    &amp;&amp; corepack prepare yarn@stable --activate \&#xD;&#xA;    &amp;&amp; yarn set version 3.1.1 \&#xD;&#xA;    &amp;&amp; yarn plugin import interactive-tools \&#xD;&#xA;    &amp;&amp; echo -e &quot;nodeLinker: node-modules\n\n$(cat /app/.yarnrc.yml)&quot; &gt; /app/.yarnrc.yml \&#xD;&#xA;    &amp;&amp; cat /app/.yarnrc.yml \&#xD;&#xA;    &amp;&amp; printf &quot;Switched to Yarn version: &quot;; yarn --version \&#xD;&#xA;    &amp;&amp; yarn install&#xD;&#xA;```&#xD;&#xA;Note: It would also work with Yarn 3.3.0 if the appropriate files were updated.&#xD;&#xA;&#xD;&#xA;Reference: https://github.com/substrate-developer-hub/substrate-front-end-template/issues/259" ContentLicense="CC BY-SA 4.0" />
  <row Id="24278" PostHistoryTypeId="5" PostId="6320" RevisionGUID="16c22c26-fa88-442d-b073-8f34f66b874b" CreationDate="2022-12-13T19:30:41.830" UserId="83" Comment="update ques" Text="Prior to cloning the [substrate-front-end-template](https://github.com/substrate-developer-hub/substrate-front-end-template) repo with tag [&quot;monthly-2022-02&quot;](https://github.com/substrate-developer-hub/substrate-front-end-template/releases/tag/monthly-2022-02) I installed the following since I was building it from a Dockerfile using pre-built Docker image node:gallium-alpine:&#xD;&#xA;* Yarn 1.22.19 (running `yarn --version` outputs `1.22.19`). This was bundled with node:gallium-alpine pre-built Docker image.&#xD;&#xA;* Node.js LTS v16.18.1 (matching contents of .nvmrc that includes `lts/gallium` and since the CircleCI .circleci/config.yml file is using Node.js 16.14)&#xD;&#xA;&#xD;&#xA;But it appeared as though the repository required Yarn 3.1.1 (hence why there is a .yarn folder containing .yarn/releases/yarn-3.1.1.cjs,  package.json contains `&quot;packageManager&quot;: &quot;yarn@3.1.1&quot;`, and a file called .yarnrc.yml whose contents include:&#xD;&#xA;```&#xD;&#xA;nodeLinker: node-modules&#xD;&#xA;&#xD;&#xA;plugins:&#xD;&#xA;  - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs&#xD;&#xA;    spec: &quot;@yarnpkg/plugin-interactive-tools&quot;&#xD;&#xA;&#xD;&#xA;yarnPath: .yarn/releases/yarn-3.1.1.cjs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But after you clone the repo and try to install dependencies with `yarn` it outputs error:&#xD;&#xA;```bash&#xD;&#xA;Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24279" PostHistoryTypeId="2" PostId="6334" RevisionGUID="cebed94d-bc6f-4297-b7b4-eb7a137a516a" CreationDate="2022-12-13T20:17:31.520" UserId="73" Text="You can not change the `Error` from an external pallet. &#xD;&#xA;&#xD;&#xA;I don't really know why you would like to do this. In your own pallet you can create your own `Error` type an return this." ContentLicense="CC BY-SA 4.0" />
  <row Id="24281" PostHistoryTypeId="2" PostId="6335" RevisionGUID="8482bdd7-f4f1-4ba0-8e3e-d3ac5e2d4f0e" CreationDate="2022-12-13T20:24:13.907" UserId="716" Text="I would like to programmatically get a list of all the WSS urls for parachains.  I don't know if this is available anywhere, but I have not seen it.  [This source code](https://github.com/polkadot-js/apps/blob/master/packages/apps-config/src/endpoints/productionRelayPolkadot.ts) has what I want, but it is in the form of a TypeScript function.  I tried to paste the code into a JSON object, but I don't think my JSON skills are good enough to get it to work, besides that would require manual updating.  Anyone have a better, or more automated idea?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24283" PostHistoryTypeId="1" PostId="6335" RevisionGUID="8482bdd7-f4f1-4ba0-8e3e-d3ac5e2d4f0e" CreationDate="2022-12-13T20:24:13.907" UserId="716" Text="List of WSS endpoints for parachains (OR Is there a way to parse typescript code into JSON or other python readable object?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="24284" PostHistoryTypeId="3" PostId="6335" RevisionGUID="8482bdd7-f4f1-4ba0-8e3e-d3ac5e2d4f0e" CreationDate="2022-12-13T20:24:13.907" UserId="716" Text="|polkadot-js|parachain|wss|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24285" PostHistoryTypeId="2" PostId="6336" RevisionGUID="9932895f-9f46-40e4-97a8-312c6e0f162a" CreationDate="2022-12-13T21:24:41.333" UserId="716" Text="I would like to figure out how to get a list of all the smart contracts account ids and WASM blobs that have been uploaded to a specific parachain, ideally into python using the substrate interface.  [This picture](https://user-images.githubusercontent.com/241530/198211830-9b1f1731-e70d-4083-ae9a-ee5e3e5b8be2.png) shows that `contracts` is one of the options under selected chain state, but when I go to [polkadotjs](https://polkadot.js.org/apps/#/chainstate) I don't see the `contracts` option.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24287" PostHistoryTypeId="1" PostId="6336" RevisionGUID="9932895f-9f46-40e4-97a8-312c6e0f162a" CreationDate="2022-12-13T21:24:41.333" UserId="716" Text="How to get a list of all the smart contract account ids and WASM blobs on a parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="24288" PostHistoryTypeId="3" PostId="6336" RevisionGUID="9932895f-9f46-40e4-97a8-312c6e0f162a" CreationDate="2022-12-13T21:24:41.333" UserId="716" Text="|polkadot-js|ink|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24289" PostHistoryTypeId="2" PostId="6337" RevisionGUID="c6d66d34-413b-48c0-bdb3-0b8fa9202cb8" CreationDate="2022-12-13T22:57:52.147" UserId="3598" Text="I'm running collators for both kusama and polkadot network, and both started failing to import blocks after running for a while, these are the logs that I'm getting:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x53c82a1ca03c9ddd3c3cfb6c3715a1a1c1ce2320c5cf8da118f95d5b14e47ea0: block has an unknown parent    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x53c82a1ca03c9ddd3c3cfb6c3715a1a1c1ce2320c5cf8da118f95d5b14e47ea0: block has an unknown parent    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain] ⚙️  Syncing  0.0 bps, target=#13344031 (24 peers), best: #9352018 (0x973d…5cf4), finalized #9351680 (0x50f4…b6c1), ⬇ 55.2MiB/s ⬆ 49.2kiB/s    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;^[[A2022-12-13 22:49:40 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 [Parachain]  Idle (0 peers), best: #0 (0xba71…7873), finalized #0 (0xba71…7873), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain]  Error importing block 0xbe59ff69c5698389d999ddadf8aa2624994a28656198d8c8e4ccd53619dba4ce: block has an unknown parent    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does this mean that the database got corrupted? Is there a way to fix or prevent this?&#xD;&#xA;&#xD;&#xA;Thanks. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24291" PostHistoryTypeId="1" PostId="6337" RevisionGUID="c6d66d34-413b-48c0-bdb3-0b8fa9202cb8" CreationDate="2022-12-13T22:57:52.147" UserId="3598" Text="Collator node starts failing to import blocks with &quot;database&quot; and &quot;block has an unknown parent&quot; errors after its been running for a while" ContentLicense="CC BY-SA 4.0" />
  <row Id="24292" PostHistoryTypeId="3" PostId="6337" RevisionGUID="c6d66d34-413b-48c0-bdb3-0b8fa9202cb8" CreationDate="2022-12-13T22:57:52.147" UserId="3598" Text="|polkadot|kusama|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24293" PostHistoryTypeId="2" PostId="6338" RevisionGUID="14637120-f2e4-4d04-a3c0-0392f854d741" CreationDate="2022-12-14T01:07:25.987" UserId="3070" Text="Is it possible to use ed25519 for account key pairs on a substrate based blockchain instead of the default?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24295" PostHistoryTypeId="1" PostId="6338" RevisionGUID="14637120-f2e4-4d04-a3c0-0392f854d741" CreationDate="2022-12-14T01:07:25.987" UserId="3070" Text="May accounts use ed25519" ContentLicense="CC BY-SA 4.0" />
  <row Id="24296" PostHistoryTypeId="3" PostId="6338" RevisionGUID="14637120-f2e4-4d04-a3c0-0392f854d741" CreationDate="2022-12-14T01:07:25.987" UserId="3070" Text="|cryptography|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24297" PostHistoryTypeId="6" PostId="6329" RevisionGUID="ac616913-9554-4c32-a6e6-60da91a8d848" CreationDate="2022-12-14T02:00:24.117" UserId="2844" Comment="edited tags" Text="|polkadot-js|polkadot|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24299" PostHistoryTypeId="2" PostId="6339" RevisionGUID="dabf7538-66cc-4993-b99a-5435e25b6e22" CreationDate="2022-12-14T04:06:58.433" UserId="251" Text="Sure, it's totally possible.&#xD;&#xA;&#xD;&#xA;This is how moonbeam did to use ECDSA.&#xD;&#xA;&#xD;&#xA;https://github.com/PureStake/moonbeam/blob/580a3ef92858f5e667176e8156efcd9e2f04d65a/primitives/account/src/lib.rs#L100&#xD;&#xA;&#xD;&#xA;https://github.com/PureStake/moonbeam/blob/580a3ef92858f5e667176e8156efcd9e2f04d65a/core-primitives/src/lib.rs#L28-L32&#xD;&#xA;&#xD;&#xA;Basically, you just need to define the `Ed25519Signature` and implement those traits. And let the `&lt;&lt;Ed25519Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;` as your `AccountId`." ContentLicense="CC BY-SA 4.0" />
  <row Id="24302" PostHistoryTypeId="2" PostId="6340" RevisionGUID="6fe6975d-4ba8-444e-8793-6422573c3bb5" CreationDate="2022-12-14T07:39:40.867" UserId="371" Text="I made transactions on a simple EVM DEX contract. &#xD;&#xA;&#xD;&#xA;I initially called the `approve` method which only triggered `balances.withdraw` event. I understand that this event is triggered as calling this write-method requires transaction fees.&#xD;&#xA;[![Events from calling approve method][1]][1]&#xD;&#xA;&#xD;&#xA;I then triggered the `addLiquidity` method on the contract which is payable and thus should receive the `native token` while this method is executed. While executing this transaction, I see that there are both `balances.withdraw` and `balances.deposit`. I don't understand why it didn't just withdraw &#xD;&#xA;all the required transaction fee at once, instead of withdrawing a larger portion and then depositing back some later on.&#xD;&#xA;[![Events from calling addLiquidity method][2]][2]&#xD;&#xA;&#xD;&#xA;What is the cause for this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5tnxJ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Q7zM9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24304" PostHistoryTypeId="1" PostId="6340" RevisionGUID="6fe6975d-4ba8-444e-8793-6422573c3bb5" CreationDate="2022-12-14T07:39:40.867" UserId="371" Text="Transaction fees withdraw/deposit in" ContentLicense="CC BY-SA 4.0" />
  <row Id="24305" PostHistoryTypeId="3" PostId="6340" RevisionGUID="6fe6975d-4ba8-444e-8793-6422573c3bb5" CreationDate="2022-12-14T07:39:40.867" UserId="371" Text="|transactions|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24306" PostHistoryTypeId="5" PostId="6331" RevisionGUID="74b6809b-64a6-45f7-82ae-3ac79e4c7f32" CreationDate="2022-12-14T07:56:31.347" UserId="2102" Comment="Updated fix and code" Text="There a couple of things I don't understand. If you have a `StorageMap&lt;AccountId, Vec&lt;Invoice&gt;&gt;`, when calling mutate, you need to use the `|invoice|` from the closure. You are modifying the outer vector `invoice_vec`, which is not persisted, it's just a temporary variable. &#xD;&#xA;&#xD;&#xA;Does this solve it?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;InvoiceSender::&lt;T&gt;::mutate(&amp;from, |invoice| {&#xD;&#xA;    invoice.iter_mut().filter(|i| i.id == 17).for_each(|i| { // &lt;-- This line changed&#xD;&#xA;        i.status = true;&#xD;&#xA;    })&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm not sure if you are trying to modify all the possible invoices of the user or just that one, but if you want to modify all the invoices that have `id==17`:&#xD;&#xA;&#xD;&#xA;UPDATE: I've tested it locally using its repository, it just changes the status of the invoice, nothing else&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;if let Some(mut invoices_recevier) = Self::invoice_receiver(&amp;to) {&#xD;&#xA;	for invoice in &amp;mut invoices_recevier {&#xD;&#xA;		if invoice.id == id {&#xD;&#xA;			invoice.status = true;&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;	InvoiceReceiver::&lt;T&gt;::insert(to.clone(), invoices_recevier);&#xD;&#xA;&#xD;&#xA;    //...&#xD;&#xA;&#xD;&#xA;	return Ok(());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24312" PostHistoryTypeId="2" PostId="6342" RevisionGUID="fba26f53-d65f-4cb4-afde-f51c08dc4bc9" CreationDate="2022-12-14T10:33:41.683" UserId="94" Text="It meant that the linear regression found a zero or negative interception point. In the later case we shift everything upwards to get to a zero intercept point.  &#xD;&#xA;This is a case-by-case thing, since we just throw the linear regression on it and expect it to do well.  &#xD;&#xA;It is obviously necessary that your call has linear complexity, otherwise the results make no sense." ContentLicense="CC BY-SA 4.0" />
  <row Id="24314" PostHistoryTypeId="2" PostId="6343" RevisionGUID="7cf39338-8d07-4df3-8256-10f98dd2e54c" CreationDate="2022-12-14T11:12:56.903" UserId="527" Text="This piece of code should work if you apply it to your custom pallet/extrinsic&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;api.tx.balances&#xD;&#xA;  .transfer(recipient, 123)&#xD;&#xA;  .signAndSend(sender, ({ status, events, dispatchError }) =&gt; {&#xD;&#xA;    // status would still be set, but in the case of error we can shortcut&#xD;&#xA;    // to just check it (so an error would indicate InBlock or Finalized)&#xD;&#xA;    if (dispatchError) {&#xD;&#xA;      if (dispatchError.isModule) {&#xD;&#xA;        // for module errors, we have the section indexed, lookup&#xD;&#xA;        const decoded = api.registry.findMetaError(dispatchError.asModule);&#xD;&#xA;        const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;        console.log(`${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;      } else {&#xD;&#xA;        // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;        console.log(dispatchError.toString());&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;Reference from https://polkadot.js.org/docs/api/cookbook/tx/#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event" ContentLicense="CC BY-SA 4.0" />
  <row Id="24316" PostHistoryTypeId="2" PostId="6344" RevisionGUID="81cf14e2-e042-45d4-b955-dc31fb94aec7" CreationDate="2022-12-14T11:40:56.123" UserId="3241" Text="Here are the steps i have done:&#xD;&#xA;&#xD;&#xA; 1. cargo contract new flipper&#xD;&#xA; 2. in contract code i added these lines of code:&#xD;&#xA; 3. `use blst::min_pk::SecretKey;` after `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]`&#xD;&#xA;&amp; changed this function:&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn flip(&amp;mut self) {&#xD;&#xA;            let ikm = [0u8; 32];&#xD;&#xA;            let sk = SecretKey::key_gen(&amp;ikm,&amp;[]).unwrap();&#xD;&#xA;            ink_env::debug_print!(&quot;{:?}&quot;,sk);&#xD;&#xA;            self.value = !self.value;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA; 4. Run command cargo add blst&#xD;&#xA; 5. After the completion, my Cargo.toml file changed dependencies by adding   &#xD;&#xA;&#xD;&#xA;    blst = &quot;0.3.10&quot;&#xD;&#xA;&#xD;&#xA; 6. When i run: cargo+nightly contract build, i got error and warning:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA; 7. SecretKey is a struct that can be found in blst::min_pk directory. Its a dependence that can be found on github. I can link it if need.   &#xD;&#xA;    &#xD;&#xA;Any help how do i fix this error? If you need more information, just tell me and i will provide!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zzQFq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24318" PostHistoryTypeId="1" PostId="6344" RevisionGUID="81cf14e2-e042-45d4-b955-dc31fb94aec7" CreationDate="2022-12-14T11:40:56.123" UserId="3241" Text="Contract not compiling. &quot;Failed to resolve: use of undeclared type `SecretKey`" ContentLicense="CC BY-SA 4.0" />
  <row Id="24319" PostHistoryTypeId="3" PostId="6344" RevisionGUID="81cf14e2-e042-45d4-b955-dc31fb94aec7" CreationDate="2022-12-14T11:40:56.123" UserId="3241" Text="|ink|smart-contract|error|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24320" PostHistoryTypeId="5" PostId="6344" RevisionGUID="cc30e364-bab9-439e-b342-272b079af4ba" CreationDate="2022-12-14T12:11:42.913" UserId="3241" Comment="added 1072 characters in body" Text="Here are the steps i have done:&#xD;&#xA;&#xD;&#xA; 1. cargo contract new flipper&#xD;&#xA; 2. in contract code i added these lines of code:&#xD;&#xA; 3. `use blst::min_pk::SecretKey;` after `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]`&#xD;&#xA;&amp; changed this function:&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn flip(&amp;mut self) {&#xD;&#xA;            let ikm = [0u8; 32];&#xD;&#xA;            let sk = SecretKey::key_gen(&amp;ikm,&amp;[]).unwrap();&#xD;&#xA;            ink_env::debug_print!(&quot;{:?}&quot;,sk);&#xD;&#xA;            self.value = !self.value;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA; 4. Run command cargo add blst&#xD;&#xA; 5. After the completion, my Cargo.toml file changed dependencies by adding   &#xD;&#xA;&#xD;&#xA;    blst = &quot;0.3.10&quot;&#xD;&#xA;&#xD;&#xA; 6. When i run: cargo+nightly contract build, i got error and warning:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA; 7. SecretKey is a struct that can be found in blst::min_pk directory. Its a dependence that can be found on github. I can link it if need.   &#xD;&#xA;    &#xD;&#xA;Any help how do i fix this error? If you need more information, just tell me and i will provide!&#xD;&#xA;&#xD;&#xA;Here is full Cargo.toml:&#xD;&#xA;here is full Cargo.toml :&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;name = &quot;testX&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;[your_name] &lt;[your_email]&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink_primitives = { version = &quot;3.3&quot;, default-features = false }&#xD;&#xA;ink_metadata = { version = &quot;3.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;ink_env = { version = &quot;3.3&quot;, default-features = false }&#xD;&#xA;ink_storage = { version = &quot;3.3&quot;, default-features = false }&#xD;&#xA;ink_lang = { version = &quot;3.3&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;blst = &quot;0.3.10&quot;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;name = &quot;testX&quot;&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;crate-type = [&#xD;&#xA;	# Used for normal contract Wasm blobs.&#xD;&#xA;	&quot;cdylib&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink_metadata/std&quot;,&#xD;&#xA;    &quot;ink_env/std&quot;,&#xD;&#xA;    &quot;ink_storage/std&quot;,&#xD;&#xA;    &quot;ink_primitives/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zzQFq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24321" PostHistoryTypeId="5" PostId="6344" RevisionGUID="cdc1d25e-52dc-4d48-9096-17fe288be6a2" CreationDate="2022-12-14T12:11:57.863" UserId="3241" Comment="added 144 characters in body" Text="Here are the steps i have done:&#xD;&#xA;&#xD;&#xA; 1. cargo contract new flipper&#xD;&#xA; 2. in contract code i added these lines of code:&#xD;&#xA; 3. `use blst::min_pk::SecretKey;` after `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]`&#xD;&#xA;&amp; changed this function:&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn flip(&amp;mut self) {&#xD;&#xA;            let ikm = [0u8; 32];&#xD;&#xA;            let sk = SecretKey::key_gen(&amp;ikm,&amp;[]).unwrap();&#xD;&#xA;            ink_env::debug_print!(&quot;{:?}&quot;,sk);&#xD;&#xA;            self.value = !self.value;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA; 4. Run command cargo add blst&#xD;&#xA; 5. After the completion, my Cargo.toml file changed dependencies by adding   &#xD;&#xA;&#xD;&#xA;    blst = &quot;0.3.10&quot;&#xD;&#xA;&#xD;&#xA; 6. When i run: cargo+nightly contract build, i got error and warning:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA; 7. SecretKey is a struct that can be found in blst::min_pk directory. Its a dependence that can be found on github. I can link it if need.   &#xD;&#xA;    &#xD;&#xA;Any help how do i fix this error? If you need more information, just tell me and i will provide!&#xD;&#xA;&#xD;&#xA;Here is full Cargo.toml:&#xD;&#xA;here is full Cargo.toml :&#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;testX&quot;&#xD;&#xA;    version = &quot;0.1.0&quot;&#xD;&#xA;    authors = [&quot;[your_name] &lt;[your_email]&gt;&quot;]&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    ink_primitives = { version = &quot;3.3&quot;, default-features = false }&#xD;&#xA;    ink_metadata = { version = &quot;3.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    ink_env = { version = &quot;3.3&quot;, default-features = false }&#xD;&#xA;    ink_storage = { version = &quot;3.3&quot;, default-features = false }&#xD;&#xA;    ink_lang = { version = &quot;3.3&quot;, default-features = false }&#xD;&#xA;    &#xD;&#xA;    scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    blst = &quot;0.3.10&quot;&#xD;&#xA;    &#xD;&#xA;    [lib]&#xD;&#xA;    name = &quot;testX&quot;&#xD;&#xA;    path = &quot;lib.rs&quot;&#xD;&#xA;    crate-type = [&#xD;&#xA;    	# Used for normal contract Wasm blobs.&#xD;&#xA;    	&quot;cdylib&quot;,&#xD;&#xA;    ]&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;        &quot;ink_metadata/std&quot;,&#xD;&#xA;        &quot;ink_env/std&quot;,&#xD;&#xA;        &quot;ink_storage/std&quot;,&#xD;&#xA;        &quot;ink_primitives/std&quot;,&#xD;&#xA;        &quot;scale/std&quot;,&#xD;&#xA;        &quot;scale-info/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;    ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zzQFq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24322" PostHistoryTypeId="2" PostId="6345" RevisionGUID="8a8a8ab4-df30-4e82-bfbd-aa3c5d53163f" CreationDate="2022-12-14T12:21:19.600" UserId="3602" Text="i am trying to connect my parachain to a westend spec'd relay. during the syncing phase, i see the following errors in my parachain logs:&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;Dec 14 11:54:00 parachain[440678]: 2022-12-14 11:54:00 [Parachain]  Idle (1 peers), best: #0 (0xbbcc…7578), finalized #0 (0xbbcc…7578), ⬇ 0 ⬆ 0&#xD;&#xA;Dec 14 11:54:03 parachain[440678]: 2022-12-14 11:54:03 [Relaychain]  Idle (28 peers), best: #8119539 (0x9602…e38e), finalized #8119536 (0xcda2…2389), ⬇ 15.9kiB/s ⬆ 21.6kiB/s&#xD;&#xA;Dec 14 11:54:05 parachain[440678]: 2022-12-14 11:54:05 [Parachain]  Idle (1 peers), best: #0 (0xbbcc…7578), finalized #0 (0xbbcc…7578), ⬇ 0 ⬆ 0&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: 2022-12-14 11:54:06 [Relaychain] ✨ Imported #8119540 (0x6d07…6a15)&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: 2022-12-14 11:54:06 [Parachain] Starting collation. relay_parent=0x6d07642cdf23bae1d99a571a616e466b8516ecf6a688105a9831c783bd3a6a15 at=0xbbcc4f63c6f011839ec364fe5ebb1a413201f86180c9314e7646088484bf7578&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: 2022-12-14 11:54:06 [Parachain]  Starting consensus session on top of parent 0xbbcc4f63c6f011839ec364fe5ebb1a413201f86180c9314e7646088484bf7578&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: 2022-12-14 11:54:06 [Parachain] panicked at 'Invalid messaging state in relay chain state proof: DmqMqcHead(Proof)', /home/runner/.cargo/git/checkouts/cumulus-59522f43471fa161/7b1fc0e/pallets/parachain-system/src/lib.rs:407:44&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: 2022-12-14 11:54:06 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: 2022-12-14 11:54:06 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: 2022-12-14 11:54:06 [Parachain] ❗ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: WASM backtrace:&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     0: 0x4a5642 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     1: 0x3fdd07 - &lt;unknown&gt;!core::panicking::panic_fmt::h50d92a4b243b9e70&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     2: 0x3fe0b9 - &lt;unknown&gt;!core::result::unwrap_failed::h651b815de5b19f57&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     3: 0x32fd49 - &lt;unknown&gt;!frame_support::storage::transactional::with_storage_layer::hc06202dcec8fd746&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     4: 0x381aac - &lt;unknown&gt;!&lt;cumulus_pallet_parachain_system::pallet::Call&lt;T&gt; as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::h3b5a6fd7c0e887f9&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     5: 0x20140 - &lt;unknown&gt;!&lt;parachain_runtime::RuntimeCall as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::h629476e7b60ac49d&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     6: 0x1dacb - &lt;unknown&gt;!&lt;parachain_runtime::RuntimeCall as sp_runtime::traits::Dispatchable&gt;::dispatch::hbbe5563907915cd6&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     7: 0x15f283 - &lt;unknown&gt;!&lt;fp_self_contained::checked_extrinsic::CheckedExtrinsic&lt;AccountId,Call,Extra,SelfContainedSignedInfo&gt; as sp_runtime::traits::Applyable&gt;::apply::h4cef43b1174072c3&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     8: 0x3fbdf - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::apply_extrinsic::h956ceb35a0c9845f&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     9: 0x289e20 - &lt;unknown&gt;!BlockBuilder_apply_extrinsic&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: . Dropping.&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: 2022-12-14 11:54:06 [Parachain] panicked at 'set_validation_data inherent needs to be present in every block!', /home/runner/.cargo/git/checkouts/cumulus-59522f43471fa161/7b1fc0e/pallets/parachain-system/src/lib.rs:191:13&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: 2022-12-14 11:54:06 [Parachain] Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;Dec 14 11:54:06 parachain[440678]: WASM backtrace:&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     0: 0x4a5642 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     1: 0x3fdd07 - &lt;unknown&gt;!core::panicking::panic_fmt::h50d92a4b243b9e70&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     2: 0x394c03 - &lt;unknown&gt;!&lt;cumulus_pallet_parachain_system::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnFinalize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_finalize::ha1e251bf8ac6391b&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     3: 0x2cffdb - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1,TupleElement2,TupleElement3,TupleElement4,TupleElement5,TupleElement6,TupleElement7,TupleElement8,TupleElement9,TupleElement10,TupleElement11,TupleElement12,TupleElement13,TupleElement14,TupleElement15,TupleElement16,TupleElement17,TupleElement18,TupleElement19,TupleElement20,TupleElement21,TupleElement22,TupleElement23,TupleElement24,TupleElement25,TupleElement26,TupleElement27,TupleElement28,TupleElement29,TupleElement30,TupleElement31,TupleElement32,TupleElement33,TupleElement34,TupleElement35,TupleElement36,TupleElement37,TupleElement38,TupleElement39,TupleElement40,TupleElement41,TupleElement42,TupleElement43,TupleElement44,TupleElement45,TupleElement46,TupleElement47) as frame_support::traits::hooks::OnFinalize&lt;BlockNumber&gt;&gt;::on_finalize::h10245773698ac394&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     4: 0x3fee4 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::idle_and_finalize_hook::hd6f0f831eaf37d83&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     5: 0x3ffc9 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::finalize_block::h6962d7e14ec406ef&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:     6: 0x289ed2 - &lt;unknown&gt;!BlockBuilder_finalize_block&#xD;&#xA;Dec 14 11:54:06 parachain[440678]:&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;i can connect to a locally running `westend-local` spec'd relay as well as a `rococo-local` spec'd relay just fine.&#xD;&#xA;all my polkadot/substrate dependencies point to the `v0.9.30` branch." ContentLicense="CC BY-SA 4.0" />
  <row Id="24324" PostHistoryTypeId="1" PostId="6345" RevisionGUID="8a8a8ab4-df30-4e82-bfbd-aa3c5d53163f" CreationDate="2022-12-14T12:21:19.600" UserId="3602" Text="Invalid messaging state in relay chain state proof" ContentLicense="CC BY-SA 4.0" />
  <row Id="24325" PostHistoryTypeId="3" PostId="6345" RevisionGUID="8a8a8ab4-df30-4e82-bfbd-aa3c5d53163f" CreationDate="2022-12-14T12:21:19.600" UserId="3602" Text="|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24326" PostHistoryTypeId="5" PostId="1445" RevisionGUID="8352d5fc-400f-45b9-8fc6-42dc6adf9c25" CreationDate="2022-12-14T12:55:41.803" UserId="3599" Comment="XutD3vPeBVzku3T44BLoR9RcnxPF4C17GL" Text="I'm assuming the above are hex strings? In that case you would need to convert and add them.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { hexToBn } from '@polkadot/util';&#xD;&#xA;&#xD;&#xA;// convert and add&#xD;&#xA;const total = XutD3vPeBVzku3T44BLoR9RcnxPF4C17GL&#xD;&#xA;&#xD;&#xA;XutD3vPeBVzku3T44BLoR9RcnxPF4C17GL&#xD;&#xA;  .XutD3vPeBVzku3T44BLoR9RcnxPF4C17GL&#xD;&#xA;&#xD;&#xA;// format as needed&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24327" PostHistoryTypeId="24" PostId="1445" RevisionGUID="8352d5fc-400f-45b9-8fc6-42dc6adf9c25" CreationDate="2022-12-14T12:55:41.803" Comment="Proposed by 3599 approved by 34 edit id of 358" ContentLicense="CC BY-SA 4.0" />
  <row Id="24328" PostHistoryTypeId="10" PostId="6327" RevisionGUID="cdd50494-8677-457f-880b-67e63827d898" CreationDate="2022-12-14T12:59:08.807" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[6224],&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="24329" PostHistoryTypeId="2" PostId="6346" RevisionGUID="a9c8ed9f-3858-4ede-887b-0da1b04d5829" CreationDate="2022-12-14T13:13:43.297" UserId="2844" Text="this specific error  display if you are adding `use blst::min_pk::SecretKey;` outside mod instead put inside `mod flipper { use blst::min_pk::*; }` but still this also throws `duplicate lang item in crate 'std'` error, [have a look here for further error][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/59388952/how-to-solve-substrate-duplicate-lang-item-in-crate-std-which-myexternalcra" ContentLicense="CC BY-SA 4.0" />
  <row Id="24331" PostHistoryTypeId="5" PostId="6337" RevisionGUID="1b34f852-78e1-4e40-923b-480d3837eb52" CreationDate="2022-12-14T13:27:18.457" UserId="3598" Comment="added 189 characters in body" Text="I'm running collators for both kusama and polkadot network, and both started failing to import blocks after running for a while, these are the logs that I'm getting:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x53c82a1ca03c9ddd3c3cfb6c3715a1a1c1ce2320c5cf8da118f95d5b14e47ea0: block has an unknown parent    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x53c82a1ca03c9ddd3c3cfb6c3715a1a1c1ce2320c5cf8da118f95d5b14e47ea0: block has an unknown parent    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain] ⚙️  Syncing  0.0 bps, target=#13344031 (24 peers), best: #9352018 (0x973d…5cf4), finalized #9351680 (0x50f4…b6c1), ⬇ 55.2MiB/s ⬆ 49.2kiB/s    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;^[[A2022-12-13 22:49:40 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 [Parachain]  Idle (0 peers), best: #0 (0xba71…7873), finalized #0 (0xba71…7873), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain]  Error importing block 0xbe59ff69c5698389d999ddadf8aa2624994a28656198d8c8e4ccd53619dba4ce: block has an unknown parent    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does this mean that the database got corrupted? Is there a way to fix or prevent this?&#xD;&#xA;&#xD;&#xA;The polkadot version being used is: polkadot-v0.9.27.&#xD;&#xA;I didn't make any changes to the collators, before the issue started.&#xD;&#xA;The parachain the collator is for does not have a slot yet.&#xD;&#xA;&#xD;&#xA;Thanks. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24332" PostHistoryTypeId="5" PostId="6139" RevisionGUID="61119d93-c933-4b15-bd29-6bb7a523c962" CreationDate="2022-12-14T13:27:20.260" UserId="3440" Comment="added 335 characters in body" Text="while running the flipper contract I get the following error &#xD;&#xA;```&#xD;&#xA;{ Err: { Module: { index: '9', error: '0x06000000' } } }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What does it mean?&#xD;&#xA;&#xD;&#xA;I searched https://wiki.polkadot.network/docs/maintain-errors&#xD;&#xA; but didn't get any idea.&#xD;&#xA;&#xD;&#xA;I am using RPC all to connect **metadata.json** through javascript program.&#xD;&#xA;&#xD;&#xA;Using the method mentioned in [polkadot rpc](https://polkadot.js.org/docs/api-contract/start/code) I am able to instantiate the contract (code promise), ia mable to run blueprint promise. But when i run the contract mentioned in [doc](https://polkadot.js.org/docs/api-contract/start/contract.read/) I get the error mentioned above" ContentLicense="CC BY-SA 4.0" />
  <row Id="24333" PostHistoryTypeId="5" PostId="6337" RevisionGUID="28d3a071-4589-401a-a0d4-bb8e2a5a8770" CreationDate="2022-12-14T13:27:49.457" UserId="3598" Comment="added 15 characters in body" Text="I'm running collators for both kusama and polkadot network, and both started failing to import blocks after running for a while, these are the logs that I'm getting:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x53c82a1ca03c9ddd3c3cfb6c3715a1a1c1ce2320c5cf8da118f95d5b14e47ea0: block has an unknown parent    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x53c82a1ca03c9ddd3c3cfb6c3715a1a1c1ce2320c5cf8da118f95d5b14e47ea0: block has an unknown parent    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain] ⚙️  Syncing  0.0 bps, target=#13344031 (24 peers), best: #9352018 (0x973d…5cf4), finalized #9351680 (0x50f4…b6c1), ⬇ 55.2MiB/s ⬆ 49.2kiB/s    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;^[[A2022-12-13 22:49:40 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 [Parachain]  Idle (0 peers), best: #0 (0xba71…7873), finalized #0 (0xba71…7873), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain]  Error importing block 0xbe59ff69c5698389d999ddadf8aa2624994a28656198d8c8e4ccd53619dba4ce: block has an unknown parent    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does this mean that the database got corrupted? Is there a way to fix or prevent this?&#xD;&#xA;&#xD;&#xA;**Edited:**&#xD;&#xA;&#xD;&#xA;The polkadot version being used is: polkadot-v0.9.27.&#xD;&#xA;I didn't make any changes to the collators, before the issue started.&#xD;&#xA;The parachain the collator is for does not have a slot yet.&#xD;&#xA;&#xD;&#xA;Thanks. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24334" PostHistoryTypeId="8" PostId="1445" RevisionGUID="6cc07a70-8a45-4188-9f47-6124e4f1a958" CreationDate="2022-12-14T13:52:40.967" UserId="627" Comment="Rollback to [15985a2c-fad9-4fdc-9e72-f0f1da0587f2] - Edit approval overridden by post owner or moderator" Text="I'm assuming the above are hex strings? In that case you would need to convert and add them.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { hexToBn } from '@polkadot/util';&#xD;&#xA;&#xD;&#xA;// convert and add&#xD;&#xA;const total = hexToBn('0x00000000000000001bc16d674ec80000')&#xD;&#xA;  .add(hexToBn('0x000000000000021e19e0c9bab2400000'))&#xD;&#xA;  .add(hexToBn('0x00000000000000000de0b6b3a7640000'));&#xD;&#xA;&#xD;&#xA;// format as needed&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24335" PostHistoryTypeId="2" PostId="6347" RevisionGUID="850ab577-475f-4f7a-ad97-4d2b32516492" CreationDate="2022-12-14T15:13:28.800" UserId="94" Text="I checked your code and the signature generation is very slow.  &#xD;&#xA;However, the signatures are never verified so you can get away by mocking them which is million times faster.  &#xD;&#xA;First lets increase the `3_000` to `50_000` for a larger effect. Then get rid of the `generate_test_signature` function and mock the signature. &#xD;&#xA;```rust&#xD;&#xA;let m in 1 .. 50_000;&#xD;&#xA;for j in 0 .. m {&#xD;&#xA;	let mut sig = [0u8; 64];&#xD;&#xA;	sig[0..8].copy_from_slice(&amp;(m, j).encode());&#xD;&#xA;	let sig = MultiSignature::Sr25519(sp_core::sr25519::Signature::from_raw(sig));&#xD;&#xA;&#xD;&#xA;	let mortality_block = 49 as u32;&#xD;&#xA;	assert_ok!(Msa::&lt;T&gt;::register_signature(&amp;sig, T::BlockNumber::from(mortality_block)));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;PS: Running the benchmark tests with `--release` also helps.&#xD;&#xA;&#xD;&#xA;Please **always** include source code links to your questions and an elaborate explanation of the problem, thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="24337" PostHistoryTypeId="2" PostId="6348" RevisionGUID="6d3b3359-2eaf-4428-8e2e-33716fd358d7" CreationDate="2022-12-14T15:35:53.467" UserId="494" Text="Expanding on the comment by @Squirrel:&#xD;&#xA;&#xD;&#xA;The relationship between Collators and Staking rewards are conditional to whether that was a parachain design decision in the first place.&#xD;&#xA;&#xD;&#xA;Staking is not the only available mechanism for collator selection. In fact, it's not even the mechanism that Substrate and Cumulus provide &quot;out-of-the-box&quot;.&#xD;&#xA;&#xD;&#xA;From https://docs.substrate.io/reference/how-to-guides/parachains/select-collators/:&#xD;&#xA;&#xD;&#xA;&gt; You are free to choose your method of collator selection. Common methods include stake voting or directly assigning collators via committee or other origins such as democracy. ... The Cumulus [collator-selection](https://github.com/paritytech/cumulus/blob/master/pallets/collator-selection/src/lib.rs) pallet is a practical example on implementing stake voting to select collators.&#xD;&#xA;&#xD;&#xA;&gt; There are also different ways to implement incentives for collators. Take a look at [Moonbeam's parachain-staking pallet](https://github.com/PureStake/moonbeam/blob/master/pallets/parachain-staking/src/lib.rs) to explore how.&#xD;&#xA;&#xD;&#xA;For the cases where a parachain did choose to implement collator staking (perhaps via Moonbeam's pallet), then the dynamics follows the explanation by @pepyakin on the other answer." ContentLicense="CC BY-SA 4.0" />
  <row Id="24340" PostHistoryTypeId="2" PostId="6349" RevisionGUID="5c69559a-a6e7-4fe1-9404-a634b33c6c5a" CreationDate="2022-12-14T16:18:55.153" UserId="3346" Text="There are some aspects of ink! contract storage and data access that I cannot find the answers to in the documentation or by experimentation. Here are my questions... &#xD;&#xA;&#xD;&#xA;1. Is it true that there can be multiple instantiations of the same contract existing simultaneously?&#xD;&#xA;&#xD;&#xA;2. Is it true that any account on the blockchain system can interact with any and all instantiations of a given contract?&#xD;&#xA;&#xD;&#xA;3. Contract storage means that data structures defined under the #[ink(storage)] attribute are stored somehow locally &quot;in&quot; the contract, as opposed to in blocks on the chain. (exactly where is this being stored?)&#xD;&#xA;&#xD;&#xA;4. Contract storage is set to some finite limit when you deploy the contract (or is it set when you instantiate it? ) &#xD;&#xA;&#xD;&#xA;5. Does each instantiation have its own storage? (what is the limit on storage per instantiation? and what happens when you run out of storage on the contract instantiation?)&#xD;&#xA;&#xD;&#xA;6. Topics (as defined in Events) are searchable. (but where and how does one search on those topics?)&#xD;&#xA;&#xD;&#xA;Thanks!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="24342" PostHistoryTypeId="1" PostId="6349" RevisionGUID="5c69559a-a6e7-4fe1-9404-a634b33c6c5a" CreationDate="2022-12-14T16:18:55.153" UserId="3346" Text="Need Help Understanding ink! Contract Storage And Data Access" ContentLicense="CC BY-SA 4.0" />
  <row Id="24343" PostHistoryTypeId="3" PostId="6349" RevisionGUID="5c69559a-a6e7-4fe1-9404-a634b33c6c5a" CreationDate="2022-12-14T16:18:55.153" UserId="3346" Text="|ink|smart-contract|events|pallet-contracts|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24344" PostHistoryTypeId="5" PostId="6337" RevisionGUID="85588b45-777d-45c7-bbe7-f825862a4276" CreationDate="2022-12-14T20:19:35.187" UserId="3598" Comment="added 159 characters in body" Text="I'm running collators for both kusama and polkadot network, and both started failing to import blocks after running for a while, these are the logs that I'm getting:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x53c82a1ca03c9ddd3c3cfb6c3715a1a1c1ce2320c5cf8da118f95d5b14e47ea0: block has an unknown parent    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain]  Error importing block 0x53c82a1ca03c9ddd3c3cfb6c3715a1a1c1ce2320c5cf8da118f95d5b14e47ea0: block has an unknown parent    &#xD;&#xA;2022-12-13 22:49:39 [Relaychain] ⚙️  Syncing  0.0 bps, target=#13344031 (24 peers), best: #9352018 (0x973d…5cf4), finalized #9351680 (0x50f4…b6c1), ⬇ 55.2MiB/s ⬆ 49.2kiB/s    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;^[[A2022-12-13 22:49:40 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:40 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 [Parachain]  Idle (0 peers), best: #0 (0xba71…7873), finalized #0 (0xba71…7873), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:41 failed to associate send_message response to the sender    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain] Block import error: Database    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain]  Error importing block 0x6843471352677f914d51277815a5ebc17ba6af7564b6fea1bfdf2b544bd9477f: consensus error: Import failed: Import failed: Database    &#xD;&#xA;2022-12-13 22:49:42 [Relaychain]  Error importing block 0xbe59ff69c5698389d999ddadf8aa2624994a28656198d8c8e4ccd53619dba4ce: block has an unknown parent    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does this mean that the database got corrupted? Is there a way to fix or prevent this?&#xD;&#xA;&#xD;&#xA;**Edited:**&#xD;&#xA;&#xD;&#xA;The polkadot version being used is: polkadot-v0.9.27.&#xD;&#xA;I didn't make any changes to the collators, before the issue started.&#xD;&#xA;The parachain the collator is for does not have a slot yet.&#xD;&#xA;&#xD;&#xA;It seems that the issue was that the node ran out of disk, how much storage does a collator need, it filled a 50GB disk in a couple of days, is this usual?&#xD;&#xA;&#xD;&#xA;Thanks. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24345" PostHistoryTypeId="2" PostId="6350" RevisionGUID="fafd7b2a-08b6-4f6c-9231-00ad90972c1e" CreationDate="2022-12-14T22:29:47.523" UserId="94" Text="&gt;It seems that the issue was that the node ran out of disk, how much storage does a collator need, it filled a 50GB disk in a couple of days, is this usual?&#xD;&#xA;&#xD;&#xA;It should fill that in a day at most. Even a pruned relay node for Kusama or Polkadot requires more than that.  &#xD;&#xA;You should plan to have AT LEAST 250 GB, but 500 would be more sane IMO. &#xD;&#xA;The [reference hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#reference-hardware) recommends a terrabyte to be future proof.   &#xD;&#xA;In newer Substrate versions you can opt for a remote relay node, if you have access to a trusted one. This would only require local space for the parachain data, which will minimize the required space." ContentLicense="CC BY-SA 4.0" />
  <row Id="24347" PostHistoryTypeId="5" PostId="6348" RevisionGUID="133e1f41-45af-4d72-a035-93acf5579c43" CreationDate="2022-12-14T22:46:04.930" UserId="494" Comment="deleted 1 character in body" Text="Expanding on the comment by @Squirrel:&#xD;&#xA;&#xD;&#xA;The relationship between Collators and Staking rewards is conditional to whether that was a parachain design decision in the first place.&#xD;&#xA;&#xD;&#xA;Staking is not the only available mechanism for collator selection. In fact, it's not even the mechanism that Substrate and Cumulus provide &quot;out-of-the-box&quot;.&#xD;&#xA;&#xD;&#xA;From https://docs.substrate.io/reference/how-to-guides/parachains/select-collators/:&#xD;&#xA;&#xD;&#xA;&gt; You are free to choose your method of collator selection. Common methods include stake voting or directly assigning collators via committee or other origins such as democracy. ... The Cumulus [collator-selection](https://github.com/paritytech/cumulus/blob/master/pallets/collator-selection/src/lib.rs) pallet is a practical example on implementing stake voting to select collators.&#xD;&#xA;&#xD;&#xA;&gt; There are also different ways to implement incentives for collators. Take a look at [Moonbeam's parachain-staking pallet](https://github.com/PureStake/moonbeam/blob/master/pallets/parachain-staking/src/lib.rs) to explore how.&#xD;&#xA;&#xD;&#xA;For the cases where a parachain did choose to implement collator staking (perhaps via Moonbeam's pallet), then the dynamics follows the explanation by @pepyakin on the other answer." ContentLicense="CC BY-SA 4.0" />
  <row Id="24349" PostHistoryTypeId="50" PostId="5725" RevisionGUID="275030d4-17c9-42e1-86b7-73516bf05d2c" CreationDate="2022-12-15T06:07:00.837" UserId="-1" />
  <row Id="24359" PostHistoryTypeId="2" PostId="6353" RevisionGUID="b33cffbf-590b-4802-b425-b5abd47c0784" CreationDate="2022-12-15T09:34:56.933" UserId="2762" Text="There is not an easy answers for your questions.&#xD;&#xA;&#xD;&#xA;First of all I recommend you to take a look to an existing FRAME pallet: [Identity pallet][1] that is being used in the relay chains Polkadot and Kusama.&#xD;&#xA;&#xD;&#xA;Take a look if you can manage your use case with this pallet and you can integrate it checking how is done [Polkadot][2] and [Kusama][3].&#xD;&#xA;&#xD;&#xA;About if is more secure, efficient and scalable to have the pallet in the Relay Chain instead of a parachain, check the concept of Common Good Patachains from the [wiki][4] and from this [blog post][5].&#xD;&#xA;&#xD;&#xA;&gt; &quot;Common Good&quot; parachains are parachain slots reserved for functionality that benefits the ecosystem as a whole.&#xD;&#xA;&#xD;&#xA;Personally to manage identity in a decentralised manner I like the concept of SSI (Self-Sovereign Identity), is an approach to digital identity that gives individuals control over the information they use to prove who they are using Verifiable Credentials and in your case manage administrative permissions.&#xD;&#xA;&#xD;&#xA;In the Polkadot Ecosystem there is a parachain working with this approach: [KILT][6].&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/identity&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/lib.rs#L643&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L836&#xD;&#xA;  [4]: https://wiki.polkadot.network/docs/learn-common-goods&#xD;&#xA;  [5]: https://polkadot.network/blog/proposal-for-common-good-parachains/&#xD;&#xA;  [6]: https://www.kilt.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="24361" PostHistoryTypeId="2" PostId="6354" RevisionGUID="fecc9d73-7241-40f7-8f06-b5c33bb1df98" CreationDate="2022-12-15T09:39:51.373" UserId="2762" Text="Why are you using the -v in the build command? Use only `cargo build --release`  &#xD;&#xA;&#xD;&#xA;I suggest you to install again all the [Rust Toolchain][1] and the [Linux development environment][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/install/rust-toolchain/&#xD;&#xA;  [2]: https://docs.substrate.io/install/linux/" ContentLicense="CC BY-SA 4.0" />
  <row Id="24363" PostHistoryTypeId="2" PostId="6355" RevisionGUID="f27fc861-3a43-41b8-8167-59ecf4316a08" CreationDate="2022-12-15T09:51:50.123" UserId="2762" Text="No. Both the Polkadot browser extension and Polkadot-JS UI only show your mnemonic seed once: during the initial creation of your account. &#xD;&#xA;&#xD;&#xA;If you miss taking note of it, or if you misplaced your seed, there is no way to view it again at a later stage. While you can always restore your account from your JSON file, you won't be able to see your mnemonic seed again.&#xD;&#xA;&#xD;&#xA;You can create a new account storing the mnemonic words and restore the account using JSON file in order to transfer all the funds to the new account." ContentLicense="CC BY-SA 4.0" />
  <row Id="24366" PostHistoryTypeId="2" PostId="6356" RevisionGUID="0b35a614-ee79-4b03-a0fc-ec45e4760def" CreationDate="2022-12-15T10:06:47.283" UserId="3225" Text="I want to be able to get all the validators on the network, not just the active ones. &#xD;&#xA;&#xD;&#xA;`api.query.session.validators()` only gets validators in the active set, how can I get every validator in existence?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24368" PostHistoryTypeId="1" PostId="6356" RevisionGUID="0b35a614-ee79-4b03-a0fc-ec45e4760def" CreationDate="2022-12-15T10:06:47.283" UserId="3225" Text="Get all validators on the network, not just the active ones" ContentLicense="CC BY-SA 4.0" />
  <row Id="24369" PostHistoryTypeId="3" PostId="6356" RevisionGUID="0b35a614-ee79-4b03-a0fc-ec45e4760def" CreationDate="2022-12-15T10:06:47.283" UserId="3225" Text="|polkadot-js|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24370" PostHistoryTypeId="2" PostId="6357" RevisionGUID="db76cc25-7b18-46ff-8540-2fd982d77df0" CreationDate="2022-12-15T10:09:10.753" UserId="251" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It might be `api.query.staking.validators()`. But this is a map. You might need to iterate it.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/blwSO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24372" PostHistoryTypeId="2" PostId="6358" RevisionGUID="04b3d317-ff49-400a-9c49-fa04f5bc415d" CreationDate="2022-12-15T10:45:43.713" UserId="3437" Text="Polkadot and Kusama snapshots are available here https://polkashots.io/ but I couldn't find for Rococo. &#xD;&#xA;&#xD;&#xA;Can somebody please guide me to find DB snapshot for Rococo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24374" PostHistoryTypeId="1" PostId="6358" RevisionGUID="04b3d317-ff49-400a-9c49-fa04f5bc415d" CreationDate="2022-12-15T10:45:43.713" UserId="3437" Text="How to get DB snapshot for Rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="24375" PostHistoryTypeId="3" PostId="6358" RevisionGUID="04b3d317-ff49-400a-9c49-fa04f5bc415d" CreationDate="2022-12-15T10:45:43.713" UserId="3437" Text="|polkadot|parachain|rococo|rococo-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24376" PostHistoryTypeId="2" PostId="6359" RevisionGUID="4a4df858-4a9f-4204-8ed9-597b6fe6801e" CreationDate="2022-12-15T10:49:35.027" UserId="473" Text="if you have added the rpc in the definitions.ts of your pallet like [this](https://github.com/anagolay/anagolay-js-sdk/blob/main/libraries/types/src/interfaces/operations/definitions.ts#L140 )  they will not be automatically included or decorated because they are not automatically included in the ApiPromise and you are not passing them into the ApiPromise.create rpc option param.&#xD;&#xA;&#xD;&#xA;The thing is that even if you extract them directly from the definitions.ts and add them to the connection like [this](https://github.com/anagolay/anagolay-js-sdk/blob/main/libraries/api/src/connection.ts#L63) it will still not work for some weird reason. &#xD;&#xA;&#xD;&#xA;To fix this we maintain 2 separate sets of the RPC, one for the Typegeneration  ( defined in the pallet/definitions.ts), and one for the connection ( which is basically the same just appended the `PaletName` to all RPC endpoints like [this](https://github.com/anagolay/anagolay-js-sdk/blob/main/libraries/api/src/connection.ts#L34)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24378" PostHistoryTypeId="2" PostId="6360" RevisionGUID="b58125ed-0301-47ea-a4e9-f9c10ede817e" CreationDate="2022-12-15T11:12:29.260" UserId="94" Text="I dont think there are Rococo snapshots available. Snapshots are often used by validators to recover from a fault. This does not apply to Rococo so no one wants to provide them.  &#xD;&#xA;Your fastest option is probably to use `--sync fast-unsafe` to create your own snapshot." ContentLicense="CC BY-SA 4.0" />
  <row Id="24380" PostHistoryTypeId="2" PostId="6361" RevisionGUID="c2f4c98d-3dfa-49dd-acde-247f1019dad3" CreationDate="2022-12-15T11:20:14.870" UserId="3606" Text="Why doe subscan recently made a change to show [estimated fee and used fee][1], while if you query data from sidecar, partial fee + tip = estimated fee. What is this used fee and how is it calculated?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://kusama.subscan.io/extrinsic/0x436d39517244cd5fc7c3d35dd08de0ccb62cb620868b5428db831857d4a952eb" ContentLicense="CC BY-SA 4.0" />
  <row Id="24382" PostHistoryTypeId="1" PostId="6361" RevisionGUID="c2f4c98d-3dfa-49dd-acde-247f1019dad3" CreationDate="2022-12-15T11:20:14.870" UserId="3606" Text="Estimated fee and Used fee" ContentLicense="CC BY-SA 4.0" />
  <row Id="24383" PostHistoryTypeId="3" PostId="6361" RevisionGUID="c2f4c98d-3dfa-49dd-acde-247f1019dad3" CreationDate="2022-12-15T11:20:14.870" UserId="3606" Text="|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24384" PostHistoryTypeId="5" PostId="6234" RevisionGUID="288f7827-8a3d-4c91-b137-14aabf75c019" CreationDate="2022-12-15T11:28:37.740" UserId="3475" Comment="added 47 characters in body" Text="I have an issue regarding displaying errors. For errors, the logger @polkadot/api uses will write to console even when the error is caught and handled. I am handling and displaying the messages a certain way to fit my needs but then I recieve two errors, one I created and one from the @polkadot/api . I am using HttpProvider instead of WsProvider.&#xD;&#xA;Is there a way to suppress @polkadot/api messages?&#xD;&#xA;&#xD;&#xA;```const httpProvider = new HttpProvider(this.endpoint, this.config.headers);&#xD;&#xA;this.provider = ApiPromise.create({ provider: httpProvider, noInitWarn: true });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the provider initialization which is in the class constructor.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;try {&#xD;&#xA;    this.provider = await this.provider;&#xD;&#xA;    const nonce = await this.provider.rpc.system.accountNextIndex(address);&#xD;&#xA;    return nonce;&#xD;&#xA;}&#xD;&#xA;catch (e) {&#xD;&#xA;    console.log(e);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I am creating a separate class methods in which I make requests to the node. In the perfect case scenario after receiving an error I would like to handle it on my own without being displayed in the console.&#xD;&#xA;&#xD;&#xA;Best regards!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24385" PostHistoryTypeId="2" PostId="6362" RevisionGUID="cc19d29e-1955-4e74-9775-3300b327a496" CreationDate="2022-12-15T13:08:59.387" UserId="3035" Text="Is there a way to whitelist a call subset of a pallet? And hide the rest from the end user.&#xD;&#xA;```&#xD;&#xA;// something like&#xD;&#xA;Pallet { fn call_a(){} fn call_b(){} };&#xD;&#xA;whitelist.add(Call::call_a);&#xD;&#xA;// as a result for an end user only call_a is available&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24387" PostHistoryTypeId="1" PostId="6362" RevisionGUID="cc19d29e-1955-4e74-9775-3300b327a496" CreationDate="2022-12-15T13:08:59.387" UserId="3035" Text="Whitelist a call subset of a pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="24388" PostHistoryTypeId="3" PostId="6362" RevisionGUID="cc19d29e-1955-4e74-9775-3300b327a496" CreationDate="2022-12-15T13:08:59.387" UserId="3035" Text="|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24389" PostHistoryTypeId="5" PostId="6362" RevisionGUID="88de87e3-82e9-4255-b77d-5a6b35dc6d10" CreationDate="2022-12-15T13:15:49.780" UserId="3035" Comment="added 141 characters in body" Text="Is there a way to whitelist a call subset of a pallet? And hide the rest from the end user.&#xD;&#xA;```&#xD;&#xA;// something like&#xD;&#xA;Pallet { fn call_a(){} fn call_b(){} }; // Some Pallet&#xD;&#xA;...&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime {&#xD;&#xA;		.....&#xD;&#xA;		Some: pallet_some::{Pallet, Call{call_a}, Storage, Event&lt;T&gt;} = 3&#xD;&#xA;        .....&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;// as a result for an end user only call_a is available&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24390" PostHistoryTypeId="6" PostId="6362" RevisionGUID="88de87e3-82e9-4255-b77d-5a6b35dc6d10" CreationDate="2022-12-15T13:15:49.780" UserId="3035" Comment="added 141 characters in body" Text="|frame|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24391" PostHistoryTypeId="2" PostId="6363" RevisionGUID="eb6be34a-6dc4-4b48-a5d1-621438cf71c3" CreationDate="2022-12-15T13:21:08.133" UserId="73" Text="There is no way to do this.&#xD;&#xA;&#xD;&#xA;You can remove the entire `Call` from the runtime:&#xD;&#xA;```&#xD;&#xA;construct_runtime! {&#xD;&#xA;   ..&#xD;&#xA;   MyPallet: my_pallet exclude_parts { Call },&#xD;&#xA;   ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will remove `Call` and will leave all other parts like `Origin`, `Event` etc as part of your runtime.&#xD;&#xA;&#xD;&#xA;The only solution to prevent users from calling certain calls of a pallet is to use the `BaseCallFilter`:&#xD;&#xA;```&#xD;&#xA;pub struct TestBaseCallFilter;&#xD;&#xA;impl Contains&lt;RuntimeCall&gt; for TestBaseCallFilter {&#xD;&#xA;	fn contains(c: &amp;RuntimeCall) -&gt; bool {&#xD;&#xA;		match *c {&#xD;&#xA;            // Only allow `whatever` and `yes` calls from `MyPallet`.&#xD;&#xA;            RuntimeCall::MyPallet(call) =&gt; match call {&#xD;&#xA;                my_pallet::Call::whatever { .. } =&gt; true,&#xD;&#xA;                my_pallet::Call::yes { .. } =&gt; true,&#xD;&#xA;                _ =&gt; false,&#xD;&#xA;            },&#xD;&#xA;			_ =&gt; true,&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These calls will not be &quot;hidden&quot; from the user, but in a &quot;perfect world&quot; a normal user would also use some dedicated app for your runtime. This dedicated app wouldn't provide a way to construct these &quot;forbidden&quot; calls." ContentLicense="CC BY-SA 4.0" />
  <row Id="24393" PostHistoryTypeId="2" PostId="6364" RevisionGUID="99e19f07-9100-47ea-9c1f-1d8ef06b95c9" CreationDate="2022-12-15T13:27:57.237" UserId="2025" Text="Completing @AurevoirXavier's answer, the plan is to add this functionality to [API Sidecar](https://github.com/paritytech/substrate-api-sidecar) once [this PR](https://github.com/paritytech/substrate-api-sidecar/pull/1045) is merged." ContentLicense="CC BY-SA 4.0" />
  <row Id="24395" PostHistoryTypeId="2" PostId="6365" RevisionGUID="dd5ad9ce-4129-4fa1-8f24-07b833dc76e0" CreationDate="2022-12-15T14:25:00.103" UserId="85" Text="There's a new collaboration project called the polkadot_network_directory.&#xD;&#xA;I'm hoping that this may solve this:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/polkadot_network_directory/registry.json&#xD;&#xA;&#xD;&#xA;PRs welcome if the data you need isn't there. (I'm hoping that npm and crate packages might be built off the back of this.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="24400" PostHistoryTypeId="2" PostId="6367" RevisionGUID="8597df67-b3b2-4048-bf8a-24b5225828c2" CreationDate="2022-12-15T14:55:08.680" UserId="3607" Text="I am following the Substrate tutorial on [adding pallets](https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/). However, when I add `pallet-nicks` to the `Cargo.toml` located in the `runtime` folder and then add the `pallets-nicks` implementation to the `lib.rs` file in `runtime/src`, I get the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0152]: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /code/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-28bcc0f1aaf2e4a2.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /code/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-151d2b924b052e86.rmeta&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is my `Cargo.toml` file:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;Unlicense&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-randomness-collective-flip = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-core = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-runtime = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-std = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-version = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;Added this line -&gt; pallet-nicks = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;    Added this line -&gt; &quot;pallet-nicks/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-template/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the implementation that I added to the `lib.rs` file in `runtime/src/`:&#xD;&#xA;```rust&#xD;&#xA;impl pallet_nicks::Config for Runtime {&#xD;&#xA;  // The Balances pallet implements the ReservableCurrency trait.&#xD;&#xA;  // `Balances` is defined in `construct_runtime!` macro.&#xD;&#xA;  type Currency = Balances;&#xD;&#xA;  // Set ReservationFee to a value.&#xD;&#xA;  type ReservationFee = ConstU128&lt;100&gt;;&#xD;&#xA;  // No action is taken when deposits are forfeited.&#xD;&#xA;  type Slashed = ();&#xD;&#xA;  // Configure the FRAME System Root origin as the Nick pallet admin.&#xD;&#xA;  // https://paritytech.github.io/substrate/master/frame_system/enum.RawOrigin.html#variant.Root&#xD;&#xA;  type ForceOrigin = frame_system::EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;  // Set MinLength of nick name to a desired value.&#xD;&#xA;  type MinLength = ConstU32&lt;8&gt;;&#xD;&#xA;  // Set MaxLength of nick name to a desired value.&#xD;&#xA;  type MaxLength = ConstU32&lt;32&gt;;&#xD;&#xA;  // The ubiquitous event type.&#xD;&#xA;  type RuntimeEvent = RuntimeEvent;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I remove the implementation from the `lib.rs`, the command `cargo check -p node-template-runtime --release` runs successfully. I am very new to Rust and Substrate. Any ideas on how I can go about fixing this? I've seen questions with similar errors but I've been unable to resolve this error.&#xD;&#xA;&#xD;&#xA;This is the result of running `rustup show`. I am running all of this on WSL on Windows:&#xD;&#xA;```&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /root/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.65.0 (897e37553 2022-11-02)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24402" PostHistoryTypeId="1" PostId="6367" RevisionGUID="8597df67-b3b2-4048-bf8a-24b5225828c2" CreationDate="2022-12-15T14:55:08.680" UserId="3607" Text="duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`" ContentLicense="CC BY-SA 4.0" />
  <row Id="24403" PostHistoryTypeId="3" PostId="6367" RevisionGUID="8597df67-b3b2-4048-bf8a-24b5225828c2" CreationDate="2022-12-15T14:55:08.680" UserId="3607" Text="|pallet|substrate-node-template|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24404" PostHistoryTypeId="5" PostId="6367" RevisionGUID="b89a03d4-1a54-4bec-9b4d-aaafb33c1233" CreationDate="2022-12-15T15:09:04.423" UserId="3607" Comment="added 624 characters in body" Text="I am following the Substrate tutorial on [adding pallets](https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/). However, when I add `pallet-nicks` to the `Cargo.toml` located in the `runtime` folder and then add the `pallets-nicks` implementation to the `lib.rs` file in `runtime/src`, I get the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0152]: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /code/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-28bcc0f1aaf2e4a2.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /code/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-151d2b924b052e86.rmeta&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is my `Cargo.toml` file:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;Unlicense&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-randomness-collective-flip = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-core = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-runtime = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-std = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-version = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;Added this line -&gt; pallet-nicks = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;    Added this line -&gt; &quot;pallet-nicks/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-template/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the implementation that I added to the `lib.rs` file in `runtime/src/`:&#xD;&#xA;```rust&#xD;&#xA;impl pallet_nicks::Config for Runtime {&#xD;&#xA;  // The Balances pallet implements the ReservableCurrency trait.&#xD;&#xA;  // `Balances` is defined in `construct_runtime!` macro.&#xD;&#xA;  type Currency = Balances;&#xD;&#xA;  // Set ReservationFee to a value.&#xD;&#xA;  type ReservationFee = ConstU128&lt;100&gt;;&#xD;&#xA;  // No action is taken when deposits are forfeited.&#xD;&#xA;  type Slashed = ();&#xD;&#xA;  // Configure the FRAME System Root origin as the Nick pallet admin.&#xD;&#xA;  // https://paritytech.github.io/substrate/master/frame_system/enum.RawOrigin.html#variant.Root&#xD;&#xA;  type ForceOrigin = frame_system::EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;  // Set MinLength of nick name to a desired value.&#xD;&#xA;  type MinLength = ConstU32&lt;8&gt;;&#xD;&#xA;  // Set MaxLength of nick name to a desired value.&#xD;&#xA;  type MaxLength = ConstU32&lt;32&gt;;&#xD;&#xA;  // The ubiquitous event type.&#xD;&#xA;  type RuntimeEvent = RuntimeEvent;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Also added the pallet to the construct_runtime macro:&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub struct Runtime&#xD;&#xA;	where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		RandomnessCollectiveFlip: pallet_randomness_collective_flip,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;    Nicks: pallet_nicks,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		// Include the custom logic from the pallet-template in the runtime.&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I remove the implementation from the `lib.rs`, the command `cargo check -p node-template-runtime --release` runs successfully. I am very new to Rust and Substrate. Any ideas on how I can go about fixing this? I've seen questions with similar errors but I've been unable to resolve this error.&#xD;&#xA;&#xD;&#xA;This is the result of running `rustup show`. I am running all of this on WSL on Windows:&#xD;&#xA;```&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /root/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.65.0 (897e37553 2022-11-02)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24405" PostHistoryTypeId="5" PostId="6367" RevisionGUID="297d5092-339b-4be9-87e7-d3a8d605ca96" CreationDate="2022-12-15T15:30:32.323" UserId="3607" Comment="deleted 15 characters in body" Text="I am following the Substrate tutorial on [adding pallets](https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/). However, when I add `pallet-nicks` to the `Cargo.toml` located in the `runtime` folder and then add the `pallets-nicks` implementation to the `lib.rs` file in `runtime/src`, I get the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0152]: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /code/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-28bcc0f1aaf2e4a2.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /code/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-151d2b924b052e86.rmeta&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is my `Cargo.toml` file:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;Unlicense&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-randomness-collective-flip = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-core = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-runtime = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-std = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-version = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;Added this line -&gt; pallet-nicks = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;    Added this line -&gt; &quot;pallet-nicks/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-template/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the implementation that I added to the `lib.rs` file in `runtime/src/`:&#xD;&#xA;```rust&#xD;&#xA;impl pallet_nicks::Config for Runtime {&#xD;&#xA;  // The Balances pallet implements the ReservableCurrency trait.&#xD;&#xA;  // `Balances` is defined in `construct_runtime!` macro.&#xD;&#xA;  type Currency = Balances;&#xD;&#xA;  // Set ReservationFee to a value.&#xD;&#xA;  type ReservationFee = ConstU128&lt;100&gt;;&#xD;&#xA;  // No action is taken when deposits are forfeited.&#xD;&#xA;  type Slashed = ();&#xD;&#xA;  // Configure the FRAME System Root origin as the Nick pallet admin.&#xD;&#xA;  // https://paritytech.github.io/substrate/master/frame_system/enum.RawOrigin.html#variant.Root&#xD;&#xA;  type ForceOrigin = frame_system::EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;  // Set MinLength of nick name to a desired value.&#xD;&#xA;  type MinLength = ConstU32&lt;8&gt;;&#xD;&#xA;  // Set MaxLength of nick name to a desired value.&#xD;&#xA;  type MaxLength = ConstU32&lt;32&gt;;&#xD;&#xA;  // The ubiquitous event type.&#xD;&#xA;  type RuntimeEvent = RuntimeEvent;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Also added the pallet to the construct_runtime macro:&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub struct Runtime&#xD;&#xA;	where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		RandomnessCollectiveFlip: pallet_randomness_collective_flip,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;    Nicks: pallet_nicks,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		// Include the custom logic from the pallet-template in the runtime.&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I comment out the implementation from the `lib.rs` and the `construct_runtime` macro, I can build successfully. I am very new to Rust and Substrate. Any ideas on how I can go about fixing this? I've seen questions with similar errors but I've been unable to resolve this error.&#xD;&#xA;&#xD;&#xA;This is the result of running `rustup show`. I am running all of this on WSL on Windows:&#xD;&#xA;```&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /root/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.65.0 (897e37553 2022-11-02)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24406" PostHistoryTypeId="5" PostId="6359" RevisionGUID="1bb7a8d9-54cd-4f4f-9dc2-8edc78a71918" CreationDate="2022-12-15T16:50:55.337" UserId="473" Comment="edited body" Text="if you have added the rpc in the definitions.ts of your pallet like [this](https://github.com/anagolay/anagolay-js-sdk/blob/main/libraries/types/src/interfaces/operations/definitions.ts#L140 )  they will not be automatically included or decorated because they are not automatically included in the ApiPromise and you are not passing them into the ApiPromise.create rpc option param.&#xD;&#xA;&#xD;&#xA;The thing is that even if you extract them directly from the definitions.ts and add them to the connection like [this](https://github.com/anagolay/anagolay-js-sdk/blob/main/libraries/api/src/connection.ts#L63) it will still not work for some weird reason. &#xD;&#xA;&#xD;&#xA;To fix this we maintain 2 separate sets of the RPC, one for the Typegeneration  ( defined in the pallet/definitions.ts), and one for the connection, which is basically the same; just appended the `PaletName` to all RPC endpoints like [this](https://github.com/anagolay/anagolay-js-sdk/blob/main/libraries/types/src/tempRpcs.ts) then include them like [this](https://github.com/anagolay/anagolay-js-sdk/blob/main/libraries/api/src/connection.ts#L34)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24407" PostHistoryTypeId="2" PostId="6368" RevisionGUID="8c65531e-2463-4075-811f-49f2ed6dfaa2" CreationDate="2022-12-15T17:11:43.053" UserId="3346" Text="Using events to write data to the chain is great for registering information to the chain, especially information that you want a permanent record of. So my question is: under what circumstances should you use Contract Storage? What kinds of situations make Contract Storage a better store of data than an on-chain event? Is there a reason to prefer using contract storage over on-chain events? And what are the cons of using contract storage (or events)? I imagine that sometimes your data structures are better off in Contract Storage and sometimes your data structures are better off in an Event. How do you determine which to use when? " ContentLicense="CC BY-SA 4.0" />
  <row Id="24409" PostHistoryTypeId="1" PostId="6368" RevisionGUID="8c65531e-2463-4075-811f-49f2ed6dfaa2" CreationDate="2022-12-15T17:11:43.053" UserId="3346" Text="Ink Contracts: What Data Structures/Situations Are Best Suited To Contract Storage vs Events?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24410" PostHistoryTypeId="3" PostId="6368" RevisionGUID="8c65531e-2463-4075-811f-49f2ed6dfaa2" CreationDate="2022-12-15T17:11:43.053" UserId="3346" Text="|ink|smart-contract|storage|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24411" PostHistoryTypeId="2" PostId="6369" RevisionGUID="70ce30bc-49ed-4bd0-9309-dc8c8d98f2a6" CreationDate="2022-12-15T17:57:28.553" UserId="34" Text="Is there such a thing in FRAME or otherwise to have a [&quot;register&quot; item similar to `C`](https://www.geeksforgeeks.org/understanding-register-keyword/&#xD;&#xA;) referencing a storage item in working runtime memory?&#xD;&#xA;&#xD;&#xA;Specifically: I need a storage value in `BaseCallFilter` that will execute a storage read for _every call to the runtime_ .&#xD;&#xA;I want to optimize this if at all possible to only one read &amp; cache for any other  `BaseCallFilter` checks when constructing for a particular block.&#xD;&#xA;&#xD;&#xA;I wonder if this is something generic that can be expressed to ensure it happens in other cases runtime engineers need to read the same item very _very_ often." ContentLicense="CC BY-SA 4.0" />
  <row Id="24413" PostHistoryTypeId="1" PostId="6369" RevisionGUID="70ce30bc-49ed-4bd0-9309-dc8c8d98f2a6" CreationDate="2022-12-15T17:57:28.553" UserId="34" Text="How to specify &quot;register&quot; values for storage reads/writes in a runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24414" PostHistoryTypeId="3" PostId="6369" RevisionGUID="70ce30bc-49ed-4bd0-9309-dc8c8d98f2a6" CreationDate="2022-12-15T17:57:28.553" UserId="34" Text="|runtime|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24415" PostHistoryTypeId="2" PostId="6370" RevisionGUID="30ddb770-de5b-4001-92b9-9386b6a90a27" CreationDate="2022-12-15T19:37:11.977" UserId="73" Text="No, there is no way to specify values that are read often. However, there is a read-through cache which hopefully already have the data cached from the previous block or cache it on the first read in the current block. This cache improves the read performance by factor ~11 versus reading from the database.&#xD;&#xA;&#xD;&#xA;In your pallet you can use the attribute `#[pallet::whitelist_storage]` above your storage value. This will tell benchmarking to ignore these keys when calculating the weight formula for your call. This should be used for these kind of keys where you know that they are &quot;always cached&quot; as they are accessed in each block multiple times." ContentLicense="CC BY-SA 4.0" />
  <row Id="24417" PostHistoryTypeId="52" PostId="6362" RevisionGUID="25f8f60e-f8ea-46d7-bc22-d8b72d64b209" CreationDate="2022-12-15T21:10:46.513" />
  <row Id="24418" PostHistoryTypeId="2" PostId="6371" RevisionGUID="f0ef2d7d-58cc-4159-9b11-8445968da84e" CreationDate="2022-12-15T23:22:56.200" UserId="170" Text="The contract storage is used to store the information about the contract (for example balances of users). Basically every value your contract will work with.&#xD;&#xA;&#xD;&#xA;Emitting events is informational, they are used to keep track of changes in the state of the smart contract, and are particularly helpful when building decentralized applications. Also, you can not access them from the smart contract, so storing contract state to events would not be helpful.&#xD;&#xA;&#xD;&#xA;You can read more about ink! events here: https://use.ink/basics/events/" ContentLicense="CC BY-SA 4.0" />
  <row Id="24420" PostHistoryTypeId="2" PostId="6372" RevisionGUID="33369e65-e99b-4399-a63f-c73ddc611819" CreationDate="2022-12-16T00:10:40.520" UserId="170" Text="There can be multiple instances of one contract.&#xD;&#xA;&#xD;&#xA;Any account can interact with any smart contract on the blockchain, but only with its messages (public API). So if a contract has no [ink(message)], other accounts can not mutate its state (except for sending balance to this contract).&#xD;&#xA;&#xD;&#xA;The state of the contract (a.k.a. the contract storage) is stored on the blockchain. &#xD;&#xA;&#xD;&#xA;The contract will be given a specific AccountId upon the instantiation. Each instance of a contract has its own storage.&#xD;&#xA;&#xD;&#xA;About the storage limitations, ink! stores all the contract data under specified storage keys, and panics [if the encode length of value exceeds the configured maximum value length of a storage entry][1]. The keys are hashed to a 32-byte hash (which leaves us with 2^256 possible storage entries - about this I am not 100% sure, I am assuming based on [this file][2] and ethereum knowledge).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/ink/ink_env/fn.set_contract_storage.html&#xD;&#xA;  [2]: https://github.com/paritytech/ink/blob/master/crates/engine/src/database.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="24422" PostHistoryTypeId="2" PostId="6373" RevisionGUID="7bf525fd-0041-4386-8e1e-6443c9759d41" CreationDate="2022-12-16T00:27:23.173" UserId="170" Text="You can not use references in [ink(message)]" ContentLicense="CC BY-SA 4.0" />
  <row Id="24424" PostHistoryTypeId="52" PostId="6369" RevisionGUID="1d6f962f-dcb3-4f7f-8177-48afb16265d2" CreationDate="2022-12-16T02:03:22.190" />
  <row Id="24425" PostHistoryTypeId="2" PostId="6374" RevisionGUID="40002dcf-065d-4da5-a8a0-ae405d1c87bd" CreationDate="2022-12-16T02:35:27.147" UserId="28" Text="You should change `to: &amp;'a mut AccountId` to `to: AccountId`, and just use the `AccountId` directly in your ink! message." ContentLicense="CC BY-SA 4.0" />
  <row Id="24428" PostHistoryTypeId="2" PostId="6375" RevisionGUID="667cb233-97e3-48d8-8c49-3678e5100110" CreationDate="2022-12-16T05:31:00.637" UserId="2976" Text="I am trying to add the pallet-contracts-rpc dependency but keep getting this error.&#xD;&#xA;&#xD;&#xA;'''&#xD;&#xA;error: no matching package named `pallet-contracts-rpc` found&#xD;&#xA;location searched: https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32&#xD;&#xA;required by package `node-template v4.0.0-dev (/home/kaioh/DeSign-/node)`&#xD;&#xA;'''&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have also tried comparing with substrate contracts node template https://github.com/paritytech/substrate-contracts-node/tree/v0.23.0 and I see its not implemented in their node/cargo.toml file. I am using polkadot version 0.9.32." ContentLicense="CC BY-SA 4.0" />
  <row Id="24430" PostHistoryTypeId="1" PostId="6375" RevisionGUID="667cb233-97e3-48d8-8c49-3678e5100110" CreationDate="2022-12-16T05:31:00.637" UserId="2976" Text="Error: no matching package named 'pallet-contracts-rpc' found" ContentLicense="CC BY-SA 4.0" />
  <row Id="24431" PostHistoryTypeId="3" PostId="6375" RevisionGUID="667cb233-97e3-48d8-8c49-3678e5100110" CreationDate="2022-12-16T05:31:00.637" UserId="2976" Text="|substrate-node-template|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24432" PostHistoryTypeId="6" PostId="6358" RevisionGUID="048855b4-74d7-472c-8ae2-0ed41a72e4bb" CreationDate="2022-12-16T06:43:02.080" UserId="34" Comment="edited tags" Text="|parachain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24433" PostHistoryTypeId="12" PostId="5564" RevisionGUID="c2f9b989-a970-49a9-9b37-3cee3cef7486" CreationDate="2022-12-16T07:33:27.727" UserId="34" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="24434" PostHistoryTypeId="13" PostId="5564" RevisionGUID="f261563b-2c18-4b56-9e60-73e6c1fce52a" CreationDate="2022-12-16T07:33:58.160" UserId="34" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="24435" PostHistoryTypeId="5" PostId="5564" RevisionGUID="5e6cf641-ff1b-4665-830e-9b4740fc594f" CreationDate="2022-12-16T07:34:32.093" UserId="34" Comment="deleted 36 characters in body" Text="The cause is the version of @polkadot/api and @polkadot/typegen do not match. They should have the same version.... check your package.json file." ContentLicense="CC BY-SA 4.0" />
  <row Id="24436" PostHistoryTypeId="2" PostId="6376" RevisionGUID="7e03b105-a59a-474c-92ed-bd23b518a788" CreationDate="2022-12-16T07:41:12.370" UserId="34" Text="This was [removed in #12358](https://github.com/paritytech/substrate/pull/12358), You no longer need to add the RPCs. Have a look at [this][1] as an example.&#xD;&#xA;&#xD;&#xA;&gt; ## Porting Guide&#xD;&#xA;&gt; &#xD;&#xA;&gt; The high level contracts API in polkadot.js already uses `state_call` so upgrading to the latest version here is enough. If you are using api.rpc.contracts directly you need to switch to api.call.contractsApi.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/bin/node/runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="24438" PostHistoryTypeId="6" PostId="6375" RevisionGUID="7d69abcb-cb4a-4ddf-aae1-ad5335ed86c1" CreationDate="2022-12-16T07:41:51.247" UserId="34" Comment="edited tags" Text="|rpc|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24439" PostHistoryTypeId="5" PostId="6361" RevisionGUID="448f755b-cc21-43df-a2d0-e15cf930820d" CreationDate="2022-12-16T07:44:23.267" UserId="34" Comment="deleted 8 characters in body; edited tags" Text="Subscan recently made a change to show [estimated fee and used fee][1], while if you query data from sidecar, partial fee + tip = estimated fee. What is this used fee and how is it calculated?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://kusama.subscan.io/extrinsic/0x436d39517244cd5fc7c3d35dd08de0ccb62cb620868b5428db831857d4a952eb" ContentLicense="CC BY-SA 4.0" />
  <row Id="24440" PostHistoryTypeId="6" PostId="6361" RevisionGUID="448f755b-cc21-43df-a2d0-e15cf930820d" CreationDate="2022-12-16T07:44:23.267" UserId="34" Comment="deleted 8 characters in body; edited tags" Text="|fee|sidecar|subscan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24441" PostHistoryTypeId="5" PostId="6373" RevisionGUID="32f9d7b1-8997-4cc0-8cea-5163dce184ed" CreationDate="2022-12-16T10:01:49.903" UserId="170" Comment="added 170 characters in body" Text="You can not use references in `[ink(message)]`.&#xD;&#xA;&#xD;&#xA;I think you want this function to be public, so it needs to be `[ink(message)]`. You can just simply remove the reference of the parameter and work with its value." ContentLicense="CC BY-SA 4.0" />
  <row Id="24442" PostHistoryTypeId="2" PostId="6377" RevisionGUID="622eb68e-56b9-41bf-9c89-85e9778dc813" CreationDate="2022-12-16T11:31:33.703" UserId="298" Text="In the screenshot below the OptionSelect is disabled, which produces info of an array of accounts rather than just one single. &#xD;&#xA;&#xD;&#xA;How do you replicate this &lt;Empty&gt; option when curating a call? &#xD;&#xA;&#xD;&#xA;Using `api.query.system.account()` as an example.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8f44p.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24444" PostHistoryTypeId="1" PostId="6377" RevisionGUID="622eb68e-56b9-41bf-9c89-85e9778dc813" CreationDate="2022-12-16T11:31:33.703" UserId="298" Text="How to produce empty paramter in an Option?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24445" PostHistoryTypeId="3" PostId="6377" RevisionGUID="622eb68e-56b9-41bf-9c89-85e9778dc813" CreationDate="2022-12-16T11:31:33.703" UserId="298" Text="|polkadot-js|api|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24446" PostHistoryTypeId="5" PostId="6377" RevisionGUID="2e64436a-6237-4161-9e06-665ebec27f31" CreationDate="2022-12-16T12:45:12.197" UserId="298" Comment="deleted 2 characters in body" Text="In the screenshot below the OptionSelect is disabled, which produces info of an array of accounts rather than just one single. &#xD;&#xA;&#xD;&#xA;How do you replicate this &lt;Empty&gt; option when curating a call? &#xD;&#xA;&#xD;&#xA;Using `api.query.system.account` as an example.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8f44p.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24447" PostHistoryTypeId="50" PostId="5924" RevisionGUID="d25b9120-06bc-42d3-b2d4-e2e411ae34f6" CreationDate="2022-12-16T13:00:35.097" UserId="-1" />
  <row Id="24448" PostHistoryTypeId="2" PostId="6378" RevisionGUID="0f5f61c3-b2df-4c5e-bc84-308d094787f7" CreationDate="2022-12-16T13:00:58.847" UserId="28" Text="In this context, this is using the `entries` api, returning all values in the map, rather than a specific value in the map.&#xD;&#xA;&#xD;&#xA;This is documented here: https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries&#xD;&#xA;&#xD;&#xA;So you can write some code like:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;if (global.pageSize == 0) {&#xD;&#xA;	// This will be a long query...&#xD;&#xA;	document.getElementById('output').innerHTML = &quot;Querying all users... this may take a while.&quot;;&#xD;&#xA;	all_accounts = await substrate.query.system.account.entries();&#xD;&#xA;} else {&#xD;&#xA;	document.getElementById('output').innerHTML = `Querying ${global.pageSize} users... please wait.`;&#xD;&#xA;	all_accounts = await substrate.query.system.account.entriesPaged({ args: [], pageSize: global.pageSize, startKey: global.lastKey });&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Taken from: https://github.com/shawntabrizi/substrate-balance-snapshot/blob/master/snapshot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="24450" PostHistoryTypeId="2" PostId="6379" RevisionGUID="ababdd92-5c84-47c2-b101-1fccdb2c5796" CreationDate="2022-12-16T13:58:15.433" UserId="167" Text="When making a new RPC/runtime-api endpoint, what criteria should you have in mind regarding making it safe/unsafe? &#xD;&#xA;&#xD;&#xA;For example, assume that a UI wants to fetch a large amount of data (a lot of keys in a double-map), in order to compute some result. &#xD;&#xA;&#xD;&#xA;Instead of querying all of this data via `state_getStorage`, an option is make an RPC call that would compute the same output on the node side, and return it. &#xD;&#xA;&#xD;&#xA;But this begs the question: if done via an RPC call, is this a safe RPC? In principle, the amount of work that the replying node needs to do is less if it is all done in one RPC, compared to responding t large number of `state_getStorage` queries.&#xD;&#xA;&#xD;&#xA;Moreover, if done via `state_call`, this RPC is already considered to be safe, so it is quite easy to make this mistake. Perhaps runtime APIs should also be tagged as `#[state_call_unsafe]`, which makes them prohibited from being called via `state_call`" ContentLicense="CC BY-SA 4.0" />
  <row Id="24452" PostHistoryTypeId="1" PostId="6379" RevisionGUID="ababdd92-5c84-47c2-b101-1fccdb2c5796" CreationDate="2022-12-16T13:58:15.433" UserId="167" Text="When should an RPC be unsafe?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24453" PostHistoryTypeId="3" PostId="6379" RevisionGUID="ababdd92-5c84-47c2-b101-1fccdb2c5796" CreationDate="2022-12-16T13:58:15.433" UserId="167" Text="|rpc|runtime-api|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24454" PostHistoryTypeId="2" PostId="6380" RevisionGUID="bb167f9d-b29d-4b7b-8af1-6d72bdfd0dcf" CreationDate="2022-12-16T13:58:15.433" UserId="167" Text="While it is hard to draw the exact line, there is a possibility that the new hypothetical RPC should actually be unsafe, because there is an important difference between the two.&#xD;&#xA;&#xD;&#xA;Namely, in `state_getStorage` the amount of work that the node needs to do is split between multiple requests, and it can be rate-limited. Whilst the one-time `state_call` might impose a large amount of work on the node at once, which cannot be interrupted. &#xD;&#xA;&#xD;&#xA;I think this is the main difference between the two, and why most often the latter should be unsafe. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24456" PostHistoryTypeId="2" PostId="6381" RevisionGUID="f5174061-2a47-459c-99f8-665d215372ca" CreationDate="2022-12-16T14:00:05.917" UserId="3612" Text="Until now, to follow the referendums through the polkadot.js api, I was using storage methods that are part of the default Substrate runtime (located here: https://polkadot.js.org/docs/substrate/storage)&#xD;&#xA;But by coming gov2 and transferring the Kusama referendums to it, I cannot track the referendums through previous methods. How can i use these methods in gov2 ?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24458" PostHistoryTypeId="1" PostId="6381" RevisionGUID="f5174061-2a47-459c-99f8-665d215372ca" CreationDate="2022-12-16T14:00:05.917" UserId="3612" Text="How to use polkadot{.js} substrate methods in itraction with kusama's gov2" ContentLicense="CC BY-SA 4.0" />
  <row Id="24459" PostHistoryTypeId="3" PostId="6381" RevisionGUID="f5174061-2a47-459c-99f8-665d215372ca" CreationDate="2022-12-16T14:00:05.917" UserId="3612" Text="|polkadot-js|kusama|substrate-front-end|gov2|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24464" PostHistoryTypeId="2" PostId="6383" RevisionGUID="108bb80b-d210-4bd6-9a77-5fd76c28bcf0" CreationDate="2022-12-16T19:00:01.097" UserId="3440" Text="I have stored an information on chain and I want to access that information using RPC call.&#xD;&#xA;&#xD;&#xA; I used the following code and provided the hash created.&#xD;&#xA;```&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I retrieve/see the data I uploaded to that block? " ContentLicense="CC BY-SA 4.0" />
  <row Id="24466" PostHistoryTypeId="1" PostId="6383" RevisionGUID="108bb80b-d210-4bd6-9a77-5fd76c28bcf0" CreationDate="2022-12-16T19:00:01.097" UserId="3440" Text="How to retrive data stored in a block" ContentLicense="CC BY-SA 4.0" />
  <row Id="24467" PostHistoryTypeId="3" PostId="6383" RevisionGUID="108bb80b-d210-4bd6-9a77-5fd76c28bcf0" CreationDate="2022-12-16T19:00:01.097" UserId="3440" Text="|substrate-node-template|rpc|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24468" PostHistoryTypeId="5" PostId="6383" RevisionGUID="0be8c6ed-b92c-4a1f-870a-9ff87f0ebb5f" CreationDate="2022-12-16T19:02:02.880" UserId="3440" Comment="added 106 characters in body" Text="I have stored an information on chain and I want to access that information using RPC call.&#xD;&#xA;&#xD;&#xA; I used the following code and provided the hash created.&#xD;&#xA;```&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I retrieve/see the data I uploaded to that block? &#xD;&#xA;&#xD;&#xA;If have uploaded &quot;string&quot; in that block. How can i get it back as &quot;string&quot; by providing the block hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="24469" PostHistoryTypeId="2" PostId="6384" RevisionGUID="d6d7ed44-a034-43ac-8974-5b6a6e247214" CreationDate="2022-12-16T20:07:37.120" UserId="3613" Text="I am doing error handling in an app using polkadotJSAPI 7.13.1&#xD;&#xA;There are two ways to fetch info if an extrinsic suceeds or fails, the first one is via dispatchError in signAndSend like so&#xD;&#xA;&#xD;&#xA;    transferExtrinsic.signAndSend(account_from, { signer: injector.signer }, ({ status, events, dispatchError }) =&gt; {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The second is [described in docs][1]&#xD;&#xA;&#xD;&#xA;Both generally work for most extrinsics, but not for&#xD;&#xA; `transferExtrinsic = api.tx.balances.transfer(account_to, (amount));,` &#xD;&#xA;for example when trying to send more tokens than exists in a wallet. PolkadotJS web interface catches the error correctly. How do I check if any extrinsic suceeds or errors out, including balances.transfer extrinsic ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/cookbook/blocks/#how-do-i-map-extrinsics-to-their-events" ContentLicense="CC BY-SA 4.0" />
  <row Id="24471" PostHistoryTypeId="1" PostId="6384" RevisionGUID="d6d7ed44-a034-43ac-8974-5b6a6e247214" CreationDate="2022-12-16T20:07:37.120" UserId="3613" Text="Cant get extrinsic error from balances.sendTransfer extrinsic in polkadotJSAPI" ContentLicense="CC BY-SA 4.0" />
  <row Id="24472" PostHistoryTypeId="3" PostId="6384" RevisionGUID="d6d7ed44-a034-43ac-8974-5b6a6e247214" CreationDate="2022-12-16T20:07:37.120" UserId="3613" Text="|polkadot-js|extrinsic|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24473" PostHistoryTypeId="5" PostId="6384" RevisionGUID="6e8fba61-4b24-4311-bce5-e40253dae4d8" CreationDate="2022-12-16T20:09:55.020" UserId="3613" Comment="added 100 characters in body" Text="I am doing error handling in an app using polkadotJSAPI 7.13.1&#xD;&#xA;There are two ways to fetch info if an extrinsic suceeds or fails, the first one is via dispatchError in signAndSend like so&#xD;&#xA;&#xD;&#xA;    transferExtrinsic.signAndSend(account_from, { signer: injector.signer }, ({ status, events, dispatchError }) =&gt; {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The second is [described in docs][1]&#xD;&#xA;&#xD;&#xA;Both generally work for most extrinsics, but not for&#xD;&#xA; `transferExtrinsic = api.tx.balances.transfer(account_to, (amount));,` &#xD;&#xA;for example when trying to send more tokens than exists in a wallet. Both approaches give either DispatchError = undefined or doesnt find an event with extrinsicfailed. PolkadotJS web interface catches the error correctly. How do I check if any extrinsic suceeds or errors out, including balances.transfer extrinsic ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/cookbook/blocks/#how-do-i-map-extrinsics-to-their-events" ContentLicense="CC BY-SA 4.0" />
  <row Id="24474" PostHistoryTypeId="50" PostId="5934" RevisionGUID="be6dbe12-c807-41e7-a816-fe03eda036e5" CreationDate="2022-12-16T21:07:20.883" UserId="-1" />
  <row Id="24475" PostHistoryTypeId="2" PostId="6385" RevisionGUID="94c7d241-c809-4691-bb01-cbabb4a09d7a" CreationDate="2022-12-16T21:52:16.040" UserId="94" Text="You can use `on_idle` if you want to avoid `on_initialize`.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="24477" PostHistoryTypeId="50" PostId="3807" RevisionGUID="2c5c1095-1cbc-452e-9094-401478f4b548" CreationDate="2022-12-16T22:07:25.983" UserId="-1" />
  <row Id="24482" PostHistoryTypeId="50" PostId="5401" RevisionGUID="252ab41e-40ef-4d03-ad34-6cbbd21de1e9" CreationDate="2022-12-17T15:07:40.913" UserId="-1" />
  <row Id="24483" PostHistoryTypeId="2" PostId="6387" RevisionGUID="fa5b54a8-216a-4e4b-9bbe-44f336c459e2" CreationDate="2022-12-17T16:31:45.610" UserId="3614" Text="I created a muktisig account on polkadot js. The multisig does not populate in the extebsion. U use firefox. I want to use the multisig with polkaswap. How do i get my multisig account to appear on my js extension? How can I use it with polkaswap?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24485" PostHistoryTypeId="1" PostId="6387" RevisionGUID="fa5b54a8-216a-4e4b-9bbe-44f336c459e2" CreationDate="2022-12-17T16:31:45.610" UserId="3614" Text="Multisig on js extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="24486" PostHistoryTypeId="3" PostId="6387" RevisionGUID="fa5b54a8-216a-4e4b-9bbe-44f336c459e2" CreationDate="2022-12-17T16:31:45.610" UserId="3614" Text="|polkadot|javascript|polkadot-js-extension|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24487" PostHistoryTypeId="5" PostId="6387" RevisionGUID="d808ea11-21d3-4732-a665-b93d900063ce" CreationDate="2022-12-17T21:16:25.723" UserId="34" Comment="deleted 3 characters in body; edited tags" Text="I created a multisig account on Polkadot.js. The multisig does not populate in the extension. I use firefox. I want to use the multisig with polkaswap. How do i get my multisig account to appear on my extension? How can I use it with polkaswap?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24488" PostHistoryTypeId="6" PostId="6387" RevisionGUID="d808ea11-21d3-4732-a665-b93d900063ce" CreationDate="2022-12-17T21:16:25.723" UserId="34" Comment="deleted 3 characters in body; edited tags" Text="|polkadot-js-extension|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24489" PostHistoryTypeId="2" PostId="6388" RevisionGUID="23909878-5b61-4534-bf19-e20599a90f05" CreationDate="2022-12-18T05:27:00.360" UserId="555" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm using get_dispatch_info() function.earlier it's working fine but after new release I'm not able to use it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let dispatch_info = call.get_dispatch_info();&#xD;&#xA;    dispatch_info.weight.saturating_add(10_000), dispatch_info.class, Pays::Yes)&#xD;&#xA;		})]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm getting this error : &#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zjyh3.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/wex62.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24491" PostHistoryTypeId="1" PostId="6388" RevisionGUID="23909878-5b61-4534-bf19-e20599a90f05" CreationDate="2022-12-18T05:27:00.360" UserId="555" Text="how to solve multiple `get_dispatch_info` found error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24492" PostHistoryTypeId="3" PostId="6388" RevisionGUID="23909878-5b61-4534-bf19-e20599a90f05" CreationDate="2022-12-18T05:27:00.360" UserId="555" Text="|pallet|substrate-node-template|error|releases|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24493" PostHistoryTypeId="2" PostId="6389" RevisionGUID="d6e7f89e-1729-4b37-a62d-84698142b927" CreationDate="2022-12-18T07:50:46.583" UserId="409" Text="From my understanding after reading the code, I think nested/multi-level doesn't work.&#xD;&#xA;&#xD;&#xA;Assuming we only use x1 conviction, given 3 accounts: `A`, `B` and `C`, `A` delete to `B`, and `B` delegate to `C`. My operations order is:&#xD;&#xA;&#xD;&#xA;1. Call `A` delegate to `B`.&#xD;&#xA;2. Call `B` delegate to `C`.&#xD;&#xA;&#xD;&#xA;And finally `C`'s voting storage is:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  Direct: {&#xD;&#xA;    votes: []&#xD;&#xA;    delegations: {&#xD;&#xA;      votes: 1&#xD;&#xA;      capital: 1&#xD;&#xA;    }&#xD;&#xA;    prior: [&#xD;&#xA;      0&#xD;&#xA;      0&#xD;&#xA;    ]&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So we can see `delegations` value of `C` is 1 not 2, which means `A`'s delegation to `B` not apply to `C`. So I think nested delegation not work. There is also comment in substrate [here](https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L1268) which say 2nd level delegating is not supported.&#xD;&#xA;&#xD;&#xA;But, from another stackexchange topic [here](https://substrate.stackexchange.com/questions/5770/should-delegations-propagate-from-one-account-to-another) and implementation of polkadot.js [here](https://github.com/polkadot-js/api/blob/master/packages/api-derive/src/democracy/referendumsInfo.ts#L85-L86), it seems that nested delegation works.&#xD;&#xA;&#xD;&#xA;So I want to confirm:&#xD;&#xA;1. Does democracy/conviction-voting pallet support nested/multi-level delegation?&#xD;&#xA;2. If so, how does the code work?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24495" PostHistoryTypeId="1" PostId="6389" RevisionGUID="d6e7f89e-1729-4b37-a62d-84698142b927" CreationDate="2022-12-18T07:50:46.583" UserId="409" Text="How does nested/multi-level delegation work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24496" PostHistoryTypeId="3" PostId="6389" RevisionGUID="d6e7f89e-1729-4b37-a62d-84698142b927" CreationDate="2022-12-18T07:50:46.583" UserId="409" Text="|governance|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24497" PostHistoryTypeId="2" PostId="6390" RevisionGUID="7c57798a-2dc7-4428-ae41-3b5adea3ef9b" CreationDate="2022-12-18T08:47:26.387" UserId="2722" Text="i gonna add custome rpc in substrate but i have a problem . &#xD;&#xA;&#xD;&#xA;i have done all steps in this article : &#xD;&#xA;&#xD;&#xA;   [Custome RPC Article][1]&#xD;&#xA;&#xD;&#xA;and my odes is here : &#xD;&#xA;&#xD;&#xA;https://github.com/dortajkianoush/substrate_rpc&#xD;&#xA;&#xD;&#xA;but it show me this error : &#xD;&#xA;&#xD;&#xA;    error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `panic_impl`.&#xD;&#xA;        |&#xD;&#xA;        = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/kianoush/projects/substrate_rpc/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ff5bbb618e892e0d.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/kianoush/projects/substrate_rpc/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-c5af71db43952901.rmeta&#xD;&#xA;    &#xD;&#xA;      error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `oom`.&#xD;&#xA;        |&#xD;&#xA;        = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/kianoush/projects/substrate_rpc/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ff5bbb618e892e0d.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/kianoush/projects/substrate_rpc/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-c5af71db43952901.rmeta&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, sp_runtime::traits::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;&gt;: sp_runtime::traits::Block` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_rpc/runtime/src/lib.rs:403:7&#xD;&#xA;          |&#xD;&#xA;      403 |     impl pallet_template_runtime_api::TemplateApi&lt;Block&gt; for Runtime {&#xD;&#xA;          |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `sp_runtime::traits::Block` is not implemented for `sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, sp_runtime::traits::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;&gt;`&#xD;&#xA;          |&#xD;&#xA;          = help: the trait `sp_runtime::traits::Block` is implemented for `sp_runtime::generic::block::Block&lt;Header, Extrinsic&gt;`&#xD;&#xA;      note: required by a bound in `TemplateApi`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_rpc/pallets/template/rpc/runtime-api/src/lib.rs:5:1&#xD;&#xA;          |&#xD;&#xA;      5   | / sp_api::decl_runtime_apis! {&#xD;&#xA;      6   | |     pub trait TemplateApi {&#xD;&#xA;      7   | |         fn get_value() -&gt; u32;&#xD;&#xA;      8   | |     }&#xD;&#xA;      9   | | }&#xD;&#xA;          | |_^ required by this bound in `TemplateApi`&#xD;&#xA;          = note: this error originates in the macro `sp_api::decl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;      error: could not compile `node-template-runtime` due to 3 previous errors&#xD;&#xA;&#xD;&#xA;  [1]: https://hackmd.io/@d9WGfolYQmSRBmnxyOQmAg/BkEANECJs&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24499" PostHistoryTypeId="1" PostId="6390" RevisionGUID="7c57798a-2dc7-4428-ae41-3b5adea3ef9b" CreationDate="2022-12-18T08:47:26.387" UserId="2722" Text="add custom RPC in substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="24500" PostHistoryTypeId="3" PostId="6390" RevisionGUID="7c57798a-2dc7-4428-ae41-3b5adea3ef9b" CreationDate="2022-12-18T08:47:26.387" UserId="2722" Text="|substrate-node-template|rpc|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24507" PostHistoryTypeId="50" PostId="5960" RevisionGUID="0daffd0b-a4e0-464f-9c95-1fbc3aba33f1" CreationDate="2022-12-18T16:04:05.510" UserId="-1" />
  <row Id="24509" PostHistoryTypeId="2" PostId="6392" RevisionGUID="bb27a6a9-5514-43f6-9b08-169fb33b1b64" CreationDate="2022-12-18T22:48:10.087" UserId="79" Text="trying to compile it gives me this error, in charge .toml I put the direct routes and nothing....&#xD;&#xA;other smart contracts compile with ink! good&#xD;&#xA;command : cargo +nightly contract build --release&#xD;&#xA;I know&#xD;&#xA;ERROR: Loading Cargo.toml&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;     No such file or directory (os error 2)" ContentLicense="CC BY-SA 4.0" />
  <row Id="24511" PostHistoryTypeId="1" PostId="6392" RevisionGUID="bb27a6a9-5514-43f6-9b08-169fb33b1b64" CreationDate="2022-12-18T22:48:10.087" UserId="79" Text="Astar error commpiling Swanky" ContentLicense="CC BY-SA 4.0" />
  <row Id="24512" PostHistoryTypeId="3" PostId="6392" RevisionGUID="bb27a6a9-5514-43f6-9b08-169fb33b1b64" CreationDate="2022-12-18T22:48:10.087" UserId="79" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24513" PostHistoryTypeId="2" PostId="6393" RevisionGUID="d7265db8-d5d4-4996-bc86-3529056c7edf" CreationDate="2022-12-19T03:32:06.100" UserId="28" Text="This error appears when you mismatch the version of Substrate you are using across your project.&#xD;&#xA;&#xD;&#xA;See previous answers on this forum like: https://substrate.stackexchange.com/questions/1307/how-to-resolve-duplicate-lang-item-error&#xD;&#xA;&#xD;&#xA;For example, in your project, you see that everything is using `branch = &quot;polkadot-v0.9.35&quot;`, but the tutorial says to copy `branch = &quot;polkadot-v0.9.28&quot;`, so you should make sure when you are copying from the tutorial, to change the branch to match the rest of your project.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24515" PostHistoryTypeId="5" PostId="6390" RevisionGUID="968b52d9-cfe7-4058-aa31-42c70c5268f1" CreationDate="2022-12-19T03:34:19.790" UserId="28" Comment="added 17 characters in body; edited title" Text="I am trying to add a custom rpc in Substrate, but I ran into a problem. &#xD;&#xA;&#xD;&#xA;I have done all steps in this article: &#xD;&#xA;&#xD;&#xA;   [Add custom RPC to the node][1]&#xD;&#xA;&#xD;&#xA;and my code is here: &#xD;&#xA;&#xD;&#xA;https://github.com/dortajkianoush/substrate_rpc&#xD;&#xA;&#xD;&#xA;but it shows me this error: &#xD;&#xA;&#xD;&#xA;    error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `panic_impl`.&#xD;&#xA;        |&#xD;&#xA;        = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/kianoush/projects/substrate_rpc/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ff5bbb618e892e0d.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/kianoush/projects/substrate_rpc/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-c5af71db43952901.rmeta&#xD;&#xA;    &#xD;&#xA;      error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `oom`.&#xD;&#xA;        |&#xD;&#xA;        = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/kianoush/projects/substrate_rpc/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ff5bbb618e892e0d.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/kianoush/projects/substrate_rpc/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-c5af71db43952901.rmeta&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, sp_runtime::traits::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;&gt;: sp_runtime::traits::Block` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_rpc/runtime/src/lib.rs:403:7&#xD;&#xA;          |&#xD;&#xA;      403 |     impl pallet_template_runtime_api::TemplateApi&lt;Block&gt; for Runtime {&#xD;&#xA;          |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `sp_runtime::traits::Block` is not implemented for `sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, sp_runtime::traits::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;&gt;`&#xD;&#xA;          |&#xD;&#xA;          = help: the trait `sp_runtime::traits::Block` is implemented for `sp_runtime::generic::block::Block&lt;Header, Extrinsic&gt;`&#xD;&#xA;      note: required by a bound in `TemplateApi`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_rpc/pallets/template/rpc/runtime-api/src/lib.rs:5:1&#xD;&#xA;          |&#xD;&#xA;      5   | / sp_api::decl_runtime_apis! {&#xD;&#xA;      6   | |     pub trait TemplateApi {&#xD;&#xA;      7   | |         fn get_value() -&gt; u32;&#xD;&#xA;      8   | |     }&#xD;&#xA;      9   | | }&#xD;&#xA;          | |_^ required by this bound in `TemplateApi`&#xD;&#xA;          = note: this error originates in the macro `sp_api::decl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;      error: could not compile `node-template-runtime` due to 3 previous errors&#xD;&#xA;&#xD;&#xA;  [1]: https://hackmd.io/@d9WGfolYQmSRBmnxyOQmAg/BkEANECJs&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24516" PostHistoryTypeId="4" PostId="6390" RevisionGUID="968b52d9-cfe7-4058-aa31-42c70c5268f1" CreationDate="2022-12-19T03:34:19.790" UserId="28" Comment="added 17 characters in body; edited title" Text="Duplicate Lang Error When Adding Custom RPC" ContentLicense="CC BY-SA 4.0" />
  <row Id="24517" PostHistoryTypeId="2" PostId="6394" RevisionGUID="b930beb3-7e00-43aa-a484-add3c135e991" CreationDate="2022-12-19T03:57:22.663" UserId="28" Text="Remove one of your `GetDispatchInfo` imports, or specify which trait you are calling.&#xD;&#xA;&#xD;&#xA;Instead of `call.get_dispatch_info();` you can do `frame_support::dispatch::GetDispatchInfo::get_dispatch_info(&amp;call);`&#xD;&#xA;&#xD;&#xA;But the correct solution is to fix your imports so that there is no conflict." ContentLicense="CC BY-SA 4.0" />
  <row Id="24519" PostHistoryTypeId="5" PostId="6389" RevisionGUID="d28e21e9-5b8f-4ddc-95a9-e50ec424a41b" CreationDate="2022-12-19T03:59:59.603" UserId="28" Comment="added 2 characters in body" Text="From my understanding after reading the code, I think nested/multi-level doesn't work.&#xD;&#xA;&#xD;&#xA;Assuming we only use x1 conviction, given 3 accounts: `A`, `B` and `C`, `A` delegate to `B`, and `B` delegate to `C`. My operations order is:&#xD;&#xA;&#xD;&#xA;1. Call `A` delegate to `B`.&#xD;&#xA;2. Call `B` delegate to `C`.&#xD;&#xA;&#xD;&#xA;And finally `C`'s voting storage is:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  Direct: {&#xD;&#xA;    votes: []&#xD;&#xA;    delegations: {&#xD;&#xA;      votes: 1&#xD;&#xA;      capital: 1&#xD;&#xA;    }&#xD;&#xA;    prior: [&#xD;&#xA;      0&#xD;&#xA;      0&#xD;&#xA;    ]&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So we can see `delegations` value of `C` is 1 not 2, which means `A`'s delegation to `B` not apply to `C`. So I think nested delegation not work. There is also comment in substrate [here](https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L1268) which say 2nd level delegating is not supported.&#xD;&#xA;&#xD;&#xA;But, from another stackexchange topic [here](https://substrate.stackexchange.com/questions/5770/should-delegations-propagate-from-one-account-to-another) and implementation of polkadot.js [here](https://github.com/polkadot-js/api/blob/master/packages/api-derive/src/democracy/referendumsInfo.ts#L85-L86), it seems that nested delegation works.&#xD;&#xA;&#xD;&#xA;So I want to confirm:&#xD;&#xA;1. Does democracy/conviction-voting pallet support nested/multi-level delegation?&#xD;&#xA;2. If so, how does the code work?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24522" PostHistoryTypeId="2" PostId="6396" RevisionGUID="47e31350-09dc-4663-9b00-8f59691c08c2" CreationDate="2022-12-19T04:59:33.270" UserId="521" Text="You are right, nested/multi-level delegation is currently not supported in `democracy` and `conviction-voting`. The piece of code you referenced is one of the places where nested delegations would have been handled. However, it is currently not.&#xD;&#xA;&#xD;&#xA;Regarding how it can be handled in theory - it would require some bit of bounded recursion and careful measuring so we could limit nesting to avoid the weight limit being exhausted when updating the nested delegation state." ContentLicense="CC BY-SA 4.0" />
  <row Id="24524" PostHistoryTypeId="2" PostId="6397" RevisionGUID="6f40741d-a346-46c4-8095-cce76f915480" CreationDate="2022-12-19T05:35:42.187" UserId="3474" Text="The polkadot.js documentation has a list of APIs on it, but is there any other list of APIs?  &#xD;&#xA;The polkadot.js API list includes eth, which cannot be executed without Frontier.  &#xD;&#xA;Is there an API List that can be run on just a node with no other packages?  &#xD;&#xA;&#xD;&#xA;Best regard!!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24526" PostHistoryTypeId="1" PostId="6397" RevisionGUID="6f40741d-a346-46c4-8095-cce76f915480" CreationDate="2022-12-19T05:35:42.187" UserId="3474" Text="About Polkadot's API List" ContentLicense="CC BY-SA 4.0" />
  <row Id="24527" PostHistoryTypeId="3" PostId="6397" RevisionGUID="6f40741d-a346-46c4-8095-cce76f915480" CreationDate="2022-12-19T05:35:42.187" UserId="3474" Text="|polkadot|api|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24528" PostHistoryTypeId="2" PostId="6398" RevisionGUID="25080536-8fb5-40b7-a8a1-9ef7cc935222" CreationDate="2022-12-19T08:00:06.280" UserId="3317" Text="I'm not aware of another list. However, the [documentation][1] of polkadot js covers such API's which you can use to experiment with on the [substrate node template][2] (e.g. [cookbook][3]/[examples][4]). Try to obtain the latest block, the metadata or balance changes. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [3]: https://polkadot.js.org/docs/api/cookbook/blocks&#xD;&#xA;  [4]: https://polkadot.js.org/docs/api/examples/promise" ContentLicense="CC BY-SA 4.0" />
  <row Id="24530" PostHistoryTypeId="2" PostId="6399" RevisionGUID="0c787715-2b59-4905-b6c0-c2c269d0eaf6" CreationDate="2022-12-19T08:00:29.047" UserId="2762" Text="With your instruction&#xD;&#xA;&#xD;&#xA;    const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;&#xD;&#xA;You have all the information on the Block, you can get now all the extrinsics from the block&#xD;&#xA;&#xD;&#xA;    signedBlock.block.extrinsics.forEach((ex, index) =&gt; {&#xD;&#xA;        console.log(&quot;---extrinsic----&quot;);&#xD;&#xA;        console.log(ex.toHuman());&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;This will print all the extrinsics on the block and the information, you will have to find yours. If you know the pallet of your extrinsic you can filter .&#xD;&#xA;&#xD;&#xA;    const { method: { args, method, section } } = ex;&#xD;&#xA;    const pallet = ex.method.section;&#xD;&#xA;&#xD;&#xA;Or if you know the Extrinsic ID you can filter by the extrinsic ID to get it:&#xD;&#xA;&#xD;&#xA;    const extrinsicId = signedBlock.block.header.number + &quot;-&quot; + index" ContentLicense="CC BY-SA 4.0" />
  <row Id="24532" PostHistoryTypeId="50" PostId="5966" RevisionGUID="72098834-1b56-4482-a812-33d4f3fed374" CreationDate="2022-12-19T09:07:00.837" UserId="-1" />
  <row Id="24533" PostHistoryTypeId="2" PostId="6400" RevisionGUID="790edead-a225-47dc-9897-15fe4adc6a18" CreationDate="2022-12-19T10:45:36.497" UserId="3327" Text="I am using following link to run polkadot relay chain and connect substrate parachain node with it as parachain. &#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/connect-relay-and-parachains/prepare-a-local-relay-chain/&#xD;&#xA;&#xD;&#xA;I downloaded the plain chain spece from following link as described in above toturial:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/assets/tutorials/relay-chain-specs/plain-local-chainspec.json&#xD;&#xA;&#xD;&#xA;When I run following command convert plain change config to raw chain config. It gives error:[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;./target/release/polkadot build-spec --chain plain-local-chainspec.json --raw --disable-default-bootnode &gt; raw-local-chainspec.json&#xD;&#xA;&#xD;&#xA;Error: &#xD;&#xA;   0: Other: Error parsing spec file: invalid type: null, expected struct GenesisConfig at line 84 column 34&#xD;&#xA;&#xD;&#xA;I tested against following versions of polkadot:&#xD;&#xA;v0.9.29&#xD;&#xA;v0.9.32&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Hn0Bp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24535" PostHistoryTypeId="1" PostId="6400" RevisionGUID="790edead-a225-47dc-9897-15fe4adc6a18" CreationDate="2022-12-19T10:45:36.497" UserId="3327" Text="Error while generating polkadot relay chain specs" ContentLicense="CC BY-SA 4.0" />
  <row Id="24536" PostHistoryTypeId="3" PostId="6400" RevisionGUID="790edead-a225-47dc-9897-15fe4adc6a18" CreationDate="2022-12-19T10:45:36.497" UserId="3327" Text="|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24537" PostHistoryTypeId="2" PostId="6401" RevisionGUID="67524970-111e-4fc5-a6a0-25875a74b423" CreationDate="2022-12-19T10:45:51.213" UserId="3620" Text="I am deploying flipper ink! smart contract to shibuya, but when I tried to read the value using get() I am getting this error { Err: { Module: { index: 70 error: 0x02000000 } } }&#xD;&#xA;&#xD;&#xA;I also tried deploying it to rococo and getting similar error { Err: { Module: { index: 40 error: 0x02000000 } } }&#xD;&#xA;&#xD;&#xA;any idea what is the error and why ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24539" PostHistoryTypeId="1" PostId="6401" RevisionGUID="67524970-111e-4fc5-a6a0-25875a74b423" CreationDate="2022-12-19T10:45:51.213" UserId="3620" Text="smart contract function call error" ContentLicense="CC BY-SA 4.0" />
  <row Id="24540" PostHistoryTypeId="3" PostId="6401" RevisionGUID="67524970-111e-4fc5-a6a0-25875a74b423" CreationDate="2022-12-19T10:45:51.213" UserId="3620" Text="|smart-contract|error|flipper|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24541" PostHistoryTypeId="2" PostId="6402" RevisionGUID="7313e0f0-cea0-46a5-a5f2-0efc9143b021" CreationDate="2022-12-19T11:03:52.857" UserId="2478" Text="This is because of Shibuya has updated to Weights v2.&#xD;&#xA;&#xD;&#xA;If you are getting this error on polkadot.js we are working on a fix for it https://github.com/polkadot-js/apps/pull/8538. &#xD;&#xA;&#xD;&#xA;If you are getting this from your code you can fix like this:&#xD;&#xA;&#xD;&#xA;Weights v2 requires refTime and proofSize. refTime is equal to v1 weight. &#xD;&#xA;&#xD;&#xA;Both values can be fetched by sending the txn as a query and using the gasRequired value.&#xD;&#xA;&#xD;&#xA;    const { gasRequired, result, output } = await contract.query.flip(&#xD;&#xA;      address,&#xD;&#xA;      {&#xD;&#xA;        gasLimit: api.registry.createType('WeightV2', {&#xD;&#xA;          refTime,&#xD;&#xA;          proofSize,&#xD;&#xA;        }) as WeightV2,&#xD;&#xA;        storageDepositLimit,&#xD;&#xA;      }&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;    const gasLimit = api.registry.createType('WeightV2', gasRequired) as WeightV2&#xD;&#xA;&#xD;&#xA;    // Send the transaction, like elsewhere this is a normal extrinsic&#xD;&#xA;    // with the same rules as applied in the API (As with the read example,&#xD;&#xA;    // additional params, if required can follow)&#xD;&#xA;    await contract.tx&#xD;&#xA;      .flip({&#xD;&#xA;        gasLimit: gasLimit,&#xD;&#xA;        storageDepositLimit&#xD;&#xA;      })&#xD;&#xA;      .signAndSend(account, async (res) =&gt; {&#xD;&#xA;        if (res.status.isInBlock) {&#xD;&#xA;          console.log('in a block')&#xD;&#xA;        } else if (res.status.isFinalized) {&#xD;&#xA;          console.log('finalized')&#xD;&#xA;        }&#xD;&#xA;      })&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24543" PostHistoryTypeId="2" PostId="6403" RevisionGUID="2ef7bfbc-7d61-4e33-a824-dbec742560de" CreationDate="2022-12-19T11:44:57.903" UserId="321" Text="I'm replacing `api.rpc.payment.queryInfo` with `api.call.transactionPaymentApi.queryInfo` in the crawler code of Polkastats block explorer but I want to ask about the second parameter `len`: is that the extrinsic lenght o what?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24545" PostHistoryTypeId="1" PostId="6403" RevisionGUID="2ef7bfbc-7d61-4e33-a824-dbec742560de" CreationDate="2022-12-19T11:44:57.903" UserId="321" Text="Question for api.call.transactionPaymentApi.queryInfo state call" ContentLicense="CC BY-SA 4.0" />
  <row Id="24546" PostHistoryTypeId="3" PostId="6403" RevisionGUID="2ef7bfbc-7d61-4e33-a824-dbec742560de" CreationDate="2022-12-19T11:44:57.903" UserId="321" Text="|polkadot-js|polkadot|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24547" PostHistoryTypeId="5" PostId="6398" RevisionGUID="c9428438-c46b-44cd-9827-3a0d2c5f5b63" CreationDate="2022-12-19T11:57:41.193" UserId="3317" Comment="deleted 3 characters in body" Text="I'm not aware of another list. However, the [documentation][1] of polkadot js covers such API's which you can use to experiment with the [substrate node template][2] (e.g. [cookbook][3]/[examples][4]). Try to obtain the latest block, the metadata or balance changes for example. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [3]: https://polkadot.js.org/docs/api/cookbook/blocks&#xD;&#xA;  [4]: https://polkadot.js.org/docs/api/examples/promise" ContentLicense="CC BY-SA 4.0" />
  <row Id="24548" PostHistoryTypeId="50" PostId="5984" RevisionGUID="7bbd0cdb-78c5-45d6-8f04-dd685850d8fa" CreationDate="2022-12-19T12:01:50.177" UserId="-1" />
  <row Id="24549" PostHistoryTypeId="2" PostId="6404" RevisionGUID="d5ffceb0-f652-4618-9445-1492795e7d53" CreationDate="2022-12-19T12:50:50.003" UserId="2762" Text="You can wrap the code in a try-catch block:&#xD;&#xA;&#xD;&#xA;    try{&#xD;&#xA;       await transferExtrinsic.signAndSend(injector.signer); &#xD;&#xA;    }&#xD;&#xA;    catch(error: any){&#xD;&#xA;        const errorMessage = error.toString();&#xD;&#xA;        console.log(errorMessage);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And in the catch you get the error message, in your case you will get:&#xD;&#xA;&#xD;&#xA;    RpcError: 1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low" ContentLicense="CC BY-SA 4.0" />
  <row Id="24553" PostHistoryTypeId="2" PostId="6406" RevisionGUID="459ebf27-c74f-4406-adb2-0e2a6332045a" CreationDate="2022-12-19T14:39:01.283" UserId="2762" Text="For the plain-local-chainspec.json you got in the tutorial, you can also download its [raw chain specification file][1], so no need to generate it.&#xD;&#xA;&#xD;&#xA;From the Polkadot repository where you are trying to generate the chain config, there is already a list of chain specs:&#xD;&#xA;https://github.com/paritytech/polkadot/tree/master/node/service/chain-specs&#xD;&#xA;&#xD;&#xA;So in case you want to run the rococo local:&#xD;&#xA;&#xD;&#xA;    ./target/release/polkadot --chain=rococo-local&#xD;&#xA;&#xD;&#xA;And if you want to get the chain spec file from there:&#xD;&#xA;&#xD;&#xA;    ./target/release/polkadot build-spec --chain rococo-local &gt; rococo-chain-spec.json&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/assets/tutorials/relay-chain-specs/raw-local-chainspec.json/" ContentLicense="CC BY-SA 4.0" />
  <row Id="24555" PostHistoryTypeId="2" PostId="6407" RevisionGUID="97cff43e-7a68-4b72-a06d-fd6ce6dd943f" CreationDate="2022-12-19T15:08:13.120" UserId="3623" Text="Getting Error :  &quot;Verification Error: Runtime error: Execution failed: Runtime panicked: Bad input data provided to validate_transaction: Invalid length prefix&quot; While calling the custom RPC method in substrate using golang centrifuge rpc client.&#xD;&#xA;&#xD;&#xA;Custom Pallet Method&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(10000)]&#xD;&#xA;    	pub fn post_single(&#xD;&#xA;    		origin: OriginFor&lt;T&gt;,&#xD;&#xA;    		amount: &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    		let author = ensure_signed(origin)?;&#xD;&#xA;    				&#xD;&#xA;    		&#xD;&#xA;    	 	 T::Currency::deposit_creating(&#xD;&#xA;    			&amp;author,&#xD;&#xA;    			amount&#xD;&#xA;    		);&#xD;&#xA;    	&#xD;&#xA;    &#xD;&#xA;    		Self::deposit_event(Event::PostTransaction(author));&#xD;&#xA;    &#xD;&#xA;    		Ok(())&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;Code from glang&#xD;&#xA;&#xD;&#xA;        func Example_makeASimpleTransfer() {&#xD;&#xA;        	// Instantiate the API&#xD;&#xA;        	api, err := gsrpc.NewSubstrateAPI(config.Default().RPCURL)&#xD;&#xA;        	if err != nil {&#xD;&#xA;        		panic(err)&#xD;&#xA;        	}&#xD;&#xA;        &#xD;&#xA;        	meta, err := api.RPC.State.GetMetadataLatest()&#xD;&#xA;        	if err != nil {&#xD;&#xA;        		panic(err)&#xD;&#xA;        	}&#xD;&#xA;        	&#xD;&#xA;        	if err != nil {&#xD;&#xA;        		panic(err)&#xD;&#xA;        	}&#xD;&#xA;        &#xD;&#xA;        &#xD;&#xA;        	bal, ok := new(big.Int).SetString(&quot;100000000000000&quot;, 10)&#xD;&#xA;        	if !ok {&#xD;&#xA;        		panic(fmt.Errorf(&quot;failed to convert balance&quot;))&#xD;&#xA;        	}&#xD;&#xA;        &#xD;&#xA;        &#xD;&#xA;        	c, err := types.NewCall(meta, &quot;Ntxn.post_single&quot;,types.NewUCompact(bal))&#xD;&#xA;        	if err != nil {   &#xD;&#xA;              panic(err)&#xD;&#xA;    	    }	&#xD;&#xA;             ........&#xD;&#xA;    _, err = api.RPC.Author.SubmitExtrinsic(ext)&#xD;&#xA;    	if err != nil {&#xD;&#xA;    		panic(err)&#xD;&#xA;    	}&#xD;&#xA;    }	&#xD;&#xA;&#xD;&#xA;Substrate node has panic error.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Version: 4.0.0-dev-71cad6ec672&#xD;&#xA;&gt; &#xD;&#xA;&gt;    0: sp_panic_handler::set::{{closure}}    1:&#xD;&#xA;&gt; std::panicking::rust_panic_with_hook&#xD;&#xA;&gt;              at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:702:17&#xD;&#xA;&gt; 2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;&gt;              at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:588:13&#xD;&#xA;&gt; 3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;&gt;              at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;&gt; 4: rust_begin_unwind&#xD;&#xA;&gt;              at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5&#xD;&#xA;&gt; 5: core::panicking::panic_fmt&#xD;&#xA;&gt;              at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14&#xD;&#xA;&gt; 6: node_template_runtime::api::dispatch    7:&#xD;&#xA;&gt; std::thread::local::LocalKey&lt;T&gt;::with    8:&#xD;&#xA;&gt; sc_executor::native_executor::WasmExecutor&lt;H&gt;::with_instance::{{closure}}&#xD;&#xA;&gt; 9: sc_executor::wasm_runtime::RuntimeCache::with_instance   10:&#xD;&#xA;&gt; &lt;sc_executor::native_executor::NativeElseWasmExecutor&lt;D&gt; as&#xD;&#xA;&gt; sp_core::traits::CodeExecutor&gt;::call   11:&#xD;&#xA;&gt; sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_aux   12:&#xD;&#xA;&gt; sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute_using_consensus_failure_handler&#xD;&#xA;&gt; 13: &lt;sc_service::client::call_executor::LocalCallExecutor&lt;Block,B,E&gt;&#xD;&#xA;&gt; as sc_client_api::call_executor::CallExecutor&lt;Block&gt;&gt;::contextual_call&#xD;&#xA;&gt; 14: &lt;sc_service::client::client::Client&lt;B,E,Block,RA&gt; as&#xD;&#xA;&gt; sp_api::CallApiAt&lt;Block&gt;&gt;::call_api_at   15:&#xD;&#xA;&gt; &lt;node_template_runtime::RuntimeApiImpl&lt;__SR_API_BLOCK__,RuntimeApiImplCall&gt; as&#xD;&#xA;&gt; sp_finality_grandpa::GrandpaApi&lt;__SR_API_BLOCK__&gt;&gt;::__runtime_api_internal_call_api_at&#xD;&#xA;&gt; 16:&#xD;&#xA;&gt; sp_transaction_pool::runtime_api::TaggedTransactionQueue::validate_transaction&#xD;&#xA;&gt; 17: tracing::span::Span::in_scope   18:&#xD;&#xA;&gt; sc_transaction_pool::api::validate_transaction_blocking   19:&#xD;&#xA;&gt; &lt;core::future::from_generator::GenFuture&lt;T&gt; as&#xD;&#xA;&gt; core::future::future::Future&gt;::poll   20:&#xD;&#xA;&gt; &lt;core::future::from_generator::GenFuture&lt;T&gt; as&#xD;&#xA;&gt; core::future::future::Future&gt;::poll   21:&#xD;&#xA;&gt; &lt;futures_util::future::future::Map&lt;Fut,F&gt; as&#xD;&#xA;&gt; core::future::future::Future&gt;::poll   22:&#xD;&#xA;&gt; &lt;sc_service::task_manager::prometheus_future::PrometheusFuture&lt;T&gt; as&#xD;&#xA;&gt; core::future::future::Future&gt;::poll   23:&#xD;&#xA;&gt; &lt;core::future::from_generator::GenFuture&lt;T&gt; as&#xD;&#xA;&gt; core::future::future::Future&gt;::poll   24:&#xD;&#xA;&gt; tokio::runtime::context::BlockingRegionGuard::block_on   25:&#xD;&#xA;&gt; tokio::runtime::handle::Handle::block_on   26:&#xD;&#xA;&gt; &lt;tokio::runtime::blocking::task::BlockingTask&lt;T&gt; as&#xD;&#xA;&gt; core::future::future::Future&gt;::poll&#xD;&#xA;&#xD;&#xA;As I am new to substrate and Rust not able to identify the issue. Please help how I need to pass the balance value. Seems that is the problem here.&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24557" PostHistoryTypeId="1" PostId="6407" RevisionGUID="97cff43e-7a68-4b72-a06d-fd6ce6dd943f" CreationDate="2022-12-19T15:08:13.120" UserId="3623" Text="Runtime error: Execution failed: Runtime panicked: Bad input data provided to validate_transaction: Invalid length prefix" ContentLicense="CC BY-SA 4.0" />
  <row Id="24558" PostHistoryTypeId="3" PostId="6407" RevisionGUID="97cff43e-7a68-4b72-a06d-fd6ce6dd943f" CreationDate="2022-12-19T15:08:13.120" UserId="3623" Text="|pallet|substrate-node-template|golang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24559" PostHistoryTypeId="2" PostId="6408" RevisionGUID="5447cd5e-f9d1-4174-9392-51a0014343e5" CreationDate="2022-12-19T15:15:26.257" UserId="28" Text="Substrate is a modular blockchain framework underneath Polkadot.&#xD;&#xA;&#xD;&#xA;Users are given the flexibility to create and modify their Substrate based chain however they want, which means that there will not really ever be an offline list of APIs available for all chains.&#xD;&#xA;&#xD;&#xA;Instead, the Polkadot / Substrate ecosystem relies on Metadata, which you can learn more about here: https://docs.substrate.io/build/application-development/#metadata-system&#xD;&#xA;&#xD;&#xA;By querying the metadata of a chain, you can learn about all its APIs and features, and this is the only way to get the data you are looking for in a consistent way." ContentLicense="CC BY-SA 4.0" />
  <row Id="24561" PostHistoryTypeId="2" PostId="6409" RevisionGUID="f76f0f44-ba92-4cc0-a857-96738a242c9a" CreationDate="2022-12-19T15:29:21.937" UserId="94" Text="It is difficult do debug any of your issue without source code.  &#xD;&#xA;However, it could be just the way that you are passing the balance.  &#xD;&#xA;Instead of `types.NewUCompact` you can try `types.U128`. The exact type depends on your runtime config, but the default would be `U128`, which has worked for me in the past as well.  &#xD;&#xA;&#xD;&#xA;If this does not solve your issue then please provide the code, thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="24564" PostHistoryTypeId="2" PostId="6410" RevisionGUID="65368a82-692a-49e8-b1e9-894768eda48f" CreationDate="2022-12-19T15:58:20.697" UserId="2759" Text="Given the following extrinsic&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::weight(&lt;T as Config&gt;::WeightInfo::foo(*hint))]&#xD;&#xA;fn foo(hint: u32) {&#xD;&#xA;   let real = get_real();&#xD;&#xA;&#xD;&#xA;   if real &gt; hint {&#xD;&#xA;      return &lt;Error&lt;T&gt;&gt;::HintTooLow;&#xD;&#xA;   }&#xD;&#xA;&#xD;&#xA;   // do something&#xD;&#xA;   Ok(real.into())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is it possible to report the actual weight (`real`) but charge a different fee (`hint`) from within the extrinsic? `PostDispatch` seems to affect the weight &amp; subsequently the fee via `WeightToFee`. Probably what is desired here is a different weight to correct block weight and to charge fee, separately.&#xD;&#xA;&#xD;&#xA;Rationale: Prevent a user from spamming the network by maliciously overestimating the hint thereby tricking block authors, tx priority, etc." ContentLicense="CC BY-SA 4.0" />
  <row Id="24566" PostHistoryTypeId="1" PostId="6410" RevisionGUID="65368a82-692a-49e8-b1e9-894768eda48f" CreationDate="2022-12-19T15:58:20.697" UserId="2759" Text="PostDispatch: Report Actual Weight but Charge Different Fee" ContentLicense="CC BY-SA 4.0" />
  <row Id="24567" PostHistoryTypeId="3" PostId="6410" RevisionGUID="65368a82-692a-49e8-b1e9-894768eda48f" CreationDate="2022-12-19T15:58:20.697" UserId="2759" Text="|extrinsic|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24568" PostHistoryTypeId="2" PostId="6411" RevisionGUID="6efee2f4-e728-4f68-bdb3-b5c3566303d0" CreationDate="2022-12-19T16:01:11.500" UserId="3317" Text="Correct.&#xD;&#xA;The encoded length of the extrinsic ([ref][1]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/rpc/src/lib.rs#L103" ContentLicense="CC BY-SA 4.0" />
  <row Id="24570" PostHistoryTypeId="2" PostId="6412" RevisionGUID="8deef1ee-23d8-4bb1-ae13-2138af6461e3" CreationDate="2022-12-19T17:37:16.300" UserId="2722" Text="i gonna add custom rpc in substrate , but every time i run this command : `cargo check` , it show me this error : &#xD;&#xA;&#xD;&#xA;        error[E0277]: the trait bound `Methods: From&lt;jsonrpsee_core::server::rpc_module::RpcModule&lt;TemplatePallet&lt;C, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;&gt;&gt;` is not satisfied&#xD;&#xA;       --&gt; node/src/rpc.rs:53:15&#xD;&#xA;        |&#xD;&#xA;    53  |     module.merge(TemplatePallet::new(client.clone()).into_rpc())?;&#xD;&#xA;        |            ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;jsonrpsee_core::server::rpc_module::RpcModule&lt;TemplatePallet&lt;C, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;&gt;&gt;` is not implemented for `Methods`&#xD;&#xA;        |            |&#xD;&#xA;        |            required by a bound introduced by this call&#xD;&#xA;        |&#xD;&#xA;        = help: the trait `From&lt;RpcModule&lt;Context&gt;&gt;` is implemented for `Methods`&#xD;&#xA;        = note: required for `jsonrpsee_core::server::rpc_module::RpcModule&lt;TemplatePallet&lt;C, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;&gt;` to implement `Into&lt;Methods&gt;`&#xD;&#xA;    note: required by a bound in `Methods::merge`&#xD;&#xA;       --&gt; /home/kianoush/.cargo/registry/src/github.com-1ecc6299db9ec823/jsonrpsee-core-0.16.2/src/server/rpc_module.rs:311:38&#xD;&#xA;        |&#xD;&#xA;    311 |     pub fn merge(&amp;mut self, other: impl Into&lt;Methods&gt;) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;        |                                         ^^^^^^^^^^^^^ required by this bound in `Methods::merge`&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;    error: could not compile `node-template` due to previous error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    [Repository][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;these are my codes : ‍‍‍&#xD;&#xA;&#xD;&#xA;`pallets/template/src/rpc/runtime-api/src/lib.rs`&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    // Here we declare the runtime API. It is implemented it the `impl` block in&#xD;&#xA;    // runtime file (the `runtime-api/src/lib.rs`)&#xD;&#xA;    sp_api::decl_runtime_apis! {&#xD;&#xA;    	pub trait TemplateApi {&#xD;&#xA;    		fn get_value() -&gt; u32;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;‍‍`pallets/template/src/rpc`&#xD;&#xA;&#xD;&#xA;        pub use pallet_template_runtime_api::TemplateApi as TemplateRuntimeApi;&#xD;&#xA;    use jsonrpsee::{&#xD;&#xA;    	core::{Error as JsonRpseeError, RpcResult},&#xD;&#xA;    	proc_macros::rpc,&#xD;&#xA;    	types::error::{CallError, ErrorObject},&#xD;&#xA;    };&#xD;&#xA;    use sp_api::ProvideRuntimeApi;&#xD;&#xA;    use sp_blockchain::HeaderBackend;&#xD;&#xA;    use sp_runtime::{generic::BlockId, traits::Block as BlockT};&#xD;&#xA;    use std::sync::Arc;&#xD;&#xA;    &#xD;&#xA;    #[rpc(client, server)]&#xD;&#xA;    pub trait TemplateApi&lt;BlockHash&gt; {&#xD;&#xA;    	#[method(name = &quot;template_getValue&quot;)]&#xD;&#xA;    	fn get_value(&amp;self, at: Option&lt;BlockHash&gt;) -&gt; RpcResult&lt;u32&gt;;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// A struct that implements the `TemplateApi`.&#xD;&#xA;    pub struct TemplatePallet&lt;C, Block&gt; {&#xD;&#xA;    	// If you have more generics, no need to TemplatePallet&lt;C, M, N, P, ...&gt;&#xD;&#xA;    	// just use a tuple like TemplatePallet&lt;C, (M, N, P, ...)&gt;&#xD;&#xA;    	client: Arc&lt;C&gt;,&#xD;&#xA;    	_marker: std::marker::PhantomData&lt;Block&gt;,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;C, Block&gt; TemplatePallet&lt;C, Block&gt; {&#xD;&#xA;    	/// Create new `TemplatePallet` instance with the given reference to the client.&#xD;&#xA;    	pub fn new(client: Arc&lt;C&gt;) -&gt; Self {&#xD;&#xA;    		Self { client, _marker: Default::default() }&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;C, Block&gt; TemplateApiServer&lt;&lt;Block as BlockT&gt;::Hash&gt; for TemplatePallet&lt;C, Block&gt;&#xD;&#xA;    where&#xD;&#xA;    	Block: BlockT,&#xD;&#xA;    	C: Send + Sync + 'static + ProvideRuntimeApi&lt;Block&gt; + HeaderBackend&lt;Block&gt;,&#xD;&#xA;    	C::Api: TemplateRuntimeApi&lt;Block&gt;,&#xD;&#xA;    {&#xD;&#xA;    	fn get_value(&amp;self, at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;) -&gt; RpcResult&lt;u32&gt; {&#xD;&#xA;    		let api = self.client.runtime_api();&#xD;&#xA;    		let at = BlockId::hash(at.unwrap_or_else(||self.client.info().best_hash));&#xD;&#xA;    &#xD;&#xA;    		api.get_value(&amp;at).map_err(runtime_error_into_rpc_err)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const RUNTIME_ERROR: i32 = 1;&#xD;&#xA;    &#xD;&#xA;    /// Converts a runtime trap into an RPC error.&#xD;&#xA;    fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -&gt; JsonRpseeError {&#xD;&#xA;    	CallError::Custom(ErrorObject::owned(&#xD;&#xA;    		RUNTIME_ERROR,&#xD;&#xA;    		&quot;Runtime error&quot;,&#xD;&#xA;    		Some(format!(&quot;{:?}&#xD;&#xA;&#xD;&#xA;    &quot;, err)),&#xD;&#xA;    	))&#xD;&#xA;    	.into()&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;‍‍‍‍&#xD;&#xA;‍‍`runtime/src/lib.rs`&#xD;&#xA;&#xD;&#xA;    ‍‍impl pallet_template_runtime_api::TemplateApi&lt;Block&gt; for Runtime {&#xD;&#xA;        fn get_value() -&gt; u32 {&#xD;&#xA;            TemplateModule::get_value().unwrap_or(0)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`node/rpc.rs`&#xD;&#xA;&#xD;&#xA;     /// Instantiate all full RPC extensions.&#xD;&#xA;    pub fn create_full&lt;C, P&gt;(&#xD;&#xA;    	deps: FullDeps&lt;C, P&gt;,&#xD;&#xA;    ) -&gt; Result&lt;RpcModule&lt;()&gt;, Box&lt;dyn std::error::Error + Send + Sync&gt;&gt;&#xD;&#xA;    where&#xD;&#xA;    	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;    	C: HeaderBackend&lt;Block&gt; + HeaderMetadata&lt;Block, Error = BlockChainError&gt; + 'static,&#xD;&#xA;    	C: Send + Sync + 'static,&#xD;&#xA;    	C::Api: substrate_frame_rpc_system::AccountNonceApi&lt;Block, AccountId, Index&gt;,&#xD;&#xA;    	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi&lt;Block, Balance&gt;,&#xD;&#xA;    	C::Api: pallet_template_rpc::TemplateRuntimeApi&lt;Block&gt;,&#xD;&#xA;    	C::Api: BlockBuilder&lt;Block&gt;,&#xD;&#xA;    	P: TransactionPool + 'static,&#xD;&#xA;    {&#xD;&#xA;    	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};&#xD;&#xA;    	use substrate_frame_rpc_system::{System, SystemApiServer};&#xD;&#xA;    	use pallet_template_rpc::{TemplatePallet, TemplateApiServer};&#xD;&#xA;    &#xD;&#xA;    	let mut module = RpcModule::new(());&#xD;&#xA;    	let FullDeps { client, pool, deny_unsafe } = deps;&#xD;&#xA;    &#xD;&#xA;    	module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?;&#xD;&#xA;    	module.merge(TransactionPayment::new(client.clone()).into_rpc())?;&#xD;&#xA;    	module.merge(TemplatePallet::new(client).into_rpc())?;&#xD;&#xA;    &#xD;&#xA;    	// Extend this RPC with a custom API by using the following syntax.&#xD;&#xA;    	// `YourRpcStruct` should have a reference to a client, which is needed&#xD;&#xA;    	// to call into the runtime.&#xD;&#xA;    	// `module.merge(YourRpcTrait::into_rpc(YourRpcStruct::new(ReferenceToClient, ...)))?;`&#xD;&#xA;    &#xD;&#xA;    	Ok(module)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="24572" PostHistoryTypeId="1" PostId="6412" RevisionGUID="8deef1ee-23d8-4bb1-ae13-2138af6461e3" CreationDate="2022-12-19T17:37:16.300" UserId="2722" Text="required by a bound in `Methods::merge`" ContentLicense="CC BY-SA 4.0" />
  <row Id="24573" PostHistoryTypeId="3" PostId="6412" RevisionGUID="8deef1ee-23d8-4bb1-ae13-2138af6461e3" CreationDate="2022-12-19T17:37:16.300" UserId="2722" Text="|substrate-node-template|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24575" PostHistoryTypeId="5" PostId="6402" RevisionGUID="e4e8bc53-c1aa-420c-9c79-bfda06cb6e11" CreationDate="2022-12-20T01:30:34.263" UserId="2673" Comment="TypeScript syntax highlighting" Text="This is because of Shibuya has updated to Weights v2.&#xD;&#xA;&#xD;&#xA;If you are getting this error on polkadot.js we are working on a fix for it https://github.com/polkadot-js/apps/pull/8538. &#xD;&#xA;&#xD;&#xA;If you are getting this from your code you can fix like this:&#xD;&#xA;&#xD;&#xA;Weights v2 requires refTime and proofSize. refTime is equal to v1 weight. &#xD;&#xA;&#xD;&#xA;Both values can be fetched by sending the txn as a query and using the gasRequired value.&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const { gasRequired, result, output } = await contract.query.flip(&#xD;&#xA;  address,&#xD;&#xA;  {&#xD;&#xA;    gasLimit: api.registry.createType('WeightV2', {&#xD;&#xA;      refTime,&#xD;&#xA;      proofSize,&#xD;&#xA;    }) as WeightV2,&#xD;&#xA;    storageDepositLimit,&#xD;&#xA;  }&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;const gasLimit = api.registry.createType('WeightV2', gasRequired) as WeightV2&#xD;&#xA;&#xD;&#xA;// Send the transaction, like elsewhere this is a normal extrinsic&#xD;&#xA;// with the same rules as applied in the API (As with the read example,&#xD;&#xA;// additional params, if required can follow)&#xD;&#xA;await contract.tx&#xD;&#xA;  .flip({&#xD;&#xA;    gasLimit: gasLimit,&#xD;&#xA;    storageDepositLimit&#xD;&#xA;  })&#xD;&#xA;  .signAndSend(account, async (res) =&gt; {&#xD;&#xA;    if (res.status.isInBlock) {&#xD;&#xA;      console.log('in a block')&#xD;&#xA;    } else if (res.status.isFinalized) {&#xD;&#xA;      console.log('finalized')&#xD;&#xA;    }&#xD;&#xA;  })&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24576" PostHistoryTypeId="24" PostId="6402" RevisionGUID="e4e8bc53-c1aa-420c-9c79-bfda06cb6e11" CreationDate="2022-12-20T01:30:34.263" Comment="Proposed by 2673 approved by 34 edit id of 359" ContentLicense="CC BY-SA 4.0" />
  <row Id="24577" PostHistoryTypeId="6" PostId="6407" RevisionGUID="e97ac418-1aff-4b8b-a881-400fdc62cb70" CreationDate="2022-12-20T01:32:05.483" UserId="34" Comment="edited tags" Text="|pallet|rpc|golang|go-substrate-rpc-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24579" PostHistoryTypeId="2" PostId="6413" RevisionGUID="e511f460-ab31-48e1-93b2-37bd7476bb6d" CreationDate="2022-12-20T06:02:43.223" UserId="251" Text="How about this?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -X POST -H 'Content-Type:application/json' https://rpc.polkadot.io -d '{&quot;id&quot;:0,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;rpc_methods&quot;,&quot;params&quot;:[&quot;&quot;]}'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But no more detail on this result. Such as the rpc's params.&#xD;&#xA;&#xD;&#xA;And a further reading about these things: https://github.com/paritytech/substrate/issues/5902" ContentLicense="CC BY-SA 4.0" />
  <row Id="24581" PostHistoryTypeId="5" PostId="6413" RevisionGUID="cd9bf5a9-3957-45da-b5ea-2c5bb50dbbde" CreationDate="2022-12-20T06:13:15.077" UserId="251" Comment="added 2 characters in body" Text="How about this?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -X POST -H 'Content-Type:application/json' https://rpc.polkadot.io -d '{&quot;id&quot;:0,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;rpc_methods&quot;,&quot;params&quot;:[&quot;&quot;]}'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But no more detail on this result. Such as the rpc's params.&#xD;&#xA;&#xD;&#xA;And a further reading related to these things: https://github.com/paritytech/substrate/issues/5902" ContentLicense="CC BY-SA 4.0" />
  <row Id="24582" PostHistoryTypeId="2" PostId="6414" RevisionGUID="3a7244e7-dae8-461a-bb74-d39f14559067" CreationDate="2022-12-20T07:12:38.970" UserId="1891" Text="I am trying to upgrade pallet-did to substrate v4 but i have an issue an facing with the StorageMap implementation. Below is the code for the storage map functions i am trying to implement:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn delegate_of)]&#xD;&#xA;    pub type DelegateOf&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_128Concat, (T::AccountId, Vec&lt;u8&gt;, T::AccountId), Option&lt;T::BlockNumber&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn attribute_of)]&#xD;&#xA;    pub type AttributeOf&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_128Concat, (T::AccountId, [u8; 32]), Attribute&lt;T::BlockNumber, T::Moment&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn nonce_of)]&#xD;&#xA;    pub type AttributeNonce&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Twox64Concat, (T::AccountId, Vec&lt;u8&gt;), u64, ValueQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn owner_of)]&#xD;&#xA;    pub type OwnerOf&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_128Concat, T::AccountId, Option&lt;T::AccountId&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn updated_by)]&#xD;&#xA;    pub type UpdatedBy&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_128Concat, T::AccountId, (T::AccountId, T::BlockNumber, T::Time), OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the decl_storage! functionality in [pallet-did](https://github.com/substrate-developer-hub/pallet-did) refactored into StorageMap functions. I get the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;warning: trait objects without an explicit dyn are deprecated&#xD;&#xA;   --&gt; src/lib.rs:128:5&#xD;&#xA;    |&#xD;&#xA;128 |     StorageMap&lt;_, Blake2_128Concat, (T::AccountId, Vec&lt;u8&gt;, T::AccountId), Option&lt;T::BlockNumber&gt;, OptionQuery&gt;;&#xD;&#xA;    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!&#xD;&#xA;    = note: for more information, see &lt;https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html&gt;&#xD;&#xA;    = note: #[warn(bare_trait_objects)] on by default&#xD;&#xA;help: use dyn&#xD;&#xA;    |&#xD;&#xA;128 |     dyn StorageMap&lt;_, Blake2_128Concat, (T::AccountId, Vec&lt;u8&gt;, T::AccountId), Option&lt;T::BlockNumber&gt;, OptionQuery&gt;;&#xD;&#xA;    |     +++&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This doesn't make sense to me since StorageMap is a type and not a trait. A solution to this and explanation would be highly appreciated.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24584" PostHistoryTypeId="1" PostId="6414" RevisionGUID="3a7244e7-dae8-461a-bb74-d39f14559067" CreationDate="2022-12-20T07:12:38.970" UserId="1891" Text="How can i resolve this weird error with StorageMap implementation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24585" PostHistoryTypeId="3" PostId="6414" RevisionGUID="3a7244e7-dae8-461a-bb74-d39f14559067" CreationDate="2022-12-20T07:12:38.970" UserId="1891" Text="|pallet|types|storagemap|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24586" PostHistoryTypeId="5" PostId="6414" RevisionGUID="f146b09d-a4c7-4ce7-9f67-382e32605b26" CreationDate="2022-12-20T07:13:26.320" UserId="1891" Comment="edited body" Text="I am trying to upgrade pallet-did to substrate v4 but i have an issue am facing with the StorageMap implementation. Below is the code for the storage map functions i am trying to implement:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn delegate_of)]&#xD;&#xA;    pub type DelegateOf&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_128Concat, (T::AccountId, Vec&lt;u8&gt;, T::AccountId), Option&lt;T::BlockNumber&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn attribute_of)]&#xD;&#xA;    pub type AttributeOf&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_128Concat, (T::AccountId, [u8; 32]), Attribute&lt;T::BlockNumber, T::Moment&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn nonce_of)]&#xD;&#xA;    pub type AttributeNonce&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Twox64Concat, (T::AccountId, Vec&lt;u8&gt;), u64, ValueQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn owner_of)]&#xD;&#xA;    pub type OwnerOf&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_128Concat, T::AccountId, Option&lt;T::AccountId&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn updated_by)]&#xD;&#xA;    pub type UpdatedBy&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_128Concat, T::AccountId, (T::AccountId, T::BlockNumber, T::Time), OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the decl_storage! functionality in [pallet-did](https://github.com/substrate-developer-hub/pallet-did) refactored into StorageMap functions. I get the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;warning: trait objects without an explicit dyn are deprecated&#xD;&#xA;   --&gt; src/lib.rs:128:5&#xD;&#xA;    |&#xD;&#xA;128 |     StorageMap&lt;_, Blake2_128Concat, (T::AccountId, Vec&lt;u8&gt;, T::AccountId), Option&lt;T::BlockNumber&gt;, OptionQuery&gt;;&#xD;&#xA;    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!&#xD;&#xA;    = note: for more information, see &lt;https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html&gt;&#xD;&#xA;    = note: #[warn(bare_trait_objects)] on by default&#xD;&#xA;help: use dyn&#xD;&#xA;    |&#xD;&#xA;128 |     dyn StorageMap&lt;_, Blake2_128Concat, (T::AccountId, Vec&lt;u8&gt;, T::AccountId), Option&lt;T::BlockNumber&gt;, OptionQuery&gt;;&#xD;&#xA;    |     +++&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This doesn't make sense to me since StorageMap is a type and not a trait. A solution to this and explanation would be highly appreciated.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24587" PostHistoryTypeId="5" PostId="6414" RevisionGUID="08614737-c1a0-4764-a82d-c94920eedbf4" CreationDate="2022-12-20T07:39:34.763" UserId="251" Comment="deleted 76 characters in body" Text="I am trying to upgrade pallet-did to substrate v4 but i have an issue am facing with the StorageMap implementation. Below is the code for the storage map functions i am trying to implement:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn delegate_of)]&#xD;&#xA;pub type DelegateOf&lt;T: Config&gt; =&#xD;&#xA;StorageMap&lt;_, Blake2_128Concat, (T::AccountId, Vec&lt;u8&gt;, T::AccountId), Option&lt;T::BlockNumber&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn attribute_of)]&#xD;&#xA;pub type AttributeOf&lt;T: Config&gt; =&#xD;&#xA;StorageMap&lt;_, Blake2_128Concat, (T::AccountId, [u8; 32]), Attribute&lt;T::BlockNumber, T::Moment&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn nonce_of)]&#xD;&#xA;pub type AttributeNonce&lt;T: Config&gt; =&#xD;&#xA;StorageMap&lt;_, Twox64Concat, (T::AccountId, Vec&lt;u8&gt;), u64, ValueQuery&gt;;&#xD;&#xA;    &#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn owner_of)]&#xD;&#xA;pub type OwnerOf&lt;T: Config&gt; =&#xD;&#xA;StorageMap&lt;_, Blake2_128Concat, T::AccountId, Option&lt;T::AccountId&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn updated_by)]&#xD;&#xA;pub type UpdatedBy&lt;T: Config&gt; =&#xD;&#xA;StorageMap&lt;_, Blake2_128Concat, T::AccountId, (T::AccountId, T::BlockNumber, T::Time), OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the decl_storage! functionality in [pallet-did](https://github.com/substrate-developer-hub/pallet-did) refactored into StorageMap functions. I get the following error:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;warning: trait objects without an explicit dyn are deprecated&#xD;&#xA;   --&gt; src/lib.rs:128:5&#xD;&#xA;    |&#xD;&#xA;128 |     StorageMap&lt;_, Blake2_128Concat, (T::AccountId, Vec&lt;u8&gt;, T::AccountId), Option&lt;T::BlockNumber&gt;, OptionQuery&gt;;&#xD;&#xA;    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!&#xD;&#xA;    = note: for more information, see &lt;https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html&gt;&#xD;&#xA;    = note: #[warn(bare_trait_objects)] on by default&#xD;&#xA;help: use dyn&#xD;&#xA;    |&#xD;&#xA;128 |     dyn StorageMap&lt;_, Blake2_128Concat, (T::AccountId, Vec&lt;u8&gt;, T::AccountId), Option&lt;T::BlockNumber&gt;, OptionQuery&gt;;&#xD;&#xA;    |     +++&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This doesn't make sense to me since StorageMap is a type and not a trait. A solution to this and explanation would be highly appreciated.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24588" PostHistoryTypeId="2" PostId="6415" RevisionGUID="5148828f-5366-46f0-bff4-7d25dff09876" CreationDate="2022-12-20T07:50:51.173" UserId="251" Text="I'm not sure about this.&#xD;&#xA;&#xD;&#xA;But from your log.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What's your rust version? Did you try the latest nightly toolchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24590" PostHistoryTypeId="5" PostId="6411" RevisionGUID="9e1c9e47-c3d1-4ca0-bcdc-a74e0f79b502" CreationDate="2022-12-20T08:45:38.833" UserId="3317" Comment="added 753 characters in body" Text="Correct.&#xD;&#xA;&#xD;&#xA;The encoded length of the extrinsic ([ref][1]).&#xD;&#xA;&#xD;&#xA;Why is the len parameter required? The runtime doesn't know all the decoding context of the the encoded call ([ref][2]). So you can't just pass the encoded call and calculate the length in the runtime, because it won't be able to decode it properly.&#xD;&#xA;&#xD;&#xA;Some references that helped me unravel this:&#xD;&#xA;- [what are the steps of encoding an extrinsic in substrate?][3]&#xD;&#xA;- [additional info about signed extensions and weights][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/rpc/src/lib.rs#L103&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs#L446-L448&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/471/what-are-the-steps-for-encoding-an-extrinsic-in-substrate&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/6103/calculating-actual-weights-for-extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="24591" PostHistoryTypeId="2" PostId="6416" RevisionGUID="cd8fa2e6-3425-4a34-86b2-0f7a64c6be70" CreationDate="2022-12-20T09:01:09.443" UserId="3438" Text="For any given account can I get a breakdown of DOT that is bonded, vested, locked, transferable, locked for democracy etc.&#xD;&#xA;&#xD;&#xA;Ideally looking for way to do it through py-substrate-interface or PolkadotJs api" ContentLicense="CC BY-SA 4.0" />
  <row Id="24593" PostHistoryTypeId="1" PostId="6416" RevisionGUID="cd8fa2e6-3425-4a34-86b2-0f7a64c6be70" CreationDate="2022-12-20T09:01:09.443" UserId="3438" Text="Get a breakdown of DOT for an account" ContentLicense="CC BY-SA 4.0" />
  <row Id="24594" PostHistoryTypeId="3" PostId="6416" RevisionGUID="cd8fa2e6-3425-4a34-86b2-0f7a64c6be70" CreationDate="2022-12-20T09:01:09.443" UserId="3438" Text="|data-analytics|accountdata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24595" PostHistoryTypeId="5" PostId="6415" RevisionGUID="24e6e708-8f92-4f71-bcc7-db67b691aa34" CreationDate="2022-12-20T09:49:07.570" UserId="251" Comment="added 392 characters in body" Text="&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm not sure about this.&#xD;&#xA;&#xD;&#xA;But from your log.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What's your rust version? Did you try the latest nightly toolchain?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After checking your code.&#xD;&#xA;&#xD;&#xA;Because you wrote:&#xD;&#xA;```rs&#xD;&#xA;use frame_support::{&#xD;&#xA;    dispatch::DispatchResult, ensure,traits::{Time, IsType}, StorageMap,&#xD;&#xA;    sp_runtime::traits::{Scale, IdentifyAccount, Member, Verify},&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This `StorageMap` shadows the same name type from the `frame_support::pallet_prelude::*`.&#xD;&#xA;&#xD;&#xA;Please remove it, or change it to `StorageMap as _`." ContentLicense="CC BY-SA 4.0" />
  <row Id="24596" PostHistoryTypeId="2" PostId="6417" RevisionGUID="86571278-f542-4f40-8003-36879c35e61d" CreationDate="2022-12-20T09:51:48.957" UserId="3438" Text="Usually when looking for when the block was created I refer the timestamp.set extrinsic. &#xD;&#xA;But some chains in the past were not using the timestamp pallet as part of their runtime, for reference statemine and statemint when they were using shell-runtime initially.&#xD;&#xA;&#xD;&#xA;So in these cases how does one go about estimating the timestamp of the block." ContentLicense="CC BY-SA 4.0" />
  <row Id="24598" PostHistoryTypeId="1" PostId="6417" RevisionGUID="86571278-f542-4f40-8003-36879c35e61d" CreationDate="2022-12-20T09:51:48.957" UserId="3438" Text="Deduce timestamp of block for chains without timestamp pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="24599" PostHistoryTypeId="3" PostId="6417" RevisionGUID="86571278-f542-4f40-8003-36879c35e61d" CreationDate="2022-12-20T09:51:48.957" UserId="3438" Text="|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24600" PostHistoryTypeId="6" PostId="6414" RevisionGUID="519fab1d-182f-4e5b-83a1-d267566c3b1a" CreationDate="2022-12-20T09:51:56.357" UserId="251" Comment="edited tags" Text="|rust|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24601" PostHistoryTypeId="2" PostId="6418" RevisionGUID="ea718aed-b521-4c26-8b4c-46845e708e29" CreationDate="2022-12-20T10:02:36.113" UserId="522" Text="I would like to know if there is a way to cancel or delay a runtime upgrade already scheduled by a parachain with the relay chain soon about to send the upgrade_go_ahead_signal.&#xD;&#xA;&#xD;&#xA;It is fairly easy to block upgrades from being scheduled.\&#xD;&#xA;However when trying to block scheduled upgrade by ignoring the relaychain's upgrade_go_ahead_signal, the parachain halts.&#xD;&#xA;&#xD;&#xA;Thank you.\&#xD;&#xA;Please let me know if any information is missing." ContentLicense="CC BY-SA 4.0" />
  <row Id="24603" PostHistoryTypeId="1" PostId="6418" RevisionGUID="ea718aed-b521-4c26-8b4c-46845e708e29" CreationDate="2022-12-20T10:02:36.113" UserId="522" Text="How to cancel or delay a schduled parachain runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24604" PostHistoryTypeId="3" PostId="6418" RevisionGUID="ea718aed-b521-4c26-8b4c-46845e708e29" CreationDate="2022-12-20T10:02:36.113" UserId="522" Text="|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24605" PostHistoryTypeId="2" PostId="6419" RevisionGUID="34a51185-d62e-462a-8459-dd014ad016ff" CreationDate="2022-12-20T10:20:07.887" UserId="85" Text="You can see when that block was included in the relay chain as ParachainInclusion CandidateBacked. It must have been created before that and after the prior block from that parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="24614" PostHistoryTypeId="2" PostId="6421" RevisionGUID="0ca473ca-aa29-4958-b230-cc79e98d89d4" CreationDate="2022-12-20T16:39:13.070" UserId="280" Text="In one of our testnets, we moved the parachain (:= _P_) to another relay chain (:= _R_). Unfortunately, we have not been able to produce blocks after moving over. I think to have overseen/misinterpreted a minor detail and thus hope to find help here.&#xD;&#xA;&#xD;&#xA;## Error&#xD;&#xA;&#xD;&#xA;The collators keep throwing `Failed to collect collation info. error=Application(UnknownBlock(&quot;Header was not found in the database: 0x7ccd4c501e544478053ad1e7e0ff3e9e13f4637e3f8913ac29657a3871ff4c02&quot;))` for changing blocks, e.g.&#xD;&#xA;```&#xD;&#xA;2022-12-20 16:25:20 [Parachain]  Idle (1 peers), best: #2140029 (0xfa9a…8baa), finalized #2140029 (0xfa9a…8baa), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-12-20 16:25:24 [Relaychain] ✨ Imported #16120 (0xb03c…c873)    &#xD;&#xA;2022-12-20 16:25:24 [Parachain] Starting collation. relay_parent=0xb03c653b53212450429f0b52e87a325e8b3d5f4f4c03395e6d3c644bfc1ec873 at=0xfa9a2a1a3f88770aeda78c1364fbddd329ec8d0afb973d8db2205e1d7c638baa&#xD;&#xA;2022-12-20 16:25:24 [Parachain]  Starting consensus session on top of parent 0xfa9a2a1a3f88770aeda78c1364fbddd329ec8d0afb973d8db2205e1d7c638baa    &#xD;&#xA;2022-12-20 16:25:24 [Parachain]  Prepared block for proposing at 2140030 (0 ms) [hash: 0x8833dee16a124b43efb7d8663ba0eee9b46b5a898c59e13cbff82b84098b522c; parent_hash: 0xfa9a…8baa; extrinsics (2): [0x3d40…323c, 0x0db2…c6fd]]    &#xD;&#xA;2022-12-20 16:25:24 [Parachain]  Pre-sealed block for proposal at 2140030. Hash now 0x7ccd4c501e544478053ad1e7e0ff3e9e13f4637e3f8913ac29657a3871ff4c02, previously 0x8833dee16a124b43efb7d8663ba0eee9b46b5a898c59e13cbff82b84098b522c.    &#xD;&#xA;2022-12-20 16:25:24 [Parachain] Block import error: State Database error: Too many sibling blocks inserted    &#xD;&#xA;2022-12-20 16:25:24 [Parachain] Error with block built on 0xfa9a2a1a3f88770aeda78c1364fbddd329ec8d0afb973d8db2205e1d7c638baa: Import failed: State Database error: Too many sibling blocks inserted    &#xD;&#xA;2022-12-20 16:25:24 [Parachain] PoV size { header: 0.181640625kb, extrinsics: 2.8251953125kb, storage_proof: 14.001953125kb }&#xD;&#xA;2022-12-20 16:25:24 [Parachain] Compressed PoV size: 14.734375kb&#xD;&#xA;2022-12-20 16:25:24 [Parachain] Failed to collect collation info. error=Application(UnknownBlock(&quot;Header was not found in the database: 0x7ccd4c501e544478053ad1e7e0ff3e9e13f4637e3f8913ac29657a3871ff4c02&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## How to reproduce/steps taken on our side&#xD;&#xA;&#xD;&#xA;1. Stop _P_ while running on old relay.&#xD;&#xA;2. On _R_, register _P_ with header of last finalized block (= 2140029) of _P_ and current WASM.&#xD;&#xA;3. Restart Collators of _P_ pointing to new relay chain.&#xD;&#xA;4. Collators fail to build blocks, since _R_ has a lower block number than old relay.&#xD;&#xA;5. In runtime of _P_: Replace `RelayNumberStrictlyIncreases ` with `AnyRelayNumber` ([commit](https://github.com/KILTprotocol/kilt-node/commit/b7cd7fb4f09be3826b0fc42b1ff9125ed5fc9f4f)). &#xD;&#xA;6. In chainspec of _P_: Use `codeSubstitutes: {&quot;2140029&quot;: &quot;...&quot;}` for last finalized block of _P_ to overwrite WASM with the one resulting from Step 5.&#xD;&#xA;7. On _R_: Force new para WASM via `sudo.para.forceSetCurrentCode`.&#xD;&#xA;8. Unfortunately, Collators of _P_ still fail to produce a block with the above error message.&#xD;&#xA;&#xD;&#xA;## Questions&#xD;&#xA;&#xD;&#xA;1. Is it correct to substitute the WASM for the last finalized block or should I pick an earlier one or the next one to be finalized?&#xD;&#xA;2. I did not bump the spec version for the WASM used in `codeSubstitutes` due to [this comment](https://substrate.stackexchange.com/a/5925/280). Is this truly correct or does it not matter at all?&#xD;&#xA;&#xD;&#xA;I would be super grateful about any hint where to dig. Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="24616" PostHistoryTypeId="1" PostId="6421" RevisionGUID="0ca473ca-aa29-4958-b230-cc79e98d89d4" CreationDate="2022-12-20T16:39:13.070" UserId="280" Text="Para header not found after moving to another relay chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="24617" PostHistoryTypeId="3" PostId="6421" RevisionGUID="0ca473ca-aa29-4958-b230-cc79e98d89d4" CreationDate="2022-12-20T16:39:13.070" UserId="280" Text="|parachain|parachain-collator|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24618" PostHistoryTypeId="5" PostId="6421" RevisionGUID="3f860d58-8142-474e-918f-633a14831f57" CreationDate="2022-12-20T16:47:30.023" UserId="280" Comment="added 130 characters in body" Text="In one of our testnets, we moved the parachain (:= _P_) to another relay chain (:= _R_). Unfortunately, we have not been able to produce blocks after moving over. I think to have overseen/misinterpreted a minor detail and thus hope to find help here.&#xD;&#xA;&#xD;&#xA;## Error&#xD;&#xA;&#xD;&#xA;The collators keep throwing `Failed to collect collation info. error=Application(UnknownBlock(&quot;Header was not found in the database: 0x7ccd4c501e544478053ad1e7e0ff3e9e13f4637e3f8913ac29657a3871ff4c02&quot;))` for changing blocks, e.g.&#xD;&#xA;```&#xD;&#xA;2022-12-20 16:25:20 [Parachain]  Idle (1 peers), best: #2140029 (0xfa9a…8baa), finalized #2140029 (0xfa9a…8baa), ⬇ 0 ⬆ 0    &#xD;&#xA;2022-12-20 16:25:24 [Relaychain] ✨ Imported #16120 (0xb03c…c873)    &#xD;&#xA;2022-12-20 16:25:24 [Parachain] Starting collation. relay_parent=0xb03c653b53212450429f0b52e87a325e8b3d5f4f4c03395e6d3c644bfc1ec873 at=0xfa9a2a1a3f88770aeda78c1364fbddd329ec8d0afb973d8db2205e1d7c638baa&#xD;&#xA;2022-12-20 16:25:24 [Parachain]  Starting consensus session on top of parent 0xfa9a2a1a3f88770aeda78c1364fbddd329ec8d0afb973d8db2205e1d7c638baa    &#xD;&#xA;2022-12-20 16:25:24 [Parachain]  Prepared block for proposing at 2140030 (0 ms) [hash: 0x8833dee16a124b43efb7d8663ba0eee9b46b5a898c59e13cbff82b84098b522c; parent_hash: 0xfa9a…8baa; extrinsics (2): [0x3d40…323c, 0x0db2…c6fd]]    &#xD;&#xA;2022-12-20 16:25:24 [Parachain]  Pre-sealed block for proposal at 2140030. Hash now 0x7ccd4c501e544478053ad1e7e0ff3e9e13f4637e3f8913ac29657a3871ff4c02, previously 0x8833dee16a124b43efb7d8663ba0eee9b46b5a898c59e13cbff82b84098b522c.    &#xD;&#xA;2022-12-20 16:25:24 [Parachain] Block import error: State Database error: Too many sibling blocks inserted    &#xD;&#xA;2022-12-20 16:25:24 [Parachain] Error with block built on 0xfa9a2a1a3f88770aeda78c1364fbddd329ec8d0afb973d8db2205e1d7c638baa: Import failed: State Database error: Too many sibling blocks inserted    &#xD;&#xA;2022-12-20 16:25:24 [Parachain] PoV size { header: 0.181640625kb, extrinsics: 2.8251953125kb, storage_proof: 14.001953125kb }&#xD;&#xA;2022-12-20 16:25:24 [Parachain] Compressed PoV size: 14.734375kb&#xD;&#xA;2022-12-20 16:25:24 [Parachain] Failed to collect collation info. error=Application(UnknownBlock(&quot;Header was not found in the database: 0x7ccd4c501e544478053ad1e7e0ff3e9e13f4637e3f8913ac29657a3871ff4c02&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## How to reproduce/steps taken on our side&#xD;&#xA;&#xD;&#xA;1. Stop _P_ while running on old relay.&#xD;&#xA;2. On _R_, register _P_ with header of last finalized block (= 2140029) of _P_ and current WASM.&#xD;&#xA;3. Restart Collators of _P_ pointing to new relay chain.&#xD;&#xA;4. Collators fail to build blocks, since _R_ has a lower block number than old relay.&#xD;&#xA;5. In runtime of _P_: Replace `RelayNumberStrictlyIncreases ` with `AnyRelayNumber` ([commit](https://github.com/KILTprotocol/kilt-node/commit/b7cd7fb4f09be3826b0fc42b1ff9125ed5fc9f4f)). &#xD;&#xA;6. In chainspec of _P_: Use `codeSubstitutes: {&quot;2140029&quot;: &quot;...&quot;}` for last finalized block of _P_ to overwrite WASM with the one resulting from Step 5.&#xD;&#xA;7. On _R_: Force new para WASM via `sudo.para.forceSetCurrentCode`.&#xD;&#xA;8. Unfortunately, Collators of _P_ still fail to produce a block with the above error message.&#xD;&#xA;&#xD;&#xA;## Questions&#xD;&#xA;&#xD;&#xA;1. Is it correct to substitute the WASM for the last finalized block or should I pick an earlier one or the next one to be finalized?&#xD;&#xA;2. I did not bump the spec version for the WASM used in `codeSubstitutes` due to [this comment](https://substrate.stackexchange.com/a/5925/280). Is this truly correct or does it not matter at all?&#xD;&#xA;&#xD;&#xA;I would be super grateful about any hint where to dig. Thanks in advance!&#xD;&#xA;&#xD;&#xA;## Versions&#xD;&#xA;&#xD;&#xA;* Relay: Runtime `westend/9330`, client Polkadot v0.9.33&#xD;&#xA;* Para: Runtime and Client based on Substrate v0.9.29" ContentLicense="CC BY-SA 4.0" />
  <row Id="24619" PostHistoryTypeId="2" PostId="6422" RevisionGUID="880041e2-8e40-4dda-ac12-3c13ec7c2272" CreationDate="2022-12-20T22:55:19.550" UserId="19" Text="Could you add more details to your question, for now is not specified enough to give some valuable input. I can share my experience with `swanky-node` (maybe is related). When you will try to build firstly the node like below:&#xD;&#xA;&#xD;&#xA;&gt; tomek@rhei-box:~/workspaces/swanky-node$ cargo build&#xD;&#xA;&gt; [2022-12-20T22:49:25Z INFO  cargo_release::release] Publishing&#xD;&#xA;&gt; pallet-chain-extension-rmrk&#xD;&#xA;&gt;     Updating crates.io index error: all dependencies must have a version specified when publishing. dependency `frame-support` does not&#xD;&#xA;&gt; specify a version Note: The published dependency will use the version&#xD;&#xA;&gt; from crates.io, the `git` specification will be removed from the&#xD;&#xA;&gt; dependency declaration.&#xD;&#xA;&#xD;&#xA;You can get errors, but when you execute `cargo build --release` immediately after cloning repository, everything should compile successfully." ContentLicense="CC BY-SA 4.0" />
  <row Id="24621" PostHistoryTypeId="2" PostId="6423" RevisionGUID="cf90c8f9-8ff9-4884-99c0-47b075250bee" CreationDate="2022-12-21T00:23:01.203" UserId="2060" Text="I am trying to test Fast Track of proposals via PolkadotJS dashboard, but I'm running into an error I can't explain.  Note this is on a local relay chain where we have set up various members of Alice...Ferdie as Council/TC .&#xD;&#xA;&#xD;&#xA;1. I submit notePreimage for a forceTransfer via Governance -&gt; Democracy -&gt; Submit preimage.&#xD;&#xA;2. After this is in a block, I copy the preimage hash (`0xa4c5c8dce6baf661e66af7a75c3e9afe24fcad3a88b2e5e4272f130d9c941701`)and submit a proposal in the same pane via Submit proposal.&#xD;&#xA;3. I verify that the proposal exists in storage:&#xD;&#xA;```&#xD;&#xA;democracy.publicProps:&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    0&#xD;&#xA;    0xa4c5c8dce6baf661e66af7a75c3e9afe24fcad3a88b2e5e4272f130d9c941701&#xD;&#xA;    5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. I submit a democracy.fastTrack motion via Governance -&gt; TechnicalCommittee -&gt; Proposals -&gt; Submit proposal, using the above hash.&#xD;&#xA;&#xD;&#xA;4. I verify that the proposal exists in the collective's storage:&#xD;&#xA;```&#xD;&#xA;technicalCommittee.proposalOf: Option&lt;Call&gt;&#xD;&#xA;{&#xD;&#xA;  args: {&#xD;&#xA;    proposal_hash: 0xa4c5c8dce6baf661e66af7a75c3e9afe24fcad3a88b2e5e4272f130d9c941701&#xD;&#xA;    voting_period: 100&#xD;&#xA;    delay: 2&#xD;&#xA;  }&#xD;&#xA;  method: fastTrack&#xD;&#xA;  section: democracy&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;5. I submit enough votes for the proposal to meet the threshold (2). I also tried this with 3/2 votes (exceeding the threshold).&#xD;&#xA;6. Waiting for all votes to be in a block, I close the proposal.&#xD;&#xA;7. I see events `technicalCommittee.Closed`, `technicalCommittee.Approved`, then `technicalCommittee.execute` fails with `ProposalMissing`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I see a number of places where that might be thrown but it seems they would never get to the dispatch stage in `do_approve_proposal` if the proposal were missing. So I don't know why this is failing or how to get this Fast Track to go through. What am I missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24623" PostHistoryTypeId="1" PostId="6423" RevisionGUID="cf90c8f9-8ff9-4884-99c0-47b075250bee" CreationDate="2022-12-21T00:23:01.203" UserId="2060" Text="FastTrack proposal execution fails with &quot;ProposalMissing&quot; but is stored in democracy.publicProps" ContentLicense="CC BY-SA 4.0" />
  <row Id="24624" PostHistoryTypeId="3" PostId="6423" RevisionGUID="cf90c8f9-8ff9-4884-99c0-47b075250bee" CreationDate="2022-12-21T00:23:01.203" UserId="2060" Text="|storage|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24625" PostHistoryTypeId="2" PostId="6424" RevisionGUID="ba99c5f4-1292-4d6e-9718-4dc5c3cd8750" CreationDate="2022-12-21T00:42:27.837" UserId="496" Text="Im trying to deploy INK 4.0 smart contract with cargo-contract 2.0 beta to a network but Im getting the following error ```contracts.CodeRejected```.&#xD;&#xA;&#xD;&#xA;Whenever i try to upload the contract to my local substrate node Im getting the following error:&#xD;&#xA;```StorageDepositLimitExhausted, More storage was created than allowed by the storage deposit limit.```&#xD;&#xA;&#xD;&#xA;As mentioned, Im using INK 4.0 beta and cargo-contracts 2.0 beta.&#xD;&#xA;I've tried compiling the following ways:&#xD;&#xA;&#xD;&#xA; * ```cargo contract build --optimization-passes=0```&#xD;&#xA;&#xD;&#xA; * ```cargo contract build```&#xD;&#xA;&#xD;&#xA;I'm using MacBook pro M1 pro chip using MacOs Ventura (13.0.1 (22A400)) &#xD;&#xA;&#xD;&#xA;Thank you very much :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="24627" PostHistoryTypeId="1" PostId="6424" RevisionGUID="ba99c5f4-1292-4d6e-9718-4dc5c3cd8750" CreationDate="2022-12-21T00:42:27.837" UserId="496" Text="Unable to deploy INK 4.0 beta smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="24628" PostHistoryTypeId="3" PostId="6424" RevisionGUID="ba99c5f4-1292-4d6e-9718-4dc5c3cd8750" CreationDate="2022-12-21T00:42:27.837" UserId="496" Text="|ink|smart-contract|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24635" PostHistoryTypeId="5" PostId="6412" RevisionGUID="a0ca0c62-7c69-4f17-a9a8-6bd432f53ab2" CreationDate="2022-12-21T03:23:53.720" UserId="251" Comment="added 41 characters in body" Text="i gonna add custom rpc in substrate , but every time i run this command : `cargo check` , it show me this error : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;        error[E0277]: the trait bound `Methods: From&lt;jsonrpsee_core::server::rpc_module::RpcModule&lt;TemplatePallet&lt;C, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;&gt;&gt;` is not satisfied&#xD;&#xA;       --&gt; node/src/rpc.rs:53:15&#xD;&#xA;        |&#xD;&#xA;    53  |     module.merge(TemplatePallet::new(client.clone()).into_rpc())?;&#xD;&#xA;        |            ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;jsonrpsee_core::server::rpc_module::RpcModule&lt;TemplatePallet&lt;C, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;&gt;&gt;` is not implemented for `Methods`&#xD;&#xA;        |            |&#xD;&#xA;        |            required by a bound introduced by this call&#xD;&#xA;        |&#xD;&#xA;        = help: the trait `From&lt;RpcModule&lt;Context&gt;&gt;` is implemented for `Methods`&#xD;&#xA;        = note: required for `jsonrpsee_core::server::rpc_module::RpcModule&lt;TemplatePallet&lt;C, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;&gt;` to implement `Into&lt;Methods&gt;`&#xD;&#xA;    note: required by a bound in `Methods::merge`&#xD;&#xA;       --&gt; /home/kianoush/.cargo/registry/src/github.com-1ecc6299db9ec823/jsonrpsee-core-0.16.2/src/server/rpc_module.rs:311:38&#xD;&#xA;        |&#xD;&#xA;    311 |     pub fn merge(&amp;mut self, other: impl Into&lt;Methods&gt;) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;        |                                         ^^^^^^^^^^^^^ required by this bound in `Methods::merge`&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;    error: could not compile `node-template` due to previous error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    [Repository][1]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;these are my codes : ‍‍‍&#xD;&#xA;&#xD;&#xA;`pallets/template/src/rpc/runtime-api/src/lib.rs`&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    // Here we declare the runtime API. It is implemented it the `impl` block in&#xD;&#xA;    // runtime file (the `runtime-api/src/lib.rs`)&#xD;&#xA;    sp_api::decl_runtime_apis! {&#xD;&#xA;    	pub trait TemplateApi {&#xD;&#xA;    		fn get_value() -&gt; u32;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;‍‍`pallets/template/src/rpc`&#xD;&#xA;&#xD;&#xA;        pub use pallet_template_runtime_api::TemplateApi as TemplateRuntimeApi;&#xD;&#xA;    use jsonrpsee::{&#xD;&#xA;    	core::{Error as JsonRpseeError, RpcResult},&#xD;&#xA;    	proc_macros::rpc,&#xD;&#xA;    	types::error::{CallError, ErrorObject},&#xD;&#xA;    };&#xD;&#xA;    use sp_api::ProvideRuntimeApi;&#xD;&#xA;    use sp_blockchain::HeaderBackend;&#xD;&#xA;    use sp_runtime::{generic::BlockId, traits::Block as BlockT};&#xD;&#xA;    use std::sync::Arc;&#xD;&#xA;    &#xD;&#xA;    #[rpc(client, server)]&#xD;&#xA;    pub trait TemplateApi&lt;BlockHash&gt; {&#xD;&#xA;    	#[method(name = &quot;template_getValue&quot;)]&#xD;&#xA;    	fn get_value(&amp;self, at: Option&lt;BlockHash&gt;) -&gt; RpcResult&lt;u32&gt;;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// A struct that implements the `TemplateApi`.&#xD;&#xA;    pub struct TemplatePallet&lt;C, Block&gt; {&#xD;&#xA;    	// If you have more generics, no need to TemplatePallet&lt;C, M, N, P, ...&gt;&#xD;&#xA;    	// just use a tuple like TemplatePallet&lt;C, (M, N, P, ...)&gt;&#xD;&#xA;    	client: Arc&lt;C&gt;,&#xD;&#xA;    	_marker: std::marker::PhantomData&lt;Block&gt;,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;C, Block&gt; TemplatePallet&lt;C, Block&gt; {&#xD;&#xA;    	/// Create new `TemplatePallet` instance with the given reference to the client.&#xD;&#xA;    	pub fn new(client: Arc&lt;C&gt;) -&gt; Self {&#xD;&#xA;    		Self { client, _marker: Default::default() }&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl&lt;C, Block&gt; TemplateApiServer&lt;&lt;Block as BlockT&gt;::Hash&gt; for TemplatePallet&lt;C, Block&gt;&#xD;&#xA;    where&#xD;&#xA;    	Block: BlockT,&#xD;&#xA;    	C: Send + Sync + 'static + ProvideRuntimeApi&lt;Block&gt; + HeaderBackend&lt;Block&gt;,&#xD;&#xA;    	C::Api: TemplateRuntimeApi&lt;Block&gt;,&#xD;&#xA;    {&#xD;&#xA;    	fn get_value(&amp;self, at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;) -&gt; RpcResult&lt;u32&gt; {&#xD;&#xA;    		let api = self.client.runtime_api();&#xD;&#xA;    		let at = BlockId::hash(at.unwrap_or_else(||self.client.info().best_hash));&#xD;&#xA;    &#xD;&#xA;    		api.get_value(&amp;at).map_err(runtime_error_into_rpc_err)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const RUNTIME_ERROR: i32 = 1;&#xD;&#xA;    &#xD;&#xA;    /// Converts a runtime trap into an RPC error.&#xD;&#xA;    fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -&gt; JsonRpseeError {&#xD;&#xA;    	CallError::Custom(ErrorObject::owned(&#xD;&#xA;    		RUNTIME_ERROR,&#xD;&#xA;    		&quot;Runtime error&quot;,&#xD;&#xA;    		Some(format!(&quot;{:?}&#xD;&#xA;&#xD;&#xA;    &quot;, err)),&#xD;&#xA;    	))&#xD;&#xA;    	.into()&#xD;&#xA;    }&#xD;&#xA;`‍‍‍‍``&#xD;&#xA;&#xD;&#xA;‍‍`runtime/src/lib.rs`&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    ‍‍impl pallet_template_runtime_api::TemplateApi&lt;Block&gt; for Runtime {&#xD;&#xA;        fn get_value() -&gt; u32 {&#xD;&#xA;            TemplateModule::get_value().unwrap_or(0)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`node/rpc.rs`&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    /// Instantiate all full RPC extensions.&#xD;&#xA;    pub fn create_full&lt;C, P&gt;(&#xD;&#xA;    	deps: FullDeps&lt;C, P&gt;,&#xD;&#xA;    ) -&gt; Result&lt;RpcModule&lt;()&gt;, Box&lt;dyn std::error::Error + Send + Sync&gt;&gt;&#xD;&#xA;    where&#xD;&#xA;    	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;    	C: HeaderBackend&lt;Block&gt; + HeaderMetadata&lt;Block, Error = BlockChainError&gt; + 'static,&#xD;&#xA;    	C: Send + Sync + 'static,&#xD;&#xA;    	C::Api: substrate_frame_rpc_system::AccountNonceApi&lt;Block, AccountId, Index&gt;,&#xD;&#xA;    	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi&lt;Block, Balance&gt;,&#xD;&#xA;    	C::Api: pallet_template_rpc::TemplateRuntimeApi&lt;Block&gt;,&#xD;&#xA;    	C::Api: BlockBuilder&lt;Block&gt;,&#xD;&#xA;    	P: TransactionPool + 'static,&#xD;&#xA;    {&#xD;&#xA;    	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};&#xD;&#xA;    	use substrate_frame_rpc_system::{System, SystemApiServer};&#xD;&#xA;    	use pallet_template_rpc::{TemplatePallet, TemplateApiServer};&#xD;&#xA;    &#xD;&#xA;    	let mut module = RpcModule::new(());&#xD;&#xA;    	let FullDeps { client, pool, deny_unsafe } = deps;&#xD;&#xA;    &#xD;&#xA;    	module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?;&#xD;&#xA;    	module.merge(TransactionPayment::new(client.clone()).into_rpc())?;&#xD;&#xA;    	module.merge(TemplatePallet::new(client).into_rpc())?;&#xD;&#xA;    &#xD;&#xA;    	// Extend this RPC with a custom API by using the following syntax.&#xD;&#xA;    	// `YourRpcStruct` should have a reference to a client, which is needed&#xD;&#xA;    	// to call into the runtime.&#xD;&#xA;    	// `module.merge(YourRpcTrait::into_rpc(YourRpcStruct::new(ReferenceToClient, ...)))?;`&#xD;&#xA;    &#xD;&#xA;    	Ok(module)&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="24636" PostHistoryTypeId="2" PostId="6427" RevisionGUID="825fd30b-06e5-4d67-92c7-f6461e84b916" CreationDate="2022-12-21T03:27:48.913" UserId="251" Text="I don't know your runtime configurations.&#xD;&#xA;&#xD;&#xA;But generally, you need to open a council motion first.&#xD;&#xA;&#xD;&#xA;It will be `council::propose(democracy::external proposal)`.&#xD;&#xA;&#xD;&#xA;After this passed. There will be an external proposal.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;And you could only fast track this one. You can not fast track the normal proposal.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HuUi1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24638" PostHistoryTypeId="2" PostId="6428" RevisionGUID="ccdb8952-1224-4c32-8e77-e711177c1116" CreationDate="2022-12-21T04:24:36.227" UserId="3629" Text="I'm setting up a metadata site for parachains. I have the github pages site working, and am currently adding parachains. I just have a few questions to make sure I do this properly.&#xD;&#xA;&#xD;&#xA;For `rpc_endpoint` is there a list of rpc urls per parachain anywhere? Is it possible to add multiple rpcs to select from currently per chain?&#xD;&#xA;&#xD;&#xA;For `owner` is that the name of the developer team?&#xD;&#xA;For `repo` is that the teams github repo name?&#xD;&#xA;&#xD;&#xA;I currently have for Acala this:&#xD;&#xA;&#xD;&#xA;    [[chains]]&#xD;&#xA;    name = &quot;acala&quot;&#xD;&#xA;    rpc_endpoint = &quot;wss://&quot;&#xD;&#xA;    color = &quot;#645AFF&quot;&#xD;&#xA;    &#xD;&#xA;    [chains.github_release]&#xD;&#xA;    owner = &quot;AcalaNetwork&quot;&#xD;&#xA;    repo = &quot;Acala&quot;&#xD;&#xA;    genesis_hash = &quot;0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24640" PostHistoryTypeId="1" PostId="6428" RevisionGUID="ccdb8952-1224-4c32-8e77-e711177c1116" CreationDate="2022-12-21T04:24:36.227" UserId="3629" Text="How to add parachains to parity signer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24641" PostHistoryTypeId="3" PostId="6428" RevisionGUID="ccdb8952-1224-4c32-8e77-e711177c1116" CreationDate="2022-12-21T04:24:36.227" UserId="3629" Text="|polkadot|parachain|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24642" PostHistoryTypeId="2" PostId="6429" RevisionGUID="a69b753c-98fc-488f-b59a-a25300d00253" CreationDate="2022-12-21T05:39:13.690" UserId="1950" Text="I have a StorageValue defined as follows&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn reg_students)]&#xD;&#xA;	pub type RegStudents&lt;T: Config&gt; =&#xD;&#xA;		StorageValue&lt;_, BoundedVec&lt;StudentId, T::MaxStudents&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the types are defined as follows&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type MaxStudents: Get&lt;u16&gt;;&#xD;&#xA;&#xD;&#xA;pub type StudentId = u32;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am getting the following error compiling&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;62  | pub trait StorageValue&lt;T: FullCodec&gt; {&#xD;&#xA;    |                           ^^^^^^^^^ required by this bound in `frame_support::StorageValue::get`&#xD;&#xA;help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement&#xD;&#xA;    |&#xD;&#xA;103 |     #[pallet::storage where sp_runtime::BoundedVec&lt;u32, &lt;T as pallet::Config&gt;::MaxStudents&gt;: Decode]&#xD;&#xA;&#xD;&#xA;StorageValue&lt;_, BoundedVec&lt;StudentId, T::MaxStudents&gt;, ValueQuery&gt;;&#xD;&#xA;    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Decode` is not implemented for `sp_runtime::BoundedVec&lt;u32, &lt;T as pallet::Config&gt;::MaxStudents&gt;`&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24644" PostHistoryTypeId="1" PostId="6429" RevisionGUID="a69b753c-98fc-488f-b59a-a25300d00253" CreationDate="2022-12-21T05:39:13.690" UserId="1950" Text="Error defining BoundedVec as a Pallet Storage the trait `Decode` is not implemented for `sp_runtime::BoundedVec" ContentLicense="CC BY-SA 4.0" />
  <row Id="24645" PostHistoryTypeId="3" PostId="6429" RevisionGUID="a69b753c-98fc-488f-b59a-a25300d00253" CreationDate="2022-12-21T05:39:13.690" UserId="1950" Text="|rust|storage|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24646" PostHistoryTypeId="2" PostId="6430" RevisionGUID="96f9104e-100c-4765-8c5f-0f9c60b287c6" CreationDate="2022-12-21T06:43:37.220" UserId="354" Text="You want to migrate your data data from one chain to another, there are two ways according to me for this task.&#xD;&#xA;&#xD;&#xA; 1. You can migrate your state as centrifuge has done when they migrated from a solochain to parachain you can refer to [https://github.com/centrifuge/centrifuge-cli/tree/main/packages/plugins/migration][1]&#xD;&#xA; 2. Another way to do this is by populating your state from one chain to another for this you can refer [https://substrate.stackexchange.com/questions/2202/how-to-selectively-populate-state-from-a-snapshot-of-one-chain-onto-another][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/centrifuge/centrifuge-cli/tree/main/packages/plugins/migration&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/2202/how-to-selectively-populate-state-from-a-snapshot-of-one-chain-onto-another" ContentLicense="CC BY-SA 4.0" />
  <row Id="24648" PostHistoryTypeId="2" PostId="6431" RevisionGUID="a897124e-e766-4e3c-b87f-aa9e4e7c06b4" CreationDate="2022-12-21T06:55:36.440" UserId="1950" Text="I have a struct definition as follows&#xD;&#xA;```&#xD;&#xA;#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct Songs {&#xD;&#xA;	pub name: Vec&lt;u8&gt;,&#xD;&#xA;	pub cast: Vec&lt;u8&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This gives me the error when compiling&#xD;&#xA;```&#xD;&#xA;26 |     pub name: Vec&lt;u8&gt;,&#xD;&#xA;   |                  ^^^^^^^ function or associated item not found in `std::vec::Vec&lt;u8&gt;`&#xD;&#xA;&#xD;&#xA;27 |     pub cast: Vec&lt;u8&gt;,&#xD;&#xA;   |                          ^^^^^^^ function or associated item not found in `std::vec::Vec&lt;u8&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to resolve this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24650" PostHistoryTypeId="1" PostId="6431" RevisionGUID="a897124e-e766-4e3c-b87f-aa9e4e7c06b4" CreationDate="2022-12-21T06:55:36.440" UserId="1950" Text="function or associated item not found in `std::vec::Vec&lt;u8&gt;` when using MaxEndodedLen" ContentLicense="CC BY-SA 4.0" />
  <row Id="24651" PostHistoryTypeId="3" PostId="6431" RevisionGUID="a897124e-e766-4e3c-b87f-aa9e4e7c06b4" CreationDate="2022-12-21T06:55:36.440" UserId="1950" Text="|maxencodedlen|vec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24652" PostHistoryTypeId="2" PostId="6432" RevisionGUID="95ecbe10-ae2a-4799-9061-713f9e675767" CreationDate="2022-12-21T07:07:00.450" UserId="251" Text="Please check the impl.&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/src/sp_core/bounded/bounded_vec.rs.html#45&#xD;&#xA;&#xD;&#xA;It requires `Get&lt;u32&gt;`.&#xD;&#xA;&#xD;&#xA;Try:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type MaxStudents: Get&lt;u32&gt;;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24654" PostHistoryTypeId="2" PostId="6433" RevisionGUID="606a50ef-12be-4e6e-a422-310d8ecdc4af" CreationDate="2022-12-21T07:10:31.533" UserId="251" Text="You could add `#[pallet::unbounded]` to your `#[pallet::storage]` items.&#xD;&#xA;&#xD;&#xA;And get rid of `MaxEncodedLen`.&#xD;&#xA;&#xD;&#xA;!!ONLY IF IT IS NECESSARY TO BE UNBOUNDED!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="24656" PostHistoryTypeId="5" PostId="6431" RevisionGUID="cd1fb2b9-0094-4819-ad53-5ea0dab51ead" CreationDate="2022-12-21T07:10:49.583" UserId="251" Comment="added 2 characters in body" Text="I have a struct definition as follows&#xD;&#xA;```rs&#xD;&#xA;#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct Songs {&#xD;&#xA;	pub name: Vec&lt;u8&gt;,&#xD;&#xA;	pub cast: Vec&lt;u8&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This gives me the error when compiling&#xD;&#xA;```rs&#xD;&#xA;26 |     pub name: Vec&lt;u8&gt;,&#xD;&#xA;   |                  ^^^^^^^ function or associated item not found in `std::vec::Vec&lt;u8&gt;`&#xD;&#xA;&#xD;&#xA;27 |     pub cast: Vec&lt;u8&gt;,&#xD;&#xA;   |                          ^^^^^^^ function or associated item not found in `std::vec::Vec&lt;u8&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to resolve this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24657" PostHistoryTypeId="2" PostId="6434" RevisionGUID="e3975709-bd69-4828-9320-52dafebc010c" CreationDate="2022-12-21T08:37:12.047" UserId="3631" Text="&gt; Is it possible to add multiple rpcs to select from currently per chain?&#xD;&#xA; &#xD;&#xA;Yes, you can use `rpc_endpoints` setting to specify a list of urls.&#xD;&#xA;&#xD;&#xA;&gt; For owner is that the name of the developer team? For repo is that the teams github repo name?&#xD;&#xA;&#xD;&#xA;Correct." ContentLicense="CC BY-SA 4.0" />
  <row Id="24659" PostHistoryTypeId="50" PostId="6000" RevisionGUID="a19860ee-7622-4186-9c48-0ce97ac2474a" CreationDate="2022-12-21T09:04:40.573" UserId="-1" />
  <row Id="24660" PostHistoryTypeId="2" PostId="6435" RevisionGUID="b9e89278-fdf8-4a4e-859e-a4db115b4f31" CreationDate="2022-12-21T09:18:13.560" UserId="445" Text="I have a toy example : My keypair is `ed25519`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const seed = [&#xD;&#xA;   40, 246, 184,  64,  69, 145, 132, 131,&#xD;&#xA;  231,  66, 112, 159, 162,  36,  79, 197,&#xD;&#xA;   62,  54, 222, 103, 122, 190,   7, 143,&#xD;&#xA;   94, 190, 180,  76,  87, 182, 115, 236&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`seed` is `Uint8Array(32)` type &#xD;&#xA;&#xD;&#xA;How I convert `seed` into `private key` in `Substrate` with `polkadotjs` api" ContentLicense="CC BY-SA 4.0" />
  <row Id="24662" PostHistoryTypeId="1" PostId="6435" RevisionGUID="b9e89278-fdf8-4a4e-859e-a4db115b4f31" CreationDate="2022-12-21T09:18:13.560" UserId="445" Text="How i convert Raw seed to Private Key in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="24663" PostHistoryTypeId="3" PostId="6435" RevisionGUID="b9e89278-fdf8-4a4e-859e-a4db115b4f31" CreationDate="2022-12-21T09:18:13.560" UserId="445" Text="|polkadot-js|keyring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24665" PostHistoryTypeId="2" PostId="6436" RevisionGUID="1b3c4ad6-7aab-4829-b4d4-ed5def18bee0" CreationDate="2022-12-21T10:18:45.617" UserId="2762" Text="I am developing a pallet, that has a prize pot and has to distribute it with different accounts that has won. &#xD;&#xA;Kind of similar to the [Lottery pallet][1].&#xD;&#xA;&#xD;&#xA;My issue is with the [Existencial Deposit][2] is when transferring the pot.&#xD;&#xA;&#xD;&#xA;For example the pot has 10 UNITS, and has to distribute 9 UNITS to A and 1 to B. And the Existential Deposit is 2 UNITS. &#xD;&#xA;&#xD;&#xA;To do the transfer from the pallet Account I have to options: &#xD;&#xA;&#xD;&#xA;-Using the option ***KeepAlive*** which fails if the transfer will make the balance go below the Existential Deposit:&#xD;&#xA;&#xD;&#xA;    T::Currency::transfer(&#xD;&#xA;                    &amp;T::account_id(),&#xD;&#xA;                    &amp;winner,&#xD;&#xA;                    amount_won,&#xD;&#xA;                    KeepAlive,&#xD;&#xA;                )?;&#xD;&#xA;&#xD;&#xA;In that scenario, if is trying to send the funds to player A first (9 UNITS) it will already fail.&#xD;&#xA;&#xD;&#xA;-Or use ***AllowDeath*** which send the funds anyway the balance goes below the Existential Deposit.&#xD;&#xA;&#xD;&#xA;    T::Currency::transfer(&#xD;&#xA;                    &amp;T::account_id(),&#xD;&#xA;                    &amp;winner,&#xD;&#xA;                    amount_won,&#xD;&#xA;                    AllowDeath,&#xD;&#xA;                )?;&#xD;&#xA;&#xD;&#xA;In that scenario, if is trying to send the fund to player A first (9 UNITS) it will success but the account will be reaped and the second will fail.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What is the best strategy here? &#xD;&#xA;&#xD;&#xA;Have some business logic to send first to the account with less funds? In the example above will be sending with the flag AllowDeath first to the player B (1 UNIT) and then to the player A (9 UNITS)?&#xD;&#xA;&#xD;&#xA;Or It makes sense to fund the pallet in the genesis with the minimum Existential Deposit? or have an extrinsic to fund it?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/lottery&#xD;&#xA;  [2]: https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit-" ContentLicense="CC BY-SA 4.0" />
  <row Id="24667" PostHistoryTypeId="1" PostId="6436" RevisionGUID="1b3c4ad6-7aab-4829-b4d4-ed5def18bee0" CreationDate="2022-12-21T10:18:45.617" UserId="2762" Text="Fund a pallet AccountID" ContentLicense="CC BY-SA 4.0" />
  <row Id="24668" PostHistoryTypeId="3" PostId="6436" RevisionGUID="1b3c4ad6-7aab-4829-b4d4-ed5def18bee0" CreationDate="2022-12-21T10:18:45.617" UserId="2762" Text="|pallet|transfer|existential-deposit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24669" PostHistoryTypeId="2" PostId="6437" RevisionGUID="e8e44cdf-d891-44be-bd98-f4da45344cc8" CreationDate="2022-12-21T10:19:52.277" UserId="3623" Text="How can we  encode the accountID  **'5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y'** &#xD;&#xA; to Hex string using golang for posting in RPC.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24671" PostHistoryTypeId="1" PostId="6437" RevisionGUID="e8e44cdf-d891-44be-bd98-f4da45344cc8" CreationDate="2022-12-21T10:19:52.277" UserId="3623" Text="How to encode and decode HexAccountSting to AccountID in golang" ContentLicense="CC BY-SA 4.0" />
  <row Id="24672" PostHistoryTypeId="3" PostId="6437" RevisionGUID="e8e44cdf-d891-44be-bd98-f4da45344cc8" CreationDate="2022-12-21T10:19:52.277" UserId="3623" Text="|golang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24673" PostHistoryTypeId="5" PostId="6436" RevisionGUID="e0aeb55c-31fa-4974-8bf7-5544c96c3017" CreationDate="2022-12-21T10:42:55.193" UserId="2673" Comment="Rust syntax highlighting, spelling" Text="I am developing a pallet, that has a prize pot and has to distribute it with different accounts that has won. &#xD;&#xA;Kind of similar to the [Lottery pallet][1].&#xD;&#xA;&#xD;&#xA;My issue is with the [Existential Deposit][2] is when transferring the pot.&#xD;&#xA;&#xD;&#xA;For example the pot has 10 UNITS, and has to distribute 9 UNITS to A and 1 to B. And the Existential Deposit is 2 UNITS. &#xD;&#xA;&#xD;&#xA;To do the transfer from the pallet Account I have to options: &#xD;&#xA;&#xD;&#xA;-Using the option ***KeepAlive*** which fails if the transfer will make the balance go below the Existential Deposit:&#xD;&#xA;```rust&#xD;&#xA;T::Currency::transfer(&#xD;&#xA;    &amp;T::account_id(),&#xD;&#xA;    &amp;winner,&#xD;&#xA;    amount_won,&#xD;&#xA;    KeepAlive,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In that scenario, if is trying to send the funds to player A first (9 UNITS) it will already fail.&#xD;&#xA;&#xD;&#xA;-Or use ***AllowDeath*** which send the funds anyway the balance goes below the Existential Deposit.&#xD;&#xA;```rust&#xD;&#xA;T::Currency::transfer(&#xD;&#xA;    &amp;T::account_id(),&#xD;&#xA;    &amp;winner,&#xD;&#xA;    amount_won,&#xD;&#xA;    AllowDeath,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;In that scenario, if is trying to send the fund to player A first (9 UNITS) it will success but the account will be reaped and the second will fail.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What is the best strategy here? &#xD;&#xA;&#xD;&#xA;Have some business logic to send first to the account with less funds? In the example above will be sending with the flag AllowDeath first to the player B (1 UNIT) and then to the player A (9 UNITS)?&#xD;&#xA;&#xD;&#xA;Or It makes sense to fund the pallet in the genesis with the minimum Existential Deposit? or have an extrinsic to fund it?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/lottery&#xD;&#xA;  [2]: https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit-" ContentLicense="CC BY-SA 4.0" />
  <row Id="24674" PostHistoryTypeId="24" PostId="6436" RevisionGUID="e0aeb55c-31fa-4974-8bf7-5544c96c3017" CreationDate="2022-12-21T10:42:55.193" Comment="Proposed by 2673 approved by 2762 edit id of 361" ContentLicense="CC BY-SA 4.0" />
  <row Id="24681" PostHistoryTypeId="2" PostId="6439" RevisionGUID="7f085e6d-6ce9-4ff8-a4f3-298e459ac56b" CreationDate="2022-12-21T11:02:59.430" UserId="2762" Text="You can get the Keypair and with it you can obtain the Public Key, the Address and sign transactions.&#xD;&#xA;&#xD;&#xA;But the keyring does not expose the private key. It manages all signing operations on your behalf.&#xD;&#xA;&#xD;&#xA;A code example to do that from your seed:&#xD;&#xA;&#xD;&#xA;    const keyring = new Keyring({ type: 'ed25519' })&#xD;&#xA;    const seed = [&#xD;&#xA;        40, 246, 184,  64,  69, 145, 132, 131,&#xD;&#xA;       231,  66, 112, 159, 162,  36,  79, 197,&#xD;&#xA;        62,  54, 222, 103, 122, 190,   7, 143,&#xD;&#xA;        94, 190, 180,  76,  87, 182, 115, 236&#xD;&#xA;     ]&#xD;&#xA;    // add the account, encrypting it, override to ed25519&#xD;&#xA;    const keys = keyring.addFromSeed(Uint8Array.from(seed), { name: 'hex seed acc' },'ed25519');&#xD;&#xA;    console.log(keys.publicKey);&#xD;&#xA;    console.log(keys.address);&#xD;&#xA;    const signature = keys.sign(&quot;message&quot;);&#xD;&#xA;    console.log(signature);" ContentLicense="CC BY-SA 4.0" />
  <row Id="24683" PostHistoryTypeId="2" PostId="6440" RevisionGUID="10da2d0a-df93-47ba-b329-515d18262be9" CreationDate="2022-12-21T11:16:46.273" UserId="496" Text="The network Im trying to deploy the contract to is not supporting ```INK! 4.0 beta``` yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="24685" PostHistoryTypeId="2" PostId="6441" RevisionGUID="2030f5d1-657e-4b70-a777-00d9dc5111ca" CreationDate="2022-12-21T11:38:36.547" UserId="2372" Text="We have successfully created the HRMP channel between two parachains and a relay chain.We want to transfer assets from one parachain(p1) to another parachain(P2), the channel is created from P1 to P2 (P1 ---&gt; P2). For now we have observed that the assets are been transferred from sovereign account of P1 to sovereign account of P2, but what I want is the assets transfer between two parachains rather than two sovereign accounts.&#xD;&#xA;&#xD;&#xA;The tutorial that I have followed [Tranfer Assets with XCM tranfers][1],&#xD;&#xA;so how to achieve the message transfer between two parachains?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/transfer-assets-with-xcm/" ContentLicense="CC BY-SA 4.0" />
  <row Id="24687" PostHistoryTypeId="1" PostId="6441" RevisionGUID="2030f5d1-657e-4b70-a777-00d9dc5111ca" CreationDate="2022-12-21T11:38:36.547" UserId="2372" Text="Transfer Assets with XCM" ContentLicense="CC BY-SA 4.0" />
  <row Id="24688" PostHistoryTypeId="3" PostId="6441" RevisionGUID="2030f5d1-657e-4b70-a777-00d9dc5111ca" CreationDate="2022-12-21T11:38:36.547" UserId="2372" Text="|parachain|xcm|relay-chain|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24689" PostHistoryTypeId="2" PostId="6442" RevisionGUID="a1b258f0-e65d-4206-86c7-c8aa960f3cf7" CreationDate="2022-12-21T12:30:42.287" UserId="380" Text="The [previous answer](https://substrate.stackexchange.com/questions/3456/can-you-query-the-state-of-a-contract-at-a-given-block-number) is now incorrect due to the [deprecation of the RPCs](https://github.com/paritytech/substrate/pull/12358).&#xD;&#xA;&#xD;&#xA;How do we query the historic contract state now?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24691" PostHistoryTypeId="1" PostId="6442" RevisionGUID="a1b258f0-e65d-4206-86c7-c8aa960f3cf7" CreationDate="2022-12-21T12:30:42.287" UserId="380" Text="How do I query the state of a contract at a given block number given the deprecation of contracts_getStorage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24692" PostHistoryTypeId="3" PostId="6442" RevisionGUID="a1b258f0-e65d-4206-86c7-c8aa960f3cf7" CreationDate="2022-12-21T12:30:42.287" UserId="380" Text="|rpc|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24693" PostHistoryTypeId="2" PostId="6443" RevisionGUID="7d6cf181-afd9-4df5-8806-6f7ff4c23eba" CreationDate="2022-12-21T12:50:16.297" UserId="380" Text="Disable Brave Shields and the error will stop.&#xD;&#xA;&#xD;&#xA;&gt; Is there anything in the polkadotjs app changed recently which could cause this?&#xD;&#xA;&#xD;&#xA;Sorry, don't know the answer to this." ContentLicense="CC BY-SA 4.0" />
  <row Id="24695" PostHistoryTypeId="50" PostId="3877" RevisionGUID="e93d0fe4-0b7b-4be7-aee2-7899231228ee" CreationDate="2022-12-21T13:04:25.467" UserId="-1" />
  <row Id="24696" PostHistoryTypeId="52" PostId="6429" RevisionGUID="d7384bc7-c5cd-4f2e-ad29-d1a4e8e419fb" CreationDate="2022-12-21T13:39:41.903" />
  <row Id="24697" PostHistoryTypeId="5" PostId="6442" RevisionGUID="9526bbad-610d-48bf-a104-bf0b334e7812" CreationDate="2022-12-21T14:55:05.923" UserId="380" Comment="added 762 characters in body" Text="The [previous answer](https://substrate.stackexchange.com/questions/3456/can-you-query-the-state-of-a-contract-at-a-given-block-number) is now incorrect due to the [deprecation of the RPCs](https://github.com/paritytech/substrate/pull/12358).&#xD;&#xA;&#xD;&#xA;How do we query the historic contract state now?&#xD;&#xA;&#xD;&#xA;In the PR comment it states:&#xD;&#xA;&#xD;&#xA;&gt; The high level contracts API in polkadot.js already uses state_call so upgrading to the latest version here is enough. If you are using api.rpc.contracts directly you need to switch to api.call.contractsApi.&#xD;&#xA;&#xD;&#xA;However, switching to `api.rx.call.contractsApi.call` does not give an option to pass `at`. There is the option to create an instance of the api at a specific block but there is no explanation of how to query contracts using this.&#xD;&#xA;&#xD;&#xA;The following does not work as the returned type of `at` (`ApiDecoration&lt;&quot;promise&quot;&gt;`) is not equivalent to `ApiPromise`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        if (atBlock) {&#xD;&#xA;            const atApi = atBlock ? await api.at(atBlock) : api&#xD;&#xA;            contract = new ContractPromise(atApi, abi, contractAddress)&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24700" PostHistoryTypeId="5" PostId="6392" RevisionGUID="0a5571e9-31ff-4267-b9bf-2fedd20b0778" CreationDate="2022-12-21T16:49:31.237" UserId="19" Comment="Improved quality of text in the question." Text="Trying to compile smart contract and it gives me this error, in charge .toml I put the direct routes and nothing. Other smart contracts compile with ink! properly.&#xD;&#xA;&#xD;&#xA;Command I use: `cargo +nightly contract build --release` and error I got:&#xD;&#xA;&#xD;&#xA;    ERROR: Loading Cargo.toml&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;         No such file or directory (os error 2)" ContentLicense="CC BY-SA 4.0" />
  <row Id="24701" PostHistoryTypeId="24" PostId="6392" RevisionGUID="0a5571e9-31ff-4267-b9bf-2fedd20b0778" CreationDate="2022-12-21T16:49:31.237" Comment="Proposed by 19 approved by 2762, 34 edit id of 360" ContentLicense="CC BY-SA 4.0" />
  <row Id="24702" PostHistoryTypeId="2" PostId="6444" RevisionGUID="d88dd424-5d41-4cc4-b899-6f9a743da46b" CreationDate="2022-12-21T18:08:45.040" UserId="6" Text="I am running through https://docs.substrate.io/tutorials/smart-contracts/prepare-your-first-contract/#deploy-the-contract and hitting an issue when deploying the flipper ink! contract with this log message from the node:&#xD;&#xA;&#xD;&#xA;`DEBUG tokio-runtime-worker runtime::contracts: sign extension operations support is not enabled (at offset 0x1efd)`&#xD;&#xA;&#xD;&#xA;I am using the following:   &#xD;&#xA;&#xD;&#xA;`substrate-contracts-node version 0.23.0-87a3d76c880`&#xD;&#xA;&#xD;&#xA;`cargo-contract 1.5.1-unknown-aarch64-apple-darwin`&#xD;&#xA;&#xD;&#xA;I generated the contract with:&#xD;&#xA;`cargo contract new flipper`&#xD;&#xA;&#xD;&#xA;and the contract WASM with: &#xD;&#xA;`cargo +nightly contract build`&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24704" PostHistoryTypeId="1" PostId="6444" RevisionGUID="d88dd424-5d41-4cc4-b899-6f9a743da46b" CreationDate="2022-12-21T18:08:45.040" UserId="6" Text="Sign extension operations support is not enabled" ContentLicense="CC BY-SA 4.0" />
  <row Id="24705" PostHistoryTypeId="3" PostId="6444" RevisionGUID="d88dd424-5d41-4cc4-b899-6f9a743da46b" CreationDate="2022-12-21T18:08:45.040" UserId="6" Text="|ink|flipper|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24711" PostHistoryTypeId="2" PostId="6446" RevisionGUID="7a1a9c5f-6584-44f5-b802-653d30163a82" CreationDate="2022-12-21T21:31:36.397" UserId="3629" Text="I'm using this code sample from [here][1] to extract my public key from my Dot address. I just want to verify that this is in fact converting my address to the public key.&#xD;&#xA;&#xD;&#xA;    const { decodeAddress } = require('@polkadot/util-crypto');&#xD;&#xA;    const { u8aToHex } = require('@polkadot/util');&#xD;&#xA;    const publicKey = decodeAddress('5DSaSznmKRjt9Lvg4478V54UU8kdNyZKSQM8brSiczFR1S1H');&#xD;&#xA;    const hexPublicKey = u8aToHex(publicKey);&#xD;&#xA;    console.log(hexPublicKey);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/a/69016885/2028236" ContentLicense="CC BY-SA 4.0" />
  <row Id="24713" PostHistoryTypeId="1" PostId="6446" RevisionGUID="7a1a9c5f-6584-44f5-b802-653d30163a82" CreationDate="2022-12-21T21:31:36.397" UserId="3629" Text="Verifying that this extracts the public key from my address, and not the private key" ContentLicense="CC BY-SA 4.0" />
  <row Id="24714" PostHistoryTypeId="3" PostId="6446" RevisionGUID="7a1a9c5f-6584-44f5-b802-653d30163a82" CreationDate="2022-12-21T21:31:36.397" UserId="3629" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24715" PostHistoryTypeId="2" PostId="6447" RevisionGUID="40d54492-1428-4e6d-9f80-f143c8eba32b" CreationDate="2022-12-21T21:33:33.740" UserId="6" Text="Looks like adding `--optimization-passes=0` sorted this out when building the contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="24717" PostHistoryTypeId="2" PostId="6448" RevisionGUID="f6cf1435-27f3-47f6-ad09-34cb9749ead2" CreationDate="2022-12-21T21:42:02.733" UserId="2635" Text="We are maintaining a blockchain based on substrate node tag v3.0.0. Now we upgraded to substrate branch polkadot-v0.9.27. (We need to upgrade to support native smart contracts with Ink! with the last tools versions).&#xD;&#xA;&#xD;&#xA;The forkless upgrade fails, because the new RuntimeVersion structure seems to be different. The error we are getting is: system.FailedToExtractRuntimeVersion.&#xD;&#xA;&#xD;&#xA;Any advice if it is possible to upgrade (node &amp; runtime) with this changes, or there are another way of starting up a new version and migrating old chain data to the new version?&#xD;&#xA;&#xD;&#xA;Thanks very much.&#xD;&#xA;&#xD;&#xA;For reference, original version is based on: https://github.com/paritytech/substrate/tree/v3.0.0&#xD;&#xA;&#xD;&#xA;and the new version: https://github.com/paritytech/substrate/tree/polkadot-v0.9.27  " ContentLicense="CC BY-SA 4.0" />
  <row Id="24719" PostHistoryTypeId="1" PostId="6448" RevisionGUID="f6cf1435-27f3-47f6-ad09-34cb9749ead2" CreationDate="2022-12-21T21:42:02.733" UserId="2635" Text="Upgrade from substrate node tag v3.0.0 to last version" ContentLicense="CC BY-SA 4.0" />
  <row Id="24720" PostHistoryTypeId="3" PostId="6448" RevisionGUID="f6cf1435-27f3-47f6-ad09-34cb9749ead2" CreationDate="2022-12-21T21:42:02.733" UserId="2635" Text="|substrate-node-template|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24721" PostHistoryTypeId="2" PostId="6449" RevisionGUID="277f0721-5ee6-433f-be9c-4a136fd000cd" CreationDate="2022-12-22T00:44:49.180" UserId="19" Text="I have exactly the same error while building Substrate. The issue is not in Substrate, but `rust-rocksdb`.&#xD;&#xA;&#xD;&#xA;More: https://github.com/rust-rocksdb/rust-rocksdb/issues/713" ContentLicense="CC BY-SA 4.0" />
  <row Id="24723" PostHistoryTypeId="2" PostId="6450" RevisionGUID="ae7d813c-c552-4148-a623-5f50bf97921c" CreationDate="2022-12-22T01:55:04.303" UserId="2060" Text="We can successfully upgrade both locally running and Rococo parachains with Sudo, but when I try upgrading a local parachain using the referenda system, it fails. I am submitting these extrinsics as Council external proposals. The `authorizeUpgrade` is successful, however, `enactAuthorizedUpgrade` fails with parachainSystem.ValidationDataNotAvailable. &#xD;&#xA;&#xD;&#xA;I am seeing events `democracy.PreimageUsed`, followed by:&#xD;&#xA;```&#xD;&#xA;democracy.Executed&#xD;&#xA;  refIndex: u32&#xD;&#xA;    6&#xD;&#xA;  result: Result&lt;Null, SpRuntimeDispatchError&gt;&#xD;&#xA;    Err: DispatchError&#xD;&#xA;    {&#xD;&#xA;      Module: {&#xD;&#xA;        index: 1&#xD;&#xA;        error: 0x03000000&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  type&#xD;&#xA;    parachainSystem.ValidationDataNotAvailable&#xD;&#xA;```&#xD;&#xA;followed by:&#xD;&#xA;```&#xD;&#xA;scheduler.Dispatched&#xD;&#xA;    Dispatched some task. &#xD;&#xA;    task: (u32, u32)&#xD;&#xA;      u32&#xD;&#xA;        284&#xD;&#xA;      u32&#xD;&#xA;        0&#xD;&#xA;    id: Option&lt;Bytes&gt;&#xD;&#xA;      0x64656d6f6372616306000000&#xD;&#xA;    result: Result&lt;Null, SpRuntimeDispatchError&gt;&#xD;&#xA;      Ok&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I look through the code it's not obvious how and where the validation data gets stored or is expected to be stored. When it's done via Sudo, I see events for `parachainSystem.ValidationFunctionStored` and `parachainSystem.ValidationFunctionApplied` that I never see during the referendum process. Why would this be different?&#xD;&#xA;&#xD;&#xA;We're running substrate version 0.9.29 right now. I'm not sure what other information I should post, since the actual Democracy part itself is working fine. Our Democracy and Collectives configurations are nearly the same as defaults for Polkadot so we're not doing anything special. There are no runtime configurations for the cumulus dependencies. Please let me know what else is needed to help, and I'll update this question." ContentLicense="CC BY-SA 4.0" />
  <row Id="24725" PostHistoryTypeId="1" PostId="6450" RevisionGUID="ae7d813c-c552-4148-a623-5f50bf97921c" CreationDate="2022-12-22T01:55:04.303" UserId="2060" Text="Runtime upgrades: parachainSystem.enactAuthorizedUpgrade via referendum fails with `parachainSystem.ValidationDataNotAvailable`" ContentLicense="CC BY-SA 4.0" />
  <row Id="24726" PostHistoryTypeId="3" PostId="6450" RevisionGUID="ae7d813c-c552-4148-a623-5f50bf97921c" CreationDate="2022-12-22T01:55:04.303" UserId="2060" Text="|runtime-upgrade|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24727" PostHistoryTypeId="2" PostId="6451" RevisionGUID="9226c900-0464-41ea-bb14-7aaf0062e5d0" CreationDate="2022-12-22T01:58:54.810" UserId="3635" Text="1. `chain-spec.rs` &#xD;&#xA;In [Open Message Passing Channels](https://docs.substrate.io/tutorials/connect-relay-and-parachains/open-message-passing-channels/) guide, use the [parachain-template.js](https://docs.substrate.io/assets/tutorials/relay-chain-specs/parachain-template-1001.rs/) parachain_id of 1000, 1001 respectively.&#xD;&#xA;&#xD;&#xA;2. Add sudo pallet to `runtime/lib.js`.&#xD;&#xA;```&#xD;&#xA;impl pallet_sudo::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;construct_time!(&#xD;&#xA;....&#xD;&#xA;// Sudo: pallet_sudo, // or next line does not success open channel&#xD;&#xA;Sudo: pallet_sudo::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},&#xD;&#xA;....&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Use `cargo build -release` for `node/src/chain-spec.rs` with parachian_id = 1000 and 1001 respectively.&#xD;&#xA;&#xD;&#xA;4. Start a test network with zombienet, where config.toml is configured according to the [Simulate Parachains documentation](https://docs.substrate.io/test/simulate-parachains/).&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;polkadot-v0.9.32&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  ws_port = 9900&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  ws_port = 9901&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  ws_port = 9902&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;dave&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  ws_port = 9903&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-A-1000-collator01&quot;&#xD;&#xA;  command = &quot;parachain-A-template-node-v0.9.32&quot;&#xD;&#xA;  ws_port = 9910&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1001&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-B-1001-collator01&quot;&#xD;&#xA;  command = &quot;parachain-B-template-node-v0.9.32&quot;&#xD;&#xA;  ws_port = 9920&#xD;&#xA;&#xD;&#xA;[[hrmpChannels]]&#xD;&#xA;sender = 1000&#xD;&#xA;recipient = 1001&#xD;&#xA;maxCapacity = 8&#xD;&#xA;maxMessageSize = 8000&#xD;&#xA;&#xD;&#xA;[[hrmpChannels]]&#xD;&#xA;sender = 1001&#xD;&#xA;recipient = 1000&#xD;&#xA;maxCapacity = 8&#xD;&#xA;maxMessageSize = 8000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;5. The question arises.&#xD;&#xA;When I follow the documentation step by step, there is no `hrmp.OpenChannelRequested` event in the recent time of the relay chain when the transaction is submitted, and `ump.ExecutedUpward` shows incomplete.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/tO09r.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/J2dh1.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/4d4MV.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/ROv8o.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="24729" PostHistoryTypeId="1" PostId="6451" RevisionGUID="9226c900-0464-41ea-bb14-7aaf0062e5d0" CreationDate="2022-12-22T01:58:54.810" UserId="3635" Text="Unable to open messaging channel in Substrate Tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="24730" PostHistoryTypeId="3" PostId="6451" RevisionGUID="9226c900-0464-41ea-bb14-7aaf0062e5d0" CreationDate="2022-12-22T01:58:54.810" UserId="3635" Text="|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24731" PostHistoryTypeId="6" PostId="6437" RevisionGUID="74de8ddb-5e22-4fda-bcde-f6ca3fe8ae95" CreationDate="2022-12-22T02:21:32.683" UserId="251" Comment="edited tags" Text="|golang|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24732" PostHistoryTypeId="2" PostId="6452" RevisionGUID="20158368-6b8a-4cb3-a6e7-ea7978cc5b5f" CreationDate="2022-12-22T02:25:38.483" UserId="251" Text="Why do you want to keep it alive?&#xD;&#xA;&#xD;&#xA;If it is unnecessary, why just let it die?&#xD;&#xA;&#xD;&#xA;Usually, I follow the Substrate's spec.&#xD;&#xA;&#xD;&#xA;Bounty account example: https://github.com/paritytech/substrate/blob/ee316317b85b2f65fc022b27bbfefcd42b6560ae/frame/bounties/src/lib.rs#L645" ContentLicense="CC BY-SA 4.0" />
  <row Id="24734" PostHistoryTypeId="5" PostId="6443" RevisionGUID="29399158-19f5-43fe-b421-5e6b6c8650ca" CreationDate="2022-12-22T03:21:54.217" UserId="116" Comment="Adding a screenshot of this problem solved!" Text="Disable Brave Shields or stop blocking trackers and adds for polkadot.js and the error will stop.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dBqj5.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24735" PostHistoryTypeId="24" PostId="6443" RevisionGUID="29399158-19f5-43fe-b421-5e6b6c8650ca" CreationDate="2022-12-22T03:21:54.217" Comment="Proposed by 116 approved by 34 edit id of 362" ContentLicense="CC BY-SA 4.0" />
  <row Id="24736" PostHistoryTypeId="2" PostId="6453" RevisionGUID="f81bcab3-f0df-4ab1-8316-e86d3bfb0541" CreationDate="2022-12-22T05:04:53.597" UserId="354" Text="Method 1: You can just do the runtime upgrade and just change the `old binary` with `new one` using the same `customSpecRaw.json`, you need to do the changes in the new version.&#xD;&#xA;&#xD;&#xA;Method 2: Run the new version and do the storage migration for this you can refer [https://substrate.stackexchange.com/questions/2202/how-to-selectively-populate-state-from-a-snapshot-of-one-chain-onto-another][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2202/how-to-selectively-populate-state-from-a-snapshot-of-one-chain-onto-another" ContentLicense="CC BY-SA 4.0" />
  <row Id="24739" PostHistoryTypeId="2" PostId="6454" RevisionGUID="e87cd614-969a-4275-bbf1-31b09ad5c818" CreationDate="2022-12-22T07:36:58.970" UserId="3636" Text="I try to use barebones-x509 which is no_std friendly to parse x509 certificate. But encounter the mistake. Will you have some advice?&#xD;&#xA;```code&#xD;&#xA;error: duplicate lang item in crate `std` (which `barebones_x509` depends on): `panic_impl`.                                                                                          &#xD;&#xA;  |&#xD;&#xA;  = note: the lang item is first defined in crate `ink_env` (which `blbc` depends on)&#xD;&#xA;  = note: first definition in `ink_env` loaded from \\?\F:\CLIONproject\github\blbc\target\ink\wasm32-unknown-unknown\release\deps\libink_env-08ee0ee200503572.rlib, \\?\F:\CLIONproject\github\blbc\target\ink\wasm32-unknown-unknown\release\deps\libink_env-08ee0ee200503572.rmeta&#xD;&#xA;  = note: second definition in `std` loaded from \\?\F:\CLIONproject\github\blbc\target\ink\wasm32-unknown-unknown\release\deps\libstd-5c2faf671e59e752.rlib, \\?\F:\CLIONproject\github\blbc\target\ink\wasm32-unknown-unknown\release\deps\libstd-5c2faf671e59e752.rmeta&#xD;&#xA;&#xD;&#xA;error: duplicate lang item in crate `std` (which `barebones_x509` depends on): `oom`.&#xD;&#xA;  |&#xD;&#xA;  = note: the lang item is first defined in crate `ink_allocator` (which `ink_env` depends on)&#xD;&#xA;  = note: first definition in `ink_allocator` loaded from \\?\F:\CLIONproject\github\blbc\target\ink\wasm32-unknown-unknown\release\deps\libink_allocator-3d57f925da559e39.rlib, \\?\F:\CLIONproject\github\blbc\target\ink\wasm32-unknown-unknown\release\deps\libink_allocator-3d57f925da559e39.rmeta&#xD;&#xA;  = note: second definition in `std` loaded from \\?\F:\CLIONproject\github\blbc\target\ink\wasm32-unknown-unknown\release\deps\libstd-5c2faf671e59e752.rlib, \\?\F:\CLIONproject\github\blbc\target\ink\wasm32-unknown-unknown\release\deps\libstd-5c2faf671e59e752.rmeta&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24741" PostHistoryTypeId="1" PostId="6454" RevisionGUID="e87cd614-969a-4275-bbf1-31b09ad5c818" CreationDate="2022-12-22T07:36:58.970" UserId="3636" Text="fail to use a no_std friendly dependence in smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="24742" PostHistoryTypeId="3" PostId="6454" RevisionGUID="e87cd614-969a-4275-bbf1-31b09ad5c818" CreationDate="2022-12-22T07:36:58.970" UserId="3636" Text="|ink|substrate-contracts-node|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24743" PostHistoryTypeId="2" PostId="6455" RevisionGUID="c8bd4738-9537-47f9-aa06-3d9a60e81162" CreationDate="2022-12-22T07:54:00.440" UserId="73" Text="First, let's solve your problem. You don't need to call `enactAuthorizedUpgrade` from root. This call is actually callable by anyone, including unsigned transactions (if setup correctly). Only `authorizeUpgrade` is the function that requires root, as it sets up the expected hash and allows the upgrade. So, you only need to put `authorizeUpgrade` in your democracy proposal and after this is enacted, you call `enactAuthorizedUpgrade` from any account.&#xD;&#xA;&#xD;&#xA;&gt; When I look through the code it's not obvious how and where the validation data gets stored or is expected to be stored. &#xD;&#xA;&#xD;&#xA;The validation data is stored with the `set_validation_data` inherent. As the scheduler (that enacts the proposal) is running in `on_initialize`, it executes the proposal before the inherents are applied. Inherents are the first extrinsics being applied to the block and represent external data that the runtime can not access, like the timestamp or this validation data.&#xD;&#xA;&#xD;&#xA;&quot;Funnily&quot; I left exactly one year before a comment about this [on github][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/issues/474#issuecomment-999531437" ContentLicense="CC BY-SA 4.0" />
  <row Id="24745" PostHistoryTypeId="2" PostId="6456" RevisionGUID="b8e253d9-724c-44b5-bfa9-a3ab11013d0f" CreationDate="2022-12-22T08:09:02.133" UserId="73" Text="&gt; Is it correct to substitute the WASM for the last finalized block or should I pick an earlier one or the next one to be finalized?&#xD;&#xA;&#xD;&#xA;Using the last finalized block is correct. You could not take a block that is before the last finalized block, because otherwise the node would reject to import blocks that are before/on the same height as the last finalized block.&#xD;&#xA;&#xD;&#xA;&gt; I did not bump the spec version for the WASM used in codeSubstitutes due to this comment. Is this truly correct or does it not matter at all?&#xD;&#xA;&#xD;&#xA;Yes this is also correct.&#xD;&#xA;&#xD;&#xA;Now to your problem ;)&#xD;&#xA;&#xD;&#xA;&gt; `Block import error: State Database error: Too many sibling blocks inserted`&#xD;&#xA;&#xD;&#xA;This here being your actual problem. The collator had build to many blocks on the same height (more than 32), making it fail to import its newly build block. So, it could still build the block, but not import it. When it then tried to collect the collation information from this block, it failed to find the block (as it failed to be imported). &#xD;&#xA;&#xD;&#xA;In the future this &quot;too many siblings blocks&quot; error should not happen anymore, as we [implemented a way to prevent this from happening][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/commit/73837c384eeda0b811ed63f8db324fcc2407f419" ContentLicense="CC BY-SA 4.0" />
  <row Id="24747" PostHistoryTypeId="2" PostId="6457" RevisionGUID="335e3064-c930-41ef-856c-01e2d07502ff" CreationDate="2022-12-22T08:36:01.133" UserId="3438" Text="When we query the system.account storage function we get back a list of accounts, are proxy accounts part of this list and if yes, is there a way to identify them?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24749" PostHistoryTypeId="1" PostId="6457" RevisionGUID="335e3064-c930-41ef-856c-01e2d07502ff" CreationDate="2022-12-22T08:36:01.133" UserId="3438" Text="Are proxy accounts part of the accounts in storage and how to identify them" ContentLicense="CC BY-SA 4.0" />
  <row Id="24750" PostHistoryTypeId="3" PostId="6457" RevisionGUID="335e3064-c930-41ef-856c-01e2d07502ff" CreationDate="2022-12-22T08:36:01.133" UserId="3438" Text="|account|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24751" PostHistoryTypeId="2" PostId="6458" RevisionGUID="48bfacd7-e142-4ac5-85f1-e92d1217620b" CreationDate="2022-12-22T09:22:02.770" UserId="2673" Text="I think you should use [go-subkey](https://pkg.go.dev/github.com/vedhavyas/go-subkey) for this purpose. I don't know Go very well, but I think the code to transform accountID into hex string would look like this.&#xD;&#xA;```go&#xD;&#xA;import (&#xD;&#xA;	&quot;github.com/vedhavyas/go-subkey/v2&quot;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;addr := &quot;5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y&quot;&#xD;&#xA;_, pubkeyBytes, err := subkey.SS58Decode(addr)&#xD;&#xA;// Handle err somehow&#xD;&#xA;hexString := subkey.EncodeHex(pubkeyBytes)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24757" PostHistoryTypeId="2" PostId="6460" RevisionGUID="5fae8995-d26a-4b2f-b0af-b9d0518a27a1" CreationDate="2022-12-22T09:50:27.970" UserId="251" Text="I'm using [cross](https://github.com/cross-rs/cross) to build my node.&#xD;&#xA;&#xD;&#xA;And I got this:&#xD;&#xA;```rs&#xD;&#xA;warning: Could not find `Cargo.lock` for `/root/code/darwinia-network/darwinia-2.0/runtime/pangolin/Cargo.toml`, while searching from `/target/x86_64-unknown-linux-gnu/release/build/pangolin-runtime-7d7c77d31581c197/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this? How to set the `WASM_BUILD_WORKSPACE_HINT` correctly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24759" PostHistoryTypeId="1" PostId="6460" RevisionGUID="5fae8995-d26a-4b2f-b0af-b9d0518a27a1" CreationDate="2022-12-22T09:50:27.970" UserId="251" Text="Could not find `Cargo.lock`" ContentLicense="CC BY-SA 4.0" />
  <row Id="24760" PostHistoryTypeId="3" PostId="6460" RevisionGUID="5fae8995-d26a-4b2f-b0af-b9d0518a27a1" CreationDate="2022-12-22T09:50:27.970" UserId="251" Text="|wasm|compile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24761" PostHistoryTypeId="2" PostId="6461" RevisionGUID="a6083efb-ec4e-4882-b6a8-226dc984cbec" CreationDate="2022-12-22T12:09:47.213" UserId="2759" Text="Having some issues in fabricating a realistic `StorageProof` in substrate benchmarks. I can't use `std` and most [examples](https://paritytech.github.io/cumulus/cumulus_test_relay_sproof_builder/struct.RelayStateSproofBuilder.html) are using `std` in tests via [sp_state_machine](https://paritytech.github.io/substrate/master/sp_state_machine/index.html).&#xD;&#xA;&#xD;&#xA;Currently, I've hard coded the `(root, proof)` by calling the `RelayStateSproofBuilder::default()` in a test and printing the raw bytes. Was wondering if there's a simpler way." ContentLicense="CC BY-SA 4.0" />
  <row Id="24763" PostHistoryTypeId="1" PostId="6461" RevisionGUID="a6083efb-ec4e-4882-b6a8-226dc984cbec" CreationDate="2022-12-22T12:09:47.213" UserId="2759" Text="Build StorageProof for Benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="24764" PostHistoryTypeId="3" PostId="6461" RevisionGUID="a6083efb-ec4e-4882-b6a8-226dc984cbec" CreationDate="2022-12-22T12:09:47.213" UserId="2759" Text="|storage|cumulus|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24765" PostHistoryTypeId="2" PostId="6462" RevisionGUID="8129ecd9-b838-4714-9991-9942ab261d79" CreationDate="2022-12-22T12:15:31.880" UserId="83" Text="an alternative to increasing RAM is to [increase swap space] using available hard disk space on Linux (https://linuxhint.com/increase-swap-space-linux/)&#xD;&#xA;&#xD;&#xA;check your free space with:&#xD;&#xA;```&#xD;&#xA;df -H&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;check swap space&#xD;&#xA;```&#xD;&#xA;free -h&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;show swap file and amount of swap available and being used:&#xD;&#xA;```&#xD;&#xA;sudo swapon --show&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;an example of increasing swap space by 10Gb would involve removing an existing swapfile (if any), adding 10Gb (10240) swap space, and creating the swapfile and turning on swap space, and then verifying that the swap space has increased&#xD;&#xA;```&#xD;&#xA;sudo swapoff /swap_file&#xD;&#xA;sudo rm /swap_file&#xD;&#xA;sudo dd if=/dev/zero of=/swap_file bs=10240 count=1M&#xD;&#xA;sudo chmod 600 /swap_file&#xD;&#xA;sudo mkswap /swap_file&#xD;&#xA;sudo swapon /swap_file&#xD;&#xA;free -h&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;then finally enable swap space usage at boot time by editing the /etc/fstab file (i.e. with Vim `sudo vim /etc/fstab`), then copy/paste the below (single line) to bottom of that file and save it&#xD;&#xA;```&#xD;&#xA;/swapfile       none            swap    defaults,discard                0 0&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24767" PostHistoryTypeId="5" PostId="6462" RevisionGUID="9e541ec4-6975-4c0a-8d66-f5b22ca3cce6" CreationDate="2022-12-22T12:25:34.743" UserId="83" Comment="extra info " Text="An alternative to increasing your RAM is to [increase your swap space](https://linuxhint.com/increase-swap-space-linux/) using available hard disk space on Linux, although swap space is slower than using RAM.&#xD;&#xA;I always do this when using a cloud provider, especially when in development environment since I find it cheaper to buy extra volumes of block storage for slower testing using swap space than to buy an instance with a faster CPU and RAM than I need.  &#xD;&#xA;&#xD;&#xA;Check your free hard disk space with:&#xD;&#xA;```bash&#xD;&#xA;df -H&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check your swap space with:&#xD;&#xA;```bash&#xD;&#xA;free -h&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Show the swap file and amount of swap available and being used:&#xD;&#xA;```bash&#xD;&#xA;sudo swapon --show&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;An example of increasing swap space by 10Gb would involve removing an existing swapfile (if any), adding for example 10Gb (10240) swap space (assuming you have at least that amount of free hard disk space), then creating the swapfile, turning on swap space, and finally verifying that the swap space has increased:&#xD;&#xA;```bash&#xD;&#xA;sudo swapoff /swap_file&#xD;&#xA;sudo rm /swap_file&#xD;&#xA;sudo dd if=/dev/zero of=/swap_file bs=10240 count=1M&#xD;&#xA;sudo chmod 600 /swap_file&#xD;&#xA;sudo mkswap /swap_file&#xD;&#xA;sudo swapon /swap_file&#xD;&#xA;free -h&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Lastly enable swap space usage at boot time by editing the /etc/fstab file (i.e. with Vim `sudo vim /etc/fstab`), then copy/paste the below (single line) to bottom of that file and save it&#xD;&#xA;```&#xD;&#xA;/swapfile       none            swap    defaults,discard                0 0&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24768" PostHistoryTypeId="5" PostId="6442" RevisionGUID="45be4dce-5edf-4b2a-a4f3-f957857b6a80" CreationDate="2022-12-22T12:51:52.403" UserId="380" Comment="added 4 characters in body" Text="The [previous answer](https://substrate.stackexchange.com/questions/3456/can-you-query-the-state-of-a-contract-at-a-given-block-number) is now incorrect due to the [deprecation of the RPCs](https://github.com/paritytech/substrate/pull/12358).&#xD;&#xA;&#xD;&#xA;How do we query the historic contract state now?&#xD;&#xA;&#xD;&#xA;In the PR comment it states:&#xD;&#xA;&#xD;&#xA;&gt; The high level contracts API in polkadot.js already uses state_call so upgrading to the latest version here is enough. If you are using api.rpc.contracts directly you need to switch to api.call.contractsApi.&#xD;&#xA;&#xD;&#xA;However, switching to `api.rx.call.contractsApi.call` does not give an option to pass `at`. There is the option to create an instance of the api at a specific block but there is no explanation of how to query contracts using this.&#xD;&#xA;&#xD;&#xA;The following does not work as the returned type of `api.at` (`ApiDecoration&lt;&quot;promise&quot;&gt;`) is not equivalent to `ApiPromise`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        if (atBlock) {&#xD;&#xA;            const atApi = atBlock ? await api.at(atBlock) : api&#xD;&#xA;            contract = new ContractPromise(atApi, abi, contractAddress)&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24769" PostHistoryTypeId="50" PostId="6032" RevisionGUID="d44f466c-d021-4a01-8dec-0567c9a5b58a" CreationDate="2022-12-22T13:01:20.137" UserId="-1" />
  <row Id="24770" PostHistoryTypeId="2" PostId="6463" RevisionGUID="5525a329-f06f-4de3-83c6-5b60f31126b4" CreationDate="2022-12-22T14:18:40.863" UserId="94" Text="Currently the test proof builder is std-only. I had the same problem when working with the `pallet-parachain-system` [here](https://github.com/paritytech/cumulus/pull/1709) where i use a hard-coded proof blob as well.  &#xD;&#xA;The actual solution would be to make the proof builder no-std, which I started working on but it went stale.&#xD;&#xA;&#xD;&#xA;So currently there is no better way AFAIK unless you want to make the proof builder no-std." ContentLicense="CC BY-SA 4.0" />
  <row Id="24772" PostHistoryTypeId="2" PostId="6464" RevisionGUID="96995d0f-dd12-45e7-9360-9ffd1046a182" CreationDate="2022-12-22T14:21:58.767" UserId="213" Text="I tried the following code, using method `generate`.&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/sp_core/crypto/trait.Pair.html#method.generate&#xD;&#xA;&#xD;&#xA;    use sp_core::{&#xD;&#xA;        sr25519,&#xD;&#xA;        ed25519,&#xD;&#xA;        Pair,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    use std::str;&#xD;&#xA;    &#xD;&#xA;    fn main() {&#xD;&#xA;        let pair_seed = &lt;sp_core::ed25519::Pair as Pair&gt;::generate();&#xD;&#xA;        let (pair, seed)  = pair_seed;&#xD;&#xA;        println!(&quot;{:?}&quot;, str::from_utf8(&amp;seed).unwrap());    &#xD;&#xA;    }&#xD;&#xA;Not sure `seed` is the mnemonic phrase. How to get the mnemonic phrase?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24774" PostHistoryTypeId="1" PostId="6464" RevisionGUID="96995d0f-dd12-45e7-9360-9ffd1046a182" CreationDate="2022-12-22T14:21:58.767" UserId="213" Text="How to generate a new account with seed using rust?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24775" PostHistoryTypeId="3" PostId="6464" RevisionGUID="96995d0f-dd12-45e7-9360-9ffd1046a182" CreationDate="2022-12-22T14:21:58.767" UserId="213" Text="|account|sr25519|ed25519|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24776" PostHistoryTypeId="2" PostId="6465" RevisionGUID="0c8d4ea5-353c-4010-8b32-2ba30607c07c" CreationDate="2022-12-22T14:59:13.957" UserId="3577" Text="To generate a new account with a seed using Rust, you can use the generate_with_phrase function provided by the Pair trait. This function takes a seed phrase as input and returns a pair containing the account's Pair and the seed phrase that was passed as input. Here's an example of how to use it:&#xD;&#xA;&#xD;&#xA;    use sp_core::{sr25519, ed25519, Pair};&#xD;&#xA;    use sp_core::crypto::{Ss58Codec, Derive};&#xD;&#xA;    &#xD;&#xA;    fn main() {&#xD;&#xA;        let seed_phrase = &quot;tumble seed aunt middle bulk plastic single rain disease fossil pen velvet elephant&quot;;&#xD;&#xA;    &#xD;&#xA;        // Use the `generate_with_phrase` function to generate a new account with the given seed phrase&#xD;&#xA;        let pair = &lt;ed25519::Pair as Pair&gt;::generate_with_phrase(seed_phrase).unwrap();&#xD;&#xA;    &#xD;&#xA;        // Use the `to_ss58_check` function to encode the account's public key as an SS58-formatted string&#xD;&#xA;        let public_key = pair.public().to_ss58_check();&#xD;&#xA;    &#xD;&#xA;        println!(&quot;Public key: {}&quot;, public_key);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that the generate_with_phrase function may return an error if the seed phrase is invalid or if there is an issue with the cryptographic operations used to generate the account. It is therefore recommended to handle any potential errors using the Result type or the unwrap function as shown in the example above." ContentLicense="CC BY-SA 4.0" />
  <row Id="24778" PostHistoryTypeId="5" PostId="6465" RevisionGUID="e40768f0-b6d5-4d21-8690-abdd8e0e2364" CreationDate="2022-12-22T15:04:29.760" UserId="3577" Comment="added 3 characters in body" Text="To generate a new account with a seed using Rust, you can use the generate_with_phrase function provided by the Pair trait. This function takes a seed phrase as input and returns a pair containing the account's Pair and the seed phrase that was passed as input. Here's an example of how to use it:&#xD;&#xA;&#xD;&#xA;    use sp_core::{sr25519, ed25519, Pair};&#xD;&#xA;    use sp_core::crypto::{Ss58Codec, Derive};&#xD;&#xA;    &#xD;&#xA;    fn main() {&#xD;&#xA;        let seed_phrase = &quot;island wink artist budget chuckle forest bachelor violin uniform fiber vacuum scissors&quot;;&#xD;&#xA;    &#xD;&#xA;        // Use the `generate_with_phrase` function to generate a new account with the given seed phrase&#xD;&#xA;        let pair = &lt;ed25519::Pair as Pair&gt;::generate_with_phrase(seed_phrase).unwrap();&#xD;&#xA;    &#xD;&#xA;        // Use the `to_ss58_check` function to encode the account's public key as an SS58-formatted string&#xD;&#xA;        let public_key = pair.public().to_ss58_check();&#xD;&#xA;    &#xD;&#xA;        println!(&quot;Public key: {}&quot;, public_key);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Note that the generate_with_phrase function may return an error if the seed phrase is invalid or if there is an issue with the cryptographic operations used to generate the account. It is therefore recommended to handle any potential errors using the Result type or the unwrap function as shown in the example above." ContentLicense="CC BY-SA 4.0" />
  <row Id="24779" PostHistoryTypeId="2" PostId="6466" RevisionGUID="d2da8eb0-4a17-4bf7-9766-fc4c9f137e1a" CreationDate="2022-12-22T15:06:16.493" UserId="380" Text="To access historic contract state you do not need a `ContractPromise`. It will not construct using the `at` API. Instead, you need to replicate the [calls made in the polkadot-js/api package](https://github.com/polkadot-js/api/blob/b21cc0ae0641e10a8569aef6107b6c1701929704/packages/api-contract/src/base/Contract.ts#L141-L151) using your `at` API.&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        // choose either the existing api or a historic api&#xD;&#xA;        let api: ApiBase&lt;'promise'&gt; | ApiDecoration&lt;'promise'&gt; = this.api&#xD;&#xA;        if (atBlock) {&#xD;&#xA;            api = atBlock ? await this.api.at(atBlock) : this.api&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // Make the call to the contracts API, specifying the contract address&#xD;&#xA;        // This next part is copied from polkadot-js packages/api-contract/src/base/Contract.ts&#xD;&#xA;        const responseObservable = api.rx.call.contractsApi&#xD;&#xA;            .call&lt;ContractExecResult&gt;(&#xD;&#xA;                callerAddress,&#xD;&#xA;                this.contract.address,&#xD;&#xA;                callParams.value,&#xD;&#xA;                callParams.gasLimit,&#xD;&#xA;                null, //storageDepositLimit&#xD;&#xA;                methodObj.toU8a(encodedArgs)&#xD;&#xA;            )&#xD;&#xA;            .pipe(&#xD;&#xA;                map(&#xD;&#xA;                    ({ debugMessage, gasConsumed, gasRequired, result, storageDeposit }): ContractCallOutcome =&gt; ({&#xD;&#xA;                        debugMessage,&#xD;&#xA;                        gasConsumed,&#xD;&#xA;                        gasRequired:&#xD;&#xA;                            gasRequired &amp;&amp; !convertWeight(gasRequired).v1Weight.isZero() ? gasRequired : gasConsumed,&#xD;&#xA;                        output:&#xD;&#xA;                            result.isOk &amp;&amp; methodObj.returnType&#xD;&#xA;                                ? this.contract.abi.registry.createTypeUnsafe(&#xD;&#xA;                                      methodObj.returnType.lookupName || methodObj.returnType.type,&#xD;&#xA;                                      [result.asOk.data.toU8a(true)],&#xD;&#xA;                                      { isPedantic: true }&#xD;&#xA;                                  )&#xD;&#xA;                                : null,&#xD;&#xA;                        result,&#xD;&#xA;                        storageDeposit,&#xD;&#xA;                    })&#xD;&#xA;                )&#xD;&#xA;            )&#xD;&#xA;        const response = await firstValueFrom(responseObservable)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24781" PostHistoryTypeId="5" PostId="6465" RevisionGUID="a43e325b-689b-494a-bce0-7a4e82794993" CreationDate="2022-12-22T15:12:55.720" UserId="3577" Comment="deleted 368 characters in body" Text="The generate method generates a new random keypair and does not accept a seed as input. If you want to generate a new account with a specific seed, you can use the from_seed method instead.&#xD;&#xA;&#xD;&#xA;    use sp_core::{sr25519, ed25519, Pair};&#xD;&#xA;    &#xD;&#xA;    fn main() {&#xD;&#xA;        let mnemonic_phrase = &quot;word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12&quot;;&#xD;&#xA;        let seed = sp_core::ed25519::Seed::from_phrase(mnemonic_phrase, &quot;&quot;)&#xD;&#xA;            .expect(&quot;Invalid mnemonic phrase&quot;);&#xD;&#xA;        let pair = &lt;sp_core::ed25519::Pair as Pair&gt;::from_seed(&amp;seed);&#xD;&#xA;        println!(&quot;{:?}&quot;, pair);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This will generate a new account using the given seed, which should be a 12-word mnemonic phrase.&#xD;&#xA;&#xD;&#xA;Note that the Seed type is specific to the ed25519 implementation of the Pair trait, so you may need to use a different type if you are using a different curve (e.g. sr25519::Seed for the sr25519 curve).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24786" PostHistoryTypeId="2" PostId="6468" RevisionGUID="c5f1a47d-5053-440e-aab5-3fcce3535cb8" CreationDate="2022-12-22T15:42:07.843" UserId="2762" Text="Following this code you mention I guess you have generated already the [Keypair][1] of your account, or you can sign a message using the private key of this account.&#xD;&#xA;&#xD;&#xA;You can verify a signed message using your public key or using the address. To verify that you have the correct address you can verify the signature using both methods and see if both are valid.&#xD;&#xA;&#xD;&#xA;Code example using Alice testing account:&#xD;&#xA;&#xD;&#xA;    // create Alice based on the development seed&#xD;&#xA;    const alice = keyring.addFromUri('//Alice');&#xD;&#xA;&#xD;&#xA;    // create the message and sign it&#xD;&#xA;    const message = stringToU8a('this is our message');&#xD;&#xA;    const signature = alice.sign(message);&#xD;&#xA;&#xD;&#xA;    // verify the message using Alice's address&#xD;&#xA;    const { isValid } = signatureVerify(message, signature, alice.address);&#xD;&#xA;    // verify the message using Alice's public key&#xD;&#xA;    const isValidWithPublicKey = alice.verify(message, signature, alice.publicKey);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/keyring/start/basics#keypair-types" ContentLicense="CC BY-SA 4.0" />
  <row Id="24788" PostHistoryTypeId="2" PostId="6469" RevisionGUID="162b94a8-669f-45f9-88ff-502ec0be2da1" CreationDate="2022-12-22T17:02:15.613" UserId="2025" Text="In general, proxy accounts are normal accounts which were delegated certain functionality from the proxied account (staking, non transfer, etc) so indeed, they can be accessed by the `system.account` storage function.&#xD;&#xA;&#xD;&#xA;If you are asking about accounts created by a `CreatePure` call of the proxy pallet, the answer is the same. Once created by that call, the address looks exactly the same as a &quot;normal&quot; account, both in SS58 format and as a byte array. The only difference is that there is no key pair that can access it.&#xD;&#xA;&#xD;&#xA;If you want to get into the details, [`pure_account` is the function](https://github.com/paritytech/substrate/blob/96e71b531cebf63211771c721169f78eb20eae54/frame/proxy/src/lib.rs#L617) that calculates the address of a pure account. This function is called internally by the `CreatePure` call. As you can see in the code, it uses the sender account Id, the block height, the extrinsic index, the proxy type and the index chosen by the sender as source of entropy to calculate the new address.&#xD;&#xA;&#xD;&#xA;If what you want is to filter proxied accounts, you will need to query the `proxies` storage entry of the proxy pallet. There you will find a map of the account which has delegated to the accounts which are being delegated to, together with the amount held on deposit." ContentLicense="CC BY-SA 4.0" />
  <row Id="24790" PostHistoryTypeId="10" PostId="6464" RevisionGUID="7b2ddcc1-7417-4d01-8f37-624d1d87b32f" CreationDate="2022-12-22T18:04:53.143" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[2254],&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="24791" PostHistoryTypeId="2" PostId="6470" RevisionGUID="6f7fbfa2-bb41-45a8-9e40-f2f692059e1e" CreationDate="2022-12-22T22:08:05.017" UserId="494" Text="If you're comfortable introducing a layer of permissioning into your design, you could perhaps use the [`SignedExtension` trait](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.SignedExtension.html).&#xD;&#xA;&#xD;&#xA;You'd have to keep an on-chain list of OCW identities that are &quot;authorized&quot; to send the specific extrinsic, and use them in the `validate` function of your `SignedExtention` trait implementation.&#xD;&#xA;&#xD;&#xA;This list could be updated via `sudo` or Governance.&#xD;&#xA;&#xD;&#xA;[Here](https://github.com/gautamdhameja/substrate-rbac)'s a working example of how to use the `SignedExtension` trait in a [RBAC permissioning system](https://en.wikipedia.org/wiki/Role-based_access_control). It's not the precise solution to your problem, but could serve as inspiration." ContentLicense="CC BY-SA 4.0" />
  <row Id="24793" PostHistoryTypeId="2" PostId="6471" RevisionGUID="f85d021b-8f8e-4218-8466-5f162503e282" CreationDate="2022-12-23T02:31:23.920" UserId="1756" Text="This error cropped up somewhat unexpectedly, and I am not sure how it came to be. Nevertheless, it appears that 2 runtime calls, `set_commission` (a new function being added in the PR in question) and `set_configs` have an index clash error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Call indices are conflicting: Both functions set_commission and set_configs are at index 11&#xD;&#xA;    --&gt; frame/nomination-pools/src/lib.rs:2237:10&#xD;&#xA;     |&#xD;&#xA;2237 |         pub fn set_commission(&#xD;&#xA;     |                ^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error: Call indices are conflicting: Both functions set_commission and set_configs are at index 11&#xD;&#xA;    --&gt; frame/nomination-pools/src/lib.rs:2329:10&#xD;&#xA;     |&#xD;&#xA;2329 |         pub fn set_configs(&#xD;&#xA;     |                ^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Re-cloning `substrate` with the same codebase results in no error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24795" PostHistoryTypeId="1" PostId="6471" RevisionGUID="f85d021b-8f8e-4218-8466-5f162503e282" CreationDate="2022-12-23T02:31:23.920" UserId="1756" Text="Pallet Call Indicies are Conflicting Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="24796" PostHistoryTypeId="3" PostId="6471" RevisionGUID="f85d021b-8f8e-4218-8466-5f162503e282" CreationDate="2022-12-23T02:31:23.920" UserId="1756" Text="|pallet|substrateinterface|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24797" PostHistoryTypeId="5" PostId="6471" RevisionGUID="7e49e3d3-cbe6-4315-af3c-4dc54fd98386" CreationDate="2022-12-23T03:07:27.100" UserId="1756" Comment="added 38 characters in body" Text="This error cropped up somewhat unexpectedly, and I am not sure how it came to be. Nevertheless, it appears that 2 runtime calls, `set_commission` (a new function being added in the PR in question) and `set_configs` have an index clash error, within the `nomination-pools` pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Call indices are conflicting: Both functions set_commission and set_configs are at index 11&#xD;&#xA;    --&gt; frame/nomination-pools/src/lib.rs:2237:10&#xD;&#xA;     |&#xD;&#xA;2237 |         pub fn set_commission(&#xD;&#xA;     |                ^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error: Call indices are conflicting: Both functions set_commission and set_configs are at index 11&#xD;&#xA;    --&gt; frame/nomination-pools/src/lib.rs:2329:10&#xD;&#xA;     |&#xD;&#xA;2329 |         pub fn set_configs(&#xD;&#xA;     |                ^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Re-cloning `substrate` with the same codebase results in no error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="24798" PostHistoryTypeId="5" PostId="6471" RevisionGUID="5b392c90-1b09-4d85-8d8a-81e223f0cf6d" CreationDate="2022-12-23T03:14:47.907" UserId="1756" Comment="added 43 characters in body" Text="This error cropped up somewhat unexpectedly, and I am not sure how it came to be. Nevertheless, it appears that 2 runtime calls, `set_commission` (a new function being added in the PR in question) and `set_configs` have an index clash error, within the `nomination-pools` pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Call indices are conflicting: Both functions set_commission and set_configs are at index 11&#xD;&#xA;    --&gt; frame/nomination-pools/src/lib.rs:2237:10&#xD;&#xA;     |&#xD;&#xA;2237 |         pub fn set_commission(&#xD;&#xA;     |                ^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error: Call indices are conflicting: Both functions set_commission and set_configs are at index 11&#xD;&#xA;    --&gt; frame/nomination-pools/src/lib.rs:2329:10&#xD;&#xA;     |&#xD;&#xA;2329 |         pub fn set_configs(&#xD;&#xA;     |                ^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Re-cloning `substrate` with the same codebase results in no error. &#xD;&#xA;&#xD;&#xA;* `cargo clean` does not fix the issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="24799" PostHistoryTypeId="2" PostId="6472" RevisionGUID="6c49e432-b8aa-49bd-824d-f5f4c10949ad" CreationDate="2022-12-23T04:21:07.430" UserId="2449" Text="Substrate automatically syncs up upon starting and supports --sync &lt;SYNC_MODE&gt; `full`, `fast,` `fast-unsafe` and `wrap`&#xD;&#xA;However, I'd like to have `manual` to prevent the node from synchronizing when starting the node for my specific reason to do so...&#xD;&#xA;&#xD;&#xA;Here's my naive idea to make sync configurable:&#xD;&#xA; 1. Add **SyncMode::Manual**&#xD;&#xA; ```if self.mode == SyncMode::Manual { // stop peers connection }```&#xD;&#xA; 2. Add rpc `sync` command -&gt; synchronize the node, downloading the blocks manually, once getting the best block or target block hash, stop it.&#xD;&#xA;&#xD;&#xA;Is that doable in substrate??&#xD;&#xA;Much appreciate for any advice and guidance." ContentLicense="CC BY-SA 4.0" />
  <row Id="24801" PostHistoryTypeId="1" PostId="6472" RevisionGUID="6c49e432-b8aa-49bd-824d-f5f4c10949ad" CreationDate="2022-12-23T04:21:07.430" UserId="2449" Text="How to perform **manual sync**?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24802" PostHistoryTypeId="3" PostId="6472" RevisionGUID="6c49e432-b8aa-49bd-824d-f5f4c10949ad" CreationDate="2022-12-23T04:21:07.430" UserId="2449" Text="|libp2p|network|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24803" PostHistoryTypeId="5" PostId="6471" RevisionGUID="053ac590-74ad-4341-88d3-9e1a436c2c92" CreationDate="2022-12-23T05:39:15.917" UserId="1756" Comment="deleted 71 characters in body" Text="This error cropped up somewhat unexpectedly, and I am not sure how it came to be. Nevertheless, it appears that 2 runtime calls, `set_commission` (a new function being added in the PR in question) and `set_configs` have an index clash error, within the `nomination-pools` pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Call indices are conflicting: Both functions set_commission and set_configs are at index 11&#xD;&#xA;    --&gt; frame/nomination-pools/src/lib.rs:2237:10&#xD;&#xA;     |&#xD;&#xA;2237 |         pub fn set_commission(&#xD;&#xA;     |                ^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error: Call indices are conflicting: Both functions set_commission and set_configs are at index 11&#xD;&#xA;    --&gt; frame/nomination-pools/src/lib.rs:2329:10&#xD;&#xA;     |&#xD;&#xA;2329 |         pub fn set_configs(&#xD;&#xA;     |                ^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;* `cargo clean` does not fix the issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="24804" PostHistoryTypeId="2" PostId="6473" RevisionGUID="9b91e18b-f35e-4601-b10f-ac509adcfacf" CreationDate="2022-12-23T05:41:57.913" UserId="1756" Text="A macro was introduced to pallets to explicitly define an index for each runtime call.&#xD;&#xA;&#xD;&#xA;Ensure that newly added calls also have a call index:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::call_index(11)]&#xD;&#xA;#[pallet::weight(T::WeightInfo::set_configs())]&#xD;&#xA;pub fn set_configs(&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24806" PostHistoryTypeId="5" PostId="6473" RevisionGUID="8ce78e91-10b5-4450-96a8-2207203acb46" CreationDate="2022-12-23T05:59:09.803" UserId="1756" Comment="added 56 characters in body" Text="A macro was introduced to pallets to explicitly define an index for each runtime call.&#xD;&#xA;&#xD;&#xA;If the pallet you are working on uses this macro, ensure that newly added calls also have a call index. E.g.:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::call_index(11)]&#xD;&#xA;#[pallet::weight(T::WeightInfo::set_configs())]&#xD;&#xA;pub fn set_configs(&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24807" PostHistoryTypeId="5" PostId="6472" RevisionGUID="c109fbbd-e621-4f3d-884b-ba1d105751f1" CreationDate="2022-12-23T06:47:19.743" UserId="2449" Comment="deleted 7 characters in body" Text="Substrate automatically syncs up upon starting and supports --sync &lt;SYNC_MODE&gt; `full`, `fast,` `fast-unsafe` and `wrap`&#xD;&#xA;However, I'd like to have `manual` to prevent the node from synchronizing when starting the node for my specific reason to do so...&#xD;&#xA;&#xD;&#xA;Here's my naive idea to make sync configurable:&#xD;&#xA; 1. Add **SyncMode::Manual**&#xD;&#xA; ```if self.mode == SyncMode::Manual { // stop peers connection }```&#xD;&#xA; 2. Add rpc `sync` command -&gt; synchronize the node, downloading the blocks manually, once getting the best block or target block hash, then stop it.&#xD;&#xA;&#xD;&#xA;Is that doable??&#xD;&#xA;Much appreciated for any advice and guidance." ContentLicense="CC BY-SA 4.0" />
  <row Id="24808" PostHistoryTypeId="2" PostId="6474" RevisionGUID="4cdb48f2-560b-42b9-8f64-0c414706a109" CreationDate="2022-12-23T07:04:03.487" UserId="3607" Text="I want to integrate a third party library into my ink! smart contract and I am not sure if this is possible. I did notice that ink! has something called Chain Extensions which can allow a smart contract to interact with the runtime and I am wondering if there is a way to add the third party library to the runtime as a pallet and then interact with it using the smart contract. Is this feasible or are there any other ways I can go about doing something like this?&#xD;&#xA;&#xD;&#xA;Edit: I want to mention that the library I want to integrate supports no-std." ContentLicense="CC BY-SA 4.0" />
  <row Id="24810" PostHistoryTypeId="1" PostId="6474" RevisionGUID="4cdb48f2-560b-42b9-8f64-0c414706a109" CreationDate="2022-12-23T07:04:03.487" UserId="3607" Text="Is it possible to integrate a third-party library into a smart contract using ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="24811" PostHistoryTypeId="3" PostId="6474" RevisionGUID="4cdb48f2-560b-42b9-8f64-0c414706a109" CreationDate="2022-12-23T07:04:03.487" UserId="3607" Text="|ink|runtime|smart-contract|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24812" PostHistoryTypeId="50" PostId="6051" RevisionGUID="7d0c1caf-c4bb-4958-8821-e71c5ba4d3b0" CreationDate="2022-12-23T09:09:21.190" UserId="-1" />
  <row Id="24813" PostHistoryTypeId="2" PostId="6475" RevisionGUID="6741fd35-08ea-4401-92cd-3769292b3061" CreationDate="2022-12-23T11:52:18.623" UserId="2581" Text="I have Staking Rewarded event. &#xD;&#xA;&#xD;&#xA;I can get stash address and reward amount from it. &#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/5172/how-to-use-api-events-staking-rewarded-is-to-get-nominator-reward&#xD;&#xA;&#xD;&#xA;How can I get validator address and era from event?&#xD;&#xA;&#xD;&#xA;So, I can get know which validator did payout for which era.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24815" PostHistoryTypeId="1" PostId="6475" RevisionGUID="6741fd35-08ea-4401-92cd-3769292b3061" CreationDate="2022-12-23T11:52:18.623" UserId="2581" Text="Get era and validator address from Rewarded event" ContentLicense="CC BY-SA 4.0" />
  <row Id="24816" PostHistoryTypeId="3" PostId="6475" RevisionGUID="6741fd35-08ea-4401-92cd-3769292b3061" CreationDate="2022-12-23T11:52:18.623" UserId="2581" Text="|validator|era|payouts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24817" PostHistoryTypeId="2" PostId="6476" RevisionGUID="89959a92-f141-4da0-9b8e-5cbad41adfa6" CreationDate="2022-12-23T12:09:15.390" UserId="94" Text="I dont think it is currently doable like you described.  &#xD;&#xA;You can abuse the `--in-peers` and `--out-peers` flags and set them to `0` to not make your node sync.  &#xD;&#xA;Then you have to restart it once you want it to sync without the flags. Not quite what you asked for, but at least close." ContentLicense="CC BY-SA 4.0" />
  <row Id="24819" PostHistoryTypeId="2" PostId="6477" RevisionGUID="4eece11f-e436-437a-a170-7dd00daf1f76" CreationDate="2022-12-23T12:49:30.010" UserId="170" Text="You can treat ink! contract as any other rust application - you can add dependencies to your `Cargo.toml` file and use these dependencies across your project, however, these libraries need to enable usage of no-standard Rust library." ContentLicense="CC BY-SA 4.0" />
  <row Id="24821" PostHistoryTypeId="2" PostId="6478" RevisionGUID="ea7268a9-4f45-4ed7-9933-10b900648e4c" CreationDate="2022-12-23T13:57:26.463" UserId="179" Text="*[Related to the when the question was asked][1]*&#xD;&#xA;&#xD;&#xA;The runtime against which you are running is not compiled with --features try-runtime. If you are on latest version, read the docs here: https://paritytech.github.io/substrate/master/try_runtime_cli/index.html#examples&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/11718" ContentLicense="CC BY-SA 4.0" />
  <row Id="24823" PostHistoryTypeId="2" PostId="6479" RevisionGUID="d1076878-0671-40eb-8e5e-9d593688a257" CreationDate="2022-12-23T15:26:57.333" UserId="3639" Text="[![an error][1]][1]I have searching some solutions in the internet. However, I can't deal with my problem. I hope someone can help me to deal with this problem. Thank you very much.[![my configuration][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/E3s30.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/3fql1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24825" PostHistoryTypeId="1" PostId="6479" RevisionGUID="d1076878-0671-40eb-8e5e-9d593688a257" CreationDate="2022-12-23T15:26:57.333" UserId="3639" Text="A build problem when I build the substrate-node-template in windows10 system" ContentLicense="CC BY-SA 4.0" />
  <row Id="24826" PostHistoryTypeId="3" PostId="6479" RevisionGUID="d1076878-0671-40eb-8e5e-9d593688a257" CreationDate="2022-12-23T15:26:57.333" UserId="3639" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24829" PostHistoryTypeId="2" PostId="6481" RevisionGUID="30976dfa-6ca4-42e5-9100-2c2c0e92f18b" CreationDate="2022-12-23T15:43:41.863" UserId="2762" Text="Using PolkadotJS, this is the code to get the breakdown of a DOT for an account in the current block (change the block hash if you want to query it in an specific block).&#xD;&#xA;&#xD;&#xA;    const ADDR = 'your-address-here';&#xD;&#xA;    const currentBlock = await api.rpc.chain.getBlock();&#xD;&#xA;    const apiAt = await api.at(currentBlock.block.header.hash);&#xD;&#xA;    const accountInfo = await apiAt.query.system.account(ADDR);&#xD;&#xA;    const locks = await apiAt.query.balances.locks(ADDR)&#xD;&#xA;    console.log(`Balance of the account ${ADDR} is: `);&#xD;&#xA;    console.log(accountInfo.toHuman());&#xD;&#xA;    console.log(locks.toHuman());&#xD;&#xA;&#xD;&#xA;The account info will return the basic information of your balance account (free balance, reserved, miscFrozen and feeFrozen. Example:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;     nonce: '4',&#xD;&#xA;     consumers: '1',&#xD;&#xA;     providers: '1',&#xD;&#xA;     sufficients: '0',&#xD;&#xA;     data: {&#xD;&#xA;       free: 'xx',&#xD;&#xA;       reserved: 'xx',&#xD;&#xA;       miscFrozen: 'xx',&#xD;&#xA;       feeFrozen: 'xx'&#xD;&#xA;     }&#xD;&#xA;   }&#xD;&#xA;&#xD;&#xA;The locks constant will show you the bonded, vested, locked... &#xD;&#xA;Example( with vested tokens):&#xD;&#xA;&#xD;&#xA;    [ { id: 'vesting ', amount: 'xx', reasons: 'Misc' } ]" ContentLicense="CC BY-SA 4.0" />
  <row Id="24831" PostHistoryTypeId="50" PostId="6058" RevisionGUID="8b256fe0-81ba-4c83-aa6f-1fd37d6536c5" CreationDate="2022-12-23T16:04:10.557" UserId="-1" />
  <row Id="24832" PostHistoryTypeId="2" PostId="6482" RevisionGUID="dc0770e8-123a-4ec7-81cd-21cd6d54dae8" CreationDate="2022-12-23T16:04:42.087" UserId="3346" Text="Fees for transactions in our test net are too high and we would like to adjust them to be some factor lower across the board. Is there a simple way to do that using a call from the Polkadot.js apps interface? Or would that need to be set within the JSON or constants.rs file prior to chain start?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24834" PostHistoryTypeId="1" PostId="6482" RevisionGUID="dc0770e8-123a-4ec7-81cd-21cd6d54dae8" CreationDate="2022-12-23T16:04:42.087" UserId="3346" Text="How To Adjust The Fees On A Running Substrate Chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24835" PostHistoryTypeId="3" PostId="6482" RevisionGUID="dc0770e8-123a-4ec7-81cd-21cd6d54dae8" CreationDate="2022-12-23T16:04:42.087" UserId="3346" Text="|transactions|fee|substrateinterface|weighttofee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24836" PostHistoryTypeId="2" PostId="6483" RevisionGUID="2c10f3aa-2864-4bbe-9a4d-42285584cd93" CreationDate="2022-12-23T17:13:40.487" UserId="2762" Text="You can get the era of that event because you have the block hash where that event occurs:&#xD;&#xA;&#xD;&#xA;    const at = await api.at(blockHash);&#xD;&#xA;    const era = await at.query.staking.activeEra();&#xD;&#xA;    console.log(era.toHuman());&#xD;&#xA;&#xD;&#xA;If you want the set of validators in that moment:&#xD;&#xA;&#xD;&#xA;    const validators = await at.query.session.validators();&#xD;&#xA;    console.log(validators.toHuman());&#xD;&#xA;&#xD;&#xA;If you want to see the list of the rewards for that eras:&#xD;&#xA;&#xD;&#xA;    const erasValidatorReward = await api.query.staking.erasRewardPoints(numberOfEra);&#xD;&#xA;    console.log(erasValidatorReward.toHuman());&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="24840" PostHistoryTypeId="6" PostId="6479" RevisionGUID="08591e6b-f8d9-46da-a18d-0b618f95b6e0" CreationDate="2022-12-23T20:37:59.457" UserId="34" Comment="edited tags" Text="|substrate-node-template|compilation|windows|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24841" PostHistoryTypeId="50" PostId="5543" RevisionGUID="1c9d2a13-b458-4927-b0f9-dab9a14ea421" CreationDate="2022-12-23T22:06:45.750" UserId="-1" />
  <row Id="24843" PostHistoryTypeId="5" PostId="6452" RevisionGUID="9b271e52-d17f-4c60-98d3-fd0a729896ec" CreationDate="2022-12-24T02:17:05.083" UserId="251" Comment="added 301 characters in body" Text="Why do you want to keep it alive?&#xD;&#xA;&#xD;&#xA;If it is unnecessary, why just let it die?&#xD;&#xA;&#xD;&#xA;Usually, I follow the Substrate's spec.&#xD;&#xA;&#xD;&#xA;Bounty account example: https://github.com/paritytech/substrate/blob/ee316317b85b2f65fc022b27bbfefcd42b6560ae/frame/bounties/src/lib.rs#L645&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You could write something like this in your genesis.&#xD;&#xA;```rs&#xD;&#xA;#[pallet::genesis_build]&#xD;&#xA;impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;	fn build(&amp;self) {&#xD;&#xA;		T::Currency::deposit_creating(&amp;pallet_account(), 2 * UNIT);&#xD;&#xA;		T::Currency::reserve(&amp;pallet_account(), 2 * UNIT);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24844" PostHistoryTypeId="2" PostId="6484" RevisionGUID="e8d46d7e-b3a4-4778-b5f8-68fb58d20ff9" CreationDate="2022-12-24T04:29:52.293" UserId="139" Text="The way to resolve this is to use WSL on windows. Follow these instructions:&#xD;&#xA;1. Install https://learn.microsoft.com/en-us/windows/wsl/install, you'll be prompted for a reboot&#xD;&#xA;2. Install ubuntu or a distro of your choice from the Microsoft store&#xD;&#xA;3. When you have a WSL ready, `sudo apt update; sudo apt install -y cmake pkg-config libssl-dev git gcc build-essential git clang libclang-dev`. Also install rust, nightly, and add wasm32-unknown-unknown as targets&#xD;&#xA;4. Finally compile your code." ContentLicense="CC BY-SA 4.0" />
  <row Id="24846" PostHistoryTypeId="2" PostId="6485" RevisionGUID="88598f50-ae2b-4b88-9d61-371432507e5d" CreationDate="2022-12-24T04:43:55.447" UserId="139" Text="Fees defined as part of the runtime. A substrate chain allows you to upgrade your runtime, so you would be required to perform a runtime upgrade with the changes." ContentLicense="CC BY-SA 4.0" />
  <row Id="24848" PostHistoryTypeId="2" PostId="6486" RevisionGUID="8d46706f-e809-47a8-81eb-977d8eccd028" CreationDate="2022-12-24T13:38:57.953" UserId="1756" Text="Is there a way to extract the selected network of an account, that is configured through the Polkadot JS Extension, through `accounts.subscribe`?&#xD;&#xA;&#xD;&#xA;[![Account Network][1]][1]&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/1m4HR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24850" PostHistoryTypeId="1" PostId="6486" RevisionGUID="8d46706f-e809-47a8-81eb-977d8eccd028" CreationDate="2022-12-24T13:38:57.953" UserId="1756" Text="How to extract account network in Polkadot JS Extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="24851" PostHistoryTypeId="3" PostId="6486" RevisionGUID="8d46706f-e809-47a8-81eb-977d8eccd028" CreationDate="2022-12-24T13:38:57.953" UserId="1756" Text="|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24852" PostHistoryTypeId="2" PostId="6487" RevisionGUID="358ba1d1-96c5-43c4-8022-42c416f5eec7" CreationDate="2022-12-25T10:46:13.410" UserId="94" Text="In general a runtime upgrade is the way to go, as @Purple_Turtle pointed out.  &#xD;&#xA;(You could also try to hack around it with `System::set_storage` to overwrite the fee multiplier with PolkadotJS, but that can go quite wrong.)&#xD;&#xA;&#xD;&#xA;The exact change depends on what you want to adjust;&#xD;&#xA;1. The cost of the Weight that an extrinsic consumes:  &#xD;&#xA;  Weight is converted into a deducible amount of balance that the user pays for (aka fees).  &#xD;&#xA;  This is defined in the [`pallet_transaction_payment::Config::WeightToFee`](https://github.com/paritytech/substrate/blob/696bdc67af5fd83aca318263dbd405593b043ba3/frame/transaction-payment/src/lib.rs#L334) and `LengthToFee` configs. [Polkadot](https://github.com/paritytech/polkadot/blob/b91e8efdde0a01981367cc18462d3613b1b8d3b7/runtime/polkadot/constants/src/lib.rs#L84) uses Polynomials in the form of `WeightToFeePolynomial` for both, which then automatically implements the `WeightToFee` trait.&#xD;&#xA;2. The way the fee multiplier is adjusted in accord to block fullness:  &#xD;&#xA;  Substrate supports the adjusting of block fees depending on the utilization of your chain. This is also part of `pallet_transaction_payment`, namely [FeeMultiplierUpdate](https://github.com/paritytech/substrate/blob/696bdc67af5fd83aca318263dbd405593b043ba3/frame/transaction-payment/src/lib.rs#L340). In Polkadot this is defined [here](https://github.com/paritytech/polkadot/blob/6d612ab1fee2dcaaabd19ee12a9399d0c01a10f7/runtime/common/src/lib.rs#L100), according to all the constants a few lines above. The fee multiplier for the next block is updated in the current block and adjusts to the target block fullness over time. The mechanisms is rather involved and implemented [here](https://github.com/paritytech/substrate/blob/696bdc67af5fd83aca318263dbd405593b043ba3/frame/transaction-payment/src/lib.rs#L189). Fuller blocks will increase the multiplier over time and lower blocks will decrease it. Both withing limits." ContentLicense="CC BY-SA 4.0" />
  <row Id="24854" PostHistoryTypeId="2" PostId="6488" RevisionGUID="76c21251-b012-44a0-bf4f-acab3c8421c3" CreationDate="2022-12-25T14:11:15.450" UserId="3109" Text="I am trying substrate kitties Workshop , After setting environment  and paste the bare-bone code of kitties pallet , when i run `cargo build --release` The following error occur after 2-3 minutes when building `sp-runtime` :&#xD;&#xA;error[E0277]: the trait bound `H256: TypeInfo` is not satisfied&#xD;&#xA;   --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/testing.rs:260:14&#xD;&#xA;    |&#xD;&#xA;260 |     type Hash = &lt;Header as traits::Header&gt;::Hash;&#xD;&#xA;    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H256`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `TypeInfo`:&#xD;&#xA;              &amp;T&#xD;&#xA;              &amp;mut T&#xD;&#xA;              ()&#xD;&#xA;              (A, B)&#xD;&#xA;              (A, B, C)&#xD;&#xA;              (A, B, C, D)&#xD;&#xA;              (A, B, C, D, E)&#xD;&#xA;              (A, B, C, D, E, F)&#xD;&#xA;            and 117 others&#xD;&#xA;note: required by a bound in `traits::Block::Hash`&#xD;&#xA;   --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/traits.rs:917:5&#xD;&#xA;    |&#xD;&#xA;904 |     type Hash: Member&#xD;&#xA;    |          ---- required by a bound in this&#xD;&#xA;...&#xD;&#xA;917 |         + TypeInfo;&#xD;&#xA;    |           ^^^^^^^^ required by this bound in `Block::Hash`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `H256: TypeInfo` is not satisfied&#xD;&#xA;   --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/traits.rs:700:16&#xD;&#xA;    |&#xD;&#xA;700 |     type Output = sp_core::H256;&#xD;&#xA;    |                   ^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H256`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `TypeInfo`:&#xD;&#xA;              &amp;T&#xD;&#xA;              &amp;mut T&#xD;&#xA;              ()&#xD;&#xA;              (A, B)&#xD;&#xA;              (A, B, C)&#xD;&#xA;              (A, B, C, D)&#xD;&#xA;              (A, B, C, D, E)&#xD;&#xA;              (A, B, C, D, E, F)&#xD;&#xA;            and 117 others&#xD;&#xA;note: required by a bound in `traits::Hash::Output`&#xD;&#xA;   --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/traits.rs:665:5&#xD;&#xA;    |&#xD;&#xA;654 |     type Output: Member&#xD;&#xA;    |          ------ required by a bound in this&#xD;&#xA;...&#xD;&#xA;665 |         + TypeInfo;&#xD;&#xA;    |           ^^^^^^^^ required by this bound in `Hash::Output`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `H256: TypeInfo` is not satisfied&#xD;&#xA;   --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/traits.rs:727:16&#xD;&#xA;    |&#xD;&#xA;727 |     type Output = sp_core::H256;&#xD;&#xA;    |                   ^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H256`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `TypeInfo`:&#xD;&#xA;              &amp;T&#xD;&#xA;              &amp;mut T&#xD;&#xA;              ()&#xD;&#xA;              (A, B)&#xD;&#xA;              (A, B, C)&#xD;&#xA;              (A, B, C, D)&#xD;&#xA;              (A, B, C, D, E)&#xD;&#xA;              (A, B, C, D, E, F)&#xD;&#xA;            and 117 others&#xD;&#xA;note: required by a bound in `traits::Hash::Output`&#xD;&#xA;   --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/traits.rs:665:5&#xD;&#xA;    |&#xD;&#xA;654 |     type Output: Member&#xD;&#xA;    |          ------ required by a bound in this&#xD;&#xA;...&#xD;&#xA;665 |         + TypeInfo;&#xD;&#xA;    |           ^^^^^^^^ required by this bound in `Hash::Output`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;error: could not compile `sp-runtime` due to 3 previous errors&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24856" PostHistoryTypeId="1" PostId="6488" RevisionGUID="76c21251-b012-44a0-bf4f-acab3c8421c3" CreationDate="2022-12-25T14:11:15.450" UserId="3109" Text="I am trying Substrate Kitties Workshop" ContentLicense="CC BY-SA 4.0" />
  <row Id="24857" PostHistoryTypeId="3" PostId="6488" RevisionGUID="76c21251-b012-44a0-bf4f-acab3c8421c3" CreationDate="2022-12-25T14:11:15.450" UserId="3109" Text="|substrate-node-template|substrate-front-end|kitties|substrate-kitties-chain|kitties-tutorial|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24858" PostHistoryTypeId="2" PostId="6489" RevisionGUID="d001c0d3-9e98-44ab-a59b-35f50806f1cf" CreationDate="2022-12-25T14:34:46.643" UserId="496" Text="When I compile a specific INK! 4.0 smart contract i get the following error: &#xD;&#xA;```ERROR: Error invoking `cargo metadata```&#xD;&#xA;&#xD;&#xA;I have multiple INK! 4.0 smart contracts that are compiling successfully without the above error, i even copy and pasted the Cargo.toml file of the working contracts but Im still getting the above error.&#xD;&#xA;&#xD;&#xA;Here's how my Cargo.toml file looks like: &#xD;&#xA;&#xD;&#xA;![](https://i.ibb.co/7SJ8dHr/Screenshot-2022-12-25-at-15-25-38.png)&#xD;&#xA;&#xD;&#xA;Link - https://ibb.co/wdN3FTp&#xD;&#xA;&#xD;&#xA;Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="24860" PostHistoryTypeId="1" PostId="6489" RevisionGUID="d001c0d3-9e98-44ab-a59b-35f50806f1cf" CreationDate="2022-12-25T14:34:46.643" UserId="496" Text="ERROR: Error invoking `cargo metadata` when trying to compile INK! 4.0 smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="24861" PostHistoryTypeId="3" PostId="6489" RevisionGUID="d001c0d3-9e98-44ab-a59b-35f50806f1cf" CreationDate="2022-12-25T14:34:46.643" UserId="496" Text="|ink|smart-contract|cargo|toml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24862" PostHistoryTypeId="50" PostId="3615" RevisionGUID="f18c5b3f-29a3-4dac-aba8-f26bd87d7485" CreationDate="2022-12-25T23:03:40.483" UserId="-1" />
  <row Id="24866" PostHistoryTypeId="2" PostId="6491" RevisionGUID="f8a8bd4d-9158-4682-bd71-6b7d71850e13" CreationDate="2022-12-26T14:00:46.400" UserId="3646" Text="When adding the below section to the rs.lib file produce the error of :&#xD;&#xA;(without this section --&gt; no error when building the node but )&#xD;&#xA;**duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.**&#xD;&#xA;&#xD;&#xA;The section: ***impl section: impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;}*** &#xD;&#xA;&#xD;&#xA;If the rs.lib does not have this section --&gt; no error when building the node.&#xD;&#xA;&#xD;&#xA;The file includes this section: *#![cfg_attr(not(feature = &quot;std&quot;), no_std)] in the lib.rs file.*&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but it does not include the sp_io (see below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;, &#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &quot;frame-benchmarking?/std&quot;, &quot;codec/std&quot;, &quot;scale-info/std&quot;, &quot;frame-executive/std&quot;, &quot;frame-support/std&quot;, &quot;frame-system-rpc-runtime-api/std&quot;, &quot;frame-system/std&quot;, &quot;frame-try-runtime/std&quot;, &quot;pallet-aura/std&quot;, &quot;pallet-balances/std&quot;, &quot;pallet-grandpa/std&quot;, &quot;pallet-randomness-collective-flip/std&quot;, &quot;pallet-sudo/std&quot;, &quot;pallet-template/std&quot;, &quot;pallet-timestamp/std&quot;, &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &quot;pallet-transaction-payment/std&quot;, &quot;sp-api/std&quot;, &quot;sp-block-builder/std&quot;, &quot;sp-consensus-aura/std&quot;, &quot;sp-core/std&quot;, &quot;sp-inherents/std&quot;, &quot;sp-offchain/std&quot;, &quot;sp-runtime/std&quot;, &quot;sp-session/std&quot;, &quot;sp-std/std&quot;, &quot;sp-transaction-pool/std&quot;, &quot;sp-version/std&quot;, &quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24868" PostHistoryTypeId="1" PostId="6491" RevisionGUID="f8a8bd4d-9158-4682-bd71-6b7d71850e13" CreationDate="2022-12-26T14:00:46.400" UserId="3646" Text="Adding the impl section to the lib.rs create duplicate lang item in crate `sp_io`" ContentLicense="CC BY-SA 4.0" />
  <row Id="24869" PostHistoryTypeId="3" PostId="6491" RevisionGUID="f8a8bd4d-9158-4682-bd71-6b7d71850e13" CreationDate="2022-12-26T14:00:46.400" UserId="3646" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24871" PostHistoryTypeId="5" PostId="6491" RevisionGUID="a1212073-5d9e-41e1-b97e-f27f6a61314b" CreationDate="2022-12-26T14:32:41.030" UserId="3646" Comment="deleted 3 characters in body" Text="When adding the below section to the rs.lib file produce the error of :&#xD;&#xA;**duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.**&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;The section: ***impl section: impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;}*** &#xD;&#xA;&#xD;&#xA;If the rs.lib does not have this section --&gt; no error when building the node.&#xD;&#xA;&#xD;&#xA;The file includes this section: *#![cfg_attr(not(feature = &quot;std&quot;), no_std)] in the lib.rs file.*&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but it does not include the sp_io (see below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;, &#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &quot;frame-benchmarking?/std&quot;, &quot;codec/std&quot;, &quot;scale-info/std&quot;, &quot;frame-executive/std&quot;, &quot;frame-support/std&quot;, &quot;frame-system-rpc-runtime-api/std&quot;, &quot;frame-system/std&quot;, &quot;frame-try-runtime/std&quot;, &quot;pallet-aura/std&quot;, &quot;pallet-balances/std&quot;, &quot;pallet-grandpa/std&quot;, &quot;pallet-randomness-collective-flip/std&quot;, &quot;pallet-sudo/std&quot;, &quot;pallet-template/std&quot;, &quot;pallet-timestamp/std&quot;, &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &quot;pallet-transaction-payment/std&quot;, &quot;sp-api/std&quot;, &quot;sp-block-builder/std&quot;, &quot;sp-consensus-aura/std&quot;, &quot;sp-core/std&quot;, &quot;sp-inherents/std&quot;, &quot;sp-offchain/std&quot;, &quot;sp-runtime/std&quot;, &quot;sp-session/std&quot;, &quot;sp-std/std&quot;, &quot;sp-transaction-pool/std&quot;, &quot;sp-version/std&quot;, &quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24872" PostHistoryTypeId="5" PostId="6491" RevisionGUID="be9ee121-5b2e-4ac4-9be1-e91f7ecc788e" CreationDate="2022-12-26T14:33:21.737" UserId="3646" Comment="added 6 characters in body" Text="When adding the below section to the rs.lib file produce the error of :&#xD;&#xA;&#xD;&#xA;    **duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.**&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;The section: ***impl section: impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;}*** &#xD;&#xA;&#xD;&#xA;If the rs.lib does not have this section --&gt; no error when building the node.&#xD;&#xA;&#xD;&#xA;The file includes this section: *#![cfg_attr(not(feature = &quot;std&quot;), no_std)] in the lib.rs file.*&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but it does not include the sp_io (see below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;, &#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &quot;frame-benchmarking?/std&quot;, &quot;codec/std&quot;, &quot;scale-info/std&quot;, &quot;frame-executive/std&quot;, &quot;frame-support/std&quot;, &quot;frame-system-rpc-runtime-api/std&quot;, &quot;frame-system/std&quot;, &quot;frame-try-runtime/std&quot;, &quot;pallet-aura/std&quot;, &quot;pallet-balances/std&quot;, &quot;pallet-grandpa/std&quot;, &quot;pallet-randomness-collective-flip/std&quot;, &quot;pallet-sudo/std&quot;, &quot;pallet-template/std&quot;, &quot;pallet-timestamp/std&quot;, &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &quot;pallet-transaction-payment/std&quot;, &quot;sp-api/std&quot;, &quot;sp-block-builder/std&quot;, &quot;sp-consensus-aura/std&quot;, &quot;sp-core/std&quot;, &quot;sp-inherents/std&quot;, &quot;sp-offchain/std&quot;, &quot;sp-runtime/std&quot;, &quot;sp-session/std&quot;, &quot;sp-std/std&quot;, &quot;sp-transaction-pool/std&quot;, &quot;sp-version/std&quot;, &quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24873" PostHistoryTypeId="5" PostId="6491" RevisionGUID="bdaf72ec-4f6a-4316-b4e5-5e3080bc71c0" CreationDate="2022-12-26T14:35:12.083" UserId="3646" Comment="deleted 62 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA;&#xD;&#xA;    ***impl section: impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;    }*** &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    **duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.**&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The file includes this section: *#![cfg_attr(not(feature = &quot;std&quot;), no_std)] in the lib.rs file.*&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but it does not include the sp_io (see below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;, &#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &quot;frame-benchmarking?/std&quot;, &quot;codec/std&quot;, &quot;scale-info/std&quot;, &quot;frame-executive/std&quot;, &quot;frame-support/std&quot;, &quot;frame-system-rpc-runtime-api/std&quot;, &quot;frame-system/std&quot;, &quot;frame-try-runtime/std&quot;, &quot;pallet-aura/std&quot;, &quot;pallet-balances/std&quot;, &quot;pallet-grandpa/std&quot;, &quot;pallet-randomness-collective-flip/std&quot;, &quot;pallet-sudo/std&quot;, &quot;pallet-template/std&quot;, &quot;pallet-timestamp/std&quot;, &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &quot;pallet-transaction-payment/std&quot;, &quot;sp-api/std&quot;, &quot;sp-block-builder/std&quot;, &quot;sp-consensus-aura/std&quot;, &quot;sp-core/std&quot;, &quot;sp-inherents/std&quot;, &quot;sp-offchain/std&quot;, &quot;sp-runtime/std&quot;, &quot;sp-session/std&quot;, &quot;sp-std/std&quot;, &quot;sp-transaction-pool/std&quot;, &quot;sp-version/std&quot;, &quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24874" PostHistoryTypeId="5" PostId="6491" RevisionGUID="36b707d0-59ab-4421-90b9-f582e355f908" CreationDate="2022-12-26T14:35:37.830" UserId="3646" Comment="deleted 10 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA;&#xD;&#xA;    impl section: impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The file includes this section: *#![cfg_attr(not(feature = &quot;std&quot;), no_std)] in the lib.rs file.*&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but it does not include the sp_io (see below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;, &#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &quot;frame-benchmarking?/std&quot;, &quot;codec/std&quot;, &quot;scale-info/std&quot;, &quot;frame-executive/std&quot;, &quot;frame-support/std&quot;, &quot;frame-system-rpc-runtime-api/std&quot;, &quot;frame-system/std&quot;, &quot;frame-try-runtime/std&quot;, &quot;pallet-aura/std&quot;, &quot;pallet-balances/std&quot;, &quot;pallet-grandpa/std&quot;, &quot;pallet-randomness-collective-flip/std&quot;, &quot;pallet-sudo/std&quot;, &quot;pallet-template/std&quot;, &quot;pallet-timestamp/std&quot;, &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &quot;pallet-transaction-payment/std&quot;, &quot;sp-api/std&quot;, &quot;sp-block-builder/std&quot;, &quot;sp-consensus-aura/std&quot;, &quot;sp-core/std&quot;, &quot;sp-inherents/std&quot;, &quot;sp-offchain/std&quot;, &quot;sp-runtime/std&quot;, &quot;sp-session/std&quot;, &quot;sp-std/std&quot;, &quot;sp-transaction-pool/std&quot;, &quot;sp-version/std&quot;, &quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24875" PostHistoryTypeId="5" PostId="6491" RevisionGUID="635d391c-394d-4d3d-a850-5e4d13c9afd7" CreationDate="2022-12-26T14:36:03.447" UserId="3646" Comment="deleted 19 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The file includes this section: *#![cfg_attr(not(feature = &quot;std&quot;), no_std)] in the lib.rs file.*&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but it does not include the sp_io (see below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;, &#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &quot;frame-benchmarking?/std&quot;, &quot;codec/std&quot;, &quot;scale-info/std&quot;, &quot;frame-executive/std&quot;, &quot;frame-support/std&quot;, &quot;frame-system-rpc-runtime-api/std&quot;, &quot;frame-system/std&quot;, &quot;frame-try-runtime/std&quot;, &quot;pallet-aura/std&quot;, &quot;pallet-balances/std&quot;, &quot;pallet-grandpa/std&quot;, &quot;pallet-randomness-collective-flip/std&quot;, &quot;pallet-sudo/std&quot;, &quot;pallet-template/std&quot;, &quot;pallet-timestamp/std&quot;, &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &quot;pallet-transaction-payment/std&quot;, &quot;sp-api/std&quot;, &quot;sp-block-builder/std&quot;, &quot;sp-consensus-aura/std&quot;, &quot;sp-core/std&quot;, &quot;sp-inherents/std&quot;, &quot;sp-offchain/std&quot;, &quot;sp-runtime/std&quot;, &quot;sp-session/std&quot;, &quot;sp-std/std&quot;, &quot;sp-transaction-pool/std&quot;, &quot;sp-version/std&quot;, &quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24876" PostHistoryTypeId="5" PostId="6491" RevisionGUID="34c88a1c-b507-431b-88b1-abc21a2ecd77" CreationDate="2022-12-26T14:36:22.940" UserId="3646" Comment="added 12 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;        } &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The file includes this section: *#![cfg_attr(not(feature = &quot;std&quot;), no_std)] in the lib.rs file.*&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but it does not include the sp_io (see below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;, &#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &quot;frame-benchmarking?/std&quot;, &quot;codec/std&quot;, &quot;scale-info/std&quot;, &quot;frame-executive/std&quot;, &quot;frame-support/std&quot;, &quot;frame-system-rpc-runtime-api/std&quot;, &quot;frame-system/std&quot;, &quot;frame-try-runtime/std&quot;, &quot;pallet-aura/std&quot;, &quot;pallet-balances/std&quot;, &quot;pallet-grandpa/std&quot;, &quot;pallet-randomness-collective-flip/std&quot;, &quot;pallet-sudo/std&quot;, &quot;pallet-template/std&quot;, &quot;pallet-timestamp/std&quot;, &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &quot;pallet-transaction-payment/std&quot;, &quot;sp-api/std&quot;, &quot;sp-block-builder/std&quot;, &quot;sp-consensus-aura/std&quot;, &quot;sp-core/std&quot;, &quot;sp-inherents/std&quot;, &quot;sp-offchain/std&quot;, &quot;sp-runtime/std&quot;, &quot;sp-session/std&quot;, &quot;sp-std/std&quot;, &quot;sp-transaction-pool/std&quot;, &quot;sp-version/std&quot;, &quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24877" PostHistoryTypeId="5" PostId="6491" RevisionGUID="206726a2-7d5d-442a-9cc3-d91106d4946c" CreationDate="2022-12-26T14:37:11.360" UserId="3646" Comment="edited body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;        } &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]` in the lib.rs file.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but it does not include the sp_io (see below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;, &#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &quot;frame-benchmarking?/std&quot;, &quot;codec/std&quot;, &quot;scale-info/std&quot;, &quot;frame-executive/std&quot;, &quot;frame-support/std&quot;, &quot;frame-system-rpc-runtime-api/std&quot;, &quot;frame-system/std&quot;, &quot;frame-try-runtime/std&quot;, &quot;pallet-aura/std&quot;, &quot;pallet-balances/std&quot;, &quot;pallet-grandpa/std&quot;, &quot;pallet-randomness-collective-flip/std&quot;, &quot;pallet-sudo/std&quot;, &quot;pallet-template/std&quot;, &quot;pallet-timestamp/std&quot;, &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &quot;pallet-transaction-payment/std&quot;, &quot;sp-api/std&quot;, &quot;sp-block-builder/std&quot;, &quot;sp-consensus-aura/std&quot;, &quot;sp-core/std&quot;, &quot;sp-inherents/std&quot;, &quot;sp-offchain/std&quot;, &quot;sp-runtime/std&quot;, &quot;sp-session/std&quot;, &quot;sp-std/std&quot;, &quot;sp-transaction-pool/std&quot;, &quot;sp-version/std&quot;, &quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24878" PostHistoryTypeId="5" PostId="6491" RevisionGUID="ddfa679c-372a-4fc2-94f4-bb5a05640a6a" CreationDate="2022-12-26T14:37:47.790" UserId="3646" Comment="added 11 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;        } &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]` in the lib.rs file.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but it does not include the sp_io (see part of it below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;, &#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &quot;frame-benchmarking?/std&quot;, &quot;codec/std&quot;, &quot;scale-info/std&quot;, &quot;frame-executive/std&quot;, &quot;frame-support/std&quot;, &quot;frame-system-rpc-runtime-api/std&quot;, &quot;frame-system/std&quot;, &quot;frame-try-runtime/std&quot;, &quot;pallet-aura/std&quot;, &quot;pallet-balances/std&quot;, &quot;pallet-grandpa/std&quot;, &quot;pallet-randomness-collective-flip/std&quot;, &quot;pallet-sudo/std&quot;, &quot;pallet-template/std&quot;, &quot;pallet-timestamp/std&quot;, &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &quot;pallet-transaction-payment/std&quot;, &quot;sp-api/std&quot;, &quot;sp-block-builder/std&quot;, &quot;sp-consensus-aura/std&quot;, &quot;sp-core/std&quot;, &quot;sp-inherents/std&quot;, &quot;sp-offchain/std&quot;, &quot;sp-runtime/std&quot;, &quot;sp-session/std&quot;, &quot;sp-std/std&quot;, &quot;sp-transaction-pool/std&quot;, &quot;sp-version/std&quot;, &quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24879" PostHistoryTypeId="5" PostId="6491" RevisionGUID="95a5a44d-c8a9-476a-a243-67028871b18c" CreationDate="2022-12-26T14:38:21.970" UserId="3646" Comment="deleted 3 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;        } &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]` in the lib.rs file.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but does not include the sp_io (see part of it below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;, &#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &quot;frame-benchmarking?/std&quot;, &quot;codec/std&quot;, &quot;scale-info/std&quot;, &quot;frame-executive/std&quot;, &quot;frame-support/std&quot;, &quot;frame-system-rpc-runtime-api/std&quot;, &quot;frame-system/std&quot;, &quot;frame-try-runtime/std&quot;, &quot;pallet-aura/std&quot;, &quot;pallet-balances/std&quot;, &quot;pallet-grandpa/std&quot;, &quot;pallet-randomness-collective-flip/std&quot;, &quot;pallet-sudo/std&quot;, &quot;pallet-template/std&quot;, &quot;pallet-timestamp/std&quot;, &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &quot;pallet-transaction-payment/std&quot;, &quot;sp-api/std&quot;, &quot;sp-block-builder/std&quot;, &quot;sp-consensus-aura/std&quot;, &quot;sp-core/std&quot;, &quot;sp-inherents/std&quot;, &quot;sp-offchain/std&quot;, &quot;sp-runtime/std&quot;, &quot;sp-session/std&quot;, &quot;sp-std/std&quot;, &quot;sp-transaction-pool/std&quot;, &quot;sp-version/std&quot;, &quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24880" PostHistoryTypeId="5" PostId="6491" RevisionGUID="3dbc04be-eb00-4242-867a-f1ac933588d1" CreationDate="2022-12-26T14:40:48.287" UserId="3646" Comment="added 53 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;        } &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]` in the lib.rs file.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but does not include the sp_io (see part of it below)&#xD;&#xA;&#xD;&#xA;[features] default = [&quot;std&quot;] &#xD;&#xA;&#xD;&#xA;std = [ &#xD;&#xA;&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;&quot;frame-system-benchmarking?/std&quot;, &#xD;&#xA;&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;&quot;codec/std&quot;,&#xD;&#xA;&quot;scale-info/std&quot;,&#xD;&#xA;&quot;frame-executive/std&quot;, &#xD;&#xA;&quot;frame-support/std&quot;, &#xD;&#xA;&quot;frame-system-rpc-runtime-api/std&quot;, &#xD;&#xA;&quot;frame-system/std&quot;, &#xD;&#xA;&quot;frame-try-runtime/std&quot;,&#xD;&#xA;&quot;pallet-aura/std&quot;, &#xD;&#xA;&quot;pallet-balances/std&quot;, &#xD;&#xA;&quot;pallet-grandpa/std&quot;, &#xD;&#xA;&quot;pallet-randomness-collective-flip/std&quot;, &#xD;&#xA;&quot;pallet-sudo/std&quot;, &#xD;&#xA;&quot;pallet-template/std&quot;, &#xD;&#xA;&quot;pallet-timestamp/std&quot;, &#xD;&#xA;&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &#xD;&#xA;&quot;pallet-transaction-payment/std&quot;, &#xD;&#xA;&quot;sp-api/std&quot;, &#xD;&#xA;&quot;sp-block-builder/std&quot;, &#xD;&#xA;&quot;sp-consensus-aura/std&quot;, &#xD;&#xA;&quot;sp-core/std&quot;, &#xD;&#xA;&quot;sp-inherents/std&quot;, &#xD;&#xA;&quot;sp-offchain/std&quot;, &#xD;&#xA;&quot;sp-runtime/std&quot;, &#xD;&#xA;&quot;sp-session/std&quot;, &#xD;&#xA;&quot;sp-std/std&quot;, &#xD;&#xA;&quot;sp-transaction-pool/std&quot;, &#xD;&#xA;&quot;sp-version/std&quot;, &#xD;&#xA;&quot;pallet-node-authorization/std&quot;&#xD;&#xA; ] &#xD;&#xA;runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24881" PostHistoryTypeId="5" PostId="6491" RevisionGUID="597069c7-7af9-43cf-b1f0-b21d7b0649a6" CreationDate="2022-12-26T14:41:14.237" UserId="3646" Comment="added 144 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;        } &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]` in the lib.rs file.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but does not include the sp_io (see part of it below)&#xD;&#xA;&#xD;&#xA;    [features] default = [&quot;std&quot;] &#xD;&#xA;    &#xD;&#xA;    std = [ &#xD;&#xA;    &quot;frame-try-runtime?/std&quot;,&#xD;&#xA;    &quot;frame-system-benchmarking?/std&quot;, &#xD;&#xA;    &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;    &quot;codec/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;    &quot;frame-executive/std&quot;, &#xD;&#xA;    &quot;frame-support/std&quot;, &#xD;&#xA;    &quot;frame-system-rpc-runtime-api/std&quot;, &#xD;&#xA;    &quot;frame-system/std&quot;, &#xD;&#xA;    &quot;frame-try-runtime/std&quot;,&#xD;&#xA;    &quot;pallet-aura/std&quot;, &#xD;&#xA;    &quot;pallet-balances/std&quot;, &#xD;&#xA;    &quot;pallet-grandpa/std&quot;, &#xD;&#xA;    &quot;pallet-randomness-collective-flip/std&quot;, &#xD;&#xA;    &quot;pallet-sudo/std&quot;, &#xD;&#xA;    &quot;pallet-template/std&quot;, &#xD;&#xA;    &quot;pallet-timestamp/std&quot;, &#xD;&#xA;    &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &#xD;&#xA;    &quot;pallet-transaction-payment/std&quot;, &#xD;&#xA;    &quot;sp-api/std&quot;, &#xD;&#xA;    &quot;sp-block-builder/std&quot;, &#xD;&#xA;    &quot;sp-consensus-aura/std&quot;, &#xD;&#xA;    &quot;sp-core/std&quot;, &#xD;&#xA;    &quot;sp-inherents/std&quot;, &#xD;&#xA;    &quot;sp-offchain/std&quot;, &#xD;&#xA;    &quot;sp-runtime/std&quot;, &#xD;&#xA;    &quot;sp-session/std&quot;, &#xD;&#xA;    &quot;sp-std/std&quot;, &#xD;&#xA;    &quot;sp-transaction-pool/std&quot;, &#xD;&#xA;    &quot;sp-version/std&quot;, &#xD;&#xA;    &quot;pallet-node-authorization/std&quot;&#xD;&#xA;     ] &#xD;&#xA;    runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24882" PostHistoryTypeId="2" PostId="6492" RevisionGUID="67de1d0b-bdb5-48fa-b430-3150b76b0142" CreationDate="2022-12-26T16:19:31.340" UserId="3346" Text="We are running a test chain based on the Substrate kitchen-sink node (code here: https://github.com/SparticleConcepts/Geode-Substrate) and using the https://polkadot.js.org/apps/ UI. We can &#xD;&#xA;&#xD;&#xA;1. submit a treasury proposal &#xD;&#xA;2. send the proposal to the council for vote&#xD;&#xA;3. vote on the proposal, meeting the threshold for aye votes&#xD;&#xA;4. the proposal will then not allow further voting (assumedly because the threshold has been met)&#xD;&#xA;&#xD;&#xA;AT THIS POINT, the proposal will NOT appear as approved, will NOT payout, and CANNOT be closed. It just sits there **well past the spend period waiting period**. &#xD;&#xA;&#xD;&#xA;There is plenty of money in the treasury to cover the proposals and each has a unanimous aye vote satisfying the threshold.&#xD;&#xA;&#xD;&#xA;Note: Proposals that meet the NAY threshold CAN be closed. But not proposals the meet the AYE threshold. &#xD;&#xA;&#xD;&#xA;**Once a proposal meets the threshold for AYE votes, What must be done next to show a treasury proposal as 'approved' and to make it pay out?**&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24884" PostHistoryTypeId="1" PostId="6492" RevisionGUID="67de1d0b-bdb5-48fa-b430-3150b76b0142" CreationDate="2022-12-26T16:19:31.340" UserId="3346" Text="Polkadot JS Apps UI - Treasury Proposals - Threshold met but proposals not listed as approved, unable to close" ContentLicense="CC BY-SA 4.0" />
  <row Id="24885" PostHistoryTypeId="3" PostId="6492" RevisionGUID="67de1d0b-bdb5-48fa-b430-3150b76b0142" CreationDate="2022-12-26T16:19:31.340" UserId="3346" Text="|polkadot-js|pallet-treasury|treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24890" PostHistoryTypeId="5" PostId="6491" RevisionGUID="88517a3d-e1c5-4dfe-bf6f-443dc64748d8" CreationDate="2022-12-26T16:32:28.243" UserId="-1" Comment="less words" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {....&#xD;&#xA;        } &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The lib.rs file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]`.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but does not include the sp_io (see part of it below)&#xD;&#xA;&#xD;&#xA;    [features] default = [&quot;std&quot;] &#xD;&#xA;    &#xD;&#xA;    std = [ &#xD;&#xA;    &quot;frame-try-runtime?/std&quot;,&#xD;&#xA;    &quot;frame-system-benchmarking?/std&quot;, &#xD;&#xA;    &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;    &quot;codec/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;    &quot;frame-executive/std&quot;, &#xD;&#xA;    &quot;frame-support/std&quot;, &#xD;&#xA;    &quot;frame-system-rpc-runtime-api/std&quot;, &#xD;&#xA;    &quot;frame-system/std&quot;, &#xD;&#xA;    &quot;frame-try-runtime/std&quot;,&#xD;&#xA;    &quot;pallet-aura/std&quot;, &#xD;&#xA;    &quot;pallet-balances/std&quot;, &#xD;&#xA;    &quot;pallet-grandpa/std&quot;, &#xD;&#xA;    &quot;pallet-randomness-collective-flip/std&quot;, &#xD;&#xA;    &quot;pallet-sudo/std&quot;, &#xD;&#xA;    &quot;pallet-template/std&quot;, &#xD;&#xA;    &quot;pallet-timestamp/std&quot;, &#xD;&#xA;    &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &#xD;&#xA;    &quot;pallet-transaction-payment/std&quot;, &#xD;&#xA;    &quot;sp-api/std&quot;, &#xD;&#xA;    &quot;sp-block-builder/std&quot;, &#xD;&#xA;    &quot;sp-consensus-aura/std&quot;, &#xD;&#xA;    &quot;sp-core/std&quot;, &#xD;&#xA;    &quot;sp-inherents/std&quot;, &#xD;&#xA;    &quot;sp-offchain/std&quot;, &#xD;&#xA;    &quot;sp-runtime/std&quot;, &#xD;&#xA;    &quot;sp-session/std&quot;, &#xD;&#xA;    &quot;sp-std/std&quot;, &#xD;&#xA;    &quot;sp-transaction-pool/std&quot;, &#xD;&#xA;    &quot;sp-version/std&quot;, &#xD;&#xA;    &quot;pallet-node-authorization/std&quot;&#xD;&#xA;     ] &#xD;&#xA;    runtime-benchmarks = [......" ContentLicense="CC BY-SA 4.0" />
  <row Id="24891" PostHistoryTypeId="4" PostId="6491" RevisionGUID="88517a3d-e1c5-4dfe-bf6f-443dc64748d8" CreationDate="2022-12-26T16:32:28.243" UserId="-1" Comment="less words" Text="Duplicate lang item in crate `sp_io` when adding impl section to the lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="24892" PostHistoryTypeId="24" PostId="6491" RevisionGUID="88517a3d-e1c5-4dfe-bf6f-443dc64748d8" CreationDate="2022-12-26T16:32:28.243" Comment="Proposed by anonymous approved by 3646 edit id of 363" ContentLicense="CC BY-SA 4.0" />
  <row Id="24893" PostHistoryTypeId="5" PostId="686" RevisionGUID="cbaa71c0-73b8-4e88-983e-ff5ef6c947f7" CreationDate="2022-12-26T16:35:49.067" UserId="234" Comment="Update the link in the docs" Text="You should use `#[pallet::compact]` wherever the type allows it, and you want to take advantage of compact encoding to reduce the amount of bytes that is needed to call an extrinsic.&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/reference/scale-codec/ (Compact/general integers)&#xD;&#xA;&#xD;&#xA;As a small reminder, `compact` encoding allows types like `0u64` to be represented as only 1 byte `0x00` rather than 8 bytes. This kind of &quot;compactification&quot; will be true for all small values, while it may introduce up to one additional byte overall for only the largest numbers.&#xD;&#xA;&#xD;&#xA;So, by telling your pallet to expect a compact integer, you can on average reduce the number of bytes which are used to successfully call an extrinsic. This can reduce the overall size of your blockchain, and also reduce the fees for the end user.&#xD;&#xA;&#xD;&#xA;This is never required, but is nice to include when the situation makes sense.&#xD;&#xA;&#xD;&#xA;Note that changing between compact and non-compact encoding is a transaction version breaking change, since things like hardware wallets will expect to encode transaction in one of these specific ways." ContentLicense="CC BY-SA 4.0" />
  <row Id="24894" PostHistoryTypeId="5" PostId="278" RevisionGUID="d0d15a89-9066-4a4a-b778-8bf57747f9e0" CreationDate="2022-12-26T16:40:23.107" UserId="234" Comment="Updated the link to the page in the docs" Text="SCALE codec is an efficient serializer and deserializer built for Substrate chains. It is lightweight, platform agnostic and enables compact encoding of Rust types and data structures.&#xD;&#xA;&#xD;&#xA;In order to understand why Substrate uses SCALE, it helps to think about the constrains we're working with in the runtime of the blockchains we're building. We have limited storage and decoding values needs to be fast and efficient. All types and custom data structures a runtime exposes need to be in the most compact and light weight form. So we use SCALE because it can give us those guarantees. What makes it suitable for this:&#xD;&#xA;- It's built for little endian architectures, making it suitable for Wasm.&#xD;&#xA;- It uses bijectiveness, making it efficient for checking equality between two functions.&#xD;&#xA;- It guarantees that data is as light as possible, supporting compact encoding of values.&#xD;&#xA;&#xD;&#xA;Thus, the SCALE specification is a critical piece enabling applications to interact with a runtime. For an application (such as a front-end, CLI or blockchain client) to send a transaction to a runtime, it will need to encode data for the runtime to process it. Similarly, when an application receives data from the runtime, it will need to decode it. &#xD;&#xA;&#xD;&#xA;Applications built for Substrate chains can implement a codec library in any language so long as it follows the SCALE specification. You can find some implementations of SCALE in different languages [here](https://docs.substrate.io/reference/scale-codec/).&#xD;&#xA;&#xD;&#xA;[This page](https://docs.substrate.io/reference/scale-codec/) has some more details on the encoding of various types." ContentLicense="CC BY-SA 4.0" />
  <row Id="24895" PostHistoryTypeId="5" PostId="1508" RevisionGUID="ec603f36-8ac3-4094-abc9-2bb0526cc293" CreationDate="2022-12-26T17:19:14.080" UserId="234" Comment="Updated the link to the &quot;SCALE&quot; page in the docs" Text="In general, issues like this are due to incorrectly encoding `Vec` in SCALE.&#xD;&#xA;&#xD;&#xA;All `Vec`s are [prepended with their length](https://docs.substrate.io/reference/scale-codec/) (section *Vectors (lists, series, sets)*).&#xD;&#xA;&#xD;&#xA;&gt; A collection of same-typed values is encoded, prefixed with a compact encoding of the number of items, followed by each item's encoding concatenated in turn.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;Vector of unsigned 16-bit integers:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[4, 8, 15, 16, 23, 42]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;SCALE Bytes:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x18040008000f00100017002a00&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where `0x18` is the hex representation of the number 24, which is the byte length of the vector: 6 digits that are each 4 bytes.&#xD;&#xA;&#xD;&#xA;When an error like:&#xD;&#xA;&#xD;&#xA;&gt; createType(Vec&lt;u8&gt;):: Bytes: required length less than remainder, expected at least 54, found 32&#xD;&#xA;&#xD;&#xA;Shows up, it means that it is trying to read the first bytes as the length, and the length it is reading does not match the actual available bytes, implying something was encoded incorrectly.&#xD;&#xA;&#xD;&#xA;In this case, the first bytes read as &quot;the length of this vector is 54 bytes&quot;, and then the actual vector is only 32 bytes long, which is clearly an error." ContentLicense="CC BY-SA 4.0" />
  <row Id="24896" PostHistoryTypeId="5" PostId="2150" RevisionGUID="66796e1e-148f-4710-a975-8442623d488c" CreationDate="2022-12-26T17:41:37.597" UserId="234" Comment="Updated the link to the &quot;SCALE&quot; page in the docs" Text="Should be something like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let bytes: Vec&lt;u8&gt; = (pallet_idx, call_idx).encode();&#xD;&#xA;let call: Call = Decode::decode::&lt;Call&gt;(&amp;mut &amp;bytes);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For these kinds of questions, reviewing how [SCALE codec](https://docs.substrate.io/reference/scale-codec/) works is helpful, and then realizing that all types are just bytes, and can be arbitrarily passed back and forth from encoding and decoding." ContentLicense="CC BY-SA 4.0" />
  <row Id="24899" PostHistoryTypeId="2" PostId="6495" RevisionGUID="c96914c4-2f78-4a66-acf7-4c36941b29d0" CreationDate="2022-12-26T21:18:31.877" UserId="2163" Text="Collators create PoV blocks and provide them with candidate blocks from the parachian to the relay chain. So they don't do any of the block authoring since this is done by the validators.&#xD;&#xA;&#xD;&#xA;But is there any incentive for someone to run a collator or is it only to support a specific parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24901" PostHistoryTypeId="1" PostId="6495" RevisionGUID="c96914c4-2f78-4a66-acf7-4c36941b29d0" CreationDate="2022-12-26T21:18:31.877" UserId="2163" Text="Are there any incentives for collators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24902" PostHistoryTypeId="3" PostId="6495" RevisionGUID="c96914c4-2f78-4a66-acf7-4c36941b29d0" CreationDate="2022-12-26T21:18:31.877" UserId="2163" Text="|parachain-collator|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24903" PostHistoryTypeId="2" PostId="6496" RevisionGUID="ac981656-da20-45f2-9562-b12bbf3a7ad8" CreationDate="2022-12-27T03:46:45.750" UserId="251" Text="It depends on the chain.&#xD;&#xA;&#xD;&#xA;On parachain-template, the system will share some tx fee with collators. https://github.com/substrate-developer-hub/substrate-parachain-template/blob/664114fe707c089c112a2db770403cccf01c256d/runtime/src/lib.rs#L435&#xD;&#xA;&#xD;&#xA;On Darwinia, we have [darwinia-staking](https://github.com/darwinia-network/darwinia-2.0/tree/main/pallet/staking).&#xD;&#xA;&#xD;&#xA;On Moonbeam, they have [parachain-staking](https://github.com/PureStake/moonbeam/tree/master/pallets/parachain-staking)." ContentLicense="CC BY-SA 4.0" />
  <row Id="24905" PostHistoryTypeId="4" PostId="6491" RevisionGUID="f962a074-286b-4920-a97c-488cffd85a97" CreationDate="2022-12-27T06:58:45.877" UserId="3646" Comment="edited title" Text="Duplicate lang item in crate `sp_io` when adding pallet_node_authorization impl section to the lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="24906" PostHistoryTypeId="5" PostId="6491" RevisionGUID="7e04a892-715f-4516-99ab-80e511a8385f" CreationDate="2022-12-27T07:01:28.357" UserId="3646" Comment="added 375 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;       type RuntimeEvent = RuntimeEvent;&#xD;&#xA;       type MaxWellKnownNodes = MaxWellKnownNodes;&#xD;&#xA;       type MaxPeerIdLength = MaxPeerIdLength;&#xD;&#xA;       type AddOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type RemoveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type SwapOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type ResetOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type WeightInfo = ();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The lib.rs file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]`.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but does not include the sp_io (see part of it below)&#xD;&#xA;&#xD;&#xA;    [features] default = [&quot;std&quot;] &#xD;&#xA;    &#xD;&#xA;    std = [ &#xD;&#xA;    &quot;frame-try-runtime?/std&quot;,&#xD;&#xA;    &quot;frame-system-benchmarking?/std&quot;, &#xD;&#xA;    &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;    &quot;codec/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;    &quot;frame-executive/std&quot;, &#xD;&#xA;    &quot;frame-support/std&quot;, &#xD;&#xA;    &quot;frame-system-rpc-runtime-api/std&quot;, &#xD;&#xA;    &quot;frame-system/std&quot;, &#xD;&#xA;    &quot;frame-try-runtime/std&quot;,&#xD;&#xA;    &quot;pallet-aura/std&quot;, &#xD;&#xA;    &quot;pallet-balances/std&quot;, &#xD;&#xA;    &quot;pallet-grandpa/std&quot;, &#xD;&#xA;    &quot;pallet-randomness-collective-flip/std&quot;, &#xD;&#xA;    &quot;pallet-sudo/std&quot;, &#xD;&#xA;    &quot;pallet-template/std&quot;, &#xD;&#xA;    &quot;pallet-timestamp/std&quot;, &#xD;&#xA;    &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &#xD;&#xA;    &quot;pallet-transaction-payment/std&quot;, &#xD;&#xA;    &quot;sp-api/std&quot;, &#xD;&#xA;    &quot;sp-block-builder/std&quot;, &#xD;&#xA;    &quot;sp-consensus-aura/std&quot;, &#xD;&#xA;    &quot;sp-core/std&quot;, &#xD;&#xA;    &quot;sp-inherents/std&quot;, &#xD;&#xA;    &quot;sp-offchain/std&quot;, &#xD;&#xA;    &quot;sp-runtime/std&quot;, &#xD;&#xA;    &quot;sp-session/std&quot;, &#xD;&#xA;    &quot;sp-std/std&quot;, &#xD;&#xA;    &quot;sp-transaction-pool/std&quot;, &#xD;&#xA;    &quot;sp-version/std&quot;, &#xD;&#xA;    &quot;pallet-node-authorization/std&quot;&#xD;&#xA;     ] &#xD;&#xA;    runtime-benchmarks = [......&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24908" PostHistoryTypeId="5" PostId="6491" RevisionGUID="42259a25-86c3-4d9c-bdbb-63c23ec449e0" CreationDate="2022-12-27T07:11:07.283" UserId="3646" Comment="added 984 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;       type RuntimeEvent = RuntimeEvent;&#xD;&#xA;       type MaxWellKnownNodes = MaxWellKnownNodes;&#xD;&#xA;       type MaxPeerIdLength = MaxPeerIdLength;&#xD;&#xA;       type AddOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type RemoveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type SwapOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type ResetOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type WeightInfo = ();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;The same error occurs when add the last row to the construct_runtime &#xD;&#xA;&#xD;&#xA;    construct_runtime!(&#xD;&#xA;            pub struct Runtime&#xD;&#xA;            where&#xD;&#xA;                    Block = Block,&#xD;&#xA;                    NodeBlock = opaque::Block,&#xD;&#xA;                    UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;            {&#xD;&#xA;                    System: frame_system,&#xD;&#xA;                    RandomnessCollectiveFlip: &#xD;&#xA;                        pallet_randomness_collective_flip,&#xD;&#xA;                    Timestamp: pallet_timestamp,&#xD;&#xA;                    Aura: pallet_aura,&#xD;&#xA;                    Grandpa: pallet_grandpa,&#xD;&#xA;                    Balances: pallet_balances,&#xD;&#xA;                    TransactionPayment: pallet_transaction_payment,&#xD;&#xA;                    Sudo: pallet_sudo,&#xD;&#xA;     &#xD;&#xA;                    TemplateModule: pallet_template,&#xD;&#xA;                    NodeAuthorization: pallet_node_authorization::{Pallet, &#xD;&#xA;                        Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;}&#xD;&#xA;            }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The lib.rs file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]`.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml is big but does not include the sp_io (see part of it below)&#xD;&#xA;&#xD;&#xA;    [features] default = [&quot;std&quot;] &#xD;&#xA;    &#xD;&#xA;    std = [ &#xD;&#xA;    &quot;frame-try-runtime?/std&quot;,&#xD;&#xA;    &quot;frame-system-benchmarking?/std&quot;, &#xD;&#xA;    &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;    &quot;codec/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;    &quot;frame-executive/std&quot;, &#xD;&#xA;    &quot;frame-support/std&quot;, &#xD;&#xA;    &quot;frame-system-rpc-runtime-api/std&quot;, &#xD;&#xA;    &quot;frame-system/std&quot;, &#xD;&#xA;    &quot;frame-try-runtime/std&quot;,&#xD;&#xA;    &quot;pallet-aura/std&quot;, &#xD;&#xA;    &quot;pallet-balances/std&quot;, &#xD;&#xA;    &quot;pallet-grandpa/std&quot;, &#xD;&#xA;    &quot;pallet-randomness-collective-flip/std&quot;, &#xD;&#xA;    &quot;pallet-sudo/std&quot;, &#xD;&#xA;    &quot;pallet-template/std&quot;, &#xD;&#xA;    &quot;pallet-timestamp/std&quot;, &#xD;&#xA;    &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;, &#xD;&#xA;    &quot;pallet-transaction-payment/std&quot;, &#xD;&#xA;    &quot;sp-api/std&quot;, &#xD;&#xA;    &quot;sp-block-builder/std&quot;, &#xD;&#xA;    &quot;sp-consensus-aura/std&quot;, &#xD;&#xA;    &quot;sp-core/std&quot;, &#xD;&#xA;    &quot;sp-inherents/std&quot;, &#xD;&#xA;    &quot;sp-offchain/std&quot;, &#xD;&#xA;    &quot;sp-runtime/std&quot;, &#xD;&#xA;    &quot;sp-session/std&quot;, &#xD;&#xA;    &quot;sp-std/std&quot;, &#xD;&#xA;    &quot;sp-transaction-pool/std&quot;, &#xD;&#xA;    &quot;sp-version/std&quot;, &#xD;&#xA;    &quot;pallet-node-authorization/std&quot;&#xD;&#xA;     ] &#xD;&#xA;    runtime-benchmarks = [......&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24909" PostHistoryTypeId="5" PostId="6496" RevisionGUID="5e9a54ca-d1f6-486c-9c46-9d2ac492e63f" CreationDate="2022-12-27T07:50:24.930" UserId="251" Comment="added 27 characters in body" Text="It depends on the chain.&#xD;&#xA;&#xD;&#xA;It's totally up to you.&#xD;&#xA;&#xD;&#xA;On parachain-template, the system will share some tx fee with collators. https://github.com/substrate-developer-hub/substrate-parachain-template/blob/664114fe707c089c112a2db770403cccf01c256d/runtime/src/lib.rs#L435&#xD;&#xA;&#xD;&#xA;On Darwinia, we have [darwinia-staking](https://github.com/darwinia-network/darwinia-2.0/tree/main/pallet/staking).&#xD;&#xA;&#xD;&#xA;On Moonbeam, they have [parachain-staking](https://github.com/PureStake/moonbeam/tree/master/pallets/parachain-staking)." ContentLicense="CC BY-SA 4.0" />
  <row Id="24910" PostHistoryTypeId="4" PostId="6491" RevisionGUID="38f024f9-1fbb-4ac1-9406-deeed1501abf" CreationDate="2022-12-27T07:58:44.263" UserId="3646" Comment="edited title" Text="Duplicate lang item in crate `sp_io` when adding pallet_node_authorization (or any other pallet) impl section to the lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="24911" PostHistoryTypeId="5" PostId="6491" RevisionGUID="94d352e3-4fd5-41fa-b729-1a474a089fe4" CreationDate="2022-12-27T09:23:18.310" UserId="3646" Comment="added 6910 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;       type RuntimeEvent = RuntimeEvent;&#xD;&#xA;       type MaxWellKnownNodes = MaxWellKnownNodes;&#xD;&#xA;       type MaxPeerIdLength = MaxPeerIdLength;&#xD;&#xA;       type AddOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type RemoveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type SwapOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type ResetOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type WeightInfo = ();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;The same error occurs when add the last row to the construct_runtime &#xD;&#xA;&#xD;&#xA;    construct_runtime!(&#xD;&#xA;            pub struct Runtime&#xD;&#xA;            where&#xD;&#xA;                    Block = Block,&#xD;&#xA;                    NodeBlock = opaque::Block,&#xD;&#xA;                    UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;            {&#xD;&#xA;                    System: frame_system,&#xD;&#xA;                    RandomnessCollectiveFlip: &#xD;&#xA;                        pallet_randomness_collective_flip,&#xD;&#xA;                    Timestamp: pallet_timestamp,&#xD;&#xA;                    Aura: pallet_aura,&#xD;&#xA;                    Grandpa: pallet_grandpa,&#xD;&#xA;                    Balances: pallet_balances,&#xD;&#xA;                    TransactionPayment: pallet_transaction_payment,&#xD;&#xA;                    Sudo: pallet_sudo,&#xD;&#xA;     &#xD;&#xA;                    TemplateModule: pallet_template,&#xD;&#xA;                    NodeAuthorization: pallet_node_authorization::{Pallet, &#xD;&#xA;                        Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;}&#xD;&#xA;            }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The lib.rs file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]`.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml :&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;node-template-runtime&quot;&#xD;&#xA;    version = &quot;4.0.0-dev&quot;&#xD;&#xA;    description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;    authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;    homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    license = &quot;Unlicense&quot;&#xD;&#xA;    publish = false&#xD;&#xA;    repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;    &#xD;&#xA;    [package.metadata.docs.rs]&#xD;&#xA;    targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    &#xD;&#xA;    pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-randomness-collective-flip = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-core = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-runtime = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-std = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-version = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-nicks = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    &#xD;&#xA;    # Used for the node template's RPCs&#xD;&#xA;    frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot;&gt;&#xD;&#xA;    &#xD;&#xA;    # Used for runtime benchmarking&#xD;&#xA;    frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.33&gt;&#xD;&#xA;    &#xD;&#xA;    # Local Dependencies&#xD;&#xA;    pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;    &#xD;&#xA;    [build-dependencies]&#xD;&#xA;    substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;            &quot;frame-try-runtime?/std&quot;,&#xD;&#xA;            &quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;            &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;            &quot;codec/std&quot;,&#xD;&#xA;           &quot;scale-info/std&quot;,&#xD;&#xA;            &quot;frame-executive/std&quot;,&#xD;&#xA;            &quot;frame-support/std&quot;,&#xD;&#xA;            &quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;            &quot;frame-system/std&quot;,&#xD;&#xA;            &quot;frame-try-runtime/std&quot;,&#xD;&#xA;            &quot;pallet-aura/std&quot;,&#xD;&#xA;            &quot;pallet-balances/std&quot;,&#xD;&#xA;            &quot;pallet-grandpa/std&quot;,&#xD;&#xA;            &quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;            &quot;pallet-sudo/std&quot;,&#xD;&#xA;            &quot;pallet-template/std&quot;,&#xD;&#xA;            &quot;pallet-timestamp/std&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;            &quot;sp-api/std&quot;,&#xD;&#xA;            &quot;sp-block-builder/std&quot;,&#xD;&#xA;            &quot;sp-consensus-aura/std&quot;,&#xD;&#xA;            &quot;sp-core/std&quot;,&#xD;&#xA;            &quot;sp-inherents/std&quot;,&#xD;&#xA;            &quot;sp-offchain/std&quot;,&#xD;&#xA;            &quot;sp-runtime/std&quot;,&#xD;&#xA;            &quot;sp-session/std&quot;,&#xD;&#xA;            &quot;sp-std/std&quot;,&#xD;&#xA;            &quot;sp-transaction-pool/std&quot;,&#xD;&#xA;            &quot;sp-version/std&quot;,&#xD;&#xA;            &quot;pallet-node-authorization/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;    runtime-benchmarks = [&#xD;&#xA;            &quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;    ]&#xD;&#xA;    try-runtime = [&#xD;&#xA;            &quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;            &quot;frame-executive/try-runtime&quot;,&#xD;&#xA;            &quot;frame-system/try-runtime&quot;,&#xD;&#xA;            &quot;frame-support/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-template/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24912" PostHistoryTypeId="2" PostId="6497" RevisionGUID="d0f45313-414b-4ed5-ba0f-73b6d614ce1e" CreationDate="2022-12-27T10:18:25.957" UserId="3438" Text="How do I get the list of all the assets that are present and their supply in Statemint?&#xD;&#xA;&#xD;&#xA;Ideally either with Polkadot-JS api or py-substrate-interface." ContentLicense="CC BY-SA 4.0" />
  <row Id="24914" PostHistoryTypeId="1" PostId="6497" RevisionGUID="d0f45313-414b-4ed5-ba0f-73b6d614ce1e" CreationDate="2022-12-27T10:18:25.957" UserId="3438" Text="List of assets on Statemint" ContentLicense="CC BY-SA 4.0" />
  <row Id="24915" PostHistoryTypeId="3" PostId="6497" RevisionGUID="d0f45313-414b-4ed5-ba0f-73b6d614ce1e" CreationDate="2022-12-27T10:18:25.957" UserId="3438" Text="|polkadot-js|python|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24916" PostHistoryTypeId="2" PostId="6498" RevisionGUID="0cccd61e-c73e-4269-8868-5a7f684b1dce" CreationDate="2022-12-27T10:19:20.637" UserId="3440" Text="I am using the substrate development node and each time I stop the node I lose all the data stored on the blocks. &#xD;&#xA;&#xD;&#xA;Is there a way to store these blocks so that I can access them even when I restart the development node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24918" PostHistoryTypeId="1" PostId="6498" RevisionGUID="0cccd61e-c73e-4269-8868-5a7f684b1dce" CreationDate="2022-12-27T10:19:20.637" UserId="3440" Text="how to store blocks of development node" ContentLicense="CC BY-SA 4.0" />
  <row Id="24919" PostHistoryTypeId="3" PostId="6498" RevisionGUID="0cccd61e-c73e-4269-8868-5a7f684b1dce" CreationDate="2022-12-27T10:19:20.637" UserId="3440" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24920" PostHistoryTypeId="2" PostId="6499" RevisionGUID="a8907d6e-a53c-4a74-a0bd-e653d9629c0f" CreationDate="2022-12-27T10:57:48.363" UserId="140" Text="This error is mostly about that not having `std` feature of any dependency in `cargo.toml`.&#xD;&#xA;&#xD;&#xA;In your case, `pallet-nicks` does not have std feature in `Cargo.toml`. Either remove `pallet-nicks`, if you are not using it or add `pallet-nicks/std` in std features list." ContentLicense="CC BY-SA 4.0" />
  <row Id="24922" PostHistoryTypeId="2" PostId="6500" RevisionGUID="bf13c4c9-c77e-4c3b-934b-3268285ffe18" CreationDate="2022-12-27T11:18:30.803" UserId="3438" Text="In order to get the number of validators on a relay chain I query the `Staking.ValidatorCount` storage which returns an integer.&#xD;&#xA;&#xD;&#xA;How do I get the list of all validators and the amount of DOT/KSM bonded by each?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24924" PostHistoryTypeId="1" PostId="6500" RevisionGUID="bf13c4c9-c77e-4c3b-934b-3268285ffe18" CreationDate="2022-12-27T11:18:30.803" UserId="3438" Text="Amount of DOT bonded by a validator" ContentLicense="CC BY-SA 4.0" />
  <row Id="24925" PostHistoryTypeId="3" PostId="6500" RevisionGUID="bf13c4c9-c77e-4c3b-934b-3268285ffe18" CreationDate="2022-12-27T11:18:30.803" UserId="3438" Text="|validator|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24926" PostHistoryTypeId="2" PostId="6501" RevisionGUID="9ed3d8aa-2a88-4a7f-beea-bfc3a1450168" CreationDate="2022-12-27T11:26:02.813" UserId="354" Text="You just need to store the database on permanent memory rather than temporary memory for that you can use `--base-path` flag when you are starting your chain like:&#xD;&#xA;&#xD;&#xA;`./target/release/substrate --dev --base-path &quot;path where you want to store db&quot;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="24928" PostHistoryTypeId="2" PostId="6502" RevisionGUID="3ed09ac3-87a5-446a-ba73-d5e1c1f60749" CreationDate="2022-12-27T13:21:44.020" UserId="2762" Text="Using PolkadotJS you can get the list of assets with this script:&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://statemint.api.onfinality.io/public-ws');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const chain = await api.rpc.system.chain();&#xD;&#xA;    console.log(`----- Chain: ${chain} -----`);&#xD;&#xA;&#xD;&#xA;    const assets = await api.query.assets.metadata.entries();&#xD;&#xA;    assets.forEach(([{args: [id] } ,asset]) =&gt; {&#xD;&#xA;      console.log(`${id}: ${asset}`);&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;You can also query the list of assets using PolkadotJS UI calling the extrinsic metadata and disabling *Include Option* &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TPujn.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24938" PostHistoryTypeId="2" PostId="6505" RevisionGUID="95284865-2572-49e0-b510-0bb90f8803b7" CreationDate="2022-12-27T14:00:52.353" UserId="2762" Text="First you have to get the list of validators, and for every one of the list you can get his total balance bonded in Staking:&#xD;&#xA;&#xD;&#xA;    const validators = await api.query.session.validators();&#xD;&#xA;    validators.forEach(async (accountId) =&gt; {&#xD;&#xA;        const stakingLedger = await api.query.staking.ledger(accountId);&#xD;&#xA;        if(stakingLedger.toHuman()){&#xD;&#xA;            const stakingLedgerObject = JSON.parse(stakingLedger);&#xD;&#xA;            const bonded = stakingLedgerObject.total;&#xD;&#xA;            console.log(`${accountId}: ${bonded}`);&#xD;&#xA;        }&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;The const stakingLedger here has this inforamtion:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      stash: '15apjb1k8NBZNsUr93tcffaGU6Z6erUm8TjSawpTWc8WAaKP',&#xD;&#xA;      total: '10,000,000,000',&#xD;&#xA;      active: '10,000,000,000',&#xD;&#xA;      unlocking: [],&#xD;&#xA;      claimedRewards: [&#xD;&#xA;        '852', '853', '854', '855', '856', '857', '858',&#xD;&#xA;        '859', '860', '861', '862', '863', '864', '865',&#xD;&#xA;        '866', '867', '868', '869', '870', '871', '872',&#xD;&#xA;        '873', '874', '875', '876', '877', '878', '879',&#xD;&#xA;        '880', '881', '882', '883', '884', '885', '886',&#xD;&#xA;        '887', '888', '889', '890', '891', '892', '893',&#xD;&#xA;        '894', '895', '896', '897', '898', '899', '900',&#xD;&#xA;        '901', '902', '903', '904', '905', '906', '907',&#xD;&#xA;        '908', '909', '910', '911', '912', '913', '914',&#xD;&#xA;        '915', '916', '917', '918', '919', '920', '921',&#xD;&#xA;        '922', '923', '924', '925', '926', '927', '928',&#xD;&#xA;        '929', '930', '931', '932', '933', '934'&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But probably you only want the total." ContentLicense="CC BY-SA 4.0" />
  <row Id="24940" PostHistoryTypeId="5" PostId="6488" RevisionGUID="339e0de0-ac9f-4bad-bf91-2ec9d16599e1" CreationDate="2022-12-27T14:08:46.980" UserId="2762" Comment="improved formatting" Text="I am trying substrate kitties Workshop. After setting environment  and paste the bare-bone code of kitties pallet , when I run `cargo build --release` the following error occur after 2-3 minutes when building `sp-runtime`:&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `H256: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/testing.rs:260:14&#xD;&#xA;        |&#xD;&#xA;    260 |     type Hash = &lt;Header as traits::Header&gt;::Hash;&#xD;&#xA;        |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H256`&#xD;&#xA;        |&#xD;&#xA;        = help: the following other types implement trait `TypeInfo`:&#xD;&#xA;                  &amp;T&#xD;&#xA;                  &amp;mut T&#xD;&#xA;                  ()&#xD;&#xA;                  (A, B)&#xD;&#xA;                  (A, B, C)&#xD;&#xA;                  (A, B, C, D)&#xD;&#xA;                  (A, B, C, D, E)&#xD;&#xA;                  (A, B, C, D, E, F)&#xD;&#xA;                and 117 others&#xD;&#xA;    note: required by a bound in `traits::Block::Hash`&#xD;&#xA;       --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/traits.rs:917:5&#xD;&#xA;        |&#xD;&#xA;    904 |     type Hash: Member&#xD;&#xA;        |          ---- required by a bound in this&#xD;&#xA;    ...&#xD;&#xA;    917 |         + TypeInfo;&#xD;&#xA;        |           ^^^^^^^^ required by this bound in `Block::Hash`&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `H256: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/traits.rs:700:16&#xD;&#xA;        |&#xD;&#xA;    700 |     type Output = sp_core::H256;&#xD;&#xA;        |                   ^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H256`&#xD;&#xA;        |&#xD;&#xA;        = help: the following other types implement trait `TypeInfo`:&#xD;&#xA;                  &amp;T&#xD;&#xA;                  &amp;mut T&#xD;&#xA;                  ()&#xD;&#xA;                  (A, B)&#xD;&#xA;                  (A, B, C)&#xD;&#xA;                  (A, B, C, D)&#xD;&#xA;                  (A, B, C, D, E)&#xD;&#xA;                  (A, B, C, D, E, F)&#xD;&#xA;                and 117 others&#xD;&#xA;    note: required by a bound in `traits::Hash::Output`&#xD;&#xA;       --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/traits.rs:665:5&#xD;&#xA;        |&#xD;&#xA;    654 |     type Output: Member&#xD;&#xA;        |          ------ required by a bound in this&#xD;&#xA;    ...&#xD;&#xA;    665 |         + TypeInfo;&#xD;&#xA;        |           ^^^^^^^^ required by this bound in `Hash::Output`&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `H256: TypeInfo` is not satisfied&#xD;&#xA;       --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/traits.rs:727:16&#xD;&#xA;        |&#xD;&#xA;    727 |     type Output = sp_core::H256;&#xD;&#xA;        |                   ^^^^^^^^^^^^^ the trait `TypeInfo` is not implemented for `H256`&#xD;&#xA;        |&#xD;&#xA;        = help: the following other types implement trait `TypeInfo`:&#xD;&#xA;                  &amp;T&#xD;&#xA;                  &amp;mut T&#xD;&#xA;                  ()&#xD;&#xA;                  (A, B)&#xD;&#xA;                  (A, B, C)&#xD;&#xA;                  (A, B, C, D)&#xD;&#xA;                  (A, B, C, D, E)&#xD;&#xA;                  (A, B, C, D, E, F)&#xD;&#xA;                and 117 others&#xD;&#xA;    note: required by a bound in `traits::Hash::Output`&#xD;&#xA;       --&gt; /home/abuzar945/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/primitives/runtime/src/traits.rs:665:5&#xD;&#xA;        |&#xD;&#xA;    654 |     type Output: Member&#xD;&#xA;        |          ------ required by a bound in this&#xD;&#xA;    ...&#xD;&#xA;    665 |         + TypeInfo;&#xD;&#xA;        |           ^^^^^^^^ required by this bound in `Hash::Output`&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;    error: could not compile `sp-runtime` due to 3 previous errors&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24941" PostHistoryTypeId="6" PostId="6497" RevisionGUID="97f16352-e1f3-4c94-b878-671aba637f44" CreationDate="2022-12-27T16:23:53.117" UserId="2762" Comment="tags" Text="|polkadot-js|assets|python|statemint|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24944" PostHistoryTypeId="5" PostId="6470" RevisionGUID="3528c90e-453a-40b5-b8bb-1ae62a2bf989" CreationDate="2022-12-27T18:14:54.370" UserId="494" Comment="added 1145 characters in body" Text="If you're comfortable introducing a layer of permissioning into your design, you could perhaps use the [`SignedExtension` trait](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.SignedExtension.html).&#xD;&#xA;&#xD;&#xA;You'd have to keep an on-chain list of OCW identities that are &quot;authorized&quot; to send the specific extrinsic, and use them in the `validate` function of your `SignedExtention` trait implementation.&#xD;&#xA;&#xD;&#xA;This list could be updated via `sudo` or Governance.&#xD;&#xA;&#xD;&#xA;[Here](https://github.com/gautamdhameja/substrate-rbac)'s a working example of how to use the `SignedExtension` trait in a [RBAC permissioning system](https://en.wikipedia.org/wiki/Role-based_access_control). It's not the precise solution to your problem, but could serve as inspiration.&#xD;&#xA;&#xD;&#xA;Please note that you also need to design how the signing keys are handled by your OCW. FRAME's OCW example shows how you can do a signed transaction from an OCW. One important line in that example is:&#xD;&#xA;```&#xD;&#xA;pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;btc!&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The admin of each node will need to inject the keys (ideally matching &quot;authorized&quot; accounts) into the node. That can be done via:&#xD;&#xA;```&#xD;&#xA;curl --location --request POST 'http://localhost:9933' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;   &quot;params&quot;: [&quot;btc!&quot;,&quot;bread tongue spell stadium clean grief coin rent spend total practice document&quot;,&quot;0xb6a8b4b6bf796991065035093d3265e314c3fe89e75ccb623985e57b0c2e0c30&quot;],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;```&#xD;&#xA;(note that `keyType` is `btc!`, matching what has been declared in the OCW pallet).&#xD;&#xA;&#xD;&#xA;If the node admin doesn't do this step, the OCW simply won't be able to sign transactions.&#xD;&#xA;&#xD;&#xA;Then, for every signed transaction, if the signer is in the &quot;authorized&quot; set, the `SignedExtension` will allow it to enter the transaction pool." ContentLicense="CC BY-SA 4.0" />
  <row Id="24945" PostHistoryTypeId="5" PostId="6491" RevisionGUID="c0e503cb-9a15-4a47-a3b7-cdc4be6aefdd" CreationDate="2022-12-27T18:59:23.210" UserId="3646" Comment="deleted 150 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;       type RuntimeEvent = RuntimeEvent;&#xD;&#xA;       type MaxWellKnownNodes = MaxWellKnownNodes;&#xD;&#xA;       type MaxPeerIdLength = MaxPeerIdLength;&#xD;&#xA;       type AddOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type RemoveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type SwapOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type ResetOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type WeightInfo = ();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;The same error occurs when add the last row to the construct_runtime &#xD;&#xA;&#xD;&#xA;    construct_runtime!(&#xD;&#xA;            pub struct Runtime&#xD;&#xA;            where&#xD;&#xA;                    Block = Block,&#xD;&#xA;                    NodeBlock = opaque::Block,&#xD;&#xA;                    UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;            {&#xD;&#xA;                    System: frame_system,&#xD;&#xA;                    RandomnessCollectiveFlip: &#xD;&#xA;                        pallet_randomness_collective_flip,&#xD;&#xA;                    Timestamp: pallet_timestamp,&#xD;&#xA;                    Aura: pallet_aura,&#xD;&#xA;                    Grandpa: pallet_grandpa,&#xD;&#xA;                    Balances: pallet_balances,&#xD;&#xA;                    TransactionPayment: pallet_transaction_payment,&#xD;&#xA;                    Sudo: pallet_sudo,&#xD;&#xA;     &#xD;&#xA;                    TemplateModule: pallet_template,&#xD;&#xA;                    NodeAuthorization: pallet_node_authorization::{Pallet, &#xD;&#xA;                        Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;}&#xD;&#xA;            }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The lib.rs file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]`.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml :&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;node-template-runtime&quot;&#xD;&#xA;    version = &quot;4.0.0-dev&quot;&#xD;&#xA;    description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;    authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;    homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    license = &quot;Unlicense&quot;&#xD;&#xA;    publish = false&#xD;&#xA;    repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;    &#xD;&#xA;    [package.metadata.docs.rs]&#xD;&#xA;    targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    &#xD;&#xA;    pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-randomness-collective-flip = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-core = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-runtime = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-std = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-version = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.33&quot; }    &#xD;&#xA;    &#xD;&#xA;    # Used for the node template's RPCs&#xD;&#xA;    frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot;&gt;&#xD;&#xA;    &#xD;&#xA;    # Used for runtime benchmarking&#xD;&#xA;    frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.33&gt;&#xD;&#xA;    &#xD;&#xA;    # Local Dependencies&#xD;&#xA;    pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;    &#xD;&#xA;    [build-dependencies]&#xD;&#xA;    substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;            &quot;frame-try-runtime?/std&quot;,&#xD;&#xA;            &quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;            &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;            &quot;codec/std&quot;,&#xD;&#xA;           &quot;scale-info/std&quot;,&#xD;&#xA;            &quot;frame-executive/std&quot;,&#xD;&#xA;            &quot;frame-support/std&quot;,&#xD;&#xA;            &quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;            &quot;frame-system/std&quot;,&#xD;&#xA;            &quot;frame-try-runtime/std&quot;,&#xD;&#xA;            &quot;pallet-aura/std&quot;,&#xD;&#xA;            &quot;pallet-balances/std&quot;,&#xD;&#xA;            &quot;pallet-grandpa/std&quot;,&#xD;&#xA;            &quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;            &quot;pallet-sudo/std&quot;,&#xD;&#xA;            &quot;pallet-template/std&quot;,&#xD;&#xA;            &quot;pallet-timestamp/std&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;            &quot;sp-api/std&quot;,&#xD;&#xA;            &quot;sp-block-builder/std&quot;,&#xD;&#xA;            &quot;sp-consensus-aura/std&quot;,&#xD;&#xA;            &quot;sp-core/std&quot;,&#xD;&#xA;            &quot;sp-inherents/std&quot;,&#xD;&#xA;            &quot;sp-offchain/std&quot;,&#xD;&#xA;            &quot;sp-runtime/std&quot;,&#xD;&#xA;            &quot;sp-session/std&quot;,&#xD;&#xA;            &quot;sp-std/std&quot;,&#xD;&#xA;            &quot;sp-transaction-pool/std&quot;,&#xD;&#xA;            &quot;sp-version/std&quot;,&#xD;&#xA;            &quot;pallet-node-authorization/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;    runtime-benchmarks = [&#xD;&#xA;            &quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;    ]&#xD;&#xA;    try-runtime = [&#xD;&#xA;            &quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;            &quot;frame-executive/try-runtime&quot;,&#xD;&#xA;            &quot;frame-system/try-runtime&quot;,&#xD;&#xA;            &quot;frame-support/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-template/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24949" PostHistoryTypeId="2" PostId="6506" RevisionGUID="ed8207a8-95a4-4d04-8486-86023042d313" CreationDate="2022-12-27T19:34:00.353" UserId="2581" Text="https://kusama.subscan.io/nominator/DQobcxqahQzXu4Z5gXB1fc5GsK6YGH5kbvtAnznT4RDp3T3&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7GzyL.png&#xD;&#xA;&#xD;&#xA;This is one test nominator in kusama.&#xD;&#xA;&#xD;&#xA;As you can see, this nominator has been rewarded from several validators.&#xD;&#xA;&#xD;&#xA;And this nominator has been rewarded only once per era.&#xD;&#xA;&#xD;&#xA;Can nominator been rewarded only once per era?&#xD;&#xA;&#xD;&#xA;If nominator delegated to several validators, is it possible to get rewarded several times from several validators per era?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24951" PostHistoryTypeId="1" PostId="6506" RevisionGUID="ed8207a8-95a4-4d04-8486-86023042d313" CreationDate="2022-12-27T19:34:00.353" UserId="2581" Text="Can nominator been rewarded only once per era?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24952" PostHistoryTypeId="3" PostId="6506" RevisionGUID="ed8207a8-95a4-4d04-8486-86023042d313" CreationDate="2022-12-27T19:34:00.353" UserId="2581" Text="|validator|era|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24957" PostHistoryTypeId="5" PostId="6491" RevisionGUID="a073a5e2-9e05-46c9-9d4a-8c3245ab46fd" CreationDate="2022-12-27T19:40:50.753" UserId="3646" Comment="added 560 characters in body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;       type RuntimeEvent = RuntimeEvent;&#xD;&#xA;       type MaxWellKnownNodes = MaxWellKnownNodes;&#xD;&#xA;       type MaxPeerIdLength = MaxPeerIdLength;&#xD;&#xA;       type AddOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type RemoveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type SwapOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type ResetOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type WeightInfo = ();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;           = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/ubuntu/substrate/substrate_auth_palet/target/release/wbuild/node-template-runtime/target/wasm32-unknown-u&#xD;&#xA;    nknown/release/deps/libsp_io-05621afa7ed3c196.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/ubuntu/substrate/substrate_auth_palet/target/release/wbuild/node-template-runtime/target/wasm32-unknown-&#xD;&#xA;    unknown/release/deps/libsp_io-276985975586ba28.rmeta&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;The same error occurs when add the last row to the construct_runtime &#xD;&#xA;&#xD;&#xA;    construct_runtime!(&#xD;&#xA;            pub struct Runtime&#xD;&#xA;            where&#xD;&#xA;                    Block = Block,&#xD;&#xA;                    NodeBlock = opaque::Block,&#xD;&#xA;                    UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;            {&#xD;&#xA;                    System: frame_system,&#xD;&#xA;                    RandomnessCollectiveFlip: &#xD;&#xA;                        pallet_randomness_collective_flip,&#xD;&#xA;                    Timestamp: pallet_timestamp,&#xD;&#xA;                    Aura: pallet_aura,&#xD;&#xA;                    Grandpa: pallet_grandpa,&#xD;&#xA;                    Balances: pallet_balances,&#xD;&#xA;                    TransactionPayment: pallet_transaction_payment,&#xD;&#xA;                    Sudo: pallet_sudo,&#xD;&#xA;     &#xD;&#xA;                    TemplateModule: pallet_template,&#xD;&#xA;                    NodeAuthorization: pallet_node_authorization::{Pallet, &#xD;&#xA;                        Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;}&#xD;&#xA;            }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The lib.rs file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]`.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml :&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;node-template-runtime&quot;&#xD;&#xA;    version = &quot;4.0.0-dev&quot;&#xD;&#xA;    description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;    authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;    homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    license = &quot;Unlicense&quot;&#xD;&#xA;    publish = false&#xD;&#xA;    repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;    &#xD;&#xA;    [package.metadata.docs.rs]&#xD;&#xA;    targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    &#xD;&#xA;    pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-randomness-collective-flip = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-core = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-runtime = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-std = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    sp-version = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.33&quot; }    &#xD;&#xA;    &#xD;&#xA;    # Used for the node template's RPCs&#xD;&#xA;    frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot;&gt;&#xD;&#xA;    &#xD;&#xA;    # Used for runtime benchmarking&#xD;&#xA;    frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.33&gt;&#xD;&#xA;    &#xD;&#xA;    # Local Dependencies&#xD;&#xA;    pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;    &#xD;&#xA;    [build-dependencies]&#xD;&#xA;    substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.33&quot; }&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;            &quot;frame-try-runtime?/std&quot;,&#xD;&#xA;            &quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;            &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;            &quot;codec/std&quot;,&#xD;&#xA;           &quot;scale-info/std&quot;,&#xD;&#xA;            &quot;frame-executive/std&quot;,&#xD;&#xA;            &quot;frame-support/std&quot;,&#xD;&#xA;            &quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;            &quot;frame-system/std&quot;,&#xD;&#xA;            &quot;frame-try-runtime/std&quot;,&#xD;&#xA;            &quot;pallet-aura/std&quot;,&#xD;&#xA;            &quot;pallet-balances/std&quot;,&#xD;&#xA;            &quot;pallet-grandpa/std&quot;,&#xD;&#xA;            &quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;            &quot;pallet-sudo/std&quot;,&#xD;&#xA;            &quot;pallet-template/std&quot;,&#xD;&#xA;            &quot;pallet-timestamp/std&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;            &quot;sp-api/std&quot;,&#xD;&#xA;            &quot;sp-block-builder/std&quot;,&#xD;&#xA;            &quot;sp-consensus-aura/std&quot;,&#xD;&#xA;            &quot;sp-core/std&quot;,&#xD;&#xA;            &quot;sp-inherents/std&quot;,&#xD;&#xA;            &quot;sp-offchain/std&quot;,&#xD;&#xA;            &quot;sp-runtime/std&quot;,&#xD;&#xA;            &quot;sp-session/std&quot;,&#xD;&#xA;            &quot;sp-std/std&quot;,&#xD;&#xA;            &quot;sp-transaction-pool/std&quot;,&#xD;&#xA;            &quot;sp-version/std&quot;,&#xD;&#xA;            &quot;pallet-node-authorization/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;    runtime-benchmarks = [&#xD;&#xA;            &quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;    ]&#xD;&#xA;    try-runtime = [&#xD;&#xA;            &quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;            &quot;frame-executive/try-runtime&quot;,&#xD;&#xA;            &quot;frame-system/try-runtime&quot;,&#xD;&#xA;            &quot;frame-support/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-template/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="24959" PostHistoryTypeId="2" PostId="6507" RevisionGUID="25efb470-8901-4191-8d4f-869702080088" CreationDate="2022-12-28T01:55:57.563" UserId="28" Text="Yes, it is possible. The rewards are organized and distributed by validator, so if a nominator's stake is split between multiple validators, there will be one reward event per validator.&#xD;&#xA;&#xD;&#xA;However, this will only occur if the stake is split between multiple validators, and this usually only happens when a user has a very large amount at stake, and the staking algorithm decided to split that stake." ContentLicense="CC BY-SA 4.0" />
  <row Id="24961" PostHistoryTypeId="5" PostId="6506" RevisionGUID="067066b3-bdb5-42c4-925a-47c70e9671b9" CreationDate="2022-12-28T01:56:49.427" UserId="28" Comment="edited body; edited title" Text="https://kusama.subscan.io/nominator/DQobcxqahQzXu4Z5gXB1fc5GsK6YGH5kbvtAnznT4RDp3T3&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7GzyL.png&#xD;&#xA;&#xD;&#xA;This is one test nominator in Kusama.&#xD;&#xA;&#xD;&#xA;As you can see, this nominator has been rewarded from several validators.&#xD;&#xA;&#xD;&#xA;And this nominator has been rewarded only once per era.&#xD;&#xA;&#xD;&#xA;Can nominator been rewarded only once per era?&#xD;&#xA;&#xD;&#xA;If nominator delegated to several validators, is it possible to get rewarded several times from several validators per era?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24962" PostHistoryTypeId="4" PostId="6506" RevisionGUID="067066b3-bdb5-42c4-925a-47c70e9671b9" CreationDate="2022-12-28T01:56:49.427" UserId="28" Comment="edited body; edited title" Text="Can a nominator be rewarded multiple times per era?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24963" PostHistoryTypeId="5" PostId="6507" RevisionGUID="ca9c4c01-52dd-4828-b756-af9e8d352859" CreationDate="2022-12-28T02:01:19.220" UserId="28" Comment="added 415 characters in body" Text="Yes, it is possible to be rewarded multiple times in a single era. The rewards are organized and distributed by validator, so if a nominator's stake is split between multiple validators in an era, there will be one reward event per validator for that era.&#xD;&#xA;&#xD;&#xA;However, this will only occur if the stake is split between multiple validators, and this usually only happens when a user has a very large amount at stake, and the staking algorithm decided to split that stake in order to keep the amount at stake for each validator as even as possible. This is one of the goals of the Phragmen algorithm used in the NPoS system.&#xD;&#xA;&#xD;&#xA;EDIT: I found an example for you by looking at accounts with a large DOT balance:&#xD;&#xA;&#xD;&#xA;https://polkadot.subscan.io/account/13z6tqM18GgaeVD6H9ciwfyQp5dogD58hWJThu5iXKtHfixb?tab=reward&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Here you can see the user was rewarded multiple times in the same era from different validators because their stake was split among them.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2BcZU.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="24964" PostHistoryTypeId="2" PostId="6508" RevisionGUID="b42fb048-781d-4055-8611-ae6c9b721f63" CreationDate="2022-12-28T03:21:41.223" UserId="2311" Text="I have some confusion regarding WASM genesis state. I'm not entirely sure what it contains or how to update it once we've acquired a slot. &#xD;&#xA;&#xD;&#xA;For some context: assume we have a substrate based chain that is doing a hard fork to a parachain. We saved the substrate chain's information into a JSON file for the genesis block. This is intended to the the genesis block for the parachain.&#xD;&#xA;&#xD;&#xA;Upon bidding for a parachain slot, we generated and uploaded a WASM genesis file (without writing the previous chain's account information into the chain_spec.rs) for the sake of bidding on the auction and registering the parachain. The question is this: do we need to update this WASM genesis file if we intend to use the genesis block JSON file we generated prior to starting our lease? Additionally, if we do need to update the WASM genesis file, is it only through a forceful update using ```paras-&gt;forceNewHead```? &#xD;&#xA;&#xD;&#xA;Thanks all in advance," ContentLicense="CC BY-SA 4.0" />
  <row Id="24966" PostHistoryTypeId="1" PostId="6508" RevisionGUID="b42fb048-781d-4055-8611-ae6c9b721f63" CreationDate="2022-12-28T03:21:41.223" UserId="2311" Text="Can we update the genesis head wasm after obtaining a slot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24967" PostHistoryTypeId="3" PostId="6508" RevisionGUID="b42fb048-781d-4055-8611-ae6c9b721f63" CreationDate="2022-12-28T03:21:41.223" UserId="2311" Text="|parachain|wasm|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24968" PostHistoryTypeId="5" PostId="6505" RevisionGUID="7323ca7f-300d-4e90-9fbb-bc59536d5185" CreationDate="2022-12-28T08:35:01.800" UserId="83" Comment="typo" Text="First you have to get the list of validators, and for every one of the list you can get his total balance bonded in Staking:&#xD;&#xA;&#xD;&#xA;    const validators = await api.query.session.validators();&#xD;&#xA;    validators.forEach(async (accountId) =&gt; {&#xD;&#xA;        const stakingLedger = await api.query.staking.ledger(accountId);&#xD;&#xA;        if(stakingLedger.toHuman()){&#xD;&#xA;            const stakingLedgerObject = JSON.parse(stakingLedger);&#xD;&#xA;            const bonded = stakingLedgerObject.total;&#xD;&#xA;            console.log(`${accountId}: ${bonded}`);&#xD;&#xA;        }&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;The const stakingLedger here has this information:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      stash: '15apjb1k8NBZNsUr93tcffaGU6Z6erUm8TjSawpTWc8WAaKP',&#xD;&#xA;      total: '10,000,000,000',&#xD;&#xA;      active: '10,000,000,000',&#xD;&#xA;      unlocking: [],&#xD;&#xA;      claimedRewards: [&#xD;&#xA;        '852', '853', '854', '855', '856', '857', '858',&#xD;&#xA;        '859', '860', '861', '862', '863', '864', '865',&#xD;&#xA;        '866', '867', '868', '869', '870', '871', '872',&#xD;&#xA;        '873', '874', '875', '876', '877', '878', '879',&#xD;&#xA;        '880', '881', '882', '883', '884', '885', '886',&#xD;&#xA;        '887', '888', '889', '890', '891', '892', '893',&#xD;&#xA;        '894', '895', '896', '897', '898', '899', '900',&#xD;&#xA;        '901', '902', '903', '904', '905', '906', '907',&#xD;&#xA;        '908', '909', '910', '911', '912', '913', '914',&#xD;&#xA;        '915', '916', '917', '918', '919', '920', '921',&#xD;&#xA;        '922', '923', '924', '925', '926', '927', '928',&#xD;&#xA;        '929', '930', '931', '932', '933', '934'&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But probably you only want the total." ContentLicense="CC BY-SA 4.0" />
  <row Id="24969" PostHistoryTypeId="2" PostId="6509" RevisionGUID="7dc18294-44b4-457a-9c29-64499b213a23" CreationDate="2022-12-28T09:01:05.870" UserId="179" Text="If there is no way that your chain will produce blocks with the WASM and Genesis you registered on chain, then the only way to push new WASM and Gensis is through the Relay Chain Governance. Would be a similar situation to [this one][1]. &#xD;&#xA;&#xD;&#xA;On the other hand, if your chain is producing blocks, then you can use different extrinsics on your own parachain (upgrading it, setting storage, etc) to update your state/code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.polkassembly.io/motion/317" ContentLicense="CC BY-SA 4.0" />
  <row Id="24971" PostHistoryTypeId="50" PostId="6101" RevisionGUID="5fec3fed-3657-4de9-ad59-fe26d9153107" CreationDate="2022-12-28T10:01:45.233" UserId="-1" />
  <row Id="24972" PostHistoryTypeId="5" PostId="6452" RevisionGUID="8b0a514e-1742-4522-b0bb-1772e0799d7b" CreationDate="2022-12-28T12:59:43.873" UserId="2762" Comment="extend response" Text="Why do you want to keep it alive?&#xD;&#xA;&#xD;&#xA;If it is unnecessary, why just let it die?&#xD;&#xA;&#xD;&#xA;Usually, I follow the Substrate's spec.&#xD;&#xA;&#xD;&#xA;Bounty account example: https://github.com/paritytech/substrate/blob/ee316317b85b2f65fc022b27bbfefcd42b6560ae/frame/bounties/src/lib.rs#L645&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You could write something like this in your genesis.&#xD;&#xA;```rs&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;   pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;       pub existential_deposit:  BalanceOf&lt;T&gt;,&#xD;&#xA;   }&#xD;&#xA;&#xD;&#xA;#[pallet::genesis_build]&#xD;&#xA;impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;	fn build(&amp;self) {&#xD;&#xA;		T::Currency::deposit_creating(&amp;pallet_account(), self.existential_deposit);&#xD;&#xA;		T::Currency::reserve(&amp;pallet_account(), self.existential_deposit);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And when implement your pallet in your node add the existential deposit in the testnet_genesis:&#xD;&#xA;```rs&#xD;&#xA;betting: parachain_template_runtime::BettingConfig {&#xD;&#xA;			existential_deposit: EXISTENTIAL_DEPOSIT,&#xD;&#xA;		}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24973" PostHistoryTypeId="2" PostId="6510" RevisionGUID="0bdb20a9-fd3b-491c-91b8-7bd7b9354441" CreationDate="2022-12-28T13:13:18.600" UserId="2762" Text="The AccountID of a pallet is generated using the PalletID. (See the example from [Treasury pallet][1])&#xD;&#xA;&#xD;&#xA;I know is possible to query this pallet ID because is a constant, but my question is: &#xD;&#xA;&#xD;&#xA;Is there a way to query the AccountID of a pallet using PolkadotJS app?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/treasury/src/lib.rs#L513" ContentLicense="CC BY-SA 4.0" />
  <row Id="24975" PostHistoryTypeId="1" PostId="6510" RevisionGUID="0bdb20a9-fd3b-491c-91b8-7bd7b9354441" CreationDate="2022-12-28T13:13:18.600" UserId="2762" Text="Query AccountID of a pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="24976" PostHistoryTypeId="3" PostId="6510" RevisionGUID="0bdb20a9-fd3b-491c-91b8-7bd7b9354441" CreationDate="2022-12-28T13:13:18.600" UserId="2762" Text="|polkadot-js|pallet|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24977" PostHistoryTypeId="2" PostId="6511" RevisionGUID="e516159d-603f-449b-aa2c-4acb67d09b28" CreationDate="2022-12-28T14:28:58.537" UserId="276" Text="Using py-substrate-interface it would be something like:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;substrate = SubstrateInterface(url=&quot;wss://statemint-rpc.polkadot.io&quot;)&#xD;&#xA;&#xD;&#xA;assets_metadata = substrate.query_map(&#xD;&#xA;    'Assets', 'Metadata'&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;for asset, metadata in assets_metadata:&#xD;&#xA;    print(f'Metadata of asset &quot;{asset.value}&quot;: {metadata.value})')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;* You can find Python usage examples for other call- and storage functions here: https://polkascan.github.io/py-substrate-metadata-docs/statemint/#metadata&#xD;&#xA;&#xD;&#xA;* More info about `query_map()`: https://github.com/polkascan/py-substrate-interface#query-a-mapped-storage-function " ContentLicense="CC BY-SA 4.0" />
  <row Id="24979" PostHistoryTypeId="2" PostId="6512" RevisionGUID="ceaf4d77-d4dc-4c15-8679-0a2de5c1c52c" CreationDate="2022-12-28T15:01:46.000" UserId="2762" Text="This looks an issue with mismatching versions&#xD;&#xA;&#xD;&#xA;In your error you complained about sp-runtime:&#xD;&#xA;&#xD;&#xA;    sp-runtime = { version = &quot;5.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, tag = &quot;devhub/latest&quot; }&#xD;&#xA;&#xD;&#xA;And you can see to sp_core:&#xD;&#xA;&#xD;&#xA;    sp-core = { version = &quot;5.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, tag = &quot;devhub/latest&quot; }&#xD;&#xA;&#xD;&#xA;I would suggest to delete Cargo.lock and the folder target:&#xD;&#xA;&#xD;&#xA;    rm -rf target &amp;&amp; rm Cargo.lock&#xD;&#xA;&#xD;&#xA;And build it again:&#xD;&#xA;&#xD;&#xA;    cargo build --release&#xD;&#xA;&#xD;&#xA;You might need to update more later too, if you have more errors." ContentLicense="CC BY-SA 4.0" />
  <row Id="24981" PostHistoryTypeId="2" PostId="6513" RevisionGUID="4a7f6c5e-364c-478d-afcd-0891d82321c5" CreationDate="2022-12-28T18:22:58.527" UserId="34" Text="I want to reason about SS58 addresses in any context with access to `std`, using Rust. What tools and techniques are needed to access the underlying keys?&#xD;&#xA;&#xD;&#xA;[Related &lt;https://substrate.stackexchange.com/questions/4951/what-is-the-ss58-format&gt;]" ContentLicense="CC BY-SA 4.0" />
  <row Id="24983" PostHistoryTypeId="1" PostId="6513" RevisionGUID="4a7f6c5e-364c-478d-afcd-0891d82321c5" CreationDate="2022-12-28T18:22:58.527" UserId="34" Text="How do I work with SS58 encoded addresses?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24984" PostHistoryTypeId="3" PostId="6513" RevisionGUID="4a7f6c5e-364c-478d-afcd-0891d82321c5" CreationDate="2022-12-28T18:22:58.527" UserId="34" Text="|rust|key|subkey|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24985" PostHistoryTypeId="2" PostId="6514" RevisionGUID="74b01e87-b698-4af5-921b-b7187ec63f7f" CreationDate="2022-12-28T18:22:58.527" UserId="34" Text="I made [a working example](https://github.com/NukeManDan/sp-core-SS58-example) of how to go about generating keys with [`sp-core::crypto` primitives](https://paritytech.github.io/substrate/master/sp_core/crypto/index.html)&#xD;&#xA;&#xD;&#xA;Here is a snapshot of that source for quick reference:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;//! Example generating SS58 Address format from Substrate keys.&#xD;&#xA;//!&#xD;&#xA;//! See also https://polkadot.subscan.io/tools/ss58_transform for easy conversion of addresses from hex, H160, those listed on the registry: https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json&#xD;&#xA;&#xD;&#xA;use sp_core::{&#xD;&#xA;    crypto::{Ss58AddressFormatRegistry, Ss58Codec},&#xD;&#xA;    hexdisplay::HexDisplay,&#xD;&#xA;    sr25519::Pair,&#xD;&#xA;    Pair as _,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    println!(&#xD;&#xA;        &quot;---------- Generating a secret key and use as seed for HDKD derived keys ----------\n&quot;&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    // Get a new pair &amp; it's mnemonic phrase.&#xD;&#xA;    let (pair, mnemonic, _) = Pair::generate_with_phrase(None);&#xD;&#xA;&#xD;&#xA;    // Derive the public key.&#xD;&#xA;    let pk = pair.public();&#xD;&#xA;&#xD;&#xA;    println!(&quot;Mnemonic: {:?}&quot;, &amp;mnemonic);&#xD;&#xA;    println!(&quot;Pubkey (hex): {:?}&quot;, &lt;HexDisplay&gt;::from(&amp;pk.0));&#xD;&#xA;&#xD;&#xA;    println!(&#xD;&#xA;        &quot;Default SS58 Address (AccountId) for Root Public Key: {:?}&quot;,&#xD;&#xA;        &amp;pk.to_ss58check_with_version(Ss58AddressFormatRegistry::SubstrateAccount.into())&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    println!(&quot;\n---------- Generating Polakdot &amp; Kusama derived keys ----------\n&quot;);&#xD;&#xA;    // Hard derive new key pair using `//polkadot`.&#xD;&#xA;    let pair_polkadot = Pair::from_string(&amp;format!(&quot;{}//polkadot&quot;, &amp;mnemonic), None);&#xD;&#xA;    let pk_polkadot = pair_polkadot.unwrap().public();&#xD;&#xA;&#xD;&#xA;    // Hard derive new key pair using `//kusama`.&#xD;&#xA;    let pair_kusama = Pair::from_string(&amp;format!(&quot;{}//kusama&quot;, &amp;mnemonic), None);&#xD;&#xA;    let pk_kusama = pair_kusama.unwrap().public();&#xD;&#xA;&#xD;&#xA;    // Access `AccountId`&#xD;&#xA;    println!(&#xD;&#xA;        &quot;SS58 Address (AccountId) for Polkadot Public Key: {:?}&quot;,&#xD;&#xA;        &amp;pk_polkadot.to_ss58check_with_version(Ss58AddressFormatRegistry::PolkadotAccount.into())&#xD;&#xA;    );&#xD;&#xA;    println!(&#xD;&#xA;        &quot;SS58 Address (AccountId) for Kusama Public Key: {:?}&quot;,&#xD;&#xA;        &amp;pk_kusama.to_ss58check_with_version(Ss58AddressFormatRegistry::KusamaAccount.into())&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    println!(&quot;\n---------- Cross check with Subkey ----------&quot;);&#xD;&#xA;    println!(&quot;Install: https://github.com/paritytech/substrate/tree/master/bin/utils/subkey\n&quot;);&#xD;&#xA;    &#xD;&#xA;    println!(&quot;$ subkey inspect \&quot;&lt;mnemonic phrase&gt;\&quot; &quot;);&#xD;&#xA;    println!(&quot;$ subkey inspect --network &lt;polkadot, kusama, etc.&gt; \&quot;&lt;mnemonic phrase&gt;\&quot;&quot;);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="24991" PostHistoryTypeId="2" PostId="6516" RevisionGUID="bbf8464f-6091-4fe6-8de0-435f7636665b" CreationDate="2022-12-28T23:32:35.167" UserId="83" Text="In the Ask! framework documentation [here](https://ask-lang.github.io/ask-docs/ask-vs-ink) it says Ask! doesn't provide any &quot;overflow protection&quot;, whereas ink! does, but it doesn't explain why. Why doesn't Ask! framework provide any &quot;overflow protection&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24993" PostHistoryTypeId="1" PostId="6516" RevisionGUID="bbf8464f-6091-4fe6-8de0-435f7636665b" CreationDate="2022-12-28T23:32:35.167" UserId="83" Text="Why doesn't the Ask! framework provide any &quot;overflow protection&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24994" PostHistoryTypeId="3" PostId="6516" RevisionGUID="bbf8464f-6091-4fe6-8de0-435f7636665b" CreationDate="2022-12-28T23:32:35.167" UserId="83" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24995" PostHistoryTypeId="2" PostId="6517" RevisionGUID="c33a5883-055d-4c95-a30a-303fb3747555" CreationDate="2022-12-29T01:53:30.067" UserId="2844" Text="Does code compiled to Wasm enables to `forkless runtime upgrades` in polkadot substrate development? Someone please explain me how `forkless runtime upgrades` features enables?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24997" PostHistoryTypeId="1" PostId="6517" RevisionGUID="c33a5883-055d-4c95-a30a-303fb3747555" CreationDate="2022-12-29T01:53:30.067" UserId="2844" Text="How forkless runtime upgrades takes place in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="24998" PostHistoryTypeId="3" PostId="6517" RevisionGUID="c33a5883-055d-4c95-a30a-303fb3747555" CreationDate="2022-12-29T01:53:30.067" UserId="2844" Text="|ink|runtime-upgrade|wasm|substrate-parachain-template|on-runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="24999" PostHistoryTypeId="6" PostId="6517" RevisionGUID="17836a61-f4d1-4652-aee5-7b070a814cf3" CreationDate="2022-12-29T04:44:57.887" UserId="28" Comment="edited tags" Text="|runtime-upgrade|wasm|substrate-parachain-template|on-runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25000" PostHistoryTypeId="2" PostId="6518" RevisionGUID="93ae7bb4-2340-48bc-9017-998906d383ba" CreationDate="2022-12-29T04:53:53.800" UserId="28" Text="There are a number of videos which explain how forkless upgrades work in Substrate. Here are just two, but you can find more:&#xD;&#xA;&#xD;&#xA;- https://www.youtube.com/watch?v=GBQU8D0aV00&#xD;&#xA;- https://www.youtube.com/watch?v=0n7Q-2_JD0w&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The simple summary of how this works is the following:&#xD;&#xA;&#xD;&#xA;- Inside of every Substrate binary is a Wasm executor.&#xD;&#xA;- The State Transition Function (aka the Runtime) of a blockchain is developed for, and compiled to Wasm. This is then executed by the Substrate binary (the node).&#xD;&#xA;- This Runtime is also stored into the blockchain state, and synchronized across the whole network, just like any user balances or other state of the blockchain. When executing a block, we use the Wasm stored in the blockchain state to check if a block is valid.&#xD;&#xA;- The runtime logic itself has a function to modify the storage of the current runtime code. You can think of this like an &quot;auto-updater&quot;.&#xD;&#xA;- When the storage of the new runtime code is uploaded, all of the nodes on the network synchronize that new state, and use that new code to execute the following blocks.&#xD;&#xA;&#xD;&#xA;So the reason we call this a &quot;forkless upgrade&quot; is that a node operator does not need to take any actions in order to run the latest runtime code for a Substrate chain. Just by synchronizing the previous blocks, the state transition function will be automatically upgraded. This avoids many of the human and coordination issues which currently plague the space when blockchain code is updated.&#xD;&#xA;&#xD;&#xA;Auto-updating binaries can also do something similar to this, but the security guarantees are much weaker. If the binary itself auto-upgraded, you might worry that one upgrade will sneak in some virus which will affect all the nodes in the ecosystem. Since the &quot;auto-upgrade&quot; is isolated to Wasm, and Wasm is naturally executed in a sandboxed environment, this is much safer." ContentLicense="CC BY-SA 4.0" />
  <row Id="25002" PostHistoryTypeId="2" PostId="6519" RevisionGUID="bf4304ec-fa92-4560-859e-93717ca497e2" CreationDate="2022-12-29T05:00:23.403" UserId="28" Text="It cannot be &quot;queried&quot;, but it can be generated using the queried Pallet ID.&#xD;&#xA;&#xD;&#xA;You can see an example of that here: https://github.com/shawntabrizi/substrate-js-utilities/blob/master/utilities.js#L218&#xD;&#xA;&#xD;&#xA;For example using: https://www.shawntabrizi.com/substrate-js-utilities/&#xD;&#xA;&#xD;&#xA;You will get:&#xD;&#xA;&#xD;&#xA;`py/trsry` -&gt; `5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z`&#xD;&#xA;&#xD;&#xA;https://polkadot.subscan.io/account/5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z" ContentLicense="CC BY-SA 4.0" />
  <row Id="25004" PostHistoryTypeId="2" PostId="6520" RevisionGUID="a6d7d24f-bdc3-4975-b852-e09f46678132" CreationDate="2022-12-29T06:55:47.010" UserId="2147" Text="I am looking for a bridging solution between EVM compatible chains and a substrate-based solo chain (i.e. not a parachain).&#xD;&#xA;The bridges is purely for cross chain asset transfer.&#xD;&#xA;I am aware of the [parity bridges common][1] framework. However I was looking for a more high level solution, such as [Darwinia][2], however it doesn’t support Polygon yet (for example)&#xD;&#xA;What solutions do you recommend?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/parity-bridges-common/find/master&#xD;&#xA;  [2]: https://darwinia.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25006" PostHistoryTypeId="1" PostId="6520" RevisionGUID="a6d7d24f-bdc3-4975-b852-e09f46678132" CreationDate="2022-12-29T06:55:47.010" UserId="2147" Text="EVM compatible chains and Substrate Bridges" ContentLicense="CC BY-SA 4.0" />
  <row Id="25007" PostHistoryTypeId="3" PostId="6520" RevisionGUID="a6d7d24f-bdc3-4975-b852-e09f46678132" CreationDate="2022-12-29T06:55:47.010" UserId="2147" Text="|evm|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25008" PostHistoryTypeId="2" PostId="6521" RevisionGUID="d0b7b5ae-8021-44c7-bd10-a9f5d6b49331" CreationDate="2022-12-29T07:47:09.647" UserId="2565" Text="I have a parachain connected to my relaychain.  &#xD;&#xA;&#xD;&#xA;A couple of days ago my relaychain has an error: &quot;Import failed: Unexpected epoch change&quot;&#xD;&#xA;&#xD;&#xA;Apparently there is no solution to it than to destroy the database.&#xD;&#xA;&#xD;&#xA;If you delete the database of your relaychain, your parachain is also useless.  Why?&#xD;&#xA;&#xD;&#xA;How can we save our parachain if for some reason the relaychain collapse?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25010" PostHistoryTypeId="1" PostId="6521" RevisionGUID="d0b7b5ae-8021-44c7-bd10-a9f5d6b49331" CreationDate="2022-12-29T07:47:09.647" UserId="2565" Text="How to recover my parachain if my relay chain has an error &quot;Import failed: Unexpected epoch change&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25011" PostHistoryTypeId="3" PostId="6521" RevisionGUID="d0b7b5ae-8021-44c7-bd10-a9f5d6b49331" CreationDate="2022-12-29T07:47:09.647" UserId="2565" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25012" PostHistoryTypeId="2" PostId="6522" RevisionGUID="f223b9c9-9834-4d89-a75f-6af072484fa9" CreationDate="2022-12-29T08:40:05.027" UserId="2632" Text="Do I need to account for ED when transferring Sufficient asset from statemine to parachain? " ContentLicense="CC BY-SA 4.0" />
  <row Id="25014" PostHistoryTypeId="1" PostId="6522" RevisionGUID="f223b9c9-9834-4d89-a75f-6af072484fa9" CreationDate="2022-12-29T08:40:05.027" UserId="2632" Text="Does holding only sufficient asset in statemint imply there is no ED for the account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25015" PostHistoryTypeId="3" PostId="6522" RevisionGUID="f223b9c9-9834-4d89-a75f-6af072484fa9" CreationDate="2022-12-29T08:40:05.027" UserId="2632" Text="|statemint|statemine|sufficient|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25018" PostHistoryTypeId="2" PostId="6523" RevisionGUID="2c4a220f-4357-421d-b11b-8bd41d41d645" CreationDate="2022-12-29T09:39:36.470" UserId="2762" Text="Is not an easy answer because I am not familiar with the codebase of Hyperledger Fabric but it will have to be Polkadot compatible in order to be a Polkadot Parachain.&#xD;&#xA;&#xD;&#xA;One example is that the Polkadot Host requires that the state transitions performed on parachains be specified as a **[Wasm executable][1]**.&#xD;&#xA;&#xD;&#xA;You can take a look to all technicals details of a Parachain in this guide:&#xD;&#xA;&#xD;&#xA;[The Polkadot Parachain Host Implementers' Guide][2]&#xD;&#xA;&#xD;&#xA;The easy way to build a Parachain is first to build your chain using [**Substrate**][3]: a blockchain framework that provides the basic building blocks of a blockchain (things like the networking layer, consensus, a Wasm interpreter) while providing an intuitive way to construct your runtime.&#xD;&#xA;&#xD;&#xA;And the use [**Cumulus**][4]. Cumulus is an extension to Substrate that makes it easy to make any Substrate-built runtime into a Polkadot-compatible parachain.&#xD;&#xA;&#xD;&#xA;Cumulus handles the network compatibility overhead that any parachain would need to implement to be connected to Polkadot. This includes:&#xD;&#xA;&#xD;&#xA; - Cross-chain message passing (XCMP)&#xD;&#xA; - Out-of-the-box Collator node setup&#xD;&#xA; - An embedded full client of the Relay Chain&#xD;&#xA; - Block authorship compatibility&#xD;&#xA;&#xD;&#xA;This is a guide about how to add Cumulus to a solo chain: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/.&#xD;&#xA;&#xD;&#xA;There is already a [Substrate Parachain Templat][5]e node that has added Cumulus into a Substrate chain already. &#xD;&#xA;&#xD;&#xA;Check this answer from StackExchange too: https://substrate.stackexchange.com/a/2334/2762&#xD;&#xA;&#xD;&#xA;There is also another alternative to make two economically sovereign and technologically diverse chains to communicate with each other: **[Bridges][6]**.&#xD;&#xA;There is some projects to connect other networks to Polkadot for example [Bitcoin][7] or [Ethereum][8] there is another alternative, [Bridges][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-wasm&#xD;&#xA;  [2]: https://paritytech.github.io/polkadot/book/&#xD;&#xA;  [3]: https://substrate.io/&#xD;&#xA;  [4]: https://github.com/paritytech/cumulus&#xD;&#xA;  [5]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [6]: https://wiki.polkadot.network/docs/learn-bridges&#xD;&#xA;  [7]: https://docs.polkabtc.io/#/&#xD;&#xA;  [8]: https://github.com/ChainSafe/ChainBridge" ContentLicense="CC BY-SA 4.0" />
  <row Id="25020" PostHistoryTypeId="2" PostId="6524" RevisionGUID="cbb01fc1-359f-4cec-af38-bc7c145d0d77" CreationDate="2022-12-29T09:47:42.987" UserId="2762" Text="Yes.&#xD;&#xA;&#xD;&#xA;The native token of Statemint is DOT. The Existential Deposit (ED), transfer fees, and the deposits for proxy/multisig operations on Statemint are about 1/10th of the values on the Relay chain. For example, the Existential Deposit of a Statemint account is 0.100 DOT, when compared to 1 DOT on Polkadot.&#xD;&#xA;&#xD;&#xA;See the [code][1] where the ED is set.&#xD;&#xA;&#xD;&#xA;Statemine is the Parachain on Kusama, see the code [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/statemint/blob/master/runtime/statemine/src/constants.rs#L20&#xD;&#xA;  [2]: https://github.com/paritytech/statemint/blob/master/runtime/statemint/src/constants.rs#L20" ContentLicense="CC BY-SA 4.0" />
  <row Id="25022" PostHistoryTypeId="2" PostId="6525" RevisionGUID="41bc1108-2b13-4f91-926f-c632c6dadb84" CreationDate="2022-12-29T10:17:13.390" UserId="2762" Text="No directly, but you can get that value.&#xD;&#xA;&#xD;&#xA;With the script below you get your accounts with its meta information (as you mentioned):&#xD;&#xA;```js&#xD;&#xA;    import { web3AccountsSubscribe } from '@polkadot/extension-dapp';&#xD;&#xA;    await web3AccountsSubscribe(( injectedAccounts ) =&gt; { &#xD;&#xA;        injectedAccounts.map(( accounts ) =&gt; {&#xD;&#xA;            const accountMeta = accounts.meta;&#xD;&#xA;            console.log(accounts.meta);&#xD;&#xA;        })&#xD;&#xA;     });&#xD;&#xA;```&#xD;&#xA;The meta information has this format:&#xD;&#xA;```json&#xD;&#xA;    {&#xD;&#xA;    &quot;genesisHash&quot;: &quot;0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3&quot;,&#xD;&#xA;    &quot;name&quot;: &quot;testingB&quot;,&#xD;&#xA;    &quot;source&quot;: &quot;polkadot-js&quot;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;From here we need the genesisHash because is the hash of the network you are looking for.&#xD;&#xA;&#xD;&#xA;You can compare it with this file of genesis strings to get the name of your network: https://github.com/polkadot-js/common/blob/master/packages/networks/src/defaults/genesis.ts&#xD;&#xA;&#xD;&#xA;In my example is [Polkadot][1].&#xD;&#xA;&#xD;&#xA;If is a network registered in this list (Testnets like Westened from your example are not included): https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json&#xD;&#xA;&#xD;&#xA;You can query all the networks using the [@poladot/networks][2] library and create a function to find the network information of the genesisHash of your account:&#xD;&#xA;```js&#xD;&#xA;    import { allNetworks } from '@polkadot/networks';&#xD;&#xA;    console.log(allNetworks);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/common/blob/master/packages/networks/src/defaults/genesis.ts#L97&#xD;&#xA;  [2]: https://www.npmjs.com/package/@polkadot/networks" ContentLicense="CC BY-SA 4.0" />
  <row Id="25024" PostHistoryTypeId="5" PostId="6524" RevisionGUID="50e389b8-7023-4182-8dd6-9f8ed0d99a24" CreationDate="2022-12-29T10:29:19.747" UserId="2762" Comment="extend response" Text="**Does holding only sufficient asset in statemint imply there is no ED for the account?**&#xD;&#xA;Yes, Sufficiency means that the asset balance is enough to create the account on-chain, with no need for the DOT/KSM existential deposit.&#xD;&#xA;&#xD;&#xA;But, you cannot send a non-sufficient asset to an account that does not exist.&#xD;&#xA;For that you need the existential deposit of the account in the native token:&#xD;&#xA;&#xD;&#xA;The native token of Statemint is DOT. The Existential Deposit (ED), transfer fees, and the deposits for proxy/multisig operations on Statemint are about 1/10th of the values on the Relay chain. For example, the Existential Deposit of a Statemint account is 0.100 DOT, when compared to 1 DOT on Polkadot.&#xD;&#xA;&#xD;&#xA;See the [code][1] where the ED is set.&#xD;&#xA;&#xD;&#xA;Statemine is the Parachain on Kusama, see the code [here][2].&#xD;&#xA;&#xD;&#xA;**Do I need to account for ED when transferring Sufficient asset from statemine to parachain?**&#xD;&#xA;Sufficient assets can be used to pay transaction fees (i.e. there is no need to hold DOT/KSM on the account).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Bonus:&#xD;&#xA;*I recommend you to take a look into [this previous answer on StackExchange][3] where it shares an amazing list of interesting resources on this topic.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/statemint/blob/master/runtime/statemine/src/constants.rs#L20&#xD;&#xA;  [2]: https://github.com/paritytech/statemint/blob/master/runtime/statemint/src/constants.rs#L20&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/5923/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="25025" PostHistoryTypeId="5" PostId="6505" RevisionGUID="b1aeef41-ad33-4e6e-b21e-2819e5d5d5f2" CreationDate="2022-12-29T10:37:03.883" UserId="2762" Comment="improved formatting" Text="First you have to get the list of validators, and for every one of the list you can get his total balance bonded in Staking:&#xD;&#xA;```js&#xD;&#xA;    const validators = await api.query.session.validators();&#xD;&#xA;    validators.forEach(async (accountId) =&gt; {&#xD;&#xA;        const stakingLedger = await api.query.staking.ledger(accountId);&#xD;&#xA;        if(stakingLedger.toHuman()){&#xD;&#xA;            const stakingLedgerObject = JSON.parse(stakingLedger);&#xD;&#xA;            const bonded = stakingLedgerObject.total;&#xD;&#xA;            console.log(`${accountId}: ${bonded}`);&#xD;&#xA;        }&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;The const stakingLedger here has this information:&#xD;&#xA;```json&#xD;&#xA;    {&#xD;&#xA;      stash: '15apjb1k8NBZNsUr93tcffaGU6Z6erUm8TjSawpTWc8WAaKP',&#xD;&#xA;      total: '10,000,000,000',&#xD;&#xA;      active: '10,000,000,000',&#xD;&#xA;      unlocking: [],&#xD;&#xA;      claimedRewards: [&#xD;&#xA;        '852', '853', '854', '855', '856', '857', '858',&#xD;&#xA;        '859', '860', '861', '862', '863', '864', '865',&#xD;&#xA;        '866', '867', '868', '869', '870', '871', '872',&#xD;&#xA;        '873', '874', '875', '876', '877', '878', '879',&#xD;&#xA;        '880', '881', '882', '883', '884', '885', '886',&#xD;&#xA;        '887', '888', '889', '890', '891', '892', '893',&#xD;&#xA;        '894', '895', '896', '897', '898', '899', '900',&#xD;&#xA;        '901', '902', '903', '904', '905', '906', '907',&#xD;&#xA;        '908', '909', '910', '911', '912', '913', '914',&#xD;&#xA;        '915', '916', '917', '918', '919', '920', '921',&#xD;&#xA;        '922', '923', '924', '925', '926', '927', '928',&#xD;&#xA;        '929', '930', '931', '932', '933', '934'&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;But probably you only want the total." ContentLicense="CC BY-SA 4.0" />
  <row Id="25026" PostHistoryTypeId="5" PostId="6502" RevisionGUID="d22eee8a-4a8f-4e66-9551-2066ae7029ee" CreationDate="2022-12-29T10:37:37.477" UserId="2762" Comment="improved formatting" Text="Using PolkadotJS you can get the list of assets with this script:&#xD;&#xA;```js&#xD;&#xA;    const wsProvider = new WsProvider('wss://statemint.api.onfinality.io/public-ws');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const chain = await api.rpc.system.chain();&#xD;&#xA;    console.log(`----- Chain: ${chain} -----`);&#xD;&#xA;&#xD;&#xA;    const assets = await api.query.assets.metadata.entries();&#xD;&#xA;    assets.forEach(([{args: [id] } ,asset]) =&gt; {&#xD;&#xA;      console.log(`${id}: ${asset}`);&#xD;&#xA;      });&#xD;&#xA;```&#xD;&#xA;You can also query the list of assets using PolkadotJS UI calling the extrinsic metadata and disabling *Include Option* &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TPujn.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25027" PostHistoryTypeId="5" PostId="6481" RevisionGUID="321c7e5a-cde0-4913-a6b0-6f64b77eecf1" CreationDate="2022-12-29T10:38:18.147" UserId="2762" Comment="improved formatting" Text="Using PolkadotJS, this is the code to get the breakdown of a DOT for an account in the current block (change the block hash if you want to query it in an specific block).&#xD;&#xA;```js&#xD;&#xA;    const ADDR = 'your-address-here';&#xD;&#xA;    const currentBlock = await api.rpc.chain.getBlock();&#xD;&#xA;    const apiAt = await api.at(currentBlock.block.header.hash);&#xD;&#xA;    const accountInfo = await apiAt.query.system.account(ADDR);&#xD;&#xA;    const locks = await apiAt.query.balances.locks(ADDR)&#xD;&#xA;    console.log(`Balance of the account ${ADDR} is: `);&#xD;&#xA;    console.log(accountInfo.toHuman());&#xD;&#xA;    console.log(locks.toHuman());&#xD;&#xA;```&#xD;&#xA;The account info will return the basic information of your balance account (free balance, reserved, miscFrozen and feeFrozen. Example:&#xD;&#xA;```json&#xD;&#xA;    {&#xD;&#xA;     nonce: '4',&#xD;&#xA;     consumers: '1',&#xD;&#xA;     providers: '1',&#xD;&#xA;     sufficients: '0',&#xD;&#xA;     data: {&#xD;&#xA;       free: 'xx',&#xD;&#xA;       reserved: 'xx',&#xD;&#xA;       miscFrozen: 'xx',&#xD;&#xA;       feeFrozen: 'xx'&#xD;&#xA;     }&#xD;&#xA;   }&#xD;&#xA;```&#xD;&#xA;The locks constant will show you the bonded, vested, locked... &#xD;&#xA;Example( with vested tokens):&#xD;&#xA;```json&#xD;&#xA;    [ { id: 'vesting ', amount: 'xx', reasons: 'Misc' } ]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="25028" PostHistoryTypeId="2" PostId="6526" RevisionGUID="885c262d-d793-4f38-a438-569f8d263d89" CreationDate="2022-12-29T10:47:41.213" UserId="2762" Text="As some in the comments mentioned you can create a custom RPC that queries a value from storage.&#xD;&#xA;&#xD;&#xA;Check [this answer on StackExchange][1] about how to do it or [this tutorial][2], that creates a custom RPC query from the pallet template in the Substrate node template.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/5555/2762&#xD;&#xA;  [2]: https://hackmd.io/JpJCbu0nTa2jym0za1Tggw" ContentLicense="CC BY-SA 4.0" />
  <row Id="25031" PostHistoryTypeId="5" PostId="6491" RevisionGUID="69ee6cf8-b303-43b2-8736-c253047ca4b5" CreationDate="2022-12-29T17:02:46.517" UserId="3646" Comment="edited body" Text="Adding the below section to the rs.lib file &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;       type RuntimeEvent = RuntimeEvent;&#xD;&#xA;       type MaxWellKnownNodes = MaxWellKnownNodes;&#xD;&#xA;       type MaxPeerIdLength = MaxPeerIdLength;&#xD;&#xA;       type AddOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type RemoveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type SwapOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type ResetOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;       type WeightInfo = ();&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      &#xD;&#xA;&#xD;&#xA;produce this error when building the node::&#xD;&#xA;&#xD;&#xA;    duplicate lang item in crate sp_io (which frame_support depends on): panic_impl.&#xD;&#xA;&#xD;&#xA;           = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/ubuntu/substrate/substrate_auth_palet/target/release/wbuild/node-template-runtime/target/wasm32-unknown-u&#xD;&#xA;    nknown/release/deps/libsp_io-05621afa7ed3c196.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/ubuntu/substrate/substrate_auth_palet/target/release/wbuild/node-template-runtime/target/wasm32-unknown-&#xD;&#xA;    unknown/release/deps/libsp_io-276985975586ba28.rmeta&#xD;&#xA;&#xD;&#xA;(without this section --&gt; no error when building the node)&#xD;&#xA;&#xD;&#xA;The same error occurs when add the last row to the construct_runtime &#xD;&#xA;&#xD;&#xA;    construct_runtime!(&#xD;&#xA;            pub struct Runtime&#xD;&#xA;            where&#xD;&#xA;                    Block = Block,&#xD;&#xA;                    NodeBlock = opaque::Block,&#xD;&#xA;                    UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;            {&#xD;&#xA;                    System: frame_system,&#xD;&#xA;                    RandomnessCollectiveFlip: &#xD;&#xA;                        pallet_randomness_collective_flip,&#xD;&#xA;                    Timestamp: pallet_timestamp,&#xD;&#xA;                    Aura: pallet_aura,&#xD;&#xA;                    Grandpa: pallet_grandpa,&#xD;&#xA;                    Balances: pallet_balances,&#xD;&#xA;                    TransactionPayment: pallet_transaction_payment,&#xD;&#xA;                    Sudo: pallet_sudo,&#xD;&#xA;     &#xD;&#xA;                    TemplateModule: pallet_template,&#xD;&#xA;                    NodeAuthorization: pallet_node_authorization::{Pallet, &#xD;&#xA;                        Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;}&#xD;&#xA;            }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The lib.rs file includes this section: `#![cfg_attr(not(feature = &quot;std&quot;), no_std)]`.&#xD;&#xA;&#xD;&#xA;Any idea on how to prevent this error?&#xD;&#xA;&#xD;&#xA;My Cargo.toml :&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;node-template-runtime&quot;&#xD;&#xA;    version = &quot;4.0.0-dev&quot;&#xD;&#xA;    description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;    authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;    homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    license = &quot;Unlicense&quot;&#xD;&#xA;    publish = false&#xD;&#xA;    repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;    &#xD;&#xA;    [package.metadata.docs.rs]&#xD;&#xA;    targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    &#xD;&#xA;    pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-randomness-collective-flip = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-core = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-runtime = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-std = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    sp-version = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.35&quot; }    &#xD;&#xA;    &#xD;&#xA;    # Used for the node template's RPCs&#xD;&#xA;    frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot;&gt;&#xD;&#xA;    &#xD;&#xA;    # Used for runtime benchmarking&#xD;&#xA;    frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot; branch&quot; = &quot;polkadot-v0.9.35&gt;&#xD;&#xA;    &#xD;&#xA;    # Local Dependencies&#xD;&#xA;    pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;    &#xD;&#xA;    [build-dependencies]&#xD;&#xA;    substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;            &quot;frame-try-runtime?/std&quot;,&#xD;&#xA;            &quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;            &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;            &quot;codec/std&quot;,&#xD;&#xA;           &quot;scale-info/std&quot;,&#xD;&#xA;            &quot;frame-executive/std&quot;,&#xD;&#xA;            &quot;frame-support/std&quot;,&#xD;&#xA;            &quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;            &quot;frame-system/std&quot;,&#xD;&#xA;            &quot;frame-try-runtime/std&quot;,&#xD;&#xA;            &quot;pallet-aura/std&quot;,&#xD;&#xA;            &quot;pallet-balances/std&quot;,&#xD;&#xA;            &quot;pallet-grandpa/std&quot;,&#xD;&#xA;            &quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;            &quot;pallet-sudo/std&quot;,&#xD;&#xA;            &quot;pallet-template/std&quot;,&#xD;&#xA;            &quot;pallet-timestamp/std&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;            &quot;sp-api/std&quot;,&#xD;&#xA;            &quot;sp-block-builder/std&quot;,&#xD;&#xA;            &quot;sp-consensus-aura/std&quot;,&#xD;&#xA;            &quot;sp-core/std&quot;,&#xD;&#xA;            &quot;sp-inherents/std&quot;,&#xD;&#xA;            &quot;sp-offchain/std&quot;,&#xD;&#xA;            &quot;sp-runtime/std&quot;,&#xD;&#xA;            &quot;sp-session/std&quot;,&#xD;&#xA;            &quot;sp-std/std&quot;,&#xD;&#xA;            &quot;sp-transaction-pool/std&quot;,&#xD;&#xA;            &quot;sp-version/std&quot;,&#xD;&#xA;            &quot;pallet-node-authorization/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;    runtime-benchmarks = [&#xD;&#xA;            &quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;            &quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;    ]&#xD;&#xA;    try-runtime = [&#xD;&#xA;            &quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;            &quot;frame-executive/try-runtime&quot;,&#xD;&#xA;            &quot;frame-system/try-runtime&quot;,&#xD;&#xA;            &quot;frame-support/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-template/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;            &quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25032" PostHistoryTypeId="2" PostId="6527" RevisionGUID="8ea309b2-1f8f-473a-865c-1f3981c7c613" CreationDate="2022-12-29T20:46:55.927" UserId="494" Text="For a more production-like environment, you can rely on the `author_insertKey` RPC. That is likely how node admins will manage their OCW signing keys in a production environment.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;```&#xD;&#xA;curl --location --request POST 'http://localhost:9933' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;   &quot;params&quot;: [&quot;abcd&quot;,&quot;bread tongue spell stadium clean grief coin rent spend total practice document&quot;,&quot;0xb6a8b4b6bf796991065035093d3265e314c3fe89e75ccb623985e57b0c2e0c30&quot;],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It's important to use the same `KeyType` that you declared in your OCW's `crypto` module. In your case, that's `abcd`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Another path is to use the `key insert` subcommand on the node's executable. For example:&#xD;&#xA;```&#xD;&#xA;./target/release/node-template key insert \&#xD;&#xA;--chain your_chainspec.json \&#xD;&#xA;--scheme Sr25519\&#xD;&#xA;--suri &quot;bread tongue spell stadium clean grief coin rent spend total practice document&quot; \&#xD;&#xA;--password-interactive \&#xD;&#xA;--key-type abcd \&#xD;&#xA;--base-path same_base_path_of_the_node&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The important detail here is the `--base-path`, which **must** match the running node's. That's where its keystore lives, and will persist after the node is restarted." ContentLicense="CC BY-SA 4.0" />
  <row Id="25034" PostHistoryTypeId="5" PostId="6470" RevisionGUID="e463fe59-a472-4efc-be7c-b484fd3bb23d" CreationDate="2022-12-29T20:50:04.790" UserId="494" Comment="added 320 characters in body" Text="If you're comfortable introducing a layer of permissioning into your design, you could perhaps use the [`SignedExtension` trait](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.SignedExtension.html).&#xD;&#xA;&#xD;&#xA;You'd have to keep an on-chain list of OCW identities that are &quot;authorized&quot; to send the specific extrinsic, and use them in the `validate` function of your `SignedExtention` trait implementation.&#xD;&#xA;&#xD;&#xA;This list could be updated via `sudo` or Governance.&#xD;&#xA;&#xD;&#xA;[Here](https://github.com/gautamdhameja/substrate-rbac)'s a working example of how to use the `SignedExtension` trait in a [RBAC permissioning system](https://en.wikipedia.org/wiki/Role-based_access_control). It's not the precise solution to your problem, but could serve as inspiration.&#xD;&#xA;&#xD;&#xA;Please note that you also need to design how the signing keys are handled by your OCW. FRAME's OCW example shows how you can do a signed transaction from an OCW. One important line in that example is:&#xD;&#xA;```&#xD;&#xA;pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;btc!&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The admin of each node will need to inject the keys (ideally matching &quot;authorized&quot; accounts) into the node. That can be done via:&#xD;&#xA;```&#xD;&#xA;curl --location --request POST 'http://localhost:9933' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;   &quot;params&quot;: [&quot;btc!&quot;,&quot;bread tongue spell stadium clean grief coin rent spend total practice document&quot;,&quot;0xb6a8b4b6bf796991065035093d3265e314c3fe89e75ccb623985e57b0c2e0c30&quot;],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;```&#xD;&#xA;(note that `keyType` is `btc!`, matching what has been declared in the OCW pallet).&#xD;&#xA;&#xD;&#xA;If the node admin doesn't do this step, the OCW simply won't be able to sign transactions.&#xD;&#xA;&#xD;&#xA;Another alternative for the node admin is to use the `key insert` subcommand on the node's executable, which will write the keys into disc, and will persist in case the node is restarted (`author_insertKey` will not). See [this answer](https://substrate.stackexchange.com/a/6527/494) for an example on how to use it.&#xD;&#xA;&#xD;&#xA;Then, for every signed transaction, if the signer is in the &quot;authorized&quot; set, the `SignedExtension` will allow it to enter the transaction pool." ContentLicense="CC BY-SA 4.0" />
  <row Id="25035" PostHistoryTypeId="5" PostId="6527" RevisionGUID="9975d779-dba1-4e59-b083-57052b7431e2" CreationDate="2022-12-29T21:20:00.093" UserId="494" Comment="deleted 26 characters in body" Text="For a more production-like environment, you can rely on the [`author_insertKey` RPC](https://github.com/paritytech/substrate/tree/master/docs#72-advanced-rpc-call). That is one possible way node admins can manage their OCW signing keys in a production environment.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;```&#xD;&#xA;curl --location --request POST 'http://localhost:9933' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;   &quot;params&quot;: [&quot;abcd&quot;,&quot;bread tongue spell stadium clean grief coin rent spend total practice document&quot;,&quot;0xb6a8b4b6bf796991065035093d3265e314c3fe89e75ccb623985e57b0c2e0c30&quot;],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It's important to use the same `KeyType` that you declared in your OCW's `crypto` module. In your case, that's `abcd`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Another path is to use the `key insert` subcommand on the node's executable. For example:&#xD;&#xA;```&#xD;&#xA;./target/release/node-template key insert \&#xD;&#xA;--chain your_chainspec.json \&#xD;&#xA;--scheme Sr25519\&#xD;&#xA;--suri &quot;bread tongue spell stadium clean grief coin rent spend total practice document&quot; \&#xD;&#xA;--key-type abcd \&#xD;&#xA;--base-path same_base_path_of_the_node&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The important detail here is the `--base-path`, which **must** match the running node's. That's where its keystore lives, and will persist after the node is restarted." ContentLicense="CC BY-SA 4.0" />
  <row Id="25040" PostHistoryTypeId="5" PostId="3940" RevisionGUID="66426fd7-1152-403e-811c-699615262151" CreationDate="2022-12-29T23:55:05.393" UserId="34" Comment="added 14 characters in body" Text="I analyzed your benchmark and it looks good, quite consistent (minus one outlier) [µs]:  &#xD;&#xA;```pre&#xD;&#xA;15.76&#xD;&#xA;15.69&#xD;&#xA;15.37&#xD;&#xA;15.55&#xD;&#xA;15.31&#xD;&#xA;31.38&#xD;&#xA;16.07&#xD;&#xA;15.81&#xD;&#xA;15.67&#xD;&#xA;15.43&#xD;&#xA;15.64&#xD;&#xA;15.99&#xD;&#xA;15.44&#xD;&#xA;```&#xD;&#xA;The benchmarks need to be run on the same hardware every time. This is since they measure *time*, and a faster PC scores lower (better) weights.  &#xD;&#xA;If you are just doing development you can obviously use any hardware. But before a release it is necessary to re-benchmark the weights on fixed hardware.   &#xD;&#xA;A good pick would be the Polkadot [reference hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#reference-hardware)." ContentLicense="CC BY-SA 4.0" />
  <row Id="25041" PostHistoryTypeId="2" PostId="6529" RevisionGUID="3e3e03f4-086b-4ba0-9d1f-61524935e657" CreationDate="2022-12-30T00:17:05.373" UserId="34" Text="The [2022 tracking issue for Substrate benchmarks](https://github.com/paritytech/substrate/issues/10530) mentions that Polkadot uses [this reference hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#reference-hardware) of this specification to generate weights:&#xD;&#xA;&#xD;&#xA;&gt; #### Reference Hardware&#xD;&#xA;&gt; &#xD;&#xA;&gt; The transaction weights in Polkadot are benchmarked on reference&#xD;&#xA;&gt; hardware. We ran the benchmark on VM instances of two major cloud&#xD;&#xA;&gt; providers: Google Cloud Platform (GCP) and Amazon Web Services (AWS).&#xD;&#xA;&gt; To be specific, we used `c2d-highcpu-8` VM instance on GCP and&#xD;&#xA;&gt; `c6id.2xlarge` on AWS.&#xD;&#xA;&gt; &#xD;&#xA;&gt; - **CPU**&#xD;&#xA;&gt;   - x86-64 compatible;&#xD;&#xA;&gt;   - Intel Ice Lake, or newer (Xeon or Core series); AMD Zen3, or newer (EPYC or Ryzen);&#xD;&#xA;&gt;   - 4 physical cores @ 3.4GHz;&#xD;&#xA;&gt;   - Simultaneous multithreading disabled (Hyper-Threading on Intel, SMT on AMD);&#xD;&#xA;&gt; - **Storage**&#xD;&#xA;&gt;   - An NVMe SSD of 1 TB (In general, the latency is more important than the throughput.)&#xD;&#xA;&gt; - **Memory**&#xD;&#xA;&gt;   - 16GB DDR4 ECC.&#xD;&#xA;&gt; - **System**&#xD;&#xA;&gt;   - Linux Kernel 5.16 or newer.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Parachains need to gauge precisely how much time they will consume for their proof of validity with the relay chain for each state transition. This is a _hard_ limit AFAIK for now, that s about 1/6th of the total block time on the relay IIRC.&#xD;&#xA;&#xD;&#xA;It is unclear if a parachain _must_ use this same hardware to generate weights.&#xD;&#xA;I would think so, based on the hard PoV requirements.&#xD;&#xA;&#xD;&#xA;- Can parachains decide on arbitrary reference hardware to benchmark against?&#xD;&#xA;- [If so] How can one ensure they are limiting their total weight such that all possible conditions will be within the PoV weight limits?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25043" PostHistoryTypeId="1" PostId="6529" RevisionGUID="3e3e03f4-086b-4ba0-9d1f-61524935e657" CreationDate="2022-12-30T00:17:05.373" UserId="34" Text="What reference hardware can a parachain use to benchmark &amp; generate weights?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25044" PostHistoryTypeId="3" PostId="6529" RevisionGUID="3e3e03f4-086b-4ba0-9d1f-61524935e657" CreationDate="2022-12-30T00:17:05.373" UserId="34" Text="|polkadot|parachain|benchmarking|weight|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25045" PostHistoryTypeId="2" PostId="6530" RevisionGUID="fd48eeb9-9d4c-4d33-88f2-c63297fd8eb0" CreationDate="2022-12-30T00:30:08.780" UserId="3553" Text="Hi guys I'm new to Rust and new to ink!, so please bear with me if I asked some silly questions. &#xD;&#xA;&#xD;&#xA;My code is [here][1]. It comprises of an Erc20 contract and a main contract which contains some function that will change the state of the Erc20. Different from the [delegator example][2] which initialized add/subber/accumulator from codehash, my one will initialize the erc20 by its accountID. I'm wondering whether ink-e2e allows me to test erc20 approve/transfer from the main contract and methods in main contract that will trigger some methods in erc20? I did following attempts in my [code][1] but failed. Could anyone help? Thanks!&#xD;&#xA;&#xD;&#xA;[![image1][3]][3]&#xD;&#xA;[![image2][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/CherryBooooooom/InteractWithErc20&#xD;&#xA;  [2]: https://github.com/paritytech/ink/tree/master/examples/delegator&#xD;&#xA;  [3]: https://i.stack.imgur.com/1vZpg.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/FTHik.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="25047" PostHistoryTypeId="1" PostId="6530" RevisionGUID="fd48eeb9-9d4c-4d33-88f2-c63297fd8eb0" CreationDate="2022-12-30T00:30:08.780" UserId="3553" Text="Cross contrct testing by ink e2e" ContentLicense="CC BY-SA 4.0" />
  <row Id="25048" PostHistoryTypeId="3" PostId="6530" RevisionGUID="fd48eeb9-9d4c-4d33-88f2-c63297fd8eb0" CreationDate="2022-12-30T00:30:08.780" UserId="3553" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25049" PostHistoryTypeId="2" PostId="6531" RevisionGUID="bec596ee-608c-4476-a5b8-c3cba6d0563f" CreationDate="2022-12-30T00:42:40.093" UserId="716" Text="It is not clear how to use pagination in py-substrate-interface.  In the sample code below, there are only 32 records so all the query should be complete, but `result.loading_complete` shows `false`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;&#xD;&#xA;url = 'wss://shiden.api.onfinality.io/public-ws'&#xD;&#xA;substrate = SubstrateInterface(url)&#xD;&#xA;&#xD;&#xA;result = substrate.query_map('Contracts', 'CodeStorage', block_hash = None, page_size = 100, ignore_decoding_errors = True)&#xD;&#xA;start_key = result.last_key&#xD;&#xA;print(f&quot;loading complete {result.loading_complete} | size {len(result.records)} | next start key {start_key}&quot;)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I do want to query the next page, I am running the same query_map call with the added `start_key` parameter.  Is that correct, because there is also a `retrieve_next_page` call in the result object, but I can't figure out how to use it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;result = substrate.query_map('Contracts', 'CodeStorage', block_hash = None, page_size = 100, start_key = start_key, ignore_decoding_errors = True)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here are the relevant components of the `results` object:&#xD;&#xA;..., 'block_hash', 'current_index', 'ignore_decoding_errors', 'last_key', '**loading_complete**', 'max_results', 'module', 'page_size', 'params', 'records', '**retrieve_next_page**', 'storage_function', 'substrate']&#xD;&#xA;&#xD;&#xA;So unless I am misunderstanding something, `loading_complete` is not correctly reporting when it is done and `retrieve_next_page` doesn't seem to do what it implies.  Also, the documentation could be improved by adding some examples, especially one that includes pagination.  Nonetheless, py-substrate-interface is a very handy tool.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25051" PostHistoryTypeId="1" PostId="6531" RevisionGUID="bec596ee-608c-4476-a5b8-c3cba6d0563f" CreationDate="2022-12-30T00:42:40.093" UserId="716" Text="Pagination issues in py-substrate-interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="25052" PostHistoryTypeId="3" PostId="6531" RevisionGUID="bec596ee-608c-4476-a5b8-c3cba6d0563f" CreationDate="2022-12-30T00:42:40.093" UserId="716" Text="|python|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25055" PostHistoryTypeId="2" PostId="6532" RevisionGUID="f7cedd78-c4bf-48b7-b026-f4b0854aa2eb" CreationDate="2022-12-30T03:15:22.147" UserId="3654" Text="all.&#xD;&#xA;Currently sidecar owns a api &quot;/node/version&quot; for get polkadot node version.&#xD;&#xA;But is there any api could return sidecar api version for us?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25057" PostHistoryTypeId="1" PostId="6532" RevisionGUID="f7cedd78-c4bf-48b7-b026-f4b0854aa2eb" CreationDate="2022-12-30T03:15:22.147" UserId="3654" Text="is there any api for get substrate api client verison?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25058" PostHistoryTypeId="3" PostId="6532" RevisionGUID="f7cedd78-c4bf-48b7-b026-f4b0854aa2eb" CreationDate="2022-12-30T03:15:22.147" UserId="3654" Text="|polkadot|api|chainspec|blockchain|sidecar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25059" PostHistoryTypeId="5" PostId="6530" RevisionGUID="780e2eac-d2ed-48bf-914b-bf8b5177390e" CreationDate="2022-12-30T06:39:23.247" UserId="3553" Comment="added 13270 characters in body" Text="Hi guys I'm new to Rust and new to ink!, so please bear with me if I asked some silly questions. &#xD;&#xA;&#xD;&#xA;My code is [here][1]. It comprises of an Erc20 contract and a main contract which contains some function that will change the state of the Erc20. Different from the [delegator example][2] which initialized add/subber/accumulator from codehash, my one will initialize the erc20 by its accountID. I'm wondering whether ink-e2e allows me to test erc20 approve/transfer from the main contract and methods in main contract that will trigger some methods in erc20? I did following attempts in my [code][1] but failed. &#xD;&#xA;&#xD;&#xA;[![image1][3]][3]&#xD;&#xA;[![image2][4]][4]&#xD;&#xA;&#xD;&#xA;When I run `cargo test --features e2e-tests` I got the following errors:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0599]: the function or associated item `new` exists for struct `Client&lt;WithExtrinsicParams&lt;ink_e2e::SubstrateConfig, BaseExtrinsicParams&lt;ink_e2e::SubstrateConfig, PlainTip&gt;&gt;, DefaultEnvironment&gt;`, but its trait bounds were not satisfied&#xD;&#xA;   --&gt; lib.rs:99:9&#xD;&#xA;    |&#xD;&#xA;99  | /         #[ink_e2e::test(&#xD;&#xA;100 | |             additional_contracts = &quot;erc20/Cargo.toml&quot;&#xD;&#xA;101 | |         )]&#xD;&#xA;    | |__________^ function or associated item cannot be called on `Client&lt;WithExtrinsicParams&lt;ink_e2e::SubstrateConfig, BaseExtrinsicParams&lt;ink_e2e::SubstrateConfig, PlainTip&gt;&gt;, DefaultEnvironment&gt;` due to unsatisfied trait bounds&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/angie/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_env-4.0.0-beta/src/types.rs:172:1&#xD;&#xA;    |&#xD;&#xA;172 |   pub enum DefaultEnvironment {}&#xD;&#xA;    |   --------------------------- doesn't satisfy `DefaultEnvironment: ink_env::types::Environment`&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/xts.rs:69:1&#xD;&#xA;    |&#xD;&#xA;69  |   pub struct Call&lt;E: Environment, B&gt; {&#xD;&#xA;    |   ---------------------------------- doesn't satisfy `ink_e2e::xts::Call&lt;DefaultEnvironment, _&gt;: Encode`&#xD;&#xA;    |&#xD;&#xA;    = note: the following trait bounds were not satisfied:&#xD;&#xA;            `DefaultEnvironment: ink_env::types::Environment`&#xD;&#xA;            `ink_e2e::xts::Call&lt;DefaultEnvironment, _&gt;: Encode`&#xD;&#xA;    = note: this error originates in the attribute macro `ink_e2e::test` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `DefaultEnvironment: ink_env::types::Environment` is not satisfied&#xD;&#xA;   --&gt; lib.rs:99:9&#xD;&#xA;    |&#xD;&#xA;99  | /         #[ink_e2e::test(&#xD;&#xA;100 | |             additional_contracts = &quot;erc20/Cargo.toml&quot;&#xD;&#xA;101 | |         )]&#xD;&#xA;    | |__________^ the trait `ink_env::types::Environment` is not implemented for `DefaultEnvironment`&#xD;&#xA;    |&#xD;&#xA;    = help: the trait `ink_env::types::Environment` is implemented for `ink_env::types::DefaultEnvironment`&#xD;&#xA;note: required by a bound in `Client`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/client.rs:249:8&#xD;&#xA;    |&#xD;&#xA;249 |     E: Environment,&#xD;&#xA;    |        ^^^^^^^^^^^ required by this bound in `Client`&#xD;&#xA;    = note: this error originates in the attribute macro `ink_e2e::test` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; lib.rs:120:17&#xD;&#xA;    |&#xD;&#xA;118 |             let test_constructor = TestErcRef::new(&#xD;&#xA;    |                                    --------------- arguments to this function are incorrect&#xD;&#xA;119 |                 erc20_acc_id,&#xD;&#xA;120 |                 ink_e2e::alice()&#xD;&#xA;    |                 ^^^^^^^^^^^^^^^^ expected struct `ink::ink_primitives::AccountId`, found struct `PairSigner`&#xD;&#xA;    |&#xD;&#xA;    = note: expected struct `ink::ink_primitives::AccountId`&#xD;&#xA;               found struct `PairSigner&lt;_, ink_e2e::subxt::ext::sp_core::sr25519::Pair&gt;`&#xD;&#xA;note: associated function defined here&#xD;&#xA;   --&gt; lib.rs:45:16&#xD;&#xA;    |&#xD;&#xA;4   | #[ink::contract]&#xD;&#xA;    | ----------------&#xD;&#xA;...&#xD;&#xA;45  |         pub fn new(&#xD;&#xA;    |                ^^^&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder` is not satisfied&#xD;&#xA;   --&gt; lib.rs:133:43&#xD;&#xA;    |&#xD;&#xA;133 |             let approve = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                           ^^^^^^^^ the trait `ink::codegen::trait_def::call_builder::TraitCallBuilder` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:10&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |          ^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not satisfied&#xD;&#xA;   --&gt; lib.rs:133:43&#xD;&#xA;    |&#xD;&#xA;133 |             let approve = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                           ^^^^^^^^ the trait `ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:29&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; lib.rs:133:53&#xD;&#xA;    |&#xD;&#xA;133 |             let approve = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                           ------------------------- ^^^^^^^^^^^^^^^^^^^^ expected struct `ink_primitives::types::AccountId`, found struct `ink::ink_primitives::AccountId`&#xD;&#xA;    |                           |&#xD;&#xA;    |                           arguments to this function are incorrect&#xD;&#xA;    |&#xD;&#xA;    = note: perhaps two different versions of crate `ink_primitives` are being used?&#xD;&#xA;note: function defined here&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:89:8&#xD;&#xA;    |&#xD;&#xA;89  | pub fn build_message&lt;Ref&gt;(&#xD;&#xA;    |        ^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0599]: the method `call` exists for struct `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;`, but its trait bounds were not satisfied&#xD;&#xA;   --&gt; lib.rs:134:18&#xD;&#xA;    |&#xD;&#xA;134 |                 .call(|contract| contract.approve(test_acc_id,  10_000));&#xD;&#xA;    |                  ^^^^ method cannot be called on `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;` due to unsatisfied trait bounds&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/angie/Documents/CherryBooooooom/InteractWithErc20/erc20/lib.rs:13:5&#xD;&#xA;    |&#xD;&#xA;13  |     /// A simple ERC-20 contract.&#xD;&#xA;    |     -----------------------------&#xD;&#xA;    |     |&#xD;&#xA;    |     doesn't satisfy `_: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;    |     doesn't satisfy `_: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;    |&#xD;&#xA;    = note: the following trait bounds were not satisfied:&#xD;&#xA;            `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;            `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder` is not satisfied&#xD;&#xA;   --&gt; lib.rs:142:44&#xD;&#xA;    |&#xD;&#xA;142 |             let transfer = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                            ^^^^^^^^ the trait `ink::codegen::trait_def::call_builder::TraitCallBuilder` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:10&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |          ^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not satisfied&#xD;&#xA;   --&gt; lib.rs:142:44&#xD;&#xA;    |&#xD;&#xA;142 |             let transfer = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                            ^^^^^^^^ the trait `ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:29&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; lib.rs:142:54&#xD;&#xA;    |&#xD;&#xA;142 |             let transfer = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                            ------------------------- ^^^^^^^^^^^^^^^^^^^^ expected struct `ink_primitives::types::AccountId`, found struct `ink::ink_primitives::AccountId`&#xD;&#xA;    |                            |&#xD;&#xA;    |                            arguments to this function are incorrect&#xD;&#xA;    |&#xD;&#xA;    = note: perhaps two different versions of crate `ink_primitives` are being used?&#xD;&#xA;note: function defined here&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:89:8&#xD;&#xA;    |&#xD;&#xA;89  | pub fn build_message&lt;Ref&gt;(&#xD;&#xA;    |        ^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0599]: the method `call` exists for struct `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;`, but its trait bounds were not satisfied&#xD;&#xA;   --&gt; lib.rs:143:18&#xD;&#xA;    |&#xD;&#xA;143 |                 .call(|contract| contract.transfer(ink_e2e::bob(),  2_000));&#xD;&#xA;    |                  ^^^^ method cannot be called on `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;` due to unsatisfied trait bounds&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/angie/Documents/CherryBooooooom/InteractWithErc20/erc20/lib.rs:13:5&#xD;&#xA;    |&#xD;&#xA;13  |     /// A simple ERC-20 contract.&#xD;&#xA;    |     -----------------------------&#xD;&#xA;    |     |&#xD;&#xA;    |     doesn't satisfy `_: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;    |     doesn't satisfy `_: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;    |&#xD;&#xA;    = note: the following trait bounds were not satisfied:&#xD;&#xA;            `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;            `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder` is not satisfied&#xD;&#xA;   --&gt; lib.rs:150:46&#xD;&#xA;    |&#xD;&#xA;150 |             let balance_of = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                              ^^^^^^^^ the trait `ink::codegen::trait_def::call_builder::TraitCallBuilder` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:10&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |          ^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not satisfied&#xD;&#xA;   --&gt; lib.rs:150:46&#xD;&#xA;    |&#xD;&#xA;150 |             let balance_of = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                              ^^^^^^^^ the trait `ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:29&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; lib.rs:150:56&#xD;&#xA;    |&#xD;&#xA;150 |             let balance_of = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                              ------------------------- ^^^^^^^^^^^^^^^^^^^^ expected struct `ink_primitives::types::AccountId`, found struct `ink::ink_primitives::AccountId`&#xD;&#xA;    |                              |&#xD;&#xA;    |                              arguments to this function are incorrect&#xD;&#xA;    |&#xD;&#xA;    = note: perhaps two different versions of crate `ink_primitives` are being used?&#xD;&#xA;note: function defined here&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:89:8&#xD;&#xA;    |&#xD;&#xA;89  | pub fn build_message&lt;Ref&gt;(&#xD;&#xA;    |        ^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0599]: the method `call` exists for struct `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;`, but its trait bounds were not satisfied&#xD;&#xA;   --&gt; lib.rs:151:14&#xD;&#xA;    |&#xD;&#xA;151 |             .call(|contract| contract.balance_of(ink_e2e::bob()));&#xD;&#xA;    |              ^^^^ method cannot be called on `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;` due to unsatisfied trait bounds&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/angie/Documents/CherryBooooooom/InteractWithErc20/erc20/lib.rs:13:5&#xD;&#xA;    |&#xD;&#xA;13  |     /// A simple ERC-20 contract.&#xD;&#xA;    |     -----------------------------&#xD;&#xA;    |     |&#xD;&#xA;    |     doesn't satisfy `_: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;    |     doesn't satisfy `_: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;    |&#xD;&#xA;    = note: the following trait bounds were not satisfied:&#xD;&#xA;            `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;            `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0277, E0308, E0599.&#xD;&#xA;For more information about an error, try `rustc --explain E0277`.&#xD;&#xA;error: could not compile `testerc` due to 15 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could anyone help? Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/CherryBooooooom/InteractWithErc20&#xD;&#xA;  [2]: https://github.com/paritytech/ink/tree/master/examples/delegator&#xD;&#xA;  [3]: https://i.stack.imgur.com/1vZpg.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/FTHik.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="25060" PostHistoryTypeId="50" PostId="2371" RevisionGUID="141cfd24-896c-40e7-ba21-5e8ecb3798d8" CreationDate="2022-12-30T07:00:50.150" UserId="-1" />
  <row Id="25061" PostHistoryTypeId="2" PostId="6533" RevisionGUID="5ed99f24-f3bb-45d7-bcf6-ba2b4ae558e5" CreationDate="2022-12-30T09:50:16.967" UserId="2762" Text="How are you running sidecar? If you have it installed in your project you can query the version using the CLI:&#xD;&#xA;&#xD;&#xA;    node_modules/.bin/substrate-api-sidecar --version&#xD;&#xA;&#xD;&#xA;If you have installed it globally:&#xD;&#xA;&#xD;&#xA;    substrate-api-sidecar --version&#xD;&#xA;&#xD;&#xA;And if you are query through the docs page: https://paritytech.github.io/substrate-api-sidecar/dist/&#xD;&#xA;&#xD;&#xA;You can see in the top the version 14.2.2&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/EcbTc.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25063" PostHistoryTypeId="2" PostId="6534" RevisionGUID="d8752318-bc0b-452e-b583-d3ce238c2a46" CreationDate="2022-12-30T10:36:46.233" UserId="2762" Text="I am sharing with you the code about how to do it using PolkadotJS. Using python should be calling the same functions.&#xD;&#xA;&#xD;&#xA;First connect to the parachain you want to query&#xD;&#xA;```js&#xD;&#xA;  const wsProvider = new WsProvider('ws://127.0.0.1:9944&quot;');&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After get all the contracts (where you will get the account ids you are looking for) calling the extrinsic `contractInfoOf` but instead of specifying and account ID querying all the entries.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  const contracts = await api.query.contracts.contractInfoOf.entries();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally go through all the contracts you got, parse the data to get the account ID and the codeHash. &#xD;&#xA;&#xD;&#xA;You are going to use the codeHash to call the extrinsic `codeStorage` in order to get the code.&#xD;&#xA;```js&#xD;&#xA;    for (const contract of contracts){&#xD;&#xA;      const accountId = contract[0].toHuman()[0];&#xD;&#xA;&#xD;&#xA;      const codeHash = contract[1].toHuman().codeHash;&#xD;&#xA;      const codeStorage = await api.query.contracts.codeStorage(codeHash);&#xD;&#xA;      const code = codeStorage.toHuman().code;&#xD;&#xA;&#xD;&#xA;      console.log(`Accountid: ${accountId} - Code: ${code}`);&#xD;&#xA;    };&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="25065" PostHistoryTypeId="2" PostId="6535" RevisionGUID="3521d345-74f1-4122-b109-ac70e797dadc" CreationDate="2022-12-30T11:14:42.830" UserId="2372" Text="When Im sending assets from relay chain to a parachain by using Limited Teleport assets. I`m facing this issue [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/4sSUv.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25067" PostHistoryTypeId="1" PostId="6535" RevisionGUID="3521d345-74f1-4122-b109-ac70e797dadc" CreationDate="2022-12-30T11:14:42.830" UserId="2372" Text="Xcm V2Traits Error UntrustedTeleportLocation" ContentLicense="CC BY-SA 4.0" />
  <row Id="25068" PostHistoryTypeId="3" PostId="6535" RevisionGUID="3521d345-74f1-4122-b109-ac70e797dadc" CreationDate="2022-12-30T11:14:42.830" UserId="2372" Text="|polkadot|parachain|xcm|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25069" PostHistoryTypeId="2" PostId="6536" RevisionGUID="d951524e-ccbb-420d-b7c0-0053bd97a04f" CreationDate="2022-12-30T12:51:50.790" UserId="28" Text="&gt; Can parachains decide on arbitrary reference hardware to benchmark against?&#xD;&#xA;&#xD;&#xA;No, they must use the same hardware as the relay chain, which is the hardware recommendations you pasted above. Technically they could use weaker / slower hardware, but this benefits no one.&#xD;&#xA;&#xD;&#xA;Ultimately the bottleneck for parachain execution comes from the validators on Polkadot. If a parachain block is too heavy such that a Polkadot validator cannot process the block in time, it will be rejected. If a Parachain would use a super computer, it could of course fit a huge amount of weight into a small period of time, but then Polkadot validators would not be able to process that same block fast enough. Selection of validator hardware is an important part of decentralization and costs, as selecting more powerful hardware can limit who has access to, or can afford to run that hardware.&#xD;&#xA;&#xD;&#xA;&gt; How can one ensure they are limiting their total weight such that all possible conditions will be within the PoV weight limits?&#xD;&#xA;&#xD;&#xA;They should simply run their benchmarks on the same hardware as recommended. There is nothing else a parachain team can do here, as even execution of the same code multiple times on the same machine may result in slightly different timings.&#xD;&#xA;&#xD;&#xA;To sanity check their benchmarks align with what is expected, they can use common pallets / benchmarks and check it against Polkadot. For example the Balances pallet, or the [&quot;baseline&quot; benchmarks](https://github.com/paritytech/substrate/blob/master/frame/benchmarking/src/baseline.rs) included with the benchmarking pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="25072" PostHistoryTypeId="2" PostId="6537" RevisionGUID="5b1c9473-101a-41b2-a841-608e38a5f245" CreationDate="2022-12-30T15:35:19.283" UserId="85" Text="DOT can't be teleported from the relay chain because it can't be dependent on the governance of a parachain (statemint is an exception because it has the relay chain's governance).&#xD;&#xA;&#xD;&#xA;Rather than doing this you can reserve transfer the funds to your parachain's account on the relay chain (or statemint) and then when the parachain receives the callback XCM message it can mint a token on the parachain that represents this DOT (parachainlocalDOT) and send that to the user's account. It would be the parachain's responsibility to account for the parachainlocalDOT token and it could redeem that token for DOT on the relay chain (or statemint at a later point)." ContentLicense="CC BY-SA 4.0" />
  <row Id="25075" PostHistoryTypeId="2" PostId="6538" RevisionGUID="f60c5ec2-4e53-4b46-bc93-35eb89f25247" CreationDate="2022-12-30T18:12:23.927" UserId="94" Text="The easiest way to handle `query_map` is use it as an iterator instead of manual last-key tracking.  &#xD;&#xA; For example all accounts of `System::Account` for Kusama:  &#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=&quot;wss://kusama-rpc.polkadot.io&quot;,&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;query = substrate.query_map('System', 'Account', page_size=1000)&#xD;&#xA;&#xD;&#xA;for (i, (account, account_info)) in enumerate(query):&#xD;&#xA;    print(f&quot;#{i} '{account.value}': {account_info.value['data']['free']}&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can play around with the page size and see that it prints way more than 1000 accounts." ContentLicense="CC BY-SA 4.0" />
  <row Id="25077" PostHistoryTypeId="52" PostId="6535" RevisionGUID="457d4c90-9821-4955-92dd-0c89ff150cf1" CreationDate="2022-12-30T19:15:05.697" />
  <row Id="25078" PostHistoryTypeId="2" PostId="6539" RevisionGUID="9d2ab521-c152-4ec4-b66d-c64f2cbe3120" CreationDate="2022-12-30T21:53:35.493" UserId="19" Text="I want to build locally [substrate-contracts-node][1] to be able develop ink smart contracts and after cloning repository I have executed `cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git` and got this error:&#xD;&#xA;&#xD;&#xA;    error: failed to compile `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git#87a3d76c)`, intermediate artifacts can be found at `/tmp/cargo-installEfgqLE`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      failed to get `obce` as a dependency of package `pallet-assets-chain-extension v0.1.1 (https://github.com/727-Ventures/pallet-assets-chain-extension?branch=polkadot-v0.9.34#1680c99e)`&#xD;&#xA;          ... which satisfies git dependency `pallet-assets-chain-extension` of package `contracts-node-runtime v0.23.0 (/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime)`&#xD;&#xA;          ... which satisfies path dependency `contracts-node-runtime` of package `contracts-node v0.23.0 (/home/tomek/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/node)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      failed to load source for dependency `obce`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      Unable to update https://github.com/727-Ventures/obce?branch=polkadot-v0.9.34&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      failed to find branch `polkadot-v0.9.34`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      cannot locate remote-tracking branch 'origin/polkadot-v0.9.34'; class=Reference (4); code=NotFound (-3)&#xD;&#xA;&#xD;&#xA;I am aware of the fact that I can download and run already released build from Github, but I guess that some people will want to build a node locally. Appreciate any hints.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="25080" PostHistoryTypeId="1" PostId="6539" RevisionGUID="9d2ab521-c152-4ec4-b66d-c64f2cbe3120" CreationDate="2022-12-30T21:53:35.493" UserId="19" Text="&quot;failed to load source for dependency `obce`&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25081" PostHistoryTypeId="3" PostId="6539" RevisionGUID="9d2ab521-c152-4ec4-b66d-c64f2cbe3120" CreationDate="2022-12-30T21:53:35.493" UserId="19" Text="|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25086" PostHistoryTypeId="2" PostId="6541" RevisionGUID="78c745e2-cc42-4b37-abf6-f640305c355c" CreationDate="2022-12-31T16:24:24.000" UserId="272" Text="I found [wasmi][1] is a dependency in multiple substrate crates, but there's [one crate that also uses wasmtime][2]. How is `wasmi` different from `wasmtime`? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/wasmi&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/a73a35eaf917f26612f56395325017576ac7ce0f/primitives/wasm-interface/Cargo.toml" ContentLicense="CC BY-SA 4.0" />
  <row Id="25088" PostHistoryTypeId="1" PostId="6541" RevisionGUID="78c745e2-cc42-4b37-abf6-f640305c355c" CreationDate="2022-12-31T16:24:24.000" UserId="272" Text="How is wasmi different from wasmtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25089" PostHistoryTypeId="3" PostId="6541" RevisionGUID="78c745e2-cc42-4b37-abf6-f640305c355c" CreationDate="2022-12-31T16:24:24.000" UserId="272" Text="|wasm|wasmi|wasmtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25090" PostHistoryTypeId="50" PostId="4426" RevisionGUID="107fc9a3-9e86-4771-8577-aa1b43833d85" CreationDate="2023-01-01T16:07:05.840" UserId="-1" />
  <row Id="25092" PostHistoryTypeId="5" PostId="6530" RevisionGUID="134c0397-caa7-4248-878f-a11869a2b7b5" CreationDate="2023-01-01T21:35:10.183" UserId="83" Comment="typo" Text="Hi guys I'm new to Rust and new to ink!, so please bear with me if I asked some silly questions. &#xD;&#xA;&#xD;&#xA;My code is [here][1]. It comprises of an ERC20 contract and a main contract which contains some function that will change the state of the ERC20. Different from the [delegator example][2] which initialized add/subber/accumulator from codehash, my one will initialize the ERC20 by its accountID. I'm wondering whether ink-e2e allows me to test ERC20 approve/transfer from the main contract and methods in main contract that will trigger some methods in ERC20? I did following attempts in my [code][1] but failed. &#xD;&#xA;&#xD;&#xA;[![image1][3]][3]&#xD;&#xA;[![image2][4]][4]&#xD;&#xA;&#xD;&#xA;When I run `cargo test --features e2e-tests` I got the following errors:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;error[E0599]: the function or associated item `new` exists for struct `Client&lt;WithExtrinsicParams&lt;ink_e2e::SubstrateConfig, BaseExtrinsicParams&lt;ink_e2e::SubstrateConfig, PlainTip&gt;&gt;, DefaultEnvironment&gt;`, but its trait bounds were not satisfied&#xD;&#xA;   --&gt; lib.rs:99:9&#xD;&#xA;    |&#xD;&#xA;99  | /         #[ink_e2e::test(&#xD;&#xA;100 | |             additional_contracts = &quot;erc20/Cargo.toml&quot;&#xD;&#xA;101 | |         )]&#xD;&#xA;    | |__________^ function or associated item cannot be called on `Client&lt;WithExtrinsicParams&lt;ink_e2e::SubstrateConfig, BaseExtrinsicParams&lt;ink_e2e::SubstrateConfig, PlainTip&gt;&gt;, DefaultEnvironment&gt;` due to unsatisfied trait bounds&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/angie/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_env-4.0.0-beta/src/types.rs:172:1&#xD;&#xA;    |&#xD;&#xA;172 |   pub enum DefaultEnvironment {}&#xD;&#xA;    |   --------------------------- doesn't satisfy `DefaultEnvironment: ink_env::types::Environment`&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/xts.rs:69:1&#xD;&#xA;    |&#xD;&#xA;69  |   pub struct Call&lt;E: Environment, B&gt; {&#xD;&#xA;    |   ---------------------------------- doesn't satisfy `ink_e2e::xts::Call&lt;DefaultEnvironment, _&gt;: Encode`&#xD;&#xA;    |&#xD;&#xA;    = note: the following trait bounds were not satisfied:&#xD;&#xA;            `DefaultEnvironment: ink_env::types::Environment`&#xD;&#xA;            `ink_e2e::xts::Call&lt;DefaultEnvironment, _&gt;: Encode`&#xD;&#xA;    = note: this error originates in the attribute macro `ink_e2e::test` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `DefaultEnvironment: ink_env::types::Environment` is not satisfied&#xD;&#xA;   --&gt; lib.rs:99:9&#xD;&#xA;    |&#xD;&#xA;99  | /         #[ink_e2e::test(&#xD;&#xA;100 | |             additional_contracts = &quot;erc20/Cargo.toml&quot;&#xD;&#xA;101 | |         )]&#xD;&#xA;    | |__________^ the trait `ink_env::types::Environment` is not implemented for `DefaultEnvironment`&#xD;&#xA;    |&#xD;&#xA;    = help: the trait `ink_env::types::Environment` is implemented for `ink_env::types::DefaultEnvironment`&#xD;&#xA;note: required by a bound in `Client`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/client.rs:249:8&#xD;&#xA;    |&#xD;&#xA;249 |     E: Environment,&#xD;&#xA;    |        ^^^^^^^^^^^ required by this bound in `Client`&#xD;&#xA;    = note: this error originates in the attribute macro `ink_e2e::test` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; lib.rs:120:17&#xD;&#xA;    |&#xD;&#xA;118 |             let test_constructor = TestErcRef::new(&#xD;&#xA;    |                                    --------------- arguments to this function are incorrect&#xD;&#xA;119 |                 erc20_acc_id,&#xD;&#xA;120 |                 ink_e2e::alice()&#xD;&#xA;    |                 ^^^^^^^^^^^^^^^^ expected struct `ink::ink_primitives::AccountId`, found struct `PairSigner`&#xD;&#xA;    |&#xD;&#xA;    = note: expected struct `ink::ink_primitives::AccountId`&#xD;&#xA;               found struct `PairSigner&lt;_, ink_e2e::subxt::ext::sp_core::sr25519::Pair&gt;`&#xD;&#xA;note: associated function defined here&#xD;&#xA;   --&gt; lib.rs:45:16&#xD;&#xA;    |&#xD;&#xA;4   | #[ink::contract]&#xD;&#xA;    | ----------------&#xD;&#xA;...&#xD;&#xA;45  |         pub fn new(&#xD;&#xA;    |                ^^^&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder` is not satisfied&#xD;&#xA;   --&gt; lib.rs:133:43&#xD;&#xA;    |&#xD;&#xA;133 |             let approve = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                           ^^^^^^^^ the trait `ink::codegen::trait_def::call_builder::TraitCallBuilder` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:10&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |          ^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not satisfied&#xD;&#xA;   --&gt; lib.rs:133:43&#xD;&#xA;    |&#xD;&#xA;133 |             let approve = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                           ^^^^^^^^ the trait `ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:29&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; lib.rs:133:53&#xD;&#xA;    |&#xD;&#xA;133 |             let approve = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                           ------------------------- ^^^^^^^^^^^^^^^^^^^^ expected struct `ink_primitives::types::AccountId`, found struct `ink::ink_primitives::AccountId`&#xD;&#xA;    |                           |&#xD;&#xA;    |                           arguments to this function are incorrect&#xD;&#xA;    |&#xD;&#xA;    = note: perhaps two different versions of crate `ink_primitives` are being used?&#xD;&#xA;note: function defined here&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:89:8&#xD;&#xA;    |&#xD;&#xA;89  | pub fn build_message&lt;Ref&gt;(&#xD;&#xA;    |        ^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0599]: the method `call` exists for struct `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;`, but its trait bounds were not satisfied&#xD;&#xA;   --&gt; lib.rs:134:18&#xD;&#xA;    |&#xD;&#xA;134 |                 .call(|contract| contract.approve(test_acc_id,  10_000));&#xD;&#xA;    |                  ^^^^ method cannot be called on `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;` due to unsatisfied trait bounds&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/angie/Documents/CherryBooooooom/InteractWithErc20/erc20/lib.rs:13:5&#xD;&#xA;    |&#xD;&#xA;13  |     /// A simple ERC-20 contract.&#xD;&#xA;    |     -----------------------------&#xD;&#xA;    |     |&#xD;&#xA;    |     doesn't satisfy `_: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;    |     doesn't satisfy `_: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;    |&#xD;&#xA;    = note: the following trait bounds were not satisfied:&#xD;&#xA;            `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;            `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder` is not satisfied&#xD;&#xA;   --&gt; lib.rs:142:44&#xD;&#xA;    |&#xD;&#xA;142 |             let transfer = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                            ^^^^^^^^ the trait `ink::codegen::trait_def::call_builder::TraitCallBuilder` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:10&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |          ^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not satisfied&#xD;&#xA;   --&gt; lib.rs:142:44&#xD;&#xA;    |&#xD;&#xA;142 |             let transfer = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                            ^^^^^^^^ the trait `ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:29&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; lib.rs:142:54&#xD;&#xA;    |&#xD;&#xA;142 |             let transfer = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                            ------------------------- ^^^^^^^^^^^^^^^^^^^^ expected struct `ink_primitives::types::AccountId`, found struct `ink::ink_primitives::AccountId`&#xD;&#xA;    |                            |&#xD;&#xA;    |                            arguments to this function are incorrect&#xD;&#xA;    |&#xD;&#xA;    = note: perhaps two different versions of crate `ink_primitives` are being used?&#xD;&#xA;note: function defined here&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:89:8&#xD;&#xA;    |&#xD;&#xA;89  | pub fn build_message&lt;Ref&gt;(&#xD;&#xA;    |        ^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0599]: the method `call` exists for struct `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;`, but its trait bounds were not satisfied&#xD;&#xA;   --&gt; lib.rs:143:18&#xD;&#xA;    |&#xD;&#xA;143 |                 .call(|contract| contract.transfer(ink_e2e::bob(),  2_000));&#xD;&#xA;    |                  ^^^^ method cannot be called on `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;` due to unsatisfied trait bounds&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/angie/Documents/CherryBooooooom/InteractWithErc20/erc20/lib.rs:13:5&#xD;&#xA;    |&#xD;&#xA;13  |     /// A simple ERC-20 contract.&#xD;&#xA;    |     -----------------------------&#xD;&#xA;    |     |&#xD;&#xA;    |     doesn't satisfy `_: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;    |     doesn't satisfy `_: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;    |&#xD;&#xA;    = note: the following trait bounds were not satisfied:&#xD;&#xA;            `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;            `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder` is not satisfied&#xD;&#xA;   --&gt; lib.rs:150:46&#xD;&#xA;    |&#xD;&#xA;150 |             let balance_of = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                              ^^^^^^^^ the trait `ink::codegen::trait_def::call_builder::TraitCallBuilder` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:10&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |          ^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not satisfied&#xD;&#xA;   --&gt; lib.rs:150:46&#xD;&#xA;    |&#xD;&#xA;150 |             let balance_of = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                                              ^^^^^^^^ the trait `ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;` is not implemented for `Erc20Ref`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `build_message`&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:93:29&#xD;&#xA;    |&#xD;&#xA;93  |     Ref: TraitCallBuilder + FromAccountId&lt;ink_env::DefaultEnvironment&gt;,&#xD;&#xA;    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `build_message`&#xD;&#xA;&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; lib.rs:150:56&#xD;&#xA;    |&#xD;&#xA;150 |             let balance_of = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;    |                              ------------------------- ^^^^^^^^^^^^^^^^^^^^ expected struct `ink_primitives::types::AccountId`, found struct `ink::ink_primitives::AccountId`&#xD;&#xA;    |                              |&#xD;&#xA;    |                              arguments to this function are incorrect&#xD;&#xA;    |&#xD;&#xA;    = note: perhaps two different versions of crate `ink_primitives` are being used?&#xD;&#xA;note: function defined here&#xD;&#xA;   --&gt; /Users/angie/.cargo/git/checkouts/ink-1add513eda8f5a89/fc543da/crates/e2e/src/builders.rs:89:8&#xD;&#xA;    |&#xD;&#xA;89  | pub fn build_message&lt;Ref&gt;(&#xD;&#xA;    |        ^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0599]: the method `call` exists for struct `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;`, but its trait bounds were not satisfied&#xD;&#xA;   --&gt; lib.rs:151:14&#xD;&#xA;    |&#xD;&#xA;151 |             .call(|contract| contract.balance_of(ink_e2e::bob()));&#xD;&#xA;    |              ^^^^ method cannot be called on `MessageBuilder&lt;ink_env::types::DefaultEnvironment, Erc20Ref&gt;` due to unsatisfied trait bounds&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/angie/Documents/CherryBooooooom/InteractWithErc20/erc20/lib.rs:13:5&#xD;&#xA;    |&#xD;&#xA;13  |     /// A simple ERC-20 contract.&#xD;&#xA;    |     -----------------------------&#xD;&#xA;    |     |&#xD;&#xA;    |     doesn't satisfy `_: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;    |     doesn't satisfy `_: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;    |&#xD;&#xA;    = note: the following trait bounds were not satisfied:&#xD;&#xA;            `Erc20Ref: ink::codegen::trait_def::call_builder::TraitCallBuilder`&#xD;&#xA;            `Erc20Ref: ink_env::call::create_builder::FromAccountId&lt;ink_env::types::DefaultEnvironment&gt;`&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0277, E0308, E0599.&#xD;&#xA;For more information about an error, try `rustc --explain E0277`.&#xD;&#xA;error: could not compile `testerc` due to 15 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could anyone help? Thanks!&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/CherryBooooooom/InteractWithErc20&#xD;&#xA;  [2]: https://github.com/paritytech/ink/tree/master/examples/delegator&#xD;&#xA;  [3]: https://i.stack.imgur.com/1vZpg.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/FTHik.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="25093" PostHistoryTypeId="4" PostId="6530" RevisionGUID="134c0397-caa7-4248-878f-a11869a2b7b5" CreationDate="2023-01-01T21:35:10.183" UserId="83" Comment="typo" Text="Cross contract testing by ink! e2e" ContentLicense="CC BY-SA 4.0" />
  <row Id="25094" PostHistoryTypeId="2" PostId="6542" RevisionGUID="d0506c7e-025e-4557-8f47-646ff695ed29" CreationDate="2023-01-02T08:07:42.000" UserId="354" Text="I have made the rococo relay chain and parachain network successfully following this [tutorial][1], and was also able to generate the network with custom keys on relay chain and parachain with `rococo-local` spec file. But the problem arises when I make a network with `rococo-staging` everything works fine but the blocks on parachain are not generating, I got the error **`Collation wasn't advertised to any validator`** and after sometime the error changes to **`State Database error: Too many sibling blocks inserted`**.&#xD;&#xA;&#xD;&#xA;What I have done is:&#xD;&#xA;&#xD;&#xA; - Created `chainSpec` for relay chain with 3 validators using `rococo-staging` and added my accounts in it.&#xD;&#xA; - Created `chainSpecRaw` and started the relay chain.&#xD;&#xA; - After successfully starting relay chain, I made the `chainSpec` for parachain with one collator and added my accounts.&#xD;&#xA; - Then I made the `chainSpecRaw` of parachain and started it with `collation:yes`.&#xD;&#xA; - After running both relay chain and parachain, I registered a paraId on relay chain.&#xD;&#xA; - Then added the `wasm runtime` and `genesis state` of parachain on relay chain.&#xD;&#xA; - After this I was able to see the parachain registered on relay chain.&#xD;&#xA; - After completing these steps I faced the above mentioned errors.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/prepare-a-local-relay-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25096" PostHistoryTypeId="1" PostId="6542" RevisionGUID="d0506c7e-025e-4557-8f47-646ff695ed29" CreationDate="2023-01-02T08:07:42.000" UserId="354" Text="In custom Rococo staging network parachain is not producing blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="25097" PostHistoryTypeId="3" PostId="6542" RevisionGUID="d0506c7e-025e-4557-8f47-646ff695ed29" CreationDate="2023-01-02T08:07:42.000" UserId="354" Text="|polkadot|parachain|relay-chain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25098" PostHistoryTypeId="2" PostId="6543" RevisionGUID="952fbf0f-9bbb-46cc-bdcc-5c763a4b3def" CreationDate="2023-01-02T08:34:28.820" UserId="3317" Text="**Wasmi** is a WASM Interpreter used by the pallet-contracts. Like every pallet also pallet-contracts is compiled to WASM itself as part of the WASM runtime. The WASM runtime is executed through the more powerful **Wasmtime** WASM engine ([ref][1]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1641/wasm-interpreter-in-pallet-contracts/1649#1649" ContentLicense="CC BY-SA 4.0" />
  <row Id="25105" PostHistoryTypeId="5" PostId="6542" RevisionGUID="939df2f3-4f8d-4670-a8eb-8249d58ea754" CreationDate="2023-01-02T10:04:46.600" UserId="354" Comment="added 44 characters in body; edited title" Text="I have made the rococo relay chain and parachain network successfully following this [tutorial][1], and was also able to generate the network with custom keys on relay chain and parachain with `rococo-local` spec file. But the problem arises when I make a network with `rococo-staging` and `westend-staging` everything works fine but the blocks on parachain are not generating, I got the error **`Collation wasn't advertised to any validator`** and after sometime the error changes to **`State Database error: Too many sibling blocks inserted`**.&#xD;&#xA;&#xD;&#xA;What I have done is:&#xD;&#xA;&#xD;&#xA; - Created `chainSpec` for relay chain with 3 validators using `rococo-staging` and `westend-staging` and added my accounts in it.&#xD;&#xA; - Created `chainSpecRaw` and started the relay chain.&#xD;&#xA; - After successfully starting relay chain, I made the `chainSpec` for parachain with one collator and added my accounts.&#xD;&#xA; - Then I made the `chainSpecRaw` of parachain and started it with `collation:yes`.&#xD;&#xA; - After running both relay chain and parachain, I registered a paraId on relay chain.&#xD;&#xA; - Then added the `wasm runtime` and `genesis state` of parachain on relay chain.&#xD;&#xA; - After this I was able to see the parachain registered on relay chain.&#xD;&#xA; - After completing these steps I faced the above mentioned errors.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/prepare-a-local-relay-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25106" PostHistoryTypeId="4" PostId="6542" RevisionGUID="939df2f3-4f8d-4670-a8eb-8249d58ea754" CreationDate="2023-01-02T10:04:46.600" UserId="354" Comment="added 44 characters in body; edited title" Text="In custom Rococo staging and Westend staging network parachain is not producing blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="25109" PostHistoryTypeId="2" PostId="6545" RevisionGUID="e3ea4000-dd23-4479-adad-d907c2f49688" CreationDate="2023-01-02T15:07:35.077" UserId="1732" Text="We are getting the error message below on Astar's custom relay chain, forked from Rococo, runtime is `rococo/9310`.&#xD;&#xA;&#xD;&#xA;    Could not canonicalize elem at pos 1549631 using key [12, 109, 109, 114, 63, 165, 23, 0, 0, 0, 0, 0, 247, 105, 100, 142, 39, 51, 33, 71, 48, 77, 110, 205, 182, 188, 94, 219, 238, 166, 214, 115, 171, 201, 235, 230, 151, 64, 223, 58, 141, 185, 115, 10]&#xD;&#xA;&#xD;&#xA;The error happens at every block imported, on both archive and full nodes.&#xD;&#xA;Enabling off-chain indexing didn't solve the problem, neither upgrading client.&#xD;&#xA;&#xD;&#xA;It doesn't prevent the nodes from running fine. Would anyone have an idea?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25111" PostHistoryTypeId="1" PostId="6545" RevisionGUID="e3ea4000-dd23-4479-adad-d907c2f49688" CreationDate="2023-01-02T15:07:35.077" UserId="1732" Text="Getting canonicalize elem error on Rococo fork" ContentLicense="CC BY-SA 4.0" />
  <row Id="25112" PostHistoryTypeId="3" PostId="6545" RevisionGUID="e3ea4000-dd23-4479-adad-d907c2f49688" CreationDate="2023-01-02T15:07:35.077" UserId="1732" Text="|polkadot|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25113" PostHistoryTypeId="6" PostId="6545" RevisionGUID="1777dd9e-d547-4cb3-bac7-07769b5d4d23" CreationDate="2023-01-02T15:11:17.290" UserId="34" Comment="edited tags" Text="|rococo|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25114" PostHistoryTypeId="2" PostId="6546" RevisionGUID="99285e4e-a117-4da0-9c0e-263738b41eb1" CreationDate="2023-01-02T15:23:31.203" UserId="3468" Text="I want to create pallet account and store assets in using pallet assets but i have problem in withdraw because you cant withdraw from pallet assets unless you have origin for account you want transfer from and no origin for pallet account" ContentLicense="CC BY-SA 4.0" />
  <row Id="25116" PostHistoryTypeId="1" PostId="6546" RevisionGUID="99285e4e-a117-4da0-9c0e-263738b41eb1" CreationDate="2023-01-02T15:23:31.203" UserId="3468" Text="Transfer from asset pallets with generated pallet account" ContentLicense="CC BY-SA 4.0" />
  <row Id="25117" PostHistoryTypeId="3" PostId="6546" RevisionGUID="99285e4e-a117-4da0-9c0e-263738b41eb1" CreationDate="2023-01-02T15:23:31.203" UserId="3468" Text="|assets|transfer|origin|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25118" PostHistoryTypeId="5" PostId="6546" RevisionGUID="62fa2b60-661e-4edd-bfe1-73152ed568f2" CreationDate="2023-01-02T16:10:12.557" UserId="3468" Comment="added 75 characters in body" Text="I want to create a pallet account and then store assets using pallet assets in it, but I have a problem withdrawing assets from the pallet account because you can't transfer from pallet assets unless there is an origin call for the account you want to transfer from, and there is no origin for the pallet account." ContentLicense="CC BY-SA 4.0" />
  <row Id="25119" PostHistoryTypeId="2" PostId="6547" RevisionGUID="7f580271-c5b4-4fc9-9f2d-6e8cd09f637c" CreationDate="2023-01-02T18:38:22.223" UserId="29" Text="How did you create this &quot;pallet account&quot;?&#xD;&#xA;&#xD;&#xA;Take a look at how the Treasury pallet creates its account:&#xD;&#xA;```rust&#xD;&#xA;fn build(&amp;self) {&#xD;&#xA;	// Create Treasury account&#xD;&#xA;	let account_id = &lt;Pallet&lt;T, I&gt;&gt;::account_id();&#xD;&#xA;	let min = T::Currency::minimum_balance();&#xD;&#xA;	if T::Currency::free_balance(&amp;account_id) &lt; min {&#xD;&#xA;		let _ = T::Currency::make_free_balance_be(&amp;account_id, min);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/cbd8f1b56fd8ab9af0d9317432cc735264c89d70/frame/treasury/src/lib.rs#L261-L271&#xD;&#xA;&#xD;&#xA;Specifically, the `account_id()` function:&#xD;&#xA;```rust&#xD;&#xA;/// The account ID of the treasury pot.&#xD;&#xA;pub fn account_id() -&gt; T::AccountId {&#xD;&#xA;	T::PalletId::get().into_account_truncating()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/cbd8f1b56fd8ab9af0d9317432cc735264c89d70/frame/treasury/src/lib.rs#L509-L515&#xD;&#xA;&#xD;&#xA;If you follow the trail all the way, you will find the actual function that creates the account:&#xD;&#xA;```rust&#xD;&#xA;fn into_sub_account_truncating&lt;S: Encode&gt;(&amp;self, sub: S) -&gt; T {&#xD;&#xA;	(Id::TYPE_ID, self, sub)&#xD;&#xA;		.using_encoded(|b| T::decode(&amp;mut TrailingZeroInput(b)))&#xD;&#xA;		.expect(&quot;All byte sequences are valid `AccountIds`; qed&quot;)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/cbd8f1b56fd8ab9af0d9317432cc735264c89d70/primitives/runtime/src/traits.rs#L1553&#xD;&#xA;&#xD;&#xA;At the end of the day, this account can be used just like any other account in Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="25121" PostHistoryTypeId="50" PostId="4798" RevisionGUID="2fa6671b-82aa-424c-9ad5-0e2f547a6548" CreationDate="2023-01-02T21:00:20.047" UserId="-1" />
  <row Id="25122" PostHistoryTypeId="2" PostId="6548" RevisionGUID="fb7bc5f0-0e49-41e6-8fce-e6bed0210a10" CreationDate="2023-01-02T21:56:18.020" UserId="372" Text="I've read the rustdocs about `ChainSpecExtension`s. For example https://paritytech.github.io/substrate/master/sc_service/trait.ChainSpecExtension.html and also several related pages that you can find by clicking the links from that one.&#xD;&#xA;&#xD;&#xA;So far I've managed to get a simple extension properly included in my chain spec. I've defined my extension like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Clone, Debug, Deserialize, Serialize, sc_chain_spec::ChainSpecExtension)]&#xD;&#xA;/// A chain spec extension for a chain that starts with no real consensus rules (manual seal) but later adds a PoW requirement.&#xD;&#xA;pub struct EventualPowExtension {&#xD;&#xA;	/// The block at which we start enforcing a PoW is present&#xD;&#xA;	pow_start: u64,&#xD;&#xA;	/// the difficulty threshold of the PoW. Only relevant after block pow_start.&#xD;&#xA;	difficulty: u64,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This code compiles, I can see the new fields included in my chain spec json when I save it using `node-template build-spec --chain local &gt; my-example-spec.json`, and I can even extract the typed data to pass to my consensus layer using code like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use core::any::{Any, TypeId};&#xD;&#xA;use crate::chain_spec::MyExtension;&#xD;&#xA;&#xD;&#xA;let type_id = TypeId::of::&lt;MyExtension&gt;();&#xD;&#xA;let extracted_spec = config&#xD;&#xA;	.chain_spec.extensions()&#xD;&#xA;	.get_any(type_id)&#xD;&#xA;	.downcast_ref::&lt;MyExtension&gt;()&#xD;&#xA;	.expect(&quot;Should be my extension type&quot;);&#xD;&#xA;&#xD;&#xA;println!(&quot;Extracted Spec is: {:?}&quot;, extracted_spec);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now my next goal, and where I am stuck is to use the forks feature. I see that the `ChainSpecExtension` trait has a [`forks` method](https://paritytech.github.io/substrate/master/sc_service/trait.ChainSpecExtension.html#method.forks). I would like to use this feature to allow adjusting the PoW difficulty as the chain progresses. (I know this represents a hard fork. I know this could be done forklessly using a runtime api. This is for learning purposes only.)&#xD;&#xA;&#xD;&#xA;In such a scenario, I would like to have a `BTreeMap&lt;BlockNumber, Option&lt;Difficulty&gt;&gt;` Where `None` represents no real consensus (aka manual seal) and `Some(difficulty)` represents a PoW threshold. This allows adjusting the PoW threshold via hard fork as the chain evolves.&#xD;&#xA;&#xD;&#xA;What I can't figure out is how to actually get my chain spec extension to use this Forks feature. Is there any example of this? Or could anyone point me in the right direction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25124" PostHistoryTypeId="1" PostId="6548" RevisionGUID="fb7bc5f0-0e49-41e6-8fce-e6bed0210a10" CreationDate="2023-01-02T21:56:18.020" UserId="372" Text="How do I use the Forks feature of the `ChainSpecExtension`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25125" PostHistoryTypeId="3" PostId="6548" RevisionGUID="fb7bc5f0-0e49-41e6-8fce-e6bed0210a10" CreationDate="2023-01-02T21:56:18.020" UserId="372" Text="|chainspec|fork|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25126" PostHistoryTypeId="52" PostId="6546" RevisionGUID="53b416cc-f578-4c4c-a9b6-a1c9b2963152" CreationDate="2023-01-02T23:28:53.560" />
  <row Id="25127" PostHistoryTypeId="2" PostId="6549" RevisionGUID="9f4d77bd-ec33-4a79-981c-c07d892ebb3b" CreationDate="2023-01-03T01:14:12.143" UserId="2311" Text="If a parathread is part of an auction but is not yet a parachain, would it be possible to update its genesis-state and genesis-wasm by deregistering it and re-registering with the updated files? This is for Kusama as we have realized our current runtime code will not produce blocks on Kusama without an upgrade to the genesis-state wasm." ContentLicense="CC BY-SA 4.0" />
  <row Id="25129" PostHistoryTypeId="1" PostId="6549" RevisionGUID="9f4d77bd-ec33-4a79-981c-c07d892ebb3b" CreationDate="2023-01-03T01:14:12.143" UserId="2311" Text="Update parathread WASMs during auction" ContentLicense="CC BY-SA 4.0" />
  <row Id="25130" PostHistoryTypeId="3" PostId="6549" RevisionGUID="9f4d77bd-ec33-4a79-981c-c07d892ebb3b" CreationDate="2023-01-03T01:14:12.143" UserId="2311" Text="|kusama|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25131" PostHistoryTypeId="2" PostId="6550" RevisionGUID="d4965f41-66b2-4a76-a019-669cdb1aa52e" CreationDate="2023-01-03T06:43:11.117" UserId="1950" Text="I am using the substraste node template binary in 2 ubuntu servers and their IPs are&#xD;&#xA;&#xD;&#xA;10.100.20.1 and 10.100.20.2&#xD;&#xA;Host names are `telsher001` and `telsher002`&#xD;&#xA;&#xD;&#xA;Im following this tutorial https://docs.substrate.io/tutorials/get-started/simulate-network/ to simulate a network&#xD;&#xA;&#xD;&#xA;I am using  the exact run commands as follows in 2 machines &#xD;&#xA;&#xD;&#xA;On 1st VM machine 10.100.20.1 I'm running the genesis node as follows&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./substrate-node-template --base-path /tmp/alice --chain local --alice --port 30333 --ws-port 9944 --rpc-port 9933 --node-key 0000000000000000000000000000000000000000000000000000000000000001 --rpc-methods Unsafe --validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On the 2nd VM machine 10.100.20.2 &#xD;&#xA;Im using the following command to run the project&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./substrate-node-template&#xD;&#xA;--base-path /tmp/bob --chain local --bob --port 30333 --ws-port 9944 --rpc-port 9933 --validator --bootnodes /ip4/10.100.20.2/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In both terminals, there are no errors, but Peer discovery is not happening &#xD;&#xA;Im looking for a way to get the peer discovery working &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Even I checked firewall settings on both VMs which look like this. Please note that these virtual machines does not have access to outside internet &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Status: active&#xD;&#xA;&#xD;&#xA;To                         Action      From&#xD;&#xA;--                         ------      ----&#xD;&#xA;30333                      ALLOW       Anywhere&#xD;&#xA;9933                       ALLOW       Anywhere&#xD;&#xA;9944                       ALLOW       Anywhere&#xD;&#xA;22                         ALLOW       Anywhere&#xD;&#xA;80                         ALLOW       Anywhere&#xD;&#xA;443                        ALLOW       Anywhere&#xD;&#xA;22/tcp                     ALLOW       Anywhere&#xD;&#xA;30333 (v6)                 ALLOW       Anywhere (v6)&#xD;&#xA;9933 (v6)                  ALLOW       Anywhere (v6)&#xD;&#xA;9944 (v6)                  ALLOW       Anywhere (v6)&#xD;&#xA;22 (v6)                    ALLOW       Anywhere (v6)&#xD;&#xA;80 (v6)                    ALLOW       Anywhere (v6)&#xD;&#xA;443 (v6)                   ALLOW       Anywhere (v6)&#xD;&#xA;22/tcp (v6)                ALLOW       Anywhere (v6)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am looking a solution for this &#xD;&#xA;Thanks " ContentLicense="CC BY-SA 4.0" />
  <row Id="25133" PostHistoryTypeId="1" PostId="6550" RevisionGUID="d4965f41-66b2-4a76-a019-669cdb1aa52e" CreationDate="2023-01-03T06:43:11.117" UserId="1950" Text="Unable to discover peer when after deploying the substrate node template" ContentLicense="CC BY-SA 4.0" />
  <row Id="25134" PostHistoryTypeId="3" PostId="6550" RevisionGUID="d4965f41-66b2-4a76-a019-669cdb1aa52e" CreationDate="2023-01-03T06:43:11.117" UserId="1950" Text="|substrate-node-template|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25140" PostHistoryTypeId="2" PostId="6552" RevisionGUID="9b96115e-34ee-4477-8b65-c4e11ec1f6db" CreationDate="2023-01-03T07:36:58.480" UserId="251" Text="The genesis might be different.&#xD;&#xA;&#xD;&#xA;Try to build the spec file and use it as the chain.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./node build-spec --raw --chain local &gt; local.json&#xD;&#xA;# Copy the local.json to the VMs&#xD;&#xA;./node --chain local.json&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="25142" PostHistoryTypeId="2" PostId="6553" RevisionGUID="96793e68-5369-45be-b9d5-db11da2e736e" CreationDate="2023-01-03T09:06:26.443" UserId="1732" Text="Closing the topic as it is an issue, issue opened here: https://github.com/paritytech/substrate/issues/13048" ContentLicense="CC BY-SA 4.0" />
  <row Id="25145" PostHistoryTypeId="6" PostId="6549" RevisionGUID="4411827c-0337-47e2-9af0-f852096d43a9" CreationDate="2023-01-03T09:39:13.487" UserId="165" Comment="edited tags" Text="|kusama|genesis|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25146" PostHistoryTypeId="2" PostId="6554" RevisionGUID="30c5a434-da61-4e3f-a6d2-d0b04c21d9bf" CreationDate="2023-01-03T09:52:43.690" UserId="165" Text="You will be able to deregister a parathread **as long as there is not a crowdloan open for this paraId.**&#xD;&#xA;When a crowdloan is created a lock is applied to this para. Please check: https://github.com/paritytech/polkadot/blob/6a5d31fcbdd3ac5dd880e0bf3616e303b5bb480f/runtime/common/src/crowdloan/mod.rs#L377&#xD;&#xA;```rust&#xD;&#xA;// Add a lock to the para so that the configuration cannot be changed.&#xD;&#xA;T::Registrar::apply_lock(index);&#xD;&#xA;```&#xD;&#xA;You can think of this lock as some sort of &quot;contract&quot; with your backers so a para team won't modify the code and state submitted and therefore being supported by the community.&#xD;&#xA;&#xD;&#xA;In case **no crowdloan is open**, then you shouldn't find any blocker to deregister your parathread. Notice that if your idea is deregistering your parathread and then registering again for bidding in the same auction, take into account deregistering and registering times to make your calculations and assess if you are still in the time window of the auction you want to participate in." ContentLicense="CC BY-SA 4.0" />
  <row Id="25152" PostHistoryTypeId="5" PostId="397" RevisionGUID="30d4f937-4ce7-4e61-8b6b-c59eaa75b2f8" CreationDate="2023-01-03T11:50:23.243" UserId="45" Comment="added 39 characters in body" Text="Parachains can be seen as a function `h' = f(h)`, where:&#xD;&#xA;&#xD;&#xA;- **f** is the wasm blob referred to as PVF (parachain validation function).&#xD;&#xA;- **h** is the current head data. &#xD;&#xA;- **h'** is the new head data.&#xD;&#xA;&#xD;&#xA;&quot;Head data&quot; is just a small byte buffer. It is stored on the relay chain for each parachain. Cumulus uses head data to store a Substrate block header.&#xD;&#xA;&#xD;&#xA;Upon the registration of a parachain, h&lt;sub&gt;0&lt;/sub&gt; needs to be provided. This is a very first head data and in case of Cumulus that will be the block header of the genesis block, the block 0.&#xD;&#xA;&#xD;&#xA;In cumulus one can obtain head data using the `export-genesis-state` subcommand of cumulus-based collator. Similarly, genesis wasm can be obtain using `export-genesis-wasm`.&#xD;&#xA;&#xD;&#xA;More information can be found in [this tutorial](https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="25153" PostHistoryTypeId="2" PostId="6556" RevisionGUID="4f547858-c369-41b8-9644-fa1fd0e592ea" CreationDate="2023-01-03T12:00:06.230" UserId="3171" Text="I have a function &#xD;&#xA;&#xD;&#xA;    //for testing purposes only!&#xD;&#xA;    pub fn some_fn(n: T::BlockNumber) {&#xD;&#xA;    	SomeStorage::&lt;T&gt;::set(n);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;for testing purposes only!&#xD;&#xA;&#xD;&#xA;How to check is it a mock runtime? &#xD;&#xA;&#xD;&#xA;something like that&#xD;&#xA;&#xD;&#xA;    let is_mock = frame_system::is_mock_runtime!&#xD;&#xA;&#xD;&#xA;But frame_system::is_mock_runtime macros does not exist.&#xD;&#xA;&#xD;&#xA;Please give me advise how to check is it a mock runtime or not.&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;Happy New Year!" ContentLicense="CC BY-SA 4.0" />
  <row Id="25155" PostHistoryTypeId="1" PostId="6556" RevisionGUID="4f547858-c369-41b8-9644-fa1fd0e592ea" CreationDate="2023-01-03T12:00:06.230" UserId="3171" Text="How to check is it mock runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25156" PostHistoryTypeId="3" PostId="6556" RevisionGUID="4f547858-c369-41b8-9644-fa1fd0e592ea" CreationDate="2023-01-03T12:00:06.230" UserId="3171" Text="|pallet|substrate-node-template|runtime|mock|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25157" PostHistoryTypeId="2" PostId="6557" RevisionGUID="d39d5e78-fe01-4b48-b100-0d2437e5182f" CreationDate="2023-01-03T12:08:46.143" UserId="165" Text="`Import failed: Unexpected epoch change` That looks like your relay is using BABE and hasn't produced a block for longer than an epoch. Which makes me curious about what version/release of polkadot your relay nodes are running. As I can see this [PR #11727](https://github.com/paritytech/substrate/pull/11727) allows skipping over empty epochs (Hopefully I have understood correctly that PR).&#xD;&#xA;&#xD;&#xA;When hitting this state there is not much actions you can take, and as you mention usually the outcome is dropping the relay db.&#xD;&#xA;&#xD;&#xA;What you are not 100% right about is the parachain part. Keep in mind that the parachain maintains a totally separated db than the one from the relay. Though, in the state of your relay there are some storage values that point to a parachain in one way or another.&#xD;&#xA;&#xD;&#xA;With this what I want to say is that you should not be necessary to drop your para db in this scenario. It should be enough to spin up a new relay, run the collators with the correct parameters in case some have changed and do the registration with the proper information on the relaychain. And this is more or less the key point of not needing to drop your para db.&#xD;&#xA;&#xD;&#xA;What you want to register is the state at the last head of your parachain as the &quot;inital state&quot; that you are asked for by the registrar pallet in the relay, and for the code, use the wasm running on the para at that moment.&#xD;&#xA;&#xD;&#xA;If obtaining this &quot;initial state&quot; from a parachain that has been running for some time is not clear to you, one of the ways one can do this is by using the `export-state` subcommand that the binary provides.&#xD;&#xA;&#xD;&#xA;And just to reiterate, the parachain and the relaychain keep totally separate dbs, so even in the case of one of these two getting corrupted, that doesn't affect nothing else than that db." ContentLicense="CC BY-SA 4.0" />
  <row Id="25159" PostHistoryTypeId="2" PostId="6558" RevisionGUID="ce10b8ba-798d-4d4d-8c3a-22b5285f0d96" CreationDate="2023-01-03T12:25:24.383" UserId="3667" Text="```rust&#xD;&#xA;/// The amount of funds that must be reserved for a non-provider asset account to be maintained.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type AssetAccountDeposit: Get&lt;DepositBalanceOf&lt;Self, I&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;I do not understand what this type does. I initially thought it was the amount an account should be able to reserve if it was eligible to receive an asset, but after some experiments it didn't turn out to be the case. What does this parameter do? " ContentLicense="CC BY-SA 4.0" />
  <row Id="25161" PostHistoryTypeId="1" PostId="6558" RevisionGUID="ce10b8ba-798d-4d4d-8c3a-22b5285f0d96" CreationDate="2023-01-03T12:25:24.383" UserId="3667" Text="What is AssetAccountDeposit in pallet assets config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25162" PostHistoryTypeId="3" PostId="6558" RevisionGUID="ce10b8ba-798d-4d4d-8c3a-22b5285f0d96" CreationDate="2023-01-03T12:25:24.383" UserId="3667" Text="|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25163" PostHistoryTypeId="2" PostId="6559" RevisionGUID="2ed38ea3-9360-4bc1-959d-2907a5fa1139" CreationDate="2023-01-03T13:02:49.413" UserId="94" Text="Were does this function live? Is it inside a pallet?  &#xD;&#xA;&#xD;&#xA;In any case you can use Rust features to make it available only for testing like this:  &#xD;&#xA;```rust&#xD;&#xA;// Std is never enabled in the Runtime.&#xD;&#xA;// This function can only be called from testing but not from the pallet itself:&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;pub fn some_fn(n: T::BlockNumber) {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Or you can restrict it to testing, which only works from the same crate since the&#xD;&#xA;// 'test' feature does not propagate to dependencies:&#xD;&#xA;#[cfg(test)]&#xD;&#xA;pub fn some_fn(n: T::BlockNumber) {&#xD;&#xA;    SomeStorage::&lt;T&gt;::set(n);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This is being done in the the Generalized Message Queue pallet to shield its [debug_info()](https://github.com/paritytech/substrate/blob/b3d9f3c57e7f799d49442e3456614431f2d0e51a/frame/message-queue/src/lib.rs#L1083) function from accidental production use." ContentLicense="CC BY-SA 4.0" />
  <row Id="25165" PostHistoryTypeId="2" PostId="6560" RevisionGUID="5e328ab1-5d23-4107-8128-271c34faa698" CreationDate="2023-01-03T14:52:06.170" UserId="29" Text="As noted in [this PR](https://github.com/paritytech/substrate/pull/10382),&#xD;&#xA;&#xD;&#xA;&gt; Asset accounts (i.e. the storage of a specific account's balance of a&#xD;&#xA;&gt; specific asset) can now have three reasons for existing: the old two&#xD;&#xA;&gt; (i.e. the asset being &quot;sufficient&quot; or taking up a consumer reference)&#xD;&#xA;&gt; **as well as having a deposit explicitly held for the asset-account**.&#xD;&#xA;&gt; This deposit is placed by using the new touch function and refunded by&#xD;&#xA;&gt; using the new refund function.&#xD;&#xA;&#xD;&#xA;You can see that in the `do_touch()` function `AssetAccountDeposit` is used:&#xD;&#xA;```rust&#xD;&#xA;/// Creates a account for `who` to hold asset `id` with a zero balance and takes a deposit.&#xD;&#xA;pub(super) fn do_touch(id: T::AssetId, who: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;	ensure!(!Account::&lt;T, I&gt;::contains_key(id, &amp;who), Error::&lt;T, I&gt;::AlreadyExists);&#xD;&#xA;	let deposit = T::AssetAccountDeposit::get();&#xD;&#xA;	let mut details = Asset::&lt;T, I&gt;::get(&amp;id).ok_or(Error::&lt;T, I&gt;::Unknown)?;&#xD;&#xA;	ensure!(details.status == AssetStatus::Live, Error::&lt;T, I&gt;::AssetNotLive);&#xD;&#xA;	let reason = Self::new_account(&amp;who, &amp;mut details, Some(deposit))?;&#xD;&#xA;	T::Currency::reserve(&amp;who, deposit)?;&#xD;&#xA;	Asset::&lt;T, I&gt;::insert(&amp;id, details);&#xD;&#xA;	Account::&lt;T, I&gt;::insert(&#xD;&#xA;		id,&#xD;&#xA;		&amp;who,&#xD;&#xA;		AssetAccountOf::&lt;T, I&gt; {&#xD;&#xA;			balance: Zero::zero(),&#xD;&#xA;			is_frozen: false,&#xD;&#xA;			reason,&#xD;&#xA;			extra: T::Extra::default(),&#xD;&#xA;		},&#xD;&#xA;	);&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/cbd8f1b56fd8ab9af0d9317432cc735264c89d70/frame/assets/src/functions.rs#L298-L318&#xD;&#xA;&#xD;&#xA;If you want to learn more about `providers`, `consumers`, and `sufficients`, there is a great doc here:&#xD;&#xA;- https://docs.substrate.io/reference/account-data-structures/#accountinfo" ContentLicense="CC BY-SA 4.0" />
  <row Id="25167" PostHistoryTypeId="5" PostId="6560" RevisionGUID="b80b7db2-c697-41f2-a0b9-f31daafb5b45" CreationDate="2023-01-03T15:29:30.303" UserId="29" Comment="added 780 characters in body" Text="As noted in [this PR](https://github.com/paritytech/substrate/pull/10382),&#xD;&#xA;&#xD;&#xA;&gt; Asset accounts (i.e. the storage of a specific account's balance of a&#xD;&#xA;&gt; specific asset) can now have three reasons for existing: the old two&#xD;&#xA;&gt; (i.e. the asset being &quot;sufficient&quot; or taking up a consumer reference)&#xD;&#xA;&gt; **as well as having a deposit explicitly held for the asset-account**.&#xD;&#xA;&gt; This deposit is placed by using the new touch function and refunded by&#xD;&#xA;&gt; using the new refund function.&#xD;&#xA;&#xD;&#xA;Notice the `touch()` function inside the assets pallet:&#xD;&#xA;```rust&#xD;&#xA;/// Create an asset account for non-provider assets.&#xD;&#xA;///&#xD;&#xA;/// A deposit will be taken from the signer account.&#xD;&#xA;///&#xD;&#xA;/// - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit&#xD;&#xA;///   to be taken.&#xD;&#xA;/// - `id`: The identifier of the asset for the account to be created.&#xD;&#xA;///&#xD;&#xA;/// Emits `Touched` event when successful.&#xD;&#xA;#[pallet::call_index(26)]&#xD;&#xA;#[pallet::weight(T::WeightInfo::mint())]&#xD;&#xA;pub fn touch(origin: OriginFor&lt;T&gt;, id: T::AssetIdParameter) -&gt; DispatchResult {&#xD;&#xA;    let id: T::AssetId = id.into();&#xD;&#xA;    Self::do_touch(id, ensure_signed(origin)?)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/cbd8f1b56fd8ab9af0d9317432cc735264c89d70/frame/assets/src/lib.rs#L1481-L1495&#xD;&#xA;&#xD;&#xA;And inside the `do_touch()` function, `AssetAccountDeposit` is used:&#xD;&#xA;```rust&#xD;&#xA;/// Creates a account for `who` to hold asset `id` with a zero balance and takes a deposit.&#xD;&#xA;pub(super) fn do_touch(id: T::AssetId, who: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;	ensure!(!Account::&lt;T, I&gt;::contains_key(id, &amp;who), Error::&lt;T, I&gt;::AlreadyExists);&#xD;&#xA;	let deposit = T::AssetAccountDeposit::get();&#xD;&#xA;	let mut details = Asset::&lt;T, I&gt;::get(&amp;id).ok_or(Error::&lt;T, I&gt;::Unknown)?;&#xD;&#xA;	ensure!(details.status == AssetStatus::Live, Error::&lt;T, I&gt;::AssetNotLive);&#xD;&#xA;	let reason = Self::new_account(&amp;who, &amp;mut details, Some(deposit))?;&#xD;&#xA;	T::Currency::reserve(&amp;who, deposit)?;&#xD;&#xA;	Asset::&lt;T, I&gt;::insert(&amp;id, details);&#xD;&#xA;	Account::&lt;T, I&gt;::insert(&#xD;&#xA;		id,&#xD;&#xA;		&amp;who,&#xD;&#xA;		AssetAccountOf::&lt;T, I&gt; {&#xD;&#xA;			balance: Zero::zero(),&#xD;&#xA;			is_frozen: false,&#xD;&#xA;			reason,&#xD;&#xA;			extra: T::Extra::default(),&#xD;&#xA;		},&#xD;&#xA;	);&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/cbd8f1b56fd8ab9af0d9317432cc735264c89d70/frame/assets/src/functions.rs#L298-L318&#xD;&#xA;&#xD;&#xA;If you want to learn more about `providers`, `consumers`, and `sufficients`, there is a great doc here:&#xD;&#xA;- https://docs.substrate.io/reference/account-data-structures/#accountinfo" ContentLicense="CC BY-SA 4.0" />
  <row Id="25168" PostHistoryTypeId="2" PostId="6561" RevisionGUID="a2fb2455-452b-4328-a321-e27a0b45b40c" CreationDate="2023-01-03T16:00:21.047" UserId="361" Text="The XCMP queue [drops messages if they exceed the limit](https://github.com/paritytech/cumulus/blob/37aa2a8c5d84ce4bc8d7f4d47451cb3fcf2b8ae4/pallets/xcmp-queue/src/lib.rs#L994-L1001):&#xD;&#xA;```Rust&#xD;&#xA;if (count as u32) &lt; drop_threshold {&#xD;&#xA;	status[i].message_metadata.push((sent_at, format));&#xD;&#xA;} else {&#xD;&#xA;	debug_assert!(&#xD;&#xA;		false,&#xD;&#xA;		&quot;XCMP channel queue full. Silently dropping message&quot;&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The [default config value of 5](https://github.com/paritytech/cumulus/blob/37aa2a8c5d84ce4bc8d7f4d47451cb3fcf2b8ae4/pallets/xcmp-queue/src/lib.rs#L471) will drop once 5 XCMP messages pile up which seems way too eager to drop for production use.&#xD;&#xA;&#xD;&#xA;How should the queue be configured?&#xD;&#xA;Is the HRMP channel max capacity a reasonable value (so that in the extreme case of the whole HRMP queue being filled all those messages will be processed by the xcmp queue pallet)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25170" PostHistoryTypeId="1" PostId="6561" RevisionGUID="a2fb2455-452b-4328-a321-e27a0b45b40c" CreationDate="2023-01-03T16:00:21.047" UserId="361" Text="How to configure XCMP queue drop threshold?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25171" PostHistoryTypeId="3" PostId="6561" RevisionGUID="a2fb2455-452b-4328-a321-e27a0b45b40c" CreationDate="2023-01-03T16:00:21.047" UserId="361" Text="|polkadot|runtime|xcmp|configuration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25172" PostHistoryTypeId="2" PostId="6562" RevisionGUID="0ef64662-dc63-4111-9aac-1e4ad7d13651" CreationDate="2023-01-03T18:54:23.687" UserId="3346" Text="**Ongoing problem with closing council motions related to treasury proposals. Here is what we have tried so far.** &#xD;&#xA;&#xD;&#xA;(1) At first, running an August 2022 version of the substrate kitchen sink node, the **close button was simply greyed out**.  &#xD;&#xA;&#xD;&#xA;(2) We tried upgrading the WASM to a December 2022 version. Closing a motion was possible then but got an error of **wrong proposal length**. &#xD;&#xA;&#xD;&#xA;(3) We tried disconnecting the Polkadot JS, clearing browser data and reconnecting the Polkadot JS. The close button was now unavailable due to an error of **No execution details available for this proposal**. &#xD;&#xA;&#xD;&#xA;(4) We tried another WASM update to include all changes to the Substrate kitchen sink node as of January 2nd (no custom code) (code is here: https://github.com/SparticleConcepts/Geode-Substrate/tree/Geode-Beta). But the same error persists: **No execution details available for this proposal**. &#xD;&#xA;&#xD;&#xA;(5) We tried connecting the Polkadot JS to various nodes on our network, and we tried connecting it to Polkadot and then back to our network (because sometimes that helps with other issues), no change, same error.&#xD;&#xA;&#xD;&#xA;We CAN force treasury proposal approvals via a sudo call BUT the motion for that proposal in the council will remain open. The **No execution details** error is the same for all proposals, regardless of which runtime version they were made on, and whether or not they were forced-approved or not.&#xD;&#xA;&#xD;&#xA;There was a similar issue reported a week ago at GitHub but it was considered unrepeatable: https://github.com/polkadot-js/apps/issues/8638 &#xD;&#xA;&#xD;&#xA;This issue is on our test chain so our next move would be to restart our entire test chain from zero but that is obviously less than ideal and may not solve the problem as it seems to be a JS problem rather than a runtime problem. We are using the standard Polkadot JS apps seen here: https://polkadot.js.org/apps/#/explorer&#xD;&#xA;&#xD;&#xA;**Any other ideas?** &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25174" PostHistoryTypeId="1" PostId="6562" RevisionGUID="0ef64662-dc63-4111-9aac-1e4ad7d13651" CreationDate="2023-01-03T18:54:23.687" UserId="3346" Text="Ongoing error closing council motions in Polkadot JS (No execution details available for this proposal)" ContentLicense="CC BY-SA 4.0" />
  <row Id="25175" PostHistoryTypeId="3" PostId="6562" RevisionGUID="0ef64662-dc63-4111-9aac-1e4ad7d13651" CreationDate="2023-01-03T18:54:23.687" UserId="3346" Text="|polkadot-js|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25176" PostHistoryTypeId="52" PostId="6556" RevisionGUID="68c0c351-d0af-4e5f-852a-290b0f3233ec" CreationDate="2023-01-03T20:00:32.477" />
  <row Id="25177" PostHistoryTypeId="2" PostId="6563" RevisionGUID="41ece294-9bc2-4827-979e-bc425c6cbb7e" CreationDate="2023-01-03T22:09:25.440" UserId="73" Text="- Wasmi is a wasm interpreter. This means that it interprets the wasm binary as it executes it.&#xD;&#xA;- Wasmtime is a wasm compiler. This means that it compiles the wasm binary to the current native platform before executing it.&#xD;&#xA;&#xD;&#xA;Substrate supports both of them to run the runtime. However, wasmi is the legacy engine as it is slower than wasmtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="25180" PostHistoryTypeId="2" PostId="6564" RevisionGUID="c3d64ce3-5f03-470d-9ee7-454d2bb02b8a" CreationDate="2023-01-03T22:47:55.010" UserId="19" Text="This error was due to a missing branch in the `obce` repository.&#xD;&#xA;&#xD;&#xA;Those who has the issue, try one more time, should work now.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25182" PostHistoryTypeId="50" PostId="6196" RevisionGUID="aae8e599-669f-4065-a56c-aff5178bc622" CreationDate="2023-01-03T23:00:15.043" UserId="-1" />
  <row Id="25184" PostHistoryTypeId="2" PostId="6565" RevisionGUID="b83de55f-b027-4901-abc5-0f27a9d13905" CreationDate="2023-01-04T08:39:31.590" UserId="2873" Text="Say I have a StorageDoubleMap like this&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub type Users&lt;T: Config&gt; = StorageDoubleMap&lt;_, Twox64Concat, Vec&lt;u8&gt;, Twox64Concat, Compact&lt;u64&gt;, Person&lt;T::AccountId&gt;,&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;where the `key1 = Vec&lt;u8&gt;`, `key2 = Compact&lt;u64&gt;`. For example I store it like `&lt;Users&lt;T&gt;&gt;::insert(b&quot;hello&quot;, 100, person);`&#xD;&#xA;&#xD;&#xA;What if I want to change `key1` from `hello` to `new_hello`? " ContentLicense="CC BY-SA 4.0" />
  <row Id="25186" PostHistoryTypeId="1" PostId="6565" RevisionGUID="b83de55f-b027-4901-abc5-0f27a9d13905" CreationDate="2023-01-04T08:39:31.590" UserId="2873" Text="How to change one of the two `StorageDoubleMap` keys?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25187" PostHistoryTypeId="3" PostId="6565" RevisionGUID="b83de55f-b027-4901-abc5-0f27a9d13905" CreationDate="2023-01-04T08:39:31.590" UserId="2873" Text="|storage|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25188" PostHistoryTypeId="2" PostId="6566" RevisionGUID="2d22b0aa-bb3d-4fa0-9c80-a6f6325891aa" CreationDate="2023-01-04T08:45:25.350" UserId="1779" Text="We've been trying to use the new `try_state` hook. However, a significant limitation seems to be that this hook is only accessible from the individual pallets. We want to add some checks that depend on different pallets. Is it possible somehow implement a top-level hook, similar to how it's possible to define `on_runtime_upgrade` hooks on the top-level `Executive` type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25190" PostHistoryTypeId="1" PostId="6566" RevisionGUID="2d22b0aa-bb3d-4fa0-9c80-a6f6325891aa" CreationDate="2023-01-04T08:45:25.350" UserId="1779" Text="try-state runtime-level hook" ContentLicense="CC BY-SA 4.0" />
  <row Id="25191" PostHistoryTypeId="3" PostId="6566" RevisionGUID="2d22b0aa-bb3d-4fa0-9c80-a6f6325891aa" CreationDate="2023-01-04T08:45:25.350" UserId="1779" Text="|parachain|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25192" PostHistoryTypeId="2" PostId="6567" RevisionGUID="ed98c7df-a1f2-4a14-b7b0-72a86f29fbeb" CreationDate="2023-01-04T09:14:29.977" UserId="2961" Text="Just to clarify, I am not asking about the max upload size of a contract. I am able to upload my contract to my chain no problem.&#xD;&#xA;&#xD;&#xA;I have two smart contracts (A,B) A calls a transaction on smart contract B when smart contract A is deployed. This was working absolutely fine, I made sure that the contracts were funded, so it is not the case the the contract ended up in tombstone state. Then out of nowhere i got an error when deploying Contract A, I got a ContractTrapped Error.&#xD;&#xA;&#xD;&#xA;I investigated more deeply and it was not an error with Contract A. I was able to deduce this from the fact that when contract A called a copy of B, it worked fine. &#xD;&#xA;&#xD;&#xA;Looked deeper into this and it turns out I could not make any transactions on Contract B at all, but could still query the data stored in it. &#xD;&#xA;&#xD;&#xA;So i looked into the contract StorageDeposit over time&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  const r = range(573000, 574000, 1);&#xD;&#xA;  r.map(async (block) =&gt; {&#xD;&#xA;    const hash = await api.rpc.chain.getBlockHash(block);&#xD;&#xA;    const apiAt = await api.at(hash);&#xD;&#xA;    const contract = await apiAt.query.contracts.contractInfoOf(&#xD;&#xA;      &quot;5CAwMPDocR23HDDsLC2RqR4CFFZkgvjR7PsPtrKyK1qhdkNv&quot;&#xD;&#xA;    );&#xD;&#xA;    const timestamp = await apiAt.query.timestamp.now();&#xD;&#xA;    console.log(&#xD;&#xA;      `StorageDeposit at block ${block} is ${&#xD;&#xA;        contract.toJSON()?.storageDeposit&#xD;&#xA;      } and timestamp is ${new Date(timestamp.toNumber())}`&#xD;&#xA;    );&#xD;&#xA;  });&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;And I found this was the issue&#xD;&#xA;&#xD;&#xA;- StorageDeposit at block 573007 is 1382380000000 and timestamp is Mon Jan 02 2023 13:03:00 GMT+0100 (Central European Standard Time)&#xD;&#xA;- StorageDeposit at block 573008 is 1382580000000 and timestamp is Mon Jan 02 2023 13:03:06 GMT+0100 (Central European Standard Time)&#xD;&#xA;&#xD;&#xA;The contract StorageDeposit maxed out at 1382580000000, which also explains why i can read the state of the smartcontract, but not add more.&#xD;&#xA;&#xD;&#xA;So ultimately my question is, where on the contracts pallet configuration can i increase this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25194" PostHistoryTypeId="1" PostId="6567" RevisionGUID="ed98c7df-a1f2-4a14-b7b0-72a86f29fbeb" CreationDate="2023-01-04T09:14:29.977" UserId="2961" Text="What is a substate contracts max storage size? using the contracts pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="25195" PostHistoryTypeId="3" PostId="6567" RevisionGUID="ed98c7df-a1f2-4a14-b7b0-72a86f29fbeb" CreationDate="2023-01-04T09:14:29.977" UserId="2961" Text="|ink|storage|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25198" PostHistoryTypeId="6" PostId="6566" RevisionGUID="9502dc07-cb65-4ae8-b712-3d580f99cd35" CreationDate="2023-01-04T09:59:39.460" UserId="251" Comment="edited tags" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25199" PostHistoryTypeId="2" PostId="6569" RevisionGUID="2e0c109a-3d32-443f-88e4-aed0d8c7e854" CreationDate="2023-01-04T10:00:52.333" UserId="2762" Text="One thing you can do is first [take][1] a value from storage, removing it afterwards, and [insert][2] it again with the new key:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    let value = &lt;Users&lt;T&gt;&gt;::take(b&quot;hello&quot;, 100).ok_or(Error::&lt;T&gt;::UserDoesntExist)?;&#xD;&#xA;    /// Insert it&#xD;&#xA;    &lt;Users&lt;T&gt;&gt;::insert(b&quot;new_hello&quot;, 100, value);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/pallet_prelude/struct.StorageDoubleMap.html#method.take&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/frame_support/pallet_prelude/struct.StorageDoubleMap.html#method.insert" ContentLicense="CC BY-SA 4.0" />
  <row Id="25201" PostHistoryTypeId="2" PostId="6570" RevisionGUID="234e6b2a-4f0f-44da-abfb-181de588cf79" CreationDate="2023-01-04T10:04:42.167" UserId="251" Text="https://paritytech.github.io/substrate/master/frame_support/storage/trait.IterableStorageDoubleMap.html#tymethod.drain_prefix&#xD;&#xA;&#xD;&#xA;I think you could write something like this to mutate the entire prefix tree:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;for (k, v) in X::drain_prefix(old_prefix) {&#xD;&#xA;  X::insert(new_prefix, k, v);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But this might cost a lot of weight. Be careful with that." ContentLicense="CC BY-SA 4.0" />
  <row Id="25208" PostHistoryTypeId="2" PostId="6572" RevisionGUID="6be0314d-916f-42ac-8b51-00ea889c484d" CreationDate="2023-01-04T11:24:01.157" UserId="3675" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&quot;Withdraw unbonded funds&quot; button remains disabled, blocks goes to negative number &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/y5DpP.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25210" PostHistoryTypeId="1" PostId="6572" RevisionGUID="6be0314d-916f-42ac-8b51-00ea889c484d" CreationDate="2023-01-04T11:24:01.157" UserId="3675" Text="tokens stuck in unbonding state after unbonding period can't withdraw funds" ContentLicense="CC BY-SA 4.0" />
  <row Id="25211" PostHistoryTypeId="3" PostId="6572" RevisionGUID="6be0314d-916f-42ac-8b51-00ea889c484d" CreationDate="2023-01-04T11:24:01.157" UserId="3675" Text="|pallet|substrate-node-template|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25212" PostHistoryTypeId="2" PostId="6573" RevisionGUID="691b937d-13fb-4793-9059-c32df90c22f1" CreationDate="2023-01-04T12:34:56.460" UserId="94" Text="This is currently not possible. The `Executive` only accepts a runtime-wide `OnRuntimeUpgrade` which can be used adjacent to the pallets `on_runtime_upgrade` hooks.  &#xD;&#xA;`TryState` can currently only be used on a per-pallet level. But it is a good idea to extend it for runtime-wide usage ([issue](https://github.com/paritytech/substrate/issues/13061)).  &#xD;&#xA;&#xD;&#xA;As makeshift you can maybe write a pallet which only contains the `TryState` logic, but that would be quite ugly." ContentLicense="CC BY-SA 4.0" />
  <row Id="25214" PostHistoryTypeId="2" PostId="6574" RevisionGUID="f131413b-b95d-404d-8613-2470bce090a4" CreationDate="2023-01-04T12:43:50.723" UserId="162" Text="Currently, I am trying to add the custom RPC into the polkadot.js apps to let me send the RPC call via polkadot.js apps.&#xD;&#xA;&#xD;&#xA;I discovered that I have to generate my type-definition with the RPC/types, a file in the `apps/packages/apps-config/src/api/spec`, and set it up in the `apps/packages/apps-config/src/api/spec/index.ts`.&#xD;&#xA;&#xD;&#xA;However, there are several projects (`acala.js/packages/type-definitions`, `sora2-substrate-js-library/packages/type-definitions`) that define their type-definitions. After I define my type-definition like them, how could I use these files to convert to the files which the apps-config in apps can use?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25216" PostHistoryTypeId="1" PostId="6574" RevisionGUID="f131413b-b95d-404d-8613-2470bce090a4" CreationDate="2023-01-04T12:43:50.723" UserId="162" Text="Generate the type-definition for the polkadot.js apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="25217" PostHistoryTypeId="3" PostId="6574" RevisionGUID="f131413b-b95d-404d-8613-2470bce090a4" CreationDate="2023-01-04T12:43:50.723" UserId="162" Text="|custom-rpc|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25218" PostHistoryTypeId="2" PostId="6575" RevisionGUID="d28bc06b-59e7-46a4-b4fb-b77e0a62daab" CreationDate="2023-01-04T13:04:29.927" UserId="2762" Text="You can still query all the democracy storage to get all the referendums. &#xD;&#xA;&#xD;&#xA;You can get some indexes with:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;    /* The next free referendum index */&#xD;&#xA;    const nextFreeIndex = await api.query.democracy.referendumCount();&#xD;&#xA;    /* The lowest referendum index representing an unbaked referendum */&#xD;&#xA;    const lowestUnbaked = await api.query.democracy.lowestUnbaked();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And with this index get a specific referendum:&#xD;&#xA;```js&#xD;&#xA;    const lastReferendum = await api.query.democracy.referendumInfoOf(lowestUnbaked);&#xD;&#xA;    console.log(lastReferendum.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And to get the number of (public) proposals that have been made so far:&#xD;&#xA;```js&#xD;&#xA;    const proposalsCount = await api.query.democracy.publicPropCount();&#xD;&#xA;    console.log(proposalsCount.toHuman());&#xD;&#xA;```&#xD;&#xA;With that we are getting all the information you can see in the image below (Kusama governance right now):&#xD;&#xA;&#xD;&#xA;  [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you want to get all the referendums (Finished and OnGoing) you can do it with this little script:&#xD;&#xA;```js&#xD;&#xA;    const allEntries = await api.query.democracy.referendumInfoOf.entries();&#xD;&#xA;        allEntries.forEach(([{ args: [id] }, referendum]) =&gt; {&#xD;&#xA;            console.log(`${id}: Referendum: ${JSON.stringify(referendum.toHuman())}`);&#xD;&#xA;     });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For more information check the [democracy docs][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/F2Oih.png&#xD;&#xA;  [2]: https://polkadot.js.org/docs/substrate/storage/#democracy" ContentLicense="CC BY-SA 4.0" />
  <row Id="25220" PostHistoryTypeId="2" PostId="6576" RevisionGUID="bca739c6-a2b2-4f13-b59c-bc2006738546" CreationDate="2023-01-04T13:05:40.793" UserId="2442" Text="I'm migrating a project from `substrate-node-template` to `substrate-parachain-template` and I'm encountering an issue when running tests. I understand that this is completely dependent of my local code and probably result of a merge issue, nevertheless I would be thankful if somebody can give me some advice. The problem I am facing is the following compilation error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error[E0599]: the function or associated item `try_runtime_upgrade` exists for struct `frame_executive::Executive&lt;Runtime, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;&gt;, ChainContext&lt;Runtime&gt;, Runtime, (frame_system::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_sudo::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_collator_selection::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_vesting::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_uniques::Pallet&lt;Runtime&gt;)&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /substrate-parachain-template/runtime/src/lib.rs:972:31&#xD;&#xA;      |&#xD;&#xA;  972 |       let weight = Executive::try_runtime_upgrade().unwrap();&#xD;&#xA;&#xD;&#xA;note: the following trait bounds were not satisfied: &#xD;&#xA;      `(frame_system::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_sudo::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_collator_selection::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_vesting::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_uniques::Pallet&lt;Runtime&gt;): TryState&lt;u32&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've checked the definition of Executive, it's as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Executive: handles dispatch to the various modules.&#xD;&#xA;pub type Executive =&#xD;&#xA;  frame_executive::Executive&lt;Runtime, Block, frame_system::ChainContext&lt;Runtime&gt;, Runtime, AllPalletsWithSystem&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It means that `AllPalletsWithSystem` was not created with all the pallets and the system. I know this type is generated in `construct_runtime` and the pallets are of course declared there:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Create the runtime by composing the FRAME pallets that were previously configured.&#xD;&#xA;construct_runtime!(&#xD;&#xA;  pub enum Runtime where&#xD;&#xA;    Block = Block,&#xD;&#xA;    NodeBlock = opaque::Block,&#xD;&#xA;    UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;  {&#xD;&#xA;    // System support stuff.&#xD;&#xA;    System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;} = 0,&#xD;&#xA;    ParachainSystem: cumulus_pallet_parachain_system::{&#xD;&#xA;      Pallet, Call, Config, Storage, Inherent, Event&lt;T&gt;, ValidateUnsigned,&#xD;&#xA;    } = 1,&#xD;&#xA;    Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2,&#xD;&#xA;    ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3,&#xD;&#xA;    Sudo: pallet_sudo = 7,&#xD;&#xA;    Treasury: pallet_treasury = 8,&#xD;&#xA;&#xD;&#xA;    // Monetary stuff.&#xD;&#xA;    Balances: pallet_balances::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;} = 10,&#xD;&#xA;    TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event&lt;T&gt;} = 11,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Collator support. The order of these 4 are important and shall not change.&#xD;&#xA;    Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,&#xD;&#xA;    CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;} = 21,&#xD;&#xA;    Session: pallet_session::{Pallet, Call, Storage, Event, Config&lt;T&gt;} = 22,&#xD;&#xA;    Aura: pallet_aura::{Pallet, Storage, Config&lt;T&gt;} = 23,&#xD;&#xA;    AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24,&#xD;&#xA;&#xD;&#xA;    // XCM helpers.&#xD;&#xA;    XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event&lt;T&gt;} = 30,&#xD;&#xA;    PolkadotXcm: pallet_xcm::{Pallet, Call, Event&lt;T&gt;, Origin, Config} = 31,&#xD;&#xA;    CumulusXcm: cumulus_pallet_xcm::{Pallet, Event&lt;T&gt;, Origin} = 32,&#xD;&#xA;    DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event&lt;T&gt;} = 33,&#xD;&#xA;&#xD;&#xA;    // Customizations&#xD;&#xA;    Utility: pallet_utility::{Pallet, Call, Event} = 40,&#xD;&#xA;    // Vesting. Usable initially, but removed once all vesting is finished.&#xD;&#xA;    Vesting: pallet_vesting::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;} = 41,&#xD;&#xA;    Scheduler: pallet_scheduler = 42,&#xD;&#xA;    Uniques: pallet_uniques::{Pallet, Call, Storage, Event&lt;T&gt;} = 43,&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;So where is the problem coming from?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25222" PostHistoryTypeId="1" PostId="6576" RevisionGUID="bca739c6-a2b2-4f13-b59c-bc2006738546" CreationDate="2023-01-04T13:05:40.793" UserId="2442" Text="AllPalletsWithSystem trait not implemented for Executive when running tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="25223" PostHistoryTypeId="3" PostId="6576" RevisionGUID="bca739c6-a2b2-4f13-b59c-bc2006738546" CreationDate="2023-01-04T13:05:40.793" UserId="2442" Text="|runtime|substrate-parachain-template|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25224" PostHistoryTypeId="2" PostId="6577" RevisionGUID="43bd2788-eb19-4f5b-a637-ab54af8a0d2c" CreationDate="2023-01-04T13:29:05.427" UserId="3676" Text="I'd like to use Substrate Frontier as a private blockchain for my current project. I have set up a project using a frontier-template-node build and I am now trying to adjust its settings.&#xD;&#xA;&#xD;&#xA;I am currently stuck with issues with accounts I generated:&#xD;&#xA;- In the chain specification file (customSpec.yml), I replaced the sudo account id of Alice by an account id I created. This account is not able to deploy a contract but Alice is still authorized to do it. I get the error `Returned error: insufficient funds for gas * price + value` while the substrate and EVM balances of the account seems well funded.&#xD;&#xA;- All the user accounts I created are not able to perform a transaction. I get the same error `Returned error: insufficient funds for gas * price + value` even with a balance of `1,000,000,000 ETH`&#xD;&#xA;&#xD;&#xA;Here is a sample call I execute on my code:&#xD;&#xA;```&#xD;&#xA;    // Load contract&#xD;&#xA;    const contract = new web3.eth.Contract(contractAbi, contractAddress, {&#xD;&#xA;      from: signerAddress,&#xD;&#xA;      gasPrice: '0x3B9ACA00',&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;    // Prepare method transaction&#xD;&#xA;    const encodedMethod = await contract.methods.transfer([userAddress, 100]).encodeABI();&#xD;&#xA;&#xD;&#xA;    // Sign transaction&#xD;&#xA;    const methodTx = await web3.eth.accounts.signTransaction(&#xD;&#xA;      {&#xD;&#xA;        from: signerAddress,&#xD;&#xA;        to: contractAddress,&#xD;&#xA;        data: encodedMethod,&#xD;&#xA;        gasPrice: '0x3B9ACA00',&#xD;&#xA;        gas: '0x1000000',&#xD;&#xA;      },&#xD;&#xA;      signerPrivateKey,&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    // Send transaction&#xD;&#xA;    const txReceipt = await web3.eth.sendSignedTransaction(methodTx.rawTransaction);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could you give me some advices to fix this issue?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25226" PostHistoryTypeId="1" PostId="6577" RevisionGUID="43bd2788-eb19-4f5b-a637-ab54af8a0d2c" CreationDate="2023-01-04T13:29:05.427" UserId="3676" Text="Getting `insufficient funds for gas * price + value` error while performing transaction with another account than Alice" ContentLicense="CC BY-SA 4.0" />
  <row Id="25227" PostHistoryTypeId="3" PostId="6577" RevisionGUID="43bd2788-eb19-4f5b-a637-ab54af8a0d2c" CreationDate="2023-01-04T13:29:05.427" UserId="3676" Text="|balances|account|frontier|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25228" PostHistoryTypeId="4" PostId="6577" RevisionGUID="9a8dced4-aee5-45d6-ba16-96d3243b7ff4" CreationDate="2023-01-04T13:31:31.770" UserId="3676" Comment="edited title" Text="Getting `insufficient funds for gas * price + value` error when performing transaction with another account than Alice" ContentLicense="CC BY-SA 4.0" />
  <row Id="25229" PostHistoryTypeId="2" PostId="6578" RevisionGUID="fa47b6b3-ede9-4572-9f72-5851f6c2e7dc" CreationDate="2023-01-04T13:52:08.323" UserId="94" Text="You are probably not passing the `try-runtime` feature down to all the pallets in your runtime.  &#xD;&#xA;The feature needs to be propagated to all pallets ([Example](https://github.com/paritytech/polkadot/blob/09f2d1a1c60d0d41ff88e008480e8495b8488a17/runtime/kusama/Cargo.toml#L261)) and ideally also dependencies, otherwise the `AllPalletsWithSystem` will not implement `TryState`." ContentLicense="CC BY-SA 4.0" />
  <row Id="25231" PostHistoryTypeId="2" PostId="6579" RevisionGUID="48464f89-bca2-43c1-a925-42ec514d07e2" CreationDate="2023-01-04T14:10:56.637" UserId="2762" Text="You can guess the fee before call the function querying the information from &#xD;&#xA; the [payment RPC methods][1].&#xD;&#xA;&#xD;&#xA;A little script to query your example is:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;    const wsProvider = new WsProvider('wss://kusama-rpc.polkadot.io')&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const blockHash = '0x9646cfeddaf4afd297f8a904f9458871b7203e6922cff502b3588af4c6cd1f0d';&#xD;&#xA;    const { block } = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;&#xD;&#xA;    // The extrinsic from your example(0x436d39517244cd5fc7c3d35dd08de0ccb62cb620868b5428db831857d4a952eb) is in block.extrinsics[7]&#xD;&#xA;    const extrinsic = block.extrinsics[7].toHex();&#xD;&#xA;&#xD;&#xA;    const queryFeeDetails = await api.rpc.payment.queryFeeDetails(extrinsic, blockHash);&#xD;&#xA;    console.log('queryFeeDetails:', JSON.stringify(queryFeeDetails.toHuman(), null, 2));&#xD;&#xA;    const queryInfo = await api.rpc.payment.queryInfo(extrinsic, blockHash);&#xD;&#xA;    console.log('queryInfo:', JSON.stringify(queryInfo.toHuman(), null, 2));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will give return you:&#xD;&#xA;```json&#xD;&#xA;queryFeeDetails: {&#xD;&#xA;  &quot;inclusionFee&quot;: {&#xD;&#xA;    &quot;baseFee&quot;: &quot;33.3333 µKSM&quot;,&#xD;&#xA;    &quot;lenFee&quot;: &quot;489.9995 µKSM&quot;,&#xD;&#xA;    &quot;adjustedWeightFee&quot;: &quot;5.4706 µKSM&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;queryInfo: {&#xD;&#xA;  &quot;weight&quot;: &quot;155,732,000&quot;,&#xD;&#xA;  &quot;class&quot;: &quot;Normal&quot;,&#xD;&#xA;  &quot;partialFee&quot;: &quot;528.8035 µKSM&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The estimated fee is partial fee, which is `partial_fee = base_fee + len_fee + adjusted_weight_fee`&#xD;&#xA;&#xD;&#xA;But the `adjusted_weight_fee` might slightly change depends in which block the extrinsic is included. I am not 100% sure how subscan calculates it, but this is the Used Fee field.&#xD;&#xA;&#xD;&#xA;Check this response to see an excellent explanation about how to calculate the final fee: https://substrate.stackexchange.com/a/4224/2762&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/rpc#payment" ContentLicense="CC BY-SA 4.0" />
  <row Id="25233" PostHistoryTypeId="2" PostId="6580" RevisionGUID="75ae4920-d1a3-468a-b881-5c56ae208814" CreationDate="2023-01-04T14:15:19.940" UserId="3468" Text="It is possible to generate account that deduct transaction fee from parent account and still alive untill the parent account die without making initial deposit so he can receive nft and assets without need of deposit into the account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25235" PostHistoryTypeId="1" PostId="6580" RevisionGUID="75ae4920-d1a3-468a-b881-5c56ae208814" CreationDate="2023-01-04T14:15:19.940" UserId="3468" Text="Create child address" ContentLicense="CC BY-SA 4.0" />
  <row Id="25236" PostHistoryTypeId="3" PostId="6580" RevisionGUID="75ae4920-d1a3-468a-b881-5c56ae208814" CreationDate="2023-01-04T14:15:19.940" UserId="3468" Text="|assets|nft|sub-account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25237" PostHistoryTypeId="2" PostId="6581" RevisionGUID="30fbc7ae-732e-4001-9588-c53e826e8c7c" CreationDate="2023-01-04T14:20:51.450" UserId="162" Text="Found the way. I should use the [script](https://github.com/polkadot-js/dev/blob/master/packages/dev/package.json#L23), `polkadot-dev-build-ts`, to convert them to the files that polkadot.js/apps are needed." ContentLicense="CC BY-SA 4.0" />
  <row Id="25239" PostHistoryTypeId="10" PostId="6545" RevisionGUID="56debd5a-3478-4eab-90d3-054fc502dd0f" CreationDate="2023-01-04T15:05:16.697" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="25240" PostHistoryTypeId="2" PostId="6582" RevisionGUID="647eee2f-44f0-41dc-807f-937e2de7f8bc" CreationDate="2023-01-04T15:40:10.187" UserId="2019" Text="I'd like to still have things like benchmarking but since the feature is one extrinsic, doesn't need new storage, etc. a pallet feels overkill." ContentLicense="CC BY-SA 4.0" />
  <row Id="25242" PostHistoryTypeId="1" PostId="6582" RevisionGUID="647eee2f-44f0-41dc-807f-937e2de7f8bc" CreationDate="2023-01-04T15:40:10.187" UserId="2019" Text="Is it possible to add a &quot;one-off&quot; custom extrinsic without adding a new pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25243" PostHistoryTypeId="3" PostId="6582" RevisionGUID="647eee2f-44f0-41dc-807f-937e2de7f8bc" CreationDate="2023-01-04T15:40:10.187" UserId="2019" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25244" PostHistoryTypeId="2" PostId="6583" RevisionGUID="357a4f4b-cc13-44d9-9a01-285662f9dfd9" CreationDate="2023-01-04T15:56:28.787" UserId="3346" Text="found this (https://github.com/polkadot-js/apps/issues/7790) suggesting that there are one or more offending props from before the runtime upgrade that cannot be decoded and that, like xmas lights, if there is one bad one, the whole list will act badly. … removed old proposals by disapproving them via extrinsics. Now everything works well in the council." ContentLicense="CC BY-SA 4.0" />
  <row Id="25246" PostHistoryTypeId="2" PostId="6584" RevisionGUID="d8aa96f0-6351-45c8-947e-e8f82f8f8e27" CreationDate="2023-01-04T15:59:20.380" UserId="3346" Text="found this (https://github.com/polkadot-js/apps/issues/7790) suggesting that there are one or more offending props from before the runtime upgrade that cannot be decoded and that, like xmas lights, if there is one bad one, the whole list will act badly. … removed old proposals by disapproving them via extrinsics. Now everything works well in the council." ContentLicense="CC BY-SA 4.0" />
  <row Id="25248" PostHistoryTypeId="2" PostId="6585" RevisionGUID="62e630e7-2b75-435e-a3c8-f38426c967af" CreationDate="2023-01-04T17:20:32.433" UserId="3677" Text="I would like to allow another account to vote in governance on my behalf. What are the trade offs between setting up a governance proxy vs delegating voting power?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25250" PostHistoryTypeId="1" PostId="6585" RevisionGUID="62e630e7-2b75-435e-a3c8-f38426c967af" CreationDate="2023-01-04T17:20:32.433" UserId="3677" Text="Governance Proxy vs Delegating Voting" ContentLicense="CC BY-SA 4.0" />
  <row Id="25251" PostHistoryTypeId="3" PostId="6585" RevisionGUID="62e630e7-2b75-435e-a3c8-f38426c967af" CreationDate="2023-01-04T17:20:32.433" UserId="3677" Text="|governance|proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25252" PostHistoryTypeId="2" PostId="6586" RevisionGUID="daa3d9e7-998e-4fd0-a75f-9e60411b615f" CreationDate="2023-01-04T19:45:22.267" UserId="3358" Text="I am trying to upgrade then compile a token contract in ink!4.&#xD;&#xA;&#xD;&#xA;My understanding is that `SpreadAllocate`, `StorageLayout`, etc. have been removed from the ink!4 release.&#xD;&#xA;&#xD;&#xA;The problem is that I have custom data structures that cargo still expects the `StorageLayout` trait to be implemented for.&#xD;&#xA;&#xD;&#xA;How do I work around this?&#xD;&#xA;&#xD;&#xA;(For context, this is built using `cargo-contract version 2.0.0-beta`)&#xD;&#xA;&#xD;&#xA;Here are the structs in question:&#xD;&#xA;```rust&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Debug)]&#xD;&#xA;    pub struct StakeholderData {&#xD;&#xA;        paid: Balance,&#xD;&#xA;        share: Balance,&#xD;&#xA;        pool: u8,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone, Default)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Port {&#xD;&#xA;        hash: Hash,&#xD;&#xA;        tax: Balance,&#xD;&#xA;        cap: Balance,&#xD;&#xA;        locked: bool,&#xD;&#xA;        paid: Balance,&#xD;&#xA;        collected: Balance,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone, Default)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Socket {&#xD;&#xA;        address: AccountId,&#xD;&#xA;        port: u16,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And here is a screenshot of the cargo build log:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Thank you for the insight and understanding.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/AbzOZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25254" PostHistoryTypeId="1" PostId="6586" RevisionGUID="daa3d9e7-998e-4fd0-a75f-9e60411b615f" CreationDate="2023-01-04T19:45:22.267" UserId="3358" Text="What is new way to implement custom data structs (in ink! 4)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25255" PostHistoryTypeId="3" PostId="6586" RevisionGUID="daa3d9e7-998e-4fd0-a75f-9e60411b615f" CreationDate="2023-01-04T19:45:22.267" UserId="3358" Text="|ink|smart-contract|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25256" PostHistoryTypeId="52" PostId="6576" RevisionGUID="184c21af-e0e4-4dee-a33a-41d8a9c89c03" CreationDate="2023-01-04T21:08:25.553" />
  <row Id="25257" PostHistoryTypeId="5" PostId="6586" RevisionGUID="81b49cce-8ec2-46f2-9aee-738d35440828" CreationDate="2023-01-04T21:23:21.487" UserId="3358" Comment="added 1273 characters in body; edited tags" Text="I am trying to upgrade then compile a token contract in ink!4.&#xD;&#xA;&#xD;&#xA;My understanding is that `SpreadAllocate`, `StorageLayout`, etc. have been removed from the ink!4 release.&#xD;&#xA;&#xD;&#xA;The problem is that I have custom data structures that cargo still expects the `StorageLayout` trait to be implemented for.&#xD;&#xA;&#xD;&#xA;How do I work around this?&#xD;&#xA;&#xD;&#xA;Context:&#xD;&#xA;&#xD;&#xA; - this is built using `cargo-contract version 2.0.0-beta`&#xD;&#xA; - this project uses Openbrush 3 (Cargo.toml included below)&#xD;&#xA;&#xD;&#xA;Here are the structs in question:&#xD;&#xA;```rust&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Debug)]&#xD;&#xA;    pub struct StakeholderData {&#xD;&#xA;        paid: Balance,&#xD;&#xA;        share: Balance,&#xD;&#xA;        pool: u8,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone, Default)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Port {&#xD;&#xA;        hash: Hash,&#xD;&#xA;        tax: Balance,&#xD;&#xA;        cap: Balance,&#xD;&#xA;        locked: bool,&#xD;&#xA;        paid: Balance,&#xD;&#xA;        collected: Balance,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone, Default)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Socket {&#xD;&#xA;        address: AccountId,&#xD;&#xA;        port: u16,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;Cargo.toml below:&#xD;&#xA;```yaml&#xD;&#xA;[package]&#xD;&#xA;name = &quot;ilocktoken&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Blair Munro &lt;blairmunroakusa@gmail.com&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;# This is to enable unsigned integer division (floor division)&#xD;&#xA;# ...safe-math functions are built into lib.rs where overflow checks would otherwise be&#xD;&#xA;#    (that is, in all cases except the floor division operation)&#xD;&#xA;[profile.release]&#xD;&#xA;overflow-checks = false&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { git = &quot;https://github.com/paritytech/ink&quot;, commit = &quot;4655a8b4413cb50cbc38d1b7c173ad426ab06cde&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;openbrush = { tag = &quot;3.0.0-beta&quot;, git = &quot;https://github.com/727-Ventures/openbrush-contracts&quot;, default-features = false, features = [&quot;psp22&quot;, &quot;ownable&quot;] }&#xD;&#xA;[lib]&#xD;&#xA;name = &quot;ilocktoken&quot;&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;crate-type = [&#xD;&#xA;	# Used for normal contract Wasm blobs.&#xD;&#xA;	&quot;cdylib&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;&#xD;&#xA;    &quot;openbrush/std&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And here is a screenshot of the cargo build log:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Thank you for the insight and understanding.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/AbzOZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25258" PostHistoryTypeId="6" PostId="6586" RevisionGUID="81b49cce-8ec2-46f2-9aee-738d35440828" CreationDate="2023-01-04T21:23:21.487" UserId="3358" Comment="added 1273 characters in body; edited tags" Text="|ink|smart-contract|build|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25259" PostHistoryTypeId="5" PostId="6586" RevisionGUID="409610a6-9386-4ff3-a2f4-5aed3b12c956" CreationDate="2023-01-04T21:26:39.993" UserId="3358" Comment="added 33 characters in body" Text="I am trying to upgrade then compile a token contract (employing openbrush) from ink!3 to ink!4.&#xD;&#xA;&#xD;&#xA;My understanding is that `SpreadAllocate`, `StorageLayout`, etc. have been removed from the ink!4 release.&#xD;&#xA;&#xD;&#xA;The problem is that I have custom data structures that cargo still expects the `StorageLayout` trait to be implemented for.&#xD;&#xA;&#xD;&#xA;How do I work around this?&#xD;&#xA;&#xD;&#xA;Context:&#xD;&#xA;&#xD;&#xA; - this is built using `cargo-contract version 2.0.0-beta`&#xD;&#xA; - this project uses Openbrush 3 (Cargo.toml included below)&#xD;&#xA;&#xD;&#xA;Here are the structs in question:&#xD;&#xA;```rust&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Debug)]&#xD;&#xA;    pub struct StakeholderData {&#xD;&#xA;        paid: Balance,&#xD;&#xA;        share: Balance,&#xD;&#xA;        pool: u8,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone, Default)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Port {&#xD;&#xA;        hash: Hash,&#xD;&#xA;        tax: Balance,&#xD;&#xA;        cap: Balance,&#xD;&#xA;        locked: bool,&#xD;&#xA;        paid: Balance,&#xD;&#xA;        collected: Balance,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone, Default)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Socket {&#xD;&#xA;        address: AccountId,&#xD;&#xA;        port: u16,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;Cargo.toml below:&#xD;&#xA;```yaml&#xD;&#xA;[package]&#xD;&#xA;name = &quot;ilocktoken&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Blair Munro &lt;blairmunroakusa@gmail.com&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;# This is to enable unsigned integer division (floor division)&#xD;&#xA;# ...safe-math functions are built into lib.rs where overflow checks would otherwise be&#xD;&#xA;#    (that is, in all cases except the floor division operation)&#xD;&#xA;[profile.release]&#xD;&#xA;overflow-checks = false&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { git = &quot;https://github.com/paritytech/ink&quot;, commit = &quot;4655a8b4413cb50cbc38d1b7c173ad426ab06cde&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;openbrush = { tag = &quot;3.0.0-beta&quot;, git = &quot;https://github.com/727-Ventures/openbrush-contracts&quot;, default-features = false, features = [&quot;psp22&quot;, &quot;ownable&quot;] }&#xD;&#xA;[lib]&#xD;&#xA;name = &quot;ilocktoken&quot;&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;crate-type = [&#xD;&#xA;	# Used for normal contract Wasm blobs.&#xD;&#xA;	&quot;cdylib&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;&#xD;&#xA;    &quot;openbrush/std&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And here is a screenshot of the cargo build log:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Thank you for the insight and understanding.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/AbzOZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25260" PostHistoryTypeId="5" PostId="6586" RevisionGUID="413b7f45-bdf0-481a-9f44-61ce321d18f5" CreationDate="2023-01-04T21:28:43.707" UserId="3358" Comment="added 14 characters in body" Text="I am trying to upgrade then compile a token contract (employing openbrush) from ink!3 to ink!4.&#xD;&#xA;&#xD;&#xA;My understanding is that `SpreadAllocate`, `StorageLayout`, etc. have been removed from the ink!4 release.&#xD;&#xA;&#xD;&#xA;The problem is that I have custom data structures that cargo still expects the `StorageLayout` trait to be implemented for.&#xD;&#xA;&#xD;&#xA;How do I work around this?&#xD;&#xA;&#xD;&#xA;Context:&#xD;&#xA;&#xD;&#xA; - this is built using `cargo-contract version 2.0.0-beta`&#xD;&#xA; - this project uses Openbrush 3 (Cargo.toml included below)&#xD;&#xA;&#xD;&#xA;Here are the structs in question:&#xD;&#xA;```rust&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Debug)]&#xD;&#xA;    pub struct StakeholderData {&#xD;&#xA;        paid: Balance,&#xD;&#xA;        share: Balance,&#xD;&#xA;        pool: u8,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone, Default)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Port {&#xD;&#xA;        hash: Hash,&#xD;&#xA;        tax: Balance,&#xD;&#xA;        cap: Balance,&#xD;&#xA;        locked: bool,&#xD;&#xA;        paid: Balance,&#xD;&#xA;        collected: Balance,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone, Default)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(scale_info::TypeInfo)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Socket {&#xD;&#xA;        address: AccountId,&#xD;&#xA;        port: u16,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;Cargo.toml below:&#xD;&#xA;```yaml&#xD;&#xA;[package]&#xD;&#xA;name = &quot;ilocktoken&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Blair Munro &lt;blairmunroakusa@gmail.com&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;# This is to enable unsigned integer division (floor division)&#xD;&#xA;# ...safe-math functions are used for lib.rs arithmetic where overflow checks would otherwise be&#xD;&#xA;#    (that is, in all cases except the few floor division operations)&#xD;&#xA;[profile.release]&#xD;&#xA;overflow-checks = false&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { git = &quot;https://github.com/paritytech/ink&quot;, commit = &quot;4655a8b4413cb50cbc38d1b7c173ad426ab06cde&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;openbrush = { tag = &quot;3.0.0-beta&quot;, git = &quot;https://github.com/727-Ventures/openbrush-contracts&quot;, default-features = false, features = [&quot;psp22&quot;, &quot;ownable&quot;] }&#xD;&#xA;[lib]&#xD;&#xA;name = &quot;ilocktoken&quot;&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;crate-type = [&#xD;&#xA;	# Used for normal contract Wasm blobs.&#xD;&#xA;	&quot;cdylib&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;&#xD;&#xA;    &quot;openbrush/std&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And here is a screenshot of the cargo build log:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Thank you for the insight and understanding.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/AbzOZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25261" PostHistoryTypeId="2" PostId="6587" RevisionGUID="c281a662-d68b-4af8-890b-eb526633c724" CreationDate="2023-01-04T21:50:25.083" UserId="3358" Text="Easy fix. I was mistaken to assert that ink!4 does not have the `StorageLayout` trait.&#xD;&#xA;&#xD;&#xA;Per [ink *multisig* reference implementation](https://github.com/paritytech/ink/blob/master/examples/multisig/lib.rs), `StorageLayout` must be be derived as so:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[derive(scale::Encode, scale::Decode, Clone, Default)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;    feature = &quot;std&quot;,&#xD;&#xA;    derive(&#xD;&#xA;        Debug,&#xD;&#xA;        PartialEq,&#xD;&#xA;        Eq,&#xD;&#xA;        scale_info::TypeInfo,&#xD;&#xA;        ink::storage::traits::StorageLayout    // &lt;----- ! derive as so&#xD;&#xA;        )&#xD;&#xA;    )]&#xD;&#xA;    pub struct StakeholderData {&#xD;&#xA;        paid: Balance,&#xD;&#xA;        share: Balance,&#xD;&#xA;        pool: u8,&#xD;&#xA;    }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="25263" PostHistoryTypeId="5" PostId="6580" RevisionGUID="21f55513-ad4c-4e04-8813-510b0f972cdb" CreationDate="2023-01-05T01:41:46.737" UserId="83" Comment="fix readability" Text="It is possible to generate a child account that deducts its transaction fees from a parent account and is kept alive with its existential deposit (ED) provided in a parent account on behalf of the child account and where the child account remains alive until the parent account dies, so it is not necessary to make any deposit into the child account, and so the child account does not have to make any initial deposit, and so that child account can still receive an nft and assets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25264" PostHistoryTypeId="4" PostId="6580" RevisionGUID="21f55513-ad4c-4e04-8813-510b0f972cdb" CreationDate="2023-01-05T01:41:46.737" UserId="83" Comment="fix readability" Text="Create child account that relies on a parent account to maintain its existential deposit to stay alive and to pay all its fees" ContentLicense="CC BY-SA 4.0" />
  <row Id="25266" PostHistoryTypeId="2" PostId="6588" RevisionGUID="e3e5f98f-8c6c-4453-b418-9beb962d70fd" CreationDate="2023-01-05T03:18:06.537" UserId="3252" Text="1. What are the possible statuses of the nominator's account？&#xD;&#xA;2. The nominee's status is Retired，what is the status meaning? &#xD;&#xA;&#xD;&#xA;link:&#xD;&#xA;https://polkadot.subscan.io/nominator/148cJVXbMiv7kQnxUN7k9mAFdeLJv64JPehFT82CDuNHqbzb &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TZWFM.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25268" PostHistoryTypeId="1" PostId="6588" RevisionGUID="e3e5f98f-8c6c-4453-b418-9beb962d70fd" CreationDate="2023-01-05T03:18:06.537" UserId="3252" Text="What are the possible statuses of the nominator's account？" ContentLicense="CC BY-SA 4.0" />
  <row Id="25269" PostHistoryTypeId="3" PostId="6588" RevisionGUID="e3e5f98f-8c6c-4453-b418-9beb962d70fd" CreationDate="2023-01-05T03:18:06.537" UserId="3252" Text="|polkadot|minnominated|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25270" PostHistoryTypeId="2" PostId="6589" RevisionGUID="b5e55a37-8f15-45bc-84aa-2bf27e0527ae" CreationDate="2023-01-05T05:26:00.693" UserId="354" Text="You just need to change the flag `&quot;forceEra&quot;: &quot;NotForcing&quot;` to `&quot;forceEra&quot;: &quot;ForceNone&quot;` in `customSpec.json` and election will start on the relay chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="25272" PostHistoryTypeId="2" PostId="6590" RevisionGUID="8eb41f38-58f4-4e19-a6b2-b919b1b515bb" CreationDate="2023-01-05T09:49:23.650" UserId="371" Text="While calling a read only method on my ink contract, I get an error that looks like following&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Tb1TM.png&#xD;&#xA;&#xD;&#xA;On my contract, I have a check to throw an error like:&#xD;&#xA;```rust &#xD;&#xA;if paid &lt;= MIN_VESTING_AMOUNT{&#xD;&#xA;    return  Err(Error::VestingAmountTooLow);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However the error message that I have received on the client side doesn't exactly tell me what went wrong in the call. Instead it just gives a generic message ```ContractTrapped``` on every error on the contract.&#xD;&#xA;&#xD;&#xA;Is there a way to decode the actual error message?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25274" PostHistoryTypeId="1" PostId="6590" RevisionGUID="8eb41f38-58f4-4e19-a6b2-b919b1b515bb" CreationDate="2023-01-05T09:49:23.650" UserId="371" Text="How to decode error that occurred while calling a write method on ink contract, on the client side?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25275" PostHistoryTypeId="3" PostId="6590" RevisionGUID="8eb41f38-58f4-4e19-a6b2-b919b1b515bb" CreationDate="2023-01-05T09:49:23.650" UserId="371" Text="|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25276" PostHistoryTypeId="5" PostId="6580" RevisionGUID="10e2a9fc-5dfb-400c-bc5e-644049cf4eca" CreationDate="2023-01-05T09:54:36.763" UserId="83" Comment="make it clearer" Text="Is it possible to generate a child account where:&#xD;&#xA;* The child account transaction fees are deducted from a parent account&#xD;&#xA;* The child account is kept alive with its existential deposit (ED) provided in a parent account on behalf of the child account&#xD;&#xA;* The child account remains alive until the parent account dies&#xD;&#xA;* It is not necessary to make any deposit into the child account&#xD;&#xA;* It is not necessary for the child account to make any initial deposit&#xD;&#xA;* The child account can still receive an nft and assets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25277" PostHistoryTypeId="2" PostId="6591" RevisionGUID="6b35cbc5-0040-4282-b2c7-f618aaab1a70" CreationDate="2023-01-05T10:21:15.367" UserId="2762" Text="The posible [status][1] for Nominators are three:&#xD;&#xA;&#xD;&#xA; - **Active**: When at least one of your nominees are active, this nomination status will display as actively nominating&#xD;&#xA; - **Inactive**: A set of nominations will be inactive when none of those nominees are participating in the current validator set (the set of validators currently elected to validate the network).&#xD;&#xA; - **Waiting**: None of the nominees get into the active validator set this era. They may get into the active validator set in the future.&#xD;&#xA;&#xD;&#xA;*Example:*&#xD;&#xA;&#xD;&#xA;Suppose you have nominated five validator candidates, and three out of five were elected to the active validator set, then you should see two of your nominations as &quot;waiting&quot;, and most likely one as &quot;active&quot; and the rest as &quot;inactive&quot;. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The nominee's status is **Retired**，what is the status meaning?&#xD;&#xA;&#xD;&#xA;Retired is a tag from [subscan][2], I am not sure what means here. But you can check a couple of things to see the status of your account:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA; 1. Open the [Staking Dashboard][3] and see the status of your account there.&#xD;&#xA;2. Check the support article about [Why am I not receiving staking rewards?][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000169209-what-does-active-inactive-waiting-mean-&#xD;&#xA;  [2]: https://polkadot.subscan.io/nominator/148cJVXbMiv7kQnxUN7k9mAFdeLJv64JPehFT82CDuNHqbzb&#xD;&#xA;  [3]: https://staking.polkadot.network/#/nominate&#xD;&#xA;  [4]: https://support.polkadot.network/support/solutions/articles/65000170805" ContentLicense="CC BY-SA 4.0" />
  <row Id="25279" PostHistoryTypeId="50" PostId="6038" RevisionGUID="9616c070-db7b-4c5a-9419-72fde5995dec" CreationDate="2023-01-05T11:02:20.233" UserId="-1" />
  <row Id="25280" PostHistoryTypeId="2" PostId="6592" RevisionGUID="f92902c6-33c0-4235-9f59-2cec48eba5e5" CreationDate="2023-01-05T11:26:38.017" UserId="3327" Text="There is a very nice and structured way of writing unit test against a pallet. One can find  a lot of examples of unit tests as well.&#xD;&#xA;&#xD;&#xA;I will be thankful if any one can point me to some resources/samples of integration tests against pallets please.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25282" PostHistoryTypeId="1" PostId="6592" RevisionGUID="f92902c6-33c0-4235-9f59-2cec48eba5e5" CreationDate="2023-01-05T11:26:38.017" UserId="3327" Text="Integration tests for custom pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="25283" PostHistoryTypeId="3" PostId="6592" RevisionGUID="f92902c6-33c0-4235-9f59-2cec48eba5e5" CreationDate="2023-01-05T11:26:38.017" UserId="3327" Text="|pallet|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25284" PostHistoryTypeId="2" PostId="6593" RevisionGUID="51c98a51-19d9-4f41-8205-4a5153b4de6e" CreationDate="2023-01-05T11:35:52.477" UserId="73" Text="No, we provide no way to add a call that is not part of a pallet. However, writing a bare minimum pallet isn't that big :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="25286" PostHistoryTypeId="2" PostId="6594" RevisionGUID="c6b9c157-480b-4cc0-9a25-1dba6782e9cd" CreationDate="2023-01-05T12:44:46.723" UserId="140" Text="The reason for your parachain not producing blocks after registration with `rococo-staging` relaychain is the parameter [session_length_in_blocks](https://github.com/paritytech/polkadot/blob/c71e872afed296d1825b15ea4b2a74750c1ba647/node/service/src/chain_spec.rs#L1175). This parameter is set as `None` for `rococo-staging` and `Some(10)` for `rococo-local`. &#xD;&#xA;&#xD;&#xA;That's why when you register your parachain with `rococo-local`, you can see your parachain producing blocks in the next epoch after registration. You can verify its value `Developer &gt;&gt; Chain State &gt;&gt; Constants`. When you run with `rococo-local`, you will find its value as 10.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[session_length_in_blocks](https://github.com/paritytech/polkadot/blob/c71e872afed296d1825b15ea4b2a74750c1ba647/node/service/src/chain_spec.rs#L1175) sets epochDuration in pallet_babe.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When you run your chain with `rococo-staging`, you may find its value as `600` because it is set as None and picks default value.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I tried this scenario on my local and it worked. I followed below steps:&#xD;&#xA;&#xD;&#xA; 1. I changed [here][3] from `Live` to `Local`&#xD;&#xA; 2. Replaced with my validators and created chain-spec with `rococo-staging`.&#xD;&#xA; 3. Started relaychain with raw chain spec&#xD;&#xA; 4. On parachain-side, I replaced `rococo-local` with `rococo-staging` in chain-spec. Started parachain with raw chain spec.&#xD;&#xA; 5. For staring relaychain, parachain and parachain registration, I followed all steps, which are mentioned in this [tutorial][4]. &#xD;&#xA; 6. After registration, it was just showing as `onboarding`&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA; 7. I waited for `600` blocks.&#xD;&#xA;&#xD;&#xA; 8. After `600` blocks, it started onboarding `successfully. &#xD;&#xA;&#xD;&#xA;[![enter image description here][6]][6]&#xD;&#xA;&#xD;&#xA;As you can see in my screenshot, onboarding will complete in around 1 hour after it starts. I can see my parachain producing blocks with `rococo-staging`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][7]][7]&#xD;&#xA;&#xD;&#xA;With default parameters, you have to wait. You are free to update values in your runtime for testing.&#xD;&#xA;&#xD;&#xA;If this works for you, please mark this answer as acceptable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lHv9W.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6zQqd.png&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/v0.9.32/node/service/src/chain_spec.rs#L1172&#xD;&#xA;  [4]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/prepare-a-local-relay-chain/&#xD;&#xA;  [5]: https://i.stack.imgur.com/Egmp7.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/gytdg.png&#xD;&#xA;  [7]: https://i.stack.imgur.com/bQebW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25288" PostHistoryTypeId="5" PostId="5024" RevisionGUID="c7f99f0f-331e-4394-ae1c-548edd3a5715" CreationDate="2023-01-05T13:07:41.253" UserId="298" Comment="added 138 characters in body" Text="I am following the guide in [polkadot-js/typegen][1], the github source is shared. I am trying to follow along and decorate the api for my custom node-template called [supersig-template][2]&#xD;&#xA;&#xD;&#xA;I have successfully created an output of the metadata:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:&quot;1&quot;, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getMetadata&quot;, &quot;params&quot;:[]}' http://localhost:9933 &gt; supersig-template.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but i am not very clearly in the github source where i should be running `yarn build`. I try in the root of forking [/docs][3] repo. But I dont think that is the correct place.&#xD;&#xA;&#xD;&#xA;Then i went into `/docs/api/examples/promise/typegen` separated it into its own repo, changed package json to include `--endpoint ./supersig-template.json` then ran `yarn build` and got this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;typegen % yarn build&#xD;&#xA;yarn run v1.22.19&#xD;&#xA;$ yarn generate:defs &amp;&amp; yarn generate:meta&#xD;&#xA;$ ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package sample-polkadotjs-typegen/interfaces --input /src/interfaces --endpoint /Users/ramsey/decentration/typegen/supersig-template.json&#xD;&#xA;Options:&#xD;&#xA;  --help     Show help                                                 [boolean]&#xD;&#xA;  --version  Show version number                                       [boolean]&#xD;&#xA;  --input    The directory to use for the user definitions   [string] [required]&#xD;&#xA;  --package  The package name &amp; path to use for the user types&#xD;&#xA;                                                             [string] [required]&#xD;&#xA;&#xD;&#xA;Unknown argument: endpoint&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;a few questions:&#xD;&#xA;&#xD;&#xA;- is typegen still up to date and something that can be used to decorate APIs?&#xD;&#xA;- has endpoint been removed as an argument?&#xD;&#xA;- am i going about thing the correct way to decorate the api?&#xD;&#xA;&#xD;&#xA;**Solution: Make sure to bump the version of both polkadot/api and polkadot/typegen to ^8.13.1 and it will `yarn build` successfully.**&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/typegen&#xD;&#xA;  [2]: https://github.com/decentration/substrate-supersig-template&#xD;&#xA;  [3]: https://github.com/polkadot-js/docs" ContentLicense="CC BY-SA 4.0" />
  <row Id="25289" PostHistoryTypeId="5" PostId="5024" RevisionGUID="28eed912-792d-46a9-9172-50040050cc4c" CreationDate="2023-01-05T13:23:37.900" UserId="298" Comment="added 28 characters in body" Text="I am following the guide in [polkadot-js/typegen][1], the github source is shared. I am trying to follow along and decorate the api for my custom node-template called [supersig-template][2]&#xD;&#xA;&#xD;&#xA;I have successfully created an output of the metadata:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:&quot;1&quot;, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getMetadata&quot;, &quot;params&quot;:[]}' http://localhost:9933 &gt; supersig-template.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but i am not very clearly in the github source where i should be running `yarn build`. I try in the root of forking [/docs][3] repo. But I dont think that is the correct place.&#xD;&#xA;&#xD;&#xA;Then i went into `/docs/api/examples/promise/typegen` separated it into its own repo, changed package json to include `--endpoint ./supersig-template.json` then ran `yarn build` and got this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;typegen % yarn build&#xD;&#xA;yarn run v1.22.19&#xD;&#xA;$ yarn generate:defs &amp;&amp; yarn generate:meta&#xD;&#xA;$ ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package sample-polkadotjs-typegen/interfaces --input /src/interfaces --endpoint /Users/ramsey/decentration/typegen/supersig-template.json&#xD;&#xA;Options:&#xD;&#xA;  --help     Show help                                                 [boolean]&#xD;&#xA;  --version  Show version number                                       [boolean]&#xD;&#xA;  --input    The directory to use for the user definitions   [string] [required]&#xD;&#xA;  --package  The package name &amp; path to use for the user types&#xD;&#xA;                                                             [string] [required]&#xD;&#xA;&#xD;&#xA;Unknown argument: endpoint&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;a few questions:&#xD;&#xA;&#xD;&#xA;- is typegen still up to date and something that can be used to decorate APIs?&#xD;&#xA;- has endpoint been removed as an argument?&#xD;&#xA;- am i going about thing the correct way to decorate the api?&#xD;&#xA;&#xD;&#xA;**Solution to &quot;unknown endpoint&quot; issue: Make sure to bump the version of both polkadot/api and polkadot/typegen to ^8.13.1 and it will `yarn build` successfully.**&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/typegen&#xD;&#xA;  [2]: https://github.com/decentration/substrate-supersig-template&#xD;&#xA;  [3]: https://github.com/polkadot-js/docs" ContentLicense="CC BY-SA 4.0" />
  <row Id="25290" PostHistoryTypeId="2" PostId="6595" RevisionGUID="372be227-3404-47e1-9963-3474c4b10878" CreationDate="2023-01-05T13:25:50.287" UserId="2762" Text="I am trying to build the Frontier Node Template from this [code][1] or from the [Frontier repository][2].&#xD;&#xA;&#xD;&#xA;But when running the `cargo build --release` I am getting the following error:&#xD;&#xA;&#xD;&#xA;     error: non-defining opaque type use in defining scope&#xD;&#xA;     --&gt; /Users/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/evm-0.37.0/src/executor/stack/memory.rs:570:3&#xD;&#xA;        |&#xD;&#xA;    570 |         self.substate.deconstruct(self.backend)&#xD;&#xA;        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'config` is part of concrete type but not used in parameter list of the `impl Trait` type alias&#xD;&#xA;&#xD;&#xA;      Compiling sp-application-crypto v7.0.0 (https://github.com/paritytech/substrate?branch=master#6376f13a)&#xD;&#xA;      error: could not compile `evm` due to previous error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/frontier-node-template/&#xD;&#xA;  [2]: https://github.com/paritytech/frontier/tree/master/template" ContentLicense="CC BY-SA 4.0" />
  <row Id="25292" PostHistoryTypeId="1" PostId="6595" RevisionGUID="372be227-3404-47e1-9963-3474c4b10878" CreationDate="2023-01-05T13:25:50.287" UserId="2762" Text="Error building frontier-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="25293" PostHistoryTypeId="3" PostId="6595" RevisionGUID="372be227-3404-47e1-9963-3474c4b10878" CreationDate="2023-01-05T13:25:50.287" UserId="2762" Text="|frontier|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25298" PostHistoryTypeId="50" PostId="3974" RevisionGUID="f51381b6-5153-4ce1-9f76-1d0c387a9a7e" CreationDate="2023-01-05T15:05:25.677" UserId="-1" />
  <row Id="25299" PostHistoryTypeId="2" PostId="6597" RevisionGUID="07d48922-d6d8-460c-9eff-5177c2bdfc43" CreationDate="2023-01-05T15:59:18.440" UserId="529" Text="Your error is coming from one of the pallets. You can tell that since it has `Module` which is an enum from [DispatchError][1].&#xD;&#xA;&#xD;&#xA;    Module {&#xD;&#xA;        index: 20,&#xD;&#xA;        error: 0x0b&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; - Index 20 is pointing to the concerned pallet on the node you are using.&#xD;&#xA;Go to `runtime/src/lib.rs` of the node you are using to find `construct_runtime!` macro and check which pallet has index 20. It can be assigned number or just count pallets until you come to pallet on position 20. Start counting with 0. &#xD;&#xA;&#xD;&#xA; - To find error 0x0b, you need to go to the `lib.rs` of the pallet (with index 20) and again find the error on position 11 (0xb). Start with index=0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/dispatch/enum.DispatchError.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="25301" PostHistoryTypeId="5" PostId="6597" RevisionGUID="e726be20-c2be-4ff8-bc4b-69124b693942" CreationDate="2023-01-05T16:07:58.093" UserId="529" Comment="added unit test example" Text="Your error is coming from one of the pallets. You can tell that since it has `Module` which is an enum from [DispatchError][1].&#xD;&#xA;&#xD;&#xA;    Module {&#xD;&#xA;        index: 20,&#xD;&#xA;        error: 0x0b&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA; - Index 20 is pointing to the concerned pallet on the node you are using.&#xD;&#xA;Go to `runtime/src/lib.rs` of the node you are using to find `construct_runtime!` macro and check which pallet has index 20. It can be assigned number or just count pallets until you come to pallet on position 20. Start counting with 0. &#xD;&#xA;&#xD;&#xA; - To find error 0x0b, you need to go to the `lib.rs` of the pallet (with index 20) and again find the error on position 11 (0xb). Start with index=0.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/dispatch/enum.DispatchError.html&#xD;&#xA;&#xD;&#xA;However if this error is from pallet-contracts the easiest way to find the error is from your unit test like this:&#xD;&#xA;&#xD;&#xA;    let r = contract.my_function();&#xD;&#xA;    println!(&quot;result {:?}&quot;, r);&#xD;&#xA;&#xD;&#xA;or wrap it in assert!&#xD;&#xA;&#xD;&#xA;    assert_eq!(contract.my_function(), expected_result);&#xD;&#xA;&#xD;&#xA;Using polkadot.js to debug your contract is not very helpful.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25302" PostHistoryTypeId="2" PostId="6598" RevisionGUID="b0e20c98-d174-4d22-b667-7ec16a60435d" CreationDate="2023-01-05T16:50:10.613" UserId="1795" Text="I have seen primitives around Merkle Trees and Merkle Proofs a bit everywhere across the Substrate, Polkadot, and Smoldot repos. I was wondering what the right choice would be for the following use case:&#xD;&#xA;&#xD;&#xA;&gt; At the end of each block, read from a storage map in a pallet a series&#xD;&#xA;&gt; of values, and for each of them generate a **fresh** Merkle Root (no&#xD;&#xA;&gt; information on previous roots is stored anywhere) and deposit an event&#xD;&#xA;&gt; with the value identifier and the new Merkle Root. What about&#xD;&#xA;&gt; verifying this proof with access only to the Merkle root, the proof&#xD;&#xA;&gt; itself, and the revealed leaves?&#xD;&#xA;&#xD;&#xA;So far, I've found in the `sp_trie::{generate_trie_proof, verify_trie_proof}` the best candidate, but I have seen Merkle stuff also in the beefy pallet, the mmr-pallet does something similar, and Smoldot has also support for Merkle proof generation and verification." ContentLicense="CC BY-SA 4.0" />
  <row Id="25304" PostHistoryTypeId="1" PostId="6598" RevisionGUID="b0e20c98-d174-4d22-b667-7ec16a60435d" CreationDate="2023-01-05T16:50:10.613" UserId="1795" Text="What Merkle Tree crate to use inside the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25305" PostHistoryTypeId="3" PostId="6598" RevisionGUID="b0e20c98-d174-4d22-b667-7ec16a60435d" CreationDate="2023-01-05T16:50:10.613" UserId="1795" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25306" PostHistoryTypeId="2" PostId="6599" RevisionGUID="882786af-38eb-4192-ab97-6e9c0a07a799" CreationDate="2023-01-05T17:10:14.670" UserId="28" Text="Rather than using a storage map, you should use a child trie, which automatically tracks the storage root of the data inside of it.&#xD;&#xA;&#xD;&#xA;The DevEx around child tries are not really developed yet, but it should be perfectly usable via the raw APIs.&#xD;&#xA;&#xD;&#xA;You can see an example in the Crowdloan pallet: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/crowdloan/mod.rs#L684&#xD;&#xA;&#xD;&#xA;Full API docs here: https://crates.parity.io/frame_support/storage/child/index.html&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25309" PostHistoryTypeId="2" PostId="6600" RevisionGUID="4e49c480-3327-4ce2-b98c-a0cca6dc65c8" CreationDate="2023-01-05T22:36:04.563" UserId="549" Text="You can create a Phat Contract that pulls data from whatever HTTPS endpoint to gather price feed data. We have a workshop here to show the capabilities as Phala’s Phat Contracts run in our Secure Enclave offchain workers and can create ACID txs with the offchain rollup pallet which you can integrate into your runtime for your substrate solo chain. &#xD;&#xA;&#xD;&#xA;Check the details here: https://github.com/Phala-Network/phat-offchain-rollup/blob/main/phat/Sub0-Workshop.md&#xD;&#xA;&#xD;&#xA;Let me know if you have any questions." ContentLicense="CC BY-SA 4.0" />
  <row Id="25311" PostHistoryTypeId="2" PostId="6601" RevisionGUID="6879d7e2-82b7-4f64-8e13-f49d2926c727" CreationDate="2023-01-05T23:14:03.573" UserId="351" Text="        let signer = PairSigner::&lt;PolkadotConfig,Pair&gt;::new(AccountKeyring::Alice.pair());&#xD;&#xA;This code cannot compile due to `AccountKeyring::Alice.pair()` returns `sp_core::sr25519::Pair` while `new` method accepts types  which implement `subxt::ext::sp_core::Pair` type.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25313" PostHistoryTypeId="1" PostId="6601" RevisionGUID="6879d7e2-82b7-4f64-8e13-f49d2926c727" CreationDate="2023-01-05T23:14:03.573" UserId="351" Text="PairSigner does not work in Subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="25314" PostHistoryTypeId="3" PostId="6601" RevisionGUID="6879d7e2-82b7-4f64-8e13-f49d2926c727" CreationDate="2023-01-05T23:14:03.573" UserId="351" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25315" PostHistoryTypeId="2" PostId="6602" RevisionGUID="aa014644-7bad-4f12-b6cc-bbdca24e6941" CreationDate="2023-01-06T01:12:44.687" UserId="590" Text="My rust is limited, I would like to simplify some of my code, and it would be helpful if I could have a caching function to cache database reads in memory.&#xD;&#xA;&#xD;&#xA;Are there any helpers that I can use for this? Can you please give me some advice on how I can do this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn get_from_cache_or_read() -&gt; MyStorageItem {&#xD;&#xA;   // Some logic here that would check if a cache item exist&#xD;&#xA;   // Or make a call to the database&#xD;&#xA;&#xD;&#xA;   MyStorage::&lt;T&gt;::get()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="25317" PostHistoryTypeId="1" PostId="6602" RevisionGUID="aa014644-7bad-4f12-b6cc-bbdca24e6941" CreationDate="2023-01-06T01:12:44.687" UserId="590" Text="Caching functions" ContentLicense="CC BY-SA 4.0" />
  <row Id="25318" PostHistoryTypeId="3" PostId="6602" RevisionGUID="aa014644-7bad-4f12-b6cc-bbdca24e6941" CreationDate="2023-01-06T01:12:44.687" UserId="590" Text="|pallet|runtime|database|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25319" PostHistoryTypeId="2" PostId="6603" RevisionGUID="3648af24-a06c-4b64-962b-ee7a43e84892" CreationDate="2023-01-06T01:31:20.937" UserId="3680" Text="I understand that allocating a collator node to each chain w/a Parachain slot per era is overkill from a trust perspective. However, from a developer's perspective, it would reduce a noticeable amount of friction in launching a chain w/ Substrate.&#xD;&#xA;&#xD;&#xA;If we're trying to reduce the friction required in launching chains on Polkadot, what would be the downside in allocating a single node as a collator to each parachain per era? This would allow chains to be launched w/ a trusted collator node, reduce the hassle of having to learn the networking stack related to collators for a chain that you're launching, and also streamline tokenomics for chains that reimburse collators for their job on the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="25321" PostHistoryTypeId="1" PostId="6603" RevisionGUID="3648af24-a06c-4b64-962b-ee7a43e84892" CreationDate="2023-01-06T01:31:20.937" UserId="3680" Text="Inclusion of Collator In Parachain Lease" ContentLicense="CC BY-SA 4.0" />
  <row Id="25322" PostHistoryTypeId="3" PostId="6603" RevisionGUID="3648af24-a06c-4b64-962b-ee7a43e84892" CreationDate="2023-01-06T01:31:20.937" UserId="3680" Text="|polkadot|parachain-collator|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25323" PostHistoryTypeId="5" PostId="655" RevisionGUID="cd2fb48b-02aa-4faa-94dd-096c78ceffa8" CreationDate="2023-01-06T01:58:37.793" UserId="651" Comment="Update the use of `Origin` to be `RuntimeOrigin` instead" Text="If this is for tests, have you tried using:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;RuntimeOrigin::root()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Example here:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert_ok!(Balances::set_balance(RuntimeOrigin::root(), 1, 1_000, 0));&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/frame/balances/src/tests.rs#L828" ContentLicense="CC BY-SA 4.0" />
  <row Id="25324" PostHistoryTypeId="24" PostId="655" RevisionGUID="cd2fb48b-02aa-4faa-94dd-096c78ceffa8" CreationDate="2023-01-06T01:58:37.793" Comment="Proposed by 651 approved by 34 edit id of 364" ContentLicense="CC BY-SA 4.0" />
  <row Id="25325" PostHistoryTypeId="5" PostId="6603" RevisionGUID="a189a8c4-6208-4910-b13e-37532ede60ca" CreationDate="2023-01-06T02:04:43.883" UserId="3680" Comment="deleted 2 characters in body" Text="I understand that allocating a collator node (or a few) to each chain w/a Parachain slot per era is overkill from a trust perspective. However, from a developer's perspective, it would reduce a noticeable amount of friction in launching a chain w/ Substrate.&#xD;&#xA;&#xD;&#xA;If we're trying to reduce the friction required in launching chains on Polkadot, what would be the downside in allocating collator nodes to each parachain per era? This would allow chains to be launched w/ a trusted collator node, reduce the hassle of having to learn the networking stack related to collators for a chain that you're launching, and also streamline tokenomics for chains that reimburse collators for their job on the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="25328" PostHistoryTypeId="2" PostId="6605" RevisionGUID="536ce3be-239c-4f2d-b5ff-dfc326a99013" CreationDate="2023-01-06T04:12:36.067" UserId="3166" Text="I am trying to implement smoldot @substrate-connect light client to my DApp using chain specs of a substrate-based parachain. [Substrate connect extension][1] is able to discover the parachain as it shows the current block and keeps on syncing but I do not get apiPromise needed to make rpc request. The bootnodes I am using in my chainspecs is publically accessible as I can make RPC calls using curl but the issue is I cannot get apiPromise as suggested by [substrate_connect][2] npm package. Can anybody point me toward possible issues...&#xD;&#xA;&#xD;&#xA;    import chainSpecs from '../parachain.json';&#xD;&#xA;    import { ScProvider } from '@polkadot/rpc-provider/substrate-connect';&#xD;&#xA;    import { ApiPromise } from '@polkadot/api';&#xD;&#xA;    import { WellKnownChain } from '@substrate/connect';&#xD;&#xA;&#xD;&#xA;    const getPolkadotApi = async () =&gt; {&#xD;&#xA;    try {&#xD;&#xA;        const relayProvider = new ScProvider(JSON.stringify(relayChainSpecs));&#xD;&#xA;        await relayProvider.connect();&#xD;&#xA;&#xD;&#xA;        const stringifyChainSpec = JSON.stringify(chainSpecs);&#xD;&#xA;        const provider = new ScProvider(stringifyChainSpec, relayProvider);&#xD;&#xA;&#xD;&#xA;        console.log('waiting for connection');&#xD;&#xA;        await provider.connect();&#xD;&#xA;        console.log('check, provider);&#xD;&#xA;        const _api = await ApiPromise.create({ provider });&#xD;&#xA;        console.log(`Connected to ${POLKADOT_RPC_URL},API is ${_api}`);&#xD;&#xA;        return _api;&#xD;&#xA;    } catch (err) {&#xD;&#xA;        console.log('this is the error', err);&#xD;&#xA;        return null;&#xD;&#xA;    }&#xD;&#xA;    };&#xD;&#xA;    output:&#xD;&#xA;    waiting for connection&#xD;&#xA;    polkadot.js:42 checkkk ScProvider {...}&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://chrome.google.com/webstore/detail/substrate-connect-extensi/khccbhhbocaaklceanjginbdheafklai?hl=en-GB&#xD;&#xA;  [2]: https://www.npmjs.com/package/@substrate/connect" ContentLicense="CC BY-SA 4.0" />
  <row Id="25330" PostHistoryTypeId="1" PostId="6605" RevisionGUID="536ce3be-239c-4f2d-b5ff-dfc326a99013" CreationDate="2023-01-06T04:12:36.067" UserId="3166" Text="Substrate based parachain light client seems to gets connected but ApiPromise is not returned" ContentLicense="CC BY-SA 4.0" />
  <row Id="25331" PostHistoryTypeId="3" PostId="6605" RevisionGUID="536ce3be-239c-4f2d-b5ff-dfc326a99013" CreationDate="2023-01-06T04:12:36.067" UserId="3166" Text="|polkadot|parachain|light-client|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25332" PostHistoryTypeId="2" PostId="6606" RevisionGUID="20ab1951-8c82-4a57-ad43-18326ee916f8" CreationDate="2023-01-06T06:48:57.020" UserId="3682" Text="Uncaught NodeError Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './cjs/packageInfo' is not defined by &quot;exports&quot; in node_modules/@polkadot/networks/package.json&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25334" PostHistoryTypeId="1" PostId="6606" RevisionGUID="20ab1951-8c82-4a57-ad43-18326ee916f8" CreationDate="2023-01-06T06:48:57.020" UserId="3682" Text="Updated version of @polkadot/api throws uncaught node error" ContentLicense="CC BY-SA 4.0" />
  <row Id="25335" PostHistoryTypeId="3" PostId="6606" RevisionGUID="20ab1951-8c82-4a57-ad43-18326ee916f8" CreationDate="2023-01-06T06:48:57.020" UserId="3682" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25337" PostHistoryTypeId="2" PostId="6607" RevisionGUID="97414212-c850-4349-bb57-423e9f19f594" CreationDate="2023-01-06T08:59:32.053" UserId="85" Text="https://github.com/paritytech/parachains-integration-tests has tests that are geared up to XCM integration testing, and I hear that https://github.com/paritytech/zombienet also can run integration tests itself. There are also a few good recent talks at sub0 that are relevant: [How to sleep at night][1] and [Centrifuge: FUDGE - Integration Tests for Substrate][2] and [Acala's chopsticks framework][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://youtu.be/a_u3KMG-n-I&#xD;&#xA;  [2]: https://www.youtube.com/watch?v=u-hAMK6ySXU&amp;list=PLOyWqupZ-WGvywLqJDsMIYdCn8QEa2ShQ&amp;index=4&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=IJqbO45DVIA" ContentLicense="CC BY-SA 4.0" />
  <row Id="25339" PostHistoryTypeId="2" PostId="6608" RevisionGUID="f55fc0c4-57ba-4cf7-885e-9db1a1faea15" CreationDate="2023-01-06T09:02:26.007" UserId="474" Text="ext::sp_core::Pair is just a re export of the sp_core one, so I suspect you're importing a version of sp_keyring yourself that pulls in a different version of sp_core and trying to use the AccountKeyring from that?&#xD;&#xA;&#xD;&#xA;Your options at the moment are to make sure you're using sp_keyring 7.0.0, or to do something like manually convert the Pair you get back into the Pair that sp_core 7.0.0 exposes and then pass that in to PairSigner.&#xD;&#xA;&#xD;&#xA;There are issues updating Subxt to the latest substrate versions at the moment as a change there broke WASM compat, but I am working on it. That said, now that substrate crates are updating weekly, you may more frequently bump into this sort of version mismatch issue if you keep up to date with the latest substrate crates every week and Subxt has fallen behind." ContentLicense="CC BY-SA 4.0" />
  <row Id="25341" PostHistoryTypeId="5" PostId="6606" RevisionGUID="8a39100c-8c35-4fcb-bab6-b3eba20b9f09" CreationDate="2023-01-06T09:29:29.870" UserId="3682" Comment="added 3962 characters in body" Text="Upgraded @polkadot/api from version 6 to version 9&#xD;&#xA;&#xD;&#xA;Uncaught NodeError Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './cjs/packageInfo' is not defined by &quot;exports&quot; in node_modules/@polkadot/networks/package.json&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;{&#xD;&#xA;  &quot;_from&quot;: &quot;@polkadot/networks@10.2.1&quot;,&#xD;&#xA;  &quot;_id&quot;: &quot;@polkadot/networks@10.2.1&quot;,&#xD;&#xA;  &quot;_inBundle&quot;: false,&#xD;&#xA;  &quot;_integrity&quot;: &quot;sha512-cDZIY4jBo2tlDdSXNbECpuWer0NWlPcJNhHHveTiu2idje2QyIBNxBlAPViNGpz+ScAR0EknEzmQKuHOcSKxzg==&quot;,&#xD;&#xA;  &quot;_location&quot;: &quot;/@polkadot/networks&quot;,&#xD;&#xA;  &quot;_phantomChildren&quot;: {},&#xD;&#xA;  &quot;_requested&quot;: {&#xD;&#xA;    &quot;type&quot;: &quot;version&quot;,&#xD;&#xA;    &quot;registry&quot;: true,&#xD;&#xA;    &quot;raw&quot;: &quot;@polkadot/networks@10.2.1&quot;,&#xD;&#xA;    &quot;name&quot;: &quot;@polkadot/networks&quot;,&#xD;&#xA;    &quot;escapedName&quot;: &quot;@polkadot%2fnetworks&quot;,&#xD;&#xA;    &quot;scope&quot;: &quot;@polkadot&quot;,&#xD;&#xA;    &quot;rawSpec&quot;: &quot;10.2.1&quot;,&#xD;&#xA;    &quot;saveSpec&quot;: null,&#xD;&#xA;    &quot;fetchSpec&quot;: &quot;10.2.1&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;_requiredBy&quot;: [&#xD;&#xA;    &quot;/@polkadot/types-known&quot;,&#xD;&#xA;    &quot;/@polkadot/util-crypto&quot;&#xD;&#xA;  ],&#xD;&#xA;  &quot;_resolved&quot;: &quot;https://registry.npmjs.org/@polkadot/networks/-/networks-10.2.1.tgz&quot;,&#xD;&#xA;  &quot;_shasum&quot;: &quot;5095011795afa20291ef3e34a2ad38ed2c63fe09&quot;,&#xD;&#xA;  &quot;_spec&quot;: &quot;@polkadot/networks@10.2.1&quot;,&#xD;&#xA;  &quot;_where&quot;: &quot;/home/charvik/codes/lcx-wallets-v2/node_modules/@polkadot/util-crypto&quot;,&#xD;&#xA;  &quot;author&quot;: {&#xD;&#xA;    &quot;name&quot;: &quot;Jaco Greeff&quot;,&#xD;&#xA;    &quot;email&quot;: &quot;jacogr@gmail.com&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;bugs&quot;: {&#xD;&#xA;    &quot;url&quot;: &quot;https://github.com/polkadot-js/common/issues&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;bundleDependencies&quot;: false,&#xD;&#xA;  &quot;contributors&quot;: [],&#xD;&#xA;  &quot;dependencies&quot;: {&#xD;&#xA;    &quot;@babel/runtime&quot;: &quot;^7.20.6&quot;,&#xD;&#xA;    &quot;@polkadot/util&quot;: &quot;10.2.1&quot;,&#xD;&#xA;    &quot;@substrate/ss58-registry&quot;: &quot;^1.35.0&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;deprecated&quot;: false,&#xD;&#xA;  &quot;description&quot;: &quot;A list of all available Substrate networks and their applicable prefixes&quot;,&#xD;&#xA;  &quot;engines&quot;: {&#xD;&#xA;    &quot;node&quot;: &quot;&gt;=14.0.0&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;exports&quot;: {&#xD;&#xA;    &quot;./cjs/package.json&quot;: &quot;./cjs/package.json&quot;,&#xD;&#xA;    &quot;./cjs/*&quot;: &quot;./cjs/*.js&quot;,&#xD;&#xA;    &quot;.&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./index.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/index.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./index.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./defaults&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./defaults/index.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/defaults/index.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./defaults/index.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./defaults/genesis&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./defaults/genesis.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/defaults/genesis.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./defaults/genesis.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./defaults/icons&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./defaults/icons.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/defaults/icons.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./defaults/icons.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./defaults/ledger&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./defaults/ledger.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/defaults/ledger.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./defaults/ledger.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./defaults/testnets&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./defaults/testnets.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/defaults/testnets.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./defaults/testnets.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./detectOther&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./detectOther.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/detectOther.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./detectOther.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./detectPackage&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./detectPackage.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/detectPackage.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./detectPackage.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./interfaces&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./interfaces.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/interfaces.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./interfaces.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./package.json&quot;: &quot;./package.json&quot;,&#xD;&#xA;    &quot;./packageInfo.js&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./packageInfo.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/packageInfo.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./packageInfo.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./packageInfo&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./packageInfo.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/packageInfo.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./packageInfo.js&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;./types&quot;: {&#xD;&#xA;      &quot;types&quot;: &quot;./types.d.ts&quot;,&#xD;&#xA;      &quot;require&quot;: &quot;./cjs/types.js&quot;,&#xD;&#xA;      &quot;default&quot;: &quot;./types.js&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;homepage&quot;: &quot;https://github.com/polkadot-js/common/tree/master/packages/networks#readme&quot;,&#xD;&#xA;  &quot;license&quot;: &quot;Apache-2.0&quot;,&#xD;&#xA;  &quot;main&quot;: &quot;./cjs/index.js&quot;,&#xD;&#xA;  &quot;maintainers&quot;: [],&#xD;&#xA;  &quot;module&quot;: &quot;./index.js&quot;,&#xD;&#xA;  &quot;name&quot;: &quot;@polkadot/networks&quot;,&#xD;&#xA;  &quot;repository&quot;: {&#xD;&#xA;    &quot;directory&quot;: &quot;packages/networks&quot;,&#xD;&#xA;    &quot;type&quot;: &quot;git&quot;,&#xD;&#xA;    &quot;url&quot;: &quot;git+https://github.com/polkadot-js/common.git&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;sideEffects&quot;: false,&#xD;&#xA;  &quot;type&quot;: &quot;module&quot;,&#xD;&#xA;  &quot;types&quot;: &quot;./index.d.ts&quot;,&#xD;&#xA;  &quot;version&quot;: &quot;10.2.1&quot;&#xD;&#xA;}&#xD;&#xA;````&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25343" PostHistoryTypeId="2" PostId="6609" RevisionGUID="30465d18-ef6a-48a9-9d63-c45a71c77cdd" CreationDate="2023-01-06T10:43:46.060" UserId="458" Text="I want to send some extra information (&quot;Call&quot;) with the `TransferReserveAsset` Message. As it has an extra field called xcm:-&#xD;&#xA;&#xD;&#xA;    TransferReserveAsset { assets: MultiAssets, dest: MultiLocation, xcm: Xcm&lt;()&gt; }&#xD;&#xA;&#xD;&#xA;But `reserve_transfer_assets` extrinsic function in `pallet-xcm` doesn't take that as an argument. &#xD;&#xA;&#xD;&#xA;So is there any way I can send a `TransferReserveAsset` Message with an extra XCM Message from relay-chain to Parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25345" PostHistoryTypeId="1" PostId="6609" RevisionGUID="30465d18-ef6a-48a9-9d63-c45a71c77cdd" CreationDate="2023-01-06T10:43:46.060" UserId="458" Text="I want to send Transact XCM Message with TransferReserveAsset XCM Message from Relay Chain to Parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="25346" PostHistoryTypeId="3" PostId="6609" RevisionGUID="30465d18-ef6a-48a9-9d63-c45a71c77cdd" CreationDate="2023-01-06T10:43:46.060" UserId="458" Text="|parachain|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25347" PostHistoryTypeId="2" PostId="6610" RevisionGUID="3a084b54-b6c9-448c-bf99-1a81389c751e" CreationDate="2023-01-06T11:22:26.693" UserId="555" Text="Can we make browser extension with substrate and yes and how ? &#xD;&#xA;&#xD;&#xA;can anyone please provide the resource to read about it ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25349" PostHistoryTypeId="1" PostId="6610" RevisionGUID="3a084b54-b6c9-448c-bf99-1a81389c751e" CreationDate="2023-01-06T11:22:26.693" UserId="555" Text="How to build the browser extension with substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25350" PostHistoryTypeId="3" PostId="6610" RevisionGUID="3a084b54-b6c9-448c-bf99-1a81389c751e" CreationDate="2023-01-06T11:22:26.693" UserId="555" Text="|substrate-node-template|rpc|signed-extensions|browser-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25351" PostHistoryTypeId="2" PostId="6611" RevisionGUID="f6d5df5b-8b42-4374-9d95-072429751241" CreationDate="2023-01-06T11:34:13.833" UserId="94" Text="Reads are already cached. Calling `MyStorage::&lt;T&gt;::get()` twice will only incur one DB read.  &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25353" PostHistoryTypeId="2" PostId="6612" RevisionGUID="4663049a-758a-4e81-b7da-dcb70d8dc941" CreationDate="2023-01-06T12:51:27.687" UserId="3667" Text="So there are 4 reasons listed on `ExistenceReason` for an Asset account namely: &#xD;&#xA;1. Consumer, &#xD;&#xA;2. Sufficient, &#xD;&#xA;3. DepositHeld, &#xD;&#xA;4. DepositRefunded&#xD;&#xA;&#xD;&#xA;Usually minting an asset would use the `Consumer` reason. I'd like to create one using the `DepositHeld` reason, how can I achieve that using PolkadotJS? Also, bonus question, why is `DepositRefunded` a reason for asset account existence? " ContentLicense="CC BY-SA 4.0" />
  <row Id="25355" PostHistoryTypeId="1" PostId="6612" RevisionGUID="4663049a-758a-4e81-b7da-dcb70d8dc941" CreationDate="2023-01-06T12:51:27.687" UserId="3667" Text="How do I create an Asset account using polkadot JS with a reason other than Consumer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25356" PostHistoryTypeId="3" PostId="6612" RevisionGUID="4663049a-758a-4e81-b7da-dcb70d8dc941" CreationDate="2023-01-06T12:51:27.687" UserId="3667" Text="|assets|accountdata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25357" PostHistoryTypeId="2" PostId="6613" RevisionGUID="c4f1f2c4-7730-420c-9fb4-c69ac73f40a9" CreationDate="2023-01-06T13:05:56.243" UserId="3667" Text="So there's a function called `touch()` in pallet assets which will allow you to reserve the deposit `AssetAccountDeposit` in the runtime config, with the reason of `DepositHeld(..)`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="25359" PostHistoryTypeId="5" PostId="6613" RevisionGUID="0927829f-9256-4daf-b0c1-14a3d88c8916" CreationDate="2023-01-06T13:13:15.560" UserId="3667" Comment="added 176 characters in body" Text="So there's a function called `touch()` in pallet assets which will allow you to reserve the deposit `AssetAccountDeposit` in the runtime config, with the reason of `DepositHeld(..)`. &#xD;&#xA;&#xD;&#xA;For sufficient reason, the asset must be created with `is_sufficient` = true. Currently, I did not find polkadot-js to support setting this parameter during asset minting. " ContentLicense="CC BY-SA 4.0" />
  <row Id="25361" PostHistoryTypeId="2" PostId="6614" RevisionGUID="a1295aae-d7ad-4779-a63f-f9f761e892d2" CreationDate="2023-01-06T14:05:02.933" UserId="298" Text="In the [Custom RPC types][1] docs it explains *how* to create the types within the API promise, but it doesn't explain *where* to add it within the polkadot-js/apps repo, which is understandable because the docs are not specifically for adding to the apps repo. However, it would be useful and helpful to get guidance on it, because the repo is spectacular but also occasionally overwhelming. &#xD;&#xA;&#xD;&#xA;Up to this point, I have decorated rpc methods and added it to `typeBundle.ts`, but it still not available as an `api.rpc.&lt;firstModule&gt;.&lt;secondModule&gt;` call, like the screenshot below.&#xD;&#xA;&#xD;&#xA;Apart from typesBundle.ts, where do I also need to add it as a property so that it satisfies the `DecoratedRpc...`?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/start/rpc.custom/&#xD;&#xA;  [2]: https://i.stack.imgur.com/dD4K5.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25363" PostHistoryTypeId="1" PostId="6614" RevisionGUID="a1295aae-d7ad-4779-a63f-f9f761e892d2" CreationDate="2023-01-06T14:05:02.933" UserId="298" Text="Where to add the Custom RPC types in polkadot-js/apps directory?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25364" PostHistoryTypeId="3" PostId="6614" RevisionGUID="a1295aae-d7ad-4779-a63f-f9f761e892d2" CreationDate="2023-01-06T14:05:02.933" UserId="298" Text="|polkadot-js|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25366" PostHistoryTypeId="2" PostId="6615" RevisionGUID="b3b2dc47-e9c1-4650-9419-4fa142a5180d" CreationDate="2023-01-06T14:19:58.167" UserId="298" Text="In order to have your RPC methods to show up, you would need to decorate the types as explained in Shawn's answer, which then need to be added to `./packages/src/api/typesBundle.ts`. &#xD;&#xA;&#xD;&#xA;I am sure there is a command to run which automatically adds them from the `./package/src/api/spec` folder into typesBundle.ts, but for the sake of testing you can add it to `typesBundle.ts` manually. &#xD;&#xA;&#xD;&#xA;When you add it to the `typesBundle.ts` make sure that the node name of your chain is correctly added, in the example below it is the default `node-template`, along with the types associated to the custom RPC methods in my node runtime.  &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Then they should show up in the RPC area is its own module. Like so:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;*This is enough to get things working, but if you want to make an `api.rpc.&lt;firstModule&gt;.&lt;secondModule&gt; call within the code of apps then it would also needed to be added somewhere else. Which i will include once i find out.* &#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xLevS.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/SkjVq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25368" PostHistoryTypeId="5" PostId="6611" RevisionGUID="61c14f84-0629-4585-8915-e1585df98ac9" CreationDate="2023-01-06T14:37:27.233" UserId="94" Comment="added 716 characters in body" Text="Reads are already cached. Calling `MyStorage::&lt;T&gt;::get()` twice will only incur one DB read.  &#xD;&#xA;&#xD;&#xA;The first time you call `get()`/`set()` it will each count as DB operation. All following ones of the same kind will be DB free, since they are tracked in the transactional overlay. This must be so since a TX can revert in which case it will not be persisted to DB.  &#xD;&#xA;Even better: if you call `set(); get()`, the `get()` is free and never hits DB. Not so much if you do `get(); set()` obviously. &#xD;&#xA; &#xD;&#xA;Example [bench](https://github.com/paritytech/substrate/blob/7316469de84bba8b2fa4606fcc132073175da17d/frame/benchmarking/pov/src/benchmarking.rs#L73) and [weight](https://github.com/paritytech/substrate/blob/7316469de84bba8b2fa4606fcc132073175da17d/frame/benchmarking/pov/src/weights.rs#L126)." ContentLicense="CC BY-SA 4.0" />
  <row Id="25369" PostHistoryTypeId="2" PostId="6616" RevisionGUID="9f9ca670-5222-4fe3-a3c0-05d68bf0c27e" CreationDate="2023-01-06T15:32:26.347" UserId="2025" Text="The `reserve_transfer_assets` call in pallet-xcm is only designed to transfer some assets from the local chain to the sovereign account of a destination chain and forward a notification XCM as you can see in [the source code](https://github.com/paritytech/polkadot/blob/master/xcm/pallet-xcm/src/lib.rs#L552). It is not meant to send arbitrary XCM messages in it.&#xD;&#xA;&#xD;&#xA;If you want to send an arbitrary call as an XCM message from the relay chain you may use the `send` call, where the XCM message to send is of type `Box&lt;VersionedXcm&lt;()&gt;&gt;` as you can see [here](https://github.com/paritytech/polkadot/blob/7bfac17f7077997963da866fd972c9034b64c855/xcm/pallet-xcm/src/lib.rs#L466). But bear in mind that the destination chain should be configured to accept and process this XCM message." ContentLicense="CC BY-SA 4.0" />
  <row Id="25371" PostHistoryTypeId="2" PostId="6617" RevisionGUID="2a1e5001-9cf4-443c-8648-0967aa69d076" CreationDate="2023-01-07T05:11:53.890" UserId="2565" Text="How can I connect my old Parachain to my new Relaychain?&#xD;&#xA;&#xD;&#xA;The first thing I did is to recreate the chainspec using export-state: (9062 is my last block)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/my-parachain export-state \&#xD;&#xA;--chain my-parachain-chainspec.json \&#xD;&#xA;--base-path /tmp/parachain/collator1 9062 &gt; my-parachain-chainspec-9062.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The next step is to generate the genesis and wasm state from the new chainspec:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/my-parachain export-genesis-state \&#xD;&#xA;--chain=my-parachain-chainspec-9062.json &gt; para-genesis-state-9062&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/my-parachain export-genesis-wasm \&#xD;&#xA;--chain=my-parachain-chainspec-9062.json &gt; para-genesis-wasm-9062&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I register the parachain.  I still get an error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-01-07 04:47:50 [Relaychain]  Idle (3 peers), best: #30793 (0x7974…5446), finalized #30790 (0xf1f9…19e1), ⬇ 1.4kiB/s ⬆ 0.6kiB/s&#xD;&#xA;2023-01-07 04:47:52 [Parachain]  Idle (0 peers), best: #9062 (0xf9b8…1087), finalized #9062 (0xf9b8…1087), ⬇ 0 ⬆ 0&#xD;&#xA;2023-01-07 04:47:54 [Relaychain] ✨ Imported #30794 (0x0f21…f3fc)&#xD;&#xA;2023-01-07 04:47:54 [Parachain] Could not find the header of the genesis block in the database! block_hash=0x922d43a0606e6c6315c301bcbd7c27ba5c8e88f9665e85b621796c82c81ce780&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Ideas on how to restore old Parachain is highly appreciated.  This is a deal breaker for a Parachain, if we cannot restore data after the lease is terminated." ContentLicense="CC BY-SA 4.0" />
  <row Id="25373" PostHistoryTypeId="1" PostId="6617" RevisionGUID="2a1e5001-9cf4-443c-8648-0967aa69d076" CreationDate="2023-01-07T05:11:53.890" UserId="2565" Text="How can I connect my old Parachain to my new Relaychain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25374" PostHistoryTypeId="3" PostId="6617" RevisionGUID="2a1e5001-9cf4-443c-8648-0967aa69d076" CreationDate="2023-01-07T05:11:53.890" UserId="2565" Text="|parachain|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25380" PostHistoryTypeId="2" PostId="6619" RevisionGUID="e7ae607e-bf23-4e46-baba-aa3ef0d7e600" CreationDate="2023-01-07T13:03:18.930" UserId="3114" Text="- I want to implement a base contract that multiple contracts should implement.&#xD;&#xA;- I decided to use &quot;#[openbrush::trait_definition]&quot; because &quot;[#ink(message)]&quot; cannot be added in the normal implementation of traits.&#xD;&#xA;- However, traits declared in another library crate cannot be referenced.&#xD;&#xA;- If you remove &quot;#[openbrush::trait_definition]&quot; as a trial, you can refer to it.&#xD;&#xA;- Could you tell me what is wrong?&#xD;&#xA;&#xD;&#xA;definition of trait: commons/lib.rs&#xD;&#xA;```&#xD;&#xA;    #[openbrush::trait_definition]&#xD;&#xA;    pub trait Destination {&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn execute_function(&amp;mut self) -&gt; Result&lt;(), ()&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;use of trait: destination_base/lib.rs&#xD;&#xA;```&#xD;&#xA;#[openbrush::contract]&#xD;&#xA;mod destination_base {&#xD;&#xA;    use commons::Destination;    &#xD;&#xA;    /// Defines the storage of your contract.&#xD;&#xA;    /// Add new fields to the below struct in order&#xD;&#xA;    /// to add new static storage fields to your contract.&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct DestinationBase {&#xD;&#xA;        /// Stores a single `bool` value on the storage.&#xD;&#xA;        value: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Destination for DestinationBase {&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn execute_function(&amp;mut self) -&gt; Result&lt;(),()&gt; {&#xD;&#xA;            self.flip();&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error:&#xD;&#xA;```&#xD;&#xA;    Checking destination_base v0.1.0 (/Users/shin.takahashi/develop/work/delegate_test2/contracts/destination_base)&#xD;&#xA;error[E0432]: unresolved import `commons::Destination`&#xD;&#xA; --&gt; src/lib.rs:9:9&#xD;&#xA;  |&#xD;&#xA;9 |     use commons::Destination;    &#xD;&#xA;  |         ^^^^^^^^^^^^^^^^^^^^ no `Destination` in the root&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="25382" PostHistoryTypeId="1" PostId="6619" RevisionGUID="e7ae607e-bf23-4e46-baba-aa3ef0d7e600" CreationDate="2023-01-07T13:03:18.930" UserId="3114" Text="Traits with &quot;#[openbrush::trait_definition]&quot; cannot be referenced" ContentLicense="CC BY-SA 4.0" />
  <row Id="25383" PostHistoryTypeId="3" PostId="6619" RevisionGUID="e7ae607e-bf23-4e46-baba-aa3ef0d7e600" CreationDate="2023-01-07T13:03:18.930" UserId="3114" Text="|ink|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25384" PostHistoryTypeId="2" PostId="6620" RevisionGUID="3ad6c846-d4bb-4d6e-bd5b-7cdcee3a9bf5" CreationDate="2023-01-08T08:11:52.033" UserId="3166" Text="You can query the contract method before creating a transaction as it will return any possible error that can occur during the contract call. This will also save the gas fee of the callee since the query will not deduce any gas fee&#xD;&#xA;&#xD;&#xA;            const res = await contractPromise.query[queryFunc](accountId, { gasLimit: -1, storageDepositLimit: null}, ...args);&#xD;&#xA;            const { output, result} = res;&#xD;&#xA;&#xD;&#xA;            if (output?.isErr || result?.isErr) {&#xD;&#xA;                const errorMsg = output?.toJSON()?.err || result?.toJSON()?.err;&#xD;&#xA;                throw new Error(errorMsg || 'occurred due to unknown reason');&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;Note1: Please replace &quot;queryFunc&quot; with contract method name.&#xD;&#xA;&#xD;&#xA;Note2: you can get information about contract query from this [link][1].&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api-contract/start/contract.read" ContentLicense="CC BY-SA 4.0" />
  <row Id="25386" PostHistoryTypeId="2" PostId="6621" RevisionGUID="84e7527e-ec11-480f-a8db-6741f37eb288" CreationDate="2023-01-08T09:12:58.270" UserId="3166" Text="Is it possible to use a snapshot of the relay chain to synchronize a Substrate-based parachain and run a parachain node, as the process of synchronizing the relay chain can take a significant amount of time?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25388" PostHistoryTypeId="1" PostId="6621" RevisionGUID="84e7527e-ec11-480f-a8db-6741f37eb288" CreationDate="2023-01-08T09:12:58.270" UserId="3166" Text="Sync a parachain node quickly" ContentLicense="CC BY-SA 4.0" />
  <row Id="25389" PostHistoryTypeId="3" PostId="6621" RevisionGUID="84e7527e-ec11-480f-a8db-6741f37eb288" CreationDate="2023-01-08T09:12:58.270" UserId="3166" Text="|polkadot|parachain|parachain-collator|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25390" PostHistoryTypeId="2" PostId="6622" RevisionGUID="67a211a2-0448-41c9-934b-138e15c5ac57" CreationDate="2023-01-08T12:18:14.297" UserId="3685" Text="I faced the same issue. The following steps helped me resolve it.&#xD;&#xA;&#xD;&#xA;First, I removed the import of `pallet_contracts::DefaultContractAccessWeight`&#xD;&#xA;&#xD;&#xA;I added this line `pub const DeletionQueueDepth: u32 = 128;` to `parameter_type!`. So your new block should look something like this&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DepositPerItem: Balance = deposit(1, 0);&#xD;&#xA;	pub const DepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;	pub const DeletionQueueDepth: u32 = 128;&#xD;&#xA;	pub const UnsafeUnstableInterface: bool = false;&#xD;&#xA;	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * BlockWeights::get().max_block;&#xD;&#xA;	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally I changed the arguments `Config`. The final code looks like&#xD;&#xA;```&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	type CallFilter = frame_support::traits::Nothing;&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;	type MaxStorageKeyLen = ConstU32&lt;{ 512 * 1024 }&gt;;&#xD;&#xA;	type UnsafeUnstableInterface = UnsafeUnstableInterface;&#xD;&#xA;	type MaxDebugBufferLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It is possible that this code may not work in the future. All you need to do is the go the source code of the pallet_contract and add/remove the argument according to the code. Use dummy argument. The compiler's debugger will do a good job in directing you to the right code." ContentLicense="CC BY-SA 4.0" />
  <row Id="25392" PostHistoryTypeId="2" PostId="6623" RevisionGUID="7baf1abe-7b0b-4572-9938-b28992e9338f" CreationDate="2023-01-09T06:13:09.233" UserId="2348" Text="i am working on substrate blockchain and  have to decrease the unbonding time in my blockchain which is currently 22hours when i am decreasing that time unbonded bonds  i.e balance unbonded is not comming back to valdidator or nominatiors account.if anyone can help me out on how to set unbonding time " ContentLicense="CC BY-SA 4.0" />
  <row Id="25394" PostHistoryTypeId="1" PostId="6623" RevisionGUID="7baf1abe-7b0b-4572-9938-b28992e9338f" CreationDate="2023-01-09T06:13:09.233" UserId="2348" Text="how to Decrease the unbonding Time in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25395" PostHistoryTypeId="3" PostId="6623" RevisionGUID="7baf1abe-7b0b-4572-9938-b28992e9338f" CreationDate="2023-01-09T06:13:09.233" UserId="2348" Text="|polkadot|substrateinterface|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25396" PostHistoryTypeId="5" PostId="6623" RevisionGUID="7cb870fe-5795-40ea-833e-42407054ebed" CreationDate="2023-01-09T07:38:40.933" UserId="2348" Comment="added 279 characters in body" Text=" i am working on substrate blockchain its era time and epoch are  set too 2 minutes and when i changed unbonding duration to 4 min in blockchain it is working fine . when i have added evm base to to substrate blochchain with era time and epoch time of 2 min. and when i set unbonding time to any  value rather than the default one i.e 2 min ,10 min etc .when i use my funds to nominate the validator and want to unbond funds the balance is not coming back to account and is still in locked funds . can you please help me out of it . how to change unbonding time with getting this ." ContentLicense="CC BY-SA 4.0" />
  <row Id="25397" PostHistoryTypeId="5" PostId="6623" RevisionGUID="dd646918-c0de-4de9-918a-ed9f3cc99d11" CreationDate="2023-01-09T07:59:04.057" UserId="2348" Comment="deleted 17 characters in body" Text=" i am working on substrate blockchain its era time and epoch are  set too 2 minutes and when i changed unbonding duration to 4 min in blockchain it is working fine . when i have added evm base to to substrate blochchain with era time and epoch time of 2 min. and when i set unbonding time to any  value rather than the default one i.e 2 min ,10 min etc .when i use my funds to nominate the validator and want to unbond funds the balance is not coming back to account and is still in locked funds . can you please help me out of it . how to change unbonding time  ." ContentLicense="CC BY-SA 4.0" />
  <row Id="25400" PostHistoryTypeId="2" PostId="6625" RevisionGUID="d82353d2-ea90-4bda-8dda-ad63dab413a9" CreationDate="2023-01-09T08:30:12.987" UserId="140" Text="Yes. It is possible. You can find snapshots here https://polkashots.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25402" PostHistoryTypeId="2" PostId="6626" RevisionGUID="6273df4b-6d3e-4f03-882c-07af8c068253" CreationDate="2023-01-09T08:40:53.380" UserId="3437" Text="We are working on a parachain and planning to integrate with Polkadot relay chain. &#xD;&#xA;&#xD;&#xA;When we deployed our parachain on testnet and tried to integrate with Rococo, we realised that less than 500 GB and 8 GB RAM is not enough. &#xD;&#xA;&#xD;&#xA;What should be ideal hardware specifications for a mainnet Parachain to connect with Polkadot relay chain?&#xD;&#xA;&#xD;&#xA;Can someone please help me to provide this information?&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25404" PostHistoryTypeId="1" PostId="6626" RevisionGUID="6273df4b-6d3e-4f03-882c-07af8c068253" CreationDate="2023-01-09T08:40:53.380" UserId="3437" Text="What should be ideal hardware specifications for a Parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25405" PostHistoryTypeId="3" PostId="6626" RevisionGUID="6273df4b-6d3e-4f03-882c-07af8c068253" CreationDate="2023-01-09T08:40:53.380" UserId="3437" Text="|polkadot|parachain|rococo|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25406" PostHistoryTypeId="2" PostId="6627" RevisionGUID="babbd287-a4b9-4659-a6f3-6aa03b4e8156" CreationDate="2023-01-09T08:49:11.067" UserId="73" Text="Yes you can use snapshots, but I would recommend that you are using warp sync:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;your-parachain -- --sync warp-sync&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will make the relay chain node use warp sync. This is much faster and should only take some minutes. We are also working on warp sync support for parachains right now. This will then make it possible to warp sync the parachain and the relay chain!" ContentLicense="CC BY-SA 4.0" />
  <row Id="25408" PostHistoryTypeId="2" PostId="6628" RevisionGUID="f5e1e8d5-78e5-4310-9dfd-4f36d902514c" CreationDate="2023-01-09T09:14:49.377" UserId="1732" Text="It all depends on which type of node:&#xD;&#xA;- For a collator, you need to fit requirements of Substrate benchmark of the parachain. The most important will be single core CPU performance and disk read/write speed (NVMe disk is almost mandatory).&#xD;&#xA;- For RPC nodes, you need bigger disk space to run as archive node + capacity to process requests if the RPC is public (and this all depends on traffic)&#xD;&#xA;- For a bootnode, you also need to run as archive but it will not compute a lot, just sync.&#xD;&#xA;&#xD;&#xA;8 Gb RAM should generally be enough for non RPC node, I generally recommend a minimum of 8 core CPU @4.5Ghz with NVMe SSD drive of 500 Gb.&#xD;&#xA;Good connectivity is also very important.&#xD;&#xA;&#xD;&#xA;But in purely sync function, it can be much less, for example I'm running an Astar archive node on a Raspberry Pi4 with 2Gb RAM, it is synced correctly." ContentLicense="CC BY-SA 4.0" />
  <row Id="25410" PostHistoryTypeId="2" PostId="6629" RevisionGUID="b956a1bb-6eaf-47f4-8572-34141d2b43c3" CreationDate="2023-01-09T09:19:10.190" UserId="2762" Text="With your error message is not very clear what is happening.&#xD;&#xA;&#xD;&#xA;I have followed this tutorial in the Substrate Docs about [How to Connect to a custom chain specification][1] and with a similar code as yours works fine.&#xD;&#xA;&#xD;&#xA;You can check if there is something wrong with your parachain nodes or the chain spec. To do that, test the connection to a Common Good Parachain [Statemint][2] with the same code to see if it works.&#xD;&#xA;&#xD;&#xA;Just change in your code your parachain.json with the [Statemint spec chain][3] and the relay chain connection to Polkadot:&#xD;&#xA;&#xD;&#xA;    const relayProvider = new ScProvider(WellKnownChain.polkadot);&#xD;&#xA;&#xD;&#xA;You will see that the connections goes well with that message:&#xD;&#xA;&#xD;&#xA;    [smoldot] Parachain initialization complete for statemint. Name: &quot;Statemint&quot;. Genesis hash: 0x68d5…de2f. State root hash: 0xc1ef26b567de07159e4ecd415fbbb0340c56a09c4d72c82516d0f3bc2b782c80. Network identity: 12D3KooWNicu1ZCX6ZNUC96B4TQSiet2NkoQc7SfitxWWE4fQgpK. Relay chain: polkadot (id: 1000)&#xD;&#xA;&#xD;&#xA;And add this code if you want to subscribe to the new blocks and make sure you are getting the info from the chain:&#xD;&#xA;&#xD;&#xA;    await _api.rpc.chain.subscribeNewHeads((lastHeader: { number: unknown; hash: unknown }) =&gt; {&#xD;&#xA;        console.log(`New block #${lastHeader.number} has hash ${lastHeader.hash}`);&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/integrate-with-tools/integrate-a-light-client-node/&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-statemint&#xD;&#xA;  [3]: https://raw.githubusercontent.com/paritytech/cumulus/master/parachains/chain-specs/statemint.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="25412" PostHistoryTypeId="2" PostId="6630" RevisionGUID="7b24801d-517f-4446-8752-10294a439b0c" CreationDate="2023-01-09T09:23:14.357" UserId="1732" Text="Your bootnode needs to listen on secure Websocket to catch with substrate connect:&#xD;&#xA;- Node needs to listen on WS instead of default http `--listen-addr /ip4/0.0.0.0/tcp/30333/ws` (do no use --port in this case)&#xD;&#xA;- Set a proxy with WS upgrade and SSL enabled, pointing a DNS&#xD;&#xA;- Specify the WSS address of the bootnode in chainspecs (example: `&quot;/dns/astar-02.wss-bootnode.astar.network/tcp/443/wss/p2p/12D3KooWMfHf9G1Mtawz4qySe1EqaBmrieidqn2xnEYckUYkpe52&quot;`)" ContentLicense="CC BY-SA 4.0" />
  <row Id="25414" PostHistoryTypeId="2" PostId="6631" RevisionGUID="5f1b2c07-0b01-41fe-bde3-dc9b5b8602b7" CreationDate="2023-01-09T09:38:27.363" UserId="2762" Text="Yes, you can.&#xD;&#xA;You can take a look for inspiration of two of the most populars browser extensions [PolkadotJS Extension][1] and [Talisman][2].&#xD;&#xA;&#xD;&#xA;To build it yourself and connect to Substrate-base chains in a decentralized way, I recommend you to use the package [Substrate Connect][3]&#xD;&#xA;&#xD;&#xA;&gt; For Substrate-based chains, the light client node is implemented as a&#xD;&#xA;&gt; WebAssembly client—called smoldot—that can run in a browser and&#xD;&#xA;&gt; interact with the chain using JSON-RPC calls. To make the smoldot&#xD;&#xA;&gt; WebAssembly light client easier to integrate with JavaScript and&#xD;&#xA;&gt; TypeScript applications, there's a JavaScript package that's built on&#xD;&#xA;&gt; top of the smoldot source called Substrate Connect.&#xD;&#xA;&#xD;&#xA;For more information you can:&#xD;&#xA;&#xD;&#xA; - Read the documentation [Light clients in Substrate Connect][4]&#xD;&#xA; - Do the Tutorial [Integrate a light client node][5] where it shows you  how to use the Substrate Connect browser extension to interact with the blockchain directly without using an intermediary node or RPC server.&#xD;&#xA; - Check the code of the [Substrate Connect examples][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/extension&#xD;&#xA;  [2]: https://github.com/TalismanSociety/talisman-web&#xD;&#xA;  [3]: https://www.npmjs.com/package/@substrate/connect&#xD;&#xA;  [4]: https://docs.substrate.io/fundamentals/light-clients-in-substrate-connect/&#xD;&#xA;  [5]: https://docs.substrate.io/tutorials/integrate-with-tools/integrate-a-light-client-node/&#xD;&#xA;  [6]: https://github.com/paritytech/substrate-connect/tree/main/projects" ContentLicense="CC BY-SA 4.0" />
  <row Id="25416" PostHistoryTypeId="2" PostId="6632" RevisionGUID="9ea9fa43-e612-4d0b-ba82-13a7cb11589e" CreationDate="2023-01-09T10:38:13.220" UserId="251" Text="I think it isn't related to EVM. Maybe you made some mistakes.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Decrease this value: https://github.com/paritytech/substrate/blob/911f65be7949342e12601cc3015d5c47e9339de4/bin/node/runtime/src/lib.rs#L391&#xD;&#xA;&#xD;&#xA;And this value:&#xD;&#xA;https://github.com/paritytech/substrate/blob/911f65be7949342e12601cc3015d5c47e9339de4/bin/node/runtime/src/lib.rs#L567" ContentLicense="CC BY-SA 4.0" />
  <row Id="25418" PostHistoryTypeId="5" PostId="728" RevisionGUID="0ecf9c13-b72b-4a6f-b8ee-c1a0effdb4b0" CreationDate="2023-01-09T10:42:40.103" UserId="234" Comment="Updated the link to Substrate Docs &gt; Architecture" Text="Here's my 2 cents.&#xD;&#xA;&#xD;&#xA;Let's step back a little and start from the basics. As you may know, a **node** is a computer participating in the blockchain network, and there is an application, known as a **client**, running in it.&#xD;&#xA;&#xD;&#xA;[This](https://docs.substrate.io/fundamentals/architecture/) is a conceptual diagram of a Substrate client.&#xD;&#xA;&#xD;&#xA;The **runtime**, labeled as Wasm Runtime, is a piece of the Substrate client. There are other components besides the runtime that comprise the Substrate client.  &#xD;&#xA;From the [docs](https://docs.substrate.io/v3/concepts/runtime/):&#xD;&#xA;&gt; The runtime of a blockchain is the business logic that defines its behaviour.&#xD;&#xA;&#xD;&#xA;This business logic is organized in domain-specific modules. Broadly speaking, we refer to these modules as **FRAME modules** (pallets). So, we could say that a **set of pallets constitute a runtime**.  &#xD;&#xA;&#xD;&#xA;In the [Substrate Node Template](https://github.com/substrate-developer-hub/substrate-node-template) repository, you could check how the runtime is constructed based on a set of pallets. You could navigate to `runtime/src/lib.rs` and find the [`construct_runtime!`](https://github.com/substrate-developer-hub/substrate-node-template/blob/c962ed17139322f99d25ed5631ddbb5bbbced2a2/runtime/src/lib.rs#L275) macro.  &#xD;&#xA;&#xD;&#xA;You will see the following:&#xD;&#xA;```&#xD;&#xA;// Create the runtime by composing the FRAME pallets that were previously configured.&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		RandomnessCollectiveFlip: pallet_randomness_collective_flip,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		// Include the custom logic from the pallet-template in the runtime.&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;All the pallets except `TemplateModule` are FRAME modules provided by Substrate.  &#xD;&#xA;`TemplateModule` is a custom pallet written by a developer.&#xD;&#xA;&#xD;&#xA;**Back to your questions**, in the link you shared at the System crate section says:&#xD;&#xA;&gt; All other pallets depend on the System crate (pallet_system) as the basis of your Substrate runtime.&#xD;&#xA;The System crate defines all the core types for the Substrate runtime.  &#xD;&#xA;&#xD;&#xA;Based on that, the System pallet, which is part of the &quot;SYSTEM MODULE&quot; block in the diagram, is a **must**.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="25419" PostHistoryTypeId="2" PostId="6633" RevisionGUID="d94db6b5-1992-4e52-9f3d-b5669f426697" CreationDate="2023-01-09T11:18:12.603" UserId="262" Text="I am looking into XCMv2 and given the standard `XcmOriginToCallOrigin` configs on both chains:&#xD;&#xA;&#xD;&#xA;[![XcmOriginToCallOrigin][1]][1]&#xD;&#xA;&#xD;&#xA;I was able to construct a `polkadotXcm.send` call to withdraw an asset from the sibling account on a different chain and send it back to a local account. But it does not seem to be possible to withdraw an asset from your local chain (e.g. treasury or sibling) and send them to a (sibling) account on the other chain via democracy (dispatches as root).&#xD;&#xA;&#xD;&#xA;Neither of the calls `send`, `execute` or `reserveTransferAssets` seems to provide the ability to do this. Presumably the chain does not know from which account it should withdraw the asset and I could add a converter for `(origin: superuser, location:here)` and then use `execute` or `reserveTransferAssets`? &#xD;&#xA;&#xD;&#xA;This is less favourable option tho as I would prefer not having to change anything in the runtime and use just an XCM call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HIbTE.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25421" PostHistoryTypeId="1" PostId="6633" RevisionGUID="d94db6b5-1992-4e52-9f3d-b5669f426697" CreationDate="2023-01-09T11:18:12.603" UserId="262" Text="How to send assets from the local chain to another via democracy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25422" PostHistoryTypeId="3" PostId="6633" RevisionGUID="d94db6b5-1992-4e52-9f3d-b5669f426697" CreationDate="2023-01-09T11:18:12.603" UserId="262" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25423" PostHistoryTypeId="5" PostId="6633" RevisionGUID="a9ddefa2-824f-4475-b323-9a2ec83336b0" CreationDate="2023-01-09T11:22:54.323" UserId="262" Comment="added 39 characters in body" Text="I am looking into XCMv2 and given the standard `XcmOriginToCallOrigin` configs on both chains:&#xD;&#xA;&#xD;&#xA;[![XcmOriginToCallOrigin][1]][1]&#xD;&#xA;&#xD;&#xA;I was able to construct a `polkadotXcm.send` call to withdraw an asset from the sibling account on a different chain and send it back to a local account. But it does not seem to be possible to withdraw an asset from your local chain (e.g. treasury or sibling) and send them to a (sibling) account on the other chain via democracy (dispatches as root).&#xD;&#xA;&#xD;&#xA;Neither of the calls `send`, `execute` or `reserveTransferAssets` seems to provide the ability to do this and fails with `FailedToTransactAsset`. Presumably the chain does not know from which account it should withdraw the asset and I could add a converter for `(origin: superuser, location:here)` and then use `execute` or `reserveTransferAssets`? &#xD;&#xA;&#xD;&#xA;This is less favourable option tho as I would prefer not having to change anything in the runtime and use just an XCM call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HIbTE.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25424" PostHistoryTypeId="5" PostId="6633" RevisionGUID="c6711862-8cc6-48be-9169-f4c38ae71f5d" CreationDate="2023-01-09T11:29:06.280" UserId="262" Comment="added 227 characters in body" Text="I am looking into XCMv2 and given the standard `XcmOriginToCallOrigin` configs on both chains:&#xD;&#xA;&#xD;&#xA;[![XcmOriginToCallOrigin][1]][1]&#xD;&#xA;&#xD;&#xA;and environment: [HydraDX runtime][2] &amp; [Acala runtime][3].&#xD;&#xA;&#xD;&#xA;I was able to construct a `polkadotXcm.send` call to withdraw an asset from the sibling account on a different chain and send it back to a local account. But it does not seem to be possible to withdraw an asset from your local chain (e.g. treasury or sibling) and send them to a (sibling) account on the other chain via democracy (dispatches as root).&#xD;&#xA;&#xD;&#xA;Neither of the calls `send`, `execute` or `reserveTransferAssets` seems to provide the ability to do this and fails with `FailedToTransactAsset`. Presumably the chain does not know from which account it should withdraw the asset and I could add a converter for `(origin: superuser, location:here)` and then use `execute` or `reserveTransferAssets`? &#xD;&#xA;&#xD;&#xA;This is less favourable option tho as I would prefer not having to change anything in the runtime and use just an XCM call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HIbTE.png&#xD;&#xA;  [2]: https://github.com/galacticcouncil/HydraDX-node/tree/master/runtime/testing-hydradx&#xD;&#xA;  [3]: https://github.com/AcalaNetwork/Acala/tree/master/runtime/acala" ContentLicense="CC BY-SA 4.0" />
  <row Id="25425" PostHistoryTypeId="5" PostId="6633" RevisionGUID="530d252a-4c4a-4883-818d-de7fa9ed0fe4" CreationDate="2023-01-09T11:31:24.503" UserId="262" Comment="deleted 2 characters in body" Text="I am looking into XCMv2 and given the standard `XcmOriginToCallOrigin` configs on both chains:&#xD;&#xA;&#xD;&#xA;[![XcmOriginToCallOrigin][1]][1]&#xD;&#xA;&#xD;&#xA;and environment: [HydraDX runtime][2] &amp; [Acala runtime][3].&#xD;&#xA;&#xD;&#xA;I was able to construct a `polkadotXcm.send` call to withdraw an asset from the sibling account on the other chain and send it back to a local account. But it does not seem to be possible to withdraw an asset from your local chain (e.g. treasury or sibling) and send them to a (sibling) account on the other chain via democracy (dispatches as root).&#xD;&#xA;&#xD;&#xA;Neither of the calls `send`, `execute` or `reserveTransferAssets` seems to provide the ability to do this and fails with `FailedToTransactAsset`. Presumably the chain does not know from which account it should withdraw the asset and I could add a converter for `(origin: superuser, location:here)` and then use `execute` or `reserveTransferAssets`? &#xD;&#xA;&#xD;&#xA;This is less favourable option tho as I would prefer not having to change anything in the runtime and use just an XCM call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HIbTE.png&#xD;&#xA;  [2]: https://github.com/galacticcouncil/HydraDX-node/tree/master/runtime/testing-hydradx&#xD;&#xA;  [3]: https://github.com/AcalaNetwork/Acala/tree/master/runtime/acala" ContentLicense="CC BY-SA 4.0" />
  <row Id="25426" PostHistoryTypeId="5" PostId="6633" RevisionGUID="504850de-18a7-4f90-a992-83d972ef08c6" CreationDate="2023-01-09T11:32:15.337" UserId="262" Comment="added 7 characters in body" Text="I am looking into XCMv2 and given the standard `XcmOriginToCallOrigin` configs on both chains:&#xD;&#xA;&#xD;&#xA;[![XcmOriginToCallOrigin][1]][1]&#xD;&#xA;&#xD;&#xA;and environment: [HydraDX runtime][2] &amp; [Acala runtime][3].&#xD;&#xA;&#xD;&#xA;I was able to construct a `polkadotXcm.send` call to withdraw an asset from the sibling account on the other chain and send it back to a local account. But it does not seem to be possible to withdraw an asset from your local chain (e.g. treasury or sibling) and send them to a (sibling) account on the other chain via democracy (dispatches as root).&#xD;&#xA;&#xD;&#xA;Neither of the calls `send`, `execute` or `reserveTransferAssets` seems to provide the ability to do this and fails with `FailedToTransactAsset`. Presumably the xcm executor does not know from which account it should withdraw the asset and I could add a converter for `(origin: superuser, location:here)` and then use `execute` or `reserveTransferAssets`? &#xD;&#xA;&#xD;&#xA;This is less favourable option tho as I would prefer not having to change anything in the runtime and use just an XCM call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HIbTE.png&#xD;&#xA;  [2]: https://github.com/galacticcouncil/HydraDX-node/tree/master/runtime/testing-hydradx&#xD;&#xA;  [3]: https://github.com/AcalaNetwork/Acala/tree/master/runtime/acala" ContentLicense="CC BY-SA 4.0" />
  <row Id="25427" PostHistoryTypeId="2" PostId="6634" RevisionGUID="b16a8224-28f9-4337-a6f7-7f76dc3a0f44" CreationDate="2023-01-09T12:15:36.327" UserId="94" Text="Please have a look at the [Polkadot reference hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#reference-hardware) to get an impression about the minimum advised hardware." ContentLicense="CC BY-SA 4.0" />
  <row Id="25430" PostHistoryTypeId="2" PostId="6635" RevisionGUID="d7a9dc85-1d67-4e39-9558-2a4601f37a9f" CreationDate="2023-01-09T12:59:34.567" UserId="2762" Text="Finally I was able to compile it. I am not sure what was causing the error, but this is what I did:&#xD;&#xA;&#xD;&#xA;I updated the rust toolchain: &#xD;&#xA;&#xD;&#xA;    rustup update&#xD;&#xA;Check i was in the last commit, delete the `Cargo.lock` and:&#xD;&#xA;&#xD;&#xA;    clean cargo&#xD;&#xA;    cargo build --release &#xD;&#xA;&#xD;&#xA;And it worked!" ContentLicense="CC BY-SA 4.0" />
  <row Id="25432" PostHistoryTypeId="2" PostId="6636" RevisionGUID="eedaba51-54d6-490d-b009-782e80db2cd3" CreationDate="2023-01-09T13:41:26.420" UserId="139" Text="If you have a compiled with parachain node runtime-benchmarks feature you can run a neat command that will show you whether your hardware meets the requirements for a good parachain. &#xD;&#xA;&#xD;&#xA;`cargo run --release --features runtime-benchmarks -- benchmark machine`" ContentLicense="CC BY-SA 4.0" />
  <row Id="25437" PostHistoryTypeId="2" PostId="6638" RevisionGUID="a1008fcf-ce20-428c-aed3-d78ab11aed9e" CreationDate="2023-01-09T14:29:14.663" UserId="3687" Text="When I cast a vote on a referendum with a value as&#xD;&#xA;```js&#xD;&#xA;let vote = { &#xD;&#xA;    Standard: {&#xD;&#xA;      vote: {                                                                                                                           &#xD;&#xA;        aye: true,                                                                                                                                                                      &#xD;&#xA;        conviction: 'Locked4x',                                                                                                                                                              &#xD;&#xA;      },&#xD;&#xA;      balance: balance&#xD;&#xA;    }&#xD;&#xA;  };&#xD;&#xA;&#xD;&#xA;  let unsub = await api.tx.democracy.vote(i, vote).signAndSend(payoutKey, ...);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Through the event I have extracted the following data&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;AccountId32: 5HeM14aFJPKxi...vVyV7oX6rErJhN,&#xD;&#xA;u32: 79,&#xD;&#xA;{&quot;_enum&quot;:{&quot;Standard&quot;:&quot;{&quot;vote&quot;:&quot;Vote&quot;,&quot;balance&quot;:&quot;u128&quot;}&quot;,&quot;Split&quot;:&quot;{&quot;aye&quot;:&quot;u128&quot;,&quot;nay&quot;:&quot;u128&quot;}&quot;}}: {&quot;standard&quot;:{&quot;vote&quot;:&quot;0x01&quot;,&quot;balance&quot;:&quot;0x0000000000000000c249fdd327780000&quot;}}]&#xD;&#xA;```&#xD;&#xA;We realize that it does not contain the vote conviction.&#xD;&#xA;&#xD;&#xA;I tried to look it up via `api.query.democracy.votingOf(accountId)`&#xD;&#xA;&#xD;&#xA;But unfortunately, every vote returns the same value `{conviction: &quot;Locked1x&quot;, vote: &quot;Nay&quot;}`&#xD;&#xA;&#xD;&#xA;Even if the actual values are entirely different. Eg: conviction is `Locked4x` and vote is `Aye`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;**The questions are**:&#xD;&#xA;&#xD;&#xA; 1. How to get the conviction value of a democratic vote?&#xD;&#xA; 2. Why does `api.query.democracy.votingOf` always return the same value `{conviction: &quot;Locked1x&quot;, vote: &quot;Nay&quot;}`&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/0agzG.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25439" PostHistoryTypeId="1" PostId="6638" RevisionGUID="a1008fcf-ce20-428c-aed3-d78ab11aed9e" CreationDate="2023-01-09T14:29:14.663" UserId="3687" Text="How to determine the conviction of a democratic vote using Polkadot API" ContentLicense="CC BY-SA 4.0" />
  <row Id="25440" PostHistoryTypeId="3" PostId="6638" RevisionGUID="a1008fcf-ce20-428c-aed3-d78ab11aed9e" CreationDate="2023-01-09T14:29:14.663" UserId="3687" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25441" PostHistoryTypeId="5" PostId="6638" RevisionGUID="ca08e2c2-d7fe-4530-a2d3-212d830cb3aa" CreationDate="2023-01-09T14:31:43.543" UserId="3687" Comment="added 9 characters in body" Text="When I cast a vote on a referendum with a value as&#xD;&#xA;```js&#xD;&#xA;let vote = { &#xD;&#xA;    Standard: {&#xD;&#xA;      vote: {                                                                                                                           &#xD;&#xA;        aye: true,                                                                                                                                                                      &#xD;&#xA;        conviction: 'Locked4x',                                                                                                                                                              &#xD;&#xA;      },&#xD;&#xA;      balance: balance&#xD;&#xA;    }&#xD;&#xA;  };&#xD;&#xA;&#xD;&#xA;  let unsub = await api.tx.democracy.vote(i, vote).signAndSend(payoutKey, ...);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Through the event I have extracted the following data&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;AccountId32: 5HeM14aFJPKxi...vVyV7oX6rErJhN,&#xD;&#xA;u32: 79,&#xD;&#xA;{&quot;_enum&quot;:{&quot;Standard&quot;:&quot;{&quot;vote&quot;:&quot;Vote&quot;,&quot;balance&quot;:&quot;u128&quot;}&quot;,&quot;Split&quot;:&quot;{&quot;aye&quot;:&quot;u128&quot;,&quot;nay&quot;:&quot;u128&quot;}&quot;}}: {&quot;standard&quot;:{&quot;vote&quot;:&quot;0x01&quot;,&quot;balance&quot;:&quot;0x0000000000000000c249fdd327780000&quot;}}]&#xD;&#xA;```&#xD;&#xA;We realize that it does not contain the vote conviction.&#xD;&#xA;&#xD;&#xA;I tried to look it up via `api.query.democracy.votingOf(accountId)`&#xD;&#xA;&#xD;&#xA;But unfortunately, every vote returns the same value `{conviction: &quot;Locked1x&quot;, vote: &quot;Nay&quot;}`&#xD;&#xA;&#xD;&#xA;Even if the actual values are entirely different. Eg: conviction is `Locked4x` and vote is `Aye`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;**The questions are**:&#xD;&#xA;&#xD;&#xA; 1. How to get the conviction value of a democratic vote?&#xD;&#xA; 2. Why does `api.query.democracy.votingOf` always return the same value `{conviction: &quot;Locked1x&quot;, vote: &quot;Nay&quot;}`&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/0agzG.png&#xD;&#xA;&#xD;&#xA;@jaco" ContentLicense="CC BY-SA 4.0" />
  <row Id="25442" PostHistoryTypeId="5" PostId="6638" RevisionGUID="dbbe11bb-dd81-4d29-9eb5-5c6c3f375584" CreationDate="2023-01-09T14:32:14.700" UserId="3687" Comment="deleted 7 characters in body; edited tags" Text="When I cast a vote on a referendum with a value as&#xD;&#xA;```js&#xD;&#xA;let vote = { &#xD;&#xA;    Standard: {&#xD;&#xA;      vote: {                                                                                                                           &#xD;&#xA;        aye: true,                                                                                                                                                                      &#xD;&#xA;        conviction: 'Locked4x',                                                                                                                                                              &#xD;&#xA;      },&#xD;&#xA;      balance: balance&#xD;&#xA;    }&#xD;&#xA;  };&#xD;&#xA;&#xD;&#xA;  let unsub = await api.tx.democracy.vote(i, vote).signAndSend(payoutKey, ...);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Through the event I have extracted the following data&#xD;&#xA;```json&#xD;&#xA;[&#xD;&#xA;AccountId32: 5HeM14aFJPKxi...vVyV7oX6rErJhN,&#xD;&#xA;u32: 79,&#xD;&#xA;{&quot;_enum&quot;:{&quot;Standard&quot;:&quot;{&quot;vote&quot;:&quot;Vote&quot;,&quot;balance&quot;:&quot;u128&quot;}&quot;,&quot;Split&quot;:&quot;{&quot;aye&quot;:&quot;u128&quot;,&quot;nay&quot;:&quot;u128&quot;}&quot;}}: {&quot;standard&quot;:{&quot;vote&quot;:&quot;0x01&quot;,&quot;balance&quot;:&quot;0x0000000000000000c249fdd327780000&quot;}}]&#xD;&#xA;```&#xD;&#xA;We realize that it does not contain the vote conviction.&#xD;&#xA;&#xD;&#xA;I tried to look it up via `api.query.democracy.votingOf(accountId)`&#xD;&#xA;&#xD;&#xA;But unfortunately, every vote returns the same value `{conviction: &quot;Locked1x&quot;, vote: &quot;Nay&quot;}`&#xD;&#xA;&#xD;&#xA;Even if the actual values are entirely different. Eg: conviction is `Locked4x` and vote is `Aye`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;**The questions are**:&#xD;&#xA;&#xD;&#xA; 1. How to get the conviction value of a democratic vote?&#xD;&#xA; 2. Why does `api.query.democracy.votingOf` always return the same value `{conviction: &quot;Locked1x&quot;, vote: &quot;Nay&quot;}`&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/0agzG.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25443" PostHistoryTypeId="6" PostId="6638" RevisionGUID="dbbe11bb-dd81-4d29-9eb5-5c6c3f375584" CreationDate="2023-01-09T14:32:14.700" UserId="3687" Comment="deleted 7 characters in body; edited tags" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25450" PostHistoryTypeId="2" PostId="6641" RevisionGUID="a69aa1c1-56bd-4bea-81a9-d5d5857a8e2d" CreationDate="2023-01-09T17:56:34.170" UserId="2762" Text="Check this [How-To-guide][1] that explains how to write a simple benchmark for a pallet.&#xD;&#xA;&#xD;&#xA;If you want to see an easy code example, you can check the Pallet template in the Substrate Node Template that is a simply pallet for example that has a function [do_something][2] and [here you can see the code where is adding the benchmarking for that function.][3]&#xD;&#xA;&#xD;&#xA;If you want more complex examples, check [the code of the FRAME pallets][4] that are pallets provided by Substrate.&#xD;&#xA;&#xD;&#xA;More information about Benchmarking: [In the Substrate Docs][5] and the [Substrate Runtime Benchmarking Framework][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/weights/add-benchmarks/&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/pallets/template/src/lib.rs#L69&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/pallets/template/src/benchmarking.rs&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/tree/master/frame&#xD;&#xA;  [5]: https://docs.substrate.io/test/benchmark/&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/frame/benchmarking/README.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="25452" PostHistoryTypeId="5" PostId="6633" RevisionGUID="8556dd3f-ede1-473b-a03f-ceb923b08cdc" CreationDate="2023-01-09T19:42:49.280" UserId="262" Comment="added 7 characters in body" Text="I am looking into XCMv2 and given the standard `XcmOriginToCallOrigin` configs on both chains:&#xD;&#xA;&#xD;&#xA;[![XcmOriginToCallOrigin][1]][1]&#xD;&#xA;&#xD;&#xA;and environment: [HydraDX runtime][2] &amp; [Acala runtime][3].&#xD;&#xA;&#xD;&#xA;I was able to construct a `polkadotXcm.send` call to withdraw an asset from the sibling account on the other chain and send it back to a local account.&#xD;&#xA;&#xD;&#xA;**But it does not seem to be possible to withdraw an asset from your local chain (e.g. treasury or sibling) and send them to a (sibling) account on the other chain via democracy** (dispatches as root).&#xD;&#xA;&#xD;&#xA;Neither of the calls `send`, `execute` or `reserveTransferAssets` seems to provide the ability to do this and fails with `FailedToTransactAsset`. Presumably the xcm executor does not know from which account it should withdraw the asset and I could add a converter for `(origin: superuser, location:here)` and then use `execute` or `reserveTransferAssets`? &#xD;&#xA;&#xD;&#xA;This is less favourable option tho as I would prefer not having to change anything in the runtime and use just an XCM call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HIbTE.png&#xD;&#xA;  [2]: https://github.com/galacticcouncil/HydraDX-node/tree/master/runtime/testing-hydradx&#xD;&#xA;  [3]: https://github.com/AcalaNetwork/Acala/tree/master/runtime/acala" ContentLicense="CC BY-SA 4.0" />
  <row Id="25453" PostHistoryTypeId="5" PostId="6633" RevisionGUID="3f5e1032-5711-472c-8301-3d52f6040804" CreationDate="2023-01-09T19:43:48.003" UserId="262" Comment="added 8 characters in body" Text="I am looking into XCMv2 and given the standard `XcmOriginToCallOrigin` configs on both chains:&#xD;&#xA;&#xD;&#xA;[![XcmOriginToCallOrigin][1]][1]&#xD;&#xA;&#xD;&#xA;and environment: [HydraDX runtime][2] &amp; [Acala runtime][3].&#xD;&#xA;&#xD;&#xA;I was able to construct a `polkadotXcm.send` call to withdraw an asset from the sibling account on the other chain and send it back to a local account.&#xD;&#xA;&#xD;&#xA;**But it does not seem to be possible to withdraw an asset from your local chain** (e.g. treasury or sibling) **and send them to a** (sibling) **account on the other chain via democracy** (dispatches as root).&#xD;&#xA;&#xD;&#xA;Neither of the calls `send`, `execute` or `reserveTransferAssets` seems to provide the ability to do this and fails with `FailedToTransactAsset`. Presumably the xcm executor does not know from which account it should withdraw the asset and I could add a converter for `(origin: superuser, location:here)` and then use `execute` or `reserveTransferAssets`? &#xD;&#xA;&#xD;&#xA;This is less favourable option tho as I would prefer not having to change anything in the runtime and use just an XCM call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HIbTE.png&#xD;&#xA;  [2]: https://github.com/galacticcouncil/HydraDX-node/tree/master/runtime/testing-hydradx&#xD;&#xA;  [3]: https://github.com/AcalaNetwork/Acala/tree/master/runtime/acala" ContentLicense="CC BY-SA 4.0" />
  <row Id="25454" PostHistoryTypeId="2" PostId="6642" RevisionGUID="45f04c70-15f4-44c5-b672-612f26750d4c" CreationDate="2023-01-09T20:52:42.907" UserId="3679" Text="I use both Visual Studio Enterprise and Visual Studio Code as IDEs. I'm trying to learn how to build substrate pallets. I found this plugin, but it's no longer supported. https://marketplace.visualstudio.com/items?itemName=paritytech.vscode-substrate&amp;ssr=false#overview Does anyone know of a good VSC extension for substrate development? Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="25456" PostHistoryTypeId="1" PostId="6642" RevisionGUID="45f04c70-15f4-44c5-b672-612f26750d4c" CreationDate="2023-01-09T20:52:42.907" UserId="3679" Text="Visual Studio Code support for Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25457" PostHistoryTypeId="3" PostId="6642" RevisionGUID="45f04c70-15f4-44c5-b672-612f26750d4c" CreationDate="2023-01-09T20:52:42.907" UserId="3679" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25458" PostHistoryTypeId="2" PostId="6643" RevisionGUID="c65b9775-aea3-4b49-af01-01b41ca9fc3f" CreationDate="2023-01-09T21:31:13.710" UserId="1811" Text="Note: Having installed substrate-contracts-node and Contracts UI I can easily deploy and interact with an ink! Smart contract&#xD;&#xA;&#xD;&#xA;I am following the ink! Tutorial here https://use.ink/basics/cross-contract-calling/&#xD;&#xA;&#xD;&#xA;A&gt; I cargo +nighlty create new both ink! smart contracts &quot;other_contract&quot; and &quot;MyContract&quot;. &#xD;&#xA;After successful compilation of the &quot;other_contract&quot; when I try to compile &quot;MyContract&quot; it errors saying it cannot find the other_contract module&#xD;&#xA;&#xD;&#xA;After doing all the above I also found this post https://substrate.stackexchange.com/questions/2797/what-is-the-best-way-to-make-a-cross-contract-call-on-ink  which suggests this is deprecated. Is this correct or there is a way to fix this please?&#xD;&#xA;&#xD;&#xA;I am only trying to achieve as per the tutorial example calling one ink! sc method from within another&#xD;&#xA;&#xD;&#xA;B&gt; Moved on to https://github.com/paritytech/ink/tree/master/examples/delegator&#xD;&#xA;&#xD;&#xA;Trying to compile this using $ sh build-all.sh&#xD;&#xA;It errors &#xD;&#xA;ERROR: No 'ink_lang' dependency found&#xD;&#xA;&#xD;&#xA;(similar to https://substrate.stackexchange.com/questions/5443/delegator-based-contract-causes-ui-interface-to-crash )&#xD;&#xA;&#xD;&#xA;I have tried replacing&#xD;&#xA;ink = { path = &quot;../../crates/ink&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;With&#xD;&#xA;&#xD;&#xA;ink_primitives = { version = &quot;3.3&quot;, default-features = false }&lt;br&gt;&#xD;&#xA;ink_metadata = { version = &quot;3.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&lt;br&gt;&#xD;&#xA;ink_env = { version = &quot;3.3&quot;, default-features = false } &lt;br&gt;&#xD;&#xA;ink_storage = { version = &quot;3.3&quot;, default-features = false } &lt;br&gt;&#xD;&#xA;ink_lang = { version = &quot;3.3&quot;, default-features = false } &lt;br&gt;&#xD;&#xA;basically following the pattern ink! sc we get with the default contract cargo contract new flipper&lt;br&gt;&#xD;&#xA;But with no success&#xD;&#xA;&#xD;&#xA;I would be grateful if anyone has a fix for either of the above solutions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25460" PostHistoryTypeId="1" PostId="6643" RevisionGUID="c65b9775-aea3-4b49-af01-01b41ca9fc3f" CreationDate="2023-01-09T21:31:13.710" UserId="1811" Text="ink! cross-contract calling tutorial does not compile" ContentLicense="CC BY-SA 4.0" />
  <row Id="25461" PostHistoryTypeId="3" PostId="6643" RevisionGUID="c65b9775-aea3-4b49-af01-01b41ca9fc3f" CreationDate="2023-01-09T21:31:13.710" UserId="1811" Text="|ink|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25462" PostHistoryTypeId="2" PostId="6644" RevisionGUID="f425b58c-87dd-4afb-aadc-3bc3e2932c67" CreationDate="2023-01-10T02:29:34.757" UserId="2844" Text="A: `cannot find the other_contract module` errors say that you haven't included `other_contract` model in Cargo.toml file. You can take a reference [from this Cargo.toml file][1] in line 19 &amp; 40 for this specific issue. &#xD;&#xA;&#xD;&#xA;B: In order to compile ink! [master branch code example][2], you must have installed [cargo-contract v2.2.0-beta][3], then you can compile example code by using `cargo contract build` command.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/swanky-dapps/marketplace/blob/main/contracts/marketplace/Cargo.toml#L19&#xD;&#xA;  [2]: https://github.com/paritytech/ink/tree/master/examples/delegator&#xD;&#xA;  [3]: https://github.com/paritytech/ink/blob/master/CHANGELOG.md#compatibility" ContentLicense="CC BY-SA 4.0" />
  <row Id="25464" PostHistoryTypeId="5" PostId="6644" RevisionGUID="545b7120-97cc-4b3b-a402-4d9db0f3a963" CreationDate="2023-01-10T04:07:50.250" UserId="2844" Comment="added 105 characters in body" Text="A: `cannot find the other_contract module` errors say that you haven't included `other_contract` model in Cargo.toml file. You can take a reference [from this Cargo.toml file][1] in line 19 &amp; 40 for this specific issue and don't forgot to add &quot;rlib&quot; to the crate-type options under &quot;cdylib&quot; in your other_contract/Cargo.toml.&#xD;&#xA;&#xD;&#xA;B: In order to compile ink! [master branch code example][2], you must have installed [cargo-contract v2.2.0-beta][3], then you can compile example code by using `cargo contract build` command.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/swanky-dapps/marketplace/blob/main/contracts/marketplace/Cargo.toml#L19&#xD;&#xA;  [2]: https://github.com/paritytech/ink/tree/master/examples/delegator&#xD;&#xA;  [3]: https://github.com/paritytech/ink/blob/master/CHANGELOG.md#compatibility" ContentLicense="CC BY-SA 4.0" />
  <row Id="25465" PostHistoryTypeId="2" PostId="6645" RevisionGUID="89c57d40-7cce-4d75-8c7a-ea693a203760" CreationDate="2023-01-10T04:23:02.650" UserId="3077" Text="I am asking this on behalf of some of the builders in the community. Will subxt get an update for the v0.9.36 (Polkadot equivalent) branch? On a broader level - How do we check Subxt's compatibility with Polkadot versions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25467" PostHistoryTypeId="1" PostId="6645" RevisionGUID="89c57d40-7cce-4d75-8c7a-ea693a203760" CreationDate="2023-01-10T04:23:02.650" UserId="3077" Text="How do we check Subxt's compatibility (or any Substrate product's compatibility) with Polkadot versions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25468" PostHistoryTypeId="3" PostId="6645" RevisionGUID="89c57d40-7cce-4d75-8c7a-ea693a203760" CreationDate="2023-01-10T04:23:02.650" UserId="3077" Text="|polkadot|subxt|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25469" PostHistoryTypeId="2" PostId="6646" RevisionGUID="0078f63b-6bd5-431f-8ad6-0a519cc3ad53" CreationDate="2023-01-10T04:25:12.267" UserId="2909" Text="Answer is originally found [here][1]. Subxt doesn't currently need to &quot;track&quot; versions of Polkadot for the most part, since many parts of the API that can change (the available pallets, transactions, storage items and such) are handled via metadat codegen, and so as long as you keep the metadata that you're using to generate the Subxt interface up to date, things will hopefully continue to work.&#xD;&#xA;&#xD;&#xA;The exception is if Substrate/Polkadot changes some of the types uses in the general RPC interface (such as the shape of errors or reponses from certain methods). It generally should aim to avoid this, but from time to time such breakagaes do happen, and in many cases we can spot and fix them via our nightly test run using latest Substrate.&#xD;&#xA;&#xD;&#xA;That all said, things do slip through and in those cases, we will give priority to resolving any such issues that are reported [here][2] :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt/issues/756&#xD;&#xA;  [2]: https://github.com/paritytech/subxt/issues" ContentLicense="CC BY-SA 4.0" />
  <row Id="25471" PostHistoryTypeId="2" PostId="6647" RevisionGUID="f015d4e6-20da-4883-8499-e7c11477c7c6" CreationDate="2023-01-10T04:34:21.037" UserId="3077" Text="In, general I would say do check out the Tools section for [Awesome Substrate][1]. More specifically on VSCode, I think what will be helpful on your IDE setup would be similar to what is helpful on a Rust programming setup. I would recommend [watching something like this][2] to get a sense of what plugins might come in handy.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/awesome-substrate#tools&#xD;&#xA;  [2]: https://www.youtube.com/watch?v=x_iZEK6Rww4" ContentLicense="CC BY-SA 4.0" />
  <row Id="25473" PostHistoryTypeId="2" PostId="6648" RevisionGUID="f98b9f7d-c0b9-4631-9168-5211da4c91c0" CreationDate="2023-01-10T05:02:44.913" UserId="2844" Text="I have added `contract/logics` in contracts because your `contract/commons` is different. I think you have generated this folder using `cargo new commons`? instead you can use `cargo contract new logics` command to create new contract. I have fixed your code. Include logics  = `{ path = &quot;../logics&quot;, default-features = false, features = [&quot;ink-as-dependency&quot;] }` inside dependencies of test/Cargo.toml and include &quot;`commons/std`&quot; inside std. Aslo don't forgot to add &quot;`rlib`&quot; to the crate-type options under &quot;cdylib&quot; in your `logics/Cargo.toml`. I have [included github.com repo of the code][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/123oli/fix-code" ContentLicense="CC BY-SA 4.0" />
  <row Id="25475" PostHistoryTypeId="5" PostId="6644" RevisionGUID="dd653b1e-8733-4540-9cd9-365e8274705b" CreationDate="2023-01-10T05:07:09.837" UserId="2844" Comment="added 32 characters in body" Text="A: `cannot find the other_contract module` errors say that you haven't included `other_contract` model in Cargo.toml file. You can take a reference [from this Cargo.toml file][1] in line 19 &amp; 40 for this specific issue and don't forgot to add &quot;rlib&quot; to the crate-type options under &quot;cdylib&quot; in your other_contract/Cargo.toml, &quot;rlib&quot; is used to generate ABI.&#xD;&#xA;&#xD;&#xA;B: In order to compile ink! [master branch code example][2], you must have installed [cargo-contract v2.2.0-beta][3], then you can compile example code by using `cargo contract build` command.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/swanky-dapps/marketplace/blob/main/contracts/marketplace/Cargo.toml#L19&#xD;&#xA;  [2]: https://github.com/paritytech/ink/tree/master/examples/delegator&#xD;&#xA;  [3]: https://github.com/paritytech/ink/blob/master/CHANGELOG.md#compatibility" ContentLicense="CC BY-SA 4.0" />
  <row Id="25476" PostHistoryTypeId="2" PostId="6649" RevisionGUID="d32cfec8-99f7-4929-ab05-ab0c37d7e2ff" CreationDate="2023-01-10T06:56:38.757" UserId="2281" Text="i am following this tutorial https://substrate.recipes/hybrid-consensus.html trying to make a Hybrid pow/pos based consensus node i also watched Joshy Orndorff demonstration on  hybrid consensus with Proof of Work authoring and Proof of Stake finality. https://youtu.be/6omrrY11HEg. but i  am facing some issue blocks are not getting finalized?[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ehR7o.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25478" PostHistoryTypeId="1" PostId="6649" RevisionGUID="d32cfec8-99f7-4929-ab05-ab0c37d7e2ff" CreationDate="2023-01-10T06:56:38.757" UserId="2281" Text="Hybrid Pow/Pos Consensus Node Blocks are not being finalized?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25479" PostHistoryTypeId="3" PostId="6649" RevisionGUID="d32cfec8-99f7-4929-ab05-ab0c37d7e2ff" CreationDate="2023-01-10T06:56:38.757" UserId="2281" Text="|polkadot|substrate-recipes|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25480" PostHistoryTypeId="2" PostId="6650" RevisionGUID="e7e06f4a-cc9a-4216-938f-dda6b9f19b0d" CreationDate="2023-01-10T07:39:20.697" UserId="139" Text="In the parachain template we see this snip of code:&#xD;&#xA;```rust&#xD;&#xA;// Collator support. The order of these 4 are important and shall not change.&#xD;&#xA;		Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,&#xD;&#xA;		CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;} = 21,&#xD;&#xA;		Session: pallet_session::{Pallet, Call, Storage, Event, Config&lt;T&gt;} = 22,&#xD;&#xA;		Aura: pallet_aura::{Pallet, Storage, Config&lt;T&gt;} = 23,&#xD;&#xA;		AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My question is regarding the comment, why does the ordering of these pallets matter? Is this some quirk of `construct_runtime!`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25482" PostHistoryTypeId="1" PostId="6650" RevisionGUID="e7e06f4a-cc9a-4216-938f-dda6b9f19b0d" CreationDate="2023-01-10T07:39:20.697" UserId="139" Text="Why is the ordering for the following collator support modules important?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25483" PostHistoryTypeId="3" PostId="6650" RevisionGUID="e7e06f4a-cc9a-4216-938f-dda6b9f19b0d" CreationDate="2023-01-10T07:39:20.697" UserId="139" Text="|parachain|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25484" PostHistoryTypeId="2" PostId="6651" RevisionGUID="d5602868-025c-4fc7-8b3d-4a24614d8157" CreationDate="2023-01-10T08:51:09.423" UserId="139" Text="I have a situation where I uploaded the genesis wasm and state to the relay chain network, and then proceeded to make a few changes to the parachain node after that and compile it. When I ran the new parachain node I was greeted with : &#xD;&#xA;```&#xD;&#xA;Could not find the header of the genesis block in the database! block_hash=0xb2..1e&#xD;&#xA;```&#xD;&#xA;Instead of trying to purge and restart my relay chain network (which already has paraID 2000 registered), I am trying to salvage the situation for educational reasons.&#xD;&#xA;&#xD;&#xA;For this I did the following:&#xD;&#xA;&#xD;&#xA;1. Regenerate raw chain spec for the parachain, purge the old parachain database, run the parachain with new chain spec.&#xD;&#xA;2. export the genesis-wasm and genesis-state for this parachain and upload it to the relay chain with a sudo call to `paras.forceSetCurrentCode(2000, newCode)` and `paras.forceSetCurrentHead(2000, newHead)`.&#xD;&#xA;3. Restart parachain node.&#xD;&#xA;&#xD;&#xA;The error still persists and my parachain refuses to build new blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="25486" PostHistoryTypeId="1" PostId="6651" RevisionGUID="d5602868-025c-4fc7-8b3d-4a24614d8157" CreationDate="2023-01-10T08:51:09.423" UserId="139" Text="How to rescue a parachain from &quot;Could not find header of the genesis block in the database&quot; error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25487" PostHistoryTypeId="3" PostId="6651" RevisionGUID="d5602868-025c-4fc7-8b3d-4a24614d8157" CreationDate="2023-01-10T08:51:09.423" UserId="139" Text="|parachain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25488" PostHistoryTypeId="6" PostId="6650" RevisionGUID="ca5b45f4-209f-46c3-9556-90507d645154" CreationDate="2023-01-10T08:51:41.323" UserId="139" Comment="edited tags" Text="|parachain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25489" PostHistoryTypeId="2" PostId="6652" RevisionGUID="4042b04b-afdd-46c1-8cf2-4f6f5a0bd28f" CreationDate="2023-01-10T09:49:12.570" UserId="73" Text="The order of your pallets in `construct_runtime!` defines the order in which `on_initialize`, `on_finalize` etc is being called. These pallets probably have some connection between them and require that `on_initialize` etc is called in this fixed order.&#xD;&#xA;&#xD;&#xA;Edit: I just checked the code and I don't see any reason for `CollatorSelection` in there. For `Authorship` it makes sense, because it determines the current author in `on_initialize` and this should be done before `Session` may initializes a new session with new authorities." ContentLicense="CC BY-SA 4.0" />
  <row Id="25491" PostHistoryTypeId="2" PostId="6653" RevisionGUID="98846603-78e5-44e4-ac3f-a49ff2570cb9" CreationDate="2023-01-10T10:00:43.877" UserId="377" Text="I want to implement the nft application on substrate. I just want to know what the the options/resources we are having which can help me in this?&#xD;&#xA;Please share if you are having anything?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25493" PostHistoryTypeId="1" PostId="6653" RevisionGUID="98846603-78e5-44e4-ac3f-a49ff2570cb9" CreationDate="2023-01-10T10:00:43.877" UserId="377" Text="What are the options we are having to implement nft on substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25494" PostHistoryTypeId="3" PostId="6653" RevisionGUID="98846603-78e5-44e4-ac3f-a49ff2570cb9" CreationDate="2023-01-10T10:00:43.877" UserId="377" Text="|pallet|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25495" PostHistoryTypeId="2" PostId="6654" RevisionGUID="9c0fd4fc-4d1b-43c2-a00a-a87fa8c6a461" CreationDate="2023-01-10T10:07:27.547" UserId="377" Text="When i am running my parachain i am getting this issue in staring of the chain this logs comes for some time then after few minutes the parachain works as expected.&#xD;&#xA;this issue also comes any time during the chain running for few minutes.&#xD;&#xA;&#xD;&#xA;Please help me if you have something which can help me in this issue[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/4tMpN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25497" PostHistoryTypeId="1" PostId="6654" RevisionGUID="9c0fd4fc-4d1b-43c2-a00a-a87fa8c6a461" CreationDate="2023-01-10T10:07:27.547" UserId="377" Text="Collation wasn't advertised to any validator. version: polkadot-v0.9.36" ContentLicense="CC BY-SA 4.0" />
  <row Id="25498" PostHistoryTypeId="3" PostId="6654" RevisionGUID="9c0fd4fc-4d1b-43c2-a00a-a87fa8c6a461" CreationDate="2023-01-10T10:07:27.547" UserId="377" Text="|polkadot|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25499" PostHistoryTypeId="2" PostId="6655" RevisionGUID="32eb9649-26d3-4c53-a72d-0efb48a3b061" CreationDate="2023-01-10T10:30:29.347" UserId="3437" Text="This might be a weird question. We are preparing our parachain for Polkadot. We have deployed our parachain on testnet, which we have connected with Rococo. &#xD;&#xA;&#xD;&#xA;We have generated chain specs for testnet and mainnet on our testnet server. Our plan is to use this mainnet spec(which we have generated on testnet server) on mainnet server.&#xD;&#xA;&#xD;&#xA;Can we use this spec or we have to create chain spec only on mainnet server?&#xD;&#xA;&#xD;&#xA;Can anyone please help me to provide this information? Thanks in advance.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25501" PostHistoryTypeId="1" PostId="6655" RevisionGUID="32eb9649-26d3-4c53-a72d-0efb48a3b061" CreationDate="2023-01-10T10:30:29.347" UserId="3437" Text="Should we generate chain spec only on corresponding servers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25502" PostHistoryTypeId="3" PostId="6655" RevisionGUID="32eb9649-26d3-4c53-a72d-0efb48a3b061" CreationDate="2023-01-10T10:30:29.347" UserId="3437" Text="|polkadot|rococo|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25503" PostHistoryTypeId="2" PostId="6656" RevisionGUID="ac98447f-a908-4cd0-9cf7-de92fd4d268c" CreationDate="2023-01-10T10:30:48.577" UserId="3317" Text="For a general overview and real life ecosystem examples have a look at the [polkadot wiki NFTs][1]. In addition, the [uniques pallet][2] implemented on statemint is something you could look into!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-nft&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/frame/uniques" ContentLicense="CC BY-SA 4.0" />
  <row Id="25505" PostHistoryTypeId="2" PostId="6657" RevisionGUID="9c2286a7-b791-4639-ad9b-0af0f923f111" CreationDate="2023-01-10T10:34:50.527" UserId="251" Text="IIUC, build spec is just build the chain genesis state from the given genesis config.&#xD;&#xA;&#xD;&#xA;It doesn't like benchmark.&#xD;&#xA;&#xD;&#xA;You can do that anywhere." ContentLicense="CC BY-SA 4.0" />
  <row Id="25507" PostHistoryTypeId="5" PostId="6654" RevisionGUID="26795e4d-b990-4339-95b1-0979ec022e1e" CreationDate="2023-01-10T10:51:38.750" UserId="377" Comment="added 69 characters in body" Text="When i am running my parachain i am getting this issue in staring of the chain this logs comes for some time then after few minutes the parachain works as expected.&#xD;&#xA;this issue also comes any time during the chain running for few minutes.&#xD;&#xA;&#xD;&#xA;And during this issue the parachain cannot produce any new block.&#xD;&#xA;&#xD;&#xA;Please help me if you have something which can help me in this issue[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/4tMpN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25508" PostHistoryTypeId="2" PostId="6658" RevisionGUID="005786bc-447d-4604-ad1d-cbc22cf46bc2" CreationDate="2023-01-10T11:54:16.927" UserId="3414" Text="In my opinion to avoid this error and to produce and finalize blocks on parachain you need to add the same account in your relay chain that you added in session keys of parachain and then register the paraid from that account only." ContentLicense="CC BY-SA 4.0" />
  <row Id="25510" PostHistoryTypeId="5" PostId="6658" RevisionGUID="5c1040df-7eae-473c-b9aa-92ff945af90a" CreationDate="2023-01-10T12:10:15.277" UserId="3414" Comment="added 12 characters in body" Text="I have faced the same error and to avoid this and to produce and finalize blocks on parachain you need to add the same account in your relay chain that you added in session keys of parachain and then register the paraid from that account only." ContentLicense="CC BY-SA 4.0" />
  <row Id="25511" PostHistoryTypeId="52" PostId="6645" RevisionGUID="e6539767-4c66-45a0-b3e0-3b6cf6d7f376" CreationDate="2023-01-10T12:24:26.933" />
  <row Id="25512" PostHistoryTypeId="5" PostId="6656" RevisionGUID="900dfa6e-60d6-44fe-bb7c-c1fea03186e2" CreationDate="2023-01-10T12:24:40.647" UserId="3317" Comment="added 73 characters in body" Text="For a general overview and real life ecosystem examples have a look at the [polkadot wiki NFTs][1]. In addition, the [NFTs pallet][2] and the  [Uniques pallet][3] are definitely worth looking into!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-nft&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/frame/nfts&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/master/frame/uniques" ContentLicense="CC BY-SA 4.0" />
  <row Id="25513" PostHistoryTypeId="5" PostId="6654" RevisionGUID="a10f1a09-72a4-48b6-af9f-8329145dafad" CreationDate="2023-01-10T12:58:05.370" UserId="377" Comment="deleted 135 characters in body" Text="When i am start running my parachain i am getting this issue Collation wasn't advertised to any validator.&#xD;&#xA;During this issue the parachain cannot produce and block also.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please help me if you have something which can help me in this issue[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/4tMpN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25514" PostHistoryTypeId="5" PostId="6653" RevisionGUID="cd993267-7129-474f-8254-56d3e9e90bcc" CreationDate="2023-01-10T12:58:47.797" UserId="3317" Comment="This is a useful question which can be iterated on through the future. Just improved the grammer :)" Text="I want to implement NFTs on a substrate chain. Could someone provide options/resources which can help me accomplish this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25515" PostHistoryTypeId="4" PostId="6653" RevisionGUID="cd993267-7129-474f-8254-56d3e9e90bcc" CreationDate="2023-01-10T12:58:47.797" UserId="3317" Comment="This is a useful question which can be iterated on through the future. Just improved the grammer :)" Text="How to implement NFTs on a substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25516" PostHistoryTypeId="24" PostId="6653" RevisionGUID="cd993267-7129-474f-8254-56d3e9e90bcc" CreationDate="2023-01-10T12:58:47.797" Comment="Proposed by 3317 approved by 377 edit id of 367" ContentLicense="CC BY-SA 4.0" />
  <row Id="25517" PostHistoryTypeId="5" PostId="2276" RevisionGUID="326153a8-4de8-4447-90d5-809ef25239b6" CreationDate="2023-01-10T13:08:46.207" UserId="2025" Comment="fix tutorial link" Text="I was following this tutorial all the way up to registering a parachain ID.&#xD;&#xA;https://docs.substrate.io/tutorials/connect-relay-and-parachains/connect-a-local-parachain/#register-with-the-local-relay-chain&#xD;&#xA;&#xD;&#xA;My parachain is based on polkadot-v0.9.18, a little old, with the latest(I think) Polkadot browser app v0.113.1.&#xD;&#xA;&#xD;&#xA;I chose Option 1: paraSudoWrapper.sudoScheduleParaInitialize&#xD;&#xA;&#xD;&#xA;Polkadot browser app -&gt; Developer -&gt; Extrinsics &gt; submission tab&#xD;&#xA;-&gt; paraSudoWrapper -&gt; sudoScheduleParaInitialize(id, genesis)&#xD;&#xA;&#xD;&#xA;In the extrinsics parameters, specify:&#xD;&#xA;- Account = ALICE&#xD;&#xA;- Set the id: ParaId to 2000&#xD;&#xA;- genesisHead: upload the file para-2000-genesis (from the previous step)&#xD;&#xA;- validationCode: upload the file para-2000-wasm (from the previous step)&#xD;&#xA;- Set the parachain: Bool option to Yes&#xD;&#xA;- click on &quot;Submit Transaction&quot;&#xD;&#xA;&#xD;&#xA;Green tick: parasSudoWrapper.sudoScheduleParaInitialize inblock&#xD;&#xA;&#xD;&#xA;Red error: System.ExtrinsicFailed: Bad Origin&#xD;&#xA;&#xD;&#xA;Blue light bulb: balances.Withdraw, balances.Deposit, extrinsic event&#xD;&#xA;&#xD;&#xA;It seems the tutorial is a little out of date, not mentioning about which account to use... but what did I do wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25518" PostHistoryTypeId="24" PostId="2276" RevisionGUID="326153a8-4de8-4447-90d5-809ef25239b6" CreationDate="2023-01-10T13:08:46.207" Comment="Proposed by 2025 approved by 1789 edit id of 366" ContentLicense="CC BY-SA 4.0" />
  <row Id="25519" PostHistoryTypeId="6" PostId="6633" RevisionGUID="5b5c97cf-a12c-430c-8ee9-9b2d896bb5dc" CreationDate="2023-01-10T13:18:47.250" UserId="262" Comment="edited tags" Text="|polkadot|parachain|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25520" PostHistoryTypeId="2" PostId="6659" RevisionGUID="fd6d4615-24cf-410e-9744-c1451e1edbb5" CreationDate="2023-01-10T14:13:00.290" UserId="2147" Text="From my understanding how the runtime store its state adding an extra storage variable like&#xD;&#xA;``` rust&#xD;&#xA;  pub Verified (get fn is_verified): map hasher(blake2_128_concat) us64 =&gt; ();&#xD;&#xA;```&#xD;&#xA;to a pallet that already has storage state like&#xD;&#xA;``` rust&#xD;&#xA;  pub Member (get fn membership_info): map hasher(blake2_128_concat) u64 =&gt; Member;&#xD;&#xA;```&#xD;&#xA;With `Member` being say a `struct` containing various fields.&#xD;&#xA;&#xD;&#xA;This **Should Not** require a runtime upgrade. But if I decide to add a boolean flag to the `Member` data structure then a runtime upgrade is required.&#xD;&#xA;Am I correct in all of this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25522" PostHistoryTypeId="1" PostId="6659" RevisionGUID="fd6d4615-24cf-410e-9744-c1451e1edbb5" CreationDate="2023-01-10T14:13:00.290" UserId="2147" Text="Is migration required after adding an extra storage map to a pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="25523" PostHistoryTypeId="3" PostId="6659" RevisionGUID="fd6d4615-24cf-410e-9744-c1451e1edbb5" CreationDate="2023-01-10T14:13:00.290" UserId="2147" Text="|runtime|runtime-upgrade|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25524" PostHistoryTypeId="2" PostId="6660" RevisionGUID="995e4a81-b897-4c21-8991-3021c6436892" CreationDate="2023-01-10T14:52:23.550" UserId="73" Text="Yes you are correct.&#xD;&#xA;&#xD;&#xA;Adding new storage types do not require any migrations. However, they are also not present in the storage. So, if you require that a storage item is set to a certain value, you need a migration to initialize the value.&#xD;&#xA;&#xD;&#xA;If you are changing the `Member` struct by adding or removing a value, you are changing its encoded format and require a migration to fix up all storage items." ContentLicense="CC BY-SA 4.0" />
  <row Id="25526" PostHistoryTypeId="2" PostId="6661" RevisionGUID="de79e72b-806f-4bcc-a732-aaeb7a19a9c7" CreationDate="2023-01-10T15:29:19.493" UserId="165" Text="Yeah, the answer provided is correct.&#xD;&#xA;&#xD;&#xA;Your chain specification is not the same than your node specification. The former identifies the chain you will be launching or connecting to, this details genesis state, network id, bootnodes, properties and more info as such.&#xD;&#xA;&#xD;&#xA;On the other side, for the runtime your network will be running you want to run [benchmarks][1], and from the results of these benchmarks you will be able to provide &quot;required&quot; node specifications (ram, cpu, disk space...). But running benchmarks is when you want to be a bit more cautions on what hardware these are running, as that will affect the results. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/test/benchmark/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25528" PostHistoryTypeId="2" PostId="6662" RevisionGUID="f1237e38-5434-4b43-ad18-40a219bc5581" CreationDate="2023-01-10T15:38:42.230" UserId="2762" Text="With PolkadotJS you can get information about a specific referendum with this code:&#xD;&#xA;&#xD;&#xA;    const referenda = await api.query.referenda.referendumInfoFor(48);&#xD;&#xA;    console.log(`Referenda: ${JSON.stringify(referenda.toHuman())}`);&#xD;&#xA;&#xD;&#xA;And you get the total number of ayes and nayes votes, with other information:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;    Referenda: {&quot;Ongoing&quot;:{&quot;track&quot;:&quot;0&quot;,&quot;origin&quot;:{&quot;system&quot;:&quot;Root&quot;},&quot;proposal&quot;:{&quot;Lookup&quot;:{&quot;hash_&quot;:&quot;0x4bdd1d956c24c6dc9ce1c07f6c3cc1a82d5db63dc6d895bdd5a035f60ef58006&quot;,&quot;len&quot;:&quot;106&quot;}},&quot;enactment&quot;:{&quot;After&quot;:&quot;100&quot;},&quot;submitted&quot;:&quot;16,019,459&quot;,&quot;submissionDeposit&quot;:{&quot;who&quot;:&quot;DrQ3WAwSyMsZpaUvwP11j63QJC2wmGUH3BWPoxj5kqgA3A1&quot;,&quot;amount&quot;:&quot;33,333,333,333&quot;},&quot;decisionDeposit&quot;:null,&quot;deciding&quot;:null,&quot;tally&quot;:{&quot;ayes&quot;:&quot;24,025,722,234,946,176&quot;,&quot;nays&quot;:&quot;72,721,623,600,000,000&quot;,&quot;support&quot;:&quot;17,151,464,474,841,370&quot;},&quot;inQueue&quot;:false,&quot;alarm&quot;:[&quot;16,221,059&quot;,[&quot;16,221,059&quot;,&quot;0&quot;]]}}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[Is this one in Kusama][1]&#xD;&#xA;&#xD;&#xA;Also you can get the list of all referendums (Finished and OnGoing):&#xD;&#xA;&#xD;&#xA;    const allEntries = await api.query.democracy.referendumInfoOf.entries();&#xD;&#xA;        allEntries.forEach(([{ args: [id] }, referendum]) =&gt; {&#xD;&#xA;            console.log(`${id}: Referendum: ${JSON.stringify(referendum.toHuman())}`);&#xD;&#xA;     });&#xD;&#xA;&#xD;&#xA;But if you want to see who vote in that referendum I suggest you to use the SUBSCAN API, the endpoint [/scan/democracy/votes][2] where you can get the voters specifying the referendum ID.&#xD;&#xA;&#xD;&#xA;This is what Polkassembly is using to get all the voters. Check their [code here][2].&#xD;&#xA;&#xD;&#xA;```js    &#xD;&#xA;     fetch(`https://kusama.api.subscan.io/api/scan/democracy/votes`,&#xD;&#xA;			{&#xD;&#xA;				body: JSON.stringify({&#xD;&#xA;					page: currentPage,&#xD;&#xA;					referendum_index: referendumId,&#xD;&#xA;					row: 10&#xD;&#xA;				}),&#xD;&#xA;				headers: subscanApiHeaders,&#xD;&#xA;				method: 'POST'&#xD;&#xA;			}).then(async (res) =&gt; {&#xD;&#xA;			const votersData = await res.json();&#xD;&#xA;&#xD;&#xA;			if(votersData &amp;&amp; votersData.data &amp;&amp; votersData.data.list) {&#xD;&#xA;				if(!count) {&#xD;&#xA;					setCount(votersData.data.count);&#xD;&#xA;				}&#xD;&#xA;				setVotersList(votersData.data.list);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			setLoadingStatus({&#xD;&#xA;				isLoading: false,&#xD;&#xA;				message: 'Loading Data'&#xD;&#xA;			});&#xD;&#xA;		}).catch((err) =&gt; {&#xD;&#xA;			console.error('Error in fetching vote data:', err);&#xD;&#xA;		});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://kusama.polkassembly.io/referenda/48&#xD;&#xA;  [2]: https://support.subscan.io/#democracy-votes&#xD;&#xA;  [3]: https://i.stack.imgur.com/qS88x.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25530" PostHistoryTypeId="2" PostId="6663" RevisionGUID="8acb4f5f-34d2-4735-b490-135d92df6b65" CreationDate="2023-01-10T16:25:51.410" UserId="2762" Text="The api.query.democracy.votingOf  is the right way to get the conviction value, it should not always return the same value `{conviction: &quot;Locked1x&quot;, vote: &quot;Nay&quot;}`&#xD;&#xA;&#xD;&#xA;An example:&#xD;&#xA;&#xD;&#xA;See this referendum on Polkadot: https://polkadot.polkassembly.io/referendum/95&#xD;&#xA;&#xD;&#xA;The address `1hbyB383QeqwGNAHj439MKSnx3JMM1fzrXMAPtNfn6v3Smz` has placed 10 DOT with a 6x Conviction (see below the image from Polkassembly)&#xD;&#xA;&#xD;&#xA;With this code:&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io')&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const votesOf = await api.query.democracy.votingOf(&quot;1hbyB383QeqwGNAHj439MKSnx3JMM1fzrXMAPtNfn6v3Smz&quot;);&#xD;&#xA;    console.log(`${JSON.stringify(votesOf.toHuman())}`);&#xD;&#xA;&#xD;&#xA;We get the list of votes, and we can see that in the referendum with id 95 it has voted `{&quot;conviction&quot;:&quot;Locked6x&quot;,&quot;vote&quot;:&quot;Aye&quot;}` :&#xD;&#xA;&#xD;&#xA;    {&quot;Direct&quot;:{&quot;votes&quot;:[[&quot;95&quot;,{&quot;Standard&quot;:{&quot;vote&quot;:{&quot;conviction&quot;:&quot;Locked6x&quot;,&quot;vote&quot;:&quot;Aye&quot;},&quot;balance&quot;:&quot;100,000,000,000&quot;}}]],&quot;delegations&quot;:{&quot;votes&quot;:&quot;0&quot;,&quot;capital&quot;:&quot;0&quot;},&quot;prior&quot;:[&quot;0&quot;,&quot;0&quot;]}}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To know what can be wrong with your response, which is the id of the referendum where you are voting? and the address of the voter? and in which network are you voting?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2lLTT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25532" PostHistoryTypeId="2" PostId="6664" RevisionGUID="7c25114a-d79e-470e-877d-2bac2d92ae4b" CreationDate="2023-01-10T16:41:56.350" UserId="2762" Text="To the Daan's question I I would like to add: &#xD;&#xA;&#xD;&#xA;- A tutorial from the Parity Blog [How we created 50K Unique NFTs for Polkadot Decoded 2022][1] .&#xD;&#xA;&#xD;&#xA;- A project from the ecosystem, [RMRK][2]: a set of NFT legos that give NFTs infinite extensibility, hosted on the Kusama blockchain&#xD;&#xA;&#xD;&#xA;- A video tutorial from sub0 about [Build an NFT Marketplace in an Hour][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.parity.io/blog/how-we-created-50K-NFTs-for-Polkadot-Decoded-2022-in-one-month?utm_source=linkedin&amp;utm_medium=social&amp;utm_campaign=50k%20nfts&amp;utm_content=parity&#xD;&#xA;  [2]: https://www.rmrk.app/&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=7BNn47lfrV0" ContentLicense="CC BY-SA 4.0" />
  <row Id="25534" PostHistoryTypeId="52" PostId="6653" RevisionGUID="7ab239b6-0f9b-4664-923e-6b23be46a811" CreationDate="2023-01-10T18:00:57.460" />
  <row Id="25535" PostHistoryTypeId="2" PostId="6665" RevisionGUID="3926b26d-bbf7-46c2-b688-022210d46737" CreationDate="2023-01-10T19:05:26.303" UserId="3691" Text="When I try to create a subscription from a custom pallet, it doesn't return a `UnsubscribePromise` (like the native ones), but returns a `Promise&lt;Codec&gt;`, even though I added a callback as the last parameter, just like explained here: `https://polkadot.js.org/docs/api/start/api.query.subs/`&#xD;&#xA;&#xD;&#xA;eg: (using `https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbrainstorm.invarch.network#/explorer`)&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// THIS RETURNS A UNSUB&#xD;&#xA;const unsub = api.rpc.chain.subscribeNewHeads((header) =&gt; {&#xD;&#xA;  setCurrentBlock(header.number.toNumber());&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;// THIS RETURNS A PROMISE&lt;CODEC&gt;&#xD;&#xA;const promise = api.query.ocifStaking.nextEraStartingBlock((blockNumber: Codec) =&gt; {&#xD;&#xA;  setNextEraBlock(blockNumber.toPrimitive() as number);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If this is intended, why? &#xD;&#xA;&#xD;&#xA;If not, how do I define the correct type on my RPC call on the frontend?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25537" PostHistoryTypeId="1" PostId="6665" RevisionGUID="3926b26d-bbf7-46c2-b688-022210d46737" CreationDate="2023-01-10T19:05:26.303" UserId="3691" Text="UnsubscribePromise not being returned from subscription" ContentLicense="CC BY-SA 4.0" />
  <row Id="25538" PostHistoryTypeId="3" PostId="6665" RevisionGUID="3926b26d-bbf7-46c2-b688-022210d46737" CreationDate="2023-01-10T19:05:26.303" UserId="3691" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25539" PostHistoryTypeId="2" PostId="6666" RevisionGUID="b4afa318-c7df-48d0-8e02-9a0239abb447" CreationDate="2023-01-10T19:28:57.100" UserId="3265" Text="I'm wondering about weights. The docs are quite outdated here and I do not understand what is going on. I've managed to create benchmarks and generate a weight.rs.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/examples/basic/src/weights.rs has SubstrateWeight and WeightInfo whereas it seems that the tutorial suggest to write WeightInfo somewhat as a copy &amp; paste from SubstrateWeight in what looks to me like a lot of redundant code, because they only differ in the database weights they assume. There is no explanation whatsoever.&#xD;&#xA;&#xD;&#xA;The weight.rs is generated as WeightInfo which seems to be required to be renamed to SubstrateWeight in order for things to work.&#xD;&#xA;&#xD;&#xA;This feels cumbersome. Can someone share some light on how this is all meant&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25541" PostHistoryTypeId="1" PostId="6666" RevisionGUID="b4afa318-c7df-48d0-8e02-9a0239abb447" CreationDate="2023-01-10T19:28:57.100" UserId="3265" Text="Using Autogenerated Weights" ContentLicense="CC BY-SA 4.0" />
  <row Id="25542" PostHistoryTypeId="3" PostId="6666" RevisionGUID="b4afa318-c7df-48d0-8e02-9a0239abb447" CreationDate="2023-01-10T19:28:57.100" UserId="3265" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25543" PostHistoryTypeId="2" PostId="6667" RevisionGUID="0d8cbfc4-7113-4d0d-8bd6-26037a1c99e3" CreationDate="2023-01-10T20:42:37.240" UserId="94" Text="There is no manual editing necessary, also no Copy &amp; Paste. Generating weights for a pallet works with the `benchmark pallet` command. &#xD;&#xA;&#xD;&#xA;Depending on where you want to use your Pallet weights, you may want to use different templates.  &#xD;&#xA;If you are operating in the Substrate repo; You can look at other pallet `weight.rs` files to see examples, eg the [Example](https://github.com/paritytech/substrate/blob/b324e511771b4e2d809d8319b98f3e36083c9ee2/frame/examples/basic/src/weights.rs#L26) that you linked.  &#xD;&#xA;As you notice: A special `--template` is used. This is the FRAME template and only really makes sense for Substrate itself. It produces a config dependent `SubstrateWeight&lt;T&gt;`, which third party down-stream projects like Polkadot *can* use. Instead of doing that they should rather benchmark themselves.  &#xD;&#xA;Using these default weights looks like [this](https://github.com/paritytech/substrate/blob/4350c70b55ea683f25cb0a58d207cdc860a90d77/bin/node/runtime/src/lib.rs#L230):  &#xD;&#xA;```rust&#xD;&#xA;type SystemWeightInfo = frame_system::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;```&#xD;&#xA;Or when you are doing testing and just need *some* weight:  &#xD;&#xA;```rust&#xD;&#xA;type WeightInfo = ();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now if you are not in the Substrate repo but say in Polkadot: Looking at any of the runtime files you can see that it is not using any of the `SubstrateWeight` or `()` implementations. Rather it has its own weight definitions in the [`weights/`](https://github.com/paritytech/polkadot/blob/c80124e3bd7c75690aa179b050cb7e1144629a6a/runtime/polkadot/src/weights/pallet_balances.rs#L24) folder.  &#xD;&#xA;The Polkadot runtime then uses these weights [here](https://github.com/paritytech/polkadot/blob/c80124e3bd7c75690aa179b050cb7e1144629a6a/runtime/polkadot/src/lib.rs#L307) like this:  &#xD;&#xA;```rust&#xD;&#xA;type WeightInfo = weights::pallet_balances::WeightInfo&lt;Runtime&gt;;&#xD;&#xA;```&#xD;&#xA;This is important, since weights are runtime-dependent. The `WeightInfo` trait is always the same though.  &#xD;&#xA;You can go even further and implement [mocked weights](https://github.com/paritytech/substrate/blob/4350c70b55ea683f25cb0a58d207cdc860a90d77/frame/message-queue/src/mock.rs#L112)." ContentLicense="CC BY-SA 4.0" />
  <row Id="25546" PostHistoryTypeId="12" PostId="6664" RevisionGUID="448f6b66-fa2f-4f08-9210-a53d20d0fbf7" CreationDate="2023-01-11T01:43:38.153" UserId="28" Comment="Converted to Comment" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="25547" PostHistoryTypeId="13" PostId="6664" RevisionGUID="16b37bfd-08b4-4b97-af12-5261ccc634c0" CreationDate="2023-01-11T01:44:00.673" UserId="28" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:28,&quot;DisplayName&quot;:&quot;Shawn Tabrizi&quot;}]}" />
  <row Id="25552" PostHistoryTypeId="33" PostId="6580" RevisionGUID="536896c1-14ac-4d1e-b338-6ea1481cf10f" CreationDate="2023-01-11T05:08:11.380" UserId="3468" Comment="16" />
  <row Id="25555" PostHistoryTypeId="2" PostId="6670" RevisionGUID="de4f418c-3333-435a-adf8-52557f981c8d" CreationDate="2023-01-11T07:46:48.640" UserId="2713" Text="I was wondering about the number of reads and writes when draining a StorageMap which consists of `n` items. Is the answer `(n, 1)` or `(n, n)`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25557" PostHistoryTypeId="1" PostId="6670" RevisionGUID="de4f418c-3333-435a-adf8-52557f981c8d" CreationDate="2023-01-11T07:46:48.640" UserId="2713" Text="Number of and writes of StorageMap drain" ContentLicense="CC BY-SA 4.0" />
  <row Id="25558" PostHistoryTypeId="3" PostId="6670" RevisionGUID="de4f418c-3333-435a-adf8-52557f981c8d" CreationDate="2023-01-11T07:46:48.640" UserId="2713" Text="|storage|weight|migration|storagemap|performance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25560" PostHistoryTypeId="5" PostId="1548" RevisionGUID="b66df160-f9c4-4085-aa5a-abbdf964c3c5" CreationDate="2023-01-11T08:59:51.350" UserId="234" Comment="Updated links of &quot;macro&quot; &amp; StorageMap type" Text="It's not standard Rust syntax because it makes use of the `#[pallet::storage]` macro. Please have a look at the official documentation for [the macro](https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html#storage-palletstorage-optional) and the [StorageMap type](https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageMap.html) for more information. &#xD;&#xA;&#xD;&#xA;In short, &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn some_map)]&#xD;&#xA;pub(super) type SomeMap&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, SomeKey, SomeValue, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;sets up a StorageMap with name `SomeMap` for `SomeKey =&gt; SomeValue` with getter function `some_map` using the `Blake2_128Concat` hasher. `ValueQuery` states that the resulting value lookup is not wrapped into an Option, which would be the case if you were using `OptionQuery` (default implementation of the QueryKind generic).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25561" PostHistoryTypeId="2" PostId="6671" RevisionGUID="a13ffdc0-8f58-41bb-aad6-c008dadcbd4e" CreationDate="2023-01-11T09:08:58.927" UserId="2762" Text="`(n, n)` You have to iterate all the storage and perform and update on each element (In your case removing the element).&#xD;&#xA;&#xD;&#xA;Not sure if you are implementing it yourself, but you have a function [drain()][1] that does that.&#xD;&#xA;&#xD;&#xA;    let mut drained_keys = MyStorageMap::iter_keys().drain().collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/storage/trait.IterableStorageMap.html#tymethod.drain" ContentLicense="CC BY-SA 4.0" />
  <row Id="25563" PostHistoryTypeId="2" PostId="6672" RevisionGUID="027ac26a-022c-44f0-ad5b-f2e12f32e799" CreationDate="2023-01-11T09:13:17.300" UserId="251" Text="I'm not professional on this.&#xD;&#xA;&#xD;&#xA;But these are what I found.&#xD;&#xA;&#xD;&#xA;https://github.dev/paritytech/substrate/blob/cb63d3dafc986faf5f2181288737ba8513253a02/frame/support/src/storage/mod.rs#L900&#xD;&#xA;&#xD;&#xA;`next_key` cost 1 read. `kill` cost 1 write.&#xD;&#xA;&#xD;&#xA;The `kill` interacts with the storage overlay. I'm not sure if there is any optimization.&#xD;&#xA;&#xD;&#xA;Basically, `(n, n)`." ContentLicense="CC BY-SA 4.0" />
  <row Id="25565" PostHistoryTypeId="2" PostId="6673" RevisionGUID="df73bc4d-6a4c-4bca-9b10-b95702fdc639" CreationDate="2023-01-11T10:20:01.950" UserId="3265" Text="I ended up using https://github.com/PureStake/moonbeam/blob/master/benchmarking/frame-weight-template.hbs as a template and followed the source, completly ignoring the official docs that seem to be a mashup of various conflicting versions.&#xD;&#xA;&#xD;&#xA;Put it in `/benchmarking` and run this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`./target/release/your-node benchmark pallet --chain dev --pallet pallet_dao_core --extrinsic '*' --steps 20 --repeat 10 --output pallets/dao-core/src/weights.rs --template ./benchmarking/frame-weight-template.hbs`&#xD;&#xA;&#xD;&#xA;Then you can import the weights using&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub mod weights;&#xD;&#xA;use weights::WeightInfo;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The upper template creates the correct Weights for testing:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// For mocks rs&#xD;&#xA;type WeightInfo = ();&#xD;&#xA;/// For your runtime&#xD;&#xA;type WeightInfo = pallet_your_pallet::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I stand being corrected, but the default used without a template is not usable.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25567" PostHistoryTypeId="2" PostId="6674" RevisionGUID="31b7cd28-0c78-4221-9996-7adb379441fd" CreationDate="2023-01-11T10:35:31.370" UserId="2762" Text="I am running the [Frontier-Node-Template][1] and using the library Web3JS to generate EVM transactions following the [Moonbeam guide][2].&#xD;&#xA;&#xD;&#xA;    const Web3 = require('web3');&#xD;&#xA;    const web3 = new Web3('ws://127.0.0.1:9944');&#xD;&#xA;&#xD;&#xA;I am generating my Account using:&#xD;&#xA;&#xD;&#xA;    ./target/release/frontier-template-node key generate&#xD;&#xA;&#xD;&#xA;The account generated:&#xD;&#xA;&#xD;&#xA;      Secret phrase:     worth wrestle meat ecology merry ginger online glad soda usage peasant lava&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x8e940c2a136dadf87c3b4b408866ff5fb1cbb64893a933493341c5e400a81690&#xD;&#xA;      Public key (hex):  0x381faf1906bf0ea763e7e25f110b26b880680d55bed21f52b76d9d5973fcee6e&#xD;&#xA;      Account ID:        0x381faf1906bf0ea763e7e25f110b26b880680d55bed21f52b76d9d5973fcee6e&#xD;&#xA;      Public key (SS58): 5DLHx6nDCn9EiYHryuyELhvsDKBmZGwLZthSdD3cshjAzusN&#xD;&#xA;      SS58 Address:      5DLHx6nDCn9EiYHryuyELhvsDKBmZGwLZthSdD3cshjAzusN&#xD;&#xA;&#xD;&#xA;Following the [tutorial from the Substrate Docs][3] I calculated the Ethereum Address for my account, basically truncating the Public key (hex) value above: `0x381faf1906bf0ea763e7e25f110b26b880680d55`&#xD;&#xA;&#xD;&#xA;With an Account that has funds, I sent some funds into this account. I check the Balance and works fine:&#xD;&#xA;&#xD;&#xA;    const balanceTo = web3.utils.fromWei(await web3.eth.getBalance(&quot;0x381faf1906bf0ea763e7e25f110b26b880680d55&quot;), 'ether');&#xD;&#xA;    console.log(`The balance of 0x381faf1906bf0ea763e7e25f110b26b880680d55 is: ${balanceTo} ETH`);&#xD;&#xA;&#xD;&#xA;    The balance of 0x381faf1906bf0ea763e7e25f110b26b880680d55 is: 2.4999999999999995 ETH&#xD;&#xA;&#xD;&#xA;Now I want to send funds from this account, **and my question is how I calculate the ETH private key of this account?**&#xD;&#xA;&#xD;&#xA;I have tried with the Secret seed and to generate an Ethereum wallet from the mnemonic phrase:&#xD;&#xA;&#xD;&#xA;    const { Wallet } = require('ethers');&#xD;&#xA;    const myWalletMnemonic = &quot;worth wrestle meat ecology merry ginger online glad soda usage peasant lava&quot;;&#xD;&#xA;    const wallet = Wallet.fromMnemonic(myWalletMnemonic);&#xD;&#xA;&#xD;&#xA;But when sending the transfer:&#xD;&#xA;&#xD;&#xA;    const createTransaction = await web3.eth.accounts.signTransaction(&#xD;&#xA;        {&#xD;&#xA;          gas: 21000,&#xD;&#xA;          to: accountFrom.address,&#xD;&#xA;          value: web3.utils.toWei('1', 'ether'),&#xD;&#xA;        },&#xD;&#xA;        wallet.privateKey&#xD;&#xA;      );&#xD;&#xA;     const createReceipt = await web3.eth.sendSignedTransaction(createTransaction.rawTransaction);&#xD;&#xA;&#xD;&#xA;I am getting an error:&#xD;&#xA;&#xD;&#xA;    Error: Returned error: submit transaction to pool failed: Pool(InvalidTransaction(InvalidTransaction::Payment))&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/frontier-node-template/&#xD;&#xA;  [2]: https://docs.moonbeam.network/builders/build/eth-api/libraries/web3js/&#xD;&#xA;  [3]: https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25569" PostHistoryTypeId="1" PostId="6674" RevisionGUID="31b7cd28-0c78-4221-9996-7adb379441fd" CreationDate="2023-01-11T10:35:31.370" UserId="2762" Text="Private key for EVM Frontier" ContentLicense="CC BY-SA 4.0" />
  <row Id="25570" PostHistoryTypeId="3" PostId="6674" RevisionGUID="31b7cd28-0c78-4221-9996-7adb379441fd" CreationDate="2023-01-11T10:35:31.370" UserId="2762" Text="|frontier|evm|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25571" PostHistoryTypeId="2" PostId="6675" RevisionGUID="42460a1c-b9cc-4368-901c-6d344a5abf6c" CreationDate="2023-01-11T10:43:22.890" UserId="251" Text="IIUC, these are two different crypto systems.&#xD;&#xA;&#xD;&#xA;The public key works. But it doesn't mean anything.&#xD;&#xA;&#xD;&#xA;You can even make a transfer to `0x12345...`. But you don't know its private key.&#xD;&#xA;&#xD;&#xA;You need to generate the private key correctly first. Then uses its public key.&#xD;&#xA;&#xD;&#xA;In Rust, it should be https://github.com/hack-ink/eth-key/blob/main/src/main.rs.&#xD;&#xA;&#xD;&#xA;In your code, it might be `web3.account.generate()`. I'm not familiar with that.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The `node key generate` equals `subkey generate`.&#xD;&#xA;&#xD;&#xA;You should use Ethereum key tool." ContentLicense="CC BY-SA 4.0" />
  <row Id="25573" PostHistoryTypeId="2" PostId="6676" RevisionGUID="68606eae-dd42-486f-b8f3-e1e60d5881d6" CreationDate="2023-01-11T10:50:23.470" UserId="2673" Text="You should set it to the workspace directory, as the message suggests. That would be `/root/code/darwinia-network/darwinia-2.0` in your case." ContentLicense="CC BY-SA 4.0" />
  <row Id="25584" PostHistoryTypeId="5" PostId="6675" RevisionGUID="6603450c-b33d-4fb3-a0f3-2742dd7c70a0" CreationDate="2023-01-11T12:43:13.120" UserId="251" Comment="added 362 characters in body" Text="IIUC, these are two different crypto systems.&#xD;&#xA;&#xD;&#xA;The public key works. But it doesn't mean anything.&#xD;&#xA;&#xD;&#xA;You can even make a transfer to `0x12345...`. But you don't know its private key.&#xD;&#xA;&#xD;&#xA;You need to generate the private key correctly first. Then uses its public key.&#xD;&#xA;&#xD;&#xA;In Rust, it should be https://github.com/hack-ink/eth-key/blob/main/src/main.rs.&#xD;&#xA;&#xD;&#xA;In your code, it might be `web3.account.generate()`. I'm not familiar with that.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The `node key generate` equals `subkey generate`.&#xD;&#xA;&#xD;&#xA;You should use Ethereum key tool.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You made some mistakes about the frontier framework.&#xD;&#xA;&#xD;&#xA;In low level, the account storage is `frame_system::AccountInfo`.&#xD;&#xA;&#xD;&#xA;So, Alice's balances data is in there. You could use `Alice`'s public key to query the data.&#xD;&#xA;&#xD;&#xA;And in EVM, there is a mapping address. Which is the truncated `Alice`'s public key. So, there is no private key for that address. You should use the source account to control the mapping account. It just feels like a deriving." ContentLicense="CC BY-SA 4.0" />
  <row Id="25585" PostHistoryTypeId="5" PostId="6675" RevisionGUID="35bb35ee-b2a4-4a53-8891-7ff9f204b0ce" CreationDate="2023-01-11T12:48:27.803" UserId="251" Comment="added 362 characters in body" Text="IIUC, these are two different crypto systems.&#xD;&#xA;&#xD;&#xA;The public key works. But it doesn't mean anything.&#xD;&#xA;&#xD;&#xA;You can even make a transfer to `0x12345...`. But you don't know its private key.&#xD;&#xA;&#xD;&#xA;You need to generate the private key correctly first. Then uses its public key.&#xD;&#xA;&#xD;&#xA;In Rust, it should be https://github.com/hack-ink/eth-key/blob/main/src/main.rs.&#xD;&#xA;&#xD;&#xA;In your code, it might be `web3.account.generate()`. I'm not familiar with that.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The `node key generate` equals `subkey generate`.&#xD;&#xA;&#xD;&#xA;You should use Ethereum key tool.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You made some mistakes about the frontier framework.&#xD;&#xA;&#xD;&#xA;In low level, the account storage is `frame_system::AccountInfo`.&#xD;&#xA;&#xD;&#xA;So, Alice's balances data is in there. You could use `Alice`'s public key to query the data.&#xD;&#xA;&#xD;&#xA;And in EVM, there is a mapping address. Which is the truncated `Alice`'s public key. So, there is no private key for that address. You should use the source account to control the mapping account. It just feels like a deriving.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;                   substrate address&#xD;&#xA;                 /&#xD;&#xA;pallet storage -      | truncate&#xD;&#xA;                 \&#xD;&#xA;                   evm address&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If your account is Substrate account. You can interact with Substrate. And use it to control the mapping account to interact with EVM.&#xD;&#xA;&#xD;&#xA;If your account is EVM account. You can only use it to interact with EVM. And if you provide a mapping algorithm from `H160 to H256` then you can use it to control the mapping account to interact with Substrate.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25586" PostHistoryTypeId="5" PostId="6675" RevisionGUID="90fdadb2-15d3-47e6-8047-6acf412cae6a" CreationDate="2023-01-11T12:56:41.423" UserId="251" Comment="added 153 characters in body" Text="IIUC, these are two different crypto systems.&#xD;&#xA;&#xD;&#xA;The public key works. But it doesn't mean anything.&#xD;&#xA;&#xD;&#xA;You can even make a transfer to `0x12345...`. But you don't know its private key.&#xD;&#xA;&#xD;&#xA;You need to generate the private key correctly first. Then uses its public key.&#xD;&#xA;&#xD;&#xA;In Rust, it should be https://github.com/hack-ink/eth-key/blob/main/src/main.rs.&#xD;&#xA;&#xD;&#xA;In your code, it might be `web3.account.generate()`. I'm not familiar with that.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The `node key generate` equals `subkey generate`.&#xD;&#xA;&#xD;&#xA;You should use Ethereum key tool.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You made some mistakes about the frontier framework.&#xD;&#xA;&#xD;&#xA;In low level, the account storage is `frame_system::AccountInfo`.&#xD;&#xA;&#xD;&#xA;So, Alice's balances data is in there. You could use `Alice`'s public key to query the data.&#xD;&#xA;&#xD;&#xA;And in EVM, there is a mapping address. Which is the truncated `Alice`'s public key. So, there is no private key for that address. You should use the source account to control the mapping account. It just feels like a deriving.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;                   substrate address&#xD;&#xA;                 /&#xD;&#xA;pallet storage -      | truncate&#xD;&#xA;                 \&#xD;&#xA;                   evm address&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If your account is Substrate account. You can interact with Substrate. And use it to control the mapping account to interact with EVM.&#xD;&#xA;&#xD;&#xA;If your account is EVM account. You can only use it to interact with EVM. And if you provide a mapping algorithm from `H160 to H256` then you can use it to control the mapping account to interact with Substrate.&#xD;&#xA;&#xD;&#xA;Here's how Darwinia did:&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/blob/6a9392cfb9fe2c99b1c2b47d0c36125d61991bb7/frame/support/src/evm.rs#L89&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/blob/6a9392cfb9fe2c99b1c2b47d0c36125d61991bb7/frame/support/src/evm.rs#L62" ContentLicense="CC BY-SA 4.0" />
  <row Id="25587" PostHistoryTypeId="5" PostId="6675" RevisionGUID="44734783-285b-4dbe-9023-168d19e74d0b" CreationDate="2023-01-11T13:01:41.780" UserId="251" Comment="added 153 characters in body" Text="IIUC, these are two different crypto systems.&#xD;&#xA;&#xD;&#xA;The public key works. But it doesn't mean anything.&#xD;&#xA;&#xD;&#xA;You can even make a transfer to `0x12345...`. But you don't know its private key.&#xD;&#xA;&#xD;&#xA;You need to generate the private key correctly first. Then uses its public key.&#xD;&#xA;&#xD;&#xA;In Rust, it should be https://github.com/hack-ink/eth-key/blob/main/src/main.rs.&#xD;&#xA;&#xD;&#xA;In your code, it might be `web3.account.generate()`. I'm not familiar with that.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The `node key generate` equals `subkey generate`.&#xD;&#xA;&#xD;&#xA;You should use Ethereum key tool.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You made some mistakes about the frontier framework.&#xD;&#xA;&#xD;&#xA;In low level, the account storage is `frame_system::AccountInfo`.&#xD;&#xA;&#xD;&#xA;So, Alice's balances data is in there. You could use `Alice`'s public key to query the data.&#xD;&#xA;&#xD;&#xA;And in EVM, there is a mapping address. Which is the truncated `Alice`'s public key. So, there is no private key for that address. You should use the source account to control the mapping account. It just feels like a deriving.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;                   substrate address&#xD;&#xA;                 /&#xD;&#xA;pallet storage -      | truncate&#xD;&#xA;                 \&#xD;&#xA;                   evm address&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If your account is Substrate account. You can interact with Substrate. And use it to control the mapping account to interact with EVM.&#xD;&#xA;&#xD;&#xA;If your account is EVM account. You can only use it to interact with EVM. And if you provide a mapping algorithm from `H160 to H256` then you can use it to control the mapping account to interact with Substrate.&#xD;&#xA;&#xD;&#xA;In default, frontier only provides `H256` to `H160`.&#xD;&#xA;&#xD;&#xA;`H160` to `H256` is our customization.&#xD;&#xA;&#xD;&#xA;Here's how Darwinia did:&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/blob/6a9392cfb9fe2c99b1c2b47d0c36125d61991bb7/frame/support/src/evm.rs#L89&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-common/blob/6a9392cfb9fe2c99b1c2b47d0c36125d61991bb7/frame/support/src/evm.rs#L62" ContentLicense="CC BY-SA 4.0" />
  <row Id="25588" PostHistoryTypeId="50" PostId="6315" RevisionGUID="a6b0f4cb-522a-4ea0-a9be-6f80406795e6" CreationDate="2023-01-11T14:02:50.370" UserId="-1" />
  <row Id="25589" PostHistoryTypeId="2" PostId="6679" RevisionGUID="44b45630-1bea-4d79-a8eb-70859c9dfd43" CreationDate="2023-01-11T17:03:12.817" UserId="377" Text="Polkadot version i am using is: V0.9.36.&#xD;&#xA;I am running the parachain with local environment on server.&#xD;&#xA;The parachain sudden stopping producing the blocks.&#xD;&#xA;I have looked at the logs but not get any leads from there.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/spGAG.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/pUgFk.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="25591" PostHistoryTypeId="1" PostId="6679" RevisionGUID="44b45630-1bea-4d79-a8eb-70859c9dfd43" CreationDate="2023-01-11T17:03:12.817" UserId="377" Text="On Server parachain sudden stopped producing block" ContentLicense="CC BY-SA 4.0" />
  <row Id="25592" PostHistoryTypeId="3" PostId="6679" RevisionGUID="44b45630-1bea-4d79-a8eb-70859c9dfd43" CreationDate="2023-01-11T17:03:12.817" UserId="377" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25593" PostHistoryTypeId="2" PostId="6680" RevisionGUID="5428491a-cc1b-4f8f-b951-127a03a84b8a" CreationDate="2023-01-11T18:39:52.987" UserId="14" Text="&gt; my question is how I calculate the ETH private key of this account?&#xD;&#xA;&#xD;&#xA;There is no way to do that =/&#xD;&#xA;&#xD;&#xA;The most important thing to note here is that the mnemonic:&#xD;&#xA;&#xD;&#xA;&gt; worth wrestle meat ecology merry ginger online glad soda usage peasant&#xD;&#xA;&gt; lava&#xD;&#xA;&#xD;&#xA;results in a public_key X on Substrate and in a public_key Y on EVM, due the fact that Substrate uses different crypto system than Ethereum's (like @aurevoirxavier said).&#xD;&#xA;&#xD;&#xA;One thing that you can do is to use Frontier node (PolkadotJS) to sign and send Ethereum Transactions (`Developer -&gt; Extrinsics -&gt; evm.call(...)`) using your created address: `5DLHx6nDCn9EiYHryuyELhvsDKBmZGwLZthSdD3cshjAzusN`&#xD;&#xA;&#xD;&#xA;That way, the `pallet_evm` will translate that `AccountId` (`5DLHx6nDCn9EiYHryuyELhvsDKBmZGwLZthSdD3cshjAzusN`) into EVM's `0x381faf1906bf0ea763e7e25f110b26b880680d55` and things should work." ContentLicense="CC BY-SA 4.0" />
  <row Id="25601" PostHistoryTypeId="5" PostId="6622" RevisionGUID="1e756509-9c96-485d-9db5-604ddfaa38d9" CreationDate="2023-01-11T21:06:36.050" UserId="2673" Comment="Syntax highlighting + name typos" Text="I faced the same issue. The following steps helped me resolve it.&#xD;&#xA;&#xD;&#xA;First, I removed the import of `pallet_contracts::DefaultContractAccessWeight`&#xD;&#xA;&#xD;&#xA;I added this line `pub const DeletionQueueDepth: u32 = 128;` to `parameter_types!`. So your new block should look something like this&#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DepositPerItem: Balance = deposit(1, 0);&#xD;&#xA;	pub const DepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;	pub const DeletionQueueDepth: u32 = 128;&#xD;&#xA;	pub const UnsafeUnstableInterface: bool = false;&#xD;&#xA;	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * BlockWeights::get().max_block;&#xD;&#xA;	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally I changed the arguments `Config`. The final code looks like&#xD;&#xA;```rust&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	type CallFilter = frame_support::traits::Nothing;&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;	type MaxStorageKeyLen = ConstU32&lt;{ 512 * 1024 }&gt;;&#xD;&#xA;	type UnsafeUnstableInterface = UnsafeUnstableInterface;&#xD;&#xA;	type MaxDebugBufferLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It is possible that this code may not work in the future. All you need to do is the go the source code of the `pallet_contracts` and add/remove the argument according to the code. Use dummy argument. The compiler's debugger will do a good job in directing you to the right code." ContentLicense="CC BY-SA 4.0" />
  <row Id="25602" PostHistoryTypeId="24" PostId="6622" RevisionGUID="1e756509-9c96-485d-9db5-604ddfaa38d9" CreationDate="2023-01-11T21:06:36.050" Comment="Proposed by 2673 approved by 34 edit id of 368" ContentLicense="CC BY-SA 4.0" />
  <row Id="25603" PostHistoryTypeId="5" PostId="702" RevisionGUID="7cd0b0d6-8a5a-4709-af57-06eeb1ea9743" CreationDate="2023-01-11T21:06:56.757" UserId="2025" Comment="fix link to diagramn" Text="I am a curious learner and on my way of understanding the core principles of the Substrate universe + going through the tutorials on substrate.io.&#xD;&#xA;&#xD;&#xA;As far as I understood is: there exists a Core Runtime (chain runtime) and this runtime can be extended with default pallets (aka runtime modules) from FRAME or own developed runtime modules.&#xD;&#xA;&#xD;&#xA;**2 questions** arose when I had a look at [this diagram](https://docs.substrate.io/static/26bc9a1dad7d0bb2198e86a5ee6dd885/0fb04/runtime-and-frame.avif) that shows the architectural overview of FRAME:&#xD;&#xA;&#xD;&#xA;1. Are system modules a kind of add ons to Runtime modules (aka Pallets) and CAN be used but it is NOT a must?&#xD;&#xA;&#xD;&#xA;2. If system modules are a kind of 'nice to have', do they change the structure of the Runtime / Runtime modules in any way?&#xD;&#xA;&#xD;&#xA;Thank you in advance and let me know, if more information is required or my request doesn't meet the *StackExchange* principles. &#xD;&#xA;&#xD;&#xA;I appreciate your time and work on that!&#xD;&#xA;&#xD;&#xA;BR&#xD;&#xA;Cindy&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25604" PostHistoryTypeId="24" PostId="702" RevisionGUID="7cd0b0d6-8a5a-4709-af57-06eeb1ea9743" CreationDate="2023-01-11T21:06:56.757" Comment="Proposed by 2025 approved by 34 edit id of 365" ContentLicense="CC BY-SA 4.0" />
  <row Id="25606" PostHistoryTypeId="2" PostId="6682" RevisionGUID="3efc3931-4fe7-461a-8b10-1e939cbd178f" CreationDate="2023-01-11T23:26:04.810" UserId="87" Text="The answer to this question is about how the relaychain and the parachain reach consensus as to the correct validation code that should be used.&#xD;&#xA;&#xD;&#xA;The process is that when you first authorize the upgrade, what actually happens is that the collators include the hash in a block, and then pass the block to the relaychain validators to validate. Once they have validated it, the hash will be stored in the relaychain blockchain.&#xD;&#xA;&#xD;&#xA;The impact of this is that you must wait to enact the upgrade on the parachain side. If you don't wait, then it is possible that the relaychain has not yet stored the new hash (ie it has not yet been stored in a block), and is therefore rejecting an attempt to replace the existing validation code, with a new one.&#xD;&#xA;&#xD;&#xA;But that's not the end of the story. &#xD;&#xA;&#xD;&#xA;Firstly anyone can enact the upgrade - you do not need the Sudo user to do that, so it can be done as soon as the relaychain is aware that a new validation code is coming, and as long as the sender sends the correct validation code, with the enactment transaction.&#xD;&#xA;&#xD;&#xA;Secondly, you will have to wait one hour for the code to be enacted even after you send a successful transaction - this delay is set by the relaychain, so that the collators and relaychain are prepared to start using the new validation code at the same block/time.&#xD;&#xA;&#xD;&#xA;One last point to make is that - at least on Polkadot - your parachain cannot be upgraded for a further 13800 blocks, approximately 23 hours. This is what is known as the upgrade cooldown period. Once that cooldown period is over, you can upgrade again, but you must follow this process again with all the same delays.&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="25608" PostHistoryTypeId="2" PostId="6683" RevisionGUID="639e5dc8-611b-4d80-b857-b1fa3677f2a7" CreationDate="2023-01-12T04:06:48.423" UserId="251" Text="Check your parachain's slot lease. Maybe it gets downgraded.&#xD;&#xA;&#xD;&#xA;This is pretty common. If you are using Rococo local." ContentLicense="CC BY-SA 4.0" />
  <row Id="25610" PostHistoryTypeId="2" PostId="6684" RevisionGUID="1cb1982c-f643-4fc9-bdc6-d1181818c4c7" CreationDate="2023-01-12T06:14:46.910" UserId="3690" Text="I want to write a script that runs node01, node02, node03 in relay chain network setup. &#xD;&#xA;&#xD;&#xA;How do I get local node identity generated from running node 01? &#xD;&#xA;Also I am confused on how the first validator node decides the order to use keys from chain-spec. &#xD;&#xA;Chain is either substrate/polkadot/rococo-local &#xD;&#xA;```&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;--base-path /data/node01 \&#xD;&#xA;--chain ./customSpecRaw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9944 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--no-telemetry \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-methods Unsafe \  &#xD;&#xA;&#xD;&#xA;var local_id = ??&#xD;&#xA;echo &quot;Run node02&quot;&#xD;&#xA;&#xD;&#xA;./target/release/polkadot  --base-path /data/node02   --chain ./customSpecRaw.json   --port 30334   --ws-external --ws-port 9945   --rpc-external --rpc-port 9934 --rpc-cors all  --no-telemetry --validator   --rpc-methods Unsafe --name MyNode02   --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/$local_id&#xD;&#xA;```&#xD;&#xA;Please help me in writing a script that uses node1's peerID to run other validator nodes&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25612" PostHistoryTypeId="1" PostId="6684" RevisionGUID="1cb1982c-f643-4fc9-bdc6-d1181818c4c7" CreationDate="2023-01-12T06:14:46.910" UserId="3690" Text="How to get PeerID or local node identity in bash script to enable running other node using it as bootnode in a command in script?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25613" PostHistoryTypeId="3" PostId="6684" RevisionGUID="1cb1982c-f643-4fc9-bdc6-d1181818c4c7" CreationDate="2023-01-12T06:14:46.910" UserId="3690" Text="|polkadot|substrate-node-template|relay-chain|nodes|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25614" PostHistoryTypeId="2" PostId="6685" RevisionGUID="b7c89901-5a55-46e5-be09-00e0facb2759" CreationDate="2023-01-12T06:20:48.643" UserId="3696" Text="We are trying to achieve staking automation to nominationPool.&#xD;&#xA; &#xD;&#xA;Is there any solution to get the number of bonded &amp; unbound (unlocked) funds using the Polakdot-JS API?&#xD;&#xA;&#xD;&#xA;We would like to fetch the amount(number) of funds in the nomination pool so that we could withdraw them automatically. &#xD;&#xA;&#xD;&#xA;Thank you, &#xD;&#xA;The Starfish team" ContentLicense="CC BY-SA 4.0" />
  <row Id="25616" PostHistoryTypeId="1" PostId="6685" RevisionGUID="b7c89901-5a55-46e5-be09-00e0facb2759" CreationDate="2023-01-12T06:20:48.643" UserId="3696" Text="Polkadot-JS wallet staking automation" ContentLicense="CC BY-SA 4.0" />
  <row Id="25617" PostHistoryTypeId="3" PostId="6685" RevisionGUID="b7c89901-5a55-46e5-be09-00e0facb2759" CreationDate="2023-01-12T06:20:48.643" UserId="3696" Text="|polkadot-js|staking|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25618" PostHistoryTypeId="2" PostId="6686" RevisionGUID="f4a8bcd0-4867-48ff-982a-c413d379e4f5" CreationDate="2023-01-12T07:37:55.303" UserId="251" Text="You can boot your node with:&#xD;&#xA;```&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then copy the id from your terminal and paste/hardcode it into your script. Because you specify a node key, it won't change.&#xD;&#xA;&#xD;&#xA;If you don't want to use `00..` as your node key. You can generate yours from subkey. And use it while booting your node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subkey generate-node-key --file node-key&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="25620" PostHistoryTypeId="5" PostId="6686" RevisionGUID="2542fd38-f9c7-4770-a4d3-7a67b4f8f2b6" CreationDate="2023-01-12T08:41:49.797" UserId="251" Comment="added 312 characters in body" Text="You can boot your node with:&#xD;&#xA;```&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then copy the id from your terminal and paste/hardcode it into your script. Because you specify a node key, it won't change.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If you don't want to use `00..` as your node key. You can generate yours from subkey. And use it while booting your node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subkey generate-node-key --file node-key&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Or you could specify the `--node-key-file xxx`. If `xxx` doesn't exist, then the node will create it for you. And use the `curl http://127.0.0.1:9933 -X POST -H &quot;Content-Type:application/json&quot; -d '{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;system_localPeerId&quot;,&quot;params&quot;:[],&quot;id&quot;:1}'` to get the peer id, then use it." ContentLicense="CC BY-SA 4.0" />
  <row Id="25621" PostHistoryTypeId="2" PostId="6687" RevisionGUID="99148bcc-4e5e-4fe0-9b12-58405dfcaa4f" CreationDate="2023-01-12T08:54:38.350" UserId="1959" Text="In general for local test, we can use Developer-Sudo `slots.forceLease` on rococo-local to force lease slots for your local parachain.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Touj5.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25623" PostHistoryTypeId="2" PostId="6688" RevisionGUID="fd81bee6-0b34-4618-886a-5b01942de289" CreationDate="2023-01-12T09:08:54.037" UserId="2762" Text="To get the basic info of the storage of the pool &#xD;&#xA;&#xD;&#xA;    const bondedPools = await api.query.nominationPools.bondedPools(pool_id);&#xD;&#xA;    console.log(`----- Storage for bonded pools: ${bondedPools} -----`);&#xD;&#xA;&#xD;&#xA;And to get the rewards accumulated for the pool (When a members payout is claimed, the balance comes out for here):&#xD;&#xA;&#xD;&#xA;    const rewardPools = await api.query.nominationPools.rewardPools(pool_id);&#xD;&#xA;    console.log(`-----  Reward pools: ${rewardPools} -----`);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then if you want to automate the process to join a pool, nominate, bond tokens.... check the docs about how to call a Extrinsic with PolkadotJS: https://polkadot.js.org/docs/substrate/extrinsics/#nominationpools " ContentLicense="CC BY-SA 4.0" />
  <row Id="25625" PostHistoryTypeId="2" PostId="6689" RevisionGUID="6c27d739-b0e5-497c-9c62-0917680a7a58" CreationDate="2023-01-12T09:22:53.713" UserId="3676" Text="I finally solved this issue.&#xD;&#xA;&#xD;&#xA;The `Public key (hex)` returned by the substrate command line `./target/release/frontier-template-node key generate --scheme Sr25519` does not worked for the `evm` accounts configuration in `customSpec.yml`.&#xD;&#xA;&#xD;&#xA;I generated the right public key by calling the `privateKeyToAccount` function of Web3.js:&#xD;&#xA;```&#xD;&#xA;import Web3Accounts from 'web3-eth-accounts';&#xD;&#xA;const ethPublicKey = new Web3Accounts().privateKeyToAccount(privateKey).address;&#xD;&#xA;```&#xD;&#xA;Then the eth balance is correctly assign to my sudo account at the initialization of my local blockchain and I can use it to make transaction and fund other accounts." ContentLicense="CC BY-SA 4.0" />
  <row Id="25627" PostHistoryTypeId="5" PostId="6688" RevisionGUID="c07afd8d-b278-4ab7-bcff-0c67aeca2946" CreationDate="2023-01-12T09:34:45.733" UserId="2762" Comment="added 267 characters in body" Text="To get the basic info of the storage of the pool &#xD;&#xA;&#xD;&#xA;    const bondedPools = await api.query.nominationPools.bondedPools(pool_id);&#xD;&#xA;    console.log(`----- Storage for bonded pools: ${bondedPools} -----`);&#xD;&#xA;&#xD;&#xA;And to get the rewards accumulated for the pool (When a members payout is claimed, the balance comes out for here):&#xD;&#xA;&#xD;&#xA;    const rewardPools = await api.query.nominationPools.rewardPools(pool_id);&#xD;&#xA;    console.log(`-----  Reward pools: ${rewardPools} -----`);&#xD;&#xA;&#xD;&#xA;To get the information for a certain pool member (With their Account ID):&#xD;&#xA;&#xD;&#xA;    const poolMemberInfo = await api.query.nominationPools.poolMembers(&quot;13KTxXt8FnzoraYSkQNddrmb6sTvEY2VKyg8J9c1jRGPzF5D&quot;);&#xD;&#xA;    console.log(`-----  Member Info: ${poolMemberInfo} -----`);&#xD;&#xA;&#xD;&#xA;Then if you want to automate the process to join a pool, nominate, bond tokens.... check the docs about how to call a Extrinsic with PolkadotJS: https://polkadot.js.org/docs/substrate/extrinsics/#nominationpools " ContentLicense="CC BY-SA 4.0" />
  <row Id="25628" PostHistoryTypeId="2" PostId="6690" RevisionGUID="98170463-d889-463a-8ed8-52a2c840c380" CreationDate="2023-01-12T10:20:23.160" UserId="2762" Text="Thanks to AurevoirXavier and Artur for the responses, as they explained to sign and send Ethereum Transactions using a Substrate Account has to be done via the EVM pallet.&#xD;&#xA;&#xD;&#xA;I just want to add here the code I have used to send the transaction using JS,&#xD;&#xA;&#xD;&#xA;    const signedTransaction = &quot;0x79038400381faf1906bf0ea763e7e25f110b26b880680d55bed21f52b76d9d5973fcee6e01b0778735b494c9665381dd52b7f30c3803c5170e880e0fd9e8d375a2ea267d05800246ca0d812af082c6037f937dc5bda6cdfb2ad1e68c692f31ffd1365b9d86450324000901381faf1906bf0ea763e7e25f110b26b880680d55d43593c715fdd31c61141abd04a99fd6822c85580430000064a7b3b6e00d000000000000000000000000000000000000000000000000ffffffff0000000000e1f50500000000000000000000000000000000000000000000000000000000000000&quot;;&#xD;&#xA;    const sendExt = await api.rpc.author.submitExtrinsic(signedTransaction);&#xD;&#xA;&#xD;&#xA;To generate this signed transaction I have used PolkadotJS UI, preparing the Ethereum transfer.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;And unselecting the Sign and Send you can see the result of the signature, the `signedTransaction` value:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JmLp0.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/zMRjm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25630" PostHistoryTypeId="2" PostId="6691" RevisionGUID="0689cd57-6187-4e36-b782-e132767e398e" CreationDate="2023-01-12T10:48:46.370" UserId="2762" Text="There seems to be an issue with the substrate-node-template, I have seen this PR that fixes it: *[remove space from manifest key branch in all the cargo.toml files][1]*&#xD;&#xA;&#xD;&#xA;In the meantime is approved if you want to try it locally just replace in all files (Cargo.toml files) `&quot; branch&quot;` with `&quot;branch&quot;` (removing the space)&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/pull/407" ContentLicense="CC BY-SA 4.0" />
  <row Id="25632" PostHistoryTypeId="2" PostId="6692" RevisionGUID="4d65fcf1-1b60-4526-847e-6c756f7c33f8" CreationDate="2023-01-12T13:09:20.983" UserId="2281" Text="native token of my chain has 12 decimals,now i have integrated EVM functionality into my chain, is there any way by which i can change evm decimals from 18 to 12 as i don't want to change my native token decimals???" ContentLicense="CC BY-SA 4.0" />
  <row Id="25634" PostHistoryTypeId="1" PostId="6692" RevisionGUID="4d65fcf1-1b60-4526-847e-6c756f7c33f8" CreationDate="2023-01-12T13:09:20.983" UserId="2281" Text="How to change evm token decimals?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25635" PostHistoryTypeId="3" PostId="6692" RevisionGUID="4d65fcf1-1b60-4526-847e-6c756f7c33f8" CreationDate="2023-01-12T13:09:20.983" UserId="2281" Text="|frontier|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25636" PostHistoryTypeId="2" PostId="6693" RevisionGUID="813a92f9-ce9e-4570-818b-845e8dcedbf7" CreationDate="2023-01-12T13:28:57.790" UserId="3676" Text="The best way I found to interact with the EVM in Substrate Frontier is to use the Web3.js lib as explained in this Moonbeam tutorial: https://docs.moonbeam.network/builders/build/eth-api/libraries/web3js/&#xD;&#xA;&#xD;&#xA;I use this code to retrieve the EVM account address from my substrate account private key:&#xD;&#xA;```&#xD;&#xA;const account = web3.eth.accounts.privateKeyToAccount(privateKey);&#xD;&#xA;const address = account.address;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To send and sign a transaction, you just have to follow the &quot;Send Transaction Script&quot; section of the Moonbeam tutorial." ContentLicense="CC BY-SA 4.0" />
  <row Id="25638" PostHistoryTypeId="4" PostId="6633" RevisionGUID="24e1759d-c1fe-4483-814e-ae7cba09fe95" CreationDate="2023-01-12T13:58:24.567" UserId="262" Comment="edited title" Text="XCM: How to send assets from the local chain to another via democracy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25639" PostHistoryTypeId="2" PostId="6694" RevisionGUID="ae64867b-bd2d-4ef6-a4be-b4bffdc9d4bc" CreationDate="2023-01-12T14:02:05.267" UserId="251" Text="You should, and I recommend changing your native token decimals. Otherwise, you need a converter.&#xD;&#xA;&#xD;&#xA;Then, I have a question. &#xD;&#xA;&#xD;&#xA;Why do you need EVM? This will break almost every existing thing (such as smart contract). EVM's goal is to mock Ethereum and re-use the existing infrastructures. And the third-party developers will be so confused while developing base on your chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="25641" PostHistoryTypeId="2" PostId="6695" RevisionGUID="6bd01c1e-ec01-405b-9ff7-6987bb399cf7" CreationDate="2023-01-12T14:12:58.113" UserId="2673" Text="If signing transaction with the &quot;parent account&quot; is acceptable, then I can suggest using a **pure proxy** (a.k.a anonymous proxy) for the &quot;child account&quot;. Here are some helpful resources explaining how to set it up and use:&#xD;&#xA;&#xD;&#xA;* [Anonymous Proxy – Polkadot wiki](https://wiki.polkadot.network/docs/learn-proxies#anonymous-proxy-pure-proxy)&#xD;&#xA;* [How to Create a Pure Proxy](https://support.polkadot.network/support/solutions/articles/65000182196)&#xD;&#xA;* [When and Why you can use Anonymous (Pure) Proxies on Polkadot [video]](https://www.youtube.com/watch?v=YkYApbhU3i0)&#xD;&#xA;* [Creating and Deleting Anonymous (Pure) Proxies on Polkadot&#xD;&#xA; [video]](https://www.youtube.com/watch?v=T443RcCYP24)" ContentLicense="CC BY-SA 4.0" />
  <row Id="25643" PostHistoryTypeId="2" PostId="6696" RevisionGUID="817fa5d1-0020-44bf-b90d-875f41d660f2" CreationDate="2023-01-12T17:16:21.910" UserId="2762" Text="In order to change the decimals of your native token you have to modify your chain_spec.rs file. &#xD;&#xA;Import in the `node/Cargo.toml` sc-chain-spec&#xD;&#xA;&#xD;&#xA;    [dependencies.sc-chain-spec] &#xD;&#xA;    branch = 'master'&#xD;&#xA;    git = &quot;https://github.com/paritytech/substrate&quot;&#xD;&#xA;&#xD;&#xA;And in the function development_config() or local_testnet_config() add your properties:&#xD;&#xA;&#xD;&#xA;    let mut properties = sc_chain_spec::Properties::new();&#xD;&#xA;	properties.insert(&quot;tokenDecimals&quot;.into(), 12.into());&#xD;&#xA;&#xD;&#xA;And finally add in properties: of the from_genesis call:&#xD;&#xA;&#xD;&#xA;    // Properties&#xD;&#xA;	Some(properties), &#xD;&#xA;&#xD;&#xA;See an example in the [Parachain Template Node][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/node/src/chain_spec.rs#L66" ContentLicense="CC BY-SA 4.0" />
  <row Id="25645" PostHistoryTypeId="2" PostId="6697" RevisionGUID="abe88563-9f1b-465d-b0b3-71f14df79d73" CreationDate="2023-01-12T17:43:47.740" UserId="2747" Text="As you're aware, the latest version of substrate removed the need for manual memory management, hence when creating the new SC - tokens are automatically reserved from caller's balance.&#xD;&#xA;&#xD;&#xA;To my understanding one has to adjust the [following function](https://github.com/paritytech/polkadot/blob/a779892f8ee2a072ac9676d7949ac4539f630ecd/runtime/polkadot/constants/src/lib.rs#L35) in order to change the maths related to all runtime modules. &#xD;&#xA;&#xD;&#xA;Currently, it costs around 13k native tokens to be reserved to deploy 100kb codehash. However, when comparing the constants file, Polkadot defines the deposit function to use 60 times less tokens. &#xD;&#xA;&#xD;&#xA; 1. Is my understanding of relation between deposit function and contract creation cost (reserve amount) correct?&#xD;&#xA; 2. If yes, what are the risks of adjusting the function?&#xD;&#xA; 3. If there are no risks, what is the best way to derive the sounding constants (CENTS, MILLICENTS) and formula for deposit function?&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;Raid" ContentLicense="CC BY-SA 4.0" />
  <row Id="25647" PostHistoryTypeId="1" PostId="6697" RevisionGUID="abe88563-9f1b-465d-b0b3-71f14df79d73" CreationDate="2023-01-12T17:43:47.740" UserId="2747" Text="Custom deposit function for Substrate runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="25648" PostHistoryTypeId="3" PostId="6697" RevisionGUID="abe88563-9f1b-465d-b0b3-71f14df79d73" CreationDate="2023-01-12T17:43:47.740" UserId="2747" Text="|substrate-node-template|substrate-contracts-node|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25649" PostHistoryTypeId="2" PostId="6698" RevisionGUID="49c588fb-ff49-4d98-9900-dafd050472e7" CreationDate="2023-01-12T17:44:41.343" UserId="2722" Text="i want to add `pallet-assets` in substrate runtime.rs . &#xD;&#xA;&#xD;&#xA;[Repository][1]&#xD;&#xA;&#xD;&#xA;i did this steps : &#xD;&#xA;&#xD;&#xA;1 -  add pallet-assets into `Cargo.toml` : &#xD;&#xA;&#xD;&#xA;    pallet-assets = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &quot;pallet-assets/std&quot;,&#xD;&#xA;&#xD;&#xA;2 - add these configs into runtime file : &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    pub type AssetBalance = Balance;&#xD;&#xA;    pub type AssetId = u32;&#xD;&#xA;    &#xD;&#xA;    parameter_types! {&#xD;&#xA;        pub const AssetDeposit: Balance = 10 * UNITS; // 10 UNITS deposit to create fungible asset class&#xD;&#xA;        pub const AssetAccountDeposit: Balance = deposit(1, 16);&#xD;&#xA;        pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;&#xD;&#xA;        pub const AssetsStringLimit: u32 = 50;&#xD;&#xA;        pub const MetadataDepositBase: Balance = deposit(1, 68);&#xD;&#xA;        pub const MetadataDepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_assets::Config for Runtime {&#xD;&#xA;        type RuntimeEvent = RuntimeEvent;&#xD;&#xA;        type Balance = Balance;&#xD;&#xA;        type AssetId = u32;&#xD;&#xA;        type AssetIdParameter = u32;&#xD;&#xA;        type CreateOrigin = AsEnsureOriginWithArg&lt;frame_system::EnsureSigned&lt;AccountId&gt;&gt;;&#xD;&#xA;        type Currency = Balances;&#xD;&#xA;        type ForceOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type AssetDeposit = AssetDeposit;&#xD;&#xA;        type MetadataDepositBase = MetadataDepositBase;&#xD;&#xA;        type MetadataDepositPerByte = MetadataDepositPerByte;&#xD;&#xA;        type ApprovalDeposit = ApprovalDeposit;&#xD;&#xA;        type RemoveItemsLimit = ConstU32&lt;1000&gt;;&#xD;&#xA;        type StringLimit = AssetsStringLimit;&#xD;&#xA;        type Freezer = ();&#xD;&#xA;        type Extra = ();&#xD;&#xA;        type WeightInfo = ();&#xD;&#xA;        type AssetAccountDeposit = AssetAccountDeposit;&#xD;&#xA;    &#xD;&#xA;        #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        type BenchmarkHelper = ();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and final add `pallet-assets` file into the constructor : &#xD;&#xA;&#xD;&#xA;    Assets: pallet_assets,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;after i run this command `cargo check` it faced 116 error :)))))))&#xD;&#xA;&#xD;&#xA;i dont know what is the problems ? how can i solves these problems ? &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;        error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;        |&#xD;&#xA;        = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ff5bbb618e892e0d.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-9869b6e941266003.rmeta&#xD;&#xA;    &#xD;&#xA;      error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `oom`.&#xD;&#xA;        |&#xD;&#xA;        = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ff5bbb618e892e0d.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-9869b6e941266003.rmeta&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:283:6&#xD;&#xA;          |&#xD;&#xA;      283 | impl pallet_assets::Config for Runtime {&#xD;&#xA;          |      ^^^^^^^^^^^^^^^^^^^^^ the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;          |&#xD;&#xA;      note: required by a bound in `pallet_assets::Config`&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/2a0eeff/frame/assets/src/lib.rs:201:37&#xD;&#xA;          |&#xD;&#xA;      201 |     pub trait Config&lt;I: 'static = ()&gt;: frame_system::Config {&#xD;&#xA;          |                                        ^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_assets::Config`&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `pallet_assets::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:308:11&#xD;&#xA;          |&#xD;&#xA;      308 |         Block = Block,&#xD;&#xA;          |                 ^^^^^ within `RuntimeCall`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_assets::Pallet&lt;Runtime&gt;`&#xD;&#xA;          |&#xD;&#xA;          = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                    frame_system::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                    pallet_grandpa::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_randomness_collective_flip::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_session::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_sudo::Pallet&lt;T&gt;&#xD;&#xA;                  and 3 others&#xD;&#xA;      note: required because it appears within the type `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `sp_runtime::generic::UncheckedExtrinsic`&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/2a0eeff/primitives/runtime/src/generic/unchecked_extrinsic.rs:44:40&#xD;&#xA;          |&#xD;&#xA;      44  | pub struct UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;&#xD;&#xA;          |                                        ^^^^ required by this bound in `sp_runtime::generic::UncheckedExtrinsic`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: required because it appears within the type `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `From`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:369:20&#xD;&#xA;          |&#xD;&#xA;      369 | pub trait From&lt;T&gt;: Sized {&#xD;&#xA;          |                    ^^^^^ required by this bound in `From`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: required because it appears within the type `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `TryInto`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:393:23&#xD;&#xA;          |&#xD;&#xA;      393 | pub trait TryInto&lt;T&gt;: Sized {&#xD;&#xA;          |                       ^^^^^ required by this bound in `TryInto`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = note: required because it appears within the type `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;      note: required by a bound in `From`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:369:16&#xD;&#xA;          |&#xD;&#xA;      369 | pub trait From&lt;T&gt;: Sized {&#xD;&#xA;          |                ^ required by this bound in `From`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = note: required because it appears within the type `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;      note: required by a bound in `TryInto`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:393:19&#xD;&#xA;          |&#xD;&#xA;      393 | pub trait TryInto&lt;T&gt;: Sized {&#xD;&#xA;          |                   ^ required by this bound in `TryInto`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = note: required because it appears within the type `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;      note: required by a bound in `Result`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:504:17&#xD;&#xA;          |&#xD;&#xA;      504 | pub enum Result&lt;T, E&gt; {&#xD;&#xA;          |                 ^ required by this bound in `Result`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `pallet_assets::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                    frame_system::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                    pallet_grandpa::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_randomness_collective_flip::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_session::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_sudo::Pallet&lt;T&gt;&#xD;&#xA;                  and 3 others&#xD;&#xA;      note: required because it appears within the type `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `From`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:369:20&#xD;&#xA;          |&#xD;&#xA;      369 | pub trait From&lt;T&gt;: Sized {&#xD;&#xA;          |                    ^^^^^ required by this bound in `From`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `pallet_assets::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                    frame_system::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                    pallet_grandpa::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_randomness_collective_flip::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_session::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_sudo::Pallet&lt;T&gt;&#xD;&#xA;                  and 3 others&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0283]: type annotations needed&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: multiple `impl`s satisfying `RuntimeCall: IsSubType&lt;_&gt;` found&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | || -&#xD;&#xA;          | ||_|&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | |  in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0283]: type annotations needed&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: multiple `impl`s satisfying `RuntimeCall: From&lt;_&gt;` found&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | || -&#xD;&#xA;          | ||_|&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | |  in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and these are : &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        rror[E0277]: the trait bound `sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;: Decode` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:383:32&#xD;&#xA;          |&#xD;&#xA;      383 |         fn initialize_block(header: &amp;&lt;Block as BlockT&gt;::Header) {&#xD;&#xA;          |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Decode` is not implemented for `sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;`&#xD;&#xA;          |&#xD;&#xA;          = help: the trait `Decode` is implemented for `sp_runtime::generic::UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;`&#xD;&#xA;          = note: required because of the requirements on the impl of `Codec` for `sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;`&#xD;&#xA;          = note: required because of the requirements on the impl of `sp_api::BlockT` for `sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, sp_runtime::traits::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;&gt;`&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_dex&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25651" PostHistoryTypeId="1" PostId="6698" RevisionGUID="49c588fb-ff49-4d98-9900-dafd050472e7" CreationDate="2023-01-12T17:44:41.343" UserId="2722" Text="error when need to add pallet-assets in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="25652" PostHistoryTypeId="3" PostId="6698" RevisionGUID="49c588fb-ff49-4d98-9900-dafd050472e7" CreationDate="2023-01-12T17:44:41.343" UserId="2722" Text="|pallet|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25653" PostHistoryTypeId="2" PostId="6699" RevisionGUID="079a38d4-d10c-46b7-a799-272658a58977" CreationDate="2023-01-12T18:08:52.167" UserId="3538" Text="I want to use unified accounts for a Substrate-based EVM chain. I've looked into the mooonbeam implementation, and they are using it with a custom module `pallet-author-inherent` which is used for block authoring. &#xD;&#xA;&#xD;&#xA;Is it possible to implement unified-accounts while using `AURA` for block authoring? &#xD;&#xA;&#xD;&#xA;I've also checked the difference in source codes of both pallets and it turns out that `AuthorInherent` implements `FindAuthor&lt;T::AccountId&gt;` while `AURA` uses `FindAuthor&lt;u32&gt;`. Can anybody explain the difference and guide me where should I start if I want to use `AURA` instead of `AuthorInherent` for block authoring with unified-accounts? &#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="25655" PostHistoryTypeId="1" PostId="6699" RevisionGUID="079a38d4-d10c-46b7-a799-272658a58977" CreationDate="2023-01-12T18:08:52.167" UserId="3538" Text="Unified accounts with AURA" ContentLicense="CC BY-SA 4.0" />
  <row Id="25656" PostHistoryTypeId="3" PostId="6699" RevisionGUID="079a38d4-d10c-46b7-a799-272658a58977" CreationDate="2023-01-12T18:08:52.167" UserId="3538" Text="|substrate-node-template|evm|account|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25657" PostHistoryTypeId="2" PostId="6700" RevisionGUID="6c85a720-4b61-470d-9f78-d6b873d31eef" CreationDate="2023-01-12T18:18:30.653" UserId="377" Text="Currently i am running my Parachain on rococo-local and it is working as expected.&#xD;&#xA;Now i need to host my parachain on server so that my app can use it.&#xD;&#xA;Is there any guide/process how can i do it? " ContentLicense="CC BY-SA 4.0" />
  <row Id="25659" PostHistoryTypeId="1" PostId="6700" RevisionGUID="6c85a720-4b61-470d-9f78-d6b873d31eef" CreationDate="2023-01-12T18:18:30.653" UserId="377" Text="How to launch substrate chain on server?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25660" PostHistoryTypeId="3" PostId="6700" RevisionGUID="6c85a720-4b61-470d-9f78-d6b873d31eef" CreationDate="2023-01-12T18:18:30.653" UserId="377" Text="|parachain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25661" PostHistoryTypeId="2" PostId="6701" RevisionGUID="259b82da-bdda-4a51-9e25-66dfc3240a34" CreationDate="2023-01-12T19:11:31.627" UserId="94" Text="Your approach is correct. There is currently an issue with the template which is fixed [here](https://github.com/substrate-developer-hub/substrate-node-template/pull/407), sorry for the inconvenience.  &#xD;&#xA;&#xD;&#xA;The issue is that the `Cargo.toml` uses `&quot; branch&quot;` in it instead of `branch`.  &#xD;&#xA;If you replace `&quot; branch&quot;` with `branch` in the whole project it should work and only give you an error about missing config items." ContentLicense="CC BY-SA 4.0" />
  <row Id="25663" PostHistoryTypeId="5" PostId="6701" RevisionGUID="38f1abf3-02c8-4d36-9311-16378e0929f5" CreationDate="2023-01-12T19:19:00.173" UserId="94" Comment="added 2 characters in body" Text="Your approach is correct. There is currently an issue with the template which is fixed [here](https://github.com/substrate-developer-hub/substrate-node-template/pull/407), sorry for the inconvenience.  &#xD;&#xA;&#xD;&#xA;The issue is that the `Cargo.toml` uses `&quot; branch&quot;` in it instead of `branch`.  &#xD;&#xA;If you replace `&quot; branch&quot;` with `branch` *in the whole project* it should work and only give you an error about missing config items." ContentLicense="CC BY-SA 4.0" />
  <row Id="25664" PostHistoryTypeId="2" PostId="6702" RevisionGUID="f81cdb01-1b26-42c0-8a75-8d0d04c1c543" CreationDate="2023-01-12T19:27:26.793" UserId="2484" Text="I ask myself, why this extrinsic (https://github.com/paritytech/substrate/blob/e9b0facf70eeb08032cc7e83548c62f0b4a24bb1/frame/sudo/src/lib.rs#L224-L263) exists? I mean the sudo key could execute any transaction from any account, although the sudo user might not have the private key of this account.&#xD;&#xA;&#xD;&#xA;When I would like to stop this dispatch from being executed, I could use the transaction filter, right? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25666" PostHistoryTypeId="1" PostId="6702" RevisionGUID="f81cdb01-1b26-42c0-8a75-8d0d04c1c543" CreationDate="2023-01-12T19:27:26.793" UserId="2484" Text="What is the intended purpose of `sudo_as` from the sudo pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25667" PostHistoryTypeId="3" PostId="6702" RevisionGUID="f81cdb01-1b26-42c0-8a75-8d0d04c1c543" CreationDate="2023-01-12T19:27:26.793" UserId="2484" Text="|pallet|transactions|account|key|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25668" PostHistoryTypeId="2" PostId="6703" RevisionGUID="f81f637d-e301-4853-871f-1d27c2ce0937" CreationDate="2023-01-12T19:33:59.530" UserId="2484" Text="I would like to use the sudo pallet instead of the democracy pallet.&#xD;&#xA;&#xD;&#xA;Now I would like to force the sudo user to wait three months until a runtime upgrade can be applied. So, that there is no way to execute a runtime upgrade before this period of three months has passed (not even an emergency upgrade). How is this possible?&#xD;&#xA;&#xD;&#xA;What transactions should be filtered, so that this rule can't be avoided by the sudo user? " ContentLicense="CC BY-SA 4.0" />
  <row Id="25670" PostHistoryTypeId="1" PostId="6703" RevisionGUID="f81f637d-e301-4853-871f-1d27c2ce0937" CreationDate="2023-01-12T19:33:59.530" UserId="2484" Text="How to allow `set_code` only after an enactment period of three months with the sudo pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25671" PostHistoryTypeId="3" PostId="6703" RevisionGUID="f81f637d-e301-4853-871f-1d27c2ce0937" CreationDate="2023-01-12T19:33:59.530" UserId="2484" Text="|runtime-upgrade|upgrade|democracy|key|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25672" PostHistoryTypeId="4" PostId="6703" RevisionGUID="e5c9632a-1b8d-43bc-87b8-9defbbc217fa" CreationDate="2023-01-12T19:48:19.340" UserId="2484" Comment="edited title" Text="How to force runtime upgrades only after an enactment period of three months with the sudo pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25673" PostHistoryTypeId="2" PostId="6704" RevisionGUID="485b95ac-0d43-4a5b-9dc9-1ff6ae92d959" CreationDate="2023-01-12T20:04:38.623" UserId="94" Text="Yes `Sudo::sudo_as` can be used to impersonate any other account of type `Signed` whereas `Sudo::sudo` provides `Root`.  &#xD;&#xA;&#xD;&#xA;&gt;When I would like to stop this dispatch from being executed, I could use the transaction filter, right?&#xD;&#xA;&#xD;&#xA;No. You cannot rely on such simple assumptions about how pallets interact. It gives of a false sense of security while (in most cases) not even archieving what you want. Once someone acquires Root, through Sudo or other, they can do *anything*.&#xD;&#xA;&#xD;&#xA;In your case it would indeed hinder direct dispatches to `Sudo::sudo_as`, but `Root` (acquired through `Sudo::sudo`) has many ways to hack around that. The obvious like `Utility::dispatch_as` and the more mischievous being `System::set_code`.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="25675" PostHistoryTypeId="50" PostId="6320" RevisionGUID="6ee27a5c-60b6-4941-bef5-8d2111423038" CreationDate="2023-01-12T20:06:55.737" UserId="-1" />
  <row Id="25676" PostHistoryTypeId="2" PostId="6705" RevisionGUID="e4715020-0d3f-4805-a3f6-73406a220b42" CreationDate="2023-01-12T20:26:00.410" UserId="94" Text="&gt;What transactions should be filtered, so that this rule can't be avoided by the sudo user?&#xD;&#xA;&#xD;&#xA;You do not force sudo to do anything. Sudo **is** the force.  &#xD;&#xA;`Sudo::sudo` results in `Root` and can arbitrarily change your runtime, eg. via `set_code`, thereby removing any call filters.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Sudo is the wrong approach here. Is a way too powerful tool for the job. You need a very restricted origin that can do JUST that. Queueing runtime upgrades with a 3 months lead. I think [Gov V2](https://github.com/paritytech/polkadot/pull/5205) has the tools for that. Not sure about how it would look like with the current gov." ContentLicense="CC BY-SA 4.0" />
  <row Id="25678" PostHistoryTypeId="50" PostId="6332" RevisionGUID="0dd4237d-56ab-453e-91ba-dce9bd97eef4" CreationDate="2023-01-12T21:01:15.150" UserId="-1" />
  <row Id="25679" PostHistoryTypeId="34" PostId="6580" RevisionGUID="6948cdc7-d9ac-4781-8e95-7da482fccf8e" CreationDate="2023-01-12T21:26:46.930" UserId="3468" Comment="16" />
  <row Id="25680" PostHistoryTypeId="2" PostId="6706" RevisionGUID="ac71d049-a66e-43f8-b14f-d4904877788a" CreationDate="2023-01-13T00:33:52.890" UserId="3303" Text="Using the ts code to call the `parasSudoWrapper.sudoScheduleParaInitialize` interface to register the parachain locally, the parachain has not produced blocks.. It is only a parathread found in the polkadot.js UI. I need to manually call `slots.froceLease` on the UI interface to renew the slot lease, and the parathread can be used Upgrade to parachain. However, calling the `parasSudoWrapper.sudoScheduleParaInitialize` directly on the polkadot-js UI interface can successfully register the parachain and work normally.&#xD;&#xA;But using polkadot-v0.9.32 or previous versions, there is no such problem.&#xD;&#xA;&#xD;&#xA;BTW I found that other parachain teams also introduced slots.frocelease in their own polkadot-launch. &#xD;&#xA;for example:&#xD;&#xA;&#xD;&#xA; - https://github.com/AXIA-DEV/launcher/blob/7e0e1f78eadc8fa004529fec20a8c885cad99f6a/launch/src/rpc.ts#L95&#xD;&#xA;&#xD;&#xA; - https://github.com/mangata-finance/mangata-node/commit/0f202986f112d8dc2a70d09c2733461af47cef04&#xD;&#xA; - https://github.com/tolak/khala-parachain-dev/blob/f456c273867e392bb4801680159e7ac074b177b0/polkadot-launch/src/rpc.ts#L92&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Related issue https://github.com/litentry/litentry-parachain/issues/1097.&#xD;&#xA;&#xD;&#xA;Hope you can answer my question. Thanks a lot!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25682" PostHistoryTypeId="1" PostId="6706" RevisionGUID="ac71d049-a66e-43f8-b14f-d4904877788a" CreationDate="2023-01-13T00:33:52.890" UserId="3303" Text="Use polkadot-v0.9.33 or hight verison bianry launch local parachain onborading fails" ContentLicense="CC BY-SA 4.0" />
  <row Id="25683" PostHistoryTypeId="3" PostId="6706" RevisionGUID="ac71d049-a66e-43f8-b14f-d4904877788a" CreationDate="2023-01-13T00:33:52.890" UserId="3303" Text="|polkadot-js|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25684" PostHistoryTypeId="52" PostId="6698" RevisionGUID="f4ae41fc-c833-4816-8b67-83c0498f6c7c" CreationDate="2023-01-13T01:51:34.397" />
  <row Id="25685" PostHistoryTypeId="2" PostId="6707" RevisionGUID="05e5ce94-8d74-455d-8ae7-44d7e0073258" CreationDate="2023-01-13T04:04:12.657" UserId="251" Text="I‘m on 0.9.33 and 0.9.36. Both works for me.&#xD;&#xA;&#xD;&#xA;Did you change this to `Yes`?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OtFhf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25687" PostHistoryTypeId="5" PostId="6683" RevisionGUID="b741249f-b8fd-4984-91aa-495b1ac38504" CreationDate="2023-01-13T04:07:14.947" UserId="251" Comment="added 366 characters in body" Text="Check your parachain's slot lease. Maybe it gets downgraded.&#xD;&#xA;&#xD;&#xA;This is pretty common if you are using Rococo local.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Check these to see if you are a parathread.&#xD;&#xA;&#xD;&#xA;If you are, then you should call this to onboard you.&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/95fRj.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/mDVzr.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/OfKpd.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25688" PostHistoryTypeId="2" PostId="6708" RevisionGUID="ed2117ed-5c88-4fef-847f-dc7f7d69d471" CreationDate="2023-01-13T04:28:47.640" UserId="251" Text="Check Darwinia2.0. We are doing this now.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-2.0&#xD;&#xA;&#xD;&#xA;But for the session keys, it's still Sr25519. This is decided by AURA." ContentLicense="CC BY-SA 4.0" />
  <row Id="25690" PostHistoryTypeId="2" PostId="6709" RevisionGUID="cd8aa188-fc0a-4c3c-91b0-25c587d65c8a" CreationDate="2023-01-13T07:10:30.460" UserId="2844" Text="I am using erc20(psp22) smart contract to create fungible token. Contract successfully compiled and deployed. While I was deploying, I added `initial_supply: Balance as 2`. I tried to read initial_supply from local node in contract ui and display return value of initial supply `2,000,000,000,000` (shown in image).&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Once again I uploaded and added `initial_supply: Balance as 2` in contract ui by using Shuibuya testnet. This time return value of initial supply `2,000,000,000,000,000,000`. &#xD;&#xA;&#xD;&#xA;**Why initial_supply is different even though I provided same initial supply while uploading on different testnet?**&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I have tried same in polkadotjs with shibuya testnet instead return value it throws error.&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Someone please explain me why this is happening?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Q20IB.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ICkow.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/J2of4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25692" PostHistoryTypeId="1" PostId="6709" RevisionGUID="cd8aa188-fc0a-4c3c-91b0-25c587d65c8a" CreationDate="2023-01-13T07:10:30.460" UserId="2844" Text="`total_supply` function return value on erc20(psp22)" ContentLicense="CC BY-SA 4.0" />
  <row Id="25693" PostHistoryTypeId="3" PostId="6709" RevisionGUID="cd8aa188-fc0a-4c3c-91b0-25c587d65c8a" CreationDate="2023-01-13T07:10:30.460" UserId="2844" Text="|polkadot-js|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25694" PostHistoryTypeId="2" PostId="6710" RevisionGUID="925d327a-c2b4-4fff-9e85-6a6866c0edcd" CreationDate="2023-01-13T08:17:15.820" UserId="2484" Text="I am currently developing an alternative to `Sudo` and `Democracy`. I wish to have a sudo key account, which is allowed to upgrade the chain, but only after a three month review period, the upgrade can get enacted. This can be done by allowing the sudo key account to call the following as root origin.&#xD;&#xA;&#xD;&#xA;`parachain_system::Call::&lt;T&gt;::authorize_upgrade(code_hash);`&#xD;&#xA;&#xD;&#xA;Now I want to know if there is any root origin call, which could be useful. It shouldn't have too much power like increasing the total supply/issuance of a token. I am searching for calls which are absolutely necessary to run a parachain.&#xD;&#xA;&#xD;&#xA;Here is some example: I thought about the extrinsic `parasSudoWrapper -&gt; sudoScheduleParaInitilialize`. I know this has to be called by the relaychain, but the point I am trying to make is that there might be some extrinsics, which are absolutely critical to keep running a parachain service.&#xD;&#xA;&#xD;&#xA;If there aren't any other than `authorize_upgrade` let me know. I know, that `authorize_upgrade` can alter the whole chain to allow any extrinsic again, but I want to ensure, that the parachain keeps running in the 3 month enactment/waiting period." ContentLicense="CC BY-SA 4.0" />
  <row Id="25696" PostHistoryTypeId="1" PostId="6710" RevisionGUID="925d327a-c2b4-4fff-9e85-6a6866c0edcd" CreationDate="2023-01-13T08:17:15.820" UserId="2484" Text="What root dispatches are absolutely necessary to run a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25697" PostHistoryTypeId="3" PostId="6710" RevisionGUID="925d327a-c2b4-4fff-9e85-6a6866c0edcd" CreationDate="2023-01-13T08:17:15.820" UserId="2484" Text="|pallet|parachain|upgrade|democracy|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25698" PostHistoryTypeId="2" PostId="6711" RevisionGUID="5c251f9a-a268-411f-ba9a-4c6291ea906c" CreationDate="2023-01-13T08:26:22.723" UserId="567" Text="The UI will read your contract metadata and if the argument of the method is `Balance` then, by default, it will apply the chain-decimals.&#xD;&#xA;That is why if you input 1 in for a `Balance` field in Shibuya it will actually make the call for 1 + 18 decimals.&#xD;&#xA;If the argument field is an `u128` then this doesn't apply (1 will be 1). &#xD;&#xA;&#xD;&#xA;To do so in polkadot js UI for Shibuya chose `atto` (smallest unit): [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Also until [this][2] is not merged, please use our website with the weightV2 fix (you will not get the error you share in the last screen): &#xD;&#xA;https://polkadotjs-apps.web.app/#/explorer&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qPIYa.png&#xD;&#xA;  [2]: https://github.com/polkadot-js/apps/pull/8538" ContentLicense="CC BY-SA 4.0" />
  <row Id="25700" PostHistoryTypeId="5" PostId="6694" RevisionGUID="9dfe2208-bd04-4073-b615-ef7c66c62413" CreationDate="2023-01-13T08:45:31.090" UserId="251" Comment="added 293 characters in body" Text="You should, and I recommend changing your native token decimals. Otherwise, you need a converter.&#xD;&#xA;&#xD;&#xA;Then, I have a question. &#xD;&#xA;&#xD;&#xA;Why do you need EVM? This will break almost every existing thing (such as smart contract). EVM's goal is to mock Ethereum and re-use the existing infrastructures. And the third-party developers will be so confused while developing base on your chain.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Here https://github.com/darwinia-network/darwinia-common/blob/6a9392cfb9fe2c99b1c2b47d0c36125d61991bb7/frame/dvm/ethereum/src/adapter.rs#L136.&#xD;&#xA;&#xD;&#xA;Darwinia has been running for over 2 years.&#xD;&#xA;Finally, we give up on maintaining this.&#xD;&#xA;We change the decimal to 18.&#xD;&#xA;So, that's my suggestion." ContentLicense="CC BY-SA 4.0" />
  <row Id="25701" PostHistoryTypeId="2" PostId="6712" RevisionGUID="42c2dc55-16c4-4098-ba84-87c7ab0b3643" CreationDate="2023-01-13T08:59:40.577" UserId="251" Text="You can write a call if the matched user calls it, then dispatch a `parachain_system::Call::&lt;T&gt;::authorize_upgrade(code_hash);` call.&#xD;&#xA;&#xD;&#xA;And one thing I need to point out. Being able to call the runtime upgrade is the highest privilege. You can write anything in the WASM. Including increase the total supply/issuance of a token. So, I think this is meanless." ContentLicense="CC BY-SA 4.0" />
  <row Id="25703" PostHistoryTypeId="5" PostId="6712" RevisionGUID="83c23227-ea99-4931-a141-0066b3bb4af7" CreationDate="2023-01-13T09:20:38.080" UserId="251" Comment="added 17 characters in body" Text="You can write a call if the matched user calls it, then dispatch a `parachain_system::Call::&lt;T&gt;::authorize_upgrade(code_hash);` call.&#xD;&#xA;&#xD;&#xA;And one thing I need to point out. Being able to call the runtime upgrade is the highest privilege. You can write anything in the WASM. Including increasing the total supply/issuance of a token. So, I think this restriction is meaningless." ContentLicense="CC BY-SA 4.0" />
  <row Id="25704" PostHistoryTypeId="2" PostId="6713" RevisionGUID="c0339368-de64-4fa1-92d0-030e50a193c8" CreationDate="2023-01-13T09:22:15.810" UserId="2762" Text="Take a look at this resources:&#xD;&#xA;&#xD;&#xA;- This Youtube tutorial: [Deploy Your First Parachain, Tutorial by Adrian Brink][1].&#xD;&#xA;&#xD;&#xA;- This [StackExchange previous answer about how to deploy in AWS][2].&#xD;&#xA;&#xD;&#xA;- This discussion in the polkadot Forum about [Collator node minimal performance requirement][3]&#xD;&#xA;&#xD;&#xA;- And for extra detailed information the [The Polkadot Parachain Host Implementers' Guide][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.youtube.com/watch?v=pDqkzvA4C0E&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/3103/2762&#xD;&#xA;  [3]: https://forum.polkadot.network/t/determine-collator-node-minimal-performance-requirement/613&#xD;&#xA;  [4]: https://paritytech.github.io/polkadot/book/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="25706" PostHistoryTypeId="2" PostId="6714" RevisionGUID="a29ced8a-0496-4523-9acb-91e7168e9aaf" CreationDate="2023-01-13T09:38:46.223" UserId="3696" Text="We would like to know What parameter should we pass in as “extra” for bondExtra(extra)? And what does it mean for the type “PalletNominationPoolsBondExtra”&#xD;&#xA;&#xD;&#xA;[![nominationPools][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/H3leQ.png&#xD;&#xA;&#xD;&#xA;Thank you, the Starfish team" ContentLicense="CC BY-SA 4.0" />
  <row Id="25708" PostHistoryTypeId="1" PostId="6714" RevisionGUID="a29ced8a-0496-4523-9acb-91e7168e9aaf" CreationDate="2023-01-13T09:38:46.223" UserId="3696" Text="Nomination Pool Question" ContentLicense="CC BY-SA 4.0" />
  <row Id="25709" PostHistoryTypeId="3" PostId="6714" RevisionGUID="a29ced8a-0496-4523-9acb-91e7168e9aaf" CreationDate="2023-01-13T09:38:46.223" UserId="3696" Text="|polkadot-js|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25710" PostHistoryTypeId="2" PostId="6715" RevisionGUID="25b74671-c697-4a61-893a-5741619b76c9" CreationDate="2023-01-13T10:27:10.953" UserId="262" Text="Solution is to use `utility.dispatchAs` and then you can use `reserveTransferAssets`." ContentLicense="CC BY-SA 4.0" />
  <row Id="25712" PostHistoryTypeId="50" PostId="6298" RevisionGUID="6c394ef6-7ee5-4119-9ddb-58e09174fe4b" CreationDate="2023-01-13T11:07:25.647" UserId="-1" />
  <row Id="25713" PostHistoryTypeId="2" PostId="6716" RevisionGUID="28e5c3d3-c9fe-4ddd-898d-10d666e7e0f6" CreationDate="2023-01-13T11:29:27.237" UserId="2762" Text="This is the definition of the type `PalletNominationPoolsBondExtra`&#xD;&#xA;&#xD;&#xA;      interface PalletNominationPoolsBondExtra extends Enum {&#xD;&#xA;        readonly isFreeBalance: boolean;&#xD;&#xA;        readonly asFreeBalance: u128;&#xD;&#xA;        readonly isRewards: boolean;&#xD;&#xA;        readonly type: 'FreeBalance' | 'Rewards';&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;For that call you have to select if you want to bond this additional funds  from either the free balance of the account, of from the accumulated rewards.&#xD;&#xA;&#xD;&#xA;If you try to send the Extrinsic using PolkadotJS UI you can see that you can pick between `FreeBalance` or `Rewards` and pick the amount. See the image below.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6ZWSr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25715" PostHistoryTypeId="5" PostId="5601" RevisionGUID="768ff5d7-7f74-4535-aed8-81c0db16a025" CreationDate="2023-01-13T11:34:02.183" UserId="529" Comment="added trait in the question" Text="I'm using PSP34 from openbrush in ink! contract and want to override `mint()` function that comes with `PSP34Mintable` trait.&#xD;&#xA;Since this contract should accept payments for the `mint()` call, a `payable` is added to the message.&#xD;&#xA;&#xD;&#xA;pseudo code&#xD;&#xA;```rs&#xD;&#xA;impl PSP34Mintable for MyContract {&#xD;&#xA;    #[ink(message, payable)]&#xD;&#xA;    fn mint(&amp;mut self, account: AccountId, id: Id) -&gt; Result&lt;(), PSP34Error&gt; {&#xD;&#xA;        // ... my custom code&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;gives following compile error&#xD;&#xA;```rs&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA; --&gt; src/lib.rs:4:1&#xD;&#xA;  |&#xD;&#xA;4 | #[openbrush::contract]&#xD;&#xA;  | ^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`&#xD;&#xA;  |&#xD;&#xA;  = note: expected struct `TraitMessagePayable&lt;false&gt;`&#xD;&#xA;             found struct `TraitMessagePayable&lt;true&gt;`&#xD;&#xA;  = note: this error originates in the attribute macro `openbrush::contract`&#xD;&#xA;```&#xD;&#xA;Is it possible to change this `mint()` to become a payable message or do I need to implement a custom trait with `mint()` function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25716" PostHistoryTypeId="50" PostId="6305" RevisionGUID="9dd449c9-a34d-4f81-b26f-d9c281d2cae2" CreationDate="2023-01-13T12:04:45.330" UserId="-1" />
  <row Id="25717" PostHistoryTypeId="50" PostId="6344" RevisionGUID="67e3c3b7-16b7-40c0-bfee-224c1c5a5b71" CreationDate="2023-01-13T14:09:26.253" UserId="-1" />
  <row Id="25718" PostHistoryTypeId="2" PostId="6717" RevisionGUID="fbb862d2-4e51-4ab8-94b0-e525cf651eb0" CreationDate="2023-01-13T15:39:26.387" UserId="1793" Text="we try to execute try-runtime command in this way&#xD;&#xA;&#xD;&#xA;    cargo run --release --features=try-runtime,mangata-rococo try-runtime --chain=public-testnet --execution=Native on-runtime-upgrade live --uri wss://roccoco-testnet-collator-01.mangatafinance.cloud:443&#xD;&#xA;&#xD;&#xA;but we got an error that &#xD;&#xA;&#xD;&#xA;    Found argument '--execution' which wasn't expected, or isn't valid in this context&#xD;&#xA;It looks like this execution flag was removed; now, by default, it is only wasm.&#xD;&#xA;&#xD;&#xA;When we remove the execution flag, we need to specify the runtime flag which, based on the substrate repo, is the path to the wasm blob ? &#xD;&#xA;&#xD;&#xA;[Substrate docs][1] is not up to date I think.&#xD;&#xA;&#xD;&#xA;Can you help us what is the correct way to execute try-runtime. &#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/command-line-tools/try-runtime/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25720" PostHistoryTypeId="1" PostId="6717" RevisionGUID="fbb862d2-4e51-4ab8-94b0-e525cf651eb0" CreationDate="2023-01-13T15:39:26.387" UserId="1793" Text="try-runtime polkadot version 36 .. execution flag removed" ContentLicense="CC BY-SA 4.0" />
  <row Id="25721" PostHistoryTypeId="3" PostId="6717" RevisionGUID="fbb862d2-4e51-4ab8-94b0-e525cf651eb0" CreationDate="2023-01-13T15:39:26.387" UserId="1793" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25722" PostHistoryTypeId="2" PostId="6718" RevisionGUID="22e618da-e7b2-4003-89a0-9940439efb78" CreationDate="2023-01-13T16:11:25.523" UserId="3285" Text="What is the CLI version that you are using? The [documentation of the latest try-runtime CLI][1] is a good resource, unfortunately the Substrate docs are out of date with the newer version of try-runtime CLI as there has been a few releases recently.&#xD;&#xA;&#xD;&#xA;&gt; When we remove the execution flag, we need to specify the runtime flag which, based on the substrate repo, is the path to the wasm blob ?&#xD;&#xA;&#xD;&#xA;In order to obtain the runtime wasm binary, you can compile the Substrate node (with the runtime changes to test) with `try-runtime` feature enabled. Then, you can copy the wasm binary located under `./target/release/wbuild/node-with-tryruntime.wasm` to another folder and use as an input to the `try-runtime` command. &#xD;&#xA;&#xD;&#xA;You should be able to execute the command above once you pass the `--runtime node-with-tryruntime.wasm` param.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/try_runtime_cli/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="25724" PostHistoryTypeId="2" PostId="6719" RevisionGUID="4fa582f7-eccc-482c-9c35-546ddded0960" CreationDate="2023-01-13T17:36:37.907" UserId="3235" Text="I'm trying to implement a PoS network on substrate using substrate provided pallets - `pallet_session`, `pallet_staking`, `pallet_babe`, etc. The current Runtime and chain spec implementation is similar to what is found in the [substrate repository][1].&#xD;&#xA;I've realized that I need to set Session keys for `GenesisConfig` before starting the blockchain. I also noticed that the Session keys set for `SessionConfig` are used to configure the grandpa authorities. &#xD;&#xA;&#xD;&#xA;My questions are: &#xD;&#xA;&#xD;&#xA;Is there a way to start the blockchain such that no session keys are set? &#xD;&#xA;&#xD;&#xA;Do all `grandpa` authorities need to be hardcoded in the chain spec? If not, how are the authorities added ***after*** nodes have gone live? &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/bin/node" ContentLicense="CC BY-SA 4.0" />
  <row Id="25726" PostHistoryTypeId="1" PostId="6719" RevisionGUID="4fa582f7-eccc-482c-9c35-546ddded0960" CreationDate="2023-01-13T17:36:37.907" UserId="3235" Text="Is it possible to start a substrate BABE blockchain with no Grandpa authorities and BABE validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25727" PostHistoryTypeId="3" PostId="6719" RevisionGUID="4fa582f7-eccc-482c-9c35-546ddded0960" CreationDate="2023-01-13T17:36:37.907" UserId="3235" Text="|staking|validator|grandpa|babe|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25728" PostHistoryTypeId="52" PostId="6714" RevisionGUID="35c846fa-e2ea-4586-918b-51d11a4bfd85" CreationDate="2023-01-13T17:39:06.933" />
  <row Id="25731" PostHistoryTypeId="2" PostId="6721" RevisionGUID="0ae4d81c-2429-4104-86ad-023829181ddf" CreationDate="2023-01-13T17:46:08.283" UserId="555" Text="&gt; use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use scale_info::{prelude::vec};&#xD;&#xA;	use frame_support::inherent::Vec;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	#[pallet::without_storage_info]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn user)]&#xD;&#xA;	pub type User&lt;T:Config&gt; = StorageValue&lt;_, T::AccountId, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I want to add this line then i get the error:  pub type User&lt;T:Config&gt; = StorageValue&lt;_, ***T::AccountId***, ValueQuery&gt;;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I'm successfully able to add this: pub type User&lt;T:Config&gt; = StorageValue&lt;_, ***Vec&lt;T::AccountId&gt;***, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;How to solve the above error ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sdRyW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25733" PostHistoryTypeId="1" PostId="6721" RevisionGUID="0ae4d81c-2429-4104-86ad-023829181ddf" CreationDate="2023-01-13T17:46:08.283" UserId="555" Text="core::default::Default` is not implemented for `&lt;T as frame_system::Config&gt;::AccountId`" ContentLicense="CC BY-SA 4.0" />
  <row Id="25734" PostHistoryTypeId="3" PostId="6721" RevisionGUID="0ae4d81c-2429-4104-86ad-023829181ddf" CreationDate="2023-01-13T17:46:08.283" UserId="555" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25735" PostHistoryTypeId="2" PostId="6722" RevisionGUID="b97f3616-663f-4559-9d22-861cac6ba4ca" CreationDate="2023-01-13T17:46:31.703" UserId="2722" Text="i gonna add `pallet-assets` in my project but i faced this error : &#xD;&#xA;&#xD;&#xA;&gt;not all trait items implemented, missing: `RemoveItemsLimit`, `AssetIdParameter`, `CreateOrigin`, `CallbackHandle`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Repository][1]&#xD;&#xA;&#xD;&#xA;i did these steps : &#xD;&#xA;&#xD;&#xA;1 - Add `pallet-assets` in `Cargo.toml` : &#xD;&#xA;&#xD;&#xA;    pallet-assets = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2 - Add this Config in `runtime.rs` : &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       pub type AssetBalance = Balance;&#xD;&#xA;    pub type AssetId = u32;&#xD;&#xA;    &#xD;&#xA;    impl pallet_assets::Config for Runtime {&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type Balance = AssetBalance;&#xD;&#xA;    	type AssetId = AssetId;&#xD;&#xA;    	type Currency = Balances;&#xD;&#xA;    	type ForceOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;    	type AssetDeposit = ConstU128&lt;1&gt;;&#xD;&#xA;    	type AssetAccountDeposit = ConstU128&lt;10&gt;;&#xD;&#xA;    	type MetadataDepositBase = ConstU128&lt;1&gt;;&#xD;&#xA;    	type MetadataDepositPerByte = ConstU128&lt;1&gt;;&#xD;&#xA;    	type ApprovalDeposit = ConstU128&lt;1&gt;;&#xD;&#xA;    	type StringLimit = ConstU32&lt;50&gt;;&#xD;&#xA;    	type Freezer = ();&#xD;&#xA;    	type Extra = ();&#xD;&#xA;    	type WeightInfo = ();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this problem ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_dex" ContentLicense="CC BY-SA 4.0" />
  <row Id="25737" PostHistoryTypeId="1" PostId="6722" RevisionGUID="b97f3616-663f-4559-9d22-861cac6ba4ca" CreationDate="2023-01-13T17:46:31.703" UserId="2722" Text="not all trait items implemented, missing: `RemoveItemsLimit`, `AssetIdParameter`, `CreateOrigin`, `CallbackHandle`" ContentLicense="CC BY-SA 4.0" />
  <row Id="25738" PostHistoryTypeId="3" PostId="6722" RevisionGUID="b97f3616-663f-4559-9d22-861cac6ba4ca" CreationDate="2023-01-13T17:46:31.703" UserId="2722" Text="|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25739" PostHistoryTypeId="5" PostId="6722" RevisionGUID="2a2d1024-9450-479e-9f7c-d619715b8592" CreationDate="2023-01-13T18:01:31.387" UserId="2722" Comment="added 598 characters in body" Text="i gonna add `pallet-assets` in my project but i faced this error : &#xD;&#xA;&#xD;&#xA;&gt;error[E0046]: not all trait items implemented, missing: `RemoveItemsLimit`, `AssetIdParameter`, `CreateOrigin`, `CallbackHandle`&#xD;&#xA;     --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:289:1&#xD;&#xA;      |&#xD;&#xA;  289 | impl pallet_assets::Config for Runtime {&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `RemoveItemsLimit`, `AssetIdParameter`, `CreateOrigin`, `CallbackHandle` in implementation&#xD;&#xA;      |&#xD;&#xA;      = help: implement the missing item: `type RemoveItemsLimit = Type;`&#xD;&#xA;      = help: implement the missing item: `type AssetIdParameter = Type;`&#xD;&#xA;      = help: implement the missing item: `type CreateOrigin = Type;`&#xD;&#xA;      = help: implement the missing item: `type CallbackHandle = Type;`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Repository][1]&#xD;&#xA;&#xD;&#xA;i did these steps : &#xD;&#xA;&#xD;&#xA;1 - Add `pallet-assets` in `Cargo.toml` : &#xD;&#xA;&#xD;&#xA;    pallet-assets = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2 - Add this Config in `runtime.rs` : &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       pub type AssetBalance = Balance;&#xD;&#xA;    pub type AssetId = u32;&#xD;&#xA;    &#xD;&#xA;    impl pallet_assets::Config for Runtime {&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type Balance = AssetBalance;&#xD;&#xA;    	type AssetId = AssetId;&#xD;&#xA;    	type Currency = Balances;&#xD;&#xA;    	type ForceOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;    	type AssetDeposit = ConstU128&lt;1&gt;;&#xD;&#xA;    	type AssetAccountDeposit = ConstU128&lt;10&gt;;&#xD;&#xA;    	type MetadataDepositBase = ConstU128&lt;1&gt;;&#xD;&#xA;    	type MetadataDepositPerByte = ConstU128&lt;1&gt;;&#xD;&#xA;    	type ApprovalDeposit = ConstU128&lt;1&gt;;&#xD;&#xA;    	type StringLimit = ConstU32&lt;50&gt;;&#xD;&#xA;    	type Freezer = ();&#xD;&#xA;    	type Extra = ();&#xD;&#xA;    	type WeightInfo = ();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this problem ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_dex" ContentLicense="CC BY-SA 4.0" />
  <row Id="25740" PostHistoryTypeId="2" PostId="6723" RevisionGUID="4439cc3c-9a27-423d-bbfd-49fd2a5fe01b" CreationDate="2023-01-13T18:16:17.313" UserId="139" Text="Just reading the error, it seems you have incomplete configuration of pallet-assets. Here's what the pallet needs:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait Config&lt;I: 'static = ()&gt;: Config {&#xD;&#xA;    type RuntimeEvent: From&lt;Event&lt;Self, I&gt;&gt; + IsType&lt;&lt;Self as Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + TypeInfo;&#xD;&#xA;    type RemoveItemsLimit: Get&lt;u32&gt;;&#xD;&#xA;    type AssetId: Member + Parameter + Copy + MaybeSerializeDeserialize + MaxEncodedLen;&#xD;&#xA;    type AssetIdParameter: Parameter + Copy + From&lt;Self::AssetId&gt; + Into&lt;Self::AssetId&gt; + MaxEncodedLen;&#xD;&#xA;    type Currency: ReservableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;    type CreateOrigin: EnsureOriginWithArg&lt;Self::RuntimeOrigin, Self::AssetId, Success = Self::AccountId&gt;;&#xD;&#xA;    type ForceOrigin: EnsureOrigin&lt;Self::RuntimeOrigin&gt;;&#xD;&#xA;    type AssetDeposit: Get&lt;&lt;&lt;Self as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;Self as SystemConfig&gt;::AccountId&gt;&gt;::Balance&gt;;&#xD;&#xA;    type AssetAccountDeposit: Get&lt;&lt;&lt;Self as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;Self as SystemConfig&gt;::AccountId&gt;&gt;::Balance&gt;;&#xD;&#xA;    type MetadataDepositBase: Get&lt;&lt;&lt;Self as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;Self as SystemConfig&gt;::AccountId&gt;&gt;::Balance&gt;;&#xD;&#xA;    type MetadataDepositPerByte: Get&lt;&lt;&lt;Self as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;Self as SystemConfig&gt;::AccountId&gt;&gt;::Balance&gt;;&#xD;&#xA;    type ApprovalDeposit: Get&lt;&lt;&lt;Self as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;Self as SystemConfig&gt;::AccountId&gt;&gt;::Balance&gt;;&#xD;&#xA;    type StringLimit: Get&lt;u32&gt;;&#xD;&#xA;    type Freezer: FrozenBalance&lt;Self::AssetId, Self::AccountId, Self::Balance&gt;;&#xD;&#xA;    type Extra: Member + Parameter + Default + MaxEncodedLen;&#xD;&#xA;    type CallbackHandle: AssetsCallback&lt;Self::AssetId, Self::AccountId&gt;;&#xD;&#xA;    type WeightInfo: WeightInfo;&#xD;&#xA;    type BenchmarkHelper: BenchmarkHelper&lt;Self::AssetIdParameter&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, that said, if you switch your pallet-assets to use `polkadot-v0.9.32`, you don't need to provide the extra configuration and this should work with it." ContentLicense="CC BY-SA 4.0" />
  <row Id="25742" PostHistoryTypeId="2" PostId="6724" RevisionGUID="f30a71ad-5e94-4c0c-a4f0-65d23181083e" CreationDate="2023-01-13T19:08:53.503" UserId="87" Text="We have a parachain testnet running on a local relaychain based on rococo v2. &#xD;&#xA;&#xD;&#xA;The Parachain is based on Cumulus (Polkadot and Substrate) v0.9.36 - so at the time of writing is the most up-to-date version;&#xD;&#xA;&#xD;&#xA;We are attempting a large batch transaction making transfers from one user to a very large number (n=1000) of users - a simulation of a coin distribution after a crowdloan.&#xD;&#xA;&#xD;&#xA;The transaction broke the parachain because the batch transaction apparently caused the block production to take took too long. The block time of 909ms mentioned seems absurdly short for it to break block production on a parachain that basically had a 12 second block time. &#xD;&#xA;&#xD;&#xA;This also looks a lot like an attack vector, which would concern us greatly as we also have a production chain.&#xD;&#xA;&#xD;&#xA;Is there any way to purge the extrinsics in the queue or recover the parachain some other way? It does not seem possible to restart the parachain once it has started producing blocks.&#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;2023-01-13 18:11:18 [Parachain] ⌛️ Discarding proposal for slot 139469456; block production took too long&#xD;&#xA;2023-01-13 18:12:54 [Parachain]  Prepared block for proposing at 563273 (909 ms) [hash: 0x2ad58e983e647f8f97dd955c0bfb0c0d7302465bc8ba1825184ce533f770073a; parent_hash: 0x790f…6483; extrinsics (3): [0xcd8e…bd1b, 0xb911…e88d, 0x85da…adb5]]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="25744" PostHistoryTypeId="1" PostId="6724" RevisionGUID="f30a71ad-5e94-4c0c-a4f0-65d23181083e" CreationDate="2023-01-13T19:08:53.503" UserId="87" Text="What to do if a parachain block takes too long?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25745" PostHistoryTypeId="3" PostId="6724" RevisionGUID="f30a71ad-5e94-4c0c-a4f0-65d23181083e" CreationDate="2023-01-13T19:08:53.503" UserId="87" Text="|parachain|parachain-collator|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25746" PostHistoryTypeId="5" PostId="6710" RevisionGUID="64c0ec24-205d-4227-bc8e-69e945de2714" CreationDate="2023-01-13T19:15:43.587" UserId="2484" Comment="added 427 characters in body" Text="I am currently developing an alternative to `Sudo` and `Democracy`. I wish to have a sudo key account, which is allowed to upgrade the chain, but only after a three month review period, the upgrade can get enacted. This can be done by allowing the sudo key account to call the following as root origin.&#xD;&#xA;&#xD;&#xA;`parachain_system::Call::&lt;T&gt;::authorize_upgrade(code_hash);`&#xD;&#xA;&#xD;&#xA;Now I want to know if there is any root origin call, which could be useful. It shouldn't have too much power like increasing the total supply/issuance of a token. I am searching for calls which are absolutely necessary to run a parachain.&#xD;&#xA;&#xD;&#xA;Here is some example: I thought about the extrinsic `parasSudoWrapper -&gt; sudoScheduleParaInitilialize`. I know this has to be called by the relaychain, but the point I am trying to make is that there might be some extrinsics, which are absolutely critical to keep running a parachain service.&#xD;&#xA;&#xD;&#xA;If there aren't any other than `authorize_upgrade` let me know. I know, that `authorize_upgrade` can alter the whole chain to allow any extrinsic again, but I want to ensure, that the parachain keeps running in the 3 month enactment/waiting period.&#xD;&#xA;&#xD;&#xA;For example is `frame_system::set_heap_pages`, `cumulus::sudo_send_upward_message`, `xcmp_queue::update_suspend_threshold`, `xcmp_queue::update_drop_threshold`, `xcmp_queue::update_resume_threshold`, `xcmp_queue::update_threshold_weight`, `xcmp_queue::update_weight_restrict_decay`, `xcmp_queue::update_xcmp_max_individual_weight` somehow important so that the network keeps running even without access to these root calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25748" PostHistoryTypeId="4" PostId="6724" RevisionGUID="2c4ed8d4-4564-412e-a462-89ac3ff2b57a" CreationDate="2023-01-13T20:39:09.273" UserId="87" Comment="Update title" Text="Can a parachain recover from a &quot;block taking too long&quot; error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25752" PostHistoryTypeId="10" PostId="6721" RevisionGUID="f8a4c39d-e10d-4e52-a800-c1765a854f0d" CreationDate="2023-01-14T02:48:31.010" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[1812],&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="25754" PostHistoryTypeId="2" PostId="6726" RevisionGUID="d5036804-35a1-4e15-955a-be5c4138d7d8" CreationDate="2023-01-14T05:16:52.303" UserId="2484" Text="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 config parameters? How?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25756" PostHistoryTypeId="1" PostId="6726" RevisionGUID="d5036804-35a1-4e15-955a-be5c4138d7d8" CreationDate="2023-01-14T05:16:52.303" UserId="2484" Text="How to get the call `authorize_upgrade` from `cumulus_pallet_parachain_system` inside another pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25757" PostHistoryTypeId="3" PostId="6726" RevisionGUID="d5036804-35a1-4e15-955a-be5c4138d7d8" CreationDate="2023-01-14T05:16:52.303" UserId="2484" Text="|extrinsic|cumulus|upgrade|configuration|config|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25758" PostHistoryTypeId="50" PostId="4309" RevisionGUID="2e39d6c9-759e-43b7-9ebe-8b4262f5ba7e" CreationDate="2023-01-14T06:04:50.567" UserId="-1" />
  <row Id="25759" PostHistoryTypeId="5" PostId="6726" RevisionGUID="4a2d9b2f-6c12-47f7-8ffd-4332be06216e" CreationDate="2023-01-14T06:07:59.910" UserId="2484" Comment="deleted 5 characters in body" Text="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 config parameters?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25760" PostHistoryTypeId="50" PostId="4306" RevisionGUID="62ebb387-889b-4162-9b7e-6e5ec79355f5" CreationDate="2023-01-14T08:08:51.087" UserId="-1" />
  <row Id="25761" PostHistoryTypeId="2" PostId="6727" RevisionGUID="0d481e1e-8080-4720-a6c0-ed57909633b7" CreationDate="2023-01-14T09:30:11.233" UserId="2976" Text="This error means there are some trait items not implemented. The pallet_assets::Config is the trait being implemented on the runtime type. For example something like this&#xD;&#xA;````&#xD;&#xA;trait Foo {&#xD;&#xA;    fn foo();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;struct Bar;&#xD;&#xA;&#xD;&#xA;impl Foo for Bar {}&#xD;&#xA;// error: not all trait items implemented, missing: `foo`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;as you can see when implementing the trait for the struct it doesn't contain the trait item`fn foo()`. The solution would be to add `fn foo()` like &#xD;&#xA;````&#xD;&#xA;trait Foo {&#xD;&#xA;    fn foo();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;struct Bar;&#xD;&#xA;&#xD;&#xA;impl Foo for Bar {&#xD;&#xA;    fn foo() {} // ok!&#xD;&#xA;}&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;So in your case the trait items not implemented are included in the error and the solution would be to add `type RemoveItemsLimit = ();`, `type AssetIdParameter = ();`, `type CreateOrigin = ();`, `type CallbackHandle = ();` to your trait implementation like:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA; pub type AssetBalance = Balance;&#xD;&#xA;pub type AssetId = u32;&#xD;&#xA;&#xD;&#xA;impl pallet_assets::Config for Runtime {&#xD;&#xA;    type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type Balance = AssetBalance;&#xD;&#xA;	type RemoveItemsLimit = ();&#xD;&#xA;	type AssetId = AssetId;&#xD;&#xA;	type AssetIdParameter = ();&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type CreateOrigin = ();&#xD;&#xA;	type ForceOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type AssetDeposit = ConstU128&lt;1&gt;;&#xD;&#xA;	type AssetAccountDeposit = ConstU128&lt;10&gt;;&#xD;&#xA;	type MetadataDepositBase = ConstU128&lt;1&gt;;&#xD;&#xA;	type MetadataDepositPerByte = ConstU128&lt;1&gt;;&#xD;&#xA;	type ApprovalDeposit = ConstU128&lt;1&gt;;&#xD;&#xA;	type StringLimit = ConstU32&lt;50&gt;;&#xD;&#xA;	type Freezer = ();&#xD;&#xA;	type Extra = ();&#xD;&#xA;	type CallbackHandle = ();&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;````" ContentLicense="CC BY-SA 4.0" />
  <row Id="25763" PostHistoryTypeId="50" PostId="6245" RevisionGUID="5c49a3e9-04d3-47e3-a9f9-29716417e5d3" CreationDate="2023-01-14T10:04:20.600" UserId="-1" />
  <row Id="25766" PostHistoryTypeId="50" PostId="6234" RevisionGUID="c30a1876-9510-4de4-971a-45e55b3267eb" CreationDate="2023-01-14T12:00:50.090" UserId="-1" />
  <row Id="25767" PostHistoryTypeId="5" PostId="6583" RevisionGUID="313be935-4432-4053-94fa-b9d66cab7cf8" CreationDate="2023-01-14T14:26:29.213" UserId="3346" Comment="updated with recent results" Text="found this (https://github.com/polkadot-js/apps/issues/7790) suggesting that there are one or more offending props from before the runtime upgrade that cannot be decoded and that, like xmas lights, if there is one bad one, the whole list will act badly. … removed old proposals by disapproving them via extrinsics. &#xD;&#xA;&#xD;&#xA;But that did not fix the problem. After much experimentation we have found that **you can approve, disapprove, and close any council motion (or technical committee motion - had the same problem there too) by using extrinsics directly with the chain. The chain code is fine and functioning.** This is a problem with the Polkadot-JS code on the council page and on the technical committee page. " ContentLicense="CC BY-SA 4.0" />
  <row Id="25768" PostHistoryTypeId="2" PostId="6729" RevisionGUID="51ad425e-eb65-42ef-ade8-8ccc30eb21d5" CreationDate="2023-01-14T18:05:01.723" UserId="1867" Text="There is a WIP PR for arkworks-rs integration: https://github.com/paritytech/substrate/pull/13031&#xD;&#xA;&#xD;&#xA;You might want to check out https://github.com/achimcc/substrate-groth16 which verifyes a groth16 proof using arkworks library and this repo: https://github.com/achimcc/ark-substrate&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25770" PostHistoryTypeId="2" PostId="6730" RevisionGUID="6d40d17f-6e77-44b0-8077-bedd31b26b95" CreationDate="2023-01-14T18:06:46.503" UserId="1867" Text="There is a WIP PR for arkworks-rs integration: https://github.com/paritytech/substrate/pull/13031 It adds host-funciton calls for BLS12_381.&#xD;&#xA;&#xD;&#xA;The curves are living in this repo: https://github.com/achimcc/ark-substrate.&#xD;&#xA;&#xD;&#xA;You might want to check out https://github.com/achimcc/substrate-groth16 which verifys a groth16 proof using arkworks library and the PR." ContentLicense="CC BY-SA 4.0" />
  <row Id="25772" PostHistoryTypeId="2" PostId="6731" RevisionGUID="6d83d7f6-6e86-4934-b9d1-ea13520a9932" CreationDate="2023-01-14T20:49:29.077" UserId="3437" Text="First of all I apologise in advance for asking this weird question. I am not sure if this is the right forum. &#xD;&#xA;&#xD;&#xA;I have a scenario, where I have a data structure and storage like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, Default)]&#xD;&#xA;    pub struct Department {&#xD;&#xA;    pub name: Vec&lt;u8&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, Default)]&#xD;&#xA;    pub struct Teacher {&#xD;&#xA;    pub id: TeacherId,&#xD;&#xA;    pub name: Vec&lt;u8&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn teachers)]&#xD;&#xA;	pub type Teachers&lt;T&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		DepartmentId,&#xD;&#xA;		Vec&lt;Teacher&gt;,&#xD;&#xA;		OptionQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn schools)]&#xD;&#xA;	pub type Schools&lt;T&gt; = StorageDoubleMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		SchoolId,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		DepartmentId,&#xD;&#xA;		Department,&#xD;&#xA;		OptionQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have a very simple extrinsic, where user has to pass school id. &#xD;&#xA;&#xD;&#xA;Would it be possible to show a dropdown, once user enters school id? I do not want user to enter department id as an input?&#xD;&#xA;&#xD;&#xA;Likewise, if above is possible, after selecting department from dropdown, would it be possible to show list of teachers in a dropdown?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks in advance :)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25774" PostHistoryTypeId="1" PostId="6731" RevisionGUID="6d83d7f6-6e86-4934-b9d1-ea13520a9932" CreationDate="2023-01-14T20:49:29.077" UserId="3437" Text="How to show dropdown in PolkadotJS after selecting an item for extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25775" PostHistoryTypeId="3" PostId="6731" RevisionGUID="6d83d7f6-6e86-4934-b9d1-ea13520a9932" CreationDate="2023-01-14T20:49:29.077" UserId="3437" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25776" PostHistoryTypeId="50" PostId="4284" RevisionGUID="9316207e-9cfc-47cd-8b0a-bcb4c01dd801" CreationDate="2023-01-15T00:05:30.603" UserId="-1" />
  <row Id="25777" PostHistoryTypeId="2" PostId="6732" RevisionGUID="6642fbcb-a894-4f32-8c7b-4fa6efdb0248" CreationDate="2023-01-15T05:58:09.243" UserId="73" Text="If this is just one transaction, you can restart the collators to get rid off the transaction. The transaction pool isn't persisting any transactions. But be aware that other nodes also may have the transaction in their pool and so nodes that restart may see it again. If your transaction is has a lifetime attached (not being immortal) it will also be removed from the pool at some point.&#xD;&#xA;&#xD;&#xA;&gt; This also looks a lot like an attack vector, which would concern us greatly as we also have a production chain.&#xD;&#xA;&#xD;&#xA;It is an attack vector. This issue shows that you are not having done proper benchmarking of your coin distribution functionality. Otherwise the block production should stop early while trying to apply the extrinsic as the weight is more than what fits in the block. " ContentLicense="CC BY-SA 4.0" />
  <row Id="25779" PostHistoryTypeId="2" PostId="6733" RevisionGUID="e010d044-d891-4c19-a9fa-0741eba412eb" CreationDate="2023-01-15T06:12:11.140" UserId="1891" Text="I am trying to generate an sr25519 signature within benchmarks. But i am facing an error that doesn't make sense to me.&#xD;&#xA;`&#xD;&#xA;let sig: T::Signature = acc_pair.sign(&amp;schema.encode());&#xD;&#xA;   |                  ------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found struct sp_core::sr25519::Signature&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;Below is the definition of my type in the config trait:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		type Public: IdentifyAccount&lt;AccountId = Self::AccountId&gt; + Encode + Decode + Member + TypeInfo;&#xD;&#xA;&#xD;&#xA;		type Signature: Verify&lt;Signer = Self::Public&gt; + Member + Parameter + Decode + Encode + TypeInfo;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;How can i correctly create signatures in benchmarks? An explanation of where am going wrong will be appreciated.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25781" PostHistoryTypeId="1" PostId="6733" RevisionGUID="e010d044-d891-4c19-a9fa-0741eba412eb" CreationDate="2023-01-15T06:12:11.140" UserId="1891" Text="How do i generate signatures in benchmarks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25782" PostHistoryTypeId="3" PostId="6733" RevisionGUID="e010d044-d891-4c19-a9fa-0741eba412eb" CreationDate="2023-01-15T06:12:11.140" UserId="1891" Text="|benchmarking|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25783" PostHistoryTypeId="2" PostId="6734" RevisionGUID="7e923d7d-f54e-4f8e-85dd-b8670d70bef1" CreationDate="2023-01-15T06:16:36.547" UserId="73" Text="```&#xD;&#xA;cumulus_pallet_parachain_system::Call::&lt;T&gt;::authorize_upgrade { code_hash }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This gives you access in your pallet to the parachain system `Call`. `T` needs to implement `cumulus_pallet_parachain_system::Config`.&#xD;&#xA;&#xD;&#xA;In your config you need to add:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;trait Config {&#xD;&#xA;... &#xD;&#xA;    type Call: From&lt;cumulus_pallet_parachain_system::Call&gt; + frame_support::dispatch::Dispatchable;&#xD;&#xA;... &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is required to be able to convert the parachain system call into the runtime call and to dispatch the call. " ContentLicense="CC BY-SA 4.0" />
  <row Id="25785" PostHistoryTypeId="2" PostId="6735" RevisionGUID="5e86320c-4e94-40d7-93e9-3cd633400382" CreationDate="2023-01-15T06:20:54.730" UserId="73" Text="&gt; Is there a way to start the blockchain such that no session keys are set?&#xD;&#xA;&#xD;&#xA;No, then no one could produce blocks nor finalize blocks. &#xD;&#xA;&#xD;&#xA;&gt; Do all grandpa authorities need to be hardcoded in the chain spec? If not, how are the authorities added after nodes have gone live?&#xD;&#xA;&#xD;&#xA;All initial validators need to have set all session keys which includes the grandpa keys. After the chain is running new authorities will then be able to join by staking funds and being elected into the active set. " ContentLicense="CC BY-SA 4.0" />
  <row Id="25787" PostHistoryTypeId="50" PostId="6358" RevisionGUID="c060db6f-bbd4-4515-8033-05dd3559a0ed" CreationDate="2023-01-15T07:03:50.440" UserId="-1" />
  <row Id="25788" PostHistoryTypeId="10" PostId="6733" RevisionGUID="91813ade-6a06-4bd6-ae8a-204f5eb1fa9c" CreationDate="2023-01-15T10:57:53.847" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[5061],&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="25789" PostHistoryTypeId="50" PostId="6379" RevisionGUID="feca96a1-6435-4511-895c-2c53eadaec5f" CreationDate="2023-01-15T14:01:15.150" UserId="-1" />
  <row Id="25790" PostHistoryTypeId="2" PostId="6736" RevisionGUID="afddc3c7-cd0a-467b-8e09-e9ce90c44357" CreationDate="2023-01-15T17:53:46.350" UserId="1721" Text="&#xD;&#xA;if the type for extrinsic verification `pub struct ChargeTransactionPayment&lt;T: Config&gt;` has been changed on a chain, how do we update the polkadot.js API to use the new types? Suppose the type has been changed to &#xD;&#xA;```&#xD;&#xA;pub struct ChargeTransactionPayment&lt;T: Config&gt; {&#xD;&#xA;	pub scheme: u8,&#xD;&#xA;	pub asset_id: Option&lt;ChargeAssetIdOf&lt;T&gt;&gt;,&#xD;&#xA;	pub tip: BalanceOf&lt;T&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;How can I let the polkdot.js api know about this update and set them before executing an extrinsic? I tried adding it to the registry and calling the extrinsic as shown below. but it give me the error `&quot;createType(ChargeAssetTxPayment):: DoNotConstruct: Cannot construct unknown type ChargeAssetTxPayment&quot;`&#xD;&#xA;```&#xD;&#xA;api.registry.createType(&quot;ChargeAssetTxPayment&quot;, {&#xD;&#xA;                    extrinsic: {&#xD;&#xA;                        scheme:'2',&#xD;&#xA;                        asset_id: 4,&#xD;&#xA;                        tip: 10&#xD;&#xA;                    },&#xD;&#xA;                    payload: {}&#xD;&#xA;                })&#xD;&#xA;```&#xD;&#xA;I am trying to do something similar to what statemint did, is it possible to set these custom parameters using the api directly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25792" PostHistoryTypeId="1" PostId="6736" RevisionGUID="afddc3c7-cd0a-467b-8e09-e9ce90c44357" CreationDate="2023-01-15T17:53:46.350" UserId="1721" Text="Custom ChargeTransactionPayment type for extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="25793" PostHistoryTypeId="3" PostId="6736" RevisionGUID="afddc3c7-cd0a-467b-8e09-e9ce90c44357" CreationDate="2023-01-15T17:53:46.350" UserId="1721" Text="|polkadot-js|extrinsic|api|custom-types|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25794" PostHistoryTypeId="2" PostId="6737" RevisionGUID="3cefae74-50a5-486f-9592-ac889b9411e3" CreationDate="2023-01-15T18:33:57.940" UserId="2484" Text="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 comes into mind is to mock the balances.&#xD;&#xA;&#xD;&#xA;So I need to implement `ExtBuilder`. The reason to take this approach is because I always need to copy stuff from my actual runtime to the mock, but in my case it's always the same configuration." ContentLicense="CC BY-SA 4.0" />
  <row Id="25796" PostHistoryTypeId="1" PostId="6737" RevisionGUID="3cefae74-50a5-486f-9592-ac889b9411e3" CreationDate="2023-01-15T18:33:57.940" UserId="2484" Text="How is it possible to avoid a mock runtime and use the actual runtime for testing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25797" PostHistoryTypeId="3" PostId="6737" RevisionGUID="3cefae74-50a5-486f-9592-ac889b9411e3" CreationDate="2023-01-15T18:33:57.940" UserId="2484" Text="|runtime|testing|mock|configuration|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25798" PostHistoryTypeId="2" PostId="6738" RevisionGUID="69770502-6e19-45af-9a36-f21b6f2b328f" CreationDate="2023-01-15T18:49:52.040" UserId="85" Text="I tried to vote from a ledger kusama account on polkadot js and I get `Raw data signing is not supported for hardware wallets`. Is this a limitation of the zondax ledger app or a polkadot-js limitation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25800" PostHistoryTypeId="1" PostId="6738" RevisionGUID="69770502-6e19-45af-9a36-f21b6f2b328f" CreationDate="2023-01-15T18:49:52.040" UserId="85" Text="Can't vote from ledger using a hardware wallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25801" PostHistoryTypeId="3" PostId="6738" RevisionGUID="69770502-6e19-45af-9a36-f21b6f2b328f" CreationDate="2023-01-15T18:49:52.040" UserId="85" Text="|polkadot-js|signing|ledger|hardware|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25802" PostHistoryTypeId="2" PostId="6739" RevisionGUID="faea9436-41c2-4785-af26-15d6260baa8c" CreationDate="2023-01-15T19:16:40.110" UserId="2484" Text="It is important to have the `mock.rs` inside the runtime folder. Then you can just import all runtime parameters with `use crate::*;` inside the `mock.rs`.&#xD;&#xA;&#xD;&#xA;Just found out that I can just use `Runtime` instead of `Test` as a generic to all instances of the test and mock. In addition to that, you need to create Accounts as actual accounts and not just numbers.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_core::{sr25519, Pair, Public, H256};&#xD;&#xA;use sp_runtime::traits::{IdentifyAccount, Verify};&#xD;&#xA;&#xD;&#xA;type AccountPublic = &lt;Signature as Verify&gt;::Signer;&#xD;&#xA;&#xD;&#xA;/// Helper function to generate a crypto pair from seed&#xD;&#xA;pub fn get_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; &lt;TPublic::Pair as Pair&gt;::Public {&#xD;&#xA;	TPublic::Pair::from_string(&amp;format!(&quot;//{seed}&quot;), None)&#xD;&#xA;		.expect(&quot;static values are valid; qed&quot;)&#xD;&#xA;		.public()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Helper function to generate an account ID from seed&#xD;&#xA;pub fn get_account_id_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; AccountId&#xD;&#xA;where&#xD;&#xA;	AccountPublic: From&lt;&lt;TPublic::Pair as Pair&gt;::Public&gt;,&#xD;&#xA;{&#xD;&#xA;	AccountPublic::from(get_from_seed::&lt;TPublic&gt;(seed)).into_account()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn alice() -&gt; AccountId {&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn bob() -&gt; AccountId {&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn charlie() -&gt; AccountId {&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn dave() -&gt; AccountId {&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn eva() -&gt; AccountId {&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eva&quot;)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn fred() -&gt; AccountId {&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Fred&quot;)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can leave the `ExtBuilder` as it is. It just builds the execution environment with the actual runtime as a charm!" ContentLicense="CC BY-SA 4.0" />
  <row Id="25804" PostHistoryTypeId="2" PostId="6740" RevisionGUID="6f714823-7063-4d83-9d5f-3492df995173" CreationDate="2023-01-15T22:48:20.000" UserId="170" Text="You need to create your own fn which will be payable, and call the `_mint` function in this fn. However it would be a nice thing to have, we can look into this within OpenBrush." ContentLicense="CC BY-SA 4.0" />
  <row Id="25806" PostHistoryTypeId="2" PostId="6741" RevisionGUID="1d03c90a-d2f1-4c82-8dcc-8425901f90b3" CreationDate="2023-01-15T23:06:24.803" UserId="3114" Text="I asked on Element's BrushFam. And &quot;Dominik | Brushfam&quot; told me.&#xD;&#xA;To fix this error you need to import everything. As below.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use commons::*;&#xD;&#xA;```&#xD;&#xA;trait_definition macro generates some code which is then used by the ink_contract so you need to expose that too in order to impl that trait for your contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="25809" PostHistoryTypeId="2" PostId="6742" RevisionGUID="68efde4d-2bd7-4b08-b898-16afadbbbf4f" CreationDate="2023-01-16T10:33:01.307" UserId="3123" Text="[question originally posted on [polkadot forum](https://forum.polkadot.network/t/where-is-the-documentation-for-assimilate-storage-function/1667/1) but moved here since it seems to be considered a more appropriate place]&#xD;&#xA;&#xD;&#xA;I do not find documentation for the [`assimilate_storage`](https://github.com/paritytech/substrate/search?p=1&amp;q=assimilate_storage) function anywhere in the substrate codebase. It seems substrate documentation is provided in a Q&amp;A style here on stackexchage ([ref](https://forum.polkadot.network/t/suggestion-add-support-and-bug-report-categories/1668)), that's why I'm asking it here." ContentLicense="CC BY-SA 4.0" />
  <row Id="25811" PostHistoryTypeId="1" PostId="6742" RevisionGUID="68efde4d-2bd7-4b08-b898-16afadbbbf4f" CreationDate="2023-01-16T10:33:01.307" UserId="3123" Text="Where can I find documentation for `assimilate_storage` function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25812" PostHistoryTypeId="3" PostId="6742" RevisionGUID="68efde4d-2bd7-4b08-b898-16afadbbbf4f" CreationDate="2023-01-16T10:33:01.307" UserId="3123" Text="|storage|primitive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25813" PostHistoryTypeId="2" PostId="6743" RevisionGUID="6be6e163-f0fd-448c-be3b-50479ee4a758" CreationDate="2023-01-16T10:33:01.307" UserId="3123" Text="[answer originally posted by @alejandro on [polkadot forum](https://forum.polkadot.network/t/where-is-the-documentation-for-assimilate-storage-function/1667/2)]&#xD;&#xA;&#xD;&#xA;`fn assimilate_storage` is part of [`BuildStorage`](https://github.com/paritytech/substrate/blob/e9b0facf70eeb08032cc7e83548c62f0b4a24bb1/primitives/runtime/src/lib.rs#L185-L196) trait defined in primitives&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Complex storage builder stuff.&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;pub trait BuildStorage {&#xD;&#xA;	/// Build the storage out of this builder.&#xD;&#xA;	fn build_storage(&amp;self) -&gt; Result&lt;sp_core::storage::Storage, String&gt; {&#xD;&#xA;		let mut storage = Default::default();&#xD;&#xA;		self.assimilate_storage(&amp;mut storage)?;&#xD;&#xA;		Ok(storage)&#xD;&#xA;	}&#xD;&#xA;	/// Assimilate the storage for this module into pre-existing overlays.&#xD;&#xA;	fn assimilate_storage(&amp;self, storage: &amp;mut sp_core::storage::Storage) -&gt; Result&lt;(), String&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can find an [implementation for it in the chain_spec module](https://github.com/paritytech/substrate/blob/e9b0facf70eeb08032cc7e83548c62f0b4a24bb1/client/chain-spec/src/chain_spec.rs#L111-L134) in the client.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;G: RuntimeGenesis, E&gt; BuildStorage for ChainSpec&lt;G, E&gt; {&#xD;&#xA;	fn assimilate_storage(&amp;self, storage: &amp;mut Storage) -&gt; Result&lt;(), String&gt; {&#xD;&#xA;		match self.genesis.resolve()? {&#xD;&#xA;			Genesis::Runtime(gc) =&gt; gc.assimilate_storage(storage),&#xD;&#xA;			Genesis::Raw(RawGenesis { top: map, children_default: children_map }) =&gt; {&#xD;&#xA;				storage.top.extend(map.into_iter().map(|(k, v)| (k.0, v.0)));&#xD;&#xA;				children_map.into_iter().for_each(|(k, v)| {&#xD;&#xA;					let child_info = ChildInfo::new_default(k.0.as_slice());&#xD;&#xA;					storage&#xD;&#xA;						.children_default&#xD;&#xA;						.entry(k.0)&#xD;&#xA;						.or_insert_with(|| StorageChild { data: Default::default(), child_info })&#xD;&#xA;						.data&#xD;&#xA;						.extend(v.into_iter().map(|(k, v)| (k.0, v.0)));&#xD;&#xA;				});&#xD;&#xA;				Ok(())&#xD;&#xA;			},&#xD;&#xA;			// The `StateRootHash` variant exists as a way to keep note that other clients support&#xD;&#xA;			// it, but Substrate itself isn't capable of loading chain specs with just a hash at the&#xD;&#xA;			// moment.&#xD;&#xA;			Genesis::StateRootHash(_) =&gt; Err(&quot;Genesis storage in hash format not supported&quot;.into()),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;At the same time, `fn assimilate_storage` is part of the [trait `GenesisBuild` defined in `frame-support` pallet](https://github.com/paritytech/substrate/blob/e9b0facf70eeb08032cc7e83548c62f0b4a24bb1/frame/support/src/traits/hooks.rs#L326-L348).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// A trait to define the build function of a genesis config, T and I are placeholder for pallet&#xD;&#xA;/// trait and pallet instance.&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;pub trait GenesisBuild&lt;T, I = ()&gt;: Default + sp_runtime::traits::MaybeSerializeDeserialize {&#xD;&#xA;	/// The build function is called within an externalities allowing storage APIs.&#xD;&#xA;	/// Thus one can write to storage using regular pallet storages.&#xD;&#xA;	fn build(&amp;self);&#xD;&#xA;&#xD;&#xA;	/// Build the storage using `build` inside default storage.&#xD;&#xA;	fn build_storage(&amp;self) -&gt; Result&lt;sp_runtime::Storage, String&gt; {&#xD;&#xA;		let mut storage = Default::default();&#xD;&#xA;		self.assimilate_storage(&amp;mut storage)?;&#xD;&#xA;		Ok(storage)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	/// Assimilate the storage for this module into pre-existing overlays.&#xD;&#xA;	fn assimilate_storage(&amp;self, storage: &amp;mut sp_runtime::Storage) -&gt; Result&lt;(), String&gt; {&#xD;&#xA;		sp_state_machine::BasicExternalities::execute_with_storage(storage, || {&#xD;&#xA;			self.build();&#xD;&#xA;			Ok(())&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see this one being used as part of the [implementation of `GenesisConfig`in frame-system pallet](https://github.com/paritytech/substrate/blob/e9b0facf70eeb08032cc7e83548c62f0b4a24bb1/frame/system/src/lib.rs#L676-L693).&#xD;&#xA;```rust&#xD;&#xA;/// Direct implementation of `GenesisBuild::assimilate_storage`.&#xD;&#xA;///&#xD;&#xA;/// Kept in order not to break dependency.&#xD;&#xA;pub fn assimilate_storage&lt;T: Config&gt;(&#xD;&#xA;	&amp;self,&#xD;&#xA;	storage: &amp;mut sp_runtime::Storage,&#xD;&#xA;) -&gt; Result&lt;(), String&gt; {&#xD;&#xA;	&lt;Self as GenesisBuild&lt;T&gt;&gt;::assimilate_storage(self, storage)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25815" PostHistoryTypeId="16" PostId="6743" RevisionGUID="f0b17d50-cfa6-4601-944b-f4169870dcff" CreationDate="2023-01-16T10:33:01.307" UserId="3123" />
  <row Id="25816" PostHistoryTypeId="2" PostId="6744" RevisionGUID="dc40d8ff-155f-458e-b081-2adf53999784" CreationDate="2023-01-16T10:46:20.643" UserId="3123" Text="There is no documentation, substrate users should figure out what traits methods do by reading implementation and use cases." ContentLicense="CC BY-SA 4.0" />
  <row Id="25818" PostHistoryTypeId="2" PostId="6745" RevisionGUID="0ad0998d-b53b-4901-97ee-30b688a795e2" CreationDate="2023-01-16T11:36:29.280" UserId="380" Text="We were using `self.env.random()` in our contract to [generate a random number](https://substrate.stackexchange.com/questions/3152/generating-random-numbers-in-ink). The calling user's `AccountId` was used to give additional entropy to the random generation.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        fn get_random_number(&amp;self, min: u64, max: u64, user_account: AccountId) -&gt; u64 {&#xD;&#xA;            let random_seed = self.env().random(user_account.as_ref());&#xD;&#xA;            let mut seed_converted: [u8; 32] = Default::default();&#xD;&#xA;            seed_converted.copy_from_slice(random_seed.0.as_ref());&#xD;&#xA;            let mut rng = ChaChaRng::from_seed(seed_converted);&#xD;&#xA;            ((rng.next_u64() / u64::MAX) * (max - min) + min) as u64&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The random number was used to select an index in a `Vec&lt;AccountId&gt;` when the caller performed a read operation on the contract. This function allowed us to create basic load balancer functionality, in which the AccountIds in the vector are selected at random. Subsequent operations involving the selected `AccountId` are performed off-chain. There is no transaction involved.&#xD;&#xA;&#xD;&#xA;Now `self.env.random()` has been [removed from ink](https://github.com/paritytech/ink/blob/4655a8b4413cb50cbc38d1b7c173ad426ab06cde/CHANGELOG.md#random-function-removed), how should we generate a source of randomness in the contract? The block hash would probably provide a random enough source but it is not available. `block_timestamp` is too predictable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25820" PostHistoryTypeId="1" PostId="6745" RevisionGUID="0ad0998d-b53b-4901-97ee-30b688a795e2" CreationDate="2023-01-16T11:36:29.280" UserId="380" Text="How can I generate a random seed now that self.env.random() is removed in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25821" PostHistoryTypeId="3" PostId="6745" RevisionGUID="0ad0998d-b53b-4901-97ee-30b688a795e2" CreationDate="2023-01-16T11:36:29.280" UserId="380" Text="|ink|pallet-contracts|contracts|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25822" PostHistoryTypeId="5" PostId="6745" RevisionGUID="118e81f5-99e8-4f8b-8e52-25994c5b6621" CreationDate="2023-01-16T11:43:47.963" UserId="380" Comment="deleted 37 characters in body" Text="We were using `self.env.random()` in our contract to [generate a random number](https://substrate.stackexchange.com/a/3156/380). The calling user's `AccountId` was used to give additional entropy to the random generation.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        fn get_random_number(&amp;self, min: u64, max: u64, user_account: AccountId) -&gt; u64 {&#xD;&#xA;            let random_seed = self.env().random(user_account.as_ref());&#xD;&#xA;            let mut seed_converted: [u8; 32] = Default::default();&#xD;&#xA;            seed_converted.copy_from_slice(random_seed.0.as_ref());&#xD;&#xA;            let mut rng = ChaChaRng::from_seed(seed_converted);&#xD;&#xA;            ((rng.next_u64() / u64::MAX) * (max - min) + min) as u64&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The random number was used to select an index in a `Vec&lt;AccountId&gt;` when the caller performed a read operation on the contract. This function allowed us to create basic load balancer functionality, in which the AccountIds in the vector are selected at random. Subsequent operations involving the selected `AccountId` are performed off-chain. There is no transaction involved.&#xD;&#xA;&#xD;&#xA;Now `self.env.random()` has been [removed from ink](https://github.com/paritytech/ink/blob/4655a8b4413cb50cbc38d1b7c173ad426ab06cde/CHANGELOG.md#random-function-removed), how should we generate a source of randomness in the contract? The block hash would probably provide a random enough source but it is not available. `block_timestamp` is too predictable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25823" PostHistoryTypeId="2" PostId="6746" RevisionGUID="c11576f3-8883-4e97-b900-9ed60d8b5942" CreationDate="2023-01-16T11:46:35.553" UserId="3707" Text="i will try to explain it briefly. I'm using Promise API to connect to few different rpcs (ws). also I'm listening to event connected on each websocket provider. when all providers connected I call res to resolve my new promise that returns in my connectRpcs fn. then in other fn I call:&#xD;&#xA;&#xD;&#xA;`await ApiPromise.create({ provider })`&#xD;&#xA;&#xD;&#xA;and wait until `ApiPromise.create` resolves for each provider. When all providers and APIs are set up I'm trying to call `api.query.system.account` for some rpc from the list and rpc throws error&#xD;&#xA;&#xD;&#xA;`RPC-CORE: queryStorageAt(keys: Vec&lt;StorageKey&gt;, at?: BlockHash): Vec&lt;StorageChangeSet&gt;:: cannot call send() while not connected`&#xD;&#xA;&#xD;&#xA;I logged `provider.isConnected` for each provider and it returns `true`. why provider says that I'm not connected to rpc? any guesses? I can share code in hastebin to clarify some points" ContentLicense="CC BY-SA 4.0" />
  <row Id="25825" PostHistoryTypeId="1" PostId="6746" RevisionGUID="c11576f3-8883-4e97-b900-9ed60d8b5942" CreationDate="2023-01-16T11:46:35.553" UserId="3707" Text="&quot;Cannot call send() while not connected&quot; with RPC websocket provider" ContentLicense="CC BY-SA 4.0" />
  <row Id="25826" PostHistoryTypeId="3" PostId="6746" RevisionGUID="c11576f3-8883-4e97-b900-9ed60d8b5942" CreationDate="2023-01-16T11:46:35.553" UserId="3707" Text="|polkadot-js|rpc|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25827" PostHistoryTypeId="5" PostId="6746" RevisionGUID="fef27cc1-94bf-4db2-9608-3869333c1e70" CreationDate="2023-01-16T12:18:43.073" UserId="2762" Comment="added 45 characters in body" Text="I will try to explain it briefly. I'm using Promise API to connect to few different RPCs (ws). Also I'm listening to an event connected on each websocket provider. When all providers are connected I call res to resolve my new promise that returns in my `connectRpcs` function. Then in other function I call:&#xD;&#xA;&#xD;&#xA;`await ApiPromise.create({ provider })`&#xD;&#xA;&#xD;&#xA;and wait until `ApiPromise.create` resolves for each provider. When all providers and APIs are set up I'm trying to call `api.query.system.account` for some rpc from the list and the rpc throws the error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RPC-CORE: queryStorageAt(keys: Vec&lt;StorageKey&gt;, at?: BlockHash): Vec&lt;StorageChangeSet&gt;:: cannot call send() while not connected&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I logged `provider.isConnected` for each provider and it returns `true`. Why provider says that I'm not connected to the rpc? any guesses? I can share code in `hastebin` to clarify some points." ContentLicense="CC BY-SA 4.0" />
  <row Id="25828" PostHistoryTypeId="5" PostId="6733" RevisionGUID="f219ac18-3599-4865-b5f2-8920e2f0f46c" CreationDate="2023-01-16T12:19:55.013" UserId="1891" Comment="added 158 characters in body; edited title" Text="I am trying to generate an sr25519 signature within benchmarks. But i am facing an error that doesn't make sense to me.&#xD;&#xA;`&#xD;&#xA;let sig: T::Signature = acc_pair.sign(&amp;schema.encode());&#xD;&#xA;   |                  ------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found struct sp_core::sr25519::Signature&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;Below is the definition of my type in the config trait:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		type Public: IdentifyAccount&lt;AccountId = Self::AccountId&gt; + Encode + Decode + Member + TypeInfo;&#xD;&#xA;&#xD;&#xA;		type Signature: Verify&lt;Signer = Self::Public&gt; + Member + Parameter + Decode + Encode + TypeInfo;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;How can i correctly create signatures in benchmarks? An explanation of where am going wrong will be appreciated. Unfortunately i can't share the code. You can share an example of a signature generated in benchmarks based on the defined signature type in the Config trait&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25829" PostHistoryTypeId="4" PostId="6733" RevisionGUID="f219ac18-3599-4865-b5f2-8920e2f0f46c" CreationDate="2023-01-16T12:19:55.013" UserId="1891" Comment="added 158 characters in body; edited title" Text="How do i generate signatures in benchmarking.rs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25831" PostHistoryTypeId="2" PostId="6747" RevisionGUID="a5f285bd-20dc-43ba-a401-0ed9cad2c613" CreationDate="2023-01-16T13:04:15.280" UserId="298" Text="I'm trying to use useCall() to add to polkadot js ui. &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1].&#xD;&#xA;&#xD;&#xA;I've added the type interface:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/** @name UserSupersig */&#xD;&#xA;export interface UserSupersig extends Struct {&#xD;&#xA;    readonly user_supersigs: Vec&lt;SupersigIdInfo&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Argument of type 'PromiseRpcResult&lt;AugmentedRpc&lt;(user_account: string | AccountId | Uint8Array) =&gt; Observable&lt;UserSupersig&gt;&gt;&gt;' is not assignable to parameter of type 'false | TrackFn | null | undefined'.&#xD;&#xA;  Type 'PromiseRpcResult&lt;AugmentedRpc&lt;(user_account: string | AccountId | Uint8Array) =&gt; Observable&lt;UserSupersig&gt;&gt;&gt;' is not assignable to type 'PromiseResult&lt;AnyFunction&gt;'.&#xD;&#xA;    Types of parameters 'user_account' and 'args_0' are incompatible.&#xD;&#xA;      Type '[...any[], (result: unknown) =&gt; void | Promise&lt;void&gt;]' is not assignable to type '[user_account: string | AccountId | Uint8Array]'.&#xD;&#xA;        Target allows only 1 element(s) but source may have more&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;Just trying to make sense of this error and how to fix. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TlLpT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25833" PostHistoryTypeId="1" PostId="6747" RevisionGUID="a5f285bd-20dc-43ba-a401-0ed9cad2c613" CreationDate="2023-01-16T13:04:15.280" UserId="298" Text="How to use `useCall()` polkadot react-hook? Type issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="25834" PostHistoryTypeId="3" PostId="6747" RevisionGUID="a5f285bd-20dc-43ba-a401-0ed9cad2c613" CreationDate="2023-01-16T13:04:15.280" UserId="298" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25835" PostHistoryTypeId="2" PostId="6748" RevisionGUID="6c6c5d82-dfd6-4e30-b34e-57a60fead471" CreationDate="2023-01-16T13:21:58.027" UserId="2762" Text="What happens is that trying to make the call `api.query.system.account` before connect to the node.&#xD;&#xA;&#xD;&#xA;Review all the await/async, I have added and async inside of the Promise.all you have in the index.js file and it worked:&#xD;&#xA;&#xD;&#xA;    const result = await Promise.all(Object.keys(chains).map(chain =&gt; {&#xD;&#xA;        (async () =&gt; {&#xD;&#xA;            const api = chains[chain];&#xD;&#xA;            /*&#xD;&#xA;                RPC-CORE: queryStorageAt(keys: Vec&lt;StorageKey&gt;, at?: BlockHash): Vec&lt;StorageChangeSet&gt;:: cannot call send()             while not connected&#xD;&#xA;            */&#xD;&#xA;            const { data: balance } = await api.query.system.account('MY ADDRESS')&#xD;&#xA;            return balance.free&#xD;&#xA;        })()&#xD;&#xA;    }));&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="25837" PostHistoryTypeId="2" PostId="6749" RevisionGUID="ba92dfc4-2502-42ef-9ddb-fe3a5d343a29" CreationDate="2023-01-16T13:25:13.677" UserId="3708" Text="I’m running a local network with two parachain using zombienet. When I try to transferAsset from one parachain to another using ReserveAssetTransfers I always get WeightNotComputable error.&#xD;&#xA;&#xD;&#xA;zombienet config.toml:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  rpc_port = 30100&#xD;&#xA;  ws_port = 30101&#xD;&#xA;  &#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  rpc_port = 30200&#xD;&#xA;  ws_port = 30201&#xD;&#xA;  &#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;  rpc_port = 30300&#xD;&#xA;  ws_port = 30301&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;dave&quot;&#xD;&#xA;  rpc_port = 30400&#xD;&#xA;  ws_port = 30401&#xD;&#xA;  &#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1000&#xD;&#xA;chain = &quot;statemine-local&quot;&#xD;&#xA;add_to_genesis = true&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-A&quot;&#xD;&#xA;  command = &quot;./bin/polkadot-parachain&quot;&#xD;&#xA;  rpc_port = 40000&#xD;&#xA;  ws_port = 40001&#xD;&#xA;  args = [ &quot;-l=xcm=trace&quot; ]&#xD;&#xA;  &#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;add_to_genesis = true&#xD;&#xA;cumulus_based = true&#xD;&#xA;chain = &quot;statemint-local&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-B&quot;&#xD;&#xA;  command = &quot;./bin/polkadot-parachain&quot;&#xD;&#xA;  rpc_port = 50000&#xD;&#xA;  ws_port = 50001&#xD;&#xA;  args = [ &quot;-l=xcm=trace&quot; ]&#xD;&#xA;  &#xD;&#xA;[[hrmp_channels]]&#xD;&#xA;  sender = 1000&#xD;&#xA;  recipient = 2000&#xD;&#xA;  max_capacity = 8&#xD;&#xA;  max_message_size = 800&#xD;&#xA;  &#xD;&#xA;[[hrmp_channels]]&#xD;&#xA;  sender = 2000&#xD;&#xA;  recipient = 1000&#xD;&#xA;  max_capacity = 8&#xD;&#xA;  max_message_size = 800&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I created one asset with id 1 in both parachains:&#xD;&#xA;&#xD;&#xA;Parachain A:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Parachain B:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I already set asset in parachain A that i want to transfer as is_sufficient:&#xD;&#xA;&#xD;&#xA;[![enter image description here][6]][6]&#xD;&#xA;&#xD;&#xA;Then I minted some assets to transfer:&#xD;&#xA;[![enter image description here][7]][7]&#xD;&#xA;&#xD;&#xA;Finally, we try the extrinsic to send the asset:&#xD;&#xA;[![enter image description here][8]][8]&#xD;&#xA;[![enter image description here][9]][9]&#xD;&#xA;[![enter image description here][10]][10]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Error in parachain B:&#xD;&#xA;[![enter image description here][11]][11]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/PVolt.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/77M1Z.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/PQpId.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/PCNP5.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/zraUU.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/X0dih.png&#xD;&#xA;  [7]: https://i.stack.imgur.com/WATfR.png&#xD;&#xA;  [8]: https://i.stack.imgur.com/WmE0j.png&#xD;&#xA;  [9]: https://i.stack.imgur.com/Gtijj.png&#xD;&#xA;  [10]: https://i.stack.imgur.com/VX1WT.png&#xD;&#xA;  [11]: https://i.stack.imgur.com/BAJYz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25839" PostHistoryTypeId="1" PostId="6749" RevisionGUID="ba92dfc4-2502-42ef-9ddb-fe3a5d343a29" CreationDate="2023-01-16T13:25:13.677" UserId="3708" Text="limitedReserveTransferAssets WeightNotComputable error" ContentLicense="CC BY-SA 4.0" />
  <row Id="25840" PostHistoryTypeId="3" PostId="6749" RevisionGUID="ba92dfc4-2502-42ef-9ddb-fe3a5d343a29" CreationDate="2023-01-16T13:25:13.677" UserId="3708" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25841" PostHistoryTypeId="2" PostId="6750" RevisionGUID="6bccdccd-5bfe-45e7-ab17-9661f32f216e" CreationDate="2023-01-16T13:38:47.313" UserId="3327" Text="I wonder if there is some tutorial or help available for adding pre-defined pallets to a runtime (like Balance, Utility, Treasury). &#xD;&#xA;&#xD;&#xA;There is a very good resource on substrate site [here][1]. But it only tells you the how part, it does not cover the why part of the puzzle.  I really looking for a detailed explanation that explains each and every step in detail with the reasoning that why we are performing that specific task. Specially the types definition that we configure for a specific pallet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25843" PostHistoryTypeId="1" PostId="6750" RevisionGUID="6bccdccd-5bfe-45e7-ab17-9661f32f216e" CreationDate="2023-01-16T13:38:47.313" UserId="3327" Text="How to add and configure a pre defined pallet in runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25844" PostHistoryTypeId="3" PostId="6750" RevisionGUID="6bccdccd-5bfe-45e7-ab17-9661f32f216e" CreationDate="2023-01-16T13:38:47.313" UserId="3327" Text="|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25846" PostHistoryTypeId="2" PostId="6751" RevisionGUID="42740743-ecd1-4789-8c0f-e50af35bb6d9" CreationDate="2023-01-16T16:28:34.200" UserId="3667" Text="&gt; I really looking for a detailed explanation that explains each and every step in detail with the reasoning that why we are performing that specific task.&#xD;&#xA;&#xD;&#xA;This is generally not possible, given the number of pallets that substrate FRAME gives you, but there are a few things that can help you understand how it works. While it can be a bit intimidating to see the complexity, most pallet configurations boil down to implementing the `Config` trait from the pallet that you're trying to include in your Runtime. The whole point of pallets is to provide you with a modular way of integrating logic into your Runtime. &#xD;&#xA;&#xD;&#xA;Coming back to implementing `Config` for `Runtime`, the way you get a feel for it is by checking out the reference implementation in the substrate repo, which is a good source of knowledge. You can look at how they've implemented a type, and then make modifications to it to add your customization. Then you should look at the trait bounds for the various associated types that you're required to add. Mostly you will have a `Get&lt;T&gt;` bound for parameters that require a const, and you can generate a `Get&lt;_&gt;` impl for `T` by using the helpful `parameter_types!` macro. Another way, if you're just dealing with numbers is to use one of the `Const___` types like `ConstU128&lt;13&gt;` that defines a `Get` impl for the number `13`. &#xD;&#xA;&#xD;&#xA;Trait bounds tell you what's required for the pallet to work. Not just custom types, but pallets themselves can implement a trait, one such example is the balances pallet which implements Currency: &#xD;&#xA;&#xD;&#xA;`impl&lt;T: Config&lt;I&gt;, I: 'static&gt; Currency&lt;&lt;T as Config&gt;::AccountId&gt; for Pallet&lt;T, I&gt;`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25852" PostHistoryTypeId="2" PostId="6753" RevisionGUID="212cb5c5-7222-45c1-83fc-c9082bf53b4f" CreationDate="2023-01-16T16:46:12.520" UserId="1786" Text="Yes this is absolutely possible to inject types into polkadot-js api. When instantiating an `ApiPromise`, you may also pass in one of the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    types,&#xD;&#xA;    typesAlias&#xD;&#xA;    typesBundle,&#xD;&#xA;    typesChain,&#xD;&#xA;    typesSpec&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Here is a [quick example](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/main.ts#L46-L62) of the parameters being passed in.&#xD;&#xA;&#xD;&#xA;These Types are present [here](https://github.com/polkadot-js/api/blob/master/packages/types/src/types/registry.ts#L80-L106) for more information. It's good to search through each type the fields are set to, in order to understand which field best fits your situation.&#xD;&#xA;&#xD;&#xA;I created a tool a while back to help users understand and how to generate a typesBundle specifically using polkadot-js/apps-config for specific chains. This tool can be found here: https://github.com/paritytech/generate-type-bundle&#xD;&#xA;&#xD;&#xA;Additionally, if there has been a type updated in substrate or polkadot and it hasn't been properly mirrored in polkadot-js, the best approach is to file an [issue](https://github.com/polkadot-js/api/issues).&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25855" PostHistoryTypeId="5" PostId="6732" RevisionGUID="bbf7347c-fea1-4dc0-930c-50c1a0802183" CreationDate="2023-01-16T18:22:48.850" UserId="87" Comment="cleanup some text in the reply" Text="If this is just one transaction, you can restart the collators to get rid of the transaction. The transaction pool doesn't persist any transactions. But be aware that other nodes also may have the transaction in their pool and so nodes that restart may see it again. If your transaction is has a lifetime attached (not being immortal) it will also be removed from the pool at some point.&#xD;&#xA;&#xD;&#xA;&gt; This also looks a lot like an attack vector, which would concern us greatly as we also have a production chain.&#xD;&#xA;&#xD;&#xA;It is an attack vector. This issue shows that you are not having done proper benchmarking. Otherwise the block production should stop early while trying to apply the extrinsic as the weight is more than what fits in the block. " ContentLicense="CC BY-SA 4.0" />
  <row Id="25856" PostHistoryTypeId="24" PostId="6732" RevisionGUID="bbf7347c-fea1-4dc0-930c-50c1a0802183" CreationDate="2023-01-16T18:22:48.850" Comment="Proposed by 87 approved by 73 edit id of 369" ContentLicense="CC BY-SA 4.0" />
  <row Id="25858" PostHistoryTypeId="6" PostId="6749" RevisionGUID="fdab9da3-ce2b-4dc7-9596-96e9cddcf78a" CreationDate="2023-01-17T00:18:03.563" UserId="34" Comment="edited tags" Text="|xcm|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25859" PostHistoryTypeId="2" PostId="6754" RevisionGUID="e2d924c5-6acf-4a8f-98f2-4afa74c4a806" CreationDate="2023-01-17T00:54:38.297" UserId="194" Text="As far as i can see the issue must be related your local setup: You are configuring both parachains in zombienet (1000/2000) with the Statemine runtime and my guess is that [this Statemine configuration][1] might be conflicting.&#xD;&#xA;&#xD;&#xA;So before troubleshooting this error i would recommend you to set a different parachain that ideally recognize statemine as a reserve as well. You can try the educational [Trappist parachain][2] for this purpose. This [video][3] might help you as well.&#xD;&#xA;&#xD;&#xA;Also: Based on your screenshot i noted that you are actually sending 5000 Units and not 5000 xUSD (five thousand XUSD) as i think you are trying to send. &#xD;&#xA;&#xD;&#xA;Supposing your token is set with 10 decimals, for sending actual 5000 xUSD, the value in the Fungible field should be: 50000000000000.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/assets/statemine/src/xcm_config.rs#L172:L175&#xD;&#xA;  [2]: https://github.com/paritytech/trappist&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=UfxU3hUprKo&amp;t=499s" ContentLicense="CC BY-SA 4.0" />
  <row Id="25861" PostHistoryTypeId="5" PostId="6754" RevisionGUID="ff594551-c02f-4285-9ea3-c3af09ee1c61" CreationDate="2023-01-17T01:52:41.727" UserId="194" Comment="added 5 characters in body" Text="As far as i can see the issue must be related with your local setup: You are configuring both parachains in zombienet (1000/2000) with the Statemine runtime and my guess is that [this Statemine configuration][1] might be conflicting.&#xD;&#xA;&#xD;&#xA;So before troubleshooting this error i would recommend you to set a different parachain that ideally recognize statemine as a reserve as well. You can try the educational [Trappist parachain][2] for this purpose. This [video][3] might help you as well.&#xD;&#xA;&#xD;&#xA;Also: Based on your screenshot i noted that you are actually sending 5000 Units and not 5000 xUSD (five thousand XUSD) as i think you are trying to send. &#xD;&#xA;&#xD;&#xA;Supposing your token is set with 10 decimals, for sending actual 5000 xUSD, the value in the Fungible field should be: 50000000000000.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/assets/statemine/src/xcm_config.rs#L172:L175&#xD;&#xA;  [2]: https://github.com/paritytech/trappist&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=UfxU3hUprKo&amp;t=499s" ContentLicense="CC BY-SA 4.0" />
  <row Id="25862" PostHistoryTypeId="2" PostId="6755" RevisionGUID="6454297d-35ed-416b-b727-0c0acded203b" CreationDate="2023-01-17T09:43:09.650" UserId="3030" Text="Given normal conditions, how long would should each of the XCM protocols [HMP, DMP, UMP] take for a message to reach its destination.&#xD;&#xA;&#xD;&#xA;For example if i was a parachain and wanted to call a smart contract on phala.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25864" PostHistoryTypeId="1" PostId="6755" RevisionGUID="6454297d-35ed-416b-b727-0c0acded203b" CreationDate="2023-01-17T09:43:09.650" UserId="3030" Text="How long should it take for an xcm message to reach its destination" ContentLicense="CC BY-SA 4.0" />
  <row Id="25865" PostHistoryTypeId="3" PostId="6755" RevisionGUID="6454297d-35ed-416b-b727-0c0acded203b" CreationDate="2023-01-17T09:43:09.650" UserId="3030" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25870" PostHistoryTypeId="2" PostId="6757" RevisionGUID="a2825e74-56b7-496f-832d-e3e5712ee59d" CreationDate="2023-01-17T09:51:12.270" UserId="567" Text="Unfortunately there is no way to generate randomness using ink!   &#xD;&#xA;The only options I see:&#xD;&#xA;- Creating an VRF oracle contract that will generate randomness(DIA is working on it for [Astar](https://forum.astar.network/t/verifiable-randomness-for-astar-and-shiden/4137))&#xD;&#xA;- On runtime level add pallet [RandomnessCollectiveFlip](https://docs.rs/pallet-randomness-collective-flip/latest/pallet_randomness_collective_flip/) chain-extension to be accessible in ink! contracts&#xD;&#xA;- Last one and best one IMO: add a call in ink_env to get current block hash and previous block hash and create randomness from it. I don't see security issue with ink! exposing those env values.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25872" PostHistoryTypeId="2" PostId="6758" RevisionGUID="27cc469c-e810-4f4a-86ba-45fbda6da6e4" CreationDate="2023-01-17T10:27:24.583" UserId="522" Text="Consider the following scenario, where I have a `BoundedVec` which has bound parameter `MaxItems`. Now this `MaxItems` parameter would be configured in the runtime.&#xD;&#xA;&#xD;&#xA;    pub type StorageItem&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; =&#xD;&#xA;    		StorageValue&lt;_, BoundedVec&lt;Id, T::MaxItems&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;Let's say that `MaxItems` was set to `10`. And during the course of the operation of the chain the BoundedVec `StorageItem` is (fully) populated with `10` items.&#xD;&#xA;&#xD;&#xA;If in a runtime upgrade I reduce this `MaxItems` value in the runtime to `5` (5 &lt; 10). Will my `StorageItem` refuse to decode perhaps with a panic? Or will it just decode the first 5 that it finds...&#xD;&#xA;&#xD;&#xA;What would be the behavior here? And how about similar bounded structs such as BoundedBtreeMap and BoundedBtreeSet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25874" PostHistoryTypeId="1" PostId="6758" RevisionGUID="27cc469c-e810-4f4a-86ba-45fbda6da6e4" CreationDate="2023-01-17T10:27:24.583" UserId="522" Text="What happens when a bounded vec in storage is fully populated and then its bound is reduced?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25875" PostHistoryTypeId="3" PostId="6758" RevisionGUID="27cc469c-e810-4f4a-86ba-45fbda6da6e4" CreationDate="2023-01-17T10:27:24.583" UserId="522" Text="|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25876" PostHistoryTypeId="2" PostId="6759" RevisionGUID="d4cffa24-d51a-4599-87a1-69d6672e1296" CreationDate="2023-01-17T10:35:26.413" UserId="2762" Text="To call this `create` extrinsic from the EVM pallet you need the local currency to pay fees for the extrinsic and the EVM currency to deploy the contract. Make sure both have balance.&#xD;&#xA; &#xD;&#xA;You can query the ETH balance with this RPC call:&#xD;&#xA;&#xD;&#xA;    curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;eth_getBalance&quot;, &quot;params&quot;: [&quot;YOUR-ADDRESS&quot;]}' http://localhost:9933/&#xD;&#xA;&#xD;&#xA;When running the node locally, Astar has set up an account with funds, you can take the private key from [here][1] an send funds to your account. &#xD;&#xA;&#xD;&#xA;I also recommend to follow this tutorial from the Astar docs, [to deploy the Smart Contract using Remix][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AstarNetwork/Astar/blob/master/bin/collator/src/local/chain_spec.rs#L63&#xD;&#xA;  [2]: https://docs.astar.network/docs/EVM/first-contract/deploy-local" ContentLicense="CC BY-SA 4.0" />
  <row Id="25878" PostHistoryTypeId="2" PostId="6760" RevisionGUID="82aaabdc-a054-4cc7-8320-9f150157e52c" CreationDate="2023-01-17T11:34:11.090" UserId="94" Text="Good question!&#xD;&#xA;&#xD;&#xA;Just reducing the bound will indeed result in a decoding error. It will behave like any other decode error; not panic but either return `None` or `Default` depending on whether you are using `OptionQuery` or `ValueQuery`.  &#xD;&#xA;If you want to properly reduce the bound, you have to truncate the vector in a migration to ensure that it will fit into the new bound. `BoundedBtreeMap` and `BoundedBtreeSet` behave likewise.  &#xD;&#xA;There also is `WeakBoundedVec`, but that is of limited usefulness for cases where you are unsure about the bound, since it will decode anyway." ContentLicense="CC BY-SA 4.0" />
  <row Id="25880" PostHistoryTypeId="2" PostId="6761" RevisionGUID="9d3d254b-5b9c-4761-8633-56bc990904f3" CreationDate="2023-01-17T12:00:53.880" UserId="2281" Text="I have a chain running on `polkadot-v0.9.18` and I want to upgrade it to `polkadot-v0.9.20`, so I did a runtime upgrade using the latters `wasm code`and changed the client. After this the elections are not happening and also there is no new era. &#xD;&#xA;&#xD;&#xA;How can I fix it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25882" PostHistoryTypeId="1" PostId="6761" RevisionGUID="9d3d254b-5b9c-4761-8633-56bc990904f3" CreationDate="2023-01-17T12:00:53.880" UserId="2281" Text="After upgrading the chain version and elections not happening" ContentLicense="CC BY-SA 4.0" />
  <row Id="25883" PostHistoryTypeId="3" PostId="6761" RevisionGUID="9d3d254b-5b9c-4761-8633-56bc990904f3" CreationDate="2023-01-17T12:00:53.880" UserId="2281" Text="|polkadot|runtime-upgrade|versioning|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25885" PostHistoryTypeId="2" PostId="6762" RevisionGUID="51af5a0c-6291-4223-87ff-6bb52a25fabd" CreationDate="2023-01-17T12:43:43.910" UserId="3319" Text="in this [doc][1] it says the following:&#xD;&#xA;&#xD;&#xA;&gt; By default, the node will refuse to start if you try to expose an RPC&#xD;&#xA;&gt; interface and run a validator node at the same time. The --unsafe-*&#xD;&#xA;&gt; flags allow you to suppress this security measure. Exposing RPC&#xD;&#xA;&gt; interfaces can open up a huge surface of attacks and has to be&#xD;&#xA;&gt; carefully reviewed.&#xD;&#xA;&#xD;&#xA;however when i start a local chain using the following command:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/alice \&#xD;&#xA;    --chain local \&#xD;&#xA;    --alice \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9945 \&#xD;&#xA;    --rpc-port 9933 \&#xD;&#xA;    --node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator&#xD;&#xA;&#xD;&#xA;1- it started with no problems, its supposed to refuse to start since its both a validator and is exposing an RPC port but it didnt, why?&#xD;&#xA;&#xD;&#xA;2- how to modify the allowed origins?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/remote-procedure-calls/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25887" PostHistoryTypeId="1" PostId="6762" RevisionGUID="51af5a0c-6291-4223-87ff-6bb52a25fabd" CreationDate="2023-01-17T12:43:43.910" UserId="3319" Text="why node could be started even though i passed both --validator and --rpc-port?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25888" PostHistoryTypeId="3" PostId="6762" RevisionGUID="51af5a0c-6291-4223-87ff-6bb52a25fabd" CreationDate="2023-01-17T12:43:43.910" UserId="3319" Text="|substrate-node-template|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25889" PostHistoryTypeId="5" PostId="6762" RevisionGUID="9ef25dec-8fcf-4a1b-87e4-87366c04882c" CreationDate="2023-01-17T13:07:43.863" UserId="3319" Comment="added 411 characters in body" Text="in this [doc][1] it says the following:&#xD;&#xA;&#xD;&#xA;&gt; By default, the node will refuse to start if you try to expose an RPC&#xD;&#xA;&gt; interface and run a validator node at the same time. The --unsafe-*&#xD;&#xA;&gt; flags allow you to suppress this security measure. Exposing RPC&#xD;&#xA;&gt; interfaces can open up a huge surface of attacks and has to be&#xD;&#xA;&gt; carefully reviewed.&#xD;&#xA;&#xD;&#xA;however when i start a local chain using the following command:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/alice \&#xD;&#xA;    --chain local \&#xD;&#xA;    --alice \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9945 \&#xD;&#xA;    --rpc-port 9933 \&#xD;&#xA;    --node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator&#xD;&#xA;&#xD;&#xA;1- it started with no problems, its supposed to refuse to start since its both a validator and is exposing an RPC port but it didnt, why?&#xD;&#xA;&#xD;&#xA;2- how to modify the allowed origins?&#xD;&#xA;3- the [doc][1] also said the following:&#xD;&#xA;&#xD;&#xA;&gt; There are quite a few RPC methods that you can use to control the&#xD;&#xA;&gt; node's behavior, but you should avoid exposing. For example, you&#xD;&#xA;&gt; should not expose the following RPC methods:&#xD;&#xA;&gt; &#xD;&#xA;&gt; submit_extrinsic - allows submitting transactions to local pool.&#xD;&#xA;&#xD;&#xA;however im able to submit extrinsics, the extrinsic gets passed to the node and it gets added to the pool.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/remote-procedure-calls/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25890" PostHistoryTypeId="5" PostId="6762" RevisionGUID="0594b8c2-f067-4e8b-9dd4-dd007a7afa5e" CreationDate="2023-01-17T13:15:07.257" UserId="3319" Comment="added 2 characters in body" Text="in this [doc][1] it says the following:&#xD;&#xA;&#xD;&#xA;&gt; By default, the node will refuse to start if you try to expose an RPC&#xD;&#xA;&gt; interface and run a validator node at the same time. The --unsafe-*&#xD;&#xA;&gt; flags allow you to suppress this security measure. Exposing RPC&#xD;&#xA;&gt; interfaces can open up a huge surface of attacks and has to be&#xD;&#xA;&gt; carefully reviewed.&#xD;&#xA;&#xD;&#xA;however when i start a local chain using the following command:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/alice \&#xD;&#xA;    --chain local \&#xD;&#xA;    --alice \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9945 \&#xD;&#xA;    --rpc-port 9933 \&#xD;&#xA;    --node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator&#xD;&#xA;&#xD;&#xA;1- it started with no problems, its supposed to refuse to start since its both a validator and is exposing an RPC port but it didnt, why?&#xD;&#xA;&#xD;&#xA;2- how to modify the allowed origins?&#xD;&#xA;&#xD;&#xA;3- the [doc][1] also said the following:&#xD;&#xA;&#xD;&#xA;&gt; There are quite a few RPC methods that you can use to control the&#xD;&#xA;&gt; node's behavior, but you should avoid exposing. For example, you&#xD;&#xA;&gt; should not expose the following RPC methods:&#xD;&#xA;&gt; &#xD;&#xA;&gt; submit_extrinsic - allows submitting transactions to local pool.&#xD;&#xA;&#xD;&#xA;however im able to submit extrinsics, the extrinsic gets passed to the node and it gets added to the pool.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/remote-procedure-calls/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25899" PostHistoryTypeId="2" PostId="6765" RevisionGUID="d6613f6b-29f9-4843-bc0b-63298d2cd41d" CreationDate="2023-01-17T13:51:19.830" UserId="3317" Text="It is important to understand the need for different security measurements between a node in a network and a local node. As stated in the docs, nodes in a network carry a lot of security measurements with them because they are public.&#xD;&#xA;&#xD;&#xA;However, you are starting a local node now which is meant for test and development and do not require these securities. &#xD;&#xA;&#xD;&#xA;Some useful posts about [different nodes][1] and e.g. a [RPC node][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5896/what-node-types-run-in-the-relay-chain-vs-parachain/5900#5900&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/2246/what-is-an-rpc-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="25901" PostHistoryTypeId="2" PostId="6766" RevisionGUID="908c00c5-6ac3-452a-8803-3f3daee325da" CreationDate="2023-01-17T13:56:08.310" UserId="3317" Text="Just to add an example: &#xD;&#xA;&#xD;&#xA;let's add the pallet-assets to the substrate-node-template. &#xD;&#xA; - First, we add the dependency and the feature in the runtime/Cargo.toml file&#xD;&#xA; &#xD;&#xA;The dependency is required for obtaining the pallet-assets source code. As for the std/no_std feature, have a look at this [post][1].&#xD;&#xA;&#xD;&#xA; - Second, we specify the configuration for pallet-assets in our runtime/src/lib.rs&#xD;&#xA;&#xD;&#xA;In other words, we are implementing the functionality for assets in our chain but we have to configure the pallet's types. These types, known as associated types (for pallet-assets: [Balances, AssetId, etc][2]), implement certain traits [e.g.][3]:&#xD;&#xA;&#xD;&#xA;&gt; type Currency: ReservableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;The Currency type is declared which will be used in this pallet and it implements (or has to implement) the ReservableCurrencySelf::AccountId trait. So we need to specify what Currency is in our runtime and it has to implement the ReservableCurrencySelf::AccountId trait. If we look how pallet-assets is configured in [statemint][4]:&#xD;&#xA;&#xD;&#xA;&gt; type Currency = Balances;&#xD;&#xA;&#xD;&#xA;where Balances is coming from [pallet-balances][5]. Pallet-balances needs to implement the ReservableCurrency&lt;Self::AccountId&gt; trait which is the case as you can see [here][6].&#xD;&#xA;&#xD;&#xA;These first two steps are required for any pallet you want to add to your runtime. However, for some pallets there are some additional steps required e.g. for pallet_assets the [genesis configuration][7]. This allows to define the genesis configuration for the pallet ([ref][8]) which needs to be done in node/src/chain_spec.rs like [here][9].&#xD;&#xA;&#xD;&#xA;P.S. What is helping me a lot with understanding substrate code is literally following the code (I use rust-analyzer) and see where this function/variable/trait/type is coming from. &#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1274/why-do-we-need-cfg-attrnotfeature-std-no-std&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs#L221-L312&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/28937302694787cd1e6dbd846ff2ba4b1cf82025/frame/assets/src/lib.rs#L257&#xD;&#xA;  [4]: https://github.com/paritytech/cumulus/blob/aae4731d38160d4da47205ea5b275d0481ef70eb/parachains/runtimes/assets/statemint/src/lib.rs#L255&#xD;&#xA;  [5]: https://github.com/paritytech/cumulus/blob/aae4731d38160d4da47205ea5b275d0481ef70eb/parachains/runtimes/assets/statemint/src/lib.rs#L601&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/7ff6fa2bfa47f288216fdc6e1585f69756c5ec75/frame/balances/src/lib.rs#L1774&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/7ff6fa2bfa47f288216fdc6e1585f69756c5ec75/frame/assets/src/lib.rs#L359-L367&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/7ff6fa2bfa47f288216fdc6e1585f69756c5ec75/frame/support/procedural/src/lib.rs#L1157-L1175&#xD;&#xA;  [9]: https://github.com/paritytech/substrate-contracts-node/blob/87a3d76c88058667d8c028b886a5e404ef9a70ea/node/src/chain_spec.rs#L146" ContentLicense="CC BY-SA 4.0" />
  <row Id="25905" PostHistoryTypeId="5" PostId="6765" RevisionGUID="6bcfcff9-e923-4fa0-b581-77e87b497dba" CreationDate="2023-01-17T15:31:54.623" UserId="3317" Comment="deleted 175 characters in body" Text="The flags it is referring to are `--ws-external` and `--rpc-external`. If you try to run your node with these flags and `--validator` it will throw an error:&#xD;&#xA;&#xD;&#xA;&gt; Input(&quot;--rpc-external and --ws-external options shouldn't be used if the node is running as a validator. Use `--unsafe-rpc-external` or `--rpc-methods=unsafe` if you understand the risks. See the options description for more information.&quot;)&#xD;&#xA;&#xD;&#xA;see `./target/release/node-template --help` for more info" ContentLicense="CC BY-SA 4.0" />
  <row Id="25910" PostHistoryTypeId="2" PostId="6768" RevisionGUID="0f29fa70-eb99-4207-83c5-d5c415ff0fa1" CreationDate="2023-01-17T17:53:15.663" UserId="2722" Text="Difficulty understanding DEX logic . in first I have to share the [Repository][1] that I check the codes . &#xD;&#xA;&#xD;&#xA;I could not understand this function. why should I implement the `create_exchange` function? what are the   `asset_id` , `liquidity_token_id`,`currency_amount`,`token_amount` . I want to know what are these arguments and also how can o fill them in the UI.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;    pub fn create_exchange(&#xD;&#xA;            origin: OriginFor&lt;T&gt;,&#xD;&#xA;            asset_id: AssetIdOf&lt;T&gt;,&#xD;&#xA;            liquidity_token_id: AssetIdOf&lt;T&gt;,&#xD;&#xA;            currency_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;            token_amount: AssetBalanceOf&lt;T&gt;,&#xD;&#xA;        ) -&gt; DispatchResult {&#xD;&#xA;            // -------------------------- Validation part --------------------------&#xD;&#xA;            let caller = ensure_signed(origin)?;&#xD;&#xA;            ensure!(currency_amount &gt;= T::MinDeposit::get(), Error::&lt;T&gt;::CurrencyAmountTooLow);&#xD;&#xA;            ensure!(token_amount &gt; Zero::zero(), Error::&lt;T&gt;::TokenAmountIsZero);&#xD;&#xA;            if T::Assets::total_issuance(asset_id.clone()).is_zero() {&#xD;&#xA;                Err(Error::&lt;T&gt;::AssetNotFound)?&#xD;&#xA;            }&#xD;&#xA;            if &lt;Exchanges&lt;T&gt;&gt;::contains_key(asset_id.clone()) {&#xD;&#xA;                Err(Error::&lt;T&gt;::ExchangeAlreadyExists)?&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            // ----------------------- Create liquidity token ----------------------&#xD;&#xA;            T::AssetRegistry::create(&#xD;&#xA;                liquidity_token_id.clone(),&#xD;&#xA;                T::pallet_account(),&#xD;&#xA;                false,&#xD;&#xA;                &lt;AssetBalanceOf&lt;T&gt;&gt;::one(),&#xD;&#xA;            )&#xD;&#xA;            .map_err(|_| Error::&lt;T&gt;::TokenIdTaken)?;&#xD;&#xA;    &#xD;&#xA;            // -------------------------- Update storage ---------------------------&#xD;&#xA;            let exchange = Exchange {&#xD;&#xA;                asset_id: asset_id.clone(),&#xD;&#xA;                currency_reserve: &lt;BalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;                token_reserve: &lt;AssetBalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;                liquidity_token_id: liquidity_token_id.clone(),&#xD;&#xA;            };&#xD;&#xA;            let liquidity_minted = T::currency_to_asset(currency_amount);&#xD;&#xA;            Self::do_add_liquidity(&#xD;&#xA;                exchange,&#xD;&#xA;                currency_amount,&#xD;&#xA;                token_amount,&#xD;&#xA;                liquidity_minted,&#xD;&#xA;                caller,&#xD;&#xA;            )?;&#xD;&#xA;    &#xD;&#xA;            // ---------------------------- Emit event -----------------------------&#xD;&#xA;            Self::deposit_event(Event::ExchangeCreated(asset_id, liquidity_token_id));&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-dex&#xD;&#xA;  [2]: https://i.stack.imgur.com/w9EnC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25912" PostHistoryTypeId="1" PostId="6768" RevisionGUID="0f29fa70-eb99-4207-83c5-d5c415ff0fa1" CreationDate="2023-01-17T17:53:15.663" UserId="2722" Text="Difficulty understanding DEX logic" ContentLicense="CC BY-SA 4.0" />
  <row Id="25913" PostHistoryTypeId="3" PostId="6768" RevisionGUID="0f29fa70-eb99-4207-83c5-d5c415ff0fa1" CreationDate="2023-01-17T17:53:15.663" UserId="2722" Text="|polkadot|pallet|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25914" PostHistoryTypeId="2" PostId="6769" RevisionGUID="36b9dbf5-da69-46ab-878c-c454c192250e" CreationDate="2023-01-17T19:12:00.170" UserId="245" Text="I have a function that creates hash from `AccountId`'s.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(2)]&#xD;&#xA;#[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;pub fn connection_request(origin: OriginFor&lt;T&gt;, to: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;	let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;	let xor = Self::create_xor(&amp;who, &amp;to);&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	fn create_xor&lt;Input: Encode&gt;(a: &amp;Input, b: &amp;Input) -&gt; T::Hash {&#xD;&#xA;		let mut bytes_who = a.encode();&#xD;&#xA;		let bytes_to = b.encode();&#xD;&#xA;&#xD;&#xA;		bytes_who.iter_mut().zip(bytes_to.iter()).for_each(|(x1, x2)| *x1 ^= *x2);&#xD;&#xA;&#xD;&#xA;		T::Hash::decode(&amp;mut bytes_who.as_slice()).expect(&quot;all bytes are valid accounts, and the source of these bytes is the xor of two other accounts, thus this must also be a valid account/hash. qed&quot;,)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And in my tests, `create_xor` fails with `Error { cause: None, desc: &quot;Not enough data to fill buffer&quot; }`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn connection_request_should_work() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		System::set_block_number(1);&#xD;&#xA;		assert_ok!(MyPallet::connection_request(RuntimeOrigin::signed(1), 2));&#xD;&#xA;        ...&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the reason I get this error and how do I solve it? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25916" PostHistoryTypeId="1" PostId="6769" RevisionGUID="36b9dbf5-da69-46ab-878c-c454c192250e" CreationDate="2023-01-17T19:12:00.170" UserId="245" Text="How do I create Hash in tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25917" PostHistoryTypeId="3" PostId="6769" RevisionGUID="36b9dbf5-da69-46ab-878c-c454c192250e" CreationDate="2023-01-17T19:12:00.170" UserId="245" Text="|testing|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25918" PostHistoryTypeId="2" PostId="6770" RevisionGUID="ce66d266-0e01-4bbb-8ae8-cc2ad33fe61b" CreationDate="2023-01-17T20:57:08.270" UserId="3331" Text="As the title says, I'm trying to be able to select a keypair from my keyring prompt for a password then sign a transaction and submit to the tx pool.&#xD;&#xA;&#xD;&#xA;How should I use the ui-keyring and keyring to achieve that?&#xD;&#xA;Thanks :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="25920" PostHistoryTypeId="1" PostId="6770" RevisionGUID="ce66d266-0e01-4bbb-8ae8-cc2ad33fe61b" CreationDate="2023-01-17T20:57:08.270" UserId="3331" Text="How can I select a keypair from my keyring and prompt a password for signing transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25921" PostHistoryTypeId="3" PostId="6770" RevisionGUID="ce66d266-0e01-4bbb-8ae8-cc2ad33fe61b" CreationDate="2023-01-17T20:57:08.270" UserId="3331" Text="|polkadot-js|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25922" PostHistoryTypeId="2" PostId="6771" RevisionGUID="b9d6feef-41f4-4e9c-a72c-5c79a23963b3" CreationDate="2023-01-18T00:30:44.457" UserId="94" Text="Then length of an encoded `AccountId` seems to be shorter than a `Hash`.  &#xD;&#xA;The decoding therefore fails, since `&quot;Not enough data to fill buffer&quot;` for that hash.&#xD;&#xA;&#xD;&#xA;&gt;What is the reason I get this error and how do I solve it?&#xD;&#xA;&#xD;&#xA;I dont know what you are trying to do. Maybe use a builtin hash funtion like [`sp_core::keccak_256`](https://docs.rs/sp-core/latest/sp_core/fn.keccak_256.html)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25924" PostHistoryTypeId="5" PostId="6760" RevisionGUID="24107360-d9c2-444c-866a-78a52bc6c315" CreationDate="2023-01-18T00:38:41.660" UserId="94" Comment="added 1054 characters in body" Text="Good question!&#xD;&#xA;&#xD;&#xA;Just reducing the bound will indeed result in a decoding error. It will behave like any other decode error; not panic but either return `None` or `Default` depending on whether you are using `OptionQuery` or `ValueQuery`.  &#xD;&#xA;If you want to properly reduce the bound, you have to truncate the vector in a migration to ensure that it will fit into the new bound. `BoundedBtreeMap` and `BoundedBtreeSet` behave likewise.  &#xD;&#xA;There also is `WeakBoundedVec`, but that is of limited usefulness for cases where you are unsure about the bound, since it will decode anyway.&#xD;&#xA;&#xD;&#xA;The reason to have `BoundedVec` in the first place is to know how much data we have to read from storage in the worst case.  &#xD;&#xA;The worst-case of `BoundedVec&lt;T, L&gt;` would be about `T::max_encoded_len() * L::get()` (excluding its prefixed length).  This is important to calculate pre-dispatch PoV weights (chromatic weights, aka Weights V2).&#xD;&#xA;Now currently the logic for reading a `BoundedVec` does actually not enforce it, since it first decodes and then throws the vector away if it is too long. It would be better to only read the length first and check.  &#xD;&#xA;Anyway, in short; It can be used to restrict some theoretical worst cases since `Vec` *could* have up to `usize::MAX` elements.  &#xD;&#xA;So for now it probably does not make much difference if you use `Weak` or not, since `Weak` and `Bounded` both dont *really* enforce the worst case, but in the future `Bounded` hopefully will.  &#xD;&#xA;IMHO it is just better practice to use `Bounded`, but I see that it very dangerous in some cases and requires much attention not to brick a chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="25925" PostHistoryTypeId="50" PostId="6389" RevisionGUID="76aa7431-015b-4e69-ba02-1aaf59002286" CreationDate="2023-01-18T05:07:00.797" UserId="-1" />
  <row Id="25930" PostHistoryTypeId="2" PostId="6773" RevisionGUID="0f3994d6-327b-4c56-b94d-86cacbb10b44" CreationDate="2023-01-18T06:52:53.890" UserId="3281" Text="In my contract function, I am checking who is the transaction caller. Since I am not setting the caller in the test-cases, It might be the issue. &#xD;&#xA;I would to know how to set caller_id and how to pass funds in the call.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25932" PostHistoryTypeId="1" PostId="6773" RevisionGUID="0f3994d6-327b-4c56-b94d-86cacbb10b44" CreationDate="2023-01-18T06:52:53.890" UserId="3281" Text="How to set caller and pass fee value in ink test-cases?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25933" PostHistoryTypeId="3" PostId="6773" RevisionGUID="0f3994d6-327b-4c56-b94d-86cacbb10b44" CreationDate="2023-01-18T06:52:53.890" UserId="3281" Text="|ink|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25935" PostHistoryTypeId="5" PostId="6761" RevisionGUID="0acd51aa-7d1d-4fad-98d1-b75414c5af02" CreationDate="2023-01-18T07:06:17.207" UserId="2281" Comment="added 119 characters in body" Text="I have a chain running on `polkadot-v0.9.18` and I want to upgrade it to `polkadot-v0.9.20`, so I did a runtime upgrade using the latters `wasm code`and changed the client. After this the elections are not happening and also there is no new era. &#xD;&#xA;&#xD;&#xA;How can I fix it?&#xD;&#xA;&#xD;&#xA;Log that  I got on terminal [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/oIQSb.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25936" PostHistoryTypeId="2" PostId="6774" RevisionGUID="ee6464d5-7273-4f8e-b14f-55fa122be9f5" CreationDate="2023-01-18T09:12:20.980" UserId="3414" Text="I have submitted a proposal for setting the validator count to 3 which was earlier 5 through custom spec. My proposal got approved . The validator count decreased to 3. So now 2 nodes should be removed automatically but this was not the scenario. Instead the era time increased but the blocks are getting finalised. So if anyone knows why the era time increased kindly let me know. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/4JBAr.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/OjbRm.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/ayhUV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="25938" PostHistoryTypeId="1" PostId="6774" RevisionGUID="ee6464d5-7273-4f8e-b14f-55fa122be9f5" CreationDate="2023-01-18T09:12:20.980" UserId="3414" Text="No new era planned after changing validator count" ContentLicense="CC BY-SA 4.0" />
  <row Id="25939" PostHistoryTypeId="3" PostId="6774" RevisionGUID="ee6464d5-7273-4f8e-b14f-55fa122be9f5" CreationDate="2023-01-18T09:12:20.980" UserId="3414" Text="|polkadot|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25940" PostHistoryTypeId="2" PostId="6775" RevisionGUID="1dfc1ff3-238f-4712-97d1-c918562b366d" CreationDate="2023-01-18T09:22:03.850" UserId="251" Text="Check your `MinimumValidatorCount` configuration.&#xD;&#xA;&#xD;&#xA;Check if your new validator count is smaller than it.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/cfe926282a284f7bdbf7b336eb78e80f51858577/frame/staking/src/pallet/mod.rs#L281-L284&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/cfe926282a284f7bdbf7b336eb78e80f51858577/frame/staking/src/pallet/impls.rs#L493-L498" ContentLicense="CC BY-SA 4.0" />
  <row Id="25942" PostHistoryTypeId="6" PostId="6774" RevisionGUID="0f52d409-b361-40db-ba7c-7ee68bd066fb" CreationDate="2023-01-18T09:22:35.353" UserId="251" Comment="edited tags" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25943" PostHistoryTypeId="2" PostId="6776" RevisionGUID="719e8656-a25e-42e8-aaf7-7a5dd0f55162" CreationDate="2023-01-18T09:23:34.730" UserId="3690" Text="My aim is to teleport an asset on parachain1 to parachain2. But I saw in parachain code, that teleport is disable. How do I enable it? I am confused about Teleport in XCM. &#xD;&#xA;&#xD;&#xA;Basically, how do I make it work? &#xD;&#xA;&#xD;&#xA;what is the path of teleport; (para-&gt;relay-&gt;para) or (para&lt;-&gt;para)?&#xD;&#xA;&#xD;&#xA;Does HRMP Channel opened between parachains works for teleport or something else should &#xD;&#xA;be done? How does HRMP channel affect teleportation of asset?&#xD;&#xA;&#xD;&#xA;Does teleport works using Xtoken?&#xD;&#xA;&#xD;&#xA;Please guide me through teleportation of asset between two parachains using XCM.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25945" PostHistoryTypeId="1" PostId="6776" RevisionGUID="719e8656-a25e-42e8-aaf7-7a5dd0f55162" CreationDate="2023-01-18T09:23:34.730" UserId="3690" Text="I want to enable Teleport Asset functionality in XCM between two parachains. How should I do it? Also, how do I teleport asset from Para1 to Para2?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25946" PostHistoryTypeId="3" PostId="6776" RevisionGUID="719e8656-a25e-42e8-aaf7-7a5dd0f55162" CreationDate="2023-01-18T09:23:34.730" UserId="3690" Text="|polkadot|xcm|xcmp|orml-xtokens|teleport|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25947" PostHistoryTypeId="5" PostId="6775" RevisionGUID="7e76b64d-4e6f-45b1-a0e3-de8369a46d3c" CreationDate="2023-01-18T09:34:25.100" UserId="251" Comment="deleted 4 characters in body" Text="Check your `MinimumValidatorCount` storage.&#xD;&#xA;&#xD;&#xA;Check if your new validator count is smaller than that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Documentation &amp; knowledge:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/cfe926282a284f7bdbf7b336eb78e80f51858577/frame/staking/src/pallet/mod.rs#L281-L284&#xD;&#xA;- https://github.com/paritytech/substrate/blob/cfe926282a284f7bdbf7b336eb78e80f51858577/frame/staking/src/pallet/impls.rs#L493-L498&#xD;&#xA;- https://substrate.stackexchange.com/questions/1844/what-happens-if-validator-count-minimum-validator-count?rq=1" ContentLicense="CC BY-SA 4.0" />
  <row Id="25948" PostHistoryTypeId="2" PostId="6777" RevisionGUID="6cb7693d-bcb5-41e0-9093-f393031a6ef2" CreationDate="2023-01-18T09:50:19.120" UserId="2762" Text="This function creates a new exchange. This pallet is a implementation of the Uniswap V1 protocol, you can read more information about it [here][1].&#xD;&#xA;&#xD;&#xA;To create the exchange you need to deposit a initial liquidity: the `currency_amount` and the id of the asset `asset_id`. &#xD;&#xA;It creates a new liquidity token (or using an existing one) `liquidity_token_id`, with a `token_amount` as the Initial amount of tokens to deposit in the pool. And then it mint &amp; transfer to the caller account an amount of the liquidity token equal to `currency_amount`.&#xD;&#xA;&#xD;&#xA;The description of this fields from the pallet [description][2]:&#xD;&#xA;&#xD;&#xA;&gt; - origin – Origin for the call. Must be signed.&#xD;&#xA;&gt; - asset_id – ID of the asset traded on the created exchange. Asset with this ID must exist.&#xD;&#xA;&gt; - liquidity_token_id – ID of the liquidity token to be created. Asset with this ID must not exist.&#xD;&#xA;&gt; - currency_amount – Initial amount of the currency to deposit in the pool. Must be at least equal MinDeposit.&#xD;&#xA;&gt; - token_amount – Initial amount of tokens to deposit in the pool. Must be greater than 0.&#xD;&#xA;&#xD;&#xA;If you want to see an example of how to call the functions, check the test from the pallet: https://github.com/paritytech/substrate-dex/blob/master/src/tests.rs#L10.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.uniswap.org/contracts/v1/overview&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-dex#parameters" ContentLicense="CC BY-SA 4.0" />
  <row Id="25950" PostHistoryTypeId="2" PostId="6778" RevisionGUID="a587a0fa-d038-4ab5-83ec-76a78ddbee73" CreationDate="2023-01-18T09:57:28.447" UserId="2844" Text="In [ink_env::test][1] there are lots of test function which help you for your specification likes [get caller](https://docs.rs/ink_env/3.4.0/ink_env/test/fn.default_accounts.html), [set the caller](https://docs.rs/ink_env/3.4.0/ink_env/test/fn.set_caller.html) and  [pass the funds](https://docs.rs/ink_env/3.4.0/ink_env/test/fn.set_balance.html) and many more. Hope this helps your query.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ink_env/3.4.0/ink_env/test/index.html#functions" ContentLicense="CC BY-SA 4.0" />
  <row Id="25954" PostHistoryTypeId="2" PostId="6779" RevisionGUID="a4c58c8c-eef9-431e-b228-bc9b39bfa788" CreationDate="2023-01-18T10:59:23.917" UserId="354" Text="You need to chill all the validators and validate again, elections should start again, this happens due to the different implementation of `npos_elections` in different versions of substrate.&#xD;&#xA;&#xD;&#xA;Refer to this https://substrate.stackexchange.com/questions/3154/how-to-recover-to-normal-election-from-staking-stakingelectionfailed-with-fal " ContentLicense="CC BY-SA 4.0" />
  <row Id="25956" PostHistoryTypeId="2" PostId="6780" RevisionGUID="e9a9ac38-8665-4964-90dc-75be02112dd9" CreationDate="2023-01-18T11:04:52.723" UserId="3717" Text="I declared runtime api, implemented it in runtime, but i can't call my runtime api from polkadot.js. What i need to do to be able to call it?&#xD;&#xA;&#xD;&#xA;Declaration:&#xD;&#xA;```&#xD;&#xA;sp_api::decl_runtime_apis! {&#xD;&#xA;	pub trait Staking&lt;AccountId, Balance&gt;&#xD;&#xA;	where&#xD;&#xA;		AccountId: Codec,&#xD;&#xA;		Balance: Codec&#xD;&#xA;	{&#xD;&#xA;		fn get_unclaimed_staking_rewards(account: &amp;AccountId) -&gt; Balance;&#xD;&#xA;&#xD;&#xA;		fn get_staking_rates() -&gt; StakingRates;&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Implementation:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl runtime_api_staking::Staking&lt;Block, AccountId, Balance&gt; for Runtime {&#xD;&#xA;		fn get_unclaimed_staking_rewards(account: &amp;AccountId) -&gt; Balance {&#xD;&#xA;			ParachainStaking::get_unclaimed_staking_rewards(account)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn get_staking_rates() -&gt; runtime_api_staking::StakingRates {&#xD;&#xA;			ParachainStaking::get_staking_rates()&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="25958" PostHistoryTypeId="1" PostId="6780" RevisionGUID="e9a9ac38-8665-4964-90dc-75be02112dd9" CreationDate="2023-01-18T11:04:52.723" UserId="3717" Text="How to make runtime api available from polkadot js" ContentLicense="CC BY-SA 4.0" />
  <row Id="25959" PostHistoryTypeId="3" PostId="6780" RevisionGUID="e9a9ac38-8665-4964-90dc-75be02112dd9" CreationDate="2023-01-18T11:04:52.723" UserId="3717" Text="|polkadot-js|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25970" PostHistoryTypeId="2" PostId="6783" RevisionGUID="66c3db29-ff41-414e-8af0-53833986149d" CreationDate="2023-01-18T12:43:36.107" UserId="3281" Text="I am deploying my contract on the rococo network and my contract wasm build size is 137K&#xD;&#xA;&#xD;&#xA;    Original wasm size: 188.1K, Optimized: 137.0K&#xD;&#xA;    &#xD;&#xA;Can you help on how to reduce the code size or any other possible way to resolve this error" ContentLicense="CC BY-SA 4.0" />
  <row Id="25972" PostHistoryTypeId="1" PostId="6783" RevisionGUID="66c3db29-ff41-414e-8af0-53833986149d" CreationDate="2023-01-18T12:43:36.107" UserId="3281" Text="&quot;Contract Too Large&quot;, not able to deploy contract on rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="25973" PostHistoryTypeId="3" PostId="6783" RevisionGUID="66c3db29-ff41-414e-8af0-53833986149d" CreationDate="2023-01-18T12:43:36.107" UserId="3281" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25977" PostHistoryTypeId="2" PostId="6785" RevisionGUID="8736edf5-648d-4486-99de-0d1ee800c489" CreationDate="2023-01-18T12:56:33.980" UserId="567" Text="Build contract with release flag:&#xD;&#xA;&#xD;&#xA;    cargo contract build --release" ContentLicense="CC BY-SA 4.0" />
  <row Id="25979" PostHistoryTypeId="2" PostId="6786" RevisionGUID="f40ce587-cdbe-4487-b9f9-6ab14fd5505e" CreationDate="2023-01-18T13:14:21.443" UserId="3171" Text="I what to use `thread_local!` in substrate.&#xD;&#xA;I aware about Storage ;)&#xD;&#xA;&#xD;&#xA;I want to store temporary data for unit tests. without thread local it does not work property.&#xD;&#xA;&#xD;&#xA;    thread_local! {&#xD;&#xA;    	static COINS: RefCell&lt;Vec&lt;Data&gt;&gt; = RefCell::new(vec![]);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;But is there any alternative for `thread_local!` in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25981" PostHistoryTypeId="1" PostId="6786" RevisionGUID="f40ce587-cdbe-4487-b9f9-6ab14fd5505e" CreationDate="2023-01-18T13:14:21.443" UserId="3171" Text="Is there any alternative for thread_local! in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25982" PostHistoryTypeId="3" PostId="6786" RevisionGUID="f40ce587-cdbe-4487-b9f9-6ab14fd5505e" CreationDate="2023-01-18T13:14:21.443" UserId="3171" Text="|polkadot|pallet|substrate-node-template|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25987" PostHistoryTypeId="2" PostId="6788" RevisionGUID="44dad065-d220-4c82-b29e-265d3377ee60" CreationDate="2023-01-18T14:11:39.717" UserId="3577" Text="This number changes every day. What are the variables that affect that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25989" PostHistoryTypeId="1" PostId="6788" RevisionGUID="44dad065-d220-4c82-b29e-265d3377ee60" CreationDate="2023-01-18T14:11:39.717" UserId="3577" Text="what affect the change of the minimum stake of a Nominator?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25990" PostHistoryTypeId="3" PostId="6788" RevisionGUID="44dad065-d220-4c82-b29e-265d3377ee60" CreationDate="2023-01-18T14:11:39.717" UserId="3577" Text="|polkadot|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25991" PostHistoryTypeId="2" PostId="6789" RevisionGUID="c15d33a5-856a-429b-91ec-a0ea0389d01c" CreationDate="2023-01-18T14:16:18.433" UserId="3327" Text="Substrate has provided some pre-defined functional pallets. We need to configure these pallet in our custom runtime in order to use them.  &#xD;&#xA;&#xD;&#xA;Some of these pallets like [pallet_treasury][1], [pallet_collective][2] requires some changes to genesis config. If any one can please share some resource that explains the nitty-gritty of these configurations.&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/pallet_treasury/index.html&#xD;&#xA;  [2]: https://docs.rs/pallet-collective/latest/pallet_collective/" ContentLicense="CC BY-SA 4.0" />
  <row Id="25993" PostHistoryTypeId="1" PostId="6789" RevisionGUID="c15d33a5-856a-429b-91ec-a0ea0389d01c" CreationDate="2023-01-18T14:16:18.433" UserId="3327" Text="How to configure genesis_config for pre defined functional pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="25994" PostHistoryTypeId="3" PostId="6789" RevisionGUID="c15d33a5-856a-429b-91ec-a0ea0389d01c" CreationDate="2023-01-18T14:16:18.433" UserId="3327" Text="|genesis|pallet-treasury|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="25995" PostHistoryTypeId="2" PostId="6790" RevisionGUID="6c9152df-c5c6-44e1-a076-37990317ed7e" CreationDate="2023-01-18T15:03:41.623" UserId="3285" Text="The minimum nomination stake is not a fixed number. The minimum stake of a nominator for an election round is the smallest nomination stake that is backing at least one validator that will be part of the next election round. Thus, it will change depending on the nomination bounds at a specific election round.&#xD;&#xA;&#xD;&#xA;This PR ([Staking: store last min-active-bond on-chain #12889](https://github.com/paritytech/substrate/pull/12889)) that has been recently merged, stores the minimum active stake for each round in the runtime storage, which makes it easier for e.g. wallet UIs to provide an estimate of the minimum nomination stake to earn rewards at a given time. If you look at the PR code, it will be clear how the minimum active stake is calculated.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="25997" PostHistoryTypeId="2" PostId="6791" RevisionGUID="e7e70b88-9be4-417b-b13b-975a8158bfa1" CreationDate="2023-01-18T15:16:47.227" UserId="3317" Text="To what will the `Currency` associated type of `pallet-assets` be configured if I configure it to `pallet-balances` like done in [statemint][1]? &#xD;&#xA;&#xD;&#xA;- Will it be set to something within `pallet-balances`, what exactly?&#xD;&#xA;- Or to the entire pallet, how does this work?&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/aae4731d38160d4da47205ea5b275d0481ef70eb/parachains/runtimes/assets/statemint/src/lib.rs#L255" ContentLicense="CC BY-SA 4.0" />
  <row Id="25999" PostHistoryTypeId="1" PostId="6791" RevisionGUID="e7e70b88-9be4-417b-b13b-975a8158bfa1" CreationDate="2023-01-18T15:16:47.227" UserId="3317" Text="configuring an associated type of a pallet to a pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="26000" PostHistoryTypeId="3" PostId="6791" RevisionGUID="e7e70b88-9be4-417b-b13b-975a8158bfa1" CreationDate="2023-01-18T15:16:47.227" UserId="3317" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26001" PostHistoryTypeId="2" PostId="6792" RevisionGUID="96bc1b2b-14d1-438f-81af-058baef3a2aa" CreationDate="2023-01-18T16:04:18.967" UserId="3577" Text="I bounded enough funds in order to be nominated. But the minum amount of DOT changes frequently. Will I loose the status of a nominator if my bonded amount falls below the threshold?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26003" PostHistoryTypeId="1" PostId="6792" RevisionGUID="96bc1b2b-14d1-438f-81af-058baef3a2aa" CreationDate="2023-01-18T16:04:18.967" UserId="3577" Text="As a Nominator, if my stacking amount falls below the minimum DOT required will I cointinue getting rewards?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26004" PostHistoryTypeId="3" PostId="6792" RevisionGUID="96bc1b2b-14d1-438f-81af-058baef3a2aa" CreationDate="2023-01-18T16:04:18.967" UserId="3577" Text="|polkadot|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26005" PostHistoryTypeId="52" PostId="6774" RevisionGUID="12b5a7f8-f329-4876-9d9a-f23d2db4c040" CreationDate="2023-01-18T17:13:33.173" />
  <row Id="26006" PostHistoryTypeId="2" PostId="6793" RevisionGUID="745ca144-4abb-4bc1-998e-3567b3006ad9" CreationDate="2023-01-18T17:28:34.920" UserId="3285" Text="You will not lose your nomination &quot;status&quot; if your current bond falls below the current minimum active bond. However, you will not be able to earn rewards if your bonded funds are *always* below the minimum active bond. &#xD;&#xA;&#xD;&#xA;You can think of it as a large queue of nominators that are trying to get rewards. There are only a limited number of nominators that are able to earn rewards per era (election round), so the nominators with more bond will have priority and be selected over those who have less bond. The minimum active bond is just a figure to give you an idea of what's the minimum bond that is likely to place you in the set of nominators who may receive rewards. Keep in mind that the [minimum active stake may and will change often](https://substrate.stackexchange.com/a/6790/3285). &#xD;&#xA;&#xD;&#xA;It may be that, even if your bonded funds are below the current minimum active stake, you'll be selected for rewards in later eras. But if you want to be on the safe side, you should aim at keeping an eye on the minimum active bond and bond above it.&#xD;&#xA;&#xD;&#xA;[Nomination pools](https://wiki.polkadot.network/docs/learn-nomination-pools) are a good option if you consider the minimum stake &quot;too high&quot;. In pools, multiple nominators bond their stake together and each nominator may bond as low as 1 DOT and still be able to earn rewards (due to the fact that the pool members collectively nominate as one nominator)." ContentLicense="CC BY-SA 4.0" />
  <row Id="26008" PostHistoryTypeId="5" PostId="6793" RevisionGUID="25db7437-40d8-46cf-875a-c1c4aa29c873" CreationDate="2023-01-18T18:32:41.563" UserId="3285" Comment="added 4 characters in body" Text="You will not lose your nomination &quot;status&quot; if your current bond falls below the current minimum active bond. However, you will not be able to earn rewards if your bonded funds are *always* below the minimum active bond. &#xD;&#xA;&#xD;&#xA;You can think of it as a large queue of nominators that are trying to get rewards. However, there are only a limited number of nominators that *can*  earn rewards per era (election round), so the nominators with more bond will have priority and be selected over those who have less bond. The minimum active bond is just a figure to give you an idea of what's the minimum bond that is likely to place you in the set of nominators who may receive rewards. Keep in mind that the [minimum active stake may and will change often](https://substrate.stackexchange.com/a/6790/3285). &#xD;&#xA;&#xD;&#xA;It may be that, even if your bonded funds are below the current minimum active stake, you'll be selected for rewards in later eras. But if you want to be on the safe side, you should aim at keeping an eye on the minimum active bond and bond above it.&#xD;&#xA;&#xD;&#xA;[Nomination pools](https://wiki.polkadot.network/docs/learn-nomination-pools) are a good option if you consider the minimum stake &quot;too high&quot;. In pools, multiple nominators bond their stake together and each nominator may bond as low as 1 DOT and still be able to earn rewards (due to the fact that the pool members collectively nominate as one nominator)." ContentLicense="CC BY-SA 4.0" />
  <row Id="26009" PostHistoryTypeId="5" PostId="6745" RevisionGUID="a5bc2b0e-29da-4171-b0c4-901aa49dece4" CreationDate="2023-01-18T19:12:45.707" UserId="16" Comment="fixed the code listing" Text="We were using `self.env.random()` in our contract to [generate a random number](https://substrate.stackexchange.com/a/3156/380). The calling user's `AccountId` was used to give additional entropy to the random generation.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn get_random_number(&amp;self, min: u64, max: u64, user_account: AccountId) -&gt; u64 {&#xD;&#xA;    let random_seed = self.env().random(user_account.as_ref());&#xD;&#xA;    let mut seed_converted: [u8; 32] = Default::default();&#xD;&#xA;    seed_converted.copy_from_slice(random_seed.0.as_ref());&#xD;&#xA;    let mut rng = ChaChaRng::from_seed(seed_converted);&#xD;&#xA;    ((rng.next_u64() / u64::MAX) * (max - min) + min) as u64&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The random number was used to select an index in a `Vec&lt;AccountId&gt;` when the caller performed a read operation on the contract. This function allowed us to create basic load balancer functionality, in which the AccountIds in the vector are selected at random. Subsequent operations involving the selected `AccountId` are performed off-chain. There is no transaction involved.&#xD;&#xA;&#xD;&#xA;Now `self.env.random()` has been [removed from ink](https://github.com/paritytech/ink/blob/4655a8b4413cb50cbc38d1b7c173ad426ab06cde/CHANGELOG.md#random-function-removed), how should we generate a source of randomness in the contract? The block hash would probably provide a random enough source but it is not available. `block_timestamp` is too predictable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26010" PostHistoryTypeId="2" PostId="6794" RevisionGUID="658fe3fb-16ea-436f-8e30-3c47f5b00353" CreationDate="2023-01-18T19:36:35.323" UserId="16" Text="You write that you need the random numbers for load balancing. This suggests that unpredictability is not a requirement to those numbers. You merely want a random distribution. On the  other hand you state that you do not want to use `block_timestamp` because it is predictable. This is contradictory.&#xD;&#xA;&#xD;&#xA;If you don't need unpredictability then you should just use a non-crypto RNG that yields equally distributed numbers. This will be much faster than using a cryptographically secure RNG as you do in your code. You can use a hardcoded number as seed if you don't care that all contracts using this code use the same but equally distributed stream of numbers.&#xD;&#xA;&#xD;&#xA;If you need unpredictability (or low influence) then using ink!'s random functionality is unsafe (always has been). The collective coin-flip can be manipulated by collators which are not subject to Polkadot's economic security. You need to find an oracle or deploy on a chain which offers this functionality via chain extension.&#xD;&#xA;&#xD;&#xA;Some comments on the code you posted: You use a cryptographically secure RNG to derive a random number from a public seed. You don't gain anything from doing so. Its purpose is to to prevent an observer from learning about a **secret** seed from its output. Using a non-cryptographic RNG would be sufficient.&#xD;&#xA;&#xD;&#xA;Additionally, you only ever use the first number coming out of the RNG per initialisation. Why do you use an RNG in the first place then? Just use the seed directly." ContentLicense="CC BY-SA 4.0" />
  <row Id="26012" PostHistoryTypeId="2" PostId="6795" RevisionGUID="3ab1dbae-1650-4116-a5eb-eef77a15c6ff" CreationDate="2023-01-18T22:09:35.207" UserId="3214" Text="Is there a way to suppress this warning when using Polkadot.js?&#xD;&#xA;&#xD;&#xA;    API/INIT: RPC methods not decorated: chainHead_unstable_body, chainHead_unstable_call, chainHead_unstable_follow, chainHead_unstable_genesisHash, chainHead_unstable_header, chainHead_unstable_stopBody, chainHead_unstable_stopCall, chainHead_unstable_stopStorage, chainHead_unstable_storage, chainHead_unstable_unfollow, chainHead_unstable_unpin, mmr_root, mmr_verifyProof, mmr_verifyProofStateless, transaction_unstable_submitAndWatch, transaction_unstable_unwatch&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26014" PostHistoryTypeId="1" PostId="6795" RevisionGUID="3ab1dbae-1650-4116-a5eb-eef77a15c6ff" CreationDate="2023-01-18T22:09:35.207" UserId="3214" Text="Suppress Warning &quot;API/INIT: RPC methods not decorated&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26015" PostHistoryTypeId="3" PostId="6795" RevisionGUID="3ab1dbae-1650-4116-a5eb-eef77a15c6ff" CreationDate="2023-01-18T22:09:35.207" UserId="3214" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26016" PostHistoryTypeId="2" PostId="6796" RevisionGUID="6c42d740-565f-4aed-a59d-7e620fa46e9a" CreationDate="2023-01-18T23:06:50.843" UserId="3571" Text="If ```Alice``` sends some amount of native relaychain assets to ```Alice``` on a parachain and those assets got trapped in some reason, for example lack of amount to execute a message.&#xD;&#xA;For AssetTrap and ClaimAsset I use the default pallet-xcm pallet from parity:&#xD;&#xA;```&#xD;&#xA;type AssetTrap = PolkadotXcm;&#xD;&#xA;type AssetClaims = PolkadotXcm;&#xD;&#xA;```&#xD;&#xA;What exact XCM message should I execute and where(on the relaychain or on the parachain?)to get thise assets back?&#xD;&#xA;&#xD;&#xA;I tried to execute message ```ClaimAsset``` + ```BuyExecution``` + ```DepositAsset``` but I just catch an ```UnknownClaim``` Error&#xD;&#xA;The ClaimAsset Message looks like&#xD;&#xA;```&#xD;&#xA;assets: {Concrete: {parents: 1, interior: Here}, fun: Fungable{Fungible: 500_000}}&#xD;&#xA;ticket: {parents: 0, interior: {X1(GeneralIndex(1))}}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Due to pallet code(https://github.com/paritytech/polkadot/blob/37468cac42343dc56e31f83e59da6d8ce12a02a7/xcm/pallet-xcm/src/lib.rs#L1848) maybe I have something wrong with the Origin, but I run the execution from ```Alice``` which is a proper reciever account." ContentLicense="CC BY-SA 4.0" />
  <row Id="26018" PostHistoryTypeId="1" PostId="6796" RevisionGUID="6c42d740-565f-4aed-a59d-7e620fa46e9a" CreationDate="2023-01-18T23:06:50.843" UserId="3571" Text="How to use ClaimAssets after assets got trapped" ContentLicense="CC BY-SA 4.0" />
  <row Id="26019" PostHistoryTypeId="3" PostId="6796" RevisionGUID="6c42d740-565f-4aed-a59d-7e620fa46e9a" CreationDate="2023-01-18T23:06:50.843" UserId="3571" Text="|parachain|xcm|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26020" PostHistoryTypeId="2" PostId="6797" RevisionGUID="2d358820-15b7-451e-a924-222f960c4d7d" CreationDate="2023-01-19T00:00:54.783" UserId="88" Text="I'm considering using an identity service such as `pallet-identity` in my smart contract and would like to know if it's possible to verify an attestation that has been judged on `pallet-identity` such as: `email: example@example.com` via a signature or any other means accessible via a smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="26022" PostHistoryTypeId="1" PostId="6797" RevisionGUID="2d358820-15b7-451e-a924-222f960c4d7d" CreationDate="2023-01-19T00:00:54.783" UserId="88" Text="How to verify `pallet-identity` identities via signature" ContentLicense="CC BY-SA 4.0" />
  <row Id="26023" PostHistoryTypeId="3" PostId="6797" RevisionGUID="2d358820-15b7-451e-a924-222f960c4d7d" CreationDate="2023-01-19T00:00:54.783" UserId="88" Text="|smart-contract|identity|pallet-identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26024" PostHistoryTypeId="2" PostId="6798" RevisionGUID="03821c49-2998-48fb-ab24-930b2e97e699" CreationDate="2023-01-19T02:11:37.030" UserId="2984" Text="I found some guides, like this: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/ that help you to convert a solo chain to parachain. However, I would like to know if it is possible to leave a relay chain and migrate this parachain to a solo chain and keep its data and state.&#xD;&#xA;&#xD;&#xA;The reason behind that is that I don't want to depend on any relay chain for a long time. So, if one day in the future I decided to leave some relay chain I would like to be able to build and finish my own blocks until the moment that I decide to connect again to a new relay chain.&#xD;&#xA;&#xD;&#xA;So, do I have to create a new solo chain and migrate the data and state from my Parachain to the new solo chain, or is there a better way to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26026" PostHistoryTypeId="1" PostId="6798" RevisionGUID="03821c49-2998-48fb-ab24-930b2e97e699" CreationDate="2023-01-19T02:11:37.030" UserId="2984" Text="Is there any guide available at the moment that explains the process of migrating a parachain back to a solo chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26027" PostHistoryTypeId="3" PostId="6798" RevisionGUID="03821c49-2998-48fb-ab24-930b2e97e699" CreationDate="2023-01-19T02:11:37.030" UserId="2984" Text="|parachain|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26028" PostHistoryTypeId="2" PostId="6799" RevisionGUID="cdd50109-e472-42f2-8d5d-d31f61ea06b5" CreationDate="2023-01-19T03:24:45.163" UserId="3352" Text="Does the extension save mnemonic  in the browser?&#xD;&#xA;If yes, is it safe?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26030" PostHistoryTypeId="1" PostId="6799" RevisionGUID="cdd50109-e472-42f2-8d5d-d31f61ea06b5" CreationDate="2023-01-19T03:24:45.163" UserId="3352" Text="Security discussion with mnemonic in polkadot extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="26031" PostHistoryTypeId="3" PostId="6799" RevisionGUID="cdd50109-e472-42f2-8d5d-d31f61ea06b5" CreationDate="2023-01-19T03:24:45.163" UserId="3352" Text="|polkadot|account|substrate-front-end|wallet|browser-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26032" PostHistoryTypeId="2" PostId="6800" RevisionGUID="095f3590-c2b5-4c66-b886-ebaeaa3307ff" CreationDate="2023-01-19T03:48:26.233" UserId="2984" Text="I suppose the Polkadot extension does not save the mnemonic phrase in the browser by default, but it does provide the option to save it in the browser's local storage, encrypted with the user's password. whether it is safe or not depends on the user's security practices, and the option to save the mnemonic phrase in the browser's local storage can be useful in some cases, but it increases the risk of the mnemonic phrase being compromised if the browser is hacked or the device is lost or stolen." ContentLicense="CC BY-SA 4.0" />
  <row Id="26034" PostHistoryTypeId="2" PostId="6801" RevisionGUID="4431abc8-394c-45a4-a295-6e60ee59bb6e" CreationDate="2023-01-19T05:53:58.493" UserId="3214" Text="Kilt has migrated from being a Kusama parachain to a Polkadot parachain. They will likely have the most practical experience regarding this. You can reach out to them and inquire about it." ContentLicense="CC BY-SA 4.0" />
  <row Id="26037" PostHistoryTypeId="2" PostId="6802" RevisionGUID="b53d5c7f-e90c-4a93-90f9-9bec57cea932" CreationDate="2023-01-19T08:44:07.070" UserId="2762" Text="The Polkadot Extension doesn't store the Mnemonic words, see from the [Polkadot Support Page][1]: &#xD;&#xA;&#xD;&#xA;&gt; Both the Polkadot browser extension and Polkadot-JS UI only show your mnemonic seed once: during the initial creation of your account. &#xD;&#xA;&gt; If you miss taking note of it, or if you misplaced your seed, there is no way to view it again at a later stage. While you can always restore your account from your JSON file, you won't be able to see your mnemonic seed again. For this reason, it is very important to save it in a safe place (preferably offline) at the time of account creation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The only thing it stores is a JSON encrypted with a password.&#xD;&#xA;Decrypting it you only can get the KeyPair and with that be able to sign: shttps://polkadot.js.org/docs/keyring/start/basics/#keypair-types&#xD;&#xA;&#xD;&#xA;See the article [How to restore your account in the Polkadot extension][2] for more info.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000169731-how-can-i-view-my-mnemonic-seed-in-the-polkadot-browser-extension-&#xD;&#xA;  [2]: https://support.polkadot.network/support/solutions/articles/65000169952-how-to-restore-your-account-in-the-polkadot-extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="26039" PostHistoryTypeId="2" PostId="6803" RevisionGUID="37197214-c301-47df-84bb-b2eb16aff352" CreationDate="2023-01-19T08:47:03.307" UserId="73" Text="&gt; However, I would like to know if it is possible to leave a relay chain and migrate this parachain to a solo chain and keep its data and state.&#xD;&#xA;&#xD;&#xA;It is possible, you would need to do some consensus hard fork. No one has done this before and it would probably be some very chain specific implementation. &#xD;&#xA;&#xD;&#xA;&gt; So, do I have to create a new solo chain and migrate the data and state from my Parachain to the new solo chain, or is there a better way to do this?&#xD;&#xA;&#xD;&#xA;Yes, doing a hardfork as I said above. You will need to have all nodes ready to switch at signal to a new consensus. The signal could for example be some runtime upgrade." ContentLicense="CC BY-SA 4.0" />
  <row Id="26041" PostHistoryTypeId="2" PostId="6804" RevisionGUID="069f8963-8854-42f1-bd47-d43bf051c711" CreationDate="2023-01-19T08:51:35.337" UserId="73" Text="`pallet-identity` currently doesn't require an explicit signature of an identity. The signature is implicit because the registrar signs the entire `Call` that provides the judgment. &#xD;&#xA;However, from a smart contract on the same chain you should be able to check an identity by calling into the chain to ensure that the identity is confirmed." ContentLicense="CC BY-SA 4.0" />
  <row Id="26043" PostHistoryTypeId="2" PostId="6805" RevisionGUID="0830a59b-b819-472f-b338-55f1d289a824" CreationDate="2023-01-19T08:56:58.787" UserId="73" Text="First, `Balances` being the name that is set for `pallet-balances` in `construct_runtime!`. This is a type declaration that looks like:&#xD;&#xA;```&#xD;&#xA;type Balances = pallet_balances::Pallet&lt;Runtime&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; Or to the entire pallet, how does this work?&#xD;&#xA;&#xD;&#xA;So, this is right. `Currency` is a trait and [this trait is implemented for the `pallet_balances::Pallet`][1]. So, `pallet-assets` will use `pallet-balances` as currency implementation through the `Currency` trait.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/7ff6fa2bfa47f288216fdc6e1585f69756c5ec75/frame/balances/src/lib.rs#L1408" ContentLicense="CC BY-SA 4.0" />
  <row Id="26045" PostHistoryTypeId="2" PostId="6806" RevisionGUID="96cfe0ac-966f-4dda-a2fc-9bd590d6ea90" CreationDate="2023-01-19T09:05:58.193" UserId="73" Text="&gt; But is there any alternative for thread_local! in substrate?&#xD;&#xA;&#xD;&#xA;There is not really a replacement. However, you can use [`frame_support::parameter_types!`][1] to create some thread_local that directly implements `Get`:&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;    static Value: u32 = 10;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then use it like this:&#xD;&#xA;```&#xD;&#xA;Value::set(100);&#xD;&#xA;Value::get();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or you can also directly pass `Value` to some `Config` trait that expects a type that implements `Get&lt;u32&gt;`. Then you can use this in your test to change the value as you like.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/cba59778aa5207b11f7513e5cbb127ea47dd8924/frame/support/src/lib.rs#L213-L283" ContentLicense="CC BY-SA 4.0" />
  <row Id="26047" PostHistoryTypeId="2" PostId="6807" RevisionGUID="b5ec6a00-03d9-4391-bfa5-84c4bfd38ca5" CreationDate="2023-01-19T09:26:13.587" UserId="126" Text="We noticed on Jan 19 that kintsugi (our kusama para) did not finalize blocks for about 60 minutes. It seems the cause is likely rooted in disputes being raised. In turn, a lot of dispute events fired on kusama: https://kusama.subscan.io/event?module=parasdisputes&amp;event=all&amp;page=1&amp;address=&amp;startDate=&amp;endDate=&amp;startBlock=&amp;endBlock=&amp;timeType=date&amp;version=9360&#xD;&#xA;&#xD;&#xA;I'm not too familiar with disputes and was wondering if anyone might be able to help:&#xD;&#xA;&#xD;&#xA;- Were other paras affected as well, or were all of the disputes coming from kintsugi? The event does not include the para id, so I'm not sure how one would verify which paras (if any other than kintsugi) were affected&#xD;&#xA;- How would we figure out what caused the dispute in the first place? We did not run any runtime upgrade. We do have community-run collators, so they might run a patched/changed version of our collator nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="26049" PostHistoryTypeId="1" PostId="6807" RevisionGUID="b5ec6a00-03d9-4391-bfa5-84c4bfd38ca5" CreationDate="2023-01-19T09:26:13.587" UserId="126" Text="Debugging parasDisputes" ContentLicense="CC BY-SA 4.0" />
  <row Id="26050" PostHistoryTypeId="3" PostId="6807" RevisionGUID="b5ec6a00-03d9-4391-bfa5-84c4bfd38ca5" CreationDate="2023-01-19T09:26:13.587" UserId="126" Text="|parachain|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26051" PostHistoryTypeId="2" PostId="6808" RevisionGUID="03a5403d-5ea8-45b8-9c3b-c9882fbe2c5d" CreationDate="2023-01-19T09:54:24.127" UserId="1842" Text="Disputes get triggered, if some validator thinks that a parachain block is invalid. It does not really matter for the outcome which parachain's block was triggering the dispute, what happens is the following:&#xD;&#xA;&#xD;&#xA; 1. All validators check ... so there is more load on the network, which can slow down parachain consensus.&#xD;&#xA; 2. Finality is halted until disputes are resolved.&#xD;&#xA;&#xD;&#xA;All parachains should be affected rather similarly, no matter what parachain blocks got disputed. &#xD;&#xA;&#xD;&#xA;About the cause, we are contacting the disputing validators to figure it out. It very likely has nothing to do with the parachain itself ... because then the dispute would likely resolve against the candidate and the relay chain would revert, which to my knowledge did not happen. If the dispute resolves in favor of the candidate, then the candidate is fine, it is just that some validator has some problem, making it believe the candidate is invalid. E.g. disk corruption." ContentLicense="CC BY-SA 4.0" />
  <row Id="26053" PostHistoryTypeId="2" PostId="6809" RevisionGUID="4246e627-a340-4637-8f19-398f66fb26da" CreationDate="2023-01-19T15:47:30.363" UserId="1786" Text="Yes this is possible. When instatiating your `ApiPromise`, you may pass in `noInitWarn: true` as an option. &#xD;&#xA;&#xD;&#xA;Here is the actual field in the [`interface ApiOptions`](https://github.com/polkadot-js/api/blob/master/packages/api/src/types/index.ts#L52-L55) type." ContentLicense="CC BY-SA 4.0" />
  <row Id="26055" PostHistoryTypeId="2" PostId="6810" RevisionGUID="38175155-965f-4f4a-a8e1-191bbc8623d0" CreationDate="2023-01-19T16:02:03.013" UserId="3667" Text="Some pallet that I am configuring requires it's genesis configuration to have a `BoundedVec`. The problem I'm facing is getting to cast a `Vec` as a `BoundedVec`. How can I do this? I have taken care of supplying it's upper bound as `MaxMembers`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let v = endowed_accounts.clone().into_iter().take(3).collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;let members = Into::&lt;&lt;BoundedVec&lt;_, MaxMembers&gt;&gt;::into(v);&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;the trait `From&lt;Vec&lt;sp_runtime::AccountId32&gt;&gt;` is not implemented for `BoundedVec&lt;_, MaxMembers&gt;`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26057" PostHistoryTypeId="1" PostId="6810" RevisionGUID="38175155-965f-4f4a-a8e1-191bbc8623d0" CreationDate="2023-01-19T16:02:03.013" UserId="3667" Text="How to create a bounded vec from a normal vec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26058" PostHistoryTypeId="3" PostId="6810" RevisionGUID="38175155-965f-4f4a-a8e1-191bbc8623d0" CreationDate="2023-01-19T16:02:03.013" UserId="3667" Text="|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26059" PostHistoryTypeId="2" PostId="6811" RevisionGUID="8442e23f-59c8-480c-85f3-0cbf0dd5fa8d" CreationDate="2023-01-19T16:14:43.283" UserId="181" Text="BoundedVec implements TryFrom, so you can use that in cases where you want an error if the Vec can't be converted to the BoundedVec. IE `BoundedVec::try_from(endowed_accounts);`&#xD;&#xA;&#xD;&#xA;You can also use `BoundedVec::truncate_from()` if you don't care about any excess elements in your original vec being lost." ContentLicense="CC BY-SA 4.0" />
  <row Id="26061" PostHistoryTypeId="2" PostId="6812" RevisionGUID="fa4da089-e1b6-4bfe-a9df-d6bd19907102" CreationDate="2023-01-19T16:20:49.800" UserId="94" Text="You cannot just &quot;type cast&quot; a `Vec` into a `BoundedVec` because of the guarantees that a `BoundedVec` provides. Although there are some ways to create a `BoundedVec` from a `Vec`:&#xD;&#xA;&#xD;&#xA;**Try Into / Try From**&#xD;&#xA;&#xD;&#xA;This is the most careful solution since you can manually handle the case in which the bound will not fit. The `unwrap` here is only as a test. Remember to never panic in the runtime.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;#[should_panic]&#xD;&#xA;fn bound_try_into_vec() {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	// We start with an unbounded vector with 10 elements.&#xD;&#xA;	let unbounded: Vec&lt;u8&gt; = vec![1; 10];&#xD;&#xA;	// No we try create a bounded vec with only 5 elements from the bounded vec.&#xD;&#xA;	let bounded = BoundedVec::&lt;u8, ConstU32&lt;5&gt;&gt;::try_from(unbounded.clone();&#xD;&#xA;	assert!(bounded.is_err(), &quot;Does not fit&quot;);&#xD;&#xA;	&#xD;&#xA;	// This panics.&#xD;&#xA;	let _bounded: BoundedVec::&lt;u8, ConstU32&lt;5&gt;&gt; = unbounded.try_into().unwrap();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Defensive Truncate**&#xD;&#xA;&#xD;&#xA;If you are in runtime code and really sure that the bound should fit, but still don't want to panic if it does not, you can use *defensive*.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;#[should_panic]&#xD;&#xA;fn bound_defensive_vec() {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_support::traits::DefensiveTruncateFrom;&#xD;&#xA;&#xD;&#xA;	// We start with an unbounded vector with 10 elements.&#xD;&#xA;	let unbounded: Vec&lt;u8&gt; = vec![1; 10];&#xD;&#xA;	// No we try create a bounded vec with only 5 elements from the bounded vec.&#xD;&#xA;	// This panics in tests and prints an error message at runtime.&#xD;&#xA;	let bounded = BoundedVec::&lt;u8, ConstU32&lt;5&gt;&gt;::defensive_truncate_from(unbounded.clone());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Truncate**&#xD;&#xA;&#xD;&#xA;Or if you just want to blindly ignore any superfluous elements, you can truncate. This is infallible, but also dangerous since you don't know how many elements were cut off.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn bound_truncate_vec() {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	// We start with an unbounded vector with 10 elements.&#xD;&#xA;	let unbounded: Vec&lt;u8&gt; = vec![1; 10];&#xD;&#xA;	// No we create a bounded vec with the first 5 elements.&#xD;&#xA;	let bounded = BoundedVec::&lt;u8, ConstU32&lt;5&gt;&gt;::truncate_from(unbounded.clone());&#xD;&#xA;	assert_eq!(bounded.len(), 5);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26063" PostHistoryTypeId="5" PostId="6811" RevisionGUID="3c28172e-eb94-4b1c-9a4f-b5e1fc266e97" CreationDate="2023-01-19T16:24:35.897" UserId="181" Comment="added 21 characters in body" Text="BoundedVec implements TryFrom, so you can use that in cases where you want an error if the BoundedVec can't be created given the length of the input vec. IE `BoundedVec::try_from(endowed_accounts);`&#xD;&#xA;&#xD;&#xA;You can also use `BoundedVec::truncate_from()` if you don't care about any excess elements in your original vec being lost." ContentLicense="CC BY-SA 4.0" />
  <row Id="26064" PostHistoryTypeId="5" PostId="6812" RevisionGUID="107ba50f-c4fb-4fa4-b462-5a8eed8891c9" CreationDate="2023-01-19T16:28:44.223" UserId="94" Comment="added 1 character in body" Text="You cannot just &quot;type cast&quot; a `Vec` into a `BoundedVec` because of the guarantees that a `BoundedVec` provides. Although there are some ways to create a `BoundedVec` from a `Vec`:&#xD;&#xA;&#xD;&#xA;**Try Into / Try From**&#xD;&#xA;&#xD;&#xA;This is the most careful solution since you can manually handle the case in which the bound will not fit. The `unwrap` here is only as a test. Remember to never panic in the runtime.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;#[should_panic]&#xD;&#xA;fn bound_try_into_vec() {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	// We start with an unbounded vector with 10 elements.&#xD;&#xA;	let unbounded: Vec&lt;u8&gt; = vec![1; 10];&#xD;&#xA;	// No we try create a bounded vec with only 5 elements from the bounded vec.&#xD;&#xA;	let bounded = BoundedVec::&lt;u8, ConstU32&lt;5&gt;&gt;::try_from(unbounded.clone());&#xD;&#xA;	assert!(bounded.is_err(), &quot;Does not fit&quot;);&#xD;&#xA;	&#xD;&#xA;	// This panics.&#xD;&#xA;	let _bounded: BoundedVec::&lt;u8, ConstU32&lt;5&gt;&gt; = unbounded.try_into().unwrap();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Defensive Truncate**&#xD;&#xA;&#xD;&#xA;If you are in runtime code and really sure that the bound should fit, but still don't want to panic if it does not, you can use *defensive*.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;#[should_panic]&#xD;&#xA;fn bound_defensive_vec() {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_support::traits::DefensiveTruncateFrom;&#xD;&#xA;&#xD;&#xA;	// We start with an unbounded vector with 10 elements.&#xD;&#xA;	let unbounded: Vec&lt;u8&gt; = vec![1; 10];&#xD;&#xA;	// No we try create a bounded vec with only 5 elements from the bounded vec.&#xD;&#xA;	// This panics in tests and prints an error message at runtime.&#xD;&#xA;	let bounded = BoundedVec::&lt;u8, ConstU32&lt;5&gt;&gt;::defensive_truncate_from(unbounded.clone());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Truncate**&#xD;&#xA;&#xD;&#xA;Or if you just want to blindly ignore any superfluous elements, you can truncate. This is infallible, but also dangerous since you don't know how many elements were cut off.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn bound_truncate_vec() {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	// We start with an unbounded vector with 10 elements.&#xD;&#xA;	let unbounded: Vec&lt;u8&gt; = vec![1; 10];&#xD;&#xA;	// No we create a bounded vec with the first 5 elements.&#xD;&#xA;	let bounded = BoundedVec::&lt;u8, ConstU32&lt;5&gt;&gt;::truncate_from(unbounded.clone());&#xD;&#xA;	assert_eq!(bounded.len(), 5);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26065" PostHistoryTypeId="2" PostId="6813" RevisionGUID="b15aa045-1e86-493c-ae9d-3a53145cab20" CreationDate="2023-01-19T18:03:45.120" UserId="2984" Text="All examples that I found are using //Alice. However, these accounts are usually funded with test tokens and don't require a password to sign transactions. So, I would like to know how to sign and authorize a transaction using my dev wallet, that has a password, using PolkadotJs library.&#xD;&#xA;&#xD;&#xA;I've tried so far some functions like sign(...) and getPair(...). But neither of them need a password as a parameter.&#xD;&#xA;&#xD;&#xA;[![unlocking the account with password][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/H1SKh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26067" PostHistoryTypeId="1" PostId="6813" RevisionGUID="b15aa045-1e86-493c-ae9d-3a53145cab20" CreationDate="2023-01-19T18:03:45.120" UserId="2984" Text="Which PolkadotJs function receive as a parameter the user's wallet password to sign a transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26068" PostHistoryTypeId="3" PostId="6813" RevisionGUID="b15aa045-1e86-493c-ae9d-3a53145cab20" CreationDate="2023-01-19T18:03:45.120" UserId="2984" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26069" PostHistoryTypeId="2" PostId="6814" RevisionGUID="d5e5649d-7ec3-48f1-81a5-37214f4348aa" CreationDate="2023-01-19T19:10:31.527" UserId="466" Text="Can confirm, instead of clearing the cache I ran the node in incognito mode which gets rid of this error as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="26071" PostHistoryTypeId="2" PostId="6815" RevisionGUID="042809b3-6ff9-47f1-b8c9-bc697189a426" CreationDate="2023-01-19T19:26:50.947" UserId="3577" Text="Why do we need 2 account bond when we are nominating? What are the responsibilities/roles of both?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26073" PostHistoryTypeId="1" PostId="6815" RevisionGUID="042809b3-6ff9-47f1-b8c9-bc697189a426" CreationDate="2023-01-19T19:26:50.947" UserId="3577" Text="Why do you need a controller account for nomination?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26074" PostHistoryTypeId="3" PostId="6815" RevisionGUID="042809b3-6ff9-47f1-b8c9-bc697189a426" CreationDate="2023-01-19T19:26:50.947" UserId="3577" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26075" PostHistoryTypeId="2" PostId="6816" RevisionGUID="873ff263-3727-425e-9f5e-1894fd91a4fe" CreationDate="2023-01-19T19:27:34.403" UserId="466" Text="I was having the same issue deploying on a local `0.21.0` node. I got it to work by running node version `0.23.0` instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="26077" PostHistoryTypeId="2" PostId="6817" RevisionGUID="0ed663c5-018d-4b82-832d-83702ca32ad1" CreationDate="2023-01-19T21:08:34.350" UserId="3214" Text="The idea is to separate concerns. The stash can be a cold wallet that lives separately, the secrets locked away. Even if the controller, being a hot wallet in this example, gets compromised, an attacker could not steal the assets in the stash." ContentLicense="CC BY-SA 4.0" />
  <row Id="26079" PostHistoryTypeId="52" PostId="6810" RevisionGUID="a0f59c6e-41c9-4726-b7e5-e50804f0a592" CreationDate="2023-01-20T00:05:47.553" />
  <row Id="26080" PostHistoryTypeId="50" PostId="6431" RevisionGUID="32122f2d-7bcb-4e6f-aa0d-c1b5e384be4d" CreationDate="2023-01-20T08:01:50.173" UserId="-1" />
  <row Id="26081" PostHistoryTypeId="2" PostId="6818" RevisionGUID="d6526b58-6f24-4ffd-b966-37a84c6d43b2" CreationDate="2023-01-20T08:20:27.570" UserId="2762" Text="How did you create an account? You only need the password if you are getting the keys from the [JSON backup file][1].&#xD;&#xA;&#xD;&#xA;&gt; Your JSON backup file is named like this: your_account_address.json. Unlike your mnemonic phrase, your JSON backup file is password-protected. It has all the information to restore your account, but you cannot just read it because it is encrypted for safety. To restore your account with the JSON backup file, you need to have both the file and the password to decrypt &#xD;&#xA;&#xD;&#xA;And this is why Polkadot UI is asking it because is not storing the keys or the mnemonic.&#xD;&#xA;&#xD;&#xA;In PolkadotJS you can recover the keys from the JSON and sign a message/transaction like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import keyring from '@polkadot/ui-keyring';&#xD;&#xA;import { cryptoWaitReady } from '@polkadot/util-crypto';&#xD;&#xA;&#xD;&#xA;async function keys() {&#xD;&#xA;  // before sr25519 can be used, the WASM libraries needs to be loaded and initialized&#xD;&#xA;  await cryptoWaitReady();&#xD;&#xA;  // load all available addresses and accounts&#xD;&#xA;  keyring.loadAll({ ss58Format: 42, type: 'sr25519' });&#xD;&#xA;&#xD;&#xA;  const pairFromJSON = keyring.createFromJson(your_json);&#xD;&#xA;  //Check your address&#xD;&#xA;  console.log(pairFromJSON.address);&#xD;&#xA;  // decrypt it&#xD;&#xA;  const keys = keyring.addPair(pairFromJSON, 'myStr0ngP@ssworD');&#xD;&#xA;&#xD;&#xA;  //Do a normal signature (You can sign an extrinsic too)&#xD;&#xA;  const signature = keys.pair.sign(&quot;message&quot;);&#xD;&#xA;  console.log(signature);&#xD;&#xA; &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000181874-how-to-store-your-mnemonic-phrase-and-backup-file-safely" ContentLicense="CC BY-SA 4.0" />
  <row Id="26083" PostHistoryTypeId="2" PostId="6819" RevisionGUID="be788bf1-e601-48e0-aa9d-1406ebbe1b4a" CreationDate="2023-01-20T08:41:41.290" UserId="2722" Text="I am currently working on a substrate project that uses the PoA consensus algorithm. I would like to implement a POC for a new consensus algorithm. I have some experience with substrate but I'm new to consensus algorithm implementation.&#xD;&#xA;&#xD;&#xA;I have done the following steps:&#xD;&#xA;&#xD;&#xA;Understand the substrate's architecture and the current PoA consensus algorithm&#xD;&#xA;Identify the changes to be made for the new consensus algorithm&#xD;&#xA;I'm now facing the following issues:&#xD;&#xA;&#xD;&#xA; - I am not sure how to write the code for the new consensus algorithm&#xD;&#xA; - I am not sure how to test the code&#xD;&#xA; - I am not sure how to integrate the code into the substrate network..&#xD;&#xA;&#xD;&#xA;Can anyone provide me with some guidance on how to proceed with this task, or point me to resources or examples that may be helpful?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26085" PostHistoryTypeId="1" PostId="6819" RevisionGUID="be788bf1-e601-48e0-aa9d-1406ebbe1b4a" CreationDate="2023-01-20T08:41:41.290" UserId="2722" Text="How to implement a POC for a new consensus algorithm in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26086" PostHistoryTypeId="3" PostId="6819" RevisionGUID="be788bf1-e601-48e0-aa9d-1406ebbe1b4a" CreationDate="2023-01-20T08:41:41.290" UserId="2722" Text="|polkadot|substrate-node-template|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26088" PostHistoryTypeId="50" PostId="2430" RevisionGUID="65b5c40a-9641-4376-8ef1-73d644b54aac" CreationDate="2023-01-20T09:07:15.887" UserId="-1" />
  <row Id="26090" PostHistoryTypeId="2" PostId="6820" RevisionGUID="a1f2c288-5b14-4ca9-abdc-994e040c0089" CreationDate="2023-01-20T13:05:55.843" UserId="377" Text="How much collators a new parachain should have if we don't have much load on it.&#xD;&#xA;What should be the analysis criteria to decide how much we need for our product.&#xD;&#xA;Can you share some thoughts on it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26092" PostHistoryTypeId="1" PostId="6820" RevisionGUID="a1f2c288-5b14-4ca9-abdc-994e040c0089" CreationDate="2023-01-20T13:05:55.843" UserId="377" Text="How much collators a new parachain should have if we don't have much load on it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26093" PostHistoryTypeId="3" PostId="6820" RevisionGUID="a1f2c288-5b14-4ca9-abdc-994e040c0089" CreationDate="2023-01-20T13:05:55.843" UserId="377" Text="|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26094" PostHistoryTypeId="2" PostId="6821" RevisionGUID="185504ee-efd2-4a45-a431-d9947804ba48" CreationDate="2023-01-20T14:11:30.250" UserId="2102" Text="I'd say you need at least 2 (to ensure some degree of decentralization).&#xD;&#xA;&#xD;&#xA;Having more or fewer nodes will not provide you with better performance, since performance is limited by the size of the block and the number of actions that the same block can support. I'd say having more nodes is useful when you want to provide high availability of the service and low latency (if nodes are in different regions).&#xD;&#xA;&#xD;&#xA;Even if you have 100 nodes, the transactions will be replicated to the adjacent nodes consecutively, so in reality they are all analyzing the same amount of information to reach consensus.&#xD;&#xA;&#xD;&#xA;Additionally, I would also analyze the usage of `read-only` nodes, that is, nodes that sync all the information and can propagate transactions with the chain but do not participate in the block production/finalization process. &#xD;&#xA;&#xD;&#xA;They can be used as entry points for 3rd party apps that interact with the chain, thus leaving the collators to deal only with the production of blocks.&#xD;&#xA;&#xD;&#xA;I'll be happy to see more answers, I think you have asked a good question!" ContentLicense="CC BY-SA 4.0" />
  <row Id="26096" PostHistoryTypeId="2" PostId="6822" RevisionGUID="0b2952b9-1ed1-4039-bc82-0c10935a574c" CreationDate="2023-01-20T15:55:21.460" UserId="2192" Text="We are trying to use warp sync for our substrate chain but it doesn't seem to advance past the genesis block. &#xD;&#xA;&#xD;&#xA;Normal sync works fine. We purge the chain state and then run the node using:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;chainflip-node --chain $CHAINSPEC_JSON --base-path $BASE_PATH --node-key-file $NODE_KEY_FILE --validator --sync warp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Our node has minimal changes compared to the stock node in the substrate repo as of tag `monthly-2022-12` (except for the runtime of course). &#xD;&#xA;&#xD;&#xA;When we run warp it says it's downloading and importing, but the best and finalized blocks never advance past #0.  &#xD;&#xA;&#xD;&#xA;Some log output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-01-20 14:52:56 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;2023-01-20 14:52:56 creating instance on iface 46.101.217.18&#xD;&#xA;2023-01-20 14:52:56 creating instance on iface 10.19.0.6&#xD;&#xA;2023-01-20 14:52:56 creating instance on iface 10.114.0.3&#xD;&#xA;2023-01-20 14:52:56  Discovered new external address for our node: /ip4/46.101.217.18/tcp/30333/ws/p2p/12D3KooWSADnCvB4suununbHcHR2nzo4qFjr6CuynsPhDhrGbAAz&#xD;&#xA;2023-01-20 14:53:01 ⏩ Warping, Downloading state, 9.34 Mib (17 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 2.1MiB/s ⬆ 19.6kiB/s&#xD;&#xA;2023-01-20 14:53:06 ⏩ Warping, Downloading state, 14.53 Mib (29 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 1.0MiB/s ⬆ 76.8kiB/s&#xD;&#xA;2023-01-20 14:53:11 ⏩ Warping, Downloading state, 14.53 Mib (40 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 63.5kiB/s ⬆ 15.3kiB/s&#xD;&#xA;2023-01-20 14:53:16 ⏩ Warping, Downloading state, 18.64 Mib (44 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 834.9kiB/s ⬆ 6.7kiB/s&#xD;&#xA;2023-01-20 14:53:21 ⏩ Warping, Downloading state, 18.64 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 13.0kiB/s ⬆ 8.0kiB/s&#xD;&#xA;2023-01-20 14:53:26 ⏩ Warping, Downloading state, 23.35 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 390.8kiB/s ⬆ 2.6kiB/s&#xD;&#xA;2023-01-20 14:53:31 ⏩ Warping, Downloading state, 23.35 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 7.2kiB/s ⬆ 2.4kiB/s&#xD;&#xA;2023-01-20 14:53:36 ⏩ Warping, Downloading state, 23.35 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 12.2kiB/s ⬆ 6.8kiB/s&#xD;&#xA;2023-01-20 14:53:41 ⏩ Warping, Downloading state, 23.35 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 206.2kiB/s ⬆ 1.6kiB/s&#xD;&#xA;2023-01-20 14:53:46 ⏩ Warping, Downloading state, 23.35 Mib (49 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 13.0kiB/s ⬆ 2.0kiB/s&#xD;&#xA;2023-01-20 14:53:51 ⏩ Warping, Downloading state, 23.35 Mib (49 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 17.8kiB/s ⬆ 7.4kiB/s&#xD;&#xA;2023-01-20 14:53:56 ⏩ Warping, Downloading state, 28.26 Mib (43 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 629.5kiB/s ⬆ 9.9kiB/s&#xD;&#xA;2023-01-20 14:54:01 ⏩ Warping, Downloading state, 30.46 Mib (44 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 540.4kiB/s ⬆ 5.4kiB/s&#xD;&#xA;2023-01-20 14:54:06 ⏩ Warping, Importing state, 33.06 Mib (45 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 484.4kiB/s ⬆ 1.4kiB/s&#xD;&#xA;2023-01-20 14:54:11 ⏩ Warping, Importing state, 33.06 Mib (45 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 39.1kiB/s ⬆ 0.5kiB/s&#xD;&#xA;2023-01-20 14:54:16 ⏩ Warping, Importing state, 33.06 Mib (45 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 12.2kiB/s ⬆ 1.0kiB/s&#xD;&#xA;2023-01-20 14:54:21 ⏩ Warping, Importing state, 33.06 Mib (45 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 5.8kiB/s ⬆ 0.8kiB/s&#xD;&#xA;2023-01-20 14:54:26 ⏩ Warping, Importing state, 33.06 Mib (45 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 126.7kiB/s ⬆ 1.5kiB/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;25 minutes later, it's still on block #0:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-01-20 15:19:16 ⏩ Warping, Importing state, 33.06 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 181.5kiB/s ⬆ 0.7kiB/s&#xD;&#xA;2023-01-20 15:19:21 ⏩ Warping, Importing state, 33.06 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 158.7kiB/s ⬆ 2.0kiB/s&#xD;&#xA;2023-01-20 15:19:26 ⏩ Warping, Importing state, 33.06 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 44.2kiB/s ⬆ 1.3kiB/s&#xD;&#xA;2023-01-20 15:19:31 ⏩ Warping, Importing state, 33.06 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 244.2kiB/s ⬆ 1.0kiB/s&#xD;&#xA;2023-01-20 15:19:36 ⏩ Warping, Importing state, 33.06 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 57.0kiB/s ⬆ 1.2kiB/s&#xD;&#xA;2023-01-20 15:19:41 ⏩ Warping, Importing state, 33.06 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 30.6kiB/s ⬆ 1.2kiB/s&#xD;&#xA;2023-01-20 15:19:46 ⏩ Warping, Importing state, 33.06 Mib (50 peers), best: #0 (0x2d00…c9b3), finalized #0 (0x2d00…c9b3), ⬇ 19.3kiB/s ⬆ 1.0kiB/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We use Aura and Grandpa. &#xD;&#xA;&#xD;&#xA;I also ran with `RUST_LOG='sync=trace'`. I'll spare you the full logs... &#xD;&#xA;&#xD;&#xA;Occasionally I saw this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-01-20 14:41:58.695 DEBUG tokio-runtime-worker sync: Peer is on different chain (our genesis: 0x2d00…c9b3 theirs: 0x6f02…cab6)&#xD;&#xA;2023-01-20 14:41:58.695 DEBUG tokio-runtime-worker sync: 12D3KooWEcre1PPy9AHQEzQ7sUMMQ89wRYPZGcifq5ZvQqAfxZ6A disconnected&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Seems odd (and I'd be interested to know how this is possible), but the majority of peers connect without issue. &#xD;&#xA;&#xD;&#xA;Lots of this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-01-20 14:41:54.538 DEBUG tokio-runtime-worker sync: Pre-validating received block announcement 0xa23910c301900d417cdd8e7d0fc6056270223521e8050cff30628183f9ccafe9 with number 1032320 from 12D3KooWE7S7Ls49gwzxnVAzztMdVdcCqXRfLKN6mysykJWKpNqi&#xD;&#xA;2023-01-20 14:41:54.538 TRACE tokio-runtime-worker sync: Finished block announce validation: from PeerId(&quot;12D3KooWE7S7Ls49gwzxnVAzztMdVdcCqXRfLKN6mysykJWKpNqi&quot;): AnnouncementSummary { block_hash: 0xa23910c301900d417cdd8e7d0fc6056270223521e8050cff30628183f9ccafe9, number: 1032320, parent_hash: 0x91c242079e6d54a715f9d4706430e81d57eb6c067046ad02a5484bef1e341b92, state: Some(Best) }. local_best=true&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So we are able to download the block announcements (block number and hash are correct). &#xD;&#xA;&#xD;&#xA;Also some messages like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-01-20 14:41:50.379 DEBUG tokio-runtime-worker sync: Importing state data from 12D3KooWJEBw5VqdeC3ip7cm1Zo7ixC1PFtsQ6x5qmQ6aCpURzQ3 with 0 keys, 2007109 proof nodes.&#xD;&#xA;2023-01-20 14:41:50.379 DEBUG tokio-runtime-worker sync: Importing state from 2007109 trie nodes&#xD;&#xA;2023-01-20 14:41:50.521 DEBUG tokio-runtime-worker sync: Imported with 33552 keys&#xD;&#xA;2023-01-20 14:41:50.527 TRACE tokio-runtime-worker sync: New StateRequest for 12D3KooWJEBw5VqdeC3ip7cm1Zo7ixC1PFtsQ6x5qmQ6aCpURzQ3: StateRequest { block: [188, 20, 58, 132, 189, 8, 180, 145, 196, 168, 147, 12, 124, 117, 228, 249, 196, 34, 61, 196, 72, 82, 111, 70, 101, 208, 171, 103, 218, 51, 40, 166], start: [[182, 247, 33, 64, 30, 125, 40, 166, 3, 51, 77, 136, 21, 254, 161, 104, 78, 201, 123, 137, 48, 209, 197, 27, 110, 226, 101, 7, 251, 108, 174, 192, 7, 3, 127, 217, 87, 213, 36, 230, 19, 1, 0, 0]], no_proof: false }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However no ERROR or WARN messages. &#xD;&#xA;&#xD;&#xA;Any advice on how to debug this would be welcome. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26098" PostHistoryTypeId="1" PostId="6822" RevisionGUID="0b2952b9-1ed1-4039-bc82-0c10935a574c" CreationDate="2023-01-20T15:55:21.460" UserId="2192" Text="Have we broken warp sync?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26099" PostHistoryTypeId="3" PostId="6822" RevisionGUID="0b2952b9-1ed1-4039-bc82-0c10935a574c" CreationDate="2023-01-20T15:55:21.460" UserId="2192" Text="|consensus|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26100" PostHistoryTypeId="2" PostId="6823" RevisionGUID="d99dae6a-43f6-4729-9e30-eb09529f7aa8" CreationDate="2023-01-20T16:06:02.620" UserId="73" Text="Ensure that you never have done any forced set changes for your chain because the finalization was stuck. AURA also didn't worked with warp syncing [until two weeks ago][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/13058" ContentLicense="CC BY-SA 4.0" />
  <row Id="26102" PostHistoryTypeId="5" PostId="6818" RevisionGUID="c816a003-0adc-494f-aa59-ec2c58264398" CreationDate="2023-01-20T16:19:37.193" UserId="2762" Comment="added content" Text="How did you create an account? You only need the password if you are getting the keys from the [JSON backup file][1].&#xD;&#xA;&#xD;&#xA;&gt; Your JSON backup file is named like this: your_account_address.json. Unlike your mnemonic phrase, your JSON backup file is password-protected. It has all the information to restore your account, but you cannot just read it because it is encrypted for safety. To restore your account with the JSON backup file, you need to have both the file and the password to decrypt &#xD;&#xA;&#xD;&#xA;And this is why Polkadot UI is asking it because is not storing the keys or the mnemonic.&#xD;&#xA;&#xD;&#xA;In PolkadotJS you can recover the keys from the JSON file you have created with Polkadot UI and sign a message/transaction like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import keyring from '@polkadot/ui-keyring';&#xD;&#xA;import { cryptoWaitReady } from '@polkadot/util-crypto';&#xD;&#xA;&#xD;&#xA;async function keys() {&#xD;&#xA;  // before sr25519 can be used, the WASM libraries needs to be loaded and initialized&#xD;&#xA;  await cryptoWaitReady();&#xD;&#xA;  // load all available addresses and accounts&#xD;&#xA;  keyring.loadAll({ ss58Format: 42, type: 'sr25519' });&#xD;&#xA;&#xD;&#xA;  const pairFromJSON = keyring.createFromJson(your_json);&#xD;&#xA;  //Check your address&#xD;&#xA;  console.log(pairFromJSON.address);&#xD;&#xA;  // decrypt it&#xD;&#xA;  const keys = keyring.addPair(pairFromJSON, 'myStr0ngP@ssworD');&#xD;&#xA;&#xD;&#xA;  //Do a normal signature (You can sign an extrinsic too)&#xD;&#xA;  const signature = keys.pair.sign(&quot;message&quot;);&#xD;&#xA;  console.log(signature);&#xD;&#xA; &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you want to create the JSON file with PolkadotJS too, you can get your keys from a Mnemonic phrase:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA; // With that you get the json file and the pair to sign messages/extrinsics&#xD;&#xA; const { pair, json } = keyring.addUri(MNEMONIC_PHRASE, 'myStr0ngP@ssworD', { name: 'mnemonic acc' });&#xD;&#xA;&#xD;&#xA; // sign with the pair generated above&#xD;&#xA; const signature = pair.sign(&quot;message&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or you can also generate the keys itself using PolkadotJS:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { randomAsHex } from '@polkadot/util-crypto';&#xD;&#xA;&#xD;&#xA;// generate a random hex raw seed, this needs to be 32 bytes in length&#xD;&#xA;const seed = randomAsHex(32);&#xD;&#xA;&#xD;&#xA;// add the account, encrypting it, override to ed25519&#xD;&#xA;const { pair, json } = keyring.addUri(seed, 'myStr0ngP@ssworD', { name: 'hex seed acc' }, 'ed25519');&#xD;&#xA;&#xD;&#xA;// sign with the pair generated above&#xD;&#xA; const signature = pair.sign(&quot;message&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000181874-how-to-store-your-mnemonic-phrase-and-backup-file-safely" ContentLicense="CC BY-SA 4.0" />
  <row Id="26103" PostHistoryTypeId="2" PostId="6824" RevisionGUID="9b85f9d6-880b-4042-a9b4-e410a5e0090e" CreationDate="2023-01-20T16:35:57.233" UserId="2762" Text="I am going to try to give you some resources that can help you.&#xD;&#xA;&#xD;&#xA;First I recommend you start looking into the [Substrate node template][1]. It is a basic node template so will be helpful to see how is constructed, and for your question about *how to test the code*.&#xD;&#xA;&#xD;&#xA;To reach consensus it has Aura for block authoring and GRANDPA finalization by default, but you can change it and implement your own consensus mechanism.&#xD;&#xA;&#xD;&#xA;Then take a look into the tutorial [Building a resilient PoA blockchain with Substrate][2] which will give you a walkthrough of how to built a self-healing PoA (Proof of Authority) blockchain and solve the issue about *how to write the code for the new consensus algorithm*.&#xD;&#xA;&#xD;&#xA;And finally check the [code of that tutorial][3] as a guide to help you with *how to integrate the code into the substrate network*.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://www.gautamdhameja.com/resilient-poa-network-substrate/&#xD;&#xA;  [3]: https://github.com/gautamdhameja/substrate-poa" ContentLicense="CC BY-SA 4.0" />
  <row Id="26105" PostHistoryTypeId="2" PostId="6825" RevisionGUID="2dd50856-ab47-4871-a455-eaa11cacaca2" CreationDate="2023-01-20T16:52:57.943" UserId="377" Text="Moving forward i need to launch the parachain on polkadot.&#xD;&#xA;Do we have any checklist or Guide for mainnet launch on polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26107" PostHistoryTypeId="1" PostId="6825" RevisionGUID="2dd50856-ab47-4871-a455-eaa11cacaca2" CreationDate="2023-01-20T16:52:57.943" UserId="377" Text="Do we have any checklist or Guide for mainnet launch on polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26108" PostHistoryTypeId="3" PostId="6825" RevisionGUID="2dd50856-ab47-4871-a455-eaa11cacaca2" CreationDate="2023-01-20T16:52:57.943" UserId="377" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26109" PostHistoryTypeId="12" PostId="6824" RevisionGUID="de1a25f4-4349-4d2f-a258-7c2793a7499a" CreationDate="2023-01-20T17:07:25.967" UserId="2762" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2762,&quot;DisplayName&quot;:&quot;Alex Bean&quot;}]}" />
  <row Id="26110" PostHistoryTypeId="13" PostId="6824" RevisionGUID="e0fbe0f9-6f9f-4194-abc8-009d58fd0bdc" CreationDate="2023-01-20T17:41:46.213" UserId="2762" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2762,&quot;DisplayName&quot;:&quot;Alex Bean&quot;}]}" />
  <row Id="26111" PostHistoryTypeId="2" PostId="6826" RevisionGUID="5d04c6b3-3f52-4ee0-8cc8-ce719c0d08ce" CreationDate="2023-01-20T18:59:38.350" UserId="3214" Text="The `toHuman()` call on Types casts numbers into formatted strings and rounds currency values.&#xD;&#xA;&#xD;&#xA;I would like to store large amounts of block information in human-readable format, but not lose the precision of numbers or have them casted into strings.&#xD;&#xA;&#xD;&#xA;Is there a way to enjoy the benefits of human-readable objects without having numbers cast into strings and precision lost?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26113" PostHistoryTypeId="1" PostId="6826" RevisionGUID="5d04c6b3-3f52-4ee0-8cc8-ce719c0d08ce" CreationDate="2023-01-20T18:59:38.350" UserId="3214" Text="toHuman() but with regular numbers" ContentLicense="CC BY-SA 4.0" />
  <row Id="26114" PostHistoryTypeId="3" PostId="6826" RevisionGUID="5d04c6b3-3f52-4ee0-8cc8-ce719c0d08ce" CreationDate="2023-01-20T18:59:38.350" UserId="3214" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26115" PostHistoryTypeId="52" PostId="6820" RevisionGUID="9b4e97a4-d710-4918-8e40-91fa44da2184" CreationDate="2023-01-20T21:07:55.667" />
  <row Id="26116" PostHistoryTypeId="2" PostId="6827" RevisionGUID="f5a48347-22d8-4022-9a9b-fb41d3d7fd4a" CreationDate="2023-01-20T21:51:11.933" UserId="2135" Text="Since I have an issue with the voterlist in a solo chain, what would be the correct way to trigger `unsafe_regenerate` from the bagslist pallet instance in the staking pallet ?&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/src/pallet_bags_list/lib.rs.html#341" ContentLicense="CC BY-SA 4.0" />
  <row Id="26118" PostHistoryTypeId="1" PostId="6827" RevisionGUID="f5a48347-22d8-4022-9a9b-fb41d3d7fd4a" CreationDate="2023-01-20T21:51:11.933" UserId="2135" Text="How to regenerate the voterlist" ContentLicense="CC BY-SA 4.0" />
  <row Id="26119" PostHistoryTypeId="3" PostId="6827" RevisionGUID="f5a48347-22d8-4022-9a9b-fb41d3d7fd4a" CreationDate="2023-01-20T21:51:11.933" UserId="2135" Text="|staking|migration|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26120" PostHistoryTypeId="50" PostId="6444" RevisionGUID="900a3db6-208c-4028-a9e9-abd84e9adeeb" CreationDate="2023-01-20T22:02:20.260" UserId="-1" />
  <row Id="26122" PostHistoryTypeId="50" PostId="6088" RevisionGUID="a68ec5e0-5946-4f21-8f77-e16e7a4cd36b" CreationDate="2023-01-21T01:04:05.430" UserId="-1" />
  <row Id="26126" PostHistoryTypeId="2" PostId="6828" RevisionGUID="a0027db7-e419-44af-aeb6-c376c63fad9f" CreationDate="2023-01-21T03:28:07.957" UserId="3114" Text="- I implemented this sample(https://github.com/realtakahashi/polkadot_js_examples) about 3 months ago&#xD;&#xA;- This sample works on astar-collator v4.33.0, but does not work on v4.39.0&#xD;&#xA;- I got an error when &quot;new CodePromise&quot; was executed.&#xD;&#xA;&#xD;&#xA;- Has the way you use CodePromise changed with recent updates?&#xD;&#xA;- If anyone knows, please let me know.&#xD;&#xA;&#xD;&#xA;#Error Info&#xD;&#xA;```&#xD;&#xA;Unhandled Runtime Error&#xD;&#xA;Error: Your runtime does not expose the api.call.contractsApi.call runtime interfaces&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26128" PostHistoryTypeId="1" PostId="6828" RevisionGUID="a0027db7-e419-44af-aeb6-c376c63fad9f" CreationDate="2023-01-21T03:28:07.957" UserId="3114" Text="&quot;new CodePromise&quot; now throws an error" ContentLicense="CC BY-SA 4.0" />
  <row Id="26129" PostHistoryTypeId="3" PostId="6828" RevisionGUID="a0027db7-e419-44af-aeb6-c376c63fad9f" CreationDate="2023-01-21T03:28:07.957" UserId="3114" Text="|polkadot-js|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26130" PostHistoryTypeId="2" PostId="6829" RevisionGUID="328c2920-1317-41d5-ba78-9508f0114f7a" CreationDate="2023-01-21T06:37:06.080" UserId="3667" Text="In this PR: https://github.com/paritytech/substrate/pull/12586, the reasoning given is : &#xD;&#xA;&gt;Required for bridges and accepting other asset classes over XCM.&#xD;&#xA;&#xD;&#xA;Can someone explain in more detail what this means? Can one use `CreateOrigin` for purposes like only allowing members of a collective to create an asset class? How would one use the `Arg` from `EnsureOriginWithArg`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type CreateOrigin: EnsureOriginWithArg&lt;&#xD;&#xA; Self::RuntimeOrigin,&#xD;&#xA; Self::AssetId,&#xD;&#xA; Success = Self::AccountId,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26132" PostHistoryTypeId="1" PostId="6829" RevisionGUID="328c2920-1317-41d5-ba78-9508f0114f7a" CreationDate="2023-01-21T06:37:06.080" UserId="3667" Text="What is the purpose of CreateOrigin in assets pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26133" PostHistoryTypeId="3" PostId="6829" RevisionGUID="328c2920-1317-41d5-ba78-9508f0114f7a" CreationDate="2023-01-21T06:37:06.080" UserId="3667" Text="|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26134" PostHistoryTypeId="2" PostId="6830" RevisionGUID="38a8d6ff-f9c6-4b34-aa55-30a2bd120ac7" CreationDate="2023-01-21T08:34:13.617" UserId="2484" Text="I wonder if there is a structure in pallets, which other projects should follow.&#xD;&#xA;&#xD;&#xA;We have the following elements:&#xD;&#xA;&#xD;&#xA;1. &lt; Config trait &gt;&#xD;&#xA;2. &lt; Types &gt;&#xD;&#xA;3. &lt; Storage &gt;&#xD;&#xA;4. &lt; Genesis info&gt;&#xD;&#xA;5. &lt; Events &gt;&#xD;&#xA;6. &lt; Error &gt;&#xD;&#xA;7. &lt; Hooks&gt;&#xD;&#xA;8. &lt; Dispatchables &gt;&#xD;&#xA;9. &lt; Pallet public and private functions &gt;&#xD;&#xA;10. &lt; Trait Implementations &gt;&#xD;&#xA;&#xD;&#xA;Are there any elements missing? If yes, make a suggestion of your structure with the new elements inside!" ContentLicense="CC BY-SA 4.0" />
  <row Id="26136" PostHistoryTypeId="1" PostId="6830" RevisionGUID="38a8d6ff-f9c6-4b34-aa55-30a2bd120ac7" CreationDate="2023-01-21T08:34:13.617" UserId="2484" Text="What is the most standard pallet structure in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26137" PostHistoryTypeId="3" PostId="6830" RevisionGUID="38a8d6ff-f9c6-4b34-aa55-30a2bd120ac7" CreationDate="2023-01-21T08:34:13.617" UserId="2484" Text="|pallet|error|configuration|config|struct|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26139" PostHistoryTypeId="50" PostId="4417" RevisionGUID="55c2939e-84cc-4ab7-9f7a-4884e19d1d27" CreationDate="2023-01-21T16:05:30.627" UserId="-1" />
  <row Id="26140" PostHistoryTypeId="2" PostId="6831" RevisionGUID="a8be93fe-5907-43bb-a6c9-e01d828517d3" CreationDate="2023-01-21T18:39:37.923" UserId="3030" Text="Very early on in this specification it says that &quot;XCM is designed around four 'A's:&quot;&#xD;&#xA;&#xD;&#xA;One if which is &quot;Absolute: XCM messages are guaranteed to be delivered and interpreted accurately, in order and in a timely fashion.&quot;&#xD;&#xA;&#xD;&#xA;What i find most curious is how the delivery and order of these messages are guaranteed. Or wether these are actually assumptions as its only &quot;designed around&quot; the four A's instead of &quot;functions according to&quot;.&#xD;&#xA;Any lead on where to looks is appreciated.&#xD;&#xA;&#xD;&#xA;felix&#xD;&#xA;&#xD;&#xA;source: &lt;https://github.com/paritytech/xcm-format&gt; " ContentLicense="CC BY-SA 4.0" />
  <row Id="26142" PostHistoryTypeId="1" PostId="6831" RevisionGUID="a8be93fe-5907-43bb-a6c9-e01d828517d3" CreationDate="2023-01-21T18:39:37.923" UserId="3030" Text="How does the XCVM architecture ensure the absoluteness principle described" ContentLicense="CC BY-SA 4.0" />
  <row Id="26143" PostHistoryTypeId="3" PostId="6831" RevisionGUID="a8be93fe-5907-43bb-a6c9-e01d828517d3" CreationDate="2023-01-21T18:39:37.923" UserId="3030" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26144" PostHistoryTypeId="2" PostId="6832" RevisionGUID="56fc6ac0-2bce-4753-b479-0fa872eed80e" CreationDate="2023-01-21T18:41:40.553" UserId="3281" Text="I built one smart contract using ink!. I can make the contract's wasm and metadata files. Now, I need to create go bindings of my smart contract to find contract types and functions info in golang code. Do we have any command or script for that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26146" PostHistoryTypeId="1" PostId="6832" RevisionGUID="56fc6ac0-2bce-4753-b479-0fa872eed80e" CreationDate="2023-01-21T18:41:40.553" UserId="3281" Text="How can we generate the go wrappers for the ink smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26147" PostHistoryTypeId="3" PostId="6832" RevisionGUID="56fc6ac0-2bce-4753-b479-0fa872eed80e" CreationDate="2023-01-21T18:41:40.553" UserId="3281" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26148" PostHistoryTypeId="5" PostId="6831" RevisionGUID="8336455c-c2ba-4faf-96fd-7bf4902187b0" CreationDate="2023-01-21T18:50:24.947" UserId="3030" Comment="added 228 characters in body" Text="Very early on in this specification it says that &quot;XCM is designed around four 'A's:&quot;&#xD;&#xA;&#xD;&#xA;One if which is &quot;Absolute: XCM messages are guaranteed to be delivered and interpreted accurately, in order and in a timely fashion.&quot;&#xD;&#xA;&#xD;&#xA;What i find most curious is how the delivery and order of these messages are guaranteed. Or wether these are actually assumptions as its only &quot;designed around&quot; the four A's instead of &quot;functions according to&quot;.&#xD;&#xA;Any lead on where to looks is appreciated.&#xD;&#xA;&#xD;&#xA;felix&#xD;&#xA;&#xD;&#xA;source: &lt;https://github.com/paritytech/xcm-format&gt; &#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA;Here is a great resource: &lt;https://wiki.polkadot.network/docs/learn-xcm&gt;&#xD;&#xA;&#xD;&#xA;A channel must be opened and i assume it will be FIFO and there is a queue to ensure it.&#xD;&#xA;Alot of basic XCM questions can be answered here." ContentLicense="CC BY-SA 4.0" />
  <row Id="26149" PostHistoryTypeId="2" PostId="6833" RevisionGUID="48d4b9c4-e19f-41c5-910c-901edd89e635" CreationDate="2023-01-21T20:41:23.683" UserId="167" Text="aside from the outer &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet]&#xD;&#xA;mod pallet {}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the fact that everything needs to be inside of this, internals of a pallet are almost entirely normal Rust and the mentioned items can appear anywhere with any order.&#xD;&#xA;&#xD;&#xA;Here are some suggested best-practices: &#xD;&#xA;&#xD;&#xA;* Config trait should come first. &#xD;&#xA;* Place all storage items next to each other. &#xD;&#xA;* I would put the types at the top. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26151" PostHistoryTypeId="2" PostId="6834" RevisionGUID="ef4a8b2c-1a1c-4372-b548-12dda0406ac9" CreationDate="2023-01-21T20:59:37.577" UserId="167" Text="A good starting point is checking the release checklist is used in Polkadot e.g. https://github.com/paritytech/polkadot/issues/6540." ContentLicense="CC BY-SA 4.0" />
  <row Id="26153" PostHistoryTypeId="12" PostId="6834" RevisionGUID="df387f80-3100-468f-8d1a-5537ea118c1d" CreationDate="2023-01-21T21:00:09.343" UserId="167" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:167,&quot;DisplayName&quot;:&quot;kianenigma&quot;}]}" />
  <row Id="26154" PostHistoryTypeId="13" PostId="6834" RevisionGUID="00b87bb9-1935-4b8d-9b1e-dd0564acb305" CreationDate="2023-01-21T21:01:35.603" UserId="167" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:167,&quot;DisplayName&quot;:&quot;kianenigma&quot;}]}" />
  <row Id="26155" PostHistoryTypeId="2" PostId="6835" RevisionGUID="e302d165-a80b-4169-b1ce-7861602c0162" CreationDate="2023-01-22T03:17:15.063" UserId="83" Text="[This pull request](https://github.com/paritytech/substrate/pull/13203/files) proposes to modify the Substrate frame DEX pallet to allow users to use an exotic asset for transaction payments instead of the chain's native token and expose arbitrage opportunities:&#xD;&#xA;&#xD;&#xA;Prior to making a transaction where the transaction fees is made with assets other than the native token, they deliberately open a futures market perpetual long trading position on that exotic asset without using a stop-loss using a sacrificial amount of their capital (that they borrow against with high leverage from a lending market) so it gets liquidated when their loan goes below the maintenance margin rate level when liquidation bots of the DEX wipe out the risky position by using flash loans from lending markets (rather than by holding up-front capital) and where they are able to significantly push down the market rate of that exotic asset (and possibly also the the native token to a lesser degree if it was more liquid) since they chose to use an exotic asset that may be a scam with false public information about it, and/or where it has low liquidity (large bid-ask spread, less market depth).&#xD;&#xA;&#xD;&#xA;Once the market value of that exotic asset is lowered significant they could initiate a transaction where they choose for their transaction fees to be made with that exotic asset. &#xD;&#xA;&#xD;&#xA;Before the transaction is executed the payment of the transaction fees needs to be secured using the `withdraw_fee` extrinsic, where the `fee` already includes the user-included `tip`, and where the priority of the transaction is based on the amount of `tip` the user is willing to pay per unit of either `weight` or `length`, depending which one is more limiting (see the `get_priority` extrinsic of the transaction-payment frame). &#xD;&#xA;&#xD;&#xA;So if the transaction fee is to be paid using an exotic asset whose market price has been lowered significantly through their market manipulation strategy and they are also allowed to pay the `tip` in that exotic asset rather than the native token (assuming the native token has much higher liquidity and more difficult to manipulate) then they could perform flash transactions with a very high priority at a very low cost and use a small `weight` or `length`. For example, if they wanted to make a transaction with a large amount of tokens they might be able to lower the market value of the exotic asset that they choose to pay the associated transaction fee with just for the instant when the fee is calculated to reduce the transaction fee so that its amount (plus the sacrificial amount that may have been liquidated) becomes lower than the fee would have been with the native token. &#xD;&#xA;&#xD;&#xA;Additionally, recall that the purpose of transaction fees is to _&quot;prevent individual users from consuming too many resources and that Polkadot uses a weight-based fee model as opposed to a gas-metering model where fees are charged prior to transaction execution and once the fee is paid nodes will execute the transaction&quot;_, so in this instance where a user may be able to manipulate the transaction fee to be significantly lower than normal by using an exotic asset to pay the fees instead of the native token, they may therefore be able to afford to pay a large tip so the transaction would have a higher priority. If they did this to a batch of similar transactions could they spam and saturate the network with that type of transaction and consume all resources? &#xD;&#xA;&#xD;&#xA;This problem could be exacerbated if in future we extended the user of exotic assets instead of native tokens to staking instead of just transaction payments. For example if we allowed miners/validators/collator nodes to stake in exotic assets rather than just native assets since their `MinerTxPriority` is influenced by their stake and it may be easy to manipulate the exotic asset that a miners/validators/collator node chooses to stake with.&#xD;&#xA;&#xD;&#xA;If for example they were able to afford the native token fees but they chose to pay transaction fees in the exotic asset instead so they'd be able to reduce the transaction fee significantly to say 10% of the what they would otherwise have had to pay using the native token, then they could still afford to choose to overpay the transaction fee by a factor of say 10x the required transaction fee amount using the exotic asset whose market value they had manipulated to be lower), such that if that account still maintained the existential deposit balance after the transaction was executed and when the actual fee was calculated by the `correct_and_deposit_fee` extrinsic, the `correct_and_deposit_fee` extrinsic would refund all the overpaid fee amount in the native token that may not have been affected by their market manipulation (or in the exotic asset that by that stage may have finished being liquidated and easily returned back to its pre-liquidation market value), such that the user could actually profit from the refund of each fee that they overpaid.&#xD;&#xA;&#xD;&#xA;If the amount to be refunded remained in the exotic asset rather than the native token then it may overcome this possible arbitrage and/or money laundering opportunity and protect the treasury itself and miners/validators/collator nodes from liquidity risk (assuming the treasury or miners/validators/collator nodes hold the fees that are withdrawn using the `withdraw_fee` extrinsic).&#xD;&#xA;&#xD;&#xA;If the refund were to be in the native token then it may be sensible for the `withdraw_fee` extrinsic to use an oracle or similar to check and rate the legitimacy of the exotic asset and its creators and its recent and historic liquidity and only allow it to be used if its rating was above a pre-defined trust threshold. &#xD;&#xA;Note: The `get_priority` extrinsic uses a scaling factor. &#xD;&#xA;&#xD;&#xA;If they don't get a refund because their native token account balance fell below the existential deposit, then instead of penalising them by not refunding them at all, then we could instead forward their refund to the treasury and allow them to claim those tokens in future from that account if and when it has a sufficient existential deposit.&#xD;&#xA;&#xD;&#xA;However, if we did this, and we also allowed transaction fees in exotic assets instead of native tokens, and we only provided native tokens as a refund, then over time the treasury may end up borrowing against a large amount of illiquid exotic tokens that they were holding and waiting for users to claim against, and then if a large amount of users who all significantly overpaid were to claim a refund back in native tokens for their overpayment in the exotic tokens when the market value of those exotic tokens was easily manipulated to capitulate, then the treasury could be at risk.&#xD;&#xA;&#xD;&#xA;**Question:** If the user overpays their transaction fee but the account balance of the originating wallet falls below the existential deposit amount then should the refund be burnt, or ownership transferred to the treasury, or held by the treasury in the native token or in the exotic asset with ownership claimable by the originating wallet in future, and should any transaction fees and refunds that occur be made in the native token or in the exotic asset to reduce the risk of arbitrage, spam, or money laundering?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26157" PostHistoryTypeId="1" PostId="6835" RevisionGUID="e302d165-a80b-4169-b1ce-7861602c0162" CreationDate="2023-01-22T03:17:15.063" UserId="83" Text="How to reduce arbitrage and spam risk in the DEX pallet if exotic assets may be used for tx fees and overpayment of tx fees made using native tokens?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26158" PostHistoryTypeId="3" PostId="6835" RevisionGUID="e302d165-a80b-4169-b1ce-7861602c0162" CreationDate="2023-01-22T03:17:15.063" UserId="83" Text="|transactions|assets|pallet-dex|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26160" PostHistoryTypeId="2" PostId="6836" RevisionGUID="0c26b38d-bd69-406e-86d8-2613e6989471" CreationDate="2023-01-22T04:06:32.210" UserId="251" Text="The `EO` requires an implementation of `EnsureOrigin`.&#xD;&#xA;&#xD;&#xA;So, you can combine anyone of them.&#xD;&#xA;&#xD;&#xA;Check https://github.com/darwinia-network/darwinia-2.0/blob/8ba1ff7894588a540763c1c24fc74c3848b835fa/runtime/common/src/gov_origin.rs#L28-L43.&#xD;&#xA;&#xD;&#xA;Example: &#xD;&#xA;`AsEnsureOriginWithArg&lt;EnsureProportionAtLeast&lt;AccountId, Collective, 1, 2&gt;&gt;`&#xD;&#xA;&#xD;&#xA;This means if `1/2` of the collective members voted aye, the `try_origin` will succeed." ContentLicense="CC BY-SA 4.0" />
  <row Id="26162" PostHistoryTypeId="2" PostId="6837" RevisionGUID="3a679036-b85b-4db9-a8b2-882d0bc44580" CreationDate="2023-01-22T06:02:21.980" UserId="3114" Text="- Same issue was already exists.&#xD;&#xA;- Refer to....&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/6401/smart-contract-function-call-error" ContentLicense="CC BY-SA 4.0" />
  <row Id="26164" PostHistoryTypeId="4" PostId="6828" RevisionGUID="4c7f3fcc-52d0-47c2-9d6d-6f3260fbb1e2" CreationDate="2023-01-22T06:13:14.837" UserId="3114" Comment="edited title" Text="&quot;new CodePromise&quot; now throws an error [ Issue of Weight V2]" ContentLicense="CC BY-SA 4.0" />
  <row Id="26165" PostHistoryTypeId="2" PostId="6838" RevisionGUID="cbbdf0f0-0d16-45c7-97a2-68c4c9101e36" CreationDate="2023-01-22T10:40:15.190" UserId="2935" Text="A proper way to call this method is writing a storage migration similar to [this one][1]. &#xD;&#xA;&#xD;&#xA;Keep in mind, that using `enum` for storage versioning is not the best approach, so I would instead use integers, similar to [here][2]. [Here's][3] how StorageVersion is defined for a pallet.&#xD;&#xA;&#xD;&#xA;Alternatively, you can just implement the migration within your runtime, without `StorageVersion` checks, but then you need to make sure to remove it before your next runtime upgrade, otherwise it will be executed again.&#xD;&#xA;An example of this is available [here][6]. &#xD;&#xA;&#xD;&#xA;[Here's][4] an example of adding a migration to the runtime.&#xD;&#xA;&#xD;&#xA;If you want to check the assumptions about your migration - use [`try-runtime`][5] to test it against your current network state. That will reveal any potential errors and also give you an idea about consumed weight.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/staking/src/migrations.rs#L385&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/fast-unstake/src/migrations.rs&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/commit/b85f85e08dafa2935dc20d1b13af2ca36ba3ea64#diff-103bae13a15813f338cb0bb67e77f3687c2c811fe75b2defd1cdc3d2afd6aa17R107-R111&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/pull/6253/files#diff-e5e76e02c0d16e79c70b024cbe3c6ea56f3249382a0f987ba203c34fcb40ed66R1600&#xD;&#xA;  [5]: https://paritytech.github.io/substrate/master/try_runtime_cli/index.html&#xD;&#xA;  [6]: https://github.com/hicommonwealth/edgeware-node/blob/7b66f4f0a9ec184fdebcccd41533acc728ebe9dc/node/runtime/src/lib.rs#L845-L866" ContentLicense="CC BY-SA 4.0" />
  <row Id="26167" PostHistoryTypeId="2" PostId="6839" RevisionGUID="0b06cc4d-aacc-4a31-92a2-e95926c21783" CreationDate="2023-01-22T11:41:03.127" UserId="3613" Text="Solved it by updating polkadotJSApi to v9, dispatchError seems to work in all cases in that version" ContentLicense="CC BY-SA 4.0" />
  <row Id="26169" PostHistoryTypeId="50" PostId="3348" RevisionGUID="95c63c81-9a3d-4b0f-a288-ec578681f4d0" CreationDate="2023-01-22T14:06:30.907" UserId="-1" />
  <row Id="26170" PostHistoryTypeId="2" PostId="6840" RevisionGUID="002c6741-5300-4513-b156-a43888a76f7d" CreationDate="2023-01-22T15:48:33.900" UserId="380" Text="Try `toPrimitive` instead and you will get a JS number (when &lt; 2^53 -1) or a string value when it is larger.&#xD;&#xA;&#xD;&#xA;Here is an [example](https://github.com/polkadot-js/api/blob/2c949e0fc58ce5b113f3d07045468ae153743bdb/packages/types/src/extrinsic/Extrinsic.spec.ts#L46) of it being used to decode an extrinsic. You can see the numbers are not formatted as strings.&#xD;&#xA;&#xD;&#xA;If having numbers cast to strings is an issue then use `toHex`." ContentLicense="CC BY-SA 4.0" />
  <row Id="26172" PostHistoryTypeId="5" PostId="6835" RevisionGUID="e093092f-0650-46c4-b179-e529bed37d10" CreationDate="2023-01-22T21:21:43.293" UserId="83" Comment="update question to fix typos and remove unlikely money laundering scope" Text="[This pull request](https://github.com/paritytech/substrate/pull/13203/files) proposes to modify the Substrate frame DEX pallet to allow users to use an exotic asset for transaction payments instead of the chain's native token that may expose arbitrage and spam opportunities.&#xD;&#xA;&#xD;&#xA;Let's suppose that prior to a user making a transaction where they choose for the transaction fee to be made with an asset other than the chain's native token they deliberately open a futures market perpetual long trading position on that exotic asset without using a stop-loss and using a sacrificial amount of their capital that they borrow against with high leverage from a lending market so that it gets liquidated when the value of their loaned amount goes below the maintenance margin rate level due to liquidation bots of the DEX wiping out their risky position (using flash loans from lending markets rather than by holding up-front capital). &#xD;&#xA;&#xD;&#xA;This way they could significantly push down the market rate of that exotic asset (and possibly also the market rate of the native token to a lesser degree if it was more liquid) since they chose to use an exotic asset that has low liquidity (large bid-ask spread, less market depth).&#xD;&#xA;&#xD;&#xA;Once the market value of that exotic asset is lowered significant they could initiate a transaction where they choose for their transaction fees to be made with that exotic asset. &#xD;&#xA;&#xD;&#xA;Before the transaction is executed the payment of the transaction fees needs to be secured using the `withdraw_fee` extrinsic, where the `fee` already includes the user-included `tip`, and where the priority of the transaction is based on the amount of `tip` the user is willing to pay per unit of either `weight` or `length`, depending which one is more limiting (see the `get_priority` extrinsic of the transaction-payment frame). &#xD;&#xA;&#xD;&#xA;So if the transaction fee is to be paid using an exotic asset whose market price has been lowered significantly through their market manipulation strategy and they are also allowed to pay the `tip` in that exotic asset rather than the native token (assuming the native token has much higher liquidity and more difficult to manipulate) then they could perform flash transactions with a very high priority at a very low cost and use a small `weight` or `length`.&#xD;&#xA;&#xD;&#xA;For example, if they wanted to make a transaction with a large value of tokens then they might be able to lower the market value of the exotic asset that they choose to pay the associated transaction fee with just for the instant when the transaction fee is calculated to reduce the transaction fee so that its amount (plus the sacrificial amount that may have been liquidated to lower that exotic asset's market value) becomes lower than the what the transaction fee would have been in the native token. &#xD;&#xA;&#xD;&#xA;Additionally, recall that the purpose of transaction fees is to _&quot;prevent individual users from consuming too many resources and that Polkadot uses a weight-based fee model as opposed to a gas-metering model where fees are charged prior to transaction execution and once the fee is paid nodes will execute the transaction&quot;_. So in this instance where a user may be able to manipulate the transaction fee to be significantly lower than normal by using an exotic asset to pay the transaction fees instead of the native token, they may therefore be able to afford to pay a large tip so the transaction would have a higher priority. If they did this to a batch of similar transactions they could spam and saturate the network with that type of transaction and consume all resources. &#xD;&#xA;&#xD;&#xA;This problem could be exacerbated if a future pull request proposed to allow the use of exotic assets instead of native tokens for staking purposes too, instead of just for transaction payments. For example, if we allowed miners/validators/collator nodes to stake in exotic assets rather than just native assets, then since their `MinerTxPriority` is influenced by their stake, then it may be a concern if its easy for them to manipulate the market value of that illiquid exotic asset that they choose to stake with.&#xD;&#xA;&#xD;&#xA;If for example they were able to afford the native token fees but they chose to pay transaction fees in the exotic asset instead so they'd be able to reduce the transaction fee significantly to say 10% of the what they would otherwise have had to pay using the native token, then they could still afford to choose to **overpay** the transaction fee by a factor of say 10x the required transaction fee amount using the exotic asset whose market value they had manipulated to be lower, such that if that account still maintained the existential deposit balance after the transaction was executed and when the actual fee was calculated by the `correct_and_deposit_fee` extrinsic, the `correct_and_deposit_fee` extrinsic would **refund** all the overpaid fee amount in the native token that may not have been affected by their market manipulation (or in the exotic asset that by that stage may have finished being liquidated and easily returned back to its pre-liquidation market value with a capital injection), such that the user could actually profit from the refund of each fee that they overpaid.&#xD;&#xA;&#xD;&#xA;If the amount to be refunded remained in the exotic asset rather than the native token then it may overcome this possible arbitrage opportunity and protect the treasury itself and miners/validators/collator nodes from liquidity risk (assuming the treasury or miners/validators/collator nodes are those that hold the transaction fees that are withdrawn using the `withdraw_fee` extrinsic).&#xD;&#xA;&#xD;&#xA;If the refund were to be in the native token then it may be sensible for the `withdraw_fee` extrinsic to use an oracle or similar to check and rate the legitimacy of the exotic asset and its creators and its recent and historic liquidity and only allow it to be used if its rating was above a pre-defined trust threshold. &#xD;&#xA;Note: The `get_priority` extrinsic uses a scaling factor. &#xD;&#xA;&#xD;&#xA;If they don't get a refund because their native token account balance fell below the existential deposit, then instead of penalising them by not refunding them at all, then we could instead forward their refund to the treasury and allow them to claim those tokens in future from that account if and when it has a sufficient existential deposit.&#xD;&#xA;&#xD;&#xA;However, if we did this, and we also allowed transaction fees in exotic assets instead of native tokens, and we only provided native tokens as a refund, then over time the treasury may end up borrowing against a large amount of illiquid exotic tokens that they were holding and waiting for users to claim against, and then if a large amount of users who all significantly overpaid were to claim a refund back at the same time in native tokens for their overpayment in the exotic tokens when the market value of those exotic tokens was easily manipulated to capitulate, then the treasury could be at risk.&#xD;&#xA;&#xD;&#xA;**Question:** If the user overpays their transaction fee but the account balance of the originating wallet falls below the existential deposit amount then should the refund be burnt, or ownership transferred to the treasury, or held by the treasury in the native token or in the exotic asset with ownership claimable by the originating wallet in future, and should any transaction fees and refunds that occur be made in the native token or in the exotic asset to reduce the risk of arbitrage and spam?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26173" PostHistoryTypeId="5" PostId="6835" RevisionGUID="ec79c3c9-b534-42f7-8ecd-c940a722afdc" CreationDate="2023-01-22T21:35:28.907" UserId="83" Comment="update title" Text="[This pull request](https://github.com/paritytech/substrate/pull/13203/files) appears to expose arbitrage and spam opportunities, as it proposes to modify the Substrate frame DEX pallet to allow users to use an exotic asset for transaction fees instead of the chain's native token, and any transaction fee overpayments made in the exotic token may be refunded in the native token instead if the native token balance of the originating account falls below the existential deposit.&#xD;&#xA;&#xD;&#xA;Let's suppose that prior to a user making a transaction where they choose for the transaction fee to be made with an asset other than the chain's native token they deliberately open a futures market perpetual long trading position on that exotic asset without using a stop-loss and using a sacrificial amount of their capital that they borrow against with high leverage from a lending market so that it gets liquidated when the value of their loaned amount goes below the maintenance margin rate level due to liquidation bots of the DEX wiping out their risky position (using flash loans from lending markets rather than by holding up-front capital). &#xD;&#xA;&#xD;&#xA;This way they could significantly push down the market rate of that exotic asset (and possibly also the market rate of the native token to a lesser degree if it was more liquid) since they chose to use an exotic asset that has low liquidity (large bid-ask spread, less market depth).&#xD;&#xA;&#xD;&#xA;Once the market value of that exotic asset is lowered significant they could initiate a transaction where they choose for their transaction fees to be made with that exotic asset. &#xD;&#xA;&#xD;&#xA;Before the transaction is executed the payment of the transaction fees needs to be secured using the `withdraw_fee` extrinsic, where the `fee` already includes the user-included `tip`, and where the priority of the transaction is based on the amount of `tip` the user is willing to pay per unit of either `weight` or `length`, depending which one is more limiting (see the `get_priority` extrinsic of the transaction-payment frame). &#xD;&#xA;&#xD;&#xA;So if the transaction fee is to be paid using an exotic asset whose market price has been lowered significantly through their market manipulation strategy and they are also allowed to pay the `tip` in that exotic asset rather than the native token (assuming the native token has much higher liquidity and more difficult to manipulate) then they could perform flash transactions with a very high priority at a very low cost and use a small `weight` or `length`.&#xD;&#xA;&#xD;&#xA;For example, if they wanted to make a transaction with a large value of tokens then they might be able to lower the market value of the exotic asset that they choose to pay the associated transaction fee with just for the instant when the transaction fee is calculated to reduce the transaction fee so that its amount (plus the sacrificial amount that may have been liquidated to lower that exotic asset's market value) becomes lower than the what the transaction fee would have been in the native token. &#xD;&#xA;&#xD;&#xA;Additionally, recall that the purpose of transaction fees is to _&quot;prevent individual users from consuming too many resources and that Polkadot uses a weight-based fee model as opposed to a gas-metering model where fees are charged prior to transaction execution and once the fee is paid nodes will execute the transaction&quot;_. So in this instance where a user may be able to manipulate the transaction fee to be significantly lower than normal by using an exotic asset to pay the transaction fees instead of the native token, they may therefore be able to afford to pay a large tip so the transaction would have a higher priority. If they did this to a batch of similar transactions they could spam and saturate the network with that type of transaction and consume all resources. &#xD;&#xA;&#xD;&#xA;This problem could be exacerbated if a future pull request proposed to allow the use of exotic assets instead of native tokens for staking purposes too, instead of just for transaction payments. For example, if we allowed miners/validators/collator nodes to stake in exotic assets rather than just native assets, then since their `MinerTxPriority` is influenced by their stake, then it may be a concern if its easy for them to manipulate the market value of that illiquid exotic asset that they choose to stake with.&#xD;&#xA;&#xD;&#xA;If for example they were able to afford the native token fees but they chose to pay transaction fees in the exotic asset instead so they'd be able to reduce the transaction fee significantly to say 10% of the what they would otherwise have had to pay using the native token, then they could still afford to choose to **overpay** the transaction fee by a factor of say 10x the required transaction fee amount using the exotic asset whose market value they had manipulated to be lower, such that if that account still maintained the existential deposit balance after the transaction was executed and when the actual fee was calculated by the `correct_and_deposit_fee` extrinsic, the `correct_and_deposit_fee` extrinsic would **refund** all the overpaid fee amount in the native token that may not have been affected by their market manipulation (or in the exotic asset that by that stage may have finished being liquidated and easily returned back to its pre-liquidation market value with a capital injection), such that the user could actually profit from the refund of each fee that they overpaid.&#xD;&#xA;&#xD;&#xA;If the amount to be refunded remained in the exotic asset rather than the native token then it may overcome this possible arbitrage opportunity and protect the treasury itself and miners/validators/collator nodes from liquidity risk (assuming the treasury or miners/validators/collator nodes are those that hold the transaction fees that are withdrawn using the `withdraw_fee` extrinsic).&#xD;&#xA;&#xD;&#xA;If the refund were to be in the native token then it may be sensible for the `withdraw_fee` extrinsic to use an oracle or similar to check and rate the legitimacy of the exotic asset and its creators and its recent and historic liquidity and only allow it to be used if its rating was above a pre-defined trust threshold. &#xD;&#xA;Note: The `get_priority` extrinsic uses a scaling factor. &#xD;&#xA;&#xD;&#xA;If they don't get a refund because their native token account balance fell below the existential deposit, then instead of penalising them by not refunding them at all, then we could instead forward their refund to the treasury and allow them to claim those tokens in future from that account if and when it has a sufficient existential deposit.&#xD;&#xA;&#xD;&#xA;However, if we did this, and we also allowed transaction fees in exotic assets instead of native tokens, and we only provided native tokens as a refund, then over time the treasury may end up borrowing against a large amount of illiquid exotic tokens that they were holding and waiting for users to claim against, and then if a large amount of users who all significantly overpaid were to claim a refund back at the same time in native tokens for their overpayment in the exotic tokens when the market value of those exotic tokens was easily manipulated to capitulate, then the treasury could be at risk.&#xD;&#xA;&#xD;&#xA;**Question:** If the user overpays their transaction fee but the account balance of the originating wallet falls below the existential deposit amount then should the refund be burnt, or ownership transferred to the treasury, or held by the treasury in the native token or in the exotic asset with ownership claimable by the originating wallet in future, and should any transaction fees and refunds that occur be made in the native token or in the exotic asset to reduce the risk of arbitrage and spam?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26174" PostHistoryTypeId="4" PostId="6835" RevisionGUID="ec79c3c9-b534-42f7-8ecd-c940a722afdc" CreationDate="2023-01-22T21:35:28.907" UserId="83" Comment="update title" Text="How to reduce arbitrage/spam risk if tx fees are paid with exotic assets instead of native tokens and tx fee overpayment refunds are in native tokens?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26175" PostHistoryTypeId="5" PostId="6835" RevisionGUID="8af782c3-e27d-4a60-ac55-764e7b97b224" CreationDate="2023-01-22T21:44:31.317" UserId="83" Comment="remove arbitrage from being a risk since there's nothing wrong with arbitrage, only concern is spam" Text="[This pull request](https://github.com/paritytech/substrate/pull/13203/files) appears to expose arbitrage and spam opportunities, as it proposes to modify the Substrate frame DEX pallet to allow users to use an exotic asset for transaction fees instead of the chain's native token, and any transaction fee overpayments made in the exotic token may be refunded in the native token instead if the native token balance of the originating account falls below the existential deposit.&#xD;&#xA;&#xD;&#xA;Let's suppose that prior to a user making a transaction where they choose for the transaction fee to be made with an asset other than the chain's native token they deliberately open a futures market perpetual long trading position on that exotic asset without using a stop-loss and using a sacrificial amount of their capital that they borrow against with high leverage from a lending market so that it gets liquidated when the value of their loaned amount goes below the maintenance margin rate level due to liquidation bots of the DEX wiping out their risky position (using flash loans from lending markets rather than by holding up-front capital). &#xD;&#xA;&#xD;&#xA;This way they could significantly push down the market rate of that exotic asset (and possibly also the market rate of the native token to a lesser degree if it was more liquid) since they chose to use an exotic asset that has low liquidity (large bid-ask spread, less market depth).&#xD;&#xA;&#xD;&#xA;Once the market value of that exotic asset is lowered significant they could initiate a transaction where they choose for their transaction fees to be made with that exotic asset. &#xD;&#xA;&#xD;&#xA;Before the transaction is executed the payment of the transaction fees needs to be secured using the `withdraw_fee` extrinsic, where the `fee` already includes the user-included `tip`, and where the priority of the transaction is based on the amount of `tip` the user is willing to pay per unit of either `weight` or `length`, depending which one is more limiting (see the `get_priority` extrinsic of the transaction-payment frame). &#xD;&#xA;&#xD;&#xA;So if the transaction fee is to be paid using an exotic asset whose market price has been lowered significantly through their market manipulation strategy and they are also allowed to pay the `tip` in that exotic asset rather than the native token (assuming the native token has much higher liquidity and more difficult to manipulate) then they could perform flash transactions with a very high priority at a very low cost and use a small `weight` or `length`.&#xD;&#xA;&#xD;&#xA;For example, if they wanted to make a transaction with a large value of tokens then they might be able to lower the market value of the exotic asset that they choose to pay the associated transaction fee with just for the instant when the transaction fee is calculated to reduce the transaction fee so that its amount (plus the sacrificial amount that may have been liquidated to lower that exotic asset's market value) becomes lower than the what the transaction fee would have been in the native token. &#xD;&#xA;&#xD;&#xA;Additionally, recall that the purpose of transaction fees is to _&quot;prevent individual users from consuming too many resources and that Polkadot uses a weight-based fee model as opposed to a gas-metering model where fees are charged prior to transaction execution and once the fee is paid nodes will execute the transaction&quot;_. So in this instance where a user may be able to manipulate the transaction fee to be significantly lower than normal by using an exotic asset to pay the transaction fees instead of the native token, they may therefore be able to afford to pay a large tip so the transaction would have a higher priority. If they did this to a batch of similar transactions they could spam and saturate the network with that type of transaction and consume all resources. &#xD;&#xA;&#xD;&#xA;This problem could be exacerbated if a future pull request proposed to allow the use of exotic assets instead of native tokens for staking purposes too, instead of just for transaction payments. For example, if we allowed miners/validators/collator nodes to stake in exotic assets rather than just native assets, then since their `MinerTxPriority` is influenced by their stake, then it may be a concern if its easy for them to manipulate the market value of that illiquid exotic asset that they choose to stake with.&#xD;&#xA;&#xD;&#xA;If for example they were able to afford the native token fees but they chose to pay transaction fees in the exotic asset instead so they'd be able to reduce the transaction fee significantly to say 10% of the what they would otherwise have had to pay using the native token, then they could still afford to choose to **overpay** the transaction fee by a factor of say 10x the required transaction fee amount using the exotic asset whose market value they had manipulated to be lower, such that if that account still maintained the existential deposit balance after the transaction was executed and when the actual fee was calculated by the `correct_and_deposit_fee` extrinsic, the `correct_and_deposit_fee` extrinsic would **refund** all the overpaid fee amount in the native token that may not have been affected by their market manipulation (or in the exotic asset that by that stage may have finished being liquidated and easily returned back to its pre-liquidation market value with a capital injection), such that the user could actually profit from the refund of each fee that they overpaid.&#xD;&#xA;&#xD;&#xA;If the amount to be refunded remained in the exotic asset rather than the native token then it may overcome this possible arbitrage opportunity and protect the treasury itself and miners/validators/collator nodes from liquidity risk (assuming the treasury or miners/validators/collator nodes are those that hold the transaction fees that are withdrawn using the `withdraw_fee` extrinsic).&#xD;&#xA;&#xD;&#xA;If the refund were to be in the native token then it may be sensible for the `withdraw_fee` extrinsic to use an oracle or similar to check and rate the legitimacy of the exotic asset and its creators and its recent and historic liquidity and only allow it to be used if its rating was above a pre-defined trust threshold. &#xD;&#xA;Note: The `get_priority` extrinsic uses a scaling factor. &#xD;&#xA;&#xD;&#xA;If they don't get a refund because their native token account balance fell below the existential deposit, then instead of penalising them by not refunding them at all, then we could instead forward their refund to the treasury and allow them to claim those tokens in future from that account if and when it has a sufficient existential deposit.&#xD;&#xA;&#xD;&#xA;However, if we did this, and we also allowed transaction fees in exotic assets instead of native tokens, and we only provided native tokens as a refund, then over time the treasury may end up borrowing against a large amount of illiquid exotic tokens that they were holding and waiting for users to claim against, and then if a large amount of users who all significantly overpaid were to claim a refund back at the same time in native tokens for their overpayment in the exotic tokens when the market value of those exotic tokens was easily manipulated to capitulate, then the treasury could be at risk.&#xD;&#xA;&#xD;&#xA;**Question:** If the user overpays their transaction fee but the account balance of the originating wallet falls below the existential deposit amount then should the refund be burnt, or ownership transferred to the treasury, or held by the treasury in the native token or in the exotic asset with ownership claimable by the originating wallet in future, and should any transaction fees and refunds that occur be made in the native token or in the exotic asset to reduce the risk of spam?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26176" PostHistoryTypeId="4" PostId="6835" RevisionGUID="8af782c3-e27d-4a60-ac55-764e7b97b224" CreationDate="2023-01-22T21:44:31.317" UserId="83" Comment="remove arbitrage from being a risk since there's nothing wrong with arbitrage, only concern is spam" Text="How to reduce spam risk if tx fees are paid with exotic assets instead of native tokens and tx fee overpayment refunds are in native tokens?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26177" PostHistoryTypeId="6" PostId="6835" RevisionGUID="8af782c3-e27d-4a60-ac55-764e7b97b224" CreationDate="2023-01-22T21:44:31.317" UserId="83" Comment="remove arbitrage from being a risk since there's nothing wrong with arbitrage, only concern is spam" Text="|transactions|assets|pallet-dex|spam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26178" PostHistoryTypeId="10" PostId="6828" RevisionGUID="2e1c75ed-7dda-42ee-b9ae-93a7543d4141" CreationDate="2023-01-22T23:31:44.487" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[6401],&quot;Voters&quot;:[{&quot;Id&quot;:380,&quot;DisplayName&quot;:&quot;forgetso&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="26179" PostHistoryTypeId="2" PostId="6841" RevisionGUID="ae55f521-b133-43c0-822c-36cd1eb5c5e2" CreationDate="2023-01-23T03:04:06.487" UserId="2909" Text="I am asking this on behalf of a team - They are building a generic API microservice for handling transactions for all parachains and have some questions regarding the architecture of it and what are the best practices for handling high amount of transactions for polkadot parachains (substrate based chains).&#xD;&#xA;&#xD;&#xA;*Any general resources and tips?*" ContentLicense="CC BY-SA 4.0" />
  <row Id="26181" PostHistoryTypeId="1" PostId="6841" RevisionGUID="ae55f521-b133-43c0-822c-36cd1eb5c5e2" CreationDate="2023-01-23T03:04:06.487" UserId="2909" Text="Best practices for handling high amount of transactions across multiple polkadot parachains (substrate based chains)" ContentLicense="CC BY-SA 4.0" />
  <row Id="26182" PostHistoryTypeId="3" PostId="6841" RevisionGUID="ae55f521-b133-43c0-822c-36cd1eb5c5e2" CreationDate="2023-01-23T03:04:06.487" UserId="2909" Text="|extrinsic|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26184" PostHistoryTypeId="50" PostId="6479" RevisionGUID="06546d8a-e4eb-4939-a296-cefd6fcf0fd3" CreationDate="2023-01-23T05:03:30.480" UserId="-1" />
  <row Id="26185" PostHistoryTypeId="2" PostId="6842" RevisionGUID="9ecf3bfc-4303-46d0-9de8-e7ba098825db" CreationDate="2023-01-23T05:22:51.780" UserId="3304" Text="I am working with cactus interoperability and now i need to implement a plugin for cactus using substrate based blockchain.." ContentLicense="CC BY-SA 4.0" />
  <row Id="26187" PostHistoryTypeId="1" PostId="6842" RevisionGUID="9ecf3bfc-4303-46d0-9de8-e7ba098825db" CreationDate="2023-01-23T05:22:51.780" UserId="3304" Text="Connecting Substrate to Cactus Business logic plugin" ContentLicense="CC BY-SA 4.0" />
  <row Id="26188" PostHistoryTypeId="3" PostId="6842" RevisionGUID="9ecf3bfc-4303-46d0-9de8-e7ba098825db" CreationDate="2023-01-23T05:22:51.780" UserId="3304" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26191" PostHistoryTypeId="2" PostId="6843" RevisionGUID="2e132f28-c676-46be-a50b-308b5a04bbcf" CreationDate="2023-01-23T07:16:42.093" UserId="2281" Text="To make the &quot;startup messages&quot; show again, I had to fix the dependency of &#xD;&#xA;&#xD;&#xA;&gt; tracing-core&#xD;&#xA;&gt; &#xD;&#xA;&gt; **cargo update -p tracing-core --precise 0.1.28**&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26193" PostHistoryTypeId="2" PostId="6844" RevisionGUID="442ce451-4321-4f32-a4b9-b02b99914e01" CreationDate="2023-01-23T08:23:15.827" UserId="198" Text="Here are other resources as well:&#xD;&#xA;- General: https://polkadot.network/launch-parachains/&#xD;&#xA;- Parachains dev: https://wiki.polkadot.network/docs/build-pdk&#xD;&#xA;- Parachains guide: https://guide.kusama.network/docs/learn-parachains/&#xD;&#xA;- Testing: https://github.com/paritytech/zombienet&#xD;&#xA;- the link from @kianenigma also mentions a bunch of tools we are using such as `srtool` and `subwasm`, feel free to ask if you need details about those&#xD;&#xA;- Related: In this [directory](https://github.com/paritytech/polkadot_network_directory) you will find the list of other chains and thei information (incl. contact information), that may help you as well&#xD;&#xA;&#xD;&#xA;Launching a parachain requires some engineering, testing, documentation, marketing, communication, etc...&#xD;&#xA;&#xD;&#xA;Are asking about engineering and dev only or do you need information about the full &quot;package&quot; mentioned above ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26195" PostHistoryTypeId="2" PostId="6845" RevisionGUID="87c3c41d-e1f4-4e07-a533-363c5203e28d" CreationDate="2023-01-23T09:46:16.503" UserId="2935" Text="As far as I understood from your explanations you are running a custom node based on polkadot release tags from the substrate repo. In which case you should indeed follow the migrations found in Polkadot runtime, but only for the pallets you have attached to the runtime.&#xD;&#xA;&#xD;&#xA;There are some other migrations that could be executed automatically when you upgrade to the next release, if the pallet implements `OnRuntimeUpgrade`, however most if not all of the pallets come with migrations that you need to manually supply in the runtime, for more fine-grained control over the sequence.&#xD;&#xA;&#xD;&#xA;Unfortunately, there’s currently no better way to list all the necessary migrations than checking out [this][1] tag in substrate and [this one][2] in polkadot repo.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pulls?q=is%3Apr%20label%3AE1-runtimemigration&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/pulls?q=is%3Aopen%20is%3Apr%20label%3AE0-runtime_migration" ContentLicense="CC BY-SA 4.0" />
  <row Id="26198" PostHistoryTypeId="5" PostId="6841" RevisionGUID="06d19ebf-69b3-4529-b1d5-d3880bb320e7" CreationDate="2023-01-23T11:02:29.693" UserId="116" Comment="Asking in first person, and in this space it is expected knowledge parachains are substrate bases" Text="We are building a generic API microservice for handling transactions for all parachains and have some questions regarding the architecture of it and what are the best practices for handling high amount of transactions for polkadot parachains.&#xD;&#xA;&#xD;&#xA;*Any general resources and tips?*" ContentLicense="CC BY-SA 4.0" />
  <row Id="26199" PostHistoryTypeId="6" PostId="6841" RevisionGUID="06d19ebf-69b3-4529-b1d5-d3880bb320e7" CreationDate="2023-01-23T11:02:29.693" UserId="116" Comment="Asking in first person, and in this space it is expected knowledge parachains are substrate bases" Text="|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26200" PostHistoryTypeId="24" PostId="6841" RevisionGUID="06d19ebf-69b3-4529-b1d5-d3880bb320e7" CreationDate="2023-01-23T11:02:29.693" Comment="Proposed by 116 approved by 34 edit id of 370" ContentLicense="CC BY-SA 4.0" />
  <row Id="26202" PostHistoryTypeId="5" PostId="6837" RevisionGUID="002f9f0f-c4fc-42af-b2d4-d2140b5d4717" CreationDate="2023-01-23T13:09:30.987" UserId="3114" Comment="added 35 characters in body" Text="- This issue causes by Wheigt V2.&#xD;&#xA;- Same issue was already exists.&#xD;&#xA;- Refer to....&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/6401/smart-contract-function-call-error" ContentLicense="CC BY-SA 4.0" />
  <row Id="26203" PostHistoryTypeId="2" PostId="6846" RevisionGUID="a43fb89d-c8b6-4039-89b5-59fac737eb05" CreationDate="2023-01-23T13:27:30.283" UserId="1867" Text="[Criterion](https://github.com/bheisler/criterion.rs) version 0.4.0 seems to support WASM builds: https://www.tweag.io/blog/2022-03-03-criterion-rs/#first-class-wasm-support&#xD;&#xA;&#xD;&#xA;Can we us it to benchmark extrinsics of Substrate pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26205" PostHistoryTypeId="1" PostId="6846" RevisionGUID="a43fb89d-c8b6-4039-89b5-59fac737eb05" CreationDate="2023-01-23T13:27:30.283" UserId="1867" Text="Use criterion for statistic driven benchmarking of Substrate pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="26206" PostHistoryTypeId="3" PostId="6846" RevisionGUID="a43fb89d-c8b6-4039-89b5-59fac737eb05" CreationDate="2023-01-23T13:27:30.283" UserId="1867" Text="|substrate-node-template|benchmarking|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26208" PostHistoryTypeId="2" PostId="6847" RevisionGUID="050b193f-eeda-4799-9c90-9bf82d12e365" CreationDate="2023-01-23T15:05:45.280" UserId="707" Text="I'm trying to parse the whole storage from a node with the encoded partial key through RPC, it seems to be doable with polkadotJS see the picture in one call.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![system.account(AccountId32)][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zzMgn.png&#xD;&#xA;&#xD;&#xA;The fastest approach that we currently have, which is not an unsafe RPC call, is `state.getKeys` or state.getKeysPaged and then `queryStorageAt`.&#xD;&#xA;&#xD;&#xA;Is there a shorter way, like the representation in polkadotJS apps under chain state `system.account()` include option false, to query the whole storage? Or how is this representation done?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26210" PostHistoryTypeId="1" PostId="6847" RevisionGUID="050b193f-eeda-4799-9c90-9bf82d12e365" CreationDate="2023-01-23T15:05:45.280" UserId="707" Text="polkadotJS chain state system.account() include option false, how to rebuild with RPC?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26211" PostHistoryTypeId="3" PostId="6847" RevisionGUID="050b193f-eeda-4799-9c90-9bf82d12e365" CreationDate="2023-01-23T15:05:45.280" UserId="707" Text="|polkadot-js|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26212" PostHistoryTypeId="2" PostId="6848" RevisionGUID="cf0c9da5-51d7-4207-86ea-99947a3bd329" CreationDate="2023-01-23T15:07:47.353" UserId="3736" Text="Does anyone happen to know without having to spend time on source searching:&#xD;&#xA;&#xD;&#xA;1. A Polkadot nominator with stake N DOT nominates X validators. How the stake is distributed between them for the purpose of electing them as active:&#xD;&#xA;    + every one gets N&#xD;&#xA;    + every one gets N/X&#xD;&#xA;    + one gets N, all the rest get nothing&#xD;&#xA;    + other (what?)&#xD;&#xA;&#xD;&#xA;2. A Polkadot nominator with stake N DOT nominates X validators, Y of which are then elected as active. How the stake is distributed between them for the purpose of working (earning profits, being slashed etc):&#xD;&#xA;    + every one gets N&#xD;&#xA;    + every one gets N/X&#xD;&#xA;    + every one gets N/Y&#xD;&#xA;    + one gets N, all the rest get nothing&#xD;&#xA;    + other (what?)&#xD;&#xA;&#xD;&#xA;Thank you in advance! :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="26214" PostHistoryTypeId="1" PostId="6848" RevisionGUID="cf0c9da5-51d7-4207-86ea-99947a3bd329" CreationDate="2023-01-23T15:07:47.353" UserId="3736" Text="Distribution of nominated stake?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26215" PostHistoryTypeId="3" PostId="6848" RevisionGUID="cf0c9da5-51d7-4207-86ea-99947a3bd329" CreationDate="2023-01-23T15:07:47.353" UserId="3736" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26216" PostHistoryTypeId="2" PostId="6849" RevisionGUID="1429041b-7002-457d-abd1-47eddc86b7cb" CreationDate="2023-01-23T15:31:08.810" UserId="2762" Text="With PolkadotJS you can query the whole storage as you are doing with the option false in your image from the PolkadotJS app using `entries()`. See an example below:&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('ws://127.0.0.1:9944');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const allEntries = await api.query.system.account.entries();&#xD;&#xA;    allEntries.forEach(([{ args: [accountId] }, balance]) =&gt; {&#xD;&#xA;        console.log(`${accountId}: Balance: ${JSON.stringify(balance.toHuman())}`);&#xD;&#xA;    });" ContentLicense="CC BY-SA 4.0" />
  <row Id="26218" PostHistoryTypeId="2" PostId="6850" RevisionGUID="595f5890-a783-4427-b687-751f1e9b4e6e" CreationDate="2023-01-23T15:39:54.950" UserId="94" Text="You can use criterion to benchmark your pallets code. So far we only did this outside of WASM, but now it could be interesting to do inside WASM.  &#xD;&#xA;&#xD;&#xA;Fundamentally there are two ways to benchmark:&#xD;&#xA;- Using the FRAME macros to benchmark your no-std runtime code which results in a `weights.rs`&#xD;&#xA;- Using something else, like `criterion` to optimize your code. It is currently not possible to use `criterion` to generate weights.&#xD;&#xA;&#xD;&#xA;So far we never mixed the two. I am not sure what your goal is here, but if you just want to optimize your code, you could factor it out into `do_` functions like `do_mul_affine_g2_bls12_377_optimized` and then benchmark that instead. Then you wont need the `new_test_ext` and the storage caching that happens in there. Could be that this messes with your results.    &#xD;&#xA;In most cases you dont want them to be calls anyway; for example `mul_projective_ed_on_bls12_381` is an arithmetic function and not a call.&#xD;&#xA;&#xD;&#xA;Removing the externalities and directly calling an internal function results in this:  &#xD;&#xA;```pre&#xD;&#xA;mul_affine_g2_bls12_377/mul_affine_g2_bls12_377&#xD;&#xA;                        time:   [1.3610 µs 1.3616 µs 1.3621 µs]&#xD;&#xA;                        change: [-98.790% -98.775% -98.761%] (p = 0.00 &lt; 0.05)&#xD;&#xA;                        Performance has improved.&#xD;&#xA;Found 1 outliers among 100 measurements (1.00%)&#xD;&#xA;  1 (1.00%) high severe&#xD;&#xA;```&#xD;&#xA;The optimized version still seems a lot slower " ContentLicense="CC BY-SA 4.0" />
  <row Id="26220" PostHistoryTypeId="2" PostId="6851" RevisionGUID="a0cc00ce-4196-44a1-9ee1-c90f286ffb21" CreationDate="2023-01-23T15:41:21.777" UserId="3327" Text="Treasury is a pot of funds to accumulate  funds to be spend for some purpose later on. &#xD;&#xA;&#xD;&#xA;One way to manage the manage the treasury is by majority votes of a council like on  Kusama network. Is there other ways to manage the treasury?  if yes, what are these ways please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26222" PostHistoryTypeId="1" PostId="6851" RevisionGUID="a0cc00ce-4196-44a1-9ee1-c90f286ffb21" CreationDate="2023-01-23T15:41:21.777" UserId="3327" Text="How to manage the treasury?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26223" PostHistoryTypeId="3" PostId="6851" RevisionGUID="a0cc00ce-4196-44a1-9ee1-c90f286ffb21" CreationDate="2023-01-23T15:41:21.777" UserId="3327" Text="|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26224" PostHistoryTypeId="2" PostId="6852" RevisionGUID="03bbb013-54c3-4d55-adc4-37d4b6d61970" CreationDate="2023-01-23T16:00:26.363" UserId="3632" Text="I've been following through the pallets tutorial: https://docs.substrate.io/tutorials/work-with-pallets/use-macros-in-a-custom-pallet/ and got stuck at the last step of interacting with the blockchain. &#xD;&#xA;&#xD;&#xA;The error I'm getting: &quot;Cannot convert undefined or null to object&quot; happens when I try to access https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/. The code of `substrate-node-template` compiles with no errors and the repo is fresh.&#xD;&#xA;&#xD;&#xA;- OS: MacOS 12.3.1&#xD;&#xA;- Browser: Brave (Version 1.46.153 Chromium: 108.0.5359.128 - x86_64)&#xD;&#xA;&#xD;&#xA;_Note_. I also looked into https://substrate.stackexchange.com/questions/5966/connecting-to-a-chain-on-ws-localhost-with-polkadot-js-app-fails-when-running but my problem is unrelated to this." ContentLicense="CC BY-SA 4.0" />
  <row Id="26226" PostHistoryTypeId="1" PostId="6852" RevisionGUID="03bbb013-54c3-4d55-adc4-37d4b6d61970" CreationDate="2023-01-23T16:00:26.363" UserId="3632" Text="&quot;Cannot convert undefined or null to object&quot; using polkadot.js in substrate tutorials" ContentLicense="CC BY-SA 4.0" />
  <row Id="26227" PostHistoryTypeId="3" PostId="6852" RevisionGUID="03bbb013-54c3-4d55-adc4-37d4b6d61970" CreationDate="2023-01-23T16:00:26.363" UserId="3632" Text="|polkadot-js|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26228" PostHistoryTypeId="6" PostId="6852" RevisionGUID="35422a2e-7afe-4dba-87fb-153fdca09746" CreationDate="2023-01-23T16:13:06.827" UserId="34" Comment="edited tags" Text="|polkadot-js|substrate-node-template|substrate-parachain-template|websocket|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26233" PostHistoryTypeId="2" PostId="6854" RevisionGUID="0720a7b7-898a-44b9-8864-f987fed8b775" CreationDate="2023-01-23T16:52:34.363" UserId="32" Text="&gt; Does anyone happen to know without having to spend time on source&#xD;&#xA;&gt; searching&#xD;&#xA;&#xD;&#xA;This article gives insight into how Nominated Proof of Staking (NPoS) works on Polkadot https://medium.com/web3foundation/how-nominated-proof-of-stake-will-work-in-polkadot-377d70c6bd43&#xD;&#xA;&#xD;&#xA;&gt; A Polkadot nominator with stake N DOT nominates X validators. How the&#xD;&#xA;&gt; stake is distributed between them for the purpose of electing them as&#xD;&#xA;&gt; active:&#xD;&#xA;&#xD;&#xA;This is determined by the NPoS algorithms, which work for fair representation and decentralization. They - &#xD;&#xA;&#xD;&#xA;1. Maximize the total amount at stake on the network&#xD;&#xA;2. Maximize the stake behind the minimally staked validator.&#xD;&#xA;3. Minimize the variance of the stake in the active validator set.&#xD;&#xA;&#xD;&#xA;When writing this response, the validator with the lowest stake in the active set is backed by 1.5 million DOT, and the average stake is around 2 million DOT. &#xD;&#xA;&#xD;&#xA;Let's say you have 10 million DOT and only nominated a single validator. By doing this, you did not give the NPoS algorithm any choice to split the stake among validators, so your entire stake of 10 million DOT will back a single validator in the active set.&#xD;&#xA;&#xD;&#xA;Let's say you have 10 million DOT and nominated five different validators. All those five will make it to the active set with your nomination alone. Suppose these validators received nominations from other nominators. In that case, their nominations might be applied to other validators they nominated who might make it to the active set (by the list items 2 and 3 from above).&#xD;&#xA;&#xD;&#xA;So, to answer your question, the NPoS algorithms decide how much of your stake backs each validator you nominate. Typically, amounts much lesser than the average active validator stake (2 million DOT) are mapped to a single validator. For example, let's say you nominate 1000 DOT to 16 validators, your stake will likely end up backing only a single validator.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; A Polkadot nominator with stake N DOT nominates X validators, Y of&#xD;&#xA;&gt; which are then elected as active. How the stake is distributed between&#xD;&#xA;&gt; them for the purpose of working (earning profits, being slashed etc)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The NPoS election runs in each era and as I mentioned earlier, a nominator's stake is mapped (most likely) to a single validator or a handful who make it to the active set. The staking rewards or slashing penalties are earned/applied proportionately to the stake applied to each validator. Let's say you nominated 16 validators, and your stake ended up backing one validator. The fate of your staking rewards/slashing penalties is tied to that particular validator in that staking era and is unaffected by the actions of other 15 validators you nominated.&#xD;&#xA;&#xD;&#xA;For detailed information, please read these pages on the Wiki:&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-staking&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-staking-advanced&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-phragmen&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26235" PostHistoryTypeId="2" PostId="6855" RevisionGUID="dd3b2e2d-8674-4f13-a078-084824438365" CreationDate="2023-01-23T20:45:27.943" UserId="560" Text="Hello Polkadot Ecosystem! &#xD;&#xA;&#xD;&#xA;There are several public node operators, however, I was not able to find one that had support for .onion addresses. Public .onion nodes is something that has been in the bitcoin space for a while, just like host Bitcoin's electrum wallet has tor onion address support/integration, a public .onion node hosting provider is something that we want to see so we can increase privacy-friendly ways for clients and users to connect.&#xD;&#xA;&#xD;&#xA;Public .onion nodes for Polkadot, Kusama and Edgeware are now available here:&#xD;&#xA;https://privhost.laissez-faire.trade/" ContentLicense="CC BY-SA 4.0" />
  <row Id="26237" PostHistoryTypeId="1" PostId="6855" RevisionGUID="dd3b2e2d-8674-4f13-a078-084824438365" CreationDate="2023-01-23T20:45:27.943" UserId="560" Text="Public Tor dot Onion addresses for Polkadot, Kusama and Edgeware nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="26238" PostHistoryTypeId="3" PostId="6855" RevisionGUID="dd3b2e2d-8674-4f13-a078-084824438365" CreationDate="2023-01-23T20:45:27.943" UserId="560" Text="|polkadot|kusama|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26239" PostHistoryTypeId="2" PostId="6856" RevisionGUID="d8bb3346-0c51-4239-a86c-5a282949a5e2" CreationDate="2023-01-23T20:45:27.943" UserId="560" Text="Public .onion nodes for Polkadot, Kusama and Edgeware are available here now:&#xD;&#xA;https://privhost.laissez-faire.trade/" ContentLicense="CC BY-SA 4.0" />
  <row Id="26241" PostHistoryTypeId="50" PostId="4460" RevisionGUID="a60a175a-8ac8-4a25-91e8-e3a722922d91" CreationDate="2023-01-23T21:03:05.327" UserId="-1" />
  <row Id="26242" PostHistoryTypeId="2" PostId="6857" RevisionGUID="1b99c358-4a58-43f4-a382-8b0e970ec17a" CreationDate="2023-01-23T21:41:49.520" UserId="3738" Text="As described, i would like to construct a listener to be alerted when a new referenda has just started.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="26244" PostHistoryTypeId="1" PostId="6857" RevisionGUID="1b99c358-4a58-43f4-a382-8b0e970ec17a" CreationDate="2023-01-23T21:41:49.520" UserId="3738" Text="Which event or index should a listen in order to get a new referenda in &quot;started&quot; (open to vote) status?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26245" PostHistoryTypeId="3" PostId="6857" RevisionGUID="1b99c358-4a58-43f4-a382-8b0e970ec17a" CreationDate="2023-01-23T21:41:49.520" UserId="3738" Text="|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26246" PostHistoryTypeId="5" PostId="6857" RevisionGUID="926bb93d-46ce-401c-8fce-0772242cbbe4" CreationDate="2023-01-23T21:47:01.693" UserId="3738" Comment="added 40 characters in body" Text="As described, i would like to construct a listener to be alerted when a new referenda has just started.&#xD;&#xA;Actually i am using mostly Subscan API&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="26247" PostHistoryTypeId="2" PostId="6858" RevisionGUID="f7b184c0-4094-4101-913b-e9386147af8e" CreationDate="2023-01-23T22:11:34.170" UserId="3735" Text="A common issue that may be causing this is you may have another node running already, perhaps in another terminal window. That another node will have taken the default port assigned to the node, so when you try to connect to this node, it is unable to do so.&#xD;&#xA;&#xD;&#xA;To determine if this is the case, examine the logs for this current node in your terminal, and specifically look for the http address and port allocation on your localhost.&#xD;&#xA;&#xD;&#xA;If it is assigned to the default port of `9933`, you will see the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=[&quot;*&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If it has been assigned a different port, take note of it. Once you have it, you can open up https://polkadot.js.org/apps and click on the circle icon on the top left-hand of the navigation.&#xD;&#xA;&#xD;&#xA;[![circle icon to show the Polkadot JS navigation menu.][1]][1] &#xD;&#xA;&#xD;&#xA;Then, enter the correct port in the &quot;custom endpoint&quot; text box. &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, click &quot;Switch&quot; on the upper right-hand corner of the navigation menu.&#xD;&#xA;&#xD;&#xA;You should now be connected to your local node.&#xD;&#xA;&#xD;&#xA;As an aside, it's a good idea to also confirm the presence of any other active running nodes on your machine, and if not needed, to shut them down.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/l5LFe.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/HiK03.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26251" PostHistoryTypeId="2" PostId="6860" RevisionGUID="43886135-f6f9-47b3-8ad0-a0e7c4764b1f" CreationDate="2023-01-24T03:04:22.493" UserId="251" Text="It's totally up to you.&#xD;&#xA;&#xD;&#xA;You can manage it through your custom pallet.&#xD;&#xA;&#xD;&#xA;For example, you have a `pallet-fun`. And this pallet can transfer some balances from the treasury to a random account every block.&#xD;&#xA;&#xD;&#xA;For Polkadot: https://wiki.polkadot.network/docs/learn-treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="26257" PostHistoryTypeId="2" PostId="6862" RevisionGUID="35dfc78e-aff4-4948-832b-844009fa7461" CreationDate="2023-01-24T07:34:32.373" UserId="377" Text="For me it happened because of change in the command which i did for some usecase." ContentLicense="CC BY-SA 4.0" />
  <row Id="26259" PostHistoryTypeId="5" PostId="6851" RevisionGUID="e4b1ea1c-04b4-4efc-9fe2-241bf36089e6" CreationDate="2023-01-24T08:45:59.150" UserId="83" Comment="Grammar" Text="Treasury is a pot of funds to accumulate  funds to be spent for some purpose later on. &#xD;&#xA;&#xD;&#xA;One way to manage the treasury is by a majority vote from a council like on  Kusama network. Are there other ways to manage the treasury?  If yes, what are these ways please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26262" PostHistoryTypeId="2" PostId="6864" RevisionGUID="db1c1830-055d-47e2-a9f1-d401c9068b36" CreationDate="2023-01-24T08:56:29.177" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="26264" PostHistoryTypeId="1" PostId="6864" RevisionGUID="db1c1830-055d-47e2-a9f1-d401c9068b36" CreationDate="2023-01-24T08:56:29.177" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="26265" PostHistoryTypeId="2" PostId="6865" RevisionGUID="7271602c-dadc-4566-b7f7-b634d233f8d8" CreationDate="2023-01-24T08:56:29.177" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="26267" PostHistoryTypeId="1" PostId="6865" RevisionGUID="7271602c-dadc-4566-b7f7-b634d233f8d8" CreationDate="2023-01-24T08:56:29.177" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="26268" PostHistoryTypeId="2" PostId="6866" RevisionGUID="8e2919ed-e933-4db5-99ea-4a5cdfbad111" CreationDate="2023-01-24T09:25:34.790" UserId="3281" Text="    &#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn dummy_function(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            value: u64,&#xD;&#xA;        ) -&gt; u64 {&#xD;&#xA;            debug_println!(&quot;inside user contract dummy_function&quot;);&#xD;&#xA;            return 45 * value;&#xD;&#xA;        }&#xD;&#xA;This is my contract function that i was testing on rococo network. This basic txn is giving me `outOfGas` error. What are the possible issues I can have in my contract and how can i resolve them?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26270" PostHistoryTypeId="1" PostId="6866" RevisionGUID="8e2919ed-e933-4db5-99ea-4a5cdfbad111" CreationDate="2023-01-24T09:25:34.790" UserId="3281" Text="Out of gas Error for Contract execution" ContentLicense="CC BY-SA 4.0" />
  <row Id="26271" PostHistoryTypeId="3" PostId="6866" RevisionGUID="8e2919ed-e933-4db5-99ea-4a5cdfbad111" CreationDate="2023-01-24T09:25:34.790" UserId="3281" Text="|ink|smart-contract|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26272" PostHistoryTypeId="2" PostId="6867" RevisionGUID="4b0c3851-9fdb-4f7f-ad72-afd5617b2a39" CreationDate="2023-01-24T09:32:09.480" UserId="567" Text="I am writing a chain-extension that is a 1 to 1 map of a pallet. Based on [this](https://crates.parity.io/pallet_contracts/chain_extension/index.html#benchmarking):&#xD;&#xA;&gt; [...] charging the appropriate amount of weight. In order to do so benchmarks must be written and the charge_weight function must be called before carrying out any action that causes the consumption of the chargeable weight.&#xD;&#xA;&#xD;&#xA;I wonder if you should charge weight before any call to the pallet:&#xD;&#xA;&#xD;&#xA;    let base_weight = &lt;T as pallet_dapps_staking::Config&gt;::WeightInfo::bond_and_stake();&#xD;&#xA;    env.charge_weight(base_weight)?;&#xD;&#xA;                    &#xD;&#xA;    let call_result = pallet_dapps_staking::Pallet::&lt;T&gt;::bond_and_stake(&#xD;&#xA;        RawOrigin::Signed(caller).into(),&#xD;&#xA;        contract,&#xD;&#xA;        value,&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;Or if the weight will be charged in the pallet call anyway (and the above code might charge the weight two times).&#xD;&#xA;&#xD;&#xA;**Also** as chain-extension exposes a `call` function that can dispatch different pallet calls, how to ensure proper weight is handled to not excess max block weight ? basically the equivalent of `#[pallet::weight(T::WeightInfo::extrinsic())]` for pallets.&#xD;&#xA;&#xD;&#xA;Code [here](https://github.com/AstarNetwork/astar-frame/blob/b2f888fafecb7257e68c5e9f0e9e661d1f8007c9/chain-extensions/dapps-staking/src/lib.rs#L110)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26274" PostHistoryTypeId="1" PostId="6867" RevisionGUID="4b0c3851-9fdb-4f7f-ad72-afd5617b2a39" CreationDate="2023-01-24T09:32:09.480" UserId="567" Text="Charge weight and weight Info in chain-extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="26275" PostHistoryTypeId="3" PostId="6867" RevisionGUID="4b0c3851-9fdb-4f7f-ad72-afd5617b2a39" CreationDate="2023-01-24T09:32:09.480" UserId="567" Text="|ink|pallet-contracts|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26277" PostHistoryTypeId="5" PostId="6862" RevisionGUID="3bba2b2b-9f96-43f2-88c6-6e1add077a59" CreationDate="2023-01-24T10:43:04.387" UserId="377" Comment="added 471 characters in body" Text="For me it happened because of change in the command which i did for some use-case.&#xD;&#xA;&#xD;&#xA;I was using below command:&#xD;&#xA;&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;--alice \&#xD;&#xA;--validator \&#xD;&#xA;--base-path /tmp/relay/alice \&#xD;&#xA;--chain raw-parachain-chainspec.json \&#xD;&#xA;--rpc-methods=unsafe&#xD;&#xA;--rpc-cors all&#xD;&#xA;--ws-external&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9944&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Instead of default command we get to start relay chain.&#xD;&#xA;&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;--alice \&#xD;&#xA;--validator \&#xD;&#xA;--base-path /tmp/relay/alice \&#xD;&#xA;--chain raw-parachain-chainspec.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9944&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26278" PostHistoryTypeId="5" PostId="6862" RevisionGUID="a36fa66e-2b94-413f-96fd-bdf43e3cb828" CreationDate="2023-01-24T10:51:09.470" UserId="2762" Comment="added 68 characters in body" Text="For me it happened because of change in the command which i did for some use-case.&#xD;&#xA;&#xD;&#xA;I was using below command:&#xD;&#xA;&#xD;&#xA;    ./target/release/polkadot \&#xD;&#xA;    --alice \&#xD;&#xA;    --validator \&#xD;&#xA;    --base-path /tmp/relay/alice \&#xD;&#xA;    --chain raw-parachain-chainspec.json \&#xD;&#xA;    --rpc-methods=unsafe&#xD;&#xA;    --rpc-cors all&#xD;&#xA;    --ws-external&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9944&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Instead of default command we get to start relay chain.&#xD;&#xA;&#xD;&#xA;    ./target/release/polkadot \&#xD;&#xA;    --alice \&#xD;&#xA;    --validator \&#xD;&#xA;    --base-path /tmp/relay/alice \&#xD;&#xA;    --chain raw-parachain-chainspec.json \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9944&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26279" PostHistoryTypeId="2" PostId="6868" RevisionGUID="1355a21f-9151-4b5e-9221-ae7f2c005325" CreationDate="2023-01-24T11:28:08.603" UserId="2844" Text="It's because of Insufficent Balance (i.e. ROC) in your account. You can get dummy ROC by using [this element link][1]. Just type `!drip &quot;your account key&quot;` and send message you will get `100 ROC`. I have tested in ROCOCO network, haven't faced any issue.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://app.element.io/#/room/#rococo-faucet:matrix.org&#xD;&#xA;  [2]: https://i.stack.imgur.com/qPlTK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26281" PostHistoryTypeId="2" PostId="6869" RevisionGUID="7fa61ebe-ff68-483f-ac88-3096e7366b92" CreationDate="2023-01-24T11:45:14.930" UserId="325" Text="So I am building a service that will be creating high amount of transactions on different substrate base chains. &#xD;&#xA;&#xD;&#xA;The infrastructure I have in mind is having microservices that will generate transactions depending on the chain and different outcomes. Then the constructed transaction parameters are sent to another microservice that selects the key and signs the transaction. The signed transaction is saved into the database and a cron job picks it up and sends it to the node. While another worker is checking and updating the transaction status in the database. &#xD;&#xA;&#xD;&#xA;Why I have this is mind is so that I can have a secure way of signing the transaction. Then since a node can be unresponsive or dynamically chosen based on the chain we are transmitting to I have a separate worker that just makes sure the transactions are transmitted to the network in the correct sequence. And finally a service that monitors transactions and their statuses. &#xD;&#xA;&#xD;&#xA;Now almost all examples I found do all this 3 things at the same time using signAndSend method and waiting for response. &#xD;&#xA;&#xD;&#xA;I found this: https://wiki.polkadot.network/docs/build-transaction-construction for creating each step individually. &#xD;&#xA;&#xD;&#xA;But from researching further I found out that `transactionHash` is not unique like with EVM chains to monitor the transaction through that. &#xD;&#xA;&#xD;&#xA;Now my main questions are:&#xD;&#xA; - Is the infrastructure I have in mind appropriate= It works very well for EVM based chains but is there is a different/better way to do things for substrate based transactions?&#xD;&#xA; - How to uniquely identify and monitor transactions? And can you get the unique key before actually sending the transaction to the chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26283" PostHistoryTypeId="1" PostId="6869" RevisionGUID="7fa61ebe-ff68-483f-ac88-3096e7366b92" CreationDate="2023-01-24T11:45:14.930" UserId="325" Text="Best practices for generating and monitoring transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="26284" PostHistoryTypeId="3" PostId="6869" RevisionGUID="7fa61ebe-ff68-483f-ac88-3096e7366b92" CreationDate="2023-01-24T11:45:14.930" UserId="325" Text="|polkadot|parachain|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26285" PostHistoryTypeId="2" PostId="6870" RevisionGUID="88706269-e6c9-4f7b-b70a-610829a61f60" CreationDate="2023-01-24T13:56:45.230" UserId="2454" Text="When attempting to compile `cumulus` on branch `polkadot-v0.9.36` while disabling standard features, this error occurs:&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;nologik@nologik-laptop dkg-substrate % cargo check --workspace --no-default-features&#xD;&#xA;⚡ Found 3 strongly connected components which includes at least one cycle each&#xD;&#xA;cycle(001) ∈ α: DisputeCoordinator ~~{&quot;DisputeDistributionMessage&quot;}~~&gt; DisputeDistribution ~~{&quot;DisputeCoordinatorMessage&quot;}~~&gt;  *&#xD;&#xA;cycle(002) ∈ β: CandidateBacking ~~{&quot;ProvisionerMessage&quot;}~~&gt; Provisioner ~~{&quot;CandidateBackingMessage&quot;}~~&gt;  *&#xD;&#xA;cycle(003) ∈ γ: NetworkBridgeRx ~~{&quot;GossipSupportMessage&quot;}~~&gt; GossipSupport ~~{&quot;NetworkBridgeRxMessage&quot;}~~&gt;  *&#xD;&#xA;    Checking cumulus-pallet-parachain-system v0.1.0 (https://github.com/paritytech/cumulus?branch=release-v0.9.360#27c57ba6)&#xD;&#xA;    Checking cumulus-pallet-xcmp-queue v0.1.0 (https://github.com/paritytech/cumulus?branch=release-v0.9.360#27c57ba6)&#xD;&#xA;    Checking dkg-standalone-node v3.0.0 (/Users/nologik/commonwealth/dkg-substrate/standalone/node)&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;    --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/xcmp-queue/src/lib.rs:1006:25&#xD;&#xA;     |&#xD;&#xA;1006 |                         message_metadata: vec![(sent_at, format)],&#xD;&#xA;     |                                           ^^^&#xD;&#xA;     |&#xD;&#xA;     = note: consider importing one of these items:&#xD;&#xA;             codec::alloc::vec&#xD;&#xA;             scale_info::prelude::vec&#xD;&#xA;             sp_std::vec&#xD;&#xA;&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/lib.rs:698:17&#xD;&#xA;    |&#xD;&#xA;698 |                         provides: vec![hash.as_ref().to_vec()],&#xD;&#xA;    |                                   ^^^&#xD;&#xA;    |&#xD;&#xA;    = note: consider importing one of these items:&#xD;&#xA;            codec::alloc::vec&#xD;&#xA;            scale_info::prelude::vec&#xD;&#xA;            sp_std::vec&#xD;&#xA;&#xD;&#xA;error: cannot find macro `thread_local` in this scope&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/mod.rs:37:1&#xD;&#xA;   |&#xD;&#xA;37 | environmental::environmental!(VALIDATION_PARAMS: ValidationParams);&#xD;&#xA;   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;   |&#xD;&#xA;   = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`&#xD;&#xA;   = note: this error originates in the macro `$crate::thread_local_impl` which comes from the expansion of the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_read` in module `sp_io::storage`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:81:19&#xD;&#xA;   |&#xD;&#xA;81 |         sp_io::storage::host_read.replace_implementation(host_storage_read),&#xD;&#xA;   |                         ^^^^^^^^^ not found in `sp_io::storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_set` in module `sp_io::storage`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:82:19&#xD;&#xA;   |&#xD;&#xA;82 |         sp_io::storage::host_set.replace_implementation(host_storage_set),&#xD;&#xA;   |                         ^^^^^^^^ not found in `sp_io::storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_get` in module `sp_io::storage`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:83:19&#xD;&#xA;   |&#xD;&#xA;83 |         sp_io::storage::host_get.replace_implementation(host_storage_get),&#xD;&#xA;   |                         ^^^^^^^^ not found in `sp_io::storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_exists` in module `sp_io::storage`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:84:19&#xD;&#xA;   |&#xD;&#xA;84 |         sp_io::storage::host_exists.replace_implementation(host_storage_exists),&#xD;&#xA;   |                         ^^^^^^^^^^^ not found in `sp_io::storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_clear` in module `sp_io::storage`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:85:19&#xD;&#xA;   |&#xD;&#xA;85 |         sp_io::storage::host_clear.replace_implementation(host_storage_clear),&#xD;&#xA;   |                         ^^^^^^^^^^ not found in `sp_io::storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_root` in module `sp_io::storage`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:86:19&#xD;&#xA;   |&#xD;&#xA;86 |         sp_io::storage::host_root.replace_implementation(host_storage_root),&#xD;&#xA;   |                         ^^^^^^^^^ not found in `sp_io::storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_clear_prefix` in module `sp_io::storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:87:19&#xD;&#xA;    |&#xD;&#xA;87  |           sp_io::storage::host_clear_prefix.replace_implementation(host_storage_clear_prefix),&#xD;&#xA;    |                           ^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `clear_prefix`&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/nologik/.cargo/git/checkouts/substrate-7e08433d4c370a21/cb4f249/primitives/io/src/lib.rs:167:5&#xD;&#xA;    |&#xD;&#xA;167 | /     /// Clear the storage of each key-value pair where the key starts with the given `prefix`.&#xD;&#xA;168 | |     ///&#xD;&#xA;169 | |     /// # Limit&#xD;&#xA;170 | |     ///&#xD;&#xA;...   |&#xD;&#xA;194 | |         Externalities::clear_prefix(*self, prefix, limit, None).into()&#xD;&#xA;195 | |     }&#xD;&#xA;    | |_____- similarly named function `clear_prefix` defined here&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_append` in module `sp_io::storage`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:88:19&#xD;&#xA;   |&#xD;&#xA;88 |         sp_io::storage::host_append.replace_implementation(host_storage_append),&#xD;&#xA;   |                         ^^^^^^^^^^^ not found in `sp_io::storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_next_key` in module `sp_io::storage`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:89:19&#xD;&#xA;   |&#xD;&#xA;89 |         sp_io::storage::host_next_key.replace_implementation(host_storage_next_key),&#xD;&#xA;   |                         ^^^^^^^^^^^^^ not found in `sp_io::storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_start_transaction` in module `sp_io::storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:90:19&#xD;&#xA;    |&#xD;&#xA;90  |           sp_io::storage::host_start_transaction&#xD;&#xA;    |                           ^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `start_transaction`&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/nologik/.cargo/git/checkouts/substrate-7e08433d4c370a21/cb4f249/primitives/io/src/lib.rs:285:5&#xD;&#xA;    |&#xD;&#xA;285 | /     /// Start a new nested transaction.&#xD;&#xA;286 | |     ///&#xD;&#xA;287 | |     /// This allows to either commit or roll back all changes that are made after this call.&#xD;&#xA;288 | |     /// For every transaction there must be a matching call to either `rollback_transaction`&#xD;&#xA;...   |&#xD;&#xA;298 | |         self.storage_start_transaction();&#xD;&#xA;299 | |     }&#xD;&#xA;    | |_____- similarly named function `start_transaction` defined here&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_rollback_transaction` in module `sp_io::storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:92:19&#xD;&#xA;    |&#xD;&#xA;92  |           sp_io::storage::host_rollback_transaction&#xD;&#xA;    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `rollback_transaction`&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/nologik/.cargo/git/checkouts/substrate-7e08433d4c370a21/cb4f249/primitives/io/src/lib.rs:301:5&#xD;&#xA;    |&#xD;&#xA;301 | /     /// Rollback the last transaction started by `start_transaction`.&#xD;&#xA;302 | |     ///&#xD;&#xA;303 | |     /// Any changes made during that transaction are discarded.&#xD;&#xA;304 | |     ///&#xD;&#xA;...   |&#xD;&#xA;310 | |             .expect(&quot;No open transaction that can be rolled back.&quot;);&#xD;&#xA;311 | |     }&#xD;&#xA;    | |_____- similarly named function `rollback_transaction` defined here&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_commit_transaction` in module `sp_io::storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:94:19&#xD;&#xA;    |&#xD;&#xA;94  |           sp_io::storage::host_commit_transaction&#xD;&#xA;    |                           ^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `commit_transaction`&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/nologik/.cargo/git/checkouts/substrate-7e08433d4c370a21/cb4f249/primitives/io/src/lib.rs:313:5&#xD;&#xA;    |&#xD;&#xA;313 | /     /// Commit the last transaction started by `start_transaction`.&#xD;&#xA;314 | |     ///&#xD;&#xA;315 | |     /// Any changes made during that transaction are committed.&#xD;&#xA;316 | |     ///&#xD;&#xA;...   |&#xD;&#xA;322 | |             .expect(&quot;No open transaction that can be committed.&quot;);&#xD;&#xA;323 | |     }&#xD;&#xA;    | |_____- similarly named function `commit_transaction` defined here&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_get` in module `sp_io::default_child_storage`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:96:33&#xD;&#xA;   |&#xD;&#xA;96 |         sp_io::default_child_storage::host_get&#xD;&#xA;   |                                       ^^^^^^^^ not found in `sp_io::default_child_storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_read` in module `sp_io::default_child_storage`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:98:33&#xD;&#xA;   |&#xD;&#xA;98 |         sp_io::default_child_storage::host_read&#xD;&#xA;   |                                       ^^^^^^^^^ not found in `sp_io::default_child_storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_set` in module `sp_io::default_child_storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:100:33&#xD;&#xA;    |&#xD;&#xA;100 |         sp_io::default_child_storage::host_set&#xD;&#xA;    |                                       ^^^^^^^^ not found in `sp_io::default_child_storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_clear` in module `sp_io::default_child_storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:102:33&#xD;&#xA;    |&#xD;&#xA;102 |         sp_io::default_child_storage::host_clear&#xD;&#xA;    |                                       ^^^^^^^^^^ not found in `sp_io::default_child_storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_storage_kill` in module `sp_io::default_child_storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:104:33&#xD;&#xA;    |&#xD;&#xA;104 |           sp_io::default_child_storage::host_storage_kill&#xD;&#xA;    |                                         ^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `storage_kill`&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/nologik/.cargo/git/checkouts/substrate-7e08433d4c370a21/cb4f249/primitives/io/src/lib.rs:398:5&#xD;&#xA;    |&#xD;&#xA;398 | /     /// Clear a child storage key.&#xD;&#xA;399 | |     ///&#xD;&#xA;400 | |     /// See `Storage` module `clear_prefix` documentation for `limit` usage.&#xD;&#xA;401 | |     #[version(3)]&#xD;&#xA;...   |&#xD;&#xA;404 | |         self.kill_child_storage(&amp;child_info, limit, None).into()&#xD;&#xA;405 | |     }&#xD;&#xA;    | |_____- similarly named function `storage_kill` defined here&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_exists` in module `sp_io::default_child_storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:106:33&#xD;&#xA;    |&#xD;&#xA;106 |         sp_io::default_child_storage::host_exists&#xD;&#xA;    |                                       ^^^^^^^^^^^ not found in `sp_io::default_child_storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_clear_prefix` in module `sp_io::default_child_storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:108:33&#xD;&#xA;    |&#xD;&#xA;108 |           sp_io::default_child_storage::host_clear_prefix&#xD;&#xA;    |                                         ^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `clear_prefix`&#xD;&#xA;    |&#xD;&#xA;   ::: /Users/nologik/.cargo/git/checkouts/substrate-7e08433d4c370a21/cb4f249/primitives/io/src/lib.rs:438:5&#xD;&#xA;    |&#xD;&#xA;438 | /     /// Clear the child storage of each key-value pair where the key starts with the given `prefix`.&#xD;&#xA;439 | |     ///&#xD;&#xA;440 | |     /// See `Storage` module `clear_prefix` documentation for `limit` usage.&#xD;&#xA;441 | |     #[version(2)]&#xD;&#xA;...   |&#xD;&#xA;449 | |         self.clear_child_prefix(&amp;child_info, prefix, limit, None).into()&#xD;&#xA;450 | |     }&#xD;&#xA;    | |_____- similarly named function `clear_prefix` defined here&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_root` in module `sp_io::default_child_storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:110:33&#xD;&#xA;    |&#xD;&#xA;110 |         sp_io::default_child_storage::host_root&#xD;&#xA;    |                                       ^^^^^^^^^ not found in `sp_io::default_child_storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_next_key` in module `sp_io::default_child_storage`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:112:33&#xD;&#xA;    |&#xD;&#xA;112 |         sp_io::default_child_storage::host_next_key&#xD;&#xA;    |                                       ^^^^^^^^^^^^^ not found in `sp_io::default_child_storage`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_set` in module `sp_io::offchain_index`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:114:26&#xD;&#xA;    |&#xD;&#xA;114 |         sp_io::offchain_index::host_set.replace_implementation(host_offchain_index_set),&#xD;&#xA;    |                                ^^^^^^^^ not found in `sp_io::offchain_index`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `host_clear` in module `sp_io::offchain_index`&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:115:26&#xD;&#xA;    |&#xD;&#xA;115 |         sp_io::offchain_index::host_clear.replace_implementation(host_offchain_index_clear),&#xD;&#xA;    |                                ^^^^^^^^^^ not found in `sp_io::offchain_index`&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `GLOBAL` in this scope&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/mod.rs:37:1&#xD;&#xA;   |&#xD;&#xA;37 | environmental::environmental!(VALIDATION_PARAMS: ValidationParams);&#xD;&#xA;   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;   |&#xD;&#xA;   = note: this error originates in the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error: could not compile `cumulus-pallet-xcmp-queue` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error[E0061]: this function takes 4 arguments but 3 arguments were supplied&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/cumulus-59522f43471fa161/27c57ba/pallets/parachain-system/src/validate_block/implementation.rs:191:16&#xD;&#xA;    |&#xD;&#xA;191 |     let mut ext = Ext::&lt;B&gt;::new(&amp;mut overlay, &amp;mut cache, backend);&#xD;&#xA;    |                   ^^^^^^^^^^^^^----------------------------------- an argument of type `core::option::Option&lt;&amp;mut Extensions&gt;` is missing&#xD;&#xA;    |&#xD;&#xA;note: associated function defined here&#xD;&#xA;   --&gt; /Users/nologik/.cargo/git/checkouts/substrate-7e08433d4c370a21/cb4f249/primitives/state-machine/src/ext.rs:128:9&#xD;&#xA;    |&#xD;&#xA;128 |     pub fn new(&#xD;&#xA;    |            ^^^&#xD;&#xA;help: provide the argument&#xD;&#xA;    |&#xD;&#xA;191 |     let mut ext = Ext::&lt;B&gt;::new(&amp;mut overlay, &amp;mut cache, backend, /* core::option::Option&lt;&amp;mut Extensions&gt; */);&#xD;&#xA;    |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0061, E0425.&#xD;&#xA;For more information about an error, try `rustc --explain E0061`.&#xD;&#xA;error: could not compile `cumulus-pallet-parachain-system` due to 29 previous errors&#xD;&#xA;nologik@nologik-laptop dkg-substrate % &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This error can be mitigated by not passing `--no-default-features`, however, this is a necessary flag to allow compiling to WASM." ContentLicense="CC BY-SA 4.0" />
  <row Id="26287" PostHistoryTypeId="1" PostId="6870" RevisionGUID="88706269-e6c9-4f7b-b70a-610829a61f60" CreationDate="2023-01-24T13:56:45.230" UserId="2454" Text="Compiling cumulus v0.9.36 with --no-default-features" ContentLicense="CC BY-SA 4.0" />
  <row Id="26288" PostHistoryTypeId="3" PostId="6870" RevisionGUID="88706269-e6c9-4f7b-b70a-610829a61f60" CreationDate="2023-01-24T13:56:45.230" UserId="2454" Text="|wasm|substrate-parachain-template|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26289" PostHistoryTypeId="2" PostId="6871" RevisionGUID="94f16a70-99f0-4720-8571-2977dc05f54e" CreationDate="2023-01-24T15:21:17.183" UserId="3744" Text="I am currently working with a Substrate blockchain and I was wondering if there is a way to set a fixed Local Peer ID, instead of it being generated dynamically every time the node starts up. I have been unable to find any information on this in the documentation and would greatly appreciate any help or guidance on this matter. Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="26291" PostHistoryTypeId="1" PostId="6871" RevisionGUID="94f16a70-99f0-4720-8571-2977dc05f54e" CreationDate="2023-01-24T15:21:17.183" UserId="3744" Text="Is there a way to set a fixed Local Peer ID in a Substrate blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26292" PostHistoryTypeId="3" PostId="6871" RevisionGUID="94f16a70-99f0-4720-8571-2977dc05f54e" CreationDate="2023-01-24T15:21:17.183" UserId="3744" Text="|substrate-node-template|rust|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26293" PostHistoryTypeId="2" PostId="6872" RevisionGUID="e14ad72e-b779-4c00-b1cd-ed7bfb7fd639" CreationDate="2023-01-24T16:22:59.043" UserId="49" Text="You can use [Subkey](https://docs.substrate.io/reference/command-line-tools/subkey/) to generate a node key, that you can then supply to the node using the `--node-key` option." ContentLicense="CC BY-SA 4.0" />
  <row Id="26296" PostHistoryTypeId="2" PostId="6873" RevisionGUID="9924d593-d736-4846-852c-5b65d629bb72" CreationDate="2023-01-24T20:11:08.790" UserId="3383" Text="    let polkaAPI = require(&quot;@polkadot/api&quot;)&#xD;&#xA;    let key = require(&quot;@polkadot/keyring&quot;)&#xD;&#xA;    let Key1 = new key.Keyring( { type:'sr25519'})&#xD;&#xA;    let UserKey = Key1.addFromMnemonic(&quot;mneomics keys &quot;)&#xD;&#xA;    let polkaProvider = new polkaAPI.WsProvider(&quot;wss://rococo-contracts-rpc.polkadot.io/&quot; )&#xD;&#xA;    let PAPI = await polkaAPI.ApiPromise.create( { provider : polkaProvider } )&#xD;&#xA;    let nonce = await PAPI.query.system.account(UserKey.address)&#xD;&#xA;    let bal = await PAPI.query.balances.account(UserKey.address)&#xD;&#xA;    INC_CON = new PCON.ContractPromise(PAPI , inc_meta, &quot;5DVAK9xZSEiJzWCdZGNkUjWVuXHJEgtZDgELiqYZEKwaHz2m&quot;);&#xD;&#xA;    let x = await &#xD;&#xA;    INC_CON.query.get( UserKey.address , { gasLimit : gl  } )&#xD;&#xA;    x.result.toHuman()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When i run this code on polkadot js it give following errors &#xD;&#xA;&#xD;&#xA;    { Err: { Module: { index: '40', error: '0x02000000' } } }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26298" PostHistoryTypeId="1" PostId="6873" RevisionGUID="9924d593-d736-4846-852c-5b65d629bb72" CreationDate="2023-01-24T20:11:08.790" UserId="3383" Text="Get request error using polkadotjs" ContentLicense="CC BY-SA 4.0" />
  <row Id="26299" PostHistoryTypeId="3" PostId="6873" RevisionGUID="9924d593-d736-4846-852c-5b65d629bb72" CreationDate="2023-01-24T20:11:08.790" UserId="3383" Text="|pallet|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26300" PostHistoryTypeId="2" PostId="6874" RevisionGUID="3177725a-5e56-4d17-8bbb-a5c2e5cfd6da" CreationDate="2023-01-24T20:24:34.110" UserId="304" Text="```#[scale_info(skip_type_params(T))]``` annotating the struct worked for me." ContentLicense="CC BY-SA 4.0" />
  <row Id="26302" PostHistoryTypeId="2" PostId="6875" RevisionGUID="17da0c87-4446-45a6-8927-fd4bfa88fd02" CreationDate="2023-01-24T20:41:03.847" UserId="2065" Text="We have started implementing a precompile for our NFT pallet but when I try testing it locally using Remix IDE when calling all of its actions I always get the following message:&#xD;&#xA;&#xD;&#xA;    Internal JSON-RPC error.&#xD;&#xA;    {&#xD;&#xA;    &quot;code&quot;: -32603,&#xD;&#xA;    &quot;message&quot;: &quot;VM Exception while processing transaction: revert&quot;,&#xD;&#xA;    &quot;data&quot;: &quot;0x756e6b6e6f776e2073656c6563746f72&quot;&#xD;&#xA;    }&#xD;&#xA;with a different data parameter for each extrinsic. I am testing it using the latest MetaMask extension version and also tried to adjust the **gas limit** and **wei value** parameters but still get the same error. Any guidance on how to fix it? &#xD;&#xA;&#xD;&#xA;P.S. You can find the precompile code [here][1] and the solidity interface contract [here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chexware/Bit-Country-Blockchain/tree/feature/nft-pallet-precompile&#xD;&#xA;  [2]: https://github.com/chexware/Bit-Country-Blockchain/blob/feature/nft-pallet-precompile/pallets/nft/NFTInterface.sol" ContentLicense="CC BY-SA 4.0" />
  <row Id="26304" PostHistoryTypeId="1" PostId="6875" RevisionGUID="17da0c87-4446-45a6-8927-fd4bfa88fd02" CreationDate="2023-01-24T20:41:03.847" UserId="2065" Text="EVM precompile actions always return error when call" ContentLicense="CC BY-SA 4.0" />
  <row Id="26305" PostHistoryTypeId="3" PostId="6875" RevisionGUID="17da0c87-4446-45a6-8927-fd4bfa88fd02" CreationDate="2023-01-24T20:41:03.847" UserId="2065" Text="|evm|frontier|precompile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26306" PostHistoryTypeId="4" PostId="6875" RevisionGUID="013774ed-17c6-4808-886d-cf20e0857622" CreationDate="2023-01-24T21:21:40.920" UserId="2065" Comment="edited title" Text="EVM precompile actions always returns error code -32603 when called" ContentLicense="CC BY-SA 4.0" />
  <row Id="26307" PostHistoryTypeId="5" PostId="47" RevisionGUID="58d149a8-433b-4557-b5d3-902ad024a92d" CreationDate="2023-01-25T01:15:01.667" UserId="116" Comment="added 606 characters in body" Text="In `node/src/chain_spec.rs` you will find the functions `local_testnet_config`&#xD;&#xA; and `development_config` which contains lines like these&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				wasm_binary,&#xD;&#xA;				// Initial PoA authorities&#xD;&#xA;				vec![authority_keys_from_seed(&quot;Alice&quot;), authority_keys_from_seed(&quot;Bob&quot;)],&#xD;&#xA;				// Sudo account&#xD;&#xA;				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;				// Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;				],&#xD;&#xA;				true,&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;&#xD;&#xA;Modify this file to create the preseeded and sudo keys you want to use&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;To get the private keys for //Alice and //Bob it is possible to use `subkey` command&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subkey inspect //Alice&#xD;&#xA;```&#xD;&#xA;and it returns:&#xD;&#xA;```&#xD;&#xA;Secret Key URI `//Alice` is account:&#xD;&#xA;  Secret seed:       0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a&#xD;&#xA;  Public key (hex):  0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  Public key (SS58): 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;  Account ID:        0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  SS58 Address:      5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26308" PostHistoryTypeId="2" PostId="6876" RevisionGUID="89d01585-0737-4d88-965e-078e3c1d3a5f" CreationDate="2023-01-25T02:37:51.743" UserId="272" Text="In the substrate node runtime, I can see this :&#xD;&#xA;```rust&#xD;&#xA;pub type AccountId = &lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;&#xD;&#xA;```&#xD;&#xA;where `Signature` is just this: &#xD;&#xA;```rust&#xD;&#xA;pub enum MultiSignature {&#xD;&#xA;	/// An Ed25519 signature.&#xD;&#xA;	Ed25519(ed25519::Signature),&#xD;&#xA;	/// An Sr25519 signature.&#xD;&#xA;	Sr25519(sr25519::Signature),&#xD;&#xA;	/// An ECDSA/SECP256k1 signature.&#xD;&#xA;	Ecdsa(ecdsa::Signature),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And then in `frame_system::Config`, I would've expected the type of `AccountId` to specify this but I a bit confused to not see that happen: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;    type AccountId = AccountId;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which leads me to my question, where does one actually specify what kind of crypto keys the chain uses for standard accounts? " ContentLicense="CC BY-SA 4.0" />
  <row Id="26310" PostHistoryTypeId="1" PostId="6876" RevisionGUID="89d01585-0737-4d88-965e-078e3c1d3a5f" CreationDate="2023-01-25T02:37:51.743" UserId="272" Text="Where does AccountId get instantiated with its concrete form?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26311" PostHistoryTypeId="3" PostId="6876" RevisionGUID="89d01585-0737-4d88-965e-078e3c1d3a5f" CreationDate="2023-01-25T02:37:51.743" UserId="272" Text="|account|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26312" PostHistoryTypeId="2" PostId="6877" RevisionGUID="4ad365ff-36bd-4767-95a6-b334a03eb76e" CreationDate="2023-01-25T03:47:46.707" UserId="3344" Text="How do we stake token TA (minted on one relay chain, say RA) on another relay chain, say RB, such that RB can slash TA?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26314" PostHistoryTypeId="1" PostId="6877" RevisionGUID="4ad365ff-36bd-4767-95a6-b334a03eb76e" CreationDate="2023-01-25T03:47:46.707" UserId="3344" Text="Staking &amp; slashing between Relay Chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="26315" PostHistoryTypeId="3" PostId="6877" RevisionGUID="4ad365ff-36bd-4767-95a6-b334a03eb76e" CreationDate="2023-01-25T03:47:46.707" UserId="3344" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26316" PostHistoryTypeId="2" PostId="6878" RevisionGUID="92486926-97d1-4ba2-90ba-2b0e18b1c785" CreationDate="2023-01-25T05:10:13.757" UserId="3214" Text="One chain would have to give authority to do so to the other.&#xD;&#xA;&#xD;&#xA;They would be exchanging messages and have a way to make sure that they are really getting the message from the other chain. Since they would be under different security umbrellas, you would need a mechanism like light clients to verify the information from the other chain.&#xD;&#xA;&#xD;&#xA;If you want to dig deeper into this topic, you might want to take a look at BridgeHub, which is currently being developed and will also connect Polkadot and Kusama." ContentLicense="CC BY-SA 4.0" />
  <row Id="26318" PostHistoryTypeId="2" PostId="6879" RevisionGUID="2fd5564d-eaa0-4c45-8da3-c3b61f7a80a9" CreationDate="2023-01-25T05:27:12.450" UserId="3281" Text="        #[ink(message)]&#xD;&#xA;        pub fn test_cross_contract_call(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            calls_count: u64,&#xD;&#xA;        ) {&#xD;&#xA;            let selector: Selector = Selector::new([0x6b, 0x25, 0xcb, 0x19]);&#xD;&#xA;            let response: Result&lt;u64&gt; = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                    .call_type(&#xD;&#xA;                        Call::new()&#xD;&#xA;                            .callee(self.env().account_id())&#xD;&#xA;                            .transferred_value(0)&#xD;&#xA;                            .gas_limit(50000),&#xD;&#xA;                    )&#xD;&#xA;                    .call_flags(ink::env::CallFlags::default().set_allow_reentry(true))&#xD;&#xA;                    .exec_input(&#xD;&#xA;                        ExecutionInput::new(selector)&#xD;&#xA;                            .push_arg(calls_count)&#xD;&#xA;                    )&#xD;&#xA;                    .returns::&lt;u64&gt;()&#xD;&#xA;                    .fire();&#xD;&#xA;            self.value = response.unwrap();&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message, selector = 0x6b25cb19)]&#xD;&#xA;        pub fn dummy_function(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            value: u64,&#xD;&#xA;        ) -&gt; u64 {&#xD;&#xA;            return 45 * value;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;This is my contract code snippet. I am trying to test cross-contract call with simplest computation. But I am getting `Contracts.ContractTrapped` error. I also updated the `dummy_fuction` selector to &quot;_&quot; to check if i was passing wrong selector. But then also I am getting the same error.&#xD;&#xA;DO we have some examples on how to call cross contract calls to self or other contract?&#xD;&#xA;And Can someone explain what wrong i am doing in my code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26320" PostHistoryTypeId="1" PostId="6879" RevisionGUID="2fd5564d-eaa0-4c45-8da3-c3b61f7a80a9" CreationDate="2023-01-25T05:27:12.450" UserId="3281" Text="Cross-Contract execution in Ink contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="26321" PostHistoryTypeId="3" PostId="6879" RevisionGUID="2fd5564d-eaa0-4c45-8da3-c3b61f7a80a9" CreationDate="2023-01-25T05:27:12.450" UserId="3281" Text="|ink|smart-contract|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26322" PostHistoryTypeId="2" PostId="6880" RevisionGUID="f51befb3-d127-4f69-8e4c-01c54e0891af" CreationDate="2023-01-25T06:17:31.730" UserId="2844" Text="Instead of cross contract calling, what you are doing here is `Reentrancy guard` which is the process to prevent specific type of attack (i.e reentrancy attack where attacker can repeatedly call function without expected condition met) whereas `cross contract calling` is the process of interacting with other smart contract.&#xD;&#xA;&#xD;&#xA;In order to do cross contract call you can [view this offical doc tutorial](https://use.ink/4.0.0-alpha.1/basics/cross-contract-calling) and [this repo](https://github.com/123oli/ink-cross-contract-calling). There is [delegator example](https://github.com/paritytech/ink/tree/master/examples/delegator) code which is advance concept for corss contract calling." ContentLicense="CC BY-SA 4.0" />
  <row Id="26325" PostHistoryTypeId="2" PostId="6881" RevisionGUID="44b77e2c-567e-411a-8362-a17a78710ccc" CreationDate="2023-01-25T07:32:06.603" UserId="3711" Text="```&#xD;&#xA;cargo install cargo-contract --version 2.0.0-rc&#xD;&#xA;```&#xD;&#xA;The above command will install v2 of cargo contract. This includes ink v4 which has renamed the `ink_lang` module to `ink`. Thus using `cargo-contract` before v2 results in the `ink_lang` not found error. Other changes have also been made for ink v4, such as `ink_env` becoming `ink::env`, so you will need to make the corresponding changes throughout your contract. [Here's a link to the cargo-contract v2 release.](https://github.com/paritytech/cargo-contract/releases/tag/v2.0.0-rc) And [here's a link to ink v4's release, which lists the breaking changes.](https://github.com/paritytech/ink/releases)" ContentLicense="CC BY-SA 4.0" />
  <row Id="26327" PostHistoryTypeId="5" PostId="6842" RevisionGUID="2d073843-61c2-4464-8151-08b1e35df401" CreationDate="2023-01-25T10:51:35.680" UserId="116" Comment="Spellcheck and language" Text="I'm working with cactus interoperability and now I need to implement a plugin for cactus using substrate based blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="26328" PostHistoryTypeId="24" PostId="6842" RevisionGUID="2d073843-61c2-4464-8151-08b1e35df401" CreationDate="2023-01-25T10:51:35.680" Comment="Proposed by 116 approved by 34 edit id of 371" ContentLicense="CC BY-SA 4.0" />
  <row Id="26329" PostHistoryTypeId="5" PostId="6857" RevisionGUID="45e2ebb0-2e79-48df-93e4-ad27a6fa071d" CreationDate="2023-01-25T10:51:46.800" UserId="2025" Comment="fix grammar and formulation" Text="As described, I would like to construct a listener to be alerted when a new referenda has just started. Currently, I am using mostly Subscan API.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="26330" PostHistoryTypeId="4" PostId="6857" RevisionGUID="45e2ebb0-2e79-48df-93e4-ad27a6fa071d" CreationDate="2023-01-25T10:51:46.800" UserId="2025" Comment="fix grammar and formulation" Text="Which event or index should I listen in order to get a new referenda in &quot;started&quot; (open to vote) status?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26331" PostHistoryTypeId="24" PostId="6857" RevisionGUID="45e2ebb0-2e79-48df-93e4-ad27a6fa071d" CreationDate="2023-01-25T10:51:46.800" Comment="Proposed by 2025 approved by 34 edit id of 374" ContentLicense="CC BY-SA 4.0" />
  <row Id="26332" PostHistoryTypeId="5" PostId="6864" RevisionGUID="d53ec434-d098-43d3-b083-1680c3dc1dd1" CreationDate="2023-01-25T10:52:02.760" UserId="83" Comment="transaction spam specifically" Text="Refer to transaction spam mentioned in the Substrate documentation https://docs.substrate.io/fundamentals/transaction-types/" ContentLicense="CC BY-SA 4.0" />
  <row Id="26333" PostHistoryTypeId="24" PostId="6864" RevisionGUID="d53ec434-d098-43d3-b083-1680c3dc1dd1" CreationDate="2023-01-25T10:52:02.760" Comment="Proposed by 83 approved by 34 edit id of 373" ContentLicense="CC BY-SA 4.0" />
  <row Id="26334" PostHistoryTypeId="5" PostId="6865" RevisionGUID="82cf6085-ccca-4576-80a0-03691b8b351a" CreationDate="2023-01-25T10:52:13.823" UserId="83" Comment="transaction spam specifically" Text="Questions about transaction spam, related to but not limited to unsigned transactions where there is no economic deterrent to prevent spam, or signed transactions where the economic deterrent of having to pay a transaction fee may be circumvented in order to spam the blockchain network." ContentLicense="CC BY-SA 4.0" />
  <row Id="26335" PostHistoryTypeId="24" PostId="6865" RevisionGUID="82cf6085-ccca-4576-80a0-03691b8b351a" CreationDate="2023-01-25T10:52:13.823" Comment="Proposed by 83 approved by 34 edit id of 372" ContentLicense="CC BY-SA 4.0" />
  <row Id="26337" PostHistoryTypeId="2" PostId="6882" RevisionGUID="9ad57724-7319-4cc5-9cba-cfe8714902fc" CreationDate="2023-01-25T11:03:43.117" UserId="371" Text="I could find the JS code to deploy an ink contract [here](https://polkadot.js.org/docs/api-contract/start/code). The code however, seems to be using a fixed gas limit to deploy the contract. &#xD;&#xA;&#xD;&#xA;Is there a way to estimate the gas limit that is required to deploy the contract before actually deploying it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26339" PostHistoryTypeId="1" PostId="6882" RevisionGUID="9ad57724-7319-4cc5-9cba-cfe8714902fc" CreationDate="2023-01-25T11:03:43.117" UserId="371" Text="How to estimate gas limit required for ink contract deployment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26340" PostHistoryTypeId="3" PostId="6882" RevisionGUID="9ad57724-7319-4cc5-9cba-cfe8714902fc" CreationDate="2023-01-25T11:03:43.117" UserId="371" Text="|ink|pallet-contracts|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26341" PostHistoryTypeId="2" PostId="6883" RevisionGUID="5f10a0a4-34f8-4515-9af3-18cb3a45fa4e" CreationDate="2023-01-25T11:25:30.300" UserId="3747" Text="I'm setting up a local testnet with multiple nodes and would like to know if there is a way to premine DOT without using the UI&#xD;&#xA;Here is a copy of my docker-compose from following the steps on https://github.com/paritytech/polkadot&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;version: '2'&#xD;&#xA;&#xD;&#xA;services:&#xD;&#xA;  polkadot:&#xD;&#xA;    container_name: polkadot&#xD;&#xA;    image: parity/polkadot&#xD;&#xA;    # volumes:&#xD;&#xA;    #   - /my/local/folder:/polkadot&#xD;&#xA;    command: [&#xD;&#xA;      # &quot;--name&quot;, &quot;PolkaDocker&quot;,&#xD;&#xA;      # &quot;--ws-external&quot;,&#xD;&#xA;      # &quot;--rpc-external&quot;, #must need&#xD;&#xA;      # &quot;--rpc-cors&quot;, &quot;all&quot;&#xD;&#xA;      &quot;--chain=polkadot-local&quot;,&#xD;&#xA;      &quot;--alice&quot;, &quot;-d&quot;, &quot;/tmp/alice&quot;,&#xD;&#xA;      &quot;--node-key&quot;, &quot;0000000000000000000000000000000000000000000000000000000000000002&quot;&#xD;&#xA;    ]&#xD;&#xA;    networks:&#xD;&#xA;      polkadotnw:&#xD;&#xA;        ipv4_address: 10.0.0.10&#xD;&#xA;  polkadot2:&#xD;&#xA;    container_name: polkadot2&#xD;&#xA;    image: parity/polkadot&#xD;&#xA;    # volumes:&#xD;&#xA;    #   - /my/local/folder:/polkadot&#xD;&#xA;    command: [&#xD;&#xA;      # &quot;--name&quot;, &quot;PolkaDocker&quot;,&#xD;&#xA;      # &quot;--ws-external&quot;,&#xD;&#xA;      # &quot;--rpc-external&quot;,&#xD;&#xA;      # &quot;--rpc-cors&quot;, &quot;all&quot;&#xD;&#xA;      &quot;--chain=polkadot-local&quot;, &#xD;&#xA;      &quot;--bob&quot;, &quot;-d&quot;, &quot;/tmp/bob&quot;, &#xD;&#xA;      &quot;--bootnodes&quot;, &quot;/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWHdiAxVd8uMQR1hGWXccidmfCwLqcMpGwR6QcTP6QRMuD&quot;&#xD;&#xA;    ]&#xD;&#xA;    networks:&#xD;&#xA;      polkadotnw:&#xD;&#xA;        ipv4_address: 10.0.0.20&#xD;&#xA;    depends_on:&#xD;&#xA;      - polkadot&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;networks:&#xD;&#xA;  polkadotnw:&#xD;&#xA;    driver: bridge&#xD;&#xA;    ipam:&#xD;&#xA;      config:&#xD;&#xA;        - subnet: 10.0.0.0/24&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26343" PostHistoryTypeId="1" PostId="6883" RevisionGUID="5f10a0a4-34f8-4515-9af3-18cb3a45fa4e" CreationDate="2023-01-25T11:25:30.300" UserId="3747" Text="How to premine DOT on a local private network (local devnet)" ContentLicense="CC BY-SA 4.0" />
  <row Id="26344" PostHistoryTypeId="3" PostId="6883" RevisionGUID="5f10a0a4-34f8-4515-9af3-18cb3a45fa4e" CreationDate="2023-01-25T11:25:30.300" UserId="3747" Text="|polkadot|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26345" PostHistoryTypeId="2" PostId="6884" RevisionGUID="915da33d-6b3b-4c03-9456-1b46bae76b35" CreationDate="2023-01-25T11:33:26.273" UserId="2762" Text="With PolkadotJS you can be listening the events as it is explained [here in the docs][1]:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  const wsProvider = new WsProvider('ws://127.0.0.1:9900');&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;  // Subscribe to system events via storage&#xD;&#xA;  api.query.system.events((events) =&gt; {&#xD;&#xA;    console.log(`\nReceived ${events.length} events:`);&#xD;&#xA;&#xD;&#xA;    // Loop through the Vec&lt;EventRecord&gt;&#xD;&#xA;    events.forEach((record) =&gt; {&#xD;&#xA;      // Extract the phase, event and the event types&#xD;&#xA;      const { event, phase } = record;&#xD;&#xA;      const types = event.typeDef;&#xD;&#xA;      console.log(event.toHuman());&#xD;&#xA;    });&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch((error) =&gt; {&#xD;&#xA;  console.error(error);&#xD;&#xA;  process.exit(-1);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;When a referendum begins you query the event [Started][3]. &#xD;&#xA;&#xD;&#xA;If you want to get when a proposal is created you query the event [Proposed][2].&#xD;&#xA;&#xD;&#xA;See [here][4] all the rest of events from the Governance Pallet.&#xD;&#xA;&#xD;&#xA;The event you will get from the code above will looks like this:&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  method: 'Proposed',&#xD;&#xA;  section: 'democracy',&#xD;&#xA;  index: '0x0d00',&#xD;&#xA;  data: { proposalIndex: '2', deposit: '3,333,333,300' }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/system-events&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/22d40c761a985482f93bbbea5ba4199bdba74f8e/frame/democracy/src/lib.rs#L498&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L459&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L451" ContentLicense="CC BY-SA 4.0" />
  <row Id="26347" PostHistoryTypeId="5" PostId="6849" RevisionGUID="1ecb7406-5fdd-4fce-bb2f-6c1efdf2ada4" CreationDate="2023-01-25T12:07:42.753" UserId="2762" Comment="added 1050 characters in body" Text="To query the balance for a specific account as you said the method to be used is `getStorage` and to query all like the UI is doing is with `getKeys`.&#xD;&#xA;&#xD;&#xA;I do recommend to read this blog from Shawn: [Querying Substrate Storage via RPC][1] and use this [UI Substrate Utilities][2] tool to create the hashes and decode the result.&#xD;&#xA;&#xD;&#xA;The steps for your case would be:&#xD;&#xA;&#xD;&#xA;    util_crypto.xxhashAsHex(&quot;System&quot;, 128)&#xD;&#xA;&#xD;&#xA;    &gt; &quot;0x26aa394eea5630e07c48ae0c9558cef7&quot;&#xD;&#xA;&#xD;&#xA;    util_crypto.xxhashAsHex(&quot;Account&quot;, 128)&#xD;&#xA;&#xD;&#xA;    &gt; &quot;0xb99d880ec681799c0cf30e8886371da9&quot;&#xD;&#xA;&#xD;&#xA;And you query with the combined storage key: `0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9`&#xD;&#xA;&#xD;&#xA;    curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getKeys&quot;, &quot;params&quot;: [&quot;0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9&quot;]}' http://localhost:9933&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;On the other hand using PolkadotJS you can query the whole storage as you are doing with the option false in your image from the PolkadotJS app using `entries()`. See an example below:&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('ws://127.0.0.1:9944');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const allEntries = await api.query.system.account.entries();&#xD;&#xA;    allEntries.forEach(([{ args: [accountId] }, balance]) =&gt; {&#xD;&#xA;        console.log(`${accountId}: Balance: ${JSON.stringify(balance.toHuman())}`);&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc/&#xD;&#xA;  [2]: https://www.shawntabrizi.com/substrate-js-utilities/" ContentLicense="CC BY-SA 4.0" />
  <row Id="26348" PostHistoryTypeId="2" PostId="6885" RevisionGUID="5699a627-b31e-483d-a91c-c26da0fa04d2" CreationDate="2023-01-25T12:11:45.033" UserId="3317" Text="From a runtime configured as you described above; this is determined offchain when an account is created. So you can choose to make an account from one of the signature schemes you can see in `Multisignature`&#xD;&#xA;&#xD;&#xA;This is one functionality a wallet provider offers for example. Substrate provides [subkey][1] ([code)][2] and if you run:&#xD;&#xA;&gt;cargo +nightly build --package subkey --release&#xD;&#xA;&#xD;&#xA;&gt;./target/release/subkey generate --help&#xD;&#xA;&#xD;&#xA;You can see the possibility for using the different signature schemes:&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/command-line-tools/subkey/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/bin/utils/subkey&#xD;&#xA;  [3]: https://i.stack.imgur.com/Vf27m.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26350" PostHistoryTypeId="5" PostId="6885" RevisionGUID="ba109276-730c-4499-9324-edccb930f861" CreationDate="2023-01-25T12:21:42.240" UserId="3317" Comment="deleted 50 characters in body" Text="This is determined offchain when an account is created. So you can choose to make an account from one of the signature schemes you can see in `Multisignature`&#xD;&#xA;&#xD;&#xA;This is one functionality a wallet provider offers for example. Substrate provides [subkey][1] ([code)][2] and if you run:&#xD;&#xA;&gt;cargo +nightly build --package subkey --release&#xD;&#xA;&#xD;&#xA;&gt;./target/release/subkey generate --help&#xD;&#xA;&#xD;&#xA;You can see the possibility for using the different signature schemes:&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/command-line-tools/subkey/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/bin/utils/subkey&#xD;&#xA;  [3]: https://i.stack.imgur.com/Vf27m.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26351" PostHistoryTypeId="2" PostId="6886" RevisionGUID="b9677ed9-b922-4a1e-9ed6-bcd123045425" CreationDate="2023-01-25T12:35:51.050" UserId="2844" Text="Contract deployment gas depends on several factors like contract size, functions, variables, external calls or contract interactions. So gas estimation is complex task. However, you can estimate gas through test deployment in test network by increasing limit until successfully deployed, with this you can estimate gas, but how effective is this I don't know. gasLimit defined on that code is max limit not fixed one." ContentLicense="CC BY-SA 4.0" />
  <row Id="26359" PostHistoryTypeId="2" PostId="6888" RevisionGUID="c3912cc2-45ad-4ba4-b7f5-d32155f5b734" CreationDate="2023-01-25T14:18:50.547" UserId="3748" Text="I am just starting with wasm and ink.&#xD;&#xA;&#xD;&#xA;I have installed the following dependency:&#xD;&#xA;&#xD;&#xA;`npm install -g @astar-network/swanky-cli`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am trying to compile the contract flipper and I get the following warnings and error:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;swanky contract compile flipper&#xD;&#xA;@polkadot/util-crypto has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 10.2.1      node_modules\@astar-network\swanky-cli\node_modules\@astar-network\swanky-core\node_modules\@polkadot\util-crypto\cjs&#xD;&#xA;        cjs 10.2.1      node_modules\@astar-network\swanky-cli\node_modules\@polkadot\keyring\node_modules\@polkadot\util-crypto\cjs&#xD;&#xA;@polkadot/util has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 10.2.1      node_modules\@astar-network\swanky-cli\node_modules\@polkadot\util\cjs&#xD;&#xA;        cjs 10.2.6      node_modules\@astar-network\swanky-cli\node_modules\@polkadot\util-crypto\node_modules\@polkadot\util\cjs&#xD;&#xA;@polkadot/util-crypto has multiple versions, ensure that there is only one installed.&#xD;&#xA;Either remove and explicitly install matching versions or dedupe using your package manager.&#xD;&#xA;The following conflicting packages were found:&#xD;&#xA;        cjs 10.2.1      node_modules\@astar-network\swanky-cli\node_modules\@astar-network\swanky-core\node_modules\@polkadot\util-crypto\cjs&#xD;&#xA;        cjs 10.2.1      node_modules\@astar-network\swanky-cli\node_modules\@polkadot\keyring\node_modules\@polkadot\util-crypto\cjs&#xD;&#xA;        cjs 10.2.6      node_modules\@astar-network\swanky-cli\node_modules\@polkadot\util-crypto\cjs&#xD;&#xA;✖ Error Compiling contract&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How do I fix the warnings and the error?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26361" PostHistoryTypeId="1" PostId="6888" RevisionGUID="c3912cc2-45ad-4ba4-b7f5-d32155f5b734" CreationDate="2023-01-25T14:18:50.547" UserId="3748" Text="Error Compling Contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="26362" PostHistoryTypeId="3" PostId="6888" RevisionGUID="c3912cc2-45ad-4ba4-b7f5-d32155f5b734" CreationDate="2023-01-25T14:18:50.547" UserId="3748" Text="|ink|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26363" PostHistoryTypeId="2" PostId="6889" RevisionGUID="826e2156-17f0-4888-9174-f3ac344338c9" CreationDate="2023-01-25T14:20:14.657" UserId="396" Text="I am trying to identify all the possible entry points that an extrinsic can reach the node.&#xD;&#xA;From my understanding so far the following rpc endpoints are the only ones that can add transactions to the node and the memory pool:&#xD;&#xA; - submitExtrinsic&#xD;&#xA; - submitAndWatchExtrinsic&#xD;&#xA;&#xD;&#xA;That is ignoring transactions that have been imported by other nodes.&#xD;&#xA;You can submit extrinsic either through a connection with the http interface (rpc-port) or the ws interface (ws-port). The API endpoints provided by the polkadot js library, such as api.query, api.tx or api.derive just wrap RPC calls.&#xD;&#xA;&#xD;&#xA;From v0.9.35 and newer, the two ways are merged on a single port.&#xD;&#xA;&#xD;&#xA;I haven't fully followed the path of frame_system::offchain::SubmitTransaction, but is it safe to assume it follows the same journey through the same RPC calls?&#xD;&#xA;Are there any other entrypoints that an extrinsic might get submitted to a node?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26365" PostHistoryTypeId="1" PostId="6889" RevisionGUID="826e2156-17f0-4888-9174-f3ac344338c9" CreationDate="2023-01-25T14:20:14.657" UserId="396" Text="RPC apis &amp; node entry-points" ContentLicense="CC BY-SA 4.0" />
  <row Id="26366" PostHistoryTypeId="3" PostId="6889" RevisionGUID="826e2156-17f0-4888-9174-f3ac344338c9" CreationDate="2023-01-25T14:20:14.657" UserId="396" Text="|rpc|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26367" PostHistoryTypeId="2" PostId="6890" RevisionGUID="20032358-c385-4df4-b885-8a65d60cb300" CreationDate="2023-01-25T14:25:44.337" UserId="3442" Text="I created my own Pallet to save Student certificates, then I am reading the Storage to retrieve the certificates that I have stored in BC using Plokadot.js&#xD;&#xA;&#xD;&#xA;Now the question is: How I can get the transaction hash for each certificate that has been stored in Storage.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26369" PostHistoryTypeId="1" PostId="6890" RevisionGUID="20032358-c385-4df4-b885-8a65d60cb300" CreationDate="2023-01-25T14:25:44.337" UserId="3442" Text="How to get transaction hash from Storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26370" PostHistoryTypeId="3" PostId="6890" RevisionGUID="20032358-c385-4df4-b885-8a65d60cb300" CreationDate="2023-01-25T14:25:44.337" UserId="3442" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26371" PostHistoryTypeId="2" PostId="6891" RevisionGUID="187e942d-0e6c-4832-b873-cfeae26c5590" CreationDate="2023-01-25T14:35:15.510" UserId="380" Text="From the link you provided:&#xD;&#xA;&#xD;&#xA;&gt; Getting **accurate gas and storage deposit costs is possible by calling the instantiate RPC**, which dry runs the instantiation and returns the outcome. For the scope of this tutorial we will use hardcoded values." ContentLicense="CC BY-SA 4.0" />
  <row Id="26373" PostHistoryTypeId="2" PostId="6892" RevisionGUID="c47facf4-fb58-4a5f-bd69-a88ed3aba877" CreationDate="2023-01-25T14:54:17.487" UserId="16" Text="&gt; I wonder if you should charge weight before any call to the pallet:&#xD;&#xA;&#xD;&#xA;You need to charge manually as demonstrated in your example. It is only automatically charged when the `Call` is included in an extrinsic and send to the chain.&#xD;&#xA;&#xD;&#xA;&gt; Also as chain-extension exposes a call function that can dispatch&#xD;&#xA;&gt; different pallet calls, how to ensure proper weight is handled to not&#xD;&#xA;&gt; excess max block weight ? basically the equivalent of&#xD;&#xA;&gt; #[pallet::weight(T::WeightInfo::extrinsic())] for pallets.&#xD;&#xA;&#xD;&#xA;You can have a look at the (unstable) [`call_runtime`][1] API in `pallet-contracts` which does exactly this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn call_runtime(&#xD;&#xA;	ctx: _,&#xD;&#xA;	memory: _,&#xD;&#xA;	call_ptr: u32,&#xD;&#xA;	call_len: u32,&#xD;&#xA;) -&gt; Result&lt;ReturnCode, TrapReason&gt; {&#xD;&#xA;	use frame_support::dispatch::{extract_actual_weight, GetDispatchInfo};&#xD;&#xA;	ctx.charge_gas(RuntimeCosts::CopyFromContract(call_len))?;&#xD;&#xA;	let call: &lt;E::T as Config&gt;::RuntimeCall =&#xD;&#xA;		ctx.read_sandbox_memory_as_unbounded(memory, call_ptr, call_len)?;&#xD;&#xA;	let dispatch_info = call.get_dispatch_info();&#xD;&#xA;	let charged = ctx.charge_gas(RuntimeCosts::CallRuntime(dispatch_info.weight))?;&#xD;&#xA;	let result = ctx.ext.call_runtime(call);&#xD;&#xA;	let actual_weight = extract_actual_weight(&amp;result, &amp;dispatch_info);&#xD;&#xA;	ctx.adjust_gas(charged, RuntimeCosts::CallRuntime(actual_weight));&#xD;&#xA;	match result {&#xD;&#xA;		Ok(_) =&gt; Ok(ReturnCode::Success),&#xD;&#xA;		Err(_) =&gt; Ok(ReturnCode::CallRuntimeReturnedError),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/1a1600b827020cae62c9b856cb9ba4b823ab080a/frame/contracts/src/wasm/runtime.rs#L2397-L2450" ContentLicense="CC BY-SA 4.0" />
  <row Id="26375" PostHistoryTypeId="2" PostId="6893" RevisionGUID="d01311dc-468e-4064-b3bb-1127c9fc05a6" CreationDate="2023-01-25T14:55:31.483" UserId="380" Text="I receive a the same error when running similar code with my own abi JSON. The error decodes to `contracts.OutOfGas`, which is from the [substrate contracts pallet](https://github.com/paritytech/substrate/blob/1a1600b827020cae62c9b856cb9ba4b823ab080a/frame/contracts/src/lib.rs#L866). Note `0x02` probably corresponds to the index of the error.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { Abi, ContractPromise } from '@polkadot/api-contract'&#xD;&#xA;import { ApiPromise } from '@polkadot/api'&#xD;&#xA;import { Keyring } from '@polkadot/keyring'&#xD;&#xA;import { WsProvider } from '@polkadot/rpc-provider'&#xD;&#xA;import abiJson from 'abi.json'&#xD;&#xA;import { cryptoWaitReady } from '@polkadot/util-crypto'&#xD;&#xA;import { DispatchError, WeightV2 } from '@polkadot/types/interfaces'&#xD;&#xA;&#xD;&#xA;async function getUserBalance() {&#xD;&#xA;    const abi = new Abi(abiJson)&#xD;&#xA;    await cryptoWaitReady()&#xD;&#xA;    const Key1 = new Keyring({ type: 'sr25519' })&#xD;&#xA;    const UserKey = Key1.addFromMnemonic(&#xD;&#xA;        '...'&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;    const polkaProvider = new WsProvider('wss://rococo-contracts-rpc.polkadot.io/')&#xD;&#xA;    const api = await ApiPromise.create({ provider: polkaProvider })&#xD;&#xA;    // @ts-ignore&#xD;&#xA;    const maximumBlockWeight = api.consts.system.blockWeights.maxBlock as unknown as WeightV2&#xD;&#xA;    const maxGas = maximumBlockWeight.refTime.toNumber() * 0.9&#xD;&#xA;    // const gl = api.registry.createType('WeightV2', {&#xD;&#xA;    //     refTime: maxGas,&#xD;&#xA;    //     proofSize: maxGas,&#xD;&#xA;    // }) as WeightV2&#xD;&#xA;    const gl = 2000000000000&#xD;&#xA;&#xD;&#xA;    const contract = new ContractPromise(api, abi, '5DVAK9xZSEiJzWCdZGNkUjWVuXHJEgtZDgELiqYZEKwaHz2m')&#xD;&#xA;    const response = await contract.query.getProviderStakeDefault(UserKey.address, { gasLimit: gl })&#xD;&#xA;    return response.result&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;export function getDispatchError(dispatchError: DispatchError): string {&#xD;&#xA;    let message: string = dispatchError.type&#xD;&#xA;&#xD;&#xA;    if (dispatchError.isModule) {&#xD;&#xA;        try {&#xD;&#xA;            const mod = dispatchError.asModule&#xD;&#xA;            const error = dispatchError.registry.findMetaError(mod)&#xD;&#xA;&#xD;&#xA;            message = `${error.section}.${error.name}`&#xD;&#xA;        } catch (error) {&#xD;&#xA;            // swallow&#xD;&#xA;        }&#xD;&#xA;    } else if (dispatchError.isToken) {&#xD;&#xA;        message = `${dispatchError.type}.${dispatchError.asToken.type}`&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    return message&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;getUserBalance().then((x) =&gt; {&#xD;&#xA;    console.log(getDispatchError(x.asErr))&#xD;&#xA;    process.exit()&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can try to use the commented out code to change the gas limit into a `WeightV2` and see if that works. Is your contract deployed on the rococo contracts parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26377" PostHistoryTypeId="2" PostId="6894" RevisionGUID="572d86e6-293b-47f6-9d74-66649cddba88" CreationDate="2023-01-25T14:56:18.800" UserId="2762" Text="To understand the error and get a nice message from this error when you only have the index and error, we have to take a look into the code of Substrate.&#xD;&#xA;&#xD;&#xA;The `index` number is the index of the pallet in the runtime from which the error originated. The `error` is likewise the index of that pallet's errors which is the exact one we're looking for. Both of these indices start counting from 0.&#xD;&#xA;&#xD;&#xA;So taking your case error `{ Err: { Module: { index: '40', error: '0x02000000' } } }` first thing we have to check is from which pallet is coming from.&#xD;&#xA;&#xD;&#xA;In your case you are connecting to `wss://rococo-contracts-rpc.polkadot.io/` which is a Substrate parachain for smart contracts deployed on Rococo, we can see the code [here][1].&#xD;&#xA;&#xD;&#xA;If we check the runtime of this parachain, we find that the pallet with the [index 40][2] is the Pallet Contracts &#xD;&#xA;&#xD;&#xA;    // Smart Contracts.&#xD;&#xA;	Contracts: pallet_contracts::{Pallet, Call, Storage, Event&lt;T&gt;} = 40,&#xD;&#xA;&#xD;&#xA;Now that we know where this error is coming from, we check the code of the [pallet Contracts][3] to find out which is the exact one we're looking for. `0x02000000` is 2 in hex which is [OutOfGas][4]:&#xD;&#xA;&#xD;&#xA;    /// The executed contract exhausted its gas limit.&#xD;&#xA;		OutOfGas,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/tree/master/parachains/runtimes/contracts/contracts-rococo&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/contracts/contracts-rococo/src/lib.rs#L359&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/master/frame/contracts&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/lib.rs#L866" ContentLicense="CC BY-SA 4.0" />
  <row Id="26379" PostHistoryTypeId="6" PostId="6888" RevisionGUID="9c228e7d-a96f-4f91-bd9a-33e38499ba7b" CreationDate="2023-01-25T15:18:30.733" UserId="3748" Comment="edited tags" Text="|ink|wasm|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26380" PostHistoryTypeId="2" PostId="6895" RevisionGUID="3dae0e9c-3f61-472b-b091-fea648611ead" CreationDate="2023-01-25T15:24:34.210" UserId="3346" Text="I have established an RPC node on a Digital Ocean droplet and configured NGINX and SSL according to the instructions at the polkadot wiki. Configurations below. Connecting on wss://koabd.rocks or wss://koabd.rocks:443 both produce the following ...  **The node accepts the incoming connection** (node output:  &quot;accepting new connection 1/100&quot;) **but the polkadot-JS screen is stuck in &quot;Waiting to establish a connection with the remote endpoint.&quot;**&#xD;&#xA;&#xD;&#xA;What am I missing? Do I need to:&#xD;&#xA;&#xD;&#xA; - set up a firewall and allow specific ports? (there are currently no firewalls in place)&#xD;&#xA; - remove the IPv6only tag from the NGINX config?&#xD;&#xA; - some other trick?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**My Node Configuration:**&#xD;&#xA;&#xD;&#xA;    ./target/release/substrate \&#xD;&#xA;    --base-path ./gropocloudmoose \&#xD;&#xA;    --chain ./GropoSpec20230115Raw.json \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9955 \&#xD;&#xA;    --rpc-port 9944 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --enable-offchain-indexing=true \&#xD;&#xA;    --ws-external \&#xD;&#xA;    --state-pruning archive \&#xD;&#xA;    --blocks-pruning archive \&#xD;&#xA;    --ws-max-connections 100 \&#xD;&#xA;    --rpc-cors all \&#xD;&#xA;    --rpc-methods Safe \&#xD;&#xA;    --name gropocloudmoose \&#xD;&#xA;    --bootnodes /ip4/127.0.0.1/tcp/30344/p2p/12D3KooWMaj8rma6fWK71hHEgXzGre2FcfCPMD39LhPBTvQyMzk6 \&#xD;&#xA;    --password-interactive&#xD;&#xA;&#xD;&#xA;**My NGINX Configuration:**&#xD;&#xA;&#xD;&#xA;    server {&#xD;&#xA;    &#xD;&#xA;        server_name koabd.rocks www.koabd.rocks;&#xD;&#xA;    &#xD;&#xA;        location / {&#xD;&#xA;            proxy_buffers 16 4k;&#xD;&#xA;            proxy_buffer_size 2k;&#xD;&#xA;            proxy_http_version 1.1;&#xD;&#xA;            proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;            proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;            proxy_set_header Host $host;&#xD;&#xA;            proxy_pass http://localhost:9955;&#xD;&#xA;            include proxy_params;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        listen [::]:443 ssl ipv6only=on; # managed by Certbot&#xD;&#xA;        listen 443 ssl; # managed by Certbot&#xD;&#xA;        ssl_certificate /etc/letsencrypt/live/koabd.rocks/fullchain.pem; # managed by Certbot&#xD;&#xA;        ssl_certificate_key /etc/letsencrypt/live/koabd.rocks/privkey.pem; # managed by Certbot&#xD;&#xA;        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot&#xD;&#xA;        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    server {&#xD;&#xA;        if ($host = www.koabd.rocks) {&#xD;&#xA;            return 301 https://$host$request_uri;&#xD;&#xA;        } # managed by Certbot&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        if ($host = koabd.rocks) {&#xD;&#xA;            return 301 https://$host$request_uri;&#xD;&#xA;        } # managed by Certbot&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        listen 80;&#xD;&#xA;        listen [::]:80;&#xD;&#xA;    &#xD;&#xA;        server_name koabd.rocks www.koabd.rocks;&#xD;&#xA;        return 404; # managed by Certbot&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26382" PostHistoryTypeId="1" PostId="6895" RevisionGUID="3dae0e9c-3f61-472b-b091-fea648611ead" CreationDate="2023-01-25T15:24:34.210" UserId="3346" Text="Problem Connecting Digital Ocean RPC Node to Polkadot-JS (NGINX Configuration Problem?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="26383" PostHistoryTypeId="3" PostId="6895" RevisionGUID="3dae0e9c-3f61-472b-b091-fea648611ead" CreationDate="2023-01-25T15:24:34.210" UserId="3346" Text="|polkadot-js|nodes|nginx|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26384" PostHistoryTypeId="5" PostId="6884" RevisionGUID="2971e390-e260-40c3-951d-cd84f25d1c87" CreationDate="2023-01-25T15:40:31.053" UserId="2762" Comment="added 460 characters in body" Text="With PolkadotJS you can be listening the events as it is explained [here in the docs][1]:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  const wsProvider = new WsProvider('ws://127.0.0.1:9900');&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;  // Subscribe to system events via storage&#xD;&#xA;  api.query.system.events((events) =&gt; {&#xD;&#xA;    console.log(`\nReceived ${events.length} events:`);&#xD;&#xA;&#xD;&#xA;    // Loop through the Vec&lt;EventRecord&gt;&#xD;&#xA;    events.forEach((record) =&gt; {&#xD;&#xA;      // Extract the phase, event and the event types&#xD;&#xA;      const { event, phase } = record;&#xD;&#xA;      const types = event.typeDef;&#xD;&#xA;      console.log(event.toHuman());&#xD;&#xA;    });&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch((error) =&gt; {&#xD;&#xA;  console.error(error);&#xD;&#xA;  process.exit(-1);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;When a referendum begins you query the event [Started][2]. &#xD;&#xA;&#xD;&#xA;If you want to get when a proposal is created you query the event [Proposed][3].&#xD;&#xA;&#xD;&#xA;See [here][4] all the rest of events from the Governance Pallet.&#xD;&#xA;&#xD;&#xA;The event you will get from the code above will looks like this:&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  method: 'Proposed',&#xD;&#xA;  section: 'democracy',&#xD;&#xA;  index: '0x0d00',&#xD;&#xA;  data: { proposalIndex: '2', deposit: '3,333,333,300' }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In Kusama we have already deployed the new protocol for governance [OpenGov][5]. In this case we have to take a look in the [events form the Referenda pallet][6].&#xD;&#xA;&#xD;&#xA;For your specific question we have to query the event `DecisionStarted` that is triggered when a referendum has moved into the deciding phase.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/system-events&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L459&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/22d40c761a985482f93bbbea5ba4199bdba74f8e/frame/democracy/src/lib.rs#L498&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L451&#xD;&#xA;  [5]: https://guide.kusama.network/docs/learn-opengov&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/frame/referenda/src/lib.rs#L256" ContentLicense="CC BY-SA 4.0" />
  <row Id="26385" PostHistoryTypeId="2" PostId="6896" RevisionGUID="f35bb640-d8b0-4bd8-b221-55b95bf95201" CreationDate="2023-01-25T15:46:34.117" UserId="1876" Text="This is a warning by polkadotjs library, and shouldn't affect the compilation.&#xD;&#xA;&#xD;&#xA;To get rid of the warning, I suggest installing Swanky the recommended way, by downloading the prebuilt release from Github.&#xD;&#xA;If the warning persist, you can run it in an isolated environment, like nix shell or a dev container. (We'll soon have an official one too)&#xD;&#xA;&#xD;&#xA;To find out what is really breaking your compilation, run the `swanky contract compile` command with `-v` flag." ContentLicense="CC BY-SA 4.0" />
  <row Id="26387" PostHistoryTypeId="2" PostId="6897" RevisionGUID="fb010abc-df55-492e-9fa1-002e55a2c554" CreationDate="2023-01-25T16:19:24.460" UserId="3748" Text="Thanks for the reply. &#xD;&#xA;I do run the command: &#xD;&#xA;&gt; swanky contract compile test -v&#xD;&#xA;(test is the contract folder name). &#xD;&#xA;But I only get the error: ✖ Error Compiling contract and not more. &#xD;&#xA;&#xD;&#xA;There are two ways I try to compile a contract: &#xD;&#xA;&gt;swanky init test (create flipper template) &#xD;&#xA;&gt; swanky contract compile flipper -v &#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&gt;cargo contract new test &#xD;&#xA;&gt;swanky contract compile test -v &#xD;&#xA;for both I get the same error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26389" PostHistoryTypeId="5" PostId="6897" RevisionGUID="67be970a-c59b-4a15-acf9-fab23b90d8f4" CreationDate="2023-01-25T16:19:56.200" UserId="3748" Comment="added 10 characters in body" Text="Thanks for the reply. &#xD;&#xA;I do run the command: &#xD;&#xA;&gt; swanky contract compile test -v &#xD;&#xA;&#xD;&#xA;(test is the contract folder name). &#xD;&#xA;But I only get the error: ✖ Error Compiling contract and not more. &#xD;&#xA;&#xD;&#xA;There are two ways I try to compile a contract: &#xD;&#xA;&gt; swanky init test (create flipper template) &#xD;&#xA;&#xD;&#xA;&gt; swanky contract compile flipper -v &#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&gt;cargo contract new test &#xD;&#xA;&#xD;&#xA;&gt;swanky contract compile test -v &#xD;&#xA;&#xD;&#xA;for both I get the same error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26390" PostHistoryTypeId="5" PostId="6897" RevisionGUID="b249b99a-9b44-4aba-93fc-b1711be317b4" CreationDate="2023-01-25T16:21:46.800" UserId="3748" Comment="added 28 characters in body" Text="Thanks for the reply. I use a windows environment.&#xD;&#xA;I do run the command: &#xD;&#xA;&gt; swanky contract compile test -v &#xD;&#xA;&#xD;&#xA;(test is the contract folder name). &#xD;&#xA;But I only get the error: ✖ Error Compiling contract and not more. &#xD;&#xA;&#xD;&#xA;There are two ways I try to compile a contract: &#xD;&#xA;&gt; swanky init test (create flipper template) &#xD;&#xA;&#xD;&#xA;&gt; swanky contract compile flipper -v &#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&gt;cargo contract new test &#xD;&#xA;&#xD;&#xA;&gt;swanky contract compile test -v &#xD;&#xA;&#xD;&#xA;for both I get the same error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26391" PostHistoryTypeId="2" PostId="6898" RevisionGUID="3e9967df-9733-458f-b31e-155604886e5b" CreationDate="2023-01-25T16:37:21.023" UserId="3748" Text="Connection to https://koabd.rocks does seem to work, so the nginx on https looks like its working and there is no issue with a firewall from the internet.&#xD;&#xA;&#xD;&#xA;While accessing wss://koabd.rocks I did get an error aswell.&#xD;&#xA;&#xD;&#xA;Do you see something in the access or error log for nginx?&#xD;&#xA;&#xD;&#xA;And can you try adding &#xD;&#xA;&#xD;&#xA;&gt; ssl on;&#xD;&#xA;&#xD;&#xA;on the server block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26393" PostHistoryTypeId="50" PostId="3996" RevisionGUID="81d3ceeb-d43f-4dd4-a164-658698d021d0" CreationDate="2023-01-25T17:08:51.147" UserId="-1" />
  <row Id="26394" PostHistoryTypeId="2" PostId="6899" RevisionGUID="1c70a74a-b50c-4498-a8c2-99e99d94d76f" CreationDate="2023-01-25T18:35:06.020" UserId="2762" Text="***How to uniquely identify and monitor transactions? And can you get the unique key before actually sending the transaction to the chain?***&#xD;&#xA;&#xD;&#xA;You are right `transactionHash` is not unique, read the section [Unique Identifiers for Extrinsics][1] from the Polkadot wiki:&#xD;&#xA;&#xD;&#xA;&gt; Many infrastructure providers on existing blockchains, e.g. Ethereum, consider a transaction's hash as a unique identifier. In Substrate-based chains like Polkadot, a transaction's hash only serves as a fingerprint of the information within a transaction, and there are times when two transactions with the same hash are both valid.&#xD;&#xA;&#xD;&#xA;The correct way to uniquely identify an extrinsic on a Substrate-based chain is to use the block ID (height or hash) and the extrinsic's index.&#xD;&#xA;&#xD;&#xA;See this past question and the answer in StackExchange about [Why could we find the same transaction hash in 3 different blocks?][2] where it explains it in more detail.&#xD;&#xA;&#xD;&#xA;***Is the infrastructure I have in mind appropriate= It works very well for EVM based chains but is there is a different/better way to do things for substrate based transactions?***&#xD;&#xA;&#xD;&#xA;It makes sense to me too. However you need some extra code to see in which block your transaction has been included and construct this unique identifier for your transaction.&#xD;&#xA;&#xD;&#xA;First with a [subscription to know the hash of the block][3] and after [querying the information from the block and its extrinsics.][4]&#xD;&#xA;&#xD;&#xA;A code example would be: &#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const unsub = await api.tx.balances&#xD;&#xA;    .transfer(BOB, 100000000000)&#xD;&#xA;    .signAndSend(alice, async (result) =&gt; {&#xD;&#xA;        const extrinsicHash = result.txHash.toHuman();&#xD;&#xA;        console.log(`Extrinsic Hash is ${extrinsicHash}`);&#xD;&#xA;&#xD;&#xA;        if (result.status.isInBlock) {&#xD;&#xA;            console.log(`Transaction included at blockHash ${result.status.asInBlock}`);&#xD;&#xA;        } else if (result.status.isFinalized) {&#xD;&#xA;            console.log(`Transaction finalized at blockHash ${result.status.asFinalized}`);&#xD;&#xA;            const hashOfTheBlock = result.status.asFinalized;&#xD;&#xA;            const signedBlock = await api.rpc.chain.getBlock(hashOfTheBlock);&#xD;&#xA;            &#xD;&#xA;            signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;                const blockNumber = signedBlock.block.header.number;&#xD;&#xA;                if (extrinsicHash === ex.hash.toHex()) {&#xD;&#xA;                    &#xD;&#xA;                    const extrinsic = (`${blockNumber}-${index}`);&#xD;&#xA;                    console.log(extrinsic);&#xD;&#xA;                }&#xD;&#xA;            });&#xD;&#xA;        unsub();&#xD;&#xA;        }&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/2536/why-could-we-find-the-same-transaction-hash-in-3-different-blocks/2538#2538&#xD;&#xA;  [3]: https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-inclusion&#xD;&#xA;  [4]: https://polkadot.js.org/docs/api/cookbook/blocks/#how-do-i-view-extrinsic-information" ContentLicense="CC BY-SA 4.0" />
  <row Id="26396" PostHistoryTypeId="5" PostId="6601" RevisionGUID="bb3478e3-da0b-4e57-9f4e-9b5091ee8595" CreationDate="2023-01-25T19:28:05.603" UserId="351" Comment="As you can see for the latest update .26 for subxt, this is the issue again. And all crates are upto  date" Text="        let signer = PairSigner::&lt;PolkadotConfig,Pair&gt;::new(AccountKeyring::Alice.pair());&#xD;&#xA;This code cannot compile due to `AccountKeyring::Alice.pair()` returns `sp_core::sr25519::Pair` while `new` method accepts types  which implement `subxt::ext::sp_core::Pair` type.&#xD;&#xA;&#xD;&#xA;[![Error message][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/58lZo.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26397" PostHistoryTypeId="2" PostId="6900" RevisionGUID="cfc8b6ad-5030-4433-bbbf-9a5554726c04" CreationDate="2023-01-25T23:21:57.437" UserId="3632" Text="I'm using `fn set_lock` inside `LockableCurrency` trait. It's possible to extend or remove lock, but no way to check if funds are in fact locked. Is this by design? and if so what is a good way to check that funds are locked for a given user?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is a short code snippet:&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;// how do I make sure `who` does not have any funds locked without tracking it inside my code?&#xD;&#xA;ensure!(T::Currency::free_balance(&amp;who) &gt;= amount, &quot;Not enough funds to do X&quot;);&#xD;&#xA;T::Currency::set_lock(SOME_LOCK_ID, &amp;who, amount, WithdrawReasons::all());&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26399" PostHistoryTypeId="1" PostId="6900" RevisionGUID="cfc8b6ad-5030-4433-bbbf-9a5554726c04" CreationDate="2023-01-25T23:21:57.437" UserId="3632" Text="Check if the funds are locked for LockableCurrency" ContentLicense="CC BY-SA 4.0" />
  <row Id="26400" PostHistoryTypeId="3" PostId="6900" RevisionGUID="cfc8b6ad-5030-4433-bbbf-9a5554726c04" CreationDate="2023-01-25T23:21:57.437" UserId="3632" Text="|substrate-node-template|lockable-currency|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26401" PostHistoryTypeId="2" PostId="6901" RevisionGUID="acda73cd-3687-4de2-8396-18ab249cf924" CreationDate="2023-01-26T00:22:51.157" UserId="318" Text="I have a simple parent folder and multiple contracts inside it in a simple structure as follows:&#xD;&#xA;&#xD;&#xA;    contracts&#xD;&#xA;           |__contract1&#xD;&#xA;           |__contract2&#xD;&#xA;&#xD;&#xA;I add a root Cargo.toml file under `contracts` and with the following content:&#xD;&#xA;&#xD;&#xA;    [workspace]&#xD;&#xA;    members = [contract1, contract2]&#xD;&#xA;If I call `cargo contract build` inside contract1 and contract2 it will work with no issues. If I call `cargo build` inside the root folder `contracts`, this will also work. However this is not what we want becuase it's not creating the ink contract bundles. If I call `cargo contract build` inside the root folder, it would complain: &#xD;&#xA;&#xD;&#xA;&gt; ERROR: Cannot infer the root project id&#xD;&#xA;&#xD;&#xA;These contracts are independent and building them together is just for the sake of having a simple github workflow without the need to know which contracts we will maintain under the `contracts` folder at the github workflow level. Is this issue known? How can I fix it?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26403" PostHistoryTypeId="1" PostId="6901" RevisionGUID="acda73cd-3687-4de2-8396-18ab249cf924" CreationDate="2023-01-26T00:22:51.157" UserId="318" Text="How to build multiple ink contracts from a root folder?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26404" PostHistoryTypeId="3" PostId="6901" RevisionGUID="acda73cd-3687-4de2-8396-18ab249cf924" CreationDate="2023-01-26T00:22:51.157" UserId="318" Text="|ink|smart-contract|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26405" PostHistoryTypeId="2" PostId="6902" RevisionGUID="2e6dcf03-1f1f-494a-bb35-ce6a15e8af39" CreationDate="2023-01-26T03:19:23.267" UserId="104" Text="As you have correctly noted, assuming the `assets` parameter matches exactly what was being trapped, it is indeed a problem with the origin.&#xD;&#xA;&#xD;&#xA;I do not know what kind of operation that led to the assets being trapped, but whatever it may be, the origin of the asset claim instruction needs to be the same as the origin of the aforementioned instruction.&#xD;&#xA;&#xD;&#xA;It would seem to me from what you've written that it is not clear to you what an origin is. For example, the `Alice` account on the parachain is a completely different origin from the `Alice` account on the relay chain.&#xD;&#xA;&#xD;&#xA;Therefore, if your original operation that resulted in assets being trapped had the origin of the `Alice` account from the relay chain, then the subsequent `AssetClaim` instruction **must** also be sent from the `Alice` account from the relay chain, regardless of where the trapped assets are located, because doing so is the only way where the two origins match." ContentLicense="CC BY-SA 4.0" />
  <row Id="26407" PostHistoryTypeId="2" PostId="6903" RevisionGUID="1c1e16fd-b4d7-41fe-8873-0d0ba4f4e791" CreationDate="2023-01-26T03:30:40.163" UserId="104" Text="In XCM v3, there is the `DescendOrigin` instruction which allows you to specify a `Junction`, which will be appended at the end of the current origin. We call this the Computed Origin. The origin that sent the XCM is called the Physical Origin.&#xD;&#xA;&#xD;&#xA;To use a Web 2.0 analogy, a Computed Origin is akin to an IP address, whereas a Physical Origin is akin to a MAC address.&#xD;&#xA;&#xD;&#xA;To answer your question more specifically, you can use the `AccountId32` variant in the `Junction` enum and put it in a `DescendOrigin` instruction. That will mutate the `origin` register in the XCM executor, making sure that each subsequent XCM instruction processed afterwards would use the Computed Origin, which contains the account ID of the person who sent the XCM instruction." ContentLicense="CC BY-SA 4.0" />
  <row Id="26409" PostHistoryTypeId="5" PostId="6890" RevisionGUID="0f684744-44e0-4fcf-826f-7777ee9cb4ba" CreationDate="2023-01-26T05:53:20.673" UserId="3442" Comment="added 641 characters in body" Text="I created my own Pallet to save Student certificates, then I am reading the Storage to retrieve the certificates that I have stored in BC using Plokadot.js, this is the code for read the certificate from BC:&#xD;&#xA;&#xD;&#xA;      let cerIds = await api.query.templateModule.certificateOwned(&#xD;&#xA;        account.address&#xD;&#xA;      );&#xD;&#xA;&#xD;&#xA;      let cerDetails = await Promise.all(&#xD;&#xA;        cerIds.map(async (id) =&gt; {&#xD;&#xA;          return await api.query.templateModule.certificates(id);&#xD;&#xA;        })&#xD;&#xA;      );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the Certificate, I am storing the following data : &#xD;&#xA;&#xD;&#xA; - **Certificate ID**&#xD;&#xA; - **Student Information**&#xD;&#xA;&#xD;&#xA;*I am not storing any data related to Transaction hash.*&#xD;&#xA;&#xD;&#xA;**Now the question is:** &#xD;&#xA;&#xD;&#xA;How I can get the transaction hash for each certificate that has been stored in Storage, the purpose is I need to create URL pointing the transaction detail that can be viewed in `https://polkadot.js.org/apps/#/explorer`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26410" PostHistoryTypeId="5" PostId="6882" RevisionGUID="9564348b-2be0-47f2-9f98-bc4118c0a9a4" CreationDate="2023-01-26T06:20:19.820" UserId="371" Comment="added 324 characters in body" Text="I could find the JS code to deploy an ink contract [here](https://polkadot.js.org/docs/api-contract/start/code). The code however, seems to be using a fixed gas limit to deploy the contract. &#xD;&#xA;&#xD;&#xA;Is there a way to estimate the gas limit that is required to deploy the contract before actually deploying it?&#xD;&#xA;&#xD;&#xA;**Update:**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I managed to find the `instantiate` methods under the `contractsApi` runtime calls that would provide the gas limit and storage deposit charge for contract deployment. However, I am not sure what data I am supposed to provide for `data` and `salt` params.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eGE0P.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26411" PostHistoryTypeId="2" PostId="6904" RevisionGUID="82b76026-d3fd-4324-aa8b-e8aa8402262d" CreationDate="2023-01-26T10:48:54.303" UserId="2762" Text="I think it is a better idea to store some information about the transaction itself if you are going to query it later as you are trying to.&#xD;&#xA;&#xD;&#xA;Because otherwise you have to scan the Blockchain to try to find the extrinsic that make this storage change. You can do that using for example the Subscan API to query the [events][2] and filtering with the event your pallet emits after store the certificate or if you are not emitting events just querying the [extrinsics][1].&#xD;&#xA;&#xD;&#xA;But as I said is a better idea to store the information.&#xD;&#xA;You can store the Transaction Hash that you get after the signAndSend function if using PolkadotJS, or event better the [unique identifier of the transaction][3] which is the `block# + the extrinsic index in that block` (See [here][4] how to get it).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you don't have the control of the DApp interacting with your pallet a good option would be to get the block number inside the code of your extrinsic call in your pallet and store it:&#xD;&#xA;&#xD;&#xA;     let current_block_number = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;&#xD;&#xA;To store it you can add another field in your struct within Certificate ID, Student Information or have a separate StorageMap with accountId as key and the block number as value.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.subscan.io/#extrinsics&#xD;&#xA;  [2]: https://support.subscan.io/#events&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/2536/why-could-we-find-the-same-transaction-hash-in-3-different-blocks/2538#2538&#xD;&#xA;  [4]: https://substrate.stackexchange.com/a/6899/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="26413" PostHistoryTypeId="2" PostId="6905" RevisionGUID="ec3a836d-7980-4f3f-9e58-7ed63a81b451" CreationDate="2023-01-26T12:41:46.623" UserId="94" Text="You can change the chain-spec of you local test net [here](https://github.com/paritytech/polkadot/blob/5a43bc733024b6f2d4f1164db8991a393c8e14cb/node/service/src/chain_spec.rs#L308). The *endowed* accounts are accounts with a pre-mined balance.  &#xD;&#xA;There is an example of how to put in an AccountID in the [Westend](https://github.com/paritytech/polkadot/blob/5a43bc733024b6f2d4f1164db8991a393c8e14cb/node/service/src/chain_spec.rs#L403) chain-spec." ContentLicense="CC BY-SA 4.0" />
  <row Id="26415" PostHistoryTypeId="2" PostId="6906" RevisionGUID="12bb2d0c-5313-48ff-8848-409184f0e433" CreationDate="2023-01-26T12:45:23.637" UserId="139" Text="Often I've used the flags like `-lruntime=debug` or `-lparachain=debug` without really understanding how they work. I know that the `env_logger` crate allows you to specify which crates to emit log messages from like so: `RUST_LOG=my_app` but what about substrate/polkadot? Does it use `env_logger` or something else to enable crate level logging? Also, what significance does the string after the `-l` have? Does it specify, for instance, the crate named `parachain` in `-lparachain=debug`?  " ContentLicense="CC BY-SA 4.0" />
  <row Id="26417" PostHistoryTypeId="1" PostId="6906" RevisionGUID="12bb2d0c-5313-48ff-8848-409184f0e433" CreationDate="2023-01-26T12:45:23.637" UserId="139" Text="How is the logging CLI implemented in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26418" PostHistoryTypeId="3" PostId="6906" RevisionGUID="12bb2d0c-5313-48ff-8848-409184f0e433" CreationDate="2023-01-26T12:45:23.637" UserId="139" Text="|cli|log|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26419" PostHistoryTypeId="2" PostId="6907" RevisionGUID="4fba86d1-fb2a-46c4-ace3-c984b2c34fca" CreationDate="2023-01-26T13:02:01.813" UserId="139" Text="I've not tried out zombienet but just going over the network definition file, I do not see a parameter to specify the chainstate path like we would with `--base-path /path/to/chain`. Is there an option to do just that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26421" PostHistoryTypeId="1" PostId="6907" RevisionGUID="4fba86d1-fb2a-46c4-ace3-c984b2c34fca" CreationDate="2023-01-26T13:02:01.813" UserId="139" Text="Where does zombienet store the chainstate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26422" PostHistoryTypeId="3" PostId="6907" RevisionGUID="4fba86d1-fb2a-46c4-ace3-c984b2c34fca" CreationDate="2023-01-26T13:02:01.813" UserId="139" Text="|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26423" PostHistoryTypeId="2" PostId="6908" RevisionGUID="8637565b-d13a-4eb0-a338-fc65a06e659b" CreationDate="2023-01-26T13:38:44.733" UserId="279" Text="`zombienet` was build with the goal of spawn and test ephemeral networks and with that purpose it will create an use a new directory in your `/tmp` directory for each network that you spawn by default (in native provider). But if you want to control where zombienet store all the artifacts (chainstate, logs, etc) you can use the flag ` -d, --dir &lt;path&gt;` to specify a directory to use.&#xD;&#xA;&#xD;&#xA;Also, when you use `zombienet` in the native provider the `tmp` directory used to store all the artifacts will be displayed in the output.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="26425" PostHistoryTypeId="2" PostId="6909" RevisionGUID="956617a3-0ff8-48f7-b4dd-e58c3ba59841" CreationDate="2023-01-26T14:05:01.170" UserId="3753" Text="I noticed some interesting behavior while running a local test net on my machine.  I booted up a network between the default Alice and Bob accounts that are used in all the tutorials, and they connected fine, with both terminals showing that they had found a single other peer. I use a custom chainspec in this network.&#xD;&#xA;&#xD;&#xA;Next, I re-entered the same command to start Bob in another terminal, and, although I needed to pass another tmp directory for the chain data, it started fine, and connected.  I was surprised, because it seems like the consensus process should not accept a second incarnation of Bob into the aura and grandpa processes.&#xD;&#xA;&#xD;&#xA;Is this standard behavior?  How do votes work in the consensus process under these conditions?  Can it be prevented, if undesired via a governance pallet?  I guess if the two incarnations of Bob each proposed a different block it would be a problem, or if their votes counted twice in the consensus process it would be bad too.&#xD;&#xA;&#xD;&#xA;How are such issues prevented at the protocol level?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26427" PostHistoryTypeId="1" PostId="6909" RevisionGUID="956617a3-0ff8-48f7-b4dd-e58c3ba59841" CreationDate="2023-01-26T14:05:01.170" UserId="3753" Text="Node template based network runs with multiple peers using the same identity" ContentLicense="CC BY-SA 4.0" />
  <row Id="26428" PostHistoryTypeId="3" PostId="6909" RevisionGUID="956617a3-0ff8-48f7-b4dd-e58c3ba59841" CreationDate="2023-01-26T14:05:01.170" UserId="3753" Text="|consensus|grandpa|chainspec|aura|identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26429" PostHistoryTypeId="2" PostId="6910" RevisionGUID="f0300b17-be38-4a1e-bf40-cde49cbd1fd4" CreationDate="2023-01-26T15:16:50.350" UserId="3371" Text="I'm using Bounded trait from preimages frame that allows to store dispatchable calls, e.g. similar to the one that is used in pallet-democracy:&#xD;&#xA;&#xD;&#xA;    pub type CallOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::RuntimeCall;&#xD;&#xA;    pub type BoundedCallOf&lt;T&gt; = Bounded&lt;CallOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;See the source code for reference:&#xD;&#xA;https://github.com/paritytech/substrate/blob/2dbf62591fd35725c6e39f8ddfd27c3695dab594/frame/democracy/src/lib.rs#L206&#xD;&#xA;&#xD;&#xA;There is a possibility to decode it via preimages peek function on the backend side:&#xD;&#xA;&#xD;&#xA;    fn peek&lt;T: Decode&gt;(bounded: &amp;Bounded&lt;T&gt;) -&gt; Result&lt;(T, Option&lt;u32&gt;), DispatchError&gt;&#xD;&#xA;here:&#xD;&#xA;https://github.com/paritytech/substrate/blob/2dbf62591fd35725c6e39f8ddfd27c3695dab594/frame/support/src/traits/preimages.rs#L183&#xD;&#xA;&#xD;&#xA;and retrieve dispatch data.&#xD;&#xA;&#xD;&#xA;However when I receive data via storage view call on the client side, the response looks like this:&#xD;&#xA;&#xD;&#xA;    Inline: “0x30000000000090b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22&quot;&#xD;&#xA;&#xD;&#xA;So the question is - is there a possibility to decode the dispatchable data? I'm not able to pre-process storage view functions unwrapping the encoded bounded data.&#xD;&#xA;&#xD;&#xA;I've tried to use parity scale codec TS implementation: https://github.com/paritytech/scale-ts but the examples described there are not clear.&#xD;&#xA;&#xD;&#xA;Any help is appreciated.&#xD;&#xA;&#xD;&#xA;Thanks in advance! &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26431" PostHistoryTypeId="1" PostId="6910" RevisionGUID="f0300b17-be38-4a1e-bf40-cde49cbd1fd4" CreationDate="2023-01-26T15:16:50.350" UserId="3371" Text="Decode preimages Bounded Dispatchable Call on a client side" ContentLicense="CC BY-SA 4.0" />
  <row Id="26432" PostHistoryTypeId="3" PostId="6910" RevisionGUID="f0300b17-be38-4a1e-bf40-cde49cbd1fd4" CreationDate="2023-01-26T15:16:50.350" UserId="3371" Text="|substrate-front-end|scale-codec|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26433" PostHistoryTypeId="2" PostId="6911" RevisionGUID="09a6532f-1101-42b6-a0b7-0f4fccc04e03" CreationDate="2023-01-26T15:29:41.557" UserId="251" Text="There is no limitation on the node side. You could start multiple Bob nodes at the same time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But we have `do_report_equivocation` on the runtime to prevent/punish this misbehaviour.&#xD;&#xA;&#xD;&#xA;You could check the code doc for more detail and to learn how it works.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/2dbf62591fd35725c6e39f8ddfd27c3695dab594/frame/babe/src/lib.rs#L819-L878&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/2dbf62591fd35725c6e39f8ddfd27c3695dab594/frame/grandpa/src/lib.rs#L520-L601" ContentLicense="CC BY-SA 4.0" />
  <row Id="26435" PostHistoryTypeId="5" PostId="6911" RevisionGUID="cd2ef547-d8aa-441c-aa27-2170e27bdf80" CreationDate="2023-01-26T15:37:25.637" UserId="251" Comment="added 207 characters in body" Text="There is no limitation on the node side. You could start multiple Bob nodes at the same time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But we have `do_report_equivocation` on the runtime to prevent/punish this misbehaviour.&#xD;&#xA;&#xD;&#xA;You could check the code doc for more detail and to learn how it works.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/2dbf62591fd35725c6e39f8ddfd27c3695dab594/frame/babe/src/lib.rs#L819-L878&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/2dbf62591fd35725c6e39f8ddfd27c3695dab594/frame/grandpa/src/lib.rs#L520-L601&#xD;&#xA;&#xD;&#xA;Please also check `pallet-offences`.&#xD;&#xA;&#xD;&#xA;In short, any other nodes(validators) could report the malefactor then the system will disable it and slash some tokens from its account.&#xD;&#xA;&#xD;&#xA;For AURA, it's pretty centralized. There isn't a reporting mechanism." ContentLicense="CC BY-SA 4.0" />
  <row Id="26436" PostHistoryTypeId="2" PostId="6912" RevisionGUID="f7d89280-a5ed-45a5-912e-2a7fc2189e69" CreationDate="2023-01-26T15:56:18.603" UserId="380" Text="&#xD;&#xA;&#xD;&#xA;From the [contracts pallet](https://github.com/paritytech/substrate/blob/488fc24d98cfe643402b86990ae0aff27ba927b3/frame/contracts/src/lib.rs#L751-L754):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		/// A new schedule must have a greater version than the current one.&#xD;&#xA;		InvalidScheduleVersion,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What does this mean? Is the schedule the metadata.json?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26438" PostHistoryTypeId="1" PostId="6912" RevisionGUID="f7d89280-a5ed-45a5-912e-2a7fc2189e69" CreationDate="2023-01-26T15:56:18.603" UserId="380" Text="How do we resolve the InvalidScheduleVersion error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26439" PostHistoryTypeId="3" PostId="6912" RevisionGUID="f7d89280-a5ed-45a5-912e-2a7fc2189e69" CreationDate="2023-01-26T15:56:18.603" UserId="380" Text="|error|pallet-contracts|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26440" PostHistoryTypeId="5" PostId="6912" RevisionGUID="6f46aacb-cca1-415f-9c95-e2f12b759781" CreationDate="2023-01-26T16:03:09.990" UserId="380" Comment="added 119 characters in body" Text="&#xD;&#xA;&#xD;&#xA;From the [contracts pallet](https://github.com/paritytech/substrate/blob/488fc24d98cfe643402b86990ae0aff27ba927b3/frame/contracts/src/lib.rs#L751-L754):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		/// A new schedule must have a greater version than the current one.&#xD;&#xA;		InvalidScheduleVersion,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The context of this error is sending batch transactions from polkadot-js.&#xD;&#xA;&#xD;&#xA;`api.tx.utility.batchAll(txs)`&#xD;&#xA;&#xD;&#xA;Presumably these are being scheduled using the schedule pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26441" PostHistoryTypeId="5" PostId="6891" RevisionGUID="ec4199e5-bd4c-4423-8473-8ee554de6e96" CreationDate="2023-01-26T16:37:19.567" UserId="380" Comment="added 628 characters in body" Text="From the link you provided:&#xD;&#xA;&#xD;&#xA;&gt; Getting **accurate gas and storage deposit costs is possible by calling the instantiate RPC**, which dry runs the instantiation and returns the outcome. For the scope of this tutorial we will use hardcoded values.&#xD;&#xA;&#xD;&#xA;Use the gas returned from the runtime section in the polkadot apps UI:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;12: contractsApi.instantiate: ContractInstantiateResult&#xD;&#xA;{&#xD;&#xA;  gasConsumed: {&#xD;&#xA;    refTime: 2,875,200,210&#xD;&#xA;    proofSize: 94,053&#xD;&#xA;  }&#xD;&#xA;  gasRequired: {&#xD;&#xA;    refTime: 8,013,742,080&#xD;&#xA;    proofSize: 262,144&#xD;&#xA;  }&#xD;&#xA;  storageDeposit: {&#xD;&#xA;    Charge: 0&#xD;&#xA;  }&#xD;&#xA;  debugMessage: &#xD;&#xA;  result: {&#xD;&#xA;    Err: {&#xD;&#xA;      Module: {&#xD;&#xA;        index: 8&#xD;&#xA;        error: 0x19000000&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error here is [`DuplicateContract`](https://github.com/paritytech/substrate/blob/488fc24d98cfe643402b86990ae0aff27ba927b3/frame/contracts/src/lib.rs#L804). You can avoid duplicates by adding unique salt." ContentLicense="CC BY-SA 4.0" />
  <row Id="26442" PostHistoryTypeId="2" PostId="6913" RevisionGUID="31cc07e4-4322-4708-9d45-552b4064538e" CreationDate="2023-01-26T16:45:27.880" UserId="3550" Text="    let selector = [0xbd, 0x77, 0x15, 0xef];&#xD;&#xA;    let amount = 5000;&#xD;&#xA;    let amount_out = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;        .call_type(Call::new().callee(self.liquidity_pool_address))&#xD;&#xA;        .exec_input(&#xD;&#xA;            ExecutionInput::new(Selector::new(&#xD;&#xA;                selector&#xD;&#xA;            ))&#xD;&#xA;            .push_arg(amount)&#xD;&#xA;        )&#xD;&#xA;        .returns::&lt;Result&lt;Balance, ink::env::Error&gt;&gt;()&#xD;&#xA;        .fire();&#xD;&#xA;    &#xD;&#xA;    amount_out.unwrap().unwrap().unwrap()&#xD;&#xA;&#xD;&#xA;The called contract returns &quot;Balance&quot; type when called and takes a &quot;Balance&quot; argument as well. The selector is &quot;0xbd7715ef&quot;. The return in Contracts UI is &quot;Contract Trapped&quot;.&#xD;&#xA;&#xD;&#xA;Any clues?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26444" PostHistoryTypeId="1" PostId="6913" RevisionGUID="31cc07e4-4322-4708-9d45-552b4064538e" CreationDate="2023-01-26T16:45:27.880" UserId="3550" Text="I have a problem with getting the return type of Balance from &quot;ink::env::call::build_call&quot; and the contract keeps panicking when called" ContentLicense="CC BY-SA 4.0" />
  <row Id="26445" PostHistoryTypeId="3" PostId="6913" RevisionGUID="31cc07e4-4322-4708-9d45-552b4064538e" CreationDate="2023-01-26T16:45:27.880" UserId="3550" Text="|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26446" PostHistoryTypeId="5" PostId="6912" RevisionGUID="b73b0945-08a9-4077-8a56-b5491fb4f766" CreationDate="2023-01-26T16:49:03.797" UserId="380" Comment="added 43 characters in body" Text="&#xD;&#xA;&#xD;&#xA;From the [contracts pallet](https://github.com/paritytech/substrate/blob/488fc24d98cfe643402b86990ae0aff27ba927b3/frame/contracts/src/lib.rs#L751-L754):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		/// A new schedule must have a greater version than the current one.&#xD;&#xA;		InvalidScheduleVersion,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The context of this error is sending batch transactions from polkadot-js.&#xD;&#xA;&#xD;&#xA;`api.tx.utility.batchAll(txs)`&#xD;&#xA;&#xD;&#xA;Presumably these are being scheduled using the schedule pallet?&#xD;&#xA;&#xD;&#xA;I'm using the substrate contracts node." ContentLicense="CC BY-SA 4.0" />
  <row Id="26447" PostHistoryTypeId="2" PostId="6914" RevisionGUID="135569af-3df7-473a-8e3b-a6967b7459ff" CreationDate="2023-01-26T17:00:55.703" UserId="3538" Text="Is it possible to have fixed validator rewards on each epoch in a NPoS consensus based substrate chain. [This](https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html) suggests that the rewards are based on inflation and stake rate, and I've not seen any implementations with fixed rewards either. &#xD;&#xA;&#xD;&#xA;Is it possible to do that? " ContentLicense="CC BY-SA 4.0" />
  <row Id="26449" PostHistoryTypeId="1" PostId="6914" RevisionGUID="135569af-3df7-473a-8e3b-a6967b7459ff" CreationDate="2023-01-26T17:00:55.703" UserId="3538" Text="Fixed Validator Rewards in an NPoS Substrate chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="26450" PostHistoryTypeId="3" PostId="6914" RevisionGUID="135569af-3df7-473a-8e3b-a6967b7459ff" CreationDate="2023-01-26T17:00:55.703" UserId="3538" Text="|substrate-node-template|staking|validator|npos|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26451" PostHistoryTypeId="2" PostId="6915" RevisionGUID="00d06cdd-995a-4f0b-9804-cf06f230c8cb" CreationDate="2023-01-26T17:22:19.610" UserId="2722" Text="i want to add pallet-contracts into substrate on branch but i faced errro . &#xD;&#xA;&#xD;&#xA;i will tell you step by step what i did :&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Step One : Add Depency Pallets**&#xD;&#xA;&#xD;&#xA;    pallet-contracts = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-contracts-primitives = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-contracts-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.27&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Step Two : Add Pallets Config**&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       parameter_types! {&#xD;&#xA;    	pub TombstoneDeposit: Balance = deposit(&#xD;&#xA;    		1,&#xD;&#xA;    		&lt;pallet_contracts::Pallet&lt;Runtime&gt;&gt;::contract_info_size()&#xD;&#xA;    	);&#xD;&#xA;    	pub DepositPerContract: Balance = TombstoneDeposit::get();&#xD;&#xA;    	pub const DepositPerStorageByte: Balance = deposit(0, 1);&#xD;&#xA;    	pub const DepositPerStorageItem: Balance = deposit(1, 0);&#xD;&#xA;    	pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * DAYS);&#xD;&#xA;    	pub const SurchargeReward: Balance = 150 * MILLICENTS;&#xD;&#xA;    	pub const SignedClaimHandicap: u32 = 2;&#xD;&#xA;    	pub const MaxValueSize: u32 = 16 * 1024;&#xD;&#xA;    	// The lazy deletion runs inside on_initialize.&#xD;&#xA;    	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *&#xD;&#xA;    	 BlockWeights::get().max_block;&#xD;&#xA;    	// The weight needed for decoding the queue should be less or equal than a fifth&#xD;&#xA;    	// of the overall weight dedicated to the lazy deletion.&#xD;&#xA;    	pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (&#xD;&#xA;    		&lt;Runtime as pallet_contracts::Config&gt;::WeightInfo::on_initialize_per_queue_item(1) -&#xD;&#xA;    		&lt;Runtime as pallet_contracts::Config&gt;::WeightInfo::on_initialize_per_queue_item(0)&#xD;&#xA;    	 )) / 5) as u32;&#xD;&#xA;    &#xD;&#xA;    	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_contracts::Config for Runtime {&#xD;&#xA;    	type Time = Timestamp;&#xD;&#xA;    	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;    	type Currency = Balances;&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type RentPayment = ();&#xD;&#xA;    	type SignedClaimHandicap = SignedClaimHandicap;&#xD;&#xA;    	type TombstoneDeposit = TombstoneDeposit;&#xD;&#xA;    	type DepositPerContract = DepositPerContract;&#xD;&#xA;    	type DepositPerStorageByte = DepositPerStorageByte;&#xD;&#xA;    	type DepositPerStorageItem = DepositPerStorageItem;&#xD;&#xA;    	type RentFraction = RentFraction;&#xD;&#xA;    	type SurchargeReward = SurchargeReward;&#xD;&#xA;    	type WeightPrice = pallet_transaction_payment::Module&lt;Self&gt;;&#xD;&#xA;    	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;    	type ChainExtension = ();&#xD;&#xA;    	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;    	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;    	type Call = Call;&#xD;&#xA;    	/// The safest default is to allow no calls at all.&#xD;&#xA;    	///&#xD;&#xA;    	/// Runtimes should whitelist dispatchables that are allowed to be called from contracts&#xD;&#xA;    	/// and make sure they are stable. Dispatchables exposed to contracts are not allowed to&#xD;&#xA;    	/// change because that would break already deployed contracts. The `Call` structure itself&#xD;&#xA;    	/// is not allowed to change the indices of existing pallets, too.&#xD;&#xA;    	type CallFilter = Nothing;&#xD;&#xA;    	type Schedule = Schedule;&#xD;&#xA;    	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Step two : Add runtime api**&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       impl pallet_contracts_rpc_runtime_api::ContractsApi&lt;Block, AccountId, Balance, BlockNumber&gt;&#xD;&#xA;    	for Runtime&#xD;&#xA;    {&#xD;&#xA;    	fn call(&#xD;&#xA;    		origin: AccountId,&#xD;&#xA;    		dest: AccountId,&#xD;&#xA;    		value: Balance,&#xD;&#xA;    		gas_limit: u64,&#xD;&#xA;    		input_data: Vec&lt;u8&gt;,&#xD;&#xA;    	) -&gt; ContractExecResult {&#xD;&#xA;    		let (exec_result, gas_consumed) =&#xD;&#xA;    			Contracts::bare_call(origin, dest.into(), value, gas_limit, input_data);&#xD;&#xA;    		match exec_result {&#xD;&#xA;    			Ok(v) =&gt; ContractExecResult::Success {&#xD;&#xA;    				flags: v.flags.bits(),&#xD;&#xA;    				data: v.data,&#xD;&#xA;    				gas_consumed: gas_consumed,&#xD;&#xA;    			},&#xD;&#xA;    			Err(_) =&gt; ContractExecResult::Error,&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	fn get_storage(&#xD;&#xA;    		address: AccountId,&#xD;&#xA;    		key: [u8; 32],&#xD;&#xA;    	) -&gt; pallet_contracts_primitives::GetStorageResult {&#xD;&#xA;    		Contracts::get_storage(address, key)&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	fn rent_projection(&#xD;&#xA;    		address: AccountId,&#xD;&#xA;    	) -&gt; pallet_contracts_primitives::RentProjectionResult&lt;BlockNumber&gt; {&#xD;&#xA;    		Contracts::rent_projection(address)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;but it show me this error : &#xD;&#xA;&#xD;&#xA;    no matching package named `pallet-contracts-rpc-runtime-api` found location searched: https://github.com/paritytech/substrate.git&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;whats the problem ? how can i solve this problem ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26453" PostHistoryTypeId="1" PostId="6915" RevisionGUID="00d06cdd-995a-4f0b-9804-cf06f230c8cb" CreationDate="2023-01-26T17:22:19.610" UserId="2722" Text="Error when add pallet-contracts in substrate : no matching package named `pallet-contracts-rpc-runtime-api` found location" ContentLicense="CC BY-SA 4.0" />
  <row Id="26454" PostHistoryTypeId="3" PostId="6915" RevisionGUID="00d06cdd-995a-4f0b-9804-cf06f230c8cb" CreationDate="2023-01-26T17:22:19.610" UserId="2722" Text="|polkadot|substrate-node-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26455" PostHistoryTypeId="2" PostId="6916" RevisionGUID="25628afb-b3da-450b-a50d-626f09d3fb0c" CreationDate="2023-01-26T17:29:13.180" UserId="3054" Text="Is there a way to start a substrate node in CI and instruct it through a binary flag not to sync with the relay chain? I think it would be the same to say I want the P2P functionality to be off. Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="26457" PostHistoryTypeId="1" PostId="6916" RevisionGUID="25628afb-b3da-450b-a50d-626f09d3fb0c" CreationDate="2023-01-26T17:29:13.180" UserId="3054" Text="Start Substrate Node with disabled P2P" ContentLicense="CC BY-SA 4.0" />
  <row Id="26458" PostHistoryTypeId="3" PostId="6916" RevisionGUID="25628afb-b3da-450b-a50d-626f09d3fb0c" CreationDate="2023-01-26T17:29:13.180" UserId="3054" Text="|polkadot|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26459" PostHistoryTypeId="5" PostId="6915" RevisionGUID="b6b9126c-8c5d-4706-94f4-50bb195fa391" CreationDate="2023-01-26T17:33:11.600" UserId="2722" Comment="added 79 characters in body" Text="i want to add pallet-contracts into substrate on branch but i faced errro . &#xD;&#xA;&#xD;&#xA;[Repository][1]&#xD;&#xA;&#xD;&#xA;i will tell you step by step what i did :&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Step One : Add Depency Pallets**&#xD;&#xA;&#xD;&#xA;    pallet-contracts = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-contracts-primitives = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-contracts-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot; branch&quot; = &quot;polkadot-v0.9.27&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Step Two : Add Pallets Config**&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       parameter_types! {&#xD;&#xA;    	pub TombstoneDeposit: Balance = deposit(&#xD;&#xA;    		1,&#xD;&#xA;    		&lt;pallet_contracts::Pallet&lt;Runtime&gt;&gt;::contract_info_size()&#xD;&#xA;    	);&#xD;&#xA;    	pub DepositPerContract: Balance = TombstoneDeposit::get();&#xD;&#xA;    	pub const DepositPerStorageByte: Balance = deposit(0, 1);&#xD;&#xA;    	pub const DepositPerStorageItem: Balance = deposit(1, 0);&#xD;&#xA;    	pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * DAYS);&#xD;&#xA;    	pub const SurchargeReward: Balance = 150 * MILLICENTS;&#xD;&#xA;    	pub const SignedClaimHandicap: u32 = 2;&#xD;&#xA;    	pub const MaxValueSize: u32 = 16 * 1024;&#xD;&#xA;    	// The lazy deletion runs inside on_initialize.&#xD;&#xA;    	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *&#xD;&#xA;    	 BlockWeights::get().max_block;&#xD;&#xA;    	// The weight needed for decoding the queue should be less or equal than a fifth&#xD;&#xA;    	// of the overall weight dedicated to the lazy deletion.&#xD;&#xA;    	pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (&#xD;&#xA;    		&lt;Runtime as pallet_contracts::Config&gt;::WeightInfo::on_initialize_per_queue_item(1) -&#xD;&#xA;    		&lt;Runtime as pallet_contracts::Config&gt;::WeightInfo::on_initialize_per_queue_item(0)&#xD;&#xA;    	 )) / 5) as u32;&#xD;&#xA;    &#xD;&#xA;    	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_contracts::Config for Runtime {&#xD;&#xA;    	type Time = Timestamp;&#xD;&#xA;    	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;    	type Currency = Balances;&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type RentPayment = ();&#xD;&#xA;    	type SignedClaimHandicap = SignedClaimHandicap;&#xD;&#xA;    	type TombstoneDeposit = TombstoneDeposit;&#xD;&#xA;    	type DepositPerContract = DepositPerContract;&#xD;&#xA;    	type DepositPerStorageByte = DepositPerStorageByte;&#xD;&#xA;    	type DepositPerStorageItem = DepositPerStorageItem;&#xD;&#xA;    	type RentFraction = RentFraction;&#xD;&#xA;    	type SurchargeReward = SurchargeReward;&#xD;&#xA;    	type WeightPrice = pallet_transaction_payment::Module&lt;Self&gt;;&#xD;&#xA;    	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;    	type ChainExtension = ();&#xD;&#xA;    	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;    	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;    	type Call = Call;&#xD;&#xA;    	/// The safest default is to allow no calls at all.&#xD;&#xA;    	///&#xD;&#xA;    	/// Runtimes should whitelist dispatchables that are allowed to be called from contracts&#xD;&#xA;    	/// and make sure they are stable. Dispatchables exposed to contracts are not allowed to&#xD;&#xA;    	/// change because that would break already deployed contracts. The `Call` structure itself&#xD;&#xA;    	/// is not allowed to change the indices of existing pallets, too.&#xD;&#xA;    	type CallFilter = Nothing;&#xD;&#xA;    	type Schedule = Schedule;&#xD;&#xA;    	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Step two : Add runtime api**&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       impl pallet_contracts_rpc_runtime_api::ContractsApi&lt;Block, AccountId, Balance, BlockNumber&gt;&#xD;&#xA;    	for Runtime&#xD;&#xA;    {&#xD;&#xA;    	fn call(&#xD;&#xA;    		origin: AccountId,&#xD;&#xA;    		dest: AccountId,&#xD;&#xA;    		value: Balance,&#xD;&#xA;    		gas_limit: u64,&#xD;&#xA;    		input_data: Vec&lt;u8&gt;,&#xD;&#xA;    	) -&gt; ContractExecResult {&#xD;&#xA;    		let (exec_result, gas_consumed) =&#xD;&#xA;    			Contracts::bare_call(origin, dest.into(), value, gas_limit, input_data);&#xD;&#xA;    		match exec_result {&#xD;&#xA;    			Ok(v) =&gt; ContractExecResult::Success {&#xD;&#xA;    				flags: v.flags.bits(),&#xD;&#xA;    				data: v.data,&#xD;&#xA;    				gas_consumed: gas_consumed,&#xD;&#xA;    			},&#xD;&#xA;    			Err(_) =&gt; ContractExecResult::Error,&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	fn get_storage(&#xD;&#xA;    		address: AccountId,&#xD;&#xA;    		key: [u8; 32],&#xD;&#xA;    	) -&gt; pallet_contracts_primitives::GetStorageResult {&#xD;&#xA;    		Contracts::get_storage(address, key)&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	fn rent_projection(&#xD;&#xA;    		address: AccountId,&#xD;&#xA;    	) -&gt; pallet_contracts_primitives::RentProjectionResult&lt;BlockNumber&gt; {&#xD;&#xA;    		Contracts::rent_projection(address)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;but it show me this error : &#xD;&#xA;&#xD;&#xA;    no matching package named `pallet-contracts-rpc-runtime-api` found location searched: https://github.com/paritytech/substrate.git&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;whats the problem ? how can i solve this problem ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_dex" ContentLicense="CC BY-SA 4.0" />
  <row Id="26460" PostHistoryTypeId="2" PostId="6917" RevisionGUID="b9e166bf-a1be-440f-ac93-a56a355eb049" CreationDate="2023-01-26T18:03:22.307" UserId="3327" Text="I am interacting with the substrate node using substrate interfact. I am using following command to submit extrinsics to be executed by the runtime:&#xD;&#xA;&#xD;&#xA;    extrinsic = substrate.create_signed_extrinsic(&#xD;&#xA;            call=call,&#xD;&#xA;            keypair=kp_council_first_member&#xD;&#xA;        )&#xD;&#xA;    &#xD;&#xA;        receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)&#xD;&#xA;    &#xD;&#xA;        if not receipt.is_success:&#xD;&#xA;            print(substrate.get_events(receipt.block_hash))&#xD;&#xA;            raise IOError&#xD;&#xA;&#xD;&#xA;Like we examine the events after submitting and executing the extrinsic. On the same line, I wanted to examine all the extrinsics created by this command one by one. How I can achieve this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26462" PostHistoryTypeId="1" PostId="6917" RevisionGUID="b9e166bf-a1be-440f-ac93-a56a355eb049" CreationDate="2023-01-26T18:03:22.307" UserId="3327" Text="How to traverse extrinsics executed via substrate interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="26463" PostHistoryTypeId="3" PostId="6917" RevisionGUID="b9e166bf-a1be-440f-ac93-a56a355eb049" CreationDate="2023-01-26T18:03:22.307" UserId="3327" Text="|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26464" PostHistoryTypeId="2" PostId="6918" RevisionGUID="8a6c224b-077f-4d54-b244-ac445c0c8384" CreationDate="2023-01-26T19:11:33.437" UserId="3142" Text="The cli tool `subwasm` can get the metadata from a live node (url) and output JSON that is human readable.  However, to troubleshoot various issues, I need a tool that generates human readable JSON from hex encoded metadata in a file.  i.e. it doesn't go to a live node.&#xD;&#xA;&#xD;&#xA;Is there a tool that does this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26466" PostHistoryTypeId="1" PostId="6918" RevisionGUID="8a6c224b-077f-4d54-b244-ac445c0c8384" CreationDate="2023-01-26T19:11:33.437" UserId="3142" Text="Tool to generate human readable JSON of Substrate node metadata from a file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26467" PostHistoryTypeId="3" PostId="6918" RevisionGUID="8a6c224b-077f-4d54-b244-ac445c0c8384" CreationDate="2023-01-26T19:11:33.437" UserId="3142" Text="|metadata|json|subwasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26468" PostHistoryTypeId="5" PostId="6916" RevisionGUID="69bc088f-6630-4b54-b908-721b875887cd" CreationDate="2023-01-26T19:51:51.773" UserId="34" Comment="edited body; edited tags" Text="Is there a way to start a parachain node in CI and instruct it through a binary flag not to sync with the relay chain? I think it would be the same to say I want the P2P functionality to be off. Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="26469" PostHistoryTypeId="6" PostId="6916" RevisionGUID="69bc088f-6630-4b54-b908-721b875887cd" CreationDate="2023-01-26T19:51:51.773" UserId="34" Comment="edited body; edited tags" Text="|polkadot|parachain|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26470" PostHistoryTypeId="5" PostId="6918" RevisionGUID="0cd57664-cf4c-4cfe-8173-38b72c3cafae" CreationDate="2023-01-26T20:07:00.990" UserId="3142" Comment="added example" Text="The cli tool `subwasm` can get the metadata from a live node (url) and output JSON that is human readable.  However, to troubleshoot various issues, I need a tool that generates human readable JSON from hex encoded SCALE metadata in a file.  i.e. it doesn't go to a live node.&#xD;&#xA;&#xD;&#xA;e.g.  The hex encoded SCALE data in a JSON-RPC result. It doesn't matter if the tool uses the result data or the whole JSON-RPC json result.  I just need it to output it in human readable form.&#xD;&#xA;&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x6d6574610e3904000c1c73705f636f72651863727970746f2c4163636f756e7449643332000004000401205b75383b2033325d0000040000032000000008000800000503000c08306672616d655f73797374656d2c4163636f756e74496e666f0814496e64657801102c4163636f756e74446174610114001401146e6f6e6365100114496e646578000124636f6e73756d657273100120...etc............&#xD;&#xA;&#xD;&#xA;Is there a tool that does this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26471" PostHistoryTypeId="5" PostId="6913" RevisionGUID="6041c497-fb96-4cd2-8d6d-63861aaf6371" CreationDate="2023-01-26T20:30:24.173" UserId="3550" Comment="deleted 9 characters in body" Text="    let selector = [0xbd, 0x77, 0x15, 0xef];&#xD;&#xA;    let amount = 5000;&#xD;&#xA;    let amount_out = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;        .call_type(Call::new().callee(self.liquidity_pool_address))&#xD;&#xA;        .exec_input(&#xD;&#xA;            ExecutionInput::new(Selector::new(&#xD;&#xA;                selector&#xD;&#xA;            ))&#xD;&#xA;            .push_arg(amount)&#xD;&#xA;        )&#xD;&#xA;        .returns::&lt;Result&lt;Balance, ink::env::Error&gt;&gt;()&#xD;&#xA;        .fire();&#xD;&#xA;    &#xD;&#xA;    amount_out.unwrap().unwrap()&#xD;&#xA;&#xD;&#xA;The called contract returns &quot;Balance&quot; type when called and takes a &quot;Balance&quot; argument as well. The selector is &quot;0xbd7715ef&quot;. The return in Contracts UI is &quot;Contract Trapped&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are no error messages to help me debug the problem with the call.&#xD;&#xA;&#xD;&#xA;Any clues?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26472" PostHistoryTypeId="2" PostId="6919" RevisionGUID="9b7d998d-c8cf-487b-a250-9173e79aa687" CreationDate="2023-01-26T22:05:08.320" UserId="3755" Text="I am trying to reimplement one of the Substrate tutorials:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/get-started/upgrade-a-running-network/&#xD;&#xA;&#xD;&#xA;But I am stuck with an issue - where it says do Scheduler -&gt; Schedule -&gt; sudo transaction to set code with new runtime version when I try to sign this transaction (scheduled in 20+ blocks from the current block like it says in the tutorial) I am getting the following error:&#xD;&#xA;&#xD;&#xA;[![Screenshot with error on the request page ][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I go to Network -&gt; explorer I see this:&#xD;&#xA;&#xD;&#xA;    sudo.Sudid&#xD;&#xA;    A sudo just took place. [result] &#xD;&#xA;    sudoResult: Result&lt;Null, SpRuntimeDispatchError&gt;&#xD;&#xA;    Err&#xD;&#xA;    DispatchError&#xD;&#xA;    Exhausted&#xD;&#xA;Full error backlog below:&#xD;&#xA;[![UP][2]][2]&#xD;&#xA;[![MID][3]][3]&#xD;&#xA;[![DOWN][4]][4]&#xD;&#xA;&#xD;&#xA;Had anyone faced this before? And how do you solve it?&#xD;&#xA;It is a tutorial and based on demo pre-defined data, so &quot;not enough moneyunits to pay for your gas&quot; shouldn't be an issue, I would imagine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/W9qFA.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/CamGD.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/Sxej4.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/L8dxj.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="26474" PostHistoryTypeId="1" PostId="6919" RevisionGUID="9b7d998d-c8cf-487b-a250-9173e79aa687" CreationDate="2023-01-26T22:05:08.320" UserId="3755" Text="Update Runtime sudo transaction exhausted (Substrate)" ContentLicense="CC BY-SA 4.0" />
  <row Id="26475" PostHistoryTypeId="3" PostId="6919" RevisionGUID="9b7d998d-c8cf-487b-a250-9173e79aa687" CreationDate="2023-01-26T22:05:08.320" UserId="3755" Text="|polkadot-js|substrate-node-template|extrinsic|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26476" PostHistoryTypeId="2" PostId="6920" RevisionGUID="96eec5b0-897b-41cc-9cc7-5e96ce118804" CreationDate="2023-01-26T22:13:47.823" UserId="3053" Text="We have some custom RPCs that call some custom RuntimeApis that from inside our pallets  expose some on chain data.&#xD;&#xA;&#xD;&#xA;I know that any access (read or write) of on-chain storage from extrinsics will count towards PoV size of the block. My question is if these calls coming from RPCs to only view the data are also counts towards PoV or not.&#xD;&#xA;&#xD;&#xA;Data query flow:&#xD;&#xA;&#xD;&#xA;    Custom Rpc -&gt; Custom RunTimeApi -&gt; Pallet -&gt; OnChain Data&#xD;&#xA;&#xD;&#xA;    Custom Rpc &lt;- Custom RunTimeApi &lt;- Pallet &lt;- OnChain Data&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26478" PostHistoryTypeId="1" PostId="6920" RevisionGUID="96eec5b0-897b-41cc-9cc7-5e96ce118804" CreationDate="2023-01-26T22:13:47.823" UserId="3053" Text="Does RuntimeApis storage accesses counts towards PoV when called from RPC and not any extrinisc?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26479" PostHistoryTypeId="3" PostId="6920" RevisionGUID="96eec5b0-897b-41cc-9cc7-5e96ce118804" CreationDate="2023-01-26T22:13:47.823" UserId="3053" Text="|custom-rpc|runtime-api|pov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26480" PostHistoryTypeId="2" PostId="6921" RevisionGUID="06fd073a-dc78-462a-9b0d-f86f74817177" CreationDate="2023-01-26T23:00:19.903" UserId="49" Text="Specifying the option `--reserved-only` does spawn a private network. If the `reserved-nodes` option is missing or if it contains invalid multiaddresses, the node won't connect and sync with other nodes.&#xD;&#xA;&#xD;&#xA;When launching a node, the options after the double dash `--` affect the relay chain, e.g. `./parachain --reserved-only` targets the parachain, `./parachain -- --reserved-only` targets the relay chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="26482" PostHistoryTypeId="2" PostId="6922" RevisionGUID="c5674e1f-7c23-48a3-9a00-c889227fe56f" CreationDate="2023-01-27T08:18:10.950" UserId="116" Text="## How to obtain a stable encoding of emitted events from a smart contract?  ##&#xD;&#xA;I have a smart contract which emits events when these events are later fetched from the chain:&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct MissionReady {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        owner: AccountId,&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        operator: AccountId,&#xD;&#xA;    }&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    /// Mission finished successfully&#xD;&#xA;    pub struct MissionAccomplished {}&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    /// Mission is deployed on the target fleet as claimed by the network operator&#xD;&#xA;    pub struct MissionDeployed {}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;they are scale encoded respectively as&#xD;&#xA;```&#xD;&#xA;[0, 178, 156, 14, 4, 92, 150, 156, 193, 7, 172, 3, 90, 148, 68, 118, 151, 188, 182, 196 ...]&#xD;&#xA;[1]&#xD;&#xA;[2]&#xD;&#xA;```&#xD;&#xA;which looks like they are stored in an enum internally.&#xD;&#xA;&#xD;&#xA;This encoding changes if the order in the source code is changed, is there a way to fixate the encoding to keep the binary interface while recompiling the contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26484" PostHistoryTypeId="1" PostId="6922" RevisionGUID="c5674e1f-7c23-48a3-9a00-c889227fe56f" CreationDate="2023-01-27T08:18:10.950" UserId="116" Text="Stable scale encoded events from ink contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="26485" PostHistoryTypeId="3" PostId="6922" RevisionGUID="c5674e1f-7c23-48a3-9a00-c889227fe56f" CreationDate="2023-01-27T08:18:10.950" UserId="116" Text="|ink|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26487" PostHistoryTypeId="2" PostId="6923" RevisionGUID="43cde1ae-f02d-4085-b238-3caad360286e" CreationDate="2023-01-27T08:52:43.980" UserId="2762" Text="See this [error from the docs][1] &#xD;&#xA;&#xD;&#xA;&gt; Resources exhausted, e.g. attempt to read/write data which is too large to manipulate.&#xD;&#xA;&#xD;&#xA;The FRAME System module sets boundaries on the block length and block weight that these transactions can use. However, the set_code function is intentionally designed to consume the maximum weight that can fit in a block. Forcing a runtime upgrade to consume an entire block prevents transactions in the same block from executing on different versions of a runtime.&#xD;&#xA;&#xD;&#xA;Instead of `sudo` pick the extrinsic `sudoUncheckedWeight` from the pallet `sudo` and call from there the `setCode` extrinsic. &#xD;&#xA;This setting allows for a block to take an indefinite time to compute to ensure that the runtime upgrade does not fail.&#xD;&#xA;&#xD;&#xA;From the docs:&#xD;&#xA;&gt; The **sudo_unchecked_weight** function is the same as the sudo function except that it supports an additional parameter to specify the weight to use for the call. This parameter enables you to work around resource accounting safeguards to specify a weight of zero for the call that dispatches the set_code function.&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/dispatch/enum.DispatchError.html#variant.Exhausted" ContentLicense="CC BY-SA 4.0" />
  <row Id="26489" PostHistoryTypeId="2" PostId="6924" RevisionGUID="632c8f8c-593d-43d6-896e-b0b61f35ca80" CreationDate="2023-01-27T09:13:50.080" UserId="2762" Text="Delete the `pallet-contracts-rpc-runtime-api` from the runtime, it doesn't have to be there anymore.&#xD;&#xA;&#xD;&#xA;See this previous answer from [StackExchange for more information][1]:&#xD;&#xA;&#xD;&#xA;&gt; The reason is that everything under runtime/ will be run in an isolated no_std sandbox mode in WebAssembly, whereas the RPC endpoints are very much exposed to the outside networking world.&#xD;&#xA;&#xD;&#xA;I recommend you to check [the code of a parachain that runs in rococo and has the pallet-contract in it][2], if you want to use it as a guide about how to add the pallet. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/4182/2762&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/tree/master/parachains/runtimes/contracts/contracts-rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="26491" PostHistoryTypeId="5" PostId="6921" RevisionGUID="6d909967-4e24-4259-8e6d-1692e60b2f79" CreationDate="2023-01-27T09:14:38.027" UserId="49" Comment="Add double dash to option" Text="Specifying the option `--reserved-only` does spawn a private network. If the `--reserved-nodes` option is missing or if it contains invalid multiaddresses, the node won't connect and sync with other nodes.&#xD;&#xA;&#xD;&#xA;When launching a node, the options after the double dash `--` affect the relay chain, e.g. `./parachain --reserved-only` targets the parachain, `./parachain -- --reserved-only` targets the relay chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="26492" PostHistoryTypeId="5" PostId="6913" RevisionGUID="09eaa2b3-84e5-4f17-b2fc-7e55efaa6fd5" CreationDate="2023-01-27T10:08:50.313" UserId="3550" Comment="added 101 characters in body" Text="    let selector: [u8; 4] = [0xbd, 0x77, 0x15, 0xef];&#xD;&#xA;    let amount_out = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;        .call_type(Call::new().callee(self.liquidity_pool_address))&#xD;&#xA;        .exec_input(&#xD;&#xA;            ExecutionInput::new(Selector::new(selector))&#xD;&#xA;                .push_arg(amount)&#xD;&#xA;        )&#xD;&#xA;        .returns::&lt;u128&gt;()&#xD;&#xA;        .fire();&#xD;&#xA;    &#xD;&#xA;    match amount_out {&#xD;&#xA;        Ok(output) =&gt; return output,&#xD;&#xA;        Err(_) =&gt; {&#xD;&#xA;            panic!(&quot;Failed to execute call&quot;)&#xD;&#xA;        }&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;The method with the selector: 0xbd7715ef returns a u128 (Balance) type. It doesn't ever have an Err variant, but instead returns 0. &#xD;&#xA;The liquidity_pool_address is also its deployed contract address&#xD;&#xA;And it takes one u128 argument&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are no error messages to help me debug the problem with the call.&#xD;&#xA;&#xD;&#xA;Any clues?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26493" PostHistoryTypeId="2" PostId="6925" RevisionGUID="282491d9-4fdc-48d8-9666-f2434adae184" CreationDate="2023-01-27T11:03:05.330" UserId="3317" Text="The PoV is given to the validator for it to be able to execute the state transition function and calculate the new state root (new state). This is to verify the collators have done their work correctly. &#xD;&#xA;&#xD;&#xA;A query for on-chain data is handled by the collators and are not verified by validators. Therefore, it is not required in the PoV and will not increase the PoV size." ContentLicense="CC BY-SA 4.0" />
  <row Id="26495" PostHistoryTypeId="2" PostId="6926" RevisionGUID="71d5cdb0-d050-4c4c-ae38-0e2f5376fb7f" CreationDate="2023-01-27T12:20:44.210" UserId="85" Text="Good question - good to be probing! First, it is highly unlikely that staking would ever be done by anything other than the native asset, so I think we can knock that on the head (There would be too many security risks associated with it). Liquid staking is harder to rule out, though again security risks. There's no flash loan capability on statemine/statemint and no plans for such functionality.&#xD;&#xA;&#xD;&#xA;Assets would need to be sufficient (and currently this requires a governance vote) to be used to pay fees with. The expectation is that sufficient assets will be more expensive to manipulate than insufficient 'exotic' assets.&#xD;&#xA;&#xD;&#xA;By using the dex rather than an oracle price it ensures that repeated calls would change the price rather than re-using a fixed price and that this would be harder to abuse." ContentLicense="CC BY-SA 4.0" />
  <row Id="26497" PostHistoryTypeId="50" PostId="6488" RevisionGUID="e7b5d7da-f944-4b07-b578-07e3e8dadbac" CreationDate="2023-01-27T15:08:07.017" UserId="-1" />
  <row Id="26498" PostHistoryTypeId="2" PostId="6927" RevisionGUID="926c4ffb-3a6e-4c63-ae5b-452b031803c0" CreationDate="2023-01-27T16:06:10.167" UserId="3604" Text="I've tried following the instructions and double checking evrything at each stage but I still end up with the following error... Any ideas please?&#xD;&#xA;&#xD;&#xA;error[E0282]: type annotations needed&#xD;&#xA;    --&gt; /Users/richard/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9&#xD;&#xA;     |&#xD;&#xA;541  |                   let accuracy = P::ACCURACY.saturated_into();&#xD;&#xA;     |                       ^^^^^^^^&#xD;&#xA;...&#xD;&#xA;1614 | / implement_fixed!(&#xD;&#xA;1615 | |     FixedU128,&#xD;&#xA;1616 | |     test_fixed_u128,&#xD;&#xA;1617 | |     u128,&#xD;&#xA;...    |&#xD;&#xA;1621 | |         [0.000000000000000000, 340282366920938463463.374607431768211455]_&quot;,&#xD;&#xA;1622 | | );&#xD;&#xA;     | |_- in this macro invocation&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `implement_fixed` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: consider giving `accuracy` an explicit type&#xD;&#xA;     |&#xD;&#xA;541  |                 let accuracy: _ = P::ACCURACY.saturated_into();&#xD;&#xA;     |                             +++&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0282`.&#xD;&#xA;error: could not compile `sp-arithmetic` due to 3 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;richard@richardimac substrate-node-template % " ContentLicense="CC BY-SA 4.0" />
  <row Id="26500" PostHistoryTypeId="1" PostId="6927" RevisionGUID="926c4ffb-3a6e-4c63-ae5b-452b031803c0" CreationDate="2023-01-27T16:06:10.167" UserId="3604" Text="Getting error when building dev node" ContentLicense="CC BY-SA 4.0" />
  <row Id="26501" PostHistoryTypeId="3" PostId="6927" RevisionGUID="926c4ffb-3a6e-4c63-ae5b-452b031803c0" CreationDate="2023-01-27T16:06:10.167" UserId="3604" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26502" PostHistoryTypeId="2" PostId="6928" RevisionGUID="e176be8a-9ea7-4af3-b46b-d6a7db2bb2c0" CreationDate="2023-01-27T16:30:08.240" UserId="300" Text="I have written a command that exports the metadata at the CLI which /should/ duplicate the results of `state_getMetadata`.&#xD;&#xA;&#xD;&#xA;Full Source Code: https://github.com/LibertyDSNP/frequency/blob/main/node/cli/src/export_metadata_cmd.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub async fn run&lt;B, C&gt;(&amp;self, client: Arc&lt;C&gt;) -&gt; Result&lt;(), Error&gt;&#xD;&#xA;	where&#xD;&#xA;		B: BlockT,&#xD;&#xA;		C: ProvideRuntimeApi&lt;B&gt;,&#xD;&#xA;		C::Api: Metadata&lt;B&gt; + 'static,&#xD;&#xA;		&lt;&lt;B::Header as HeaderT&gt;::Number as FromStr&gt;::Err: Debug,&#xD;&#xA;	{&#xD;&#xA;		let from = self.from.as_ref().and_then(|f| f.parse().ok()).unwrap_or(0u32);&#xD;&#xA;		let metadata: Bytes =&#xD;&#xA;			client.runtime_api().metadata(&amp;BlockId::number(from.into())).unwrap().into();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However the output does not match the `state_getMetadata`. For example, frequency does not currently use or import the XCM pallets. `state_getMetadata` does NOT have any of the events from those pallets as expected. However, the metadata from the CLI DOES have those events.&#xD;&#xA;&#xD;&#xA;Both have the events from Frequency, however they are static.&#xD;&#xA;&#xD;&#xA;This tells me that `state_getMetadata` is doing something different to load up the current value not the genesis value, even though when I am locally running the chain to do `state_getMetadata`, I have no blocks formed.&#xD;&#xA;&#xD;&#xA;How can I make sure that the `export_metadata_cmd.rs` returns the same value as `state_getMetadata`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26504" PostHistoryTypeId="1" PostId="6928" RevisionGUID="e176be8a-9ea7-4af3-b46b-d6a7db2bb2c0" CreationDate="2023-01-27T16:30:08.240" UserId="300" Text="Custom Metadata Command Returnning Incorrect Data" ContentLicense="CC BY-SA 4.0" />
  <row Id="26505" PostHistoryTypeId="3" PostId="6928" RevisionGUID="e176be8a-9ea7-4af3-b46b-d6a7db2bb2c0" CreationDate="2023-01-27T16:30:08.240" UserId="300" Text="|metadata|cli|state|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26506" PostHistoryTypeId="5" PostId="6928" RevisionGUID="3e5b0b51-e699-4a86-8e4c-c9db118472ae" CreationDate="2023-01-27T16:36:33.843" UserId="300" Comment="deleted 574 characters in body" Text="I have written a command that exports the metadata at the CLI which /should/ duplicate the results of `state_getMetadata`.&#xD;&#xA;&#xD;&#xA;Full Source Code: https://github.com/LibertyDSNP/frequency/blob/main/node/cli/src/export_metadata_cmd.rs&#xD;&#xA;&#xD;&#xA;However the output does not match the `state_getMetadata`. For example, frequency does not currently use or import the XCM pallets. `state_getMetadata` does NOT have any of the events from those pallets as expected. However, the metadata from the CLI DOES have those events.&#xD;&#xA;&#xD;&#xA;This is because the command is can pull from the chain state.&#xD;&#xA;&#xD;&#xA;How can I make sure that the `export_metadata_cmd.rs` never creates or uses the data from prior state?&#xD;&#xA;&#xD;&#xA;In effect I always want to run this cli command with `--tmp`." ContentLicense="CC BY-SA 4.0" />
  <row Id="26507" PostHistoryTypeId="2" PostId="6929" RevisionGUID="6ce12629-8ca6-4e84-8431-3b5c0230f450" CreationDate="2023-01-27T16:39:07.043" UserId="245" Text="I need to use `HashMap` in my struct that I store in StorageMap. As I searched online and other Substrate pallets, I didn't see that being used.&#xD;&#xA;&#xD;&#xA;I came across `use scale_info::prelude::collections::HashMap;` but I don't think it's SCALE encodable. &#xD;&#xA;&#xD;&#xA;Is there a way to use a `HashMap` in my pallet? What are the best practices or alternatives that I can use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26509" PostHistoryTypeId="1" PostId="6929" RevisionGUID="6ce12629-8ca6-4e84-8431-3b5c0230f450" CreationDate="2023-01-27T16:39:07.043" UserId="245" Text="Can I store a HashMap in StorageMap?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26510" PostHistoryTypeId="3" PostId="6929" RevisionGUID="6ce12629-8ca6-4e84-8431-3b5c0230f450" CreationDate="2023-01-27T16:39:07.043" UserId="245" Text="|pallet|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26511" PostHistoryTypeId="4" PostId="6916" RevisionGUID="1fb87c3f-d63e-4596-9991-04df66f623b8" CreationDate="2023-01-27T17:04:25.743" UserId="3054" Comment="edited title" Text="How to Start Parachain Node with disabled P2P?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26512" PostHistoryTypeId="2" PostId="6930" RevisionGUID="5c162b58-9548-4e43-adab-3bb2c7989506" CreationDate="2023-01-27T17:32:47.993" UserId="244" Text="Yes, there is an [open source][1] indexer and explorer called [Blockscout][2], which is fairly user-friendly. You can use for your Substrate-based EVM chain.&#xD;&#xA;&#xD;&#xA;Here are some examples of its usage by [Moonbeam][3] parachain and [CloudWalk][4] solochain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/blockscout/blockscout&#xD;&#xA;  [2]: https://www.blockscout.com/&#xD;&#xA;  [3]: https://blockscout.moonbeam.network/&#xD;&#xA;  [4]: https://explorer.mainnet.cloudwalk.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="26514" PostHistoryTypeId="2" PostId="6931" RevisionGUID="e2018329-6940-40c6-997d-a07d1518cd31" CreationDate="2023-01-27T17:38:52.293" UserId="251" Text="You should use `BTreeMap`, `HashMap` isn't available for the runtime storage.&#xD;&#xA;&#xD;&#xA;Or use the `StorageDoubleMap` storage type." ContentLicense="CC BY-SA 4.0" />
  <row Id="26516" PostHistoryTypeId="5" PostId="6927" RevisionGUID="10c08bf0-4f26-40c7-984e-6854bb2633db" CreationDate="2023-01-27T17:40:49.593" UserId="251" Comment="added 12 characters in body" Text="I've tried following the instructions and double checking evrything at each stage but I still end up with the following error... Any ideas please?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0282]: type annotations needed&#xD;&#xA;    --&gt; /Users/richard/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9&#xD;&#xA;     |&#xD;&#xA;541  |                   let accuracy = P::ACCURACY.saturated_into();&#xD;&#xA;     |                       ^^^^^^^^&#xD;&#xA;...&#xD;&#xA;1614 | / implement_fixed!(&#xD;&#xA;1615 | |     FixedU128,&#xD;&#xA;1616 | |     test_fixed_u128,&#xD;&#xA;1617 | |     u128,&#xD;&#xA;...    |&#xD;&#xA;1621 | |         [0.000000000000000000, 340282366920938463463.374607431768211455]_&quot;,&#xD;&#xA;1622 | | );&#xD;&#xA;     | |_- in this macro invocation&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `implement_fixed` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: consider giving `accuracy` an explicit type&#xD;&#xA;     |&#xD;&#xA;541  |                 let accuracy: _ = P::ACCURACY.saturated_into();&#xD;&#xA;     |                             +++&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0282`.&#xD;&#xA;error: could not compile `sp-arithmetic` due to 3 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;richard@richardimac substrate-node-template % &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26517" PostHistoryTypeId="2" PostId="6932" RevisionGUID="9d13a37f-0de0-4594-b616-34ce6f3dbe34" CreationDate="2023-01-27T17:42:52.790" UserId="251" Text="sp-arithmetic-2.0 is a pretty old version. It was released two years ago.&#xD;&#xA;&#xD;&#xA;So, downgrade your rust toolchain version or upgrade the sp-arithmetic version." ContentLicense="CC BY-SA 4.0" />
  <row Id="26519" PostHistoryTypeId="2" PostId="6933" RevisionGUID="caff6a41-27af-4e05-a8a2-5624e835f44e" CreationDate="2023-01-27T17:44:54.820" UserId="300" Text="Found one fix: https://github.com/LibertyDSNP/frequency/pull/987&#xD;&#xA;&#xD;&#xA;This uses `impl CliConfiguration` to force the base_path to a temp directory. Feels like it shouldn't need this, but it works.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl CliConfiguration for ExportMetadataCmd {&#xD;&#xA;  // We never want to use any stored data. Always just use fresh.&#xD;&#xA;  fn base_path(&amp;self) -&gt; Result&lt;Option&lt;sc_service::BasePath&gt;, sc_cli::Error&gt; {&#xD;&#xA;    Ok(Some(sc_service::BasePath::new_temp_dir()?))&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26521" PostHistoryTypeId="5" PostId="6919" RevisionGUID="b7821eca-a588-45ee-97c4-73798006087a" CreationDate="2023-01-27T19:26:52.740" UserId="3755" Comment="added 285 characters in body" Text="I am trying to reimplement one of the Substrate tutorials:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/get-started/upgrade-a-running-network/&#xD;&#xA;&#xD;&#xA;But I am stuck with an issue - where it says to do Scheduler -&gt; Schedule -&gt; sudo transaction to set code with the new runtime version when I try to sign this transaction (scheduled in 20+ blocks from the current block like it says in the tutorial) I am getting the following error:&#xD;&#xA;&#xD;&#xA;[![Screenshot with error on the request page ][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I go to Network -&gt; explorer I see this:&#xD;&#xA;&#xD;&#xA;    sudo.Sudid&#xD;&#xA;    A sudo just took place. [result] &#xD;&#xA;    sudoResult: Result&lt;Null, SpRuntimeDispatchError&gt;&#xD;&#xA;    Err&#xD;&#xA;    DispatchError&#xD;&#xA;    Exhausted&#xD;&#xA;Full error backlog below:&#xD;&#xA;[![UP][2]][2]&#xD;&#xA;[![MID][3]][3]&#xD;&#xA;[![DOWN][4]][4]&#xD;&#xA;&#xD;&#xA;Had anyone faced this before? And how do you solve it?&#xD;&#xA;It is a tutorial and based on demo pre-defined data, so &quot;not enough moneyunits to pay for your gas&quot; shouldn't be an issue, I would imagine.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**UPD:**&#xD;&#xA;The question is specifically about the second part of the Substrate tutorial - where they use Scheduler pallet and sudo query to schedule runtime upgrade. This part:&#xD;&#xA;[![Using Scheduler pallet instead of unchecked weights][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/W9qFA.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/CamGD.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/Sxej4.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/L8dxj.jpg&#xD;&#xA;  [5]: https://i.stack.imgur.com/oxKXM.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="26522" PostHistoryTypeId="2" PostId="6934" RevisionGUID="8c1539b1-7157-442a-ae53-11bf978fc6d1" CreationDate="2023-01-27T20:50:07.950" UserId="167" Text="&gt; You should use BTreeMap, HashMap isn't available for the runtime storage.&#xD;&#xA;&#xD;&#xA;The underlying reason being that `HashMaps` have undeterministic behavior, therefore could likely break your consensus. Otherwise you are free to use it from `core::collections`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26524" PostHistoryTypeId="2" PostId="6935" RevisionGUID="17135ae9-98f9-4f5e-952b-5717b8db786b" CreationDate="2023-01-27T21:17:37.193" UserId="73" Text="A `StorageMap` is already a key -&gt; value mapping. If you need more keys, you can also use a `NMap` which can have multiple keys.&#xD;&#xA;&#xD;&#xA;`HashMap` doesn't work in `no_std` as it requires randomness which isn't available. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26526" PostHistoryTypeId="2" PostId="6936" RevisionGUID="0335e0b5-02e5-4437-bb87-4c3625ff2f8e" CreationDate="2023-01-27T21:19:25.007" UserId="73" Text="You can run with `--in-peers 0 --out-peers 0` to prevent `sync` connecting to any peers. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26528" PostHistoryTypeId="2" PostId="6937" RevisionGUID="5a5b99d6-712e-4074-a461-e3158d9abef3" CreationDate="2023-01-27T21:28:34.350" UserId="73" Text="The storage proof (which is part of the Pov) is only collected while building a block. Each storage read that happens in this process is going into the storage proof.&#xD;&#xA;&#xD;&#xA;When you are doing RPC calls, these are offchain calls which don't happen as part of the block building. So, they don't increase the PoV. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26530" PostHistoryTypeId="2" PostId="6938" RevisionGUID="d3a20502-9d09-4fb5-a26c-8a36a5b9523a" CreationDate="2023-01-27T21:41:00.917" UserId="73" Text="`-l` is essentially the same as `RUST_LOG`(which we also support BTW). You can pass the following values:&#xD;&#xA;&#xD;&#xA;- One log level (`error`, `warn`, `info`, `debug`, `trace`) that applies to all targets.&#xD;&#xA;- target=log level. The target is what you can specify as `target` to the logging macros or the crate name if you don't pass a `target`.&#xD;&#xA;&#xD;&#xA;We are using `tracing` for logging which is a compatible `log` implementation. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26532" PostHistoryTypeId="2" PostId="6939" RevisionGUID="dce304ac-fe50-496c-8a8c-356232869077" CreationDate="2023-01-27T22:15:29.943" UserId="298" Text="In rust I use:&#xD;&#xA;&#xD;&#xA;`.into_sub_account_truncating()`&#xD;&#xA;&#xD;&#xA;is there a javascript equivalent?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26534" PostHistoryTypeId="1" PostId="6939" RevisionGUID="dce304ac-fe50-496c-8a8c-356232869077" CreationDate="2023-01-27T22:15:29.943" UserId="298" Text="is there a .into_sub_account_truncating equivlent for javascript?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26535" PostHistoryTypeId="3" PostId="6939" RevisionGUID="dce304ac-fe50-496c-8a8c-356232869077" CreationDate="2023-01-27T22:15:29.943" UserId="298" Text="|polkadot-js|api|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26536" PostHistoryTypeId="2" PostId="6940" RevisionGUID="ca8f4b4c-0504-4f86-933b-81132587bf49" CreationDate="2023-01-27T23:29:21.220" UserId="94" Text="There was a recent change to the scheduler pallet which makes it now precisely meter its own weight consumption. The tutorial was probably not updated yet.  &#xD;&#xA;This leads to a situation where a full block cannot be consumed by a scheduled task anymore, since the scheduler already deduced his own cost from the full block.  &#xD;&#xA;The proper solution is to benchmark it, which will happen [here](https://github.com/paritytech/substrate/issues/13192).  &#xD;&#xA;&#xD;&#xA;The current make-shift solution (which was also applied on Polkadot) is to use `Utility::with_weight`. This call can be used to wrap any other call and explicitly force it to use a specific weight. So instead of consuming a full block, you can force it to consume just 10% to make it work. So instead of sending `System::set_code(…` you send `Utility::with_weight(System::set_code(…`.&#xD;&#xA;&#xD;&#xA;On a relay and solo chain this is not of much concern, since the only bad thing would be longer block time for that one block. On a para-chain this could lead to problems if the para-chain misses its block production slot or goes overweight with the block." ContentLicense="CC BY-SA 4.0" />
  <row Id="26538" PostHistoryTypeId="52" PostId="6929" RevisionGUID="5d06c1f1-8e2c-4532-944c-db0414f12b3c" CreationDate="2023-01-28T00:39:28.307" />
  <row Id="26539" PostHistoryTypeId="2" PostId="6941" RevisionGUID="4c4f9578-8dd9-490f-81cc-65d934a151b1" CreationDate="2023-01-28T01:27:08.950" UserId="94" Text="Subwasm works on a whole runtime block. It could probably be changed, but I rather created [submeta](https://github.com/ggwpez/submeta).  &#xD;&#xA;You can use it with a stored encoded metadata from an RPC like this: &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getMetadata&quot;}' https://rpc.polkadot.io:443 |\&#xD;&#xA;jq '.result' -r |\&#xD;&#xA;submeta pallets --with-storage&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or from a local file:&#xD;&#xA;```bash&#xD;&#xA;cat metadata.json | jq metadata.json '.result' -r | submeta pallets --with-storage&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26541" PostHistoryTypeId="2" PostId="6942" RevisionGUID="312d84ef-000c-4b68-910b-b684b7754335" CreationDate="2023-01-28T05:59:18.600" UserId="3667" Text="This is on my screen as I compile the substrate parachain template: &#xD;&#xA;```&#xD;&#xA;Building: kusama-runtime(build), polkadot-runtime(build), parachain-template-runtime(build)                                                      &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Why does it need to build the kusama and polkadot runtime for a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26543" PostHistoryTypeId="1" PostId="6942" RevisionGUID="312d84ef-000c-4b68-910b-b684b7754335" CreationDate="2023-01-28T05:59:18.600" UserId="3667" Text="Why does building the parachain template build the polkadot and kusama runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26544" PostHistoryTypeId="3" PostId="6942" RevisionGUID="312d84ef-000c-4b68-910b-b684b7754335" CreationDate="2023-01-28T05:59:18.600" UserId="3667" Text="|substrate-parachain-template|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26545" PostHistoryTypeId="2" PostId="6943" RevisionGUID="2a30cb8b-c6f9-48bb-957e-b1c704ad80bd" CreationDate="2023-01-28T06:41:46.813" UserId="251" Text="You could figure out this yourself.&#xD;&#xA;&#xD;&#xA;Just check the lock file.&#xD;&#xA;&#xD;&#xA;Let's take parachain-template as an example.&#xD;&#xA;&#xD;&#xA;1. search `polkadot-runtime`&#xD;&#xA;2. found `polkadot-service` depends on `polkadot-runtime`&#xD;&#xA;3. search `polkadot-service`&#xD;&#xA;4. found `cumulus-relay-chain-inprocess-interface` depends on `polkadot-service`&#xD;&#xA;5. search `cumulus-relay-chain-inprocess-interface`&#xD;&#xA;6. found `parachain-template-node` depends on `cumulus-relay-chain-inprocess-interface`&#xD;&#xA;&#xD;&#xA;That's it.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-parachain-template/blob/677a1a238a9592d0c8f1f0a4b7477b031da76c20/Cargo.lock#L6158" ContentLicense="CC BY-SA 4.0" />
  <row Id="26547" PostHistoryTypeId="50" PostId="6087" RevisionGUID="36a044d6-f4d5-4868-8c25-f3eb9d6e97eb" CreationDate="2023-01-28T10:00:25.140" UserId="-1" />
  <row Id="26548" PostHistoryTypeId="50" PostId="6486" RevisionGUID="6951826d-8938-40a0-8164-79173cd9fd1d" CreationDate="2023-01-28T11:01:15.167" UserId="-1" />
  <row Id="26549" PostHistoryTypeId="2" PostId="6944" RevisionGUID="5b5de080-63b4-4f05-b7f3-49c137b557b1" CreationDate="2023-01-28T11:54:11.790" UserId="3214" Text="I solved my issue by monkey patching the `toHuman()` method of `AbstractInt`. Now I can call `toHuman()` on any object and all nested ints will convert the way I need them. Not a clean solution, but in my case it does the job.&#xD;&#xA;&#xD;&#xA;    import {AbstractInt} from &quot;@polkadot/types-codec/abstract/Int&quot;;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    AbstractInt.prototype.toHuman = function (isExpanded?: boolean): any {&#xD;&#xA;        if(this.bitLength() &lt;= 64) {&#xD;&#xA;            return this.toPrimitive();&#xD;&#xA;        }&#xD;&#xA;        return this.toBn().toString();&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26551" PostHistoryTypeId="50" PostId="6500" RevisionGUID="ec1f58c0-8879-419b-b2c4-be890a26d2c0" CreationDate="2023-01-28T12:05:15.577" UserId="-1" />
  <row Id="26552" PostHistoryTypeId="2" PostId="6945" RevisionGUID="7a02066b-9e18-4622-89ff-d38caaa9be15" CreationDate="2023-01-28T12:59:38.150" UserId="167" Text="Totally possible. The reward paid our per era is provided to staking as [`type EraPayout`](https://paritytech.github.io/substrate/master/pallet_staking/trait.Config.html#associatedtype.EraPayout), which can be anything that implements [`trait EraPayout`](https://paritytech.github.io/substrate/master/pallet_staking/trait.EraPayout.html). You can have an implementation for this trait that ignores all the inputs and provides a constant value at each era. &#xD;&#xA;&#xD;&#xA;A substrate-idiomatic way of doing that would be: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Assuming this balance type.&#xD;&#xA;type Balance = u128;&#xD;&#xA;&#xD;&#xA;pub struct FixedEraPayout&lt;P: Get&lt;Balance&gt;&gt;(sp_std::marker::PhantomData&lt;P&gt;);&#xD;&#xA;impl&lt;P: Get&lt;Balance&gt;&gt; EraPayout&lt;Balance&gt; for FixedEraPayout&lt;P&gt; {&#xD;&#xA;	fn era_payout(&#xD;&#xA;			_total_staked: Balance,&#xD;&#xA;			_total_issuance: Balance,&#xD;&#xA;			_era_duration_millis: u64,&#xD;&#xA;		) -&gt; (Balance, Balance) {&#xD;&#xA;		(P::get(), 0)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can reuse e.g. `FixedEraPayout&lt;ConstU128&lt;100_000&gt;&gt;` in different runtimes." ContentLicense="CC BY-SA 4.0" />
  <row Id="26554" PostHistoryTypeId="2" PostId="6946" RevisionGUID="58300aaa-b7da-4429-845e-047114e8e7b2" CreationDate="2023-01-28T16:36:24.133" UserId="2722" Text="i want to add pallet-contract in my project , it show me error when run this command : `cargo check`&#xD;&#xA; **Error :**&#xD;&#xA;&#xD;&#xA;         error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:190:4&#xD;&#xA;          |&#xD;&#xA;      190 |             let Ok(end) = args.end.base10_parse::&lt;u32&gt;() else { return invalid_param(args.end.span()) };&#xD;&#xA;          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:189:4&#xD;&#xA;          |&#xD;&#xA;      189 |             let Ok(start) = args.start.base10_parse::&lt;u32&gt;() else { return invalid_param(args.start.span()) };&#xD;&#xA;          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:188:4&#xD;&#xA;          |&#xD;&#xA;      188 |             let Ok(args) = syn::parse::&lt;RangeArgs&gt;(args) else { return invalid_param(typ.span()) };&#xD;&#xA;          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:186:4&#xD;&#xA;          |&#xD;&#xA;      186 |             let Some(segment) = tpath.path.segments.last() else { return invalid_param(typ.span()) };&#xD;&#xA;          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:185:4&#xD;&#xA;          |&#xD;&#xA;      185 |             let Type::Path(tpath) = typ else { return invalid_param(typ.span()) };&#xD;&#xA;          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:178:4&#xD;&#xA;          |&#xD;&#xA;      178 |             let Some(name_char) = name.chars().next() else { return invalid_param_name() };&#xD;&#xA;          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:164:4&#xD;&#xA;          |&#xD;&#xA;      164 |             let Pat::Ident(ident) = &amp;*arg.pat else { return invalid_param(arg.span()) };&#xD;&#xA;          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:163:4&#xD;&#xA;          |&#xD;&#xA;      163 |             let FnArg::Typed(arg) = arg else { return invalid_param(arg.span()) };&#xD;&#xA;          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:215:6&#xD;&#xA;          |&#xD;&#xA;      215 | /                     let Some(origin) = expr_call.args.first().cloned() else {&#xD;&#xA;      216 | |                         return Some(Err(Error::new(expr_call.span(), &quot;Single-item extrinsic calls must specify their origin as th...&#xD;&#xA;      217 | |                     };&#xD;&#xA;          | |______________________^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:293:3&#xD;&#xA;          |&#xD;&#xA;      293 |         let Item::Fn(func) = stmt else { return None };&#xD;&#xA;          |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:681:6&#xD;&#xA;          |&#xD;&#xA;      681 |                     let Some(segment) = expr_path.path.segments.last() else { return call_err(); };&#xD;&#xA;          |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      error[E0658]: `let...else` statements are unstable&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/52d72b3/frame/support/procedural/src/benchmark.rs:687:6&#xD;&#xA;          |&#xD;&#xA;      687 |                     let Ok(_) = syn::parse::&lt;Token![_]&gt;(tokens.to_token_stream().into()) else { return call_err(); };&#xD;&#xA;          |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;          |&#xD;&#xA;          = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;          = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;    &#xD;&#xA;      For more information about this error, try `rustc --explain E0658`.&#xD;&#xA;      error: could not compile `frame-support-procedural` due to 12 previous errors&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i did these steps : &#xD;&#xA;&#xD;&#xA;[Repository][1]&#xD;&#xA;&#xD;&#xA;**Step One : Add Depency Pallets**&#xD;&#xA;&#xD;&#xA;        pallet-contracts = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-contracts-primitives = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;**Step Two : Add Pallets Config**&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;        parameter_types! {&#xD;&#xA;        pub TombstoneDeposit: Balance = deposit(&#xD;&#xA;            1,&#xD;&#xA;            &lt;pallet_contracts::Pallet&lt;Runtime&gt;&gt;::contract_info_size()&#xD;&#xA;        );&#xD;&#xA;        pub DepositPerContract: Balance = TombstoneDeposit::get();&#xD;&#xA;        pub const DepositPerStorageByte: Balance = deposit(0, 1);&#xD;&#xA;        pub const DepositPerStorageItem: Balance = deposit(1, 0);&#xD;&#xA;        pub RentFraction: Perbill = Perbill::from_rational(1u32, 30 * DAYS);&#xD;&#xA;        pub const SurchargeReward: Balance = 150 * MILLICENTS;&#xD;&#xA;        pub const SignedClaimHandicap: u32 = 2;&#xD;&#xA;        pub const MaxValueSize: u32 = 16 * 1024;&#xD;&#xA;        // The lazy deletion runs inside on_initialize.&#xD;&#xA;        pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *&#xD;&#xA;         BlockWeights::get().max_block;&#xD;&#xA;        // The weight needed for decoding the queue should be less or equal than a fifth&#xD;&#xA;        // of the overall weight dedicated to the lazy deletion.&#xD;&#xA;        pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (&#xD;&#xA;            &lt;Runtime as pallet_contracts::Config&gt;::WeightInfo::on_initialize_per_queue_item(1) -&#xD;&#xA;            &lt;Runtime as pallet_contracts::Config&gt;::WeightInfo::on_initialize_per_queue_item(0)&#xD;&#xA;         )) / 5) as u32;&#xD;&#xA;    &#xD;&#xA;        pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_contracts::Config for Runtime {&#xD;&#xA;        type Time = Timestamp;&#xD;&#xA;        type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;        type Currency = Balances;&#xD;&#xA;        type Event = Event;&#xD;&#xA;        type RentPayment = ();&#xD;&#xA;        type SignedClaimHandicap = SignedClaimHandicap;&#xD;&#xA;        type TombstoneDeposit = TombstoneDeposit;&#xD;&#xA;        type DepositPerContract = DepositPerContract;&#xD;&#xA;        type DepositPerStorageByte = DepositPerStorageByte;&#xD;&#xA;        type DepositPerStorageItem = DepositPerStorageItem;&#xD;&#xA;        type RentFraction = RentFraction;&#xD;&#xA;        type SurchargeReward = SurchargeReward;&#xD;&#xA;        type WeightPrice = pallet_transaction_payment::Module&lt;Self&gt;;&#xD;&#xA;        type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;        type ChainExtension = ();&#xD;&#xA;        type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;        type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;        type Call = Call;&#xD;&#xA;        /// The safest default is to allow no calls at all.&#xD;&#xA;        ///&#xD;&#xA;        /// Runtimes should whitelist dispatchables that are allowed to be called from contracts&#xD;&#xA;        /// and make sure they are stable. Dispatchables exposed to contracts are not allowed to&#xD;&#xA;        /// change because that would break already deployed contracts. The `Call` structure itself&#xD;&#xA;        /// is not allowed to change the indices of existing pallets, too.&#xD;&#xA;        type CallFilter = Nothing;&#xD;&#xA;        type Schedule = Schedule;&#xD;&#xA;        type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this problem ?**&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_dex" ContentLicense="CC BY-SA 4.0" />
  <row Id="26556" PostHistoryTypeId="1" PostId="6946" RevisionGUID="58300aaa-b7da-4429-845e-047114e8e7b2" CreationDate="2023-01-28T16:36:24.133" UserId="2722" Text="`let...else` statements are unstable when i need to use pallet-contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="26557" PostHistoryTypeId="3" PostId="6946" RevisionGUID="58300aaa-b7da-4429-845e-047114e8e7b2" CreationDate="2023-01-28T16:36:24.133" UserId="2722" Text="|substrate-node-template|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26558" PostHistoryTypeId="2" PostId="6947" RevisionGUID="e67dd1de-33e9-4ce9-b96a-e66d7af9bd2b" CreationDate="2023-01-28T17:31:42.627" UserId="73" Text="You need to update your `rustc` to at least 1.65. With 1.65 this syntax was stabilized. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26560" PostHistoryTypeId="5" PostId="6939" RevisionGUID="097b1178-dd3b-4bbe-8cdd-27db3cb9531e" CreationDate="2023-01-28T17:59:12.570" UserId="83" Comment="Fix casing" Text="In rust I use:&#xD;&#xA;&#xD;&#xA;`.into_sub_account_truncating()`&#xD;&#xA;&#xD;&#xA;Is there a Javascript equivalent?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26561" PostHistoryTypeId="4" PostId="6939" RevisionGUID="097b1178-dd3b-4bbe-8cdd-27db3cb9531e" CreationDate="2023-01-28T17:59:12.570" UserId="83" Comment="Fix casing" Text="Is there a .into_sub_account_truncating equivalent for Javascript?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26562" PostHistoryTypeId="2" PostId="6948" RevisionGUID="dc43f30a-00b9-43ac-b319-5cc669466126" CreationDate="2023-01-28T20:26:12.200" UserId="49" Text="You can use [this code snippet](https://github.com/shawntabrizi/substrate-js-utilities/blob/6062b9b5c69e6c384a773c9fac940fd461a8b845/utilities.js#L279-L305) to derive a sub account. You can test it out at [this page](https://www.shawntabrizi.com/substrate-js-utilities/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="26564" PostHistoryTypeId="2" PostId="6949" RevisionGUID="5a57f9c2-d682-4807-94cc-cc637b673285" CreationDate="2023-01-28T20:55:58.940" UserId="1961" Text="I'm trying to design a custom pallet with bounded vectors, but I want to leave the user to define the size of the bounds according to their implementation, so I use the next type:&#xD;&#xA;&#xD;&#xA;``` #[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_aura::Config {&#xD;&#xA;		...&#xD;&#xA;		&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxDelegations: Get&lt;u32&gt;;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxAuthorities: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;``` &#xD;&#xA;And I use them in the next struct:&#xD;&#xA;&#xD;&#xA;``` #[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone)]&#xD;&#xA;	pub struct DelegatorConfig&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;		pub is_validator: bool,&#xD;&#xA;		pub delegated_points: Balance,&#xD;&#xA;		pub delegates: BoundedVec&lt;(AccountId, Balance), T::MaxDelegations&gt;,&#xD;&#xA;	}&#xD;&#xA;``` &#xD;&#xA;And this storage&#xD;&#xA;``` &#xD;&#xA;#[pallet::storage]&#xD;&#xA;	pub type Delegators&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		DelegatorConfig&lt;T::AccountId, BalanceOf&lt;T&gt;, T::MaxDelegations&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;``` &#xD;&#xA;But now the compilers sends me this error message, what didn't happen when I just used ``` Const&lt;U32&gt;```  for the bound. Any idea what I am missing?&#xD;&#xA;I'm pasting the full code next:&#xD;&#xA;``` &#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;/// Edit this file to define custom logic or remove it if it is not needed.&#xD;&#xA;/// Learn more about FRAME and the core library of Substrate FRAME pallets:&#xD;&#xA;/// &lt;https://docs.substrate.io/reference/frame-pallets/&gt;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod mock;&#xD;&#xA;&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests;&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benchmarking;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_support::bounded_vec;&#xD;&#xA;	use frame_support::pallet_prelude::DispatchResult;&#xD;&#xA;	use frame_support::traits::tokens::Balance;&#xD;&#xA;	use frame_support::traits::{LockIdentifier, WithdrawReasons};&#xD;&#xA;	use frame_support::{&#xD;&#xA;		pallet_prelude::*,&#xD;&#xA;		traits::{Currency, FindAuthor, LockableCurrency, ReservableCurrency},&#xD;&#xA;	};&#xD;&#xA;	use frame_system::pallet_prelude::{OriginFor, *};&#xD;&#xA;	use sp_consensus_aura::{Slot, AURA_ENGINE_ID};&#xD;&#xA;	use sp_runtime::traits::Convert;&#xD;&#xA;	use sp_runtime::traits::{CheckedAdd, CheckedSub};&#xD;&#xA;&#xD;&#xA;	pub type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;	const LOCK_ID: LockIdentifier = *b&quot;1       &quot;;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_aura::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		/// Type to access the Balances Pallet.&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt;&#xD;&#xA;			+ ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;			+ LockableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		/// A conversion function which takes an authority id, and returns the associated account id.&#xD;&#xA;		type AuthorityToAccount: Convert&lt;Self::AuthorityId, Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		type ValidatorBond: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;		&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxDelegations: Get&lt;u32&gt;;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxAuthorities: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// Pallets use events to inform users when important changes are made.&#xD;&#xA;	// https://docs.substrate.io/main-docs/build/events-errors/&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {}&#xD;&#xA;&#xD;&#xA;	// Errors inform users that something went wrong.&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		/// Too many authorities for Aura's limits.&#xD;&#xA;		TooManyAuthorities,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone)]&#xD;&#xA;	pub struct ValidatorConfig&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;		pub is_active: bool,&#xD;&#xA;		pub points: Balance,&#xD;&#xA;		pub delegators: BoundedVec&lt;(AccountId, Balance), T::MaxDelegations&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone)]&#xD;&#xA;	pub struct DelegatorConfig&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;		pub is_validator: bool,&#xD;&#xA;		pub delegated_points: Balance,&#xD;&#xA;		pub delegates: BoundedVec&lt;(AccountId, Balance), T::MaxDelegations&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(&#xD;&#xA;		Default, Clone, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen,&#xD;&#xA;	)]&#xD;&#xA;	pub struct TotalStake&lt;Balance&gt; {&#xD;&#xA;		pub validators: Balance,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone)]&#xD;&#xA;	pub struct Candidates&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;		pub authorities: BoundedVec&lt;(AccountId, Balance),  &lt;T as pallet::Config&gt;::MaxAuthorities&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Validators&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		ValidatorConfig&lt;T::AccountId, BalanceOf&lt;T&gt;, T::MaxDelegations&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Delegators&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		DelegatorConfig&lt;T::AccountId, BalanceOf&lt;T&gt;, T::MaxDelegations&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type StakePool&lt;T: Config&gt; = StorageValue&lt;_, TotalStake&lt;BalanceOf&lt;T&gt;&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type EnabledAuthorities&lt;T: Config&gt; =&#xD;&#xA;		StorageValue&lt;_, Candidates&lt;T::AccountId, BalanceOf&lt;T&gt;,  &lt;T as pallet::Config&gt;::MaxAuthorities&gt;, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;	// Dispatchable functions allows users to interact with the pallet and invoke state changes.&#xD;&#xA;	// These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;	// Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		/// An example of directly updating the authorities for Aura.&#xD;&#xA;		#[pallet::call_index(0)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn force_change_authorities(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			who: T::AuthorityId,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			ensure_root(origin)?;&#xD;&#xA;			let mut authorities = BoundedVec::&lt;T::AuthorityId, T::MaxAuthorities&gt;::default();&#xD;&#xA;			authorities.try_push(who).map_err(|_| Error::&lt;T&gt;::TooManyAuthorities)?;&#xD;&#xA;			pallet_aura::Pallet::&lt;T&gt;::change_authorities(authorities);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(1)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn register_validator(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let default_config = ValidatorConfig {&#xD;&#xA;				is_active: true,&#xD;&#xA;				points: Default::default(),&#xD;&#xA;				delegators: bounded_vec![],&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			// reserve some balance from the user&#xD;&#xA;			T::Currency::reserve(&amp;who, T::ValidatorBond::get())?;&#xD;&#xA;&#xD;&#xA;			Validators::&lt;T&gt;::insert(who.clone(), default_config);&#xD;&#xA;			Pallet::&lt;T&gt;::check_candidate(who);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(2)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn delegate(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			validator: T::AccountId,&#xD;&#xA;			new_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// THERE ARE ERRORS HERE. DONT USE DIRECTLY. THINK ABOUT MULTI DELEGATION SCENARIO&#xD;&#xA;&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			let amount = new_amount.clone();&#xD;&#xA;			let mut validator_config = Validators::&lt;T&gt;::get(&amp;validator).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;&#xD;&#xA;			let mut delegator_config;&#xD;&#xA;&#xD;&#xA;			if Delegators::&lt;T&gt;::get(&amp;who).is_some() {&#xD;&#xA;				delegator_config = Delegators::&lt;T&gt;::get(&amp;who).unwrap();&#xD;&#xA;			} else {&#xD;&#xA;				Pallet::&lt;T&gt;::register_delegator(who.clone());&#xD;&#xA;				delegator_config = Delegators::&lt;T&gt;::get(&amp;who).unwrap();&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			let new_delegation_amount =&#xD;&#xA;				delegator_config.delegated_points.checked_add(&amp;new_amount).unwrap();&#xD;&#xA;&#xD;&#xA;			ensure!(T::Currency::free_balance(&amp;who) &gt;= new_amount, &quot;not enough funds&quot;);&#xD;&#xA;			T::Currency::set_lock(LOCK_ID, &amp;who, new_amount, WithdrawReasons::all());&#xD;&#xA;&#xD;&#xA;			ensure!(!validator_config.delegators.is_full(), &quot;overflow&quot;);&#xD;&#xA;&#xD;&#xA;			let pos_val = validator_config.delegators.iter().position(|(x, _)| x == &amp;who);&#xD;&#xA;			delegator_config.delegated_points = new_delegation_amount;&#xD;&#xA;			validator_config.points += amount;&#xD;&#xA;			if pos_val != None {&#xD;&#xA;				validator_config.delegators[pos_val.unwrap()].1 += amount;&#xD;&#xA;			} else {&#xD;&#xA;				validator_config.delegators.try_push((who.clone(), amount));&#xD;&#xA;			}&#xD;&#xA;			let pos_del = delegator_config.delegates.iter().position(|(x, _)| x == &amp;validator);&#xD;&#xA;			if pos_del != None {&#xD;&#xA;				delegator_config.delegates[pos_del.unwrap()].1 += amount;&#xD;&#xA;			} else {&#xD;&#xA;				delegator_config.delegates.try_push((validator.clone(), amount));&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if Validators::&lt;T&gt;::contains_key(validator.clone()) {&#xD;&#xA;				Validators::&lt;T&gt;::remove(validator.clone());&#xD;&#xA;				Validators::&lt;T&gt;::insert(validator.clone(), validator_config);&#xD;&#xA;			} else {&#xD;&#xA;				Validators::&lt;T&gt;::insert(validator.clone(), validator_config);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if Delegators::&lt;T&gt;::contains_key(who.clone()) {&#xD;&#xA;				Delegators::&lt;T&gt;::remove(who.clone());&#xD;&#xA;				Delegators::&lt;T&gt;::insert(who.clone(), delegator_config);&#xD;&#xA;			} else {&#xD;&#xA;				Delegators::&lt;T&gt;::insert(who.clone(), delegator_config);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			Pallet::&lt;T&gt;::increase_stake(amount);&#xD;&#xA;&#xD;&#xA;			Pallet::&lt;T&gt;::check_candidate(validator);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(3)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn revoke_delegate(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			validator: T::AccountId,&#xD;&#xA;			amount: BalanceOf&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			let other_who = who.clone();&#xD;&#xA;			let mut validator_config = Validators::&lt;T&gt;::get(&amp;validator).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;&#xD;&#xA;			let mut delegator_config = Delegators::&lt;T&gt;::get(&amp;who).unwrap();&#xD;&#xA;&#xD;&#xA;			ensure!(&#xD;&#xA;				!(validator_config.delegators.iter().find(|(x, _)| x == &amp;who) == None),&#xD;&#xA;				&quot;not a delegator of the current validator&quot;&#xD;&#xA;			);&#xD;&#xA;			let pos_val = validator_config.delegators.iter().position(|(x, _)| x == &amp;who).unwrap();&#xD;&#xA;			let validator_points = validator_config.points;&#xD;&#xA;			let validator_delegator_points = validator_config.delegators[pos_val].1;&#xD;&#xA;			ensure!(validator_delegator_points &gt;= amount, &quot;not enough delegated points&quot;);&#xD;&#xA;			let points_to_remove = std::cmp::min(amount, validator_delegator_points);&#xD;&#xA;			ensure!(validator_config.is_active, &quot;validator currently inactive&quot;);&#xD;&#xA;			validator_config.points =&#xD;&#xA;				validator_config.points.checked_sub(&amp;points_to_remove).ok_or(&quot;underflow&quot;)?;&#xD;&#xA;&#xD;&#xA;			let pos_del =&#xD;&#xA;				delegator_config.delegates.iter().position(|(x, _)| x == &amp;validator).unwrap();&#xD;&#xA;&#xD;&#xA;			let points_remaining = validator_delegator_points - points_to_remove;&#xD;&#xA;			if validator_delegator_points == points_to_remove {&#xD;&#xA;				validator_config.delegators.remove(pos_val);&#xD;&#xA;				delegator_config.delegates.remove(pos_del);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			let new_delegation_amount = delegator_config.delegated_points - points_to_remove;&#xD;&#xA;			delegator_config.delegated_points = new_delegation_amount;&#xD;&#xA;			T::Currency::remove_lock(LOCK_ID, &amp;who);&#xD;&#xA;			T::Currency::set_lock(LOCK_ID, &amp;who, new_delegation_amount, WithdrawReasons::all());&#xD;&#xA;&#xD;&#xA;			Validators::&lt;T&gt;::insert(validator.clone(), validator_config);&#xD;&#xA;			Delegators::&lt;T&gt;::insert(who.clone(), delegator_config);&#xD;&#xA;			Pallet::&lt;T&gt;::reduce_stake(amount);&#xD;&#xA;			Pallet::&lt;T&gt;::check_candidate(validator);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		// A function to get you an account id for the current block author.&#xD;&#xA;		fn find_author() -&gt; Option&lt;T::AccountId&gt; {&#xD;&#xA;			let digest = frame_system::Pallet::&lt;T&gt;::digest();&#xD;&#xA;			let pre_runtime_digests = digest.logs.iter().filter_map(|d| d.as_pre_runtime());&#xD;&#xA;&#xD;&#xA;			for (id, mut data) in pre_runtime_digests {&#xD;&#xA;				if id == AURA_ENGINE_ID {&#xD;&#xA;					let slot = Slot::decode(&amp;mut data).ok()?;&#xD;&#xA;					let author_index = *slot % pallet_aura::Pallet::&lt;T&gt;::authorities().len() as u64;&#xD;&#xA;					let validators = pallet_aura::Pallet::&lt;T&gt;::authorities();&#xD;&#xA;					let authority = validators.get(author_index as usize).cloned()?;&#xD;&#xA;					return Some(T::AuthorityToAccount::convert(authority));&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			None&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn get_slot() -&gt; Option&lt;sp_consensus_aura::Slot&gt; {&#xD;&#xA;			let digest = frame_system::Pallet::&lt;T&gt;::digest();&#xD;&#xA;			let pre_runtime_digests = digest.logs.iter().filter_map(|d| d.as_pre_runtime());&#xD;&#xA;&#xD;&#xA;			for (id, mut data) in pre_runtime_digests {&#xD;&#xA;				if id == AURA_ENGINE_ID {&#xD;&#xA;					let slot = Slot::decode(&amp;mut data).ok()?;&#xD;&#xA;					return Some(slot);&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			None&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn increase_stake(amount: BalanceOf&lt;T&gt;) {&#xD;&#xA;			let mut stake;&#xD;&#xA;			match StakePool::&lt;T&gt;::try_get() {&#xD;&#xA;				Ok(x) =&gt; {&#xD;&#xA;					stake = x;&#xD;&#xA;					stake.validators += amount;&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;				Err(_) =&gt; {&#xD;&#xA;					stake = TotalStake { validators: amount };&#xD;&#xA;					stake.validators = amount;&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn reduce_stake(amount: BalanceOf&lt;T&gt;) {&#xD;&#xA;			let mut stake;&#xD;&#xA;			match StakePool::&lt;T&gt;::try_get() {&#xD;&#xA;				Ok(x) =&gt; {&#xD;&#xA;					stake = x;&#xD;&#xA;					stake.validators -= amount;&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;				Err(_) =&gt; {&#xD;&#xA;					stake = TotalStake { validators: Default::default() };&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;			};&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn check_candidate(candidate: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;			let mut candidates = EnabledAuthorities::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;			match candidates {&#xD;&#xA;				Some(x) =&gt; {&#xD;&#xA;					let mut candidates = x;&#xD;&#xA;					candidates.authorities.sort_by(|(_, a), (_, b)| a.partial_cmp(b).unwrap());&#xD;&#xA;					let candidate_balance =&#xD;&#xA;						Validators::&lt;T&gt;::get(&amp;candidate).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;					match candidate_balance.points &gt; candidates.authorities[0].1 {&#xD;&#xA;						true =&gt; match candidate == candidates.authorities[0].0 {&#xD;&#xA;							true =&gt; {&#xD;&#xA;								candidates.authorities[0].1 = candidate_balance.points;&#xD;&#xA;								EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;							},&#xD;&#xA;							false =&gt; {&#xD;&#xA;								candidates.authorities[0] = (candidate, candidate_balance.points);&#xD;&#xA;								EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;							},&#xD;&#xA;						},&#xD;&#xA;						false =&gt; match candidate == candidates.authorities[0].0 {&#xD;&#xA;							true =&gt; {&#xD;&#xA;								candidates.authorities[0].1 = candidate_balance.points;&#xD;&#xA;								EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;							},&#xD;&#xA;							false =&gt; {&#xD;&#xA;								let mut pos = candidates&#xD;&#xA;									.authorities&#xD;&#xA;									.iter()&#xD;&#xA;									.position(|(x, _)| *x == candidate);&#xD;&#xA;								match pos {&#xD;&#xA;									Some(p) =&gt; {&#xD;&#xA;										candidates.authorities.remove(p);&#xD;&#xA;										EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;									},&#xD;&#xA;									None =&gt; (),&#xD;&#xA;								}&#xD;&#xA;							},&#xD;&#xA;						},&#xD;&#xA;					}&#xD;&#xA;				},&#xD;&#xA;&#xD;&#xA;				None =&gt; {&#xD;&#xA;					let candidate_balance =&#xD;&#xA;						Validators::&lt;T&gt;::get(&amp;candidate).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;					let mut candidates = Candidates { authorities: Default::default() };&#xD;&#xA;					let tuple = (candidate, candidate_balance.points);&#xD;&#xA;					candidates.authorities.try_push(tuple);&#xD;&#xA;					EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;				},&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn register_delegator(who: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;			let default_config = DelegatorConfig {&#xD;&#xA;				is_validator: false,&#xD;&#xA;				delegated_points: Default::default(),&#xD;&#xA;				delegates: bounded_vec![],&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			Delegators::&lt;T&gt;::insert(who, default_config);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="26566" PostHistoryTypeId="1" PostId="6949" RevisionGUID="5a57f9c2-d682-4807-94cc-cc637b673285" CreationDate="2023-01-28T20:55:58.940" UserId="1961" Text="the trait bound `&lt;T as frame_system::Config&gt;::AccountId: pallet::Config` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="26567" PostHistoryTypeId="3" PostId="6949" RevisionGUID="5a57f9c2-d682-4807-94cc-cc637b673285" CreationDate="2023-01-28T20:55:58.940" UserId="1961" Text="|pallet|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26568" PostHistoryTypeId="5" PostId="6949" RevisionGUID="b9d1ad86-62a4-46fc-8086-95f06499772d" CreationDate="2023-01-28T20:58:15.080" UserId="1961" Comment="added 4503 characters in body" Text="I'm trying to design a custom pallet with bounded vectors, but I want to leave the user to define the size of the bounds according to their implementation, so I use the next type:&#xD;&#xA;&#xD;&#xA;``` #[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_aura::Config {&#xD;&#xA;		...&#xD;&#xA;		&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxDelegations: Get&lt;u32&gt;;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxAuthorities: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;``` &#xD;&#xA;And I use them in the next struct:&#xD;&#xA;&#xD;&#xA;``` #[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone)]&#xD;&#xA;	pub struct DelegatorConfig&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;		pub is_validator: bool,&#xD;&#xA;		pub delegated_points: Balance,&#xD;&#xA;		pub delegates: BoundedVec&lt;(AccountId, Balance), T::MaxDelegations&gt;,&#xD;&#xA;	}&#xD;&#xA;``` &#xD;&#xA;And this storage&#xD;&#xA;``` &#xD;&#xA;#[pallet::storage]&#xD;&#xA;	pub type Delegators&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		DelegatorConfig&lt;T::AccountId, BalanceOf&lt;T&gt;, T::MaxDelegations&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;``` &#xD;&#xA;But now the compilers sends me this error message, what didn't happen when I just used ``` Const&lt;U32&gt;```  for the bound. Any idea what I am missing?&#xD;&#xA;I'm pasting the full code next:&#xD;&#xA;``` &#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;/// Edit this file to define custom logic or remove it if it is not needed.&#xD;&#xA;/// Learn more about FRAME and the core library of Substrate FRAME pallets:&#xD;&#xA;/// &lt;https://docs.substrate.io/reference/frame-pallets/&gt;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod mock;&#xD;&#xA;&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests;&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benchmarking;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_support::bounded_vec;&#xD;&#xA;	use frame_support::pallet_prelude::DispatchResult;&#xD;&#xA;	use frame_support::traits::tokens::Balance;&#xD;&#xA;	use frame_support::traits::{LockIdentifier, WithdrawReasons};&#xD;&#xA;	use frame_support::{&#xD;&#xA;		pallet_prelude::*,&#xD;&#xA;		traits::{Currency, FindAuthor, LockableCurrency, ReservableCurrency},&#xD;&#xA;	};&#xD;&#xA;	use frame_system::pallet_prelude::{OriginFor, *};&#xD;&#xA;	use sp_consensus_aura::{Slot, AURA_ENGINE_ID};&#xD;&#xA;	use sp_runtime::traits::Convert;&#xD;&#xA;	use sp_runtime::traits::{CheckedAdd, CheckedSub};&#xD;&#xA;&#xD;&#xA;	pub type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;	const LOCK_ID: LockIdentifier = *b&quot;1       &quot;;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_aura::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		/// Type to access the Balances Pallet.&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt;&#xD;&#xA;			+ ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;			+ LockableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		/// A conversion function which takes an authority id, and returns the associated account id.&#xD;&#xA;		type AuthorityToAccount: Convert&lt;Self::AuthorityId, Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		type ValidatorBond: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;		&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxDelegations: Get&lt;u32&gt;;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxAuthorities: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// Pallets use events to inform users when important changes are made.&#xD;&#xA;	// https://docs.substrate.io/main-docs/build/events-errors/&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {}&#xD;&#xA;&#xD;&#xA;	// Errors inform users that something went wrong.&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		/// Too many authorities for Aura's limits.&#xD;&#xA;		TooManyAuthorities,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone)]&#xD;&#xA;	pub struct ValidatorConfig&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;		pub is_active: bool,&#xD;&#xA;		pub points: Balance,&#xD;&#xA;		pub delegators: BoundedVec&lt;(AccountId, Balance), T::MaxDelegations&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone)]&#xD;&#xA;	pub struct DelegatorConfig&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;		pub is_validator: bool,&#xD;&#xA;		pub delegated_points: Balance,&#xD;&#xA;		pub delegates: BoundedVec&lt;(AccountId, Balance), T::MaxDelegations&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(&#xD;&#xA;		Default, Clone, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen,&#xD;&#xA;	)]&#xD;&#xA;	pub struct TotalStake&lt;Balance&gt; {&#xD;&#xA;		pub validators: Balance,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone)]&#xD;&#xA;	pub struct Candidates&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;		pub authorities: BoundedVec&lt;(AccountId, Balance),  &lt;T as pallet::Config&gt;::MaxAuthorities&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Validators&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		ValidatorConfig&lt;T::AccountId, BalanceOf&lt;T&gt;, T::MaxDelegations&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Delegators&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		DelegatorConfig&lt;T::AccountId, BalanceOf&lt;T&gt;, T::MaxDelegations&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type StakePool&lt;T: Config&gt; = StorageValue&lt;_, TotalStake&lt;BalanceOf&lt;T&gt;&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type EnabledAuthorities&lt;T: Config&gt; =&#xD;&#xA;		StorageValue&lt;_, Candidates&lt;T::AccountId, BalanceOf&lt;T&gt;,  &lt;T as pallet::Config&gt;::MaxAuthorities&gt;, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;	// Dispatchable functions allows users to interact with the pallet and invoke state changes.&#xD;&#xA;	// These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;	// Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		/// An example of directly updating the authorities for Aura.&#xD;&#xA;		#[pallet::call_index(0)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn force_change_authorities(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			who: T::AuthorityId,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			ensure_root(origin)?;&#xD;&#xA;			let mut authorities = BoundedVec::&lt;T::AuthorityId, T::MaxAuthorities&gt;::default();&#xD;&#xA;			authorities.try_push(who).map_err(|_| Error::&lt;T&gt;::TooManyAuthorities)?;&#xD;&#xA;			pallet_aura::Pallet::&lt;T&gt;::change_authorities(authorities);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(1)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn register_validator(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let default_config = ValidatorConfig {&#xD;&#xA;				is_active: true,&#xD;&#xA;				points: Default::default(),&#xD;&#xA;				delegators: bounded_vec![],&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			// reserve some balance from the user&#xD;&#xA;			T::Currency::reserve(&amp;who, T::ValidatorBond::get())?;&#xD;&#xA;&#xD;&#xA;			Validators::&lt;T&gt;::insert(who.clone(), default_config);&#xD;&#xA;			Pallet::&lt;T&gt;::check_candidate(who);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(2)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn delegate(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			validator: T::AccountId,&#xD;&#xA;			new_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// THERE ARE ERRORS HERE. DONT USE DIRECTLY. THINK ABOUT MULTI DELEGATION SCENARIO&#xD;&#xA;&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			let amount = new_amount.clone();&#xD;&#xA;			let mut validator_config = Validators::&lt;T&gt;::get(&amp;validator).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;&#xD;&#xA;			let mut delegator_config;&#xD;&#xA;&#xD;&#xA;			if Delegators::&lt;T&gt;::get(&amp;who).is_some() {&#xD;&#xA;				delegator_config = Delegators::&lt;T&gt;::get(&amp;who).unwrap();&#xD;&#xA;			} else {&#xD;&#xA;				Pallet::&lt;T&gt;::register_delegator(who.clone());&#xD;&#xA;				delegator_config = Delegators::&lt;T&gt;::get(&amp;who).unwrap();&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			let new_delegation_amount =&#xD;&#xA;				delegator_config.delegated_points.checked_add(&amp;new_amount).unwrap();&#xD;&#xA;&#xD;&#xA;			ensure!(T::Currency::free_balance(&amp;who) &gt;= new_amount, &quot;not enough funds&quot;);&#xD;&#xA;			T::Currency::set_lock(LOCK_ID, &amp;who, new_amount, WithdrawReasons::all());&#xD;&#xA;&#xD;&#xA;			ensure!(!validator_config.delegators.is_full(), &quot;overflow&quot;);&#xD;&#xA;&#xD;&#xA;			let pos_val = validator_config.delegators.iter().position(|(x, _)| x == &amp;who);&#xD;&#xA;			delegator_config.delegated_points = new_delegation_amount;&#xD;&#xA;			validator_config.points += amount;&#xD;&#xA;			if pos_val != None {&#xD;&#xA;				validator_config.delegators[pos_val.unwrap()].1 += amount;&#xD;&#xA;			} else {&#xD;&#xA;				validator_config.delegators.try_push((who.clone(), amount));&#xD;&#xA;			}&#xD;&#xA;			let pos_del = delegator_config.delegates.iter().position(|(x, _)| x == &amp;validator);&#xD;&#xA;			if pos_del != None {&#xD;&#xA;				delegator_config.delegates[pos_del.unwrap()].1 += amount;&#xD;&#xA;			} else {&#xD;&#xA;				delegator_config.delegates.try_push((validator.clone(), amount));&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if Validators::&lt;T&gt;::contains_key(validator.clone()) {&#xD;&#xA;				Validators::&lt;T&gt;::remove(validator.clone());&#xD;&#xA;				Validators::&lt;T&gt;::insert(validator.clone(), validator_config);&#xD;&#xA;			} else {&#xD;&#xA;				Validators::&lt;T&gt;::insert(validator.clone(), validator_config);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if Delegators::&lt;T&gt;::contains_key(who.clone()) {&#xD;&#xA;				Delegators::&lt;T&gt;::remove(who.clone());&#xD;&#xA;				Delegators::&lt;T&gt;::insert(who.clone(), delegator_config);&#xD;&#xA;			} else {&#xD;&#xA;				Delegators::&lt;T&gt;::insert(who.clone(), delegator_config);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			Pallet::&lt;T&gt;::increase_stake(amount);&#xD;&#xA;&#xD;&#xA;			Pallet::&lt;T&gt;::check_candidate(validator);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(3)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn revoke_delegate(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			validator: T::AccountId,&#xD;&#xA;			amount: BalanceOf&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			let other_who = who.clone();&#xD;&#xA;			let mut validator_config = Validators::&lt;T&gt;::get(&amp;validator).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;&#xD;&#xA;			let mut delegator_config = Delegators::&lt;T&gt;::get(&amp;who).unwrap();&#xD;&#xA;&#xD;&#xA;			ensure!(&#xD;&#xA;				!(validator_config.delegators.iter().find(|(x, _)| x == &amp;who) == None),&#xD;&#xA;				&quot;not a delegator of the current validator&quot;&#xD;&#xA;			);&#xD;&#xA;			let pos_val = validator_config.delegators.iter().position(|(x, _)| x == &amp;who).unwrap();&#xD;&#xA;			let validator_points = validator_config.points;&#xD;&#xA;			let validator_delegator_points = validator_config.delegators[pos_val].1;&#xD;&#xA;			ensure!(validator_delegator_points &gt;= amount, &quot;not enough delegated points&quot;);&#xD;&#xA;			let points_to_remove = std::cmp::min(amount, validator_delegator_points);&#xD;&#xA;			ensure!(validator_config.is_active, &quot;validator currently inactive&quot;);&#xD;&#xA;			validator_config.points =&#xD;&#xA;				validator_config.points.checked_sub(&amp;points_to_remove).ok_or(&quot;underflow&quot;)?;&#xD;&#xA;&#xD;&#xA;			let pos_del =&#xD;&#xA;				delegator_config.delegates.iter().position(|(x, _)| x == &amp;validator).unwrap();&#xD;&#xA;&#xD;&#xA;			let points_remaining = validator_delegator_points - points_to_remove;&#xD;&#xA;			if validator_delegator_points == points_to_remove {&#xD;&#xA;				validator_config.delegators.remove(pos_val);&#xD;&#xA;				delegator_config.delegates.remove(pos_del);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			let new_delegation_amount = delegator_config.delegated_points - points_to_remove;&#xD;&#xA;			delegator_config.delegated_points = new_delegation_amount;&#xD;&#xA;			T::Currency::remove_lock(LOCK_ID, &amp;who);&#xD;&#xA;			T::Currency::set_lock(LOCK_ID, &amp;who, new_delegation_amount, WithdrawReasons::all());&#xD;&#xA;&#xD;&#xA;			Validators::&lt;T&gt;::insert(validator.clone(), validator_config);&#xD;&#xA;			Delegators::&lt;T&gt;::insert(who.clone(), delegator_config);&#xD;&#xA;			Pallet::&lt;T&gt;::reduce_stake(amount);&#xD;&#xA;			Pallet::&lt;T&gt;::check_candidate(validator);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		// A function to get you an account id for the current block author.&#xD;&#xA;		fn find_author() -&gt; Option&lt;T::AccountId&gt; {&#xD;&#xA;			let digest = frame_system::Pallet::&lt;T&gt;::digest();&#xD;&#xA;			let pre_runtime_digests = digest.logs.iter().filter_map(|d| d.as_pre_runtime());&#xD;&#xA;&#xD;&#xA;			for (id, mut data) in pre_runtime_digests {&#xD;&#xA;				if id == AURA_ENGINE_ID {&#xD;&#xA;					let slot = Slot::decode(&amp;mut data).ok()?;&#xD;&#xA;					let author_index = *slot % pallet_aura::Pallet::&lt;T&gt;::authorities().len() as u64;&#xD;&#xA;					let validators = pallet_aura::Pallet::&lt;T&gt;::authorities();&#xD;&#xA;					let authority = validators.get(author_index as usize).cloned()?;&#xD;&#xA;					return Some(T::AuthorityToAccount::convert(authority));&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			None&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn get_slot() -&gt; Option&lt;sp_consensus_aura::Slot&gt; {&#xD;&#xA;			let digest = frame_system::Pallet::&lt;T&gt;::digest();&#xD;&#xA;			let pre_runtime_digests = digest.logs.iter().filter_map(|d| d.as_pre_runtime());&#xD;&#xA;&#xD;&#xA;			for (id, mut data) in pre_runtime_digests {&#xD;&#xA;				if id == AURA_ENGINE_ID {&#xD;&#xA;					let slot = Slot::decode(&amp;mut data).ok()?;&#xD;&#xA;					return Some(slot);&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			None&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn increase_stake(amount: BalanceOf&lt;T&gt;) {&#xD;&#xA;			let mut stake;&#xD;&#xA;			match StakePool::&lt;T&gt;::try_get() {&#xD;&#xA;				Ok(x) =&gt; {&#xD;&#xA;					stake = x;&#xD;&#xA;					stake.validators += amount;&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;				Err(_) =&gt; {&#xD;&#xA;					stake = TotalStake { validators: amount };&#xD;&#xA;					stake.validators = amount;&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn reduce_stake(amount: BalanceOf&lt;T&gt;) {&#xD;&#xA;			let mut stake;&#xD;&#xA;			match StakePool::&lt;T&gt;::try_get() {&#xD;&#xA;				Ok(x) =&gt; {&#xD;&#xA;					stake = x;&#xD;&#xA;					stake.validators -= amount;&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;				Err(_) =&gt; {&#xD;&#xA;					stake = TotalStake { validators: Default::default() };&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;			};&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn check_candidate(candidate: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;			let mut candidates = EnabledAuthorities::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;			match candidates {&#xD;&#xA;				Some(x) =&gt; {&#xD;&#xA;					let mut candidates = x;&#xD;&#xA;					candidates.authorities.sort_by(|(_, a), (_, b)| a.partial_cmp(b).unwrap());&#xD;&#xA;					let candidate_balance =&#xD;&#xA;						Validators::&lt;T&gt;::get(&amp;candidate).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;					match candidate_balance.points &gt; candidates.authorities[0].1 {&#xD;&#xA;						true =&gt; match candidate == candidates.authorities[0].0 {&#xD;&#xA;							true =&gt; {&#xD;&#xA;								candidates.authorities[0].1 = candidate_balance.points;&#xD;&#xA;								EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;							},&#xD;&#xA;							false =&gt; {&#xD;&#xA;								candidates.authorities[0] = (candidate, candidate_balance.points);&#xD;&#xA;								EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;							},&#xD;&#xA;						},&#xD;&#xA;						false =&gt; match candidate == candidates.authorities[0].0 {&#xD;&#xA;							true =&gt; {&#xD;&#xA;								candidates.authorities[0].1 = candidate_balance.points;&#xD;&#xA;								EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;							},&#xD;&#xA;							false =&gt; {&#xD;&#xA;								let mut pos = candidates&#xD;&#xA;									.authorities&#xD;&#xA;									.iter()&#xD;&#xA;									.position(|(x, _)| *x == candidate);&#xD;&#xA;								match pos {&#xD;&#xA;									Some(p) =&gt; {&#xD;&#xA;										candidates.authorities.remove(p);&#xD;&#xA;										EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;									},&#xD;&#xA;									None =&gt; (),&#xD;&#xA;								}&#xD;&#xA;							},&#xD;&#xA;						},&#xD;&#xA;					}&#xD;&#xA;				},&#xD;&#xA;&#xD;&#xA;				None =&gt; {&#xD;&#xA;					let candidate_balance =&#xD;&#xA;						Validators::&lt;T&gt;::get(&amp;candidate).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;					let mut candidates = Candidates { authorities: Default::default() };&#xD;&#xA;					let tuple = (candidate, candidate_balance.points);&#xD;&#xA;					candidates.authorities.try_push(tuple);&#xD;&#xA;					EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;				},&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn register_delegator(who: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;			let default_config = DelegatorConfig {&#xD;&#xA;				is_validator: false,&#xD;&#xA;				delegated_points: Default::default(),&#xD;&#xA;				delegates: bounded_vec![],&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			Delegators::&lt;T&gt;::insert(who, default_config);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;``` &#xD;&#xA;Oh and this is the full error message:&#xD;&#xA;```Checking pallet-dpos v4.0.0-dev (/home/penay/Documents/PolkadotBlockchainAcademy/dnpos/pba-assignment-3-bee344/substrate-node-template/pallets/dpos)&#xD;&#xA;warning: unused import: `frame_support::traits::tokens::Balance`&#xD;&#xA;  --&gt; pallets/dpos/src/lib.rs:22:6&#xD;&#xA;   |&#xD;&#xA;22 |     use frame_support::traits::tokens::Balance;&#xD;&#xA;   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;   |&#xD;&#xA;   = note: `#[warn(unused_imports)]` on by default&#xD;&#xA;&#xD;&#xA;warning: unused import: `FindAuthor`&#xD;&#xA;  --&gt; pallets/dpos/src/lib.rs:26:22&#xD;&#xA;   |&#xD;&#xA;26 |         traits::{Currency, FindAuthor, LockableCurrency, ReservableCurrency},&#xD;&#xA;   |                            ^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `&lt;T as frame_system::Config&gt;::AccountId: pallet::Config` is not satisfied&#xD;&#xA;   --&gt; pallets/dpos/src/lib.rs:39:44&#xD;&#xA;    |&#xD;&#xA;39  |       #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    |  _______________________________________________^&#xD;&#xA;40  | |     pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;41  | |&#xD;&#xA;42  | |     /// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;...   |&#xD;&#xA;103 | |     #[pallet::storage]&#xD;&#xA;104 | |     pub type Validators&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;    | |_______________________^ the trait `pallet::Config` is not implemented for `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `ValidatorConfig`&#xD;&#xA;   --&gt; pallets/dpos/src/lib.rs:78:32&#xD;&#xA;    |&#xD;&#xA;78  |     pub struct ValidatorConfig&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;    |                                   ^^^^^^ required by this bound in `ValidatorConfig`&#xD;&#xA;help: consider further restricting the associated type&#xD;&#xA;    |&#xD;&#xA;39  |     #[pallet::generate_store(pub(super) trait Store where &lt;T as frame_system::Config&gt;::AccountId: pallet::Config)]&#xD;&#xA;    |                                                     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `&lt;T as frame_system::Config&gt;::AccountId: pallet::Config` is not satisfied&#xD;&#xA;   --&gt; pallets/dpos/src/lib.rs:39:44&#xD;&#xA;    |&#xD;&#xA;39  |       #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    |  _______________________________________________^&#xD;&#xA;40  | |     pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;41  | |&#xD;&#xA;42  | |     /// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;...   |&#xD;&#xA;111 | |     #[pallet::storage]&#xD;&#xA;112 | |     pub type Delegators&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;    | |_______________________^ the trait `pallet::Config` is not implemented for `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `DelegatorConfig`&#xD;&#xA;   --&gt; pallets/dpos/src/lib.rs:85:32&#xD;&#xA;    |&#xD;&#xA;85  |     pub struct DelegatorConfig&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;    |                                   ^^^^^^ required by this bound in `DelegatorConfig`&#xD;&#xA;help: consider further restricting the associated type&#xD;&#xA;    |&#xD;&#xA;39  |     #[pallet::generate_store(pub(super) trait Store where &lt;T as frame_system::Config&gt;::AccountId: pallet::Config)]&#xD;&#xA;    |                                                     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `&lt;T as frame_system::Config&gt;::AccountId: pallet::Config` is not satisfied&#xD;&#xA;   --&gt; pallets/dpos/src/lib.rs:39:44&#xD;&#xA;    |&#xD;&#xA;39  |       #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    |  _______________________________________________^&#xD;&#xA;40  | |     pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;41  | |&#xD;&#xA;42  | |     /// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;...   |&#xD;&#xA;122 | |     #[pallet::storage]&#xD;&#xA;123 | |     pub type EnabledAuthorities&lt;T: Config&gt; =&#xD;&#xA;    | |_______________________________^ the trait `pallet::Config` is not implemented for `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `Candidates`&#xD;&#xA;   --&gt; pallets/dpos/src/lib.rs:99:27&#xD;&#xA;    |&#xD;&#xA;99  |     pub struct Candidates&lt;T: Config, AccountId, Balance&gt; {&#xD;&#xA;    |                              ^^^^^^ required by this bound in `Candidates`&#xD;&#xA;help: consider further restricting the associated type&#xD;&#xA;    |&#xD;&#xA;39  |     #[pallet::generate_store(pub(super) trait Store where &lt;T as frame_system::Config&gt;::AccountId: pallet::Config)]&#xD;&#xA;    |                                                     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;warning: `pallet-dpos` (lib) generated 2 warnings&#xD;&#xA;error: could not compile `pallet-dpos` due to 3 previous errors; 2 warnings emitted```&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="26569" PostHistoryTypeId="2" PostId="6950" RevisionGUID="d7097060-3285-4444-a80e-7890b98e5663" CreationDate="2023-01-28T21:14:56.340" UserId="94" Text="You are using `DelegatorConfig&lt;T::AccountId, BalanceOf&lt;T&gt;, T::MaxDelegations&gt;` instead of `DelegatorConfig&lt;T, T::AccountId, BalanceOf&lt;T&gt;&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="26571" PostHistoryTypeId="2" PostId="6951" RevisionGUID="4d95628f-fa5b-4273-984b-5f3140a41064" CreationDate="2023-01-28T21:46:50.893" UserId="1961" Text="So what I did was the following: addded ```#[scale_info(skip_type_params(T))]``` to the struct and modified the rest as follows:&#xD;&#xA;```&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	pub struct DelegatorConfig&lt;T: Config&gt; {&#xD;&#xA;        pub is_validator: bool,&#xD;&#xA;        pub delegated_points: BalanceOf&lt;T&gt;,&#xD;&#xA;        pub delegates: BoundedVec&lt;(T::AccountId, BalanceOf&lt;T&gt;), T::MaxDelegations&gt;,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;	pub type Delegators&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;	_,&#xD;&#xA;	Blake2_128Concat,&#xD;&#xA;	T::AccountId,&#xD;&#xA;	DelegatorConfig&lt;T&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26573" PostHistoryTypeId="2" PostId="6952" RevisionGUID="0288c9f3-02b8-4c3f-b161-8b8292eb8e1c" CreationDate="2023-01-28T23:02:59.643" UserId="3346" Text="I have **NGINX and SSL set up on Digital Ocean Linux Ubuntu, running an RPC node**. The RPC node sees the Polkadot-JS/apps and accepts the connection but the Polkadot-JS/apps never sees anything in return and keeps waiting for a connection. &#xD;&#xA;&#xD;&#xA;Going straight to the URL https://koabs.rocks, I get an **error:&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32700,&quot;message&quot;:&quot;Parse error&quot;},&quot;id&quot;:null}**&#xD;&#xA;&#xD;&#xA;How can I fix this?&#xD;&#xA;&#xD;&#xA;My node configuration is: &#xD;&#xA;&#xD;&#xA;    ./target/release/substrate \&#xD;&#xA;    --base-path ./gropocloudmoose \&#xD;&#xA;    --chain ./GropoSpec20230115Raw.json \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9955 \&#xD;&#xA;    --rpc-port 9944 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --enable-offchain-indexing=true \&#xD;&#xA;    --ws-external \&#xD;&#xA;    --state-pruning archive \&#xD;&#xA;    --blocks-pruning archive \&#xD;&#xA;    --ws-max-connections 100 \&#xD;&#xA;    --rpc-cors all \&#xD;&#xA;    --rpc-methods Safe \&#xD;&#xA;    --name gropocloudmoose \&#xD;&#xA;    --bootnodes /ip4/127.0.0.1/tcp/30344/p2p/12D3KooWMaj8rma6fWK71hHEgXzGre2FcfCPMD39LhPBTvQyMzk6 \&#xD;&#xA;    --password-interactive&#xD;&#xA;&#xD;&#xA;And my NGINX configuration for this site is:&#xD;&#xA;&#xD;&#xA;    server {&#xD;&#xA;    &#xD;&#xA;        server_name koabd.rocks www.koabd.rocks;&#xD;&#xA;    &#xD;&#xA;        location / {&#xD;&#xA;            proxy_buffers 16 4k;&#xD;&#xA;            proxy_buffer_size 2k;&#xD;&#xA;            proxy_http_version 1.1;&#xD;&#xA;            proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;            proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;            proxy_set_header Host $host;&#xD;&#xA;            proxy_pass http://localhost:9955;&#xD;&#xA;            include proxy_params;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        listen [::]:443 ssl ipv6only=on; # managed by Certbot&#xD;&#xA;        listen 443 ssl; # managed by Certbot&#xD;&#xA;        ssl_certificate /etc/letsencrypt/live/koabd.rocks/fullchain.pem; # managed by Certbot&#xD;&#xA;        ssl_certificate_key /etc/letsencrypt/live/koabd.rocks/privkey.pem; # managed by Certbot&#xD;&#xA;        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot&#xD;&#xA;        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    server {&#xD;&#xA;        if ($host = www.koabd.rocks) {&#xD;&#xA;            return 301 https://$host$request_uri;&#xD;&#xA;        } # managed by Certbot&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        if ($host = koabd.rocks) {&#xD;&#xA;            return 301 https://$host$request_uri;&#xD;&#xA;        } # managed by Certbot&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        listen 80;&#xD;&#xA;        listen [::]:80;&#xD;&#xA;    &#xD;&#xA;        server_name koabd.rocks www.koabd.rocks;&#xD;&#xA;        return 404; # managed by Certbot&#xD;&#xA;    &#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="26575" PostHistoryTypeId="1" PostId="6952" RevisionGUID="0288c9f3-02b8-4c3f-b161-8b8292eb8e1c" CreationDate="2023-01-28T23:02:59.643" UserId="3346" Text="NGINX Reverse Proxy JSON Parse Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="26576" PostHistoryTypeId="3" PostId="6952" RevisionGUID="0288c9f3-02b8-4c3f-b161-8b8292eb8e1c" CreationDate="2023-01-28T23:02:59.643" UserId="3346" Text="|polkadot-js|proxy|wss|nginx|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26577" PostHistoryTypeId="52" PostId="6946" RevisionGUID="e9260b8d-a36e-4a6c-b9e4-9ff552d64e3f" CreationDate="2023-01-29T00:36:57.927" />
  <row Id="26578" PostHistoryTypeId="2" PostId="6953" RevisionGUID="1f2c0fc1-c377-482f-9f5b-608b0b5b9109" CreationDate="2023-01-29T07:34:57.550" UserId="3344" Text="Does anyone have data/experience that indicates how many Substrate Parachains can run under one Substrate Relaychain?&#xD;&#xA;&#xD;&#xA;I understand this will be hardware specific, so it will help if you can give some details about the environment used.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;10-20 on an AWS instance type XYZ" ContentLicense="CC BY-SA 4.0" />
  <row Id="26580" PostHistoryTypeId="1" PostId="6953" RevisionGUID="1f2c0fc1-c377-482f-9f5b-608b0b5b9109" CreationDate="2023-01-29T07:34:57.550" UserId="3344" Text="How many (order of magnitude) Parachains can run on a Relaychain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26581" PostHistoryTypeId="3" PostId="6953" RevisionGUID="1f2c0fc1-c377-482f-9f5b-608b0b5b9109" CreationDate="2023-01-29T07:34:57.550" UserId="3344" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26582" PostHistoryTypeId="2" PostId="6954" RevisionGUID="7d6fb01f-2cd0-4ed7-8336-375917e7cb44" CreationDate="2023-01-29T07:52:50.507" UserId="1864" Text="Can you explain me how I retrieve (from Polkadot JS) :&#xD;&#xA;1. The nomination pool name (from a given pool Id)&#xD;&#xA;2. The stash account of nomination pool creator ?&#xD;&#xA;&#xD;&#xA;For example, here is the first nomination pool :&#xD;&#xA;https://polkadot.subscan.io/nomination_pool/1&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;How can I get the name : Paradox | ParaNodes.io - Nominating hight return ...&#xD;&#xA;&#xD;&#xA;And from given creator account address : 12NRTphLWqYK5Tri7V2aVGcXWuJ78NFPPjwSN9ZkUxLhCa78, how do I retrieve 13UVJyLnbVp8c4FQeiGUYwmthuauL7RecwzpKCd3cwgRPCPp address ?&#xD;&#xA;&#xD;&#xA;Thanks a lot for you help :)&#xD;&#xA;&#xD;&#xA;Regards&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WLst0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26584" PostHistoryTypeId="1" PostId="6954" RevisionGUID="7d6fb01f-2cd0-4ed7-8336-375917e7cb44" CreationDate="2023-01-29T07:52:50.507" UserId="1864" Text="Get pool name and stash account from nomination pool creator" ContentLicense="CC BY-SA 4.0" />
  <row Id="26585" PostHistoryTypeId="3" PostId="6954" RevisionGUID="7d6fb01f-2cd0-4ed7-8336-375917e7cb44" CreationDate="2023-01-29T07:52:50.507" UserId="1864" Text="|polkadot-js|account|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26590" PostHistoryTypeId="2" PostId="6956" RevisionGUID="f36cc458-1056-4cb3-9e37-4b0180408d2d" CreationDate="2023-01-29T16:09:25.933" UserId="2844" Text="If you are using latest ink i.e. 4.0.0-beta and latest openbrush, then you have to change little bit in Cargo.toml file.&#xD;&#xA;&#xD;&#xA; 1. use this for ink package:  `ink = { git =&#xD;&#xA;    &quot;https://github.com/paritytech/ink&quot;, rev =&#xD;&#xA;    &quot;4655a8b4413cb50cbc38d1b7c173ad426ab06cde&quot;, default-features = false&#xD;&#xA;    }`&#xD;&#xA;2. use version = &quot;2.3&quot; for scale_info: `scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }`&#xD;&#xA;&#xD;&#xA;3. for openbrush use tag instead version: `openbrush = { tag = &quot;3.0.0-beta&quot;, git = &quot;https://github.com/727-Ventures/openbrush-contracts&quot;, default-features = false, features = [&quot;psp34&quot;] }&#xD;&#xA;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="26592" PostHistoryTypeId="2" PostId="6957" RevisionGUID="e9c4b78b-c0b1-44d5-8d02-27f8df2e339e" CreationDate="2023-01-29T16:20:35.627" UserId="1961" Text="I'm trying to build a custom pallet using the substrate-node-template, and when I run ```cargo check``` on the pallet, it's all good. But when I run ```cargo check ``` or ```cargo build --release``` on the whole node, I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0369]: cannot multiply `&amp;&amp;EdwardsBasepointTable` by `&amp;Scalar`&#xD;&#xA;   --&gt; /home/penay/.cargo/registry/src/github.com-1ecc6299db9ec823/snow-0.9.0/src/resolvers/default.rs:132:47&#xD;&#xA;    |&#xD;&#xA;132 |         let point = (&amp;ED25519_BASEPOINT_TABLE * &amp;self.privkey).to_montgomery();&#xD;&#xA;    |                      ------------------------ ^ ------------- &amp;Scalar&#xD;&#xA;    |                      |&#xD;&#xA;    |                      &amp;&amp;EdwardsBasepointTable&#xD;&#xA;    |&#xD;&#xA;help: `*` can be used on `&amp;EdwardsBasepointTable` if you dereference the left-hand side&#xD;&#xA;    |&#xD;&#xA;132 |         let point = (*&amp;ED25519_BASEPOINT_TABLE * &amp;self.privkey).to_montgomery();&#xD;&#xA;    |                      +&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0369`.&#xD;&#xA;error: could not compile `snow` due to previous error&#xD;&#xA;```&#xD;&#xA;I have no clue what it may be, since it's not something I built or interacted with, at least not that I know of. My```Cargo.toml``` for the runtime is:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;Unlicense&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-assets = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-randomness-collective-flip = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-core = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-runtime = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-std = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;sp-version = { version = &quot;5.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-dex = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/dex&quot; }&#xD;&#xA;pallet-dpos = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/dpos&quot; }&#xD;&#xA;pallet-voting = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/voting&quot; }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-dex/std&quot;,&#xD;&#xA;	&quot;pallet-dpos/std&quot;,&#xD;&#xA;	&quot;pallet-voting/std&quot;,&#xD;&#xA;	&quot;pallet-assets/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-assets/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-dex/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-dpos/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-voting/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-assets/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-dex/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-dpos/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-voting/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;``` &#xD;&#xA;And the ``` lib.rs```  of my pallet is:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;/// Edit this file to define custom logic or remove it if it is not needed.&#xD;&#xA;/// Learn more about FRAME and the core library of Substrate FRAME pallets:&#xD;&#xA;/// &lt;https://docs.substrate.io/reference/frame-pallets/&gt;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod mock;&#xD;&#xA;&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests;&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benchmarking;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_support::pallet_prelude::DispatchResult;&#xD;&#xA;	use frame_support::traits::tokens::Balance;&#xD;&#xA;	use frame_support::traits::OnUnbalanced;&#xD;&#xA;	use frame_support::traits::{LockIdentifier, WithdrawReasons};&#xD;&#xA;	use frame_support::BoundedVec;&#xD;&#xA;	use frame_support::{&#xD;&#xA;		pallet_prelude::*,&#xD;&#xA;		traits::{Currency, FindAuthor, LockableCurrency, ReservableCurrency},&#xD;&#xA;	};&#xD;&#xA;	use frame_system::pallet_prelude::{OriginFor, *};&#xD;&#xA;	use sp_consensus_aura::{Slot, AURA_ENGINE_ID};&#xD;&#xA;	use sp_runtime::traits::Convert;&#xD;&#xA;	use sp_runtime::traits::{CheckedAdd, CheckedSub};&#xD;&#xA;&#xD;&#xA;	pub type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;	type NegativeImbalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Currency as Currency&lt;&#xD;&#xA;		&lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;	&gt;&gt;::NegativeImbalance;&#xD;&#xA;&#xD;&#xA;	pub type RoundIndex = u32;&#xD;&#xA;&#xD;&#xA;	const LOCK_ID: LockIdentifier = *b&quot;1       &quot;;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_aura::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		/// Type to access the Balances Pallet.&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt;&#xD;&#xA;			+ ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;			+ LockableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		/// A conversion function which takes an authority id, and returns the associated account id.&#xD;&#xA;		type AuthorityToAccount: Convert&lt;Self::AuthorityId, Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		type AccountToAuthority: Convert&lt;Self::AccountId, Self::AuthorityId&gt;;&#xD;&#xA;&#xD;&#xA;		type ValidatorBond: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxDelegations: Get&lt;u32&gt;;&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaxAuth: Get&lt;u32&gt;;&#xD;&#xA;		type Slashed: OnUnbalanced&lt;NegativeImbalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;	/// The current round index and transition information&#xD;&#xA;	pub struct RoundInfo&lt;BlockNumber&gt; {&#xD;&#xA;		/// Current round index&#xD;&#xA;		pub current: RoundIndex,&#xD;&#xA;		/// The first block of the current round&#xD;&#xA;		pub first: BlockNumber,&#xD;&#xA;		/// The length of the current round in number of blocks&#xD;&#xA;		pub length: u32,&#xD;&#xA;	}&#xD;&#xA;	impl&lt;&#xD;&#xA;			B: Copy&#xD;&#xA;				+ sp_std::ops::Add&lt;Output = B&gt;&#xD;&#xA;				+ sp_std::ops::Sub&lt;Output = B&gt;&#xD;&#xA;				+ From&lt;u32&gt;&#xD;&#xA;				+ PartialOrd,&#xD;&#xA;		&gt; RoundInfo&lt;B&gt;&#xD;&#xA;	{&#xD;&#xA;		pub fn new(current: RoundIndex, first: B, length: u32) -&gt; RoundInfo&lt;B&gt; {&#xD;&#xA;			RoundInfo { current, first, length }&#xD;&#xA;		}&#xD;&#xA;		/// Check if the round should be updated&#xD;&#xA;		pub fn should_update(&amp;self, now: B) -&gt; bool {&#xD;&#xA;			now - self.first &gt;= self.length.into()&#xD;&#xA;		}&#xD;&#xA;		/// New round&#xD;&#xA;		pub fn update(&amp;mut self, now: B) {&#xD;&#xA;			self.current = self.current.saturating_add(1u32);&#xD;&#xA;			self.first = now;&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;	impl&lt;&#xD;&#xA;			B: Copy&#xD;&#xA;				+ sp_std::ops::Add&lt;Output = B&gt;&#xD;&#xA;				+ sp_std::ops::Sub&lt;Output = B&gt;&#xD;&#xA;				+ From&lt;u32&gt;&#xD;&#xA;				+ PartialOrd,&#xD;&#xA;		&gt; Default for RoundInfo&lt;B&gt;&#xD;&#xA;	{&#xD;&#xA;		fn default() -&gt; RoundInfo&lt;B&gt; {&#xD;&#xA;			RoundInfo::new(1u32, 1u32.into(), 20u32)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// Pallets use events to inform users when important changes are made.&#xD;&#xA;	// https://docs.substrate.io/main-docs/build/events-errors/&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {}&#xD;&#xA;&#xD;&#xA;	// Errors inform users that something went wrong.&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		/// Too many authorities for Aura's limits.&#xD;&#xA;		TooManyAuthorities,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	/// Current round index and next round scheduled transition&#xD;&#xA;	pub(crate) type Round&lt;T: Config&gt; = StorageValue&lt;_, RoundInfo&lt;T::BlockNumber&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone, Default)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	pub struct ValidatorConfig&lt;T: Config&gt; {&#xD;&#xA;		pub is_active: bool,&#xD;&#xA;		pub points: BalanceOf&lt;T&gt;,&#xD;&#xA;		pub delegators: BoundedVec&lt;(T::AccountId, BalanceOf&lt;T&gt;), T::MaxDelegations&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone, Default)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	pub struct DelegatorConfig&lt;T: Config&gt; {&#xD;&#xA;		pub is_validator: bool,&#xD;&#xA;		pub delegated_points: BalanceOf&lt;T&gt;,&#xD;&#xA;		pub delegates: BoundedVec&lt;(T::AccountId, BalanceOf&lt;T&gt;), T::MaxDelegations&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(&#xD;&#xA;		Default, Clone, Encode, Decode, RuntimeDebug, PartialEq, Eq, TypeInfo, MaxEncodedLen,&#xD;&#xA;	)]&#xD;&#xA;	pub struct TotalStake&lt;Balance&gt; {&#xD;&#xA;		pub validators: Balance,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone, Default)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	pub struct Candidates&lt;T: Config&gt; {&#xD;&#xA;		pub authorities: BoundedVec&lt;(T::AccountId, BalanceOf&lt;T&gt;), T::MaxAuth&gt;,&#xD;&#xA;		pub slot: sp_consensus_aura::Slot,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Debug, Eq, PartialEq, Clone, Default)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	pub struct Pay&lt;T: Config&gt; {&#xD;&#xA;		pub pay_rate: BalanceOf&lt;T&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Validators&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Blake2_128Concat, T::AccountId, ValidatorConfig&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Delegators&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Blake2_128Concat, T::AccountId, DelegatorConfig&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type StakePool&lt;T: Config&gt; = StorageValue&lt;_, TotalStake&lt;BalanceOf&lt;T&gt;&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type EnabledAuthorities&lt;T: Config&gt; = StorageValue&lt;_, Candidates&lt;T&gt;, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type PayRate&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, Pay&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	// Dispatchable functions allows users to interact with the pallet and invoke state changes.&#xD;&#xA;	// These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;	// Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		/// An example of directly updating the authorities for Aura.&#xD;&#xA;		#[pallet::call_index(0)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn force_change_authorities(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			who: T::AuthorityId,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			ensure_root(origin)?;&#xD;&#xA;			let mut authorities = BoundedVec::&lt;T::AuthorityId, T::MaxAuthorities&gt;::default();&#xD;&#xA;			authorities.try_push(who).map_err(|_| Error::&lt;T&gt;::TooManyAuthorities)?;&#xD;&#xA;			pallet_aura::Pallet::&lt;T&gt;::change_authorities(authorities);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(1)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn register_validator(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let default_config = ValidatorConfig {&#xD;&#xA;				is_active: true,&#xD;&#xA;				points: Default::default(),&#xD;&#xA;				delegators: Default::default(),&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			// reserve some balance from the user&#xD;&#xA;			T::Currency::reserve(&amp;who, T::ValidatorBond::get())?;&#xD;&#xA;&#xD;&#xA;			Validators::&lt;T&gt;::insert(who.clone(), default_config);&#xD;&#xA;			Pallet::&lt;T&gt;::check_candidate(who);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(2)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn delegate(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			validator: T::AccountId,&#xD;&#xA;			new_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// THERE ARE ERRORS HERE. DONT USE DIRECTLY. THINK ABOUT MULTI DELEGATION SCENARIO&#xD;&#xA;&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			let amount = new_amount.clone();&#xD;&#xA;			let mut validator_config = Validators::&lt;T&gt;::get(&amp;validator).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;&#xD;&#xA;			let mut delegator_config;&#xD;&#xA;&#xD;&#xA;			if Delegators::&lt;T&gt;::get(&amp;who).is_some() {&#xD;&#xA;				delegator_config = Delegators::&lt;T&gt;::get(&amp;who).unwrap();&#xD;&#xA;			} else {&#xD;&#xA;				Pallet::&lt;T&gt;::register_delegator(who.clone());&#xD;&#xA;				delegator_config = Delegators::&lt;T&gt;::get(&amp;who).unwrap();&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			let new_delegation_amount =&#xD;&#xA;				delegator_config.delegated_points.checked_add(&amp;new_amount).unwrap();&#xD;&#xA;&#xD;&#xA;			ensure!(T::Currency::free_balance(&amp;who) &gt;= new_amount, &quot;not enough funds&quot;);&#xD;&#xA;			T::Currency::set_lock(LOCK_ID, &amp;who, new_amount, WithdrawReasons::all());&#xD;&#xA;&#xD;&#xA;			ensure!(!validator_config.delegators.is_full(), &quot;overflow&quot;);&#xD;&#xA;&#xD;&#xA;			let pos_val = validator_config.delegators.iter().position(|(x, _)| x == &amp;who);&#xD;&#xA;			delegator_config.delegated_points = new_delegation_amount;&#xD;&#xA;			validator_config.points += amount;&#xD;&#xA;			if pos_val != None {&#xD;&#xA;				validator_config.delegators[pos_val.unwrap()].1 += amount;&#xD;&#xA;			} else {&#xD;&#xA;				validator_config.delegators.try_push((who.clone(), amount));&#xD;&#xA;			}&#xD;&#xA;			let pos_del = delegator_config.delegates.iter().position(|(x, _)| x == &amp;validator);&#xD;&#xA;			if pos_del != None {&#xD;&#xA;				delegator_config.delegates[pos_del.unwrap()].1 += amount;&#xD;&#xA;			} else {&#xD;&#xA;				delegator_config.delegates.try_push((validator.clone(), amount));&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if Validators::&lt;T&gt;::contains_key(validator.clone()) {&#xD;&#xA;				Validators::&lt;T&gt;::remove(validator.clone());&#xD;&#xA;				Validators::&lt;T&gt;::insert(validator.clone(), validator_config);&#xD;&#xA;			} else {&#xD;&#xA;				Validators::&lt;T&gt;::insert(validator.clone(), validator_config);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if Delegators::&lt;T&gt;::contains_key(who.clone()) {&#xD;&#xA;				Delegators::&lt;T&gt;::remove(who.clone());&#xD;&#xA;				Delegators::&lt;T&gt;::insert(who.clone(), delegator_config);&#xD;&#xA;			} else {&#xD;&#xA;				Delegators::&lt;T&gt;::insert(who.clone(), delegator_config);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			Pallet::&lt;T&gt;::increase_stake(amount);&#xD;&#xA;&#xD;&#xA;			Pallet::&lt;T&gt;::check_candidate(validator);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(3)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn revoke_delegate(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			validator: T::AccountId,&#xD;&#xA;			amount: BalanceOf&lt;T&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			let other_who = who.clone();&#xD;&#xA;			let mut validator_config = Validators::&lt;T&gt;::get(&amp;validator).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;&#xD;&#xA;			let mut delegator_config = Delegators::&lt;T&gt;::get(&amp;who).unwrap();&#xD;&#xA;&#xD;&#xA;			ensure!(&#xD;&#xA;				!(validator_config.delegators.iter().find(|(x, _)| x == &amp;who) == None),&#xD;&#xA;				&quot;not a delegator of the current validator&quot;&#xD;&#xA;			);&#xD;&#xA;			let pos_val = validator_config.delegators.iter().position(|(x, _)| x == &amp;who).unwrap();&#xD;&#xA;			let validator_points = validator_config.points;&#xD;&#xA;			let validator_delegator_points = validator_config.delegators[pos_val].1;&#xD;&#xA;			ensure!(validator_delegator_points &gt;= amount, &quot;not enough delegated points&quot;);&#xD;&#xA;			let points_to_remove = amount.min(validator_delegator_points);&#xD;&#xA;			ensure!(validator_config.is_active, &quot;validator currently inactive&quot;);&#xD;&#xA;			validator_config.points =&#xD;&#xA;				validator_config.points.checked_sub(&amp;points_to_remove).ok_or(&quot;underflow&quot;)?;&#xD;&#xA;&#xD;&#xA;			let pos_del =&#xD;&#xA;				delegator_config.delegates.iter().position(|(x, _)| x == &amp;validator).unwrap();&#xD;&#xA;&#xD;&#xA;			let points_remaining = validator_delegator_points - points_to_remove;&#xD;&#xA;			if validator_delegator_points == points_to_remove {&#xD;&#xA;				validator_config.delegators.remove(pos_val);&#xD;&#xA;				delegator_config.delegates.remove(pos_del);&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			let new_delegation_amount = delegator_config.delegated_points - points_to_remove;&#xD;&#xA;			delegator_config.delegated_points = new_delegation_amount;&#xD;&#xA;			T::Currency::remove_lock(LOCK_ID, &amp;who);&#xD;&#xA;			T::Currency::set_lock(LOCK_ID, &amp;who, new_delegation_amount, WithdrawReasons::all());&#xD;&#xA;&#xD;&#xA;			Validators::&lt;T&gt;::insert(validator.clone(), validator_config);&#xD;&#xA;			Delegators::&lt;T&gt;::insert(who.clone(), delegator_config);&#xD;&#xA;			Pallet::&lt;T&gt;::reduce_stake(amount);&#xD;&#xA;			Pallet::&lt;T&gt;::check_candidate(validator);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(4)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn set_authorities(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			let current_slot = Pallet::&lt;T&gt;::get_slot().unwrap();&#xD;&#xA;			let accounts = EnabledAuthorities::&lt;T&gt;::get().ok_or(&quot;no authorities set&quot;)?;&#xD;&#xA;			// let _disposable = current_slot == accounts.slot;&#xD;&#xA;			let mut authorities = BoundedVec::&lt;T::AuthorityId, T::MaxAuthorities&gt;::default();&#xD;&#xA;			accounts.authorities.iter().map(|(acc, _)| {&#xD;&#xA;				let auth = T::AccountToAuthority::convert(acc.to_owned());&#xD;&#xA;&#xD;&#xA;				authorities.try_push(auth).map_err(|_| Error::&lt;T&gt;::TooManyAuthorities)&#xD;&#xA;			});&#xD;&#xA;			pallet_aura::Pallet::&lt;T&gt;::change_authorities(authorities);&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(5)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn set_payout(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			let accounts = EnabledAuthorities::&lt;T&gt;::get().ok_or(&quot;no authorities set&quot;)?;&#xD;&#xA;			let stake_pool = StakePool::&lt;T&gt;::get();&#xD;&#xA;			let total_stake = stake_pool.validators;&#xD;&#xA;			if accounts.slot &gt; Pallet::&lt;T&gt;::get_slot().unwrap() {&#xD;&#xA;				let mut payout_rate: Pay&lt;T&gt; = Pay { pay_rate: Default::default() };&#xD;&#xA;				accounts.authorities.iter().map(|(acc, bal)| {&#xD;&#xA;					payout_rate.pay_rate = (bal.clone() / total_stake);&#xD;&#xA;					PayRate::&lt;T&gt;::insert(acc, payout_rate.clone());&#xD;&#xA;				});&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(6)]&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn report_account(origin: OriginFor&lt;T&gt;, target: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// Figure out who we're meant to be clearing.&#xD;&#xA;			let candidates = EnabledAuthorities::&lt;T&gt;::get().ok_or(&quot;no authorities set&quot;)?;&#xD;&#xA;&#xD;&#xA;			let (to_slash, deposit) =&#xD;&#xA;				candidates.authorities.iter().find(|(acc, _)| *acc == target).unwrap();&#xD;&#xA;&#xD;&#xA;			// Slash their deposit from them.&#xD;&#xA;			T::Slashed::on_unbalanced(T::Currency::slash_reserved(&amp;target, *deposit).0);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		// #[pallet::call_index(6)]&#xD;&#xA;		// #[pallet::weight(0)]&#xD;&#xA;		// pub fn pay(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;		// 	let who = ensure_root(origin)?;&#xD;&#xA;		// 	let author = Pallet::&lt;T&gt;::find_author().unwrap();&#xD;&#xA;		// 	let stake_pool = StakePool::&lt;T&gt;::get();&#xD;&#xA;		// 	let total_stake = stake_pool.validators;&#xD;&#xA;&#xD;&#xA;		// 	let mut payout = Pay::&lt;T&gt;::get(author);&#xD;&#xA;		// 	PayRate::&lt;T&gt;::set(Some(payout_rate));&#xD;&#xA;&#xD;&#xA;		// 	Ok(())&#xD;&#xA;		// }&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		// A function to get you an account id for the current block author.&#xD;&#xA;		fn find_author() -&gt; Option&lt;T::AccountId&gt; {&#xD;&#xA;			let digest = frame_system::Pallet::&lt;T&gt;::digest();&#xD;&#xA;			let pre_runtime_digests = digest.logs.iter().filter_map(|d| d.as_pre_runtime());&#xD;&#xA;&#xD;&#xA;			for (id, mut data) in pre_runtime_digests {&#xD;&#xA;				if id == AURA_ENGINE_ID {&#xD;&#xA;					let slot = Slot::decode(&amp;mut data).ok()?;&#xD;&#xA;					let author_index = *slot % pallet_aura::Pallet::&lt;T&gt;::authorities().len() as u64;&#xD;&#xA;					let validators = pallet_aura::Pallet::&lt;T&gt;::authorities();&#xD;&#xA;					let authority = validators.get(author_index as usize).cloned()?;&#xD;&#xA;					return Some(T::AuthorityToAccount::convert(authority));&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			None&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn get_slot() -&gt; Option&lt;sp_consensus_aura::Slot&gt; {&#xD;&#xA;			let digest = frame_system::Pallet::&lt;T&gt;::digest();&#xD;&#xA;			let pre_runtime_digests = digest.logs.iter().filter_map(|d| d.as_pre_runtime());&#xD;&#xA;&#xD;&#xA;			for (id, mut data) in pre_runtime_digests {&#xD;&#xA;				if id == AURA_ENGINE_ID {&#xD;&#xA;					let slot = Slot::decode(&amp;mut data).ok()?;&#xD;&#xA;					return Some(slot);&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			None&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn increase_stake(amount: BalanceOf&lt;T&gt;) {&#xD;&#xA;			let mut stake;&#xD;&#xA;			match StakePool::&lt;T&gt;::try_get() {&#xD;&#xA;				Ok(x) =&gt; {&#xD;&#xA;					stake = x;&#xD;&#xA;					stake.validators += amount;&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;				Err(_) =&gt; {&#xD;&#xA;					stake = TotalStake { validators: amount };&#xD;&#xA;					stake.validators = amount;&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn reduce_stake(amount: BalanceOf&lt;T&gt;) {&#xD;&#xA;			let mut stake;&#xD;&#xA;			match StakePool::&lt;T&gt;::try_get() {&#xD;&#xA;				Ok(x) =&gt; {&#xD;&#xA;					stake = x;&#xD;&#xA;					stake.validators -= amount;&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;				Err(_) =&gt; {&#xD;&#xA;					stake = TotalStake { validators: Default::default() };&#xD;&#xA;					StakePool::&lt;T&gt;::set(stake);&#xD;&#xA;				},&#xD;&#xA;			};&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn check_candidate(candidate: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;			let mut candidates = EnabledAuthorities::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;			match candidates {&#xD;&#xA;				Some(x) =&gt; {&#xD;&#xA;					let mut candidates = x;&#xD;&#xA;					candidates.authorities.sort_by(|(_, a), (_, b)| a.partial_cmp(b).unwrap());&#xD;&#xA;					let candidate_balance =&#xD;&#xA;						Validators::&lt;T&gt;::get(&amp;candidate).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;					match candidate_balance.points &gt; candidates.authorities[0].1 {&#xD;&#xA;						true =&gt; match candidate == candidates.authorities[0].0 {&#xD;&#xA;							true =&gt; {&#xD;&#xA;								candidates.authorities[0].1 = candidate_balance.points;&#xD;&#xA;								EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;							},&#xD;&#xA;							false =&gt; {&#xD;&#xA;								candidates.authorities[0] = (candidate, candidate_balance.points);&#xD;&#xA;								EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;							},&#xD;&#xA;						},&#xD;&#xA;						false =&gt; match candidate == candidates.authorities[0].0 {&#xD;&#xA;							true =&gt; {&#xD;&#xA;								candidates.authorities[0].1 = candidate_balance.points;&#xD;&#xA;								EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;							},&#xD;&#xA;							false =&gt; {&#xD;&#xA;								let mut pos = candidates&#xD;&#xA;									.authorities&#xD;&#xA;									.iter()&#xD;&#xA;									.position(|(x, _)| *x == candidate);&#xD;&#xA;								match pos {&#xD;&#xA;									Some(p) =&gt; {&#xD;&#xA;										candidates.authorities.remove(p);&#xD;&#xA;										EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;									},&#xD;&#xA;									None =&gt; (),&#xD;&#xA;								}&#xD;&#xA;							},&#xD;&#xA;						},&#xD;&#xA;					}&#xD;&#xA;				},&#xD;&#xA;&#xD;&#xA;				None =&gt; {&#xD;&#xA;					let candidate_balance =&#xD;&#xA;						Validators::&lt;T&gt;::get(&amp;candidate).ok_or(&quot;not a validator&quot;)?;&#xD;&#xA;					let mut candidates =&#xD;&#xA;						Candidates { authorities: Default::default(), slot: Default::default() };&#xD;&#xA;					let tuple = (candidate, candidate_balance.points);&#xD;&#xA;					candidates.authorities.try_push(tuple);&#xD;&#xA;					EnabledAuthorities::&lt;T&gt;::set(Some(candidates));&#xD;&#xA;				},&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn register_delegator(who: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;			let default_config = DelegatorConfig {&#xD;&#xA;				is_validator: false,&#xD;&#xA;				delegated_points: Default::default(),&#xD;&#xA;				delegates: Default::default(),&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			Delegators::&lt;T&gt;::insert(who, default_config);&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Anyone faced this before? I already did a ```cargo clean``` and deleted the ```Cargo.lock```. ```rustup``` version is 1.25.1, ```rustc``` is 1.67.0 .&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26594" PostHistoryTypeId="1" PostId="6957" RevisionGUID="e9c4b78b-c0b1-44d5-8d02-27f8df2e339e" CreationDate="2023-01-29T16:20:35.627" UserId="1961" Text="cannot multiply `&amp;&amp;EdwardsBasepointTable` by `&amp;Scalar`" ContentLicense="CC BY-SA 4.0" />
  <row Id="26595" PostHistoryTypeId="3" PostId="6957" RevisionGUID="e9c4b78b-c0b1-44d5-8d02-27f8df2e339e" CreationDate="2023-01-29T16:20:35.627" UserId="1961" Text="|pallet|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26596" PostHistoryTypeId="2" PostId="6958" RevisionGUID="413ae6c8-b5e6-49b9-8d82-14335222bdfa" CreationDate="2023-01-29T17:50:09.250" UserId="630" Text="I'd like to use the Polkadot CLI to create a chainspec with specific user balances pre-seeded. I'd like to be able to do this for any of the dev runtimes.&#xD;&#xA;&#xD;&#xA;In the case of the polkadot dev runtime, I run `polkadot build-spec --dev`. In the case of others, I run `polkadot build-spec --chain=&lt;runtime-name-here&gt;-local`. I capture the output in a file, and then overwrite its `genesis.runtime.balances.balances` with a list of `[ss58, amount]` tuples.&#xD;&#xA;&#xD;&#xA;Then I write the updated chainspec to my fs, and run it with `polkadot --chain &lt;path-to-spec&gt;`. In the case of Westend, I'm able to retrieve a test user balance. All others fail. Also, westend txs stall." ContentLicense="CC BY-SA 4.0" />
  <row Id="26598" PostHistoryTypeId="1" PostId="6958" RevisionGUID="413ae6c8-b5e6-49b9-8d82-14335222bdfa" CreationDate="2023-01-29T17:50:09.250" UserId="630" Text="create a dev chainspec with specific test users" ContentLicense="CC BY-SA 4.0" />
  <row Id="26599" PostHistoryTypeId="3" PostId="6958" RevisionGUID="413ae6c8-b5e6-49b9-8d82-14335222bdfa" CreationDate="2023-01-29T17:50:09.250" UserId="630" Text="|balances|chainspec|cli|polkadot-local|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26600" PostHistoryTypeId="5" PostId="6917" RevisionGUID="603d325e-5431-4858-bea2-66605c7cbf62" CreationDate="2023-01-29T19:18:34.467" UserId="3327" Comment="added 3 characters in body" Text="I am interacting with the substrate node using substrate interfact. I am using following command to submit extrinsic to be executed by the runtime:&#xD;&#xA;&#xD;&#xA;    extrinsic = substrate.create_signed_extrinsic(&#xD;&#xA;            call=call,&#xD;&#xA;            keypair=kp_council_first_member&#xD;&#xA;        )&#xD;&#xA;    &#xD;&#xA;        receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)&#xD;&#xA;    &#xD;&#xA;        if not receipt.is_success:&#xD;&#xA;            print(substrate.get_events(receipt.block_hash))&#xD;&#xA;            raise IOError&#xD;&#xA;&#xD;&#xA;Like we examine the events after submitting and executing the extrinsic. On the same line, I wanted to examine the properties of the extrinsic executed by this command. How can I achieve this? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26602" PostHistoryTypeId="2" PostId="6959" RevisionGUID="fc53c411-5512-4eef-a3e3-1c7c8e04c156" CreationDate="2023-01-29T22:18:03.700" UserId="2548" Text="I would like to store some sensitive data and because the node would be public I am worried that if can be reserved.&#xD;&#xA;&#xD;&#xA;What do you suggest to store sensitive data(passwords) in blockchain? " ContentLicense="CC BY-SA 4.0" />
  <row Id="26604" PostHistoryTypeId="1" PostId="6959" RevisionGUID="fc53c411-5512-4eef-a3e3-1c7c8e04c156" CreationDate="2023-01-29T22:18:03.700" UserId="2548" Text="Can I use Blake2 128 to store sensitive data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26605" PostHistoryTypeId="3" PostId="6959" RevisionGUID="fc53c411-5512-4eef-a3e3-1c7c8e04c156" CreationDate="2023-01-29T22:18:03.700" UserId="2548" Text="|substrate-node-template|rust|cryptography|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26606" PostHistoryTypeId="2" PostId="6960" RevisionGUID="94363da4-c689-4040-a9a7-5166765fe287" CreationDate="2023-01-29T22:41:57.443" UserId="49" Text="Encrypt the data before you supply it to the blockchain using a sufficiently strong encryption algorithm.&#xD;&#xA;Alternatively you can leave a reference in the blockchain, which is the suggested approach for data that does not need to be processed within the consensus system. The flow could be:&#xD;&#xA;&#xD;&#xA; 1. Encrypt data off-chain&#xD;&#xA; 2. Supply encrypted data off-chain to IPFS&#xD;&#xA; 3. Store IPFS-CID of the encrypted data in the blockchain using an extrinsic." ContentLicense="CC BY-SA 4.0" />
  <row Id="26608" PostHistoryTypeId="2" PostId="6961" RevisionGUID="1613ce53-a54a-42eb-9748-bb6b760899f5" CreationDate="2023-01-29T23:30:39.773" UserId="3346" Text="I am attempting to compile and run polkadot-JS/apps on Ubuntu cloud server (Digital Ocean). I have Node.JS and yarn installed. While running &quot;yarn&quot; in the polkadot-JS/apps folder, I get a number of dependency errors. I was careful not to use npm. Most of the errors reference webpack and react. I tried &quot;yarn add webpack&quot; and &quot;yarn add react&quot; but I get the same out put every time. Screenshot attached. Any ideas how to fix this? Would it be possible instead to compile it outside of the ubuntu VPS environment (like on an ubuntu laptop) and then just upload the compiled code? &#xD;&#xA;&#xD;&#xA;[![Screenshot with yarn dependency errors][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LP82S.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="26610" PostHistoryTypeId="1" PostId="6961" RevisionGUID="1613ce53-a54a-42eb-9748-bb6b760899f5" CreationDate="2023-01-29T23:30:39.773" UserId="3346" Text="Dependency Errors While Running Yarn On Ubuntu For Local Installation of Polkadot-JS/apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="26611" PostHistoryTypeId="3" PostId="6961" RevisionGUID="1613ce53-a54a-42eb-9748-bb6b760899f5" CreationDate="2023-01-29T23:30:39.773" UserId="3346" Text="|polkadot-js|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26612" PostHistoryTypeId="2" PostId="6962" RevisionGUID="81f98c61-0f87-4a17-8138-1984c68bc370" CreationDate="2023-01-30T01:03:22.170" UserId="283" Text="Strong cryptographic hash functions are designed to be irreversible. Blake2-128 is quite secure (see the claims on https://www.blake2.net/), and it is fine to post hashes of sensitive data to the blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="26614" PostHistoryTypeId="2" PostId="6963" RevisionGUID="0b45c660-475a-4a6c-93f2-bcf868524b9d" CreationDate="2023-01-30T01:08:56.907" UserId="283" Text="Kusama currently has 42 parachains, while Polkadot has over 30. These are real-world deployments on decentralized validator sets. Validators are recommended to have 8-core CPUs, large SSDs, and 16GB RAM, with 500Mbps+ network connections.&#xD;&#xA;&#xD;&#xA;In orders of magnitude, the answer is tens or hundreds." ContentLicense="CC BY-SA 4.0" />
  <row Id="26616" PostHistoryTypeId="2" PostId="6964" RevisionGUID="f6cf180a-4089-4dd1-aeb2-449426700731" CreationDate="2023-01-30T08:13:23.153" UserId="2792" Text="We are facing a returning &quot;Too many sibling blocks inserted&quot; error then all 4 collator nodes would stop block production. I did some research into the issue and one of the possible solution was to use the revert option. However when I try to run the command it returns a bunch of errors:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    /usr/local/bin/collator revert -d /datalocation --log trace --detailed-log-output --chain=/datalocation/xxx-rococo-raw.json 1&#xD;&#xA;    &#xD;&#xA;    2023-01-30 08:09:45.161 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `txpool-background` failed. Shutting down service.&#xD;&#xA;    2023-01-30 08:09:45.162 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `transaction-pool-task-0` failed. Shutting down service.&#xD;&#xA;    2023-01-30 08:09:45.162 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `transaction-pool-task-1` failed. Shutting down service.&#xD;&#xA;    2023-01-30 08:09:45.162 DEBUG tokio-runtime-worker block-import: Stopping block import because result channel was closed!&#xD;&#xA;    2023-01-30 08:09:45.162 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `basic-block-import-worker` failed. Shutting down service.&#xD;&#xA;    2023-01-30 08:09:45.255 TRACE tokio-runtime-worker mio::poll: deregistering event source from poller&#xD;&#xA;&#xD;&#xA;What am I missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26618" PostHistoryTypeId="1" PostId="6964" RevisionGUID="f6cf180a-4089-4dd1-aeb2-449426700731" CreationDate="2023-01-30T08:13:23.153" UserId="2792" Text="revert option is not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="26619" PostHistoryTypeId="3" PostId="6964" RevisionGUID="f6cf180a-4089-4dd1-aeb2-449426700731" CreationDate="2023-01-30T08:13:23.153" UserId="2792" Text="|parachain|rococo|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26620" PostHistoryTypeId="5" PostId="6957" RevisionGUID="a2cbc545-42e9-4fd7-918e-86b9efd785c6" CreationDate="2023-01-30T09:05:17.857" UserId="34" Comment="deleted 25662 characters in body" Text="I'm trying to build a custom pallet using the substrate-node-template, and when I run ```cargo check``` on the pallet, it's all good. But when I run ```cargo check ``` or ```cargo build --release``` on the whole node, I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0369]: cannot multiply `&amp;&amp;EdwardsBasepointTable` by `&amp;Scalar`&#xD;&#xA;   --&gt; /home/penay/.cargo/registry/src/github.com-1ecc6299db9ec823/snow-0.9.0/src/resolvers/default.rs:132:47&#xD;&#xA;    |&#xD;&#xA;132 |         let point = (&amp;ED25519_BASEPOINT_TABLE * &amp;self.privkey).to_montgomery();&#xD;&#xA;    |                      ------------------------ ^ ------------- &amp;Scalar&#xD;&#xA;    |                      |&#xD;&#xA;    |                      &amp;&amp;EdwardsBasepointTable&#xD;&#xA;    |&#xD;&#xA;help: `*` can be used on `&amp;EdwardsBasepointTable` if you dereference the left-hand side&#xD;&#xA;    |&#xD;&#xA;132 |         let point = (*&amp;ED25519_BASEPOINT_TABLE * &amp;self.privkey).to_montgomery();&#xD;&#xA;    |                      +&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0369`.&#xD;&#xA;error: could not compile `snow` due to previous error&#xD;&#xA;```&#xD;&#xA;I have no clue what it may be, since it's not something I built or interacted with, at least not that I know of.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26621" PostHistoryTypeId="5" PostId="6922" RevisionGUID="ad3086ba-e962-4b5b-93f6-f7a4b6885c01" CreationDate="2023-01-30T09:19:10.283" UserId="116" Comment="added 227 characters in body" Text="## How to obtain a stable encoding of emitted events from a smart contract?  ##&#xD;&#xA;I have a smart contract which emits events when these events are later fetched from the chain:&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct MissionReady {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        owner: AccountId,&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        operator: AccountId,&#xD;&#xA;    }&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    /// Mission finished successfully&#xD;&#xA;    pub struct MissionAccomplished {}&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    /// Mission is deployed on the target fleet as claimed by the network operator&#xD;&#xA;    pub struct MissionDeployed {}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;they are scale encoded respectively as&#xD;&#xA;```&#xD;&#xA;[0, 178, 156, 14, 4, 92, 150, 156, 193, 7, 172, 3, 90, 148, 68, 118, 151, 188, 182, 196 ...]&#xD;&#xA;[1]&#xD;&#xA;[2]&#xD;&#xA;```&#xD;&#xA;which looks like they are stored in an enum internally.&#xD;&#xA;&#xD;&#xA;This encoding changes if the order in the source code is changed.&#xD;&#xA;&#xD;&#xA;The generated metadata in the .contract file can be read with a shell command like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   cat ./target/ink/$i/$i.contract  | jq '{&quot;V3&quot;}[].&quot;spec&quot;.&quot;events&quot;'&#xD;&#xA;```&#xD;&#xA;But this will only detect changes, not prevent them, is there a way to fixate the encoding to keep the binary interface while recompiling the contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26622" PostHistoryTypeId="6" PostId="6922" RevisionGUID="ad3086ba-e962-4b5b-93f6-f7a4b6885c01" CreationDate="2023-01-30T09:19:10.283" UserId="116" Comment="added 227 characters in body" Text="|ink|scale-codec|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26623" PostHistoryTypeId="5" PostId="6912" RevisionGUID="2e5dc1de-727d-487b-b048-ca4de3d0522b" CreationDate="2023-01-30T10:29:24.063" UserId="380" Comment="added 27 characters in body" Text="&#xD;&#xA;&#xD;&#xA;From the [contracts pallet](https://github.com/paritytech/substrate/blob/488fc24d98cfe643402b86990ae0aff27ba927b3/frame/contracts/src/lib.rs#L751-L754):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		/// A new schedule must have a greater version than the current one.&#xD;&#xA;		InvalidScheduleVersion,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The context of this error is sending batch transactions from polkadot-js.&#xD;&#xA;&#xD;&#xA;`api.tx.utility.batchAll(txs)`&#xD;&#xA;&#xD;&#xA;Presumably these are being scheduled using the schedule pallet?&#xD;&#xA;&#xD;&#xA;I'm using the substrate contracts node version 0.23.0-ac615c91892." ContentLicense="CC BY-SA 4.0" />
  <row Id="26624" PostHistoryTypeId="2" PostId="6965" RevisionGUID="ad1fc8ee-9e49-45f1-a23f-abee35a8779c" CreationDate="2023-01-30T10:30:56.423" UserId="371" Text="I have two contracts; `adder` and `accumulator`.&lt;br/&gt;An `inc` method on the `adder` contract internally calls a method on the `accumulator` contract to increase the accumulator's value by 1. &#xD;&#xA;&#xD;&#xA;Using my wallet on polkadot.js app, I called the `inc` function on adder contract. After the transaction got included in a block, I can see that the `accumulator` contract's state gets updated, and the nonce on my wallet address increases by 1. However, the nonce on the adder contract still reads `0`.&#xD;&#xA;&#xD;&#xA;Shouldn't the `adder` contract's nonce increase by 1 too ( like on EVM ), since it executed a transaction to call the `accumulator` contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26626" PostHistoryTypeId="1" PostId="6965" RevisionGUID="ad1fc8ee-9e49-45f1-a23f-abee35a8779c" CreationDate="2023-01-30T10:30:56.423" UserId="371" Text="Ink Contract's nonce doesn't increase on internal transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="26627" PostHistoryTypeId="3" PostId="6965" RevisionGUID="ad1fc8ee-9e49-45f1-a23f-abee35a8779c" CreationDate="2023-01-30T10:30:56.423" UserId="371" Text="|ink|smart-contract|nonce|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26628" PostHistoryTypeId="5" PostId="6912" RevisionGUID="9b919227-f099-4912-9de9-96823cbd5028" CreationDate="2023-01-30T10:50:29.340" UserId="380" Comment="deleted 9 characters in body" Text="&#xD;&#xA;&#xD;&#xA;From the [contracts pallet](https://github.com/paritytech/substrate/blob/488fc24d98cfe643402b86990ae0aff27ba927b3/frame/contracts/src/lib.rs#L751-L754):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		/// A new schedule must have a greater version than the current one.&#xD;&#xA;		InvalidScheduleVersion,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The context of this error is sending batch transactions from polkadot-js.&#xD;&#xA;&#xD;&#xA;`api.tx.utility.batchAll(txs)`&#xD;&#xA;&#xD;&#xA;Presumably these are being scheduled using the schedule pallet?&#xD;&#xA;&#xD;&#xA;I'm using the substrate-contracts-node 0.23.0-430873a4fbe" ContentLicense="CC BY-SA 4.0" />
  <row Id="26629" PostHistoryTypeId="2" PostId="6966" RevisionGUID="23a83b0d-8dc6-4875-8d34-8286ce1fefe6" CreationDate="2023-01-30T11:15:49.233" UserId="2762" Text="To get the name you have to query the metadata:&#xD;&#xA;&#xD;&#xA;    const metadata = await api.query.nominationPools.metadata(pool_id);&#xD;&#xA;&#xD;&#xA;The result is an hex value: `0x50617261646f78207c20506172614e6f6465732e696f20f09f9a80202d204e6f6d696e6174696e6720686967682072657475726e2c20747275737465642c20696e646570656e64656e742076616c696461746f72732e`&#xD;&#xA;&#xD;&#xA;You can convert it to String using the utils from the polkadotJS library:&#xD;&#xA;&#xD;&#xA;    const { hexToString } = require('@polkadot/util');&#xD;&#xA;    hexToString(metadata.toHuman()&#xD;&#xA;This will return you the name: `Paradox | ParaNodes.io  - Nominating high return, trusted, independent validators.`" ContentLicense="CC BY-SA 4.0" />
  <row Id="26631" PostHistoryTypeId="2" PostId="6967" RevisionGUID="1de72858-a4af-4109-a7c0-8a3163776d15" CreationDate="2023-01-30T12:01:54.047" UserId="3690" Text="I have the keys separate in a file. I don't want to insert keys for polkadot js app for each node running the relay chain. Same for collator for parachain.&#xD;&#xA;&#xD;&#xA;What is command to insert keys through CLI?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26633" PostHistoryTypeId="1" PostId="6967" RevisionGUID="1de72858-a4af-4109-a7c0-8a3163776d15" CreationDate="2023-01-30T12:01:54.047" UserId="3690" Text="Command to insert keys in Polkadot Relay Chain and Parachain for Custom Validators in ChainSpec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26634" PostHistoryTypeId="3" PostId="6967" RevisionGUID="1de72858-a4af-4109-a7c0-8a3163776d15" CreationDate="2023-01-30T12:01:54.047" UserId="3690" Text="|polkadot-js|polkadot|relay-chain|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26635" PostHistoryTypeId="2" PostId="6968" RevisionGUID="e8c598da-0ca5-4c61-87c1-65820aca17e7" CreationDate="2023-01-30T12:09:16.530" UserId="3414" Text="./target/release/polkadot key insert --base-path /tmp/relay/alice \&#xD;&#xA;  --chain raw-local-chain-spec.json \&#xD;&#xA;  --scheme Ed25519 \&#xD;&#xA;  --suri &quot;chaos dice yard frown drastic lemon airport basket sport sentence spoil beauty&quot; \&#xD;&#xA;  --password-interactive \&#xD;&#xA;  --key-type gran&#xD;&#xA;&#xD;&#xA;./target/release/polkadot key insert --base-path /tmp/relay/alice \&#xD;&#xA;  --chain raw-local-chain-spec.json \&#xD;&#xA;  --scheme Sr25519 \&#xD;&#xA;  --suri &quot;chaos dice yard frown drastic lemon airport basket sport sentence spoil beauty&quot; \&#xD;&#xA;  --password-interactive \&#xD;&#xA;  --key-type babe&#xD;&#xA;&#xD;&#xA;These commands may help you.Kindly insert your own secret phase of the keys you want to add.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26637" PostHistoryTypeId="2" PostId="6969" RevisionGUID="88718a67-e495-4eae-96bb-083d022303ba" CreationDate="2023-01-30T12:39:14.387" UserId="2281" Text="Solution to this is chill your nominators/validators, and validate/nominate again so that new implementation will record your votes in T::VoterList. And maybe forceNewEra() using sudo account.  re-try a couple of times until you see staking.Elected." ContentLicense="CC BY-SA 4.0" />
  <row Id="26639" PostHistoryTypeId="2" PostId="6970" RevisionGUID="9e95a402-6b24-48ba-bccf-0794982a7583" CreationDate="2023-01-30T12:42:20.437" UserId="2762" Text="First check this old answer in StackExchange to see the difference between [Asset Teleportation and via Reserve Asset Transfers][1]. &#xD;&#xA;&#xD;&#xA;You will be able to teleport between parachains, as long as they have&#xD;&#xA;a trusted relationship.&#xD;&#xA;If we take a look at [Kusama runtime][2] in the config of xcm_executor we see this line.&#xD;&#xA; &#xD;&#xA;    type IsTeleporter = TrustedTeleporters;&#xD;&#xA;&#xD;&#xA;Where it specifices the parachains that have a trusted relationship (Statemine and Encointer):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    parameter_types! {&#xD;&#xA;	  pub const Ksm: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(TokenLocation::get()) });&#xD;&#xA;	  pub const Statemine: MultiLocation = Parachain(1000).into_location();&#xD;&#xA;	  pub const Encointer: MultiLocation = Parachain(1001).into_location();&#xD;&#xA;	  pub const KsmForStatemine: (MultiAssetFilter, MultiLocation) = (Ksm::get(), Statemine::get());&#xD;&#xA;	  pub const KsmForEncointer: (MultiAssetFilter, MultiLocation) = (Ksm::get(), Encointer::get());&#xD;&#xA;	  pub const MaxAssetsIntoHolding: u32 = 64;&#xD;&#xA;  }&#xD;&#xA;  pub type TrustedTeleporters =&#xD;&#xA;	(xcm_builder::Case&lt;KsmForStatemine&gt;, xcm_builder::Case&lt;KsmForEncointer&gt;);&#xD;&#xA;```&#xD;&#xA;About the channels currently you need them. [Check this old response in StackExchange][3].&#xD;&#xA;&#xD;&#xA;&gt; All messages currently go through the Relay Chain using XCMP-lite (aka HRMP). Once XCMP is fully implemented, channels will indeed be directly between parachains, and they would use teleportation or reserve backed transfer depending on their trust relationship.&#xD;&#xA;&#xD;&#xA;To teleport the asset, I recommend you to first check the tutorial [Transfer assets with XCM][4] to know how to set up the environment, is using [Zombinet][5] to set up a local test network to simulate a relay chain with validators and parachain collator nodes.&#xD;&#xA;&#xD;&#xA;When you have it all running you have to execute the extrinsic `limitedTeleportAsset` from the pallet `xcmPallet`.&#xD;&#xA;In this extrinsic you have to specify the destination parachain, the beneficiary account (Account ID of the account you are teleporting the asset), the asset that is going to be teleported, the feeAssetItem and the weightLimit for the XCM fee purchase.&#xD;&#xA;&#xD;&#xA;For a more detail guide check this workshop on Youtube [Parity Technologies: XCM Workshop | Polkadot Decoded 2022][6] where it performs an asset teleportation and a reserve assettTransfer.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/xcm_config.rs#L352&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/1386/2762&#xD;&#xA;  [4]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/transfer-assets-with-xcm/&#xD;&#xA;  [5]: https://docs.substrate.io/test/simulate-parachains/&#xD;&#xA;  [6]: https://www.youtube.com/watch?v=UfxU3hUprKo" ContentLicense="CC BY-SA 4.0" />
  <row Id="26641" PostHistoryTypeId="2" PostId="6971" RevisionGUID="5f082580-838a-4f82-8a2e-3910cdaacc79" CreationDate="2023-01-30T12:51:00.180" UserId="2348" Text="chiilling the validotors is not good practise as it is a 1 validator nin network and if you do this your blockchain will stop you can do some other changes in you program you can add fallback in lib.rs to&#xD;&#xA;type Fallback =&#xD;&#xA;		frame_election_provider_support::onchain::UnboundedExecution&lt;OnChainSeqPhragmen&gt;;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26643" PostHistoryTypeId="5" PostId="6969" RevisionGUID="7543456b-7935-4cf0-9bf0-6136496e4305" CreationDate="2023-01-30T13:01:50.130" UserId="2281" Comment="added 77 characters in body" Text="Solution to this is chill your nominators/validators, and validate/nominate again so that new implementation will record your votes in T::VoterList. And maybe forceNewEra() using sudo account.  re-try a couple of times until you see staking.Elected.&#xD;&#xA;&#xD;&#xA;Make sure you have setup a private network and you have minimum 3 validators." ContentLicense="CC BY-SA 4.0" />
  <row Id="26644" PostHistoryTypeId="2" PostId="6972" RevisionGUID="a0dce80c-f44d-44cb-b910-4ff8e1d70017" CreationDate="2023-01-30T13:04:22.780" UserId="3667" Text="I found a perhaps similar question here : https://substrate.stackexchange.com/questions/3528/polkadot-explorer-decode-storage-system-events&#xD;&#xA;[![Error][1]][1]&#xD;&#xA;&#xD;&#xA;We are running a custom parachain with frontier on a local testnet and while the transactions go through fine, we are seeing these. Any idea where to look? &#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/G32eo.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26646" PostHistoryTypeId="1" PostId="6972" RevisionGUID="a0dce80c-f44d-44cb-b910-4ff8e1d70017" CreationDate="2023-01-30T13:04:22.780" UserId="3667" Text="PolkadotJS system and storage events are not being decoded and shown properly" ContentLicense="CC BY-SA 4.0" />
  <row Id="26647" PostHistoryTypeId="3" PostId="6972" RevisionGUID="a0dce80c-f44d-44cb-b910-4ff8e1d70017" CreationDate="2023-01-30T13:04:22.780" UserId="3667" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26652" PostHistoryTypeId="5" PostId="6964" RevisionGUID="50bc06e5-e31e-44e6-898e-763d63f9a132" CreationDate="2023-01-30T14:41:19.090" UserId="2792" Comment="added 30 characters in body" Text="We are facing a returning &quot;Too many sibling blocks inserted&quot; error then all 4 collator nodes would stop block production. I did some research into the issue and one of the possible solution was to use the revert option. However when I try to run the command it returns a bunch of errors:&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    /usr/local/bin/collator revert -d /datalocation --log trace --detailed-log-output --chain=/datalocation/xxx-rococo-raw.json 1&#xD;&#xA;    &#xD;&#xA;    2023-01-30 08:09:45.161 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `txpool-background` failed. Shutting down service.&#xD;&#xA;    2023-01-30 08:09:45.162 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `transaction-pool-task-0` failed. Shutting down service.&#xD;&#xA;    2023-01-30 08:09:45.162 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `transaction-pool-task-1` failed. Shutting down service.&#xD;&#xA;    2023-01-30 08:09:45.162 DEBUG tokio-runtime-worker block-import: Stopping block import because result channel was closed!&#xD;&#xA;    2023-01-30 08:09:45.162 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `basic-block-import-worker` failed. Shutting down service.&#xD;&#xA;    2023-01-30 08:09:45.255 TRACE tokio-runtime-worker mio::poll: deregistering event source from poller&#xD;&#xA;&#xD;&#xA;What am I missing? We are using version v0.9.37.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26653" PostHistoryTypeId="2" PostId="6974" RevisionGUID="3cdf9c5a-ccfa-451c-8163-ec6100abe818" CreationDate="2023-01-30T16:43:50.623" UserId="2135" Text="I want to have a queue system in a pallet using a storage value and a bounded vector.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Data related to tranmission queues.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn at_block_queue)]&#xD;&#xA;pub type AtBlockQueue&lt;T: Config&gt; = StorageValue&lt;_, Queue&lt;T::BlockNumber, T::SimultaneousTransmissionLimit&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;```rust&#xD;&#xA;pub struct Queue&lt;BlockNumber: Clone + PartialEq + Debug + sp_std::cmp::PartialOrd, Limit: Get&lt;u32&gt;&gt;(&#xD;&#xA;	pub BoundedVec&lt;(NFTId, BlockNumber), Limit&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would like this queue to be limited at 10_000_000 values. This seems ok while testing but the benchmarks are failing due to a failed allocation.&#xD;&#xA;&#xD;&#xA;In my benchmarking code, I use a function to fill the queue to simulate usage : &#xD;&#xA;```rust&#xD;&#xA;// Benchmark / tests only&#xD;&#xA;	pub fn bulk_insert(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		nft_id: NFTId,&#xD;&#xA;		block_number: BlockNumber,&#xD;&#xA;		number: u32,&#xD;&#xA;	) -&gt; Result&lt;(), ()&gt; {&#xD;&#xA;		self.0.try_extend(vec![(nft_id, block_number); number as usize].into_iter())&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I was wondering if the Limit value was too high or my benchmarking method is wrong." ContentLicense="CC BY-SA 4.0" />
  <row Id="26655" PostHistoryTypeId="1" PostId="6974" RevisionGUID="3cdf9c5a-ccfa-451c-8163-ec6100abe818" CreationDate="2023-01-30T16:43:50.623" UserId="2135" Text="How to benchmark huge bounded vectors?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26656" PostHistoryTypeId="3" PostId="6974" RevisionGUID="3cdf9c5a-ccfa-451c-8163-ec6100abe818" CreationDate="2023-01-30T16:43:50.623" UserId="2135" Text="|pallet|storage|benchmarking|benchmark|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26657" PostHistoryTypeId="2" PostId="6975" RevisionGUID="df0d5dd1-0381-45e4-81f6-7bc9c6dfadef" CreationDate="2023-01-30T17:12:18.443" UserId="3030" Text="Is there a way of encrypting substrate storage using the root key pair? Or is there anyway of making on chain data private to everyone but the system.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;thanks&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26659" PostHistoryTypeId="1" PostId="6975" RevisionGUID="df0d5dd1-0381-45e4-81f6-7bc9c6dfadef" CreationDate="2023-01-30T17:12:18.443" UserId="3030" Text="Encrypting substrate storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="26660" PostHistoryTypeId="3" PostId="6975" RevisionGUID="df0d5dd1-0381-45e4-81f6-7bc9c6dfadef" CreationDate="2023-01-30T17:12:18.443" UserId="3030" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26661" PostHistoryTypeId="2" PostId="6976" RevisionGUID="22c4e16e-98fc-4dd0-aeba-371727875d8b" CreationDate="2023-01-30T17:45:13.020" UserId="2762" Text="All the information on a blockchain is public and available to all the participants of the network.&#xD;&#xA;&#xD;&#xA;You can encrypt the data you want to store **offchain** using your keypair and store it the storage, see an example of how to [Encrypt &amp; Decrypt Messages][1] with the PolkadotJS library.&#xD;&#xA;&#xD;&#xA;See I highlighted the offchain word. It is important you do not encrypt it using a smart contract or a extrinsic, because the input of the extrinsic will have the raw data and it will be public and visible to all. In other words encrypt data before it is added to a blockchain, and then decrypt it after it has been retrieved from the blockchain.&#xD;&#xA;&#xD;&#xA;With that said, think twice if you want to store sensible data in the Blockchain. &#xD;&#xA;One of the properties of Blockchain is **immutability**, that means that even if stored in encrypted form, the critical data will remain in the blockchain forever. In addition to the risk of key compromise, the encrypted data may be subject to brute force decryption attacks in the future, or breakthroughs in technology like quantum computing might render current encryption technologies ineffective. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/util-crypto/examples/encrypt-decrypt/" ContentLicense="CC BY-SA 4.0" />
  <row Id="26667" PostHistoryTypeId="5" PostId="6971" RevisionGUID="b60bc651-1c07-46b1-a5a9-ff4b8f7e7267" CreationDate="2023-01-30T18:24:19.493" UserId="2281" Comment="improved formatting" Text="chilling the validators is not good practise as it is a 1 validator on network and if you do this your blockchain will stop you can do some other changes in you program you can add fallback in lib.rs to&#xD;&#xA;&#xD;&#xA;`type Fallback =&#xD;&#xA;		frame_election_provider_support::onchain::UnboundedExecution&lt;OnChainSeqPhragmen&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="26668" PostHistoryTypeId="24" PostId="6971" RevisionGUID="b60bc651-1c07-46b1-a5a9-ff4b8f7e7267" CreationDate="2023-01-30T18:24:19.493" Comment="Proposed by 2281 approved by 34 edit id of 375" ContentLicense="CC BY-SA 4.0" />
  <row Id="26674" PostHistoryTypeId="2" PostId="6979" RevisionGUID="07eae16c-0dfa-4b15-8ea1-bed9197b74e7" CreationDate="2023-01-31T02:53:00.683" UserId="3770" Text="I've created a custom network from [node-template](https://github.com/substrate-developer-hub/substrate-node-template) with more pallets (staking, babe,...)&#xD;&#xA;&#xD;&#xA;I've generated a custom `chain_specs.json` following [this tutorial](https://docs.substrate.io/tutorials/get-started/add-trusted-nodes/)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;chain_specs.json&#xD;&#xA;&#xD;&#xA;{&#xD;&#xA;   ...&#xD;&#xA;   &quot;genesis&quot;: {&#xD;&#xA;      ...&#xD;&#xA;      &quot;babe&quot;: {&#xD;&#xA;        &quot;authorities&quot;: [],&#xD;&#xA;        &quot;epochConfig&quot;: {&#xD;&#xA;          &quot;c&quot;: [&#xD;&#xA;            1,&#xD;&#xA;            4&#xD;&#xA;          ],&#xD;&#xA;          &quot;allowed_slots&quot;: &quot;PrimaryAndSecondaryVRFSlots&quot;&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;grandpa&quot;: {&#xD;&#xA;        &quot;authorities&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;balances&quot;: {&#xD;&#xA;        &quot;balances&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5FHu5erf4YsJknSyX3xanmSyAciZovG5HoZ7Pt4foeFbmtj6&quot;,&#xD;&#xA;            1152921504606846976&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5CniNy63f1g6u9q7ibiiTJYurSN9SRwxf8TPdYKXMpCjZzsa&quot;,&#xD;&#xA;            1152921504606846976&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;transactionPayment&quot;: {&#xD;&#xA;        &quot;multiplier&quot;: &quot;1000000000000000000&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;session&quot;: {&#xD;&#xA;        &quot;keys&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5FHu5erf4YsJknSyX3xanmSyAciZovG5HoZ7Pt4foeFbmtj6&quot;,&#xD;&#xA;            &quot;5FHu5erf4YsJknSyX3xanmSyAciZovG5HoZ7Pt4foeFbmtj6&quot;,&#xD;&#xA;            {&#xD;&#xA;              &quot;babe&quot;: &quot;5FHu5erf4YsJknSyX3xanmSyAciZovG5HoZ7Pt4foeFbmtj6&quot;,&#xD;&#xA;              &quot;grandpa&quot;: &quot;5EPFfe4wL7ooVaD96e9hFDx1aHjjfRhLtNwoTaS3BgBNTQY9&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5CniNy63f1g6u9q7ibiiTJYurSN9SRwxf8TPdYKXMpCjZzsa&quot;,&#xD;&#xA;            &quot;5CniNy63f1g6u9q7ibiiTJYurSN9SRwxf8TPdYKXMpCjZzsa&quot;,&#xD;&#xA;            {&#xD;&#xA;              &quot;babe&quot;: &quot;5CniNy63f1g6u9q7ibiiTJYurSN9SRwxf8TPdYKXMpCjZzsa&quot;,&#xD;&#xA;              &quot;grandpa&quot;: &quot;5H4hSLfv45Yf464bPDpvSQzqey3q8dpUhbm3qrWwDtvc8yQL&quot;&#xD;&#xA;            }&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;staking&quot;: {&#xD;&#xA;        &quot;validatorCount&quot;: 2,&#xD;&#xA;        &quot;minimumValidatorCount&quot;: 1,&#xD;&#xA;        &quot;invulnerables&quot;: [&#xD;&#xA;          &quot;5FHu5erf4YsJknSyX3xanmSyAciZovG5HoZ7Pt4foeFbmtj6&quot;,&#xD;&#xA;          &quot;5CniNy63f1g6u9q7ibiiTJYurSN9SRwxf8TPdYKXMpCjZzsa&quot;&#xD;&#xA;        ],&#xD;&#xA;        &quot;forceEra&quot;: &quot;NotForcing&quot;,&#xD;&#xA;        &quot;slashRewardFraction&quot;: 100000000,&#xD;&#xA;        &quot;canceledPayout&quot;: 0,&#xD;&#xA;        &quot;stakers&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5FHu5erf4YsJknSyX3xanmSyAciZovG5HoZ7Pt4foeFbmtj6&quot;,&#xD;&#xA;            &quot;5FHu5erf4YsJknSyX3xanmSyAciZovG5HoZ7Pt4foeFbmtj6&quot;,&#xD;&#xA;            100000000000000,&#xD;&#xA;            &quot;Validator&quot;&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5CniNy63f1g6u9q7ibiiTJYurSN9SRwxf8TPdYKXMpCjZzsa&quot;,&#xD;&#xA;            &quot;5CniNy63f1g6u9q7ibiiTJYurSN9SRwxf8TPdYKXMpCjZzsa&quot;,&#xD;&#xA;            100000000000000,&#xD;&#xA;            &quot;Validator&quot;&#xD;&#xA;          ]&#xD;&#xA;        ],&#xD;&#xA;        &quot;minNominatorBond&quot;: 0,&#xD;&#xA;        &quot;minValidatorBond&quot;: 0,&#xD;&#xA;        &quot;maxValidatorCount&quot;: null,&#xD;&#xA;        &quot;maxNominatorCount&quot;: null&#xD;&#xA;      }&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've run on 2 VPS and everything works fine, but the problem is I can not transfer or withdraw tokens of the two accounts above (using the [polkadot js extension](https://polkadot.js.org/extension/)).&#xD;&#xA;&#xD;&#xA;Does anyone have ideas about this problem?&#xD;&#xA;&#xD;&#xA;Thank you!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26676" PostHistoryTypeId="1" PostId="6979" RevisionGUID="07eae16c-0dfa-4b15-8ea1-bed9197b74e7" CreationDate="2023-01-31T02:53:00.683" UserId="3770" Text="How do withdraw or transfer tokens from the custom predefined accounts in a private network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26677" PostHistoryTypeId="3" PostId="6979" RevisionGUID="07eae16c-0dfa-4b15-8ea1-bed9197b74e7" CreationDate="2023-01-31T02:53:00.683" UserId="3770" Text="|polkadot-js|staking|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26678" PostHistoryTypeId="2" PostId="6980" RevisionGUID="17ee03a9-c123-445f-aafd-b2b65448c268" CreationDate="2023-01-31T03:20:16.910" UserId="3142" Text="I need to call methods in the *Collective* pallet to:&#xD;&#xA;&#xD;&#xA;- get a list of council members&#xD;&#xA;- create a new *Proposal*&#xD;&#xA;- propose the proposal&#xD;&#xA;&#xD;&#xA;BUT from my custom pallet.&#xD;&#xA;&#xD;&#xA;I have seen some of the documentation for loosely coupled pallets but I have not been able to get it to work.  The example that I have seen requires that the coupled pallet already have traits that you can import into your custom pallet.  The *Collective* pallet defines a single trait that doesn't contain any of the functionality that I need.  One drastic approach would be to create a new custom pallet based on the *Collective* pallet source code, implement traits for it and then use it.&#xD;&#xA;&#xD;&#xA;I would prefer a loosely coupled approach.  What can I do?  If it's possible, show me how I can, for example, access all the *Council* members and print the address of the first member.&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="26680" PostHistoryTypeId="1" PostId="6980" RevisionGUID="17ee03a9-c123-445f-aafd-b2b65448c268" CreationDate="2023-01-31T03:20:16.910" UserId="3142" Text="How to call methods on Collective pallet from a custom pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26681" PostHistoryTypeId="3" PostId="6980" RevisionGUID="17ee03a9-c123-445f-aafd-b2b65448c268" CreationDate="2023-01-31T03:20:16.910" UserId="3142" Text="|loose-coupling|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26682" PostHistoryTypeId="5" PostId="6980" RevisionGUID="7f1bb9aa-bdb8-406e-a6fc-8cfa900a6269" CreationDate="2023-01-31T03:28:25.653" UserId="3142" Comment="added 289 characters in body" Text="I need to call methods in the *Collective* pallet to:&#xD;&#xA;&#xD;&#xA;- get a list of council members&#xD;&#xA;- create a new *Proposal*&#xD;&#xA;- propose the proposal&#xD;&#xA;&#xD;&#xA;BUT from my custom pallet.&#xD;&#xA;&#xD;&#xA;    /// Function in my custom pallet&#xD;&#xA;    #[pallet::call_index(0)]&#xD;&#xA;    #[pallet::weight(1000)]&#xD;&#xA;     pub fn do_something(&#xD;&#xA;      origin: OriginFor&lt;T&gt;&#xD;&#xA;     ) -&gt; DispatchResult {&#xD;&#xA;    &#xD;&#xA;      let council_members = CollectivePalletInterface::members();&#xD;&#xA;      let first_member = council_members.into_iter().next();&#xD;&#xA;    &#xD;&#xA;    ... etc ...&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I have seen some of the documentation for loosely coupled pallets but I have not been able to get it to work.  The example that I have seen requires that the coupled pallet already have traits that you can import into your custom pallet.  The *Collective* pallet defines a single trait that doesn't contain any of the functionality that I need.  One drastic approach would be to create a new custom pallet based on the *Collective* pallet source code, implement traits for it and then use it.&#xD;&#xA;&#xD;&#xA;I would prefer a loosely coupled approach.  What can I do?  If it's possible, show me how I can, for example, access all the *Council* members and print the address of the first member.&#xD;&#xA; &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26683" PostHistoryTypeId="2" PostId="6981" RevisionGUID="354d3470-b203-41ef-b8bd-24f825efc457" CreationDate="2023-01-31T03:40:42.937" UserId="251" Text="If the target pallet doesn't provide a trait. You can do:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub trait Config: pallet_collective::Config { ... }&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;let council_members = pallet_collective::Members::get();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// in your pallet&#xD;&#xA;pub trait Config {&#xD;&#xA;  type GetMembers: frame_support::traits::Get&lt;Vec&lt;Self::AccoundId&gt;&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;let council_members = T::GetMembers::get();&#xD;&#xA;&#xD;&#xA;// in runtime&#xD;&#xA;frame_support::construct_runtime! {&#xD;&#xA;  Council: pallet_collective&#xD;&#xA;}&#xD;&#xA;impl pallet_collective::Config for Runtime { ... }&#xD;&#xA;pub struct GetMembers;&#xD;&#xA;impl Get&lt;Vec&lt;AccountId&gt;&gt; for GetMembers {&#xD;&#xA;  fn get() -&gt; Vec&lt;AccountId&gt; {&#xD;&#xA;    Council::members()&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;impl your_pallet::Config for Runtime {&#xD;&#xA;  type GetMembers = GetMembers;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26685" PostHistoryTypeId="2" PostId="6982" RevisionGUID="cd9218cf-d5ba-4023-b0ec-b719bd831b49" CreationDate="2023-01-31T04:47:56.870" UserId="3538" Text="I want to add a logo to my native token on Substrate. I've seen it's implemented for multiple Substrate-based chains, but I couldn't find their implementation logics. Like [here](https://github.com/PureStake/moonbeam/tree/master/media) are the logos for Moonbeam native tokens, GLMR &amp; MOVR, but I don't see where they are using these media files. &#xD;&#xA;&#xD;&#xA;Any help in this regard would be highly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="26687" PostHistoryTypeId="1" PostId="6982" RevisionGUID="cd9218cf-d5ba-4023-b0ec-b719bd831b49" CreationDate="2023-01-31T04:47:56.870" UserId="3538" Text="Add a logo to Substrate Native Token" ContentLicense="CC BY-SA 4.0" />
  <row Id="26688" PostHistoryTypeId="3" PostId="6982" RevisionGUID="cd9218cf-d5ba-4023-b0ec-b719bd831b49" CreationDate="2023-01-31T04:47:56.870" UserId="3538" Text="|substrate-node-template|token|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26689" PostHistoryTypeId="2" PostId="6983" RevisionGUID="0272ee44-3a3a-4a82-aeee-6093a88114af" CreationDate="2023-01-31T05:36:15.433" UserId="251" Text="Substrate doesn't provide this feature natively.&#xD;&#xA;&#xD;&#xA;I believe they just put these in their repository for third-party usage." ContentLicense="CC BY-SA 4.0" />
  <row Id="26691" PostHistoryTypeId="2" PostId="6984" RevisionGUID="be0a83cc-ec4b-4092-8c16-74cf7c0881e8" CreationDate="2023-01-31T06:03:32.607" UserId="2281" Text="i am using **pallet-contracts** in my substrate based chain when i am deploying the wasm contract some balance is getting reserved.How can i stop this i don't want to reserve the balance?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Eal3M.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26693" PostHistoryTypeId="1" PostId="6984" RevisionGUID="be0a83cc-ec4b-4092-8c16-74cf7c0881e8" CreationDate="2023-01-31T06:03:32.607" UserId="2281" Text="Balance got Reserved while deploying wasm contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26694" PostHistoryTypeId="3" PostId="6984" RevisionGUID="be0a83cc-ec4b-4092-8c16-74cf7c0881e8" CreationDate="2023-01-31T06:03:32.607" UserId="2281" Text="|wasm|pallet-contracts|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26695" PostHistoryTypeId="2" PostId="6985" RevisionGUID="a756fc9f-82ea-4a18-96af-bbd4f433d3d4" CreationDate="2023-01-31T06:26:40.437" UserId="3667" Text="You have to make a PR to Polkadot-JS apps to be able to set your custom logo among other things. &#xD;&#xA;Here's an example : https://github.com/polkadot-js/apps/pull/6890 " ContentLicense="CC BY-SA 4.0" />
  <row Id="26697" PostHistoryTypeId="5" PostId="6972" RevisionGUID="3f37f8ab-eb13-4d4c-974c-eb3c8a673e8e" CreationDate="2023-01-31T06:31:19.233" UserId="3667" Comment="added 60 characters in body" Text="I found a perhaps similar question here : https://substrate.stackexchange.com/questions/3528/polkadot-explorer-decode-storage-system-events&#xD;&#xA;[![Error][1]][1]&#xD;&#xA;&#xD;&#xA;We are running a custom parachain with frontier on a local testnet and while the transactions go through fine, we are seeing these. Any idea where to look? &#xD;&#xA;&#xD;&#xA;Here's some more error messages from the web console: &#xD;&#xA;[![console err][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/G32eo.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ndk8C.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26698" PostHistoryTypeId="2" PostId="6986" RevisionGUID="195767ba-d677-4cbe-9ccd-bf700c64ce7e" CreationDate="2023-01-31T07:11:09.577" UserId="1813" Text="We can list the active set with `session::validators()` and/or `babe::authorities()`&#xD;&#xA;&#xD;&#xA;How to list *waiting* validators though?&#xD;&#xA;&#xD;&#xA;[![active and waiting validators][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/otBCd.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26700" PostHistoryTypeId="1" PostId="6986" RevisionGUID="195767ba-d677-4cbe-9ccd-bf700c64ce7e" CreationDate="2023-01-31T07:11:09.577" UserId="1813" Text="How to list waiting validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26701" PostHistoryTypeId="3" PostId="6986" RevisionGUID="195767ba-d677-4cbe-9ccd-bf700c64ce7e" CreationDate="2023-01-31T07:11:09.577" UserId="1813" Text="|validator|grandpa|babe|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26702" PostHistoryTypeId="2" PostId="6987" RevisionGUID="80f3a12c-8a8b-4c4b-ad04-b46bf7007704" CreationDate="2023-01-31T08:07:06.797" UserId="251" Text="Use `Staking::validators()` to get all validators.&#xD;&#xA;&#xD;&#xA;Then:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let all = Staking::validators();&#xD;&#xA;let active = Session::validators();&#xD;&#xA;let waiting = all.difference(active);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26704" PostHistoryTypeId="2" PostId="6988" RevisionGUID="d8fac66c-699d-4ca8-b6cf-2c3b4883de1a" CreationDate="2023-01-31T08:18:30.373" UserId="1795" Text="The common way of generated type augmentation is by fetching the latest metadata from a running node with the following piece of code:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;await provider.connect()&#xD;&#xA;await provider.isReady&#xD;&#xA;const result = await provider.send('state_getMetadata')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The return type of the call seems to be an object with the following structure:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;result&quot;: &lt;scale_and_hex_encoded_metadata&gt;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On the resulting JSON file, some variation of the `ts-node --skip-project ../../node_modules/.bin/polkadot-types-from-defs` is to be run.&#xD;&#xA;&#xD;&#xA;We want to expose the generated metadata for a built WASM using `subwasm`, with ` subwasm metadata --json &lt;runtime_wasm&gt;`, which generates metadata in the following format:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;V14&quot;: {&#xD;&#xA;    &quot;types&quot;: {...},&#xD;&#xA;    &quot;pallets&quot;: [...],&#xD;&#xA;    &quot;extrinsic&quot;: {...},&#xD;&#xA;    &quot;ty&quot;: 232&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the way to use this metadata format to generate the augmented types? Do we need to apply some sort of encoding on the data before calling the `polkadot-types-from-defs` script? If so, what is the process? The RPC node seems to be returning a `magicNumber` which the script expects, and I could not find much information about it." ContentLicense="CC BY-SA 4.0" />
  <row Id="26706" PostHistoryTypeId="1" PostId="6988" RevisionGUID="d8fac66c-699d-4ca8-b6cf-2c3b4883de1a" CreationDate="2023-01-31T08:18:30.373" UserId="1795" Text="How to generate augmented types from V14 metadata generated with subwasm" ContentLicense="CC BY-SA 4.0" />
  <row Id="26707" PostHistoryTypeId="3" PostId="6988" RevisionGUID="d8fac66c-699d-4ca8-b6cf-2c3b4883de1a" CreationDate="2023-01-31T08:18:30.373" UserId="1795" Text="|polkadot-js|metadata|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26708" PostHistoryTypeId="5" PostId="6988" RevisionGUID="44bb7103-0c3e-4c9c-aa2e-d6c0da2ba90e" CreationDate="2023-01-31T08:30:26.807" UserId="1795" Comment="edited body" Text="The common way of generated type augmentation is by fetching the latest metadata from a running node with the following piece of code:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;await provider.connect()&#xD;&#xA;await provider.isReady&#xD;&#xA;const result = await provider.send('state_getMetadata')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The return type of the call seems to be an object with the following structure:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;result&quot;: &lt;scale_and_hex_encoded_metadata&gt;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On the resulting JSON file, some variation of the `ts-node --skip-project ../../node_modules/.bin/polkadot-types-from-defs` is to be run.&#xD;&#xA;&#xD;&#xA;We want to expose the generated metadata for a built WASM using `subwasm`, with ` subwasm metadata --json &lt;runtime_wasm&gt;`, which generates metadata in the following format:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;V14&quot;: {&#xD;&#xA;    &quot;types&quot;: {...},&#xD;&#xA;    &quot;pallets&quot;: [...],&#xD;&#xA;    &quot;extrinsic&quot;: {...},&#xD;&#xA;    &quot;ty&quot;: 232&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the way to use this metadata format to generate the augmented types? Do we need to apply some sort of encoding on the data before calling the `polkadot-types-from-defs` script? If so, what is the process? The RPC node seems to be returning a `MagicNumber` which the script expects, and I could not find much information about it." ContentLicense="CC BY-SA 4.0" />
  <row Id="26709" PostHistoryTypeId="5" PostId="6968" RevisionGUID="77b6fba3-e24f-48dc-b857-16dec9018004" CreationDate="2023-01-31T09:10:58.227" UserId="2762" Comment="improved formatting" Text="These commands may help you.&#xD;&#xA; &#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/alice \&#xD;&#xA;          --chain raw-local-chain-spec.json \&#xD;&#xA;          --scheme Ed25519 \&#xD;&#xA;          --suri &quot;chaos dice yard frown drastic lemon airport basket sport sentence spoil beauty&quot; \&#xD;&#xA;          --password-interactive \&#xD;&#xA;          --key-type gran&#xD;&#xA;&#xD;&#xA;    ./target/release/polkadot key insert --base-path /tmp/relay/alice \&#xD;&#xA;      --chain raw-local-chain-spec.json \&#xD;&#xA;      --scheme Sr25519 \&#xD;&#xA;      --suri &quot;chaos dice yard frown drastic lemon airport basket sport sentence spoil beauty&quot; \&#xD;&#xA;      --password-interactive \&#xD;&#xA;      --key-type babe&#xD;&#xA;&#xD;&#xA;Kindly insert your own secret phase of the keys you want to add.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26710" PostHistoryTypeId="2" PostId="6989" RevisionGUID="f357e931-46c3-468c-a2a6-ba03a8cd2985" CreationDate="2023-01-31T09:14:32.263" UserId="251" Text="I got this too.&#xD;&#xA;&#xD;&#xA;Because I did the `cargo update` recently.&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo update -p curve25519-dalek@4.0.0-rc.0 --precise 4.0.0-pre.5&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Downgrading a specific package works for me." ContentLicense="CC BY-SA 4.0" />
  <row Id="26716" PostHistoryTypeId="5" PostId="6984" RevisionGUID="5a9d586a-7f79-4b20-89bc-05028e2c7829" CreationDate="2023-01-31T09:30:16.580" UserId="2281" Comment="added 945 characters in body" Text="i am using **pallet-contracts** in my substrate based chain when i am deploying the wasm contract some balance is getting reserved.How can i stop this i don't want to reserve the balance?&#xD;&#xA;&#xD;&#xA;**impl of pallet_contracts**&#xD;&#xA;&#xD;&#xA;    impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type CallFilter = Nothing;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type ContractAccessWeight = pallet_contracts::DefaultContractAccessWeight&lt;RuntimeBlockWeights&gt;;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 128 * 1024 }&gt;;&#xD;&#xA;	type RelaxedMaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Eal3M.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26717" PostHistoryTypeId="5" PostId="6984" RevisionGUID="bc76b8d9-a1a6-4424-aa07-95b263778fcc" CreationDate="2023-01-31T09:37:51.443" UserId="2281" Comment="added 3 characters in body" Text="i am using **pallet-contracts** in my substrate based chain when i am deploying the wasm contract some balance is getting reserved.How can i stop this i don't want to reserve the balance?&#xD;&#xA;&#xD;&#xA;**impl of pallet_contracts in node runtime**&#xD;&#xA;&#xD;&#xA;    impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type CallFilter = Nothing;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type ContractAccessWeight = pallet_contracts::DefaultContractAccessWeight&lt;RuntimeBlockWeights&gt;;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 128 * 1024 }&gt;;&#xD;&#xA;	type RelaxedMaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Eal3M.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26718" PostHistoryTypeId="5" PostId="6984" RevisionGUID="e4914b47-c5a4-4ceb-a473-6c44026f893b" CreationDate="2023-01-31T10:30:20.537" UserId="2281" Comment="added 64 characters in body" Text="i am using **pallet-contracts** in my substrate based chain when i am deploying the wasm contract some balance is getting reserved.How can i stop this i don't want to reserve the balance,Or is there any way i can fix the minimum amount to be reserved?&#xD;&#xA;&#xD;&#xA;**impl of pallet_contracts in node runtime**&#xD;&#xA;&#xD;&#xA;    impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type CallFilter = Nothing;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type ContractAccessWeight = pallet_contracts::DefaultContractAccessWeight&lt;RuntimeBlockWeights&gt;;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 128 * 1024 }&gt;;&#xD;&#xA;	type RelaxedMaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Eal3M.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26719" PostHistoryTypeId="6" PostId="6984" RevisionGUID="e4914b47-c5a4-4ceb-a473-6c44026f893b" CreationDate="2023-01-31T10:30:20.537" UserId="2281" Comment="added 64 characters in body" Text="|smart-contract|wasm|pallet-contracts|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26720" PostHistoryTypeId="5" PostId="6984" RevisionGUID="94742b0d-b32e-48fa-9d28-2b11fe6a22ad" CreationDate="2023-01-31T11:57:52.447" UserId="2281" Comment="added 105 characters in body" Text="i am using **pallet-contracts** in my substrate based chain when i am deploying the wasm contract some balance is getting reserved.How can i stop this i don't want to reserve the balance,Or is there any way i can fix the minimum amount to be reserved?&#xD;&#xA;&#xD;&#xA;**impl of pallet_contracts in node runtime**&#xD;&#xA;&#xD;&#xA;    impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type CallFilter = Nothing;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type ContractAccessWeight = pallet_contracts::DefaultContractAccessWeight&lt;RuntimeBlockWeights&gt;;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 128 * 1024 }&gt;;&#xD;&#xA;	type RelaxedMaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![as we can see **195,909,000,000,000,000** is getting reserved from the bob account how can i set it to minimum amount or completely remove it][2]][2]&#xD;&#xA;&#xD;&#xA;  [2]: https://i.stack.imgur.com/slvay.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26721" PostHistoryTypeId="5" PostId="6984" RevisionGUID="7ea662ae-a2a2-4905-98e8-fb1c82860826" CreationDate="2023-01-31T12:03:37.230" UserId="2281" Comment="added 105 characters in body" Text="i am using **pallet-contracts** in my substrate based chain when i am deploying the wasm smart-contract some balance is getting reserved.How can i stop this i don't want to reserve the balance,Or is there any way i can fix the minimum amount to be reserved?&#xD;&#xA;&#xD;&#xA;**impl of pallet_contracts in node runtime**&#xD;&#xA;&#xD;&#xA;    impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Call = Call;&#xD;&#xA;	type CallFilter = Nothing;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type ContractAccessWeight = pallet_contracts::DefaultContractAccessWeight&lt;RuntimeBlockWeights&gt;;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 128 * 1024 }&gt;;&#xD;&#xA;	type RelaxedMaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; **as we can see **195,909,000,000,000,000** is getting reserved from the Bob account and **501,000,000,000,000** is reserved in my contract how can i lower the amount or completely&#xD;&#xA;&gt; remove it??**&#xD;&#xA;&#xD;&#xA;[![][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [2]: https://i.stack.imgur.com/slvay.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26722" PostHistoryTypeId="6" PostId="6984" RevisionGUID="aa8e447c-df22-473a-88d2-fc43da8165c2" CreationDate="2023-01-31T12:36:57.967" UserId="2281" Comment="edited tags" Text="|smart-contract|wasm|pallet-contracts|substrate-contracts-node|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26723" PostHistoryTypeId="2" PostId="6991" RevisionGUID="b0893a46-dbcb-405a-bb0c-e43566b431ad" CreationDate="2023-01-31T12:44:46.233" UserId="698" Text="I am attempting to add a tip to a transaction in the following manner:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const batch = await api.tx.utility.batch([...]);&#xD;&#xA;batch.tip = 1;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It appears that `tip` is a read-only property and I'm receiving an error.  How may I add a tip to this transaction?&#xD;&#xA; &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26725" PostHistoryTypeId="1" PostId="6991" RevisionGUID="b0893a46-dbcb-405a-bb0c-e43566b431ad" CreationDate="2023-01-31T12:44:46.233" UserId="698" Text="How do I include a tip for transactions using Polkadot.JS/API" ContentLicense="CC BY-SA 4.0" />
  <row Id="26726" PostHistoryTypeId="3" PostId="6991" RevisionGUID="b0893a46-dbcb-405a-bb0c-e43566b431ad" CreationDate="2023-01-31T12:44:46.233" UserId="698" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26727" PostHistoryTypeId="5" PostId="4693" RevisionGUID="a131cea0-57e0-467d-80d9-45725fde3c43" CreationDate="2023-01-31T13:01:32.897" UserId="29" Comment="edited body" Text="You'll need to download the Zombienet executable.&#xD;&#xA;&#xD;&#xA;You can find linux and macOS executables of the Zombienet CLI here:&#xD;&#xA;- https://github.com/paritytech/zombienet/releases&#xD;&#xA;&#xD;&#xA;Download the Zombienet CLI according to your operating system.&#xD;&#xA;&#xD;&#xA;&gt; Tip: If you want the executable to be available system-wide then you can follow these steps (otherwise just download the executable to your working directory):&#xD;&#xA;&gt; &#xD;&#xA;&gt; ```&#xD;&#xA;&gt; wget https://github.com/paritytech/zombienet/releases/download/v1.3.30/zombienet-macos&#xD;&#xA;&gt; chmod +x zombienet-macos &#xD;&#xA;&gt; cp zombienet-macos /usr/local/bin&#xD;&#xA;&gt; ```&#xD;&#xA;&#xD;&#xA;Make sure Zombienet CLI is installed correctly:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos --help&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some similar output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Usage: zombienet [options] [command]&#xD;&#xA;&#xD;&#xA;Options:&#xD;&#xA;  -c, --spawn-concurrency &lt;concurrency&gt;  Number of concurrent spawning process to launch, default is 1&#xD;&#xA;  -p, --provider &lt;provider&gt;              Override provider to use (choices: &quot;podman&quot;, &quot;kubernetes&quot;, &quot;native&quot;)&#xD;&#xA;  -m, --monitor                          Start as monitor, do not auto cleanup network&#xD;&#xA;  -h, --help                             display help for command&#xD;&#xA;&#xD;&#xA;Commands:&#xD;&#xA;  spawn &lt;networkConfig&gt; [creds]          Spawn the network defined in the config&#xD;&#xA;  test &lt;testFile&gt; [runningNetworkSpec]   Run tests on the network defined&#xD;&#xA;  setup &lt;binaries...&gt;                    Setup is meant for downloading and making dev environment of Zombienet ready&#xD;&#xA;  version                                Prints zombienet version&#xD;&#xA;  help [command]                         display help for command&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Setting up your config&#xD;&#xA;&#xD;&#xA;Zombienet works with a config. The config is where you specify your test network's configuration. The config is also where you can specify the Polkadot/Cumulus binaries.&#xD;&#xA;&#xD;&#xA;Create a config file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;touch config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in this example config we are specifying that we want a Rococo Relay chain with four validators and two parachains - each with one collator. Make sure you have the compiled binaries available.&#xD;&#xA;&#xD;&#xA;&gt; Zombienet also works with other providers such as Kubernetes and Podman.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot-v0.9.37&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;  # relaychain nodes are validators by default&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;dave&quot;&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1000&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1000-collator&quot;&#xD;&#xA;  command = &quot;./bin/parachain-template-node-v0.9.37&quot;&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1001&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;parachain-1001-collator&quot;&#xD;&#xA;  command = &quot;../bin/parachain-template-node-v0.9.37&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Save the file and run the Zombienet CLI using this config:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos -p native spawn config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You should see some nicely formatted output stating that the nodes are up and ready.&#xD;&#xA;&#xD;&#xA;You can now interact with your nodes in [polkadotJS apps](https://polkadot.js.org/apps)!" ContentLicense="CC BY-SA 4.0" />
  <row Id="26728" PostHistoryTypeId="2" PostId="6992" RevisionGUID="0e83f343-8896-4e3c-8a79-830acc3c3090" CreationDate="2023-01-31T13:26:05.573" UserId="3035" Text="There is an issue for it https://github.com/mcginty/snow/issues/146&#xD;&#xA;And few solutions PRs open&#xD;&#xA;https://github.com/mcginty/snow/pull/147&#xD;&#xA;https://github.com/mcginty/snow/pull/148" ContentLicense="CC BY-SA 4.0" />
  <row Id="26730" PostHistoryTypeId="2" PostId="6993" RevisionGUID="8fedf72a-d32c-400c-b319-688178ca6835" CreationDate="2023-01-31T13:27:28.507" UserId="1786" Text="Your batch method has a `signAndSend` function attached to it. `signAndSend` takes in `Partial&lt;SignerOptions&gt;` as a second parameter where you would attach your tip. It would look like the following:&#xD;&#xA;&#xD;&#xA;`const batch = await api.tx.utility.batch([...]).signAndSend(from, { tip });`&#xD;&#xA;&#xD;&#xA;`SignerOptions` can be found [here](https://github.com/polkadot-js/api/blob/master/packages/api-base/src/types/submittable.ts#L13-L20).&#xD;&#xA;&#xD;&#xA;The following methods that take in `SignerOptions` can be found [here](https://github.com/polkadot-js/api/blob/master/packages/api-base/src/types/submittable.ts#L67-L73) for `SubmittableExtrinsics`" ContentLicense="CC BY-SA 4.0" />
  <row Id="26732" PostHistoryTypeId="2" PostId="6994" RevisionGUID="a7c8fb4b-a594-4983-b02c-d1b9c4515047" CreationDate="2023-01-31T14:39:20.007" UserId="3776" Text="Currently in substrate there is a possibility to set state pruning to &quot;archive-canonical&quot; or &quot;number&quot;. In docs it states, that these values will cause to:&#xD;&#xA; * archive-canonical - Keep only the state of finalized blocks.&#xD;&#xA; * number - Keep the state of the last number of finalized blocks.&#xD;&#xA;&#xD;&#xA;That said, when digging deeper there is a fundamental difference between canonical and finalized. It is described in [https://github.com/paritytech/substrate/blob/master/client/db/src/lib.rs][1]&#xD;&#xA;&#xD;&#xA;    //! # Canonicality vs. Finality&#xD;&#xA;    //!&#xD;&#xA;    //! Finality indicates that a block will not be reverted, according to the consensus algorithm,&#xD;&#xA;    //! while canonicality indicates that the block may be reverted, but we will be unable to do so,&#xD;&#xA;    //! having discarded heavy state that will allow a chain reorganization.&#xD;&#xA;    //!&#xD;&#xA;    //! Finality implies canonicality but not vice-versa.&#xD;&#xA;&#xD;&#xA;And this functionality works in such a way, that if best block is over 4096 (constant value named `CANONICALIZATION_DELAY`) blocks on top of best finalized block, state of yet unfinalized blocks will be pruned by function `force_delayed_canonicalize` (https://github.com/paritytech/substrate/blob/129fee774a6d185d117a57fd1e81b3d0d05ad747/client/db/src/lib.rs#L1399).&#xD;&#xA;&#xD;&#xA;This has proven problematic for me, when using pruning. I could not call runtime_api for the state of best finalized block (it was already pruned because of finalization stall).&#xD;&#xA;&#xD;&#xA;Because of that I have three questions:&#xD;&#xA;&#xD;&#xA;1. Are there any plans to add something like `archive-finalized`? So in this setting unfinalized blocks would not be prunned.&#xD;&#xA;2. Why is `force_delayed_canonicalize` function needed? Are there any dangers of it not being called?&#xD;&#xA;3. Why is `CANONICALIZATION_DELAY` set to 4096 blocks? Can it be bigger?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/client/db/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="26734" PostHistoryTypeId="1" PostId="6994" RevisionGUID="a7c8fb4b-a594-4983-b02c-d1b9c4515047" CreationDate="2023-01-31T14:39:20.007" UserId="3776" Text="State Pruning: Archive-Canonical vs Archive-Finalized" ContentLicense="CC BY-SA 4.0" />
  <row Id="26735" PostHistoryTypeId="3" PostId="6994" RevisionGUID="a7c8fb4b-a594-4983-b02c-d1b9c4515047" CreationDate="2023-01-31T14:39:20.007" UserId="3776" Text="|state|pruning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26736" PostHistoryTypeId="6" PostId="6994" RevisionGUID="5f0777df-6339-4082-8205-02260ea3a72f" CreationDate="2023-01-31T14:43:16.103" UserId="3776" Comment="edited tags" Text="|substrate-node-template|database|state|pruning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26737" PostHistoryTypeId="2" PostId="6995" RevisionGUID="97c59486-6759-4ae6-9a49-c6a6d9b7bb1e" CreationDate="2023-01-31T15:05:55.420" UserId="380" Text="This is an issue in the translation of the error data to the error message when using the following `findMetaError` from polkadot-js.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const mod = dispatchError.asModule&#xD;&#xA;const error = this.api.registry.findMetaError(&#xD;&#xA;    new Uint8Array([mod.index.toNumber(), new BN(mod.error).toNumber()])&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Because the hexadecimal `mod.error` is `0x02000000`, the decimal representation of this is `33554432`, which is not one of the indices in the [pallet contracts errors](https://raw.githubusercontent.com/polkadot-js/api/v9.12.1/packages/types-support/src/metadata/v14/substrate-types.json) (search for `523` in this file).&#xD;&#xA;&#xD;&#xA;Presumably, the hexadecimal should have been `0x02`, which converts to index `2` and `OutOfGas`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  {&#xD;&#xA;    &quot;id&quot;: 523,&#xD;&#xA;    &quot;type&quot;: {&#xD;&#xA;      &quot;path&quot;: [&#xD;&#xA;        &quot;pallet_contracts&quot;,&#xD;&#xA;        &quot;pallet&quot;,&#xD;&#xA;        &quot;Error&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;params&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;T&quot;,&#xD;&#xA;          &quot;type&quot;: null&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;def&quot;: {&#xD;&#xA;        &quot;variant&quot;: {&#xD;&#xA;          &quot;variants&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;name&quot;: &quot;InvalidScheduleVersion&quot;,&#xD;&#xA;              &quot;fields&quot;: [],&#xD;&#xA;              &quot;index&quot;: 0,&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;A new schedule must have a greater version than the current one.&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;name&quot;: &quot;InvalidCallFlags&quot;,&#xD;&#xA;              &quot;fields&quot;: [],&#xD;&#xA;              &quot;index&quot;: 1,&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`.&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;name&quot;: &quot;OutOfGas&quot;,&#xD;&#xA;              &quot;fields&quot;: [],&#xD;&#xA;              &quot;index&quot;: 2,&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;The executed contract exhausted its gas limit.&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;EDIT: it looks like the additional bytes [can include error details](https://substrate.stackexchange.com/a/1983/380)." ContentLicense="CC BY-SA 4.0" />
  <row Id="26739" PostHistoryTypeId="5" PostId="6995" RevisionGUID="82fb8cf2-a546-4a54-b6d0-65ddb1b3918c" CreationDate="2023-01-31T15:13:00.573" UserId="380" Comment="added 14 characters in body" Text="This is an issue in the translation of the error data to the error message when using the following `findMetaError` from polkadot-js.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const mod = dispatchError.asModule&#xD;&#xA;const error = this.api.registry.findMetaError(&#xD;&#xA;    new Uint8Array([mod.index.toNumber(), new BN(mod.error).toNumber()])&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Because the hexadecimal `mod.error` is `0x02000000`, the decimal representation of this is `33554432`, which is not one of the indices in the [pallet contracts errors](https://raw.githubusercontent.com/polkadot-js/api/v9.12.1/packages/types-support/src/metadata/v14/substrate-types.json) (search for `523` in this file).&#xD;&#xA;&#xD;&#xA;Presumably, the hexadecimal used to index should have been `0x02`, which converts to index `2` and `OutOfGas`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  {&#xD;&#xA;    &quot;id&quot;: 523,&#xD;&#xA;    &quot;type&quot;: {&#xD;&#xA;      &quot;path&quot;: [&#xD;&#xA;        &quot;pallet_contracts&quot;,&#xD;&#xA;        &quot;pallet&quot;,&#xD;&#xA;        &quot;Error&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;params&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;T&quot;,&#xD;&#xA;          &quot;type&quot;: null&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;def&quot;: {&#xD;&#xA;        &quot;variant&quot;: {&#xD;&#xA;          &quot;variants&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;name&quot;: &quot;InvalidScheduleVersion&quot;,&#xD;&#xA;              &quot;fields&quot;: [],&#xD;&#xA;              &quot;index&quot;: 0,&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;A new schedule must have a greater version than the current one.&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;name&quot;: &quot;InvalidCallFlags&quot;,&#xD;&#xA;              &quot;fields&quot;: [],&#xD;&#xA;              &quot;index&quot;: 1,&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`.&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;              &quot;name&quot;: &quot;OutOfGas&quot;,&#xD;&#xA;              &quot;fields&quot;: [],&#xD;&#xA;              &quot;index&quot;: 2,&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;The executed contract exhausted its gas limit.&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;EDIT: it looks like the additional bytes [can include error details](https://substrate.stackexchange.com/a/1983/380)." ContentLicense="CC BY-SA 4.0" />
  <row Id="26740" PostHistoryTypeId="2" PostId="6996" RevisionGUID="fc2f78fa-3f0f-496e-b6a0-837c4f86e65c" CreationDate="2023-01-31T15:28:49.927" UserId="73" Text="&gt; Are there any plans to add something like archive-finalized? So in this setting unfinalized blocks would not be prunned.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/13157 after this pr blocks will stay pinned until the pinning handle is dropped. This should solve your issue.&#xD;&#xA;&#xD;&#xA;&gt; Why is force_delayed_canonicalize function needed? Are there any dangers of it not being called?&#xD;&#xA;&#xD;&#xA;The database is growing and gets slower. In a future iteration of the Substrate database implementation we hopefully can get rid of this.&#xD;&#xA;&#xD;&#xA;&gt; Why is CANONICALIZATION_DELAY set to 4096 blocks? Can it be bigger?&#xD;&#xA;&#xD;&#xA;You can try it. It should work, but it could happen that the node gets slower on a bigger finality stall.&#xD;&#xA;&#xD;&#xA;&gt; This has proven problematic for me, when using pruning. I could not call runtime_api for the state of best finalized block (it was already pruned because of finalization stall).&#xD;&#xA;&#xD;&#xA;But with `archive-canonical` it should not had happened that the state was removed as long as the block was part of the finalized chain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26742" PostHistoryTypeId="2" PostId="6997" RevisionGUID="6924860f-0174-4a42-86bd-1a7a109b6325" CreationDate="2023-01-31T17:56:19.477" UserId="377" Text="Is it possible to give the name to the collator so that public can see that the particular collator is of which person or entity.&#xD;&#xA;&#xD;&#xA;if yes. How we can do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26744" PostHistoryTypeId="1" PostId="6997" RevisionGUID="6924860f-0174-4a42-86bd-1a7a109b6325" CreationDate="2023-01-31T17:56:19.477" UserId="377" Text="How we can assign any name to our collator?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26745" PostHistoryTypeId="3" PostId="6997" RevisionGUID="6924860f-0174-4a42-86bd-1a7a109b6325" CreationDate="2023-01-31T17:56:19.477" UserId="377" Text="|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26747" PostHistoryTypeId="2" PostId="6998" RevisionGUID="a1159c6f-71dd-4e1c-81bb-7bb093aa7367" CreationDate="2023-01-31T18:46:58.713" UserId="73" Text="Depends on where you want to see the name. If you are speaking of telemetry you can do this via `--name my-cool-collator`. If you are speaking about on chain it depends on the configuration of the chain. If the chain has the identity pallet, you can set an identity for your on chain account and then people can see the identity on chain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26749" PostHistoryTypeId="2" PostId="6999" RevisionGUID="8e2ee063-3da8-4618-88bf-5723bc9db524" CreationDate="2023-01-31T19:07:05.540" UserId="555" Text="Just for some analysis purpose i need to know what can be the maximum size limit of a block can have like 2MB or 5MB and is there any doc how we can customise it as per our need if its possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26751" PostHistoryTypeId="1" PostId="6999" RevisionGUID="8e2ee063-3da8-4618-88bf-5723bc9db524" CreationDate="2023-01-31T19:07:05.540" UserId="555" Text="what is the maximum size of a block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26752" PostHistoryTypeId="3" PostId="6999" RevisionGUID="8e2ee063-3da8-4618-88bf-5723bc9db524" CreationDate="2023-01-31T19:07:05.540" UserId="555" Text="|weight|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26753" PostHistoryTypeId="52" PostId="6991" RevisionGUID="66ed678a-bfb5-4e8d-83de-805b128ccc9a" CreationDate="2023-01-31T20:50:00.513" />
  <row Id="26754" PostHistoryTypeId="2" PostId="7000" RevisionGUID="c8035e37-550f-47ea-87ee-f9858c32a9e2" CreationDate="2023-01-31T21:55:08.363" UserId="83" Text="If you have built a custom Substrate-based chain and added Substrate pallets to enable on-chain governance (i.e. pallet_democracy, pallet_referenda).&#xD;&#xA;&#xD;&#xA;How would you split the costs between participants of an on-chain governance proposal if it passes?&#xD;&#xA;&#xD;&#xA;Since transaction fees are payed at the moment that you create or vote on a proposal I think only way to split the costs would be to calculate it after the proposal passes, and then have the treasury send refunds directly to the creator and voter accounts of that proposal or give them credit that they may claim.&#xD;&#xA;&#xD;&#xA;So I think there would need to be function in the `on_initialize` or `on_finalize` method of a custom pallet that detects when a proposal passes, calculate the overall amount spent on transaction fees by the creator and voter accounts, and then split that overall amount evenly across the list of accounts, and send the refund or setup a way for them to claim it." ContentLicense="CC BY-SA 4.0" />
  <row Id="26756" PostHistoryTypeId="1" PostId="7000" RevisionGUID="c8035e37-550f-47ea-87ee-f9858c32a9e2" CreationDate="2023-01-31T21:55:08.363" UserId="83" Text="How to split the overall transaction fees associated with an on-chain proposal that passes amongst its creator and voters?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26757" PostHistoryTypeId="3" PostId="7000" RevisionGUID="c8035e37-550f-47ea-87ee-f9858c32a9e2" CreationDate="2023-01-31T21:55:08.363" UserId="83" Text="|transactions|governance|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26758" PostHistoryTypeId="2" PostId="7001" RevisionGUID="7b358efc-6149-45d1-ac40-014f569e364a" CreationDate="2023-01-31T22:00:21.787" UserId="73" Text="The block size is controlled in different ways. From the runtime you can set the maximum block size by setting the [BlockLength][1]. The block builder is also tracking the block size and by default aborts at around 4.5MiB, this can be changed by [this function][2]. The upper maximum is controlled by the maximum network package size, which is 16MiB.&#xD;&#xA;&#xD;&#xA;When you are writing a parachain, the maximum block size is depending on the maximum PoV size. The maximum PoV size is controlled by the relay chain governance and thus, it is dynamic. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/frame-system/latest/frame_system/pallet/trait.Config.html#associatedtype.BlockLength&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/129fee774a6d185d117a57fd1e81b3d0d05ad747/client/basic-authorship/src/basic_authorship.rs#L157" ContentLicense="CC BY-SA 4.0" />
  <row Id="26764" PostHistoryTypeId="2" PostId="7003" RevisionGUID="7f34a5d8-b874-4ac9-b97a-dd85ed6041fd" CreationDate="2023-02-01T00:12:08.640" UserId="341" Text="I'd like to show my users if an error occurred while doing a proxy.proxy call.&#xD;&#xA;While I know how to decode a `system.ExtrinsicFailed`, as this is [well documented][1], I have difficulties finding the correct way to decode an error from `proxy.ProxyExecuted` when printed to string, it shows `[{&quot;err&quot;:{&quot;module&quot;:{&quot;index&quot;:4,&quot;error&quot;:&quot;0x02000000&quot;}}}]` when there's an error or `[{&quot;ok&quot;: null}]` in case it succeeded.&#xD;&#xA;&#xD;&#xA;What would be the best way to check the status and decode the error?&#xD;&#xA;&#xD;&#xA;I am ideally looking at something similar than&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const decoded = api.registry.findMetaError((dispatchError as any).asModule);&#xD;&#xA;const errorInfo = `${decoded.docs} - ${decoded.section}.${decoded.name}`;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event" ContentLicense="CC BY-SA 4.0" />
  <row Id="26766" PostHistoryTypeId="1" PostId="7003" RevisionGUID="7f34a5d8-b874-4ac9-b97a-dd85ed6041fd" CreationDate="2023-02-01T00:12:08.640" UserId="341" Text="How to decode an error that happened in a proxy.proxy call" ContentLicense="CC BY-SA 4.0" />
  <row Id="26767" PostHistoryTypeId="3" PostId="7003" RevisionGUID="7f34a5d8-b874-4ac9-b97a-dd85ed6041fd" CreationDate="2023-02-01T00:12:08.640" UserId="341" Text="|polkadot-js|decode|pallet-proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26768" PostHistoryTypeId="5" PostId="7003" RevisionGUID="5f86120a-a3c1-4fcd-b2bd-e720458a7feb" CreationDate="2023-02-01T00:47:23.203" UserId="341" Comment="added 226 characters in body" Text="I'd like to show my users if an error occurred while doing a proxy.proxy call.&#xD;&#xA;While I know how to decode a `system.ExtrinsicFailed`, as this is [well documented][1], I have difficulties finding the correct way to decode an error from `proxy.ProxyExecuted` when printed to string, it shows `[{&quot;err&quot;:{&quot;module&quot;:{&quot;index&quot;:4,&quot;error&quot;:&quot;0x02000000&quot;}}}]` when there's an error or `[{&quot;ok&quot;: null}]` in case it succeeded.&#xD;&#xA;&#xD;&#xA;What would be the best way to check the status and decode the error?&#xD;&#xA;&#xD;&#xA;I am ideally looking at something similar than&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const [dispatchError] = data&#xD;&#xA;const decoded = api.registry.findMetaError((dispatchError as any).asModule);&#xD;&#xA;const errorInfo = `${decoded.docs} - ${decoded.section}.${decoded.name}`;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But checking if `dispatchError.err` exists or forcing it with `asModule` doesn't end well, although it looks like a module. It needs a step in between to be decoded it seems, that I'm missing.&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event" ContentLicense="CC BY-SA 4.0" />
  <row Id="26769" PostHistoryTypeId="2" PostId="7004" RevisionGUID="b8593148-a594-4153-b5b6-98fac3d7678e" CreationDate="2023-02-01T03:04:00.913" UserId="251" Text="IMO, there isn't an elegant way to do this.&#xD;&#xA;&#xD;&#xA;I used `ensure_can_withdraw` in my code.&#xD;&#xA;&#xD;&#xA;You can write:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// Why do I say this isn't elegant?&#xD;&#xA;// Because you have to calculate the `new_balance` yourself here.&#xD;&#xA;if T::Currency::ensure_can_withdraw(who, amount, reason, new_balance) {&#xD;&#xA;  T::Currency::set_lock(amount);&#xD;&#xA;} else {&#xD;&#xA;  Err(&quot;Not enough funds to do X&quot;.into())?;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26771" PostHistoryTypeId="52" PostId="6999" RevisionGUID="cccfceb6-9d49-4e5b-b588-aaa892c52964" CreationDate="2023-02-01T03:07:24.583" />
  <row Id="26772" PostHistoryTypeId="2" PostId="7005" RevisionGUID="e6f55196-cb42-4122-8874-b327655b2347" CreationDate="2023-02-01T03:14:51.323" UserId="251" Text="`Config`s are some parameters which didn't touch the storage. You can configure them in the runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Configure the pallet-balances.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/8cfe326e4e33c5077fc67f197d6a13dd871881c7/bin/node/runtime/src/lib.rs#L435-L445&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;`GenesisConfig`s are some data that you want to set into the genesis state. You can configure them in the chain spec.&#xD;&#xA;&#xD;&#xA;Setup the pallet-balances genesis state.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/8cfe326e4e33c5077fc67f197d6a13dd871881c7/bin/node/cli/src/chain_spec.rs#L299-L301" ContentLicense="CC BY-SA 4.0" />
  <row Id="26774" PostHistoryTypeId="2" PostId="7006" RevisionGUID="c64ef2af-1565-42ab-b650-b367667e7536" CreationDate="2023-02-01T04:30:14.433" UserId="318" Text="This is currently a limitation of `cargo contract` and generally speaking currently there is no solution for what is asked. If `cargo contract` needs to be called in a folder other than where `Cargo.toml` is located in then the solution is to specify the manifest path explicitly. For example:&#xD;&#xA;&#xD;&#xA;    cargo contract build --manifest-path contracts/contract1/Cargo.toml&#xD;&#xA;    cargo contract build --manifest-path contracts/contract2/Cargo.toml&#xD;&#xA;&#xD;&#xA;However for running the unit tests, there is no need to use `cargo contract` and if there is a root Cargo.toml file under `contracts` with the content as in the question, then the tests for both of the contracts can be run by simply calling `cargo test` under the `contracts` directory." ContentLicense="CC BY-SA 4.0" />
  <row Id="26776" PostHistoryTypeId="2" PostId="7007" RevisionGUID="4cb87dbf-0d43-436f-b046-6b9b27742ac0" CreationDate="2023-02-01T06:12:54.510" UserId="3779" Text="Is it possible to do a `multiQuery` querying multiple types and multiple blockhashes? Even same type and different block hashes would be helpful. Something along the lines of&#xD;&#xA;```&#xD;&#xA;const multiQueryResult = await api.queryMulti([&#xD;&#xA;  [api.query.timestamp.now, BLOCK_HASH_1],&#xD;&#xA;  [api.query.timestamp.now, BLOCK_HASH_2],&#xD;&#xA;]);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26778" PostHistoryTypeId="1" PostId="7007" RevisionGUID="4cb87dbf-0d43-436f-b046-6b9b27742ac0" CreationDate="2023-02-01T06:12:54.510" UserId="3779" Text="PolkadotJs Api: queryMulti with different blockHashes" ContentLicense="CC BY-SA 4.0" />
  <row Id="26779" PostHistoryTypeId="3" PostId="7007" RevisionGUID="4cb87dbf-0d43-436f-b046-6b9b27742ac0" CreationDate="2023-02-01T06:12:54.510" UserId="3779" Text="|api|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26780" PostHistoryTypeId="2" PostId="7008" RevisionGUID="6c7423ee-0581-46ea-a1a5-e850be575996" CreationDate="2023-02-01T06:24:33.193" UserId="2281" Text="**we can make changes in** `impl pallet_contracts::config for Runtime`&#xD;&#xA;&#xD;&#xA;    type DepositPerItem = DepositPerItem;&#xD;&#xA;    type DepositPerByte = DepositPerByte;&#xD;&#xA;&#xD;&#xA; **if you don't want to reserve any balance then make changes to** `pallets_contracts::config`&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;        type DepositPerItem = ();&#xD;&#xA;        type DepositPerByte = ();&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26782" PostHistoryTypeId="2" PostId="7009" RevisionGUID="3907ed27-5fa1-4859-b395-3c6ae5944210" CreationDate="2023-02-01T07:33:37.497" UserId="3668" Text="This is one such link containing some examples of ink! contracts from parity's repo : https://github.com/paritytech/ink/blob/master/examples/rand-extension/lib.rs&#xD;&#xA;&#xD;&#xA;Is there a way to call a custom function from a library, say a cryptographic library from the ink contract?&#xD;&#xA;&#xD;&#xA;How to go about doing this?&#xD;&#xA;&#xD;&#xA;I tried to add all the code I had from the library inside the ink! contract and it could work, but it is one heck of a tedious task and I don't think it is the correct way either." ContentLicense="CC BY-SA 4.0" />
  <row Id="26784" PostHistoryTypeId="1" PostId="7009" RevisionGUID="3907ed27-5fa1-4859-b395-3c6ae5944210" CreationDate="2023-02-01T07:33:37.497" UserId="3668" Text="Is there a way to call a cryptographic library from inside the ink! contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26785" PostHistoryTypeId="3" PostId="7009" RevisionGUID="3907ed27-5fa1-4859-b395-3c6ae5944210" CreationDate="2023-02-01T07:33:37.497" UserId="3668" Text="|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26787" PostHistoryTypeId="2" PostId="7010" RevisionGUID="39df33fa-2f73-4395-a547-45574f0e8e58" CreationDate="2023-02-01T07:50:48.067" UserId="2478" Text="Ink contract Transaction emit errors with hex code. How to map that to the actual error and get a trace of error in the contract?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5gHMU.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26789" PostHistoryTypeId="1" PostId="7010" RevisionGUID="39df33fa-2f73-4395-a547-45574f0e8e58" CreationDate="2023-02-01T07:50:48.067" UserId="2478" Text="How to debug error codes for ink contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26790" PostHistoryTypeId="3" PostId="7010" RevisionGUID="39df33fa-2f73-4395-a547-45574f0e8e58" CreationDate="2023-02-01T07:50:48.067" UserId="2478" Text="|ink|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26791" PostHistoryTypeId="2" PostId="7011" RevisionGUID="37ca3336-6022-4f3d-aa69-955f6dc9d1d1" CreationDate="2023-02-01T08:13:59.667" UserId="567" Text="To add to your answer: &#xD;&#xA;&#xD;&#xA;pallet-contract implements **automatic deposit collection**:&#xD;&#xA;&#xD;&#xA;Additionally to the weight, there is also a fee paid for on-chain storage called automatic deposit collection. This additional fee is paid by the caller and is calculated with the price set for each storage item `DepositPerItem` and the price charged for each byte of storage `DepositPerByte`.&#xD;&#xA;&#xD;&#xA;The automatic deposit collection can be simplified as follows:&#xD;&#xA;&#xD;&#xA;&gt; A caller of a contract pays a deposit to each contract in which new&#xD;&#xA;&gt; storage was created as a result of the executed call. In a similar&#xD;&#xA;&gt; way, a caller gets a refund from all the contracts that the call&#xD;&#xA;&gt; removed storage from.&#xD;&#xA;&#xD;&#xA;This mechanism insure that there is no spam from storing on-chain storage. If you set it to 0 anyone can, for free, upload a lot of (wasm blobs) contracts or bloat contract storage without an economic way to avoid it." ContentLicense="CC BY-SA 4.0" />
  <row Id="26793" PostHistoryTypeId="2" PostId="7012" RevisionGUID="76ec8762-b740-4af7-96be-45bc7b9a9fdd" CreationDate="2023-02-01T08:20:58.450" UserId="567" Text="Cryptographic libraries are usually really heaving in terms of size (and contacts should be smaller as possible).&#xD;&#xA;You can already checks [here](https://paritytech.github.io/ink/ink_env/#functions) if the function you need is already implemented.&#xD;&#xA;&#xD;&#xA;If not it should be implemented in the runtime and be called from the contract:&#xD;&#xA;- either add it to pallet-contracts (like it has been implemented for ECDSA crypto)&#xD;&#xA;- or via chain-extension calling an specific pallet (but it will depends on the L1)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26795" PostHistoryTypeId="2" PostId="7013" RevisionGUID="03768097-fe34-445e-828e-1bd2259873f4" CreationDate="2023-02-01T09:15:24.843" UserId="3780" Text="I'm thinking which events/calls (or whatever) should I take into account to get a number of staked in the protocol? I did this exercise for Reef protocol (but this should be similar for all Substrate protocols) based on 'Staking.Bonded' and 'Staking.Withdrawn' events, but my number does not match with a presented on the reef protocol subscan - 6.2B (https://reef.subscan.io/validator). I would like to be able to calculate this metric on a wallet level in the future incl. historical values that's why Im trying to do it based on events. &#xD;&#xA;&#xD;&#xA;In other words, which events are responsible for increasing a number of staked tokens and which ones decrease this value? " ContentLicense="CC BY-SA 4.0" />
  <row Id="26797" PostHistoryTypeId="1" PostId="7013" RevisionGUID="03768097-fe34-445e-828e-1bd2259873f4" CreationDate="2023-02-01T09:15:24.843" UserId="3780" Text="Number of staked tokens" ContentLicense="CC BY-SA 4.0" />
  <row Id="26798" PostHistoryTypeId="3" PostId="7013" RevisionGUID="03768097-fe34-445e-828e-1bd2259873f4" CreationDate="2023-02-01T09:15:24.843" UserId="3780" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26799" PostHistoryTypeId="5" PostId="7012" RevisionGUID="f156c375-d6ae-4c14-aa9a-885bbec0f3fd" CreationDate="2023-02-01T09:17:16.590" UserId="567" Comment="deleted 2 characters in body" Text="Cryptographic libraries are usually really heavy in terms of size (and contacts should be smaller as possible).&#xD;&#xA;You can already checks [here](https://paritytech.github.io/ink/ink_env/#functions) if the function you need is already implemented.&#xD;&#xA;&#xD;&#xA;If not it should be implemented in the runtime and be called from the contract:&#xD;&#xA;- either add it to pallet-contracts (like it has been implemented for ECDSA crypto)&#xD;&#xA;- or via chain-extension calling an specific pallet (but it will depends on the L1)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26804" PostHistoryTypeId="2" PostId="7015" RevisionGUID="11bca15d-abb2-4265-9b9d-3208baad8edf" CreationDate="2023-02-01T10:13:54.427" UserId="251" Text="As we are going to release a new chain base on the old state and we want to avoid the break changes as much as possible." ContentLicense="CC BY-SA 4.0" />
  <row Id="26806" PostHistoryTypeId="1" PostId="7015" RevisionGUID="11bca15d-abb2-4265-9b9d-3208baad8edf" CreationDate="2023-02-01T10:13:54.427" UserId="251" Text="Is possible to set the genesis block number to non-zero value?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26807" PostHistoryTypeId="3" PostId="7015" RevisionGUID="11bca15d-abb2-4265-9b9d-3208baad8edf" CreationDate="2023-02-01T10:13:54.427" UserId="251" Text="|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26808" PostHistoryTypeId="2" PostId="7016" RevisionGUID="29467eaa-0f56-4f2d-8777-163221254d0d" CreationDate="2023-02-01T10:17:12.693" UserId="377" Text="I basically deployed ERC-721(NFT) contract on moonbeam sometime back. Now i have added the NFT pallet to our substrate chain. Now the issue is how w=can i migrate the data from moonbeam chain to the our chain?&#xD;&#xA;&#xD;&#xA;Any suggestion helpful.&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="26810" PostHistoryTypeId="1" PostId="7016" RevisionGUID="29467eaa-0f56-4f2d-8777-163221254d0d" CreationDate="2023-02-01T10:17:12.693" UserId="377" Text="how can migrate the blockchain data from moonbeam to substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26811" PostHistoryTypeId="3" PostId="7016" RevisionGUID="29467eaa-0f56-4f2d-8777-163221254d0d" CreationDate="2023-02-01T10:17:12.693" UserId="377" Text="|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26813" PostHistoryTypeId="6" PostId="6912" RevisionGUID="16810e5e-f0e1-484f-9ae3-b4469f898675" CreationDate="2023-02-01T11:06:08.307" UserId="380" Comment="edited tags" Text="|polkadot-js|error|pallet-contracts|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26814" PostHistoryTypeId="2" PostId="7017" RevisionGUID="392d75d9-14c0-45f1-bf48-c9145006ee2e" CreationDate="2023-02-01T12:19:24.553" UserId="2442" Text="I've been following the how-to guide to implementing [unsigned extrinsic call with a signed payload](https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-transactions/#sending-unsigned-transactions-with-signed-payloads).&#xD;&#xA;&#xD;&#xA;My pallet defines the following `KeyTypeId`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;ver!&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And the code that uses the local accounts looks like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let signer = Signer::&lt;T, T::AuthorityId&gt;::any_account();&#xD;&#xA;&#xD;&#xA;if let Some((_, res)) = signer.send_unsigned_transaction(&#xD;&#xA;  // this line is to prepare and return payload&#xD;&#xA;  |acct| {&#xD;&#xA;  // Update payload with status and signature&#xD;&#xA;    ...&#xD;&#xA;  },&#xD;&#xA;  |signed_payload, signature| Call::submit_unsigned {&#xD;&#xA;    signed_payload,&#xD;&#xA;    signature,&#xD;&#xA;  },&#xD;&#xA;) {&#xD;&#xA;  res.map_err(|_| Error::&lt;T&gt;::OffChainVerificationError)&#xD;&#xA;} else {&#xD;&#xA;  // The case of `None`: no account is available for sending&#xD;&#xA;  error!(&quot;No local accounts available. Consider adding one via `author_insertKey` RPC.&quot;);&#xD;&#xA;  Err(Error::&lt;T&gt;::OffChainVerificationError)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;At this time, if I run the OCW, I get the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ERROR      offchain-worker verification::offchain: No local accounts available. Consider adding one via `author_insertKey` RPC.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I read that we can either specify a local account in the `service.rs`:&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;  let keystore = keystore_container.sync_keystore();&#xD;&#xA;  if config.offchain_worker.enabled {&#xD;&#xA;    sc_service::build_offchain_workers(&amp;config, task_manager.spawn_handle(), client.clone(), network.clone());&#xD;&#xA;    sp_keystore::SyncCryptoStore::sr25519_generate_new(&#xD;&#xA;      &amp;*keystore,&#xD;&#xA;      sp_runtime::KeyTypeId(*b&quot;ver!&quot;),&#xD;&#xA;      Some(&quot;//Alice&quot;),&#xD;&#xA;    ).expect(&quot;Creating key with local account Alice should work&quot;);&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or either add the account through RPC call:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl --location --request POST 'http://localhost:9933' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;&quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;&quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;&quot;params&quot;: [&quot;ver!&quot;,&quot;clip organ olive upper oak void inject side suit toilet stick narrow&quot;,&quot;0xb48004c6e1625282313b07d1c9950935e86894a2e4f21fb1ffee9854d180c781&quot;],&#xD;&#xA;&quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But in both cases the execution unwraps with the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'No `keystore` associated for the current context!', /workspace/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:832&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can you tell what I'm missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26816" PostHistoryTypeId="1" PostId="7017" RevisionGUID="392d75d9-14c0-45f1-bf48-c9145006ee2e" CreationDate="2023-02-01T12:19:24.553" UserId="2442" Text="Errors retrieving local accounts to sign payload of unsigned transaction from OCW" ContentLicense="CC BY-SA 4.0" />
  <row Id="26817" PostHistoryTypeId="3" PostId="7017" RevisionGUID="392d75d9-14c0-45f1-bf48-c9145006ee2e" CreationDate="2023-02-01T12:19:24.553" UserId="2442" Text="|account|offchain-worker|key|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26818" PostHistoryTypeId="2" PostId="7018" RevisionGUID="28fdafe2-61fd-480f-9c70-9bddf9097882" CreationDate="2023-02-01T12:36:42.867" UserId="73" Text="I'm personally not aware of any way of doing this. I mean yes you could change the code to achieve this. However, there is a lot of code that has the assumption `0 == genesis`. So, you would need to change a lot of code probably. This lead me to the answer, no you can not set genesis to a different block number. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26820" PostHistoryTypeId="2" PostId="7019" RevisionGUID="0363be7d-4002-41bf-9f42-96b997e121ff" CreationDate="2023-02-01T13:20:59.913" UserId="80" Text="When a nominator has chosen the reward destination as `Staked` ([see here][1]), when staking rewards are paid out, it increases the nominator stake without a `Bonded` event. Refer [code note here][2] and the [payout code here][3]. This is the value you might be missing. There is no easy way to take it into account with just reading events. &#xD;&#xA;&#xD;&#xA;I believe the best way to do this is to add on every `Rewarded` event, the rewarded amount if the nominator has set their reward destination `Staked` which you can know by reading the `Payee` [storage item][4].&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/staking/src/lib.rs#L400&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/mod.rs#L699&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs#L293&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/mod.rs#L327" ContentLicense="CC BY-SA 4.0" />
  <row Id="26822" PostHistoryTypeId="5" PostId="7017" RevisionGUID="786ded65-a8e7-466a-a2b7-66df83560937" CreationDate="2023-02-01T13:52:02.407" UserId="2442" Comment="added 41 characters in body" Text="I've been following the how-to guide to implementing [unsigned extrinsic call with a signed payload](https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-transactions/#sending-unsigned-transactions-with-signed-payloads).&#xD;&#xA;&#xD;&#xA;My pallet defines the following `KeyTypeId`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;ver!&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And the code that uses the local accounts looks like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let signer = Signer::&lt;T, T::AuthorityId&gt;::any_account();&#xD;&#xA;&#xD;&#xA;if let Some((_, res)) = signer.send_unsigned_transaction(&#xD;&#xA;  // this line is to prepare and return payload&#xD;&#xA;  |acct| {&#xD;&#xA;  // Update payload with status and signature&#xD;&#xA;    ...&#xD;&#xA;  },&#xD;&#xA;  |signed_payload, signature| Call::submit_unsigned {&#xD;&#xA;    signed_payload,&#xD;&#xA;    signature,&#xD;&#xA;  },&#xD;&#xA;) {&#xD;&#xA;  res.map_err(|_| Error::&lt;T&gt;::OffChainVerificationError)&#xD;&#xA;} else {&#xD;&#xA;  // The case of `None`: no account is available for sending&#xD;&#xA;  error!(&quot;No local accounts available. Consider adding one via `author_insertKey` RPC.&quot;);&#xD;&#xA;  Err(Error::&lt;T&gt;::OffChainVerificationError)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;At this time, if I run the OCW, I get the following error from the code above:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ERROR      offchain-worker verification::offchain: No local accounts available. Consider adding one via `author_insertKey` RPC.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I read that we can either specify a local account in the `service.rs`:&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;  let keystore = keystore_container.sync_keystore();&#xD;&#xA;  if config.offchain_worker.enabled {&#xD;&#xA;    sc_service::build_offchain_workers(&amp;config, task_manager.spawn_handle(), client.clone(), network.clone());&#xD;&#xA;    sp_keystore::SyncCryptoStore::sr25519_generate_new(&#xD;&#xA;      &amp;*keystore,&#xD;&#xA;      sp_runtime::KeyTypeId(*b&quot;ver!&quot;),&#xD;&#xA;      Some(&quot;//Alice&quot;),&#xD;&#xA;    ).expect(&quot;Creating key with local account Alice should work&quot;);&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or either add the account through RPC call:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl --location --request POST 'http://localhost:9933' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;&quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;&quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;&quot;params&quot;: [&quot;ver!&quot;,&quot;clip organ olive upper oak void inject side suit toilet stick narrow&quot;,&quot;0xb48004c6e1625282313b07d1c9950935e86894a2e4f21fb1ffee9854d180c781&quot;],&#xD;&#xA;&quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But in both cases the execution of the code that uses the local accounts unwraps with the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'No `keystore` associated for the current context!', /workspace/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:832&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can you tell what I'm missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26823" PostHistoryTypeId="5" PostId="7017" RevisionGUID="977b94c5-b619-4d31-86c3-6a7cdf6994b2" CreationDate="2023-02-01T14:01:54.437" UserId="2442" Comment="added 591 characters in body" Text="I've been following the how-to guide to implementing [unsigned extrinsic call with a signed payload](https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-transactions/#sending-unsigned-transactions-with-signed-payloads).&#xD;&#xA;&#xD;&#xA;My pallet defines the following `KeyTypeId`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;ver!&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And the code that uses the local accounts looks like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let signer = Signer::&lt;T, T::AuthorityId&gt;::any_account();&#xD;&#xA;&#xD;&#xA;if let Some((_, res)) = signer.send_unsigned_transaction(&#xD;&#xA;  // this line is to prepare and return payload&#xD;&#xA;  |acct| {&#xD;&#xA;  // Update payload with status and signature&#xD;&#xA;    ...&#xD;&#xA;  },&#xD;&#xA;  |signed_payload, signature| Call::submit_unsigned {&#xD;&#xA;    signed_payload,&#xD;&#xA;    signature,&#xD;&#xA;  },&#xD;&#xA;) {&#xD;&#xA;  res.map_err(|_| Error::&lt;T&gt;::OffChainVerificationError)&#xD;&#xA;} else {&#xD;&#xA;  // The case of `None`: no account is available for sending&#xD;&#xA;  error!(&quot;No local accounts available. Consider adding one via `author_insertKey` RPC.&quot;);&#xD;&#xA;  Err(Error::&lt;T&gt;::OffChainVerificationError)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;At this time, if I run the OCW, I get the following error from the code above:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ERROR      offchain-worker verification::offchain: No local accounts available. Consider adding one via `author_insertKey` RPC.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I read that we can either specify a local account in the `service.rs`:&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;  let keystore = keystore_container.sync_keystore();&#xD;&#xA;  if config.offchain_worker.enabled {&#xD;&#xA;    sc_service::build_offchain_workers(&amp;config, task_manager.spawn_handle(), client.clone(), network.clone());&#xD;&#xA;    sp_keystore::SyncCryptoStore::sr25519_generate_new(&#xD;&#xA;      &amp;*keystore,&#xD;&#xA;      sp_runtime::KeyTypeId(*b&quot;ver!&quot;),&#xD;&#xA;      Some(&quot;//Alice&quot;),&#xD;&#xA;    ).expect(&quot;Creating key with local account Alice should work&quot;);&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or either add the account through RPC call:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl --location --request POST 'http://localhost:9933' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;&quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;&quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;&quot;params&quot;: [&quot;ver!&quot;,&quot;clip organ olive upper oak void inject side suit toilet stick narrow&quot;,&quot;0xb48004c6e1625282313b07d1c9950935e86894a2e4f21fb1ffee9854d180c781&quot;],&#xD;&#xA;&quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But in both cases the execution of the code inside `submit_unsigned` extrinsic, that validates the signature:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;      // Ensure the payload of the unsigned transaction was signed by a local account and that the&#xD;&#xA;      // signature is valid&#xD;&#xA;      ensure_none(origin)?;&#xD;&#xA;&#xD;&#xA;      let signer = Signer::&lt;T, T::AuthorityId&gt;::all_accounts();&#xD;&#xA;      ensure!(&#xD;&#xA;        // panics in the next line&#xD;&#xA;        signer.with_filter(vec![payload.public.clone()]).can_sign(),&#xD;&#xA;        Error::&lt;T&gt;::OffChainVerificationError&#xD;&#xA;      );&#xD;&#xA;&#xD;&#xA;      let signature_valid = SignedPayload::&lt;T&gt;::verify::&lt;T::AuthorityId&gt;(&amp;payload, signature);&#xD;&#xA;      ensure!(signature_valid, Error::&lt;T&gt;::OffChainVerificationError);&#xD;&#xA;```&#xD;&#xA;panics with the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'No `keystore` associated for the current context!', /workspace/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:832&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can you tell what I'm missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26824" PostHistoryTypeId="2" PostId="7020" RevisionGUID="a640ee69-6406-49bb-8777-b25c32180d7e" CreationDate="2023-02-01T14:10:39.847" UserId="157" Text="I have custom RPC, which looks like so&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[rpc(client, server)]&#xD;&#xA;pub trait SomeRpcApi {&#xD;&#xA;	#[method(name = &quot;some_submitData&quot;)]&#xD;&#xA;	async fn submit_data(&#xD;&#xA;		&amp;self,&#xD;&#xA;        id: u64,&#xD;&#xA;		message: [u8; 32],&#xD;&#xA;	) -&gt; RpcResult&lt;()&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and I'm trying to call it using this TS script&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;    provider: wsProvider,&#xD;&#xA;    rpc: {&#xD;&#xA;        some: {&#xD;&#xA;            submitData: {&#xD;&#xA;                description: '',&#xD;&#xA;                params: [&#xD;&#xA;                    {&#xD;&#xA;                        name: 'id',&#xD;&#xA;                        type: 'u64'&#xD;&#xA;                    },&#xD;&#xA;                    {&#xD;&#xA;                        name: 'message',&#xD;&#xA;                        type: '[u8; 32]'&#xD;&#xA;                    }&#xD;&#xA;                ],&#xD;&#xA;                type: 'RpcResult&lt;((), u32)&gt;'&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;const message = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32]);&#xD;&#xA;const id = api.createType('u64', 1);&#xD;&#xA;const data = api.createType('[u8; 32]', message);&#xD;&#xA;const resp = await api.rpc.time.submitForSigning(id, data);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;bun on submitting I'm getting this error:&#xD;&#xA;&#xD;&#xA;&gt;  RPC-CORE: submitData(id: u64, message: [u8; 32]):&#xD;&#xA;&gt; RpcResult&lt;((), u32)&gt;:: -32602: invalid type: string&#xD;&#xA;&gt; &quot;0x1ddf7f02f19991b8e2b56d7e325f05835bb1d66b5c0d87ba98b4230f2a28c085&quot;,&#xD;&#xA;&gt; expected a sequence at line 1 column 68&#xD;&#xA;&#xD;&#xA;Where's the issue here? Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="26826" PostHistoryTypeId="1" PostId="7020" RevisionGUID="a640ee69-6406-49bb-8777-b25c32180d7e" CreationDate="2023-02-01T14:10:39.847" UserId="157" Text="Custom RPC sized array parameters" ContentLicense="CC BY-SA 4.0" />
  <row Id="26827" PostHistoryTypeId="3" PostId="7020" RevisionGUID="a640ee69-6406-49bb-8777-b25c32180d7e" CreationDate="2023-02-01T14:10:39.847" UserId="157" Text="|rpc|json-rpc|custom-rpc|types|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26828" PostHistoryTypeId="2" PostId="7021" RevisionGUID="f3a514f1-61a0-4220-a9d4-5d199f3e8197" CreationDate="2023-02-01T14:38:57.847" UserId="3667" Text="In pallet-timestamp, what is `InherentError::ValidAtTimestamp` supposed to mean exactly?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let minimum = (Self::now() + T::MinimumPeriod::get()).saturated_into::&lt;u64&gt;();&#xD;&#xA;if t &gt; *(data + MAX_TIMESTAMP_DRIFT_MILLIS) {&#xD;&#xA;	Err(InherentError::TooFarInFuture)&#xD;&#xA;} else if t &lt; minimum {&#xD;&#xA;		Err(InherentError::ValidAtTimestamp(minimum.into()))&#xD;&#xA;} else {&#xD;&#xA;		Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Does it mean that we are receiving an &quot;older&quot; timestamp and something newer was expected? I also see it marked as a non-fatal error. What does that mean in terms of the code path of this error type? Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="26830" PostHistoryTypeId="1" PostId="7021" RevisionGUID="f3a514f1-61a0-4220-a9d4-5d199f3e8197" CreationDate="2023-02-01T14:38:57.847" UserId="3667" Text="What is the ValidAtTimestamp error supposed to mean?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26831" PostHistoryTypeId="3" PostId="7021" RevisionGUID="f3a514f1-61a0-4220-a9d4-5d199f3e8197" CreationDate="2023-02-01T14:38:57.847" UserId="3667" Text="|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26832" PostHistoryTypeId="2" PostId="7022" RevisionGUID="8930a324-72db-4abb-aff4-d230d4826eeb" CreationDate="2023-02-01T14:51:03.783" UserId="2844" Text="Basically, nonce update when transaction creates between two different account (i.e. `External Transaction`). When contract invokes function of another contract then it is considered as `Internal Transaction`, hence nonce of contract doesn't update. Contract nonce update when contract create another contract.&#xD;&#xA;&#xD;&#xA;[The Transaction Nonce][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ethereumbook/ethereumbook/blob/develop/06transactions.asciidoc#the-transaction-nonce" ContentLicense="CC BY-SA 4.0" />
  <row Id="26834" PostHistoryTypeId="5" PostId="6995" RevisionGUID="b2d018de-fe55-4fcd-b4ce-154b254d7d61" CreationDate="2023-02-01T14:56:44.727" UserId="380" Comment="[Edit removed during grace period]; added 105 characters in body" Text="This is an issue in the translation of the error data to the error message when using the following `findMetaError` from polkadot-js.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const mod = dispatchError.asModule&#xD;&#xA;const error = this.api.registry.findMetaError(&#xD;&#xA;    new Uint8Array([mod.index.toNumber(), new BN(mod.error).toNumber()])&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Because the hexadecimal `mod.error` is `0x02000000`, the decimal representation of this is `33554432`, which is not one of the indices in the [pallet contracts errors](https://raw.githubusercontent.com/polkadot-js/api/v9.12.1/packages/types-support/src/metadata/v14/substrate-types.json) (search for `523` in this file).&#xD;&#xA;&#xD;&#xA;Presumably, the hexadecimal used to index should have been `0x02`, which converts to index `2` and `OutOfGas`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&gt; util.bnFromHex('0x02000000').toNumber()&#xD;&#xA;33554432&#xD;&#xA;&gt; util.bnFromHex('0x02').toNumber()&#xD;&#xA;2&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  {&#xD;&#xA;    &quot;id&quot;: 523,&#xD;&#xA;    &quot;type&quot;: {&#xD;&#xA;      &quot;path&quot;: [&#xD;&#xA;        &quot;pallet_contracts&quot;,&#xD;&#xA;        &quot;pallet&quot;,&#xD;&#xA;        &quot;Error&quot;&#xD;&#xA;      ],&#xD;&#xA;      &quot;params&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;T&quot;,&#xD;&#xA;          &quot;type&quot;: null&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      &quot;def&quot;: {&#xD;&#xA;        &quot;variant&quot;: {&#xD;&#xA;          &quot;variants&quot;: [&#xD;&#xA;&#xD;&#xA;            ...&#xD;&#xA;&#xD;&#xA;            {&#xD;&#xA;              &quot;name&quot;: &quot;OutOfGas&quot;,&#xD;&#xA;              &quot;fields&quot;: [],&#xD;&#xA;              &quot;index&quot;: 2,&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;The executed contract exhausted its gas limit.&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;EDIT: it looks like the additional bytes [can include error details](https://substrate.stackexchange.com/a/1983/380)." ContentLicense="CC BY-SA 4.0" />
  <row Id="26835" PostHistoryTypeId="2" PostId="7023" RevisionGUID="fdab6bb5-a7c5-4b66-aa44-33ff1f86ec14" CreationDate="2023-02-01T15:17:32.520" UserId="522" Text="In the proxy pallet's `do_proxy` function, a newly authenticated origin is constructed from the `real` account. This is explicitly done.\&#xD;&#xA;Is there a particular reason for this?&#xD;&#xA;&#xD;&#xA;Can I just use the same origin and then use set_caller_from to set it to `real`?\&#xD;&#xA;I would like to do this to ensure that the restrictions (one particular call filter) I apply to the origin in `utility.batch` are sustained even if `utility.batch` wraps proxy calls to attempt to avoid the restrictions.&#xD;&#xA;&#xD;&#xA;Is there a better way to do this?&#xD;&#xA;&#xD;&#xA;Thank you.\&#xD;&#xA;Please let me know if more info is required" ContentLicense="CC BY-SA 4.0" />
  <row Id="26837" PostHistoryTypeId="1" PostId="7023" RevisionGUID="fdab6bb5-a7c5-4b66-aa44-33ff1f86ec14" CreationDate="2023-02-01T15:17:32.520" UserId="522" Text="Using original origin's call filter for proxy pallet's proxy" ContentLicense="CC BY-SA 4.0" />
  <row Id="26838" PostHistoryTypeId="3" PostId="7023" RevisionGUID="fdab6bb5-a7c5-4b66-aa44-33ff1f86ec14" CreationDate="2023-02-01T15:17:32.520" UserId="522" Text="|proxy|origin|batch|pallet-proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26839" PostHistoryTypeId="2" PostId="7024" RevisionGUID="a7edbc0b-77fc-445e-b7c8-3f164aa56dd2" CreationDate="2023-02-01T15:21:36.467" UserId="380" Text="I think you need to strip the trailing zeroes from the error code and decode the error as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;            const mod = dispatchError.asModule&#xD;&#xA;            const error = api.registry.findMetaError(&#xD;&#xA;                new Uint8Array([mod.index.toNumber(), bnFromHex(mod.error.toHex().slice(0, 4)).toNumber()])&#xD;&#xA;            )&#xD;&#xA;            message = `${error.section}.${error.name}${&#xD;&#xA;                Array.isArray(error.docs) ? `(${error.docs.join('')})` : error.docs || ''&#xD;&#xA;            }`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will give you the module at index 4, error with index 2. e.g. in substrate&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;node_modules/@polkadot/types-support/metadata/v14/substrate-json.json&#xD;&#xA;&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;Authorship&quot;,&#xD;&#xA;    &#xD;&#xA;          ...&#xD;&#xA;&#xD;&#xA;          &quot;errors&quot;: {&#xD;&#xA;            &quot;type&quot;: 424 // use this value to look for the errors&#xD;&#xA;          },&#xD;&#xA;          &quot;index&quot;: 4&#xD;&#xA;        },&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;node_modules/@polkadot/types-support/metadata/v14/substrate-types.json&#xD;&#xA;  {&#xD;&#xA;    &quot;id&quot;: 424,&#xD;&#xA;    &quot;type&quot;: {&#xD;&#xA;      &quot;path&quot;: [&#xD;&#xA;        &quot;pallet_authorship&quot;,&#xD;&#xA;        &quot;pallet&quot;,&#xD;&#xA;        &quot;Error&quot;&#xD;&#xA;      ],&#xD;&#xA;      ...&#xD;&#xA;      &quot;def&quot;: {&#xD;&#xA;        &quot;variant&quot;: {&#xD;&#xA;          &quot;variants&quot;: [&#xD;&#xA;      ...&#xD;&#xA;            {&#xD;&#xA;              &quot;name&quot;: &quot;TooManyUncles&quot;, // this might be your error&#xD;&#xA;              &quot;fields&quot;: [],&#xD;&#xA;              &quot;index&quot;: 2,&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot;Too many uncles.&quot;&#xD;&#xA;              ]&#xD;&#xA;            },&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26841" PostHistoryTypeId="5" PostId="7017" RevisionGUID="a0d9e62d-be50-4437-81a1-6c66c4dab98a" CreationDate="2023-02-01T15:26:36.597" UserId="2442" Comment="added 293 characters in body; edited title" Text="I've been following the how-to guide to implementing [unsigned extrinsic call with a signed payload](https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-transactions/#sending-unsigned-transactions-with-signed-payloads).&#xD;&#xA;&#xD;&#xA;My pallet defines the following `KeyTypeId`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;ver!&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And the code that uses the local accounts looks like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let signer = Signer::&lt;T, T::AuthorityId&gt;::any_account();&#xD;&#xA;&#xD;&#xA;if let Some((_, res)) = signer.send_unsigned_transaction(&#xD;&#xA;  // this line is to prepare and return payload&#xD;&#xA;  |acct| {&#xD;&#xA;  // Update payload with status and signature&#xD;&#xA;    ...&#xD;&#xA;  },&#xD;&#xA;  |signed_payload, signature| Call::submit_unsigned {&#xD;&#xA;    signed_payload,&#xD;&#xA;    signature,&#xD;&#xA;  },&#xD;&#xA;) {&#xD;&#xA;  res.map_err(|_| Error::&lt;T&gt;::OffChainVerificationError)&#xD;&#xA;} else {&#xD;&#xA;  // The case of `None`: no account is available for sending&#xD;&#xA;  error!(&quot;No local accounts available. Consider adding one via `author_insertKey` RPC.&quot;);&#xD;&#xA;  Err(Error::&lt;T&gt;::OffChainVerificationError)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;At this time, if I run the OCW, I get the following error from the code above:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ERROR      offchain-worker verification::offchain: No local accounts available. Consider adding one via `author_insertKey` RPC.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I read that we can either specify a local account in the `service.rs`:&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;  let keystore = keystore_container.sync_keystore();&#xD;&#xA;  if config.offchain_worker.enabled {&#xD;&#xA;    sc_service::build_offchain_workers(&amp;config, task_manager.spawn_handle(), client.clone(), network.clone());&#xD;&#xA;    sp_keystore::SyncCryptoStore::sr25519_generate_new(&#xD;&#xA;      &amp;*keystore,&#xD;&#xA;      sp_runtime::KeyTypeId(*b&quot;ver!&quot;),&#xD;&#xA;      Some(&quot;//Alice&quot;),&#xD;&#xA;    ).expect(&quot;Creating key with local account Alice should work&quot;);&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or either add the account through RPC call:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl --location --request POST 'http://localhost:9933' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;&quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;&quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;&quot;params&quot;: [&quot;ver!&quot;,&quot;clip organ olive upper oak void inject side suit toilet stick narrow&quot;,&quot;0xb48004c6e1625282313b07d1c9950935e86894a2e4f21fb1ffee9854d180c781&quot;],&#xD;&#xA;&quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But in both cases the execution of the code inside `submit_unsigned` extrinsic, that validates the signature:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;      // Ensure the payload of the unsigned transaction was signed by a local account and that the&#xD;&#xA;      // signature is valid&#xD;&#xA;      ensure_none(origin)?;&#xD;&#xA;&#xD;&#xA;      let signer = Signer::&lt;T, T::AuthorityId&gt;::all_accounts();&#xD;&#xA;      ensure!(&#xD;&#xA;        // panics in the next line&#xD;&#xA;        signer.with_filter(vec![payload.public.clone()]).can_sign(),&#xD;&#xA;        Error::&lt;T&gt;::OffChainVerificationError&#xD;&#xA;      );&#xD;&#xA;&#xD;&#xA;      let signature_valid = SignedPayload::&lt;T&gt;::verify::&lt;T::AuthorityId&gt;(&amp;payload, signature);&#xD;&#xA;      ensure!(signature_valid, Error::&lt;T&gt;::OffChainVerificationError);&#xD;&#xA;```&#xD;&#xA;panics with the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'No `keystore` associated for the current context!', /workspace/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:832&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, there is no keystore available at this time. Turns out that from the [example](https://github.com/JoshOrndorff/recipes/blob/master/pallets/ocw-demo/src/lib.rs#L514) there is no need to explicitly ensure that the account that signed the payload is a local account.&#xD;&#xA;&#xD;&#xA;Is the `SignedPayload::verify()` method already validating this fact?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26842" PostHistoryTypeId="4" PostId="7017" RevisionGUID="a0d9e62d-be50-4437-81a1-6c66c4dab98a" CreationDate="2023-02-01T15:26:36.597" UserId="2442" Comment="added 293 characters in body; edited title" Text="How to verify that a signed payload of an unsigned extrinsic is signed by a local account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26843" PostHistoryTypeId="52" PostId="7009" RevisionGUID="78d23979-632a-4a61-bb05-dfa43d481048" CreationDate="2023-02-01T15:36:12.833" />
  <row Id="26844" PostHistoryTypeId="5" PostId="7017" RevisionGUID="5e9323bd-4dc9-4787-aca5-edf0b5699761" CreationDate="2023-02-01T15:37:05.520" UserId="2442" Comment="added 99 characters in body" Text="I've been following the how-to guide to implementing [unsigned extrinsic call with a signed payload](https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-transactions/#sending-unsigned-transactions-with-signed-payloads).&#xD;&#xA;&#xD;&#xA;My pallet defines the following `KeyTypeId`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;ver!&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And the code that uses the local accounts looks like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let signer = Signer::&lt;T, T::AuthorityId&gt;::any_account();&#xD;&#xA;&#xD;&#xA;if let Some((_, res)) = signer.send_unsigned_transaction(&#xD;&#xA;  // this line is to prepare and return payload&#xD;&#xA;  |acct| {&#xD;&#xA;  // Update payload with status and signature&#xD;&#xA;    ...&#xD;&#xA;  },&#xD;&#xA;  |signed_payload, signature| Call::submit_unsigned {&#xD;&#xA;    signed_payload,&#xD;&#xA;    signature,&#xD;&#xA;  },&#xD;&#xA;) {&#xD;&#xA;  res.map_err(|_| Error::&lt;T&gt;::OffChainVerificationError)&#xD;&#xA;} else {&#xD;&#xA;  // The case of `None`: no account is available for sending&#xD;&#xA;  error!(&quot;No local accounts available. Consider adding one via `author_insertKey` RPC.&quot;);&#xD;&#xA;  Err(Error::&lt;T&gt;::OffChainVerificationError)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;At this time, if I run the OCW, I get the following error from the code above:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ERROR      offchain-worker verification::offchain: No local accounts available. Consider adding one via `author_insertKey` RPC.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I read that we can either specify a local account in the `service.rs`:&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;  let keystore = keystore_container.sync_keystore();&#xD;&#xA;  if config.offchain_worker.enabled {&#xD;&#xA;    sc_service::build_offchain_workers(&amp;config, task_manager.spawn_handle(), client.clone(), network.clone());&#xD;&#xA;    sp_keystore::SyncCryptoStore::sr25519_generate_new(&#xD;&#xA;      &amp;*keystore,&#xD;&#xA;      sp_runtime::KeyTypeId(*b&quot;ver!&quot;),&#xD;&#xA;      Some(&quot;//Alice&quot;),&#xD;&#xA;    ).expect(&quot;Creating key with local account Alice should work&quot;);&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or either add the account through RPC call:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl --location --request POST 'http://localhost:9933' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;&quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;&quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;&quot;params&quot;: [&quot;ver!&quot;,&quot;clip organ olive upper oak void inject side suit toilet stick narrow&quot;,&quot;0xb48004c6e1625282313b07d1c9950935e86894a2e4f21fb1ffee9854d180c781&quot;],&#xD;&#xA;&quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But in both cases the execution of the code inside `submit_unsigned` extrinsic, that validates the signature:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;      // Ensure the payload of the unsigned transaction was signed by a local account and that the&#xD;&#xA;      // signature is valid&#xD;&#xA;      ensure_none(origin)?;&#xD;&#xA;&#xD;&#xA;      let signer = Signer::&lt;T, T::AuthorityId&gt;::all_accounts();&#xD;&#xA;      ensure!(&#xD;&#xA;        // panics in the next line&#xD;&#xA;        signer.with_filter(vec![payload.public.clone()]).can_sign(),&#xD;&#xA;        Error::&lt;T&gt;::OffChainVerificationError&#xD;&#xA;      );&#xD;&#xA;&#xD;&#xA;      let signature_valid = SignedPayload::&lt;T&gt;::verify::&lt;T::AuthorityId&gt;(&amp;payload, signature);&#xD;&#xA;      ensure!(signature_valid, Error::&lt;T&gt;::OffChainVerificationError);&#xD;&#xA;```&#xD;&#xA;panics with the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'No `keystore` associated for the current context!', /workspace/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:832&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, there is no keystore available at this time. Turns out from the [example](https://github.com/JoshOrndorff/recipes/blob/master/pallets/ocw-demo/src/lib.rs#L514) that there is no need to explicitly ensure that the account that signed the payload is a local account.&#xD;&#xA;&#xD;&#xA;Is the `SignedPayload::verify()` method already validating this fact?&#xD;&#xA;&#xD;&#xA;Out of curiosity, what is the reason why the keystore is not available in extrinsic invocation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26846" PostHistoryTypeId="2" PostId="7025" RevisionGUID="dbf05f4c-5ea4-4469-8a50-c6497c2ac650" CreationDate="2023-02-01T17:01:39.010" UserId="555" Text="I need to implement the crowdloan reward distribution. &#xD;&#xA;Do we have have any reference/example for that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26848" PostHistoryTypeId="1" PostId="7025" RevisionGUID="dbf05f4c-5ea4-4469-8a50-c6497c2ac650" CreationDate="2023-02-01T17:01:39.010" UserId="555" Text="Do we have any example of crowdloan reward distribution implementation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26849" PostHistoryTypeId="3" PostId="7025" RevisionGUID="dbf05f4c-5ea4-4469-8a50-c6497c2ac650" CreationDate="2023-02-01T17:01:39.010" UserId="555" Text="|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26850" PostHistoryTypeId="5" PostId="7025" RevisionGUID="ac5f9806-5811-4c96-a368-d548600d2f5b" CreationDate="2023-02-01T17:16:34.867" UserId="555" Comment="added 57 characters in body" Text="I need to implement the crowdloan reward distribution. &#xD;&#xA;Do we have have any reference/example for that?&#xD;&#xA;&#xD;&#xA;What are the options we have to distribute the rewards?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26851" PostHistoryTypeId="2" PostId="7026" RevisionGUID="fea34d02-54ad-4781-a33a-b6a28e8e9127" CreationDate="2023-02-01T17:34:54.943" UserId="2762" Text="First check the code of the [Parachain Crowdloaning pallet][1] which is included in the [Polkadot runtime][2].&#xD;&#xA;&#xD;&#xA;&gt; The point of this pallet is to allow parachain projects to offer the ability to help fund a deposit for the parachain. When the crowdloan has ended, the funds are returned.&#xD;&#xA;&#xD;&#xA;For distributing rewards for crowdloan participation in parachain-native tokens, check this interesting one build from the community: [Crowdloan Rewards Pallet][3].&#xD;&#xA;&#xD;&#xA;Another example see this blog for the [Composable’s Implementation of the Crowdloan Rewards Pallet][4] and [the code of the pallet][5].&#xD;&#xA;&#xD;&#xA;Other interesting resources for a crowdloan is read the blogs of different parachains that has successfully done one: [Moonbeam][6], [Astar][7], [Unique Network][8] ... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/crowdloan/mod.rs&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/lib.rs#L1388&#xD;&#xA;  [3]: https://github.com/PureStake/crowdloan-rewards&#xD;&#xA;  [4]: https://composablefi.medium.com/composables-implementation-of-the-crowdloan-rewards-pallet-bb08e3f3792f&#xD;&#xA;  [5]: https://github.com/ComposableFi/composable/tree/main/code/parachain/frame/crowdloan-rewards&#xD;&#xA;  [6]: https://moonbeam.foundation/moonbeam-crowdloan/&#xD;&#xA;  [7]: https://medium.com/astar-network/astar-crowdloan-event-part-i-f880988b9685&#xD;&#xA;  [8]: https://unique.network/token/crowdloan/" ContentLicense="CC BY-SA 4.0" />
  <row Id="26853" PostHistoryTypeId="2" PostId="7027" RevisionGUID="5d22d79f-beb0-4e88-a6dd-01e3c2f419c4" CreationDate="2023-02-01T17:55:10.473" UserId="2722" Text="I want to use `WEIGHT_PER_SECOND` for using in this code : &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    parameter_types! {&#xD;&#xA;    	pub const BlockHashCount: BlockNumber = 2400;&#xD;&#xA;    	pub const Version: RuntimeVersion = VERSION;&#xD;&#xA;    	/// We allow for 2 seconds of compute with a 6 second average block time.&#xD;&#xA;    	pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights&#xD;&#xA;    		::with_sensible_defaults(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO);&#xD;&#xA;    	pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength&#xD;&#xA;    		::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);&#xD;&#xA;    	pub const SS58Prefix: u8 = 42;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and I use this code for import `WEIGHT_PER_SECOND` : &#xD;&#xA;&#xD;&#xA;        pub use frame_support::{&#xD;&#xA;    	traits::{&#xD;&#xA;    		ConstU128, ConstU32, ConstU64, ConstBool,ConstU8, KeyOwnerProofSystem,Nothing, Randomness, StorageInfo,&#xD;&#xA;    	},&#xD;&#xA;    	weights::{&#xD;&#xA;    		constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},&#xD;&#xA;    	},&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;I used this part of code in previous version of substrate but in this version i faced this problem . &#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this problem ?**&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26855" PostHistoryTypeId="1" PostId="7027" RevisionGUID="5d22d79f-beb0-4e88-a6dd-01e3c2f419c4" CreationDate="2023-02-01T17:55:10.473" UserId="2722" Text="WEIGHT_PER_SECOND,^^^^^^^^^^^^^^^^^ no `WEIGHT_PER_SECOND` in `weights::constants" ContentLicense="CC BY-SA 4.0" />
  <row Id="26856" PostHistoryTypeId="3" PostId="7027" RevisionGUID="5d22d79f-beb0-4e88-a6dd-01e3c2f419c4" CreationDate="2023-02-01T17:55:10.473" UserId="2722" Text="|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26857" PostHistoryTypeId="2" PostId="7028" RevisionGUID="8a3be8af-fd39-4744-a33b-42d1902ce0c6" CreationDate="2023-02-01T18:00:47.843" UserId="94" Text="It was renamed to `WEIGHT_REF_TIME_PER_SECOND` since with chromatic weights the weight has two components. *Ref time* and *Proof Size*.  &#xD;&#xA;There also is `WEIGHT_PROOF_SIZE_PER_MB` [here](https://github.com/paritytech/substrate/blob/d0540a79967cb06cd7598a4965c7c06afc788b0c/primitives/weights/src/lib.rs#L49)." ContentLicense="CC BY-SA 4.0" />
  <row Id="26859" PostHistoryTypeId="2" PostId="7029" RevisionGUID="67ec5036-4794-4b3e-b7ae-7818e1039e00" CreationDate="2023-02-01T18:06:39.530" UserId="73" Text="&gt; But in both cases the execution of the code inside submit_unsigned extrinsic, that validates the signature:&#xD;&#xA;&gt; ```&#xD;&#xA;&gt;      // Ensure the payload of the unsigned transaction was &gt; signed by a local account and that the&#xD;&#xA;&gt;      // signature is valid&#xD;&#xA;&gt;      ensure_none(origin)?;&#xD;&#xA;&gt;&#xD;&#xA;&gt;      let signer = Signer::&lt;T, T::AuthorityId&gt;::all_accounts();&#xD;&#xA;&gt;      ensure!(&#xD;&#xA;&gt;        // panics in the next line&#xD;&#xA;&gt;        signer.with_filter(vec![payload.public.clone()]).can_sign(),&#xD;&#xA;&gt;        Error::&lt;T&gt;::OffChainVerificationError&#xD;&#xA;&gt;      );&#xD;&#xA;&gt;&#xD;&#xA;&gt;      let signature_valid = SignedPayload::&lt;T&gt;::verify::&gt; &lt;T::AuthorityId&gt;(&amp;payload, signature);&#xD;&#xA;&gt;      ensure!(signature_valid, Error::&gt;&lt;T&gt;::OffChainVerificationError);&#xD;&#xA;&gt;```&#xD;&#xA;&#xD;&#xA;Your problem is the following line:&#xD;&#xA;```&#xD;&#xA;let signer = Signer::&lt;T, T::AuthorityId&gt;::all_accounts();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This requires that the keystore is registered for the wasm execution. The keystore is never available on chain as this would otherwise be a source of indeterminism as not all nodes have the same keys in their keystores or none at all. You need to pass the signer as parameter to your unsigned call and then you need to ensure that this signer is part of some on chain set. For example in `im-online` this on chain list are the current active validators. Depending on your application you probably also want to use the activate validator set. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26861" PostHistoryTypeId="2" PostId="7030" RevisionGUID="6dc487a7-14e5-463d-b196-e7cb9d5a290d" CreationDate="2023-02-01T18:08:41.340" UserId="94" Text="10M entries of `u32` in a vector? Sure this will not fit in the memory of the runtime, which is capped at 32 MiB.  &#xD;&#xA;&#xD;&#xA;Three things to consider: It looks like your data structure is rather a map. Then instead of going for `StorageValue&lt;Vec&lt;` which should only be the last resort, you could try out `StorageDoubleMap` which maps `NFTId x BlockNumber` to `Limit`. Then you can have theoretically unlimited number of entries. &#xD;&#xA;&#xD;&#xA;Other thing is that depending on what you mean by &quot;queue&quot; you could try to use the [`Message Queue`](https://github.com/paritytech/substrate/blob/3bc3742d5c0c5269353d7809d9f8f91104a93273/frame/message-queue/src/lib.rs#L18) pallet, which can be used to enqueue and later-on process messages in a PoV-safe way.  &#xD;&#xA;&#xD;&#xA;Last thing is that even _if_ the 10M entries would go through the benchmark, the resulting PoV would be to large to deploy onto any para-chain. Currently para-chains are capped to 5MiB Proof size per block. Accessing that storage value would consume at least 40MiB in the worst case." ContentLicense="CC BY-SA 4.0" />
  <row Id="26863" PostHistoryTypeId="2" PostId="7031" RevisionGUID="f745415c-aff6-4dbd-a0a6-858341ebf88f" CreationDate="2023-02-01T18:47:38.100" UserId="2722" Text="i added this pallets into `runtime Cargo.toml` : &#xD;&#xA;&#xD;&#xA;    pallet-contracts = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-contracts-primitives = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;and added this codes into the `lib.rs`:&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;      construct_runtime!(&#xD;&#xA;    	pub struct Runtime&#xD;&#xA;    	where&#xD;&#xA;    		Block = Block,&#xD;&#xA;    		NodeBlock = opaque::Block,&#xD;&#xA;    		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;    	{&#xD;&#xA;    		DEX: pallet_dex,&#xD;&#xA;    		Contracts: pallet_contracts,&#xD;&#xA;    &#xD;&#xA;    	}&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;config : &#xD;&#xA;&#xD;&#xA;      parameter_types! {&#xD;&#xA;    	pub const DepositPerItem: Balance = deposit(1, 0);&#xD;&#xA;    	pub const DepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;    	pub const DeletionQueueDepth: u32 = 128;&#xD;&#xA;    	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * BlockWeights::get().max_block;&#xD;&#xA;    	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;    impl pallet_contracts::Config for Runtime {&#xD;&#xA;    	type Time = Timestamp;&#xD;&#xA;    	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;    	type Currency = Balances;&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type RuntimeCall = RuntimeCall;&#xD;&#xA;    	type CallFilter = Nothing;&#xD;&#xA;    	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;    	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;    	type ChainExtension = ();&#xD;&#xA;    	type Schedule = Schedule;&#xD;&#xA;    	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;    	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;    	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;    	type DepositPerByte = DepositPerByte;&#xD;&#xA;    	type DepositPerItem = DepositPerItem;&#xD;&#xA;    	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;    	type MaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;    	type MaxDebugBufferLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;    &#xD;&#xA;    	type MaxStorageKeyLen = ConstU32&lt;{ 512 * 1024 }&gt;;&#xD;&#xA;    	type UnsafeUnstableInterface = ConstBool&lt;true&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;in the next step i want to upload smart contract in this enviroment : &#xD;&#xA;&#xD;&#xA;https://contracts-ui.substrate.io/instantiate&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**** but the next button dosent active also i can find the contract address . &#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i sovle this problem ???**&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cRD0x.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26865" PostHistoryTypeId="1" PostId="7031" RevisionGUID="f745415c-aff6-4dbd-a0a6-858341ebf88f" CreationDate="2023-02-01T18:47:38.100" UserId="2722" Text="peoblem with add smart contract into the substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="26866" PostHistoryTypeId="3" PostId="7031" RevisionGUID="f745415c-aff6-4dbd-a0a6-858341ebf88f" CreationDate="2023-02-01T18:47:38.100" UserId="2722" Text="|substrate-node-template|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26867" PostHistoryTypeId="2" PostId="7032" RevisionGUID="1910a7d3-18a8-45a5-ae70-366e02bfda37" CreationDate="2023-02-01T19:55:14.657" UserId="1786" Text="From what I understand it is not possible, let me explain. The api needs to decorate the metadata per block depending on the runtime required at that block. Back in older polkadot-js versions we had the `.at()` key for storage queries that would allow us to specify the block at which we wanted to query so it would look like `api.query.timestamp.now.at(&lt;BLOCK_HASH&gt;)`. That has now been deprecated and replaced with `const apiAt = api.at(&lt;BLOCK_HASH&gt;)` where you then use the `apiAt` variable we just created to query your call like so `apiAt.query.timestamp.now()`. &#xD;&#xA;&#xD;&#xA;Here is an example of some code that will make it clearer.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;/**&#xD;&#xA; * Using api.at(). The following blockhashes are on Kusama, and far enough&#xD;&#xA; * apart to demonstrate the use of different runtimes.&#xD;&#xA; */&#xD;&#xA;// 0x62b04760a9ec2b2ab7beaecb6dbe48be59cc1f3ba3b327d159502c40b6f111fa Block 16449318&#xD;&#xA;const apiAtBlockHash1 = await api.at('0x62b04760a9ec2b2ab7beaecb6dbe48be59cc1f3ba3b327d159502c40b6f111fa');&#xD;&#xA;// 0x0b55de2436b21bb63db2406d32eaa2daaf731f672a2cfa1ab42dd997fd83d51f Block 15000000&#xD;&#xA;const apiAtBlockHash2 = await api.at('0x0b55de2436b21bb63db2406d32eaa2daaf731f672a2cfa1ab42dd997fd83d51f');&#xD;&#xA;&#xD;&#xA;const a1 = await apiAtBlockHash1.query.timestamp.now();&#xD;&#xA;const a2 = await apiAtBlockHash2.query.timestamp.now();&#xD;&#xA;console.log(a1.toString(), a2.toString());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now if we were to use the example you referenced in your question, the `api` is going to use the latest block as its reference for the query. So given the following example, both timestamps will be exactly the same because the api decorated at the same block for each call. Passing in the blockhash wont help as an argument either because `timestamp.now` doesn't take in any arguments. &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;/**&#xD;&#xA; * Using the example you have above&#xD;&#xA; */&#xD;&#xA;const multiQueryResult = await api.queryMulti([&#xD;&#xA;			[api.query.timestamp.now, '0x62b04760a9ec2b2ab7beaecb6dbe48be59cc1f3ba3b327d159502c40b6f111fa'],&#xD;&#xA;			[api.query.timestamp.now, '0x0b55de2436b21bb63db2406d32eaa2daaf731f672a2cfa1ab42dd997fd83d51f'],&#xD;&#xA;]);&#xD;&#xA;&#xD;&#xA;console.log(multiQueryResult[0].toString(), multiQueryResult[1].toString());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26869" PostHistoryTypeId="5" PostId="7032" RevisionGUID="ae02d777-2e5c-4cdf-8a4a-a766c1329ab8" CreationDate="2023-02-01T20:02:40.173" UserId="1786" Comment="added 26 characters in body" Text="From what I understand it is not possible, let me explain. The api needs to decorate the metadata per request (if not already cached) depending on the runtime required at that block. Back in older polkadot-js versions we had the `.at()` key for storage queries that would allow us to specify the block at which we wanted to query so it would look like `api.query.timestamp.now.at(&lt;BLOCK_HASH&gt;)`. That has now been deprecated and replaced with `const apiAt = api.at(&lt;BLOCK_HASH&gt;)` where you then use the `apiAt` variable we just created to query your call like so `apiAt.query.timestamp.now()`. &#xD;&#xA;&#xD;&#xA;Here is an example of some code that will make it clearer.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;/**&#xD;&#xA; * Using api.at(). The following blockhashes are on Kusama, and far enough&#xD;&#xA; * apart to demonstrate the use of different runtimes.&#xD;&#xA; */&#xD;&#xA;// 0x62b04760a9ec2b2ab7beaecb6dbe48be59cc1f3ba3b327d159502c40b6f111fa Block 16449318&#xD;&#xA;const apiAtBlockHash1 = await api.at('0x62b04760a9ec2b2ab7beaecb6dbe48be59cc1f3ba3b327d159502c40b6f111fa');&#xD;&#xA;// 0x0b55de2436b21bb63db2406d32eaa2daaf731f672a2cfa1ab42dd997fd83d51f Block 15000000&#xD;&#xA;const apiAtBlockHash2 = await api.at('0x0b55de2436b21bb63db2406d32eaa2daaf731f672a2cfa1ab42dd997fd83d51f');&#xD;&#xA;&#xD;&#xA;const a1 = await apiAtBlockHash1.query.timestamp.now();&#xD;&#xA;const a2 = await apiAtBlockHash2.query.timestamp.now();&#xD;&#xA;console.log(a1.toString(), a2.toString());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now if we were to use the example you referenced in your question, the `api` is going to use the latest block as its reference for the query. So given the following example, both timestamps will be exactly the same because the api decorated at the same block for each call. Passing in the blockhash wont help as an argument either because `timestamp.now` doesn't take in any arguments. &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;/**&#xD;&#xA; * Using the example you have above&#xD;&#xA; */&#xD;&#xA;const multiQueryResult = await api.queryMulti([&#xD;&#xA;			[api.query.timestamp.now, '0x62b04760a9ec2b2ab7beaecb6dbe48be59cc1f3ba3b327d159502c40b6f111fa'],&#xD;&#xA;			[api.query.timestamp.now, '0x0b55de2436b21bb63db2406d32eaa2daaf731f672a2cfa1ab42dd997fd83d51f'],&#xD;&#xA;]);&#xD;&#xA;&#xD;&#xA;console.log(multiQueryResult[0].toString(), multiQueryResult[1].toString());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26870" PostHistoryTypeId="5" PostId="7027" RevisionGUID="bf69470a-2662-46c1-95f3-de17bbc299bc" CreationDate="2023-02-01T20:12:11.647" UserId="2" Comment="grammar corrections" Text="I want to use `WEIGHT_PER_SECOND` in this code : &#xD;&#xA;&#xD;&#xA;    parameter_types! {&#xD;&#xA;    	pub const BlockHashCount: BlockNumber = 2400;&#xD;&#xA;    	pub const Version: RuntimeVersion = VERSION;&#xD;&#xA;    	/// We allow for 2 seconds of compute with a 6 second average block time.&#xD;&#xA;    	pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights&#xD;&#xA;    		::with_sensible_defaults(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO);&#xD;&#xA;    	pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength&#xD;&#xA;    		::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);&#xD;&#xA;    	pub const SS58Prefix: u8 = 42;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and I use this code for import `WEIGHT_PER_SECOND` : &#xD;&#xA;&#xD;&#xA;        pub use frame_support::{&#xD;&#xA;    	traits::{&#xD;&#xA;    		ConstU128, ConstU32, ConstU64, ConstBool,ConstU8, KeyOwnerProofSystem,Nothing, Randomness, StorageInfo,&#xD;&#xA;    	},&#xD;&#xA;    	weights::{&#xD;&#xA;    		constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},&#xD;&#xA;    	},&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;I used this part of code in previous versions of substrate but in this version I faced this problem. &#xD;&#xA;&#xD;&#xA;**What's the problem, and how can I solve it?**&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26871" PostHistoryTypeId="24" PostId="7027" RevisionGUID="bf69470a-2662-46c1-95f3-de17bbc299bc" CreationDate="2023-02-01T20:12:11.647" Comment="Proposed by 2 approved by 34 edit id of 376" ContentLicense="CC BY-SA 4.0" />
  <row Id="26872" PostHistoryTypeId="2" PostId="7033" RevisionGUID="73d7b496-20c4-46e3-9851-6f69c95dcb07" CreationDate="2023-02-01T20:24:17.170" UserId="3327" Text="I have multiple question about treasury pallet. &#xD;&#xA;&#xD;&#xA;1. How to get the account that is behind the treasury?&#xD;&#xA;&#xD;&#xA;2. Can we transfer funds to treasury by transferring some token to that account?&#xD;&#xA;&#xD;&#xA;3. How to find the current balance in the treasury? Since the front end interface does not show the balance of the treasury&#xD;&#xA;&#xD;&#xA;4.  What if there are approved spend proposal and there are no funds in the treasury? Will these approved proposal will be carried forwarded to the next sped period?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26874" PostHistoryTypeId="1" PostId="7033" RevisionGUID="73d7b496-20c4-46e3-9851-6f69c95dcb07" CreationDate="2023-02-01T20:24:17.170" UserId="3327" Text="How to find the accounts used behind treasury pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26875" PostHistoryTypeId="3" PostId="7033" RevisionGUID="73d7b496-20c4-46e3-9851-6f69c95dcb07" CreationDate="2023-02-01T20:24:17.170" UserId="3327" Text="|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26876" PostHistoryTypeId="2" PostId="7034" RevisionGUID="261e848d-b8f3-4c6f-b65d-b637f87d5a32" CreationDate="2023-02-01T20:37:00.927" UserId="151" Text="Currently, in the ink test environment (ink_env::test), the default block time is 6 (see https://github.com/paritytech/ink/blame/50b32f4e49d4072f3d28009eb517475b68bec56b/crates/engine/src/ext.rs#L147) as mentionned in the code, this is arbitrary, but this value is not close to any real value (as it is expressed in ms...)&#xD;&#xA;&#xD;&#xA;So currently, to do some testing when I need to test timestamps from the environment I have to do something like this :&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn sign_up_after_end_of_sign_up_period_returns_error() {&#xD;&#xA;&#xD;&#xA;            // preparing the test&#xD;&#xA;&#xD;&#xA;            //default block time is 6 (in ms)&#xD;&#xA;            for _ in 0..10000 {&#xD;&#xA;                ink_env::test::advance_block::&lt;ink_env::DefaultEnvironment&gt;();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            //acting and asserting the test&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I wonder if there is a way to (simply) override the DefaultEnvironment's blocktime without to creating my own test environment type just to control that value.&#xD;&#xA;&#xD;&#xA;This is because it would make sense in my tests to use the block_time value (that cannot be extracted from ink_env::test). To have a more precise way to advance blocks and test the usage of the block timestamp." ContentLicense="CC BY-SA 4.0" />
  <row Id="26878" PostHistoryTypeId="1" PostId="7034" RevisionGUID="261e848d-b8f3-4c6f-b65d-b637f87d5a32" CreationDate="2023-02-01T20:37:00.927" UserId="151" Text="Is it possible to override ink_env::test default block time?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26879" PostHistoryTypeId="3" PostId="7034" RevisionGUID="261e848d-b8f3-4c6f-b65d-b637f87d5a32" CreationDate="2023-02-01T20:37:00.927" UserId="151" Text="|ink|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26880" PostHistoryTypeId="2" PostId="7035" RevisionGUID="54b57e6b-fc77-48b2-80c2-0d53733151fb" CreationDate="2023-02-02T00:09:52.300" UserId="3070" Text="I am using Substrate Connect in the browser following the [docs][1] for a custom chain spec. When I try to create a new ScProvider like the documentation suggests i get an error that I am missing a variable in the constructor.&#xD;&#xA;```&#xD;&#xA;TS2554: Expected 2-3 arguments, but got 1.&#xD;&#xA;    41 | // Create the provider for the custom chain&#xD;&#xA;    42 |     const customSpec = JSON.stringify(jsonCustomSpec);&#xD;&#xA;  &gt; 43 |     const provider = new ScProvider(customSpec);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;in the substrate lib the constructor code is asking for SubstrateConnect.&#xD;&#xA;any ideas on this?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26882" PostHistoryTypeId="1" PostId="7035" RevisionGUID="54b57e6b-fc77-48b2-80c2-0d53733151fb" CreationDate="2023-02-02T00:09:52.300" UserId="3070" Text="Substrate-Connect Error on new ScProvider" ContentLicense="CC BY-SA 4.0" />
  <row Id="26883" PostHistoryTypeId="3" PostId="7035" RevisionGUID="54b57e6b-fc77-48b2-80c2-0d53733151fb" CreationDate="2023-02-02T00:09:52.300" UserId="3070" Text="|javascript|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26884" PostHistoryTypeId="5" PostId="7031" RevisionGUID="d89f595f-b377-4d35-9268-091df9a21eca" CreationDate="2023-02-02T00:29:09.387" UserId="83" Comment="make more readable" Text="I added these pallets into `runtime Cargo.toml` : &#xD;&#xA;&#xD;&#xA;    pallet-contracts = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;    pallet-contracts-primitives = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;And added this codes into the `lib.rs`:&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;      construct_runtime!(&#xD;&#xA;    	pub struct Runtime&#xD;&#xA;    	where&#xD;&#xA;    		Block = Block,&#xD;&#xA;    		NodeBlock = opaque::Block,&#xD;&#xA;    		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;    	{&#xD;&#xA;    		DEX: pallet_dex,&#xD;&#xA;    		Contracts: pallet_contracts,&#xD;&#xA;    &#xD;&#xA;    	}&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;config : &#xD;&#xA;&#xD;&#xA;      parameter_types! {&#xD;&#xA;    	pub const DepositPerItem: Balance = deposit(1, 0);&#xD;&#xA;    	pub const DepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;    	pub const DeletionQueueDepth: u32 = 128;&#xD;&#xA;    	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * BlockWeights::get().max_block;&#xD;&#xA;    	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;    impl pallet_contracts::Config for Runtime {&#xD;&#xA;    	type Time = Timestamp;&#xD;&#xA;    	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;    	type Currency = Balances;&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type RuntimeCall = RuntimeCall;&#xD;&#xA;    	type CallFilter = Nothing;&#xD;&#xA;    	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;    	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;    	type ChainExtension = ();&#xD;&#xA;    	type Schedule = Schedule;&#xD;&#xA;    	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;    	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;    	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;    	type DepositPerByte = DepositPerByte;&#xD;&#xA;    	type DepositPerItem = DepositPerItem;&#xD;&#xA;    	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;    	type MaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;    	type MaxDebugBufferLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;    &#xD;&#xA;    	type MaxStorageKeyLen = ConstU32&lt;{ 512 * 1024 }&gt;;&#xD;&#xA;    	type UnsafeUnstableInterface = ConstBool&lt;true&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In the next step I want to upload a smart contract in this enviroment : &#xD;&#xA;&#xD;&#xA;https://contracts-ui.substrate.io/instantiate&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**** But the next button isn't active, and also I can't find the contract address. &#xD;&#xA;&#xD;&#xA;**What's the problem? How can I solve this problem???**&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cRD0x.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26885" PostHistoryTypeId="4" PostId="7031" RevisionGUID="d89f595f-b377-4d35-9268-091df9a21eca" CreationDate="2023-02-02T00:29:09.387" UserId="83" Comment="make more readable" Text="Problem adding a smart contract into a Substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="26886" PostHistoryTypeId="2" PostId="7036" RevisionGUID="229a6bb4-5127-4fcb-8bfd-a65065ca9cdc" CreationDate="2023-02-02T00:57:57.513" UserId="341" Text="Thanks a lot forgetso for your help. this definitely got me on the right track. For some reason, the `asModule` didn't work. I had subsequent TS errors such as `toNumber` is not a function.&#xD;&#xA;&#xD;&#xA;I had to use `toJSON` to what came back from the event to work my way through. That's the working code:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const [dispatchError]: any = data.toJSON();&#xD;&#xA;&#xD;&#xA;// if proxy has an error&#xD;&#xA;if (dispatchError?.err?.module) {&#xD;&#xA;  const mod = dispatchError.err.module&#xD;&#xA;  const error = api.registry.findMetaError(&#xD;&#xA;    new Uint8Array([Number(mod.index), Number(mod.error.slice(0, 4))])&#xD;&#xA;  )&#xD;&#xA;&#xD;&#xA;  errorInfo = Array.isArray(error.docs) ? error.docs.join('') : error.docs || ''&#xD;&#xA;}&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="26888" PostHistoryTypeId="52" PostId="7027" RevisionGUID="362b2ee9-08be-4504-976d-b9ba5869e5e6" CreationDate="2023-02-02T02:00:49.330" />
  <row Id="26889" PostHistoryTypeId="2" PostId="7037" RevisionGUID="9af7e24d-b7db-4f5c-a929-0742160b282b" CreationDate="2023-02-02T02:55:57.737" UserId="251" Text="1. There are multiple ways to get that. I'll give you 2 examples.&#xD;&#xA;&#xD;&#xA;1.1. https://substrate.stackexchange.com/questions/536/how-do-treasury-accounts-compare-to-end-user-accounts-in-frame&#xD;&#xA;  &#xD;&#xA;1.2. https://github.com/hack-ink/subalfred&#xD;&#xA;```&#xD;&#xA;subalfred key --type pallet --show-prefix 'py/trsry'&#xD;&#xA;sub-seed PalletId(py/trsry)&#xD;&#xA;public-key 0x6d6f646c70792f74727372790000000000000000000000000000000000000000&#xD;&#xA;Substrate    42 5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Yes. Just treat it as a regular account.&#xD;&#xA;3. Query `System::account(5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z)`. Just treat it as a regular account.&#xD;&#xA;4. The transfer will fail due to `InsufficientBalance`." ContentLicense="CC BY-SA 4.0" />
  <row Id="26891" PostHistoryTypeId="5" PostId="7031" RevisionGUID="404e60ed-16d0-4506-84f5-3706ab17228b" CreationDate="2023-02-02T03:06:14.353" UserId="251" Comment="deleted 142 characters in body" Text="I added these pallets into `runtime Cargo.toml` : &#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;pallet-contracts = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;pallet-contracts-primitives = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;,  &quot; branch&quot; = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;```&#xD;&#xA;And added this codes into the `lib.rs`:&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub struct Runtime&#xD;&#xA;	where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		DEX: pallet_dex,&#xD;&#xA;		Contracts: pallet_contracts,&#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;config : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DepositPerItem: Balance = deposit(1, 0);&#xD;&#xA;	pub const DepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;	pub const DeletionQueueDepth: u32 = 128;&#xD;&#xA;	pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * BlockWeights::get().max_block;&#xD;&#xA;	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	type CallFilter = Nothing;&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 31];&#xD;&#xA;	type DeletionQueueDepth = DeletionQueueDepth;&#xD;&#xA;	type DeletionWeightLimit = DeletionWeightLimit;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;	type MaxDebugBufferLen = ConstU32&lt;{ 256 * 1024 }&gt;;&#xD;&#xA;&#xD;&#xA;	type MaxStorageKeyLen = ConstU32&lt;{ 512 * 1024 }&gt;;&#xD;&#xA;	type UnsafeUnstableInterface = ConstBool&lt;true&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;      &#xD;&#xA;In the next step I want to upload a smart contract in this enviroment : &#xD;&#xA;&#xD;&#xA;https://contracts-ui.substrate.io/instantiate&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**** But the next button isn't active, and also I can't find the contract address. &#xD;&#xA;&#xD;&#xA;**What's the problem? How can I solve this problem???**&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cRD0x.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26893" PostHistoryTypeId="2" PostId="7038" RevisionGUID="b0e20955-c0fc-4950-9afc-d398df4801b2" CreationDate="2023-02-02T07:12:52.293" UserId="2888" Text="I make a parachain rococo test net practice following [this tutorial][1]. But I encounter issue after start collator node: &#xD;&#xA;&#xD;&#xA;    [Relaychain] cannot query the runtime API version: UnknownBlock: State already discarded for 0xb5ca6f77cde65f43b7dc8e2f551b6ff36327126392d08a99409531df0e7c0e1c&#xD;&#xA;&#xD;&#xA;after a while, the relay chain block sync is not working. the detail logs are bellow:&#xD;&#xA;&#xD;&#xA;    2023-02-02 14:35:23.179  INFO main sc_cli::runner: Parachain Collator Template    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner: ✌️  version 0.1.0-677a1a238a9    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner: ❤️  by Anonymous, 2020-2023    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner:  Chain specification: Bill Parachain    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner:   Node name: undesirable-hole-5658    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner:  Database: RocksDb at data/chains/billp/db/full    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner: ⛓  Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)    &#xD;&#xA;	2023-02-02 14:35:27.753  INFO main parachain_template_node::command: Parachain id: Id(4221)    &#xD;&#xA;	2023-02-02 14:35:27.753  INFO main parachain_template_node::command: Parachain Account: 5Ec4AhPCKCoMsQQ12wDRHFXGije6QtbrrQBNp8HtLMhwWttY    &#xD;&#xA;	2023-02-02 14:35:27.753  INFO main parachain_template_node::command: Parachain genesis state: 0x00000000000000000000000000000000000000000000000000000000000000000083eaa934f8e151ec6bffc023f7c16ea71267b0c807be2ca1f19754c7b44ff1d703170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;	2023-02-02 14:35:27.753  INFO main parachain_template_node::command: Is collating: yes    &#xD;&#xA;	2023-02-02 14:35:28.530  INFO main sc_service::client::client: [Parachain]  Initializing Genesis block/state (state: 0x83ea…f1d7, header-hash: 0x76d3…0131)    &#xD;&#xA;	2023-02-02 14:35:28.533 DEBUG main parachain: [Parachain] Restoring chain level monitor from last finalized block: 0 0x76d3…0131    &#xD;&#xA;	2023-02-02 14:35:28.534 DEBUG main parachain: [Parachain] Restored chain level monitor up to height 1    &#xD;&#xA;	2023-02-02 14:35:29.842  INFO main sc_service::client::client: [Relaychain]  Initializing Genesis block/state (state: 0x8ad9…f0da, header-hash: 0x6408…063e)    &#xD;&#xA;	2023-02-02 14:35:29.860 DEBUG main parachain::chain-selection: [Relaychain] Using dispute aware relay-chain selection algorithm&#xD;&#xA;	2023-02-02 14:35:29.865  INFO main grandpa: [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;	2023-02-02 14:35:30.368  INFO main babe: [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.  &#xD;&#xA;	...&#xD;&#xA;	2023-02-02 14:35:35.549  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing, target=#3939536 (10 peers), best: #448 (0x12f3…93e2), finalized #0 (0x6408…063e), ⬇ 375.8kiB/s ⬆ 20.5kiB/s    &#xD;&#xA;	2023-02-02 14:35:35.568 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1675229735 min_ts=0 max_ts=0&#xD;&#xA;	2023-02-02 14:35:35.604  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x76d3…0131), finalized #0 (0x76d3…0131), ⬇ 0 ⬆ 0    &#xD;&#xA;	2023-02-02 14:35:37.622 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0x18ddf1f12cc86abeb357487531608a8edd98feeb03b6b7545382465122064b3c block_number=512&#xD;&#xA;	2023-02-02 14:35:37.622 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x6408de7737c59c238890533af25896a2c20608d8b380bb01029acb392781063e&#xD;&#xA;	2023-02-02 14:35:39.452 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0xa360b6bb5981fc1a175742ece7e1a6be3a579edfd6edfc8a13161c7a218ff3d4 block_number=1024&#xD;&#xA;	2023-02-02 14:35:39.455  WARN tokio-runtime-worker parachain::runtime-api: [Relaychain] cannot query the runtime API version: UnknownBlock: State already discarded for 0xb5ca6f77cde65f43b7dc8e2f551b6ff36327126392d08a99409531df0e7c0e1c&#xD;&#xA;	2023-02-02 14:35:39.455 DEBUG tokio-runtime-worker parachain::availability-store: [Relaychain] err=RuntimeApi(NotSupported { runtime_api_name: &quot;candidate_events&quot; })&#xD;&#xA;	2023-02-02 14:35:39.671  WARN tokio-runtime-worker runtime::inclusion-inherent: [Relaychain] CurrentBlockRandomness did not provide entropy    &#xD;&#xA;	2023-02-02 14:35:39.690 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0xf274389771b7e381cb75b8816c2f202621ce31e68e36f0c3b2a82a856f612403 block_number=1179&#xD;&#xA;	2023-02-02 14:35:39.695  WARN tokio-runtime-worker parachain::runtime-api: [Relaychain] cannot query the runtime API version: UnknownBlock: State already discarded for 0xb5ca6f77cde65f43b7dc8e2f551b6ff36327126392d08a99409531df0e7c0e1c&#xD;&#xA;	2023-02-02 14:35:39.695 DEBUG tokio-runtime-worker parachain::availability-store: [Relaychain] err=RuntimeApi(NotSupported { runtime_api_name: &quot;candidate_events&quot; })&#xD;&#xA;	2023-02-02 14:35:40.384 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0xef50450c80bce9f24beba006cb0404d40866241e88a90751bc9c7a037e6fe968 block_number=1536&#xD;&#xA;	2023-02-02 14:35:40.391 DEBUG tokio-runtime-worker parachain::availability-store: [Relaychain] err=RuntimeApi(NotSupported { runtime_api_name: &quot;candidate_events&quot; })&#xD;&#xA;	2023-02-02 14:35:40.549  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 235.6 bps, target=#3939537 (40 peers), best: #1626 (0xb55f…ec06), finalized #1536 (0xef50…e968), ⬇ 580.1kiB/s ⬆ 73.2kiB/s    &#xD;&#xA;	...&#xD;&#xA;	2023-02-02 14:36:00.549  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 38.4 bps, target=#3939537 (40 peers), best: #5120 (0x141b…4f75), finalized #5120 (0x141b…4f75), ⬇ 781.7kiB/s ⬆ 90.2kiB/s    &#xD;&#xA;	...&#xD;&#xA;	2023-02-02 14:36:05.550  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 243.2 bps, target=#3939537 (40 peers), best: #6336 (0x1650…9ccd), finalized #6144 (0x7f10…b7d7), ⬇ 346.3kiB/s ⬆ 78.1kiB/s&#xD;&#xA;	...&#xD;&#xA;	2023-02-02 14:36:10.550  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing  0.0 bps, target=#3939537 (40 peers), best: #6336 (0x1650…9ccd), finalized #6144 (0x7f10…b7d7), ⬇ 373.5kiB/s ⬆ 45.1kiB/s &#xD;&#xA;&#xD;&#xA;I'm use the latest version (main branch,commit:677a1a238a9592d0c8f1f0a4b7477b031da76c20) of [substrate-parachain-template][2].&#xD;&#xA;Does anyone encounter such a problem?&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/acquire-a-testnet-slot/&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-parachain-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="26895" PostHistoryTypeId="1" PostId="7038" RevisionGUID="b0e20955-c0fc-4950-9afc-d398df4801b2" CreationDate="2023-02-02T07:12:52.293" UserId="2888" Text="start parachain collator node encounter relay chain block sync problem" ContentLicense="CC BY-SA 4.0" />
  <row Id="26896" PostHistoryTypeId="3" PostId="7038" RevisionGUID="b0e20955-c0fc-4950-9afc-d398df4801b2" CreationDate="2023-02-02T07:12:52.293" UserId="2888" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26897" PostHistoryTypeId="2" PostId="7039" RevisionGUID="d448cb11-0a1e-43a9-a408-288f64ac5123" CreationDate="2023-02-02T07:35:58.590" UserId="125" Text="From substrate:&#xD;&#xA;&#xD;&#xA;https://github.dev/paritytech/substrate/blob/68d00e2d5132ef32e564e0320e89dfac57e1c46e/bin/node/runtime/src/lib.rs#L179&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size.&#xD;&#xA;const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(&#xD;&#xA;	WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),  // here&#xD;&#xA;	u64::MAX&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From cumulus:&#xD;&#xA;&#xD;&#xA;https://github.dev/paritytech/cumulus/blob/b97eb8d369e8a3e61cf7efffe184756fd75bad96/parachain-template/runtime/src/lib.rs#L220&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;We allow for .5 seconds of compute with a 12 second average block time.&#xD;&#xA;pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(&#xD;&#xA;	WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),  // here&#xD;&#xA;	polkadot_primitives::MAX_POV_SIZE as u64,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Generally, the block time for solo chains is 6s and for para chains 12s.&#xD;&#xA;&#xD;&#xA;But the block max weight of a solo chain is 4 times that of para chain, doesn't this seem reasonable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26899" PostHistoryTypeId="1" PostId="7039" RevisionGUID="d448cb11-0a1e-43a9-a408-288f64ac5123" CreationDate="2023-02-02T07:35:58.590" UserId="125" Text="`MAXIMUM_BLOCK_WEIGHT` between solo chain and para chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="26900" PostHistoryTypeId="3" PostId="7039" RevisionGUID="d448cb11-0a1e-43a9-a408-288f64ac5123" CreationDate="2023-02-02T07:35:58.590" UserId="125" Text="|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26901" PostHistoryTypeId="2" PostId="7040" RevisionGUID="fee4125a-3681-49c8-90b7-4b7b3e0a32e5" CreationDate="2023-02-02T07:47:19.207" UserId="251" Text="Polkadot has this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And I hope I can have one for my parachain.&#xD;&#xA;There is a session pallet on my parachain.&#xD;&#xA;And the session period is readable from the constant.&#xD;&#xA;&#xD;&#xA;So, I think this is possible.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NPmjo.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="26903" PostHistoryTypeId="1" PostId="7040" RevisionGUID="fee4125a-3681-49c8-90b7-4b7b3e0a32e5" CreationDate="2023-02-02T07:47:19.207" UserId="251" Text="How to implement a session progress bar for parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26904" PostHistoryTypeId="3" PostId="7040" RevisionGUID="fee4125a-3681-49c8-90b7-4b7b3e0a32e5" CreationDate="2023-02-02T07:47:19.207" UserId="251" Text="|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26905" PostHistoryTypeId="5" PostId="7016" RevisionGUID="777b764e-55fc-4682-9b46-1cecf69e0f2a" CreationDate="2023-02-02T07:51:10.957" UserId="83" Comment="Make more concise" Text="I deployed an ERC-721(NFT) contract on Moonbeam some time ago. Now I have added the NFT pallet to our Substrate-based chain. &#xD;&#xA;&#xD;&#xA;How can I migrate the data from the Moonbeam network chain data to our chain?&#xD;&#xA;&#xD;&#xA;Any suggestion helpful. Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="26906" PostHistoryTypeId="4" PostId="7016" RevisionGUID="777b764e-55fc-4682-9b46-1cecf69e0f2a" CreationDate="2023-02-02T07:51:10.957" UserId="83" Comment="Make more concise" Text="How to migrate blockchain data from Moonbeam network to a custom Substrate-based chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26907" PostHistoryTypeId="2" PostId="7041" RevisionGUID="02edb70e-dcd3-445b-bb93-aa60e74d5096" CreationDate="2023-02-02T08:07:27.717" UserId="3538" Text="I've implemented an evm-based Substrate chain (i.e. it uses the H160 address format), but when I try to open `Accounts` page on Polkadot explorer, I get this error: &#xD;&#xA;&#xD;&#xA;`Invalid AccountId provided, expected 32 bytes, found 20`&#xD;&#xA;&#xD;&#xA;[![Error screenshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Mkmeo.png&#xD;&#xA;&#xD;&#xA;I've also added my chain in the `ethereumChains.ts` file, following [this](https://github.com/polkadot-js/apps/pull/8396) PR, but still I'm getting this error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="26909" PostHistoryTypeId="1" PostId="7041" RevisionGUID="02edb70e-dcd3-445b-bb93-aa60e74d5096" CreationDate="2023-02-02T08:07:27.717" UserId="3538" Text="Invalid AccountId provided, expected 32 bytes, found 20" ContentLicense="CC BY-SA 4.0" />
  <row Id="26910" PostHistoryTypeId="3" PostId="7041" RevisionGUID="02edb70e-dcd3-445b-bb93-aa60e74d5096" CreationDate="2023-02-02T08:07:27.717" UserId="3538" Text="|substrate-node-template|account|evm|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26911" PostHistoryTypeId="2" PostId="7042" RevisionGUID="7aceadcf-4551-4316-a251-54ba8ee0f211" CreationDate="2023-02-02T08:26:39.960" UserId="377" Text="if we run a crowdloan and say hit the cap of 500k DOT are we then forced to use its entirety to bid for the slot or we can use a subset of it?&#xD;&#xA;&#xD;&#xA;In that maybe we could potentially exclude some people and reward others more." ContentLicense="CC BY-SA 4.0" />
  <row Id="26913" PostHistoryTypeId="1" PostId="7042" RevisionGUID="7aceadcf-4551-4316-a251-54ba8ee0f211" CreationDate="2023-02-02T08:26:39.960" UserId="377" Text="Can we use the partial amount of cap in crowdloan?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26914" PostHistoryTypeId="3" PostId="7042" RevisionGUID="7aceadcf-4551-4316-a251-54ba8ee0f211" CreationDate="2023-02-02T08:26:39.960" UserId="377" Text="|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26915" PostHistoryTypeId="2" PostId="7043" RevisionGUID="e69e25c8-6789-4598-afc4-a848421d3f1c" CreationDate="2023-02-02T09:04:55.520" UserId="377" Text="As you know in crowdloan we the contributor contribute from the polkadot account(1D....).&#xD;&#xA;So according to that how send the reward to the contributors native chain account(XGT...).&#xD;&#xA;&#xD;&#xA;How we basically getting the native chain address from polkadot native address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26917" PostHistoryTypeId="1" PostId="7043" RevisionGUID="e69e25c8-6789-4598-afc4-a848421d3f1c" CreationDate="2023-02-02T09:04:55.520" UserId="377" Text="How we send the crowdloan reward to the parachain wallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26918" PostHistoryTypeId="3" PostId="7043" RevisionGUID="e69e25c8-6789-4598-afc4-a848421d3f1c" CreationDate="2023-02-02T09:04:55.520" UserId="377" Text="|account|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26919" PostHistoryTypeId="2" PostId="7044" RevisionGUID="e6179566-0ae2-463a-a162-2aaaaed5f7c7" CreationDate="2023-02-02T09:06:43.987" UserId="2484" Text="I am always curious what the documentation for the storage means when I see the following.&#xD;&#xA;&#xD;&#xA;`Enumerate all elements in the map in no particular order.`&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/frame_support/pallet_prelude/struct.StorageMap.html#method.iter&#xD;&#xA;&#xD;&#xA;I assume that I can't expect a true random order here. This would simplify my use-case, but it is too good to be true.&#xD;&#xA;&#xD;&#xA;So what is the underlying order here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26921" PostHistoryTypeId="1" PostId="7044" RevisionGUID="e6179566-0ae2-463a-a162-2aaaaed5f7c7" CreationDate="2023-02-02T09:06:43.987" UserId="2484" Text="What does `no particular order` mean for storage iterations?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26922" PostHistoryTypeId="3" PostId="7044" RevisionGUID="e6179566-0ae2-463a-a162-2aaaaed5f7c7" CreationDate="2023-02-02T09:06:43.987" UserId="2484" Text="|storage|storagemap|map|random|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26923" PostHistoryTypeId="2" PostId="7045" RevisionGUID="5960dc0f-847d-46a6-98eb-46c815b0848b" CreationDate="2023-02-02T10:04:43.713" UserId="3784" Text="I tried connecting the localhost node by adding the port number along with the ip in Metamask the problem is with the chainId it shows error if i put any chain id in there and even if i define a chain id in chain_spec.rs and its still the same it says check your rpc url we cannot find chain id. Or something like that. So is it possible to connect to Metamask on localhost and if it is then how can i do it please leave some steps behind thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="26925" PostHistoryTypeId="1" PostId="7045" RevisionGUID="5960dc0f-847d-46a6-98eb-46c815b0848b" CreationDate="2023-02-02T10:04:43.713" UserId="3784" Text="How can i connect the frontier template node to my Metamask on localhost?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26926" PostHistoryTypeId="3" PostId="7045" RevisionGUID="5960dc0f-847d-46a6-98eb-46c815b0848b" CreationDate="2023-02-02T10:04:43.713" UserId="3784" Text="|frontier-node-template|metamask|chain-id|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26931" PostHistoryTypeId="2" PostId="7047" RevisionGUID="3222fd7a-22fd-4ccd-b836-d3c286f6d1d1" CreationDate="2023-02-02T10:07:48.260" UserId="380" Text="Looks like this has been [fixed](https://github.com/polkadot-js/apps/pull/8925/commits/0b305bc1c3fa1a78ef7fb76ad89a362ca82171b6) in polkadot-js.&#xD;&#xA;&#xD;&#xA;[GitHub issue](https://github.com/polkadot-js/apps/issues/8923)&#xD;&#xA;&#xD;&#xA;I'm not sure if it will be live yet but you could run the [apps](https://github.com/polkadot-js/apps) `master` branch locally to get the changes." ContentLicense="CC BY-SA 4.0" />
  <row Id="26933" PostHistoryTypeId="2" PostId="7048" RevisionGUID="215203a9-2d05-4b2a-9be7-0447df0e0c69" CreationDate="2023-02-02T10:11:39.467" UserId="139" Text="You must configure your pallet-evm with a `ChainId` which will later be used by metamask to connect to your chain. After you've set up that and successfully run your node, you need to add the network to your metamask, along with the rpc port number and chain-id. Following these steps should give  you a metamask connection. Let me know if this works out for you." ContentLicense="CC BY-SA 4.0" />
  <row Id="26937" PostHistoryTypeId="2" PostId="7050" RevisionGUID="e605de67-c7d3-4133-b26f-59e0e048df83" CreationDate="2023-02-02T11:08:13.203" UserId="3786" Text="I'm trying to implement a new consensus in Substrate.&#xD;&#xA;&#xD;&#xA;The consensus is similar to PoW but requires querying other nodes to generate the work/proof. Would implementing the PowAlgorithm trait and calling other nodes in the mine() function be a good way to implement this?&#xD;&#xA;&#xD;&#xA;I would have to query multiple nodes one after another asking for signatures to build the proof. Like in &quot;nonce mining PoW&quot;, the proof depends on the latest block hash and can be verified easily, so once it is produced it would be submitted to the network in a similar way as a nonce in traditional PoW. I would also need a way to get the list of all available trusted nodes in the network so that I can select the subset of them to ask for signatures. &#xD;&#xA;&#xD;&#xA;Where/how should I implement this in the whole Substrate framework ? Can I query peers from the PowAlgorithm trait mine() function and where should I implement the listening/answering end of such queries (I guess it would be a new message type dedicated to consensus in the outer node)?&#xD;&#xA;&#xD;&#xA;I would like to be able to do as a producer of a new block is:&#xD;&#xA; - Get the list of all nodes in the network&#xD;&#xA; - Select a subset of them with custom logic&#xD;&#xA; - Query the subset of nodes asking them for signatures (one after the other, dependency between signatures)&#xD;&#xA; - Once I have all the signatures, generate the proof from them&#xD;&#xA; - Submit the block to the network with the proof (like a nonce in PoW)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26939" PostHistoryTypeId="1" PostId="7050" RevisionGUID="e605de67-c7d3-4133-b26f-59e0e048df83" CreationDate="2023-02-02T11:08:13.203" UserId="3786" Text="PoW like custom consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="26940" PostHistoryTypeId="3" PostId="7050" RevisionGUID="e605de67-c7d3-4133-b26f-59e0e048df83" CreationDate="2023-02-02T11:08:13.203" UserId="3786" Text="|substrate-node-template|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26941" PostHistoryTypeId="5" PostId="7050" RevisionGUID="06d40a4b-e3cf-44cf-8d7c-209402f23254" CreationDate="2023-02-02T11:14:12.733" UserId="3786" Comment="added 5 characters in body; edited title" Text="I'm trying to implement a new consensus in Substrate.&#xD;&#xA;&#xD;&#xA;The consensus is similar to PoW but requires querying other nodes to generate the work/proof. Would implementing the PowAlgorithm trait and calling other nodes in the mine() function be a good way to implement this?&#xD;&#xA;&#xD;&#xA;I would have to query multiple nodes one after another asking for signatures to build the proof. Like in &quot;nonce mining PoW&quot;, the proof depends on the latest block hash and can be verified easily, so once it is produced, it would be submitted to the network in a similar way as a nonce in traditional PoW. I would also need a way to get the list of all available trusted nodes in the network, so that I can select the subset of them to ask for signatures. &#xD;&#xA;&#xD;&#xA;Where/how should I implement this in the whole Substrate framework ? Can I query peers from the PowAlgorithm trait mine() function and where should I implement the listening/answering end of such queries (I guess it would be a new message type dedicated to consensus in the outer node)?&#xD;&#xA;&#xD;&#xA;What I would like to be able to do as a producer of a new block is:&#xD;&#xA; - Get the list of all nodes in the network&#xD;&#xA; - Select a subset of them with custom logic&#xD;&#xA; - Query the subset of nodes asking them for signatures (one after the other, dependency between signatures)&#xD;&#xA; - Once I have all the signatures, generate the proof from them&#xD;&#xA; - Submit the block to the network with the proof (like a nonce in PoW)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26942" PostHistoryTypeId="4" PostId="7050" RevisionGUID="06d40a4b-e3cf-44cf-8d7c-209402f23254" CreationDate="2023-02-02T11:14:12.733" UserId="3786" Comment="added 5 characters in body; edited title" Text="PoW custom consensus with remote calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="26943" PostHistoryTypeId="2" PostId="7051" RevisionGUID="ca800d36-8a11-45db-90da-f68a29a5e6cb" CreationDate="2023-02-02T11:28:55.500" UserId="2909" Text="Similar to what Purple_Turtle shared, here is a more verbose version, just find the section that talks about ChainID:&#xD;&#xA;https://medium.com/@bernardoaraujor/nft-letter-substrate-frontier-73594b1424c" ContentLicense="CC BY-SA 4.0" />
  <row Id="26945" PostHistoryTypeId="2" PostId="7052" RevisionGUID="056b99c0-21e3-4369-ba45-dfc14fa86d7c" CreationDate="2023-02-02T13:00:51.747" UserId="257" Text="Right now contract compilation and deployment results in bunch of artifacts and edits to `swanky.config.json`. I'm just curious what's recommended flow of dealing with those changes or developing smart contracts. &#xD;&#xA;&#xD;&#xA;For example deploying compiled smart contract to local swanky node for development purposes results is many changes (artifacts, config edits) which will be pushed to VCS. Is this the desired way of handling things, what's the purpose of doing so? Maybe changes should be reverted before committing ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="26947" PostHistoryTypeId="1" PostId="7052" RevisionGUID="056b99c0-21e3-4369-ba45-dfc14fa86d7c" CreationDate="2023-02-02T13:00:51.747" UserId="257" Text="Recommended way of local development flow for swanky-cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="26948" PostHistoryTypeId="3" PostId="7052" RevisionGUID="056b99c0-21e3-4369-ba45-dfc14fa86d7c" CreationDate="2023-02-02T13:00:51.747" UserId="257" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26951" PostHistoryTypeId="5" PostId="7044" RevisionGUID="188aa1c6-cbda-4bac-96be-add5e5d8618e" CreationDate="2023-02-02T13:07:22.433" UserId="2484" Comment="added 82 characters in body" Text="I am always curious what the documentation for the storage means when I see the following.&#xD;&#xA;&#xD;&#xA;`Enumerate all elements in the map in no particular order.`&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/frame_support/pallet_prelude/struct.StorageMap.html#method.iter&#xD;&#xA;&#xD;&#xA;I assume that I can't expect a true random order here. This would simplify my use-case, but it is too good to be true.&#xD;&#xA;&#xD;&#xA;So what is the underlying order here?&#xD;&#xA;&#xD;&#xA;What is the best way to get n elements out of a storage map in a random order?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26952" PostHistoryTypeId="2" PostId="7054" RevisionGUID="73935227-f10c-401a-a271-23791b831167" CreationDate="2023-02-02T13:10:13.067" UserId="225" Text="Not random.&#xD;&#xA;&#xD;&#xA;The keys used in the merkle trie result from hashing with https://paritytech.github.io/substrate/master/frame_support/trait.StorageHasher.html.&#xD;&#xA;&#xD;&#xA;So the iteration order is deterministic (just tree iteration), in the order of hashed keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="26958" PostHistoryTypeId="2" PostId="7056" RevisionGUID="4b51908f-160c-40cb-a2f2-85ea64d4f3f3" CreationDate="2023-02-02T14:23:55.737" UserId="1876" Text="Artifacts are a product of compilation, and swanky.config is a way for swanky-cli to track where those are, and which ones have been deployed and to what netwok/address, among other things.&#xD;&#xA;Ultimately, the decision what to commit to VCS is up to you, but discarding those changes and moving/deleting the artifacts might lead to unexpected behaviour. (such as swanky-cli deploying or calling the wrong contract or contract version)" ContentLicense="CC BY-SA 4.0" />
  <row Id="26960" PostHistoryTypeId="2" PostId="7057" RevisionGUID="e3e66da6-65a5-4444-8a8a-88080e316aa0" CreationDate="2023-02-02T14:24:26.393" UserId="529" Text="Is there a way in ink! to check supported contract interfaces?&#xD;&#xA;EVM has [EIP-165][1]. I know we have very few PSPs but already the interface information could be useful for PSP34/37 or say RMRK.&#xD;&#xA;&#xD;&#xA;What would be the best way forward? Create new PSP?&#xD;&#xA;If new PSP is the answer what can be used in ink! as Solidity [Type Information][2]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://eips.ethereum.org/EIPS/eip-165&#xD;&#xA;  [2]: https://docs.soliditylang.org/en/v0.8.14/units-and-global-variables.html?highlight=type#type-information" ContentLicense="CC BY-SA 4.0" />
  <row Id="26962" PostHistoryTypeId="1" PostId="7057" RevisionGUID="e3e66da6-65a5-4444-8a8a-88080e316aa0" CreationDate="2023-02-02T14:24:26.393" UserId="529" Text="Supported interfaces for ink! contracts (like EIP-165)" ContentLicense="CC BY-SA 4.0" />
  <row Id="26963" PostHistoryTypeId="3" PostId="7057" RevisionGUID="e3e66da6-65a5-4444-8a8a-88080e316aa0" CreationDate="2023-02-02T14:24:26.393" UserId="529" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26964" PostHistoryTypeId="5" PostId="7035" RevisionGUID="caaac4d6-95f6-4f80-b401-06a6fead7763" CreationDate="2023-02-02T15:09:34.573" UserId="2762" Comment="link broken" Text="I am using Substrate Connect in the browser following the [docs][1] for a custom chain spec. When I try to create a new ScProvider like the documentation suggests i get an error that I am missing a variable in the constructor.&#xD;&#xA;```&#xD;&#xA;TS2554: Expected 2-3 arguments, but got 1.&#xD;&#xA;    41 | // Create the provider for the custom chain&#xD;&#xA;    42 |     const customSpec = JSON.stringify(jsonCustomSpec);&#xD;&#xA;  &gt; 43 |     const provider = new ScProvider(customSpec);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the substrate lib the constructor code is asking for SubstrateConnect.&#xD;&#xA;Any ideas on this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/integrate-with-tools/integrate-a-light-client-node/" ContentLicense="CC BY-SA 4.0" />
  <row Id="26965" PostHistoryTypeId="2" PostId="7058" RevisionGUID="b0605171-a38a-4aca-bf0b-7eec4cd00a04" CreationDate="2023-02-02T15:48:43.687" UserId="2762" Text="You need at least the SubstrateConnect instance (And the relay chain in case of a parachain). &#xD;&#xA;&#xD;&#xA;See the example to connect to [Statemint][1]:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { ScProvider} from &quot;@polkadot/rpc-provider&quot;;&#xD;&#xA;import * as Sc from &quot;@substrate/connect&quot;;&#xD;&#xA;import { ApiPromise } from &quot;@polkadot/api&quot;;&#xD;&#xA;import jsonParachainSpec from &quot;./statemint.json&quot;;&#xD;&#xA;&#xD;&#xA; const relayProvider = new ScProvider(Sc, Sc.WellKnownChain.polkadot);&#xD;&#xA; const parachainSpec = JSON.stringify(jsonParachainSpec);&#xD;&#xA; const provider = new ScProvider(Sc, parachainSpec, relayProvider);&#xD;&#xA;      &#xD;&#xA; await provider.connect();&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/master/parachains/chain-specs/statemint.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="26967" PostHistoryTypeId="2" PostId="7059" RevisionGUID="9b7b21a4-8cc5-4d06-9c96-b115d21dd4e8" CreationDate="2023-02-02T15:52:53.630" UserId="2762" Text="It looks like is an issue with the version. See the alert from the [Substrate Contracts UI repository][1]:&#xD;&#xA;&#xD;&#xA;&gt; ❗Only compatible with nodes that use WeightV2. For older nodes use this deployment❗&#xD;&#xA;&#xD;&#xA;Try to deploy the smart contract in using this link: https://weightv1--contracts-ui.netlify.app/&#xD;&#xA;&#xD;&#xA;Or try to update your node using the last version of Polkadot. &#xD;&#xA;For testing you can try to run the last version of [substrate-contracts-node][2] and see if your contract can be deployed here.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/contracts-ui&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="26969" PostHistoryTypeId="2" PostId="7060" RevisionGUID="34e180a1-3b01-43fe-89e1-c2ff32718339" CreationDate="2023-02-02T16:09:06.043" UserId="2762" Text="See this previous answer on StackExchange explaining how to include it, or change the Chain ID: https://substrate.stackexchange.com/questions/5473/how-to-connect-substrate-node-to-metamask.&#xD;&#xA;&#xD;&#xA;But per default the frontier template has a [ChainID][1] specified, you can try this:&#xD;&#xA;&#xD;&#xA;    pub const ChainId: u64 = 42;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/frontier-node-template/blob/main/runtime/src/lib.rs#L303" ContentLicense="CC BY-SA 4.0" />
  <row Id="26971" PostHistoryTypeId="2" PostId="7061" RevisionGUID="9d35af65-9b09-4b7e-aef8-9ee7d96c561f" CreationDate="2023-02-02T16:16:20.513" UserId="2484" Text="Assume I have the following storage map:&#xD;&#xA;&#xD;&#xA;`ZAccounts: StorageMap(AccountId -&gt; AccountInfoOf&lt;T&gt;)`&#xD;&#xA;&#xD;&#xA;Is there a simple way to draw `n` AccountId's randomly. I assume that I already have a secure random source (BABE or VRF).&#xD;&#xA;&#xD;&#xA;I mean if I use `let accounts: Vec&lt;_&gt; = ZAccounts::&lt;T&gt;::iter().collect();` (to select a random subset later) I have the flaw of an unbounded vector. And additionally I have a storage read for every iteration (pretty expensive).&#xD;&#xA;&#xD;&#xA;Then there is the possibility to have a `BoundedVec`. That would be easy, but I have the constraint that there is no limit (unbounded).&#xD;&#xA;&#xD;&#xA;So maybe you know a possibility to know beforehand the key to query for a storage map based on internal storage structure with [hasher](https://paritytech.github.io/substrate/master/frame_support/trait.StorageHasher.html).&#xD;&#xA;&#xD;&#xA;Can I somehow calculate a key from storage and then map some index to it. Then I could map an index to a storage key. Like for example:&#xD;&#xA;&#xD;&#xA;`StorageMap(u128 -&gt; AccountId)`&#xD;&#xA;&#xD;&#xA;It could be done like that, but what if one (index -&gt; AccountId) is deleted. Then there are missing indices. At the end this leads to a list of active indices again (like [0, 2, 3, 4 ...] where 1 got removed for some dynamic use-case in which an AccountId should be deleted).&#xD;&#xA;&#xD;&#xA;On Zeitgeist a court system needs to get implemented. This requires to select n random jurors from an unbounded list of possible jurors. What would you propose?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26973" PostHistoryTypeId="1" PostId="7061" RevisionGUID="9d35af65-9b09-4b7e-aef8-9ee7d96c561f" CreationDate="2023-02-02T16:16:20.513" UserId="2484" Text="How to select n random keys from a `StorageMap`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26974" PostHistoryTypeId="3" PostId="7061" RevisionGUID="9d35af65-9b09-4b7e-aef8-9ee7d96c561f" CreationDate="2023-02-02T16:16:20.513" UserId="2484" Text="|storage|map|random|iteration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26975" PostHistoryTypeId="2" PostId="7062" RevisionGUID="d2ca244b-1d8c-46e8-877f-45b6727d9210" CreationDate="2023-02-02T16:21:41.413" UserId="251" Text="Maybe you need a `StorageValue&lt;Vec&lt;(Index, AccountId)&gt;&gt;`.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let v = StorageValue::get();&#xD;&#xA;let index = v[random % v.len()];&#xD;&#xA;let account_id = v[i];&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26977" PostHistoryTypeId="5" PostId="7039" RevisionGUID="1fb46869-5e80-4427-b850-48f5fb581005" CreationDate="2023-02-02T16:23:19.440" UserId="251" Comment="added 4 characters in body" Text="From Substrate:&#xD;&#xA;&#xD;&#xA;https://github.dev/paritytech/substrate/blob/68d00e2d5132ef32e564e0320e89dfac57e1c46e/bin/node/runtime/src/lib.rs#L179&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size.&#xD;&#xA;const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(&#xD;&#xA;	WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),  // here&#xD;&#xA;	u64::MAX&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From Cumulus:&#xD;&#xA;&#xD;&#xA;https://github.dev/paritytech/cumulus/blob/b97eb8d369e8a3e61cf7efffe184756fd75bad96/parachain-template/runtime/src/lib.rs#L220&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// We allow for .5 seconds of compute with a 12 second average block time.&#xD;&#xA;pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(&#xD;&#xA;	WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),  // here&#xD;&#xA;	polkadot_primitives::MAX_POV_SIZE as u64,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Generally, the block time for solo chains is 6s and for para chains 12s.&#xD;&#xA;&#xD;&#xA;But the block max weight of a solo chain is 4 times that of para chain, doesn't this seem reasonable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="26978" PostHistoryTypeId="5" PostId="7062" RevisionGUID="6b68e759-661c-46e1-9842-6d9fbc907b60" CreationDate="2023-02-02T16:36:16.083" UserId="251" Comment="added 377 characters in body" Text="Maybe you need a `StorageValue&lt;Vec&lt;(Index, AccountId)&gt;&gt;`.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let v = StorageValue::get();&#xD;&#xA;let index = v[random % v.len()];&#xD;&#xA;let account_id = v[i];&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Or `StorageMap&lt;Index, AccountId&gt;` + `StorageValue&lt;Count&gt;`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let count = StorageValue::get();&#xD;&#xA;let index = random % count;&#xD;&#xA;let account_id = StorageMap::get(index);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note you must not delete the middle item in this map(actually, it looks like a link list structure). You should use swap and delete the item from the tail (also, update the counter correctly)." ContentLicense="CC BY-SA 4.0" />
  <row Id="26979" PostHistoryTypeId="2" PostId="7063" RevisionGUID="70007d87-8306-4235-9bcb-839cd2fcb58b" CreationDate="2023-02-02T16:38:02.940" UserId="94" Text="The `Bounded` that you got there already *is* decoded.  &#xD;&#xA;What you want to do now is to decode the content of the `Bounded&lt;Call&gt;`.  &#xD;&#xA;I just tried that locally and it did not work but could work with your node.  &#xD;&#xA;The code for PolkadotJS is probably very similar to the [python-substrate-interface](https://github.com/polkascan/py-substrate-interface). The idea is to decode the `Inline` data as a `Call`. Obviously this data is generally opaque, and you need to decide on a case-by-case basis what the type of the enclosed data actually is.&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;&#xD;&#xA;URL = &quot;ws://127.0.0.1:9944&quot;&#xD;&#xA;&#xD;&#xA;substrate = SubstrateInterface(URL)&#xD;&#xA;&#xD;&#xA;data = '0x30000000000090b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22'&#xD;&#xA;substrate.decode_scale('Call', data)&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="26983" PostHistoryTypeId="2" PostId="7064" RevisionGUID="be18a22b-8e7f-4ab2-ad48-cd3cc3b835fe" CreationDate="2023-02-02T16:49:46.230" UserId="2762" Text="As @forgetso says in the comment you can decode the error index to get the number. You can use the [Substrate Utilities][1] to get the number 27, and then go to your runtime to check which pallet is the 70 in your runtime.&#xD;&#xA;Find in your node the macro `construct_runtime!` (example of the [node template][2]). You should note the the order in which pallets are listed in the construct_runtime! macro is significant. By default, the pallet index starts at zero for the first pallet and is incremented for each pallet thereafter. &#xD;&#xA;&#xD;&#xA;Because you are talking about an ink! contract probably is the pallet_contracts, so the error may be [this][3]:&#xD;&#xA;&#xD;&#xA;        /// The contract's code was found to be invalid during validation or instrumentation.&#xD;&#xA;		///&#xD;&#xA;		/// The most likely cause of this is that an API was used which is not supported by the&#xD;&#xA;		/// node. This hapens if an older node is used with a new version of ink!. Try updating&#xD;&#xA;		/// your node to the newest available version.&#xD;&#xA;		///&#xD;&#xA;		/// A more detailed error can be found on the node console if debug messages are enabled&#xD;&#xA;		/// by supplying `-lruntime::contracts=debug`.&#xD;&#xA;		CodeRejected,&#xD;&#xA;&#xD;&#xA;Check this [previous answer on StackExchange][4] for more information about get the error.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate-js-utilities/&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/src/lib.rs#L284&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/lib.rs#L866&#xD;&#xA;  [4]: https://substrate.stackexchange.com/a/6894/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="26985" PostHistoryTypeId="52" PostId="7044" RevisionGUID="45efb0e0-641a-4567-8806-b24f03e2829b" CreationDate="2023-02-02T17:06:51.667" />
  <row Id="26986" PostHistoryTypeId="2" PostId="7065" RevisionGUID="7fb7203b-0777-4914-8eec-a4508011a199" CreationDate="2023-02-02T17:23:19.930" UserId="2762" Text="If what you want is the %, then you need to get the `sessionProgress` and the `sessionLength`:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;    const progress = await api.derive.session.progress();&#xD;&#xA;    const total = progress.sessionLength;&#xD;&#xA;    const value = progress.sessionProgress;&#xD;&#xA;    console.log((value/total)*100);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="26988" PostHistoryTypeId="2" PostId="7066" RevisionGUID="18a660c9-faad-4837-8e6c-4147b1d3bffa" CreationDate="2023-02-02T17:42:20.813" UserId="2311" Text="We need to run an on-initialize function that runs for 5 to 6 seconds. The error we run into when we do this is &quot;Block production took too long&quot;. &#xD;&#xA;&#xD;&#xA;We have tried to increase the AVERAGE_ON_INITIALIZE_RATIO, NORMAL_DISPATCH_RATIO and MAXIMUM_BLOCK_WEIGHT accordingly to be able to fit it within the block length, however those don't seem to work. &#xD;&#xA;&#xD;&#xA;Are there correct values for AVERAGE_ON_INITIALIZE_RATIO, NORMAL_DISPATCH_RATIO, or MAXIMUM_BLOCK_WEIGHT to help us achieve this? For context, we are trying to run this on Kusama chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="26990" PostHistoryTypeId="1" PostId="7066" RevisionGUID="18a660c9-faad-4837-8e6c-4147b1d3bffa" CreationDate="2023-02-02T17:42:20.813" UserId="2311" Text="Our on_initialize function takes approximately 5 seconds, this breaks the parachain eventually" ContentLicense="CC BY-SA 4.0" />
  <row Id="26991" PostHistoryTypeId="3" PostId="7066" RevisionGUID="18a660c9-faad-4837-8e6c-4147b1d3bffa" CreationDate="2023-02-02T17:42:20.813" UserId="2311" Text="|parachain|kusama|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26992" PostHistoryTypeId="2" PostId="7067" RevisionGUID="512b2168-3c01-4f80-a4a6-f1e249108a7a" CreationDate="2023-02-02T18:37:19.003" UserId="2722" Text="I am trying to create a decentralized exchange (dEX) in Substrate and I have a function called `create_exchange` that has two parameters: `asset_id` and `liquidity_token_id`. I am having trouble filling the `asset_id` parameter with the desired `AssetIdOf&lt;T&gt;` value in my local Substrate environment.i dont know how can i fill the `assetId` . **how can i fill assetId in substrate?**&#xD;&#xA;&#xD;&#xA;this is my repository [Repo][1]&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;     pub fn create_exchange(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			asset_id: AssetIdOf&lt;T&gt;,&#xD;&#xA;    			liquidity_token_id: AssetIdOf&lt;T&gt;,&#xD;&#xA;    			currency_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    			token_amount: AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			// -------------------------- Validation part --------------------------&#xD;&#xA;    			let caller = ensure_signed(origin)?;&#xD;&#xA;    			ensure!(currency_amount &gt;= T::MinDeposit::get(), Error::&lt;T&gt;::CurrencyAmountTooLow);&#xD;&#xA;    			ensure!(token_amount &gt; Zero::zero(), Error::&lt;T&gt;::TokenAmountIsZero);&#xD;&#xA;    			if T::Assets::total_issuance(asset_id.clone()).is_zero() {&#xD;&#xA;    				Err(Error::&lt;T&gt;::AssetNotFound)?&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			if &lt;Exchanges&lt;T&gt;&gt;::contains_key(asset_id.clone()) {&#xD;&#xA;    				Err(Error::&lt;T&gt;::ExchangeAlreadyExists)?&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			// ----------------------- Create liquidity token ----------------------&#xD;&#xA;    			T::AssetRegistry::create(&#xD;&#xA;    				liquidity_token_id.clone(),&#xD;&#xA;    				T::pallet_account(),&#xD;&#xA;    				false,&#xD;&#xA;    				&lt;AssetBalanceOf&lt;T&gt;&gt;::one(),&#xD;&#xA;    			)&#xD;&#xA;    			.map_err(|_| Error::&lt;T&gt;::TokenIdTaken)?;&#xD;&#xA;    &#xD;&#xA;    			// -------------------------- Update storage ---------------------------&#xD;&#xA;    			let exchange = Exchange {&#xD;&#xA;    				asset_id: asset_id.clone(),&#xD;&#xA;    				currency_reserve: &lt;BalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;    				token_reserve: &lt;AssetBalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;    				liquidity_token_id: liquidity_token_id.clone(),&#xD;&#xA;    			};&#xD;&#xA;    			let liquidity_minted = T::currency_to_asset(currency_amount);&#xD;&#xA;    &#xD;&#xA;    			Self::do_add_liquidity(&#xD;&#xA;    				exchange,&#xD;&#xA;    				currency_amount,&#xD;&#xA;    				token_amount,&#xD;&#xA;    				liquidity_minted,&#xD;&#xA;    				caller,&#xD;&#xA;    			)?;&#xD;&#xA;    &#xD;&#xA;    			Self::deposit_event(Event::ExchangeCreated(asset_id, liquidity_token_id));&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_dex/blob/main/pallets/dex/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="26994" PostHistoryTypeId="1" PostId="7067" RevisionGUID="512b2168-3c01-4f80-a4a6-f1e249108a7a" CreationDate="2023-02-02T18:37:19.003" UserId="2722" Text="fill assetId in local substrate into dex pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="26995" PostHistoryTypeId="3" PostId="7067" RevisionGUID="512b2168-3c01-4f80-a4a6-f1e249108a7a" CreationDate="2023-02-02T18:37:19.003" UserId="2722" Text="|substrate-node-template|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="26996" PostHistoryTypeId="2" PostId="7068" RevisionGUID="087f32cb-aacf-4514-8aa4-2212dd24ad21" CreationDate="2023-02-02T21:02:14.020" UserId="3673" Text="I'm using zombienet v1.3.30. &#xD;&#xA;My config file is like this: &#xD;&#xA;```toml&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 100&#xD;&#xA;cumulus = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  chain_spec_path = &quot;./bin/chain/specs/collatorSpecRaw.json&quot;&#xD;&#xA;  command = &quot;./bin/chain/{{ZOMB_OS}}/parachain&quot;&#xD;&#xA;  ws_port = &quot;{{ZOMB_WS_PORT}}&quot;&#xD;&#xA;```&#xD;&#xA;I see that the parachain id is set with `id = 100` in the parachains heading, but my `parachain` node binary doesn't support the flag `--parachain-id` so it fails to launch the collator.&#xD;&#xA;```&#xD;&#xA;error: Found argument '--parachain-id' which wasn't expected, or isn't valid in this context&#xD;&#xA;``` &#xD;&#xA;The para id is already in the chain spec, so I was wondering if there's a way to remove the flag rather than override it? &#xD;&#xA;Otherwise I guess I'll have to try older zombienet versions or rebuild the current one without it." ContentLicense="CC BY-SA 4.0" />
  <row Id="26998" PostHistoryTypeId="1" PostId="7068" RevisionGUID="087f32cb-aacf-4514-8aa4-2212dd24ad21" CreationDate="2023-02-02T21:02:14.020" UserId="3673" Text="Remove --parachain-id flag from zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="26999" PostHistoryTypeId="3" PostId="7068" RevisionGUID="087f32cb-aacf-4514-8aa4-2212dd24ad21" CreationDate="2023-02-02T21:02:14.020" UserId="3673" Text="|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27000" PostHistoryTypeId="2" PostId="7069" RevisionGUID="a25cb60b-63e4-4441-97c6-3b46ae45f568" CreationDate="2023-02-02T21:11:14.860" UserId="279" Text="the flag for the parachain is `cumulus_based`. Should work with this config.&#xD;&#xA;&#xD;&#xA;Thanks!!&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 100&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  chain_spec_path = &quot;./bin/chain/specs/collatorSpecRaw.json&quot;&#xD;&#xA;  command = &quot;./bin/chain/{{ZOMB_OS}}/parachain&quot;&#xD;&#xA;  ws_port = &quot;{{ZOMB_WS_PORT}}&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27002" PostHistoryTypeId="2" PostId="7070" RevisionGUID="5a482958-68e0-48cc-8af4-e6fe68fc6569" CreationDate="2023-02-02T22:31:26.737" UserId="73" Text="&gt; Generally, the block time for solo chains is 6s and for para chains 12s.&#xD;&#xA;&#xD;&#xA;This is the first misunderstanding, this is the slot duration aka the interval in that your chain is building blocks. For solo chains you can use whatever value you want as slot duration. You just need to ensure that this time is bigger than the block time and still leaves enough time to propagate the block in the network. For Parachains indeed the slot duration isn't currently changeable. In the future you will be able to change this when asynchronous backing is implemented.&#xD;&#xA;&#xD;&#xA;The block time is the actual time the block can take to import on your reference hardware. For Parachains this is currently set to 500ms to ensure that a PoV can be build, send to relay chain validators and validated on these relay chain validators. The block time can also be increased with asynchronous backing, but there will also be some upper maximum set by the relay chain.&#xD;&#xA;&#xD;&#xA;&gt; But the block max weight of a solo chain is 4 times that of para chain, doesn't this seem reasonable?&#xD;&#xA;&#xD;&#xA;Yes that is reasonable. Given what I have written above, it hopefully explains you why. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27004" PostHistoryTypeId="5" PostId="7066" RevisionGUID="4a6bbaf4-3513-4fd5-be4e-487bc193df66" CreationDate="2023-02-03T02:12:40.500" UserId="251" Comment="added 12 characters in body" Text="We need to run an on-initialize function that runs for 5 to 6 seconds. The error we run into when we do this is &quot;Block production took too long&quot;. &#xD;&#xA;&#xD;&#xA;We have tried to increase the `AVERAGE_ON_INITIALIZE_RATIO`, `NORMAL_DISPATCH_RATIO` and `MAXIMUM_BLOCK_WEIGHT` accordingly to be able to fit it within the block length, however those don't seem to work. &#xD;&#xA;&#xD;&#xA;Are there correct values for `AVERAGE_ON_INITIALIZE_RATIO`, `NORMAL_DISPATCH_RATIO`, or `MAXIMUM_BLOCK_WEIGHT` to help us achieve this? For context, we are trying to run this on Kusama chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="27005" PostHistoryTypeId="2" PostId="7071" RevisionGUID="8dcc6e29-cf92-4520-a592-e2b29a1044eb" CreationDate="2023-02-03T05:52:15.093" UserId="684" Text="If we have the storage map `DummyStorageMap` in `pallet-example`&#xD;&#xA;&#xD;&#xA;And we read its value under the key `key` by calling `DummyStorageMap::&lt;T&gt;::get(key)` in the runtime chain extension (https://paritytech.github.io/substrate/master/pallet_contracts/chain_extension/trait.ChainExtension.html#) , **should we be charging weight** (https://paritytech.github.io/substrate/master/pallet_contracts/chain_extension/struct.Environment.html#method.charge_weight)?&#xD;&#xA;&#xD;&#xA;I know we are obviously supposed to charge weight if we execute an extrinsic of a pallet in the runtime chain extension, but what about if we read a storage map / storage value?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;@bkchr :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27007" PostHistoryTypeId="1" PostId="7071" RevisionGUID="8dcc6e29-cf92-4520-a592-e2b29a1044eb" CreationDate="2023-02-03T05:52:15.093" UserId="684" Text="In the runtime chain extension, should we be charging weight if we are reading a `StorageMap`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27008" PostHistoryTypeId="3" PostId="7071" RevisionGUID="8dcc6e29-cf92-4520-a592-e2b29a1044eb" CreationDate="2023-02-03T05:52:15.093" UserId="684" Text="|ink|runtime|weight|pallet-contracts|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27009" PostHistoryTypeId="2" PostId="7072" RevisionGUID="16b64e67-d8ab-4f69-b1ec-deef200cb8d5" CreationDate="2023-02-03T06:03:01.940" UserId="2844" Text="while contract instantiation inside constructor new function parameter, we can find `{Contract}Ref` and `Hash`. If new function accepts {Contract}Ref &#xD;&#xA;as parameter, then type is `AccountId`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;and if new function accepts Hash type is `Hash`. &#xD;&#xA;I am confused about this. How they work and what is the difference between them using as `{ContractRef}` and `Hash`&#xD;&#xA;&#xD;&#xA;    #[ink(constructor)]&#xD;&#xA;     pub fn new(accumulator: AccumulatorRef) -&gt; Self {}&#xD;&#xA;&#xD;&#xA;    #[ink(constructor)]&#xD;&#xA;    pub fn new(accumulator: Hash) -&gt; Self {}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GYNA3.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27011" PostHistoryTypeId="1" PostId="7072" RevisionGUID="16b64e67-d8ab-4f69-b1ec-deef200cb8d5" CreationDate="2023-02-03T06:03:01.940" UserId="2844" Text="Difference between {Contract}Ref and Hash?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27012" PostHistoryTypeId="3" PostId="7072" RevisionGUID="16b64e67-d8ab-4f69-b1ec-deef200cb8d5" CreationDate="2023-02-03T06:03:01.940" UserId="2844" Text="|ink|smart-contract|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27013" PostHistoryTypeId="2" PostId="7073" RevisionGUID="07c62899-260c-45bc-84ec-45c67f8aaf17" CreationDate="2023-02-03T06:28:14.240" UserId="3794" Text="I get this error running swanky contract tx flipper flip -a alice -g 1000000000. I have increased the gas, I have no clue what else to try. Also is there a place to check for { Err: { Module: { index: '7', error: '0x02000000' } } } like this? Thanks&#xD;&#xA;&#xD;&#xA;2023-02-03 01:14:43        API/INIT: RPC methods not decorated: transaction_unstable_submitAndWatch, transaction_unstable_unwatch&#xD;&#xA;✔ Initialising OK&#xD;&#xA;✔ Getting metadata OK&#xD;&#xA;Gas required: 10,000,000,000&#xD;&#xA;Tx result:&#xD;&#xA;{&#xD;&#xA;  dispatchError: { Module: { index: '7', error: '0x02000000' } },&#xD;&#xA;  dispatchInfo: { weight: '1,449,232,000', class: 'Normal', paysFee: 'Yes' },&#xD;&#xA;  events: [&#xD;&#xA;    { phase: [Object], event: [Object], topics: [] },&#xD;&#xA;    { phase: [Object], event: [Object], topics: [] },&#xD;&#xA;    { phase: [Object], event: [Object], topics: [] }&#xD;&#xA;  ],&#xD;&#xA;  internalError: undefined,&#xD;&#xA;  status: {&#xD;&#xA;    Finalized: '0x15e61e58cd413d8a7eaf72c39398a6829b3c793cecaff79ecc4e993a16320a78'&#xD;&#xA;  }&#xD;&#xA;}" ContentLicense="CC BY-SA 4.0" />
  <row Id="27015" PostHistoryTypeId="1" PostId="7073" RevisionGUID="07c62899-260c-45bc-84ec-45c67f8aaf17" CreationDate="2023-02-03T06:28:14.240" UserId="3794" Text="Error running swanky suite contract query" ContentLicense="CC BY-SA 4.0" />
  <row Id="27016" PostHistoryTypeId="3" PostId="7073" RevisionGUID="07c62899-260c-45bc-84ec-45c67f8aaf17" CreationDate="2023-02-03T06:28:14.240" UserId="3794" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27017" PostHistoryTypeId="2" PostId="7074" RevisionGUID="d754abf1-9fbe-4576-928c-0e043dfe9d13" CreationDate="2023-02-03T07:10:53.930" UserId="299" Text="official configuration: https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#requirements&#xD;&#xA;&#xD;&#xA;We opened the appropriate server on aws according to the requirements in the official documentation.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;But when I did benchmark(`polkadot` &amp; `kusama`) on the new machine , only memery met the requirements, all other metrics failed.&#xD;&#xA;&#xD;&#xA;this is my benchmark log:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vWNN1.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ab2fS.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="27019" PostHistoryTypeId="1" PostId="7074" RevisionGUID="d754abf1-9fbe-4576-928c-0e043dfe9d13" CreationDate="2023-02-03T07:10:53.930" UserId="299" Text="`polkadot benchmark machine` does not pass (official documentation recommended configuration)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27020" PostHistoryTypeId="3" PostId="7074" RevisionGUID="d754abf1-9fbe-4576-928c-0e043dfe9d13" CreationDate="2023-02-03T07:10:53.930" UserId="299" Text="|validator|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27021" PostHistoryTypeId="2" PostId="7075" RevisionGUID="f80d76e9-1eaf-44ca-8fb5-c6f4c880c48a" CreationDate="2023-02-03T08:07:24.753" UserId="3795" Text="I think that balance of Sovereign accounton Relay chain should be total token supply for that parachain?&#xD;&#xA;&#xD;&#xA;Basically what's the relation between soverign account balance and parachain? &#xD;&#xA;&#xD;&#xA;How does it affected by XCM operatipn to transfer asset ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27023" PostHistoryTypeId="1" PostId="7075" RevisionGUID="f80d76e9-1eaf-44ca-8fb5-c6f4c880c48a" CreationDate="2023-02-03T08:07:24.753" UserId="3795" Text="What is the purpose of Sovereign account? How is the balance of Soverign for a Parachain decided or calculated?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27024" PostHistoryTypeId="3" PostId="7075" RevisionGUID="f80d76e9-1eaf-44ca-8fb5-c6f4c880c48a" CreationDate="2023-02-03T08:07:24.753" UserId="3795" Text="|xcm|relay-chain|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27025" PostHistoryTypeId="5" PostId="7075" RevisionGUID="63d15174-7519-4232-a9ab-539b20a0f55f" CreationDate="2023-02-03T08:30:29.117" UserId="251" Comment="added 1 character in body" Text="I think that balance of Sovereign account on Relay chain should be total token supply for that parachain?&#xD;&#xA;&#xD;&#xA;Basically what's the relation between soverign account balance and parachain? &#xD;&#xA;&#xD;&#xA;How does it affected by XCM operatipn to transfer asset ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27026" PostHistoryTypeId="2" PostId="7076" RevisionGUID="400af120-55f6-4e36-82b0-e81176637c83" CreationDate="2023-02-03T08:33:57.627" UserId="251" Text="To my understanding.&#xD;&#xA;&#xD;&#xA;It's because the Substrate uses the `Origin` design.&#xD;&#xA;&#xD;&#xA;Sovereign represents the `Origin` of a chain.&#xD;&#xA;&#xD;&#xA;Imagine you send an HRMP channel opening request. Who should be the sender? Your account? Apparently not. It should be the account of the parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="27028" PostHistoryTypeId="2" PostId="7077" RevisionGUID="1fe4e225-17e7-4c4c-b129-d9f8b3b63820" CreationDate="2023-02-03T08:38:49.313" UserId="1793" Text="I am trying to figure out correct way how to type MultiLocation type&#xD;&#xA;&#xD;&#xA;I thought that I would do&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const location: MultiLocation = {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: {&#xD;&#xA;    x1: { generalKey: &quot;0x0001&quot; }&#xD;&#xA;  }&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but this does not work cause parents is **u8** and number does not work there etc&#xD;&#xA;So I tried this solution which works&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const loc: MultiLocation = api.createType(&#xD;&#xA;  &quot;MultiLocation&quot;,&#xD;&#xA;  JSON.parse(&#xD;&#xA;    JSON.stringify({&#xD;&#xA;      parents: &quot;0&quot;,&#xD;&#xA;      interior: {&#xD;&#xA;        x1: { generalKey: &quot;0x0001&quot; }&#xD;&#xA;      }&#xD;&#xA;    })&#xD;&#xA;  )&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;but I do not like this solution. IS there a correct way how to type this ? &#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="27030" PostHistoryTypeId="1" PostId="7077" RevisionGUID="1fe4e225-17e7-4c4c-b129-d9f8b3b63820" CreationDate="2023-02-03T08:38:49.313" UserId="1793" Text="MultiLocation type polkadot js" ContentLicense="CC BY-SA 4.0" />
  <row Id="27031" PostHistoryTypeId="3" PostId="7077" RevisionGUID="1fe4e225-17e7-4c4c-b129-d9f8b3b63820" CreationDate="2023-02-03T08:38:49.313" UserId="1793" Text="|polkadot-js|typescript|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27032" PostHistoryTypeId="2" PostId="7078" RevisionGUID="8cbbfb1d-57b6-48d7-9c0d-5ae96a2c4ba0" CreationDate="2023-02-03T09:53:21.640" UserId="567" Text="In pallet_contracts you have a **two-step deployment of contracts**:&#xD;&#xA;&#xD;&#xA;The contract code (Wasm blob) and the contract address + its storage are decoupled from each other. To deploy a non-existing contract on-chain:&#xD;&#xA;&#xD;&#xA; - First, upload the Wasm contract on-chain (every contract Wasm code has a `code_hash` as an identifier).&#xD;&#xA; - Second, instantiate the contract - it will create an `AccountId` and storage for that contract.&#xD;&#xA; - Anyone can instantiate a new contract based on its `code_hash`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So when you want to invoke contracts instances inside a contract you need to provide the code_hash of this contract (it should have previously uploaded on chain). It basically just creates a new `AccountId` referencing this contract Hash.&#xD;&#xA;&#xD;&#xA;ContractRef however is just an `AccountId` (so a contract instance not a wasm blob stored and chain) and its callable messages functions that can be used for cross-contract calls. It is the equivalent of [wrapper in OpenBrush](https://docs.rs/openbrush/latest/openbrush/attr.wrapper.html)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27034" PostHistoryTypeId="5" PostId="7077" RevisionGUID="fd4885c3-d739-4b95-8fe0-ac5dc2b7d68f" CreationDate="2023-02-03T12:36:07.140" UserId="1793" Comment="added 58 characters in body" Text="I am trying to figure out correct way how to type MultiLocation type&#xD;&#xA;&#xD;&#xA;I thought that I would do&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import {MultiLocation} from &quot;@polkadot/types/interfaces&quot;&#xD;&#xA;const location: MultiLocation = {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: {&#xD;&#xA;    x1: { generalKey: &quot;0x0001&quot; }&#xD;&#xA;  }&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but this does not work cause parents is **u8** and number does not work there etc&#xD;&#xA;So I tried this solution which works&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const loc: MultiLocation = api.createType(&#xD;&#xA;  &quot;MultiLocation&quot;,&#xD;&#xA;  JSON.parse(&#xD;&#xA;    JSON.stringify({&#xD;&#xA;      parents: &quot;0&quot;,&#xD;&#xA;      interior: {&#xD;&#xA;        x1: { generalKey: &quot;0x0001&quot; }&#xD;&#xA;      }&#xD;&#xA;    })&#xD;&#xA;  )&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;but I do not like this solution. IS there a correct way how to type this ? &#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="27036" PostHistoryTypeId="2" PostId="7079" RevisionGUID="a2e993af-070d-4b92-b864-fb9d19676ae3" CreationDate="2023-02-03T13:57:50.680" UserId="73" Text="If you are not doing complex calculations in your runtime, most of the time the storage reading/writing should dominate your weight. With 2D weights which also include the increase of the proof size, reading storage will be more important to your weight calculation. &#xD;&#xA;&#xD;&#xA;So, yes you need to charge weight for only reading. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27047" PostHistoryTypeId="2" PostId="7082" RevisionGUID="c496cd6f-5b63-4576-b8a4-c5d5778a5c23" CreationDate="2023-02-03T14:58:50.713" UserId="1786" Text="So you are very close to the correct answer. Using createType will automically set the type reference to the interface you assign. So the correct code here in typescript would be:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const loc = api.createType(&#xD;&#xA;    &quot;MultiLocation&quot;,&#xD;&#xA;	{&#xD;&#xA;		parents: &quot;0&quot;,&#xD;&#xA;		interior: {&#xD;&#xA;			x1: { generalKey: &quot;0x0001&quot; }&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then if you want the JSON value back:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;console.log(loc.toJSON());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27049" PostHistoryTypeId="50" PostId="6574" RevisionGUID="f6435840-412f-48bc-85dc-714f8da4965e" CreationDate="2023-02-03T15:02:30.243" UserId="-1" />
  <row Id="27050" PostHistoryTypeId="2" PostId="7083" RevisionGUID="97b5c8d0-8c3a-4269-ad69-167231b3a91a" CreationDate="2023-02-03T15:34:12.190" UserId="3327" Text="I am writing a custom pallet for distribution of rewards to different stake holders. The idea is to distribute block production reward in the stakeholders of my system and a portion it will go to the treasury. &#xD;&#xA;&#xD;&#xA;I wanted to know the kusama mechanisim/pallet/code for distribution of reward to get an idea? Can any one please point me to the exact pallet in the kusama code base that is responsible for distribution of block reward on kusama network." ContentLicense="CC BY-SA 4.0" />
  <row Id="27052" PostHistoryTypeId="1" PostId="7083" RevisionGUID="97b5c8d0-8c3a-4269-ad69-167231b3a91a" CreationDate="2023-02-03T15:34:12.190" UserId="3327" Text="What is the kusama block production reward distribution mechanism?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27053" PostHistoryTypeId="3" PostId="7083" RevisionGUID="97b5c8d0-8c3a-4269-ad69-167231b3a91a" CreationDate="2023-02-03T15:34:12.190" UserId="3327" Text="|kusama|pallet-treasury|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27054" PostHistoryTypeId="2" PostId="7084" RevisionGUID="51969cae-a5f3-460d-b8eb-6505f61a7f8e" CreationDate="2023-02-03T16:00:09.247" UserId="251" Text="Basically,&#xD;&#xA;&#xD;&#xA;1. A validator produces a block and then rewards him with 20 points https://github.com/paritytech/substrate/blob/8186c519a861ea519ed3dc4391f6e13f64300ce6/frame/staking/src/pallet/impls.rs#L1225&#xD;&#xA;2. Compute total payout here https://github.com/paritytech/substrate/blob/8186c519a861ea519ed3dc4391f6e13f64300ce6/frame/staking/src/lib.rs#L850&#xD;&#xA;3. Distribute the reward base on the points here https://github.com/paritytech/substrate/blob/8186c519a861ea519ed3dc4391f6e13f64300ce6/frame/staking/src/pallet/impls.rs#L192-L194" ContentLicense="CC BY-SA 4.0" />
  <row Id="27056" PostHistoryTypeId="50" PostId="6562" RevisionGUID="871090d9-5ad9-45b2-87f8-72fedf61c67c" CreationDate="2023-02-03T16:03:30.427" UserId="-1" />
  <row Id="27059" PostHistoryTypeId="52" PostId="7077" RevisionGUID="ef90127c-48d9-44b3-8eda-3bf02b0290ac" CreationDate="2023-02-03T16:41:34.250" />
  <row Id="27060" PostHistoryTypeId="5" PostId="7050" RevisionGUID="c8a5d8ac-6780-44a7-9343-bac0a55b40ca" CreationDate="2023-02-03T17:02:04.557" UserId="3786" Comment="deleted 113 characters in body" Text="I'm trying to implement a new consensus in Substrate.&#xD;&#xA;&#xD;&#xA;The consensus is similar to PoW but requires querying other nodes to generate the work/proof. Would implementing the PowAlgorithm trait and calling other nodes in the mine() function be a good way to implement this?&#xD;&#xA;&#xD;&#xA;I would have to query multiple nodes one after another asking for signatures to build the proof. Like in &quot;nonce mining PoW&quot;, the proof depends on the latest block hash and can be verified easily, so once it is produced, it would be submitted to the network in a similar way as a nonce in traditional PoW.&#xD;&#xA;&#xD;&#xA;Where/how should I implement this in the whole Substrate framework ? Can I query peers from the PowAlgorithm trait mine() function and where should I implement the listening/answering end of such queries (I guess it would be a new custom rpc)? And what is the method to call a specific node RPC from another substrate node ?&#xD;&#xA;&#xD;&#xA;What I would like to be able to do as a producer of a new block is:&#xD;&#xA; - Get the list of all nodes in the network&#xD;&#xA; - Select a subset of them with custom logic&#xD;&#xA; - Query the subset of nodes asking them for signatures (one after the other, dependency between signatures)&#xD;&#xA; - Once I have all the signatures, generate the proof from them&#xD;&#xA; - Submit the block to the network with the proof (like a nonce in PoW)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27061" PostHistoryTypeId="50" PostId="4643" RevisionGUID="3918dcd7-5a9d-4b94-ab0c-59c7afc7cb1e" CreationDate="2023-02-03T17:05:20.713" UserId="-1" />
  <row Id="27062" PostHistoryTypeId="2" PostId="7086" RevisionGUID="7586bc3c-27ba-4463-ad21-a32670aceab5" CreationDate="2023-02-03T17:55:10.253" UserId="3793" Text="Hey thank you everyone the problem was that i thought my chain was running on the port 9944 which in my case was not right so what i did was simply specify a port while starting the chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="27065" PostHistoryTypeId="2" PostId="7087" RevisionGUID="e48e6615-ed4d-488f-bf0c-17b3765ec7d1" CreationDate="2023-02-03T20:12:42.010" UserId="1811" Text="How can I convert a usize to u32?&#xD;&#xA;&#xD;&#xA;For example I want to store the length of a Vector (usize) to a variable u32&#xD;&#xA;I tried&#xD;&#xA; i32::from(v) // or v.into().   where v is the length of the vector but errored&#xD;&#xA;&#xD;&#xA;I tried v as u32 and it compiles fine but I am interested in finding the correct way of doing this as this https://stackoverflow.com/questions/28273169/how-do-i-convert-between-numeric-types-safely-and-idiomatically&#xD;&#xA;suggests that generally speaking using as instead of from should be avoided&#xD;&#xA;&#xD;&#xA;However trying to use from in ink! errors I am guessing because of no std access&#xD;&#xA;&#xD;&#xA;Also looking at similar posts like https://substrate.stackexchange.com/questions/210/how-to-convert-vecu8-to-u32-in-substrate-runtime&#xD;&#xA;I can see that core::str::from_utf8 was used for a different conversion&#xD;&#xA;&#xD;&#xA;So my questions are:&#xD;&#xA;&#xD;&#xA;Q1: how to convert usize to u32 &#xD;&#xA;&#xD;&#xA;Q2: where to read more about conversions between types in ink! &#xD;&#xA;e.g. read about examples similar to core:: above&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27067" PostHistoryTypeId="1" PostId="7087" RevisionGUID="e48e6615-ed4d-488f-bf0c-17b3765ec7d1" CreationDate="2023-02-03T20:12:42.010" UserId="1811" Text="How to convert usize to u32 in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="27068" PostHistoryTypeId="3" PostId="7087" RevisionGUID="e48e6615-ed4d-488f-bf0c-17b3765ec7d1" CreationDate="2023-02-03T20:12:42.010" UserId="1811" Text="|ink|smart-contract|convert|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27071" PostHistoryTypeId="6" PostId="7021" RevisionGUID="4a8f74d9-1692-4f2e-acc8-26c1bbf2d7d6" CreationDate="2023-02-03T23:18:58.170" UserId="73" Comment="edited tags" Text="|frame|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27072" PostHistoryTypeId="2" PostId="7088" RevisionGUID="50b53457-c6f3-42fb-8110-c657a21e25b3" CreationDate="2023-02-04T03:02:42.277" UserId="2844" Text="Basically, using binary `as` operator to convert from one type to another is common way. In case of `usize`, if `usize` value is greater than max value of u32, then it will cause panic at runtime. To handle this safely, Rust also offers traits that facilitate type conversions upon implementation like [this in the under `convert` model of rust std](https://doc.rust-lang.org/std/convert/index.html).&#xD;&#xA;&#xD;&#xA;[practice reference](https://github.com/123oli/rustlings-rust/tree/main/exercises/conversions)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27074" PostHistoryTypeId="2" PostId="7089" RevisionGUID="32160a3c-a1ed-40b7-a71f-e0453e0b6fb0" CreationDate="2023-02-04T05:36:45.090" UserId="3070" Text="We are following the polkadot{.js} [docs][1] on TypeScript user generated for Chain modules. We are trying to get our custom chain module types into Typescript. We can generate fine however the generated files wont compile. They have hundreds of errors. like: &#xD;&#xA;```&#xD;&#xA;Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;```&#xD;&#xA;and &#xD;&#xA;```&#xD;&#xA; Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;```&#xD;&#xA;has anyone done this. the docs seam like they are out of date and the example is over a year old.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/typegen/" ContentLicense="CC BY-SA 4.0" />
  <row Id="27076" PostHistoryTypeId="1" PostId="7089" RevisionGUID="32160a3c-a1ed-40b7-a71f-e0453e0b6fb0" CreationDate="2023-02-04T05:36:45.090" UserId="3070" Text="Errors on generated code from Typegen" ContentLicense="CC BY-SA 4.0" />
  <row Id="27077" PostHistoryTypeId="3" PostId="7089" RevisionGUID="32160a3c-a1ed-40b7-a71f-e0453e0b6fb0" CreationDate="2023-02-04T05:36:45.090" UserId="3070" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27078" PostHistoryTypeId="2" PostId="7090" RevisionGUID="ec1a0980-cdaf-48b9-8372-2d30581845a6" CreationDate="2023-02-04T08:50:31.370" UserId="251" Text="I want to point out that:&#xD;&#xA;&#xD;&#xA;`as` won't cause a panic. It just loses some precision. https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2021&amp;gist=1cf0b2dc9955ef9d6a54c7c95998f331&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You should never not do this, and you need to write some logic to handle this. Something like:&#xD;&#xA;```rs&#xD;&#xA;if usize_v as u128 &gt; u32_v as u128 { ... } else { ... }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But if your logic doesn't care about the precision losses. Or you know the `usize` value is always smaller than the `u32::MAX`. Just use `as`." ContentLicense="CC BY-SA 4.0" />
  <row Id="27080" PostHistoryTypeId="2" PostId="7091" RevisionGUID="3678b08f-9cf5-4ae9-ab9f-0f539d608833" CreationDate="2023-02-04T13:14:23.783" UserId="3798" Text="Like if I were to add some custom logic and checks to ensure only certain kind of blocks are produced by the validators or only those blocks that contain a certain size of data are produced then where in code should I look for or what files should I change?&#xD;&#xA;&#xD;&#xA;I tried looking up at the BABE-pallet but it only contained logic regarding validator selection and stuff.&#xD;&#xA;&#xD;&#xA;I want to know where this block production/building takes place in code and how I can modify that logic to allow only certain blocks to be added by validators." ContentLicense="CC BY-SA 4.0" />
  <row Id="27082" PostHistoryTypeId="1" PostId="7091" RevisionGUID="3678b08f-9cf5-4ae9-ab9f-0f539d608833" CreationDate="2023-02-04T13:14:23.783" UserId="3798" Text="How and where does a block production take place?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27083" PostHistoryTypeId="3" PostId="7091" RevisionGUID="3678b08f-9cf5-4ae9-ab9f-0f539d608833" CreationDate="2023-02-04T13:14:23.783" UserId="3798" Text="|consensus|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27084" PostHistoryTypeId="2" PostId="7092" RevisionGUID="97260a5f-71eb-44e3-828d-cbb4bb8a4f6c" CreationDate="2023-02-04T14:29:35.320" UserId="3346" Text="SOLVED! Open the Nginx config for the site…&#xD;&#xA;sudo nano /etc/nginx/sites-available/MYSITE&#xD;&#xA;&#xD;&#xA;Erase EVERYTHING in the file (yes, everything) and set it back to just:&#xD;&#xA;&#xD;&#xA;server {&#xD;&#xA;  server_name MYSITE;&#xD;&#xA;&#xD;&#xA;  location / {&#xD;&#xA;    proxy_buffers 16 4k;&#xD;&#xA;    proxy_buffer_size 2k;&#xD;&#xA;    proxy_pass http://localhost:MY-WS-PORT;&#xD;&#xA;    proxy_http_version 1.1;&#xD;&#xA;    proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;    proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;    proxy_set_header Host $host;&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;THEN…. Re-engage certbot…&#xD;&#xA;&#xD;&#xA;certbot --nginx&#xD;&#xA;&#xD;&#xA;Finish your certbot prompts and you are good to go! &#xD;&#xA;&#xD;&#xA;Nginx Config FIRST, Certbot SECOND." ContentLicense="CC BY-SA 4.0" />
  <row Id="27086" PostHistoryTypeId="2" PostId="7093" RevisionGUID="3124e3f4-e884-4d6b-9338-b71be48c6b83" CreationDate="2023-02-04T14:31:55.233" UserId="3346" Text="SOLVED - it turns out that the dependency errors do not actually affect the running or performance of the UI. Ignore them and proceed." ContentLicense="CC BY-SA 4.0" />
  <row Id="27088" PostHistoryTypeId="2" PostId="7094" RevisionGUID="45b05a36-0ecf-47f9-ac75-878dfc33319f" CreationDate="2023-02-04T14:36:09.653" UserId="3346" Text="This solutions is the same as for this question: https://substrate.stackexchange.com/questions/6895/problem-connecting-digital-ocean-rpc-node-to-polkadot-js-nginx-configuration-pr/7092#7092&#xD;&#xA;&#xD;&#xA;**SOLVED!** Open the Nginx config for the site… sudo nano /etc/nginx/sites-available/MYSITE&#xD;&#xA;&#xD;&#xA;Erase EVERYTHING in the file (yes, everything) and set it back to just:&#xD;&#xA;&#xD;&#xA;server { server_name MYSITE;&#xD;&#xA;&#xD;&#xA;location / { proxy_buffers 16 4k; proxy_buffer_size 2k; proxy_pass http://localhost:MY-WS-PORT; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection &quot;Upgrade&quot;; proxy_set_header Host $host; } }&#xD;&#xA;&#xD;&#xA;THEN…. Re-engage certbot…&#xD;&#xA;&#xD;&#xA;certbot --nginx&#xD;&#xA;&#xD;&#xA;Finish your certbot prompts and you are good to go!&#xD;&#xA;&#xD;&#xA;Nginx Config FIRST, Certbot SECOND." ContentLicense="CC BY-SA 4.0" />
  <row Id="27090" PostHistoryTypeId="50" PostId="4426" RevisionGUID="e326d67e-c8b0-4631-8b00-98749c5c75cd" CreationDate="2023-02-04T23:05:40.643" UserId="-1" />
  <row Id="27096" PostHistoryTypeId="5" PostId="7038" RevisionGUID="480fa3b4-be1d-4f82-99d8-fd78a3926992" CreationDate="2023-02-05T10:44:22.293" UserId="170" Comment="edit format" Text="I make a parachain rococo test net practice following [this tutorial][1]. But I encounter issue after start collator node: &#xD;&#xA;&#xD;&#xA;    [Relaychain] cannot query the runtime API version: UnknownBlock: State already discarded for 0xb5ca6f77cde65f43b7dc8e2f551b6ff36327126392d08a99409531df0e7c0e1c&#xD;&#xA;&#xD;&#xA;after a while, the relay chain block sync is not working. the detail logs are bellow:&#xD;&#xA;&#xD;&#xA;    2023-02-02 14:35:23.179  INFO main sc_cli::runner: Parachain Collator Template    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner: ✌️  version 0.1.0-677a1a238a9    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner: ❤️  by Anonymous, 2020-2023    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner:  Chain specification: Bill Parachain    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner:   Node name: undesirable-hole-5658    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner:  Database: RocksDb at data/chains/billp/db/full    &#xD;&#xA;	2023-02-02 14:35:23.180  INFO main sc_cli::runner: ⛓  Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)    &#xD;&#xA;	2023-02-02 14:35:27.753  INFO main parachain_template_node::command: Parachain id: Id(4221)    &#xD;&#xA;	2023-02-02 14:35:27.753  INFO main parachain_template_node::command: Parachain Account: 5Ec4AhPCKCoMsQQ12wDRHFXGije6QtbrrQBNp8HtLMhwWttY    &#xD;&#xA;	2023-02-02 14:35:27.753  INFO main parachain_template_node::command: Parachain genesis state: 0x00000000000000000000000000000000000000000000000000000000000000000083eaa934f8e151ec6bffc023f7c16ea71267b0c807be2ca1f19754c7b44ff1d703170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;	2023-02-02 14:35:27.753  INFO main parachain_template_node::command: Is collating: yes    &#xD;&#xA;	2023-02-02 14:35:28.530  INFO main sc_service::client::client: [Parachain]  Initializing Genesis block/state (state: 0x83ea…f1d7, header-hash: 0x76d3…0131)    &#xD;&#xA;	2023-02-02 14:35:28.533 DEBUG main parachain: [Parachain] Restoring chain level monitor from last finalized block: 0 0x76d3…0131    &#xD;&#xA;	2023-02-02 14:35:28.534 DEBUG main parachain: [Parachain] Restored chain level monitor up to height 1    &#xD;&#xA;	2023-02-02 14:35:29.842  INFO main sc_service::client::client: [Relaychain]  Initializing Genesis block/state (state: 0x8ad9…f0da, header-hash: 0x6408…063e)    &#xD;&#xA;	2023-02-02 14:35:29.860 DEBUG main parachain::chain-selection: [Relaychain] Using dispute aware relay-chain selection algorithm&#xD;&#xA;	2023-02-02 14:35:29.865  INFO main grandpa: [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;	2023-02-02 14:35:30.368  INFO main babe: [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.  &#xD;&#xA;	...&#xD;&#xA;	2023-02-02 14:35:35.549  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing, target=#3939536 (10 peers), best: #448 (0x12f3…93e2), finalized #0 (0x6408…063e), ⬇ 375.8kiB/s ⬆ 20.5kiB/s    &#xD;&#xA;	2023-02-02 14:35:35.568 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1675229735 min_ts=0 max_ts=0&#xD;&#xA;	2023-02-02 14:35:35.604  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x76d3…0131), finalized #0 (0x76d3…0131), ⬇ 0 ⬆ 0    &#xD;&#xA;	2023-02-02 14:35:37.622 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0x18ddf1f12cc86abeb357487531608a8edd98feeb03b6b7545382465122064b3c block_number=512&#xD;&#xA;	2023-02-02 14:35:37.622 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x6408de7737c59c238890533af25896a2c20608d8b380bb01029acb392781063e&#xD;&#xA;	2023-02-02 14:35:39.452 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0xa360b6bb5981fc1a175742ece7e1a6be3a579edfd6edfc8a13161c7a218ff3d4 block_number=1024&#xD;&#xA;	2023-02-02 14:35:39.455  WARN tokio-runtime-worker parachain::runtime-api: [Relaychain] cannot query the runtime API version: UnknownBlock: State already discarded for 0xb5ca6f77cde65f43b7dc8e2f551b6ff36327126392d08a99409531df0e7c0e1c&#xD;&#xA;	2023-02-02 14:35:39.455 DEBUG tokio-runtime-worker parachain::availability-store: [Relaychain] err=RuntimeApi(NotSupported { runtime_api_name: &quot;candidate_events&quot; })&#xD;&#xA;	2023-02-02 14:35:39.671  WARN tokio-runtime-worker runtime::inclusion-inherent: [Relaychain] CurrentBlockRandomness did not provide entropy    &#xD;&#xA;	2023-02-02 14:35:39.690 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0xf274389771b7e381cb75b8816c2f202621ce31e68e36f0c3b2a82a856f612403 block_number=1179&#xD;&#xA;	2023-02-02 14:35:39.695  WARN tokio-runtime-worker parachain::runtime-api: [Relaychain] cannot query the runtime API version: UnknownBlock: State already discarded for 0xb5ca6f77cde65f43b7dc8e2f551b6ff36327126392d08a99409531df0e7c0e1c&#xD;&#xA;	2023-02-02 14:35:39.695 DEBUG tokio-runtime-worker parachain::availability-store: [Relaychain] err=RuntimeApi(NotSupported { runtime_api_name: &quot;candidate_events&quot; })&#xD;&#xA;	2023-02-02 14:35:40.384 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0xef50450c80bce9f24beba006cb0404d40866241e88a90751bc9c7a037e6fe968 block_number=1536&#xD;&#xA;	2023-02-02 14:35:40.391 DEBUG tokio-runtime-worker parachain::availability-store: [Relaychain] err=RuntimeApi(NotSupported { runtime_api_name: &quot;candidate_events&quot; })&#xD;&#xA;	2023-02-02 14:35:40.549  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 235.6 bps, target=#3939537 (40 peers), best: #1626 (0xb55f…ec06), finalized #1536 (0xef50…e968), ⬇ 580.1kiB/s ⬆ 73.2kiB/s    &#xD;&#xA;	...&#xD;&#xA;	2023-02-02 14:36:00.549  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 38.4 bps, target=#3939537 (40 peers), best: #5120 (0x141b…4f75), finalized #5120 (0x141b…4f75), ⬇ 781.7kiB/s ⬆ 90.2kiB/s    &#xD;&#xA;	...&#xD;&#xA;	2023-02-02 14:36:05.550  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing 243.2 bps, target=#3939537 (40 peers), best: #6336 (0x1650…9ccd), finalized #6144 (0x7f10…b7d7), ⬇ 346.3kiB/s ⬆ 78.1kiB/s&#xD;&#xA;	...&#xD;&#xA;	2023-02-02 14:36:10.550  INFO tokio-runtime-worker substrate: [Relaychain] ⚙️  Syncing  0.0 bps, target=#3939537 (40 peers), best: #6336 (0x1650…9ccd), finalized #6144 (0x7f10…b7d7), ⬇ 373.5kiB/s ⬆ 45.1kiB/s &#xD;&#xA;&#xD;&#xA;I'm using the latest version (main branch, commit: 677a1a238a9592d0c8f1f0a4b7477b031da76c20) of [substrate-parachain-template][2].&#xD;&#xA;Does anyone encounter such a problem?&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/acquire-a-testnet-slot/&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-parachain-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="27097" PostHistoryTypeId="24" PostId="7038" RevisionGUID="480fa3b4-be1d-4f82-99d8-fd78a3926992" CreationDate="2023-02-05T10:44:22.293" Comment="Proposed by 170 approved by 34 edit id of 377" ContentLicense="CC BY-SA 4.0" />
  <row Id="27098" PostHistoryTypeId="5" PostId="7073" RevisionGUID="dda760f1-d4fa-4e2d-bacb-ea88cd5f7767" CreationDate="2023-02-05T10:44:36.437" UserId="19" Comment="added formating" Text="I get this error running swanky contract tx flipper flip -a alice -g 1000000000. I have increased the gas, I have no clue what else to try. Also is there a place to check for { Err: { Module: { index: '7', error: '0x02000000' } } } like this? Thanks&#xD;&#xA;&#xD;&#xA;    2023-02-03 01:14:43        API/INIT: RPC methods not decorated: transaction_unstable_submitAndWatch, transaction_unstable_unwatch&#xD;&#xA;    ✔ Initialising OK&#xD;&#xA;    ✔ Getting metadata OK&#xD;&#xA;    Gas required: 10,000,000,000&#xD;&#xA;    Tx result:&#xD;&#xA;    {&#xD;&#xA;      dispatchError: { Module: { index: '7', error: '0x02000000' } },&#xD;&#xA;      dispatchInfo: { weight: '1,449,232,000', class: 'Normal', paysFee: 'Yes' },&#xD;&#xA;      events: [&#xD;&#xA;        { phase: [Object], event: [Object], topics: [] },&#xD;&#xA;        { phase: [Object], event: [Object], topics: [] },&#xD;&#xA;        { phase: [Object], event: [Object], topics: [] }&#xD;&#xA;      ],&#xD;&#xA;      internalError: undefined,&#xD;&#xA;      status: {&#xD;&#xA;        Finalized: '0x15e61e58cd413d8a7eaf72c39398a6829b3c793cecaff79ecc4e993a16320a78'&#xD;&#xA;      }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="27099" PostHistoryTypeId="24" PostId="7073" RevisionGUID="dda760f1-d4fa-4e2d-bacb-ea88cd5f7767" CreationDate="2023-02-05T10:44:36.437" Comment="Proposed by 19 approved by 34 edit id of 378" ContentLicense="CC BY-SA 4.0" />
  <row Id="27101" PostHistoryTypeId="50" PostId="4668" RevisionGUID="40b51c0a-114f-4b59-9c1d-6ca9db9a065b" CreationDate="2023-02-05T11:02:45.277" UserId="-1" />
  <row Id="27102" PostHistoryTypeId="2" PostId="7096" RevisionGUID="e2d7c38e-cad9-4908-bfd1-884aff715acc" CreationDate="2023-02-06T00:40:15.327" UserId="116" Text="What are possible explanations why sub `subxt::tx::TxStatus::Invalid`&#xD;&#xA;&#xD;&#xA;The [documentation][1] is very brief about it:&#xD;&#xA;&#xD;&#xA;&gt; `Invalid`&#xD;&#xA;&gt;&#xD;&#xA;&gt;*The transaction is no longer valid in the current state.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Could someone please elaborate on what could be possible causes to why this happens sometimes?&#xD;&#xA;&#xD;&#xA;When I saw it last time my system submitted about 10 big extrinsics (of which five will fit in a block, to make sure most blocks are filled with useful data) and suddenly all of them where returned. A few moments later every thing returned to normal and submitting 10-15 extrinsics at a time was no longer a problem. In the blocks where the rejected extrinsics should been included I noticed two other transactions from other accounts on the chain but that should not cause any problems, should it?&#xD;&#xA;&#xD;&#xA;This is on a parachain if that is relevant.&#xD;&#xA; &#xD;&#xA;  [1]: https://docs.rs/subxt/latest/subxt/tx/enum.TxStatus.html#variant.Invalid" ContentLicense="CC BY-SA 4.0" />
  <row Id="27104" PostHistoryTypeId="1" PostId="7096" RevisionGUID="e2d7c38e-cad9-4908-bfd1-884aff715acc" CreationDate="2023-02-06T00:40:15.327" UserId="116" Text="Extrinsics ejected from pool with subxt::tx::TxStatus::Invalid error" ContentLicense="CC BY-SA 4.0" />
  <row Id="27105" PostHistoryTypeId="3" PostId="7096" RevisionGUID="e2d7c38e-cad9-4908-bfd1-884aff715acc" CreationDate="2023-02-06T00:40:15.327" UserId="116" Text="|parachain|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27106" PostHistoryTypeId="5" PostId="7096" RevisionGUID="c97abc35-4c59-4224-ae5f-d8dcb5b8d445" CreationDate="2023-02-06T01:30:16.113" UserId="116" Comment="added 58 characters in body" Text="What are possible explanations why sub `subxt::tx::TxStatus::Invalid`&#xD;&#xA;&#xD;&#xA;The [documentation][1] is very brief about it:&#xD;&#xA;&#xD;&#xA;&gt; `Invalid`&#xD;&#xA;&gt;&#xD;&#xA;&gt;*The transaction is no longer valid in the current state.*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Could someone please elaborate on what could be possible causes to why this happens sometimes?&#xD;&#xA;&#xD;&#xA;This is on a parachain if that is relevant, when I saw it last time my system submitted about 10 big extrinsics (of which five will fit in a block, to make sure most blocks are filled with useful data) and suddenly all of them where returned as `Invalid`. A few moments later every thing returned to normal and submitting 10-15 extrinsics at a time was no longer a problem. In the blocks where the rejected extrinsics should been included I noticed two other transactions from other accounts on the chain but that should not cause any problems, should it?&#xD;&#xA;&#xD;&#xA;Anyhow what could be plausible explanations? &#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/subxt/latest/subxt/tx/enum.TxStatus.html#variant.Invalid" ContentLicense="CC BY-SA 4.0" />
  <row Id="27107" PostHistoryTypeId="2" PostId="7097" RevisionGUID="7e5123a1-0b41-408d-bde8-6f3884df28af" CreationDate="2023-02-06T07:59:31.207" UserId="377" Text="What the steps for any chain to participate in the auction to get the slot.&#xD;&#xA;Do we have any guide related to it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27109" PostHistoryTypeId="1" PostId="7097" RevisionGUID="7e5123a1-0b41-408d-bde8-6f3884df28af" CreationDate="2023-02-06T07:59:31.207" UserId="377" Text="How we can apply for crowdloan to participate in the auction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27110" PostHistoryTypeId="3" PostId="7097" RevisionGUID="7e5123a1-0b41-408d-bde8-6f3884df28af" CreationDate="2023-02-06T07:59:31.207" UserId="377" Text="|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27111" PostHistoryTypeId="2" PostId="7098" RevisionGUID="01b0b4a0-4a03-47b1-935f-f38fb945460c" CreationDate="2023-02-06T08:14:18.770" UserId="3538" Text="I've implemented unified accounts in a NPoS consensus-based substrate chain, and modified the `polkadot-js/apps` accordingly as well. The transactions through metamask go through successfully, but I'm getting this (screenshot attached) error on each extrinsic performed through the `polkadot-js/apps`. These are the types that I've added to `polkadot-js/apps/packages/apps-config/src/api/typesBundle.ts`:&#xD;&#xA;&#xD;&#xA;    &quot;types&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;minmax&quot;: [&#xD;&#xA;            0,&#xD;&#xA;            null&#xD;&#xA;          ],&#xD;&#xA;          &quot;types&quot;: {&#xD;&#xA;            &quot;AccountId&quot;: &quot;EthereumAccountId&quot;,&#xD;&#xA;            &quot;AccountId20&quot;: &quot;EthereumAccountId&quot;,&#xD;&#xA;            &quot;AccountId32&quot;: &quot;EthereumAccountId&quot;,&#xD;&#xA;            &quot;Address&quot;: &quot;AccountId&quot;,&#xD;&#xA;            &quot;LookupSource&quot;: &quot;AccountId&quot;,&#xD;&#xA;            &quot;Lookup0&quot;: &quot;AccountId&quot;,&#xD;&#xA;            &quot;EthereumSignature&quot;: {&#xD;&#xA;              &quot;r&quot;: &quot;H256&quot;,&#xD;&#xA;              &quot;s&quot;: &quot;H256&quot;,&#xD;&#xA;              &quot;v&quot;: &quot;U8&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;ExtrinsicSignature&quot;: &quot;EthereumSignature&quot;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;&#xD;&#xA;[![Error Screenshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/e9beA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27113" PostHistoryTypeId="1" PostId="7098" RevisionGUID="01b0b4a0-4a03-47b1-935f-f38fb945460c" CreationDate="2023-02-06T08:14:18.770" UserId="3538" Text="`UnknownTransaction::CannotLookup` error on each extrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="27114" PostHistoryTypeId="3" PostId="7098" RevisionGUID="01b0b4a0-4a03-47b1-935f-f38fb945460c" CreationDate="2023-02-06T08:14:18.770" UserId="3538" Text="|polkadot-js|substrate-node-template|evm|moonbeam|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27115" PostHistoryTypeId="2" PostId="7099" RevisionGUID="64c01d08-ca27-46c1-8d5f-47c67d5300e2" CreationDate="2023-02-06T10:28:03.810" UserId="2444" Text="You can set up an Archive node for this purpose. Instead of passing the `--validator` flag you need to pass &#xD;&#xA;&#xD;&#xA;    --offchain-worker=always --pruning=archive&#xD;&#xA;&#xD;&#xA;flags while running the node. &#xD;&#xA;&#xD;&#xA;For more details please check this [link].&#xD;&#xA;&#xD;&#xA;  [link]: https://wiki.polkadot.network/docs/maintain-sync" ContentLicense="CC BY-SA 4.0" />
  <row Id="27117" PostHistoryTypeId="2" PostId="7100" RevisionGUID="cb1ad358-64dc-4455-8d38-1187b4baccaf" CreationDate="2023-02-06T10:31:45.793" UserId="2478" Text="For ink contracts with weight v2 it requires refTime and proofSize. For this we are first querying(dry run) the transaction method, getting gasRequired from query result and sending it to transaction. For weights v2 query also required gas values which we are getting from `api.consts.system.blockWeights['perClass'].operational.maxExtrinsic`&#xD;&#xA;&#xD;&#xA;This process is failing sometimes with outofgas exception. `api.consts.system.blockWeights` return plethora of results and it is not clear which value to use. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  baseBlock: {&#xD;&#xA;    refTime: 358,523,000&#xD;&#xA;    proofSize: 0&#xD;&#xA;  }&#xD;&#xA;  maxBlock: {&#xD;&#xA;    refTime: 500,000,000,000&#xD;&#xA;    proofSize: 5,242,880&#xD;&#xA;  }&#xD;&#xA;  perClass: {&#xD;&#xA;    normal: {&#xD;&#xA;      baseExtrinsic: {&#xD;&#xA;        refTime: 98,974,000&#xD;&#xA;        proofSize: 0&#xD;&#xA;      }&#xD;&#xA;      maxExtrinsic: {&#xD;&#xA;        refTime: 324,901,026,000&#xD;&#xA;        proofSize: 3,407,872&#xD;&#xA;      }&#xD;&#xA;      maxTotal: {&#xD;&#xA;        refTime: 375,000,000,000&#xD;&#xA;        proofSize: 3,932,160&#xD;&#xA;      }&#xD;&#xA;      reserved: {&#xD;&#xA;        refTime: 0&#xD;&#xA;        proofSize: 0&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    operational: {&#xD;&#xA;      baseExtrinsic: {&#xD;&#xA;        refTime: 98,974,000&#xD;&#xA;        proofSize: 0&#xD;&#xA;      }&#xD;&#xA;      maxExtrinsic: {&#xD;&#xA;        refTime: 449,901,026,000&#xD;&#xA;        proofSize: 4,718,592&#xD;&#xA;      }&#xD;&#xA;      maxTotal: {&#xD;&#xA;        refTime: 500,000,000,000&#xD;&#xA;        proofSize: 5,242,880&#xD;&#xA;      }&#xD;&#xA;      reserved: {&#xD;&#xA;        refTime: 125,000,000,000&#xD;&#xA;        proofSize: 1,310,720&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    mandatory: {&#xD;&#xA;      baseExtrinsic: {&#xD;&#xA;        refTime: 98,974,000&#xD;&#xA;        proofSize: 0&#xD;&#xA;      }&#xD;&#xA;      maxExtrinsic: null&#xD;&#xA;      maxTotal: null&#xD;&#xA;      reserved: null&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;For us what worked is doubling the gasRequired coming from dry run but this is not a efficient solution. &#xD;&#xA;&#xD;&#xA;Is there an official documentation for estimating gas for Weights v2." ContentLicense="CC BY-SA 4.0" />
  <row Id="27119" PostHistoryTypeId="1" PostId="7100" RevisionGUID="cb1ad358-64dc-4455-8d38-1187b4baccaf" CreationDate="2023-02-06T10:31:45.793" UserId="2478" Text="How to estimate gas for ink contracts transactions for Weights V2?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27120" PostHistoryTypeId="3" PostId="7100" RevisionGUID="cb1ad358-64dc-4455-8d38-1187b4baccaf" CreationDate="2023-02-06T10:31:45.793" UserId="2478" Text="|polkadot-js|pallet-contracts|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27121" PostHistoryTypeId="2" PostId="7101" RevisionGUID="f13fe562-6794-40c9-b78e-a613b71671dc" CreationDate="2023-02-06T10:42:26.117" UserId="3371" Text="I found the solution in the Polkadot JS itself, however it wasn't that straightforward and not described well in the docs. &#xD;&#xA;&#xD;&#xA;Here is the guide on how to decode the Call inside the Bounded&lt;Call&gt;(taken from Polkadot-JS sources):&#xD;&#xA;&#xD;&#xA;    try {&#xD;&#xA;          // cater for an extrinsic input&#xD;&#xA;          const tx = api.tx(hex);&#xD;&#xA;&#xD;&#xA;          // ensure that the full data matches here&#xD;&#xA;          assert(tx.toHex() === hex, 'Cannot decode data as extrinsic, length mismatch');&#xD;&#xA;&#xD;&#xA;          decoded = tx;&#xD;&#xA;          extrinsicCall = api.createType('Call', decoded.method);&#xD;&#xA;        } catch {&#xD;&#xA;          try {&#xD;&#xA;            // attempt to decode as Call&#xD;&#xA;            extrinsicCall = api.createType('Call', hex);&#xD;&#xA;&#xD;&#xA;            const callHex = extrinsicCall.toHex();&#xD;&#xA;&#xD;&#xA;            if (callHex === hex) {&#xD;&#xA;              // all good, we have a call&#xD;&#xA;              isCall = true;&#xD;&#xA;            } else if (hex.startsWith(callHex)) {&#xD;&#xA;              // this could be an un-prefixed payload...&#xD;&#xA;              const prefixed = u8aConcat(compactToU8a(extrinsicCall.encodedLength), hex);&#xD;&#xA;&#xD;&#xA;              extrinsicPayload = api.createType('ExtrinsicPayload', prefixed);&#xD;&#xA;&#xD;&#xA;              assert(u8aEq(extrinsicPayload.toU8a(), prefixed), 'Unable to decode data as un-prefixed ExtrinsicPayload');&#xD;&#xA;&#xD;&#xA;              extrinsicCall = api.createType('Call', extrinsicPayload.method.toHex());&#xD;&#xA;            } else {&#xD;&#xA;              throw new Error('Unable to decode data as Call, length mismatch in supplied data');&#xD;&#xA;            }&#xD;&#xA;          } catch {&#xD;&#xA;            // final attempt, we try this as-is as a (prefixed) payload&#xD;&#xA;            extrinsicPayload = api.createType('ExtrinsicPayload', hex);&#xD;&#xA;&#xD;&#xA;            assert(extrinsicPayload.toHex() === hex, 'Unable to decode input data as Call, Extrinsic or ExtrinsicPayload');&#xD;&#xA;&#xD;&#xA;            extrinsicCall = api.createType('Call', extrinsicPayload.method.toHex());&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;After that you'll basically have all that you need: section, method, args that describe the call.&#xD;&#xA;&#xD;&#xA;Here is the link to Polkadot-JS sources: [Decoder.tsx][1]&#xD;&#xA;&#xD;&#xA;P.S. Inspired by this thread that will be useful for offline decoding as well: [How can I manually decode hex extrinsic][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/blob/master/packages/page-extrinsics/src/Decoder.tsx&#xD;&#xA;  [2]: https://github.com/polkadot-js/api/issues/4617" ContentLicense="CC BY-SA 4.0" />
  <row Id="27123" PostHistoryTypeId="2" PostId="7102" RevisionGUID="4eac6473-e1db-4ec7-b8ab-cc379a7f6230" CreationDate="2023-02-06T11:57:40.943" UserId="2344" Text="When connecting to my own RPC server the polkadot.js displays an orange branding.&#xD;&#xA;\&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss://ibp-rpc.metaspan.io/kusama#/explorer/node&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;It should just show the default branding. Can someone please let me know how to troubleshoot this?&#xD;&#xA;&#xD;&#xA;Kusama on Dwellir is the same version, and displays the correct UI branding:&#xD;&#xA;\&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/explorer/node&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/osWiz.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6Y4Jp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27125" PostHistoryTypeId="1" PostId="7102" RevisionGUID="4eac6473-e1db-4ec7-b8ab-cc379a7f6230" CreationDate="2023-02-06T11:57:40.943" UserId="2344" Text="Polkadot.js ui displays orange branding for Kusama" ContentLicense="CC BY-SA 4.0" />
  <row Id="27126" PostHistoryTypeId="3" PostId="7102" RevisionGUID="4eac6473-e1db-4ec7-b8ab-cc379a7f6230" CreationDate="2023-02-06T11:57:40.943" UserId="2344" Text="|polkadot-js|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27127" PostHistoryTypeId="2" PostId="7103" RevisionGUID="cb6148c4-5dd2-4f7a-b25f-f098e0982d32" CreationDate="2023-02-06T12:01:47.467" UserId="2344" Text="Seems if your endpoint is not in this list, you get the Orange branding now:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zL0ay.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27129" PostHistoryTypeId="2" PostId="7104" RevisionGUID="3f6fd856-f80e-4b45-ae10-f13460112449" CreationDate="2023-02-06T13:21:16.967" UserId="167" Text="You can start learning about this either through the [Substrate developer hub](https://docs.substrate.io/reference/how-to-guides/parachains/auctions-and-crowdloans/), or the [Polkadot wiki](https://wiki.polkadot.network/docs/learn-auction).&#xD;&#xA;&#xD;&#xA;Assuming that you are more interested in first trying this on a testnet, there is a dedicated document about [Rococo](https://docs.substrate.io/tutorials/connect-relay-and-parachains/acquire-a-testnet-slot/) as well. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27131" PostHistoryTypeId="2" PostId="7105" RevisionGUID="19a8f252-71a8-4d54-9d30-2574f45c96d9" CreationDate="2023-02-06T14:11:51.383" UserId="2764" Text="The transaction status is coming from substrate directly, subxt is just forwarding the result back to users.&#xD;&#xA;&#xD;&#xA;In substrate, it is defined as [TransactionStatus](https://github.com/paritytech/substrate/blob/0d09ae6d64fab3a629df859afe1265fcf3ab681c/client/transaction-pool/api/src/lib.rs#L132). Subxt calls into the [watch_extrinsic](https://github.com/paritytech/substrate/blob/0d09ae6d64fab3a629df859afe1265fcf3ab681c/client/rpc-api/src/author/mod.rs#L77) RPC method that should provide a stream of `TransactionStatus`.&#xD;&#xA;&#xD;&#xA;I think the transaction could be marked as invalid by the runtime (probably in the case of a runtime upgrade), or by the [tx-pool](https://github.com/paritytech/substrate/blob/0d09ae6d64fab3a629df859afe1265fcf3ab681c/client/transaction-pool/src/graph/validated_pool.rs#L49).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27133" PostHistoryTypeId="2" PostId="7106" RevisionGUID="72a54d76-789c-4106-aa52-4c61a79b1cd7" CreationDate="2023-02-06T15:22:00.957" UserId="298" Text="trying to update to the latest polkadot-v0.9.37&#xD;&#xA;&#xD;&#xA;when i `cargo check` i get:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   Checking sc-executor-wasmi v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;    Checking sp-io v7.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;error[E0658]: `let...else` statements are unstable&#xD;&#xA;   --&gt; /Users/ramsey/.cargo/git/checkouts/substrate-7e08433d4c370a21/946507b/primitives/io/src/lib.rs:786:4&#xD;&#xA;    |&#xD;&#xA;786 | /             let Ok(public_key) = ed25519_dalek::PublicKey::from_bytes(&amp;pub_key.0) else {&#xD;&#xA;787 | |                 return false&#xD;&#xA;788 | |             };&#xD;&#xA;    | |______________^&#xD;&#xA;    |&#xD;&#xA;    = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;&#xD;&#xA;error[E0658]: `let...else` statements are unstable&#xD;&#xA;   --&gt; /Users/ramsey/.cargo/git/checkouts/substrate-7e08433d4c370a21/946507b/primitives/io/src/lib.rs:790:4&#xD;&#xA;    |&#xD;&#xA;790 | /             let Ok(sig) = ed25519_dalek::Signature::from_bytes(&amp;sig.0) else {&#xD;&#xA;791 | |                 return false&#xD;&#xA;792 | |             };&#xD;&#xA;    | |______________^&#xD;&#xA;    |&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;my versions are:&#xD;&#xA;&#xD;&#xA;`rustv -V`:&#xD;&#xA;`rustc 1.64.0`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`rustup show`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.67.0 (fc594f156 2023-01-24)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;`rustup +nightly show`&#xD;&#xA;```&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.69.0-nightly (75a0be98f 2023-02-05)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27135" PostHistoryTypeId="1" PostId="7106" RevisionGUID="72a54d76-789c-4106-aa52-4c61a79b1cd7" CreationDate="2023-02-06T15:22:00.957" UserId="298" Text="`let...else` statements are unstable" ContentLicense="CC BY-SA 4.0" />
  <row Id="27136" PostHistoryTypeId="3" PostId="7106" RevisionGUID="72a54d76-789c-4106-aa52-4c61a79b1cd7" CreationDate="2023-02-06T15:22:00.957" UserId="298" Text="|rust|runtime-upgrade|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27137" PostHistoryTypeId="2" PostId="7107" RevisionGUID="31140252-c958-4fe9-8ff7-5e7df343dc5e" CreationDate="2023-02-06T15:25:03.427" UserId="3317" Text="Simply put, BABE(-pallet) provides logic which decides who, for a certain amount of blocks, is allowed to author a new block. &#xD;&#xA;&#xD;&#xA;Authoring a block is filling the block with valid transactions from the transaction pool and sending it to other peers. But blocks are blocks, and the only way to specify what kind of blocks are allowed is specifying what kind of transactions are allowed in the blocks. This is your runtime, more specifically, the pallets you include in your runtime that provide the functionality for certain transactions on your chain. For example, again simply put, without the nft-pallet configured in your runtime you can't send nft related transactions on that particular chain.&#xD;&#xA;In addition, there are some constants that you could modify (e.g. block size, block length, etc) in order to specify the &quot;size&quot; of the blocks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27139" PostHistoryTypeId="5" PostId="7106" RevisionGUID="14ac7a2d-c46d-4a64-85c3-fffe7dfe5372" CreationDate="2023-02-06T15:44:49.327" UserId="298" Comment="added 106 characters in body" Text="trying to update to the latest polkadot-v0.9.37&#xD;&#xA;&#xD;&#xA;when i `cargo check` i get:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   Checking sc-executor-wasmi v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;    Checking sp-io v7.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;error[E0658]: `let...else` statements are unstable&#xD;&#xA;   --&gt; /Users/ramsey/.cargo/git/checkouts/substrate-7e08433d4c370a21/946507b/primitives/io/src/lib.rs:786:4&#xD;&#xA;    |&#xD;&#xA;786 | /             let Ok(public_key) = ed25519_dalek::PublicKey::from_bytes(&amp;pub_key.0) else {&#xD;&#xA;787 | |                 return false&#xD;&#xA;788 | |             };&#xD;&#xA;    | |______________^&#xD;&#xA;    |&#xD;&#xA;    = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;&#xD;&#xA;error[E0658]: `let...else` statements are unstable&#xD;&#xA;   --&gt; /Users/ramsey/.cargo/git/checkouts/substrate-7e08433d4c370a21/946507b/primitives/io/src/lib.rs:790:4&#xD;&#xA;    |&#xD;&#xA;790 | /             let Ok(sig) = ed25519_dalek::Signature::from_bytes(&amp;sig.0) else {&#xD;&#xA;791 | |                 return false&#xD;&#xA;792 | |             };&#xD;&#xA;    | |______________^&#xD;&#xA;    |&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;my versions are:&#xD;&#xA;&#xD;&#xA;`rustv -V`:&#xD;&#xA;`rustc 1.64.0`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`rustup show`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.67.0 (fc594f156 2023-01-24)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;`rustup +nightly show`&#xD;&#xA;```&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.69.0-nightly (75a0be98f 2023-02-05)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I notice that rustv -V is still on an old version even if i use `rustup default stable`, on a macos m2" ContentLicense="CC BY-SA 4.0" />
  <row Id="27140" PostHistoryTypeId="2" PostId="7108" RevisionGUID="e4f6dee7-3559-4d1e-bff7-2a04c5a13d32" CreationDate="2023-02-06T15:53:22.053" UserId="3142" Text="In a custom *Substrate* pallet unit test, I need to get a list of governance proposals using the chain state.  I have used *Polkadot JS* to query state before but not from within a *Substrate* unit test in *Rust*.  &#xD;&#xA;&#xD;&#xA;Do I need to use a mock?  I think I have to create to create the encoded key from the module and method names.  This is probably way off but here's what I've come up with:&#xD;&#xA;&#xD;&#xA;    let key = twox_128(&quot;Collective&quot;) + twox_128(&quot;CouncilProposals&quot;);&#xD;&#xA;    let encoded_key = scale_encode(key);&#xD;&#xA;    &#xD;&#xA;    let storage_key = blake2_128_concat(encoded_key);&#xD;&#xA;    let proposals = state_getStorage(storage_key);&#xD;&#xA;&#xD;&#xA;What's the correct way to do it?  I need an example.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27142" PostHistoryTypeId="1" PostId="7108" RevisionGUID="e4f6dee7-3559-4d1e-bff7-2a04c5a13d32" CreationDate="2023-02-06T15:53:22.053" UserId="3142" Text="How do you perform a state query in a unit test?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27143" PostHistoryTypeId="3" PostId="7108" RevisionGUID="e4f6dee7-3559-4d1e-bff7-2a04c5a13d32" CreationDate="2023-02-06T15:53:22.053" UserId="3142" Text="|rust|storage|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27144" PostHistoryTypeId="2" PostId="7109" RevisionGUID="969d8fe1-ea52-4880-b26e-77bee7ae372e" CreationDate="2023-02-06T16:02:12.520" UserId="3317" Text="From the protocol perspective; due to polkadot's shared security the parachain's finalized state is guaranteed on the relay chain. In other words, information regarding a parachain block, whether it is included, reverted or finalized, is acquired from the relay chain. In order to obtain and verify the latest information about blocks and finality a parachain needs to be in sync with the relay chain (networking, consensus, finality, etc). For this reason a parachain node also consists of a relay chain client (e.g. polkadot or kusama)." ContentLicense="CC BY-SA 4.0" />
  <row Id="27147" PostHistoryTypeId="2" PostId="7110" RevisionGUID="2b8c9a75-c5d5-479c-9214-65632275e046" CreationDate="2023-02-06T17:29:20.670" UserId="139" Text="The way I understand that particular error variant is by first noting the condition `t &lt; minimum`. `Minimum` is the best estimate from the perspective of the local node that of the minimum time period between the block that's already been finalized, to the block that's being proposed.&#xD;&#xA;&#xD;&#xA;If the timestamp happens to be less than the local node's `minimum` it would imply one of two scenarios:&#xD;&#xA;&#xD;&#xA; 1. The timestamp was intentionally set to something less than `Self::now() + T::Minimum` where the underlying assumption is that both nodes system clocks agree to the same time.&#xD;&#xA; 2. The last block author had their current `Moment` A much behind the local node's `Moment` B resulting in &#xD;&#xA;```&#xD;&#xA;[t = A + T::Minimum] &lt; B + T::Minimum&#xD;&#xA;```&#xD;&#xA;Which would imply that even though the timestamp was set properly w.r.t A, B doesn't agree with the value of `Self::now()` and subsequently the timestamp set by A.&#xD;&#xA;&#xD;&#xA;I am a bit unsure about the circumstance under which such a desynchronization of `Self::now()` could occur, and I'm even skeptical about how often does this code path trigger, but I'll leave it right here to the other readers to improve the answer. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27149" PostHistoryTypeId="6" PostId="7100" RevisionGUID="af56eff5-ffa1-4f9d-8e57-2f0e3ed4f712" CreationDate="2023-02-06T19:04:35.397" UserId="2478" Comment="edited tags" Text="|polkadot-js|ink|smart-contract|pallet-contracts|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27150" PostHistoryTypeId="2" PostId="7111" RevisionGUID="7ecffcc4-7a68-4063-9cf1-c97c96ebab19" CreationDate="2023-02-06T23:03:58.573" UserId="83" Text="In the Substrate documentation here https://docs.substrate.io/test/debug/ it says we can use [Rust's Logging API crate](https://crates.io/crates/log), for example as follows in a pallet:&#xD;&#xA;&#xD;&#xA;Cargo.toml&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, &quot;branch&quot; = &quot;polkadot-v0.9.36&quot; }&#xD;&#xA;log = &quot;0.4.17&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;lib.rs&#xD;&#xA;```&#xD;&#xA;use log::{debug, error, info, trace, warn};&#xD;&#xA;...&#xD;&#xA;info!(&quot;logging&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, the Substrate documentation does not mention we may alternatively use frame_support::log instead, for example as follows in a pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use frame_support::log::{debug, error, info, trace, warn};&#xD;&#xA;...&#xD;&#xA;info!(&quot;logging&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Substrate uses Rust's Logging API crate almost everywhere throughout the codebase, but only uses `frame_support::log` in a few places like Frame Executive, for example [here](https://github.com/paritytech/substrate/blob/master/frame/executive/src/lib.rs#L242) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Why doesn't Substrate only use Rust's Logging API crate?&#xD;&#xA;Why does it also need and use frame_support::log?&#xD;&#xA;Should Substrate developers only use Rust's Logging API crate or frame_support::log or their choice of either of them?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27152" PostHistoryTypeId="1" PostId="7111" RevisionGUID="7ecffcc4-7a68-4063-9cf1-c97c96ebab19" CreationDate="2023-02-06T23:03:58.573" UserId="83" Text="Why does Substrate use both Rust's Logging API crate and frame_support::log?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27153" PostHistoryTypeId="3" PostId="7111" RevisionGUID="7ecffcc4-7a68-4063-9cf1-c97c96ebab19" CreationDate="2023-02-06T23:03:58.573" UserId="83" Text="|debugging|logging|frame-support|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27154" PostHistoryTypeId="6" PostId="7096" RevisionGUID="bfccc5b4-019f-4323-9775-ce0d3c9a5a03" CreationDate="2023-02-07T00:21:39.453" UserId="116" Comment="edited tags" Text="|parachain|subxt|tx-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27155" PostHistoryTypeId="2" PostId="7112" RevisionGUID="e027a0a9-d740-4be6-b71c-14f25dcf0e1f" CreationDate="2023-02-07T02:29:54.447" UserId="251" Text="Because different contributor has different knowledge of Substrate or Rust.&#xD;&#xA;&#xD;&#xA;I use `frame_support::log` everywhere in my project. Because I know there is a `pub use` in the frame-support, and I also don't want to modify my toml file.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;It is just like someone importing `DispatchResult` from the frame-support and someone importing it from the sp-runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="27157" PostHistoryTypeId="2" PostId="7113" RevisionGUID="8c8de489-198e-49ca-8281-22c2f2b0f090" CreationDate="2023-02-07T07:49:28.463" UserId="3770" Text="I know that we can interact between smart contract and runtime (and vice versa) but I can not find a way that I can fetch data from API (in off-chain worker pallet) and pass those data to the smart contract (written by ink).&#xD;&#xA;&#xD;&#xA;Do you guys have any ideas?&#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="27159" PostHistoryTypeId="1" PostId="7113" RevisionGUID="8c8de489-198e-49ca-8281-22c2f2b0f090" CreationDate="2023-02-07T07:49:28.463" UserId="3770" Text="Is there any way to interact between ink smart contract and off-chain worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27160" PostHistoryTypeId="3" PostId="7113" RevisionGUID="8c8de489-198e-49ca-8281-22c2f2b0f090" CreationDate="2023-02-07T07:49:28.463" UserId="3770" Text="|pallet|ink|runtime|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27161" PostHistoryTypeId="2" PostId="7114" RevisionGUID="52737f50-2ed4-4b64-a7e7-7b38d5496688" CreationDate="2023-02-07T09:06:30.047" UserId="2372" Text="I'm trying to migrate data from one existing solo chain to relay chain. How should I do it?&#xD;&#xA;I`m taking ideas from Centrifuse chain which is migrating accounts and their balances, proxy,and vesting. But i need to migrate staking ledger,contracts DeletionQueue, and  Contracts ContractInfoOf . &#xD;&#xA;&#xD;&#xA;Please guide me through this migration " ContentLicense="CC BY-SA 4.0" />
  <row Id="27163" PostHistoryTypeId="1" PostId="7114" RevisionGUID="52737f50-2ed4-4b64-a7e7-7b38d5496688" CreationDate="2023-02-07T09:06:30.047" UserId="2372" Text="How to migrate data from Solo to Relay Chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27164" PostHistoryTypeId="3" PostId="7114" RevisionGUID="52737f50-2ed4-4b64-a7e7-7b38d5496688" CreationDate="2023-02-07T09:06:30.047" UserId="2372" Text="|relay-chain|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27166" PostHistoryTypeId="2" PostId="7115" RevisionGUID="c73b61d0-1758-4c65-9cee-2b7e3d1de3c1" CreationDate="2023-02-07T09:48:03.087" UserId="298" Text="The answer to why `rustc --version` and `rustup show` versions were different was because i had rustc installed in various ways on the same machine. &#xD;&#xA;&#xD;&#xA;run the command `which -a rustc` to find out their locations. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/opt/homebrew/bin/rustc&#xD;&#xA;/opt/homebrew/bin/rustc&#xD;&#xA;/Users/ramsey/.cargo/bin/rustc &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my situation i have brew installed version(s), which i dont need. &#xD;&#xA;&#xD;&#xA;`brew uninstall rust`&#xD;&#xA;&#xD;&#xA;and then run `rustc --version` and `rustup show`, and the versions now match.&#xD;&#xA;&#xD;&#xA;Now the error `let...else are unstable` has disappeared. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27168" PostHistoryTypeId="2" PostId="7116" RevisionGUID="24d25c04-b725-4c14-903e-c620651d7775" CreationDate="2023-02-07T10:23:03.120" UserId="3317" Text="You could have a look at how it is done in the [Nicks pallet][1].&#xD;&#xA;&#xD;&#xA;In short, you are first filling the storage with existing runtime calls and then checking the storage whether these calls succeeded.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/nicks/src/lib.rs#L345" ContentLicense="CC BY-SA 4.0" />
  <row Id="27170" PostHistoryTypeId="2" PostId="7117" RevisionGUID="7a729972-465d-46b7-82cc-833ef87aed4d" CreationDate="2023-02-07T11:24:20.590" UserId="3319" Text=" - what are the use cases for this macro?&#xD;&#xA; - what does it mean to specify an origin for the pallet? does it mean that all extrinsics defined within that pallet will be available only for origin?&#xD;&#xA; - can someone provide a useful example and how to use?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27172" PostHistoryTypeId="1" PostId="7117" RevisionGUID="7a729972-465d-46b7-82cc-833ef87aed4d" CreationDate="2023-02-07T11:24:20.590" UserId="3319" Text="can someone provide a clear example on #[pallet::origin]" ContentLicense="CC BY-SA 4.0" />
  <row Id="27173" PostHistoryTypeId="3" PostId="7117" RevisionGUID="7a729972-465d-46b7-82cc-833ef87aed4d" CreationDate="2023-02-07T11:24:20.590" UserId="3319" Text="|origin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27174" PostHistoryTypeId="2" PostId="7118" RevisionGUID="c94dc1cc-708c-4723-a7ff-a0b6ca0d3282" CreationDate="2023-02-07T11:43:22.133" UserId="2844" Text="I'm afraid there might not be any way to fetch data from API (off-chain worker pallet) and pass those data to the ink smart contract but there is [phala network](https://wiki.phala.network/en-us/general/phala-network/intro/) where they have done `Phat Contract Oracle Workshop` which you can find [here](https://github.com/Phala-Network/phat-offchain-rollup/blob/main/phat/Sub0-Workshop.md#phat-contract-oracle-workshop).&#xD;&#xA;&#xD;&#xA; &gt; After this workshop, you will learn:&#xD;&#xA; &gt; 1. What the Phat Contract offchain computing is and how it can help build &#xD;&#xA;    oracles.&#xD;&#xA; &gt; 2. Fetch and process arbitrary data with HTTP(s) requests&#xD;&#xA; &gt; 3. Integrate to a Substrate blockchain&#xD;&#xA; &gt; 4. `Implement the oracle in ink!`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27180" PostHistoryTypeId="5" PostId="7118" RevisionGUID="f1b02061-5128-4a0e-a6aa-3ef6a45627d1" CreationDate="2023-02-07T12:54:08.673" UserId="2844" Comment="added 154 characters in body" Text="I'm afraid there might not be any way to fetch data from API (off-chain worker pallet) and pass those data to the ink smart contract but there is [phala network](https://wiki.phala.network/en-us/general/phala-network/intro/) where they have done `Phat Contract Oracle Workshop` which you can find [here](https://github.com/Phala-Network/phat-offchain-rollup/blob/main/phat/Sub0-Workshop.md#phat-contract-oracle-workshop).&#xD;&#xA;&#xD;&#xA; &gt; After this workshop, you will learn:&#xD;&#xA; &gt; 1. What the Phat Contract offchain computing is and how it can help build &#xD;&#xA;    oracles.&#xD;&#xA; &gt; 2. Fetch and process arbitrary data with HTTP(s) requests&#xD;&#xA; &gt; 3. Integrate to a Substrate blockchain&#xD;&#xA; &gt; 4. `Implement the oracle in ink!`&#xD;&#xA;&#xD;&#xA;There are two section section two will coming soon. Tho it's incomplete but still Phat contract or phala network is the way to to fetch off-chain data. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27181" PostHistoryTypeId="14" PostId="7106" RevisionGUID="0944017c-4d17-4e86-a829-13ce68e76eba" CreationDate="2023-02-07T13:24:12.840" UserId="-1" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;}]}" />
  <row Id="27182" PostHistoryTypeId="35" PostId="7106" RevisionGUID="d2f875c3-bed2-41e2-8d75-52497671ac84" CreationDate="2023-02-07T13:24:12.840" UserId="34" Comment="to https://stackoverflow.com/questions/75373997/let-else-statements-are-unstable" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="27183" PostHistoryTypeId="35" PostId="7115" RevisionGUID="4ef1bf7b-c9ac-41d5-8ca4-3abfa7fd7d68" CreationDate="2023-02-07T13:24:12.840" UserId="-1" Comment="to https://stackoverflow.com/questions/75373997/let-else-statements-are-unstable" />
  <row Id="27184" PostHistoryTypeId="10" PostId="7106" RevisionGUID="70d58782-acc9-4443-84cb-f7102ae41cbf" CreationDate="2023-02-07T13:24:12.840" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="27185" PostHistoryTypeId="2" PostId="7120" RevisionGUID="9d9c1cd3-02af-43e2-8608-c0acb17e0004" CreationDate="2023-02-07T13:51:33.023" UserId="251" Text="1. Use it when you want to customize your pallet origin.&#xD;&#xA;2. It will apply your origin to `OriginFor&lt;T&gt;`, when you use `ensure_sign` it will verify your origin.&#xD;&#xA;3. Let's take the collective as an example.&#xD;&#xA;&#xD;&#xA;Define an origin first: https://github.com/paritytech/substrate/blob/41ae90843b070786ab53071479c141a7c6649ac9/frame/collective/src/lib.rs#L131-L151.&#xD;&#xA;&#xD;&#xA;Then use this macro to &quot;activate&quot; it: https://github.com/paritytech/substrate/blob/41ae90843b070786ab53071479c141a7c6649ac9/frame/collective/src/lib.rs#L248-L250.&#xD;&#xA;&#xD;&#xA;You can search the keyword `RawOrigin` within this pallet to get more deatil." ContentLicense="CC BY-SA 4.0" />
  <row Id="27187" PostHistoryTypeId="2" PostId="7121" RevisionGUID="8d72e62b-bb36-4a33-922a-3fe0c9538e78" CreationDate="2023-02-07T14:05:04.683" UserId="139" Text="The `#[pallet::origin]` attribute allows you to define some origin for the pallet. The annotated item must be either a type alias, an enum, or a struct and it needs to be public.&#xD;&#xA;&#xD;&#xA;The way frame processes these macros is to simply look at them as labels for the `#[frame_support::pallet]` macro. There is no additional Rust code being generated when you see such macros. &#xD;&#xA;&#xD;&#xA;The use case for this macro can be seen in a number of pallets, two of them that comes to mind being the `frame_system` pallet which is a core pallet and defines the `RuntimeOrigin` that's used throughout the runtime: https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L542&#xD;&#xA;&#xD;&#xA;And the other being `pallet_collective` which defines a custom origin like so:&#xD;&#xA;```rust&#xD;&#xA;pub enum RawOrigin&lt;AccountId, I&gt; {&#xD;&#xA;	/// It has been condoned by a given number of members of the collective from a given total.&#xD;&#xA;	Members(MemberCount, MemberCount),&#xD;&#xA;	/// It has been condoned by a single member of the collective.&#xD;&#xA;	Member(AccountId),&#xD;&#xA;	/// Dummy to manage the fact we have instancing.&#xD;&#xA;	_Phantom(PhantomData&lt;I&gt;),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt;what does it mean to specify an origin for the pallet? does it mean that all extrinsics defined within that pallet will be available only for origin?&#xD;&#xA;&#xD;&#xA;That depends on the pallet code. Collective for instance defines its &quot;RuntimeOrigin&quot; as :&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type RuntimeOrigin: From&lt;RawOrigin&lt;Self::AccountId, I&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;Where confusingly, `RawOrigin` is `collective`'s own version, and not the same thing that's used by `frame_system`. All that matters is the `Call` enum that's generated by the `construct_runtime!` macro implements `Dispatchable&lt;RuntimeOrigin = &lt;Self as Config&lt;I&gt;&gt;::RuntimeOrigin, PostInfo = PostDispatchInfo,&gt;` to be able to call `Call` using the origin type that was defined in the pallet, which in our case is `RuntimeOrigin` which is `pallet_collective`'s own version:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Inside pallet_collective::Config&#xD;&#xA;type RuntimeOrigin: From&lt;pallet_collective::RawOrigin&lt;Self::AccountId, I&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27189" PostHistoryTypeId="2" PostId="7122" RevisionGUID="14ff6e47-bace-4979-a878-71165844bab2" CreationDate="2023-02-07T14:19:59.793" UserId="3319" Text="in substrate-node-template, is there a way that i can use to create an extrinsic in outer-node?&#xD;&#xA;&#xD;&#xA;i want to speicifcally create an unsigned extrinsic for a specific pallet call and i found this [struct][1] that should do the job, but i dont know how to provide the arguments such as Call and i dont want to create an inherent, just an unsigned extrinsic for a specific pallet call?&#xD;&#xA;&#xD;&#xA;ps: previously i was using `subxt` but i want to do it manually since i am in the node directly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-runtime/latest/sp_runtime/generic/struct.UncheckedExtrinsic.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="27191" PostHistoryTypeId="1" PostId="7122" RevisionGUID="14ff6e47-bace-4979-a878-71165844bab2" CreationDate="2023-02-07T14:19:59.793" UserId="3319" Text="how to create an unsigned extrinsic in outer-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="27192" PostHistoryTypeId="3" PostId="7122" RevisionGUID="14ff6e47-bace-4979-a878-71165844bab2" CreationDate="2023-02-07T14:19:59.793" UserId="3319" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27193" PostHistoryTypeId="5" PostId="7120" RevisionGUID="fe37face-c740-49aa-9415-306050685722" CreationDate="2023-02-07T14:36:19.660" UserId="251" Comment="added 207 characters in body" Text="It's always good to search these in the Substrate repository. And here's the document. &#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html#origin-palletorigin-optional&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;1. Use it when you want to customize your pallet origin.&#xD;&#xA;2. It will apply your origin to `OriginFor&lt;T&gt;`, when you use `ensure_sign` it will verify your origin.&#xD;&#xA;3. Let's take the collective as an example.&#xD;&#xA;&#xD;&#xA;Define an origin first: https://github.com/paritytech/substrate/blob/41ae90843b070786ab53071479c141a7c6649ac9/frame/collective/src/lib.rs#L131-L151.&#xD;&#xA;&#xD;&#xA;Override the `RuntimeOrigin`: https://github.com/paritytech/substrate/blob/41ae90843b070786ab53071479c141a7c6649ac9/frame/collective/src/lib.rs#L186&#xD;&#xA;&#xD;&#xA;Then use this macro to &quot;activate&quot; it: https://github.com/paritytech/substrate/blob/41ae90843b070786ab53071479c141a7c6649ac9/frame/collective/src/lib.rs#L248-L250.&#xD;&#xA;&#xD;&#xA;You can search the keyword `RawOrigin` within this pallet to get more details." ContentLicense="CC BY-SA 4.0" />
  <row Id="27194" PostHistoryTypeId="2" PostId="7123" RevisionGUID="5135426a-5b03-4bf2-951e-54eff03b75c4" CreationDate="2023-02-07T15:24:03.347" UserId="3327" Text="While configuring any pallet (treasury pallet in my case), we need to configure some required associative types. To set the values of these required types, we mostly define some constants within parameter_types!() macro. &#xD;&#xA;&#xD;&#xA;I will quote here the example of pallet_treasury configuration in kausama [here][1].&#xD;&#xA;&#xD;&#xA;in the given example, a constant is defined to be used for palletID required associative type like this:&#xD;&#xA;&#xD;&#xA;**pub const TreasuryPalletId: PalletId = PalletId(*b&quot;py/trsry&quot;);**&#xD;&#xA;&#xD;&#xA;Now my question is, can we refer that constant anywhere else in our time code? if Yes how?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L611" ContentLicense="CC BY-SA 4.0" />
  <row Id="27196" PostHistoryTypeId="1" PostId="7123" RevisionGUID="5135426a-5b03-4bf2-951e-54eff03b75c4" CreationDate="2023-02-07T15:24:03.347" UserId="3327" Text="How to access the constant defined inside parameter_types! () macro" ContentLicense="CC BY-SA 4.0" />
  <row Id="27197" PostHistoryTypeId="3" PostId="7123" RevisionGUID="5135426a-5b03-4bf2-951e-54eff03b75c4" CreationDate="2023-02-07T15:24:03.347" UserId="3327" Text="|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27198" PostHistoryTypeId="5" PostId="7123" RevisionGUID="1f25f507-6bdd-4ece-82ba-817d684b2407" CreationDate="2023-02-07T15:28:54.880" UserId="251" Comment="added 18 characters in body" Text="While configuring any pallet (treasury pallet in my case), we need to configure some required associative types. To set the values of these required types, we mostly define some constants within the `parameter_types!()` macro. &#xD;&#xA;&#xD;&#xA;I will quote here the example of pallet_treasury configuration in Kusama [here][1].&#xD;&#xA;&#xD;&#xA;in the given example, a constant is defined to be used for `PalletID` required associative type like this:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L611&#xD;&#xA;```rs&#xD;&#xA;pub const TreasuryPalletId: PalletId = PalletId(*b&quot;py/trsry&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now my question is, can we refer to that constant anywhere else in our time code? if Yes how?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27199" PostHistoryTypeId="5" PostId="7123" RevisionGUID="1bd97532-414b-469e-ae7e-3a1d23463b0b" CreationDate="2023-02-07T15:34:54.610" UserId="251" Comment="deleted 1 character in body" Text="While configuring any pallet (treasury pallet in my case), we need to configure some required associative types. To set the values of these required types, we mostly define some constants within the `parameter_types!()` macro. &#xD;&#xA;&#xD;&#xA;I will quote here the example of `pallet_treasury` configuration in Kusama [here](https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L611).&#xD;&#xA;&#xD;&#xA;In the given example, a constant is defined to be used for `PalletId` required associative type like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub const TreasuryPalletId: PalletId = PalletId(*b&quot;py/trsry&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now my question is, can we refer to that constant anywhere else in our time code? if Yes how?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27200" PostHistoryTypeId="5" PostId="7123" RevisionGUID="958982d0-2eaa-4d4d-9b89-26bac90c9ce9" CreationDate="2023-02-07T15:35:20.127" UserId="3327" Comment="added 3 characters in body" Text="While configuring any pallet (treasury pallet in my case), we need to configure some required associative types. To set the values of these required types, we mostly define some constants within the `parameter_types!()` macro. &#xD;&#xA;&#xD;&#xA;I will quote here the example of pallet_treasury configuration in Kusama [here][1].&#xD;&#xA;&#xD;&#xA;in the given example, a constant is defined to be used for `PalletID` required associative type like this:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L611&#xD;&#xA;```rs&#xD;&#xA;pub const TreasuryPalletId: PalletId = PalletId(*b&quot;py/trsry&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now my question is, can we refer to that constant anywhere else in our runtime code? if Yes how?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27201" PostHistoryTypeId="5" PostId="7123" RevisionGUID="ed087b3a-e2e3-4aeb-98ff-fb6a957ae86d" CreationDate="2023-02-07T15:36:02.890" UserId="251" Comment="deleted 3 characters in body" Text="While configuring any pallet (treasury pallet in my case), we need to configure some required associative types. To set the values of these required types, we mostly define some constants within the `parameter_types!()` macro. &#xD;&#xA;&#xD;&#xA;I will quote here the example of pallet_treasury configuration in Kusama [here](https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L611).&#xD;&#xA;&#xD;&#xA;In the given example, a constant is defined to be used for `PalletId` required associative type like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub const TreasuryPalletId: PalletId = PalletId(*b&quot;py/trsry&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now my question is, can we refer to that constant anywhere else in our runtime code? if Yes how?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27202" PostHistoryTypeId="2" PostId="7124" RevisionGUID="5799af49-8284-47e2-93b2-d8e30d4e2da7" CreationDate="2023-02-07T15:39:11.783" UserId="251" Text="`parameter_types` will implement the `Get` for you.&#xD;&#xA;&#xD;&#xA;Just:&#xD;&#xA;```rs&#xD;&#xA;fn example() {&#xD;&#xA;	let treasury_pallet_id = TreasuryPalletId::get();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27204" PostHistoryTypeId="2" PostId="7125" RevisionGUID="65eb91aa-6dd8-47d1-bf2b-ebc8187404fc" CreationDate="2023-02-07T15:42:38.387" UserId="2762" Text="In the code you have the config of the pallet like `impl pallet_treasury::Config for Runtime` and before it you define the constants of that pallet with the `parameter_types!` macro but is not mandatory to have one  `parameter_types!` defined before each pallet is just for readability, you can have one at the top of your code file with the constants of all pallets.&#xD;&#xA;&#xD;&#xA;See this example in the Kusama runtime:&#xD;&#xA; The const [MaximumReasonLength][1] is defined once and used in the [pallet_bounties][1] and in the [pallet_tips][2].&#xD;&#xA;&#xD;&#xA;Another option is define it like a const, in the Kusama runtime take a look into the const `VERSION` defined [here][3] and used in the pallet [frame_system][3] and in the apis implementation [here][4].&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L671&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L688&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L124&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L1584" ContentLicense="CC BY-SA 4.0" />
  <row Id="27206" PostHistoryTypeId="2" PostId="7126" RevisionGUID="77722be0-568f-4a7a-954e-ac0f09600e8b" CreationDate="2023-02-07T15:57:00.727" UserId="3708" Text="I’m working on a [sdk for xcm][1] and I made some [examples using Rockmine and Dali][2]. I noticed today the Dali rpc isn't working and isn’t in parachains list in rococo. I tried to transfer ROC from Rockmine to Dolphin (It has an open hrmp channel with rockmine), but It didn’t work.&#xD;&#xA;Dali will be alive again?.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/blockcoders/xcm-sdk&#xD;&#xA;  [2]: https://github.com/blockcoders/xcm-sdk/blob/main/README.md#send-native-asset-roc-from-rockmine-to-dali" ContentLicense="CC BY-SA 4.0" />
  <row Id="27208" PostHistoryTypeId="1" PostId="7126" RevisionGUID="77722be0-568f-4a7a-954e-ac0f09600e8b" CreationDate="2023-02-07T15:57:00.727" UserId="3708" Text="Dali parachain is not in Rococo anymore?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27209" PostHistoryTypeId="3" PostId="7126" RevisionGUID="77722be0-568f-4a7a-954e-ac0f09600e8b" CreationDate="2023-02-07T15:57:00.727" UserId="3708" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27210" PostHistoryTypeId="2" PostId="7127" RevisionGUID="1c983fdc-f11c-4ceb-94ac-2996ce0e01aa" CreationDate="2023-02-07T17:05:09.763" UserId="3736" Text="I want to unstake the sum on a stash account. The classic way is to chill the account first, then to unbond the sum (and possibly to call &quot;withdrawUnbonded&quot; before &quot;unbond&quot;, to free unlocking chunk slots). Could I achieve the same instead through a single call to &quot;fast_unstake&quot; (possibly still preceeded by a call to &quot;withdrawUnbonded&quot;)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27212" PostHistoryTypeId="1" PostId="7127" RevisionGUID="1c983fdc-f11c-4ceb-94ac-2996ce0e01aa" CreationDate="2023-02-07T17:05:09.763" UserId="3736" Text="Is a &quot;fast_unstake&quot; call (eg. in Polkadot.js) equivalent to a &quot;chill&quot; followed to &quot;unbond&quot; (for the full stake in the stash)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27213" PostHistoryTypeId="3" PostId="7127" RevisionGUID="1c983fdc-f11c-4ceb-94ac-2996ce0e01aa" CreationDate="2023-02-07T17:05:09.763" UserId="3736" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27214" PostHistoryTypeId="2" PostId="7128" RevisionGUID="985526b6-4260-4088-86e7-8c2144990691" CreationDate="2023-02-07T17:17:04.283" UserId="167" Text="`fast_unstake` is meant to be used only under certain conditions, as explained [here](https://paritytech.github.io/substrate/master/pallet_fast_unstake/index.html): &#xD;&#xA;&#xD;&#xA;&gt; If a nominator is not exposed in any `ErasStakers` (i.e. “has not actively backed any validators in the last `BondingDuration` eras”), then they can register themselves in this pallet, unstake faster than having to wait an entire bonding duration.&#xD;&#xA;&#xD;&#xA;That being said, you are correct to think that `fast_unstake`, under the hood, calls `chill()`, then `unbond(all_tokens)`. This is explained in the [`Call::register_fast_unstake`](https://paritytech.github.io/substrate/master/pallet_fast_unstake/pallet/enum.Call.html#variant.register_fast_unstake) section.&#xD;&#xA;&#xD;&#xA;But, I want to warn you that using `register_fast_unstake` for stakers that do not qualify might result in a small slash of a deposit.&#xD;&#xA;&#xD;&#xA;&gt; If unsuccessful, meaning that the staker was exposed sometime in the last BondingDuration eras they will end up being slashed for the amount of wasted work they have inflicted on the chian.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27216" PostHistoryTypeId="2" PostId="7129" RevisionGUID="c2ae2678-f458-4b1b-ba5b-8cbb7bcb0fb4" CreationDate="2023-02-07T17:26:32.707" UserId="167" Text=" Your are right to think that you need to encode the `UncheckedExtrinsic` type. &#xD;&#xA;&#xD;&#xA;For that you need: &#xD;&#xA;&#xD;&#xA;1. `signature`, which in your case it should be `None`.&#xD;&#xA;2. A `call`, which should be the encoding of `enum RuntimeCall` in your runtime. &#xD;&#xA;&#xD;&#xA;The easy way to find the `enum RuntimeCall` is to get it from your runtime crate. This enum is generated by `construct_runtime`. For example, in the polkadot runtime, you can see it [here](https://paritytech.github.io/polkadot/doc/polkadot_runtime/enum.RuntimeCall.html).  " ContentLicense="CC BY-SA 4.0" />
  <row Id="27218" PostHistoryTypeId="2" PostId="7130" RevisionGUID="665a0a91-fcd2-4d9e-bc9a-72940e28505b" CreationDate="2023-02-07T18:28:28.897" UserId="3538" Text="I want to add my chain types to the `Polkadot-js/apps` in order to reflect the changes on frontend. I've tried generating types using [this](https://polkadot.js.org/docs/api/examples/promise/typegen) tutorial, but I've no idea how can I use them in `Polkadot-js/apps` for my custom chain. If anyone could point to a tutorial or an implementation to this, that'd be super helpful.&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="27220" PostHistoryTypeId="1" PostId="7130" RevisionGUID="665a0a91-fcd2-4d9e-bc9a-72940e28505b" CreationDate="2023-02-07T18:28:28.897" UserId="3538" Text="Add my custom chain types to Polkadot-js/apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="27221" PostHistoryTypeId="3" PostId="7130" RevisionGUID="665a0a91-fcd2-4d9e-bc9a-72940e28505b" CreationDate="2023-02-07T18:28:28.897" UserId="3538" Text="|substrate-node-template|custom-types|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27222" PostHistoryTypeId="52" PostId="7117" RevisionGUID="2cb79b0c-5af3-4614-b8c8-ef8ec0253d0a" CreationDate="2023-02-07T19:42:08.143" />
  <row Id="27223" PostHistoryTypeId="6" PostId="7126" RevisionGUID="c7bad633-fbf3-481f-b46a-ba1d0276416e" CreationDate="2023-02-07T23:47:53.450" UserId="34" Comment="edited tags" Text="|xcm|rococo|sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27224" PostHistoryTypeId="2" PostId="7131" RevisionGUID="01bf8ddf-8302-4b6f-a6aa-5e62d9a130cc" CreationDate="2023-02-08T03:33:56.080" UserId="83" Text="In the [Usage section of the Polkadot.js typegen tutorial](https://polkadot.js.org/docs/api/examples/promise/typegen/#usage) it first shows how to extract the types from your custom type definitions, for example see how the Edgeware team releases versions their types for the community [here](https://www.npmjs.com/package/@edgeware/node-types), then when they create an instance of the API they introduce the types registry to inject the types and override existing types as described [here](https://polkadot.js.org/docs/api/start/types.extend#extension) so the API understands the types from the metadata. &#xD;&#xA;&#xD;&#xA;For example, if you built your custom chain using the substrate-node-template but you changed the implementation so the default Balance type of `u128` [here](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/src/lib.rs#L64) became `u64` instead, then you would create the instance of your API with:&#xD;&#xA;```javascript&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;const wsProvider = new WsProvider('ws://127.0.0.1:9944');&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;  provider: wsProvider,&#xD;&#xA;  types: {&#xD;&#xA;    Balance: 'u64'&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;Alternatively you could create it using the syntax `const api = new ApiPromise({ provider: wsProvider, types: { ... } });` as mentioned [here](https://polkadot.js.org/docs/api/start/create#api-instance).&#xD;&#xA;&#xD;&#xA;So if you were building your frontend based on the substrate-front-end-template then you would add those custom types [here](https://github.com/substrate-developer-hub/substrate-front-end-template/blob/main/src/substrate-lib/SubstrateContext.js#L69) where they create the instance of the API.&#xD;&#xA;&#xD;&#xA;As mentioned at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/settings/developer, if you are a development team with at least a test network that is available and listed at https://polkadot.js.org/apps, then you could consider modifying the [apps-config](https://github.com/polkadot-js/apps/tree/master/packages/apps-config) package and creating a Pull Request into the https://github.com/polkadot-js repository to add the types directly so they would be automatically configured when anyone tried to connect to it.&#xD;&#xA;&#xD;&#xA;Or if you just wanted to interact with your custom Substrate node running on your local machine you could just go to:&#xD;&#xA;https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/settings/developer, paste your additional types, and then press the Save button.&#xD;&#xA;&#xD;&#xA;For example, below is an example of the custom types you might paste to be compatible with a recent release of the [Polkadot.js API] API(https://www.npmjs.com/package/@polkadot/api) where you could add the correct `AccountInfo` type for your chain, such as providing a value of  [`AccountInfoWithDualRefCount`](https://github.com/polkadot-js/api/blob/master/packages/types-augment/src/registry/interfaces.ts#L85) if your custom chain uses the old-style double refcount (with 4 bytes missing) if the API defaulted to more recent [triple refcount](https://github.com/paritytech/substrate/blob/master/frame/system/src/migrations/mod.rs).&#xD;&#xA;In the example below we have also assumed that the custom chain uses a custom `Balance` type of `u64`, an `Address` type of `MultiAddress` as shown [here](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/src/lib.rs#L305), and where a standalone chain is being used with [two session keys (i.e. Grandpa, Aura) in the chain specification](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs#L35) so custom `Keys` type of [`SessionKeys2`](https://github.com/polkadot-js/api/blob/master/packages/types/src/interfaces/session/definitions.ts#L26) is used.&#xD;&#xA;If you were to modify your custom chain to use four session keys instead (i.e. Grandpa, Babe, ImOnline, AuthorityDiscovery) then you would change the value to `SessionKeys4`.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  AccountInfo: &quot;AccountInfoWithDualRefCount&quot;,&#xD;&#xA;  Keys: &quot;SessionKeys2&quot;,&#xD;&#xA;  Address: &quot;MultiAddress&quot;,&#xD;&#xA;  LookupSource: &quot;MultiAddress&quot;,&#xD;&#xA;  Balance: &quot;u64&quot;,&#xD;&#xA;  User: &quot;[u8; 16]&quot;,&#xD;&#xA;  UserInfo: {&#xD;&#xA;    &quot;user_name&quot;: &quot;Text&quot;,&#xD;&#xA;    &quot;user_address&quot;: &quot;AccountId&quot;,&#xD;&#xA;    &quot;user_storage_hash&quot;: &quot;Hash&quot;,&#xD;&#xA;    &quot;user_dob&quot;: &quot;Date&quot;,&#xD;&#xA;    &quot;user_reward&quot;: &quot;Balance&quot;,&#xD;&#xA;    &quot;user_reward_at_block&quot;: &quot;Moment&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you created your chain based on the substrate-node-template and in runtime/lib.rs you added the following types to configure the pallet-template.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_template::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;&#xD;&#xA;    // https://polkadot.js.org/api/types&#xD;&#xA;    type User = [u8; 16];&#xD;&#xA;    type UserIndex = u64;&#xD;&#xA;    type UserName = Vec&lt;u8&gt;; // Text&#xD;&#xA;    type UserAddress = AccountId;&#xD;&#xA;    type UserExternalStorageHash = Hash;&#xD;&#xA;    type UserDOB = i64; // https://docs.rs/chrono/latest/chrono/&#xD;&#xA;    type UserReward = Balance;&#xD;&#xA;    type UserRewardAtBlock = u64;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then in pallets/template/src/lib.rs, you could use [user-defined structs](https://polkadot.js.org/docs/api/start/types.extend#user-defined-structs) and use them to set and retrieve data from storage, as shown [here](https://github.com/DataHighway-DHX/node/blob/master/pallets/roaming/roaming-accounting-policies/src/lib.rs#L145).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Clone, PartialEq, Eq)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;pub struct User(pub [u8; 16]);&#xD;&#xA;&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;#[derive(Encode, Decode, Default, Clone, PartialEq)]&#xD;&#xA;// Generic type parameters&#xD;&#xA;pub struct UserInfo&lt;U, V, W, X, Y, Z&gt; {&#xD;&#xA;    pub user_name: U, // Text&#xD;&#xA;    pub user_address: V, // AccountId&#xD;&#xA;    pub user_storage_hash: W, // Hash&#xD;&#xA;    pub user_dob: X, // i64&#xD;&#xA;    pub user_reward: Y, // Balance&#xD;&#xA;    pub user_reward_at_block: Z // u64&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27226" PostHistoryTypeId="5" PostId="7131" RevisionGUID="03527067-661e-422e-9efc-56f41b5db00d" CreationDate="2023-02-08T03:42:55.243" UserId="83" Comment="add link to substrate kitties tutorial" Text="In the [Usage section of the Polkadot.js typegen tutorial](https://polkadot.js.org/docs/api/examples/promise/typegen/#usage) it first shows how to extract the types from your custom type definitions, for example see how the Edgeware team releases versions their types for the community [here](https://www.npmjs.com/package/@edgeware/node-types), then when they create an instance of the API they introduce the types registry to inject the types and override existing types as described [here](https://polkadot.js.org/docs/api/start/types.extend#extension) so the API understands the types from the metadata. &#xD;&#xA;&#xD;&#xA;For example, if you built your custom chain using the substrate-node-template but you changed the implementation so the default Balance type of `u128` [here](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/src/lib.rs#L64) became `u64` instead, then you would create the instance of your API with:&#xD;&#xA;```javascript&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;const wsProvider = new WsProvider('ws://127.0.0.1:9944');&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;  provider: wsProvider,&#xD;&#xA;  types: {&#xD;&#xA;    Balance: 'u64'&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;Alternatively you could create it using the syntax `const api = new ApiPromise({ provider: wsProvider, types: { ... } });` as mentioned [here](https://polkadot.js.org/docs/api/start/create#api-instance).&#xD;&#xA;&#xD;&#xA;So if you were building your frontend based on the substrate-front-end-template then you would add those custom types [here](https://github.com/substrate-developer-hub/substrate-front-end-template/blob/main/src/substrate-lib/SubstrateContext.js#L69) where they create the instance of the API.&#xD;&#xA;&#xD;&#xA;As mentioned at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/settings/developer, if you are a development team with at least a test network that is available and listed at https://polkadot.js.org/apps, then you could consider modifying the [apps-config](https://github.com/polkadot-js/apps/tree/master/packages/apps-config) package and creating a Pull Request into the https://github.com/polkadot-js repository to add the types directly so they would be automatically configured when anyone tried to connect to it.&#xD;&#xA;&#xD;&#xA;Or if you just wanted to interact with your custom Substrate node running on your local machine you could just go to:&#xD;&#xA;https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/settings/developer, paste your additional types, and then press the Save button.&#xD;&#xA;&#xD;&#xA;For example, below is an example of the custom types you might paste to be compatible with a recent release of the [Polkadot.js API] API(https://www.npmjs.com/package/@polkadot/api) where you could add the correct `AccountInfo` type for your chain, such as providing a value of  [`AccountInfoWithDualRefCount`](https://github.com/polkadot-js/api/blob/master/packages/types-augment/src/registry/interfaces.ts#L85) if your custom chain uses the old-style double refcount (with 4 bytes missing) if the API defaulted to more recent [triple refcount](https://github.com/paritytech/substrate/blob/master/frame/system/src/migrations/mod.rs).&#xD;&#xA;In the example below we have also assumed that the custom chain uses a custom `Balance` type of `u64`, an `Address` type of `MultiAddress` as shown [here](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/src/lib.rs#L305), and where a standalone chain is being used with [two session keys (i.e. Grandpa, Aura) in the chain specification](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs#L35) so custom `Keys` type of [`SessionKeys2`](https://github.com/polkadot-js/api/blob/master/packages/types/src/interfaces/session/definitions.ts#L26) is used.&#xD;&#xA;If you were to modify your custom chain to use four session keys instead (i.e. Grandpa, Babe, ImOnline, AuthorityDiscovery) then you would change the value to `SessionKeys4`.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  AccountInfo: &quot;AccountInfoWithDualRefCount&quot;,&#xD;&#xA;  Keys: &quot;SessionKeys2&quot;,&#xD;&#xA;  Address: &quot;MultiAddress&quot;,&#xD;&#xA;  LookupSource: &quot;MultiAddress&quot;,&#xD;&#xA;  Balance: &quot;u64&quot;,&#xD;&#xA;  UserInfo: {&#xD;&#xA;    &quot;user_dna&quot;: &quot;[u8; 16]&quot;&#xD;&#xA;    &quot;user_name&quot;: &quot;Text&quot;,&#xD;&#xA;    &quot;user_address&quot;: &quot;AccountId&quot;,&#xD;&#xA;    &quot;user_storage_hash&quot;: &quot;Hash&quot;,&#xD;&#xA;    &quot;user_dob&quot;: &quot;Date&quot;,&#xD;&#xA;    &quot;user_reward&quot;: &quot;Balance&quot;,&#xD;&#xA;    &quot;user_reward_at_block&quot;: &quot;Moment&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you created your chain based on the substrate-node-template and in runtime/lib.rs you added the following types to configure the pallet-template.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_template::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;&#xD;&#xA;    // https://polkadot.js.org/api/types&#xD;&#xA;    type UserDNA = [u8; 16];&#xD;&#xA;    type UserIndex = u64;&#xD;&#xA;    type UserName = Vec&lt;u8&gt;; // Text&#xD;&#xA;    type UserAddress = AccountId;&#xD;&#xA;    type UserExternalStorageHash = Hash;&#xD;&#xA;    // https://docs.rs/chrono/latest/chrono/&#xD;&#xA;    type UserDOB = i64;&#xD;&#xA;    // https://substrate.recipes/currency.html#just-plain-currency&#xD;&#xA;    type UserReward = Balance;&#xD;&#xA;    type UserRewardAtBlock = u64;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then in pallets/template/src/lib.rs, you could use [user-defined structs](https://polkadot.js.org/docs/api/start/types.extend#user-defined-structs) and use them to set and retrieve data from storage, as shown [here](https://doc.deepernetwork.org/tutorials/v3/kitties/pt1/#scaffold-kitty-struct) in the Substrate kitties tutorial and elsewhere [here](https://github.com/DataHighway-DHX/node/blob/master/pallets/roaming/roaming-accounting-policies/src/lib.rs#L145).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Clone, PartialEq, Eq)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;pub struct User(pub [u8; 16]);&#xD;&#xA;&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;#[derive(Encode, Decode, Default, Clone, PartialEq)]&#xD;&#xA;// Generic type parameters&#xD;&#xA;pub struct UserInfo&lt;U, V, W, X, Y, Z&gt; {&#xD;&#xA;    pub user_name: U, // Text&#xD;&#xA;    pub user_address: V, // AccountId&#xD;&#xA;    pub user_storage_hash: W, // Hash&#xD;&#xA;    pub user_dob: X, // i64&#xD;&#xA;    pub user_reward: Y, // Balance&#xD;&#xA;    pub user_reward_at_block: Z // u64&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27227" PostHistoryTypeId="5" PostId="7131" RevisionGUID="7b1b2f13-de51-482d-b8bd-afe80b659fa6" CreationDate="2023-02-08T03:53:14.593" UserId="83" Comment="fix formatting" Text="In the [Usage section of the Polkadot.js typegen tutorial](https://polkadot.js.org/docs/api/examples/promise/typegen/#usage) it first shows how to extract the types from your custom type definitions, for example see how the Edgeware team releases versions their types for the community [here](https://www.npmjs.com/package/@edgeware/node-types), then when they create an instance of the API they introduce the types registry to inject the types and override existing types as described [here](https://polkadot.js.org/docs/api/start/types.extend#extension) so the API understands the types from the metadata. &#xD;&#xA;&#xD;&#xA;For example, if you built your custom chain using the substrate-node-template but you changed the implementation so the default Balance type of `u128` [here](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/src/lib.rs#L64) became `u64` instead, then you would create the instance of your API with:&#xD;&#xA;```javascript&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;const wsProvider = new WsProvider('ws://127.0.0.1:9944');&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;  provider: wsProvider,&#xD;&#xA;  types: {&#xD;&#xA;    Balance: 'u64'&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;Alternatively you could create it using the syntax `const api = new ApiPromise({ provider: wsProvider, types: { ... } });` as mentioned [here](https://polkadot.js.org/docs/api/start/create#api-instance).&#xD;&#xA;&#xD;&#xA;So if you were building your frontend based on the substrate-front-end-template then you would add those custom types [here](https://github.com/substrate-developer-hub/substrate-front-end-template/blob/main/src/substrate-lib/SubstrateContext.js#L69) where they create the instance of the API.&#xD;&#xA;&#xD;&#xA;As mentioned at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/settings/developer, if you are a development team with at least a test network that is available and listed at https://polkadot.js.org/apps, then you could consider modifying the [apps-config](https://github.com/polkadot-js/apps/tree/master/packages/apps-config) package and creating a Pull Request into the https://github.com/polkadot-js repository to add the types directly so they would be automatically configured when anyone tried to connect to it.&#xD;&#xA;&#xD;&#xA;Or if you just wanted to interact with your custom Substrate node running on your local machine you could just go to:&#xD;&#xA;https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/settings/developer, paste your additional types, and then press the Save button.&#xD;&#xA;&#xD;&#xA;For example, below is an example of the custom types you might paste to be compatible with a recent release of the [Polkadot.js API](https://www.npmjs.com/package/@polkadot/api) where you could add the correct `AccountInfo` type for your chain, such as providing a value of  [`AccountInfoWithDualRefCount`](https://github.com/polkadot-js/api/blob/master/packages/types-augment/src/registry/interfaces.ts#L85) if your custom chain uses the old-style double refcount (with 4 bytes missing) if the API defaulted to more recent [triple refcount](https://github.com/paritytech/substrate/blob/master/frame/system/src/migrations/mod.rs).&#xD;&#xA;In the example below we have also assumed that the custom chain uses a custom `Balance` type of `u64`, an `Address` type of `MultiAddress` as shown [here](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/src/lib.rs#L305), and where a standalone chain is being used with [two session keys (i.e. Grandpa, Aura) in the chain specification](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs#L35) so custom `Keys` type of [`SessionKeys2`](https://github.com/polkadot-js/api/blob/master/packages/types/src/interfaces/session/definitions.ts#L26) is used.&#xD;&#xA;If you were to modify your custom chain to use four session keys instead (i.e. Grandpa, Babe, ImOnline, AuthorityDiscovery) then you would change the value to `SessionKeys4`.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  AccountInfo: &quot;AccountInfoWithDualRefCount&quot;,&#xD;&#xA;  Keys: &quot;SessionKeys2&quot;,&#xD;&#xA;  Address: &quot;MultiAddress&quot;,&#xD;&#xA;  LookupSource: &quot;MultiAddress&quot;,&#xD;&#xA;  Balance: &quot;u64&quot;,&#xD;&#xA;  UserInfo: {&#xD;&#xA;    &quot;user_dna&quot;: &quot;[u8; 16]&quot;&#xD;&#xA;    &quot;user_name&quot;: &quot;Text&quot;,&#xD;&#xA;    &quot;user_address&quot;: &quot;AccountId&quot;,&#xD;&#xA;    &quot;user_storage_hash&quot;: &quot;Hash&quot;,&#xD;&#xA;    &quot;user_dob&quot;: &quot;Date&quot;,&#xD;&#xA;    &quot;user_reward&quot;: &quot;Balance&quot;,&#xD;&#xA;    &quot;user_reward_at_block&quot;: &quot;Moment&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you created your chain based on the substrate-node-template and in runtime/lib.rs you added the following types to configure the pallet-template.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_template::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;&#xD;&#xA;    // https://polkadot.js.org/api/types&#xD;&#xA;    type UserDNA = [u8; 16];&#xD;&#xA;    type UserIndex = u64;&#xD;&#xA;    type UserName = Vec&lt;u8&gt;; // Text&#xD;&#xA;    type UserAddress = AccountId;&#xD;&#xA;    type UserExternalStorageHash = Hash;&#xD;&#xA;    // https://docs.rs/chrono/latest/chrono/&#xD;&#xA;    type UserDOB = i64;&#xD;&#xA;    // https://substrate.recipes/currency.html#just-plain-currency&#xD;&#xA;    type UserReward = Balance;&#xD;&#xA;    type UserRewardAtBlock = u64;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then in pallets/template/src/lib.rs, you could use [user-defined structs](https://polkadot.js.org/docs/api/start/types.extend#user-defined-structs) and use them to set and retrieve data from storage, as shown [here](https://doc.deepernetwork.org/tutorials/v3/kitties/pt1/#scaffold-kitty-struct) in the Substrate kitties tutorial and elsewhere [here](https://github.com/DataHighway-DHX/node/blob/master/pallets/roaming/roaming-accounting-policies/src/lib.rs#L145).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Clone, PartialEq, Eq)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;pub struct User(pub [u8; 16]);&#xD;&#xA;&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Debug))]&#xD;&#xA;#[derive(Encode, Decode, Default, Clone, PartialEq)]&#xD;&#xA;// Generic type parameters&#xD;&#xA;pub struct UserInfo&lt;U, V, W, X, Y, Z&gt; {&#xD;&#xA;    pub user_name: U, // Text&#xD;&#xA;    pub user_address: V, // AccountId&#xD;&#xA;    pub user_storage_hash: W, // Hash&#xD;&#xA;    pub user_dob: X, // i64&#xD;&#xA;    pub user_reward: Y, // Balance&#xD;&#xA;    pub user_reward_at_block: Z // u64&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27229" PostHistoryTypeId="15" PostId="7106" RevisionGUID="5ac7e2e9-068e-4c22-ba89-b68c628ae445" CreationDate="2023-02-08T05:12:00.103" UserId="-1" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;}]}" />
  <row Id="27230" PostHistoryTypeId="2" PostId="7132" RevisionGUID="ddfcf1e2-c6c4-474a-9d05-3413b0c9fbeb" CreationDate="2023-02-08T06:07:31.817" UserId="2722" Text="I want create a custom token in Substrate by the name GGG and I want to use this token for each transaction fee instead of the default Substrate token. Can someone please guide me on how to change the native token in Substrate to my custom token GGG?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27232" PostHistoryTypeId="1" PostId="7132" RevisionGUID="ddfcf1e2-c6c4-474a-9d05-3413b0c9fbeb" CreationDate="2023-02-08T06:07:31.817" UserId="2722" Text="How to change the native token in Substrate to a custom token?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27233" PostHistoryTypeId="3" PostId="7132" RevisionGUID="ddfcf1e2-c6c4-474a-9d05-3413b0c9fbeb" CreationDate="2023-02-08T06:07:31.817" UserId="2722" Text="|substrate-node-template|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27234" PostHistoryTypeId="2" PostId="7133" RevisionGUID="e85188b8-8d6a-44e7-8b4f-e3beba3d42a6" CreationDate="2023-02-08T06:35:25.107" UserId="1960" Text="Trying to create a mock environment for testing a pallet, but getting an error msg failed `to resolve: could not find `tt_error_token` in the crate root` whenever trying to add my pallet in the mock environment." ContentLicense="CC BY-SA 4.0" />
  <row Id="27236" PostHistoryTypeId="1" PostId="7133" RevisionGUID="e85188b8-8d6a-44e7-8b4f-e3beba3d42a6" CreationDate="2023-02-08T06:35:25.107" UserId="1960" Text="construct_runtime macro panics in a mock environment while it builds in normal runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="27237" PostHistoryTypeId="3" PostId="7133" RevisionGUID="e85188b8-8d6a-44e7-8b4f-e3beba3d42a6" CreationDate="2023-02-08T06:35:25.107" UserId="1960" Text="|frame|testing|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27238" PostHistoryTypeId="2" PostId="7134" RevisionGUID="3540d516-e4b2-4071-8de1-f5ed989c52a7" CreationDate="2023-02-08T06:50:10.443" UserId="139" Text="All you need to do is set a custom property for token symbol in the `chainspec.rs` file in the function where you generate the chainspec config. This is typically a function that goes by the name of `development_config` in the substrate node template. Here I've done it:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let mut props = Properties::new();&#xD;&#xA;&#xD;&#xA;props.insert(&quot;tokenSymbol&quot;.into(), &quot;FYR&quot;.into()); &#xD;&#xA;&#xD;&#xA;props.insert(&quot;tokenDecimals&quot;.into(), &quot;6&quot;.into());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then finally attach it to the `ChainSpec` props field :&#xD;&#xA;```rust&#xD;&#xA;Ok(ChainSpec::from_genesis( &#xD;&#xA;     // Name&#xD;&#xA;     &quot;Development&quot;, &#xD;&#xA;     // ID &#xD;&#xA;      &quot;dev&quot;, &#xD;&#xA;      ChainType::Development, &#xD;&#xA;                 move || { &#xD;&#xA;                         testnet_genesis( &#xD;&#xA;                                 wasm_binary, &#xD;&#xA;                                 // Initial PoA authorities &#xD;&#xA;                                 vec![authority_keys_from_seed(&quot;Alice&quot;)], &#xD;&#xA;                                 // Sudo account &#xD;&#xA;                                 get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;), &#xD;&#xA;                                 // Pre-funded accounts &#xD;&#xA;                                 vec![ &#xD;&#xA;                                         get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;), &#xD;&#xA;                                         get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;), &#xD;&#xA;                                         get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;), &#xD;&#xA;                                         get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;), &#xD;&#xA;                                 ], &#xD;&#xA;                                 true, &#xD;&#xA;                         ) &#xD;&#xA;                 }, &#xD;&#xA;                 // Bootnodes &#xD;&#xA;                 vec![], &#xD;&#xA;                 // Telemetry &#xD;&#xA;                 None, &#xD;&#xA;                 // Protocol ID &#xD;&#xA;                 None, &#xD;&#xA;                 None, &#xD;&#xA;                 // Properties (*Attach your props here*)&#xD;&#xA;                 Some(props), &#xD;&#xA;                 // Extensions &#xD;&#xA;                 None, &#xD;&#xA;         ))&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27240" PostHistoryTypeId="2" PostId="7135" RevisionGUID="f2bf5473-c853-4fc6-938e-13319c503388" CreationDate="2023-02-08T07:59:25.470" UserId="2722" Text="How can I implement token registration, trading, and fee payment with my native token (GGG) in a decentralized exchange (DEX) built with Substrate?&#xD;&#xA;&#xD;&#xA;Specifically, I am looking to:&#xD;&#xA;&#xD;&#xA;Allow users to add their own tokens to the DEX and enable trading between different tokens.&#xD;&#xA;&#xD;&#xA;Use an off-chain worker to periodically send data to the main network and enforce the use of my native token (GGG) as the primary token in the network.&#xD;&#xA;&#xD;&#xA;Provide a way for users to upload their smart contracts to create custom tokens on my network. I want to know if I should use the substrate-node-contract or pallet-contract feature to do this.&#xD;&#xA;&#xD;&#xA;Ensure that all transactions in the network, including those in DApps, are conducted using my native token (GGG) as the fee payment.&#xD;&#xA;&#xD;&#xA;I would appreciate it if you could provide guidance on how to implement these features using the capabilities of Substrate." ContentLicense="CC BY-SA 4.0" />
  <row Id="27242" PostHistoryTypeId="1" PostId="7135" RevisionGUID="f2bf5473-c853-4fc6-938e-13319c503388" CreationDate="2023-02-08T07:59:25.470" UserId="2722" Text="How to implement token registration, trading and enforce the use of native token for fees in a DEX built with Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27243" PostHistoryTypeId="3" PostId="7135" RevisionGUID="f2bf5473-c853-4fc6-938e-13319c503388" CreationDate="2023-02-08T07:59:25.470" UserId="2722" Text="|substrate-node-template|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27244" PostHistoryTypeId="2" PostId="7136" RevisionGUID="ea62e8c4-a661-478a-bc9e-596ffbf14e91" CreationDate="2023-02-08T08:34:44.863" UserId="251" Text="You can create a function like this:&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia/blob/2d1c1436594b2c397d450e317c35eb16c71105d6/node/service/src/chain_spec/darwinia.rs#L52-L61&#xD;&#xA;&#xD;&#xA;Replace the names and the decimals with yours.&#xD;&#xA;&#xD;&#xA;One more thing, this could be a `Vec`. So, you can register multiple tokens at one time. As my example shows, our chain has 2 native tokens.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Then pass it to your genesis:&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia/blob/2d1c1436594b2c397d450e317c35eb16c71105d6/node/service/src/chain_spec/darwinia.rs#L334" ContentLicense="CC BY-SA 4.0" />
  <row Id="27246" PostHistoryTypeId="2" PostId="7137" RevisionGUID="d100b1d0-0730-498d-893c-704f2b74bca8" CreationDate="2023-02-08T09:03:20.530" UserId="2762" Text="I'd suggest to take this [pallet as a template for yours][1]. Is a pallet template from the Substrate Developer Hub repo.&#xD;&#xA;&#xD;&#xA;In this you can see how to [mock][2] the environment: &#xD;&#xA;&#xD;&#xA;    frame_support::construct_runtime!(&#xD;&#xA;	 pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	 {&#xD;&#xA;		System: frame_system,&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;	 }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;Adding the pallet_template:&#xD;&#xA;&#xD;&#xA;    impl pallet_template::Config for Test {&#xD;&#xA;	  type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And how to create the [unit tests][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/pallets/template&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/pallets/template/src/mock.rs&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/pallets/template/src/tests.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="27248" PostHistoryTypeId="10" PostId="7133" RevisionGUID="1b914559-14bc-4c4f-996a-bbc7348587c4" CreationDate="2023-02-08T09:11:38.797" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="27249" PostHistoryTypeId="2" PostId="7138" RevisionGUID="90fcf5b6-090b-4d2d-b486-a484e4815884" CreationDate="2023-02-08T09:43:28.503" UserId="2762" Text="To make the fee payment with your own token follow this [step-by-step old response][1] where you will have to add the pallet_asset_tx_paymentfro.&#xD;&#xA;&#xD;&#xA;I believe about how to create your own native token has been answered [here][2] already.&#xD;&#xA;&#xD;&#xA;To have the functionality that allows users to upload WebAssembly smart-contracts in your chain you have to add in your runtime the FRAME pallet [Contracts][3].&#xD;&#xA;&#xD;&#xA;[substrate-contracts-node][4] is an example of a node that has this pallet in its runtime. Another example you can check is [Contracts Rococo][5] which is a parachain node for smart contracts running in Rococo.&#xD;&#xA;&#xD;&#xA;In case you want to allow Solidity Smart contracts, is a bit more tricky but [there are some pallets][6] developed that allows it too. You can see an example of a node that has this pallet in its runtime checking the [frontier-node-template][7] and a tutorial about how to use it in the Substrate docs: [Access EVM Accounts][8].&#xD;&#xA;&#xD;&#xA;With the smart contracts feature you can allow users to develop smart contracts and deploy them in your chain implementing a DEX. You can also implement a pallet with the functionality of a DEX that lives in the runtime of your chain.&#xD;&#xA;&#xD;&#xA;I share you some resources that I believe can help:&#xD;&#xA; - [substrate-dex pallet:][9] This pallet re-implements Uniswap V1 protocol for decentralized exchange of fungible assets.&#xD;&#xA; - [Dex demo build by substrate][10]: This is a full node that acts as a decentralized exchange (DEX) build by substrate.&#xD;&#xA; - [Pablo][11]: a new-generation decentralized exchange (DEX) that will be the first protocol to launch on Picasso. Check the code of the pallet [here][12] and its implementation in Picasso network [here][13].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/3758/2762&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/7132/how-to-change-the-native-token-in-substrate-to-a-custom-token&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/master/frame/contracts&#xD;&#xA;  [4]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [5]: https://github.com/paritytech/cumulus/tree/master/parachains/runtimes/contracts/contracts-rococo&#xD;&#xA;  [6]: https://github.com/paritytech/frontier/tree/master/frame&#xD;&#xA;  [7]: https://github.com/substrate-developer-hub/frontier-node-template&#xD;&#xA;  [8]: https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts/&#xD;&#xA;  [9]: https://github.com/paritytech/substrate-dex&#xD;&#xA;  [10]: https://github.com/alexxuyang/substrate-dex&#xD;&#xA;  [11]: https://medium.com/@Picasso_Network/pablo-understanding-the-features-of-our-substrate-native-dex-2ade4bb7b53f&#xD;&#xA;  [12]: https://github.com/ComposableFi/composable/tree/main/code/parachain/frame/pablo&#xD;&#xA;  [13]: https://github.com/ComposableFi/composable/blob/main/code/parachain/runtime/picasso/Cargo.toml" ContentLicense="CC BY-SA 4.0" />
  <row Id="27251" PostHistoryTypeId="2" PostId="7139" RevisionGUID="427a27f2-7bfd-4872-bc46-ecbdcd8f188c" CreationDate="2023-02-08T10:54:49.570" UserId="3744" Text="Is there any way to convert an &amp;str into an AccountId inside a substrate pallet?&#xD;&#xA;&#xD;&#xA;I need this because a evm precompile is interactive with the pallet, and its sending the address (its already in substrate format b58) as a &amp;str." ContentLicense="CC BY-SA 4.0" />
  <row Id="27253" PostHistoryTypeId="1" PostId="7139" RevisionGUID="427a27f2-7bfd-4872-bc46-ecbdcd8f188c" CreationDate="2023-02-08T10:54:49.570" UserId="3744" Text="Is there any way to convert an &amp;str into an AccountId inside a substrate pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27254" PostHistoryTypeId="3" PostId="7139" RevisionGUID="427a27f2-7bfd-4872-bc46-ecbdcd8f188c" CreationDate="2023-02-08T10:54:49.570" UserId="3744" Text="|polkadot|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27255" PostHistoryTypeId="50" PostId="6610" RevisionGUID="998093fa-ddfa-4fa2-8c2e-7cb5d06f889a" CreationDate="2023-02-08T11:00:50.053" UserId="-1" />
  <row Id="27256" PostHistoryTypeId="2" PostId="7140" RevisionGUID="ed7e0d04-13a7-4b8c-bcb8-d029aaf65070" CreationDate="2023-02-08T11:36:01.857" UserId="251" Text="&gt; https://github.com/hack-ink/array-bytes&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let account_id_32 = array_bytes::hex_n_into::&lt;_, AccountId32, 32&gt;(public_key_str)?;&#xD;&#xA;let account_id_20 = array_bytes::hex_n_into::&lt;_, AccountId20, 20&gt;(public_key_str)?;&#xD;&#xA;&#xD;&#xA;// Or you might want to use `[u8; 32]`, `[u8; 20]`.&#xD;&#xA;let account_id_32 = array_bytes::hex2array::&lt;_, 32&gt;(public_key_str);&#xD;&#xA;let account_id_20 = array_bytes::hex2array::&lt;_, 20&gt;(public_key_str);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27258" PostHistoryTypeId="50" PostId="6623" RevisionGUID="429df9de-de09-48dd-aed1-c8cc6b76b660" CreationDate="2023-02-08T12:06:55.833" UserId="-1" />
  <row Id="27259" PostHistoryTypeId="2" PostId="7141" RevisionGUID="6f6236fb-9015-4f86-a17f-6f05cd65e405" CreationDate="2023-02-08T12:17:49.600" UserId="2762" Text="If you have the representation in ss58 format already check this old answer on StackOverflow: https://stackoverflow.com/a/66075924/5964038&#xD;&#xA;&#xD;&#xA;    let account_id: AccountId = AccountId::from_ss58check(&quot;AccountSs58Format&quot;).unwrap()&#xD;&#xA;&#xD;&#xA;In case you have the hex representation and want the AccountId, check this old answer from StackOverflow too: &#xD;&#xA;https://stackoverflow.com/questions/60983883/how-to-encode-the-hex-string-representation-of-an-account-id-in-substrate-using&#xD;&#xA;&#xD;&#xA;    let account: AccountId32 = hex_literal::hex![&quot;d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;].into();&#xD;&#xA;&#xD;&#xA;And then get the ss58-check string with `to_ss58check()`. &#xD;&#xA;&#xD;&#xA;Check the functions of the ss58 codec library [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-core/5.0.0/sp_core/crypto/trait.Ss58Codec.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="27261" PostHistoryTypeId="2" PostId="7142" RevisionGUID="fd8d8d92-be2a-4be6-9261-f79678d5afd5" CreationDate="2023-02-08T12:52:11.903" UserId="3808" Text="I'm trying to make a PoC (using frontier template) where I should update the `balance` of an EVM ERC-20.&#xD;&#xA;I guess that the steps should be as follows:&#xD;&#xA; 1. Calculate the storage slot like this tool does: https://github.com/danforbes/substrate-evm/blob/master/utils/README.md#commands&#xD;&#xA; 2. Write the EVM state&#xD;&#xA;3. Commit the State&#xD;&#xA;&#xD;&#xA;So, knowing this, I don't know where to start for updating the EVM storage from the Substrate Runtime... and I don't find any resource talking about that.&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27263" PostHistoryTypeId="1" PostId="7142" RevisionGUID="fd8d8d92-be2a-4be6-9261-f79678d5afd5" CreationDate="2023-02-08T12:52:11.903" UserId="3808" Text="Update ERC-20 Storage slot from Susbtrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="27264" PostHistoryTypeId="3" PostId="7142" RevisionGUID="fd8d8d92-be2a-4be6-9261-f79678d5afd5" CreationDate="2023-02-08T12:52:11.903" UserId="3808" Text="|substrate-node-template|evm|frontier|erc20|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27265" PostHistoryTypeId="2" PostId="7143" RevisionGUID="4a312c82-eb71-4bba-aa32-1e2a19cd1bd1" CreationDate="2023-02-08T15:34:22.187" UserId="246" Text="Interested in calculating the number of transactions submitted by type of node. Ie seeing how many transactions are originating from light clients vs full-nodes." ContentLicense="CC BY-SA 4.0" />
  <row Id="27267" PostHistoryTypeId="1" PostId="7143" RevisionGUID="4a312c82-eb71-4bba-aa32-1e2a19cd1bd1" CreationDate="2023-02-08T15:34:22.187" UserId="246" Text="Is there anyway to tell if a transaction was submitted by a light client on a substrate blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27268" PostHistoryTypeId="3" PostId="7143" RevisionGUID="4a312c82-eb71-4bba-aa32-1e2a19cd1bd1" CreationDate="2023-02-08T15:34:22.187" UserId="246" Text="|transactions|nodes|data-analytics|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27269" PostHistoryTypeId="52" PostId="7132" RevisionGUID="c77545e3-9eb8-49ba-98ac-2d408ed90d7d" CreationDate="2023-02-08T16:05:57.373" />
  <row Id="27270" PostHistoryTypeId="5" PostId="7140" RevisionGUID="64931c58-6072-431a-86b4-c9b2a3ceb598" CreationDate="2023-02-08T16:20:10.273" UserId="251" Comment="added 664 characters in body" Text="&gt; https://github.com/hack-ink/array-bytes&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let account_id_32 = array_bytes::hex_n_into::&lt;_, AccountId32, 32&gt;(public_key_str)?;&#xD;&#xA;let account_id_20 = array_bytes::hex_n_into::&lt;_, AccountId20, 20&gt;(public_key_str)?;&#xD;&#xA;&#xD;&#xA;// Or you might want to use `[u8; 32]`, `[u8; 20]`.&#xD;&#xA;let account_id_32 = array_bytes::hex2array::&lt;_, 32&gt;(public_key_str);&#xD;&#xA;let account_id_20 = array_bytes::hex2array::&lt;_, 20&gt;(public_key_str);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;If you want `AccountId` you'd better define a trait and implement it in the runtime level.&#xD;&#xA;&#xD;&#xA;Because the pallet doesn't know your `AcccountId` type. You don't know how many bytes that you should take.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// pallet&#xD;&#xA;pub trait Config {&#xD;&#xA;  type Str2AccountId: Str2AccountId,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub trait Str2AccountId {&#xD;&#xA;  type AccountId;&#xD;&#xA;&#xD;&#xA;  fn str2accountid(public_key_str: &amp;str) -&gt; Self::AccountId;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T&gt; Pallet&lt;T&gt;&#xD;&#xA;where&#xD;&#xA;  T: Config&#xD;&#xA;{&#xD;&#xA;  fn example(public_key_str: &amp;str) {&#xD;&#xA;    let account_id = T::StrToAccountId::str2accountid(public_key_str);&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// runtime&#xD;&#xA;pub struct StrToAccountId;&#xD;&#xA;impl pallet::StrToAccountId for StrToAccountId {&#xD;&#xA;  type AccountId = AccountId32;&#xD;&#xA;&#xD;&#xA;  fn str2accountid(public_key_str: &amp;str) -&gt; Self::AccountId {&#xD;&#xA;    array_bytes::hex2array::&lt;_, 32&gt;(public_key_str)&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet::Config for Runtime {&#xD;&#xA;  type StrToAccountId = StrToAccountId;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27271" PostHistoryTypeId="2" PostId="7144" RevisionGUID="a74be3df-57d1-4e00-a3f1-408eb9712469" CreationDate="2023-02-08T16:51:36.950" UserId="3317" Text="&#xD;&#xA;As far as Smoldot; a submitted transaction is validated and then send to full nodes. &#xD;&#xA;&#xD;&#xA;The full nodes will handle this transaction like any other transaction coming from another peer; validating it, and if correct, adding it to their transaction pool. &#xD;&#xA;&#xD;&#xA;Eventually the transaction will be added to a block. Smoldot is checking this for a certain amount of time and also if it is finalized. It updates the Smoldot user about this. &#xD;&#xA;&#xD;&#xA;However, generally there is no way of identifying whether a transaction is submitted through a light client or a full node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27273" PostHistoryTypeId="2" PostId="7145" RevisionGUID="f8c349f6-1fcb-4be0-a3e7-b6cb276df3cb" CreationDate="2023-02-08T17:16:43.967" UserId="73" Text="No there is no way to identify the source of a transaction. In general we are trying to make transaction submission as anynomous as possible. Including anything to identify the node type or similar would defeat this goal. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27275" PostHistoryTypeId="50" PostId="5951" RevisionGUID="2d527a03-a248-44f2-880c-233767a996e0" CreationDate="2023-02-08T18:00:25.047" UserId="-1" />
  <row Id="27276" PostHistoryTypeId="52" PostId="7139" RevisionGUID="97aed42d-3651-412b-b1ec-b9aa0ead2281" CreationDate="2023-02-08T18:57:08.647" />
  <row Id="27277" PostHistoryTypeId="52" PostId="7143" RevisionGUID="e94bae21-293a-4e9b-a283-29f0f16dab31" CreationDate="2023-02-08T23:34:42.827" />
  <row Id="27278" PostHistoryTypeId="2" PostId="7146" RevisionGUID="ed5edab1-9bfc-48fb-be45-4cd136fec16c" CreationDate="2023-02-09T00:31:36.380" UserId="3732" Text="I'm Hugo and testing the ReserveTransferAssets, but it didn't work well. So I summarized it in Notion to ask a question. Please see below link. &#xD;&#xA;&#xD;&#xA;https://broad-recess-88e.notion.site/Reserve-Transfer-asset-e09cdacf3117419f9fdbbafbb5caa530&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;While Trappist chain execute ExecuteXCM from statemine to base Parachain, WeightLimitReached and xcmpQueue.OverweightEnqueued error occured. But I don't know the exact reason.(Already tried to change weight fee) &#xD;&#xA;&#xD;&#xA;Any help would be greatly appreciated! Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="27280" PostHistoryTypeId="1" PostId="7146" RevisionGUID="ed5edab1-9bfc-48fb-be45-4cd136fec16c" CreationDate="2023-02-09T00:31:36.380" UserId="3732" Text="WeightLimitReached Error occured when executing ReserveTransferAssets with XCM" ContentLicense="CC BY-SA 4.0" />
  <row Id="27281" PostHistoryTypeId="3" PostId="7146" RevisionGUID="ed5edab1-9bfc-48fb-be45-4cd136fec16c" CreationDate="2023-02-09T00:31:36.380" UserId="3732" Text="|parachain|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27282" PostHistoryTypeId="2" PostId="7147" RevisionGUID="4a780f92-f611-444e-abb2-42c42c57b5b1" CreationDate="2023-02-09T06:02:34.550" UserId="3414" Text="I have integrated pallet_evm in my blockchain? I want to check the total_supply of EVM, How could this be done." ContentLicense="CC BY-SA 4.0" />
  <row Id="27284" PostHistoryTypeId="1" PostId="7147" RevisionGUID="4a780f92-f611-444e-abb2-42c42c57b5b1" CreationDate="2023-02-09T06:02:34.550" UserId="3414" Text="How can we check the total_supply of EVM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27285" PostHistoryTypeId="3" PostId="7147" RevisionGUID="4a780f92-f611-444e-abb2-42c42c57b5b1" CreationDate="2023-02-09T06:02:34.550" UserId="3414" Text="|polkadot|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27286" PostHistoryTypeId="2" PostId="7148" RevisionGUID="d288f478-d3dc-45ad-abfa-eaecb441a306" CreationDate="2023-02-09T07:29:35.317" UserId="213" Text="How can I index the substrate [storage maps][1] of pallets and ipfs content of cids, to have filters and build custom search queries? &#xD;&#xA;&#xD;&#xA;Is it a good idea to use subxt for querying storage through rpc from the blockchain and putting it in a database? &#xD;&#xA;&#xD;&#xA;Not sure if I can use indexing services like hydra or [subquery][2] to do that. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageMap.html&#xD;&#xA;  [2]: https://subquery.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="27288" PostHistoryTypeId="1" PostId="7148" RevisionGUID="d288f478-d3dc-45ad-abfa-eaecb441a306" CreationDate="2023-02-09T07:29:35.317" UserId="213" Text="How index the substrate storage maps and ipfs cids?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27289" PostHistoryTypeId="3" PostId="7148" RevisionGUID="d288f478-d3dc-45ad-abfa-eaecb441a306" CreationDate="2023-02-09T07:29:35.317" UserId="213" Text="|indexing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27290" PostHistoryTypeId="6" PostId="7148" RevisionGUID="01fc4d78-f99d-4fc3-890c-bc2dd97abc99" CreationDate="2023-02-09T07:57:40.667" UserId="213" Comment="edited tags" Text="|subxt|indexing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27291" PostHistoryTypeId="2" PostId="7149" RevisionGUID="e7d9f4e0-f835-4f15-af9f-48e2e765c03a" CreationDate="2023-02-09T08:08:27.977" UserId="3744" Text="Im working and Im very stuck with this. Any help is welcome. Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="27293" PostHistoryTypeId="1" PostId="7149" RevisionGUID="e7d9f4e0-f835-4f15-af9f-48e2e765c03a" CreationDate="2023-02-09T08:08:27.977" UserId="3744" Text="Is there any way to convert a ss58 to the 32 byte pubkey, I want to do it inside a precompile, so it is runtime and I don't have access to std" ContentLicense="CC BY-SA 4.0" />
  <row Id="27294" PostHistoryTypeId="3" PostId="7149" RevisionGUID="e7d9f4e0-f835-4f15-af9f-48e2e765c03a" CreationDate="2023-02-09T08:08:27.977" UserId="3744" Text="|polkadot|substrate-node-template|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27295" PostHistoryTypeId="4" PostId="7142" RevisionGUID="98449bb5-f135-45e6-9718-c9c914cdccf1" CreationDate="2023-02-09T08:23:28.877" UserId="83" Comment="typo" Text="Update ERC-20 Storage slot from Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="27296" PostHistoryTypeId="2" PostId="7150" RevisionGUID="484c0229-9875-49e6-b31c-02cc089a58e0" CreationDate="2023-02-09T09:08:07.300" UserId="2762" Text="If you are running a blockchain you can check the premined balance you have, see the frontier node template as example: https://github.com/paritytech/frontier/blob/master/template/node/src/chain_spec.rs#L209&#xD;&#xA;&#xD;&#xA;Where is creating a balance for three accounts: &#xD;&#xA;&#xD;&#xA;- 0xd43593c715fdd31c61141abd04a99fd6822c8558: 340,282,366,920,938,463,463,374,607,431,768,210,955 ETH&#xD;&#xA;- 0x6be02d1d3665660d22ff9624b7be0551ee1ac91b:&#xD;&#xA;340,282,366,920,938,463,463,374,607,431,768,210,955 ETH&#xD;&#xA;- 0x1000000000000000000000000000000000000001:&#xD;&#xA;999,999,999,999,999,999,999,500 ETH&#xD;&#xA;&#xD;&#xA;I am not sure if querying the pallet evm there is an easy way to get the total amount of tokens, but for example in Ethereum if you want to query the total supply of ETH is not that easy. You have to calculate it from the following events:&#xD;&#xA;- The pre-mine amount.&#xD;&#xA;- Proof-of-work mining rewards.&#xD;&#xA;- Uncle Proof-of-work mining rewards.&#xD;&#xA;- The EIP-1559 token burn.&#xD;&#xA;- Proof-of-work rewards and penalties (Eth2).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27298" PostHistoryTypeId="2" PostId="7151" RevisionGUID="efd6d5de-a92d-426b-a232-5a41401c0b6b" CreationDate="2023-02-09T09:14:40.720" UserId="213" Text="```rust&#xD;&#xA;use sp_core::crypto::AccountId32;&#xD;&#xA;use sp_core::crypto::Ss58Codec;&#xD;&#xA;use subxt::{&#xD;&#xA;    PolkadotConfig,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(&#xD;&#xA;    runtime_metadata_path = &quot;./artifacts/metadata.scale&quot;,&#xD;&#xA;    derive_for_all_types = &quot;Clone, Debug, Eq, PartialEq&quot;&#xD;&#xA;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;let account_id32 = AccountId32::from_string(&amp;account_id).unwrap();&#xD;&#xA;let account_id32_clone = account_id32.clone();&#xD;&#xA;&#xD;&#xA;let client = subxt::client::OnlineClient::&lt;PolkadotConfig&gt;::from_url(NODE_URL)&#xD;&#xA;                    .await&#xD;&#xA;                    .unwrap();&#xD;&#xA;let balance_storage = polkadot::storage().system().account(account_id32_clone);&#xD;&#xA;let balance_details = client&#xD;&#xA;                    .storage()&#xD;&#xA;                    .at(None)&#xD;&#xA;                    .await&#xD;&#xA;                    .unwrap()&#xD;&#xA;                    .fetch(&amp;balance_storage)&#xD;&#xA;                    .await&#xD;&#xA;                    .unwrap();&#xD;&#xA;&#xD;&#xA;if let Some(balance_details) = balance_details {&#xD;&#xA;        println!(&quot;{}&quot;,balance_details.data.free);&#xD;&#xA;     }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It was working before subxt upgrade to subxt 0.26.0&#xD;&#xA;&#xD;&#xA;But now it gives error:&#xD;&#xA;```&#xD;&#xA; let balance_storage = polkadot::storage().system().account(account_id32_clone);&#xD;&#xA;   |                                                                    ------- ^^^^^^^^^^^^^^^^^^ the trait `Borrow&lt;subxt::utils::AccountId32&gt;` is not implemented for `sp_core::crypto::AccountId32`&#xD;&#xA;   |                                                                    |&#xD;&#xA;   |                                                                    required by a bound introduced by this call&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am using sp-core = { version = &quot;7.0.0&quot;, default-features = false }&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27300" PostHistoryTypeId="1" PostId="7151" RevisionGUID="efd6d5de-a92d-426b-a232-5a41401c0b6b" CreationDate="2023-02-09T09:14:40.720" UserId="213" Text="How to get balance of account in subxt?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27301" PostHistoryTypeId="3" PostId="7151" RevisionGUID="efd6d5de-a92d-426b-a232-5a41401c0b6b" CreationDate="2023-02-09T09:14:40.720" UserId="213" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27302" PostHistoryTypeId="2" PostId="7152" RevisionGUID="2a92ade9-17e2-4b74-bf4d-bf8cdaa58e0d" CreationDate="2023-02-09T09:23:10.373" UserId="2762" Text="If I understand correctly what you want is to update the amount of supply of your ERC20 token.&#xD;&#xA;&#xD;&#xA;The ERC20 token: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol has two functions for that purpose:&#xD;&#xA;- `mint`: Creates `amount` tokens and assigns them to `account`, increasing the total supply. &#xD;&#xA;- `burn`: Destroys `amount` tokens from `account`, reducing the total supply.&#xD;&#xA;&#xD;&#xA;You can call this functions via an Extrinsic in your EVM pallet. To check how to interact with an ERC20 token via extrinsics I'd suggest to take a look into the Substrate tutorial: [Access EVM accounts][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts/" ContentLicense="CC BY-SA 4.0" />
  <row Id="27304" PostHistoryTypeId="2" PostId="7153" RevisionGUID="7ebee076-8ba8-4056-9808-24df464ad518" CreationDate="2023-02-09T09:24:45.860" UserId="1956" Text="The latest release of subwasm contains a flag `--format=json+scale` which will return exactly the `{&quot;result&quot;: &quot;&lt;scale and hex encoded metadata&gt;&quot;}` that is needed." ContentLicense="CC BY-SA 4.0" />
  <row Id="27306" PostHistoryTypeId="2" PostId="7154" RevisionGUID="ed981fd7-15aa-4dec-87dd-9261446af2a8" CreationDate="2023-02-09T10:37:16.257" UserId="251" Text="Try:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use subxt::utils::AccountId32;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27308" PostHistoryTypeId="2" PostId="7155" RevisionGUID="b8430a16-166f-4662-b4f8-161cbd220fd0" CreationDate="2023-02-09T17:03:06.857" UserId="474" Text="The options that I'm aware of are:&#xD;&#xA;1. to do what you've done (whether you use static or dynamic storage lookups).&#xD;&#xA;2. Use the &quot;lower level&quot; RPC method (`api.rpc().query_storage_at(..)` to query multiple entries at once (but you get bytes back and need to decode them manually), or&#xD;&#xA;3. Use `api.storage().iter(some_address)` to iterate over _all_ accounts (but you get nice types back here)." ContentLicense="CC BY-SA 4.0" />
  <row Id="27310" PostHistoryTypeId="2" PostId="7156" RevisionGUID="4da19819-d7f2-4914-b56f-1c5623aed962" CreationDate="2023-02-09T17:06:29.557" UserId="474" Text="Have a look at https://substrate.stackexchange.com/questions/6464/how-to-generate-a-new-account-with-seed-using-rust, which talks about generating a new `Pair` from a seed.&#xD;&#xA;&#xD;&#xA;When that's been generated, you can do `let signer = PairSigner::new(pair);` as you have done to make use of it in Subxt!" ContentLicense="CC BY-SA 4.0" />
  <row Id="27312" PostHistoryTypeId="2" PostId="7157" RevisionGUID="b4fd6190-e0d6-4cfd-a50b-fa60e9a33ddd" CreationDate="2023-02-09T17:10:23.457" UserId="474" Text="Subxt is geared around interacting with the tip of a chain, and will run into issues trying to obtain and index older entries (and will need custom metadata to be provided to go back through older blocks that use V14 metadata, too).&#xD;&#xA;&#xD;&#xA;If you want to index the storage in a chain more fully, I'd probably suggest looking into using Polkadot.js directly or a higher level interface like https://github.com/paritytech/substrate-api-sidecar offhand (which is already used for accessing and indexing older blocks and so should be up to the task." ContentLicense="CC BY-SA 4.0" />
  <row Id="27314" PostHistoryTypeId="5" PostId="2346" RevisionGUID="fa7580c3-01de-436a-9f54-d79dfb0d4618" CreationDate="2023-02-09T18:37:40.240" UserId="234" Comment="Updating the link to point to the corresponding Substrate docs page (section &quot;Validating transactions in the transaction pool&quot;)" Text="As mentioned in the comments, Signed Transactions require transaction fees. &#xD;&#xA;&#xD;&#xA;[Substrate docs][1] also mentions this.&#xD;&#xA;&#xD;&#xA;&gt; The transaction pool checks for transaction validity. Note that validity of the transaction is not hard-wired to the transaction pool, but is defined by the runtime. Example validity checks are:&#xD;&#xA;&gt; - Checking if the Transaction Index (nonce) is correct.&#xD;&#xA;&gt; - **Checking if the account has enough funds to pay for the associated&#xD;&#xA;   fees.**&#xD;&#xA;&gt; - Checking if the signature is valid.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/fundamentals/transaction-lifecycle/" ContentLicense="CC BY-SA 4.0" />
  <row Id="27315" PostHistoryTypeId="2" PostId="7158" RevisionGUID="df9ee538-4ed0-4211-83bb-7d9933d82a2f" CreationDate="2023-02-09T19:02:20.157" UserId="3810" Text="How to call arbitrary pallet extrinsic from ink! ? Is there a universal approach to do that? &#xD;&#xA;I'd like to engage governance's features into my ink! smart contract." ContentLicense="CC BY-SA 4.0" />
  <row Id="27317" PostHistoryTypeId="1" PostId="7158" RevisionGUID="df9ee538-4ed0-4211-83bb-7d9933d82a2f" CreationDate="2023-02-09T19:02:20.157" UserId="3810" Text="calling extrinsics from ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="27318" PostHistoryTypeId="3" PostId="7158" RevisionGUID="df9ee538-4ed0-4211-83bb-7d9933d82a2f" CreationDate="2023-02-09T19:02:20.157" UserId="3810" Text="|pallet|ink|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27319" PostHistoryTypeId="2" PostId="7159" RevisionGUID="230b908c-a96e-43a8-8f77-7ccbeb5280ec" CreationDate="2023-02-09T19:31:40.063" UserId="2722" Text="I am using the Pallet-contract module in my Substrate chain and I would like to upload a smart contract. I have the following questions:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What should I put in the code input field? Do I need to upload the Wasm file or the .contract file?&#xD;&#xA;&#xD;&#xA;What is the deposit limit, and how can I set it?&#xD;&#xA;&#xD;&#xA;What is determinism, and how can I ensure that my smart contract is deterministic?&#xD;&#xA;&#xD;&#xA;Any help and guidance on this topic would be greatly appreciated. Thank you!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CCviM.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27321" PostHistoryTypeId="1" PostId="7159" RevisionGUID="230b908c-a96e-43a8-8f77-7ccbeb5280ec" CreationDate="2023-02-09T19:31:40.063" UserId="2722" Text="How to upload a smart contract using Pallet-contract on Substrate Chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="27322" PostHistoryTypeId="3" PostId="7159" RevisionGUID="230b908c-a96e-43a8-8f77-7ccbeb5280ec" CreationDate="2023-02-09T19:31:40.063" UserId="2722" Text="|substrate-node-template|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27323" PostHistoryTypeId="2" PostId="7160" RevisionGUID="f8150807-d66d-4fd4-b16b-b59cd8387a43" CreationDate="2023-02-09T20:34:40.700" UserId="181" Text="I am not too sure about calling extrinsics in-specific, though I understand the main approach to calling runtime-level functions is via ink! [chain extensions][1]. There's also [examples of this][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/macros-attributes/chain-extension/&#xD;&#xA;  [2]: https://github.com/paritytech/ink/tree/master/examples/rand-extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="27330" PostHistoryTypeId="2" PostId="7162" RevisionGUID="861c1207-1977-4bd1-b1cf-ef6a1d283808" CreationDate="2023-02-10T03:53:53.533" UserId="3813" Text="We are using polkadot-v0.9.37 and we are experiencing some memory-leak-like issue on the polkadot/kusama nodes. [![kusama-0.9.37-gcp-pattern][1]][1] [![polkadot-0.9.37-gcp-pattern][2]][2]&#xD;&#xA;We also host polkadot/kusama nodes on other providers (for example AWS), but it did not seems to have the same pattern. &#xD;&#xA;&#xD;&#xA;On GCP we used n1-standard-16 (16 vCPU	60GB Mem) for hosting.&#xD;&#xA;&#xD;&#xA;Here's our launch parameters&#xD;&#xA;&#xD;&#xA;    --base-path=/chain-data&#xD;&#xA;&#xD;&#xA;    --rpc-cors=all&#xD;&#xA;    &#xD;&#xA;    --port=30333&#xD;&#xA;    &#xD;&#xA;    --rpc-port=9933&#xD;&#xA;    &#xD;&#xA;    --ws-port=9944&#xD;&#xA;    &#xD;&#xA;    --ws-external&#xD;&#xA;    &#xD;&#xA;    --rpc-external&#xD;&#xA;    &#xD;&#xA;    --node-key=key_here&#xD;&#xA;    &#xD;&#xA;    --pruning=archive&#xD;&#xA;    &#xD;&#xA;    --rpc-methods=Safe&#xD;&#xA;    &#xD;&#xA;    --name=name_here&#xD;&#xA;    &#xD;&#xA;    --chain=kusama&#xD;&#xA;    &#xD;&#xA;    --db-cache=3500&#xD;&#xA;    &#xD;&#xA;    --in-peers=10000&#xD;&#xA;    &#xD;&#xA;    --out-peers=50&#xD;&#xA;&#xD;&#xA;Please kindly advise if there's any fix for this issue. Thank you!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2z4tJ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/fPlqP.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27332" PostHistoryTypeId="1" PostId="7162" RevisionGUID="861c1207-1977-4bd1-b1cf-ef6a1d283808" CreationDate="2023-02-10T03:53:53.533" UserId="3813" Text="Kusama/Polkadot (v0.9.37) is having memory-leak-like pattern on GCP VMs" ContentLicense="CC BY-SA 4.0" />
  <row Id="27333" PostHistoryTypeId="3" PostId="7162" RevisionGUID="861c1207-1977-4bd1-b1cf-ef6a1d283808" CreationDate="2023-02-10T03:53:53.533" UserId="3813" Text="|polkadot|kusama|memory|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27334" PostHistoryTypeId="2" PostId="7163" RevisionGUID="6e5917ea-43b9-45e8-9605-16394cce7085" CreationDate="2023-02-10T05:44:18.767" UserId="3814" Text="Does the smoldot light client automatically generate keys or use the secret phrase to generate keys? In the substrate connect tutorial, client node seems automatically connects to the network with the chain spec, which doesn't specify the node key. However, by looking at the smoldot code of 'identity', a secret_phrase is used to generate keys, and need to have an input, otherwise, a default phrase will be used, where should be the input of the secret_phrase? I can't find from the Substrate connect. &#xD;&#xA;&#xD;&#xA;In addition,  I can't find the libp2p is using the public key from the secret_phase. It seems reads from the util::protobuf, where is the key coming from?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27336" PostHistoryTypeId="1" PostId="7163" RevisionGUID="6e5917ea-43b9-45e8-9605-16394cce7085" CreationDate="2023-02-10T05:44:18.767" UserId="3814" Text="Light client key" ContentLicense="CC BY-SA 4.0" />
  <row Id="27337" PostHistoryTypeId="3" PostId="7163" RevisionGUID="6e5917ea-43b9-45e8-9605-16394cce7085" CreationDate="2023-02-10T05:44:18.767" UserId="3814" Text="|key|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27342" PostHistoryTypeId="2" PostId="7165" RevisionGUID="f0b4d42e-68a0-4cbc-aa4d-3bad6276b062" CreationDate="2023-02-10T09:17:40.473" UserId="3317" Text="It uses a random value to generate a libp2p public/private key pair ([code][1]). This is done when it makes a new [noise key][2] ([code][3]) which is later used for the [noise protocol][4]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/smoldot/blob/76994b52cd658a4ac1dc7a08f6bd4eba702e0e87/bin/light-base/src/lib.rs#L652&#xD;&#xA;  [2]: https://github.com/paritytech/smoldot/blob/76994b52cd658a4ac1dc7a08f6bd4eba702e0e87/src/libp2p/connection/noise.rs#L78-L99&#xD;&#xA;  [3]: https://github.com/paritytech/smoldot/blob/76994b52cd658a4ac1dc7a08f6bd4eba702e0e87/src/libp2p/connection/noise.rs#L113-L120&#xD;&#xA;  [4]: https://github.com/paritytech/smoldot/blob/76994b52cd658a4ac1dc7a08f6bd4eba702e0e87/src/libp2p/connection/noise.rs#L18-L61" ContentLicense="CC BY-SA 4.0" />
  <row Id="27344" PostHistoryTypeId="2" PostId="7166" RevisionGUID="d268885a-22fa-4764-b8b7-e739f37771f6" CreationDate="2023-02-10T09:23:45.090" UserId="2762" Text="In the code of your Smart Contract you run: &#xD;&#xA;```&#xD;&#xA;  cargo contract build&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And this will generate the following files:&#xD;&#xA;```&#xD;&#xA;    Your contract artifacts are ready. You can find them in:&#xD;&#xA;/Users/dev-docs/flipper/target/ink&#xD;&#xA;&#xD;&#xA;- flipper.contract (code + metadata)&#xD;&#xA;- flipper.wasm (the contract's code)&#xD;&#xA;- metadata.json (the contract's metadata)&#xD;&#xA;```&#xD;&#xA;What you have to put on the code input field is the **.contract file**, this file contains the bundled Wasm blob and metadata.&#xD;&#xA;&#xD;&#xA;The **storage_deposit_limit** is the maximum amount of balance that can be charged from the caller to pay for the storage consumed. So you as the creator of the contract can limit the amount of deposit that can be charged.&#xD;&#xA;&#xD;&#xA;In order for the nodes in a blockchain network to reach agreement on the state of the chain, all operations must be completely **deterministic**.&#xD;&#xA;Check this previous answer in StackExchange about the determinisim of the contracts in ink: [Is the WASM blob created from ink! contract always deterministic][1].&#xD;&#xA;&#xD;&#xA;Finally as a guide about how to upload SC I suggest you to use the [Contracts-UI][2] tool in allows you to connect to any chain and your local chain and it has an UI that makes easier to execute the extrinsics needed for the deployment.&#xD;&#xA;&#xD;&#xA;You can also use the tool [cargo-contract][3] which is a CLI tool which helps you develop smart contracts in Parity's ink!.&#xD;&#xA;&#xD;&#xA;    cargo contract build&#xD;&#xA;    cargo contract upload --suri //Alice&#xD;&#xA;    cargo contract instantiate --suri //Alice --args true&#xD;&#xA;&#xD;&#xA;For more information check this tutorials:&#xD;&#xA;&#xD;&#xA; - Ink! docs about how to [Deploy Your Contract][4]. &#xD;&#xA; - Substrate Tutorial about [Develop a smart contract][5].&#xD;&#xA; - Substrate Tutorial to [Build a token contract][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/2916/2762&#xD;&#xA;  [2]: https://contracts-ui.substrate.io/&#xD;&#xA;  [3]: https://github.com/paritytech/cargo-contract&#xD;&#xA;  [4]: https://use.ink/getting-started/deploy-your-contract/&#xD;&#xA;  [5]: https://docs.substrate.io/tutorials/smart-contracts/develop-a-smart-contract/&#xD;&#xA;  [6]: https://docs.substrate.io/tutorials/smart-contracts/build-a-token-contract/" ContentLicense="CC BY-SA 4.0" />
  <row Id="27348" PostHistoryTypeId="2" PostId="7167" RevisionGUID="908554ca-531d-44d4-b2a7-ea6972f44d69" CreationDate="2023-02-10T09:55:21.187" UserId="251" Text="I recommend you use `from_seed` or `from_seed_slice`.&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/sp_core/crypto/trait.Pair.html#tymethod.from_seed&#xD;&#xA;&#xD;&#xA;1. `from_seed` takes a `[u8; 32]`.&#xD;&#xA;2. `from_seed_slice` takes a `&amp;[u8]` (but you should make sure it is 32 bytes-length).&#xD;&#xA;&#xD;&#xA;The seed is the private key to your account.&#xD;&#xA;&#xD;&#xA;Let's use subkey:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;subkey generate&#xD;&#xA;Secret phrase:       palm clinic heavy fat saddle trophy right twenty deputy deal cotton enact&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x9e963df48eb2aeb329ff7a03991ac20a93130e619130a8431ce02bbee2b0a4ea&#xD;&#xA;  Public key (hex):  0xe64810dc55abb26dafcca141c4766f87a0fa532e0a18beac1dc7290d2c3dd57e&#xD;&#xA;  Account ID:        0xe64810dc55abb26dafcca141c4766f87a0fa532e0a18beac1dc7290d2c3dd57e&#xD;&#xA;  Public key (SS58): 5HGeH7iX1xqiRm5tsgyz1uU6haS2VqvstGJfj15p4fWduyN3&#xD;&#xA;  SS58 Address:      5HGeH7iX1xqiRm5tsgyz1uU6haS2VqvstGJfj15p4fWduyN3&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`0x9e963df48eb2aeb329ff7a03991ac20a93130e619130a8431ce02bbee2b0a4ea` is what you need here." ContentLicense="CC BY-SA 4.0" />
  <row Id="27350" PostHistoryTypeId="2" PostId="7168" RevisionGUID="801729bb-0ec6-400d-af85-4da7aabd18f7" CreationDate="2023-02-10T10:22:56.257" UserId="3317" Text="I am curious about some details regarding a GRANDPA round ([explained in detail][1]).&#xD;&#xA;&#xD;&#xA;1. An elected validator that is designated as the **primary** broadcasts the highest block that it thinks could be final from the previous round ([ref][2]).&#xD;&#xA;* Question 1: How is this primary chosen?&#xD;&#xA;2. The elected validators gossip a **pre-vote** for the highest block that it thinks should be finalised.&#xD;&#xA;3. Each elected validator computes the highest block that can be finalised based on the set of pre-votes. If the set of pre-votes extends the last finalised&#xD;&#xA;chain, then each elected validator will gossip a **pre-commit** to that chain.&#xD;&#xA; * Question 2: in order to make a pre-commit, does a validator need the pre-votes of all the elected validators?&#xD;&#xA;4. Each elected validator waits to receive the pre-commits to form and gossip a **commit message** on the newly finalised chain.&#xD;&#xA; * Question 3: in order to make a commit, does a validator need the pre-commits of all the elected validators (**ev**) or is (2/3**ev** + 1) enough?&#xD;&#xA;5. Now all the elected validators have the commit message and the BABE selected author includes it in the new block as part of the justification.&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5922/are-justification-in-the-block-the-actual-votes-cast-by-validators-in-grandpa/5980#5980&#xD;&#xA;  [2]: https://medium.com/polkadot-network/polkadot-consensus-part-2-grandpa-fb1963ef6c70" ContentLicense="CC BY-SA 4.0" />
  <row Id="27352" PostHistoryTypeId="1" PostId="7168" RevisionGUID="801729bb-0ec6-400d-af85-4da7aabd18f7" CreationDate="2023-02-10T10:22:56.257" UserId="3317" Text="The flow of a GRANDPA round" ContentLicense="CC BY-SA 4.0" />
  <row Id="27353" PostHistoryTypeId="3" PostId="7168" RevisionGUID="801729bb-0ec6-400d-af85-4da7aabd18f7" CreationDate="2023-02-10T10:22:56.257" UserId="3317" Text="|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27354" PostHistoryTypeId="6" PostId="7163" RevisionGUID="0179ca6f-e515-4454-ab04-387712566e26" CreationDate="2023-02-10T10:28:51.550" UserId="3317" Comment="Changed the tags" Text="|key|libp2p|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27355" PostHistoryTypeId="24" PostId="7163" RevisionGUID="0179ca6f-e515-4454-ab04-387712566e26" CreationDate="2023-02-10T10:28:51.550" Comment="Proposed by 3317 approved by 251, 34 edit id of 379" ContentLicense="CC BY-SA 4.0" />
  <row Id="27356" PostHistoryTypeId="50" PostId="6666" RevisionGUID="b13c3a62-4736-4e07-8918-3f686cf2b4dd" CreationDate="2023-02-10T11:09:21.033" UserId="-1" />
  <row Id="27357" PostHistoryTypeId="5" PostId="7168" RevisionGUID="3afff69e-bd47-4dd4-a536-2a8ced0b481f" CreationDate="2023-02-10T12:18:48.897" UserId="3317" Comment="added 1 character in body" Text="I am curious about some details regarding a **GRANDPA** round ([explained in detail][1]).&#xD;&#xA;&#xD;&#xA;1. An elected validator that is designated as the **primary** broadcasts the highest block that it thinks could be final from the previous round ([ref][2]).&#xD;&#xA;* Question 1: How is this primary chosen?&#xD;&#xA;2. The elected validators gossip a **pre-vote** for the highest block that it thinks should be finalised.&#xD;&#xA;3. Each elected validator computes the highest block that can be finalised based on the set of pre-votes. If the set of pre-votes extends the last finalised&#xD;&#xA;chain, then each elected validator will gossip a **pre-commit** to that chain.&#xD;&#xA; * Question 2: in order to make a pre-commit, does a validator need the pre-votes of all the elected validators?&#xD;&#xA;4. Each elected validator waits to receive the pre-commits to form and gossip a **commit message** on the newly finalised chain.&#xD;&#xA; * Question 3: in order to make a commit, does a validator need the pre-commits of all the elected validators (**ev**) or is (2/3**ev** + 1) enough?&#xD;&#xA;5. Now all the elected validators have the commit message, the BABE selected author includes it in the new block as part of the **justification**.&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5922/are-justification-in-the-block-the-actual-votes-cast-by-validators-in-grandpa/5980#5980&#xD;&#xA;  [2]: https://medium.com/polkadot-network/polkadot-consensus-part-2-grandpa-fb1963ef6c70" ContentLicense="CC BY-SA 4.0" />
  <row Id="27358" PostHistoryTypeId="5" PostId="5611" RevisionGUID="e6bb2dae-3ccf-4e5e-a504-96ff6a7bed72" CreationDate="2023-02-10T14:56:23.190" UserId="3317" Comment="added 36 characters in body" Text="You could check the 'who' parameter in the 'fn validate()' function.&#xD;&#xA;&#xD;&#xA;An example from the chech_non_zero_sender extension: https://github.com/paritytech/substrate/blob/21d58f6f7b3ed2ea529f3c118b2e042b29551672/frame/system/src/extensions/check_non_zero_sender.rs#L85" ContentLicense="CC BY-SA 4.0" />
  <row Id="27359" PostHistoryTypeId="2" PostId="7169" RevisionGUID="0434f272-c544-4f1b-86d3-50e72cc4501d" CreationDate="2023-02-10T18:14:35.997" UserId="3098" Text="`pallet_collective` allows to execute certain calls based on membership: https://github.com/paritytech/substrate/blob/21d58f6f7b3ed2ea529f3c118b2e042b29551672/frame/collective/src/lib.rs#L450&#xD;&#xA;You can use this for inspiration.&#xD;&#xA;&#xD;&#xA;On the note of splitting a fee, some time ago, I also implemented a custom voting pallet and split the fees between losing and winning sides. Maybe this will help you too: https://github.com/SkymanOne/vote-pray-love/blob/d44e042306a323ad64c9d9ebc5f42d3d84acdd17/pallets/slashing-voting/src/lib.rs#L257 &#xD;&#xA;&#xD;&#xA;TLDR: you basically keep internal count of how much fee each member is rewarded and then transfer the corresponding amount from the pot to that member." ContentLicense="CC BY-SA 4.0" />
  <row Id="27361" PostHistoryTypeId="2" PostId="7170" RevisionGUID="c8c88582-5a7a-44db-8d9a-b113f64ba509" CreationDate="2023-02-10T18:19:42.583" UserId="2762" Text="For my pallet I have defined a StorageMap in the storage that stores a tuple.&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	pub(super) type NameOf&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Twox64Concat, T::AccountId, (Nickname&lt;T&gt;, BalanceOf&lt;T&gt;)&gt;;&#xD;&#xA;&#xD;&#xA;Using a custom struct:&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Default, TypeInfo, MaxEncodedLen, PartialEq, RuntimeDebug)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;		pub first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;		pub last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;I have found a problem when trying to do one of the unit tests. I want to check if value stored that is suppose to be `None` is `None`: &#xD;&#xA;&#xD;&#xA;    assert_eq!(&lt;NameOf&lt;Test&gt;&gt;::get(2), None);&#xD;&#xA;&#xD;&#xA;But I am getting this error:&#xD;&#xA;```&#xD;&#xA;binary operation `==` cannot be applied to type `std::option::Option&lt;(pallet::Nickname&lt;Test&gt;, u64)&gt;`&#xD;&#xA;```&#xD;&#xA;If I only get the value of my struct to compare it (even that the unwrap() will panic):&#xD;&#xA;&#xD;&#xA;    assert_eq!(&lt;NameOf&lt;Test&gt;&gt;::get(2).unwrap().0, None);&#xD;&#xA;&#xD;&#xA;I still get the same error, even that I have the `PartialEq` trait in the struct.&#xD;&#xA;```&#xD;&#xA;binary operation `==` cannot be applied to type `pallet::Nickname&lt;Test&gt;`&#xD;&#xA;```&#xD;&#xA;If I just print the value I can see is None:&#xD;&#xA;&#xD;&#xA;    println!(&quot;{:?}&quot;, &lt;NameOf&lt;Test&gt;&gt;::get(2));&#xD;&#xA;    None&#xD;&#xA;&#xD;&#xA;How can I make this `assert_eq`?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/nicks" ContentLicense="CC BY-SA 4.0" />
  <row Id="27363" PostHistoryTypeId="1" PostId="7170" RevisionGUID="c8c88582-5a7a-44db-8d9a-b113f64ba509" CreationDate="2023-02-10T18:19:42.583" UserId="2762" Text="Error in asset_eq! - binary operation `==` cannot be applied to type" ContentLicense="CC BY-SA 4.0" />
  <row Id="27364" PostHistoryTypeId="3" PostId="7170" RevisionGUID="c8c88582-5a7a-44db-8d9a-b113f64ba509" CreationDate="2023-02-10T18:19:42.583" UserId="2762" Text="|pallet|rust|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27365" PostHistoryTypeId="2" PostId="7171" RevisionGUID="0c6f31c4-6767-4e4a-a9a0-45886bad3a22" CreationDate="2023-02-10T18:43:28.717" UserId="94" Text="The code will try to apply the `PartialEq` derive to the config trait `T` as well, which does not make sense.  &#xD;&#xA;You can derive `PartialEqNoBound` instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="27367" PostHistoryTypeId="50" PostId="4226" RevisionGUID="1c1cf579-ef3c-4e76-abd8-bca619d9b713" CreationDate="2023-02-11T00:03:00.483" UserId="-1" />
  <row Id="27369" PostHistoryTypeId="50" PostId="4677" RevisionGUID="27ee2aa6-0394-4fa9-be85-2bd69f081cf1" CreationDate="2023-02-11T03:09:51.210" UserId="-1" />
  <row Id="27370" PostHistoryTypeId="2" PostId="7172" RevisionGUID="6450248c-d638-402c-8551-55d41177b12c" CreationDate="2023-02-11T09:30:31.130" UserId="2844" Text="I am following [How to setup zombienet for XCM testing](https://docs.astar.network/docs/builder-guides/leverage_parachains/zombienet) tutorial. But faced error [hear](https://docs.astar.network/docs/builder-guides/leverage_parachains/zombienet#start-the-zombienet-with-the-configuration-file). Any suggestion would help a lot.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XYKhB.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27372" PostHistoryTypeId="1" PostId="7172" RevisionGUID="6450248c-d638-402c-8551-55d41177b12c" CreationDate="2023-02-11T09:30:31.130" UserId="2844" Text="config file is not one of the known types" ContentLicense="CC BY-SA 4.0" />
  <row Id="27373" PostHistoryTypeId="3" PostId="7172" RevisionGUID="6450248c-d638-402c-8551-55d41177b12c" CreationDate="2023-02-11T09:30:31.130" UserId="2844" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27375" PostHistoryTypeId="50" PostId="6706" RevisionGUID="3cf01d01-a3a3-4b00-b6f4-3f492a739691" CreationDate="2023-02-12T05:00:30.080" UserId="-1" />
  <row Id="27376" PostHistoryTypeId="50" PostId="4794" RevisionGUID="b1f463b0-50f0-4a27-aed8-705ec0a3aa77" CreationDate="2023-02-12T06:00:55.113" UserId="-1" />
  <row Id="27378" PostHistoryTypeId="2" PostId="7173" RevisionGUID="9f7ac32e-423d-4f1e-8cbd-901f581b4891" CreationDate="2023-02-12T16:46:57.143" UserId="2722" Text="I want to run and build contract by thia command : &#xD;&#xA;&#xD;&#xA;**Step 1:** `cargo contract new my_contract`&#xD;&#xA;&#xD;&#xA;**Step 2:** `cargo contract build`&#xD;&#xA;&#xD;&#xA;when i want to run **Step 2** and i faced this error : &#xD;&#xA;&#xD;&#xA;&gt;ERROR: cargo-contract cannot build using the &quot;stable&quot; channel. Switch to nightly. See https://github.com/paritytech/cargo-contract#build-requires-the-nightly-toolchain&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**rustc Version :**&#xD;&#xA;&#xD;&#xA;        cargo 1.69.0-nightly (82c3bb79e 2023-02-04)&#xD;&#xA;    release: 1.69.0-nightly&#xD;&#xA;    commit-hash: 82c3bb79e3a19a5164e33819ef81bfc2c984bc56&#xD;&#xA;    commit-date: 2023-02-04&#xD;&#xA;    host: x86_64-unknown-linux-gnu&#xD;&#xA;    libgit2: 1.5.0 (sys:0.16.0 vendored)&#xD;&#xA;    libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q)&#xD;&#xA;    os: Ubuntu 22.04 (jammy) [64-bit]&#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="27380" PostHistoryTypeId="1" PostId="7173" RevisionGUID="9f7ac32e-423d-4f1e-8cbd-901f581b4891" CreationDate="2023-02-12T16:46:57.143" UserId="2722" Text="cargo-contract cannot build using the &quot;stable&quot; channel. Switch to nightly" ContentLicense="CC BY-SA 4.0" />
  <row Id="27381" PostHistoryTypeId="3" PostId="7173" RevisionGUID="9f7ac32e-423d-4f1e-8cbd-901f581b4891" CreationDate="2023-02-12T16:46:57.143" UserId="2722" Text="|substrate-node-template|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27382" PostHistoryTypeId="2" PostId="7174" RevisionGUID="1302d095-abaf-4640-a80f-228153a3d499" CreationDate="2023-02-12T17:07:41.373" UserId="87" Text="The question comes in three parts:&#xD;&#xA;&#xD;&#xA;1) Each parachain has its own `sovereignAccount` which can be calculated as described in the answer to [this question][1], but how is that account used since it can receive funds? &#xD;&#xA;&#xD;&#xA;2) Given that, how can funds be spent from the `sovereignAccount`?&#xD;&#xA;&#xD;&#xA;Related to this if a parachain also implements the Treasury Pallet, then another account can exist which will have its own address that can be uniquely configured by changing the `PalletId` in the runtime. &#xD;&#xA;&#xD;&#xA;3) It is more obvious how this Treasury address can be used and spent, but would it be a bad idea to configure the treasury account identical to the `sovereignAccount`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="27384" PostHistoryTypeId="1" PostId="7174" RevisionGUID="1302d095-abaf-4640-a80f-228153a3d499" CreationDate="2023-02-12T17:07:41.373" UserId="87" Text="What can a parachain sovereignAccount be used for and why does it differ the Treasury Account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27385" PostHistoryTypeId="3" PostId="7174" RevisionGUID="1302d095-abaf-4640-a80f-228153a3d499" CreationDate="2023-02-12T17:07:41.373" UserId="87" Text="|parachain|xcm|pallet-treasury|treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27386" PostHistoryTypeId="50" PostId="6710" RevisionGUID="386f6ea0-28f9-41fb-9637-f0848516ad81" CreationDate="2023-02-12T20:00:15.030" UserId="-1" />
  <row Id="27387" PostHistoryTypeId="2" PostId="7175" RevisionGUID="1b31e938-202f-4cc1-82a6-ab4c098c7760" CreationDate="2023-02-12T21:36:08.970" UserId="170" Text="It depends on the `cargo-contract` version. Pre 2.0.0 versions of `cargo-contract` use the nightly toolchain of rust. You can get it with `rustup toolchain add nightly` and then build with `cargo +nightly contract build`. You can omit the `+nightly` if you set the nightly toolchain as default with `rustup default nightly`. &#xD;&#xA;&#xD;&#xA;ink! contracts where version &lt; 4.0.0 need to be built with `cargo-contract` version &lt; 2.0.0, therefore also with the nightly toolchain.&#xD;&#xA;&#xD;&#xA;ink! 4 contracts need to be built with `cargo-contract` version 2 and with the stable toolchain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27391" PostHistoryTypeId="50" PostId="4853" RevisionGUID="e02c8c22-2f82-480f-9eff-25f4243a459b" CreationDate="2023-02-13T03:09:46.280" UserId="-1" />
  <row Id="27392" PostHistoryTypeId="2" PostId="7176" RevisionGUID="fcaad309-3357-410d-9f6a-a82ab3af9bb5" CreationDate="2023-02-13T04:43:28.040" UserId="1959" Text="I think you're missing a very important thing, `SovereignAccount` is on other chain, not on your chain. But treasury is on your chain.&#xD;&#xA;&#xD;&#xA;&gt; Sovereign Account An account controlled by a particular Consensus System, within some other Consensus System.&#xD;&#xA;&#xD;&#xA;*For your question*: &quot;how is that account used since it can receive funds?&quot;&#xD;&#xA;For example: ParaA has a sovereignAccount on ParaB, when ParaB `reserveTransfer` its native token to ParaA via XCM, the sovereignAccount of ParaA on ParaB will receive the native tokens, and then generate derivative assets on ParaA. You can refer to [the related code](https://github.com/paritytech/polkadot/blob/release-v0.9.36/xcm/xcm-executor/src/lib.rs#L310).&#xD;&#xA;&#xD;&#xA;Wait wait wait, I will continue this answer after lunch" ContentLicense="CC BY-SA 4.0" />
  <row Id="27394" PostHistoryTypeId="2" PostId="7177" RevisionGUID="6e6fab6e-3946-438a-a7f9-a6b43153048b" CreationDate="2023-02-13T04:53:59.533" UserId="3254" Text="I got some error when using Polkadot{js} API. what's wrong?&#xD;&#xA;should I update the version of package?&#xD;&#xA;```&#xD;&#xA;import { BN, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_QUINTILL, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isBigInt, isBn, isFunction, isHex, isNumber, isObject, isString, isU8a, u8aToBn, u8aToNumber } from '@polkadot/util';&#xD;&#xA;                                                                                                                                                                                                               ^^^^^^^^^^^&#xD;&#xA;SyntaxError: The requested module '@polkadot/util' does not provide an export named 'u8aToNumber'&#xD;&#xA;    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)&#xD;&#xA;    at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)&#xD;&#xA;    at async Promise.all (index 0)&#xD;&#xA;    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)&#xD;&#xA;    at async importModuleDynamicallyWrapper (node:internal/vm/module:438:15) {&#xD;&#xA;  page: '/'&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rH8eo.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27396" PostHistoryTypeId="1" PostId="7177" RevisionGUID="6e6fab6e-3946-438a-a7f9-a6b43153048b" CreationDate="2023-02-13T04:53:59.533" UserId="3254" Text="@polkadot/util module issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="27397" PostHistoryTypeId="3" PostId="7177" RevisionGUID="6e6fab6e-3946-438a-a7f9-a6b43153048b" CreationDate="2023-02-13T04:53:59.533" UserId="3254" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27398" PostHistoryTypeId="5" PostId="7176" RevisionGUID="a93a45b4-5820-4493-ac26-7c7824a40a2c" CreationDate="2023-02-13T05:42:32.010" UserId="1959" Comment="added 735 characters in body" Text="I think you're missing a very important thing, `SovereignAccount` is on other chains, not on your chain. But treasury is on your chain.&#xD;&#xA;&#xD;&#xA;&gt; Sovereign Account: An account controlled by a particular Consensus System, **within some other Consensus System**.&#xD;&#xA;---&#xD;&#xA;For q1: &quot;*how is that account used since it can receive funds?*&quot;&#xD;&#xA;&#xD;&#xA;For example: ParaA has a sovereignAccount on ParaB, when ParaB `reserveTransfer` its native token to ParaA via XCM, the sovereignAccount of ParaA on ParaB(SoverA_onB) will receive the native tokens(tokenB), and then generate derivative assets(tokenBD) on ParaA. You can refer to [the related code](https://github.com/paritytech/polkadot/blob/release-v0.9.36/xcm/xcm-executor/src/lib.rs#L310).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For q2: *&quot;how can funds be spent from the sovereignAccount?&quot;*&#xD;&#xA;Following the above example, when ParaA `reserveTransfer` tokenBD to ParaB, the corresponding amount tokenBD will be destroyed and the tokenB in SoverA_onB account will be spent and transfered to the beneficiary account. You can refert to [the related code](https://github.com/paritytech/polkadot/blob/release-v0.9.36/xcm/xcm-executor/src/lib.rs#L420).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For q3: *&quot;it be a bad idea to configure the treasury account identical to the sovereignAccount?&quot;*&#xD;&#xA;&#xD;&#xA;As I said at the beginning, the sovereign account is not on your own chain, it is a concept introduced in XCM. Moreover, the sovereign accounts of the same chain on different chains are different due to the relative location.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27399" PostHistoryTypeId="6" PostId="7173" RevisionGUID="1e4e8fed-abdb-4dd1-bbc6-291c1251139a" CreationDate="2023-02-13T05:49:25.953" UserId="170" Comment="added ink tag" Text="|substrate-node-template|ink|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27400" PostHistoryTypeId="24" PostId="7173" RevisionGUID="1e4e8fed-abdb-4dd1-bbc6-291c1251139a" CreationDate="2023-02-13T05:49:25.953" Comment="Proposed by 170 approved by 2722 edit id of 380" ContentLicense="CC BY-SA 4.0" />
  <row Id="27401" PostHistoryTypeId="2" PostId="7178" RevisionGUID="62efb964-fb1b-47e4-8359-f844c31efcf3" CreationDate="2023-02-13T07:30:12.583" UserId="426" Text="In the recent releases of `zombienet`, this error will be thrown if config file starts with a comment.&#xD;&#xA;&#xD;&#xA;Just remove the comment and it should work just fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="27403" PostHistoryTypeId="5" PostId="7165" RevisionGUID="1a0c2972-cf1c-4c9f-a45e-e17f335c757e" CreationDate="2023-02-13T07:53:03.510" UserId="3317" Comment="added 39 characters in body" Text="For creating a new Smoldot client it uses a random value to generate a libp2p public/private key pair ([done here][1]). This is done when it makes a new [noise key][2] ([code][3]) which is later used for the [noise protocol][4]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/smoldot/blob/76994b52cd658a4ac1dc7a08f6bd4eba702e0e87/bin/light-base/src/lib.rs#L652&#xD;&#xA;  [2]: https://github.com/paritytech/smoldot/blob/76994b52cd658a4ac1dc7a08f6bd4eba702e0e87/src/libp2p/connection/noise.rs#L78-L99&#xD;&#xA;  [3]: https://github.com/paritytech/smoldot/blob/76994b52cd658a4ac1dc7a08f6bd4eba702e0e87/src/libp2p/connection/noise.rs#L113-L120&#xD;&#xA;  [4]: https://github.com/paritytech/smoldot/blob/76994b52cd658a4ac1dc7a08f6bd4eba702e0e87/src/libp2p/connection/noise.rs#L18-L61" ContentLicense="CC BY-SA 4.0" />
  <row Id="27404" PostHistoryTypeId="2" PostId="7179" RevisionGUID="ea70c945-ac25-4ed3-a116-dc2ba6e8d0fd" CreationDate="2023-02-13T09:07:28.297" UserId="2762" Text="In case of a struct that has `Vec`:&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Default, TypeInfo)]&#xD;&#xA;    	pub struct Nickname {&#xD;&#xA;    		pub first: Vec&lt;u8&gt;,&#xD;&#xA;    		pub last: Option&lt;Vec&lt;u8&gt;&gt;, // handles empty storage&#xD;&#xA;    }&#xD;&#xA;I found as a solution to use the macro `#[pallet::without_storage_info]`, this macro enables you to define pallet storage items that don't have a fixed size. This allows you to override the default behavior if you require unbounded storage for an entire pallet. To use it, add the `#[pallet::without_storage_info]` attribute to the pallet struct like so:&#xD;&#xA;&#xD;&#xA;    #[pallet::pallet]&#xD;&#xA;    #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    #[pallet::without_storage_info]&#xD;&#xA;    pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;I am posting this response in case it can be helpful to someone, but to store a Vec type is not the best practice, as it has no limit.&#xD;&#xA;&#xD;&#xA;So in the case of haveing a Vec field, a better solution would be to come up with a size limit field (probably configured through your Config trait) and with it use `BoundedVec` instead of `Vec`:&#xD;&#xA;&#xD;&#xA;    pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;		pub first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;		pub last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;And then use the solution Shawn proposed above." ContentLicense="CC BY-SA 4.0" />
  <row Id="27406" PostHistoryTypeId="5" PostId="7175" RevisionGUID="1baa38f8-f0b1-4b11-a3bd-76d481e8ee55" CreationDate="2023-02-13T09:20:58.720" UserId="170" Comment="expand the answer" Text="It depends on the `cargo-contract` version. Pre 2.0.0 versions of `cargo-contract` use the nightly toolchain of rust. You can get it with `rustup toolchain add nightly` and then build with `cargo +nightly contract build`. You can omit the `+nightly` if you set the nightly toolchain as default with `rustup default nightly`. &#xD;&#xA;&#xD;&#xA;ink! contracts where version &lt; 4.0.0 need to be built with `cargo-contract` version &lt; 2.0.0, therefore also with the nightly toolchain.&#xD;&#xA;&#xD;&#xA;ink! 4 contracts need to be built with `cargo-contract` version 2 and can be built with both the stable and nightly toolchain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27407" PostHistoryTypeId="2" PostId="7180" RevisionGUID="27158538-37f0-4002-b5c6-19840632566a" CreationDate="2023-02-13T10:01:38.893" UserId="3254" Text="all what I had to do was update the version of packages&#xD;&#xA;so if you meet this error, plz try to delete node_module and yarn install again" ContentLicense="CC BY-SA 4.0" />
  <row Id="27413" PostHistoryTypeId="5" PostId="6899" RevisionGUID="db96da77-349f-4e36-bbb6-2441100f489c" CreationDate="2023-02-13T10:17:00.100" UserId="2762" Comment="answer a question in the comments" Text="***How to uniquely identify and monitor transactions? And can you get the unique key before actually sending the transaction to the chain?***&#xD;&#xA;&#xD;&#xA;You are right `transactionHash` is not unique, read the section [Unique Identifiers for Extrinsics][1] from the Polkadot wiki:&#xD;&#xA;&#xD;&#xA;&gt; Many infrastructure providers on existing blockchains, e.g. Ethereum, consider a transaction's hash as a unique identifier. In Substrate-based chains like Polkadot, a transaction's hash only serves as a fingerprint of the information within a transaction, and there are times when two transactions with the same hash are both valid.&#xD;&#xA;&#xD;&#xA;The correct way to uniquely identify an extrinsic on a Substrate-based chain is to use the block ID (height or hash) and the extrinsic's index.&#xD;&#xA;&#xD;&#xA;See this past question and the answer in StackExchange about [Why could we find the same transaction hash in 3 different blocks?][2] where it explains it in more detail.&#xD;&#xA;&#xD;&#xA;***Is the infrastructure I have in mind appropriate= It works very well for EVM based chains but is there is a different/better way to do things for substrate based transactions?***&#xD;&#xA;&#xD;&#xA;It makes sense to me too. However you need some extra code to see in which block your transaction has been included and construct this unique identifier for your transaction.&#xD;&#xA;&#xD;&#xA;First with a [subscription to know the hash of the block][3] and after [querying the information from the block and its extrinsics.][4]&#xD;&#xA;&#xD;&#xA;A code example would be: &#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const unsub = await api.tx.balances&#xD;&#xA;    .transfer(BOB, 100000000000)&#xD;&#xA;    .signAndSend(alice, async (result) =&gt; {&#xD;&#xA;        const extrinsicHash = result.txHash.toHuman();&#xD;&#xA;        console.log(`Extrinsic Hash is ${extrinsicHash}`);&#xD;&#xA;&#xD;&#xA;        if (result.status.isInBlock) {&#xD;&#xA;            console.log(`Transaction included at blockHash ${result.status.asInBlock}`);&#xD;&#xA;        } else if (result.status.isFinalized) {&#xD;&#xA;            console.log(`Transaction finalized at blockHash ${result.status.asFinalized}`);&#xD;&#xA;            const hashOfTheBlock = result.status.asFinalized;&#xD;&#xA;            const signedBlock = await api.rpc.chain.getBlock(hashOfTheBlock);&#xD;&#xA;            &#xD;&#xA;            signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;                const blockNumber = signedBlock.block.header.number;&#xD;&#xA;                if (extrinsicHash === ex.hash.toHex()) {&#xD;&#xA;                    &#xD;&#xA;                    const extrinsic = (`${blockNumber}-${index}`);&#xD;&#xA;                    console.log(extrinsic);&#xD;&#xA;                }&#xD;&#xA;            });&#xD;&#xA;        unsub();&#xD;&#xA;        }&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;***As mentioned that the transaction hash is not unique, does that mean that transaction hash does not include nonce? Is there a way to retrieve a transaction via address and nonce?***&#xD;&#xA;&#xD;&#xA;The nonce is included in the transaction hash, and most of the times it will make that the hash of the transaction an account is making is different.&#xD;&#xA;&#xD;&#xA;However, this is not enough to ensure is unique. &#xD;&#xA;&#xD;&#xA;An example can be a reaped account. See this example from the Polkadot docs:&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;An account A makes the first transaction and is reaped because its funds goes below the existential deposit, when an account is reaped all the information of this account is deleted included the nonce.&#xD;&#xA;&#xD;&#xA;When it receives funds again if the account A creates the same extrinsic again (it will have the same nonce as before) therefore the hash will be the same.&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/2536/why-could-we-find-the-same-transaction-hash-in-3-different-blocks/2538#2538&#xD;&#xA;  [3]: https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-inclusion&#xD;&#xA;  [4]: https://polkadot.js.org/docs/api/cookbook/blocks/#how-do-i-view-extrinsic-information&#xD;&#xA;  [5]: https://i.stack.imgur.com/orsdF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27414" PostHistoryTypeId="2" PostId="7182" RevisionGUID="7cfecca7-cd62-4713-977d-36ea6f414b38" CreationDate="2023-02-13T10:42:30.337" UserId="2844" Text="This is Contract code to return List of TodoItem:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn gettodolist(&amp;self) -&gt; Vec&lt;TodoItem&gt; {&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            let mut item: Vec&lt;TodoItem&gt; = Vec::new();&#xD;&#xA;            for _item in 0..self.item_id {&#xD;&#xA;                match self.item.get(_item) {&#xD;&#xA;                    Some(value) =&gt; {&#xD;&#xA;                        if value.owner == caller {&#xD;&#xA;                            item.push(value);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                    None =&gt; (),&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            item&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and on polkadotjs this function return todos as follows:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I use this code to get list of todos in front end. It's response is success but it doesn't return value it gives array 0.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const { gasRequired, result, output } = await contract.query.gettodolist(&#xD;&#xA;      address,&#xD;&#xA;      {&#xD;&#xA;        gasLimit,&#xD;&#xA;        storageDepositLimit,&#xD;&#xA;      }&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    // const result = await api.call.contractsApi.call(address, contract.address, 0, null, null, msg.toU8a(msg.args.map((_) =&gt; account.address)))&#xD;&#xA;&#xD;&#xA;    // The actual result from RPC as `ContractExecResult`&#xD;&#xA;    console.log(result.toHuman());&#xD;&#xA;&#xD;&#xA;    // the gas consumed for contract execution&#xD;&#xA;    console.log(gasRequired.toHuman());&#xD;&#xA;&#xD;&#xA;    // check if the call was successful&#xD;&#xA;    if (result.isOk) {&#xD;&#xA;      // output the return value&#xD;&#xA;      console.log(&quot;This is Success&quot;, output?.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Can you suggest me anything how to get list of data in Frontend?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/knRnm.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Xqsux.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27416" PostHistoryTypeId="1" PostId="7182" RevisionGUID="7cfecca7-cd62-4713-977d-36ea6f414b38" CreationDate="2023-02-13T10:42:30.337" UserId="2844" Text="Can't success to fetch list of data in frontend" ContentLicense="CC BY-SA 4.0" />
  <row Id="27417" PostHistoryTypeId="3" PostId="7182" RevisionGUID="7cfecca7-cd62-4713-977d-36ea6f414b38" CreationDate="2023-02-13T10:42:30.337" UserId="2844" Text="|polkadot-js|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27421" PostHistoryTypeId="2" PostId="7184" RevisionGUID="648aa7ad-5752-49eb-9bfb-88dbff011fd1" CreationDate="2023-02-13T12:48:50.697" UserId="3826" Text="I'm new to the project and currently working on a pallet, which is supposed to deal with large files offchain. Pallet, offchain indexing and the offchain worker are all working fine, still I get &quot;Failed to upload file: RpcError: 1010: Invalid Transaction: Transaction would exhaust the block limits&quot; on larger files&#xD;&#xA;&#xD;&#xA;The referring extrinsic looks like this:&#xD;&#xA;&#xD;&#xA;    #[pallet::call_index(0)]&#xD;&#xA;    #[pallet::weight(200_000)]&#xD;&#xA;    pub fn do_something(origin: OriginFor&lt;T&gt;, received_bytes: Vec&lt;u8&gt;, version: u8) -&gt; DispatchResult { &#xD;&#xA;     // ...&#xD;&#xA;     let block_number = frame_system::Pallet::&lt;T&gt;::block_number();&#xD;&#xA;     set_offchain_data::&lt;T&gt;(block_number, received_bytes);&#xD;&#xA;     // ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I receive the data through the persistent storage within the offchain_worker callback and can perform according actions. Am I wrong here, are the bytes already put onchain before `do_something` is called? and if so, is there a possibility to avoid this. I only wanna put the result/response of the data processing onchain. &#xD;&#xA;&#xD;&#xA;Again I'm new to the system, might be that I have overseen something essential. Anyhow, happy for any here. Thanks a lot " ContentLicense="CC BY-SA 4.0" />
  <row Id="27423" PostHistoryTypeId="1" PostId="7184" RevisionGUID="648aa7ad-5752-49eb-9bfb-88dbff011fd1" CreationDate="2023-02-13T12:48:50.697" UserId="3826" Text="offchain indexing for large files" ContentLicense="CC BY-SA 4.0" />
  <row Id="27424" PostHistoryTypeId="3" PostId="7184" RevisionGUID="648aa7ad-5752-49eb-9bfb-88dbff011fd1" CreationDate="2023-02-13T12:48:50.697" UserId="3826" Text="|pallet|offchain-worker|offchain|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27425" PostHistoryTypeId="2" PostId="7185" RevisionGUID="baab0baa-1104-4a65-8672-6414f41ef327" CreationDate="2023-02-13T14:46:02.040" UserId="325" Text="Generating transaction via `ApiPromise` through `api.tx.xxx` method generated a `SubmittableExtrinsicFunction` object. Which has a `toJSON()` function that return what I would call a raw transaction. &#xD;&#xA;&#xD;&#xA;Is there any way I can recreate a `SubmittableExtrinsicFunction` from the raw transaction?&#xD;&#xA;&#xD;&#xA;Also if you sign the `SubmittableExtrinsicFunction` you get a `Submittable` object. Which again has a `toJSON()` function the question again is how to go from json result back to `Submittable` object." ContentLicense="CC BY-SA 4.0" />
  <row Id="27427" PostHistoryTypeId="1" PostId="7185" RevisionGUID="baab0baa-1104-4a65-8672-6414f41ef327" CreationDate="2023-02-13T14:46:02.040" UserId="325" Text="Serialisation of Extrinsic objects" ContentLicense="CC BY-SA 4.0" />
  <row Id="27428" PostHistoryTypeId="3" PostId="7185" RevisionGUID="baab0baa-1104-4a65-8672-6414f41ef327" CreationDate="2023-02-13T14:46:02.040" UserId="325" Text="|transactions|extrinsic|signing|parse|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27429" PostHistoryTypeId="2" PostId="7186" RevisionGUID="37f80960-6abf-4fc0-bac6-2a82b32e71ba" CreationDate="2023-02-13T15:24:27.540" UserId="1786" Text="Polkadot-js has a pretty strict dependency tree outline where versions of different `@polkadot/*` packages need to match the root of `@polkadot/api`.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;`@polkadot/api -&gt; v9.14.1` requires `@polkadot/util -&gt; v10.4.1`&#xD;&#xA;So if you are using `v9.14.1` of the api, any package you consume from the [`polkadot-js/common`](https://github.com/polkadot-js/common) (ie. `@polkadot/util-crypto`, `@polkadot/keyring`, etc.) repository should also be `v10.4.1`.&#xD;&#xA;&#xD;&#xA;This will ensure that there is no conflict in package versions and the above error wont happen. Also as a side note updating to the latest version of each package will ensure they match, as releases in sync with each other." ContentLicense="CC BY-SA 4.0" />
  <row Id="27431" PostHistoryTypeId="2" PostId="7187" RevisionGUID="495d560d-02c1-4346-ae4e-73f4f6286ce8" CreationDate="2023-02-13T15:28:18.797" UserId="361" Text="The [XCM v3 implementation of `BuyExecution`](https://github.com/paritytech/polkadot/blob/83c5b4164ded0b878df3cae61c832d0137ab87e5/xcm/xcm-executor/src/lib.rs#L685-L690) does not make use of the [newly introduced JIT fees](https://github.com/paritytech/polkadot/blob/83c5b4164ded0b878df3cae61c832d0137ab87e5/xcm/xcm-executor/src/lib.rs#L930) withdrawal. (e.g. used via `take_fee` [here in `ExportMessage`](https://github.com/paritytech/polkadot/blob/83c5b4164ded0b878df3cae61c832d0137ab87e5/xcm/xcm-executor/src/lib.rs#L846))&#xD;&#xA;&#xD;&#xA;Why is that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27433" PostHistoryTypeId="1" PostId="7187" RevisionGUID="495d560d-02c1-4346-ae4e-73f4f6286ce8" CreationDate="2023-02-13T15:28:18.797" UserId="361" Text="Why does BuyExecution not support JIT fees in XCM v3?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27434" PostHistoryTypeId="3" PostId="7187" RevisionGUID="495d560d-02c1-4346-ae4e-73f4f6286ce8" CreationDate="2023-02-13T15:28:18.797" UserId="361" Text="|polkadot|xcm|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27435" PostHistoryTypeId="2" PostId="7188" RevisionGUID="1078672a-36d0-428b-a1a2-a5827cae2fe8" CreationDate="2023-02-13T16:59:40.903" UserId="3828" Text="I'm using version 0.9.37-08b1c09ca46, across 4 Nodes - Alice, Bob, Charlie, Dave, in a local testnet environment. I have a period of network chaos applied, and then moments of stabilized 'happy' network conditions. I came across this logging and wondered if this is expected behaviour or not:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[service_workload]             [I] 2023-02-02 19:20:58        RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1010: Invalid Transaction: Transaction has a bad signature&#xD;&#xA;[service_polkadot_dave]        [I] 2023-02-02 19:20:58 ✨ Imported #38 (0x98cb…fa88)&#xD;&#xA;[service_workload]             [I] RpcError: 1010: Invalid Transaction: Transaction has a bad signature&#xD;&#xA;[service_workload]             [I] at checkError (/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:30:11)&#xD;&#xA;[service_workload]             [I] at RpcCoder.decodeResponse (/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:45:5)&#xD;&#xA;[service_workload]             [I] at WsProvider.value (/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:247:90)&#xD;&#xA;[service_workload]             [I] at W3CWebSocket.value [as onmessage] (/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:230:153)&#xD;&#xA;[service_workload]             [I] at W3CWebSocket._dispatchEvent [as dispatchEvent] (/node_modules/yaeti/lib/EventTarget.js:107:17)&#xD;&#xA;[service_workload]             [I] at W3CWebSocket.onMessage (/node_modules/websocket/lib/W3CWebSocket.js:234:14)&#xD;&#xA;[service_workload]             [I] at WebSocketConnection.&lt;anonymous&gt; (/node_modules/websocket/lib/W3CWebSocket.js:205:19)&#xD;&#xA;[service_workload]             [I] at WebSocketConnection.emit (node:events:513:28)&#xD;&#xA;[service_workload]             [I] at WebSocketConnection.processFrame (/node_modules/websocket/lib/WebSocketConnection.js:554:26)&#xD;&#xA;[service_workload]             [I] at /node_modules/websocket/lib/WebSocketConnection.js:323:40&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The workload script is simply looping, signing and sending DOT to each account. During the network chaos I'm partitioning and causing delays across the network however during the time this workload attempts to send, no interference is present. Would be interested in your thoughts...." ContentLicense="CC BY-SA 4.0" />
  <row Id="27437" PostHistoryTypeId="1" PostId="7188" RevisionGUID="1078672a-36d0-428b-a1a2-a5827cae2fe8" CreationDate="2023-02-13T16:59:40.903" UserId="3828" Text="Fuzzing Polkdot produces Invalid Signature after chaos is injected" ContentLicense="CC BY-SA 4.0" />
  <row Id="27438" PostHistoryTypeId="3" PostId="7188" RevisionGUID="1078672a-36d0-428b-a1a2-a5827cae2fe8" CreationDate="2023-02-13T16:59:40.903" UserId="3828" Text="|polkadot-js|polkadot|extrinsic|rpc|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27439" PostHistoryTypeId="2" PostId="7189" RevisionGUID="8df0289e-5069-42f5-bb35-b837aad2ddc4" CreationDate="2023-02-13T17:16:34.707" UserId="377" Text="After ending of crowdloan campaign. How we can fetch the contributor details? " ContentLicense="CC BY-SA 4.0" />
  <row Id="27441" PostHistoryTypeId="1" PostId="7189" RevisionGUID="8df0289e-5069-42f5-bb35-b837aad2ddc4" CreationDate="2023-02-13T17:16:34.707" UserId="377" Text="How can we get the list of crowdloan contributors?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27442" PostHistoryTypeId="3" PostId="7189" RevisionGUID="8df0289e-5069-42f5-bb35-b837aad2ddc4" CreationDate="2023-02-13T17:16:34.707" UserId="377" Text="|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27443" PostHistoryTypeId="2" PostId="7190" RevisionGUID="21abc8d6-2908-4b7e-b129-b67ef4babebf" CreationDate="2023-02-13T17:21:47.463" UserId="1925" Text="I can find only javascript interfaces and documentation to interact with it, but nothing regarding rust? &#xD;&#xA;Feels a bit weird to use js library for rust application in rust application. Neither subxt seems to have possibility of using light client either. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27445" PostHistoryTypeId="1" PostId="7190" RevisionGUID="21abc8d6-2908-4b7e-b129-b67ef4babebf" CreationDate="2023-02-13T17:21:47.463" UserId="1925" Text="How to use smoldot in rust application?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27446" PostHistoryTypeId="3" PostId="7190" RevisionGUID="21abc8d6-2908-4b7e-b129-b67ef4babebf" CreationDate="2023-02-13T17:21:47.463" UserId="1925" Text="|rust|javascript|light-client|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27447" PostHistoryTypeId="2" PostId="7191" RevisionGUID="66f690b8-95e3-44b4-95a7-2f8f6dfede3b" CreationDate="2023-02-13T17:59:47.057" UserId="3317" Text="If you look at the [basic example][1] you can see how to initialize a Smoldot client. Provide the [chainspec][2] of the chain you want to sync with and make [JSON-RPC requests][3]. &#xD;&#xA;&#xD;&#xA;But I agree, a native rust interface would be really nice!&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/smoldot/blob/main/bin/light-base/examples/basic.rs&#xD;&#xA;  [2]: https://github.com/paritytech/smoldot/blob/76994b52cd658a4ac1dc7a08f6bd4eba702e0e87/bin/light-base/examples/basic.rs#L52&#xD;&#xA;  [3]: https://github.com/paritytech/smoldot/blob/76994b52cd658a4ac1dc7a08f6bd4eba702e0e87/bin/light-base/examples/basic.rs#L79-L104" ContentLicense="CC BY-SA 4.0" />
  <row Id="27449" PostHistoryTypeId="2" PostId="7192" RevisionGUID="681219d6-189b-476e-aeb4-de8d8d93ed51" CreationDate="2023-02-13T18:11:13.537" UserId="2722" Text="i want upload smart contract in the https://polkadot.js.org/apps/#/contracts but it when i press the depoloy button , it show me this error : &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;`polkadot-v0.9.34`&#xD;&#xA;&#xD;&#xA;`substrate-contracts-node : substrate-contracts-node 0.23.0-87a3d76c880`&#xD;&#xA;&#xD;&#xA;**whats the problem ? how can i solve this problem ?**&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/djMUc.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27451" PostHistoryTypeId="1" PostId="7192" RevisionGUID="681219d6-189b-476e-aeb4-de8d8d93ed51" CreationDate="2023-02-13T18:11:13.537" UserId="2722" Text="contracts.OutofGas when i want to uplooad smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="27452" PostHistoryTypeId="3" PostId="7192" RevisionGUID="681219d6-189b-476e-aeb4-de8d8d93ed51" CreationDate="2023-02-13T18:11:13.537" UserId="2722" Text="|polkadot-js|substrate-node-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27453" PostHistoryTypeId="2" PostId="7193" RevisionGUID="a07ed2c6-dde2-4df0-a405-b64b50f251a9" CreationDate="2023-02-13T18:29:48.640" UserId="3744" Text="I am coding a pallet in which I need to know who I am inside a offchain worker to check if I should send a transaction or not. Right now I have access to the account in the `send_signed_transaction` callback but it doesn`t seem like an elegant way.&#xD;&#xA;&#xD;&#xA;This is what I would need:&#xD;&#xA;&#xD;&#xA;    	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;		fn offchain_worker(now: BlockNumberFor&lt;T&gt;) {&#xD;&#xA;			let signer = Signer::&lt;T, T::AuthorityId&gt;::all_accounts();&#xD;&#xA;&#xD;&#xA;			if !signer.can_sign() {&#xD;&#xA;				log::warn!(&#xD;&#xA;					target: LOG_TARGET,&#xD;&#xA;					&quot;Skipping offchain worker because no local account is available.&quot;&#xD;&#xA;				);&#xD;&#xA;				return;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if !sp_io::offchain::is_validator() {&#xD;&#xA;				return;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			// What i need&#xD;&#xA;			let who = signer.iam();&#xD;&#xA;&#xD;&#xA;			let validators = Validators::&lt;T&gt;::get();&#xD;&#xA;			let approvedValidators = ApprovedValidators::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;			if (!approvedValidators.contains(&amp;who)) {&#xD;&#xA;				return;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			if (validators.contains(&amp;who)) {&#xD;&#xA;				return;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			signer.send_signed_transaction(|_account| Call::add_validator_again {&#xD;&#xA;				validator_id: _account.id.clone(),&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			return;&#xD;&#xA;		}&#xD;&#xA;	}" ContentLicense="CC BY-SA 4.0" />
  <row Id="27455" PostHistoryTypeId="1" PostId="7193" RevisionGUID="a07ed2c6-dde2-4df0-a405-b64b50f251a9" CreationDate="2023-02-13T18:29:48.640" UserId="3744" Text="Is there any way to access the accountid inside the offchain worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27456" PostHistoryTypeId="3" PostId="7193" RevisionGUID="a07ed2c6-dde2-4df0-a405-b64b50f251a9" CreationDate="2023-02-13T18:29:48.640" UserId="3744" Text="|substrate-node-template|rust|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27457" PostHistoryTypeId="2" PostId="7194" RevisionGUID="919dc59b-6077-4f18-917a-383bb6e6b619" CreationDate="2023-02-13T23:34:14.227" UserId="3708" Text="I'm running a local network using zombienet, I want to transfer assets between parachains, I'm trying to do [this example][1]. The thing is when I send the extrinsic on Trappist, and the extrinsic is processed in statemine I get this error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;The extrinsic in trappist:&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;I also followed [this instructions][4] to make the extrinsic.&#xD;&#xA;&#xD;&#xA;I already set asset in statemine as sufficient, and the asset in trappist as multilocation. Did I miss something?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://youtu.be/UfxU3hUprKo?t=1760&#xD;&#xA;  [2]: https://i.stack.imgur.com/DMxJs.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/NiDro.jpg&#xD;&#xA;  [4]: https://github.com/paritytech/trappist/blob/master/xcm-simulator/src/tests/xcm_use_cases.rs#L224-L358" ContentLicense="CC BY-SA 4.0" />
  <row Id="27459" PostHistoryTypeId="1" PostId="7194" RevisionGUID="919dc59b-6077-4f18-917a-383bb6e6b619" CreationDate="2023-02-13T23:34:14.227" UserId="3708" Text="WeightLimitReached Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="27460" PostHistoryTypeId="3" PostId="7194" RevisionGUID="919dc59b-6077-4f18-917a-383bb6e6b619" CreationDate="2023-02-13T23:34:14.227" UserId="3708" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27461" PostHistoryTypeId="5" PostId="7146" RevisionGUID="fae6fedc-6493-4295-81fb-a4ef028bc495" CreationDate="2023-02-14T00:15:56.717" UserId="3732" Comment="added 64 characters in body" Text="I'm testing the ReserveTransferAssets, but it didn't work well. &#xD;&#xA;&#xD;&#xA;When Trappist chain send XCM from statemine to base Parachain, WeightLimitReached and xcmpQueue.OverweightEnqueued error occured. But I don't know the exact reason.(Already tried to change buying weight fee)&#xD;&#xA;&#xD;&#xA;I used this encoded data:&#xD;&#xA;0x1f030208000400010300a10f04320504000b005039278c04100100010100a10f08130000020432050400070010a5d4e8000e010004010100e12e040d010004000101008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800e40b5402000000&#xD;&#xA;&#xD;&#xA;Any help would be greatly appreciated! Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="27462" PostHistoryTypeId="2" PostId="7195" RevisionGUID="db52d060-a5e6-48c2-8395-a62081b34eb4" CreationDate="2023-02-14T07:39:59.007" UserId="3414" Text="I want to update staking_ledger from a custom pallet for migration of data from one chain to another, using method `pallet_staking::Pallet::&lt;T&gt;::update_ledger` but i am getting error that `update_ledger` is a private function, so how can I call a private function in migration pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="27464" PostHistoryTypeId="1" PostId="7195" RevisionGUID="db52d060-a5e6-48c2-8395-a62081b34eb4" CreationDate="2023-02-14T07:39:59.007" UserId="3414" Text="Cross pallet methods calling not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="27465" PostHistoryTypeId="3" PostId="7195" RevisionGUID="db52d060-a5e6-48c2-8395-a62081b34eb4" CreationDate="2023-02-14T07:39:59.007" UserId="3414" Text="|polkadot|substrate-node-template|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27466" PostHistoryTypeId="2" PostId="7196" RevisionGUID="ba550b86-f9ca-4bcf-b01a-3ad24fb9dc60" CreationDate="2023-02-14T07:50:26.580" UserId="251" Text="There is no way to call a private function unless you use `unsafe` and calculate the function address.&#xD;&#xA;&#xD;&#xA;I think you could clone the Substrate repository and change that function to public. Then use [cargo patch](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#using-patch-with-multiple-versions) for this time." ContentLicense="CC BY-SA 4.0" />
  <row Id="27468" PostHistoryTypeId="2" PostId="7197" RevisionGUID="83f8ffcb-9821-4c72-9a1f-9c0288432f56" CreationDate="2023-02-14T07:51:33.253" UserId="1959" Text="If you want to reserveTransfer tokens from one chain to another chain, please use `polkadotXcm.reserveTransferAssets` or `polkadotXcm.limitedreserveTransferAssets` instead of `polkadot.execute`.&#xD;&#xA;&#xD;&#xA;BTW, not relevant to this question, you seems want to send XCM to para(3000), but there's no parachain which paraId is 3000 under Kusama. Maybe you need learn more about HRMP and XCM, you can check [this doc](https://wiki.polkadot.network/docs/learn-xcm) or others." ContentLicense="CC BY-SA 4.0" />
  <row Id="27470" PostHistoryTypeId="6" PostId="7195" RevisionGUID="d20dd1ff-14ae-444a-b5ae-3df59eb91b87" CreationDate="2023-02-14T08:01:50.820" UserId="251" Comment="edited tags" Text="|pallet|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27471" PostHistoryTypeId="5" PostId="7197" RevisionGUID="3eec2e14-545c-485a-ad18-4ae47e22bc43" CreationDate="2023-02-14T08:02:19.573" UserId="1959" Comment="added 110 characters in body" Text="If you want to reserveTransfer tokens from one chain to another chain, please use `polkadotXcm.reserveTransferAssets` or `polkadotXcm.limitedreserveTransferAssets` instead of `polkadot.execute`.&#xD;&#xA;&#xD;&#xA;BTW, not relevant to this question, you seems want to send XCM to para(3000), but there's no parachain which paraId is 3000 under Kusama. Maybe you need learn more about HRMP and XCM, you can check [this doc](https://wiki.polkadot.network/docs/learn-xcm) or others.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;ReserveTransfer example:&#xD;&#xA;&#xD;&#xA;relay chain &lt;&gt; parachain: https://substrate.stackexchange.com/a/4886/1959" ContentLicense="CC BY-SA 4.0" />
  <row Id="27472" PostHistoryTypeId="2" PostId="7198" RevisionGUID="15b4ccad-c557-4711-9e03-9ac75e61eeb5" CreationDate="2023-02-14T08:30:30.240" UserId="2762" Text="The best way to do the serialization here is to use `toHex()` instead of `toJSON()`.&#xD;&#xA;&#xD;&#xA;Take a look at the example of how to do it:&#xD;&#xA;&#xD;&#xA;    const transfer = await api.tx.balances.transfer(BOB, 100000000000);&#xD;&#xA;    // Serialize&#xD;&#xA;    const serializedTransaction = transfer.toHex();&#xD;&#xA;    // Deserialize&#xD;&#xA;    const deserializedTransaction = api.tx(serializedTransaction);&#xD;&#xA;&#xD;&#xA;Now you have the SubmittableExtrinsic again and you can send it:&#xD;&#xA;&#xD;&#xA;    const result = await deserializedTransaction.signAndSend(alice);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27474" PostHistoryTypeId="2" PostId="7199" RevisionGUID="7d026707-93e1-4a20-8e23-943c07575c01" CreationDate="2023-02-14T09:33:34.193" UserId="3752" Text="is there any repository who are implementing **unified accounts** with **Proof of Stake (POS)** consensus except moonbeam. &#xD;&#xA;&#xD;&#xA;we want H160 type of account for both Substrate and EVM Transactions. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27476" PostHistoryTypeId="1" PostId="7199" RevisionGUID="7d026707-93e1-4a20-8e23-943c07575c01" CreationDate="2023-02-14T09:33:34.193" UserId="3752" Text="Unified Accounts with POS" ContentLicense="CC BY-SA 4.0" />
  <row Id="27477" PostHistoryTypeId="3" PostId="7199" RevisionGUID="7d026707-93e1-4a20-8e23-943c07575c01" CreationDate="2023-02-14T09:33:34.193" UserId="3752" Text="|polkadot|account|evm|pos|proof-of-stake|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27478" PostHistoryTypeId="2" PostId="7200" RevisionGUID="d0788f65-25e9-4277-af2d-113c40bd4bcb" CreationDate="2023-02-14T10:16:30.957" UserId="3437" Text="I have an extrinsic, which can be executed only by sudo. I want it to be executed only by MultiSig user. &#xD;&#xA;&#xD;&#xA;I couldn't find way to do this. &#xD;&#xA;&#xD;&#xA;I can replace `ensure_root(origin)` with `ensure_signed(origin)` and then it can be executed by both normal user and multisig user as well. I don't want normal user to execute this extrinsic.&#xD;&#xA;&#xD;&#xA;Can someone please help me to provide the solution?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27480" PostHistoryTypeId="1" PostId="7200" RevisionGUID="d0788f65-25e9-4277-af2d-113c40bd4bcb" CreationDate="2023-02-14T10:16:30.957" UserId="3437" Text="How can I strict my extrinsic to be executed only by Multisig user?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27481" PostHistoryTypeId="3" PostId="7200" RevisionGUID="d0788f65-25e9-4277-af2d-113c40bd4bcb" CreationDate="2023-02-14T10:16:30.957" UserId="3437" Text="|polkadot|substrate-node-template|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27482" PostHistoryTypeId="2" PostId="7201" RevisionGUID="38395d28-7637-45d7-91a4-d4fc06d547e5" CreationDate="2023-02-14T10:41:10.207" UserId="251" Text="You could ask the user to provide the multisig data.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/3bc3742d5c0c5269353d7809d9f8f91104a93273/frame/multisig/src/lib.rs#L525&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let account_id = ensure_signed(origin);&#xD;&#xA;let multisig_account_id = multi_account_id(&amp;signatories, threshold);&#xD;&#xA;&#xD;&#xA;ensure!(account_id == multisig_account_id, &lt;Error&lt;T&gt;&gt;::NotMultisigAccount);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27484" PostHistoryTypeId="2" PostId="7202" RevisionGUID="26216673-6879-493b-9862-73923fa6029b" CreationDate="2023-02-14T10:57:48.927" UserId="3832" Text="I want a &quot;Mainnet&quot; and &quot;Testnet&quot; for my network. It's forked off https://github.com/paritytech/substrate. Mainnet and Testnet will have some parameters set differently, many of which need to be set in Runtime and not in GenesisConfig - things like LaunchPeriod for democracy. Looking at different projects, the accepted solution to this seems to be multiple runtimes with different parameters.&#xD;&#xA;&#xD;&#xA;My question is: is there a recommended best-practice way or some template of supporting many runtimes in a single node codebase? https://github.com/substrate-developer-hub/substrate-node-template and https://github.com/paritytech/substrate doesn't seem to have any infrastructure in place to do that. Structure of https://github.com/paritytech/polkadot is very different from the substrate-node-template, so doing it their way requires lots of effort.&#xD;&#xA;&#xD;&#xA;I've tried abstracting runtimes away in each place as I go and it's definitely doable, but it feels like reinventing the wheel, so I want to make sure I'm not missing something obvious here." ContentLicense="CC BY-SA 4.0" />
  <row Id="27486" PostHistoryTypeId="1" PostId="7202" RevisionGUID="26216673-6879-493b-9862-73923fa6029b" CreationDate="2023-02-14T10:57:48.927" UserId="3832" Text="Best setup for separate runtimes" ContentLicense="CC BY-SA 4.0" />
  <row Id="27487" PostHistoryTypeId="3" PostId="7202" RevisionGUID="26216673-6879-493b-9862-73923fa6029b" CreationDate="2023-02-14T10:57:48.927" UserId="3832" Text="|substrate-node-template|runtime|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27488" PostHistoryTypeId="2" PostId="7203" RevisionGUID="6fdcc6ae-2f26-4a38-9ab5-a0a8c8ba3dff" CreationDate="2023-02-14T11:44:23.190" UserId="3832" Text="There was the `E1-runtimemigration` label for PRs in substrate repo that needed migrations. It seems to be missing now: https://github.com/paritytech/substrate/pulls?q=is%3Apr%20label%3AE1-runtimemigration . I didn't find any other relevant label. Did something change?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27490" PostHistoryTypeId="1" PostId="7203" RevisionGUID="6fdcc6ae-2f26-4a38-9ab5-a0a8c8ba3dff" CreationDate="2023-02-14T11:44:23.190" UserId="3832" Text="E1-runtimemigration label on substrate repo is missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27491" PostHistoryTypeId="3" PostId="7203" RevisionGUID="6fdcc6ae-2f26-4a38-9ab5-a0a8c8ba3dff" CreationDate="2023-02-14T11:44:23.190" UserId="3832" Text="|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27492" PostHistoryTypeId="2" PostId="7204" RevisionGUID="569a73d2-9c1f-4acf-8e0b-b615e87cfc77" CreationDate="2023-02-14T12:08:39.810" UserId="3437" Text="I am not sure if this is the right forum to ask question related to PolkadotJS UI. Is there any way to render existing value in the update form?&#xD;&#xA;&#xD;&#xA;I have an extrinsic to update values. I want to show existing values to respective users so that they can update. &#xD;&#xA;&#xD;&#xA;At the moment, I don't see such option. I can only present a form, where user can enter value, that can be either inserted in existing collection or replace entire existing collection.&#xD;&#xA;&#xD;&#xA;Can someone please help me to provide solution for this? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27494" PostHistoryTypeId="1" PostId="7204" RevisionGUID="569a73d2-9c1f-4acf-8e0b-b615e87cfc77" CreationDate="2023-02-14T12:08:39.810" UserId="3437" Text="Would it be possible to render existing values in update form in Polkadot JS UI" ContentLicense="CC BY-SA 4.0" />
  <row Id="27495" PostHistoryTypeId="3" PostId="7204" RevisionGUID="569a73d2-9c1f-4acf-8e0b-b615e87cfc77" CreationDate="2023-02-14T12:08:39.810" UserId="3437" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27496" PostHistoryTypeId="5" PostId="7146" RevisionGUID="457451de-28ad-42ef-9bfe-1fd473ceb43f" CreationDate="2023-02-14T12:56:20.133" UserId="116" Comment="code in code blocks" Text="I'm testing the ReserveTransferAssets, but it didn't work well. &#xD;&#xA;&#xD;&#xA;When Trappist chain send XCM from statemine to base Parachain, `WeightLimitReached` and `xcmpQueue.OverweightEnqueued` error occurred. But I don't know the exact reason.(Already tried to change buying weight fee)&#xD;&#xA;&#xD;&#xA;I used this encoded data:&#xD;&#xA;`0x1f030208000400010300a10f04320504000b005039278c04100100010100a10f08130000020432050400070010a5d4e8000e010004010100e12e040d010004000101008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800e40b5402000000`&#xD;&#xA;&#xD;&#xA;Any help would be greatly appreciated! Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="27497" PostHistoryTypeId="24" PostId="7146" RevisionGUID="457451de-28ad-42ef-9bfe-1fd473ceb43f" CreationDate="2023-02-14T12:56:20.133" Comment="Proposed by 116 approved by 251, 34 edit id of 381" ContentLicense="CC BY-SA 4.0" />
  <row Id="27498" PostHistoryTypeId="2" PostId="7205" RevisionGUID="dbac2dc6-7239-41cb-b57e-cb164d84822d" CreationDate="2023-02-14T13:19:24.680" UserId="3736" Text="For example, through Polkadot.js API?&#xD;&#xA;&#xD;&#xA;Thank you in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="27500" PostHistoryTypeId="1" PostId="7205" RevisionGUID="dbac2dc6-7239-41cb-b57e-cb164d84822d" CreationDate="2023-02-14T13:19:24.680" UserId="3736" Text="Is there a way to determine a Polkadot nominator's stake amount?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27501" PostHistoryTypeId="3" PostId="7205" RevisionGUID="dbac2dc6-7239-41cb-b57e-cb164d84822d" CreationDate="2023-02-14T13:19:24.680" UserId="3736" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27502" PostHistoryTypeId="2" PostId="7206" RevisionGUID="5fb73de2-830e-4410-b63f-8a6b24d117ef" CreationDate="2023-02-14T13:45:51.413" UserId="167" Text="```typescript&#xD;&#xA;// The account of interest.&#xD;&#xA;const who = &quot;15qves7Kpm3voS6dRCo4LV4RgWJkGtcjXYmdwLjzm6rt8T3F&quot;;&#xD;&#xA;// Their &quot;staking ledger&quot; entry -- where information about their stake is stored.&#xD;&#xA;const ledger = (await api.query.staking.ledger(who)).unwrapOrDefault();&#xD;&#xA;// their total stake: &#xD;&#xA;const stake = ledger.total;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The storage map used is [this](https://polkadot.js.org/docs/substrate/storage#ledgeraccountid32-optionpalletstakingstakingledger).&#xD;&#xA;&#xD;&#xA;Note that this provides you with the &quot;total&quot; stake that they have bonded. If part of their stake is being unstaked, then you can query `ledger.active` to distinguish the difference. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27506" PostHistoryTypeId="2" PostId="7208" RevisionGUID="b59618e0-e9a7-4e40-acce-74662c7b4e37" CreationDate="2023-02-14T14:45:08.340" UserId="251" Text="I think it has been changed to `E0-runtime_migration`" ContentLicense="CC BY-SA 4.0" />
  <row Id="27508" PostHistoryTypeId="2" PostId="7209" RevisionGUID="e91b146d-de92-40f6-9525-5a70c89cc321" CreationDate="2023-02-14T14:56:55.550" UserId="251" Text="Here are two `H160` account networks.&#xD;&#xA;&#xD;&#xA;But with the different staking mechanism.&#xD;&#xA;&#xD;&#xA;- https://github.com/darwinia-network/darwinia-2.0&#xD;&#xA;  - https://github.com/darwinia-network/darwinia-2.0/tree/main/pallet/staking&#xD;&#xA;- https://github.com/PureStake/moonbeam&#xD;&#xA;  - https://github.com/PureStake/moonbeam/tree/master/pallets/parachain-staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="27510" PostHistoryTypeId="2" PostId="7210" RevisionGUID="a47317c8-c008-4c58-9a89-701ef206043c" CreationDate="2023-02-14T15:00:13.880" UserId="251" Text="You can duplicate the runtime and then modify the configurations.&#xD;&#xA;&#xD;&#xA;Or use the Rust feature like this https://github.com/darwinia-network/darwinia-parachain/blob/d86d876a106d09030606dc7fda7311716b276184/runtime/pangolin-parachain/src/lib.rs#L120-L146." ContentLicense="CC BY-SA 4.0" />
  <row Id="27512" PostHistoryTypeId="6" PostId="7202" RevisionGUID="ea5eac64-742a-477d-9b89-fae3953bf9b3" CreationDate="2023-02-14T15:05:35.907" UserId="251" Comment="edited tags" Text="|substrate-node-template|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27513" PostHistoryTypeId="2" PostId="7211" RevisionGUID="67814adc-3315-44a2-8b7b-0ba3b669ff39" CreationDate="2023-02-14T15:32:22.237" UserId="29" Text="In the Utility pallet there is a function:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Derive a derivative account ID from the owner account and the sub-account index.&#xD;&#xA;pub fn derivative_account_id(who: T::AccountId, index: u16) -&gt; T::AccountId {&#xD;&#xA;	let entropy = (b&quot;modlpy/utilisuba&quot;, who, index).using_encoded(blake2_256);&#xD;&#xA;	Decode::decode(&amp;mut TrailingZeroInput::new(entropy.as_ref()))&#xD;&#xA;		.expect(&quot;infinite length input; no invalid inputs for type; qed&quot;)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/1cc2a007290ce32314a17e7d03af7b986e0630dc/frame/utility/src/lib.rs#L512-L517&#xD;&#xA;&#xD;&#xA;`using_encoded()` converts `(b&quot;modlpy/utilisuba&quot;, who, index)` to a slice, encodes it, then it invokes `blake2_256` on the slice.&#xD;&#xA;&#xD;&#xA;`TrailingZeroInput` adds zeros to the end of this byte array.&#xD;&#xA;&#xD;&#xA;`Decode::decode()` deserializes the value.&#xD;&#xA;&#xD;&#xA;But what actually converts the deserialized value into an `AccountId`?&#xD;&#xA;&#xD;&#xA;I see that `AccountId` is defined in the node primitives:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Some way of identifying an account on the chain. We intentionally make it equivalent&#xD;&#xA;/// to the public key of our transaction signing scheme.&#xD;&#xA;pub type AccountId = &lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27515" PostHistoryTypeId="1" PostId="7211" RevisionGUID="67814adc-3315-44a2-8b7b-0ba3b669ff39" CreationDate="2023-02-14T15:32:22.237" UserId="29" Text="How does `derivative_account_id` create an `AccountId`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27516" PostHistoryTypeId="3" PostId="7211" RevisionGUID="67814adc-3315-44a2-8b7b-0ba3b669ff39" CreationDate="2023-02-14T15:32:22.237" UserId="29" Text="|rust|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27517" PostHistoryTypeId="2" PostId="7212" RevisionGUID="b79e0e32-f02a-45ed-a8cd-1980be498357" CreationDate="2023-02-14T15:55:39.337" UserId="3014" Text="I found that Substrate has a limit of 64 pallets that can be added to the runtime.&#xD;&#xA;Adding more causes the following (very unobvious) error:&#xD;&#xA;&#xD;&#xA;    error[E0599]: the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, ...&gt;, ..., ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I'm using [this runtime][2] as a template.&#xD;&#xA;&#xD;&#xA;Is there a way to extend this limitation?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/h59ad.png&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/bin/node/runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="27519" PostHistoryTypeId="1" PostId="7212" RevisionGUID="b79e0e32-f02a-45ed-a8cd-1980be498357" CreationDate="2023-02-14T15:55:39.337" UserId="3014" Text="How to increase the limit of pallet count in runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27520" PostHistoryTypeId="3" PostId="7212" RevisionGUID="b79e0e32-f02a-45ed-a8cd-1980be498357" CreationDate="2023-02-14T15:55:39.337" UserId="3014" Text="|pallet|runtime|limit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27521" PostHistoryTypeId="2" PostId="7213" RevisionGUID="21057dd1-b2c6-4a6c-95c1-cc9fa44877f7" CreationDate="2023-02-14T16:03:47.413" UserId="496" Text="Im trying to use a custom struct inside a Mapping, but i get many errors when trying to compile my code.&#xD;&#xA;&#xD;&#xA;Here is the custom struct i want to use inside a Mapping:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink::storage_item]&#xD;&#xA;pub struct Transaction {&#xD;&#xA;&#xD;&#xA;        creator:AccountId,&#xD;&#xA;        approvers: Mapping&lt;AccountId, Balance&gt;,&#xD;&#xA;        number_of_approvals:Balance,&#xD;&#xA;        psp22_token_to_transfer:AccountId,&#xD;&#xA;        recipient:AccountId,&#xD;&#xA;        transaction_number:Balance&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And this is how i try to use the Mapping inside the contract struct:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct MultiSig {&#xD;&#xA;        &#xD;&#xA;        deployer: AccountId,&#xD;&#xA;        wallet_participants: Vec&lt;AccountId&gt;,&#xD;&#xA;        number_of_participants: Balance,&#xD;&#xA;        number_of_transactions: Balance,&#xD;&#xA;        wallet_tokens: Mapping&lt;AccountId,Balance&gt;,&#xD;&#xA;        wallet_transactions: Mapping&lt;Balance,(Transaction,Balance)&gt;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The errors that i get are related to &quot;decode&quot; and &quot;encode&quot; and &quot;StorableHint&quot;, here are some of the errors that Im getting:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;the trait `parity_scale_codec::Decode` is not implemented for `(multi_sig::Transaction, u128)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;the trait `Encode` is not implemented for `(multi_sig::Transaction, u128)`&#xD;&#xA;&#xD;&#xA;the trait `StorableHint&lt;()&gt;` is not implemented for `ink::storage::Mapping&lt;u128, (multi_sig::Transaction, u128)&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Im using the following documentation in order to implement a custom struct:&#xD;&#xA;&lt;https://use.ink/datastructures/custom-datastructure&gt;&#xD;&#xA;&#xD;&#xA;Thank you in advance :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27523" PostHistoryTypeId="1" PostId="7213" RevisionGUID="21057dd1-b2c6-4a6c-95c1-cc9fa44877f7" CreationDate="2023-02-14T16:03:47.413" UserId="496" Text="Mapping throws error when trying to use custom struct INK 4.0 beta" ContentLicense="CC BY-SA 4.0" />
  <row Id="27524" PostHistoryTypeId="3" PostId="7213" RevisionGUID="21057dd1-b2c6-4a6c-95c1-cc9fa44877f7" CreationDate="2023-02-14T16:03:47.413" UserId="496" Text="|ink|smart-contract|struct|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27525" PostHistoryTypeId="2" PostId="7214" RevisionGUID="1b9a72c2-9c2f-4347-8df1-21fce4d10678" CreationDate="2023-02-14T16:30:56.237" UserId="94" Text="I think you are the first one to hit that limit . The compile error comes directly from Rust. Not sure how much we can do to have a nicer print. &#xD;&#xA;&#xD;&#xA;`frame-support` exposes multiple [features](https://github.com/paritytech/substrate/blob/ce2cee35f8f0fc5968ea6ffaffa6660dcd008804/frame/support/Cargo.toml#L79) like `tuples-96` which should enable support for runtimes with more pallets. In your `Cargo.toml` you would additionally enable `frame-support/tuples-96`." ContentLicense="CC BY-SA 4.0" />
  <row Id="27527" PostHistoryTypeId="2" PostId="7215" RevisionGUID="c7b1d1cd-e8d2-46b7-9293-9b9825935c93" CreationDate="2023-02-14T18:25:28.253" UserId="251" Text="`frame_system::Config::AccountId` requires `Decode + Encode`.&#xD;&#xA;&#xD;&#xA;And in your pallet, `trait Config: frame_system::Config`.&#xD;&#xA;&#xD;&#xA;So, `T::AccountId` has these functions.&#xD;&#xA;&#xD;&#xA;Just treat it as a codec object.&#xD;&#xA;&#xD;&#xA;You don't need to care about the `primitives::AccountId`. `frame_system::Config::AccountId` will guarantee it has the `decode` function.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And if you want to know how the decoding works:&#xD;&#xA;https://stackoverflow.com/questions/61232644/converting-between-accountid32-and-accountid-in-substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="27529" PostHistoryTypeId="2" PostId="7216" RevisionGUID="10a1a630-eca7-4a90-9c27-eac97a7dcbb9" CreationDate="2023-02-14T21:58:39.643" UserId="47" Text="the labels were recently changed. [here][1] you can find the new labels of all 3 repos. The labels were replaced only on open PRs/issues.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/labels" ContentLicense="CC BY-SA 4.0" />
  <row Id="27531" PostHistoryTypeId="2" PostId="7217" RevisionGUID="9a894b63-0f20-4b55-8a46-8a016c6d5f5c" CreationDate="2023-02-14T22:30:51.140" UserId="2355" Text="I have an error of duplicated std, I know there is a lot of questions with the same problem, that's why I'm asking how to *search* for the problem.&#xD;&#xA;&#xD;&#xA;I basically have an error of this form (I'm trying to keep it generic):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;duplicate lang item in crate std: [lang item]&#xD;&#xA;&#xD;&#xA;the lang item is first defined in crate sp_io (which [crate] depends on)&#xD;&#xA;first definition in &quot;sp_io&quot; loaded from ...&#xD;&#xA;second definition in &quot;std&quot; loaded from ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;in the case of a ``the lang item is first defined in crate std (which [crate] depends on)``, the issue probably comes from ``[crate]``, but on my example, I don't explicitly know which crates depends on std.&#xD;&#xA;&#xD;&#xA;Solutions to try:&#xD;&#xA;&#xD;&#xA; - [x] Ensure that all of the imported crates have ``[default-features = false]``&#xD;&#xA; - [x] Use ``cargo tree`` to track what could depend on ``std``&#xD;&#xA; - [x] Ensure all your dependencies are set to the same branch and tag&#xD;&#xA; - [x] Ensure that `serde` is not causing the problem (if used)&#xD;&#xA;&#xD;&#xA;Unfortunately, none of these solutions worked for me, that's why I'm asking for more.&#xD;&#xA;&#xD;&#xA;For reference, my issue comes from [here](https://github.com/kabocha-network/parachain/tree/kab-release-v0.2.6)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27533" PostHistoryTypeId="1" PostId="7217" RevisionGUID="9a894b63-0f20-4b55-8a46-8a016c6d5f5c" CreationDate="2023-02-14T22:30:51.140" UserId="2355" Text="How to TRACE &quot;duplicated lang item in crate std: ...&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27534" PostHistoryTypeId="3" PostId="7217" RevisionGUID="9a894b63-0f20-4b55-8a46-8a016c6d5f5c" CreationDate="2023-02-14T22:30:51.140" UserId="2355" Text="|runtime|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27535" PostHistoryTypeId="33" PostId="6831" RevisionGUID="af63894b-097f-49fd-9d0b-73dbd5640c1e" CreationDate="2023-02-14T22:53:00.143" UserId="484" Comment="17" />
  <row Id="27536" PostHistoryTypeId="2" PostId="7218" RevisionGUID="69e4b2df-6950-431c-adf8-6248a5112bd8" CreationDate="2023-02-14T23:03:08.487" UserId="484" Text="My current interpretation of this `Absolute` next.&#xD;&#xA;&#xD;&#xA;Setup best infrastructure possible with safest configuration which make XCM messages slower and higher cost, but best robustness. &#xD;&#xA;&#xD;&#xA;Optimization can be done later." ContentLicense="CC BY-SA 4.0" />
  <row Id="27539" PostHistoryTypeId="5" PostId="7215" RevisionGUID="0b0b9961-88e4-4865-9f58-aaf9162ba585" CreationDate="2023-02-15T03:25:43.797" UserId="251" Comment="added 968 characters in body" Text="`frame_system::Config::AccountId` requires `Decode + Encode`.&#xD;&#xA;&#xD;&#xA;And in your pallet, `trait Config: frame_system::Config`.&#xD;&#xA;&#xD;&#xA;So, `T::AccountId` has these functions.&#xD;&#xA;&#xD;&#xA;Just treat it as a codec object.&#xD;&#xA;&#xD;&#xA;You don't need to care about the `primitives::AccountId`. `frame_system::Config::AccountId` will guarantee it has the `decode` function.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And if you want to know how the decoding works:&#xD;&#xA;https://stackoverflow.com/questions/61232644/converting-between-accountid32-and-accountid-in-substrate&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Let me give you a re-implementation as an example.&#xD;&#xA;&#xD;&#xA;https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2021&amp;gist=9434d53f3d09a80772b1fd0a032acb21&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use std::marker::PhantomData;&#xD;&#xA;&#xD;&#xA;type AccountId = u8;&#xD;&#xA;&#xD;&#xA;trait Decode {&#xD;&#xA;    fn decode(bytes: [u8; 1]) -&gt; Self;&#xD;&#xA;}&#xD;&#xA;impl Decode for AccountId {&#xD;&#xA;    fn decode(bytes: [u8; 1]) -&gt; Self {&#xD;&#xA;        u8::from_be_bytes(bytes)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;trait FrameSystemConfig {&#xD;&#xA;    type AccountId: Decode;&#xD;&#xA;}&#xD;&#xA;trait PalletUtilityConfig: FrameSystemConfig {}&#xD;&#xA;&#xD;&#xA;#[derive(Default)]&#xD;&#xA;struct PalletUtility&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;impl&lt;T&gt; PalletUtility&lt;T&gt; &#xD;&#xA;where&#xD;&#xA;    T: PalletUtilityConfig&#xD;&#xA;{&#xD;&#xA;    fn bytes2account(bytes: [u8; 1]) -&gt; T::AccountId {&#xD;&#xA;        Decode::decode(bytes)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;struct Runtime;&#xD;&#xA;impl FrameSystemConfig for Runtime {&#xD;&#xA;    type AccountId = AccountId;&#xD;&#xA;}&#xD;&#xA;impl PalletUtilityConfig for Runtime {}&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    println!(&quot;{}&quot;, &lt;PalletUtility&lt;Runtime&gt;&gt;::bytes2account([0]));&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27540" PostHistoryTypeId="5" PostId="7215" RevisionGUID="e4229897-cf0a-4d30-b49e-ac6243a94b8b" CreationDate="2023-02-15T03:31:43.687" UserId="251" Comment="deleted 20 characters in body" Text="`frame_system::Config::AccountId` requires `Decode + Encode`.&#xD;&#xA;&#xD;&#xA;And in your pallet, `trait Config: frame_system::Config`.&#xD;&#xA;&#xD;&#xA;So, `T::AccountId` has these functions.&#xD;&#xA;&#xD;&#xA;Just treat it as a codec object.&#xD;&#xA;&#xD;&#xA;You don't need to care about the `primitives::AccountId`. `frame_system::Config::AccountId` will guarantee it has the `decode` function.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And if you want to know how the decoding works:&#xD;&#xA;https://stackoverflow.com/questions/61232644/converting-between-accountid32-and-accountid-in-substrate&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Let me give you a re-implementation as an example.&#xD;&#xA;&#xD;&#xA;https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2021&amp;gist=04784c805dfd38620228144a48f6abc3&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use std::marker::PhantomData;&#xD;&#xA;&#xD;&#xA;type AccountId = u8;&#xD;&#xA;&#xD;&#xA;trait Decode {&#xD;&#xA;    fn decode(bytes: [u8; 1]) -&gt; Self;&#xD;&#xA;}&#xD;&#xA;impl Decode for AccountId {&#xD;&#xA;    fn decode(bytes: [u8; 1]) -&gt; Self {&#xD;&#xA;        u8::from_be_bytes(bytes)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;trait FrameSystemConfig {&#xD;&#xA;    type AccountId: Decode;&#xD;&#xA;}&#xD;&#xA;trait PalletUtilityConfig: FrameSystemConfig {}&#xD;&#xA;&#xD;&#xA;struct PalletUtility&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;impl&lt;T&gt; PalletUtility&lt;T&gt; &#xD;&#xA;where&#xD;&#xA;    T: PalletUtilityConfig&#xD;&#xA;{&#xD;&#xA;    fn bytes2account(bytes: [u8; 1]) -&gt; T::AccountId {&#xD;&#xA;        Decode::decode(bytes)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;struct Runtime;&#xD;&#xA;impl FrameSystemConfig for Runtime {&#xD;&#xA;    type AccountId = AccountId;&#xD;&#xA;}&#xD;&#xA;impl PalletUtilityConfig for Runtime {}&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    println!(&quot;{}&quot;, &lt;PalletUtility&lt;Runtime&gt;&gt;::bytes2account([0]));&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27541" PostHistoryTypeId="2" PostId="7219" RevisionGUID="62d744df-3d6f-480e-a2e0-fc0fb7c547f2" CreationDate="2023-02-15T03:34:29.617" UserId="2844" Text="Update your custom struct like [this](https://use.ink/datastructures/custom-datastructure/#using-custom-types-on-storage).&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Decode, scale::Encode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;,derive(scale_info::TypeInfo, &#xD;&#xA;     ink::storage::traits::StorageLayout))]&#xD;&#xA;&#xD;&#xA;     pub struct Transaction {&#xD;&#xA;            creator:AccountId,&#xD;&#xA;            approvers: Mapping&lt;AccountId, Balance&gt;,&#xD;&#xA;            number_of_approvals:Balance,&#xD;&#xA;            psp22_token_to_transfer:AccountId,&#xD;&#xA;            recipient:AccountId,&#xD;&#xA;            transaction_number:Balance&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="27543" PostHistoryTypeId="2" PostId="7220" RevisionGUID="91ab765a-3905-4ee9-b6de-3c486147de6b" CreationDate="2023-02-15T05:29:03.357" UserId="2010" Text="I want to put some pallets and primitive code in a workspace. Here is my code https://github.com/zeitgeistpm/external&#xD;&#xA;&#xD;&#xA;However this does not build, neither workspace builds nor individual components.&#xD;&#xA;When building with node and runtime that works.&#xD;&#xA;Getting same error in all case:&#xD;&#xA;```&#xD;&#xA;vivek@vivek-ThinkPad-E14-Gen-3:~/dev/external/vrf$ cargo build&#xD;&#xA;    Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/paritytech/polkadot`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;    Updating git repository `https://github.com/encointer/substrate-fixed`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/cumulus`&#xD;&#xA;error: no matching package found&#xD;&#xA;searched package name: `sp-core`&#xD;&#xA;perhaps you meant:      sp-io or sp-trie&#xD;&#xA;location searched: https://github.com/paritytech/substrate?branch=polkadot-v0.9.32&#xD;&#xA;required by package `moonbeam-vrf v0.1.0 (/home/vivek/dev/external/vrf)`&#xD;&#xA;vivek@vivek-ThinkPad-E14-Gen-3:~/dev/external/vrf$ cd ..&#xD;&#xA;&#xD;&#xA;vivek@vivek-ThinkPad-E14-Gen-3:~/dev/external$ cargo build&#xD;&#xA;    Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/paritytech/polkadot`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;    Updating git repository `https://github.com/encointer/substrate-fixed`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/cumulus`&#xD;&#xA;error: no matching package found&#xD;&#xA;searched package name: `sp-core`&#xD;&#xA;perhaps you meant:      sp-io or sp-trie&#xD;&#xA;location searched: https://github.com/paritytech/substrate?branch=polkadot-v0.9.32&#xD;&#xA;required by package `moonbeam-vrf v0.1.0 (/home/vivek/dev/external/vrf)`&#xD;&#xA;vivek@vivek-ThinkPad-E14-Gen-3:~/dev/external$ ls&#xD;&#xA;Cargo.toml  nimbus-consensus  nimbus-primitives  pallets  session-keys  vrf&#xD;&#xA;vivek@vivek-ThinkPad-E14-Gen-3:~/dev/external$ cd pallets/&#xD;&#xA;vivek@vivek-ThinkPad-E14-Gen-3:~/dev/external/pallets$ ls&#xD;&#xA;author-inherent  author-mapping  author-slot-filter  parachain-staking&#xD;&#xA;vivek@vivek-ThinkPad-E14-Gen-3:~/dev/external/pallets$ cd author-inherent/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;vivek@vivek-ThinkPad-E14-Gen-3:~/dev/external/pallets/author-inherent$ cargo build&#xD;&#xA;    Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/paritytech/polkadot`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;    Updating git repository `https://github.com/encointer/substrate-fixed`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/cumulus`&#xD;&#xA;error: no matching package found&#xD;&#xA;searched package name: `sp-core`&#xD;&#xA;perhaps you meant:      sp-io or sp-trie&#xD;&#xA;location searched: https://github.com/paritytech/substrate?branch=polkadot-v0.9.32&#xD;&#xA;required by package `moonbeam-vrf v0.1.0 (/home/vivek/dev/external/vrf)`&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27545" PostHistoryTypeId="1" PostId="7220" RevisionGUID="91ab765a-3905-4ee9-b6de-3c486147de6b" CreationDate="2023-02-15T05:29:03.357" UserId="2010" Text="Build fails when trying to create workspace from selected pallets and primitives" ContentLicense="CC BY-SA 4.0" />
  <row Id="27546" PostHistoryTypeId="3" PostId="7220" RevisionGUID="91ab765a-3905-4ee9-b6de-3c486147de6b" CreationDate="2023-02-15T05:29:03.357" UserId="2010" Text="|rust|build|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27547" PostHistoryTypeId="5" PostId="7204" RevisionGUID="5fd5a4cc-270c-4274-8404-65075920ebef" CreationDate="2023-02-15T05:42:50.017" UserId="3437" Comment="added 31 characters in body" Text="I am not sure if this is the right forum to ask question related to PolkadotJS UI. Is there any way to render existing value in the extrinsic fields?&#xD;&#xA;&#xD;&#xA;I have an extrinsic to update values in a storage. I want to show existing values to respective users so that they can update/remove. &#xD;&#xA;&#xD;&#xA;At the moment, I don't see such option. I can only present an extrinsic, where user can enter value, that can be either inserted in existing collection or replace entire existing collection.&#xD;&#xA;&#xD;&#xA;Can someone please help me to provide solution for this? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27548" PostHistoryTypeId="2" PostId="7221" RevisionGUID="35bad933-8669-4c1f-b930-191537c4c88b" CreationDate="2023-02-15T06:30:06.000" UserId="3775" Text="I`m curious about whether 28 era is a particular number, why not 26 or 27 or some else?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27550" PostHistoryTypeId="1" PostId="7221" RevisionGUID="35bad933-8669-4c1f-b930-191537c4c88b" CreationDate="2023-02-15T06:30:06.000" UserId="3775" Text="Why unbonding period of polkdot is 28 era(28 days) and why not 27 eras or some other number?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27551" PostHistoryTypeId="3" PostId="7221" RevisionGUID="35bad933-8669-4c1f-b930-191537c4c88b" CreationDate="2023-02-15T06:30:06.000" UserId="3775" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27552" PostHistoryTypeId="2" PostId="7222" RevisionGUID="bae80033-7b90-4d19-98bc-3d76456c8f3c" CreationDate="2023-02-15T06:58:02.263" UserId="3732" Text="I solved this issue. This error occurs because Xcm fee (weight 52,840,547,000) excuted on the statemine is higher than weight limit(weight_limit: 41,666,666,666). &#xD;&#xA;&#xD;&#xA;To resolve this issue, clone the statemine repository from cumulus and change almost weights to 1_u64 as below image. After newly building polkadot-parachain, put this realesed polkadot-parachain to the path where you set zombienet config for statmine. &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Although error disappear, it is not a realistic solution. So I'm checking why the weight is calculated so high in the statemine. If you have any question, feel free to ask me. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CXVBY.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="27554" PostHistoryTypeId="2" PostId="7223" RevisionGUID="7daf25eb-36e1-4541-92cb-ca16977c8b31" CreationDate="2023-02-15T07:08:59.850" UserId="3469" Text="I created a token on the Substrate chain using a smart contract and I am now trying to add it to my wallet. However, when I enter the contract address into the &quot;Import a token&quot; section of the wallet, I get an error message saying that the contract address is not valid. I'm not sure what I'm doing wrong or how to proceed. Additionally, I'm not sure which wallet I can use to test the token in a local environment. Can anyone provide guidance on how to add a Substrate token created with a smart contract to my wallet, and recommend a wallet that I can use for testing in a local environment? Thank you in advance for your help." ContentLicense="CC BY-SA 4.0" />
  <row Id="27556" PostHistoryTypeId="1" PostId="7223" RevisionGUID="7daf25eb-36e1-4541-92cb-ca16977c8b31" CreationDate="2023-02-15T07:08:59.850" UserId="3469" Text="How to add a Substrate token created with a smart contract to my wallet? What wallet can I use for testing in a local environment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27557" PostHistoryTypeId="3" PostId="7223" RevisionGUID="7daf25eb-36e1-4541-92cb-ca16977c8b31" CreationDate="2023-02-15T07:08:59.850" UserId="3469" Text="|polkadot-js|substrate-node-template|substrate-parachain-template|substrate-contracts-node|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27563" PostHistoryTypeId="2" PostId="7225" RevisionGUID="74db3d5a-b614-4f2e-947a-a2589bd107de" CreationDate="2023-02-15T07:24:06.673" UserId="371" Text="The image below shows a decoded finalized transaction that deploys a flipper contract on my local substrate network.&#xD;&#xA;I am not sure what the **data** field represents here.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Contract deployment transaction][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/oDhuh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27565" PostHistoryTypeId="1" PostId="7225" RevisionGUID="74db3d5a-b614-4f2e-947a-a2589bd107de" CreationDate="2023-02-15T07:24:06.673" UserId="371" Text="What exactly is the &quot;data&quot; field required as arg while instantiating an ink contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27566" PostHistoryTypeId="3" PostId="7225" RevisionGUID="74db3d5a-b614-4f2e-947a-a2589bd107de" CreationDate="2023-02-15T07:24:06.673" UserId="371" Text="|ink|pallet-contracts|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27568" PostHistoryTypeId="2" PostId="7226" RevisionGUID="9ffa856f-bc88-42c2-bf2f-9e009b7ad6cc" CreationDate="2023-02-15T07:35:02.943" UserId="371" Text="First you would need to know about the block height when your crowdloan started and ended and fetch all those blocks on either Kusama or Polkadot (depending upon where the crowdloan took place). &#xD;&#xA;&#xD;&#xA;Then parse each block and look for `contribution` events originating on the `Crowdloan` pallet which indicates that the contribution took place to your parachain (based on your `paraId`).&#xD;&#xA;&#xD;&#xA;*Note:* this would not fetch the contributors who contributed using third party platforms like `Bifrost`. I assume they transfer all their contributors' funds into their own wallet and make contribution from that single wallet.&#xD;&#xA;&#xD;&#xA;This link might help you get started&#xD;&#xA;: [Crowdloan contributions on Kusama](https://kusama.subscan.io/event?address=&amp;module=crowdloan&amp;event=contributed&amp;startDate=&amp;endDate=&amp;startBlock=&amp;endBlock=&amp;timeType=date&amp;version=9370)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27570" PostHistoryTypeId="2" PostId="7227" RevisionGUID="21e6a36e-8ccb-41e6-8c92-a3df04768c2b" CreationDate="2023-02-15T08:35:27.363" UserId="1959" Text="I try to answer your question with the code of XCM delivery process via HRMP.&#xD;&#xA;&#xD;&#xA;Your focus is on **&quot;in order&quot;**, so we pay attention to whether the order of each step changes, please correct me if I am wrong.&#xD;&#xA;&#xD;&#xA;1. When you send a XCM via HRMP, it will be [inserted into `OutboundXcmpMessages`](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/xcmp-queue/src/lib.rs#L544), no change in order.&#xD;&#xA;2. Then take messages [from `OutboundXcmpMessages` to `HrmpOutboundMessages`](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/parachain-system/src/lib.rs#L269), no change in order.&#xD;&#xA;3. Then give the [`CollectionInfo` which contains the XCM messages to relaychain](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/parachain-system/src/lib.rs#L969), no change in order.&#xD;&#xA;4. Then the receiver chain [received XCM messages from `InherentData`](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/parachain-system/src/lib.rs#L355), no change in order.&#xD;&#xA;5. Then these messages are [sorted by blockNumber and paraId](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/parachain-system/src/lib.rs#L856). Please note [this sort](https://doc.rust-lang.org/src/alloc/collections/btree/map.rs.html#2115) is stable, it does not change the order of messages which in the same block sent by the same chain.&#xD;&#xA;&#xD;&#xA;6. Then these messages will be [inserted into `InboundXcmpMessages`](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/xcmp-queue/src/lib.rs#L1010) and then be dispatched in this order, no change in order." ContentLicense="CC BY-SA 4.0" />
  <row Id="27572" PostHistoryTypeId="2" PostId="7228" RevisionGUID="6261b52c-7753-4ac2-a051-9dbcd8cba765" CreationDate="2023-02-15T08:42:34.467" UserId="170" Text="It is the data passed to the constructor of the contract.&#xD;&#xA;&#xD;&#xA;[Pallet contracts docs][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/pallet-contracts/latest/pallet_contracts/pallet/struct.Pallet.html#method.instantiate_with_code" ContentLicense="CC BY-SA 4.0" />
  <row Id="27574" PostHistoryTypeId="2" PostId="7229" RevisionGUID="b52a8af6-2724-423f-9161-63863c0b3f32" CreationDate="2023-02-15T08:44:21.020" UserId="1959" Text="https://substrate.stackexchange.com/a/7197/1959&#xD;&#xA;&#xD;&#xA;Maybe you want to use `polkadotXcm.reserveTransferAssets` or `polkadotXcm.limitedreserveTransferAssets` rather than `polkadot.execute`. &#xD;&#xA;&#xD;&#xA;So many instructions can't achieve your purpose, and it's not a general practice. It's right for so many instructions to exceed the max limit of weight." ContentLicense="CC BY-SA 4.0" />
  <row Id="27576" PostHistoryTypeId="5" PostId="7229" RevisionGUID="0ac8f5d8-788d-4168-98ab-4331fc7b0563" CreationDate="2023-02-15T08:50:08.867" UserId="1959" Comment="deleted 163 characters in body" Text="https://substrate.stackexchange.com/a/7197/1959&#xD;&#xA;&#xD;&#xA;You should use `polkadotXcm.reserveTransferAssets` or `polkadotXcm.limitedreserveTransferAssets` rather than `polkadot.execute`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27577" PostHistoryTypeId="2" PostId="7230" RevisionGUID="1f821e30-b4b7-4f6d-97cb-cb61a340ec24" CreationDate="2023-02-15T09:35:55.393" UserId="2449" Text="What does `account code` use for? No idea why are **0xff (INVALID)** and **0x00 (STOP)**...&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/frontier/blob/08dfe8986e3f92ce213244c438eb9178653fce59/primitives/evm/src/lib.rs#L87&#xD;&#xA;https://github.com/paritytech/frontier/blob/08dfe8986e3f92ce213244c438eb9178653fce59/frame/evm/src/tests.rs#L45&#xD;&#xA;https://github.com/paritytech/frontier/blob/08dfe8986e3f92ce213244c438eb9178653fce59/frame/evm/src/tests.rs#L56" ContentLicense="CC BY-SA 4.0" />
  <row Id="27579" PostHistoryTypeId="1" PostId="7230" RevisionGUID="1f821e30-b4b7-4f6d-97cb-cb61a340ec24" CreationDate="2023-02-15T09:35:55.393" UserId="2449" Text="What is the account code in genesis account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27580" PostHistoryTypeId="3" PostId="7230" RevisionGUID="1f821e30-b4b7-4f6d-97cb-cb61a340ec24" CreationDate="2023-02-15T09:35:55.393" UserId="2449" Text="|frontier|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27581" PostHistoryTypeId="6" PostId="7221" RevisionGUID="1b9f4164-30ec-4911-ae55-60b9c70446aa" CreationDate="2023-02-15T09:43:30.503" UserId="2762" Comment="edited tags" Text="|polkadot|staking|proof-of-stake|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27582" PostHistoryTypeId="2" PostId="7231" RevisionGUID="a5212a35-0ff7-427e-aa43-d2d4126b9e07" CreationDate="2023-02-15T09:46:09.717" UserId="2025" Text="The unbonding period has to be longer than or equal to [the *grace period* of slashes](https://wiki.polkadot.network/docs/learn-staking#slashing). Otherwise the nominator would be able to send their DOTs out and avoid them being slashed. &#xD;&#xA;&#xD;&#xA;I believe that the 28 days-long grace period for slashes is to allow enough time for community discussion and to cancel the slashes in case they were unjustified " ContentLicense="CC BY-SA 4.0" />
  <row Id="27584" PostHistoryTypeId="2" PostId="7232" RevisionGUID="1dd61331-210f-4c16-adeb-b0fc5fec3f08" CreationDate="2023-02-15T10:19:43.737" UserId="2762" Text="Yes, this is exactly the right place to ask this kind of questions.&#xD;&#xA;&#xD;&#xA;I think what you want to achieve has to be done in the frontend part of your application.&#xD;&#xA;&#xD;&#xA;Let's see it with an example: &#xD;&#xA;&#xD;&#xA;We have in our chain the FRAME pallet [Identity][1]. This pallet has an extrinsic that `set_identity` (see [here][2]) that allows you to set an account's identity information. And it has another function `kill_identity` (see [here][3]) that allows an admin to remove an account's identity and sub-account information and slash the deposits.&#xD;&#xA;&#xD;&#xA;If I understand correctly you would like for example to show in your all the existing values to the in order to make easy to pick the account that is going to be killed.&#xD;&#xA;&#xD;&#xA;You can do that querying the state, for example:&#xD;&#xA;&#xD;&#xA;    const allEntries = await api.query.identity.identityOf.entries();&#xD;&#xA;    allEntries.forEach(([{ args: [accountId] }, identity]) =&gt; {&#xD;&#xA;        console.log(`${accountId}`);&#xD;&#xA;    });&#xD;&#xA;This will give you all the accounts Ids that has an identity registered.&#xD;&#xA;&#xD;&#xA;From this information you must create in your app a dropdown that shows the user all the list of accounts that has an identity registered and let the user pick the account that want to kill. Then you can call the extrinsic with the account the user picked, in our example:&#xD;&#xA;&#xD;&#xA;    const killIdentity =api.tx.identity.killIdentity(accountId);&#xD;&#xA;    const tx = await killIdentity.signAndSend(pair);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/identity&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/identity/src/lib.rs#L331&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/identity/src/lib.rs#L821" ContentLicense="CC BY-SA 4.0" />
  <row Id="27586" PostHistoryTypeId="2" PostId="7233" RevisionGUID="f2d695c3-e0e9-4b5a-acf8-4dcc9568adbf" CreationDate="2023-02-15T10:47:58.473" UserId="1793" Text="When compiling version 36 substrate or cumulus I can see this error and not sure how to get rid of&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    error: cannot find macro `format` in this scope&#xD;&#xA;      --&gt; /Users/hotovo/.cargo/git/checkouts/substrate-56aa5b68bc705a80/8d5b532/primitives/consensus/aura/src/lib.rs:50:3&#xD;&#xA;       |&#xD;&#xA;    50 |         app_crypto!(ed25519, AURA);&#xD;&#xA;       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;       |&#xD;&#xA;       = note: consider importing this macro:&#xD;&#xA;               scale_info::prelude::format&#xD;&#xA;       = note: this error originates in the macro `$crate::app_crypto_public_common_if_std` which comes from the expansion of the macro `app_crypto` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried in substrate repo to comment out those members and the compilation was successful. What could be wrong here? Thank you&#xD;&#xA;&#xD;&#xA;    #&quot;bin/node-template/node&quot;,&#xD;&#xA;	#&quot;bin/node-template/pallets/template&quot;,&#xD;&#xA;    &quot;bin/node-template/runtime&quot;,&#xD;&#xA;	#&quot;bin/node/bench&quot;,&#xD;&#xA;	#&quot;bin/node/cli&quot;,&#xD;&#xA;	#&quot;bin/node/test-runner-example&quot;,&#xD;&#xA;	#&quot;bin/node/executor&quot;,&#xD;&#xA;	#&quot;bin/node/primitives&quot;,&#xD;&#xA;	#&quot;bin/node/rpc&quot;,&#xD;&#xA;	#&quot;bin/node/rpc-client&quot;,&#xD;&#xA;	#&quot;bin/node/runtime&quot;,&#xD;&#xA;	#&quot;bin/node/testing&quot;,&#xD;&#xA;	#&quot;bin/utils/chain-spec-builder&quot;,&#xD;&#xA;	#&quot;bin/utils/subkey&quot;," ContentLicense="CC BY-SA 4.0" />
  <row Id="27588" PostHistoryTypeId="1" PostId="7233" RevisionGUID="f2d695c3-e0e9-4b5a-acf8-4dcc9568adbf" CreationDate="2023-02-15T10:47:58.473" UserId="1793" Text="Polkadot version 36 - app_crypto! error (cannot find macro `format` in this scope)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27589" PostHistoryTypeId="3" PostId="7233" RevisionGUID="f2d695c3-e0e9-4b5a-acf8-4dcc9568adbf" CreationDate="2023-02-15T10:47:58.473" UserId="1793" Text="|substrate-node-template|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27595" PostHistoryTypeId="2" PostId="7235" RevisionGUID="9c4f56ad-281f-4edb-b8eb-f707a30c5a55" CreationDate="2023-02-15T11:21:07.213" UserId="251" Text="Check your `Cargo.toml`.&#xD;&#xA;&#xD;&#xA;If you missed any `&quot;xxx/std&quot;` feature.&#xD;&#xA;&#xD;&#xA;Also, you could use subalfred.&#xD;&#xA;&#xD;&#xA;https://subalfred.hack.ink/user/cli/check.html#features" ContentLicense="CC BY-SA 4.0" />
  <row Id="27599" PostHistoryTypeId="5" PostId="7227" RevisionGUID="fa41c4a3-254e-4d97-856e-2d6a80ea14df" CreationDate="2023-02-15T13:36:06.440" UserId="3030" Comment="collation not collection and grammar" Text="I try to answer your question with the code of XCM delivery process via HRMP.&#xD;&#xA;&#xD;&#xA;Your focus is on **&quot;in order&quot;**, so we pay attention to whether the order of the messages changes, please correct me if I am wrong.&#xD;&#xA;&#xD;&#xA;1. When you send an XCM via HRMP, it will be [inserted into `OutboundXcmpMessages`](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/xcmp-queue/src/lib.rs#L544), no change in order.&#xD;&#xA;2. Then take messages [from `OutboundXcmpMessages` to `HrmpOutboundMessages`](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/parachain-system/src/lib.rs#L269), no change in order.&#xD;&#xA;3. Then give the [`CollationInfo` which contains the XCM messages to relaychain](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/parachain-system/src/lib.rs#L969), no change in order.&#xD;&#xA;4. Then the receiver chain [received XCM messages from `InherentData`](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/parachain-system/src/lib.rs#L355), no change in order.&#xD;&#xA;5. Then these messages are [sorted by blockNumber and paraId](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/parachain-system/src/lib.rs#L856). Please note [this sort](https://doc.rust-lang.org/src/alloc/collections/btree/map.rs.html#2115) is stable, it does not change the order of messages which in the same block sent by the same chain.&#xD;&#xA;&#xD;&#xA;6. Then these messages will be [inserted into `InboundXcmpMessages`](https://github.com/paritytech/cumulus/blob/polkadot-v0.9.37/pallets/xcmp-queue/src/lib.rs#L1010) and then be dispatched in this order, no change in order." ContentLicense="CC BY-SA 4.0" />
  <row Id="27600" PostHistoryTypeId="24" PostId="7227" RevisionGUID="fa41c4a3-254e-4d97-856e-2d6a80ea14df" CreationDate="2023-02-15T13:36:06.440" Comment="Proposed by 3030 approved by 1959 edit id of 382" ContentLicense="CC BY-SA 4.0" />
  <row Id="27601" PostHistoryTypeId="52" PostId="7221" RevisionGUID="519c5c4a-3221-485b-a50b-0bf8ff020c2f" CreationDate="2023-02-15T14:36:07.370" />
  <row Id="27602" PostHistoryTypeId="2" PostId="7236" RevisionGUID="01a657a3-43ee-4126-9fb9-7cf4a8b3945a" CreationDate="2023-02-15T14:39:21.727" UserId="251" Text="Everything works on my local.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;gh repo clone zeitgeistpm/external&#xD;&#xA;cd external&#xD;&#xA;cargo check --workspace&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Try switching your network ENV." ContentLicense="CC BY-SA 4.0" />
  <row Id="27604" PostHistoryTypeId="2" PostId="7237" RevisionGUID="4164aba9-ace3-4277-ad16-b6ab9a16ca6b" CreationDate="2023-02-15T15:08:36.420" UserId="3696" Text="we would like to know if there is any solution to get the amount of the unclaimed rewards for nominationPool via Polkadot.js extrinsics. &#xD;&#xA;&#xD;&#xA;Please help. Thanks! &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qOB1G.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27606" PostHistoryTypeId="1" PostId="7237" RevisionGUID="4164aba9-ace3-4277-ad16-b6ab9a16ca6b" CreationDate="2023-02-15T15:08:36.420" UserId="3696" Text="Liquid Staking Unclaimed Reward via Polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="27607" PostHistoryTypeId="3" PostId="7237" RevisionGUID="4164aba9-ace3-4277-ad16-b6ab9a16ca6b" CreationDate="2023-02-15T15:08:36.420" UserId="3696" Text="|polkadot-js|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27608" PostHistoryTypeId="2" PostId="7238" RevisionGUID="661e9886-9404-45ee-b1d1-4f34d9038a40" CreationDate="2023-02-15T15:21:24.437" UserId="2762" Text="Use this `api.query.nominationPools.rewardPools`, from the [docs][1]:&#xD;&#xA;&#xD;&#xA;&gt; Reward pools. This is where there rewards for each pool accumulate. When a members payout is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage#rewardpoolsu32-optionpalletnominationpoolsrewardpool" ContentLicense="CC BY-SA 4.0" />
  <row Id="27611" PostHistoryTypeId="2" PostId="7239" RevisionGUID="b6516883-8e45-4189-8e7b-d459a337b4ef" CreationDate="2023-02-15T21:54:31.703" UserId="3431" Text="I'm working through the [Acquire a testnet slot][1] tutorial and used the following command to spin up a collator node:&#xD;&#xA;```&#xD;&#xA;./target/release/parachain-template-node --collator \&#xD;&#xA;  --chain raw-parachain-chainspec.json \&#xD;&#xA;  --base-path /tmp/parachain/pubs-demo \&#xD;&#xA;  --port 50333 \&#xD;&#xA;  --ws-port 8855 \&#xD;&#xA;  -- \&#xD;&#xA;  --execution wasm \&#xD;&#xA;  --chain rococo \&#xD;&#xA;  --port 50343 \&#xD;&#xA;  --ws-port 9988&#xD;&#xA;```&#xD;&#xA;Eventually, we want to run our testnet collators via DigitalOcean Droplets rather than our local machines. Are there any examples of how to run a testnet parachain collator node through Docker rather than executing this command directly?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/acquire-a-testnet-slot/" ContentLicense="CC BY-SA 4.0" />
  <row Id="27613" PostHistoryTypeId="1" PostId="7239" RevisionGUID="b6516883-8e45-4189-8e7b-d459a337b4ef" CreationDate="2023-02-15T21:54:31.703" UserId="3431" Text="How to run a collator node for a parachain in Docker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27614" PostHistoryTypeId="3" PostId="7239" RevisionGUID="b6516883-8e45-4189-8e7b-d459a337b4ef" CreationDate="2023-02-15T21:54:31.703" UserId="3431" Text="|parachain-collator|docker|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27615" PostHistoryTypeId="2" PostId="7240" RevisionGUID="b68cbee1-a92f-4157-9c1a-952683789887" CreationDate="2023-02-15T23:40:17.007" UserId="29" Text="I have the following StorageValue:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn something)]&#xD;&#xA;pub type Something&lt;T&gt; = StorageValue&lt;_, u32&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With the getter function I can access it like this in my tests:&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn test_something_with_getter() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		System::set_block_number(1);&#xD;&#xA;		assert_ok!(TemplateModule::do_something(RuntimeOrigin::signed(1), 42));&#xD;&#xA;		assert_eq!(TemplateModule::something(), Some(42));&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How do I get the storage value **without** using the getter function? I have tried the following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn test_something_without_getter() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		System::set_block_number(1);&#xD;&#xA;		assert_ok!(TemplateModule::do_something(RuntimeOrigin::signed(1), 42));&#xD;&#xA;		assert_eq!(TemplateModule::Something::&lt;Test&gt;::get(), Some(42));&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;...and get an error:&#xD;&#xA;```sh&#xD;&#xA;assert_eq!(TemplateModule::Something::&lt;Test&gt;::get(), Some(42));&#xD;&#xA;   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `&lt;pallet::Pallet&lt;mock::Test&gt; as Trait&gt;::Something`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27617" PostHistoryTypeId="1" PostId="7240" RevisionGUID="b68cbee1-a92f-4157-9c1a-952683789887" CreationDate="2023-02-15T23:40:17.007" UserId="29" Text="How to access StorageValue without getter function in tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27618" PostHistoryTypeId="3" PostId="7240" RevisionGUID="b68cbee1-a92f-4157-9c1a-952683789887" CreationDate="2023-02-15T23:40:17.007" UserId="29" Text="|storage|testing|storagevalue|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27619" PostHistoryTypeId="2" PostId="7241" RevisionGUID="ea0f409a-766a-487d-b4a0-627f8bd52317" CreationDate="2023-02-16T00:53:30.540" UserId="29" Text="You need to import the StorageValue `Something` in your test like so:&#xD;&#xA;```rust&#xD;&#xA;use crate::{mock::*, Error, Event, Something};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can then access it like so:&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn test_something_without_getter() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		System::set_block_number(1);&#xD;&#xA;		assert_ok!(TemplateModule::do_something(RuntimeOrigin::signed(1), 42));&#xD;&#xA;		assert_eq!(Something::&lt;Test&gt;::get(), Some(42));&#xD;&#xA;		System::assert_last_event(Event::SomethingStored { something: 42, who: 1 }.into());&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27621" PostHistoryTypeId="2" PostId="7242" RevisionGUID="93fd0ab8-aff6-47ac-91a7-59f78200c9e0" CreationDate="2023-02-16T01:03:52.190" UserId="3755" Text="I am trying to generate raw chain spec from plain chain spec, but it won't let me:&#xD;&#xA;``` &#xD;&#xA;✗ ./target/release/node-template build-spec --chain plain-local-chainspec.json --raw &gt; chain-spec.json&#xD;&#xA;Error: Input(&quot;Error parsing spec file: unknown field `forkBlocks` at line 201 column 1&quot;&#xD;&#xA;```&#xD;&#xA;[![error in terminal][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zJrDX.jpg&#xD;&#xA;&#xD;&#xA;Has anyone else had this? How have you resolved the issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27623" PostHistoryTypeId="1" PostId="7242" RevisionGUID="93fd0ab8-aff6-47ac-91a7-59f78200c9e0" CreationDate="2023-02-16T01:03:52.190" UserId="3755" Text="Error generating Raw Chainspec from Plain Chainspec in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="27624" PostHistoryTypeId="3" PostId="7242" RevisionGUID="93fd0ab8-aff6-47ac-91a7-59f78200c9e0" CreationDate="2023-02-16T01:03:52.190" UserId="3755" Text="|polkadot|substrate-node-template|rust|relay-chain|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27625" PostHistoryTypeId="2" PostId="7243" RevisionGUID="22b884d4-9ff4-4f05-94dd-62b6eb15a403" CreationDate="2023-02-16T02:52:29.910" UserId="3070" Text="Fixed.&#xD;&#xA;&#xD;&#xA;I was importing the default type augmentations with ```import '@polkadot/api-augment'```&#xD;&#xA;&#xD;&#xA;Removed that and it works fine. Types show up in TS." ContentLicense="CC BY-SA 4.0" />
  <row Id="27627" PostHistoryTypeId="2" PostId="7244" RevisionGUID="b84c770f-da3e-40d3-bca9-3bc9fd3d0298" CreationDate="2023-02-16T03:09:33.867" UserId="251" Text="Bruno's answer is okay.&#xD;&#xA;&#xD;&#xA;But since you set a getter for that storage `#[pallet::getter(fn something)]`.&#xD;&#xA;&#xD;&#xA;The most common and easy way to query this storage is `let something = TemplateModule::something()`.&#xD;&#xA;&#xD;&#xA;I recommend you use this way." ContentLicense="CC BY-SA 4.0" />
  <row Id="27629" PostHistoryTypeId="2" PostId="7245" RevisionGUID="531f8985-cf85-4ba7-9863-208b98e42a0c" CreationDate="2023-02-16T03:16:05.630" UserId="251" Text="I think one of the node or the spec file is outdated.&#xD;&#xA;&#xD;&#xA;The node can not parse the spec file correctly.&#xD;&#xA;&#xD;&#xA;You could try generating a new spec file using the node.&#xD;&#xA;&#xD;&#xA;Or go to the spec file line 201, and delete the deprecated field `forkBlocks`." ContentLicense="CC BY-SA 4.0" />
  <row Id="27631" PostHistoryTypeId="2" PostId="7246" RevisionGUID="07eb127a-c3aa-4589-8358-5416cd356f61" CreationDate="2023-02-16T04:39:22.477" UserId="2844" Text="This issue display when I clone the swanky project from GH and try to compile.&#xD;&#xA;&#xD;&#xA;`swanky contract compile {project_name}`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I try to ignore the issue which display while compiling and try to deploy and got this issue.&#xD;&#xA;&#xD;&#xA;`swanky contract deploy {project_name} --account alice --gas 100000000000 --network shibuya`&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&gt; **swanky node running in the background** &#xD;&#xA;&#xD;&#xA;Any suggestion how to solve this issue?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/epq0M.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/FcGcg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27633" PostHistoryTypeId="1" PostId="7246" RevisionGUID="07eb127a-c3aa-4589-8358-5416cd356f61" CreationDate="2023-02-16T04:39:22.477" UserId="2844" Text="ENOENT: no such file or directory on compile and deploy swanky contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="27634" PostHistoryTypeId="3" PostId="7246" RevisionGUID="07eb127a-c3aa-4589-8358-5416cd356f61" CreationDate="2023-02-16T04:39:22.477" UserId="2844" Text="|polkadot-js|ink|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27635" PostHistoryTypeId="2" PostId="7247" RevisionGUID="630c7fb5-5a66-4d68-80f0-f89fe0b4739b" CreationDate="2023-02-16T04:56:07.467" UserId="3437" Text="Few days ago, I asked a question here https://substrate.stackexchange.com/questions/7200/how-can-i-strict-my-extrinsic-to-be-executed-only-by-multisig-user/7201#7201 to allow extrinsic to be executed only by multisig user. I got the solution. But it leads to another problem. Now any multisig user can execute the extrinsic.&#xD;&#xA;&#xD;&#xA;I want only specific multisig user to execute this extrinsic. It's kind of multisig root user. &#xD;&#xA;&#xD;&#xA;The purpose behind this requirement is that we have an extrinsic which can only be executed by sudo. We have 2 investors who also want to control this. Our plan is include these user investors with sudo so that when sudo initiates the transaction, it also needs 2 other approvals to execute the transaction. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please let me know if it is possible to have multisig root user.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27637" PostHistoryTypeId="1" PostId="7247" RevisionGUID="630c7fb5-5a66-4d68-80f0-f89fe0b4739b" CreationDate="2023-02-16T04:56:07.467" UserId="3437" Text="is it possible to have a multisig root user?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27638" PostHistoryTypeId="3" PostId="7247" RevisionGUID="630c7fb5-5a66-4d68-80f0-f89fe0b4739b" CreationDate="2023-02-16T04:56:07.467" UserId="3437" Text="|substrate-node-template|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27639" PostHistoryTypeId="5" PostId="3819" RevisionGUID="812255b0-61db-4de7-b189-e32d035557dc" CreationDate="2023-02-16T08:16:32.810" UserId="2025" Comment="fFx links to the block indexer" Text="Not a direct answer to the question but I think this will be useful:&#xD;&#xA;&#xD;&#xA;Polkaholic.io just released [this block indexer](https://polkaholic.io/xcmtransfers/polkadot) where you can monitor every XCM message sent and received from/in the relay chain. You can also explore submitted extrinsics from the XCM pallet with their instructions and path.&#xD;&#xA;&#xD;&#xA;Note that it is the first version of this indexer tool so expect changes and improvements to be made.&#xD;&#xA;&#xD;&#xA;**Edit**: Subscan added recently [this beautiful interface](https://polkadot.subscan.io/xcm_dashboard) to keep track of every XCM message sent between parachain-parachain and parachain-relay chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="27640" PostHistoryTypeId="2" PostId="7248" RevisionGUID="ebdcdbae-66ac-41b6-99f8-fc57ef3575a0" CreationDate="2023-02-16T08:36:59.877" UserId="251" Text="So, you don't need the previous solution anymore.&#xD;&#xA;&#xD;&#xA;Just use pallet-sudo + pallet-multisig.&#xD;&#xA;&#xD;&#xA;Create the multisig account. (you + 2 investors)&#xD;&#xA;&#xD;&#xA;Set the multisig address as the sudo key.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;e.g. Use the multisig account to send a runtime upgrade extrinsic.&#xD;&#xA;&#xD;&#xA;[![][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/PvXld.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27643" PostHistoryTypeId="2" PostId="7249" RevisionGUID="b553bbcb-c1ba-4862-a1d4-a75f2bc7aa8d" CreationDate="2023-02-16T11:07:31.927" UserId="3752" Text="I have cloned the repo of [MoonBeam][1] and run the chain as &quot;Development chain&quot; but the chain is not producing blocks. is there any reference links which i can follow to remove dependency from relay chain? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/PureStake/moonbeam.git" ContentLicense="CC BY-SA 4.0" />
  <row Id="27645" PostHistoryTypeId="1" PostId="7249" RevisionGUID="b553bbcb-c1ba-4862-a1d4-a75f2bc7aa8d" CreationDate="2023-02-16T11:07:31.927" UserId="3752" Text="can we run MoonBeam as solo chain instead of Para chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="27646" PostHistoryTypeId="3" PostId="7249" RevisionGUID="b553bbcb-c1ba-4862-a1d4-a75f2bc7aa8d" CreationDate="2023-02-16T11:07:31.927" UserId="3752" Text="|polkadot|parachain|moonbeam|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27647" PostHistoryTypeId="2" PostId="7250" RevisionGUID="341f9703-eef2-4f47-a993-9e7e28762a12" CreationDate="2023-02-16T11:57:52.767" UserId="1972" Text="I'm on Windows 11, (intel core i7-9700K processor) and have stable-x86_64-pc-windows-msvc (default), rustc 1.67.1 (d5a82bbd2 2023-02-07) and cargo 1.67.1 (8ecd4f20a 2023-01-10)&#xD;&#xA;&#xD;&#xA;When I'm compiling some project code, it gives the error ```error[E0432]: unresolved import `windows_sys::Win32::Foundation` ```. See the entire error tree below.&#xD;&#xA;&#xD;&#xA;Is there any way to overcome this on Windows natively?  I've just uninstalled and reinstalled via rust-init.exe, so it's not that.  Is there an nightly / later release than the one I have above that fixes it?&#xD;&#xA;&#xD;&#xA;I expect that I could try going through the kerfuffle of getting everything into and out of WSL2, which may or may not work in the end, but is there some kind of windows_sys::Win32::Foundation shim available to get this working on Windows?&#xD;&#xA;Thanks for any pointers!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;***start compilation output with error***&#xD;&#xA;&#xD;&#xA;   ...downloading and compilation successful to here&#xD;&#xA;   ```Compiling integer-sqrt v0.1.5&#xD;&#xA;   Compiling wasmtime-cache v1.0.2&#xD;&#xA;error[E0432]: unresolved import `windows_sys::Win32::Foundation`&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:90:37&#xD;&#xA;   |&#xD;&#xA;90 |             use windows_sys::Win32::Foundation::*;&#xD;&#xA;   |                                     ^^^^^^^^^^ could not find `Foundation` in `Win32`&#xD;&#xA;&#xD;&#xA;error[E0432]: unresolved import `windows_sys::Win32::Foundation`&#xD;&#xA; --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:3:25&#xD;&#xA;  |&#xD;&#xA;3 | use windows_sys::Win32::Foundation::*;&#xD;&#xA;  |                         ^^^^^^^^^^ could not find `Foundation` in `Win32`&#xD;&#xA;&#xD;&#xA;   Compiling lru v0.8.1&#xD;&#xA;   Compiling trie-root v0.17.0&#xD;&#xA;error[E0412]: cannot find type `EXCEPTION_POINTERS` in this scope&#xD;&#xA; --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:8:42&#xD;&#xA;  |&#xD;&#xA;8 | pub type SignalHandler&lt;'a&gt; = dyn Fn(*mut EXCEPTION_POINTERS) -&gt; bool + Send + Sync + 'a;&#xD;&#xA;  |                                          ^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0412]: cannot find type `EXCEPTION_POINTERS` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:22:66&#xD;&#xA;   |&#xD;&#xA;22 | unsafe extern &quot;system&quot; fn exception_handler(exception_info: *mut EXCEPTION_POINTERS) -&gt; i32 {&#xD;&#xA;   |                                                                  ^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_ACCESS_VIOLATION` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:27:32&#xD;&#xA;   |&#xD;&#xA;27 |     if record.ExceptionCode != EXCEPTION_ACCESS_VIOLATION&#xD;&#xA;   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_ILLEGAL_INSTRUCTION` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:28:36&#xD;&#xA;   |&#xD;&#xA;28 |         &amp;&amp; record.ExceptionCode != EXCEPTION_ILLEGAL_INSTRUCTION&#xD;&#xA;   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_INT_DIVIDE_BY_ZERO` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:29:36&#xD;&#xA;   |&#xD;&#xA;29 |         &amp;&amp; record.ExceptionCode != EXCEPTION_INT_DIVIDE_BY_ZERO&#xD;&#xA;   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_INT_OVERFLOW` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:30:36&#xD;&#xA;   |&#xD;&#xA;30 |         &amp;&amp; record.ExceptionCode != EXCEPTION_INT_OVERFLOW&#xD;&#xA;   |                                    ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;   Compiling memory-db v0.31.0&#xD;&#xA;   Compiling trie-db v0.24.0&#xD;&#xA;   Compiling sp-panic-handler v5.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `GetCurrentThread` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-cache-1.0.2\src\worker.rs:240:17&#xD;&#xA;    |&#xD;&#xA;240 |                 GetCurrentThread(),&#xD;&#xA;    |                 ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `GetCurrentThreadId`&#xD;&#xA;    |&#xD;&#xA;   ::: C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-sys-0.36.1\src\Windows\Win32\System\Threading\mod.rs:283:5&#xD;&#xA;    |&#xD;&#xA;283 |     pub fn GetCurrentThreadId() -&gt; u32;&#xD;&#xA;    |     ---------------------------------- similarly named function `GetCurrentThreadId` defined here&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `SetThreadPriority` in this scope&#xD;&#xA;    --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-cache-1.0.2\src\worker.rs:239:13&#xD;&#xA;     |&#xD;&#xA;239  |             SetThreadPriority(&#xD;&#xA;     |             ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `UmsThreadPriority`&#xD;&#xA;     |&#xD;&#xA;    ::: C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-sys-0.36.1\src\Windows\Win32\System\Threading\mod.rs:1725:1&#xD;&#xA;     |&#xD;&#xA;1725 | pub const UmsThreadPriority: RTL_UMS_THREAD_INFO_CLASS = 2i32;&#xD;&#xA;     | ------------------------------------------------------ similarly named constant `UmsThreadPriority` defined here&#xD;&#xA;&#xD;&#xA;   Compiling sp-arithmetic v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualFree` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\instance\allocator\pooling\windows.rs:22:17&#xD;&#xA;   |&#xD;&#xA;22 |     if unsafe { VirtualFree(addr as _, len, MEM_DECOMMIT) } == 0 {&#xD;&#xA;   |                 ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0425`.&#xD;&#xA;error: could not compile `wasmtime-cache` due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `CreateFileMappingW` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:114:31&#xD;&#xA;    |&#xD;&#xA;114 |                 let mapping = CreateFileMappingW(&#xD;&#xA;    |                               ^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `MapViewOfFile` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:129:27&#xD;&#xA;    |&#xD;&#xA;129 |                 let ptr = MapViewOfFile(mapping, FILE_MAP_READ | FILE_MAP_EXECUTE, 0, 0, len);&#xD;&#xA;    |                           ^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `CloseHandle` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:131:17&#xD;&#xA;    |&#xD;&#xA;131 |                 CloseHandle(mapping);&#xD;&#xA;    |                 ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:146:20&#xD;&#xA;    |&#xD;&#xA;146 |                 if VirtualProtect(ret.ptr as *mut _, ret.len, PAGE_READONLY, &amp;mut old) == 0 {&#xD;&#xA;    |                    ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:396:17&#xD;&#xA;    |&#xD;&#xA;396 |                 VirtualProtect(base, len, PAGE_WRITECOPY, &amp;mut old)&#xD;&#xA;    |                 ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:398:17&#xD;&#xA;    |&#xD;&#xA;398 |                 VirtualProtect(base, len, PAGE_READWRITE, &amp;mut old)&#xD;&#xA;    |                 ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:432:26&#xD;&#xA;    |&#xD;&#xA;432 |             let result = VirtualProtect(base, len, PAGE_EXECUTE_READ, &amp;mut old);&#xD;&#xA;    |                          ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualFree` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:468:34&#xD;&#xA;    |&#xD;&#xA;468 |                 let r = unsafe { VirtualFree(self.ptr as *mut c_void, 0, MEM_RELEASE) };&#xD;&#xA;    |                                  ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `UnmapViewOfFile` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:471:34&#xD;&#xA;    |&#xD;&#xA;471 |                 let r = unsafe { UnmapViewOfFile(self.ptr as *mut c_void) };&#xD;&#xA;    |                                  ^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `AddVectoredExceptionHandler` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:14:8&#xD;&#xA;    |&#xD;&#xA;14  |     if AddVectoredExceptionHandler(1, Some(exception_handler)).is_null() {&#xD;&#xA;    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `RemoveVectoredExceptionHandler`&#xD;&#xA;    |&#xD;&#xA;   ::: C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-sys-0.36.1\src\Windows\Win32\System\Diagnostics\Debug\mod.rs:305:5&#xD;&#xA;    |&#xD;&#xA;305 |     pub fn RemoveVectoredExceptionHandler(handle: *const ::core::ffi::c_void) -&gt; u32;&#xD;&#xA;    |     -------------------------------------------------------------------------------- similarly named function `RemoveVectoredExceptionHandler` defined here&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0412, E0425, E0432.&#xD;&#xA;For more information about an error, try `rustc --explain E0412`.&#xD;&#xA;error: could not compile `wasmtime-runtime` due to 19 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;***end compilation output with error***" ContentLicense="CC BY-SA 4.0" />
  <row Id="27649" PostHistoryTypeId="1" PostId="7250" RevisionGUID="341f9703-eef2-4f47-a993-9e7e28762a12" CreationDate="2023-02-16T11:57:52.767" UserId="1972" Text="compilation error. unresolved windows_sys::Win32::Foundation" ContentLicense="CC BY-SA 4.0" />
  <row Id="27650" PostHistoryTypeId="3" PostId="7250" RevisionGUID="341f9703-eef2-4f47-a993-9e7e28762a12" CreationDate="2023-02-16T11:57:52.767" UserId="1972" Text="|compilation|windows|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27652" PostHistoryTypeId="2" PostId="7251" RevisionGUID="1aecfdfe-33b3-4703-8344-90077fb62773" CreationDate="2023-02-16T12:45:22.787" UserId="3838" Text="when i try to verify a signature using alice adress i got signatureInvalid&#xD;&#xA;```echo &quot;blabla&quot; | ./target/release/subkey verify &quot;102f4f19773b0157c87561b9b6bfa07558246cbe0155a74ffd8f6365d4d14865a92f58a928b504dd6dd392b67e8a52a58832822c3f1b89f262f1921a286f8c84&quot; &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;&#xD;&#xA;Error: SignatureInvalid```&#xD;&#xA;&#xD;&#xA;any help is welcome, thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="27654" PostHistoryTypeId="1" PostId="7251" RevisionGUID="1aecfdfe-33b3-4703-8344-90077fb62773" CreationDate="2023-02-16T12:45:22.787" UserId="3838" Text="SSubstrate | ignatureInvalid when i try to verify signature with public key" ContentLicense="CC BY-SA 4.0" />
  <row Id="27655" PostHistoryTypeId="3" PostId="7251" RevisionGUID="1aecfdfe-33b3-4703-8344-90077fb62773" CreationDate="2023-02-16T12:45:22.787" UserId="3838" Text="|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27656" PostHistoryTypeId="5" PostId="7251" RevisionGUID="8b4bfd21-f7f9-4ab0-b0f8-6c6769867636" CreationDate="2023-02-16T12:46:15.660" UserId="3838" Comment="edited body" Text="when i try to verify a signature using alice adress i got signatureInvalid&#xD;&#xA;&#xD;&#xA;``` echo &quot;blabla&quot; | ./target/release/subkey verify 102f4f19773b0157c87561b9b6bfa07558246cbe0155a74ffd8f6365d4d14865a92f58a928b504dd6dd392b67e8a52a58832822c3f1b89f262f1921a286f8c8 &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;Error: SignatureInvalid ```&#xD;&#xA;&#xD;&#xA;any help is welcome, thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="27657" PostHistoryTypeId="5" PostId="7251" RevisionGUID="a7b7abf6-555d-4eb0-84e1-92a83e60bd31" CreationDate="2023-02-16T12:46:47.883" UserId="3838" Comment="deleted 7 characters in body" Text="when i try to verify a signature using alice adress i got signatureInvalid&#xD;&#xA;&#xD;&#xA;echo &quot;blabla&quot; | ./target/release/subkey verify 102f4f19773b0157c87561b9b6bfa07558246cbe0155a74ffd8f6365d4d14865a92f58a928b504dd6dd392b67e8a52a58832822c3f1b89f262f1921a286f8c8 &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;Error: SignatureInvalid &#xD;&#xA;&#xD;&#xA;any help is welcome, thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="27658" PostHistoryTypeId="5" PostId="7251" RevisionGUID="c9a8cbe8-0f59-45b9-9e90-a75b1a3ed8a5" CreationDate="2023-02-16T12:47:13.620" UserId="3838" Comment="added 2 characters in body" Text="when i try to verify a signature using alice adress i got signatureInvalid&#xD;&#xA;&#xD;&#xA;echo &quot;blabla&quot; | ./target/release/subkey verify 102f4f19773b0157c87561b9b6bfa07558246cbe0155a74ffd8f6365d4d14865a92f58a928b504dd6dd392b67e8a52a58832822c3f1b89f262f1921a286f8c8 &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;&#xD;&#xA;Error: SignatureInvalid &#xD;&#xA;&#xD;&#xA;any help is welcome, thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="27659" PostHistoryTypeId="5" PostId="7251" RevisionGUID="ded2130c-e082-4c5f-8562-12b720247269" CreationDate="2023-02-16T12:52:10.227" UserId="380" Comment="quote" Text="when i try to verify a signature using alice adress i got signatureInvalid&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; echo &quot;blabla&quot; | ./target/release/subkey verify&#xD;&#xA;&gt; 102f4f19773b0157c87561b9b6bfa07558246cbe0155a74ffd8f6365d4d14865a92f58a928b504dd6dd392b67e8a52a58832822c3f1b89f262f1921a286f8c8&#xD;&#xA;&gt; &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;&gt; &#xD;&#xA;&gt; Error: SignatureInvalid&#xD;&#xA;&#xD;&#xA;any help is welcome, thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="27660" PostHistoryTypeId="5" PostId="7251" RevisionGUID="e556c7b9-cf9d-43fd-8ec0-8477f274fa69" CreationDate="2023-02-16T13:32:43.407" UserId="3838" Comment="deleted 1 character in body" Text="when i try to verify a signature using alice adress i got signatureInvalid&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; echo &quot;blabla&quot; | ./target/release/subkey verify&#xD;&#xA;&gt; 102f4f19773b0157c87561b9b6bfa07558246cbe0155a74ffd8f6365d4d14865a92f58a928b504dd6dd392b67e8a52a58832822c3f1b89f262f1921a286f8c8&#xD;&#xA;&gt; 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;&gt; &#xD;&#xA;&gt; Error: SignatureInvalid&#xD;&#xA;&#xD;&#xA;any help is welcome, thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="27661" PostHistoryTypeId="4" PostId="7251" RevisionGUID="05c5dce1-76b1-4200-b1e6-025fdee62ce3" CreationDate="2023-02-16T13:33:13.967" UserId="3838" Comment="edited title" Text="Substrate | ignatureInvalid when i try to verify signature with public key" ContentLicense="CC BY-SA 4.0" />
  <row Id="27666" PostHistoryTypeId="2" PostId="7253" RevisionGUID="d69b528f-90a9-404c-8a78-f5437de887e8" CreationDate="2023-02-16T15:32:49.283" UserId="3468" Text="In the substrate node template only alice and bob is validator but i want to let any account to be able to validate and block how do i do it so any one can create be validating block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27668" PostHistoryTypeId="1" PostId="7253" RevisionGUID="d69b528f-90a9-404c-8a78-f5437de887e8" CreationDate="2023-02-16T15:32:49.283" UserId="3468" Text="Decentralize substrate template" ContentLicense="CC BY-SA 4.0" />
  <row Id="27669" PostHistoryTypeId="3" PostId="7253" RevisionGUID="d69b528f-90a9-404c-8a78-f5437de887e8" CreationDate="2023-02-16T15:32:49.283" UserId="3468" Text="|substrate-node-template|validator|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27670" PostHistoryTypeId="2" PostId="7254" RevisionGUID="748843ea-7c79-4916-9c3a-1117e3175f35" CreationDate="2023-02-16T16:01:38.870" UserId="135" Text="I'm following along this benchmark [docs][1] to run benchmarking on my Substrate node (dependencies on `branch = &quot;polkadot-v0.9.25&quot;`) with the command `cargo build --release --features runtime-benchmarks` and it works successfully. But then, when I tried to run the next step with this command:&#xD;&#xA;```&#xD;&#xA;./target/release/my-node benchmark pallet \&#xD;&#xA;--chain=dev \&#xD;&#xA;--execution=wasm \&#xD;&#xA;--wasm-execution=compiled \&#xD;&#xA;--pallet &quot;*&quot; \&#xD;&#xA;--extrinsic &quot;*&quot; \&#xD;&#xA;--steps 50 \&#xD;&#xA;--repeat 20 \&#xD;&#xA;--output pallets/all-weight.rs&#xD;&#xA;```&#xD;&#xA;I got an error:&#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;Runtime benchmarking wasn't enabled when building the node. You can enable it with `--features runtime-benchmarks`.&quot;)&#xD;&#xA;```&#xD;&#xA;I've checked the `runtime-benchmarks` features in Cargo.toml and `define_benchmarks!` in the Runtime but I don't think something missing there.&#xD;&#xA;&#xD;&#xA;I suspected that the problem could probably come from `runner.sync_run` in node's `command.rs` but couldn't get a good grasp of the root cause.&#xD;&#xA;&#xD;&#xA;What else could I miss here?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/test/benchmark/" ContentLicense="CC BY-SA 4.0" />
  <row Id="27672" PostHistoryTypeId="1" PostId="7254" RevisionGUID="748843ea-7c79-4916-9c3a-1117e3175f35" CreationDate="2023-02-16T16:01:38.870" UserId="135" Text="Error: Input Runtime benchmarking wasn't enabled when building the node" ContentLicense="CC BY-SA 4.0" />
  <row Id="27673" PostHistoryTypeId="3" PostId="7254" RevisionGUID="748843ea-7c79-4916-9c3a-1117e3175f35" CreationDate="2023-02-16T16:01:38.870" UserId="135" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27674" PostHistoryTypeId="2" PostId="7255" RevisionGUID="1851f727-0927-4c77-80ae-f8dd63fa7c86" CreationDate="2023-02-16T16:13:01.760" UserId="2762" Text="How are you doing the signature?&#xD;&#xA;Following the account generated in the example from the docs https://docs.substrate.io/reference/command-line-tools/subkey/ &#xD;&#xA;&#xD;&#xA;You can create a signature for a message:&#xD;&#xA;&#xD;&#xA;    echo &quot;blabla&quot; | ./target/release/subkey sign --suri 0xc8fa03532fb22ee1f7f6908b9c02b4e72483f0dbd66e4cd456b8f34c6230b849&#xD;&#xA;&#xD;&#xA;It results in:&#xD;&#xA;&#xD;&#xA;    c4273e58b19b582330577f380041171d7aa9def2922e492e1b5510bc17a03f3fe19ae2b4f8089a7b4ba821fabffb97596245aa6caecf686a9ff119010374af8f&#xD;&#xA;&#xD;&#xA;And validated it with its corresponding account: `5Gv8YYFu8H1btvmrJy9FjjAWfb99wrhV3uhPFoNEr918utyR`&#xD;&#xA;&#xD;&#xA;    echo &quot;blabla&quot; | ./target/release/subkey verify c4273e58b19b582330577f380041171d7aa9def2922e492e1b5510bc17a03f3fe19ae2b4f8089a7b4ba821fabffb97596245aa6caecf686a9ff119010374af8f 5Gv8YYFu8H1btvmrJy9FjjAWfb99wrhV3uhPFoNEr918utyR&#xD;&#xA;&#xD;&#xA;And the result is ok:&#xD;&#xA;&#xD;&#xA;    Signature verifies correctly.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27676" PostHistoryTypeId="5" PostId="7255" RevisionGUID="62316803-514b-4525-99e6-29cb228926b5" CreationDate="2023-02-16T16:21:34.813" UserId="2762" Comment="added 20 characters in body" Text="How are you doing the signature?&#xD;&#xA;Following the account generated in the example from the docs https://docs.substrate.io/reference/command-line-tools/subkey/ &#xD;&#xA;&#xD;&#xA;You can create a signature of a message:&#xD;&#xA;&#xD;&#xA;    echo &quot;blabla&quot; | ./target/release/subkey sign --suri 0xc8fa03532fb22ee1f7f6908b9c02b4e72483f0dbd66e4cd456b8f34c6230b849&#xD;&#xA;&#xD;&#xA;It gives you this result:&#xD;&#xA;&#xD;&#xA;    c4273e58b19b582330577f380041171d7aa9def2922e492e1b5510bc17a03f3fe19ae2b4f8089a7b4ba821fabffb97596245aa6caecf686a9ff119010374af8f&#xD;&#xA;&#xD;&#xA;That then you can validate with its corresponding account: `5Gv8YYFu8H1btvmrJy9FjjAWfb99wrhV3uhPFoNEr918utyR`&#xD;&#xA;&#xD;&#xA;    echo &quot;blabla&quot; | ./target/release/subkey verify c4273e58b19b582330577f380041171d7aa9def2922e492e1b5510bc17a03f3fe19ae2b4f8089a7b4ba821fabffb97596245aa6caecf686a9ff119010374af8f 5Gv8YYFu8H1btvmrJy9FjjAWfb99wrhV3uhPFoNEr918utyR&#xD;&#xA;&#xD;&#xA;And the result is ok:&#xD;&#xA;&#xD;&#xA;    Signature verifies correctly.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27677" PostHistoryTypeId="2" PostId="7256" RevisionGUID="31f3b5e0-209d-40e9-b061-de559b8997a2" CreationDate="2023-02-16T16:50:48.057" UserId="2762" Text="Check this Substrate Tutorial: https://docs.substrate.io/tutorials/get-started/add-trusted-nodes/&#xD;&#xA;&#xD;&#xA;It shows you how the validator that wants to join your node can to generate their keys, how to modify the chain specification to add those key pairs." ContentLicense="CC BY-SA 4.0" />
  <row Id="27679" PostHistoryTypeId="5" PostId="7251" RevisionGUID="ea6a8db3-4603-473b-81ff-d24da869b7b7" CreationDate="2023-02-16T16:52:24.017" UserId="2762" Comment="improve formatting and spelling" Text="When I try to verify a signature using Alice address I got a `SignatureInvalid` message.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    echo &quot;blabla&quot; | ./target/release/subkey verify&#xD;&#xA;    102f4f19773b0157c87561b9b6bfa07558246cbe0155a74ffd8f6365d4d14865a92f58a928b504dd6dd392b67e8a52a58832822c3f1b89f262f1921a286f8c8 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Error: SignatureInvalid&#xD;&#xA;&#xD;&#xA;Any help is welcome, thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="27680" PostHistoryTypeId="4" PostId="7251" RevisionGUID="ea6a8db3-4603-473b-81ff-d24da869b7b7" CreationDate="2023-02-16T16:52:24.017" UserId="2762" Comment="improve formatting and spelling" Text="Substrate | SignatureInvalid when I try to verify signature with public key" ContentLicense="CC BY-SA 4.0" />
  <row Id="27681" PostHistoryTypeId="5" PostId="7253" RevisionGUID="611b7392-5b9c-4532-a6aa-c1f1e933ceb1" CreationDate="2023-02-16T17:24:38.437" UserId="3468" Comment="added 18 characters in body" Text="In the substrate node template only alice and bob is validator who can auth block but i want to let any account to be able to validate and block how do i do it so any one can create block and finilaze?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27682" PostHistoryTypeId="50" PostId="6769" RevisionGUID="2da58950-4e61-4b62-a526-4f70cf97ed25" CreationDate="2023-02-17T01:02:20.247" UserId="-1" />
  <row Id="27684" PostHistoryTypeId="2" PostId="7257" RevisionGUID="895d598f-cece-4002-b2d5-abe82576e772" CreationDate="2023-02-17T05:39:27.300" UserId="2909" Text="Moonbeam is an implementation of Frontier, an Ethereum compatibility layer for Substrate. Frontier is a codebase managed by the team behind Moonbeam and Wei Tang. You need not fork Moonbeam's repository. Simply take advantage of Frontier.&#xD;&#xA;&#xD;&#xA;Check it out here:&#xD;&#xA;&#xD;&#xA; - https://paritytech.github.io/frontier/&#xD;&#xA; - https://github.com/paritytech/frontier&#xD;&#xA;&#xD;&#xA;Similar to the Basic Substrate Node template, there is a basic Frontier Substrate Node Template to start from which you will be able to produce blocks immediately:&#xD;&#xA;&#xD;&#xA; - https://github.com/paritytech/frontier/tree/master/template&#xD;&#xA;&#xD;&#xA;That being said, why will you not want to be a parachain. The economic security is significantly lesser starting out as a solochain (Orders of magnitude lesser). But if you are keen to try it out as a testnet, by all means be a solochain for now :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27686" PostHistoryTypeId="2" PostId="7258" RevisionGUID="446d8f4f-0f8d-45ea-8396-2bad67064a1d" CreationDate="2023-02-17T07:20:01.027" UserId="2722" Text="I am planning to publish a Substrate chain on a server, and I want to ensure that I have a reliable backup and restore process in place to prevent data loss. How can I backup and restore my Substrate chain data without losing any transactions or data in case of unexpected shutdowns or other issues?&#xD;&#xA;&#xD;&#xA;Also, when I run a node (NPOS) on my local machine, the hard drive fills up after 2-3 hours. Will this issue occur on the mainnet, and what can I do to prevent it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27688" PostHistoryTypeId="1" PostId="7258" RevisionGUID="446d8f4f-0f8d-45ea-8396-2bad67064a1d" CreationDate="2023-02-17T07:20:01.027" UserId="2722" Text="How to Backup and Restore a Substrate Chain Running on a Server" ContentLicense="CC BY-SA 4.0" />
  <row Id="27689" PostHistoryTypeId="3" PostId="7258" RevisionGUID="446d8f4f-0f8d-45ea-8396-2bad67064a1d" CreationDate="2023-02-17T07:20:01.027" UserId="2722" Text="|polkadot-js|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27690" PostHistoryTypeId="2" PostId="7259" RevisionGUID="93fec59a-2ad3-4a5b-acab-0a31dee5fc1c" CreationDate="2023-02-17T08:08:17.227" UserId="3254" Text="I want to use U256 in ink! but I've got some a error although I imported primitive_types/std....&#xD;&#xA;how can I solve it? &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use primitive_types::U256;&#xD;&#xA;&#xD;&#xA;pub mod liquidity_num {&#xD;&#xA;    pub const MIN_TICK: i32 = -887272;&#xD;&#xA;    pub const MAX_TICK: i32 = -MIN_TICK;&#xD;&#xA;    pub const MIN_SQRT_RATIO: u128 = 4295128739;&#xD;&#xA;    pub const MAX_SQRT_RATIO: U256 = U256::from(1461446703485210103287273052203988822378723970342);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error&#xD;&#xA;```&#xD;&#xA;error: integer literal is too large&#xD;&#xA;  --&gt; uniswap-v3/logics/helpers/liquidity_helper.rs:13:49&#xD;&#xA;   |&#xD;&#xA;13 |     pub const MAX_SQRT_RATIO: U256 = U256::from(1461446703485210103287273052203988822378723970342);&#xD;&#xA;   |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;error[E0412]: cannot find type `U256` in this scope&#xD;&#xA;  --&gt; uniswap-v3/logics/helpers/liquidity_helper.rs:13:31&#xD;&#xA;   |&#xD;&#xA;13 |     pub const MAX_SQRT_RATIO: U256 = U256::from(1461446703485210103287273052203988822378723970342);&#xD;&#xA;   |                               ^^^^ not found in this scope&#xD;&#xA;   |&#xD;&#xA;help: consider importing one of these items&#xD;&#xA;   |&#xD;&#xA;10 |     use crate::helpers::liquidity_helper::U256;&#xD;&#xA;   |&#xD;&#xA;10 |     use primitive_types::U256;&#xD;&#xA;   |&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared type `U256`&#xD;&#xA;  --&gt; uniswap-v3/logics/helpers/liquidity_helper.rs:13:38&#xD;&#xA;   |&#xD;&#xA;13 |     pub const MAX_SQRT_RATIO: U256 = U256::from(1461446703485210103287273052203988822378723970342);&#xD;&#xA;   |                                      ^^^^ not found in this scope&#xD;&#xA;   |&#xD;&#xA;help: consider importing one of these items&#xD;&#xA;   |&#xD;&#xA;10 |     use crate::helpers::liquidity_helper::U256;&#xD;&#xA;   |&#xD;&#xA;10 |     use primitive_types::U256;&#xD;&#xA;   |&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27692" PostHistoryTypeId="1" PostId="7259" RevisionGUID="93fec59a-2ad3-4a5b-acab-0a31dee5fc1c" CreationDate="2023-02-17T08:08:17.227" UserId="3254" Text="how to treat u256 in ink!?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27693" PostHistoryTypeId="3" PostId="7259" RevisionGUID="93fec59a-2ad3-4a5b-acab-0a31dee5fc1c" CreationDate="2023-02-17T08:08:17.227" UserId="3254" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27694" PostHistoryTypeId="4" PostId="7259" RevisionGUID="4ee66e66-935f-4996-9908-1e2ee819a6aa" CreationDate="2023-02-17T09:25:49.207" UserId="3254" Comment="edited tags; edited title" Text="how to treat u256 in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27695" PostHistoryTypeId="6" PostId="7259" RevisionGUID="4ee66e66-935f-4996-9908-1e2ee819a6aa" CreationDate="2023-02-17T09:25:49.207" UserId="3254" Comment="edited tags; edited title" Text="|ink|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27696" PostHistoryTypeId="2" PostId="7260" RevisionGUID="5fa18846-8299-439b-81c0-708d42eec9c5" CreationDate="2023-02-17T09:56:49.440" UserId="527" Text="Take a look at https://github.com/paritytech/parachains-integration-tests&#xD;&#xA;&#xD;&#xA;You can easily send RPC call with that tool" ContentLicense="CC BY-SA 4.0" />
  <row Id="27698" PostHistoryTypeId="2" PostId="7261" RevisionGUID="a2ce3a07-e922-46ad-a5e5-1ea2a1d71dd2" CreationDate="2023-02-17T10:16:51.690" UserId="251" Text="1. Stop the node and backup the data periodically, then restart the node, if you got enough space, I recommend you run another backup node for this usage&#xD;&#xA;2. Increase your hard drive space or use the pruning mode, but the final solution is still increasing your hard drive space, BTW 2~3 hours is crazy it looks like that your hard drive space is pretty small, you'd better upgrade your hardware" ContentLicense="CC BY-SA 4.0" />
  <row Id="27700" PostHistoryTypeId="2" PostId="7262" RevisionGUID="36436b5d-265e-4804-a138-4b34914abd67" CreationDate="2023-02-17T11:43:39.420" UserId="2372" Text="I've been working on the data migration from the existing solo chain to the Relay Chain. I've already fetched most of the data but i need to know about fetching the blocks. Is there any way to fetch the blocks too, and add them in the new chain. &#xD;&#xA;     " ContentLicense="CC BY-SA 4.0" />
  <row Id="27702" PostHistoryTypeId="1" PostId="7262" RevisionGUID="36436b5d-265e-4804-a138-4b34914abd67" CreationDate="2023-02-17T11:43:39.420" UserId="2372" Text="Can we migrate the existing solo chain blocks to another substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27703" PostHistoryTypeId="3" PostId="7262" RevisionGUID="36436b5d-265e-4804-a138-4b34914abd67" CreationDate="2023-02-17T11:43:39.420" UserId="2372" Text="|parachain|relay-chain|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27704" PostHistoryTypeId="2" PostId="7263" RevisionGUID="ee4b7b1a-78fb-4cdb-8250-7638567db5ec" CreationDate="2023-02-17T12:28:51.640" UserId="2762" Text="The largest size ink! has built in is a u128. ink! compiles to Wasm. The largest primitive Wasm has is 64bit (due to most computers using 64bit). So, there is no benefit to using any larger primitive over a collection.&#xD;&#xA;&#xD;&#xA;From the ink! docs https://use.ink/ink-vs-solidity#uint256 the recommended way to treat with u256 is:&#xD;&#xA;&#xD;&#xA;&gt; it is recommended to, with discretion, determine the range of the value, and choose the appropriate size (u8, u16, u32, u64, u128). If a 256-bit hash value is required, ink! has a Hash primitive available. In the event a value needs to be 256-bit, it is recommended to use an array (e.g. [u64; 4]).&#xD;&#xA;&#xD;&#xA;See this old question on StackExchange too: https://substrate.stackexchange.com/questions/4045/best-way-to-handle-soliditys-uint256-in-ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="27706" PostHistoryTypeId="2" PostId="7264" RevisionGUID="6d04526e-07a7-4c73-8b8f-e075ec8ed1c3" CreationDate="2023-02-17T13:18:37.913" UserId="3440" Text="I have a mapping that has values and I would like to iterate the map and display the results that satisfy the condition and return the results as the array. The function looks like this&#xD;&#xA;```&#xD;&#xA;fn iterate_map(&amp;self) -&gt; Vec&lt;(AccountId, u32)&gt; {&#xD;&#xA;        let mut results = Vec::new();&#xD;&#xA;        for (key, value) in self.my_map.iter() {&#xD;&#xA;            if *value &gt; 10 {&#xD;&#xA;                results.push((*key, *value));&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now is it possible to do this action using ink smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27708" PostHistoryTypeId="1" PostId="7264" RevisionGUID="6d04526e-07a7-4c73-8b8f-e075ec8ed1c3" CreationDate="2023-02-17T13:18:37.913" UserId="3440" Text="how to iterate a mapping with values as a struct" ContentLicense="CC BY-SA 4.0" />
  <row Id="27709" PostHistoryTypeId="3" PostId="7264" RevisionGUID="6d04526e-07a7-4c73-8b8f-e075ec8ed1c3" CreationDate="2023-02-17T13:18:37.913" UserId="3440" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27711" PostHistoryTypeId="10" PostId="7162" RevisionGUID="6d6cff14-2762-43f8-9b74-7ee82c1d3346" CreationDate="2023-02-17T14:30:00.443" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="27713" PostHistoryTypeId="2" PostId="7265" RevisionGUID="fe330349-21ae-4820-989f-4de35403229e" CreationDate="2023-02-17T14:48:48.407" UserId="2844" Text="Yeah mapping doesn't support iterating. You can insert value in mapping as well as Vec at same time like:&#xD;&#xA;&#xD;&#xA;    pub struct A {&#xD;&#xA;      mapping: Mapping&lt;id, value&gt;,&#xD;&#xA;      vector: Vec&lt;id&gt;,&#xD;&#xA;    }&#xD;&#xA;later you can iterate vector and display those value. As for example I have included example you can go through [this link](https://ink-playground.substrate.io/?id=7dddd51c98e9927d2bf33a05d9a6b887)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27715" PostHistoryTypeId="2" PostId="7266" RevisionGUID="610b463e-3500-46de-9c00-9f2a2c265ade" CreationDate="2023-02-17T16:25:04.410" UserId="3843" Text="what is the best way to call a contract on the backend side from the code? I know there is Polkadot.js but it's rather a frontend focused tool, and there is also cargo-contract which enables us to call a contract from the command line. &#xD;&#xA;&#xD;&#xA;In my case I am building a backend, where I will store account with private keys, loaded with the native tokes for gas fees, to call a given contract. Moreover,  I am also looking for a way to sign a message with Polakdot wallet on the frontend, and send this message to backend, to verify the signer. Possibly, the solution should be written in Rust - therefore cargo-contract always comes to my mind, I am just not sure how could I execute the call function straight inside of the code, instead executing it in the command line.&#xD;&#xA;&#xD;&#xA;Thanks in advance for any tip" ContentLicense="CC BY-SA 4.0" />
  <row Id="27717" PostHistoryTypeId="1" PostId="7266" RevisionGUID="610b463e-3500-46de-9c00-9f2a2c265ade" CreationDate="2023-02-17T16:25:04.410" UserId="3843" Text="How to Call a Smart Contract on the Backend" ContentLicense="CC BY-SA 4.0" />
  <row Id="27718" PostHistoryTypeId="3" PostId="7266" RevisionGUID="610b463e-3500-46de-9c00-9f2a2c265ade" CreationDate="2023-02-17T16:25:04.410" UserId="3843" Text="|ink|substrate-contracts-node|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27719" PostHistoryTypeId="5" PostId="7266" RevisionGUID="19327bd3-1cd7-4bd5-9d9a-01dc972afe1a" CreationDate="2023-02-17T16:25:19.087" UserId="3843" Comment="edited body" Text="What is the best way to call a contract on the backend side from the code? I know there is Polkadot.js but it's rather a frontend focused tool, and there is also cargo-contract which enables us to call a contract from the command line. &#xD;&#xA;&#xD;&#xA;In my case I am building a backend, where I will store account with private keys, loaded with the native tokes for gas fees, to call a given contract. Moreover,  I am also looking for a way to sign a message with Polakdot wallet on the frontend, and send this message to backend, to verify the signer. Possibly, the solution should be written in Rust - therefore cargo-contract always comes to my mind, I am just not sure how could I execute the call function straight inside of the code, instead executing it in the command line.&#xD;&#xA;&#xD;&#xA;Thanks in advance for any tip" ContentLicense="CC BY-SA 4.0" />
  <row Id="27720" PostHistoryTypeId="5" PostId="7266" RevisionGUID="2c4d95a1-fab6-451e-a538-cafd4ba4535d" CreationDate="2023-02-17T16:38:25.560" UserId="3843" Comment="added 36 characters in body" Text="What is the best way to call a contract (based on the Substrate Blokchain) on the backend side from the code? I know there is Polkadot.js but it's rather a frontend focused tool, and there is also cargo-contract which enables us to call a contract from the command line. &#xD;&#xA;&#xD;&#xA;In my case I am building a backend, where I will store account with private keys, loaded with the native tokens for gas fees, to call a given contract. Moreover,  I am also looking for a way to sign a message with Polakdot wallet on the frontend, and send this message to backend, to verify the signer. Possibly, the solution should be written in Rust - therefore cargo-contract always comes to my mind, I am just not sure how could I execute the call function straight inside of the code, instead executing it in the command line.&#xD;&#xA;&#xD;&#xA;Thanks in advance for any tip" ContentLicense="CC BY-SA 4.0" />
  <row Id="27725" PostHistoryTypeId="2" PostId="7268" RevisionGUID="a225cb5e-1646-442a-a56a-a3a4e428afbe" CreationDate="2023-02-17T19:14:09.053" UserId="3845" Text="I have been trying to call the flipper ink! contract from polkadot.js contracts section I keep getting this error. &#xD;&#xA;I've build the smart contract using cargo +nightly contract build and am using ink! v4 and cargo-contract 2&#xD;&#xA;&#xD;&#xA;[![error image][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mlZYS.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="27727" PostHistoryTypeId="1" PostId="7268" RevisionGUID="a225cb5e-1646-442a-a56a-a3a4e428afbe" CreationDate="2023-02-17T19:14:09.053" UserId="3845" Text="Calling ink! contracts not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="27728" PostHistoryTypeId="3" PostId="7268" RevisionGUID="a225cb5e-1646-442a-a56a-a3a4e428afbe" CreationDate="2023-02-17T19:14:09.053" UserId="3845" Text="|polkadot-js|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27729" PostHistoryTypeId="2" PostId="7269" RevisionGUID="444b8f60-a1bc-4b13-9928-7e6f82740771" CreationDate="2023-02-18T02:00:48.493" UserId="2844" Text="Still WeightV2 isn't merged in polkadot.js you can [look this](https://github.com/polkadot-js/apps/pull/8538) PR. Because of that you are getting this error. Instead you can use [https://github.com/polkadot-js/apps/pull/8538](https://github.com/polkadot-js/apps/pull/8538) this one it works fine for now." ContentLicense="CC BY-SA 4.0" />
  <row Id="27731" PostHistoryTypeId="2" PostId="7270" RevisionGUID="014dc6a4-7ae9-4f30-af90-5a7f41b23dc8" CreationDate="2023-02-18T08:48:48.673" UserId="126" Text="We just ran into the following issue on our kintsugi testnet deployment:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[Relaychain] :broken_heart: Verification failed for block 0xdef612b6bd9d3b6a2ff93a1e9310f385b7a8b715f3f368135731772a3c6f0792 received from peer: 12D3KooWEG2yLqePwnfa6s3CycUuqkzCC4LdG63Ke8qfrfhj7jPi, &quot;VRF verification failed: EquationFalse&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We are using a self-hosted rococo relay chain with v0.9.37 and we are on interbtc release 1.21.8 (polkadot v0.9.36).&#xD;&#xA;&#xD;&#xA;I saw that the issue is already reported in [GitHub issue #12752](https://github.com/paritytech/substrate/issues/12752) and fixed in https://github.com/paritytech/substrate/pull/13135.&#xD;&#xA;&#xD;&#xA;However, is there a way to recover the testnet from this issue? We are currently running a competition on that testnet so resetting the testnet (what we might normally do) is not our preferred option." ContentLicense="CC BY-SA 4.0" />
  <row Id="27733" PostHistoryTypeId="1" PostId="7270" RevisionGUID="014dc6a4-7ae9-4f30-af90-5a7f41b23dc8" CreationDate="2023-02-18T08:48:48.673" UserId="126" Text="BABE: VRF verification fails" ContentLicense="CC BY-SA 4.0" />
  <row Id="27734" PostHistoryTypeId="3" PostId="7270" RevisionGUID="014dc6a4-7ae9-4f30-af90-5a7f41b23dc8" CreationDate="2023-02-18T08:48:48.673" UserId="126" Text="|consensus|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27735" PostHistoryTypeId="2" PostId="7271" RevisionGUID="b062ad99-f260-48d3-8553-9dfb48d46376" CreationDate="2023-02-18T08:58:51.127" UserId="139" Text="Let's say I have a consensus engine called `X`. I know that most consensus engines import blocks through something with the trait `ImportQueue`, and `BasicQueue` is a popular choice for that. Consensus engines that rely on `BasicQueue` must also implement a `Verifier` trait to check the blocks for correct inherents and signatures and so forth.&#xD;&#xA;&#xD;&#xA;My question is, what happens if I don't use `BasicQueue` but my consensus engine provides its own implementation of `ImportQueue`? &#xD;&#xA;&#xD;&#xA;Can I then build the verification and importing functionality in **one go** through an impl of `ImportQueue`? If yes, how, i.e. which functions of the trait are we supposed to build the verification functionality in?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait ImportQueue&lt;B: BlockT&gt;: Send {&#xD;&#xA;    fn service(&amp;self) -&gt; Box&lt;dyn ImportQueueService&lt;B&gt;&gt;;&#xD;&#xA;    fn service_ref(&amp;mut self) -&gt; &amp;mut dyn ImportQueueService&lt;B&gt;;&#xD;&#xA;    fn poll_actions(&amp;mut self, cx: &amp;mut Context&lt;'_&gt;, link: &amp;mut dyn Link&lt;B&gt;);&#xD;&#xA;    fn run&lt;'async_trait&gt;(&#xD;&#xA;        self,&#xD;&#xA;        link: Box&lt;dyn Link&lt;B&gt;&gt;&#xD;&#xA;    ) -&gt; Pin&lt;Box&lt;dyn Future&lt;Output = ()&gt; + Send + 'async_trait&gt;&gt;&#xD;&#xA;    where&#xD;&#xA;        Self: 'async_trait;&#xD;&#xA;}&#xD;&#xA;``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="27737" PostHistoryTypeId="1" PostId="7271" RevisionGUID="b062ad99-f260-48d3-8553-9dfb48d46376" CreationDate="2023-02-18T08:58:51.127" UserId="139" Text="Do we need to implement the `Verifier` trait if we are providing our own implementation of `ImportQueue`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27738" PostHistoryTypeId="3" PostId="7271" RevisionGUID="b062ad99-f260-48d3-8553-9dfb48d46376" CreationDate="2023-02-18T08:58:51.127" UserId="139" Text="|consensus|block-import|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27739" PostHistoryTypeId="50" PostId="6798" RevisionGUID="cda99a66-93ca-48d9-997d-fbf204938ea4" CreationDate="2023-02-18T09:01:15.180" UserId="-1" />
  <row Id="27740" PostHistoryTypeId="5" PostId="7271" RevisionGUID="bd313d69-1dc0-45f2-b156-dd31136ccc1d" CreationDate="2023-02-18T09:28:22.523" UserId="139" Comment="added 119 characters in body" Text="Let's say I have a consensus engine called `X`. I know that most consensus engines import blocks through something with the trait `ImportQueue`, and `BasicQueue` is a popular choice for that. Consensus engines that rely on `BasicQueue` must also implement a `Verifier` trait to check the blocks for correct inherents and signatures and so forth.&#xD;&#xA;&#xD;&#xA;My question is, what happens if I don't use `BasicQueue` but my consensus engine provides its own implementation of `ImportQueue`? &#xD;&#xA;&#xD;&#xA;Can I then build the verification and importing functionality in **one go** through an impl of `ImportQueue`? If yes, how, i.e. which functions of the trait are we supposed to build the verification functionality in?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait ImportQueue&lt;B: BlockT&gt;: Send {&#xD;&#xA;    fn service(&amp;self) -&gt; Box&lt;dyn ImportQueueService&lt;B&gt;&gt;;&#xD;&#xA;    fn service_ref(&amp;mut self) -&gt; &amp;mut dyn ImportQueueService&lt;B&gt;;&#xD;&#xA;    fn poll_actions(&amp;mut self, cx: &amp;mut Context&lt;'_&gt;, link: &amp;mut dyn Link&lt;B&gt;);&#xD;&#xA;    fn run&lt;'async_trait&gt;(&#xD;&#xA;        self,&#xD;&#xA;        link: Box&lt;dyn Link&lt;B&gt;&gt;&#xD;&#xA;    ) -&gt; Pin&lt;Box&lt;dyn Future&lt;Output = ()&gt; + Send + 'async_trait&gt;&gt;&#xD;&#xA;    where&#xD;&#xA;        Self: 'async_trait;&#xD;&#xA;}&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;Bonus Question: Is there a real world implemenation of a consensus engine not using `BasicQueue` for `ImportQueue`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27741" PostHistoryTypeId="2" PostId="7272" RevisionGUID="45a13cac-77ce-4de6-910e-44ea79b73a43" CreationDate="2023-02-18T10:01:31.770" UserId="2722" Text="I'm building a custom blockchain using Substrate, and I want to include Zero Knowledge Proofs to enable secure and private transactions. Can someone provide an example of how to implement Zero Knowledge Proofs in Substrate using Rust?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27743" PostHistoryTypeId="1" PostId="7272" RevisionGUID="45a13cac-77ce-4de6-910e-44ea79b73a43" CreationDate="2023-02-18T10:01:31.770" UserId="2722" Text="implement ZKP in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="27744" PostHistoryTypeId="3" PostId="7272" RevisionGUID="45a13cac-77ce-4de6-910e-44ea79b73a43" CreationDate="2023-02-18T10:01:31.770" UserId="2722" Text="|polkadot-js|substrate-node-template|zero-knowlage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27749" PostHistoryTypeId="5" PostId="7249" RevisionGUID="687e5327-7f28-4163-9e28-d5e5dd01b673" CreationDate="2023-02-18T11:24:06.117" UserId="1959" Comment="added 3 characters in body" Text="I have cloned the repo of [MoonBeam][1] and run the chain as a &quot;Development chain&quot; but the chain is not producing blocks. Are there any reference links which i can follow to remove dependency from relay chain? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/PureStake/moonbeam.git" ContentLicense="CC BY-SA 4.0" />
  <row Id="27750" PostHistoryTypeId="5" PostId="7126" RevisionGUID="60d29c2e-9064-4362-9fe4-f2fabc348dd5" CreationDate="2023-02-18T11:28:20.260" UserId="1959" Comment="added 3 characters in body" Text="I’m working on an [SDK for XCM][1] and I made some [examples using Rockmine and Dali][2]. I noticed today the Dali rpc isn't working and isn’t in parachains list in Rococo. I tried to transfer ROC from Rockmine to Dolphin (which has an open HRMP channel with Rockmine), but it didn’t work.&#xD;&#xA;Will Dali be alive again?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/blockcoders/xcm-sdk&#xD;&#xA;  [2]: https://github.com/blockcoders/xcm-sdk/blob/main/README.md#send-native-asset-roc-from-rockmine-to-dali" ContentLicense="CC BY-SA 4.0" />
  <row Id="27751" PostHistoryTypeId="2" PostId="7273" RevisionGUID="86fb2052-0c50-4b95-ab8e-76a7e966f8b0" CreationDate="2023-02-18T12:58:54.773" UserId="3732" Text="As far as I know, there are already pallets using ZKP. &#xD;&#xA;&#xD;&#xA;I think it would be good to refer to urls below!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;webpage:&#xD;&#xA;https://brightinventions.pl/blog/zk-snarks-in-substrate-tutorial-supported-by-the-w3f-grants-program&#xD;&#xA;&#xD;&#xA;github:&#xD;&#xA;https://github.com/bright/zk-snarks-with-substrate/" ContentLicense="CC BY-SA 4.0" />
  <row Id="27754" PostHistoryTypeId="50" PostId="4939" RevisionGUID="250b86b0-926d-4f6b-97e4-355147a9f025" CreationDate="2023-02-19T00:05:35.803" UserId="-1" />
  <row Id="27755" PostHistoryTypeId="2" PostId="7274" RevisionGUID="02d500c7-54ab-4f30-9c4f-e11e351257d9" CreationDate="2023-02-19T02:09:04.933" UserId="372" Text="The rustdocs for [execute_block](https://paritytech.github.io/substrate/master/sp_api/trait.Core.html#method.execute_block) indicate that it returns a `Result&lt;(), ApiError&gt;`. However, when I look at a real-world runtime like [in the node template](https://github.com/substrate-developer-hub/substrate-node-template/blob/d79d8cef20bd45ef3961ad1ef3c9a7d677a5e29c/runtime/src/lib.rs#L357) , there is no return type. So I want to clarify whether there is a return type or not, and why is there this apparent discrepancy between the definition and usage?&#xD;&#xA;&#xD;&#xA;More practically, if there is no opportunity to return an error when executing a block that you are currently importing, what is the expected behavior when the node attempts to import an invalid block? It seems that FRAME executive just panics in cases like an [invalid signature](https://github.com/paritytech/substrate/blob/7ffae37f5c5eca019ca8c5448c97767aace0c9fa/frame/executive/src/lib.rs#L487), [failed extrinsic](https://github.com/paritytech/substrate/blob/7ffae37f5c5eca019ca8c5448c97767aace0c9fa/frame/executive/src/lib.rs#L503) or [digest mismatch](https://github.com/paritytech/substrate/blob/7ffae37f5c5eca019ca8c5448c97767aace0c9fa/frame/executive/src/lib.rs#L588)." ContentLicense="CC BY-SA 4.0" />
  <row Id="27757" PostHistoryTypeId="1" PostId="7274" RevisionGUID="02d500c7-54ab-4f30-9c4f-e11e351257d9" CreationDate="2023-02-19T02:09:04.933" UserId="372" Text="Does `sp_api::Core`'s `execute_block` function return a result? If not shall I panic when importing a bad block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27758" PostHistoryTypeId="3" PostId="7274" RevisionGUID="02d500c7-54ab-4f30-9c4f-e11e351257d9" CreationDate="2023-02-19T02:09:04.933" UserId="372" Text="|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27759" PostHistoryTypeId="4" PostId="7274" RevisionGUID="c08bf86e-1579-4875-bb10-e27382c99622" CreationDate="2023-02-19T04:42:45.687" UserId="372" Comment="Can't use backticks for code in title" Text="Does sp_api::Core::execute_block return a Result? If not shall I panic when importing a bad block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27760" PostHistoryTypeId="5" PostId="7257" RevisionGUID="73da3c5b-4d59-4d2a-889c-96992094f698" CreationDate="2023-02-19T08:27:13.950" UserId="2909" Comment="edited body" Text="Moonbeam is an implementation of Frontier, an Ethereum compatibility layer for Substrate. Frontier is a codebase managed by the team behind Moonbeam and Wei Tang. You need not fork Moonbeam's repository. Simply take advantage of Frontier.&#xD;&#xA;&#xD;&#xA;Check it out here:&#xD;&#xA;&#xD;&#xA; - https://paritytech.github.io/frontier/&#xD;&#xA; - https://github.com/paritytech/frontier&#xD;&#xA;&#xD;&#xA;Similar to the Basic Substrate Node template, there is a basic Frontier Substrate Node Template to start from which you will be able to produce blocks immediately:&#xD;&#xA;&#xD;&#xA; - https://github.com/paritytech/frontier/tree/master/template&#xD;&#xA;&#xD;&#xA;That being said, why will you not want to be a parachain? The economic security is significantly lesser starting out as a solochain (Orders of magnitude lesser). But if you are keen to try it out as a testnet, by all means be a solochain for now :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27761" PostHistoryTypeId="2" PostId="7275" RevisionGUID="b052f0fa-ca30-4c3a-9d87-a4282e18c400" CreationDate="2023-02-19T11:01:04.157" UserId="3843" Text="It looks like the same issue still occurs in 2023, moreover I realised that now interacting with Smart Contracts on https://polkadot.js.org/apps/ is broken as well. The only way to interact with them is by using https://contracts-ui.substrate.io/ which apparently has some kind of workaround for that WeightV2 issue. Nevertheless, as a fulfilment of the reply from Adam Wierzbicki, you need to add following parts to make your code work.&#xD;&#xA;&#xD;&#xA;First of all import these at the top of the code block&#xD;&#xA;&#xD;&#xA;    import { BN, BN_ONE } from &quot;@polkadot/util&quot;;&#xD;&#xA;    import type { WeightV2 } from '@polkadot/types/interfaces'&#xD;&#xA;&#xD;&#xA;Somewhere below define two new variables&#xD;&#xA;&#xD;&#xA;    const MAX_CALL_WEIGHT = new BN(5_000_000_000_000).isub(BN_ONE);&#xD;&#xA;    const PROOFSIZE = new BN(1_000_000);&#xD;&#xA;&#xD;&#xA;Execute query on the given function to retrieve the required gas limit&#xD;&#xA;&#xD;&#xA;    const storageDepositLimit = null;&#xD;&#xA;    &#xD;&#xA;      const { gasRequired } = await contract.query.flip(&#xD;&#xA;        account.address,&#xD;&#xA;        {&#xD;&#xA;          gasLimit: api?.registry.createType('WeightV2', {&#xD;&#xA;            refTime: MAX_CALL_WEIGHT,&#xD;&#xA;            proofSize: PROOFSIZE,&#xD;&#xA;          }) as WeightV2,&#xD;&#xA;          storageDepositLimit,&#xD;&#xA;        }&#xD;&#xA;      );&#xD;&#xA;&#xD;&#xA;Define the gas limit variable and execute transaction call&#xD;&#xA;&#xD;&#xA;    const gasLimit = api?.registry.createType('WeightV2', gasRequired) as WeightV2&#xD;&#xA;    &#xD;&#xA;    await contract.tx&#xD;&#xA;      .flip({&#xD;&#xA;        gasLimit,&#xD;&#xA;        storageDepositLimit&#xD;&#xA;      })&#xD;&#xA;      .signAndSend(alice, async (res) =&gt; {&#xD;&#xA;        if (res.status.isInBlock) {&#xD;&#xA;          console.log('in a block')&#xD;&#xA;        } else if (res.status.isFinalized) {&#xD;&#xA;          console.log('finalized')&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;If you need to only read some data from the Smart contract you can query it like in the code block below&#xD;&#xA;&#xD;&#xA;    const { result, output } = await contract.query.get(&#xD;&#xA;        alice.address,&#xD;&#xA;        {&#xD;&#xA;          gasLimit: api?.registry.createType('WeightV2', {&#xD;&#xA;            refTime: MAX_CALL_WEIGHT,&#xD;&#xA;            proofSize: PROOFSIZE,&#xD;&#xA;          }) as WeightV2,&#xD;&#xA;          storageDepositLimit,&#xD;&#xA;        }&#xD;&#xA;      );&#xD;&#xA;    &#xD;&#xA;        // The actual result from RPC as `ContractExecResult`&#xD;&#xA;      console.log(result.toHuman());&#xD;&#xA;    &#xD;&#xA;      // check if the call was successful&#xD;&#xA;      if (result.isOk) {&#xD;&#xA;        // output the return value&#xD;&#xA;        console.log(&quot;Success&quot;, output?.toHuman());&#xD;&#xA;      } else {&#xD;&#xA;        console.error(&quot;Error&quot;, result.asErr);&#xD;&#xA;      }&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27764" PostHistoryTypeId="50" PostId="6813" RevisionGUID="07e520b0-626b-4940-9ae2-ae00a87a3a57" CreationDate="2023-02-19T17:06:35.843" UserId="-1" />
  <row Id="27765" PostHistoryTypeId="2" PostId="7276" RevisionGUID="df288a43-8e33-4784-9a2b-941dd1692e71" CreationDate="2023-02-19T18:18:36.413" UserId="3319" Text="im trying to submit multiple unsigned extrinsics to the transaction pool but an Error is returned which says:  &#xD;&#xA;&#xD;&#xA;&gt; Transaction pool error: Too low priority (0 &gt; 0)&#xD;&#xA;&#xD;&#xA;i thought this might be related to the nonce but how come an unsigned extrinsic have a nonce if its not associated with an account?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27767" PostHistoryTypeId="1" PostId="7276" RevisionGUID="df288a43-8e33-4784-9a2b-941dd1692e71" CreationDate="2023-02-19T18:18:36.413" UserId="3319" Text="Transaction pool error: Too low priority (0 &gt; 0)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27768" PostHistoryTypeId="3" PostId="7276" RevisionGUID="df288a43-8e33-4784-9a2b-941dd1692e71" CreationDate="2023-02-19T18:18:36.413" UserId="3319" Text="|extrinsic|nonce|transaction-pool|tx-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27769" PostHistoryTypeId="50" PostId="6819" RevisionGUID="edafe2b8-0afe-49ad-8f6d-84d0187cc3a1" CreationDate="2023-02-19T19:03:45.440" UserId="-1" />
  <row Id="27770" PostHistoryTypeId="2" PostId="7277" RevisionGUID="832e5f18-4ddc-4951-9a54-46477d8e0a9b" CreationDate="2023-02-19T20:15:39.910" UserId="73" Text="&gt; So I want to clarify whether there is a return type or not, and why is there this apparent discrepancy between the definition and usage?&#xD;&#xA;&#xD;&#xA;Yeah we need to improve the docs for these generated traits. When you declare a runtime api, the macro will generate a node-side trait and a runtime-side trait. The one you linked is the node-side trait. The main changes that are done to the node-side trait are the addition of the `at` parameter and that each function returns a `Result`. The runtime side will be using the exact declaration that is passed to [`decl_runtime_apis!`][1] (it docs also contain some information on these differences).&#xD;&#xA;&#xD;&#xA;&gt; More practically, if there is no opportunity to return an error when executing a block that you are currently importing, what is the expected behavior when the node attempts to import an invalid block?&#xD;&#xA;&#xD;&#xA;Panicking is the right approach here. When it panicks the block is seen thrown away as invalid. There is no real need to have it return some `Result`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_api/macro.decl_runtime_apis.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="27772" PostHistoryTypeId="50" PostId="4376" RevisionGUID="c2c929e1-0dac-485d-8651-1d50737a67e6" CreationDate="2023-02-20T03:02:15.270" UserId="-1" />
  <row Id="27773" PostHistoryTypeId="2" PostId="7278" RevisionGUID="fc813751-9b25-4586-9ee9-14730a6d0cc8" CreationDate="2023-02-20T03:23:28.297" UserId="3850" Text="What are the primary differences between [subxt](https://github.com/paritytech/subxt) and [substrate-api-client](https://github.com/scs/substrate-api-client) and how do they compare to [polkadotjs](https://polkadot.js.org/docs/)?&#xD;&#xA;&#xD;&#xA;I'm building a desktop application using [Tauri](https://tauri.app/) which runs server side rust code and javascript client side, so I'm trying to figure out which of these 3 libraries to use, 2 of them being backend server side libraries and the other a frontend libary." ContentLicense="CC BY-SA 4.0" />
  <row Id="27775" PostHistoryTypeId="1" PostId="7278" RevisionGUID="fc813751-9b25-4586-9ee9-14730a6d0cc8" CreationDate="2023-02-20T03:23:28.297" UserId="3850" Text="Subxt vs substrate-api-client vs polkadotjs" ContentLicense="CC BY-SA 4.0" />
  <row Id="27776" PostHistoryTypeId="3" PostId="7278" RevisionGUID="fc813751-9b25-4586-9ee9-14730a6d0cc8" CreationDate="2023-02-20T03:23:28.297" UserId="3850" Text="|polkadot-js|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27781" PostHistoryTypeId="2" PostId="7280" RevisionGUID="fc8d525b-bf30-44ff-9b3d-b282d15ba360" CreationDate="2023-02-20T04:26:31.927" UserId="3732" Text="Subxt is an RPC library officially managed by Parity for submitting extrinsics, while substrate-api-client is a program that received a grant from Parity but is not officially managed by them. &#xD;&#xA;&#xD;&#xA;These two libraries have slightly different functions to support. Additionally, Polkadot-js is a website that utilizes APIs like subxt and substrate-api-client to perform blockchain exporter functions, but its version is outdated and lacks customization options. &#xD;&#xA;&#xD;&#xA;Therefore, if you want to design your own parachain logic and send transactions, you need to use the aforementioned libraries." ContentLicense="CC BY-SA 4.0" />
  <row Id="27783" PostHistoryTypeId="5" PostId="7280" RevisionGUID="e5a57e5c-0061-4684-9e21-89ce261dd54a" CreationDate="2023-02-20T04:31:49.090" UserId="3732" Comment="edited body" Text="Subxt is an RPC library officially managed by Parity for submitting extrinsics, while substrate-api-client is a program that received a grant from Parity but is not officially managed by them. &#xD;&#xA;&#xD;&#xA;These two libraries have slightly different functions to support. Additionally, Polkadot-js is a website that utilizes APIs like subxt and substrate-api-client to perform blockchain exporter functions, but its version is outdated and lacks customization options. &#xD;&#xA;&#xD;&#xA;Therefore, refer subxt or substrate-api-client for backend logics to query and send request, and polkadot.js for front logics!" ContentLicense="CC BY-SA 4.0" />
  <row Id="27784" PostHistoryTypeId="2" PostId="7281" RevisionGUID="d05ac956-e067-45f2-84ba-23c00e7476d5" CreationDate="2023-02-20T07:31:44.043" UserId="3414" Text="I was working on migrating data from one blockchain to other blockchain. I have migrated much of my data. Now i was trying to migrate the blocks of the blockchain.I want to know that where is the storage for blocks produced in blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="27786" PostHistoryTypeId="1" PostId="7281" RevisionGUID="d05ac956-e067-45f2-84ba-23c00e7476d5" CreationDate="2023-02-20T07:31:44.043" UserId="3414" Text="Is there any storage for the blocks in blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27787" PostHistoryTypeId="3" PostId="7281" RevisionGUID="d05ac956-e067-45f2-84ba-23c00e7476d5" CreationDate="2023-02-20T07:31:44.043" UserId="3414" Text="|polkadot-js|polkadot|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27789" PostHistoryTypeId="2" PostId="7282" RevisionGUID="908045e3-9322-4fcb-a6e8-1137a2e9463a" CreationDate="2023-02-20T07:48:08.567" UserId="3016" Text="I'm trying to run the following repo, but it's not working.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/solo-para-bridge-poc&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;$ make build-all&#xD;&#xA;&#xD;&#xA;cargo b -r -p rialto-parachain-collator &amp;&amp; \&#xD;&#xA;cargo b -r -p millau-bridge-node &amp;&amp; \&#xD;&#xA;cargo b -r -p rialto-bridge-node &amp;&amp; \&#xD;&#xA;cargo build -r -p substrate-relay&#xD;&#xA;    Updating git repository `https://github.com/paritytech//polkadot`&#xD;&#xA;error: failed to load source for dependency `kusama-runtime`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech//polkadot?branch=locked-for-gav                                                               -xcm-v3-and-bridges#9fc6b88c&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  object not found - no match for id (9fc6b88ccc7abc1418ff5260e8cc492e647306a0);                                                                class=Odb (9); code=NotFound (-3)&#xD;&#xA;make: *** [Makefile:3: build-all] Error 101&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can someone help me figure out the issue?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27791" PostHistoryTypeId="1" PostId="7282" RevisionGUID="908045e3-9322-4fcb-a6e8-1137a2e9463a" CreationDate="2023-02-20T07:48:08.567" UserId="3016" Text="Solo-Parachain-Bridge POC is not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="27792" PostHistoryTypeId="3" PostId="7282" RevisionGUID="908045e3-9322-4fcb-a6e8-1137a2e9463a" CreationDate="2023-02-20T07:48:08.567" UserId="3016" Text="|bridge|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27793" PostHistoryTypeId="2" PostId="7283" RevisionGUID="47bfc018-3631-4b9e-ae02-24aa781b9656" CreationDate="2023-02-20T07:56:05.393" UserId="3852" Text="I know there is a plenty of XCM transfer cases:&#xD;&#xA; - RelayChain to ParaChain&#xD;&#xA; - ParaChain to RelayChain&#xD;&#xA; - ParaChain to ParaChain (Non-native token) with xTokens pallet&#xD;&#xA; - ParaChain to ParaChain (Non-native token) without xTokens pallet&#xD;&#xA; - ParaChain to ParaChain (Native token) with xTokens pallet&#xD;&#xA; - ParaChain to ParaChain (Native token) without xTokens pallet&#xD;&#xA;&#xD;&#xA;I have searched for this information in Polkadot Docs, Substrate Docs, Kusama Docs and other Parachain Docs but I found nothing about calculating XCM fees.&#xD;&#xA;&#xD;&#xA;I only found [documentation][1] about calculating XCM fees for Moonbeam chain, but it is actual only for Moonbeam chain, unfortunately. &#xD;&#xA;&#xD;&#xA;How can I calculate XCM transfer fee for all cases and actual for all chains? Where can I read about it more?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.moonbeam.network/builders/interoperability/xcm/fees/" ContentLicense="CC BY-SA 4.0" />
  <row Id="27795" PostHistoryTypeId="1" PostId="7283" RevisionGUID="47bfc018-3631-4b9e-ae02-24aa781b9656" CreationDate="2023-02-20T07:56:05.393" UserId="3852" Text="How to calculate fee for XCM transfer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27796" PostHistoryTypeId="3" PostId="7283" RevisionGUID="47bfc018-3631-4b9e-ae02-24aa781b9656" CreationDate="2023-02-20T07:56:05.393" UserId="3852" Text="|xcm|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27797" PostHistoryTypeId="2" PostId="7284" RevisionGUID="fd45d073-ed30-4711-9a97-8cd3d8230ca6" CreationDate="2023-02-20T07:56:58.263" UserId="371" Text="You can use **[polkadot-js/api](https://github.com/polkadot-js/api)** library for both frontend and backend work (*if both frontend and backend are based on Javascript*). &lt;br/&gt;&#xD;&#xA;You can use this api to sign, verify messages and deploy/call ink contracts.&#xD;&#xA;&lt;br/&gt;&#xD;&#xA;Take a look at the documentation on **[here](https://polkadot.js.org/docs/api)**.&#xD;&#xA;&#xD;&#xA;If you are using any other languages, please find the tool/library that suits you from **[this link](https://wiki.polkadot.network/docs/build-tools-index#rpc-and-api-tools)**." ContentLicense="CC BY-SA 4.0" />
  <row Id="27799" PostHistoryTypeId="2" PostId="7285" RevisionGUID="bf56a78d-35fe-4871-8673-e82fc61611af" CreationDate="2023-02-20T08:18:51.587" UserId="3319" Text="i found the problem, and it was when implementing the validate_unsigned trait, i needed to make each extrinsic unique in the tags, and i did it by encoding the whole call, like this:&#xD;&#xA;&#xD;&#xA;		ValidTransaction::with_tag_prefix(&quot;MyPallet&quot;)&#xD;&#xA;			.and_provides(call.encode())&#xD;&#xA;			.build()&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27801" PostHistoryTypeId="2" PostId="7286" RevisionGUID="7b578de0-dc7c-417a-96b1-a3426e96b99f" CreationDate="2023-02-20T08:42:15.150" UserId="73" Text="Each node is storing the block header, transactions and justfication in its own local database. &#xD;&#xA;&#xD;&#xA;If you are migrating from one chain to another, it doesn't make that much sense to migrate the blocks. Your users will not need these blocks to sync the new chain as the new chain has their own blocks from genesis." ContentLicense="CC BY-SA 4.0" />
  <row Id="27803" PostHistoryTypeId="2" PostId="7287" RevisionGUID="2cab5b0b-19e9-4b0d-a575-a2dd8073c990" CreationDate="2023-02-20T08:48:46.320" UserId="73" Text="Short answer, I would not recommend implementing your own `ImportQueue` right now. The interface currently is really specific to the current implementation. &#xD;&#xA;&#xD;&#xA;&gt; My question is, what happens if I don't use BasicQueue but my consensus engine provides its own implementation of ImportQueue?&#xD;&#xA;&#xD;&#xA;It should work, if your implementation is working. &#xD;&#xA;&#xD;&#xA;&gt; Can I then build the verification and importing functionality in one go through an impl of ImportQueue? If yes, how, i.e. which functions of the trait are we supposed to build the verification functionality in?&#xD;&#xA;&#xD;&#xA;Yes you can do this, you should do the verification before importing a new block. `ImportQueueService::import_blocks` is the function you are searching for.&#xD;&#xA;&#xD;&#xA;&gt; Bonus Question: Is there a real world implemenation of a consensus engine not using BasicQueue for ImportQueue?&#xD;&#xA;&#xD;&#xA;AFAIK, no." ContentLicense="CC BY-SA 4.0" />
  <row Id="27805" PostHistoryTypeId="2" PostId="7288" RevisionGUID="26b55f31-c005-4f9e-89f8-60b44db52e1b" CreationDate="2023-02-20T09:27:51.763" UserId="1867" Text="There is something coming to Substrate!&#xD;&#xA;&#xD;&#xA;We are currently adding the [Arkworks.rs](http://arkworks.rs/) elliptic curves to Substrate.&#xD;&#xA;&#xD;&#xA;Check out: https://github.com/paritytech/ark-substrate, as well as the current PR which integrates the library into Substrate: https://github.com/paritytech/substrate/pull/13031.&#xD;&#xA;&#xD;&#xA;Also,this repos which provides example implementations and benchmarks: https://github.com/achimcc/substrate-arkworks-examples." ContentLicense="CC BY-SA 4.0" />
  <row Id="27807" PostHistoryTypeId="2" PostId="7289" RevisionGUID="8a6bffb3-6ad0-45a1-b514-0834bfd2b950" CreationDate="2023-02-20T09:29:19.067" UserId="1959" Text="In fact, it is almost impossible to have an algorithm to calculate the XCM fees for all chains. This is because the calculation of XCM fees is related to the following points, and each chain may have different configurations. &#xD;&#xA;&#xD;&#xA;1. [Weigher](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/pallet-xcm/src/lib.rs#L107): Means of measuring the weight consumed by an XCM message locally.&#xD;&#xA;&#xD;&#xA;It seems that most chains currently use [`FixedWeightBounds`](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L31), but the `UnitWeightCost` used by each chain may be different.&#xD;&#xA;&#xD;&#xA;2. [Trader](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-executor/src/config.rs#L54): The means of purchasing weight credit for XCM execution.&#xD;&#xA;&#xD;&#xA;Even on the same chain, different tokens may have different `Trader` because their values are different. For example, Acala does it [this way](https://github.com/AcalaNetwork/Acala/blob/release-acala-2.13.0/runtime/karura/src/xcm_config.rs#L177).&#xD;&#xA;&#xD;&#xA;However, I would like to write down the XCM fee calculation process at an abstract level here, so that we can do the calculation for different chains. Please wait for me to update this answer." ContentLicense="CC BY-SA 4.0" />
  <row Id="27809" PostHistoryTypeId="2" PostId="7290" RevisionGUID="a33b1674-0a9f-4523-8d8d-01df7f2c2752" CreationDate="2023-02-20T09:32:14.483" UserId="473" Text="i went the same approach, small VMs with docker or podman installed then spin up the container using the docker-compose. &#xD;&#xA;&#xD;&#xA;Additionally i have the full node that is reverse_proxied with TLS &#xD;&#xA;&#xD;&#xA;Here is the i've been using this for our network. this is the contents of the docker-compose.yml. &#xD;&#xA;&#xD;&#xA;Hope that helps&#xD;&#xA;&#xD;&#xA;```yml&#xD;&#xA;version: &quot;3&quot;&#xD;&#xA;services:&#xD;&#xA;    collator1:&#xD;&#xA;      image: registry.gitlab.com/anagolay/anagolay/idiyanale:3861d9b3&#xD;&#xA;      volumes:&#xD;&#xA;        - ./data/collator1_data:/data&#xD;&#xA;        - ./specs/rococo:/genesis&#xD;&#xA;      networks:&#xD;&#xA;        - caddy&#xD;&#xA;        - idiyanale_rococo&#xD;&#xA;      labels:&#xD;&#xA;        caddy: &quot;rococo.rpc.idiyanale.anagolay.io&quot;&#xD;&#xA;        caddy.reverse_proxy: &quot;{{upstreams 9944}}&quot;&#xD;&#xA;      command: |&#xD;&#xA;        --base-path /data&#xD;&#xA;        --chain /genesis/idiyanale-parachain-raw-4222.json&#xD;&#xA;        --force-authoring&#xD;&#xA;        --name rococo-idiyanale-collator1&#xD;&#xA;        --collator&#xD;&#xA;        --prometheus-external&#xD;&#xA;        --no-telemetry&#xD;&#xA;        --enable-offchain-indexing true&#xD;&#xA;        --port 30333 &#xD;&#xA;        --rpc-port 9933 &#xD;&#xA;        --ws-port 9944 &#xD;&#xA;        --unsafe-ws-external &#xD;&#xA;        --unsafe-rpc-external &#xD;&#xA;        --rpc-cors all &#xD;&#xA;        --sync fast-unsafe&#xD;&#xA;        -- &#xD;&#xA;        --chain rococo&#xD;&#xA;        --sync fast-unsafe&#xD;&#xA;      cpus: 0.5&#xD;&#xA;networks:&#xD;&#xA;  idiyanale_rococo: {}&#xD;&#xA;  caddy:&#xD;&#xA;    external: true&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;if you get confused by `caddy` network it's the external network that is connected to the container that issues the automatic TLS and does the fwd proxy.&#xD;&#xA;&#xD;&#xA;Hope this helps&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27811" PostHistoryTypeId="2" PostId="7291" RevisionGUID="286e0918-3333-402d-92f3-bc39b7a436cd" CreationDate="2023-02-20T10:40:34.580" UserId="380" Text="For example, I have deployed an `ink!` contract via polkadot apps.&#xD;&#xA;&#xD;&#xA;Is it possible to obtain the private key of the contract account and sign an arbitrary message?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27813" PostHistoryTypeId="1" PostId="7291" RevisionGUID="286e0918-3333-402d-92f3-bc39b7a436cd" CreationDate="2023-02-20T10:40:34.580" UserId="380" Text="Is it possible to sign a message using the private key of a contract account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27814" PostHistoryTypeId="3" PostId="7291" RevisionGUID="286e0918-3333-402d-92f3-bc39b7a436cd" CreationDate="2023-02-20T10:40:34.580" UserId="380" Text="|contracts|key|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27815" PostHistoryTypeId="5" PostId="7289" RevisionGUID="337eff0e-f787-4ec9-ba54-bce6236a7828" CreationDate="2023-02-20T11:24:42.443" UserId="1959" Comment="added 912 characters in body" Text="In fact, it is almost impossible to have an algorithm to calculate the XCM fees for all chains. This is because the calculation of XCM fees is related to the following points, and **each chain may have different configurations**. &#xD;&#xA;&#xD;&#xA;1. [Weigher](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/pallet-xcm/src/lib.rs#L107): Means of measuring the weight consumed by an XCM message locally.&#xD;&#xA;&#xD;&#xA;It seems that most chains currently use [`FixedWeightBounds`](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L31), but the `WeightPerInstruction` used by each chain may be different.&#xD;&#xA;&#xD;&#xA;2. [Trader](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-executor/src/config.rs#L54): The means of purchasing weight credit for XCM execution.&#xD;&#xA;&#xD;&#xA;Even on the same chain, different tokens may have different `Trader` because their values are different, they need different `WeightToFee`. For example, Acala does it [this way](https://github.com/AcalaNetwork/Acala/blob/release-acala-2.13.0/runtime/karura/src/xcm_config.rs#L177).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;However, I would like to write down the XCM fee **calculation process** at an abstract level here, so that we can do the calculation for different chains.&#xD;&#xA;&#xD;&#xA;The calculation of XCM fees can be divided into two steps. The first step is to calculate the weight, and the second step is to calculate the fee with the weight.&#xD;&#xA;&#xD;&#xA;1. For the **weight**, most chains that use `FixedWeightBounds`&#xD;&#xA;   - [Weight = XCM instruction count * WeighPerInstruction + Transact weight](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L46) &#xD;&#xA;&#xD;&#xA;   (Note that instructions used in `SetErrorHandler` and `SetAppendix` also count towards the instruction count)&#xD;&#xA;2. Use `WeightToFee`to calculate **fee**. There are two commonly used methods.&#xD;&#xA;   - [ConstantMultiplier](https://github.com/paritytech/substrate/blob/polkadot-v0.9.37/primitives/weights/src/lib.rs#L224): Fee = Weight * FeePerWeight&#xD;&#xA;   - [FixedRate](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L156): Fee = FeePerSecond * (Weight / WeightPerSecond)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27816" PostHistoryTypeId="50" PostId="2129" RevisionGUID="3e417902-0174-431e-b8c3-8b3f50aa6484" CreationDate="2023-02-20T12:04:40.607" UserId="-1" />
  <row Id="27817" PostHistoryTypeId="2" PostId="7292" RevisionGUID="c53ad490-eddf-4b6f-8499-5ee5cf16e022" CreationDate="2023-02-20T12:25:14.547" UserId="167" Text="Other than Oliver's answer, I want to point out that you are likely having the wrong mental model here. &#xD;&#xA;&#xD;&#xA;Your benchmarking code receives `T`, including `T::HeadersToKeep` and all the other configurations as *input*. Your benchmarking code must behave and tested without needing to alter these values. &#xD;&#xA;&#xD;&#xA;For example, your mental model should be like this: You should write your benchmarking code such that if `HeadersToKeep` has an impact on the weight, in one runtime where it is configured to a higher value, it is captured. &#xD;&#xA;&#xD;&#xA;Nowhere in this scenario you should need to alter `HeadersToKeep` within a benchmark. Again, `T` is the input of your benchmark, and it a way for you to *know the final configuration of the runtime*, not to alter it. &#xD;&#xA;&#xD;&#xA;Lastly, as noted [here](https://github.com/paritytech/substrate/blob/afb74de23dfe2994e7ce38c0870efb9734e966f7/frame/support/src/lib.rs#L473), `set` is only available in `std`, meaning that while you could mis-use it in native execution of benchmarks, you cannot use it in WASM at all. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27820" PostHistoryTypeId="2" PostId="7293" RevisionGUID="290b6f2e-9787-43c2-a439-473ff4ee735f" CreationDate="2023-02-20T12:34:34.227" UserId="377" Text="How we can get the public key of the account generated from PALLET_ID?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub const PALLET_ID: PalletId = PalletId(*b&quot;Crowdloa&quot;);&#xD;&#xA;&#xD;&#xA;pub fn account_id() -&gt; T::AccountId {&#xD;&#xA;			PALLET_ID.into_account_truncating()&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To add the funds to the account we need public key. how can we get that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27822" PostHistoryTypeId="1" PostId="7293" RevisionGUID="290b6f2e-9787-43c2-a439-473ff4ee735f" CreationDate="2023-02-20T12:34:34.227" UserId="377" Text="How we can get the public key from pallet id?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27823" PostHistoryTypeId="3" PostId="7293" RevisionGUID="290b6f2e-9787-43c2-a439-473ff4ee735f" CreationDate="2023-02-20T12:34:34.227" UserId="377" Text="|pallet|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27824" PostHistoryTypeId="5" PostId="7293" RevisionGUID="f1b3cbba-dcfa-4aea-ba17-d9d2b174c17b" CreationDate="2023-02-20T12:36:48.887" UserId="251" Comment="deleted 3 characters in body" Text="How we can get the public key of the account generated from PALLET_ID?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub const PALLET_ID: PalletId = PalletId(*b&quot;Crowdloa&quot;);&#xD;&#xA;&#xD;&#xA;pub fn account_id() -&gt; T::AccountId {&#xD;&#xA;	PALLET_ID.into_account_truncating()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To add the funds to the account, we need public key. How can we get that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27825" PostHistoryTypeId="5" PostId="7291" RevisionGUID="b5a6c064-8f71-4214-b751-c88c52964307" CreationDate="2023-02-20T12:37:13.700" UserId="380" Comment="added 402 characters in body" Text="For example, I have deployed an `ink!` contract via polkadot apps.&#xD;&#xA;&#xD;&#xA;Is it possible to obtain the private key of the contract account and sign an arbitrary message?&#xD;&#xA;&#xD;&#xA;--EDIT--&#xD;&#xA;&#xD;&#xA;Alternatively, in `contract B`, could I prove that `contract A` was deployed by the transaction calling account in `contract B`? For example:&#xD;&#xA;&#xD;&#xA;## Contract A&#xD;&#xA;&#xD;&#xA;Already on-chain&#xD;&#xA;&#xD;&#xA;## Contract B&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn register(&#xD;&#xA;    &amp;mut self,&#xD;&#xA;    dapp_account: AccountId,&#xD;&#xA;) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;    let caller = self.env().caller();&#xD;&#xA;&#xD;&#xA;    // prove that the caller deployed `dapp_account`&#xD;&#xA;    ???&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27826" PostHistoryTypeId="33" PostId="7020" RevisionGUID="c20bd07a-d25d-4218-92c7-4cac95fd0014" CreationDate="2023-02-20T13:17:32.880" UserId="157" Comment="18" />
  <row Id="27827" PostHistoryTypeId="2" PostId="7294" RevisionGUID="f302a53e-d403-488d-9ed6-dbe63db44684" CreationDate="2023-02-20T14:07:10.203" UserId="2844" Text="Testing contract on polkadotjs, we can easily see user defined or error given by runtime like this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;But working with same contract in frontend I am not able to handle error response in frontend. Anybody please share some ideas and any link.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/So0s2.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27829" PostHistoryTypeId="1" PostId="7294" RevisionGUID="f302a53e-d403-488d-9ed6-dbe63db44684" CreationDate="2023-02-20T14:07:10.203" UserId="2844" Text="How to handle TX error on dapp frontend?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27830" PostHistoryTypeId="3" PostId="7294" RevisionGUID="f302a53e-d403-488d-9ed6-dbe63db44684" CreationDate="2023-02-20T14:07:10.203" UserId="2844" Text="|polkadot-js|ink|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27831" PostHistoryTypeId="2" PostId="7295" RevisionGUID="cf46dec4-a744-4eb2-ba83-c03e5d89d33d" CreationDate="2023-02-20T14:45:59.157" UserId="3744" Text="It's imposible obtain de private key" ContentLicense="CC BY-SA 4.0" />
  <row Id="27833" PostHistoryTypeId="52" PostId="7281" RevisionGUID="48357dcf-c607-4838-9a28-b9e4be42ab33" CreationDate="2023-02-20T15:32:12.303" />
  <row Id="27834" PostHistoryTypeId="52" PostId="7283" RevisionGUID="c73a6999-d7be-46f2-9fba-56d227d8cae7" CreationDate="2023-02-20T15:56:14.243" />
  <row Id="27835" PostHistoryTypeId="2" PostId="7296" RevisionGUID="20d244d7-6bae-4392-86f1-ad606a32b094" CreationDate="2023-02-20T17:58:52.187" UserId="377" Text="I am working on the moonbeams crowdloan pallet. In associate_native_identity extrinsic we need proof: MultiSignature in parameter.&#xD;&#xA;&#xD;&#xA;how can we get that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27837" PostHistoryTypeId="1" PostId="7296" RevisionGUID="20d244d7-6bae-4392-86f1-ad606a32b094" CreationDate="2023-02-20T17:58:52.187" UserId="377" Text="How can we get prepare the proof for crowdloan pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27838" PostHistoryTypeId="3" PostId="7296" RevisionGUID="20d244d7-6bae-4392-86f1-ad606a32b094" CreationDate="2023-02-20T17:58:52.187" UserId="377" Text="|crowdloan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27839" PostHistoryTypeId="6" PostId="7296" RevisionGUID="90ec4905-044b-4616-8d1f-4e59f5baab90" CreationDate="2023-02-20T19:22:20.493" UserId="29" Comment="edited tags" Text="|crowdloan|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27842" PostHistoryTypeId="2" PostId="7298" RevisionGUID="e9b230bb-30ab-4764-9097-0f137c8f0710" CreationDate="2023-02-20T21:39:53.413" UserId="3114" Text="I hope the following sites will help you.&#xD;&#xA;&#xD;&#xA;https://stackoverflow.com/questions/74051628/how-to-get-unique-smart-contract-errors-in-a-frontend-app-using-polkadot-js/75514368#75514368&#xD;&#xA;&#xD;&#xA;https://medium.com/@realtakahashi-work/collection-of-samples-for-using-polkadot-js-with-astar-network-7c1b40fefe50" ContentLicense="CC BY-SA 4.0" />
  <row Id="27846" PostHistoryTypeId="10" PostId="7293" RevisionGUID="a2bb4b85-4ed3-42c3-94d7-385b4cc9d540" CreationDate="2023-02-21T01:06:59.647" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[4307],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="27847" PostHistoryTypeId="2" PostId="7299" RevisionGUID="0cbf7715-d0ed-4b5b-b713-0e8fff03e6f3" CreationDate="2023-02-21T02:30:05.373" UserId="3857" Text="I need to get the owner of an asset to filter extrinsic calls.&#xD;&#xA;I tight couple the assets pallet to my pallet and Im trying to access the Asset storage but getting the following error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UBFei.png&#xD;&#xA;&#xD;&#xA;How can I solve this error or otherwise how can I get the owner of an specific asset.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27849" PostHistoryTypeId="1" PostId="7299" RevisionGUID="0cbf7715-d0ed-4b5b-b713-0e8fff03e6f3" CreationDate="2023-02-21T02:30:05.373" UserId="3857" Text="Access storage from another pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="27850" PostHistoryTypeId="3" PostId="7299" RevisionGUID="0cbf7715-d0ed-4b5b-b713-0e8fff03e6f3" CreationDate="2023-02-21T02:30:05.373" UserId="3857" Text="|substrate-node-template|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27851" PostHistoryTypeId="2" PostId="7300" RevisionGUID="9aa03965-f08e-4284-b1d4-10fa6499eee9" CreationDate="2023-02-21T03:54:38.720" UserId="251" Text="Assets pallet is a little bit special. They marked all storage as private.&#xD;&#xA;&#xD;&#xA;And they provided a list of functions to access the storage.&#xD;&#xA;&#xD;&#xA;Check if these functions could help you: https://github.com/paritytech/substrate/blob/5b6519a7ff4a2d3cc424d78bc4830688f3b184c0/frame/assets/src/impl_fungibles.rs#L273-L291" ContentLicense="CC BY-SA 4.0" />
  <row Id="27853" PostHistoryTypeId="50" PostId="6245" RevisionGUID="70835c5a-284b-4633-a1bf-a26939462cbc" CreationDate="2023-02-21T04:03:40.390" UserId="-1" />
  <row Id="27854" PostHistoryTypeId="50" PostId="6829" RevisionGUID="5a214d0b-86b7-4795-bffa-05fff7b92dd6" CreationDate="2023-02-21T05:07:15.963" UserId="-1" />
  <row Id="27855" PostHistoryTypeId="2" PostId="7301" RevisionGUID="3a4dd434-51de-4bb9-a949-189bb2527142" CreationDate="2023-02-21T07:12:39.350" UserId="3470" Text="gm, tried setting up my boilerplate https://inkathon.xyz with contracts on rococo as suggested in the docs: https://use.ink/testnet.&#xD;&#xA;&#xD;&#xA;unfortunately, neither i'm able to receive funds from the faucet (despite getting a success answer from the bot). nor i receive funds sent via XCM from the relay chain. &#xD;&#xA;&#xD;&#xA;then i just saw the last block was 17hr ago.... &#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-contracts-rpc.polkadot.io#/explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="27857" PostHistoryTypeId="1" PostId="7301" RevisionGUID="3a4dd434-51de-4bb9-a949-189bb2527142" CreationDate="2023-02-21T07:12:39.350" UserId="3470" Text="&quot;Contracts on Rococo&quot; down?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27858" PostHistoryTypeId="3" PostId="7301" RevisionGUID="3a4dd434-51de-4bb9-a949-189bb2527142" CreationDate="2023-02-21T07:12:39.350" UserId="3470" Text="|parachain|smart-contract|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27859" PostHistoryTypeId="5" PostId="7289" RevisionGUID="a59f15f6-57c0-487c-abbd-7bf444974bc7" CreationDate="2023-02-21T08:27:48.927" UserId="1959" Comment="Reply comment" Text="In fact, it is almost impossible to have an algorithm to calculate the XCM fees for all chains. This is because the calculation of XCM fees is related to the following points, and **each chain may have different configurations**. &#xD;&#xA;&#xD;&#xA;1. [Weigher](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/pallet-xcm/src/lib.rs#L107): Means of measuring the weight consumed by an XCM message locally.&#xD;&#xA;&#xD;&#xA;It seems that most chains currently use [`FixedWeightBounds`](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L31), but the `WeightPerInstruction` used by each chain may be different.&#xD;&#xA;&#xD;&#xA;2. [Trader](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-executor/src/config.rs#L54): The means of purchasing weight credit for XCM execution.&#xD;&#xA;&#xD;&#xA;Even on the same chain, different tokens may have different `Trader` because their values are different, they need different `WeightToFee`. For example, Acala does it [this way](https://github.com/AcalaNetwork/Acala/blob/release-acala-2.13.0/runtime/karura/src/xcm_config.rs#L177).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;However, I would like to write down the XCM fee **calculation process** at an abstract level here, so that we can do the calculation for different chains.&#xD;&#xA;&#xD;&#xA;The calculation of XCM fees can be divided into two steps. The first step is to calculate the weight, and the second step is to calculate the fee with the weight.&#xD;&#xA;&#xD;&#xA;1. For the **weight**, most chains that use `FixedWeightBounds`&#xD;&#xA;   - [Weight = XCM instruction count * WeighPerInstruction + Transact weight](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L46) &#xD;&#xA;&#xD;&#xA;   (Note that instructions used in `SetErrorHandler` and `SetAppendix` also count towards the instruction count)&#xD;&#xA;2. Use `WeightToFee`to calculate **fee**. There are two commonly used methods.&#xD;&#xA;   - [ConstantMultiplier](https://github.com/paritytech/substrate/blob/polkadot-v0.9.37/primitives/weights/src/lib.rs#L224): Fee = Weight * FeePerWeight&#xD;&#xA;   - [FixedRate](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L156): Fee = FeePerSecond * (Weight / WeightPerSecond)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For @VitalyPeryatin's comment:&#xD;&#xA;&gt; Where can I found what chains use FixedWeightBounds for the weight?&#xD;&#xA;&#xD;&#xA;You could check the `impl xcm_executor::Config` code in the repo of the chain. For example, Darwinia config [`type Weigher = FixedWeightBounds`](https://github.com/darwinia-network/darwinia-parachain/blob/v5.3.6/runtime/darwinia-parachain/src/pallets/polkadot_xcm.rs#L166).&#xD;&#xA;&#xD;&#xA;&gt; What other types exists except FixedWeightBounds?&#xD;&#xA;&#xD;&#xA;[`WeightInfoBounds`](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L69), and [Westend used it here](https://github.com/paritytech/polkadot/blob/release-v0.9.37/runtime/westend/src/xcm_config.rs#L112). Note any struct which impl trait [WeightBounds](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-executor/src/traits/weight.rs#L22) could be used here.&#xD;&#xA;&#xD;&#xA;&gt; Where can I found Transact weight?&#xD;&#xA;&#xD;&#xA;`Transact` is an instruction in XCM, if not used, the weight is 0, if used, it can be obtained from its parameters [`require_weight_at_most`](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/src/v2/mod.rs#L342). (*Just a reminder: This weight is not the actual weight required to execute the `call`, but an upper limit weight specified for `call` execution when sending XCM.*)" ContentLicense="CC BY-SA 4.0" />
  <row Id="27861" PostHistoryTypeId="2" PostId="7302" RevisionGUID="e877894a-85ae-46be-819e-c1d37b0dc561" CreationDate="2023-02-21T09:13:24.383" UserId="1732" Text="On February 20, 2023 around 22:08 UTC, Shiden block production has been hurt and almost stopped during 40 minutes.A lot of collators were missing blocks for no apparent reason.&#xD;&#xA; &#xD;&#xA;[![Shiden block rate][1]][1]Examples of blocks that have been missed by several collators:&#xD;&#xA;- [https://shiden.subscan.io/block/3428714](https://shiden.subscan.io/block/3428714)&#xD;&#xA;- [https://shiden.subscan.io/block/3428720](https://shiden.subscan.io/block/3428720)&#xD;&#xA;&#xD;&#xA;Location and hardware specs of the collators are not the source of the error, we checked the logs from different collators with correct specs / location.&#xD;&#xA;&#xD;&#xA;Generally on the relay side, a lot of these messages are issued.&#xD;&#xA;&#xD;&#xA;    [Relaychain] Missing block weight for new head. Skipping chain. hash=0x942d17da9ac8ce3634542da34757d4a66cfed6d27e79aed7d0857828f433caf0&#xD;&#xA;&#xD;&#xA;The parachain was build with a previous version of relay, we have now upgraded to latest and monitoring for the next time it may happen.&#xD;&#xA;&#xD;&#xA;## Timeline of errors ##&#xD;&#xA;&#xD;&#xA;**22:09 UTC** - On 1st round of blocks missed by our collators 1 and 2&#xD;&#xA;&#xD;&#xA;Collator 1&#xD;&#xA;[![logs][2]][2]&#xD;&#xA;&#xD;&#xA;Noticeable messages&#xD;&#xA;&#xD;&#xA;    2023-02-20 22:09:28 [Parachain] Failed to create inherent data providers. error=&quot;Failed to create parachain inherent&quot;&#xD;&#xA;    2023-02-20 22:09:28 [Parachain] Cannot obtain the hrmp ingress channel. relay_parent=0x4c7d1661f220b49c3c7015810cc01ce2d336ee555c9191f74e58a234092768f1 error=BlockchainError(UnknownBlock(&quot;State already discarded for 0x4c7d1661f220b49c3c7015810cc01ce2d336ee555c9191f74e58a234092768f1&quot;))&#xD;&#xA;&#xD;&#xA;Collator 2 (next one in Aura selection) got no message and didn't even try to enter block production process, but at the exact time of if supposed to produce the block:&#xD;&#xA;&#xD;&#xA;    2023-02-20 22:09:36 [Relaychain] Missing block weight for new head. Skipping chain. hash=0x942d17da9ac8ce3634542da34757d4a66cfed6d27e79aed7d0857828f433caf0&#xD;&#xA;&#xD;&#xA;**22:20 UTC** - another round of blocks missed&#xD;&#xA;&#xD;&#xA;Collator 1&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Collator 2&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6zkcC.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/W5gfb.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/GZ6Jk.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/lx1kV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27863" PostHistoryTypeId="1" PostId="7302" RevisionGUID="e877894a-85ae-46be-819e-c1d37b0dc561" CreationDate="2023-02-21T09:13:24.383" UserId="1732" Text="Parachain missed blocks due to relay wrong announcement?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27864" PostHistoryTypeId="3" PostId="7302" RevisionGUID="e877894a-85ae-46be-819e-c1d37b0dc561" CreationDate="2023-02-21T09:13:24.383" UserId="1732" Text="|parachain|error|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27865" PostHistoryTypeId="5" PostId="7295" RevisionGUID="2d249000-755e-42cc-8a57-483a1566e11f" CreationDate="2023-02-21T10:07:54.637" UserId="380" Comment="added 28 characters in body" Text="It's impossible to obtain the private key of a contract account." ContentLicense="CC BY-SA 4.0" />
  <row Id="27866" PostHistoryTypeId="5" PostId="7291" RevisionGUID="dd5ce1dd-7001-48fe-a842-31ec65a1844d" CreationDate="2023-02-21T10:09:36.043" UserId="380" Comment="remove second question to maintain focus" Text="For example, I have deployed an `ink!` contract via polkadot apps.&#xD;&#xA;&#xD;&#xA;Is it possible to obtain the private key of the contract account and sign an arbitrary message?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27867" PostHistoryTypeId="2" PostId="7303" RevisionGUID="3f7588b4-c73c-4a18-a505-ee1641f08546" CreationDate="2023-02-21T10:28:05.940" UserId="380" Text="`Account A` deploys `Contract A`. `Account A` then calls `Contract B` function `register`, passing the address of `Contract A`. Is it possible to prove that `Account A` deployed `Contract A` from within the register function of `Contract B` without implementing some kind of proof of deployment function in `Contract A`?&#xD;&#xA;&#xD;&#xA;## Contract A&#xD;&#xA;&#xD;&#xA;Deployed by `Account A`. The contract contains no record of `Account A` in storage.&#xD;&#xA;&#xD;&#xA;## Contract B&#xD;&#xA;&#xD;&#xA;`Account A` then calls this function passing the `Contract A` address.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn register(&#xD;&#xA;    &amp;mut self,&#xD;&#xA;    dapp_account: AccountId,&#xD;&#xA;) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;    let caller = self.env().caller();&#xD;&#xA;&#xD;&#xA;    // check that the dapp_account is a contract&#xD;&#xA;    if !self.env().is_contract(&amp;dapp_account) {&#xD;&#xA;         return Err(Error::InvalidContract);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // prove that the caller deployed `dapp_account`&#xD;&#xA;    // ?? check the contracts.instantiateWithCode extrinsic plus a merkle trie proof of the block inclusion on-chain?&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm assuming this would require the contract instantiate extrinsic, a proof of the extrinsic being in a block, and a proof of the block being on-chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="27869" PostHistoryTypeId="1" PostId="7303" RevisionGUID="3f7588b4-c73c-4a18-a505-ee1641f08546" CreationDate="2023-02-21T10:28:05.940" UserId="380" Text="Is it possible to prove that an account deployed contract A from within contract B without the account being stored in contract A?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27870" PostHistoryTypeId="3" PostId="7303" RevisionGUID="3f7588b4-c73c-4a18-a505-ee1641f08546" CreationDate="2023-02-21T10:28:05.940" UserId="380" Text="|ink|contracts|proof-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27871" PostHistoryTypeId="2" PostId="7304" RevisionGUID="eb43dee6-3e57-4a6d-80f9-49660e8dc8c0" CreationDate="2023-02-21T10:30:56.580" UserId="582" Text="I want to decode and check if the given hex data for the transaction is valid and signed correctly.&#xD;&#xA;&#xD;&#xA;The flowing is how I currently construct the transaction and convert it to hexadecimal format.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;    let addProxy = api.tx.proxy.addProxy(PROXY, 'Any', 0);&#xD;&#xA;    let remark = api.tx.system.remark(&quot;Test&quot;);&#xD;&#xA;&#xD;&#xA;    let tx = api.tx.utility.batch([&#xD;&#xA;        addProxy,&#xD;&#xA;        remark,&#xD;&#xA;    ]);&#xD;&#xA;    let singedTx = await tx.signAsync(pair);&#xD;&#xA;    let signedTxHex = singedTx.toHex()&#xD;&#xA;    &#xD;&#xA;    console.log(&quot;Signed TX&quot;, signedTxHex);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27873" PostHistoryTypeId="1" PostId="7304" RevisionGUID="eb43dee6-3e57-4a6d-80f9-49660e8dc8c0" CreationDate="2023-02-21T10:30:56.580" UserId="582" Text="How to verify that signed transaction, is correctly signed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27874" PostHistoryTypeId="3" PostId="7304" RevisionGUID="eb43dee6-3e57-4a6d-80f9-49660e8dc8c0" CreationDate="2023-02-21T10:30:56.580" UserId="582" Text="|polkadot-js|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27875" PostHistoryTypeId="2" PostId="7305" RevisionGUID="51ff6ab4-bc08-4c63-bf51-f6af6ef45b9d" CreationDate="2023-02-21T10:36:04.563" UserId="126" Text="Likely, this issue won't be coming up again as all teams will be at polkadot v0.937 or greater by the time I wrote this answer, but still happy to share how we resolved the issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. Upgrade the parachain polkadot dependencies to v0.9.37 (or greater)&#xD;&#xA;2. Start a new parachain node with relaychain part set to `--execution=native-else-wasm` (on polkadot 0.9.37)&#xD;&#xA;3. New node is syncing to latest blocks&#xD;&#xA;4. Reset existing collator nodes one by one (all on 0.9.37) and they sync/produce blocks again" ContentLicense="CC BY-SA 4.0" />
  <row Id="27877" PostHistoryTypeId="2" PostId="7306" RevisionGUID="8940f75c-9c73-406c-acb3-e28644e7e6d2" CreationDate="2023-02-21T11:44:42.510" UserId="2762" Text="PolkadotJS is the library to interact with Substrate nodes in Javascript, if you are building your frontend app with JS is the one to go. If your code is in another language there are some alternatives like [Python Substrate Interface][1] or [Kotlin Substrate Client][2], but PolkadotJS is the most used and therefore the one I would recommend now.&#xD;&#xA;&#xD;&#xA;In your case that you have a server side it might makes more sense to perform all the queries and operations in the backend and if you have one in Rust the best alternatives are the ones you mentioned, subxt is a library to submit extrinsics to a substrate node via RPC and substrate-api-client connects to the substrate's RPC interface via WebSockets. &#xD;&#xA;There exist other alternatives for other languages too, take a look in this [list][3].&#xD;&#xA;&#xD;&#xA;Another tool that can be interesting for you is [Sidecar][4], a REST service to interact with Substrate nodes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkascan/py-substrate-interface&#xD;&#xA;  [2]: https://github.com/NodleCode/substrate-client-kotlin&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/awesome-substrate#client-libraries&#xD;&#xA;  [4]: https://github.com/paritytech/substrate-api-sidecar" ContentLicense="CC BY-SA 4.0" />
  <row Id="27879" PostHistoryTypeId="2" PostId="7307" RevisionGUID="01f39a3a-c1d7-44f6-8088-f498cbc9a984" CreationDate="2023-02-21T12:11:34.287" UserId="2762" Text="Do you need to do it in PolkadotJS?&#xD;&#xA;Otherwise you can use the tool Subkey:&#xD;&#xA;https://docs.substrate.io/reference/command-line-tools/subkey/&#xD;&#xA;with the command: &#xD;&#xA;&#xD;&#xA;    subkey verify &lt;your-signedTxHex&gt; &lt;pair.address&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27881" PostHistoryTypeId="2" PostId="7308" RevisionGUID="d3bdcd13-dba3-4f62-89d4-ce0aba86d227" CreationDate="2023-02-21T13:47:19.023" UserId="3667" Text="I am aware that this should break consensus, as one may easily start a node with different params -&gt; end up with a different wasm bytecode, and thus be on a different network. However, inspite of that, I would like to set a pallet configuration item, in this case a `Get&lt;u32&gt;`, such that the value instead of being hardcoded in the runtime file, is fed through, maybe a *host function*? If that's possible, how do I define such a *host function*? &#xD;&#xA;&#xD;&#xA;In code: &#xD;&#xA;&#xD;&#xA;Currently I have : &#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;    pub const MyNumber: u32 = 10;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;What I would like to have :&#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;    pub const MyNumber: u32 = host_my_number();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The rationale being, for test purposes, I find it inconvenient having to recompile the entire runtime file after changing a single configuration parameter. I can easily instead pass a different argument to my node, and have my runtime configured by that way instead.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27883" PostHistoryTypeId="1" PostId="7308" RevisionGUID="d3bdcd13-dba3-4f62-89d4-ce0aba86d227" CreationDate="2023-02-21T13:47:19.023" UserId="3667" Text="Is there a way to set a pallet configuration using a function that lives on the outer node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27884" PostHistoryTypeId="3" PostId="7308" RevisionGUID="d3bdcd13-dba3-4f62-89d4-ce0aba86d227" CreationDate="2023-02-21T13:47:19.023" UserId="3667" Text="|pallet|host-functions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27885" PostHistoryTypeId="2" PostId="7309" RevisionGUID="6f8cd33a-d199-4771-ad07-2e2eb02fcd44" CreationDate="2023-02-21T13:56:23.520" UserId="251" Text="Just define a struct yourself.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;enum MyNumber {}&#xD;&#xA;impl frame_support::traits::Get&lt;u32&gt; for MyNumber {&#xD;&#xA;  fn get() -&gt; u32 {&#xD;&#xA;    random()&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl Config for Runtime {&#xD;&#xA;  type Number = MyNumber;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27887" PostHistoryTypeId="2" PostId="7310" RevisionGUID="d4cc7f88-6904-4912-80d3-19c9df0e2786" CreationDate="2023-02-21T13:59:00.980" UserId="2025" Text="As Jaco explained in [this GitHub issue](https://github.com/polkadot-js/api/issues/3106#issuecomment-766916887), you can't just verify the signature of a transaction with polkadot.js.&#xD;&#xA;&#xD;&#xA;Alex's answer is a good alternative by using  the tool Subkey.&#xD;&#xA;&#xD;&#xA;However, if instead of transactions, you want to verify just messages, you can do that with the [util-crypto package](https://github.com/polkadot-js/common/tree/master/packages/util-crypto) of polkadot.js. Here you have [the documentation for it](https://polkadot.js.org/docs/util-crypto/examples/verify-signature)." ContentLicense="CC BY-SA 4.0" />
  <row Id="27889" PostHistoryTypeId="2" PostId="7311" RevisionGUID="7f90f8d7-728b-4126-8c9c-ee45ddcb6e47" CreationDate="2023-02-21T14:02:05.433" UserId="165" Text="Contracts is up and running again." ContentLicense="CC BY-SA 4.0" />
  <row Id="27891" PostHistoryTypeId="2" PostId="7312" RevisionGUID="9e086db1-df33-4e64-9d69-c0581e611903" CreationDate="2023-02-21T14:03:39.560" UserId="377" Text="We can use transform the address to relay address by format transform&#xD;&#xA;&#xD;&#xA;Link: https://polkadot.subscan.io/tools/format_transform&#xD;&#xA;&#xD;&#xA;this link will help you to transform the address from any address to any address type in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="27893" PostHistoryTypeId="5" PostId="7309" RevisionGUID="1f411704-6632-411f-97b1-fecd3a5d58ce" CreationDate="2023-02-21T14:05:34.423" UserId="251" Comment="added 8 characters in body" Text="Just define a struct yourself.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;enum MyNumber {}&#xD;&#xA;impl frame_support::traits::Get&lt;u32&gt; for MyNumber {&#xD;&#xA;  fn get() -&gt; u32 {&#xD;&#xA;    host_my_number()&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl Config for Runtime {&#xD;&#xA;  type Number = MyNumber;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27894" PostHistoryTypeId="2" PostId="7313" RevisionGUID="c33ddadc-00bf-42b9-974e-22b6af2334d3" CreationDate="2023-02-21T15:41:40.577" UserId="2478" Text="We are using @polkadot/typegen for TypeScript user generated code for Chain modules [script][1]. We are getting errors as code generated includes many new types taken from chain but they are not imported.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AstarNetwork/astar.js/blob/main/packages/types/scripts/generate.ts&#xD;&#xA;  [2]: https://i.stack.imgur.com/QnrIz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27896" PostHistoryTypeId="1" PostId="7313" RevisionGUID="c33ddadc-00bf-42b9-974e-22b6af2334d3" CreationDate="2023-02-21T15:41:40.577" UserId="2478" Text="@polkadot/typegen is generating erroneous code" ContentLicense="CC BY-SA 4.0" />
  <row Id="27897" PostHistoryTypeId="3" PostId="7313" RevisionGUID="c33ddadc-00bf-42b9-974e-22b6af2334d3" CreationDate="2023-02-21T15:41:40.577" UserId="2478" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27900" PostHistoryTypeId="2" PostId="7315" RevisionGUID="f3d452e6-cb2e-43df-afe8-b072be6448a7" CreationDate="2023-02-21T16:16:31.477" UserId="2372" Text="I was making a new event in the function nominate of Staking pallet which is going to show when the nominator is going to be added. But i facing one issue &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Self::do_add_nominator(stash, nominations);&#xD;&#xA;&#xD;&#xA;Self::deposit_event(Event::&lt;T&gt;::NominatorSet { stash: ledger.stash, nominations });&#xD;&#xA;&#xD;&#xA;and in  Event &#xD;&#xA;&#xD;&#xA;NominatorSet{stash: T::AccountId, nominations: Nominations&lt;T&gt;},&#xD;&#xA;&#xD;&#xA;and it is this error&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/o9T1j.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27902" PostHistoryTypeId="1" PostId="7315" RevisionGUID="f3d452e6-cb2e-43df-afe8-b072be6448a7" CreationDate="2023-02-21T16:16:31.477" UserId="2372" Text="the trait `std::clone::Clone` is not implemented for `Nominations&lt;T&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="27903" PostHistoryTypeId="3" PostId="7315" RevisionGUID="f3d452e6-cb2e-43df-afe8-b072be6448a7" CreationDate="2023-02-21T16:16:31.477" UserId="2372" Text="|rust|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27904" PostHistoryTypeId="6" PostId="7315" RevisionGUID="f6628a72-31e1-4214-bcab-03f24cf7d993" CreationDate="2023-02-21T16:23:15.150" UserId="2372" Comment="edited tags" Text="|rust|events|substrateinterface|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27905" PostHistoryTypeId="6" PostId="7315" RevisionGUID="6470a8fe-dd6b-4e22-9dd3-2e6d7cbd093f" CreationDate="2023-02-21T16:28:35.590" UserId="2372" Comment="edited tags" Text="|substrate-node-template|rust|events|substrateinterface|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27906" PostHistoryTypeId="5" PostId="7315" RevisionGUID="2885ca8a-974d-42ea-80d9-bb9c496b1e0c" CreationDate="2023-02-21T16:37:52.797" UserId="2372" Comment="added 1956 characters in body" Text="I was making a new event in the function nominate of Staking pallet which is going to show when the nominator is going to be added. But i facing one issue &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[pallet::call_index(5)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::nominate(targets.len() as u32))]&#xD;&#xA;		pub fn nominate(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			targets: Vec&lt;AccountIdLookupOf&lt;T&gt;&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let controller = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let ledger = Self::ledger(&amp;controller).ok_or(Error::&lt;T&gt;::NotController)?;&#xD;&#xA;			ensure!(ledger.active &gt;= MinNominatorBond::&lt;T&gt;::get(), Error::&lt;T&gt;::InsufficientBond);&#xD;&#xA;			let stash = &amp;ledger.stash;&#xD;&#xA;&#xD;&#xA;			// Only check limits if they are not already a nominator.&#xD;&#xA;			if !Nominators::&lt;T&gt;::contains_key(stash) {&#xD;&#xA;				// If this error is reached, we need to adjust the `MinNominatorBond` and start&#xD;&#xA;				// calling `chill_other`. Until then, we explicitly block new nominators to protect&#xD;&#xA;				// the runtime.&#xD;&#xA;				if let Some(max_nominators) = MaxNominatorsCount::&lt;T&gt;::get() {&#xD;&#xA;					ensure!(&#xD;&#xA;						Nominators::&lt;T&gt;::count() &lt; max_nominators,&#xD;&#xA;						Error::&lt;T&gt;::TooManyNominators&#xD;&#xA;					);&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			ensure!(!targets.is_empty(), Error::&lt;T&gt;::EmptyTargets);&#xD;&#xA;			ensure!(targets.len() &lt;= T::MaxNominations::get() as usize, Error::&lt;T&gt;::TooManyTargets);&#xD;&#xA;&#xD;&#xA;			let old = Nominators::&lt;T&gt;::get(stash).map_or_else(Vec::new, |x| x.targets.into_inner());&#xD;&#xA;&#xD;&#xA;			let targets: BoundedVec&lt;_, _&gt; = targets&#xD;&#xA;				.into_iter()&#xD;&#xA;				.map(|t| T::Lookup::lookup(t).map_err(DispatchError::from))&#xD;&#xA;				.map(|n| {&#xD;&#xA;					n.and_then(|n| {&#xD;&#xA;						if old.contains(&amp;n) || !Validators::&lt;T&gt;::get(&amp;n).blocked {&#xD;&#xA;							Ok(n)&#xD;&#xA;						} else {&#xD;&#xA;							Err(Error::&lt;T&gt;::BadTarget.into())&#xD;&#xA;						}&#xD;&#xA;					})&#xD;&#xA;				})&#xD;&#xA;				.collect::&lt;Result&lt;Vec&lt;_&gt;, _&gt;&gt;()?&#xD;&#xA;				.try_into()&#xD;&#xA;				.map_err(|_| Error::&lt;T&gt;::TooManyNominators)?;&#xD;&#xA;&#xD;&#xA;			let nominations = Nominations {&#xD;&#xA;				targets,&#xD;&#xA;				// Initial nominations are considered submitted at era 0. See `Nominations` doc.&#xD;&#xA;				submitted_in: Self::current_era().unwrap_or(0),&#xD;&#xA;				suppressed: false,&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			//let put = &amp;nominations.put;&#xD;&#xA;&#xD;&#xA;			Self::do_remove_validator(stash);&#xD;&#xA;			Self::do_add_nominator(stash, nominations);&#xD;&#xA;			Self::deposit_event(Event::&lt;T&gt;::NominatorSet { stash: ledger.stash, nominations });&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;and in  Event &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(crate) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;      NominatorSet{stash: T::AccountId, nominations: Nominations&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and it is this error&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/o9T1j.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27907" PostHistoryTypeId="2" PostId="7316" RevisionGUID="73e54649-d844-47ce-b51c-d39f53632c12" CreationDate="2023-02-21T17:49:12.863" UserId="377" Text="You can use polkadot js signing for that [sample link][1]&#xD;&#xA;&#xD;&#xA;In that for data you can read below&#xD;&#xA;&#xD;&#xA;The format of data is: b&quot;&lt;Bytes&gt;&quot; &quot;SignatureNetworkIdentifier&quot; + &quot;new_account&quot; + b&quot;&lt;/Bytes&gt;&quot;&#xD;&#xA;https://github.com/PureStake/crowdloan-rewards/blob/main/src/lib.rs#L220&#xD;&#xA;&#xD;&#xA;We need to convert that fields into hex and join and the out put will be the data which we can sign and and that signature proof we can use it as proof.&#xD;&#xA;to convert the data into hex you can use this web: https://codebeautify.org/string-hex-converter&#xD;&#xA;```&#xD;&#xA;&lt;Bytes&gt;: 3c42797465733e&#xD;&#xA;sign- (SignatureNetworkIdentifier): 7369676e2d&#xD;&#xA;account hex: 88fd77d706e168d78713a6a927c1ddfae367b081fb2829b119bbcc6db9af401d&#xD;&#xA;&lt;/Bytes&gt;: 3c2f42797465733e&#xD;&#xA;```&#xD;&#xA;data after merge it: 0x3c42797465733e7369676e2d88fd77d706e168d78713a6a927c1ddfae367b081fb2829b119bbcc6db9af401d3c2f42797465733e&#xD;&#xA;&#xD;&#xA;you can use it is data &#xD;&#xA;then sign the data and you will get the proof which you can use it in extrinsics.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8844#/signing" ContentLicense="CC BY-SA 4.0" />
  <row Id="27909" PostHistoryTypeId="2" PostId="7317" RevisionGUID="c800d3a4-6787-42ff-a610-8cd71053565a" CreationDate="2023-02-21T19:58:53.970" UserId="3861" Text="I am trying to implement batch transactions alongside the normal balances.transfer. Because of several reasons (constructing transaction more than one stage and polkadot lib is not helping there) i am using ``` @substrate/txwrapper-polkadot ``` methods.balances.transfer and now i am trying methods.utility.batchAll. However i am facing something weird. &#xD;&#xA;&#xD;&#xA;For transfer i used this: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    const unsigned = methods.balances.transfer(&#xD;&#xA;      {&#xD;&#xA;        dest: toAddress,&#xD;&#xA;        value,&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        address: account.address,&#xD;&#xA;        blockHash,&#xD;&#xA;        blockNumber,&#xD;&#xA;        eraPeriod: 64,&#xD;&#xA;        genesisHash,&#xD;&#xA;        metadataRpc,&#xD;&#xA;        nonce,&#xD;&#xA;        specVersion,&#xD;&#xA;        tip,&#xD;&#xA;        transactionVersion,&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry,&#xD;&#xA;      },&#xD;&#xA;    );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This function takes 3 parameter:&#xD;&#xA;```function transfer(args: BalancesTransferArgs, info: BaseTxInfo, options: OptionsWithMeta): UnsignedTransaction```&#xD;&#xA;&#xD;&#xA;This args: BalancesTransferArgs takes `dest` and `value`.&#xD;&#xA;&#xD;&#xA;utility.batch however uses `UtilityBatch` as args :&#xD;&#xA;```&#xD;&#xA;    calls: ({&#xD;&#xA;        callIndex?: string;&#xD;&#xA;        args?: string;&#xD;&#xA;    } | string)[];&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried to use same args part (first part of the unsigned that i wrote up there) of batch transfer from another transaction which i get with `api.rpc.chain.getBlock`:&#xD;&#xA;&#xD;&#xA;```[{&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;1w3QEceeCRN2Rv3GfUohY6yTpRUoo4BRdQ2b7s2jTgK4q4y&quot;},&quot;value&quot;:142062126800}}, {&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;157xqEJLZDUmhc1RFvUDitKP3ygFDsJeXHifJw1Th2Pn7khH&quot;},&quot;value&quot;:130297371500}}, {&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;13qkt6YBJyqzh4jdtJ4dooJDsTgAGKWoM2MwHreWN7LpYEHc&quot;},&quot;value&quot;:428418876800}}, {&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;15sSvgpSsonimLWpHv7ZUhyNoXjd4VNMm2wpDeDVtcp2W58&quot;},&quot;value&quot;:999200000000}}, {&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;13ee8dYeLBR7iaGEcSjbaC7ooRw2U5iSNexdFdTEo4VBVvVN&quot;},&quot;value&quot;:150723408800}}, {&quot;callIndex&quot;:&quot;0x0500&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;1555Ub7YF1tiyDv7JzUNToVjbUzAoK6X8k9RGGUYMK7ZUwAk&quot;},&quot;value&quot;:14200000000}}]```&#xD;&#xA;&#xD;&#xA; but its not accepting parameter as object like this because it wants it as string and i really couldn't figure  what should i put there. &#xD;&#xA;&#xD;&#xA;And what is callIndex? What it should be?&#xD;&#xA;&#xD;&#xA;Can Anyone help? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="27911" PostHistoryTypeId="1" PostId="7317" RevisionGUID="c800d3a4-6787-42ff-a610-8cd71053565a" CreationDate="2023-02-21T19:58:53.970" UserId="3861" Text="Implement utility.batch using @substrate/txwrapper-polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="27912" PostHistoryTypeId="3" PostId="7317" RevisionGUID="c800d3a4-6787-42ff-a610-8cd71053565a" CreationDate="2023-02-21T19:58:53.970" UserId="3861" Text="|polkadot-js|polkadot|polkadot-js-extension|txwrapper|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27913" PostHistoryTypeId="2" PostId="7318" RevisionGUID="32b9d788-3cf7-430a-ada9-6a56b2bb3b0a" CreationDate="2023-02-21T22:36:28.250" UserId="73" Text="You need to change `Clone` in derive above `Nominations` to `CloneNoBound`. The difference between `Clone` and `CloneNoBound` is the handling of `T`. In case of `Clone` it adds the bound `Clone` to `T`. `CloneNoBound` doesn't add this bound. The bound to `Clone` is wrong you don't need that `T` implements `Clone`, you only require that some of the associated types implement `Clone`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27915" PostHistoryTypeId="2" PostId="7319" RevisionGUID="6a998090-d284-4f9f-a6dc-81476f234bfd" CreationDate="2023-02-22T01:05:26.790" UserId="3857" Text="I need to iterate over the following double map inside an offchain worker:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/nYNrz.png&#xD;&#xA;&#xD;&#xA;How can I access this map outside the pallet assets? Can I use an RPC method to get all the values  for that double map inside an offchain worker?&#xD;&#xA;&#xD;&#xA;It should be done with  fn iter_key_prefix() from the IterableStorageDoubleMap trait?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27917" PostHistoryTypeId="1" PostId="7319" RevisionGUID="6a998090-d284-4f9f-a6dc-81476f234bfd" CreationDate="2023-02-22T01:05:26.790" UserId="3857" Text="Iterate storage maps inside an offchain worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="27918" PostHistoryTypeId="3" PostId="7319" RevisionGUID="6a998090-d284-4f9f-a6dc-81476f234bfd" CreationDate="2023-02-22T01:05:26.790" UserId="3857" Text="|pallet|rpc|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27919" PostHistoryTypeId="2" PostId="7320" RevisionGUID="074a8b2d-3dfd-4de5-ba9f-964ba3fbaa71" CreationDate="2023-02-22T02:00:55.353" UserId="651" Text="I am unable to get benchmarks to work after changing an extrinsic argument from `Vec&lt;u8&gt;` to a custom type which is a BoundedVec defined in the pallet pallets config.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. Can someone provide me with more insights into why the BoundedVec is acting differently in the benchmark-runtime. &#xD;&#xA;&#xD;&#xA;2. As well as an implementation that converts a string into a valid BoundedVec type, I don't really want to define my extrinsic argument to be Vec&lt;u8&gt;, then convert them in the runtime just to satisfy the benchmarks.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;#...&#xD;&#xA;&#xD;&#xA;type Bytes: Parameter&#xD;&#xA; + Member&#xD;&#xA; + MaybeSerializeDeserialize&#xD;&#xA; + MaxEncodedLen&#xD;&#xA; + Into&lt;Vec&lt;u8&gt;&gt;;&#xD;&#xA;&#xD;&#xA;# ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;# ...&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&lt;I&gt;, I: 'static&gt; Pallet&lt;T, I&gt; {&#xD;&#xA;&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn do_something(origin: OriginFor&lt;T&gt;, bytes: T::Bytes) {&#xD;&#xA;    # Note: T::Bytes used to be bytes: Vec&lt;u8&gt;&#xD;&#xA;    # ...&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The runtime and tests are working correctly, however, when it comes to creating a BoundedVec in the runtime-benchmarks I'm struggling to construct the type required for calling the extrinsic in the benchmarks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Example of how I am successfully calling the extrinsic from the tests using this conversion from string to the custom BoundedVec type.&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;# mock.rs&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const MaxSize: u32 = 128;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub type Bytes = BoundedVec&lt;u8, MaxSize&gt;;&#xD;&#xA;&#xD;&#xA;impl pallet::Config for Test {&#xD;&#xA;  # ...&#xD;&#xA;  type Bytes = Bytes;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;# test.rs&#xD;&#xA;#[test]&#xD;&#xA;fn it_does_something() {&#xD;&#xA;new_test_ext().execute_with(|| {&#xD;&#xA;  let bytes: Bytes = &quot;hello world!&quot;&#xD;&#xA;    .as_bytes()&#xD;&#xA;    .to_vec()&#xD;&#xA;    .try_into()&#xD;&#xA;    .unwrap()&#xD;&#xA;  &#xD;&#xA;  assert_ok!(Pallet::do_something(RuntimeOrigin::signed(1), bytes);&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I cannot follow the same approach to creating my BoundedVec as I do in the tests/mock files as I get the following error. `the trait From&lt;frame_benchmarking::Vec&lt;u8&gt;&gt; is not implemented for &lt;T as pallet::Config&gt;::Bytes`&#xD;&#xA;&#xD;&#xA;Adding additional traits to the Bytes type `+ TryFrom&lt;Vec&lt;u8&gt;&gt;` results in other additional errors. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;hello world!&quot;.as_bytes().to_vec().try_into().unwrap()&#xD;&#xA;                                              ^^^^^^ `&lt;&lt;T as pallet::Config&gt;::Bytes as TryFrom&lt;frame_benchmarking::Vec&lt;u8&gt;&gt;&gt;::Error` cannot be formatted using `{:?}` because it doesn't implement `core::fmt::Debug`&#xD;&#xA;&#xD;&#xA;adding the suggested where just unravels additional errors so it doesn't seem like the correct approach.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;&#xD;&#xA;use super::*;&#xD;&#xA;&#xD;&#xA;use crate::Pallet;&#xD;&#xA;use frame_benchmarking::{benchmarks, whitelisted_caller};&#xD;&#xA;use frame_system::RawOrigin;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# The function I would like to work. previously It was just returning a Vec&lt;u8&gt;.&#xD;&#xA;fn bytes&lt;T: Config&gt;() -&gt; T::Bytes {&#xD;&#xA;	&quot;hello world!&quot;.as_bytes().to_vec().try_into().unwrap()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;benchmarks! {&#xD;&#xA;	do_something_benchmark {&#xD;&#xA;		let caller: T::AccountId = whitelisted_caller();&#xD;&#xA;	}: do_something(RawOrigin::Signed(caller.clone()), bytes::&lt;T&gt;())&#xD;&#xA;	 verify {&#xD;&#xA;		assert_eq!(Pallet::&lt;T&gt;::storage().unwrap().len(), 1);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27921" PostHistoryTypeId="1" PostId="7320" RevisionGUID="074a8b2d-3dfd-4de5-ba9f-964ba3fbaa71" CreationDate="2023-02-22T02:00:55.353" UserId="651" Text="frame_benchmarking convert Vec to BoundedVec" ContentLicense="CC BY-SA 4.0" />
  <row Id="27922" PostHistoryTypeId="3" PostId="7320" RevisionGUID="074a8b2d-3dfd-4de5-ba9f-964ba3fbaa71" CreationDate="2023-02-22T02:00:55.353" UserId="651" Text="|benchmark|custom-types|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27923" PostHistoryTypeId="2" PostId="7321" RevisionGUID="9148ecd4-f5fc-4527-9e7c-47c7455c919a" CreationDate="2023-02-22T02:36:43.153" UserId="651" Text="Okay after all of that, I managed to figure it out...&#xD;&#xA;&#xD;&#xA;Since `frame_benchmarking::Vec&lt;u8&gt;` wasn't working I decided to focus on converting a BoundedVec to the custom type.&#xD;&#xA;&#xD;&#xA;1. Firstly I needed to add the Bytes MaxSize into the config so I can refer to it in the From trait.&#xD;&#xA;```&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;#...&#xD;&#xA;type MaxSize: Get&lt;u32&gt;;&#xD;&#xA;&#xD;&#xA;type Bytes: Parameter&#xD;&#xA; + Member&#xD;&#xA; + MaybeSerializeDeserialize&#xD;&#xA; + MaxEncodedLen&#xD;&#xA; + Into&lt;Vec&lt;u8&gt;&gt;&#xD;&#xA; + From&lt;BoundedVec&lt;u8, Self::MaxSize&gt;&gt;; &#xD;&#xA;# ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Update the runtimes to pass in the additonal type.&#xD;&#xA;```rust&#xD;&#xA;impl pallet::Config for Test {&#xD;&#xA;  # ...&#xD;&#xA;  type MaxSize = MaxSize;&#xD;&#xA;  type Bytes = Bytes;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;3. update the benchmark code&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;&#xD;&#xA;use super::*;&#xD;&#xA;&#xD;&#xA;use crate::Pallet;&#xD;&#xA;use frame_benchmarking::{benchmarks, whitelisted_caller};&#xD;&#xA;use frame_system::RawOrigin;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;benchmarks! {&#xD;&#xA;    do_something_benchmark {&#xD;&#xA;        let caller: T::AccountId = whitelisted_caller();&#xD;&#xA;&#xD;&#xA;        // Use the BoundedVec TryFrom&lt;Vec&gt; trait&#xD;&#xA;   		let bv_bytes: BoundedVec::&lt;u8, T::MaxSize&gt; = &quot;hello world!&quot;.as_bytes().to_vec().try_into().unwrap(); &#xD;&#xA;&#xD;&#xA;        // Use the newly defined From&lt;BoundedVec&lt;u8, Self::MaxSize&gt;&gt; trait&#xD;&#xA;		let bytes = T::Bytes::from(bv_bytes);&#xD;&#xA;    }: do_something(RawOrigin::Signed(caller.clone()), bytes)&#xD;&#xA;     verify {&#xD;&#xA;        assert_eq!(Pallet::&lt;T&gt;::storage().unwrap().len(), 1);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I hope this helps someone else who runs into a similar issue in the future!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27925" PostHistoryTypeId="2" PostId="7322" RevisionGUID="a317f7c4-974e-4965-9138-ab4bec517ad2" CreationDate="2023-02-22T03:02:53.493" UserId="3862" Text="I have two custom pallets `pallet1` and `pallet2`. In `pallet1` I have a bunch of calls with assigned weights declared under pallet call macro like this&#xD;&#xA;```&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {dispatchables and other stuff}&#xD;&#xA;```&#xD;&#xA;In `pallet1` I also have a bunch of public helper functions outside of call macro, they are at the bottom of my pallets code&#xD;&#xA;```&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {...&#xD;&#xA;pub fn do_things(args) -&gt; DispatchResult {}&#xD;&#xA;...}&#xD;&#xA;```&#xD;&#xA;Now `pallet2` can call these helper functions from `pallet1` through coupling mechanism&#xD;&#xA;```&#xD;&#xA;pallet1::Pallet::&lt;T&gt;::do_things(args)&#xD;&#xA;```&#xD;&#xA;Is there a way to call these functions externally/directly by submitting some extrinsic or other means like `state_call` rpc or something&#xD;&#xA;or the only way to invoke them outside pallet1 is hardcoding calls to these functions in other custom pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="27927" PostHistoryTypeId="1" PostId="7322" RevisionGUID="a317f7c4-974e-4965-9138-ab4bec517ad2" CreationDate="2023-02-22T03:02:53.493" UserId="3862" Text="Accessibility of functions inside custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="27928" PostHistoryTypeId="3" PostId="7322" RevisionGUID="a317f7c4-974e-4965-9138-ab4bec517ad2" CreationDate="2023-02-22T03:02:53.493" UserId="3862" Text="|pallet|runtime|frame|call|coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27929" PostHistoryTypeId="5" PostId="7322" RevisionGUID="34ce487b-51bc-4f8e-a28a-e5fbeff5ef94" CreationDate="2023-02-22T03:07:58.700" UserId="3862" Comment="deleted 10 characters in body" Text="I have two custom pallets `pallet1` and `pallet2`. In `pallet1` I have a bunch of calls with assigned weights declared under pallet call macro like this&#xD;&#xA;```&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {...dispatchables...}&#xD;&#xA;```&#xD;&#xA;In `pallet1` I also have a bunch of public helper functions outside of call macro, they are at the bottom of my pallets code&#xD;&#xA;```&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {...&#xD;&#xA;pub fn do_things(args) -&gt; DispatchResult {}&#xD;&#xA;...}&#xD;&#xA;```&#xD;&#xA;Now `pallet2` can call these helper functions from `pallet1` through coupling mechanism&#xD;&#xA;```&#xD;&#xA;pallet1::Pallet::&lt;T&gt;::do_things(args)&#xD;&#xA;```&#xD;&#xA;Is there a way to call these functions externally/directly by submitting some extrinsic or other means like `state_call` rpc or something&#xD;&#xA;or the only way to invoke them outside pallet1 is hardcoding calls to these functions in other custom pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="27930" PostHistoryTypeId="5" PostId="7322" RevisionGUID="72c1af1f-4f30-4fb6-a601-8225188dc170" CreationDate="2023-02-22T06:11:09.960" UserId="251" Comment="added 2 characters in body" Text="I have two custom pallets `pallet1` and `pallet2`. In `pallet1` I have a bunch of calls with assigned weights declared under pallet call macro like this&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  dispatchables&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;In `pallet1` I also have a bunch of public helper functions outside of call macro, they are at the bottom of my pallets code&#xD;&#xA;```rs&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  pub fn do_things(args) -&gt; DispatchResult {}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Now `pallet2` can call these helper functions from `pallet1` through coupling mechanism&#xD;&#xA;```rs&#xD;&#xA;pallet1::Pallet::&lt;T&gt;::do_things(args)&#xD;&#xA;```&#xD;&#xA;Is there a way to call these functions externally/directly by submitting some extrinsic or other means like `state_call` rpc or something&#xD;&#xA;or the only way to invoke them outside pallet1 is hardcoding calls to these functions in other custom pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="27931" PostHistoryTypeId="2" PostId="7323" RevisionGUID="19bd9676-e6c1-4faa-b56e-1ba512c3ccd7" CreationDate="2023-02-22T09:31:54.687" UserId="49" Text="The head data that is provided to the relay chain consists of three concatenated elements (in the given order):&#xD;&#xA;1. The parent block hash (32 bytes)&#xD;&#xA;2. The extrinsic root (32 bytes)&#xD;&#xA;3. The state root (32 bytes)&#xD;&#xA;&#xD;&#xA;The parent block hash is what the name says, it's the hash of the parent block. When deploying a new parachain (from genesis), the parent hash contains 32 zero bytes, since there is no parent at genesis.&#xD;&#xA;&#xD;&#xA;The extrinsic root summarizes the extrinsics and their order within the block. The documentation at [docs.substrate.io](https://docs.substrate.io/fundamentals/transaction-types/) (Feb. 22, 2023, 10:15 am UTC) describes it in the following way:&#xD;&#xA;&#xD;&#xA;&gt; All of the transactions are bundled together as a series to be executed as defined in the runtime. [...] The transaction root is a cryptographic digest of this series. This cryptographic digest serves two purposes:&#xD;&#xA;&gt; 1. It prevents any alterations to the series of transactions after the header has been built and distributed.&#xD;&#xA;&gt; 2. It enables light clients to succinctly verify that any given transaction exists in a block given only knowledge of the header.&#xD;&#xA;&#xD;&#xA;The state root summarizes the complete state of the storage at the given block within those 32 bytes. Should the underlying storage be available, a merkle proof can be executed in [`O(log N)`](https://docs.substrate.io/fundamentals/state-transitions-and-storage/) time, where `N` is the number of storage elements. The documentation at [docs.substrate.io](https://docs.substrate.io/fundamentals/state-transitions-and-storage/) (Feb. 22, 2023, 10:20 am UTC) describes the state root as follows:&#xD;&#xA;&gt; The trie root is a representation of the data within the trie; that is, two tries with different data will always have different roots. Thus, two blockchain nodes can easily verify that they have the same state by simply comparing their trie roots.&#xD;&#xA;&#xD;&#xA;Having these three hashes (the head) available allows anybody to verify the correctness of the local data available. By having the parent block hash, the history is referenced. By having the extrinsics root, the state-transition logic that was applied on the state of the previous block (referenced by the parent block hash) in a given order can be verified. By having the state root, the current state that resulted from applying the extrinsics on the previous state can be verified. The underlying data to verify all of that still has to be obtained by other means, ideally by completely syncing the chain and verifying each parent hash, extrinsic root and state root by applying all the changes in the given order." ContentLicense="CC BY-SA 4.0" />
  <row Id="27933" PostHistoryTypeId="2" PostId="7324" RevisionGUID="eb550422-fb6a-46c6-9829-4225c76201ec" CreationDate="2023-02-22T11:37:53.013" UserId="2961" Text="I have had two contracts (A, B), where contract a calls a function on contract b, when contract a is deployed. This works fine up to a certain point where I receive a contracts.ContractTrapped error (Usually after calling this function around 300-400 times)&#xD;&#xA;&#xD;&#xA;When I redeploy contract B, with a new contractAddress, when I Initialize contract A with the new contractAddress, It obviously does work. &#xD;&#xA;&#xD;&#xA;Also when I call the function that is called by contract A on contract B `set_end_date` I get the same contracts.contractTrapped error. So it is definitely an issue with contract B&#xD;&#xA;&#xD;&#xA;That said I can read everything from contract B so it is not in the tombstone state!&#xD;&#xA;&#xD;&#xA;This is the function being called on Contract B&#xD;&#xA;&#xD;&#xA;         #[ink(message)]&#xD;&#xA;        pub fn set_end_date(&amp;mut self, end_date: u64) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            self.end_date.insert(caller, end_date);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I really suspect this is an issue perhaps with the amount of storage a given key can have on the contracts pallet, but was curious if anyone else has had this issue and can point me in the right direction!" ContentLicense="CC BY-SA 4.0" />
  <row Id="27935" PostHistoryTypeId="1" PostId="7324" RevisionGUID="eb550422-fb6a-46c6-9829-4225c76201ec" CreationDate="2023-02-22T11:37:53.013" UserId="2961" Text="What is the cause of this contracts.ContractTrapped error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27936" PostHistoryTypeId="3" PostId="7324" RevisionGUID="eb550422-fb6a-46c6-9829-4225c76201ec" CreationDate="2023-02-22T11:37:53.013" UserId="2961" Text="|substrate-node-template|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27937" PostHistoryTypeId="2" PostId="7325" RevisionGUID="3f7450b2-b78d-48a3-8575-283ba2df8c26" CreationDate="2023-02-22T11:41:20.233" UserId="2762" Text="`[u8; 32]` is basically an array of u8. Try directly with the array you have:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;    const message = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32];&#xD;&#xA;  &#xD;&#xA;    const id = api.createType('u64', 1);&#xD;&#xA;    &#xD;&#xA;    const resp = await api.rpc.time.submitForSigning(id, message);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="27939" PostHistoryTypeId="2" PostId="7326" RevisionGUID="222f07c7-630a-465b-a723-c33e66dfb47a" CreationDate="2023-02-22T12:05:53.407" UserId="357" Text="I would like to test a few scenarios about relaychain council / sudo can update our parachain code in case of emergency. &#xD;&#xA;&#xD;&#xA;I searched over the web, and try to use &quot;paras&quot; module to do such, but always getting BadOrigin. &#xD;&#xA;&#xD;&#xA;Following up @papyakin answer on this post: https://substrate.stackexchange.com/questions/376/how-to-reset-a-parachain-with-a-new-genesis-on-rococo/382#382 it should work trought governance actions.&#xD;&#xA;&#xD;&#xA;I tried on local setup kusama network and always get BadOrigin. The council is about 4 people and 4/4 ayes. &#xD;&#xA;Am I missing anything?&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XVgMf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/UT1ZR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27941" PostHistoryTypeId="1" PostId="7326" RevisionGUID="222f07c7-630a-465b-a723-c33e66dfb47a" CreationDate="2023-02-22T12:05:53.407" UserId="357" Text="How to run &quot;paras&quot; extrinsics on local setups" ContentLicense="CC BY-SA 4.0" />
  <row Id="27942" PostHistoryTypeId="3" PostId="7326" RevisionGUID="222f07c7-630a-465b-a723-c33e66dfb47a" CreationDate="2023-02-22T12:05:53.407" UserId="357" Text="|parachain|testing|motion|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27943" PostHistoryTypeId="2" PostId="7327" RevisionGUID="4fd55684-eb16-49b8-80dc-e0560b4ed243" CreationDate="2023-02-22T12:07:42.437" UserId="234" Text="I think it will be helpful for you to check the [batchAll example][1] in the txwrapper-core repository. It uses `transferKeepAlive` and `batchAll` but the concept is basically the same.&#xD;&#xA;&#xD;&#xA;In this example you will notice that : &#xD;&#xA;1. First the const [txMethods][2] is defined where [txInfo.method][3] (the `method` from the `UnsignedTransaction`) is returned.&#xD;&#xA;2. Then in the `calls` argument of `utility.batchAll` this [txMethods][4] is passed.&#xD;&#xA;&#xD;&#xA;This will work because the `calls` argument of `batch` or `batchAll` can be an array of `UnsignedTransaction.method` as mentioned in [utility.batch][5] and also in the comment above the [utility.batchAll call][6] in the example&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/polkadotBatchAll/src/polkadotBatchAll.ts&#xD;&#xA;  [2]: https://github.com/paritytech/txwrapper-core/blob/91b5b614e64b725c59dd9558c47f8905b72aa2d2/packages/txwrapper-examples/polkadotBatchAll/src/polkadotBatchAll.ts#L136&#xD;&#xA;  [3]: https://github.com/paritytech/txwrapper-core/blob/91b5b614e64b725c59dd9558c47f8905b72aa2d2/packages/txwrapper-examples/polkadotBatchAll/src/polkadotBatchAll.ts#L152&#xD;&#xA;  [4]: https://github.com/paritytech/txwrapper-core/blob/91b5b614e64b725c59dd9558c47f8905b72aa2d2/packages/txwrapper-examples/polkadotBatchAll/src/polkadotBatchAll.ts#L160&#xD;&#xA;  [5]: https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-substrate/src/methods/utility/batch.ts#L12L15&#xD;&#xA;  [6]: https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/polkadotBatchAll/src/polkadotBatchAll.ts#L155L157" ContentLicense="CC BY-SA 4.0" />
  <row Id="27945" PostHistoryTypeId="5" PostId="7327" RevisionGUID="e183f131-a912-47ab-a569-ae060629ee0b" CreationDate="2023-02-22T12:57:49.780" UserId="234" Comment="Updated the answer by adding info on what a `callIndex` is" Text="I think it will be helpful for you to check the [batchAll example][1] in the txwrapper-core repository. It uses `transferKeepAlive` and `batchAll` but the concept is basically the same.&#xD;&#xA;&#xD;&#xA;In this example you will notice that : &#xD;&#xA;1. First the const [txMethods][2] is defined where [txInfo.method][3] (the `method` from the `UnsignedTransaction`) is returned.&#xD;&#xA;2. Then in the `calls` argument of `utility.batchAll` this [txMethods][4] is passed.&#xD;&#xA;&#xD;&#xA;This will work because the `calls` argument of `batch` or `batchAll` can be an array of `UnsignedTransaction.method` as mentioned in [utility.batch][5] and also in the comment above the [utility.batchAll call][6] in the example.&#xD;&#xA;&#xD;&#xA;Regarding your question on what `callIndex` is, you can check the following:&#xD;&#xA;- This [post][7] from Shawn Tabrizi where he explains how calls are encoded.&#xD;&#xA;- Check some examples of call indices from the `Balances` pallet in Substrate : &#xD;&#xA;    - `transfer` call with [call index 0][8] &#xD;&#xA;    - `set_balance` call with [call index 1][9]&#xD;&#xA;- Important to keep in mind that these indices can change between runtime upgrades (as mentioned also by Jaco [here][10] in more detail)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/polkadotBatchAll/src/polkadotBatchAll.ts&#xD;&#xA;  [2]: https://github.com/paritytech/txwrapper-core/blob/91b5b614e64b725c59dd9558c47f8905b72aa2d2/packages/txwrapper-examples/polkadotBatchAll/src/polkadotBatchAll.ts#L136&#xD;&#xA;  [3]: https://github.com/paritytech/txwrapper-core/blob/91b5b614e64b725c59dd9558c47f8905b72aa2d2/packages/txwrapper-examples/polkadotBatchAll/src/polkadotBatchAll.ts#L152&#xD;&#xA;  [4]: https://github.com/paritytech/txwrapper-core/blob/91b5b614e64b725c59dd9558c47f8905b72aa2d2/packages/txwrapper-examples/polkadotBatchAll/src/polkadotBatchAll.ts#L160&#xD;&#xA;  [5]: https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-substrate/src/methods/utility/batch.ts#L12L15&#xD;&#xA;  [6]: https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/polkadotBatchAll/src/polkadotBatchAll.ts#L155L157&#xD;&#xA;  [7]: https://substrate.stackexchange.com/a/98/234&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L284&#xD;&#xA;  [9]: https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L310&#xD;&#xA;  [10]: https://github.com/polkadot-js/api/issues/4496#issuecomment-1020854518" ContentLicense="CC BY-SA 4.0" />
  <row Id="27946" PostHistoryTypeId="2" PostId="7328" RevisionGUID="83078979-3941-4022-b9da-88da0ec68f21" CreationDate="2023-02-22T13:20:47.033" UserId="2844" Text="Contract Trapped During Exucution error while cross-contract calling issue occur because I guess you haven't instantiated contract which you are calling.&#xD;&#xA;I have produced this error why `contracts.ContractTrapped` issue occurs and also solve it. you can view this code example [here](https://github.com/ganesh1233456/cross-calling) and you can also docs of this contract [here]()&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27948" PostHistoryTypeId="5" PostId="7324" RevisionGUID="8556787b-bb3d-4071-8d1c-93d30bdc29e8" CreationDate="2023-02-22T15:30:01.673" UserId="2961" Comment="added 296 characters in body" Text="I have had two contracts (A, B), where contract a calls a function on contract b, when contract a is deployed. This works fine up to a certain point where I receive a contracts.ContractTrapped error (Usually after calling this function around 300-400 times)&#xD;&#xA;&#xD;&#xA;When I redeploy contract B, with a new contractAddress, when I Initialize contract A with the new contractAddress, It obviously does work. &#xD;&#xA;&#xD;&#xA;Also when I call the function that is called by contract A on contract B `set_end_date` I get the same contracts.contractTrapped error. So it is definitely an issue with contract B&#xD;&#xA;&#xD;&#xA;That said I can read everything from contract B so it is not in the tombstone state!&#xD;&#xA;&#xD;&#xA;This is the function being called on Contract B&#xD;&#xA;&#xD;&#xA;         #[ink(message)]&#xD;&#xA;        pub fn set_end_date(&amp;mut self, end_date: u64) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            self.end_date.insert(caller, end_date);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I really suspect this is an issue perhaps with the amount of storage a given key can have on the contracts pallet, but was curious if anyone else has had this issue and can point me in the right direction!&#xD;&#xA;&#xD;&#xA;**Follow up**&#xD;&#xA;&#xD;&#xA;I ran a loop to see when this issue starts happening and it happens at the 408th time the function on contract b (set_end_date) is being called. I strongly suspect that this is an issue for how much storage a mapping can contain on the contracts pallet, will keep you posted!" ContentLicense="CC BY-SA 4.0" />
  <row Id="27949" PostHistoryTypeId="2" PostId="7329" RevisionGUID="e996df86-dbe5-489e-8c95-ac642967386b" CreationDate="2023-02-22T16:10:02.297" UserId="3865" Text="I want to implement a history mechanism in my pallet, so that I can access the value that something had at all prior blocks, like in this [Extension of ERC20 to support Compound-like voting and delegation][1]. That code uses the following storage layout to store the historical votes per address, delegate per address and the historical total supply of votes:&#xD;&#xA;&#xD;&#xA;```sol&#xD;&#xA;    struct Checkpoint {&#xD;&#xA;        uint32 fromBlock;&#xD;&#xA;        uint224 votes;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    mapping(address =&gt; address) private _delegates;&#xD;&#xA;    mapping(address =&gt; Checkpoint[]) private _checkpoints;&#xD;&#xA;    Checkpoint[] private _totalSupplyCheckpoints;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I need the same information but for a number of different assets (to be used like vote shares in a DAO).&#xD;&#xA;My attempts so far have been focused on just the `_totalSupplyCheckpoints` (per AssetId).&#xD;&#xA;&#xD;&#xA;At first I implemented this using a StorageMap as `Checkpoint[]`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	/// History for the total supply across all accounts.&#xD;&#xA;	pub(super) type SupplyHistory&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageDoubleMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AssetId,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		BlockNumberFor&lt;T&gt;,&#xD;&#xA;		AssetBalanceOf&lt;T, I&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But this does not allow for logarithmic search (like the binary search used in the solidity code). The best I can come up with here is to collect all keys (N) and sort (NlogN) them and then do binary search (logN), but this is dominated by the Nlog(N) of the sort. As history grows search performance would suffer.&#xD;&#xA;&#xD;&#xA;For my second attempt I found out that it is actually possible to store a Vec if only you use the `pallet::unbounded` macro:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::unbounded]&#xD;&#xA;	/// History for the total supply across all accounts.&#xD;&#xA;	pub(super) type SupplyHistory&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; =&#xD;&#xA;		StorageMap&lt;_, Blake2_128Concat, T::AssetId, Vec&lt;(BlockNumberFor&lt;T&gt;, AssetBalanceOf&lt;T, I&gt;)&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This solves the binary search issue, but now updating the values in the Vec looks like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	pub(super) fn append_supply_history(id: T::AssetId, supply: T::Balance) {&#xD;&#xA;		let mut history = SupplyHistory::&lt;T, I&gt;::get(id).unwrap_or_default();&#xD;&#xA;		let block = frame_system::Pallet::&lt;T&gt;::block_number();&#xD;&#xA;		history.push((block, supply));&#xD;&#xA;		SupplyHistory::&lt;T, I&gt;::insert(id, history);&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, every time you add a value to the history Vec, you first read the entire Vec from storage, push the new value onto it, and then store the entire thing back into storage. As the history grows more data needs to be read and more data needs to be written, growing linearly with the length of the history Vec. Extrinsics that must append to the supply history will get slower as the history grows.&#xD;&#xA;&#xD;&#xA;**My question is: is there a better way to do this?**&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Votes.sol" ContentLicense="CC BY-SA 4.0" />
  <row Id="27951" PostHistoryTypeId="1" PostId="7329" RevisionGUID="e996df86-dbe5-489e-8c95-ac642967386b" CreationDate="2023-02-22T16:10:02.297" UserId="3865" Text="How can I store the historical values of something at all prior blocks in my pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27952" PostHistoryTypeId="3" PostId="7329" RevisionGUID="e996df86-dbe5-489e-8c95-ac642967386b" CreationDate="2023-02-22T16:10:02.297" UserId="3865" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27953" PostHistoryTypeId="2" PostId="7330" RevisionGUID="dd0308fd-4471-4194-8627-05812327af10" CreationDate="2023-02-22T17:34:10.450" UserId="2552" Text="Have you tried using ***utility.dispatchAs(ParachainsOrigin)?*** You can use governance or sudo to call utility.dispatchAs" ContentLicense="CC BY-SA 4.0" />
  <row Id="27956" PostHistoryTypeId="50" PostId="6855" RevisionGUID="653c797b-faa6-4671-8e13-cd881cf4d9a9" CreationDate="2023-02-22T21:03:45.393" UserId="-1" />
  <row Id="27957" PostHistoryTypeId="34" PostId="6831" RevisionGUID="5c8e1fb4-7cdc-4211-aa3d-3217335753f7" CreationDate="2023-02-23T00:06:25.753" UserId="-1" Comment="17" />
  <row Id="27958" PostHistoryTypeId="2" PostId="7331" RevisionGUID="e8de2dd8-b123-40f5-afb5-bff147c8566a" CreationDate="2023-02-23T08:25:08.370" UserId="3538" Text="1- I've built a custom chain with unified accounts that uses PoA as its consensus, but there's no addition to the validator's balance on the confirmation of a transaction even though I've set in my code to send `90%` of the transaction fees to the block authors. &#xD;&#xA;&#xD;&#xA;Here's my implementation:&#xD;&#xA;&#xD;&#xA;        pub struct DealWithFees;&#xD;&#xA;    type NegativeImbalance = &lt;Balances as Currency&lt;AccountId&gt;&gt;::NegativeImbalance;&#xD;&#xA;    &#xD;&#xA;    impl OnUnbalanced&lt;NegativeImbalance&gt; for DealWithFees {&#xD;&#xA;    	fn on_unbalanceds&lt;B&gt;(mut fees_then_tips: impl Iterator&lt;Item=NegativeImbalance&gt;) {&#xD;&#xA;    		if let Some(fees) = fees_then_tips.next() {&#xD;&#xA;    			// for fees, 10% to treasury, 90% to author&#xD;&#xA;    			let mut split = fees.ration(10, 90);&#xD;&#xA;    			if let Some(tips) = fees_then_tips.next() {&#xD;&#xA;    				// for tips, if any, 100% (though this can be anything)&#xD;&#xA;    				tips.merge_into(&amp;mut split.1);&#xD;&#xA;    			}&#xD;&#xA;    			// Treasury::on_unbalanced(split.0);&#xD;&#xA;    			Author::on_unbalanced(split.1);&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub struct Author;&#xD;&#xA;    &#xD;&#xA;    impl OnUnbalanced&lt;NegativeImbalance&gt; for Author {&#xD;&#xA;    	fn on_nonzero_unbalanced(amount: NegativeImbalance) {&#xD;&#xA;    		if let Some(author) = Authorship::author() {&#xD;&#xA;    			Balances::resolve_creating(&amp;author, amount);&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then I've called this `DealWithFees` struct in `pallet_transaction_payment` like this:&#xD;&#xA;&#xD;&#xA;    type OnChargeTransaction = CurrencyAdapter&lt;Balances, DealWithFees&gt;;&#xD;&#xA;&#xD;&#xA;2- Secondly, is it possible to give custom rewards to the block authors on each block validation other than the tips and transaction fees?&#xD;&#xA;&#xD;&#xA;Thanks. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27960" PostHistoryTypeId="1" PostId="7331" RevisionGUID="e8de2dd8-b123-40f5-afb5-bff147c8566a" CreationDate="2023-02-23T08:25:08.370" UserId="3538" Text="No rewards to block authors for validating transactions in a PoA chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="27961" PostHistoryTypeId="3" PostId="7331" RevisionGUID="e8de2dd8-b123-40f5-afb5-bff147c8566a" CreationDate="2023-02-23T08:25:08.370" UserId="3538" Text="|substrate-node-template|validator|moonbeam|rewards|poa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27962" PostHistoryTypeId="5" PostId="7331" RevisionGUID="793f11df-bf37-4dc1-8fb0-bfb53793b58e" CreationDate="2023-02-23T08:31:54.950" UserId="3538" Comment="deleted 4 characters in body" Text="1- I've built a custom chain with unified accounts that uses PoA as its consensus, but there's no addition to the validator's balance on the confirmation of a transaction even though I've set in my code to send `90%` of the transaction fees to the block authors. &#xD;&#xA;&#xD;&#xA;Here's my implementation:&#xD;&#xA;&#xD;&#xA;    pub struct DealWithFees;&#xD;&#xA;    type NegativeImbalance = &lt;Balances as Currency&lt;AccountId&gt;&gt;::NegativeImbalance;&#xD;&#xA;    &#xD;&#xA;    impl OnUnbalanced&lt;NegativeImbalance&gt; for DealWithFees {&#xD;&#xA;    	fn on_unbalanceds&lt;B&gt;(mut fees_then_tips: impl Iterator&lt;Item=NegativeImbalance&gt;) {&#xD;&#xA;    		if let Some(fees) = fees_then_tips.next() {&#xD;&#xA;    			// for fees, 10% to treasury, 90% to author&#xD;&#xA;    			let mut split = fees.ration(10, 90);&#xD;&#xA;    			if let Some(tips) = fees_then_tips.next() {&#xD;&#xA;    				// for tips, if any, 100% (though this can be anything)&#xD;&#xA;    				tips.merge_into(&amp;mut split.1);&#xD;&#xA;    			}&#xD;&#xA;    			// Treasury::on_unbalanced(split.0);&#xD;&#xA;    			Author::on_unbalanced(split.1);&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub struct Author;&#xD;&#xA;    &#xD;&#xA;    impl OnUnbalanced&lt;NegativeImbalance&gt; for Author {&#xD;&#xA;    	fn on_nonzero_unbalanced(amount: NegativeImbalance) {&#xD;&#xA;    		if let Some(author) = Authorship::author() {&#xD;&#xA;    			Balances::resolve_creating(&amp;author, amount);&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Then I've called this `DealWithFees` struct in `pallet_transaction_payment` like this:&#xD;&#xA;&#xD;&#xA;    type OnChargeTransaction = CurrencyAdapter&lt;Balances, DealWithFees&gt;;&#xD;&#xA;&#xD;&#xA;2- Secondly, is it possible to give custom rewards to the block authors on each block validation other than the tips and transaction fees?&#xD;&#xA;&#xD;&#xA;Thanks. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27963" PostHistoryTypeId="2" PostId="7332" RevisionGUID="46401b7a-04a6-4184-9c1f-c9670e916134" CreationDate="2023-02-23T08:37:05.803" UserId="251" Text="I encountered this today on our new network.&#xD;&#xA;&#xD;&#xA;After submitting a PR to PolkadotJs, everything works well.&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-js/apps/pull/9057&#xD;&#xA;&#xD;&#xA;The PolkadotJs library will match your chain's spec name to check if it was in the Ethereum network list.&#xD;&#xA;&#xD;&#xA;If not, you will get this error." ContentLicense="CC BY-SA 4.0" />
  <row Id="27965" PostHistoryTypeId="50" PostId="4970" RevisionGUID="d79be764-fc2e-4d9e-a4a2-37f2f3ea820a" CreationDate="2023-02-23T10:06:55.953" UserId="-1" />
  <row Id="27966" PostHistoryTypeId="2" PostId="7333" RevisionGUID="fa7602fc-2e28-427d-88ea-e54b2dc6b5fb" CreationDate="2023-02-23T10:10:04.530" UserId="379" Text="When an extrinsic has an input of for example:&#xD;&#xA;&#xD;&#xA;`some_call(origin: OriginFor&lt;T&gt;, input: BoundedVec&lt;u8, ConstU32&lt;6&gt;&gt;)`&#xD;&#xA;&#xD;&#xA;And calling this with input exceeding lenght 6 (ex: &quot;1234567&quot;)&#xD;&#xA;&#xD;&#xA;The runtime panics on validating the transaction and recovers after.&#xD;&#xA;&#xD;&#xA;I'm not quite certain if this is actually the behaviour that is expected. Maybe the better thing to do is to make the input just a `Vec&lt;u8&gt;` and try to construct the boundedVector in the call itself and throw and error if it exceeds the size." ContentLicense="CC BY-SA 4.0" />
  <row Id="27968" PostHistoryTypeId="1" PostId="7333" RevisionGUID="fa7602fc-2e28-427d-88ea-e54b2dc6b5fb" CreationDate="2023-02-23T10:10:04.530" UserId="379" Text="Runtime panic when providing input data that exceeds bounded vector length" ContentLicense="CC BY-SA 4.0" />
  <row Id="27969" PostHistoryTypeId="3" PostId="7333" RevisionGUID="fa7602fc-2e28-427d-88ea-e54b2dc6b5fb" CreationDate="2023-02-23T10:10:04.530" UserId="379" Text="|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27970" PostHistoryTypeId="5" PostId="7333" RevisionGUID="ca5f99fe-958c-40ab-a246-df64c1622197" CreationDate="2023-02-23T10:30:06.793" UserId="379" Comment="added 96 characters in body" Text="When an extrinsic has an input of for example:&#xD;&#xA;&#xD;&#xA;`some_call(origin: OriginFor&lt;T&gt;, input: BoundedVec&lt;u8, ConstU32&lt;6&gt;&gt;)`&#xD;&#xA;&#xD;&#xA;And calling this with input exceeding lenght 6 (ex: &quot;1234567&quot;)&#xD;&#xA;&#xD;&#xA;The runtime panics on validating the transaction and recovers after.&#xD;&#xA;&#xD;&#xA;I'm not quite certain if this is actually the behaviour that is expected. Maybe the better thing to do is to make the input just a `Vec&lt;u8&gt;` and try to construct the boundedVector in the call itself and throw and error if it exceeds the size.&#xD;&#xA;&#xD;&#xA;related stacktrace: https://gist.github.com/DylanVerstraete/5f47a3b0a86620fafe9a05395e519ab4" ContentLicense="CC BY-SA 4.0" />
  <row Id="27971" PostHistoryTypeId="2" PostId="7334" RevisionGUID="8774a82e-ff7c-40ac-b4f3-5ca4392172fa" CreationDate="2023-02-23T10:41:42.313" UserId="85" Text="If your using Tauri then it's your choice - personally I'd keep the UI light and have as much in rust as possible so that its strongly typed, but if your typescript skills are better than your rust skills then maybe you'd want it the other way around? Subxt btw is getting better at being able to run client side on the browser: it can now do most things in the browser but not sign stuff (that would need to be done by something else - maybe a browser extension? or alternately the `Signer` trait can be implemented)." ContentLicense="CC BY-SA 4.0" />
  <row Id="27973" PostHistoryTypeId="2" PostId="7335" RevisionGUID="2f982293-ced9-488e-b3d8-61de476c5606" CreationDate="2023-02-23T10:57:52.697" UserId="94" Text="The node will just not gossip that transaction. No harm being done if you run your own node.&#xD;&#xA;&#xD;&#xA;Sure you can also construct the bounded-vec inside the call, but then the caller has to pay fees in case the construction fails. Its a different design choice." ContentLicense="CC BY-SA 4.0" />
  <row Id="27975" PostHistoryTypeId="2" PostId="7336" RevisionGUID="d31cc7e0-faf8-4b04-b93a-4c0eba29e7e4" CreationDate="2023-02-23T11:27:59.497" UserId="3440" Text="I want to create two contracts in one ink file. The second contract use functions and mapping of the first contract. Here is an example&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod contract_1 {&#xD;&#xA;    pub struct Struct1 {}&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct MyContract {}&#xD;&#xA;    impl MyContract {&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {}&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn default() -&gt; Self {}&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn function_1(&amp;self) -&gt; Option&lt;Struct1&gt; {}&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod contract_2 {&#xD;&#xA;    use super::contract_1::{MyContract, Struct1};&#xD;&#xA;    use ink_prelude::string::String;&#xD;&#xA;    use ink_storage::traits::SpreadAllocate;&#xD;&#xA;    // use ink_storage::Mapping;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Contract2 {&#xD;&#xA;        pub contract_parent: MyContract,&#xD;&#xA;    }&#xD;&#xA;    impl Contract2 {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                contract_parent: MyContract::default(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn function_2(&amp;self, variable: String) -&gt; Option&lt;Struct1&gt; {&#xD;&#xA;            self.contract_parent.function_1(variable)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While compiling this ia ma getting an error &quot;symbol `call` is already defined&quot;.&#xD;&#xA;&#xD;&#xA;It appears in the #[ink(storage)] of the second contract.&#xD;&#xA;&#xD;&#xA;How to fix this compilation error?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27977" PostHistoryTypeId="1" PostId="7336" RevisionGUID="d31cc7e0-faf8-4b04-b93a-4c0eba29e7e4" CreationDate="2023-02-23T11:27:59.497" UserId="3440" Text="Create multiple contracts in one ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="27978" PostHistoryTypeId="3" PostId="7336" RevisionGUID="d31cc7e0-faf8-4b04-b93a-4c0eba29e7e4" CreationDate="2023-02-23T11:27:59.497" UserId="3440" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27979" PostHistoryTypeId="50" PostId="6866" RevisionGUID="c9e784c2-27d2-471e-b5bf-0ea11bbbc206" CreationDate="2023-02-23T12:04:55.550" UserId="-1" />
  <row Id="27980" PostHistoryTypeId="4" PostId="6418" RevisionGUID="2b4ead48-f74e-4304-b8b8-7f679caf0864" CreationDate="2023-02-23T13:02:58.867" UserId="29" Comment="edited title" Text="How to cancel or delay a scheduled parachain runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27981" PostHistoryTypeId="2" PostId="7337" RevisionGUID="3e195108-5b05-4a47-a8f8-aa19fddd14ea" CreationDate="2023-02-23T13:36:07.777" UserId="2762" Text="You need to have two contracts in separate files, because the [Smart Contract in ink!][1] are not only the `lib.rs` file, it needs the `Cargo.toml` and the `lib.rs`, which both contain the necessary building blocks for using ink!.&#xD;&#xA;&#xD;&#xA;So the when you run: `cargo contract build` on the folder with this two files you'll get the file target/your_contract.contract which is a JSON which bundles the contract's metadata and its Wasm blob and is the file you need use when deploying the contract.&#xD;&#xA;&#xD;&#xA;To do what you want to do you need to create two different contracts and to deploy them on chain you will have to build and deploy them separately.&#xD;&#xA;&#xD;&#xA;I'd suggest you to take a look at the [docs][2] to see how to do it and this [example][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/basics/contract-template&#xD;&#xA;  [2]: https://use.ink/basics/cross-contract-calling&#xD;&#xA;  [3]: https://github.com/paritytech/ink-examples/blob/main/delegator/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="27987" PostHistoryTypeId="2" PostId="7338" RevisionGUID="850a355a-6a0e-40f2-be54-8651a8c1db98" CreationDate="2023-02-23T18:40:22.070" UserId="484" Text="I want to setup some democracy on one chain. Democracy is voting with tokens.&#xD;&#xA;So it is important to know if tokens distributed well enough.&#xD;&#xA;&#xD;&#xA;I looked into some tools and indexers, none provided such information.&#xD;&#xA;&#xD;&#xA;Simplest solution I thought of to take storage snapshot and go over `balances account` prefix.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="27989" PostHistoryTypeId="1" PostId="7338" RevisionGUID="850a355a-6a0e-40f2-be54-8651a8c1db98" CreationDate="2023-02-23T18:40:22.070" UserId="484" Text="What is simplest way to get native holders distribution?" ContentLicense="CC BY-SA 4.0" />
  <row Id="27990" PostHistoryTypeId="3" PostId="7338" RevisionGUID="850a355a-6a0e-40f2-be54-8651a8c1db98" CreationDate="2023-02-23T18:40:22.070" UserId="484" Text="|storage|democracy|indexing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="27991" PostHistoryTypeId="5" PostId="7338" RevisionGUID="33348ab5-3534-4eff-b5e2-5a3497ac3ebf" CreationDate="2023-02-23T18:58:27.760" UserId="484" Comment="added 131 characters in body" Text="I want to setup some democracy on one chain. Democracy is voting with tokens.&#xD;&#xA;So it is important to know if tokens distributed well enough.&#xD;&#xA;&#xD;&#xA;I looked into some tools and indexers, none provided such information.&#xD;&#xA;&#xD;&#xA;Simplest solution I thought of to take storage snapshot and go over `balances account` prefix.&#xD;&#xA;&#xD;&#xA;I tried polkadotjs, but it seems &quot;empty&quot;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/U89h5.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="27992" PostHistoryTypeId="2" PostId="7339" RevisionGUID="572a89cc-09fa-469b-b018-7e3f7d66cd01" CreationDate="2023-02-23T18:58:27.820" UserId="29" Text="Have you already started your chain? If not, you could have the accounts and balances in the genesis config:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;	pub balances: Vec&lt;(T::AccountId, T::Balance)&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L567-L570&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;You could use [`setBalance()`](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L302-L356).&#xD;&#xA;&#xD;&#xA;Keep in mind this [requires root origin](https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L321). Do you have a sudo key?&#xD;&#xA;&#xD;&#xA;Write a script using polkadotJS api to iterate over accounts and call the `balances -&gt; setBalance()` extrinsic.&#xD;&#xA;&#xD;&#xA;I would not modify state directly like you mentioned, it could lead to undesired consequences." ContentLicense="CC BY-SA 4.0" />
  <row Id="27994" PostHistoryTypeId="5" PostId="7339" RevisionGUID="8e7dcc20-cc7b-4a39-93a9-6f0e3deb17c8" CreationDate="2023-02-23T19:07:49.607" UserId="29" Comment="added 176 characters in body" Text="Have you already started your chain? If not, you could have the accounts and balances in the genesis config:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;	pub balances: Vec&lt;(T::AccountId, T::Balance)&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L567-L570&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;You could use [`setBalance()`](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L302-L356).&#xD;&#xA;&#xD;&#xA;Keep in mind this [requires root origin](https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L321). Do you have a sudo key?&#xD;&#xA;&#xD;&#xA;`setBalance()` will alter `FreeBalance` and `ReservedBalance` in storage for an account and it will also alter the total issuance so make sure this is what you intend. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Write a script using polkadotJS api to iterate over accounts and call the `balances -&gt; setBalance()` extrinsic.&#xD;&#xA;&#xD;&#xA;I would not modify state directly like you mentioned, it could lead to undesired consequences." ContentLicense="CC BY-SA 4.0" />
  <row Id="27995" PostHistoryTypeId="5" PostId="7339" RevisionGUID="703f15de-5cfa-47a3-aab5-1cdc9e53df77" CreationDate="2023-02-23T19:14:06.567" UserId="29" Comment="added 176 characters in body" Text="Have you already started your chain? If not, you could have the accounts and balances in the genesis config:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;	pub balances: Vec&lt;(T::AccountId, T::Balance)&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L567-L570&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;You could use [`setBalance()`](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L302-L356).&#xD;&#xA;&#xD;&#xA;Keep in mind this [requires root origin](https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L321). Do you have a sudo key?&#xD;&#xA;&#xD;&#xA;`setBalance()` will alter `FreeBalance` and `ReservedBalance` in storage for an account and it will also alter the total issuance so make sure this is what you intend. It will overwrite the balances.&#xD;&#xA;&#xD;&#xA;Write a script using polkadotJS api to iterate over accounts and call the `balances -&gt; setBalance()` extrinsic. Coupling this with a `batch_all` call might make things easier depending on the number of accounts you need to update.&#xD;&#xA;&#xD;&#xA;I would not modify state directly like you mentioned, it could lead to undesired consequences.&#xD;&#xA;&#xD;&#xA;Instead you could do a storage migration." ContentLicense="CC BY-SA 4.0" />
  <row Id="27996" PostHistoryTypeId="5" PostId="7339" RevisionGUID="4f861ca7-8140-43c4-8eef-96e099fed906" CreationDate="2023-02-23T19:20:27.857" UserId="29" Comment="added 176 characters in body" Text="Have you already started your chain? If not, you could have the accounts and balances in the genesis config:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;	pub balances: Vec&lt;(T::AccountId, T::Balance)&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L567-L570&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;You could use [`transfer()`](https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L262-L286) (if you have a fund account) or [`setBalance()`](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L302-L356).&#xD;&#xA;&#xD;&#xA;Keep in mind this [requires root origin](https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L321). Do you have a sudo key?&#xD;&#xA;&#xD;&#xA;`setBalance()` will alter `FreeBalance` and `ReservedBalance` in storage for an account and it will also alter the total issuance so make sure this is what you intend. It will overwrite the balances.&#xD;&#xA;&#xD;&#xA;Write a script using polkadotJS api to iterate over accounts and call the `balances -&gt; setBalance()` extrinsic. Coupling this with a `batch_all` call might make things easier depending on the number of accounts you need to update.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;```js&#xD;&#xA;await api.tx.sudo.sudo(api.tx.balances.setBalance(...))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: I would not modify state directly like you mentioned, it could lead to undesired consequences.&#xD;&#xA;&#xD;&#xA;The simplest and cleanest way may be to do a storage migration. Check this post out:&#xD;&#xA;- https://substrate.stackexchange.com/questions/5185/token-distribution-to-many-users-in-substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="27997" PostHistoryTypeId="2" PostId="7340" RevisionGUID="0c69f811-b644-49d6-86ba-0f0c28783e3d" CreationDate="2023-02-23T19:25:36.083" UserId="73" Text="No there is no way to cancel a scheduled upgrade. And yes, ignoring the go ahead signal will not change anything. This go ahead signal is the signal to the parachain to apply the runtime, so that with the next block it should use the new runtime. The relay chain is doing the same, as for validation and block building you obviously need to use the same runtime. If you block the signal on the parachain, you only block applying the runtime upgrade on the parachain but not on the relay chain itself. " ContentLicense="CC BY-SA 4.0" />
  <row Id="27999" PostHistoryTypeId="5" PostId="7339" RevisionGUID="aa84de92-10ba-41fc-a82c-20e5353bc1d0" CreationDate="2023-02-23T19:26:40.527" UserId="29" Comment="added 101 characters in body" Text="Have you already started your chain? If not, you could have the accounts and balances in the genesis config:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;	pub balances: Vec&lt;(T::AccountId, T::Balance)&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L567-L570&#xD;&#xA;&#xD;&#xA;OR&#xD;&#xA;&#xD;&#xA;You could use [`transfer()`](https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L262-L286) (if you have a fund account) or [`setBalance()`](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L302-L356).&#xD;&#xA;&#xD;&#xA;Keep in mind [`setBalance()`](https://github.com/paritytech/substrate/blob/master/frame/balances/src/lib.rs#L302-L356) [requires root origin](https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/balances/src/lib.rs#L321). Do you have a sudo key?&#xD;&#xA;&#xD;&#xA;`setBalance()` will alter `FreeBalance` and `ReservedBalance` in storage for an account and it will also alter the total issuance so make sure this is what you intend. It will overwrite the balance.&#xD;&#xA;&#xD;&#xA;Write a script using polkadotJS api to iterate over accounts and call the `balances -&gt; setBalance()` extrinsic. Coupling this with a `batch_all` call might make things easier depending on the number of accounts you need to update.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;```js&#xD;&#xA;await api.tx.sudo.sudo(api.tx.balances.setBalance(...))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: I would not modify state directly like you mentioned, it could lead to undesired consequences.&#xD;&#xA;&#xD;&#xA;The simplest and cleanest way may be to do a storage migration. Check this post out:&#xD;&#xA;- https://substrate.stackexchange.com/questions/5185/token-distribution-to-many-users-in-substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="28000" PostHistoryTypeId="2" PostId="7341" RevisionGUID="7c25b0ee-145c-47f2-9814-c2e860babf23" CreationDate="2023-02-23T19:41:28.893" UserId="484" Text="I got help and got script via polkadotjs, not direct storage usage. But after digging what accounts own what, found https://&lt;CHAIN&gt;.subscan.io/account does it. Need to clock more in subscan." ContentLicense="CC BY-SA 4.0" />
  <row Id="28002" PostHistoryTypeId="2" PostId="7342" RevisionGUID="4b525f84-b1b8-4fa5-88e8-20c161f2b650" CreationDate="2023-02-23T19:48:32.773" UserId="3171" Text="How to specify limit weight for extrinsic?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/c9Agd.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/FlIAe.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="28004" PostHistoryTypeId="1" PostId="7342" RevisionGUID="4b525f84-b1b8-4fa5-88e8-20c161f2b650" CreationDate="2023-02-23T19:48:32.773" UserId="3171" Text="1010: Invalid Transaction: Transaction would exhaust the block limits" ContentLicense="CC BY-SA 4.0" />
  <row Id="28005" PostHistoryTypeId="3" PostId="7342" RevisionGUID="4b525f84-b1b8-4fa5-88e8-20c161f2b650" CreationDate="2023-02-23T19:48:32.773" UserId="3171" Text="|polkadot-js|weight|error|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28006" PostHistoryTypeId="2" PostId="7343" RevisionGUID="3a8a747e-36cb-48ae-86bd-87fb749f980f" CreationDate="2023-02-23T21:57:48.407" UserId="170" Text="It is indeed an issue with the storage, as the `BTreeMap` is a `Packed` struct, therefore being contained within one cell (see doc: https://use.ink/datastructures/mapping)" ContentLicense="CC BY-SA 4.0" />
  <row Id="28008" PostHistoryTypeId="2" PostId="7344" RevisionGUID="ad112bd4-e49b-46a6-b82b-516837aa1f2a" CreationDate="2023-02-23T22:17:56.923" UserId="3142" Text="I can’t get logging to work in a custom pallet when running unit tests:&#xD;&#xA;&#xD;&#xA;    RUST_LOG=runtime=debug cargo test --features rococo-local -- --nocapture&#xD;&#xA;&#xD;&#xA;`log::debug!(&quot;&quot;)` doesn’t work and `println!()` doesn’t compile because of `no-std`. (edited) &#xD;&#xA;&#xD;&#xA;The custom pallet is importing the `log` facade:&#xD;&#xA;&#xD;&#xA;    use frame_support::{&#xD;&#xA;        dispatch::{DispatchInfo, DispatchResult, PostDispatchInfo},&#xD;&#xA;        ensure, log,&#xD;&#xA;        pallet_prelude::*,&#xD;&#xA;        traits::IsSubType,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;`Cargo.toml` does not have a log crate but I tried adding `log = &quot;0.4.17&quot;` to `dependencies` and also `dev-dependencies` but that had no effect.  I did not try adding it to both.&#xD;&#xA;&#xD;&#xA;I tried `RUST_LOG=debug`, `RUST_LOG=runtime=debug` and `RUST_LOG=test=debug` to no avail.&#xD;&#xA;&#xD;&#xA;**IMPORTANT NOTE**: The log is **not** in the unit tests.  It’s in the custom pallet `lib.rs` which is being called by the unit test.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28010" PostHistoryTypeId="1" PostId="7344" RevisionGUID="ad112bd4-e49b-46a6-b82b-516837aa1f2a" CreationDate="2023-02-23T22:17:56.923" UserId="3142" Text="Can’t get logging to work in a custom pallet when running unit tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="28011" PostHistoryTypeId="3" PostId="7344" RevisionGUID="ad112bd4-e49b-46a6-b82b-516837aa1f2a" CreationDate="2023-02-23T22:17:56.923" UserId="3142" Text="|pallet|unit-tests|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28012" PostHistoryTypeId="2" PostId="7345" RevisionGUID="dfdaf1b2-3c33-42c8-af7d-f77710b2273e" CreationDate="2023-02-24T00:31:17.513" UserId="3142" Text="Using logging didn't work but this did:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sp_std::if_std! {&#xD;&#xA;  println!(&quot;debug log&quot;);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="28014" PostHistoryTypeId="2" PostId="7346" RevisionGUID="c9252acd-06da-4cb4-b129-7536400ec528" CreationDate="2023-02-24T02:29:43.707" UserId="251" Text="log is just some 'code'.&#xD;&#xA;&#xD;&#xA;You need a trigger to activate it.&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/merkle-mountain-range/src/tests.rs#L473" ContentLicense="CC BY-SA 4.0" />
  <row Id="28016" PostHistoryTypeId="6" PostId="7344" RevisionGUID="2cb6079c-24c2-4168-940c-e8edc3731543" CreationDate="2023-02-24T03:30:00.517" UserId="251" Comment="edited tags" Text="|rust|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28017" PostHistoryTypeId="5" PostId="7346" RevisionGUID="7f25d9f6-7d5f-4006-8693-df586d3c7d9e" CreationDate="2023-02-24T03:30:40.287" UserId="251" Comment="added 38 characters in body" Text="This is a Rust question.&#xD;&#xA;&#xD;&#xA;`log` is just some sort of &quot;code&quot;.&#xD;&#xA;&#xD;&#xA;You need a trigger to activate it.&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/fbddfbd76c60c6fda0024e8a44e82ad776033e4b/frame/merkle-mountain-range/src/tests.rs#L473" ContentLicense="CC BY-SA 4.0" />
  <row Id="28018" PostHistoryTypeId="2" PostId="7347" RevisionGUID="1e9c4825-d03f-4a92-9d52-c13fc6bc9a91" CreationDate="2023-02-24T04:04:05.187" UserId="3538" Text="I've fixed it by making these changes in my runtime:&#xD;&#xA;&#xD;&#xA; 1. In the `frame_system::Config`, changed `Lookup` from `type Lookup = AccountIdLookup&lt;AccountId, ()&gt;;` to `type Lookup = sp_runtime::traits::IdentityLookup&lt;AccountId&gt;;`.&#xD;&#xA; 2. And changed the `Address` type from `pub type Address = sp_runtime::MultiAddress&lt;AccountId, ()&gt;;` to `pub type Address = AccountId;`&#xD;&#xA;&#xD;&#xA;where `AccountId` is the `AccountId20`." ContentLicense="CC BY-SA 4.0" />
  <row Id="28024" PostHistoryTypeId="2" PostId="7349" RevisionGUID="bde63997-f4b6-4d11-84ab-d932f3afe3a0" CreationDate="2023-02-24T05:45:10.327" UserId="104" Text="Because the one responsible for paying the fees isn't always necessarily the origin.&#xD;&#xA;&#xD;&#xA;Recall that you can fill up the holding register with assets via a couple of instructions, they are:&#xD;&#xA;&#xD;&#xA; - `WithdrawAsset`&#xD;&#xA; - `ReceiveTeleportedAsset`&#xD;&#xA; - `ReserveAssetDeposited`&#xD;&#xA; - `ClaimAsset`&#xD;&#xA;&#xD;&#xA;Of which the only instruction that takes fees from the origin is `WithdrawAsset`. For all the other instructions listed, it is most often not the case that the asset being put into the holding register belongs to the origin." ContentLicense="CC BY-SA 4.0" />
  <row Id="28026" PostHistoryTypeId="50" PostId="6879" RevisionGUID="f049e650-7b9c-4795-b18f-77c8bf94d729" CreationDate="2023-02-24T07:06:40.827" UserId="-1" />
  <row Id="28028" PostHistoryTypeId="5" PostId="7326" RevisionGUID="65400aae-d966-4a43-804c-345562d85488" CreationDate="2023-02-24T08:49:21.687" UserId="357" Comment="added 217 characters in body" Text="I would like to test a few scenarios about relaychain council / sudo can update our parachain code in case of emergency. &#xD;&#xA;&#xD;&#xA;I searched over the web, and try to use &quot;paras&quot; module to do such, but always getting BadOrigin. &#xD;&#xA;&#xD;&#xA;Following up @papyakin answer on this post: https://substrate.stackexchange.com/questions/376/how-to-reset-a-parachain-with-a-new-genesis-on-rococo/382#382 it should work trought governance actions.&#xD;&#xA;&#xD;&#xA;I tried on local setup kusama network and always get BadOrigin. The council is about 4 people and 4/4 ayes. &#xD;&#xA;Am I missing anything?&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Update: tried also with parachain origin:&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XVgMf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/UT1ZR.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/3k2EA.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/6j50W.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="28029" PostHistoryTypeId="2" PostId="7350" RevisionGUID="8c94cf8a-dd9a-425c-924f-5cf66447e641" CreationDate="2023-02-24T09:44:21.637" UserId="2025" Text="I believe that the error reported by polkadot.js UI is informative enough of the issue. The [weight defined for the dispatchable function](https://github.com/pendulum-chain/oracle-pallet/blob/b8c5bd0f0e756d83868f1dd982d45792a662bfd7/pallets/dia-oracle/src/weights.rs#L89) `set_updated_coin_infos` represents a computation longer than one second (1^12 units of weight = 1 second of computation). " ContentLicense="CC BY-SA 4.0" />
  <row Id="28031" PostHistoryTypeId="6" PostId="7342" RevisionGUID="550294bb-ed86-4206-ac60-a7c83ed63bc3" CreationDate="2023-02-24T09:47:34.350" UserId="2025" Comment="this is not a polkadot.js issue but a benchmarking issue." Text="|benchmarking|weight|error|call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28032" PostHistoryTypeId="24" PostId="7342" RevisionGUID="550294bb-ed86-4206-ac60-a7c83ed63bc3" CreationDate="2023-02-24T09:47:34.350" Comment="Proposed by 2025 approved by 3171 edit id of 386" ContentLicense="CC BY-SA 4.0" />
  <row Id="28033" PostHistoryTypeId="50" PostId="4958" RevisionGUID="c3c7e494-3a64-4b71-8112-878c23cde217" CreationDate="2023-02-24T16:08:21.033" UserId="-1" />
  <row Id="28034" PostHistoryTypeId="2" PostId="7351" RevisionGUID="e35bc121-70f6-420e-b17e-6f4eb101d527" CreationDate="2023-02-24T16:30:40.533" UserId="3528" Text="If the `System.ExtrinsicFailed` event was emitted within a given extrinsic, does it mean that all other events that were also emitted within it can be considered invalid and should not be taken into account?&#xD;&#xA;&#xD;&#xA;Example [link][1]:&#xD;&#xA;In extrinsic `balances.transfer`, the events `balances.Withdraw` and `balances.Deposit` were triggered, which indicate a change in the balance of two addresses. The `system.ExtrinsicFailed` event was also called which indicates that extrinsic failed. Should balance changes in this case be taken into account or should they be ignored?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.test.azero.dev#/explorer/query/0x4b5155b735910cab985bed7af3e66a31431e448e9c397be4a50b52826a87ff13" ContentLicense="CC BY-SA 4.0" />
  <row Id="28036" PostHistoryTypeId="1" PostId="7351" RevisionGUID="e35bc121-70f6-420e-b17e-6f4eb101d527" CreationDate="2023-02-24T16:30:40.533" UserId="3528" Text="Should events be taken into account if their extrinsic fails?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28037" PostHistoryTypeId="3" PostId="7351" RevisionGUID="e35bc121-70f6-420e-b17e-6f4eb101d527" CreationDate="2023-02-24T16:30:40.533" UserId="3528" Text="|extrinsic|events|data-analytics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28038" PostHistoryTypeId="2" PostId="7352" RevisionGUID="65e193f7-1906-4c7d-9c96-8d8cd6dd7923" CreationDate="2023-02-24T16:33:52.623" UserId="3235" Text="I've tried modifying the repository so initial voters for the grandpa pallet. In doing so, I noticed there are many checks to prevent that modification.&#xD;&#xA;The reason why we do not want any initial voters is to prevent hardcoding of some node properties in the chain_spec file. Hardcoded validators in the chain_spec file could be a target for Ddos attacks among others.&#xD;&#xA;So I'd like to know why the initial voters are required with the grandpa pallet and how to do without them.&#xD;&#xA;Are there any security reasons or advantages to having initial voters specified in the chain_spec file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28040" PostHistoryTypeId="1" PostId="7352" RevisionGUID="65e193f7-1906-4c7d-9c96-8d8cd6dd7923" CreationDate="2023-02-24T16:33:52.623" UserId="3235" Text="How to start a GRANDPA blockchain without any initial voters?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28041" PostHistoryTypeId="3" PostId="7352" RevisionGUID="65e193f7-1906-4c7d-9c96-8d8cd6dd7923" CreationDate="2023-02-24T16:33:52.623" UserId="3235" Text="|polkadot|substrate-node-template|grandpa|babe|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28042" PostHistoryTypeId="2" PostId="7353" RevisionGUID="42074f49-355e-4b8a-b6b2-b8c061f2c075" CreationDate="2023-02-24T16:40:47.080" UserId="73" Text="&gt; If the System.ExtrinsicFailed event was emitted within a given extrinsic, does it mean that all other events that were also emitted within it can be considered invalid and should not be taken into account?&#xD;&#xA;&#xD;&#xA;All dispatchables are executed in storage transactions and when the dispatchable returns an error, the storage transaction is thrown away. Events are stored in the storage as well. This means when your dispatchable returns an error, also the events send by this dispatchable are thrown away.&#xD;&#xA;&#xD;&#xA;&gt; Example link: In extrinsic balances.transfer, the events balances.Withdraw and balances.Deposit were triggered, which indicate a change in the balance of two addresses. The system.ExtrinsicFailed event was also called which indicates that extrinsic failed. Should balance changes in this case be taken into account or should they be ignored?&#xD;&#xA;&#xD;&#xA;The balance events you are seeing there are coming from the transaction payment signed extension. These operations are done on purpose outside of the dispatch of the actual as they are ensuring that your chain is not open to dos attacks. The sender should pay for each extrinsic that is applied on chain, even if the outcome is an error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="28044" PostHistoryTypeId="2" PostId="7354" RevisionGUID="f8162bee-4a68-4d66-a0b6-a98904ee715e" CreationDate="2023-02-24T19:04:58.197" UserId="28" Text="During the Polkadot Blockchain Academy in Buenos Aries, there were some metrics noted on the bandwidth / availability provided by the Parachains Protocol through Erasure Encoding.&#xD;&#xA;&#xD;&#xA;What were those metrics, and how do they compare to other data availability protocols in the present day blockchain space?&#xD;&#xA;&#xD;&#xA;For example, I would like to know something like:&#xD;&#xA;&#xD;&#xA;- Polkadot provides availability of X MB of data across it's validators.&#xD;&#xA;- The protocol transfers X MB of data on average per parachain block.&#xD;&#xA;- This is compares to \&lt;other protocol\&gt;, which has..." ContentLicense="CC BY-SA 4.0" />
  <row Id="28046" PostHistoryTypeId="1" PostId="7354" RevisionGUID="f8162bee-4a68-4d66-a0b6-a98904ee715e" CreationDate="2023-02-24T19:04:58.197" UserId="28" Text="What kind of bandwidth / availability is provided by Polkadot's Erasure Encoding within the Parachains Protocol?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28047" PostHistoryTypeId="3" PostId="7354" RevisionGUID="f8162bee-4a68-4d66-a0b6-a98904ee715e" CreationDate="2023-02-24T19:04:58.197" UserId="28" Text="|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28051" PostHistoryTypeId="50" PostId="4908" RevisionGUID="31f90541-8ca5-4c15-8574-e01f88e7ae8b" CreationDate="2023-02-24T20:07:05.833" UserId="-1" />
  <row Id="28053" PostHistoryTypeId="2" PostId="7356" RevisionGUID="a17b7e2d-3af0-4d5b-ad5b-1469e7c18f87" CreationDate="2023-02-25T06:29:48.690" UserId="3875" Text="Error &quot;StorageDepositLimitExhausted&quot; occurs when trying to mint&#xD;&#xA;&#xD;&#xA;But I don't know why this error happens&#xD;&#xA;&#xD;&#xA;The code is here&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;#![feature(min_specialization)]&#xD;&#xA;        &#xD;&#xA;#[openbrush::contract]&#xD;&#xA;pub mod my_psp22 {&#xD;&#xA;    &#xD;&#xA;    // imports from openbrush&#xD;&#xA;	use openbrush::traits::Storage;&#xD;&#xA;	use openbrush::contracts::psp22::extensions::mintable::*;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(Default, Storage)]&#xD;&#xA;    pub struct Contract {&#xD;&#xA;    	#[storage_field]&#xD;&#xA;		psp22: psp22::Data,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Section contains default implementation without any modifications&#xD;&#xA;	impl PSP22 for Contract {}&#xD;&#xA;	impl PSP22Mintable for Contract {}&#xD;&#xA;     &#xD;&#xA;    impl Contract {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(initial_supply: Balance) -&gt; Self {&#xD;&#xA;            let mut _instance = Self::default();&#xD;&#xA;			_instance._mint_to(_instance.env().caller(), initial_supply).expect(&quot;Should mint&quot;); &#xD;&#xA;			_instance&#xD;&#xA;        }&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mint_to(&amp;mut self, account: AccountId, amount: Balance) -&gt; Result&lt;(), PSP22Error&gt; {&#xD;&#xA;            self.mint(account, amount)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I execute &quot;mint_to&quot; message by the caller of contract executed account, it's OK&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;But when I execute &quot;mint_to&quot; message by the caller of the other account, the error occurs.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I don't understand why this error happen.&#xD;&#xA;&#xD;&#xA;I would be glad if someone could tell me what it is.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dtAOa.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Jwara.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="28055" PostHistoryTypeId="1" PostId="7356" RevisionGUID="a17b7e2d-3af0-4d5b-ad5b-1469e7c18f87" CreationDate="2023-02-25T06:29:48.690" UserId="3875" Text="Error &quot;StorageDepositLimitExhausted&quot; occurs when trying to mint" ContentLicense="CC BY-SA 4.0" />
  <row Id="28056" PostHistoryTypeId="3" PostId="7356" RevisionGUID="a17b7e2d-3af0-4d5b-ad5b-1469e7c18f87" CreationDate="2023-02-25T06:29:48.690" UserId="3875" Text="|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28057" PostHistoryTypeId="2" PostId="7357" RevisionGUID="4bbae19e-f69b-4236-b214-c018b6acf87e" CreationDate="2023-02-25T07:15:47.710" UserId="372" Text="There are (at least) two different functions for calculating a Blake2 256 hash in the Substrate codebase. More surprising is that they give different hashes for the same message. Is this intended?&#xD;&#xA;&#xD;&#xA;Here is a test to reproduce the result&#xD;&#xA;```rust&#xD;&#xA;fn blake_2_256_inconsistency() {&#xD;&#xA;    let message = b&quot;hello world&quot;.to_vec();&#xD;&#xA;&#xD;&#xA;    let hash_1 = sp_core::H256::from(sp_core::blake2_256(&amp;message));&#xD;&#xA;    let hash_2 = &lt;sp_runtime::traits::BlakeTwo256 as sp_runtime::traits::Hash&gt;::hash_of(&amp;message);&#xD;&#xA;&#xD;&#xA;    println!(&quot;Hash 1: {:?}&quot;, hash_1);&#xD;&#xA;    println!(&quot;Hash 2: {:?}&quot;, hash_2);&#xD;&#xA;&#xD;&#xA;    assert_eq!(hash_1, hash_2);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The test fails with these hashes printed&#xD;&#xA;```&#xD;&#xA;Hash 1: 0x256c83b297114d201b30179f3f0ef0cace9783622da5974326b436178aeef610&#xD;&#xA;Hash 2: 0x3e4bbda1b5eba20a819aab597b1cc8348248ffd035b2237b788bebe4cc665fa0&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="28059" PostHistoryTypeId="1" PostId="7357" RevisionGUID="4bbae19e-f69b-4236-b214-c018b6acf87e" CreationDate="2023-02-25T07:15:47.710" UserId="372" Text="Is it expected that sp_core::blake2_256 gives a different result from sp_runtime::traits::BlakeTwo256?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28060" PostHistoryTypeId="3" PostId="7357" RevisionGUID="4bbae19e-f69b-4236-b214-c018b6acf87e" CreationDate="2023-02-25T07:15:47.710" UserId="372" Text="|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28061" PostHistoryTypeId="2" PostId="7358" RevisionGUID="70c23e9d-c7ae-4184-9723-20183d399e60" CreationDate="2023-02-25T10:28:49.640" UserId="1956" Text="I'm trying to write a simple contract but run OutOfGas very quickly. My main storage looks like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    type Id = u32;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Example {&#xD;&#xA;        elements: Mapping&lt;Id, Element&gt;,&#xD;&#xA;        ids: Lazy&lt;Vec&lt;Id&gt;&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Element {&#xD;&#xA;        id: Id,&#xD;&#xA;        name: String,&#xD;&#xA;        owner: AccountId,&#xD;&#xA;        max_speed: i32,&#xD;&#xA;        max_inventory_size: u32,&#xD;&#xA;        max_cargo_size: u32,&#xD;&#xA;        max_energy: u32,&#xD;&#xA;        max_health: u32,&#xD;&#xA;        recharge_rate: u32,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I now try to create one of those elements via a message I'm running out of gas no matter how much I supply. What can be the reason for this? Is the Element struct perhaps too large for a single Cell, so it's super inefficient? What else could be the reason?&#xD;&#xA;&#xD;&#xA;Thanks in advance, any input would be appreciated!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28063" PostHistoryTypeId="1" PostId="7358" RevisionGUID="70c23e9d-c7ae-4184-9723-20183d399e60" CreationDate="2023-02-25T10:28:49.640" UserId="1956" Text="How to design ink! storage to prevent OutOfGas?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28064" PostHistoryTypeId="3" PostId="7358" RevisionGUID="70c23e9d-c7ae-4184-9723-20183d399e60" CreationDate="2023-02-25T10:28:49.640" UserId="1956" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28065" PostHistoryTypeId="2" PostId="7359" RevisionGUID="7ea73377-99e3-4453-89d9-73a739f8395a" CreationDate="2023-02-25T11:42:46.100" UserId="73" Text="```&#xD;&#xA;fn blake_2_256_inconsistency() {&#xD;&#xA;    let message = b&quot;hello world&quot;.to_vec();&#xD;&#xA;&#xD;&#xA;    let hash_1 = sp_core::H256::from(sp_core::blake2_256(&amp;message));&#xD;&#xA;    let hash_2 = &lt;sp_runtime::traits::BlakeTwo256 as sp_runtime::traits::Hash&gt;::hash(&amp;message);&#xD;&#xA;&#xD;&#xA;    println!(&quot;Hash 1: {:?}&quot;, hash_1);&#xD;&#xA;    println!(&quot;Hash 2: {:?}&quot;, hash_2);&#xD;&#xA;&#xD;&#xA;    assert_eq!(hash_1, hash_2);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will make it work, I changed from `hash_of` to `hash`. If you look at the docs of [`hash_of`][1], you will see that it mentions &quot;Produce the hash of some codec-encodable value.&quot;. This means that the value you pass to `hash_of` is first encoded and then hashed. This is the reason why the results are different.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-runtime/17.0.0/sp_runtime/traits/trait.Hash.html#method.hash_of" ContentLicense="CC BY-SA 4.0" />
  <row Id="28067" PostHistoryTypeId="50" PostId="6883" RevisionGUID="05198134-8450-4d2c-93bf-4beb1b408061" CreationDate="2023-02-25T13:03:10.367" UserId="-1" />
  <row Id="28068" PostHistoryTypeId="52" PostId="7357" RevisionGUID="2697742a-8e70-4f64-9d9d-992d389eac7b" CreationDate="2023-02-25T15:16:06.163" />
  <row Id="28069" PostHistoryTypeId="50" PostId="6882" RevisionGUID="6cdbd4d1-ae6d-4b00-9b66-de36b49cdc07" CreationDate="2023-02-25T17:09:16.100" UserId="-1" />
  <row Id="28070" PostHistoryTypeId="2" PostId="7360" RevisionGUID="5b4e1958-5f83-4bf8-b0e3-fd1f90e3dc2d" CreationDate="2023-02-25T21:23:13.027" UserId="361" Text="Addressing your last question: It is possible to append to a vector in storage with [the `::append` function](https://paritytech.github.io/substrate/master/frame_support/storage/trait.StorageValue.html#tymethod.append) (also exists on `StorageMap`).&#xD;&#xA;&#xD;&#xA;I would caution against having a vector that is tagged as unbounded in storage, though, especially if you don't know yourself whether it will be bounded. At a minimum you would probably want to do a FIFO history of a certain length so that the vector never becomes too big. Remember that you have to still read the whole vector when accessing (even if appending is cheaper with `StorageValue::append`).&#xD;&#xA;&#xD;&#xA;A possible strategy for storing the complete history might be combining the above with binning. The storage might look something like:&#xD;&#xA;```Rust&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    /// History for the total supply across all accounts.&#xD;&#xA;    pub(super) type SupplyHistory&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageDoubleMap&lt;&#xD;&#xA;        _,&#xD;&#xA;        Blake2_128Concat,&#xD;&#xA;        T::AssetId,&#xD;&#xA;        Blake2_128Concat,&#xD;&#xA;        BlockNumberFor&lt;T&gt;,&#xD;&#xA;        BoundedVec&lt;AssetBalanceOf&lt;T, I&gt;, MaxHistoryBucketLength&gt;,&#xD;&#xA;    &gt;;&#xD;&#xA;```&#xD;&#xA;Do note that this will still lead to unbounded storage usage over time - your total state will grow linearly with every balance transfer - which might become problematic." ContentLicense="CC BY-SA 4.0" />
  <row Id="28072" PostHistoryTypeId="2" PostId="7361" RevisionGUID="82cd596e-6a5e-4e4b-939d-436a81f07b2f" CreationDate="2023-02-26T05:40:53.497" UserId="576" Text="Trying to upload contract to node via cli but occur error.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# Run contract-node &#xD;&#xA;./target/release/substrate-contracts-node --dev --tmp --ws-external --rpc-cors all&#xD;&#xA;&#xD;&#xA;# build contract&#xD;&#xA;cargo contract new flipper&#xD;&#xA;cd flipper&#xD;&#xA;cargo contract build --release&#xD;&#xA;&#xD;&#xA;# upload contract&#xD;&#xA;cargo contract upload --suri //Alice&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;&gt;&gt; ERROR: Metadata: Node metadata is not fully compatible &#xD;&#xA;    Caused by:&#xD;&#xA;    Node metadata is not fully compatible&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;&gt;&gt; ERROR tokio-runtime-worker jsonrpsee_server::transport::ws: WS transport error: i/o error: Transport endpoint is not connected (os error 107); terminate connection: 5&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28074" PostHistoryTypeId="1" PostId="7361" RevisionGUID="82cd596e-6a5e-4e4b-939d-436a81f07b2f" CreationDate="2023-02-26T05:40:53.497" UserId="576" Text="ink! contract upload error" ContentLicense="CC BY-SA 4.0" />
  <row Id="28075" PostHistoryTypeId="3" PostId="7361" RevisionGUID="82cd596e-6a5e-4e4b-939d-436a81f07b2f" CreationDate="2023-02-26T05:40:53.497" UserId="576" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28076" PostHistoryTypeId="2" PostId="7362" RevisionGUID="b33363d1-1215-4254-96fa-bd0762879190" CreationDate="2023-02-26T08:07:49.347" UserId="106" Text="I'm writing a dApp which helps polkadot users to create a DID on Kilt. In order to create a DID, the SDK requires two arguments `authentication` and `keyAgreement` the code for `generateKeypairs` is below this code fragment&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;export function createLightDid(): Kilt.DidDocument {&#xD;&#xA;  const mnemonic: string = &quot;aisle limb real hedgehog legend control unknown limit gain reason run knife&quot;&#xD;&#xA;&#xD;&#xA;  const { authentication, keyAgreement } = generateKeypairs(mnemonic)&#xD;&#xA;&#xD;&#xA;  const lightDID: Kilt.DidDocument = Kilt.Did.createLightDidDocument({&#xD;&#xA;    authentication: [ authentication as Kilt.NewLightDidVerificationKey ],&#xD;&#xA;    keyAgreement: [ keyAgreement ]&#xD;&#xA;  })&#xD;&#xA;  console.log(lightDID)&#xD;&#xA;&#xD;&#xA;  return lightDID&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I was able to figure out how to get these from a mnemonic:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;export function generateAccount(mnemonic = mnemonicGenerate()): {&#xD;&#xA;  account: Kilt.KiltKeyringPair&#xD;&#xA;  mnemonic: string&#xD;&#xA;} {&#xD;&#xA;  const keyring = new Kilt.Utils.Keyring({&#xD;&#xA;    ss58Format: 38,&#xD;&#xA;    type: 'sr25519'&#xD;&#xA;  })&#xD;&#xA;  return {&#xD;&#xA;    account: keyring.addFromMnemonic(mnemonic) as Kilt.KiltKeyringPair,&#xD;&#xA;    mnemonic&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function generateKeyAgreement(mnemonic: string) {&#xD;&#xA;  const secretKeyPair = sr25519PairFromSeed(mnemonicToMiniSecret(mnemonic))&#xD;&#xA;  const { path } = keyExtractPath('//did//keyAgreement//0')&#xD;&#xA;  const { secretKey } = keyFromPath(secretKeyPair, path, 'sr25519')&#xD;&#xA;  return Kilt.Utils.Crypto.makeEncryptionKeypairFromSeed(blake2AsU8a(secretKey))&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;export function generateKeypairs(mnemonic = mnemonicGenerate()) {&#xD;&#xA;  const { account } = generateAccount(mnemonic)&#xD;&#xA;&#xD;&#xA;  const authentication = {&#xD;&#xA;    ...account.derive('//did//0'),&#xD;&#xA;    type: 'sr25519'&#xD;&#xA;  } as Kilt.KiltKeyringPair&#xD;&#xA;&#xD;&#xA;  const keyAgreement = generateKeyAgreement(mnemonic)&#xD;&#xA;&#xD;&#xA;  return {&#xD;&#xA;    authentication: authentication,&#xD;&#xA;    keyAgreement: keyAgreement&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;my question is: &#xD;&#xA;&gt; how can I get the two values `authentication` and `keyAgreement` without a mnemonic?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28078" PostHistoryTypeId="1" PostId="7362" RevisionGUID="b33363d1-1215-4254-96fa-bd0762879190" CreationDate="2023-02-26T08:07:49.347" UserId="106" Text="getting authentication and keyAgreement from sporran or polkadot.js extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="28079" PostHistoryTypeId="3" PostId="7362" RevisionGUID="b33363d1-1215-4254-96fa-bd0762879190" CreationDate="2023-02-26T08:07:49.347" UserId="106" Text="|polkadot-js|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28080" PostHistoryTypeId="5" PostId="435" RevisionGUID="0b0a6f65-61f8-4484-952f-e2620e72f40f" CreationDate="2023-02-26T10:46:26.357" UserId="49" Comment="Replace explired link with permalink" Text="You can use the `revert` command to revert unfinalized blocks. If you need to revert finalized blocks then I suggest you do the following:&#xD;&#xA;- Assuming you want to revert to block #42;&#xD;&#xA;- Add the hash of block #43 to the chain spec under `badBlocks` (example: https://raw.githubusercontent.com/paritytech/polkadot/a4931d93388688af2e39e1aca77a6dcefd4bbd10/node/service/chain-specs/kusama.json);&#xD;&#xA;- Sync a node from scratch and it should stop importing blocks after #42 (since #43 is blacklisted it will fail to import);&#xD;&#xA;- You can now deploy this database to other validators and they should start authoring (and finalizing on top of #42). Alternatively you can also just resync using the new chain spec;&#xD;&#xA;- Since you are reverting finality all clients on the network will need to resync (using the new chainspec with `badBlocks` populated)." ContentLicense="CC BY-SA 4.0" />
  <row Id="28081" PostHistoryTypeId="24" PostId="435" RevisionGUID="0b0a6f65-61f8-4484-952f-e2620e72f40f" CreationDate="2023-02-26T10:46:26.357" Comment="Proposed by 49 approved by 34 edit id of 385" ContentLicense="CC BY-SA 4.0" />
  <row Id="28082" PostHistoryTypeId="2" PostId="7363" RevisionGUID="e761fd33-4080-4e53-94a7-68f347ddd698" CreationDate="2023-02-26T12:20:01.763" UserId="2163" Text="IIUC the `execute` extrinsic allows a member of the collective to execute a proposal with the `Member` origin. But what I do not understand is for what purpose this could be used. I couldn't find any use cases of this inside the substrate codebase and there aren't any tests inside the pallet that use this extrinsic." ContentLicense="CC BY-SA 4.0" />
  <row Id="28084" PostHistoryTypeId="1" PostId="7363" RevisionGUID="e761fd33-4080-4e53-94a7-68f347ddd698" CreationDate="2023-02-26T12:20:01.763" UserId="2163" Text="What is the use case of the `execute` extrinsic inside the collective pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28085" PostHistoryTypeId="3" PostId="7363" RevisionGUID="e761fd33-4080-4e53-94a7-68f347ddd698" CreationDate="2023-02-26T12:20:01.763" UserId="2163" Text="|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28086" PostHistoryTypeId="5" PostId="7363" RevisionGUID="cd4e1c57-c80f-4423-84d7-82145f61e7ad" CreationDate="2023-02-26T13:09:46.780" UserId="2163" Comment="deleted 4 characters in body" Text="IIUC the `execute` extrinsic allows a member of the collective to execute a call with the `Member` origin, but at that point why wouldn't the caller directly execute the call? I couldn't find any use cases of this inside the substrate codebase and there aren't any tests inside the pallet that use this extrinsic." ContentLicense="CC BY-SA 4.0" />
  <row Id="28087" PostHistoryTypeId="2" PostId="7364" RevisionGUID="d3d963ca-ff02-4dfc-afcc-b615dd4c2af0" CreationDate="2023-02-26T18:26:57.027" UserId="3030" Text="I was looking at setting up a nice testing workflow and was wondering if anyone could recommend one over the other.&#xD;&#xA;&#xD;&#xA;They seem quite similar from a beginners point of view so it would be nice to hear from someone with some insight&#xD;&#xA;&#xD;&#xA;Felix" ContentLicense="CC BY-SA 4.0" />
  <row Id="28089" PostHistoryTypeId="1" PostId="7364" RevisionGUID="d3d963ca-ff02-4dfc-afcc-b615dd4c2af0" CreationDate="2023-02-26T18:26:57.027" UserId="3030" Text="zombienet vs parachain launch" ContentLicense="CC BY-SA 4.0" />
  <row Id="28090" PostHistoryTypeId="3" PostId="7364" RevisionGUID="d3d963ca-ff02-4dfc-afcc-b615dd4c2af0" CreationDate="2023-02-26T18:26:57.027" UserId="3030" Text="|zombienet|polkadot-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28091" PostHistoryTypeId="2" PostId="7365" RevisionGUID="4a1a2ed0-7a2d-430e-ab71-a91df069bf73" CreationDate="2023-02-27T03:10:17.063" UserId="28" Text="I found a partial answer back in the slides:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Comparison with other approaches&#xD;&#xA;&#xD;&#xA;    - Both Danksharding and Celestia use 2D encoding and DAS&#xD;&#xA;    - Celestia doesn't implement data sharding&#xD;&#xA;    - Data availability is only part of ensuring validity&#xD;&#xA;    - Polkadot's DA is able to process dozens of MB per second&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the speaker notes:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Danksharding is aiming at 1.3 MB/s and Celestia &lt; 1 MB/s.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28093" PostHistoryTypeId="2" PostId="7366" RevisionGUID="c194a12d-d3ea-4e2c-8be4-b8685ed84adf" CreationDate="2023-02-27T06:28:29.320" UserId="354" Text="I have deployed a wasm smart contract on chain using version `polkadot-v0.9.36`, after deploying the contract when I tried to execute its function i got error out of gas as shown below. [![error][1]][1]&#xD;&#xA;&#xD;&#xA;When I tried the read function it was also not working as shown below[![error2][2]][2]&#xD;&#xA;&#xD;&#xA;Can anyone help me with these errors?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7BgKf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/nyDIP.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="28095" PostHistoryTypeId="1" PostId="7366" RevisionGUID="c194a12d-d3ea-4e2c-8be4-b8685ed84adf" CreationDate="2023-02-27T06:28:29.320" UserId="354" Text="While executing contracts functions getting out of gas error" ContentLicense="CC BY-SA 4.0" />
  <row Id="28096" PostHistoryTypeId="3" PostId="7366" RevisionGUID="c194a12d-d3ea-4e2c-8be4-b8685ed84adf" CreationDate="2023-02-27T06:28:29.320" UserId="354" Text="|polkadot|substrate-contracts-node|contracts|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28097" PostHistoryTypeId="2" PostId="7367" RevisionGUID="3a964491-5097-4e8f-a5d5-bb1657340deb" CreationDate="2023-02-27T06:50:28.170" UserId="3878" Text="Right now it is problem with Polkadot.js itself, you can check this issue: https://github.com/polkadot-js/apps/issues/8364" ContentLicense="CC BY-SA 4.0" />
  <row Id="28099" PostHistoryTypeId="2" PostId="7368" RevisionGUID="b92e359a-1bad-4453-89f4-234e4b58ed8f" CreationDate="2023-02-27T08:02:46.763" UserId="354" Text="Issue is with polkadotjs UI, they have not yet implemented `v2Weights` completely in UI, instead use [contracts-ui][1] to check the functionalities and interact with your contracts, which is working fine as of now.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/contracts-ui/tree/master" ContentLicense="CC BY-SA 4.0" />
  <row Id="28101" PostHistoryTypeId="2" PostId="7369" RevisionGUID="8ba835f8-dca4-406e-aea6-d1449db1c7e5" CreationDate="2023-02-27T08:27:40.157" UserId="3418" Text="We are running a substrate private blockchain network. We are able to add a total of 8 nodes but are not able to increase more than that.&#xD;&#xA;&#xD;&#xA;Is there a way we can increase the no of nodes in the same network?&#xD;&#xA;&#xD;&#xA;Thanks in Advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="28103" PostHistoryTypeId="1" PostId="7369" RevisionGUID="8ba835f8-dca4-406e-aea6-d1449db1c7e5" CreationDate="2023-02-27T08:27:40.157" UserId="3418" Text="How to setup Substrate Private network to support more than 10 nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="28104" PostHistoryTypeId="3" PostId="7369" RevisionGUID="8ba835f8-dca4-406e-aea6-d1449db1c7e5" CreationDate="2023-02-27T08:27:40.157" UserId="3418" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28105" PostHistoryTypeId="2" PostId="7370" RevisionGUID="66ceed5b-0ef5-4231-b53d-57b28ed1d67c" CreationDate="2023-02-27T09:25:36.173" UserId="73" Text="&gt; Hardcoded validators in the chain_spec file could be a target for Ddos attacks among others.&#xD;&#xA;&#xD;&#xA;You could bring this argument also later when the chain is already running. &#xD;&#xA;&#xD;&#xA;&gt; Are there any security reasons or advantages to having initial voters specified in the chain_spec file?&#xD;&#xA;&#xD;&#xA;The advantage being that your blocks are being finalized. If you create a chain with deterministic finality, you should get deterministic finality from genesis. Having them declared in the genesis chain spec also doesn't increases the chances of Ddosing them. " ContentLicense="CC BY-SA 4.0" />
  <row Id="28107" PostHistoryTypeId="2" PostId="7371" RevisionGUID="1e4e5e35-c9e4-4133-a239-a4344e0753ac" CreationDate="2023-02-27T10:04:20.027" UserId="251" Text="Did you use auto-discovery?&#xD;&#xA;&#xD;&#xA;I encountered this before, but I'm not sure if they were caused by the same reason.&#xD;&#xA;&#xD;&#xA;Try:&#xD;&#xA;1. setting up a bootnode and use `--bootnodes`&#xD;&#xA;2. manually setting up the `--port` for each of them" ContentLicense="CC BY-SA 4.0" />
  <row Id="28109" PostHistoryTypeId="2" PostId="7372" RevisionGUID="ee8aff2a-6e67-4db4-948d-83e46ef16ec0" CreationDate="2023-02-27T10:29:06.900" UserId="2762" Text="As you said for beginners point of view the are very similar, so is up to you which with one you feel more comfortable and which one is easier for you.&#xD;&#xA;&#xD;&#xA;You can read [this discussion on the Polkadot forum][6] where there is a comparation of both.&#xD;&#xA;&#xD;&#xA;For me personally I use Zombienet but simply because I found better documentation: [zombienet][1], [Zombienet Walkthrough | Sub0 2022][2] and [Simulate parachains in a test network][3] and more examples about how to use it like [zombienet repo][4] and [trappist][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/zombienet/blob/main/README.md&#xD;&#xA;  [2]: https://www.youtube.com/watch?v=QKTZZCpdGH4&#xD;&#xA;  [3]: https://docs.substrate.io/test/simulate-parachains/&#xD;&#xA;  [4]: https://github.com/paritytech/zombienet/tree/main/examples&#xD;&#xA;  [5]: https://github.com/paritytech/trappist&#xD;&#xA;  [6]: https://forum.polkadot.network/t/chopsticks-substrate-testing-client/878/9" ContentLicense="CC BY-SA 4.0" />
  <row Id="28111" PostHistoryTypeId="2" PostId="7373" RevisionGUID="34b9080f-36f9-4f37-84a6-4897fe32b978" CreationDate="2023-02-27T10:29:34.107" UserId="73" Text="This shows the &quot;beauty&quot; of FRAME ;) Jokes aside, you could use this to configure a pallet to only allow members of some collective to issue calls. &#xD;&#xA;The collective pallet already provides you with [`EnsureMember`][1] which implements [`EnsureOrigin`][2] that ensures that only members of the collective are allowed to issue calls.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/pallet-collective/latest/pallet_collective/struct.EnsureMember.html&#xD;&#xA;  [2]: https://docs.rs/frame-support/latest/frame_support/traits/trait.EnsureOrigin.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="28113" PostHistoryTypeId="2" PostId="7374" RevisionGUID="698c47b0-2361-44f8-8b32-faab4562d237" CreationDate="2023-02-27T11:12:14.627" UserId="2762" Text="Checking the [code][1] of the @kiltprotocol/sdk-js library what you are looking for here is for the types `NewLightDidVerificationKey` and `NewDidEncryptionKey` you need to generate them from your keys, like you did (using the mnemonic).&#xD;&#xA;&#xD;&#xA;If you have your public key stored and you know the type for the DID encryption key you can get create the types `NewLightDidVerificationKey` and `NewDidEncryptionKey` manually.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/**&#xD;&#xA; * Type of a new key material to add under a DID.&#xD;&#xA; */&#xD;&#xA;export type BaseNewDidKey = {&#xD;&#xA;  publicKey: Uint8Array&#xD;&#xA;  type: string&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * Type of a new verification key to add under a DID.&#xD;&#xA; */&#xD;&#xA;export type NewDidVerificationKey = BaseNewDidKey &amp; {&#xD;&#xA;  type: VerificationKeyType&#xD;&#xA;}&#xD;&#xA;/**&#xD;&#xA; * A new public key specified when creating a new light DID.&#xD;&#xA; */&#xD;&#xA;export type NewLightDidVerificationKey = NewDidVerificationKey &amp; {&#xD;&#xA;  type: LightDidSupportedVerificationKeyType&#xD;&#xA;}&#xD;&#xA;/**&#xD;&#xA; * Type of a new encryption key to add under a DID.&#xD;&#xA; */&#xD;&#xA;export type NewDidEncryptionKey = BaseNewDidKey &amp; { type: EncryptionKeyType }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/KILTprotocol/sdk-js/blob/develop/packages/types/src/DidDocument.ts" ContentLicense="CC BY-SA 4.0" />
  <row Id="28115" PostHistoryTypeId="2" PostId="7375" RevisionGUID="1c5e0f08-1cd2-4511-97f6-10ea761fc5f6" CreationDate="2023-02-27T11:16:27.980" UserId="2762" Text="This is an issue with the versions (check the pallet-contracts version of your substrate-contracts-node ). &#xD;&#xA;From [this issue][1] on the cargo-contract repository.&#xD;&#xA;&#xD;&#xA;&gt; The &quot;Node metadata is not fully compatible&quot; means that the instantiate call is not compatible with the version of pallet_contracts you are using. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/616" ContentLicense="CC BY-SA 4.0" />
  <row Id="28117" PostHistoryTypeId="5" PostId="7369" RevisionGUID="3026aa84-cdd1-445e-9413-905472a19a9a" CreationDate="2023-02-27T12:29:23.897" UserId="3418" Comment="added 204 characters in body; edited title" Text="We are running a substrate private blockchain network. We are able to add a total of 8 nodes but are not able to increase more than that.&#xD;&#xA;&#xD;&#xA;For the 9th node: 9th node is not starting to sync after performing node authorizing. So here I am trying to understand do we have any limit in the no of connecting nodes in Substrate private network.&#xD;&#xA;&#xD;&#xA;Is there a way we can increase the no of nodes in the same network?&#xD;&#xA;&#xD;&#xA;Thanks in Advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="28118" PostHistoryTypeId="4" PostId="7369" RevisionGUID="3026aa84-cdd1-445e-9413-905472a19a9a" CreationDate="2023-02-27T12:29:23.897" UserId="3418" Comment="added 204 characters in body; edited title" Text="How to setup Substrate Private network to support more than 8 nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="28119" PostHistoryTypeId="5" PostId="7369" RevisionGUID="3818a590-4682-4d7b-a966-8d139924b098" CreationDate="2023-02-27T12:31:49.370" UserId="3418" Comment="added 6 characters in body" Text="We are running a substrate private blockchain network. We are able to add a total of 8 nodes but are not able to increase more than that.&#xD;&#xA;&#xD;&#xA;For the 9th node: 9th node is not starting to sync after performing node authorization. So here I am trying to understand do we have any limit in the no of connecting nodes in Substrate private network.&#xD;&#xA;&#xD;&#xA;And Is there a way we can increase the no of nodes in the same network?&#xD;&#xA;&#xD;&#xA;Thanks in Advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="28120" PostHistoryTypeId="2" PostId="7376" RevisionGUID="e55990d3-2491-4211-bf05-004a58f4d979" CreationDate="2023-02-27T12:48:00.547" UserId="3440" Text="I have a mapping with 0 to 10. I have values stored in this mapping. If I want to get the information stored on map&lt;5&gt; it gives me the details. Is it possible to get the transaction id and block in which this information is stored using either ink or polkadot-js " ContentLicense="CC BY-SA 4.0" />
  <row Id="28122" PostHistoryTypeId="1" PostId="7376" RevisionGUID="e55990d3-2491-4211-bf05-004a58f4d979" CreationDate="2023-02-27T12:48:00.547" UserId="3440" Text="Retriving the transaction details of a mapping" ContentLicense="CC BY-SA 4.0" />
  <row Id="28123" PostHistoryTypeId="3" PostId="7376" RevisionGUID="e55990d3-2491-4211-bf05-004a58f4d979" CreationDate="2023-02-27T12:48:00.547" UserId="3440" Text="|polkadot-js|ink|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28124" PostHistoryTypeId="2" PostId="7377" RevisionGUID="7fb4b86d-a2d7-471e-bcf8-b13f4d9753d5" CreationDate="2023-02-27T13:44:05.237" UserId="2961" Text="I encountered a similar issue when upgrading to the latest version of substrate and ink smart contracts. Let me tell you what worked for me. &#xD;&#xA;&#xD;&#xA;Initially, when deploying a smart contract I would have a gasLimit as a number&#xD;&#xA;&#xD;&#xA;      const code = new CodePromise(api, abi, wasm);&#xD;&#xA;      const gasLimit = 300000000000n;&#xD;&#xA;      code.tx&#xD;&#xA;        .new(&#xD;&#xA;          { gasLimit, salt: randomAsHex() },&#xD;&#xA;          initialSupply,&#xD;&#xA;          price,&#xD;&#xA;          owner,&#xD;&#xA;          date,&#xD;&#xA;          redeemableAddress,&#xD;&#xA;          purchaseTrackerAddress&#xD;&#xA;        )&#xD;&#xA;&#xD;&#xA;But this was giving me the outOfGas error, I would increase this limit until it would exhaust the block limit so that was no good. I did see that I could deploy the contract on the contracts-ui (https://contracts-ui.substrate.io/).  Which was great! They declare the gasLimit like this:&#xD;&#xA;&#xD;&#xA;    	const code = new CodePromise(api, abi, wasm);&#xD;&#xA;      const gasLimit = api.registry.createType(&quot;WeightV2&quot;, {&#xD;&#xA;        refTime: 300000000000n,&#xD;&#xA;        proofSize: 262144,&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;      code.tx&#xD;&#xA;        .new(&#xD;&#xA;          { gasLimit, salt: randomAsHex() },&#xD;&#xA;          initialSupply,&#xD;&#xA;          price,&#xD;&#xA;          owner,&#xD;&#xA;          date,&#xD;&#xA;          redeemableAddress,&#xD;&#xA;          purchaseTrackerAddress&#xD;&#xA;        )&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I would recommend uploading your contract to the contract UI and it will tell you what refTime and proofSize values you should use.&#xD;&#xA;&#xD;&#xA;Hope this solves your problem!" ContentLicense="CC BY-SA 4.0" />
  <row Id="28126" PostHistoryTypeId="2" PostId="7378" RevisionGUID="befff757-4379-4aff-b778-a74e62f4c6de" CreationDate="2023-02-27T14:18:17.023" UserId="2762" Text="Not directly. If you want to know in which block the storage changed you would have to scan the Blockchain to try to find the extrinsic that make this storage change. &#xD;&#xA;You can do that using for example the Subscan API to query the [events][1] and filtering with the event your pallet emits after store the data in your storage or if you are not emitting events just querying the [extrinsics][2].&#xD;&#xA;&#xD;&#xA;But is more efficient to store the Transaction Hash that you get after the `signAndSend` function in PolkadotJS, or event better the unique identifier of the transaction (see the explanation in this [StackExchange old question][3]) which is the `block# + the extrinsic index in that block` (See [this old response on StackExchange][4] to see how to get it using PolkadotJS).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.subscan.io/#events&#xD;&#xA;  [2]: https://support.subscan.io/#extrinsics&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/2536/why-could-we-find-the-same-transaction-hash-in-3-different-blocks/2538#2538&#xD;&#xA;  [4]: https://substrate.stackexchange.com/a/6899/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="28132" PostHistoryTypeId="2" PostId="7380" RevisionGUID="b5383ea9-48ea-462f-8873-25b3daa48515" CreationDate="2023-02-27T15:56:29.230" UserId="2909" Text="This is regarding the democracy pallet and referenda proposal:&#xD;&#xA;&#xD;&#xA;When submitting the proposal, a deposit needs to be defined where the MinimumDeposit config can be used to set the minimum amount to be deposited. Although we've set it inside our democracy config, Subscan shows that the deposit is of value 0. Can someone point out to the correct configuration for the minimum deposit?&#xD;&#xA;&#xD;&#xA;[![Subscan screenshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/h1aYV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="28134" PostHistoryTypeId="1" PostId="7380" RevisionGUID="b5383ea9-48ea-462f-8873-25b3daa48515" CreationDate="2023-02-27T15:56:29.230" UserId="2909" Text="Help configuring the democracy pallet and referenda proposal" ContentLicense="CC BY-SA 4.0" />
  <row Id="28135" PostHistoryTypeId="3" PostId="7380" RevisionGUID="b5383ea9-48ea-462f-8873-25b3daa48515" CreationDate="2023-02-27T15:56:29.230" UserId="2909" Text="|pallet|democracy|configuration|config|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28136" PostHistoryTypeId="2" PostId="7381" RevisionGUID="4fd02084-9e38-4411-934f-6d47b1781b5a" CreationDate="2023-02-27T15:57:48.360" UserId="3439" Text="I generated the secretKey and publicKey using the steps in https://polkadot.js.org/docs/keyring/start/create/.&#xD;&#xA;&#xD;&#xA;After I get the secretKey and publicKey, I want to sign a tx using only the secretKey. How do I do that?&#xD;&#xA;I have tried to use keyring, but what is the `addFrom...` method that I use for secretKey? I have tried using the `addFromSeed`, but it produces error `Bad seed size`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This is the gist of the code I use&#xD;&#xA;```&#xD;&#xA;import { Keyring } from '@polkadot/api'&#xD;&#xA;import {&#xD;&#xA;  mnemonicGenerate,&#xD;&#xA;  mnemonicToMiniSecret,&#xD;&#xA;  ed25519PairFromSeed,&#xD;&#xA;} from '@polkadot/util-crypto'&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;  // Create mnemonic string for Alice using BIP39&#xD;&#xA;  const mnemonicAlice = mnemonicGenerate()&#xD;&#xA;  // Create valid Substrate-compatible seed from mnemonic&#xD;&#xA;  const seedAlice = mnemonicToMiniSecret(mnemonicAlice)&#xD;&#xA;  // Generate new public/secret keypair for Alice from the supplied seed&#xD;&#xA;  const { publicKey, secretKey } = ed25519PairFromSeed(seedAlice)&#xD;&#xA;  const keyring = new Keyring()&#xD;&#xA;  const pair = keyring.addFromSeed(secretKey, { name: 'first pair' }, 'ed25519') // this results in error&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/X7tUi.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="28138" PostHistoryTypeId="1" PostId="7381" RevisionGUID="4fd02084-9e38-4411-934f-6d47b1781b5a" CreationDate="2023-02-27T15:57:48.360" UserId="3439" Text="How to sign a transaction using secretKey with polkadot/api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28139" PostHistoryTypeId="3" PostId="7381" RevisionGUID="4fd02084-9e38-4411-934f-6d47b1781b5a" CreationDate="2023-02-27T15:57:48.360" UserId="3439" Text="|polkadot-js|keyring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28140" PostHistoryTypeId="5" PostId="7381" RevisionGUID="0bd583e5-8aca-4aa2-be75-92b81e18c8a1" CreationDate="2023-02-27T15:58:43.230" UserId="3439" Comment="edited body" Text="I generated the secretKey and publicKey using the steps in https://polkadot.js.org/docs/keyring/start/create/.&#xD;&#xA;&#xD;&#xA;After I get the secretKey and publicKey, I want to sign a tx using only the secretKey. How do I do that?&#xD;&#xA;I have tried to use keyring, but what is the `addFrom...` method that I use for secretKey? I have tried using the `addFromSeed`, but it produces error `Bad seed size`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This is the gist of the code I use&#xD;&#xA;```&#xD;&#xA;import { Keyring } from '@polkadot/api'&#xD;&#xA;import {&#xD;&#xA;  mnemonicGenerate,&#xD;&#xA;  mnemonicToMiniSecret,&#xD;&#xA;  ed25519PairFromSeed,&#xD;&#xA;} from '@polkadot/util-crypto'&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;  // Create mnemonic string for Alice using BIP39&#xD;&#xA;  const mnemonicAlice = mnemonicGenerate()&#xD;&#xA;  // Create valid Substrate-compatible seed from mnemonic&#xD;&#xA;  const seedAlice = mnemonicToMiniSecret(mnemonicAlice)&#xD;&#xA;  // Generate new public/secret keypair for Alice from the supplied seed&#xD;&#xA;  const { publicKey, secretKey } = ed25519PairFromSeed(seedAlice)&#xD;&#xA;  const keyring = new Keyring()&#xD;&#xA;  const pair = keyring.addFromSeed(secretKey, { name: 'first pair' }, 'ed25519') // this results in error&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/gDOsj.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="28141" PostHistoryTypeId="2" PostId="7382" RevisionGUID="ebec9bb7-b9b5-46a7-911b-71bd23f96cad" CreationDate="2023-02-27T16:03:53.257" UserId="2909" Text="The following is a current issue when migrating from a Solochain to a Parachain (presently as a test on the Rococo relay chain):&#xD;&#xA;&#xD;&#xA;On the Rococo chain, we are unable to produce new blocks - it is throwing the `Discarding slot xxx, block production took too long`. It is happening because of some operation(s) are happening on the `on_initialize` hook which might be taking more weights than expected. However with the same code, our solo chain is seems to be working fine. Any help will be appreciated.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28143" PostHistoryTypeId="1" PostId="7382" RevisionGUID="ebec9bb7-b9b5-46a7-911b-71bd23f96cad" CreationDate="2023-02-27T16:03:53.257" UserId="2909" Text="Solochain to Parachain Block Production Problem - &quot;Discarding slot xxx, block production took too long&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28144" PostHistoryTypeId="3" PostId="7382" RevisionGUID="ebec9bb7-b9b5-46a7-911b-71bd23f96cad" CreationDate="2023-02-27T16:03:53.257" UserId="2909" Text="|parachain|rococo|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28145" PostHistoryTypeId="5" PostId="7381" RevisionGUID="b0ad09e1-c4ed-4b44-ab21-90a7cc6fb3eb" CreationDate="2023-02-27T16:05:38.310" UserId="3439" Comment="added 10 characters in body" Text="I generated the secretKey and publicKey using the steps in https://polkadot.js.org/docs/keyring/start/create/.&#xD;&#xA;&#xD;&#xA;After I get the secretKey and publicKey, I want to sign a tx using only the secretKey. How do I do that?&#xD;&#xA;I have tried to use keyring, but what is the `addFrom...` method that I use for secretKey? I have tried using the `addFromSeed`, but it produces error `Bad seed size`&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This is the gist of the code I use&#xD;&#xA;```typescript&#xD;&#xA;import { Keyring } from '@polkadot/api'&#xD;&#xA;import {&#xD;&#xA;  mnemonicGenerate,&#xD;&#xA;  mnemonicToMiniSecret,&#xD;&#xA;  ed25519PairFromSeed,&#xD;&#xA;} from '@polkadot/util-crypto'&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;  // Create mnemonic string for Alice using BIP39&#xD;&#xA;  const mnemonicAlice = mnemonicGenerate()&#xD;&#xA;  // Create valid Substrate-compatible seed from mnemonic&#xD;&#xA;  const seedAlice = mnemonicToMiniSecret(mnemonicAlice)&#xD;&#xA;  // Generate new public/secret keypair for Alice from the supplied seed&#xD;&#xA;  const { publicKey, secretKey } = ed25519PairFromSeed(seedAlice)&#xD;&#xA;  const keyring = new Keyring()&#xD;&#xA;  const pair = keyring.addFromSeed(secretKey, { name: 'first pair' }, 'ed25519') // this results in error&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/gDOsj.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="28146" PostHistoryTypeId="2" PostId="7383" RevisionGUID="85146df7-79ef-4688-9a8f-04a7b03aaab3" CreationDate="2023-02-27T16:07:22.600" UserId="2909" Text="What is the most relaxed and fastest consensus implementations for Substrate? I am considering to use something much faster and lightweight for processing of social messaging on Subsocial's L2 blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="28148" PostHistoryTypeId="1" PostId="7383" RevisionGUID="85146df7-79ef-4688-9a8f-04a7b03aaab3" CreationDate="2023-02-27T16:07:22.600" UserId="2909" Text="Lightweight consensus implementation for Substrate in production?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28149" PostHistoryTypeId="3" PostId="7383" RevisionGUID="85146df7-79ef-4688-9a8f-04a7b03aaab3" CreationDate="2023-02-27T16:07:22.600" UserId="2909" Text="|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28150" PostHistoryTypeId="2" PostId="7384" RevisionGUID="a8692c2c-21f0-49f4-a19c-2ab595b45ac4" CreationDate="2023-02-27T16:19:27.817" UserId="3439" Text="I found out the problem, so the problem is, I thought secretKey generated from `ed25519PairFromSeed` is equivalent to the private key that can be exported from for example metamask.&#xD;&#xA;&#xD;&#xA;But actually, the `seedAlice` I think is the equivalent one, so I can just use:&#xD;&#xA;```typescript&#xD;&#xA;const secretKey = Buffer.from(seedAlice).toString('hex')&#xD;&#xA;```&#xD;&#xA;and use keyring to get the signer&#xD;&#xA;```&#xD;&#xA;const keyPair = keyring.addFromSeed(seedAlice, { name: 'first pair' }, 'ed25519')&#xD;&#xA;// and you can use this keyPair to send tx&#xD;&#xA;api.tx.balance.transfer(...).signAndSend(keyPair)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="28152" PostHistoryTypeId="5" PostId="7384" RevisionGUID="99d08f59-a4e2-4b18-a10d-686e6e2627cc" CreationDate="2023-02-27T16:20:03.840" UserId="3439" Comment="added 3 characters in body" Text="I found out the problem, so the problem is, I thought secretKey generated from `ed25519PairFromSeed` is equivalent to the private key that can be exported from for example metamask.&#xD;&#xA;&#xD;&#xA;But actually, the `seedAlice` I think is the equivalent one, so I can just use:&#xD;&#xA;```typescript&#xD;&#xA;const secretKey = Buffer.from(seedAlice).toString('hex')&#xD;&#xA;```&#xD;&#xA;and use keyring to sign transactions&#xD;&#xA;```&#xD;&#xA;const keyPair = keyring.addFromSeed(seedAlice, { name: 'first pair' }, 'ed25519')&#xD;&#xA;// and you can use this keyPair to send tx&#xD;&#xA;api.tx.balance.transfer(...).signAndSend(keyPair)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="28153" PostHistoryTypeId="2" PostId="7385" RevisionGUID="6eb8fa8b-9521-48c6-aab4-348b0e41d6a0" CreationDate="2023-02-27T16:33:58.677" UserId="73" Text="When running as a solo chain you having currently more time to produce a block. If you are using the default 6 seconds, you have 2 seconds to build the block. For a parachain you currently have in maximum 500ms to build the block. So, only 1/4 of the time your solo chain has. Whatever the `on_initialize` is doing, it should be doing less. There isn't that much what you can do instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="28155" PostHistoryTypeId="2" PostId="7386" RevisionGUID="a0618d68-0215-4fe7-a2c2-5cf3107b6959" CreationDate="2023-02-27T17:22:52.000" UserId="29" Text="There are trade-offs. I would recommend you start by reading:&#xD;&#xA;- https://docs.substrate.io/fundamentals/consensus&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-consensus&#xD;&#xA;&#xD;&#xA;Especially this post:&#xD;&#xA;- https://substrate.stackexchange.com/questions/204/what-is-the-difference-between-babe-aura-and-grandpa&#xD;&#xA;&#xD;&#xA;Additional resources:&#xD;&#xA;- https://github.com/paritytech/substrate/tree/master/client/consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="28157" PostHistoryTypeId="5" PostId="1097" RevisionGUID="5e4ed702-2f98-4503-aa7f-421bdc5483bb" CreationDate="2023-02-27T17:22:59.787" UserId="29" Comment="added 1 character in body" Text="There is a short nice write up on consensus here:&#xD;&#xA;- https://docs.substrate.io/fundamentals/consensus&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-consensus&#xD;&#xA;&#xD;&#xA;If you're looking for more detailed info:&#xD;&#xA;&#xD;&#xA;**PoW**&#xD;&#xA;- https://paritytech.github.io/substrate/latest/sc_consensus_pow&#xD;&#xA;&#xD;&#xA;**Aura**&#xD;&#xA;- https://paritytech.github.io/substrate/latest/sc_consensus_aura&#xD;&#xA;&#xD;&#xA;**BABE**/**GRANDPA**&#xD;&#xA;- https://paritytech.github.io/substrate/latest/sc_consensus_babe&#xD;&#xA;- https://research.web3.foundation/en/latest/polkadot/block-production.html&#xD;&#xA;- https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html&#xD;&#xA;- https://polkadot.network/blog/polkadot-consensus-part-1-introduction&#xD;&#xA;- https://polkadot.network/blog/polkadot-consensus-part-2-grandpa&#xD;&#xA;- https://polkadot.network/blog/polkadot-consensus-part-3-babe&#xD;&#xA;- https://research.web3.foundation/en/latest/polkadot/finality.html&#xD;&#xA;- https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf&#xD;&#xA;&#xD;&#xA;This may be of interest to you:&#xD;&#xA;- https://github.com/paritytech/substrate/tree/master/client/consensus&#xD;&#xA;&#xD;&#xA;As @Squirrel noted, several of these are covered in [this post](https://substrate.stackexchange.com/questions/204/what-is-the-difference-between-babe-aura-and-grandpa).&#xD;&#xA;&#xD;&#xA;Videos are nice too:&#xD;&#xA;- [Block Production and Finalization in Polkadot by Bill Laboon](https://www.youtube.com/watch?v=FiEAnVECa8c)&#xD;&#xA;- [Manual Seal &amp; Instant Seal](https://www.youtube.com/watch?v=uhkV0jAcWDY)&#xD;&#xA;- [Consensus in Substrate with Rob](https://www.youtube.com/watch?v=QE8svRKVYOU&amp;t=727s)" ContentLicense="CC BY-SA 4.0" />
  <row Id="28158" PostHistoryTypeId="2" PostId="7387" RevisionGUID="130b8717-da99-45bb-9d5b-c016e9b599d0" CreationDate="2023-02-27T17:27:10.410" UserId="29" Text="Looks like it is in the referenda config:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// The **minimum** amount to be used as a deposit for a public referendum proposal.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type SubmissionDeposit: Get&lt;BalanceOf&lt;Self, I&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/1cbb2ef4f2bc7486a60a5ece409525ae46bce3b6/frame/referenda/src/lib.rs#L190-L192" ContentLicense="CC BY-SA 4.0" />
  <row Id="28160" PostHistoryTypeId="5" PostId="7364" RevisionGUID="6b68bc17-8107-49a1-a3ff-816c4e4a20cd" CreationDate="2023-02-27T17:56:49.293" UserId="83" Comment="name was wrong" Text="I was looking at setting up a nice testing workflow and was wondering if anyone could recommend one over the other ([zombienet][1] vs [parachain-launch][2]). Note that [polkadot-launch][3] is deprecated.&#xD;&#xA;&#xD;&#xA;They seem quite similar from a beginners point of view so it would be nice to hear from someone with some insight&#xD;&#xA;&#xD;&#xA;Felix&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/zombienet&#xD;&#xA;  [2]: &#xD;&#xA;https://github.com/open-web3-stack/parachain-launch&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-launch" ContentLicense="CC BY-SA 4.0" />
  <row Id="28161" PostHistoryTypeId="4" PostId="7364" RevisionGUID="6b68bc17-8107-49a1-a3ff-816c4e4a20cd" CreationDate="2023-02-27T17:56:49.293" UserId="83" Comment="name was wrong" Text="zombienet vs parachain-launch" ContentLicense="CC BY-SA 4.0" />
  <row Id="28162" PostHistoryTypeId="6" PostId="7364" RevisionGUID="6b68bc17-8107-49a1-a3ff-816c4e4a20cd" CreationDate="2023-02-27T17:56:49.293" UserId="83" Comment="name was wrong" Text="|zombienet|polkadot-launch|parachain-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28163" PostHistoryTypeId="50" PostId="6939" RevisionGUID="72d484b7-e41d-4ad0-a896-8eef44192ae5" CreationDate="2023-02-27T21:05:05.647" UserId="-1" />
  <row Id="28164" PostHistoryTypeId="2" PostId="7388" RevisionGUID="2d319399-db67-4890-b4f1-1f71e670f7a7" CreationDate="2023-02-27T21:08:54.443" UserId="3171" Text="There is no any logs and off-chain workers does not work by default.&#xD;&#xA;How to specify to enable workers for parachain via command?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28166" PostHistoryTypeId="1" PostId="7388" RevisionGUID="2d319399-db67-4890-b4f1-1f71e670f7a7" CreationDate="2023-02-27T21:08:54.443" UserId="3171" Text="How to enable off-chain workers for parachain via command line?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28167" PostHistoryTypeId="3" PostId="7388" RevisionGUID="2d319399-db67-4890-b4f1-1f71e670f7a7" CreationDate="2023-02-27T21:08:54.443" UserId="3171" Text="|parachain|substrate-parachain-template|offchain-worker|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28168" PostHistoryTypeId="2" PostId="7389" RevisionGUID="a959fe59-4021-4979-8fac-2bec103b8884" CreationDate="2023-02-27T22:49:33.643" UserId="3440" Text="I have followed this tutorial [link][https://use.ink/3.x/basics/cross-contract-calling] to create a cross-contract calling in ink. There are two contracts in the example ```accumulator``` and ```delegator```. The accumulator contract has two functions and the delegator contract can access those functions. But if I do an operation using increasing a value using the accumulator contract, then the delegator contract cannot access that value. The delegator contract can access only those values that are created by its functions though and not the values of the Accumulator. How can the delegator contract access the values generated by the accumulator contract? &#xD;&#xA;&#xD;&#xA;The contracts of the accumulator and delegator can be found here [link] [https://github.com/stanlypalathingal/ink_trials] &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28170" PostHistoryTypeId="1" PostId="7389" RevisionGUID="a959fe59-4021-4979-8fac-2bec103b8884" CreationDate="2023-02-27T22:49:33.643" UserId="3440" Text="Accessing values in cross-crontact calling" ContentLicense="CC BY-SA 4.0" />
  <row Id="28171" PostHistoryTypeId="3" PostId="7389" RevisionGUID="a959fe59-4021-4979-8fac-2bec103b8884" CreationDate="2023-02-27T22:49:33.643" UserId="3440" Text="|ink|smart-contract|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28172" PostHistoryTypeId="5" PostId="7389" RevisionGUID="f68e11ce-2754-4642-be32-caf8c6e9ef94" CreationDate="2023-02-27T22:54:49.227" UserId="3440" Comment="deleted 11 characters in body" Text="I have followed this [tutorial](https://use.ink/3.x/basics/cross-contract-calling) to create a cross-contract calling in ink. There are two contracts in the example ```accumulator``` and ```delegator```. The accumulator contract has two functions and the delegator contract can access those functions. But if I do an operation using increasing a value using the accumulator contract, then the delegator contract cannot access that value. The delegator contract can access only those values that are created by its functions though and not the values of the Accumulator. How can the delegator contract access the values generated by the accumulator contract? &#xD;&#xA;&#xD;&#xA;The contracts of the accumulator and delegator can be found [here](https://github.com/stanlypalathingal/ink_trials)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28173" PostHistoryTypeId="2" PostId="7390" RevisionGUID="25d641df-f8f3-4d71-abc6-ceb1ee2a5fdf" CreationDate="2023-02-27T23:07:02.813" UserId="3881" Text="I have integrated scheduller pallet into my node, trying to test it running the node and using polkadot js. All compiles. The scheduled task event is printed to the explorer, but when the block used as execution time arrives nothing happens. What is the better way to check what part is failing?&#xD;&#xA;&#xD;&#xA;The following is the code that schedule the task in the pallet code and the config in runtime lib:&#xD;&#xA;```rust&#xD;&#xA;if T::Scheduler::schedule_named(&#xD;&#xA;			(POLLS_ID, poll.currency, poll_id).encode(),&#xD;&#xA;			DispatchTime::At(end),&#xD;&#xA;			None,&#xD;&#xA;			63,&#xD;&#xA;			frame_system::RawOrigin::Root.into(),&#xD;&#xA;			Call::enact_poll_end { poll_currency: poll.currency, poll_id }.into(),&#xD;&#xA;		)&#xD;&#xA;		.is_err()&#xD;&#xA;&#xD;&#xA;impl pallet_scheduler::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	type PalletsOrigin = OriginCaller;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	type MaximumWeight = (); // No weight limit. Modify this to set a limit.&#xD;&#xA;	type ScheduleOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type MaxScheduledPerBlock = ConstU32&lt;100&gt;;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type OriginPrivilegeCmp = EqualPrivilegeOnly;&#xD;&#xA;	type Preimages = ();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="28175" PostHistoryTypeId="1" PostId="7390" RevisionGUID="25d641df-f8f3-4d71-abc6-ceb1ee2a5fdf" CreationDate="2023-02-27T23:07:02.813" UserId="3881" Text="How to debug Scheduler pallet not making the schedulled call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28176" PostHistoryTypeId="3" PostId="7390" RevisionGUID="25d641df-f8f3-4d71-abc6-ceb1ee2a5fdf" CreationDate="2023-02-27T23:07:02.813" UserId="3881" Text="|substrate-node-template|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28177" PostHistoryTypeId="2" PostId="7391" RevisionGUID="7629717e-089b-47b5-992d-d9d4f263c469" CreationDate="2023-02-27T23:27:39.187" UserId="375" Text="I'm wondering what are the possible ways to extract the payload from a polkadot-js transaction.&#xD;&#xA;So far the only way seems to be to define a custom signer that implements the [Signer interface](https://github.com/polkadot-js/api/blob/2c949e0fc58ce5b113f3d07045468ae153743bdb/packages/types/src/types/extrinsic.ts#L135) and then pass it to one of the sign methods on the transaction (SignAndSend, SignAsync, ...) to get access to the payload in the signPayload method. This of course works when someone wants to implement a custom Signer, but I am wondering if there is any other way to extract or construct a transaction payload without implementing a custom signer?! " ContentLicense="CC BY-SA 4.0" />
  <row Id="28179" PostHistoryTypeId="1" PostId="7391" RevisionGUID="7629717e-089b-47b5-992d-d9d4f263c469" CreationDate="2023-02-27T23:27:39.187" UserId="375" Text="How to get the payload from a polkadot-js transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="28180" PostHistoryTypeId="3" PostId="7391" RevisionGUID="7629717e-089b-47b5-992d-d9d4f263c469" CreationDate="2023-02-27T23:27:39.187" UserId="375" Text="|polkadot-js|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28181" PostHistoryTypeId="2" PostId="7392" RevisionGUID="34505e64-4bbf-4c3f-86c0-96eab315b090" CreationDate="2023-02-28T00:20:08.340" UserId="29" Text="Are you using the parachain node template from Cumulus? &#xD;&#xA;&#xD;&#xA;According to the help text, it's only enabled for nodes that are authoring new blocks:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;./target/release/parachain-template-node --help&#xD;&#xA;```&#xD;&#xA;      --offchain-worker &lt;ENABLED&gt;&#xD;&#xA;          Should execute offchain workers on every block.&#xD;&#xA;          &#xD;&#xA;          By default it's only enabled for nodes that are authoring new blocks.&#xD;&#xA;          &#xD;&#xA;          [default: when-authority]&#xD;&#xA;&#xD;&#xA;          Possible values:&#xD;&#xA;          - always:&#xD;&#xA;            Always have offchain worker enabled&#xD;&#xA;          - never:&#xD;&#xA;            Never enable the offchain worker&#xD;&#xA;          - when-authority:&#xD;&#xA;            Only enable the offchain worker when running as a validator (or collator, if this is a parachain node)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Looks like it is enabled here:&#xD;&#xA;```rust&#xD;&#xA;if parachain_config.offchain_worker.enabled {&#xD;&#xA;	sc_service::build_offchain_workers(&#xD;&#xA;		&amp;parachain_config,&#xD;&#xA;		task_manager.spawn_handle(),&#xD;&#xA;		client.clone(),&#xD;&#xA;		network.clone(),&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/cumulus/blob/590387a01cea1027cffeb1d70af49b44bd64d1d7/parachain-template/node/src/service.rs#L188-L195&#xD;&#xA;&#xD;&#xA;So try running your node with the `--offchain-worker always` flag." ContentLicense="CC BY-SA 4.0" />
  <row Id="28183" PostHistoryTypeId="4" PostId="7390" RevisionGUID="f29e917d-35c2-4b2c-b8df-572a894b0d9d" CreationDate="2023-02-28T00:39:13.360" UserId="29" Comment="edited title" Text="How to debug Scheduler pallet not making the scheduled call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28184" PostHistoryTypeId="2" PostId="7393" RevisionGUID="a26d0d11-7183-4618-9bda-de3e94ed94e2" CreationDate="2023-02-28T01:13:26.970" UserId="494" Text="I'm trying to write something similar to Moonbeam's [`assets-erc20`](https://github.com/PureStake/moonbeam/blob/master/precompiles/assets-erc20/src/lib.rs) precompile.&#xD;&#xA;&#xD;&#xA;I'm using Moonbeam's [`#[precompile]`](https://github.com/PureStake/moonbeam/blob/master/precompiles/utils/macro/docs/precompile_macro.md) procedural macros.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub type AssetIdOf&lt;R&gt; =&#xD;&#xA;  		&lt;&lt;R as pallet_evm::Config&gt;::Fungibles as Inspect&lt;&lt;R as frame_system::Config&gt;::AccountId&gt;&gt;::AssetId;&#xD;&#xA;&#xD;&#xA;pub type BalanceOf&lt;R&gt; = &#xD;&#xA;  		&lt;&lt;R as pallet_evm::Config&gt;::Fungibles as Inspect&lt;&lt;R as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;pub struct Fungibles&lt;R&gt;(PhantomData&lt;R&gt;);&#xD;&#xA;&#xD;&#xA;#[precompile_utils::precompile]&#xD;&#xA;impl&lt;R&gt; Fungibles&lt;R&gt;&#xD;&#xA;where&#xD;&#xA;    R: pallet_evm::Config,&#xD;&#xA;    AssetIdOf&lt;R&gt;: EvmData,&#xD;&#xA;    BalanceOf&lt;R&gt;: Into&lt;U256&gt;,&#xD;&#xA;{&#xD;&#xA;&#xD;&#xA;    #[precompile::public(&quot;totalSupply()&quot;)]&#xD;&#xA;    #[precompile::view]&#xD;&#xA;    fn total_supply(&#xD;&#xA;        handle: &amp;mut impl PrecompileHandle,&#xD;&#xA;        asset_id: AssetIdOf&lt;R&gt;,&#xD;&#xA;    ) -&gt; EvmResult&lt;U256&gt; {&#xD;&#xA;        handle.record_cost(RuntimeHelper::&lt;R&gt;::db_read_gas_cost())?;&#xD;&#xA;        &#xD;&#xA;        Ok(R::Fungibles::total_issuance(asset_id).into())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // todo: remaining erc20 methods&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm running into this compilation error.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  --&gt; frame/evm/precompile/fungibles/src/lib.rs:74:29&#xD;&#xA;   |&#xD;&#xA;63 | impl&lt;R&gt; Fungibles&lt;R&gt;&#xD;&#xA;   |                  - help: you might be missing a type parameter: `&lt;R&gt;`&#xD;&#xA;...&#xD;&#xA;74 |         asset_id: AssetIdOf&lt;R&gt;,&#xD;&#xA;   |                             ^ not found in this scope&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0412`.&#xD;&#xA;```&#xD;&#xA;It's quite confusing because `&lt;R&gt;` is not missing. &#xD;&#xA;&#xD;&#xA;I'm trying to figure out whether:&#xD;&#xA;- this is a Rust syntax error&#xD;&#xA;- I'm misusing the `#[precompile]` macro&#xD;&#xA;&#xD;&#xA;Note: my approach is using loose coupling (as opposed to `assets-erc20`'s tight coupling). I attempted switching to a tight coupling strategy and the issue remained." ContentLicense="CC BY-SA 4.0" />
  <row Id="28186" PostHistoryTypeId="1" PostId="7393" RevisionGUID="a26d0d11-7183-4618-9bda-de3e94ed94e2" CreationDate="2023-02-28T01:13:26.970" UserId="494" Text="Moonbeam #[precompile] procedural macro and Rust generics compilation error" ContentLicense="CC BY-SA 4.0" />
  <row Id="28187" PostHistoryTypeId="3" PostId="7393" RevisionGUID="a26d0d11-7183-4618-9bda-de3e94ed94e2" CreationDate="2023-02-28T01:13:26.970" UserId="494" Text="|frontier|moonbeam|precompile|erc20|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28188" PostHistoryTypeId="5" PostId="7393" RevisionGUID="fdfe3410-2884-4339-a319-35fc797137bb" CreationDate="2023-02-28T01:21:29.473" UserId="494" Comment="added 42 characters in body" Text="I'm trying to write something similar to Moonbeam's [`assets-erc20`](https://github.com/PureStake/moonbeam/blob/master/precompiles/assets-erc20/src/lib.rs) precompile.&#xD;&#xA;&#xD;&#xA;I'm using Moonbeam's [`#[precompile]`](https://github.com/PureStake/moonbeam/blob/master/precompiles/utils/macro/docs/precompile_macro.md) procedural macros.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub type AssetIdOf&lt;R&gt; =&#xD;&#xA;  		&lt;&lt;R as pallet_evm::Config&gt;::Fungibles as Inspect&lt;&lt;R as frame_system::Config&gt;::AccountId&gt;&gt;::AssetId;&#xD;&#xA;&#xD;&#xA;pub type BalanceOf&lt;R&gt; = &#xD;&#xA;  		&lt;&lt;R as pallet_evm::Config&gt;::Fungibles as Inspect&lt;&lt;R as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;pub struct Fungibles&lt;R&gt;(PhantomData&lt;R&gt;);&#xD;&#xA;&#xD;&#xA;#[precompile_utils::precompile]&#xD;&#xA;impl&lt;R&gt; Fungibles&lt;R&gt;&#xD;&#xA;where&#xD;&#xA;    R: pallet_evm::Config,&#xD;&#xA;    AssetIdOf&lt;R&gt;: EvmData,&#xD;&#xA;    BalanceOf&lt;R&gt;: Into&lt;U256&gt;,&#xD;&#xA;{&#xD;&#xA;&#xD;&#xA;    #[precompile::public(&quot;totalSupply()&quot;)]&#xD;&#xA;    #[precompile::view]&#xD;&#xA;    fn total_supply(&#xD;&#xA;        handle: &amp;mut impl PrecompileHandle,&#xD;&#xA;        asset_id: AssetIdOf&lt;R&gt;,&#xD;&#xA;    ) -&gt; EvmResult&lt;U256&gt; {&#xD;&#xA;        handle.record_cost(RuntimeHelper::&lt;R&gt;::db_read_gas_cost())?;&#xD;&#xA;        &#xD;&#xA;        Ok(R::Fungibles::total_issuance(asset_id).into())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // todo: remaining erc20 methods&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm running into this compilation error.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  --&gt; frame/evm/precompile/fungibles/src/lib.rs:74:29&#xD;&#xA;   |&#xD;&#xA;63 | impl&lt;R&gt; Fungibles&lt;R&gt;&#xD;&#xA;   |                  - help: you might be missing a type parameter: `&lt;R&gt;`&#xD;&#xA;...&#xD;&#xA;74 |         asset_id: AssetIdOf&lt;R&gt;,&#xD;&#xA;   |                             ^ not found in this scope&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0412`.&#xD;&#xA;```&#xD;&#xA;It's quite confusing because `&lt;R&gt;` is not missing. &#xD;&#xA;&#xD;&#xA;I'm trying to figure out whether:&#xD;&#xA;- this is a Rust syntax error&#xD;&#xA;- I'm misusing the `#[precompile]` macro&#xD;&#xA;&#xD;&#xA;Note: my approach is using loose coupling (as opposed to `assets-erc20`'s tight coupling). I attempted switching to a tight coupling strategy and the issue remained, so that is unlikely to be the root cause." ContentLicense="CC BY-SA 4.0" />
  <row Id="28189" PostHistoryTypeId="2" PostId="7394" RevisionGUID="79974918-4f5a-4100-ba51-145fad69b9bb" CreationDate="2023-02-28T01:26:00.327" UserId="3358" Text="##### Context:&#xD;&#xA;&#xD;&#xA;I am trying to detach end-to-end tests from my main contract `lib.rs`. I created a new module in `tests_e2e.rs`.&#xD;&#xA;&#xD;&#xA;I import the module in main contract like so:&#xD;&#xA;&#xD;&#xA;##### `lib.rs`...vvv&#xD;&#xA;```rust&#xD;&#xA;#[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;mod tests_e2e;&#xD;&#xA;```&#xD;&#xA;In the `tests_e2e.rs` file, I have the usual module defined for ink_e2e  tests, but with the obvious addition of the crate import (named `ilockmvp`):&#xD;&#xA;&#xD;&#xA;##### `tests_e2e.rs`...vvv&#xD;&#xA;```rust&#xD;&#xA;    pub mod e2e_tests {&#xD;&#xA;&#xD;&#xA;        use crate::ilockmvp::*;&#xD;&#xA;&#xD;&#xA;        use ink_e2e::{&#xD;&#xA;            build_message,&#xD;&#xA;            CallResult,&#xD;&#xA;        };&#xD;&#xA;        use openbrush::contracts::psp22::psp22_external::PSP22;&#xD;&#xA;        use ink::primitives::{&#xD;&#xA;            Clear,&#xD;&#xA;            Hash,&#xD;&#xA;        };&#xD;&#xA;```&#xD;&#xA;When I build test with `cargo +nightly test --features e2e-tests -- --show-output` I get this error:&#xD;&#xA;[![error results][1]][1]&#xD;&#xA;&#xD;&#xA;When I remove the crate import, no such error occurs, but the obvious error that I need to import things ensues.&#xD;&#xA;&#xD;&#xA;##### Question:&#xD;&#xA;&#xD;&#xA;How do I work around this? --thoughts/suggestions/insights?&#xD;&#xA;&#xD;&#xA;***** I got this working fine for my `#[ink::test]` unit tests in a different module file (`tests_unit.rs`).&#xD;&#xA;  &#xD;&#xA;[1]: https://i.stack.imgur.com/e7O8S.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="28191" PostHistoryTypeId="1" PostId="7394" RevisionGUID="79974918-4f5a-4100-ba51-145fad69b9bb" CreationDate="2023-02-28T01:26:00.327" UserId="3358" Text="ink-e2e: Metadata artifacts not generated when importing crate" ContentLicense="CC BY-SA 4.0" />
  <row Id="28192" PostHistoryTypeId="3" PostId="7394" RevisionGUID="79974918-4f5a-4100-ba51-145fad69b9bb" CreationDate="2023-02-28T01:26:00.327" UserId="3358" Text="|ink|smart-contract|testing|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28193" PostHistoryTypeId="2" PostId="7395" RevisionGUID="315d7b47-5831-4df0-a570-ef2ba84bf2bb" CreationDate="2023-02-28T06:43:25.083" UserId="2844" Text="What I have done in this contract is separate `ink_e2e` test to different folder. You can [`view`](https://github.com/ganesh1233456/decode-ink-events) in this gh repo. I compiled and it works fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="28195" PostHistoryTypeId="2" PostId="7396" RevisionGUID="c9dcb118-583f-43b9-9108-d0a06d5c1863" CreationDate="2023-02-28T06:44:29.913" UserId="406" Text="I am trying to upgrade the version of substrate on my running blockchain from version v0.9.25 to v0.9.36, everything is fine but after runtime upgrade my terminal shows this **[869] ‍♂️ Running migration with current storage version StorageVersion(3) / onchain StorageVersion(1)    &#xD;&#xA;2023-02-28 11:17:29 [869] ‍♂️ MigrateToV2 did not executed. This probably should be removed** and when I try to do any transaction on my upgraded blockchain the block generation and finalisation is stopped.Is there any way to correct this...&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28197" PostHistoryTypeId="1" PostId="7396" RevisionGUID="c9dcb118-583f-43b9-9108-d0a06d5c1863" CreationDate="2023-02-28T06:44:29.913" UserId="406" Text="Getting error after runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="28198" PostHistoryTypeId="3" PostId="7396" RevisionGUID="c9dcb118-583f-43b9-9108-d0a06d5c1863" CreationDate="2023-02-28T06:44:29.913" UserId="406" Text="|polkadot|substrate-node-template|rust|substrate-contracts-node|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28199" PostHistoryTypeId="2" PostId="7397" RevisionGUID="521e9925-d4ac-41d1-9b8c-bf8f043cbc52" CreationDate="2023-02-28T11:16:12.793" UserId="2147" Text="Following this tutorial: https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc/&#xD;&#xA;&#xD;&#xA;we should have that a pallet named &quot;Members&quot; should have prefix &quot;0xba7fb8745735dc3be2a2c61a72c39e78&quot; (equals to `TwoX128(&quot;Members&quot;)`)&#xD;&#xA;&#xD;&#xA;However when accessing the value of the running chain using the polkadot-ui I get &quot;0x2ce461329fdf4be12bce01afc0af09bc&quot;&#xD;&#xA;&#xD;&#xA;#### Details&#xD;&#xA; - pallet name from metadata is obtained from `api.rpc.state.getMetadata()` with `api` being of type `ApiPromise`&#xD;&#xA; - twox128 is computed via `@polkadot/util-crypto` `xxhashAsHex`" ContentLicense="CC BY-SA 4.0" />
  <row Id="28201" PostHistoryTypeId="1" PostId="7397" RevisionGUID="521e9925-d4ac-41d1-9b8c-bf8f043cbc52" CreationDate="2023-02-28T11:16:12.793" UserId="2147" Text="TwoX128 hash for rpc.state.metadata pallet names not being a prefix for storage key" ContentLicense="CC BY-SA 4.0" />
  <row Id="28202" PostHistoryTypeId="3" PostId="7397" RevisionGUID="521e9925-d4ac-41d1-9b8c-bf8f043cbc52" CreationDate="2023-02-28T11:16:12.793" UserId="2147" Text="|polkadot-js|storage|metadata|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28203" PostHistoryTypeId="2" PostId="7398" RevisionGUID="a70fd3b4-b7c8-45c2-acb7-c89aee7eb333" CreationDate="2023-02-28T11:52:54.983" UserId="2147" Text="After some inspection for the `api.rpc.state.getMetadata(..)` in the latest version of the `MetadataV*` type (currently `MetadataV14`) you can get the string used for the prefix from `metadata.asLatest.pallets.storage.unwrap().prefix.toString()` (clearly provided that `metadata.asLatest.pallets.storage` is not `None`)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28205" PostHistoryTypeId="2" PostId="7399" RevisionGUID="1f4dd308-523b-43fe-853b-524f8429142c" CreationDate="2023-02-28T12:47:51.173" UserId="246" Text="I would like to run analysis on activity involving Parachain sovereign account ids on Statemint. &#xD;&#xA;&#xD;&#xA;Is there a way I can programmatically retrieve a list of parachain sovereign ids on Statemint? " ContentLicense="CC BY-SA 4.0" />
  <row Id="28207" PostHistoryTypeId="1" PostId="7399" RevisionGUID="1f4dd308-523b-43fe-853b-524f8429142c" CreationDate="2023-02-28T12:47:51.173" UserId="246" Text="Is there a programmatic way to retrieve list of parachain sovereign accounts on Statemint/e?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28208" PostHistoryTypeId="3" PostId="7399" RevisionGUID="1f4dd308-523b-43fe-853b-524f8429142c" CreationDate="2023-02-28T12:47:51.173" UserId="246" Text="|data-analytics|statemint|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28216" PostHistoryTypeId="34" PostId="7020" RevisionGUID="f90d8e60-d79a-46a3-b052-d4755edf2781" CreationDate="2023-02-28T15:06:25.787" UserId="-1" Comment="18" />
  <row Id="28220" PostHistoryTypeId="2" PostId="7402" RevisionGUID="27c823f5-c9e5-43d4-907e-7f709ce5e81f" CreationDate="2023-02-28T16:20:09.673" UserId="3738" Text="Good evening,&#xD;&#xA;&#xD;&#xA;I am trying to parse the output hash of nextAuthorities details retrieved by storage function.&#xD;&#xA;&#xD;&#xA;I would like to know how to parse the output sent per validator, is it an hashproof generated by babe session key?&#xD;&#xA;&#xD;&#xA;Same question for heartbeat received in each block from candidate validators.&#xD;&#xA;&#xD;&#xA;Thanks for support" ContentLicense="CC BY-SA 4.0" />
  <row Id="28222" PostHistoryTypeId="1" PostId="7402" RevisionGUID="27c823f5-c9e5-43d4-907e-7f709ce5e81f" CreationDate="2023-02-28T16:20:09.673" UserId="3738" Text="nextAuthorities() output clarification from Babe storage event" ContentLicense="CC BY-SA 4.0" />
  <row Id="28223" PostHistoryTypeId="3" PostId="7402" RevisionGUID="27c823f5-c9e5-43d4-907e-7f709ce5e81f" CreationDate="2023-02-28T16:20:09.673" UserId="3738" Text="|storage|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28224" PostHistoryTypeId="2" PostId="7403" RevisionGUID="c70c89bd-3236-42e9-90d8-20566bfc8f8f" CreationDate="2023-02-28T16:41:25.860" UserId="94" Text="The scheduler has `MaximumWeight` weight available each block to process tasks. Setting it to `()` means that it has zero weight available and therefore does nothing.  &#xD;&#xA;You can take a look at the [Polkadot runtime](https://github.com/paritytech/polkadot/blob/ac0d5ab5448303dc834d2afca6c29c4d93920859/runtime/polkadot/src/lib.rs#L178) on how to configure it with a better value. For example 80% of the total block limit." ContentLicense="CC BY-SA 4.0" />
  <row Id="28226" PostHistoryTypeId="2" PostId="7404" RevisionGUID="b22bcc02-9a58-4b51-a8ae-310b2fea5899" CreationDate="2023-02-28T16:49:27.857" UserId="3317" Text="In short:&#xD;&#xA;1. Create a separate file (e.g. `e2e_tests.rs`) and move all the code from e2e_tests module there (without mod e2e_tests).&#xD;&#xA;2. Add these lines on top of `e2e_tests.rs` file:&#xD;&#xA;```&#xD;&#xA;use crate::&lt;your_crate_name&gt;::*;&#xD;&#xA;&#xD;&#xA;#[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;pub use ink_e2e::build_message;&#xD;&#xA;```&#xD;&#xA;3. In `lib.rs` add:&#xD;&#xA;```&#xD;&#xA;#[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;pub mod e2e_tests;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28228" PostHistoryTypeId="2" PostId="7405" RevisionGUID="bd759c6d-708c-426d-a8fe-ca86d04ec082" CreationDate="2023-02-28T16:52:09.070" UserId="29" Text="Yes. There are some tools and examples already available that you can use to do this programmatically. I recommend the following post:&#xD;&#xA;- https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain&#xD;&#xA;&#xD;&#xA;In your case you would want `b&quot;sibl&quot;` (side-to-side) and not `b&quot;para&quot;` (up/down)." ContentLicense="CC BY-SA 4.0" />
  <row Id="28230" PostHistoryTypeId="2" PostId="7406" RevisionGUID="7e1f892e-849a-490f-9c1c-18446481596b" CreationDate="2023-02-28T17:42:35.093" UserId="29" Text="It look like the logs are telling you that the onchain storage version is 1 and the migration is running with the storage version of 3 when the migration to 2 never happened.&#xD;&#xA;&#xD;&#xA;Every version could have its own storage migrations. It is recommended you upgrade version-by-version instead of between two distant versions." ContentLicense="CC BY-SA 4.0" />
  <row Id="28232" PostHistoryTypeId="2" PostId="7407" RevisionGUID="237e7fa5-e339-4d28-9684-375d1eb97f39" CreationDate="2023-02-28T18:39:29.887" UserId="1951" Text="I have a contract that implements some ZKP verification logic with `plonk`. The verification logic is contained in some other crate that can be compiled to Wasm, and there are `wasm-pack` tests like this:&#xD;&#xA;```rust&#xD;&#xA;#[wasm_bindgen_test]&#xD;&#xA;fn generate_proof_test() {&#xD;&#xA;        // const DEPTH: usize = DEFAULT_DEPTH;&#xD;&#xA;        let R = ...;&#xD;&#xA;        let proof: [u8; 1040] = ...;&#xD;&#xA;        let account = alice_account;&#xD;&#xA;        let h: [u8; 32] = ...;&#xD;&#xA;&#xD;&#xA;        verify_proof(R, proof, account, h).unwrap();&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;The problem is that this test works fine with `wasm-pack test`, but when I import this very same logic into my `ink!` contract, the call fails and I get `{ Err: { Module: { index: 8 error: 0x0b000000 } } }`, which is `ContractTrapped` in `polkadot-v0.9.37` version of `pallet-contracts`.&#xD;&#xA;The verification function is quite large (roughly 70kB, optimized), and it made me wonder if there can be differences between `wasm-pack` Wasm and `wasmi` Wasm in `pallet-contracts`. When I debugged the exact `Trap` reason, it turned out to be an `unreachable` instruction encountered.&#xD;&#xA;&#xD;&#xA;So, my question is: should I try looking harder for any logical errors in my code, or can the call somehow fail with an `unreachable` instruction due to the size?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28234" PostHistoryTypeId="1" PostId="7407" RevisionGUID="237e7fa5-e339-4d28-9684-375d1eb97f39" CreationDate="2023-02-28T18:39:29.887" UserId="1951" Text="Wasm traps in ink contract but not in a `wasm-pack` test" ContentLicense="CC BY-SA 4.0" />
  <row Id="28235" PostHistoryTypeId="3" PostId="7407" RevisionGUID="237e7fa5-e339-4d28-9684-375d1eb97f39" CreationDate="2023-02-28T18:39:29.887" UserId="1951" Text="|ink|wasm|wasmi|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28236" PostHistoryTypeId="2" PostId="7408" RevisionGUID="9560d99b-6297-4347-9c13-942789e411c3" CreationDate="2023-02-28T21:07:31.893" UserId="181" Text="I'm uncertain how I can structure the generic variant of a polkadotjs type for an on-chain Enum that looks sort of like this: &#xD;&#xA;&#xD;&#xA;#[derive(TypeInfo, Debug, Clone, Encode, Decode, PartialEq)]&#xD;&#xA;pub enum MyEnum&lt;T: Codec&gt; {&#xD;&#xA;	OptionA,&#xD;&#xA;	OptionB(T),&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;I get down to my polkadotjs types and:&#xD;&#xA;...&#xD;&#xA;  MyEnum: {&#xD;&#xA;    _enum: {&#xD;&#xA;      OptionA: null,&#xD;&#xA;      OptionB: '...???',&#xD;&#xA;    },&#xD;&#xA;  },&#xD;&#xA;&#xD;&#xA;What should go in OptionB to represent the generic portion?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28238" PostHistoryTypeId="1" PostId="7408" RevisionGUID="9560d99b-6297-4347-9c13-942789e411c3" CreationDate="2023-02-28T21:07:31.893" UserId="181" Text="How can I represent a polkadotjs type for a custom generic Enum?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28239" PostHistoryTypeId="3" PostId="7408" RevisionGUID="9560d99b-6297-4347-9c13-942789e411c3" CreationDate="2023-02-28T21:07:31.893" UserId="181" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28240" PostHistoryTypeId="5" PostId="7275" RevisionGUID="63d23bd4-e72d-4c42-b52d-37e4674f1da7" CreationDate="2023-02-28T21:09:06.230" UserId="2673" Comment="TS syntax highlighting" Text="It looks like the same issue still occurs in 2023, moreover I realised that now interacting with Smart Contracts on https://polkadot.js.org/apps/ is broken as well. The only way to interact with them is by using https://contracts-ui.substrate.io/ which apparently has some kind of workaround for that WeightV2 issue. Nevertheless, as a fulfilment of the reply from Adam Wierzbicki, you need to add following parts to make your code work.&#xD;&#xA;&#xD;&#xA;First of all import these at the top of the code block&#xD;&#xA;```typescript&#xD;&#xA;import { BN, BN_ONE } from &quot;@polkadot/util&quot;;&#xD;&#xA;import type { WeightV2 } from '@polkadot/types/interfaces'&#xD;&#xA;```&#xD;&#xA;Somewhere below define two new variables&#xD;&#xA;```typescript&#xD;&#xA;const MAX_CALL_WEIGHT = new BN(5_000_000_000_000).isub(BN_ONE);&#xD;&#xA;const PROOFSIZE = new BN(1_000_000);&#xD;&#xA;```&#xD;&#xA;Execute query on the given function to retrieve the required gas limit&#xD;&#xA;```typescript&#xD;&#xA;const storageDepositLimit = null;&#xD;&#xA;&#xD;&#xA;const { gasRequired } = await contract.query.flip(&#xD;&#xA;  account.address,&#xD;&#xA;  {&#xD;&#xA;    gasLimit: api?.registry.createType('WeightV2', {&#xD;&#xA;      refTime: MAX_CALL_WEIGHT,&#xD;&#xA;      proofSize: PROOFSIZE,&#xD;&#xA;    }) as WeightV2,&#xD;&#xA;    storageDepositLimit,&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;Define the gas limit variable and execute transaction call&#xD;&#xA;```typescript&#xD;&#xA;const gasLimit = api?.registry.createType('WeightV2', gasRequired) as WeightV2&#xD;&#xA;   &#xD;&#xA;await contract.tx&#xD;&#xA;  .flip({&#xD;&#xA;    gasLimit,&#xD;&#xA;    storageDepositLimit&#xD;&#xA;  })&#xD;&#xA;  .signAndSend(alice, async (res) =&gt; {&#xD;&#xA;    if (res.status.isInBlock) {&#xD;&#xA;      console.log('in a block')&#xD;&#xA;    } else if (res.status.isFinalized) {&#xD;&#xA;      console.log('finalized')&#xD;&#xA;    }&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;If you need to only read some data from the Smart contract you can query it like in the code block below&#xD;&#xA;```typescript&#xD;&#xA;const { result, output } = await contract.query.get(&#xD;&#xA;  alice.address,&#xD;&#xA;  {&#xD;&#xA;    gasLimit: api?.registry.createType('WeightV2', {&#xD;&#xA;      refTime: MAX_CALL_WEIGHT,&#xD;&#xA;      proofSize: PROOFSIZE,&#xD;&#xA;    }) as WeightV2,&#xD;&#xA;    storageDepositLimit,&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;   &#xD;&#xA;// The actual result from RPC as `ContractExecResult`&#xD;&#xA;console.log(result.toHuman());&#xD;&#xA;    &#xD;&#xA;// check if the call was successful&#xD;&#xA;if (result.isOk) {&#xD;&#xA;  // output the return value&#xD;&#xA;  console.log(&quot;Success&quot;, output?.toHuman());&#xD;&#xA;} else {&#xD;&#xA;  console.error(&quot;Error&quot;, result.asErr);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="28241" PostHistoryTypeId="24" PostId="7275" RevisionGUID="63d23bd4-e72d-4c42-b52d-37e4674f1da7" CreationDate="2023-02-28T21:09:06.230" Comment="Proposed by 2673 approved by 34 edit id of 387" ContentLicense="CC BY-SA 4.0" />
  <row Id="28242" PostHistoryTypeId="2" PostId="7409" RevisionGUID="e3ee2d9f-5689-48b8-aa65-5498fd7b74c5" CreationDate="2023-02-28T21:14:04.697" UserId="3646" Text="Upgrade to the latest version and now the problem does not exists" ContentLicense="CC BY-SA 4.0" />
  <row Id="28244" PostHistoryTypeId="2" PostId="7410" RevisionGUID="23b3aa75-eaee-40ed-97c4-e6378b51c742" CreationDate="2023-02-28T21:59:12.637" UserId="3358" Text="##### Steps to recreate problem:&#xD;&#xA;&#xD;&#xA; - Set up tests_e2e.rs module as specified by @DaanvanderPlas answer above.&#xD;&#xA;This configuration is correct, but will not necessarily solve the problem once the damage is done.&#xD;&#xA; - Remove `#[cfg(all(test, feature = &quot;e2e-tests&quot;))]` from the module file.&#xD;&#xA; - Attempt to build and run tests with `+nightly` will fail with OP error message, consisting of the first e2e test failed to generate metadata artifacts, then one 'Once instance has previously been poisoned' message per remaining e2e test.&#xD;&#xA;- Attempt to replace `#[cfg(all(test, feature = &quot;e2e-tests&quot;))]` in `tests_e2e.rs` module file should continue to fail and produce the same set of error messages.&#xD;&#xA;&#xD;&#xA;##### Additional steps (beyond @DaanvanderPlas setup) to solve problem:&#xD;&#xA;&#xD;&#xA;- Delete `target` directory or `cargo clean` and build and run test from scratch.&#xD;&#xA;&#xD;&#xA;And that's it, should work again.&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;In @Ganesh11's example repo, building and running test with stable `cargo contract v2.0.0` will still succeed if the macro is left out in the tests module file. However, running with `+nightly v0.69.0` will fail without the second instance of the ink_e2e macro. And, once it has failed, `target` will need to be deleted or run `cargo clean`.&#xD;&#xA;&#xD;&#xA;The reason for needing `+nightly` in this scenario is because Openbrush contracts rely on the `#![feature(min_specialization)]` macro, which is not supported by the stable toolchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="28246" PostHistoryTypeId="50" PostId="5103" RevisionGUID="07d54689-0f40-4b7d-9ccd-5145ef86b6de" CreationDate="2023-02-28T22:01:45.317" UserId="-1" />
  <row Id="28247" PostHistoryTypeId="5" PostId="7410" RevisionGUID="d2f75b8a-fa82-4594-b232-6801d4f79373" CreationDate="2023-02-28T22:38:31.307" UserId="3358" Comment="added 255 characters in body" Text="##### Steps to recreate problem:&#xD;&#xA;&#xD;&#xA; - Set up tests_e2e.rs module as specified by @DaanvanderPlas answer above.&#xD;&#xA;This configuration is correct, but will not necessarily solve the problem once the damage is done.&#xD;&#xA; - Remove `#[cfg(all(test, feature = &quot;e2e-tests&quot;))]` from the module file.&#xD;&#xA; - Attempt to build and run tests with `+nightly` will fail with OP error message, consisting of the first e2e test failed to generate metadata artifacts, then one 'Once instance has previously been poisoned' message per remaining e2e test.&#xD;&#xA;- Attempt to replace `#[cfg(all(test, feature = &quot;e2e-tests&quot;))]` in `tests_e2e.rs` module file should continue to fail and produce the same set of error messages.&#xD;&#xA;&#xD;&#xA;##### Additional steps (beyond @DaanvanderPlas setup) to solve problem:&#xD;&#xA;&#xD;&#xA;- Delete `target` directory or `cargo clean` and build and run test from scratch.&#xD;&#xA;&#xD;&#xA;And that's it, should work again.&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;In @Ganesh11's example repo, building and running test with stable `cargo contract v2.0.0` will still succeed if the macro is left out in the tests module file. However, running with `+nightly v0.69.0` will fail without the second instance of the ink_e2e macro. And, once it has failed, `target` will need to be deleted or run `cargo clean`.&#xD;&#xA;&#xD;&#xA;The reason for needing `+nightly` in this scenario is because Openbrush contracts rely on the `#![feature(min_specialization)]` macro, which is not supported by the stable toolchain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;##### EDIT!!!&#xD;&#xA;&#xD;&#xA; - This issue not only comes up if removing the ink_e2e cfg macro. Any change to the tests_e2e.rs file in general causes this problem, and a cargo clean must be performed.&#xD;&#xA; - This is a big problem because the build time is so long." ContentLicense="CC BY-SA 4.0" />
  <row Id="28248" PostHistoryTypeId="5" PostId="7408" RevisionGUID="9620fb9b-f129-4abe-8964-999b997c7598" CreationDate="2023-03-01T00:54:05.020" UserId="181" Comment="added 54 characters in body" Text="I'm uncertain how I can structure the generic variant of a polkadotjs type for an on-chain Enum that looks sort of like this: &#xD;&#xA;&#xD;&#xA;    #[derive(TypeInfo, Debug, Clone, Encode, Decode, PartialEq)]&#xD;&#xA;    pub enum MyEnum&lt;T: Codec&gt; {&#xD;&#xA;    	OptionA,&#xD;&#xA;    	OptionB(T),&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I get down to my polkadotjs types and:&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;      MyEnum: {&#xD;&#xA;        _enum: {&#xD;&#xA;          OptionA: null,&#xD;&#xA;          OptionB: '...???',&#xD;&#xA;        },&#xD;&#xA;      },&#xD;&#xA;&#xD;&#xA;What should go in OptionB to represent the generic portion?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28249" PostHistoryTypeId="2" PostId="7411" RevisionGUID="e52e4cca-4b8d-42ec-910d-ad217d615f7a" CreationDate="2023-03-01T03:17:00.997" UserId="251" Text="IIRC, there shouldn't be any generic. (I didn't use this anymore since metadata 14)&#xD;&#xA;&#xD;&#xA;It must be an exact type.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;Balance&quot;: &quot;u128&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can't write `&quot;Balance&quot;: &quot;T&quot;`. Unless you tell it `&quot;T&quot;: &quot;u128&quot;`.&#xD;&#xA;&#xD;&#xA;So, you need to check what is your `T` on the runtime level.&#xD;&#xA;&#xD;&#xA;e.g. https://github.com/darwinia-network/darwinia/blob/85bfeda3161bafb6a42f63b57b169265820972a1/runtime/crab/types.json#L9-L14" ContentLicense="CC BY-SA 4.0" />
  <row Id="28251" PostHistoryTypeId="2" PostId="7412" RevisionGUID="1121e5da-31fc-4243-8f08-4845d024c6e0" CreationDate="2023-03-01T06:16:09.697" UserId="3667" Text="If I have some extrinsic with weight `W` and I call another pallet function inside it which has weight `X`, does it mean I have to annotate my function's weight as `W + X`? What happens if I don't? For eg:  do I run the risk of potentially missing out building valid blocks as a result of weight underestimation? " ContentLicense="CC BY-SA 4.0" />
  <row Id="28253" PostHistoryTypeId="1" PostId="7412" RevisionGUID="1121e5da-31fc-4243-8f08-4845d024c6e0" CreationDate="2023-03-01T06:16:09.697" UserId="3667" Text="If my extrinsic makes calls to other extrinsics, do I need to include their weight in #[pallet::weight(..)]?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28254" PostHistoryTypeId="3" PostId="7412" RevisionGUID="1121e5da-31fc-4243-8f08-4845d024c6e0" CreationDate="2023-03-01T06:16:09.697" UserId="3667" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28255" PostHistoryTypeId="2" PostId="7413" RevisionGUID="a345df50-2e80-4727-97e9-9b30b388b811" CreationDate="2023-03-01T08:58:45.200" UserId="2416" Text="I have a substrate based build running locally with RPC and JSON API, when attempting to connect via a browser extension to *http://127.0.0.1:9933*, getting the following error. &#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;&#xD;&#xA;    2023-03-01 14:16:36 Denied request: HttpHeaderRejected(&quot;origin&quot;, &quot;moz-extension://b7930d0a-fa38-4693-86ff-101366b1a01b&quot;)&#xD;&#xA;&#xD;&#xA;Node started as:&#xD;&#xA;&#xD;&#xA;    [12:46 PM] user@macOS  [~/src/discovery]./target/debug/substrate&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    2023-03-01 12:46:36 Substrate Node&#xD;&#xA;    2023-03-01 12:46:36 ✌️  version 3.0.0-dev-b8baa73f3e3&#xD;&#xA;    2023-03-01 12:46:36 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2023&#xD;&#xA;    2023-03-01 12:46:36  Chain specification: Local Testnet&#xD;&#xA;    2023-03-01 12:46:36   Node name: Alice&#xD;&#xA;    2023-03-01 12:46:36  Role: AUTHORITY&#xD;&#xA;    2023-03-01 12:46:36  Database: RocksDb at /Users/user/Library/Application Support/substrate/chains/local_testnet/db/full&#xD;&#xA;    2023-03-01 12:46:36 ⛓  Native runtime: node-268 (substrate-node-0.tx2.au10)&#xD;&#xA;    2023-03-01 12:47:46  Creating empty BABE epoch changes on what appears to be first startup.&#xD;&#xA;    2023-03-01 12:47:46 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs&#xD;&#xA;    2023-03-01 12:47:46   Local node identity is: 12D3KooWKjFwQjfHF4m2rHL6fT9s6eoe7mfnUkpQy7SG9gASiBoY&#xD;&#xA;    2023-03-01 12:47:46  Operating system: macos&#xD;&#xA;    2023-03-01 12:47:46  CPU architecture: x86_64&#xD;&#xA;    2023-03-01 12:47:46  Highest known block at #0&#xD;&#xA;    2023-03-01 12:47:46 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;    2023-03-01 12:47:46 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=Some([&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;])&#xD;&#xA;    2023-03-01 12:47:46 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=Some([&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;])&#xD;&#xA;    2023-03-01 12:47:46  CPU score: 14MB/s&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any help is appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="28257" PostHistoryTypeId="1" PostId="7413" RevisionGUID="a345df50-2e80-4727-97e9-9b30b388b811" CreationDate="2023-03-01T08:58:45.200" UserId="2416" Text="Browser extention fails connecting to local substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="28258" PostHistoryTypeId="3" PostId="7413" RevisionGUID="a345df50-2e80-4727-97e9-9b30b388b811" CreationDate="2023-03-01T08:58:45.200" UserId="2416" Text="|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28259" PostHistoryTypeId="6" PostId="7402" RevisionGUID="1bd74254-67e4-4733-8b76-8e7a167b89fc" CreationDate="2023-03-01T09:36:14.137" UserId="2762" Comment="edited tags" Text="|storage|events|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28260" PostHistoryTypeId="2" PostId="7414" RevisionGUID="cf10c147-b07a-4631-bbfb-920dc92a708e" CreationDate="2023-03-01T10:05:17.243" UserId="2762" Text=" In BABE, the authorities are block producers.&#xD;&#xA;What you get when you query the nextAuthorities() is the `AuthorityId` and the `BabeAuthorityWeight`of the next block producers. &#xD;&#xA;&#xD;&#xA;    /// Next epoch authorities.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub(super) type NextAuthorities&lt;T: Config&gt; = StorageValue&lt;&#xD;&#xA;		_,&#xD;&#xA;		WeakBoundedVec&lt;(AuthorityId, BabeAuthorityWeight), T::MaxAuthorities&gt;,&#xD;&#xA;		ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;The AuthorityId you want to parse is the Babe authority identifier. Which is equivalent to the schnorrkel public key used in the main Babe module. See the definition [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/primitives/consensus/babe/src/lib.rs#L66" ContentLicense="CC BY-SA 4.0" />
  <row Id="28262" PostHistoryTypeId="2" PostId="7415" RevisionGUID="44b7cdeb-aabe-49fa-bcb6-5003a659fc0d" CreationDate="2023-03-01T10:11:25.960" UserId="251" Text="It looks like the rpc-cors rule refused this.&#xD;&#xA;&#xD;&#xA;Try running the node with `--rpc-cors all`." ContentLicense="CC BY-SA 4.0" />
  <row Id="28264" PostHistoryTypeId="2" PostId="7416" RevisionGUID="f0e2e6dc-f74e-47ad-96ba-34c74a386bcf" CreationDate="2023-03-01T11:02:34.747" UserId="94" Text="Weight annotations are only needed for `Call`s, not for internal pallet functions.  &#xD;&#xA;The weight of the internal pallet function will be included in the weigh of the `Call`. So for example:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(T::WeightInfo::my_call())]&#xD;&#xA;pub fn my_call(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;    ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;    Self::do_my_call()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when the FRAME benchmarking estimates the Weight of `my_call`, it will include `do_my_call`. These `do_*` function patterns are quite common in Substrate as it makes the functionality re-usable. For example in the [ranked-collective](https://github.com/paritytech/substrate/blob/cd79314a9b9db1a224d5b48e8c3ecccff269201a/frame/ranked-collective/src/lib.rs#L446) which just delegates the real work to an internal `do_` function. Having these `do_` functions is also useful to implement traits later on, so it is a good idea anyway." ContentLicense="CC BY-SA 4.0" />
  <row Id="28266" PostHistoryTypeId="50" PostId="6954" RevisionGUID="57061080-104a-4abc-a073-277d208753f7" CreationDate="2023-03-01T12:05:25.620" UserId="-1" />
  <row Id="28267" PostHistoryTypeId="2" PostId="7417" RevisionGUID="0148ba7e-f114-4418-89fe-f420845365d9" CreationDate="2023-03-01T13:30:05.287" UserId="3888" Text="https://github.com/paritytech/ink/issues/1692#issuecomment-1448643351&#xD;&#xA;&#xD;&#xA;Issue already submitted.&#xD;&#xA;&#xD;&#xA;The only solution I have found for now is to save both the file containing the e2e_tests and the one containing the contract with each modification (without performed cargo clean) and this works for me. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="28269" PostHistoryTypeId="2" PostId="7418" RevisionGUID="40ca2746-d4fb-4cbc-868a-3e1e1cde8839" CreationDate="2023-03-01T14:12:45.423" UserId="3889" Text="This is the case described here in the docs:&#xD;&#xA;https://github.com/PureStake/moonbeam/blob/master/precompiles/utils/macro/docs/precompile_macro.md#solidity-signatures-test&#xD;&#xA;&#xD;&#xA;It is because the macro automatically generates a test to ensure that the arguments of the functions match the Solidity signature you provide. However here one of your arguments is generic over R, which means its corresponding Solidity type could vary based on the configuration of your Runtime (it shouldn't however since the signature string cannot vary). It occurs as soon as you have at least one argument that use at least of the type parameters of your precompile.&#xD;&#xA;&#xD;&#xA;To fix the issue you should add the annotation `#[precompile::test_concrete_types(mock::Runtime)]` on the impl block by listing a concrete type for your Runtime, ideally a mock Runtime. If you have other type parameters you must provide concrete types for each in the same order.&#xD;&#xA;&#xD;&#xA;We'll see in the future if we can have a better error message." ContentLicense="CC BY-SA 4.0" />
  <row Id="28271" PostHistoryTypeId="52" PostId="7412" RevisionGUID="ed3721ee-af5f-4f6c-96ec-99930546e4e8" CreationDate="2023-03-01T14:16:24.483" />
  <row Id="28272" PostHistoryTypeId="2" PostId="7419" RevisionGUID="4a9cf610-780a-4593-bebe-965e6ad3c398" CreationDate="2023-03-01T16:00:49.333" UserId="2149" Text="I'm trying to run ZombieNet on macOS with Kubernetes. I've succeded to run it with native option, but Kubernetes fails with an error:&#xD;&#xA;```&#xD;&#xA;⚠ Can not access kubernetes, please check your config.&#xD;&#xA;```&#xD;&#xA;I installed Kubernetes through Docker Desctop and &quot;kubectl version --client&quot; command shows an output:&#xD;&#xA;```&#xD;&#xA;Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;21&quot;, GitVersion:&quot;v1.21.3&quot;, GitCommit:&quot;ca643a4d1f7bfe34773c74f79527be4afd95bf39&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-07-15T21:04:39Z&quot;, GoVersion:&quot;go1.16.6&quot;, Compiler:&quot;gc&quot;, Platform:&quot;darwin/amd64&quot;}&#xD;&#xA;```&#xD;&#xA;My config is:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;docker.io/paritypr/polkadot-debug:master&quot;&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 100&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;docker.io/paritypr/colander:master&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;```&#xD;&#xA;My command is:&#xD;&#xA;zombienet-macos -p kubernetes spawn kubernetes-network.toml" ContentLicense="CC BY-SA 4.0" />
  <row Id="28274" PostHistoryTypeId="1" PostId="7419" RevisionGUID="4a9cf610-780a-4593-bebe-965e6ad3c398" CreationDate="2023-03-01T16:00:49.333" UserId="2149" Text="ZombieNet + Kuberntetes + macOS" ContentLicense="CC BY-SA 4.0" />
  <row Id="28275" PostHistoryTypeId="3" PostId="7419" RevisionGUID="4a9cf610-780a-4593-bebe-965e6ad3c398" CreationDate="2023-03-01T16:00:49.333" UserId="2149" Text="|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28276" PostHistoryTypeId="5" PostId="7418" RevisionGUID="067ea0d7-d16b-4b70-81e9-bd110f61800c" CreationDate="2023-03-01T16:11:52.650" UserId="3889" Comment="added 226 characters in body" Text="This is the case described here in the docs:&#xD;&#xA;https://github.com/PureStake/moonbeam/blob/master/precompiles/utils/macro/docs/precompile_macro.md#solidity-signatures-test&#xD;&#xA;&#xD;&#xA;It is because the macro automatically generates a test to ensure that the arguments of the functions match the Solidity signature you provide. However here one of your arguments is generic over R, which means its corresponding Solidity type could vary based on the configuration of your Runtime (it shouldn't however since the signature string cannot vary). It occurs as soon as you have at least one argument that use at least of the type parameters of your precompile. Note that in your case the signature doesn't match, and you should prefer using non dependent types like H256 and add a bound like `AssetIdOf&lt;R&gt;: TryFrom&lt;H256&gt;`, which would give the Solidity signarure &quot;totalSupply(bytes32)&quot;.&#xD;&#xA;&#xD;&#xA;To fix the issue you should add the annotation `#[precompile::test_concrete_types(mock::Runtime)]` on the impl block by listing a concrete type for your Runtime, ideally a mock Runtime. If you have other type parameters you must provide concrete types for each in the same order.&#xD;&#xA;&#xD;&#xA;We'll see in the future if we can have a better error message." ContentLicense="CC BY-SA 4.0" />
  <row Id="28277" PostHistoryTypeId="2" PostId="7420" RevisionGUID="be85b9e4-e1dd-4e82-aade-c636ad617550" CreationDate="2023-03-01T16:21:37.193" UserId="429" Text="Initially, the project was using a specific branch for XCMv3 support, that's why it was throwing errors.&#xD;&#xA;Now the project has been updated with the official XCMv3 release." ContentLicense="CC BY-SA 4.0" />
  <row Id="28279" PostHistoryTypeId="2" PostId="7421" RevisionGUID="3dc387c8-4134-489d-8597-86abea11e9de" CreationDate="2023-03-01T16:22:21.580" UserId="2762" Text="In the contract_pallet there is a mapping between the code hash and the owner of the contract. (see the [code][1]).&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	pub(crate) type OwnerInfoOf&lt;T: Config&gt; = StorageMap&lt;_, Identity, CodeHash&lt;T&gt;, OwnerInfo&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;But I see that what you have is not the hash, is the account ID of the contract, then you will have to query first the [ContractInfoOf][2] which is a mapping between the contract accountId and the contract info (which includes [the code hash][3])&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	pub(crate) type ContractInfoOf&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Twox64Concat, T::AccountId, ContractInfo&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;Is possible to interact with the runtime from a ink! smart contract with  [chain extensions][4], see this previous StackExchange answers that has some examples of how to achieve that: &#xD;&#xA;- https://substrate.stackexchange.com/a/1954/2762&#xD;&#xA;- https://substrate.stackexchange.com/a/3949/2762&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/lib.rs#L911&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/lib.rs#L942&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/storage.rs#L55&#xD;&#xA;  [4]: https://use.ink/macros-attributes/chain-extension/" ContentLicense="CC BY-SA 4.0" />
  <row Id="28281" PostHistoryTypeId="2" PostId="7422" RevisionGUID="2ac57f8b-6648-4ef7-9a73-19a47b22d4b2" CreationDate="2023-03-01T16:31:11.173" UserId="2762" Text="The pallet_contracts has the storage `ContractInfoOf` (see in the [code][1]) which is a mapping of the contract info (that includes the [code hash][2]) associated with a given account.&#xD;&#xA;&#xD;&#xA;You can query all the elements stored here and get all the `account Ids` that matches your hash code.&#xD;&#xA;&#xD;&#xA;An example of the query using PolkadotJS UI:&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/lib.rs#L942&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/storage.rs#L55&#xD;&#xA;  [3]: https://i.stack.imgur.com/rViKp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="28283" PostHistoryTypeId="5" PostId="7406" RevisionGUID="1cb801fa-f6e4-4338-8679-5d2f753940fd" CreationDate="2023-03-01T16:59:46.397" UserId="29" Comment="added 1 character in body" Text="It looks like the logs are telling you that the onchain storage version is 1 and the migration is running with the storage version of 3 when the migration to 2 never happened.&#xD;&#xA;&#xD;&#xA;Every version could have its own storage migrations. It is recommended you upgrade version-by-version instead of between two distant versions." ContentLicense="CC BY-SA 4.0" />
  <row Id="28284" PostHistoryTypeId="2" PostId="7423" RevisionGUID="96c7c336-7f69-4804-9b89-3a57af8efec5" CreationDate="2023-03-01T17:44:56.670" UserId="28" Text="Normally, when you run `cargo build`, both the native and Wasm runtime, along with the whole client is generated as part of the build process.&#xD;&#xA;&#xD;&#xA;How would you compile just the Wasm runtime, so that you can easily create new Wasm to upload / upgrade your blockchain with?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28286" PostHistoryTypeId="1" PostId="7423" RevisionGUID="96c7c336-7f69-4804-9b89-3a57af8efec5" CreationDate="2023-03-01T17:44:56.670" UserId="28" Text="How to generate only the Wasm runtime during compilation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="28287" PostHistoryTypeId="3" PostId="7423" RevisionGUID="96c7c336-7f69-4804-9b89-3a57af8efec5" CreationDate="2023-03-01T17:44:56.670" UserId="28" Text="|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="28288" PostHistoryTypeId="2" PostId="7424" RevisionGUID="8a3c1f29-dceb-49ef-903c-18399cd518c3" CreationDate="2023-03-01T17:44:56.670" UserId="28" Text="You can find a script to do that in the Substrate repository here `./maintain/build-only-wasm.sh`:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/.maintain/build-only-wasm.sh&#xD;&#xA;&#xD;&#xA;For posterity, the script contents at the time of writing this post is:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;#!/usr/bin/env sh&#xD;&#xA;&#xD;&#xA;# Script for building only the WASM binary of the given project.&#xD;&#xA;&#xD;&#xA;set -e&#xD;&#xA;&#xD;&#xA;PROJECT_ROOT=`git rev-parse --show-toplevel`&#xD;&#xA;&#xD;&#xA;if [ &quot;$#&quot; -lt 1 ]; then&#xD;&#xA;  echo &quot;You need to pass the name of the crate you want to compile!&quot;&#xD;&#xA;  exit 1&#xD;&#xA;fi&#xD;&#xA;&#xD;&#xA;WASM_BUILDER_RUNNER=&quot;$PROJECT_ROOT/target/release/wbuild-runner/$1&quot;&#xD;&#xA;&#xD;&#xA;if [ -z &quot;$2&quot; ]; then&#xD;&#xA;  export WASM_TARGET_DIRECTORY=$(pwd)&#xD;&#xA;else&#xD;&#xA;  export WASM_TARGET_DIRECTORY=$2&#xD;&#xA;fi&#xD;&#xA;&#xD;&#xA;if [ -d $WASM_BUILDER_RUNNER ]; then&#xD;&#xA;  export DEBUG=false&#xD;&#xA;  export OUT_DIR=&quot;$PROJECT_ROOT/target/release/build&quot;&#xD;&#xA;  cargo run --release --manifest-path=&quot;$WASM_BUILDER_RUNNER/Cargo.toml&quot; \&#xD;&#xA;    | grep -vE &quot;cargo:rerun-if-|Executing build command&quot;&#xD;&#xA;else&#xD;&#xA;  cargo build --release -p $1&#xD;&#xA;fi&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="28290" PostHistoryTypeId="2" PostId="7425" RevisionGUID="181ab6ea-dc6b-4328-8f3c-a0a556755b7f" CreationDate="2023-03-01T22:18:18.427" UserId="3317" Text="The reason why you are getting a different value is because the accumulator contract is instantiated twice. First, when you uploaded and instantiated the accumulator contract. Second, when you uploaded and instantiated the delegator contract. &#xD;&#xA;&#xD;&#xA;In other words, when you increment the accumulator value directly through the accumulator contract, you are calling the first instance you created of the contract. When you call the `get()` message of the accumulator contract through the delegator contract, you are calling the second instance you created of the accumulator contract. This is because when you instantiated the delegator contract it also instantiated a new accumulator contract (see [code][1]).&#xD;&#xA;&#xD;&#xA;So if you want to call the `get()` message of the first instance of the accumulator contract through the delegator contract you need the `Contract` in stead of the `Code hash`, aka the AccountId of the contract. With the [`fn build_call()`][2] you then can build &amp; execute a call to another contract. With the [selector][3] you can specify which message to call within a contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Daanvdplas/ink-examples/blob/cacba92ad1fa78444fa87e9e85a02987cfb212d9/delegator/lib.rs#L62-L66&#xD;&#xA;  [2]: https://paritytech.github.io/ink/ink_env/call/fn.build_call.html&#xD;&#xA;  [3]: https://use.ink/macros-attributes/selector/" ContentLicense="CC BY-SA 4.0" />
  <row Id="29293" PostHistoryTypeId="5" PostId="7289" RevisionGUID="07064b2f-e4fb-412e-863b-fddccc256e18" CreationDate="2023-03-02T03:14:27.523" UserId="1959" Comment="deleted 6 characters in body" Text="In fact, it is almost impossible to have an algorithm to calculate the XCM fees for all chains. This is because the calculation of XCM fees is related to the following points, and **each chain may have different configurations**. &#xD;&#xA;&#xD;&#xA;1. [Weigher](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/pallet-xcm/src/lib.rs#L107): Means of measuring the weight consumed by an XCM message locally.&#xD;&#xA;&#xD;&#xA;It seems that most chains currently use [`FixedWeightBounds`](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L31), but the `UnitWeightCost` used by each chain may be different.&#xD;&#xA;&#xD;&#xA;2. [Trader](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-executor/src/config.rs#L54): The means of purchasing weight credit for XCM execution.&#xD;&#xA;&#xD;&#xA;Even on the same chain, different tokens may have different `Trader` because their values are different, they need different `WeightToFee`. For example, Acala does it [this way](https://github.com/AcalaNetwork/Acala/blob/release-acala-2.13.0/runtime/karura/src/xcm_config.rs#L177).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;However, I would like to write down the XCM fee **calculation process** at an abstract level here, so that we can do the calculation for different chains.&#xD;&#xA;&#xD;&#xA;The calculation of XCM fees can be divided into two steps. The first step is to calculate the weight, and the second step is to calculate the fee with the weight.&#xD;&#xA;&#xD;&#xA;1. For the **weight**, most chains that use `FixedWeightBounds`&#xD;&#xA;   - [Weight = XCM instruction count * WeighPerInstruction + Transact weight](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L46) &#xD;&#xA;&#xD;&#xA;   (Note that instructions used in `SetErrorHandler` and `SetAppendix` also count towards the instruction count)&#xD;&#xA;2. Use `WeightToFee`to calculate **fee**. There are two commonly used methods.&#xD;&#xA;   - [ConstantMultiplier](https://github.com/paritytech/substrate/blob/polkadot-v0.9.37/primitives/weights/src/lib.rs#L224): Fee = Weight * FeePerWeight&#xD;&#xA;   - [FixedRate](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L156): Fee = FeePerSecond * (Weight / WeightPerSecond)&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For @VitalyPeryatin's comment:&#xD;&#xA;&gt; Where can I found what chains use FixedWeightBounds for the weight?&#xD;&#xA;&#xD;&#xA;You could check the `impl xcm_executor::Config` code in the repo of the chain. For example, Darwinia config [`type Weigher = FixedWeightBounds`](https://github.com/darwinia-network/darwinia-parachain/blob/v5.3.6/runtime/darwinia-parachain/src/pallets/polkadot_xcm.rs#L166).&#xD;&#xA;&#xD;&#xA;&gt; What other types exists except FixedWeightBounds?&#xD;&#xA;&#xD;&#xA;[`WeightInfoBounds`](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-builder/src/weight.rs#L69), and [Westend used it here](https://github.com/paritytech/polkadot/blob/release-v0.9.37/runtime/westend/src/xcm_config.rs#L112). Note any struct which impl trait [WeightBounds](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/xcm-executor/src/traits/weight.rs#L22) could be used here.&#xD;&#xA;&#xD;&#xA;&gt; Where can I found Transact weight?&#xD;&#xA;&#xD;&#xA;`Transact` is an instruction in XCM, if not used, the weight is 0, if used, it can be obtained from its parameters [`require_weight_at_most`](https://github.com/paritytech/polkadot/blob/release-v0.9.37/xcm/src/v2/mod.rs#L342). (*Just a reminder: This weight is not the actual weight required to execute the `call`, but an upper limit weight specified for `call` execution when sending XCM.*)" ContentLicense="CC BY-SA 4.0" />
  <row Id="29294" PostHistoryTypeId="2" PostId="7426" RevisionGUID="420d267c-bc29-4c62-8523-6fc33810009a" CreationDate="2023-03-02T06:19:29.650" UserId="116" Text="I'm trying to sync a parachain node from scratch with a client upgraded to `polkadot0.9.37`&#xD;&#xA;&#xD;&#xA;I have experienced crashes and restarts after a few hours and with every subsequent restart it seems to take longer to restart the node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In this log I found a gap for several hours&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-02 10:53:18.588  INFO main sc_cli::runner: Nodle Parachain Collator    &#xD;&#xA;2023-03-02 10:53:18.588  INFO main sc_cli::runner: ✌️  version 2.0.26-5632a16685e    &#xD;&#xA;2023-03-02 10:53:18.588  INFO main sc_cli::runner: ❤️  by Nodle &lt;support@nodle.com&gt;:Parity Technologies &lt;admin@parity.io&gt;, 2020-2023    &#xD;&#xA;2023-03-02 10:53:18.588  INFO main sc_cli::runner:  Chain specification: Nodle Parachain    &#xD;&#xA;2023-03-02 10:53:18.588  INFO main sc_cli::runner:   Node name: fretful-rings-3704    &#xD;&#xA;2023-03-02 10:53:18.588  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-03-02 10:53:18.588  INFO main sc_cli::runner:  Database: RocksDb at .testdrivedata-master/chains/para_eden/db/full    &#xD;&#xA;2023-03-02 10:53:18.588  INFO main sc_cli::runner: ⛓  Native runtime: nodle-para-17 (nodle-para-0.tx6.au1)    &#xD;&#xA;2023-03-02 10:53:24.642  INFO main nodle_parachain::command: Parachain id: Id(2026)    &#xD;&#xA;2023-03-02 10:53:24.642  INFO main nodle_parachain::command: Parachain Account: 5Ec4AhPa9Z5gxN6u3dL6bydrbCkwpiaWuvanrZKegBPQUXMk    &#xD;&#xA;2023-03-02 10:53:24.642  INFO main nodle_parachain::command: Parachain genesis state: 0x00000000000000000000000000000000000000000000000000000000000000000041acf2b680686c9cb62433905459d97c5e820e1674c08e7ad66d2a307305634003170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2023-03-02 10:53:24.642  INFO main nodle_parachain::command: Is collating: yes    &#xD;&#xA;2023-03-02 14:59:18.987  INFO main sub-libp2p: [Relaychain]   Local node identity is: 12D3KooWHxy6acp5PmoatkbudPqGG9PVQdxKbvkiCgaPJTtdR1MW    &#xD;&#xA;2023-03-02 14:59:18.991  WARN main sub-libp2p: [Relaychain] Can't listen on /ip6/::/tcp/30334/ws because: Other(Custom { kind: Other, error: Other(A(A(A(A(Transport(A(Transport(Os { code: 98, kind: AddrInUse, message: &quot;Address already in use&quot; })))))))) })    &#xD;&#xA;2023-03-02 14:59:18.991  WARN main sub-libp2p: [Relaychain] Can't listen on /ip4/0.0.0.0/tcp/30334/ws because: Other(Custom { kind: Other, error: Other(A(A(A(A(Transport(A(Transport(Os { code: 98, kind: AddrInUse, message: &quot;Address already in use&quot; })))))))) })    &#xD;&#xA;2023-03-02 14:59:20.591  INFO main sc_sysinfo: [Relaychain]  Operating system: linux    &#xD;&#xA;2023-03-02 14:59:20.591  INFO main sc_sysinfo: [Relaychain]  CPU architecture: x86_64    &#xD;&#xA;2023-03-02 14:59:20.591  INFO main sc_sysinfo: [Relaychain]  Target environment: gnu    &#xD;&#xA;2023-03-02 14:59:20.591  INFO main sc_sysinfo: [Relaychain]  CPU: 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz    &#xD;&#xA;2023-03-02 14:59:20.591  INFO main sc_sysinfo: [Relaychain]  CPU cores: 8    &#xD;&#xA;2023-03-02 14:59:20.591  INFO main sc_sysinfo: [Relaychain]  Memory: 63923MB    &#xD;&#xA;2023-03-02 14:59:20.591  INFO main sc_sysinfo: [Relaychain]  Kernel: 5.14.0-1057-oem    &#xD;&#xA;2023-03-02 14:59:20.591  INFO main sc_sysinfo: [Relaychain]  Linux distribution: Linux Mint 20.2    &#xD;&#xA;2023-03-02 14:59:20.591  INFO main sc_sysinfo: [Relaychain]  Virtual machine: no    &#xD;&#xA;2023-03-02 14:59:20.591  INFO main sc_service::builder: [Relaychain]  Highest known block at #9710531    &#xD;&#xA;2023-03-02 14:59:20.595  INFO main sc_rpc_server: [Relaychain] Running JSON-RPC HTTP server: addr=127.0.0.1:42981, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]    &#xD;&#xA;2023-03-02 14:59:20.596  INFO main sc_rpc_server: [Relaychain] Running JSON-RPC WS server: addr=127.0.0.1:40447, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]    &#xD;&#xA;2023-03-02 14:59:20.596  INFO main sc_sysinfo: [Relaychain]  CPU score: 988.39 MiBs    &#xD;&#xA;2023-03-02 14:59:20.596  INFO main sc_sysinfo: [Relaychain]  Memory score: 11.40 GiBs    &#xD;&#xA;2023-03-02 14:59:20.596  INFO main sc_sysinfo: [Relaychain]  Disk score (seq. writes): 53.57 MiBs    &#xD;&#xA;2023-03-02 14:59:20.596  INFO main sc_sysinfo: [Relaychain]  Disk score (rand. writes): 29.16 MiBs   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is it doing between `10:53:24.642`  and `14:59:18.987` ? In the earliest logs I captured this gap was only a few seconds." ContentLicense="CC BY-SA 4.0" />
  <row Id="29296" PostHistoryTypeId="1" PostId="7426" RevisionGUID="420d267c-bc29-4c62-8523-6fc33810009a" CreationDate="2023-03-02T06:19:29.650" UserId="116" Text="What is taking so long time when restarting sync of a new node" ContentLicense="CC BY-SA 4.0" />
  <row Id="29297" PostHistoryTypeId="3" PostId="7426" RevisionGUID="420d267c-bc29-4c62-8523-6fc33810009a" CreationDate="2023-03-02T06:19:29.650" UserId="116" Text="|parachain|sync|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29298" PostHistoryTypeId="2" PostId="7427" RevisionGUID="8f1a8fc6-9418-4a47-81bd-93803e77b6f2" CreationDate="2023-03-02T06:57:48.303" UserId="251" Text="It looks like you are using a pretty old HHD.&#xD;&#xA;&#xD;&#xA;It takes a long time to load the data.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-02 14:59:20.596  INFO main sc_sysinfo: [Relaychain]  Disk score (seq. writes): 53.57 MiBs    &#xD;&#xA;2023-03-02 14:59:20.596  INFO main sc_sysinfo: [Relaychain]  Disk score (rand. writes): 29.16 MiBs&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm using SSD. And It still takes a few seconds on my side.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-02 14:56:14 [Relaychain]  Disk score (seq. writes): 9.70 GiBs    &#xD;&#xA;2023-03-02 14:56:14 [Relaychain]  Disk score (rand. writes): 3.49 GiBs &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, I think the only option is upgrading your hardware." ContentLicense="CC BY-SA 4.0" />
  <row Id="29300" PostHistoryTypeId="2" PostId="7428" RevisionGUID="bf13e8af-e0ee-4fbc-9db6-f44ba4864662" CreationDate="2023-03-02T08:01:51.920" UserId="3309" Text="If your RPC is inaccessible here you can generally add one of the following:&#xD;&#xA;&#xD;&#xA;- `--rpc-cors &lt;origins&gt;`&#xD;&#xA;- `--unsafe-rpc-external` &#xD;&#xA;- `--unsafe-rpc-external`&#xD;&#xA;&#xD;&#xA;Although as AurevoirXavier says you probably only need the first one.&#xD;&#xA;&#xD;&#xA;Source: https://docs.substrate.io/reference/command-line-tools/node-template/&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29302" PostHistoryTypeId="5" PostId="7420" RevisionGUID="cd32a23a-97b2-430b-8332-a6213da19cff" CreationDate="2023-03-02T08:26:50.103" UserId="429" Comment="added 80 characters in body" Text="Initially, the project was using a specific branch for XCMv3 support, that's why it was throwing errors.&#xD;&#xA;Now the project has been updated with the official XCMv3 release.&#xD;&#xA;&#xD;&#xA;*Note*: You have to use the same Cargo.lock which is present in the project." ContentLicense="CC BY-SA 4.0" />
  <row Id="29303" PostHistoryTypeId="2" PostId="7429" RevisionGUID="d9567720-e523-47d0-91e5-b2dad3e6c6ab" CreationDate="2023-03-02T08:52:24.660" UserId="567" Text="I don't think this is related of the size (of your contract) you can still tweak this [value](https://github.com/paritytech/substrate-contracts-node/blob/fe44851126245fec8bf17a39f618d7ce54d0bc76/runtime/src/lib.rs#L364) and check. But this will happen at upload time not at call time.&#xD;&#xA;&#xD;&#xA;One great option would be to add ink! e2e tests it will be easier to debug. &#xD;&#xA;&#xD;&#xA;Can you share which node &amp; version are you using ?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29305" PostHistoryTypeId="2" PostId="7430" RevisionGUID="d77cb684-33a8-41d4-be8d-799e06740354" CreationDate="2023-03-02T08:56:39.047" UserId="3545" Text="I want to add `contract` pallet into `polkadot-v0.9.31`, but there is no tutorial in [official documentation][1], and it seems that `pallet-contracts-rpc-runtime-api` not exists.&#xD;&#xA;How can I add `contract pallet` into `polkadot-v0.9.31`?&#xD;&#xA;&#xD;&#xA;cheers&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/" ContentLicense="CC BY-SA 4.0" />
  <row Id="29307" PostHistoryTypeId="1" PostId="7430" RevisionGUID="d77cb684-33a8-41d4-be8d-799e06740354" CreationDate="2023-03-02T08:56:39.047" UserId="3545" Text="how to add contract pallet into polkadot-v0.9.31" ContentLicense="CC BY-SA 4.0" />
  <row Id="29308" PostHistoryTypeId="3" PostId="7430" RevisionGUID="d77cb684-33a8-41d4-be8d-799e06740354" CreationDate="2023-03-02T08:56:39.047" UserId="3545" Text="|polkadot|substrate-node-template|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29309" PostHistoryTypeId="2" PostId="7431" RevisionGUID="18306e5d-14a8-4aa5-bb1c-c360468bbde5" CreationDate="2023-03-02T09:45:23.970" UserId="2762" Text="`pallet-contracts-rpc-runtime-api` doesn't have to be in the runtime anymore, see this previous StackExchange question: https://substrate.stackexchange.com/questions/6915/error-when-add-pallet-contracts-in-substrate-no-matching-package-named-pallet/6924#6924.&#xD;&#xA;&#xD;&#xA;And as suggested there use the [Contracts Rococo parachain][1] as an example of how to add the pallet contracts: check how to import it in the [Cargo.toml][2], in the [runtime][3] of your node and the [configuration][4] needed for the pallet contracts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/contracts/contracts-rococo/README.md&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/contracts/contracts-rococo/Cargo.toml#L50&#xD;&#xA;  [3]: https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/contracts/contracts-rococo/src/lib.rs&#xD;&#xA;  [4]: https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="29311" PostHistoryTypeId="5" PostId="7375" RevisionGUID="5e35bfd7-71d7-44bb-9cee-bf6719a5480c" CreationDate="2023-03-02T09:51:06.157" UserId="2762" Comment="added content" Text="This is an issue with the versions (check the pallet-contracts version of your substrate-contracts-node ). &#xD;&#xA;From [this issue][1] on the cargo-contract repository.&#xD;&#xA;&#xD;&#xA;&gt; The &quot;Node metadata is not fully compatible&quot; means that the instantiate call is not compatible with the version of pallet_contracts you are using. &#xD;&#xA;&#xD;&#xA;You can check the substrate documentation guide: [Prepare your First Contract][2] to see how to update your environment to the latest versions.&#xD;&#xA;&#xD;&#xA;For cargo-contract&#xD;&#xA;&#xD;&#xA;    cargo install --force --locked cargo-contract --version 2.0.0-rc&#xD;&#xA;&#xD;&#xA;Check the version of the pallet_contracts in your node, but if you are using the template contracts node, update it with:&#xD;&#xA;&#xD;&#xA;    cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag &lt;latest-tag&gt; --force --locked&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/616&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/smart-contracts/prepare-your-first-contract/" ContentLicense="CC BY-SA 4.0" />
  <row Id="29312" PostHistoryTypeId="5" PostId="7414" RevisionGUID="8954e218-1110-49f1-aaa9-064daf276a7f" CreationDate="2023-03-02T10:04:09.123" UserId="2762" Comment="added content" Text=" In BABE, the authorities are block producers.&#xD;&#xA;What you get when you query the nextAuthorities() is the `AuthorityId` and the `BabeAuthorityWeight`of the next block producers. &#xD;&#xA;&#xD;&#xA;    /// Next epoch authorities.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub(super) type NextAuthorities&lt;T: Config&gt; = StorageValue&lt;&#xD;&#xA;		_,&#xD;&#xA;		WeakBoundedVec&lt;(AuthorityId, BabeAuthorityWeight), T::MaxAuthorities&gt;,&#xD;&#xA;		ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;The AuthorityId you want to parse is the Babe authority identifier. Which is equivalent to the schnorrkel public key used in the main Babe module. See the definition [here][1].&#xD;&#xA;&#xD;&#xA;For the Heartbeat event you get the authority Id of the validator that has sent the heartbeat, which is a signed transaction.&#xD;&#xA;&#xD;&#xA;From the docs:&#xD;&#xA;&gt; If the local node is a validator (i.e. contains an authority key), this module gossips a heartbeat transaction with each new session. The heartbeat functions as a simple mechanism to signal that the node is online in the current era.&#xD;&#xA;&#xD;&#xA;See the event `HeartbeatReceived` on the [im-online pallet][2].&#xD;&#xA;&#xD;&#xA;    	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		/// A new heartbeat was received from `AuthorityId`.&#xD;&#xA;		HeartbeatReceived { authority_id: T::AuthorityId },&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/primitives/consensus/babe/src/lib.rs#L66&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/im-online/src/lib.rs#L374" ContentLicense="CC BY-SA 4.0" />
  <row Id="29319" PostHistoryTypeId="2" PostId="7433" RevisionGUID="a9830a1e-49c3-4665-b8c5-545342fdb73f" CreationDate="2023-03-02T12:09:32.917" UserId="3171" Text="**Error submitting a transaction to the pool: Transaction pool error: Invalid transaction validity: InvalidTransaction::ExhaustsResources**&#xD;&#xA;&#xD;&#xA;It works fine in standalone but in parachain it fails.&#xD;&#xA;&#xD;&#xA;Off chain worker in DIA oracle throw an error while tried to send extrinsic. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29321" PostHistoryTypeId="1" PostId="7433" RevisionGUID="a9830a1e-49c3-4665-b8c5-545342fdb73f" CreationDate="2023-03-02T12:09:32.917" UserId="3171" Text="Off-chain worker. Error submitting a transaction to the pool: InvalidTransaction::ExhaustsResources" ContentLicense="CC BY-SA 4.0" />
  <row Id="29322" PostHistoryTypeId="3" PostId="7433" RevisionGUID="a9830a1e-49c3-4665-b8c5-545342fdb73f" CreationDate="2023-03-02T12:09:32.917" UserId="3171" Text="|parachain|substrate-parachain-template|error|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29323" PostHistoryTypeId="2" PostId="7434" RevisionGUID="c1bf173b-bca6-47e8-a5c2-60df0c70eb22" CreationDate="2023-03-02T12:22:19.177" UserId="2384" Text="The benchmark is written as:&#xD;&#xA;```rust&#xD;&#xA;     one_extrinsic {&#xD;&#xA;        let caller: &lt;T as frame_system::Config&gt;::AccountId = make_account::&lt;T&gt;(1);&#xD;&#xA;&#xD;&#xA;        assert_eq!(&#xD;&#xA;            &lt;T as crate::Config&gt;::Currency::deposit_creating(&amp;caller, 10_000_000_u32.into()).peek(),&#xD;&#xA;            10_000_000_u32.into(),&#xD;&#xA;        );&#xD;&#xA;        &#xD;&#xA;        // ..&#xD;&#xA;&#xD;&#xA;    }: _(/* .. */)&#xD;&#xA;    verify {&#xD;&#xA;        // ..&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;where `&lt;T as crate::Config&gt;::Currency` is instance of `pallet_balances`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When running `cargo test bench_one_extrinsic --features runtime-benchmarks` the test is completed.&#xD;&#xA;&#xD;&#xA;But where running the actual benchmark `./collator benchmark pallet ..` The statement fails with&#xD;&#xA;```&#xD;&#xA; left: `0`,&#xD;&#xA; right: `10000000`', /../src/benchmarking.rs:164:9    &#xD;&#xA;Error: Input(&quot;Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n    0: 0x4cbb85 - &lt;unknown&gt;!rust_begin_unwind\n&quot;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29325" PostHistoryTypeId="1" PostId="7434" RevisionGUID="c1bf173b-bca6-47e8-a5c2-60df0c70eb22" CreationDate="2023-03-02T12:22:19.177" UserId="2384" Text="`Currency::create_deposit` of `pallet_balance` fail on actual runtime but passes on mock rutime" ContentLicense="CC BY-SA 4.0" />
  <row Id="29326" PostHistoryTypeId="3" PostId="7434" RevisionGUID="c1bf173b-bca6-47e8-a5c2-60df0c70eb22" CreationDate="2023-03-02T12:22:19.177" UserId="2384" Text="|benchmarking|balances|benchmark|tcurrency|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29327" PostHistoryTypeId="2" PostId="7435" RevisionGUID="59fb9e82-c9f7-4da8-a891-ed621ec1136f" CreationDate="2023-03-02T12:51:59.693" UserId="3171" Text="Wrong weighs are the actual problem.&#xD;&#xA;okay. there reason is the same as [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/7342/1010-invalid-transaction-transaction-would-exhaust-the-block-limits" ContentLicense="CC BY-SA 4.0" />
  <row Id="29329" PostHistoryTypeId="2" PostId="7436" RevisionGUID="20c8a531-a030-4dba-a6eb-8aa519e7439d" CreationDate="2023-03-02T13:27:27.940" UserId="251" Text="Check your runtime's `ExistentialDeposit`.&#xD;&#xA;&#xD;&#xA;`10_000_000_u32` might not be enough to create an account." ContentLicense="CC BY-SA 4.0" />
  <row Id="29332" PostHistoryTypeId="50" PostId="6957" RevisionGUID="7784b47d-d0f8-4554-9b07-9ab167dca27e" CreationDate="2023-03-02T14:03:40.420" UserId="-1" />
  <row Id="29333" PostHistoryTypeId="2" PostId="7437" RevisionGUID="6f0a2848-ba45-440e-b01a-bbe867419798" CreationDate="2023-03-03T00:18:10.687" UserId="87" Text="In the various frame pallets in substrate there are two ways of declaring storage.&#xD;&#xA;&#xD;&#xA;For example some pallet storage is declared with `&lt;T: Config&gt;` while others are declared `&lt;T: Config&lt;I&gt;, I: 'static = ()&gt;`&#xD;&#xA;&#xD;&#xA;`frame/whitelist/src/lib.rs`&#xD;&#xA;&#xD;&#xA;    pub type WhitelistedCall&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, T::Hash, (), OptionQuery&gt;; &#xD;&#xA;&#xD;&#xA;`frame/balances/src/lib.rs`&#xD;&#xA;&#xD;&#xA;    pub type TotalIssuance&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageValue&lt;_, T::Balance, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;It is not clear what the advantage of using the `'static` (long-lived) type is in this context. What is it?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29335" PostHistoryTypeId="1" PostId="7437" RevisionGUID="6f0a2848-ba45-440e-b01a-bbe867419798" CreationDate="2023-03-03T00:18:10.687" UserId="87" Text="Why do some storage items use the static type and others not?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29336" PostHistoryTypeId="3" PostId="7437" RevisionGUID="6f0a2848-ba45-440e-b01a-bbe867419798" CreationDate="2023-03-03T00:18:10.687" UserId="87" Text="|storage|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29337" PostHistoryTypeId="4" PostId="7426" RevisionGUID="a1e86d1f-9984-4e79-9c4b-5b53043b1ba3" CreationDate="2023-03-03T00:58:09.270" UserId="116" Comment="edited title - Use all available chars" Text="What is happening between `Is collating: yes` and ` Local node identity is:...` or why is it taking so long time to restart syncing of a crashed node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29340" PostHistoryTypeId="2" PostId="7439" RevisionGUID="6b1b7fd0-201f-4a2a-8371-1d607e0251a1" CreationDate="2023-03-03T01:25:56.980" UserId="116" Text="When syncing a new node from scratch it takes several days just to transfer and validate the polkadot chain. Comparing two runs reveals there are no simulates at all with the `sst` files.&#xD;&#xA;&#xD;&#xA;Is there an officially supported way to populate the db with the finalized blocks before starting the new node to speed up this process? Ideally it should be something that works for both the parachain and the relaychain, which could be incorporated in our build system" ContentLicense="CC BY-SA 4.0" />
  <row Id="29342" PostHistoryTypeId="1" PostId="7439" RevisionGUID="6b1b7fd0-201f-4a2a-8371-1d607e0251a1" CreationDate="2023-03-03T01:25:56.980" UserId="116" Text="Syncing a new node, prepopulate db with polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="29343" PostHistoryTypeId="3" PostId="7439" RevisionGUID="6b1b7fd0-201f-4a2a-8371-1d607e0251a1" CreationDate="2023-03-03T01:25:56.980" UserId="116" Text="|polkadot|parachain|rocks-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29344" PostHistoryTypeId="50" PostId="6900" RevisionGUID="30bc7f6c-73c7-4df0-abe0-35bdcd10728a" CreationDate="2023-03-03T03:06:10.703" UserId="-1" />
  <row Id="29345" PostHistoryTypeId="2" PostId="7440" RevisionGUID="4c50ca48-8b7b-4082-b232-23cf27675c45" CreationDate="2023-03-03T05:51:39.353" UserId="275" Text="In `ink::env` crate, it provides `ecdsa_recover` function.&#xD;&#xA;It returns compressed public key `&amp;[u8, 33]` as is explained [here][1].&#xD;&#xA;&#xD;&#xA;Assumed that `blake2` is used for hashing.&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn verify(&amp;self, req: ForwardRequest, signature: [u8; 65]) -&gt; bool {&#xD;&#xA;    let mut message_hash = &lt;ink::env::hash::Blake2x256 as ink::env::hash::HashOutput&gt;::Type::default();&#xD;&#xA;    ink::env::hash_encoded::&lt;ink::env::hash::Blake2x256, _&gt;(&amp;req, &amp;mut message_hash);&#xD;&#xA;&#xD;&#xA;    let output = self.env().ecdsa_recover(&amp;signature, &amp;message_hash).expect(&quot;Failed to recover&quot;);&#xD;&#xA;&#xD;&#xA;    let signature_account_id = // How to get AccountId from compressed public key?&#xD;&#xA;&#xD;&#xA;    todo!();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;(Above code before todo!() is not confirmed to work)&#xD;&#xA; &#xD;&#xA;How can I recover `AccountId` from compressed public key?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/fd0a45d68c8e3b61a5a3ca937b746e1f69a9e6b4/crates/env/src/api.rs#L510" ContentLicense="CC BY-SA 4.0" />
  <row Id="29347" PostHistoryTypeId="1" PostId="7440" RevisionGUID="4c50ca48-8b7b-4082-b232-23cf27675c45" CreationDate="2023-03-03T05:51:39.353" UserId="275" Text="How to recover AccountId from ECDSA signature in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="29348" PostHistoryTypeId="3" PostId="7440" RevisionGUID="4c50ca48-8b7b-4082-b232-23cf27675c45" CreationDate="2023-03-03T05:51:39.353" UserId="275" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29349" PostHistoryTypeId="2" PostId="7441" RevisionGUID="97529262-741a-4b79-9946-8acc2cfaf982" CreationDate="2023-03-03T05:57:37.117" UserId="73" Text="You can use `--sync warp` to sync close to the tip of the chain. Or you can also use a database backup and start your node with this. " ContentLicense="CC BY-SA 4.0" />
  <row Id="29355" PostHistoryTypeId="2" PostId="7443" RevisionGUID="e98f846e-6edd-42c8-a15d-630cff1579de" CreationDate="2023-03-03T06:13:19.113" UserId="73" Text="These are not really two ways of declaring storage. These are exactly the same. The only difference is that one pallet is instantiable, which means that you can add it multiple times to your runtime and the other is not instantiable, which means that you can only add it once to the runtime.&#xD;&#xA;&#xD;&#xA;The `I` is here the generic parameter to represent the instance. You will never instantiate this type, it only exists as a marker to make the pallet type &quot;unique&quot;. Internally FRAME uses the type system to identify pallets to generate stuff like the unique prefix per pallet used by the storage items. The `'static` bound is there just a requirement by the type system for stuff we are using. BTW, `T` is also bound to be `' static` because the super trait of your `Config` trait is the `frame_system::Config` which [is bound to `'static`][1]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/6e81199eac74ce9a7bf3b1c720989031dd9b18a1/frame/system/src/lib.rs#L206" ContentLicense="CC BY-SA 4.0" />
  <row Id="29359" PostHistoryTypeId="5" PostId="7440" RevisionGUID="33993353-185d-4338-9b0c-a6edd855fa09" CreationDate="2023-03-03T06:55:32.827" UserId="275" Comment="added 9 characters in body" Text="In ink! 4.0 `ink::env` crate, it provides `ecdsa_recover` function.&#xD;&#xA;It returns compressed public key `&amp;[u8, 33]` as is explained [here][1].&#xD;&#xA;&#xD;&#xA;Assumed that `blake2` is used for hashing.&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn verify(&amp;self, req: ForwardRequest, signature: [u8; 65]) -&gt; bool {&#xD;&#xA;    let mut message_hash = &lt;ink::env::hash::Blake2x256 as ink::env::hash::HashOutput&gt;::Type::default();&#xD;&#xA;    ink::env::hash_encoded::&lt;ink::env::hash::Blake2x256, _&gt;(&amp;req, &amp;mut message_hash);&#xD;&#xA;&#xD;&#xA;    let output = self.env().ecdsa_recover(&amp;signature, &amp;message_hash).expect(&quot;Failed to recover&quot;);&#xD;&#xA;&#xD;&#xA;    let signature_account_id = // How to get AccountId from compressed public key?&#xD;&#xA;&#xD;&#xA;    todo!();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;(Above code before todo!() is not confirmed to work)&#xD;&#xA; &#xD;&#xA;How can I recover `AccountId` from compressed public key?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/fd0a45d68c8e3b61a5a3ca937b746e1f69a9e6b4/crates/env/src/api.rs#L510" ContentLicense="CC BY-SA 4.0" />
  <row Id="29360" PostHistoryTypeId="5" PostId="7440" RevisionGUID="88df6542-c87b-4de9-92d0-b0879bb74a60" CreationDate="2023-03-03T08:09:15.037" UserId="275" Comment="added 7 characters in body" Text="In ink! 4.0 `ink::env` crate, it provides `ecdsa_recover` function.&#xD;&#xA;It returns compressed public key `&amp;[u8, 33]` as is explained [here][1].&#xD;&#xA;&#xD;&#xA;Assumed that `blake2` is used for hashing.&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn verify(&amp;self, req: ForwardRequest, signature: [u8; 65]) -&gt; bool {&#xD;&#xA;    let mut message_hash = &lt;ink::env::hash::Blake2x256 as ink::env::hash::HashOutput&gt;::Type::default();&#xD;&#xA;    ink::env::hash_encoded::&lt;ink::env::hash::Blake2x256, _&gt;(&amp;req, &amp;mut message_hash);&#xD;&#xA;&#xD;&#xA;    let output = self.env().ecdsa_recover(&amp;signature, &amp;message_hash).expect(&quot;Failed to recover&quot;);&#xD;&#xA;&#xD;&#xA;    let signature_account_id = // How to get AccountId from compressed public key?&#xD;&#xA;&#xD;&#xA;    todo!();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;(Above code before todo!() is not confirmed to work)&#xD;&#xA; &#xD;&#xA;How can I recover `AccountId` from compressed public key?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/fd0a45d68c8e3b61a5a3ca937b746e1f69a9e6b4/crates/ink/src/env_access.rs#L791" ContentLicense="CC BY-SA 4.0" />
  <row Id="29361" PostHistoryTypeId="2" PostId="7444" RevisionGUID="34bb6927-702a-4165-bc45-0b60a54dea1a" CreationDate="2023-03-03T08:16:35.737" UserId="386" Text="I'm currently exploring the possibility of having one solochain governed by another solochain using XCM and a trustless bridge. From my understanding, XCM is a communication standard used to facilitate cross-chain communication, and a trustless bridge enables interoperability between chains without requiring any trust between them.&#xD;&#xA;&#xD;&#xA;However, I'm not entirely sure how this would work in practice. Can anyone shed some light on how one solochain can govern another in this way? Are there any potential limitations or downsides to this approach? &#xD;&#xA;&#xD;&#xA;Thank you in advance for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="29363" PostHistoryTypeId="1" PostId="7444" RevisionGUID="34bb6927-702a-4165-bc45-0b60a54dea1a" CreationDate="2023-03-03T08:16:35.737" UserId="386" Text="Governance of one Solochain by Another using XCM and Trustless Bridge?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29364" PostHistoryTypeId="3" PostId="7444" RevisionGUID="34bb6927-702a-4165-bc45-0b60a54dea1a" CreationDate="2023-03-03T08:16:35.737" UserId="386" Text="|xcm|governance|solo-chain|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29365" PostHistoryTypeId="5" PostId="7444" RevisionGUID="f6455e17-bd27-402c-ba65-33e93098c500" CreationDate="2023-03-03T08:39:57.247" UserId="386" Comment="added 4 characters in body" Text="I'm currently exploring the possibility of having one solochain governed by another solochain using XCM and a trustless bridge. From my understanding, XCM is a communication standard used to facilitate cross-consensus communication, and a trustless bridge enables interoperability between chains without requiring any trust between them.&#xD;&#xA;&#xD;&#xA;However, I'm not entirely sure how this would work in practice. Can anyone shed some light on how one solochain can govern another in this way? Are there any potential limitations or downsides to this approach? &#xD;&#xA;&#xD;&#xA;Thank you in advance for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="29366" PostHistoryTypeId="2" PostId="7445" RevisionGUID="00b363bf-373a-4c62-9aac-fb4081bbb6d5" CreationDate="2023-03-03T09:23:44.200" UserId="1870" Text="I understand that off-chain workers are spawned during [block import][1], [quote][2]:&#xD;&#xA;&#xD;&#xA;&gt; Offchain workers are spawned during each block import. However, they aren't executed during initial blockchain synchronization.&#xD;&#xA;&#xD;&#xA;I was wondering if there is any way to configure OCWs to be spawned either:&#xD;&#xA;&#xD;&#xA; - in specific intervals, e.g. every 10 blocks, or&#xD;&#xA; - on demand (e.g. during block import on a specific height)&#xD;&#xA;&#xD;&#xA;?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/fundamentals/transaction-lifecycle/#block-authoring-and-block-imports&#xD;&#xA;  [2]: https://block%20import%20substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="29368" PostHistoryTypeId="1" PostId="7445" RevisionGUID="00b363bf-373a-4c62-9aac-fb4081bbb6d5" CreationDate="2023-03-03T09:23:44.200" UserId="1870" Text="Configure OCW to run every x blocks or on demand" ContentLicense="CC BY-SA 4.0" />
  <row Id="29369" PostHistoryTypeId="3" PostId="7445" RevisionGUID="00b363bf-373a-4c62-9aac-fb4081bbb6d5" CreationDate="2023-03-03T09:23:44.200" UserId="1870" Text="|offchain-worker|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29370" PostHistoryTypeId="2" PostId="7446" RevisionGUID="201421f5-d337-47ce-a524-266aa22c70a3" CreationDate="2023-03-03T09:38:53.807" UserId="620" Text="Yes, you can do this. Actually the system parachains on Polkadot already do allow governance from another chain: the Relay Chain.&#xD;&#xA;&#xD;&#xA;To separate things, XCM is a messaging format, and a bridge is a transport protocol. So you can see how system parachains delegate governance power (the Superuser or Root origin) to another chain by looking at the system parachains.&#xD;&#xA;&#xD;&#xA;The specific example to follow here is `ParentAsSuperuser`. This is a utility in [`xcm_builder`](https://github.com/paritytech/polkadot/blob/5a43bc7/xcm/xcm-builder/src/origin_conversion.rs#L56) that implements `ConvertOrigin` for this specific use case. And it gets used [here](https://github.com/paritytech/cumulus/blob/release-parachains-v9380/parachains/runtimes/assets/statemint/src/xcm_config.rs#L131) in Statemint.&#xD;&#xA;&#xD;&#xA;You will have to make your own `ConvertOrigin` that is related to the bridged location. That could look something like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct SomeOtherChainAsSuperuser&lt;RuntimeOrigin&gt;(PhantomData&lt;RuntimeOrigin&gt;);&#xD;&#xA;impl&lt;RuntimeOrigin: OriginTrait&gt; ConvertOrigin&lt;RuntimeOrigin&gt; for SomeOtherChainAsSuperuser&lt;RuntimeOrigin&gt; {&#xD;&#xA;	fn convert_origin(&#xD;&#xA;		origin: impl Into&lt;MultiLocation&gt;,&#xD;&#xA;		kind: OriginKind,&#xD;&#xA;	) -&gt; Result&lt;RuntimeOrigin, MultiLocation&gt; {&#xD;&#xA;		let origin = origin.into();&#xD;&#xA;		log::trace!(target: &quot;xcm::origin_conversion&quot;, &quot;SomeOtherChainAsSuperuser origin: {:?}, kind: {:?}&quot;, origin, kind);&#xD;&#xA;&#xD;&#xA;		// Set the conditions here that map to your bridge/message specifics:&#xD;&#xA;		if kind == OriginKind::Superuser &amp;&amp; /* set location conditions here */ {&#xD;&#xA;			Ok(RuntimeOrigin::root())&#xD;&#xA;		} else {&#xD;&#xA;			Err(origin)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29372" PostHistoryTypeId="2" PostId="7447" RevisionGUID="c51668ee-7f8f-436c-a9f0-005790303ed8" CreationDate="2023-03-03T09:44:36.807" UserId="2384" Text="You can access the block number inside the offchain worker so you can also encapsulate the whole logic inside the if clause.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;```rust&#xD;&#xA;fn offchain_worker() {&#xD;&#xA;    let current_block_num = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;    &#xD;&#xA;    if current_block_number % 10 == 0 {&#xD;&#xA;        logic_to_run_every_10_block();&#xD;&#xA;    } else if currenct_block_number == x {&#xD;&#xA;        logic_to_run_on_block_x();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29374" PostHistoryTypeId="5" PostId="7445" RevisionGUID="9dccedde-9f17-4835-9d7e-1d5a6d53bc76" CreationDate="2023-03-03T09:44:58.783" UserId="1870" Comment="added 43 characters in body" Text="I understand that off-chain workers are spawned during [block import][1], [quote][2]:&#xD;&#xA;&#xD;&#xA;&gt; Offchain workers are spawned during each block import. However, they aren't executed during initial blockchain synchronization.&#xD;&#xA;&#xD;&#xA;I was wondering if there is any way to configure OCWs to be spawned either:&#xD;&#xA;&#xD;&#xA; - in specific intervals, e.g. every 10 blocks, or&#xD;&#xA; - on demand (e.g. during block import on a specific height)&#xD;&#xA;&#xD;&#xA;?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/fundamentals/transaction-lifecycle/#block-authoring-and-block-imports&#xD;&#xA;  [2]: https://docs.substrate.io/fundamentals/offchain-operations/#off-chain-workers" ContentLicense="CC BY-SA 4.0" />
  <row Id="29375" PostHistoryTypeId="2" PostId="7448" RevisionGUID="7b0dc598-7495-4d60-8034-401c7430cdf6" CreationDate="2023-03-03T13:52:39.000" UserId="170" Text="To get the AccountId, you need to hash the compressed public key with Blake2x256&#xD;&#xA;&#xD;&#xA;I will just update your question - the output public key is not the output of `ecdsa_recover` now, see the function [here][1].&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;pub fn ecdsa_recover(&#xD;&#xA;    signature: &amp;[u8; 65],&#xD;&#xA;    message_hash: &amp;[u8; 32],&#xD;&#xA;    output: &amp;mut [u8; 33]&#xD;&#xA;) -&gt; Result&lt;()&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can hash the output value with Blake and get the AccountId.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/ink/ink_env/fn.ecdsa_recover.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="29377" PostHistoryTypeId="2" PostId="7449" RevisionGUID="3e9306ef-4c8d-433c-be07-2f6f5dc48fc1" CreationDate="2023-03-03T15:58:31.430" UserId="2025" Text="If an account sets a governance proxy, it basically allows the proxy to submit transactions related to any governance related pallet. These are Democracy, Council, Technical Committee, Phragmen Election, Treasury, Bounties, Tips, Utility and Child Bounties pallets. &#xD;&#xA;&#xD;&#xA;On the other hand, delegating voting power only applies to the Democracy pallet. It consists of giving the voting and conviction power to another account for voting in referenda. So any democracy vote performed by the delegated account will result in an additional vote from the delegating account. &#xD;&#xA;&#xD;&#xA;In summary, by setting a governance proxy you are giving a lot of more control of your tokens and action flexibility (dozens of different calls and functionality) than just delegating your voting power to another account (one functionality). &#xD;&#xA;&#xD;&#xA;Finally, it is noteworthy that in OpenGov (Governance 2.0), the concept of [multirole delegation](https://wiki.polkadot.network/docs/learn-opengov#multirole-delegation) is introduced. With this, you can specify a different delegate for every class of referendum in the system." ContentLicense="CC BY-SA 4.0" />
  <row Id="29379" PostHistoryTypeId="52" PostId="7444" RevisionGUID="f39305a7-ad5c-44fa-b3ba-14ac43cb3fc6" CreationDate="2023-03-03T16:16:55.247" />
  <row Id="29380" PostHistoryTypeId="2" PostId="7450" RevisionGUID="14fbe074-ca04-46a8-b543-1e2d573be7c5" CreationDate="2023-03-03T17:45:07.177" UserId="300" Text="`transaction_version` should increment if an extrinsic's parameters are modified. Same if an existing index changes for either an extrinsic or module.&#xD;&#xA;&#xD;&#xA;That makes sense. If a transaction that used to be valid and has been modified such that it is now invalid, but could be valid.&#xD;&#xA;&#xD;&#xA;It also does NOT need to change if we add NEW stuff.&#xD;&#xA;&#xD;&#xA;I don't understand why `transaction_version` should change (as implied from the docs) if an extrinsic or module is *removed*.&#xD;&#xA;&#xD;&#xA;Docs: https://paritytech.github.io/substrate/master/sp_version/struct.RuntimeVersion.html&#xD;&#xA;&#xD;&#xA;&gt; This number must change when ...a dispatchable being removed, a module being removed...&#xD;&#xA;&#xD;&#xA;Granted something can then construct a previously valid transaction, but will be rejected by the chain, but that doesn't appear to be a security risk.&#xD;&#xA;&#xD;&#xA;Any additional details to help understand this requirement or is it old documentation from before `#[pallet::call_index(n)]`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29382" PostHistoryTypeId="1" PostId="7450" RevisionGUID="14fbe074-ca04-46a8-b543-1e2d573be7c5" CreationDate="2023-03-03T17:45:07.177" UserId="300" Text="Why should transaction_version change with removals?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29383" PostHistoryTypeId="3" PostId="7450" RevisionGUID="14fbe074-ca04-46a8-b543-1e2d573be7c5" CreationDate="2023-03-03T17:45:07.177" UserId="300" Text="|runtime|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29384" PostHistoryTypeId="2" PostId="7451" RevisionGUID="1e5316ef-ff46-4804-9074-719de257cd55" CreationDate="2023-03-03T19:15:14.250" UserId="1789" Text="Use arrays to store your String because arrays work great with those struct macros below...(BoundedVec will not work with most of them):&#xD;&#xA;```rust&#xD;&#xA;    #[derive(Default, Encode, Decode, Clone, MaxEncodedLen, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;	pub struct UserInfo {&#xD;&#xA;		pub id: i64,&#xD;&#xA;		pub username: [u8; 20],&#xD;&#xA;    //BoundedVec&lt;u8, T::StringLimit&gt;,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;In your function argument, take input strings in Vec&lt;u8&gt; type, then pad the vector into arrays. See here: https://stackoverflow.com/questions/71578765/best-way-to-pad-a-vector-with-zero-bytes&#xD;&#xA;&#xD;&#xA;Also you can get the expected string size from pallet Config:&#xD;&#xA;```rust&#xD;&#xA;let expected_len = T::StringLimit::get() as usize;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29386" PostHistoryTypeId="2" PostId="7452" RevisionGUID="992767b6-c125-4d7c-bba3-2edede16c7d7" CreationDate="2023-03-03T19:21:14.443" UserId="251" Text="These are best practices I think.&#xD;&#xA;&#xD;&#xA;If you fix the index everywhere I think there is no need to update this version.&#xD;&#xA;&#xD;&#xA;But why not just bump it for better safety? Sometimes you might forget to fix the index." ContentLicense="CC BY-SA 4.0" />
  <row Id="29388" PostHistoryTypeId="5" PostId="7452" RevisionGUID="2bf1c98d-1f2a-4786-ab66-ef84c89bf9f5" CreationDate="2023-03-03T19:21:21.683" UserId="251" Comment="added 4 characters in body" Text="These are the best practices I think.&#xD;&#xA;&#xD;&#xA;If you fix the index everywhere I think there is no need to update this version.&#xD;&#xA;&#xD;&#xA;But why not just bump it for better safety? Sometimes you might forget to fix the index." ContentLicense="CC BY-SA 4.0" />
  <row Id="29389" PostHistoryTypeId="2" PostId="7453" RevisionGUID="cbb0a5b5-030f-4c5c-9327-452c97fc19c2" CreationDate="2023-03-03T19:43:49.123" UserId="73" Text="&gt; Any additional details to help understand this requirement or is it old documentation from before #[pallet::call_index(n)]?&#xD;&#xA;&#xD;&#xA;Sort of yes. As long as all calls are using a fixed index, you remove one call and the index isn't reused, you don't need to bump the tx version. So, yeah you are right!&#xD;&#xA;&#xD;&#xA;It isn't a security risk when the chain rejects the transaction. It is only a security risk if it may decodes to something different. " ContentLicense="CC BY-SA 4.0" />
  <row Id="29391" PostHistoryTypeId="2" PostId="7454" RevisionGUID="7f9666bf-3be9-4b6d-8e6d-df3be1feb6b7" CreationDate="2023-03-03T22:08:57.293" UserId="245" Text="I'm working on an ink! smart contract that will store the IPFS hash for each `AccountId`. I see that in EVM it's efficient to convert the hash to bytes32. What about in ink!, is `Vec&lt;u8&gt;` efficient enough?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct MyContract {&#xD;&#xA;    cids: Mapping&lt;AccountId, Vec&lt;u8&gt;&gt;,&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29393" PostHistoryTypeId="1" PostId="7454" RevisionGUID="7f9666bf-3be9-4b6d-8e6d-df3be1feb6b7" CreationDate="2023-03-03T22:08:57.293" UserId="245" Text="How to store IPFS hash on ink! smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29394" PostHistoryTypeId="3" PostId="7454" RevisionGUID="7f9666bf-3be9-4b6d-8e6d-df3be1feb6b7" CreationDate="2023-03-03T22:08:57.293" UserId="245" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29395" PostHistoryTypeId="2" PostId="7455" RevisionGUID="0d63f331-e8af-46cd-9e1a-8d494b486295" CreationDate="2023-03-04T00:55:29.263" UserId="29" Text="This code may help (or at least give you some insight):&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const getExtrinsic = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    const exampleBlockNumber = 7200920&#xD;&#xA;    const blockHash = await api.rpc.chain.getBlockHash(exampleBlockNumber);&#xD;&#xA;    const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;    const extrinsicHash = &quot;0xeb8f2a5af4a82a237e7e270ed6bd51ce82bb9253802259fd0fdb24212fe65260&quot;&#xD;&#xA;    signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;        if (extrinsicHash === ex.hash.toHex()) {&#xD;&#xA;            console.log(index, ex.toHuman());&#xD;&#xA;            const { method: { args, method, section } } = ex;&#xD;&#xA;            console.log(`${section}.${method}(${args.map((a) =&gt; a.toString()).join(', ')})`);&#xD;&#xA;        }&#xD;&#xA;    });&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;If you need any of the data that it returns in hex you can use: `.toHex()`" ContentLicense="CC BY-SA 4.0" />
  <row Id="29397" PostHistoryTypeId="2" PostId="7456" RevisionGUID="ce591a1b-1910-4072-9314-e9af1ed977ab" CreationDate="2023-03-04T01:09:02.463" UserId="29" Text="1. Once a certain threshold of pre-votes has been received, a primary block is selected. This is the block that will be finalized in the current round. The primary block is the block with the most pre-votes, and it must also have at least two-thirds of the total nominators behind it.&#xD;&#xA;&#xD;&#xA;2. No, a validator does not need to have the pre-votes of all the elected validators in order to make a pre-commit. Once a certain threshold of pre-votes has been reached, a primary block is selected for finalization in the current round. The nominated validators then send pre-commits for the selected block.&#xD;&#xA;&#xD;&#xA;3. No, a validator does not need the pre-commits of all the elected validators in order to make a commit" ContentLicense="CC BY-SA 4.0" />
  <row Id="29399" PostHistoryTypeId="52" PostId="7450" RevisionGUID="c51df71f-d748-4746-be8b-aa3d298e7478" CreationDate="2023-03-04T01:48:15.410" />
  <row Id="29400" PostHistoryTypeId="2" PostId="7457" RevisionGUID="76c38ef3-d486-4899-9601-bf4c0d90f459" CreationDate="2023-03-04T02:22:46.307" UserId="3899" Text="DispatchError: `ContractTrapped`&#xD;&#xA;&#xD;&#xA;DispatchError docs: `Contract trapped during execution.`&#xD;&#xA;&#xD;&#xA;Debug message:&#xD;&#xA;&#xD;&#xA;```panicked at 'encountered error while calling &lt;AccountId as PSP22&gt;::transfer_from: CalleeTrapped',...```&#xD;&#xA;&#xD;&#xA;This gets invoked when calling:&#xD;&#xA;```&#xD;&#xA;PSP22Ref::transfer_from(&#xD;&#xA;            &amp;token,&#xD;&#xA;            sender,&#xD;&#xA;            contract,&#xD;&#xA;            amount,&#xD;&#xA;            Vec::new(),&#xD;&#xA;        )?;&#xD;&#xA;```&#xD;&#xA;I do have checks prior to make sure the `sender` has greater or equal than `amount` of `token` in balance and allowance to the contract. The PSP22 token is initialized on my local chain. Not really sure why it tells me it's trapped.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29402" PostHistoryTypeId="1" PostId="7457" RevisionGUID="76c38ef3-d486-4899-9601-bf4c0d90f459" CreationDate="2023-03-04T02:22:46.307" UserId="3899" Text="ContracTrapped, transfer_from CalleeTrapped" ContentLicense="CC BY-SA 4.0" />
  <row Id="29403" PostHistoryTypeId="3" PostId="7457" RevisionGUID="76c38ef3-d486-4899-9601-bf4c0d90f459" CreationDate="2023-03-04T02:22:46.307" UserId="3899" Text="|transfer|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29404" PostHistoryTypeId="4" PostId="7457" RevisionGUID="8c70aa68-6cff-4955-b910-512a1a741558" CreationDate="2023-03-04T02:37:05.017" UserId="3899" Comment="edited title" Text="ContractTrapped, transfer_from CalleeTrapped" ContentLicense="CC BY-SA 4.0" />
  <row Id="29405" PostHistoryTypeId="5" PostId="7186" RevisionGUID="fdcd5021-2075-4ef7-baa3-7f2d36a6975f" CreationDate="2023-03-04T04:29:27.167" UserId="2526" Comment="English + formatting" Text="Polkadot-js has a pretty strict dependency tree outline where versions of different `@polkadot/*` packages need to match the root of `@polkadot/api`.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;`@polkadot/api -&gt; v9.14.1` requires `@polkadot/util -&gt; v10.4.1`&#xD;&#xA;So if you are using `v9.14.1` of the API, any package you consume from the [`polkadot-js/common`](https://github.com/polkadot-js/common) (i.e. `@polkadot/util-crypto`, `@polkadot/keyring`, etc.) repository should also be `v10.4.1`.&#xD;&#xA;&#xD;&#xA;This will ensure that there is no conflict in package versions and the above error won't happen. Also as a side note, updating to the latest version of each package will ensure they match, as releases will be in sync with each other." ContentLicense="CC BY-SA 4.0" />
  <row Id="29406" PostHistoryTypeId="24" PostId="7186" RevisionGUID="fdcd5021-2075-4ef7-baa3-7f2d36a6975f" CreationDate="2023-03-04T04:29:27.167" Comment="Proposed by 2526 approved by 34 edit id of 388" ContentLicense="CC BY-SA 4.0" />
  <row Id="29407" PostHistoryTypeId="5" PostId="7115" RevisionGUID="f6c5bed2-df77-46b8-b98f-807120227f15" CreationDate="2023-03-04T04:29:36.407" UserId="2526" Comment="English + formatting" Text="The answer to why `rustc --version` and `rustup show` versions were different was because I had `rustc` installed in various ways on the same machine. &#xD;&#xA;&#xD;&#xA;Run the command `which -a rustc` to find out their locations. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/opt/homebrew/bin/rustc&#xD;&#xA;/opt/homebrew/bin/rustc&#xD;&#xA;/Users/ramsey/.cargo/bin/rustc &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my situation I have `brew`-installed version(s), which I don't need. &#xD;&#xA;&#xD;&#xA;`brew uninstall rust`&#xD;&#xA;&#xD;&#xA;and then run `rustc --version` and `rustup show`, and the versions now match.&#xD;&#xA;&#xD;&#xA;Now the error `let...else are unstable` has disappeared. " ContentLicense="CC BY-SA 4.0" />
  <row Id="29408" PostHistoryTypeId="24" PostId="7115" RevisionGUID="f6c5bed2-df77-46b8-b98f-807120227f15" CreationDate="2023-03-04T04:29:36.407" Comment="Proposed by 2526 approved by 34 edit id of 390" ContentLicense="CC BY-SA 4.0" />
  <row Id="29409" PostHistoryTypeId="5" PostId="7122" RevisionGUID="1658dd47-7198-462d-8043-c518dbdb43d2" CreationDate="2023-03-04T04:29:43.107" UserId="2526" Comment="English + formatting" Text="In `substrate-node-template`, is there a way that I can use to create an extrinsic in outer-node?&#xD;&#xA;&#xD;&#xA;I want to specifically create an unsigned extrinsic for a specific pallet call and I found this [struct][1] that should do the job, but I don't know how to provide the arguments such as Call and I don't want to create an inherent, just an unsigned extrinsic for a specific pallet call.&#xD;&#xA;&#xD;&#xA;Previously I was using `subxt` but I want to do it manually since I am in the node directly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-runtime/latest/sp_runtime/generic/struct.UncheckedExtrinsic.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="29410" PostHistoryTypeId="4" PostId="7122" RevisionGUID="1658dd47-7198-462d-8043-c518dbdb43d2" CreationDate="2023-03-04T04:29:43.107" UserId="2526" Comment="English + formatting" Text="How to create an unsigned extrinsic in outer-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="29411" PostHistoryTypeId="24" PostId="7122" RevisionGUID="1658dd47-7198-462d-8043-c518dbdb43d2" CreationDate="2023-03-04T04:29:43.107" Comment="Proposed by 2526 approved by 34 edit id of 389" ContentLicense="CC BY-SA 4.0" />
  <row Id="29412" PostHistoryTypeId="2" PostId="7458" RevisionGUID="68c04f62-f76d-4a5a-b76a-a45d35fe9a4f" CreationDate="2023-03-04T06:16:40.740" UserId="2975" Text="I have a custom pallet that is tightly coupled to the utility pallet.  I am trying to call the batch function to perform a batch of balance transfers. The tests of the utility pallet (that create their own test runtime) construct a utility batch RuntimeCall with the syntax:&#xD;&#xA;```&#xD;&#xA;Utility::batch(&#xD;&#xA;			RuntimeOrigin::root(),&#xD;&#xA;			vec![&#xD;&#xA;				RuntimeCall::Balances(BalancesCall::force_transfer {&#xD;&#xA;					source: 1,&#xD;&#xA;					dest: 2,&#xD;&#xA;					value: 5&#xD;&#xA;				}),&#xD;&#xA;                    RuntimeCall::Balances(BalancesCall::force_transfer {&#xD;&#xA;                        source: 1,&#xD;&#xA;                        dest: 2,&#xD;&#xA;                        value: 5&#xD;&#xA;                    }),&#xD;&#xA;&#xD;&#xA;                ]&#xD;&#xA;            );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I use this in my (tightly coupled to utility pallet) custom pallet like so, :&#xD;&#xA;```&#xD;&#xA;let disp_result =&#xD;&#xA;&#xD;&#xA;			pallet_utility::Pallet::&lt;T&gt;::batch(&#xD;&#xA;				origin,&#xD;&#xA;				vec![&#xD;&#xA;					RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;						source: 1,&#xD;&#xA;						dest: 2,&#xD;&#xA;						value: 5&#xD;&#xA;					}),&#xD;&#xA;					RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;						source: 1,&#xD;&#xA;						dest: 2,&#xD;&#xA;						value: 5&#xD;&#xA;					}),&#xD;&#xA;					&#xD;&#xA;				]&#xD;&#xA;			);&#xD;&#xA;```&#xD;&#xA;the rust compiler gives me the error: &#xD;&#xA;```&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared type `RuntimeCall`&#xD;&#xA;   --&gt; pallets/clipbet2/src/lib.rs:364:6&#xD;&#xA;    |&#xD;&#xA;364 |                     RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;    |                     ^^^^^^^^^^^ use of undeclared type `RuntimeCall`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I specify the pallet Config such as: `pallet::Config::RuntimeCall::Balances(Call::force_transfer` The compiler gives me:&#xD;&#xA;```&#xD;&#xA;error[E0223]: ambiguous associated type&#xD;&#xA;   --&gt; pallets/clipbet2/src/lib.rs:364:6&#xD;&#xA;    |&#xD;&#xA;364 |                     pallet::Config::RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `&lt;Type as pallet::Config&gt;::RuntimeCall`&#xD;&#xA;```&#xD;&#xA;I realize it doesn't make sense to use the config trait and generics (such as `&lt;T as Config&gt;::RuntimeCall`) as I'm using the concrete Balances RuntimeCall to edit it's specific set of parameters.&#xD;&#xA;&#xD;&#xA;How can I get this to work? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29414" PostHistoryTypeId="1" PostId="7458" RevisionGUID="68c04f62-f76d-4a5a-b76a-a45d35fe9a4f" CreationDate="2023-03-04T06:16:40.740" UserId="2975" Text="How to call the batch function of the utility pallet from another pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="29415" PostHistoryTypeId="3" PostId="7458" RevisionGUID="68c04f62-f76d-4a5a-b76a-a45d35fe9a4f" CreationDate="2023-03-04T06:16:40.740" UserId="2975" Text="|runtime|call|batch|tight-coupling|generics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29416" PostHistoryTypeId="2" PostId="7459" RevisionGUID="5f47ad03-d53f-4f20-ad1d-324013433d8b" CreationDate="2023-03-04T17:38:53.567" UserId="88" Text="I'm trying to call a message on my ink! v3 smart contract using the polkadot-js `ContractPromise` but I'm getting the error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;system.ExtrinsicFailed::ExtrinsicFailed:: contracts.OutOfGas&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is how I'm making the call:&#xD;&#xA;&#xD;&#xA;```TS&#xD;&#xA;&#xD;&#xA;  const eventList: EventList[] = [];&#xD;&#xA;  const pr = new Promise((res, rej) =&gt; {&#xD;&#xA;    // Dry run the call&#xD;&#xA;    contract.query&#xD;&#xA;      .initiateVerficationFlow(address, {})&#xD;&#xA;      .then((value) =&gt; {&#xD;&#xA;        // create weightV2 type by calling registry.createType, similar to https://github.com/paritytech/contracts-ui/blob/master/src/helpers/callOptions.ts#L42&#xD;&#xA;        const gasLimit = getGasLimit(&#xD;&#xA;          value.gasRequired.refTime.toBn(),&#xD;&#xA;          value.gasRequired.proofSize.toBn(),&#xD;&#xA;          contract.registry&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;        // Make the call, and listen to events&#xD;&#xA;        contract.tx&#xD;&#xA;          .initiateVerficationFlow({&#xD;&#xA;            storageDepositLimit: value.storageDeposit.asCharge,&#xD;&#xA;            gasLimit: gasLimit,&#xD;&#xA;            value: 100n,&#xD;&#xA;          })&#xD;&#xA;          .signAndSend(&#xD;&#xA;            address,&#xD;&#xA;            signer,&#xD;&#xA;            handleEvents(contract.api as ApiPromise, [0, eventList], res, rej)&#xD;&#xA;          );&#xD;&#xA;      })&#xD;&#xA;      .catch(rej);&#xD;&#xA;  });&#xD;&#xA;&#xD;&#xA;  const response = await pr;&#xD;&#xA;  console.log(response);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I noticed that this call resolves successfully with the polkadot-js web app from ink-waterfall: https://polkadotjs-apps.web.app/ , and the contracts-ui https://contracts-ui.substrate.io/contract .&#xD;&#xA;&#xD;&#xA;Is there something I'm missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29418" PostHistoryTypeId="1" PostId="7459" RevisionGUID="5f47ad03-d53f-4f20-ad1d-324013433d8b" CreationDate="2023-03-04T17:38:53.567" UserId="88" Text="How to fix Contract.outOfGas error" ContentLicense="CC BY-SA 4.0" />
  <row Id="29419" PostHistoryTypeId="3" PostId="7459" RevisionGUID="5f47ad03-d53f-4f20-ad1d-324013433d8b" CreationDate="2023-03-04T17:38:53.567" UserId="88" Text="|polkadot-js|ink|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29420" PostHistoryTypeId="50" PostId="7040" RevisionGUID="7bef7085-236b-412d-aa85-c7f1b4d7f57a" CreationDate="2023-03-04T18:00:10.087" UserId="-1" />
  <row Id="29421" PostHistoryTypeId="50" PostId="5108" RevisionGUID="4c814d1b-6c92-40df-b5bb-f93475146da2" CreationDate="2023-03-04T21:07:35.930" UserId="-1" />
  <row Id="29422" PostHistoryTypeId="2" PostId="7460" RevisionGUID="c5628c9f-cee1-4e7b-89cd-a41d6d8aa849" CreationDate="2023-03-05T05:41:57.700" UserId="576" Text="How to instantiate contract on js?&#xD;&#xA;&#xD;&#xA;I know this command, instantiate from cli,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo contract instantiate --constructor new --args 1_000_000 true --suri //Alice --salt $(date +%s)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To do the same thing with javascript how to do that??&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// contract is already uploaded to contract node&#xD;&#xA;let contractaddress = '5EfCU8ya9BMZsJYi2ktxDuNHNSu8YYqJbU1shJhhzCtwLM6D'&#xD;&#xA;&#xD;&#xA;const { ContractPromise } = require('@polkadot/api-contract')&#xD;&#xA;const contract = new ContractPromise(api, abi, contractaddress);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;await api.tx.contracts.instantiateWithCode(0, codehash,'3000000000', 2000000, false,salt).signAndSend(alicePair);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it returns a object, Type(32) [Uint8Array] whats this...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29424" PostHistoryTypeId="1" PostId="7460" RevisionGUID="c5628c9f-cee1-4e7b-89cd-a41d6d8aa849" CreationDate="2023-03-05T05:41:57.700" UserId="576" Text="how to instantiate contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="29425" PostHistoryTypeId="3" PostId="7460" RevisionGUID="c5628c9f-cee1-4e7b-89cd-a41d6d8aa849" CreationDate="2023-03-05T05:41:57.700" UserId="576" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29426" PostHistoryTypeId="5" PostId="7460" RevisionGUID="c99813bd-c562-4143-8a92-f56cc0e54a84" CreationDate="2023-03-05T05:55:54.907" UserId="576" Comment="added 2 characters in body; edited title" Text="&#xD;&#xA;I know this command, instantiate from cli, with initial 1,000,000 supply &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo contract instantiate --constructor new --args 1_000_000 true --suri //Alice --salt $(date +%s)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To do the same thing with javascript how to do that??&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// contract is already uploaded to contract node&#xD;&#xA;let contractaddress = '5EfCU8ya9BMZsJYi2ktxDuNHNSu8YYqJbU1shJhhzCtwLM6D'&#xD;&#xA;&#xD;&#xA;const { ContractPromise } = require('@polkadot/api-contract')&#xD;&#xA;const contract = new ContractPromise(api, abi, contractaddress);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;await api.tx.contracts.instantiateWithCode(10000000, codehash,'3000000000', 2000000, false,salt).signAndSend(alicePair);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it returns a object, Type(32) [Uint8Array] whats this...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29427" PostHistoryTypeId="4" PostId="7460" RevisionGUID="c99813bd-c562-4143-8a92-f56cc0e54a84" CreationDate="2023-03-05T05:55:54.907" UserId="576" Comment="added 2 characters in body; edited title" Text="how to instantiate contract with initialSupply?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29428" PostHistoryTypeId="50" PostId="7075" RevisionGUID="132f03cf-6fd8-4df5-9c11-a023577b785a" CreationDate="2023-03-05T09:02:20.307" UserId="-1" />
  <row Id="29429" PostHistoryTypeId="10" PostId="7433" RevisionGUID="9459d759-54d9-4020-b0c1-2065ccfcea33" CreationDate="2023-03-05T09:18:41.697" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[7342],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="29430" PostHistoryTypeId="2" PostId="7461" RevisionGUID="fa3a66bb-ca91-43ea-9dee-0ffc165bba9a" CreationDate="2023-03-05T13:03:47.213" UserId="3437" Text="I am working on a scenario, where I have to upgrade my application and change account address type(from Substrate address to Ethereum address[similar to moonbeam unified account]).&#xD;&#xA;&#xD;&#xA;I made the corresponding changes. There is code version A which supports Substrate address and code version B supports Ethereum address. &#xD;&#xA;&#xD;&#xA;If I run code version B, it works fine. I am able to see balances of genesis accounts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I run code Version A and perform runtime upgrade for version B, balances of genesis accounts become zero after runtime upgrade.&#xD;&#xA;&#xD;&#xA;Unfortunately I won't be able to share code but any help/thought would be appreciable. &#xD;&#xA;&#xD;&#xA;Can someone please give me an idea what was happening inside?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29432" PostHistoryTypeId="1" PostId="7461" RevisionGUID="fa3a66bb-ca91-43ea-9dee-0ffc165bba9a" CreationDate="2023-03-05T13:03:47.213" UserId="3437" Text="Balance becomes zero after changing Account address type from Substrate address to Ethereum address" ContentLicense="CC BY-SA 4.0" />
  <row Id="29433" PostHistoryTypeId="3" PostId="7461" RevisionGUID="fa3a66bb-ca91-43ea-9dee-0ffc165bba9a" CreationDate="2023-03-05T13:03:47.213" UserId="3437" Text="|substrate-node-template|moonbeam|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29434" PostHistoryTypeId="2" PostId="7462" RevisionGUID="9c6dd1bb-4546-4336-aa7f-80ec8f161316" CreationDate="2023-03-05T13:09:20.377" UserId="251" Text="That's true.&#xD;&#xA;&#xD;&#xA;You shouldn't see any balances.&#xD;&#xA;&#xD;&#xA;Here is how the account data is stored:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Account StorageMap - 32 bytes -&gt; account data&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After the runtime upgrade it was changed to:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Account StorageMap - 20 bytes -&gt; account data&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But you didn't do any migration for the DB.&#xD;&#xA;&#xD;&#xA;The old data is still a `32 -&gt; data` map in the DB.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Check how I do the migration:&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-2.0/blob/92533724d8192f8917b51f0eaf5dc665bfe3317e/pallet/account-migration/src/lib.rs#L19-L41" ContentLicense="CC BY-SA 4.0" />
  <row Id="29436" PostHistoryTypeId="50" PostId="7071" RevisionGUID="257b63b2-e6bd-4f23-8b8d-e23f071cefa8" CreationDate="2023-03-05T14:05:05.683" UserId="-1" />
  <row Id="29437" PostHistoryTypeId="2" PostId="7463" RevisionGUID="81927465-62ae-4ae6-9cfd-71c6dfa4f499" CreationDate="2023-03-05T17:11:01.347" UserId="80" Text="The runtime calls shown on `https://polkadot.js.org/app` are not loaded from node metadata but probably hardcoded.&#xD;&#xA;&#xD;&#xA;To invoke runtime api calls, you will need to use the rpc extension method `state_call`(on the tab Developer &gt; RPC Calls) and pass method name and input as hex encoded value. &#xD;&#xA;&#xD;&#xA;An example of calling runtime api `pending_rewards` defined in NominationPoolsApi is here.&#xD;&#xA;&#xD;&#xA;[![example of invoking runtime api via polkadot.js app][1]][1]&#xD;&#xA;&#xD;&#xA;The output is scale encoded so you will need to decode it manually.&#xD;&#xA;&#xD;&#xA;You can also build your custom rpc calls which will show up automatically on polkadot js app. To do that, you will need to add your own rpc extension. There is a substrate recipe to do that &#xD;&#xA;https://substrate.recipes/custom-rpc.html.&#xD;&#xA;&#xD;&#xA;The extensions for polkadot node are declared here&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/rpc/src/lib.rs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OyOWD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29439" PostHistoryTypeId="2" PostId="7464" RevisionGUID="1165f41f-dd27-4051-b30a-5ad0f4296a65" CreationDate="2023-03-05T17:42:42.470" UserId="2149" Text="The problem was fixed after updating macOS, Docker Desktop and Resetting Kubernetes Cluster through Docker Desktop" ContentLicense="CC BY-SA 4.0" />
  <row Id="29441" PostHistoryTypeId="5" PostId="7463" RevisionGUID="143a3fc0-8d22-4f8e-9351-da75a79f5793" CreationDate="2023-03-05T18:33:10.060" UserId="80" Comment="added 151 characters in body" Text="The runtime calls shown on `https://polkadot.js.org/app` are not loaded from node metadata but probably hardcoded.&#xD;&#xA;&#xD;&#xA;To invoke runtime api calls, you will need to use the rpc extension method `state_call`(on the tab Developer &gt; RPC Calls) and pass method name and input as hex encoded value. &#xD;&#xA;&#xD;&#xA;An example of calling runtime api `pending_rewards` defined in NominationPoolsApi is here.&#xD;&#xA;&#xD;&#xA;[![example of invoking runtime api via polkadot.js app][1]][1]&#xD;&#xA;&#xD;&#xA;The output is scale encoded so you will need to decode it manually.&#xD;&#xA;&#xD;&#xA;You can also build your custom rpc calls which will show up automatically on polkadot js app. To do that, you will need to add your own rpc extension. There is a substrate recipe to do that &#xD;&#xA;https://substrate.recipes/custom-rpc.html.&#xD;&#xA;&#xD;&#xA;The extensions for polkadot node are declared here&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/rpc/src/lib.rs.&#xD;&#xA;&#xD;&#xA;**Update**:&#xD;&#xA;There is an [open issue][2] to add runtime api definitions in the metadata.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OyOWD.png&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/issues/11648" ContentLicense="CC BY-SA 4.0" />
  <row Id="29442" PostHistoryTypeId="2" PostId="7465" RevisionGUID="9a4c2d99-ea14-4935-a12f-d953a12d0a47" CreationDate="2023-03-06T05:34:27.210" UserId="464" Text="We have tested in local chain with a runtime upgrade to change the chainID of the EVM (with frontier). All seems ok, chain continue to run correctly with the new chainID. Except the fact that we will need to change the config of metamask, and some others clients does it break something in the chain or it is safe to proceed with a live chain, in other words is there something we mised before proceeding ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29444" PostHistoryTypeId="1" PostId="7465" RevisionGUID="9a4c2d99-ea14-4935-a12f-d953a12d0a47" CreationDate="2023-03-06T05:34:27.210" UserId="464" Text="Change chainID in frontier after chain is live" ContentLicense="CC BY-SA 4.0" />
  <row Id="29445" PostHistoryTypeId="3" PostId="7465" RevisionGUID="9a4c2d99-ea14-4935-a12f-d953a12d0a47" CreationDate="2023-03-06T05:34:27.210" UserId="464" Text="|frontier|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29446" PostHistoryTypeId="2" PostId="7466" RevisionGUID="c7323f30-19c1-490d-a4c5-b27971d813fc" CreationDate="2023-03-06T06:26:54.887" UserId="3919" Text="The log output is as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-06 06:12:54 ✨ Imported #2 (0xbbb2…9e44)&#xD;&#xA;2023-03-06 06:12:54 Accepting new connection 1/6&#xD;&#xA;2023-03-06 06:12:55 HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2023-03-06 06:12:55 Accepting new connection 1/6&#xD;&#xA;2023-03-06 06:12:55 HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2023-03-06 06:12:56 Accepting new connection 1/6&#xD;&#xA;2023-03-06 06:12:56 HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2023-03-06 06:12:56 Accepting new connection 1/6&#xD;&#xA;2023-03-06 06:12:56 HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2023-03-06 06:12:57  Idle (0 peers), best: #2 (0xbbb2…9e44), finalized #0 (0x25ff…4023), ⬇ 0 ⬆ 0&#xD;&#xA;2023-03-06 06:13:00  Starting consensus session on top of parent 0xbbb23b904a7058a68c12d7f5270d388aa6fa3a6fe67609ece14be14d3f249e44&#xD;&#xA;2023-03-06 06:13:00  Prepared block for proposing at 3 (0 ms) [hash: 0x5d86b31f614600f13cf5a02fee5b21d8ca54adaad2f9698ce6f088b42bfbc223; parent_hash: 0xbbb2…9e44; extrinsics (1): [0x61c0…89ad]]&#xD;&#xA;2023-03-06 06:13:00  Pre-sealed block for proposal at 3. Hash now 0x8f4e0c9713d8c09528fc0ee97e8760362871e927b332ec8e6acb42d2f8475dab, previously 0x5d86b31f614600f13cf5a02fee5b21d8ca54adaad2f9698ce6f088b42bfbc223.&#xD;&#xA;2023-03-06 06:13:00 ✨ Imported #3 (0x8f4e…5dab)&#xD;&#xA;2023-03-06 06:13:02  Idle (0 peers), best: #3 (0x8f4e…5dab), finalized #1 (0xd309…f431), ⬇ 0 ⬆ 0&#xD;&#xA;2023-03-06 06:13:02 Accepting new connection 1/6&#xD;&#xA;2023-03-06 06:13:02 HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2023-03-06 06:13:02 Accepting new connection 1/6&#xD;&#xA;2023-03-06 06:13:02 HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2023-03-06 06:13:03 Accepting new connection 1/6&#xD;&#xA;2023-03-06 06:13:03 HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2023-03-06 06:13:03 Accepting new connection 1/6&#xD;&#xA;2023-03-06 06:13:03 HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Start command:&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--dev \&#xD;&#xA;--port 30323 --ws-port 9924 --rpc-port 9923 \&#xD;&#xA;--rpc-cors=all --rpc-external --ws-external \&#xD;&#xA;--rpc-methods=unsafe \&#xD;&#xA;--ws-max-connections 6&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the problem???&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29448" PostHistoryTypeId="1" PostId="7466" RevisionGUID="c7323f30-19c1-490d-a4c5-b27971d813fc" CreationDate="2023-03-06T06:26:54.887" UserId="3919" Text="hyper::Error(Parse(Method))" ContentLicense="CC BY-SA 4.0" />
  <row Id="29449" PostHistoryTypeId="3" PostId="7466" RevisionGUID="c7323f30-19c1-490d-a4c5-b27971d813fc" CreationDate="2023-03-06T06:26:54.887" UserId="3919" Text="|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29450" PostHistoryTypeId="2" PostId="7467" RevisionGUID="a8fe6655-cc91-4a2f-9ea1-c50ba6d4dbee" CreationDate="2023-03-06T09:35:59.093" UserId="354" Text="I am running substrate on `polkadot-v0.9.25`, and I want to upgrade it to `polkadot-v0.9.36`, so I took the normal approach that has been suggested in many questions, that is to do a runtime upgrade and change the client but after doing so block production stops after an epoch of runtime upgrade and there is no error that i can see in the logs. I have tried the runtime upgrade in development mode with an epoch time of 2mins, does anybody have any suggestions to solve this?&#xD;&#xA;&#xD;&#xA;Log after runtime upgrade [![Upgrade logs][1]][1]&#xD;&#xA;&#xD;&#xA;Block production stops after an epoch [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qGwR8.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/cksSS.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29452" PostHistoryTypeId="1" PostId="7467" RevisionGUID="a8fe6655-cc91-4a2f-9ea1-c50ba6d4dbee" CreationDate="2023-03-06T09:35:59.093" UserId="354" Text="Version Upgrade issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="29453" PostHistoryTypeId="3" PostId="7467" RevisionGUID="a8fe6655-cc91-4a2f-9ea1-c50ba6d4dbee" CreationDate="2023-03-06T09:35:59.093" UserId="354" Text="|polkadot|substrate-node-template|runtime-upgrade|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29454" PostHistoryTypeId="2" PostId="7468" RevisionGUID="c3d45da6-526a-46b8-be0e-2333bca0bb0d" CreationDate="2023-03-06T09:48:50.610" UserId="251" Text="You can not jump from `0.9.25` to `0.9.36` directly.&#xD;&#xA;&#xD;&#xA;Sometimes this works, but sometimes not.&#xD;&#xA;&#xD;&#xA;You need to check if there were any critical migrations.&#xD;&#xA;&#xD;&#xA;If you miss one of them your chain might be bricked.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Also, the version changed so much. I don't know if you did the code upgrade correctly which might also cause this." ContentLicense="CC BY-SA 4.0" />
  <row Id="29456" PostHistoryTypeId="5" PostId="7448" RevisionGUID="02e18a25-fa51-47a3-9792-806b207b61e9" CreationDate="2023-03-06T10:30:40.310" UserId="170" Comment="update answer about different ink! versions" Text="To get the AccountId, you need to hash the compressed public key with Blake2x256&#xD;&#xA;&#xD;&#xA;I will just update your question - the function used in the question (where the output public key is the output of `ecdsa_recover`) is for ink! version &lt; 4.0.0, ink! v4's `ecdsa_recover` function stores the output public key in the third parameter `output`, see the function [here][1].&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;pub fn ecdsa_recover(&#xD;&#xA;    signature: &amp;[u8; 65],&#xD;&#xA;    message_hash: &amp;[u8; 32],&#xD;&#xA;    output: &amp;mut [u8; 33]&#xD;&#xA;) -&gt; Result&lt;()&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can hash the output value with Blake and get the AccountId.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/ink/ink_env/fn.ecdsa_recover.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="29457" PostHistoryTypeId="4" PostId="7458" RevisionGUID="930fca08-e108-4927-9557-d5d14116aa6d" CreationDate="2023-03-06T10:54:31.117" UserId="2975" Comment="edited title" Text="How to create a RuntimeCall with custom values and submit it to the utility pallet's batch function" ContentLicense="CC BY-SA 4.0" />
  <row Id="29458" PostHistoryTypeId="4" PostId="7458" RevisionGUID="6e175b99-d2cc-48bb-8c01-8c964a11bc73" CreationDate="2023-03-06T10:54:59.787" UserId="2975" Comment="edited title" Text="How to create a RuntimeCall with custom values and submit it to the utility pallet's batch function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29459" PostHistoryTypeId="2" PostId="7469" RevisionGUID="9cf67ba8-f4c6-4b93-adb0-dc36e5cf9b71" CreationDate="2023-03-06T11:20:18.680" UserId="3711" Text="I'm using a [`Vec&lt;T&gt;`][1] in `ink!`. When allocating elements to the vec, the underlying array may be resized to provide an constant amortised push complexity of O(1). This means that sometimes the vec has unused space (e.g. 5 items in the vec but the underlying array has length 8 with 3 null elements).&#xD;&#xA;&#xD;&#xA;Does the vec get stored with or without the unused space in the smart contract?&#xD;&#xA;&#xD;&#xA;I am currently considering calling [`shrink_to_fit()`][2] before saving the vec in smart contract storage in order to save space. However, I'm hoping `ink!` does this automatically.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ink_prelude/4.0.1/ink_prelude/vec/struct.Vec.html&#xD;&#xA;  [2]: https://docs.rs/ink_prelude/4.0.1/ink_prelude/vec/struct.Vec.html#method.shrink_to_fit" ContentLicense="CC BY-SA 4.0" />
  <row Id="29461" PostHistoryTypeId="1" PostId="7469" RevisionGUID="9cf67ba8-f4c6-4b93-adb0-dc36e5cf9b71" CreationDate="2023-03-06T11:20:18.680" UserId="3711" Text="Are Vec&lt;T&gt; stored with unused space in ink!?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29462" PostHistoryTypeId="3" PostId="7469" RevisionGUID="9cf67ba8-f4c6-4b93-adb0-dc36e5cf9b71" CreationDate="2023-03-06T11:20:18.680" UserId="3711" Text="|ink|storage|vec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29463" PostHistoryTypeId="2" PostId="7470" RevisionGUID="55fcd3a5-3a1b-4520-b3f6-7916aad38810" CreationDate="2023-03-06T11:33:47.873" UserId="3098" Text="Hi as described in https://github.com/paritytech/ink/blob/master/CHANGELOG.md#storage-rework and https://github.com/paritytech/ink/pull/1400&#xD;&#xA;these traits have been removed as part of storage rework.&#xD;&#xA;Please refer to Green's [example](https://github.com/dantenetwork/protocol-stack-for-ink/pull/10/files) to adapt your code." ContentLicense="CC BY-SA 4.0" />
  <row Id="29465" PostHistoryTypeId="2" PostId="7471" RevisionGUID="cc61a358-f5a3-47a4-a4ca-2c5b64dafcec" CreationDate="2023-03-06T11:37:02.853" UserId="3098" Text="I would advise using the latest releases of [`substrace-contracts-node`](https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.24.0), [`cargo-contract`](https://crates.io/crates/cargo-contract/2.0.2) and [ink!](https://crates.io/crates/ink/4.0.1)&#xD;&#xA;&#xD;&#xA;We also have official repo with examples: https://github.com/paritytech/ink-examples" ContentLicense="CC BY-SA 4.0" />
  <row Id="29467" PostHistoryTypeId="5" PostId="7469" RevisionGUID="fe9684f4-c1f8-4476-98aa-1a84dbf1171f" CreationDate="2023-03-06T11:39:55.183" UserId="380" Comment="deleted 1 character in body; edited title" Text="I'm using a [`Vec&lt;T&gt;`][1] in `ink!`. When allocating elements to the vec, the underlying array may be resized to provide a constant amortised push complexity of O(1). This means that sometimes the vec has unused space (e.g. 5 items in the vec but the underlying array has length 8 with 3 null elements).&#xD;&#xA;&#xD;&#xA;Does the vec get stored with or without the unused space in the smart contract?&#xD;&#xA;&#xD;&#xA;I am currently considering calling [`shrink_to_fit()`][2] before saving the vec in smart contract storage in order to save space. However, I'm hoping `ink!` does this automatically.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ink_prelude/4.0.1/ink_prelude/vec/struct.Vec.html&#xD;&#xA;  [2]: https://docs.rs/ink_prelude/4.0.1/ink_prelude/vec/struct.Vec.html#method.shrink_to_fit" ContentLicense="CC BY-SA 4.0" />
  <row Id="29468" PostHistoryTypeId="4" PostId="7469" RevisionGUID="fe9684f4-c1f8-4476-98aa-1a84dbf1171f" CreationDate="2023-03-06T11:39:55.183" UserId="380" Comment="deleted 1 character in body; edited title" Text="Are Vec&lt;T&gt; stored with unused space in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29469" PostHistoryTypeId="2" PostId="7472" RevisionGUID="0fd7300e-571b-448f-b96e-a72c1b613317" CreationDate="2023-03-06T11:40:09.043" UserId="3098" Text="Please refer to our recently published [delegator example](https://github.com/paritytech/ink-examples/tree/main/delegator) which depends on the latest official ink! release.&#xD;&#xA;Make sure you also use latest [cargo-contract](https://crates.io/crates/cargo-contract/2.0.2) version and [substrate-contracts-node](https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.24.0)" ContentLicense="CC BY-SA 4.0" />
  <row Id="29471" PostHistoryTypeId="2" PostId="7473" RevisionGUID="5cb3c235-4041-4812-bf6e-b16fde996590" CreationDate="2023-03-06T11:48:26.770" UserId="3098" Text="Currently, there is no standardised way of checking contract interfaces. All PSPs are implemented by [OpenBrush](https://github.com/727-Ventures/openbrush-contracts). I would recommend opening the issue there to start the discussion there to introduce another standard.&#xD;&#xA;&#xD;&#xA;For type information, you can try using https://docs.rs/type-info/latest/type_info" ContentLicense="CC BY-SA 4.0" />
  <row Id="29473" PostHistoryTypeId="2" PostId="7474" RevisionGUID="e6d411ce-4efc-4ad9-b4b1-a5775363ecd4" CreationDate="2023-03-06T11:59:55.720" UserId="3098" Text="You can specify the [`storage_deposit_limit`](https://docs.rs/pallet-contracts/latest/pallet_contracts/pallet/enum.Call.html#variant.instantiate_with_code) as part of your message/instantiation call [in cargo-contract](https://github.com/paritytech/cargo-contract/blob/c84f8641e576225bb3ed0fb2773322d615b4bc49/crates/cargo-contract/src/cmd/extrinsics/call.rs#L295)&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="29475" PostHistoryTypeId="2" PostId="7475" RevisionGUID="be90a246-6e58-4f8d-b94b-943490c06d46" CreationDate="2023-03-06T12:06:02.487" UserId="3098" Text="Since the IPFS hash is fixed length (32 bytes), you can use `[u8; 32]` array instead of `Vec&lt;u8&gt;` which is more efficient." ContentLicense="CC BY-SA 4.0" />
  <row Id="29481" PostHistoryTypeId="2" PostId="7477" RevisionGUID="da87cc7d-9ef0-4546-a5f3-abe3ad71bdb8" CreationDate="2023-03-06T13:34:14.390" UserId="165" Text="The safest path to update with such a big gap in between versions would be:&#xD;&#xA;&#xD;&#xA; - Identify all the migrations that happened since your version to the target one.&#xD;&#xA; - Leverage `try-runtime` to check if the migrations are having the expected behaviour - https://docs.substrate.io/reference/how-to-guides/tools/use-try-runtime/ . Note that you will have to apply the relevant migrations if not all of them, this might imply do the upgrade in several steps.&#xD;&#xA; &#xD;&#xA; - On top of just storage migrations, you also want to be aware of included host functions between client releases, you need those as you enact the runtime that uses them.&#xD;&#xA;&#xD;&#xA;Once you have tested that migrations work as expected, you then may apply the same upgrade steps to your running chain. I would say that working with `try-runtime` is what will bring you confidence that the work you are doing is going to be effective." ContentLicense="CC BY-SA 4.0" />
  <row Id="29484" PostHistoryTypeId="2" PostId="7478" RevisionGUID="88056324-c83c-4c72-b8cb-61316e5bc339" CreationDate="2023-03-06T13:46:55.503" UserId="2484" Text="I need to query a specific account id associated with a `Balance` in a pool of 10_000 account ids. But I also need to iterate over all account ids in a reasonable amount of computation time. &#xD;&#xA;&#xD;&#xA;So my solution was to use a `BoundedVec` with `binary_search_by_key` with the key of `Balance` wrapped inside a `StorageValue`. This leads to `O(log_n)` time, which is nice.&#xD;&#xA;&#xD;&#xA;But couldn't we have a map inside the `StorageValue`, which can query a specific account id in `O(1)` time? I found `BoundedBTreeMap`, but can this be stored inside a `StorageValue`? And if yes, is the result `O(1)` query time? Can the key be an account?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29486" PostHistoryTypeId="1" PostId="7478" RevisionGUID="88056324-c83c-4c72-b8cb-61316e5bc339" CreationDate="2023-03-06T13:46:55.503" UserId="2484" Text="How to store a bounded map inside `StorageValue`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29487" PostHistoryTypeId="3" PostId="7478" RevisionGUID="88056324-c83c-4c72-b8cb-61316e5bc339" CreationDate="2023-03-06T13:46:55.503" UserId="2484" Text="|weight|boundedvec|map|btreemap|storagevalue|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29488" PostHistoryTypeId="2" PostId="7479" RevisionGUID="f0251ab8-7a72-4545-a447-1a4572faaddc" CreationDate="2023-03-06T13:56:31.453" UserId="165" Text="There is no need to create a RuntimeCall within the runtime itself. One might need to create (and most likely sign) a call to ask to the runtime for some execution, but the runtime doesn't really need to call itself (from outside of the runtime) to get any computation, as you can directly declare what the runtime does.&#xD;&#xA;&#xD;&#xA;You should be able to call any public function declared in Utility pallet directly from the pallet you are coding, and it would looks something similar to:&#xD;&#xA;```&#xD;&#xA;let _ = utility_pallet::Pallet::&lt;T&gt;::function();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check out this piece of documentation here - https://docs.substrate.io/reference/how-to-guides/pallet-design/use-tight-coupling/&#xD;&#xA;&#xD;&#xA;And [here](https://github.com/paritytech/substrate/blob/1d9a139dd96bf5d1583c725bae6fcac5a0805372/frame/tips/src/lib.rs#L526) you can see an example of how Tips pallet is calling `pot()` function in Treasury pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="29490" PostHistoryTypeId="2" PostId="7480" RevisionGUID="5bc75488-36c0-4d3b-b250-1f63f94a1155" CreationDate="2023-03-06T14:05:00.660" UserId="3711" Text="Somewhat noob question:&#xD;&#xA;&#xD;&#xA;I see the term storage cell talked about a lot on here (mostly regarding `Mapping` and `Lazy`), however I cannot find any documentation about it.&#xD;&#xA;&#xD;&#xA;What exactly is a storage cell?&#xD;&#xA;Are they a set size? If so what is the size? Does the size vary based on individual pallet implementation?&#xD;&#xA;Is there any way to access the size of a storage cell in `ink`?&#xD;&#xA;What happens if a storage cell's size is exceeded? Is the data split across two cells instead?&#xD;&#xA;&#xD;&#xA;I _assume_ a storage cell is a record in a database on a node, is that correct?&#xD;&#xA;&#xD;&#xA;Assuming storage costs are proportional to the number of records used in the db by a smart contract, it would be handy to know the size of the storage cells so I can optimise the smart contract storage accordingly." ContentLicense="CC BY-SA 4.0" />
  <row Id="29492" PostHistoryTypeId="1" PostId="7480" RevisionGUID="5bc75488-36c0-4d3b-b250-1f63f94a1155" CreationDate="2023-03-06T14:05:00.660" UserId="3711" Text="What is a storage cell?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29493" PostHistoryTypeId="3" PostId="7480" RevisionGUID="5bc75488-36c0-4d3b-b250-1f63f94a1155" CreationDate="2023-03-06T14:05:00.660" UserId="3711" Text="|ink|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29496" PostHistoryTypeId="2" PostId="7482" RevisionGUID="9a0f9e71-2562-4bc8-8c16-bf697fd9c452" CreationDate="2023-03-06T14:34:19.363" UserId="3030" Text="If i have understood your question correctly you are asking if you can store a BoundedBTreeMap inside a storage value and what is the complexity of iterating over values in the BTree or getting a single value.&#xD;&#xA;&#xD;&#xA;Yes you can store a BoundedBtreeMap inside a StorageValue: &#xD;&#xA;```rust&#xD;&#xA;pub type StorageItemName&lt;T&gt; = StorageValue&lt;_, BoundedBTreeMap&lt;AccountIdOf&lt;T&gt;, BalanceOf&lt;T&gt;, ConstU32&lt;1000&gt;&gt;, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;[ref][1] &#xD;&#xA;&#xD;&#xA;I would recommend using an alias for this.&#xD;&#xA;&#xD;&#xA;The complexity of iterating over all elements in a BTree is O(N) as we need to iterate over each element exactly once.&#xD;&#xA;&#xD;&#xA;For getting a single value the best case scenario is when the tree is perfectly balanced and is O(log N) (please correct if wrong) tending towards O(N) as the tree becomes less balanced.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/struct.BoundedBTreeMap.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="29498" PostHistoryTypeId="2" PostId="7483" RevisionGUID="2c657510-b89a-4c38-8955-4891105854ff" CreationDate="2023-03-06T14:35:35.747" UserId="2025" Text="Yes, you can convert an address in [SS58 format](https://docs.substrate.io/reference/address-formats/) into the 32-byte public key. The process of encoding a public key to an SS58 format address is fully reversible since it just implies adding a prefix, a checksum and a bidirectional encoding of the bytes (like in Bitcoin's base-58).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[The tool Subkey](https://docs.substrate.io/reference/command-line-tools/subkey/) allows you to get [the SS58 address from the public key](https://github.com/paritytech/substrate/tree/master/bin/utils/subkey#inspecting-a-key) and viceversa. This is done with the command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subkey inspect --public &lt; pubkey | address &gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally, you can do this &quot;manually&quot; with [the account transformation tool](https://polkadot.subscan.io/tools/format_transform) provided by Subscan. And there are some [public tools](https://ss58.org/) to do this conversion but they may not be fully tested and maintained. " ContentLicense="CC BY-SA 4.0" />
  <row Id="29500" PostHistoryTypeId="5" PostId="7458" RevisionGUID="b0d788de-36ad-42b8-9b1e-fa04d8c58e63" CreationDate="2023-03-06T15:46:14.243" UserId="2975" Comment="added 8 characters in body" Text="I have a custom pallet that is tightly coupled to the utility pallet.  I am trying to call the batch function to perform a batch of balance transfers. The tests of the utility pallet (that create their own test runtime) construct a Vec of utility batch RuntimeCalls with the syntax:&#xD;&#xA;```&#xD;&#xA;Utility::batch(&#xD;&#xA;			RuntimeOrigin::root(),&#xD;&#xA;			vec![&#xD;&#xA;				RuntimeCall::Balances(BalancesCall::force_transfer {&#xD;&#xA;					source: 1,&#xD;&#xA;					dest: 2,&#xD;&#xA;					value: 5&#xD;&#xA;				}),&#xD;&#xA;                    RuntimeCall::Balances(BalancesCall::force_transfer {&#xD;&#xA;                        source: 1,&#xD;&#xA;                        dest: 2,&#xD;&#xA;                        value: 5&#xD;&#xA;                    }),&#xD;&#xA;&#xD;&#xA;                ]&#xD;&#xA;            );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I use this in my (tightly coupled to utility pallet) custom pallet like so, :&#xD;&#xA;```&#xD;&#xA;let disp_result =&#xD;&#xA;&#xD;&#xA;			pallet_utility::Pallet::&lt;T&gt;::batch(&#xD;&#xA;				origin,&#xD;&#xA;				vec![&#xD;&#xA;					RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;						source: 1,&#xD;&#xA;						dest: 2,&#xD;&#xA;						value: 5&#xD;&#xA;					}),&#xD;&#xA;					RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;						source: 1,&#xD;&#xA;						dest: 2,&#xD;&#xA;						value: 5&#xD;&#xA;					}),&#xD;&#xA;					&#xD;&#xA;				]&#xD;&#xA;			);&#xD;&#xA;```&#xD;&#xA;the rust compiler gives me the error: &#xD;&#xA;```&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared type `RuntimeCall`&#xD;&#xA;   --&gt; pallets/clipbet2/src/lib.rs:364:6&#xD;&#xA;    |&#xD;&#xA;364 |                     RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;    |                     ^^^^^^^^^^^ use of undeclared type `RuntimeCall`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I specify the pallet Config such as: `pallet::Config::RuntimeCall::Balances(Call::force_transfer` The compiler gives me:&#xD;&#xA;```&#xD;&#xA;error[E0223]: ambiguous associated type&#xD;&#xA;   --&gt; pallets/clipbet2/src/lib.rs:364:6&#xD;&#xA;    |&#xD;&#xA;364 |                     pallet::Config::RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `&lt;Type as pallet::Config&gt;::RuntimeCall`&#xD;&#xA;```&#xD;&#xA;I realize it doesn't make sense to use the config trait and generics (such as `&lt;T as Config&gt;::RuntimeCall`) as I'm using the concrete Balances RuntimeCall to edit it's specific set of parameters.&#xD;&#xA;&#xD;&#xA;How can I get this to work? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29501" PostHistoryTypeId="2" PostId="7484" RevisionGUID="5c3d8847-2c7f-4130-beef-250518a65fab" CreationDate="2023-03-06T16:32:06.773" UserId="2156" Text="We have a slight issue: we won a parachain slot on Saturday and are still waiting to produce blocks this Monday.&#xD;&#xA;https://polkadot.subscan.io/block/14512138?tab=event&#xD;&#xA;&#xD;&#xA;We should be producing blocks by now since it has been at least an era since we won our slot. Our parathread was not producing blocks with imported #0 whilst we were bidding.&#xD;&#xA;&#xD;&#xA;Here are some points to help with some questions:&#xD;&#xA;&#xD;&#xA;**Genesis state**&#xD;&#xA;&#xD;&#xA;&gt; We have confirmed that the head in the relay chain is the same as the export-genesis-state from the chain spec and that we built our chainspecs using `build-spec`: https://github.com/t3rn/t3rn/blob/master/specs/t3rn.raw.json and here's the clear version: https://github.com/t3rn/t3rn/blob/master/specs/t3rn.json&#xD;&#xA;&#xD;&#xA;&gt; head: `0x00000000000000000000000000000000000000000000000000000000000000000061f523881c58116b34662cc35d2e921dd63fbd1132f66c3b4c54aba09c0a9e8d03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400` which seems to be the same length as others.&#xD;&#xA;&#xD;&#xA;**Greyed out in parachain info**&#xD;&#xA;&#xD;&#xA;&gt; We noticed we are also greyed out on the parachains tab. Is this relevant?&#xD;&#xA;&#xD;&#xA;**Do invulnerable collators need balance?**&#xD;&#xA;&#xD;&#xA;&gt; We set our invulnerable collators with zero balance, do they need a balance to author blocks?&#xD;&#xA;&#xD;&#xA;**Minimum session candidates**&#xD;&#xA;&#xD;&#xA;&gt; We have also set out minimum session candidates to two, which seems sane since we have two collators.&#xD;&#xA;&#xD;&#xA;**Block hash at genesis `0`**&#xD;&#xA;&#xD;&#xA;&gt; Our block hash for genesis is set to `0x4545454545454545454545454545454545454545454545454545454545454545`, which we **assume** will be enriched after the block is imported.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There doesn't seem to be any logs regarding this at trace level.&#xD;&#xA;&#xD;&#xA;**Useful links**&#xD;&#xA;&#xD;&#xA;Here's our node endpoint:&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws.t3rn.io#/chainstate&#xD;&#xA;&#xD;&#xA;And our runtime is open source, here:&#xD;&#xA;https://github.com/t3rn/t3rn/tree/master/runtime/t3rn-parachain/src&#xD;&#xA;&#xD;&#xA;Do you have any idea what issue we may be facing? We are currently stumped since it doesn't seem like we are doing anything wrong. This configuration is also roughly the same config as our `t0rn` deployment on rococo." ContentLicense="CC BY-SA 4.0" />
  <row Id="29503" PostHistoryTypeId="1" PostId="7484" RevisionGUID="5c3d8847-2c7f-4130-beef-250518a65fab" CreationDate="2023-03-06T16:32:06.773" UserId="2156" Text="Parachain cannot build blocks after winning a slot" ContentLicense="CC BY-SA 4.0" />
  <row Id="29504" PostHistoryTypeId="3" PostId="7484" RevisionGUID="5c3d8847-2c7f-4130-beef-250518a65fab" CreationDate="2023-03-06T16:32:06.773" UserId="2156" Text="|parachain|block-production|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29505" PostHistoryTypeId="5" PostId="7458" RevisionGUID="302dd638-18c2-44e9-aaea-bafd4f93472c" CreationDate="2023-03-06T18:17:32.743" UserId="2975" Comment="added 1582 characters in body" Text="I have a custom pallet that is tightly coupled to the utility pallet.  I am trying to call the batch function to perform a batch of balance transfers. The tests of the utility pallet (that create their own test runtime) construct a Vec of utility batch RuntimeCalls with the syntax:&#xD;&#xA;```&#xD;&#xA;Utility::batch(&#xD;&#xA;			RuntimeOrigin::root(),&#xD;&#xA;			vec![&#xD;&#xA;				RuntimeCall::Balances(BalancesCall::force_transfer {&#xD;&#xA;					source: 1,&#xD;&#xA;					dest: 2,&#xD;&#xA;					value: 5&#xD;&#xA;				}),&#xD;&#xA;                    RuntimeCall::Balances(BalancesCall::force_transfer {&#xD;&#xA;                        source: 1,&#xD;&#xA;                        dest: 2,&#xD;&#xA;                        value: 5&#xD;&#xA;                    }),&#xD;&#xA;&#xD;&#xA;                ]&#xD;&#xA;            );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I use this in my (tightly coupled to utility pallet) custom pallet like so, :&#xD;&#xA;```&#xD;&#xA;let disp_result =&#xD;&#xA;&#xD;&#xA;			pallet_utility::Pallet::&lt;T&gt;::batch(&#xD;&#xA;				origin,&#xD;&#xA;				vec![&#xD;&#xA;					RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;						source: 1,&#xD;&#xA;						dest: 2,&#xD;&#xA;						value: 5&#xD;&#xA;					}),&#xD;&#xA;					RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;						source: 1,&#xD;&#xA;						dest: 2,&#xD;&#xA;						value: 5&#xD;&#xA;					}),&#xD;&#xA;					&#xD;&#xA;				]&#xD;&#xA;			);&#xD;&#xA;```&#xD;&#xA;the rust compiler gives me the error: &#xD;&#xA;```&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared type `RuntimeCall`&#xD;&#xA;   --&gt; pallets/clipbet2/src/lib.rs:364:6&#xD;&#xA;    |&#xD;&#xA;364 |                     RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;    |                     ^^^^^^^^^^^ use of undeclared type `RuntimeCall`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I specify the pallet Config such as: `pallet::Config::RuntimeCall::Balances(Call::force_transfer` The compiler gives me:&#xD;&#xA;```&#xD;&#xA;error[E0223]: ambiguous associated type&#xD;&#xA;   --&gt; pallets/clipbet2/src/lib.rs:364:6&#xD;&#xA;    |&#xD;&#xA;364 |                     pallet::Config::RuntimeCall::Balances(Call::force_transfer {&#xD;&#xA;    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `&lt;Type as pallet::Config&gt;::RuntimeCall`&#xD;&#xA;```&#xD;&#xA;I realize it doesn't make sense to use the config trait and generics (such as `&lt;T as Config&gt;::RuntimeCall`) as I'm using the concrete Balances RuntimeCall to edit it's specific set of parameters.&#xD;&#xA;&#xD;&#xA;How can I get this to work? &#xD;&#xA;&#xD;&#xA;A whole pallet (that does nothing - with all irrelevant code removed)  may look like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_utility::Config + pallet_balances::Config {&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;		&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		&#xD;&#xA;		SomethingStored { something: u32, who: T::AccountId },&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;		&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		&#xD;&#xA;		#[pallet::call_index(0)]&#xD;&#xA;		#[pallet::weight(10_000)]&#xD;&#xA;		pub fn do_something(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;&#xD;&#xA;			let disp_result =&#xD;&#xA;&#xD;&#xA;            pallet_utility::Pallet::&lt;T&gt;::batch(&#xD;&#xA;                origin,&#xD;&#xA;                vec![&#xD;&#xA;                    RuntimeCall::Balances(pallet_balances::Call::transfer {&#xD;&#xA;                        &#xD;&#xA;                        dest: 2,&#xD;&#xA;                        value: 5&#xD;&#xA;                    }),&#xD;&#xA;                    RuntimeCall::Balances(pallet_balances::Call::transfer {&#xD;&#xA;                        &#xD;&#xA;                        dest: 2,&#xD;&#xA;                        value: 5&#xD;&#xA;                    }),&#xD;&#xA;                    &#xD;&#xA;                ]&#xD;&#xA;            );&#xD;&#xA;			&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29508" PostHistoryTypeId="5" PostId="7479" RevisionGUID="07cea7c5-535b-468b-973b-203b5024e179" CreationDate="2023-03-06T19:48:22.287" UserId="165" Comment="added 8 characters in body" Text="Usually there is no need to create a RuntimeCall within the runtime itself. One might need to create (and most likely sign) a call to ask to the runtime for some execution, but the runtime doesn't really need to call itself (from outside of the runtime) to get any computation, as you can directly declare what the runtime does.&#xD;&#xA;&#xD;&#xA;You should be able to call any public function declared in Utility pallet directly from the pallet you are coding, and it would looks something similar to:&#xD;&#xA;```&#xD;&#xA;let _ = utility_pallet::Pallet::&lt;T&gt;::function();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check out this piece of documentation here - https://docs.substrate.io/reference/how-to-guides/pallet-design/use-tight-coupling/&#xD;&#xA;&#xD;&#xA;And [here](https://github.com/paritytech/substrate/blob/1d9a139dd96bf5d1583c725bae6fcac5a0805372/frame/tips/src/lib.rs#L526) you can see an example of how Tips pallet is calling `pot()` function in Treasury pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="29509" PostHistoryTypeId="2" PostId="7485" RevisionGUID="204fc7d3-4f3a-4b5d-b128-87d1355d3e58" CreationDate="2023-03-06T20:15:09.347" UserId="1732" Text="Astar uplifted to Polkadot 0.9.36 in [v4.47.1][1]&#xD;&#xA;Client upgrade generates a lot of errors on RPC nodes, both WS and HTTP endpoints but mostly on HTTP one.&#xD;&#xA;&#xD;&#xA;    HTTP serve connection failed hyper::Error(Shutdown, Os { code: 107, kind: NotConnected, message: &quot;Transport endpoint is not connected&quot; })&#xD;&#xA;&#xD;&#xA;Load balancer shows a massive increase of 4xx errors on backend side since nodes upgrade.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Any idea what this may be due to?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AstarNetwork/Astar/releases/tag/v4.47.1&#xD;&#xA;  [2]: https://i.stack.imgur.com/zQ13Q.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29511" PostHistoryTypeId="1" PostId="7485" RevisionGUID="204fc7d3-4f3a-4b5d-b128-87d1355d3e58" CreationDate="2023-03-06T20:15:09.347" UserId="1732" Text="Parachain RPC errors since Polkadot 0.9.36 client upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="29512" PostHistoryTypeId="3" PostId="7485" RevisionGUID="204fc7d3-4f3a-4b5d-b128-87d1355d3e58" CreationDate="2023-03-06T20:15:09.347" UserId="1732" Text="|rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29513" PostHistoryTypeId="6" PostId="7356" RevisionGUID="09166899-f481-4d22-9c40-8f99837e5208" CreationDate="2023-03-06T20:36:25.977" UserId="165" Comment="edited tags" Text="|ink|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29514" PostHistoryTypeId="2" PostId="7486" RevisionGUID="66b9a803-64b9-4567-839b-43c4d5a36528" CreationDate="2023-03-06T20:58:03.430" UserId="170" Text="TLDR: [ink! storage documentation][1]&#xD;&#xA;&#xD;&#xA;To answer your questions:&#xD;&#xA;&#xD;&#xA;Storage in ink! is organized as a key/value database. So for each unique key, you have one unique cell (which can contain a value). The values are SCALE encoded, and the maximum length of a value is defined by the pallet. If this value is exceeded, you will get a `DispatchError`, and the contract execution will be trapped (reverted). The default value in substrate/frame/contracts is 16 * 1024 bytes.&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/datastructures/overview" ContentLicense="CC BY-SA 4.0" />
  <row Id="29516" PostHistoryTypeId="2" PostId="7487" RevisionGUID="8dd85729-87f7-4dbd-a6d0-cdf47734c96c" CreationDate="2023-03-06T22:21:00.193" UserId="1810" Text="It's not &quot;lossy&quot; but &quot;unspecified&quot;.  Ristretto is defined as either of two possible encodings of Ed25519.  Another Ristretto implementation could chooses the other mapping, which then breaks your usage Ed25519.&#xD;&#xA;&#xD;&#xA;Why did Henry do this instead of choosing one encoding?  I suppose he worried people mixing Ristretto and Ed25519 would leak cofactor mistakes.  &#xD;&#xA;&#xD;&#xA;Just use one scheme of the other, or maybe hard derive secret keys for each from the same root key material if you like." ContentLicense="CC BY-SA 4.0" />
  <row Id="29518" PostHistoryTypeId="2" PostId="7488" RevisionGUID="edc12f19-069c-4904-a58d-0a17923c36bf" CreationDate="2023-03-06T22:25:31.390" UserId="170" Text="Values written to the contract storage in ink! are SCALE encoded.&#xD;&#xA;That means that no matter the capacity of the vector, the encoded value only includes what is in the `vec`.&#xD;&#xA;&#xD;&#xA;Consider this:&#xD;&#xA;&#xD;&#xA;When&#xD;&#xA;```Rust&#xD;&#xA;let mut vec1 = Vec::new();&#xD;&#xA;for _ in 0..5 {&#xD;&#xA;   vec1.push(1);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;let mut vec2 = Vec::new();&#xD;&#xA;for _ in 0..5 {&#xD;&#xA;   vec2.push(1);&#xD;&#xA;}&#xD;&#xA;vec2.shrink_to_fit();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then&#xD;&#xA;```Rust&#xD;&#xA;assert_eq!(vec1.encode(), vec2.encode())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also when&#xD;&#xA;```Rust&#xD;&#xA;let mut vec1 = Vec::with_capacity(10);&#xD;&#xA;vec1.push(10);&#xD;&#xA;&#xD;&#xA;let vec2 = vec![10];&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then&#xD;&#xA;```Rust&#xD;&#xA;assert_eq!(vec1.encode(), vec2.encode());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29520" PostHistoryTypeId="2" PostId="7489" RevisionGUID="d340df17-2d4d-4281-b85a-ede3518e50bc" CreationDate="2023-03-07T06:09:06.870" UserId="251" Text="```rs&#xD;&#xA;#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;fn pre_upgrade() -&gt; Result&lt;Vec&lt;u8&gt;, &amp;'static str&gt; {&#xD;&#xA;	log::info!(&quot;Pre-check account: {ERROR_ACCOUNT}&quot;);&#xD;&#xA;&#xD;&#xA;	let a = array_bytes::hex_n_into_unchecked::&lt;_, sp_runtime::AccountId32, 32&gt;(ERROR_ACCOUNT);&#xD;&#xA;&#xD;&#xA;	assert_eq!(&#xD;&#xA;		AccountMigration::ledger_of(&amp;a).unwrap().staked_ring,&#xD;&#xA;		52_500_000_000_000_000_000_u128&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	Ok(Vec::new())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can't see my log.&#xD;&#xA;&#xD;&#xA;I think this is different from https://substrate.stackexchange.com/questions/3976/try-runtime-no-output.&#xD;&#xA;&#xD;&#xA;I can see other logs.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-07 13:59:35.716  INFO main remote-ext: since no at is provided, setting it to latest finalized head, 0x962da9ed1763b7abaebba7f5edc3325ce35155b6f08a13a29acf92455568598a    &#xD;&#xA;2023-03-07 13:59:35.716  INFO main remote-ext: since no prefix is filtered, the data for all pallets will be downloaded    &#xD;&#xA;2023-03-07 13:59:35.799  INFO main remote-ext: scraping key-pairs from remote at block height 0x962da9ed1763b7abaebba7f5edc3325ce35155b6f08a13a29acf92455568598a    &#xD;&#xA;2023-03-07 13:59:37.172  INFO main remote-ext: Querying a total of 9941 keys from prefix , splitting among 32 threads, 311 keys per thread    &#xD;&#xA;2023-03-07 13:59:37.919  INFO main remote-ext: adding data for hashed prefix: , took 2s    &#xD;&#xA;2023-03-07 13:59:37.919  INFO main remote-ext: adding data for hashed key: 3a636f6465    &#xD;&#xA;2023-03-07 13:59:38.057  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    &#xD;&#xA;2023-03-07 13:59:38.141  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    &#xD;&#xA;2023-03-07 13:59:38.235  INFO main remote-ext: initialized state externalities with storage root 0x723c7d5815c574d717b7cb4328696a3899fad5ccfa825e61331e62b4556404a6 and state_version V0    &#xD;&#xA;2023-03-07 13:59:38.286  INFO main try-runtime::cli: original spec: RuntimeString::Owned(&quot;Pangoro2&quot;)-6003, code hash: 1798310c6a11942c8152d0efc419c80bf9898cc582e0e8158a38c1beba9b75df    &#xD;&#xA;2023-03-07 13:59:38.347  INFO main try-runtime::cli: new spec: RuntimeString::Owned(&quot;Pangoro2&quot;)-6004, code hash: acac32f457ef7640209a66460e0d58b12c93746bfe4995dc7e7199a2a046722c    &#xD;&#xA;2023-03-07 13:59:38.560  INFO main pangoro_runtime: try-runtime::on_runtime_upgrade    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for System    &#xD;&#xA;2023-03-07 13:59:38.560  INFO main runtime::frame-support: ⚠️ ParachainSystem declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Timestamp    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for ParachainInfo    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Balances    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for TransactionPayment    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Assets    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Vesting    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Deposit    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for AccountMigration    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Authorship    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for DarwiniaStaking    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Session    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Aura    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for AuraExt    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for MessageGadget    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for EcdsaAuthority    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Democracy    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Council    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for TechnicalCommittee    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for PhragmenElection    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for TechnicalMembership    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Treasury    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Tips    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Sudo    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Utility    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Identity    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Scheduler    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Preimage    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Proxy    &#xD;&#xA;2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ XcmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`    &#xD;&#xA;2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for CumulusXcm    &#xD;&#xA;2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ DmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`    &#xD;&#xA;2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ Ethereum declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for EVM    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for MessageTransact    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgeRococoGrandpa    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgeRococoParachain    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgePangolinMessages    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgePangolinDispatch    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for PangolinFeeMarket    &#xD;&#xA;2023-03-07 13:59:38.562  INFO main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = (500300000000 ps, 5242880 byte), total weight = (500000000000 ps, 5242880 byte) (100.06 %, 100.00 %).&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29522" PostHistoryTypeId="1" PostId="7489" RevisionGUID="d340df17-2d4d-4281-b85a-ede3518e50bc" CreationDate="2023-03-07T06:09:06.870" UserId="251" Text="How to log in try-runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29523" PostHistoryTypeId="3" PostId="7489" RevisionGUID="d340df17-2d4d-4281-b85a-ede3518e50bc" CreationDate="2023-03-07T06:09:06.870" UserId="251" Text="|try-runtime|log|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29524" PostHistoryTypeId="5" PostId="7489" RevisionGUID="5442a11a-39ad-4cc5-a1d9-2bcd4933684f" CreationDate="2023-03-07T06:22:51.843" UserId="251" Comment="added 238 characters in body" Text="```rs&#xD;&#xA;#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;fn pre_upgrade() -&gt; Result&lt;Vec&lt;u8&gt;, &amp;'static str&gt; {&#xD;&#xA;	log::info!(&quot;Pre-check account: {ERROR_ACCOUNT}&quot;);&#xD;&#xA;&#xD;&#xA;	let a = array_bytes::hex_n_into_unchecked::&lt;_, sp_runtime::AccountId32, 32&gt;(ERROR_ACCOUNT);&#xD;&#xA;&#xD;&#xA;	assert_eq!(&#xD;&#xA;		AccountMigration::ledger_of(&amp;a).unwrap().staked_ring,&#xD;&#xA;		52_500_000_000_000_000_000_u128&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	Ok(Vec::new())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can't see my log.&#xD;&#xA;&#xD;&#xA;I think this is different from https://substrate.stackexchange.com/questions/3976/try-runtime-no-output.&#xD;&#xA;&#xD;&#xA;I can see other logs.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RUST_LOG=runtime=trace target/release/darwinia try-runtime --detailed-log-output --chain pangoro-dev --runtime target/release/wbuild/pangoro-runtime/pangoro_runtime.compact.compressed.wasm on-runtime-upgrade live --uri ws://g1.pangoro2.darwinia.network:9944&#xD;&#xA;&#xD;&#xA;2023-03-07 13:59:35.716  INFO main remote-ext: since no at is provided, setting it to latest finalized head, 0x962da9ed1763b7abaebba7f5edc3325ce35155b6f08a13a29acf92455568598a    &#xD;&#xA;2023-03-07 13:59:35.716  INFO main remote-ext: since no prefix is filtered, the data for all pallets will be downloaded    &#xD;&#xA;2023-03-07 13:59:35.799  INFO main remote-ext: scraping key-pairs from remote at block height 0x962da9ed1763b7abaebba7f5edc3325ce35155b6f08a13a29acf92455568598a    &#xD;&#xA;2023-03-07 13:59:37.172  INFO main remote-ext: Querying a total of 9941 keys from prefix , splitting among 32 threads, 311 keys per thread    &#xD;&#xA;2023-03-07 13:59:37.919  INFO main remote-ext: adding data for hashed prefix: , took 2s    &#xD;&#xA;2023-03-07 13:59:37.919  INFO main remote-ext: adding data for hashed key: 3a636f6465    &#xD;&#xA;2023-03-07 13:59:38.057  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    &#xD;&#xA;2023-03-07 13:59:38.141  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    &#xD;&#xA;2023-03-07 13:59:38.235  INFO main remote-ext: initialized state externalities with storage root 0x723c7d5815c574d717b7cb4328696a3899fad5ccfa825e61331e62b4556404a6 and state_version V0    &#xD;&#xA;2023-03-07 13:59:38.286  INFO main try-runtime::cli: original spec: RuntimeString::Owned(&quot;Pangoro2&quot;)-6003, code hash: 1798310c6a11942c8152d0efc419c80bf9898cc582e0e8158a38c1beba9b75df    &#xD;&#xA;2023-03-07 13:59:38.347  INFO main try-runtime::cli: new spec: RuntimeString::Owned(&quot;Pangoro2&quot;)-6004, code hash: acac32f457ef7640209a66460e0d58b12c93746bfe4995dc7e7199a2a046722c    &#xD;&#xA;2023-03-07 13:59:38.560  INFO main pangoro_runtime: try-runtime::on_runtime_upgrade    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for System    &#xD;&#xA;2023-03-07 13:59:38.560  INFO main runtime::frame-support: ⚠️ ParachainSystem declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Timestamp    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for ParachainInfo    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Balances    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for TransactionPayment    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Assets    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Vesting    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Deposit    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for AccountMigration    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Authorship    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for DarwiniaStaking    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Session    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Aura    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for AuraExt    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for MessageGadget    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for EcdsaAuthority    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Democracy    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Council    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for TechnicalCommittee    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for PhragmenElection    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for TechnicalMembership    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Treasury    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Tips    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Sudo    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Utility    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Identity    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Scheduler    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Preimage    &#xD;&#xA;2023-03-07 13:59:38.560 DEBUG main runtime::frame-support: ✅ no migration for Proxy    &#xD;&#xA;2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ XcmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`    &#xD;&#xA;2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for CumulusXcm    &#xD;&#xA;2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ DmpQueue declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`    &#xD;&#xA;2023-03-07 13:59:38.561  INFO main runtime::frame-support: ⚠️ Ethereum declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for EVM    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for MessageTransact    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgeRococoGrandpa    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgeRococoParachain    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgePangolinMessages    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for BridgePangolinDispatch    &#xD;&#xA;2023-03-07 13:59:38.561 DEBUG main runtime::frame-support: ✅ no migration for PangolinFeeMarket    &#xD;&#xA;2023-03-07 13:59:38.562  INFO main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = (500300000000 ps, 5242880 byte), total weight = (500000000000 ps, 5242880 byte) (100.06 %, 100.00 %).&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29525" PostHistoryTypeId="2" PostId="7490" RevisionGUID="bf81018c-6466-4125-a2d9-5c28500d225a" CreationDate="2023-03-07T06:55:40.517" UserId="3927" Text="Raw data signing is not supported for hardware wallets Ledger.&#xD;&#xA;https://polkadot.js.org/apps/#/signing&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29527" PostHistoryTypeId="2" PostId="7491" RevisionGUID="befb23ba-d1bb-47e7-9997-2005d8a8dd17" CreationDate="2023-03-07T06:56:46.397" UserId="3927" Text="Raw data signing is not supported for hardware wallets Ledger.&#xD;&#xA;https://polkadot.js.org/apps/#/signing&#xD;&#xA;&#xD;&#xA;how to fix it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29529" PostHistoryTypeId="1" PostId="7491" RevisionGUID="befb23ba-d1bb-47e7-9997-2005d8a8dd17" CreationDate="2023-03-07T06:56:46.397" UserId="3927" Text="Polkadot Raw data signing is not supported for hardware wallets Ledger" ContentLicense="CC BY-SA 4.0" />
  <row Id="29530" PostHistoryTypeId="3" PostId="7491" RevisionGUID="befb23ba-d1bb-47e7-9997-2005d8a8dd17" CreationDate="2023-03-07T06:56:46.397" UserId="3927" Text="|polkadot|ledger|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29531" PostHistoryTypeId="2" PostId="7492" RevisionGUID="4003ab55-1a1e-4df5-a3c8-5803d5e70148" CreationDate="2023-03-07T06:59:07.327" UserId="3927" Text="Ledger Raw data signing is not supported for hardware wallets&#xD;&#xA;https://polkadot.js.org/apps/#/signing" ContentLicense="CC BY-SA 4.0" />
  <row Id="29533" PostHistoryTypeId="5" PostId="7485" RevisionGUID="bec07f9e-277a-4b49-a73e-82ef6c8b5d4f" CreationDate="2023-03-07T07:34:49.520" UserId="1732" Comment="added 259 characters in body; edited tags" Text="Astar uplifted to Polkadot 0.9.36 in [v4.47.1][1]&#xD;&#xA;Client upgrade introduces 2 new errors on RPC nodes, both WS and HTTP.&#xD;&#xA;&#xD;&#xA;- HTTP: lots of these errors - seems high impact&#xD;&#xA;```&#xD;&#xA;HTTP serve connection failed hyper::Error(Shutdown, Os { code: 107, kind: NotConnected, message: &quot;Transport endpoint is not connected&quot; })&#xD;&#xA;```&#xD;&#xA;- WS: few of these errors - seems just informative of a connection terminated on client side&#xD;&#xA;```&#xD;&#xA;    WS transport error: i/o error: Connection reset by peer (os error 104); terminate connection: 11&#xD;&#xA;```&#xD;&#xA;Load balancer shows a massive increase of 4xx errors on backend side since nodes upgrade.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Any idea what this may be due to, especially on the HTTP interface?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AstarNetwork/Astar/releases/tag/v4.47.1&#xD;&#xA;  [2]: https://i.stack.imgur.com/zQ13Q.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29534" PostHistoryTypeId="6" PostId="7485" RevisionGUID="bec07f9e-277a-4b49-a73e-82ef6c8b5d4f" CreationDate="2023-03-07T07:34:49.520" UserId="1732" Comment="added 259 characters in body; edited tags" Text="|rpc|websocket|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29535" PostHistoryTypeId="2" PostId="7493" RevisionGUID="cc577e84-c537-47e7-a2e8-d336f7d0ec7c" CreationDate="2023-03-07T08:12:26.990" UserId="251" Text="I missed the `--checks` for the subcommand `on-runtime-upgrade`.&#xD;&#xA;&#xD;&#xA;So, there were no checks running.&#xD;&#xA;&#xD;&#xA;In the past, the checks were run by default. Now they don't.&#xD;&#xA;&#xD;&#xA;The command should be:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RUST_LOG=runtime=trace target/release/darwinia try-runtime --detailed-log-output --chain pangoro-dev --runtime target/release/wbuild/pangoro-runtime/pangoro_runtime.compact.compressed.wasm on-runtime-upgrade --checks live --uri ws://g1.pangoro2.darwinia.network:9944&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29537" PostHistoryTypeId="2" PostId="7494" RevisionGUID="cf958225-c30b-4c37-9a9a-48148250ebda" CreationDate="2023-03-07T09:18:16.737" UserId="1780" Text="&gt; HTTP serve connection failed hyper::Error(Shutdown, Os { code: 107,&#xD;&#xA;&gt; kind: NotConnected, message: &quot;Transport endpoint is not connected&quot; })&#xD;&#xA;&#xD;&#xA;That could actually happen on regular HTTP requests or during the initial WebSocket handshake (HTTP upgrade request to WebSocket).&#xD;&#xA;&#xD;&#xA;The error itself occurs when reading looks like a TLS/SSL error, are you sure that you have configured TLS/SSL on the server correctly? &#xD;&#xA;&#xD;&#xA;Otherwise, please open another issue how to reproduce this.&#xD;&#xA;&#xD;&#xA;&gt; WS transport error: i/o error: Connection reset by peer (os error&#xD;&#xA;&gt; 104); terminate connection: 11&#xD;&#xA;&#xD;&#xA;These are harmless and will be downgraded to debug in the next release, so just ignore them it's something else." ContentLicense="CC BY-SA 4.0" />
  <row Id="29539" PostHistoryTypeId="2" PostId="7495" RevisionGUID="cdd236d7-eb02-492f-ad07-548c2e8f969f" CreationDate="2023-03-07T10:26:29.100" UserId="1947" Text="would it be possible to deregister a parachain and release tokens locked from crowdloan using governance in relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29541" PostHistoryTypeId="1" PostId="7495" RevisionGUID="cdd236d7-eb02-492f-ad07-548c2e8f969f" CreationDate="2023-03-07T10:26:29.100" UserId="1947" Text="Release crowdloan funds before lease expires?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29542" PostHistoryTypeId="3" PostId="7495" RevisionGUID="cdd236d7-eb02-492f-ad07-548c2e8f969f" CreationDate="2023-03-07T10:26:29.100" UserId="1947" Text="|parachain|crowdloan|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29543" PostHistoryTypeId="2" PostId="7496" RevisionGUID="d956beac-a4c0-4459-9305-2922151b1016" CreationDate="2023-03-07T10:46:18.917" UserId="3327" Text="I am working on pallet_vesting. There is a public function of pallet_vesting with the signature similar to the following:  &#xD;&#xA;        schedule1_index: u32,&#xD;&#xA;        schedule2_index: u32,&#xD;&#xA;    },&#xD;&#xA;&#xD;&#xA;What does schedule1_index and schedule2_index here means? &#xD;&#xA;&#xD;&#xA;Does it mean the starting_block number of first schedule and second schedule respectively?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29545" PostHistoryTypeId="1" PostId="7496" RevisionGUID="d956beac-a4c0-4459-9305-2922151b1016" CreationDate="2023-03-07T10:46:18.917" UserId="3327" Text="What does scheduIndex means in pallet_vesting public functions merge_schedule" ContentLicense="CC BY-SA 4.0" />
  <row Id="29546" PostHistoryTypeId="3" PostId="7496" RevisionGUID="d956beac-a4c0-4459-9305-2922151b1016" CreationDate="2023-03-07T10:46:18.917" UserId="3327" Text="|pallet|vesting|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29547" PostHistoryTypeId="5" PostId="7496" RevisionGUID="2420fc72-7bd3-420c-94df-ebd460883dd4" CreationDate="2023-03-07T11:04:55.740" UserId="251" Comment="deleted 7 characters in body" Text="I am working on `pallet_vesting`. There is a public function of pallet_vesting with a signature similar to the following:  &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;schedule1_index: u32,&#xD;&#xA;schedule2_index: u32,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What do `schedule1_index` and `schedule2_index` here mean? &#xD;&#xA;&#xD;&#xA;Does it mean the `starting_block` number of the first schedule and second schedule respectively?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29548" PostHistoryTypeId="2" PostId="7497" RevisionGUID="3115c981-7595-4eb4-a2a6-2627f4dfc5d4" CreationDate="2023-03-07T11:05:43.053" UserId="49" Text="I want to migrate my production parachain from Kusama or Polkadot.&#xD;&#xA;How can I achieve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29550" PostHistoryTypeId="1" PostId="7497" RevisionGUID="3115c981-7595-4eb4-a2a6-2627f4dfc5d4" CreationDate="2023-03-07T11:05:43.053" UserId="49" Text="How to migrate from Kusama to Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29551" PostHistoryTypeId="3" PostId="7497" RevisionGUID="3115c981-7595-4eb4-a2a6-2627f4dfc5d4" CreationDate="2023-03-07T11:05:43.053" UserId="49" Text="|polkadot|kusama|migration|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29552" PostHistoryTypeId="2" PostId="7498" RevisionGUID="e798cd2f-e2df-4256-806c-47e129c159d6" CreationDate="2023-03-07T11:05:43.053" UserId="49" Text="A migration from Kusama to Polkadot is possible. Done properly, the migration happens almost seamlessly; all the blocks, the state and the runtime are maintained. It is also possible to migrate from Polkadot to Kusama, or from any Polkadot-like relaychain to any other Polkadot-like relaychain, such as a from a custom Rococo relaychain to the public rococo relaychain. The whole process is unproblematic, as long as the entanglement via XCM with other parachains is not too strong yet, for example by having already exchanged tokens with another parachain, and as long as great care is taken when preparing and executing the migration.&#xD;&#xA;&#xD;&#xA;A complete guide can be found at https://forum.polkadot.network/t/migrating-to-polkadot-a-complete-guide/2246" ContentLicense="CC BY-SA 4.0" />
  <row Id="29554" PostHistoryTypeId="2" PostId="7499" RevisionGUID="18f43060-4900-4d2d-9bab-78636620a1ab" CreationDate="2023-03-07T11:20:19.523" UserId="251" Text="An account could have a lot of vestings.&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;Vesting::get(Alice) = vec![&#xD;&#xA;  vesting_for_a, // index 0&#xD;&#xA;  vesting_for_b, //       1&#xD;&#xA;  vesting_for_c, //       2&#xD;&#xA;  vesting_for_d  //       3&#xD;&#xA;];&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You want to merge `vesting_a` and `vesting_d`. You need to provide the indexes to the call.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;merge(0, 3);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt; How do I get index of schedule for an account?&#xD;&#xA;&#xD;&#xA;Just get the storage and enumerate it to get the indexes.&#xD;&#xA;&#xD;&#xA;Check the example above.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Storage reference:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/8d0b7564d5ba9ee0223a84f72ed15ac64c3be068/frame/vesting/src/lib.rs#L200" ContentLicense="CC BY-SA 4.0" />
  <row Id="29556" PostHistoryTypeId="5" PostId="7496" RevisionGUID="e2cc0213-5ab7-459d-bd94-05d9c6a6cd43" CreationDate="2023-03-07T11:20:35.117" UserId="3327" Comment="deleted 50 characters in body" Text="I am working on `pallet_vesting`. There is a public function of pallet_vesting with a signature similar to the following:  &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;schedule1_index: u32,&#xD;&#xA;schedule2_index: u32,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What do `schedule1_index` and `schedule2_index` here mean? &#xD;&#xA;&#xD;&#xA;How do I get index of schedule for an account?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29557" PostHistoryTypeId="2" PostId="7500" RevisionGUID="5c555db5-4213-4872-a36e-95d5e86e6195" CreationDate="2023-03-07T12:14:06.507" UserId="3886" Text="When I am trying to build substrate node-template, `cargo build` below error occurs. How to solve this issue.&#xD;&#xA;&#xD;&#xA;system : `Apple M1 Pro`&#xD;&#xA;OSX : `Ventura 13.2.1`&#xD;&#xA;&#xD;&#xA;rustup show &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-apple-darwin (default)&#xD;&#xA;nightly-x86_64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-apple-darwin&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-x86_64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.70.0-nightly (f63ccaf25 2023-03-06)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;``` Compiling sp-externalities v0.13.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.37#f38bd667)&#xD;&#xA;  error: cannot find macro `thread_local` in this scope&#xD;&#xA;    --&gt; /Users/xxxxx/.cargo/git/checkouts/substrate-7e08433d4c370a21/f38bd66/primitives/externalities/src/scope_limited.rs:22:1&#xD;&#xA;     |&#xD;&#xA;  22 | environmental::environmental!(ext: trait Externalities);&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`&#xD;&#xA;     = note: this error originates in the macro `$crate::thread_local_impl` which comes from the expansion of the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0425]: cannot find value `GLOBAL` in this scope&#xD;&#xA;    --&gt; /Users/xxxxxxx/.cargo/git/checkouts/substrate-7e08433d4c370a21/f38bd66/primitives/externalities/src/scope_limited.rs:22:1&#xD;&#xA;     |&#xD;&#xA;  22 | environmental::environmental!(ext: trait Externalities);&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `$crate::environmental` which comes from the expansion of the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0425`.&#xD;&#xA;  error: could not compile `sp-externalities` due to 4 previous errors" ContentLicense="CC BY-SA 4.0" />
  <row Id="29559" PostHistoryTypeId="1" PostId="7500" RevisionGUID="5c555db5-4213-4872-a36e-95d5e86e6195" CreationDate="2023-03-07T12:14:06.507" UserId="3886" Text="Substrate node-template Compiling sp-externalities error: cannot find macro `thread_local` in this scope" ContentLicense="CC BY-SA 4.0" />
  <row Id="29560" PostHistoryTypeId="3" PostId="7500" RevisionGUID="5c555db5-4213-4872-a36e-95d5e86e6195" CreationDate="2023-03-07T12:14:06.507" UserId="3886" Text="|substrate-node-template|rust|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29565" PostHistoryTypeId="2" PostId="7502" RevisionGUID="332a3fdc-e934-474a-b5ef-0c1009d273fc" CreationDate="2023-03-07T13:32:22.997" UserId="2484" Text="Hey valuable community member,&#xD;&#xA;&#xD;&#xA;I am currently on a randomness pallet which can be used as a production counterpart to the insecure randomness-collective-flip pallet.&#xD;&#xA;&#xD;&#xA;This is my current version:&#xD;&#xA;&#xD;&#xA;https://github.com/zeitgeistpm/zeitgeist/blob/d40f4c3c7a52c7e346aaa39ff980135938073eed/zrml/relay-randomness/src/lib.rs&#xD;&#xA;&#xD;&#xA;I wonder why this kind of pallet was not already written. Seems like other than Moonbeam nobody needed production randomness yet. But we at ZeitgeistPM do now for our random juror selection in a court.&#xD;&#xA;&#xD;&#xA;Can you give examples and hints how to implement a secure and reliable version of this pallet?&#xD;&#xA;&#xD;&#xA;Currently it is integrated in the following way:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        impl cumulus_pallet_parachain_system::Config for Runtime {&#xD;&#xA;            ...&#xD;&#xA;            type OnSystemEvent = zrml_relay_randomness::CustomSystemEventHandler&lt;Runtime&gt;;&#xD;&#xA;            ...&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        impl zrml_relay_randomness::Config for Runtime {&#xD;&#xA;            type SelfParaId = parachain_info::Pallet&lt;Runtime&gt;;&#xD;&#xA;        }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29567" PostHistoryTypeId="1" PostId="7502" RevisionGUID="332a3fdc-e934-474a-b5ef-0c1009d273fc" CreationDate="2023-03-07T13:32:22.997" UserId="2484" Text="How to implement a production randomness pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29568" PostHistoryTypeId="3" PostId="7502" RevisionGUID="332a3fdc-e934-474a-b5ef-0c1009d273fc" CreationDate="2023-03-07T13:32:22.997" UserId="2484" Text="|pallet|parachain|babe|security|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29570" PostHistoryTypeId="52" PostId="7489" RevisionGUID="df083d9c-cdb7-4bfc-a840-afa6debbae91" CreationDate="2023-03-07T14:10:40.357" />
  <row Id="29571" PostHistoryTypeId="2" PostId="7503" RevisionGUID="9c82c555-2356-4d5c-b86b-cfbc1c118b85" CreationDate="2023-03-07T14:53:31.020" UserId="512" Text="Your issue sounds like it might be an environment issue. I notice you are running the x86_64 version of Rust on your Mac. I have an M1 chip as well, and have no issues using the ARM target, so I'd start with installing and using the `*-aarch64-apple-darwin` toolchains for both stable and nightly. Install the `wasm32-unknown-unknown` targets after that and try again." ContentLicense="CC BY-SA 4.0" />
  <row Id="29573" PostHistoryTypeId="2" PostId="7504" RevisionGUID="15013360-f3bd-4d8b-9964-787dc3510af9" CreationDate="2023-03-07T14:54:50.380" UserId="94" Text="&gt;Can you give examples and hints how to implement a secure and reliable version of this pallet?&#xD;&#xA;&#xD;&#xA;It is not easily possible out of the box. Hence the deprecation of the former randomness pallet.  &#xD;&#xA;The only way to currently get secure randomness on-chain is to use some kind of oracle or bridge.  &#xD;&#xA;&#xD;&#xA;Alternatively an interactive multi-step commit/reveal scheme could be used but needs some maintenance transactions from different parties. This is only verifiable secure if the user themselves participated in the same round." ContentLicense="CC BY-SA 4.0" />
  <row Id="29575" PostHistoryTypeId="2" PostId="7505" RevisionGUID="4db82733-bec4-4bd7-baef-9f7893369b0f" CreationDate="2023-03-07T15:01:39.557" UserId="341" Text="I figured there seem to be something wrong with a multisig I have on Rococo.&#xD;&#xA;&#xD;&#xA;It's this one: 5FRz8z6U87LBXLUuBRRy4JtVAh2jhkDSbR5ntCGM2Ds631dJ&#xD;&#xA;&#xD;&#xA;Checking the storage on it with `multisig.multisigs(&quot;5FRz8z6U87LBXLUuBRRy4JtVAh2jhkDSbR5ntCGM2Ds631dJ&quot;) returns the following double map:&#xD;&#xA;```[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      5G7yHTYnAJKQ6RLe6woPrcrNRdnPtzEuZNjNDvhLVD8eZAqL&#xD;&#xA;      0xe133e6f11af51d883e56216e9e1bbb1e2920c7c6120cbb55cd469b1f95b61601&#xD;&#xA;    ]&#xD;&#xA;    {&#xD;&#xA;      when: {&#xD;&#xA;        height: 3,833,859&#xD;&#xA;        index: 2&#xD;&#xA;      }&#xD;&#xA;      deposit: 67,173,327,600&#xD;&#xA;      depositor: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      approvals: [&#xD;&#xA;        5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, as you can tell, this storage is for `5G7yHTYnAJKQ6RLe6woPrcrNRdnPtzEuZNjNDvhLVD8eZAqL` which is another multisig.&#xD;&#xA;&#xD;&#xA;How is this possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29577" PostHistoryTypeId="1" PostId="7505" RevisionGUID="4db82733-bec4-4bd7-baef-9f7893369b0f" CreationDate="2023-03-07T15:01:39.557" UserId="341" Text="Multisig storage showing calls from another one" ContentLicense="CC BY-SA 4.0" />
  <row Id="29578" PostHistoryTypeId="3" PostId="7505" RevisionGUID="4db82733-bec4-4bd7-baef-9f7893369b0f" CreationDate="2023-03-07T15:01:39.557" UserId="341" Text="|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29579" PostHistoryTypeId="5" PostId="7505" RevisionGUID="7aa737ed-db41-454a-baf4-4e221d47457a" CreationDate="2023-03-07T15:30:07.860" UserId="341" Comment="added 1 character in body" Text="I figured there seem to be something wrong with a multisig I have on Rococo.&#xD;&#xA;&#xD;&#xA;It's this one: 5FRz8z6U87LBXLUuBRRy4JtVAh2jhkDSbR5ntCGM2Ds631dJ&#xD;&#xA;&#xD;&#xA;Checking the storage on it with `multisig.multisigs(&quot;5FRz8z6U87LBXLUuBRRy4JtVAh2jhkDSbR5ntCGM2Ds631dJ&quot;)` returns the following double map:&#xD;&#xA;```[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      5G7yHTYnAJKQ6RLe6woPrcrNRdnPtzEuZNjNDvhLVD8eZAqL&#xD;&#xA;      0xe133e6f11af51d883e56216e9e1bbb1e2920c7c6120cbb55cd469b1f95b61601&#xD;&#xA;    ]&#xD;&#xA;    {&#xD;&#xA;      when: {&#xD;&#xA;        height: 3,833,859&#xD;&#xA;        index: 2&#xD;&#xA;      }&#xD;&#xA;      deposit: 67,173,327,600&#xD;&#xA;      depositor: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      approvals: [&#xD;&#xA;        5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, as you can tell, this storage is for `5G7yHTYnAJKQ6RLe6woPrcrNRdnPtzEuZNjNDvhLVD8eZAqL` which is another multisig.&#xD;&#xA;&#xD;&#xA;How is this possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29580" PostHistoryTypeId="2" PostId="7506" RevisionGUID="dc1a8929-8538-4326-9fb6-d99bc3b16fd3" CreationDate="2023-03-07T16:32:35.160" UserId="380" Text="For example, [the utility pallet has a constant called `batched_calls_limit`](https://github.com/polkadot-js/api/blob/f233671c27aa2ec4256156d78b57cb153a4e2e5e/packages/types-support/src/metadata/v14/substrate-json.json#L305). How do I access this from polkadot-js?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        {&#xD;&#xA;          &quot;name&quot;: &quot;Utility&quot;,&#xD;&#xA;          &quot;storage&quot;: null,&#xD;&#xA;          &quot;calls&quot;: {&#xD;&#xA;            &quot;type&quot;: 125&#xD;&#xA;          },&#xD;&#xA;          &quot;events&quot;: {&#xD;&#xA;            &quot;type&quot;: 29&#xD;&#xA;          },&#xD;&#xA;          &quot;constants&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;name&quot;: &quot;batched_calls_limit&quot;,&#xD;&#xA;              &quot;type&quot;: 4,&#xD;&#xA;              &quot;value&quot;: &quot;0xaa2a0000&quot;,&#xD;&#xA;              &quot;docs&quot;: [&#xD;&#xA;                &quot; The limit on the number of batched calls.&quot;&#xD;&#xA;              ]&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;errors&quot;: {&#xD;&#xA;            &quot;type&quot;: 414&#xD;&#xA;          },&#xD;&#xA;          &quot;index&quot;: 1&#xD;&#xA;        },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The docs cryptically state that its available in constant metadata.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;       * - `calls`: The calls to be dispatched from the same origin. The number of call must not&#xD;&#xA;       * exceed the constant: `batched_calls_limit` (available in constant metadata).&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29582" PostHistoryTypeId="1" PostId="7506" RevisionGUID="dc1a8929-8538-4326-9fb6-d99bc3b16fd3" CreationDate="2023-03-07T16:32:35.160" UserId="380" Text="How do I access pallet constants from polkadot-js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29583" PostHistoryTypeId="3" PostId="7506" RevisionGUID="dc1a8929-8538-4326-9fb6-d99bc3b16fd3" CreationDate="2023-03-07T16:32:35.160" UserId="380" Text="|polkadot-js|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29584" PostHistoryTypeId="2" PostId="7507" RevisionGUID="9817bb96-11fd-4b4b-a409-0cd339d8d25e" CreationDate="2023-03-07T16:36:17.997" UserId="512" Text="Answering my own question here, but I had an issue where I had a shared Rust library (`entropy-shared`) with types that were shared between a Rust binary and some Substrate pallets. The library included all the `impls` too, but I couldn't use them because:&#xD;&#xA;- `subxt` wouldn't let me use my library types directly (eg `entropy_shared::Constraints`); it wanted me to use the reexported types from the `subxt` macro.&#xD;&#xA;- there were no `impls` on the reexported types to transcode the two types between each other, since they're all generated from the Substrate metadata.&#xD;&#xA;&#xD;&#xA;My errors were as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; crypto/server/src/helpers/substrate.rs:153:9&#xD;&#xA;    |&#xD;&#xA;151 |     let update_constraints_tx = entropy::tx().constraints().update_constraints(&#xD;&#xA;    |                                                             ------------------ arguments to this function are incorrect&#xD;&#xA;152 |         sig_req_keyring.to_account_id(),&#xD;&#xA;153 |         initial_constraints.unwrap(),&#xD;&#xA;    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `entropy_shared::constraints::Constraints`, found struct `entropy_shared::Constraints`&#xD;&#xA;    |&#xD;&#xA;    = note: struct `entropy_shared::Constraints` and struct `entropy_shared::constraints::Constraints` have similar names, but are actually distinct types&#xD;&#xA;note: struct `entropy_shared::Constraints` is defined in crate `entropy_shared`&#xD;&#xA;   --&gt; /Users/jake/codebases/entropy/entropy-core/crypto/shared/src/constraints.rs:19:1&#xD;&#xA;    |&#xD;&#xA;19  | pub struct Constraints {&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;note: struct `entropy_shared::constraints::Constraints` is defined in the current crate&#xD;&#xA;   --&gt; crypto/server/src/chain_api.rs:5:1&#xD;&#xA;    |&#xD;&#xA;5   | #[subxt::subxt(runtime_metadata_path = &quot;entropy_metadata.scale&quot;)]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;note: associated function defined here&#xD;&#xA;   --&gt; crypto/server/src/chain_api.rs:5:1&#xD;&#xA;    |&#xD;&#xA;5   | #[subxt::subxt(runtime_metadata_path = &quot;entropy_metadata.scale&quot;)]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    = note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0308`.&#xD;&#xA;warning: `server` (bin &quot;server&quot; test) generated 1 warning&#xD;&#xA;error: could not compile `server` due to previous error; 1 warning emitted&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29586" PostHistoryTypeId="1" PostId="7507" RevisionGUID="9817bb96-11fd-4b4b-a409-0cd339d8d25e" CreationDate="2023-03-07T16:36:17.997" UserId="512" Text="How do you use subxt without having to use the re-exported types?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29587" PostHistoryTypeId="3" PostId="7507" RevisionGUID="9817bb96-11fd-4b4b-a409-0cd339d8d25e" CreationDate="2023-03-07T16:36:17.997" UserId="512" Text="|subxt|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29588" PostHistoryTypeId="2" PostId="7508" RevisionGUID="0787557a-c06b-470a-9ae4-eb350ad56533" CreationDate="2023-03-07T16:36:34.567" UserId="512" Text="&#xD;&#xA;The solution was to use the `substitute_type` macro argument, as shown below:&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;entropy_metadata.scale&quot;)]&#xD;&#xA;pub mod entropy {&#xD;&#xA;    #[subxt::subxt(substitute_type = &quot;entropy_shared::constraints::Constraints&quot;)]&#xD;&#xA;    use ::entropy_shared::Constraints;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I actually had to find it after digging through `cargo-contracts` from the dependents section of the `subxt` page. `substitute_type` is all documented in the `subxt-macro` [docs.rs page][2], which is not mentioned anywhere in the [docs.rs subxt page][1] or subsections.&#xD;&#xA;&#xD;&#xA;In hindsight, it makes sense that macro docs would be in another repo, but I think adding some reference to `subxt_macro` on the main `subxt` page might save others a lot of time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/subxt/0.27.1/subxt/index.html&#xD;&#xA;  [2]: https://docs.rs/subxt-macro/0.27.1/subxt_macro/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="29590" PostHistoryTypeId="5" PostId="7507" RevisionGUID="f0ec027d-dde5-4a69-b5a6-890fde7564b1" CreationDate="2023-03-07T16:37:44.330" UserId="512" Comment="grammer" Text="Answering my own question here, but I had an issue where I had a shared Rust library (`entropy-shared`) with types that were shared between a Rust binary using `subxt` and some Substrate pallets it interacts with. The library also included all the `impls` on the types, too, but I couldn't use them because:&#xD;&#xA;- `subxt` wouldn't let me use my library types directly (eg `entropy_shared::Constraints`); it wanted me to use the reexported types from the `subxt` macro, but,&#xD;&#xA;- there were no `impls` on the reexported types. I couldn't even transcode the two types between each other, since they're all generated from the Substrate metadata.&#xD;&#xA;&#xD;&#xA;My errors were as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; crypto/server/src/helpers/substrate.rs:153:9&#xD;&#xA;    |&#xD;&#xA;151 |     let update_constraints_tx = entropy::tx().constraints().update_constraints(&#xD;&#xA;    |                                                             ------------------ arguments to this function are incorrect&#xD;&#xA;152 |         sig_req_keyring.to_account_id(),&#xD;&#xA;153 |         initial_constraints,&#xD;&#xA;    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `entropy_shared::constraints::Constraints`, found struct `entropy_shared::Constraints`&#xD;&#xA;    |&#xD;&#xA;    = note: struct `entropy_shared::Constraints` and struct `entropy_shared::constraints::Constraints` have similar names, but are actually distinct types&#xD;&#xA;note: struct `entropy_shared::Constraints` is defined in crate `entropy_shared`&#xD;&#xA;   --&gt; /Users/jake/codebases/entropy/entropy-core/crypto/shared/src/constraints.rs:19:1&#xD;&#xA;    |&#xD;&#xA;19  | pub struct Constraints {&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;note: struct `entropy_shared::constraints::Constraints` is defined in the current crate&#xD;&#xA;   --&gt; crypto/server/src/chain_api.rs:5:1&#xD;&#xA;    |&#xD;&#xA;5   | #[subxt::subxt(runtime_metadata_path = &quot;entropy_metadata.scale&quot;)]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;note: associated function defined here&#xD;&#xA;   --&gt; crypto/server/src/chain_api.rs:5:1&#xD;&#xA;    |&#xD;&#xA;5   | #[subxt::subxt(runtime_metadata_path = &quot;entropy_metadata.scale&quot;)]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    = note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0308`.&#xD;&#xA;warning: `server` (bin &quot;server&quot; test) generated 1 warning&#xD;&#xA;error: could not compile `server` due to previous error; 1 warning emitted&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29591" PostHistoryTypeId="2" PostId="7509" RevisionGUID="da1ff626-508e-4dc9-9a29-a16999bd39f3" CreationDate="2023-03-07T17:32:35.663" UserId="29" Text="You can access the Utility constant(s) like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const getUtilityConstants = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const utilityConstants = await api.consts.utility;&#xD;&#xA;    console.dir(utilityConstants, { depth: 5 });&#xD;&#xA;    console.log(utilityConstants.batchedCallsLimit.toHuman());&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29594" PostHistoryTypeId="2" PostId="7510" RevisionGUID="0f7d5c0c-7695-4736-aff8-86314d7fbadc" CreationDate="2023-03-07T18:24:32.847" UserId="29" Text="According to [this PR](https://github.com/paritytech/polkadot/pull/5451):&#xD;&#xA;&#xD;&#xA;&gt; A para becomes locked automatically when it is upgraded to a parachain&#xD;&#xA;&gt; or is part of a crowdloan.&#xD;&#xA;&gt; &#xD;&#xA;&gt; ---&#xD;&#xA;&gt; &#xD;&#xA;&gt; To unlock the parachain, either ROOT or the parachain itself must call&#xD;&#xA;&gt; the `remove_lock` function.&#xD;&#xA;&gt; &#xD;&#xA;&gt; While the parachain is unlocked, the parachain registration owner has&#xD;&#xA;&gt; access to the following functions:&#xD;&#xA;&gt; &#xD;&#xA;&gt; 1. `deregister` - Which registers a parachain from the system.&#xD;&#xA;&gt; 2. `swap` - Which signals that a parachain is willing to trade leases with another parachain.&#xD;&#xA;&gt; 3. `schedule_code_upgrade` - Which allows a new runtime code to be scheduled at a future block, just like if the parachain were to&#xD;&#xA;&gt; schedule an upgrade.&#xD;&#xA;&gt; 4. `set_current_head` - Which allows new head data to be set for a parachain.&#xD;&#xA;&gt; &#xD;&#xA;&gt; While a parachain is unlocked, the chain should be considered the same&#xD;&#xA;&gt; as if the `Sudo` module was installed on that chain. For many&#xD;&#xA;&gt; parachains, there will be a period where being unlocked will be&#xD;&#xA;&gt; helpful for onboarding, and at a future point, the chain can be&#xD;&#xA;&gt; locked. Until then, the lock status of a chain should be a&#xD;&#xA;&gt; consideration for any users participating in crowdloans, using that&#xD;&#xA;&gt; chain, or even other parachains seeking to interact with that chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="29596" PostHistoryTypeId="2" PostId="7511" RevisionGUID="18f8f098-e6ce-4d4d-a7cb-5347381bc46d" CreationDate="2023-03-07T18:43:28.507" UserId="3930" Text="I want to use the *as_derivative* function from *pallet_utility* in my ink! smart contract, and also use psp34 from Openbush. What steps do I need to follow to create a chain extension for *pallet_utility* and use it in my smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29598" PostHistoryTypeId="1" PostId="7511" RevisionGUID="18f8f098-e6ce-4d4d-a7cb-5347381bc46d" CreationDate="2023-03-07T18:43:28.507" UserId="3930" Text="Chain extension for pallet_utility" ContentLicense="CC BY-SA 4.0" />
  <row Id="29599" PostHistoryTypeId="3" PostId="7511" RevisionGUID="18f8f098-e6ce-4d4d-a7cb-5347381bc46d" CreationDate="2023-03-07T18:43:28.507" UserId="3930" Text="|pallet|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29600" PostHistoryTypeId="2" PostId="7512" RevisionGUID="0e2e11c2-1374-43e7-9403-3f6e13a5a391" CreationDate="2023-03-07T19:10:25.623" UserId="3123" Text="I am adding bootnodes to chainspecs and I wonder if I should prefer setting validator nodes or rpc nodes in the bootnodes list. They are all connected with p2p, but is there a reason to privilege some over the other for network discovery?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29602" PostHistoryTypeId="1" PostId="7512" RevisionGUID="0e2e11c2-1374-43e7-9403-3f6e13a5a391" CreationDate="2023-03-07T19:10:25.623" UserId="3123" Text="Should I set validator or rpc nodes in chainspec bootnodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29603" PostHistoryTypeId="3" PostId="7512" RevisionGUID="0e2e11c2-1374-43e7-9403-3f6e13a5a391" CreationDate="2023-03-07T19:10:25.623" UserId="3123" Text="|chainspec|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29604" PostHistoryTypeId="52" PostId="7497" RevisionGUID="b900320c-e055-4d81-a37f-6887e183a744" CreationDate="2023-03-07T19:11:04.943" />
  <row Id="29605" PostHistoryTypeId="2" PostId="7513" RevisionGUID="5f0bea2e-8792-472f-8e13-05af25d0a7b8" CreationDate="2023-03-07T19:16:09.297" UserId="3931" Text="Currently I have problem that Valico is using std based packages like `serde` and `serde_json`. Is there any workaround to use this package?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29607" PostHistoryTypeId="1" PostId="7513" RevisionGUID="5f0bea2e-8792-472f-8e13-05af25d0a7b8" CreationDate="2023-03-07T19:16:09.297" UserId="3931" Text="Using Valico JSON validator in my pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="29608" PostHistoryTypeId="3" PostId="7513" RevisionGUID="5f0bea2e-8792-472f-8e13-05af25d0a7b8" CreationDate="2023-03-07T19:16:09.297" UserId="3931" Text="|pallet|no-std|json|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29613" PostHistoryTypeId="2" PostId="7515" RevisionGUID="5b3e1253-ea31-4e54-934c-95e3346e2461" CreationDate="2023-03-07T19:34:39.353" UserId="2960" Text="Working on substare node-template , When I run benchmark I get the below error. It says 'setjmp.h' file not found. I am working on Macbook pro&#xD;&#xA;&#xD;&#xA;    $cargo build --release --features runtime-benchmarks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; error: failed to run custom build command for `wasmtime-runtime v1.0.2`&#xD;&#xA;    &#xD;&#xA;      Caused by:&#xD;&#xA;        process didn't exit successfully: `/Users/yusufkelo/Documents/Developer/workspaces/substrate-projects/substrate-node-template-2023/target/release/wbuild/node-template-runtime/target/release/build/wasmtime-runtime-04bf801e868dc470/build-script-build` (exit status: 1)&#xD;&#xA;        --- stdout&#xD;&#xA;        cargo:rerun-if-changed=src/helpers.c&#xD;&#xA;        TARGET = Some(&quot;wasm32-unknown-unknown&quot;)&#xD;&#xA;        OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;        HOST = Some(&quot;aarch64-apple-darwin&quot;)&#xD;&#xA;        cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown&#xD;&#xA;        CC_wasm32-unknown-unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown&#xD;&#xA;        CC_wasm32_unknown_unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=TARGET_CC&#xD;&#xA;        TARGET_CC = None&#xD;&#xA;        cargo:rerun-if-env-changed=CC&#xD;&#xA;        CC = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown&#xD;&#xA;        CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown&#xD;&#xA;        CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=TARGET_CFLAGS&#xD;&#xA;        TARGET_CFLAGS = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS&#xD;&#xA;        CFLAGS = None&#xD;&#xA;        cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;        CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;        DEBUG = Some(&quot;false&quot;)&#xD;&#xA;        running: &quot;clang&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DCFG_TARGET_OS_unknown&quot; &quot;-DCFG_TARGET_ARCH_wasm32&quot; &quot;-o&quot; &quot;/Users/yusufkelo/Documents/Developer/workspaces/substrate-projects/substrate-node-template-2023/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/build/wasmtime-runtime-b8e432731307a73b/out/src/helpers.o&quot; &quot;-c&quot; &quot;src/helpers.c&quot;&#xD;&#xA;        cargo:warning=src/helpers.c:1:10: fatal error: 'setjmp.h' file not found&#xD;&#xA;        cargo:warning=#include &lt;setjmp.h&gt;&#xD;&#xA;        cargo:warning=         ^~~~~~~~~~&#xD;&#xA;        cargo:warning=1 error generated.&#xD;&#xA;        exit status: 1&#xD;&#xA;    &#xD;&#xA;        --- stderr" ContentLicense="CC BY-SA 4.0" />
  <row Id="29615" PostHistoryTypeId="1" PostId="7515" RevisionGUID="5b3e1253-ea31-4e54-934c-95e3346e2461" CreationDate="2023-03-07T19:34:39.353" UserId="2960" Text="Substrate benchmarking error" ContentLicense="CC BY-SA 4.0" />
  <row Id="29616" PostHistoryTypeId="3" PostId="7515" RevisionGUID="5b3e1253-ea31-4e54-934c-95e3346e2461" CreationDate="2023-03-07T19:34:39.353" UserId="2960" Text="|polkadot|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29617" PostHistoryTypeId="2" PostId="7516" RevisionGUID="a6011aa6-4993-46fe-bac7-108319714f1f" CreationDate="2023-03-07T19:34:46.030" UserId="29" Text="There are some resources on chain extension here:&#xD;&#xA;- https://use.ink/macros-attributes/chain-extension&#xD;&#xA;- https://github.com/paritytech/ink-examples/tree/main/rand-extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="29619" PostHistoryTypeId="2" PostId="7517" RevisionGUID="eea92b17-7c57-4502-a9b4-785528002c1c" CreationDate="2023-03-07T19:38:33.033" UserId="29" Text="Have you tried building for WebAssembly:&#xD;&#xA;- https://github.com/s-panferov/valico#building-for-other-targets&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;# Cargo.toml&#xD;&#xA;valico = { version = &quot;2&quot;, features = [&quot;js&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Perhaps it gives you a no-std version." ContentLicense="CC BY-SA 4.0" />
  <row Id="29621" PostHistoryTypeId="5" PostId="7515" RevisionGUID="27d982e2-3efc-4719-a266-95527c14d6d3" CreationDate="2023-03-07T19:40:27.730" UserId="29" Comment="deleted 1 character in body" Text="Working on substare node-template , When I run benchmark I get the below error. It says 'setjmp.h' file not found. I am working on Macbook pro&#xD;&#xA;&#xD;&#xA;    cargo build --release --features runtime-benchmarks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; error: failed to run custom build command for `wasmtime-runtime v1.0.2`&#xD;&#xA;    &#xD;&#xA;      Caused by:&#xD;&#xA;        process didn't exit successfully: `/Users/yusufkelo/Documents/Developer/workspaces/substrate-projects/substrate-node-template-2023/target/release/wbuild/node-template-runtime/target/release/build/wasmtime-runtime-04bf801e868dc470/build-script-build` (exit status: 1)&#xD;&#xA;        --- stdout&#xD;&#xA;        cargo:rerun-if-changed=src/helpers.c&#xD;&#xA;        TARGET = Some(&quot;wasm32-unknown-unknown&quot;)&#xD;&#xA;        OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;        HOST = Some(&quot;aarch64-apple-darwin&quot;)&#xD;&#xA;        cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown&#xD;&#xA;        CC_wasm32-unknown-unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown&#xD;&#xA;        CC_wasm32_unknown_unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=TARGET_CC&#xD;&#xA;        TARGET_CC = None&#xD;&#xA;        cargo:rerun-if-env-changed=CC&#xD;&#xA;        CC = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown&#xD;&#xA;        CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown&#xD;&#xA;        CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=TARGET_CFLAGS&#xD;&#xA;        TARGET_CFLAGS = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS&#xD;&#xA;        CFLAGS = None&#xD;&#xA;        cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;        CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;        DEBUG = Some(&quot;false&quot;)&#xD;&#xA;        running: &quot;clang&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DCFG_TARGET_OS_unknown&quot; &quot;-DCFG_TARGET_ARCH_wasm32&quot; &quot;-o&quot; &quot;/Users/yusufkelo/Documents/Developer/workspaces/substrate-projects/substrate-node-template-2023/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/build/wasmtime-runtime-b8e432731307a73b/out/src/helpers.o&quot; &quot;-c&quot; &quot;src/helpers.c&quot;&#xD;&#xA;        cargo:warning=src/helpers.c:1:10: fatal error: 'setjmp.h' file not found&#xD;&#xA;        cargo:warning=#include &lt;setjmp.h&gt;&#xD;&#xA;        cargo:warning=         ^~~~~~~~~~&#xD;&#xA;        cargo:warning=1 error generated.&#xD;&#xA;        exit status: 1&#xD;&#xA;    &#xD;&#xA;        --- stderr" ContentLicense="CC BY-SA 4.0" />
  <row Id="29622" PostHistoryTypeId="2" PostId="7518" RevisionGUID="a4ae19f2-b31d-40a8-8e59-1cead8d1bdd7" CreationDate="2023-03-07T19:51:41.123" UserId="3123" Text="I read [good practices](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot) of how to setup a validator node, but I did not see a network part.&#xD;&#xA;&#xD;&#xA;A validator node should not expose a public RPC API (it should only be internal, allowing access through a VPN or ssh tunnel), but what should it do for its p2p endpoint? Because it can explore the network thanks to the bootnodes, does it really have to listen to incoming p2p connections or can it rely only on the bidirectional connections it initiates to other parts of the network?&#xD;&#xA;&#xD;&#xA;If it exposes a public address, should it listen directly on TCP or can it wrap incoming connections in a websocket or so?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29624" PostHistoryTypeId="1" PostId="7518" RevisionGUID="a4ae19f2-b31d-40a8-8e59-1cead8d1bdd7" CreationDate="2023-03-07T19:51:41.123" UserId="3123" Text="How to setup the network of a validator node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29625" PostHistoryTypeId="3" PostId="7518" RevisionGUID="a4ae19f2-b31d-40a8-8e59-1cead8d1bdd7" CreationDate="2023-03-07T19:51:41.123" UserId="3123" Text="|validator|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29626" PostHistoryTypeId="5" PostId="7513" RevisionGUID="92e4c6f4-81bf-4cdf-8778-e57b68f5fa0e" CreationDate="2023-03-07T19:56:21.790" UserId="3931" Comment="added 206 characters in body" Text="Currently I have problem that Valico is using std based packages like `serde` and `serde_json`. Is there any workaround to use this package?&#xD;&#xA;&#xD;&#xA;UPDATE1:&#xD;&#xA;I managed to [fork](https://github.com/brano-hozza/valico) repo and fix some dependencies but now i am getting these errors:&#xD;&#xA;[![error_1][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HUKlF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29627" PostHistoryTypeId="5" PostId="7515" RevisionGUID="79f8bb73-b109-40bc-96a9-d0588a6bdb4c" CreationDate="2023-03-07T20:15:58.310" UserId="2960" Comment="added 820 characters in body" Text="Working on substare node-template , When I run benchmark I get the below error. It says 'setjmp.h' file not found. I am working on Macbook pro&#xD;&#xA;&#xD;&#xA;    cargo build --release --features runtime-benchmarks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; error: failed to run custom build command for `wasmtime-runtime v1.0.2`&#xD;&#xA;    &#xD;&#xA;      Caused by:&#xD;&#xA;        process didn't exit successfully: `/Users/yusufkelo/Documents/Developer/workspaces/substrate-projects/substrate-node-template-2023/target/release/wbuild/node-template-runtime/target/release/build/wasmtime-runtime-04bf801e868dc470/build-script-build` (exit status: 1)&#xD;&#xA;        --- stdout&#xD;&#xA;        cargo:rerun-if-changed=src/helpers.c&#xD;&#xA;        TARGET = Some(&quot;wasm32-unknown-unknown&quot;)&#xD;&#xA;        OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;        HOST = Some(&quot;aarch64-apple-darwin&quot;)&#xD;&#xA;        cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown&#xD;&#xA;        CC_wasm32-unknown-unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown&#xD;&#xA;        CC_wasm32_unknown_unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=TARGET_CC&#xD;&#xA;        TARGET_CC = None&#xD;&#xA;        cargo:rerun-if-env-changed=CC&#xD;&#xA;        CC = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown&#xD;&#xA;        CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown&#xD;&#xA;        CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=TARGET_CFLAGS&#xD;&#xA;        TARGET_CFLAGS = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS&#xD;&#xA;        CFLAGS = None&#xD;&#xA;        cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;        CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;        DEBUG = Some(&quot;false&quot;)&#xD;&#xA;        running: &quot;clang&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DCFG_TARGET_OS_unknown&quot; &quot;-DCFG_TARGET_ARCH_wasm32&quot; &quot;-o&quot; &quot;/Users/yusufkelo/Documents/Developer/workspaces/substrate-projects/substrate-node-template-2023/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/build/wasmtime-runtime-b8e432731307a73b/out/src/helpers.o&quot; &quot;-c&quot; &quot;src/helpers.c&quot;&#xD;&#xA;        cargo:warning=src/helpers.c:1:10: fatal error: 'setjmp.h' file not found&#xD;&#xA;        cargo:warning=#include &lt;setjmp.h&gt;&#xD;&#xA;        cargo:warning=         ^~~~~~~~~~&#xD;&#xA;        cargo:warning=1 error generated.&#xD;&#xA;        exit status: 1&#xD;&#xA;    &#xD;&#xA;        --- stderr&#xD;&#xA;&#xD;&#xA;using polkadot polkadot-v0.9.35&quot;&#xD;&#xA;After running `rustup +nightly show` I get the below &#xD;&#xA;&#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-aarch64-apple-darwin&#xD;&#xA;    nightly-2021-11-29-aarch64-apple-darwin&#xD;&#xA;    nightly-2022-01-31-aarch64-apple-darwin&#xD;&#xA;    nightly-2022-03-10-aarch64-apple-darwin&#xD;&#xA;    nightly-2022-08-09-aarch64-apple-darwin&#xD;&#xA;    nightly-aarch64-apple-darwin (default)&#xD;&#xA;    bpf&#xD;&#xA;    sbf&#xD;&#xA;    1.65.0-aarch64-apple-darwin&#xD;&#xA;    1.66.0-aarch64-apple-darwin&#xD;&#xA;    &#xD;&#xA;    installed targets for active toolchain&#xD;&#xA;    --------------------------------------&#xD;&#xA;    &#xD;&#xA;    aarch64-apple-darwin&#xD;&#xA;    thumbv7em-none-eabihf&#xD;&#xA;    wasm32-unknown-unknown&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;    rustc 1.70.0-nightly (f63ccaf25 2023-03-06)" ContentLicense="CC BY-SA 4.0" />
  <row Id="29628" PostHistoryTypeId="4" PostId="7515" RevisionGUID="79f8bb73-b109-40bc-96a9-d0588a6bdb4c" CreationDate="2023-03-07T20:15:58.310" UserId="2960" Comment="added 820 characters in body" Text="Substrate run benchmarking error - 'setjmp.h' file not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="29630" PostHistoryTypeId="5" PostId="7515" RevisionGUID="77609ac9-c89a-4b0a-a31c-368d3f7bb9a6" CreationDate="2023-03-07T20:40:56.077" UserId="29" Comment="added 1 character in body" Text="Working on substrate-node-template , When I run benchmark I get the below error. It says 'setjmp.h' file not found. I am working on Macbook pro&#xD;&#xA;&#xD;&#xA;    cargo build --release --features runtime-benchmarks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; error: failed to run custom build command for `wasmtime-runtime v1.0.2`&#xD;&#xA;    &#xD;&#xA;      Caused by:&#xD;&#xA;        process didn't exit successfully: `/Users/yusufkelo/Documents/Developer/workspaces/substrate-projects/substrate-node-template-2023/target/release/wbuild/node-template-runtime/target/release/build/wasmtime-runtime-04bf801e868dc470/build-script-build` (exit status: 1)&#xD;&#xA;        --- stdout&#xD;&#xA;        cargo:rerun-if-changed=src/helpers.c&#xD;&#xA;        TARGET = Some(&quot;wasm32-unknown-unknown&quot;)&#xD;&#xA;        OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;        HOST = Some(&quot;aarch64-apple-darwin&quot;)&#xD;&#xA;        cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown&#xD;&#xA;        CC_wasm32-unknown-unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown&#xD;&#xA;        CC_wasm32_unknown_unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=TARGET_CC&#xD;&#xA;        TARGET_CC = None&#xD;&#xA;        cargo:rerun-if-env-changed=CC&#xD;&#xA;        CC = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown&#xD;&#xA;        CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown&#xD;&#xA;        CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;        cargo:rerun-if-env-changed=TARGET_CFLAGS&#xD;&#xA;        TARGET_CFLAGS = None&#xD;&#xA;        cargo:rerun-if-env-changed=CFLAGS&#xD;&#xA;        CFLAGS = None&#xD;&#xA;        cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;        CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;        DEBUG = Some(&quot;false&quot;)&#xD;&#xA;        running: &quot;clang&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DCFG_TARGET_OS_unknown&quot; &quot;-DCFG_TARGET_ARCH_wasm32&quot; &quot;-o&quot; &quot;/Users/yusufkelo/Documents/Developer/workspaces/substrate-projects/substrate-node-template-2023/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/build/wasmtime-runtime-b8e432731307a73b/out/src/helpers.o&quot; &quot;-c&quot; &quot;src/helpers.c&quot;&#xD;&#xA;        cargo:warning=src/helpers.c:1:10: fatal error: 'setjmp.h' file not found&#xD;&#xA;        cargo:warning=#include &lt;setjmp.h&gt;&#xD;&#xA;        cargo:warning=         ^~~~~~~~~~&#xD;&#xA;        cargo:warning=1 error generated.&#xD;&#xA;        exit status: 1&#xD;&#xA;    &#xD;&#xA;        --- stderr&#xD;&#xA;&#xD;&#xA;using polkadot polkadot-v0.9.35&quot;&#xD;&#xA;After running `rustup +nightly show` I get the below &#xD;&#xA;&#xD;&#xA;    installed toolchains&#xD;&#xA;    --------------------&#xD;&#xA;    &#xD;&#xA;    stable-aarch64-apple-darwin&#xD;&#xA;    nightly-2021-11-29-aarch64-apple-darwin&#xD;&#xA;    nightly-2022-01-31-aarch64-apple-darwin&#xD;&#xA;    nightly-2022-03-10-aarch64-apple-darwin&#xD;&#xA;    nightly-2022-08-09-aarch64-apple-darwin&#xD;&#xA;    nightly-aarch64-apple-darwin (default)&#xD;&#xA;    bpf&#xD;&#xA;    sbf&#xD;&#xA;    1.65.0-aarch64-apple-darwin&#xD;&#xA;    1.66.0-aarch64-apple-darwin&#xD;&#xA;    &#xD;&#xA;    installed targets for active toolchain&#xD;&#xA;    --------------------------------------&#xD;&#xA;    &#xD;&#xA;    aarch64-apple-darwin&#xD;&#xA;    thumbv7em-none-eabihf&#xD;&#xA;    wasm32-unknown-unknown&#xD;&#xA;    &#xD;&#xA;    active toolchain&#xD;&#xA;    ----------------&#xD;&#xA;    &#xD;&#xA;    nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;    rustc 1.70.0-nightly (f63ccaf25 2023-03-06)" ContentLicense="CC BY-SA 4.0" />
  <row Id="29631" PostHistoryTypeId="2" PostId="7519" RevisionGUID="16772d49-e844-457e-8dc0-2817cf652035" CreationDate="2023-03-07T21:01:24.853" UserId="73" Text="&gt; They are all connected with p2p, but is there a reason to privilege some over the other for network discovery?&#xD;&#xA;&#xD;&#xA;No, not really. Having dedicated nodes as boot nodes would be more &quot;clean&quot;, but there is no strict requirement. As you already said, they are all connected to each other any way!" ContentLicense="CC BY-SA 4.0" />
  <row Id="29634" PostHistoryTypeId="2" PostId="7520" RevisionGUID="8db384a2-20a9-4a44-a810-1bff977b9a9c" CreationDate="2023-03-07T23:38:01.093" UserId="2830" Text="I am wondering where do you deploy your substrate nodes for production or staging? Do you deploy the nodes to some cloud servers? How many connected nodes are sufficient to keep the network running?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29636" PostHistoryTypeId="1" PostId="7520" RevisionGUID="8db384a2-20a9-4a44-a810-1bff977b9a9c" CreationDate="2023-03-07T23:38:01.093" UserId="2830" Text="Substrate Deployment for Prod/Staging" ContentLicense="CC BY-SA 4.0" />
  <row Id="29637" PostHistoryTypeId="3" PostId="7520" RevisionGUID="8db384a2-20a9-4a44-a810-1bff977b9a9c" CreationDate="2023-03-07T23:38:01.093" UserId="2830" Text="|substrate-node-template|nodes|genesis|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29638" PostHistoryTypeId="2" PostId="7521" RevisionGUID="7bb2d8d7-af4a-4630-a84c-2752ee4af61b" CreationDate="2023-03-08T03:09:37.310" UserId="251" Text="It's totally up to you.&#xD;&#xA;&#xD;&#xA;Even if you close that port, you can still connect to others and produce blocks.&#xD;&#xA;&#xD;&#xA;You can refuse any incoming connection. It's just others can't connect to your node." ContentLicense="CC BY-SA 4.0" />
  <row Id="29640" PostHistoryTypeId="2" PostId="7522" RevisionGUID="ebc91ce9-7b63-4200-a17a-ead7e3b088b8" CreationDate="2023-03-08T04:33:24.133" UserId="251" Text="We deployed our public nodes on GCP(2C 6G).&#xD;&#xA;&#xD;&#xA;Three nodes are enough for us. It can afford subquery and subscan indexing.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For production, we only deployed two bootnodes. And we left other seats for the community." ContentLicense="CC BY-SA 4.0" />
  <row Id="29642" PostHistoryTypeId="2" PostId="7523" RevisionGUID="33ded651-95a1-4de7-bb52-d26b21082567" CreationDate="2023-03-08T05:01:23.847" UserId="377" Text="I have read about the parathread feature on polkadot. by which if we have minimal load on chain so we can go with parathread instead of parachain.&#xD;&#xA;references i read: https://wiki.polkadot.network/docs/learn-parathreads&#xD;&#xA;https://medium.com/polkadot-network/parathreads-pay-as-you-go-parachains-7440d23dde06&#xD;&#xA;&#xD;&#xA;But i have not found the guide or process how we can do it.&#xD;&#xA;can you please share some resource about the process to live the parathread?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29644" PostHistoryTypeId="1" PostId="7523" RevisionGUID="33ded651-95a1-4de7-bb52-d26b21082567" CreationDate="2023-03-08T05:01:23.847" UserId="377" Text="How we can use the parathread feature on polkadot chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29645" PostHistoryTypeId="3" PostId="7523" RevisionGUID="33ded651-95a1-4de7-bb52-d26b21082567" CreationDate="2023-03-08T05:01:23.847" UserId="377" Text="|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29646" PostHistoryTypeId="5" PostId="7523" RevisionGUID="1e669e84-165b-4fae-ab09-655e27871306" CreationDate="2023-03-08T05:14:07.723" UserId="377" Comment="added 68 characters in body" Text="I have read about the parathread feature on polkadot. by which if we have minimal load on chain so we can go with parathread instead of parachain.&#xD;&#xA;references i read: https://wiki.polkadot.network/docs/learn-parathreads&#xD;&#xA;https://medium.com/polkadot-network/parathreads-pay-as-you-go-parachains-7440d23dde06&#xD;&#xA;&#xD;&#xA;But i have not found the guide or process how we can do it.&#xD;&#xA;can you please share some resource about the process to live the parathread?&#xD;&#xA;&#xD;&#xA;how the flow will work to finalize transactions as a parathread?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29647" PostHistoryTypeId="2" PostId="7524" RevisionGUID="971aaec2-f6a9-427c-b622-75995993eb7c" CreationDate="2023-03-08T05:47:13.253" UserId="372" Text="This question is about [these lines](https://github.com/paritytech/substrate/blob/f59f5019333c44b2513852f7ddf30514430ec78f/frame/executive/src/lib.rs#L558-L563) in FRAME Executive's `apply_extrinsic` function&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	pub fn apply_extrinsic(uxt: Block::Extrinsic) -&gt; ApplyExtrinsicResult {&#xD;&#xA;		// --snip--&#xD;&#xA;&#xD;&#xA;		// We don't need to make sure to `note_extrinsic` only after we know it's going to be&#xD;&#xA;		// executed to prevent it from leaking in storage since at this point, it will either&#xD;&#xA;		// execute or panic (and revert storage changes).&#xD;&#xA;		&lt;frame_system::Pallet&lt;System&gt;&gt;::note_extrinsic(encoded);&#xD;&#xA;&#xD;&#xA;		// AUDIT: Under no circumstances may this function panic from here onwards.&#xD;&#xA;&#xD;&#xA;		// --snip--&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The comment before the extrinsic is noted explains that if the extrinsic turns out to be bad, this function will panic and revert the storage changes. Therefore, it is okay to note the extrinsic right away before it has even been applied (where noting means recording it in temporary storage to later calculate the extrinsics root). This makes sense to me.&#xD;&#xA;&#xD;&#xA;However, the comment after the extrinsic is noted emphasizes that it is not okay to panic anywhere else in that function.&#xD;&#xA;&#xD;&#xA;So how are these comments consistent with each other? They seem to contradict each other." ContentLicense="CC BY-SA 4.0" />
  <row Id="29649" PostHistoryTypeId="1" PostId="7524" RevisionGUID="971aaec2-f6a9-427c-b622-75995993eb7c" CreationDate="2023-03-08T05:47:13.253" UserId="372" Text="When may `apply_extrinsic` panic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29650" PostHistoryTypeId="3" PostId="7524" RevisionGUID="971aaec2-f6a9-427c-b622-75995993eb7c" CreationDate="2023-03-08T05:47:13.253" UserId="372" Text="|frame|frame-executive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29652" PostHistoryTypeId="50" PostId="2724" RevisionGUID="9cb37dea-0581-4243-83eb-0f5f677c354f" CreationDate="2023-03-08T11:03:15.353" UserId="-1" />
  <row Id="29653" PostHistoryTypeId="2" PostId="7525" RevisionGUID="a331ce74-9707-4def-a381-25081d9bd20c" CreationDate="2023-03-08T14:43:50.280" UserId="3546" Text="Generally speaking you should allow inbound connections as well, it contributes positively to the overall connectivity of the network. Lately there has been some issues opened on the Substrate repository about syncing slowing down and this was attributed partly to there simply being too many full nodes on the network. You can imagine that blocking inbound connections doesn't help this situation as your node will occupy slots on other publicly reachable nodes but doesn't itself offer any slots for other full nodes.&#xD;&#xA;&#xD;&#xA;We're doing some research in providing ability to do hole punching over QUIC but that is likely months away which would take firewall configuration out of the equation and make it easier to allow inbound connections." ContentLicense="CC BY-SA 4.0" />
  <row Id="29655" PostHistoryTypeId="5" PostId="7525" RevisionGUID="3713b06e-03cc-4ca1-89ac-d2e697bef5e9" CreationDate="2023-03-08T14:46:55.250" UserId="3546" Comment="added 1 character in body" Text="Generally speaking you should allow inbound connections as well, it contributes positively to the overall connectivity of the network. Lately there has been some issues opened on the Substrate repository about syncing slowing down and this was attributed partly to there simply being too many full nodes on the network. You can imagine that blocking inbound connections doesn't help this situation as your node will occupy slots on other publicly reachable nodes but doesn't itself offer any slots for other full nodes.&#xD;&#xA;&#xD;&#xA;We're doing some research in providing ability to do hole punching over QUIC but that is likely months away but it would take firewall configuration out of the equation and make it easier to allow inbound connections." ContentLicense="CC BY-SA 4.0" />
  <row Id="29656" PostHistoryTypeId="2" PostId="7526" RevisionGUID="8d14338c-1c86-4a9a-9ce3-33bec55ce50e" CreationDate="2023-03-08T15:42:07.677" UserId="2762" Text="From your instructions I can't spot where the problem is, your procedure seems correct.&#xD;&#xA;&#xD;&#xA;But I can suggest you some resources to look at:&#xD;&#xA;&#xD;&#xA; - Check this guide of how to perform a [Parachain State Rollback][1], you can follow the instructions to export the state (in your case omit the part of purge the data).&#xD;&#xA; - Take a look on the answer in this previous SE question: [Could not find the header of the genesis block in the database!][2].&#xD;&#xA; - Check this PR on the cumulus repo: [Could not find the header of the genesis block in the database][3], it suggest the use of the optional flag `--parachain-id` to export the state. &#xD;&#xA;- Take a look in the guide of how to [How to migrate from Kusama to Polkadot?][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://hackmd.io/3BAy3HEzRVO2sBFnUaBVKA&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1987/could-not-find-the-header-of-the-genesis-block-in-the-database&#xD;&#xA;  [3]: https://github.com/paritytech/cumulus/issues/385&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/7497/how-to-migrate-from-kusama-to-polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="29658" PostHistoryTypeId="50" PostId="7091" RevisionGUID="b3eb87f2-9ae5-4aff-b148-07e16c3ff472" CreationDate="2023-03-08T16:03:50.410" UserId="-1" />
  <row Id="29659" PostHistoryTypeId="6" PostId="7505" RevisionGUID="711b32dc-66db-42a4-92c7-486eb15efc81" CreationDate="2023-03-08T17:01:35.293" UserId="167" Comment="edited tags" Text="|frame|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29662" PostHistoryTypeId="2" PostId="7528" RevisionGUID="60722a26-64a7-42e5-a71d-38d375c9f0c3" CreationDate="2023-03-08T18:16:11.580" UserId="29" Text="Issue has been discussed &amp; closed here:&#xD;&#xA;- https://github.com/paritytech/polkadot/issues/6758" ContentLicense="CC BY-SA 4.0" />
  <row Id="29664" PostHistoryTypeId="2" PostId="7529" RevisionGUID="9b9eb3ab-765e-4d06-b6b1-5ff69d6eb68d" CreationDate="2023-03-08T19:18:07.487" UserId="251" Text="Of course, this won't work.&#xD;&#xA;&#xD;&#xA;`export-state` will build a new chain spec upon the existing data.&#xD;&#xA;&#xD;&#xA;The block number will start from 0. You can check the `state_root` and `parent_hash` in the new head data. They are totally different. And the log tells you, `Could not find the header of the genesis block in the database! block_hash=0x922d43a0606e6c6315c301bcbd7c27ba5c8e88f9665e85b621796c82c81ce780`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I didn't try this before. But I guess you can get the current head data and wasm code on old relaychain and set them into the new relaychain. That's the correct data for your existing chain (I've tried this before to revert a parachain to an early state). But I'm not sure if this works for register parachain on a new relaychain.&#xD;&#xA;&#xD;&#xA;Furthermore, you need to handle some states.&#xD;&#xA;&#xD;&#xA;Like the HRMP data. If you have some HRMP data on the old relaychain but new parachain not, you can't produce block due to the mismatched state.&#xD;&#xA;&#xD;&#xA;Check:&#xD;&#xA;- https://twitter.com/AurevoirXavier/status/1633459851782389763&#xD;&#xA;- https://github.com/darwinia-network/darwinia-2.0/issues/308&#xD;&#xA;- https://github.com/darwinia-network/darwinia-2.0/pull/278&#xD;&#xA;- https://github.com/darwinia-network/darwinia-2.0/issues/289" ContentLicense="CC BY-SA 4.0" />
  <row Id="29666" PostHistoryTypeId="2" PostId="7530" RevisionGUID="28b03d18-e5fc-4eb5-ba56-9d322a95d912" CreationDate="2023-03-08T20:34:54.720" UserId="298" Text="Added preimage pallet [here][1], (because it seems to be a necessity in the &gt; polkadot-0.9.37)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It shows up in `developer &gt; extrinsics &gt; preimage&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;but does not show up in `query &gt; preimage`... &#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have added the necessary changes to the `runtime/src/lib.rs` not sur what i am missing? &#xD;&#xA;&#xD;&#xA;Do i need to add a runtime api? But I dont see it added in other examples...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;you can view it in [polkadot-js-apps here][4]&#xD;&#xA;&#xD;&#xA;and here is the [branch][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kabocha-network/parachain/blob/kab-release-v0.2.6-soupcan-new-xcm/runtime/src/lib.rs&#xD;&#xA;  [2]: https://i.stack.imgur.com/cJyQl.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/h2Pcv.png&#xD;&#xA;  [4]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fsoupcan1.jelliedowl.com#/chainstate" ContentLicense="CC BY-SA 4.0" />
  <row Id="29668" PostHistoryTypeId="1" PostId="7530" RevisionGUID="28b03d18-e5fc-4eb5-ba56-9d322a95d912" CreationDate="2023-03-08T20:34:54.720" UserId="298" Text="preimage pallet is added, it shows up in extrinsics &gt; preimage, but does not show up in chain &gt; storage &gt; preimage" ContentLicense="CC BY-SA 4.0" />
  <row Id="29669" PostHistoryTypeId="3" PostId="7530" RevisionGUID="28b03d18-e5fc-4eb5-ba56-9d322a95d912" CreationDate="2023-03-08T20:34:54.720" UserId="298" Text="|parachain|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29670" PostHistoryTypeId="2" PostId="7531" RevisionGUID="03ec143a-6abc-4976-afb0-e2ce6834548b" CreationDate="2023-03-08T21:38:51.817" UserId="2445" Text="If you want to have the storage visible, you also need to add `Storage`, when you add instantiate the pallet in the `construct_runtime!` macro, i.e.:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;Preimage: pallet_preimage::{Pallet, Event&lt;T&gt;, Call, Storage} = 19,&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29672" PostHistoryTypeId="5" PostId="7531" RevisionGUID="90c8b0a7-2c4b-4bd5-8894-1076f4877bb5" CreationDate="2023-03-08T21:39:10.840" UserId="2445" Comment="deleted 4 characters in body" Text="If you want to have the storage visible, you also need to add `Storage`, when you instantiate the pallet in the `construct_runtime!` macro, i.e.:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;Preimage: pallet_preimage::{Pallet, Event&lt;T&gt;, Call, Storage} = 19,&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29673" PostHistoryTypeId="5" PostId="7505" RevisionGUID="21f7697b-0a59-47fe-a201-b20c51bc2f2a" CreationDate="2023-03-08T22:51:39.447" UserId="341" Comment="added 389 characters in body" Text="I figured there seem to be something wrong with a multisig I have on Rococo.&#xD;&#xA;&#xD;&#xA;It's this one: 5FRz8z6U87LBXLUuBRRy4JtVAh2jhkDSbR5ntCGM2Ds631dJ&#xD;&#xA;&#xD;&#xA;Checking the storage on it with `multisig.multisigs(&quot;5FRz8z6U87LBXLUuBRRy4JtVAh2jhkDSbR5ntCGM2Ds631dJ&quot;)` returns the following double map:&#xD;&#xA;```[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      5G7yHTYnAJKQ6RLe6woPrcrNRdnPtzEuZNjNDvhLVD8eZAqL&#xD;&#xA;      0xe133e6f11af51d883e56216e9e1bbb1e2920c7c6120cbb55cd469b1f95b61601&#xD;&#xA;    ]&#xD;&#xA;    {&#xD;&#xA;      when: {&#xD;&#xA;        height: 3,833,859&#xD;&#xA;        index: 2&#xD;&#xA;      }&#xD;&#xA;      deposit: 67,173,327,600&#xD;&#xA;      depositor: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      approvals: [&#xD;&#xA;        5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, as you can tell, this storage is for `5G7yHTYnAJKQ6RLe6woPrcrNRdnPtzEuZNjNDvhLVD8eZAqL` which is another multisig.&#xD;&#xA;&#xD;&#xA;How is this possible?&#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA;I have another such call for `5Hr2iNQ3HvsyAS1Ni5oX2XuXAAPyNGZ68UkaQPRnFZrY5FUk` that is given a multisig call from `5FhVnBbhiswx58VjLgN9bB8tuu4NpYALLfWzcRTUkPNSyVf5`. Just see it for yourself, go to pjs/apps &gt; dev &gt; chain state and query the `multisig.multisigs` with this account. Although this multisig is actually 5 days old, you'll see a call in storage from 6 months ago." ContentLicense="CC BY-SA 4.0" />
  <row Id="29674" PostHistoryTypeId="2" PostId="7532" RevisionGUID="8bf95fd0-9fc2-49d5-8fea-ba9968363478" CreationDate="2023-03-08T23:36:01.853" UserId="73" Text="Yes the function can panic and then the node side should revert the storage changes (there is no guarantee for that from the runtime). However, if a transaction is panicking it means there is a DOS vector. An attacker could send a transaction that makes it into the pool and while applying it to a block it panics. The attacker doesn't need to pay for it and thus can send a lot of these transactions, preventing the inclusion of any other transaction. Even if it doesn't prevent the inclusion of other transactions, it will still waste resources of the block builder preventing them from including the maximum possible amount of transactions. " ContentLicense="CC BY-SA 4.0" />
  <row Id="29678" PostHistoryTypeId="2" PostId="7534" RevisionGUID="caa4722a-97b1-48d3-a819-db25746fe620" CreationDate="2023-03-09T01:47:23.950" UserId="3937" Text="Previously in Ink! 3, in a function which is accepting AccountId as a parameter, One can validate that the address passed is not AddressZero by using .is_zero() on the parameter variable name but I can't do on my current Ink! 4 project... Honestly would want to step down to Ink3!" ContentLicense="CC BY-SA 4.0" />
  <row Id="29680" PostHistoryTypeId="1" PostId="7534" RevisionGUID="caa4722a-97b1-48d3-a819-db25746fe620" CreationDate="2023-03-09T01:47:23.950" UserId="3937" Text="How to validate for Address Zero in Ink1 4.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="29681" PostHistoryTypeId="3" PostId="7534" RevisionGUID="caa4722a-97b1-48d3-a819-db25746fe620" CreationDate="2023-03-09T01:47:23.950" UserId="3937" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29691" PostHistoryTypeId="2" PostId="7537" RevisionGUID="ce202969-2ae3-412a-8f4d-df828f0c992d" CreationDate="2023-03-09T09:27:12.767" UserId="1789" Text="Use Substrate's built-in sp-tracing!&#xD;&#xA;https://www.youtube.com/watch?v=ZSipV1LLUzM&#xD;&#xA;&#xD;&#xA;add sp-tracing in the pallet cargo file under dev dependencies:&#xD;&#xA;```&#xD;&#xA;sp-tracing = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.37&quot; }&#xD;&#xA;```&#xD;&#xA;use it in your code&#xD;&#xA;```&#xD;&#xA;use frame_support::{log::{info, warn}, .. };&#xD;&#xA;  info!(&quot;info num: {:?}&quot;, num);&#xD;&#xA;  warn!(&quot;warn num: {:?}&quot;, num);&#xD;&#xA;```&#xD;&#xA;in your pallet/mock:&#xD;&#xA;```&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;    sp_tracing::try_init_simple();// Add this line&#xD;&#xA;    system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap().into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Run tests with &quot;RUST_LOG=info &quot;&#xD;&#xA;```&#xD;&#xA;$ RUST_LOG=info cargo test -p pallet-template it_&#xD;&#xA;```&#xD;&#xA;will run tests that starts with &quot;it_&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29693" PostHistoryTypeId="2" PostId="7538" RevisionGUID="5672bd3c-16f5-4dda-ac2e-108608241072" CreationDate="2023-03-09T09:39:50.787" UserId="2762" Text="An easy method you can use to get the AddressZero is [this][1]:&#xD;&#xA;&#xD;&#xA;    fn zero_address() -&gt; AccountId {&#xD;&#xA;        [0u8; 32].into()&#xD;&#xA;    }&#xD;&#xA;And compare it to another address, see an example [here][2]:&#xD;&#xA;&#xD;&#xA;    ensure!(to != zero_address(), Error::ZeroAddressTransfer);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/integration-tests/erc1155/lib.rs#L587&#xD;&#xA;  [2]: https://github.com/paritytech/ink/blob/master/integration-tests/erc1155/lib.rs#L435" ContentLicense="CC BY-SA 4.0" />
  <row Id="29695" PostHistoryTypeId="52" PostId="7534" RevisionGUID="b2b0d775-9d44-4bdd-85e5-25dec92eab01" CreationDate="2023-03-09T10:04:01.503" />
  <row Id="29696" PostHistoryTypeId="5" PostId="7505" RevisionGUID="e9af8229-3a1e-451f-ad3f-7f38cdb89e76" CreationDate="2023-03-09T11:22:43.787" UserId="341" Comment="added 114 characters in body" Text="I figured there seem to be something wrong with a multisig I have on Rococo.&#xD;&#xA;&#xD;&#xA;It's this one: 5FRz8z6U87LBXLUuBRRy4JtVAh2jhkDSbR5ntCGM2Ds631dJ&#xD;&#xA;&#xD;&#xA;Checking the storage on it with `multisig.multisigs(&quot;5FRz8z6U87LBXLUuBRRy4JtVAh2jhkDSbR5ntCGM2Ds631dJ&quot;)` returns the following double map:&#xD;&#xA;```[&#xD;&#xA;  [&#xD;&#xA;    [&#xD;&#xA;      5G7yHTYnAJKQ6RLe6woPrcrNRdnPtzEuZNjNDvhLVD8eZAqL&#xD;&#xA;      0xe133e6f11af51d883e56216e9e1bbb1e2920c7c6120cbb55cd469b1f95b61601&#xD;&#xA;    ]&#xD;&#xA;    {&#xD;&#xA;      when: {&#xD;&#xA;        height: 3,833,859&#xD;&#xA;        index: 2&#xD;&#xA;      }&#xD;&#xA;      deposit: 67,173,327,600&#xD;&#xA;      depositor: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      approvals: [&#xD;&#xA;        5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, as you can tell, this storage is for `5G7yHTYnAJKQ6RLe6woPrcrNRdnPtzEuZNjNDvhLVD8eZAqL` which is another multisig.&#xD;&#xA;&#xD;&#xA;How is this possible?&#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;&#xD;&#xA;I have another such call for `5Hr2iNQ3HvsyAS1Ni5oX2XuXAAPyNGZ68UkaQPRnFZrY5FUk` that is given a multisig call from `5FhVnBbhiswx58VjLgN9bB8tuu4NpYALLfWzcRTUkPNSyVf5`. Just see it for yourself, go to pjs/apps &gt; dev &gt; chain state and query the `multisig.multisigs` with this account. Although this multisig is actually 5 days old, you'll see a call in storage from 6 months ago.&#xD;&#xA;&#xD;&#xA;edit2: This seems linked to a bug reported in polkadot-js apps https://github.com/polkadot-js/apps/issues/9103 ." ContentLicense="CC BY-SA 4.0" />
  <row Id="29697" PostHistoryTypeId="2" PostId="7539" RevisionGUID="6f2f60b3-1c6d-45d8-9a9d-2e9c7240d384" CreationDate="2023-03-09T11:23:04.080" UserId="3939" Text="I am trying to query the historical data (tx, ownership, etc.) of Cosmize Ticket NFT on Astar EVM. I got the error message when querying between `block 1558933` to `block 1848933`.&#xD;&#xA;&#xD;&#xA;Below is how to reproduce the error:&#xD;&#xA;&#xD;&#xA; 1. request the `supportsInterface` function of the Cosmize Ticket pass contract (0x66B2E7e61681382cec6c609a4D6E06373DAAB42f) at the latest block, everything works fine.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA; 2. request the `supportsInterface` function of the Cosmize Ticket pass contract (0x66B2E7e61681382cec6c609a4D6E06373DAAB42f) at block 1558933, the RPC responds with the following error: &#xD;&#xA;`execution fatal: Module(ModuleError { index: 60, error: [7, 0, 0, 0], message: None })  (picture 2)`&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I am using https://evm.astar.network/ as the RPC endpoint since it is the only one supporting archive node. Please feel free to use the following request params to reproduce the error:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;        &quot;method&quot;: &quot;eth_call&quot;,&#xD;&#xA;        &quot;params&quot;: [&#xD;&#xA;            {&#xD;&#xA;                &quot;from&quot;: &quot;0x0000000000000000000000000000000000000000&quot;,&#xD;&#xA;                &quot;data&quot;: &quot;0x01ffc9a701ffc9a700000000000000000000000000000000000000000000000000000000&quot;,&#xD;&#xA;                &quot;to&quot;: &quot;0x66B2E7e61681382cec6c609a4D6E06373DAAB42f&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;1558933&quot;&#xD;&#xA;        ],&#xD;&#xA;        &quot;id&quot;: 0&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So far, based on my tests, I assume the rpc endpoint's block state storage has some internal error between `block 1558933` to `block 1848933`. Could anyone support on this? Thank you!&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0FPZ6.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/OQOtp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29699" PostHistoryTypeId="1" PostId="7539" RevisionGUID="6f2f60b3-1c6d-45d8-9a9d-2e9c7240d384" CreationDate="2023-03-09T11:23:04.080" UserId="3939" Text="Astar RPC endpoint error between block 1558933 to block 1848933" ContentLicense="CC BY-SA 4.0" />
  <row Id="29700" PostHistoryTypeId="3" PostId="7539" RevisionGUID="6f2f60b3-1c6d-45d8-9a9d-2e9c7240d384" CreationDate="2023-03-09T11:23:04.080" UserId="3939" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29701" PostHistoryTypeId="6" PostId="7539" RevisionGUID="a6aed956-d8f1-4c04-ade0-90d9d4cb56c4" CreationDate="2023-03-09T11:27:22.943" UserId="3939" Comment="edited tags" Text="|parachain|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29702" PostHistoryTypeId="4" PostId="7539" RevisionGUID="bc0971cf-d369-4c6f-b351-48880f94ef15" CreationDate="2023-03-09T11:38:41.857" UserId="3939" Comment="edited title" Text="Astar RPC endpoint returns error between block 1558933 to block 1848933" ContentLicense="CC BY-SA 4.0" />
  <row Id="29703" PostHistoryTypeId="5" PostId="7539" RevisionGUID="07c2ba8b-fc28-48b1-9eae-16d090b7ca55" CreationDate="2023-03-09T11:42:14.187" UserId="3939" Comment="added 2 characters in body" Text="I am trying to query the historical data (tx, ownership, etc.) of Cosmize Ticket NFT on Astar EVM. I got the error message when querying between `block 1558933` to `block 1848933`.&#xD;&#xA;&#xD;&#xA;Below is how to reproduce the error:&#xD;&#xA;&#xD;&#xA; 1. request the `supportsInterface` function of the Cosmize Ticket pass contract (0x66B2E7e61681382cec6c609a4D6E06373DAAB42f) at the latest block, everything works fine.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA; 2. request the `supportsInterface` function of the Cosmize Ticket pass contract (0x66B2E7e61681382cec6c609a4D6E06373DAAB42f) at block 1558933, the RPC responds with the following error: &#xD;&#xA;`execution fatal: Module(ModuleError { index: 60, error: [7, 0, 0, 0], message: None })  (picture 2)`&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I am using https://evm.astar.network/ as the RPC endpoint since it is the only one supporting archive node. Please feel free to use the following request params to reproduce the error:&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;        &quot;method&quot;: &quot;eth_call&quot;,&#xD;&#xA;        &quot;params&quot;: [&#xD;&#xA;            {&#xD;&#xA;                &quot;from&quot;: &quot;0x0000000000000000000000000000000000000000&quot;,&#xD;&#xA;                &quot;data&quot;: &quot;0x01ffc9a701ffc9a700000000000000000000000000000000000000000000000000000000&quot;,&#xD;&#xA;                &quot;to&quot;: &quot;0x66B2E7e61681382cec6c609a4D6E06373DAAB42f&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;1558933&quot;&#xD;&#xA;        ],&#xD;&#xA;        &quot;id&quot;: 0&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So far, based on my tests, I assume the rpc endpoint's block state storage has some internal error between `block 1558933` to `block 1848933`. Could anyone support on this? Thank you!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0FPZ6.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/RiBBH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29704" PostHistoryTypeId="2" PostId="7540" RevisionGUID="1d6f4f2e-b907-4203-9f81-93f495ead9a5" CreationDate="2023-03-09T12:24:12.170" UserId="83" Text="In the Substrate CLI why can we limit the memory that the RocksDB database cache can use if we choose to use it [here](https://github.com/paritytech/substrate/blob/master/client/cli/src/config.rs#L220), but we're not given the option to limit the memory that ParityDB uses if we choose that database instead [here](https://github.com/paritytech/substrate/blob/master/client/cli/src/config.rs#L221)?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29706" PostHistoryTypeId="1" PostId="7540" RevisionGUID="1d6f4f2e-b907-4203-9f81-93f495ead9a5" CreationDate="2023-03-09T12:24:12.170" UserId="83" Text="Why can we limit the memory the RocksDB database cache can use but not for ParityDB?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29707" PostHistoryTypeId="3" PostId="7540" RevisionGUID="1d6f4f2e-b907-4203-9f81-93f495ead9a5" CreationDate="2023-03-09T12:24:12.170" UserId="83" Text="|cli|rocks-db|parity-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29708" PostHistoryTypeId="2" PostId="7541" RevisionGUID="8504edb7-947e-4388-987e-d6c6ec8133a9" CreationDate="2023-03-09T13:30:20.147" UserId="325" Text="From my research of how to generate and sign transactions offline I found docs:&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/build-transaction-construction citing txwrapper-core:&#xD;&#xA;https://github.com/paritytech/txwrapper-core &#xD;&#xA;&#xD;&#xA;But I want to create offline transactions for multiple different parachains that have chain specific requirements like crust that needs things like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { typesBundleForPolkadot } from '@crustio/type-definitions';&#xD;&#xA;api.tx.market.placeStorageOrder()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I do cannot find any documentation on how to include/use `typeBundles` with txwrapper to generate offline transactions.&#xD;&#xA;&#xD;&#xA;Any examples/best practices for this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29710" PostHistoryTypeId="1" PostId="7541" RevisionGUID="8504edb7-947e-4388-987e-d6c6ec8133a9" CreationDate="2023-03-09T13:30:20.147" UserId="325" Text="Creating offline transaction for parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="29711" PostHistoryTypeId="3" PostId="7541" RevisionGUID="8504edb7-947e-4388-987e-d6c6ec8133a9" CreationDate="2023-03-09T13:30:20.147" UserId="325" Text="|parachain|transactions|custom-types|txwrapper|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29720" PostHistoryTypeId="2" PostId="7543" RevisionGUID="ab25085e-1e6e-4606-863c-e686173dd53b" CreationDate="2023-03-09T16:05:15.610" UserId="1891" Text="I am using the following the following function in my pallet to convert a string into a public key&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		fn split_publickey_from_input(input: &amp;Vec&lt;u8&gt;) -&gt; T::Public {&#xD;&#xA;			let input_string = sp_std::str::from_utf8(input).unwrap();&#xD;&#xA;			let input_vec: Vec&lt;&amp;str&gt; = input_string.split(&quot;:&quot;).collect();&#xD;&#xA;			let pub_key = sp_core::sr25519::Public::from_str(input_vec[2]).unwrap();&#xD;&#xA;			T::Public::from(pub_key)&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;Unfortunately this works well in the pallet but when i try to build the node with ```cargo build --release``` i face this error below&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let pub_key = sp_core::sr25519::Public::from_str(did_vec[2]).unwrap();&#xD;&#xA;      |                                                     ^^^^^^^^ function or associated item not found in `Public`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;How can i resolve this error? An explanation of what's going wrong is highly appreciated&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29722" PostHistoryTypeId="1" PostId="7543" RevisionGUID="ab25085e-1e6e-4606-863c-e686173dd53b" CreationDate="2023-03-09T16:05:15.610" UserId="1891" Text="How can i resolve an error with converting a string into a public key" ContentLicense="CC BY-SA 4.0" />
  <row Id="29723" PostHistoryTypeId="3" PostId="7543" RevisionGUID="ab25085e-1e6e-4606-863c-e686173dd53b" CreationDate="2023-03-09T16:05:15.610" UserId="1891" Text="|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29724" PostHistoryTypeId="5" PostId="7543" RevisionGUID="c7bd215b-4783-4907-83d6-41019124b01a" CreationDate="2023-03-09T16:11:09.507" UserId="1891" Comment="deleted 20 characters in body" Text="I am using the following the following function in my pallet to convert a string into a public key&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		fn split_publickey_from_input(input: &amp;Vec&lt;u8&gt;) -&gt; T::Public {&#xD;&#xA;			let input_string = sp_std::str::from_utf8(input).unwrap();&#xD;&#xA;			let input_vec: Vec&lt;&amp;str&gt; = input_string.split(&quot;:&quot;).collect();&#xD;&#xA;			let pub_key = sp_core::sr25519::Public::from_str(input_vec[2]).unwrap();&#xD;&#xA;			T::Public::from(pub_key)&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;Unfortunately this works well in the pallet but when i try to build the node with ```cargo build --release``` i face this error below&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let pub_key = sp_core::sr25519::Public::from_str(did_vec[2]).unwrap();&#xD;&#xA;      |                                 ^^^^^^^^ function or associated item not found in `Public`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;How can i resolve this error? An explanation of what's going wrong is highly appreciated&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29725" PostHistoryTypeId="5" PostId="7543" RevisionGUID="b04384d1-c9b1-463d-b17a-523f3ed39a16" CreationDate="2023-03-09T16:29:00.603" UserId="1891" Comment="deleted 14 characters in body" Text="I am using the following function in my pallet to convert a string into a public key&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		fn split_publickey_from_input(input: &amp;Vec&lt;u8&gt;) -&gt; T::Public {&#xD;&#xA;			let input_string = sp_std::str::from_utf8(input).unwrap();&#xD;&#xA;			let input_vec: Vec&lt;&amp;str&gt; = input_string.split(&quot;:&quot;).collect();&#xD;&#xA;			let pub_key = sp_core::sr25519::Public::from_str(input_vec[2]).unwrap();&#xD;&#xA;			T::Public::from(pub_key)&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;Unfortunately this works well in the pallet but when i try to build the node with ```cargo build --release``` i face this error below&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let pub_key = sp_core::sr25519::Public::from_str(did_vec[2]).unwrap();&#xD;&#xA;      |                                 ^^^^^^^^ function or associated item not found in `Public`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;How can i resolve this error? An explanation of what's going wrong is highly appreciated&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29730" PostHistoryTypeId="2" PostId="7545" RevisionGUID="9206646b-5d90-4cbf-8a97-d08563acfe50" CreationDate="2023-03-09T16:39:34.103" UserId="3941" Text="I created a new frontier node template with frontier. &#xD;&#xA;During each interaction I pay a gas fee, my question is where this gas fee is deposited and can it be collected by the validator ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="29732" PostHistoryTypeId="1" PostId="7545" RevisionGUID="9206646b-5d90-4cbf-8a97-d08563acfe50" CreationDate="2023-03-09T16:39:34.103" UserId="3941" Text="frontier node template fees" ContentLicense="CC BY-SA 4.0" />
  <row Id="29733" PostHistoryTypeId="3" PostId="7545" RevisionGUID="9206646b-5d90-4cbf-8a97-d08563acfe50" CreationDate="2023-03-09T16:39:34.103" UserId="3941" Text="|frontier|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29735" PostHistoryTypeId="2" PostId="7546" RevisionGUID="d7dde1f4-7af1-4866-88d6-a3e07ef70eba" CreationDate="2023-03-09T17:26:20.033" UserId="2762" Text="The [Transaction Payment Pallet][1] is the pallet that provides the basic logic needed to pay the fees. &#xD;&#xA;&#xD;&#xA;In the Config of the pallet you can configure how the fees are paid via `Config::OnChargeTransaction`. &#xD;&#xA;Take a look about it configuration of this pallet in the frontier node template [here][2]:&#xD;&#xA;&#xD;&#xA;    type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;&#xD;&#xA;You have to implement yourself how you want to deal with the fees. &#xD;&#xA;A good idea is take a look of some implementations, a couple interesting I'd suggest you to look at are:&#xD;&#xA; &#xD;&#xA;- Polkadot. It has a configuration for fees that splits 80% to treasury and 20% to author. Check [here][3] how is the configuration of the Transaction Payment Pallet:&#xD;&#xA;```&#xD;&#xA;    type OnChargeTransaction = CurrencyAdapter&lt;Balances, DealWithFees&lt;Runtime&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And the implementation of [DealWithFees][4] that defines how to deal with the fees.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;- [Rococo][5] (Polkadot testnet), sends the fees to the author of the block. Check [here][6] how is its configuration of the Transaction Payment Pallet.&#xD;&#xA;```&#xD;&#xA;    type OnChargeTransaction = CurrencyAdapter&lt;Balances, ToAuthor&lt;Runtime&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And the implementation of [ToAuthor][7] that sends the fees to the author of the block.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/transaction-payment&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/frontier-node-template/blob/main/runtime/src/lib.rs#L276&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/lib.rs#L310&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/impls.rs#L39&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot/tree/master/runtime/rococo&#xD;&#xA;  [6]: https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs#L302&#xD;&#xA;  [7]: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/impls.rs#L25" ContentLicense="CC BY-SA 4.0" />
  <row Id="29737" PostHistoryTypeId="2" PostId="7547" RevisionGUID="67d665b8-6fa3-455b-b42f-b058e447430f" CreationDate="2023-03-09T17:44:40.220" UserId="139" Text="When using frontier, you are mostly dealing with configurations of the various pallets, in this case, pallet-evm and maybe pallet-base-fee. &#xD;&#xA;&#xD;&#xA;In addition to Alex's answer, the following may help provide you clarity: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct EVMTransactionChargeHandler&lt;OU&gt;(PhantomData&lt;OU&gt;);&#xD;&#xA;impl&lt;OU&gt; pallet_evm::OnChargeEVMTransaction for EVMTransactionChargeHandler&lt;OU&gt; {&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This would be the **currency adapter** mentioned previously, as stated in the document for the trait: https://paritytech.github.io/frontier/rustdocs/pallet_evm/trait.OnChargeEVMTransaction.html&#xD;&#xA;&#xD;&#xA;In the trait implementation you can put custom logic, for instance, what to do `on_unbalanced`. You can use https://paritytech.github.io/frontier/rustdocs/pallet_evm/struct.EVMCurrencyAdapter.html as a reference. &#xD;&#xA;&#xD;&#xA;Note the generic arg `&lt;OU&gt;` which stands for the `Imbalance` handler. This is something that knows what to do with the `NegativeImbalance` that's generated on fee withdrawal. By providing an implementation for `OnUnbalanced&lt;NegativeImbalance&lt;_&gt;&gt;` you can determine what will ultimately be done with the fees collected. (i.e. whether it will go to a validator, be burned, or something else entirely)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29739" PostHistoryTypeId="50" PostId="7127" RevisionGUID="1e8a8635-24a1-4508-bfac-ae425e332539" CreationDate="2023-03-09T18:03:10.687" UserId="-1" />
  <row Id="29740" PostHistoryTypeId="2" PostId="7548" RevisionGUID="586430fe-33f5-40b8-b479-0e1fff16e566" CreationDate="2023-03-09T20:17:32.030" UserId="3142" Text="We have a some custom pallet unit tests that use multiple mock runtimes that are configured slightly differently.  The problem is that when we have to make changes to the runtime, we have to apply those changes to all of them. Furthermore, we'd like to have a set of common functions that all of the unit tests can use.  If Rust had inheritance, the solution would be an abstract base runtime and subclasses for each runtime but Rust doesn't have it.  The solution likely involves creative use of modules and macros but what's the recommended approach?&#xD;&#xA;&#xD;&#xA;I'd like to avoid making changes to the `Cargo.toml`.  I'd like to have some sort of macro level attribute that I could set in each runtime:  `&quot;runtime1&quot;` and `&quot;runtime2&quot;` and then conditionally compile which value is used based on that attribute.&#xD;&#xA;&#xD;&#xA;In our case, we have two runtimes that differ only by the constant values for two of the associated types.&#xD;&#xA;&#xD;&#xA;*e.g.*&#xD;&#xA;&#xD;&#xA;    type MaxMessagesStored = ConstU32&lt;25&gt;;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;    type MaxMessagesStored = ConstU32&lt;1000&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29742" PostHistoryTypeId="1" PostId="7548" RevisionGUID="586430fe-33f5-40b8-b479-0e1fff16e566" CreationDate="2023-03-09T20:17:32.030" UserId="3142" Text="Multiple test mock runtimes with slightly different configs based off common base?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29743" PostHistoryTypeId="3" PostId="7548" RevisionGUID="586430fe-33f5-40b8-b479-0e1fff16e566" CreationDate="2023-03-09T20:17:32.030" UserId="3142" Text="|rust|mock|types|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29744" PostHistoryTypeId="5" PostId="7548" RevisionGUID="89e0413c-6472-43fe-ba25-5f5152559edb" CreationDate="2023-03-09T20:23:27.560" UserId="3142" Comment="added 142 characters in body" Text="We have a some custom pallet unit tests that use multiple mock runtimes that are configured slightly differently.  The problem is that when we have to make changes to the runtime, we have to apply those changes to all of them. Furthermore, we'd like to have a set of common functions that all of the unit tests can use.  If Rust had inheritance, the solution would be an abstract base runtime and subclasses for each runtime but Rust doesn't have it.  The solution likely involves creative use of modules and macros but what's the recommended approach?&#xD;&#xA;&#xD;&#xA;I'd like to avoid making changes to the `Cargo.toml`.  I'd like to have some sort of macro level attribute that I could set in each runtime:  `&quot;runtime1&quot;` and `&quot;runtime2&quot;` and then conditionally compile which value is used based on that attribute.&#xD;&#xA;&#xD;&#xA;In our case, we have two runtimes that differ only by the constant values for two of the associated types.&#xD;&#xA;&#xD;&#xA;*e.g.*&#xD;&#xA;&#xD;&#xA;    type MaxMessagesStored = ConstU32&lt;25&gt;;  // runtime1&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;    type MaxMessagesStored = ConstU32&lt;1000&gt;;  // runtime2&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Alternatively, is there a way to change the value at runtime?  I assume not because it's a constant but have to ask.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29745" PostHistoryTypeId="5" PostId="7548" RevisionGUID="6e398c24-2f06-4057-8289-e9e8bfbe6382" CreationDate="2023-03-09T20:51:24.440" UserId="3142" Comment="added 288 characters in body" Text="We have a some custom pallet unit tests that use multiple mock runtimes that are configured slightly differently.  The problem is that when we have to make changes to the runtime, we have to apply those changes to all of them. Furthermore, we'd like to have a set of common functions that all of the unit tests can use.  If Rust had inheritance, the solution would be an abstract base runtime and subclasses for each runtime but Rust doesn't have it.  The solution likely involves creative use of modules and macros but what's the recommended approach?&#xD;&#xA;&#xD;&#xA;I'd like to avoid making changes to the `Cargo.toml`.  I'd like to have some sort of macro level attribute that I could set in each runtime:  `&quot;runtime1&quot;` and `&quot;runtime2&quot;` and then conditionally compile which value is used based on that attribute.&#xD;&#xA;&#xD;&#xA;In our case, we have two runtimes that differ only by the constant values for two of the associated types.&#xD;&#xA;&#xD;&#xA;*e.g.*&#xD;&#xA;&#xD;&#xA;    type MaxMessagesStored = ConstU32&lt;25&gt;;  // runtime1&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;    type MaxMessagesStored = ConstU32&lt;1000&gt;;  // runtime2&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So, I'd like something like this.  This is **invalid** code:&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(RUNTIME, define = &quot;runtime1&quot;)]&#xD;&#xA;    &#xD;&#xA;    	#[cfg(RUNTIME = &quot;runtime1&quot;)]&#xD;&#xA;        type MaxMessagesStored = ConstU32&lt;25&gt;;&#xD;&#xA;    	#[cfg(RUNTIME = &quot;runtime2&quot;)]&#xD;&#xA;        type MaxMessagesStored = ConstU32&lt;1000&gt;;&#xD;&#xA;&#xD;&#xA;In C, this would be:&#xD;&#xA;&#xD;&#xA;        #define RUNTIME &quot;runtime1&quot;&#xD;&#xA;        &#xD;&#xA;        #if defined(RUNTIME) &amp;&amp; (RUNTIME == &quot;runtime1&quot;)&#xD;&#xA;        // code &#xD;&#xA;        #else&#xD;&#xA;        // code&#xD;&#xA;        #endif&#xD;&#xA;&#xD;&#xA;Alternatively, is there a way to change the value at runtime?  I assume not because it's a constant but have to ask.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29746" PostHistoryTypeId="5" PostId="7548" RevisionGUID="f7a0506a-37ba-4427-b770-d38b98e8b397" CreationDate="2023-03-09T22:23:18.093" UserId="3142" Comment="deleted 2 characters in body" Text="We have some custom pallet unit tests that use multiple mock runtimes that are configured slightly differently.  The problem is that when we have to make changes to the runtime, we have to apply those changes to all of them. Furthermore, we'd like to have a set of common functions that all of the unit tests can use.  If Rust had inheritance, the solution would be an abstract base runtime and subclasses for each runtime but Rust doesn't have it.  The solution likely involves creative use of modules and macros but what's the recommended approach?&#xD;&#xA;&#xD;&#xA;I'd like to avoid making changes to the `Cargo.toml`.  I'd like to have some sort of macro level attribute that I could set in each runtime:  `&quot;runtime1&quot;` and `&quot;runtime2&quot;` and then conditionally compile which value is used based on that attribute.&#xD;&#xA;&#xD;&#xA;In our case, we have two runtimes that differ only by the constant values for two of the associated types.&#xD;&#xA;&#xD;&#xA;*e.g.*&#xD;&#xA;&#xD;&#xA;    type MaxMessagesStored = ConstU32&lt;25&gt;;  // runtime1&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;    type MaxMessagesStored = ConstU32&lt;1000&gt;;  // runtime2&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So, I'd like something like this.  This code is for example and does **NOT** work:&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(RUNTIME, define = &quot;runtime1&quot;)]&#xD;&#xA;    &#xD;&#xA;    	#[cfg(RUNTIME = &quot;runtime1&quot;)]&#xD;&#xA;        type MaxMessagesStored = ConstU32&lt;25&gt;;&#xD;&#xA;    	#[cfg(RUNTIME = &quot;runtime2&quot;)]&#xD;&#xA;        type MaxMessagesStored = ConstU32&lt;1000&gt;;&#xD;&#xA;&#xD;&#xA;In C, this would be:&#xD;&#xA;&#xD;&#xA;        #define RUNTIME &quot;runtime1&quot;&#xD;&#xA;        &#xD;&#xA;        #if defined(RUNTIME) &amp;&amp; (RUNTIME == &quot;runtime1&quot;)&#xD;&#xA;        // code &#xD;&#xA;        #else&#xD;&#xA;        // code&#xD;&#xA;        #endif&#xD;&#xA;&#xD;&#xA;Alternatively, is there a way to change the value at runtime?  I assume not because it's a constant but have to ask.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29747" PostHistoryTypeId="2" PostId="7549" RevisionGUID="7d67d533-e3d3-4367-b0b5-2b919be7da9e" CreationDate="2023-03-09T23:19:10.233" UserId="83" Text="I recently got the same error on an Ubuntu 22.04.2 LTS machine.&#xD;&#xA;I had accidentally used a less performant &quot;Linode 4 GB&quot; machine, which has only 2 CPUs, 4 Gb RAM. When I entered `lscpu` it output `AMD EPYC 7601 32-Core Processor`, so the CPU speed was 2.2 GHz.&#xD;&#xA;I had at least 36 Gb SSD hard disk space available.&#xD;&#xA;I had cloned the [latest commit](https://github.com/paritytech/substrate/commit/48e7cb147cb9a27125fd2e82edbcf4d0ed5927c4) of Substrate's 'master' branch dated 9th March 2023.&#xD;&#xA;I had followed the official documentation instructions to install Substrate [here](https://docs.substrate.io/install/) and all relevant dependencies on Ubuntu.&#xD;&#xA;I tried building with `cargo build`, but during the installaion I got the error during the build:&#xD;&#xA;```bash&#xD;&#xA;   ...&#xD;&#xA;   Compiling node-cli v3.0.0-dev (/root/substrate/bin/node/cli)&#xD;&#xA;error: linking with `cc` failed: exit status: 1&#xD;&#xA;  |&#xD;&#xA;  = note: &quot;cc&quot; &quot;-m64&quot;&#xD;&#xA;  ...&#xD;&#xA;  = note: collect2: fatal error: ld terminated with signal 9 [Killed]&#xD;&#xA;          compilation terminated.&#xD;&#xA;&#xD;&#xA;error: could not compile `node-cli` due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I checked how much hard disk space i had with `df -H` and it showed I still had 20 Gb free&#xD;&#xA;I checked how much swap space i had with `free -h`, which showed I only had 1.4 Gb RAM free and only 150Mb of swap space free: &#xD;&#xA;```bash&#xD;&#xA;free -h&#xD;&#xA;               total        used        free      shared  buff/cache   available&#xD;&#xA;Mem:           3.8Gi       2.2Gi       1.4Gi        10Mi       271Mi       1.4Gi&#xD;&#xA;Swap:          511Mi       359Mi       152Mi&#xD;&#xA;```&#xD;&#xA;So I increased my swap space to 10 Gb (10240) (since I had plenty of hard disk space free) by running:&#xD;&#xA;```&#xD;&#xA;sudo dd if=/dev/zero of=/swap_file bs=10240 count=1M&#xD;&#xA;sudo chmod 600 /swap_file&#xD;&#xA;sudo mkswap /swap_file&#xD;&#xA;sudo swapon /swap_file&#xD;&#xA;```&#xD;&#xA;Then I checked how much memory I had again with `free -h`, which showed that whilst I only had 110 Mb RAM Memory free, I now had 10 Gb Swap space free:&#xD;&#xA;```&#xD;&#xA;               total        used        free      shared  buff/cache   available&#xD;&#xA;Mem:           3.8Gi       2.2Gi       110Mi        10Mi       1.5Gi       1.4Gi&#xD;&#xA;Swap:           10Gi       362Mi        10Gi&#xD;&#xA;```&#xD;&#xA;I then tried continuing with the installation by running `cargo build` again, and this time it fully build successfully, likely because it had almost finished building previously, and because it was now using the extra Swap space I had added for when it ran out of RAM (Mem).&#xD;&#xA;&#xD;&#xA;So the reason for the error was primarily because the machine I was using didn't have enough RAM (memory), since I only had 4 Gb and most of it was already being used up. I got around it by increasing the Swap space.&#xD;&#xA;&#xD;&#xA;It says here in the [official macOS instructions](https://docs.substrate.io/install/macos/) that on macOS you need a machine with at least 2 Ghz CPU (processor), and at least 8 Gb RAM (memory), and at least 10 Gb of hard disk space available (I think you need might need more hard disk space than that). Those minimum specifications should actually be shown on https://docs.substrate.io/install/, since it applies to all operating systems, and it doesn't mention the minimum system that you need on the [official Linux instructions](https://docs.substrate.io/install/linux/).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29750" PostHistoryTypeId="2" PostId="7550" RevisionGUID="03515683-292f-4108-808d-6925418d516c" CreationDate="2023-03-09T23:51:47.157" UserId="251" Text="It's std only. You can't use this in your pallet.&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/src/sp_core/sr25519.rs.html#138-140&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;impl std::str::FromStr for Public {&#xD;&#xA;	type Err = crate::crypto::PublicError;&#xD;&#xA;&#xD;&#xA;	fn from_str(s: &amp;str) -&gt; Result&lt;Self, Self::Err&gt; {&#xD;&#xA;		Self::from_ss58check(s)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And check this: https://substrate.stackexchange.com/questions/7139/is-there-any-way-to-convert-an-str-into-an-accountid-inside-a-substrate-pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="29752" PostHistoryTypeId="5" PostId="7549" RevisionGUID="20c08a5d-0ef4-4d08-987c-459dd0cf7747" CreationDate="2023-03-10T00:39:01.450" UserId="83" Comment="mention why my memory was already low" Text="It is likely because your machine didn't have the minimum required RAM or Swap space free to run Substrate.&#xD;&#xA;&#xD;&#xA;On macOS you can show CPU and memory usage in the terminal by running `top -l 1 | grep -E &quot;^CPU|^Phys&quot;`:&#xD;&#xA;```bash&#xD;&#xA;&gt; top -l 1 | grep -E &quot;^CPU|^Phys&quot;&#xD;&#xA;&#xD;&#xA;CPU usage: 15.61% user, 26.72% sys, 57.66% idle &#xD;&#xA;PhysMem: 7935M used (2256M wired), 255M unused.&#xD;&#xA;```&#xD;&#xA;Since you they say you need at least 4 Gb RAM to run Substrate, you would want the output to say you have at least `4000M unused` since that corresponds with ~4 Gb.&#xD;&#xA;&#xD;&#xA;On macOS you can show Swap space usage in the terminal by running `sysctl vm.swapusage`:&#xD;&#xA;```bash&#xD;&#xA;&gt; sysctl vm.swapusage&#xD;&#xA;&#xD;&#xA;vm.swapusage: total = 5120.00M  used = 4269.50M  free = 850.50M  (encrypted)&#xD;&#xA;```&#xD;&#xA;What does those commands output for you?&#xD;&#xA;&#xD;&#xA;I recently got the same error on an Ubuntu 22.04.2 LTS machine.&#xD;&#xA;I had accidentally used a less performant &quot;Linode 4 GB&quot; machine, which has only 2 CPUs, 4 Gb RAM. When I entered `lscpu` it output `AMD EPYC 7601 32-Core Processor`, so the CPU speed was 2.2 GHz.&#xD;&#xA;I had at least 36 Gb SSD hard disk space available.&#xD;&#xA;I had cloned the [latest commit](https://github.com/paritytech/substrate/commit/48e7cb147cb9a27125fd2e82edbcf4d0ed5927c4) of Substrate's 'master' branch dated 9th March 2023.&#xD;&#xA;I had followed the official documentation instructions to install Substrate [here](https://docs.substrate.io/install/) and all relevant dependencies on Ubuntu.&#xD;&#xA;I tried building with `cargo build`, but during the installaion I got the error during the build:&#xD;&#xA;```bash&#xD;&#xA;   ...&#xD;&#xA;   Compiling node-cli v3.0.0-dev (/root/substrate/bin/node/cli)&#xD;&#xA;error: linking with `cc` failed: exit status: 1&#xD;&#xA;  |&#xD;&#xA;  = note: &quot;cc&quot; &quot;-m64&quot;&#xD;&#xA;  ...&#xD;&#xA;  = note: collect2: fatal error: ld terminated with signal 9 [Killed]&#xD;&#xA;          compilation terminated.&#xD;&#xA;&#xD;&#xA;error: could not compile `node-cli` due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I checked how much hard disk space i had with `df -H` and it showed I still had 20 Gb free&#xD;&#xA;I checked how much swap space i had with `free -h`, which showed I only had 1.4 Gb RAM free and only 150Mb of swap space free: &#xD;&#xA;```bash&#xD;&#xA;free -h&#xD;&#xA;               total        used        free      shared  buff/cache   available&#xD;&#xA;Mem:           3.8Gi       2.2Gi       1.4Gi        10Mi       271Mi       1.4Gi&#xD;&#xA;Swap:          511Mi       359Mi       152Mi&#xD;&#xA;```&#xD;&#xA;I think the reason so much memory was already being used was because I was running also running a full node to support a Substrate-based chain on that machine. &#xD;&#xA;So I increased my swap space to 10 Gb (10240) (since I had plenty of hard disk space free) by running:&#xD;&#xA;```&#xD;&#xA;sudo dd if=/dev/zero of=/swap_file bs=10240 count=1M&#xD;&#xA;sudo chmod 600 /swap_file&#xD;&#xA;sudo mkswap /swap_file&#xD;&#xA;sudo swapon /swap_file&#xD;&#xA;```&#xD;&#xA;Then I checked how much memory I had again with `free -h`, which showed that whilst I only had 110 Mb RAM Memory free, I now had 10 Gb Swap space free:&#xD;&#xA;```&#xD;&#xA;               total        used        free      shared  buff/cache   available&#xD;&#xA;Mem:           3.8Gi       2.2Gi       110Mi        10Mi       1.5Gi       1.4Gi&#xD;&#xA;Swap:           10Gi       362Mi        10Gi&#xD;&#xA;```&#xD;&#xA;I then tried continuing with the installation by running `cargo build` again, and this time it fully build successfully, likely because it had almost finished building previously, and because it was now using the extra Swap space I had added for when it ran out of RAM (Mem).&#xD;&#xA;&#xD;&#xA;So the reason for the error was primarily because the machine I was using didn't have enough RAM (memory), since I only had 4 Gb and most of it was already being used up. I got around it by increasing the Swap space.&#xD;&#xA;&#xD;&#xA;It says here in the [official macOS instructions](https://docs.substrate.io/install/macos/) that on macOS you need a machine with at least 2 Ghz CPU (processor), and at least 8 Gb RAM (memory), and at least 10 Gb of hard disk space available (I think you need might need more hard disk space than that). Those minimum specifications should actually be shown on https://docs.substrate.io/install/, since it applies to all operating systems, and it doesn't mention the minimum system that you need on the [official Linux instructions](https://docs.substrate.io/install/linux/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="29753" PostHistoryTypeId="52" PostId="7545" RevisionGUID="0160d3a7-93e6-4dec-8e3a-4767d50018af" CreationDate="2023-03-10T00:39:47.103" />
  <row Id="29754" PostHistoryTypeId="50" PostId="4961" RevisionGUID="ceb59d96-2fee-405a-8dc4-1bca392f6b60" CreationDate="2023-03-10T02:07:30.897" UserId="-1" />
  <row Id="29756" PostHistoryTypeId="2" PostId="7551" RevisionGUID="34edb9a9-5429-48aa-a419-a561769fe8a1" CreationDate="2023-03-10T04:33:34.930" UserId="354" Text="I got the issue, there were some storage migrations in `0.9.30` and `0.9.34`, so what needs to be done so that chain does not brick is: &#xD;&#xA;&#xD;&#xA; - to chill the validators and then revalidate&#xD;&#xA; - change the session keys of existing validators after runtime upgrade&#xD;&#xA; - add new validators after runtime upgrade&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29758" PostHistoryTypeId="2" PostId="7552" RevisionGUID="2a8c427f-46f9-467d-91c2-75d00fe5a783" CreationDate="2023-03-10T05:11:27.053" UserId="2372" Text="I was working with the parity-bridges-common from the parity but i'm facing issues during the transfer of native tokens and i'm not able to send a custom message to the relay chain from solo-chain. &#xD;&#xA;&#xD;&#xA;Can anyone please guide me through this ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29760" PostHistoryTypeId="1" PostId="7552" RevisionGUID="2a8c427f-46f9-467d-91c2-75d00fe5a783" CreationDate="2023-03-10T05:11:27.053" UserId="2372" Text="Why the functionality of swap-token and dispatch is disabled in parity-bridges?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29761" PostHistoryTypeId="3" PostId="7552" RevisionGUID="2a8c427f-46f9-467d-91c2-75d00fe5a783" CreationDate="2023-03-10T05:11:27.053" UserId="2372" Text="|xcm|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29762" PostHistoryTypeId="2" PostId="7553" RevisionGUID="0ccacb07-d73e-4fea-a7e6-3f1c4c2399d1" CreationDate="2023-03-10T06:51:57.580" UserId="2586" Text="I am reading Cumulus PDK and Parachain documentations, and looking forward to converting our project to a parachain and join the Polkadot ecosystem.&#xD;&#xA;&#xD;&#xA;However, I am confused regarding the parachain consensus mentioned in the documents. In FAQ section of parachains it is specified that &quot;Parachains cannot use other consensus algorithms that provide their own finality&quot;, I am assuming it's about GRANDPA and not Aura or BABE. Refer to [Parachains FAQ][1]&#xD;&#xA;&#xD;&#xA;[![Parachain consensus][2]][2]&#xD;&#xA;&#xD;&#xA;Since Aura/ BABE are only block authoring side of the [consensus][3], according to the FAQ mention above it should not impact the development of parachain even if I have a different block authoring logic.&#xD;&#xA;&#xD;&#xA;Now, The document from [Cumulus PDK][4], which specifies that the &quot;Parachain will be able to use Aura, BABE, etc. **(Not supported at the moment)**&quot;. The focus is on the text in bold &quot;Not supported at the moment&quot;. So according to Cumulus document I wont be able to use other block authoring consensus for the parachain node.&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;So if I want to join polkadot parachain ecosystem, can I use any consensus for authoring blocks as long as the finality is using the GRANDPA or is it not supported yet as mentioned in the Cumulus document.&#xD;&#xA;&#xD;&#xA;Thank you,&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-parachains-faq&#xD;&#xA;  [2]: https://i.stack.imgur.com/kRAlU.png&#xD;&#xA;  [3]: https://docs.substrate.io/fundamentals/consensus/&#xD;&#xA;  [4]: https://github.com/paritytech/cumulus/blob/master/docs/overview.md&#xD;&#xA;  [5]: https://i.stack.imgur.com/DvxLx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29764" PostHistoryTypeId="1" PostId="7553" RevisionGUID="0ccacb07-d73e-4fea-a7e6-3f1c4c2399d1" CreationDate="2023-03-10T06:51:57.580" UserId="2586" Text="Is there any constrain forced on Parachains for block authoring logic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29765" PostHistoryTypeId="3" PostId="7553" RevisionGUID="0ccacb07-d73e-4fea-a7e6-3f1c4c2399d1" CreationDate="2023-03-10T06:51:57.580" UserId="2586" Text="|polkadot|parachain|consensus|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29766" PostHistoryTypeId="2" PostId="7554" RevisionGUID="fb17e34b-0804-4321-9f00-5ef26e87b1bb" CreationDate="2023-03-10T08:21:10.760" UserId="3317" Text="[Polkadot Consensus][1] is known as **hybrid consensus**. Unlike other protocols, Hybrid consensus splits up the finality gadget from the block production mechanism.&#xD;&#xA;&#xD;&#xA;Collator block production happens of course on the Parachain side. It is possible to use AURA or BABE to determine who is allowed to produce a block and send the PoVblock to the assigned validators. This probably isn't as easy as it sounds though.&#xD;&#xA;&#xD;&#xA;However, because the finality of a parachain block is determined on the relay chain (Polkadot's shared security) a parachain doesn't have to and **shouldn't** implement its own finality. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="29768" PostHistoryTypeId="5" PostId="7554" RevisionGUID="c268516c-9d59-4417-9c1f-809e278e61f0" CreationDate="2023-03-10T08:53:11.923" UserId="3317" Comment="added 372 characters in body" Text="[Polkadot Consensus][1] is known as **hybrid consensus**. Unlike other protocols, Hybrid consensus splits up the finality gadget from the block production mechanism.&#xD;&#xA;&#xD;&#xA;As for block production, this happens both on the relay chain and the parachains' side. For a parachain it is possible to use AURA or BABE (or any other custom block production logic) to determine who is allowed to produce a block and send the PoVblock to the assigned validators. This probably isn't as easy as it sounds though.&#xD;&#xA;&#xD;&#xA;Regarding finality, this is solely determined on the relay chain (Polkadot's shared security). Thus, a parachain doesn't have to and **shouldn't** implement its own finality.&#xD;&#xA;&#xD;&#xA;Cumulus provides interfaces and extensions to convert a Substrate FRAME runtime into a Parachain runtime. Polkadot expects each runtime exposes an interface for validating a Parachain's state transition and also provides interfaces for the Parachain to send and receive messages of other Parachains.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="29769" PostHistoryTypeId="2" PostId="7555" RevisionGUID="3ddb1392-050b-46ef-a632-b3de4ab74849" CreationDate="2023-03-10T09:08:55.577" UserId="2372" Text="I was making the parity-bridges-common compatible to the stable version of polkadot-v0.9.32. I'm getting the error &quot;expected struct Weight , found integer. Because earlier the weight in the frame-support was u64 but now it`s struct Weight&#xD;&#xA;&#xD;&#xA;struct Weight&#xD;&#xA; {&#xD;&#xA;	#[codec(compact)]&#xD;&#xA;	/// The weight of computational time used based on some reference hardware.&#xD;&#xA;	ref_time: u64,&#xD;&#xA;	#[codec(compact)]&#xD;&#xA;	/// The weight of storage space used by proof of validity.&#xD;&#xA;	proof_size: u64,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;can someone please guide me through this&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/S9u3J.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29771" PostHistoryTypeId="1" PostId="7555" RevisionGUID="3ddb1392-050b-46ef-a632-b3de4ab74849" CreationDate="2023-03-10T09:08:55.577" UserId="2372" Text="expected struct `Weight`, found integer" ContentLicense="CC BY-SA 4.0" />
  <row Id="29772" PostHistoryTypeId="3" PostId="7555" RevisionGUID="3ddb1392-050b-46ef-a632-b3de4ab74849" CreationDate="2023-03-10T09:08:55.577" UserId="2372" Text="|rust|weight|parity-bridges-common|frame-support|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29773" PostHistoryTypeId="5" PostId="7554" RevisionGUID="3719468a-f8a1-4da3-b2ce-e983cd92f9f0" CreationDate="2023-03-10T09:09:21.597" UserId="3317" Comment="deleted 303 characters in body" Text="[Polkadot Consensus][1] is known as **hybrid consensus**. Unlike other protocols, Hybrid consensus splits up the finality gadget from the block production mechanism.&#xD;&#xA;&#xD;&#xA;As for block production, this happens both on the relay chain and the parachains' side. For a parachain it is possible to use AURA or BABE (or any other custom block production logic) to determine who is allowed to produce a block and send the PoVblock to the assigned validators. This probably isn't as easy as it sounds though.&#xD;&#xA;&#xD;&#xA;Regarding finality, this is solely determined on the relay chain (Polkadot's shared security). Thus, a parachain doesn't have to and **shouldn't** implement its own finality.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="29774" PostHistoryTypeId="2" PostId="7556" RevisionGUID="76e105df-8aba-4fbb-8b35-9968af98240c" CreationDate="2023-03-10T09:17:06.603" UserId="445" Text="You should convert u64 to Weight struct &#xD;&#xA;&#xD;&#xA;Try this `from_parts` method :https://paritytech.github.io/substrate/master/src/sp_weights/weight_v2.rs.html#118&#xD;&#xA;&#xD;&#xA;Example: &#xD;&#xA;&#xD;&#xA;`Weight::from_parts(25_000_000, u64::MAX)`" ContentLicense="CC BY-SA 4.0" />
  <row Id="29776" PostHistoryTypeId="2" PostId="7557" RevisionGUID="539cdd4a-6206-4747-affa-294a5edd8b16" CreationDate="2023-03-10T09:29:03.250" UserId="1789" Text="This compiles:&#xD;&#xA;```rust&#xD;&#xA;		#[pallet::call_index(11)]&#xD;&#xA;		#[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;		pub fn add_member(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let new_member = ensure_signed(origin)?;&#xD;&#xA;          Ok(())&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;but after removing &quot;Ok(())&quot; and adding those below:&#xD;&#xA;```rust&#xD;&#xA;           let mut members = Members::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;			match members.binary_search(&amp;new_member) {&#xD;&#xA;				Ok(_) =&gt; Err(Error::&lt;T&gt;::AlreadyMember),&#xD;&#xA;				Err(index) =&gt; {&#xD;&#xA;					members.insert(index, new_member.clone());&#xD;&#xA;					Members::&lt;T&gt;::put(members);&#xD;&#xA;					Self::deposit_event(Event::MemberAdded{ who: new_member});&#xD;&#xA;					Ok(())&#xD;&#xA;				}&#xD;&#xA;      }&#xD;&#xA;```&#xD;&#xA;I got this error:&#xD;&#xA;```&#xD;&#xA;  error[E0277]: the trait bound `pallet::Error&lt;T&gt;: From&lt;frame_support::dispatch::DispatchError&gt;` is not satisfied&#xD;&#xA;     --&gt; /mnt/sda3/polkadot/substrate-node-template/pallets/template/src/lib.rs:36:1&#xD;&#xA;      |&#xD;&#xA;  36  | #[frame_support::pallet]&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;frame_support::dispatch::DispatchError&gt;` is not implemented for `pallet::Error&lt;T&gt;`&#xD;&#xA;      |&#xD;&#xA;  note: required by a bound in `with_storage_layer`&#xD;&#xA;     --&gt; /home/user2038/.cargo/git/checkouts/substrate-7e08433d4c370a21/f38bd66/frame/support/src/storage/transactional.rs:172:5&#xD;&#xA;      |&#xD;&#xA;  172 |     E: From&lt;DispatchError&gt;,&#xD;&#xA;      |        ^^^^^^^^^^^^^^^^^^^ required by this bound in `with_storage_layer`&#xD;&#xA;      = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: `?` couldn't convert the error to `pallet::Error&lt;T&gt;`&#xD;&#xA;     --&gt; /mnt/sda3/polkadot/substrate-node-template/pallets/template/src/lib.rs:266:42&#xD;&#xA;      |&#xD;&#xA;  266 |             let new_member = ensure_signed(origin)?;&#xD;&#xA;      |                                                   ^ the trait `From&lt;frame_support::error::BadOrigin&gt;` is not implemented for `pallet::Error&lt;T&gt;`&#xD;&#xA;      |&#xD;&#xA;      = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait&#xD;&#xA;      = help: the following other types implement trait `FromResidual&lt;R&gt;`:&#xD;&#xA;                &lt;Result&lt;T, F&gt; as FromResidual&lt;Result&lt;core::convert::Infallible, E&gt;&gt;&gt;&#xD;&#xA;                &lt;Result&lt;T, F&gt; as FromResidual&lt;Yeet&lt;E&gt;&gt;&gt;&#xD;&#xA;      = note: required for `Result&lt;_, pallet::Error&lt;T&gt;&gt;` to implement `FromResidual&lt;Result&lt;core::convert::Infallible, frame_support::error::BadOrigin&gt;&gt;`&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;     --&gt; /mnt/sda3/polkadot/substrate-node-template/pallets/template/src/lib.rs:36:1&#xD;&#xA;      |&#xD;&#xA;  36  | #[frame_support::pallet]&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result&lt;(), DispatchError&gt;`, found `Result&lt;(), Error&lt;T&gt;&gt;`&#xD;&#xA;  ...&#xD;&#xA;  265 |         pub fn add_member(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;      |                                                    -------------- expected `Result&lt;(), frame_support::dispatch::DispatchError&gt;` because of return type&#xD;&#xA;      |&#xD;&#xA;      = note: expected enum `Result&lt;_, frame_support::dispatch::DispatchError&gt;`&#xD;&#xA;                 found enum `Result&lt;_, pallet::Error&lt;T&gt;&gt;`&#xD;&#xA;      = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;  help: use `?` to coerce and return an appropriate `Err`, and wrap the resulting value in `Ok` so the expression remains of type `Result`&#xD;&#xA;```      |&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Somehow adding the match statement is causing the error to happen! Why?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29778" PostHistoryTypeId="1" PostId="7557" RevisionGUID="539cdd4a-6206-4747-affa-294a5edd8b16" CreationDate="2023-03-10T09:29:03.250" UserId="1789" Text="From&lt;frame_support::error::BadOrigin&gt; is not implemented for pallet::Error&lt;T&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29779" PostHistoryTypeId="3" PostId="7557" RevisionGUID="539cdd4a-6206-4747-affa-294a5edd8b16" CreationDate="2023-03-10T09:29:03.250" UserId="1789" Text="|badorigin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29780" PostHistoryTypeId="2" PostId="7558" RevisionGUID="d956a979-9bf5-4cfc-80ca-d2034b165e0b" CreationDate="2023-03-10T09:32:56.243" UserId="3946" Text="i'm trying to get an accountId32 from a string. In fact , i received account address in a telegram message but i would like to use native method has of BTreeMap&lt;AccountId32, u32&gt;.&#xD;&#xA;anyone got an idea about how to do it ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29782" PostHistoryTypeId="1" PostId="7558" RevisionGUID="d956a979-9bf5-4cfc-80ca-d2034b165e0b" CreationDate="2023-03-10T09:32:56.243" UserId="3946" Text="Trying to get an AccountId32 from a string in js" ContentLicense="CC BY-SA 4.0" />
  <row Id="29783" PostHistoryTypeId="3" PostId="7558" RevisionGUID="d956a979-9bf5-4cfc-80ca-d2034b165e0b" CreationDate="2023-03-10T09:32:56.243" UserId="3946" Text="|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29784" PostHistoryTypeId="2" PostId="7559" RevisionGUID="bc5cfa34-ebdf-4a70-889a-b0d353a45185" CreationDate="2023-03-10T10:05:03.697" UserId="2762" Text="If I understand correctly you have an String and want to query a method that needs an `AccountId` type as a parameter. &#xD;&#xA;See the example to get the balance of an account with the [method][1]:&#xD;&#xA;&#xD;&#xA;    account(AccountId32): FrameSystemAccountInfo&#xD;&#xA;&#xD;&#xA;You can query it using PolkadotJS like this:&#xD;&#xA;```js&#xD;&#xA; const ADDR = '167vSUfcfk6DPmFNbV5MJZUbacSgxNYs85YUmBhgXAFHj3fd';&#xD;&#xA; const accountInfo = await apiAt.query.system.account(ADDR);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see how PolkadotJS manages the AccountId type in its codebase: https://github.com/polkadot-js/api/blob/master/packages/types/src/generic/AccountId.ts&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage#accountaccountid32-framesystemaccountinfo" ContentLicense="CC BY-SA 4.0" />
  <row Id="29786" PostHistoryTypeId="5" PostId="7557" RevisionGUID="59987ed6-6602-4cd9-9960-3e9dc97a1791" CreationDate="2023-03-10T10:26:43.210" UserId="1789" Comment="added 215 characters in body" Text="For BoundedVec in my storage, this can compile:&#xD;&#xA;```rust&#xD;&#xA;        #[pallet::storage]&#xD;&#xA;        #[pallet::getter(fn members)]&#xD;&#xA;        pub(super) type Members&lt;T: Config&gt; = StorageValue&lt;_, BoundedVec&lt;T::AccountId, T::MaxSize&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;		#[pallet::call_index(11)]&#xD;&#xA;		#[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;		pub fn add_member(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let new_member = ensure_signed(origin)?;&#xD;&#xA;          Ok(())&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;but after removing &quot;Ok(())&quot; and adding those below:&#xD;&#xA;```rust&#xD;&#xA;           let mut members = Members::&lt;T&gt;::get();&#xD;&#xA;&#xD;&#xA;			match members.binary_search(&amp;new_member) {&#xD;&#xA;				Ok(_) =&gt; Err(Error::&lt;T&gt;::AlreadyMember),&#xD;&#xA;				Err(index) =&gt; {&#xD;&#xA;					members.insert(index, new_member.clone());&#xD;&#xA;					Members::&lt;T&gt;::put(members);&#xD;&#xA;					Self::deposit_event(Event::MemberAdded{ who: new_member});&#xD;&#xA;					Ok(())&#xD;&#xA;				}&#xD;&#xA;      }&#xD;&#xA;```&#xD;&#xA;I got this error:&#xD;&#xA;```&#xD;&#xA;  error[E0277]: the trait bound `pallet::Error&lt;T&gt;: From&lt;frame_support::dispatch::DispatchError&gt;` is not satisfied&#xD;&#xA;     --&gt; /mnt/sda3/polkadot/substrate-node-template/pallets/template/src/lib.rs:36:1&#xD;&#xA;      |&#xD;&#xA;  36  | #[frame_support::pallet]&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;frame_support::dispatch::DispatchError&gt;` is not implemented for `pallet::Error&lt;T&gt;`&#xD;&#xA;      |&#xD;&#xA;  note: required by a bound in `with_storage_layer`&#xD;&#xA;     --&gt; /home/user2038/.cargo/git/checkouts/substrate-7e08433d4c370a21/f38bd66/frame/support/src/storage/transactional.rs:172:5&#xD;&#xA;      |&#xD;&#xA;  172 |     E: From&lt;DispatchError&gt;,&#xD;&#xA;      |        ^^^^^^^^^^^^^^^^^^^ required by this bound in `with_storage_layer`&#xD;&#xA;      = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0277]: `?` couldn't convert the error to `pallet::Error&lt;T&gt;`&#xD;&#xA;     --&gt; /mnt/sda3/polkadot/substrate-node-template/pallets/template/src/lib.rs:266:42&#xD;&#xA;      |&#xD;&#xA;  266 |             let new_member = ensure_signed(origin)?;&#xD;&#xA;      |                                                   ^ the trait `From&lt;frame_support::error::BadOrigin&gt;` is not implemented for `pallet::Error&lt;T&gt;`&#xD;&#xA;      |&#xD;&#xA;      = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait&#xD;&#xA;      = help: the following other types implement trait `FromResidual&lt;R&gt;`:&#xD;&#xA;                &lt;Result&lt;T, F&gt; as FromResidual&lt;Result&lt;core::convert::Infallible, E&gt;&gt;&gt;&#xD;&#xA;                &lt;Result&lt;T, F&gt; as FromResidual&lt;Yeet&lt;E&gt;&gt;&gt;&#xD;&#xA;      = note: required for `Result&lt;_, pallet::Error&lt;T&gt;&gt;` to implement `FromResidual&lt;Result&lt;core::convert::Infallible, frame_support::error::BadOrigin&gt;&gt;`&#xD;&#xA;&#xD;&#xA;  error[E0308]: mismatched types&#xD;&#xA;     --&gt; /mnt/sda3/polkadot/substrate-node-template/pallets/template/src/lib.rs:36:1&#xD;&#xA;      |&#xD;&#xA;  36  | #[frame_support::pallet]&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result&lt;(), DispatchError&gt;`, found `Result&lt;(), Error&lt;T&gt;&gt;`&#xD;&#xA;  ...&#xD;&#xA;  265 |         pub fn add_member(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;      |                                                    -------------- expected `Result&lt;(), frame_support::dispatch::DispatchError&gt;` because of return type&#xD;&#xA;      |&#xD;&#xA;      = note: expected enum `Result&lt;_, frame_support::dispatch::DispatchError&gt;`&#xD;&#xA;                 found enum `Result&lt;_, pallet::Error&lt;T&gt;&gt;`&#xD;&#xA;      = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;  help: use `?` to coerce and return an appropriate `Err`, and wrap the resulting value in `Ok` so the expression remains of type `Result`&#xD;&#xA;```      |&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Somehow adding the match statement is causing the error to happen! Why?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29789" PostHistoryTypeId="2" PostId="7561" RevisionGUID="12bd8335-100f-4c65-a291-73d1ac6e450f" CreationDate="2023-03-10T11:33:47.027" UserId="2156" Text="So we found the issue, thanks to the [checklist here](https://substrate.stackexchange.com/questions/1394/our-parachain-doesnt-produce-blocks-checklist/1395#1395) - Thanks a bunch @bruno.&#xD;&#xA;&#xD;&#xA;We had previously checked whether `author.hasKey` worked, and we overlooked it since it didn't return `true` for us on t0rn.&#xD;&#xA;&#xD;&#xA;Actually, it turned out to be a slight mismatch. Once we had rubber ducked through the list, we were inserting via RPC but not inserting the key into the node via `key insert`, and we were also calling `author.rotateKeys` in our deployment script, which added to the mix. Once we issued `key insert` we started building blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="29791" PostHistoryTypeId="2" PostId="7562" RevisionGUID="9a6ce0af-d4b6-468a-9d65-73f1c04496fd" CreationDate="2023-03-10T11:48:13.107" UserId="2762" Text="[BoundedVec][1] is a vector where the length of the queue is always bounded, which is better than Vec for storage because it has a defined a maximum length.&#xD;&#xA;I recommend this StackExchange questions to learn the difference between BoundedVec and Vec: [When to use `BoundedVec` vs. `WeakBoundedVec` vs. `Vec`?][2]&#xD;&#xA;&#xD;&#xA;&gt; Vec is okay to use in the runtime, but never to put into storage,&#xD;&#xA;&gt; since it is unbounded by definition.&#xD;&#xA;&#xD;&#xA;In my Smart Contract I want to store a struct that contains a Vec. &#xD;&#xA;&#xD;&#xA;What is the best practice here?&#xD;&#xA;- Store the Vec like in the ink! documentation example: https://use.ink/basics/storing-values&#xD;&#xA;- Import a BoundedVec (how?) like in the FRAME pallets: https://substrate.stackexchange.com/a/1005/2762&#xD;&#xA;- Create my own data type like is explained here in the ink! documentation: https://use.ink/datastructures/custom-datastructure#generic-storage-fields&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/frame_support/storage/bounded_vec/struct.BoundedVec.html&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1152/when-to-use-boundedvec-vs-weakboundedvec-vs-vec" ContentLicense="CC BY-SA 4.0" />
  <row Id="29793" PostHistoryTypeId="1" PostId="7562" RevisionGUID="9a6ce0af-d4b6-468a-9d65-73f1c04496fd" CreationDate="2023-03-10T11:48:13.107" UserId="2762" Text="BoundedVec on ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="29794" PostHistoryTypeId="3" PostId="7562" RevisionGUID="9a6ce0af-d4b6-468a-9d65-73f1c04496fd" CreationDate="2023-03-10T11:48:13.107" UserId="2762" Text="|ink|storage|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29795" PostHistoryTypeId="2" PostId="7563" RevisionGUID="990fd44f-98fb-4306-b6cf-2442da450d1f" CreationDate="2023-03-10T11:57:29.037" UserId="94" Text="Since weight is now two dimensional, you need to provide a *Proof size* component as well.  &#xD;&#xA;The exact value for this depends on the use-case; exactly like the exact *Reference Time* component depends on the use-case. `u64::MAX` should just be a place holder and not a default value.&#xD;&#xA;&#xD;&#xA;You can then use `Weight::from_parts` instead of a simple `u64` to construct a `Weight` instance." ContentLicense="CC BY-SA 4.0" />
  <row Id="29797" PostHistoryTypeId="50" PostId="5293" RevisionGUID="faad2a51-a73b-4279-b51f-55c47d18975c" CreationDate="2023-03-10T13:02:50.437" UserId="-1" />
  <row Id="29798" PostHistoryTypeId="2" PostId="7564" RevisionGUID="046af079-a623-493f-bed3-f01d33cfd9e6" CreationDate="2023-03-10T13:26:22.183" UserId="3948" Text="I need the signatures of the validators who have signed on the produced and finalized blocks.&#xD;&#xA;For example, In cosmos-SDK based blockchains blocks contains the signatures(and validators addresses) of the validators who have voted on that block.&#xD;&#xA;Is there some way to get this data from existing RPCs." ContentLicense="CC BY-SA 4.0" />
  <row Id="29800" PostHistoryTypeId="1" PostId="7564" RevisionGUID="046af079-a623-493f-bed3-f01d33cfd9e6" CreationDate="2023-03-10T13:26:22.183" UserId="3948" Text="Is there any way to get the validators signatures of the finalized blocks in substrate based chains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29801" PostHistoryTypeId="3" PostId="7564" RevisionGUID="046af079-a623-493f-bed3-f01d33cfd9e6" CreationDate="2023-03-10T13:26:22.183" UserId="3948" Text="|polkadot-js|polkadot|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29802" PostHistoryTypeId="2" PostId="7565" RevisionGUID="ab450b3a-585e-432b-b375-945f8f2a662e" CreationDate="2023-03-10T14:07:36.137" UserId="3317" Text="As for Polkadot these signatures are included in the justification, have a look at [this detailed explanation][1]. You can query this information with the [RPC call][2] -&gt; `grandpa` -&gt; `proveFinality(blockNumber)`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5922/are-justification-in-the-block-the-actual-votes-cast-by-validators-in-grandpa&#xD;&#xA;  [2]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F1rpc.io%2Fdot#/rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="29804" PostHistoryTypeId="2" PostId="7566" RevisionGUID="2bad34ac-22e3-4501-a8b4-1b19d5b8c2ba" CreationDate="2023-03-10T14:35:09.003" UserId="94" Text="```rust&#xD;&#xA;Ok(_) =&gt; Err(Error::&lt;T&gt;::AlreadyMember),&#xD;&#xA;```&#xD;&#xA;should be &#xD;&#xA;```rust&#xD;&#xA;Ok(_) =&gt; Err(Error::&lt;T&gt;::AlreadyMember.into()),&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29806" PostHistoryTypeId="52" PostId="7553" RevisionGUID="3b2f4df0-6ffe-4497-bc62-f64e65ca7b10" CreationDate="2023-03-10T14:54:19.913" />
  <row Id="29807" PostHistoryTypeId="2" PostId="7567" RevisionGUID="cd008b19-e783-4e32-8347-1f1e5e983f3a" CreationDate="2023-03-10T15:34:59.743" UserId="3098" Text="You can store `Vec` in contract's storage which can grow over time. `storage_deposit_limit` specifies the max amount of storage your contract can use.&#xD;&#xA;&#xD;&#xA;If you want to explicitly limit the size of the Vec, you can store either a constant or another storage item `max_size` where you specify the max number of elements your list can have.&#xD;&#xA;Then in the message, you can add the check whenever new element is to be pushed and if the limit is reached, you can return an error with sensible message." ContentLicense="CC BY-SA 4.0" />
  <row Id="29811" PostHistoryTypeId="5" PostId="7559" RevisionGUID="08f47407-f24f-40ed-bd20-9577e9391995" CreationDate="2023-03-10T17:08:40.920" UserId="2762" Comment="update the question, updated the answer" Text="If I understand correctly you have an String and want to query a method that needs an `AccountId` type as a parameter. &#xD;&#xA;See the example to get the balance of an account with the [method][1]:&#xD;&#xA;&#xD;&#xA;    account(AccountId32): FrameSystemAccountInfo&#xD;&#xA;&#xD;&#xA;You can query it using PolkadotJS like this:&#xD;&#xA;```js&#xD;&#xA; const ADDR = '167vSUfcfk6DPmFNbV5MJZUbacSgxNYs85YUmBhgXAFHj3fd';&#xD;&#xA; const accountInfo = await apiAt.query.system.account(ADDR);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see how PolkadotJS manages the AccountId type in its codebase: https://github.com/polkadot-js/api/blob/master/packages/types/src/generic/AccountId.ts&#xD;&#xA;&#xD;&#xA;Update for your specific example:&#xD;&#xA;&#xD;&#xA;The `result.individual` where you try to find the address is not an array of Account_id, is the Account_id and the points:&#xD;&#xA;&#xD;&#xA;    '111B8CxcmnWbuDLyGvgUmRezDCK1brRZmvUuQ6SrFdMyc3S': '84,480',&#xD;&#xA;&#xD;&#xA;What I suggest you to do to compare with your String is the following:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;    const eraRewardPoints = await api.query.staking.erasRewardPoints(era.getNumber());&#xD;&#xA;    for (const [id, points] of eraRewardPoints.individual.entries()) {&#xD;&#xA;      if (id.toString() === polkadotAdressInString) {&#xD;&#xA;        console.log(id.toString());&#xD;&#xA;        console.log(points.toHuman());&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage#accountaccountid32-framesystemaccountinfo" ContentLicense="CC BY-SA 4.0" />
  <row Id="29812" PostHistoryTypeId="52" PostId="7555" RevisionGUID="35292766-bd36-43d7-9038-c9ad2e952d46" CreationDate="2023-03-10T17:09:15.540" />
  <row Id="29814" PostHistoryTypeId="2" PostId="7569" RevisionGUID="e5af2b8f-a7f8-4218-a432-169fdb3c3fdc" CreationDate="2023-03-10T18:30:48.047" UserId="2446" Text="When using cargo contract to call contracts, in all the examples i've seen, its either been `AccountId` or `bool`ean or `integers(u &amp; i)`. I need to pass a `Vec&lt;u8&gt;` to my contract function. I've been trying but it all results into errors. Please can you help show me how its done.&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="29816" PostHistoryTypeId="1" PostId="7569" RevisionGUID="e5af2b8f-a7f8-4218-a432-169fdb3c3fdc" CreationDate="2023-03-10T18:30:48.047" UserId="2446" Text="How do i pass a `Vec&lt;u8&gt;` as argument to a contracts function, using the command line(cargo contract)" ContentLicense="CC BY-SA 4.0" />
  <row Id="29817" PostHistoryTypeId="3" PostId="7569" RevisionGUID="e5af2b8f-a7f8-4218-a432-169fdb3c3fdc" CreationDate="2023-03-10T18:30:48.047" UserId="2446" Text="|ink|rust|smart-contract|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29819" PostHistoryTypeId="2" PostId="7570" RevisionGUID="764cd55a-09f9-417e-b124-b4986419c837" CreationDate="2023-03-10T19:26:15.327" UserId="29" Text="As stated here:&#xD;&#xA;- https://gitlab.parity.io/sergejparity/cargo-contract/-/issues/517&#xD;&#xA;&#xD;&#xA;Try escaping:&#xD;&#xA;```&#xD;&#xA;cargo contract instantiate \&#xD;&#xA;       --constructor new \&#xD;&#xA;       --args 3 \[5FKy7RwXBCCACCEPjM5WugkhUd787FjdgieTkdj7TPngJzxN\] \&#xD;&#xA;       --suri //Alice \&#xD;&#xA;       --code-hash 0xbc1b42256696c8a4187ec3ed79fc602789fc11287c4c30926f5e31ed8169574e&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29821" PostHistoryTypeId="52" PostId="7562" RevisionGUID="e7beec8e-0538-4cca-8a72-d16532d14e56" CreationDate="2023-03-10T19:50:23.613" />
  <row Id="29822" PostHistoryTypeId="2" PostId="7571" RevisionGUID="4f79866b-3eeb-4df2-8b9c-f701e2f731c5" CreationDate="2023-03-10T20:03:39.130" UserId="2446" Text="Here is how i solved it:&#xD;&#xA;I converted all the array elements to hexadecimal, then i concatenated them as one hexadecimal number. e.g&#xD;&#xA;`[20, 103, 114, 101, 97, 116]` = `0x146772656174`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Result Success!&#xD;&#xA;    Reverted false&#xD;&#xA;        Data Tuple(Tuple { ident: Some(&quot;Ok&quot;), values: [Seq(Seq { elems: [UInt(20), UInt(103), UInt(114), UInt(101), UInt(97), UInt(116)] })] })&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29824" PostHistoryTypeId="2" PostId="7572" RevisionGUID="4f64cd4c-c2f0-46e4-99b0-f67f10e9bc06" CreationDate="2023-03-10T20:10:46.230" UserId="3711" Text="I see `refTime` and `proofSize` used frequently (e.g. in polkadot js apps when submitting contract transactions), but I cannot find any docs on them.&#xD;&#xA;&#xD;&#xA;So what exactly are they? Specifically relating to `ink!`, as this is where I'm seeing them." ContentLicense="CC BY-SA 4.0" />
  <row Id="29826" PostHistoryTypeId="1" PostId="7572" RevisionGUID="4f64cd4c-c2f0-46e4-99b0-f67f10e9bc06" CreationDate="2023-03-10T20:10:46.230" UserId="3711" Text="What is refTime and proofSize?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29827" PostHistoryTypeId="3" PostId="7572" RevisionGUID="4f64cd4c-c2f0-46e4-99b0-f67f10e9bc06" CreationDate="2023-03-10T20:10:46.230" UserId="3711" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29828" PostHistoryTypeId="2" PostId="7573" RevisionGUID="474d4b94-e4ef-48ca-b0bc-c86ff982ae55" CreationDate="2023-03-10T20:46:14.710" UserId="227" Text="For ink! the term Gas refers to the resources used by a contract call. It's important for smart contracts that the caller has to pay for any utilized resource. Those resources can be either storage space (for storing something in the contract's storage) or computational time (for executing the contract and its logic). The term Gas encompasses both of these resources: `Gas = (refTime, proofSize)`.&#xD;&#xA;&#xD;&#xA;The terms hereby refer to:&#xD;&#xA;&#xD;&#xA;`refTime`: The amount of computational time that can be used for execution, in picoseconds.&#xD;&#xA;&#xD;&#xA;`proofSize`: Th amount of storage space that can be used, in bytes.&#xD;&#xA;&#xD;&#xA;`refTime` comes from &quot;reference time&quot;, referring to Substrate's Weights system, where computation time is benchmarked on reference hardware. You can read more details [here](https://docs.substrate.io/reference/how-to-guides/weights/).&#xD;&#xA;&#xD;&#xA;For ink!, Gas is a synonym to &quot;Weight&quot;, we just use this term to make onboarding easier for devs from other smart contract ecosystems.&#xD;&#xA;&#xD;&#xA;Specifically these terms come from Substrate's Weights V2 system, which was recently introduced." ContentLicense="CC BY-SA 4.0" />
  <row Id="29831" PostHistoryTypeId="50" PostId="7142" RevisionGUID="a3e1dcea-59e7-4753-a86d-2059baa5493c" CreationDate="2023-03-11T10:00:45.097" UserId="-1" />
  <row Id="29832" PostHistoryTypeId="5" PostId="7571" RevisionGUID="3de79725-80f0-4385-a79f-acb821462769" CreationDate="2023-03-11T14:37:43.993" UserId="2446" Comment="added 134 characters in body" Text="Here is how i solved it:&#xD;&#xA;I converted all the array elements to an hexadecimal string. You can check out the &lt;a href=&quot;https://docs.rs/hex/latest/hex/index.html&quot;&gt;hex crate&lt;/a&gt; e.g&#xD;&#xA;`[20, 103, 114, 101, 97, 116]` = `0x` + `146772656174`(hex string)&#xD;&#xA;&#xD;&#xA;Make sure to add `0x` to the string before sending it as a parameter.&#xD;&#xA;```&#xD;&#xA; Result Success!&#xD;&#xA;    Reverted false&#xD;&#xA;        Data Tuple(Tuple { ident: Some(&quot;Ok&quot;), values: [Seq(Seq { elems: [UInt(20), UInt(103), UInt(114), UInt(101), UInt(97), UInt(116)] })] })&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29833" PostHistoryTypeId="2" PostId="7574" RevisionGUID="1c155f6e-384c-4abe-8234-5af1d4a7e1e9" CreationDate="2023-03-11T14:45:45.277" UserId="251" Text="I think the best practice is using macro.&#xD;&#xA;&#xD;&#xA;Sometimes, we need to speed up the session time for the development runtimes.&#xD;&#xA;&#xD;&#xA;So, we have a `fast-runtime` macro.&#xD;&#xA;&#xD;&#xA;Check how `fast-runtime` works: https://github.com/paritytech/polkadot/blob/a8e6828115f852dc08a90c9fc0698f59a589b977/runtime/common/src/lib.rs#L247-L275&#xD;&#xA;&#xD;&#xA;You can simply replace the `fast-runtime` with something like `multi-runtimes` and make accepting more args." ContentLicense="CC BY-SA 4.0" />
  <row Id="29835" PostHistoryTypeId="2" PostId="7575" RevisionGUID="2b1e3a4e-1b32-4ab8-a9b1-a68b047c3341" CreationDate="2023-03-11T19:11:59.513" UserId="3070" Text="We are running a substrate node in testing/development and the server ran out of disk space. We cleared up space by deleting the log files and now the node wont start. &#xD;&#xA;&#xD;&#xA;Service(Client(RuntimeApiError(Application(UnknownBlock(&quot;State already discarded for 0x6d8fc6...&#xD;&#xA;&#xD;&#xA;possible wrote a corrupt block.. &#xD;&#xA;&#xD;&#xA;is there any resources on this sort of error? &#xD;&#xA;&#xD;&#xA;how would you delete that possibly corrupt block?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29837" PostHistoryTypeId="1" PostId="7575" RevisionGUID="2b1e3a4e-1b32-4ab8-a9b1-a68b047c3341" CreationDate="2023-03-11T19:11:59.513" UserId="3070" Text="Substrate Node wont restart" ContentLicense="CC BY-SA 4.0" />
  <row Id="29838" PostHistoryTypeId="3" PostId="7575" RevisionGUID="2b1e3a4e-1b32-4ab8-a9b1-a68b047c3341" CreationDate="2023-03-11T19:11:59.513" UserId="3070" Text="|error|nodes|block-production|log|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29839" PostHistoryTypeId="2" PostId="7576" RevisionGUID="ac678885-78a8-4e1e-a6d7-216d050030ae" CreationDate="2023-03-11T21:44:28.180" UserId="73" Text="You can not delete individual blocks from the database that easily. When you have run out of disk space with the node running, it means that you have corrupted the database. The only solution for this is to delete the entire database. We recently added the [`storage-monitor`][1] which needs to be added to your service instantiation and then brings down the node if the server runs out of disc space.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/8f9b07445057ab83a057cb61aac56a4a0a671395/client/storage-monitor/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="29841" PostHistoryTypeId="2" PostId="7577" RevisionGUID="806ea641-788d-422b-8ee3-ed777a3ba2ff" CreationDate="2023-03-12T08:29:04.170" UserId="3886" Text="I am using substrate node-template, I don't have any issue building the substrate node-template in release mode, When I am trying to run it first time it works fine, but if stop and try to run it again I get the below error. I have already used `purge-chain` command too. Still facing same error.&#xD;&#xA;&#xD;&#xA;Mac :&#xD;&#xA;```&#xD;&#xA;Apple M1 pro&#xD;&#xA;Venture 13.2.1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Rust tools :&#xD;&#xA;```&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.67.1 (d5a82bbd2 2023-02-07)&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --dev &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-10 23:31:52 NODE TEMPLATE&#xD;&#xA;2023-03-10 23:31:52 ✌️  version 4.0.0-dev-3cd46c7e0cb    &#xD;&#xA;2023-03-10 23:31:52 ❤️  by XXX, 2017-2023    &#xD;&#xA;2023-03-10 23:31:52  Chain specification: Development    &#xD;&#xA;2023-03-10 23:31:52   Node name: happy-smash-3827    &#xD;&#xA;2023-03-10 23:31:52  Role: AUTHORITY    &#xD;&#xA;2023-03-10 23:31:52  Database: RocksDb at /tmp/substrate0dMzee/chains/dev/db/full    &#xD;&#xA;2023-03-10 23:31:52 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;can't convert a memory import into an export: failed to insert a new memory section: Duplicated sections (5)&quot;)))&#xD;&#xA;2023-03-10 23:31:52 Cannot create a runtime error=Other(&quot;can't convert a memory import into an export: failed to insert a new memory section: Duplicated sections (5)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error&#xD;&#xA;```&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;can't convert a memory import into an export: failed to insert a new memory section: Duplicated sections (5)&quot;)))&#xD;&#xA;2023-03-10 23:31:52 Cannot create a runtime error=Other(&quot;can't convert a memory import into an export: failed to insert a new memory section: Duplicated sections (5)&quot;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29843" PostHistoryTypeId="1" PostId="7577" RevisionGUID="806ea641-788d-422b-8ee3-ed777a3ba2ff" CreationDate="2023-03-12T08:29:04.170" UserId="3886" Text="Running Susbstrate node-template throws error in mac" ContentLicense="CC BY-SA 4.0" />
  <row Id="29844" PostHistoryTypeId="3" PostId="7577" RevisionGUID="806ea641-788d-422b-8ee3-ed777a3ba2ff" CreationDate="2023-03-12T08:29:04.170" UserId="3886" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29845" PostHistoryTypeId="50" PostId="5307" RevisionGUID="644d955f-19e3-4601-9962-3f7fb30bc92b" CreationDate="2023-03-12T09:02:10.253" UserId="-1" />
  <row Id="29846" PostHistoryTypeId="2" PostId="7578" RevisionGUID="ea8c81a2-d963-4fcd-8af6-12f847c9b749" CreationDate="2023-03-12T14:14:54.607" UserId="1786" Text="Great question,&#xD;&#xA;&#xD;&#xA;So txwrapper-core was developed with the idea that we would expose all the tools necessary for individuals to build their own offline tx construction libraries. &#xD;&#xA;&#xD;&#xA;In your case the best way to include type-bundles is to leverage txwrapper-registry. Currently the only way the registry accepts them is through an environment variable called `TX_TYPES_BUNDLES` which is the path to the types-bundle file. The code can be found [here](https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-registry/src/index.ts#L70-L85), and the readme [here](https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-registry).&#xD;&#xA;&#xD;&#xA;If it is a use case where you would like the ability to pass in a types-bundle directly into `createRegistry`, I would be happy to add the ability in for you.&#xD;&#xA;&#xD;&#xA;For building offline libraries using txwrapper-core though, I would look through the [`txwrapper-polkadot`](https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-polkadot/src/index.ts) index.ts file which shows how we expose a lot of the functionality for users for parity based chains specifically. I would then look at [`txwrapper-substrate`](https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-substrate). This is where we actually construct methods using the tools from txwrapper-core for offline construction. So if you wanted to build transactions offline using txwrapper-core for specific parachains you would need to construct each method you would like to use to build these transactions. I always use balances transfer as an [example](https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-substrate/src/methods/balances/transfer.ts#L9-L43). It's pretty straightforward, you just need to know the args its accepting and everything else is template like. As an extra note as well, I would look into the [`txwrapper-examples`](https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-examples) we provide for what the workflow looks like for constructing transactions.&#xD;&#xA;&#xD;&#xA;The only thing I ask is if you would like the ability to pass in a a types-bundle directly into `createRegistry` from the `txwrapper-registry` library, please file an issue [here](https://github.com/paritytech/txwrapper-core/issues), and I can add that in pretty quick. " ContentLicense="CC BY-SA 4.0" />
  <row Id="29848" PostHistoryTypeId="5" PostId="7570" RevisionGUID="a9926b02-4538-427e-aec6-f8080b2e8294" CreationDate="2023-03-12T14:58:43.763" UserId="29" Comment="deleted 1 character in body" Text="As stated here:&#xD;&#xA;- https://gitlab.parity.io/sergejparity/cargo-contract/-/issues/517&#xD;&#xA;&#xD;&#xA;Try escaping:&#xD;&#xA;```&#xD;&#xA;cargo contract instantiate \&#xD;&#xA;       --constructor new \&#xD;&#xA;       --args 3 \[5FKy7RwXBCCACCEPjM5WugkhUd787FjdgieTkdj7TPngJzxN] \&#xD;&#xA;       --suri //Alice \&#xD;&#xA;       --code-hash 0xbc1b42256696c8a4187ec3ed79fc602789fc11287c4c30926f5e31ed8169574e&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29849" PostHistoryTypeId="5" PostId="7577" RevisionGUID="9dda9ad3-a31c-4282-ba28-385b6f1267b9" CreationDate="2023-03-12T19:48:40.887" UserId="83" Comment="fix grammar" Text="I am using substrate-node-template. I don't have any issue building the substrate-node-template in release mode, and when I try to run it the first time it works fine, but if I stop and try to run it again I get the below error. I am facing the same error even after using the `purge-chain` command.&#xD;&#xA;&#xD;&#xA;macOS:&#xD;&#xA;```&#xD;&#xA;Apple M1 pro&#xD;&#xA;Ventura 13.2.1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Rust tools :&#xD;&#xA;```&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.67.1 (d5a82bbd2 2023-02-07)&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --dev &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-10 23:31:52 NODE TEMPLATE&#xD;&#xA;2023-03-10 23:31:52 ✌️  version 4.0.0-dev-3cd46c7e0cb    &#xD;&#xA;2023-03-10 23:31:52 ❤️  by XXX, 2017-2023    &#xD;&#xA;2023-03-10 23:31:52  Chain specification: Development    &#xD;&#xA;2023-03-10 23:31:52   Node name: happy-smash-3827    &#xD;&#xA;2023-03-10 23:31:52  Role: AUTHORITY    &#xD;&#xA;2023-03-10 23:31:52  Database: RocksDb at /tmp/substrate0dMzee/chains/dev/db/full    &#xD;&#xA;2023-03-10 23:31:52 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;can't convert a memory import into an export: failed to insert a new memory section: Duplicated sections (5)&quot;)))&#xD;&#xA;2023-03-10 23:31:52 Cannot create a runtime error=Other(&quot;can't convert a memory import into an export: failed to insert a new memory section: Duplicated sections (5)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error&#xD;&#xA;```&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;can't convert a memory import into an export: failed to insert a new memory section: Duplicated sections (5)&quot;)))&#xD;&#xA;2023-03-10 23:31:52 Cannot create a runtime error=Other(&quot;can't convert a memory import into an export: failed to insert a new memory section: Duplicated sections (5)&quot;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29850" PostHistoryTypeId="4" PostId="7577" RevisionGUID="9dda9ad3-a31c-4282-ba28-385b6f1267b9" CreationDate="2023-03-12T19:48:40.887" UserId="83" Comment="fix grammar" Text="Running substrate-node-template throws macOS memory error" ContentLicense="CC BY-SA 4.0" />
  <row Id="29851" PostHistoryTypeId="4" PostId="5968" RevisionGUID="17511520-25a4-47ef-8408-8847f2e0d988" CreationDate="2023-03-12T19:51:33.760" UserId="83" Comment="naming" Text="Build error on substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="29852" PostHistoryTypeId="2" PostId="7579" RevisionGUID="d8228658-1fa5-4e5a-852a-87f0e26ac931" CreationDate="2023-03-12T22:22:03.173" UserId="494" Text="I'm writing a pallet that implements [`evm::executor::stack::PrecompileSet`](https://docs.rs/evm/0.37.0/evm/executor/stack/trait.PrecompileSet.html).&#xD;&#xA;&#xD;&#xA;The goal is to use this pallet in conjunction with Frontier's `pallet-evm`, [which has the following types in its `Config` trait](https://github.com/paritytech/frontier/blob/58c568964dc32dd96153b7d113ac2df58d27de2b/frame/evm/src/lib.rs#LL138C8-L138C21):&#xD;&#xA;```&#xD;&#xA;type PrecompilesType: PrecompileSet;&#xD;&#xA;type PrecompilesValue: Get&lt;Self::PrecompilesType&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While writing a mock environment for unit testing the pallet I'm writing, I'm struggling to make the compiler happy for `PrecompilesValue`:&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	...&#xD;&#xA;	pub MockPrecompiles: crate::Pallet&lt;Test&gt; = // ?&#xD;&#xA;}&#xD;&#xA;impl pallet_evm::Config for Test {&#xD;&#xA;	...&#xD;&#xA;	type PrecompilesType = crate::Pallet&lt;Test&gt;;&#xD;&#xA;	type PrecompilesValue = MockPrecompiles;&#xD;&#xA;	...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;It seems non-trivial to use the `parameter_types!` macro to get an appropriate `impl&lt;T: Config&gt; Get&lt;T&gt; for Pallet&lt;T&gt;`. With a blind trial-and-error strategy I ran into this error message:&#xD;&#xA;```&#xD;&#xA;error[E0423]: expected value, found struct `crate::Pallet`&#xD;&#xA;   --&gt; frame/evm-precompile/src/mock.rs:136:45&#xD;&#xA;    |&#xD;&#xA;136 |     pub MockPrecompiles: crate::Pallet&lt;Test&gt; = crate::Pallet::&lt;Test&gt;;&#xD;&#xA;    |                                                ^^^^^^^^^^^^^^^^^^^^^ constructor is not visible here due to private fields&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;what is the appropriate Rust syntax to set `PrecompilesValue` in this Runtime configuration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29854" PostHistoryTypeId="1" PostId="7579" RevisionGUID="d8228658-1fa5-4e5a-852a-87f0e26ac931" CreationDate="2023-03-12T22:22:03.173" UserId="494" Text="How to implement the `Get` trait for a `Pallet&lt;T&gt;`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29855" PostHistoryTypeId="3" PostId="7579" RevisionGUID="d8228658-1fa5-4e5a-852a-87f0e26ac931" CreationDate="2023-03-12T22:22:03.173" UserId="494" Text="|frame|frontier|evm|traits|generics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29856" PostHistoryTypeId="5" PostId="7579" RevisionGUID="6ad61664-2631-4056-90ed-622779c1bc2e" CreationDate="2023-03-12T22:33:43.133" UserId="494" Comment="deleted 15 characters in body" Text="I'm writing a pallet that implements [`evm::executor::stack::PrecompileSet`](https://docs.rs/evm/0.37.0/evm/executor/stack/trait.PrecompileSet.html).&#xD;&#xA;&#xD;&#xA;The goal is to use this pallet in conjunction with Frontier's `pallet-evm`, [which has the following types in its `Config` trait](https://github.com/paritytech/frontier/blob/58c568964dc32dd96153b7d113ac2df58d27de2b/frame/evm/src/lib.rs#LL138C8-L138C21):&#xD;&#xA;```&#xD;&#xA;type PrecompilesType: PrecompileSet;&#xD;&#xA;type PrecompilesValue: Get&lt;Self::PrecompilesType&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While writing a mock environment for unit testing the pallet I'm writing, I'm struggling to make the compiler happy for `PrecompilesValue`:&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	...&#xD;&#xA;	pub MockPrecompiles: crate::Pallet&lt;Test&gt; = // ?&#xD;&#xA;}&#xD;&#xA;impl pallet_evm::Config for Test {&#xD;&#xA;	...&#xD;&#xA;	type PrecompilesType = crate::Pallet&lt;Test&gt;;&#xD;&#xA;	type PrecompilesValue = MockPrecompiles;&#xD;&#xA;	...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;It seems non-trivial to use the `parameter_types!` macro to get an appropriate `impl&lt;T: Config&gt; Get&lt;T&gt; for Pallet&lt;T&gt;`. With a blind trial-and-error strategy I ran into this error message:&#xD;&#xA;```&#xD;&#xA;error[E0423]: cannot initialize a tuple struct which contains private fields&#xD;&#xA;   --&gt; frame/evm-precompile/src/mock.rs:136:45&#xD;&#xA;    |&#xD;&#xA;136 |     pub MockPrecompiles: crate::Pallet&lt;Test&gt; = crate::Pallet(PhantomData::&lt;Test&gt;);&#xD;&#xA;    |                                                ^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;what is the appropriate Rust syntax to set `MockPrecompiles`/`PrecompilesValue` in this Runtime configuration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29857" PostHistoryTypeId="2" PostId="7580" RevisionGUID="f1526364-6ea2-4836-b312-bd8a43dea4aa" CreationDate="2023-03-12T22:51:10.283" UserId="83" Text="At the moment building the Substrate repository requires RocksDB library librocksdb-sys and all its native dependencies to be pulled in, but it also supports testing out the _&quot;faster and more efficient&quot;_ &quot;experimental&quot; embedded [ParityDB](https://github.com/paritytech/parity-db) using the `--database paritydb` flag, which is also a persistent KV store that uses [OS page cache instead of custom data caching](https://github.com/paritytech/parity-db#no-cache), with interesting [RAM](https://github.com/paritytech/substrate/issues/11513) performance when syncing. However [validator documentation](https://wiki.polkadot.network/docs/build-node-management) still recommends using the RocksDB backend.&#xD;&#xA;&#xD;&#xA;Meanwhile in this [issue](https://github.com/paritytech/substrate/issues/13177) @bkchr mentioned that whilst Substrate compiles on aarch64 there isn't official support for aarch64-linux-android on Android, but @koute and also @gilescope in this [issue](https://github.com/paritytech/substrate/issues/13354) suggested adding a feature flag to the Substrate CLI so building with RocksDB could be optionally disabled because some restless users want to test Substrate on their mobile devices.&#xD;&#xA;&#xD;&#xA;I understand that RocksDB is a Key-Value (KV) database by Facebook and @debris has previously mentioned that it is faster than Google's LevelDB. I also read that at some stage Parity migrated to using [blooms-db](https://github.com/debris/blooms-db) (an implementation of a Bloom Filter to reduce overall disk reads), where the blooms are a database layer before the kvdb RocksDB. The [Substrate documentation](https://docs.substrate.io/fundamentals/state-transitions-and-storage/) explains the different trie layers of abstraction.&#xD;&#xA;&#xD;&#xA;In various Cargo.toml files of the Substrate repository, there are dependencies like:&#xD;&#xA;```&#xD;&#xA;kvdb&#xD;&#xA;kvdb-rocksdb&#xD;&#xA;kvdb-memorydb&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Previously in an earlier version [kvdb = &quot;0.1.0&quot;](https://docs.rs/kvdb/0.1.0) it was a _&quot;Key-Value store abstraction with RocksDB backend&quot;_, rather than being _&quot;generic&quot;_. &#xD;&#xA;&#xD;&#xA;So when I was reviewing the benchmarking code [here](https://github.com/paritytech/substrate/blob/master/bin/node/bench/src/generator.rs#L32) where they generate a trie using the db type `kvdb::KeyValueDB` from the `kvdb` library, I wondered why we weren't benchmarking the generation of a trie with ParityDB too, and how could we use the kvdb Rust library with ParityDB as a key-value store abstraction, or what was the equivalent library that was being used by ParityDB?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29859" PostHistoryTypeId="1" PostId="7580" RevisionGUID="f1526364-6ea2-4836-b312-bd8a43dea4aa" CreationDate="2023-03-12T22:51:10.283" UserId="83" Text="How are we now able to use the kvdb Rust library with ParityDB as a key-value store abstraction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29860" PostHistoryTypeId="3" PostId="7580" RevisionGUID="f1526364-6ea2-4836-b312-bd8a43dea4aa" CreationDate="2023-03-12T22:51:10.283" UserId="83" Text="|rocks-db|parity-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29861" PostHistoryTypeId="2" PostId="7581" RevisionGUID="98519a44-29c1-4a75-87b1-05fdbc1fc557" CreationDate="2023-03-12T22:51:10.283" UserId="83" Text=" &#xD;&#xA;In the benchmarking code [here](https://github.com/paritytech/substrate/blob/master/bin/node/bench/src/generator.rs#L32) they generate a trie using the db type `kvdb::KeyValueDB` from the [kvdb = &quot;0.13.0&quot;](https://docs.rs/kvdb/0.13.0) library, which is now a _&quot;Generic key-value trait&quot;_. Initially I was confused because in an earlier version [kvdb = &quot;0.1.0&quot;](https://docs.rs/kvdb/0.1.0) it was a _&quot;Key-Value store abstraction with RocksDB backend&quot;_, but it appears substantial work has been performed by Parity to makes that abstraction _generic_ so the trait [`KeyValueDB`](https://docs.rs/kvdb/0.13.0/kvdb/trait.KeyValueDB.html) that is a _&quot;Generic key-value database&quot;_ may be used by ParityDB or RocksDB.&#xD;&#xA;&#xD;&#xA;Upon closer inspection of that benchmarking code [here](https://github.com/paritytech/substrate/blob/master/bin/node/bench/src/generator.rs#L32) where they generate a trie using the db type `kvdb::KeyValueDB`, I noticed in the Cargo.toml file that we were now using version of [kvdb = &quot;0.13.0&quot;](https://docs.rs/kvdb/0.13.0) which is now a _&quot;Generic key-value trait&quot;_, whereas in an earlier version of [kvdb = &quot;0.1.0&quot;](https://docs.rs/kvdb/0.1.0) it was a _&quot;Key-Value store abstraction with RocksDB backend&quot;_. So it appears substantial work has been performed by Parity to make that abstraction _generic_ so that the trait [`KeyValueDB`](https://docs.rs/kvdb/0.13.0/kvdb/trait.KeyValueDB.html) is a _&quot;Generic key-value database&quot;_ that may be used by ParityDB's embedded in-memory `kvdb-memorydb = &quot;0.13.0&quot;` library or RocksDB's `kvdb-rocksdb = &quot;0.17.0&quot;` library." ContentLicense="CC BY-SA 4.0" />
  <row Id="29864" PostHistoryTypeId="5" PostId="7579" RevisionGUID="abf34e06-3701-4dfb-863c-0f18ca0023f8" CreationDate="2023-03-12T22:56:58.203" UserId="494" Comment="deleted 21 characters in body" Text="I'm writing a pallet that implements [`evm::executor::stack::PrecompileSet`](https://docs.rs/evm/0.37.0/evm/executor/stack/trait.PrecompileSet.html).&#xD;&#xA;&#xD;&#xA;The goal is to use this pallet in conjunction with Frontier's `pallet-evm`, [which has the following types in its `Config` trait](https://github.com/paritytech/frontier/blob/58c568964dc32dd96153b7d113ac2df58d27de2b/frame/evm/src/lib.rs#LL138C8-L138C21):&#xD;&#xA;```&#xD;&#xA;type PrecompilesType: PrecompileSet;&#xD;&#xA;type PrecompilesValue: Get&lt;Self::PrecompilesType&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While writing a mock environment for unit testing the pallet I'm writing, I'm struggling to make the compiler happy for `PrecompilesValue`:&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	...&#xD;&#xA;	pub MockPrecompiles: crate::Pallet&lt;Test&gt; = // ?&#xD;&#xA;}&#xD;&#xA;impl pallet_evm::Config for Test {&#xD;&#xA;	...&#xD;&#xA;	type PrecompilesType = crate::Pallet&lt;Test&gt;;&#xD;&#xA;	type PrecompilesValue = MockPrecompiles;&#xD;&#xA;	...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;It seems non-trivial to use the `parameter_types!` macro to get an appropriate `impl&lt;T: Config&gt; Get&lt;T&gt; for Pallet&lt;T&gt;`. With a blind trial-and-error strategy I ran into this error message:&#xD;&#xA;```&#xD;&#xA;error[E0423]: cannot initialize a tuple struct which contains private fields&#xD;&#xA;   --&gt; frame/evm-precompile/src/mock.rs:136:45&#xD;&#xA;    |&#xD;&#xA;136 |     pub MockPrecompiles: crate::Pallet&lt;Test&gt; = crate::Pallet(PhantomData::&lt;Test&gt;);&#xD;&#xA;    |                                                ^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;is it possible to set `MockPrecompiles`/`PrecompilesValue` in this Runtime configuration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29865" PostHistoryTypeId="2" PostId="7582" RevisionGUID="9f54534c-dd6c-4141-9020-7bc417dc6e2f" CreationDate="2023-03-12T23:07:33.720" UserId="83" Text="After further investigation in [this question and answer](https://substrate.stackexchange.com/questions/7580/how-are-we-now-able-to-use-the-kvdb-rust-library-with-paritydb-as-a-key-value-st/7581#7581), I discovered that both RocksDB and ParityDB are both persistent key-value (KV) stores, but that ParityDB uses &quot;OS page cache&quot; instead of &quot;custom data caching&quot;, where it states in the [Substrate Documentation here](https://docs.substrate.io/fundamentals/state-transitions-and-storage/) that they use key-value cache because _&quot;accessing trie data is costly&quot;_. In the ParityDB README [here](https://github.com/paritytech/parity-db#no-cache) it states that the ParityDB _&quot;Database does not implement any custom data caching. Instead, it relies on OS page cache. Performance of a large database therefore depends on how much system memory is available to be used in OS page cache.&quot;_" ContentLicense="CC BY-SA 4.0" />
  <row Id="29867" PostHistoryTypeId="5" PostId="7580" RevisionGUID="841e8a2c-a677-4976-8b5e-d58333ce2a97" CreationDate="2023-03-12T23:11:18.843" UserId="83" Comment="mention parity-db library" Text="At the moment building the Substrate repository requires RocksDB library librocksdb-sys and all its native dependencies to be pulled in, but it also supports testing out the _&quot;faster and more efficient&quot;_ &quot;experimental&quot; embedded [ParityDB](https://github.com/paritytech/parity-db) using the `--database paritydb` flag, which is also a persistent KV store that uses [OS page cache instead of custom data caching](https://github.com/paritytech/parity-db#no-cache), with interesting [RAM](https://github.com/paritytech/substrate/issues/11513) performance when syncing. However [validator documentation](https://wiki.polkadot.network/docs/build-node-management) still recommends using the RocksDB backend.&#xD;&#xA;&#xD;&#xA;Meanwhile in this [issue](https://github.com/paritytech/substrate/issues/13177) @bkchr mentioned that whilst Substrate compiles on aarch64 there isn't official support for aarch64-linux-android on Android, but @koute and also @gilescope in this [issue](https://github.com/paritytech/substrate/issues/13354) suggested adding a feature flag to the Substrate CLI so building with RocksDB could be optionally disabled because some restless users want to test Substrate on their mobile devices.&#xD;&#xA;&#xD;&#xA;I understand that RocksDB is a Key-Value (KV) database by Facebook and @debris has previously mentioned that it is faster than Google's LevelDB. I also read that at some stage Parity migrated to using [blooms-db](https://github.com/debris/blooms-db) (an implementation of a Bloom Filter to reduce overall disk reads), where the blooms are a database layer before the kvdb RocksDB. The [Substrate documentation](https://docs.substrate.io/fundamentals/state-transitions-and-storage/) explains the different trie layers of abstraction.&#xD;&#xA;&#xD;&#xA;In various Cargo.toml files of the Substrate repository, there are dependencies like:&#xD;&#xA;```&#xD;&#xA;kvdb&#xD;&#xA;kvdb-rocksdb&#xD;&#xA;kvdb-memorydb&#xD;&#xA;parity-db&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Previously in an earlier version [kvdb = &quot;0.1.0&quot;](https://docs.rs/kvdb/0.1.0) it was a _&quot;Key-Value store abstraction with RocksDB backend&quot;_, rather than being _&quot;generic&quot;_. &#xD;&#xA;&#xD;&#xA;So when I was reviewing the benchmarking code [here](https://github.com/paritytech/substrate/blob/master/bin/node/bench/src/generator.rs#L32) where they generate a trie using the db type `kvdb::KeyValueDB` from the `kvdb` library, I wondered why we weren't benchmarking the generation of a trie with ParityDB too, and how could we use the kvdb Rust library with ParityDB as a key-value store abstraction, or what was the equivalent library that was being used by ParityDB?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29868" PostHistoryTypeId="2" PostId="7583" RevisionGUID="caed0a33-7bad-4449-9a17-19af1aab0390" CreationDate="2023-03-13T05:18:23.853" UserId="3953" Text="GM, I installed the dependencies for WSL mentioned in the docs, but I am unable to compile the template node. Any tips? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;zach@DESKTOP-P2G1H4R:~/substrate/substrate-node-template$ cargo build --package node-template --release&#xD;&#xA;   Compiling wasm-opt-sys v0.111.0&#xD;&#xA;   Compiling librocksdb-sys v0.8.3+7.4.4&#xD;&#xA;The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;warning: c++: fatal error: Killed signal terminated program cc1plus&#xD;&#xA;warning: compilation terminated.&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for `wasm-opt-sys v0.111.0`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-9ea94ca4aad9a4e6/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu&#xD;&#xA;  CXX_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu&#xD;&#xA;  CXX_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXX&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX&#xD;&#xA;  CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CXXFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CXXFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXXFLAGS&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  cargo:CXXBRIDGE_PREFIX=wasm-opt-sys&#xD;&#xA;  cargo:CXXBRIDGE_LINKS=binaryen&#xD;&#xA;  cargo:CXXBRIDGE_DIR0=/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out/cxxbridge/include&#xD;&#xA;  cargo:CXXBRIDGE_DIR1=/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out/cxxbridge/crate&#xD;&#xA;  cargo:CXXBRIDGE_DIR2=/home/zach/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.111.0/binaryen/src&#xD;&#xA;  cargo:CXXBRIDGE_DIR3=/home/zach/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.111.0/binaryen/src/tools&#xD;&#xA;  cargo:CXXBRIDGE_DIR4=/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  OPT_LEVEL = Some(&quot;0&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu&#xD;&#xA;  CXX_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu&#xD;&#xA;  CXX_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXX&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX&#xD;&#xA;  CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CXXFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CXXFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXXFLAGS&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  running: &quot;c++&quot; &quot;-O0&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out/cxxbridge/include&quot; &quot;-I&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out/cxxbridge/crate&quot; &quot;-I&quot; &quot;/home/zach/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.111.0/binaryen/src&quot; &quot;-I&quot; &quot;/home/zach/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.111.0/binaryen/src/tools&quot; &quot;-I&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wno-unused-parameter&quot; &quot;-DTHROW_ON_FATAL&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/wasm-opt-sys-89f52395fdb4b223/out/1b6f66997aeb10ce-parsing.o&quot; &quot;-c&quot; &quot;/home/zach/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.111.0/binaryen/src/wasm/parsing.cpp&quot;&#xD;&#xA;  &#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;warning: c++: fatal error: Killed signal terminated program cc1plus&#xD;&#xA;warning: compilation terminated.&#xD;&#xA;warning: c++: fatal error: Killed signal terminated program cc1plus&#xD;&#xA;warning: compilation terminated.&#xD;&#xA;warning: c++: fatal error: Killed signal terminated program cc1plus&#xD;&#xA;warning: compilation terminated.&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for `librocksdb-sys v0.8.3+7.4.4`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-3172205394e5ba33/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  cargo:rerun-if-changed=rocksdb/&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu&#xD;&#xA;  CXX_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu&#xD;&#xA;  CXX_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXX&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX&#xD;&#xA;  CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CXXFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CXXFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXXFLAGS&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu&#xD;&#xA;  CXX_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu&#xD;&#xA;  CXX_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXX&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX&#xD;&#xA;  CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CXXFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CXXFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXXFLAGS&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu&#xD;&#xA;  CXX_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu&#xD;&#xA;  CXX_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXX&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX&#xD;&#xA;  CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CXXFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CXXFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXXFLAGS&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/cache_entry_roles.o&quot; &quot;-c&quot; &quot;rocksdb/cache/cache_entry_roles.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/cache.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/cache_key.o&quot; &quot;-c&quot; &quot;rocksdb/cache/cache_key.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/cache_reservation_manager.o&quot; &quot;-c&quot; &quot;rocksdb/cache/cache_reservation_manager.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/clock_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/clock_cache.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/fast_lru_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/fast_lru_cache.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/lru_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/lru_cache.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/compressed_secondary_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/compressed_secondary_cache.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/cache/sharded_cache.o&quot; &quot;-c&quot; &quot;rocksdb/cache/sharded_cache.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/arena_wrapped_db_iter.o&quot; &quot;-c&quot; &quot;rocksdb/db/arena_wrapped_db_iter.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_fetcher.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_fetcher.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_file_addition.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_addition.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_file_builder.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_builder.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_file_garbage.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_garbage.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_file_meta.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_meta.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_file_reader.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_file_reader.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_garbage_meter.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_garbage_meter.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_log_format.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_log_format.cc&quot;&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_log_sequential_reader.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_log_sequential_reader.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_log_writer.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_log_writer.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/blob/blob_source.o&quot; &quot;-c&quot; &quot;rocksdb/db/blob/blob_source.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/db_impl/compacted_db_impl.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_impl/compacted_db_impl.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/db_impl/db_impl.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_impl/db_impl.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;  running: &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/experimental.o&quot; &quot;-c&quot; &quot;rocksdb/db/experimental.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  cargo:warning=c++: fatal error: Killed signal terminated program cc1plus&#xD;&#xA;  cargo:warning=compilation terminated.&#xD;&#xA;  exit status: 1&#xD;&#xA;  cargo:warning=c++: fatal error: Killed signal terminated program cc1plus&#xD;&#xA;  cargo:warning=compilation terminated.&#xD;&#xA;  exit status: 1&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;  exit status: 0&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  error occurred: Command &quot;c++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;rocksdb/include/&quot; &quot;-I&quot; &quot;rocksdb/&quot; &quot;-I&quot; &quot;rocksdb/third-party/gtest-1.8.1/fused-src/&quot; &quot;-I&quot; &quot;snappy/&quot; &quot;-I&quot; &quot;.&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wsign-compare&quot; &quot;-Wshadow&quot; &quot;-Wno-unused-parameter&quot; &quot;-Wno-unused-variable&quot; &quot;-Woverloaded-virtual&quot; &quot;-Wnon-virtual-dtor&quot; &quot;-Wno-missing-field-initializers&quot; &quot;-Wno-strict-aliasing&quot; &quot;-Wno-invalid-offsetof&quot; &quot;-msse2&quot; &quot;-std=c++17&quot; &quot;-DSNAPPY=1&quot; &quot;-DNDEBUG=1&quot; &quot;-DOS_LINUX&quot; &quot;-DROCKSDB_PLATFORM_POSIX&quot; &quot;-DROCKSDB_LIB_IO_POSIX&quot; &quot;-DROCKSDB_SUPPORT_THREAD_LOCAL&quot; &quot;-DWITH_JEMALLOC=ON&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-DHAVE_UINT128_EXTENSION=1&quot; &quot;-o&quot; &quot;/home/zach/substrate/substrate-node-template/target/release/build/librocksdb-sys-f6edf3e5ee3dd7ff/out/rocksdb/db/db_impl/db_impl_experimental.o&quot; &quot;-c&quot; &quot;rocksdb/db/db_impl/db_impl_experimental.cc&quot; with args &quot;c++&quot; did not execute successfully (status code exit status: 1).&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29870" PostHistoryTypeId="1" PostId="7583" RevisionGUID="caed0a33-7bad-4449-9a17-19af1aab0390" CreationDate="2023-03-13T05:18:23.853" UserId="3953" Text="WSL - Substrate Node Template Compilation Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="29871" PostHistoryTypeId="3" PostId="7583" RevisionGUID="caed0a33-7bad-4449-9a17-19af1aab0390" CreationDate="2023-03-13T05:18:23.853" UserId="3953" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29872" PostHistoryTypeId="2" PostId="7584" RevisionGUID="714a3fab-c781-4433-b20e-c3fedbe592c1" CreationDate="2023-03-13T05:51:44.813" UserId="251" Text="Increase your swap space or give more mem to the WSL.&#xD;&#xA;&#xD;&#xA;WSL will use half of your physical memory by default.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, check:&#xD;&#xA;&#xD;&#xA;https://superuser.com/questions/1707758/wsl-2-does-not-have-all-memory-available-to-it" ContentLicense="CC BY-SA 4.0" />
  <row Id="29874" PostHistoryTypeId="6" PostId="7583" RevisionGUID="a4ebc1f0-e26b-4ca6-b96b-3f7c41523561" CreationDate="2023-03-13T05:52:01.453" UserId="251" Comment="edited tags" Text="|substrate-node-template|wsl|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29875" PostHistoryTypeId="5" PostId="7584" RevisionGUID="55527ec6-c46a-4388-8e46-450dedf92425" CreationDate="2023-03-13T06:16:36.367" UserId="251" Comment="added 142 characters in body" Text="Increase your swap space or give more memory to the WSL.&#xD;&#xA;&#xD;&#xA;WSL will use half of your physical memory by default.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, check:&#xD;&#xA;&#xD;&#xA;https://superuser.com/questions/1707758/wsl-2-does-not-have-all-memory-available-to-it&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Just a tip:&#xD;&#xA;&#xD;&#xA;When I run `cargo test --workspace --all-features` under the substrate repo. It took around 100g ram on my computer." ContentLicense="CC BY-SA 4.0" />
  <row Id="29876" PostHistoryTypeId="5" PostId="7573" RevisionGUID="57895678-a816-441d-8261-caa74ce3f4c4" CreationDate="2023-03-13T06:44:19.867" UserId="227" Comment="added 44 characters in body" Text="For ink!, the term Gas refers to the resources used by a contract call. It's important for smart contracts that the caller has to pay for any utilized resource. Those resources can be either storage space (for storing something in the contract's storage) or computational time (for executing the contract and its logic). The term Gas encompasses both of these resources: `Gas = (refTime, proofSize)`.&#xD;&#xA;&#xD;&#xA;The terms hereby refer to:&#xD;&#xA;&#xD;&#xA;`refTime`: The amount of computational time that can be used for execution, in picoseconds.&#xD;&#xA;&#xD;&#xA;`proofSize`: Th amount of storage space that can be used, in bytes.&#xD;&#xA;&#xD;&#xA;`refTime` comes from &quot;reference time&quot;, referring to Substrate's Weights system, where computation time is benchmarked on reference hardware. You can read more details [here](https://docs.substrate.io/reference/how-to-guides/weights/).&#xD;&#xA;&#xD;&#xA;For ink!, Gas is a synonym to &quot;Weight&quot;, we just use this term to make onboarding easier for devs from other smart contract ecosystems. So `Gas = Weight = (refTime, proofSize)`.&#xD;&#xA;&#xD;&#xA;Specifically, these terms come from Substrate's Weights V2 system, which was recently introduced." ContentLicense="CC BY-SA 4.0" />
  <row Id="29877" PostHistoryTypeId="2" PostId="7585" RevisionGUID="b57c44a1-e6c8-4b4a-a14a-786bfa08d8b4" CreationDate="2023-03-13T08:25:42.273" UserId="3946" Text="I'm trying to rebuild part of my database thanks to events and extrinsics, i managed to get it partly all , but i'm stuck with this one :&#xD;&#xA;&#xD;&#xA;How to know on which validator a nominator was ?&#xD;&#xA;I tried to look to events but, apart the rewards amount, nothing point to which validator he was on, i tried  to look in extrinsics, i found the payoutStakers but it doesn't give me the information too.&#xD;&#xA;&#xD;&#xA;My guess was, to be able to look for a transaction to the nominator from the validator stash address from where he was rewarded...&#xD;&#xA;&#xD;&#xA;Does it seems logic ? Or anyone would have another idea ?&#xD;&#xA;&#xD;&#xA;Thanks a lot and have a good day !" ContentLicense="CC BY-SA 4.0" />
  <row Id="29879" PostHistoryTypeId="1" PostId="7585" RevisionGUID="b57c44a1-e6c8-4b4a-a14a-786bfa08d8b4" CreationDate="2023-03-13T08:25:42.273" UserId="3946" Text="How getting on which validator a specific nominator was before the historyDepth?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29880" PostHistoryTypeId="3" PostId="7585" RevisionGUID="b57c44a1-e6c8-4b4a-a14a-786bfa08d8b4" CreationDate="2023-03-13T08:25:42.273" UserId="3946" Text="|polkadot|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29881" PostHistoryTypeId="2" PostId="7586" RevisionGUID="f5e6ce2b-2406-4e92-a0e1-a2b6f4489113" CreationDate="2023-03-13T08:46:03.937" UserId="251" Text="You could specify the `at` param. You can query the state of a specific block height. You can get the storage data at any timepoint.&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/docs/substrate/rpc#getstoragekey-storagekey-at-blockhash-storagedata&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6njSl.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6iw4v.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29883" PostHistoryTypeId="2" PostId="7587" RevisionGUID="4391436f-02a3-4fae-9740-00a66d1dd457" CreationDate="2023-03-13T08:52:36.507" UserId="251" Text="Your question makes me confused.&#xD;&#xA;&#xD;&#xA;But to your title.&#xD;&#xA;&#xD;&#xA;You could simply do this:&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia/blob/61c6de47e5ef11e1842d1d35476bfb699ef2cd58/pallet/deposit/src/lib.rs#L387-L400&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia/blob/61c6de47e5ef11e1842d1d35476bfb699ef2cd58/runtime/darwinia/src/pallets/staking.rs#L76&#xD;&#xA;&#xD;&#xA;I implement the `Stake` for `darwinia_deposit::Pallet&lt;T&gt;` and pass it to the other pallet's configuration as a param. And you can simply replace the `Stake` with `Get`." ContentLicense="CC BY-SA 4.0" />
  <row Id="29885" PostHistoryTypeId="5" PostId="7587" RevisionGUID="1f76f09a-d99f-4e63-8b61-9b919a54184c" CreationDate="2023-03-13T08:58:09.300" UserId="251" Comment="added 9 characters in body" Text="Your question makes me confused.&#xD;&#xA;&#xD;&#xA;But to your question title.&#xD;&#xA;&#xD;&#xA;You could simply do this:&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia/blob/61c6de47e5ef11e1842d1d35476bfb699ef2cd58/pallet/deposit/src/lib.rs#L387-L400&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia/blob/61c6de47e5ef11e1842d1d35476bfb699ef2cd58/runtime/darwinia/src/pallets/staking.rs#L76&#xD;&#xA;&#xD;&#xA;I implement the `Stake` for `darwinia_deposit::Pallet&lt;T&gt;` and pass it to the other pallet's configuration as a param. And you can simply replace the `Stake` with `Get`." ContentLicense="CC BY-SA 4.0" />
  <row Id="29886" PostHistoryTypeId="2" PostId="7588" RevisionGUID="d6cc0af8-f23e-4095-a8b3-d78c7e950faa" CreationDate="2023-03-13T09:59:31.233" UserId="1842" Text="Parathreads are not yet live, but the work has started: https://forum.polkadot.network/t/on-demand-parachains/2208" ContentLicense="CC BY-SA 4.0" />
  <row Id="29888" PostHistoryTypeId="2" PostId="7589" RevisionGUID="76cc71d9-7c0b-49fb-a052-0af0ba03f363" CreationDate="2023-03-13T10:18:53.217" UserId="3886" Text="I am using susbstrate `node-template`,  I am trying to create my own native token `d-coin` with `xxxxx` amount of total supply, I am using auro consensus, I was able to add some properties to genesis state, below is code, which is working fine, but I am looking set `total supply` and `transaction fees`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn properties() -&gt; Properties {&#xD;&#xA;	let mut properties = Properties::new();&#xD;&#xA;	properties.insert(&quot;ss58Format&quot;.into(), x.into());&#xD;&#xA;	properties.insert(&quot;tokenSymbol&quot;.into(), &quot;D&quot;.into());&#xD;&#xA;	properties.insert(&quot;tokenDecimals&quot;.into(), &quot;xx&quot;.into());&#xD;&#xA;	properties.insert(&quot;totalSupply&quot;.into(), &quot;xxxxxxxxx&quot;.into());&#xD;&#xA;	properties&#xD;&#xA;}&#xD;&#xA;``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="29890" PostHistoryTypeId="1" PostId="7589" RevisionGUID="76cc71d9-7c0b-49fb-a052-0af0ba03f363" CreationDate="2023-03-13T10:18:53.217" UserId="3886" Text="Node-template how to add `TOTAL_ISSUANCE` with some accounts" ContentLicense="CC BY-SA 4.0" />
  <row Id="29891" PostHistoryTypeId="3" PostId="7589" RevisionGUID="76cc71d9-7c0b-49fb-a052-0af0ba03f363" CreationDate="2023-03-13T10:18:53.217" UserId="3886" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29892" PostHistoryTypeId="4" PostId="7589" RevisionGUID="ef2a0d4b-7e94-4a97-9f1f-b16ecf2692d8" CreationDate="2023-03-13T10:53:32.410" UserId="3886" Comment="edited title" Text="substrate node-template how to add `total_insuance` with some accounts initial supply" ContentLicense="CC BY-SA 4.0" />
  <row Id="29893" PostHistoryTypeId="2" PostId="7590" RevisionGUID="127dd022-9b6e-45cd-b9bd-ddb4ae77b6cb" CreationDate="2023-03-13T13:02:14.170" UserId="445" Text="As my understanding, you can't configure `totalSupply` `Properties` in Substrate. &#xD;&#xA;&#xD;&#xA;Substrate has no limit on the total supply of the native token.&#xD;&#xA;&#xD;&#xA;It would be helpful if someone could confirm whether I am correct or not." ContentLicense="CC BY-SA 4.0" />
  <row Id="29895" PostHistoryTypeId="52" PostId="7583" RevisionGUID="e1e9a294-131b-4183-bd44-658860ded85d" CreationDate="2023-03-13T13:21:03.953" />
  <row Id="29896" PostHistoryTypeId="2" PostId="7591" RevisionGUID="98df2b0d-4b53-4d57-920e-3c2b83ce69cc" CreationDate="2023-03-13T13:42:35.210" UserId="3317" Text="Considering that you are using the `pallet_balances` your answer is given [here][1]. In your case you could do a check when you give AURA rewards to see if you reached your defined max supply (if it is the only way that increases the total circulating supply).&#xD;&#xA;&#xD;&#xA;As for transaction fees you should look into `pallet_transaction_payment`, see [here][2] how the default is implemented in the node-template. Moreover, have a look at the [seminar: 6 ways to launch a token][3] for some additional info.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3717/how-does-a-substrate-chain-set-the-max-total-supply&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/f5c2cecd7efe6dcbc828906794f3c4c41f23c791/bin/node-template/runtime/src/lib.rs#L252-L259&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=7qkqEfToH8w" ContentLicense="CC BY-SA 4.0" />
  <row Id="29898" PostHistoryTypeId="5" PostId="7591" RevisionGUID="82f75d93-13dc-4115-9383-30fc91709301" CreationDate="2023-03-13T13:56:03.397" UserId="3317" Comment="added 33 characters in body" Text="Considering that you are using the `pallet_balances` your answer is given [here][1]. In your case you could do a check when you give AURA rewards to see if you reached your defined max supply (if it is the only way that increases the total circulating supply).&#xD;&#xA;&#xD;&#xA;As for transaction fees you should look into `pallet_transaction_payment`, see [here][2] how the default is implemented in the node-template. &#xD;&#xA;&#xD;&#xA;For both cases, have a look at the [seminar: 6 ways to launch a token][3] it provides the information you are looking for.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3717/how-does-a-substrate-chain-set-the-max-total-supply&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/f5c2cecd7efe6dcbc828906794f3c4c41f23c791/bin/node-template/runtime/src/lib.rs#L252-L259&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=7qkqEfToH8w" ContentLicense="CC BY-SA 4.0" />
  <row Id="29899" PostHistoryTypeId="5" PostId="7591" RevisionGUID="c351c865-6752-4ef1-9fc4-d42abff1cedd" CreationDate="2023-03-13T14:30:11.970" UserId="3317" Comment="deleted 135 characters in body" Text="Considering that you are using the `pallet_balances` your answer is given [here][1]. Have a look at the [seminar: 6 ways to launch a token][3] it provides information you are probably interested in.&#xD;&#xA;&#xD;&#xA;As for transaction fees you should look into `pallet_transaction_payment`, see [here][2] how the default is implemented in the node-template. The seminar provides information about this as well. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3717/how-does-a-substrate-chain-set-the-max-total-supply&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/f5c2cecd7efe6dcbc828906794f3c4c41f23c791/bin/node-template/runtime/src/lib.rs#L252-L259&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=7qkqEfToH8w" ContentLicense="CC BY-SA 4.0" />
  <row Id="29900" PostHistoryTypeId="2" PostId="7592" RevisionGUID="ca072cb7-e1fa-4541-b613-07ad4981f945" CreationDate="2023-03-13T15:20:21.287" UserId="162" Text="I want to find a way to check whether the parachain's genesis file/WASM can be changed after getting the slot but before creating the first block by the users who registered the parachain. Is that possible? &#xD;&#xA;&#xD;&#xA;I discovered that two extrinsic, forceSetcurrentCode and forceSetCurrentHead, can be used, but you have to send them by the sudo user, not the user who registered parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="29904" PostHistoryTypeId="1" PostId="7592" RevisionGUID="ca072cb7-e1fa-4541-b613-07ad4981f945" CreationDate="2023-03-13T15:20:21.287" UserId="162" Text="Modify the Genesis file/WASM after getting the slot but before the parachain creates the block" ContentLicense="CC BY-SA 4.0" />
  <row Id="29907" PostHistoryTypeId="3" PostId="7592" RevisionGUID="ca072cb7-e1fa-4541-b613-07ad4981f945" CreationDate="2023-03-13T15:20:21.287" UserId="162" Text="|parachain|wasm|genesis|slot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29909" PostHistoryTypeId="2" PostId="7594" RevisionGUID="d2a8f178-0825-4eaf-89d7-19712be0d2fa" CreationDate="2023-03-13T16:21:23.403" UserId="3946" Text="I found in this stackexchange that in order to get the new validator list elected, we should look at electionsPhragmen &gt; Members after the StakersElected event has been fired.&#xD;&#xA;&#xD;&#xA;However, i don't understand why i'm only seeing 7 validators instead of 21 (which is the current number of validators on my blockchain (ternoa)).&#xD;&#xA;&#xD;&#xA;Am i missing something ?&#xD;&#xA;&#xD;&#xA;Thanks a lot !" ContentLicense="CC BY-SA 4.0" />
  <row Id="29911" PostHistoryTypeId="1" PostId="7594" RevisionGUID="d2a8f178-0825-4eaf-89d7-19712be0d2fa" CreationDate="2023-03-13T16:21:23.403" UserId="3946" Text="Why does electionsPhragmen &gt; Members doesn't show me the entire validators list?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29912" PostHistoryTypeId="3" PostId="7594" RevisionGUID="d2a8f178-0825-4eaf-89d7-19712be0d2fa" CreationDate="2023-03-13T16:21:23.403" UserId="3946" Text="|pallet-election-phragmen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29913" PostHistoryTypeId="2" PostId="7595" RevisionGUID="121e6f8d-efc5-447a-8699-ca0689497d45" CreationDate="2023-03-13T16:49:24.763" UserId="162" Text="For curiosity, if one organization wins the slot in the parachain auction, can it transfer the slot to another parachain? Or if I deregister the parachain, is the slot also released?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29915" PostHistoryTypeId="1" PostId="7595" RevisionGUID="121e6f8d-efc5-447a-8699-ca0689497d45" CreationDate="2023-03-13T16:49:24.763" UserId="162" Text="Transfering the parachain slot to other parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="29916" PostHistoryTypeId="3" PostId="7595" RevisionGUID="121e6f8d-efc5-447a-8699-ca0689497d45" CreationDate="2023-03-13T16:49:24.763" UserId="162" Text="|parachain|auctions|slot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29917" PostHistoryTypeId="5" PostId="7594" RevisionGUID="9aa60b71-4a16-483e-8be3-1683bde151e3" CreationDate="2023-03-13T16:56:49.747" UserId="3946" Comment="deleted 283 characters in body" Text="Does anyone know how to retrieve validators elected for the new era ?&#xD;&#xA;&#xD;&#xA;Thanks a lot !" ContentLicense="CC BY-SA 4.0" />
  <row Id="29918" PostHistoryTypeId="4" PostId="7594" RevisionGUID="9aa60b71-4a16-483e-8be3-1683bde151e3" CreationDate="2023-03-13T16:56:49.747" UserId="3946" Comment="deleted 283 characters in body" Text="How to retrieve validators elected for a new Era?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29919" PostHistoryTypeId="2" PostId="7596" RevisionGUID="14f829e8-b864-4150-b76e-986361001cf1" CreationDate="2023-03-13T17:50:14.090" UserId="227" Text="&gt;Are there any backward incompatibility issues with ink! v3.4.0 or lower?&#xD;&#xA;&#xD;&#xA;The `pallet-contracts` will continue supporting already deployed contracts and you will still be able to deploy ink! contracts lower than 4.0.&#xD;&#xA;&#xD;&#xA;Since smart contracts are immutable execution environment (like `pallet-contracts` or EVM) will continue supporting already deployed ones.&#xD;&#xA;&#xD;&#xA;If you are asking in terms of compatibility of your ink! v3.x code with 4.0: there are a couple of changes we made to the API. It's easy to migrate your contract code from 3.x to 4.0 though and we've written this migration guide for it: https://use.ink/faq/migrating-from-ink-3-to-4/." ContentLicense="CC BY-SA 4.0" />
  <row Id="29921" PostHistoryTypeId="2" PostId="7597" RevisionGUID="e7f5fea3-7516-43cd-8d59-5bd0f1e2396c" CreationDate="2023-03-13T17:55:01.950" UserId="3140" Text="This is currently not possible. I raised this with the team not too long ago and will follow up on it. We need something like this.&#xD;&#xA;&#xD;&#xA;For anyone new to Multi-call: Multi-call is a way for a client application to bundle multiple calls to one or more contracts in a single request. The call is sent to a single proxy contract, which some good Samaritan has deployed for everyone to use, that then makes multiple calls to the contract addresses specified in the call. All of the calls are first resolved, then returned to the client.&#xD;&#xA;&#xD;&#xA;One of the big reasons this was implemented for EVM chains was to limit API calls and the costs associated on services like Infura. Prices are not as high in the Dotsama ecosystem, but this is still a concern. One temporary solution is to implement a Light Client and skip third parties calls.&#xD;&#xA;&#xD;&#xA;A second big reason for Multi-call is to avoid flicker in the UI. &#xD;&#xA;&#xD;&#xA;A third reason is to ensure data parity between blocks. A user must be sure that all data is fresh, from the same block, and therefore accurate. If you are using React you can use a `useEffect(() =&gt; {...}, [block]);` hook that updates on every new block." ContentLicense="CC BY-SA 4.0" />
  <row Id="29923" PostHistoryTypeId="5" PostId="7597" RevisionGUID="f7191596-ecb4-4d7b-8e6e-2995aa03674d" CreationDate="2023-03-13T18:09:47.747" UserId="3140" Comment="added 4 characters in body" Text="This is currently not possible. I raised this with the team not too long ago and will follow up on it. We need something like this.&#xD;&#xA;&#xD;&#xA;For anyone new to Multi-call: Multi-call is a way for a client application to bundle multiple calls to one or more contracts in a single request. The call is sent to a single proxy contract, which some good Samaritan has deployed for everyone to use, that then makes multiple calls to the contract addresses specified in the call. All of the calls are first resolved, then are returned to the client.&#xD;&#xA;&#xD;&#xA;One of the big reasons this was implemented for EVM chains was to limit API calls and the costs associated on services like Infura. Prices are not as high in the Dotsama ecosystem, but this is still a concern. One temporary solution is to implement a Light Client and skip third parties calls.&#xD;&#xA;&#xD;&#xA;A second big reason for Multi-call is to avoid flicker in the UI. &#xD;&#xA;&#xD;&#xA;A third reason is to ensure data parity between blocks. A user must be sure that all data is fresh, from the same block, and therefore accurate. If you are using React you can use a `useEffect(() =&gt; {...}, [block]);` hook that updates on every new block." ContentLicense="CC BY-SA 4.0" />
  <row Id="29924" PostHistoryTypeId="2" PostId="7598" RevisionGUID="78944735-5ec5-40ff-93e2-37d5d10edf97" CreationDate="2023-03-14T04:51:59.013" UserId="1959" Text="For question 1: &#xD;&#xA;&#xD;&#xA;&gt; If one organization wins the slot in the parachain auction, can it&#xD;&#xA;&gt; transfer the slot to another parachain?&#xD;&#xA;&#xD;&#xA;Yes, you can do it via `registrar.swap`, it's on relaychain, and most parachains renew their leases through it.&#xD;&#xA;&#xD;&#xA;For question 2:&#xD;&#xA;&gt; If I deregister the parachain, is the slot also released?&#xD;&#xA;&#xD;&#xA;Yes, it will free any data, and return any deposits made by the parachain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="29926" PostHistoryTypeId="2" PostId="7599" RevisionGUID="f127e921-6c29-4fe2-8640-c7f701dad7ca" CreationDate="2023-03-14T04:56:23.810" UserId="2372" Text="Actually i'm working on the parity-bridges-common but i'm not able to transfer any custom message to other than the same format that they have provided. &#xD;&#xA;&#xD;&#xA;./target/debug/substrate-relay send-message millau-to-rialto \&#xD;&#xA;	--source-host localhost \&#xD;&#xA;	--source-port $MILLAU_PORT \&#xD;&#xA;	--source-signer //Alice \&#xD;&#xA;	raw 020419ac&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can someone please guide me through this ?What is the raw 020419ac means? And how to edit it" ContentLicense="CC BY-SA 4.0" />
  <row Id="29928" PostHistoryTypeId="1" PostId="7599" RevisionGUID="f127e921-6c29-4fe2-8640-c7f701dad7ca" CreationDate="2023-03-14T04:56:23.810" UserId="2372" Text="How to send a custom Message or transfer the assets in parity-bridges-common?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29929" PostHistoryTypeId="3" PostId="7599" RevisionGUID="f127e921-6c29-4fe2-8640-c7f701dad7ca" CreationDate="2023-03-14T04:56:23.810" UserId="2372" Text="|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29930" PostHistoryTypeId="2" PostId="7600" RevisionGUID="e87f378c-b724-4d33-bfac-f807f25a62c3" CreationDate="2023-03-14T05:02:52.180" UserId="2372" Text="Whenever i sending one custom message provided by parity through this command &#xD;&#xA;&#xD;&#xA;./target/debug/substrate-relay send-message millau-to-rialto \&#xD;&#xA;	--source-host localhost \&#xD;&#xA;	--source-port $MILLAU_PORT \&#xD;&#xA;	--source-signer //Alice \&#xD;&#xA;	raw 020419ac&#xD;&#xA;&#xD;&#xA;It has been executing the three things&#xD;&#xA;1: Xcmpallet.Sent&#xD;&#xA;2: bridgeRialtoMessages.MessageAccepted&#xD;&#xA;3: xcmPallet.FeesPaid&#xD;&#xA;&#xD;&#xA;But how can i send a message through the XCM instruction from explorer only rather than from terminal . Can someone please guide me through this&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6sGDK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29932" PostHistoryTypeId="1" PostId="7600" RevisionGUID="e87f378c-b724-4d33-bfac-f807f25a62c3" CreationDate="2023-03-14T05:02:52.180" UserId="2372" Text="How can i give instruction through XCM(Send message) function to send a message through parity-bridges-common?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29933" PostHistoryTypeId="3" PostId="7600" RevisionGUID="e87f378c-b724-4d33-bfac-f807f25a62c3" CreationDate="2023-03-14T05:02:52.180" UserId="2372" Text="|xcm|xcmp|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29934" PostHistoryTypeId="2" PostId="7601" RevisionGUID="faa54461-32e3-4665-9094-72e27e0cbdf5" CreationDate="2023-03-14T06:27:29.367" UserId="2372" Text="I'm transferring assets from one chain to another through XCM , it is showing Unreachable. But when i transferring through script in the terminal then also my account balance on one chain is debited but it is not credited on another account on different chain . &#xD;&#xA;&#xD;&#xA;Can please someone guide me through Unreachable error and the token-transfer mechanism &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qC9FV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29936" PostHistoryTypeId="1" PostId="7601" RevisionGUID="faa54461-32e3-4665-9094-72e27e0cbdf5" CreationDate="2023-03-14T06:27:29.367" UserId="2372" Text="I'm getting XcmPallet.Unreachable error in parity-bridges-common" ContentLicense="CC BY-SA 4.0" />
  <row Id="29937" PostHistoryTypeId="3" PostId="7601" RevisionGUID="faa54461-32e3-4665-9094-72e27e0cbdf5" CreationDate="2023-03-14T06:27:29.367" UserId="2372" Text="|xcm|xcmp|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29938" PostHistoryTypeId="2" PostId="7602" RevisionGUID="0edf1ee9-cfb9-4828-a617-336da4b9ce91" CreationDate="2023-03-14T06:51:25.160" UserId="251" Text="Yes, that's the calls you need.&#xD;&#xA;&#xD;&#xA;You can only open a referendum on relaychain to update the genesis.&#xD;&#xA;&#xD;&#xA;And I think this is reasonable.&#xD;&#xA;&#xD;&#xA;Because users bid/contribute for your parachain slot, you shouldn't casually change the gensis." ContentLicense="CC BY-SA 4.0" />
  <row Id="29940" PostHistoryTypeId="2" PostId="7603" RevisionGUID="01d3fdd1-6c92-4fa6-ba41-8626f0812b65" CreationDate="2023-03-14T07:07:54.177" UserId="227" Text="The overhead is significant. This is because for cross-contract calls the `pallet-contracts` needs to:&#xD;&#xA;&#xD;&#xA;1. Load the callee contract code from storage.&#xD;&#xA;2. Compile the code (using `wasmi`).&#xD;&#xA;3. Set up a new sandboxed Wasm instance for the code and execute it.&#xD;&#xA;&#xD;&#xA;You can exemplarily see the difference here:&#xD;&#xA;&#xD;&#xA;### Inline&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn flip(&amp;mut self) {&#xD;&#xA;    self.value = !self.value;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Invoked via:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cargo contract call.  \&#xD;&#xA;  --suri //Alice      \&#xD;&#xA;  --contract $FLIPPER \&#xD;&#xA;  --message flip      \&#xD;&#xA;  --manifest-path=ink-examples/flipper/Cargo.toml \&#xD;&#xA;  -x                  \&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Gas Usage:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Weight(ref_time: 7983333376, proof_size: 262144)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Cross-contract Call&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn invoke(&amp;mut self, address: AccountId) {&#xD;&#xA;    use ink::env::call::build_call;&#xD;&#xA;    const fn selector() -&gt; Selector {&#xD;&#xA;        Selector::new(ink::selector_bytes!(&quot;flip&quot;))&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;        .call(address)&#xD;&#xA;        .exec_input(&#xD;&#xA;            ExecutionInput::new(selector())&#xD;&#xA;        )&#xD;&#xA;        .returns::&lt;()&gt;()&#xD;&#xA;        .invoke()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You could reduce gas costs further by hard-coding `AccountId` in the contract, but this is not the significant part here.&#xD;&#xA;&#xD;&#xA;Invoked via:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cargo contract call               \&#xD;&#xA;  --suri //Alice                  \&#xD;&#xA;  --contract $DELEGATING_CONTRACT \&#xD;&#xA;  --message invoke                \&#xD;&#xA;  --args $FLIPPER_CONTRACT        \&#xD;&#xA;  -x&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Gas Usage:&#xD;&#xA;```&#xD;&#xA;Weight(ref_time: 8847490545, proof_size: 268208)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Summary&#xD;&#xA;&#xD;&#xA;The `refTime` overhead is ~11%, for the `proofSize` ~2%.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29942" PostHistoryTypeId="2" PostId="7604" RevisionGUID="9284f0f6-8be2-409b-ba26-82ad0bb01ae2" CreationDate="2023-03-14T07:33:01.710" UserId="227" Text="The error likely happens because your `test2` account does not have enough funds to pay for the storage deposit.&#xD;&#xA;&#xD;&#xA;For `pallet-contracts` / ink! the caller always needs to pay a deposit for any storage that will be created on-chain with the invoked message. This deposit is returned to whoever frees up the storage again.&#xD;&#xA;&#xD;&#xA;You should check in `polkadot-js` if your account has enough funds. " ContentLicense="CC BY-SA 4.0" />
  <row Id="29944" PostHistoryTypeId="2" PostId="7605" RevisionGUID="804e27e0-af11-450b-957e-ec64b5639efe" CreationDate="2023-03-14T07:48:56.937" UserId="3317" Text="Through the runtime call [grandpaApi -&gt; grandpaAuthorities()][1] which queries [the current state of the authority set][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/#/runtime/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/3a94009daac8919db46e3014964fe23866edb996/frame/grandpa/src/lib.rs#L294-L298" ContentLicense="CC BY-SA 4.0" />
  <row Id="29946" PostHistoryTypeId="2" PostId="7606" RevisionGUID="0253f31a-54b4-4870-b873-d34c51cb5275" CreationDate="2023-03-14T07:53:07.350" UserId="251" Text="How to benchmark the code's WASM execution performance?&#xD;&#xA;&#xD;&#xA;I wrote a crate and want to use it in the runtime.&#xD;&#xA;&#xD;&#xA;I want to know its WASM execution time in ms. How can I get that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29948" PostHistoryTypeId="1" PostId="7606" RevisionGUID="0253f31a-54b4-4870-b873-d34c51cb5275" CreationDate="2023-03-14T07:53:07.350" UserId="251" Text="How to benchmark a crate's WASM execution performance?" ContentLicense="CC BY-SA 4.0" />
  <row Id="29949" PostHistoryTypeId="3" PostId="7606" RevisionGUID="0253f31a-54b4-4870-b873-d34c51cb5275" CreationDate="2023-03-14T07:53:07.350" UserId="251" Text="|wasm|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29950" PostHistoryTypeId="2" PostId="7607" RevisionGUID="c81ab8f1-ecd1-491c-a2fd-5a088ffbe09c" CreationDate="2023-03-14T09:53:27.030" UserId="227" Text="You would have to post the code snippet of how you are trying to do the decoding, but I have a guess:&#xD;&#xA;&#xD;&#xA;The contract metadata is used for decoding events, the fact that you're trying to decode but can't points to a mismatch in metadata.&#xD;&#xA;&#xD;&#xA;So likely your frontend uses the wrong contract metadata." ContentLicense="CC BY-SA 4.0" />
  <row Id="29952" PostHistoryTypeId="2" PostId="7608" RevisionGUID="9386bea6-c6a0-4e08-9494-85cfbf53ef85" CreationDate="2023-03-14T09:53:30.263" UserId="2762" Text="For the runtime development the FRAME pallet system provide a [function ensure_root][1] that allow us to ensure that the origin `o` represents the root:&#xD;&#xA;&#xD;&#xA;    // Only root can call this extrinsic.&#xD;&#xA;    ensure_root(origin)?;&#xD;&#xA;&#xD;&#xA;For example to ensure that who is calling the extrinsic is someone with SUDO privileges in the Rococo network or an extrinsic executed via governance on Polkadot.&#xD;&#xA;&#xD;&#xA;Is there a way to do that with ink!? &#xD;&#xA;&#xD;&#xA;A workaround is to deploy the smart contract with this root privileges and store the account as the owner of the contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L950" ContentLicense="CC BY-SA 4.0" />
  <row Id="29954" PostHistoryTypeId="1" PostId="7608" RevisionGUID="9386bea6-c6a0-4e08-9494-85cfbf53ef85" CreationDate="2023-03-14T09:53:30.263" UserId="2762" Text="ensure_root in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="29955" PostHistoryTypeId="3" PostId="7608" RevisionGUID="9386bea6-c6a0-4e08-9494-85cfbf53ef85" CreationDate="2023-03-14T09:53:30.263" UserId="2762" Text="|ink|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29956" PostHistoryTypeId="2" PostId="7609" RevisionGUID="f5d205bb-1ef7-4543-a0f4-8d9e52fe9918" CreationDate="2023-03-14T11:05:43.747" UserId="251" Text="```js&#xD;&#xA;await cryptoWaitReady();&#xD;&#xA;&#xD;&#xA;const json = JSON.parse(..);&#xD;&#xA;const keyring = new Keyring({ ss58Format: 42 });&#xD;&#xA;const pair = keyring.addFromPair(decoded, json.meta, 'sr25519');&#xD;&#xA;// const pair = keyring.addFromUri('//Alice');&#xD;&#xA;const sig = pair.sign(..);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Everything works well if I use `//Alice` to sign. But if I use json key to sign then I got this error.&#xD;&#xA;&#xD;&#xA;If I remove the `await cryptoWaitReady();` I'll get `The WASM interface has not been initialized.`." ContentLicense="CC BY-SA 4.0" />
  <row Id="29958" PostHistoryTypeId="1" PostId="7609" RevisionGUID="f5d205bb-1ef7-4543-a0f4-8d9e52fe9918" CreationDate="2023-03-14T11:05:43.747" UserId="251" Text="`RuntimeError: unreachable` while using polkadot js to do sr25519 sign" ContentLicense="CC BY-SA 4.0" />
  <row Id="29959" PostHistoryTypeId="3" PostId="7609" RevisionGUID="f5d205bb-1ef7-4543-a0f4-8d9e52fe9918" CreationDate="2023-03-14T11:05:43.747" UserId="251" Text="|polkadot-js|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29960" PostHistoryTypeId="5" PostId="7609" RevisionGUID="98ae5b26-e68c-49ce-a65f-8caadae26dce" CreationDate="2023-03-14T11:13:21.320" UserId="251" Comment="added 17 characters in body" Text="```js&#xD;&#xA;await cryptoWaitReady();&#xD;&#xA;&#xD;&#xA;const json = JSON.parse(..);&#xD;&#xA;const keyring = new Keyring({ ss58Format: 42 });&#xD;&#xA;const pair = keyring.addFromPair(decoded, json.meta, 'sr25519');&#xD;&#xA;// const pair = keyring.addFromUri('//Alice', null, 'sr25519');&#xD;&#xA;const sig = pair.sign(..);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Everything works well if I use `//Alice` to sign. But if I use json key to sign then I got this error.&#xD;&#xA;&#xD;&#xA;If I remove the `await cryptoWaitReady();` I'll get `The WASM interface has not been initialized.`." ContentLicense="CC BY-SA 4.0" />
  <row Id="29961" PostHistoryTypeId="2" PostId="7610" RevisionGUID="fd4844e1-cbc9-4ac4-a3b5-00b2fbb76fbc" CreationDate="2023-03-14T11:14:29.067" UserId="227" Text="Here's the dif for how to get your tests compiling. It's not pretty and I'll create a GitHub issue to make the API easier to use.&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;diff --git a/Cargo.toml b/Cargo.toml&#xD;&#xA;index 09c8226..4127137 100755&#xD;&#xA;--- a/Cargo.toml&#xD;&#xA;+++ b/Cargo.toml&#xD;&#xA;@@ -5,7 +5,7 @@ authors = [&quot;Angie Sheng&quot;]&#xD;&#xA; edition = &quot;2021&quot;&#xD;&#xA; &#xD;&#xA; [dependencies]&#xD;&#xA;-ink = { version = &quot;4.0.0-beta&quot;, default-features = false }&#xD;&#xA;+ink = { version = &quot;4.0&quot;, default-features = false }&#xD;&#xA; &#xD;&#xA; scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA; scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;@@ -28,7 +28,7 @@ overflow-checks = false&#xD;&#xA; overflow-checks = false&#xD;&#xA; &#xD;&#xA; [dev-dependencies]&#xD;&#xA;-ink_e2e = { git = &quot;https://github.com/paritytech/ink&quot;, version = &quot;4.0.0-beta&quot; }&#xD;&#xA;+ink_e2e = { version = &quot;4.0&quot; }&#xD;&#xA; &#xD;&#xA; [features]&#xD;&#xA; default = [&quot;std&quot;]&#xD;&#xA;diff --git a/lib.rs b/lib.rs&#xD;&#xA;index e168a9a..d0d4c87 100755&#xD;&#xA;--- a/lib.rs&#xD;&#xA;+++ b/lib.rs&#xD;&#xA;@@ -90,6 +90,7 @@ mod test_erc {&#xD;&#xA;     &#xD;&#xA;     #[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;     mod e2e_tests {&#xD;&#xA;+        use ink::primitives::AccountId;&#xD;&#xA;         use super::TestErcRef;&#xD;&#xA;         use erc20::Erc20Ref;&#xD;&#xA;         use ink_e2e::build_message;&#xD;&#xA;@@ -115,12 +116,14 @@ mod test_erc {&#xD;&#xA; &#xD;&#xA;             // let official being alice, &#xD;&#xA;             // erc20 was instantiated by its accountid&#xD;&#xA;+            let alice = ink_e2e::alice::&lt;ink_e2e::PolkadotConfig&gt;();&#xD;&#xA;+            let alice_account_id_32 = alice.account_id();&#xD;&#xA;             let test_constructor = TestErcRef::new(&#xD;&#xA;                 erc20_acc_id,&#xD;&#xA;-                ink_e2e::alice()&#xD;&#xA;+                AccountId::try_from(alice_account_id_32.as_ref()).unwrap()&#xD;&#xA;             );&#xD;&#xA; &#xD;&#xA;-            // initiate testerc20 by alice &#xD;&#xA;+            // initiate testerc20 by alice&#xD;&#xA;             let test_acc_id = client&#xD;&#xA;                 .instantiate(&quot;testerc20&quot;, &amp;mut ink_e2e::alice(), test_constructor, 0, None)&#xD;&#xA;                 .await&#xD;&#xA;@@ -139,8 +142,11 @@ mod test_erc {&#xD;&#xA; &#xD;&#xA;             // test erc20 transfer&#xD;&#xA;             // transfer 2,000 to Bob&#xD;&#xA;+            let bob = ink_e2e::alice::&lt;ink_e2e::PolkadotConfig&gt;();&#xD;&#xA;+            let bob_account_id_32 = bob.account_id();&#xD;&#xA;+            let bob_account_id = AccountId::try_from(bob_account_id_32.as_ref()).unwrap();&#xD;&#xA;             let transfer = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;-                .call(|contract| contract.transfer(ink_e2e::bob(),  2_000));&#xD;&#xA;+                .call(|contract| contract.transfer(bob_account_id,  2_000));&#xD;&#xA; &#xD;&#xA;             // Alice transfers 2,000 to Bob&#xD;&#xA;             let transfer_res = client.call(&amp;mut ink_e2e::alice(), transfer, 0, None).await;&#xD;&#xA;@@ -148,14 +154,12 @@ mod test_erc {&#xD;&#xA;  &#xD;&#xA;             //check Bob's balance after the transfer&#xD;&#xA;             let balance_of = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;-            .call(|contract| contract.balance_of(ink_e2e::bob()));&#xD;&#xA;+            .call(|contract| contract.balance_of(bob_account_id));&#xD;&#xA; &#xD;&#xA;-            let balance_of_result = client&#xD;&#xA;-            .call(&amp;mut ink_e2e::charlie(), balance_of, 0, None)&#xD;&#xA;+            let balance_of_bob = client&#xD;&#xA;+            .call_dry_run(&amp;mut ink_e2e::charlie(), &amp;balance_of, 0, None)&#xD;&#xA;             .await&#xD;&#xA;-            .expect(&quot;Calling `balance_of` failed&quot;);&#xD;&#xA;-&#xD;&#xA;-            let balance_of_bob = balance_of.value.expect(&quot;Input is valid, call must not fail.&quot;);&#xD;&#xA;+            .return_value();&#xD;&#xA; &#xD;&#xA;             // check whether the balance of bob is equal to 2000 or not&#xD;&#xA;             assert_eq!(balance_of_bob, 2000);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29963" PostHistoryTypeId="2" PostId="7611" RevisionGUID="67293401-e682-4441-a05c-d9f4e00ecb34" CreationDate="2023-03-14T12:07:30.823" UserId="451" Text="Currently there is no way to make the encoding independent of the ordering. As you say a internal enum is generated with the event structs as variants and they are just added in the order they appear.&#xD;&#xA;&#xD;&#xA;However there is currently a WIP to update the event definition syntax, to make events independent of contract definitions. See https://github.com/paritytech/ink/pull/1243.&#xD;&#xA;&#xD;&#xA;This will require events to be defined as enums, and they would maintain their encoding regardless of the order they are defined in." ContentLicense="CC BY-SA 4.0" />
  <row Id="29965" PostHistoryTypeId="5" PostId="7610" RevisionGUID="676397b9-33a6-483c-bdff-fd134a0ba11e" CreationDate="2023-03-14T12:13:18.977" UserId="227" Comment="added 1 character in body" Text="Here's the diff for how to get your tests compiling. It's not pretty and I'll create a GitHub issue to make the API easier to use.&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;diff --git a/Cargo.toml b/Cargo.toml&#xD;&#xA;index 09c8226..4127137 100755&#xD;&#xA;--- a/Cargo.toml&#xD;&#xA;+++ b/Cargo.toml&#xD;&#xA;@@ -5,7 +5,7 @@ authors = [&quot;Angie Sheng&quot;]&#xD;&#xA; edition = &quot;2021&quot;&#xD;&#xA; &#xD;&#xA; [dependencies]&#xD;&#xA;-ink = { version = &quot;4.0.0-beta&quot;, default-features = false }&#xD;&#xA;+ink = { version = &quot;4.0&quot;, default-features = false }&#xD;&#xA; &#xD;&#xA; scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA; scale-info = { version = &quot;2&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;@@ -28,7 +28,7 @@ overflow-checks = false&#xD;&#xA; overflow-checks = false&#xD;&#xA; &#xD;&#xA; [dev-dependencies]&#xD;&#xA;-ink_e2e = { git = &quot;https://github.com/paritytech/ink&quot;, version = &quot;4.0.0-beta&quot; }&#xD;&#xA;+ink_e2e = { version = &quot;4.0&quot; }&#xD;&#xA; &#xD;&#xA; [features]&#xD;&#xA; default = [&quot;std&quot;]&#xD;&#xA;diff --git a/lib.rs b/lib.rs&#xD;&#xA;index e168a9a..d0d4c87 100755&#xD;&#xA;--- a/lib.rs&#xD;&#xA;+++ b/lib.rs&#xD;&#xA;@@ -90,6 +90,7 @@ mod test_erc {&#xD;&#xA;     &#xD;&#xA;     #[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;     mod e2e_tests {&#xD;&#xA;+        use ink::primitives::AccountId;&#xD;&#xA;         use super::TestErcRef;&#xD;&#xA;         use erc20::Erc20Ref;&#xD;&#xA;         use ink_e2e::build_message;&#xD;&#xA;@@ -115,12 +116,14 @@ mod test_erc {&#xD;&#xA; &#xD;&#xA;             // let official being alice, &#xD;&#xA;             // erc20 was instantiated by its accountid&#xD;&#xA;+            let alice = ink_e2e::alice::&lt;ink_e2e::PolkadotConfig&gt;();&#xD;&#xA;+            let alice_account_id_32 = alice.account_id();&#xD;&#xA;             let test_constructor = TestErcRef::new(&#xD;&#xA;                 erc20_acc_id,&#xD;&#xA;-                ink_e2e::alice()&#xD;&#xA;+                AccountId::try_from(alice_account_id_32.as_ref()).unwrap()&#xD;&#xA;             );&#xD;&#xA; &#xD;&#xA;-            // initiate testerc20 by alice &#xD;&#xA;+            // initiate testerc20 by alice&#xD;&#xA;             let test_acc_id = client&#xD;&#xA;                 .instantiate(&quot;testerc20&quot;, &amp;mut ink_e2e::alice(), test_constructor, 0, None)&#xD;&#xA;                 .await&#xD;&#xA;@@ -139,8 +142,11 @@ mod test_erc {&#xD;&#xA; &#xD;&#xA;             // test erc20 transfer&#xD;&#xA;             // transfer 2,000 to Bob&#xD;&#xA;+            let bob = ink_e2e::alice::&lt;ink_e2e::PolkadotConfig&gt;();&#xD;&#xA;+            let bob_account_id_32 = bob.account_id();&#xD;&#xA;+            let bob_account_id = AccountId::try_from(bob_account_id_32.as_ref()).unwrap();&#xD;&#xA;             let transfer = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;-                .call(|contract| contract.transfer(ink_e2e::bob(),  2_000));&#xD;&#xA;+                .call(|contract| contract.transfer(bob_account_id,  2_000));&#xD;&#xA; &#xD;&#xA;             // Alice transfers 2,000 to Bob&#xD;&#xA;             let transfer_res = client.call(&amp;mut ink_e2e::alice(), transfer, 0, None).await;&#xD;&#xA;@@ -148,14 +154,12 @@ mod test_erc {&#xD;&#xA;  &#xD;&#xA;             //check Bob's balance after the transfer&#xD;&#xA;             let balance_of = build_message::&lt;Erc20Ref&gt;(erc20_acc_id.clone())&#xD;&#xA;-            .call(|contract| contract.balance_of(ink_e2e::bob()));&#xD;&#xA;+            .call(|contract| contract.balance_of(bob_account_id));&#xD;&#xA; &#xD;&#xA;-            let balance_of_result = client&#xD;&#xA;-            .call(&amp;mut ink_e2e::charlie(), balance_of, 0, None)&#xD;&#xA;+            let balance_of_bob = client&#xD;&#xA;+            .call_dry_run(&amp;mut ink_e2e::charlie(), &amp;balance_of, 0, None)&#xD;&#xA;             .await&#xD;&#xA;-            .expect(&quot;Calling `balance_of` failed&quot;);&#xD;&#xA;-&#xD;&#xA;-            let balance_of_bob = balance_of.value.expect(&quot;Input is valid, call must not fail.&quot;);&#xD;&#xA;+            .return_value();&#xD;&#xA; &#xD;&#xA;             // check whether the balance of bob is equal to 2000 or not&#xD;&#xA;             assert_eq!(balance_of_bob, 2000);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="29966" PostHistoryTypeId="2" PostId="7612" RevisionGUID="0f209977-52f4-4312-bdbf-b68d27047126" CreationDate="2023-03-14T12:33:14.117" UserId="227" Text="As stated by @Ganesh11 in the comments, you are likely missing `pdao-beacon-chain-common/std` in your `std` features.&#xD;&#xA;&#xD;&#xA;I'm commenting the answer so that the question doesn't show up unanswered anymore." ContentLicense="CC BY-SA 4.0" />
  <row Id="29968" PostHistoryTypeId="5" PostId="7609" RevisionGUID="b9ff6450-2002-460e-944d-01cef5060e4c" CreationDate="2023-03-14T12:42:35.923" UserId="251" Comment="added 1 character in body" Text="```js&#xD;&#xA;await cryptoWaitReady();&#xD;&#xA;&#xD;&#xA;const json = JSON.parse(xxx);&#xD;&#xA;const keyring = new Keyring({ ss58Format: 42 });&#xD;&#xA;const pair = keyring.addFromPair(decoded, json.meta, 'sr25519');&#xD;&#xA;// const pair = keyring.addFromUri('//Alice', null, 'sr25519');&#xD;&#xA;const sig = pair.sign(..);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Everything works well if I use `//Alice` to sign. But if I use json key to sign then I got this error.&#xD;&#xA;&#xD;&#xA;If I remove the `await cryptoWaitReady();` I'll get `The WASM interface has not been initialized.`." ContentLicense="CC BY-SA 4.0" />
  <row Id="29969" PostHistoryTypeId="2" PostId="7613" RevisionGUID="d8e2c07d-d12b-4a37-a8ff-aa1bf0755739" CreationDate="2023-03-14T12:43:51.750" UserId="251" Text="Because the `xxx` is an ed25519 style key.&#xD;&#xA;&#xD;&#xA;I shouldn't set it to `sr25519`.&#xD;&#xA;&#xD;&#xA;And the runtime doesn't provide an interface to sign this; check https://github.com/polkadot-js/common/issues/929#issuecomment-813324953." ContentLicense="CC BY-SA 4.0" />
  <row Id="29971" PostHistoryTypeId="2" PostId="7614" RevisionGUID="71111e62-2828-4eb1-bdda-20163ea306f0" CreationDate="2023-03-14T12:45:12.523" UserId="227" Text="This is likely because you are not using the correct features for `barebones-x509` in your `Cargo.toml`. To be sure you would have to post it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I suspect that you are missing something like this:&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;@@ -11,6 +11,8 @@ ink = { path = &quot;../../crates/ink&quot;, default-features = false }&#xD;&#xA; scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA; scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA; &#xD;&#xA;+barebones-x509 = { version = &quot;0.5.2&quot;, default-features = false }&#xD;&#xA;+&#xD;&#xA; [dev-dependencies]&#xD;&#xA; ink_e2e = { path = &quot;../../crates/e2e&quot; }&#xD;&#xA; &#xD;&#xA;@@ -25,6 +27,7 @@ std = [&#xD;&#xA;     &quot;ink/std&quot;,&#xD;&#xA;     &quot;scale/std&quot;,&#xD;&#xA;     &quot;scale-info/std&quot;,&#xD;&#xA;+    &quot;barebones-x509/std&quot;&#xD;&#xA; ]&#xD;&#xA; ink-as-dependency = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It's hard to tell though without knowing how you depend on the crate. Please post your `Cargo.toml` if it still doesn't work." ContentLicense="CC BY-SA 4.0" />
  <row Id="29974" PostHistoryTypeId="6" PostId="7067" RevisionGUID="d45ba3f3-b7a5-4003-8e59-77edaf9200ea" CreationDate="2023-03-14T13:00:56.677" UserId="227" Comment="edited tags" Text="|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29975" PostHistoryTypeId="2" PostId="7615" RevisionGUID="001d373c-b601-4eee-ab7f-6f1a7032be7a" CreationDate="2023-03-14T13:24:40.400" UserId="3708" Text="How can I get the lifetime of an extrinsic?. There is a way to estimate the lifetime of the extrinsics per chain?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/b4YVe.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="29977" PostHistoryTypeId="1" PostId="7615" RevisionGUID="001d373c-b601-4eee-ab7f-6f1a7032be7a" CreationDate="2023-03-14T13:24:40.400" UserId="3708" Text="Extrinsic lifetime" ContentLicense="CC BY-SA 4.0" />
  <row Id="29978" PostHistoryTypeId="3" PostId="7615" RevisionGUID="001d373c-b601-4eee-ab7f-6f1a7032be7a" CreationDate="2023-03-14T13:24:40.400" UserId="3708" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29979" PostHistoryTypeId="2" PostId="7616" RevisionGUID="dd21b2cd-f599-418b-ae21-8c0b63b133a6" CreationDate="2023-03-14T13:33:25.663" UserId="251" Text="The lifetime is set by the api-client/app/wallet when they send the extrinsic.&#xD;&#xA;&#xD;&#xA;There isn't such a parameter on the chain.&#xD;&#xA;&#xD;&#xA;Simply query the extrinsic, and then you can extract this field from it." ContentLicense="CC BY-SA 4.0" />
  <row Id="29981" PostHistoryTypeId="5" PostId="6185" RevisionGUID="bca55640-c9cd-4236-b7df-81082c809fa5" CreationDate="2023-03-14T13:51:47.620" UserId="227" Comment="added 1 character in body; edited title" Text="SignAndSend SuccessResponse that is a result of a contract call does NOT contain all events that are emitted during tx execution. The Object contains only events emitted from the contract that is called but does not contain events that were emitted during cross contract call.&#xD;&#xA;Is it expected behavior?&#xD;&#xA;I am using substrate-contract-node for tests." ContentLicense="CC BY-SA 4.0" />
  <row Id="29982" PostHistoryTypeId="4" PostId="6185" RevisionGUID="bca55640-c9cd-4236-b7df-81082c809fa5" CreationDate="2023-03-14T13:51:47.620" UserId="227" Comment="added 1 character in body; edited title" Text="polkadot.js | SignAndSend SuccessResponse does NOT contain all events emitted in tx" ContentLicense="CC BY-SA 4.0" />
  <row Id="29983" PostHistoryTypeId="2" PostId="7617" RevisionGUID="8b7b8f99-95dd-4791-9f9c-3e27159564b5" CreationDate="2023-03-14T13:52:14.577" UserId="94" Text="FRAME is not a stand-alone WASM benchmarking framework. You can use criterion or similar for that.  &#xD;&#xA;&#xD;&#xA;The FRAME benchmarking is only concerned about the *Weight* of calls, not primarily miliseconds.  &#xD;&#xA;You could sure put the logic into a minimal pallet and call that. This can work, but is really not the intended use-case of the FRAME benchmarking. If you want to optimize the performance of low-level code it is better to go with other tools." ContentLicense="CC BY-SA 4.0" />
  <row Id="29985" PostHistoryTypeId="2" PostId="7618" RevisionGUID="918f4205-bf49-4995-8f0d-91ce39dbcb5b" CreationDate="2023-03-14T13:56:04.707" UserId="227" Text="To make sure that we are talking about the same thing you would have to post your TypeScript code.&#xD;&#xA;&#xD;&#xA;Make sure you follow https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-events. The events should all be there.&#xD;&#xA;&#xD;&#xA;I have an idea why you might not be seeing it. My guess is that you are only looking for decoded events. This will work fine if you are just calling one contract, where you know the metadata.&#xD;&#xA;&#xD;&#xA;But for cross-contract calls you are calling a second contract, with unknown metadata. polkadot-js won't be able to decode the events from that other contract out of the box, because it doesn't know the metadata of this other contract.&#xD;&#xA;&#xD;&#xA;So on a high level you should be looking for unencoded events and decode those with the metadata of the contract to which you made a cross-contract call.&#xD;&#xA;&#xD;&#xA;Alternatively you could also emit an event in the contract from which you are using the metadata in your frontend.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29987" PostHistoryTypeId="2" PostId="7619" RevisionGUID="d0a698f1-a6f5-421c-b431-f4538bdc4066" CreationDate="2023-03-14T13:58:38.580" UserId="227" Text="As stated in the comments, the `polkadot-js` UI unfortunately doesn't support Weights V2 yet. &#xD;&#xA;&#xD;&#xA;You are better off using https://contracts-ui.substrate.io/ for now." ContentLicense="CC BY-SA 4.0" />
  <row Id="29989" PostHistoryTypeId="2" PostId="7620" RevisionGUID="01017d05-f2d0-41d0-93d0-8e8458514819" CreationDate="2023-03-14T14:59:13.650" UserId="3960" Text="I have a template node with some offchain worker code that builds well with v0.9.28 dependencies.&#xD;&#xA;The runtime also implements pallet_contracts_rpc_runtime_api::ContractsApi trait.&#xD;&#xA;&#xD;&#xA;Now I'm trying to upgrade dependencies to v0.9.35 and, after necessary code changes I managed to build it, but only if I comment out pallet_contracts_rpc_runtime_api::ContractsApi implementation.&#xD;&#xA;&#xD;&#xA;However when I try to include it I get the following error:&#xD;&#xA;&#xD;&#xA;     error[E0152]: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /home/yury/Desktop/SpiderWeb/FirstReceivedFromLucas/failed_upgrade_mvp-full-node-without-github-files/spiderweb-chain/target/release/wbuild/spiderweb-substrate-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-830f6a13a9ed9382.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /home/yury/Desktop/SpiderWeb/FirstReceivedFromLucas/failed_upgrade_mvp-full-node-without-github-files/spiderweb-chain/target/release/wbuild/spiderweb-substrate-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-6baa34cc3788d70b.rmeta&#xD;&#xA;&#xD;&#xA;In both cases (success and failure) running &#xD;&#xA;&#xD;&#xA;    cargo tree -i sp-io&#xD;&#xA;yields the same result:&#xD;&#xA;&#xD;&#xA;    error: There are multiple `sp-io` packages in your project, and the specification `sp-io` is ambiguous.&#xD;&#xA;&#xD;&#xA;Please re-run this command with `-p &lt;spec&gt;` where `&lt;spec&gt;` is one of the following:&#xD;&#xA;  sp-io@6.0.0&#xD;&#xA;  sp-io@7.0.0&#xD;&#xA;&#xD;&#xA;In my Cargo.toml file all relevant dependencies refer to v7.0.0&#xD;&#xA;&#xD;&#xA;Now I saw posts with similar though not exactly the same issues and suspect there is some std code leaked in the Runtime, or maybe I do something incorrect here ?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="29991" PostHistoryTypeId="1" PostId="7620" RevisionGUID="01017d05-f2d0-41d0-93d0-8e8458514819" CreationDate="2023-03-14T14:59:13.650" UserId="3960" Text="pallet_contracts_rpc_runtime_api::ContractsApi doesn't compile under v0.9.35" ContentLicense="CC BY-SA 4.0" />
  <row Id="29992" PostHistoryTypeId="3" PostId="7620" RevisionGUID="01017d05-f2d0-41d0-93d0-8e8458514819" CreationDate="2023-03-14T14:59:13.650" UserId="3960" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="29993" PostHistoryTypeId="2" PostId="7621" RevisionGUID="55f294e9-666f-42a7-b136-f4ab9734eac2" CreationDate="2023-03-14T15:16:03.560" UserId="227" Text="For this question to be properly answered you would have to provide more details. &#xD;&#xA;&#xD;&#xA;AFAIK the only wallet currently supporting tokens based on ink! is SubWallet (https://subwallet.app). They announced support for PSP-22 and PSP-34 here: https://twitter.com/subwalletapp/status/1596140182796787712.&#xD;&#xA;&#xD;&#xA;Those are the two token standards:&#xD;&#xA;&#xD;&#xA;* https://github.com/w3f/PSPs/blob/master/PSPs/psp-22.md&#xD;&#xA;* https://github.com/w3f/PSPs/blob/master/PSPs/psp-34.md&#xD;&#xA;&#xD;&#xA;OpenBrush (https://openbrush.io) provides reference implementations for both standards." ContentLicense="CC BY-SA 4.0" />
  <row Id="29995" PostHistoryTypeId="2" PostId="7622" RevisionGUID="bba71a44-98fa-42e2-9b92-6cb5108bca23" CreationDate="2023-03-14T15:31:20.150" UserId="227" Text="I'm re-posting the answer from the comment here to remove the question from the unanswered section:&#xD;&#xA;&#xD;&#xA;The issue was an old version of node.js." ContentLicense="CC BY-SA 4.0" />
  <row Id="29997" PostHistoryTypeId="2" PostId="7623" RevisionGUID="739e6b75-a08a-4314-98d1-4d08edfc1cf5" CreationDate="2023-03-14T15:34:49.957" UserId="227" Text="AFAIK there is currently no way to auto-generate wrappers in Go.&#xD;&#xA;&#xD;&#xA;A possible avenue to explore is to use https://github.com/727-Ventures/typechain-polkadot for generating TypeScript wrappers and then transpile them to Go code. I could imagine that a TypeScript2Golang exists somewhere." ContentLicense="CC BY-SA 4.0" />
  <row Id="29999" PostHistoryTypeId="2" PostId="7624" RevisionGUID="c0d6635c-6263-418e-8a00-05d0c3e68b99" CreationDate="2023-03-14T15:36:52.310" UserId="227" Text="The `polkadot-js` UI unfortunately doesn't support Weights V2 yet. &#xD;&#xA;&#xD;&#xA;You are better off using https://contracts-ui.substrate.io/ for now." ContentLicense="CC BY-SA 4.0" />
  <row Id="30001" PostHistoryTypeId="2" PostId="7625" RevisionGUID="d82f261d-edf0-4a7d-bd8f-6290785b2ec1" CreationDate="2023-03-14T15:43:51.940" UserId="3711" Text="I've followed the [cookbook](https://polkadot.js.org/docs/extension/cookbook#sign-a-message) on signing a payload, however this uses sr25519.&#xD;&#xA;&#xD;&#xA;I would like to use ECDSA to sign the payload, how can this be done?&#xD;&#xA;&#xD;&#xA;I have looked into using the keyring and managed to get the Alice account to do the signing:&#xD;&#xA;```&#xD;&#xA;        const keyring = new Keyring({ type: 'ecdsa' });&#xD;&#xA;        const pair = keyring.addFromUri('//Alice');&#xD;&#xA;        const sig = pair.sign(message);&#xD;&#xA;        console.log('sig', sig);&#xD;&#xA;        console.log('sig hex', u8aToHex(sig));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This works. However, I cannot find a way to add the account from an extension to the keyring to reproduce this using something other than the Alice account." ContentLicense="CC BY-SA 4.0" />
  <row Id="30003" PostHistoryTypeId="1" PostId="7625" RevisionGUID="d82f261d-edf0-4a7d-bd8f-6290785b2ec1" CreationDate="2023-03-14T15:43:51.940" UserId="3711" Text="How to sign a payload using ECDSA in PolkadotJS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30004" PostHistoryTypeId="3" PostId="7625" RevisionGUID="d82f261d-edf0-4a7d-bd8f-6290785b2ec1" CreationDate="2023-03-14T15:43:51.940" UserId="3711" Text="|polkadot-js|ink|polkadot-js-extension|ecdsa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30005" PostHistoryTypeId="2" PostId="7626" RevisionGUID="f41fc1f4-a95b-4212-9e77-697af27a2173" CreationDate="2023-03-14T15:46:00.363" UserId="227" Text="For the `polkadot-js` docs which you linked: I think either `0` or `-1` for `gasLimit` means &quot;unlimited&quot;/&quot;automatically choose it&quot;. So you don't necessarily have to put a value there.&#xD;&#xA;&#xD;&#xA;How it's done in practice: You can dry-run a contract call, the dry-run will return the consumed Gas and you can then put this value as the `gasLimit` for the real thing.&#xD;&#xA;&#xD;&#xA;This is what Contracts UI or `polkadot-js` shows you as &quot;Estimates:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Those values are then used by default for executing the contract call.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Y8QKU.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30007" PostHistoryTypeId="5" PostId="7602" RevisionGUID="fbfae4a5-2e16-464f-8f71-3c9577ed0693" CreationDate="2023-03-14T15:50:21.907" UserId="251" Comment="added 1 character in body" Text="Yes, that's the calls you need.&#xD;&#xA;&#xD;&#xA;You can only open a referendum on relaychain to update the genesis.&#xD;&#xA;&#xD;&#xA;And I think this is reasonable.&#xD;&#xA;&#xD;&#xA;Because users bid/contribute for your parachain slot, you shouldn't casually change the genesis." ContentLicense="CC BY-SA 4.0" />
  <row Id="30008" PostHistoryTypeId="2" PostId="7627" RevisionGUID="194b94a9-f2a6-429b-a11c-ff9813182c6a" CreationDate="2023-03-14T15:55:26.817" UserId="3140" Text="There are a few ways to instantiate a contract depending on the context.&#xD;&#xA;&#xD;&#xA; 1. If the contract has already been deployed then you can use a code hash, the contract address, and the [BlueprintPromise](https://polkadot.js.org/docs/api-contract/start/basics) approach.&#xD;&#xA; 2. If the contract has not yet been deployed then you must upload the Wasm blob using [CodePromise](https://polkadot.js.org/docs/api-contract/start/basics)&#xD;&#xA; 3. Finally you can use the [Contracts UI Wizard](https://contracts-ui.substrate.io/), then, once deployed, instantiate a JS contract instance in PolkadotJS using the contract address and metadata to make transactions and queries from the client. &#xD;&#xA;&#xD;&#xA;[HERE](https://github.com/paritytech/contracts-ui/blob/master/src/helpers/contract.ts#L15)&#xD;&#xA;    is the code for Contracts UI that uses the first two cases mentioned above.&#xD;&#xA;&#xD;&#xA;The `Type(32)` that you mentioned is related to the metadata from your compiled contract. If you look inside either your `Metadata.json` or `&lt;contract_name&gt;.contract` you will see a section called `types`. This describes the type interfaces unique to each contract so that the client library can correctly encode / decode the data.&#xD;&#xA;&#xD;&#xA;There is some low level code going on, but we are working on ways to simplify this. [useink](github.com/paritytech/useink) is a React hooks library that handles all of the encoding / decoding in an opinionated and ergonomic way. There are some helper functions that work outside of React, which you might find useful. [Capi](github.com/paritytech/capi) is a JavaScript library that is currently under development and will have some great examples. `useink` will eventually use that under the hood." ContentLicense="CC BY-SA 4.0" />
  <row Id="30010" PostHistoryTypeId="5" PostId="7598" RevisionGUID="70b96b37-3c87-496d-855f-ac49da41f589" CreationDate="2023-03-14T16:08:58.670" UserId="1959" Comment="Correct" Text="For question 1: &#xD;&#xA;&#xD;&#xA;&gt; If one organization wins the slot in the parachain auction, can it&#xD;&#xA;&gt; transfer the slot to another parachain?&#xD;&#xA;&#xD;&#xA;Yes, you can do it via `registrar.swap`, it's on relaychain, and most parachains renew their leases through it.&#xD;&#xA;&#xD;&#xA;For question 2:&#xD;&#xA;&gt; If I deregister the parachain, is the slot also released?&#xD;&#xA;&#xD;&#xA;**&lt;del&gt;Yes&lt;/del&gt;**, it will free any data, and return any deposits made by the parachain. &#xD;&#xA;&#xD;&#xA;## Update&#xD;&#xA;Sorry, my fault. I accidentally discovered during testing that deregister **does not clear the lease of paraId**. Here are the steps I took:&#xD;&#xA;&#xD;&#xA;1. slots.forceLease(2105, 0, 999)&#xD;&#xA;2. parasSudoWrapper.sudoScheduleParaInitialize(2105)&#xD;&#xA;3. degistrar.deregister(2105)&#xD;&#xA;4. parasSudoWrapper.sudoScheduleParaInitialize(2105)&#xD;&#xA;5. paraId 2105 still has the lease from step 1.&#xD;&#xA;&#xD;&#xA;And I checked [the `do_deregister` code](https://github.com/paritytech/polkadot/blob/release-v0.9.38/runtime/common/src/paras_registrar.rs#L602) and indeed found that the leases storage was not cleaned.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30011" PostHistoryTypeId="2" PostId="7628" RevisionGUID="575e4f8d-b47e-4bcd-a992-b434deacbb47" CreationDate="2023-03-14T16:29:25.277" UserId="29" Text="When attempting to run `follow-chain` on substrate-node-template with the following command:&#xD;&#xA;```&#xD;&#xA;RUST_LOG=info,runtime=debug ./try-runtime-node-template try-runtime --runtime ../../substrate-node-template/target/release/wbuild/node-template-runtime/node_template_runtime.wasm follow-chain --uri ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;I get the following error:&#xD;&#xA;```&#xD;&#xA;2023-03-13 14:38:07.160 ERROR main runtime: panicked at 'Bad input data provided to execute_block: Codec error', /Users/bruno/src/substrate-node-template/runtime/src/lib.rs:351:1    &#xD;&#xA;2023-03-13 14:38:07.166 ERROR main try-runtime::cli: failed to execute block 49 due to Input(&quot;failed to execute TryRuntime_execute_block: Execution aborted due to trap: unreachable&quot;) &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Logs:&#xD;&#xA;```&#xD;&#xA;2023-03-13 14:38:07.057  INFO main try-runtime::cli: subscribing to &quot;chain_subscribeFinalizedHeads&quot; / &quot;chain_unsubscribeFinalizedHeads&quot;    &#xD;&#xA;2023-03-13 14:38:07.067  INFO main remote-ext: since no prefix is filtered, the data for all pallets will be downloaded    &#xD;&#xA;2023-03-13 14:38:07.073  INFO main remote-ext: scraping key-pairs from remote at block height 0x7ab723e4a959e52358c9d9b0d0268e76a397c9f604fd3a8cdcde2c30f47c9170    &#xD;&#xA;2023-03-13 14:38:07.074  INFO main remote-ext: adding data for hashed prefix: 3a6368696c645f73746f726167653a64656661756c743a, took 0s    &#xD;&#xA;2023-03-13 14:38:07.075  INFO main remote-ext: Querying a total of 82 keys from prefix , splitting among 10 threads, 9 keys per thread    &#xD;&#xA;2023-03-13 14:38:07.082  INFO main remote-ext: adding data for hashed prefix: , took 0s    &#xD;&#xA;2023-03-13 14:38:07.082  INFO main remote-ext: adding data for hashed key: 3a636f6465    &#xD;&#xA;2023-03-13 14:38:07.084  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    &#xD;&#xA;2023-03-13 14:38:07.085  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    &#xD;&#xA;2023-03-13 14:38:07.086  INFO main remote-ext: initialized state externalities with storage root 0x6d5cf9395f3d6e7dae65c2192472999e810215dc4e5a38148db8b246437922e5 and state_version V1    &#xD;&#xA;2023-03-13 14:38:07.100  INFO main try-runtime::cli: original spec: RuntimeString::Owned(&quot;node-template&quot;)-100, code hash: 00596efa3d8419d7ffaf90fc21ac523d869d9fc38a4d8f3a9eb0f04c8f544955    &#xD;&#xA;2023-03-13 14:38:07.107  INFO main try-runtime::cli: new spec: RuntimeString::Owned(&quot;node-template&quot;)-101, code hash: 819103cc06ffeb50f6878b50ac72d6743f74462adbbc4bee3da547c9ea325cf4    &#xD;&#xA;2023-03-13 14:38:07.160 ERROR main runtime: panicked at 'Bad input data provided to execute_block: Codec error', /Users/bruno/src/substrate-node-template/runtime/src/lib.rs:351:1    &#xD;&#xA;2023-03-13 14:38:07.166 ERROR main try-runtime::cli: failed to execute block 49 due to Input(&quot;failed to execute TryRuntime_execute_block: Execution aborted due to trap: unreachable&quot;)    &#xD;&#xA;2023-03-13 14:38:07.907 ERROR main runtime: panicked at 'Bad input data provided to execute_block: Codec error', /Users/bruno/src/substrate-node-template/runtime/src/lib.rs:351:1    &#xD;&#xA;2023-03-13 14:38:07.907 ERROR main try-runtime::cli: failed to execute block 50 due to Input(&quot;failed to execute TryRuntime_execute_block: Execution aborted due to trap: unreachable&quot;)    &#xD;&#xA;2023-03-13 14:38:13.253 ERROR main runtime: panicked at 'Bad input data provided to execute_block: Codec error', /Users/bruno/src/substrate-node-template/runtime/src/lib.rs:351:1    &#xD;&#xA;2023-03-13 14:38:13.253 ERROR main try-runtime::cli: failed to execute block 51 due to Input(&quot;failed to execute TryRuntime_execute_block: Execution aborted due to trap: unreachable&quot;) &#xD;&#xA;```&#xD;&#xA;The &quot;live&quot; chain is the same node running locally with `--features=try-runtime` compiled and `spec_version` 100. I run it with the following command:&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --dev&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30013" PostHistoryTypeId="1" PostId="7628" RevisionGUID="575e4f8d-b47e-4bcd-a992-b434deacbb47" CreationDate="2023-03-14T16:29:25.277" UserId="29" Text="Getting 'Bad input data provided to execute_block' when running try-runtime's follow-chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="30014" PostHistoryTypeId="3" PostId="7628" RevisionGUID="575e4f8d-b47e-4bcd-a992-b434deacbb47" CreationDate="2023-03-14T16:29:25.277" UserId="29" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30016" PostHistoryTypeId="2" PostId="7629" RevisionGUID="5698dafd-f6c8-45de-90bf-f974059aece2" CreationDate="2023-03-14T17:55:15.253" UserId="167" Text="This is a typical error and it means that the &quot;**block format**&quot; (encoding/decoding) between the chain that's currently *running* (remove or local) and the new runtime that you compiled and passed to the tool are not compatible. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Quoting the documentation of [the command](https://paritytech.github.io/substrate/master/try_runtime_cli/enum.Command.html#variant.FollowChain): &#xD;&#xA;&#xD;&#xA;&gt; This can only work if the block format between the remote chain and the new runtime being tested has remained the same, otherwise block decoding might fail.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30018" PostHistoryTypeId="2" PostId="7630" RevisionGUID="965915c7-c519-4ab0-987e-64d72d07035e" CreationDate="2023-03-14T18:36:31.433" UserId="3961" Text="If so, Are there any docs about converting ```Index```, ```Raw```, ```Address20``` and ```Address32```?&#xD;&#xA;&#xD;&#xA;Is it just applying the following algorithm to the variant bytes as &lt;address&gt;?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;base58encode ( concat ( &lt;address-type&gt;, &lt;address&gt;, &lt;checksum&gt; ) )&#xD;&#xA;checksum = ss58hash(&lt;address-type&gt; + &lt;address&gt;)[0..2]&#xD;&#xA;&#xD;&#xA;const PREFIX: &amp;[u8] = b&quot;SS58PRE&quot;;&#xD;&#xA;ss58hash(data) = Blake2b512(PREFIX + data)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30020" PostHistoryTypeId="1" PostId="7630" RevisionGUID="965915c7-c519-4ab0-987e-64d72d07035e" CreationDate="2023-03-14T18:36:31.433" UserId="3961" Text="Could any `MultiAddress&lt;AccountId, AccountIndex&gt;` variant be encoded to SS58?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30021" PostHistoryTypeId="3" PostId="7630" RevisionGUID="965915c7-c519-4ab0-987e-64d72d07035e" CreationDate="2023-03-14T18:36:31.433" UserId="3961" Text="|ss58format|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30022" PostHistoryTypeId="5" PostId="7630" RevisionGUID="f8a00f5d-78fc-419a-b6d0-bde7d7d000a3" CreationDate="2023-03-14T18:37:37.430" UserId="3961" Comment="added 2 characters in body" Text="If so, Are there any docs about converting ```Index```, ```Raw```, ```Address20``` and ```Address32```?&#xD;&#xA;&#xD;&#xA;Is it just applying the following algorithm to the variant bytes as `&lt;address&gt;`?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;base58encode ( concat ( &lt;address-type&gt;, &lt;address&gt;, &lt;checksum&gt; ) )&#xD;&#xA;checksum = ss58hash(&lt;address-type&gt; + &lt;address&gt;)[0..2]&#xD;&#xA;&#xD;&#xA;const PREFIX: &amp;[u8] = b&quot;SS58PRE&quot;;&#xD;&#xA;ss58hash(data) = Blake2b512(PREFIX + data)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30023" PostHistoryTypeId="2" PostId="7631" RevisionGUID="9d5c101d-7199-41b6-9fb0-b531a1632999" CreationDate="2023-03-14T18:54:57.610" UserId="3140" Text="Yes, WeightsV2 is the issue. You can do it the &quot;low level&quot; way with PolkadotJS that involves encoding / decoding the data, or if you are using React you can use [useink beta](https://www.npmjs.com/package/useink) `useContractTx` hook. &#xD;&#xA;&#xD;&#xA; 1. [Here is what it does under the hood](https://github.com/paritytech/useink/blob/fa37e428649e6c2a5be7e881b4737e346e978b05/core/hooks/useContractTx.ts#L42) if you are not using React. &#xD;&#xA; 2. With React: &#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;const contract = useContract(...yourArgs)&#xD;&#xA;const tx = useContactTx(contract, 'myMessageName');&#xD;&#xA;const txArgs = ['Squink', 1000];&#xD;&#xA;&#xD;&#xA;return (&#xD;&#xA;  &lt;div&gt;&#xD;&#xA;    &lt;button onClick(() =&gt; tx.send(txArgs)&gt;Submit&lt;/button&#xD;&#xA;    Status: {tx.status}&#xD;&#xA;  &lt;/div&gt;&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`useink` is beta now and has come big changes coming up, but it will do all of the nasty decoding work and handle WeightsV2 under the hood for you.&#xD;&#xA;&#xD;&#xA;There are more hooks in there you may find useful. E.g. `useContractCall`, which will update on each new block." ContentLicense="CC BY-SA 4.0" />
  <row Id="30025" PostHistoryTypeId="2" PostId="7632" RevisionGUID="a9196a7b-563d-4256-8d98-54a457583471" CreationDate="2023-03-14T19:23:32.193" UserId="29" Text="I have the substrate-contracts-node running and I run the following command on the [flipper](https://github.com/paritytech/ink-examples/tree/main/flipper) contract:&#xD;&#xA;```&#xD;&#xA;cargo test --features e2e-tests&#xD;&#xA;```&#xD;&#xA;Results in the following error:&#xD;&#xA;```&#xD;&#xA;running 4 tests&#xD;&#xA;test flipper::tests::default_works ... ok&#xD;&#xA;test flipper::tests::it_works ... ok&#xD;&#xA;test flipper::e2e_tests::default_works ... FAILED&#xD;&#xA;test flipper::e2e_tests::it_works ... FAILED&#xD;&#xA;&#xD;&#xA;failures:&#xD;&#xA;&#xD;&#xA;---- flipper::e2e_tests::default_works stdout ----&#xD;&#xA;thread 'flipper::e2e_tests::default_works' panicked at 'error on ws request `contracts_instantiate`: Rpc(ClientError(Call(Custom(ErrorObject { code: InternalError, message: &quot;Unknown error occurred&quot;, data: Some(RawValue(&quot;Client(Execution(RuntimePanicked(\&quot;Bad input data provided to instantiate: unexpected first byte decoding Option\&quot;)))&quot;)) }))))', /Users/bruno/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_e2e-4.0.1/src/xts.rs:237:17&#xD;&#xA;&#xD;&#xA;---- flipper::e2e_tests::it_works stdout ----&#xD;&#xA;thread 'flipper::e2e_tests::it_works' panicked at 'error on ws request `contracts_instantiate`: Rpc(ClientError(Call(Custom(ErrorObject { code: InternalError, message: &quot;Unknown error occurred&quot;, data: Some(RawValue(&quot;Client(Execution(RuntimePanicked(\&quot;Bad input data provided to instantiate: unexpected first byte decoding Option\&quot;)))&quot;)) }))))', /Users/bruno/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_e2e-4.0.1/src/xts.rs:237:17&#xD;&#xA;note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;failures:&#xD;&#xA;    flipper::e2e_tests::default_works&#xD;&#xA;    flipper::e2e_tests::it_works&#xD;&#xA;&#xD;&#xA;test result: FAILED. 2 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.04s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo-contract-contract 2.1.0-unknown-aarch64-apple-darwin&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.68.0 (2c8cc3432 2023-03-06)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30027" PostHistoryTypeId="1" PostId="7632" RevisionGUID="a9196a7b-563d-4256-8d98-54a457583471" CreationDate="2023-03-14T19:23:32.193" UserId="29" Text="Error running e2e tests on flipper" ContentLicense="CC BY-SA 4.0" />
  <row Id="30028" PostHistoryTypeId="3" PostId="7632" RevisionGUID="a9196a7b-563d-4256-8d98-54a457583471" CreationDate="2023-03-14T19:23:32.193" UserId="29" Text="|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30029" PostHistoryTypeId="2" PostId="7633" RevisionGUID="51673a5c-2622-41a6-9b70-9ab014ae0455" CreationDate="2023-03-14T20:20:17.993" UserId="3098" Text="Make sure you run [the latest](https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.24.0) release of `substrate-contracts-node` and have it installed in PATH. You do not need to run it in the background, E2E tests will automatically start the node for each test independently." ContentLicense="CC BY-SA 4.0" />
  <row Id="30031" PostHistoryTypeId="2" PostId="7634" RevisionGUID="db3f52f7-686f-4efd-a0d2-fe310e004281" CreationDate="2023-03-14T20:50:59.903" UserId="165" Text="In the scenario where a cross-contract call from contract A to contract B fails, how can we manage the resulting errors? Specifically, if the call from A to B is unsuccessful, what are the options for updating the storage of contract A based on this outcome?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30033" PostHistoryTypeId="1" PostId="7634" RevisionGUID="db3f52f7-686f-4efd-a0d2-fe310e004281" CreationDate="2023-03-14T20:50:59.903" UserId="165" Text="How to properly handle cross contract call errors" ContentLicense="CC BY-SA 4.0" />
  <row Id="30034" PostHistoryTypeId="3" PostId="7634" RevisionGUID="db3f52f7-686f-4efd-a0d2-fe310e004281" CreationDate="2023-03-14T20:50:59.903" UserId="165" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30035" PostHistoryTypeId="2" PostId="7635" RevisionGUID="c1205e6c-6c27-4f43-8e72-774f38d0513f" CreationDate="2023-03-14T20:52:21.957" UserId="165" Text="Our substrate-based smart contract emits an event, which we're listening for via some RPCs. However, we're unable to confirm if the event is genuinely originating from our smart contract. Therefore, we're seeking guidance on how to authenticate the event's legitimacy in relation to our smart contract." ContentLicense="CC BY-SA 4.0" />
  <row Id="30037" PostHistoryTypeId="1" PostId="7635" RevisionGUID="c1205e6c-6c27-4f43-8e72-774f38d0513f" CreationDate="2023-03-14T20:52:21.957" UserId="165" Text="How to identify that certain event has been emited by a concrete smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="30038" PostHistoryTypeId="3" PostId="7635" RevisionGUID="c1205e6c-6c27-4f43-8e72-774f38d0513f" CreationDate="2023-03-14T20:52:21.957" UserId="165" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30039" PostHistoryTypeId="2" PostId="7636" RevisionGUID="35be5484-b7e1-4d86-a428-db3f024f4e3a" CreationDate="2023-03-14T20:54:26.917" UserId="165" Text="I was attempting to comprehend the workings of cross-contract calling in substrate ink contracts using this particular sample code.&#xD;&#xA;&#xD;&#xA;If I provide `UINT64_MAX` as `calls_count` value, it will result in a failure, what should the end user expect to receive when invoking the test_cross_contract_call function?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn test_cross_contract_call(&amp;mut self, callee: AccountId, calls_count: u64) {&#xD;&#xA;            let selector: Selector = Selector::new([0x6b, 0x25, 0xcb, 0x19]);&#xD;&#xA;            let response: u64 = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(&#xD;&#xA;                    Call::new()&#xD;&#xA;                        .callee(callee)&#xD;&#xA;                        .transferred_value(0)&#xD;&#xA;                        .gas_limit(50000),&#xD;&#xA;                )&#xD;&#xA;                .call_flags(ink::env::CallFlags::default().set_allow_reentry(true))&#xD;&#xA;                .exec_input(ExecutionInput::new(selector).push_arg(calls_count))&#xD;&#xA;                .returns::&lt;u64&gt;()&#xD;&#xA;                .invoke();&#xD;&#xA;            self.value = response;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(message, selector = 0x6b25cb19)]&#xD;&#xA;pub fn dummy_function(&amp;mut self, value: u64) -&gt; u64 {&#xD;&#xA;            return 45 * value;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30041" PostHistoryTypeId="1" PostId="7636" RevisionGUID="35be5484-b7e1-4d86-a428-db3f024f4e3a" CreationDate="2023-03-14T20:54:26.917" UserId="165" Text="What should the end-user expect after a cross contract call failure" ContentLicense="CC BY-SA 4.0" />
  <row Id="30042" PostHistoryTypeId="3" PostId="7636" RevisionGUID="35be5484-b7e1-4d86-a428-db3f024f4e3a" CreationDate="2023-03-14T20:54:26.917" UserId="165" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30043" PostHistoryTypeId="2" PostId="7637" RevisionGUID="b7c24637-7454-45ba-a5b5-5fa7c011716d" CreationDate="2023-03-14T21:46:30.333" UserId="74" Text="# Overview&#xD;&#xA;We have a system that leverages both instanced pallets and non-instanced pallets. Specifically, we have pallets that maintain on-chain merkle trees. We can have many instances of these pallets, a la `::&lt;T: Config&lt;I&gt;, I: 'static&gt;` type trait definitions.&#xD;&#xA;&#xD;&#xA;The questions we have particularly relate to tightly coupling instanced pallets with non-instanced pallets, i.e. a pallet with just `::&lt;T: Config&gt;` implementations.&#xD;&#xA;&#xD;&#xA;## Broken Non-instanced pallet Config&#xD;&#xA;Currently the non-instanced pallet `Config` needs to provide some instance to instantiate the tight coupling between the instanced pallet as follows. However, the non-instanced pallet has no notion of instances `I` so this of course doesn't compile. The traits in question are implemented with instances and so do not work in this environment.&#xD;&#xA;```rust &#xD;&#xA;pub trait Config: frame_system::Config + pallet_balances::Config {&#xD;&#xA;	...&#xD;&#xA;&#xD;&#xA;	/// VAnchor Interface&#xD;&#xA;	type VAnchor: VAnchorInterface&lt;VAnchorConfigration&lt;Self, I&gt;&gt;&#xD;&#xA;		+ VAnchorInspector&lt;VAnchorConfigration&lt;Self, I&gt;&gt;;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Ideal Non-instanced pallet Config&#xD;&#xA;The ideal case would be to have a new trait that somehow encompasses an individual instance of the instanced pallet while not restricting it to `Instance1` or `Instance2` even if that would be possible. What we have in mind is something such as&#xD;&#xA;```rust&#xD;&#xA;pub trait Config: frame_system::Config + pallet_balances::Config {&#xD;&#xA;	...&#xD;&#xA;&#xD;&#xA;	/// VAnchor Interface&#xD;&#xA;	type VAnchor: VAnchorInterface&lt;VAnchorConfigrationInstance&lt;Self&gt;&gt;&#xD;&#xA;		+ VAnchorInspector&lt;VAnchorConfigrationInstance&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;However we are unsure how to massage these into reality.&#xD;&#xA;&#xD;&#xA;## Runtime Implementation&#xD;&#xA;The goal for our runtime is to provide something akin to the following:&#xD;&#xA;```&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		...&#xD;&#xA;		// VAnchor&#xD;&#xA;		VAnchorBn254: pallet_vanchor::&lt;Instance1&gt;::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;		VAnchorBls381: pallet_vanchor::&lt;Instance2&gt;::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;		PalletInQuestion: pallet_in_question::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl pallet_in_question::Config for Runtime {&#xD;&#xA;    VAnchor = VAnchorBn254&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Questions&#xD;&#xA;1. Is this doable and sensible?&#xD;&#xA;2. Are there examples or design patterns for this.&#xD;&#xA;3. How to work around the lack of instancing in the non-instanced pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30045" PostHistoryTypeId="1" PostId="7637" RevisionGUID="b7c24637-7454-45ba-a5b5-5fa7c011716d" CreationDate="2023-03-14T21:46:30.333" UserId="74" Text="Combining instanced pallets w/ non-instanced pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="30046" PostHistoryTypeId="3" PostId="7637" RevisionGUID="b7c24637-7454-45ba-a5b5-5fa7c011716d" CreationDate="2023-03-14T21:46:30.333" UserId="74" Text="|pallet|runtime|loose-coupling|tight-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30047" PostHistoryTypeId="5" PostId="7631" RevisionGUID="2d36a65c-7c77-4757-8c0b-6a6b2fec7eca" CreationDate="2023-03-14T22:34:19.890" UserId="3140" Comment="added 16 characters in body" Text="Yes, WeightsV2 is the issue. You can do it the &quot;low level&quot; way with PolkadotJS that involves encoding / decoding the data, or if you are using React you can use [useink beta](https://www.npmjs.com/package/useink) `useContractTx` hook. &#xD;&#xA;&#xD;&#xA; 1. [Here is what it does under the hood](https://github.com/paritytech/useink/blob/fa37e428649e6c2a5be7e881b4737e346e978b05/core/hooks/useContractTx.ts#L42) if you are not using React. &#xD;&#xA; 2. With React: &#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;const contract = useContract(...yourArgs)&#xD;&#xA;const tx = useContactTx(contract, 'myMessageName');&#xD;&#xA;const txArgs = ['Squink', 1000];&#xD;&#xA;&#xD;&#xA;return (&#xD;&#xA;  &lt;div&gt;&#xD;&#xA;    &lt;button onClick(() =&gt; tx.send(txArgs)&gt;Submit&lt;/button&#xD;&#xA;    Status: {tx.status}&#xD;&#xA;  &lt;/div&gt;&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`useink` is beta now and has come big changes coming up, but it will do all of the nasty decoding work and handle WeightsV2 under the hood for you.&#xD;&#xA;&#xD;&#xA;There are more hooks in there you may find useful. E.g. `useContractCall`, which will read from the contract on each new block." ContentLicense="CC BY-SA 4.0" />
  <row Id="30048" PostHistoryTypeId="2" PostId="7638" RevisionGUID="4b2e1ec2-6059-47e5-98d3-f6c2e68ace5a" CreationDate="2023-03-15T00:11:21.887" UserId="3962" Text="SS58 is interesting. I did an implementation of it a couple months ago, and what I found is that we currently have one document -- https://docs.substrate.io/reference/address-formats/ -- with relatively complete information, other than just reading our implementation code.&#xD;&#xA;&#xD;&#xA;The order of your lines is a little confusing, but yes, you have the gist of the basic algorithm. Blake2b512 hash prefix + data. Take a checksum from that, and concat the address type, the payload (address), and the checksum to get the full sequence of bytes to base58encode.&#xD;&#xA;&#xD;&#xA;The wrinkle is that our address format doc specifies a wide variety of checksum lengths, from 1 to 8 bytes. HOWEVER, if you look at the implementation:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/src/sp_core/crypto.rs.html#269-309&#xD;&#xA;&#xD;&#xA;It just assumes a 2 byte checksum, like in your example, but I think that this is because it is just being applied to ed25519/sr25519 32 byte sequences, and isn't being used as a more general purpose library.&#xD;&#xA;&#xD;&#xA;If you go look at other implementations, like Polkascan's: https://github.com/polkascan/py-scale-codec/blob/master/scalecodec/utils/ss58.py&#xD;&#xA;&#xD;&#xA;Or Subscan's: https://github.com/subscan-explorer/subscan-essentials/blob/master/util/ss58/ss58.go&#xD;&#xA;&#xD;&#xA;You see something a little different. They will decode according to that variable checksum size table, but they only encode for a one or a two byte checksum, and only for a strict set of byte payload sizes.&#xD;&#xA;&#xD;&#xA;The wrinkle comes in when you are dealing with data that doesn't fit that ss58 checksum length table.&#xD;&#xA;&#xD;&#xA;So, can you SS58 encode a 20 byte string? Or a 57 byte string (or any other arbitrary size)? From a pure tech POV, of course you can. However, you have to pick the checksum size, and it's basically undefined behavior as far as I was able to discern back when I was hunting for information.&#xD;&#xA;&#xD;&#xA;What I did in my implementation (https://wyhaines.github.io/base58.cr/Base58/SS58.html) was to separate SS58 encoding of substrate addresses from SS58 encoding of arbitrary data, and for the arbitrary data, I assign a checksum length of 2 by default. Given that the use-case, using SS58 on payloads of something other than 1, 2, 4, 8,  or 32 bytes, is currently undefined so far as I can tell, picking a reasonable default is about all that one can do right now." ContentLicense="CC BY-SA 4.0" />
  <row Id="30050" PostHistoryTypeId="2" PostId="7639" RevisionGUID="078ba276-add4-49db-8b0d-7e0b1c0ef5fb" CreationDate="2023-03-15T05:55:06.913" UserId="406" Text="I am using the polkadot version 0.9.36, I run test cases of all the pallets in the frame by using the **cargo test** command, every pallet test case is working fine but when I run the bags-list pallet test case it shows some error like this *T::ScoreProvider::set_score_of(&amp;origin_middle, dest_bag_thresh);  &#xD;&#xA;   |                           ^^^^^^^^^^^^ function or associated item not found in `&lt;T as pallet::Config&lt;I&gt;&gt;::ScoreProvider`*" ContentLicense="CC BY-SA 4.0" />
  <row Id="30052" PostHistoryTypeId="1" PostId="7639" RevisionGUID="078ba276-add4-49db-8b0d-7e0b1c0ef5fb" CreationDate="2023-03-15T05:55:06.913" UserId="406" Text="Bags-list pallet test case not running" ContentLicense="CC BY-SA 4.0" />
  <row Id="30053" PostHistoryTypeId="3" PostId="7639" RevisionGUID="078ba276-add4-49db-8b0d-7e0b1c0ef5fb" CreationDate="2023-03-15T05:55:06.913" UserId="406" Text="|polkadot|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30054" PostHistoryTypeId="5" PostId="7639" RevisionGUID="368c259d-63ba-4cd2-b213-aa303c9d8732" CreationDate="2023-03-15T05:58:27.927" UserId="251" Comment="added 16 characters in body" Text="I am using the polkadot version 0.9.36, I run test cases of all the pallets in the frame by using the **cargo test** command, every pallet test case is working fine but when I run the bags-list pallet test case it shows some error like this &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;T::ScoreProvider::set_score_of(&amp;origin_middle, dest_bag_thresh);  &#xD;&#xA;   |                           ^^^^^^^^^^^^ function or associated item not found in `&lt;T as pallet::Config&lt;I&gt;&gt;::ScoreProvider`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30055" PostHistoryTypeId="5" PostId="7581" RevisionGUID="efe8e751-1b89-4a63-b35e-cd1fd96ed3fe" CreationDate="2023-03-15T06:01:18.677" UserId="83" Comment="remove duplicate sentence" Text="Upon closer inspection of that benchmarking code [here](https://github.com/paritytech/substrate/blob/master/bin/node/bench/src/generator.rs#L32) where they generate a trie using the db type `kvdb::KeyValueDB`, I noticed in the Cargo.toml file that we were now using version of [kvdb = &quot;0.13.0&quot;](https://docs.rs/kvdb/0.13.0) which is now a _&quot;Generic key-value trait&quot;_.&#xD;&#xA;&#xD;&#xA;Initially I was confused because in an earlier version [kvdb = &quot;0.1.0&quot;](https://docs.rs/kvdb/0.1.0) it was a _&quot;Key-Value store abstraction with RocksDB backend&quot;_. So it appears substantial work has been performed by Parity to make that abstraction _generic_ so that the trait [`KeyValueDB`](https://docs.rs/kvdb/0.13.0/kvdb/trait.KeyValueDB.html) is a _&quot;Generic key-value database&quot;_ that may be used by ParityDB's embedded in-memory `kvdb-memorydb = &quot;0.13.0&quot;` library or RocksDB's `kvdb-rocksdb = &quot;0.17.0&quot;` library." ContentLicense="CC BY-SA 4.0" />
  <row Id="30056" PostHistoryTypeId="2" PostId="7640" RevisionGUID="2e53b55b-66b7-454f-b5cd-62a221daca1f" CreationDate="2023-03-15T06:28:39.570" UserId="2372" Text="How to write the genesis hash in the teleportation to enable the communication of two chains through bridge.By adding the genesis hash it will be easier for the one chain to reach another chain. Otherwise it is giving the error of unreachable&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bBbAM.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/bSuWs.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30058" PostHistoryTypeId="1" PostId="7640" RevisionGUID="2e53b55b-66b7-454f-b5cd-62a221daca1f" CreationDate="2023-03-15T06:28:39.570" UserId="2372" Text="How to enable the teleportation for genesis hash in the parity-bridges" ContentLicense="CC BY-SA 4.0" />
  <row Id="30059" PostHistoryTypeId="3" PostId="7640" RevisionGUID="2e53b55b-66b7-454f-b5cd-62a221daca1f" CreationDate="2023-03-15T06:28:39.570" UserId="2372" Text="|parachain|xcm|substrate-parachain-template|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30060" PostHistoryTypeId="6" PostId="7640" RevisionGUID="0b54e1c3-cb1b-44f9-b101-112b1568c170" CreationDate="2023-03-15T06:39:24.680" UserId="2372" Comment="edited tags" Text="|parachain|rust|xcm|substrate-parachain-template|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30061" PostHistoryTypeId="2" PostId="7641" RevisionGUID="61e4e284-0ec8-4a35-91ae-782596504f6c" CreationDate="2023-03-15T06:54:56.327" UserId="227" Text="A minimal reproducer would be helpful for answering the question in more depth. So ideally code for a message in contract A and a message in contract B.&#xD;&#xA;&#xD;&#xA;That being said, the issue in this case is often that either the selector doesn't exist or the contract doesn't exist.&#xD;&#xA;&#xD;&#xA;Try the following:&#xD;&#xA;&#xD;&#xA;Instead of &#xD;&#xA;```rust&#xD;&#xA;let selector: [u8; 4] = [0xbd, 0x77, 0x15, 0xef];&#xD;&#xA;...&#xD;&#xA;ExecutionInput::new(Selector::new(selector))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;you can write:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;my_message&quot;)))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will automatically compute the selector bytes, ensuring that there was no mistake when transforming it manually to a byte array.&#xD;&#xA;&#xD;&#xA;For `self.liquidity_pool_address`: Check if you do any castings to `AccountId` here. Sometimes I see contracts that do some weird stuff to get a `String` into `AccountId`.&#xD;&#xA;&#xD;&#xA;You could try having a message `fn test(&amp;self, acc_id: AccountId)` that contains the code you posted above, but instead of `self.liquidity_pool_address` it would use the message argument `acc_id`. This way you can test it with a properly typed `AccountId`; `polkadot-js`, Contracts UI and `cargo-contract` will automatically transform the supplied account id to the correct type." ContentLicense="CC BY-SA 4.0" />
  <row Id="30063" PostHistoryTypeId="2" PostId="7642" RevisionGUID="3728d4d6-416e-4c9d-b050-698d3a1b5355" CreationDate="2023-03-15T07:05:31.997" UserId="227" Text="Built-in overflow protection doesn't exist in AssemblyScript as of now: https://github.com/AssemblyScript/assemblyscript/issues/447.&#xD;&#xA;&#xD;&#xA;You should be able to use a safe arithmetic library though." ContentLicense="CC BY-SA 4.0" />
  <row Id="30065" PostHistoryTypeId="2" PostId="7643" RevisionGUID="d12111ed-3f5b-48aa-8805-512a10317faa" CreationDate="2023-03-15T07:10:47.513" UserId="227" Text="There have been multiple new releases of `swanky-cli` since you posted: https://github.com/AstarNetwork/swanky-cli/releases.&#xD;&#xA;&#xD;&#xA;There were some fixes for handling contract artifacts and it's likely that your issue will be resolved by using a recent `swanky-cli` version." ContentLicense="CC BY-SA 4.0" />
  <row Id="30067" PostHistoryTypeId="2" PostId="7644" RevisionGUID="4e63eae7-2f3d-4e8b-ba8f-f3f416021786" CreationDate="2023-03-15T07:20:16.623" UserId="227" Text="The ink! documentation on [Contract Debugging](https://use.ink/basics/contract-debugging/) should be helpful here.&#xD;&#xA;&#xD;&#xA;You could e.g. add a `ink::env::debug_println!(&quot;item: {:?}&quot;, _item);` statement in your loop to see if there even is any iteration happening. The output will be visible on your shell, for the `substrate-contracts-node -lerror,runtime::contracts=debug` process." ContentLicense="CC BY-SA 4.0" />
  <row Id="30069" PostHistoryTypeId="2" PostId="7645" RevisionGUID="d181aac4-25de-4e03-93e4-895ec3bdb1d4" CreationDate="2023-03-15T07:50:12.727" UserId="275" Text="What is Storage deposit, is it different from Existential deposit?&#xD;&#xA;All storage usage (not only pallet_balances, frame_system account info, pallet_contract's contract storage) is backed by someone's deposit in Substrate to incentivise unused storage cleanup?&#xD;&#xA;In other words, storage deposit is universal concepts in Substrate or concepts in specific pallets." ContentLicense="CC BY-SA 4.0" />
  <row Id="30071" PostHistoryTypeId="1" PostId="7645" RevisionGUID="d181aac4-25de-4e03-93e4-895ec3bdb1d4" CreationDate="2023-03-15T07:50:12.727" UserId="275" Text="What is Storage Deposit?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30072" PostHistoryTypeId="3" PostId="7645" RevisionGUID="d181aac4-25de-4e03-93e4-895ec3bdb1d4" CreationDate="2023-03-15T07:50:12.727" UserId="275" Text="|substrate-node-template|pallet|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30073" PostHistoryTypeId="5" PostId="7645" RevisionGUID="1d8f2dc6-add8-430a-ac93-4e4286c2f243" CreationDate="2023-03-15T08:13:46.343" UserId="275" Comment="added 76 characters in body" Text="Storage deposit is for economic security as explained [here][1].&#xD;&#xA;&#xD;&#xA;All storage usage (not only pallet_balances, frame_system account info, pallet_preimage, pallet_contract's contract storage for e.g.) is backed by someone's deposit in Substrate to incentivise unused storage cleanup?&#xD;&#xA;In other words, storage deposit is universal concepts in Substrate or concepts in specific pallets.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/4003/275" ContentLicense="CC BY-SA 4.0" />
  <row Id="30074" PostHistoryTypeId="4" PostId="7645" RevisionGUID="1d8f2dc6-add8-430a-ac93-4e4286c2f243" CreationDate="2023-03-15T08:13:46.343" UserId="275" Comment="added 76 characters in body" Text="All pallets requires storage deposit to operate extrinsics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30078" PostHistoryTypeId="5" PostId="7645" RevisionGUID="16fb9c80-c307-472f-a318-008b48e2783a" CreationDate="2023-03-15T08:38:24.763" UserId="275" Comment="added 55 characters in body" Text="Storage deposit is for economic security as explained [here][1].&#xD;&#xA;&#xD;&#xA;All storage usage (not only pallet_balances, frame_system account info, pallet_preimage, pallet_contract's contract storage for e.g.) is backed by someone's deposit in Substrate to incentivise unused storage cleanup?&#xD;&#xA;In other words, storage deposit is universal concepts in Substrate which enforce some amount of deposits to all pallets' db entries or concepts in specific pallets.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/4003/275" ContentLicense="CC BY-SA 4.0" />
  <row Id="30079" PostHistoryTypeId="2" PostId="7646" RevisionGUID="702033c7-9e18-45c8-80be-53ac2ee395ab" CreationDate="2023-03-15T08:58:33.977" UserId="3317" Text="This the encoded bytes for sending trap instruction:&#xD;&#xA;&gt;0x6300010100030419e5c0&#xD;&#xA;&#xD;&#xA;**Explanation**:&#xD;&#xA;```&#xD;&#xA;dest: XcmVersionedMultiLocation = V3 (version 3) {&#xD;&#xA;    parent :u8 =&gt; 1 (going one level up and pointing to relaychain)&#xD;&#xA;    interior: XcmV3Junctions =&gt; Here (we want to execute the instruction in relaychain)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;message: XcmVersionedXcm : V3 (version 3) {&#xD;&#xA;    0: XcmV3Instruction: XcmV3Instruction =&gt; Trap (XCM instruction)&#xD;&#xA;    Trap: Compact&lt;u64&gt;: 1234 (user defined value to trap)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**Result**:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LBUaN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30081" PostHistoryTypeId="2" PostId="7647" RevisionGUID="90476608-9d17-4b82-a986-0a7ff7fa6f52" CreationDate="2023-03-15T08:59:44.470" UserId="3317" Text="020419ac is the encoded version of XCM Trap instruction.&#xD;&#xA;Trap(43) -&gt; Encoded form = 020419ac" ContentLicense="CC BY-SA 4.0" />
  <row Id="30083" PostHistoryTypeId="2" PostId="7648" RevisionGUID="0cf7c66e-fd9c-43a5-b616-ec84546e5cd9" CreationDate="2023-03-15T09:05:56.247" UserId="3344" Text="Is there an elegant way to get the total amount staked &amp; rewarded for each era/block?&#xD;&#xA;&#xD;&#xA;Right now I get a list of `staking.Bonded` data from Subscan:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;code&quot;: 0,&#xD;&#xA;  &quot;message&quot;: &quot;Success&quot;,&#xD;&#xA;  &quot;generated_at&quot;: 1678864944,&#xD;&#xA;  &quot;data&quot;: {&#xD;&#xA;    &quot;count&quot;: 422214,&#xD;&#xA;    &quot;events&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 1464944600037,&#xD;&#xA;        &quot;block_timestamp&quot;: 1678847754,&#xD;&#xA;        &quot;event_index&quot;: &quot;14649446-37&quot;,&#xD;&#xA;        &quot;extrinsic_index&quot;: &quot;14649446-2&quot;,&#xD;&#xA;        &quot;phase&quot;: 0,&#xD;&#xA;        &quot;module_id&quot;: &quot;staking&quot;,&#xD;&#xA;        &quot;event_id&quot;: &quot;Bonded&quot;,&#xD;&#xA;        &quot;extrinsic_hash&quot;: &quot;0x8c9b68aa856100f9fcc2668bd4dcbdb86c3be13a955ea70c96b076fb0836fd5c&quot;,&#xD;&#xA;        &quot;finalized&quot;: true&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;id&quot;: 1464943300048,&#xD;&#xA;        &quot;block_timestamp&quot;: 1678847676,&#xD;&#xA;        &quot;event_index&quot;: &quot;14649433-48&quot;,&#xD;&#xA;        &quot;extrinsic_index&quot;: &quot;14649433-3&quot;,&#xD;&#xA;        &quot;phase&quot;: 0,&#xD;&#xA;        &quot;module_id&quot;: &quot;staking&quot;,&#xD;&#xA;        &quot;event_id&quot;: &quot;Bonded&quot;,&#xD;&#xA;        &quot;extrinsic_hash&quot;: &quot;0xb6444aa174dd7cb14a7bb39f8ed18112e7912a7974274cd578f4feef1c62fae8&quot;,&#xD;&#xA;        &quot;finalized&quot;: true&#xD;&#xA;      },&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I parse the extrinsics with `node decode-extrinsic.js events.json` where `decode-extrinsic.js` is:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;#!/usr/bin/env node&#xD;&#xA;&#xD;&#xA;// Using the Polkadot Mainnet Endpoint&#xD;&#xA;const { ApiPromise, WsProvider } = require(&quot;@polkadot/api&quot;);&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;  // Construct a provider with the endpoint URL&#xD;&#xA;  const provider = new WsProvider(&quot;wss://rpc.polkadot.io/&quot;);&#xD;&#xA;  // Create an API instance for Polkadot&#xD;&#xA;  const api = await ApiPromise.create({ provider });&#xD;&#xA;  // ...&#xD;&#xA;  const fs = require(&quot;fs&quot;);&#xD;&#xA;&#xD;&#xA;  // Read events data:&#xD;&#xA;  // $ node decode-extrinsic.js &quot;$SCRIPTPATH/../data/pages/$network-staking-$page.json&quot;&#xD;&#xA;  const fileNames = process.argv.splice(2);&#xD;&#xA;  const fileName = fileNames[0];&#xD;&#xA;  var data = JSON.parse(fs.readFileSync(fileName, &quot;utf-8&quot;));&#xD;&#xA;&#xD;&#xA;  const promises = data.data.events.map(async (ev, index) =&gt; {&#xD;&#xA;    const exampleBlockNumber = parseInt(ev.extrinsic_index.split(&quot;-&quot;)[0]);&#xD;&#xA;    const extrinsicHash = ev.extrinsic_hash;&#xD;&#xA;&#xD;&#xA;    const blockHash = await api.rpc.chain.getBlockHash(exampleBlockNumber);&#xD;&#xA;&#xD;&#xA;    const signedBlock = await api.rpc.chain.getBlock(blockHash);&#xD;&#xA;    signedBlock.block.extrinsics.forEach(async (ex, index) =&gt; {&#xD;&#xA;      if (extrinsicHash === ex.hash.toHex()) {&#xD;&#xA;        // console.log(index, ex.toHuman());&#xD;&#xA;        const {&#xD;&#xA;          isSigned,&#xD;&#xA;          era,&#xD;&#xA;          method: { args, method, section },&#xD;&#xA;        } = ex;&#xD;&#xA;        console.log(&#xD;&#xA;          `${era.toHuman().MortalEra.period},${exampleBlockNumber},${args&#xD;&#xA;            .map((a) =&gt; a.toString())&#xD;&#xA;            .join(&quot;, &quot;)}`&#xD;&#xA;        );&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;    //  console.log(ev, exampleBlockNumber, extrinsicHash);&#xD;&#xA;  })&#xD;&#xA;  await Promise.all(promises);&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;main()&#xD;&#xA;  .catch(console.error)&#xD;&#xA;  .finally(() =&gt; process.exit());&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;However, this produces a jumble of mixed data:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;64,14649433,Rewards&#xD;&#xA;64,14649433,12Vj1D1QYSgHwmdqvy9fCsLgtBM1d8uxSAu9UqCEopYs5drH, 1032800000000, Stash&#xD;&#xA;64,14649446,13urTj2o1zArvYKNMzZaow5rGrjRxkFNSSwpr4Y3J1WqFbqH, 1176551239546, Stash&#xD;&#xA;64,14648832,500000000000&#xD;&#xA;64,14648796,31600000000&#xD;&#xA;64,14648792,67600000000&#xD;&#xA;64,14648812,145300000000&#xD;&#xA;64,14648750,Rewards&#xD;&#xA;64,14649408,330000000000&#xD;&#xA;64,14648237,10000000000&#xD;&#xA;64,14648533,850000000000&#xD;&#xA;64,14649360,320000000000&#xD;&#xA;64,14648787,97500000000&#xD;&#xA;64,14648176,{&quot;freeBalance&quot;:3200000000}&#xD;&#xA;64,14648803,45200000000&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Appreciate any hints or tips." ContentLicense="CC BY-SA 4.0" />
  <row Id="30085" PostHistoryTypeId="1" PostId="7648" RevisionGUID="0cf7c66e-fd9c-43a5-b616-ec84546e5cd9" CreationDate="2023-03-15T09:05:56.247" UserId="3344" Text="Calculate total staked &amp; rewarded for validation per era/block" ContentLicense="CC BY-SA 4.0" />
  <row Id="30086" PostHistoryTypeId="3" PostId="7648" RevisionGUID="0cf7c66e-fd9c-43a5-b616-ec84546e5cd9" CreationDate="2023-03-15T09:05:56.247" UserId="3344" Text="|rpc|staking|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30087" PostHistoryTypeId="2" PostId="7649" RevisionGUID="3fbadf95-0665-46f9-8a01-dd7cbde31058" CreationDate="2023-03-15T09:19:05.090" UserId="2762" Text="Yes, as you said is for economic security.&#xD;&#xA;&#xD;&#xA;See also this answer by Gav in a previous StackExhange Question: [Is there a limit to the size of a map in Pallet storage?][2]&#xD;&#xA;&#xD;&#xA;&gt; The deposit scheme helps ensure that (even after 10 years) the state is storing a manageable amount of data and only that which is the most economically valuable. Polkadot employs this technique ubiquitously.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As an example of how the deposit is helpful for security I like to see the [Recovery pallet][1]. The Recovery pallet is an M-of-N social recovery tool for users to gain access to their accounts if the private key or other authentication mechanism is lost. &#xD;&#xA;&#xD;&#xA;It has two deposits:&#xD;&#xA;&#xD;&#xA; - `ConfigDepositBase` * `FriendDepositFactor` : The amount of currency needed to reserve for creating a recovery configuration.&#xD;&#xA;&#xD;&#xA; - `RecoveryDeposit`: The base amount of currency needed to reserve for starting a recovery.&#xD;&#xA;&#xD;&#xA;The first one is the typical example as you mention for incentivise unused storage cleanup and the second is primarily held for deterring malicious recovery attempts, and should have a value large enough that a bad actor would choose not to place this deposit. He will lose it if he is discovered during the attack.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/recovery/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/88/is-there-a-limit-to-the-size-of-a-map-in-pallet-storage/92#92" ContentLicense="CC BY-SA 4.0" />
  <row Id="30089" PostHistoryTypeId="2" PostId="7650" RevisionGUID="1a873d06-e61a-4bc7-a9ab-59deb1092e59" CreationDate="2023-03-15T09:28:06.877" UserId="451" Text="Ideally the client itself would resolve the correct error from the metadata. However, given the raw error code you can look it up manually:&#xD;&#xA;&#xD;&#xA;Find the code for the runtime of the node you are running, and in `lib.rs` you can see all the pallets defined in `construct_runtime!`. Count the pallets starting from 0, in this case `7` is the `Contracts` pallet:&#xD;&#xA;&#xD;&#xA;https://github.com/AstarNetwork/swanky-node/blob/main/runtime/src/lib.rs#L478&#xD;&#xA;&#xD;&#xA;Now we need to find the error in `pallet-contracts`. It is `0x02`, which will be the error at position 2. In this case `OutOfGas`:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/1d9a139dd96bf5d1583c725bae6fcac5a0805372/frame/contracts/src/lib.rs#L826&#xD;&#xA;&#xD;&#xA;So you can add a few more zeros to that gas amount. I don't know whether swanky supports this but other tools e.g. [`cargo-contract`][1] will first perform a dry-run which will automatically estimate the amount of gas required, so you are unlikely to get this error.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/" ContentLicense="CC BY-SA 4.0" />
  <row Id="30091" PostHistoryTypeId="2" PostId="7651" RevisionGUID="3664c469-b624-424e-8861-f4325c70f63c" CreationDate="2023-03-15T10:38:07.087" UserId="80" Text="Total amount staked per era can be read from the storage item [ErasTotalStake][1].&#xD;&#xA;&#xD;&#xA;To get total payout that will eventually be rewarded for an era (unless never claimed), you can read the storage item [ErasValidatorReward][2].&#xD;&#xA;&#xD;&#xA;I want to clarify that staking reward payouts in Polkadot and Kusama are lazy. What this means is rewards need to be claimed for each validator separately and are claimable up to 84 eras. If after 84 eras, the rewards are not claimed, they are purged. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage/#erastotalstakeu32-u128&#xD;&#xA;  [2]: https://polkadot.js.org/docs/substrate/storage/#erasvalidatorrewardu32-optionu128" ContentLicense="CC BY-SA 4.0" />
  <row Id="30093" PostHistoryTypeId="2" PostId="7652" RevisionGUID="07db3e98-6f42-4018-950e-5a41761dfa50" CreationDate="2023-03-15T11:12:29.390" UserId="16" Text="This is not possible because a contract assumes to be always called by a another address. In order for that to work we would need to add this functionality to `pallet-contracts`. We would need a host function like `is_root` which would be true if the `call` dispatchable was called by root. However, what would we return from `caller`? Probably a hard coded placeholder address.&#xD;&#xA;&#xD;&#xA;There are also much more origins than root. Since runtime authors can just add more origins it is not possible to support all of them. Maybe supporting the ones used in the new government would be nice." ContentLicense="CC BY-SA 4.0" />
  <row Id="30095" PostHistoryTypeId="52" PostId="7630" RevisionGUID="1423a55c-92b4-44c0-ad83-47432669438e" CreationDate="2023-03-15T11:39:16.130" />
  <row Id="30100" PostHistoryTypeId="2" PostId="7654" RevisionGUID="03a8895b-e2fc-4fe0-ad00-86c28b7aba89" CreationDate="2023-03-15T12:08:50.787" UserId="3963" Text="Thank you for your question.&#xD;&#xA;&#xD;&#xA;I think the `NetworkId` `ByGenesis` should be described as the hash of the genesis block of your chain. It can be queried using the chain::getBlockHash(0) RPC request as depicted below (example uses polkadot).&#xD;&#xA;&#xD;&#xA;Once you have the genesis hash you can use [hex_literal][1] to create the appropriate type. &#xD;&#xA;&#xD;&#xA;Hope this helps!&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/hex-literal/latest/hex_literal/&#xD;&#xA;  [2]: https://i.stack.imgur.com/WN8UT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30102" PostHistoryTypeId="2" PostId="7655" RevisionGUID="8ed7dbc2-924e-4be2-aa55-db7f9a167b08" CreationDate="2023-03-15T13:15:40.677" UserId="2103" Text="I added a custom pallet to the node-template-module. It was compiling before with just the `pallet-template` but not working with my newly added pallet. Here is the compilation error that I get: &#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/dexer/work/substrate/dot-marketplace-v2/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/dexer/work/substrate/dot-marketplace-v2/target/release/build/node-template-runtime-8390732738fc4e81/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: RUSTFLAGS=&quot;-C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/dexer/work/substrate/dot-marketplace-v2/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.70.0-nightly (22f247c6f 2023-03-13)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling sp-io v7.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.39#1837f423)&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/Users/dexer/work/substrate/dot-marketplace-v2/runtime)&#xD;&#xA;  error[E0433]: failed to resolve: could not find `format` in `alloc`&#xD;&#xA;      --&gt; /Users/dexer/.cargo/git/checkouts/substrate-7e08433d4c370a21/1837f42/primitives/io/src/lib.rs:1643:31&#xD;&#xA;       |&#xD;&#xA;  1643 |     let message = sp_std::alloc::format!(&quot;{}&quot;, info);&#xD;&#xA;       |                                  ^^^^^^ could not find `format` in `alloc`&#xD;&#xA;&#xD;&#xA;  error[E0152]: found duplicate lang item `panic_impl`&#xD;&#xA;      --&gt; /Users/dexer/.cargo/git/checkouts/substrate-7e08433d4c370a21/1837f42/primitives/io/src/lib.rs:1642:1&#xD;&#xA;       |&#xD;&#xA;  1642 | pub fn panic(info: &amp;core::panic::PanicInfo) -&gt; ! {&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;       |&#xD;&#xA;       = note: the lang item is first defined in crate `std` (which `sp_std` depends on)&#xD;&#xA;       = note: first definition in `std` loaded from /Users/dexer/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-d66a635e2d91bd07.rlib&#xD;&#xA;       = note: second definition in the local crate (`sp_io`)&#xD;&#xA;&#xD;&#xA;  Some errors have detailed explanations: E0152, E0433.&#xD;&#xA;  For more information about an error, try `rustc --explain E0152`.&#xD;&#xA;```&#xD;&#xA;Below is my `cargo.toml` file for the custom pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-tasking&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.2.2&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;sp-std = { version = &quot;5.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;&#xD;&#xA;#local dependencies&#xD;&#xA;tasking-traits = { default-features = false, path = &quot;../../traits/tasking-traits&quot; }&#xD;&#xA;tasking-primitives = { default-features = false, path = &quot;../../primitives/tasking-primitives&quot; }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { version = &quot;7.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;sp-io = { version = &quot;7.0.0&quot;,  default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;sp-runtime = { version = &quot;7.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30104" PostHistoryTypeId="1" PostId="7655" RevisionGUID="8ed7dbc2-924e-4be2-aa55-db7f9a167b08" CreationDate="2023-03-15T13:15:40.677" UserId="2103" Text="sp-io v7.0.0 not compiling" ContentLicense="CC BY-SA 4.0" />
  <row Id="30105" PostHistoryTypeId="3" PostId="7655" RevisionGUID="8ed7dbc2-924e-4be2-aa55-db7f9a167b08" CreationDate="2023-03-15T13:15:40.677" UserId="2103" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30106" PostHistoryTypeId="2" PostId="7656" RevisionGUID="8dd87463-7d9b-4746-866e-6a235a555ceb" CreationDate="2023-03-15T13:36:31.120" UserId="3838" Text="There's any private key rotation using substrate ? i ask this question regarding a did implementation, step are :&#xD;&#xA;&#xD;&#xA; 1. hash a data and signe it with an account&#xD;&#xA;&#xD;&#xA; 2. another account should be able to verify this data buy using the public key and the data signed&#xD;&#xA;&#xD;&#xA; 3. i have this question, if the private key is rotated how i can implement the step 2&#xD;&#xA;&#xD;&#xA;thank you in advance for your help" ContentLicense="CC BY-SA 4.0" />
  <row Id="30108" PostHistoryTypeId="1" PostId="7656" RevisionGUID="8dd87463-7d9b-4746-866e-6a235a555ceb" CreationDate="2023-03-15T13:36:31.120" UserId="3838" Text="private key rotation" ContentLicense="CC BY-SA 4.0" />
  <row Id="30109" PostHistoryTypeId="3" PostId="7656" RevisionGUID="8dd87463-7d9b-4746-866e-6a235a555ceb" CreationDate="2023-03-15T13:36:31.120" UserId="3838" Text="|account|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30110" PostHistoryTypeId="2" PostId="7657" RevisionGUID="32eb682c-c2c6-4380-8e63-08bf3460188e" CreationDate="2023-03-15T13:54:10.603" UserId="251" Text="You should also disable `sp-std`'s default features.&#xD;&#xA;&#xD;&#xA;You missed that one.&#xD;&#xA;&#xD;&#xA;And I recommend you use subalfred to check this.&#xD;&#xA;&#xD;&#xA;https://subalfred.hack.ink/user/cli/check.html#features" ContentLicense="CC BY-SA 4.0" />
  <row Id="30112" PostHistoryTypeId="5" PostId="7655" RevisionGUID="1f3675cf-7df6-4b0a-9616-36d3b640baad" CreationDate="2023-03-15T13:55:49.643" UserId="251" Comment="added 6 characters in body" Text="I added a custom pallet to the node-template-module. It was compiling before with just the `pallet-template` but not working with my newly added pallet. Here is the compilation error that I get: &#xD;&#xA;```rs&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/dexer/work/substrate/dot-marketplace-v2/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/dexer/work/substrate/dot-marketplace-v2/target/release/build/node-template-runtime-8390732738fc4e81/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: RUSTFLAGS=&quot;-C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/dexer/work/substrate/dot-marketplace-v2/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.70.0-nightly (22f247c6f 2023-03-13)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling sp-io v7.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.39#1837f423)&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/Users/dexer/work/substrate/dot-marketplace-v2/runtime)&#xD;&#xA;  error[E0433]: failed to resolve: could not find `format` in `alloc`&#xD;&#xA;      --&gt; /Users/dexer/.cargo/git/checkouts/substrate-7e08433d4c370a21/1837f42/primitives/io/src/lib.rs:1643:31&#xD;&#xA;       |&#xD;&#xA;  1643 |     let message = sp_std::alloc::format!(&quot;{}&quot;, info);&#xD;&#xA;       |                                  ^^^^^^ could not find `format` in `alloc`&#xD;&#xA;&#xD;&#xA;  error[E0152]: found duplicate lang item `panic_impl`&#xD;&#xA;      --&gt; /Users/dexer/.cargo/git/checkouts/substrate-7e08433d4c370a21/1837f42/primitives/io/src/lib.rs:1642:1&#xD;&#xA;       |&#xD;&#xA;  1642 | pub fn panic(info: &amp;core::panic::PanicInfo) -&gt; ! {&#xD;&#xA;       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;       |&#xD;&#xA;       = note: the lang item is first defined in crate `std` (which `sp_std` depends on)&#xD;&#xA;       = note: first definition in `std` loaded from /Users/dexer/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-d66a635e2d91bd07.rlib&#xD;&#xA;       = note: second definition in the local crate (`sp_io`)&#xD;&#xA;&#xD;&#xA;  Some errors have detailed explanations: E0152, E0433.&#xD;&#xA;  For more information about an error, try `rustc --explain E0152`.&#xD;&#xA;```&#xD;&#xA;Below is my `cargo.toml` file for the custom pallet:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-tasking&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.2.2&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;sp-std = { version = &quot;5.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;&#xD;&#xA;#local dependencies&#xD;&#xA;tasking-traits = { default-features = false, path = &quot;../../traits/tasking-traits&quot; }&#xD;&#xA;tasking-primitives = { default-features = false, path = &quot;../../primitives/tasking-primitives&quot; }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { version = &quot;7.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;sp-io = { version = &quot;7.0.0&quot;,  default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;sp-runtime = { version = &quot;7.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.39&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30113" PostHistoryTypeId="2" PostId="7658" RevisionGUID="ab7fd164-6826-4c49-8e01-9e5a75aba772" CreationDate="2023-03-15T15:07:15.043" UserId="377" Text="If we currently have the live solochain and in future we need to go on parachain how we will migrate the data from the existing solochain to parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="30115" PostHistoryTypeId="1" PostId="7658" RevisionGUID="ab7fd164-6826-4c49-8e01-9e5a75aba772" CreationDate="2023-03-15T15:07:15.043" UserId="377" Text="how we can migrate the solochain data to the parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30116" PostHistoryTypeId="3" PostId="7658" RevisionGUID="ab7fd164-6826-4c49-8e01-9e5a75aba772" CreationDate="2023-03-15T15:07:15.043" UserId="377" Text="|parachain|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30117" PostHistoryTypeId="5" PostId="7573" RevisionGUID="4cca6696-2451-450b-b9fa-41b8ff973816" CreationDate="2023-03-15T15:32:11.210" UserId="227" Comment="added 15 characters in body" Text="For ink!, the term Gas refers to the resources used by a contract call. It's important for smart contracts that the caller has to pay for any utilized resource. Those resources can be either storage space (for storing something in the contract's storage) or computational time (for executing the contract and its logic). The term Gas encompasses both of these resources: `Gas = (refTime, proofSize)`.&#xD;&#xA;&#xD;&#xA;The terms hereby refer to:&#xD;&#xA;&#xD;&#xA;`refTime`: The amount of computational time that can be used for execution, in picoseconds.&#xD;&#xA;&#xD;&#xA;`proofSize`: The amount of storage in bytes that a transaction is allowed to read.&#xD;&#xA;&#xD;&#xA;`refTime` comes from &quot;reference time&quot;, referring to Substrate's Weights system, where computation time is benchmarked on reference hardware. You can read more details [here](https://docs.substrate.io/reference/how-to-guides/weights/).&#xD;&#xA;&#xD;&#xA;For ink!, Gas is a synonym to &quot;Weight&quot;, we just use this term to make onboarding easier for devs from other smart contract ecosystems. So `Gas = Weight = (refTime, proofSize)`.&#xD;&#xA;&#xD;&#xA;Specifically, these terms come from Substrate's Weights V2 system, which was recently introduced." ContentLicense="CC BY-SA 4.0" />
  <row Id="30118" PostHistoryTypeId="2" PostId="7659" RevisionGUID="529191dd-c475-4ebb-bb24-6270e10f4ef6" CreationDate="2023-03-15T16:03:28.490" UserId="3963" Text="There is a newly released video by parity on [launching a Parachain][1]. It might help you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://youtu.be/7DZwVXzi9x0" ContentLicense="CC BY-SA 4.0" />
  <row Id="30120" PostHistoryTypeId="2" PostId="7660" RevisionGUID="37c680c7-a52e-4170-bfbb-5bb73f44ad9b" CreationDate="2023-03-15T16:28:38.017" UserId="3637" Text="when I run substrate-node-template, some command use &quot;--base-path&quot; to specify custom base path. However, I want to know what is the default path if I don't set &quot;--base-path&quot;. Thank you in advance!!!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="30122" PostHistoryTypeId="1" PostId="7660" RevisionGUID="37c680c7-a52e-4170-bfbb-5bb73f44ad9b" CreationDate="2023-03-15T16:28:38.017" UserId="3637" Text="what is the default path if I don't set &quot;--base-path&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30123" PostHistoryTypeId="3" PostId="7660" RevisionGUID="37c680c7-a52e-4170-bfbb-5bb73f44ad9b" CreationDate="2023-03-15T16:28:38.017" UserId="3637" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30124" PostHistoryTypeId="2" PostId="7661" RevisionGUID="156e4a83-e350-4e2f-930a-bede67a20fcf" CreationDate="2023-03-15T16:34:37.683" UserId="251" Text="Different OS has different default path.&#xD;&#xA;&#xD;&#xA;When you run the chain it will show:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-16 00:33:24  Database: RocksDb at /xxx/db/full&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`/xxx` is what you are looking for.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For linux, it is `$HOME/.local/share/&lt;CHAIN_NAME&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="30126" PostHistoryTypeId="2" PostId="7662" RevisionGUID="91c3351b-3d00-4d0a-ae55-a3c130585262" CreationDate="2023-03-15T19:34:11.227" UserId="2484" Text="Hello valuable Substrate community,&#xD;&#xA;&#xD;&#xA;I started two rococo-local relaychain validators and one custom parachain. The target block time of the parachain is 12 seconds, but the actual block time is 24 seconds on average.&#xD;&#xA;&#xD;&#xA;I am using a MacBook Air M1.&#xD;&#xA;&#xD;&#xA;How can I reduce the block time to 12 seconds?&#xD;&#xA;&#xD;&#xA;What is the cause of the slow block production on my local setup?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30128" PostHistoryTypeId="1" PostId="7662" RevisionGUID="91c3351b-3d00-4d0a-ae55-a3c130585262" CreationDate="2023-03-15T19:34:11.227" UserId="2484" Text="How to fix slow parachain block time on rococo-local?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30129" PostHistoryTypeId="3" PostId="7662" RevisionGUID="91c3351b-3d00-4d0a-ae55-a3c130585262" CreationDate="2023-03-15T19:34:11.227" UserId="2484" Text="|rococo|parachain-collator|block-production|rococo-local|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30130" PostHistoryTypeId="2" PostId="7663" RevisionGUID="ad4fb590-46d1-48e9-9b07-1d5bebbaca8f" CreationDate="2023-03-16T03:53:04.883" UserId="3966" Text="&#xD;&#xA;I was building a Parachain using Zombienet. However, I was having trouble generating blocks on Parachain.&#xD;&#xA;&#xD;&#xA;Does anyone have any idea why this might be?&#xD;&#xA;&#xD;&#xA;Relaychain and Parachain using v0.9.37 version&#xD;&#xA;&#xD;&#xA;zombienet config&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;../polkadot/target/release/polkadot&quot;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1001&#xD;&#xA;chain = &quot;local&quot;&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;	# run alice as parachain collator&#xD;&#xA;	[[parachains.collators]]&#xD;&#xA;	name = &quot;alice&quot;&#xD;&#xA;	validator = true&#xD;&#xA;	command = &quot;./target/release/parachain-template-node&quot;&#xD;&#xA;	args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I attach log below&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-16 07:48:00.038  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853    &#xD;&#xA;2023-03-16 07:48:00.038  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #49 (0x42b0…c38b)    &#xD;&#xA;2023-03-16 07:48:00.040  INFO tokio-runtime-worker cumulus-collator: [Parachain] Starting collation. relay_parent=0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b at=0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853&#xD;&#xA;2023-03-16 07:48:00.041 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=49 block_hash=0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b num_candidates=0&#xD;&#xA;2023-03-16 07:48:00.041 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b, 49)]&#xD;&#xA;2023-03-16 07:48:00.041  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1 (1 ms) [hash: 0x04f4592592a48185e0ea71edd98706779bef1ae5f45f85f225f0af53c71cb27c; parent_hash: 0x6a44…5853; extrinsics (2): [0x9f6a…baa2, 0x84bf…8737]]    &#xD;&#xA;2023-03-16 07:48:00.043  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 1. Hash now 0xa25ce1d8560373d3bac7747a4d737745a392c8f4223eb569465193da277c44c2, previously 0x04f4592592a48185e0ea71edd98706779bef1ae5f45f85f225f0af53c71cb27c.    &#xD;&#xA;2023-03-16 07:48:00.043 DEBUG tokio-runtime-worker parachain: [Parachain] Detected leaves overflow at height 1, removing 1 obsolete blocks    &#xD;&#xA;2023-03-16 07:48:00.043 DEBUG tokio-runtime-worker parachain: [Parachain] Removing block (@1) 0xda99d95ee356aea604cdf37855187309681d750d6e46639db49149d14713430f    &#xD;&#xA;2023-03-16 07:48:00.043  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0xa25c…44c2)    &#xD;&#xA;2023-03-16 07:48:00.043  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.5634765625kb, storage_proof: 2.541015625kb }&#xD;&#xA;2023-03-16 07:48:00.043  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 4.5361328125kb&#xD;&#xA;2023-03-16 07:48:00.043  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0xa25ce1d8560373d3bac7747a4d737745a392c8f4223eb569465193da277c44c2&#xD;&#xA;2023-03-16 07:48:00.044 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0xf511dd8ef44acff2bfee58402a6ac906647697e16bc36f8b86161197b60b63b8 pov_hash=0x4d08becdfdbae1dc5d0f525b223785bc4614abc65808e2f46a84ef61c7a15467 relay_parent=0x97169d4c94c9a6c652b37312e3c0ff5aeabdbfb9f6e026fad219242e2dd786e2 para_id=1337 traceID=325753621752425749890681166552416045318&#xD;&#xA;2023-03-16 07:48:00.044 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=4&#xD;&#xA;2023-03-16 07:48:00.044  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853    &#xD;&#xA;2023-03-16 07:48:00.044 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=1337 relay_parent=0x9716…86e2 candidate_hash=0xf511dd8ef44acff2bfee58402a6ac906647697e16bc36f8b86161197b60b63b8 pov_hash=0x4d08becdfdbae1dc5d0f525b223785bc4614abc65808e2f46a84ef61c7a15467 core=CoreIndex(0) current_validators=[Public(d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...))] traceID=325753621752425749890681166552416045318&#xD;&#xA;2023-03-16 07:48:00.044 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators request peer_set=Collation requested=1 failed_to_resolve=0&#xD;&#xA;2023-03-16 07:48:00.044 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Collation num_peers=1 removed=0&#xD;&#xA;2023-03-16 07:48:00.045  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1 (0 ms) [hash: 0xfb1afa4c5eda34bf76380e575e53b2aff568686e0badb9fe301406852b8c121d; parent_hash: 0x6a44…5853; extrinsics (2): [0xc39d…d23a, 0xa2fa…0ddd]]    &#xD;&#xA;2023-03-16 07:48:00.047  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 1. Hash now 0xc3ad69af821fa178b368c9ffb327301a91a8c5ac13f88bb7e3a2abda338e0241, previously 0xfb1afa4c5eda34bf76380e575e53b2aff568686e0badb9fe301406852b8c121d.    &#xD;&#xA;2023-03-16 07:48:00.047 DEBUG tokio-runtime-worker parachain: [Parachain] Detected leaves overflow at height 1, removing 1 obsolete blocks    &#xD;&#xA;2023-03-16 07:48:00.047 DEBUG tokio-runtime-worker parachain: [Parachain] Removing block (@1) 0x6faa1282cd1a89c082ea48824f312374b531ebd60a07b45527369e47c3b08ac7    &#xD;&#xA;2023-03-16 07:48:00.048  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0xc3ad…0241)    &#xD;&#xA;2023-03-16 07:48:00.048  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.5634765625kb, storage_proof: 2.541015625kb }&#xD;&#xA;2023-03-16 07:48:00.048  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 4.5361328125kb&#xD;&#xA;2023-03-16 07:48:00.048  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0xc3ad69af821fa178b368c9ffb327301a91a8c5ac13f88bb7e3a2abda338e0241&#xD;&#xA;2023-03-16 07:48:00.049 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x8d0b0abfdc3356f0349ec3c2caa16f183208b84ab0e35f6c8485a58c5edf0772 pov_hash=0x0786675eafd45289475ec7ac9e0cb4478f5087023a53acb4bb86477c57d8cfd9 relay_parent=0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b para_id=1337 traceID=187478480695940865856567399663383179032&#xD;&#xA;2023-03-16 07:48:00.049 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=4&#xD;&#xA;2023-03-16 07:48:00.049 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=1337 relay_parent=0x42b0…c38b candidate_hash=0x8d0b0abfdc3356f0349ec3c2caa16f183208b84ab0e35f6c8485a58c5edf0772 pov_hash=0x0786675eafd45289475ec7ac9e0cb4478f5087023a53acb4bb86477c57d8cfd9 core=CoreIndex(0) current_validators=[Public(d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...))] traceID=187478480695940865856567399663383179032&#xD;&#xA;2023-03-16 07:48:00.049 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators request peer_set=Collation requested=1 failed_to_resolve=0&#xD;&#xA;2023-03-16&#xD;&#xA; 07:48:00.049 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Collation num_peers=1 removed=0&#xD;&#xA;2023-03-16 07:48:02.779 DEBUG tokio-runtime-worker parachain::network-bridge-rx: [Relaychain] action=&quot;PeerConnected&quot; peer_set=Collation version=1 peer=PeerId(&quot;12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&quot;) role=Authority&#xD;&#xA;2023-03-16 07:48:02.781 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Advertising collation. relay_parent=0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b peer_id=12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;2023-03-16 07:48:02.781 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Advertising collation. relay_parent=0x97169d4c94c9a6c652b37312e3c0ff5aeabdbfb9f6e026fad219242e2dd786e2 peer_id=12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;2023-03-16 07:48:02.781 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Advertising collation. relay_parent=0xf65066cb2296547f304de69132211de95f6dc04ed809ad6159eef47c9b062d0f peer_id=12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;2023-03-16 07:48:02.984 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1678830482 min_ts=0 max_ts=0&#xD;&#xA;2023-03-16 07:48:02.984  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (2 peers), best: #49 (0x9716…86e2), finalized #45 (0x2c6e…45f6), ⬇ 1.2kiB/s ⬆ 3.9kiB/s    &#xD;&#xA;2023-03-16 07:48:03.043  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x6a44…5853), finalized #0 (0x6a44…5853), ⬇ 49 B/s ⬆ 49 B/s    &#xD;&#xA;2023-03-16 07:48:04.855 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0xf65066cb2296547f304de69132211de95f6dc04ed809ad6159eef47c9b062d0f&#xD;&#xA;2023-03-16 07:48:04.855 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Collation was requested. candidate_hash=0xd82c59df80bf9de60cc9d662dd2be5f2324dabee32a738a2563c7cb7a45395a5 pov_hash=0x574f2034b66d8ffccc36df3d2477703c5d56039622870f0044874135f6c85bf1 traceID=287343530993498058386381695300221527538&#xD;&#xA;2023-03-16 07:48:04.855 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0x6048d256ee5379df72a11d0b5f154353386934132628ce8af929a0d8f1fdde67 block_number=47&#xD;&#xA;2023-03-16 07:48:04.857 DEBUG tokio-runtime-worker parachain::network-bridge-rx: [Relaychain] action=&quot;PeerDisconnected&quot; peer_set=Collation peer=PeerId(&quot;12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&quot;)&#xD;&#xA;2023-03-16 07:48:06.039  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #50 (0xb576…1f64)    &#xD;&#xA;2023-03-16 07:48:06.040 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x97169d4c94c9a6c652b37312e3c0ff5aeabdbfb9f6e026fad219242e2dd786e2&#xD;&#xA;2023-03-16 07:48:06.040 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Collation was requested. candidate_hash=0xf511dd8ef44acff2bfee58402a6ac906647697e16bc36f8b86161197b60b63b8 pov_hash=0x4d08becdfdbae1dc5d0f525b223785bc4614abc65808e2f46a84ef61c7a15467 traceID=325753621752425749890681166552416045318&#xD;&#xA;2023-03-16 07:48:06.055 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=50 block_hash=0xb5764856a4a518c5522a528c8646cb72ef9a4a68244bcdf390b8b7eda81d1f64 num_candidates=0&#xD;&#xA;2023-03-16 07:48:06.055 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0xb5764856a4a518c5522a528c8646cb72ef9a4a68244bcdf390b8b7eda81d1f64, 50)]&#xD;&#xA;2023-03-16 07:48:06.055  INFO tokio-runtime-worker cumulus-collator: [Parachain] Starting collation. relay_parent=0xb5764856a4a518c5522a528c8646cb72ef9a4a68244bcdf390b8b7eda81d1f64 at=0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853&#xD;&#xA;2023-03-16 07:48:06.057  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853    &#xD;&#xA;2023-03-16 07:48:06.061  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1 (0 ms) [hash: 0x643971918fd25b32b209b479d1ddbcd7b68d8ebcf9d9cc1a34c56eeef4871350; parent_hash: 0x6a44…5853; extrinsics (2): [0xe4a7…bfe9, 0x2577…85ed]]    &#xD;&#xA;2023-03-16 07:48:06.065  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 1. Hash now 0x3225c4901671b2d7c577f510f9983ddc27d684451fd200350c00d32af7837469, previously 0x643971918fd25b32b209b479d1ddbcd7b68d8ebcf9d9cc1a34c56eeef4871350.    &#xD;&#xA;2023-03-16 07:48:06.065 DEBUG tokio-runtime-worker parachain: [Parachain] Detected leaves overflow at height 1, removing 1 obsolete blocks    &#xD;&#xA;2023-03-16 07:48:06.065 DEBUG tokio-runtime-worker parachain: [Parachain] Removing block (@1) 0x9299e349ccef5347477d1a4446c6bc6e794f205fc0d3c1f5db5965d5b69c6e15    &#xD;&#xA;2023-03-16 07:48:06.065  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0x3225…7469)    &#xD;&#xA;2023-03-16 07:48:06.065  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.5634765625kb, storage_proof: 2.541015625kb }&#xD;&#xA;2023-03-16 07:48:06.066  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 4.5361328125kb&#xD;&#xA;2023-03-16 07:48:06.066  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x3225c4901671b2d7c577f510f9983ddc27d684451fd200350c00d32af7837469&#xD;&#xA;2023-03-16 07:48:06.066 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x7c928ebfc4dd5b3f59d17e0c6a6a723e018f4e27caa1bc100f871f2b236e5606 pov_hash=0x342f1fcbb03c2ed4ab1760e37e9115351d8e345c893a45afcc7f530894015a0e relay_parent=0xb5764856a4a518c5522a528c8646cb72ef9a4a68244bcdf390b8b7eda81d1f64 para_id=1337 traceID=165585242114345077270611585845787521598&#xD;&#xA;2023-03-16 07:48:06.067 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=4&#xD;&#xA;2023-03-16 07:48:06.067 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=1337 relay_parent=0xb576…1f64 candidate_hash=0x7c928ebfc4dd5b3f59d17e0c6a6a723e018f4e27caa1bc100f871f2b236e5606 pov_hash=0x342f1fcbb03c2ed4ab1760e37e9115351d8e345c893a45afcc7f530894015a0e core=CoreIndex(0) current_validators=[Public(d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...))] traceID=165585242114345077270611585845787521598&#xD;&#xA;2023-03-16 07:48:06.067 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators request peer_set=Collation requested=1 failed_to_resolve=0&#xD;&#xA;2023-03-16 07:48:06.067 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Collation num_peers=1 removed=0&#xD;&#xA;2023-03-16 07:48:07.989 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1678830487 min_ts=0 max_ts=0&#xD;&#xA;2023-03-16 07:48:07.989  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (1 peers), best: #50 (0xb576…1f64), finalized #47 (0x6048…de67), ⬇ 0.9kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2023-03-16 07:48:08.043  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x6a44…5853), finalized #0 (0x6a44…5853), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-03-16 07:48:12.042  INFO tokio-runtime-worker babe: [Relaychain]  New epoch 5 launching at block 0x80b9…d37a (block slot 279820082 &gt;= start slot 279820082).    &#xD;&#xA;2023-03-16 07:48:12.042  INFO tokio-runtime-worker babe: [Relaychain]  Next epoch starts at slot 279820092    &#xD;&#xA;2023-03-16 07:48:12.044  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #51 (0x80b9…d37a)    &#xD;&#xA;2023-03-16 07:48:12.044 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0xb5764856a4a518c5522a528c8646cb72ef9a4a68244bcdf390b8b7eda81d1f64&#xD;&#xA;2023-03-16 07:48:12.044  WARN tokio-runtime-worker parachain::collator-protocol: [Relaychain] Collation wasn't advertised to any validator. candidate_hash=0x7c928ebfc4dd5b3f59d17e0c6a6a723e018f4e27caa1bc100f871f2b236e5606 pov_hash=0x342f1fcbb03c2ed4ab1760e37e9115351d8e345c893a45afcc7f530894015a0e traceID=165585242114345077270611585845787521598&#xD;&#xA;2023-03-16 07:48:12.054 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] New session detected session_index=5&#xD;&#xA;2023-03-16 07:48:12.055 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] Determined past/present/future authorities authority_count=2&#xD;&#xA;2023-03-16 07:48:12.055 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] Issuing a connection request num=0&#xD;&#xA;2023-03-16 07:48:12.055 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] error=NotAValidator&#xD;&#xA;2023-03-16 07:48:12.055 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Validation num_peers=0 removed=0&#xD;&#xA;2023-03-16 07:48:12.056  INFO tokio-runtime-worker parachain::approval-voting: [Relaychain] Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 4, new_window_start: 0, new_window_end: 5 }&#xD;&#xA;2023-03-16 07:48:12.056  INFO tokio-runtime-worker cumulus-collator: [Parachain] Starting collation. relay_parent=0x80b9cbd9af3186233549151b5081931b8bfbc09d45515c2ca878beecd65ad37a at=0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853&#xD;&#xA;2023-03-16 07:48:12.057  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853    &#xD;&#xA;2023-03-16 07:48:12.057 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=51 block_hash=0x80b9cbd9af3186233549151b5081931b8bfbc09d45515c2ca878beecd65ad37a num_candidates=0&#xD;&#xA;2023-03-16 07:48:12.057 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x80b9cbd9af3186233549151b5081931b8bfbc09d45515c2ca878beecd65ad37a, 51)]&#xD;&#xA;2023-03-16 07:48:12.059  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1 (0 ms) [hash: 0xa30aa31f4521ce6e280715b14035285b14e1519ab5953a4f00da0202290929a2; parent_hash: 0x6a44…5853; extrinsics (2): [0x6893…80bf, 0x4739…cf8e]]    &#xD;&#xA;2023-03-16 07:48:12.061  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 1. Hash now 0x96245bd88f2c9fdc4ecc384e25c9f9352bfb05247a0b92aa5f38e644c7c20f05, previously 0xa30aa31f4521ce6e280715b14035285b14e1519ab5953a4f00da0202290929a2.    &#xD;&#xA;2023-03-16 07:48:12.061 DEBUG tokio-runtime-worker parachain: [Parachain] Detected leaves overflow at height 1, removing 1 obsolete blocks    &#xD;&#xA;2023-03-16 07:48:12.061 DEBUG tokio-runtime-worker parachain: [Parachain] Removing block (@1) 0xee767444582d6da85df4f3a9118c998f298d0497fb044c9bad00761736f8c5c6    &#xD;&#xA;2023-03-16 07:48:12.061  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.5634765625kb, storage_proof: 2.541015625kb }&#xD;&#xA;2023-03-16 07:48:12.061  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 4.537109375kb&#xD;&#xA;2023-03-16 07:48:12.061  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0x9624…0f05)    &#xD;&#xA;2023-03-16 07:48:12.062  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x96245bd88f2c9fdc4ecc384e25c9f9352bfb05247a0b92aa5f38e644c7c20f05&#xD;&#xA;2023-03-16 07:48:12.062 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x65a64007b79c04e658a0cb4c19efc74178678e3742f88af4f54bb2d16f084589 pov_hash=0x67ce387919b018691493b26b457935d7ba5e7d7902a697e0eb4d5d93ae5542fc relay_parent=0x80b9cbd9af3186233549151b5081931b8bfbc09d45515c2ca878beecd65ad37a para_id=1337 traceID=135115247538429428220147497216846579521&#xD;&#xA;2023-03-16 07:48:12.062 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=5&#xD;&#xA;2023-03-16 07:48:12.062 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=1337 relay_parent=0x80b9…d37a candidate_hash=0x65a64007b79c04e658a0cb4c19efc74178678e3742f88af4f54bb2d16f084589 pov_hash=0x67ce387919b018691493b26b457935d7ba5e7d7902a697e0eb4d5d93ae5542fc core=CoreIndex(0) current_validators=[Public(8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48 (5FHneW46...))] traceID=135115247538429428220147497216846579521&#xD;&#xA;2023-03-16 07:48:12.062 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators request peer_set=Collation requested=1 failed_to_resolve=0&#xD;&#xA;2023-03-16 07:48:12.062 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Collation num_peers=1 removed=1&#xD;&#xA;2023-03-16 07:48:12.063 DEBUG tokio-runtime-worker parachain::network-bridge-rx: [Relaychain] action=&quot;PeerConnected&quot; peer_set=Collation version=1 peer=PeerId(&quot;12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby&quot;) role=Authority&#xD;&#xA;2023-03-16 07:48:12.064 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Advertising collation. relay_parent=0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b peer_id=12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby&#xD;&#xA;2023-03-16 07:48:12.064 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Advertising collation. relay_parent=0x80b9cbd9af3186233549151b5081931b8bfbc09d45515c2ca878beecd65ad37a peer_id=12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby&#xD;&#xA;2023-03-16 07:48:12.994 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1678830492 min_ts=0 max_ts=0&#xD;&#xA;2023-03-16 07:48:12.994  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (1 peers), best: #51 (0x80b9…d37a), finalized #47 (0x6048…de67), ⬇ 1.2kiB/s ⬆ 2.4kiB/s    &#xD;&#xA;2023-03-16 07:48:13.047  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x6a44…5853), finalized #0 (0x6a44…5853), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-03-16 07:48:17.994 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1678830497 min_ts=0 max_ts=0&#xD;&#xA;2023-03-16 07:48:17.995  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (2 peers), best: #51 (0x80b9…d37a), finalized #47 (0x6048…de67), ⬇ 0.5kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2023-03-16 07:48:18.051  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x6a44…5853), finalized #0 (0x6a44…5853), ⬇ 49 B/s ⬆ 49 B/s    &#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30132" PostHistoryTypeId="1" PostId="7663" RevisionGUID="ad4fb590-46d1-48e9-9b07-1d5bebbaca8f" CreationDate="2023-03-16T03:53:04.883" UserId="3966" Text="Parachain doesn't producing block" ContentLicense="CC BY-SA 4.0" />
  <row Id="30133" PostHistoryTypeId="3" PostId="7663" RevisionGUID="ad4fb590-46d1-48e9-9b07-1d5bebbaca8f" CreationDate="2023-03-16T03:53:04.883" UserId="3966" Text="|parachain|block|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30134" PostHistoryTypeId="2" PostId="7664" RevisionGUID="1c8546a0-8d24-4e52-8212-54d96a43356b" CreationDate="2023-03-16T05:40:10.513" UserId="3965" Text="I'm trying to encapsulate some host functions so that I can call them in pallets.&#xD;&#xA;&#xD;&#xA;I use sp_runtime_interface::runtime_interface to declare a trait, give the default implementation in the declaration, and then call it in the pallet. &#xD;&#xA;&#xD;&#xA;You can see https://github.com/briceyan/substrate-host-function for the demo repo.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// file: host/src/lib.rs&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;use sp_runtime_interface::runtime_interface;&#xD;&#xA;&#xD;&#xA;#[runtime_interface]&#xD;&#xA;pub trait HostApi {&#xD;&#xA;	fn double(n: u32) -&gt; u32 {&#xD;&#xA;		n * 2&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// file: pallets/template/src/lib.rs&#xD;&#xA;    // snip&#xD;&#xA;    #[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        // snip&#xD;&#xA;		#[pallet::call_index(0)]&#xD;&#xA;		#[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;		pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let n: u32 = host_api::double(something);&#xD;&#xA;&#xD;&#xA;			// Update storage.&#xD;&#xA;			&lt;Something&lt;T&gt;&gt;::put(n);&#xD;&#xA;&#xD;&#xA;			// Emit an event.&#xD;&#xA;			Self::deposit_event(Event::SomethingStored { something: n, who });&#xD;&#xA;			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;    // snip&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The code compiles but fails to run due to the following error message:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;➜  substrate-host-function git:(main) ./target/release/node-template --dev&#xD;&#xA;2023-03-16 13:20:54 Substrate Node&#xD;&#xA;2023-03-16 13:20:54 ✌️  version 4.0.0-dev-33607da1ed4&#xD;&#xA;2023-03-16 13:20:54 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2023&#xD;&#xA;2023-03-16 13:20:54  Chain specification: Development&#xD;&#xA;2023-03-16 13:20:54   Node name: gratis-sleet-4678&#xD;&#xA;2023-03-16 13:20:54  Role: AUTHORITY&#xD;&#xA;2023-03-16 13:20:54  Database: RocksDb at /var/folders/zz/cbfsklq95h9g3bs85nk4h5780000gp/T/substrateLqIz41/chains/dev/db/full&#xD;&#xA;2023-03-16 13:20:54 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;runtime requires function imports which are not present on the host: 'env:ext_host_api_double_version_1'&quot;)))&#xD;&#xA;2023-03-16 13:20:55 Cannot create a runtime error=Other(&quot;runtime requires function imports which are not present on the host: 'env:ext_host_api_double_version_1'&quot;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30136" PostHistoryTypeId="1" PostId="7664" RevisionGUID="1c8546a0-8d24-4e52-8212-54d96a43356b" CreationDate="2023-03-16T05:40:10.513" UserId="3965" Text="How to provide host functions and make it callable from pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30137" PostHistoryTypeId="3" PostId="7664" RevisionGUID="1c8546a0-8d24-4e52-8212-54d96a43356b" CreationDate="2023-03-16T05:40:10.513" UserId="3965" Text="|host-functions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30138" PostHistoryTypeId="5" PostId="7663" RevisionGUID="13dee16c-ab0b-4000-8b26-3c7321ab85b2" CreationDate="2023-03-16T07:01:35.777" UserId="3966" Comment="added 358 characters in body" Text="&#xD;&#xA;I was building a Parachain using Zombienet. However, I was having trouble generating blocks on Parachain.&#xD;&#xA;&#xD;&#xA;Does anyone have any idea why this might be?&#xD;&#xA;&#xD;&#xA;Relaychain and Parachain using v0.9.37 version&#xD;&#xA;&#xD;&#xA;zombienet config&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;../polkadot/target/release/polkadot&quot;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1001&#xD;&#xA;chain = &quot;local&quot;&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;	# run alice as parachain collator&#xD;&#xA;	[[parachains.collators]]&#xD;&#xA;	name = &quot;alice&quot;&#xD;&#xA;	validator = true&#xD;&#xA;	command = &quot;./target/release/parachain-template-node&quot;&#xD;&#xA;	args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I attach log below&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-16 07:48:00.038  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853    &#xD;&#xA;2023-03-16 07:48:00.038  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #49 (0x42b0…c38b)    &#xD;&#xA;2023-03-16 07:48:00.040  INFO tokio-runtime-worker cumulus-collator: [Parachain] Starting collation. relay_parent=0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b at=0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853&#xD;&#xA;2023-03-16 07:48:00.041 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=49 block_hash=0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b num_candidates=0&#xD;&#xA;2023-03-16 07:48:00.041 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b, 49)]&#xD;&#xA;2023-03-16 07:48:00.041  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1 (1 ms) [hash: 0x04f4592592a48185e0ea71edd98706779bef1ae5f45f85f225f0af53c71cb27c; parent_hash: 0x6a44…5853; extrinsics (2): [0x9f6a…baa2, 0x84bf…8737]]    &#xD;&#xA;2023-03-16 07:48:00.043  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 1. Hash now 0xa25ce1d8560373d3bac7747a4d737745a392c8f4223eb569465193da277c44c2, previously 0x04f4592592a48185e0ea71edd98706779bef1ae5f45f85f225f0af53c71cb27c.    &#xD;&#xA;2023-03-16 07:48:00.043 DEBUG tokio-runtime-worker parachain: [Parachain] Detected leaves overflow at height 1, removing 1 obsolete blocks    &#xD;&#xA;2023-03-16 07:48:00.043 DEBUG tokio-runtime-worker parachain: [Parachain] Removing block (@1) 0xda99d95ee356aea604cdf37855187309681d750d6e46639db49149d14713430f    &#xD;&#xA;2023-03-16 07:48:00.043  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0xa25c…44c2)    &#xD;&#xA;2023-03-16 07:48:00.043  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.5634765625kb, storage_proof: 2.541015625kb }&#xD;&#xA;2023-03-16 07:48:00.043  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 4.5361328125kb&#xD;&#xA;2023-03-16 07:48:00.043  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0xa25ce1d8560373d3bac7747a4d737745a392c8f4223eb569465193da277c44c2&#xD;&#xA;2023-03-16 07:48:00.044 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0xf511dd8ef44acff2bfee58402a6ac906647697e16bc36f8b86161197b60b63b8 pov_hash=0x4d08becdfdbae1dc5d0f525b223785bc4614abc65808e2f46a84ef61c7a15467 relay_parent=0x97169d4c94c9a6c652b37312e3c0ff5aeabdbfb9f6e026fad219242e2dd786e2 para_id=1337 traceID=325753621752425749890681166552416045318&#xD;&#xA;2023-03-16 07:48:00.044 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=4&#xD;&#xA;2023-03-16 07:48:00.044  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853    &#xD;&#xA;2023-03-16 07:48:00.044 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=1337 relay_parent=0x9716…86e2 candidate_hash=0xf511dd8ef44acff2bfee58402a6ac906647697e16bc36f8b86161197b60b63b8 pov_hash=0x4d08becdfdbae1dc5d0f525b223785bc4614abc65808e2f46a84ef61c7a15467 core=CoreIndex(0) current_validators=[Public(d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...))] traceID=325753621752425749890681166552416045318&#xD;&#xA;2023-03-16 07:48:00.044 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators request peer_set=Collation requested=1 failed_to_resolve=0&#xD;&#xA;2023-03-16 07:48:00.044 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Collation num_peers=1 removed=0&#xD;&#xA;2023-03-16 07:48:00.045  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1 (0 ms) [hash: 0xfb1afa4c5eda34bf76380e575e53b2aff568686e0badb9fe301406852b8c121d; parent_hash: 0x6a44…5853; extrinsics (2): [0xc39d…d23a, 0xa2fa…0ddd]]    &#xD;&#xA;2023-03-16 07:48:00.047  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 1. Hash now 0xc3ad69af821fa178b368c9ffb327301a91a8c5ac13f88bb7e3a2abda338e0241, previously 0xfb1afa4c5eda34bf76380e575e53b2aff568686e0badb9fe301406852b8c121d.    &#xD;&#xA;2023-03-16 07:48:00.047 DEBUG tokio-runtime-worker parachain: [Parachain] Detected leaves overflow at height 1, removing 1 obsolete blocks    &#xD;&#xA;2023-03-16 07:48:00.047 DEBUG tokio-runtime-worker parachain: [Parachain] Removing block (@1) 0x6faa1282cd1a89c082ea48824f312374b531ebd60a07b45527369e47c3b08ac7    &#xD;&#xA;2023-03-16 07:48:00.048  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0xc3ad…0241)    &#xD;&#xA;2023-03-16 07:48:00.048  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.5634765625kb, storage_proof: 2.541015625kb }&#xD;&#xA;2023-03-16 07:48:00.048  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 4.5361328125kb&#xD;&#xA;2023-03-16 07:48:00.048  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0xc3ad69af821fa178b368c9ffb327301a91a8c5ac13f88bb7e3a2abda338e0241&#xD;&#xA;2023-03-16 07:48:00.049 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x8d0b0abfdc3356f0349ec3c2caa16f183208b84ab0e35f6c8485a58c5edf0772 pov_hash=0x0786675eafd45289475ec7ac9e0cb4478f5087023a53acb4bb86477c57d8cfd9 relay_parent=0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b para_id=1337 traceID=187478480695940865856567399663383179032&#xD;&#xA;2023-03-16 07:48:00.049 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=4&#xD;&#xA;2023-03-16 07:48:00.049 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=1337 relay_parent=0x42b0…c38b candidate_hash=0x8d0b0abfdc3356f0349ec3c2caa16f183208b84ab0e35f6c8485a58c5edf0772 pov_hash=0x0786675eafd45289475ec7ac9e0cb4478f5087023a53acb4bb86477c57d8cfd9 core=CoreIndex(0) current_validators=[Public(d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...))] traceID=187478480695940865856567399663383179032&#xD;&#xA;2023-03-16 07:48:00.049 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators request peer_set=Collation requested=1 failed_to_resolve=0&#xD;&#xA;2023-03-16&#xD;&#xA; 07:48:00.049 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Collation num_peers=1 removed=0&#xD;&#xA;2023-03-16 07:48:02.779 DEBUG tokio-runtime-worker parachain::network-bridge-rx: [Relaychain] action=&quot;PeerConnected&quot; peer_set=Collation version=1 peer=PeerId(&quot;12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&quot;) role=Authority&#xD;&#xA;2023-03-16 07:48:02.781 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Advertising collation. relay_parent=0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b peer_id=12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;2023-03-16 07:48:02.781 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Advertising collation. relay_parent=0x97169d4c94c9a6c652b37312e3c0ff5aeabdbfb9f6e026fad219242e2dd786e2 peer_id=12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;2023-03-16 07:48:02.781 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Advertising collation. relay_parent=0xf65066cb2296547f304de69132211de95f6dc04ed809ad6159eef47c9b062d0f peer_id=12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&#xD;&#xA;2023-03-16 07:48:02.984 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1678830482 min_ts=0 max_ts=0&#xD;&#xA;2023-03-16 07:48:02.984  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (2 peers), best: #49 (0x9716…86e2), finalized #45 (0x2c6e…45f6), ⬇ 1.2kiB/s ⬆ 3.9kiB/s    &#xD;&#xA;2023-03-16 07:48:03.043  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x6a44…5853), finalized #0 (0x6a44…5853), ⬇ 49 B/s ⬆ 49 B/s    &#xD;&#xA;2023-03-16 07:48:04.855 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0xf65066cb2296547f304de69132211de95f6dc04ed809ad6159eef47c9b062d0f&#xD;&#xA;2023-03-16 07:48:04.855 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Collation was requested. candidate_hash=0xd82c59df80bf9de60cc9d662dd2be5f2324dabee32a738a2563c7cb7a45395a5 pov_hash=0x574f2034b66d8ffccc36df3d2477703c5d56039622870f0044874135f6c85bf1 traceID=287343530993498058386381695300221527538&#xD;&#xA;2023-03-16 07:48:04.855 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0x6048d256ee5379df72a11d0b5f154353386934132628ce8af929a0d8f1fdde67 block_number=47&#xD;&#xA;2023-03-16 07:48:04.857 DEBUG tokio-runtime-worker parachain::network-bridge-rx: [Relaychain] action=&quot;PeerDisconnected&quot; peer_set=Collation peer=PeerId(&quot;12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm&quot;)&#xD;&#xA;2023-03-16 07:48:06.039  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #50 (0xb576…1f64)    &#xD;&#xA;2023-03-16 07:48:06.040 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x97169d4c94c9a6c652b37312e3c0ff5aeabdbfb9f6e026fad219242e2dd786e2&#xD;&#xA;2023-03-16 07:48:06.040 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Collation was requested. candidate_hash=0xf511dd8ef44acff2bfee58402a6ac906647697e16bc36f8b86161197b60b63b8 pov_hash=0x4d08becdfdbae1dc5d0f525b223785bc4614abc65808e2f46a84ef61c7a15467 traceID=325753621752425749890681166552416045318&#xD;&#xA;2023-03-16 07:48:06.055 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=50 block_hash=0xb5764856a4a518c5522a528c8646cb72ef9a4a68244bcdf390b8b7eda81d1f64 num_candidates=0&#xD;&#xA;2023-03-16 07:48:06.055 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0xb5764856a4a518c5522a528c8646cb72ef9a4a68244bcdf390b8b7eda81d1f64, 50)]&#xD;&#xA;2023-03-16 07:48:06.055  INFO tokio-runtime-worker cumulus-collator: [Parachain] Starting collation. relay_parent=0xb5764856a4a518c5522a528c8646cb72ef9a4a68244bcdf390b8b7eda81d1f64 at=0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853&#xD;&#xA;2023-03-16 07:48:06.057  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853    &#xD;&#xA;2023-03-16 07:48:06.061  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1 (0 ms) [hash: 0x643971918fd25b32b209b479d1ddbcd7b68d8ebcf9d9cc1a34c56eeef4871350; parent_hash: 0x6a44…5853; extrinsics (2): [0xe4a7…bfe9, 0x2577…85ed]]    &#xD;&#xA;2023-03-16 07:48:06.065  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 1. Hash now 0x3225c4901671b2d7c577f510f9983ddc27d684451fd200350c00d32af7837469, previously 0x643971918fd25b32b209b479d1ddbcd7b68d8ebcf9d9cc1a34c56eeef4871350.    &#xD;&#xA;2023-03-16 07:48:06.065 DEBUG tokio-runtime-worker parachain: [Parachain] Detected leaves overflow at height 1, removing 1 obsolete blocks    &#xD;&#xA;2023-03-16 07:48:06.065 DEBUG tokio-runtime-worker parachain: [Parachain] Removing block (@1) 0x9299e349ccef5347477d1a4446c6bc6e794f205fc0d3c1f5db5965d5b69c6e15    &#xD;&#xA;2023-03-16 07:48:06.065  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0x3225…7469)    &#xD;&#xA;2023-03-16 07:48:06.065  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.5634765625kb, storage_proof: 2.541015625kb }&#xD;&#xA;2023-03-16 07:48:06.066  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 4.5361328125kb&#xD;&#xA;2023-03-16 07:48:06.066  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x3225c4901671b2d7c577f510f9983ddc27d684451fd200350c00d32af7837469&#xD;&#xA;2023-03-16 07:48:06.066 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x7c928ebfc4dd5b3f59d17e0c6a6a723e018f4e27caa1bc100f871f2b236e5606 pov_hash=0x342f1fcbb03c2ed4ab1760e37e9115351d8e345c893a45afcc7f530894015a0e relay_parent=0xb5764856a4a518c5522a528c8646cb72ef9a4a68244bcdf390b8b7eda81d1f64 para_id=1337 traceID=165585242114345077270611585845787521598&#xD;&#xA;2023-03-16 07:48:06.067 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=4&#xD;&#xA;2023-03-16 07:48:06.067 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=1337 relay_parent=0xb576…1f64 candidate_hash=0x7c928ebfc4dd5b3f59d17e0c6a6a723e018f4e27caa1bc100f871f2b236e5606 pov_hash=0x342f1fcbb03c2ed4ab1760e37e9115351d8e345c893a45afcc7f530894015a0e core=CoreIndex(0) current_validators=[Public(d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d (5GrwvaEF...))] traceID=165585242114345077270611585845787521598&#xD;&#xA;2023-03-16 07:48:06.067 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators request peer_set=Collation requested=1 failed_to_resolve=0&#xD;&#xA;2023-03-16 07:48:06.067 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Collation num_peers=1 removed=0&#xD;&#xA;2023-03-16 07:48:07.989 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1678830487 min_ts=0 max_ts=0&#xD;&#xA;2023-03-16 07:48:07.989  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (1 peers), best: #50 (0xb576…1f64), finalized #47 (0x6048…de67), ⬇ 0.9kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2023-03-16 07:48:08.043  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x6a44…5853), finalized #0 (0x6a44…5853), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-03-16 07:48:12.042  INFO tokio-runtime-worker babe: [Relaychain]  New epoch 5 launching at block 0x80b9…d37a (block slot 279820082 &gt;= start slot 279820082).    &#xD;&#xA;2023-03-16 07:48:12.042  INFO tokio-runtime-worker babe: [Relaychain]  Next epoch starts at slot 279820092    &#xD;&#xA;2023-03-16 07:48:12.044  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #51 (0x80b9…d37a)    &#xD;&#xA;2023-03-16 07:48:12.044 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0xb5764856a4a518c5522a528c8646cb72ef9a4a68244bcdf390b8b7eda81d1f64&#xD;&#xA;2023-03-16 07:48:12.044  WARN tokio-runtime-worker parachain::collator-protocol: [Relaychain] Collation wasn't advertised to any validator. candidate_hash=0x7c928ebfc4dd5b3f59d17e0c6a6a723e018f4e27caa1bc100f871f2b236e5606 pov_hash=0x342f1fcbb03c2ed4ab1760e37e9115351d8e345c893a45afcc7f530894015a0e traceID=165585242114345077270611585845787521598&#xD;&#xA;2023-03-16 07:48:12.054 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] New session detected session_index=5&#xD;&#xA;2023-03-16 07:48:12.055 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] Determined past/present/future authorities authority_count=2&#xD;&#xA;2023-03-16 07:48:12.055 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] Issuing a connection request num=0&#xD;&#xA;2023-03-16 07:48:12.055 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] error=NotAValidator&#xD;&#xA;2023-03-16 07:48:12.055 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Validation num_peers=0 removed=0&#xD;&#xA;2023-03-16 07:48:12.056  INFO tokio-runtime-worker parachain::approval-voting: [Relaychain] Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 4, new_window_start: 0, new_window_end: 5 }&#xD;&#xA;2023-03-16 07:48:12.056  INFO tokio-runtime-worker cumulus-collator: [Parachain] Starting collation. relay_parent=0x80b9cbd9af3186233549151b5081931b8bfbc09d45515c2ca878beecd65ad37a at=0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853&#xD;&#xA;2023-03-16 07:48:12.057  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x6a449488cecc046777312294b9b46a2a91c15dde79612b2c7f93ca0574b55853    &#xD;&#xA;2023-03-16 07:48:12.057 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=51 block_hash=0x80b9cbd9af3186233549151b5081931b8bfbc09d45515c2ca878beecd65ad37a num_candidates=0&#xD;&#xA;2023-03-16 07:48:12.057 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x80b9cbd9af3186233549151b5081931b8bfbc09d45515c2ca878beecd65ad37a, 51)]&#xD;&#xA;2023-03-16 07:48:12.059  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1 (0 ms) [hash: 0xa30aa31f4521ce6e280715b14035285b14e1519ab5953a4f00da0202290929a2; parent_hash: 0x6a44…5853; extrinsics (2): [0x6893…80bf, 0x4739…cf8e]]    &#xD;&#xA;2023-03-16 07:48:12.061  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 1. Hash now 0x96245bd88f2c9fdc4ecc384e25c9f9352bfb05247a0b92aa5f38e644c7c20f05, previously 0xa30aa31f4521ce6e280715b14035285b14e1519ab5953a4f00da0202290929a2.    &#xD;&#xA;2023-03-16 07:48:12.061 DEBUG tokio-runtime-worker parachain: [Parachain] Detected leaves overflow at height 1, removing 1 obsolete blocks    &#xD;&#xA;2023-03-16 07:48:12.061 DEBUG tokio-runtime-worker parachain: [Parachain] Removing block (@1) 0xee767444582d6da85df4f3a9118c998f298d0497fb044c9bad00761736f8c5c6    &#xD;&#xA;2023-03-16 07:48:12.061  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.5634765625kb, storage_proof: 2.541015625kb }&#xD;&#xA;2023-03-16 07:48:12.061  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 4.537109375kb&#xD;&#xA;2023-03-16 07:48:12.061  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0x9624…0f05)    &#xD;&#xA;2023-03-16 07:48:12.062  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x96245bd88f2c9fdc4ecc384e25c9f9352bfb05247a0b92aa5f38e644c7c20f05&#xD;&#xA;2023-03-16 07:48:12.062 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x65a64007b79c04e658a0cb4c19efc74178678e3742f88af4f54bb2d16f084589 pov_hash=0x67ce387919b018691493b26b457935d7ba5e7d7902a697e0eb4d5d93ae5542fc relay_parent=0x80b9cbd9af3186233549151b5081931b8bfbc09d45515c2ca878beecd65ad37a para_id=1337 traceID=135115247538429428220147497216846579521&#xD;&#xA;2023-03-16 07:48:12.062 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=5&#xD;&#xA;2023-03-16 07:48:12.062 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=1337 relay_parent=0x80b9…d37a candidate_hash=0x65a64007b79c04e658a0cb4c19efc74178678e3742f88af4f54bb2d16f084589 pov_hash=0x67ce387919b018691493b26b457935d7ba5e7d7902a697e0eb4d5d93ae5542fc core=CoreIndex(0) current_validators=[Public(8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48 (5FHneW46...))] traceID=135115247538429428220147497216846579521&#xD;&#xA;2023-03-16 07:48:12.062 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators request peer_set=Collation requested=1 failed_to_resolve=0&#xD;&#xA;2023-03-16 07:48:12.062 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Collation num_peers=1 removed=1&#xD;&#xA;2023-03-16 07:48:12.063 DEBUG tokio-runtime-worker parachain::network-bridge-rx: [Relaychain] action=&quot;PeerConnected&quot; peer_set=Collation version=1 peer=PeerId(&quot;12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby&quot;) role=Authority&#xD;&#xA;2023-03-16 07:48:12.064 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Advertising collation. relay_parent=0x42b02bdd83099dfa31186f96660e53a22baa0f28cdd2e4efa89abc86efc2c38b peer_id=12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby&#xD;&#xA;2023-03-16 07:48:12.064 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Advertising collation. relay_parent=0x80b9cbd9af3186233549151b5081931b8bfbc09d45515c2ca878beecd65ad37a peer_id=12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby&#xD;&#xA;2023-03-16 07:48:12.994 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1678830492 min_ts=0 max_ts=0&#xD;&#xA;2023-03-16 07:48:12.994  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (1 peers), best: #51 (0x80b9…d37a), finalized #47 (0x6048…de67), ⬇ 1.2kiB/s ⬆ 2.4kiB/s    &#xD;&#xA;2023-03-16 07:48:13.047  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x6a44…5853), finalized #0 (0x6a44…5853), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-03-16 07:48:17.994 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1678830497 min_ts=0 max_ts=0&#xD;&#xA;2023-03-16 07:48:17.995  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (2 peers), best: #51 (0x80b9…d37a), finalized #47 (0x6048…de67), ⬇ 0.5kiB/s ⬆ 0.6kiB/s    &#xD;&#xA;2023-03-16 07:48:18.051  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #0 (0x6a44…5853), finalized #0 (0x6a44…5853), ⬇ 49 B/s ⬆ 49 B/s    &#xD;&#xA;```&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;In relaychain it comes error with below&#xD;&#xA;```&#xD;&#xA;2023-03-16 16:00:02 Failed to validate candidate para_id=Id(1000) error=InvalidCandidate(WorkerReportedError(&quot;execute: execute error: RuntimeConstruction(Other(\&quot;failed to instantiate a new WASM module instance: Insufficient resources: memory minimum size of 2086 pages exceeds memory limits\&quot;))&quot;))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30139" PostHistoryTypeId="2" PostId="7665" RevisionGUID="e271face-c1e3-44a8-bbba-e85fcc2feef5" CreationDate="2023-03-16T07:25:00.633" UserId="251" Text="It's a hard thing. You need to add it to the Substrate framework. Otherwise, you can not interact with other chains in the relaychain system.&#xD;&#xA;&#xD;&#xA;You can check how people discuss and push this thing.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/13031" ContentLicense="CC BY-SA 4.0" />
  <row Id="30141" PostHistoryTypeId="50" PostId="7195" RevisionGUID="a1101668-984a-4bb5-a0ef-7537038f58f0" CreationDate="2023-03-16T08:06:05.767" UserId="-1" />
  <row Id="30142" PostHistoryTypeId="2" PostId="7666" RevisionGUID="8641d61a-c314-4b1e-ae97-4ac010c520c1" CreationDate="2023-03-16T08:56:40.467" UserId="3252" Text="why the two ways to get blockhash is not same ?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vmKiH.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30144" PostHistoryTypeId="1" PostId="7666" RevisionGUID="8641d61a-c314-4b1e-ae97-4ac010c520c1" CreationDate="2023-03-16T08:56:40.467" UserId="3252" Text="Why the two ways to get blockhash is not same?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30145" PostHistoryTypeId="3" PostId="7666" RevisionGUID="8641d61a-c314-4b1e-ae97-4ac010c520c1" CreationDate="2023-03-16T08:56:40.467" UserId="3252" Text="|polkadot|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30146" PostHistoryTypeId="2" PostId="7667" RevisionGUID="e95430dc-ec01-45f6-be53-83b0fe523f1f" CreationDate="2023-03-16T09:29:54.770" UserId="251" Text="Maybe it's because your chain is producing blocks now.&#xD;&#xA;&#xD;&#xA;I think you can get the same result by specifying the block number.&#xD;&#xA;&#xD;&#xA;This RPC is always get the latest block if you didn't specify the block number." ContentLicense="CC BY-SA 4.0" />
  <row Id="30152" PostHistoryTypeId="2" PostId="7669" RevisionGUID="1c7075d3-5d97-4c05-a1fb-fae4279748bd" CreationDate="2023-03-16T10:00:31.957" UserId="2762" Text="Check the answer to this previous question on StackExchange: [Do not want to clean up the data of the independent chain, how to seamlessly connect to the parachain?][1]&#xD;&#xA;&#xD;&#xA;Also is not about migrate data but worth to check this tutorial in Substrate docs about how to [Convert a solo chain into a parachain][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/2334/2762&#xD;&#xA;  [2]: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="30158" PostHistoryTypeId="5" PostId="7669" RevisionGUID="65cd6aa5-b897-47a6-a644-343df8fbeb66" CreationDate="2023-03-16T11:29:31.367" UserId="2762" Comment="added 180 characters in body" Text="Check the answer to this previous question on StackExchange: [Do not want to clean up the data of the independent chain, how to seamlessly connect to the parachain?][1].&#xD;&#xA;&#xD;&#xA;I like to share too this video of the Sub0 conference: [Sub0 Online: Storage Migration - Standalone chain to Parachain][2] &#xD;&#xA;&#xD;&#xA;Also is not about migrate data but worth to check this tutorial in Substrate docs about how to [Convert a solo chain into a parachain][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/2334/2762&#xD;&#xA;  [2]: https://www.youtube.com/watch?v=sIgvyRFs-N4&#xD;&#xA;  [3]: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="30161" PostHistoryTypeId="2" PostId="7672" RevisionGUID="9279b4f7-148e-4bdf-bbae-611c9154cdbe" CreationDate="2023-03-16T12:30:54.427" UserId="3319" Text="are there offchain storage options in substrate, like a regular database(like mongodb or mysql), i dont want to use something else and just stick with something supported with substrate stack.&#xD;&#xA;&#xD;&#xA;the only thing that i found is [LocalStorage][1] but it requires a [Database][2] and the only thing that implements that trait is [in-memory][3] database which means its not persistent storage&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sc_client_db/offchain/struct.LocalStorage.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_client_db/trait.Database.html&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sp_database/struct.MemDb.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="30163" PostHistoryTypeId="1" PostId="7672" RevisionGUID="9279b4f7-148e-4bdf-bbae-611c9154cdbe" CreationDate="2023-03-16T12:30:54.427" UserId="3319" Text="How to store offchain mutable values" ContentLicense="CC BY-SA 4.0" />
  <row Id="30164" PostHistoryTypeId="3" PostId="7672" RevisionGUID="9279b4f7-148e-4bdf-bbae-611c9154cdbe" CreationDate="2023-03-16T12:30:54.427" UserId="3319" Text="|storage|database|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30165" PostHistoryTypeId="2" PostId="7673" RevisionGUID="07e83429-cac2-4a46-a8a2-fd7d08cc264a" CreationDate="2023-03-16T12:59:48.173" UserId="501" Text="I got it to work using this pallet config:&#xD;&#xA;```&#xD;&#xA;dynamicFee.targetMinGasPrice: Option&lt;U256&gt;&#xD;&#xA;&lt;none&gt;&#xD;&#xA;&#xD;&#xA;dynamicFee.minGasPrice: U256&#xD;&#xA;1&#xD;&#xA;&#xD;&#xA;baseFee.elasticity: Permill&#xD;&#xA;0.00%&#xD;&#xA;&#xD;&#xA;baseFee.baseFeePerGas: U256&#xD;&#xA;0&#xD;&#xA;```&#xD;&#xA;**Note:** You have to set (Edit fee gas &gt; Advanced) priority fee to 0 in metamask to get 0 fees.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30167" PostHistoryTypeId="2" PostId="7674" RevisionGUID="e8e6e3e2-b9e8-4df1-bda2-05604dbfeecf" CreationDate="2023-03-16T13:00:34.140" UserId="251" Text="You can use `use sp_io::offchain_index;` it is a persistent storage.&#xD;&#xA;&#xD;&#xA;Check the example here:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/22cca143a2c8e4a03ae770d71e94329eb518cca8/frame/merkle-mountain-range/src/mmr/storage.rs#L180-L197" ContentLicense="CC BY-SA 4.0" />
  <row Id="30169" PostHistoryTypeId="5" PostId="7661" RevisionGUID="f2b115e2-1a5e-4a05-a8e8-b1da7f09e131" CreationDate="2023-03-16T13:01:39.717" UserId="251" Comment="added 7 characters in body" Text="Different OS has different default path.&#xD;&#xA;&#xD;&#xA;For linux, it is `$HOME/.local/share/&lt;CHAIN_NAME&gt;`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Also, when you run the chain, it will show:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-16 00:33:24  Database: RocksDb at /xxx/db/full&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`/xxx` is what you are looking for." ContentLicense="CC BY-SA 4.0" />
  <row Id="30170" PostHistoryTypeId="2" PostId="7675" RevisionGUID="8209feeb-5cdd-49d2-8c79-369232e21e6f" CreationDate="2023-03-16T13:51:43.993" UserId="3969" Text="Thank you for report, it looks like this range of blocks has different EVM runtime API version that mismatch current client. We will investigate how to make it work in next release.&#xD;&#xA;&#xD;&#xA;As workaround, would you try different node version locally, I suggest to use https://github.com/AstarNetwork/Astar/releases/tag/v4.15.0&#xD;&#xA;&#xD;&#xA;Feel free to ask any questions." ContentLicense="CC BY-SA 4.0" />
  <row Id="30172" PostHistoryTypeId="50" PostId="7205" RevisionGUID="05b5a7c3-c7d1-4cca-b994-210b1984a6db" CreationDate="2023-03-16T14:00:40.117" UserId="-1" />
  <row Id="30173" PostHistoryTypeId="50" PostId="7199" RevisionGUID="dc653289-ab8d-40ab-890a-cc7620b736e4" CreationDate="2023-03-16T15:00:15.037" UserId="-1" />
  <row Id="30175" PostHistoryTypeId="50" PostId="7202" RevisionGUID="25ecc1fb-d62c-49ee-837b-297d5603f775" CreationDate="2023-03-16T16:04:05.623" UserId="-1" />
  <row Id="30176" PostHistoryTypeId="2" PostId="7676" RevisionGUID="25df7be6-12f9-485b-940d-c28f9a8d962f" CreationDate="2023-03-16T16:24:54.377" UserId="16" Text="Your assumptions you made in #1 to #6 are all correct.&#xD;&#xA;&#xD;&#xA;Now to your questions:&#xD;&#xA;&#xD;&#xA;1. This is the storage deposit for storing the **code**. In contrast to the deposit for the **contract** which is using said code (charged in #2). The deposit for the code stays at the uploader as only they can remove the code. It isn't freed up because a code needs to be manually removed by the original uploader using the `remove_code` dispatchable. It can only be removed once no contract is using the code anymore. Note that you can also only upload a new code without instantiating by using the `upload_code` dispatchable. You can also instantiate a contract from an already existing code using the `instantiate` dispatchable.&#xD;&#xA;&#xD;&#xA;2. The first transfer is the balance that pays for the contract and its account itself. It needs to be done before executing the contract so that the account is above the existential deposit while executing (this is an invariant we enforce). This only happens on instantiation but not on a normal call. The second transfer is the deposit which is incurred by the contract creating additional storage. The amount is only known after a contract is done executing. This is why it happens later.&#xD;&#xA;&#xD;&#xA;Please note that this behavior is about to change. We now store the deposit on separate account from the contract itself and no longer reserve it. More information here: https://github.com/paritytech/substrate/pull/13369" ContentLicense="CC BY-SA 4.0" />
  <row Id="30178" PostHistoryTypeId="2" PostId="7677" RevisionGUID="53b8b16f-5d1c-42f1-9f2a-a90a08ded4aa" CreationDate="2023-03-16T16:25:52.230" UserId="2961" Text="**The Problem**&#xD;&#xA;&#xD;&#xA;I recently switched from polkadot-v0.20.0 to polkadot-v0.37.0 in order to support V4 Ink Smart contracts.&#xD;&#xA;&#xD;&#xA;But I am encountering the following error using the npm package @polkadot/api when batching multiple transactions as such:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;      await Promise.all(&#xD;&#xA;        txs[addressid].map(async (val) =&gt; {&#xD;&#xA;          let tokenId = Math.floor(100000 * Math.random());&#xD;&#xA;          while (tokenIds.includes(tokenId)) {&#xD;&#xA;            tokenId = Math.floor(100000 * Math.random());&#xD;&#xA;          }&#xD;&#xA;          const storageDepositLimit = null;&#xD;&#xA;          const { gasRequired } = await contract.query.mint(&#xD;&#xA;            &quot;&quot;,&#xD;&#xA;            {&#xD;&#xA;              gasLimit: api?.registry.createType(&quot;WeightV2&quot;, {&#xD;&#xA;                refTime: MAX_CALL_WEIGHT,&#xD;&#xA;                proofSize: PROOFSIZE,&#xD;&#xA;              }),&#xD;&#xA;              storageDepositLimit,&#xD;&#xA;            },&#xD;&#xA;            tokenId,&#xD;&#xA;            val.name,&#xD;&#xA;            parseInt(val.price)&#xD;&#xA;          );&#xD;&#xA;          const gasLimit = api?.registry.createType(&quot;WeightV2&quot;, gasRequired)&#xD;&#xA;          out.push(&#xD;&#xA;            contract.tx.mint(&#xD;&#xA;              { gasLimit },&#xD;&#xA;              tokenId,&#xD;&#xA;              val.name,&#xD;&#xA;              parseInt(val.price)&#xD;&#xA;            )&#xD;&#xA;          );&#xD;&#xA;          val.tokenId = tokenId;&#xD;&#xA;          checks.push(val);&#xD;&#xA;        })&#xD;&#xA;      );&#xD;&#xA;&#xD;&#xA;  await new Promise((resolve) =&gt; {&#xD;&#xA;    api.tx.utility.batch(out).signAndSend(wallet, ({ status }) =&gt; {&#xD;&#xA;      if (status.isInBlock) {&#xD;&#xA;        ////console.log`Completed at block hash #${status.asInBlock}`);&#xD;&#xA;        resolve();&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;  });&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;RPC-CORE: call(method: Text, data: Bytes, at?: BlockHash): Bytes:: -32000: Client error: Execution failed: failed to instantiate a new WASM module instance: Limit of 32 concurrent instances has been reached&quot;. &#xD;&#xA;&#xD;&#xA;On my substrate node, I had this error as well:&#xD;&#xA;```&#xD;&#xA;Ran out of free WASM instances&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;But I was able to solve this error by using the following flag:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--max-runtime-instance 256&#xD;&#xA;```&#xD;&#xA;Although the 'Ran out of free Wasm instances' error went away, i still have the Limit of 32 concurrent instances reached error!&#xD;&#xA;&#xD;&#xA;my node is running polkadot-v0.37.0&#xD;&#xA;npm packages: &#xD;&#xA;```&#xD;&#xA;    &quot;@polkadot/api&quot;: &quot;9.10.5&quot;,&#xD;&#xA;    &quot;@polkadot/api-contract&quot;: &quot;9.10.5&quot;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**My suspicion**&#xD;&#xA;&#xD;&#xA;I think this has something to do with the fact that I transitioned from BTreeMap to a Mapping as a way to store values because BTreeMap is limited in how many keys it can store&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30180" PostHistoryTypeId="1" PostId="7677" RevisionGUID="53b8b16f-5d1c-42f1-9f2a-a90a08ded4aa" CreationDate="2023-03-16T16:25:52.230" UserId="2961" Text="Failed to instantiate a new WASM module instance: Limit of 32 concurrent instances has been reached" ContentLicense="CC BY-SA 4.0" />
  <row Id="30181" PostHistoryTypeId="3" PostId="7677" RevisionGUID="53b8b16f-5d1c-42f1-9f2a-a90a08ded4aa" CreationDate="2023-03-16T16:25:52.230" UserId="2961" Text="|substrate-node-template|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30182" PostHistoryTypeId="2" PostId="7678" RevisionGUID="128cd4f3-e88e-4bb9-8c73-1f9fa616968f" CreationDate="2023-03-16T16:38:54.160" UserId="16" Text="&gt; To my understanding one has to adjust the following function in order&#xD;&#xA;&gt; to change the maths related to all runtime modules.&#xD;&#xA;&#xD;&#xA;Whatever you pass into [`DepositPer{Byte, Item}`](https://github.com/paritytech/substrate/blob/283106b19b85bc8deb232cfa624eed195f143541/frame/contracts/src/lib.rs#L275-L289) is what is being used to calculate the deposit. That said, most runtimes define a `deposit` function (the one you linked is from polkadot) and pass it into all pallets that are charging deposits. This way it is uniform across the whole runtime. But it doesn't have to be this way.&#xD;&#xA;&#xD;&#xA;&gt; Currently, it costs around 13k native tokens to be reserved to deploy&#xD;&#xA;&gt; 100kb codehash.&#xD;&#xA;&#xD;&#xA;This is impossible to answer/verify if you don't specify the runtime/chain you are talking about.&#xD;&#xA;&#xD;&#xA;&gt; However, when comparing the constants file, Polkadot defines the&#xD;&#xA;&gt; deposit function to use 60 times less tokens.&#xD;&#xA;&#xD;&#xA;Less than what?&#xD;&#xA;&#xD;&#xA;1. Somewhat. See above.&#xD;&#xA;2. `pallet-contracts` handles the change of this value [gracefully](https://github.com/paritytech/cumulus/pull/1561). Apart from this: Choosing a too low value can leave your chain open to DoS. A value to high might make your chain unattractive.&#xD;&#xA;3. You essentially want to price it at exactly the value storing a value at all full nodes has to a user. **Knowing** this value is impossible. It is an economic question. Note that the deposit should be much lower for parachains than for the relaychain. Hence I recommend to just take inspiration from other runtimes or do your own research.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30186" PostHistoryTypeId="2" PostId="7679" RevisionGUID="954c2caf-1ac5-4d00-b287-79fe33d7aac5" CreationDate="2023-03-17T02:21:45.043" UserId="2909" Text="How can we bridge our Substrate-based Solochain with other parachains within the Polkadot Ecosystem? Should it be a parathread or parachain migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30188" PostHistoryTypeId="1" PostId="7679" RevisionGUID="954c2caf-1ac5-4d00-b287-79fe33d7aac5" CreationDate="2023-03-17T02:21:45.043" UserId="2909" Text="How can we bridge our Solochain with other chains within the Polkadot Ecosystem? Should it be a parathread or parachain migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30189" PostHistoryTypeId="3" PostId="7679" RevisionGUID="954c2caf-1ac5-4d00-b287-79fe33d7aac5" CreationDate="2023-03-17T02:21:45.043" UserId="2909" Text="|parachain|xcm|xcmp|solo-chain|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30190" PostHistoryTypeId="2" PostId="7680" RevisionGUID="5d0db164-6170-490e-b844-ad0492e1ffec" CreationDate="2023-03-17T02:21:45.043" UserId="2909" Text="The short answer is to [migrate your Solochain to a Parachain][1] - that was the vision of Polkadot from the very start and is designed in-mind for truly decentralized and unstoppable applications.&#xD;&#xA;&#xD;&#xA;XCM is Cross Consensus Messages (with XCMP being cross consensus message passing) is essentially bridging capabilities (https://wiki.polkadot.network/docs/learn-xcm) but it is much more than bridging - it is generalized to all kinds of cross-chain messaging. You can think of amazing usecases such as triggering a defi loan on a defi parachain using an NFT asset as collateral on another parachain as example (see this demo with code here).&#xD;&#xA;&#xD;&#xA;Why XCMP?&#xD;&#xA;&#xD;&#xA; - XCMP fits the preferred category of trustless bridging (not trusted bridging)&#xD;&#xA;- Trusted Bridges (cross-chain networks/ community bridges) are flawed based on the necessity of trust assumptions - either your chain becomes vulnerable to a new set of tokenomics (eg. the tokenomics of that cross-chain-message network) or a completely trusted setup like a multi-sig bridge. These approaches can be vulnerable.&#xD;&#xA;- Trustless Bridging: Because all parachains have the same consensus layer of Polkadot (which is the critical) and do not have control over the source of truth (ultimately it is the consensus of Polkadot relay chain through the validators of Polkadot that secures parachains which at time of writing has an economic security in the billions of dollars) - a message passed from one parachain to another is just as valid as the validation of Polkadot. The message can even be committed on the Polkadot relay chain block or simply across the parachains.&#xD;&#xA;- What's more? XCMP has defined these standards (much like standard APIs) such that your integrations work in-predefined agreements with major ecosystem parachains ( like Moonbeam and Astar etc.) that can be opened up with HRMP channels https://wiki.polkadot.network/docs/build-hrmp-channels&#xD;&#xA;&#xD;&#xA;Lastly, I want to highlight that a Parathread is simply a Pay-as-you-go Parachain.&#xD;&#xA;&#xD;&#xA;In other words it is still a parachain. From a runtime/code development perspective, majority of the node stays the same. The key different is the interval of time you can choose to commit your blocks as proof-of-validity blocks for Polkadot Validators (hence you pay-as-you commit block proofs on Polkadot relay chain) - the full details for parathreads is not out yet as it has not been launched but to my understanding it will likely not affect how you develop runtime pallets significantly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/7658/how-we-can-migrate-the-solochain-data-to-the-parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="30192" PostHistoryTypeId="5" PostId="7680" RevisionGUID="9e178d95-52bb-492b-98ae-36a3503892fd" CreationDate="2023-03-17T02:29:09.187" UserId="2909" Comment="added 124 characters in body" Text="The short answer is to [migrate your Solochain to a Parachain][1] - that was the vision of Polkadot from the very start when the founders realized realized a scaling problem for security when there was an explosion of many new blockchains and thus is designed in-mind for truly decentralized and unstoppable applications.&#xD;&#xA;&#xD;&#xA;XCM is Cross Consensus Messages (with XCMP being cross consensus message passing) is essentially bridging capabilities (https://wiki.polkadot.network/docs/learn-xcm) but it is much more than bridging - it is generalized to all kinds of cross-chain messaging. You can think of amazing usecases such as triggering a defi loan on a defi parachain using an NFT asset as collateral on another parachain as example (see this demo with code here).&#xD;&#xA;&#xD;&#xA;Why XCMP?&#xD;&#xA;&#xD;&#xA; - XCMP fits the preferred category of trustless bridging (not trusted bridging)&#xD;&#xA;- Trusted Bridges (cross-chain networks/ community bridges) are flawed based on the necessity of trust assumptions - either your chain becomes vulnerable to a new set of tokenomics (eg. the tokenomics of that cross-chain-message network) or a completely trusted setup like a multi-sig bridge. These approaches can be vulnerable.&#xD;&#xA;- Trustless Bridging: Because all parachains have the same consensus layer of Polkadot (which is the critical) and do not have control over the source of truth (ultimately it is the consensus of Polkadot relay chain through the validators of Polkadot that secures parachains which at time of writing has an economic security in the billions of dollars) - a message passed from one parachain to another is just as valid as the validation of Polkadot. The message can even be committed on the Polkadot relay chain block or simply across the parachains.&#xD;&#xA;- What's more? XCMP has defined these standards (much like standard APIs) such that your integrations work in-predefined agreements with major ecosystem parachains ( like Moonbeam and Astar etc.) that can be opened up with HRMP channels https://wiki.polkadot.network/docs/build-hrmp-channels&#xD;&#xA;&#xD;&#xA;Lastly, I want to highlight that a Parathread is simply a Pay-as-you-go Parachain.&#xD;&#xA;&#xD;&#xA;In other words it is still a parachain. From a runtime/code development perspective, majority of the node stays the same. The key different is the interval of time you can choose to commit your blocks as proof-of-validity blocks for Polkadot Validators (hence you pay-as-you commit block proofs on Polkadot relay chain) - the full details for parathreads is not out yet as it has not been launched but to my understanding it will likely not affect how you develop runtime pallets significantly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/7658/how-we-can-migrate-the-solochain-data-to-the-parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="30193" PostHistoryTypeId="2" PostId="7681" RevisionGUID="26c52b79-764b-4d71-a089-888c088ae05d" CreationDate="2023-03-17T03:38:30.823" UserId="1824" Text="The call to `dummy_function` is going to overflow because `n * u64::MAX &gt; u64`, meaning your contract will trap. &#xD;&#xA;&#xD;&#xA;Since you're using [`CallBuilder::invoke()`][1], which panics upon any encountering any error, your caller contract will also trap.&#xD;&#xA;&#xD;&#xA;If you want to attempt to handle errors you'll need to use [`CallBuilder::try_invoke()`][2] instead.&#xD;&#xA;&#xD;&#xA;I assume you'll get a [`CalleeTrapped`][2] error due to the overflow, but I haven't tried it out myself.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ink_env/4.0.1/ink_env/call/struct.CallBuilder.html#method.invoke-2&#xD;&#xA;  [2]: https://docs.rs/ink_env/4.0.1/ink_env/call/struct.CallBuilder.html#method.try_invoke-2" ContentLicense="CC BY-SA 4.0" />
  <row Id="30195" PostHistoryTypeId="2" PostId="7682" RevisionGUID="beffca5d-fee0-48b4-a014-203e6a641340" CreationDate="2023-03-17T04:33:12.190" UserId="3732" Text="It looks like the error you're encountering is related to the WASM module instance running out of memory resources. To resolve this issue, you can try increasing the memory limits for the WASM module instance in your Polkadot Substrate runtime.&#xD;&#xA;&#xD;&#xA;Here are the steps to fix the error:&#xD;&#xA;&#xD;&#xA;1. Locate your Substrate runtime's runtime/src/lib.rs file.&#xD;&#xA;&#xD;&#xA;2. Find the construct_runtime! macro and look for the WasmExecutionMethod parameter in your system pallet configuration. If it's not present, you'll need to add it.&#xD;&#xA;&#xD;&#xA;3. Set the WasmExecutionMethod to Interpreted or Compiled, depending on your preference. The Interpreted method is more resource-friendly but slower, while the Compiled method is faster but requires more resources. In your case, it might be a good idea to start with the Interpreted method.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;parameter_types! { &#xD;&#xA;pub const WasmExecutionMethod: sc_executor::WasmExecutionMethod = sc_executor::WasmExecutionMethod::Interpreted;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;4. Make sure to import the required dependencies:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sc_executor;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;5. In the construct_runtime! macro, add the WasmExecutionMethod &#xD;&#xA;configuration to the System pallet:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;construct_runtime!(&#xD;&#xA;    pub enum Runtime where&#xD;&#xA;        Block = Block,&#xD;&#xA;        NodeBlock = opaque::Block,&#xD;&#xA;        UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;    {&#xD;&#xA;        // Other pallets...&#xD;&#xA;&#xD;&#xA;        System: frame_system::{Pallet, Call, Config, Storage, Event&lt;T&gt;},&#xD;&#xA;    }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;6. Add the WasmExecutionMethod parameter to the System configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;    // Other configuration values...&#xD;&#xA;&#xD;&#xA;    type WasmExecutionMethod = WasmExecutionMethod;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;7. Save your changes and rebuild your Substrate node.&#xD;&#xA;&#xD;&#xA;8. Start your node again and check if the error persists.&#xD;&#xA;&#xD;&#xA;These steps should help you resolve the &quot;Insufficient resources&quot; error in your Polkadot Substrate runtime. If you still encounter issues, you may need to further adjust your runtime's memory configuration or optimize your runtime logic to consume less memory.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30197" PostHistoryTypeId="2" PostId="7683" RevisionGUID="8993e586-0a5c-4fee-80fd-008ba352ffac" CreationDate="2023-03-17T07:22:04.150" UserId="3437" Text="I have a scenario where I have to store multiple strings. For single string, we can use `BoundedVec&lt;u8, DescriptionLimit&gt;`, that's why I converted `Vec&lt;u8&gt;` into `BoundedVec&lt;u8, DescriptionLimit&gt;` to follow substrate best practices. But how do we store multiple strings?&#xD;&#xA;&#xD;&#xA;Does it make sense to convert `Vec&lt;Vec&lt;u8&gt;&gt;` to `Vec&lt;BoundedVec&lt;u8, DescriptionLimit&gt;&gt;`?&#xD;&#xA;&#xD;&#xA;Can someone please help me to answer this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30199" PostHistoryTypeId="1" PostId="7683" RevisionGUID="8993e586-0a5c-4fee-80fd-008ba352ffac" CreationDate="2023-03-17T07:22:04.150" UserId="3437" Text="Does it make sense to convert Vec&lt;Vec&lt;u8&gt;&gt; to Vec&lt;BoundedVec&lt;u8, DescriptionLimit&gt;&gt;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30200" PostHistoryTypeId="3" PostId="7683" RevisionGUID="8993e586-0a5c-4fee-80fd-008ba352ffac" CreationDate="2023-03-17T07:22:04.150" UserId="3437" Text="|substrate-node-template|storage|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30201" PostHistoryTypeId="2" PostId="7684" RevisionGUID="a874e554-d4cb-402c-904e-edd2a0fcd8c1" CreationDate="2023-03-17T09:03:08.237" UserId="2484" Text="Hey valuable Substrate community,&#xD;&#xA;&#xD;&#xA;I am running into the problem that I need to iterate over an unbounded `StorageMap`. So I need an `IterationLimit` and use an extrinsic which gets called multiple times.&#xD;&#xA;&#xD;&#xA;Example: https://github.com/zeitgeistpm/zeitgeist/blob/f81d03da05f1c3ab75b27af6964594df2dfee6d8/zrml/court/src/lib.rs#L510-L555&#xD;&#xA;&#xD;&#xA;The problem is that I can't drain the `StorageMap`, because the storage is still required. So I need to iterate and continue iterating in the subsequent calls.&#xD;&#xA;&#xD;&#xA;But it is possible that the `StorageMap` changes (keys inserted) between the calls that exceed the iteration limit.&#xD;&#xA;&#xD;&#xA;Test that fails with the last assert: https://github.com/zeitgeistpm/zeitgeist/blob/f81d03da05f1c3ab75b27af6964594df2dfee6d8/zrml/court/src/tests.rs#L429-L473&#xD;&#xA;&#xD;&#xA;With the above test I found out, that new key inserts are not ensured to be inserted after previous key inserts. So I can't use `iter_from` or `iter_keys_from`.&#xD;&#xA;&#xD;&#xA;So my aim is to iterate over all elements and if all elements inside the `StorageMap` fulfil a specific condition, then it should return Ok, otherwise it throws and error." ContentLicense="CC BY-SA 4.0" />
  <row Id="30203" PostHistoryTypeId="1" PostId="7684" RevisionGUID="a874e554-d4cb-402c-904e-edd2a0fcd8c1" CreationDate="2023-03-17T09:03:08.237" UserId="2484" Text="How to iterate a large `StorageMap` over multiple extrinsic calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30204" PostHistoryTypeId="3" PostId="7684" RevisionGUID="a874e554-d4cb-402c-904e-edd2a0fcd8c1" CreationDate="2023-03-17T09:03:08.237" UserId="2484" Text="|storage|extrinsic|call|storagemap|map|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30205" PostHistoryTypeId="5" PostId="7625" RevisionGUID="88051ca5-e2bb-4739-bf8b-a9350e333dec" CreationDate="2023-03-17T09:46:28.437" UserId="3711" Comment="added some alternative options" Text="I've followed the [cookbook](https://polkadot.js.org/docs/extension/cookbook#sign-a-message) on signing a payload, however this uses sr25519.&#xD;&#xA;&#xD;&#xA;I would like to use ECDSA to sign the payload, how can this be done?&#xD;&#xA;&#xD;&#xA;I have looked into using the keyring and managed to get the Alice account to do the signing:&#xD;&#xA;```&#xD;&#xA;        const keyring = new Keyring({ type: 'ecdsa' });&#xD;&#xA;        const pair = keyring.addFromUri('//Alice');&#xD;&#xA;        const sig = pair.sign(message);&#xD;&#xA;        console.log('sig', sig);&#xD;&#xA;        console.log('sig hex', u8aToHex(sig));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This works. However, I cannot find a way to add the account from an extension to the keyring to reproduce this using something other than the Alice account.&#xD;&#xA;&#xD;&#xA;Edit 1: The alternative option number 1 is to ask the polkadot JS extension to sign the payload with an alternative method, i.e. ecdsa instead of sr25519. However I cannot find how to do this. Alternative option number 2 is to verify a sr25519 signature in ink, but I cannot find how to do that either." ContentLicense="CC BY-SA 4.0" />
  <row Id="30206" PostHistoryTypeId="33" PostId="7625" RevisionGUID="d6acb2aa-20c3-4913-8eb8-430a0fc8c95b" CreationDate="2023-03-17T09:48:14.810" UserId="3711" Comment="19" />
  <row Id="30207" PostHistoryTypeId="2" PostId="7685" RevisionGUID="f886da88-355f-41bc-a3a3-8b9e3752f836" CreationDate="2023-03-17T09:57:53.687" UserId="162" Text="I saw the epoch issue is solved by this [MR](https://github.com/paritytech/substrate/pull/11727). However, it didn't work when I tried to test that on my local machine. Do I do something wrong?&#xD;&#xA;&#xD;&#xA;The steps are like this&#xD;&#xA;1. Two validators on my local machine to run my rococo-local chain &#xD;&#xA;2. Stop one validator and wait 3 minutes&#xD;&#xA;3. Restart that validator again&#xD;&#xA;4. The epoch issue still happens&#xD;&#xA;&#xD;&#xA;Note: polkadot version i 0.9.39-1-298b4aefe1b&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30209" PostHistoryTypeId="1" PostId="7685" RevisionGUID="f886da88-355f-41bc-a3a3-8b9e3752f836" CreationDate="2023-03-17T09:57:53.687" UserId="162" Text="About MR for the &quot;Import failed: Unexpected epoch change&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30210" PostHistoryTypeId="3" PostId="7685" RevisionGUID="f886da88-355f-41bc-a3a3-8b9e3752f836" CreationDate="2023-03-17T09:57:53.687" UserId="162" Text="|epoch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30211" PostHistoryTypeId="2" PostId="7686" RevisionGUID="9fa8a53f-7687-44c6-bec8-3279daab34ac" CreationDate="2023-03-17T10:21:25.007" UserId="2484" Text="I am currently trying to iterate over a storage map over multiple blocks. For this I need to ensure that the `StorageMap` was not modified.&#xD;&#xA;&#xD;&#xA;My plan is to derive a hash from the current `StorageMap` and save that hash in another storage item in order to check if the new call in the next block has the same `StorageMap` state as the previous call. So, I derive the hash of the `StorageMap` again and check for equality.&#xD;&#xA;&#xD;&#xA;If the hashes are equal, I can use `StorageMap::iter_from(raw_key)`, otherwise I return an error and request the user to call the multi-block execution again.&#xD;&#xA;&#xD;&#xA;So: How can I derive a hash for the current StorageMap state?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30213" PostHistoryTypeId="1" PostId="7686" RevisionGUID="9fa8a53f-7687-44c6-bec8-3279daab34ac" CreationDate="2023-03-17T10:21:25.007" UserId="2484" Text="How to check if a `StorageMap` changed after the last access?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30214" PostHistoryTypeId="3" PostId="7686" RevisionGUID="9fa8a53f-7687-44c6-bec8-3279daab34ac" CreationDate="2023-03-17T10:21:25.007" UserId="2484" Text="|block|hash|storagemap|state|iteration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30216" PostHistoryTypeId="2" PostId="7687" RevisionGUID="c2c87ddf-08c6-4870-b869-cf48f734b73b" CreationDate="2023-03-17T10:51:18.287" UserId="227" Text="The answer which you gave in [the link from the comment](https://substrate.stackexchange.com/questions/6401/smart-contract-function-call-error/6402#6402) is correct.&#xD;&#xA;&#xD;&#xA;&gt;This process is failing sometimes with outofgas exception.&#xD;&#xA;&#xD;&#xA;&gt;For us what worked is doubling the gasRequired coming from dry run but this is not a efficient solution.&#xD;&#xA;&#xD;&#xA;This could happen when the state that the contract function uses changes between your dry-run to the execution of the extrinsic. A better solution would be to redo the dry-run and using that possibly new value.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30218" PostHistoryTypeId="5" PostId="7687" RevisionGUID="daa0eb09-caec-4563-bf97-cd14f808d35a" CreationDate="2023-03-17T10:56:55.490" UserId="227" Comment="added 15 characters in body" Text="The answer which you gave in [the link from the comment](https://substrate.stackexchange.com/questions/6401/smart-contract-function-call-error/6402#6402) is correct.&#xD;&#xA;&#xD;&#xA;So dry-running it via `polkadot-js` or some other means. `cargo contract {call, instantiate, …}` does this by default before submitting the extrinsic.&#xD;&#xA;&#xD;&#xA;&gt;This process is failing sometimes with outofgas exception.&#xD;&#xA;&#xD;&#xA;&gt;For us what worked is doubling the gasRequired coming from dry run but this is not a efficient solution.&#xD;&#xA;&#xD;&#xA;This could happen when the state that the contract function uses changes between your dry-run to the execution of the extrinsic. A better solution would be to redo the dry-run and using that possibly new Gas estimation value.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30219" PostHistoryTypeId="50" PostId="7204" RevisionGUID="ac267a22-895c-415c-9b0b-50215a0e0df5" CreationDate="2023-03-17T11:01:25.273" UserId="-1" />
  <row Id="30220" PostHistoryTypeId="2" PostId="7688" RevisionGUID="8050bf85-ef5d-4006-a750-feebbab7197f" CreationDate="2023-03-17T11:47:45.023" UserId="157" Text="To add account other than Alice one can use derivation phrase like so:&#xD;&#xA;&#xD;&#xA;&gt; const pair = keyring.addFromUri('some derivation words you have from key generation...');&#xD;&#xA;&#xD;&#xA;or add from seed, json or pair - details in code [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For the extension import you have to use `@polkadot/extension-dapp`&#xD;&#xA;&#xD;&#xA;&gt; yarn add @polkadot/extension-dapp&#xD;&#xA;&#xD;&#xA; and call it like so:&#xD;&#xA;&#xD;&#xA;    import { stringToHex } from &quot;@polkadot/util&quot;;&#xD;&#xA;    import { web3Accounts, web3Enable, web3FromSource } from '@polkadot/extension-dapp';&#xD;&#xA;&#xD;&#xA;    // this call fires up the authorization popup&#xD;&#xA;    const extensions = await web3Enable('my cool dapp');&#xD;&#xA;    &#xD;&#xA;    if (extensions.length === 0) {&#xD;&#xA;        // no extension installed, or the user did not accept the authorization&#xD;&#xA;        // in this case we should inform the use and give a link to the extension&#xD;&#xA;        return;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // we are now informed that the user has at least one extension and that we&#xD;&#xA;    // will be able to show and use accounts&#xD;&#xA;    const allAccounts = await web3Accounts();&#xD;&#xA;    &#xD;&#xA;    // `account` is of type InjectedAccountWithMeta &#xD;&#xA;    // We arbitrarily select the first account returned from the above snippet&#xD;&#xA;    const account = allAccounts[0];&#xD;&#xA;    &#xD;&#xA;    // to be able to retrieve the signer interface from this account&#xD;&#xA;    // we can use web3FromSource which will return an InjectedExtension type&#xD;&#xA;    const injector = await web3FromSource(account.meta.source);&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    // this injector object has a signer and a signRaw method&#xD;&#xA;    // to be able to sign raw bytes&#xD;&#xA;    const signRaw = injector?.signer?.signRaw;&#xD;&#xA;    &#xD;&#xA;    if (!!signRaw) {&#xD;&#xA;        // after making sure that signRaw is defined&#xD;&#xA;        // we can use it to sign our message&#xD;&#xA;        const { signature } = await signRaw({&#xD;&#xA;            address: account.address,&#xD;&#xA;            data: stringToHex('message to sign'),&#xD;&#xA;            type: 'bytes'&#xD;&#xA;        });&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Example is compiled from [cookbook][2]. Check it for more details.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/common/blob/master/packages/keyring/src/keyring.ts&#xD;&#xA;  [2]: https://polkadot.js.org/docs/extension/cookbook" ContentLicense="CC BY-SA 4.0" />
  <row Id="30222" PostHistoryTypeId="50" PostId="7233" RevisionGUID="b8399fe3-5fbf-49f3-8b15-c74c3b6dbc4c" CreationDate="2023-03-17T12:03:15.500" UserId="-1" />
  <row Id="30223" PostHistoryTypeId="2" PostId="7689" RevisionGUID="4d85872b-25be-4dc2-a0f7-bc0d506ee4e7" CreationDate="2023-03-17T12:38:25.827" UserId="501" Text="I've tested [subscan-essentials][1] and love how nicely a substrate-based chain gets indexed in a database. But I see that it doesn't parse [Frontier][2] evm extrinsics. I couldn't find open-source plugins for this, maybe one of you know more than my google searches ?&#xD;&#xA;&#xD;&#xA;Note: I know a blockscout etc (going through the eth RPC), works great too, but I was thinking about preferably using subscan-essentials.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/subscan-explorer/subscan-essentials&#xD;&#xA;  [2]: https://github.com/paritytech/frontier/" ContentLicense="CC BY-SA 4.0" />
  <row Id="30225" PostHistoryTypeId="1" PostId="7689" RevisionGUID="4d85872b-25be-4dc2-a0f7-bc0d506ee4e7" CreationDate="2023-03-17T12:38:25.827" UserId="501" Text="subscan-essentials EVM plugin" ContentLicense="CC BY-SA 4.0" />
  <row Id="30226" PostHistoryTypeId="3" PostId="7689" RevisionGUID="4d85872b-25be-4dc2-a0f7-bc0d506ee4e7" CreationDate="2023-03-17T12:38:25.827" UserId="501" Text="|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30227" PostHistoryTypeId="2" PostId="7690" RevisionGUID="1dbdfb7b-9917-4836-aa84-d08daaebf039" CreationDate="2023-03-17T12:38:34.583" UserId="2844" Text="&#xD;&#xA;I was able to add some properties in substrate-node-template chain_spec.rs file. But instead of `XCAV` token symbol it gives `MXCAV`. Is this issue or I am doing something wrong. Any advice or reference link would help a lot. And also try to add `total_supply` with properties but doesn't work.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;    pub fn local_testnet_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;    	let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;    &#xD;&#xA;    	let mut properties = Properties::new();&#xD;&#xA;    	properties.insert(&quot;tokenSymbol&quot;.into(), &quot;XCAV&quot;.into());&#xD;&#xA;    	properties.insert(&quot;tokenDecimals&quot;.into(), 12.into());&#xD;&#xA;    	properties.insert(&quot;ss58Format&quot;.into(), 42.into());&#xD;&#xA;    &#xD;&#xA;    	Ok(ChainSpec::from_genesis(&#xD;&#xA;    		// Name&#xD;&#xA;    		&quot;Local Testnet&quot;,&#xD;&#xA;    		// ID&#xD;&#xA;    		&quot;local_testnet&quot;,&#xD;&#xA;    		ChainType::Local,&#xD;&#xA;    		move || {&#xD;&#xA;    			testnet_genesis(&#xD;&#xA;    				wasm_binary,&#xD;&#xA;    				// Initial PoA authorities&#xD;&#xA;    				vec![authority_keys_from_seed(&quot;Alice&quot;), authority_keys_from_seed(&quot;Bob&quot;)],&#xD;&#xA;    				// Sudo account&#xD;&#xA;    				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;    				// Pre-funded accounts&#xD;&#xA;    				vec![&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;    					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;    				],&#xD;&#xA;    				true,&#xD;&#xA;    			)&#xD;&#xA;    		},&#xD;&#xA;    		// Bootnodes&#xD;&#xA;    		vec![],&#xD;&#xA;    		// Telemetry&#xD;&#xA;    		None,&#xD;&#xA;    		// Protocol ID&#xD;&#xA;    		None,&#xD;&#xA;    		// Properties&#xD;&#xA;    		None,&#xD;&#xA;    		Some(properties),&#xD;&#xA;    		// Extensions&#xD;&#xA;    		None,&#xD;&#xA;    	))&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kd1SK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30229" PostHistoryTypeId="1" PostId="7690" RevisionGUID="1dbdfb7b-9917-4836-aa84-d08daaebf039" CreationDate="2023-03-17T12:38:34.583" UserId="2844" Text="Token symbol doesn't change on adding properties on chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="30230" PostHistoryTypeId="3" PostId="7690" RevisionGUID="1dbdfb7b-9917-4836-aa84-d08daaebf039" CreationDate="2023-03-17T12:38:34.583" UserId="2844" Text="|polkadot|substrate-node-template|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30231" PostHistoryTypeId="2" PostId="7691" RevisionGUID="892f69d3-75bc-4daa-bb4a-a0734cc3f694" CreationDate="2023-03-17T13:20:42.450" UserId="125" Text="We often use some basic substrate crates such as `sp-core`, `sp-io` while doing pallet test. In general, those dependencies are put under `[dev-dependencies]`. But I have such a issue that if we should add `default-features = false` or not. Seems both works. &#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;# pallet crate level&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;frame-system = = { default-features = false, git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.37&quot; }&#xD;&#xA;# no sp-io here&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;# With`default-features = false`&#xD;&#xA;sp-io = = { default-features = false, git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.37&quot; }&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;# Without default-features = false&#xD;&#xA;sp-io = = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.37&quot; }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the pallet tests (both way can compile):&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// mock.rs&#xD;&#xA;use sp_io::TestExternalities;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check from the substrate repo:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Type alias for Externalities implementation used in tests.&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]  // this line&#xD;&#xA;pub type TestExternalities = sp_state_machine::TestExternalities&lt;sp_core::Blake2Hasher&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As the code snippet show, the `TestExternalities` is only available under`std` feature. Then check the `[dev-dependencies]` sp-io config, it disables the std feature. So **why** this can be still compiled? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30233" PostHistoryTypeId="1" PostId="7691" RevisionGUID="892f69d3-75bc-4daa-bb4a-a0734cc3f694" CreationDate="2023-03-17T13:20:42.450" UserId="125" Text="Why `features = [&quot;std&quot;]` is not necessary in the `[dev-dependencies]` some crates like `sp-io`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30234" PostHistoryTypeId="3" PostId="7691" RevisionGUID="892f69d3-75bc-4daa-bb4a-a0734cc3f694" CreationDate="2023-03-17T13:20:42.450" UserId="125" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30235" PostHistoryTypeId="5" PostId="7691" RevisionGUID="56199b46-bcd7-4ad9-8eb9-8f12bc706e46" CreationDate="2023-03-17T13:26:37.507" UserId="125" Comment="deleted 45 characters in body" Text="We often use some basic substrate crates such as `sp-core`, `sp-io` while doing pallet test. In general, those dependencies are put under `[dev-dependencies]`. But I have such a issue that if we should add `default-features = false` or not. Seems both works. &#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;# pallet crate level&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;frame-system = = { default-features = false, git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.37&quot; }&#xD;&#xA;# no sp-io here&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;# With`default-features = false`&#xD;&#xA;sp-io = = { default-features = false, git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.37&quot; }&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;# Without default-features = false&#xD;&#xA;sp-io = = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.37&quot; }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the pallet tests (both way can compile):&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// mock.rs&#xD;&#xA;use sp_io::TestExternalities;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check from the substrate repo:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Type alias for Externalities implementation used in tests.&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]  // this line&#xD;&#xA;pub type TestExternalities = sp_state_machine::TestExternalities&lt;sp_core::Blake2Hasher&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As the code snippet show, the `TestExternalities` is only available under`std` feature.So **why** the first way `With default-features = false` can be compiled? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30236" PostHistoryTypeId="2" PostId="7692" RevisionGUID="23a4ceea-9c60-4f4e-acc1-b02a7492261f" CreationDate="2023-03-17T13:37:36.490" UserId="251" Text="I think it's because the `frame-system` also depends on `sp-io`. And you enable the `std` for the `frame-system` in the test env, which also enables the `sp-io/std` for the whole scope." ContentLicense="CC BY-SA 4.0" />
  <row Id="30238" PostHistoryTypeId="5" PostId="7690" RevisionGUID="65f8345a-3418-4b32-a023-c76a89154355" CreationDate="2023-03-17T13:40:12.070" UserId="251" Comment="deleted 198 characters in body" Text="&#xD;&#xA;I was able to add some properties in substrate-node-template chain_spec.rs file. But instead of `XCAV` token symbol it gives `MXCAV`. Is this issue or I am doing something wrong. Any advice or reference link would help a lot. And also try to add `total_supply` with properties but doesn't work.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub fn local_testnet_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;	let wasm_binary = WASM_BINARY.ok_or_else(|| &quot;Development wasm not available&quot;.to_string())?;&#xD;&#xA;&#xD;&#xA;	let mut properties = Properties::new();&#xD;&#xA;	properties.insert(&quot;tokenSymbol&quot;.into(), &quot;XCAV&quot;.into());&#xD;&#xA;	properties.insert(&quot;tokenDecimals&quot;.into(), 12.into());&#xD;&#xA;	properties.insert(&quot;ss58Format&quot;.into(), 42.into());&#xD;&#xA;&#xD;&#xA;	Ok(ChainSpec::from_genesis(&#xD;&#xA;		// Name&#xD;&#xA;		&quot;Local Testnet&quot;,&#xD;&#xA;		// ID&#xD;&#xA;		&quot;local_testnet&quot;,&#xD;&#xA;		ChainType::Local,&#xD;&#xA;		move || {&#xD;&#xA;			testnet_genesis(&#xD;&#xA;				wasm_binary,&#xD;&#xA;				// Initial PoA authorities&#xD;&#xA;				vec![authority_keys_from_seed(&quot;Alice&quot;), authority_keys_from_seed(&quot;Bob&quot;)],&#xD;&#xA;				// Sudo account&#xD;&#xA;				get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;				// Pre-funded accounts&#xD;&#xA;				vec![&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;				],&#xD;&#xA;				true,&#xD;&#xA;			)&#xD;&#xA;		},&#xD;&#xA;		// Bootnodes&#xD;&#xA;		vec![],&#xD;&#xA;		// Telemetry&#xD;&#xA;		None,&#xD;&#xA;		// Protocol ID&#xD;&#xA;		None,&#xD;&#xA;		// Properties&#xD;&#xA;		None,&#xD;&#xA;		Some(properties),&#xD;&#xA;		// Extensions&#xD;&#xA;		None,&#xD;&#xA;	))&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kd1SK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30239" PostHistoryTypeId="2" PostId="7693" RevisionGUID="c137ff3d-f07a-4fd1-9dfe-0be337b23751" CreationDate="2023-03-17T13:41:20.013" UserId="251" Text="`M` is the unit.&#xD;&#xA;&#xD;&#xA;`M` for million.&#xD;&#xA;&#xD;&#xA;You can mint more tokens to that account. And you will see `BXCAV`, which is billion." ContentLicense="CC BY-SA 4.0" />
  <row Id="30241" PostHistoryTypeId="5" PostId="7693" RevisionGUID="40712eab-e2ec-4bf2-b7fe-f7922d208d9c" CreationDate="2023-03-17T13:47:24.123" UserId="251" Comment="added 53 characters in body" Text="Well... This question is pretty simple. (you might find it's a little bit stupid later, LOL)&#xD;&#xA;&#xD;&#xA;`M` is the unit. `M` for million.&#xD;&#xA;&#xD;&#xA;You can mint more tokens to that account.&#xD;&#xA;And you will see `BXCAV`, which is billion.&#xD;&#xA;Cheers!" ContentLicense="CC BY-SA 4.0" />
  <row Id="30242" PostHistoryTypeId="6" PostId="7690" RevisionGUID="96b1828e-f07c-48be-acc2-7eaa98e290f5" CreationDate="2023-03-17T13:49:14.050" UserId="251" Comment="edited tags" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30243" PostHistoryTypeId="5" PostId="7691" RevisionGUID="fdb6fd9f-0199-49ff-80d8-d756d23aa5d2" CreationDate="2023-03-17T13:52:11.650" UserId="251" Comment="added 6 characters in body; edited tags" Text="We often use some basic substrate crates such as `sp-core`, and `sp-io` while doing pallet tests. In general, those dependencies are put under `[dev-dependencies]`. But I have an issue with whether we should add `default-features = false` or not. Seems both work. &#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;# pallet crate level&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;frame-system = = { default-features = false, git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.37&quot; }&#xD;&#xA;# no sp-io here&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;# With`default-features = false`&#xD;&#xA;sp-io = = { default-features = false, git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.37&quot; }&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;# Without default-features = false&#xD;&#xA;sp-io = = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.37&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the pallet tests (both ways can compile):&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// mock.rs&#xD;&#xA;use sp_io::TestExternalities;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Check from the substrate repo:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Type alias for Externalities implementation used in tests.&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]  // this line&#xD;&#xA;pub type TestExternalities = sp_state_machine::TestExternalities&lt;sp_core::Blake2Hasher&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As the code snippet shows, the `TestExternalities` is only available under`std` feature.So **why** the first way, `With default-features = false` can be compiled? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30244" PostHistoryTypeId="6" PostId="7691" RevisionGUID="fdb6fd9f-0199-49ff-80d8-d756d23aa5d2" CreationDate="2023-03-17T13:52:11.650" UserId="251" Comment="added 6 characters in body; edited tags" Text="|rust|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30249" PostHistoryTypeId="2" PostId="7695" RevisionGUID="5d42bb0a-b8c6-4d3f-91fb-832159a415db" CreationDate="2023-03-17T14:28:30.990" UserId="94" Text="Yes there seems to be an issue with the node. Should be fixed [here](https://github.com/paritytech/substrate/pull/13630) and the reporting PolkadotJS issue is [here](https://github.com/polkadot-js/apps/issues/9103)." ContentLicense="CC BY-SA 4.0" />
  <row Id="30251" PostHistoryTypeId="50" PostId="7220" RevisionGUID="8ce9f9c7-52eb-4718-a259-b69486e5042e" CreationDate="2023-03-17T15:06:55.800" UserId="-1" />
  <row Id="30252" PostHistoryTypeId="5" PostId="7687" RevisionGUID="f8e8dab4-95a2-41cc-a51b-94a8e48d8927" CreationDate="2023-03-17T15:58:32.450" UserId="227" Comment="added 315 characters in body" Text="The answer which you gave in [the link from the comment](https://substrate.stackexchange.com/questions/6401/smart-contract-function-call-error/6402#6402) is correct.&#xD;&#xA;&#xD;&#xA;So dry-running it via `polkadot-js` or some other means. `cargo contract {call, instantiate, …}` does this by default before submitting the extrinsic.&#xD;&#xA;&#xD;&#xA;&gt;This process is failing sometimes with outofgas exception.&#xD;&#xA;&#xD;&#xA;&gt;For us what worked is doubling the gasRequired coming from dry run but this is not a efficient solution.&#xD;&#xA;&#xD;&#xA;This could happen when the state that the contract function uses changes between your dry-run to the execution of the extrinsic. Consider e.g. if the contract relies on the block number for some logic. This alone would mean that the contract executes differently. It could even be just a slight derivation that would result in the Gas being different. &#xD;&#xA;&#xD;&#xA;Possible solutions are:&#xD;&#xA;* Redo the dry-run and using that possibly new Gas estimation value.&#xD;&#xA;* Submit the transaction with something like 1% more Gas than what the dry-run yielded.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30253" PostHistoryTypeId="2" PostId="7696" RevisionGUID="8b8c61b1-dc66-4c3e-9d01-6ce483848ea2" CreationDate="2023-03-17T16:30:19.040" UserId="298" Text="Is it possible to reverse engineer a private key back into mnemonic seed if it is not hard derived?&#xD;&#xA;&#xD;&#xA;Is the private key using `subkey` derived from the mnemonic in a soft way? if so can the mnemonic be known from the private key?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30255" PostHistoryTypeId="1" PostId="7696" RevisionGUID="8b8c61b1-dc66-4c3e-9d01-6ce483848ea2" CreationDate="2023-03-17T16:30:19.040" UserId="298" Text="Is it possible to reverse engineer a private key back into mnemonic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30256" PostHistoryTypeId="3" PostId="7696" RevisionGUID="8b8c61b1-dc66-4c3e-9d01-6ce483848ea2" CreationDate="2023-03-17T16:30:19.040" UserId="298" Text="|cryptography|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30257" PostHistoryTypeId="5" PostId="7637" RevisionGUID="faba5439-e19c-4a00-b5a5-8e41c793ae38" CreationDate="2023-03-17T16:39:29.073" UserId="29" Comment="added 4 characters in body" Text="# Overview&#xD;&#xA;We have a system that leverages both instanced pallets and non-instanced pallets. Specifically, we have pallets that maintain on-chain merkle trees. We can have many instances of these pallets, a la `::&lt;T: Config&lt;I&gt;, I: 'static&gt;` type trait definitions.&#xD;&#xA;&#xD;&#xA;The questions we have particularly relate to tightly coupling instanced pallets with non-instanced pallets, i.e. a pallet with just `::&lt;T: Config&gt;` implementations.&#xD;&#xA;&#xD;&#xA;## Broken Non-instanced pallet Config&#xD;&#xA;Currently the non-instanced pallet `Config` needs to provide some instance to instantiate the tight coupling between the instanced pallet as follows. However, the non-instanced pallet has no notion of instances `I` so this of course doesn't compile. The traits in question are implemented with instances and so do not work in this environment.&#xD;&#xA;```rust &#xD;&#xA;pub trait Config: frame_system::Config + pallet_balances::Config {&#xD;&#xA;	...&#xD;&#xA;&#xD;&#xA;	/// VAnchor Interface&#xD;&#xA;	type VAnchor: VAnchorInterface&lt;VAnchorConfigration&lt;Self, I&gt;&gt;&#xD;&#xA;		+ VAnchorInspector&lt;VAnchorConfigration&lt;Self, I&gt;&gt;;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Ideal Non-instanced pallet Config&#xD;&#xA;The ideal case would be to have a new trait that somehow encompasses an individual instance of the instanced pallet while not restricting it to `Instance1` or `Instance2` even if that would be possible. What we have in mind is something such as&#xD;&#xA;```rust&#xD;&#xA;pub trait Config: frame_system::Config + pallet_balances::Config {&#xD;&#xA;	...&#xD;&#xA;&#xD;&#xA;	/// VAnchor Interface&#xD;&#xA;	type VAnchor: VAnchorInterface&lt;VAnchorConfigrationInstance&lt;Self&gt;&gt;&#xD;&#xA;		+ VAnchorInspector&lt;VAnchorConfigrationInstance&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;However we are unsure how to massage these into reality.&#xD;&#xA;&#xD;&#xA;## Runtime Implementation&#xD;&#xA;The goal for our runtime is to provide something akin to the following:&#xD;&#xA;```rust&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		...&#xD;&#xA;		// VAnchor&#xD;&#xA;		VAnchorBn254: pallet_vanchor::&lt;Instance1&gt;::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;		VAnchorBls381: pallet_vanchor::&lt;Instance2&gt;::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;		PalletInQuestion: pallet_in_question::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl pallet_in_question::Config for Runtime {&#xD;&#xA;    VAnchor = VAnchorBn254&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Questions&#xD;&#xA;1. Is this doable and sensible?&#xD;&#xA;2. Are there examples or design patterns for this.&#xD;&#xA;3. How to work around the lack of instancing in the non-instanced pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30258" PostHistoryTypeId="2" PostId="7697" RevisionGUID="513f069f-cacf-4a9b-b377-a1f95c13aa8b" CreationDate="2023-03-17T16:41:45.327" UserId="1795" Text="Use case: &#xD;&#xA;&#xD;&#xA;Alice submits an extrinsic on chain A which, among other things, sends an XCM message including a `Transact` operation to chain B.&#xD;&#xA;&#xD;&#xA;On chain A, Alice pays for the extrinsic execution. What I am trying to do, is to let Alice also pay with her account on chain B.&#xD;&#xA;&#xD;&#xA;The XCM that is composed inside the extrinsic is the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  DescendOrigin(&#xD;&#xA;    AccountId32 {&#xD;&#xA;      network: None,&#xD;&#xA;      id: dispatcher.into(),&#xD;&#xA;	}.into(),&#xD;&#xA;  ),&#xD;&#xA;  WithdrawAsset(asset.clone().into()),&#xD;&#xA;  BuyExecution {&#xD;&#xA;    fees: asset,&#xD;&#xA;    weight_limit: Unlimited,&#xD;&#xA;  },&#xD;&#xA;  Transact {&#xD;&#xA;    origin_kind: OriginKind::Native,&#xD;&#xA;    require_weight_at_most: weight,&#xD;&#xA;    call: dest_tx,&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;where `dispatcher` is the signed origin on chain A, `asset` and `weight` are parameters of the extrinsic and must be under the control of Alice on chain B.&#xD;&#xA;&#xD;&#xA;Clearly, I could only use a `OriginKind::Native` since otherwise the call would not have the parachain priviledge.&#xD;&#xA;Nevertheless, I cannot get the `Transact` to be executed without getting a `BadOrigin` error. It does not seem possible, right now, to have an `OriginConverter` which accepts a `Multilocation` of type `../Parachain(x)/AccountId(acc)`.&#xD;&#xA;The `LocationConverter` works fine with just using the provided `Account32Hash&lt;(), AccountId&gt;`, although a [new PR](https://github.com/paritytech/polkadot/pull/6662) is in the making to address this. On the contrary, origin conversion does not seem to be supported, and of course any attempt to insert a `ClearOrigin` call before the `Transact` would fail.&#xD;&#xA;&#xD;&#xA;Is calling `UniversalOrigin` the only way to charge a user on chain B for the execution of the `Transact`? Or is there some other way to charge the user on chain B while still making sure that only the chain A can indeed send such XCM message? An `OriginKind::SoverignAccount` does not seem to be good for our case since everyone could just send it via the XCM pallet, while chain A wants to give chain B guarantees that the messages has higher priviledge then a simple user." ContentLicense="CC BY-SA 4.0" />
  <row Id="30260" PostHistoryTypeId="1" PostId="7697" RevisionGUID="513f069f-cacf-4a9b-b377-a1f95c13aa8b" CreationDate="2023-03-17T16:41:45.327" UserId="1795" Text="Charge a user on both sender and receiver chain of an XCM `Transact` with `OriginKind::Native`" ContentLicense="CC BY-SA 4.0" />
  <row Id="30261" PostHistoryTypeId="3" PostId="7697" RevisionGUID="513f069f-cacf-4a9b-b377-a1f95c13aa8b" CreationDate="2023-03-17T16:41:45.327" UserId="1795" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30262" PostHistoryTypeId="2" PostId="7698" RevisionGUID="e882efea-be84-40fb-815e-cd61630d5a64" CreationDate="2023-03-17T17:32:44.050" UserId="227" Text="It is currently not possible to reference the chain extension method from a different file.&#xD;&#xA;&#xD;&#xA;It's good that you raised this and I just created this issue for it: https://github.com/paritytech/ink/issues/1719." ContentLicense="CC BY-SA 4.0" />
  <row Id="30264" PostHistoryTypeId="5" PostId="7628" RevisionGUID="e8fb801f-cab0-489d-bc44-37944c1ec817" CreationDate="2023-03-17T20:26:18.277" UserId="29" Comment="Updated with steps to reproduce." Text="When I use the `follow-chain` subcommand I am getting the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-03-17 16:22:15.698 ERROR main runtime: panicked at 'Bad input data provided to execute_block: Codec error', /Users/bruno/src/substrate-node-template/runtime/src/lib.rs:351:1    &#xD;&#xA;2023-03-17 16:22:15.705 ERROR main try-runtime::cli: failed to execute block 199 due to Input(&quot;failed to execute TryRuntime_execute_block: Execution aborted due to trap: unreachable&quot;)    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Steps to reproduce:&#xD;&#xA;&#xD;&#xA;Clone repo:&#xD;&#xA;```&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;cd substrate-node-template&#xD;&#xA;git checkout polkadot-v0.9.37&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Run a dev chain locally. This is the chain that I want to &quot;follow&quot;:&#xD;&#xA;```&#xD;&#xA;cargo b -r&#xD;&#xA;cp target/release/node-template .&#xD;&#xA;./node-template --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Compile with try-runtime:&#xD;&#xA;```&#xD;&#xA;cargo b -r --features=try-runtime&#xD;&#xA;cp target/release/node-template node-template-try-runtime&#xD;&#xA;cp target/release/wbuild/node-template-runtime/node_template_runtime.wasm runtime-try-runtime.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Run the `follow-chain` subcommand:&#xD;&#xA;```&#xD;&#xA;./node-template-try-runtime \&#xD;&#xA;    try-runtime \&#xD;&#xA;    --runtime runtime-try-runtime.wasm \ &#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    follow-chain \&#xD;&#xA;    --uri ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;2023-03-17 16:22:15.614  INFO main try-runtime::cli: subscribing to &quot;chain_subscribeFinalizedHeads&quot; / &quot;chain_unsubscribeFinalizedHeads&quot;    &#xD;&#xA;2023-03-17 16:22:15.620  INFO main remote-ext: since no prefix is filtered, the data for all pallets will be downloaded    &#xD;&#xA;2023-03-17 16:22:15.623  INFO main remote-ext: scraping key-pairs from remote at block height 0x6eb4ba25d48529972a1f1a5e1ffebbe5172c39029dc96dacef565291f316b165    &#xD;&#xA;2023-03-17 16:22:15.623  INFO main remote-ext: adding data for hashed prefix: 3a6368696c645f73746f726167653a64656661756c743a, took 0s    &#xD;&#xA;2023-03-17 16:22:15.626  INFO main remote-ext: Querying a total of 232 keys from prefix , splitting among 10 threads, 24 keys per thread    &#xD;&#xA;2023-03-17 16:22:15.637  INFO main remote-ext: adding data for hashed prefix: , took 0s    &#xD;&#xA;2023-03-17 16:22:15.637  INFO main remote-ext: adding data for hashed key: 3a636f6465    &#xD;&#xA;2023-03-17 16:22:15.639  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    &#xD;&#xA;2023-03-17 16:22:15.639  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    &#xD;&#xA;2023-03-17 16:22:15.640  INFO main remote-ext: initialized state externalities with storage root 0x77083beb1844ad008a4ceda26c86be09c3f6f06dd05ef35c4d3197dd2f427fc0 and state_version V1    &#xD;&#xA;2023-03-17 16:22:15.649  INFO main try-runtime::cli: original spec: RuntimeString::Owned(&quot;node-template&quot;)-100, code hash: 7d73847319954ae2408b067399eafaa10d62326205dc12733b605a1772da8b69    &#xD;&#xA;2023-03-17 16:22:15.656  INFO main try-runtime::cli: new spec: RuntimeString::Owned(&quot;node-template&quot;)-100, code hash: 2318954729d897d8a61012be4e7faa2cc60b9c46480c33591cf21b3ef5abde9b    &#xD;&#xA;2023-03-17 16:22:15.698 ERROR main runtime: panicked at 'Bad input data provided to execute_block: Codec error', /Users/bruno/src/substrate-node-template/runtime/src/lib.rs:351:1    &#xD;&#xA;2023-03-17 16:22:15.705 ERROR main try-runtime::cli: failed to execute block 199 due to Input(&quot;failed to execute TryRuntime_execute_block: Execution aborted due to trap: unreachable&quot;)    &#xD;&#xA;2023-03-17 16:22:19.812 ERROR main runtime: panicked at 'Bad input data provided to execute_block: Codec error', /Users/bruno/src/substrate-node-template/runtime/src/lib.rs:351:1    &#xD;&#xA;2023-03-17 16:22:19.812 ERROR main try-runtime::cli: failed to execute block 200 due to Input(&quot;failed to execute TryRuntime_execute_block: Execution aborted due to trap: unreachable&quot;)  &#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30265" PostHistoryTypeId="2" PostId="7699" RevisionGUID="0bbaf0c9-be37-4a6f-b001-7a72c02ddd0a" CreationDate="2023-03-17T22:07:32.867" UserId="2510" Text="I was unable to add contract into https://phat.phala.network/contracts/add.&#xD;&#xA;&#xD;&#xA;At the&#xD;&#xA;&#xD;&#xA;The contract was built using: &#xD;&#xA;cargo-contract version : cargo-contract-contract 2.1.0-unknown-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;the contract.json's snippet &#xD;&#xA;&#xD;&#xA;    &quot;source&quot;: {&#xD;&#xA;    &quot;hash&quot;: &quot;0x2bb725e2c31290294d3cb9f5eb1c52347cfe770a74c5f1a06d69aeb4f7b4bbbc&quot;,&#xD;&#xA;    &quot;language&quot;: &quot;ink! 4.0.1&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;rustc 1.70.0-nightly&quot;,&#xD;&#xA;    &quot;build_info&quot;: {&#xD;&#xA;      &quot;build_mode&quot;: &quot;Debug&quot;,&#xD;&#xA;      &quot;cargo_contract_version&quot;: &quot;2.1.0&quot;,&#xD;&#xA;      &quot;rust_toolchain&quot;: &quot;nightly-aarch64-apple-darwin&quot;,&#xD;&#xA;      &quot;wasm_opt_settings&quot;: {&#xD;&#xA;        &quot;keep_debug_symbols&quot;: false,&#xD;&#xA;        &quot;optimization_passes&quot;: &quot;Z&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;[![Error when uploading the contract][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bwodl.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30267" PostHistoryTypeId="1" PostId="7699" RevisionGUID="0bbaf0c9-be37-4a6f-b001-7a72c02ddd0a" CreationDate="2023-03-17T22:07:32.867" UserId="2510" Text="Unable to upload Phat Contract build using cargo-contract-2.1.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="30268" PostHistoryTypeId="3" PostId="7699" RevisionGUID="0bbaf0c9-be37-4a6f-b001-7a72c02ddd0a" CreationDate="2023-03-17T22:07:32.867" UserId="2510" Text="|ink|smart-contract|test-network|phala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30269" PostHistoryTypeId="5" PostId="7637" RevisionGUID="d163999d-6121-42f9-a2be-e6d936b3b2a8" CreationDate="2023-03-18T00:00:09.243" UserId="29" Comment="added 1 character in body" Text="# Overview&#xD;&#xA;We have a system that leverages both instanced pallets and non-instanced pallets. Specifically, we have pallets that maintain on-chain merkle trees. We can have many instances of these pallets, a la `::&lt;T: Config&lt;I&gt;, I: 'static&gt;` type trait definitions.&#xD;&#xA;&#xD;&#xA;The questions we have particularly relate to tightly coupling instanced pallets with non-instanced pallets, i.e. a pallet with just `::&lt;T: Config&gt;` implementations.&#xD;&#xA;&#xD;&#xA;## Broken Non-instanced pallet Config&#xD;&#xA;Currently the non-instanced pallet `Config` needs to provide some instance to instantiate the tight coupling between the instanced pallet as follows. However, the non-instanced pallet has no notion of instances `I` so this of course doesn't compile. The traits in question are implemented with instances and so do not work in this environment.&#xD;&#xA;```rust &#xD;&#xA;pub trait Config: frame_system::Config + pallet_balances::Config {&#xD;&#xA;	...&#xD;&#xA;&#xD;&#xA;	/// VAnchor Interface&#xD;&#xA;	type VAnchor: VAnchorInterface&lt;VAnchorConfigration&lt;Self, I&gt;&gt;&#xD;&#xA;		+ VAnchorInspector&lt;VAnchorConfigration&lt;Self, I&gt;&gt;;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Ideal Non-instanced pallet Config&#xD;&#xA;The ideal case would be to have a new trait that somehow encompasses an individual instance of the instanced pallet while not restricting it to `Instance1` or `Instance2` even if that would be possible. What we have in mind is something such as:&#xD;&#xA;```rust&#xD;&#xA;pub trait Config: frame_system::Config + pallet_balances::Config {&#xD;&#xA;	...&#xD;&#xA;&#xD;&#xA;	/// VAnchor Interface&#xD;&#xA;	type VAnchor: VAnchorInterface&lt;VAnchorConfigrationInstance&lt;Self&gt;&gt;&#xD;&#xA;		+ VAnchorInspector&lt;VAnchorConfigrationInstance&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;However we are unsure how to massage these into reality.&#xD;&#xA;&#xD;&#xA;## Runtime Implementation&#xD;&#xA;The goal for our runtime is to provide something akin to the following:&#xD;&#xA;```rust&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		...&#xD;&#xA;		// VAnchor&#xD;&#xA;		VAnchorBn254: pallet_vanchor::&lt;Instance1&gt;::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;		VAnchorBls381: pallet_vanchor::&lt;Instance2&gt;::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;		PalletInQuestion: pallet_in_question::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl pallet_in_question::Config for Runtime {&#xD;&#xA;    VAnchor = VAnchorBn254&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Questions&#xD;&#xA;1. Is this doable and sensible?&#xD;&#xA;2. Are there examples or design patterns for this.&#xD;&#xA;3. How to work around the lack of instancing in the non-instanced pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30270" PostHistoryTypeId="50" PostId="7242" RevisionGUID="5689e5ed-8c5e-4261-9509-c48576f2604c" CreationDate="2023-03-18T04:05:10.573" UserId="-1" />
  <row Id="30271" PostHistoryTypeId="2" PostId="7700" RevisionGUID="07ec0248-b847-4b4b-89f5-e8dda835ab9d" CreationDate="2023-03-18T05:25:27.117" UserId="251" Text="Nope. Private keys derive from the mnemonic. A mnemonic can generate a lot of private keys. You can also check the HD wallet spec.&#xD;&#xA;&#xD;&#xA;It's a one-way function like you said. Maybe it's a hash function. You can't recover the mnemonic from the private key." ContentLicense="CC BY-SA 4.0" />
  <row Id="30274" PostHistoryTypeId="2" PostId="7701" RevisionGUID="86e3da1a-28f9-4e55-9a0b-7ab542031383" CreationDate="2023-03-18T08:06:54.507" UserId="3971" Text="Here is test demo, but always fail to run.&#xD;&#xA;&#xD;&#xA;- `Cargo.toml`&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;yew = { version = &quot;0.20.0&quot;, features = [&quot;csr&quot;] }&#xD;&#xA;gloo = &quot;0.8.0&quot;&#xD;&#xA;wasm-bindgen-futures = &quot;0.4.32&quot;&#xD;&#xA;subxt = { version=&quot;0.27.0&quot;, default-features = false, features = [&quot;jsonrpsee-web&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- `main.rs`&#xD;&#xA;```rust&#xD;&#xA;use gloo::console::log;&#xD;&#xA;// use sp_keyring::AccountKeyring;&#xD;&#xA;use subxt::{OnlineClient, PolkadotConfig};&#xD;&#xA;use wasm_bindgen_futures;&#xD;&#xA;use yew::prelude::*;&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;&#xD;&#xA;#[function_component(App)]&#xD;&#xA;fn app() -&gt; Html {&#xD;&#xA;    wasm_bindgen_futures::spawn_local(async move {&#xD;&#xA;        let api = OnlineClient::&lt;PolkadotConfig&gt;::new().await.unwrap();&#xD;&#xA;        log!(&quot;hello world&quot;);&#xD;&#xA;    });&#xD;&#xA;    html! {&#xD;&#xA;      &lt;&gt;&#xD;&#xA;          &lt;h1 class=&quot;text-3xl font-bold underline bg-slate-100&quot;&gt;{&quot;Hello world!&quot;}&lt;/h1&gt;&#xD;&#xA;      &lt;/&gt;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    yew::Renderer::&lt;App&gt;::new().render();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**The problem is `#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)] pub mod polkadot {}` always throw an error**&#xD;&#xA;```error&#xD;&#xA;error: Failed to decode metadata: Could not decode `RuntimeMetadataPrefixed.1`:&#xD;&#xA;           Could not decode `RuntimeMetadata`, variant doesn't exist&#xD;&#xA;```&#xD;&#xA;I think I followed the steps exactly in the official documentation&#xD;&#xA;&#xD;&#xA;1. Build a local blockchain&#xD;&#xA;2. run cargo install subxt-cli&#xD;&#xA;3. run subxt metadata -f bytes &gt; metadata.scale&#xD;&#xA;&#xD;&#xA;- What steps I forgot and need to do?&#xD;&#xA;- By the way, I find if I don't specify the subxt as `subxt = { version=&quot;0.27.0&quot;, default-features = false, features = [&quot;jsonrpsee-web&quot;] }` in my `Cargo.toml`, it seem like impossible to work with `Yew.rs`.And if i set subxt as `subxt = { version=&quot;0.27.0&quot;, default-features = false, features = [&quot;jsonrpsee-web&quot;] }` in my `Cargo.toml`, the `OnlineClient::&lt;PolkadotConfig&gt;::new().await.unwrap();` also throw error.&#xD;&#xA;```error&#xD;&#xA;no function or associated item named `new` found for struct `OnlineClient` in the current scope&#xD;&#xA;```&#xD;&#xA;Can someone answer this question for me?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30276" PostHistoryTypeId="1" PostId="7701" RevisionGUID="86e3da1a-28f9-4e55-9a0b-7ab542031383" CreationDate="2023-03-18T08:06:54.507" UserId="3971" Text="How to use subxt in yew.rs font-end app" ContentLicense="CC BY-SA 4.0" />
  <row Id="30277" PostHistoryTypeId="3" PostId="7701" RevisionGUID="86e3da1a-28f9-4e55-9a0b-7ab542031383" CreationDate="2023-03-18T08:06:54.507" UserId="3971" Text="|rust|substrate-front-end|subxt|rust-ipfs|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30278" PostHistoryTypeId="2" PostId="7702" RevisionGUID="a8409139-47bb-4e40-b3a0-766ce1cd802e" CreationDate="2023-03-18T08:35:24.750" UserId="3973" Text=" I was having this error when I was trying to deploy my ink smart contract in rococo:&#xD;&#xA;&#xD;&#xA;**StorageDepositLimitExhausted&#xD;&#xA;More storage was created than allowed by the storage deposit limit.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What might be the problem" ContentLicense="CC BY-SA 4.0" />
  <row Id="30280" PostHistoryTypeId="1" PostId="7702" RevisionGUID="a8409139-47bb-4e40-b3a0-766ce1cd802e" CreationDate="2023-03-18T08:35:24.750" UserId="3973" Text="I was trying to deploy my contract on rococo testnest and I was experiencing some problem" ContentLicense="CC BY-SA 4.0" />
  <row Id="30281" PostHistoryTypeId="3" PostId="7702" RevisionGUID="a8409139-47bb-4e40-b3a0-766ce1cd802e" CreationDate="2023-03-18T08:35:24.750" UserId="3973" Text="|polkadot-js|polkadot|substrate-node-template|parachain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30282" PostHistoryTypeId="2" PostId="7703" RevisionGUID="c690df5c-4d0f-47f0-929f-1dcd1b58b9ae" CreationDate="2023-03-18T10:04:07.813" UserId="3966" Text="The StorageDepositLimitExhausted error occurs when the storage required by your ink! smart contract exceeds the allowed storage deposit limit on the Rococo testnet.&#xD;&#xA;&#xD;&#xA;This error typically arises due to one or more of the following reasons:&#xD;&#xA;&#xD;&#xA;Large storage variables: Your smart contract might have large storage variables or a large number of storage variables that, when combined, exceed the allowed storage deposit limit. You should review your contract's storage usage and consider optimizing or reducing the size of your storage variables.&#xD;&#xA;&#xD;&#xA;Incorrect storage deposit limit configuration: It's possible that the storage deposit limit configuration in the Rococo testnet is set too low for your specific smart contract use case. If you believe this is the issue, you might want to discuss it with the developers or maintainers of the Rococo testnet.&#xD;&#xA;&#xD;&#xA;To address this issue, you can try the following:&#xD;&#xA;&#xD;&#xA;Optimize your smart contract: Review your ink! smart contract's storage usage and optimize it by reducing the size or number of storage variables. This might involve using more efficient data structures or rethinking your contract's design to minimize storage requirements.&#xD;&#xA;&#xD;&#xA;Reach out to the testnet maintainers: If you believe that the storage deposit limit on the Rococo testnet is too low for your use case, consider reaching out to the testnet maintainers through their support channels or forums. They might be able to provide guidance or even adjust the storage deposit limit, if necessary.&#xD;&#xA;&#xD;&#xA;Test on a different network: If the Rococo testnet's storage deposit limit continues to be a limitation for your smart contract, you can consider deploying and testing your contract on a different testnet or a local development network. This way, you can continue testing and development without being constrained by the storage deposit limit.&#xD;&#xA;&#xD;&#xA;Remember that each network may have different storage deposit limits and rules, so it's essential to test your smart contract on your target network to ensure it functions as expected.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30284" PostHistoryTypeId="2" PostId="7704" RevisionGUID="33a59bb6-2250-48fe-b3bf-4c0338fed63e" CreationDate="2023-03-18T12:39:26.013" UserId="2089" Text="https://polkadot.js.org/docs/substrate/storage#accountaccountid32-framesystemaccountinfo&#xD;&#xA;&#xD;&#xA;    account(AccountId32): FrameSystemAccountInfo&#xD;&#xA;    interface: api.query.system.account&#xD;&#xA;    summary: The full account information for a particular account ID.&#xD;&#xA;&#xD;&#xA;I want to find the substrate implementation in rust for the above polkadot js API interface?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30286" PostHistoryTypeId="1" PostId="7704" RevisionGUID="33a59bb6-2250-48fe-b3bf-4c0338fed63e" CreationDate="2023-03-18T12:39:26.013" UserId="2089" Text="How to find polkadot js API implementation in rust susbtrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="30287" PostHistoryTypeId="3" PostId="7704" RevisionGUID="33a59bb6-2250-48fe-b3bf-4c0338fed63e" CreationDate="2023-03-18T12:39:26.013" UserId="2089" Text="|polkadot-js|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30288" PostHistoryTypeId="2" PostId="7705" RevisionGUID="60efcc65-7df7-4d1d-b45c-a9d7688593ef" CreationDate="2023-03-18T13:29:26.000" UserId="251" Text="Generally, if this is a Substrate pallet.&#xD;&#xA;&#xD;&#xA;`'Substrate' repository -&gt; 'frame' folder -&gt; '&lt;PALLET_NAME&gt;'(here is system) -&gt; &lt;STORAGE_NAME&gt;(here is account)`&#xD;&#xA;&#xD;&#xA;e.g. https://github.com/paritytech/substrate/blob/29466db4b711730f5fa95f3fe1f289871b2c7c5c/frame/system/src/lib.rs#L529-L538" ContentLicense="CC BY-SA 4.0" />
  <row Id="30290" PostHistoryTypeId="50" PostId="5410" RevisionGUID="ad2c402b-1f13-458b-8d8d-28001dcadf17" CreationDate="2023-03-18T16:07:20.890" UserId="-1" />
  <row Id="30291" PostHistoryTypeId="2" PostId="7706" RevisionGUID="a792024c-4fe5-4238-be32-533f59838a23" CreationDate="2023-03-18T18:17:57.200" UserId="3868" Text="I'm new to Substrate and I'm creating a pallet in which the user can create contests by depositing a certain amount of assets. My idea is to send that amount to the PalletId account, but I'm having an error &quot;Err(Token(CannotCreate))&quot; when testing, and it's happening in the following function:&#xD;&#xA;```&#xD;&#xA;T::Assets::transfer(&#xD;&#xA;  prize_token_id,&#xD;&#xA;  &amp;who,&#xD;&#xA;  &amp;Self::account_id(),&#xD;&#xA;  prize_token_amount,&#xD;&#xA;  false&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;I didn't find it when I tried to see if anyone had something like this. I know the error is related to providers and consumers, but I couldn't relate it to my problem.&#xD;&#xA;&#xD;&#xA;What could be happening to throw this error?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30293" PostHistoryTypeId="1" PostId="7706" RevisionGUID="a792024c-4fe5-4238-be32-533f59838a23" CreationDate="2023-03-18T18:17:57.200" UserId="3868" Text="Token(CannotCreate) error on transferring asset to PalletId account" ContentLicense="CC BY-SA 4.0" />
  <row Id="30294" PostHistoryTypeId="3" PostId="7706" RevisionGUID="a792024c-4fe5-4238-be32-533f59838a23" CreationDate="2023-03-18T18:17:57.200" UserId="3868" Text="|error|assets|palletid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30295" PostHistoryTypeId="2" PostId="7707" RevisionGUID="f08be319-0345-4832-b9a3-21921d882c0a" CreationDate="2023-03-18T21:19:33.100" UserId="29" Text="Without more context, this could be your issue:&#xD;&#xA;&#xD;&#xA;The [tokens trait](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/index.html) has an [DepositConsequence](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/enum.DepositConsequence.html) enum which one of its variants is [CannotCreate](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/enum.DepositConsequence.html#variant.CannotCreate) which means:&#xD;&#xA;&gt; Deposit cannot happen since the account cannot be created (usually because it’s a consumer and there exists no provider reference).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30297" PostHistoryTypeId="5" PostId="7637" RevisionGUID="a582d8cc-692e-4cba-b2c7-754e5a7cca0e" CreationDate="2023-03-18T21:24:10.100" UserId="29" Comment="added 1 character in body" Text="# Overview&#xD;&#xA;We have a system that leverages both instanced pallets and non-instanced pallets. Specifically, we have pallets that maintain on-chain merkle trees. We can have many instances of these pallets, a la `::&lt;T: Config&lt;I&gt;, I: 'static&gt;` type trait definitions.&#xD;&#xA;&#xD;&#xA;The questions we have particularly relate to tightly coupling instanced pallets with non-instanced pallets, i.e. a pallet with just `::&lt;T: Config&gt;` implementations.&#xD;&#xA;&#xD;&#xA;## Broken Non-instanced pallet Config&#xD;&#xA;Currently, the non-instanced pallet `Config` needs to provide some instance to instantiate the tight coupling between the instanced pallet as follows. However, the non-instanced pallet has no notion of instances `I` so this of course doesn't compile. The traits in question are implemented with instances and so do not work in this environment.&#xD;&#xA;```rust &#xD;&#xA;pub trait Config: frame_system::Config + pallet_balances::Config {&#xD;&#xA;	...&#xD;&#xA;&#xD;&#xA;	/// VAnchor Interface&#xD;&#xA;	type VAnchor: VAnchorInterface&lt;VAnchorConfigration&lt;Self, I&gt;&gt;&#xD;&#xA;		+ VAnchorInspector&lt;VAnchorConfigration&lt;Self, I&gt;&gt;;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Ideal Non-instanced pallet Config&#xD;&#xA;The ideal case would be to have a new trait that somehow encompasses an individual instance of the instanced pallet while not restricting it to `Instance1` or `Instance2` even if that would be possible. What we have in mind is something such as:&#xD;&#xA;```rust&#xD;&#xA;pub trait Config: frame_system::Config + pallet_balances::Config {&#xD;&#xA;	...&#xD;&#xA;&#xD;&#xA;	/// VAnchor Interface&#xD;&#xA;	type VAnchor: VAnchorInterface&lt;VAnchorConfigrationInstance&lt;Self&gt;&gt;&#xD;&#xA;		+ VAnchorInspector&lt;VAnchorConfigrationInstance&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;However we are unsure how to massage these into reality.&#xD;&#xA;&#xD;&#xA;## Runtime Implementation&#xD;&#xA;The goal for our runtime is to provide something akin to the following:&#xD;&#xA;```rust&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Runtime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		...&#xD;&#xA;		// VAnchor&#xD;&#xA;		VAnchorBn254: pallet_vanchor::&lt;Instance1&gt;::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;		VAnchorBls381: pallet_vanchor::&lt;Instance2&gt;::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;		PalletInQuestion: pallet_in_question::{Pallet, Call, Storage, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl pallet_in_question::Config for Runtime {&#xD;&#xA;    VAnchor = VAnchorBn254&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Questions&#xD;&#xA;1. Is this doable and sensible?&#xD;&#xA;2. Are there examples or design patterns for this.&#xD;&#xA;3. How to work around the lack of instancing in the non-instanced pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30298" PostHistoryTypeId="5" PostId="7706" RevisionGUID="17eb8f96-2c58-41b3-a889-22e8973b66db" CreationDate="2023-03-18T21:51:31.627" UserId="3868" Comment="added 310 characters in body" Text="I'm new to Substrate and I'm creating a pallet in which the user can create contests by depositing a certain amount of assets. My idea is to send that amount to the PalletId account, but I'm having an error &quot;Err(Token(CannotCreate))&quot; when testing, and it's happening in the following function:&#xD;&#xA;```&#xD;&#xA;T::Assets::transfer(&#xD;&#xA;  prize_token_id,&#xD;&#xA;  &amp;who,&#xD;&#xA;  &amp;Self::account_id(),&#xD;&#xA;  prize_token_amount,&#xD;&#xA;  false&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;I didn't find it when I tried to see if anyone had something like this. I know the error is related to providers and consumers, but I couldn't relate it to my problem.&#xD;&#xA;&#xD;&#xA;What could be happening to throw this error?&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;The repo is here: https://github.com/pablolteixeira/constests-unit-network/blob/main/substrate-node-unitchain/pallets/contests/src/lib.rs&#xD;&#xA;&#xD;&#xA;On line 240, it's possible to find the &quot;transfer&quot; function that is panicking.&#xD;&#xA;&#xD;&#xA;```cargo test -p pallet-contests``` is sufficient to see the error happening." ContentLicense="CC BY-SA 4.0" />
  <row Id="30299" PostHistoryTypeId="5" PostId="7706" RevisionGUID="ad5f5d74-ad13-4a52-b157-5ccfd2d8e915" CreationDate="2023-03-18T22:37:41.753" UserId="3868" Comment="added 2 characters in body" Text="I'm new to Substrate and I'm creating a pallet in which the user can create contests by depositing a certain amount of assets. My idea is to send that amount to the PalletId account, but I'm having an error &quot;Err(Token(CannotCreate))&quot; when testing, and it's happening in the following function:&#xD;&#xA;```&#xD;&#xA;T::Assets::transfer(&#xD;&#xA;  prize_token_id,&#xD;&#xA;  &amp;who,&#xD;&#xA;  &amp;Self::account_id(),&#xD;&#xA;  prize_token_amount,&#xD;&#xA;  false&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;I didn't find it when I tried to see if anyone had something like this. I know the error is related to providers and consumers, but I couldn't relate it to my problem.&#xD;&#xA;&#xD;&#xA;What could be happening to throw this error?&#xD;&#xA;&#xD;&#xA;EDITED:&#xD;&#xA;&#xD;&#xA;The repo is here: https://github.com/pablolteixeira/constests-unit-network/blob/main/substrate-node-unitchain/pallets/contests/src/lib.rs&#xD;&#xA;&#xD;&#xA;On line 240, it's possible to find the &quot;transfer&quot; function that is panicking.&#xD;&#xA;&#xD;&#xA;```cargo test -p pallet-contests``` is sufficient to see the error happening." ContentLicense="CC BY-SA 4.0" />
  <row Id="30300" PostHistoryTypeId="2" PostId="7708" RevisionGUID="71ced450-1902-4ef4-bffd-886faa697cca" CreationDate="2023-03-18T23:57:03.600" UserId="3344" Text="How can one download the history of a native coin total issuance, via an API - Say DOT?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30302" PostHistoryTypeId="1" PostId="7708" RevisionGUID="71ced450-1902-4ef4-bffd-886faa697cca" CreationDate="2023-03-18T23:57:03.600" UserId="3344" Text="How to get history of the native coin total issuance through API - Say DOT" ContentLicense="CC BY-SA 4.0" />
  <row Id="30303" PostHistoryTypeId="3" PostId="7708" RevisionGUID="71ced450-1902-4ef4-bffd-886faa697cca" CreationDate="2023-03-18T23:57:03.600" UserId="3344" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30304" PostHistoryTypeId="50" PostId="5453" RevisionGUID="b83794c6-37c8-47e8-a140-baca78c7a30a" CreationDate="2023-03-19T03:07:00.857" UserId="-1" />
  <row Id="30305" PostHistoryTypeId="2" PostId="7709" RevisionGUID="23693f51-19d4-4697-ab90-4575d0c2ca6c" CreationDate="2023-03-19T07:26:05.293" UserId="251" Text="1. open polkadot apps https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/explorer&#xD;&#xA;2. navigate to `developer`&#xD;&#xA;3. navigate to `chain state`&#xD;&#xA;4. select `balances`&#xD;&#xA;5. select `total issuance`&#xD;&#xA;6. if you want to know the total issuance at a specific block height, pass the block hash to the `blockhash to query at` field, e.g. I checked the block `10000000` hash `0x6c51377632106ddba379416f2ef5e24450e90cee8c78a70daa262b2ae6f27e93`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Finally, you can make these steps into a script.&#xD;&#xA;&#xD;&#xA;Polkadot-JS API doc: https://polkadot.js.org/docs/substrate/storage#totalissuance-u128&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uYAi0.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30307" PostHistoryTypeId="50" PostId="5355" RevisionGUID="68cf8c56-d4d2-4f22-8192-018f02f3af71" CreationDate="2023-03-19T09:01:35.297" UserId="-1" />
  <row Id="30309" PostHistoryTypeId="2" PostId="7710" RevisionGUID="c2ab0b2d-e917-4043-960c-4fc31b4fe7ee" CreationDate="2023-03-19T10:18:00.877" UserId="251" Text="How to check if a pallet can be compiled to no-std?&#xD;&#xA;&#xD;&#xA;I ran:&#xD;&#xA;```sh&#xD;&#xA;cargo build --no-default-features --target wasm32-unknown-unknown&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But this didn't work. IIUC, we need some ENV to build the pallet to WASM.&#xD;&#xA;&#xD;&#xA;And I don't want to add this pallet to runtime and build the entire runtime to verify this, which takes a lot of time each time." ContentLicense="CC BY-SA 4.0" />
  <row Id="30311" PostHistoryTypeId="1" PostId="7710" RevisionGUID="c2ab0b2d-e917-4043-960c-4fc31b4fe7ee" CreationDate="2023-03-19T10:18:00.877" UserId="251" Text="How to check if a pallet can be compiled to no-std?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30312" PostHistoryTypeId="3" PostId="7710" RevisionGUID="c2ab0b2d-e917-4043-960c-4fc31b4fe7ee" CreationDate="2023-03-19T10:18:00.877" UserId="251" Text="|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30313" PostHistoryTypeId="50" PostId="5986" RevisionGUID="490b8721-277c-4381-b1dc-9052954bfee8" CreationDate="2023-03-19T11:00:25.043" UserId="-1" />
  <row Id="30314" PostHistoryTypeId="5" PostId="7149" RevisionGUID="b32330d3-1982-4bf2-9ea4-4c06cb392ea3" CreationDate="2023-03-19T11:02:49.037" UserId="2025" Comment="Improve question formulation, add correct tags" Text="I want to do this inside a precompile, so it is runtime and I don't have access to std." ContentLicense="CC BY-SA 4.0" />
  <row Id="30315" PostHistoryTypeId="4" PostId="7149" RevisionGUID="b32330d3-1982-4bf2-9ea4-4c06cb392ea3" CreationDate="2023-03-19T11:02:49.037" UserId="2025" Comment="Improve question formulation, add correct tags" Text="Is there any way to convert an ss58 address to the 32 bytes pubkey?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30316" PostHistoryTypeId="6" PostId="7149" RevisionGUID="b32330d3-1982-4bf2-9ea4-4c06cb392ea3" CreationDate="2023-03-19T11:02:49.037" UserId="2025" Comment="Improve question formulation, add correct tags" Text="|polkadot|ss58format|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30317" PostHistoryTypeId="24" PostId="7149" RevisionGUID="b32330d3-1982-4bf2-9ea4-4c06cb392ea3" CreationDate="2023-03-19T11:02:49.037" Comment="Proposed by 2025 approved by 104, 34 edit id of 391" ContentLicense="CC BY-SA 4.0" />
  <row Id="30318" PostHistoryTypeId="5" PostId="7636" RevisionGUID="3b5db226-4ccf-4ff5-b80e-b7ea102ca0a9" CreationDate="2023-03-19T11:02:54.853" UserId="1824" Comment="More idiomatic Rust" Text="I was attempting to comprehend the workings of cross-contract calling in substrate ink contracts using this particular sample code.&#xD;&#xA;&#xD;&#xA;If I provide `u64::MAX` as the `calls_count` value, it will result in a failure, what should the end user expect to receive when invoking the test_cross_contract_call function?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn test_cross_contract_call(&amp;mut self, callee: AccountId, calls_count: u64) {&#xD;&#xA;            let selector: Selector = Selector::new([0x6b, 0x25, 0xcb, 0x19]);&#xD;&#xA;            let response: u64 = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                .call_type(&#xD;&#xA;                    Call::new()&#xD;&#xA;                        .callee(callee)&#xD;&#xA;                        .transferred_value(0)&#xD;&#xA;                        .gas_limit(50000),&#xD;&#xA;                )&#xD;&#xA;                .call_flags(ink::env::CallFlags::default().set_allow_reentry(true))&#xD;&#xA;                .exec_input(ExecutionInput::new(selector).push_arg(calls_count))&#xD;&#xA;                .returns::&lt;u64&gt;()&#xD;&#xA;                .invoke();&#xD;&#xA;            self.value = response;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(message, selector = 0x6b25cb19)]&#xD;&#xA;pub fn dummy_function(&amp;mut self, value: u64) -&gt; u64 {&#xD;&#xA;            return 45 * value;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30319" PostHistoryTypeId="6" PostId="7636" RevisionGUID="3b5db226-4ccf-4ff5-b80e-b7ea102ca0a9" CreationDate="2023-03-19T11:02:54.853" UserId="1824" Comment="More idiomatic Rust" Text="|ink|smart-contract|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30320" PostHistoryTypeId="24" PostId="7636" RevisionGUID="3b5db226-4ccf-4ff5-b80e-b7ea102ca0a9" CreationDate="2023-03-19T11:02:54.853" Comment="Proposed by 1824 approved by 34 edit id of 392" ContentLicense="CC BY-SA 4.0" />
  <row Id="30321" PostHistoryTypeId="6" PostId="7634" RevisionGUID="23b75968-8cd9-4e79-8b6e-4d542d260c3c" CreationDate="2023-03-19T11:02:59.190" UserId="1824" Comment="Add more tags" Text="|ink|smart-contract|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30322" PostHistoryTypeId="24" PostId="7634" RevisionGUID="23b75968-8cd9-4e79-8b6e-4d542d260c3c" CreationDate="2023-03-19T11:02:59.190" Comment="Proposed by 1824 approved by 34 edit id of 393" ContentLicense="CC BY-SA 4.0" />
  <row Id="30323" PostHistoryTypeId="10" PostId="5841" RevisionGUID="5763ed85-a0b3-4989-adbc-9e7f13803919" CreationDate="2023-03-19T11:06:21.087" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:227,&quot;DisplayName&quot;:&quot;cmichi&quot;},{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;},{&quot;Id&quot;:2673,&quot;DisplayName&quot;:&quot;Adam Wierzbicki&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="30326" PostHistoryTypeId="2" PostId="7711" RevisionGUID="cfaec1dc-f595-4542-ad10-e985d8ac4da9" CreationDate="2023-03-19T12:52:24.123" UserId="2722" Text="I am trying to deploy a Substrate solo node on my server and access it remotely using the Polkadot.js front-end. I have followed the instructions in the Substrate documentation and have successfully deployed the node on my server. I can access the node using the Substrate command-line interface, but I am having trouble accessing it using the Polkadot.js front-end.&#xD;&#xA;&#xD;&#xA;When I try to connect to the node using the front-end from a remote location, I get an error message saying that the connection was refused.&#xD;&#xA;&#xD;&#xA;Can someone please provide step-by-step instructions for configuring the Polkadot.js front-end to connect to a Substrate solo node running on a remote server? I would appreciate any help or guidance on this issue.&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="30328" PostHistoryTypeId="1" PostId="7711" RevisionGUID="cfaec1dc-f595-4542-ad10-e985d8ac4da9" CreationDate="2023-03-19T12:52:24.123" UserId="2722" Text="How to deploy a Substrate solo node and access it remotely using Polkadot.js front-end?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30329" PostHistoryTypeId="3" PostId="7711" RevisionGUID="cfaec1dc-f595-4542-ad10-e985d8ac4da9" CreationDate="2023-03-19T12:52:24.123" UserId="2722" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30332" PostHistoryTypeId="5" PostId="7701" RevisionGUID="d18ef21d-90b5-432b-bab6-77448f039be6" CreationDate="2023-03-19T14:51:46.130" UserId="3971" Comment="added 4 characters in body" Text="Here is test demo, but always fail to run.&#xD;&#xA;&#xD;&#xA;- `Cargo.toml`&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;yew = { version = &quot;0.20.0&quot;, features = [&quot;csr&quot;] }&#xD;&#xA;gloo = &quot;0.8.0&quot;&#xD;&#xA;wasm-bindgen-futures = &quot;0.4.32&quot;&#xD;&#xA;subxt = { version=&quot;0.27.0&quot;, default-features = false, features = [&quot;jsonrpsee-web&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- `main.rs`&#xD;&#xA;```rust&#xD;&#xA;use gloo::console::log;&#xD;&#xA;// use sp_keyring::AccountKeyring;&#xD;&#xA;use subxt::{OnlineClient, PolkadotConfig};&#xD;&#xA;use wasm_bindgen_futures;&#xD;&#xA;use yew::prelude::*;&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;&#xD;&#xA;#[function_component(App)]&#xD;&#xA;fn app() -&gt; Html {&#xD;&#xA;    wasm_bindgen_futures::spawn_local(async move {&#xD;&#xA;        let api = OnlineClient::&lt;PolkadotConfig&gt;::new().await.unwrap();&#xD;&#xA;        log!(&quot;hello world&quot;);&#xD;&#xA;    });&#xD;&#xA;    html! {&#xD;&#xA;      &lt;&gt;&#xD;&#xA;          &lt;h1 class=&quot;text-3xl font-bold underline bg-slate-100&quot;&gt;{&quot;Hello world!&quot;}&lt;/h1&gt;&#xD;&#xA;      &lt;/&gt;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    yew::Renderer::&lt;App&gt;::new().render();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**The problem is `#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)] pub mod polkadot {}` always throw an error**&#xD;&#xA;```error&#xD;&#xA;error: Failed to decode metadata: Could not decode `RuntimeMetadataPrefixed.1`:&#xD;&#xA;           Could not decode `RuntimeMetadata`, variant doesn't exist&#xD;&#xA;```&#xD;&#xA;I think I followed the steps exactly in the official documentation&#xD;&#xA;&#xD;&#xA;1. Build a local blockchain&#xD;&#xA;2. run `cargo install subxt-cli`&#xD;&#xA;3. run `subxt metadata -f bytes &gt; metadata.scale`&#xD;&#xA;&#xD;&#xA;- What steps I forgot and need to do?&#xD;&#xA;- By the way, I find if I don't specify the subxt as `subxt = { version=&quot;0.27.0&quot;, default-features = false, features = [&quot;jsonrpsee-web&quot;] }` in my `Cargo.toml`, it seem like impossible to work with `Yew.rs`.And if i set subxt as `subxt = { version=&quot;0.27.0&quot;, default-features = false, features = [&quot;jsonrpsee-web&quot;] }` in my `Cargo.toml`, the `OnlineClient::&lt;PolkadotConfig&gt;::new().await.unwrap();` also throw error.&#xD;&#xA;```error&#xD;&#xA;no function or associated item named `new` found for struct `OnlineClient` in the current scope&#xD;&#xA;```&#xD;&#xA;Can someone answer this question for me?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30333" PostHistoryTypeId="5" PostId="7710" RevisionGUID="79179677-e16c-4efc-a2e6-aea7af7b32d7" CreationDate="2023-03-19T16:21:16.893" UserId="251" Comment="added 5 characters in body; edited title" Text="How to check if a pallet can be compiled to no-std/WASM?&#xD;&#xA;&#xD;&#xA;I ran:&#xD;&#xA;```sh&#xD;&#xA;cargo build --no-default-features --target wasm32-unknown-unknown&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But this didn't work. IIUC, we need some ENV to build the pallet to WASM.&#xD;&#xA;&#xD;&#xA;And I don't want to add this pallet to runtime and build the entire runtime to verify this, which takes a lot of time each time." ContentLicense="CC BY-SA 4.0" />
  <row Id="30334" PostHistoryTypeId="4" PostId="7710" RevisionGUID="79179677-e16c-4efc-a2e6-aea7af7b32d7" CreationDate="2023-03-19T16:21:16.893" UserId="251" Comment="added 5 characters in body; edited title" Text="How to check if a pallet can be compiled to no-std/WASM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30335" PostHistoryTypeId="6" PostId="7710" RevisionGUID="79179677-e16c-4efc-a2e6-aea7af7b32d7" CreationDate="2023-03-19T16:21:16.893" UserId="251" Comment="added 5 characters in body; edited title" Text="|pallet|wasm|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30336" PostHistoryTypeId="2" PostId="7713" RevisionGUID="a41b79d7-eef2-4c86-b179-5b3c92042434" CreationDate="2023-03-19T16:36:51.113" UserId="251" Text="First, add these flags to your boot command: `--unsafe-ws-external --rpc-cors all`.&#xD;&#xA;&#xD;&#xA;Then, open your browser:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Note, these settings are only recommended for using in dev/local testnet. As you see, it's unsafe.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rWCRh.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/c9IIm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30340" PostHistoryTypeId="2" PostId="7714" RevisionGUID="a9706680-0f44-4b34-90b2-93a199f2d9eb" CreationDate="2023-03-19T22:28:57.147" UserId="494" Text="I have a brand new macbook m2.&#xD;&#xA;&#xD;&#xA;I followed all the steps on https://docs.substrate.io/install/macos&#xD;&#xA;```&#xD;&#xA;% rustup show&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/bear/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.68.0 (2c8cc3432 2023-03-06)&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;% rustup +nightly show&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/bear/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.70.0-nightly (4a04d086c 2023-03-18)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;While trying to run substrate, I run into:&#xD;&#xA;```&#xD;&#xA;% ./target/release/substrate --dev&#xD;&#xA;2023-03-19 22:51:50 Substrate Node    &#xD;&#xA;2023-03-19 22:51:50 ✌️  version 3.0.0-dev-f8a1dd4c836    &#xD;&#xA;2023-03-19 22:51:50 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2023    &#xD;&#xA;2023-03-19 22:51:50  Chain specification: Development    &#xD;&#xA;2023-03-19 22:51:50   Node name: dramatic-road-4106    &#xD;&#xA;2023-03-19 22:51:50  Role: AUTHORITY    &#xD;&#xA;2023-03-19 22:51:50  Database: RocksDb at /var/folders/0n/4nqy69197mdfz6tz2sbrpwcm0000gn/T/substrateYXoVQu/chains/dev/db/full    &#xD;&#xA;2023-03-19 22:51:50 ⛓  Native runtime: node-268 (substrate-node-0.tx2.au10)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-03-19 22:51:51 [0]  generated 1 npos voters, 1 from validators and 0 nominators    &#xD;&#xA;2023-03-19 22:51:51 [0]  generated 1 npos targets    &#xD;&#xA;2023-03-19 22:51:51 Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which is coming from [`client/executor/common/src/runtime_blob/runtime_blob.rs`](https://github.com/paritytech/substrate/blob/f8a1dd4c836d7d29382ba66fc2fce40fc1364546/client/executor/common/src/runtime_blob/runtime_blob.rs#L51)&#xD;&#xA;&#xD;&#xA;The same happens with a few other repositories, namely:&#xD;&#xA;- `substrate-node-template`&#xD;&#xA;- `frontier-node-template`&#xD;&#xA;&#xD;&#xA;but it **does not** happen with `polkadot`." ContentLicense="CC BY-SA 4.0" />
  <row Id="30342" PostHistoryTypeId="1" PostId="7714" RevisionGUID="a9706680-0f44-4b34-90b2-93a199f2d9eb" CreationDate="2023-03-19T22:28:57.147" UserId="494" Text="cannot run substrate on a fresh macbook m2" ContentLicense="CC BY-SA 4.0" />
  <row Id="30343" PostHistoryTypeId="3" PostId="7714" RevisionGUID="a9706680-0f44-4b34-90b2-93a199f2d9eb" CreationDate="2023-03-19T22:28:57.147" UserId="494" Text="|wasm|macbook|m2|apple|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30344" PostHistoryTypeId="2" PostId="7715" RevisionGUID="06b29807-41eb-46bd-8f89-1bc124e552ba" CreationDate="2023-03-20T02:08:13.120" UserId="227" Text="Two things would be helpful for giving a specific answer:&#xD;&#xA;&#xD;&#xA;* Can you update your reproducer code to ink! 4.0? We have a migration guide [here](https://use.ink/faq/migrating-from-ink-3-to-4). There were some fixes along the way and I just want to ensure that the errors still appears.&#xD;&#xA;* Can you reduce the reproduction steps to what is strictly necessary? E.g. I don't understand how the unit test from step 5 is relevant. Instead of the names `C1` &amp; co, please use the contract names. What would be best is an ordered list of contract messages that you executed and the parameters you used.&#xD;&#xA;&#xD;&#xA;As I understand you, calling `SetCode::replace_code` directly works. The code for the chain extension also looks fine. &#xD;&#xA;&#xD;&#xA;I suspect it's an issue with your cross-contract calling code. It's hard to tell specifically where, but if you edit the question with what I wrote above we can pinpoint it further." ContentLicense="CC BY-SA 4.0" />
  <row Id="30346" PostHistoryTypeId="5" PostId="7710" RevisionGUID="708b38e8-d7c2-4c45-be32-5ddbfa1febcd" CreationDate="2023-03-20T03:01:47.350" UserId="251" Comment="added 2486 characters in body" Text="How to check if a pallet can be compiled to no-std/WASM?&#xD;&#xA;&#xD;&#xA;I ran:&#xD;&#xA;```sh&#xD;&#xA;cargo build --no-default-features --target wasm32-unknown-unknown&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But this didn't work. IIUC, we need some ENV to build the pallet to WASM.&#xD;&#xA;&#xD;&#xA;And I don't want to add this pallet to runtime and build the entire runtime to verify this, which takes a lot of time each time.&#xD;&#xA;&#xD;&#xA;I can compile the entire runtime, but if I try to compile the pallet with the command above, I got:&#xD;&#xA;```rs&#xD;&#xA;The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;warning: src/helpers.c:1:10: fatal error: 'setjmp.h' file not found&#xD;&#xA;warning: #include &lt;setjmp.h&gt;&#xD;&#xA;warning:          ^~~~~~~~~~&#xD;&#xA;warning: 1 error generated.&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for `wasmtime-runtime v1.0.2`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/root/code/darwinia-network/darwinia/target/debug/build/wasmtime-runtime-d7265199eb92a3b8/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  cargo:rerun-if-changed=src/helpers.c&#xD;&#xA;  TARGET = Some(&quot;wasm32-unknown-unknown&quot;)&#xD;&#xA;  OPT_LEVEL = Some(&quot;0&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown&#xD;&#xA;  CC_wasm32-unknown-unknown = None&#xD;&#xA;  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown&#xD;&#xA;  CC_wasm32_unknown_unknown = None&#xD;&#xA;  cargo:rerun-if-env-changed=TARGET_CC&#xD;&#xA;  TARGET_CC = None&#xD;&#xA;  cargo:rerun-if-env-changed=CC&#xD;&#xA;  CC = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown&#xD;&#xA;  CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown&#xD;&#xA;  CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;  cargo:rerun-if-env-changed=TARGET_CFLAGS&#xD;&#xA;  TARGET_CFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS&#xD;&#xA;  CFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;true&quot;)&#xD;&#xA;  running: &quot;clang&quot; &quot;-O0&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-g&quot; &quot;-fno-omit-frame-pointer&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DCFG_TARGET_OS_unknown&quot; &quot;-DCFG_TARGET_ARCH_wasm32&quot; &quot;-o&quot; &quot;/root/code/darwinia-network/darwinia/target/wasm32-unknown-unknown/debug/build/wasmtime-runtime-3f0543a6492357d6/out/src/helpers.o&quot; &quot;-c&quot; &quot;src/helpers.c&quot;&#xD;&#xA;  cargo:warning=src/helpers.c:1:10: fatal error: 'setjmp.h' file not found&#xD;&#xA;  cargo:warning=#include &lt;setjmp.h&gt;&#xD;&#xA;  cargo:warning=         ^~~~~~~~~~&#xD;&#xA;  cargo:warning=1 error generated.&#xD;&#xA;  exit status: 1&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  error occurred: Command &quot;clang&quot; &quot;-O0&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-g&quot; &quot;-fno-omit-frame-pointer&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DCFG_TARGET_OS_unknown&quot; &quot;-DCFG_TARGET_ARCH_wasm32&quot; &quot;-o&quot; &quot;/root/code/darwinia-network/darwinia/target/wasm32-unknown-unknown/debug/build/wasmtime-runtime-3f0543a6492357d6/out/src/helpers.o&quot; &quot;-c&quot; &quot;src/helpers.c&quot; with args &quot;clang&quot; did not execute successfully (status code exit status: 1).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30347" PostHistoryTypeId="2" PostId="7716" RevisionGUID="074e6013-8f67-43c1-a9d5-1f05bfb54329" CreationDate="2023-03-20T03:58:06.027" UserId="3971" Text="Here is test demo, but always fail to run.&#xD;&#xA;&#xD;&#xA;- `Cargo.toml`&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;yew = { version = &quot;0.20.0&quot;, features = [&quot;csr&quot;] }&#xD;&#xA;gloo = &quot;0.8.0&quot;&#xD;&#xA;wasm-bindgen-futures = &quot;0.4.32&quot;&#xD;&#xA;subxt = { version=&quot;0.27.0&quot;, default-features = false, features = [&quot;jsonrpsee-web&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;- `main.rs`&#xD;&#xA;```rust&#xD;&#xA;use gloo::console::log;&#xD;&#xA;// use sp_keyring::AccountKeyring;&#xD;&#xA;use subxt::{OnlineClient, PolkadotConfig};&#xD;&#xA;use wasm_bindgen_futures;&#xD;&#xA;use yew::prelude::*;&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;&#xD;&#xA;#[function_component(App)]&#xD;&#xA;fn app() -&gt; Html {&#xD;&#xA;    wasm_bindgen_futures::spawn_local(async move {&#xD;&#xA;        let api = OnlineClient::&lt;PolkadotConfig&gt;::new().await.unwrap();&#xD;&#xA;        log!(&quot;hello world&quot;);&#xD;&#xA;    });&#xD;&#xA;    html! {&#xD;&#xA;      &lt;&gt;&#xD;&#xA;          &lt;h1 class=&quot;text-3xl font-bold underline bg-slate-100&quot;&gt;{&quot;Hello world!&quot;}&lt;/h1&gt;&#xD;&#xA;      &lt;/&gt;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    yew::Renderer::&lt;App&gt;::new().render();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**The problem is `#[subxt::subxt(runtime_metadata_path = &quot;metadata.scale&quot;)] pub mod polkadot {}` always throw an error**&#xD;&#xA;```error&#xD;&#xA;error: Failed to decode metadata: Could not decode `RuntimeMetadataPrefixed.1`:&#xD;&#xA;           Could not decode `RuntimeMetadata`, variant doesn't exist&#xD;&#xA;```&#xD;&#xA;I think I followed the steps exactly in the official documentation&#xD;&#xA;&#xD;&#xA;1. Build a local blockchain&#xD;&#xA;2. run `cargo install subxt-cli`&#xD;&#xA;3. run `subxt metadata -f bytes &gt; metadata.scale`&#xD;&#xA;&#xD;&#xA;- What steps I forgot and need to do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30349" PostHistoryTypeId="1" PostId="7716" RevisionGUID="074e6013-8f67-43c1-a9d5-1f05bfb54329" CreationDate="2023-03-20T03:58:06.027" UserId="3971" Text="why the subxt can not decode metadata" ContentLicense="CC BY-SA 4.0" />
  <row Id="30350" PostHistoryTypeId="3" PostId="7716" RevisionGUID="074e6013-8f67-43c1-a9d5-1f05bfb54329" CreationDate="2023-03-20T03:58:06.027" UserId="3971" Text="|rust|substrate-front-end|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30351" PostHistoryTypeId="2" PostId="7717" RevisionGUID="9460dff1-335f-4aa0-b72f-b11d0693f3e3" CreationDate="2023-03-20T05:10:32.973" UserId="2366" Text="After [PR5451][1], it is possible to &quot;unlock&quot; parachain so that the state can be set by the parachain account on relaychain. But its unclear how to send this message from the parachain to relaychain. I have tried `Transact -&gt; Encoded call(remove_lock)` but this fails with the `Barrier` error. Has anyone used this? What is the correct way to send the `remove_lock` message to the relaychain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/pull/5451" ContentLicense="CC BY-SA 4.0" />
  <row Id="30353" PostHistoryTypeId="1" PostId="7717" RevisionGUID="9460dff1-335f-4aa0-b72f-b11d0693f3e3" CreationDate="2023-03-20T05:10:32.973" UserId="2366" Text="Send upward message to unlock parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="30354" PostHistoryTypeId="3" PostId="7717" RevisionGUID="9460dff1-335f-4aa0-b72f-b11d0693f3e3" CreationDate="2023-03-20T05:10:32.973" UserId="2366" Text="|parachain|xcm|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30355" PostHistoryTypeId="2" PostId="7718" RevisionGUID="321344dc-8637-4821-b886-ffc709c63d3d" CreationDate="2023-03-20T08:13:23.400" UserId="1959" Text="There are several reasons that could lead to this error, I'll list a few possible ones.&#xD;&#xA;1. You should send the message via **sudo or governance**.&#xD;&#xA;2. Your parachain sovereignAccount on relaychain should have enough tokens.&#xD;&#xA;3. The `Transact` instruction should use **Native** Origin, you can check [this answer](https://substrate.stackexchange.com/questions/5066/originkind-in-xcms-transact/5074#5074).&#xD;&#xA;4. You should Add `WithdrawAsset` and `BuyExecution` instructions before `Transact` instruction, also note, relychain assetId is `{parents: 0, interior: Here}`" ContentLicense="CC BY-SA 4.0" />
  <row Id="30364" PostHistoryTypeId="2" PostId="7720" RevisionGUID="28c2ef18-7b37-4292-9cb5-80da547fbdbb" CreationDate="2023-03-20T09:00:43.750" UserId="2445" Text="Important in this case is that the XCM message must have the native origin. You can only achieve this if you write a wrapper pallet that will send a UMP message from within a dispatchable.&#xD;&#xA;&#xD;&#xA;This is how we did it to initiate our parachain slot swap on the relay chain: https://github.com/integritee-network/pallets/blob/master/xcm-transactor/src/lib.rs#L92&#xD;&#xA;&#xD;&#xA;Note: As this allows to send an XCM message with the parachain as origin, you need to make sure that this dispatchable can't be called by anyone for security reasons. It should require the sudo/governance origin. even if this is not problematic for this particular relay chain call at hand." ContentLicense="CC BY-SA 4.0" />
  <row Id="30366" PostHistoryTypeId="2" PostId="7721" RevisionGUID="8758a866-a454-4fcd-98c4-32451207736a" CreationDate="2023-03-20T09:46:54.240" UserId="494" Text="solved by downgrading nightly from `1.70` to `1.68`&#xD;&#xA;&#xD;&#xA;interestingly, I couldn't really downgrade by simply calling `rustup` commands&#xD;&#xA;&#xD;&#xA;I had to do `rustup install nightly-2023-01-01` to make `1.68`available, then I had to rename `nightly-2023-01-01-aarch64-apple-darwin` to `nightly-aarch64-apple-darwin`. This was the only way I could successfully downgrade nightly." ContentLicense="CC BY-SA 4.0" />
  <row Id="30368" PostHistoryTypeId="6" PostId="7701" RevisionGUID="e610787e-b744-457d-bc30-201bfe0fcbe1" CreationDate="2023-03-20T11:02:46.230" UserId="85" Comment="edited tags" Text="|rust|substrate-front-end|subxt|rust-ipfs|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30369" PostHistoryTypeId="2" PostId="7722" RevisionGUID="12a41b85-1811-4fd5-9fec-aa442b9a78d9" CreationDate="2023-03-20T11:03:04.433" UserId="1756" Text="As the title asks, how do we abstract the raw payload of a transaction created with Polkadot JS?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// set up a tx, e.g. join a nomination pool&#xD;&#xA;const tx = api.tx.nominationPools.join(bond, poolId);&#xD;&#xA;&#xD;&#xA;// get raw payload data to sign elsewhere&#xD;&#xA;// tx.???&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I guess it should return something similar to the `createSigningPayload` mentioned in this wiki (very outdated): https://wiki.polkadot.network/docs/build-transaction-construction&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30371" PostHistoryTypeId="1" PostId="7722" RevisionGUID="12a41b85-1811-4fd5-9fec-aa442b9a78d9" CreationDate="2023-03-20T11:03:04.433" UserId="1756" Text="How to get raw payload from Polkadot JS transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="30372" PostHistoryTypeId="3" PostId="7722" RevisionGUID="12a41b85-1811-4fd5-9fec-aa442b9a78d9" CreationDate="2023-03-20T11:03:04.433" UserId="1756" Text="|polkadot-js|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30378" PostHistoryTypeId="5" PostId="7722" RevisionGUID="c10f1299-1046-4074-8011-a390e8e4aa43" CreationDate="2023-03-20T13:43:41.993" UserId="1756" Comment="added 289 characters in body" Text="As the title asks, how do we abstract the raw payload of a transaction created with Polkadot JS?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// set up a tx, e.g. join a nomination pool&#xD;&#xA;const tx = api.tx.nominationPools.join(bond, poolId);&#xD;&#xA;&#xD;&#xA;// get raw payload data to sign elsewhere&#xD;&#xA;// tx.???&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I guess it should return something similar to the `createSigningPayload` mentioned in this wiki (very outdated): https://wiki.polkadot.network/docs/build-transaction-construction&#xD;&#xA;&#xD;&#xA;#### so far...&#xD;&#xA;Doing the following creates a bare-bones extrinsic with empty block hash / genesis, and has incomplete data compared to a payload submitted on JS Apps:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const extrinsicPayload = api.registry.createType('ExtrinsicPayload', tx, {&#xD;&#xA;   version: tx.version,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30380" PostHistoryTypeId="5" PostId="7722" RevisionGUID="24eda842-b6ae-4989-85d9-17bb54f536a9" CreationDate="2023-03-21T01:42:38.767" UserId="1756" Comment="added 125 characters in body" Text="As the title asks, how do we abstract the raw payload of a transaction created with Polkadot JS?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// set up a tx, e.g. join a nomination pool&#xD;&#xA;const tx = api.tx.nominationPools.join(bond, poolId);&#xD;&#xA;&#xD;&#xA;// get raw payload data to sign elsewhere&#xD;&#xA;// tx.???&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I guess it should return something similar to the `createSigningPayload` mentioned in this wiki (very outdated): https://wiki.polkadot.network/docs/build-transaction-construction&#xD;&#xA;&#xD;&#xA;#### so far...&#xD;&#xA;Doing the following creates a bare-bones extrinsic with empty block hash / genesis, and has incomplete data compared to a payload submitted on JS Apps:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const extrinsicPayload = api.registry.createType('ExtrinsicPayload', tx, {&#xD;&#xA;   version: tx.version,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;I've determined that each payload property needs to be injected into the above example. I will update to a working example shortly." ContentLicense="CC BY-SA 4.0" />
  <row Id="30381" PostHistoryTypeId="2" PostId="7724" RevisionGUID="2b9a9291-51e4-4122-91cf-723c878da0cd" CreationDate="2023-03-21T01:56:56.563" UserId="3352" Text="```api.tx.balances.transfer(txAddress, new BN(txAmount)).paymentInfo(toAddress)```&#xD;&#xA;When I call paymentinfo to make a transaction, I got this error.&#xD;&#xA;`Error: The transactionPaymentApi.queryInfo runtime call is not available in your environment`&#xD;&#xA;&#xD;&#xA;But, `isFunction(api.rpc.payment?.queryInfo)` is always true.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30383" PostHistoryTypeId="1" PostId="7724" RevisionGUID="2b9a9291-51e4-4122-91cf-723c878da0cd" CreationDate="2023-03-21T01:56:56.563" UserId="3352" Text="how to fix transactionPaymentApi.queryInfo runtime call issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30384" PostHistoryTypeId="3" PostId="7724" RevisionGUID="2b9a9291-51e4-4122-91cf-723c878da0cd" CreationDate="2023-03-21T01:56:56.563" UserId="3352" Text="|polkadot-js|runtime|rpc|substrate-front-end|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30385" PostHistoryTypeId="5" PostId="7724" RevisionGUID="17ff6b7c-18af-425e-acbf-bfd377e57c5b" CreationDate="2023-03-21T02:17:19.270" UserId="3352" Comment="deleted 3 characters in body" Text="```api.tx.balances.transfer(recipient, new BN(txAmount)).paymentInfo(sender)```&#xD;&#xA;When I call paymentinfo to make a transaction, I got this error.&#xD;&#xA;`Error: The transactionPaymentApi.queryInfo runtime call is not available in your environment`&#xD;&#xA;&#xD;&#xA;But, `isFunction(api.rpc.payment?.queryInfo)` is always true.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30386" PostHistoryTypeId="2" PostId="7725" RevisionGUID="6eaa246e-ac1e-44be-b193-0e466f97a2cc" CreationDate="2023-03-21T03:23:47.000" UserId="25" Text="I wanted to add a runtime interface, which can be simplified to the following:&#xD;&#xA;```rust&#xD;&#xA;#[sp_runtime_interface::runtime_interface]&#xD;&#xA;pub trait Test {&#xD;&#xA;    fn some_bytes() -&gt; Vec&lt;u8&gt; {&#xD;&#xA;        vec![]&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn get_instance() -&gt; Instance {&#xD;&#xA;    static INSTANCE: once_cell::sync::OnceCell&lt;Instance&gt; = once_cell::sync::OnceCell::new();&#xD;&#xA;    INSTANCE&#xD;&#xA;        .get_or_init(|| {&#xD;&#xA;            Instance::expensive_new(&amp;test::some_bytes())&#xD;&#xA;        })&#xD;&#xA;        .cheap_clone()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I then added it to host functions and got this when tried to run the runtime:&#xD;&#xA;&gt; Cannot create a runtime error=Other(&quot;runtime requires function imports which are not present on the host: 'env:_critical_section_1_0_acquire', 'env:_critical_section_1_0_release'&quot;)&#xD;&#xA;&#xD;&#xA;Note that those are not the functions I added and look like functions related to atomic operations. When removing `once_cell`, everything starts to work again, but I'm not sure how do I provide those functions.&#xD;&#xA;&#xD;&#xA;I'm quite puzzled right now. The goal here is go get large (4.5MiB) blob of bytes available in the runtime, then instantiate a data structure from those bytes (that is relatively expensive to do) and cache it for future use (cloning is cheap)." ContentLicense="CC BY-SA 4.0" />
  <row Id="30388" PostHistoryTypeId="1" PostId="7725" RevisionGUID="6eaa246e-ac1e-44be-b193-0e466f97a2cc" CreationDate="2023-03-21T03:23:47.000" UserId="25" Text="runtime requires function imports which are not present on the host: 'env:_critical_section_1_0_acquire', 'env:_critical_section_1_0_release'" ContentLicense="CC BY-SA 4.0" />
  <row Id="30389" PostHistoryTypeId="3" PostId="7725" RevisionGUID="6eaa246e-ac1e-44be-b193-0e466f97a2cc" CreationDate="2023-03-21T03:23:47.000" UserId="25" Text="|runtime|host-functions|runtime-interface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30390" PostHistoryTypeId="2" PostId="7726" RevisionGUID="64e4e939-c608-4eba-8277-622abcdc0130" CreationDate="2023-03-21T06:50:21.817" UserId="3252" Text="How to solve this err?&#xD;&#xA;&#xD;&#xA;1010: Invalid Transaction: Transaction has an ancient birth block" ContentLicense="CC BY-SA 4.0" />
  <row Id="30392" PostHistoryTypeId="1" PostId="7726" RevisionGUID="64e4e939-c608-4eba-8277-622abcdc0130" CreationDate="2023-03-21T06:50:21.817" UserId="3252" Text="How to solve this err: 1010: Invalid Transaction: Transaction has an ancient birth block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30393" PostHistoryTypeId="3" PostId="7726" RevisionGUID="64e4e939-c608-4eba-8277-622abcdc0130" CreationDate="2023-03-21T06:50:21.817" UserId="3252" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30394" PostHistoryTypeId="2" PostId="7727" RevisionGUID="e9a90ed0-5512-4ede-9b34-413d56f8629b" CreationDate="2023-03-21T08:16:04.740" UserId="3852" Text="I can get instruction's XCM base weight [from code][1] (for example, WithdrawAsset instruction), but I can't found how to get this value from PolkadotJS. How can I get an instruction's XCM base weight for Kusama from PolkadotJS? Or what useful information can I get for calculating XCM weights and fees from PolkadotJS?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/v0.9.37/runtime/kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs#L49-L53" ContentLicense="CC BY-SA 4.0" />
  <row Id="30396" PostHistoryTypeId="1" PostId="7727" RevisionGUID="e9a90ed0-5512-4ede-9b34-413d56f8629b" CreationDate="2023-03-21T08:16:04.740" UserId="3852" Text="How can I get an instruction's XCM base weight for Kusama and other substrate chains through Polkadot JS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30397" PostHistoryTypeId="3" PostId="7727" RevisionGUID="e9a90ed0-5512-4ede-9b34-413d56f8629b" CreationDate="2023-03-21T08:16:04.740" UserId="3852" Text="|xcm|weight|fee|weighttofee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30398" PostHistoryTypeId="5" PostId="7724" RevisionGUID="d107d8d9-6d04-4baf-8987-796d7c1d8459" CreationDate="2023-03-21T08:29:31.083" UserId="3352" Comment="added 3 characters in body" Text="```api.tx.balances.transfer(recipient, new BN(txAmount)).paymentInfo(sender)```&#xD;&#xA;When I call paymentinfo to get a transaction fee, I got this error.&#xD;&#xA;`Error: The transactionPaymentApi.queryInfo runtime call is not available in your environment`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30401" PostHistoryTypeId="5" PostId="5571" RevisionGUID="783be44c-28e2-4c54-bcf8-9c6bce6dd1b6" CreationDate="2023-03-21T09:17:49.433" UserId="3319" Comment="deleted 52 characters in body" Text="i have read their official [documentation][1] and im not sure i completely understand the process of block creation or finalization.&#xD;&#xA;&#xD;&#xA;i know that after each period of time, there is a block author that creates a block and broadcast it to the other validators, does the others need to sign the block and resend it and only after 2/3 collected signatures the block gets added? or they simply accept it based on the `BlockImport` rules? &#xD;&#xA;&#xD;&#xA;in other words is it like proof of work where when you receive a block you need to verify its validaity based on some rules and you dont care whether others added it or not, or is it that you need another round to make sure everyone received the same block from the author and then add it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://openethereum.github.io/Aura" ContentLicense="CC BY-SA 4.0" />
  <row Id="30402" PostHistoryTypeId="2" PostId="7728" RevisionGUID="bc22956e-310f-43c1-a446-565ed81cd481" CreationDate="2023-03-21T10:27:50.910" UserId="1756" Text="Solution: The payload needs to be populated and formatted manually. Here is a complete example:&#xD;&#xA;&#xD;&#xA;Notes:&#xD;&#xA;- `era` is immortal, meaning the tx will always be valid.&#xD;&#xA;- `method` just requires a `Call` type of your api.query...&#xD;&#xA;- `from` is the signer / sender address.&#xD;&#xA;- Haven't tested this with batching.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;&#xD;&#xA;const nonce = (await api.system.account(from)).nonce.toNumber()&#xD;&#xA;&#xD;&#xA;const payload = {&#xD;&#xA;  specVersion: api.runtimeVersion.specVersion.toHex(),&#xD;&#xA;  transactionVersion: api.runtimeVersion.transactionVersion.toHex(),&#xD;&#xA;  address: from,&#xD;&#xA;  blockHash: lastHeader.hash.toHex(),&#xD;&#xA;  blockNumber: lastHeader.number.toHex(),&#xD;&#xA;  era: '0x00',&#xD;&#xA;  genesisHash: api.genesisHash.toHex(),&#xD;&#xA;  method: api.createType('Call', tx).toHex(),&#xD;&#xA;  nonce,&#xD;&#xA;  signedExtensions: Object.values(&#xD;&#xA;    api.registry.metadata.extrinsic.signedExtensions.toHuman() || {}&#xD;&#xA;  )?.map((e: any) =&gt; e.identifier),&#xD;&#xA;  tip: tx.tip.toHex(),&#xD;&#xA;  version: tx.version,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const raw = api.registry.createType('ExtrinsicPayload', payload);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30404" PostHistoryTypeId="2" PostId="7729" RevisionGUID="3d2fe5c1-75de-4c02-a395-5072e0021d90" CreationDate="2023-03-21T10:36:58.157" UserId="100" Text="Not able to reproduce your problem, but by looking at the code i am thinking it should be something like this:&#xD;&#xA;```ts&#xD;&#xA;if (result.isOk) {&#xD;&#xA;  const decoded = this.contract.abi.registry.createType(`Result&lt;Person, Error&gt;`, [result.asOk.data]).toHuman()&#xD;&#xA;}&#xD;&#xA;console.log(decoded.isActive)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30406" PostHistoryTypeId="2" PostId="7730" RevisionGUID="26ad12d1-d438-475e-bd49-65c5b8f6b4a3" CreationDate="2023-03-21T11:54:33.133" UserId="2372" Text="I'm working on the parity-bridges-common where i'm not enable to send assets from one chain to another. &#xD;&#xA;&#xD;&#xA;I'm giving instruction of teleportation from one chain to another and it is showing me success[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;And the event came to source chain explorer&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But in the another chain it is showing this event. But it is not showing any xcm related messages neither it is transferring the tokens&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/PDdx5.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/j61is.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/4rb8o.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30408" PostHistoryTypeId="1" PostId="7730" RevisionGUID="26ad12d1-d438-475e-bd49-65c5b8f6b4a3" CreationDate="2023-03-21T11:54:33.133" UserId="2372" Text="Unable to teleports assets from one chain to another chain through bridge" ContentLicense="CC BY-SA 4.0" />
  <row Id="30409" PostHistoryTypeId="3" PostId="7730" RevisionGUID="26ad12d1-d438-475e-bd49-65c5b8f6b4a3" CreationDate="2023-03-21T11:54:33.133" UserId="2372" Text="|xcm|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30410" PostHistoryTypeId="2" PostId="7731" RevisionGUID="cf284f14-2a07-49f8-9acc-c3bb943cc7ca" CreationDate="2023-03-21T13:26:09.227" UserId="3317" Text="For FRAME-based runtimes this would be caused by current block number - Era::birth block number &gt; BlockHashCount. (e.g. in Polkadot BlockHashCount = 2400, so a transaction with birth block number 1337 would be valid up until block number 1337 + 2400, after which point the transaction would be considered to have an ancient birth block.) ([ref][1])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/b3cacfb059e9d79d1cde270c796dc0f33ff3ef20/primitives/runtime/src/transaction_validity.rs#L59-L68" ContentLicense="CC BY-SA 4.0" />
  <row Id="30412" PostHistoryTypeId="2" PostId="7732" RevisionGUID="7cf8d9b8-24a5-4024-bdff-36e8309387ef" CreationDate="2023-03-21T15:26:56.573" UserId="1756" Text="I am attempting to submit a transaction using Polkadot JS API and a signature that has been signed by Ledger. Upon passing it to `send` I get the `Invalid Transaction: Transaction has a bad signature` error.&#xD;&#xA;&#xD;&#xA;The payload is generated roughly as follows:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;&#xD;&#xA;const payload = {&#xD;&#xA;        specVersion: api.runtimeVersion.specVersion.toHex(),&#xD;&#xA;        transactionVersion: api.runtimeVersion.transactionVersion.toHex(),&#xD;&#xA;        address: submitAddress,&#xD;&#xA;        blockHash: lastHeader.hash.toHex(),&#xD;&#xA;        blockNumber: lastHeader.number.toHex(),&#xD;&#xA;        era: '0x00',&#xD;&#xA;        genesisHash: api.genesisHash.toHex(),&#xD;&#xA;        method: api.createType('Call', tx).toHex(),&#xD;&#xA;        nonce: getBalanceAccount(from)?.nonce || 0,&#xD;&#xA;        signedExtensions: Object.values(&#xD;&#xA;          api.registry.metadata.extrinsic.signedExtensions.toHuman() || {}&#xD;&#xA;        )?.map((e: any) =&gt; e.identifier),&#xD;&#xA;        tip: tx.tip.toHex(),&#xD;&#xA;        version: tx.version,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const raw = api.registry.createType('ExtrinsicPayload', payload);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The Ledger device is successfully generating a signature, using `@zondax/ledger-substrate-js`'s `sign` method. &#xD;&#xA;&#xD;&#xA;I am then injecting this signature into the `tx` like so:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;tx.addSignature(from, hexAddPrefix(signature.toString('hex')));&#xD;&#xA;&#xD;&#xA;const unsub = await tx.send(({ status, events = [] }: AnyApi) =&gt; {&#xD;&#xA;   ...&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;This is yielding an error:&#xD;&#xA;`RpcError: 1010: Invalid Transaction: Transaction has a bad signature`.&#xD;&#xA;&#xD;&#xA;What is incorrect in the above snippets that is yielding this error?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30414" PostHistoryTypeId="1" PostId="7732" RevisionGUID="7cf8d9b8-24a5-4024-bdff-36e8309387ef" CreationDate="2023-03-21T15:26:56.573" UserId="1756" Text="Invalid Transaction: Transaction has a bad signature - Ledger signature into tx" ContentLicense="CC BY-SA 4.0" />
  <row Id="30415" PostHistoryTypeId="3" PostId="7732" RevisionGUID="7cf8d9b8-24a5-4024-bdff-36e8309387ef" CreationDate="2023-03-21T15:26:56.573" UserId="1756" Text="|polkadot-js|javascript|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30416" PostHistoryTypeId="5" PostId="7710" RevisionGUID="7bc450e5-6ea5-4b33-8579-22b6e14dd01a" CreationDate="2023-03-21T15:49:05.673" UserId="251" Comment="added 257 characters in body" Text="How to check if a pallet can be compiled to no-std/WASM?&#xD;&#xA;&#xD;&#xA;I ran:&#xD;&#xA;```sh&#xD;&#xA;cargo build --no-default-features --target wasm32-unknown-unknown&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But this didn't work. IIUC, we need some ENV to build the pallet to WASM.&#xD;&#xA;&#xD;&#xA;And I don't want to add this pallet to runtime and build the entire runtime to verify this, which takes a lot of time each time.&#xD;&#xA;&#xD;&#xA;I can compile the entire runtime, but if I try to compile the pallet with the command above, I got:&#xD;&#xA;```rs&#xD;&#xA;The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;warning: src/helpers.c:1:10: fatal error: 'setjmp.h' file not found&#xD;&#xA;warning: #include &lt;setjmp.h&gt;&#xD;&#xA;warning:          ^~~~~~~~~~&#xD;&#xA;warning: 1 error generated.&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for `wasmtime-runtime v1.0.2`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/root/code/darwinia-network/darwinia/target/debug/build/wasmtime-runtime-d7265199eb92a3b8/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  cargo:rerun-if-changed=src/helpers.c&#xD;&#xA;  TARGET = Some(&quot;wasm32-unknown-unknown&quot;)&#xD;&#xA;  OPT_LEVEL = Some(&quot;0&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown&#xD;&#xA;  CC_wasm32-unknown-unknown = None&#xD;&#xA;  cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown&#xD;&#xA;  CC_wasm32_unknown_unknown = None&#xD;&#xA;  cargo:rerun-if-env-changed=TARGET_CC&#xD;&#xA;  TARGET_CC = None&#xD;&#xA;  cargo:rerun-if-env-changed=CC&#xD;&#xA;  CC = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown&#xD;&#xA;  CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown&#xD;&#xA;  CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;  cargo:rerun-if-env-changed=TARGET_CFLAGS&#xD;&#xA;  TARGET_CFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS&#xD;&#xA;  CFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;true&quot;)&#xD;&#xA;  running: &quot;clang&quot; &quot;-O0&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-g&quot; &quot;-fno-omit-frame-pointer&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DCFG_TARGET_OS_unknown&quot; &quot;-DCFG_TARGET_ARCH_wasm32&quot; &quot;-o&quot; &quot;/root/code/darwinia-network/darwinia/target/wasm32-unknown-unknown/debug/build/wasmtime-runtime-3f0543a6492357d6/out/src/helpers.o&quot; &quot;-c&quot; &quot;src/helpers.c&quot;&#xD;&#xA;  cargo:warning=src/helpers.c:1:10: fatal error: 'setjmp.h' file not found&#xD;&#xA;  cargo:warning=#include &lt;setjmp.h&gt;&#xD;&#xA;  cargo:warning=         ^~~~~~~~~~&#xD;&#xA;  cargo:warning=1 error generated.&#xD;&#xA;  exit status: 1&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  error occurred: Command &quot;clang&quot; &quot;-O0&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-g&quot; &quot;-fno-omit-frame-pointer&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DCFG_TARGET_OS_unknown&quot; &quot;-DCFG_TARGET_ARCH_wasm32&quot; &quot;-o&quot; &quot;/root/code/darwinia-network/darwinia/target/wasm32-unknown-unknown/debug/build/wasmtime-runtime-3f0543a6492357d6/out/src/helpers.o&quot; &quot;-c&quot; &quot;src/helpers.c&quot; with args &quot;clang&quot; did not execute successfully (status code exit status: 1).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I added the `setjmp.h` to the path. And the problem above was resolved.&#xD;&#xA;&#xD;&#xA;But I got a lot of `xxx not found` issues. And I realized those `.h` are all `lib32`. So, I believe we need an ENV to compile this. `x86_64` host can not compile this natively." ContentLicense="CC BY-SA 4.0" />
  <row Id="30417" PostHistoryTypeId="5" PostId="7732" RevisionGUID="20dae182-0eff-4e3c-99aa-6e13d16ef1ac" CreationDate="2023-03-21T16:03:24.917" UserId="1756" Comment="added 10 characters in body" Text="I am attempting to submit a transaction using Polkadot JS API and a signature that has been signed by Ledger. Upon passing it to `send` I get the `Invalid Transaction: Transaction has a bad signature` error.&#xD;&#xA;&#xD;&#xA;The payload is generated roughly as follows:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;&#xD;&#xA;const payload = {&#xD;&#xA;        specVersion: api.runtimeVersion.specVersion.toHex(),&#xD;&#xA;        transactionVersion: api.runtimeVersion.transactionVersion.toHex(),&#xD;&#xA;        address: submitAddress,&#xD;&#xA;        blockHash: lastHeader.hash.toHex(),&#xD;&#xA;        blockNumber: lastHeader.number.toHex(),&#xD;&#xA;        era: '0x00',&#xD;&#xA;        genesisHash: api.genesisHash.toHex(),&#xD;&#xA;        method: api.createType('Call', tx).toHex(),&#xD;&#xA;        nonce: getBalanceAccount(from)?.nonce || 0,&#xD;&#xA;        signedExtensions: Object.values(&#xD;&#xA;          api.registry.metadata.extrinsic.signedExtensions.toHuman() || {}&#xD;&#xA;        )?.map((e: any) =&gt; e.identifier),&#xD;&#xA;        tip: tx.tip.toHex(),&#xD;&#xA;        version: tx.version,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const raw = api.registry.createType('ExtrinsicPayload', payload);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The Ledger device is successfully generating a signature, using `@zondax/ledger-substrate-js`'s `sign` method. &#xD;&#xA;&#xD;&#xA;I am then injecting this signature into the `tx` like so:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;tx.addSignature(from, hexAddPrefix(signature.toString('hex')));&#xD;&#xA;&#xD;&#xA;const unsub = await tx.send(({ status, events = [] }: AnyApi) =&gt; {&#xD;&#xA;   ...&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;This is yielding an error:&#xD;&#xA;`RpcError: 1010: Invalid Transaction: Transaction has a bad signature`.&#xD;&#xA;&#xD;&#xA;What is incorrect / missing in the above snippets that is yielding this error?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30418" PostHistoryTypeId="2" PostId="7733" RevisionGUID="5bef49c8-24ac-4429-ace3-67fb4564bf36" CreationDate="2023-03-21T16:17:29.160" UserId="3352" Text="I used 9.6.2, just upgraded the @polkadot/api to the latest version and it worked as expected.&#xD;&#xA;Thank you  @Tarik Gul and @pepoviola&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30420" PostHistoryTypeId="5" PostId="7732" RevisionGUID="2a1b0a68-8a30-42bc-b7b3-d3a78fcf5cbf" CreationDate="2023-03-21T16:57:30.173" UserId="1756" Comment="added 639 characters in body" Text="I am attempting to submit a transaction using Polkadot JS API and a signature that has been signed by Ledger. Upon passing it to `send` I get the `Invalid Transaction: Transaction has a bad signature` error.&#xD;&#xA;&#xD;&#xA;The payload is generated roughly as follows:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;&#xD;&#xA;const payload = {&#xD;&#xA;        specVersion: api.runtimeVersion.specVersion.toHex(),&#xD;&#xA;        transactionVersion: api.runtimeVersion.transactionVersion.toHex(),&#xD;&#xA;        address: submitAddress,&#xD;&#xA;        blockHash: lastHeader.hash.toHex(),&#xD;&#xA;        blockNumber: lastHeader.number.toHex(),&#xD;&#xA;        era: '0x00',&#xD;&#xA;        genesisHash: api.genesisHash.toHex(),&#xD;&#xA;        method: api.createType('Call', tx).toHex(),&#xD;&#xA;        nonce: getBalanceAccount(from)?.nonce || 0,&#xD;&#xA;        signedExtensions: Object.values(&#xD;&#xA;          api.registry.metadata.extrinsic.signedExtensions.toHuman() || {}&#xD;&#xA;        )?.map((e: any) =&gt; e.identifier),&#xD;&#xA;        tip: tx.tip.toHex(),&#xD;&#xA;        version: tx.version,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const raw = api.registry.createType('ExtrinsicPayload', payload);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The Ledger device is successfully generating a signature, using `@zondax/ledger-substrate-js`'s `sign` method. &#xD;&#xA;&#xD;&#xA;I am then injecting this signature into the `tx` like so:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;tx.addSignature(from, hexAddPrefix(signature.toString('hex')));&#xD;&#xA;&#xD;&#xA;const unsub = await tx.send(({ status, events = [] }: AnyApi) =&gt; {&#xD;&#xA;   ...&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;This is yielding an error:&#xD;&#xA;`RpcError: 1010: Invalid Transaction: Transaction has a bad signature`.&#xD;&#xA;&#xD;&#xA;console logging `tx.toHuman()` after `addSignature` gives the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;isSigned&quot;: true,&#xD;&#xA;    &quot;method&quot;: {&#xD;&#xA;        &quot;args&quot;: {&#xD;&#xA;            &quot;amount&quot;: &quot;20,000,000,000&quot;,&#xD;&#xA;            &quot;pool_id&quot;: &quot;15&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;method&quot;: &quot;join&quot;,&#xD;&#xA;        &quot;section&quot;: &quot;nominationPools&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;era&quot;: {&#xD;&#xA;        &quot;ImmortalEra&quot;: &quot;0x00&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;nonce&quot;: &quot;0&quot;,&#xD;&#xA;    &quot;signature&quot;: &quot;0x4ce81c594615f5b0812b29f392081ae07fd65a142998fca1a2f9f81d67ded13098cd544689b401ca7c915b23ec6bf58a51aba7ba4eec51f7eb491f5af0c95b09&quot;,&#xD;&#xA;    &quot;signer&quot;: {&#xD;&#xA;        &quot;Id&quot;: &quot;16F1ghy4bMr72BGyin7ryTxiQqJFJwpePsNJcZo1p6dUGVZT&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;tip&quot;: &quot;0&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is incorrect / missing in the above snippets that is yielding this error?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30421" PostHistoryTypeId="5" PostId="7732" RevisionGUID="8d893952-2c0f-47c9-afdc-82091532f6f0" CreationDate="2023-03-21T17:04:47.497" UserId="1756" Comment="deleted 41 characters in body" Text="I am attempting to submit a transaction using Polkadot JS API and a signature that has been signed by Ledger. Upon passing it to `send` I get the `Invalid Transaction: Transaction has a bad signature` error.&#xD;&#xA;&#xD;&#xA;The payload is generated roughly as follows:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;&#xD;&#xA;const payload = {&#xD;&#xA;        specVersion: api.runtimeVersion.specVersion.toHex(),&#xD;&#xA;        transactionVersion: api.runtimeVersion.transactionVersion.toHex(),&#xD;&#xA;        address: submitAddress,&#xD;&#xA;        blockHash: lastHeader.hash.toHex(),&#xD;&#xA;        blockNumber: lastHeader.number.toHex(),&#xD;&#xA;        genesisHash: api.genesisHash.toHex(),&#xD;&#xA;        method: api.createType('Call', tx).toHex(),&#xD;&#xA;        nonce: tx.nonce.toHex(),&#xD;&#xA;        signedExtensions: Object.values(&#xD;&#xA;          api.registry.metadata.extrinsic.signedExtensions.toHuman() || {}&#xD;&#xA;        )?.map((e: any) =&gt; e.identifier),&#xD;&#xA;        tip: tx.tip.toHex(),&#xD;&#xA;        version: tx.version,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const raw = api.registry.createType('ExtrinsicPayload', payload);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The Ledger device is successfully generating a signature, using `@zondax/ledger-substrate-js`'s `sign` method. &#xD;&#xA;&#xD;&#xA;I am then injecting this signature into the `tx` like so:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;tx.addSignature(from, hexAddPrefix(signature.toString('hex')));&#xD;&#xA;&#xD;&#xA;const unsub = await tx.send(({ status, events = [] }: AnyApi) =&gt; {&#xD;&#xA;   ...&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;This is yielding an error:&#xD;&#xA;`RpcError: 1010: Invalid Transaction: Transaction has a bad signature`.&#xD;&#xA;&#xD;&#xA;console logging `tx.toHuman()` after `addSignature` gives the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;isSigned&quot;: true,&#xD;&#xA;    &quot;method&quot;: {&#xD;&#xA;        &quot;args&quot;: {&#xD;&#xA;            &quot;amount&quot;: &quot;20,000,000,000&quot;,&#xD;&#xA;            &quot;pool_id&quot;: &quot;15&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;method&quot;: &quot;join&quot;,&#xD;&#xA;        &quot;section&quot;: &quot;nominationPools&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;era&quot;: {&#xD;&#xA;        &quot;ImmortalEra&quot;: &quot;0x00&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;nonce&quot;: &quot;0&quot;,&#xD;&#xA;    &quot;signature&quot;: &quot;0x4ce81c594615f5b0812b29f392081ae07fd65a142998fca1a2f9f81d67ded13098cd544689b401ca7c915b23ec6bf58a51aba7ba4eec51f7eb491f5af0c95b09&quot;,&#xD;&#xA;    &quot;signer&quot;: {&#xD;&#xA;        &quot;Id&quot;: &quot;16F1ghy4bMr72BGyin7ryTxiQqJFJwpePsNJcZo1p6dUGVZT&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;tip&quot;: &quot;0&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is incorrect / missing in the above snippets that is yielding this error?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30422" PostHistoryTypeId="2" PostId="7734" RevisionGUID="658dbf9b-fb8f-49a5-b1b8-474106726f91" CreationDate="2023-03-21T18:02:06.313" UserId="3030" Text="If i have a very expensive runtime api, that can be called via an rpc, is this a vector for a dos attack?&#xD;&#xA;&#xD;&#xA;I understand that this is an offchain query to storage and therefore should not interfere with the runtime at all but what is the worst case if such a runtime api exists?&#xD;&#xA;&#xD;&#xA;Please correct me if im misunderstood.&#xD;&#xA;&#xD;&#xA;Thanks " ContentLicense="CC BY-SA 4.0" />
  <row Id="30424" PostHistoryTypeId="1" PostId="7734" RevisionGUID="658dbf9b-fb8f-49a5-b1b8-474106726f91" CreationDate="2023-03-21T18:02:06.313" UserId="3030" Text="Expensive runtime api: attack vector?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30425" PostHistoryTypeId="3" PostId="7734" RevisionGUID="658dbf9b-fb8f-49a5-b1b8-474106726f91" CreationDate="2023-03-21T18:02:06.313" UserId="3030" Text="|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30426" PostHistoryTypeId="2" PostId="7735" RevisionGUID="309246c5-8f5f-427f-a05c-9a0c283251c8" CreationDate="2023-03-21T22:32:07.630" UserId="73" Text="The worst case with such an api is that the RPC node could be brought down. However, the API could also be called via light clients, so you should try to not have some runtime API that iterates the entire storage or other expensive operations. " ContentLicense="CC BY-SA 4.0" />
  <row Id="30428" PostHistoryTypeId="5" PostId="7732" RevisionGUID="b075fcf9-99d6-4e89-a4ab-3945dbd635b7" CreationDate="2023-03-22T04:24:17.767" UserId="1756" Comment="deleted 1 character in body" Text="I am attempting to submit a transaction using Polkadot JS API and a signature that has been signed by Ledger. Upon passing it to `send` I get the `Invalid Transaction: Transaction has a bad signature` error.&#xD;&#xA;&#xD;&#xA;The payload is generated roughly as follows:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;&#xD;&#xA;const payload = {&#xD;&#xA;        specVersion: api.runtimeVersion.specVersion.toHex(),&#xD;&#xA;        transactionVersion: api.runtimeVersion.transactionVersion.toHex(),&#xD;&#xA;        address: submitAddress,&#xD;&#xA;        blockHash: lastHeader.hash.toHex(),&#xD;&#xA;        blockNumber: lastHeader.number.toHex(),&#xD;&#xA;        genesisHash: api.genesisHash.toHex(),&#xD;&#xA;        method: api.createType('Call', tx).toHex(),&#xD;&#xA;        nonce: tx.nonce.toHex(),&#xD;&#xA;        signedExtensions: Object.values(&#xD;&#xA;          api.registry.metadata.extrinsic.signedExtensions.toHuman() || {}&#xD;&#xA;        ).map((e: any) =&gt; e.identifier),&#xD;&#xA;        tip: tx.tip.toHex(),&#xD;&#xA;        version: tx.version,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const raw = api.registry.createType('ExtrinsicPayload', payload);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The Ledger device is successfully generating a signature, using `@zondax/ledger-substrate-js`'s `sign` method. &#xD;&#xA;&#xD;&#xA;I am then injecting this signature into the `tx` like so:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;tx.addSignature(from, hexAddPrefix(signature.toString('hex')));&#xD;&#xA;&#xD;&#xA;const unsub = await tx.send(({ status, events = [] }: AnyApi) =&gt; {&#xD;&#xA;   ...&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;This is yielding an error:&#xD;&#xA;`RpcError: 1010: Invalid Transaction: Transaction has a bad signature`.&#xD;&#xA;&#xD;&#xA;console logging `tx.toHuman()` after `addSignature` gives the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;isSigned&quot;: true,&#xD;&#xA;    &quot;method&quot;: {&#xD;&#xA;        &quot;args&quot;: {&#xD;&#xA;            &quot;amount&quot;: &quot;20,000,000,000&quot;,&#xD;&#xA;            &quot;pool_id&quot;: &quot;15&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;method&quot;: &quot;join&quot;,&#xD;&#xA;        &quot;section&quot;: &quot;nominationPools&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;era&quot;: {&#xD;&#xA;        &quot;ImmortalEra&quot;: &quot;0x00&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;nonce&quot;: &quot;0&quot;,&#xD;&#xA;    &quot;signature&quot;: &quot;0x4ce81c594615f5b0812b29f392081ae07fd65a142998fca1a2f9f81d67ded13098cd544689b401ca7c915b23ec6bf58a51aba7ba4eec51f7eb491f5af0c95b09&quot;,&#xD;&#xA;    &quot;signer&quot;: {&#xD;&#xA;        &quot;Id&quot;: &quot;16F1ghy4bMr72BGyin7ryTxiQqJFJwpePsNJcZo1p6dUGVZT&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;tip&quot;: &quot;0&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is incorrect / missing in the above snippets that is yielding this error?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30434" PostHistoryTypeId="50" PostId="7271" RevisionGUID="69ac5204-34c7-453a-b30b-cc076263c4ff" CreationDate="2023-03-22T09:07:20.920" UserId="-1" />
  <row Id="30435" PostHistoryTypeId="2" PostId="7737" RevisionGUID="1e8cfc01-0ce1-4f7d-ad8d-e3b5dd6f0ddb" CreationDate="2023-03-22T09:57:09.437" UserId="1842" Text="I was wondering about block import in particular about invalid blocks: What are the consequences of a block being deemed invalid/failing block import - except well for the block not being imported. Is there any punishment for the block author for example? &#xD;&#xA;&#xD;&#xA;Related: The block producer will try to import its own block as far as I know, if that fails I would assume it won't distribute it over the network. So even if there were a punishment for invalid blocks an honest node should never get punished, because even if it produced an invalid block for some reason, it would not distribute it." ContentLicense="CC BY-SA 4.0" />
  <row Id="30437" PostHistoryTypeId="1" PostId="7737" RevisionGUID="1e8cfc01-0ce1-4f7d-ad8d-e3b5dd6f0ddb" CreationDate="2023-03-22T09:57:09.437" UserId="1842" Text="What happens on invalid blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30438" PostHistoryTypeId="3" PostId="7737" RevisionGUID="1e8cfc01-0ce1-4f7d-ad8d-e3b5dd6f0ddb" CreationDate="2023-03-22T09:57:09.437" UserId="1842" Text="|consensus|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30439" PostHistoryTypeId="5" PostId="7677" RevisionGUID="118ae479-1f3c-41b3-810d-fbb2dbfbaa17" CreationDate="2023-03-22T11:16:09.100" UserId="16" Comment="syntax highlighting" Text="**The Problem**&#xD;&#xA;&#xD;&#xA;I recently switched from polkadot-v0.20.0 to polkadot-v0.37.0 in order to support V4 Ink Smart contracts.&#xD;&#xA;&#xD;&#xA;But I am encountering the following error using the npm package @polkadot/api when batching multiple transactions as such:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;await Promise.all(&#xD;&#xA;  txs[addressid].map(async (val) =&gt; {&#xD;&#xA;    let tokenId = Math.floor(100000 * Math.random());&#xD;&#xA;    while (tokenIds.includes(tokenId)) {&#xD;&#xA;      tokenId = Math.floor(100000 * Math.random());&#xD;&#xA;    }&#xD;&#xA;    const storageDepositLimit = null;&#xD;&#xA;    const { gasRequired } = await contract.query.mint(&#xD;&#xA;      &quot;&quot;,&#xD;&#xA;      {&#xD;&#xA;        gasLimit: api?.registry.createType(&quot;WeightV2&quot;, {&#xD;&#xA;          refTime: MAX_CALL_WEIGHT,&#xD;&#xA;          proofSize: PROOFSIZE,&#xD;&#xA;        }),&#xD;&#xA;        storageDepositLimit,&#xD;&#xA;      },&#xD;&#xA;      tokenId,&#xD;&#xA;      val.name,&#xD;&#xA;      parseInt(val.price)&#xD;&#xA;    );&#xD;&#xA;    const gasLimit = api?.registry.createType(&quot;WeightV2&quot;, gasRequired)&#xD;&#xA;    out.push(&#xD;&#xA;      contract.tx.mint(&#xD;&#xA;        { gasLimit },&#xD;&#xA;        tokenId,&#xD;&#xA;        val.name,&#xD;&#xA;        parseInt(val.price)&#xD;&#xA;      )&#xD;&#xA;    );&#xD;&#xA;    val.tokenId = tokenId;&#xD;&#xA;    checks.push(val);&#xD;&#xA;  })&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;await new Promise((resolve) =&gt; {&#xD;&#xA;  api.tx.utility.batch(out).signAndSend(wallet, ({ status }) =&gt; {&#xD;&#xA;    if (status.isInBlock) {&#xD;&#xA;      ////console.log`Completed at block hash #${status.asInBlock}`);&#xD;&#xA;      resolve();&#xD;&#xA;    }&#xD;&#xA;  });&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;RPC-CORE: call(method: Text, data: Bytes, at?: BlockHash): Bytes:: -32000: Client error: Execution failed: failed to instantiate a new WASM module instance: Limit of 32 concurrent instances has been reached&quot;.&#xD;&#xA;&#xD;&#xA;On my substrate node, I had this error as well:&#xD;&#xA;```&#xD;&#xA;Ran out of free WASM instances&#xD;&#xA;```&#xD;&#xA;But I was able to solve this error by using the following flag:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--max-runtime-instance 256&#xD;&#xA;```&#xD;&#xA;Although the 'Ran out of free Wasm instances' error went away, i still have the Limit of 32 concurrent instances reached error!&#xD;&#xA;&#xD;&#xA;my node is running polkadot-v0.37.0&#xD;&#xA;npm packages: &#xD;&#xA;```&#xD;&#xA;    &quot;@polkadot/api&quot;: &quot;9.10.5&quot;,&#xD;&#xA;    &quot;@polkadot/api-contract&quot;: &quot;9.10.5&quot;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**My suspicion**&#xD;&#xA;&#xD;&#xA;I think this has something to do with the fact that I transitioned from BTreeMap to a Mapping as a way to store values because BTreeMap is limited in how many keys it can store&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30440" PostHistoryTypeId="2" PostId="7738" RevisionGUID="02ac4afa-bb20-410c-bd68-1a6eec857b52" CreationDate="2023-03-22T12:10:00.783" UserId="73" Text="&gt; Is there any punishment for the block author for example?&#xD;&#xA;&#xD;&#xA;No there is no punishment. You can not really proof that a block is invalid to the runtime. Yeah, you could do similar to what Polkadot is doing with PVF validation, but you can also just rely on the fact that the block author is loosing its reward. The reward should be incentivization enough to not send invalid blocks. An author can also just send one block per slot as otherwise they can get slashed for equivocating (which can be proved to the runtime).&#xD;&#xA;&#xD;&#xA;&gt; The block producer will try to import its own block as far as I know, if that fails I would assume it won't distribute it over the network.&#xD;&#xA;&#xD;&#xA;No, block authors to not re-execute their own block. They just import the state changes directly to the db. So, they could potentially miss that their block is invalid, but as I said above they will not get punished for this." ContentLicense="CC BY-SA 4.0" />
  <row Id="30442" PostHistoryTypeId="50" PostId="2129" RevisionGUID="0dada162-1361-47c2-b763-d09d2bdb1a9b" CreationDate="2023-03-22T13:04:10.507" UserId="-1" />
  <row Id="30443" PostHistoryTypeId="2" PostId="7739" RevisionGUID="bdf5c39e-9f1d-4d66-adfe-c3d22a2aa68a" CreationDate="2023-03-22T14:16:06.460" UserId="16" Text="Every time you call `contract.query` (for gas estimation in this case) an RPC call will be made which each uses its own Wasm instance. You are doing those queries in parallel. This makes sense as it potentially speeds up your code. However, by doing so you are essentially exhausting the resources of the node. A public node would probably throttle your requests and it would work. You can work around this by submitting your queries sequentially instead of in parallel.&#xD;&#xA;&#xD;&#xA;Your suspicion is not the root cause. However, it might indirectly causing this issue by making your contract run slower and hence making the query take longer. But this is not really relevant here." ContentLicense="CC BY-SA 4.0" />
  <row Id="30445" PostHistoryTypeId="2" PostId="7740" RevisionGUID="dc9c71a8-2278-4e34-97ca-7f8abb778ed7" CreationDate="2023-03-22T14:29:40.183" UserId="227" Text="To answer this question in the best possible way you would have to provide more details on which library/tool you are using to listen for events. Ideally with example code.&#xD;&#xA;&#xD;&#xA;Generally though the answer is: Any library that I'm aware of does this for you. &#xD;&#xA;&#xD;&#xA;For `polkadot-js/api-contracts` see here: https://polkadot.js.org/docs/api-contract/start/contract.tx/#events.&#xD;&#xA;&#xD;&#xA;For `subxt` example code like this will give you the events after submitting an extrinsic:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let tx_events = self&#xD;&#xA;    .api&#xD;&#xA;    .call(&#xD;&#xA;        sp_runtime::MultiAddress::Id(message.account_id().clone()),&#xD;&#xA;        value,&#xD;&#xA;        dry_run.exec_result.gas_required,&#xD;&#xA;        storage_deposit_limit,&#xD;&#xA;        message.exec_input().to_vec(),&#xD;&#xA;        signer,&#xD;&#xA;    )&#xD;&#xA;    .await;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30447" PostHistoryTypeId="2" PostId="7741" RevisionGUID="e73db98f-b578-4595-8b18-5cd9eb381b0e" CreationDate="2023-03-22T14:33:05.140" UserId="377" Text="I want to create a pallet by which any user can create the token on the my substrate chain.&#xD;&#xA;do we have any pallet which can help in the implementation of this feature?&#xD;&#xA;any reference would be appreciable" ContentLicense="CC BY-SA 4.0" />
  <row Id="30449" PostHistoryTypeId="1" PostId="7741" RevisionGUID="e73db98f-b578-4595-8b18-5cd9eb381b0e" CreationDate="2023-03-22T14:33:05.140" UserId="377" Text="How we can create the pallet extrinsic to create the multiple tokens?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30450" PostHistoryTypeId="3" PostId="7741" RevisionGUID="e73db98f-b578-4595-8b18-5cd9eb381b0e" CreationDate="2023-03-22T14:33:05.140" UserId="377" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30451" PostHistoryTypeId="2" PostId="7742" RevisionGUID="19a2b7f8-f81d-4a31-af53-22ed1f444458" CreationDate="2023-03-22T14:42:25.740" UserId="451" Text="The `ContractEmitted` event has the account id of the contract which emitted the event:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// A custom event emitted by the contract.&#xD;&#xA;ContractEmitted {&#xD;&#xA;	/// The contract that emitted the event.&#xD;&#xA;	contract: T::AccountId,&#xD;&#xA;	/// Data supplied by the contract. Metadata generated during contract compilation&#xD;&#xA;	/// is needed to decode it.&#xD;&#xA;	data: Vec&lt;u8&gt;,&#xD;&#xA;},&#xD;&#xA;```&#xD;&#xA;Source: https://github.com/paritytech/substrate/blob/8f0b0f69e79c0dcf1487b9858792439c35a1d4cd/frame/contracts/src/lib.rs#L770" ContentLicense="CC BY-SA 4.0" />
  <row Id="30453" PostHistoryTypeId="5" PostId="7740" RevisionGUID="b16dcbce-8171-4227-8f61-e9692731e30a" CreationDate="2023-03-22T14:59:13.733" UserId="227" Comment="added 42 characters in body" Text="To answer this question in the best possible way you would have to provide more details on which library/tool you are using to listen for events. Ideally with example code.&#xD;&#xA;&#xD;&#xA;Generally though the answer is: Any library that I'm aware of does this if you‘re the one issuing the contract invocation. &#xD;&#xA;&#xD;&#xA;For `polkadot-js/api-contracts` see here: https://polkadot.js.org/docs/api-contract/start/contract.tx/#events.&#xD;&#xA;&#xD;&#xA;For `subxt` example code like this will give you the events after submitting an extrinsic:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let tx_events = self&#xD;&#xA;    .api&#xD;&#xA;    .call(&#xD;&#xA;        sp_runtime::MultiAddress::Id(message.account_id().clone()),&#xD;&#xA;        value,&#xD;&#xA;        dry_run.exec_result.gas_required,&#xD;&#xA;        storage_deposit_limit,&#xD;&#xA;        message.exec_input().to_vec(),&#xD;&#xA;        signer,&#xD;&#xA;    )&#xD;&#xA;    .await;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30454" PostHistoryTypeId="2" PostId="7743" RevisionGUID="fd1583ef-8a66-4505-9012-e4f391f3b456" CreationDate="2023-03-22T15:08:45.073" UserId="699" Text="Using **lldb** (like with VSCode), it is fairly easy to attach it to the client, allowing to debug the client side of the node. However, once the wasmtime is executing the Wasm Runtime, the debugger is not able to retrieve the information.&#xD;&#xA;&#xD;&#xA;Using `--execution native` is a possible temporary solution but is not suitable to all cases. Moreover, the Native execution is meant to be removed at some point.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30456" PostHistoryTypeId="1" PostId="7743" RevisionGUID="fd1583ef-8a66-4505-9012-e4f391f3b456" CreationDate="2023-03-22T15:08:45.073" UserId="699" Text="How to attach debugger to the Runtime WASM" ContentLicense="CC BY-SA 4.0" />
  <row Id="30457" PostHistoryTypeId="3" PostId="7743" RevisionGUID="fd1583ef-8a66-4505-9012-e4f391f3b456" CreationDate="2023-03-22T15:08:45.073" UserId="699" Text="|runtime|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30458" PostHistoryTypeId="2" PostId="7744" RevisionGUID="2ff158a9-cb6c-46fa-b63e-b04ff73d9724" CreationDate="2023-03-22T15:22:11.807" UserId="3317" Text="[Pallet-assets][1] does this for you!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="30461" PostHistoryTypeId="2" PostId="7745" RevisionGUID="308f00fb-06cb-455f-9aef-f1b4990e0327" CreationDate="2023-03-22T17:21:26.803" UserId="3327" Text="I downloaded substrate node template from [here][1].&#xD;&#xA;&#xD;&#xA;I am following the instructions given in the README and using following command to run the node in docker:&#xD;&#xA;&#xD;&#xA;./scripts/docker_run.sh.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It give the following error:&#xD;&#xA;&#xD;&#xA;&quot;Error response from daemon: invalid mount config for type &quot;bind&quot;: bind source path does not exist: /host_mnt/Users/syedkamran/polkadot/substrate-node-template/.local&quot;&#xD;&#xA;&#xD;&#xA;When I add an empty &quot;.local&quot; file the issue get resolved. &#xD;&#xA;&#xD;&#xA;My questions here are:&#xD;&#xA;&#xD;&#xA;1. What is the &quot;.local&quot; file for?&#xD;&#xA;2. Is there any workaround so that the docker/bash commnad without including this &quot;.local&quot; file?&#xD;&#xA;2. If this file is necessary than why they do not add this file to the souce code?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Error screen shot][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://i.stack.imgur.com/mI8w3.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="30463" PostHistoryTypeId="1" PostId="7745" RevisionGUID="308f00fb-06cb-455f-9aef-f1b4990e0327" CreationDate="2023-03-22T17:21:26.803" UserId="3327" Text="Error while running substrate node template" ContentLicense="CC BY-SA 4.0" />
  <row Id="30464" PostHistoryTypeId="3" PostId="7745" RevisionGUID="308f00fb-06cb-455f-9aef-f1b4990e0327" CreationDate="2023-03-22T17:21:26.803" UserId="3327" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30465" PostHistoryTypeId="52" PostId="7737" RevisionGUID="2d5b39c3-f91f-4d34-a9de-07ee4402dad4" CreationDate="2023-03-22T17:58:52.403" />
  <row Id="30466" PostHistoryTypeId="5" PostId="7740" RevisionGUID="2e90226c-520a-4960-b5b3-d3e41b2f007c" CreationDate="2023-03-22T19:45:01.283" UserId="227" Comment="added 1 character in body" Text="To answer this question in the best possible way you would have to provide more details on which library/tool you are using to listen for events. Ideally with example code.&#xD;&#xA;&#xD;&#xA;Generally though the answer is: Any library that I'm aware of does this if you‘re the one issuing the contract invocation. &#xD;&#xA;&#xD;&#xA;For `polkadot-js/api-contracts` see here: https://polkadot.js.org/docs/api-contract/start/contract.tx/#events.&#xD;&#xA;&#xD;&#xA;For `subxt`, example code like this will give you the events after submitting an extrinsic:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let tx_events = self&#xD;&#xA;    .api&#xD;&#xA;    .call(&#xD;&#xA;        sp_runtime::MultiAddress::Id(message.account_id().clone()),&#xD;&#xA;        value,&#xD;&#xA;        dry_run.exec_result.gas_required,&#xD;&#xA;        storage_deposit_limit,&#xD;&#xA;        message.exec_input().to_vec(),&#xD;&#xA;        signer,&#xD;&#xA;    )&#xD;&#xA;    .await;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30467" PostHistoryTypeId="50" PostId="6919" RevisionGUID="d3b57657-f791-456b-9e0b-d3bf81b6d6ad" CreationDate="2023-03-22T22:05:45.667" UserId="-1" />
  <row Id="30468" PostHistoryTypeId="2" PostId="7746" RevisionGUID="ca2c4ee6-6f0c-4a2d-9489-298181405d7b" CreationDate="2023-03-22T22:58:06.527" UserId="83" Text="&#xD;&#xA;It is looking for a .local/ folder but it doesn't exist.&#xD;&#xA;&#xD;&#xA;I created this PR https://github.com/paritytech/substrate/pull/12901 to add that .local/ folder to the node-template (substrate-node-template) part of the [Substrate repository] (https://github.com/paritytech/substrate) source code so users wouldn't get that error but the maintainers didn't want to merge it for some reason (please feel free to request for it to be re-opened) in favour of the option of running substrate-node-template in a Docker container from the [Substrate repository] (https://github.com/paritytech/substrate) instead.&#xD;&#xA;&#xD;&#xA;Note that the [substrate-node-template repository](https://github.com/substrate-developer-hub/substrate-node-template/issues/396) is closed to PRs since it uses code from the [node-template section of the upstream Substrate repository] (https://github.com/paritytech/substrate/tree/master/bin/node-template).&#xD;&#xA;&#xD;&#xA;If you want to run substrate-node-template in a Docker container follow the Substrate [Docker instructions here](https://github.com/paritytech/substrate#getting-started) instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="30470" PostHistoryTypeId="5" PostId="7746" RevisionGUID="d47710ee-5e6d-43e5-9ff4-7b4ecb51f878" CreationDate="2023-03-22T23:16:50.150" UserId="83" Comment="fix info" Text="It is looking for a .local/ folder but it doesn't exist.&#xD;&#xA;&#xD;&#xA;I created this PR https://github.com/paritytech/substrate/pull/12901 to add that .local/ folder to the node-template (substrate-node-template) part of the [Substrate repository] (https://github.com/paritytech/substrate) source code so users wouldn't get that error but the maintainers didn't want to merge it for some reason in favour of the option of running substrate-node-template in a Docker container from the [Substrate repository] (https://github.com/paritytech/substrate) instead.&#xD;&#xA;&#xD;&#xA;Note that the [substrate-node-template repository](https://github.com/substrate-developer-hub/substrate-node-template/issues/396) is closed to PRs, otherwise I would have created a PR to add the missing .local/ folder into that source code too to fix that error. It historically uses code from the [node-template section of the upstream Substrate repository] (https://github.com/paritytech/substrate/tree/master/bin/node-template).&#xD;&#xA;&#xD;&#xA;If you want to run substrate-node-template in a Docker container follow the Substrate [Docker instructions here](https://github.com/paritytech/substrate#getting-started) instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="30471" PostHistoryTypeId="5" PostId="7746" RevisionGUID="ac6a1918-a369-424a-afb3-392780c87777" CreationDate="2023-03-22T23:28:27.203" UserId="83" Comment="fix links" Text="It is looking for a .local/ folder but it doesn't exist.&#xD;&#xA;&#xD;&#xA;I created [this PR][1] to add that .local/ folder to the node-template (substrate-node-template) part of the [Substrate repository][2] source code so users wouldn't get that error but the maintainers didn't want to merge it for some reason in favour of the option of running substrate-node-template in a Docker container from the [Substrate repository][2] instead.&#xD;&#xA;&#xD;&#xA;Note that [this issue][3] highlights that the substrate-node-template repository is closed to PRs, otherwise I would have created a PR to add the missing .local/ folder into its source code too to fix that error. It historically uses code from the [node-template section of the upstream Substrate repository][4].&#xD;&#xA;&#xD;&#xA;If you want to run substrate-node-template in a Docker container follow the Substrate [Docker instructions here][5] instead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/12901&#xD;&#xA;  [2]: https://github.com/paritytech/substrate&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/issues/396&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/tree/master/bin/node-template&#xD;&#xA;  [5]: https://github.com/paritytech/substrate#getting-started" ContentLicense="CC BY-SA 4.0" />
  <row Id="30472" PostHistoryTypeId="5" PostId="7746" RevisionGUID="7abdeeac-0979-42eb-ae8e-4699305caccd" CreationDate="2023-03-22T23:45:55.397" UserId="83" Comment="fix links and try to make things clearer" Text="It is looking for a .local/ folder but it doesn't exist.&#xD;&#xA;&#xD;&#xA;I created [this PR][1] to add that .local/ folder to the node-template (substrate-node-template) part of the [Substrate repository][2] source code so users wouldn't get that error but the maintainers didn't want to merge it because they were in favour of the option of running substrate-node-template in a Docker container from the upstream [Substrate repository][2] instead.&#xD;&#xA;&#xD;&#xA;Note that [this issue][3] highlights that the substrate-node-template repository is closed to PRs, otherwise I would have created a PR to add the missing .local/ folder into its source code too to fix that error. &#xD;&#xA;Since you've highlighted that others like yourself are facing the same issue, I've suggested [here][4] that we remove all Docker related code from the [substrate-node-template][5] repository and update its README to provide a link to the [substrate][2] repository's [Docker instructions here][6].&#xD;&#xA;&#xD;&#xA;The [substrate-node-template][5] repository historically uses code from the [node-template section of the upstream Substrate repository][7].&#xD;&#xA;&#xD;&#xA;If you want to run the latest Substrate node-template in a Docker container, please follow the Substrate [Docker instructions here][6] instead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/12901&#xD;&#xA;  [2]: https://github.com/paritytech/substrate&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/issues/396&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/substrate-node-template/issues/396#issuecomment-1480378828&#xD;&#xA;  [5]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [6]: https://github.com/paritytech/substrate#getting-started&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/tree/master/bin/node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="30473" PostHistoryTypeId="4" PostId="7701" RevisionGUID="6b59e1fc-7a65-4875-8508-b02987ca14cf" CreationDate="2023-03-23T00:01:41.673" UserId="83" Comment="fix typo" Text="How to use subxt in yew.rs front-end app" ContentLicense="CC BY-SA 4.0" />
  <row Id="30474" PostHistoryTypeId="2" PostId="7747" RevisionGUID="456c0f90-6d44-4a29-a0a2-09ade45701b3" CreationDate="2023-03-23T01:36:56.013" UserId="1756" Text="### Solution&#xD;&#xA;&#xD;&#xA;Detailed explanations of the problem and great troubleshooting pointers can be found on the JS Apps issue here: https://github.com/polkadot-js/api/issues/5555&#xD;&#xA;&#xD;&#xA;To summarise, ensure the entire payload is constructed using Polkadot JS types:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;const blockNumber = api.registry.createType(&#xD;&#xA;  'BlockNumber',&#xD;&#xA;  lastHeader.number.toNumber()&#xD;&#xA;);&#xD;&#xA;const method = api.createType('Call', tx);&#xD;&#xA;const era = api.registry.createType('ExtrinsicEra', {&#xD;&#xA;  current: lastHeader.number.toNumber(),&#xD;&#xA;  period: 64,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;const nonceRaw = api.query.system.account(address)?.nonce || 0;&#xD;&#xA;const nonce = api.registry.createType('Compact&lt;Index&gt;', nonceRaw);&#xD;&#xA;&#xD;&#xA;const payload = {&#xD;&#xA;  specVersion: api.runtimeVersion.specVersion.toHex(),&#xD;&#xA;  transactionVersion: api.runtimeVersion.transactionVersion.toHex(),&#xD;&#xA;  address: address,&#xD;&#xA;  blockHash: lastHeader.hash.toHex(),&#xD;&#xA;  blockNumber: blockNumber.toHex(),&#xD;&#xA;  era: era.toHex(),&#xD;&#xA;  genesisHash: api.genesisHash.toHex(),&#xD;&#xA;  method: method.toHex(),&#xD;&#xA;  nonce: nonce.toHex(),&#xD;&#xA;  signedExtensions: [&#xD;&#xA;    'CheckNonZeroSender',&#xD;&#xA;    'CheckSpecVersion',&#xD;&#xA;    'CheckTxVersion',&#xD;&#xA;    'CheckGenesis',&#xD;&#xA;    'CheckMortality',&#xD;&#xA;    'CheckNonce',&#xD;&#xA;    'CheckWeight',&#xD;&#xA;    'ChargeTransactionPayment',&#xD;&#xA;  ],&#xD;&#xA;  tip: api.registry.createType('Compact&lt;Balance&gt;', 0).toHex(),&#xD;&#xA;  version: tx.version,&#xD;&#xA;};&#xD;&#xA;const raw = api.registry.createType('ExtrinsicPayload', payload, {&#xD;&#xA;  version: payload.version,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When it comes to `addSignature` we need to pass this payload along with `address` and `signature`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;tx.addSignature(address, txSignature, txPayload);&#xD;&#xA;&#xD;&#xA;const unsub = await tx.send(({ status, events = [] }: AnyApi) =&gt; {&#xD;&#xA;   ...&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30476" PostHistoryTypeId="4" PostId="7745" RevisionGUID="96e75c8e-bd8a-4af3-8b2a-f9179cc75b39" CreationDate="2023-03-23T03:00:07.577" UserId="83" Comment="its docker specific" Text="Error running substrate-node-template with Docker" ContentLicense="CC BY-SA 4.0" />
  <row Id="30477" PostHistoryTypeId="6" PostId="7745" RevisionGUID="96e75c8e-bd8a-4af3-8b2a-f9179cc75b39" CreationDate="2023-03-23T03:00:07.577" UserId="83" Comment="its docker specific" Text="|substrate-node-template|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30483" PostHistoryTypeId="2" PostId="7749" RevisionGUID="fb77bcd8-acc8-463c-af5a-1490c8952ed9" CreationDate="2023-03-23T08:18:41.493" UserId="3979" Text="We haven't enabled support for ink 4 in production or on our testnet yet. As it's a major version update, if you want to experiment with ink 4, you'll need to deploy your own testnet." ContentLicense="CC BY-SA 4.0" />
  <row Id="30485" PostHistoryTypeId="2" PostId="7750" RevisionGUID="68e531c2-be53-4ff5-94e8-c5763fa324a7" CreationDate="2023-03-23T09:06:19.170" UserId="494" Text="because [this PR](https://github.com/paritytech/frontier/pull/1019#event-8782511081) was merged, Frontier now also supports Moonbeam's Unified Accounts (aka `AccountId20`)" ContentLicense="CC BY-SA 4.0" />
  <row Id="30487" PostHistoryTypeId="50" PostId="5506" RevisionGUID="e364e696-90a2-4406-b182-6506480219d3" CreationDate="2023-03-23T11:01:05.097" UserId="-1" />
  <row Id="30488" PostHistoryTypeId="2" PostId="7751" RevisionGUID="a23b401c-eca0-47f4-a498-85220e868474" CreationDate="2023-03-23T11:29:31.750" UserId="2281" Text=" I am running a substrate private network on `polkadot-v0.9.36` and observed something, i.e., after nominating 4 validators from a single nominator finalization got stopped which  i didn't expected, as per the document of [polkadot][1] a nominator can nominate upto 16 validators but in my case it is not happening. Can anyone help in this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-nominator#nominating-with-the-polkadot-js-ui" ContentLicense="CC BY-SA 4.0" />
  <row Id="30490" PostHistoryTypeId="1" PostId="7751" RevisionGUID="a23b401c-eca0-47f4-a498-85220e868474" CreationDate="2023-03-23T11:29:31.750" UserId="2281" Text="Block finalization stops after nominating 4 validators" ContentLicense="CC BY-SA 4.0" />
  <row Id="30491" PostHistoryTypeId="3" PostId="7751" RevisionGUID="a23b401c-eca0-47f4-a498-85220e868474" CreationDate="2023-03-23T11:29:31.750" UserId="2281" Text="|polkadot|substrate-node-template|nominator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30492" PostHistoryTypeId="2" PostId="7752" RevisionGUID="f0341a59-9b76-405a-b9b3-6f3d2d9f4b09" CreationDate="2023-03-23T12:50:16.780" UserId="251" Text="I don't think this is related to the nominator.&#xD;&#xA;&#xD;&#xA;Please check your validator configurations.&#xD;&#xA;&#xD;&#xA;- Make sure you put the session keys in their keystores&#xD;&#xA;- Make sure they are using different session keys&#xD;&#xA;- IIRC, there is an issue that you need to restart your node once you put the GRANDPA key in its keystore; otherwise, it won't work" ContentLicense="CC BY-SA 4.0" />
  <row Id="30494" PostHistoryTypeId="2" PostId="7753" RevisionGUID="7467f420-a43a-4124-9c22-d31f5da0d2fd" CreationDate="2023-03-23T14:47:08.727" UserId="265" Text="in this [pull request](https://github.com/polkadot-js/api/pull/5561), i attempt to add support for looking up the collator account associated with a given nimbus session key.&#xD;&#xA;&#xD;&#xA;the method implementation in the pr is as follows:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;export function getAuthorDetails (header: Header, queryAt: QueryableStorage&lt;'rxjs'&gt;): Observable&lt;[Header, Vec&lt;AccountId&gt; | null, AccountId | null]&gt; {&#xD;&#xA;  // nimbus consensus stores authorship in the header logs&#xD;&#xA;  const { logs: [log] } = header.digest;&#xD;&#xA;  const authorSessionKey = (log &amp;&amp; (&#xD;&#xA;    (log.isConsensus &amp;&amp; log.asConsensus[0].isNimbus &amp;&amp; log.asConsensus[1]) ||&#xD;&#xA;    (log.isPreRuntime &amp;&amp; log.asPreRuntime[0].isNimbus &amp;&amp; log.asPreRuntime[1])&#xD;&#xA;  )) || null;&#xD;&#xA;&#xD;&#xA;  const validators = (queryAt.session)&#xD;&#xA;    ? queryAt.session.validators()&#xD;&#xA;    : of(null);&#xD;&#xA;&#xD;&#xA;  const author = (authorSessionKey)&#xD;&#xA;    // use the author mapping pallet if available (ie: moonbeam, moonriver)&#xD;&#xA;    ? (queryAt.authorMapping &amp;&amp; queryAt.authorMapping.mappingWithDeposit)&#xD;&#xA;      ? queryAt.authorMapping.mappingWithDeposit&lt;IOption&lt;{ account: AccountId } &amp; Codec&gt;&gt;(authorSessionKey).pipe(&#xD;&#xA;          map(opt =&gt; opt.unwrapOr({ account: null }).account)&#xD;&#xA;        )&#xD;&#xA;      // use the author session pallet if available (ie: manta, calamari)&#xD;&#xA;      : (queryAt.session &amp;&amp; queryAt.session.queuedKeys)&#xD;&#xA;        ? queryAt.session.queuedKeys&lt;Vec&lt;(AccountId, { nimbus: Address })&gt;&gt;().pipe(&#xD;&#xA;            catchError(() =&gt; of(null)), // handle scenarios where queuedKeys is not of the expected type&#xD;&#xA;            map((queuedKeys) =&gt; queuedKeys.find(([_, { nimbus }]) =&gt; nimbus.toHex() === authorSessionKey.toHex())),&#xD;&#xA;            map(([collator]) =&gt; collator || null)&#xD;&#xA;          )&#xD;&#xA;        : null&#xD;&#xA;    : null;&#xD;&#xA;&#xD;&#xA;  return combineLatest([of(header), validators, author]);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the problematic line is this one:&#xD;&#xA;```typescript&#xD;&#xA;queryAt.session.queuedKeys&lt;Vec&lt;(AccountId, { nimbus: Address })&gt;&gt;()&#xD;&#xA;```&#xD;&#xA;where the [build error](https://github.com/polkadot-js/api/actions/runs/4501059321/jobs/7921277452?pr=5561) message reads:&#xD;&#xA;```&#xD;&#xA;/home/runner/work/api/api/packages/api-derive/src/chain/util.ts&#xD;&#xA;  46:73  error  Parsing error: '=&gt;' expected&#xD;&#xA;```&#xD;&#xA;i assume the double angle brackets following the closing parenthesis is syntactically problematic.&#xD;&#xA;&#xD;&#xA;what is the correct way to do this?&#xD;&#xA;&#xD;&#xA;also, what is the best way to run tests similar to what the ci runs, but locally?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30496" PostHistoryTypeId="1" PostId="7753" RevisionGUID="7467f420-a43a-4124-9c22-d31f5da0d2fd" CreationDate="2023-03-23T14:47:08.727" UserId="265" Text="what is the correct typescript syntax for declaring the return type of session.queuedKeys()" ContentLicense="CC BY-SA 4.0" />
  <row Id="30497" PostHistoryTypeId="3" PostId="7753" RevisionGUID="7467f420-a43a-4124-9c22-d31f5da0d2fd" CreationDate="2023-03-23T14:47:08.727" UserId="265" Text="|polkadot-js|typescript|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30498" PostHistoryTypeId="2" PostId="7754" RevisionGUID="537c0c76-661b-460f-9451-b2b8ad5505c0" CreationDate="2023-03-23T15:13:38.070" UserId="3996" Text="Looks like you have a syntax error in your TypeScript. TS does not use the Rust syntax of `(value1, value2, ...)` for tuples, but it uses the same syntax as an Array: `[value1, value2, ...]`&#xD;&#xA;&#xD;&#xA;Correcting that in my IDE resolved that particular error." ContentLicense="CC BY-SA 4.0" />
  <row Id="30500" PostHistoryTypeId="2" PostId="7755" RevisionGUID="869a5c87-95c7-4510-9e72-332d799fd242" CreationDate="2023-03-23T15:14:41.400" UserId="3991" Text="This appears to be a bug and [an issue has been opened][1].&#xD;&#xA;&#xD;&#xA;I'm not sure if this is the SO etiquette is for these scenarios (or what is), but I will keep this answer updated as progress is made on the issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/13696" ContentLicense="CC BY-SA 4.0" />
  <row Id="30502" PostHistoryTypeId="5" PostId="7755" RevisionGUID="c7d29a01-6d1b-423c-8958-a48e5d6b8bbe" CreationDate="2023-03-23T15:15:35.297" UserId="3991" Comment="typo" Text="This appears to be a bug and [an issue has been opened][1].&#xD;&#xA;&#xD;&#xA;I'm not sure if this is the SE etiquette is for these scenarios (or what is), but I will keep this answer updated as progress is made on the issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/13696" ContentLicense="CC BY-SA 4.0" />
  <row Id="30503" PostHistoryTypeId="2" PostId="7756" RevisionGUID="807ab935-4401-4454-9dc7-b5eff05dfb5b" CreationDate="2023-03-23T15:36:10.013" UserId="3996" Text="Attempting to test some RPCs in development for a new pallet in Frequency, and trying to get them to show up in the Polkadot-JS UI running locally. I finally hit upon manually adding them to `apps-config/typesBundle.ts`, which worked, but I see this is an auto-generated file. What's the correct process for generating this file (assuming I've already updated my package dependency `@frequency-chain/api-augment` to a local version with the new RPCs)?&#xD;&#xA;&#xD;&#xA;I understand this is normally handled by polkadot-js devs when new versions of parachain augment packages are published, but I'd like to know how it's done, as it's helpful for local development." ContentLicense="CC BY-SA 4.0" />
  <row Id="30505" PostHistoryTypeId="1" PostId="7756" RevisionGUID="807ab935-4401-4454-9dc7-b5eff05dfb5b" CreationDate="2023-03-23T15:36:10.013" UserId="3996" Text="What's the process to auto-generate `typesBundle.ts` in polkadot-js/apps?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30506" PostHistoryTypeId="3" PostId="7756" RevisionGUID="807ab935-4401-4454-9dc7-b5eff05dfb5b" CreationDate="2023-03-23T15:36:10.013" UserId="3996" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30507" PostHistoryTypeId="2" PostId="7757" RevisionGUID="00765659-e2e0-424e-980b-dff19a31dad6" CreationDate="2023-03-23T17:27:04.680" UserId="3346" Text="We are trying to modify the Polkadot-JS/apps UI to add an app of our own. We have cloned the Contracts page to make our own page so that we can easily call the contract message functions. Contract, like accounts, must be loaded into the browser of the user. We can do this with the Add component. But we want to automate it so that the user will not have to do it themselves. We have narrowed it down to this one file: Add.tsx (code below). **Is it possible to alter this file to add just one particular contract whose public key and JSON file are known?** We are OK with having a button that says &quot;load the app&quot;, but would like to auto populate all the elements in that form. Something even more automated would be even better but we will take what we can get! &#xD;&#xA;&#xD;&#xA;    // Copyright 2017-2023 @polkadot/app-contracts authors &amp; contributors&#xD;&#xA;    // SPDX-License-Identifier: Apache-2.0&#xD;&#xA;    &#xD;&#xA;    //import { Abi } from '@polkadot/api-contract';&#xD;&#xA;    &#xD;&#xA;    import type { ActionStatus } from '@polkadot/react-components/Status/types';&#xD;&#xA;    import JSONlifeAndWork from './claim_registration_v20230314.json';&#xD;&#xA;    import React, { useCallback, useState } from 'react';&#xD;&#xA;    &#xD;&#xA;    import { AddressRow, Button, Input, Modal } from '@polkadot/react-components';&#xD;&#xA;    import { useApi, useNonEmptyString } from '@polkadot/react-hooks';&#xD;&#xA;    import { keyring } from '@polkadot/ui-keyring';&#xD;&#xA;    &#xD;&#xA;    import { ABI, InputName } from '../shared';&#xD;&#xA;    import { useTranslation } from '../translate';&#xD;&#xA;    import useAbi from '../useAbi';&#xD;&#xA;    import ValidateAddr from './ValidateAddr';&#xD;&#xA;    &#xD;&#xA;    interface Props {&#xD;&#xA;      defaultAddress: string;&#xD;&#xA;      onClose: () =&gt; void;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function Add ({ defaultAddress, onClose }: Props): React.ReactElement {&#xD;&#xA;      const { t } = useTranslation();&#xD;&#xA;      //const JSONlifeAndWork: string | null ='./claim_registration_v20230314.json';&#xD;&#xA;      //const _JSONParse = JSON.parse(JSONlifeAndWork.toString());&#xD;&#xA;      &#xD;&#xA;      const JSONabi: string | null = JSON.stringify(JSONlifeAndWork);&#xD;&#xA;      const _contractName: string = 'Life &amp; Work';&#xD;&#xA;      const { api } = useApi();&#xD;&#xA;      const [address, setAddress] = useState&lt;string | null&gt;(defaultAddress);&#xD;&#xA;      const [isAddressValid, setIsAddressValid] = useState(false);&#xD;&#xA;      const [name, isNameValid, setName] = useNonEmptyString(_contractName);&#xD;&#xA;      const { abi, contractAbi, errorText, isAbiError, isAbiSupplied, isAbiValid, onChangeAbi, onRemoveAbi } = useAbi([null, null], null, true);&#xD;&#xA;    &#xD;&#xA;      const isTestInfo: boolean = false;&#xD;&#xA;    &#xD;&#xA;      const _onAdd = useCallback(&#xD;&#xA;        (): void =&gt; {&#xD;&#xA;          const status: Partial&lt;ActionStatus&gt; = { action: 'create' };&#xD;&#xA;          &#xD;&#xA;          if (!address || !abi || !name) {&#xD;&#xA;            return;&#xD;&#xA;          }&#xD;&#xA;          //const contract = new ContractPromise(api, JSONlifeAndWork, address);&#xD;&#xA;          try {       &#xD;&#xA;            let json = {&#xD;&#xA;              contract: {&#xD;&#xA;                abi,&#xD;&#xA;                genesisHash: api.genesisHash.toHex()&#xD;&#xA;              },&#xD;&#xA;              name,&#xD;&#xA;              tags: []&#xD;&#xA;            };&#xD;&#xA;          &#xD;&#xA;            keyring.saveContract(address, json);&#xD;&#xA;    &#xD;&#xA;            status.account = address;&#xD;&#xA;            status.status = address ? 'success' : 'error';&#xD;&#xA;            status.message = 'contract added';&#xD;&#xA;    &#xD;&#xA;            onClose();&#xD;&#xA;          } catch (error) {&#xD;&#xA;            console.error(error);&#xD;&#xA;    &#xD;&#xA;            status.status = 'error';&#xD;&#xA;            status.message = (error as Error).message;&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        [abi, address, api, name, onClose]&#xD;&#xA;      );&#xD;&#xA;    &#xD;&#xA;      const isValid = isAddressValid &amp;&amp; isNameValid &amp;&amp; isAbiValid;&#xD;&#xA;      &#xD;&#xA;      return (&#xD;&#xA;        &lt;Modal&#xD;&#xA;          header={t('Load the Life &amp; Work Contract to your local browser: (Click Save)')}&#xD;&#xA;          onClose={onClose}&#xD;&#xA;        &gt;&#xD;&#xA;          &lt;Modal.Content&gt;&#xD;&#xA;          {isTestInfo &amp;&amp; (&#xD;&#xA;          &lt;div&gt;&#xD;&#xA;          &lt;strong&gt;{'STEPS: '}&lt;/strong&gt;  &lt;br /&gt;&#xD;&#xA;          {'(1) Is Address Correct?: '}{(address &amp;&amp; address.length===48)? 'YES' : 'NO'}&lt;br /&gt;&#xD;&#xA;          {'(2) Is the Contract Name Correct: '}{(name &amp;&amp; name==='Life &amp; Work')? 'YES' : 'NO'}&lt;br /&gt;&#xD;&#xA;          {'(3) Is JSON Loaded?: '}{(JSONabi.length&gt;0)? 'YES' : 'NO'}&lt;br /&gt;&#xD;&#xA;          {'(4) Is ABI Loaded?: '}{(abi)? 'YES! - Click Save' : 'NO'}&lt;br /&gt;&lt;br /&gt;&#xD;&#xA;          {'abi Length: '}{abi?.length}&lt;br /&gt;&#xD;&#xA;          {'json Length: '}{JSONabi.length}&lt;br /&gt;&#xD;&#xA;          &lt;/div&gt;&#xD;&#xA;          )}            &#xD;&#xA;            &lt;AddressRow&#xD;&#xA;              defaultName={name}&#xD;&#xA;              isValid&#xD;&#xA;              value={address || null}&#xD;&#xA;            &gt;&#xD;&#xA;              &lt;Input&#xD;&#xA;                autoFocus&#xD;&#xA;                isError={!isAddressValid}&#xD;&#xA;                label={t&lt;string&gt;('contract address')}&#xD;&#xA;                onChange={setAddress}&#xD;&#xA;                value={address || ''}&#xD;&#xA;              /&gt;&#xD;&#xA;              &lt;ValidateAddr&#xD;&#xA;                address={address}&#xD;&#xA;                onChange={setIsAddressValid}&#xD;&#xA;              /&gt;&#xD;&#xA;              &lt;InputName&#xD;&#xA;                isContract&#xD;&#xA;                isError={!isNameValid}&#xD;&#xA;                onChange={setName}&#xD;&#xA;                value={name || undefined}&#xD;&#xA;              /&gt;&#xD;&#xA;              &lt;ABI&#xD;&#xA;                contractAbi={contractAbi}&#xD;&#xA;                errorText={errorText}&#xD;&#xA;                isError={isAbiError || !isAbiValid}&#xD;&#xA;                isSupplied={isAbiSupplied}&#xD;&#xA;                isValid={isAbiValid}&#xD;&#xA;                onChange={onChangeAbi}&#xD;&#xA;                onRemove={onRemoveAbi}&#xD;&#xA;              /&gt;&#xD;&#xA;            &lt;/AddressRow&gt;&#xD;&#xA;          &lt;/Modal.Content&gt;&#xD;&#xA;          &lt;Modal.Actions&gt;&#xD;&#xA;            &lt;Button&#xD;&#xA;              icon='save'&#xD;&#xA;              isDisabled={!isValid}&#xD;&#xA;              label={t&lt;string&gt;('Save')}&#xD;&#xA;              onClick={_onAdd}&#xD;&#xA;            /&gt;&#xD;&#xA;          &lt;/Modal.Actions&gt;&#xD;&#xA;        &lt;/Modal&gt;&#xD;&#xA;      );&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    export default React.memo(Add);&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30509" PostHistoryTypeId="1" PostId="7757" RevisionGUID="00765659-e2e0-424e-980b-dff19a31dad6" CreationDate="2023-03-23T17:27:04.680" UserId="3346" Text="How To Alter A Clone of Add.tsx To Add One Specific Contract in Polkadot-JS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30510" PostHistoryTypeId="3" PostId="7757" RevisionGUID="00765659-e2e0-424e-980b-dff19a31dad6" CreationDate="2023-03-23T17:27:04.680" UserId="3346" Text="|polkadot-js|ink|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30511" PostHistoryTypeId="5" PostId="7753" RevisionGUID="b9b8cd13-f872-47d8-805e-ad0661cb11e1" CreationDate="2023-03-23T17:38:47.517" UserId="265" Comment="added 1508 characters in body" Text="in this [pull request](https://github.com/polkadot-js/api/pull/5561), i attempt to add support for looking up the collator account associated with a given nimbus session key.&#xD;&#xA;&#xD;&#xA;the method implementation in the pr is as follows:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;export function getAuthorDetails (header: Header, queryAt: QueryableStorage&lt;'rxjs'&gt;): Observable&lt;[Header, Vec&lt;AccountId&gt; | null, AccountId | null]&gt; {&#xD;&#xA;  // nimbus consensus stores authorship in the header logs&#xD;&#xA;  const { logs: [log] } = header.digest;&#xD;&#xA;  const authorSessionKey = (log &amp;&amp; (&#xD;&#xA;    (log.isConsensus &amp;&amp; log.asConsensus[0].isNimbus &amp;&amp; log.asConsensus[1]) ||&#xD;&#xA;    (log.isPreRuntime &amp;&amp; log.asPreRuntime[0].isNimbus &amp;&amp; log.asPreRuntime[1])&#xD;&#xA;  )) || null;&#xD;&#xA;&#xD;&#xA;  const validators = (queryAt.session)&#xD;&#xA;    ? queryAt.session.validators()&#xD;&#xA;    : of(null);&#xD;&#xA;&#xD;&#xA;  const author = (authorSessionKey)&#xD;&#xA;    // use the author mapping pallet if available (ie: moonbeam, moonriver)&#xD;&#xA;    ? (queryAt.authorMapping &amp;&amp; queryAt.authorMapping.mappingWithDeposit)&#xD;&#xA;      ? queryAt.authorMapping.mappingWithDeposit&lt;IOption&lt;{ account: AccountId } &amp; Codec&gt;&gt;(authorSessionKey).pipe(&#xD;&#xA;          map(opt =&gt; opt.unwrapOr({ account: null }).account)&#xD;&#xA;        )&#xD;&#xA;      // use the author session pallet if available (ie: manta, calamari)&#xD;&#xA;      : (queryAt.session &amp;&amp; queryAt.session.queuedKeys)&#xD;&#xA;        ? queryAt.session.queuedKeys&lt;Vec&lt;(AccountId, { nimbus: Address })&gt;&gt;().pipe(&#xD;&#xA;            catchError(() =&gt; of(null)), // handle scenarios where queuedKeys is not of the expected type&#xD;&#xA;            map((queuedKeys) =&gt; queuedKeys.find(([_, { nimbus }]) =&gt; nimbus.toHex() === authorSessionKey.toHex())),&#xD;&#xA;            map(([collator]) =&gt; collator || null)&#xD;&#xA;          )&#xD;&#xA;        : null&#xD;&#xA;    : null;&#xD;&#xA;&#xD;&#xA;  return combineLatest([of(header), validators, author]);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the problematic line is this one:&#xD;&#xA;```typescript&#xD;&#xA;queryAt.session.queuedKeys&lt;Vec&lt;(AccountId, { nimbus: Address })&gt;&gt;()&#xD;&#xA;```&#xD;&#xA;where the [build error](https://github.com/polkadot-js/api/actions/runs/4501059321/jobs/7921277452?pr=5561) message reads:&#xD;&#xA;```&#xD;&#xA;/home/runner/work/api/api/packages/api-derive/src/chain/util.ts&#xD;&#xA;  46:73  error  Parsing error: '=&gt;' expected&#xD;&#xA;```&#xD;&#xA;i assume the double angle brackets following the closing parenthesis is syntactically problematic.&#xD;&#xA;&#xD;&#xA;what is the correct way to do this?&#xD;&#xA;&#xD;&#xA;also, what is the best way to run tests similar to what the ci runs, but locally?&#xD;&#xA;&#xD;&#xA;edit:&#xD;&#xA;i've learned to use `yarn lint` and have gotten this far:&#xD;&#xA;```typescript&#xD;&#xA;export function getAuthorDetails (header: Header, queryAt: QueryableStorage&lt;'rxjs'&gt;): Observable&lt;[Header, Vec&lt;AccountId&gt; | null, AccountId | null]&gt; {&#xD;&#xA;  // nimbus consensus stores authorship in the header logs&#xD;&#xA;  const { logs: [log] } = header.digest;&#xD;&#xA;  const authorSessionKey = (log &amp;&amp; (&#xD;&#xA;    (log.isConsensus &amp;&amp; log.asConsensus[0].isNimbus &amp;&amp; log.asConsensus[1]) ||&#xD;&#xA;    (log.isPreRuntime &amp;&amp; log.asPreRuntime[0].isNimbus &amp;&amp; log.asPreRuntime[1])&#xD;&#xA;  )) || null;&#xD;&#xA;&#xD;&#xA;  const validators = (queryAt.session)&#xD;&#xA;    ? queryAt.session.validators()&#xD;&#xA;    : null;&#xD;&#xA;&#xD;&#xA;  const author = (authorSessionKey)&#xD;&#xA;    // use the author mapping pallet if available (ie: moonbeam, moonriver)&#xD;&#xA;    ? (queryAt.authorMapping &amp;&amp; queryAt.authorMapping.mappingWithDeposit)&#xD;&#xA;      ? queryAt.authorMapping.mappingWithDeposit&lt;IOption&lt;{ account: AccountId } &amp; Codec&gt;&gt;(authorSessionKey)&#xD;&#xA;        .pipe(map((opt) =&gt; opt.unwrapOr({ account: null }).account))&#xD;&#xA;      // use the session pallet if available (ie: manta, calamari)&#xD;&#xA;      : (queryAt.session &amp;&amp; queryAt.session.queuedKeys)&#xD;&#xA;        ? queryAt.session.queuedKeys&lt;Vec&lt;[AccountId, { nimbus: Address }]&gt;&gt;()&#xD;&#xA;          .pipe(map((keys) =&gt; keys.find(([_, { nimbus }]) =&gt; nimbus.toHex() === authorSessionKey.toHex())[0]))&#xD;&#xA;        : null&#xD;&#xA;    : null;&#xD;&#xA;&#xD;&#xA;  return combineLatest([of(header), validators, author]);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;just need to figure out how to deal with the deprecation error on `combineLatest`..." ContentLicense="CC BY-SA 4.0" />
  <row Id="30512" PostHistoryTypeId="2" PostId="7758" RevisionGUID="3b981d9c-7640-4db2-ba05-04ea9596c960" CreationDate="2023-03-23T18:51:55.137" UserId="227" Text="We just published ink! 4.1. It allows for this feature now.&#xD;&#xA;&#xD;&#xA;The feature was actually added by the very own original poster :-). So I hope he accepts this as a solution!&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let new_block_timestamp: u64 = 1000;&#xD;&#xA;ink::env::test::set_block_timestamp::&lt;ink::env::DefaultEnvironment&gt;(new_block_timestamp);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30514" PostHistoryTypeId="2" PostId="7759" RevisionGUID="fc9af838-ac68-4e41-a78a-17ae7434af28" CreationDate="2023-03-23T19:09:48.263" UserId="3140" Text="I believe you originally had different versions of each package. All variants of `@polkadot/&lt;package&gt;` typically have the same version. `@latest` forced all of those to be the same and therefore no longer collide" ContentLicense="CC BY-SA 4.0" />
  <row Id="30516" PostHistoryTypeId="2" PostId="7760" RevisionGUID="65272558-8d85-4a7b-b1d2-f15606a48dee" CreationDate="2023-03-23T19:46:07.337" UserId="3140" Text="Once you load the `metadata.json` file from your &quot;known source&quot; you just instantiate a contract promise. I am not completely sure what exactly you are trying to do, but this is how I would set up a UI for a contract where we have the metadata that was generated from compiling an ink! contract. [Here is an example](https://github.com/paritytech/useink/blob/main/core/hooks/useContract.ts). You can then use the contract promise instance to call each message / transaction using [something like this](https://github.com/paritytech/useink/blob/main/core/hooks/useContractCall.ts), or like this:&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;        const params = ['John', 'some other message argument'];&#xD;&#xA;        const message = contract.abi.findMessage(&quot;myMessage&quot;);&#xD;&#xA;        const inputData = message.toU8a(params);&#xD;&#xA;&#xD;&#xA;        const { storageDeposit, gasRequired, result } =&#xD;&#xA;          await api.call.contractsApi.call&lt;ContractExecResult&gt;(&#xD;&#xA;            account?.address,&#xD;&#xA;            contract.address,&#xD;&#xA;            0,&#xD;&#xA;            null,&#xD;&#xA;            null,&#xD;&#xA;            inputData&#xD;&#xA;          );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There will be examples coming out for [useink](https://github.com/paritytech/useink), a React Hooks library to make all of this easier. " ContentLicense="CC BY-SA 4.0" />
  <row Id="30518" PostHistoryTypeId="2" PostId="7761" RevisionGUID="8345ccb1-3d35-4768-afcf-d5f772ca5eea" CreationDate="2023-03-23T20:35:57.310" UserId="1849" Text="I'm trying to call `api.query.authorityDiscovery.keys` as is described [here](https://polkadot.js.org/docs/substrate/storage/#authoritydiscovery) from rpc.polkadot.io like:&#xD;&#xA;```&#xD;&#xA;let current_auth_keys = await api.query.authorityDiscovery.keys();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and I keep getting:&#xD;&#xA;```&#xD;&#xA;TypeError: Cannot read property 'keys' of undefined&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;as if `api.query` does not have `authorityDiscovery` property/object contrary to what is written in the documentation. Could you tell me what am I getting wrong? I'm using:  &#xD;&#xA;&#xD;&#xA;&quot;@polkadot/api&quot;: &quot;^10.1.4&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30520" PostHistoryTypeId="1" PostId="7761" RevisionGUID="8345ccb1-3d35-4768-afcf-d5f772ca5eea" CreationDate="2023-03-23T20:35:57.310" UserId="1849" Text="How to query api.query.authorityDiscovery.keys?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30521" PostHistoryTypeId="3" PostId="7761" RevisionGUID="8345ccb1-3d35-4768-afcf-d5f772ca5eea" CreationDate="2023-03-23T20:35:57.310" UserId="1849" Text="|polkadot-js|api|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30522" PostHistoryTypeId="2" PostId="7762" RevisionGUID="1a65613b-81ab-4b76-ad3a-d63f2b9562b3" CreationDate="2023-03-23T21:08:18.747" UserId="2581" Text="I want to get validator address list from nominator address using PolkadotJS/api.&#xD;&#xA;&#xD;&#xA;How can I get?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30524" PostHistoryTypeId="1" PostId="7762" RevisionGUID="1a65613b-81ab-4b76-ad3a-d63f2b9562b3" CreationDate="2023-03-23T21:08:18.747" UserId="2581" Text="How to get validators list which nominator delegated" ContentLicense="CC BY-SA 4.0" />
  <row Id="30525" PostHistoryTypeId="3" PostId="7762" RevisionGUID="1a65613b-81ab-4b76-ad3a-d63f2b9562b3" CreationDate="2023-03-23T21:08:18.747" UserId="2581" Text="|polkadot-js|validator|nominator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30528" PostHistoryTypeId="2" PostId="7764" RevisionGUID="5c4ee77f-6dad-4d1f-abb7-7acb342a441f" CreationDate="2023-03-23T22:04:55.500" UserId="3846" Text="I have way more than the minimum staking limit on Polkadot. But I suddenly stopped reviewing rewards a few months ago. So I added some mode $Dots to my account and went through this process:&#xD;&#xA;1- Bond more Dots&#xD;&#xA;2- Rebag using PolkadotJS wallet linked to my ledger Nano S&#xD;&#xA;3- Move up my account&#xD;&#xA;which was only working for a few days and I stopped earning rewards again. This time I bonded less amount of Dots to move my account on top of the lower bag. Then I moved up but it did not help to receive rewards either. Any idea what should I do?&#xD;&#xA;&#xD;&#xA;Note: I have changed my validators several times. And I was careful and aware of how to select them. I have read that [article][1] also and took it into consideration but didn’t help&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000170805-why-am-i-not-getting-staking-rewards-" ContentLicense="CC BY-SA 4.0" />
  <row Id="30530" PostHistoryTypeId="1" PostId="7764" RevisionGUID="5c4ee77f-6dad-4d1f-abb7-7acb342a441f" CreationDate="2023-03-23T22:04:55.500" UserId="3846" Text="Don’t receive rewards even I have rebaged and movedup my account" ContentLicense="CC BY-SA 4.0" />
  <row Id="30531" PostHistoryTypeId="3" PostId="7764" RevisionGUID="5c4ee77f-6dad-4d1f-abb7-7acb342a441f" CreationDate="2023-03-23T22:04:55.500" UserId="3846" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30532" PostHistoryTypeId="5" PostId="7764" RevisionGUID="7bd8a2ac-041a-4545-b0e0-c67009e926ec" CreationDate="2023-03-23T22:21:33.027" UserId="3846" Comment="edited body" Text="I have way more than the minimum staking limit on Polkadot. But I suddenly stopped reviewing rewards a few months ago. So I added some mode $Dots to my account and went through this process:&#xD;&#xA;1- Bond more Dots&#xD;&#xA;2- Rebag using PolkadotJS wallet linked to my ledger Nano S&#xD;&#xA;3- Move up my account&#xD;&#xA;which was only working for a few days and I stopped earning rewards again. This time I bonded less amount of Dots to move my account on top of the lower bag. Then I moved up but it did not help to receive rewards either. Any idea what should I do?&#xD;&#xA;&#xD;&#xA;Note: I have changed my validators several times. And I was careful and aware of how to select them. I have read this [article][1] also and took it into consideration but didn’t help&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000170805-why-am-i-not-getting-staking-rewards-" ContentLicense="CC BY-SA 4.0" />
  <row Id="30533" PostHistoryTypeId="2" PostId="7765" RevisionGUID="19e4cbd6-1bc1-43bc-8293-3b69d586fd08" CreationDate="2023-03-23T23:40:14.023" UserId="181" Text="I'm considering a large refactor in our substrate codebase which would involve moving large chunks of code around. This includes a runtime api. In it's destined place, the runtime api's name(both its trait and function name) is misleading contextually, and would need to be changed. This will make the upgrade process tricky, as the runtime api is called consistently by the client.&#xD;&#xA;&#xD;&#xA;I'm curious. How are teams dealing with this? Any tricks? Our initial thoughts are around keeping the old, poorly named runtime api around for compatibility until we can do a second release and remove it." ContentLicense="CC BY-SA 4.0" />
  <row Id="30535" PostHistoryTypeId="1" PostId="7765" RevisionGUID="19e4cbd6-1bc1-43bc-8293-3b69d586fd08" CreationDate="2023-03-23T23:40:14.023" UserId="181" Text="Steps to handle renaming runtime api + upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="30536" PostHistoryTypeId="3" PostId="7765" RevisionGUID="19e4cbd6-1bc1-43bc-8293-3b69d586fd08" CreationDate="2023-03-23T23:40:14.023" UserId="181" Text="|runtime-upgrade|runtime-api|versioning|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30537" PostHistoryTypeId="5" PostId="7764" RevisionGUID="31676869-fac7-42c2-b813-d3a96cca59d7" CreationDate="2023-03-24T00:25:08.583" UserId="3846" Comment="added 66 characters in body" Text="I have way more than the minimum staking limit on Polkadot. But I suddenly stopped reviewing rewards a few months ago. So I added some mode $Dots to my account and went through this process:&#xD;&#xA;1- Bond more Dots&#xD;&#xA;2- Rebag using PolkadotJS wallet linked to my ledger Nano S&#xD;&#xA;3- Move up my account&#xD;&#xA;which was only working for a few days and I stopped earning rewards again. This time I bonded less amount of Dots to move my account on top of the lower bag. Then I moved up but it did not help to receive rewards either. Any idea what should I do?&#xD;&#xA;&#xD;&#xA;Note: I have changed my validators several times. And I was careful and aware of how to select them. I have read this [article][1] also and took it into consideration but didn’t help&#xD;&#xA;&#xD;&#xA;I have also checked the validators. 15/16 of them were active.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000170805-why-am-i-not-getting-staking-rewards-" ContentLicense="CC BY-SA 4.0" />
  <row Id="30541" PostHistoryTypeId="10" PostId="7726" RevisionGUID="3188c5c6-ee7b-4a54-a084-24f6b6e3ddb8" CreationDate="2023-03-24T01:22:11.443" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="30542" PostHistoryTypeId="6" PostId="7764" RevisionGUID="7be97216-4661-4fbe-858f-87153f0c82e7" CreationDate="2023-03-24T01:25:35.900" UserId="34" Comment="edited tags" Text="|polkadot|staking|nominator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30547" PostHistoryTypeId="2" PostId="7767" RevisionGUID="738408c8-a1cd-4b80-9be7-f936d6250d38" CreationDate="2023-03-24T06:49:37.890" UserId="3667" Text="From my survey of a few parachains, the definition I find for `MAXIMUM_BLOCK_WEIGHT` is often 0.5 seconds of compute : &#xD;&#xA;```rust&#xD;&#xA;/// Maximum weight per block&#xD;&#xA;pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_ref_time(WEIGHT_REF_TIME_PER_SECOND)&#xD;&#xA;	.saturating_div(2)&#xD;&#xA;	.set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;While for relay chains like Polkadot &amp; Kusama, it seems to be 2 seconds : &#xD;&#xA;```rust&#xD;&#xA;//  file : runtime/common/src/lib.rs&#xD;&#xA;/// We allow for 2 seconds of compute with a 6 second average block time.&#xD;&#xA;/// The storage proof size is not limited so far.&#xD;&#xA;pub const MAXIMUM_BLOCK_WEIGHT: Weight =&#xD;&#xA;	Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);&#xD;&#xA;```&#xD;&#xA;Is there a reason it is so? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30549" PostHistoryTypeId="1" PostId="7767" RevisionGUID="738408c8-a1cd-4b80-9be7-f936d6250d38" CreationDate="2023-03-24T06:49:37.890" UserId="3667" Text="Why do most parachains have a MAXIMUM_BLOCK_WEIGHT of 0.5 seconds?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30550" PostHistoryTypeId="3" PostId="7767" RevisionGUID="738408c8-a1cd-4b80-9be7-f936d6250d38" CreationDate="2023-03-24T06:49:37.890" UserId="3667" Text="|parachain|weight|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30551" PostHistoryTypeId="2" PostId="7768" RevisionGUID="96347079-6e56-4a7e-8b6a-99f7ef5b8d0d" CreationDate="2023-03-24T07:24:08.103" UserId="3752" Text="I have implemented EVM and ETH Pallet in Substrate Based chain with POA consensus mechanism. Contracts deployment in Solidity language and NFT Minting transactions are also working perfectly but i'm unable to visualise Minted NFT's on openSea. &#xD;&#xA;What should i do so i can enlist all minted NFT's of Substrate on OpenSea Marketplace. " ContentLicense="CC BY-SA 4.0" />
  <row Id="30553" PostHistoryTypeId="1" PostId="7768" RevisionGUID="96347079-6e56-4a7e-8b6a-99f7ef5b8d0d" CreationDate="2023-03-24T07:24:08.103" UserId="3752" Text="NFT Enlisting on OpenSea" ContentLicense="CC BY-SA 4.0" />
  <row Id="30554" PostHistoryTypeId="3" PostId="7768" RevisionGUID="96347079-6e56-4a7e-8b6a-99f7ef5b8d0d" CreationDate="2023-03-24T07:24:08.103" UserId="3752" Text="|substrate-contracts-node|evm|nft|poa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30555" PostHistoryTypeId="2" PostId="7769" RevisionGUID="5369417d-c9ad-419e-8629-a178456b6bbe" CreationDate="2023-03-24T08:01:30.547" UserId="2065" Text="The issue has been resolved by implementing Erc20Mapping mock implementation together with implementing both Precompile and PrecompileSet for the precompile + setting a mock PrecompileSet implementation." ContentLicense="CC BY-SA 4.0" />
  <row Id="30557" PostHistoryTypeId="2" PostId="7770" RevisionGUID="4165b53d-87fc-44f8-a144-acd306c51da8" CreationDate="2023-03-24T10:04:47.283" UserId="4001" Text="[Question]&#xD;&#xA; 1. How can I make raw-transaction(unsigned-transaction) with essential parameter(fromAddress, toAddress, value, nonce, fee etc)? I want to know low-level algorithm.&#xD;&#xA; 2. What kind of Cryptography is used on Polkadot? I think it use sr25519, isn't it?&#xD;&#xA; 3. In below code log, which data on trsfRawTx is used for sign? And Which Cryptography-function(js) can I use?&#xD;&#xA; 4. I'm using send() function for broadcasting signedTx. Is there other function to broadcast signTx by parameter?&#xD;&#xA; 5. For signing, I'm using mnemonic &amp; keyring, and I can get address &amp; public-key from keyring. How can I get private-key? If it can, How Can I sign by private-key?&#xD;&#xA;&#xD;&#xA;[Environment]&#xD;&#xA;I'm developing a nodejs program on shibuya testnet.&#xD;&#xA;&#xD;&#xA;[Goal]&#xD;&#xA; 1. I want to make raw-transaction(unsigned-transaction) for tranferring &amp; staking token.&#xD;&#xA; 2. I want to sign raw-transaction and get signed-transaction on offchain-environment.&#xD;&#xA; 3. I want to broadcast signed-transaction to node(public-endpoint).&#xD;&#xA;&#xD;&#xA;[Attempt]&#xD;&#xA; - I tried to make sampleTransfer SampleCode using provided sample-example.&#xD;&#xA; - Just using provided api, have no problem, but I have to migrate on my system.&#xD;&#xA;```&#xD;&#xA;const sampleTransfer = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    // Create a new instance of the api&#xD;&#xA;    const provider = new WsProvider('wss://rpc.shibuya.astar.network');&#xD;&#xA;    const api = new ApiPromise(options({ provider }));&#xD;&#xA;&#xD;&#xA;    const testAcnt1 = 'VxJhKGJ7wsVwZvaikWQzhexb9VawgFUtBuXNAmDAhBBVi4U';&#xD;&#xA;    const testAcnt2 = '5HBSNV13JH7LuEtJUBNuKgcaPgNaXGBZhCknUWrKmD9p8vhA';&#xD;&#xA;&#xD;&#xA;    await api.isReady;&#xD;&#xA;&#xD;&#xA;    console.log('===== STEP1-RawTx-Start =====');&#xD;&#xA;    const trsfRawTx = api.tx.balances.transfer(testAcnt1, BigInt(200000000000000000));&#xD;&#xA;    console.log(trsfRawTx);&#xD;&#xA;    // Submittable { initialU8aLength: undefined, registry: TypeRegistry {} }&#xD;&#xA;    console.log('===== ===== =====');&#xD;&#xA;    console.log(`${trsfRawTx}`);&#xD;&#xA;    // {&quot;signature&quot;:{&quot;signer&quot;:{&quot;id&quot;:&quot;VwJHxi1vTNdnJ2KXfQ7tWL8ERiUGv9bwhmf5RDWKGySQmsy&quot;},&quot;signature&quot;:{&quot;ed25519&quot;:&quot;0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&quot;},&quot;era&quot;:{&quot;immortalEra&quot;:&quot;0x00&quot;},&quot;nonce&quot;:0,&quot;tip&quot;:0},&quot;method&quot;:{&quot;callIndex&quot;:&quot;0x1f00&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;VxJhKGJ7wsVwZvaikWQzhexb9VawgFUtBuXNAmDAhBBVi4U&quot;},&quot;value&quot;:&quot;0x000000000000000002c68af0bb140000&quot;}}}&#xD;&#xA;    console.log('===== STEP1-RawTx-End =====');&#xD;&#xA;&#xD;&#xA;    console.log('===== STEP2-SignRawTx-Start =====');&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;    const testAcnt2Mnemonic = '...MNEMONIC...';&#xD;&#xA;    const testAcnt2Key = keyring.addFromUri(testAcnt2Mnemonic);&#xD;&#xA;    console.log(`testAcnt2Key : ${testAcnt2Key.address}`);&#xD;&#xA;    // testAcnt2Key : 5HBSNV13JH7LuEtJUBNuKgcaPgNaXGBZhCknUWrKmD9p8vhA&#xD;&#xA;    console.log('===== ===== =====');&#xD;&#xA;    const signedTx = await trsfRawTx.signAsync(testAcnt2Key);&#xD;&#xA;    console.log(signedTx);&#xD;&#xA;    // Submittable { initialU8aLength: undefined, registry: TypeRegistry {} }&#xD;&#xA;    console.log('===== ===== =====');&#xD;&#xA;    console.log(`signedTx : ${signedTx}`);&#xD;&#xA;    // signedTx : {&quot;signature&quot;:{&quot;signer&quot;:{&quot;id&quot;:&quot;b42omy85WkT84v8xUq2MLmrUj5hVUtJiQFviE4Bda9mjH2V&quot;},&quot;signature&quot;:{&quot;sr25519&quot;:&quot;0x424a05493a61a47b6952b3357bcc08e2d210b566be82ec7fe506840483a9831800c3d355eb4302f676cbeb7d4252602c1d99ddda58e8c292171b72094ed2ac86&quot;},&quot;era&quot;:{&quot;mortalEra&quot;:&quot;0xe400&quot;},&quot;nonce&quot;:6,&quot;tip&quot;:0},&quot;method&quot;:{&quot;callIndex&quot;:&quot;0x1f00&quot;,&quot;args&quot;:{&quot;dest&quot;:{&quot;id&quot;:&quot;VxJhKGJ7wsVwZvaikWQzhexb9VawgFUtBuXNAmDAhBBVi4U&quot;},&quot;value&quot;:&quot;0x000000000000000002c68af0bb140000&quot;}}}&#xD;&#xA;    console.log('===== STEP2-SignRawTx-End =====');&#xD;&#xA;&#xD;&#xA;    console.log('===== STEP3-SendSignedTx-Start =====');&#xD;&#xA;    const txhash = await signedTx.send();&#xD;&#xA;    console.log(txhash);&#xD;&#xA;    /*Type(32) [Uint8Array] [&#xD;&#xA;        200,&#xD;&#xA;        2,&#xD;&#xA;        33,&#xD;&#xA;        72,&#xD;&#xA;        119,&#xD;&#xA;        185,&#xD;&#xA;        239,&#xD;&#xA;        160,&#xD;&#xA;        204,&#xD;&#xA;        131,&#xD;&#xA;        232,&#xD;&#xA;        7,&#xD;&#xA;        240,&#xD;&#xA;        121,&#xD;&#xA;        215,&#xD;&#xA;        203,&#xD;&#xA;        71,&#xD;&#xA;        157,&#xD;&#xA;        105,&#xD;&#xA;        98,&#xD;&#xA;        100,&#xD;&#xA;        46,&#xD;&#xA;        130,&#xD;&#xA;        158,&#xD;&#xA;        88,&#xD;&#xA;        129,&#xD;&#xA;        19,&#xD;&#xA;        225,&#xD;&#xA;        222,&#xD;&#xA;        218,&#xD;&#xA;        10,&#xD;&#xA;        203,&#xD;&#xA;        registry: TypeRegistry {},&#xD;&#xA;        initialU8aLength: 32&#xD;&#xA;      ]*/&#xD;&#xA;    console.log('===== ===== =====');&#xD;&#xA;    console.log(`txhash : ${txhash}`);&#xD;&#xA;    // txhash : 0xc802214877b9efa0cc83e807f079d7cb479d6962642e829e588113e1deda0acb&#xD;&#xA;    console.log('===== STEP3-SendSignedTx-End =====');&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;sampleTransfer().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30559" PostHistoryTypeId="1" PostId="7770" RevisionGUID="4165b53d-87fc-44f8-a144-acd306c51da8" CreationDate="2023-03-24T10:04:47.283" UserId="4001" Text="How to make rawTransaction? and Can I get some guide or reference about offchain sign?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30560" PostHistoryTypeId="3" PostId="7770" RevisionGUID="4165b53d-87fc-44f8-a144-acd306c51da8" CreationDate="2023-03-24T10:04:47.283" UserId="4001" Text="|polkadot-js|parachain|transactions|api|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30561" PostHistoryTypeId="50" PostId="7020" RevisionGUID="c0bb29e9-910f-4640-9299-d16f0f297962" CreationDate="2023-03-24T12:05:15.637" UserId="-1" />
  <row Id="30562" PostHistoryTypeId="2" PostId="7771" RevisionGUID="0380d2de-f559-4f09-9343-32129805abe9" CreationDate="2023-03-24T12:31:11.720" UserId="354" Text="I am running a substrate based chain and tried to nominate 2 validators which were in active state but it is only nominating one validator and showing inactive status for other validator. Can anyone help with this?&#xD;&#xA;&#xD;&#xA;Nominator&#xD;&#xA;[![nominator][1]][1]&#xD;&#xA;&#xD;&#xA;Validators&#xD;&#xA;[![validators][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aA9wA.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ESyuf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30564" PostHistoryTypeId="1" PostId="7771" RevisionGUID="0380d2de-f559-4f09-9343-32129805abe9" CreationDate="2023-03-24T12:31:11.720" UserId="354" Text="Unable to validate more than one validator" ContentLicense="CC BY-SA 4.0" />
  <row Id="30565" PostHistoryTypeId="3" PostId="7771" RevisionGUID="0380d2de-f559-4f09-9343-32129805abe9" CreationDate="2023-03-24T12:31:11.720" UserId="354" Text="|polkadot|substrate-node-template|nominator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30566" PostHistoryTypeId="2" PostId="7772" RevisionGUID="26c17566-ba17-47b8-ad3b-3eaa02f40d9d" CreationDate="2023-03-24T15:56:28.123" UserId="4002" Text="during the staking process, validators, nominators and nomination pool members earn rewards, but they are not assigned automatically. Participants have to trigger payouts to get it. Is there a way to estimate number of unclaimed rewards for validators/nominators/pool members?  I see something for example here in the claimable column https://azero.dev/#/staking/pools &#xD;&#xA;but would like to calculate it on my own based on the blockchain data" ContentLicense="CC BY-SA 4.0" />
  <row Id="30568" PostHistoryTypeId="1" PostId="7772" RevisionGUID="26c17566-ba17-47b8-ad3b-3eaa02f40d9d" CreationDate="2023-03-24T15:56:28.123" UserId="4002" Text="Unclaimed rewards" ContentLicense="CC BY-SA 4.0" />
  <row Id="30569" PostHistoryTypeId="3" PostId="7772" RevisionGUID="26c17566-ba17-47b8-ad3b-3eaa02f40d9d" CreationDate="2023-03-24T15:56:28.123" UserId="4002" Text="|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30571" PostHistoryTypeId="2" PostId="7773" RevisionGUID="a0b4099f-06c8-4c77-affb-31324c38f504" CreationDate="2023-03-24T21:23:46.590" UserId="3778" Text="This is my first time migrating data, and I'd like to receive general guidance about what steps and command lines I need to use.&#xD;&#xA;I've been working with the node-template before to implement it in my relay chain.&#xD;&#xA;&#xD;&#xA;I followed this tutorial `Basic Storage Migration` from Substrate Docs. &#xD;&#xA;But I noticed a better way to perform a storage migration using the`frame-executive` module with the `try-runtime-cli`.&#xD;&#xA;&#xD;&#xA;Regarding the `try-runtime-cli` implementation, I struggled a bit following the tutorial from Substrate docs, because the tutorial is based on the `polkadot-v0.9.28` release, following those steps, I couldn't compile the node with the `try-runtime` feature. After some research, I updated it to be compatible with the `polkadot-v0.9.37`, there was a significant change from the `polkadot-v0.9.28` to the `polkadot-v0.9.29` release.&#xD;&#xA;&#xD;&#xA;I defined a new type to allocate migrations:&#xD;&#xA;```&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	// pallet_nicks::migration::v1::MigrateToV1&lt;Runtime&gt;,&#xD;&#xA;	// pallet_nicks::migration::v2::MigrateToV2&lt;Runtime&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L351&#xD;&#xA;&#xD;&#xA;Then pass it to the executive type:&#xD;&#xA;```&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;	Migrations,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L357&#xD;&#xA;&#xD;&#xA;After finishing the Basic Storage Migration tutorial, I tried to add an account status for the Nicks structure:&#xD;&#xA;```&#xD;&#xA;    #[derive(CloneNoBound, Encode, Decode, Default, TypeInfo, MaxEncodedLen, PartialEqNoBound, RuntimeDebug)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;		pub first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;		pub last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;		pub third: AccountStatus&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, TypeInfo, MaxEncodedLen, PartialEqNoBound, RuntimeDebug)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub enum AccountStatus {&#xD;&#xA;		Active,&#xD;&#xA;		Inactive,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl Default for AccountStatus {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			AccountStatus::Active&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# **Steps to reproduce the issue:**&#xD;&#xA;&#xD;&#xA;- git clone git@github.com:didiermis/test-storage-migration.git&#xD;&#xA;- cd test-storage-migration&#xD;&#xA;- git checkout feature/nicks/step3&#xD;&#xA;- cargo build --release&#xD;&#xA;- ./target/release/node-template --dev&#xD;&#xA;- execute the bash script `./pallets/nicks/src/migrations_old/execute_tx_v2.sh` to create some initial accounts (requires polkadot-CLI)&#xD;&#xA;---------&#xD;&#xA;**Migration part:**&#xD;&#xA;- Rename the lib.rs file to lib.v1.rs&#xD;&#xA;- Rename the lib.v2.rs file to lib.rs (lib.v2.rs file contains the changes related to the new account status)&#xD;&#xA;- Rename the migration.v2.rs file to migration.rs&#xD;&#xA;- Uncomment the following line in the runtime/src/lib.rs:&#xD;&#xA;```&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	// pallet_nicks::migration::v1::MigrateToV1&lt;Runtime&gt;,&#xD;&#xA;	pallet_nicks::migration::v2::MigrateToV2&lt;Runtime&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L353&#xD;&#xA;- Update the spec version:&#xD;&#xA;```&#xD;&#xA;spec_version: 101,&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L108&#xD;&#xA;- `cargo build --release --features=try-runtime`&#xD;&#xA;- `RUST_LOG=runtime=trace target/release/node-template try-runtime --detailed-log-output --runtime target/release/wbuild/node-template-runtime/node_template_runtime.compact.compressed.wasm on-runtime-upgrade --checks live --uri ws://localhost:9944`&#xD;&#xA;&#xD;&#xA;Then I got the following encoded error (detailed error provided in the gist):&#xD;&#xA;```&#xD;&#xA;2023-03-24 14:21:22.519 ERROR main frame_support::storage: (key, value) failed to decode at [101, 250, 43, 123, 42, 225, 198, 168, 220, 201, 193, 123, 220, 138, 232, 42, 217, 172, 213, 218, 186, 94, 26, 239, 28, 164, 85, 53, 14, 203, 193, 46, 14, 91, 224, 15, 188, 46, 21, 181, 254, 101, 113, 125, 173, 4, 71, 215, 21, 246, 96, 160, 165, 132, 17, 222, 80, 155, 66, 230, 239, 184, 55, 95, 86, 47, 88, 165, 84, 213, 134, 14]: Error    &#xD;&#xA;```&#xD;&#xA;https://gist.github.com/didiermis/92d2ae0bfea89b1692645317d34b8973&#xD;&#xA;&#xD;&#xA;If I comment pre &amp; post upgrade functions, I get the same encoded error but notice the last statement:&#xD;&#xA;https://gist.github.com/didiermis/7049e846197f7926abcd576bdc180c8d&#xD;&#xA;```&#xD;&#xA;2023-03-24 14:32:42.441  INFO main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = (625000000 ps, 0 byte), total weight = (2000000000000 ps, 18446744073709551615 byte) (0.03 %, 0.00 %). &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Something noticeable is if I run a `runtime-upgrade` as:&#xD;&#xA;- update spec_version: 101&#xD;&#xA;- cargo build --release -p node-template-runtime&#xD;&#xA;- upload the new binary (target/release/wbuild/node-template-runtime/node_template_runtime.compact.compressed.wasm) using the Polkadot-UI&#xD;&#xA;&#xD;&#xA;**Migration works as expected!**&#xD;&#xA;&#xD;&#xA;Before runtime-upgrade:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;After runtime-upgrade&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wkTlf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/KdmEi.png&#xD;&#xA;&#xD;&#xA;Let me know if detailed steps are required. I really appreciate any help you can provide." ContentLicense="CC BY-SA 4.0" />
  <row Id="30573" PostHistoryTypeId="1" PostId="7773" RevisionGUID="a0b4099f-06c8-4c77-affb-31324c38f504" CreationDate="2023-03-24T21:23:46.590" UserId="3778" Text="Encoded error while performing a storage migration" ContentLicense="CC BY-SA 4.0" />
  <row Id="30574" PostHistoryTypeId="3" PostId="7773" RevisionGUID="a0b4099f-06c8-4c77-affb-31324c38f504" CreationDate="2023-03-24T21:23:46.590" UserId="3778" Text="|migration|frame-executive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30575" PostHistoryTypeId="5" PostId="7773" RevisionGUID="9ed11341-97dc-4ef9-b4d1-d3b39f47947a" CreationDate="2023-03-25T00:02:29.557" UserId="3778" Comment="added 841 characters in body" Text="This is my first time migrating data, and I'd like to receive general guidance about what steps and command lines I need to use.&#xD;&#xA;I've been working with the node-template before to implement it in my relay chain.&#xD;&#xA;&#xD;&#xA;I followed this tutorial `Basic Storage Migration` from Substrate Docs. &#xD;&#xA;But I noticed a better way to perform a storage migration using the`frame-executive` module with the `try-runtime-cli`.&#xD;&#xA;&#xD;&#xA;Regarding the `try-runtime-cli` implementation, I struggled a bit following the tutorial from Substrate docs, because the tutorial is based on the `polkadot-v0.9.28` release, following those steps, I couldn't compile the node with the `try-runtime` feature. After some research, I updated it to be compatible with the `polkadot-v0.9.37`, there was a significant change from the `polkadot-v0.9.28` to the `polkadot-v0.9.29` release.&#xD;&#xA;&#xD;&#xA;I defined a new type to allocate migrations:&#xD;&#xA;```&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	// pallet_nicks::migration::v1::MigrateToV1&lt;Runtime&gt;,&#xD;&#xA;	// pallet_nicks::migration::v2::MigrateToV2&lt;Runtime&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L351&#xD;&#xA;&#xD;&#xA;Then pass it to the executive type:&#xD;&#xA;```&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;	Migrations,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L357&#xD;&#xA;&#xD;&#xA;After finishing the Basic Storage Migration tutorial, I tried to add an account status for the Nicks structure:&#xD;&#xA;```&#xD;&#xA;    #[derive(CloneNoBound, Encode, Decode, Default, TypeInfo, MaxEncodedLen, PartialEqNoBound, RuntimeDebug)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;		pub first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;		pub last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;		pub third: AccountStatus&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, TypeInfo, MaxEncodedLen, PartialEqNoBound, RuntimeDebug)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub enum AccountStatus {&#xD;&#xA;		Active,&#xD;&#xA;		Inactive,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl Default for AccountStatus {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			AccountStatus::Active&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# **Steps to reproduce the issue:**&#xD;&#xA;&#xD;&#xA;- git clone git@github.com:didiermis/test-storage-migration.git&#xD;&#xA;- cd test-storage-migration&#xD;&#xA;- git checkout feature/nicks/step3&#xD;&#xA;- cargo build --release&#xD;&#xA;- ./target/release/node-template --dev&#xD;&#xA;- execute the bash script `./pallets/nicks/src/migrations_old/execute_tx_v2.sh` to create some initial accounts (requires polkadot-CLI)&#xD;&#xA;---------&#xD;&#xA;**Migration part:**&#xD;&#xA;- Rename the lib.rs file to lib.v1.rs&#xD;&#xA;- Rename the lib.v2.rs file to lib.rs (lib.v2.rs file contains the changes related to the new account status)&#xD;&#xA;- Rename the migration.v2.rs file to migration.rs&#xD;&#xA;- Uncomment the following line in the runtime/src/lib.rs:&#xD;&#xA;```&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	// pallet_nicks::migration::v1::MigrateToV1&lt;Runtime&gt;,&#xD;&#xA;	pallet_nicks::migration::v2::MigrateToV2&lt;Runtime&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L353&#xD;&#xA;- Update the spec version:&#xD;&#xA;```&#xD;&#xA;spec_version: 101,&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L108&#xD;&#xA;- `cargo build --release --features=try-runtime`&#xD;&#xA;- `RUST_LOG=runtime=trace target/release/node-template try-runtime --detailed-log-output --runtime target/release/wbuild/node-template-runtime/node_template_runtime.compact.compressed.wasm on-runtime-upgrade --checks live --uri ws://localhost:9944`&#xD;&#xA;&#xD;&#xA;Then I got the following encoded error (detailed error provided in the gist):&#xD;&#xA;```&#xD;&#xA;2023-03-24 14:21:22.519 ERROR main frame_support::storage: (key, value) failed to decode at [101, 250, 43, 123, 42, 225, 198, 168, 220, 201, 193, 123, 220, 138, 232, 42, 217, 172, 213, 218, 186, 94, 26, 239, 28, 164, 85, 53, 14, 203, 193, 46, 14, 91, 224, 15, 188, 46, 21, 181, 254, 101, 113, 125, 173, 4, 71, 215, 21, 246, 96, 160, 165, 132, 17, 222, 80, 155, 66, 230, 239, 184, 55, 95, 86, 47, 88, 165, 84, 213, 134, 14]: Error    &#xD;&#xA;```&#xD;&#xA;https://gist.github.com/didiermis/92d2ae0bfea89b1692645317d34b8973&#xD;&#xA;&#xD;&#xA;If I comment pre &amp; post upgrade functions, I get the same encoded error but notice the last statement:&#xD;&#xA;https://gist.github.com/didiermis/7049e846197f7926abcd576bdc180c8d&#xD;&#xA;```&#xD;&#xA;2023-03-24 14:32:42.441  INFO main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = (625000000 ps, 0 byte), total weight = (2000000000000 ps, 18446744073709551615 byte) (0.03 %, 0.00 %). &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Something noticeable is if I run a `runtime-upgrade` as:&#xD;&#xA;- update spec_version: 101&#xD;&#xA;- cargo build --release -p node-template-runtime&#xD;&#xA;- upload the new binary (target/release/wbuild/node-template-runtime/node_template_runtime.compact.compressed.wasm) using the Polkadot-UI&#xD;&#xA;&#xD;&#xA;**Migration works as expected!**&#xD;&#xA;&#xD;&#xA;Before runtime-upgrade:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;After runtime-upgrade&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wkTlf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/KdmEi.png&#xD;&#xA;&#xD;&#xA;Let me know if detailed steps are required. I really appreciate any help you can provide.&#xD;&#xA;&#xD;&#xA;### **Update:**&#xD;&#xA;I added the following validation for the pre-upgrade function:&#xD;&#xA;```&#xD;&#xA;			let names = NameOf::&lt;T&gt;::iter_keys().count() as u32;			&#xD;&#xA;			let decodable_names = NameOf::&lt;T&gt;::iter_values().count() as u32;&#xD;&#xA;			log::info!(&#xD;&#xA;				target: LOG_TARGET,&#xD;&#xA;				&quot;pre_upgrade: {:?} names, {:?} decodable names&quot;,&#xD;&#xA;				names,&#xD;&#xA;				decodable_names,&#xD;&#xA;			);&#xD;&#xA;			ensure!(&#xD;&#xA;				names == decodable_names,&#xD;&#xA;				&quot;Not all values are decodable.&quot;&#xD;&#xA;			);&#xD;&#xA;```&#xD;&#xA;I got this log:&#xD;&#xA;```&#xD;&#xA;2023-03-24 17:53:28.198  INFO main nicks: pre_upgrade: 4 names, 0 decodable names  &#xD;&#xA;2023-03-24 17:53:28.198  INFO main node_template_runtime: try-runtime::on_runtime_upgrade failed with: &quot;Not all values are decodable.&quot; &#xD;&#xA;```&#xD;&#xA;I've created 4 initial accounts with the script, so the number of keys is correct.&#xD;&#xA;It seems to me that there's an issue decoding stored values." ContentLicense="CC BY-SA 4.0" />
  <row Id="30576" PostHistoryTypeId="2" PostId="7774" RevisionGUID="9ebb46e2-9f78-4d9a-a3be-5c503be1e937" CreationDate="2023-03-25T06:37:49.963" UserId="4004" Text="I've been trying to implement cross contract calls in constrcutor but somehow I can't seem to make it right. Is the following code executable?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[openbrush::contract]&#xD;&#xA;pub mod contract {&#xD;&#xA;  #[ink(storage)]&#xD;&#xA;  #[derive(Default, Storage)]&#xD;&#xA;  pub struct LpToken { ... }&#xD;&#xA;  ...&#xD;&#xA;  impl LpToken {&#xD;&#xA;    #[ink(constructor)]&#xD;&#xA;    pub fn new(token: AccountId) {&#xD;&#xA;      # here!!&#xD;&#xA;      let base_name = PSP22MetadataRef::token_name(&amp;token);&#xD;&#xA;      let base_symbol = PSP22MetadataRef::token_symbol(&amp;token);&#xD;&#xA;      let decimals = PSP22MetadataRef::token_decimals(&amp;token);&#xD;&#xA;      ...&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I could not find any docs on cross-contract calls in constructors. I would appreciate your help in this matter." ContentLicense="CC BY-SA 4.0" />
  <row Id="30578" PostHistoryTypeId="1" PostId="7774" RevisionGUID="9ebb46e2-9f78-4d9a-a3be-5c503be1e937" CreationDate="2023-03-25T06:37:49.963" UserId="4004" Text="Can I make a cross-contract call with constructor (function with &quot;#[ink(constuctor)]&quot; attribute) in ink! contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30579" PostHistoryTypeId="3" PostId="7774" RevisionGUID="9ebb46e2-9f78-4d9a-a3be-5c503be1e937" CreationDate="2023-03-25T06:37:49.963" UserId="4004" Text="|ink|rust|smart-contract|substrate-contracts-node|blockchaincross-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30580" PostHistoryTypeId="2" PostId="7775" RevisionGUID="da8e3aa5-ac0f-4a0d-abe4-f1e84959524c" CreationDate="2023-03-25T09:49:16.403" UserId="4005" Text="I'm trying to get a better understanding of Frontier, and thus I'm reimplementing the frontier node template over the generic substrate node template. Unfortunately I'm pretty much stuck at step 1.&#xD;&#xA;&#xD;&#xA;Here's the change I did to the runtime (it's pretty much just replacing the MultiSignature with EthereumSignature. This, of course, forces the AccountId to resolve into AccountId20:&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs&#xD;&#xA;index ff9ac66..319eb70 100644&#xD;&#xA;--- a/runtime/src/lib.rs&#xD;&#xA;+++ b/runtime/src/lib.rs&#xD;&#xA;@@ -6,6 +6,7 @@&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/wasm_binary.rs&quot;));&#xD;&#xA;&#xD;&#xA;+use fp_account::EthereumSignature;&#xD;&#xA;use pallet_grandpa::{&#xD;&#xA;        fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList,&#xD;&#xA;};&#xD;&#xA;@@ -18,7 +19,7 @@ use sp_runtime::{&#xD;&#xA;                AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, NumberFor, One, Verify,&#xD;&#xA;        },&#xD;&#xA;        transaction_validity::{TransactionSource, TransactionValidity},&#xD;&#xA;-       ApplyExtrinsicResult, MultiSignature,&#xD;&#xA;+       ApplyExtrinsicResult,&#xD;&#xA;};&#xD;&#xA;use sp_std::prelude::*;&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;@@ -54,7 +55,7 @@ pub use pallet_template;&#xD;&#xA;pub type BlockNumber = u32;&#xD;&#xA;&#xD;&#xA;/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.&#xD;&#xA;-pub type Signature = MultiSignature;&#xD;&#xA;+pub type Signature = EthereumSignature;&#xD;&#xA;&#xD;&#xA;/// Some way of identifying an account on the chain. We intentionally make it equivalent&#xD;&#xA;/// to the public key of our transaction signing scheme.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For any extrinsic I try to submit with polkadot{.js} I get the following error now:&#xD;&#xA;&#xD;&#xA;&gt; -32602: invalid length 48, expected a (both 0x-prefixed or not) hex string or byte array containing 20 bytes at line 1 column 50&#xD;&#xA;&#xD;&#xA;Which seems to tell me that polkadot{.js} cannot handle the EthereumSignature on its own.&#xD;&#xA;&#xD;&#xA;Can I convince it to use the EthereumSignature or I'm stuck with other means of calling into the RPC? I'm pretty sure Moonbeam uses the similar signer and it works with polkadot{.js} somehow." ContentLicense="CC BY-SA 4.0" />
  <row Id="30582" PostHistoryTypeId="1" PostId="7775" RevisionGUID="da8e3aa5-ac0f-4a0d-abe4-f1e84959524c" CreationDate="2023-03-25T09:49:16.403" UserId="4005" Text="How do I use the AccountId20 and EthereumSignature Signer with polkadot.js.org?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30583" PostHistoryTypeId="3" PostId="7775" RevisionGUID="da8e3aa5-ac0f-4a0d-abe4-f1e84959524c" CreationDate="2023-03-25T09:49:16.403" UserId="4005" Text="|polkadot-js|frontier|ethereum|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30584" PostHistoryTypeId="34" PostId="7625" RevisionGUID="7d6bda91-61b8-4f4f-8de2-e149048c40c3" CreationDate="2023-03-25T11:05:30.733" UserId="-1" Comment="19" />
  <row Id="30586" PostHistoryTypeId="5" PostId="6708" RevisionGUID="768b9e02-74fb-4a5d-b187-cac7b50ac923" CreationDate="2023-03-25T11:14:29.087" UserId="251" Comment="added 68 characters in body" Text="Check Darwinia2.0. We are doing this now.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-2.0&#xD;&#xA;&#xD;&#xA;But for the session keys, it's still Sr25519. This is decided by AURA.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Key point: https://github.com/polkadot-js/apps/pull/8396." ContentLicense="CC BY-SA 4.0" />
  <row Id="30587" PostHistoryTypeId="2" PostId="7776" RevisionGUID="befbf7a8-41fd-413b-b0ac-19ace4c649a6" CreationDate="2023-03-25T11:16:23.530" UserId="251" Text="There is an answer in https://substrate.stackexchange.com/questions/6699/unified-accounts-with-aura/6708#6708.&#xD;&#xA;&#xD;&#xA;But that question's title is too specific.&#xD;&#xA;&#xD;&#xA;So, I try to answer this again.&#xD;&#xA;&#xD;&#xA;I think you need this to make PolkadotJS adapt for your chain.&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-js/apps/pull/8396" ContentLicense="CC BY-SA 4.0" />
  <row Id="30589" PostHistoryTypeId="2" PostId="7777" RevisionGUID="d51b1e85-e412-4348-8d3d-1d4b939fc895" CreationDate="2023-03-25T12:12:38.550" UserId="3327" Text="I was following along with this tutorial to run a polka dot relay chain and connect a substrate para chain with it. &#xD;&#xA;&#xD;&#xA;I wonder, it there is a docker image available? so that we can spin a substrate para chain node connected to polka dot relay chain with just one docker commands. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30591" PostHistoryTypeId="1" PostId="7777" RevisionGUID="d51b1e85-e412-4348-8d3d-1d4b939fc895" CreationDate="2023-03-25T12:12:38.550" UserId="3327" Text="How to spin a polkadot parachain node and connect it to polkadot relay chain using a docker binary" ContentLicense="CC BY-SA 4.0" />
  <row Id="30592" PostHistoryTypeId="3" PostId="7777" RevisionGUID="d51b1e85-e412-4348-8d3d-1d4b939fc895" CreationDate="2023-03-25T12:12:38.550" UserId="3327" Text="|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30593" PostHistoryTypeId="2" PostId="7778" RevisionGUID="23397595-9725-4b0a-b731-317092ce4f03" CreationDate="2023-03-25T13:10:01.593" UserId="83" Text="Previously to run a relay chain and connect a parachain to it you could use [polkadot-launch][1], but that has been deprecated in favour of your choice of either [zombienet][3] or [parachain-launch][2]. [parachain-launch][2] allows you to start them with a single docker command.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-launch&#xD;&#xA;  [2]: https://github.com/open-web3-stack/parachain-launch&#xD;&#xA;  [3]: https://github.com/paritytech/zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="30595" PostHistoryTypeId="2" PostId="7779" RevisionGUID="33ea2327-4003-4f38-884f-8d22925734a6" CreationDate="2023-03-25T15:47:16.123" UserId="213" Text="I want to create anonymous account using phala network.&#xD;&#xA;&#xD;&#xA;Here is my logic. &#xD;&#xA;&#xD;&#xA;You need to sign with your kyc account using the password as message and verify that the account is yours inside phala contract.&#xD;&#xA;&#xD;&#xA;https://www.phala.network/en/&#xD;&#xA;&#xD;&#xA;0x76e01859d6cf4a8637350bdb81e3cef71e29b7c2 signed Password&#xD;&#xA;```javascript&#xD;&#xA;import { stringToU8a, u8aToHex } from '@polkadot/util';&#xD;&#xA;import { signatureVerify } from '@polkadot/util-crypto';&#xD;&#xA;&#xD;&#xA;const alice = keyring.addFromUri('//Alice');&#xD;&#xA;&#xD;&#xA;const message = stringToU8a('this is our message');&#xD;&#xA;const signature = alice.sign(message);&#xD;&#xA;&#xD;&#xA;// verify the message using Alice's address, this is done inside phala network smart contract&#xD;&#xA;const { isValid } = signatureVerify(message, signature, alice.address);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;console.log(`${u8aToHex(signature)} is ${isValid ? 'valid' : 'invalid'}`);&#xD;&#xA;```&#xD;&#xA;https://polkadot.js.org/docs/keyring/start/sign-verify/&#xD;&#xA;&#xD;&#xA;Then sign using anonymous account using the same password and verify that the account is yours.&#xD;&#xA;&#xD;&#xA;Than phala network smart contract links the two accounts.&#xD;&#xA;&#xD;&#xA;But how do I connect with the phala contract from my blockchain, so that I can validate the that anonymous account is linked to kyc account. &#xD;&#xA;&#xD;&#xA;Is it through [offchain workers][1] or xcm? I am very new to xcm messaging, all the examples given are about asset transfer. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.recipes/off-chain-workers/http-json.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="30597" PostHistoryTypeId="1" PostId="7779" RevisionGUID="33ea2327-4003-4f38-884f-8d22925734a6" CreationDate="2023-03-25T15:47:16.123" UserId="213" Text="How to connect with phala contract for creation of anonymous accounts using phala network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30598" PostHistoryTypeId="3" PostId="7779" RevisionGUID="33ea2327-4003-4f38-884f-8d22925734a6" CreationDate="2023-03-25T15:47:16.123" UserId="213" Text="|xcm|offchain-worker|design|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30599" PostHistoryTypeId="5" PostId="7779" RevisionGUID="f443a8ba-ba4a-434b-a1ab-bfad5bf6aa24" CreationDate="2023-03-25T16:10:58.547" UserId="213" Comment="added 60 characters in body" Text="I want to create anonymous account using phala network.&#xD;&#xA;&#xD;&#xA;Here is my logic. &#xD;&#xA;&#xD;&#xA;You need to sign with your kyc account using the password as message and verify that the account is yours inside phala contract.&#xD;&#xA;&#xD;&#xA;https://www.phala.network/en/&#xD;&#xA;&#xD;&#xA;0x76e01859d6cf4a8637350bdb81e3cef71e29b7c2 signed Password&#xD;&#xA;```javascript&#xD;&#xA;import { stringToU8a, u8aToHex } from '@polkadot/util';&#xD;&#xA;import { signatureVerify } from '@polkadot/util-crypto';&#xD;&#xA;&#xD;&#xA;const alice = keyring.addFromUri('//Alice');&#xD;&#xA;&#xD;&#xA;const message = stringToU8a('this is our message');&#xD;&#xA;const signature = alice.sign(message);&#xD;&#xA;&#xD;&#xA;// verify the message using Alice's address, this is done inside phala network smart contract&#xD;&#xA;const { isValid } = signatureVerify(message, signature, alice.address);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;console.log(`${u8aToHex(signature)} is ${isValid ? 'valid' : 'invalid'}`);&#xD;&#xA;```&#xD;&#xA;https://polkadot.js.org/docs/keyring/start/sign-verify/&#xD;&#xA;&#xD;&#xA;Then sign using anonymous account using the same password and verify that the account is yours.&#xD;&#xA;&#xD;&#xA;Than phala network smart contract links the two accounts.&#xD;&#xA;&#xD;&#xA;But how do I connect with the phala contract from my blockchain, so that I can validate the that anonymous account is linked to kyc account. &#xD;&#xA;&#xD;&#xA;Is it through [offchain workers][1] or xcm? Http address are also not safe as it can be blocked by ISP. I am very new to xcm messaging, all the examples given are about asset transfer. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.recipes/off-chain-workers/http-json.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="30600" PostHistoryTypeId="2" PostId="7780" RevisionGUID="48dafa9b-4e31-4a97-87d4-b3775ce3c709" CreationDate="2023-03-25T19:02:43.367" UserId="2722" Text="I am facing an issue while creating a DEX pallet that allows a user to create a their tokens contract and add it to my DEX in a Substrate-based node. I am using the substrate-node-contract to upload the smart contract and have set up a separate node for using the DEX pallet.&#xD;&#xA;&#xD;&#xA;[![contract upload enviroment][1]][1]&#xD;&#xA;&#xD;&#xA;i getting the address from `Contract Address in `Dry-run outcome` part . &#xD;&#xA;&#xD;&#xA;i have created two contract and add them address into the pallet dex :&#xD;&#xA;&#xD;&#xA;[![pallet inputs][2]][2]&#xD;&#xA;&#xD;&#xA;and i got these event results : &#xD;&#xA;&#xD;&#xA;    treasury:UpdatedInactive&#xD;&#xA;    [&quot;1,054,400,041,399,279&quot;,&quot;1,055,584,901,822,798&quot;]&#xD;&#xA;    system:ExtrinsicFailed&#xD;&#xA;    [{&quot;Module&quot;:{&quot;index&quot;:&quot;58&quot;,&quot;error&quot;:&quot;0x00000000&quot;}},{&quot;weight&quot;:{&quot;refTime&quot;:&quot;1,077,859,000&quot;,&quot;proofSize&quot;:&quot;0&quot;},&quot;class&quot;:&quot;Normal&quot;,&quot;paysFee&quot;:&quot;Yes&quot;}]&#xD;&#xA;    transactionPayment:TransactionFeePaid&#xD;&#xA;    [&quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&quot;1,481,075,529,399&quot;,&quot;0&quot;]&#xD;&#xA;    balances:Deposit&#xD;&#xA;    [&quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&quot;296,215,105,880&quot;]&#xD;&#xA;    treasury:Deposit&#xD;&#xA;    [&quot;1,184,860,423,519&quot;]&#xD;&#xA;    balances:Deposit&#xD;&#xA;    [&quot;5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z&quot;,&quot;1,184,860,423,519&quot;]&#xD;&#xA;    balances:Withdraw&#xD;&#xA;    [&quot;5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY&quot;,&quot;1,481,075,529,399&quot;]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;now when i need to check the assets have stored into the storage or not . it show me nothing . &#xD;&#xA;&#xD;&#xA;[![result][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i want to know whats the problem ? how can store the assets into the storage ? &#xD;&#xA;&#xD;&#xA;this is my code : &#xD;&#xA;&#xD;&#xA;        #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    pub mod weights;&#xD;&#xA;    &#xD;&#xA;    use frame_support::traits::Currency;&#xD;&#xA;    use sp_std::prelude::*;&#xD;&#xA;    &#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    pub use weights::WeightInfo;&#xD;&#xA;    &#xD;&#xA;    type AccountIdOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;    type BalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Currency as Currency&lt;AccountIdOf&lt;T&gt;&gt;&gt;::Balance;&#xD;&#xA;    type AssetIdOf&lt;T&gt; = &lt;T as Config&gt;::AssetId;&#xD;&#xA;    type AssetBalanceOf&lt;T&gt; = &lt;T as Config&gt;::AssetBalance;&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    	use super::*;&#xD;&#xA;    	use codec::EncodeLike;&#xD;&#xA;    	use frame_support::{&#xD;&#xA;    		pallet_prelude::*,&#xD;&#xA;    		sp_runtime::{&#xD;&#xA;    			traits::{&#xD;&#xA;    				AccountIdConversion, CheckedAdd, CheckedMul, CheckedSub, Convert, One, Saturating,&#xD;&#xA;    				Zero,&#xD;&#xA;    			},&#xD;&#xA;    			FixedPointNumber, FixedPointOperand, FixedU128,&#xD;&#xA;    		},&#xD;&#xA;    		traits::{&#xD;&#xA;    			fungibles::{Create, Destroy, Inspect, Mutate, Transfer},&#xD;&#xA;    			tokens::{Balance, WithdrawConsequence},&#xD;&#xA;    			ExistenceRequirement,&#xD;&#xA;    		},&#xD;&#xA;    		transactional, PalletId,&#xD;&#xA;    	};&#xD;&#xA;    	use frame_system::{pallet_prelude::*, Origin};&#xD;&#xA;    	use sp_std::fmt::Debug;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		/// Pallet ID.&#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type PalletId: Get&lt;PalletId&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The overarching event type.&#xD;&#xA;    		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The currency trait.&#xD;&#xA;    		type Currency: Currency&lt;Self::AccountId&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The balance type for assets (i.e. tokens).&#xD;&#xA;    		type AssetBalance: Balance&#xD;&#xA;    			+ FixedPointOperand&#xD;&#xA;    			+ MaxEncodedLen&#xD;&#xA;    			+ MaybeSerializeDeserialize&#xD;&#xA;    			+ TypeInfo;&#xD;&#xA;    &#xD;&#xA;    		// Two-way conversion between asset and currency balances&#xD;&#xA;    		type AssetToCurrencyBalance: Convert&lt;Self::AssetBalance, BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;    		type CurrencyToAssetBalance: Convert&lt;BalanceOf&lt;Self&gt;, Self::AssetBalance&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The asset ID type.&#xD;&#xA;    		type AssetId: MaybeSerializeDeserialize&#xD;&#xA;    			+ MaxEncodedLen&#xD;&#xA;    			+ TypeInfo&#xD;&#xA;    			+ Clone&#xD;&#xA;    			+ Debug&#xD;&#xA;    			+ PartialEq&#xD;&#xA;    			+ EncodeLike&#xD;&#xA;    			+ Decode;&#xD;&#xA;    &#xD;&#xA;    		/// The type for tradable assets.&#xD;&#xA;    		type Assets: Inspect&lt;Self::AccountId, AssetId = Self::AssetId, Balance = Self::AssetBalance&gt;&#xD;&#xA;    			+ Transfer&lt;Self::AccountId&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// The type for liquidity tokens.&#xD;&#xA;    		type AssetRegistry: Inspect&lt;Self::AccountId, AssetId = Self::AssetId, Balance = Self::AssetBalance&gt;&#xD;&#xA;    			+ Mutate&lt;Self::AccountId&gt;&#xD;&#xA;    			+ Create&lt;Self::AccountId&gt;&#xD;&#xA;    			+ Destroy&lt;Self::AccountId&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// Information on runtime weights.&#xD;&#xA;    		type WeightInfo: WeightInfo;&#xD;&#xA;    &#xD;&#xA;    		/// Provider fee numerator.&#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type ProviderFeeNumerator: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// Provider fee denominator.&#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type ProviderFeeDenominator: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    		/// Minimum currency deposit for a new exchange.&#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type MinDeposit: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn something)]&#xD;&#xA;    	pub type Something&lt;T&gt; = StorageValue&lt;_, u32&gt;;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// A new exchange was created [asset_id, liquidity_token_id]&#xD;&#xA;    		ExchangeCreated(AssetIdOf&lt;T&gt;, AssetIdOf&lt;T&gt;),&#xD;&#xA;    		/// Liquidity was added to an exchange [provider_id, asset_id, currency_amount,&#xD;&#xA;    		/// token_amount, liquidity_minted]&#xD;&#xA;    		LiquidityAdded(&#xD;&#xA;    			T::AccountId,&#xD;&#xA;    			AssetIdOf&lt;T&gt;,&#xD;&#xA;    			BalanceOf&lt;T&gt;,&#xD;&#xA;    			AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    			AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    		),&#xD;&#xA;    		/// Liquidity was removed from an exchange [provider_id, asset_id, currency_amount,&#xD;&#xA;    		/// token_amount, liquidity_amount]&#xD;&#xA;    		LiquidityRemoved(&#xD;&#xA;    			T::AccountId,&#xD;&#xA;    			AssetIdOf&lt;T&gt;,&#xD;&#xA;    			BalanceOf&lt;T&gt;,&#xD;&#xA;    			AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    			AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    		),&#xD;&#xA;    		/// Currency was traded for an asset [asset_id, buyer_id, recipient_id, currency_amount,&#xD;&#xA;    		/// token_amount]&#xD;&#xA;    		CurrencyTradedForAsset(&#xD;&#xA;    			AssetIdOf&lt;T&gt;,&#xD;&#xA;    			T::AccountId,&#xD;&#xA;    			T::AccountId,&#xD;&#xA;    			BalanceOf&lt;T&gt;,&#xD;&#xA;    			AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    		),&#xD;&#xA;    		/// An asset was traded for currency [asset_id, buyer_id, recipient_id, currency_amount,&#xD;&#xA;    		/// token_amount]&#xD;&#xA;    		AssetTradedForCurrency(&#xD;&#xA;    			AssetIdOf&lt;T&gt;,&#xD;&#xA;    			T::AccountId,&#xD;&#xA;    			T::AccountId,&#xD;&#xA;    			BalanceOf&lt;T&gt;,&#xD;&#xA;    			AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    		),&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// Asset with the specified ID does not exist&#xD;&#xA;    		AssetNotFound,&#xD;&#xA;    		/// Exchange for the given asset already exists&#xD;&#xA;    		ExchangeAlreadyExists,&#xD;&#xA;    		/// Provided liquidity token ID is already taken&#xD;&#xA;    		TokenIdTaken,&#xD;&#xA;    		/// Not enough free balance to add liquidity or perform trade&#xD;&#xA;    		BalanceTooLow,&#xD;&#xA;    		/// Not enough tokens to add liquidity or perform trade&#xD;&#xA;    		NotEnoughTokens,&#xD;&#xA;    		/// Specified account doesn't own enough liquidity in the exchange&#xD;&#xA;    		ProviderLiquidityTooLow,&#xD;&#xA;    		/// No exchange found for the given `asset_id`&#xD;&#xA;    		ExchangeNotFound,&#xD;&#xA;    		/// Zero value provided for trade amount parameter&#xD;&#xA;    		TradeAmountIsZero,&#xD;&#xA;    		/// Zero value provided for `token_amount` parameter&#xD;&#xA;    		TokenAmountIsZero,&#xD;&#xA;    		/// Zero value provided for `max_tokens` parameter&#xD;&#xA;    		MaxTokensIsZero,&#xD;&#xA;    		/// Zero value provided for `currency_amount` parameter&#xD;&#xA;    		CurrencyAmountIsZero,&#xD;&#xA;    		/// Value provided for `currency_amount` parameter is too high&#xD;&#xA;    		CurrencyAmountTooHigh,&#xD;&#xA;    		/// Value provided for `currency_amount` parameter is too low&#xD;&#xA;    		CurrencyAmountTooLow,&#xD;&#xA;    		/// Zero value provided for `min_liquidity` parameter&#xD;&#xA;    		MinLiquidityIsZero,&#xD;&#xA;    		/// Value provided for `max_tokens` parameter is too low&#xD;&#xA;    		MaxTokensTooLow,&#xD;&#xA;    		/// Value provided for `min_liquidity` parameter is too high&#xD;&#xA;    		MinLiquidityTooHigh,&#xD;&#xA;    		/// Zero value provided for `liquidity_amount` parameter&#xD;&#xA;    		LiquidityAmountIsZero,&#xD;&#xA;    		/// Zero value provided for `min_currency` parameter&#xD;&#xA;    		MinCurrencyIsZero,&#xD;&#xA;    		/// Zero value provided for `min_tokens` parameter&#xD;&#xA;    		MinTokensIsZero,&#xD;&#xA;    		/// Value provided for `min_currency` parameter is too high&#xD;&#xA;    		MinCurrencyTooHigh,&#xD;&#xA;    		/// Value provided for `min_tokens` parameter is too high&#xD;&#xA;    		MinTokensTooHigh,&#xD;&#xA;    		/// Value provided for `max_currency` parameter is too low&#xD;&#xA;    		MaxCurrencyTooLow,&#xD;&#xA;    		/// Value provided for `min_bought_tokens` parameter is too high&#xD;&#xA;    		MinBoughtTokensTooHigh,&#xD;&#xA;    		/// Value provided for `max_sold_tokens` parameter is too low&#xD;&#xA;    		MaxSoldTokensTooLow,&#xD;&#xA;    		/// There is not enough liquidity in the exchange to perform trade&#xD;&#xA;    		NotEnoughLiquidity,&#xD;&#xA;    		/// Overflow occurred&#xD;&#xA;    		Overflow,&#xD;&#xA;    		/// Underflow occurred&#xD;&#xA;    		Underflow,&#xD;&#xA;    		/// Deadline specified for the operation has passed&#xD;&#xA;    		DeadlinePassed,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	pub trait ConfigHelper: Config {&#xD;&#xA;    		fn pallet_account() -&gt; AccountIdOf&lt;Self&gt;;&#xD;&#xA;    		fn currency_to_asset(curr_balance: BalanceOf&lt;Self&gt;) -&gt; AssetBalanceOf&lt;Self&gt;;&#xD;&#xA;    		fn asset_to_currency(asset_balance: AssetBalanceOf&lt;Self&gt;) -&gt; BalanceOf&lt;Self&gt;;&#xD;&#xA;    		fn net_amount_numerator() -&gt; BalanceOf&lt;Self&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	impl&lt;T: Config&gt; ConfigHelper for T {&#xD;&#xA;    		#[inline(always)]&#xD;&#xA;    		fn pallet_account() -&gt; AccountIdOf&lt;Self&gt; {&#xD;&#xA;    			Self::PalletId::get().into_account_truncating()&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		#[inline(always)]&#xD;&#xA;    		fn currency_to_asset(curr_balance: BalanceOf&lt;Self&gt;) -&gt; AssetBalanceOf&lt;Self&gt; {&#xD;&#xA;    			Self::CurrencyToAssetBalance::convert(curr_balance)&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		#[inline(always)]&#xD;&#xA;    		fn asset_to_currency(asset_balance: AssetBalanceOf&lt;Self&gt;) -&gt; BalanceOf&lt;Self&gt; {&#xD;&#xA;    			Self::AssetToCurrencyBalance::convert(asset_balance)&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		#[inline(always)]&#xD;&#xA;    		fn net_amount_numerator() -&gt; BalanceOf&lt;Self&gt; {&#xD;&#xA;    			Self::ProviderFeeDenominator::get()&#xD;&#xA;    				.checked_sub(&amp;Self::ProviderFeeNumerator::get())&#xD;&#xA;    				.expect(&quot;Provider fee shouldn't be greater than 100%&quot;)&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[derive(&#xD;&#xA;    		Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, MaxEncodedLen, TypeInfo,&#xD;&#xA;    	)]&#xD;&#xA;    	pub struct Exchange&lt;AssetId, Balance, AssetBalance&gt; {&#xD;&#xA;    		pub asset_id: AssetId,&#xD;&#xA;    		pub currency_reserve: Balance,&#xD;&#xA;    		pub token_reserve: AssetBalance,&#xD;&#xA;    		pub liquidity_token_id: AssetId,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	type ExchangeOf&lt;T&gt; = Exchange&lt;AssetIdOf&lt;T&gt;, BalanceOf&lt;T&gt;, AssetBalanceOf&lt;T&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn exchanges)]&#xD;&#xA;    	pub(super) type Exchanges&lt;T: Config&gt; =&#xD;&#xA;    		StorageMap&lt;_, Twox64Concat, AssetIdOf&lt;T&gt;, ExchangeOf&lt;T&gt;, OptionQuery&gt;;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		#[pallet::call_index(0)]&#xD;&#xA;    		#[pallet::weight(&lt;T as Config&gt;::WeightInfo::create_exchange())]&#xD;&#xA;    		#[transactional]&#xD;&#xA;    		pub fn create_exchange(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			asset_id: AssetIdOf&lt;T&gt;,&#xD;&#xA;    			liquidity_token_id: AssetIdOf&lt;T&gt;,&#xD;&#xA;    			currency_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    			token_amount: AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			// -------------------------- Validation part --------------------------&#xD;&#xA;    			let caller = ensure_signed(origin)?;&#xD;&#xA;    			ensure!(currency_amount &gt;= T::MinDeposit::get(), Error::&lt;T&gt;::CurrencyAmountTooLow);&#xD;&#xA;    			ensure!(token_amount &gt; Zero::zero(), Error::&lt;T&gt;::TokenAmountIsZero);&#xD;&#xA;    			if T::Assets::total_issuance(asset_id.clone()).is_zero() {&#xD;&#xA;    				Err(Error::&lt;T&gt;::AssetNotFound)?&#xD;&#xA;    			}&#xD;&#xA;    			if &lt;Exchanges&lt;T&gt;&gt;::contains_key(asset_id.clone()) {&#xD;&#xA;    				Err(Error::&lt;T&gt;::ExchangeAlreadyExists)?&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			// ----------------------- Create liquidity token ----------------------&#xD;&#xA;    			T::AssetRegistry::create(&#xD;&#xA;    				liquidity_token_id.clone(),&#xD;&#xA;    				T::pallet_account(),&#xD;&#xA;    				false,&#xD;&#xA;    				&lt;AssetBalanceOf&lt;T&gt;&gt;::one(),&#xD;&#xA;    			)&#xD;&#xA;    			.map_err(|_| Error::&lt;T&gt;::TokenIdTaken)?;&#xD;&#xA;    &#xD;&#xA;    			// -------------------------- Update storage ---------------------------&#xD;&#xA;    			let exchange = Exchange {&#xD;&#xA;    				asset_id: asset_id.clone(),&#xD;&#xA;    				currency_reserve: &lt;BalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;    				token_reserve: &lt;AssetBalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;    				liquidity_token_id: liquidity_token_id.clone(),&#xD;&#xA;    			};&#xD;&#xA;    			let liquidity_minted = T::currency_to_asset(currency_amount);&#xD;&#xA;    			Self::do_add_liquidity(&#xD;&#xA;    				exchange,&#xD;&#xA;    				currency_amount,&#xD;&#xA;    				token_amount,&#xD;&#xA;    				liquidity_minted,&#xD;&#xA;    				caller,&#xD;&#xA;    			)?;&#xD;&#xA;    &#xD;&#xA;    			// ---------------------------- Emit event -----------------------------&#xD;&#xA;    			Self::deposit_event(Event::ExchangeCreated(asset_id, liquidity_token_id));&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		/// Perform currency and asset transfers, mint liquidity token,&#xD;&#xA;    		/// update exchange balances, emit event&#xD;&#xA;    		#[transactional]&#xD;&#xA;    		fn do_add_liquidity(&#xD;&#xA;    			mut exchange: ExchangeOf&lt;T&gt;,&#xD;&#xA;    			currency_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    			token_amount: AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    			liquidity_minted: AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    			provider: AccountIdOf&lt;T&gt;,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			let asset_id = exchange.asset_id.clone();&#xD;&#xA;    			let pallet_account = T::pallet_account();&#xD;&#xA;    &#xD;&#xA;    			&lt;T as pallet::Config&gt;::Currency::transfer(&#xD;&#xA;    				&amp;provider,&#xD;&#xA;    				&amp;pallet_account,&#xD;&#xA;    				currency_amount,&#xD;&#xA;    				ExistenceRequirement::KeepAlive,&#xD;&#xA;    			)?;&#xD;&#xA;    &#xD;&#xA;    			T::Assets::transfer(asset_id.clone(), &amp;provider, &amp;pallet_account, token_amount, true);&#xD;&#xA;    			T::AssetRegistry::mint_into(&#xD;&#xA;    				exchange.liquidity_token_id.clone(),&#xD;&#xA;    				&amp;provider,&#xD;&#xA;    				liquidity_minted,&#xD;&#xA;    			)?;&#xD;&#xA;    &#xD;&#xA;    			exchange.currency_reserve.saturating_accrue(currency_amount);&#xD;&#xA;    			exchange.token_reserve.saturating_accrue(token_amount);&#xD;&#xA;    			&lt;Exchanges&lt;T&gt;&gt;::insert(asset_id.clone(), exchange);&#xD;&#xA;    &#xD;&#xA;    			Self::deposit_event(Event::LiquidityAdded(&#xD;&#xA;    				provider,&#xD;&#xA;    				asset_id,&#xD;&#xA;    				currency_amount,&#xD;&#xA;    				token_amount,&#xD;&#xA;    				liquidity_minted,&#xD;&#xA;    			));&#xD;&#xA;    &#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sW6AD.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Zj6xO.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/zMWHA.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30602" PostHistoryTypeId="1" PostId="7780" RevisionGUID="48dafa9b-4e31-4a97-87d4-b3775ce3c709" CreationDate="2023-03-25T19:02:43.367" UserId="2722" Text="Issue with adding a smart contract address to a DEX pallet in a Substrate-based node" ContentLicense="CC BY-SA 4.0" />
  <row Id="30603" PostHistoryTypeId="3" PostId="7780" RevisionGUID="48dafa9b-4e31-4a97-87d4-b3775ce3c709" CreationDate="2023-03-25T19:02:43.367" UserId="2722" Text="|polkadot-js|substrate-node-template|substrate-parachain-template|substrate-contracts-node|pallet-dex|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30604" PostHistoryTypeId="50" PostId="3412" RevisionGUID="fad48850-8a47-44ac-88d7-395615450b84" CreationDate="2023-03-25T21:06:50.853" UserId="-1" />
  <row Id="30605" PostHistoryTypeId="2" PostId="7781" RevisionGUID="f0f3b74a-024c-4239-b927-d3a6635a3387" CreationDate="2023-03-26T02:49:00.123" UserId="83" Text="Here are a couple of options:&#xD;&#xA;&#xD;&#xA;**Option 1:**&#xD;&#xA;&#xD;&#xA;* Go to https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/js&#xD;&#xA;* Paste the code snippet below, replacing the `ALICE` address with an address that is actively nominating&#xD;&#xA;* Click the play icon&#xD;&#xA;* View the output in the terminal on the right that will list the validators they have nominated.&#xD;&#xA;```js&#xD;&#xA;const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';&#xD;&#xA;const validators = await api.query.staking.nominators(ALICE);&#xD;&#xA;if (validators.toJSON() &amp;&amp; validators.toJSON().hasOwnProperty(&quot;targets&quot;)) {&#xD;&#xA;  console.log(`stash account ${ALICE} has nominated the following validators\n\n`,&#xD;&#xA;    JSON.stringify(validators.toJSON()[&quot;targets&quot;], null, 2));&#xD;&#xA;} else {&#xD;&#xA;  console.log(`stash account ${ALICE} has not nominated any validators`);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Option 2:**&#xD;&#xA;&#xD;&#xA;Alternatively install Node.js and create a program:&#xD;&#xA;```&#xD;&#xA;mkdir nominated-validators-for-account&#xD;&#xA;cd nominated-validators-for-account&#xD;&#xA;yarn init&#xD;&#xA;touch index.js&#xD;&#xA;yarn add @polkadot/api&#xD;&#xA;npm pkg set 'scripts.start'='node index.js'&#xD;&#xA;npm pkg set 'type'='module'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Paste the following code in your terminal to add it to index.js&#xD;&#xA;```js&#xD;&#xA;cat &lt;&lt;EOT &gt;&gt; index.js&#xD;&#xA;&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;  const validators = await api.query.staking.nominators(ALICE);&#xD;&#xA;  if (validators.toJSON() &amp;&amp; validators.toJSON().hasOwnProperty(&quot;targets&quot;)) {&#xD;&#xA;    console.log(`ALICE account ${ALICE} has nominated the following validators\n\n`,&#xD;&#xA;      JSON.stringify(validators.toJSON()[&quot;targets&quot;], null, 2));&#xD;&#xA;  } else {&#xD;&#xA;    console.log(`ALICE account ${ALICE} has not nominated any validators`);&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;&#xD;&#xA;EOT&#xD;&#xA;```&#xD;&#xA;Run the program and view the output:&#xD;&#xA;```bash&#xD;&#xA;yarn start&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30607" PostHistoryTypeId="5" PostId="7781" RevisionGUID="627cf537-499f-4416-bd51-1dda58192c4e" CreationDate="2023-03-26T04:46:02.457" UserId="83" Comment="grammar" Text="Below are a couple of options of how to use the following Substrate storage query `api.query.staking.nominators(AccountId32):Option&lt;PalletStakingNominations&gt;` from the Polkadot.js API docs [here][1] to get the list of validators that have been nominated by a given nominator stash address.&#xD;&#xA;&#xD;&#xA;**Option 1:**&#xD;&#xA;&#xD;&#xA;* Go to https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/js&#xD;&#xA; * Note: Replace `wss%3A%2F%2Frpc.polkadot.io` with the WS endpoints for RPC connections of the chain they are using to nominate on&#xD;&#xA;* Paste the code snippet below, replacing the `ALICE` address with an address that is actively nominating&#xD;&#xA;* Click the play icon&#xD;&#xA;* View the output in the terminal on the right that will list the validators they have nominated.&#xD;&#xA;```js&#xD;&#xA;const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';&#xD;&#xA;const validators = await api.query.staking.nominators(ALICE);&#xD;&#xA;if (validators.toJSON() &amp;&amp; validators.toJSON().hasOwnProperty(&quot;targets&quot;)) {&#xD;&#xA;  console.log(`stash account ${ALICE} has nominated the following validators\n\n`,&#xD;&#xA;    JSON.stringify(validators.toJSON()[&quot;targets&quot;], null, 2));&#xD;&#xA;} else {&#xD;&#xA;  console.log(`stash account ${ALICE} has not nominated any validators`);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Option 2:**&#xD;&#xA;&#xD;&#xA;* Alternatively install Node.js and create a program:&#xD;&#xA;```bash&#xD;&#xA;mkdir nominated-validators-for-account&#xD;&#xA;cd nominated-validators-for-account&#xD;&#xA;yarn init&#xD;&#xA;touch index.js&#xD;&#xA;yarn add @polkadot/api&#xD;&#xA;npm pkg set 'scripts.start'='node index.js'&#xD;&#xA;npm pkg set 'type'='module'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;* Paste the following code in your terminal to add it to index.js&#xD;&#xA;  * Note: Replace `wss://rpc.polkadot.io` with the WS endpoint for RPC connections of the chain they are using to nominate on&#xD;&#xA;```js&#xD;&#xA;cat &lt;&lt;EOT &gt;&gt; index.js&#xD;&#xA;&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;  const validators = await api.query.staking.nominators(ALICE);&#xD;&#xA;  if (validators.toJSON() &amp;&amp; validators.toJSON().hasOwnProperty(&quot;targets&quot;)) {&#xD;&#xA;    console.log(`ALICE account ${ALICE} has nominated the following validators\n\n`,&#xD;&#xA;      JSON.stringify(validators.toJSON()[&quot;targets&quot;], null, 2));&#xD;&#xA;  } else {&#xD;&#xA;    console.log(`ALICE account ${ALICE} has not nominated any validators`);&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;&#xD;&#xA;EOT&#xD;&#xA;```&#xD;&#xA;Run the program and view the output:&#xD;&#xA;```bash&#xD;&#xA;yarn start&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage#nominatorsaccountid32-optionpalletstakingnominations" ContentLicense="CC BY-SA 4.0" />
  <row Id="30608" PostHistoryTypeId="2" PostId="7782" RevisionGUID="27f8f3b3-2700-4c97-8d6e-b5733951256f" CreationDate="2023-03-26T09:46:51.137" UserId="19" Text="Around one year ago I have implemented simple DEX in ink!, but today I want to migrate the code to newest `ink!` and I have an error, in the code I have:&#xD;&#xA;&#xD;&#xA;`use ink_storage::collections::HashMap;`&#xD;&#xA;&#xD;&#xA;And this line made headache. Is is possible to use `HashMap` in ink! If so, how?&#xD;&#xA;&#xD;&#xA;I know that the question could be &quot;simple&quot; for someone who writes `ink!` on daily basis, but I would say thanks for three cents of empathy and awareness that not everyone writes code in `ink!` every day. I was looking for the answer in documentation, and the link that in my humble opinion makes sense, does not work: https://paritytech.github.io/substrate/master/scale_info/prelude/collections/struct.HashMap.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="30610" PostHistoryTypeId="1" PostId="7782" RevisionGUID="27f8f3b3-2700-4c97-8d6e-b5733951256f" CreationDate="2023-03-26T09:46:51.137" UserId="19" Text="HashMap in ink! smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="30611" PostHistoryTypeId="3" PostId="7782" RevisionGUID="27f8f3b3-2700-4c97-8d6e-b5733951256f" CreationDate="2023-03-26T09:46:51.137" UserId="19" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30616" PostHistoryTypeId="33" PostId="7771" RevisionGUID="651d7839-8aa1-4068-9e82-19e7257e411b" CreationDate="2023-03-26T12:33:10.580" UserId="354" Comment="20" />
  <row Id="30617" PostHistoryTypeId="2" PostId="7784" RevisionGUID="9c492f32-1c54-4258-8dc9-3055acdb67b4" CreationDate="2023-03-26T12:54:58.297" UserId="1950" Text="I am configuring POA chain with validator set by :- https://github.com/gautamdhameja/substrate-validator-set/blob/master/docs/council-integration.md and trying to configure the collection pallet&#xD;&#xA;&#xD;&#xA;I am using polkadot branch `0.9.30`&#xD;&#xA;&#xD;&#xA;In my runtime I am trying to configure like this&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const MinAuthorities: u32 = 2;&#xD;&#xA;}&#xD;&#xA;type CouncilCollective = pallet_collective::Instance1;&#xD;&#xA;type EnsureRootOrHalfCouncil = EitherOfDiverse&lt;&#xD;&#xA;	EnsureRoot&lt;AccountId&gt;,&#xD;&#xA;	pallet_collective::EnsureProportionMoreThan&lt;AccountId, CouncilCollective, 1, 2&gt;,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;impl pallet_validator_set::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	// see readme for type declaration&#xD;&#xA;	type AddRemoveOrigin = EnsureRootOrHalfCouncil;&#xD;&#xA;	type MinAuthorities = MinAuthorities;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and in pallet_validator_set I have the following&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;//! # Validator Set Pallet&#xD;&#xA;//!&#xD;&#xA;//! The Validator Set Pallet allows addition and removal of&#xD;&#xA;//! authorities/validators via extrinsics (transaction calls), in&#xD;&#xA;//! Substrate-based PoA networks. It also integrates with the im-online pallet&#xD;&#xA;//! to automatically remove offline validators.&#xD;&#xA;//!&#xD;&#xA;//! The pallet uses the Session pallet and implements related traits for session&#xD;&#xA;//! management. Currently it uses periodic session rotation provided by the&#xD;&#xA;//! session pallet to automatically rotate sessions. For this reason, the&#xD;&#xA;//! validator addition and removal becomes effective only after 2 sessions&#xD;&#xA;//! (queuing + applying).&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;mod mock;&#xD;&#xA;mod tests;&#xD;&#xA;&#xD;&#xA;use frame_support::{&#xD;&#xA;	ensure,&#xD;&#xA;	pallet_prelude::*,&#xD;&#xA;	traits::{EstimateNextSessionRotation, Get, ValidatorSet, ValidatorSetWithIdentification, FromContainsPair},&#xD;&#xA;};&#xD;&#xA;use frame_support::log;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;pub use pallet::*;&#xD;&#xA;use sp_runtime::traits::{Convert, Zero};&#xD;&#xA;use sp_staking::offence::{Offence, OffenceError, ReportOffence};&#xD;&#xA;use sp_std::{collections::btree_set::BTreeSet, prelude::*};&#xD;&#xA;&#xD;&#xA;pub const LOG_TARGET: &amp;'static str = &quot;runtime::validator-set&quot;;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;	/// Configure the pallet by specifying the parameters and types on which it&#xD;&#xA;	/// depends.&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_session::Config {&#xD;&#xA;		/// The Event type.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		/// Origin for adding or removing a validator.&#xD;&#xA;		type AddRemoveOrigin: EnsureOrigin&lt;Self::RuntimeOrigin&gt;;&#xD;&#xA;&#xD;&#xA;		/// Minimum number of validators to leave in the validator set during&#xD;&#xA;		/// auto removal.&#xD;&#xA;		type MinAuthorities: Get&lt;u32&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	#[pallet::without_storage_info]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn flag)]&#xD;&#xA;	/// Flag to indicate to the session pallet if session should be rotated&#xD;&#xA;	pub type Flag&lt;T: Config&gt; = StorageValue&lt;_, bool&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn validators)]&#xD;&#xA;	pub type Validators&lt;T: Config&gt; = StorageValue&lt;_, Vec&lt;T::AccountId&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn approved_validators)]&#xD;&#xA;	pub type ApprovedValidators&lt;T: Config&gt; = StorageValue&lt;_, Vec&lt;T::AccountId&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn validators_to_remove)]&#xD;&#xA;	pub type OfflineValidators&lt;T: Config&gt; = StorageValue&lt;_, Vec&lt;T::AccountId&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::event]&#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		/// New validator addition initiated. Effective in ~2 sessions.&#xD;&#xA;		ValidatorAdditionInitiated(T::AccountId),&#xD;&#xA;&#xD;&#xA;		/// Validator removal initiated. Effective in ~2 sessions.&#xD;&#xA;		ValidatorRemovalInitiated(T::AccountId),&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// Errors inform users that something went wrong.&#xD;&#xA;	#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		/// Target (post-removal) validator count is below the minimum.&#xD;&#xA;		TooLowValidatorCount,&#xD;&#xA;		/// Validator is already in the validator set.&#xD;&#xA;		Duplicate,&#xD;&#xA;		/// Validator is not approved for re-addition.&#xD;&#xA;		ValidatorNotApproved,&#xD;&#xA;		/// Only the validator can add itself back after coming online.&#xD;&#xA;		BadOrigin,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {}&#xD;&#xA;&#xD;&#xA;	#[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		pub initial_validators: Vec&lt;T::AccountId&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	impl&lt;T: Config&gt; Default for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			Self { initial_validators: Default::default() }&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			Pallet::&lt;T&gt;::initialize_validators(&amp;self.initial_validators);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		/// Add a new validator.&#xD;&#xA;		///&#xD;&#xA;		/// New validator's session keys should be set in Session pallet before&#xD;&#xA;		/// calling this.&#xD;&#xA;		///&#xD;&#xA;		/// The origin can be configured using the `AddRemoveOrigin` type in the&#xD;&#xA;		/// host runtime. Can also be set to sudo/root.&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn add_validator(origin: OriginFor&lt;T&gt;, validator_id: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;			T::AddRemoveOrigin::ensure_origin(origin)?;&#xD;&#xA;&#xD;&#xA;			Self::do_add_validator(validator_id.clone())?;&#xD;&#xA;			Self::approve_validator(validator_id)?;&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		/// Remove a validator.&#xD;&#xA;		///&#xD;&#xA;		/// The origin can be configured using the `AddRemoveOrigin` type in the&#xD;&#xA;		/// host runtime. Can also be set to sudo/root.&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn remove_validator(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			validator_id: T::AccountId,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			T::AddRemoveOrigin::ensure_origin(origin)?;&#xD;&#xA;&#xD;&#xA;			Self::do_remove_validator(validator_id.clone())?;&#xD;&#xA;			Self::unapprove_validator(validator_id)?;&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		/// Add an approved validator again when it comes back online.&#xD;&#xA;		///&#xD;&#xA;		/// For this call, the dispatch origin must be the validator itself.&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn add_validator_again(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			validator_id: T::AccountId,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;			ensure!(who == validator_id, Error::&lt;T&gt;::BadOrigin);&#xD;&#xA;&#xD;&#xA;			let approved_set: BTreeSet&lt;_&gt; = &lt;ApprovedValidators&lt;T&gt;&gt;::get().into_iter().collect();&#xD;&#xA;			ensure!(approved_set.contains(&amp;validator_id), Error::&lt;T&gt;::ValidatorNotApproved);&#xD;&#xA;&#xD;&#xA;			Self::do_add_validator(validator_id)?;&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;	fn initialize_validators(validators: &amp;[T::AccountId]) {&#xD;&#xA;&#xD;&#xA;		assert!(validators.len() as u32 &gt;= T::MinAuthorities::get(), &quot;Initial set of validators must be at least T::MinAuthorities&quot;);&#xD;&#xA;		assert!(&lt;Validators&lt;T&gt;&gt;::get().is_empty(), &quot;Validators are already initialized!&quot;);&#xD;&#xA;&#xD;&#xA;		&lt;Validators&lt;T&gt;&gt;::put(validators);&#xD;&#xA;		&lt;ApprovedValidators&lt;T&gt;&gt;::put(validators);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn do_add_validator(validator_id: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;		let validator_set: BTreeSet&lt;_&gt; = &lt;Validators&lt;T&gt;&gt;::get().into_iter().collect();&#xD;&#xA;		ensure!(!validator_set.contains(&amp;validator_id), Error::&lt;T&gt;::Duplicate);&#xD;&#xA;		&lt;Validators&lt;T&gt;&gt;::mutate(|v| v.push(validator_id.clone()));&#xD;&#xA;&#xD;&#xA;		Self::deposit_event(Event::ValidatorAdditionInitiated(validator_id.clone()));&#xD;&#xA;		log::debug!(target: LOG_TARGET, &quot;Validator addition initiated.&quot;);&#xD;&#xA;&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn do_remove_validator(validator_id: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;		let mut validators = &lt;Validators&lt;T&gt;&gt;::get();&#xD;&#xA;&#xD;&#xA;		// Ensuring that the post removal, target validator count doesn't go&#xD;&#xA;		// below the minimum.&#xD;&#xA;		ensure!(&#xD;&#xA;			validators.len().saturating_sub(1) as u32 &gt;= T::MinAuthorities::get(),&#xD;&#xA;			Error::&lt;T&gt;::TooLowValidatorCount&#xD;&#xA;		);&#xD;&#xA;&#xD;&#xA;		validators.retain(|v| *v != validator_id);&#xD;&#xA;&#xD;&#xA;		&lt;Validators&lt;T&gt;&gt;::put(validators);&#xD;&#xA;&#xD;&#xA;		Self::deposit_event(Event::ValidatorRemovalInitiated(validator_id.clone()));&#xD;&#xA;		log::debug!(target: LOG_TARGET, &quot;Validator removal initiated.&quot;);&#xD;&#xA;&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn approve_validator(validator_id: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;		let approved_set: BTreeSet&lt;_&gt; = &lt;ApprovedValidators&lt;T&gt;&gt;::get().into_iter().collect();&#xD;&#xA;		ensure!(!approved_set.contains(&amp;validator_id), Error::&lt;T&gt;::Duplicate);&#xD;&#xA;		&lt;ApprovedValidators&lt;T&gt;&gt;::mutate(|v| v.push(validator_id.clone()));&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn unapprove_validator(validator_id: T::AccountId) -&gt; DispatchResult {&#xD;&#xA;		let mut approved_set = &lt;ApprovedValidators&lt;T&gt;&gt;::get();&#xD;&#xA;		approved_set.retain(|v| *v != validator_id);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// Adds offline validators to a local cache for removal at new session.&#xD;&#xA;	fn mark_for_removal(validator_id: T::AccountId) {&#xD;&#xA;		&lt;OfflineValidators&lt;T&gt;&gt;::mutate(|v| v.push(validator_id));&#xD;&#xA;		log::debug!(target: LOG_TARGET, &quot;Offline validator marked for auto removal.&quot;);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// Removes offline validators from the validator set and clears the offline&#xD;&#xA;	// cache. It is called in the session change hook and removes the validators&#xD;&#xA;	// who were reported offline during the session that is ending. We do not&#xD;&#xA;	// check for `MinAuthorities` here, because the offline validators will not&#xD;&#xA;	// produce blocks and will have the same overall effect on the runtime.&#xD;&#xA;	fn remove_offline_validators() {&#xD;&#xA;		let validators_to_remove: BTreeSet&lt;_&gt; = &lt;OfflineValidators&lt;T&gt;&gt;::get().into_iter().collect();&#xD;&#xA;&#xD;&#xA;		// Delete from active validator set.&#xD;&#xA;		&lt;Validators&lt;T&gt;&gt;::mutate(|vs| vs.retain(|v| !validators_to_remove.contains(v)));&#xD;&#xA;		log::debug!(&#xD;&#xA;			target: LOG_TARGET,&#xD;&#xA;			&quot;Initiated removal of {:?} offline validators.&quot;,&#xD;&#xA;			validators_to_remove.len()&#xD;&#xA;		);&#xD;&#xA;&#xD;&#xA;		// Clear the offline validator list to avoid repeated deletion.&#xD;&#xA;		&lt;OfflineValidators&lt;T&gt;&gt;::put(Vec::&lt;T::AccountId&gt;::new());&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Provides the new set of validators to the session module when session is&#xD;&#xA;// being rotated.&#xD;&#xA;impl&lt;T: Config&gt; pallet_session::SessionManager&lt;T::AccountId&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	// Plan a new session and provide new validator set.&#xD;&#xA;	fn new_session(_new_index: u32) -&gt; Option&lt;Vec&lt;T::AccountId&gt;&gt; {&#xD;&#xA;		// Remove any offline validators. This will only work when the runtime&#xD;&#xA;		// also has the im-online pallet.&#xD;&#xA;		Self::remove_offline_validators();&#xD;&#xA;&#xD;&#xA;		log::debug!(target: LOG_TARGET, &quot;New session called; updated validator set provided.&quot;);&#xD;&#xA;&#xD;&#xA;		Some(Self::validators())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn end_session(_end_index: u32) {}&#xD;&#xA;&#xD;&#xA;	fn start_session(_start_index: u32) {}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; EstimateNextSessionRotation&lt;T::BlockNumber&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	fn average_session_length() -&gt; T::BlockNumber {&#xD;&#xA;		Zero::zero()&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn estimate_current_session_progress(&#xD;&#xA;		_now: T::BlockNumber,&#xD;&#xA;	) -&gt; (Option&lt;sp_runtime::Permill&gt;, frame_support::dispatch::Weight) {&#xD;&#xA;		(None, Zero::zero())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn estimate_next_session_rotation(&#xD;&#xA;		_now: T::BlockNumber,&#xD;&#xA;	) -&gt; (Option&lt;T::BlockNumber&gt;, frame_support::dispatch::Weight) {&#xD;&#xA;		(None, Zero::zero())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Implementation of Convert trait for mapping ValidatorId with AccountId.&#xD;&#xA;pub struct ValidatorOf&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Convert&lt;T::ValidatorId, Option&lt;T::ValidatorId&gt;&gt; for ValidatorOf&lt;T&gt; {&#xD;&#xA;	fn convert(account: T::ValidatorId) -&gt; Option&lt;T::ValidatorId&gt; {&#xD;&#xA;		Some(account)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; ValidatorSet&lt;T::AccountId&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	type ValidatorId = T::ValidatorId;&#xD;&#xA;	type ValidatorIdOf = T::ValidatorIdOf;&#xD;&#xA;&#xD;&#xA;	fn session_index() -&gt; sp_staking::SessionIndex {&#xD;&#xA;		pallet_session::Pallet::&lt;T&gt;::current_index()&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn validators() -&gt; Vec&lt;Self::ValidatorId&gt; {&#xD;&#xA;		pallet_session::Pallet::&lt;T&gt;::validators()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; ValidatorSetWithIdentification&lt;T::AccountId&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	type Identification = T::ValidatorId;&#xD;&#xA;	type IdentificationOf = ValidatorOf&lt;T&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Offence reporting and unresponsiveness management.&#xD;&#xA;impl&lt;T: Config, O: Offence&lt;(T::AccountId, T::AccountId)&gt;&gt;&#xD;&#xA;ReportOffence&lt;T::AccountId, (T::AccountId, T::AccountId), O&gt; for Pallet&lt;T&gt;&#xD;&#xA;{&#xD;&#xA;	fn report_offence(_reporters: Vec&lt;T::AccountId&gt;, offence: O) -&gt; Result&lt;(), OffenceError&gt; {&#xD;&#xA;		let offenders = offence.offenders();&#xD;&#xA;&#xD;&#xA;		for (v, _) in offenders.into_iter() {&#xD;&#xA;			Self::mark_for_removal(v);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn is_known_offence(&#xD;&#xA;		_offenders: &amp;[(T::AccountId, T::AccountId)],&#xD;&#xA;		_time_slot: &amp;O::TimeSlot,&#xD;&#xA;	) -&gt; bool {&#xD;&#xA;		false&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; pallet_session::ShouldEndSession&lt;T::BlockNumber&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	fn should_end_session(_now: T::BlockNumber) -&gt; bool {&#xD;&#xA;		Self::flag().unwrap_or(false)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I try to compile the code I am getting following error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type AddRemoveOrigin = EnsureRootOrHalfCouncil;&#xD;&#xA;      |                            ^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;RuntimeOrigin&gt;` is not implemented for `Result&lt;pallet_collective::RawOrigin&lt;AccountId32, Instance1&gt;, RuntimeOrigin&gt;`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and I cannot configure this &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type EnsureRootOrHalfCouncil = EnsureOneOf&lt;&#xD;&#xA;	AccountId,&#xD;&#xA;	EnsureRoot&lt;AccountId&gt;,&#xD;&#xA;	pallet_collective::EnsureProportionAtLeast&lt;1, 2, AccountId&gt;&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and seems its depreciated &#xD;&#xA;&#xD;&#xA;How to configure collection pallet for validator_set and fix this  error?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30619" PostHistoryTypeId="1" PostId="7784" RevisionGUID="9c492f32-1c54-4258-8dc9-3055acdb67b4" CreationDate="2023-03-26T12:54:58.297" UserId="1950" Text="Substrate POA and Validator Set and pallet_collection configuration error the trait `From&lt;RuntimeOrigin&gt;` not implemented" ContentLicense="CC BY-SA 4.0" />
  <row Id="30620" PostHistoryTypeId="3" PostId="7784" RevisionGUID="9c492f32-1c54-4258-8dc9-3055acdb67b4" CreationDate="2023-03-26T12:54:58.297" UserId="1950" Text="|validator-set|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30621" PostHistoryTypeId="2" PostId="7785" RevisionGUID="ef79dcb2-091a-44f8-8ba1-b78773a66f4d" CreationDate="2023-03-26T23:18:57.440" UserId="1950" Text="PolkadotJS version 0.9.30&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Vvxpl.png&#xD;&#xA;&#xD;&#xA;Im following following tutorial https://github.com/gautamdhameja/substrate-validator-set/blob/polkadot-v0.9.30/docs/council-integration.md and getting  the following error when submitting keys &#xD;&#xA;&#xD;&#xA;How to fix this error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30623" PostHistoryTypeId="1" PostId="7785" RevisionGUID="ef79dcb2-091a-44f8-8ba1-b78773a66f4d" CreationDate="2023-03-26T23:18:57.440" UserId="1950" Text="Error submitting setKeys function in POA chain using polkadotJS" ContentLicense="CC BY-SA 4.0" />
  <row Id="30624" PostHistoryTypeId="3" PostId="7785" RevisionGUID="ef79dcb2-091a-44f8-8ba1-b78773a66f4d" CreationDate="2023-03-26T23:18:57.440" UserId="1950" Text="|validator|poa|validator-set|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30625" PostHistoryTypeId="5" PostId="7777" RevisionGUID="3f01c557-2815-4ca9-b773-52e45de3c6ab" CreationDate="2023-03-26T23:43:13.700" UserId="83" Comment="make more readable" Text="I was following along with this tutorial to run a polkadot relay chain and connect a substrate parachain to it. &#xD;&#xA;&#xD;&#xA;I wonder, it there is a docker image available? so that we can spin a substrate parachain node connected to a polkadot relay chain with just one docker command. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30626" PostHistoryTypeId="2" PostId="7786" RevisionGUID="06b38fe6-ec52-4acd-aaa5-c527fcf6d9a7" CreationDate="2023-03-26T23:53:05.987" UserId="3346" Text="We are using a clone of the Polkadot-JS/apps. Our users will need to have several contracts loaded to the UI in order to use the apps. We want our users to be able to add an existing contract to their UI without having to locate the file, drag and drop, etc. **In a perfect world, we would love to have one button that auto-uploads the contract to the UI**... but until we can figure that out... &#xD;&#xA;&#xD;&#xA;Is there a way to pre-populate the metadata.json file in the modal used to add an existing contract? We have a button that says &quot;load the app&quot; which brings up a modal from Add.tsx to process the contract and add it to the UI. &#xD;&#xA;&#xD;&#xA;We have narrowed it down to the InputFile.tsx file that governs the Dropzone in that modal. We plant to have the metadata.json local to the UI files. Is there a way to set the default file in the Dropzone? Here is the current file code...&#xD;&#xA;&#xD;&#xA;    // Copyright 2017-2023 @polkadot/react-components authors &amp; contributors&#xD;&#xA;    // SPDX-License-Identifier: Apache-2.0&#xD;&#xA;    &#xD;&#xA;    import React, { createRef, useCallback, useState } from 'react';&#xD;&#xA;    import Dropzone, { DropzoneRef } from 'react-dropzone';&#xD;&#xA;    import styled from 'styled-components';&#xD;&#xA;    &#xD;&#xA;    import { formatNumber, hexToU8a, isHex, u8aToString } from '@polkadot/util';&#xD;&#xA;    &#xD;&#xA;    import Labelled from './Labelled';&#xD;&#xA;    import { useTranslation } from './translate';&#xD;&#xA;    &#xD;&#xA;    export interface InputFilePropsBase {&#xD;&#xA;      className?: string;&#xD;&#xA;      clearContent?: boolean;&#xD;&#xA;      isDisabled?: boolean;&#xD;&#xA;      isError?: boolean;&#xD;&#xA;      isFull?: boolean;&#xD;&#xA;      label: React.ReactNode;&#xD;&#xA;      labelExtra?: React.ReactNode;&#xD;&#xA;      placeholder?: React.ReactNode | null | false;&#xD;&#xA;      withEllipsis?: boolean;&#xD;&#xA;      withLabel?: boolean;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    export interface InputFileProps extends InputFilePropsBase {&#xD;&#xA;      // Reference Example Usage: https://github.com/react-dropzone/react-dropzone/tree/master/examples/Accept&#xD;&#xA;      // i.e. MIME types: 'application/json, text/plain', or '.json, .txt'&#xD;&#xA;      accept?: string;&#xD;&#xA;      onChange?: (contents: Uint8Array, name: string) =&gt; void;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    interface FileState {&#xD;&#xA;      name: string;&#xD;&#xA;      size: number;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const BYTE_STR_0 = '0'.charCodeAt(0);&#xD;&#xA;    const BYTE_STR_X = 'x'.charCodeAt(0);&#xD;&#xA;    const STR_NL = '\n';&#xD;&#xA;    const NOOP = (): void =&gt; undefined;&#xD;&#xA;    &#xD;&#xA;    function convertResult (result: ArrayBuffer): Uint8Array {&#xD;&#xA;      const data = new Uint8Array(result);&#xD;&#xA;    &#xD;&#xA;      // this converts the input (if detected as hex), via the hex conversion route&#xD;&#xA;      if (data[0] === BYTE_STR_0 &amp;&amp; data[1] === BYTE_STR_X) {&#xD;&#xA;        let hex = u8aToString(data);&#xD;&#xA;    &#xD;&#xA;        while (hex[hex.length - 1] === STR_NL) {&#xD;&#xA;          hex = hex.substring(0, hex.length - 1);&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        if (isHex(hex)) {&#xD;&#xA;          return hexToU8a(hex);&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      return data;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function InputFile ({ accept, className = '', clearContent, isDisabled, isError = false, isFull, label, labelExtra, onChange, placeholder, withEllipsis, withLabel }: InputFileProps): React.ReactElement&lt;InputFileProps&gt; {&#xD;&#xA;      const { t } = useTranslation();&#xD;&#xA;      const dropRef = createRef&lt;DropzoneRef&gt;();&#xD;&#xA;      const [file, setFile] = useState&lt;FileState | undefined&gt;();&#xD;&#xA;    &#xD;&#xA;      const _onDrop = useCallback(&#xD;&#xA;        (files: File[]): void =&gt; {&#xD;&#xA;          files.forEach((file): void =&gt; {&#xD;&#xA;            const reader = new FileReader();&#xD;&#xA;    &#xD;&#xA;            reader.onabort = NOOP;&#xD;&#xA;            reader.onerror = NOOP;&#xD;&#xA;    &#xD;&#xA;            reader.onload = ({ target }: ProgressEvent&lt;FileReader&gt;): void =&gt; {&#xD;&#xA;              if (target &amp;&amp; target.result) {&#xD;&#xA;                const name = file.name;&#xD;&#xA;                const data = convertResult(target.result as ArrayBuffer);&#xD;&#xA;    &#xD;&#xA;                onChange &amp;&amp; onChange(data, name);&#xD;&#xA;                dropRef &amp;&amp; setFile({&#xD;&#xA;                  name,&#xD;&#xA;                  size: data.length&#xD;&#xA;                });&#xD;&#xA;              }&#xD;&#xA;            };&#xD;&#xA;    &#xD;&#xA;            reader.readAsArrayBuffer(file);&#xD;&#xA;          });&#xD;&#xA;        },&#xD;&#xA;        [dropRef, onChange]&#xD;&#xA;      );&#xD;&#xA;    &#xD;&#xA;      const dropZone = (&#xD;&#xA;        &lt;Dropzone&#xD;&#xA;          accept={accept}&#xD;&#xA;          disabled={isDisabled}&#xD;&#xA;          multiple={false}&#xD;&#xA;          onDrop={_onDrop}&#xD;&#xA;          ref={dropRef}&#xD;&#xA;        &gt;&#xD;&#xA;          {({ getInputProps, getRootProps }): JSX.Element =&gt; (&#xD;&#xA;            &lt;StyledDiv {...getRootProps({ className: `${className} ui--InputFile ${isError ? 'error' : ''}` })}&gt;&#xD;&#xA;              &lt;input {...getInputProps()} /&gt;&#xD;&#xA;              &lt;em className='label'&gt;&#xD;&#xA;                {&#xD;&#xA;                  !file || clearContent&#xD;&#xA;                    ? placeholder || t&lt;string&gt;('click to select or drag and drop the file here')&#xD;&#xA;                    : placeholder || t&lt;string&gt;('{{name}} ({{size}} bytes)', {&#xD;&#xA;                      replace: {&#xD;&#xA;                        name: file.name,&#xD;&#xA;                        size: formatNumber(file.size)&#xD;&#xA;                      }&#xD;&#xA;                    })&#xD;&#xA;                }&#xD;&#xA;              &lt;/em&gt;&#xD;&#xA;            &lt;/StyledDiv&gt;&#xD;&#xA;          )}&#xD;&#xA;        &lt;/Dropzone&gt;&#xD;&#xA;      );&#xD;&#xA;    &#xD;&#xA;      return label&#xD;&#xA;        ? (&#xD;&#xA;          &lt;Labelled&#xD;&#xA;            isFull={isFull}&#xD;&#xA;            label={label}&#xD;&#xA;            labelExtra={labelExtra}&#xD;&#xA;            withEllipsis={withEllipsis}&#xD;&#xA;            withLabel={withLabel}&#xD;&#xA;          &gt;&#xD;&#xA;            {dropZone}&#xD;&#xA;          &lt;/Labelled&gt;&#xD;&#xA;        )&#xD;&#xA;        : dropZone;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    const StyledDiv = styled.div`&#xD;&#xA;      background: var(--bg-input);&#xD;&#xA;      border: 1px solid var(--border-input);&#xD;&#xA;      border-radius: 0.28571429rem;&#xD;&#xA;      font-size: var(--font-size-base);&#xD;&#xA;      margin: 0.25rem 0;&#xD;&#xA;      padding: 0.67857143em 1em;&#xD;&#xA;      width: 100% !important;&#xD;&#xA;    &#xD;&#xA;      &amp;.error {&#xD;&#xA;        background: var(--bg-input-error);&#xD;&#xA;        border-color: #e0b4b4;&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      &amp;:hover {&#xD;&#xA;        cursor: pointer;&#xD;&#xA;      }&#xD;&#xA;    `;&#xD;&#xA;    &#xD;&#xA;    export default React.memo(InputFile);&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30628" PostHistoryTypeId="1" PostId="7786" RevisionGUID="06b38fe6-ec52-4acd-aaa5-c527fcf6d9a7" CreationDate="2023-03-26T23:53:05.987" UserId="3346" Text="Auto-upload Contracts To UI OR Pre-Populate Dropzone In Modal For Adding Contracts on Polkadot-JS/apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="30629" PostHistoryTypeId="3" PostId="7786" RevisionGUID="06b38fe6-ec52-4acd-aaa5-c527fcf6d9a7" CreationDate="2023-03-26T23:53:05.987" UserId="3346" Text="|polkadot-js|ink|contracts|ui|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30630" PostHistoryTypeId="2" PostId="7787" RevisionGUID="110e99bf-1cf9-4901-8cbb-880addf997b9" CreationDate="2023-03-27T00:48:55.717" UserId="83" Text="According to [this article][1] it says that the &quot;_validator election algorithm will **rotate** your stake among those validators on a **per-era basis**, so you may have a **different active validator** amongst your selected validators for each era, but you cannot choose which specific validator you will be actively nominating in a given era unless you are nominating just one validator_&quot; (the 'active' validator).&#xD;&#xA;&#xD;&#xA;It says that &quot;_unless you are staking with a **considerable amount**, you will be nominating a **single** validator in **each era** with your **full stake**_&quot;. This indicates that it might be possible to nominate more than one validator at a time in each era, such that they'd both be shown as 'active', but only if you were to try nominating with a considerable amount (a considerable amount that is larger than just 1000 5IRE). Otherwise, if 1000 5IRE isn't considered a considerable amount, then you will only be nominating a single validator that would be 'active' in each era with your full stake of 1000 5IRE.&#xD;&#xA;&#xD;&#xA;If you nominated both of the validators with an amount that isn't considered a considerable amount then each era you will be actively nominating only a **single** validator with your full stake, so only one of them would be 'active', whilst the other one would be 'inactive'. Since you didn't nominate only one validator, you nominated both of them, the validator election algorithm will rotate your stake among those validators each era, so you may have a different 'active' validator each era. If you wait until a subsequent era do they rotate such that the 'active' validator becomes 'inactive' (whilst the 'inactive' validator becomes 'active')?&#xD;&#xA;&#xD;&#xA;It also says that 'inactive' validators &quot;_are in the active validator set and your list of nominations. However, you are not actively nominating them for this era (they are not active for you)_&quot;. So the reason why one of your validators is 'inactive' in that era is because you are not actively nominating them for that era.&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000169209-what-does-active-inactive-waiting-mean-" ContentLicense="CC BY-SA 4.0" />
  <row Id="30632" PostHistoryTypeId="5" PostId="7771" RevisionGUID="db88cc03-6dd9-4118-ac83-f84886eec0c2" CreationDate="2023-03-27T00:54:16.697" UserId="83" Comment="fix question" Text="I am running a substrate based chain and tried to nominate 2 validators which were in the active state but it is only nominating one validator and showing an inactive status for the other validator. Can anyone help with this?&#xD;&#xA;&#xD;&#xA;Nominator&#xD;&#xA;[![nominator][1]][1]&#xD;&#xA;&#xD;&#xA;Validators&#xD;&#xA;[![validators][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aA9wA.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ESyuf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30633" PostHistoryTypeId="4" PostId="7771" RevisionGUID="db88cc03-6dd9-4118-ac83-f84886eec0c2" CreationDate="2023-03-27T00:54:16.697" UserId="83" Comment="fix question" Text="Unable to nominate more than one validator" ContentLicense="CC BY-SA 4.0" />
  <row Id="30634" PostHistoryTypeId="2" PostId="7788" RevisionGUID="6059c466-4ce5-49b2-b48c-81f19629fec9" CreationDate="2023-03-27T02:18:24.797" UserId="3252" Text="1. The transaction like this  : https://polkadot.subscan.io/extrinsic/14760951-1?event=14760951-43 ,&#xD;&#xA;2. I want to get this information is as follows:&#xD;&#xA;(1)from and to account address,&#xD;&#xA;(2)the transfer money,&#xD;&#xA;(3)the thansfer fee,&#xD;&#xA;(4)the thansfer signature,&#xD;&#xA;(5)the thansfer status: success or failed?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30636" PostHistoryTypeId="1" PostId="7788" RevisionGUID="6059c466-4ce5-49b2-b48c-81f19629fec9" CreationDate="2023-03-27T02:18:24.797" UserId="3252" Text="How to use polkadotJs to parse the &quot;aca to dot&quot; bridge transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30637" PostHistoryTypeId="3" PostId="7788" RevisionGUID="6059c466-4ce5-49b2-b48c-81f19629fec9" CreationDate="2023-03-27T02:18:24.797" UserId="3252" Text="|polkadot|chainbridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30638" PostHistoryTypeId="2" PostId="7789" RevisionGUID="a73375f8-d6b3-4eac-a619-fbaeabc7a055" CreationDate="2023-03-27T02:38:25.497" UserId="83" Text="Based on the Polkadot.js API [source code][1] you may access the list of keys from the current authority set using the following code:&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;  let authorities = await api._rx.call.authorityDiscoveryApi.authorities().toPromise();&#xD;&#xA;  console.log('authorities: ', authorities.toJSON());&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or just go to https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/js, paste the following, and click the play icon to view the output on the right.&#xD;&#xA;```js&#xD;&#xA;console.log((await api._rx.call.authorityDiscoveryApi.authorities().toPromise()).toJSON());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The previously available function `api.query.authorityDiscovery` appears to have now been removed and replaced with that Runtime call. The [documentation][2] is open-source and the Storage section doesn't appear to have been updated yet, but it does include `api._rx.call.authorityDiscoveryApi` in the Runtime section [here][3].&#xD;&#xA;For example, if you go to https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/runtime, and choose endpoint `authorityDiscoveryApi` and `authorities()`, then click button 'Submit Runtime call', it will output the list of keys from the current authority set.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api&#xD;&#xA;  [2]: https://github.com/polkadot-js/docs&#xD;&#xA;  [3]: https://polkadot.js.org/docs/substrate/runtime#authoritydiscoveryapi" ContentLicense="CC BY-SA 4.0" />
  <row Id="30640" PostHistoryTypeId="5" PostId="7789" RevisionGUID="fce3d6ef-ceaf-4b4e-8f5c-dc6c7c69e2c4" CreationDate="2023-03-27T02:57:26.757" UserId="83" Comment="update since _rx and toPromise() isn't necessary" Text="Based on the Polkadot.js API [source code][1] you may access the list of keys from the current authority set using the following code:&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;async function main () {&#xD;&#xA;  const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;  let authorities = await api.call.authorityDiscoveryApi.authorities();&#xD;&#xA;  console.log('authorities: ', authorities.toJSON());&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or just go to https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/js, paste the following, and click the play icon to view the output on the right.&#xD;&#xA;```js&#xD;&#xA;console.log((await api.call.authorityDiscoveryApi.authorities()).toJSON());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The previously available function `api.query.authorityDiscovery` appears to have now been removed and replaced with that Runtime call. The [documentation][2] is open-source and the Storage section doesn't appear to have been updated yet, but it does include `api.call.authorityDiscoveryApi` in the Runtime section [here][3].&#xD;&#xA;For example, if you go to https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/runtime, and choose endpoint `authorityDiscoveryApi` and `authorities()`, then click button 'Submit Runtime call', it will output the list of keys from the current authority set.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api&#xD;&#xA;  [2]: https://github.com/polkadot-js/docs&#xD;&#xA;  [3]: https://polkadot.js.org/docs/substrate/runtime#authoritydiscoveryapi" ContentLicense="CC BY-SA 4.0" />
  <row Id="30641" PostHistoryTypeId="5" PostId="7788" RevisionGUID="e0b6163d-536b-4d2b-ad48-f498b7c94bfd" CreationDate="2023-03-27T03:37:33.020" UserId="83" Comment="clean a bit" Text="1. The transaction is like this: https://polkadot.subscan.io/extrinsic/14760951-1?event=14760951-43 ,&#xD;&#xA;2. I want to get information as follows:&#xD;&#xA;(1) from and to account address,&#xD;&#xA;(2) the transfer money,&#xD;&#xA;(3) the transfer fee,&#xD;&#xA;(4) the transfer signature,&#xD;&#xA;(5) the transfer status: success or failed?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30642" PostHistoryTypeId="4" PostId="7788" RevisionGUID="e0b6163d-536b-4d2b-ad48-f498b7c94bfd" CreationDate="2023-03-27T03:37:33.020" UserId="83" Comment="clean a bit" Text="How to use Polkadot.js to parse the &quot;aca to dot&quot; bridge transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30643" PostHistoryTypeId="6" PostId="7768" RevisionGUID="2c78236f-6588-48cb-9439-e8cf2c5abc8d" CreationDate="2023-03-27T06:22:51.180" UserId="2213" Comment="substrate-contracts-node is something unrelated to those pallets." Text="|evm|nft|poa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30644" PostHistoryTypeId="24" PostId="7768" RevisionGUID="2c78236f-6588-48cb-9439-e8cf2c5abc8d" CreationDate="2023-03-27T06:22:51.180" Comment="Proposed by 2213 approved by 227, 3752 edit id of 394" ContentLicense="CC BY-SA 4.0" />
  <row Id="30645" PostHistoryTypeId="2" PostId="7790" RevisionGUID="06d738c3-464c-4f5f-8fc2-e61bdb97436a" CreationDate="2023-03-27T06:32:00.167" UserId="227" Text="We had to remove `HashMap` in with 3.0 unfortunately ([context here](https://github.com/paritytech/ink/releases/tag/v3.0.0-rc9)).&#xD;&#xA;&#xD;&#xA;It was instead replaced with the simpler [`ink::storage::Mapping`](https://paritytech.github.io/ink/ink_storage/struct.Mapping.html). You should be able to have the same functionality with this data structure. If not, please create a GitHub issue or another StackExchange question.&#xD;&#xA;&#xD;&#xA;The main reason for removing `HashMap` was that it required complex code and we found that this overhead bloated the complied contract size to a level where it was not economical anymore to deploy or use these contracts.&#xD;&#xA;&#xD;&#xA;You might encounter other issues with upgrading from 3.x to 4.0. We've written [this migration guide](https://use.ink/faq/migrating-from-ink-3-to-4).&#xD;&#xA;&#xD;&#xA;From your question I gather that you might be using some beta or release candidate of 3.0, so it might be that there is something missing in the migration guide then. If you encounter more issues, please just create a another question here or a GitHub issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="30647" PostHistoryTypeId="6" PostId="7774" RevisionGUID="5803e3eb-4ea8-49e3-b3be-9cf04aa53621" CreationDate="2023-03-27T06:33:45.453" UserId="227" Comment="edited tags" Text="|ink|smart-contract|substrate-contracts-node|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30648" PostHistoryTypeId="5" PostId="7771" RevisionGUID="127c2697-ddd3-4d3a-a0c7-a6174de1f156" CreationDate="2023-03-27T06:59:40.130" UserId="354" Comment="added 321 characters in body" Text="I am running a substrate based chain and tried to nominate 2 validators which were in the active state but it is only nominating one validator and showing an inactive status for the other validator. Can anyone help with this?&#xD;&#xA;&#xD;&#xA;Nominator&#xD;&#xA;[![nominator][1]][1]&#xD;&#xA;&#xD;&#xA;Validators&#xD;&#xA;[![validators][2]][2]&#xD;&#xA;&#xD;&#xA;------------EDIT--------------&#xD;&#xA;&#xD;&#xA;**Observations:**&#xD;&#xA;&#xD;&#xA; - After waiting for many eras status of validators does not change.&#xD;&#xA; - Increased the staking amount but still validating a single validator only.&#xD;&#xA; - Algorithm is only selecting one validator per nominator for every era, even after nominating multiple validator.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aA9wA.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ESyuf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30649" PostHistoryTypeId="2" PostId="7791" RevisionGUID="07269db1-f0ad-44e6-8c63-c59994a6e04e" CreationDate="2023-03-27T07:14:30.043" UserId="4011" Text="So far it looks like `polkadot.js/api` supports ECDSA signatures, but the polkadot.js extension doesn't expose a method to use ECDSA:&#xD;&#xA;- https://substrate.stackexchange.com/questions/3213/how-to-sign-a-message-using-ecdsa-key-pairs-in-polkadot-js-so-it-can-be-verified&#xD;&#xA;- https://polkadot.js.org/docs/extension/cookbook#sign-a-message" ContentLicense="CC BY-SA 4.0" />
  <row Id="30651" PostHistoryTypeId="1" PostId="7791" RevisionGUID="07269db1-f0ad-44e6-8c63-c59994a6e04e" CreationDate="2023-03-27T07:14:30.043" UserId="4011" Text="Does polkadot.js extension expose a method for signing using ECDSA?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30652" PostHistoryTypeId="3" PostId="7791" RevisionGUID="07269db1-f0ad-44e6-8c63-c59994a6e04e" CreationDate="2023-03-27T07:14:30.043" UserId="4011" Text="|polkadot-js|polkadot-js-extension|ecdsa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30653" PostHistoryTypeId="2" PostId="7792" RevisionGUID="c476c699-b8dd-42dc-a18c-cba24a512445" CreationDate="2023-03-27T07:15:57.817" UserId="3096" Text="I am trying to add a system parachain, I am able to register parathread and slots are leased but the blocks are not being finalized.&#xD;&#xA;Call for registering system parachain - [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;parathread registered - [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Terminal - [![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6jAFU.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/HNSOy.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/HahLl.png&#xD;&#xA;&#xD;&#xA;Is this the way the right way to add system parachain?&#xD;&#xA;If yes where I am wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30655" PostHistoryTypeId="1" PostId="7792" RevisionGUID="c476c699-b8dd-42dc-a18c-cba24a512445" CreationDate="2023-03-27T07:15:57.817" UserId="3096" Text="Trying to add System Parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="30656" PostHistoryTypeId="3" PostId="7792" RevisionGUID="c476c699-b8dd-42dc-a18c-cba24a512445" CreationDate="2023-03-27T07:15:57.817" UserId="3096" Text="|parachain|substrate-parachain-template|parachain-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30657" PostHistoryTypeId="2" PostId="7793" RevisionGUID="c425e2dc-e822-4463-9e4a-ac76f46d2a0e" CreationDate="2023-03-27T07:33:27.963" UserId="4005" Text="Context: I'm experimenting with an H160-address based substrate and I'm doing it from scratch (it's not a moon* or frontier template fork).&#xD;&#xA;&#xD;&#xA;It's reasonably trivial to make changes to the substrate backend to make it work with the ethereum-style addresses (it's really two lines changed sans extra uses). However, no client is actually able to perform transactions against such a blockchain.&#xD;&#xA;&#xD;&#xA;It boils down to SCALE not having enough information in its metadata. For polkadot.js one could add extra types in the web ui, but for something like the python client you're basically stuck, as it [vendors in](https://github.com/polkascan/py-scale-codec/blob/master/scalecodec/type_registry/__init__.py) the type extensions for various networks.&#xD;&#xA;&#xD;&#xA;Why is this an issue at all? Why can't moonbase return the 'address' type in its metadata to say that it's an `EthereumAddress` and `EthereumAddress` is `H160` (which is a base type and clients are supposed to know it)?&#xD;&#xA;&#xD;&#xA;Unless I'm missing something, that means that if I want to roll out my own substrate chain (be it H160 address based or, say, 16 bytes based UUID), it means that I will have to update every single substrate client for it to know that on the 'uuidchain' it needs to use this weird type.&#xD;&#xA;&#xD;&#xA;Isn't the whole point of the chain metadata to tell these details to the clients? What am I missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30659" PostHistoryTypeId="1" PostId="7793" RevisionGUID="c425e2dc-e822-4463-9e4a-ac76f46d2a0e" CreationDate="2023-03-27T07:33:27.963" UserId="4005" Text="Why do clients have to hardcode the extra types in the registry?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30660" PostHistoryTypeId="3" PostId="7793" RevisionGUID="c425e2dc-e822-4463-9e4a-ac76f46d2a0e" CreationDate="2023-03-27T07:33:27.963" UserId="4005" Text="|scale-codec|metadata|ethereum|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30661" PostHistoryTypeId="2" PostId="7794" RevisionGUID="11b15ea4-4fca-409c-ac7b-db2796c3ab05" CreationDate="2023-03-27T08:00:35.230" UserId="2478" Text="No you cannot just use polkadot.js Add.tsx it depends upon internal @polkadot/react-hooks package which requires complete setup with all the networks. Why not use simple @polkadot/api-contract to setup your dapp.&#xD;&#xA;&#xD;&#xA;Sample code is given here: https://github.com/swanky-dapps/wasm-lottery/blob/master/src/Home.tsx&#xD;&#xA;&#xD;&#xA;    const abi = new Abi(ABI, api.registry.getChainProperties())&#xD;&#xA;&#xD;&#xA;    const contract = new ContractPromise(api, abi, address)&#xD;&#xA;&#xD;&#xA;    await contract.tx&#xD;&#xA;      .method({&#xD;&#xA;        gasLimit: gasRequired,&#xD;&#xA;        storageDepositLimit: null,&#xD;&#xA;        value&#xD;&#xA;      })&#xD;&#xA;      .signAndSend(account.address, (res) =&gt; {&#xD;&#xA;        if (res.status.isInBlock) {&#xD;&#xA;          console.log('in a block')&#xD;&#xA;        }&#xD;&#xA;        if (res.status.isFinalized) {&#xD;&#xA;          console.log('finalized')&#xD;&#xA;        }&#xD;&#xA;      })" ContentLicense="CC BY-SA 4.0" />
  <row Id="30663" PostHistoryTypeId="2" PostId="7795" RevisionGUID="3611fcc7-7d46-4a6f-b336-002d2dc72c72" CreationDate="2023-03-27T09:23:21.560" UserId="251" Text="Currently, parathread can't produce any blocks.&#xD;&#xA;&#xD;&#xA;You need to make it a parachain.&#xD;&#xA;&#xD;&#xA;You should use this on your testnet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6c2YW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30665" PostHistoryTypeId="6" PostId="7792" RevisionGUID="6e7d3f14-48ad-4943-b6be-f3897106bd14" CreationDate="2023-03-27T09:50:02.700" UserId="251" Comment="edited tags" Text="|parachain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30666" PostHistoryTypeId="2" PostId="7796" RevisionGUID="682e01cc-8dc1-4163-8e69-e1cc5cff2196" CreationDate="2023-03-27T09:51:08.013" UserId="4005" Text="It doesn't seem to be so, however there's a [tracking bug for it](https://github.com/polkadot-js/extension/issues/1237). The [moonbase docs](https://docs.moonbeam.network/tokens/connect/polkadotjs/) recommend using the in-browser local storage. If you try to submit the extrinsic with an ecdsa signature using the extension over the moonbase network (which is using ecdsa as a signature method), then it will fail with a mismatch of types." ContentLicense="CC BY-SA 4.0" />
  <row Id="30668" PostHistoryTypeId="2" PostId="7797" RevisionGUID="01799967-658e-4feb-aefe-6bfa47bcb4dd" CreationDate="2023-03-27T09:59:22.517" UserId="251" Text="You should ask Opensea to list your network...&#xD;&#xA;&#xD;&#xA;https://support.opensea.io/hc/en-us/articles/4404027708051-Which-blockchains-are-compatible-with-OpenSea-" ContentLicense="CC BY-SA 4.0" />
  <row Id="30670" PostHistoryTypeId="2" PostId="7798" RevisionGUID="73f45c2c-3069-468c-b6fe-384bf16004f4" CreationDate="2023-03-27T10:04:42.150" UserId="3317" Text="From summarizing the two SE posts in the comments: &#xD;&#xA;&#xD;&#xA;The (parachain) interval in which; &#xD;&#xA;1. The block can take to import on your reference hardware (= **block time**, aka `MAXIMUM_BLOCK_WEIGHT`)&#xD;&#xA;2. The PoV is built&#xD;&#xA;3. The block is sent to the relay chain&#xD;&#xA;4. The block is validated on the relay chain:&#xD;&#xA; - Backing&#xD;&#xA; - Availability&#xD;&#xA; - Approval&#xD;&#xA;&#xD;&#xA;, is 12 seconds ([ref][1]). The hard cap of 0.5 seconds block time is determined based on calculations / measurements to ensure that within these 12 seconds everything has happened. This can be done by testing and benchmarking the network ([ref][2]), which is probably easier said that done. &#xD;&#xA;&#xD;&#xA;In addition, and this is perhaps the answer you were looking for, the interval of 12 sec has to be inline with the 6 sec interval of the relay chain (a multiple of 6 seconds). Asynchronous backing will change this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/7039/maximum-block-weight-between-solo-chain-and-para-chain&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/3028/what-is-the-possible-minimum-block-time" ContentLicense="CC BY-SA 4.0" />
  <row Id="30672" PostHistoryTypeId="2" PostId="7799" RevisionGUID="51328e94-2441-4a4e-98db-f2830af3858c" CreationDate="2023-03-27T10:07:26.133" UserId="2762" Text="There are different options to get the Unclaimed rewards:&#xD;&#xA; - For a validator, use this `api.query.staking.erasValidatorReward`, see the [docs][1].&#xD;&#xA; - For the pool, use this `api.query.nominationPools.rewardPools`, check the [docs][2].&#xD;&#xA;- For a specific user inside the pool, use this: `api.call.nominationPoolsApi.pendingRewards` check the [docs][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage#erasvalidatorrewardu32-optionu128&#xD;&#xA;  [2]: https://polkadot.js.org/docs/substrate/storage#rewardpoolsu32-optionpalletnominationpoolsrewardpool&#xD;&#xA;  [3]: https://polkadot.js.org/docs/substrate/runtime/#pendingrewardsmember-accountid-balance" ContentLicense="CC BY-SA 4.0" />
  <row Id="30675" PostHistoryTypeId="2" PostId="7800" RevisionGUID="4160c80e-c7cf-43d8-a247-7704023ee0bf" CreationDate="2023-03-27T10:16:26.353" UserId="2484" Text="To fix the problem of a block time of 24 seconds you need to add an additional parachain collator.&#xD;&#xA;&#xD;&#xA;I just started two local rococo relay chain nodes and one parachain collator. &#xD;&#xA;&#xD;&#xA;Then after Brunos suggestion I started another parachain collator and now the block time is consistently 12 seconds as expected.&#xD;&#xA;&#xD;&#xA;To run two parachain collators you can follow the commands:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;# Collator1&#xD;&#xA;./target/release/polkadot-parachain --collator --alice --force-authoring --tmp --port 40335 --ws-port 9946 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30335&#xD;&#xA;&#xD;&#xA;# Collator2&#xD;&#xA;./target/release/polkadot-parachain --collator --bob --force-authoring --tmp --port 40336 --ws-port 9947 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30336&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;More on this [here](https://github.com/paritytech/cumulus#manual-setup)." ContentLicense="CC BY-SA 4.0" />
  <row Id="30677" PostHistoryTypeId="5" PostId="7798" RevisionGUID="7e547e22-9997-430b-a4d4-a1c13ed27ba3" CreationDate="2023-03-27T10:51:25.900" UserId="3317" Comment="deleted 39 characters in body" Text="From summarizing the two SE posts in the comments: &#xD;&#xA;&#xD;&#xA;The (parachain) interval in which; &#xD;&#xA;1. The block can take to import on your reference hardware (= **block time**, aka `MAXIMUM_BLOCK_WEIGHT`)&#xD;&#xA;2. The PoV is built&#xD;&#xA;3. The block is sent to the relay chain&#xD;&#xA;4. The block is validated on the relay chain:&#xD;&#xA; - Backing&#xD;&#xA; - Availability&#xD;&#xA; - Approval&#xD;&#xA;&#xD;&#xA;, is 12 seconds ([ref][1]). The hard cap of 0.5 seconds block time is determined based on calculations / measurements to ensure that within these 12 seconds everything has happened. This can be done by testing and benchmarking the network ([ref][2]), which is probably easier said that done. &#xD;&#xA;&#xD;&#xA;In addition, and this is perhaps the answer you were looking for, the interval of 12 sec has to be inline with the 6 sec interval of the relay chain (a multiple of 6 seconds).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/7039/maximum-block-weight-between-solo-chain-and-para-chain&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/3028/what-is-the-possible-minimum-block-time" ContentLicense="CC BY-SA 4.0" />
  <row Id="30678" PostHistoryTypeId="2" PostId="7801" RevisionGUID="919e3cde-0b59-460c-b087-1a35aa89ce2d" CreationDate="2023-03-27T11:11:20.420" UserId="3711" Text="This is a pending issue with both the polkadot JS extension and ink not lining up with how signatures should work and what's on offer from both packages.&#xD;&#xA;&#xD;&#xA;Currently, ink offers ECDSA verification and polkadot JS extension offers sr25519 (schnorrkel) signing only. These are not compatible.&#xD;&#xA;&#xD;&#xA;I have lodged an issue with [polkadot JS extension](https://github.com/polkadot-js/extension/issues/1237) and [ink](https://github.com/paritytech/substrate/issues/13703) on their github repos. Please upvote/comment accordingly.&#xD;&#xA;&#xD;&#xA;As of posting this answer, polkadot JS extension does not plan on supporting anything other than sr25519 (schnorrkel) signing from user accounts (i.e. not Alice/Bob, etc). However, ink is adding sr25519 verification to the contracts pallet for substrate which means sr25519 (schnorrkel) verification should be supported in the future!&#xD;&#xA;&#xD;&#xA;In the meantime, I have managed to import the schnorrkel crate into ink and verify sr25519 signatures. Unfortunately this crate adds ~30KB to the contract size.&#xD;&#xA;&#xD;&#xA;To produce the sr25519 (schnorrkel) signature using polkadot JS extension:&#xD;&#xA;```&#xD;&#xA;        let message = 'hello';&#xD;&#xA;        const ext = account.extension;&#xD;&#xA;        const signer = ext?.signer;&#xD;&#xA;        const signRaw = signer?.signRaw;&#xD;&#xA;&#xD;&#xA;        if(signRaw) {&#xD;&#xA;            &#xD;&#xA;            // create the message and sign it&#xD;&#xA;            const payload = {&#xD;&#xA;                address: account.account.address,&#xD;&#xA;                data: message,&#xD;&#xA;                type: 'bytes'&#xD;&#xA;            };&#xD;&#xA;            const signed = await signRaw(payload as SignerPayloadRaw);&#xD;&#xA;            &#xD;&#xA;            console.log('signature', signed.signature);&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then to verify in ink, add the schnorrkel dependency to Cargo.toml:&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;schnorrkel = { version = &quot;0.9.1&quot;, default-features = false, features = [&quot;u64_backend&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then to verify a payload + signature in ink:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;// We must make sure that this is the same as declared in the substrate source code.&#xD;&#xA;// this is the signing context used by the schnorrkel library when signing messages. It has to be the same binary blob on both sides of the signing process (i.e. the signing and the verifying) as it is used in the encryption/decryption process.&#xD;&#xA;const CTX: &amp;[u8] = b&quot;substrate&quot;;&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn verify_sr25519(&#xD;&#xA;            &amp;self,&#xD;&#xA;            signature: [u8; 64],&#xD;&#xA;            payload: [u8; 49],&#xD;&#xA;        ) -&gt; Result&lt;bool, Error&gt; {&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            let mut caller_bytes = [0u8; 32];&#xD;&#xA;            let caller_ref: &amp;[u8] = caller.as_ref();&#xD;&#xA;            caller_bytes.copy_from_slice(&amp;caller_ref[..32]);&#xD;&#xA;&#xD;&#xA;            let sig = Signature::from_bytes(&amp;signature).map_err(|_| Error::InvalidSignature)?;&#xD;&#xA;            let pub_key =&#xD;&#xA;                PublicKey::from_bytes(&amp;caller_bytes).map_err(|_| Error::InvalidPublicKey)?;&#xD;&#xA;            let res = pub_key.verify_simple(crate::CTX, &amp;payload, &amp;sig);&#xD;&#xA;            Ok(res.is_ok())&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;Note that your payload may be a different size to mine. Also note that the CTX variable has to be the same as that of substrate as it is involved in the sr25519 algorithm for computing signatures, so different CTX values lead to different signatures.  &#xD;&#xA;&#xD;&#xA;For a full example, see [here](https://github.com/prosopo/procaptcha/blob/73b18ad192681137ec33698dd5f7d88905a1681d/src/modules/Manager.ts#L119) and [here](https://github.com/prosopo/protocol/blob/1f6978a744636cf63fc80cf7676ee93082d05dad/contracts/lib.rs#L565)" ContentLicense="CC BY-SA 4.0" />
  <row Id="30680" PostHistoryTypeId="2" PostId="7802" RevisionGUID="8130a1b8-8cd3-4f26-b8a5-7d8d040f92c1" CreationDate="2023-03-27T11:13:59.103" UserId="3983" Text="I'm not an export on the polkadotjs ui codebase but as you discovered, the app uses `react-dropzone`([docs](https://react-dropzone.js.org/)) library for the `&lt;Dropzone /&gt;`. &#xD;&#xA;&#xD;&#xA;I think you could just potentially call the passed `_onDrop` function yourself with your `metadata.json` from code in a `useEffect()` hook. And potentially the `accept` method passed to the `InputFile` component.&#xD;&#xA;&#xD;&#xA;But maybe that is even to much if you don't need the user to have the ability to choose a file manually. Without the possibility to upload a file you could just craft a user flow without the `react-dropzone` part and just use polkadotjs with the metadata you've bundled in your js app or fetched from a server in your code.&#xD;&#xA;&#xD;&#xA;Hope this helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="30682" PostHistoryTypeId="5" PostId="7802" RevisionGUID="08429e16-18d3-4434-b233-fec9fdf44db3" CreationDate="2023-03-27T11:15:43.293" UserId="3983" Comment="added 139 characters in body" Text="I'm not an export on the polkadotjs ui codebase but as you discovered, the app uses `react-dropzone`([docs](https://react-dropzone.js.org/)) library for the `&lt;Dropzone /&gt;`. &#xD;&#xA;&#xD;&#xA;I think you could just potentially call the passed `_onDrop` function yourself with your `metadata.json` from code in a `useEffect()` hook. And potentially the `accept` method passed to the `InputFile` component.&#xD;&#xA;&#xD;&#xA;But maybe that is even to much if you don't need the user to have the ability to choose a file manually. Without the possibility to upload a file you could just craft a user flow without the `react-dropzone` part and just use polkadotjs with the metadata you've bundled in your js app or fetched from a server in your code.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;GitHub Issue: `react-dropzone`: [initialize react dropzone with file #917](https://github.com/react-dropzone/react-dropzone/issues/917)" ContentLicense="CC BY-SA 4.0" />
  <row Id="30683" PostHistoryTypeId="2" PostId="7803" RevisionGUID="288236d1-9f2a-46b1-a485-5ea6e1b1e151" CreationDate="2023-03-27T11:34:27.977" UserId="3990" Text="When I try to create a `PairSigner`, then the `Pair` traits are not satisfied. &#xD;&#xA;&#xD;&#xA;With this code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let pair = sp_core::sr25519::Pair::from_phrase(mnemonic_phrase.as_str(), None).unwrap();&#xD;&#xA;&#xD;&#xA;let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get this error: &#xD;&#xA;&#xD;&#xA;```txt&#xD;&#xA;error[E0599]: the function or associated item `new` exists for struct `PairSigner&lt;WithExtrinsicParams&lt;SubstrateConfig, BaseExtrinsicParams&lt;SubstrateConfig, PlainTip&gt;&gt;, Pair&gt;`, but its trait bounds were not satisfied&#xD;&#xA;  --&gt; src/main.rs:23:72&#xD;&#xA;   |&#xD;&#xA;23 |     let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair);&#xD;&#xA;   |                                                                        ^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;   |&#xD;&#xA;  ::: /Users/martin.jensen/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-core-18.0.0/src/sr25519.rs:83:1&#xD;&#xA;   |&#xD;&#xA;83 | pub struct Pair(Keypair);&#xD;&#xA;   | ---------------&#xD;&#xA;   | |&#xD;&#xA;   | doesn't satisfy `_: CryptoType`&#xD;&#xA;   | doesn't satisfy `sp_core::sr25519::Pair: sp_core::crypto::Pair`&#xD;&#xA;   |&#xD;&#xA;   = note: the following trait bounds were not satisfied:&#xD;&#xA;           `sp_core::sr25519::Pair: sp_core::crypto::Pair`&#xD;&#xA;           `sp_core::sr25519::Pair: sp_core::crypto::CryptoType`&#xD;&#xA;           which is required by `sp_core::sr25519::Pair: sp_core::crypto::Pair`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0599`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is my toml dependencies which I followed from the [subxt example toml](https://github.com/paritytech/subxt/blob/42bcddeecb39db98e711075b44331d24a8fbeb4d/examples/Cargo.toml): &#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;structopt = &quot;0.3.26&quot;&#xD;&#xA;tokio = { version = &quot;1.26&quot;, features = [&quot;rt-multi-thread&quot;, &quot;macros&quot;, &quot;time&quot;] }&#xD;&#xA;sp-keyring = &quot;20.0.0&quot;&#xD;&#xA;sp-core = { version = &quot;18.0.0&quot;, default-features = false }&#xD;&#xA;sp-runtime = &quot;20.0.0&quot;&#xD;&#xA;futures = &quot;0.3.27&quot;&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;, &quot;full&quot;, &quot;bit-vec&quot;] }&#xD;&#xA;hex = &quot;0.4.3&quot;&#xD;&#xA;tracing-subscriber = &quot;0.3.11&quot;&#xD;&#xA;subxt = &quot;0.27.1&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30685" PostHistoryTypeId="1" PostId="7803" RevisionGUID="288236d1-9f2a-46b1-a485-5ea6e1b1e151" CreationDate="2023-03-27T11:34:27.977" UserId="3990" Text="subxt `PairSigner` trait bounds not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="30686" PostHistoryTypeId="3" PostId="7803" RevisionGUID="288236d1-9f2a-46b1-a485-5ea6e1b1e151" CreationDate="2023-03-27T11:34:27.977" UserId="3990" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30687" PostHistoryTypeId="2" PostId="7804" RevisionGUID="bca57dea-bd80-4d61-83e8-c8ad4aecf238" CreationDate="2023-03-27T12:37:30.187" UserId="3319" Text="Im trying to have my pallet compile a pallet call based on the feature that is set, for example if i have two function calls `feature_one()` and `feature_two()`, it works fine with `feature_one` but when i add the second method with the `#[cfg(feature= &quot;feature2&quot;)]` macro it gives me the following error:&#xD;&#xA;&#xD;&#xA;      error[E0599]: no function or associated item named `feature_two` found for struct `pallet::Pallet` in the current scope&#xD;&#xA;&#xD;&#xA;    function or associated item not found in `pallet::Pallet&lt;T&gt;`&#xD;&#xA;    help: there is an associated function with a similar name: `feature_one`&#xD;&#xA;&#xD;&#xA;this is the pallet code:&#xD;&#xA;&#xD;&#xA;        #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;        #[cfg(test)]&#xD;&#xA;        mod tests;&#xD;&#xA;        pub use pallet::*;&#xD;&#xA;        #[frame_support::pallet]&#xD;&#xA;        pub mod pallet {&#xD;&#xA;        	use frame_system::pallet_prelude::*;&#xD;&#xA;        	pub use sp_runtime::traits::Extrinsic;&#xD;&#xA;        	#[pallet::pallet]&#xD;&#xA;        	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;        	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;        &#xD;&#xA;        	#[pallet::config]&#xD;&#xA;        	pub trait Config: frame_system::Config {&#xD;&#xA;        		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;        	}&#xD;&#xA;        	#[pallet::event]&#xD;&#xA;        	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;        	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;        		/// An Event has been validated&#xD;&#xA;        		CustomEvent { event_id: T::Hash },&#xD;&#xA;        	}&#xD;&#xA;        	#[pallet::error]&#xD;&#xA;        	pub enum Error&lt;T&gt; {&#xD;&#xA;        		AlreadySymbitted,&#xD;&#xA;        	}&#xD;&#xA;       #[pallet::storage]&#xD;&#xA;    	pub(super) type MyStorage&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::Hash, T::BlockNumber&gt;;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        	#[pallet::call]&#xD;&#xA;        	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        	    #[cfg(feature= &quot;feature1&quot;)]&#xD;&#xA;                #[pallet::weight(0)]&#xD;&#xA;        		pub fn feature_one(_origin: OriginFor&lt;T&gt;, event_id: T::Hash) -&gt; DispatchResult {&#xD;&#xA;        		} &#xD;&#xA;    &#xD;&#xA;               #[cfg(feature= &quot;feature2&quot;)]&#xD;&#xA;               #[pallet::weight(0)]&#xD;&#xA;                pub fn feature_two(_origin: OriginFor&lt;T&gt;, event_id: T::Hash) -&gt; DispatchResult {&#xD;&#xA;            &#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30689" PostHistoryTypeId="1" PostId="7804" RevisionGUID="bca57dea-bd80-4d61-83e8-c8ad4aecf238" CreationDate="2023-03-27T12:37:30.187" UserId="3319" Text="how to conditionally compile functions in pallet::call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30690" PostHistoryTypeId="3" PostId="7804" RevisionGUID="bca57dea-bd80-4d61-83e8-c8ad4aecf238" CreationDate="2023-03-27T12:37:30.187" UserId="3319" Text="|pallet|runtime|features|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30691" PostHistoryTypeId="2" PostId="7805" RevisionGUID="14887a78-3012-4428-a417-5ef2052d4326" CreationDate="2023-03-27T12:59:01.760" UserId="1780" Text="There are a bunch of ways to override your nightly toolchain, see https://rust-lang.github.io/rustup/overrides.html for further information.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30693" PostHistoryTypeId="2" PostId="7806" RevisionGUID="e5ee439d-4ed6-4106-998e-07ca69e6cbc6" CreationDate="2023-03-27T13:00:00.003" UserId="251" Text="You can do this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn f() {&#xD;&#xA;    ff();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[cfg(feature = &quot;f&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;&#xD;&#xA;  #[cfg(feature = &quot;g&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or: &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn f() {&#xD;&#xA;    ff();&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  #[pallet::call_index(1)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn g() {&#xD;&#xA;    gg();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[cfg(feature = &quot;f&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;  #[cfg(not(feature = &quot;f&quot;))]&#xD;&#xA;  fn ff() { return not enable }&#xD;&#xA;&#xD;&#xA;  #[cfg(feature = &quot;g&quot;)]&#xD;&#xA;  fn gg() {}&#xD;&#xA;  #[cfg(not(feature = &quot;g&quot;))]&#xD;&#xA;  fn gg() { return not enable }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30695" PostHistoryTypeId="5" PostId="7806" RevisionGUID="b5b0d57b-3ef4-44a2-bd2b-7dfae65e3286" CreationDate="2023-03-27T13:05:39.220" UserId="251" Comment="added 20 characters in body" Text="You can do this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn f() {&#xD;&#xA;    Self::ff();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[cfg(feature = &quot;f&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;&#xD;&#xA;  #[cfg(feature = &quot;g&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or: &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn f() {&#xD;&#xA;     Self::ff();&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  #[pallet::call_index(1)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn g() {&#xD;&#xA;     Self::gg();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[cfg(feature = &quot;f&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;  #[cfg(not(feature = &quot;f&quot;))]&#xD;&#xA;  fn ff() { return not enable }&#xD;&#xA;&#xD;&#xA;  #[cfg(feature = &quot;g&quot;)]&#xD;&#xA;  fn gg() {}&#xD;&#xA;  #[cfg(not(feature = &quot;g&quot;))]&#xD;&#xA;  fn gg() { return not enable }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30696" PostHistoryTypeId="5" PostId="7804" RevisionGUID="39cec5d4-b05f-446b-b995-fb6d337af3eb" CreationDate="2023-03-27T13:06:59.543" UserId="251" Comment="added 16 characters in body" Text="Im trying to have my pallet compile a pallet call based on the feature that is set, for example if i have two function calls `feature_one()` and `feature_two()`, it works fine with `feature_one` but when i add the second method with the `#[cfg(feature= &quot;feature2&quot;)]` macro it gives me the following error:&#xD;&#xA;```rs&#xD;&#xA;      error[E0599]: no function or associated item named `feature_two` found for struct `pallet::Pallet` in the current scope&#xD;&#xA;&#xD;&#xA;    function or associated item not found in `pallet::Pallet&lt;T&gt;`&#xD;&#xA;    help: there is an associated function with a similar name: `feature_one`&#xD;&#xA;```&#xD;&#xA;this is the pallet code:&#xD;&#xA;```rs&#xD;&#xA;        #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;        #[cfg(test)]&#xD;&#xA;        mod tests;&#xD;&#xA;        pub use pallet::*;&#xD;&#xA;        #[frame_support::pallet]&#xD;&#xA;        pub mod pallet {&#xD;&#xA;        	use frame_system::pallet_prelude::*;&#xD;&#xA;        	pub use sp_runtime::traits::Extrinsic;&#xD;&#xA;        	#[pallet::pallet]&#xD;&#xA;        	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;        	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;        &#xD;&#xA;        	#[pallet::config]&#xD;&#xA;        	pub trait Config: frame_system::Config {&#xD;&#xA;        		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;        	}&#xD;&#xA;        	#[pallet::event]&#xD;&#xA;        	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;        	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;        		/// An Event has been validated&#xD;&#xA;        		CustomEvent { event_id: T::Hash },&#xD;&#xA;        	}&#xD;&#xA;        	#[pallet::error]&#xD;&#xA;        	pub enum Error&lt;T&gt; {&#xD;&#xA;        		AlreadySymbitted,&#xD;&#xA;        	}&#xD;&#xA;       #[pallet::storage]&#xD;&#xA;    	pub(super) type MyStorage&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::Hash, T::BlockNumber&gt;;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        	#[pallet::call]&#xD;&#xA;        	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        	    #[cfg(feature= &quot;feature1&quot;)]&#xD;&#xA;                #[pallet::weight(0)]&#xD;&#xA;        		pub fn feature_one(_origin: OriginFor&lt;T&gt;, event_id: T::Hash) -&gt; DispatchResult {&#xD;&#xA;        		} &#xD;&#xA;    &#xD;&#xA;               #[cfg(feature= &quot;feature2&quot;)]&#xD;&#xA;               #[pallet::weight(0)]&#xD;&#xA;                pub fn feature_two(_origin: OriginFor&lt;T&gt;, event_id: T::Hash) -&gt; DispatchResult {&#xD;&#xA;            &#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30697" PostHistoryTypeId="5" PostId="7806" RevisionGUID="048c0f2d-c3ef-4fa4-aac2-f660e3c09293" CreationDate="2023-03-27T13:15:36.087" UserId="251" Comment="added 231 characters in body" Text="You can do this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn f() {&#xD;&#xA;    Self::ff();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[cfg(feature = &quot;f&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;&#xD;&#xA;  #[cfg(feature = &quot;g&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or: &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn f() {&#xD;&#xA;     Self::ff();&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  #[pallet::call_index(1)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn g() {&#xD;&#xA;     Self::gg();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[cfg(feature = &quot;f&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;  #[cfg(not(feature = &quot;f&quot;))]&#xD;&#xA;  fn ff() { return not enable }&#xD;&#xA;&#xD;&#xA;  #[cfg(feature = &quot;g&quot;)]&#xD;&#xA;  fn gg() {}&#xD;&#xA;  #[cfg(not(feature = &quot;g&quot;))]&#xD;&#xA;  fn gg() { return not enable }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;#[pallet::weight(0)]&#xD;&#xA;fn f(.., params: Params) {&#xD;&#xA;   Self::ff(params);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;f&quot;)]&#xD;&#xA;struct Params {&#xD;&#xA;  f: u8&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;g&quot;)]&#xD;&#xA;struct Params {&#xD;&#xA;  g: u16&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30698" PostHistoryTypeId="2" PostId="7807" RevisionGUID="40ceb3c4-930f-4f70-aa41-688c79ad1f20" CreationDate="2023-03-27T13:58:35.860" UserId="2762" Text="Check this method `rotate_keys` that generates new session keys and returns the corresponding public keys: [code][1].&#xD;&#xA;&#xD;&#xA;And this previous question on StackExchange: [What does author_rotateKeys do?][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L121&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/629/what-does-author-rotatekeys-do?rq=1" ContentLicense="CC BY-SA 4.0" />
  <row Id="30700" PostHistoryTypeId="5" PostId="7806" RevisionGUID="d7215eb5-a7e8-46b9-8ca7-016233d40bae" CreationDate="2023-03-27T14:05:33.287" UserId="3319" Comment="both function defined will give an error this way, but using not is better as it wont compile if feature g is set which will allow the duplicate name to be set" Text="You can do this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn f() {&#xD;&#xA;    Self::ff();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[cfg(not(feature = &quot;g&quot;))]&#xD;&#xA;  fn ff() {}&#xD;&#xA;&#xD;&#xA;  #[cfg(feature = &quot;g&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or: &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn f() {&#xD;&#xA;     Self::ff();&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  #[pallet::call_index(1)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn g() {&#xD;&#xA;     Self::gg();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[cfg(feature = &quot;f&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;  #[cfg(not(feature = &quot;f&quot;))]&#xD;&#xA;  fn ff() { return not enable }&#xD;&#xA;&#xD;&#xA;  #[cfg(feature = &quot;g&quot;)]&#xD;&#xA;  fn gg() {}&#xD;&#xA;  #[cfg(not(feature = &quot;g&quot;))]&#xD;&#xA;  fn gg() { return not enable }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;#[pallet::weight(0)]&#xD;&#xA;fn f(.., params: Params) {&#xD;&#xA;   Self::ff(params);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;f&quot;)]&#xD;&#xA;struct Params {&#xD;&#xA;  f: u8&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;g&quot;)]&#xD;&#xA;struct Params {&#xD;&#xA;  g: u16&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30701" PostHistoryTypeId="24" PostId="7806" RevisionGUID="d7215eb5-a7e8-46b9-8ca7-016233d40bae" CreationDate="2023-03-27T14:05:33.287" Comment="Proposed by 3319 approved by 251 edit id of 396" ContentLicense="CC BY-SA 4.0" />
  <row Id="30702" PostHistoryTypeId="2" PostId="7808" RevisionGUID="b12c7fa2-2224-4cc0-ba11-b1d5d655eacf" CreationDate="2023-03-27T14:09:03.850" UserId="2762" Text="Interesting question, you are right to use BoundedVec to follow best substrate practices, I recommend this StackExchange questions to learn the difference between BoundedVec and Vec: [When to use BoundedVec vs. WeakBoundedVec vs. Vec?][1].&#xD;&#xA;&#xD;&#xA;I am not sure what is your data structure you want to store for the two strings but what I did was to use a struct.&#xD;&#xA;See the example of storing two strings: first name and last name:&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Default, TypeInfo, MaxEncodedLen, PartialEqNoBound, RuntimeDebug)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;		pub first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;		pub last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;And then store the struct in your storage.&#xD;&#xA;&#xD;&#xA;You can see the full example of the code here: https://github.com/substrate-developer-hub/substrate-node-template/blob/alexd10s/how-to-storage-migration-example/pallets/nicks/src/lib.rs#L113&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1152/when-to-use-boundedvec-vs-weakboundedvec-vs-vec" ContentLicense="CC BY-SA 4.0" />
  <row Id="30704" PostHistoryTypeId="2" PostId="7809" RevisionGUID="972a6568-69ab-4564-b699-132607867c26" CreationDate="2023-03-27T14:13:52.443" UserId="3886" Text="I have create blockchain using substrate-node-template with aura consensus and which contains own native coin and I have created `stable-coin` using `pallet-contract`. This stable token is `contract`, whenever the transaction occurs between two parties using stable-token, I want to convert the transaction fees from stable token to native coin on flow. Is it possible and if there is any example implementation " ContentLicense="CC BY-SA 4.0" />
  <row Id="30706" PostHistoryTypeId="1" PostId="7809" RevisionGUID="972a6568-69ab-4564-b699-132607867c26" CreationDate="2023-03-27T14:13:52.443" UserId="3886" Text="Substrate node template fees deduction using native token" ContentLicense="CC BY-SA 4.0" />
  <row Id="30707" PostHistoryTypeId="3" PostId="7809" RevisionGUID="972a6568-69ab-4564-b699-132607867c26" CreationDate="2023-03-27T14:13:52.443" UserId="3886" Text="|substrate-node-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30708" PostHistoryTypeId="2" PostId="7810" RevisionGUID="0efc1eb2-931a-4eab-9e47-d40e025e3528" CreationDate="2023-03-27T14:17:57.843" UserId="251" Text="The default implementation is using the native token.&#xD;&#xA;&#xD;&#xA;You should revert your stable-coin changes.&#xD;&#xA;&#xD;&#xA;Balances is the native token pallet.&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/blob/700c3a186e55d0d6542c564ccff17260238ed752/runtime/src/lib.rs#L283&#xD;&#xA;&#xD;&#xA;And pass it to transaction payment's `CurrencyAdapter`.&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/blob/700c3a186e55d0d6542c564ccff17260238ed752/runtime/src/lib.rs#L254&#xD;&#xA;&#xD;&#xA;That's it." ContentLicense="CC BY-SA 4.0" />
  <row Id="30713" PostHistoryTypeId="2" PostId="7812" RevisionGUID="87931d25-4b01-48ed-a164-e5e95fcd62a4" CreationDate="2023-03-27T15:01:09.180" UserId="2762" Text=" You can use the method .iter() of StorageMap combined with the itertools method .collect_vec() see this response [here][1]:&#xD;&#xA;&#xD;&#xA;    use itertools::Itertools;&#xD;&#xA;    let collection = &lt;YourStorage&lt;T&gt;&gt;::iter().collect_vec();&#xD;&#xA;&#xD;&#xA;Then you can generate the hash of the collection variable.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/5668/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="30715" PostHistoryTypeId="50" PostId="4419" RevisionGUID="4288002b-d633-4ba5-a568-9565427a07d4" CreationDate="2023-03-27T15:07:45.897" UserId="-1" />
  <row Id="30717" PostHistoryTypeId="50" PostId="4657" RevisionGUID="4721c3c6-beee-4a06-8c00-4409957cc651" CreationDate="2023-03-27T17:04:05.517" UserId="-1" />
  <row Id="30718" PostHistoryTypeId="2" PostId="7813" RevisionGUID="da270d39-7d98-4015-8b57-e42d221b10ba" CreationDate="2023-03-27T17:04:24.687" UserId="28" Text="Storage Map does not have a fingerprint of the data inside it, and it would be very expensive to create this.&#xD;&#xA;&#xD;&#xA;It seems you may want to use a [child-trie](https://substrate.stackexchange.com/questions/139/what-are-good-use-cases-for-child-tries/144#144), which has a very similar API to a Storage Map, but also has a storage root, which can be used for the kind of check you want.&#xD;&#xA;&#xD;&#xA;You simply store the storage root, and then later can check if it has changed.&#xD;&#xA;&#xD;&#xA;Beyond that, remember as a runtime engineer, you control all the logic on your chain. It should not really be a mystery if some storage map has changed or not. You can create any kind of logic you want to track when a user changes a map, or even prevent a user from doing so within your pallet.&#xD;&#xA;&#xD;&#xA;I would definitely not do any kind of storage iteration or brute force equality check for this kind of thing. Those operations are very expensive for the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="30720" PostHistoryTypeId="50" PostId="4106" RevisionGUID="3817cfc7-0945-4e26-870e-0c187f8d471a" CreationDate="2023-03-27T19:04:30.567" UserId="-1" />
  <row Id="30721" PostHistoryTypeId="2" PostId="7814" RevisionGUID="a63300b1-fa4b-41a1-9101-924255389922" CreationDate="2023-03-27T19:14:42.637" UserId="1779" Text="We're updating our weights to weights 2.0 but we're getting a lot of `Proof Skipped` lines in the output. What is the impact of this, and how do we fix it?&#xD;&#xA;&#xD;&#xA;Example output:&#xD;&#xA;```&#xD;&#xA;/// Proof Skipped: Escrow Locked (max_values: None, max_size: None, mode: Measured)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30723" PostHistoryTypeId="1" PostId="7814" RevisionGUID="a63300b1-fa4b-41a1-9101-924255389922" CreationDate="2023-03-27T19:14:42.637" UserId="1779" Text="Proof Skipped in benchmark" ContentLicense="CC BY-SA 4.0" />
  <row Id="30724" PostHistoryTypeId="3" PostId="7814" RevisionGUID="a63300b1-fa4b-41a1-9101-924255389922" CreationDate="2023-03-27T19:14:42.637" UserId="1779" Text="|weight|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30725" PostHistoryTypeId="50" PostId="4119" RevisionGUID="ae90dd9b-0cc9-46c6-b37c-a3c0bf6e786f" CreationDate="2023-03-27T20:00:15.070" UserId="-1" />
  <row Id="30726" PostHistoryTypeId="5" PostId="7790" RevisionGUID="88928fa7-6c2f-4d28-947b-cad129b4214a" CreationDate="2023-03-27T20:06:29.297" UserId="227" Comment="added 2 characters in body" Text="We had to remove `HashMap` in with 3.0 unfortunately ([context here](https://github.com/paritytech/ink/releases/tag/v3.0.0-rc9)).&#xD;&#xA;&#xD;&#xA;It was instead replaced with the simpler [`ink::storage::Mapping`](https://paritytech.github.io/ink/ink_storage/struct.Mapping.html). You should be able to have the same functionality with this data structure. If not, please create a GitHub issue or another StackExchange question.&#xD;&#xA;&#xD;&#xA;The main reason for removing `HashMap` was that it required complex code and we found that this overhead bloated the compiled contract‘s size to a level where it was not economical anymore to deploy or use these contracts.&#xD;&#xA;&#xD;&#xA;You might encounter other issues with upgrading from 3.x to 4.0. We've written [this migration guide](https://use.ink/faq/migrating-from-ink-3-to-4).&#xD;&#xA;&#xD;&#xA;From your question I gather that you might be using some beta or release candidate of 3.0, so it might be that there is something missing in the migration guide then. If you encounter more issues, please just create a another question here or a GitHub issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="30727" PostHistoryTypeId="52" PostId="7804" RevisionGUID="d8173ece-bada-4bc4-9703-b811ca50aefe" CreationDate="2023-03-27T20:40:07.877" />
  <row Id="30728" PostHistoryTypeId="50" PostId="4888" RevisionGUID="71c10c35-a7c4-4725-8968-61fa977c1c8d" CreationDate="2023-03-27T22:07:50.913" UserId="-1" />
  <row Id="30729" PostHistoryTypeId="50" PostId="4475" RevisionGUID="181e43af-3fb4-4691-afc0-078c8adcea22" CreationDate="2023-03-27T23:05:05.600" UserId="-1" />
  <row Id="30730" PostHistoryTypeId="2" PostId="7815" RevisionGUID="67bad9ca-6395-4509-998e-429b694c4a1c" CreationDate="2023-03-27T23:55:50.800" UserId="3881" Text="I´m writing a custom pallet that uses AssetsPallet. The idea is to create a call/function that can be called only by the creator of an Asset/Token. I know I need that info from the following struct of Assets pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct AssetDetails&lt;Balance, AccountId, DepositBalance&gt; {&#xD;&#xA;	/// Can change `owner`, `issuer`, `freezer` and `admin` accounts.&#xD;&#xA;	pub(super) owner: AccountId,&#xD;&#xA;	/// Can mint tokens.&#xD;&#xA;	pub(super) issuer: AccountId,&#xD;&#xA;	/// Can thaw tokens, force transfers and burn tokens from any account.&#xD;&#xA;	pub(super) admin: AccountId,&#xD;&#xA;	/// Can freeze tokens.&#xD;&#xA;	pub(super) freezer: AccountId,&#xD;&#xA;	/// The total supply across all accounts.&#xD;&#xA;	pub(super) supply: Balance,&#xD;&#xA;	/// The balance deposited for this asset. This pays for the data stored here.&#xD;&#xA;	pub(super) deposit: DepositBalance,&#xD;&#xA;	/// The ED for virtual accounts.&#xD;&#xA;	pub(super) min_balance: Balance,&#xD;&#xA;	/// If `true`, then any account with this asset is given a provider reference. Otherwise, it&#xD;&#xA;	/// requires a consumer reference.&#xD;&#xA;	pub(super) is_sufficient: bool,&#xD;&#xA;	/// The total number of accounts.&#xD;&#xA;	pub(super) accounts: u32,&#xD;&#xA;	/// The total number of accounts for which we have placed a self-sufficient reference.&#xD;&#xA;	pub(super) sufficients: u32,&#xD;&#xA;	/// The total number of approvals.&#xD;&#xA;	pub(super) approvals: u32,&#xD;&#xA;	/// The status of the asset&#xD;&#xA;	pub(super) status: AssetStatus,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;That is Stored in the following storage when created:&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	/// Details of an asset.&#xD;&#xA;	pub(super) type Asset&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AssetId,&#xD;&#xA;		AssetDetails&lt;T::Balance, T::AccountId, DepositBalanceOf&lt;T, I&gt;&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;Im know this is related to the topic of loosely coupling, but the examples i found use a frame_support trait as link. So I´m not getting how to do it." ContentLicense="CC BY-SA 4.0" />
  <row Id="30732" PostHistoryTypeId="1" PostId="7815" RevisionGUID="67bad9ca-6395-4509-998e-429b694c4a1c" CreationDate="2023-03-27T23:55:50.800" UserId="3881" Text="How do I get access to AssetDetails (Assets Pallet) info from a Custom Pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30733" PostHistoryTypeId="3" PostId="7815" RevisionGUID="67bad9ca-6395-4509-998e-429b694c4a1c" CreationDate="2023-03-27T23:55:50.800" UserId="3881" Text="|assets|custom-types|loose-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30734" PostHistoryTypeId="5" PostId="7815" RevisionGUID="02422921-3f33-4742-8e04-1ebfeb4938d1" CreationDate="2023-03-27T23:56:39.383" UserId="3881" Comment="deleted 1 character in body" Text="I´m writing a custom pallet that uses AssetsPallet. The idea is to create a call/function that can be called only by the creator of an Asset/Token. I know I need that info from the following struct of Assets pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct AssetDetails&lt;Balance, AccountId, DepositBalance&gt; {&#xD;&#xA;	/// Can change `owner`, `issuer`, `freezer` and `admin` accounts.&#xD;&#xA;	pub(super) owner: AccountId,&#xD;&#xA;	/// Can mint tokens.&#xD;&#xA;	pub(super) issuer: AccountId,&#xD;&#xA;	/// Can thaw tokens, force transfers and burn tokens from any account.&#xD;&#xA;	pub(super) admin: AccountId,&#xD;&#xA;	/// Can freeze tokens.&#xD;&#xA;	pub(super) freezer: AccountId,&#xD;&#xA;	/// The total supply across all accounts.&#xD;&#xA;	pub(super) supply: Balance,&#xD;&#xA;	/// The balance deposited for this asset. This pays for the data stored here.&#xD;&#xA;	pub(super) deposit: DepositBalance,&#xD;&#xA;	/// The ED for virtual accounts.&#xD;&#xA;	pub(super) min_balance: Balance,&#xD;&#xA;	/// If `true`, then any account with this asset is given a provider reference. Otherwise, it&#xD;&#xA;	/// requires a consumer reference.&#xD;&#xA;	pub(super) is_sufficient: bool,&#xD;&#xA;	/// The total number of accounts.&#xD;&#xA;	pub(super) accounts: u32,&#xD;&#xA;	/// The total number of accounts for which we have placed a self-sufficient reference.&#xD;&#xA;	pub(super) sufficients: u32,&#xD;&#xA;	/// The total number of approvals.&#xD;&#xA;	pub(super) approvals: u32,&#xD;&#xA;	/// The status of the asset&#xD;&#xA;	pub(super) status: AssetStatus,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;That is Stored in the following storage when created:&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	/// Details of an asset.&#xD;&#xA;	pub(super) type Asset&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AssetId,&#xD;&#xA;		AssetDetails&lt;T::Balance, T::AccountId, DepositBalanceOf&lt;T, I&gt;&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;I know this is related to the topic of loosely coupling, but the examples i found use a frame_support trait as link. So I´m not getting how to do it." ContentLicense="CC BY-SA 4.0" />
  <row Id="30735" PostHistoryTypeId="50" PostId="5473" RevisionGUID="7007eb49-fcab-48fe-ae10-9a6605563ad1" CreationDate="2023-03-28T00:04:15.470" UserId="-1" />
  <row Id="30736" PostHistoryTypeId="2" PostId="7816" RevisionGUID="7a0ac826-8d96-4768-9540-9d8c093c2882" CreationDate="2023-03-28T00:56:41.030" UserId="504" Text="We have a (semi-persistent, networked) testnet deployment based on the `kusama-staging` chainspec (15 validators) and noticed over the weekend that the attached 3 parachains all simultaneously stopped producing blocks (they were previously doing so just fine for 4 days).&#xD;&#xA;&#xD;&#xA;Around that time, the following Relaychain logs started appearing in the relay validators and the internal relay nodes of the para clients.&#xD;&#xA;`Could not retrieve session info from rolling session window session=364`&#xD;&#xA;&#xD;&#xA;The relay continues to build and finalize blocks as normal, and the para clients stay in sync with it. They also continue peering with each other, produce block candidates and send them to validators for backing, they seem to validate them just fine, but they never become new best blocks.&#xD;&#xA;&#xD;&#xA;Currently `session.currentIndex: u32 =&gt; 427` on the relay (note block candidates are produced for 364)&#xD;&#xA;Relay logs contain large amounts of `Timeout hit - already seconded?` traces but I can't judge whether that's normal or suspicious.&#xD;&#xA;&#xD;&#xA;Longform log of one relayblock with backing debug info: https://pastebin.com/xiHw75wG&#xD;&#xA;&#xD;&#xA;This problem is pretty deep in the bowels of the para backing process and a quick substrate code study didn't get me there, so i'm looking for help on &#xD;&#xA;- a) what could have gone wrong here, and more importantly&#xD;&#xA;- b) is this state recoverable somehow?&#xD;&#xA;&#xD;&#xA;Attempts:&#xD;&#xA;- shutdown all collators except for one, `substrate revert 999` to evict all current block proposals, restart collation. Error stays the same with session 364&#xD;&#xA;- shutdown all collators, resync a collator from scratch from an archive node, start collation. same error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="30738" PostHistoryTypeId="1" PostId="7816" RevisionGUID="7a0ac826-8d96-4768-9540-9d8c093c2882" CreationDate="2023-03-28T00:56:41.030" UserId="504" Text="`kusama-staging` v0.9.37 runtime finalizing, (apparently) validating and backing, but not including new parablocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30739" PostHistoryTypeId="3" PostId="7816" RevisionGUID="7a0ac826-8d96-4768-9540-9d8c093c2882" CreationDate="2023-03-28T00:56:41.030" UserId="504" Text="|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30740" PostHistoryTypeId="2" PostId="7817" RevisionGUID="a7cbe1bf-81ec-482c-ae31-0c2f216d1fb7" CreationDate="2023-03-28T02:01:24.733" UserId="251" Text="&gt; The idea is to create a call/function that can be called only by the creator of an Asset/Token.&#xD;&#xA;&#xD;&#xA;Use this function to get the owner.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/ae49625b5f7a4fa267082f8d415ea4f66ac02423/frame/assets/src/impl_fungibles.rs#L240-L242&#xD;&#xA;&#xD;&#xA;Import the `frame_support::traits::fungibles::roles::Inspect`.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// Your pallet&#xD;&#xA;&#xD;&#xA;use frame_support::traits::fungibles::roles::Inspect;&#xD;&#xA;&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;  type Inspector: Inspect;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; for Pallet&lt;T&gt; {&#xD;&#xA;  fn is_owner/creator_of(who: &amp;T::AccountId, asset_id: AssetId) -&gt; bool {&#xD;&#xA;    T::Inspector::owner(asset_id).map(|owner| owner == who).unwrap_or_default()&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30742" PostHistoryTypeId="50" PostId="5113" RevisionGUID="0ba0c5f1-568f-481f-acbc-2f3895875b22" CreationDate="2023-03-28T02:03:15.387" UserId="-1" />
  <row Id="30743" PostHistoryTypeId="5" PostId="7815" RevisionGUID="1289003f-e203-492f-9abd-893c50ece0b3" CreationDate="2023-03-28T02:27:26.450" UserId="251" Comment="added 5 characters in body" Text="I'm writing a custom pallet that uses AssetsPallet. The idea is to create a call/function that can be called only by the creator of an Asset/Token. I know I need that info from the following struct of Assets pallet:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct AssetDetails&lt;Balance, AccountId, DepositBalance&gt; {&#xD;&#xA;	/// Can change `owner`, `issuer`, `freezer` and `admin` accounts.&#xD;&#xA;	pub(super) owner: AccountId,&#xD;&#xA;	/// Can mint tokens.&#xD;&#xA;	pub(super) issuer: AccountId,&#xD;&#xA;	/// Can thaw tokens, force transfers and burn tokens from any account.&#xD;&#xA;	pub(super) admin: AccountId,&#xD;&#xA;	/// Can freeze tokens.&#xD;&#xA;	pub(super) freezer: AccountId,&#xD;&#xA;	/// The total supply across all accounts.&#xD;&#xA;	pub(super) supply: Balance,&#xD;&#xA;	/// The balance deposited for this asset. This pays for the data stored here.&#xD;&#xA;	pub(super) deposit: DepositBalance,&#xD;&#xA;	/// The ED for virtual accounts.&#xD;&#xA;	pub(super) min_balance: Balance,&#xD;&#xA;	/// If `true`, then any account with this asset is given a provider reference. Otherwise, it&#xD;&#xA;	/// requires a consumer reference.&#xD;&#xA;	pub(super) is_sufficient: bool,&#xD;&#xA;	/// The total number of accounts.&#xD;&#xA;	pub(super) accounts: u32,&#xD;&#xA;	/// The total number of accounts for which we have placed a self-sufficient reference.&#xD;&#xA;	pub(super) sufficients: u32,&#xD;&#xA;	/// The total number of approvals.&#xD;&#xA;	pub(super) approvals: u32,&#xD;&#xA;	/// The status of the asset&#xD;&#xA;	pub(super) status: AssetStatus,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;That is Stored in the following storage when created:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::storage]&#xD;&#xA;/// Details of an asset.&#xD;&#xA;pub(super) type Asset&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageMap&lt;&#xD;&#xA;	_,&#xD;&#xA;	Blake2_128Concat,&#xD;&#xA;	T::AssetId,&#xD;&#xA;	AssetDetails&lt;T::Balance, T::AccountId, DepositBalanceOf&lt;T, I&gt;&gt;,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I know this is related to the topic of loose coupling, but the examples I found use a frame_support trait as the link. So I'm not getting how to do it." ContentLicense="CC BY-SA 4.0" />
  <row Id="30744" PostHistoryTypeId="6" PostId="7815" RevisionGUID="1289003f-e203-492f-9abd-893c50ece0b3" CreationDate="2023-03-28T02:27:26.450" UserId="251" Comment="added 5 characters in body" Text="|pallet|loose-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30745" PostHistoryTypeId="5" PostId="7816" RevisionGUID="6fbf0619-6823-43b6-ae0b-eef71ba5fd9f" CreationDate="2023-03-28T02:41:01.773" UserId="504" Comment="added 40 characters in body" Text="The following problem seems to be pretty deep in the bowels of the para backing process and a quick substrate code study didn't get me there, so i'm looking for help on &#xD;&#xA;- a) what could have gone wrong here, and more importantly&#xD;&#xA;- b) is this state recoverable somehow?&#xD;&#xA;&#xD;&#xA;**Situation:**&#xD;&#xA;&#xD;&#xA;We have a (semi-persistent, networked) testnet deployment based on the `kusama-staging` chainspec (15 validators) and noticed over the weekend that the attached 3 parachains all simultaneously stopped producing blocks (they were previously doing so just fine for 4 days).&#xD;&#xA;&#xD;&#xA;Around that time, the following Relaychain logs started appearing in the relay validators and the internal relay nodes of the para clients.&#xD;&#xA;`Could not retrieve session info from rolling session window session=364`&#xD;&#xA;&#xD;&#xA;The relay continues to build and finalize blocks as normal, and the para clients stay in sync with it. They also continue peering with each other, produce block candidates and send them to validators for backing, they seem to validate them just fine, but they never become new best blocks.&#xD;&#xA;&#xD;&#xA;Currently `session.currentIndex: u32 =&gt; 427` on the relay (note block candidates are produced for 364)&#xD;&#xA;Relay logs contain large amounts of `Timeout hit - already seconded?` traces but I can't judge whether that's normal or suspicious.&#xD;&#xA;&#xD;&#xA;Longform log of one relayblock with backing debug info: https://pastebin.com/xiHw75wG&#xD;&#xA;&#xD;&#xA;**Attempts:**&#xD;&#xA;- shutdown all collators except for one, `substrate revert 999` to evict all current block proposals, restart collation. Error stays the same with session 364&#xD;&#xA;- shutdown all collators, resync a collator from scratch from an archive node, start collation. same error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="30746" PostHistoryTypeId="2" PostId="7818" RevisionGUID="e5a0af59-a0cc-468c-871c-e1794b849820" CreationDate="2023-03-28T02:43:44.153" UserId="83" Text="In the Moonbeam Unified documentation [here][1], it says that Moonbeam natively supports _&quot;Ethereum-style address (H160 format), which is 40+2 hex-characters long, in a Substrate based chain&quot;_ and ECDSA keys.&#xD;&#xA;&#xD;&#xA;If I create an a Moonbeam account using Polkadot.js by following their documentation [here][2], by enabling in-browser account generation and storage [here][3], then create a Moonbeam account [here][4], and then select private key instead of mnemonic seed, it generates a Public key (hex) account 0xc_____ that is 40 chars long (formatted as hex with the 0x prefix providing an +2 extra chars), which corresponds to the _&quot;40+2 hex-characters long&quot;_ _&quot;Ethereum-style address (H160 format)&quot;_ address mentioned in the Moonbeam documentation that provides Ethereum compatibility on the Moonbeam Substrate-based parachain. It is accompanied by an associated &quot;ethereum private key&quot; 0xy_____ that is 64 chars long, _&quot;which can be used to sign transactions in the Ethereum side of the chain&quot;_, for Ethereum-side EVM functions like balance and smart contract interactions. This Moonbeam address _&quot;is mapped into a storage slot inside the Substrate Balance pallet to a Substrate-style address (H256 format)&quot;_, however I can only know _&quot;the private key of the H160 address, and not of the mapped version. Therefore, she is unable to send transactions with her H256 address and is limited only to do read-only operations through Substrate’s API&quot;_. So they say I need another Substrate-style address (H256 format) matching a different private key to be able to operate in the Substrate-side of the Moonbeam parachain, to be able to sign transactions for balance interactions, staking, and governance, and it would need to maintain a minimum account balance (existential deposit).&#xD;&#xA;&#xD;&#xA;The Moonbeam Unified documentation [here][1] then says that the solution for that is with Moonbeam **Unified Accounts** where I _&quot;will only need a single H160 address, with its corresponding private key, to do everything we mentioned above, including both EVM and Substrate functions.&quot;_, so there is only one associated private key necessary, the account has no existential deposit requirement, and that single account can interact with EVM, non-EVM, and Substrate native assets like Moonbeam's native GLMR token.&#xD;&#xA;&#xD;&#xA;Based on reviewing Discord discussions I found Moonbeam admins saying that they achieved that by changing the underlying Substrate layer accounts to be Ethereum-like, so on Moonbeam you only use need to use a single account to make Substrate and web3 RPC queries since they map to the same storage. They say the _&quot;unified accounts feature makes accounts and keys Ethereum-like on Moonbeam/Moonriver to reduce friction for EVM compatible projects to deploy on Moonbeam/Moonriver&quot;_ since they say they are _&quot;solely focused towards improving and specializing in an Ethereum compatibility feature set, along with being a developer-centric platform. This includes adding tools like Solidity based smart contracts, Metamask, Truffle, Remix, Hardhat, a fully functional EVM, web3 RPC's&quot;_.&#xD;&#xA;&#xD;&#xA;But I don't understand why when I generate a Moonbeam account with `subkey` it generates an output like the following example:&#xD;&#xA;```bash&#xD;&#xA;docker run -it --pull=always docker.io/parity/subkey:latest generate --network moonbeam --scheme ecdsa&#xD;&#xA;&#xD;&#xA;Secret phrase:       ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ (default is 12 words)&#xD;&#xA;  Network ID:        moonbeam&#xD;&#xA;  Secret seed:       0xz_____ (64 chars long, formatted as hex)&#xD;&#xA;  Public key (hex):  0xb_____ (64 chars long, formatted as hex)&#xD;&#xA;  Account ID:        0xb_____ (same key as above)&#xD;&#xA;  Public key (SS58): V_____ (49 chars long, formatted as hex)&#xD;&#xA;  SS58 Address:      V_____ (same key as above)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This doesn't look like a Moonbeam Unified Account since the Public key (hex) would need to be a _&quot;40+2 hex-characters long&quot;_ _&quot;Ethereum-style address (H160 format)&quot;_ address that was mentioned earlier. However, the Public key (hex) is 64 characters long, formatted as hex (+2), so it is still just the Substrate-style address (H256 format), where the Moonbeam [SS58 address type prefix][5] is `V`. If I then run `subkey inspect --public 0xb_____` I can view its SS58 address on the default Substrate network that uses Substrate SS58 address prefix of `5`.&#xD;&#xA;&#xD;&#xA;My first concern was that the private key may only be able to operate on the Substrate-side of the Moonbeam parachain, but not be able to interact with the Ethereum-side of the chain, which would be an inconvenience. So I tried to import the account that was generated with Subkey into Polkadot.js by going to https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/accounts, and clicking &quot;Account&quot;, but when I entered the Subkey generated &quot;Secret phrase&quot; into the  &quot;mnemonic seed&quot; label input field it returned a different Public key (hex) than was generated by Subkey, and when I entered the Subkey generated &quot;Secret seed&quot; into the &quot;ethereum private key&quot; label input field it also returned a different Public key (hex) than was generated by Subkey. I even tried using Metamask, connecting to Moonbeam, and entering the Subkey generated &quot;Secret phrase&quot; into the &quot;Private key&quot; field&quot;, but that also returned a different Public key (hex) than was generated by Subkey. &#xD;&#xA;I think that maybe Polkadot.js Apps should be updated so the &quot;mnemonic seed&quot; input field label should say &quot;ethereum mnemonic seed&quot;.&#xD;&#xA;&#xD;&#xA;For context, in the past I have simply created Moonbeam accounts on the Ethereum Network (Ethereum-style H160 address) and successfully used that for nominating collators on Moonbeam. Let's say for example one of those addresses was 0xa_____, I can go to https://etherscan.io/address/0xa_____ where it shows my balance of ETH, ERC-20 tokens, and ERC-721 NFTs, and in the &quot;Multichain Address&quot; section it says &quot;1 address found via Blockscan&quot;, and if I click the link it leads me to https://moonscan.io/address/0xa_____, where it shows my balance in GLMR. I can also import that 0xa_____ address into https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/accounts. And lastly, I can go to https://sub.id/0xa_____/balances and it shows only my GLMR and MOVR balance associated with that account, but not my account balance on other chains that are using the ethereum private key associated with that address, like my ETH balance, and not the balance of my accounts on other Substrate-based chains like DOT.&#xD;&#xA;&#xD;&#xA;Also in the Moonbeam documentation [here][6] they show numerous options of how to generate an Ethereum address for the Moonbeam network using its unified account system, where they say _&quot;if you have an existing Ethereum account AND its associated private key, congrats! You already have a valid Moonbeam address&quot;_. But Moonbeam doesn't mention Subkey as an option.&#xD;&#xA;&#xD;&#xA;**Question:** So since Subkey is one of my favourite tool for generating keys for Substrate-based chains. My question is, why doesn't Subkey appear to generate a Moonbeam Unified Account when I specify those options in the Subkey CLI, is it because Subkey CLI is only generating Substrate-based private keys instead of ethereum private key that is necessary? And if it doesn't generate a Moonbeam Unified Accounts, what is the purpose generating Moonbeam network accounts using Subkey that aren't Moonbeam Unified Accounts, is it just a legacy option that only worked prior to the introduction of Moonbeam Unified Accounts? And also in that case, shouldn't the `subkey generate ... --network moonbeam` and `--network moonriver` options be removed until such time as it supports Moonbeam Unified Accounts?&#xD;&#xA;The reason for the concern is if someone didn't follow the Moonbeam instructions and generated what they though was a valid Moonbeam account with `subkey generate --network moonbeam --scheme ecdsa`, and then sent some GLMR tokens to the associated Public key (hex), how would they be able to access those GLMR tokens or wouldn't they be recoverable unless Moonbeam switched back to supporting the Substrate-style address (H256 format), which I suspect would be highly unlikely&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.moonbeam.network/learn/features/unified-accounts/&#xD;&#xA;  [2]: https://docs.moonbeam.network/tokens/connect/polkadotjs/&#xD;&#xA;  [3]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/settings&#xD;&#xA;  [4]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/accounts&#xD;&#xA;  [5]: https://wiki.polkadot.network/docs/learn-account-advanced&#xD;&#xA;  [6]: https://moonbeam.foundation/tutorials/how-to-create-a-moonbeam-ethereum-address/" ContentLicense="CC BY-SA 4.0" />
  <row Id="30748" PostHistoryTypeId="1" PostId="7818" RevisionGUID="e5a0af59-a0cc-468c-871c-e1794b849820" CreationDate="2023-03-28T02:43:44.153" UserId="83" Text="How to generate a Moonbeam Unified Account using Subkey?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30749" PostHistoryTypeId="3" PostId="7818" RevisionGUID="e5a0af59-a0cc-468c-871c-e1794b849820" CreationDate="2023-03-28T02:43:44.153" UserId="83" Text="|evm|account|moonbeam|subkey|ecdsa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30750" PostHistoryTypeId="50" PostId="4617" RevisionGUID="0be2bf3a-c8e0-4e25-8d75-179583d3db99" CreationDate="2023-03-28T03:07:11.083" UserId="-1" />
  <row Id="30751" PostHistoryTypeId="5" PostId="7818" RevisionGUID="5d014bac-9410-44c8-9a37-dc0829da53ba" CreationDate="2023-03-28T03:17:55.357" UserId="83" Comment="slight extension to the question" Text="In the Moonbeam Unified documentation [here][1], it says that Moonbeam natively supports _&quot;Ethereum-style address (H160 format), which is 40+2 hex-characters long, in a Substrate based chain&quot;_ and ECDSA keys.&#xD;&#xA;&#xD;&#xA;If I create an a Moonbeam account using Polkadot.js by following their documentation [here][2], by enabling in-browser account generation and storage [here][3], then create a Moonbeam account [here][4], and then select private key instead of mnemonic seed, it generates a Public key (hex) account 0xc_____ that is 40 chars long (formatted as hex with the 0x prefix providing an +2 extra chars), which corresponds to the _&quot;40+2 hex-characters long&quot;_ _&quot;Ethereum-style address (H160 format)&quot;_ address mentioned in the Moonbeam documentation that provides Ethereum compatibility on the Moonbeam Substrate-based parachain. It is accompanied by an associated &quot;ethereum private key&quot; 0xy_____ that is 64 chars long, _&quot;which can be used to sign transactions in the Ethereum side of the chain&quot;_, for Ethereum-side EVM functions like balance and smart contract interactions. This Moonbeam address _&quot;is mapped into a storage slot inside the Substrate Balance pallet to a Substrate-style address (H256 format)&quot;_, however I can only know _&quot;the private key of the H160 address, and not of the mapped version. Therefore, she is unable to send transactions with her H256 address and is limited only to do read-only operations through Substrate’s API&quot;_. So they say I need another Substrate-style address (H256 format) matching a different private key to be able to operate in the Substrate-side of the Moonbeam parachain, to be able to sign transactions for balance interactions, staking, and governance, and it would need to maintain a minimum account balance (existential deposit).&#xD;&#xA;&#xD;&#xA;The Moonbeam Unified documentation [here][1] then says that the solution for that is with Moonbeam **Unified Accounts** where I _&quot;will only need a single H160 address, with its corresponding private key, to do everything we mentioned above, including both EVM and Substrate functions.&quot;_, so there is only one associated private key necessary, the account has no existential deposit requirement, and that single account can interact with EVM, non-EVM, and Substrate native assets like Moonbeam's native GLMR token.&#xD;&#xA;&#xD;&#xA;Based on reviewing Discord discussions I found Moonbeam admins saying that they achieved that by changing the underlying Substrate layer accounts to be Ethereum-like, so on Moonbeam you only use need to use a single account to make Substrate and web3 RPC queries since they map to the same storage. They say the _&quot;unified accounts feature makes accounts and keys Ethereum-like on Moonbeam/Moonriver to reduce friction for EVM compatible projects to deploy on Moonbeam/Moonriver&quot;_ since they say they are _&quot;solely focused towards improving and specializing in an Ethereum compatibility feature set, along with being a developer-centric platform. This includes adding tools like Solidity based smart contracts, Metamask, Truffle, Remix, Hardhat, a fully functional EVM, web3 RPC's&quot;_.&#xD;&#xA;&#xD;&#xA;But I don't understand why when I generate a Moonbeam account with `subkey` it generates an output like the following example:&#xD;&#xA;```bash&#xD;&#xA;docker run -it --pull=always docker.io/parity/subkey:latest generate --network moonbeam --scheme ecdsa&#xD;&#xA;&#xD;&#xA;Secret phrase:       ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ (default is 12 words)&#xD;&#xA;  Network ID:        moonbeam&#xD;&#xA;  Secret seed:       0xz_____ (64 chars long, formatted as hex)&#xD;&#xA;  Public key (hex):  0xb_____ (64 chars long, formatted as hex)&#xD;&#xA;  Account ID:        0xb_____ (same key as above)&#xD;&#xA;  Public key (SS58): V_____ (49 chars long, formatted as hex)&#xD;&#xA;  SS58 Address:      V_____ (same key as above)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This doesn't look like a Moonbeam Unified Account since the Public key (hex) would need to be a _&quot;40+2 hex-characters long&quot;_ _&quot;Ethereum-style address (H160 format)&quot;_ address that was mentioned earlier. However, the Public key (hex) is 64 characters long, formatted as hex (+2), so it is still just the Substrate-style address (H256 format), where the Moonbeam [SS58 address type prefix][5] is `V`. If I then run `subkey inspect --public 0xb_____` I can view its SS58 address on the default Substrate network that uses Substrate SS58 address prefix of `5`.&#xD;&#xA;&#xD;&#xA;My first concern was that the private key may only be able to operate on the Substrate-side of the Moonbeam parachain, but not be able to interact with the Ethereum-side of the chain, which would be an inconvenience. So I tried to import the account that was generated with Subkey into Polkadot.js by going to https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/accounts, and clicking &quot;Account&quot;, but when I entered the Subkey generated &quot;Secret phrase&quot; into the  &quot;mnemonic seed&quot; label input field it returned a different Public key (hex) than was generated by Subkey, and when I entered the Subkey generated &quot;Secret seed&quot; into the &quot;ethereum private key&quot; label input field it also returned a different Public key (hex) than was generated by Subkey. I even tried using Metamask, connecting to Moonbeam, and entering the Subkey generated &quot;Secret phrase&quot; into the &quot;Private key&quot; field&quot;, but that also returned a different Public key (hex) than was generated by Subkey. &#xD;&#xA;I think that maybe Polkadot.js Apps should be updated so the &quot;mnemonic seed&quot; input field label should say &quot;ethereum mnemonic seed&quot;.&#xD;&#xA;&#xD;&#xA;For context, in the past I have simply created Moonbeam accounts on the Ethereum Network (Ethereum-style H160 address) and successfully used that for nominating collators on Moonbeam. Let's say for example one of those addresses was 0xa_____, I can go to https://etherscan.io/address/0xa_____ where it shows my balance of ETH, ERC-20 tokens, and ERC-721 NFTs, and in the &quot;Multichain Address&quot; section it says &quot;1 address found via Blockscan&quot;, and if I click the link it leads me to https://moonscan.io/address/0xa_____, where it shows my balance in GLMR. I can also import that 0xa_____ address into https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/accounts. And lastly, I can go to https://sub.id/0xa_____/balances and it shows only my GLMR and MOVR balance associated with that account, but not my account balance on other chains that are using the ethereum private key associated with that address, like my ETH balance, and not the balance of my accounts on other Substrate-based chains like DOT.&#xD;&#xA;&#xD;&#xA;Also in the Moonbeam documentation [here][6] they show numerous options of how to generate an Ethereum address for the Moonbeam network using its unified account system, where they say _&quot;if you have an existing Ethereum account AND its associated private key, congrats! You already have a valid Moonbeam address&quot;_. But Moonbeam doesn't mention Subkey as an option.&#xD;&#xA;&#xD;&#xA;**Question:** So since Subkey is one of my favourite tool for generating keys for Substrate-based chains. My question is, why doesn't Subkey appear to generate a Moonbeam Unified Account when I specify those options in the Subkey CLI, is it because Subkey CLI is only generating Substrate-based private keys instead of ethereum private key that is necessary? And if it doesn't generate a Moonbeam Unified Accounts, what is the purpose generating Moonbeam network accounts using Subkey that aren't Moonbeam Unified Accounts, is it just a legacy option that only worked prior to the introduction of Moonbeam Unified Accounts? And also in that case, shouldn't the `subkey generate ... --network moonbeam` and `--network moonriver` options be removed until such time as it supports Moonbeam Unified Accounts?&#xD;&#xA;The reason for the concern is if someone didn't follow the Moonbeam instructions and generated what they thought was a valid Moonbeam account with `subkey generate --network moonbeam --scheme ecdsa`, and then sent some GLMR tokens to the associated Public key (hex), how would they be able to access those GLMR tokens or wouldn't they be recoverable unless Moonbeam switched back to supporting the Substrate-style address (H256 format), or does the Moonbeam network work similar to the Acala network [automatically binds accounts][7], such that if GLMR tokens were sent to a Substrate account on the Moonbeam network without an associated H160-format Ethereum EVM address, an EVM address would be automatically generated and bound with that Substrate account? But if that was the case, how would the sender be notified about the automatically generated H160-format Ethereum EVM address that the tokens were sent to, and how would the recipient discover the list of H160-format Ethereum EVM addresses that have been bound to their Substrate account?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.moonbeam.network/learn/features/unified-accounts/&#xD;&#xA;  [2]: https://docs.moonbeam.network/tokens/connect/polkadotjs/&#xD;&#xA;  [3]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/settings&#xD;&#xA;  [4]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/accounts&#xD;&#xA;  [5]: https://wiki.polkadot.network/docs/learn-account-advanced&#xD;&#xA;  [6]: https://moonbeam.foundation/tutorials/how-to-create-a-moonbeam-ethereum-address/&#xD;&#xA;  [7]: https://wiki.acala.network/build/development-guide/smart-contracts/get-started-evm/evm-account#1.-bind-an-auto-generate-evm-account" ContentLicense="CC BY-SA 4.0" />
  <row Id="30752" PostHistoryTypeId="2" PostId="7819" RevisionGUID="c9cf3004-9bb4-4009-bdc9-e8097e0d5f4d" CreationDate="2023-03-28T03:28:20.343" UserId="372" Text="I'm trying to call my node's `chain_getBlock` RPC method. I expect to provide a block hash, and get back a complete block.&#xD;&#xA;&#xD;&#xA;For starters, I've confirmed that the call I plan to make works as expected when just using `curl` directly.&#xD;&#xA;```sh&#xD;&#xA;# This call works&#xD;&#xA;$ curl http://127.0.0.1:9933 -H &quot;Content-Type:application/json;charset=utf-8&quot; -d '{&quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;id&quot;:1, &quot;method&quot;:&quot;chain_getBlock&quot;, &quot;params&quot;: [&quot;505914d65fcf1049e630441127ca8cba338ff7f048a06508e2f987514125d481&quot;]}'&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:{&quot;block&quot;:{&quot;header&quot;:{&quot;parentHash&quot;:&quot;0x3b761bd2ff69f4fe670c0f0911b6de1d83ee615830aed0693421f9d95fcde6e3&quot;,&quot;number&quot;:&quot;0x1&quot;,&quot;stateRoot&quot;:&quot;0x55a6d4664a0bccd89e68e60b7de8644121ce03094fb0caa13a84490ab396191c&quot;,&quot;extrinsicsRoot&quot;:&quot;0x03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314&quot;,&quot;digest&quot;:{&quot;logs&quot;:[&quot;0x0661757261203ac5602100000000&quot;,&quot;0x05617572610101c6dcdb663e80f4d02c07f0d2266b24339a514e3e41c155e65eae978ec051e64d1978f647c12a6c2022feb2b9e2c7e1959ed1fb849b1cb2294dab729f4942248e&quot;]}},&quot;extrinsics&quot;:[]},&quot;justifications&quot;:null},&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I try to make the exact same call from Rust code, and I get an error. I'm not clear how my two requests are different or how to debug further.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use jsonrpsee::{&#xD;&#xA;    core::client::ClientT,&#xD;&#xA;    http_client::HttpClientBuilder,&#xD;&#xA;    rpc_params,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; anyhow::Result&lt;()&gt; {&#xD;&#xA;    let client = HttpClientBuilder::default().build(&quot;http://localhost:9933&quot;)?;&#xD;&#xA;&#xD;&#xA;    let s = String::from(&quot;505914d65fcf1049e630441127ca8cba338ff7f048a06508e2f987514125d481&quot;);&#xD;&#xA;    let params = rpc_params!{s};&#xD;&#xA;    &#xD;&#xA;    let rpc_response: Result&lt;Option&lt;String&gt;, _&gt; = client.request(&quot;chain_getBlock&quot;, params).await;&#xD;&#xA;&#xD;&#xA;    match rpc_response {&#xD;&#xA;        Ok(Some(s)) =&gt; println!(&quot;ok some {s}&quot;),&#xD;&#xA;        Ok(None) =&gt; println!(&quot;ok none&quot;),&#xD;&#xA;        Err(e) =&gt; println!(&quot;%%%Error: {e:?}&quot;),&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30754" PostHistoryTypeId="1" PostId="7819" RevisionGUID="c9cf3004-9bb4-4009-bdc9-e8097e0d5f4d" CreationDate="2023-03-28T03:28:20.343" UserId="372" Text="How to call chain_getBlock with jsonrpsee?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30755" PostHistoryTypeId="3" PostId="7819" RevisionGUID="c9cf3004-9bb4-4009-bdc9-e8097e0d5f4d" CreationDate="2023-03-28T03:28:20.343" UserId="372" Text="|json-rpc|jsonrpsee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30756" PostHistoryTypeId="5" PostId="7816" RevisionGUID="37851d52-b150-43ea-9857-b84fc27121a9" CreationDate="2023-03-28T03:28:22.233" UserId="504" Comment="added 16 characters in body" Text="The following problem seems to be pretty deep in the bowels of the para backing process and a quick substrate code study didn't get me there, so i'm looking for help on &#xD;&#xA;- a) what could have gone wrong here, and more importantly&#xD;&#xA;- b) is this state recoverable somehow?&#xD;&#xA;&#xD;&#xA;**Situation:**&#xD;&#xA;&#xD;&#xA;We have a (semi-persistent, networked) `calamari` parachain testnet deployment with a `kusama-staging` relaychain (15 validators / 3 parachains) and noticed over the weekend that the attached 3 parachains all simultaneously stopped producing blocks (they were previously doing so just fine for 4 days).&#xD;&#xA;&#xD;&#xA;Around that time, the following Relaychain logs started appearing in the relay validators and the internal relay nodes of the para clients.&#xD;&#xA;`Could not retrieve session info from rolling session window session=364`&#xD;&#xA;&#xD;&#xA;The relay continues to build and finalize blocks as normal, and the para clients stay in sync with it. They also continue peering with each other, produce block candidates and send them to validators for backing, they seem to validate them just fine, but they never become new best blocks.&#xD;&#xA;&#xD;&#xA;Currently `session.currentIndex: u32 =&gt; 427` on the relay (note block candidates are produced for 364)&#xD;&#xA;Relay logs contain large amounts of `Timeout hit - already seconded?` traces but I can't judge whether that's normal or suspicious.&#xD;&#xA;&#xD;&#xA;Longform log of one relayblock with backing debug info on one of the validators: https://pastebin.com/xiHw75wG&#xD;&#xA;&#xD;&#xA;**Attempts:**&#xD;&#xA;- shutdown all collators except for one, `calamari revert 999` to evict all current block proposals, restart collation. Error stays the same with session 364&#xD;&#xA;- shutdown all collators, resync a collator from scratch from an archive node, start collation. same error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="30757" PostHistoryTypeId="5" PostId="7818" RevisionGUID="a577e8d0-cae6-4428-934d-0486552cf6b1" CreationDate="2023-03-28T03:29:59.357" UserId="83" Comment="update clarity" Text="In the Moonbeam Unified documentation [here][1], it says that Moonbeam natively supports _&quot;Ethereum-style address (H160 format), which is 40+2 hex-characters long, in a Substrate based chain&quot;_ and ECDSA keys.&#xD;&#xA;&#xD;&#xA;If I create an a Moonbeam account using Polkadot.js by following their documentation [here][2], by enabling in-browser account generation and storage [here][3], then create a Moonbeam account [here][4], and then select private key instead of mnemonic seed, it generates a Public key (hex) account 0xc_____ that is 40 chars long (formatted as hex with the 0x prefix providing an +2 extra chars), which corresponds to the _&quot;40+2 hex-characters long&quot;_ _&quot;Ethereum-style address (H160 format)&quot;_ address mentioned in the Moonbeam documentation that provides Ethereum compatibility on the Moonbeam Substrate-based parachain. It is accompanied by an associated &quot;ethereum private key&quot; 0xy_____ that is 64 chars long, _&quot;which can be used to sign transactions in the Ethereum side of the chain&quot;_, for Ethereum-side EVM functions like balance and smart contract interactions. This Moonbeam address _&quot;is mapped into a storage slot inside the Substrate Balance pallet to a Substrate-style address (H256 format)&quot;_, however I can only know _&quot;the private key of the H160 address, and not of the mapped version. Therefore, she is unable to send transactions with her H256 address and is limited only to do read-only operations through Substrate’s API&quot;_. So they say I need another Substrate-style address (H256 format) matching a different private key to be able to operate in the Substrate-side of the Moonbeam parachain, to be able to sign transactions for balance interactions, staking, and governance, and it would need to maintain a minimum account balance (existential deposit).&#xD;&#xA;&#xD;&#xA;The Moonbeam Unified documentation [here][1] then says that the solution for that is with Moonbeam **Unified Accounts** where I _&quot;will only need a single H160 address, with its corresponding private key, to do everything we mentioned above, including both EVM and Substrate functions.&quot;_, so there is only one associated private key necessary, the account has no existential deposit requirement, and that single account can interact with EVM, non-EVM, and Substrate native assets like Moonbeam's native GLMR token.&#xD;&#xA;&#xD;&#xA;Based on reviewing Discord discussions I found Moonbeam admins saying that they achieved that by changing the underlying Substrate layer accounts to be Ethereum-like, so on Moonbeam you only use need to use a single account to make Substrate and web3 RPC queries since they map to the same storage. They say the _&quot;unified accounts feature makes accounts and keys Ethereum-like on Moonbeam/Moonriver to reduce friction for EVM compatible projects to deploy on Moonbeam/Moonriver&quot;_ since they say they are _&quot;solely focused towards improving and specializing in an Ethereum compatibility feature set, along with being a developer-centric platform. This includes adding tools like Solidity based smart contracts, Metamask, Truffle, Remix, Hardhat, a fully functional EVM, web3 RPC's&quot;_.&#xD;&#xA;&#xD;&#xA;But I don't understand why when I generate a Moonbeam account with `subkey` it generates an output like the following example:&#xD;&#xA;```bash&#xD;&#xA;docker run -it --pull=always docker.io/parity/subkey:latest generate --network moonbeam --scheme ecdsa&#xD;&#xA;&#xD;&#xA;Secret phrase:       ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ (default is 12 words)&#xD;&#xA;  Network ID:        moonbeam&#xD;&#xA;  Secret seed:       0xz_____ (64 chars long, formatted as hex)&#xD;&#xA;  Public key (hex):  0xb_____ (64 chars long, formatted as hex)&#xD;&#xA;  Account ID:        0xb_____ (same key as above)&#xD;&#xA;  Public key (SS58): V_____ (49 chars long, formatted as hex)&#xD;&#xA;  SS58 Address:      V_____ (same key as above)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This doesn't look like a Moonbeam Unified Account since the Public key (hex) would need to be a _&quot;40+2 hex-characters long&quot;_ _&quot;Ethereum-style address (H160 format)&quot;_ address that was mentioned earlier. However, the Public key (hex) is 64 characters long, formatted as hex (+2), so it is still just the Substrate-style address (H256 format), where the Moonbeam [SS58 address type prefix][5] is `V`. If I then run `subkey inspect --public 0xb_____` I can view its SS58 address on the default Substrate network that uses Substrate SS58 address prefix of `5`.&#xD;&#xA;&#xD;&#xA;My first concern was that the private key may only be able to operate on the Substrate-side of the Moonbeam parachain, but not be able to interact with the Ethereum-side of the chain, which would be an inconvenience. So I tried to import the account that was generated with Subkey into Polkadot.js by going to https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/accounts, and clicking &quot;Account&quot;, but when I entered the Subkey generated &quot;Secret phrase&quot; into the  &quot;mnemonic seed&quot; label input field it returned a different Public key (hex) than was generated by Subkey, and when I entered the Subkey generated &quot;Secret seed&quot; into the &quot;ethereum private key&quot; label input field it also returned a different Public key (hex) than was generated by Subkey. I even tried using Metamask, connecting to Moonbeam, and entering the Subkey generated &quot;Secret phrase&quot; into the &quot;Private key&quot; field&quot;, but that also returned a different Public key (hex) than was generated by Subkey. &#xD;&#xA;I think that maybe Polkadot.js Apps should be updated so the &quot;mnemonic seed&quot; input field label should say &quot;ethereum mnemonic seed&quot;.&#xD;&#xA;&#xD;&#xA;For context, in the past I have simply created Moonbeam accounts on the Ethereum Network (Ethereum-style H160 address) and successfully used that for nominating collators on Moonbeam. Let's say for example one of those addresses was 0xa_____, I can go to https://etherscan.io/address/0xa_____ where it shows my balance of ETH, ERC-20 tokens, and ERC-721 NFTs, and in the &quot;Multichain Address&quot; section it says &quot;1 address found via Blockscan&quot;, and if I click the link it leads me to https://moonscan.io/address/0xa_____, where it shows my balance in GLMR. I can also import that 0xa_____ address into https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/accounts. And lastly, I can go to https://sub.id/0xa_____/balances and it shows only my GLMR and MOVR balance associated with that account, but not my account balance on other chains that are using the ethereum private key associated with that address, like my ETH balance, and not the balance of my accounts on other Substrate-based chains like DOT.&#xD;&#xA;&#xD;&#xA;Also in the Moonbeam documentation [here][6] they show numerous options of how to generate an Ethereum address for the Moonbeam network using its unified account system, where they say _&quot;if you have an existing Ethereum account AND its associated private key, congrats! You already have a valid Moonbeam address&quot;_. But Moonbeam doesn't mention Subkey as an option.&#xD;&#xA;&#xD;&#xA;**Question:** So since Subkey is one of my favourite tool for generating keys for Substrate-based chains. My question is, why doesn't Subkey appear to generate a Moonbeam Unified Account when I specify those options in the Subkey CLI, is it because Subkey CLI is only generating Substrate-based private keys instead of ethereum private key that is necessary? And if it doesn't generate a Moonbeam Unified Accounts, what is the purpose generating Moonbeam network accounts using Subkey that aren't Moonbeam Unified Accounts, is it just a legacy option that only worked prior to the introduction of Moonbeam Unified Accounts? And also in that case, shouldn't the `subkey generate ... --network moonbeam` and `--network moonriver` options be removed until such time as it supports Moonbeam Unified Accounts?&#xD;&#xA;The reason for the concern is if someone didn't follow the Moonbeam instructions and generated what they thought was a valid Moonbeam account with `subkey generate --network moonbeam --scheme ecdsa`, and then sent some GLMR tokens to the associated Public key (hex), how would they be able to access those GLMR tokens or wouldn't they be recoverable unless Moonbeam switched back to supporting the Substrate-style address (H256 format), or does the Moonbeam network work similar to the Acala network which [automatically binds accounts][7], if that's the case and GLMR tokens were sent to a Substrate account on the Moonbeam network without an associated H160-format Ethereum EVM address, an EVM address would be automatically generated and bound with that Substrate account. But if that was the case, how would the sender be notified about the automatically generated H160-format Ethereum EVM address that the tokens were sent to, and how would the recipient discover the list of H160-format Ethereum EVM addresses that have been bound to their Substrate account?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.moonbeam.network/learn/features/unified-accounts/&#xD;&#xA;  [2]: https://docs.moonbeam.network/tokens/connect/polkadotjs/&#xD;&#xA;  [3]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/settings&#xD;&#xA;  [4]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/accounts&#xD;&#xA;  [5]: https://wiki.polkadot.network/docs/learn-account-advanced&#xD;&#xA;  [6]: https://moonbeam.foundation/tutorials/how-to-create-a-moonbeam-ethereum-address/&#xD;&#xA;  [7]: https://wiki.acala.network/build/development-guide/smart-contracts/get-started-evm/evm-account#1.-bind-an-auto-generate-evm-account" ContentLicense="CC BY-SA 4.0" />
  <row Id="30758" PostHistoryTypeId="5" PostId="7819" RevisionGUID="2abd9adf-9393-4d08-a318-bfae6e39899e" CreationDate="2023-03-28T03:41:34.543" UserId="372" Comment="Added output from running Rust code" Text="I'm trying to call my node's `chain_getBlock` RPC method. I expect to provide a block hash, and get back a complete block.&#xD;&#xA;&#xD;&#xA;For starters, I've confirmed that the call I plan to make works as expected when just using `curl` directly.&#xD;&#xA;```sh&#xD;&#xA;# This call works&#xD;&#xA;$ curl http://127.0.0.1:9933 -H &quot;Content-Type:application/json;charset=utf-8&quot; -d '{&quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;id&quot;:1, &quot;method&quot;:&quot;chain_getBlock&quot;, &quot;params&quot;: [&quot;505914d65fcf1049e630441127ca8cba338ff7f048a06508e2f987514125d481&quot;]}'&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:{&quot;block&quot;:{&quot;header&quot;:{&quot;parentHash&quot;:&quot;0x3b761bd2ff69f4fe670c0f0911b6de1d83ee615830aed0693421f9d95fcde6e3&quot;,&quot;number&quot;:&quot;0x1&quot;,&quot;stateRoot&quot;:&quot;0x55a6d4664a0bccd89e68e60b7de8644121ce03094fb0caa13a84490ab396191c&quot;,&quot;extrinsicsRoot&quot;:&quot;0x03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314&quot;,&quot;digest&quot;:{&quot;logs&quot;:[&quot;0x0661757261203ac5602100000000&quot;,&quot;0x05617572610101c6dcdb663e80f4d02c07f0d2266b24339a514e3e41c155e65eae978ec051e64d1978f647c12a6c2022feb2b9e2c7e1959ed1fb849b1cb2294dab729f4942248e&quot;]}},&quot;extrinsics&quot;:[]},&quot;justifications&quot;:null},&quot;id&quot;:1}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I try to make the exact same call from Rust code, and I get an error. I'm not clear how my two requests are different or how to debug further.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use jsonrpsee::{&#xD;&#xA;    core::client::ClientT,&#xD;&#xA;    http_client::HttpClientBuilder,&#xD;&#xA;    rpc_params,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; anyhow::Result&lt;()&gt; {&#xD;&#xA;    let client = HttpClientBuilder::default().build(&quot;http://localhost:9933&quot;)?;&#xD;&#xA;&#xD;&#xA;    let s = String::from(&quot;505914d65fcf1049e630441127ca8cba338ff7f048a06508e2f987514125d481&quot;);&#xD;&#xA;    let params = rpc_params!{s};&#xD;&#xA;    &#xD;&#xA;    let rpc_response: Result&lt;Option&lt;String&gt;, _&gt; = client.request(&quot;chain_getBlock&quot;, params).await;&#xD;&#xA;&#xD;&#xA;    match rpc_response {&#xD;&#xA;        Ok(Some(s)) =&gt; println!(&quot;ok some {s}&quot;),&#xD;&#xA;        Ok(None) =&gt; println!(&quot;ok none&quot;),&#xD;&#xA;        Err(e) =&gt; println!(&quot;%%%Error: {e:?}&quot;),&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The output from that Rust code is:&#xD;&#xA;`%%%Error: ParseError(Error(&quot;invalid type: map, expected a string&quot;, line: 1, column: 0))`" ContentLicense="CC BY-SA 4.0" />
  <row Id="30759" PostHistoryTypeId="2" PostId="7820" RevisionGUID="738b1b59-f678-449a-abef-aea1a8ffae31" CreationDate="2023-03-28T03:47:23.677" UserId="3594" Text="Here's another using just `subkey`:&#xD;&#xA;```bash&#xD;&#xA;$ HEX=$(printf &quot;modlpy/trsry&quot; | xxd -p)&#xD;&#xA;$ PUBLIC_KEY=$(printf 0x%-64s $HEX | tr &quot; &quot; 0)&#xD;&#xA;$ subkey inspect $PUBLIC_KEY --network kusama --public&#xD;&#xA;Network ID/Version: kusama&#xD;&#xA;  Public key (hex):   0x6d6f646c70792f74727372790000000000000000000000000000000000000000&#xD;&#xA;  Account ID:         0x6d6f646c70792f74727372790000000000000000000000000000000000000000&#xD;&#xA;  Public key (SS58):  F3opxRbN5ZbjJNU511Kj2TLuzFcDq9BGduA9TgiECafpg29&#xD;&#xA;  SS58 Address:       F3opxRbN5ZbjJNU511Kj2TLuzFcDq9BGduA9TgiECafpg29&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30761" PostHistoryTypeId="50" PostId="4816" RevisionGUID="ce4d2b6e-8b88-495c-8657-7277cc6b4437" CreationDate="2023-03-28T04:08:51.147" UserId="-1" />
  <row Id="30766" PostHistoryTypeId="2" PostId="7822" RevisionGUID="b9d74a70-811f-4d87-902d-1e34e904450b" CreationDate="2023-03-28T04:32:07.403" UserId="251" Text="As the error said. The result is a map.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let rpc_response: Result&lt;Option&lt;serde_json::Value&gt;, _&gt; = client.request(&quot;chain_getBlock&quot;, params).await;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30768" PostHistoryTypeId="50" PostId="3931" RevisionGUID="f769eca9-7d4e-4627-ab3b-58c39624dc5d" CreationDate="2023-03-28T05:04:15.593" UserId="-1" />
  <row Id="30773" PostHistoryTypeId="2" PostId="7824" RevisionGUID="ad47218c-01bd-4198-a8d8-396a657a4234" CreationDate="2023-03-28T07:48:57.307" UserId="4016" Text="I recently came across this issue on a fresh Mac with an M2 chip. &#xD;&#xA;&#xD;&#xA;After running the following commands, it seems to have been resolved:&#xD;&#xA;&#xD;&#xA;- cargo clean&#xD;&#xA;- cargo update&#xD;&#xA;- rustup update&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30775" PostHistoryTypeId="2" PostId="7825" RevisionGUID="9d48b75e-03ae-4974-aa98-ac1bb5691583" CreationDate="2023-03-28T08:16:28.907" UserId="3317" Text="I think that your understanding is a bit off here. For `create_exchange` you need to pass an `AssetId` as parameter, which is native to the runtime (i.e. [pallet-assets][1]), not a smart contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="30777" PostHistoryTypeId="2" PostId="7826" RevisionGUID="7a88c873-0e5d-4d85-88a2-1ce77a476a17" CreationDate="2023-03-28T08:32:16.570" UserId="227" Text="A possible misunderstanding here could be that you think the dry-run has any effect. You linked this screenshot:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;The dry-run here doesn't actually result in any effect on-chain, it's purely a preview of what would happen if you press &quot;Next&quot;.&#xD;&#xA;&#xD;&#xA;So if you haven't done, you actually need to submit this transaction (via &quot;Next&quot;) to have any storage mutations persisted on-chain.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/n5KTN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30779" PostHistoryTypeId="2" PostId="7827" RevisionGUID="26407c25-6571-45fc-b5d2-1306f3b0fcce" CreationDate="2023-03-28T10:42:55.437" UserId="474" Text="&gt; 1. Build a local blockchain&#xD;&#xA;&gt; 2. run cargo install subxt-cli&#xD;&#xA;&gt; 3. run subxt metadata -f bytes &gt; metadata.scale&#xD;&#xA;&#xD;&#xA;How are you building/starting a local blockchain node? The error `error: Failed to decode metadata: Could not decode RuntimeMetadataPrefixed.1` implies that there is something wrong with your `metadata.scale` file. &#xD;&#xA;&#xD;&#xA;Perhaps you ran into an error running `subxt metadata -f bytes &gt; metadata.scale` and the file is empty or doesn't have the expected contents in (how big is it? Can you open it with a text editor?). Perhaps the node you started has some sort of issue. I'd need more information to be able to help with this.&#xD;&#xA;&#xD;&#xA;&gt; By the way, I find if I don't specify the subxt as subxt = { version=&quot;0.27.0&quot;, default-features = false, features = [&quot;jsonrpsee-web&quot;] } in my Cargo.toml, it seem like impossible to work with Yew.rs&#xD;&#xA;&#xD;&#xA;That's right; the default features enabled in Subxt aren't compatible with compiling it to WASM, since it relies (by default) on Substrate bits and Jsonrpsee bits that themselves don't compile to WASM.&#xD;&#xA;&#xD;&#xA;As you've found, `default-features = false, features = [&quot;jsonrpsee-web&quot;]` is required to disable the features which aren't WASM compatible, and then `jsonrpsee-web` provides a WASM (web) compatible RPC client :)&#xD;&#xA;&#xD;&#xA;This does need to be better documented, which is something I will be working on much more in the coming months (notably here; documenting common user flows eg using with wasm).&#xD;&#xA;&#xD;&#xA;&gt; no function or associated item named `new` found for struct `OnlineClient` in the current scope&#xD;&#xA;&#xD;&#xA;The `OnlineClient::new()` method is available in these cases:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(any(&#xD;&#xA;    feature = &quot;jsonrpsee-ws&quot;,&#xD;&#xA;    all(feature = &quot;jsonrpsee-web&quot;, target_arch = &quot;wasm32&quot;)&#xD;&#xA;))]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In other words, either the `jsonrpsee-ws` feature needs to be enabled, _or_ the `jsonrpsee-web` feature needs to be enabled _and_ you're compiling to WASM. My best guess is that you're using the `jsonrpsee-web` feature but not compiling to WASM, though again I'd need more information :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="30781" PostHistoryTypeId="2" PostId="7828" RevisionGUID="0045effe-bbc7-457f-a5ab-c03b609b9385" CreationDate="2023-03-28T10:44:28.657" UserId="474" Text="I posted this at https://substrate.stackexchange.com/posts/7827 too but just for completeness:&#xD;&#xA;&#xD;&#xA;&gt; 1. Build a local blockchain&#xD;&#xA;&gt; 2. run cargo install subxt-cli&#xD;&#xA;&gt; 3. run subxt metadata -f bytes &gt; metadata.scale&#xD;&#xA;&#xD;&#xA;How are you building/starting a local blockchain node? The error `error: Failed to decode metadata: Could not decode RuntimeMetadataPrefixed.1` implies that there is something wrong with your `metadata.scale` file. &#xD;&#xA;&#xD;&#xA;Perhaps you ran into an error running `subxt metadata -f bytes &gt; metadata.scale` and the file is empty or doesn't have the expected contents in (how big is it? Can you open it with a text editor?). Perhaps the node you started has some sort of issue. I'd need more information to be able to help with this.**strong text**" ContentLicense="CC BY-SA 4.0" />
  <row Id="30783" PostHistoryTypeId="2" PostId="7829" RevisionGUID="def71c85-aac3-4975-b815-bfcdb0fc7dc7" CreationDate="2023-03-28T11:13:30.730" UserId="94" Text="Good question and sorry for the confusion - the comment is poorly chosen.  &#xD;&#xA;&#xD;&#xA;It indicates that the worst-case Proof Size limit could not be estimated. This can come from either:&#xD;&#xA;- The pallet of the storage item does not expose storage information. You can check this by looking for `#[pallet::without_storage_info]` in the accessed pallet. It needs to be removed in order to have correct proof benchmarking.&#xD;&#xA;- The storage item is not `MaxEncodedLen` bound (MEL). This implies the former. As soon as there is a not MEL bound storage item in a pallet, it cannot expose these storage info.&#xD;&#xA;&#xD;&#xA;If your pallet is missing this exact information then FRAME measures the proof size that was required, hence the indication `mode: Measured` instead of `mode: MaxEncodedLen`. The impact is that the results may not reflect the worst-case scenario. So to say; there could scenarios to exploit that and inflate the PoV over the pre-dispatch estimations. In the worst case this means missed block production slots and stalled para-chains.  &#xD;&#xA;*However* for relay chains this is not an issue, since they do not produce proofs. &#xD;&#xA;You can basically ignore that for all pallets that will only be used on relay/solo chains.&#xD;&#xA;&#xD;&#xA;Storage bounding pallets is not that easy. We [tried](https://github.com/paritytech/substrate/issues/8629) in Substrate and it is quite time intensive. One tip is to use the [Preimage](https://github.com/paritytech/substrate/pull/11649) pallet for large blobs instead of trying to re-implement something like that.&#xD;&#xA;&#xD;&#xA;### MEL&#xD;&#xA;&#xD;&#xA;A `T: MaxEncodedLen` bound expresses that all instances of `T` will always encode to at most `MaxEncodedLen::max_encoded_len()` bytes. This is important since it provides up-front information about the worst case storage requirement for encoding any `T`. It is used to calculate the worst-case size of the Proof." ContentLicense="CC BY-SA 4.0" />
  <row Id="30785" PostHistoryTypeId="2" PostId="7830" RevisionGUID="0107f5b0-2792-46e5-a4ad-ea2f14a32fff" CreationDate="2023-03-28T11:35:43.417" UserId="4018" Text="after downgrading to nightly 1.68, and you need to cargo build --package node-template --release again." ContentLicense="CC BY-SA 4.0" />
  <row Id="30787" PostHistoryTypeId="2" PostId="7831" RevisionGUID="888b390f-839e-4167-803f-698c8633b636" CreationDate="2023-03-28T13:50:28.227" UserId="4019" Text="we create a local blockchain using substrate following this steps:- (https://docs.substrate.io/tutorials/get-started/build-local-blockchain/) upto cargo build --release steps is completed.then i using command ./target/release/node-template --dev.but,I face this error.&#xD;&#xA;&#xD;&#xA;Err message:- &#xD;&#xA;2023-03-28 18:14:36 Substrate Node&#xD;&#xA;2023-03-28 18:14:36 ✌️ version 3.0.0-dev-ae49625b5f7&#xD;&#xA;2023-03-28 18:14:36 ❤️ by Parity Technologies admin@parity.io, 2017-2023&#xD;&#xA;2023-03-28 18:14:36  Chain specification: Development&#xD;&#xA;2023-03-28 18:14:36  Node name: encouraging-activity-5914&#xD;&#xA;2023-03-28 18:14:36  Role: AUTHORITY&#xD;&#xA;2023-03-28 18:14:36  Database: RocksDb at /tmp/substraterJpkV8/chains/dev/db/full&#xD;&#xA;2023-03-28 18:14:36 ⛓ Native runtime: node-268 (substrate-node-0.tx2.au10)&#xD;&#xA;2023-03-28 18:14:45 [0]  generated 1 npos voters, 1 from validators and 0 nominators&#xD;&#xA;2023-03-28 18:14:45 [0]  generated 1 npos targets&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;))) 2023-03-28 18:14:45 Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;&#xD;&#xA;and i attached screenshoot to this message.&#xD;&#xA;&#xD;&#xA;Thanks[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dU8xv.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30789" PostHistoryTypeId="1" PostId="7831" RevisionGUID="888b390f-839e-4167-803f-698c8633b636" CreationDate="2023-03-28T13:50:28.227" UserId="4019" Text="Substrate Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="30790" PostHistoryTypeId="3" PostId="7831" RevisionGUID="888b390f-839e-4167-803f-698c8633b636" CreationDate="2023-03-28T13:50:28.227" UserId="4019" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30791" PostHistoryTypeId="5" PostId="7831" RevisionGUID="8b010d77-d553-40f2-be14-f4c263676e6b" CreationDate="2023-03-28T13:58:59.687" UserId="251" Comment="added 8 characters in body" Text="we create a local blockchain using substrate following this steps:- (https://docs.substrate.io/tutorials/get-started/build-local-blockchain/) upto cargo build --release steps is completed.then i using command ./target/release/node-template --dev.but,I face this error.&#xD;&#xA;&#xD;&#xA;Err message:- &#xD;&#xA;```&#xD;&#xA;2023-03-28 18:14:36 Substrate Node&#xD;&#xA;2023-03-28 18:14:36 ✌️ version 3.0.0-dev-ae49625b5f7&#xD;&#xA;2023-03-28 18:14:36 ❤️ by Parity Technologies admin@parity.io, 2017-2023&#xD;&#xA;2023-03-28 18:14:36  Chain specification: Development&#xD;&#xA;2023-03-28 18:14:36  Node name: encouraging-activity-5914&#xD;&#xA;2023-03-28 18:14:36  Role: AUTHORITY&#xD;&#xA;2023-03-28 18:14:36  Database: RocksDb at /tmp/substraterJpkV8/chains/dev/db/full&#xD;&#xA;2023-03-28 18:14:36 ⛓ Native runtime: node-268 (substrate-node-0.tx2.au10)&#xD;&#xA;2023-03-28 18:14:45 [0]  generated 1 npos voters, 1 from validators and 0 nominators&#xD;&#xA;2023-03-28 18:14:45 [0]  generated 1 npos targets&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;))) 2023-03-28 18:14:45 Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;and i attached screenshoot to this message.&#xD;&#xA;&#xD;&#xA;Thanks[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dU8xv.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30792" PostHistoryTypeId="2" PostId="7832" RevisionGUID="535bbabd-490b-4b7e-8747-2b3493bc2649" CreationDate="2023-03-28T14:03:30.130" UserId="3319" Text="im retreiving the list of authorities from aura in the pallet like this:&#xD;&#xA;&#xD;&#xA;    let authorities = pallet_aura::Pallet::&lt;T&gt;::authorities();&#xD;&#xA;&#xD;&#xA;this should return a `Vec&lt;T::AuthorityId&gt;` which is supposedly the same as `sp_core::sr25519::Public` since `AuthorityId` in Aura is defined like that [here][1], so i did the following:&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    authorities.into_iter().map(|id| Public::from_h256(H256::from_slice(id.as_slice())));&#xD;&#xA;&#xD;&#xA;im doing it this way because for some reason in AuthorityId i dont have access to any method like `sp_core::sr25519::Public`, (i specifically need the [verify][2] method) which is why in the pallet it throws an error:&#xD;&#xA;&#xD;&#xA;    id.as_slice() method not found in `&lt;T as pallet_aura::Config&gt;::AuthorityId`&#xD;&#xA;&#xD;&#xA;now, having said that, in outer node if i call the runtime api [authorities()][3] and i try to create sr25519 keys from it, it works:&#xD;&#xA;&#xD;&#xA;	let authorities= client&#xD;&#xA;		.runtime_api()&#xD;&#xA;		.authorities(&amp;block_id)&#xD;&#xA;		.expect(&quot;error&quot;);&#xD;&#xA;	authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|pubkey| Public::from_h256(H256::from_slice(pubkey.as_slice())))&#xD;&#xA;		.collect()&#xD;&#xA;&#xD;&#xA;- why is this happening, even though its completely the same function, and are there simpler ways to retreive the Public keys of the current authorities that does not require all this mess?&#xD;&#xA;&#xD;&#xA;Ps: i tried importing the trait `use sp_core::ByteArray;` but it still didn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://releases.parity.io/substrate-rustdoc/sp_consensus_aura/sr25519/type.AuthorityId.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sp_application_crypto/trait.RuntimePublic.html#tymethod.verify&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_consensus_aura/trait.AuraApi.html#method.authorities" ContentLicense="CC BY-SA 4.0" />
  <row Id="30794" PostHistoryTypeId="1" PostId="7832" RevisionGUID="535bbabd-490b-4b7e-8747-2b3493bc2649" CreationDate="2023-03-28T14:03:30.130" UserId="3319" Text="can't construct sr25519 Public key from AuthorityId in pallet but it works in outer node? Same function" ContentLicense="CC BY-SA 4.0" />
  <row Id="30795" PostHistoryTypeId="3" PostId="7832" RevisionGUID="535bbabd-490b-4b7e-8747-2b3493bc2649" CreationDate="2023-03-28T14:03:30.130" UserId="3319" Text="|pallet|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30796" PostHistoryTypeId="5" PostId="7832" RevisionGUID="889cbfa2-54e0-4125-86ba-eb702bc7f018" CreationDate="2023-03-28T14:34:55.143" UserId="3319" Comment="added 62 characters in body" Text="im retreiving the list of authorities from aura in the pallet like this:&#xD;&#xA;&#xD;&#xA;    let authorities = pallet_aura::Pallet::&lt;T&gt;::authorities();&#xD;&#xA;&#xD;&#xA;this should return a `Vec&lt;T::AuthorityId&gt;` which is supposedly the same as `sp_core::sr25519::Public` since `AuthorityId` in Aura is defined like that [here][1], so i did the following:&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    authorities.into_iter().map(|id| Public::from_h256(H256::from_slice(id.as_slice())));&#xD;&#xA;&#xD;&#xA;im doing it this way because for some reason in AuthorityId i dont have access to any method like `sp_core::sr25519::Public`, (i specifically need the [verify][2] method) which is why in the pallet it throws an error:&#xD;&#xA;&#xD;&#xA;    id.as_slice() method not found in `&lt;T as pallet_aura::Config&gt;::AuthorityId`&#xD;&#xA;&#xD;&#xA;now, having said that, in outer node if i call the runtime api [authorities()][3] and i try to create sr25519 keys from it, it works:&#xD;&#xA;&#xD;&#xA;	let authorities= client&#xD;&#xA;		.runtime_api()&#xD;&#xA;		.authorities(&amp;block_id)&#xD;&#xA;		.expect(&quot;error&quot;);&#xD;&#xA;	authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|pubkey| Public::from_h256(H256::from_slice(pubkey.as_slice())))&#xD;&#xA;		.collect()&#xD;&#xA;&#xD;&#xA;- why is this happening, even though its completely the same function, im stuck with `AuthorityId` which has literally zero methods? and are there simpler ways to retreive the Public keys of the current authorities that does not require all this mess?&#xD;&#xA;&#xD;&#xA;Ps: i tried importing the trait `use sp_core::ByteArray;` but it still didn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://releases.parity.io/substrate-rustdoc/sp_consensus_aura/sr25519/type.AuthorityId.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sp_application_crypto/trait.RuntimePublic.html#tymethod.verify&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_consensus_aura/trait.AuraApi.html#method.authorities" ContentLicense="CC BY-SA 4.0" />
  <row Id="30797" PostHistoryTypeId="5" PostId="7832" RevisionGUID="866dff9f-38de-4188-a92b-3046eb80b875" CreationDate="2023-03-28T14:56:24.687" UserId="3319" Comment="added 43 characters in body" Text="im retreiving the list of authorities from aura in the pallet like this:&#xD;&#xA;&#xD;&#xA;    let authorities = pallet_aura::Pallet::&lt;T&gt;::authorities();&#xD;&#xA;&#xD;&#xA;this should return a `Vec&lt;T::AuthorityId&gt;` which is supposedly the same as `sp_core::sr25519::Public` since `AuthorityId` in Aura is defined like that [here][1], so i did the following:&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    authorities.into_iter().map(|id| Public::from_h256(H256::from_slice(id.as_slice())));&#xD;&#xA;&#xD;&#xA;im doing it this way because for some reason in AuthorityId i dont have access to any method like `sp_core::sr25519::Public`, (i specifically need the [verify][2] method) which is why in the pallet it throws an error:&#xD;&#xA;&#xD;&#xA;     no method named `as_slice` found for associated type `&lt;T as pallet_aura::Config&gt;::AuthorityId` in the current scope&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;now, having said that, in outer node if i call the runtime api [authorities()][3] and i try to create sr25519 keys from it, it works:&#xD;&#xA;&#xD;&#xA;	let authorities= client&#xD;&#xA;		.runtime_api()&#xD;&#xA;		.authorities(&amp;block_id)&#xD;&#xA;		.expect(&quot;error&quot;);&#xD;&#xA;	authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|pubkey| Public::from_h256(H256::from_slice(pubkey.as_slice())))&#xD;&#xA;		.collect()&#xD;&#xA;&#xD;&#xA;- why is this happening, even though its completely the same function, im stuck with `AuthorityId` which has literally zero methods? and are there simpler ways to retreive the Public keys of the current authorities that does not require all this mess?&#xD;&#xA;&#xD;&#xA;Ps: i tried importing the trait `use sp_core::ByteArray;` but it still didn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://releases.parity.io/substrate-rustdoc/sp_consensus_aura/sr25519/type.AuthorityId.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sp_application_crypto/trait.RuntimePublic.html#tymethod.verify&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_consensus_aura/trait.AuraApi.html#method.authorities" ContentLicense="CC BY-SA 4.0" />
  <row Id="30798" PostHistoryTypeId="2" PostId="7833" RevisionGUID="a33e3767-9307-4861-bfdf-e9a7b561ef87" CreationDate="2023-03-28T16:10:24.483" UserId="251" Text="Check https://github.com/paritytech/substrate/blob/549165727c3b3c14b6f90011085aaebbeff9d7e3/frame/aura/src/lib.rs#LL72-L76C20.&#xD;&#xA;&#xD;&#xA;Because it doesn't have a `ByteArray` trait bound, you can't do that.&#xD;&#xA;&#xD;&#xA;But it has a `RuntimeAppPublic` trait bound.&#xD;&#xA;&#xD;&#xA;You can import `sp_application_crypto::RuntimeAppPublic` and call `to_raw_vec()` on it.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/549165727c3b3c14b6f90011085aaebbeff9d7e3/primitives/application-crypto/src/traits.rs#L127-L128" ContentLicense="CC BY-SA 4.0" />
  <row Id="30800" PostHistoryTypeId="2" PostId="7834" RevisionGUID="83b0bce5-9a9d-4cb9-8e57-f69419591353" CreationDate="2023-03-28T17:56:03.767" UserId="1757" Text="For a Polkadot parachain (Zeitgeist) query, I need to add the block hash to get historical data. See this example:&#xD;&#xA;&#xD;&#xA;[![Block timestamp query][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0S8Re.png&#xD;&#xA;&#xD;&#xA;When I try to try to run the same query in polkadot.js, I get an error when I try and add a blockHash as a parameter&#xD;&#xA;&#xD;&#xA;// This causes an error - how to provide block hash to this function?&#xD;&#xA;&#xD;&#xA;    const blockHash = &quot;0x52352ca066543d41aacb0c6419e5bb7e2d9ee621b3d8dabe2c2174ce2c5f86c5&quot;&#xD;&#xA;    const unixTimestamp = await api.query.timestamp.now(blockHash);&#xD;&#xA;&#xD;&#xA;could you help me figure out how I should provide this parameter?&#xD;&#xA;&#xD;&#xA;the error:&#xD;&#xA;&#xD;&#xA;    ba@https://polkadot.js.org/apps/modu.ac52cd44a2179bd7.js:1:79374&#xD;&#xA;    overrideNoSub@https://polkadot.js.org/apps/modu.ac52cd44a2179bd7.js:1:91709&#xD;&#xA;    10589/u/&lt;/&lt;@https://polkadot.js.org/apps/modu.ac52cd44a2179bd7.js:1:105234&#xD;&#xA;    10589/u/&lt;/&lt;@https://polkadot.js.org/apps/modu.ac52cd44a2179bd7.js:1:105195&#xD;&#xA;    10589/u/&lt;@https://polkadot.js.org/apps/modu.ac52cd44a2179bd7.js:1:105338&#xD;&#xA;    anonymous/&lt;@https://polkadot.js.org/apps/page.e64d864372c5d12b.js line 1464 &gt; Function:4:49&#xD;&#xA;    anonymous@https://polkadot.js.org/apps/page.e64d864372c5d12b.js line 1464 &gt; Function:7:67&#xD;&#xA;    30145/T&lt;/Z&lt;/&lt;@https://polkadot.js.org/apps/page.e64d864372c5d12b.js:1464:1810" ContentLicense="CC BY-SA 4.0" />
  <row Id="30802" PostHistoryTypeId="1" PostId="7834" RevisionGUID="83b0bce5-9a9d-4cb9-8e57-f69419591353" CreationDate="2023-03-28T17:56:03.767" UserId="1757" Text="Add blockHash parameter to Polkadot.js chainState query" ContentLicense="CC BY-SA 4.0" />
  <row Id="30803" PostHistoryTypeId="3" PostId="7834" RevisionGUID="83b0bce5-9a9d-4cb9-8e57-f69419591353" CreationDate="2023-03-28T17:56:03.767" UserId="1757" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30804" PostHistoryTypeId="2" PostId="7835" RevisionGUID="5f40eb33-f5dc-4460-866f-02b328ef6f28" CreationDate="2023-03-28T18:02:21.650" UserId="3142" Text="What is the best practice for logging in pallets?  Is there any overhead leaving them in at a debug/trace level?  Or should we never use them outside of development?&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;&#xD;&#xA;    log::debug!(&quot;&quot;)" ContentLicense="CC BY-SA 4.0" />
  <row Id="30806" PostHistoryTypeId="1" PostId="7835" RevisionGUID="5f40eb33-f5dc-4460-866f-02b328ef6f28" CreationDate="2023-03-28T18:02:21.650" UserId="3142" Text="Logging best practice for pallet extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="30807" PostHistoryTypeId="3" PostId="7835" RevisionGUID="5f40eb33-f5dc-4460-866f-02b328ef6f28" CreationDate="2023-03-28T18:02:21.650" UserId="3142" Text="|pallet|rust|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30808" PostHistoryTypeId="2" PostId="7836" RevisionGUID="a4ffe54b-700d-4896-9791-c52862225682" CreationDate="2023-03-28T18:16:15.393" UserId="1757" Text="Found the following info (will try):&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/docs/api/examples/promise/read-storage-at/" ContentLicense="CC BY-SA 4.0" />
  <row Id="30810" PostHistoryTypeId="50" PostId="3555" RevisionGUID="51362303-f6f8-487e-96ea-15469eb06bed" CreationDate="2023-03-28T19:01:40.217" UserId="-1" />
  <row Id="30811" PostHistoryTypeId="2" PostId="7837" RevisionGUID="df91e706-2e81-42be-8e33-22672bbcd216" CreationDate="2023-03-28T19:22:22.657" UserId="181" Text="Wondering if anyone knows whether ink! supports AccountIds which are ethereum-style accounts? Let's assume this would be a chain with a [Unified Accounts][1] setup, similar to Moonbeam. In specific, we could assume this would be a chain whose runtime's AccountId type comes from a [signature type][2] also similar to Moonbeam's. &#xD;&#xA;&#xD;&#xA;If it is supported, are there any important considerations?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.moonbeam.network/learn/features/unified-accounts/&#xD;&#xA;  [2]: https://github.com/PureStake/moonbeam/blob/b917fa7ec9c9c31144ae86a024eea887b0cb59c5/primitives/account/src/lib.rs#L100" ContentLicense="CC BY-SA 4.0" />
  <row Id="30813" PostHistoryTypeId="1" PostId="7837" RevisionGUID="df91e706-2e81-42be-8e33-22672bbcd216" CreationDate="2023-03-28T19:22:22.657" UserId="181" Text="Is it possible to use ink! with Ethereum-style accounts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30814" PostHistoryTypeId="3" PostId="7837" RevisionGUID="df91e706-2e81-42be-8e33-22672bbcd216" CreationDate="2023-03-28T19:22:22.657" UserId="181" Text="|account|evm|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30815" PostHistoryTypeId="2" PostId="7838" RevisionGUID="a150b19f-3f11-4590-925e-9bf14296f6df" CreationDate="2023-03-28T19:54:40.703" UserId="380" Text="You can use Ethereum accounts in ink! as long as pallet-contracts is present.&#xD;&#xA;&#xD;&#xA;&gt; You can use ink! on any blockchain that was built with the [Substrate](https://substrate.io)&#xD;&#xA;framework and includes the [`pallet-contracts`](https://github.com/paritytech/substrate/tree/master/frame/contracts)&#xD;&#xA;module.&#xD;&#xA;Substrate does not define specific types for a blockchain, it uses&#xD;&#xA;generic types throughout.&#xD;&#xA;Chains built on Substrate can decide on their own which types they want&#xD;&#xA;to use for e.g. the chain's block number or account id's. For example,&#xD;&#xA;chains that intend to be compatible to Ethereum typically use the same&#xD;&#xA;type as Ethereum for their `AccountId`.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/ink/blob/6fb975d77c61bd08c662e2111c4f35b0e50a3d37/ARCHITECTURE.md?plain=1#L194-L202" ContentLicense="CC BY-SA 4.0" />
  <row Id="30817" PostHistoryTypeId="2" PostId="7839" RevisionGUID="ee4abc83-2f0e-4f63-93ca-03d15d0593e7" CreationDate="2023-03-28T20:09:47.337" UserId="3053" Text="We are seeing the following error whenever an **invalidly encoded** but **properly signed** extrinsic is submitted in our substrate based chain.&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;        &quot;error&quot;: {&#xD;&#xA;            &quot;code&quot;: 1002,&#xD;&#xA;            &quot;message&quot;: &quot;Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n    0: 0x2011df - &lt;unknown&gt;!rust_begin_unwind\n    1: 0x9a20 - &lt;unknown&gt;!core::panicking::panic_fmt::h57b56b1dc717ba48\n    2: 0x1c763d - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\n&quot;,&#xD;&#xA;            &quot;data&quot;: &quot;RuntimeApi(\&quot;Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\\nWASM backtrace:\\n\\n    0: 0x2011df - &lt;unknown&gt;!rust_begin_unwind\\n    1: 0x9a20 - &lt;unknown&gt;!core::panicking::panic_fmt::h57b56b1dc717ba48\\n    2: 0x1c763d - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\\n\&quot;)&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;id&quot;: 55&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As it's shown in the error, it looks like that the extrinsic decoding code inside WASM panics and throws this **wasm trap** error that is caught by the Node.&#xD;&#xA;&#xD;&#xA;Some of our questions and concerns are as following:&#xD;&#xA;- What are the security implications of panicking inside the WASM when an extrinsic can not get decoded successfully? And if this might expose any new attack surface.&#xD;&#xA;- Are there any plans to handle these decoding errors more gracefully?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30819" PostHistoryTypeId="1" PostId="7839" RevisionGUID="ee4abc83-2f0e-4f63-93ca-03d15d0593e7" CreationDate="2023-03-28T20:09:47.337" UserId="3053" Text="Implications of invalid encoded extrinsic calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="30820" PostHistoryTypeId="3" PostId="7839" RevisionGUID="ee4abc83-2f0e-4f63-93ca-03d15d0593e7" CreationDate="2023-03-28T20:09:47.337" UserId="3053" Text="|extrinsic|wasm|scale-codec|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30821" PostHistoryTypeId="2" PostId="7840" RevisionGUID="4b936989-2c70-46ad-b683-36566ea62819" CreationDate="2023-03-28T20:13:30.597" UserId="1786" Text="For querying anything historical in polkadot-js there is the `.at` property to the `ApiPromise`. &#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const block = '0x52352ca066543d41aacb0c6419e5bb7e2d9ee621b3d8dabe2c2174ce2c5f86c5'&#xD;&#xA;const apiAt = await api.at(block);&#xD;&#xA;const timestamp = await apiAt.query.timestamp.now();&#xD;&#xA;console.log(timestamp);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I wrote a more in detail response on the `.at` for another user a while ago here: https://substrate.stackexchange.com/questions/7007/polkadotjs-api-querymulti-with-different-blockhashes/7032#7032&#xD;&#xA;&#xD;&#xA;Hope that helps :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="30823" PostHistoryTypeId="2" PostId="7841" RevisionGUID="b2efe8d2-2e28-4486-9ef4-a143507fa111" CreationDate="2023-03-28T21:28:56.807" UserId="106" Text="I would like to add a service-endpoint to my Kilt DID, using the Javascript SDK.&#xD;&#xA;&#xD;&#xA;I have created a full DID and am trying to add the service-endpoint like so:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  const extrinsic = api.createType('Extrinsic', { id: `#${id}`, type: [type], serviceEndpoint: [url] });&#xD;&#xA;&#xD;&#xA;  const authorizedTx = await Did.authorizeTx(&#xD;&#xA;      didUri,&#xD;&#xA;      extrinsic,&#xD;&#xA;      signRequest(didUri, didAuth),&#xD;&#xA;      submitterAccount.address&#xD;&#xA;  );&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the `extrinsic` is not correct as I get an error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;SDKError: No key relationship found for extrinsic&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I was not able to find this specific actin in the Kilt documentation, so I'm asking here." ContentLicense="CC BY-SA 4.0" />
  <row Id="30825" PostHistoryTypeId="1" PostId="7841" RevisionGUID="b2efe8d2-2e28-4486-9ef4-a143507fa111" CreationDate="2023-03-28T21:28:56.807" UserId="106" Text="create service-endpoint in Kilt DID" ContentLicense="CC BY-SA 4.0" />
  <row Id="30826" PostHistoryTypeId="3" PostId="7841" RevisionGUID="b2efe8d2-2e28-4486-9ef4-a143507fa111" CreationDate="2023-03-28T21:28:56.807" UserId="106" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30827" PostHistoryTypeId="2" PostId="7842" RevisionGUID="471fa787-be3d-4bb8-b4e8-eaa5b8361786" CreationDate="2023-03-28T22:13:59.230" UserId="4020" Text="Just got the same error&#xD;&#xA;To find out more about `protoc`&#xD;&#xA;Just run `protoc --version`&#xD;&#xA;It will tell you it is not found.&#xD;&#xA;This will be the output&#xD;&#xA;```&#xD;&#xA;Command 'protoc' not found, but can be installed with:&#xD;&#xA;sudo snap install protobuf           # version 3.14.0, or&#xD;&#xA;sudo apt  install protobuf-compiler  # version 3.12.4-1ubuntu7.22.04.1&#xD;&#xA;See 'snap info protobuf' for additional versions.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With it, it gives solutions of what to do, so I took `sudo apt  install protobuf-compiler` And the next time I ran my `cargo build` command, it worked well." ContentLicense="CC BY-SA 4.0" />
  <row Id="30831" PostHistoryTypeId="6" PostId="7841" RevisionGUID="f682edd7-025c-4ba3-8e6b-aa37a4e93ffd" CreationDate="2023-03-28T23:19:54.797" UserId="34" Comment="edited tags" Text="|polkadot-js|extrinsic|kilt|did|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30832" PostHistoryTypeId="10" PostId="7767" RevisionGUID="cb4acede-eed0-4b16-ad93-b8d03bbbda01" CreationDate="2023-03-28T23:20:15.157" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[7039],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="30835" PostHistoryTypeId="10" PostId="7775" RevisionGUID="6cb6da07-d728-455d-85a7-a8fbd3c4c8af" CreationDate="2023-03-28T23:21:58.427" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[6699],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="30838" PostHistoryTypeId="10" PostId="7831" RevisionGUID="c56ad124-1d97-42ef-997f-ea6b67636b3a" CreationDate="2023-03-28T23:22:50.510" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[7714],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:85,&quot;DisplayName&quot;:&quot;Squirrel&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="30839" PostHistoryTypeId="10" PostId="7683" RevisionGUID="fa8040b2-9a57-48b7-ad44-0a29e243cc03" CreationDate="2023-03-28T23:22:59.397" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[1141],&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="30840" PostHistoryTypeId="5" PostId="7773" RevisionGUID="bab61c5f-1435-44f5-83dc-7247e877614a" CreationDate="2023-03-29T00:06:39.373" UserId="3778" Comment="added 22 characters in body" Text="This is my first time migrating data, and I'd like to receive general guidance about what steps and command lines I need to use.&#xD;&#xA;I've been working with the node-template before to implement it in my relay chain.&#xD;&#xA;&#xD;&#xA;I followed this tutorial `Basic Storage Migration` from Substrate Docs. &#xD;&#xA;But I noticed a better way to perform a storage migration using the`frame-executive` module with the `try-runtime-cli`.&#xD;&#xA;&#xD;&#xA;Regarding the `try-runtime-cli` implementation, I struggled a bit following the tutorial from Substrate docs, because the tutorial is based on the `polkadot-v0.9.28` release, following those steps, I couldn't compile the node with the `try-runtime` feature. After some research, I updated it to be compatible with the `polkadot-v0.9.37`, there was a significant change from the `polkadot-v0.9.28` to the `polkadot-v0.9.29` release.&#xD;&#xA;&#xD;&#xA;I defined a new type to allocate migrations:&#xD;&#xA;```&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	// pallet_nicks::migration::v1::MigrateToV1&lt;Runtime&gt;,&#xD;&#xA;	// pallet_nicks::migration::v2::MigrateToV2&lt;Runtime&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L351&#xD;&#xA;&#xD;&#xA;Then pass it to the executive type:&#xD;&#xA;```&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;	Migrations,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L357&#xD;&#xA;&#xD;&#xA;After finishing the Basic Storage Migration tutorial, I tried to add an account status for the Nicks structure:&#xD;&#xA;```&#xD;&#xA;    #[derive(CloneNoBound, Encode, Decode, Default, TypeInfo, MaxEncodedLen, PartialEqNoBound, RuntimeDebug)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub struct Nickname&lt;T: Config&gt; {&#xD;&#xA;		pub first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;		pub last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;		pub third: AccountStatus&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, TypeInfo, MaxEncodedLen, PartialEqNoBound, RuntimeDebug)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	#[codec(mel_bound())]&#xD;&#xA;	pub enum AccountStatus {&#xD;&#xA;		Active,&#xD;&#xA;		Inactive,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl Default for AccountStatus {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			AccountStatus::Active&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# **Steps to reproduce the issue:**&#xD;&#xA;&#xD;&#xA;- `git clone git@github.com:didiermis/test-storage-migration.git`&#xD;&#xA;- `cd test-storage-migration`&#xD;&#xA;- `git checkout main`&#xD;&#xA;- `cargo build --release`&#xD;&#xA;- `./target/release/node-template --dev`&#xD;&#xA;- execute the bash script `./pallets/nicks/src/migrations_old/execute_tx_v2.sh` to create some initial accounts (4) (requires polkadot-CLI)&#xD;&#xA;---------&#xD;&#xA;**Migration part:**&#xD;&#xA;- Rename the lib.rs file to lib.v1.rs&#xD;&#xA;- Rename the lib.v2.rs file to lib.rs (lib.v2.rs file contains the changes related to the new account status)&#xD;&#xA;- Rename the migration.v2.rs file to migration.rs&#xD;&#xA;- Uncomment the following line in the runtime/src/lib.rs:&#xD;&#xA;```&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	// pallet_nicks::migration::v1::MigrateToV1&lt;Runtime&gt;,&#xD;&#xA;	pallet_nicks::migration::v2::MigrateToV2&lt;Runtime&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L353&#xD;&#xA;- Update the spec version (runtime/src/lib.rs):&#xD;&#xA;```&#xD;&#xA;`spec_version: 101,`&#xD;&#xA;```&#xD;&#xA;https://github.com/didiermis/test-storage-migration/blob/ba6af5da8025c4157ee7ef758a0590d88c8c89f6/runtime/src/lib.rs#L108&#xD;&#xA;- `cargo build --release --features=try-runtime`&#xD;&#xA;- `RUST_LOG=runtime=trace target/release/node-template try-runtime --detailed-log-output --runtime target/release/wbuild/node-template-runtime/node_template_runtime.compact.compressed.wasm on-runtime-upgrade --checks live --uri ws://localhost:9944`&#xD;&#xA;&#xD;&#xA;Then I got the following encoded error (detailed error provided in the gist):&#xD;&#xA;```&#xD;&#xA;2023-03-24 14:21:22.519 ERROR main frame_support::storage: (key, value) failed to decode at [101, 250, 43, 123, 42, 225, 198, 168, 220, 201, 193, 123, 220, 138, 232, 42, 217, 172, 213, 218, 186, 94, 26, 239, 28, 164, 85, 53, 14, 203, 193, 46, 14, 91, 224, 15, 188, 46, 21, 181, 254, 101, 113, 125, 173, 4, 71, 215, 21, 246, 96, 160, 165, 132, 17, 222, 80, 155, 66, 230, 239, 184, 55, 95, 86, 47, 88, 165, 84, 213, 134, 14]: Error    &#xD;&#xA;```&#xD;&#xA;https://gist.github.com/didiermis/92d2ae0bfea89b1692645317d34b8973&#xD;&#xA;&#xD;&#xA;If I comment pre &amp; post upgrade functions, I get the same encoded error but notice the last statement:&#xD;&#xA;https://gist.github.com/didiermis/7049e846197f7926abcd576bdc180c8d&#xD;&#xA;```&#xD;&#xA;2023-03-24 14:32:42.441  INFO main try-runtime::cli: TryRuntime_on_runtime_upgrade executed without errors. Consumed weight = (625000000 ps, 0 byte), total weight = (2000000000000 ps, 18446744073709551615 byte) (0.03 %, 0.00 %). &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Something noticeable is if I run a `runtime-upgrade` as:&#xD;&#xA;- update spec_version: 101&#xD;&#xA;- cargo build --release -p node-template-runtime&#xD;&#xA;- upload the new binary (target/release/wbuild/node-template-runtime/node_template_runtime.compact.compressed.wasm) using the Polkadot-UI&#xD;&#xA;&#xD;&#xA;**Migration works as expected!**&#xD;&#xA;&#xD;&#xA;Before runtime-upgrade:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;After runtime-upgrade&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wkTlf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/KdmEi.png&#xD;&#xA;&#xD;&#xA;Let me know if detailed steps are required. I really appreciate any help you can provide.&#xD;&#xA;&#xD;&#xA;### **Update:**&#xD;&#xA;I added the following validation for the pre-upgrade function:&#xD;&#xA;```&#xD;&#xA;			let names = NameOf::&lt;T&gt;::iter_keys().count() as u32;			&#xD;&#xA;			let decodable_names = NameOf::&lt;T&gt;::iter_values().count() as u32;&#xD;&#xA;			log::info!(&#xD;&#xA;				target: LOG_TARGET,&#xD;&#xA;				&quot;pre_upgrade: {:?} names, {:?} decodable names&quot;,&#xD;&#xA;				names,&#xD;&#xA;				decodable_names,&#xD;&#xA;			);&#xD;&#xA;			ensure!(&#xD;&#xA;				names == decodable_names,&#xD;&#xA;				&quot;Not all values are decodable.&quot;&#xD;&#xA;			);&#xD;&#xA;```&#xD;&#xA;I got this log:&#xD;&#xA;```&#xD;&#xA;2023-03-24 17:53:28.198  INFO main nicks: pre_upgrade: 4 names, 0 decodable names  &#xD;&#xA;2023-03-24 17:53:28.198  INFO main node_template_runtime: try-runtime::on_runtime_upgrade failed with: &quot;Not all values are decodable.&quot; &#xD;&#xA;```&#xD;&#xA;I've created 4 initial accounts with the script, so the number of keys is correct.&#xD;&#xA;It seems to me that there's an issue decoding stored values." ContentLicense="CC BY-SA 4.0" />
  <row Id="30841" PostHistoryTypeId="2" PostId="7843" RevisionGUID="df8f6cbb-ca50-4acc-a7d3-94e619e7e32d" CreationDate="2023-03-29T02:16:28.370" UserId="1824" Text="*All the code I mention here is available [in this repo][1].*&#xD;&#xA;&#xD;&#xA;There are three types of errors that you need to may want to handle when doing&#xD;&#xA;cross-contract calls&#xD;&#xA;1. Contract Errors: defined by the smart contract you're interacting with&#xD;&#xA;1. Language Errors ([`ink::LangError`][2]): defined by the programming language you're using, e.g ink!&#xD;&#xA;1. Environment Errors ([`ink::env::Error`][3]): defined by the underlying execution environment, e.g `pallet-contracts`&#xD;&#xA;&#xD;&#xA;In all cases we can handle these different errors using [`CallBuilder::try_invoke`][4] and&#xD;&#xA;continue execution (including writing to storage) if we wish.&#xD;&#xA;&#xD;&#xA;First, let's assume the contract we're calling into (i.e callee) has the two following message:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn contract_error(&amp;mut self) -&gt; Result&lt;(), ()&gt; {&#xD;&#xA;    Err(())&#xD;&#xA;}&#xD;&#xA;                                                     &#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn environment_error(&amp;mut self) {&#xD;&#xA;    panic!(&quot;ContractTrapped&quot;)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Next, in our caller contract has the following type definitions in place (it'll make things a bit easier to follow).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use ink::MessageResult;&#xD;&#xA;use ink::env::Result as EnvResult;&#xD;&#xA;&#xD;&#xA;type ContractResult = core::result::Result&lt;(), ()&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We can handle the different errors as follows:&#xD;&#xA;&#xD;&#xA;**Contract Error**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn contract_error(&amp;mut self, address: AccountId) {&#xD;&#xA;    let result = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;        .call(address)&#xD;&#xA;        .exec_input(ExecutionInput::new(Selector::new(ink::selector_bytes!(&#xD;&#xA;            &quot;contract_error&quot;&#xD;&#xA;        ))))&#xD;&#xA;        .returns::&lt;Result&lt;(), ()&gt;&gt;()&#xD;&#xA;        .try_invoke();&#xD;&#xA;                                                                            &#xD;&#xA;    match result {&#xD;&#xA;        EnvResult::Ok(MessageResult::Ok(ContractResult::Err(_))) =&gt; {&#xD;&#xA;            self.value = !self.value;&#xD;&#xA;        }&#xD;&#xA;        _ =&gt; unimplemented!(),&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Language Error**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn lang_error(&amp;mut self, address: AccountId) {&#xD;&#xA;    let result = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;        .call(address)&#xD;&#xA;        .exec_input(ExecutionInput::new(Selector::new(ink::selector_bytes!(&#xD;&#xA;            &quot;not_a_real_selector&quot;&#xD;&#xA;        ))))&#xD;&#xA;        .returns::&lt;()&gt;()&#xD;&#xA;        .try_invoke();&#xD;&#xA;                                                                            &#xD;&#xA;    // Note: You can match on more specific `LangError`s here.&#xD;&#xA;    //&#xD;&#xA;    // See [`ink::LangError`] for more.&#xD;&#xA;    match result {&#xD;&#xA;        EnvResult::Ok(MessageResult::Err(_)) =&gt; {&#xD;&#xA;            self.value = !self.value;&#xD;&#xA;        }&#xD;&#xA;        _ =&gt; unimplemented!(),&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Environment Error**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn environment_error(&amp;mut self, address: AccountId) {&#xD;&#xA;    let result = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;        .call(address)&#xD;&#xA;        .exec_input(ExecutionInput::new(Selector::new(ink::selector_bytes!(&#xD;&#xA;            &quot;environment_error&quot;&#xD;&#xA;        ))))&#xD;&#xA;        .returns::&lt;()&gt;()&#xD;&#xA;        .try_invoke();&#xD;&#xA;                                                                            &#xD;&#xA;    // Note: You can match on more specific `EnvError`s here.&#xD;&#xA;    //&#xD;&#xA;    // See [`ink::env::Error`] for more.&#xD;&#xA;    match result {&#xD;&#xA;        EnvResult::Err(_) =&gt; {&#xD;&#xA;            self.value = !self.value;&#xD;&#xA;        }&#xD;&#xA;        _ =&gt; unimplemented!()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/HCastano/cross-contract-errors&#xD;&#xA;  [2]: https://docs.rs/ink/latest/ink/enum.LangError.html&#xD;&#xA;  [3]: https://docs.rs/ink_env/4.1.0/ink_env/enum.Error.html&#xD;&#xA;  [4]: https://docs.rs/ink_env/4.1.0/ink_env/call/struct.CallBuilder.html#method.try_invoke" ContentLicense="CC BY-SA 4.0" />
  <row Id="30844" PostHistoryTypeId="5" PostId="7841" RevisionGUID="c850e1a7-67c9-45aa-899f-e509eadaf266" CreationDate="2023-03-29T03:03:26.700" UserId="251" Comment="deleted 12 characters in body" Text="I would like to add a service-endpoint to my Kilt DID, using the Javascript SDK.&#xD;&#xA;&#xD;&#xA;I have created a full DID and am trying to add the service-endpoint like so:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const extrinsic = api.createType('Extrinsic', { id: `#${id}`, type: [type], serviceEndpoint: [url] });&#xD;&#xA;&#xD;&#xA;const authorizedTx = await Did.authorizeTx(&#xD;&#xA;    didUri,&#xD;&#xA;    extrinsic,&#xD;&#xA;    signRequest(didUri, didAuth),&#xD;&#xA;    submitterAccount.address&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the `extrinsic` is not correct as I get an error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;SDKError: No key relationship found for extrinsic&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I was not able to find this specific actin in the Kilt documentation, so I'm asking here." ContentLicense="CC BY-SA 4.0" />
  <row Id="30845" PostHistoryTypeId="2" PostId="7844" RevisionGUID="d268bf0c-9192-4233-a3a4-582311d4325a" CreationDate="2023-03-29T03:33:28.853" UserId="227" Text="With the given information it's not possible to answer the question at a level of detail that will help you. You should provide the information that people asked for in the comments, then we can help you properly.&#xD;&#xA;&#xD;&#xA;That being said, the high-level answer is: yes, you can make a cross-contract call in a constructor." ContentLicense="CC BY-SA 4.0" />
  <row Id="30847" PostHistoryTypeId="50" PostId="7354" RevisionGUID="243de21c-21d5-445e-a010-88ec0f632db1" CreationDate="2023-03-29T04:04:10.473" UserId="-1" />
  <row Id="30849" PostHistoryTypeId="2" PostId="7845" RevisionGUID="2f60b142-f8aa-4915-bd9a-416dc3bf1eeb" CreationDate="2023-03-29T07:06:11.027" UserId="1795" Text="The KILT SDK provides a very thin level of abstraction over the `api` object that the Polkadot SDK provides.&#xD;&#xA;&#xD;&#xA;Adding a service endpoint to a KILT DID can be done in the following way:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const addServiceTx = await api.tx.did.addServiceEndpoint(&#xD;&#xA;  Kilt.Did.serviceToChain({&#xD;&#xA;    id,&#xD;&#xA;    type: [type],&#xD;&#xA;    serviceEndpoint: [url],&#xD;&#xA;  })&#xD;&#xA;)&#xD;&#xA;const authorizedTx = await Did.authorizeTx(&#xD;&#xA;  didUri,&#xD;&#xA;  addServiceTx,&#xD;&#xA;  signRequest(didUri, didAuth),&#xD;&#xA;  submitterAccount.address&#xD;&#xA;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30851" PostHistoryTypeId="2" PostId="7846" RevisionGUID="aa8e8681-5c33-4d15-98da-e57d6f233587" CreationDate="2023-03-29T08:05:48.997" UserId="2762" Text="Add this import:&#xD;&#xA;&#xD;&#xA;    use sp_core::{Pair};&#xD;&#xA;And then the method from_phrase() returns you a tuple: `(Pair, Seed)` get only the Pair in your method `new`:&#xD;&#xA;&#xD;&#xA;     let pair = sp_core::sr25519::Pair::from_phrase(mnemonic_phrase.as_str(), None).unwrap();&#xD;&#xA;&#xD;&#xA;     let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair.0);" ContentLicense="CC BY-SA 4.0" />
  <row Id="30853" PostHistoryTypeId="2" PostId="7847" RevisionGUID="84a68314-ec01-4c02-92c1-484ab3bd9cae" CreationDate="2023-03-29T08:06:43.307" UserId="2484" Text="What is the recommended maximum number of bytes to store within a `BoundedVec`?&#xD;&#xA;&#xD;&#xA;I am currently having the following struct:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(&#xD;&#xA;    parity_scale_codec::Decode,&#xD;&#xA;    parity_scale_codec::Encode,&#xD;&#xA;    parity_scale_codec::MaxEncodedLen,&#xD;&#xA;    scale_info::TypeInfo,&#xD;&#xA;    Clone,&#xD;&#xA;    Debug,&#xD;&#xA;    PartialEq,&#xD;&#xA;    Eq,&#xD;&#xA;)]&#xD;&#xA;pub struct JurorPoolItem&lt;AccountId, Balance&gt; {&#xD;&#xA;    pub(crate) stake: Balance,&#xD;&#xA;    pub(crate) juror: AccountId,&#xD;&#xA;    pub(crate) consumed_stake: Balance,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And a `BoundedVec`: &#xD;&#xA;```rust&#xD;&#xA;pub(crate) type JurorPoolItemOf&lt;T&gt; = JurorPoolItem&lt;AccountIdOf&lt;T&gt;, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;pub(crate) type JurorPoolOf&lt;T&gt; = BoundedVec&lt;JurorPoolItemOf&lt;T&gt;, &lt;T as Config&gt;::MaxJurors&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With the config parameter:&#xD;&#xA;```rust&#xD;&#xA;pub const MaxJurors: u32 = 10_000;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is that too much for a block to handle if I iterate through this for example three times?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30855" PostHistoryTypeId="1" PostId="7847" RevisionGUID="84a68314-ec01-4c02-92c1-484ab3bd9cae" CreationDate="2023-03-29T08:06:43.307" UserId="2484" Text="What should be the maximum size of a `BoundedVec`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30856" PostHistoryTypeId="3" PostId="7847" RevisionGUID="84a68314-ec01-4c02-92c1-484ab3bd9cae" CreationDate="2023-03-29T08:06:43.307" UserId="2484" Text="|weight|boundedvec|configuration|limit|block-size|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30857" PostHistoryTypeId="5" PostId="7846" RevisionGUID="b5afa078-65d1-4605-bcab-dba76f7da69e" CreationDate="2023-03-29T08:14:53.827" UserId="2762" Comment="added 215 characters in body" Text="Add this import:&#xD;&#xA;&#xD;&#xA;    use sp_core::{Pair};&#xD;&#xA;And then the method from_phrase() returns you a tuple: `(Pair, Seed)` get only the Pair in your method `new`:&#xD;&#xA;&#xD;&#xA;     let pair = sp_core::sr25519::Pair::from_phrase(mnemonic_phrase.as_str(), None).unwrap();&#xD;&#xA;&#xD;&#xA;     let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair.0);&#xD;&#xA;&#xD;&#xA;Or you can use the method `from_string`:&#xD;&#xA;&#xD;&#xA;    let pair = sp_core::sr25519::Pair::from_string(mnemonic_phrase, None).unwrap();&#xD;&#xA;&#xD;&#xA;    let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair)" ContentLicense="CC BY-SA 4.0" />
  <row Id="30858" PostHistoryTypeId="2" PostId="7848" RevisionGUID="b62c02c8-fbd7-475b-8c35-eab18a68e19c" CreationDate="2023-03-29T08:25:20.120" UserId="165" Text="&gt; Is that too much for a block to handle if I iterate through this for example three times?&#xD;&#xA;&#xD;&#xA;The answer to this question is benchmarking, the result of running such benchmarks will give a value that you can use to decide if the cost of those operations are bigger than expected.&#xD;&#xA;&#xD;&#xA;Here a few links on benchmarking:&#xD;&#xA; - https://substrate.stackexchange.com/questions/3229/benchmark-frame-pallets&#xD;&#xA; - https://docs.substrate.io/test/benchmark/&#xD;&#xA; - https://docs.substrate.io/reference/how-to-guides/weights/add-benchmarks/&#xD;&#xA; - https://github.com/paritytech/substrate/tree/master/utils/frame/benchmarking-cli&#xD;&#xA;&#xD;&#xA;&gt; What is the recommended maximum number of bytes to store within a BoundedVec?&#xD;&#xA;&#xD;&#xA;For this questions my understanding is that, when working with Wasm, 32bit, you can at maximum have an array of u32 max elements." ContentLicense="CC BY-SA 4.0" />
  <row Id="30860" PostHistoryTypeId="52" PostId="7834" RevisionGUID="13e9c260-b1b9-43f5-8245-0172a422b998" CreationDate="2023-03-29T08:50:50.610" />
  <row Id="30861" PostHistoryTypeId="5" PostId="7803" RevisionGUID="b80e58a2-0f36-4be9-99ec-e0cd0ceff00f" CreationDate="2023-03-29T08:55:26.290" UserId="251" Comment="deleted 1 character in body" Text="When I try to create a `PairSigner`, then the `Pair` traits are not satisfied. &#xD;&#xA;&#xD;&#xA;With this code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let pair = sp_core::sr25519::Pair::from_phrase(mnemonic_phrase.as_str(), None).unwrap();&#xD;&#xA;&#xD;&#xA;let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get this error: &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0599]: the function or associated item `new` exists for struct `PairSigner&lt;WithExtrinsicParams&lt;SubstrateConfig, BaseExtrinsicParams&lt;SubstrateConfig, PlainTip&gt;&gt;, Pair&gt;`, but its trait bounds were not satisfied&#xD;&#xA;  --&gt; src/main.rs:23:72&#xD;&#xA;   |&#xD;&#xA;23 |     let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair);&#xD;&#xA;   |                                                                        ^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;   |&#xD;&#xA;  ::: /Users/martin.jensen/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-core-18.0.0/src/sr25519.rs:83:1&#xD;&#xA;   |&#xD;&#xA;83 | pub struct Pair(Keypair);&#xD;&#xA;   | ---------------&#xD;&#xA;   | |&#xD;&#xA;   | doesn't satisfy `_: CryptoType`&#xD;&#xA;   | doesn't satisfy `sp_core::sr25519::Pair: sp_core::crypto::Pair`&#xD;&#xA;   |&#xD;&#xA;   = note: the following trait bounds were not satisfied:&#xD;&#xA;           `sp_core::sr25519::Pair: sp_core::crypto::Pair`&#xD;&#xA;           `sp_core::sr25519::Pair: sp_core::crypto::CryptoType`&#xD;&#xA;           which is required by `sp_core::sr25519::Pair: sp_core::crypto::Pair`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0599`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is my toml dependencies which I followed from the [subxt example toml](https://github.com/paritytech/subxt/blob/42bcddeecb39db98e711075b44331d24a8fbeb4d/examples/Cargo.toml): &#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;structopt = &quot;0.3.26&quot;&#xD;&#xA;tokio = { version = &quot;1.26&quot;, features = [&quot;rt-multi-thread&quot;, &quot;macros&quot;, &quot;time&quot;] }&#xD;&#xA;sp-keyring = &quot;20.0.0&quot;&#xD;&#xA;sp-core = { version = &quot;18.0.0&quot;, default-features = false }&#xD;&#xA;sp-runtime = &quot;20.0.0&quot;&#xD;&#xA;futures = &quot;0.3.27&quot;&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;, &quot;full&quot;, &quot;bit-vec&quot;] }&#xD;&#xA;hex = &quot;0.4.3&quot;&#xD;&#xA;tracing-subscriber = &quot;0.3.11&quot;&#xD;&#xA;subxt = &quot;0.27.1&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30862" PostHistoryTypeId="2" PostId="7849" RevisionGUID="9dc1c0b9-329b-497f-b43b-346429b203d4" CreationDate="2023-03-29T09:11:03.987" UserId="3030" Text="On open gov, we have 3 options, Yay Nay and Abstain. &#xD;&#xA;&#xD;&#xA;Do abstain votes count as a vote and if so does it affect the threshold curve.&#xD;&#xA;&#xD;&#xA;I am wondering because if this is the case the word abstain may be misleading and should be renamed to neutral.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30864" PostHistoryTypeId="1" PostId="7849" RevisionGUID="9dc1c0b9-329b-497f-b43b-346429b203d4" CreationDate="2023-03-29T09:11:03.987" UserId="3030" Text="On abstain votes" ContentLicense="CC BY-SA 4.0" />
  <row Id="30865" PostHistoryTypeId="3" PostId="7849" RevisionGUID="9dc1c0b9-329b-497f-b43b-346429b203d4" CreationDate="2023-03-29T09:11:03.987" UserId="3030" Text="|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30866" PostHistoryTypeId="2" PostId="7850" RevisionGUID="46235607-6868-47ce-981f-1a6fbda30379" CreationDate="2023-03-29T09:17:40.637" UserId="2372" Text="I'm unbonding all the staking funds of the validators. After unbonding, all the funds are going to locked and they are moving into transferrable balance. But I'm able to transfer some funds from unbonding to transferrable but not whole amount. Can someone please guide me through this " ContentLicense="CC BY-SA 4.0" />
  <row Id="30868" PostHistoryTypeId="1" PostId="7850" RevisionGUID="46235607-6868-47ce-981f-1a6fbda30379" CreationDate="2023-03-29T09:17:40.637" UserId="2372" Text="Can't able to unbond all the funds present in the locks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30869" PostHistoryTypeId="3" PostId="7850" RevisionGUID="46235607-6868-47ce-981f-1a6fbda30379" CreationDate="2023-03-29T09:17:40.637" UserId="2372" Text="|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30872" PostHistoryTypeId="50" PostId="7352" RevisionGUID="9101e955-5030-4807-8699-bd9b1b6057d7" CreationDate="2023-03-29T10:07:55.987" UserId="-1" />
  <row Id="30873" PostHistoryTypeId="2" PostId="7852" RevisionGUID="e811424f-13d7-4de4-a41d-f1240fb0f29b" CreationDate="2023-03-29T10:19:35.647" UserId="3885" Text="I want to add evm pallet and ethereum pallet into my substrate node from scratch, so how I can do that." ContentLicense="CC BY-SA 4.0" />
  <row Id="30875" PostHistoryTypeId="1" PostId="7852" RevisionGUID="e811424f-13d7-4de4-a41d-f1240fb0f29b" CreationDate="2023-03-29T10:19:35.647" UserId="3885" Text="how to add evm and ethereum palet from scratch into substrate node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30876" PostHistoryTypeId="3" PostId="7852" RevisionGUID="e811424f-13d7-4de4-a41d-f1240fb0f29b" CreationDate="2023-03-29T10:19:35.647" UserId="3885" Text="|polkadot|substrate-node-template|substrate-contracts-node|evm|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30877" PostHistoryTypeId="4" PostId="7852" RevisionGUID="625338fe-617a-4525-9ceb-4394532ef9c7" CreationDate="2023-03-29T10:32:05.703" UserId="83" Comment="capitalise and typo" Text="How to add evm and ethereum pallet from scratch into substrate node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30878" PostHistoryTypeId="4" PostId="7850" RevisionGUID="aee19318-70cf-44a6-ab73-0d0e8cbf5a2b" CreationDate="2023-03-29T10:40:02.807" UserId="83" Comment="grammar fix" Text="Unable to unbond all the funds present in the locks" ContentLicense="CC BY-SA 4.0" />
  <row Id="30879" PostHistoryTypeId="2" PostId="7853" RevisionGUID="d3acc332-457c-49e6-bd15-50c23a62e9ac" CreationDate="2023-03-29T10:58:40.790" UserId="2762" Text="If you are totally new first take a look into the Substrate Documentation: [Add a pallet to the runtime][1].&#xD;&#xA;&#xD;&#xA;Then take a look into the [Frontier Node Template][2], it is a template node that has this two pallets:&#xD;&#xA;&#xD;&#xA;&gt; A FRAME-based Substrate node with the Ethereum RPC support, ready for hacking &#xD;&#xA;&#xD;&#xA;Specifically how is adding the [EVM pallet][3] and the [Ethereum pallet][4] in the runtime, and how is using the [chain_spec][5] to have some initial configuration.&#xD;&#xA;&#xD;&#xA;Finally check the Susbtrate Documentation: [Access EVM accounts][6] to learn how to interact with your pallets.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/work-with-pallets/add-a-pallet/&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/frontier-node-template/&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/frontier-node-template/blob/main/runtime/src/lib.rs#L308&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/frontier-node-template/blob/main/runtime/src/lib.rs#L326&#xD;&#xA;  [5]: https://github.com/substrate-developer-hub/frontier-node-template/blob/main/node/src/chain_spec.rs#L165&#xD;&#xA;  [6]: https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts/" ContentLicense="CC BY-SA 4.0" />
  <row Id="30881" PostHistoryTypeId="2" PostId="7854" RevisionGUID="307e89b2-eec8-4637-af8d-d1987650d922" CreationDate="2023-03-29T11:01:03.260" UserId="83" Text="Assuming that the steps you have performed so far were using the Polkadot.js UI, then the guide to follow is [here][1]. It is very thorough, you just have to make sure you follow every relevant step it mentions.&#xD;&#xA;&#xD;&#xA;For example, if you wanted to unbond all your staked tokens then you would have:&#xD;&#xA;&#xD;&#xA;* Clicked the &quot;Stop&quot; button to stop nominating with your account (to chill).&#xD;&#xA;After you click the &quot;Stop&quot; button you need to follow the step to start unbonding your tokens by, then by;&#xD;&#xA;* Clicking the &quot;Unbond funds&quot; button, and then waiting for the unbonding period until they will be unbonded (28 days on Polkadot, 7 days on Kusama), which is when the countdown timer icon should disappeared, then lastly;&#xD;&#xA;* Click the &quot;Withdraw unbonded&quot; button to fully withdraw the tokens so they become transferable after the unbonding period has finished.&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000167902-how-can-i-unstake-my-tokens-again-" ContentLicense="CC BY-SA 4.0" />
  <row Id="30883" PostHistoryTypeId="2" PostId="7855" RevisionGUID="c55d9907-8570-46a0-95f8-1973b7855947" CreationDate="2023-03-29T11:02:24.903" UserId="4021" Text="#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod crowd_funding {&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    &#xD;&#xA;    #[derive(scale::Decode, scale::Encode)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;&#xD;&#xA;    pub struct IndividualFundMe {&#xD;&#xA;        account_id: AccountId,&#xD;&#xA;        go_fund_id: u64,&#xD;&#xA;        name: String,&#xD;&#xA;        reason_for_fund: String,&#xD;&#xA;        amount_needed: Balance,&#xD;&#xA;        amount_gotten: Balance,&#xD;&#xA;        status: bool,&#xD;&#xA;        donators: Vec&lt;AccountId&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct CrowdFunding {&#xD;&#xA;        go_funds: Mapping&lt;AccountId, IndividualFundMe&gt;,&#xD;&#xA;        all_go_funds: Vec&lt;IndividualFundMe&gt;,&#xD;&#xA;        successfull_go_funds: Vec&lt;IndividualFundMe&gt;,&#xD;&#xA;        go_fund_id: u64&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl CrowdFunding {&#xD;&#xA;       &#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                go_funds: Mapping::new(),&#xD;&#xA;                all_go_funds: Vec::new(),&#xD;&#xA;                successfull_go_funds: Vec::new(),&#xD;&#xA;                go_fund_id: 1&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn create_crowdfund(&amp;mut self, _name: String, _reason_for_fund: String, _amount_needed: Balance)  {&#xD;&#xA;            let new_gofund =  IndividualFundMe {&#xD;&#xA;                account_id: self.env().caller(),&#xD;&#xA;                go_fund_id: self.go_fund_id,&#xD;&#xA;                name: _name.clone(),&#xD;&#xA;                reason_for_fund: _reason_for_fund.clone(),&#xD;&#xA;                amount_needed: _amount_needed,&#xD;&#xA;                amount_gotten: 0,&#xD;&#xA;                status: false,&#xD;&#xA;                donators: Vec::new()&#xD;&#xA;            };&#xD;&#xA;            self.go_funds.insert(self.env().caller(), &amp;new_gofund);&#xD;&#xA;            self.all_go_funds.push(new_gofund);&#xD;&#xA;            self.go_fund_id += 1;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   " ContentLicense="CC BY-SA 4.0" />
  <row Id="30885" PostHistoryTypeId="1" PostId="7855" RevisionGUID="c55d9907-8570-46a0-95f8-1973b7855947" CreationDate="2023-03-29T11:02:24.903" UserId="4021" Text="I am trying to push a struct into a Vec in my ink contract but i keep getting rust compiler error" ContentLicense="CC BY-SA 4.0" />
  <row Id="30886" PostHistoryTypeId="3" PostId="7855" RevisionGUID="c55d9907-8570-46a0-95f8-1973b7855947" CreationDate="2023-03-29T11:02:24.903" UserId="4021" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30887" PostHistoryTypeId="5" PostId="7855" RevisionGUID="d4d1fbbb-ca86-4bb2-94ce-992b88969c09" CreationDate="2023-03-29T11:10:41.963" UserId="251" Comment="added 3 characters in body" Text="```rs&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod crowd_funding {&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    &#xD;&#xA;    #[derive(scale::Decode, scale::Encode)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;&#xD;&#xA;    pub struct IndividualFundMe {&#xD;&#xA;        account_id: AccountId,&#xD;&#xA;        go_fund_id: u64,&#xD;&#xA;        name: String,&#xD;&#xA;        reason_for_fund: String,&#xD;&#xA;        amount_needed: Balance,&#xD;&#xA;        amount_gotten: Balance,&#xD;&#xA;        status: bool,&#xD;&#xA;        donators: Vec&lt;AccountId&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct CrowdFunding {&#xD;&#xA;        go_funds: Mapping&lt;AccountId, IndividualFundMe&gt;,&#xD;&#xA;        all_go_funds: Vec&lt;IndividualFundMe&gt;,&#xD;&#xA;        successfull_go_funds: Vec&lt;IndividualFundMe&gt;,&#xD;&#xA;        go_fund_id: u64&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl CrowdFunding {&#xD;&#xA;       &#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                go_funds: Mapping::new(),&#xD;&#xA;                all_go_funds: Vec::new(),&#xD;&#xA;                successfull_go_funds: Vec::new(),&#xD;&#xA;                go_fund_id: 1&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn create_crowdfund(&amp;mut self, _name: String, _reason_for_fund: String, _amount_needed: Balance)  {&#xD;&#xA;            let new_gofund =  IndividualFundMe {&#xD;&#xA;                account_id: self.env().caller(),&#xD;&#xA;                go_fund_id: self.go_fund_id,&#xD;&#xA;                name: _name.clone(),&#xD;&#xA;                reason_for_fund: _reason_for_fund.clone(),&#xD;&#xA;                amount_needed: _amount_needed,&#xD;&#xA;                amount_gotten: 0,&#xD;&#xA;                status: false,&#xD;&#xA;                donators: Vec::new()&#xD;&#xA;            };&#xD;&#xA;            self.go_funds.insert(self.env().caller(), &amp;new_gofund);&#xD;&#xA;            self.all_go_funds.push(new_gofund);&#xD;&#xA;            self.go_fund_id += 1;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30888" PostHistoryTypeId="2" PostId="7856" RevisionGUID="b183f319-9093-4f27-9300-b8787ed7c5ab" CreationDate="2023-03-29T11:22:18.730" UserId="3317" Text="Great question! &#xD;&#xA;&#xD;&#xA;&gt; What are the security implications of panicking inside the WASM when an extrinsic can not get decoded successfully?&#xD;&#xA;&#xD;&#xA;Before a transaction enters the tx pool the tx is validated using the runtime’s [fn validate_transaction][1]. If it panics, the tx is immediately dropped and not gossiped to the rest of the network. Hence, when a tx is incorrectly encoded it can’t DoS the network because it panics in `fn validate_transaction` (my guess is [here][2] called [here][3]).&#xD;&#xA;&#xD;&#xA;In general, panics in the runtime should be prevented at all costs. When a malicious transaction enters the tx pool, it will be gossiped to other nodes and can be added to a block. All the nodes will provide computation power, but because it panics, the work was done for nothing and nobody paid for it. In other words, congesting the network for free, aka a Denial of Service (DoS) attack vector.&#xD;&#xA;&#xD;&#xA;(Great resource about the validation of a tx before entering the tx pool can be found [here][4])&#xD;&#xA;&#xD;&#xA;&gt; Are there any plans to handle these decoding errors more gracefully?&#xD;&#xA;&#xD;&#xA;There's not much that can be done on the node side since it has to assume an adversarial network model, where nodes cannot trust the inputs.&#xD;&#xA;&#xD;&#xA;However, perhaps a relevant issue: https://github.com/paritytech/substrate/issues/10585&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/executive/src/lib.rs#L538-L570&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/primitives/runtime/src/generic/unchecked_extrinsic.rs#L153&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/a6da808575fe403ab2bd7f6cd009896cdc6fd71a/frame/executive/src/lib.rs#L559&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/5647/difference-between-signedextension-default-behavior-vs-actual-behavior-expand" ContentLicense="CC BY-SA 4.0" />
  <row Id="30890" PostHistoryTypeId="5" PostId="7854" RevisionGUID="87e5f3e7-b9d3-4cfc-8318-4796c8bcca11" CreationDate="2023-03-29T11:31:35.417" UserId="83" Comment="fix order" Text="Assuming that the steps you have performed so far were using the Polkadot.js UI, then the guide to follow is [here][1]. It is very thorough, you just have to make sure you follow every relevant step it mentions.&#xD;&#xA;&#xD;&#xA;For example, if you wanted to unbond all your staked tokens then you would have:&#xD;&#xA;&#xD;&#xA;* Clicked the &quot;Stop&quot; button to stop nominating with your account (to chill).&#xD;&#xA;After you click the &quot;Stop&quot; button you need to follow the step to start unbonding your tokens by, then by;&#xD;&#xA;* Clicking the &quot;Unbond funds&quot; button, and then waiting for the unbonding period until they will be unbonded (28 days on Polkadot, 7 days on Kusama), which is when the countdown timer icon should disappeared, then lastly;&#xD;&#xA;* Click the &quot;Withdraw Unbonded&quot; button after the unbonding period has finished to fully withdraw the tokens so it removes the lock icon and they become transferable.&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000167902-how-can-i-unstake-my-tokens-again-" ContentLicense="CC BY-SA 4.0" />
  <row Id="30891" PostHistoryTypeId="5" PostId="7849" RevisionGUID="abe96e11-c83c-4e69-bd0c-b7d41e05a076" CreationDate="2023-03-29T12:12:55.123" UserId="3030" Comment="added 47 characters in body" Text="On ***open gov***, we have 3 options, Yay Nay and Abstain. &#xD;&#xA;&#xD;&#xA;Do abstain votes count as a vote and if so does it affect the threshold curve.&#xD;&#xA;&#xD;&#xA;I am wondering because if this is the case the word abstain may be misleading and should be renamed to neutral.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;edit: This is for open gov, not gov 1" ContentLicense="CC BY-SA 4.0" />
  <row Id="30892" PostHistoryTypeId="5" PostId="7838" RevisionGUID="287c23ca-0da2-43d0-9448-5a808311df02" CreationDate="2023-03-29T12:16:23.030" UserId="380" Comment="added 93 characters in body" Text="You can use Ethereum accounts in ink! as long as pallet-contracts is present.&#xD;&#xA;&#xD;&#xA;&gt; You can use ink! on any blockchain that was built with the [Substrate](https://substrate.io)&#xD;&#xA;framework and includes the [`pallet-contracts`](https://github.com/paritytech/substrate/tree/master/frame/contracts)&#xD;&#xA;module.&#xD;&#xA;Substrate does not define specific types for a blockchain, it uses&#xD;&#xA;generic types throughout.&#xD;&#xA;Chains built on Substrate can decide on their own which types they want&#xD;&#xA;to use for e.g. the chain's block number or account id's. For example,&#xD;&#xA;chains that intend to be compatible to Ethereum typically use the same&#xD;&#xA;type as Ethereum for their `AccountId`.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/ink/blob/6fb975d77c61bd08c662e2111c4f35b0e50a3d37/ARCHITECTURE.md?plain=1#L194-L202&#xD;&#xA;&#xD;&#xA;Edit: I don't believe there any important considerations, it &quot;just works&quot; out of the box." ContentLicense="CC BY-SA 4.0" />
  <row Id="30893" PostHistoryTypeId="2" PostId="7857" RevisionGUID="962a95c5-c096-45aa-a1a4-dec82f5cb44b" CreationDate="2023-03-29T12:59:06.243" UserId="3886" Text="I am using substrate node-template for my blockchain, I want run with my own accounts, for some reason below code converting chainSpec.json raw format is throwing error.&#xD;&#xA;&#xD;&#xA;macOS: : `Apple M1 pro&#xD;&#xA;Ventura 13.2.1`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin&#xD;&#xA;nightly-2022-05-15-aarch64-apple-darwin&#xD;&#xA;nightly-2022-10-30-aarch64-apple-darwin (default)&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-2022-10-30-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.66.0-nightly (5e9772042 2022-10-29)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Converting Raw Format&#xD;&#xA;```&#xD;&#xA;./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode &gt; customSpecRaw.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Service(Other(&quot;Error parsing spec file: trailing characters at line 30 column 13&quot;))&#xD;&#xA;2023-03-29 19:06:14 Building chain spec&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30895" PostHistoryTypeId="1" PostId="7857" RevisionGUID="962a95c5-c096-45aa-a1a4-dec82f5cb44b" CreationDate="2023-03-29T12:59:06.243" UserId="3886" Text="Substrate node tempalate Facing error converting chainSpec.json to raw format" ContentLicense="CC BY-SA 4.0" />
  <row Id="30896" PostHistoryTypeId="3" PostId="7857" RevisionGUID="962a95c5-c096-45aa-a1a4-dec82f5cb44b" CreationDate="2023-03-29T12:59:06.243" UserId="3886" Text="|substrate-node-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30897" PostHistoryTypeId="50" PostId="7369" RevisionGUID="d4422b21-d83a-40aa-840e-1843abfab461" CreationDate="2023-03-29T13:02:20.270" UserId="-1" />
  <row Id="30898" PostHistoryTypeId="5" PostId="7857" RevisionGUID="4b684b53-1fd5-4355-9f4e-50c43982b07d" CreationDate="2023-03-29T13:08:38.923" UserId="3886" Comment="added 1451 characters in body" Text="I am using substrate node-template for my blockchain, I want run with my own accounts, for some reason below code converting chainSpec.json raw format is throwing error.&#xD;&#xA;&#xD;&#xA;macOS: : `Apple M1 pro&#xD;&#xA;Ventura 13.2.1`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin&#xD;&#xA;nightly-2022-05-15-aarch64-apple-darwin&#xD;&#xA;nightly-2022-10-30-aarch64-apple-darwin (default)&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-2022-10-30-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.66.0-nightly (5e9772042 2022-10-29)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Converting Raw Format&#xD;&#xA;```&#xD;&#xA;./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode &gt; customSpecRaw.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Service(Other(&quot;Error parsing spec file: trailing characters at line 30 column 13&quot;))&#xD;&#xA;2023-03-29 19:06:14 Building chain spec&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;development&quot;,&#xD;&#xA;  &quot;id&quot;: &quot;dev&quot;,&#xD;&#xA;  &quot;chainType&quot;: &quot;Development&quot;,&#xD;&#xA;  &quot;bootNodes&quot;: [],&#xD;&#xA;  &quot;telemetryEndpoints&quot;: null,&#xD;&#xA;  &quot;protocolId&quot;: null,&#xD;&#xA;  &quot;properties&quot;: {&#xD;&#xA;    &quot;ss58Format&quot;: 42,&#xD;&#xA;    &quot;tokenDecimals&quot;: &quot;8&quot;,&#xD;&#xA;    &quot;tokenSymbol&quot;: &quot;TOKEN&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;codeSubstitutes&quot;: {},&#xD;&#xA;  &quot;genesis&quot;: {&#xD;&#xA;    &quot;runtime&quot;: {&#xD;&#xA;      &quot;system&quot;: {&#xD;&#xA;        &quot;code&quot;: &quot;code hash is huge so removed&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;aura&quot;: {&#xD;&#xA;        &quot;authorities&quot;: [&#xD;&#xA;          &quot;5G23QwkKM3u1ssrkZW4UYayBmnSV2VtetgnSFhhWpdjACe9N&quot;,&#xD;&#xA;          &quot;5Hp4YMLZBEveQQUwiVcYCFYSngmFiWUaspKGEzLepuNXE5C1&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;grandpa&quot;: {&#xD;&#xA;        &quot;authorities&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5Cx5UcnGQMRNtKh63UR5BYMh3SAg3ivKh5wSki24wchvZyGo&quot;,&#xD;&#xA;            1,&#xD;&#xA;            &quot;5DHXJTByBPsUf7xRzJXtBAAFdtF26pyi4iYZccNzHFxM5kDa&quot;,&#xD;&#xA;            10&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;balances&quot;: {&#xD;&#xA;        &quot;balances&quot;: [&#xD;&#xA;          [&quot;5G23QwkKM3u1ssrkZW4UYayBmnSV2VtetgnSFhhWpdjACe9N&quot;, 1000000000000],&#xD;&#xA;          [&quot;5Hp4YMLZBEveQQUwiVcYCFYSngmFiWUaspKGEzLepuNXE5C1&quot;, 1000000000000],&#xD;&#xA;          [&quot;5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y&quot;, 1000000000000]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;transactionPayment&quot;: {&#xD;&#xA;        &quot;multiplier&quot;: &quot;1000000000000000000&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;sudo&quot;: {&#xD;&#xA;        &quot;key&quot;: &quot;5G23QwkKM3u1ssrkZW4UYayBmnSV2VtetgnSFhhWpdjACe9N&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;assets&quot;: {&#xD;&#xA;        &quot;assets&quot;: [],&#xD;&#xA;        &quot;metadata&quot;: [],&#xD;&#xA;        &quot;accounts&quot;: []&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30899" PostHistoryTypeId="2" PostId="7858" RevisionGUID="0ee25db4-9170-4e79-bc6f-1ff3c37b2743" CreationDate="2023-03-29T13:22:44.613" UserId="3886" Text="The error was in the line number 31 &#xD;&#xA;&#xD;&#xA;From this&#xD;&#xA;```&#xD;&#xA;&quot;grandpa&quot;: {&#xD;&#xA;        &quot;authorities&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5Cx5UcnGQMRNtKh63UR5BYMh3SAg3ivKh5wSki24wchvZyGo&quot;,&#xD;&#xA;            1,&#xD;&#xA;            &quot;5DHXJTByBPsUf7xRzJXtBAAFdtF26pyi4iYZccNzHFxM5kDa&quot;,&#xD;&#xA;            10&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Update to this &#xD;&#xA;```&#xD;&#xA;&quot;grandpa&quot;: {&#xD;&#xA;        &quot;authorities&quot;: &#xD;&#xA;    [[&quot;5Cx5UcnGQMRNtKh63UR5BYMh3SAg3ivKh5wSki24wchvZyGo&quot;,1,], &#xD;&#xA;    [&quot;5DHXJTByBPsUf7xRzJXtBAAFdtF26pyi4iYZccNzHFxM5kDa&quot;,10] ]&#xD;&#xA;   },&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30901" PostHistoryTypeId="2" PostId="7859" RevisionGUID="33a9f436-8c80-45b1-835d-986b6df161c1" CreationDate="2023-03-29T13:23:25.550" UserId="354" Text="If you are running your own private network, check if your existential deposit is set to zero, it will fail the [condition][1]`ledger.active &lt; T::Currency::minimum_balance()`, here `minimum_balance` is existential deposit which will always return false and when you unbond all your funds it will only be parially unbonded.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs#L106" ContentLicense="CC BY-SA 4.0" />
  <row Id="30903" PostHistoryTypeId="2" PostId="7860" RevisionGUID="f24f85b0-e0ec-4cc0-ba4b-7a4c72fd07ad" CreationDate="2023-03-29T14:20:55.937" UserId="494" Text="It seems that your rationale is starting from the assumption that **only** OCWs will be calling `add_validator_again`. That is not safe. Malicious actors could also call them while &quot;impersonating&quot; an OCW.&#xD;&#xA;&#xD;&#xA;Regardless of the checks you are making inside your OCW logic, you also need to make sure that the execution of `add_validator_again` is only granted to keys belonging to `ApprovedValidators`.&#xD;&#xA;&#xD;&#xA;You could implement a `SignedExtension` with some logic similar to this:&#xD;&#xA;```&#xD;&#xA;impl&lt;T: Config + Send + Sync&gt; SignedExtension for AuthorizeOcw&lt;T&gt;&#xD;&#xA;where&#xD;&#xA;    T::Call: Dispatchable&lt;Info = DispatchInfo&gt; + GetCallMetadata,&#xD;&#xA;{&#xD;&#xA;    type AccountId = T::AccountId;&#xD;&#xA;    type Call = T::Call;&#xD;&#xA;    type AdditionalSigned = ();&#xD;&#xA;    type Pre = ();&#xD;&#xA;    const IDENTIFIER: &amp;'static str = &quot;AuthorizeOcw&quot;;&#xD;&#xA;&#xD;&#xA;    fn additional_signed(&amp;self) -&gt; sp_std::result::Result&lt;(), TransactionValidityError&gt; {&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn validate(&#xD;&#xA;        &amp;self,&#xD;&#xA;        who: &amp;Self::AccountId,&#xD;&#xA;        call: &amp;Self::Call,&#xD;&#xA;        _info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;        _len: usize,&#xD;&#xA;    ) -&gt; TransactionValidity {&#xD;&#xA;        let md = call.get_call_metadata();&#xD;&#xA;&#xD;&#xA;        if md.palet_name == &quot;my_pallet&quot; &amp;&amp; &#xD;&#xA;           md.function_name == &quot;add_validator_again&quot; &amp;&amp;&#xD;&#xA;           &lt;ApprovedValidators&lt;T&gt;&gt;::contains_key(who) &amp;&amp;&#xD;&#xA;           !&lt;Validators&lt;T&gt;&gt;::contains_key(who)&#xD;&#xA;        {&#xD;&#xA;            Ok(Default::default())&#xD;&#xA;        } else {&#xD;&#xA;            Err(InvalidTransaction::Call.into())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Transactions with calls to `add_validator_again` that are coming from accounts that don't belong to `ApprovedValidators` (or that belong to `Validators`) will never make it into the Tx Pool.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In regards to the `signer.iam()` that you alluded to, unfortunately the public APIs exposed by `frame_system::offchain::Signer` don't really offer anything of that nature.&#xD;&#xA;&#xD;&#xA;But with the solution described above, you don't really need it.&#xD;&#xA;&#xD;&#xA;Sure, most OCWs will &quot;waste&quot; transactions that never get executed. But that is actually the right security model, since unauthorized actors could also attempt this and they must not be successful." ContentLicense="CC BY-SA 4.0" />
  <row Id="30905" PostHistoryTypeId="5" PostId="7855" RevisionGUID="780ffd0c-1a3d-42e3-8d7a-f138c527ddf3" CreationDate="2023-03-29T14:35:06.177" UserId="4021" Comment="added 279 characters in body" Text="```rs&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod crowd_funding {&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    &#xD;&#xA;    #[derive(scale::Decode, scale::Encode)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;&#xD;&#xA;    pub struct IndividualFundMe {&#xD;&#xA;        account_id: AccountId,&#xD;&#xA;        go_fund_id: u64,&#xD;&#xA;        name: String,&#xD;&#xA;        reason_for_fund: String,&#xD;&#xA;        amount_needed: Balance,&#xD;&#xA;        amount_gotten: Balance,&#xD;&#xA;        status: bool,&#xD;&#xA;        donators: Vec&lt;AccountId&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct CrowdFunding {&#xD;&#xA;        go_funds: Mapping&lt;AccountId, IndividualFundMe&gt;,&#xD;&#xA;        all_go_funds: Vec&lt;IndividualFundMe&gt;,&#xD;&#xA;        successfull_go_funds: Vec&lt;IndividualFundMe&gt;,&#xD;&#xA;        go_fund_id: u64&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl CrowdFunding {&#xD;&#xA;       &#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                go_funds: Mapping::new(),&#xD;&#xA;                all_go_funds: Vec::new(),&#xD;&#xA;                successfull_go_funds: Vec::new(),&#xD;&#xA;                go_fund_id: 1&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn create_crowdfund(&amp;mut self, _name: String, _reason_for_fund: String, _amount_needed: Balance)  {&#xD;&#xA;            let new_gofund =  IndividualFundMe {&#xD;&#xA;                account_id: self.env().caller(),&#xD;&#xA;                go_fund_id: self.go_fund_id,&#xD;&#xA;                name: _name.clone(),&#xD;&#xA;                reason_for_fund: _reason_for_fund.clone(),&#xD;&#xA;                amount_needed: _amount_needed,&#xD;&#xA;                amount_gotten: 0,&#xD;&#xA;                status: false,&#xD;&#xA;                donators: Vec::new()&#xD;&#xA;            };&#xD;&#xA;            self.go_funds.insert(self.env().caller(), &amp;new_gofund);&#xD;&#xA;            self.all_go_funds.push(new_gofund);&#xD;&#xA;            self.go_fund_id += 1;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Below is the compiler error &#xD;&#xA;`IndividualFundMe` doesn't implement `Debug`&#xD;&#xA;the trait `Debug` is not implemented for `IndividualFundMe`&#xD;&#xA;add `#[derive(Debug)]` to `IndividualFundMe` or manually `impl Debug for IndividualFundMe`&#xD;&#xA;the trait `Debug` is implemented for `Vec&lt;T, A&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="30907" PostHistoryTypeId="2" PostId="7861" RevisionGUID="f18b526e-eb16-4ed1-9382-0660d1c3a58f" CreationDate="2023-03-29T15:15:36.183" UserId="1842" Text="We do track weight during block creation/block import, but weight only cares about execution time and with 2D weights also about storage proof size.&#xD;&#xA;&#xD;&#xA;We do keep track of size in propose [here](https://github.com/paritytech/substrate/blob/657c808eb3d22284359a802d67fdfdbe823fbd17/client/basic-authorship/src/basic_authorship.rs#L452) but only for extrinsics. As far as I understand the code, we don't care about the size limits for inherents - we just assume they fit.&#xD;&#xA;&#xD;&#xA;Now at least for parachain inherent data this is not necessarily the case. Candidates can be quite heavy, if there are lots of disputes and this can also be quite some amount of data.&#xD;&#xA;&#xD;&#xA;If it is indeed the case that all other inherents have negligible size, then some size limiting within the parachains inherent could work. Still a bit fuzzy: What is the size limit, how much of it can we actually use (as other stuff will still have some size) ...&#xD;&#xA;&#xD;&#xA;In any case this feels a bit unsatisfying, if we for example assume we can use 70% of the block size for parachain consensus and then another inherent assumes the same, we are already at 140%.&#xD;&#xA;&#xD;&#xA;Ideally we would have something like this:&#xD;&#xA;&#xD;&#xA; 1. Inherents are ordered by priority&#xD;&#xA; 2. When asked for the inherent data, we get passed how much size is left to use.&#xD;&#xA; 3. We can use that size to determine what data to include and what to leave out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Shall we add something like this or is there a better solution already available which I just missed?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30909" PostHistoryTypeId="1" PostId="7861" RevisionGUID="f18b526e-eb16-4ed1-9382-0660d1c3a58f" CreationDate="2023-03-29T15:15:36.183" UserId="1842" Text="Adhering to size limit of a block" ContentLicense="CC BY-SA 4.0" />
  <row Id="30910" PostHistoryTypeId="3" PostId="7861" RevisionGUID="f18b526e-eb16-4ed1-9382-0660d1c3a58f" CreationDate="2023-03-29T15:15:36.183" UserId="1842" Text="|consensus|babe|inherent|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30911" PostHistoryTypeId="5" PostId="7855" RevisionGUID="cd821828-23c1-4dbb-a0f8-13690c473e50" CreationDate="2023-03-29T15:39:49.750" UserId="251" Comment="added 12 characters in body" Text="```rs&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod crowd_funding {&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    &#xD;&#xA;    #[derive(scale::Decode, scale::Encode)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;&#xD;&#xA;    pub struct IndividualFundMe {&#xD;&#xA;        account_id: AccountId,&#xD;&#xA;        go_fund_id: u64,&#xD;&#xA;        name: String,&#xD;&#xA;        reason_for_fund: String,&#xD;&#xA;        amount_needed: Balance,&#xD;&#xA;        amount_gotten: Balance,&#xD;&#xA;        status: bool,&#xD;&#xA;        donators: Vec&lt;AccountId&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct CrowdFunding {&#xD;&#xA;        go_funds: Mapping&lt;AccountId, IndividualFundMe&gt;,&#xD;&#xA;        all_go_funds: Vec&lt;IndividualFundMe&gt;,&#xD;&#xA;        successfull_go_funds: Vec&lt;IndividualFundMe&gt;,&#xD;&#xA;        go_fund_id: u64&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl CrowdFunding {&#xD;&#xA;       &#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                go_funds: Mapping::new(),&#xD;&#xA;                all_go_funds: Vec::new(),&#xD;&#xA;                successfull_go_funds: Vec::new(),&#xD;&#xA;                go_fund_id: 1&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn create_crowdfund(&amp;mut self, _name: String, _reason_for_fund: String, _amount_needed: Balance)  {&#xD;&#xA;            let new_gofund =  IndividualFundMe {&#xD;&#xA;                account_id: self.env().caller(),&#xD;&#xA;                go_fund_id: self.go_fund_id,&#xD;&#xA;                name: _name.clone(),&#xD;&#xA;                reason_for_fund: _reason_for_fund.clone(),&#xD;&#xA;                amount_needed: _amount_needed,&#xD;&#xA;                amount_gotten: 0,&#xD;&#xA;                status: false,&#xD;&#xA;                donators: Vec::new()&#xD;&#xA;            };&#xD;&#xA;            self.go_funds.insert(self.env().caller(), &amp;new_gofund);&#xD;&#xA;            self.all_go_funds.push(new_gofund);&#xD;&#xA;            self.go_fund_id += 1;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Below is the compiler error &#xD;&#xA;```rs&#xD;&#xA;`IndividualFundMe` doesn't implement `Debug`&#xD;&#xA;the trait `Debug` is not implemented for `IndividualFundMe`&#xD;&#xA;add `#[derive(Debug)]` to `IndividualFundMe` or manually `impl Debug for IndividualFundMe`&#xD;&#xA;the trait `Debug` is implemented for `Vec&lt;T, A&gt;`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30914" PostHistoryTypeId="2" PostId="7863" RevisionGUID="ace68bd8-f2aa-4ab4-92ba-f4fae7b95c29" CreationDate="2023-03-29T15:46:48.043" UserId="2722" Text="I am in the process of developing a decentralized exchange (DEX) using Substrate on the Polkadot network and could use some assistance with the implementation. The key features I want to incorporate into my DEX are as follows:&#xD;&#xA;&#xD;&#xA; 1. Enable users to create their own tokens with the Substrate contract &#xD;&#xA;    node, utilizing ink!.&#xD;&#xA;    &#xD;&#xA; 2. Allow users to deploy the created token    contracts on my network&#xD;&#xA;    using substrate-node-contract. &#xD;&#xA;    &#xD;&#xA; 3. Permit users    to list their custom tokens on the DEX for trading.&#xD;&#xA;&#xD;&#xA;My question is related to the interaction between the token contracts and the DEX. When users deploy their token contracts on the network with substrate-node-contract, will I be able to use the smart contract address for transferring tokens within the DEX?&#xD;&#xA;&#xD;&#xA;I would appreciate any guidance on implementing these features in a Substrate pallet, as well as suggestions or resources that could be helpful. Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="30916" PostHistoryTypeId="1" PostId="7863" RevisionGUID="ace68bd8-f2aa-4ab4-92ba-f4fae7b95c29" CreationDate="2023-03-29T15:46:48.043" UserId="2722" Text="Implementing a DEX with Substrate on the Polkadot Network, Allowing Custom Token Creation and Addition" ContentLicense="CC BY-SA 4.0" />
  <row Id="30917" PostHistoryTypeId="3" PostId="7863" RevisionGUID="ace68bd8-f2aa-4ab4-92ba-f4fae7b95c29" CreationDate="2023-03-29T15:46:48.043" UserId="2722" Text="|polkadot-js|substrate-node-template|smart-contract|pallet-dex|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30918" PostHistoryTypeId="52" PostId="7847" RevisionGUID="5712ce6f-a00b-4896-9afa-f807e558621f" CreationDate="2023-03-29T16:10:04.743" />
  <row Id="30919" PostHistoryTypeId="5" PostId="7860" RevisionGUID="773a9eb4-69e4-49e2-8b9e-f78e9d65b0a3" CreationDate="2023-03-29T16:11:03.377" UserId="494" Comment="added 3 characters in body" Text="It seems that your rationale is starting from the assumption that **only** OCWs will be calling `add_validator_again`. That is not safe. Malicious actors could also call them while &quot;impersonating&quot; an OCW.&#xD;&#xA;&#xD;&#xA;Regardless of the checks you are making inside your OCW logic, you also need to make sure that the execution of `add_validator_again` is only granted to keys belonging to `ApprovedValidators`.&#xD;&#xA;&#xD;&#xA;You could implement a `SignedExtension` with some logic similar to this:&#xD;&#xA;```&#xD;&#xA;impl&lt;T: Config + Send + Sync&gt; SignedExtension for AuthorizeOcw&lt;T&gt;&#xD;&#xA;where&#xD;&#xA;    T::Call: Dispatchable&lt;Info = DispatchInfo&gt; + GetCallMetadata,&#xD;&#xA;{&#xD;&#xA;    type AccountId = T::AccountId;&#xD;&#xA;    type Call = T::Call;&#xD;&#xA;    type AdditionalSigned = ();&#xD;&#xA;    type Pre = ();&#xD;&#xA;    const IDENTIFIER: &amp;'static str = &quot;AuthorizeOcw&quot;;&#xD;&#xA;&#xD;&#xA;    fn additional_signed(&amp;self) -&gt; sp_std::result::Result&lt;(), TransactionValidityError&gt; {&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    fn validate(&#xD;&#xA;        &amp;self,&#xD;&#xA;        who: &amp;Self::AccountId,&#xD;&#xA;        call: &amp;Self::Call,&#xD;&#xA;        _info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;        _len: usize,&#xD;&#xA;    ) -&gt; TransactionValidity {&#xD;&#xA;        let md = call.get_call_metadata();&#xD;&#xA;&#xD;&#xA;        if md.palet_name == &quot;my_pallet&quot; &amp;&amp; &#xD;&#xA;           md.function_name == &quot;add_validator_again&quot; &amp;&amp;&#xD;&#xA;           &lt;ApprovedValidators&lt;T&gt;&gt;::contains_key(who) &amp;&amp;&#xD;&#xA;           !&lt;Validators&lt;T&gt;&gt;::contains_key(who)&#xD;&#xA;        {&#xD;&#xA;            Ok(Default::default())&#xD;&#xA;        } else {&#xD;&#xA;            Err(InvalidTransaction::Call.into())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Transactions with calls to `add_validator_again` that are coming from accounts that don't belong to `ApprovedValidators` (or that do belong to `Validators`) will never make it into the Tx Pool.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In regards to the `signer.iam()` that you alluded to, unfortunately the public APIs exposed by `frame_system::offchain::Signer` don't really offer anything of that nature.&#xD;&#xA;&#xD;&#xA;But with the solution described above, you don't really need it.&#xD;&#xA;&#xD;&#xA;Sure, most OCWs will &quot;waste&quot; transactions that never get executed. But that is actually the right security model, since unauthorized actors could also attempt this and they must not be successful." ContentLicense="CC BY-SA 4.0" />
  <row Id="30920" PostHistoryTypeId="2" PostId="7864" RevisionGUID="0c965435-8dc2-4ec5-ba84-3732a039002e" CreationDate="2023-03-29T16:12:16.897" UserId="3098" Text="You need to import: `use ink::prelude::vec::Vec;` in the contract's module, &#xD;&#xA;&#xD;&#xA;and add `Debug` to `#[derive(scale::Decode, scale::Encode)]` -&gt; `#[derive(scale::Decode, scale::Encode, Debug)]` " ContentLicense="CC BY-SA 4.0" />
  <row Id="30922" PostHistoryTypeId="5" PostId="7864" RevisionGUID="2d0bbe94-4fde-4706-a77a-4c54ba6b495d" CreationDate="2023-03-29T16:22:37.600" UserId="3098" Comment="added 83 characters in body" Text="You need to import: `use ink::prelude::vec::Vec;` in the contract's module.&#xD;&#xA;&#xD;&#xA;You also need to import `use ink::prelude::string::String;` for strings.&#xD;&#xA;&#xD;&#xA;These are the preludes that implement necessary traits to be stored." ContentLicense="CC BY-SA 4.0" />
  <row Id="30926" PostHistoryTypeId="33" PostId="7793" RevisionGUID="174b2098-2102-4990-ae13-38299226d845" CreationDate="2023-03-29T17:16:46.567" UserId="4005" Comment="21" />
  <row Id="30927" PostHistoryTypeId="2" PostId="7865" RevisionGUID="360f1c40-872d-437d-b04c-56c830061080" CreationDate="2023-03-29T17:52:12.477" UserId="3098" Text="I think what you are asking is whether it is possible for smart contract to interact with the `pallet-assets`? The answer is yes. You can do so in the low-level way using [chain-extensions](https://use.ink/macros-attributes/chain-extension) or referring to [OpenBrush example](https://docs.openbrush.io/smart-contracts/PSP22-Pallet/) on how to interact and create new PSP22 tokens from the ink! smart contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Realistically, I would advise to start with proof-of-concept of the DEX in ink! before moving onto FRAME development.&#xD;&#xA;&#xD;&#xA;You can use [Uniswap V2](https://github.com/swanky-dapps/dex) implementation in ink! by Astar for inspiration.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="30929" PostHistoryTypeId="6" PostId="7863" RevisionGUID="68399718-cdc5-4435-b927-4de6b758e881" CreationDate="2023-03-29T17:52:28.053" UserId="2025" Comment="it is not related to polkadot.js" Text="|substrate-node-template|smart-contract|pallet-dex|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30930" PostHistoryTypeId="24" PostId="7863" RevisionGUID="68399718-cdc5-4435-b927-4de6b758e881" CreationDate="2023-03-29T17:52:28.053" Comment="Proposed by 2025 approved by 2722 edit id of 398" ContentLicense="CC BY-SA 4.0" />
  <row Id="30931" PostHistoryTypeId="50" PostId="7383" RevisionGUID="1966d45f-a654-44c5-8755-757257f048d9" CreationDate="2023-03-29T18:07:30.883" UserId="-1" />
  <row Id="30932" PostHistoryTypeId="52" PostId="7855" RevisionGUID="910db3a5-ed52-462f-a383-4d4361c4356e" CreationDate="2023-03-29T19:05:50.200" />
  <row Id="30933" PostHistoryTypeId="50" PostId="5572" RevisionGUID="87d1525d-500f-4146-879d-5450f3567d8b" CreationDate="2023-03-29T21:00:35.157" UserId="-1" />
  <row Id="30934" PostHistoryTypeId="2" PostId="7866" RevisionGUID="8b9dd5c7-e36c-480f-99a2-ff566cd37d72" CreationDate="2023-03-30T03:17:02.277" UserId="4024" Text="I have old smart contracts written in `ink! v3.x`, and I need to update the substrate version (including `pallet-contracts`) to `&gt;= polkadot-v0.9.37`. After the update, I'll need to redeploy my smart contract again. &#xD;&#xA;&#xD;&#xA;My question is, can I just compile and deploy the smart contract from old `v3.x` sources, or is it required to migrate it to `v4.x` at first in order to deploy it on `pallet-contracts &gt;= polkadot-v0.9.37` ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30936" PostHistoryTypeId="1" PostId="7866" RevisionGUID="8b9dd5c7-e36c-480f-99a2-ff566cd37d72" CreationDate="2023-03-30T03:17:02.277" UserId="4024" Text="Can I deploy an old ink! v3.x contract on the latest version of substrate/polkadot (pallet-contracts &gt;= polkadot-v0.9.37)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30937" PostHistoryTypeId="3" PostId="7866" RevisionGUID="8b9dd5c7-e36c-480f-99a2-ff566cd37d72" CreationDate="2023-03-30T03:17:02.277" UserId="4024" Text="|polkadot|substrate-node-template|ink|substrate-contracts-node|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30939" PostHistoryTypeId="2" PostId="7867" RevisionGUID="47e67e6c-d8b9-4911-9164-2070b877f973" CreationDate="2023-03-30T05:42:09.643" UserId="354" Text="I was looking into the code of `im-online` pallet and found the following function [here][1], if false is returned, a heartbeat is sent else `AlreadyOnline` Error is returned;&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    fn is_online_aux(authority_index: AuthIndex, authority: &amp;ValidatorId&lt;T&gt;) -&gt; bool {&#xD;&#xA;    		let current_session = T::ValidatorSet::session_index();&#xD;&#xA;    &#xD;&#xA;    		ReceivedHeartbeats::&lt;T&gt;::contains_key(&amp;current_session, &amp;authority_index) ||&#xD;&#xA;    			AuthoredBlocks::&lt;T&gt;::get(&amp;current_session, authority) != 0&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;Every time in a session, this function returns true because of number of blocks authored is non-zero which prevents a heartbeat being sent. I speculate the heartbeats are never sent out from a node. &#xD;&#xA;Kindly someone help me better understand what exactly is happening here.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/im-online/src/lib.rs#L624" ContentLicense="CC BY-SA 4.0" />
  <row Id="30941" PostHistoryTypeId="1" PostId="7867" RevisionGUID="47e67e6c-d8b9-4911-9164-2070b877f973" CreationDate="2023-03-30T05:42:09.643" UserId="354" Text="Heartbeats are not sent from authority nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="30942" PostHistoryTypeId="3" PostId="7867" RevisionGUID="47e67e6c-d8b9-4911-9164-2070b877f973" CreationDate="2023-03-30T05:42:09.643" UserId="354" Text="|polkadot|authorship|pallet-imonline|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30943" PostHistoryTypeId="2" PostId="7868" RevisionGUID="edd90fbc-05a8-4a9c-9df1-cd59c721bcab" CreationDate="2023-03-30T06:29:20.830" UserId="227" Text="You can deploy old ink! contracts to newer versions of `pallet-contracts`. The pallet is backwards compatible.&#xD;&#xA;&#xD;&#xA;Note that you will have to use a `cargo-contract` version from before 2.0:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo install cargo-contract --version 1.5 --force&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The 2.0 version of `cargo-contract` is incompatible with ink! 3.x contracts." ContentLicense="CC BY-SA 4.0" />
  <row Id="30945" PostHistoryTypeId="2" PostId="7869" RevisionGUID="eab67885-7a3b-4681-8411-d71c7cf0a9cd" CreationDate="2023-03-30T07:54:35.770" UserId="73" Text="Ensure that in your runtime `lib.rs` file you have the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;construct_runtime! {&#xD;&#xA;   ...&#xD;&#xA;   Collective: pallet_collective,&#xD;&#xA;   // Or if you specify the parts manually&#xD;&#xA;   Collective: pallet::collective::{Pallet, Call, Origin, Event},&#xD;&#xA;   ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You need to add the `pallet_collective::RawOrigin` to the `RuntimeOrigin` which is done by `construct_runtime!` when told that the pallet exposes an `Origin`." ContentLicense="CC BY-SA 4.0" />
  <row Id="30947" PostHistoryTypeId="2" PostId="7870" RevisionGUID="9abfda28-ae85-4c69-9ef5-478c3579a943" CreationDate="2023-03-30T07:57:27.843" UserId="73" Text="You don't need to send a heartbeat, if the node has produced a block. Producing a block is essentially the same and even better to &quot;proof&quot; that you were online in a session. So, `im-online` isn't sending a heartbeat in this case." ContentLicense="CC BY-SA 4.0" />
  <row Id="30949" PostHistoryTypeId="2" PostId="7871" RevisionGUID="8530b632-d911-4a7f-a66e-f7f36fe76bbd" CreationDate="2023-03-30T09:18:07.467" UserId="100" Text="When working with smart contracts in Contracts UI you sometimes need to call a message as the contract itself.&#xD;&#xA;For example the `addOwner` message of the Multisig ink! [example](https://github.com/paritytech/ink-examples/tree/main/multisig). &#xD;&#xA;&#xD;&#xA;How can I add the contract to my wallet or to the `@polkadot/keyring` in order to be able to sign an extrinsic?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WJ2ed.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30951" PostHistoryTypeId="1" PostId="7871" RevisionGUID="8530b632-d911-4a7f-a66e-f7f36fe76bbd" CreationDate="2023-03-30T09:18:07.467" UserId="100" Text="How to sign an extrinsic as a smart contract in the browser?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30952" PostHistoryTypeId="3" PostId="7871" RevisionGUID="8530b632-d911-4a7f-a66e-f7f36fe76bbd" CreationDate="2023-03-30T09:18:07.467" UserId="100" Text="|polkadot-js|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30953" PostHistoryTypeId="2" PostId="7872" RevisionGUID="905cebd7-732d-43c7-a5d1-b4acdc56ab89" CreationDate="2023-03-30T09:20:27.653" UserId="3886" Text="I have implemented ink contract which use to create token, as shown below, I have two struct with declare &#xD;&#xA;`#[ink(storage)]`, I am getting below error, How to solve it. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod my_token {&#xD;&#xA;	use super::*;&#xD;&#xA;&#xD;&#xA;	#[ink(storage)]&#xD;&#xA;	pub struct MyToken {&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;    impl MyToken {&#xD;&#xA;        // here are some implementation&#xD;&#xA;    }&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;    #[ink(storage)]&#xD;&#xA;	pub struct TokenValue {&#xD;&#xA;		Value: u128,&#xD;&#xA;	}&#xD;&#xA;    &#xD;&#xA;    impl Default for TokenValue {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			TokenValue { value: 0 }&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;    impl TokenValue {&#xD;&#xA;     // here are some implementation&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ERROR: &#xD;&#xA;```&#xD;&#xA;error: encountered multiple ink! storage structs, expected exactly one&#xD;&#xA;    |&#xD;&#xA;4   | / mod my_token {&#xD;&#xA;5   | |     use super::*;&#xD;&#xA;6   | |&#xD;&#xA;7   | |     #[ink(storage)]&#xD;&#xA;...   |&#xD;&#xA;304 | |     }&#xD;&#xA;305 | | }&#xD;&#xA;    | |_^&#xD;&#xA;&#xD;&#xA;error: ink! storage struct here&#xD;&#xA;  &#xD;&#xA;   |&#xD;&#xA;8  | /     pub struct MyToken {&#xD;&#xA;9  | |  &#xD;&#xA;18 | |     }&#xD;&#xA;   | |_____^&#xD;&#xA;&#xD;&#xA;error: ink! storage struct here&#xD;&#xA;    |&#xD;&#xA;197 | /     pub struct TokenValue {&#xD;&#xA;198 | |         Value: u128,&#xD;&#xA;199 | |     }&#xD;&#xA;    | |_____^&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30955" PostHistoryTypeId="1" PostId="7872" RevisionGUID="905cebd7-732d-43c7-a5d1-b4acdc56ab89" CreationDate="2023-03-30T09:20:27.653" UserId="3886" Text="Parity INK contract error when declaring multiple stroage" ContentLicense="CC BY-SA 4.0" />
  <row Id="30956" PostHistoryTypeId="3" PostId="7872" RevisionGUID="905cebd7-732d-43c7-a5d1-b4acdc56ab89" CreationDate="2023-03-30T09:20:27.653" UserId="3886" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30957" PostHistoryTypeId="2" PostId="7873" RevisionGUID="7dfb4d95-4657-4761-aa65-6373045636b5" CreationDate="2023-03-30T09:22:51.253" UserId="251" Text="Here is some extended explanations base on bkchr's answer.&#xD;&#xA;&#xD;&#xA;The most common case is:&#xD;&#xA;&#xD;&#xA;Your node is ready, and it's trying to produce blocks. But due to the consensus algorithm, BABE or whatever chose the block producer randomly. And you are very unlucky today. You didn't produce any blocks in the previous session.&#xD;&#xA;&#xD;&#xA;Should the consensus system punish you? You are offline and not responsible for the network. Or it's just because you are so unlucky today.&#xD;&#xA;&#xD;&#xA;And the consensus system doesn't want to punish the honest/unlucky guy. So, your node needs to send a heartbeat to say, &quot;I'm always online, but I didn't get any chances.&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="30959" PostHistoryTypeId="2" PostId="7874" RevisionGUID="b59152f9-5d84-46d0-a13d-a1a51a8c406c" CreationDate="2023-03-30T09:29:26.033" UserId="3317" Text="An ink! contract is only allowed and required to have exactly one #[ink(storage)] struct ([ref][1])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/basics/contract-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="30961" PostHistoryTypeId="2" PostId="7875" RevisionGUID="8fdb1ed8-332c-478f-825f-a6bba4afbbe0" CreationDate="2023-03-30T10:11:23.607" UserId="3317" Text="An ink! message (`#[ink(message)]`) is a function within the smart contract which people can call from the outside world. Either to read or change something of the state of the contract. This is how people interact with a smart contract. &#xD;&#xA;&#xD;&#xA;In order to interact with a smart contract you don't have to add it to your wallet. You basically call the [`fn call`][1] extrinsic of pallet-contracts (like any other extrinsic), where the parameter `data` is the encoded message or constructor selector you want to call (with input if required). &#xD;&#xA;&#xD;&#xA;Some additional info: [What are the steps for encoding an extrinsic in Substrate][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/14f1a3951d5a9de4dd3ae3ff83fd5ef66c4fbbe7/frame/contracts/src/lib.rs#L591-L609&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/471/what-are-the-steps-for-encoding-an-extrinsic-in-substrate/638#638" ContentLicense="CC BY-SA 4.0" />
  <row Id="30963" PostHistoryTypeId="2" PostId="7876" RevisionGUID="64ec50eb-ba54-41ce-8e3f-6ca39046836d" CreationDate="2023-03-30T10:16:35.657" UserId="4026" Text="I accidentally used ETH address to receive token from polkadot.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;https://polkaholic.io/account/49zaADFp2kjgEJhmUWp1aq4zVc6fGBnSNFEUa4b2WAvxF73X?group=overview&amp;chainfilters=all&#xD;&#xA;&#xD;&#xA;Eth address : 0x9ebb1958fb8aecac3cb5c2f10aa473955f9c7ef1&#xD;&#xA;&#xD;&#xA;Public key in polkaholic: 0x9ebb1958fb8aecac3cb5c2f10aa473955f9c7ef1000000000000000000000000&#xD;&#xA;&#xD;&#xA;I am wondering, is there any way I can access my tokens with my private key? or can I use polkadot.js to generate a private key (I have private seed) to access to 0x9ebb1958fb8aecac3cb5c2f10aa473955f9c7ef1000000000000000000000000 address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="30965" PostHistoryTypeId="1" PostId="7876" RevisionGUID="64ec50eb-ba54-41ce-8e3f-6ca39046836d" CreationDate="2023-03-30T10:16:35.657" UserId="4026" Text="Accidentally used ETH address to receive token from polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="30966" PostHistoryTypeId="3" PostId="7876" RevisionGUID="64ec50eb-ba54-41ce-8e3f-6ca39046836d" CreationDate="2023-03-30T10:16:35.657" UserId="4026" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30967" PostHistoryTypeId="5" PostId="7555" RevisionGUID="66529734-cd13-4541-9936-a322c61584e8" CreationDate="2023-03-30T10:34:52.130" UserId="2762" Comment="improved formatting" Text="I was making the parity-bridges-common compatible to the stable version of `polkadot-v0.9.32`. I'm getting the error:&#xD;&#xA;```error&#xD;&#xA;expected struct Weight , found integer.&#xD;&#xA;``` &#xD;&#xA;Because earlier the weight in the frame-support was u64 but now it`s struct Weight&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;struct Weight&#xD;&#xA; {&#xD;&#xA;	#[codec(compact)]&#xD;&#xA;	/// The weight of computational time used based on some reference hardware.&#xD;&#xA;	ref_time: u64,&#xD;&#xA;	#[codec(compact)]&#xD;&#xA;	/// The weight of storage space used by proof of validity.&#xD;&#xA;	proof_size: u64,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can someone please guide me through this.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/S9u3J.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30968" PostHistoryTypeId="2" PostId="7877" RevisionGUID="76895a09-cd3d-4515-81cc-fed4c006998d" CreationDate="2023-03-30T10:52:16.693" UserId="3319" Text="After building and running [substrate-node-template][1] i started the local node with `--dev` flag :&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template --dev&#xD;&#xA;&#xD;&#xA;i opened https://polkadot.js.org/apps/#/extrinsics and selected the sudo pallet with bob account and sent the setKey extrinsic and it it throws an error(because only alice could do such action) like this:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;however if i go to the explorer and select the most recent block after the transaction failed its still included and the block is imported with a failed transaction:&#xD;&#xA;&#xD;&#xA;[![bob sudo pallet call][3]][3]&#xD;&#xA;&#xD;&#xA; 1. why the extrinsic passed the validation pipeline and was included in the transaction pool if its not valid?&#xD;&#xA; 2. isn't the default behavior to reject the block because it contains faulty transactions? and a malicious proposer could bloat the chain with invalid transactions that take space for no reason?&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://i.stack.imgur.com/4YVEl.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/uLBNz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="30970" PostHistoryTypeId="1" PostId="7877" RevisionGUID="76895a09-cd3d-4515-81cc-fed4c006998d" CreationDate="2023-03-30T10:52:16.693" UserId="3319" Text="why blocks could contain failed transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="30971" PostHistoryTypeId="3" PostId="7877" RevisionGUID="76895a09-cd3d-4515-81cc-fed4c006998d" CreationDate="2023-03-30T10:52:16.693" UserId="3319" Text="|substrate-node-template|extrinsic|consensus|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30972" PostHistoryTypeId="2" PostId="7878" RevisionGUID="74aad3b1-4c80-443f-ab0b-640bdd46403c" CreationDate="2023-03-30T11:07:28.717" UserId="251" Text="Why not?&#xD;&#xA;&#xD;&#xA;If you really want to reject a transaction, you can use `SignExtension` to reject it in the transaction pool or let this call panic (be careful with this).&#xD;&#xA;&#xD;&#xA;To my understanding:&#xD;&#xA;- an error could help users/developers to debug/figure out what happened&#xD;&#xA;- although this part failed, other parts might still work&#xD;&#xA;&#xD;&#xA;  e.g. receiving the transaction fee to maintain the network&#xD;&#xA;&#xD;&#xA;If you fail locally, some infrastructure won't work anymore. I think this might make things complicated." ContentLicense="CC BY-SA 4.0" />
  <row Id="30974" PostHistoryTypeId="52" PostId="7866" RevisionGUID="fde32876-daea-41bc-b83f-b4370e97d3e8" CreationDate="2023-03-30T11:17:07.803" />
  <row Id="30975" PostHistoryTypeId="5" PostId="7845" RevisionGUID="b202a401-c324-43cf-a950-6274fbab2e7b" CreationDate="2023-03-30T11:23:54.267" UserId="106" Comment="id needs to be in the right format" Text="The KILT SDK provides a very thin level of abstraction over the `api` object that the Polkadot SDK provides.&#xD;&#xA;&#xD;&#xA;Adding a service endpoint to a KILT DID can be done in the following way:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const addServiceTx = await api.tx.did.addServiceEndpoint(&#xD;&#xA;  Kilt.Did.serviceToChain({&#xD;&#xA;    id: `#${id}`,&#xD;&#xA;    type: [type],&#xD;&#xA;    serviceEndpoint: [url],&#xD;&#xA;  })&#xD;&#xA;)&#xD;&#xA;const authorizedTx = await Did.authorizeTx(&#xD;&#xA;  didUri,&#xD;&#xA;  addServiceTx,&#xD;&#xA;  signRequest(didUri, didAuth),&#xD;&#xA;  submitterAccount.address&#xD;&#xA;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="30976" PostHistoryTypeId="24" PostId="7845" RevisionGUID="b202a401-c324-43cf-a950-6274fbab2e7b" CreationDate="2023-03-30T11:23:54.267" Comment="Proposed by 106 approved by 1795 edit id of 397" ContentLicense="CC BY-SA 4.0" />
  <row Id="30977" PostHistoryTypeId="2" PostId="7879" RevisionGUID="c776bca7-bec1-4940-bb75-73841f8d936b" CreationDate="2023-03-30T11:44:26.127" UserId="2762" Text="**1. why the extrinsic passed the validation pipeline and was included in the transaction pool if its not valid?**&#xD;&#xA;&#xD;&#xA;See the code of the function [set_key][1], inside the function it has some checks like the one is failing:&#xD;&#xA;&#xD;&#xA;    ensure!(Self::key().map_or(false, |k| sender == k), Error::&lt;T&gt;::RequireSudo);&#xD;&#xA;To throw this error `RequireSudo`, the extrinsic `set_key` has to be executed, therefore included in the Block, even if the output is an Error.&#xD;&#xA;&#xD;&#xA;**2.Isn't the default behavior to reject the block because it contains faulty transactions? and a malicious proposer could bloat the chain with invalid transactions that take space for no reason?**&#xD;&#xA;&#xD;&#xA;To fix this Polkadot (And most of Blockchains) uses [Transaction Fees][2].&#xD;&#xA;&#xD;&#xA;&gt; Transaction fees prevent individual users from consuming too many resources. Polkadot uses a weight-based fee model as opposed to a gas-metering model. As such, fees are charged prior to transaction execution; once the fee is paid, nodes will execute the transaction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/sudo/src/lib.rs#L199&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-transaction-fees" ContentLicense="CC BY-SA 4.0" />
  <row Id="30979" PostHistoryTypeId="2" PostId="7880" RevisionGUID="c557819e-ebab-40f7-a800-54250096eb3c" CreationDate="2023-03-30T12:13:08.447" UserId="3317" Text="Only to your first question, because it is a very good one. &#xD;&#xA;The checks that are done before entering the tx pool are defined in the `SignedExtension`, in the substrate-node-template to be found [here][1].&#xD;&#xA;&#xD;&#xA;The logic of most the `SignedExtension`s can be found [here][2]. The only one that is missing is the `pallet_transaction_payment::ChargeTransactionPayment&lt;Runtime&gt;` that can be found in the [pallet-transaction-payment][3]. Look for the `SignedExtension` implementation and the `fn validate` function. &#xD;&#xA;&#xD;&#xA;If you go through all of them you will notice that the extrinsic's logic is not executed and therefore the [sudo check][4] will only be noticed after it is added to a block. &#xD;&#xA;&#xD;&#xA;This can be modified by adding a new `SignedExtension`.&#xD;&#xA;&#xD;&#xA;The lifecycle of an extrinsic validation is given [here][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/700c3a186e55d0d6542c564ccff17260238ed752/runtime/src/lib.rs#L298-L307&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/frame/system/src/extensions&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/44998291834b3a36a11c8dede63ce60362f1a3a5/frame/sudo/src/lib.rs#L205&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5647/difference-between-signedextension-default-behavior-vs-actual-behavior-expand" ContentLicense="CC BY-SA 4.0" />
  <row Id="30981" PostHistoryTypeId="5" PostId="7878" RevisionGUID="632779b5-c1f3-4f18-b5ff-ca56f7e2a7fe" CreationDate="2023-03-30T12:16:31.783" UserId="251" Comment="added 33 characters in body" Text="Why not?&#xD;&#xA;&#xD;&#xA;If you really want to reject a transaction, you can use `SignExtension` to reject it in the transaction pool or let this call panic (be careful with this).&#xD;&#xA;&#xD;&#xA;To my understanding:&#xD;&#xA;- an error could help users/developers to debug/figure out what happened&#xD;&#xA;- although this part failed, other parts might still work&#xD;&#xA;&#xD;&#xA;  e.g. receiving the transaction fee to maintain the network&#xD;&#xA;&#xD;&#xA;If you fail locally, some infrastructure won't work anymore, and they will be hard to design. I think this might make things complicated." ContentLicense="CC BY-SA 4.0" />
  <row Id="30982" PostHistoryTypeId="5" PostId="7880" RevisionGUID="c973125c-03af-4628-a640-57715220ba46" CreationDate="2023-03-30T12:18:21.897" UserId="3317" Comment="added 4 characters in body" Text="Only to your first question, because TMO it is a very good one. &#xD;&#xA;The checks that are done before entering the tx pool are defined in the `SignedExtension`, in the substrate-node-template to be found [here][1].&#xD;&#xA;&#xD;&#xA;The logic of most the `SignedExtension`s can be found [here][2]. The only one that is missing is the `pallet_transaction_payment::ChargeTransactionPayment&lt;Runtime&gt;` that can be found in the [pallet-transaction-payment][3]. Look for the `SignedExtension` implementation and the `fn validate` function. &#xD;&#xA;&#xD;&#xA;If you go through all of them you will notice that the extrinsic's logic is not executed and therefore the [sudo check][4] will only be noticed after it is added to a block. &#xD;&#xA;&#xD;&#xA;This can be modified by adding a new `SignedExtension`.&#xD;&#xA;&#xD;&#xA;The lifecycle of an extrinsic validation is given [here][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/700c3a186e55d0d6542c564ccff17260238ed752/runtime/src/lib.rs#L298-L307&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/frame/system/src/extensions&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/44998291834b3a36a11c8dede63ce60362f1a3a5/frame/sudo/src/lib.rs#L205&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5647/difference-between-signedextension-default-behavior-vs-actual-behavior-expand" ContentLicense="CC BY-SA 4.0" />
  <row Id="30983" PostHistoryTypeId="12" PostId="7875" RevisionGUID="ea889c5d-1e77-4dde-b037-0e8ac244a3b8" CreationDate="2023-03-30T13:36:28.263" UserId="3317" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;}],&quot;DeleteType&quot;:1}" />
  <row Id="30984" PostHistoryTypeId="2" PostId="7881" RevisionGUID="dba4b854-619e-444d-b1cf-ff0e85c92037" CreationDate="2023-03-30T13:42:35.773" UserId="4028" Text="I having some trouble running the Flipper example from the Ink! webpage.&#xD;&#xA;&#xD;&#xA;The ```cargo contract build``` outputs the following error log:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ERROR: Loading of original wasm failed&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Loading of wasm module at '/Users/winston/workspace/cs/repos/flipper/target/ink/wasm32-unknown-unknown/release/flipper.wasm' failed&#xD;&#xA;    1: Unknown opcode 192&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;rustup show output:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/winston/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin (default)&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;wasm32-wasi&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.70.0-nightly (17c116721 2023-03-29)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, I am running on the M1 OSX system." ContentLicense="CC BY-SA 4.0" />
  <row Id="30986" PostHistoryTypeId="1" PostId="7881" RevisionGUID="dba4b854-619e-444d-b1cf-ff0e85c92037" CreationDate="2023-03-30T13:42:35.773" UserId="4028" Text="ERROR: Loading of original wasm failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="30987" PostHistoryTypeId="3" PostId="7881" RevisionGUID="dba4b854-619e-444d-b1cf-ff0e85c92037" CreationDate="2023-03-30T13:42:35.773" UserId="4028" Text="|ink|rust|wasm|cargo|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="30988" PostHistoryTypeId="2" PostId="7882" RevisionGUID="2958271e-d365-4a79-8f83-3cdc4542fb06" CreationDate="2023-03-30T13:53:27.827" UserId="4028" Text="Solved! This was caused by the nightly toolchain. Switching to the stable toolchain solved this issue!" ContentLicense="CC BY-SA 4.0" />
  <row Id="30990" PostHistoryTypeId="5" PostId="7882" RevisionGUID="21fc7635-2a8d-419c-ae8f-c5a00346b14c" CreationDate="2023-03-30T13:53:40.567" UserId="4028" Comment="edited body" Text="Solved! This was caused by the nightly toolchain. Switching to the stable toolchain solved this issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="30991" PostHistoryTypeId="2" PostId="7883" RevisionGUID="66507878-fff2-4b73-89f0-29e68ca85129" CreationDate="2023-03-30T14:05:53.957" UserId="354" Text="It is meant to nominate only one validator as per [this][1] document so that there would not be many transactions at a particular time, so not to populate the payout transactions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-phragmen#rationale-for-minimizing-the-number-of-validators-per-nominator" ContentLicense="CC BY-SA 4.0" />
  <row Id="30993" PostHistoryTypeId="5" PostId="7878" RevisionGUID="77a44c8b-2ef4-41c9-9cf0-752566de068b" CreationDate="2023-03-30T15:14:29.537" UserId="251" Comment="added 1 character in body" Text="Why not?&#xD;&#xA;&#xD;&#xA;If you really want to reject a transaction, you can use `SignExtension` to reject it in the transaction pool or let this call panic (be careful with this).&#xD;&#xA;&#xD;&#xA;To my understanding:&#xD;&#xA;- an error could help users/developers to debug/figure out what happened&#xD;&#xA;- although this part failed, other parts might still work&#xD;&#xA;&#xD;&#xA;  e.g. receiving the transaction fee to maintain the network&#xD;&#xA;&#xD;&#xA;If you fail locally, some infrastructure won't work anymore, and they might be hard to design. I think this might make things complicated." ContentLicense="CC BY-SA 4.0" />
  <row Id="30994" PostHistoryTypeId="2" PostId="7884" RevisionGUID="2d2d1725-5d76-417e-9442-46fce355ca6d" CreationDate="2023-03-30T16:52:13.007" UserId="2762" Text="Just to add one thing into Alejandro's answer, the new [Weights V2][1] has added a field into Weights: `proof_size`:&#xD;&#xA;```rs&#xD;&#xA;    pub struct Weight {&#xD;&#xA;	  /// The weight of computational time used based on &#xD;&#xA;      /// some reference hardware.&#xD;&#xA;	   ref_time: u64,&#xD;&#xA;	  /// The weight of storage space used by proof of validity.&#xD;&#xA;	  proof_size: u64,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So the Weights now are not only measuring the computational time used, is measuring the storage space used by proof of validity. &#xD;&#xA;&#xD;&#xA;In case you have a parachain, the proper parameter to set for the max proof size comes from the relay chain. In Polkadot you can see it [here][2]:&#xD;&#xA;```rs&#xD;&#xA;    pub const MAX_POV_SIZE: u32 = 5 * 1024 * 1024;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/10918&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/405fdeb214ef582c39e93ebbaf3dca536a29f2d7/primitives/src/v4/mod.rs#L365" ContentLicense="CC BY-SA 4.0" />
  <row Id="30998" PostHistoryTypeId="2" PostId="7886" RevisionGUID="0d142b18-ef79-4c7d-b1d5-5b4ee48eee7e" CreationDate="2023-03-30T19:31:38.993" UserId="25" Text="I observe an issue for a long time that I can't explain.&#xD;&#xA;&#xD;&#xA;There is a value produced in `BlockImport::import_block` that must be included in inherents of `n+1`.&#xD;&#xA;Though sometimes it seems like value is not available yet.&#xD;&#xA;I have checked the code multiple times over last months and can't find any issue with it.&#xD;&#xA;&#xD;&#xA;This seems to be correlated with blocks produced locally by the node.&#xD;&#xA;I'm wondering if it is possible that block `n` is built locally and block building starts for `n+1` (creating inherents, etc) before `n` goes through `BlockImport::import_block` successfully (it doesn't do full execution there because `block.state_action == StateAction::ApplyChanges`)?&#xD;&#xA;&#xD;&#xA;Consensus is custom, but based on `sc-consensus-slots`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31000" PostHistoryTypeId="1" PostId="7886" RevisionGUID="0d142b18-ef79-4c7d-b1d5-5b4ee48eee7e" CreationDate="2023-03-30T19:31:38.993" UserId="25" Text="Is block creation guaranteed to be running after parent block is fully imported?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31001" PostHistoryTypeId="3" PostId="7886" RevisionGUID="0d142b18-ef79-4c7d-b1d5-5b4ee48eee7e" CreationDate="2023-03-30T19:31:38.993" UserId="25" Text="|consensus|block-production|inherent|block-import|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31002" PostHistoryTypeId="2" PostId="7887" RevisionGUID="16411827-e852-4c80-bc61-e0811d7d828f" CreationDate="2023-03-30T20:08:08.783" UserId="1811" Text="In the classic flipper ink! sc example I tried within a function&#xD;&#xA;&#xD;&#xA;let dist2: f32 = f32::sqrt(4.0);&#xD;&#xA;&#xD;&#xA;and got the error&#xD;&#xA;&quot; function or associated item not found in f32 &quot;&#xD;&#xA;&#xD;&#xA;Bearing in mind this https://doc.rust-lang.org/std/primitive.f32.html#method.sqrt and failing that, after installing and trying this https://crates.io/crates/sp-arithmetic that I found here https://substrate.stackexchange.com/questions/1203/whats-the-best-way-to-compute-square-root-in-substrate but creates conflicts and fails to compile flipper.&#xD;&#xA;&#xD;&#xA;I am puzzled of how to proceed.&#xD;&#xA;Any suggestions please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31004" PostHistoryTypeId="1" PostId="7887" RevisionGUID="16411827-e852-4c80-bc61-e0811d7d828f" CreationDate="2023-03-30T20:08:08.783" UserId="1811" Text="How to calculate square root of a number in ink! smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31005" PostHistoryTypeId="3" PostId="7887" RevisionGUID="16411827-e852-4c80-bc61-e0811d7d828f" CreationDate="2023-03-30T20:08:08.783" UserId="1811" Text="|ink|astar|phala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31006" PostHistoryTypeId="5" PostId="7880" RevisionGUID="f3e1c715-9b43-4f9b-bb05-8ee509e9442c" CreationDate="2023-03-30T20:15:30.343" UserId="3317" Comment="added 2 characters in body" Text="Adding on to the answers given to your first question, because TMO it is a very good one. &#xD;&#xA;The checks that are done before entering the tx pool are defined in the `SignedExtension`, in the substrate-node-template to be found [here][1].&#xD;&#xA;&#xD;&#xA;The logic of most the `SignedExtension`s can be found [here][2]. The only one that is missing is the `pallet_transaction_payment::ChargeTransactionPayment&lt;Runtime&gt;` that can be found in the [pallet-transaction-payment][3]. Look for the `SignedExtension` implementation and the `fn validate` function. &#xD;&#xA;&#xD;&#xA;If you go through all of them you will notice that the extrinsic's logic is not executed and therefore the [sudo check][4] will only be noticed after it is added to a block. &#xD;&#xA;&#xD;&#xA;This can be modified by adding a new `SignedExtension`.&#xD;&#xA;&#xD;&#xA;The lifecycle of an extrinsic validation is given [here][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/700c3a186e55d0d6542c564ccff17260238ed752/runtime/src/lib.rs#L298-L307&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/frame/system/src/extensions&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/src/lib.rs&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/44998291834b3a36a11c8dede63ce60362f1a3a5/frame/sudo/src/lib.rs#L205&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5647/difference-between-signedextension-default-behavior-vs-actual-behavior-expand" ContentLicense="CC BY-SA 4.0" />
  <row Id="31007" PostHistoryTypeId="5" PostId="7749" RevisionGUID="3b697a49-b167-4e69-8b8a-6b35a3cd138d" CreationDate="2023-03-30T20:37:20.020" UserId="3979" Comment="added 185 characters in body" Text="&lt;del&gt;We haven't enabled support for ink 4 in production or on our testnet yet. As it's a major version update, if you want to experiment with ink 4, you'll need to deploy your own testnet.&lt;/del&gt;&#xD;&#xA;&#xD;&#xA;The Phat Contracts UI has been updated to support Ink v4 metadata. We are still in the process of upgrading to Ink 4, so if you encounter any issues, please contact us.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31010" PostHistoryTypeId="52" PostId="7881" RevisionGUID="d8f61e8a-81a6-46e4-90fc-62e6708d5d2c" CreationDate="2023-03-30T21:44:22.053" />
  <row Id="31016" PostHistoryTypeId="2" PostId="7889" RevisionGUID="7a62d8ab-b9cf-46bb-86ea-41d70edb8c7f" CreationDate="2023-03-31T01:29:18.040" UserId="2844" Text="ink! smart contract doesn't support `f32` type. You can get more info from [here](https://use.ink/basics/storing-values#supported-types)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31018" PostHistoryTypeId="50" PostId="7408" RevisionGUID="8d62d503-e301-46a4-b38f-bd8f0a958cea" CreationDate="2023-03-31T04:08:31.043" UserId="-1" />
  <row Id="31019" PostHistoryTypeId="13" PostId="7875" RevisionGUID="a431e6bb-e7c4-4b16-abd7-3853dc856b88" CreationDate="2023-03-31T07:59:56.543" UserId="3317" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;}]}" />
  <row Id="31020" PostHistoryTypeId="5" PostId="7875" RevisionGUID="bfafae24-4520-4a24-a308-5de602fe679c" CreationDate="2023-03-31T08:04:42.980" UserId="3317" Comment="deleted 487 characters in body" Text="It is not possible to add a contract to a wallet. For this specific example where the multisig wallet (i.e. the contract) has to call the contract, you'd have to make a [cross contract call][1]. To do this in the contract UI you'd have to make another smart contract that makes this cross contract call to the multisig wallet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/basics/cross-contract-calling/" ContentLicense="CC BY-SA 4.0" />
  <row Id="31021" PostHistoryTypeId="2" PostId="7890" RevisionGUID="038abd33-45fd-4581-8219-16a7eb4b6ac2" CreationDate="2023-03-31T08:48:52.010" UserId="4030" Text="I had the same error, and solved it by adding a rust-toolchain.toml file in my project root folder to override the toolchain.&#xD;&#xA;The content of rust-toolchain.toml is: &#xD;&#xA;&#xD;&#xA; ```&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;nightly-2023-01-01&quot;&#xD;&#xA;components = [ &quot;rustfmt&quot; ]&#xD;&#xA;targets = [ &quot;wasm32-unknown-unknown&quot; ]&#xD;&#xA;profile = &quot;minimal&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31023" PostHistoryTypeId="2" PostId="7891" RevisionGUID="fe4cfacb-3441-419d-923e-250fb5bc227e" CreationDate="2023-03-31T09:20:20.483" UserId="1811" Text="Issue is now resolved.&#xD;&#xA;As suggested by Phala team adding the following in the Cargo.toml&#xD;&#xA;&#xD;&#xA;[dependencies] &lt;br/&gt;&#xD;&#xA;... &lt;br/&gt;&#xD;&#xA;sp-arithmetic = { version = &quot;15&quot;, default-features = false } &lt;br/&gt;&#xD;&#xA;&#xD;&#xA;[features] &lt;br/&gt;&#xD;&#xA;std = [ &lt;br/&gt;&#xD;&#xA;... &lt;br/&gt;&#xD;&#xA;&quot;sp-arithmetic/std&quot; &lt;br/&gt;&#xD;&#xA;] &lt;br/&gt;&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&#xD;&#xA;[profile.release] &#xD;&#xA;overflow-checks = false&#xD;&#xA;&#xD;&#xA;and following this post https://substrate.stackexchange.com/questions/5786/ink-smart-contract-struct-field-issues&#xD;&#xA;for necessary type conversions&#xD;&#xA;&#xD;&#xA;Flipper now runs fine &lt;br/&gt;&#xD;&#xA;... &lt;br/&gt;&#xD;&#xA;   use scale::CompactAs; &lt;br/&gt;&#xD;&#xA;   use sp_arithmetic::FixedU128; &lt;br/&gt;&#xD;&#xA;... &lt;br/&gt;&#xD;&#xA; &lt;br/&gt;&#xD;&#xA;   #[ink(message)] &lt;br/&gt;&#xD;&#xA;   pub fn get_squareroot(&amp;self, num: u32) -&gt; u128 {  &lt;br/&gt;&#xD;&#xA;       let d1 = FixedU128::from_u32(num);  &lt;br/&gt;&#xD;&#xA;       let d2 = FixedU128::sqrt(d1);  &lt;br/&gt;&#xD;&#xA;       let d3 = *d2.encode_as();  &lt;br/&gt;&#xD;&#xA;       d3  &lt;br/&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31025" PostHistoryTypeId="52" PostId="7887" RevisionGUID="246cd02a-d752-4d62-ac27-346b60179d0b" CreationDate="2023-03-31T09:31:57.920" />
  <row Id="31026" PostHistoryTypeId="5" PostId="7891" RevisionGUID="83937554-115b-4e61-9e69-27645d97a891" CreationDate="2023-03-31T09:46:38.290" UserId="2762" Comment="improved formatting" Text="Issue is now resolved.&#xD;&#xA;As suggested by Phala team adding the following in the Cargo.toml&#xD;&#xA;&#xD;&#xA;    [dependencies] &#xD;&#xA;    ... &#xD;&#xA;    sp-arithmetic = { version = &quot;15&quot;, default-features = false }&#xD;&#xA;    &#xD;&#xA;    [features] &#xD;&#xA;    std = [ &#xD;&#xA;    ... &#xD;&#xA;    &quot;sp-arithmetic/std&quot;&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;And &#xD;&#xA;```rs&#xD;&#xA;    [profile.release] &#xD;&#xA;    overflow-checks = false&#xD;&#xA;```&#xD;&#xA;And following this post https://substrate.stackexchange.com/questions/5786/ink-smart-contract-struct-field-issues&#xD;&#xA;for necessary type conversions&#xD;&#xA;&#xD;&#xA;Flipper now runs fine &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;   use scale::CompactAs; &#xD;&#xA;   use sp_arithmetic::FixedU128; &#xD;&#xA;&#xD;&#xA;   #[ink(message)] &#xD;&#xA;   pub fn get_squareroot(&amp;self, num: u32) -&gt; u128 {  &#xD;&#xA;       let d1 = FixedU128::from_u32(num);  &#xD;&#xA;       let d2 = FixedU128::sqrt(d1); &#xD;&#xA;       let d3 = *d2.encode_as();&#xD;&#xA;       d3 &#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31027" PostHistoryTypeId="6" PostId="7887" RevisionGUID="bfd88d72-27d5-4b1c-baa1-be38c634433d" CreationDate="2023-03-31T09:53:57.180" UserId="251" Comment="edited tags" Text="|ink|floating-point-math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31028" PostHistoryTypeId="5" PostId="7887" RevisionGUID="bfd88d72-27d5-4b1c-baa1-be38c634433d" CreationDate="2023-03-31T09:53:57.180" UserId="251" Comment="edited tags" Text="In the classic flipper ink! sc example I tried within a function&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let dist2: f32 = f32::sqrt(4.0);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and got the error&#xD;&#xA;&quot; function or associated item not found in f32 &quot;&#xD;&#xA;&#xD;&#xA;Bearing in mind this https://doc.rust-lang.org/std/primitive.f32.html#method.sqrt and failing that, after installing and trying this https://crates.io/crates/sp-arithmetic that I found here https://substrate.stackexchange.com/questions/1203/whats-the-best-way-to-compute-square-root-in-substrate but creates conflicts and fails to compile flipper.&#xD;&#xA;&#xD;&#xA;I am puzzled of how to proceed.&#xD;&#xA;Any suggestions please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31029" PostHistoryTypeId="2" PostId="7892" RevisionGUID="557f6379-2137-4276-8f1a-e06954019f37" CreationDate="2023-03-31T09:58:16.150" UserId="474" Text="If I submit a transaction via &quot;author_submitAndWatchExtrinsic&quot;, I start getting back TransactionStatus updates, which look like one of these:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub enum TransactionStatus&lt;Hash, BlockHash&gt; {&#xD;&#xA;	/// Transaction is part of the future queue.&#xD;&#xA;	Future,&#xD;&#xA;	/// Transaction is part of the ready queue.&#xD;&#xA;	Ready,&#xD;&#xA;	/// The transaction has been broadcast to the given peers.&#xD;&#xA;	Broadcast(Vec&lt;String&gt;),&#xD;&#xA;	/// Transaction has been included in block with given hash&#xD;&#xA;	/// at the given position.&#xD;&#xA;	#[serde(with = &quot;v1_compatible&quot;)]&#xD;&#xA;	InBlock((BlockHash, TxIndex)),&#xD;&#xA;	/// The block this transaction was included in has been retracted.&#xD;&#xA;	Retracted(BlockHash),&#xD;&#xA;	/// Maximum number of finality watchers has been reached,&#xD;&#xA;	/// old watchers are being removed.&#xD;&#xA;	FinalityTimeout(BlockHash),&#xD;&#xA;	/// Transaction has been finalized by a finality-gadget, e.g GRANDPA.&#xD;&#xA;	#[serde(with = &quot;v1_compatible&quot;)]&#xD;&#xA;	Finalized((BlockHash, TxIndex)),&#xD;&#xA;	/// Transaction has been replaced in the pool, by another transaction&#xD;&#xA;	/// that provides the same tags. (e.g. same (sender, nonce)).&#xD;&#xA;	Usurped(Hash),&#xD;&#xA;	/// Transaction has been dropped from the pool because of the limit.&#xD;&#xA;	Dropped,&#xD;&#xA;	/// Transaction is no longer valid in the current state.&#xD;&#xA;	Invalid,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(see https://github.com/paritytech/substrate/blob/4bf67fb3dc0f095e4210b5ebc5f1f2ea24bf36c0/client/transaction-pool/api/src/lib.rs#L107)&#xD;&#xA;&#xD;&#xA;The docs above this enum state:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// The stream is considered finished only when either `Finalized` or `FinalityTimeout`&#xD;&#xA;/// event is triggered. You are however free to unsubscribe from notifications at any point.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So my questions are:&#xD;&#xA;&#xD;&#xA;1. Will I _always_ eventually receive either a `Finalized` or `FinalityTimeout` notification for some transaction I submit (even if it becomes `Invalid`, say)?&#xD;&#xA;1. If the answer is &quot;no&quot; to the above: Would I be right to assume that the last `TransactionStatus` received before the stream is dropped is indicative of what happened to the transaction (ie perhaps it became `Invalid` or whatever).&#xD;&#xA;1. If I set a fixed mortality on some transaction, will it lead to the subscription being ended sooner (either with `Finalized` or `FinalityTimeout` or perhaps just with `Invalid`)?&#xD;&#xA;&#xD;&#xA;Ultimately, I am asking these with this Subxt logic in mind, and want to see if there is any way to improve it: https://github.com/paritytech/subxt/blob/42bcddeecb39db98e711075b44331d24a8fbeb4d/subxt/src/tx/tx_progress.rs#L102&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31031" PostHistoryTypeId="1" PostId="7892" RevisionGUID="557f6379-2137-4276-8f1a-e06954019f37" CreationDate="2023-03-31T09:58:16.150" UserId="474" Text="When will I stop receiving TransactionStatus updates for a transaction submitted via author_submitAndWatchExtrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31032" PostHistoryTypeId="3" PostId="7892" RevisionGUID="557f6379-2137-4276-8f1a-e06954019f37" CreationDate="2023-03-31T09:58:16.150" UserId="474" Text="|extrinsic|rpc|transaction-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31033" PostHistoryTypeId="6" PostId="7457" RevisionGUID="f2a8a781-a7f8-4625-877e-c0874a7795aa" CreationDate="2023-03-31T11:13:29.647" UserId="3317" Comment="edited tags" Text="|ink|transfer|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31034" PostHistoryTypeId="2" PostId="7893" RevisionGUID="011899ee-bae3-4829-8867-ba78ebc3d39a" CreationDate="2023-03-31T12:25:31.947" UserId="2414" Text="Below is my block of code where I am implementing this trait Config. I am not sure what I am doing wrong here I keep getting error &quot;the type parameter T is not constrained by the impl trait, self type, or predicates&quot; &#xD;&#xA;&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;		type Who;&#xD;&#xA;		type RuntimeEvent;&#xD;&#xA;		type OriginSuccess;&#xD;&#xA;		type SchemaCreatorId;&#xD;&#xA;		type MaxEncodedSchemaLength;&#xD;&#xA;		type WeightInfo;&#xD;&#xA;		type EnsureOrigin;&#xD;&#xA;		type Origin;&#xD;&#xA;	}&#xD;&#xA;	impl&lt;T: frame_system::Config&gt; Config for Test {&#xD;&#xA;		type Who = u64;&#xD;&#xA;		type RuntimeEvent = Event&lt;T&gt;;&#xD;&#xA;		type EnsureOrigin = frame_system::EnsureSignedBy&lt;Self::Who, Self::AccountId&gt;;&#xD;&#xA;		type OriginSuccess = ();&#xD;&#xA;		type SchemaCreatorId = AccountId32;&#xD;&#xA;		type MaxEncodedSchemaLength = Self::MaxEncodedSchemaLength;&#xD;&#xA;		type WeightInfo = Self::WeightInfo;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Attached is the screenshot of the error. [![unconstrained type parameter][1]][1]&#xD;&#xA;Also the codefile [CodeFile][2]&#xD;&#xA;If anyone can point me what I am doing wrong that would be help&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LqZmx.png&#xD;&#xA;  [2]: https://drive.google.com/file/d/1MCfosjzdB9lSmAvZkZA__vCV52CtBGgp/view?usp=sharing" ContentLicense="CC BY-SA 4.0" />
  <row Id="31036" PostHistoryTypeId="1" PostId="7893" RevisionGUID="011899ee-bae3-4829-8867-ba78ebc3d39a" CreationDate="2023-03-31T12:25:31.947" UserId="2414" Text="error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates" ContentLicense="CC BY-SA 4.0" />
  <row Id="31037" PostHistoryTypeId="3" PostId="7893" RevisionGUID="011899ee-bae3-4829-8867-ba78ebc3d39a" CreationDate="2023-03-31T12:25:31.947" UserId="2414" Text="|substrate-node-template|rust|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31038" PostHistoryTypeId="5" PostId="7828" RevisionGUID="753cbe3e-cde8-4e39-b99f-2cd5ac254620" CreationDate="2023-03-31T12:28:26.483" UserId="474" Comment="deleted 15 characters in body" Text="I posted this at https://substrate.stackexchange.com/posts/7827 too but just for completeness:&#xD;&#xA;&#xD;&#xA;&gt; 1. Build a local blockchain&#xD;&#xA;&gt; 2. run cargo install subxt-cli&#xD;&#xA;&gt; 3. run subxt metadata -f bytes &gt; metadata.scale&#xD;&#xA;&#xD;&#xA;How are you building/starting a local blockchain node? The error `error: Failed to decode metadata: Could not decode RuntimeMetadataPrefixed.1` implies that there is something wrong with your `metadata.scale` file. &#xD;&#xA;&#xD;&#xA;Perhaps you ran into an error running `subxt metadata -f bytes &gt; metadata.scale` and the file is empty or doesn't have the expected contents in (how big is it? Can you open it with a text editor?). Perhaps the node you started has some sort of issue. I'd need more information to be able to help with this." ContentLicense="CC BY-SA 4.0" />
  <row Id="31039" PostHistoryTypeId="2" PostId="7894" RevisionGUID="e9958f68-bd30-4c5b-b9b7-6700bcb65a4e" CreationDate="2023-03-31T12:30:35.850" UserId="251" Text="There are a lot of examples here.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/a7bc9c2a8c0a14fd6033de1f972a11a2b3dbb73a/bin/node/runtime/src/lib.rs#L246-L251&#xD;&#xA;&#xD;&#xA;You just need `impl xxx::Config for Runtime/Test { ... }`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31041" PostHistoryTypeId="2" PostId="7895" RevisionGUID="64bdc9d8-8eff-41cb-aea0-58f34bb6078b" CreationDate="2023-03-31T13:51:07.863" UserId="3319" Text="that's because you are basically defining a trait that is bound by `frame_system::Config`, meaning the type that must implement your `Config` trait must also implement `frame_system::Config` &#xD;&#xA;&#xD;&#xA;what you want to do is something like this:&#xD;&#xA;&#xD;&#xA;    impl my_pallet::Config for Test{...}&#xD;&#xA;&#xD;&#xA;this will work only if Test already implements `frame_system::Config` (which it does in substrate https://github.com/paritytech/substrate/blob/a7bc9c2a8c0a14fd6033de1f972a11a2b3dbb73a/bin/node/runtime/src/lib.rs#L217&#xD;&#xA;&#xD;&#xA;or for tests&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template/blob/700c3a186e55d0d6542c564ccff17260238ed752/pallets/template/src/mock.rs#L24 &#xD;&#xA;)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31043" PostHistoryTypeId="6" PostId="7457" RevisionGUID="c2e8b0d3-42a7-4b7b-996c-b05cecad1992" CreationDate="2023-03-31T15:08:47.927" UserId="227" Comment="edited tags" Text="|ink|openbrush|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31044" PostHistoryTypeId="2" PostId="7896" RevisionGUID="f7e8fab3-16f5-484e-8dcc-0c27d9f83c16" CreationDate="2023-03-31T15:12:18.707" UserId="2099" Text="In our project, we have on-chain storage items equivalent to the type `AuthorityId` which is the `Public` type coming out of the `app_crypto!` macro in `sp-authority-discovery`.&#xD;&#xA;&#xD;&#xA;We would like to configure the runtime in a way that the `&lt;Runtime as frame_system::Config&gt;::AccountId` is `AuthorityId`, &#xD;&#xA;because our dispatchable function needs to be able to associate the caller aka `origin: OriginFor&lt;T&gt;` with the stored `AuthorityId`.&#xD;&#xA;&#xD;&#xA;As the signature check `let who = ensure_signed!(origin)?;` gives us `T::AccountId` or concretely `&lt;Runtime as frame_system::Config&gt;::AccountId` we set `type AccountId = AuthorityId` in the `impl frame_system::Config for Runtime` block, which should allow us to make sure that each caller of extrinsics is identified using `AuthorityId`. &#xD;&#xA;&#xD;&#xA;This results in the following:&#xD;&#xA;```rust&#xD;&#xA;error[E0599]: the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;Public, ..., ..., ...&gt;&gt;, ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /home/magewe/rust/gensyn/node/chain_node/runtime/src/lib.rs:699:15&#xD;&#xA;      |&#xD;&#xA;  699 |             Executive::execute_block(block);&#xD;&#xA;      |                        ^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;     ::: /home/magewe/.cargo/git/checkouts/substrate-7e08433d4c370a21/76fed9b/primitives/runtime/src/generic/unchecked_extrinsic.rs:44:1&#xD;&#xA;      |&#xD;&#xA;  44  | pub struct UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;&#xD;&#xA;      | -------------------------------------------------------------- doesn't satisfy `_: Checkable&lt;ChainContext&lt;Runtime&gt;&gt;`&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/home/magewe/rust/gensyn/node/chain_node/target/debug/wbuild/gensyn-runtime/target/wasm32-unknown-unknown/release/deps/gensyn_runtime-13d0535547ae2d3c.long-type-6182207052186516563.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `_sp_runtime::generic::UncheckedExtrinsic&lt;sp_authority_discovery::app::Public, RuntimeCall, sp_authority_discovery::app::Signature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;: Checkable&lt;ChainContext&lt;Runtime&gt;&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This indicates to me that using `app_crypto!` types does not work out of the box here, as the extrinsics do not implement `Checkable&lt;_&gt;`.&#xD;&#xA;&#xD;&#xA;What is the proper way of using types such as `AuthorityId` as `AccountId`?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31046" PostHistoryTypeId="1" PostId="7896" RevisionGUID="f7e8fab3-16f5-484e-8dcc-0c27d9f83c16" CreationDate="2023-03-31T15:12:18.707" UserId="2099" Text="Using `app_crypto!` `Public` type as `AccountId` in the runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="31047" PostHistoryTypeId="3" PostId="7896" RevisionGUID="f7e8fab3-16f5-484e-8dcc-0c27d9f83c16" CreationDate="2023-03-31T15:12:18.707" UserId="2099" Text="|runtime|frame-system|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31048" PostHistoryTypeId="6" PostId="7871" RevisionGUID="eb1add47-f2d9-4312-9779-ea1da80d0704" CreationDate="2023-03-31T15:19:00.550" UserId="227" Comment="edited tags" Text="|polkadot-js|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31049" PostHistoryTypeId="5" PostId="7896" RevisionGUID="e3a63e05-6878-42f4-8b0d-18f7814c0f64" CreationDate="2023-03-31T15:20:20.067" UserId="2099" Comment="added 1213 characters in body" Text="In our project, we have on-chain storage items equivalent to the type `AuthorityId` which is the `Public` type coming out of the `app_crypto!` macro in `sp-authority-discovery`.&#xD;&#xA;&#xD;&#xA;We would like to configure the runtime in a way that the `&lt;Runtime as frame_system::Config&gt;::AccountId` is `AuthorityId`, &#xD;&#xA;because our dispatchable function needs to be able to associate the caller aka `origin: OriginFor&lt;T&gt;` with the stored `AuthorityId`.&#xD;&#xA;&#xD;&#xA;As the signature check `let who = ensure_signed!(origin)?;` gives us `T::AccountId` or concretely `&lt;Runtime as frame_system::Config&gt;::AccountId` we set `type AccountId = AuthorityId` in the `impl frame_system::Config for Runtime` block, which should allow us to make sure that each caller of extrinsics is identified using `AuthorityId`. &#xD;&#xA;&#xD;&#xA;This results in the following:&#xD;&#xA;```rust&#xD;&#xA;error[E0599]: the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;Public, ..., ..., ...&gt;&gt;, ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /home/magewe/rust/gensyn/node/chain_node/runtime/src/lib.rs:699:15&#xD;&#xA;      |&#xD;&#xA;  699 |             Executive::execute_block(block);&#xD;&#xA;      |                        ^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;     ::: /home/magewe/.cargo/git/checkouts/substrate-7e08433d4c370a21/76fed9b/primitives/runtime/src/generic/unchecked_extrinsic.rs:44:1&#xD;&#xA;      |&#xD;&#xA;  44  | pub struct UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;&#xD;&#xA;      | -------------------------------------------------------------- doesn't satisfy `_: Checkable&lt;ChainContext&lt;Runtime&gt;&gt;`&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/home/magewe/rust/gensyn/node/chain_node/target/debug/wbuild/gensyn-runtime/target/wasm32-unknown-unknown/release/deps/gensyn_runtime-13d0535547ae2d3c.long-type-6182207052186516563.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `_sp_runtime::generic::UncheckedExtrinsic&lt;sp_authority_discovery::app::Public, RuntimeCall, sp_authority_discovery::app::Signature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;: Checkable&lt;ChainContext&lt;Runtime&gt;&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This indicates to me that using `app_crypto!` types does not work out of the box here, as the extrinsics do not implement `Checkable&lt;_&gt;`.&#xD;&#xA;&#xD;&#xA;What is the proper way of using types such as `AuthorityId` as `AccountId`?&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Alternatively specifying the associated type as such:&#xD;&#xA;`type AccountId = &lt;&lt;AuthoritySignature as Verify&gt;::Signer as IdentifyAccound&gt;::AccountId;`&#xD;&#xA;gives hundreds of errors including the following, potentially more useful error:&#xD;&#xA;```rust&#xD;&#xA;error[E0277]: the trait bound `sp_authority_discovery::app::Signature: _sp_runtime::traits::Verify` is not satisfied&#xD;&#xA;     --&gt; /home/magewe/rust/gensyn/node/chain_node/runtime/src/lib.rs:876:3&#xD;&#xA;      |&#xD;&#xA;  876 | /         fn authorities() -&gt; Vec&lt;AuthorityDiscoveryId&gt; {&#xD;&#xA;  877 | |             let current_session_index = &lt;pallet_session_info::Pallet&lt;Runtime&gt;&gt;::session_index();&#xD;&#xA;  878 | |             let earliest_stored_session = &lt;pallet_session_info::Pallet&lt;Runtime&gt;&gt;::earliest_stored_session();&#xD;&#xA;  879 | |&#xD;&#xA;  ...   |&#xD;&#xA;  897 | |&#xD;&#xA;  898 | |         }&#xD;&#xA;      | |_________^ the trait `_sp_runtime::traits::Verify` is not implemented for `sp_authority_discovery::app::Signature`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `_sp_runtime::traits::Verify`:&#xD;&#xA;                AnySignature&#xD;&#xA;                MultiSignature&#xD;&#xA;                sp_core::ecdsa::Signature&#xD;&#xA;                sp_core::ed25519::Signature&#xD;&#xA;                sp_core::sr25519::Signature&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31050" PostHistoryTypeId="2" PostId="7897" RevisionGUID="7fb3bfd6-511b-4eb3-9f7c-7f08788ba71f" CreationDate="2023-03-31T15:28:06.617" UserId="227" Text="The contract's address (i.e. `AccountId`) is derived through an [`AddressGenerator`](https://github.com/paritytech/substrate/blob/a7bc9c2a8c0a14fd6033de1f972a11a2b3dbb73a/frame/contracts/src/address.rs#L24-L49) in `pallet-contracts`.&#xD;&#xA;&#xD;&#xA;This `AddressGenerator` is configurable. At the time of writing this, the default is [here](https://github.com/paritytech/substrate/blob/a7bc9c2a8c0a14fd6033de1f972a11a2b3dbb73a/frame/contracts/src/address.rs#LL62C2-L62C97):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;hash(&quot;contract_addr_v1&quot; ++ deploying_address ++ code_hash ++ input_data ++ salt)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, the `deploying_address` (for which the deployer has the private key) gets mixed with other information. For this new `AccountId` (i.e. public key) there can not be a known private key." ContentLicense="CC BY-SA 4.0" />
  <row Id="31052" PostHistoryTypeId="5" PostId="7739" RevisionGUID="eaaa053d-1c78-4cf0-bb6c-984d8708cbdf" CreationDate="2023-03-31T15:34:56.683" UserId="16" Comment="added 301 characters in body; edited body" Text="Every time you call `contract.query` (for gas estimation in this case) an RPC call will be made which each uses its own Wasm instance. You are doing those queries in parallel. This makes sense as it potentially speeds up your code. However, by doing so you are essentially exhausting the resources of the node. A public node would probably throttle your requests and it would work. You can work around this by submitting your queries sequentially instead of in parallel.&#xD;&#xA;&#xD;&#xA;Your suspicion is not the root cause. However, it might indirectly causing this issue by making your contract run slower and hence making the query take longer. But this is not really relevant here.&#xD;&#xA;&#xD;&#xA;The limit of `32` concurrent instances seems to be [hard coded here](https://github.com/paritytech/substrate/blob/a7bc9c2a8c0a14fd6033de1f972a11a2b3dbb73a/client/executor/wasmtime/src/runtime.rs#L378-L380). You can try changing this value but I am not sure if this config is overwritten somewhere." ContentLicense="CC BY-SA 4.0" />
  <row Id="31053" PostHistoryTypeId="5" PostId="7896" RevisionGUID="cadeb4fc-bf67-4e06-8f5e-661a2dcda078" CreationDate="2023-03-31T15:46:17.153" UserId="2099" Comment="added 120 characters in body" Text="In our project, we have on-chain storage items equivalent to the type `AuthorityId` which is the `Public` type coming out of the `app_crypto!` macro in `sp-authority-discovery`.&#xD;&#xA;&#xD;&#xA;We would like to configure the runtime in a way that the `&lt;Runtime as frame_system::Config&gt;::AccountId` is `AuthorityId`, &#xD;&#xA;because our dispatchable function needs to be able to associate the caller aka `origin: OriginFor&lt;T&gt;` with the stored `AuthorityId`.&#xD;&#xA;&#xD;&#xA;As the signature check `let who = ensure_signed!(origin)?;` gives us `T::AccountId` or concretely `&lt;Runtime as frame_system::Config&gt;::AccountId` we set `type AccountId = AuthorityId` in the `impl frame_system::Config for Runtime` block, which should allow us to make sure that each caller of extrinsics is identified using `AuthorityId`. &#xD;&#xA;&#xD;&#xA;This results in the following:&#xD;&#xA;```rust&#xD;&#xA;error[E0599]: the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;Public, ..., ..., ...&gt;&gt;, ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /home/magewe/rust/gensyn/node/chain_node/runtime/src/lib.rs:699:15&#xD;&#xA;      |&#xD;&#xA;  699 |             Executive::execute_block(block);&#xD;&#xA;      |                        ^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;     ::: /home/magewe/.cargo/git/checkouts/substrate-7e08433d4c370a21/76fed9b/primitives/runtime/src/generic/unchecked_extrinsic.rs:44:1&#xD;&#xA;      |&#xD;&#xA;  44  | pub struct UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;&#xD;&#xA;      | -------------------------------------------------------------- doesn't satisfy `_: Checkable&lt;ChainContext&lt;Runtime&gt;&gt;`&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/home/magewe/rust/gensyn/node/chain_node/target/debug/wbuild/gensyn-runtime/target/wasm32-unknown-unknown/release/deps/gensyn_runtime-13d0535547ae2d3c.long-type-6182207052186516563.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `_sp_runtime::generic::UncheckedExtrinsic&lt;sp_authority_discovery::app::Public, RuntimeCall, sp_authority_discovery::app::Signature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;: Checkable&lt;ChainContext&lt;Runtime&gt;&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This indicates to me that using `app_crypto!` types does not work out of the box here, as the extrinsics do not implement `Checkable&lt;_&gt;`.&#xD;&#xA;&#xD;&#xA;What is the proper way of using types such as `AuthorityId` as `AccountId`?&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;Alternatively specifying the associated type as such:&#xD;&#xA;`type AccountId = &lt;&lt;AuthoritySignature as Verify&gt;::Signer as IdentifyAccound&gt;::AccountId;`&#xD;&#xA;gives hundreds of errors including the following, potentially more useful error:&#xD;&#xA;```rust&#xD;&#xA;error[E0277]: the trait bound `sp_authority_discovery::app::Signature: _sp_runtime::traits::Verify` is not satisfied&#xD;&#xA;     --&gt; /home/magewe/rust/gensyn/node/chain_node/runtime/src/lib.rs:876:3&#xD;&#xA;      |&#xD;&#xA;  876 | /         fn authorities() -&gt; Vec&lt;AuthorityDiscoveryId&gt; {&#xD;&#xA;  877 | |             let current_session_index = &lt;pallet_session_info::Pallet&lt;Runtime&gt;&gt;::session_index();&#xD;&#xA;  878 | |             let earliest_stored_session = &lt;pallet_session_info::Pallet&lt;Runtime&gt;&gt;::earliest_stored_session();&#xD;&#xA;  879 | |&#xD;&#xA;  ...   |&#xD;&#xA;  897 | |&#xD;&#xA;  898 | |         }&#xD;&#xA;      | |_________^ the trait `_sp_runtime::traits::Verify` is not implemented for `sp_authority_discovery::app::Signature`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `_sp_runtime::traits::Verify`:&#xD;&#xA;                AnySignature&#xD;&#xA;                MultiSignature&#xD;&#xA;                sp_core::ecdsa::Signature&#xD;&#xA;                sp_core::ed25519::Signature&#xD;&#xA;                sp_core::sr25519::Signature&#xD;&#xA;```&#xD;&#xA;Manually implementing `Verify` here seems weird as I would have expected that a `Signature` should always be verifiable.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31054" PostHistoryTypeId="2" PostId="7898" RevisionGUID="89746ce5-bfd5-461a-9915-0cf0e2660e65" CreationDate="2023-03-31T16:24:48.527" UserId="16" Text="&gt; Wondering if anyone knows whether ink! supports AccountIds which are&#xD;&#xA;&gt; ethereum-style accounts?&#xD;&#xA;&#xD;&#xA;Yes. `pallet-contracts` will work with the unified account setup you referenced. It is generic over the `AccountId`. The type is defined chain wide in [`frame_system::pallet::Config`](https://docs.rs/frame-system/20.0.0/frame_system/pallet/trait.Config.html#associatedtype.AccountId).&#xD;&#xA;&#xD;&#xA;For example, Moonbeam would have no problem integrating `pallet-contracts`. It will just work with their customized `AccountId`.&#xD;&#xA;&#xD;&#xA;&gt; If it is supported, are there any important considerations?&#xD;&#xA;&#xD;&#xA;While the `AccountId` is generic, it is still rare for chains to actually deviate from the default type. Hence most ink! contracts probably hard code or at least have some assumptions about the used `AccountId`. An ink! contract [needs to be configured](https://use.ink/basics/chain-environment-types) in order to learn about which types a chain uses. Hence you need to change and re-compile a contract for each target chain that uses a different environment. We should probably add a way to set the environment on the cli while compiling rather than in the source code." ContentLicense="CC BY-SA 4.0" />
  <row Id="31056" PostHistoryTypeId="2" PostId="7899" RevisionGUID="2cfa40f5-caba-4296-ad53-7b2ce368c625" CreationDate="2023-03-31T17:05:04.380" UserId="16" Text="There is no (known) secret key for a contract's account id. This is kind of the point of contracts: Their actions are governed by code rather than by an external force that can provide a signature.&#xD;&#xA;&#xD;&#xA;There can't be a signature that is provided by a contract ever. The only way to have a specific contract appear as a caller somewhere is to **make this contract execute the call**. How do you do that? That depends completely on the contract in question. That is: Is the contract coded in a way to allow the interaction you want? The answer is usually &quot;yes&quot; because the contract author had a specific workflow in mind when putting the requirements in place.&#xD;&#xA;&#xD;&#xA;In your concrete example we require the contract itself to call `add_owner` because it is a privileged operation. Those must only be performed if enough owners want it to happen. If this is the case they can act on behalf of the contract (this is the basic multisig functionality). They do that by submitting a transaction that adds an owner, approve it and finally execute it. The workflow would look like this:&#xD;&#xA;&#xD;&#xA;1) Encode a [`Transaction`](https://github.com/paritytech/ink-examples/blob/bc6b5c1dd7e3b5af38b7795b2cfe6ff6b83c466d/multisig/lib.rs#L123-L137) that calls [`add_owner`](https://github.com/paritytech/ink-examples/blob/bc6b5c1dd7e3b5af38b7795b2cfe6ff6b83c466d/multisig/lib.rs#L365) and pass it to [`submit_transaction`](https://github.com/paritytech/ink-examples/blob/bc6b5c1dd7e3b5af38b7795b2cfe6ff6b83c466d/multisig/lib.rs#L438-L441). Please note that you need to set [`allow_reentrancy`](https://github.com/paritytech/ink-examples/blob/bc6b5c1dd7e3b5af38b7795b2cfe6ff6b83c466d/multisig/lib.rs#L134-L136) to true as the contract will be calling itself.&#xD;&#xA;2) Make enough owners call [`confirm_transaction`](https://github.com/paritytech/ink-examples/blob/bc6b5c1dd7e3b5af38b7795b2cfe6ff6b83c466d/multisig/lib.rs#L481-L484) on the `TransactionId` returned by your call to `submit_transaction` in step 1.&#xD;&#xA;3) Call [`invoke_transaction`](https://github.com/paritytech/ink-examples/blob/bc6b5c1dd7e3b5af38b7795b2cfe6ff6b83c466d/multisig/lib.rs#L529-L532) on the `TransactionId`. This will make the contract call `add_owner` on itself.&#xD;&#xA;&#xD;&#xA;Crafting the `Transaction` in step 1 requires the metadata in order to look up the selector and how to encode inputs. It is also a manual process. I think it would be worthwhile to standardize a `Call` type in the contract metadata so that a nice UI could be build in case a call needs to be passed as argument." ContentLicense="CC BY-SA 4.0" />
  <row Id="31058" PostHistoryTypeId="5" PostId="7457" RevisionGUID="b780c870-e324-4e18-9a50-ac67c75dffaf" CreationDate="2023-03-31T17:59:59.340" UserId="16" Comment="deleted 44 characters in body" Text="DispatchError: `ContractTrapped`&#xD;&#xA;&#xD;&#xA;DispatchError docs: `Contract trapped during execution.`&#xD;&#xA;&#xD;&#xA;Debug message:&#xD;&#xA;&#xD;&#xA;```panicked at 'encountered error while calling &lt;AccountId as PSP22&gt;::transfer_from: CalleeTrapped',...```&#xD;&#xA;&#xD;&#xA;This gets invoked when calling:&#xD;&#xA;```rust&#xD;&#xA;PSP22Ref::transfer_from(&#xD;&#xA;    &amp;token,&#xD;&#xA;    sender,&#xD;&#xA;    contract,&#xD;&#xA;    amount,&#xD;&#xA;    Vec::new(),&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;I do have checks prior to make sure the `sender` has greater or equal than `amount` of `token` in balance and allowance to the contract. The PSP22 token is initialized on my local chain. Not really sure why it tells me it's trapped.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31059" PostHistoryTypeId="2" PostId="7900" RevisionGUID="657cd4ba-b6b4-4b53-beb8-a57c2bf4856d" CreationDate="2023-03-31T18:09:56.023" UserId="16" Text="`CalleeTrapped` means that the contract you are calling (the `PSP22` contract in this case) trapped. Trapped just means its aborted its execution and rolled back all changes. A panic/assert in Rust will cause a trap. This doesn't need to be an exceptional error but could just be how the callee decided to do error handling.&#xD;&#xA;&#xD;&#xA;If the callee was compiled in debug mode (i.e not  passing `--release` to `cargo contract`) the reason should be found in the debug buffer. You seem to have posted a truncated version of the debug buffer. Wasn't there any more useful information in there?&#xD;&#xA;&#xD;&#xA;We can't really tell from the information posted **why** the callee trapped as this is a generic error. I suggest to build the callee in debug mode and then examine the debug buffer on error. This should help you to find out where the callee is failing." ContentLicense="CC BY-SA 4.0" />
  <row Id="31061" PostHistoryTypeId="5" PostId="7755" RevisionGUID="6e83b4ba-bd5a-491e-a65a-12e6dc5d7f75" CreationDate="2023-03-31T18:26:53.900" UserId="3991" Comment="add PR link" Text="This appears to be a bug and [an issue has been opened][1].&#xD;&#xA;&#xD;&#xA;I'm not sure if this is the SE etiquette is for these scenarios (or what is), but I will keep this answer updated as progress is made on the issue.&#xD;&#xA;&#xD;&#xA;Edit: The issue has been identified and a PR opened (https://github.com/paritytech/substrate/pull/13794)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/13696" ContentLicense="CC BY-SA 4.0" />
  <row Id="31067" PostHistoryTypeId="52" PostId="7893" RevisionGUID="85d363b9-85d8-454a-8e55-330dae0990fe" CreationDate="2023-03-31T20:29:14.410" />
  <row Id="31068" PostHistoryTypeId="2" PostId="7902" RevisionGUID="eef6dc55-14ce-483f-9f12-790250d0d958" CreationDate="2023-03-31T20:35:07.053" UserId="2163" Text="I have been trying to run the try-state hook to check whether the Polkadot network passes all the checks.&#xD;&#xA;&#xD;&#xA;I started a local node and imported the state from the Polkadot network.&#xD;&#xA;When trying to run the try-state command like this:&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot try-runtime \&#xD;&#xA;    --runtime ./target/release/wbuild/polkadot-runtime/polkadot_runtime.wasm \&#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    execute-block live \&#xD;&#xA;    --try-state Collective \&#xD;&#xA;    --uri ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I received the following error message:&#xD;&#xA;```&#xD;&#xA;error: Found argument '--try-state' which wasn't expected, or isn't valid in this context&#xD;&#xA;```&#xD;&#xA;Looking at https://paritytech.github.io/substrate/master/try_runtime_cli/ this command should work.&#xD;&#xA;&#xD;&#xA;Also when following a chain instead of executing a single block this command works." ContentLicense="CC BY-SA 4.0" />
  <row Id="31070" PostHistoryTypeId="1" PostId="7902" RevisionGUID="eef6dc55-14ce-483f-9f12-790250d0d958" CreationDate="2023-03-31T20:35:07.053" UserId="2163" Text="Problem when running try-state" ContentLicense="CC BY-SA 4.0" />
  <row Id="31071" PostHistoryTypeId="3" PostId="7902" RevisionGUID="eef6dc55-14ce-483f-9f12-790250d0d958" CreationDate="2023-03-31T20:35:07.053" UserId="2163" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31072" PostHistoryTypeId="5" PostId="7898" RevisionGUID="3f6bddca-542f-4dcb-955a-fc30806ce5c8" CreationDate="2023-03-31T21:16:40.973" UserId="16" Comment="added 95 characters in body" Text="&gt; Wondering if anyone knows whether ink! supports AccountIds which are&#xD;&#xA;&gt; ethereum-style accounts?&#xD;&#xA;&#xD;&#xA;Yes. `pallet-contracts` will work with the unified account setup you referenced. It is generic over the `AccountId`. The type is defined chain wide in [`frame_system::pallet::Config`](https://docs.rs/frame-system/20.0.0/frame_system/pallet/trait.Config.html#associatedtype.AccountId).&#xD;&#xA;&#xD;&#xA;For example, Moonbeam would have no problem integrating `pallet-contracts`. It will just work with their customized `AccountId`.&#xD;&#xA;&#xD;&#xA;&gt; If it is supported, are there any important considerations?&#xD;&#xA;&#xD;&#xA;While the `AccountId` is generic, it is still rare for chains to actually deviate from the default type. Hence most ink! contracts probably hard code or at least have some assumptions about the used `AccountId`. An ink! contract [needs to be configured](https://use.ink/basics/chain-environment-types) in order to learn about which types a chain uses.&#xD;&#xA;&#xD;&#xA;Hence you need to change and re-compile a contract for each target chain that uses a different environment. Changing the contract code in order to compile it for different environments is quite annoying. You could introduce a cargo feature for your contract which would allow you to select different environments when compiling using `--features`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31073" PostHistoryTypeId="5" PostId="7898" RevisionGUID="ba934a3e-9d85-4449-8e9b-44c13c659ff4" CreationDate="2023-03-31T21:25:07.913" UserId="16" Comment="added 95 characters in body" Text="&gt; Wondering if anyone knows whether ink! supports AccountIds which are&#xD;&#xA;&gt; ethereum-style accounts?&#xD;&#xA;&#xD;&#xA;Yes. `pallet-contracts` will work with the unified account setup you referenced. It is generic over the `AccountId`. The type is defined chain wide in [`frame_system::pallet::Config`](https://docs.rs/frame-system/20.0.0/frame_system/pallet/trait.Config.html#associatedtype.AccountId).&#xD;&#xA;&#xD;&#xA;For example, Moonbeam would have no problem integrating `pallet-contracts`. It will just work with their customized `AccountId`.&#xD;&#xA;&#xD;&#xA;&gt; If it is supported, are there any important considerations?&#xD;&#xA;&#xD;&#xA;While the `AccountId` is generic, it is still rare for chains to actually deviate from the default type. Hence most ink! contracts probably hard code or at least have some assumptions about the used `AccountId`. An ink! contract [needs to be configured](https://use.ink/basics/chain-environment-types) in order to learn about which types a chain uses.&#xD;&#xA;&#xD;&#xA;Hence you need to change and re-compile a contract for each target chain that uses a different environment. Changing the contract code in order to compile it for different environments is quite annoying. You could introduce a cargo feature for your contract which would allow you to select different environments when compiling using `--features`.&#xD;&#xA;&#xD;&#xA;Like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Debug, Clone, PartialEq, Eq)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(TypeInfo))]&#xD;&#xA;#[cfg(feature = &quot;moonbeam&quot;)]&#xD;&#xA;pub enum MoonbeamEnvironment {}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;moonbeam&quot;)]&#xD;&#xA;impl ink_env::Environment for MoonbeamEnvironment {&#xD;&#xA;    // Configure for moonbeam.&#xD;&#xA;    // `type AccountId` would be the interesting item&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;moonbeam&quot;)]&#xD;&#xA;type MyEnv = MoonbeamEnvironment;&#xD;&#xA;&#xD;&#xA;#[cfg(not(feature = &quot;moonbeam&quot;))]&#xD;&#xA;type MyEnv = ink_env::DefaultEnvironment;&#xD;&#xA;&#xD;&#xA;#[ink::contract(env = MyEnv)]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31074" PostHistoryTypeId="36" PostId="7903" RevisionGUID="a915eb15-3e25-4d3d-8b6c-1efa7e8252c2" CreationDate="2023-03-31T23:30:57.750" UserId="-1" Comment="from https://ethereum.stackexchange.com/questions/148185/accidentally-used-eth-address-to-receive-token-from-polkadot" />
  <row Id="31075" PostHistoryTypeId="2" PostId="7903" RevisionGUID="3f4b4bb2-2232-4955-a2a2-3bf362017f61" CreationDate="2023-03-29T15:09:44.760" UserDisplayName="user119236" Text="I accidentally used ETH address to receive token from polkadot.&#xD;&#xA;&#xD;&#xA;Is there any way I can access my tokens with my private key? Thanks&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;https://polkaholic.io/account/49zaADFp2kjgEJhmUWp1aq4zVc6fGBnSNFEUa4b2WAvxF73X?group=overview&amp;chainfilters=all&#xD;&#xA;&#xD;&#xA;Eth address : &#xD;&#xA;0x9ebb1958fb8aecac3cb5c2f10aa473955f9c7ef1&#xD;&#xA;&#xD;&#xA;Public key in polkaholic:&#xD;&#xA;0x9ebb1958fb8aecac3cb5c2f10aa473955f9c7ef1000000000000000000000000" ContentLicense="CC BY-SA 4.0" />
  <row Id="31077" PostHistoryTypeId="1" PostId="7903" RevisionGUID="3f4b4bb2-2232-4955-a2a2-3bf362017f61" CreationDate="2023-03-29T15:09:44.760" UserDisplayName="user119236" Text="Accidentally used ETH address to receive token from polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="31078" PostHistoryTypeId="3" PostId="7903" RevisionGUID="3f4b4bb2-2232-4955-a2a2-3bf362017f61" CreationDate="2023-03-29T15:09:44.760" UserDisplayName="user119236" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31079" PostHistoryTypeId="2" PostId="7904" RevisionGUID="2953dba4-88c9-4db4-8243-a6c61aba1ea0" CreationDate="2023-04-01T06:53:16.397" UserId="3991" Text="This is a typo in the docs. `live` belongs before `--uri`, not after `execute-block`. &#xD;&#xA;&#xD;&#xA;Try this:&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot try-runtime \&#xD;&#xA;    --runtime ./target/release/wbuild/polkadot-runtime/polkadot_runtime.wasm \&#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    execute-block \&#xD;&#xA;    --try-state Collective \&#xD;&#xA;    live --uri ws://localhost:9944&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31081" PostHistoryTypeId="5" PostId="7882" RevisionGUID="dd1c0bb2-e0eb-48dd-8080-c57c9a4b08e2" CreationDate="2023-04-01T08:41:39.890" UserId="4028" Comment="added 113 characters in body" Text="Solved! This was caused by the nightly toolchain. Switching to the stable toolchain solved this issue.&#xD;&#xA;&#xD;&#xA;Edit: As pointed out by Shunsuke, this is specific to the 1.70.0 nightly build. 1.68.0 version seems to work." ContentLicense="CC BY-SA 4.0" />
  <row Id="31082" PostHistoryTypeId="50" PostId="5652" RevisionGUID="78dbe650-7bbb-4919-8445-3060a35b4c21" CreationDate="2023-04-01T10:06:20.937" UserId="-1" />
  <row Id="31083" PostHistoryTypeId="50" PostId="5657" RevisionGUID="fa21d43c-6673-49fb-a96c-2ffc01c3f6c3" CreationDate="2023-04-01T11:04:00.610" UserId="-1" />
  <row Id="31085" PostHistoryTypeId="2" PostId="7905" RevisionGUID="729afe84-ce53-4d78-a2b8-be7a7e70c7c0" CreationDate="2023-04-01T13:38:32.443" UserId="49" Text="Short answer: Not directly, you have to utilize governance (success not guaranteed).&#xD;&#xA;&#xD;&#xA;Ethereum uses the [Elliptic Curve secp256k1](https://ethereum.org/sr/developers/docs/evm/) to derive a public key from a private key, whereas Polkadot uses the [Edward Curve sr25519](https://docs.substrate.io/reference/cryptography/). This means that the public keys, that are derived from the same private key in Ethereum and Polkadot, differ. Consequently, you cannot access your funds directly if you sent tokens to the same public key but in another network.&#xD;&#xA;&#xD;&#xA;The only solution to that problem I see is to [utilize governance ](https://wiki.polkadot.network/docs/maintain-guides-democracy). You will have to ask all token holders to unlock your funds. For that you have to lock DOT until your proposal is tabled as a referendum and finally decided by all token holders in the network. To have a chance at all that token holders accept your referendum, you have to explain the situation in all detail and provide a signature made with your Ethereum account over the message that explains the issue (don't forget to include a timestamp).&#xD;&#xA;&#xD;&#xA;Note that Polkadot still uses Gov 1.0 instead of Gov 2.0 (OpenGov), which means that you'll have a lot of competing proposals that receive backing to be tabled faster as a referendum, as there can be only one proposal tabled at a time in Polkadot (with the exception of fast-tracked proposals).&#xD;&#xA;&#xD;&#xA;Good Luck." ContentLicense="CC BY-SA 4.0" />
  <row Id="31087" PostHistoryTypeId="50" PostId="7434" RevisionGUID="2f40e12e-c89b-4050-95d5-627c998fa3e4" CreationDate="2023-04-01T14:03:10.433" UserId="-1" />
  <row Id="31088" PostHistoryTypeId="2" PostId="7906" RevisionGUID="01dff97b-c885-48aa-8085-85531561fc5e" CreationDate="2023-04-01T14:14:58.113" UserId="1777" Text="I'm getting issue when implementing EnsureMember of pallet-collective. I have implemented pallet-collective like this:&#xD;&#xA;&#xD;&#xA;    impl pallet_template::Config for Runtime {&#xD;&#xA;	type ManagerOrigin = pallet_collective::EnsureMember&lt;AccountId, ManagerCollective&gt;;}&#xD;&#xA;&#xD;&#xA;I have set Alice and Bob are ManagerOrigin. It is the return data of Managers&#xD;&#xA;&#xD;&#xA;    managerCommittee.members: Vec&lt;AccountId32&gt;&#xD;&#xA;    [&#xD;&#xA;      5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;But when I call the `do_something` function with Alice I can't pass this check and getting BadOrigin error.&#xD;&#xA;&#xD;&#xA;    T::ManagerOrigin::ensure_origin(origin)?;&#xD;&#xA;&#xD;&#xA;Did I miss something? Alice should call `do_something` function without any error right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31090" PostHistoryTypeId="1" PostId="7906" RevisionGUID="01dff97b-c885-48aa-8085-85531561fc5e" CreationDate="2023-04-01T14:14:58.113" UserId="1777" Text="EnsureMember in pallet-collective" ContentLicense="CC BY-SA 4.0" />
  <row Id="31091" PostHistoryTypeId="3" PostId="7906" RevisionGUID="01dff97b-c885-48aa-8085-85531561fc5e" CreationDate="2023-04-01T14:14:58.113" UserId="1777" Text="|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31092" PostHistoryTypeId="2" PostId="7907" RevisionGUID="933fe49c-381c-4dc5-bfb0-856c0ad8dfad" CreationDate="2023-04-01T14:45:17.323" UserId="2722" Text="I am working on a Substrate-based blockchain project and I have the following function in my custom pallet:&#xD;&#xA;&#xD;&#xA;    #[pallet::call_index(8)]&#xD;&#xA;    #[pallet::weight(&lt;T as Config&gt;::WeightInfo::create_exchange())]&#xD;&#xA;    #[transactional]&#xD;&#xA;    pub fn call_smart_contract(&#xD;&#xA;        origin: OriginFor&lt;T&gt;,&#xD;&#xA;        dest: T::AccountId,&#xD;&#xA;        mut selector: Vec&lt;u8&gt;,&#xD;&#xA;        arg: u32,&#xD;&#xA;        gas_limit: Weight,&#xD;&#xA;    ) -&gt; DispatchResult {&#xD;&#xA;        let who = ensure_signed(origin)?;&#xD;&#xA;        ensure!(selector.len() &lt; MAX_LENGTH, Error::&lt;T&gt;::InputTooLarge);&#xD;&#xA;        let value: BalanceOf&lt;T&gt; = Default::default();&#xD;&#xA;        let mut arg_enc: Vec&lt;u8&gt; = arg.encode();&#xD;&#xA;        let mut data = Vec::new();&#xD;&#xA;        data.append(&amp;mut selector);&#xD;&#xA;        data.append(&amp;mut arg_enc);&#xD;&#xA;    &#xD;&#xA;        pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;            who,&#xD;&#xA;            dest.clone(),&#xD;&#xA;            value,&#xD;&#xA;            gas_limit,&#xD;&#xA;            data,&#xD;&#xA;            pallet_contracts::Pallet::&lt;T&gt;::deterministic(),&#xD;&#xA;            None,&#xD;&#xA;            false,&#xD;&#xA;        );&#xD;&#xA;    &#xD;&#xA;        Self::deposit_event(Event::CalledContractFromPallet(dest));&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I encountered the following errors when compiling my code:&#xD;&#xA;&#xD;&#xA;1 - Error: no method named map_err found for struct ContractResult in the current scope&#xD;&#xA;&#xD;&#xA;    --&gt; /home/kianoush/projects/music-chain/frame/dex/src/lib.rs:327:5&#xD;&#xA;    327 |             .map_err(|e| {&#xD;&#xA;    |              ^^^^^^^ method not found in `ContractResult&lt;Result&lt;ExecReturnValue, DispatchError&gt;, &lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as Config&gt;::AccountId&gt;&gt;::Balance&gt;`&#xD;&#xA;&#xD;&#xA;2 - Error: no associated item named Deterministic found for struct Pallet in the current scope&#xD;&#xA;&#xD;&#xA;    --&gt; /home/kianoush/projects/music-chain/frame/dex/src/lib.rs:323:36&#xD;&#xA;    323 |                 pallet_contracts::Pallet::&lt;T&gt;::Deterministic,&#xD;&#xA;    |                                                ^^^^^^^^^^^^^ associated item not found in `Pallet&lt;T&gt;`&#xD;&#xA;&#xD;&#xA;3 - Error: arguments to this function are incorrect&#xD;&#xA;&#xD;&#xA;    --&gt; /home/kianoush/projects/music-chain/frame/dex/src/lib.rs:317:4&#xD;&#xA;    317  |             pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;&#xD;&#xA;I am not sure how to resolve these errors. Can anyone help me understand what's wrong with my code and how to fix these issues?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31094" PostHistoryTypeId="1" PostId="7907" RevisionGUID="933fe49c-381c-4dc5-bfb0-856c0ad8dfad" CreationDate="2023-04-01T14:45:17.323" UserId="2722" Text="method not found&quot; and &quot;associated item not found&quot; errors in a Substrate pallet function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31095" PostHistoryTypeId="3" PostId="7907" RevisionGUID="933fe49c-381c-4dc5-bfb0-856c0ad8dfad" CreationDate="2023-04-01T14:45:17.323" UserId="2722" Text="|substrate-node-template|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31096" PostHistoryTypeId="2" PostId="7908" RevisionGUID="f6c212e6-dc21-435a-a0c8-3e20c915937c" CreationDate="2023-04-01T14:50:10.667" UserId="3317" Text="I am trying to instantiate multiple contracts in my e2e-test. For some reason it can only find one of my contracts and not the others. Uploading the contract resulted in the same error: `ContractNotFound`. &#xD;&#xA;&#xD;&#xA;I am writing the [delegator example][1], but in stead of instantiating the `adder`, `subber` and `accumulator` contract while instantiating the `delegator` contract, I am using already instantiated contracts. &#xD;&#xA;&#xD;&#xA;I'm a bit lost since I am simply doing the exact same thing as for instantiating the `accumulator` contract but for some reason it panicks [here][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/tree/main/delegator&#xD;&#xA;  [2]: https://github.com/Daanvdplas/Ink/blob/14195b4a9645b42be65ea04c8f75787d7b9f8a36/my_contracts/delegator/lib.rs#L179-L183" ContentLicense="CC BY-SA 4.0" />
  <row Id="31098" PostHistoryTypeId="1" PostId="7908" RevisionGUID="f6c212e6-dc21-435a-a0c8-3e20c915937c" CreationDate="2023-04-01T14:50:10.667" UserId="3317" Text="ContractNotFound for contract instantiation in e2e-test" ContentLicense="CC BY-SA 4.0" />
  <row Id="31099" PostHistoryTypeId="3" PostId="7908" RevisionGUID="f6c212e6-dc21-435a-a0c8-3e20c915937c" CreationDate="2023-04-01T14:50:10.667" UserId="3317" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31100" PostHistoryTypeId="5" PostId="7908" RevisionGUID="e6a728a2-4961-4e3a-a7ff-8ae1df8fb519" CreationDate="2023-04-01T15:00:23.487" UserId="3317" Comment="deleted 135 characters in body" Text="I am trying to instantiate multiple contracts in my e2e-test. For some reason it can only find one of my contracts and not the others. Uploading the contract resulted in the same error: `ContractNotFound`. &#xD;&#xA;&#xD;&#xA;From looking at the [delegator example][1] where `additional_contracts` are provided like so:&#xD;&#xA;&gt;#[ink_e2e::test(&#xD;&#xA;            additional_contracts = &quot;accumulator/Cargo.toml adder/Cargo.toml subber/Cargo.toml&quot;&#xD;&#xA;        )]&#xD;&#xA;   &#xD;&#xA;I have added the additional contracts that I want to instantiate in my tests but it doesn't work for the others for some reason.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/tree/main/delegator" ContentLicense="CC BY-SA 4.0" />
  <row Id="31101" PostHistoryTypeId="2" PostId="7909" RevisionGUID="8ba19a80-d09a-4a50-b76e-10ff7a50c12b" CreationDate="2023-04-01T15:07:08.937" UserId="3317" Text="What solved the problem:&#xD;&#xA;```&#xD;&#xA;#[ink_e2e::test( additional_contracts = &quot;accumulator/Cargo.toml adder/Cargo.toml subber/Cargo.toml&quot; )]&#xD;&#xA;async fn test_accumulator () { .. }&#xD;&#xA;&#xD;&#xA;#[ink_e2e::test]&#xD;&#xA;async fn test_adder () { .. }&#xD;&#xA;&#xD;&#xA;#[ink_e2e::test]&#xD;&#xA;async fn test_subber () { .. }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31103" PostHistoryTypeId="5" PostId="7908" RevisionGUID="24d041b4-9c4b-4921-8184-1d3d420fef8c" CreationDate="2023-04-01T15:09:29.970" UserId="3317" Comment="added 115 characters in body" Text="I am trying to instantiate multiple contracts in my e2e-test. For some reason it can only find one of my contracts and not the others. Uploading the contract resulted in the same error: `ContractNotFound`. &#xD;&#xA;&#xD;&#xA;From looking at the [delegator example][1] where `additional_contracts` are provided, I wrote my tests: &#xD;&#xA;```&#xD;&#xA;#[ink_e2e::test( additional_contracts = &quot;accumulator/Cargo.toml&quot; )]&#xD;&#xA;async fn test_accumulator () { .. }&#xD;&#xA;&#xD;&#xA;#[ink_e2e::test( additional_contracts = &quot;adder/Cargo.toml&quot; )]&#xD;&#xA;async fn test_adder () { .. }&#xD;&#xA;&#xD;&#xA;#[ink_e2e::test( additional_contracts = &quot;subber/Cargo.toml&quot; )]&#xD;&#xA;async fn test_subber () { .. }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it can't find the `adder` &amp; `subber` contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/tree/main/delegator" ContentLicense="CC BY-SA 4.0" />
  <row Id="31104" PostHistoryTypeId="5" PostId="7909" RevisionGUID="7a2a8770-218f-4e6a-b30e-909e6a15eb70" CreationDate="2023-04-01T15:15:07.783" UserId="3317" Comment="added 39 characters in body" Text="Only adding the `additional_contracts` once solved the problem:&#xD;&#xA;```&#xD;&#xA;#[ink_e2e::test( additional_contracts = &quot;accumulator/Cargo.toml adder/Cargo.toml subber/Cargo.toml&quot; )]&#xD;&#xA;async fn test_accumulator () { .. }&#xD;&#xA;&#xD;&#xA;#[ink_e2e::test]&#xD;&#xA;async fn test_adder () { .. }&#xD;&#xA;&#xD;&#xA;#[ink_e2e::test]&#xD;&#xA;async fn test_subber () { .. }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31105" PostHistoryTypeId="5" PostId="7803" RevisionGUID="9dd86b05-8ead-41a6-9a33-6e2c28fa67af" CreationDate="2023-04-01T20:07:03.740" UserId="3990" Comment="added 107 characters in body" Text="When I try to create a `PairSigner`, then the `Pair` traits are not satisfied. &#xD;&#xA;&#xD;&#xA;&gt; [GitHub repo](https://github.com/martinloesethjensen/gm-burn-fren-script/tree/main) to check the code&#xD;&#xA;&#xD;&#xA;With this code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let pair = sp_core::sr25519::Pair::from_phrase(mnemonic_phrase.as_str(), None).unwrap();&#xD;&#xA;&#xD;&#xA;let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get this error: &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0599]: the function or associated item `new` exists for struct `PairSigner&lt;WithExtrinsicParams&lt;SubstrateConfig, BaseExtrinsicParams&lt;SubstrateConfig, PlainTip&gt;&gt;, Pair&gt;`, but its trait bounds were not satisfied&#xD;&#xA;  --&gt; src/main.rs:23:72&#xD;&#xA;   |&#xD;&#xA;23 |     let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair);&#xD;&#xA;   |                                                                        ^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;   |&#xD;&#xA;  ::: /Users/martin.jensen/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-core-18.0.0/src/sr25519.rs:83:1&#xD;&#xA;   |&#xD;&#xA;83 | pub struct Pair(Keypair);&#xD;&#xA;   | ---------------&#xD;&#xA;   | |&#xD;&#xA;   | doesn't satisfy `_: CryptoType`&#xD;&#xA;   | doesn't satisfy `sp_core::sr25519::Pair: sp_core::crypto::Pair`&#xD;&#xA;   |&#xD;&#xA;   = note: the following trait bounds were not satisfied:&#xD;&#xA;           `sp_core::sr25519::Pair: sp_core::crypto::Pair`&#xD;&#xA;           `sp_core::sr25519::Pair: sp_core::crypto::CryptoType`&#xD;&#xA;           which is required by `sp_core::sr25519::Pair: sp_core::crypto::Pair`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0599`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is my toml dependencies which I followed from the [subxt example toml](https://github.com/paritytech/subxt/blob/42bcddeecb39db98e711075b44331d24a8fbeb4d/examples/Cargo.toml): &#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;structopt = &quot;0.3.26&quot;&#xD;&#xA;tokio = { version = &quot;1.26&quot;, features = [&quot;rt-multi-thread&quot;, &quot;macros&quot;, &quot;time&quot;] }&#xD;&#xA;sp-keyring = &quot;20.0.0&quot;&#xD;&#xA;sp-core = { version = &quot;18.0.0&quot;, default-features = false }&#xD;&#xA;sp-runtime = &quot;20.0.0&quot;&#xD;&#xA;futures = &quot;0.3.27&quot;&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&quot;derive&quot;, &quot;full&quot;, &quot;bit-vec&quot;] }&#xD;&#xA;hex = &quot;0.4.3&quot;&#xD;&#xA;tracing-subscriber = &quot;0.3.11&quot;&#xD;&#xA;subxt = &quot;0.27.1&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31106" PostHistoryTypeId="2" PostId="7910" RevisionGUID="9b7484ba-dfff-41a0-bb7a-ed1eb8ca87e0" CreationDate="2023-04-02T01:39:33.887" UserId="2048" Text="I have made an investigation, and find something interesting. The Stream trait implemented for TxProgress will end only when the event FinalityTimeout or Finalized received.  But I found the RPC server of substrate will remove subscribers when the usurped,  invalid, dropped, finalized or finality_timeout received. So I'm curious whether TxProgress would drop the connection and stop waiting for new events?&#xD;&#xA;&#xD;&#xA;Please find below some relevant code snippets:&#xD;&#xA;&#xD;&#xA;[TxProgress](https://github.com/paritytech/subxt/blob/a2b8dde5e6d0a6e9c81a6b3d4bebe5177dc7899a/subxt/src/tx/tx_progress.rs#L137-L181)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Below is Listener, the server side corresponding to the client of subscribition. It will fire a event when the transaction status changed, and it will close the connection if `h.is_done()` returns true. You could find the code [here](https://github.com/paritytech/substrate/blob/75dee3c6fc72f6399a43f498e0e42f94fb82a7bd/client/transaction-pool/src/graph/listener.rs#L44-L59)&#xD;&#xA;```&#xD;&#xA;impl&lt;H: hash::Hash + traits::Member + Serialize, C: ChainApi&gt; Listener&lt;H, C&gt; {&#xD;&#xA;	fn fire&lt;F&gt;(&amp;mut self, hash: &amp;H, fun: F)&#xD;&#xA;	where&#xD;&#xA;		F: FnOnce(&amp;mut watcher::Sender&lt;H, ExtrinsicHash&lt;C&gt;&gt;),&#xD;&#xA;	{&#xD;&#xA;		let clean = if let Some(h) = self.watchers.get_mut(hash) {&#xD;&#xA;			fun(h);&#xD;&#xA;			h.is_done()&#xD;&#xA;		} else {&#xD;&#xA;			false&#xD;&#xA;		};&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		if clean {&#xD;&#xA;			self.watchers.remove(hash);&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And `h` is a instance of [Sender](https://github.com/paritytech/substrate/blob/75dee3c6fc72f6399a43f498e0e42f94fb82a7bd/client/transaction-pool/src/graph/watcher.rs#L51-L54). It's method `is_done` returns true if `is_finalized` is true, or it's subscribers is empty.&#xD;&#xA;```&#xD;&#xA;pub fn is_done(&amp;self) -&gt; bool {&#xD;&#xA;        self.is_finalized || self.receivers.is_empty()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And you could find relevent codes [here](https://github.com/paritytech/substrate/blob/75dee3c6fc72f6399a43f498e0e42f94fb82a7bd/client/transaction-pool/src/graph/watcher.rs#L81), the Sender will change `is_finalized` to true, if the event is usurped, finalized, finality_timeout, invalid or dropped.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31108" PostHistoryTypeId="5" PostId="7906" RevisionGUID="48637d23-f4f0-481f-b2cf-cf88e69c8531" CreationDate="2023-04-02T03:05:56.797" UserId="1777" Comment="added 756 characters in body" Text="I'm getting issue when implementing EnsureMember of pallet-collective. I have implemented pallet-collective like this:&#xD;&#xA;&#xD;&#xA;    parameter_types! {&#xD;&#xA;    	pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS;&#xD;&#xA;    	pub const TechnicalMaxProposals: u32 = 100;&#xD;&#xA;    	pub const TechnicalMaxMembers: u32 = 100;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    type ManagerCollective = pallet_collective::Instance2;&#xD;&#xA;    &#xD;&#xA;    impl pallet_collective::Config&lt;ManagerCollective&gt; for Runtime {&#xD;&#xA;    	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;    	type Proposal = RuntimeCall;&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type MotionDuration = TechnicalMotionDuration;&#xD;&#xA;    	type MaxProposals = TechnicalMaxProposals;&#xD;&#xA;    	type MaxMembers = TechnicalMaxMembers;&#xD;&#xA;    	type DefaultVote = pallet_collective::PrimeDefaultVote;&#xD;&#xA;    	type WeightInfo = pallet_collective::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl pallet_template::Config for Runtime {&#xD;&#xA;    	type ManagerOrigin = pallet_collective::EnsureMember&lt;AccountId, ManagerCollective&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have set Alice and Bob are ManagerOrigin. It is the return data of Managers&#xD;&#xA;&#xD;&#xA;    managerCommittee.members: Vec&lt;AccountId32&gt;&#xD;&#xA;    [&#xD;&#xA;      5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;      5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;But when I call the `do_something` function with Alice I can't pass this check and getting BadOrigin error.&#xD;&#xA;&#xD;&#xA;    T::ManagerOrigin::ensure_origin(origin)?;&#xD;&#xA;&#xD;&#xA;Did I miss something? Alice should call `do_something` function without any error right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31109" PostHistoryTypeId="50" PostId="7439" RevisionGUID="fcb23952-04a2-44a7-ba68-1a8b1e641874" CreationDate="2023-04-02T06:03:50.483" UserId="-1" />
  <row Id="31110" PostHistoryTypeId="2" PostId="7911" RevisionGUID="3e12db72-50a8-4883-993f-a9e3f30ceeb8" CreationDate="2023-04-02T10:31:27.493" UserId="445" Text="Two functions `batch` and `batch_all` are slightly similar&#xD;&#xA;&#xD;&#xA;+ batch: https://github.com/paritytech/substrate/blob/master/frame/utility/src/lib.rs#L201&#xD;&#xA;&#xD;&#xA;+ batch_all: https://github.com/paritytech/substrate/blob/master/frame/utility/src/lib.rs#L323&#xD;&#xA;&#xD;&#xA;Questions:&#xD;&#xA;&#xD;&#xA;+ When to use `batch` and when to use `batch_all`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31112" PostHistoryTypeId="1" PostId="7911" RevisionGUID="3e12db72-50a8-4883-993f-a9e3f30ceeb8" CreationDate="2023-04-02T10:31:27.493" UserId="445" Text="Different between batch and batchAll functionality in Pallet Utility" ContentLicense="CC BY-SA 4.0" />
  <row Id="31113" PostHistoryTypeId="3" PostId="7911" RevisionGUID="3e12db72-50a8-4883-993f-a9e3f30ceeb8" CreationDate="2023-04-02T10:31:27.493" UserId="445" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31123" PostHistoryTypeId="50" PostId="5680" RevisionGUID="5b71d084-5ac5-4021-9119-977056c9dc1e" CreationDate="2023-04-02T12:07:15.833" UserId="-1" />
  <row Id="31124" PostHistoryTypeId="2" PostId="7914" RevisionGUID="1e6739a0-e8d9-459c-a38d-c7d286ab1e6b" CreationDate="2023-04-02T12:07:48.393" UserId="2340" Text="```rust&#xD;&#xA;fn on_initialize(_: T::BlockNumber) -&gt; Weight {&#xD;&#xA;			let mut weight = T::SystemWeightInfo::kill_storage(1);&#xD;&#xA;&#xD;&#xA;			// If the digest contain an existing ethereum block(encoded as PreLog), If contains,&#xD;&#xA;			// execute the imported block firstly and disable transact dispatch function.&#xD;&#xA;			if let Ok(log) = fp_consensus::find_pre_log(&amp;frame_system::Pallet::&lt;T&gt;::digest()) {&#xD;&#xA;				let PreLog::Block(block) = log;&#xD;&#xA;&#xD;&#xA;				for transaction in block.transactions {&#xD;&#xA;					let source = Self::recover_signer(&amp;transaction).expect(&#xD;&#xA;						&quot;pre-block transaction signature invalid; the block cannot be built&quot;,&#xD;&#xA;					);&#xD;&#xA;&#xD;&#xA;					Self::validate_transaction_in_block(source, &amp;transaction).expect(&#xD;&#xA;						&quot;pre-block transaction verification failed; the block cannot be built&quot;,&#xD;&#xA;					);&#xD;&#xA;					let r = Self::apply_validated_transaction(source, transaction)&#xD;&#xA;						.expect(&quot;pre-block apply transaction failed; the block cannot be built&quot;);&#xD;&#xA;&#xD;&#xA;					weight = weight.saturating_add(r.actual_weight.unwrap_or_default());&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This hook is part of the ethereum pallet defined in Frontier. I understand that in the wrapped block model, communication between the runtime and the node can be achieved through digest. It's used by the `on_finalize` hook to pass data about the inner block, in so the client can keep a mapping of inner to outer block up to date.&#xD;&#xA;&#xD;&#xA;The code I quoted seems to check that the provided block is valid and then execute the transactions it contains.&#xD;&#xA;My problem is that I don't understand under which conditions exactly a block would be provided to the runtime by a `PreRuntime` `DigestItem`.&#xD;&#xA;&#xD;&#xA;Also the logging of the block in the `Digest` in the `on_finalize` hook is disabled when a `PreRuntime` block had been found. But I cannot see how having a `PreRuntime` block prevent from more transactions to be added to the block through regular extrinsic execution.&#xD;&#xA;&#xD;&#xA;Aslo, it seems to go against the 1-1 equivalence between wrapped and wrapper blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="31126" PostHistoryTypeId="1" PostId="7914" RevisionGUID="1e6739a0-e8d9-459c-a38d-c7d286ab1e6b" CreationDate="2023-04-02T12:07:48.393" UserId="2340" Text="PreLog Blocks in frontier ethereum pallet on_initialize hook" ContentLicense="CC BY-SA 4.0" />
  <row Id="31127" PostHistoryTypeId="3" PostId="7914" RevisionGUID="1e6739a0-e8d9-459c-a38d-c7d286ab1e6b" CreationDate="2023-04-02T12:07:48.393" UserId="2340" Text="|frontier|digest|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31128" PostHistoryTypeId="2" PostId="7915" RevisionGUID="cf871745-9965-4954-81d9-8936633c2c15" CreationDate="2023-04-02T12:28:47.267" UserId="2871" Text="The `PreLog` digest is not actually used in the frontier runtime by now. It's only reserved for [some reasons](https://github.com/paritytech/frontier/pull/1014#issuecomment-1457991446)." ContentLicense="CC BY-SA 4.0" />
  <row Id="31131" PostHistoryTypeId="50" PostId="5673" RevisionGUID="d4449e77-c9c3-44f4-b12e-f17619fbb6aa" CreationDate="2023-04-02T14:00:10.033" UserId="-1" />
  <row Id="31132" PostHistoryTypeId="50" PostId="6585" RevisionGUID="ccec0a35-79a2-4d1c-81fa-ca56039c300d" CreationDate="2023-04-02T16:01:05.190" UserId="-1" />
  <row Id="31133" PostHistoryTypeId="2" PostId="7916" RevisionGUID="efd4f8f4-b250-4d36-820f-ba8103b16a05" CreationDate="2023-04-02T16:15:49.753" UserId="3319" Text="In substrate-node-template, are there any available ways to execute a task or provide a callback to be executed just before the block gets gossiped to other validators (right before i produce the block)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31135" PostHistoryTypeId="1" PostId="7916" RevisionGUID="efd4f8f4-b250-4d36-820f-ba8103b16a05" CreationDate="2023-04-02T16:15:49.753" UserId="3319" Text="how to run some logic before gossiping the block as author?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31136" PostHistoryTypeId="3" PostId="7916" RevisionGUID="efd4f8f4-b250-4d36-820f-ba8103b16a05" CreationDate="2023-04-02T16:15:49.753" UserId="3319" Text="|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31137" PostHistoryTypeId="6" PostId="7911" RevisionGUID="8d86d0ee-7233-44c7-affd-1641f534d203" CreationDate="2023-04-02T21:42:41.177" UserId="73" Comment="edited tags" Text="|pallet|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31138" PostHistoryTypeId="2" PostId="7917" RevisionGUID="b4537bc9-5d34-4b33-92e6-921ef0910d92" CreationDate="2023-04-02T21:54:04.400" UserId="73" Text="The docs of both mention the difference. For `batch` it is:&#xD;&#xA;```&#xD;&#xA;/// Send a batch of dispatch calls.&#xD;&#xA;```&#xD;&#xA;And for `batch_all` it is:&#xD;&#xA;```&#xD;&#xA;/// Send a batch of dispatch calls and atomically execute them.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, when you send a batch with `batch` with 5 calls. The third call in the batch fails, the changes of the first two calls are not reverted and committed to the block. `batch_all` would rollback all changes done to the state. However, the user would still pay for the transaction even if all changes are rolled back. " ContentLicense="CC BY-SA 4.0" />
  <row Id="31140" PostHistoryTypeId="50" PostId="7391" RevisionGUID="2f27e8ee-a084-413c-9025-72eede3f6e60" CreationDate="2023-04-03T01:04:20.490" UserId="-1" />
  <row Id="31141" PostHistoryTypeId="5" PostId="7436" RevisionGUID="8d49b95c-c399-4ac2-bb61-94ad806f5c55" CreationDate="2023-04-03T01:41:25.743" UserId="251" Comment="added 49 characters in body" Text="Check your actual runtime's `ExistentialDeposit`.&#xD;&#xA;&#xD;&#xA;`10_000_000_u32` might not be enough to create an account.&#xD;&#xA;&#xD;&#xA;And people usually use `0` in mocking." ContentLicense="CC BY-SA 4.0" />
  <row Id="31143" PostHistoryTypeId="5" PostId="7917" RevisionGUID="d34db29f-70d5-4bcb-a647-e3b30545a669" CreationDate="2023-04-03T07:35:17.693" UserId="167" Comment="added 202 characters in body" Text="The docs of both mention the difference. For [`batch`](https://paritytech.github.io/substrate/master/pallet_utility/pallet/dispatchables/fn.batch.html) it is:&#xD;&#xA;```&#xD;&#xA;/// Send a batch of dispatch calls.&#xD;&#xA;```&#xD;&#xA;And for [`batch_all`](https://paritytech.github.io/substrate/master/pallet_utility/pallet/dispatchables/fn.batch_all.html) it is:&#xD;&#xA;```&#xD;&#xA;/// Send a batch of dispatch calls and atomically execute them.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, when you send a batch with `batch` with 5 calls. The third call in the batch fails, the changes of the first two calls are not reverted and committed to the block. `batch_all` would rollback all changes done to the state. However, the user would still pay for the transaction even if all changes are rolled back. " ContentLicense="CC BY-SA 4.0" />
  <row Id="31144" PostHistoryTypeId="2" PostId="7918" RevisionGUID="d698ec45-4ee2-44c9-b5c5-2e7517d308bd" CreationDate="2023-04-03T08:25:53.183" UserId="3980" Text="what version of the template / pallet-contracts are you using?&#xD;&#xA;```&#xD;&#xA;--&gt; /home/kianoush/projects/music-chain/frame/dex/src/lib.rs:323:36&#xD;&#xA;323 |                 pallet_contracts::Pallet::&lt;T&gt;::Deterministic,&#xD;&#xA;```&#xD;&#xA;It looks like this does not exist, you should probably use something like that instead&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pallet_contracts::Determinism::Deterministic&#xD;&#xA;```&#xD;&#xA;The parameters seems incorrect as well&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;        who,&#xD;&#xA;        dest.clone(),&#xD;&#xA;        value,&#xD;&#xA;        gas_limit,&#xD;&#xA;        data,&#xD;&#xA;        pallet_contracts::Pallet::&lt;T&gt;::deterministic(),&#xD;&#xA;        None,&#xD;&#xA;        false,&#xD;&#xA;    );&#xD;&#xA;```&#xD;&#xA;see https://docs.rs/pallet_contracts/4.0.0-dev/pallet_contracts/pallet/struct.Pallet.html#method.bare_call&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, If you are just trying to deploy contracts, you can probably use this [substrate-contracts-node][1] which is already configured with the pallet-contracts&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="31146" PostHistoryTypeId="5" PostId="7918" RevisionGUID="90be870a-5945-4d03-bed6-081f3183b12c" CreationDate="2023-04-03T08:32:32.157" UserId="3980" Comment="added 222 characters in body" Text="what version of the template / pallet-contracts are you using?&#xD;&#xA;```&#xD;&#xA;--&gt; /home/kianoush/projects/music-chain/frame/dex/src/lib.rs:323:36&#xD;&#xA;323 |                 pallet_contracts::Pallet::&lt;T&gt;::Deterministic,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It looks like this does not exist, you should probably use something like that instead&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pallet_contracts::Determinism::Deterministic&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The parameters seems incorrect as well, see [Rust Doc here][1]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;        who,&#xD;&#xA;        dest.clone(),&#xD;&#xA;        value,&#xD;&#xA;        gas_limit,&#xD;&#xA;        data,&#xD;&#xA;        pallet_contracts::Pallet::&lt;T&gt;::deterministic(),&#xD;&#xA;        None,&#xD;&#xA;        false,&#xD;&#xA;    );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, If you are just trying to deploy contracts, you can probably use this [substrate-contracts-node][2] which is already configured with the pallet-contracts (see configuration [here][3])&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/pallet_contracts/4.0.0-dev/pallet_contracts/pallet/struct.Pallet.html#method.bare_call&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [3]: https://github.com/paritytech/substrate-contracts-node/blob/fe44851126245fec8bf17a39f618d7ce54d0bc76/runtime/src/lib.rs#L333-L368" ContentLicense="CC BY-SA 4.0" />
  <row Id="31147" PostHistoryTypeId="5" PostId="1063" RevisionGUID="c348a660-81ff-4de0-a9d0-a3c10e930e35" CreationDate="2023-04-03T09:07:43.993" UserId="484" Comment="link rot fix to guide" Text="The flow of upgrading the runtime in a parachain can definitely be different from the the flow one can be used to when running a solo chain.&#xD;&#xA;&#xD;&#xA;For this scenario what is recommended is following the authorize --&gt; enact path.&#xD;&#xA;&#xD;&#xA;Note that the relay chain needs to be informed of the runtime upgrade before it happens, and just after that you could enact the upgrade in your para.&#xD;&#xA;&#xD;&#xA;Cumulus provides these functionality in through pallet `cumulus-pallet-parachain-system` :&#xD;&#xA; - [`authorize_uprgrade`](https://github.com/paritytech/cumulus/blob/2fe7a2edba05155c6a5f0f3527e1001aad7aee2e/pallets/parachain-system/src/lib.rs#L387)&#xD;&#xA; - [`enact_authorized_upgrade`](https://github.com/paritytech/cumulus/blob/2fe7a2edba05155c6a5f0f3527e1001aad7aee2e/pallets/parachain-system/src/lib.rs#L397)&#xD;&#xA;&#xD;&#xA;Please, find more details on [this how to guide](https://docs.substrate.io/reference/how-to-guides/parachains/upgrade-a-parachain/)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31148" PostHistoryTypeId="24" PostId="1063" RevisionGUID="c348a660-81ff-4de0-a9d0-a3c10e930e35" CreationDate="2023-04-03T09:07:43.993" Comment="Proposed by 484 approved by 251, 3317 edit id of 399" ContentLicense="CC BY-SA 4.0" />
  <row Id="31149" PostHistoryTypeId="5" PostId="7903" RevisionGUID="81f22830-0192-4ecd-889a-b125ea32f68f" CreationDate="2023-04-03T09:09:46.803" UserId="49" Comment="Improve punctuation, spelling and formatting. Add additional tags." Text="I accidentally used my ETH address to receive token from Polkadot.&#xD;&#xA;Is there any way I can access my tokens with my private key? Thanks.&#xD;&#xA;&#xD;&#xA;For example: https://polkaholic.io/account/49zaADFp2kjgEJhmUWp1aq4zVc6fGBnSNFEUa4b2WAvxF73X?group=overview&amp;chainfilters=all&#xD;&#xA;&#xD;&#xA;Eth address: `0x9ebb1958fb8aecac3cb5c2f10aa473955f9c7ef1`&#xD;&#xA;&#xD;&#xA;Public key in Polkaholic: `0x9ebb1958fb8aecac3cb5c2f10aa473955f9c7ef1000000000000000000000000`" ContentLicense="CC BY-SA 4.0" />
  <row Id="31150" PostHistoryTypeId="6" PostId="7903" RevisionGUID="81f22830-0192-4ecd-889a-b125ea32f68f" CreationDate="2023-04-03T09:09:46.803" UserId="49" Comment="Improve punctuation, spelling and formatting. Add additional tags." Text="|polkadot|balances|cryptography|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31151" PostHistoryTypeId="24" PostId="7903" RevisionGUID="81f22830-0192-4ecd-889a-b125ea32f68f" CreationDate="2023-04-03T09:09:46.803" Comment="Proposed by 49 approved by 251, 3317 edit id of 401" ContentLicense="CC BY-SA 4.0" />
  <row Id="31152" PostHistoryTypeId="5" PostId="7846" RevisionGUID="3583ae7d-eba5-43e2-a93a-8906a87a6108" CreationDate="2023-04-03T09:10:04.307" UserId="3990" Comment="Formatted to use code blocks with rust formatting " Text="Add this import:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use sp_core::{Pair};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then the method `from_phrase()` returns you a tuple: `(Pair, Seed)` get only the Pair in your method `new`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let pair = sp_core::sr25519::Pair::from_phrase(mnemonic_phrase.as_str(), None).unwrap();&#xD;&#xA;&#xD;&#xA;let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair.0);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or you can use the method `from_string()`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let pair = sp_core::sr25519::Pair::from_string(mnemonic_phrase.as_str(), None).unwrap();&#xD;&#xA;&#xD;&#xA;let signer = PairSigner::&lt;PolkadotConfig, sp_core::sr25519::Pair&gt;::new(pair);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31153" PostHistoryTypeId="24" PostId="7846" RevisionGUID="3583ae7d-eba5-43e2-a93a-8906a87a6108" CreationDate="2023-04-03T09:10:04.307" Comment="Proposed by 3990 approved by 251, 3317 edit id of 400" ContentLicense="CC BY-SA 4.0" />
  <row Id="31154" PostHistoryTypeId="2" PostId="7919" RevisionGUID="83d8ab74-5bae-4459-9ae6-4b7538433c8e" CreationDate="2023-04-03T09:21:03.880" UserId="474" Text="This is a simple case of the `subxt` and `sp_*` dependencies being out of sync; I think you used Subxt `master` branch to take the dependencies you used, but you're pointing at an older version of Subxt in your Cargo.toml. In other words, your dependencies are:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sp-keyring = &quot;20.0.0&quot;&#xD;&#xA;sp-core = { version = &quot;18.0.0&quot;, default-features = false }&#xD;&#xA;sp-runtime = &quot;20.0.0&quot;&#xD;&#xA;subxt = &quot;0.26.0&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But If you look at the dependencies for Subxt 0.26.0 (https://crates.io/crates/subxt/0.26.0/dependencies) you see it depends on:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sp-keyring = &quot;12.0.0&quot;&#xD;&#xA;sp-core = &quot;11.0.0&quot;&#xD;&#xA;sp-runtime = &quot;12.0.0&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, either:&#xD;&#xA;- downgrade the versions of the `sp_*` libraries that you're using to match what Subxt 0.26 is using.&#xD;&#xA;- upgrade your version of Subxt to be in line with the `sp_*` libraries you're using (I think you'll still need to downgrade the `sp_*` ones a bit because we need to do a new release with latest).&#xD;&#xA;- use `subxt::ext::sp_core::` and `subxt::ext::sp_runtime::` to get at the same versions that Subxt uses (may only be available in a more recent version of Subxt than the one you're using; can't recall!)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31156" PostHistoryTypeId="5" PostId="7828" RevisionGUID="1fb25a36-8e6e-43f1-9544-4df67e853cd7" CreationDate="2023-04-03T09:23:58.553" UserId="474" Comment="deleted 98 characters in body" Text="&gt; 1. Build a local blockchain&#xD;&#xA;&gt; 2. run cargo install subxt-cli&#xD;&#xA;&gt; 3. run subxt metadata -f bytes &gt; metadata.scale&#xD;&#xA;&#xD;&#xA;How are you building/starting a local blockchain node? The error `error: Failed to decode metadata: Could not decode RuntimeMetadataPrefixed.1` implies that there is something wrong with your `metadata.scale` file. &#xD;&#xA;&#xD;&#xA;Perhaps you ran into an error running `subxt metadata -f bytes &gt; metadata.scale` and the file is empty or doesn't have the expected contents in (how big is it? Can you open it with a text editor?). Perhaps the node you started has some sort of issue. I'd need more information to be able to help with this." ContentLicense="CC BY-SA 4.0" />
  <row Id="31157" PostHistoryTypeId="5" PostId="7916" RevisionGUID="3b7d9bab-83e2-4668-810e-2c47ab494e4a" CreationDate="2023-04-03T09:35:26.950" UserId="3319" Comment="deleted 1 character in body" Text="In substrate-node-template, are there any available ways to execute a task or provide a callback to be executed just before the block gets gossiped to other validators (right after i produce the block)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31158" PostHistoryTypeId="2" PostId="7920" RevisionGUID="6b306bc6-66c8-4053-9e7a-381e24e06362" CreationDate="2023-04-03T10:27:52.370" UserId="2762" Text="In the `pre_upgrade()` and in the `on_runtime_upgrade()` functions there is an issue with the:&#xD;&#xA;```rs&#xD;&#xA;    let prev_count = NameOf::&lt;T&gt;::iter().count();&#xD;&#xA;```&#xD;&#xA;Because you are reading the data from the new storage with the new structure:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	pub(super) type NameOf&lt;T: Config&gt; =&#xD;&#xA;		StorageMap&lt;_, Twox64Concat, T::AccountId, (Nickname&lt;T&gt;, BalanceOf&lt;T&gt;)&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What you have to do is use the previous storage, so in your migration.rs code add:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    mod v1 {&#xD;&#xA;	  use super::*;&#xD;&#xA;&#xD;&#xA;	  #[derive(Decode, Encode)]&#xD;&#xA;	  pub struct OldNickname&lt;T: Config&gt; {&#xD;&#xA;		pub first: BoundedVec&lt;u8, T::MaxLength&gt;,&#xD;&#xA;		pub last: Option&lt;BoundedVec&lt;u8, T::MaxLength&gt;&gt;,&#xD;&#xA;	  }&#xD;&#xA;&#xD;&#xA;	  #[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	  #[storage_alias]&#xD;&#xA;	  pub(super) type NameOf&lt;T: Config&gt; = StorageMap&lt;Pallet&lt;T&gt;, Twox64Concat, &lt;T as frame_system::Config&gt;::AccountId, (OldNickname&lt;T&gt;, BalanceOf&lt;T&gt;)&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then is your `pre_upgrade()` and in the `on_runtime_upgrade()` functions use:&#xD;&#xA;```rs&#xD;&#xA;    let prev_count = v1::NameOf::&lt;T&gt;::iter().count();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can check the [migration file][1] in the Democracy FRAME pallet as an example.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/democracy/src/migrations.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="31160" PostHistoryTypeId="5" PostId="7919" RevisionGUID="ab6df4ce-6607-420f-983c-a2dd9267ad93" CreationDate="2023-04-03T11:03:41.563" UserId="474" Comment="added 52 characters in body" Text="This is a simple case of the `subxt` and `sp_*` dependencies being out of sync; I think you used Subxt `master` branch to take the dependencies you used, but you're pointing at an older version of Subxt in your Cargo.toml. In other words, your dependencies are:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sp-keyring = &quot;20.0.0&quot;&#xD;&#xA;sp-core = { version = &quot;18.0.0&quot;, default-features = false }&#xD;&#xA;sp-runtime = &quot;20.0.0&quot;&#xD;&#xA;subxt = &quot;0.26.0&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But If you look at the dependencies for Subxt 0.26.0 (https://crates.io/crates/subxt/0.26.0/dependencies) you see it depends on:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sp-keyring = &quot;12.0.0&quot;&#xD;&#xA;sp-core = &quot;11.0.0&quot;&#xD;&#xA;sp-runtime = &quot;12.0.0&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, some options are:&#xD;&#xA;- downgrade the versions of the `sp_*` libraries that you're using to match what Subxt 0.26 is using.&#xD;&#xA;- upgrade your version of Subxt to be in line with the `sp_*` libraries you're using (I think you'll still need to downgrade the `sp_*` ones a bit because we need to do a new release with latest).&#xD;&#xA;- use `subxt::ext::sp_core::` and `subxt::ext::sp_runtime::` instead of specifying those deps yourself to get at the same versions that Subxt uses (may only be available in a more recent version of Subxt than the one you're using; can't recall!)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31161" PostHistoryTypeId="2" PostId="7921" RevisionGUID="c50e4801-33a9-4cdc-8f89-f27778386d36" CreationDate="2023-04-03T11:45:11.400" UserId="251" Text="Today, I attempted to submit a preimage, start an external proposal and initiate referenda. &#xD;&#xA;&#xD;&#xA;Check the preimage here: https://crab.subscan.io/referenda/4?tab=proposal_preimage.&#xD;&#xA;&#xD;&#xA;The outcome of my efforts can be found at https://crab.subscan.io/block/170147?tab=event&amp;event=170147-0. However, I encountered an error which stated that the inherent responsible for providing validation data did not run during this block (ValidationDataNotAvailable).&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// The inherent which supplies the validation data did not run this block&#xD;&#xA;ValidationDataNotAvailable,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am curious if the priority of scheduled extrinsics is higher than that of inherent extrinsics. It appears that the scheduled referenda were applied before `set_validation_data`.&#xD;&#xA;&#xD;&#xA;What would be the best approach in such a scenario? If the preimage is a `ParachainSystem::authorize_upgrade` instead of a batch call, sending `ParachainSystem::enact_authorized_upgrade` separately will result in high transaction fees." ContentLicense="CC BY-SA 4.0" />
  <row Id="31163" PostHistoryTypeId="1" PostId="7921" RevisionGUID="c50e4801-33a9-4cdc-8f89-f27778386d36" CreationDate="2023-04-03T11:45:11.400" UserId="251" Text="What's the best way to perfrom a parachain runtime upgrade through democracy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31164" PostHistoryTypeId="3" PostId="7921" RevisionGUID="c50e4801-33a9-4cdc-8f89-f27778386d36" CreationDate="2023-04-03T11:45:11.400" UserId="251" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31165" PostHistoryTypeId="50" PostId="5678" RevisionGUID="e80c1b76-afd8-4d61-81e9-b4235b977ae7" CreationDate="2023-04-03T12:00:35.103" UserId="-1" />
  <row Id="31167" PostHistoryTypeId="34" PostId="7771" RevisionGUID="6c5a9bb1-5dbe-4654-bf15-1f677cb6538d" CreationDate="2023-04-03T15:00:40.167" UserId="-1" Comment="20" />
  <row Id="31168" PostHistoryTypeId="2" PostId="7922" RevisionGUID="e9f2ec7a-1bfc-49a4-9057-2a7410d2b255" CreationDate="2023-04-03T15:08:36.577" UserId="3035" Text="Note that `pallet_collective::EnsureMember` implementation expects `pallet_collective::RawOrigin::Member(who = Alice)` origin, not a `Signed(Alice)`.&#xD;&#xA;This probably what you missing. You can get such an origin when you execute for example via `pallet_collective::execute` call.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31170" PostHistoryTypeId="2" PostId="7923" RevisionGUID="0895d88d-8b55-4ba8-a5f9-2bb9fd874dff" CreationDate="2023-04-03T16:57:11.817" UserId="4045" Text="I've been trying to follow the documentation for generating types for `@polkadot/api` https://polkadot.js.org/docs/api/examples/promise/typegen/. However the generated files seem to be missing many types, revealed on attempt to `tsc`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(87,22): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(115,20): error TS2304: Cannot find name 'FrameSystemLimitsBlockLength'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(119,21): error TS2304: Cannot find name 'FrameSystemLimitsBlockWeights'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(123,17): error TS2304: Cannot find name 'SpWeightsRuntimeDbWeight'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(135,16): error TS2304: Cannot find name 'SpVersionRuntimeVersion'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(44,121): error TS2304: Cannot find name 'FrameSupportTokensMiscBalanceStatus'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(44,230): error TS2304: Cannot find name 'FrameSupportTokensMiscBalanceStatus'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(70,52): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(74,56): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(84,74): error TS2304: Cannot find name 'SpFinalityGrandpaAppPublic'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(84,139): error TS2304: Cannot find name 'SpFinalityGrandpaAppPublic'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(197,64): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(216,113): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(216,210): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(256,64): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(256,117): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(260,69): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(260,122): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,64): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,102): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,154): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,192): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(278,64): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(278,115): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(312,83): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(312,152): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(316,89): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(316,158): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(24,65): error TS2304: Cannot find name 'SpConsensusAuraSr25519AppSr25519Public'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(63,95): error TS2304: Cannot find name 'PalletBalancesAccountData'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(72,97): error TS2304: Cannot find name 'PalletBalancesBalanceLock'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(76,100): error TS2304: Cannot find name 'PalletBalancesReserveData'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(99,70): error TS2304: Cannot find name 'PalletGrandpaStoredPendingChange'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(120,55): error TS2304: Cannot find name 'PalletGrandpaStoredState'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(174,97): error TS2304: Cannot find name 'PalletPreimageRequestStatus'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(184,131): error TS2304: Cannot find name 'PalletProcessValidationProcess'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(207,100): error TS2304: Cannot find name 'PalletSchedulerScheduled'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(226,101): error TS2304: Cannot find name 'PalletSimpleNftToken'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(246,95): error TS2304: Cannot find name 'FrameSystemAccountInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(258,61): error TS2304: Cannot find name 'FrameSupportDispatchPerDispatchClassWeight'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(262,56): error TS2304: Cannot find name 'SpRuntimeDigest'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(276,60): error TS2304: Cannot find name 'FrameSystemEventRecord'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(293,71): error TS2304: Cannot find name 'FrameSystemPhase'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(305,75): error TS2304: Cannot find name 'FrameSystemLastRuntimeUpgradeInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(352,94): error TS2304: Cannot find name 'PalletCollectiveVotes'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(144,106): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(144,231): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,68): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,179): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,233): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,269): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,76): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,187): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,241): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,277): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(367,90): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(367,161): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(367,337): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,50): error TS2304: Cannot find name 'DscpPalletTraitsProcessFullyQualifiedId'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,211): error TS2304: Cannot find name 'PalletSimpleNftOutput'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,237): error TS2304: Cannot find name 'PalletSimpleNftOutput'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,354): error TS2304: Cannot find name 'DscpPalletTraitsProcessFullyQualifiedId'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,410): error TS2304: Cannot find name 'PalletSimpleNftOutput'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(451,102): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(451,227): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(534,145): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(534,336): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/index.ts(4,15): error TS2306: File '/home/runner/work/dscp-matchmaker-api/dscp-matchmaker-api/src/interfaces/types.ts' is not a module.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It also generates an empty `types.ts` - I've not added any custom definitions. &#xD;&#xA;&#xD;&#xA;`metadata.json` was generated with `curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:&quot;1&quot;, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getMetadata&quot;, &quot;params&quot;:[]}' http://localhost:9944` hitting our local node.&#xD;&#xA;&#xD;&#xA;Is there something I'm missing or getting wrong in my setup?&#xD;&#xA;&#xD;&#xA;**[PR showing the commands used and files generated][1]** . Thank you&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/digicatapult/dscp-matchmaker-api/pull/43/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="31172" PostHistoryTypeId="1" PostId="7923" RevisionGUID="0895d88d-8b55-4ba8-a5f9-2bb9fd874dff" CreationDate="2023-04-03T16:57:11.817" UserId="4045" Text="TS type generation - @polkadot/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="31173" PostHistoryTypeId="3" PostId="7923" RevisionGUID="0895d88d-8b55-4ba8-a5f9-2bb9fd874dff" CreationDate="2023-04-03T16:57:11.817" UserId="4045" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31174" PostHistoryTypeId="5" PostId="7923" RevisionGUID="63197f6c-6b1b-4a51-93cb-037170e3125b" CreationDate="2023-04-03T16:57:40.867" UserId="4045" Comment="deleted 10 characters in body" Text="I've been trying to follow the documentation for generating types for `@polkadot/api` https://polkadot.js.org/docs/api/examples/promise/typegen/. However the generated files seem to be missing many types, revealed by `tsc`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(87,22): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(115,20): error TS2304: Cannot find name 'FrameSystemLimitsBlockLength'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(119,21): error TS2304: Cannot find name 'FrameSystemLimitsBlockWeights'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(123,17): error TS2304: Cannot find name 'SpWeightsRuntimeDbWeight'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(135,16): error TS2304: Cannot find name 'SpVersionRuntimeVersion'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(44,121): error TS2304: Cannot find name 'FrameSupportTokensMiscBalanceStatus'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(44,230): error TS2304: Cannot find name 'FrameSupportTokensMiscBalanceStatus'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(70,52): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(74,56): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(84,74): error TS2304: Cannot find name 'SpFinalityGrandpaAppPublic'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(84,139): error TS2304: Cannot find name 'SpFinalityGrandpaAppPublic'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(197,64): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(216,113): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(216,210): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(256,64): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(256,117): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(260,69): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(260,122): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,64): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,102): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,154): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,192): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(278,64): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(278,115): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(312,83): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(312,152): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(316,89): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(316,158): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(24,65): error TS2304: Cannot find name 'SpConsensusAuraSr25519AppSr25519Public'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(63,95): error TS2304: Cannot find name 'PalletBalancesAccountData'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(72,97): error TS2304: Cannot find name 'PalletBalancesBalanceLock'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(76,100): error TS2304: Cannot find name 'PalletBalancesReserveData'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(99,70): error TS2304: Cannot find name 'PalletGrandpaStoredPendingChange'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(120,55): error TS2304: Cannot find name 'PalletGrandpaStoredState'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(174,97): error TS2304: Cannot find name 'PalletPreimageRequestStatus'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(184,131): error TS2304: Cannot find name 'PalletProcessValidationProcess'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(207,100): error TS2304: Cannot find name 'PalletSchedulerScheduled'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(226,101): error TS2304: Cannot find name 'PalletSimpleNftToken'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(246,95): error TS2304: Cannot find name 'FrameSystemAccountInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(258,61): error TS2304: Cannot find name 'FrameSupportDispatchPerDispatchClassWeight'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(262,56): error TS2304: Cannot find name 'SpRuntimeDigest'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(276,60): error TS2304: Cannot find name 'FrameSystemEventRecord'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(293,71): error TS2304: Cannot find name 'FrameSystemPhase'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(305,75): error TS2304: Cannot find name 'FrameSystemLastRuntimeUpgradeInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(352,94): error TS2304: Cannot find name 'PalletCollectiveVotes'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(144,106): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(144,231): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,68): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,179): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,233): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,269): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,76): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,187): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,241): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,277): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(367,90): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(367,161): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(367,337): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,50): error TS2304: Cannot find name 'DscpPalletTraitsProcessFullyQualifiedId'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,211): error TS2304: Cannot find name 'PalletSimpleNftOutput'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,237): error TS2304: Cannot find name 'PalletSimpleNftOutput'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,354): error TS2304: Cannot find name 'DscpPalletTraitsProcessFullyQualifiedId'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,410): error TS2304: Cannot find name 'PalletSimpleNftOutput'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(451,102): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(451,227): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(534,145): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(534,336): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/index.ts(4,15): error TS2306: File '/home/runner/work/dscp-matchmaker-api/dscp-matchmaker-api/src/interfaces/types.ts' is not a module.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It also generates an empty `types.ts` - I've not added any custom definitions. &#xD;&#xA;&#xD;&#xA;`metadata.json` was generated with `curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:&quot;1&quot;, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getMetadata&quot;, &quot;params&quot;:[]}' http://localhost:9944` hitting our local node.&#xD;&#xA;&#xD;&#xA;Is there something I'm missing or getting wrong in my setup?&#xD;&#xA;&#xD;&#xA;**[PR showing the commands used and files generated][1]** . Thank you&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/digicatapult/dscp-matchmaker-api/pull/43/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="31175" PostHistoryTypeId="2" PostId="7924" RevisionGUID="6565f722-56c2-4f48-a074-69cb96ee5ca3" CreationDate="2023-04-03T17:19:53.273" UserId="3604" Text="I actually needed to load protoc then it seemed fine... https://grpc.io/docs/protoc-installation/" ContentLicense="CC BY-SA 4.0" />
  <row Id="31181" PostHistoryTypeId="2" PostId="7926" RevisionGUID="68b3e5ee-b0a5-4ea9-8c4c-227b15f70ef8" CreationDate="2023-04-04T07:02:17.207" UserId="3779" Text="I am trying to prepare the pallets for Weights v2 at Encointer and a couple of questions arose.&#xD;&#xA;&#xD;&#xA;Where can I find documentation on what exactly has to be done in terms of bounded types?&#xD;&#xA;&#xD;&#xA;What is the unit of `proof_size` in Weight v2?&#xD;&#xA;&#xD;&#xA;From what I understand all storage needs to be of bounded types in order to make sure that the `proof_size` is bounded as well. Is this correct?&#xD;&#xA;&#xD;&#xA;I saw [here][1] an example of migrating `Vec` to `BoundedVec` and `Call` to `Bounded&lt;Call&gt;`. Is it sufficient to only have bounded types as keys/values in storage or do we also need to limit the size of Storage(Double)Maps? If yes, how to determine those limits? Is there a maximum `proof_size` that we can use as a benchmark? Can you provide pointers to the Substrate repo of such an implementation?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/9b43d8f891b1e53be2aa55687632ac6b17800cf8/frame/democracy/src/migrations.rs#L56" ContentLicense="CC BY-SA 4.0" />
  <row Id="31183" PostHistoryTypeId="1" PostId="7926" RevisionGUID="68b3e5ee-b0a5-4ea9-8c4c-227b15f70ef8" CreationDate="2023-04-04T07:02:17.207" UserId="3779" Text="Prepare pallets for Weights v2" ContentLicense="CC BY-SA 4.0" />
  <row Id="31184" PostHistoryTypeId="3" PostId="7926" RevisionGUID="68b3e5ee-b0a5-4ea9-8c4c-227b15f70ef8" CreationDate="2023-04-04T07:02:17.207" UserId="3779" Text="|pallet|storage|weight|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31189" PostHistoryTypeId="2" PostId="7928" RevisionGUID="70a5a799-e780-44b3-b8cf-eff86a40e314" CreationDate="2023-04-04T09:00:37.177" UserId="3543" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;# My problem&#xD;&#xA;&#xD;&#xA;## Running `cargo build` does not give any error in terminal but `rust-analyzer` of Visual studio code gives me 85 errors and 8 warnings.&#xD;&#xA;&#xD;&#xA;I followed the installation guide from the substrate docs. I can compile the project from the terminal and run it, and when I run it, it produces blocks as expected.&#xD;&#xA;&#xD;&#xA;1. I can compile the `main branch` of `substrate-developer-node-template` perfectly and **opening that from Visual Studio Code does not give me any error**.&#xD;&#xA;&#xD;&#xA;2. Errors in Visual Studio Code only shows up when I want to work with [cord](https://github.com/dhiway/cord.git).&#xD;&#xA;&#xD;&#xA;## My Device&#xD;&#xA;&#xD;&#xA;I'm using M1 MacBook Pro and the project I'm mentioning is [Cord](https://github.com/dhiway/cord.git). I'm running the `dev-0.8.0` branch.&#xD;&#xA;&#xD;&#xA;## My Configurations&#xD;&#xA;&#xD;&#xA;`rust-toolchain.toml` file in the project directory&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;nightly-2022-11-15&quot;&#xD;&#xA;components = [ &quot;rustfmt&quot;, &quot;clippy&quot; ]&#xD;&#xA;targets = [ &quot;wasm32-unknown-unknown&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My Visual Studio Code `settings.json`&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;telemetry.telemetryLevel&quot;: &quot;off&quot;,&#xD;&#xA;  &quot;editor.formatOnSave&quot;: true,&#xD;&#xA;  &quot;editor.formatOnType&quot;: true,&#xD;&#xA;  &quot;editor.formatOnPaste&quot;: true,&#xD;&#xA;  &quot;workbench.sideBar.location&quot;: &quot;right&quot;,&#xD;&#xA;  &quot;workbench.activityBar.visible&quot;: true,&#xD;&#xA;  &quot;editor.fontSize&quot;: 26,&#xD;&#xA;  &quot;debug.console.fontSize&quot;: 20,&#xD;&#xA;  &quot;terminal.integrated.fontSize&quot;: 20,&#xD;&#xA;  &quot;editor.suggestFontSize&quot;: 20,&#xD;&#xA;  &quot;editor.wordWrap&quot;: &quot;on&quot;,&#xD;&#xA;  &quot;workbench.iconTheme&quot;: &quot;material-icon-theme&quot;,&#xD;&#xA;  &quot;workbench.colorTheme&quot;: &quot;Everforest Dark&quot;,&#xD;&#xA;  &quot;editor.fontFamily&quot;: &quot;'Hack Nerd Font', monospace&quot;,&#xD;&#xA;  &quot;editor.tokenColorCustomizations&quot;: {&#xD;&#xA;    &quot;comments&quot;: &quot;#10d77e&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;javascript.suggest.includeAutomaticOptionalChainCompletions&quot;: false,&#xD;&#xA;  &quot;extensions.autoUpdate&quot;: &quot;onlyEnabledExtensions&quot;,&#xD;&#xA;  &quot;editor.quickSuggestions&quot;: {&#xD;&#xA;    &quot;other&quot;: true,&#xD;&#xA;    &quot;comments&quot;: false,&#xD;&#xA;    &quot;strings&quot;: false&#xD;&#xA;  },&#xD;&#xA;  &quot;editor.autoClosingBrackets&quot;: &quot;always&quot;,&#xD;&#xA;  &quot;javascript.updateImportsOnFileMove.enabled&quot;: &quot;always&quot;,&#xD;&#xA;  &quot;emmet.includeLanguages&quot;: {&#xD;&#xA;    &quot;javascript&quot;: &quot;javascriptreact&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;emmet.triggerExpansionOnTab&quot;: true,&#xD;&#xA;  &quot;emmet.showExpandedAbbreviation&quot;: &quot;inMarkupAndStylesheetFilesOnly&quot;,&#xD;&#xA;  &quot;editor.linkedEditing&quot;: true,&#xD;&#xA;  &quot;editor.fontLigatures&quot;: true,&#xD;&#xA;  &quot;emmet.showSuggestionsAsSnippets&quot;: true,&#xD;&#xA;  &quot;editor.snippetSuggestions&quot;: &quot;top&quot;,&#xD;&#xA;  &quot;emmet.showAbbreviationSuggestions&quot;: true,&#xD;&#xA;  &quot;explorer.confirmDelete&quot;: false,&#xD;&#xA;  &quot;workbench.startupEditor&quot;: &quot;none&quot;,&#xD;&#xA;  &quot;editor.multiCursorModifier&quot;: &quot;ctrlCmd&quot;,&#xD;&#xA;  &quot;editor.codeLens&quot;: true,&#xD;&#xA;  &quot;extensions.ignoreRecommendations&quot;: true,&#xD;&#xA;  &quot;editor.tabCompletion&quot;: &quot;onlySnippets&quot;,&#xD;&#xA;  &quot;editor.detectIndentation&quot;: true,&#xD;&#xA;  &quot;editor.guides.bracketPairs&quot;: &quot;active&quot;,&#xD;&#xA;  &quot;projectManager.sortList&quot;: &quot;Name&quot;,&#xD;&#xA;  &quot;window.commandCenter&quot;: true,&#xD;&#xA;  &quot;javascript.preferences.quoteStyle&quot;: &quot;double&quot;,&#xD;&#xA;  &quot;typescript.preferences.quoteStyle&quot;: &quot;double&quot;,&#xD;&#xA;  &quot;[markdown]&quot;: {&#xD;&#xA;    &quot;editor.unicodeHighlight.ambiguousCharacters&quot;: false,&#xD;&#xA;    &quot;editor.unicodeHighlight.invisibleCharacters&quot;: false,&#xD;&#xA;    &quot;editor.wordWrap&quot;: &quot;on&quot;,&#xD;&#xA;    &quot;editor.quickSuggestions&quot;: {&#xD;&#xA;      &quot;comments&quot;: &quot;off&quot;,&#xD;&#xA;      &quot;strings&quot;: &quot;off&quot;,&#xD;&#xA;      &quot;other&quot;: &quot;off&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;editor.defaultFormatter&quot;: &quot;yzhang.markdown-all-in-one&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;sql-formatter.dialect&quot;: &quot;sql&quot;,&#xD;&#xA;  &quot;sql-formatter.uppercase&quot;: true,&#xD;&#xA;  &quot;sql-formatter.linesBetweenQueries&quot;: 2,&#xD;&#xA;  &quot;explorer.confirmDragAndDrop&quot;: false,&#xD;&#xA;  // Begin Rust configs&#xD;&#xA;  &quot;[rust]&quot;: {&#xD;&#xA;    &quot;editor.defaultFormatter&quot;: &quot;rust-lang.rust-analyzer&quot;,&#xD;&#xA;    &quot;editor.formatOnSave&quot;: true&#xD;&#xA;  },&#xD;&#xA;  // macOS settings&#xD;&#xA;  &quot;rust-analyzer.cargo.target&quot;: &quot;aarch64-apple-darwin&quot;,&#xD;&#xA;  &quot;rust-analyzer.diagnostics.disabled&quot;: [&#xD;&#xA;    &quot;unresolved-proc-macro&quot;,&#xD;&#xA;    &quot;incorrect-try-target&quot;,&#xD;&#xA;    &quot;unresolved-method&quot;&#xD;&#xA;  ],&#xD;&#xA;  &quot;rust-analyzer.server.extraEnv&quot;: {&#xD;&#xA;    &quot;CHALK_OVERFLOW_DEPTH&quot;: &quot;2000&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running `rustup show` from the `home` directory (not in the project directory), gives me&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;rustup show&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/roynrishingha/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;nightly-2022-11-15-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin (default)&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.70.0-nightly (cf7ada217 2023-04-03)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running `rustup show` from the project directory&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;rustup show&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/roynrishingha/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;nightly-2022-11-15-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin (default)&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-2022-11-15-aarch64-apple-darwin (overridden by '/Users/roynrishingha/work/cord/rust-toolchain.toml')&#xD;&#xA;rustc 1.67.0-nightly (96ddd32c4 2022-11-14)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running from the project directory&#xD;&#xA;```sh&#xD;&#xA;cargo -V &amp;&amp; rustc -V&#xD;&#xA;cargo 1.67.0-nightly (a3dfea71c 2022-11-11)&#xD;&#xA;rustc 1.67.0-nightly (96ddd32c4 2022-11-14)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running from the home directory&#xD;&#xA;```sh&#xD;&#xA;cargo -V &amp;&amp; rustc -V&#xD;&#xA;cargo 1.70.0-nightly (0e474cfd7 2023-03-31)&#xD;&#xA;rustc 1.70.0-nightly (cf7ada217 2023-04-03)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## What I have tried&#xD;&#xA;&#xD;&#xA;1. I deleted Rust using `rustup self uninstall` and did a fresh install with only nightly toolchain. But it did not help.&#xD;&#xA;2. I tried to freshly clone the project repo into a different directory and build from there. But it did not help.&#xD;&#xA;3. Uninstalled Visual Studio Code and Re-installed. For some reason new installation automatically loaded the old configs.&#xD;&#xA;4. Uninstalled `rust-analyzer` from Visual Studio Code extensions. But same issue.&#xD;&#xA;&#xD;&#xA;## NOTE&#xD;&#xA;&#xD;&#xA;Other developers are able to compile and run on Visual Studio Code (this project) perfectly. Only I'm stuck! **It doesn't work on my machine**.&#xD;&#xA;&#xD;&#xA;## REQUEST&#xD;&#xA;&#xD;&#xA;**Kindly help me out to get unstack**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xdVm4.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="31191" PostHistoryTypeId="1" PostId="7928" RevisionGUID="70a5a799-e780-44b3-b8cf-eff86a40e314" CreationDate="2023-04-04T09:00:37.177" UserId="3543" Text="Getting rust-analyzer error while running a substrate based chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="31192" PostHistoryTypeId="3" PostId="7928" RevisionGUID="70a5a799-e780-44b3-b8cf-eff86a40e314" CreationDate="2023-04-04T09:00:37.177" UserId="3543" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31193" PostHistoryTypeId="2" PostId="7929" RevisionGUID="0a3325b0-b948-41af-a43f-4964da14ba52" CreationDate="2023-04-04T10:21:08.210" UserId="380" Text="In polkadotJS there are **two** ways of getting gas estimates (specifically `WeightV2`) before you send a contract transaction.&#xD;&#xA;&#xD;&#xA;The **first** uses `query` and returns a `gasRequired` value in the result.&#xD;&#xA;&#xD;&#xA;        const extrinsic = contract.query[message.method](address, initialOptions, ...encodedArgs)&#xD;&#xA;        const response = await extrinsic&#xD;&#xA;        if (response.result.isOk) {&#xD;&#xA;            // create a new set of options using gasRequired and storageDeposit&#xD;&#xA;            let options = getOptions(this.api, message.isMutating, value, response.gasRequired, response.storageDeposit)&#xD;&#xA;&#xD;&#xA;The **second** uses `tx` and takes a value from `paymentInfo`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            // options here uses the gasRequired from the initial query as the gasLimit&#xD;&#xA;            const extrinsicTx = contract.tx[message.method](options, ...encodedArgs)&#xD;&#xA;            const paymentInfo = await extrinsicTx.paymentInfo(address)&#xD;&#xA;&#xD;&#xA;`paymentInfo` always gives a higher `refTime` value than `gasRequired`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;gasRequired 8,827,448,665&#xD;&#xA;paymentInfo 9,536,660,665&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Using the value from `gasRequired` causes `OutOfGas` errors when batching transactions. Using the value from `paymentInfo` causes the batched transactions to succeed.&#xD;&#xA;&#xD;&#xA;Why are there two different ways of getting gas estimates and why do they differ in value?&#xD;&#xA;&#xD;&#xA;Note: [This answer][1] suggests that the contract state being modified between transactions could be the reason for the difference in gas and to increase gas by 1%. However, the difference between `gasRequired` refTime and `paymentInfo` refTime is ~8%.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/7100/how-to-estimate-gas-for-ink-contracts-transactions-for-weights-v2" ContentLicense="CC BY-SA 4.0" />
  <row Id="31195" PostHistoryTypeId="1" PostId="7929" RevisionGUID="0a3325b0-b948-41af-a43f-4964da14ba52" CreationDate="2023-04-04T10:21:08.210" UserId="380" Text="What's the difference between `paymentInfo` and `gasRequired`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31196" PostHistoryTypeId="3" PostId="7929" RevisionGUID="0a3325b0-b948-41af-a43f-4964da14ba52" CreationDate="2023-04-04T10:21:08.210" UserId="380" Text="|polkadot-js|contracts|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31197" PostHistoryTypeId="2" PostId="7930" RevisionGUID="c1a16bb7-0958-4582-a378-57080d899661" CreationDate="2023-04-04T10:22:01.067" UserId="94" Text="Great questions!&#xD;&#xA;&#xD;&#xA;&gt;Where can I find documentation on what exactly has to be done in terms of bounded types?&#xD;&#xA;&#xD;&#xA;The docs are quite sparse. Ideally the compiler should be able to lead the path. You &quot;only&quot; have to remove the `pallet::without_storage_info` from your pallet and resolve all compile errors.  &#xD;&#xA;&#xD;&#xA;&gt;What is the unit of proof_size in Weight v2?&#xD;&#xA;&#xD;&#xA;The unit is `Byte`. There are constants for them [here](https://github.com/paritytech/substrate/blob/8b5306e1a607a14e08e13fd521f747319ecb6846/primitives/weights/src/lib.rs#L49) but the conversion is 1:1 as you can see.  &#xD;&#xA;&#xD;&#xA;&gt;From what I understand all storage needs to be of bounded types in order to make sure that the proof_size is bounded as well. Is this correct?&#xD;&#xA;&#xD;&#xA;Yes. Otherwise when your pallet has unbounded storage types, then the proof size will have to be approximated through measuring. This is not as secure as having it computed, but can help as a make-shift solution to ease the transition.  &#xD;&#xA;This is mostly important for para-chains, as relay chains dont have a proof size limit.&#xD;&#xA;&#xD;&#xA;&gt;Is it sufficient to only have bounded types as keys/values in storage or do we also need to limit the size of Storage(Double)Maps?&#xD;&#xA;&#xD;&#xA;This is a bit tricky. The FRAME benchmarking assumes StorageMaps to have a maximum of 1M entries at most. This can be changed either through the [MaxValues](https://github.com/paritytech/substrate/blob/ea182669e111d819b2f4539749b86edee4944168/frame/glutton/src/lib.rs#L101) generic, or for all maps via `--worst-case-map-values` on the CLI. This is an *assumption* that holds in most cases, but it is admittedly not a great solution since the pallet developers have to enforce that limit on their own without help from the `StorageMap` API.&#xD;&#xA;&#xD;&#xA;&gt;If yes, how to determine those limits?&#xD;&#xA;&#xD;&#xA;The same way that you would determine bounds on `BoundedVec`s. Not much advice I can give there. Just pick a reasonable upper bound and keep in mind that the proof size grows by the `log16` of that plus a constant factor.&#xD;&#xA;&#xD;&#xA;&gt;Is there a maximum proof_size that we can use as a benchmark?&#xD;&#xA;&#xD;&#xA;Polkadot/Kusama/Westend/Rococo parachains have (and always had AFAIK) a 5MiB proof limit.  &#xD;&#xA;This is the limit on the compacted, encoded and compressed Proof whereas the benchmarking only calculates the encoded and compacted proof size without extrinsic length. There is an issue [here](https://github.com/paritytech/substrate/issues/13501) to tackle this. Otherwise a too high PoV estimate could hurt block utilization.&#xD;&#xA;&#xD;&#xA;&gt;Can you provide pointers to the Substrate repo of such an implementation?&#xD;&#xA;&#xD;&#xA;I think the difficult part is to bound all storage items and migrate them. Substrate did this [here](https://github.com/paritytech/substrate/issues/8629) for its parachain pallets. For the most part you really just have to remove the `without_storage_info` and fix the fallout." ContentLicense="CC BY-SA 4.0" />
  <row Id="31203" PostHistoryTypeId="2" PostId="7932" RevisionGUID="6ff7b301-cf9a-4762-9ba9-9a0e7deacb11" CreationDate="2023-04-04T10:24:24.393" UserId="94" Text="The `WASM_BUILD_TOOLCHAIN` env variable should be able to override the nightly that is used for the WASM build. So if you set that to something older it should work." ContentLicense="CC BY-SA 4.0" />
  <row Id="31207" PostHistoryTypeId="2" PostId="7933" RevisionGUID="2239bf66-a782-497e-b3be-7cd1b17f0af5" CreationDate="2023-04-04T10:48:30.517" UserId="4019" Text="we create a local parachain implementation in our PC followed by this steps:- (https://docs.substrate.io/test/set-up-a-test-network/) using cargo build --release steps i got error. I attached my screenshot and error message to this post.&#xD;&#xA;&#xD;&#xA;OS:- ubuntu-20.04LTS[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Error Message:-&#xD;&#xA;thread 'main' panicked at 'Failed to compact generated WASM binary.: Error(UnknownOpcode(192))', /home/fb-ubuntu-user/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/utils/wasm-builder/src/wasm_project.rs:673:14&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;error: failed to run custom build command for `polkadot-runtime v0.9.30 (https://github.com/paritytech/polkadot?branch=release-v0.9.30#06453609)`&#xD;&#xA;&#xD;&#xA; thread 'main' panicked at 'Failed to compact generated WASM binary.: Error(UnknownOpcode(192))', /home/fb-ubuntu-user/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/utils/wasm-builder/src/wasm_project.rs:673:14&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uSNN1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31209" PostHistoryTypeId="1" PostId="7933" RevisionGUID="2239bf66-a782-497e-b3be-7cd1b17f0af5" CreationDate="2023-04-04T10:48:30.517" UserId="4019" Text="Parachain Implementation in local PC" ContentLicense="CC BY-SA 4.0" />
  <row Id="31210" PostHistoryTypeId="3" PostId="7933" RevisionGUID="2239bf66-a782-497e-b3be-7cd1b17f0af5" CreationDate="2023-04-04T10:48:30.517" UserId="4019" Text="|polkadot|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31211" PostHistoryTypeId="5" PostId="7933" RevisionGUID="a3167d0b-412d-4953-bf0c-9391be83dff0" CreationDate="2023-04-04T11:03:39.140" UserId="2762" Comment="improved formatting" Text="We create a local parachain implementation in our PC followed by this steps:- (https://docs.substrate.io/test/set-up-a-test-network/) using cargo build --release steps i got error. I attached my screenshot and error message to this post.&#xD;&#xA;&#xD;&#xA;`OS:- ubuntu-20.04LTS`[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error Message:-&#xD;&#xA;thread 'main' panicked at 'Failed to compact generated WASM binary.: Error(UnknownOpcode(192))', /home/fb-ubuntu-user/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/utils/wasm-builder/src/wasm_project.rs:673:14&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;error: failed to run custom build command for `polkadot-runtime v0.9.30 (https://github.com/paritytech/polkadot?branch=release-v0.9.30#06453609)`&#xD;&#xA;&#xD;&#xA; thread 'main' panicked at 'Failed to compact generated WASM binary.: Error(UnknownOpcode(192))', /home/fb-ubuntu-user/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/utils/wasm-builder/src/wasm_project.rs:673:14&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;```&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uSNN1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31212" PostHistoryTypeId="10" PostId="7933" RevisionGUID="c0c6c702-a5b9-4bc0-9e41-245d7df0fd40" CreationDate="2023-04-04T11:28:02.037" UserId="29" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[7831],&quot;Voters&quot;:[{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}]}" />
  <row Id="31214" PostHistoryTypeId="2" PostId="7934" RevisionGUID="3a22cc85-dd76-441e-ad22-ed0fc7ea0e04" CreationDate="2023-04-04T14:31:41.163" UserId="3317" Text="From looking at the ink-examples I noticed that the `#[ink(constructor)]` always returns `Self`, in stead of emitting an event. Is there a reason behind it?&#xD;&#xA;&#xD;&#xA;Extending on that, it makes sense that an `#[ink(message)]` which only reads state, returns a value. However, considering an `#[ink(message)]` that mutates state, what could be the reason to return a value in stead of always emitting an event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31216" PostHistoryTypeId="1" PostId="7934" RevisionGUID="3a22cc85-dd76-441e-ad22-ed0fc7ea0e04" CreationDate="2023-04-04T14:31:41.163" UserId="3317" Text="Why does the constructor return `Self`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31217" PostHistoryTypeId="3" PostId="7934" RevisionGUID="3a22cc85-dd76-441e-ad22-ed0fc7ea0e04" CreationDate="2023-04-04T14:31:41.163" UserId="3317" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31220" PostHistoryTypeId="5" PostId="7934" RevisionGUID="a4b77d46-19a5-41ca-98b1-14cf8012a3a7" CreationDate="2023-04-04T14:49:17.993" UserId="3317" Comment="deleted 7 characters in body" Text="From looking at the ink-examples I noticed that the `#[ink(constructor)]` always returns `Self`, in stead of emitting an event. Is there a reason behind it?&#xD;&#xA;&#xD;&#xA;Extending on that, it makes sense that an `#[ink(message)]` which only reads state, returns a value. However, considering an `#[ink(message)]` that mutates state, what could be the reason to return a value in stead of emitting an event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31221" PostHistoryTypeId="52" PostId="7926" RevisionGUID="81cfe9c3-1780-42f9-817f-e16b7c02a270" CreationDate="2023-04-04T15:02:49.210" />
  <row Id="31222" PostHistoryTypeId="2" PostId="7936" RevisionGUID="81b3cb1d-8b28-4c80-a58d-54949507a794" CreationDate="2023-04-04T15:21:23.343" UserId="3319" Text="i have written a simple block import that wraps grandpa block import, it does tiny verification and calls grandpa block import after that, it looks like this:&#xD;&#xA;&#xD;&#xA;    pub struct CustomBlockImport&lt;I&gt; {&#xD;&#xA;    	grandpa_block_import: I,&#xD;&#xA;    }&#xD;&#xA;    #[async_trait::async_trait]&#xD;&#xA;    impl&lt;I: sc_consensus::BlockImport&lt;Block&gt;&gt; sc_consensus::BlockImport&lt;Block&gt; for WitnessBlockImport&lt;I&gt;&#xD;&#xA;    where&#xD;&#xA;    	I: Send,&#xD;&#xA;    {&#xD;&#xA;    	type Error = ConsensusError;&#xD;&#xA;    	type Transaction = I::Transaction;&#xD;&#xA;    &#xD;&#xA;    	async fn check_block(&#xD;&#xA;    		&amp;mut self,&#xD;&#xA;    		block: BlockCheckParams&lt;Block&gt;,&#xD;&#xA;    	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;                return self&#xD;&#xA;    				.grandpa_block_import&#xD;&#xA;    				.import_block(block, cache)&#xD;&#xA;    				.await&#xD;&#xA;    				.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	async fn import_block(&#xD;&#xA;    		&amp;mut self,&#xD;&#xA;    		block: BlockImportParams&lt;Block, Self::Transaction&gt;,&#xD;&#xA;    		cache: HashMap&lt;well_known_cache_keys::Id, Vec&lt;u8&gt;&gt;,&#xD;&#xA;    	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;    // if block is already finalized no need for my custom verification, just run grandpa block import		&#xD;&#xA;    if block.finalized {&#xD;&#xA;    			log::info!(&quot;block already finalized&quot;);&#xD;&#xA;                return self&#xD;&#xA;    				.parent_block_import&#xD;&#xA;    				.import_block(block, cache)&#xD;&#xA;    				.await&#xD;&#xA;    				.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;    		}&#xD;&#xA;    		// do some verification&#xD;&#xA;    		return self&#xD;&#xA;    			.grandpa_block_import&#xD;&#xA;    			.import_block(block, cache)&#xD;&#xA;    			.await&#xD;&#xA;    			.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried using `block.finalized` field to detect whether its already finalized or not however in my simple network, i start three authorities  (Alice, bob, charlie) and delay running the final authority (dave) after quite some time (so that the first three get to finalize some blocks); when i start the dave node, it does not log `block already finalized` as it should, instead it goes and do my custom verification logic.&#xD;&#xA;&#xD;&#xA;why is this happening and how to solve this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31224" PostHistoryTypeId="1" PostId="7936" RevisionGUID="81b3cb1d-8b28-4c80-a58d-54949507a794" CreationDate="2023-04-04T15:21:23.343" UserId="3319" Text="how to detect if a block is finalized already in block import" ContentLicense="CC BY-SA 4.0" />
  <row Id="31225" PostHistoryTypeId="3" PostId="7936" RevisionGUID="81b3cb1d-8b28-4c80-a58d-54949507a794" CreationDate="2023-04-04T15:21:23.343" UserId="3319" Text="|block-import|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31226" PostHistoryTypeId="2" PostId="7937" RevisionGUID="e6dd5174-aa49-4fcf-8758-1ea1e84db3a1" CreationDate="2023-04-04T15:50:32.127" UserId="3317" Text="Is it possible to get / set block_timestamp in contract's e2e-tests?&#xD;&#xA;&#xD;&#xA;Like [ink::env::test::set_block_timestamp][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/ink/ink_env/test/fn.set_block_timestamp.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="31228" PostHistoryTypeId="1" PostId="7937" RevisionGUID="e6dd5174-aa49-4fcf-8758-1ea1e84db3a1" CreationDate="2023-04-04T15:50:32.127" UserId="3317" Text="Block_timestamp in contract's e2e_tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="31229" PostHistoryTypeId="3" PostId="7937" RevisionGUID="e6dd5174-aa49-4fcf-8758-1ea1e84db3a1" CreationDate="2023-04-04T15:50:32.127" UserId="3317" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31230" PostHistoryTypeId="5" PostId="7936" RevisionGUID="af1b3842-8f32-426a-91da-d38e552616ec" CreationDate="2023-04-04T16:02:31.877" UserId="3319" Comment="added 1 character in body" Text="i have written a simple block import that wraps grandpa block import, it does tiny verification and calls grandpa block import after that, it looks like this:&#xD;&#xA;&#xD;&#xA;    pub struct CustomBlockImport&lt;I&gt; {&#xD;&#xA;    	grandpa_block_import: I,&#xD;&#xA;    }&#xD;&#xA;    #[async_trait::async_trait]&#xD;&#xA;    impl&lt;I: sc_consensus::BlockImport&lt;Block&gt;&gt; sc_consensus::BlockImport&lt;Block&gt; for WitnessBlockImport&lt;I&gt;&#xD;&#xA;    where&#xD;&#xA;    	I: Send,&#xD;&#xA;    {&#xD;&#xA;    	type Error = ConsensusError;&#xD;&#xA;    	type Transaction = I::Transaction;&#xD;&#xA;    &#xD;&#xA;    	async fn check_block(&#xD;&#xA;    		&amp;mut self,&#xD;&#xA;    		block: BlockCheckParams&lt;Block&gt;,&#xD;&#xA;    	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;                return self&#xD;&#xA;    				.grandpa_block_import&#xD;&#xA;    				.import_block(block, cache)&#xD;&#xA;    				.await&#xD;&#xA;    				.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	async fn import_block(&#xD;&#xA;    		&amp;mut self,&#xD;&#xA;    		block: BlockImportParams&lt;Block, Self::Transaction&gt;,&#xD;&#xA;    		cache: HashMap&lt;well_known_cache_keys::Id, Vec&lt;u8&gt;&gt;,&#xD;&#xA;    	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;    // if block is already finalized no need for my custom verification, just run grandpa block import		&#xD;&#xA;    if block.finalized {&#xD;&#xA;    			log::info!(&quot;block already finalized&quot;);&#xD;&#xA;                return self&#xD;&#xA;    				.grandpa_block_import&#xD;&#xA;    				.import_block(block, cache)&#xD;&#xA;    				.await&#xD;&#xA;    				.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;    		}&#xD;&#xA;    		// do some verification&#xD;&#xA;    		return self&#xD;&#xA;    			.grandpa_block_import&#xD;&#xA;    			.import_block(block, cache)&#xD;&#xA;    			.await&#xD;&#xA;    			.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I tried using `block.finalized` field to detect whether its already finalized or not however in my simple network, i start three authorities  (Alice, bob, charlie) and delay running the final authority (dave) after quite some time (so that the first three get to finalize some blocks); when i start the dave node, it does not log `block already finalized` as it should, instead it goes and do my custom verification logic.&#xD;&#xA;&#xD;&#xA;why is this happening and how to solve this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31231" PostHistoryTypeId="5" PostId="7936" RevisionGUID="426138b9-bd84-4cad-a327-8d662767d2f6" CreationDate="2023-04-04T16:39:40.067" UserId="251" Comment="deleted 190 characters in body" Text="i have written a simple block import that wraps grandpa block import, it does tiny verification and calls grandpa block import after that, it looks like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub struct CustomBlockImport&lt;I&gt; {&#xD;&#xA;	grandpa_block_import: I,&#xD;&#xA;}&#xD;&#xA;#[async_trait::async_trait]&#xD;&#xA;impl&lt;I: sc_consensus::BlockImport&lt;Block&gt;&gt; sc_consensus::BlockImport&lt;Block&gt; for WitnessBlockImport&lt;I&gt;&#xD;&#xA;where&#xD;&#xA;	I: Send,&#xD;&#xA;{&#xD;&#xA;	type Error = ConsensusError;&#xD;&#xA;	type Transaction = I::Transaction;&#xD;&#xA;&#xD;&#xA;	async fn check_block(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		block: BlockCheckParams&lt;Block&gt;,&#xD;&#xA;	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;return self&#xD;&#xA;				.grandpa_block_import&#xD;&#xA;				.import_block(block, cache)&#xD;&#xA;				.await&#xD;&#xA;				.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	async fn import_block(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		block: BlockImportParams&lt;Block, Self::Transaction&gt;,&#xD;&#xA;		cache: HashMap&lt;well_known_cache_keys::Id, Vec&lt;u8&gt;&gt;,&#xD;&#xA;	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;// if block is already finalized no need for my custom verification, just run grandpa block import		&#xD;&#xA;if block.finalized {&#xD;&#xA;			log::info!(&quot;block already finalized&quot;);&#xD;&#xA;return self&#xD;&#xA;				.grandpa_block_import&#xD;&#xA;				.import_block(block, cache)&#xD;&#xA;				.await&#xD;&#xA;				.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;		}&#xD;&#xA;		// do some verification&#xD;&#xA;		return self&#xD;&#xA;			.grandpa_block_import&#xD;&#xA;			.import_block(block, cache)&#xD;&#xA;			.await&#xD;&#xA;			.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried using `block.finalized` field to detect whether its already finalized or not however in my simple network, i start three authorities  (Alice, bob, charlie) and delay running the final authority (dave) after quite some time (so that the first three get to finalize some blocks); when i start the dave node, it does not log `block already finalized` as it should, instead it goes and do my custom verification logic.&#xD;&#xA;&#xD;&#xA;why is this happening and how to solve this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31232" PostHistoryTypeId="50" PostId="7419" RevisionGUID="b5583227-7439-4e3e-a357-a340b216f19b" CreationDate="2023-04-04T18:00:45.083" UserId="-1" />
  <row Id="31233" PostHistoryTypeId="2" PostId="7938" RevisionGUID="ed61d8ed-7041-4117-b0fb-47e2103359e7" CreationDate="2023-04-04T18:32:11.863" UserId="2163" Text="When running the following command the try-state fails as it should(I purposefully made the try-state for the Collective pallet incorrect so that it fails):&#xD;&#xA;```&#xD;&#xA;./substrate-try-runtime try-runtime \&#xD;&#xA;    --runtime runtime-try-runtime.wasm \&#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    execute-block \&#xD;&#xA;    live --uri ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when running try-state for a specific pallet, in this case the Collective pallet, it doesn't fail:&#xD;&#xA;```&#xD;&#xA;./substrate-try-runtime try-runtime \&#xD;&#xA;    --runtime runtime-try-runtime.wasm \&#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    execute-block \&#xD;&#xA;    --try-state Collective \      &#xD;&#xA;    live --uri ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Isn't the latter command supposed to fail also?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31235" PostHistoryTypeId="1" PostId="7938" RevisionGUID="ed61d8ed-7041-4117-b0fb-47e2103359e7" CreationDate="2023-04-04T18:32:11.863" UserId="2163" Text="Running try-runtime with try-state option doesn't fail" ContentLicense="CC BY-SA 4.0" />
  <row Id="31236" PostHistoryTypeId="3" PostId="7938" RevisionGUID="ed61d8ed-7041-4117-b0fb-47e2103359e7" CreationDate="2023-04-04T18:32:11.863" UserId="2163" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31237" PostHistoryTypeId="2" PostId="7939" RevisionGUID="d362352c-b8b9-4144-b704-35f4a3d7abf6" CreationDate="2023-04-04T19:21:32.200" UserId="4051" Text="I followed the tutorial on https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/ exactly, but after building the node template (https://github.com/substrate-developer-hub/substrate-node-template) and trying to run it with `./target/release/node-template --dev` I get the following error message:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-04-04 21:13:57 Substrate Node    &#xD;&#xA;2023-04-04 21:13:57 ✌️  version 4.0.0-dev-700c3a186e5    &#xD;&#xA;2023-04-04 21:13:57 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2023    &#xD;&#xA;2023-04-04 21:13:57  Chain specification: Development    &#xD;&#xA;2023-04-04 21:13:57   Node name: future-carriage-5924    &#xD;&#xA;2023-04-04 21:13:57  Role: AUTHORITY    &#xD;&#xA;2023-04-04 21:13:57  Database: RocksDb at /tmp/substrate7hcjlL/chains/dev/db/full    &#xD;&#xA;2023-04-04 21:13:57 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)    &#xD;&#xA;2023-04-04 21:13:57 Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31239" PostHistoryTypeId="1" PostId="7939" RevisionGUID="d362352c-b8b9-4144-b704-35f4a3d7abf6" CreationDate="2023-04-04T19:21:32.200" UserId="4051" Text="Substrate Node Template does not start" ContentLicense="CC BY-SA 4.0" />
  <row Id="31240" PostHistoryTypeId="3" PostId="7939" RevisionGUID="d362352c-b8b9-4144-b704-35f4a3d7abf6" CreationDate="2023-04-04T19:21:32.200" UserId="4051" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31241" PostHistoryTypeId="2" PostId="7940" RevisionGUID="8fcae6e5-669b-4538-afb4-c8caed96a280" CreationDate="2023-04-04T19:24:14.810" UserId="73" Text="`block.finalized` is only set by `manual-seal` to instant finalize a block.&#xD;&#xA;&#xD;&#xA;There is no definitive way to check if a block is already finalized on block import. You could check if `justifications` is `Some(_)`, but even that would only be the case for the blocks where the authority set changed and thus, we have a justification. &#xD;&#xA;&#xD;&#xA;You could check after calling `grandpa.block_import`, if the block is finalized. However, as I said above only every Xth block that enacts an authority set would be finalized." ContentLicense="CC BY-SA 4.0" />
  <row Id="31243" PostHistoryTypeId="2" PostId="7941" RevisionGUID="15801d88-2504-4a2c-bce4-3af7c7575e68" CreationDate="2023-04-04T19:32:56.157" UserId="3002" Text="This issue happens in recent rust nightly builds, try downgrading to `nightly-2023-03-14`&#xD;&#xA;&#xD;&#xA;More info: &#xD;&#xA;&#xD;&#xA;- https://github.com/paritytech/substrate/issues/13636&#xD;&#xA;- https://substrate.stackexchange.com/questions/7714/cannot-run-substrate-on-a-fresh-macbook-m2&#xD;&#xA;&#xD;&#xA;Once you downgrade the nightly toolchain, you will have to build the project again." ContentLicense="CC BY-SA 4.0" />
  <row Id="31245" PostHistoryTypeId="5" PostId="7938" RevisionGUID="85402177-9c09-44d9-96d2-78ec27e74c05" CreationDate="2023-04-04T19:35:47.267" UserId="2163" Comment="added 4379 characters in body" Text="When running the following command the try-state fails as it should(I purposefully made the try-state for the Collective pallet incorrect so that it fails):&#xD;&#xA;```&#xD;&#xA;./substrate-try-runtime try-runtime \&#xD;&#xA;    --runtime runtime-try-runtime.wasm \&#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    execute-block \&#xD;&#xA;    live --uri ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;The output (just the error message):&#xD;&#xA;```&#xD;&#xA;2023-04-04 21:32:07.443 ERROR main runtime::executive: failure: &quot;The member count is greater than `MaxMembers`.&quot;    &#xD;&#xA;2023-04-04 21:32:07.443 ERROR main runtime: panicked at 'called `Result::unwrap()` on an `Err` value: &quot;The member count is greater than `MaxMembers`.&quot;', /Users/sergejsakac/substrate-try-state/bin/node/runtime/src/lib.rs:2362:92    &#xD;&#xA;Error: Input(&quot;failed to execute TryRuntime_execute_block: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x60116b - &lt;unknown&gt;!rust_begin_unwind\n    1: 0xd570 - &lt;unknown&gt;!core::panicking::panic_fmt::h78a1ce1c13a708f9\n    2: 0xd904 - &lt;unknown&gt;!core::result::unwrap_failed::he4f8c27dd4e34635\n    3: 0x169e2e - &lt;unknown&gt;!TryRuntime_execute_block\nnote: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information&quot;)  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when running try-state for a specific pallet, in this case the Collective pallet, it doesn't fail:&#xD;&#xA;```&#xD;&#xA;./substrate-try-runtime try-runtime \&#xD;&#xA;    --runtime runtime-try-runtime.wasm \&#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    execute-block \&#xD;&#xA;    --try-state Collective \      &#xD;&#xA;    live --uri ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;The output - no errors even though it should error: &#xD;&#xA;```&#xD;&#xA;2023-04-04 21:34:24.986  INFO main remote-ext: since no at is provided, setting it to latest finalized head, 0x6a5aebcbc8c318095aa9b2c21c276c5532e487c22ccdc7ab431d258d186c81f6    &#xD;&#xA;2023-04-04 21:34:24.986  INFO main remote-ext: since no prefix is filtered, the data for all pallets will be downloaded    &#xD;&#xA;2023-04-04 21:34:24.992  INFO main remote-ext: scraping key-pairs from remote at block height 0x6a5aebcbc8c318095aa9b2c21c276c5532e487c22ccdc7ab431d258d186c81f6    &#xD;&#xA;2023-04-04 21:34:24.993  INFO main remote-ext: Querying a total of 325 keys from prefix , splitting among 8 threads, 41 keys per thread    &#xD;&#xA;2023-04-04 21:34:25.025  INFO main remote-ext: adding data for hashed prefix: , took 0s    &#xD;&#xA;2023-04-04 21:34:25.025  INFO main remote-ext: adding data for hashed key: 3a636f6465    &#xD;&#xA;2023-04-04 21:34:25.047  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    &#xD;&#xA;2023-04-04 21:34:25.047  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    &#xD;&#xA;2023-04-04 21:34:25.048  INFO main remote-ext: initialized state externalities with storage root 0xb155aa408e5275c188dab0d4f701af8c2ed1abd66b0fc21f21e750bf23ea1d3f and state_version V1    &#xD;&#xA;2023-04-04 21:34:25.151  INFO main try-runtime::cli: original spec: RuntimeString::Owned(&quot;node&quot;)-268, code hash: 6ee5db9e3ab54621fddeb77d9e2c81f278c293c6ef082bb1689744985cf42806    &#xD;&#xA;2023-04-04 21:34:25.232  INFO main try-runtime::cli: new spec: RuntimeString::Owned(&quot;node&quot;)-268, code hash: 90b9555868002db9d1aac9a46da4323ed10ac1ee21f5f2787b50c939577e620a    &#xD;&#xA;2023-04-04 21:34:25.308  INFO main try-runtime::cli: fetching next block: 0xe6ac87d01558e96981deb788784ef69b5ddf3edccde48d48b29e4b10a05f0fea     &#xD;&#xA;2023-04-04 21:34:26.623  INFO main runtime::executive: try-runtime: executing block #148 / state root check: false / signature check: false / try-state-select: Only([&quot;Collective&quot;])    &#xD;&#xA;2023-04-04 21:34:26.624 DEBUG main runtime::mmr::offchain: offchain db set: pos 290 parent_hash 0x6a5aebcbc8c318095aa9b2c21c276c5532e487c22ccdc7ab431d258d186c81f6 key [12, 109, 109, 114, 34, 1, 0, 0, 0, 0, 0, 0, 106, 90, 235, 203, 200, 195, 24, 9, 90, 169, 178, 194, 28, 39, 108, 85, 50, 228, 135, 194, 44, 205, 199, 171, 67, 29, 37, 141, 24, 108, 129, 246]    &#xD;&#xA;2023-04-04 21:34:26.624 DEBUG main runtime::mmr::offchain: offchain db set: pos 291 parent_hash 0x6a5aebcbc8c318095aa9b2c21c276c5532e487c22ccdc7ab431d258d186c81f6 key [12, 109, 109, 114, 35, 1, 0, 0, 0, 0, 0, 0, 106, 90, 235, 203, 200, 195, 24, 9, 90, 169, 178, 194, 28, 39, 108, 85, 50, 228, 135, 194, 44, 205, 199, 171, 67, 29, 37, 141, 24, 108, 129, 246]    &#xD;&#xA;2023-04-04 21:34:26.624 DEBUG main runtime::mmr::offchain: offchain db set: pos 292 parent_hash 0x6a5aebcbc8c318095aa9b2c21c276c5532e487c22ccdc7ab431d258d186c81f6 key [12, 109, 109, 114, 36, 1, 0, 0, 0, 0, 0, 0, 106, 90, 235, 203, 200, 195, 24, 9, 90, 169, 178, 194, 28, 39, 108, 85, 50, 228, 135, 194, 44, 205, 199, 171, 67, 29, 37, 141, 24, 108, 129, 246]    &#xD;&#xA;2023-04-04 21:34:26.625 DEBUG main runtime::system: [148] 0 extrinsics, length: 11 (normal 0%, op: 0%, mandatory 0%) / normal weight:Weight(ref_time: 0, proof_size: 0) (0%) op weight Weight(ref_time: 0, proof_size: 0) (0%) / mandatory weight Weight(ref_time: 2997764131, proof_size: 142024) (0%)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Isn't the latter command supposed to fail also?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31246" PostHistoryTypeId="5" PostId="7940" RevisionGUID="b29cba94-c37a-458d-ab13-93d4de68211a" CreationDate="2023-04-04T21:32:44.440" UserId="73" Comment="added 139 characters in body" Text="`block.finalized` is only set by `manual-seal` to instant finalize a block.&#xD;&#xA;&#xD;&#xA;There is no definitive way to check if a block is already finalized on block import. You could check if `justifications` is `Some(_)`, but even that would only be the case for the blocks where the authority set changed and thus, we have a justification. &#xD;&#xA;&#xD;&#xA;When importing blocks at the tip of the chain, they will also not be directly finalized. It takes some time until blocks are finalized.&#xD;&#xA;&#xD;&#xA;You could check after calling `grandpa.block_import`, if the block is finalized. However, as I said above only every Xth block that enacts an authority set would be finalized." ContentLicense="CC BY-SA 4.0" />
  <row Id="31247" PostHistoryTypeId="2" PostId="7942" RevisionGUID="51a7451b-a66c-4d6c-b502-004ed1147414" CreationDate="2023-04-05T02:33:13.343" UserId="2844" Text="`#[ink(constructor)]` in ink! is used to create contract instance and it needs to return the instance of contract to indicate that new instance has been created and initialized,[constructor_docs](https://use.ink/macros-attributes/constructor)&#xD;&#xA;&#xD;&#xA;`#[ink(message)]` return value on contract invocation. [message_docs](https://use.ink/macros-attributes/message)&#xD;&#xA;&#xD;&#xA;`Emitting events` can be used by third party tools to query information about contract execution and state. [event_docs](https://use.ink/basics/events)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31249" PostHistoryTypeId="52" PostId="7939" RevisionGUID="560e2f92-3a59-4c3c-bce7-57e7f0de49e3" CreationDate="2023-04-05T03:22:24.637" />
  <row Id="31250" PostHistoryTypeId="2" PostId="7943" RevisionGUID="803a77cd-a93e-41c8-970e-b2bf76ee8fbf" CreationDate="2023-04-05T07:03:41.693" UserId="4052" Text="Example:&#xD;&#xA;```&#xD;&#xA;// construct a list of transactions we want to batch&#xD;&#xA;const txs = [&#xD;&#xA;api.tx.balances.transfer(addrBob, 12345), (1)&#xD;&#xA;api.tx.balances.transfer(addrEve, 12345), (2)&#xD;&#xA;api.tx.staking.unbond(12345) (3)&#xD;&#xA;];&#xD;&#xA;&#xD;&#xA;// construct the batch and send the transactions&#xD;&#xA;api.tx.utility&#xD;&#xA;.batch(txs)&#xD;&#xA;.signAndSend(sender, ({ status }) =&gt; {&#xD;&#xA;if (status.isInBlock) {&#xD;&#xA;console.log(included in ${status.asInBlock});&#xD;&#xA;}&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;If transaction (2) failed ( don't have enough balance fee to send anymore). So how can I block all the chain transactions or if don't, how can I handle the error comes out?&#xD;&#xA;&#xD;&#xA;Currently, The batchAll method does not respond to any error and the result is, (1), (3) success, and 2 fail." ContentLicense="CC BY-SA 4.0" />
  <row Id="31252" PostHistoryTypeId="1" PostId="7943" RevisionGUID="803a77cd-a93e-41c8-970e-b2bf76ee8fbf" CreationDate="2023-04-05T07:03:41.693" UserId="4052" Text="How can I handle error from batchAll extrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="31253" PostHistoryTypeId="3" PostId="7943" RevisionGUID="803a77cd-a93e-41c8-970e-b2bf76ee8fbf" CreationDate="2023-04-05T07:03:41.693" UserId="4052" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31254" PostHistoryTypeId="5" PostId="7934" RevisionGUID="8fcadd56-3715-4587-82ca-b4936abdb0b8" CreationDate="2023-04-05T07:18:23.563" UserId="3317" Comment="added 61 characters in body" Text="From looking at the ink-examples I noticed that the `#[ink(constructor)]` always returns `Self`, in stead of emitting an event. Is there a reason behind it?&#xD;&#xA;&#xD;&#xA;E.g. why does a simple `Ok(())` not do and emit an event?&#xD;&#xA;&#xD;&#xA;Extending on that, it makes sense that an `#[ink(message)]` which only reads state, returns a value. However, considering an `#[ink(message)]` that mutates state, what could be the reason to return a value in stead of emitting an event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31255" PostHistoryTypeId="2" PostId="7944" RevisionGUID="c3fb0294-694b-40f3-8c2a-976c9926c5a0" CreationDate="2023-04-05T07:24:33.097" UserId="2025" Text="If you need atomic execution of all the batched calls in the transaction you have to use the `batch_all` method. With this call, the whole transaction will rollback and fail if any of the calls failed.&#xD;&#xA;&#xD;&#xA;You can check [the source code](https://github.com/paritytech/substrate/blob/3b0f4b205e72076357d2b555dbb745ceb8807672/frame/utility/src/lib.rs#L291) of this dispatchable for more information." ContentLicense="CC BY-SA 4.0" />
  <row Id="31257" PostHistoryTypeId="2" PostId="7945" RevisionGUID="b88c219e-f349-463d-ab30-8db538b7af75" CreationDate="2023-04-05T07:24:50.633" UserId="29" Text="Like @Iker mentioned `batch_all` sends a batch of dispatch calls and **atomically** executes them. The whole transaction will rollback and fail if any of the calls fail.&#xD;&#xA;&#xD;&#xA;This video on the utility pallet may be helpful:&#xD;&#xA;- https://youtu.be/WzuMCxwOzJM?t=1883&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31259" PostHistoryTypeId="5" PostId="7943" RevisionGUID="30b4325d-d291-44b6-90f3-c11c0a761c2d" CreationDate="2023-04-05T07:26:47.660" UserId="29" Comment="added 2 characters in body; edited tags" Text="Example:&#xD;&#xA;```js&#xD;&#xA;// construct a list of transactions we want to batch&#xD;&#xA;const txs = [&#xD;&#xA;api.tx.balances.transfer(addrBob, 12345), (1)&#xD;&#xA;api.tx.balances.transfer(addrEve, 12345), (2)&#xD;&#xA;api.tx.staking.unbond(12345) (3)&#xD;&#xA;];&#xD;&#xA;&#xD;&#xA;// construct the batch and send the transactions&#xD;&#xA;api.tx.utility&#xD;&#xA;.batch(txs)&#xD;&#xA;.signAndSend(sender, ({ status }) =&gt; {&#xD;&#xA;if (status.isInBlock) {&#xD;&#xA;console.log(included in ${status.asInBlock});&#xD;&#xA;}&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;If transaction (2) failed ( don't have enough balance fee to send anymore). So how can I block all the chain transactions or if don't, how can I handle the error comes out?&#xD;&#xA;&#xD;&#xA;Currently, The batchAll method does not respond to any error and the result is, (1), (3) success, and 2 fail." ContentLicense="CC BY-SA 4.0" />
  <row Id="31260" PostHistoryTypeId="6" PostId="7943" RevisionGUID="30b4325d-d291-44b6-90f3-c11c0a761c2d" CreationDate="2023-04-05T07:26:47.660" UserId="29" Comment="added 2 characters in body; edited tags" Text="|polkadot-js|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31261" PostHistoryTypeId="2" PostId="7946" RevisionGUID="ba9cb4ab-4762-4f72-9c08-3fcda2c9d479" CreationDate="2023-04-05T07:34:50.273" UserId="567" Text="Yes it has been added to `ink! 4.1.0` check this [PR](https://github.com/paritytech/ink/pull/1721)&#xD;&#xA;&#xD;&#xA;`ink::env::test::set_block_timestamp::&lt;ink::env::DefaultEnvironment&gt;(10056465);`" ContentLicense="CC BY-SA 4.0" />
  <row Id="31263" PostHistoryTypeId="5" PostId="7945" RevisionGUID="80050dd2-f9c5-4f4a-9f3b-85f25af873fe" CreationDate="2023-04-05T07:36:38.560" UserId="29" Comment="added 4 characters in body" Text="Like @Iker mentioned `batch_all` sends a batch of dispatch calls and **atomically** executes them. The whole transaction will rollback and **fail** if any of the calls fail.&#xD;&#xA;&#xD;&#xA;This video on the utility pallet may be helpful:&#xD;&#xA;- https://youtu.be/WzuMCxwOzJM?t=1883&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31265" PostHistoryTypeId="5" PostId="7945" RevisionGUID="7f3530f8-2276-4b5b-a3bf-b25e4fd46d45" CreationDate="2023-04-05T09:36:47.713" UserId="29" Comment="added 2442 characters in body" Text="Like @Iker mentioned `batch_all` sends a batch of dispatch calls and **atomically** executes them. The whole transaction will rollback and **fail** if any of the calls fail.&#xD;&#xA;&#xD;&#xA;This video on the utility pallet may be helpful:&#xD;&#xA;- https://youtu.be/WzuMCxwOzJM?t=1883&#xD;&#xA;&#xD;&#xA;Here is an example for listening for `system.ExtrinsicFailed`:&#xD;&#xA;```js&#xD;&#xA;const txs = [&#xD;&#xA;  api.tx.balances.transfer(EVE, 5000000),&#xD;&#xA;  // api.tx.balances.setBalance(EVE, 100000000, 0),&#xD;&#xA;  api.tx.identity.clearIdentity(),&#xD;&#xA;  api.tx.system.remark('hello world'.repeat(10)),&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;await api.tx.utility.batchAll(txs).signAndSend(alicePair, ({ status, events }) =&gt; {&#xD;&#xA;  if (status.isInBlock || status.isFinalized) {&#xD;&#xA;    events&#xD;&#xA;      .filter(({ event }) =&gt;&#xD;&#xA;        api.events.system.ExtrinsicFailed.is(event)&#xD;&#xA;      )&#xD;&#xA;      .forEach(({ event: { data: [result] } }) =&gt; console.log(&quot;Found one!&quot;, result.toJSON()));&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;Found one! { module: { index: 26, error: '0x02000000' } }&#xD;&#xA;```&#xD;&#xA;From here you can look at how module errors work in Polkadot:&#xD;&#xA;- https://wiki.polkadot.network/docs/maintain-errors&#xD;&#xA;&#xD;&#xA;And have code that handles the logic based on module and error.&#xD;&#xA;&#xD;&#xA;If you are using **sudo** then you would listen for the `Sudid` event as noted [here](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-result-of-a-sudo-event):&#xD;&#xA;```js&#xD;&#xA;const txs = [&#xD;&#xA;  api.tx.balances.forceTransfer(ALICE, BOB, 100),&#xD;&#xA;  // api.tx.balances.transfer(EVE, 5000000),&#xD;&#xA;  api.tx.balances.setBalance(BOB, 1000, 0),&#xD;&#xA;  api.tx.balances.forceTransfer(BOB, EVE, 10000),&#xD;&#xA;  api.tx.system.remark('hello world'.repeat(10)),&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;const unsub = await api.tx.sudo.sudo(api.tx.utility.batchAll(txs)).signAndSend(alice, ({ status, events }) =&gt; {&#xD;&#xA;  if (status.isInBlock || status.isFinalized) {&#xD;&#xA;    events&#xD;&#xA;      // We know this tx should result in `Sudid` event.&#xD;&#xA;      .filter(({ event }) =&gt;&#xD;&#xA;        api.events.sudo.Sudid.is(event)&#xD;&#xA;      )&#xD;&#xA;      // We know that `Sudid` returns just a `Result`&#xD;&#xA;      .forEach(({ event : { data: [result] } }) =&gt; {&#xD;&#xA;        // Now we look to see if the extrinsic was actually successful or not...&#xD;&#xA;        if (result.isError) {&#xD;&#xA;          let error = result.asError;&#xD;&#xA;          if (error.isModule) {&#xD;&#xA;            // for module errors, we have the section indexed, lookup&#xD;&#xA;            const decoded = api.registry.findMetaError(error.asModule);&#xD;&#xA;            const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;            console.log(`${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;          } else {&#xD;&#xA;            // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;            console.log(error.toString());&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;    unsub();&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;Found one! { badOrigin: null }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31266" PostHistoryTypeId="5" PostId="7945" RevisionGUID="39f3bc3d-7ddf-43b4-970b-c60a1c12ad82" CreationDate="2023-04-05T09:43:54.037" UserId="29" Comment="added 397 characters in body" Text="Like @Iker mentioned `batch_all` sends a batch of dispatch calls and **atomically** executes them. The whole transaction will rollback and **fail** if any of the calls fail.&#xD;&#xA;&#xD;&#xA;This video on the utility pallet may be helpful:&#xD;&#xA;- https://youtu.be/WzuMCxwOzJM?t=1883&#xD;&#xA;&#xD;&#xA;Here is an example for listening for `system.ExtrinsicFailed` as noted [here](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event):&#xD;&#xA;```js&#xD;&#xA;const txs = [&#xD;&#xA;  api.tx.balances.transfer(EVE, 5000000),&#xD;&#xA;  // api.tx.balances.setBalance(EVE, 100000000, 0),&#xD;&#xA;  api.tx.identity.clearIdentity(),&#xD;&#xA;  api.tx.system.remark('hello world'.repeat(10)),&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;await api.tx.utility.batchAll(txs).signAndSend(alice, ({ status, events }) =&gt; {&#xD;&#xA;  if (status.isInBlock || status.isFinalized) {&#xD;&#xA;    events&#xD;&#xA;      // find/filter for failed events&#xD;&#xA;      .filter(({ event }) =&gt;&#xD;&#xA;        api.events.system.ExtrinsicFailed.is(event)&#xD;&#xA;      )&#xD;&#xA;      // we know that data for system.ExtrinsicFailed is&#xD;&#xA;      // (DispatchError, DispatchInfo)&#xD;&#xA;      .forEach(({ event: { data: [error, info] } }) =&gt; {&#xD;&#xA;        if (error.isModule) {&#xD;&#xA;          // for module errors, we have the section indexed, lookup&#xD;&#xA;          const decoded = api.registry.findMetaError(error.asModule);&#xD;&#xA;          const { docs, method, section } = decoded;&#xD;&#xA;&#xD;&#xA;          console.log(`${section}.${method}: ${docs.join(' ')}`);&#xD;&#xA;        } else {&#xD;&#xA;          // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;          console.log(error.toString());&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;identity.NotNamed: Account isn't named.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you are using **sudo** then you would listen for the `Sudid` event as noted [here](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-result-of-a-sudo-event):&#xD;&#xA;```js&#xD;&#xA;const txs = [&#xD;&#xA;  api.tx.balances.forceTransfer(ALICE, BOB, 100),&#xD;&#xA;  // api.tx.balances.transfer(EVE, 5000000),&#xD;&#xA;  api.tx.balances.setBalance(BOB, 1000, 0),&#xD;&#xA;  api.tx.balances.forceTransfer(BOB, EVE, 10000),&#xD;&#xA;  api.tx.system.remark('hello world'.repeat(10)),&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;const unsub = await api.tx.sudo.sudo(api.tx.utility.batchAll(txs)).signAndSend(alice, ({ status, events }) =&gt; {&#xD;&#xA;  if (status.isInBlock || status.isFinalized) {&#xD;&#xA;    events&#xD;&#xA;      // We know this tx should result in `Sudid` event.&#xD;&#xA;      .filter(({ event }) =&gt;&#xD;&#xA;        api.events.sudo.Sudid.is(event)&#xD;&#xA;      )&#xD;&#xA;      // We know that `Sudid` returns just a `Result`&#xD;&#xA;      .forEach(({ event : { data: [result] } }) =&gt; {&#xD;&#xA;        // Now we look to see if the extrinsic was actually successful or not...&#xD;&#xA;        if (result.isError) {&#xD;&#xA;          let error = result.asError;&#xD;&#xA;          if (error.isModule) {&#xD;&#xA;            // for module errors, we have the section indexed, lookup&#xD;&#xA;            const decoded = api.registry.findMetaError(error.asModule);&#xD;&#xA;            const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;            console.log(`${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;          } else {&#xD;&#xA;            // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;            console.log(error.toString());&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;    unsub();&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;balances.InsufficientBalance: Balance too low to send value&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31267" PostHistoryTypeId="5" PostId="7943" RevisionGUID="484e1528-ac76-4bce-8436-7bdb5e62e68a" CreationDate="2023-04-05T09:48:30.527" UserId="29" Comment="added 24 characters in body" Text="Example:&#xD;&#xA;```js&#xD;&#xA;// construct a list of transactions we want to batch&#xD;&#xA;const txs = [&#xD;&#xA;  api.tx.balances.transfer(addrBob, 12345), (1)&#xD;&#xA;  api.tx.balances.transfer(addrEve, 12345), (2)&#xD;&#xA;  api.tx.staking.unbond(12345) (3)&#xD;&#xA;];&#xD;&#xA;&#xD;&#xA;// construct the batch and send the transactions&#xD;&#xA;api.tx.utility&#xD;&#xA;  .batch(txs)&#xD;&#xA;  .signAndSend(sender, ({ status }) =&gt; {&#xD;&#xA;    if (status.isInBlock) {&#xD;&#xA;      console.log(included in ${status.asInBlock});&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;If transaction (2) failed ( don't have enough balance fee to send anymore). So how can I block all the chain transactions or if don't, how can I handle the error comes out?&#xD;&#xA;&#xD;&#xA;Currently, The batchAll method does not respond to any error and the result is, (1), (3) success, and 2 fail." ContentLicense="CC BY-SA 4.0" />
  <row Id="31268" PostHistoryTypeId="5" PostId="7945" RevisionGUID="2b53dbeb-6824-4b71-a666-4bc6d30b208b" CreationDate="2023-04-05T09:49:14.010" UserId="29" Comment="added 4 characters in body" Text="Like @Iker mentioned `batch_all` sends a batch of dispatch calls and **atomically** executes them. The whole transaction will **rollback** and **fail** if any of the calls fail.&#xD;&#xA;&#xD;&#xA;This video on the utility pallet may be helpful:&#xD;&#xA;- https://youtu.be/WzuMCxwOzJM?t=1883&#xD;&#xA;&#xD;&#xA;Here is an example for listening for `system.ExtrinsicFailed` as noted [here](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event):&#xD;&#xA;```js&#xD;&#xA;const txs = [&#xD;&#xA;  api.tx.balances.transfer(EVE, 5000000),&#xD;&#xA;  // api.tx.balances.setBalance(EVE, 100000000, 0),&#xD;&#xA;  api.tx.identity.clearIdentity(),&#xD;&#xA;  api.tx.system.remark('hello world'.repeat(10)),&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;await api.tx.utility.batchAll(txs).signAndSend(alice, ({ status, events }) =&gt; {&#xD;&#xA;  if (status.isInBlock || status.isFinalized) {&#xD;&#xA;    events&#xD;&#xA;      // find/filter for failed events&#xD;&#xA;      .filter(({ event }) =&gt;&#xD;&#xA;        api.events.system.ExtrinsicFailed.is(event)&#xD;&#xA;      )&#xD;&#xA;      // we know that data for system.ExtrinsicFailed is&#xD;&#xA;      // (DispatchError, DispatchInfo)&#xD;&#xA;      .forEach(({ event: { data: [error, info] } }) =&gt; {&#xD;&#xA;        if (error.isModule) {&#xD;&#xA;          // for module errors, we have the section indexed, lookup&#xD;&#xA;          const decoded = api.registry.findMetaError(error.asModule);&#xD;&#xA;          const { docs, method, section } = decoded;&#xD;&#xA;&#xD;&#xA;          console.log(`${section}.${method}: ${docs.join(' ')}`);&#xD;&#xA;        } else {&#xD;&#xA;          // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;          console.log(error.toString());&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;identity.NotNamed: Account isn't named.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you are using **sudo** then you would listen for the `Sudid` event as noted [here](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-result-of-a-sudo-event):&#xD;&#xA;```js&#xD;&#xA;const txs = [&#xD;&#xA;  api.tx.balances.forceTransfer(ALICE, BOB, 100),&#xD;&#xA;  // api.tx.balances.transfer(EVE, 5000000),&#xD;&#xA;  api.tx.balances.setBalance(BOB, 1000, 0),&#xD;&#xA;  api.tx.balances.forceTransfer(BOB, EVE, 10000),&#xD;&#xA;  api.tx.system.remark('hello world'.repeat(10)),&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;const unsub = await api.tx.sudo.sudo(api.tx.utility.batchAll(txs)).signAndSend(alice, ({ status, events }) =&gt; {&#xD;&#xA;  if (status.isInBlock || status.isFinalized) {&#xD;&#xA;    events&#xD;&#xA;      // We know this tx should result in `Sudid` event.&#xD;&#xA;      .filter(({ event }) =&gt;&#xD;&#xA;        api.events.sudo.Sudid.is(event)&#xD;&#xA;      )&#xD;&#xA;      // We know that `Sudid` returns just a `Result`&#xD;&#xA;      .forEach(({ event : { data: [result] } }) =&gt; {&#xD;&#xA;        // Now we look to see if the extrinsic was actually successful or not...&#xD;&#xA;        if (result.isError) {&#xD;&#xA;          let error = result.asError;&#xD;&#xA;          if (error.isModule) {&#xD;&#xA;            // for module errors, we have the section indexed, lookup&#xD;&#xA;            const decoded = api.registry.findMetaError(error.asModule);&#xD;&#xA;            const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;            console.log(`${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;          } else {&#xD;&#xA;            // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;            console.log(error.toString());&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;    unsub();&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;balances.InsufficientBalance: Balance too low to send value&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31269" PostHistoryTypeId="2" PostId="7947" RevisionGUID="72b52485-6417-439d-9d60-219f16e5639d" CreationDate="2023-04-05T09:52:42.207" UserId="386" Text="I'd like to propose an idea for creating a general reference and help tool utilizing a chatbot trained on data from Substrate-based chains (e.g., Polkadot, Kusama, Parachains) and their associated repositories. While I don't plan to implement this myself, I am curious to discuss its feasibility and potential impact.&#xD;&#xA;&#xD;&#xA;1. Would it be technically feasible to extract and preprocess the necessary data from these chains and repositories to train a chatbot model?&#xD;&#xA;2. Do you think the resulting chatbot would provide valuable insights and assistance to users?&#xD;&#xA;3. Are there any potential legal or ethical concerns with using the data from these chains and repositories for this purpose?&#xD;&#xA;4. Would the chatbot model be able to keep up with the constantly evolving nature of these ecosystems?&#xD;&#xA;&#xD;&#xA;I'm interested in hearing your thoughts on this proposal, any suggestions for improving the idea, and any potential challenges that could arise." ContentLicense="CC BY-SA 4.0" />
  <row Id="31271" PostHistoryTypeId="1" PostId="7947" RevisionGUID="72b52485-6417-439d-9d60-219f16e5639d" CreationDate="2023-04-05T09:52:42.207" UserId="386" Text="Chatbot Trained on Substrate-based Chains and Repositories for General Reference and Help" ContentLicense="CC BY-SA 4.0" />
  <row Id="31272" PostHistoryTypeId="3" PostId="7947" RevisionGUID="72b52485-6417-439d-9d60-219f16e5639d" CreationDate="2023-04-05T09:52:42.207" UserId="386" Text="|parachain|rust|wasm|blockchain|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31273" PostHistoryTypeId="5" PostId="7947" RevisionGUID="99806f9b-b6e4-482f-a0e9-cd7c68cddb16" CreationDate="2023-04-05T09:55:39.203" UserId="386" Comment="added 5 characters in body" Text="I'd like to propose an idea for creating a general reference and help tool utilizing a chatbot trained on data from Substrate-based chains (e.g., Polkadot, Kusama, Parachains) and their associated repositories. While I don't plan to implement this myself, I am curious to discuss its feasibility and potential impact.&#xD;&#xA;&#xD;&#xA;1. Would it be technically feasible to extract and preprocess the necessary data from these chains and repositories to train a chatbot model?&#xD;&#xA;2. Do you think the resulting chatbot would provide valuable insights and assistance to developers?&#xD;&#xA;3. Are there any potential legal or ethical concerns with using the data from these chains and repositories for this purpose?&#xD;&#xA;4. Would the chatbot model be able to keep up with the constantly evolving nature of these ecosystems?&#xD;&#xA;&#xD;&#xA;I'm interested in hearing your thoughts on this proposal, any suggestions for improving the idea, and any potential challenges that could arise." ContentLicense="CC BY-SA 4.0" />
  <row Id="31283" PostHistoryTypeId="2" PostId="7950" RevisionGUID="183a2c90-3cf5-4585-925b-317636dcb4d5" CreationDate="2023-04-05T10:49:50.963" UserId="386" Text="following the suggestion I duplicated this porposal in the polkadot forum:&#xD;&#xA;&#xD;&#xA;https://forum.polkadot.network/t/chatbot-trained-on-substrate-based-chains-and-repositories-for-general-reference-and-help/2516" ContentLicense="CC BY-SA 4.0" />
  <row Id="31288" PostHistoryTypeId="5" PostId="7950" RevisionGUID="513af182-e169-4d21-b787-8ae18e9277db" CreationDate="2023-04-05T13:54:39.653" UserId="386" Comment="edited body" Text="following the suggestion I duplicated this proposal in the polkadot forum:&#xD;&#xA;&#xD;&#xA;https://forum.polkadot.network/t/chatbot-trained-on-substrate-based-chains-and-repositories-for-general-reference-and-help/2516" ContentLicense="CC BY-SA 4.0" />
  <row Id="31289" PostHistoryTypeId="2" PostId="7952" RevisionGUID="cc2fc401-a761-4bd7-a946-b49a8db97880" CreationDate="2023-04-05T14:42:06.387" UserId="1989" Text="We have two instances of a pallet with different runtime configurations. How can we run the benchmarks separately to generate two distinct sets of weights?&#xD;&#xA;&#xD;&#xA;As far as I can tell this is not possible and if you list multiple pallet instances (such as in the kusama runtime [here](https://github.com/paritytech/polkadot/blob/dc230b323b5baeb9b4297430ed539b208d30bf6a/runtime/kusama/src/lib.rs#L1556-L1557)) it will use the last instance." ContentLicense="CC BY-SA 4.0" />
  <row Id="31291" PostHistoryTypeId="1" PostId="7952" RevisionGUID="cc2fc401-a761-4bd7-a946-b49a8db97880" CreationDate="2023-04-05T14:42:06.387" UserId="1989" Text="Benchmarking multiple instances" ContentLicense="CC BY-SA 4.0" />
  <row Id="31292" PostHistoryTypeId="3" PostId="7952" RevisionGUID="cc2fc401-a761-4bd7-a946-b49a8db97880" CreationDate="2023-04-05T14:42:06.387" UserId="1989" Text="|pallet|weight|benchmarking|instantiable|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31293" PostHistoryTypeId="2" PostId="7953" RevisionGUID="84c7ded5-3d05-4fee-9bb5-a00c794aa9f8" CreationDate="2023-04-05T15:52:09.627" UserId="266" Text="Think of `#[ink(constructor)]` as of normal Rust &quot;constructor&quot;, e.g. a `fn new`. This creates the contract object itself. How that object is pushed on chain and whether event is emitted or not - is out of scope for the constructor. Its job is to create the contract object. If the constructor was supposed to only emit events then the responsibility to put the contract on chain falls to the constructor instead of its environment (substrate pallet?) as it is now.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;re `#[ink(message)]` return values:&#xD;&#xA;&#xD;&#xA;Returned values and events are two separate things:&#xD;&#xA; - a returned value may be the message's primary way to communicate immediately to its caller that something happened &#xD;&#xA; - an emitted event is an optional addition for historical purposes later on (I think)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31295" PostHistoryTypeId="2" PostId="7954" RevisionGUID="fd5a32ef-47fb-433b-8c63-ef3ae911f9a3" CreationDate="2023-04-05T19:18:31.773" UserId="94" Text="It is possible. You just run the benchmark like for any other pallet.  &#xD;&#xA;The output will list the calls multiple times and finally print:  &#xD;&#xA;&#xD;&#xA;```pre&#xD;&#xA;Created file: &quot;runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs&quot;&#xD;&#xA;Created file: &quot;runtime/kusama/src/weights/pallet_referenda_referenda.rs&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Be sure to specify a **folder** and not a **file** path for the `--output` like in [Kusama](https://github.com/paritytech/polkadot/blob/dc230b323b5baeb9b4297430ed539b208d30bf6a/runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs#L36).  &#xD;&#xA;Otherwise it will overwrite the same file and print this as last line:&#xD;&#xA;&#xD;&#xA;```pre&#xD;&#xA;Multiple benchmarks were written to the same file: &quot;runtime/kusama/src/weights/pallet_referenda.rs&quot;.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31297" PostHistoryTypeId="5" PostId="7954" RevisionGUID="0a3fac3c-eec9-45bc-a73e-a2f097f6ce67" CreationDate="2023-04-05T19:24:29.597" UserId="94" Comment="added 128 characters in body" Text="It is possible. You just run the benchmark like for any other pallet.  &#xD;&#xA;The output will list the calls multiple times and finally print:  &#xD;&#xA;&#xD;&#xA;```pre&#xD;&#xA;Created file: &quot;runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs&quot;&#xD;&#xA;Created file: &quot;runtime/kusama/src/weights/pallet_referenda_referenda.rs&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Be sure to specify a **folder** and not a **file** path for the `--output` like in [Kusama](https://github.com/paritytech/polkadot/blob/dc230b323b5baeb9b4297430ed539b208d30bf6a/runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs#L36).  &#xD;&#xA;Otherwise it will overwrite the same file and print this as last line:&#xD;&#xA;&#xD;&#xA;```pre&#xD;&#xA;Created file: &quot;runtime/kusama/src/weights/pallet_referenda.rs&quot;&#xD;&#xA;Created file: &quot;runtime/kusama/src/weights/pallet_referenda.rs&quot;&#xD;&#xA;Multiple benchmarks were written to the same file: &quot;runtime/kusama/src/weights/pallet_referenda.rs&quot;.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31298" PostHistoryTypeId="50" PostId="7458" RevisionGUID="bf95e785-c8c9-4888-8162-13387915000e" CreationDate="2023-04-05T21:02:45.333" UserId="-1" />
  <row Id="31299" PostHistoryTypeId="52" PostId="7952" RevisionGUID="02b02b08-e3dd-4123-859a-0c2adfabc5f1" CreationDate="2023-04-05T22:47:24.480" />
  <row Id="31300" PostHistoryTypeId="10" PostId="7947" RevisionGUID="8f03d230-feac-4b65-9d3f-b5f26f077eea" CreationDate="2023-04-06T02:35:10.557" UserId="34" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;},{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:2762,&quot;DisplayName&quot;:&quot;Alex Bean&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="31304" PostHistoryTypeId="2" PostId="7955" RevisionGUID="2e14f3bf-6030-4798-bfad-957ca548f034" CreationDate="2023-04-06T05:18:39.113" UserId="4056" Text="I would like to inspect transactions (extrinsics) in a given block to potentially:&#xD;&#xA;- Find different types of transactions and their parameters&#xD;&#xA;- Look through all transactions included in the block and act on them based on type, sender etc.&#xD;&#xA;&#xD;&#xA;So far I am able to query the block using `subtx` and see all transactions in raw form. I do not know how can I decode them to Rust types and act on them:&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;../specs/kusama.spec.scale&quot;)]&#xD;&#xA;pub mod kusama_client {}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;    let api = OnlineClient::&lt;PolkadotConfig&gt;::from_url(rpc_url)&#xD;&#xA;        .await.unwrap();&#xD;&#xA;&#xD;&#xA;    let block = api.rpc().block(None).await.unwrap().unwrap();&#xD;&#xA;&#xD;&#xA;    for tx in block.block.extrinsics {&#xD;&#xA;        println!(&quot;tx: {:?}&quot;, tx);&#xD;&#xA;&#xD;&#xA;        // TODO: Decode transactions and act on them based on types etc...&#xD;&#xA;        // ex. ImOnline etc...&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I know that the transactions are SCALE encoded, but I do not know what to decode them to Rust types, I do not even know what Rust types to use (I assume those generated from metadata, but how do I find appropriate type to decode to?). &#xD;&#xA;&#xD;&#xA;I would also like to do the similar thing with other construct such as offences:&#xD;&#xA;```rust&#xD;&#xA;   let offences_addr = kusama_client::storage().offences().reports_by_kind_index(offence_kind);&#xD;&#xA;&#xD;&#xA;    let offences = api&#xD;&#xA;        .storage()&#xD;&#xA;        .at(None)&#xD;&#xA;        .await.unwrap()&#xD;&#xA;        .fetch(&amp;offences_addr)&#xD;&#xA;        .await.unwrap()&#xD;&#xA;        .unwrap();&#xD;&#xA;&#xD;&#xA;     // TODO: decode and inspect offences&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would appreciate any pointers in the right direction, or examples if such exists." ContentLicense="CC BY-SA 4.0" />
  <row Id="31306" PostHistoryTypeId="1" PostId="7955" RevisionGUID="2e14f3bf-6030-4798-bfad-957ca548f034" CreationDate="2023-04-06T05:18:39.113" UserId="4056" Text="Decoding Polkadot/Kusama transactions in Rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="31307" PostHistoryTypeId="3" PostId="7955" RevisionGUID="2e14f3bf-6030-4798-bfad-957ca548f034" CreationDate="2023-04-06T05:18:39.113" UserId="4056" Text="|subxt|decode|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31308" PostHistoryTypeId="2" PostId="7956" RevisionGUID="f0a015b5-4b69-4709-9c47-dedeaa1fb43b" CreationDate="2023-04-06T06:02:35.850" UserId="1778" Text="I see this comment while reading through the beefy pallet&#xD;&#xA;[Beefy equivocation][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/2bb370fbc36b2631dd85e6f1c1952cdfe7b8db8c/frame/beefy/src/equivocation.rs#L32-L35" ContentLicense="CC BY-SA 4.0" />
  <row Id="31310" PostHistoryTypeId="1" PostId="7956" RevisionGUID="f0a015b5-4b69-4709-9c47-dedeaa1fb43b" CreationDate="2023-04-06T06:02:35.850" UserId="1778" Text="Can `ValidateUnsigned` be used outside the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31311" PostHistoryTypeId="3" PostId="7956" RevisionGUID="f0a015b5-4b69-4709-9c47-dedeaa1fb43b" CreationDate="2023-04-06T06:02:35.850" UserId="1778" Text="|unsigned|beefy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31314" PostHistoryTypeId="2" PostId="7958" RevisionGUID="483ac289-830b-4a36-b223-62bb47c204dc" CreationDate="2023-04-06T07:03:40.953" UserId="4052" Text="I found this example. it helps me to log the error, Transactions are still executed and a few seconds later the console.log is displayed. I tried putting in try-catch but it doesn't jump in catch()&#xD;&#xA;```&#xD;&#xA;api.tx.balances&#xD;&#xA;  .transfer(recipient, 123)&#xD;&#xA;  .signAndSend(sender, ({ status, events, dispatchError }) =&gt; {&#xD;&#xA;    // status would still be set, but in the case of error we can shortcut&#xD;&#xA;    // to just check it (so an error would indicate InBlock or Finalized)&#xD;&#xA;    if (dispatchError) {&#xD;&#xA;      if (dispatchError.isModule) {&#xD;&#xA;        // for module errors, we have the section indexed, lookup&#xD;&#xA;        const decoded = api.registry.findMetaError(dispatchError.asModule);&#xD;&#xA;        const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;        console.log(`${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;      } else {&#xD;&#xA;        // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;        console.log(dispatchError.toString());&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  });&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31316" PostHistoryTypeId="50" PostId="6738" RevisionGUID="c2fd2acb-e3de-4ba3-a905-82800c066b92" CreationDate="2023-04-06T07:07:15.920" UserId="-1" />
  <row Id="31317" PostHistoryTypeId="2" PostId="7959" RevisionGUID="99f26c4b-ab8a-4b1e-815f-72c9589a7c8f" CreationDate="2023-04-06T08:36:53.217" UserId="1795" Text="We are exploring how to wrap part of the runtime logic into a re-usable WASM blob that can be wrapped in a JS library.&#xD;&#xA;To do that, we are investigating using `wasm-pack` and `wasm-bindgen`. Unfortunately, `wasm-bindgen` does not support compiling for `no_std` environment, hence we are in the need of using the `std` feature while targeting the `wasm32-unknown-unknown` architecture.&#xD;&#xA;&#xD;&#xA;As I see, this does not currently seem to be possible because of the assumption that compiling for `wasm32-unknown-unknown` means compiling the runtime, which in this case is not true.&#xD;&#xA;Is there a way to do this? Or is bugging `wasm-bindgen` people to support `no_std` the best shot we have?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;   --&gt; /home/dev/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.8/src/lib.rs:263:9&#xD;&#xA;    |&#xD;&#xA;263 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported ...&#xD;&#xA;264 | |                         default, you may need to enable the \&quot;js\&quot; feature...&#xD;&#xA;265 | |                         For more information see: \&#xD;&#xA;266 | |                         https://docs.rs/getrandom/#webassembly-support...&#xD;&#xA;    | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;   --&gt; /home/dev/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.8/src/lib.rs:290:5&#xD;&#xA;    |&#xD;&#xA;290 |     imp::getrandom_inner(dest)&#xD;&#xA;    |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0433`.&#xD;&#xA;error: could not compile `getrandom` (lib) due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31319" PostHistoryTypeId="1" PostId="7959" RevisionGUID="99f26c4b-ab8a-4b1e-815f-72c9589a7c8f" CreationDate="2023-04-06T08:36:53.217" UserId="1795" Text="Compiling runtime with std targeting wasm32-unknown-unknown" ContentLicense="CC BY-SA 4.0" />
  <row Id="31320" PostHistoryTypeId="3" PostId="7959" RevisionGUID="99f26c4b-ab8a-4b1e-815f-72c9589a7c8f" CreationDate="2023-04-06T08:36:53.217" UserId="1795" Text="|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31321" PostHistoryTypeId="2" PostId="7960" RevisionGUID="380a83e0-2a4c-4217-825e-92c5e9beea62" CreationDate="2023-04-06T09:18:56.373" UserId="298" Text="I am trying to compile the `polkadot-v0.9.37` version of node-template with some added customisations. &#xD;&#xA;&#xD;&#xA;I run `cargo update` and get this issue in the core pallets:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: no matching package named `sc-finality-grandpa` found&#xD;&#xA;location searched: https://github.com/paritytech/substrate.git&#xD;&#xA;required by package `node-template v4.0.0-dev (/Users/ramsey/decentration/substrate-supersig-template/node)`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;issue can be replicated [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/decentration/substrate-supersig-template/tree/v0.9.37" ContentLicense="CC BY-SA 4.0" />
  <row Id="31323" PostHistoryTypeId="1" PostId="7960" RevisionGUID="380a83e0-2a4c-4217-825e-92c5e9beea62" CreationDate="2023-04-06T09:18:56.373" UserId="298" Text="sc-finality-grandpa issue in my node-template v0.9.37" ContentLicense="CC BY-SA 4.0" />
  <row Id="31324" PostHistoryTypeId="3" PostId="7960" RevisionGUID="380a83e0-2a4c-4217-825e-92c5e9beea62" CreationDate="2023-04-06T09:18:56.373" UserId="298" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31325" PostHistoryTypeId="2" PostId="7961" RevisionGUID="292d5e60-5c8f-416e-9c3d-b8bba1b38e15" CreationDate="2023-04-06T09:23:28.293" UserId="298" Text="There was a space &quot; branch&quot; in the Cargo.toml. Quickly resolved." ContentLicense="CC BY-SA 4.0" />
  <row Id="31327" PostHistoryTypeId="50" PostId="7485" RevisionGUID="8873ef51-cd4d-46d3-bcf9-6f0c8209e724" CreationDate="2023-04-06T10:01:05.127" UserId="-1" />
  <row Id="31328" PostHistoryTypeId="2" PostId="7962" RevisionGUID="ac998f37-0755-4bd7-84cb-8e3202f8f991" CreationDate="2023-04-06T10:02:47.583" UserId="1793" Text="We are currently depositing KSM tokens to our parachain using the following code:&#xD;&#xA;&#xD;&#xA;    kusamaApi.tx.xcmPallet.limitedReserveTransferAssets(params_here)&#xD;&#xA;&#xD;&#xA;When executing the transaction, the KSM tokens are successfully transferred to the parachain. However, we are having trouble fetching the partial fee for this transaction on our frontend.&#xD;&#xA;&#xD;&#xA;To fetch this fee, we are using the following code:&#xD;&#xA;&#xD;&#xA;    kusamaApi.tx.xcmPallet.limitedReserveTransferAssets(params_here).paymentInfo(account)&#xD;&#xA;&#xD;&#xA;However, when we run this code, we encounter an error and are unable to display the fee. The error message states:&#xD;&#xA;&#xD;&#xA;    2023-04-06 11:47:22        RPC-CORE: call(method: Text, data: Bytes, at?: BlockHash): Bytes:: -32000: Client error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;    WASM backtrace:&#xD;&#xA;    &#xD;&#xA;        0: 0x3c246 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;        1: 0x3ea1 - &lt;unknown&gt;!core::panicking::panic_fmt::h32de9c76c9d5eb0c&#xD;&#xA;        2: 0x95fd3 - &lt;unknown&gt;!TransactionPaymentApi_query_info&#xD;&#xA;    Uncaught (in promise) RpcError: -32000: Client error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;    WASM backtrace:&#xD;&#xA;    &#xD;&#xA;        0: 0x3c246 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;        1: 0x3ea1 - &lt;unknown&gt;!core::panicking::panic_fmt::h32de9c76c9d5eb0c&#xD;&#xA;        2: 0x95fd3 - &lt;unknown&gt;!TransactionPaymentApi_query_info&#xD;&#xA;    &#xD;&#xA;        at checkError (index.js?01d4:23:1)&#xD;&#xA;        at RpcCoder.decodeResponse (index.js?01d4:38:1)&#xD;&#xA;        at WsProvider.value (index.js?9439:232:1)&#xD;&#xA;        at WebSocket.value (index.js?9439:215:1)&#xD;&#xA;&#xD;&#xA;It is unclear what the exact problem is. Could someone provide further details or context to help us identify the issue? Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="31330" PostHistoryTypeId="1" PostId="7962" RevisionGUID="ac998f37-0755-4bd7-84cb-8e3202f8f991" CreationDate="2023-04-06T10:02:47.583" UserId="1793" Text="execution failed: execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed. TransactionPaymentApi_query_info" ContentLicense="CC BY-SA 4.0" />
  <row Id="31331" PostHistoryTypeId="3" PostId="7962" RevisionGUID="ac998f37-0755-4bd7-84cb-8e3202f8f991" CreationDate="2023-04-06T10:02:47.583" UserId="1793" Text="|rust|wasm|frontend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31332" PostHistoryTypeId="2" PostId="7963" RevisionGUID="f3564596-d42f-4e5d-bbf2-862cb848e806" CreationDate="2023-04-06T11:08:00.940" UserId="29" Text="In pallet NFTs, I see a concept of tips:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// The max number of tips a user could send.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type MaxTips: Get&lt;u32&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Allows to pay the tips.&#xD;&#xA;///&#xD;&#xA;/// Origin must be Signed.&#xD;&#xA;///&#xD;&#xA;/// - `tips`: Tips array.&#xD;&#xA;///&#xD;&#xA;/// Emits `TipSent` on every tip transfer.&#xD;&#xA;#[pallet::call_index(33)]&#xD;&#xA;#[pallet::weight(T::WeightInfo::pay_tips(tips.len() as u32))]&#xD;&#xA;pub fn pay_tips(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	tips: BoundedVec&lt;ItemTipOf&lt;T, I&gt;, T::MaxTips&gt;,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;	let origin = ensure_signed(origin)?;&#xD;&#xA;	Self::do_pay_tips(origin, tips)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the purpose of tips? When would a user want to tip?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31334" PostHistoryTypeId="1" PostId="7963" RevisionGUID="f3564596-d42f-4e5d-bbf2-862cb848e806" CreationDate="2023-04-06T11:08:00.940" UserId="29" Text="What is the purpose of tips in the NFTs pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31335" PostHistoryTypeId="3" PostId="7963" RevisionGUID="f3564596-d42f-4e5d-bbf2-862cb848e806" CreationDate="2023-04-06T11:08:00.940" UserId="29" Text="|pallet|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31336" PostHistoryTypeId="2" PostId="7964" RevisionGUID="e6081f42-08a7-4f7b-b65a-c880e5fab54b" CreationDate="2023-04-06T11:13:00.023" UserId="3947" Text="pruning=archive will keep all the blocks in the nodes databases. As the blocks are there in the archive-node then do we really need a separate parallel postgres db as suggested in https://docs.substrate.io/reference/command-line-tools/archive/ ??&#xD;&#xA;&#xD;&#xA;So overall what should be the setup of an archive node apart from db ? Also, I want to use subsquid archive in the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="31338" PostHistoryTypeId="1" PostId="7964" RevisionGUID="e6081f42-08a7-4f7b-b65a-c880e5fab54b" CreationDate="2023-04-06T11:13:00.023" UserId="3947" Text="proper setup for substrate archive node" ContentLicense="CC BY-SA 4.0" />
  <row Id="31339" PostHistoryTypeId="3" PostId="7964" RevisionGUID="e6081f42-08a7-4f7b-b65a-c880e5fab54b" CreationDate="2023-04-06T11:13:00.023" UserId="3947" Text="|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31340" PostHistoryTypeId="5" PostId="38" RevisionGUID="1f49226c-dec3-4f66-adc1-7175c73a0ff0" CreationDate="2023-04-06T11:44:18.097" UserId="104" Comment="deleted 14 characters in body" Text="There are two main ways in which assets are transferred between consensus systems in XCM. They are namely via **Asset Teleportation** or via **Reserve Asset Transfers**.&#xD;&#xA;&#xD;&#xA;First of all, a preamble -- XCM instructions are always going to be interpreted according to the consensus system that executes them, and so for all of the instructions that I am going to explain below, *always* remember that the exact behaviour may change depending on which consensus system processes them. What I would hence be describing are the basic behaviours that you can expect each consensus system to possess, regardless of their peculiarities.&#xD;&#xA;&#xD;&#xA;With that said, I am going to describe the intricacies with the two asset transfer models below.&#xD;&#xA;&#xD;&#xA;# Asset Teleportation #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Asset Teleportation][1]][1]&#xD;&#xA;&#xD;&#xA;We start with the easier and more straightforward of the two -- Asset Teleportation. As you can see from the diagram above, there are only 2 actors within this model: the source and the destination. The way in which we transfer assets between the source and the destination are briefly summarized in the numbered labels on the diagram, and are explained in more detail below:&#xD;&#xA;&#xD;&#xA;### 1. InitiateTeleport ###&#xD;&#xA;The source gathers the assets to be teleported from the sending account and **takes them out of the circulating supply**, taking note of the total amount of assets that was taken out.&#xD;&#xA;&#xD;&#xA;### 2. ReceiveTeleportedAssets ###&#xD;&#xA;The source then creates an XCM instruction called &quot;ReceiveTeleportedAssets&quot; and puts the amount of assets taken out of circulation and the receiving account as parameters to this instruction. It then sends this instruction over to the destination, where it gets processed and new assets gets **put back into circulating supply** accordingly.&#xD;&#xA;&#xD;&#xA;### 3. DepositAsset ###&#xD;&#xA;The destination then deposits the assets to the receiving account of the asset.&#xD;&#xA;&#xD;&#xA;The phrases **taken out of circulating supply** and **put back into circulating supply** are highlighted above to firstly give an indication of how much flexibility an XCM executor has in implementing the semantics of taking an asset out of and putting it back into its circulating supply. The straightforward answer is to burn the assets to take them out of circulation, but one can imagine that there are indeed multiple methods of achieving the same goal, such as transferring the assets locally to an inaccessible account, and likewise for putting assets back to circulation -- the receiving consensus system can freely choose to implement such semantics by releasing assets from a pre-filled and inaccessible treasury of the assets transferred, or perform a mint of the assets.&#xD;&#xA;&#xD;&#xA;As such, the above also gives a hint on the disadvantages of this model -- it requires both the source and destination of have a high level of mutual trust. The destination must trust that the source has appropriately removed the assets that was sent over from the circulating supply, and the source must also trust the destination to put the assets that was taken out of circulation back into circulation. The result of an asset teleportation should result in the same circulating supply of the asset. **Failing to uphold either of these two conditions will result in a change in the asset's total issuance (in the case of fungible tokens) or a complete loss/duplication of an NFT.**&#xD;&#xA;&#xD;&#xA;# Reserve Asset Transfer #&#xD;&#xA;&#xD;&#xA;[![Flow Diagram of Reserve Asset Transfer][2]][2]&#xD;&#xA;&#xD;&#xA;For consensus systems that don't have the level of trust required for asset teleportation, they can instead opt for trusting a 3rd entity called the reserve to store the real assets (think Statemine on Kusama or Statemint on Polkadot). What this entails is that the source and destination will have to create some sort of mechanism to keep track of the assets that they own on the reserve, and this is usually done by minting a new derivative token. As a corollary, both the source and destination must have accounts on the reserve -- we'll refer to such accounts owned by the source/destination as Sovereign Accounts.&#xD;&#xA;&#xD;&#xA;Below are the steps in which a reserve asset transfer undergoes in order to transfer assets from the source to the destination:&#xD;&#xA;&#xD;&#xA;### 1. InitiateReserveWithdraw ###&#xD;&#xA;The source gathers the derivative assets to be transferred from the sending account and burns them, taking note of the amount of derivatives that were burned.&#xD;&#xA;&#xD;&#xA;### 2. WithdrawAsset ###&#xD;&#xA;The source sends a WithdrawAsset instruction to the reserve, instructing the reserve to withdraw assets equivalent to the amount of derivatives burned from the source chain.&#xD;&#xA;&#xD;&#xA;### 3. DepositReserveAsset ###&#xD;&#xA;The reserve deposits the assets withdrawn from the previous step to the destination's sovereign account, taking note of the amount of assets deposited.&#xD;&#xA;&#xD;&#xA;### 4. ReserveAssetDeposited ###&#xD;&#xA;The reserve creates a ReserveAssetDeposited instruction with the amount of assets deposited to the destination's sovereign account, and sends this instruction onwards to the destination. The destination receives the instruction and processes it, minting the derivative assets as a result of the process.&#xD;&#xA;&#xD;&#xA;### 5. DepositAsset ###&#xD;&#xA;The destination deposits the derivative assets minted to the receiving account.&#xD;&#xA;&#xD;&#xA;The addition of a 3rd consensus system is already a hint of the disadvantages of a reserve asset transfer model -- firstly, the reserve could easily become a point of centralization when too many consensus systems rely on it to be the reserve of choice for their assets; secondly, the sheer amount of steps required necessarily makes it more prone to errors, and as such, implementors will have to consider more possible pitfalls and provide technical support accordingly when an end user encounters issues arising from these steps. Last but not least, either of the source or destination can opt to designate multiple consensus systems to be their reserves, and in such a situation, care must be taken in order to ensure that the sovereign account on the reserves are balanced, so that one doesn't get all drained while the others still contain a healthy balance.&#xD;&#xA;&#xD;&#xA;One additional point of interest here is that I am also seeing that people are combining the roles of the source and reserve together, so that the source chain also acts as the reserve chain for their native token. This does make the reserve transfer process easier, in the sense that they would only need to execute a `DepositReserveAsset` to the sovereign account of the destination locally, and emit a `ReserveAssetDeposited` message to the destination. The destination would still however need to 1) recognize the source as the proper reserve for the tokens that are being sent over and 2) support minting derivatives of the tokens being sent over. &#xD;&#xA;&#xD;&#xA;# Summary&#xD;&#xA;&#xD;&#xA;Despite being more complex, consensus systems often will first pick the reserve asset transfer model over asset teleportation, due to the trust issues discussed. However, we could imagine that as the source and destination continue to prove themselves to be trustworthy and cooperative on the reserve, they could then negotiate for an asset teleportation agreement and switch over to that entirely.&#xD;&#xA;&#xD;&#xA;As such, we could in fact think of the reserve asset model as a way to establish a baseline of trust between the source and destination. They could even move into various intermediate arrangements, such as unifying the derivative tokens so that they all get issued by either the source or the destination, instead of having each minting their own derivatives. Whether or not the source and destination will move beyond the reserve asset transfer model is up to them to decide.&#xD;&#xA;&#xD;&#xA;For further reading of XCMs in general, Gavin [has][3] [plenty of][4] [blogposts][5] that describe each component of the XCM in detail. Shawn also [has an excellent video][6] describing how you can craft your first cross-chain messages. Finally, there is also [the XCM specification][7] that is the definitive source of truth on any matters related to XCM.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JLfQp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/PC6Lm.png&#xD;&#xA;  [3]: https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392#cb6d&#xD;&#xA;  [4]: https://medium.com/polkadot-network/xcm-part-ii-versioning-and-compatibility-b313fc257b83&#xD;&#xA;  [5]: https://medium.com/polkadot-network/xcm-part-iii-execution-and-error-management-ceb8155dd166&#xD;&#xA;  [6]: https://www.youtube.com/watch?v=5cgq5jOZx9g&#xD;&#xA;  [7]: https://github.com/paritytech/xcm-format" ContentLicense="CC BY-SA 4.0" />
  <row Id="31341" PostHistoryTypeId="2" PostId="7965" RevisionGUID="08ed4b0c-a539-4959-8b8d-0b62ead1249e" CreationDate="2023-04-06T12:27:09.767" UserId="1793" Text="Okay, it seems that the front-end version of React is incorrect. I tested it by creating a new React application from scratch, and everything is functioning properly." ContentLicense="CC BY-SA 4.0" />
  <row Id="31343" PostHistoryTypeId="2" PostId="7966" RevisionGUID="7679cb4f-428a-4e3b-af26-854e957fed3c" CreationDate="2023-04-06T13:44:39.690" UserId="2762" Text="From the [docs of the pallet][1]:&#xD;&#xA;&#xD;&#xA;&gt; pay_tips: Pay tips, could be used for paying the creator royalties.&#xD;&#xA;&#xD;&#xA;And if you see the code of the [do_pay_tips][2] is basically paying a tip to an Account related to an Item (NFT).&#xD;&#xA;&#xD;&#xA;    let ItemTip { collection, item, receiver, amount } = tip;&#xD;&#xA;	T::Currency::transfer(&amp;sender, &amp;receiver, amount, KeepAlive)?;&#xD;&#xA;&#xD;&#xA;So basically it looks like a system that allows a way to voluntary pay royalties to a creator.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/nfts&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/nfts/src/features/buy_sell.rs#L25" ContentLicense="CC BY-SA 4.0" />
  <row Id="31345" PostHistoryTypeId="5" PostId="7966" RevisionGUID="2b659146-1be7-4ef4-9280-144bd72fdcde" CreationDate="2023-04-06T13:46:48.767" UserId="29" Comment="added 2 characters in body" Text="From the [docs of the pallet][1]:&#xD;&#xA;&#xD;&#xA;&gt; pay_tips: Pay tips, could be used for paying the creator royalties.&#xD;&#xA;&#xD;&#xA;And if you see the code of the [do_pay_tips][2] is basically paying a tip to an Account related to an Item (NFT).&#xD;&#xA;&#xD;&#xA;    let ItemTip { collection, item, receiver, amount } = tip;&#xD;&#xA;	T::Currency::transfer(&amp;sender, &amp;receiver, amount, KeepAlive)?;&#xD;&#xA;&#xD;&#xA;So basically it looks like a system that allows a way to voluntarily pay royalties to a creator.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/nfts&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/nfts/src/features/buy_sell.rs#L25" ContentLicense="CC BY-SA 4.0" />
  <row Id="31346" PostHistoryTypeId="2" PostId="7967" RevisionGUID="2fb80de5-6008-4ff3-a2f0-6da2a749d3c6" CreationDate="2023-04-06T14:17:21.077" UserId="354" Text="I was going through the code of open brush implementation for different tokens, and was confused at a point in PSP22 contract where there is a word written `default`, as shown below&#xD;&#xA;&#xD;&#xA;    default fn _emit_transfer_event(&amp;self, _from: Option&lt;AccountId&gt;, _to: Option&lt;AccountId&gt;, _amount: Balance) {} &#xD;&#xA;which is the implementation of a trait, so here i was not able to understand why `default` word is used.&#xD;&#xA;&#xD;&#xA;Some questions that are in my mind:&#xD;&#xA; - Is it used to as `Default` keyword used in rust or something else?&#xD;&#xA; - Is it defined in open brush to be used by itself?&#xD;&#xA; - If it is defined in open brush please do point to its implementation.&#xD;&#xA;&#xD;&#xA;The reference to the git repo for the same can be find [here][1].&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Supercolony-net/openbrush-contracts/blob/96b556536a9806cb2a0db7a6159a412754ceba9b/contracts/src/token/psp22/psp22.rs#L129-L306" ContentLicense="CC BY-SA 4.0" />
  <row Id="31348" PostHistoryTypeId="1" PostId="7967" RevisionGUID="2fb80de5-6008-4ff3-a2f0-6da2a749d3c6" CreationDate="2023-04-06T14:17:21.077" UserId="354" Text="What is the significance of default in open brush contracts traits implementation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31349" PostHistoryTypeId="3" PostId="7967" RevisionGUID="2fb80de5-6008-4ff3-a2f0-6da2a749d3c6" CreationDate="2023-04-06T14:17:21.077" UserId="354" Text="|polkadot|ink|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31350" PostHistoryTypeId="2" PostId="7968" RevisionGUID="0d4cd274-3175-4e96-9672-0cd0c4e3b23d" CreationDate="2023-04-06T14:41:21.413" UserId="29" Text="You are correct that the node uses a database (ParityDb or RocksDb). However the data in that database is stored as key-value and is opaque where as with substrate-archive the data is stored in a postgres database according to a schema:&#xD;&#xA;- https://github.com/paritytech/substrate-archive/blob/master/SubstrateArchiveSchema.pdf&#xD;&#xA;&#xD;&#xA;And as you can see the data is not opaque.&#xD;&#xA;&#xD;&#xA;Another resource that may be helpful is the README:&#xD;&#xA; - https://github.com/paritytech/substrate-archive#substrate-archive&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31352" PostHistoryTypeId="5" PostId="7188" RevisionGUID="ba5d33fc-f5d9-4f6b-98fa-a5d224a4bcbb" CreationDate="2023-04-06T15:11:11.077" UserId="2025" Comment="Improve wording and tags" Text="I'm using Polkadot version 0.9.37-08b1c09ca46, across 4 Nodes - Alice, Bob, Charlie, Dave, in a local testnet environment. I have a period of network chaos applied, and then moments of stabilized 'happy' network conditions. I came across this logging and wondered if this is expected behaviour or not:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[service_workload]             [I] 2023-02-02 19:20:58        RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1010: Invalid Transaction: Transaction has a bad signature&#xD;&#xA;[service_polkadot_dave]        [I] 2023-02-02 19:20:58 ✨ Imported #38 (0x98cb…fa88)&#xD;&#xA;[service_workload]             [I] RpcError: 1010: Invalid Transaction: Transaction has a bad signature&#xD;&#xA;[service_workload]             [I] at checkError (/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:30:11)&#xD;&#xA;[service_workload]             [I] at RpcCoder.decodeResponse (/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:45:5)&#xD;&#xA;[service_workload]             [I] at WsProvider.value (/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:247:90)&#xD;&#xA;[service_workload]             [I] at W3CWebSocket.value [as onmessage] (/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:230:153)&#xD;&#xA;[service_workload]             [I] at W3CWebSocket._dispatchEvent [as dispatchEvent] (/node_modules/yaeti/lib/EventTarget.js:107:17)&#xD;&#xA;[service_workload]             [I] at W3CWebSocket.onMessage (/node_modules/websocket/lib/W3CWebSocket.js:234:14)&#xD;&#xA;[service_workload]             [I] at WebSocketConnection.&lt;anonymous&gt; (/node_modules/websocket/lib/W3CWebSocket.js:205:19)&#xD;&#xA;[service_workload]             [I] at WebSocketConnection.emit (node:events:513:28)&#xD;&#xA;[service_workload]             [I] at WebSocketConnection.processFrame (/node_modules/websocket/lib/WebSocketConnection.js:554:26)&#xD;&#xA;[service_workload]             [I] at /node_modules/websocket/lib/WebSocketConnection.js:323:40&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The workload script is simply looping, signing and sending DOT to each account. During the network chaos I'm partitioning and causing delays across the network, however during the time this workload attempts to send, no interference is present. Would be interested in your thoughts..." ContentLicense="CC BY-SA 4.0" />
  <row Id="31353" PostHistoryTypeId="4" PostId="7188" RevisionGUID="ba5d33fc-f5d9-4f6b-98fa-a5d224a4bcbb" CreationDate="2023-04-06T15:11:11.077" UserId="2025" Comment="Improve wording and tags" Text="Fuzzing Polkadot produces Invalid Signature after chaos is injected" ContentLicense="CC BY-SA 4.0" />
  <row Id="31354" PostHistoryTypeId="6" PostId="7188" RevisionGUID="ba5d33fc-f5d9-4f6b-98fa-a5d224a4bcbb" CreationDate="2023-04-06T15:11:11.077" UserId="2025" Comment="Improve wording and tags" Text="|polkadot-js|extrinsic|rpc|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31355" PostHistoryTypeId="24" PostId="7188" RevisionGUID="ba5d33fc-f5d9-4f6b-98fa-a5d224a4bcbb" CreationDate="2023-04-06T15:11:11.077" Comment="Proposed by 2025 approved by 251, 34 edit id of 402" ContentLicense="CC BY-SA 4.0" />
  <row Id="31356" PostHistoryTypeId="5" PostId="4874" RevisionGUID="e13d82fd-966c-4d8a-b3c2-cfd3d40ed3e8" CreationDate="2023-04-06T15:11:19.060" UserId="266" Comment="Edit for syntax highlighting and indentation" Text="I could not get the openbrush apporach get to work by using a wrapper.&#xD;&#xA;However I found a low level approach ([here][1]) which works just fine for now.&#xD;&#xA;```rust&#xD;&#xA;let method_selector = [0xDE, 0xAD, 0xBE, 0xEF];&#xD;&#xA;build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;    .call_type(Call::new().callee(self.contract))&#xD;&#xA;    .exec_input(&#xD;&#xA;         ExecutionInput::new(Selector::new(method_selector)))&#xD;&#xA;    .call_flags(CallFlags::default()&#xD;&#xA;    .returns::&lt;()&gt;()&#xD;&#xA;    .fire()&#xD;&#xA;    .unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ink_env/3.0.0-rc3/ink_env/call/fn.build_call.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="31357" PostHistoryTypeId="24" PostId="4874" RevisionGUID="e13d82fd-966c-4d8a-b3c2-cfd3d40ed3e8" CreationDate="2023-04-06T15:11:19.060" Comment="Proposed by 266 approved by 251, 34 edit id of 403" ContentLicense="CC BY-SA 4.0" />
  <row Id="31360" PostHistoryTypeId="2" PostId="7969" RevisionGUID="5faac23b-8fc8-4732-9a83-d1d71af34268" CreationDate="2023-04-06T15:21:51.747" UserId="426" Text="## Code Snippets &amp; Overview&#xD;&#xA;&#xD;&#xA;With the introduction of XCM v3, a new `XcmBaseWeight` was introduced both for **Kusama** and **Polkadot** ([here][1] &amp; [here][2]). The estimate is _64 kB_ per instruction:&#xD;&#xA;&#xD;&#xA;`pub const BaseXcmWeight: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Inside XCM v3 we also have the same constant defined/used:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Default value for the proof size weight component. Set at 64 KB.&#xD;&#xA;const DEFAULT_PROOF_SIZE: u64 = 64 * 1024;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It's used in various contests, but the one I want to highlight is when V2 XCM instructions are converted into V3 instructions. In particular the `BuyExecution` instruction:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Convert from a v2 instruction to a v3 instruction.&#xD;&#xA;impl&lt;Call&gt; TryFrom&lt;OldInstruction&lt;Call&gt;&gt; for Instruction&lt;Call&gt; {&#xD;&#xA;	type Error = ();&#xD;&#xA;	fn try_from(old_instruction: OldInstruction&lt;Call&gt;) -&gt; result::Result&lt;Self, ()&gt; {&#xD;&#xA;		use OldInstruction::*;&#xD;&#xA;		Ok(match old_instruction {&#xD;&#xA;            ...&#xD;&#xA;			BuyExecution { fees, weight_limit } =&gt; Self::BuyExecution {&#xD;&#xA;				fees: fees.try_into()?,&#xD;&#xA;				weight_limit: weight_limit.try_into()?,&#xD;&#xA;			},&#xD;&#xA;            ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Weight limit conversion is done using the following piece of code:&#xD;&#xA;```&#xD;&#xA;impl TryFrom&lt;OldWeightLimit&gt; for WeightLimit {&#xD;&#xA;	type Error = ();&#xD;&#xA;	fn try_from(x: OldWeightLimit) -&gt; result::Result&lt;Self, ()&gt; {&#xD;&#xA;		use OldWeightLimit::*;&#xD;&#xA;		match x {&#xD;&#xA;			Limited(w) =&gt; Ok(Self::Limited(Weight::from_parts(w, DEFAULT_PROOF_SIZE))),&#xD;&#xA;			Unlimited =&gt; Ok(Self::Unlimited),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Scenario&#xD;&#xA;&#xD;&#xA;I've been testing XCM v3 integration with **Astar**/**Shiden**/**Shibuya** runtimes (using `polkadot-v0.9.39` dependencies), and based on the code examples shared above, I naively also updated the unit weight cost of instructions to:&#xD;&#xA;```&#xD;&#xA;pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The scenario which produced an error for me (local `zombienet` setup), one chain is uplifted to use XCM v3, and the other is still on old code revision (XCM v3 not even integrated).&#xD;&#xA;&#xD;&#xA;When using the `reserve_transfer_assets` functionality, from V2 chain, to V3 chain, a _Error::Barrier_ will happen.&#xD;&#xA;&#xD;&#xA;Given the numbers above, it is somehow expected.&#xD;&#xA;* v3 chain receives the v2 instruction sequence&#xD;&#xA;* it converts it into v3 instruction sequence&#xD;&#xA;* v3 `Weigher` will calculate the the required PoV size of the 4 instructions is **256 kB**&#xD;&#xA;* `BuyExecution` will be converted from v2 to v3, and `weight_limit` will end up being **64 kB**&#xD;&#xA;&#xD;&#xA;`AllowTopLevelPaidExecutionFrom` will block the execution, since the amount being bought via `BuyExecution` isn't sufficient enough to cover the weight of 4 instructions.&#xD;&#xA;&#xD;&#xA;## Question&#xD;&#xA;&#xD;&#xA;In case my understanding above is correct (and please correct me if I'm wrong) what would be a good default proof size to choose for instructions?&#xD;&#xA;&#xD;&#xA;I'm assuming we keep the default **64 kB** for the `BuyExecution` v2&lt;&gt;v3 conversion.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/ff7448fd03fd3af2464d4d61ca333998b11ad3df/runtime/kusama/src/xcm_config.rs#L100&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/dc230b323b5baeb9b4297430ed539b208d30bf6a/runtime/polkadot/src/xcm_config.rs#L105" ContentLicense="CC BY-SA 4.0" />
  <row Id="31362" PostHistoryTypeId="1" PostId="7969" RevisionGUID="5faac23b-8fc8-4732-9a83-d1d71af34268" CreationDate="2023-04-06T15:21:51.747" UserId="426" Text="Default proof size for XCM v2&lt;&gt;v3 compatibility" ContentLicense="CC BY-SA 4.0" />
  <row Id="31363" PostHistoryTypeId="3" PostId="7969" RevisionGUID="5faac23b-8fc8-4732-9a83-d1d71af34268" CreationDate="2023-04-06T15:21:51.747" UserId="426" Text="|xcm|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31364" PostHistoryTypeId="2" PostId="7970" RevisionGUID="668cf23a-3760-407a-a49b-8c3b733a0af6" CreationDate="2023-04-06T15:44:48.287" UserId="462" Text="Given a block hash that could be at any height, it's seemingly inefficient to traverse from the tip to the height and then compare if the block hash matches to see whether it's in the canonical chain. We need to simply drop it if the given block hash is not in the canonical chain in our business logic. Is there an efficient way in Substrate to do it without any assumptions(e.g., finality)? If no, with what prerequisites can we achieve it? what's the recommended approach for this goal?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31366" PostHistoryTypeId="1" PostId="7970" RevisionGUID="668cf23a-3760-407a-a49b-8c3b733a0af6" CreationDate="2023-04-06T15:44:48.287" UserId="462" Text="What's the best practice to check whether a block hash is in the canonical chain or not in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31367" PostHistoryTypeId="3" PostId="7970" RevisionGUID="668cf23a-3760-407a-a49b-8c3b733a0af6" CreationDate="2023-04-06T15:44:48.287" UserId="462" Text="|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31370" PostHistoryTypeId="34" PostId="7793" RevisionGUID="e5767128-48b1-4332-88e8-392f8ba9cec1" CreationDate="2023-04-06T19:05:00.620" UserId="-1" Comment="21" />
  <row Id="31371" PostHistoryTypeId="50" PostId="7495" RevisionGUID="4f459236-68fb-4af5-8793-c72c908a7613" CreationDate="2023-04-06T19:05:00.620" UserId="-1" />
  <row Id="31372" PostHistoryTypeId="50" PostId="7513" RevisionGUID="83209c4a-af46-4397-b511-ed377efaa001" CreationDate="2023-04-06T20:06:45.800" UserId="-1" />
  <row Id="31379" PostHistoryTypeId="2" PostId="7973" RevisionGUID="42823c5c-080d-4e29-8981-f622dc04e2c8" CreationDate="2023-04-07T03:06:51.493" UserId="3743" Text="1. In order to make an unsigned transaction you can create an object with the required chain metadata and payload information:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const unsigned = {&#xD;&#xA;          specVersion: specVersion,&#xD;&#xA;          transactionVersion: transactionVersion,&#xD;&#xA;          address: address,&#xD;&#xA;          blockHash: blockHash,&#xD;&#xA;          blockNumber: blockNumber,&#xD;&#xA;          era: api.registry.createType('ExtrinsicEra', {&#xD;&#xA;            current: blockNumber,&#xD;&#xA;            period: 64,&#xD;&#xA;          }),&#xD;&#xA;          genesisHash: genesisHash,&#xD;&#xA;          method: api.tx.balances.transfer(testAcnt1, BigInt(200000000000000000)).method.toHex(),&#xD;&#xA;          nonce: accountNonce,&#xD;&#xA;          signedExtensions: [&#xD;&#xA;            'CheckNonZeroSender',&#xD;&#xA;            'CheckSpecVersion',&#xD;&#xA;            'CheckTxVersion',&#xD;&#xA;            'CheckGenesis',&#xD;&#xA;            'CheckMortality',&#xD;&#xA;            'CheckNonce',&#xD;&#xA;            'CheckWeight',&#xD;&#xA;            'ChargeTransactionPayment',&#xD;&#xA;          ],&#xD;&#xA;          tip: '0x00000000000000000000000000000000',&#xD;&#xA;          version: 4,&#xD;&#xA;      };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Yes, Polkadot uses Schnorrkel/Ristretto x25519 (&quot;sr25519&quot;) as its key derivation and signing algorithm. You can find more information on the hashing algorithm and how keypairs/signing are implemented here https://wiki.polkadot.network/docs/learn-cryptography.&#xD;&#xA;3. The private key of the account is used to sign the tx. The function you can use is `tx.sign(keypair)` passing in a keypair created using the keyring.&#xD;&#xA;4. In addition to the signAsync method which you’ve used in your example, the SubmittableExtrinsic has a `send` as well as `signAndSend` which accepts the from account, additional signer options such as the `signer`, and a status callback which can be used to check the status of the tx and its associated events. More on submitting transactions here: https://polkadot.js.org/docs/extension/cookbook#sign-and-send-a-transaction&#xD;&#xA;5. PolkadotJS doesn’t currently support accessing KeyPair private keys. The polkadot-js extension does allow you to save the private key on account creation in its user interface but there is no programatic way to access the private key on the keyring.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31381" PostHistoryTypeId="5" PostId="7973" RevisionGUID="480f4a5a-c060-4f26-af97-dee6c53a53da" CreationDate="2023-04-07T03:17:31.577" UserId="3743" Comment="added 718 characters in body" Text="1. In order to make an unsigned transaction you can create an object with the required chain metadata and payload information:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// create unsigned transaction payload&#xD;&#xA;const unsigned = {&#xD;&#xA;          specVersion: specVersion,&#xD;&#xA;          transactionVersion: transactionVersion,&#xD;&#xA;          address: address,&#xD;&#xA;          blockHash: blockHash,&#xD;&#xA;          blockNumber: blockNumber,&#xD;&#xA;          era: api.registry.createType('ExtrinsicEra', {&#xD;&#xA;            current: blockNumber,&#xD;&#xA;            period: 64,&#xD;&#xA;          }),&#xD;&#xA;          genesisHash: genesisHash,&#xD;&#xA;          method: api.tx.balances.transfer(testAcnt1, BigInt(200000000000000000)).method.toHex(),&#xD;&#xA;          nonce: accountNonce,&#xD;&#xA;          signedExtensions: [&#xD;&#xA;            'CheckNonZeroSender',&#xD;&#xA;            'CheckSpecVersion',&#xD;&#xA;            'CheckTxVersion',&#xD;&#xA;            'CheckGenesis',&#xD;&#xA;            'CheckMortality',&#xD;&#xA;            'CheckNonce',&#xD;&#xA;            'CheckWeight',&#xD;&#xA;            'ChargeTransactionPayment',&#xD;&#xA;          ],&#xD;&#xA;          tip: '0x00000000000000000000000000000000',&#xD;&#xA;          version: 4,&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;// create an extrinsic payload to sign and get the signature&#xD;&#xA;    const extrinsicPayload = this.registry.createType('ExtrinsicPayload', unsigned, {&#xD;&#xA;      version: unsigned.version&#xD;&#xA;    })&#xD;&#xA;&#xD;&#xA;// get signature by passing your account keypair to the sign method on the extrinsic payload&#xD;&#xA;const signature = extrinsicPayload.sign(keypair);&#xD;&#xA;&#xD;&#xA;// create extrinsic from the unsigned payload&#xD;&#xA;const extrinsic = registry.createType(&#xD;&#xA;		'Extrinsic',&#xD;&#xA;		{ method: unsigned.method },&#xD;&#xA;		{ version: unsigned.version }&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;// with the received signature from the sign method on the ExtrinsicPayload,&#xD;&#xA;	extrinsic.addSignature(unsigned.address, signature, unsigned);&#xD;&#xA;// save the hex&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Yes, Polkadot uses Schnorrkel/Ristretto x25519 (&quot;sr25519&quot;) as its key derivation and signing algorithm. You can find more information on the hashing algorithm and how keypairs/signing are implemented here https://wiki.polkadot.network/docs/learn-cryptography.&#xD;&#xA;3. The private key of the account is used to sign the tx. The function you can use is `tx.sign(keypair)` passing in a keypair created using the keyring.&#xD;&#xA;4. In addition to the signAsync method which you’ve used in your example, the SubmittableExtrinsic has a `send` as well as `signAndSend` which accepts the from account, additional signer options such as the `signer`, and a status callback which can be used to check the status of the tx and its associated events. More on submitting transactions here: https://polkadot.js.org/docs/extension/cookbook#sign-and-send-a-transaction&#xD;&#xA;5. PolkadotJS doesn’t currently support accessing KeyPair private keys. The polkadot-js extension does allow you to save the private key on account creation in its user interface but there is no programatic way to access the private key on the keyring.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31382" PostHistoryTypeId="5" PostId="7973" RevisionGUID="b33b7ae3-23cf-4f97-a638-d42b279828f3" CreationDate="2023-04-07T03:18:52.520" UserId="3743" Comment="added 89 characters in body" Text="1. In order to make an unsigned transaction you can create an object with the required chain metadata and payload information:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// create unsigned transaction payload&#xD;&#xA;const unsigned = {&#xD;&#xA;          specVersion: specVersion,&#xD;&#xA;          transactionVersion: transactionVersion,&#xD;&#xA;          address: address,&#xD;&#xA;          blockHash: blockHash,&#xD;&#xA;          blockNumber: blockNumber,&#xD;&#xA;          era: api.registry.createType('ExtrinsicEra', {&#xD;&#xA;            current: blockNumber,&#xD;&#xA;            period: 64,&#xD;&#xA;          }),&#xD;&#xA;          genesisHash: genesisHash,&#xD;&#xA;          method: api.tx.balances.transfer(testAcnt1, BigInt(200000000000000000)).method.toHex(),&#xD;&#xA;          nonce: accountNonce,&#xD;&#xA;          signedExtensions: [&#xD;&#xA;            'CheckNonZeroSender',&#xD;&#xA;            'CheckSpecVersion',&#xD;&#xA;            'CheckTxVersion',&#xD;&#xA;            'CheckGenesis',&#xD;&#xA;            'CheckMortality',&#xD;&#xA;            'CheckNonce',&#xD;&#xA;            'CheckWeight',&#xD;&#xA;            'ChargeTransactionPayment',&#xD;&#xA;          ],&#xD;&#xA;          tip: '0x00000000000000000000000000000000',&#xD;&#xA;          version: 4,&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;// create an extrinsic payload to sign and get the signature&#xD;&#xA;    const extrinsicPayload = this.registry.createType('ExtrinsicPayload', unsigned, {&#xD;&#xA;      version: unsigned.version&#xD;&#xA;    })&#xD;&#xA;&#xD;&#xA;// get signature by passing your account keypair to the sign method on the extrinsic payload&#xD;&#xA;const signature = extrinsicPayload.sign(keypair);&#xD;&#xA;&#xD;&#xA;// create extrinsic from the unsigned payload&#xD;&#xA;const extrinsic = registry.createType(&#xD;&#xA;		'Extrinsic',&#xD;&#xA;		{ method: unsigned.method },&#xD;&#xA;		{ version: unsigned.version }&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;// with the received signature from the sign method on the ExtrinsicPayload,&#xD;&#xA;	extrinsic.addSignature(unsigned.address, signature, unsigned);&#xD;&#xA;&#xD;&#xA;// save the hex of the signed extrinsic to later send to the public node&#xD;&#xA;const hex = extrinsic.toHex();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Yes, Polkadot uses Schnorrkel/Ristretto x25519 (&quot;sr25519&quot;) as its key derivation and signing algorithm. You can find more information on the hashing algorithm and how keypairs/signing are implemented here https://wiki.polkadot.network/docs/learn-cryptography.&#xD;&#xA;3. The private key of the account is used to sign the tx. The function you can use is `tx.sign(keypair)` passing in a keypair created using the keyring.&#xD;&#xA;4. In addition to the signAsync method which you’ve used in your example, the SubmittableExtrinsic has a `send` as well as `signAndSend` which accepts the from account, additional signer options such as the `signer`, and a status callback which can be used to check the status of the tx and its associated events. More on submitting transactions here: https://polkadot.js.org/docs/extension/cookbook#sign-and-send-a-transaction&#xD;&#xA;5. PolkadotJS doesn’t currently support accessing KeyPair private keys. The polkadot-js extension does allow you to save the private key on account creation in its user interface but there is no programatic way to access the private key on the keyring.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31385" PostHistoryTypeId="2" PostId="7975" RevisionGUID="60cd2df3-6f05-4f8b-86a9-5e12740d12f4" CreationDate="2023-04-07T08:03:43.880" UserId="3947" Text="I think we can check it this way: &#xD;&#xA;&#xD;&#xA;1. query the block_number corresponding to the block hash and if you get reply with a valid( say b) block_number then its a sign that the network is keeping that block and is a part of the canonical chain. &#xD;&#xA;&#xD;&#xA;2. just to be sure that canonical chain is finalized query the block_number of the latest finalized block(say latest_finalised_block_number) on chain. And if the b &lt; latest_finalised_block_number then the the block b is in finalized chain. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31387" PostHistoryTypeId="2" PostId="7976" RevisionGUID="a9d07f4f-1522-4b99-a2fc-69ccbb928c60" CreationDate="2023-04-07T08:36:44.227" UserId="29" Text="In the try-runtime [documentation](https://paritytech.github.io/substrate/master/try_runtime_cli/index.html), there is note of a [follow-chain](https://paritytech.github.io/substrate/master/try_runtime_cli/enum.Command.html#variant.FollowChain) subcommand which follows the given chain’s finalized blocks and apply all of its extrinsics.&#xD;&#xA;&#xD;&#xA;There are also some examples [here](https://paritytech.github.io/substrate/master/try_runtime_cli/index.html#examples).&#xD;&#xA;&#xD;&#xA;I would like a step-by-step instruction of how to use try-runtime's follow-chain subcommand." ContentLicense="CC BY-SA 4.0" />
  <row Id="31389" PostHistoryTypeId="1" PostId="7976" RevisionGUID="a9d07f4f-1522-4b99-a2fc-69ccbb928c60" CreationDate="2023-04-07T08:36:44.227" UserId="29" Text="How to use the follow-chain subcommand in try-runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31390" PostHistoryTypeId="3" PostId="7976" RevisionGUID="a9d07f4f-1522-4b99-a2fc-69ccbb928c60" CreationDate="2023-04-07T08:36:44.227" UserId="29" Text="|testing|try-runtime|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31391" PostHistoryTypeId="2" PostId="7977" RevisionGUID="3a39c4ba-70dc-4818-8570-bcad5b365729" CreationDate="2023-04-07T08:36:44.227" UserId="29" Text="&#xD;&#xA;Clone repo:&#xD;&#xA;```&#xD;&#xA;git clone https://github.com/paritytech/substrate&#xD;&#xA;cd substrate&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Run a dev chain locally. This is the chain that I want to &quot;follow&quot;:&#xD;&#xA;```&#xD;&#xA;cargo b -r&#xD;&#xA;cp target/release/node-template .&#xD;&#xA;./node-template --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Compile with try-runtime:&#xD;&#xA;```&#xD;&#xA;cargo b -r --features=try-runtime&#xD;&#xA;cp target/release/node-template node-template-try-runtime&#xD;&#xA;cp target/release/wbuild/node-template-runtime/node_template_runtime.wasm runtime-try-runtime.wasm&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Run the `follow-chain` subcommand:&#xD;&#xA;```&#xD;&#xA;./node-template-try-runtime \&#xD;&#xA;    try-runtime \&#xD;&#xA;    --runtime runtime-try-runtime.wasm \ &#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    follow-chain \&#xD;&#xA;    --uri ws://localhost:9944&#xD;&#xA;```&#xD;&#xA;You will get beautiful output like the following:&#xD;&#xA;```&#xD;&#xA;./node-template-try-runtime try-runtime --runtime runtime-try-runtime.wasm -lruntime=debug follow-chain --uri ws://localhost:9944&#xD;&#xA;2023-04-07 10:15:39.620  INFO main try-runtime::cli: subscribing to &quot;chain_subscribeFinalizedHeads&quot; / &quot;chain_unsubscribeFinalizedHeads&quot;    &#xD;&#xA;2023-04-07 10:15:39.633  INFO main remote-ext: since no prefix is filtered, the data for all pallets will be downloaded    &#xD;&#xA;2023-04-07 10:15:39.635  INFO main remote-ext: scraping key-pairs from remote at block height 0xb651c240a9b85a0ba7fb7fa297f55c954606264cc4733ebd34249aa3c2a2b95c    &#xD;&#xA;2023-04-07 10:15:39.636  INFO main remote-ext: adding data for hashed prefix: 3a6368696c645f73746f726167653a64656661756c743a, took 0s    &#xD;&#xA;2023-04-07 10:15:39.636  INFO main remote-ext: Querying a total of 42 keys from prefix , splitting among 10 threads, 5 keys per thread    &#xD;&#xA;2023-04-07 10:15:39.642  INFO main remote-ext: adding data for hashed prefix: , took 0s    &#xD;&#xA;2023-04-07 10:15:39.642  INFO main remote-ext: adding data for hashed key: 3a636f6465    &#xD;&#xA;2023-04-07 10:15:39.645  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    &#xD;&#xA;2023-04-07 10:15:39.645  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    &#xD;&#xA;2023-04-07 10:15:39.645  INFO main remote-ext: initialized state externalities with storage root 0x7687476066905904caba95c9cfb119793ef4d9d36f36bd7d317ee603b3e76186 and state_version V1    &#xD;&#xA;2023-04-07 10:15:39.659  INFO main try-runtime::cli: original spec: RuntimeString::Owned(&quot;node-template&quot;)-100, code hash: 9fd0a02fb6e725221ae379fc4d13929c26b90efb4d817d46d7fd64274dd7bb7d    &#xD;&#xA;2023-04-07 10:15:39.666  INFO main try-runtime::cli: new spec: RuntimeString::Owned(&quot;node-template&quot;)-100, code hash: 4516ccbbd02187bd17a18098c644e3723741d7f30cb75faef2974f389356f6dc    &#xD;&#xA;2023-04-07 10:15:39.782  INFO main runtime::executive: try-runtime: executing block #11 / state root check: false / signature check: true / try-state-select: All    &#xD;&#xA;2023-04-07 10:15:39.783 DEBUG main runtime::frame-support:  try-state pallet &quot;System&quot;    &#xD;&#xA;2023-04-07 10:15:39.783 DEBUG main runtime::frame-support:  try-state pallet &quot;Timestamp&quot;    &#xD;&#xA;2023-04-07 10:15:39.783 DEBUG main runtime::frame-support:  try-state pallet &quot;Aura&quot;    &#xD;&#xA;2023-04-07 10:15:39.783 DEBUG main runtime::frame-support:  try-state pallet &quot;Grandpa&quot;    &#xD;&#xA;2023-04-07 10:15:39.783 DEBUG main runtime::frame-support:  try-state pallet &quot;Balances&quot;    &#xD;&#xA;2023-04-07 10:15:39.783 DEBUG main runtime::frame-support:  try-state pallet &quot;TransactionPayment&quot;    &#xD;&#xA;2023-04-07 10:15:39.783 DEBUG main runtime::frame-support:  try-state pallet &quot;Sudo&quot;    &#xD;&#xA;2023-04-07 10:15:39.783 DEBUG main runtime::frame-support:  try-state pallet &quot;TemplateModule&quot;    &#xD;&#xA;2023-04-07 10:15:39.783 DEBUG main runtime::system: [11] 0 extrinsics, length: 11 (normal 0%, op: 0%, mandatory 0%) / normal weight:Weight(ref_time: 0, proof_size: 0) (0%) op weight Weight(ref_time: 0, proof_size: 0) (0%) / mandatory weight Weight(ref_time: 839311000, proof_size: 2986) (0%)    &#xD;&#xA;2023-04-07 10:15:39.785  INFO main try-runtime::cli: executed block 11, consumed weight Weight(ref_time: 839311000, proof_size: 2986), new storage root 0x0dc5e9cebb0cc37a19c9a9285e3102a2977509566c5d96dddbf4dee0e48fef23    &#xD;&#xA;2023-04-07 10:15:44.019  INFO main runtime::executive: try-runtime: executing block #12 / state root check: false / signature check: true / try-state-select: All    &#xD;&#xA;2023-04-07 10:15:44.020 DEBUG main runtime::frame-support:  try-state pallet &quot;System&quot;    &#xD;&#xA;2023-04-07 10:15:44.020 DEBUG main runtime::frame-support:  try-state pallet &quot;Timestamp&quot;    &#xD;&#xA;2023-04-07 10:15:44.020 DEBUG main runtime::frame-support:  try-state pallet &quot;Aura&quot;    &#xD;&#xA;2023-04-07 10:15:44.020 DEBUG main runtime::frame-support:  try-state pallet &quot;Grandpa&quot;    &#xD;&#xA;2023-04-07 10:15:44.020 DEBUG main runtime::frame-support:  try-state pallet &quot;Balances&quot;    &#xD;&#xA;2023-04-07 10:15:44.020 DEBUG main runtime::frame-support:  try-state pallet &quot;TransactionPayment&quot;    &#xD;&#xA;2023-04-07 10:15:44.020 DEBUG main runtime::frame-support:  try-state pallet &quot;Sudo&quot;    &#xD;&#xA;2023-04-07 10:15:44.020 DEBUG main runtime::frame-support:  try-state pallet &quot;TemplateModule&quot;    &#xD;&#xA;2023-04-07 10:15:44.020 DEBUG main runtime::system: [12] 0 extrinsics, length: 11 (normal 0%, op: 0%, mandatory 0%) / normal weight:Weight(ref_time: 0, proof_size: 0) (0%) op weight Weight(ref_time: 0, proof_size: 0) (0%) / mandatory weight Weight(ref_time: 839311000, proof_size: 2986) (0%)    &#xD;&#xA;2023-04-07 10:15:44.021  INFO main try-runtime::cli: executed block 12, consumed weight Weight(ref_time: 839311000, proof_size: 2986), new storage root 0x7f335319d53bae574dbebff262b28c02825b9c945f2e40eac472e9980758c656    &#xD;&#xA;```&#xD;&#xA;And you can see that this will continuously follow the chain!" ContentLicense="CC BY-SA 4.0" />
  <row Id="31393" PostHistoryTypeId="2" PostId="7978" RevisionGUID="95d9951c-bebe-4e75-a56c-6dd0cd408580" CreationDate="2023-04-07T09:53:14.817" UserId="4061" Text="https://github.com/paritytech/substrate/blob/d443f148ce0aa6a51798b86c6b3ae54113786f94/primitives/core/src/crypto.rs#L584-L595&#xD;&#xA;&#xD;&#xA;Why not implement the sp_std::fmt::Debug for AccountId32 in non-std like in std?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31395" PostHistoryTypeId="1" PostId="7978" RevisionGUID="95d9951c-bebe-4e75-a56c-6dd0cd408580" CreationDate="2023-04-07T09:53:14.817" UserId="4061" Text="Why not implement the sp_std::fmt::Debug for AccountId32 in non-std" ContentLicense="CC BY-SA 4.0" />
  <row Id="31396" PostHistoryTypeId="3" PostId="7978" RevisionGUID="95d9951c-bebe-4e75-a56c-6dd0cd408580" CreationDate="2023-04-07T09:53:14.817" UserId="4061" Text="|no-std|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31397" PostHistoryTypeId="2" PostId="7979" RevisionGUID="78e05b58-6d01-4d2b-b9d1-03c49dc979b8" CreationDate="2023-04-07T12:08:22.353" UserId="567" Text="[specialization](https://github.com/rust-lang/rfcs/pull/1210) is Rust feature that allows you to override a default implementation (if the `method` or `impl` is &quot;specialized&quot; with the [default](https://github.com/rust-lang/rfcs/blob/master/text/1210-impl-specialization.md#the-default-keyword) keyword). It's like `virtual` in c# and C++&#xD;&#xA;&#xD;&#xA;So you define a Trait and a generic implementation in a crate and within the contract you implement this Trait. If this impl block is empty {}, *specialization* will implement the most specific implementation, which is the one you defined in the file. Every generic implementation in Openbrush (PSP22, PSP34, ..) uses the `default` keyword that makes these functions **overrideable**.&#xD;&#xA;&#xD;&#xA;without the `default` keyword you can not *override* the function body when implementing the Trait" ContentLicense="CC BY-SA 4.0" />
  <row Id="31399" PostHistoryTypeId="2" PostId="7980" RevisionGUID="88476e65-4494-4d9a-b289-d91405eabc08" CreationDate="2023-04-07T14:58:10.407" UserId="3317" Text="While trying out my contract I get the error: [`TooManyTopics`][1], what is wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/72dd574acf805fda1dc1e64b7bbd510e12a81312/frame/contracts/src/lib.rs#L817-L818" ContentLicense="CC BY-SA 4.0" />
  <row Id="31401" PostHistoryTypeId="1" PostId="7980" RevisionGUID="88476e65-4494-4d9a-b289-d91405eabc08" CreationDate="2023-04-07T14:58:10.407" UserId="3317" Text="What does error `TooManyTopics` mean?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31402" PostHistoryTypeId="3" PostId="7980" RevisionGUID="88476e65-4494-4d9a-b289-d91405eabc08" CreationDate="2023-04-07T14:58:10.407" UserId="3317" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31403" PostHistoryTypeId="2" PostId="7981" RevisionGUID="1b7db2d7-f3d3-4bf4-aa60-ef2870a62e14" CreationDate="2023-04-07T14:58:10.407" UserId="3317" Text="You can have max. 4 [`#[ink(topic)]`][1] in an `#[ink(event)]`. The signature of the event, however, is by default one of the topics of the event so that leaves 3. Except if you annotate the event with `#[ink(anonymous)]` ([ref][2]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/macros-attributes/topic&#xD;&#xA;  [2]: https://use.ink/basics/events" ContentLicense="CC BY-SA 4.0" />
  <row Id="31405" PostHistoryTypeId="5" PostId="7973" RevisionGUID="def0f664-ca86-447f-814f-acd6a276a37a" CreationDate="2023-04-07T15:51:59.893" UserId="3743" Comment="added 1 character in body" Text="1. In order to make an unsigned transaction you can create an object with the required chain metadata and payload information:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// create unsigned transaction payload&#xD;&#xA;const unsigned = {&#xD;&#xA;          specVersion: specVersion,&#xD;&#xA;          transactionVersion: transactionVersion,&#xD;&#xA;          address: address,&#xD;&#xA;          blockHash: blockHash,&#xD;&#xA;          blockNumber: blockNumber,&#xD;&#xA;          era: api.registry.createType('ExtrinsicEra', {&#xD;&#xA;            current: blockNumber,&#xD;&#xA;            period: 64,&#xD;&#xA;          }),&#xD;&#xA;          genesisHash: genesisHash,&#xD;&#xA;          method: api.tx.balances.transfer(testAcnt1, BigInt(200000000000000000)).method.toHex(),&#xD;&#xA;          nonce: accountNonce,&#xD;&#xA;          signedExtensions: [&#xD;&#xA;            'CheckNonZeroSender',&#xD;&#xA;            'CheckSpecVersion',&#xD;&#xA;            'CheckTxVersion',&#xD;&#xA;            'CheckGenesis',&#xD;&#xA;            'CheckMortality',&#xD;&#xA;            'CheckNonce',&#xD;&#xA;            'CheckWeight',&#xD;&#xA;            'ChargeTransactionPayment',&#xD;&#xA;          ],&#xD;&#xA;          tip: '0x00000000000000000000000000000000',&#xD;&#xA;          version: 4,&#xD;&#xA;      };&#xD;&#xA;&#xD;&#xA;// create an extrinsic payload to sign and get the signature&#xD;&#xA;    const extrinsicPayload = this.registry.createType('ExtrinsicPayload', unsigned, {&#xD;&#xA;      version: unsigned.version&#xD;&#xA;    })&#xD;&#xA;&#xD;&#xA;// get signature by passing your account keypair to the sign method on the extrinsic payload&#xD;&#xA;const signature = extrinsicPayload.sign(keypair);&#xD;&#xA;&#xD;&#xA;// create extrinsic from the unsigned payload&#xD;&#xA;const extrinsic = registry.createType(&#xD;&#xA;		'Extrinsic',&#xD;&#xA;		{ method: unsigned.method },&#xD;&#xA;		{ version: unsigned.version }&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;// with the received signature from the sign method on the ExtrinsicPayload,&#xD;&#xA;	extrinsic.addSignature(unsigned.address, signature, unsigned);&#xD;&#xA;&#xD;&#xA;// save the hex of the signed extrinsic to later send to the public node&#xD;&#xA;const hex = extrinsic.toHex();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Yes, Polkadot uses Schnorrkel/Ristretto x25519 (&quot;sr25519&quot;) as its key derivation and signing algorithm. You can find more information on the hashing algorithm and how keypairs/signing are implemented here https://wiki.polkadot.network/docs/learn-cryptography.&#xD;&#xA;3. The private key of the account is used to sign the tx. The function you can use is `tx.sign(keypair)` passing in a keypair created using the keyring.&#xD;&#xA;4. In addition to the signAsync method which you’ve used in your example, the SubmittableExtrinsic has a `send` as well as `signAndSend` which accepts the from account, additional signer options such as the `signer`, and a status callback which can be used to check the status of the tx and its associated events. More on submitting transactions here: https://polkadot.js.org/docs/extension/cookbook#sign-and-send-a-transaction&#xD;&#xA;5. PolkadotJS doesn’t currently support accessing KeyPair private keys. The polkadot-js extension does allow you to save the private key on account creation in its user interface but there is no programmatic way to access the private key on the keyring.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31408" PostHistoryTypeId="2" PostId="7982" RevisionGUID="1d126edd-4c1b-484f-b8f3-4755d0b9e663" CreationDate="2023-04-07T21:18:23.230" UserId="29" Text="Yes this issue has been fixed with this PR:&#xD;&#xA;- https://github.com/paritytech/polkadot/pull/5451&#xD;&#xA;&#xD;&#xA;You will want to remove the lock:&#xD;&#xA;```rust&#xD;&#xA;/// Remove a manager lock from a para. This will allow the manager of a&#xD;&#xA;/// previously locked para to deregister or swap a para without using governance.&#xD;&#xA;///&#xD;&#xA;/// Can only be called by the Root origin or the parachain.&#xD;&#xA;#[pallet::call_index(4)]&#xD;&#xA;#[pallet::weight(T::DbWeight::get().reads_writes(1, 1))]&#xD;&#xA;pub fn remove_lock(origin: OriginFor&lt;T&gt;, para: ParaId) -&gt; DispatchResult {&#xD;&#xA;	Self::ensure_root_or_para(origin, para)?;&#xD;&#xA;	&lt;Self as Registrar&gt;::remove_lock(para);&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So you can then call the `deregister` and get your deposit back:&#xD;&#xA;```rust&#xD;&#xA;/// Deregister a Para Id, freeing all data and returning any deposit.&#xD;&#xA;///&#xD;&#xA;/// The caller must be Root, the `para` owner, or the `para` itself. The para must be a parathread.&#xD;&#xA;#[pallet::call_index(2)]&#xD;&#xA;#[pallet::weight(&lt;T as Config&gt;::WeightInfo::deregister())]&#xD;&#xA;pub fn deregister(origin: OriginFor&lt;T&gt;, id: ParaId) -&gt; DispatchResult {&#xD;&#xA;	Self::ensure_root_para_or_owner(origin, id)?;&#xD;&#xA;	Self::do_deregister(id)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31410" PostHistoryTypeId="2" PostId="7983" RevisionGUID="dec09f60-ecb9-40aa-8a1c-23bbf3a35368" CreationDate="2023-04-07T21:46:37.530" UserId="73" Text="This was done to reduce the size of the wasm runtime.&#xD;&#xA;&#xD;&#xA;However, it could probably be revisited on what are the gains of not having them in wasm. " ContentLicense="CC BY-SA 4.0" />
  <row Id="31412" PostHistoryTypeId="6" PostId="7978" RevisionGUID="b254a84d-ca1e-49cc-be99-b60521e1a1b1" CreationDate="2023-04-07T21:46:57.687" UserId="73" Comment="edited tags" Text="|frame|no-std|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31413" PostHistoryTypeId="52" PostId="7980" RevisionGUID="78be40c7-279b-4aad-a40e-f78d11830fe9" CreationDate="2023-04-07T22:58:21.583" />
  <row Id="31417" PostHistoryTypeId="2" PostId="7984" RevisionGUID="3486f782-d1ee-4d40-8a54-eb47c54cfc90" CreationDate="2023-04-08T14:19:53.400" UserId="14" Text="I'm trying to pass some custom error messages to the `frame_system::note_applied_extrinsic()` but it seems to be ignoring my message and always using an empty string &quot;&quot;.&#xD;&#xA;&#xD;&#xA;Adding this test to the `pallet-template` `test.rs` I am able to reproduce it:&#xD;&#xA;```&#xD;&#xA;use crate::{mock::*, Error, Event};&#xD;&#xA;use frame_support::{assert_noop, assert_ok};&#xD;&#xA;use frame_support::dispatch::{DispatchErrorWithPostInfo, DispatchInfo, Pays, PostDispatchInfo, Weight};&#xD;&#xA;use sp_runtime::DispatchError;&#xD;&#xA;use sp_runtime::transaction_validity::{InvalidTransaction, TransactionValidityError};&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn other_dispatch_error_not_working() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		let e = DispatchError::Other(TransactionValidityError::Invalid(InvalidTransaction::Payment).into());&#xD;&#xA;		let d = Err(DispatchErrorWithPostInfo {&#xD;&#xA;			post_info: PostDispatchInfo { actual_weight: None, pays_fee: Pays::Yes },&#xD;&#xA;			error: e,&#xD;&#xA;		});&#xD;&#xA;		let dispatch_info = DispatchInfo { weight: Weight::zero(), ..Default::default() };&#xD;&#xA;&#xD;&#xA;		System::set_block_number(1);&#xD;&#xA;		System::note_applied_extrinsic(&amp;d, dispatch_info);&#xD;&#xA;&#xD;&#xA;		let last_events = System::events();&#xD;&#xA;&#xD;&#xA;		let err_msg = match last_events[0].event {&#xD;&#xA;			RuntimeEvent::System(frame_system::Event::ExtrinsicFailed { dispatch_error: e, dispatch_info: _ }) =&gt; Some(e),&#xD;&#xA;			_ =&gt; None,&#xD;&#xA;		};&#xD;&#xA;		assert_eq!(Some(e), err_msg);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the `cargo t -p pallet-template` output:&#xD;&#xA;```&#xD;&#xA;---- tests::other_dispatch_error_not_working stdout ----&#xD;&#xA;thread 'tests::other_dispatch_error_not_working' panicked at 'assertion failed: `(left == right)`&#xD;&#xA;  left: `Some(Other(&quot;Inability to pay some fees (e.g. account balance too low)&quot;))`,&#xD;&#xA; right: `Some(Other(&quot;&quot;))`', bin/node-template/pallets/template/src/tests.rs:51:9&#xD;&#xA;note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, why `frame_system` is &quot;ignoring&quot; the `Some(Other(&quot;Inability to pay some fees (e.g. account balance too low)&quot;))`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31419" PostHistoryTypeId="1" PostId="7984" RevisionGUID="3486f782-d1ee-4d40-8a54-eb47c54cfc90" CreationDate="2023-04-08T14:19:53.400" UserId="14" Text="DispatchError::Other(_) always being mapped to DispatchError::Other(&quot;&quot;)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31420" PostHistoryTypeId="3" PostId="7984" RevisionGUID="3486f782-d1ee-4d40-8a54-eb47c54cfc90" CreationDate="2023-04-08T14:19:53.400" UserId="14" Text="|frame|error|events|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31430" PostHistoryTypeId="2" PostId="7988" RevisionGUID="4b30564b-4b55-4c63-ad62-044878d1af7f" CreationDate="2023-04-08T18:25:10.987" UserId="167" Text="The reason goes back to the fact that [`DispatchError::Other`](https://paritytech.github.io/substrate/master/sp_runtime/enum.DispatchError.html#variant.Other) has a special annotation that nullifies the encoding of the inner `&amp;'static str`: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub enum DispatchError {&#xD;&#xA;	/// Some error occurred.&#xD;&#xA;	Other(&#xD;&#xA;		#[codec(skip)]&#xD;&#xA;		#[cfg_attr(feature = &quot;std&quot;, serde(skip_deserializing))]&#xD;&#xA;		&amp;'static str,&#xD;&#xA;	),&#xD;&#xA;    ...&#xD;&#xA;} &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And, because in the code path that you have shown, we write the `DispatchError` as a part of `System::events` into storage, we `encode`/`decode` it, which causes the inner string to be &quot;lost&quot; in the process.&#xD;&#xA;&#xD;&#xA;The underlying reason for this is to save space in the wasm blob, and in the events vector, among a few others places. Moreover, `DispatchError::Other` is rarely used from within FRAME, given that most pallets use a custom `enum Error`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31434" PostHistoryTypeId="50" PostId="6058" RevisionGUID="bacfc86e-5da8-47b9-ac7a-f66525defa82" CreationDate="2023-04-09T01:00:25.057" UserId="-1" />
  <row Id="31435" PostHistoryTypeId="2" PostId="7989" RevisionGUID="47ad396a-9ed3-49c0-9392-08597c03e1b2" CreationDate="2023-04-09T04:39:05.890" UserId="2722" Text="Hello Substrate and Polkadot community,&#xD;&#xA;&#xD;&#xA;I am working on creating a decentralized exchange (DEX) using Substrate pallets and I've encountered an issue related to transferring tokens from the contract owner to the pallet address.&#xD;&#xA;&#xD;&#xA;To add liquidity for a token pair (e.g., XXX/USDT) in my DEX, users need to provide the contract address of the token (e.g., XXX). Before initiating the transfer, I want to ensure that the user is indeed the owner of the contract. Once the ownership is verified, I need to transfer tokens from the contract address (e.g., 5xsdf6s5d4f6sd4f65sd4fs65df46s5d4f6s5d4f) to the pallet address.&#xD;&#xA;&#xD;&#xA;Could anyone provide guidance or sample code on how to achieve this token transfer from the contract owner to the pallet address while ensuring the user is the actual owner of the contract?&#xD;&#xA;&#xD;&#xA;Any help or suggestions would be greatly appreciated. Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="31437" PostHistoryTypeId="1" PostId="7989" RevisionGUID="47ad396a-9ed3-49c0-9392-08597c03e1b2" CreationDate="2023-04-09T04:39:05.890" UserId="2722" Text="Transferring tokens from contract owner to pallet address in a Substrate-based DEX" ContentLicense="CC BY-SA 4.0" />
  <row Id="31438" PostHistoryTypeId="3" PostId="7989" RevisionGUID="47ad396a-9ed3-49c0-9392-08597c03e1b2" CreationDate="2023-04-09T04:39:05.890" UserId="2722" Text="|substrate-node-template|substrate-parachain-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31439" PostHistoryTypeId="2" PostId="7990" RevisionGUID="2db6b735-52ec-4393-974e-a72476ed7daf" CreationDate="2023-04-09T13:15:18.840" UserId="2722" Text="I'm trying to use orml-tokens in my Substrate project and encountered the following error:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        error[E0603]: module `group` is private&#xD;&#xA;         --&gt; /home/kianoush/.cargo/registry/src/github.com-1ecc6299db9ec823/frame-support-procedural-tools-3.0.0/src/syn_ext.rs:47:53&#xD;&#xA;          |&#xD;&#xA;      47  |                 let syn::group::$name { token, content } = syn::group::$parse(input)?;&#xD;&#xA;          |                                                                 ^^^^^ private module&#xD;&#xA;          |&#xD;&#xA;      note: the module `group` is defined here&#xD;&#xA;         --&gt; /home/kianoush/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.109/src/lib.rs:308:1&#xD;&#xA;          |&#xD;&#xA;      308 | mod group;&#xD;&#xA;          | ^^^^^^^^^&#xD;&#xA;    &#xD;&#xA;    error[E0603]: module `group` is private&#xD;&#xA;         --&gt; /home/kianoush/.cargo/registry/src/github.com-1ecc6299db9ec823/frame-support-procedural-tools-3.0.0/src/syn_ext.rs:47:14&#xD;&#xA;          |&#xD;&#xA;      47  |                 let syn::group::$name { token, content } = syn::group::$parse(input)?;&#xD;&#xA;          |                          ^^^^^ private module&#xD;&#xA;          |&#xD;&#xA;      note: the module `group` is defined here&#xD;&#xA;         --&gt; /home/kianoush/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.109/src/lib.rs:308:1&#xD;&#xA;          |&#xD;&#xA;      308 | mod group;&#xD;&#xA;          | ^^^^^^^^^&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm using frame-support-procedural-tools v3.0.0 How can I resolve this issue? Are there any workarounds or specific dependency versions I should use to avoid this error?&#xD;&#xA;&#xD;&#xA;**Using rustc version: rustc 1.68.0-nightly (574b64a97 2022-12-31)**" ContentLicense="CC BY-SA 4.0" />
  <row Id="31441" PostHistoryTypeId="1" PostId="7990" RevisionGUID="2db6b735-52ec-4393-974e-a72476ed7daf" CreationDate="2023-04-09T13:15:18.840" UserId="2722" Text="How to fix &quot;module group is private&quot; error when using frame-support-procedural-tools v3.0.0?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31442" PostHistoryTypeId="3" PostId="7990" RevisionGUID="2db6b735-52ec-4393-974e-a72476ed7daf" CreationDate="2023-04-09T13:15:18.840" UserId="2722" Text="|polkadot-js|substrate-node-template|rust|orml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31443" PostHistoryTypeId="50" PostId="7564" RevisionGUID="31648aca-0d55-49d2-8a3c-421c12677352" CreationDate="2023-04-09T14:07:55.940" UserId="-1" />
  <row Id="31444" PostHistoryTypeId="2" PostId="7991" RevisionGUID="692512eb-0c89-4a28-8182-d2b50f441d61" CreationDate="2023-04-09T14:45:46.300" UserId="73" Text="Back in the old days the error was just a string, that we also did not stored on chain. Then FRAME added support for custom pallet errors. To stay compatible with th old code the `Other` variant was introduced that can be constructed from a `&amp;'static str`. As Kian already said we don't store the string on chain to not &quot;pollute&quot; the state. While events are deleted at the beginning of each new block, archive nodes still store them for each block.&#xD;&#xA;&#xD;&#xA;To solve your problem, you should start using a custom error variant and then you can check for it in your test. " ContentLicense="CC BY-SA 4.0" />
  <row Id="31446" PostHistoryTypeId="2" PostId="7992" RevisionGUID="55ba881b-9243-448b-9167-5b3eddd85322" CreationDate="2023-04-09T15:05:45.413" UserId="4067" Text="I recently ran into issues with working on my substrate-node-template.&#xD;&#xA;&#xD;&#xA;i had this issue as mentioned here:&#xD;&#xA;&#xD;&#xA; - https://substrate.stackexchange.com/questions/7714/cannot-run-substrate-on-a-fresh-macbook-m2&#xD;&#xA; - or here:&#xD;&#xA;https://substrate.stackexchange.com/questions/7939/substrate-node-template-does-not-start&#xD;&#xA; - or here: https://github.com/paritytech/substrate/issues/13822&#xD;&#xA; - or here: https://github.com/paritytech/substrate/issues/13636&#xD;&#xA;&#xD;&#xA;and as far I found out, the error I am running into are related to:&#xD;&#xA;https://github.com/paritytech/subport/issues/32#issuecomment-1493893071&#xD;&#xA;and should be fixed by:&#xD;&#xA;https://github.com/paritytech/substrate/pull/13804&#xD;&#xA;&#xD;&#xA;so, these errors are addressed, but I think something is still not right.&#xD;&#xA;&#xD;&#xA;I explain my error here:&#xD;&#xA;&#xD;&#xA;and I was able to get the vanilla substrate-node-template working after downgrading with:&#xD;&#xA;```&#xD;&#xA;rustup install 1.68.0&#xD;&#xA;rustup default 1.68.0&#xD;&#xA;&#xD;&#xA;rustup toolchain install nightly-2023-01-30&#xD;&#xA;rustup target add wasm32-unknown-unknown --toolchain nightly-2023-01-30&#xD;&#xA;rustup override set nightly-2023-01-30&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So far, I get the vanilla substrate-node-template running by following the tutorial.&#xD;&#xA;But when I try to clone the repository while changing the root folder name from substrate-node-template to example-chain-devnet the node is not starting and is still get the error code: &#xD;&#xA;&#xD;&#xA;```mynick@myMACHINE:~/example-chain-devnet$ ./target/release/node-template --dev&#xD;&#xA;2023-04-09 16:20:53 Substrate Node&#xD;&#xA;2023-04-09 16:20:53 ✌️  version 4.0.0-dev-d9063560dce&#xD;&#xA;2023-04-09 16:20:53 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2023&#xD;&#xA;2023-04-09 16:20:53  Chain specification: Development&#xD;&#xA;2023-04-09 16:20:53   Node name: lacking-hose-6088&#xD;&#xA;2023-04-09 16:20:53  Role: AUTHORITY&#xD;&#xA;2023-04-09 16:20:53  Database: RocksDb at /tmp/substrate4iUG4H/chains/dev/db/full&#xD;&#xA;2023-04-09 16:20:53 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-04-09 16:20:53 Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I know that the node can normally run with another called root folder then &quot;substrate-node-template&quot; because i was already working on substrate-node-templates which I modified.&#xD;&#xA;&#xD;&#xA;At current point, I am unable to start any of my previous work (modified substrate-node-templates). (Build is failing with UnknownOpcode(192))&#xD;&#xA;&#xD;&#xA;I can only git clone the substrate node template and then apply my changes to the chainspec.rs without being able to rename the root folder.&#xD;&#xA;&#xD;&#xA;Does anybody experience the same or know what i am doing wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31448" PostHistoryTypeId="1" PostId="7992" RevisionGUID="55ba881b-9243-448b-9167-5b3eddd85322" CreationDate="2023-04-09T15:05:45.413" UserId="4067" Text="Substrate-Node-Template does not start after cloning and renaming the template UnknownOpcode(192)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31449" PostHistoryTypeId="3" PostId="7992" RevisionGUID="55ba881b-9243-448b-9167-5b3eddd85322" CreationDate="2023-04-09T15:05:45.413" UserId="4067" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31452" PostHistoryTypeId="2" PostId="7994" RevisionGUID="2303e49d-ce7e-444f-b198-0d6dc6158e08" CreationDate="2023-04-09T20:57:16.320" UserId="351" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7UKUu.png&#xD;&#xA;&#xD;&#xA;What is the reason it cannot load the wasm blob by cargo contract?&#xD;&#xA;This problem persist even for newly ink project." ContentLicense="CC BY-SA 4.0" />
  <row Id="31454" PostHistoryTypeId="1" PostId="7994" RevisionGUID="2303e49d-ce7e-444f-b198-0d6dc6158e08" CreationDate="2023-04-09T20:57:16.320" UserId="351" Text="Inks cargo contract error" ContentLicense="CC BY-SA 4.0" />
  <row Id="31455" PostHistoryTypeId="3" PostId="7994" RevisionGUID="2303e49d-ce7e-444f-b198-0d6dc6158e08" CreationDate="2023-04-09T20:57:16.320" UserId="351" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31456" PostHistoryTypeId="2" PostId="7995" RevisionGUID="6616dc38-9fa7-4d56-843b-ef904e18129a" CreationDate="2023-04-09T22:50:50.057" UserId="3358" Text="For cases where updated nightly is still preferred for whatever reason:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;rustup update&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;rustup install nightly-2023-02-07-aarch64-apple-darwin&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;rustup component add rust-src --toolchain nightly-2023-02-07-aarch64-apple-darwin&#xD;&#xA;```&#xD;&#xA;...specify nightly version in tag&#xD;&#xA;```&#xD;&#xA;cargo +nightly-2023-02-07 contract build&#xD;&#xA;```&#xD;&#xA;Still running updated nightly rustc 1.70.0 as default:&#xD;&#xA;![image](https://user-images.githubusercontent.com/69293813/230799234-12a4e140-9323-4617-8f46-1dc59b6302a0.png)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31458" PostHistoryTypeId="2" PostId="7996" RevisionGUID="8a3be6db-062d-4359-becd-6148770ee049" CreationDate="2023-04-10T01:03:29.203" UserId="116" Text="I have seen the same error when building my chain binary, it looks like it is related to the toolchain `1.68` and not your code.&#xD;&#xA;&#xD;&#xA;When I changed toolchain to `nightly-2023-01-01-x86_64-unknown-linux-gnu` it disappeared." ContentLicense="CC BY-SA 4.0" />
  <row Id="31460" PostHistoryTypeId="2" PostId="7997" RevisionGUID="2ca6c74b-d4f6-4a68-adbc-961684d641d4" CreationDate="2023-04-10T01:12:42.720" UserId="116" Text="`UnknownOpcode(192)` seems to be compiler related with rust versions around 1.68.&#xD;&#xA;&#xD;&#xA;As you already know rollback tool-chain to `nightly-2023-01-01` solves the problem.&#xD;&#xA;&#xD;&#xA;Then build with `cargo +nightly-2023-01-30 build` *(was this the part missing?)*&#xD;&#xA;&#xD;&#xA;For instance you can add this in your cargo.toml&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;nightly-2023-01-01&quot;&#xD;&#xA;components = [ &quot;rustfmt&quot; ]&#xD;&#xA;targets = [ &quot;wasm32-unknown-unknown&quot; ]&#xD;&#xA;profile = &quot;minimal&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31462" PostHistoryTypeId="2" PostId="7998" RevisionGUID="ae6dd785-2f32-4da6-abc9-9ca38e2c0068" CreationDate="2023-04-10T03:28:49.503" UserId="83" Text="In the Rust documentation [here][1] it says that the **hashing function** that a Rust `HashMap` uses is `SipHash`. It says `SipHash` _**can** provide resistance to DoS attacks involving hash tables_, not that it **will**, although it was created to counter the HashDoS attacks in 2011.&#xD;&#xA;&#xD;&#xA;On Wikipedia [here][2] it says: _&quot;Functions in SipHash family are specified as SipHash-c-d, where c is the number of rounds per message block and d is the number of finalization rounds. The recommended parameters are SipHash-2-4 for best performance, and SipHash-4-8 for conservative security. A few languages use Siphash-1-3 for performance at the risk of yet-unknown DoS attacks&quot;_.&#xD;&#xA;&#xD;&#xA;The latest Rust codebase [here][3], as at 10th April 2023, is currently using SipHash-1-3 as its default hashing function used by standard library. &#xD;&#xA;Rust uses it by default in [`std::collections::HashMap`][4].&#xD;&#xA;It was merged in [this historic pull request][5], where they mentioned that SipHash-1-3 hasher is faster than SipHash 2-4, but is believed to provide sufficient protection from collision attacks.&#xD;&#xA;&#xD;&#xA;Rust community members mentioned that:&#xD;&#xA;* SipHash-4-8 like all cryptographic primitives is also used &quot;at the risk of yet-unknown attacks&quot; except those that already have &quot;known&quot; attacks.&#xD;&#xA;* Recently the Rust compiler also switched to SipHash-1-3 for its own internal hashing (which backs up things like incremental compilation), since they believe it is still good enough and quite a bit faster than SipHash-2-4 and SipHash-4-8.&#xD;&#xA;* If there was a security issue with SipHash-1-3, `rustc` compiler updates should always be possible so the std could update to use a different hasher entirely.&#xD;&#xA;* The SipHash used in the Rust Standard Library implementation has been reviewed by many contributors and used by many projects.&#xD;&#xA;&#xD;&#xA;[This table][6] from November 2015 compares the performance of different Rust hashing algorithms including SipHash-1-3 and SipHash-2-4.&#xD;&#xA;&#xD;&#xA;In an older version of the Rust Standard Library it mentions in the SipHasher docs [here][7] that _&quot;Although the SipHash algorithm is considered to be generally strong, **it is not intended for cryptographic purposes**. As such, all cryptographic uses of this implementation are **_strongly discouraged_**.&quot;&#xD;&#xA;It also mentions that it _&quot;lets you key your hash tables from a strong RNG, such as `rand::os::OsRng`&quot;_&#xD;&#xA;&#xD;&#xA;The Substrate repository uses the Rust [`HashMap`][4] extensively, however it appears to use SipHash-1-3 (the Rust default hasher), since it does not use [`HashMap::with_hasher()`][8] to specify a non-default custom hasher.&#xD;&#xA;&#xD;&#xA;Additionally the Substrate repository uses the Rust [`rand::rngs::OsRng`][9], which uses the implementation of the [getrandom][10] crate to generate cryptographic PKI key pair types, but it doesn't implement the marker trait [`CryptoRng`][11] in its trait bounds, which is used to indicate that its implementation is supposed to be cryptographically secure, where Cryptographically secure generators, also known as **CSPRNGs**, should satisfy an additional properties over other generators like PRNGs.&#xD;&#xA;&#xD;&#xA;For example, the following was created with support from the [https://discord.gg/rust-lang-community Rust community][12] to show how to use `CryptoRng`:&#xD;&#xA;```rust&#xD;&#xA;use rand::prelude::*;&#xD;&#xA;use rand_core::{CryptoRng, RngCore};&#xD;&#xA;&#xD;&#xA;fn pick_usize&lt;R: RngCore, C: CryptoRng + ?Sized&gt;(rng: &amp;mut R, max: usize) -&gt; usize {&#xD;&#xA;    // use `Rng::gen_range` instead of `%` otherwise it generates biases in results&#xD;&#xA;    // since the modulo of a uniform distribution makes it not uniform anymore&#xD;&#xA;    rng.gen_range(0..=max)&#xD;&#xA;}&#xD;&#xA;    &#xD;&#xA;fn main() {&#xD;&#xA;    let max = 100;&#xD;&#xA;    let mut rng = thread_rng();&#xD;&#xA;    let random_number = pick_usize::&lt;ThreadRng, dyn CryptoRng&gt;(&amp;mut rng, max);&#xD;&#xA;    println!(&quot;{}&quot;, random_number);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In [`CryptoRng`][11] it states: _&quot;Note that this trait is provided for guidance only and cannot guarantee suitability for cryptographic applications. In general it should only be implemented for well-reviewed code implementing well-regarded algorithms. Note also that use of a `CryptoRng` does not protect against other weaknesses such as seeding from a weak entropy source or leaking state.&quot;_&#xD;&#xA;[This pull request][13] even questions the usefulness of [`CryptoRng`][11].&#xD;&#xA;&#xD;&#xA;In this blogpost [A brief look at the Linux-kernel random generator interfaces][14] it shows how on Linux it either reads a file /dev/random or /dev/urandom or it makes a syscall to `getrandom()` of the OS to provide random data from the kernel CPRNG. The [getrandom][10] crate shows what it uses to interface with each target OS [here][15].&#xD;&#xA;&#xD;&#xA;In the [Zombienet][16] repository that is a tool to easily spawn ephemeral Polkadot/Substrate networks and perform tests against them, there don't appear to be any issues or pull requests that mention they are related to DoS tests or comparisons in the performance and security of different hash functions.&#xD;&#xA;&#xD;&#xA;In this [Hacker News: A Brief History of Random Numbers][17] post some users mention the following:&#xD;&#xA;* developers _&quot;should just be using the default RNG provided by their language, which should be a CSPRNG&quot;_&#xD;&#xA;* _&quot;Using a PRNG instead of a CSPRNG may lead to security vulnerabilities&quot;_&#xD;&#xA;* _&quot;Using a CSPRNG instead of a PRNG may lead to performance degradation&quot;_&#xD;&#xA;&#xD;&#xA;If Substrate is a _&quot;well-reviewed code implementing well-regarded algorithms&quot;_ then why doesn't it implement a CSPRNG by using [`CryptoRng`][11] rather than just a PRNG?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/book/ch08-03-hash-maps.html#hashing-functions&#xD;&#xA;  [2]: https://en.wikipedia.org/wiki/SipHash&#xD;&#xA;  [3]: https://github.com/rust-lang/rust/blob/master/library/std/src/collections/hash/map.rs#L3153&#xD;&#xA;  [4]: https://doc.rust-lang.org/std/collections/struct.HashMap.html&#xD;&#xA;  [5]: https://github.com/rust-lang/rust/pull/33940&#xD;&#xA;  [6]: https://i.stack.imgur.com/DNUvm.jpg&#xD;&#xA;  [7]: https://doc.rust-lang.org/std/hash/struct.SipHasher.html&#xD;&#xA;  [8]: https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.with_hasher&#xD;&#xA;  [9]: https://docs.rs/rand/latest/rand/rngs/struct.OsRng.html&#xD;&#xA;  [10]: https://crates.io/crates/getrandom&#xD;&#xA;  [11]: https://docs.rs/rand/latest/rand/trait.CryptoRng.html&#xD;&#xA;  [12]: https://discord.gg/rust-lang-community&#xD;&#xA;  [13]: https://github.com/rust-random/rand/issues/543&#xD;&#xA;  [14]: https://nikmav.blogspot.com/2016/10/random-generator-linux.html&#xD;&#xA;  [15]: https://docs.rs/getrandom/0.2.9/getrandom/&#xD;&#xA;  [16]: https://github.com/paritytech/zombienet&#xD;&#xA;  [17]: https://news.ycombinator.com/item?id=34814511" ContentLicense="CC BY-SA 4.0" />
  <row Id="31464" PostHistoryTypeId="1" PostId="7998" RevisionGUID="ae6dd785-2f32-4da6-abc9-9ca38e2c0068" CreationDate="2023-04-10T03:28:49.503" UserId="83" Text="Why doesn't Substrate implement a CSPRNG (Cryptographically Secure Pseudorandom Number Generator)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31465" PostHistoryTypeId="3" PostId="7998" RevisionGUID="ae6dd785-2f32-4da6-abc9-9ca38e2c0068" CreationDate="2023-04-10T03:28:49.503" UserId="83" Text="|hash|security|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31466" PostHistoryTypeId="5" PostId="7998" RevisionGUID="118d7b7a-ffc6-4a0b-803f-287d1e452d88" CreationDate="2023-04-10T03:48:11.013" UserId="83" Comment="Fixes after self review" Text="In the Rust documentation [here][1] it says that the **hashing function** that a Rust `HashMap` uses is `SipHash`. It says `SipHash` _**can** provide resistance to DoS attacks involving hash tables_, not that it **will**, although it was created to counter the HashDoS attacks in 2011.&#xD;&#xA;&#xD;&#xA;On Wikipedia [here][2] it says: _&quot;Functions in SipHash family are specified as SipHash-c-d, where c is the number of rounds per message block and d is the number of finalization rounds. The recommended parameters are SipHash-2-4 for best performance, and SipHash-4-8 for conservative security. A few languages use Siphash-1-3 for performance at the risk of yet-unknown DoS attacks&quot;_.&#xD;&#xA;&#xD;&#xA;The latest Rust codebase [here][3], as at 10th April 2023, is currently using SipHash-1-3 as its default hashing function used by the Rust Standard Library. &#xD;&#xA;Rust uses it by default in [`std::collections::HashMap`][4].&#xD;&#xA;It was merged in [this historic pull request][5], where they mentioned that SipHash-1-3 hasher is faster than SipHash 2-4, but is believed to provide sufficient protection from collision attacks.&#xD;&#xA;&#xD;&#xA;Rust community members mentioned that:&#xD;&#xA;* SipHash-4-8 like all cryptographic primitives, is also used &quot;at the risk of yet-unknown attacks&quot;, except those that already have &quot;known&quot; attacks.&#xD;&#xA;* Recently the Rust compiler also switched to SipHash-1-3 for its own internal hashing (which backs up things like incremental compilation), since they believe it is still good enough and quite a bit faster than SipHash-2-4 and SipHash-4-8.&#xD;&#xA;* If there was a security issue with SipHash-1-3, `rustc` compiler updates should always be possible so the std could update to use a different hasher entirely.&#xD;&#xA;* The SipHash used in the Rust Standard Library implementation has been reviewed by many contributors and used by many projects.&#xD;&#xA;&#xD;&#xA;[This table][6] from November 2015 compares the performance of different Rust hashing algorithms including SipHash-1-3 and SipHash-2-4.&#xD;&#xA;&#xD;&#xA;In an older version of the Rust Standard Library it mentions in the SipHasher docs [here][7] that _&quot;Although the SipHash algorithm is considered to be generally strong, **it is not intended for cryptographic purposes**. As such, all cryptographic uses of this implementation are **strongly discouraged**.&quot;_&#xD;&#xA;It also mentions that it _&quot;lets you key your hash tables from a strong RNG, such as `rand::os::OsRng`&quot;_&#xD;&#xA;&#xD;&#xA;The Substrate repository uses the Rust [`HashMap`][4] extensively, however it appears to use SipHash-1-3 (the Rust default hasher), since it does not use [`HashMap::with_hasher()`][8] to specify a non-default custom hasher.&#xD;&#xA;&#xD;&#xA;Additionally the Substrate repository uses the Rust [`rand::rngs::OsRng`][9], which uses the implementation of the [getrandom][10] crate to generate cryptographic PKI key pair types, but it doesn't implement the marker trait [`CryptoRng`][11] in its trait bounds, which is used to indicate that its implementation is supposed to be cryptographically secure, where Cryptographically Secure Pseudorandom Number Generators, also known as **CSPRNGs**, should satisfy additional properties over other generators like PRNGs.&#xD;&#xA;&#xD;&#xA;For example, the following was created with support from the [https://discord.gg/rust-lang-community Rust community][12] to show how to use the `CryptoRng` marker trait:&#xD;&#xA;```rust&#xD;&#xA;use rand::prelude::*;&#xD;&#xA;use rand_core::{CryptoRng, RngCore};&#xD;&#xA;&#xD;&#xA;fn pick_usize&lt;R: RngCore, C: CryptoRng + ?Sized&gt;(rng: &amp;mut R, max: usize) -&gt; usize {&#xD;&#xA;    // use `Rng::gen_range` instead of `%` otherwise it generates biases in results&#xD;&#xA;    // since the modulo of a uniform distribution makes it not uniform anymore&#xD;&#xA;    rng.gen_range(0..=max)&#xD;&#xA;}&#xD;&#xA;    &#xD;&#xA;fn main() {&#xD;&#xA;    let max = 100;&#xD;&#xA;    let mut rng = thread_rng();&#xD;&#xA;    let random_number = pick_usize::&lt;ThreadRng, dyn CryptoRng&gt;(&amp;mut rng, max);&#xD;&#xA;    println!(&quot;{}&quot;, random_number);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In [`CryptoRng`][11] it states: _&quot;Note that this trait is provided for guidance only and cannot guarantee suitability for cryptographic applications. In general it should only be implemented for well-reviewed code implementing well-regarded algorithms. Note also that use of a `CryptoRng` does not protect against other weaknesses such as seeding from a weak entropy source or leaking state.&quot;_&#xD;&#xA;[This pull request][13] even questions the usefulness of [`CryptoRng`][11].&#xD;&#xA;&#xD;&#xA;In this blogpost [A brief look at the Linux-kernel random generator interfaces][14] it shows how on Linux it either reads a file /dev/random or /dev/urandom or it makes a syscall to `getrandom()` of the OS to provide random data from the kernel CPRNG. The [getrandom][10] crate shows what it uses to interface with each target OS [here][15].&#xD;&#xA;&#xD;&#xA;In the [Zombienet][16] repository that is a tool to easily spawn ephemeral Polkadot/Substrate networks and perform tests against them, there doesn't appear to be any issues or pull requests that mention they are related to DoS tests or comparisons in the performance and security of different hash functions.&#xD;&#xA;&#xD;&#xA;In this [Hacker News: A Brief History of Random Numbers][17] post some users mention the following:&#xD;&#xA;* developers _&quot;should just be using the default RNG provided by their language, which should be a CSPRNG&quot;_&#xD;&#xA;* _&quot;Using a PRNG instead of a CSPRNG may lead to security vulnerabilities&quot;_&#xD;&#xA;* _&quot;Using a CSPRNG instead of a PRNG may lead to performance degradation&quot;_&#xD;&#xA;&#xD;&#xA;If Substrate is a _&quot;well-reviewed code implementing well-regarded algorithms&quot;_ then why doesn't it implement a CSPRNG by using [`CryptoRng`][11] rather than just a PRNG?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/book/ch08-03-hash-maps.html#hashing-functions&#xD;&#xA;  [2]: https://en.wikipedia.org/wiki/SipHash&#xD;&#xA;  [3]: https://github.com/rust-lang/rust/blob/master/library/std/src/collections/hash/map.rs#L3153&#xD;&#xA;  [4]: https://doc.rust-lang.org/std/collections/struct.HashMap.html&#xD;&#xA;  [5]: https://github.com/rust-lang/rust/pull/33940&#xD;&#xA;  [6]: https://i.stack.imgur.com/DNUvm.jpg&#xD;&#xA;  [7]: https://doc.rust-lang.org/std/hash/struct.SipHasher.html&#xD;&#xA;  [8]: https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.with_hasher&#xD;&#xA;  [9]: https://docs.rs/rand/latest/rand/rngs/struct.OsRng.html&#xD;&#xA;  [10]: https://crates.io/crates/getrandom&#xD;&#xA;  [11]: https://docs.rs/rand/latest/rand/trait.CryptoRng.html&#xD;&#xA;  [12]: https://discord.gg/rust-lang-community&#xD;&#xA;  [13]: https://github.com/rust-random/rand/issues/543&#xD;&#xA;  [14]: https://nikmav.blogspot.com/2016/10/random-generator-linux.html&#xD;&#xA;  [15]: https://docs.rs/getrandom/0.2.9/getrandom/&#xD;&#xA;  [16]: https://github.com/paritytech/zombienet&#xD;&#xA;  [17]: https://news.ycombinator.com/item?id=34814511" ContentLicense="CC BY-SA 4.0" />
  <row Id="31467" PostHistoryTypeId="2" PostId="7999" RevisionGUID="a76a74bc-2552-42a9-a6c1-5b14d96805e0" CreationDate="2023-04-10T07:37:14.110" UserId="2281" Text="i am using Substrate i want to add Vesting in my customspec whats the format for adding it?&#xD;&#xA;&#xD;&#xA;`i tried using this but it did't work`&#xD;&#xA;&#xD;&#xA;[![][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    genesis_config of pallet_vesting &#xD;&#xA;&#xD;&#xA;[![][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vADsr.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6ISdm.png&#xD;&#xA;&#xD;&#xA;i am getting this error &#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&gt; Error: Service(Other(&quot;Error parsing spec file: invalid type: string&#xD;&#xA;&gt; \&quot;5FvteDB7Um775LKdhUiB6e64NZZoxFnCi1EE2Gx5y1XGwuMe\&quot;, expected a tuple&#xD;&#xA;&gt; of size 4 at line 187 column 60&quot;))" ContentLicense="CC BY-SA 4.0" />
  <row Id="31469" PostHistoryTypeId="1" PostId="7999" RevisionGUID="a76a74bc-2552-42a9-a6c1-5b14d96805e0" CreationDate="2023-04-10T07:37:14.110" UserId="2281" Text="how to add vesting in customspec.json?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31470" PostHistoryTypeId="3" PostId="7999" RevisionGUID="a76a74bc-2552-42a9-a6c1-5b14d96805e0" CreationDate="2023-04-10T07:37:14.110" UserId="2281" Text="|substrate-node-template|pallet|vesting|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31471" PostHistoryTypeId="2" PostId="8000" RevisionGUID="2337884e-01d9-4c6f-a587-074caf54345f" CreationDate="2023-04-10T09:00:24.760" UserId="2762" Text="This looks like an issue with mistmached versions, what version of Susbtrate are you using in your project?&#xD;&#xA;&#xD;&#xA;You can try to update Substrate if you are using an old version, and have  the frame-support-procedural-tools v3.0.0 to the last one: [see Cargo.toml][1].&#xD;&#xA;&#xD;&#xA;Or update the library is failling manually with:&#xD;&#xA;&#xD;&#xA;    cargo update -p syn&#xD;&#xA;&#xD;&#xA;See this old question on StackExchange: https://substrate.stackexchange.com/questions/4305/substrate-node-template-build-error-syngroup-private&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/support/procedural/Cargo.toml" ContentLicense="CC BY-SA 4.0" />
  <row Id="31473" PostHistoryTypeId="2" PostId="8001" RevisionGUID="db937d4e-cd24-4dbd-9433-fd39bb2a87d5" CreationDate="2023-04-10T09:09:06.943" UserId="2281" Text="&gt; This is the format for adding vesting in customspec.json&#xD;&#xA;&#xD;&#xA;[![][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/no2dN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31475" PostHistoryTypeId="2" PostId="8002" RevisionGUID="656e00cc-4e52-486b-bdba-3308937aa9d7" CreationDate="2023-04-10T09:55:47.890" UserId="2909" Text="**Context:** We're running gossip intensive apps and if the workloads get too large, we see all communication drop which breaks down our protocols.&#xD;&#xA;&#xD;&#xA;**Question:** Where can I learn learn more about design decisions and constraints on how Substrate nodes will drop each other when being &quot;spammed&quot; to (i.e. when nodes create too many transaction submissions)?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31477" PostHistoryTypeId="1" PostId="8002" RevisionGUID="656e00cc-4e52-486b-bdba-3308937aa9d7" CreationDate="2023-04-10T09:55:47.890" UserId="2909" Text="Help on Gossip-Intensive Collator/Substrate Nodes!" ContentLicense="CC BY-SA 4.0" />
  <row Id="31478" PostHistoryTypeId="3" PostId="8002" RevisionGUID="656e00cc-4e52-486b-bdba-3308937aa9d7" CreationDate="2023-04-10T09:55:47.890" UserId="2909" Text="|gossip|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31479" PostHistoryTypeId="2" PostId="8003" RevisionGUID="0696b353-886d-4951-a849-542dd5d33284" CreationDate="2023-04-10T09:58:25.863" UserId="2909" Text="**Wondering if anyone here has some example rust code or rust patterns for encoding Call objects for use with cross-chain XCM::Transact operations?**&#xD;&#xA;&#xD;&#xA;Don't want to necessarily re-invent the wheel ourselves. I guess the encoder could depend on the foreign chain's runtime crate, but that seems like quite a heavy solution, increasing compile times." ContentLicense="CC BY-SA 4.0" />
  <row Id="31481" PostHistoryTypeId="1" PostId="8003" RevisionGUID="0696b353-886d-4951-a849-542dd5d33284" CreationDate="2023-04-10T09:58:25.863" UserId="2909" Text="Requesting Rust code or Rust patterns for Encoding Call objects for use with cross-chain XCM::Transact operations" ContentLicense="CC BY-SA 4.0" />
  <row Id="31482" PostHistoryTypeId="3" PostId="8003" RevisionGUID="0696b353-886d-4951-a849-542dd5d33284" CreationDate="2023-04-10T09:58:25.863" UserId="2909" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31484" PostHistoryTypeId="2" PostId="8004" RevisionGUID="d670e163-a23d-4a14-9a76-95a128f1d73c" CreationDate="2023-04-10T13:07:19.183" UserId="2762" Text="To get the contract owner in your Smart Contract, you have to implement this functionality. You can get the owner in the constructor and store it in the storage of the SC.&#xD;&#xA;&#xD;&#xA;A basic example:&#xD;&#xA;```rs&#xD;&#xA;#[ink(storage)]&#xD;&#xA;    pub struct YourStorage {&#xD;&#xA;        /// Owner of the Smart Contract&#xD;&#xA;        owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;And in the constructor, get the owner:&#xD;&#xA;```rs&#xD;&#xA;#[ink(constructor, payable)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let owner = Self::env().caller();&#xD;&#xA;            Self {&#xD;&#xA;                owner,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;Then in the call of your Smart Contract you can check if the caller of that call is the same Account you have stored before as a owner:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let caller = Self::env().caller();&#xD;&#xA;// Only owner of the SC can call this message.&#xD;&#xA;if caller != self.owner {&#xD;&#xA;    return Err(Error::BadOrigin);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To do transfers from the ink! smart contract, check this old question on StackExchange: [How to achieve native token transfers between accounts in ink?][1]:&#xD;&#xA;```rs&#xD;&#xA;let amount = Self::env().transferred_value();&#xD;&#xA;Self::env().transfer(pallet_address, amount)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/6284/how-to-achieve-native-token-transfers-between-accounts-in-ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="31486" PostHistoryTypeId="2" PostId="8005" RevisionGUID="f98cd3f8-01f9-4083-ace0-6af3e6dcd705" CreationDate="2023-04-10T13:17:04.463" UserId="3559" Text="Sure, here's an example Rust code snippet for encoding a Call object:&#xD;&#xA;&#xD;&#xA;rust&#xD;&#xA;use codec::{Encode, Decode};&#xD;&#xA;use frame_support::traits::Currency;&#xD;&#xA;use xcm::v0::{Junction, MultiLocation, NetworkId, Xcm, SendXcm};&#xD;&#xA;&#xD;&#xA;fn encode_call&lt;C: Currency&gt;(currency: &amp;C, dest_chain_id: u8, dest_account: MultiLocation) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;    // Create the call object with the desired function and arguments&#xD;&#xA;    let encoded_call = Call::my_custom_function(42).encode();&#xD;&#xA;&#xD;&#xA;    // Create the XCM message with the encoded call as its body&#xD;&#xA;    let xcm_message = Xcm::WithdrawAsset {&#xD;&#xA;        assets: vec![(currency.get_currency_id(), 100)],&#xD;&#xA;        effects: vec![&#xD;&#xA;            Xcm::DepositAsset {&#xD;&#xA;                assets: vec![(currency.get_currency_id(), 100)],&#xD;&#xA;                dest: Junction::Parent.into(),&#xD;&#xA;            }.into(),&#xD;&#xA;            Xcm::Transact {&#xD;&#xA;                origin_type: MultiLocation::parent(),&#xD;&#xA;                require_weight_at_most: 1_000_000_000,&#xD;&#xA;                call: (NetworkId::Any, MultiLocation::new(dest_chain_id.into(), dest_account)).into(),&#xD;&#xA;            }.into(),&#xD;&#xA;        ],&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Wrap the XCM message in a `SendXcm` object with the specified destination&#xD;&#xA;    let send_xcm = SendXcm {&#xD;&#xA;        message: xcm_message,&#xD;&#xA;        max_weight: 1_000_000_000,&#xD;&#xA;        recipient: Junction::Account(dest_account),&#xD;&#xA;        from: MultiLocation::new(NetworkId::Any.into(), MultiLocation::SelfAddressing(vec![0; 32])),&#xD;&#xA;        settles: false,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Encode the `SendXcm` object as bytes using SCALE codec&#xD;&#xA;    send_xcm.encode()&#xD;&#xA;}&#xD;&#xA;This code assumes that you have defined a custom function my_custom_function within the Call type, and that you have a currency object (C) which implements the Currency trait from the frame_support crate. The code creates an XCM message which withdraws and deposits some currency on the current chain, and then sends a cross-chain transaction to execute the custom function on the specified destination chain and account.&#xD;&#xA;&#xD;&#xA;Note that the above code is just an example and may not be exactly what you need for your specific use case. You will need to customize it according to your own requirements." ContentLicense="CC BY-SA 4.0" />
  <row Id="31488" PostHistoryTypeId="2" PostId="8006" RevisionGUID="e32ee509-6b4c-42ae-9bc6-aa09f6131620" CreationDate="2023-04-10T13:17:34.777" UserId="2539" Text="Our team ([Fearless Wallet][1]) has recently faced an issue while trying making XCM transfers between parachains on Mobile clients. The odd thing is that the same extrinsic on Polkadot JS dApp works fine without any errors. But for Mobile clients and IDE Emulators we have an error like that at 50% of cases.:&#xD;&#xA;&#xD;&#xA;**```&quot;Invalid Transaction&quot;, code: 1010, data: Optional(&quot;Transaction has a bad signature&quot;)```**&#xD;&#xA;&#xD;&#xA;The extrinsic example on Polkadot JS App is [here][2].&#xD;&#xA;&#xD;&#xA;Here you can find a link to the [extrinsic][3] assembled on Mobile client side. We have been investigating the issue for several days. And we haven’t find any possible cause or solution yet.&#xD;&#xA;&#xD;&#xA;We really appreciate any support and suggestions.&#xD;&#xA;Any ideas and advises are welcome.&#xD;&#xA;#stayfearless&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://fearlesswallet.io&#xD;&#xA;  [2]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbifrost-rpc.dwellir.com#/extrinsics/decode/0x4601010000010608000100070010a5d4e801010200411f0100cace42531af9f52edfc06bb216706a094cbad3c393fac3d905c37d4b792f3b4c010700f2052a01&#xD;&#xA;  [3]: https://pastebin.pl/view/7de1a0c3" ContentLicense="CC BY-SA 4.0" />
  <row Id="31490" PostHistoryTypeId="1" PostId="8006" RevisionGUID="e32ee509-6b4c-42ae-9bc6-aa09f6131620" CreationDate="2023-04-10T13:17:34.777" UserId="2539" Text="Parachain to Parachain XCM transfer 1010 bad signature error" ContentLicense="CC BY-SA 4.0" />
  <row Id="31491" PostHistoryTypeId="3" PostId="8006" RevisionGUID="e32ee509-6b4c-42ae-9bc6-aa09f6131620" CreationDate="2023-04-10T13:17:34.777" UserId="2539" Text="|parachain|xcm|error|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31496" PostHistoryTypeId="5" PostId="8004" RevisionGUID="c843736c-3dd9-4898-9cae-ba30250a4758" CreationDate="2023-04-10T13:53:12.303" UserId="2762" Comment="added 485 characters in body" Text="The Smart Contracts account has not private key that allows you to make a transfer as normal account does. So you have to implement a function that does this transfer in the smart contract itself.&#xD;&#xA;&#xD;&#xA;In this call the first think you want to do is check the contract owner of your Smart Contract. &#xD;&#xA;You can get the owner in the constructor and store it in the storage of the SC.&#xD;&#xA;&#xD;&#xA;A basic example:&#xD;&#xA;```rs&#xD;&#xA;#[ink(storage)]&#xD;&#xA;    pub struct YourStorage {&#xD;&#xA;        /// Owner of the Smart Contract&#xD;&#xA;        owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;And in the constructor, get the owner:&#xD;&#xA;```rs&#xD;&#xA;#[ink(constructor, payable)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let owner = Self::env().caller();&#xD;&#xA;            Self {&#xD;&#xA;                owner,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;Then in the call of your Smart Contract you can check if the caller of that call is the same Account you have stored before as a owner:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let caller = Self::env().caller();&#xD;&#xA;// Only owner of the SC can call this message.&#xD;&#xA;if caller != self.owner {&#xD;&#xA;    return Err(Error::BadOrigin);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In that call after check that the caller is the owner of the smart contract, you can do the transfer into the pallet runtime account.&#xD;&#xA;```rs&#xD;&#xA;Self::env().transfer(pallet_address, amount)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The pallet address is calculated from the pallet id, see this explanation about how this calculation is done here: https://substrate.stackexchange.com/questions/2203/about-pallets-account?noredirect=1&amp;lq=1&#xD;&#xA;&#xD;&#xA;For the Smart Contract to have funds you have to send funds previously, check this old question on StackExchange: [How to deposit into an Ink! Smart Contract][1]:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/71450149/how-to-deposit-into-an-ink-smart-contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="31497" PostHistoryTypeId="5" PostId="8005" RevisionGUID="7407a15b-787d-4fb6-a2c0-359faa10f427" CreationDate="2023-04-10T14:16:38.587" UserId="2762" Comment="improved formatting" Text="Sure, here's an example Rust code snippet for encoding a Call object:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use codec::{Encode, Decode};&#xD;&#xA;use frame_support::traits::Currency;&#xD;&#xA;use xcm::v0::{Junction, MultiLocation, NetworkId, Xcm, SendXcm};&#xD;&#xA;&#xD;&#xA;fn encode_call&lt;C: Currency&gt;(currency: &amp;C, dest_chain_id: u8, dest_account: MultiLocation) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;    // Create the call object with the desired function and arguments&#xD;&#xA;    let encoded_call = Call::my_custom_function(42).encode();&#xD;&#xA;&#xD;&#xA;    // Create the XCM message with the encoded call as its body&#xD;&#xA;    let xcm_message = Xcm::WithdrawAsset {&#xD;&#xA;        assets: vec![(currency.get_currency_id(), 100)],&#xD;&#xA;        effects: vec![&#xD;&#xA;            Xcm::DepositAsset {&#xD;&#xA;                assets: vec![(currency.get_currency_id(), 100)],&#xD;&#xA;                dest: Junction::Parent.into(),&#xD;&#xA;            }.into(),&#xD;&#xA;            Xcm::Transact {&#xD;&#xA;                origin_type: MultiLocation::parent(),&#xD;&#xA;                require_weight_at_most: 1_000_000_000,&#xD;&#xA;                call: (NetworkId::Any, MultiLocation::new(dest_chain_id.into(), dest_account)).into(),&#xD;&#xA;            }.into(),&#xD;&#xA;        ],&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Wrap the XCM message in a `SendXcm` object with the specified destination&#xD;&#xA;    let send_xcm = SendXcm {&#xD;&#xA;        message: xcm_message,&#xD;&#xA;        max_weight: 1_000_000_000,&#xD;&#xA;        recipient: Junction::Account(dest_account),&#xD;&#xA;        from: MultiLocation::new(NetworkId::Any.into(), MultiLocation::SelfAddressing(vec![0; 32])),&#xD;&#xA;        settles: false,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    // Encode the `SendXcm` object as bytes using SCALE codec&#xD;&#xA;    send_xcm.encode()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This code assumes that you have defined a custom function `my_custom_function` within the Call type, and that you have a currency object (C) which implements the Currency trait from the frame_support crate. The code creates an XCM message which withdraws and deposits some currency on the current chain, and then sends a cross-chain transaction to execute the custom function on the specified destination chain and account.&#xD;&#xA;&#xD;&#xA;Note that the above code is just an example and may not be exactly what you need for your specific use case. You will need to customize it according to your own requirements." ContentLicense="CC BY-SA 4.0" />
  <row Id="31498" PostHistoryTypeId="2" PostId="8009" RevisionGUID="2a1dbcda-73e9-45f6-8e08-65baa5d29d3c" CreationDate="2023-04-10T14:24:33.703" UserId="29" Text="I heard there is something called Dev Mode in Substrate for pallet development.&#xD;&#xA;&#xD;&#xA;What is Dev Mode? And how can I use it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31500" PostHistoryTypeId="1" PostId="8009" RevisionGUID="2a1dbcda-73e9-45f6-8e08-65baa5d29d3c" CreationDate="2023-04-10T14:24:33.703" UserId="29" Text="What is Dev Mode? And how can I use it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31501" PostHistoryTypeId="3" PostId="8009" RevisionGUID="2a1dbcda-73e9-45f6-8e08-65baa5d29d3c" CreationDate="2023-04-10T14:24:33.703" UserId="29" Text="|pallet|storage|weight|benchmarking|maxencodedlen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31502" PostHistoryTypeId="2" PostId="8010" RevisionGUID="73016317-f5f6-4581-b0c6-fc7bbb7995f3" CreationDate="2023-04-10T14:24:33.703" UserId="29" Text="[Dev Mode](https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html#dev-mode-palletdev_mode) is for developer-friendliness for ease of pallet development and rapidly testing core business logic before cementing it in with proper benchmarking and bounding storage.&#xD;&#xA;&gt; Not to be used for production!&#xD;&#xA;&#xD;&#xA;One can enable a pallet with [Dev Mode](https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html#dev-mode-palletdev_mode) by making the following change in their pallet's `lib.rs` file:&#xD;&#xA;```rust&#xD;&#xA;- #[frame_support::pallet]&#xD;&#xA;+ #[frame_support::pallet(dev_mode)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With Dev Mode enabled you can have a weight of zero i.e. `#[pallet::weight(0)]` and you do not have to `MaxEncodedLen` on storage types.&#xD;&#xA;&#xD;&#xA;Read the fulls docs on Dev Mode:&#xD;&#xA;- https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html#dev-mode-pallet&#xD;&#xA;&#xD;&#xA;Dev Mode was also first covered in the Polkadot Release Analysis v0.9.33:&#xD;&#xA;- https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-33/1287#add-dev-mode-palletdev_mode-12&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31504" PostHistoryTypeId="2" PostId="8011" RevisionGUID="7eeb3717-5d7d-425e-9a76-8561f0515577" CreationDate="2023-04-10T14:53:51.453" UserId="4066" Text="# When I try to run &quot;substrate-contracts-node --dev&quot; I get this error:&#xD;&#xA;&#xD;&#xA; ## WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;## Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;))&#xD;&#xA;&#xD;&#xA;I'm use MAC M1&#xD;&#xA;## ============================&#xD;&#xA;### substrate-contracts-node 0.24.0-fe448511262&#xD;&#xA;&#xD;&#xA;====&#xD;&#xA;rustup +nightly show&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/secoalba/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-2023-03-14-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.68.2 (9eb3afe9e 2023-03-27)&#xD;&#xA;&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/secoalba/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-2023-03-14-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.70.0-nightly (700938c07 2023-04-04)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31506" PostHistoryTypeId="1" PostId="8011" RevisionGUID="7eeb3717-5d7d-425e-9a76-8561f0515577" CreationDate="2023-04-10T14:53:51.453" UserId="4066" Text="Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))" ContentLicense="CC BY-SA 4.0" />
  <row Id="31507" PostHistoryTypeId="3" PostId="8011" RevisionGUID="7eeb3717-5d7d-425e-9a76-8561f0515577" CreationDate="2023-04-10T14:53:51.453" UserId="4066" Text="|runtime|wasm|substrate-contracts-node|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31508" PostHistoryTypeId="50" PostId="7548" RevisionGUID="8b379186-80f9-422c-95b8-5f9999838a2a" CreationDate="2023-04-10T15:05:50.660" UserId="-1" />
  <row Id="31509" PostHistoryTypeId="5" PostId="7989" RevisionGUID="c53045c0-5098-4359-8d47-5dbef7ce9254" CreationDate="2023-04-10T15:36:19.280" UserId="2722" Comment="added 670 characters in body" Text="Hello Substrate and Polkadot community,&#xD;&#xA;&#xD;&#xA;I am working on creating a decentralized exchange (DEX) using Substrate pallets and I've encountered an issue related to transferring tokens from the contract owner to the pallet address.&#xD;&#xA;&#xD;&#xA;To add liquidity for a token pair (e.g., XXX/USDT) in my DEX, users need to provide the contract address of the token (e.g., XXX). Before initiating the transfer, I want to ensure that the user is indeed the owner of the contract. Once the ownership is verified, I need to transfer tokens from the contract address (e.g., 5xsdf6s5d4f6sd4f65sd4fs65df46s5d4f6s5d4f) to the pallet address.&#xD;&#xA;&#xD;&#xA;Could anyone provide guidance or sample code on how to achieve this token transfer from the contract owner to the pallet address while ensuring the user is the actual owner of the contract?&#xD;&#xA;&#xD;&#xA;Any help or suggestions would be greatly appreciated. Thank you!&#xD;&#xA;&#xD;&#xA;**Update**&#xD;&#xA;&#xD;&#xA;i want to transfer token with this code : &#xD;&#xA;&#xD;&#xA;    	#[pallet::call_index(9)]&#xD;&#xA;    #[pallet::weight(10_000)]&#xD;&#xA;    pub fn total_supply(&#xD;&#xA;    	origin: OriginFor&lt;T&gt;,&#xD;&#xA;    	token: T::AccountId,&#xD;&#xA;    	currency: T::AccountId,&#xD;&#xA;    	currency_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    	token_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    ) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    	let who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	T::Currency::transfer(&amp;who, &amp;T::PalletId::get().into_account(), &#xD;&#xA;    	T::MinDeposit::get(), ExistenceRequirement::KeepAlive)?;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;but in this code transfer native token of the chain and i need to transfer from `XXX` token to the pallet account . " ContentLicense="CC BY-SA 4.0" />
  <row Id="31510" PostHistoryTypeId="52" PostId="7999" RevisionGUID="503eee44-cd88-431d-93d7-96dd9f919c0d" CreationDate="2023-04-10T15:38:47.867" />
  <row Id="31511" PostHistoryTypeId="2" PostId="8012" RevisionGUID="758fec1a-1395-4411-ac20-fb009070bd3c" CreationDate="2023-04-10T16:16:11.767" UserId="165" Text="This is very interesting, thanks for bringing this up. Definitely a scenario that can rise questions at the moment.&#xD;&#xA;&#xD;&#xA;A quick note before starting, one can do all the transact payload prep encoding with the help of [double_encoded](https://github.com/paritytech/polkadot/blob/master/xcm/src/double_encoded.rs). But how does a runtime propoerly encodes a call for another one, a different one ? The sending side will need to have the following into account:&#xD;&#xA;&#xD;&#xA;A certain call, let's call it `c`, has an index within the calls of a certain pallet, `call_index`, and said pallet at the same time has an index within the runtime it is _installed_ in, a pallet index. Not only this, but `c` has a certain function signature. These three elements may change over time making the encoding of `c` change too.&#xD;&#xA;&#xD;&#xA;The current work around looks like this, runtime `A` will maintain the call struct, or a similar enough one, of a certain call on runtime`B` with all the information needed for [its encoding](https://github.com/paritytech/polkadot/blob/dbae30efe080a1d41fe54ef4da8af47614c9ca93/xcm/pallet-xcm/src/lib.rs#L1979-L1981).&#xD;&#xA;&#xD;&#xA;Check the following example - [source](https://github.com/tellor-io/tellor-pallet/blob/6a1fe70a722f4038c9c49701d5406ae9baf650c4/src/xcm/ethereum_xcm.rs)&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// The fixed index of `pallet-ethereum-xcm` within various runtimes.&#xD;&#xA;#[derive(Clone, Eq, PartialEq, Encode)]&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;pub enum EthereumXcm {&#xD;&#xA;	#[codec(index = 38u8)]&#xD;&#xA;	Moonbase(EthereumXcmCall),&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// The fixed index of calls available within `pallet-ethereum-xcm`.&#xD;&#xA;#[derive(Clone, Eq, PartialEq, Encode)]&#xD;&#xA;#[allow(dead_code)]&#xD;&#xA;pub enum EthereumXcmCall {&#xD;&#xA;	#[codec(index = 0u8)]&#xD;&#xA;	Transact { xcm_transaction: EthereumXcmTransaction },&#xD;&#xA;	#[codec(index = 1u8)]&#xD;&#xA;	TransactThroughProxy { transact_as: H160, xcm_transaction: EthereumXcmTransaction },&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These structs can now be used for encoding the desired call&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub(crate) fn transact(&#xD;&#xA;	contract_address: impl Into&lt;H160&gt;,&#xD;&#xA;	call_data: BoundedVec&lt;u8, ConstU32&lt;MAX_ETHEREUM_XCM_INPUT_SIZE&gt;&gt;,&#xD;&#xA;	gas_limit: impl Into&lt;U256&gt;,&#xD;&#xA;	value: Option&lt;U256&gt;,&#xD;&#xA;) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;	EthereumXcm::Moonbase(EthereumXcmCall::Transact {&#xD;&#xA;		xcm_transaction: EthereumXcmTransaction::V2(EthereumXcmTransactionV2 {&#xD;&#xA;			gas_limit: gas_limit.into(),&#xD;&#xA;			action: TransactionAction::Call(contract_address.into()),&#xD;&#xA;			value: value.unwrap_or_default(),&#xD;&#xA;			input: call_data,&#xD;&#xA;			access_list: None,&#xD;&#xA;		}),&#xD;&#xA;	})&#xD;&#xA;	.encode()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These _helper_ struct are maintained on the sender's side, not the receiver's, so they might get outdated, right ? Indeed, this is prone to happen with this approach, even though changing call indices is not the most common thing, it can definitely happen. So, next question, if one has gone this far, runtime `A` is properly encoding calls for `B` and observing the expected results after its execution, how to avoid triggering the execution of another _random_ call in the future ?&#xD;&#xA;&#xD;&#xA;[`ExpectPallet`](https://github.com/paritytech/polkadot/blob/dbae30efe080a1d41fe54ef4da8af47614c9ca93/xcm/src/v3/mod.rs#L839) instruction comes to save the day, including this one before `Transact` will assure the expected version of the target pallet on `B`, this implies that the call indices haven't changed.&#xD;&#xA;&#xD;&#xA;Unfortunately at this moment there is not an instruction that give us the same assurance for a pallet index even though these usually don't change much.&#xD;&#xA;&#xD;&#xA;Another helpful instruction could be [`SetErrorHandler`](https://github.com/paritytech/polkadot/blob/dbae30efe080a1d41fe54ef4da8af47614c9ca93/xcm/src/v3/mod.rs#L695) where other instructions can be set in case an error is triggered. In this scenario could be used in case the pallet is not present in `B`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31513" PostHistoryTypeId="2" PostId="8013" RevisionGUID="3b2369a2-3c31-45a1-98a4-78097a47ed95" CreationDate="2023-04-10T16:20:07.953" UserId="462" Text="To check whether a block hash `H` is on the canonical chain in Substate:&#xD;&#xA;&#xD;&#xA;1. Query the block number of this block hash usingj [client.number(hash)](https://github.com/paritytech/substrate/blob/2e94e253950457571e91a5df1e60f82ba7b841dd/primitives/blockchain/src/backend.rs#L42), e.g. `N = client.number(H)`.&#xD;&#xA;2. Query the block hash of the queried block number above using [client.hash(number)](https://github.com/paritytech/substrate/blob/2e94e253950457571e91a5df1e60f82ba7b841dd/primitives/blockchain/src/backend.rs#L46), if the quried block hash matches `H`, then `H` is on the canonical chain.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn is_on_the_canonical_chain(client, block_hash: Hash) -&gt; bool {&#xD;&#xA;    let block_number = client.number(block_hash);&#xD;&#xA;    client.hash(block_number) == block_hash&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I wasn't super sure about this way as I had some unclearness about `client.hash(number)`, but after looking into the code, I'm pretty clear that **`client.hash(number)` returns the canonical block hash given the block number**.(In case you want to dive into the code [1](https://github.com/paritytech/substrate/blob/9a07e9d564636198afef9260de390ebcd40ac1fc/client/db/src/lib.rs#L407), [2](https://github.com/paritytech/substrate/blob/9a07e9d564636198afef9260de390ebcd40ac1fc/client/db/src/lib.rs#L1298-L1306), whenever the tip changes, the number to hash mappings will be updated to the new tip along the way)." ContentLicense="CC BY-SA 4.0" />
  <row Id="31515" PostHistoryTypeId="2" PostId="8014" RevisionGUID="ad14ffc4-46ed-4ee1-b40e-00c2f1076fbb" CreationDate="2023-04-10T17:53:08.277" UserId="3327" Text="I have a relay chain running with two validators. I wanted to connect a parachain with one collator node. I wanted to used my own key for the collator instead of using the predefined keys like //Alice etc.&#xD;&#xA;&#xD;&#xA;Can any one please point me to a guide to achieve this task?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31517" PostHistoryTypeId="1" PostId="8014" RevisionGUID="ad14ffc4-46ed-4ee1-b40e-00c2f1076fbb" CreationDate="2023-04-10T17:53:08.277" UserId="3327" Text="How to add a new collator key to a my parachain in a development setup?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31518" PostHistoryTypeId="3" PostId="8014" RevisionGUID="ad14ffc4-46ed-4ee1-b40e-00c2f1076fbb" CreationDate="2023-04-10T17:53:08.277" UserId="3327" Text="|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31519" PostHistoryTypeId="52" PostId="8003" RevisionGUID="7672e6aa-f22d-4464-87ba-1de263a2b1a6" CreationDate="2023-04-10T18:02:39.153" />
  <row Id="31520" PostHistoryTypeId="5" PostId="8011" RevisionGUID="0a04dd7f-aafd-4a5f-ac2f-adadf4a71ef7" CreationDate="2023-04-10T18:31:28.500" UserId="4066" Comment="added 167 characters in body" Text="Link:&#xD;&#xA;- https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;- https://use.ink/getting-started/running-substrate&#xD;&#xA;## When I try to run &quot;substrate-contracts-node --dev&quot; I get this error:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm use MAC M1&#xD;&#xA;## ============================&#xD;&#xA;#### substrate-contracts-node 0.24.0-fe448511262&#xD;&#xA;&#xD;&#xA;====&#xD;&#xA;&#xD;&#xA;- rustup +nightly show&#xD;&#xA;- Default host: aarch64-apple-darwin&#xD;&#xA;- rustup home:  /Users/secoalba/.rustup&#xD;&#xA;&#xD;&#xA;#### installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-2023-03-14-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;#### installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;#### active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.68.2 (9eb3afe9e 2023-03-27)&#xD;&#xA;&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/secoalba/.rustup&#xD;&#xA;&#xD;&#xA;#### installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-2023-03-14-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;#### installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;#### active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.70.0-nightly (700938c07 2023-04-04)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31521" PostHistoryTypeId="5" PostId="8011" RevisionGUID="206dbce7-6313-43ac-bf47-a220f1d097bf" CreationDate="2023-04-10T18:33:20.043" UserId="4066" Comment="deleted 18 characters in body" Text="Link:&#xD;&#xA;- https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;- https://use.ink/getting-started/running-substrate&#xD;&#xA;## When I try to run &quot;substrate-contracts-node --dev&quot; I get this error:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm use MAC M1&#xD;&#xA;#### ============================&#xD;&#xA;#### substrate-contracts-node 0.24.0-fe448511262&#xD;&#xA;&#xD;&#xA;====&#xD;&#xA;&#xD;&#xA;- rustup +nightly show&#xD;&#xA;- Default host: aarch64-apple-darwin&#xD;&#xA;- rustup home:  /Users/secoalba/.rustup&#xD;&#xA;```js&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-2023-03-14-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.68.2 (9eb3afe9e 2023-03-27)&#xD;&#xA;&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/secoalba/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-2023-03-14-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.70.0-nightly (700938c07 2023-04-04)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31522" PostHistoryTypeId="5" PostId="8011" RevisionGUID="0e60f075-d1bb-4c56-b0d4-1b366c9f78eb" CreationDate="2023-04-10T18:36:28.853" UserId="4066" Comment="added 905 characters in body" Text="Link:&#xD;&#xA;- https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;- https://use.ink/getting-started/running-substrate&#xD;&#xA;## When I try to run &quot;substrate-contracts-node --dev&quot; I get this error:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;substrate-contracts-node --dev&#xD;&#xA;&#xD;&#xA;2023-04-08 23:37:38.268  INFO main sc_cli::runner: Substrate Contracts Node    &#xD;&#xA;2023-04-08 23:37:38.269  INFO main sc_cli::runner: ✌️  version 0.23.0-87a3d76c880    &#xD;&#xA;2023-04-08 23:37:38.269  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2021-2023    &#xD;&#xA;2023-04-08 23:37:38.269  INFO main sc_cli::runner:  Chain specification: Development    &#xD;&#xA;2023-04-08 23:37:38.269  INFO main sc_cli::runner:   Node name: lame-floor-2876    &#xD;&#xA;2023-04-08 23:37:38.269  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-04-08 23:37:38.269  INFO main sc_cli::runner:  Database: ParityDb at /var/folders/3l/0tn_88cj6wn6yq5cdj8l61w80000gn/T/substrateJESQyD/chains/dev/paritydb/full    &#xD;&#xA;2023-04-08 23:37:38.269  INFO main sc_cli::runner: ⛓  Native runtime: substrate-contracts-node-100 (substrate-contracts-node-1.tx1.au1)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-04-08 23:37:38.321  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm use MAC M1&#xD;&#xA;#### ============================&#xD;&#xA;#### substrate-contracts-node 0.24.0-fe448511262&#xD;&#xA;&#xD;&#xA;====&#xD;&#xA;&#xD;&#xA;- rustup +nightly show&#xD;&#xA;- Default host: aarch64-apple-darwin&#xD;&#xA;- rustup home:  /Users/secoalba/.rustup&#xD;&#xA;```js&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-2023-03-14-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;rustc 1.68.2 (9eb3afe9e 2023-03-27)&#xD;&#xA;&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/secoalba/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-2023-03-14-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)&#xD;&#xA;rustc 1.70.0-nightly (700938c07 2023-04-04)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31523" PostHistoryTypeId="2" PostId="8015" RevisionGUID="cfed0999-fb66-42f4-8c3a-e423e924eab7" CreationDate="2023-04-10T20:55:22.270" UserId="1950" Text="I have substrate pallet structure as follows&#xD;&#xA;&#xD;&#xA;                    #[derive(&#xD;&#xA;                        Encode, Decode, CloneNoBound, PartialEqNoBound, Eq, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen,&#xD;&#xA;                    )]&#xD;&#xA;                    #[scale_info(skip_type_params(MetadataSize))]&#xD;&#xA;                    #[codec(mel_bound(AccountId: MaxEncodedLen, BlockNumber: MaxEncodedLen))]&#xD;&#xA;                    pub struct DataLog&lt;AccountId, BlockNumber, MetadataSize&gt;&#xD;&#xA;                    where&#xD;&#xA;                        AccountId: Clone + PartialEq + Debug,&#xD;&#xA;                        BlockNumber: Clone + PartialEq + Debug + PartialOrd,&#xD;&#xA;                        MetadataSize: Get&lt;u32&gt;,&#xD;&#xA;                    {&#xD;&#xA;                        pub account_id: Option&lt;AccountId&gt;,&#xD;&#xA;&#xD;&#xA;                        pub status: u32,&#xD;&#xA;&#xD;&#xA;                        pub block_number: Option&lt;BlockNumber&gt;,&#xD;&#xA;&#xD;&#xA;                        pub remarks: Option&lt;BoundedVec&lt;u8, MetadataSize&gt;&gt;,&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                    #[pallet::storage]&#xD;&#xA;                    #[pallet::getter(fn get_tracer)]&#xD;&#xA;                    pub(super) type Tracer&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;                        _,&#xD;&#xA;                        Blake2_128Concat,&#xD;&#xA;                        BoundedVec&lt;u8, T::MAX_T_SIZE&gt;,&#xD;&#xA;                        BoundedVec&lt;&#xD;&#xA;                            DataLog&lt;T::AccountId, T::BlockNumber, T::MetadataSize&gt;,&#xD;&#xA;                            T::MetadataSize,&#xD;&#xA;                        &gt;,&#xD;&#xA;                    &gt;;&#xD;&#xA;&#xD;&#xA;                    Im trying to push a value for a  vec if exists&#xD;&#xA;&#xD;&#xA;                    let block_number = &lt;frame_system::Module&lt;T&gt;&gt;::block_number();&#xD;&#xA;                    let mut dd_log = DataLog {&#xD;&#xA;                        account_id,&#xD;&#xA;                        block_number: Some(block_number),&#xD;&#xA;                        status,&#xD;&#xA;                        remarks,&#xD;&#xA;                    };&#xD;&#xA;&#xD;&#xA;                    if Tracer::&lt;T&gt;::contains_key(&amp;key) {&#xD;&#xA;                        Tracer::&lt;T&gt;::mutate(key.clone(), |vc| match vc {&#xD;&#xA;                            | None =&gt; return Err(Error::&lt;T&gt;::DIDDoesNotExist),&#xD;&#xA;                            | Some(vc) =&gt; {&#xD;&#xA;                                vc.push(dd_log.clone());&#xD;&#xA;                                Ok(())&#xD;&#xA;                            },&#xD;&#xA;                        })?;&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                    Im getting the following error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;466 |                     vc.push(dd_log);&#xD;&#xA;    |                     ^^^^^^^^^^^^^^^ cannot borrow as mutable&#xD;&#xA;    |&#xD;&#xA;    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `frame_support::BoundedVec&lt;types::DataLog&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber, &lt;T as pallet::Config&gt;::MetadataSize&gt;, &lt;T as pallet::Config&gt;::MetadataSize&gt;`&#xD;&#xA;&#xD;&#xA;    How to fix this issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="31525" PostHistoryTypeId="1" PostId="8015" RevisionGUID="cfed0999-fb66-42f4-8c3a-e423e924eab7" CreationDate="2023-04-10T20:55:22.270" UserId="1950" Text="Substrate BoundedVec Error Cannot Borrow as mutable" ContentLicense="CC BY-SA 4.0" />
  <row Id="31526" PostHistoryTypeId="3" PostId="8015" RevisionGUID="cfed0999-fb66-42f4-8c3a-e423e924eab7" CreationDate="2023-04-10T20:55:22.270" UserId="1950" Text="|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31527" PostHistoryTypeId="5" PostId="8015" RevisionGUID="7ea6d2b3-23fb-4312-8eba-6ff16a4e4409" CreationDate="2023-04-10T22:58:55.233" UserId="73" Comment="deleted 8 characters in body; edited tags" Text="I have substrate pallet structure as follows&#xD;&#xA;```&#xD;&#xA;                    #[derive(&#xD;&#xA;                        Encode, Decode, CloneNoBound, PartialEqNoBound, Eq, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen,&#xD;&#xA;                    )]&#xD;&#xA;                    #[scale_info(skip_type_params(MetadataSize))]&#xD;&#xA;                    #[codec(mel_bound(AccountId: MaxEncodedLen, BlockNumber: MaxEncodedLen))]&#xD;&#xA;                    pub struct DataLog&lt;AccountId, BlockNumber, MetadataSize&gt;&#xD;&#xA;                    where&#xD;&#xA;                        AccountId: Clone + PartialEq + Debug,&#xD;&#xA;                        BlockNumber: Clone + PartialEq + Debug + PartialOrd,&#xD;&#xA;                        MetadataSize: Get&lt;u32&gt;,&#xD;&#xA;                    {&#xD;&#xA;                        pub account_id: Option&lt;AccountId&gt;,&#xD;&#xA;&#xD;&#xA;                        pub status: u32,&#xD;&#xA;&#xD;&#xA;                        pub block_number: Option&lt;BlockNumber&gt;,&#xD;&#xA;&#xD;&#xA;                        pub remarks: Option&lt;BoundedVec&lt;u8, MetadataSize&gt;&gt;,&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                    #[pallet::storage]&#xD;&#xA;                    #[pallet::getter(fn get_tracer)]&#xD;&#xA;                    pub(super) type Tracer&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;                        _,&#xD;&#xA;                        Blake2_128Concat,&#xD;&#xA;                        BoundedVec&lt;u8, T::MAX_T_SIZE&gt;,&#xD;&#xA;                        BoundedVec&lt;&#xD;&#xA;                            DataLog&lt;T::AccountId, T::BlockNumber, T::MetadataSize&gt;,&#xD;&#xA;                            T::MetadataSize,&#xD;&#xA;                        &gt;,&#xD;&#xA;                    &gt;;&#xD;&#xA;&#xD;&#xA;                    Im trying to push a value for a  vec if exists&#xD;&#xA;&#xD;&#xA;                    let block_number = &lt;frame_system::Module&lt;T&gt;&gt;::block_number();&#xD;&#xA;                    let mut dd_log = DataLog {&#xD;&#xA;                        account_id,&#xD;&#xA;                        block_number: Some(block_number),&#xD;&#xA;                        status,&#xD;&#xA;                        remarks,&#xD;&#xA;                    };&#xD;&#xA;&#xD;&#xA;                    if Tracer::&lt;T&gt;::contains_key(&amp;key) {&#xD;&#xA;                        Tracer::&lt;T&gt;::mutate(key.clone(), |vc| match vc {&#xD;&#xA;                            | None =&gt; return Err(Error::&lt;T&gt;::DIDDoesNotExist),&#xD;&#xA;                            | Some(vc) =&gt; {&#xD;&#xA;                                vc.push(dd_log.clone());&#xD;&#xA;                                Ok(())&#xD;&#xA;                            },&#xD;&#xA;                        })?;&#xD;&#xA;                    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Im getting the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;466 |                     vc.push(dd_log);&#xD;&#xA;    |                     ^^^^^^^^^^^^^^^ cannot borrow as mutable&#xD;&#xA;    |&#xD;&#xA;    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `frame_support::BoundedVec&lt;types::DataLog&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber, &lt;T as pallet::Config&gt;::MetadataSize&gt;, &lt;T as pallet::Config&gt;::MetadataSize&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31528" PostHistoryTypeId="6" PostId="8015" RevisionGUID="7ea6d2b3-23fb-4312-8eba-6ff16a4e4409" CreationDate="2023-04-10T22:58:55.233" UserId="73" Comment="deleted 8 characters in body; edited tags" Text="|frame|boundedvec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31529" PostHistoryTypeId="2" PostId="8016" RevisionGUID="d2a006e1-f23e-4fd8-8bce-45390bc5013c" CreationDate="2023-04-10T23:07:28.917" UserId="73" Text="The idea behind `BoundedVec` is to have a vector that is ensuring that the maximum size is not exceeded. Basically it is just a wrapper around `Vec`, but most of the methods are prefixed with `try_`. The reason for the naming is that these methods are checking that the maximum size isn't exceeded and if that would happen, an error is returned.&#xD;&#xA;&#xD;&#xA;To solve your issue, you need to call:&#xD;&#xA;```&#xD;&#xA;vc.try_push(dd_log.clone());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But as `try_push` is returning a `Result`, you still need to handle the result as this would mean that pushing to the vector was rejected because there are too many items in it.&#xD;&#xA;&#xD;&#xA;You can find [here][1] all methods supported by `BoundedVec`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/bounded-collections/latest/bounded_collections/bounded_vec/struct.BoundedVec.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="31531" PostHistoryTypeId="5" PostId="8013" RevisionGUID="eae9f33f-7cef-4e3b-af9c-d51d10299137" CreationDate="2023-04-11T01:10:37.027" UserId="462" Comment="deleted 38 characters in body" Text="To check whether a block hash `H` is on the canonical chain in Substate:&#xD;&#xA;&#xD;&#xA;1. Query the block number of this block hash using [client.number(H)](https://github.com/paritytech/substrate/blob/2e94e253950457571e91a5df1e60f82ba7b841dd/primitives/blockchain/src/backend.rs#L42).&#xD;&#xA;2. Query the block hash of the queried block number above using [client.hash(N)](https://github.com/paritytech/substrate/blob/2e94e253950457571e91a5df1e60f82ba7b841dd/primitives/blockchain/src/backend.rs#L46), if the quried block hash matches `H`, then `H` is on the canonical chain.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn is_on_the_canonical_chain(client, block_hash: Hash) -&gt; bool {&#xD;&#xA;    let block_number = client.number(block_hash);&#xD;&#xA;    client.hash(block_number) == block_hash&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I wasn't super sure about this way as I had some unclearness about `client.hash(number)`, but after looking into the code, I'm pretty clear that **`client.hash(number)` returns the canonical block hash given the block number**.(In case you want to dive into the code [1](https://github.com/paritytech/substrate/blob/9a07e9d564636198afef9260de390ebcd40ac1fc/client/db/src/lib.rs#L407), [2](https://github.com/paritytech/substrate/blob/9a07e9d564636198afef9260de390ebcd40ac1fc/client/db/src/lib.rs#L1298-L1306), whenever the tip changes, the number to hash mappings will be updated to the new tip along the way)." ContentLicense="CC BY-SA 4.0" />
  <row Id="31532" PostHistoryTypeId="2" PostId="8017" RevisionGUID="e5962ee1-f3fe-44ca-8f38-61cd30606654" CreationDate="2023-04-11T01:39:31.257" UserId="2019" Text="How can transaction tips be disabled or configured (say, limited)?&#xD;&#xA;&#xD;&#xA;[![Substrate UI][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fhFUQ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31534" PostHistoryTypeId="1" PostId="8017" RevisionGUID="e5962ee1-f3fe-44ca-8f38-61cd30606654" CreationDate="2023-04-11T01:39:31.257" UserId="2019" Text="How to disable &quot;tips&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31535" PostHistoryTypeId="3" PostId="8017" RevisionGUID="e5962ee1-f3fe-44ca-8f38-61cd30606654" CreationDate="2023-04-11T01:39:31.257" UserId="2019" Text="|transactions|tips|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31536" PostHistoryTypeId="2" PostId="8018" RevisionGUID="8c8ebf75-820e-466e-8c3e-97338558bc67" CreationDate="2023-04-11T04:24:32.940" UserId="354" Text="Tips are just to provide priority to a transaction and you can find the logic of tip in `pallet_transaction_payment` [here][1], the function `get_priority` is where tip is being included in the transaction, you can configure it there.  Explain a little more what exactly you are trying to achieve so that i can answer appropriately. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/HEAD/frame/transaction-payment/src/lib.rs#L708" ContentLicense="CC BY-SA 4.0" />
  <row Id="31540" PostHistoryTypeId="52" PostId="8015" RevisionGUID="4e855fe2-1292-43c3-99cc-8b642a1529c8" CreationDate="2023-04-11T04:55:33.927" />
  <row Id="31545" PostHistoryTypeId="5" PostId="8014" RevisionGUID="e4031483-7418-42cd-96e5-ef354c13f59e" CreationDate="2023-04-11T06:34:34.893" UserId="29" Comment="deleted 2 characters in body" Text="I have a relay chain running with two validators. I wanted to connect a parachain with one collator node. I want to use my own key for the collator instead of using the predefined keys like `//Alice` etc.&#xD;&#xA;&#xD;&#xA;Can anyone please point me to a guide to achieve this task?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31548" PostHistoryTypeId="2" PostId="8023" RevisionGUID="e6369ed7-2a47-4c9c-8a71-79cc30e267b1" CreationDate="2023-04-11T06:43:51.330" UserId="3559" Text="To add a new collator key to your Polkadot parachain in a development setup, you can follow these steps:&#xD;&#xA;&#xD;&#xA;Generate a new key pair for the collator using a tool such as subkey or polkadot-js.&#xD;&#xA;&#xD;&#xA;Add the new key to your local node's keystore by running the following command:&#xD;&#xA;&#xD;&#xA;polkadot-js keyring add &lt;key-name&gt; --type sr25519 --suri &lt;path-to-my-key&gt;&#xD;&#xA;&#xD;&#xA;Replace &lt;key-name&gt; with the name you want to give to your new key and &lt;path-to-my-key&gt; with the path to the file containing your key.&#xD;&#xA;&#xD;&#xA;Update your node's configuration file to include the new collator key. The configuration file is usually located in the ./config directory and is named chain_spec.rs. You will need to update the genesis section and add the new key to the validators array:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&quot;genesis&quot;: {&#xD;&#xA;    ...&#xD;&#xA;    &quot;validatorIds&quot;: [&#xD;&#xA;        &quot;&lt;existing-validator-1&gt;&quot;,&#xD;&#xA;        &quot;&lt;existing-validator-2&gt;&quot;,&#xD;&#xA;        &quot;&lt;new-collator-key&gt;&quot;&#xD;&#xA;    ]&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Replace &lt;existing-validator-1&gt; and &lt;existing-validator-2&gt; &#xD;&#xA;&#xD;&#xA;with the existing validator keys that you want to retain, and replace &lt;new-collator-key&gt; with the new key you just generated.&#xD;&#xA;&#xD;&#xA;Restart your node to apply the changes.&#xD;&#xA;&#xD;&#xA;Once you have completed these steps, your node should be able to function as a collator using the new key you added." ContentLicense="CC BY-SA 4.0" />
  <row Id="31550" PostHistoryTypeId="5" PostId="8004" RevisionGUID="c0dec3fe-fff7-41c1-b41c-26a25df525b6" CreationDate="2023-04-11T07:00:29.973" UserId="3317" Comment="Grammer" Text="A Smart Contract account doesn't have a private key that allows you to make a transfer as normal account do. So you have to implement a function that does this transfer in the smart contract itself.&#xD;&#xA;&#xD;&#xA;In this call the first thing you want to do is check the contract owner of your Smart Contract. &#xD;&#xA;You can get the owner in the constructor and store it in the storage of the SC.&#xD;&#xA;&#xD;&#xA;A basic example:&#xD;&#xA;```rs&#xD;&#xA;#[ink(storage)]&#xD;&#xA;    pub struct YourStorage {&#xD;&#xA;        /// Owner of the Smart Contract&#xD;&#xA;        owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;And in the constructor, get the owner:&#xD;&#xA;```rs&#xD;&#xA;#[ink(constructor, payable)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let owner = Self::env().caller();&#xD;&#xA;            Self {&#xD;&#xA;                owner,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;Then in the call of your Smart Contract you can check if the caller of that call is the same Account you have stored before as the owner:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let caller = Self::env().caller();&#xD;&#xA;// Only owner of the SC can call this message.&#xD;&#xA;if caller != self.owner {&#xD;&#xA;    return Err(Error::BadOrigin);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In that call, after the check that the caller is the owner of the smart contract, you can do the transfer into the pallet runtime account.&#xD;&#xA;```rs&#xD;&#xA;Self::env().transfer(pallet_address, amount)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The pallet address is calculated from the pallet id, see this explanation about how this calculation is done here: https://substrate.stackexchange.com/questions/2203/about-pallets-account?noredirect=1&amp;lq=1&#xD;&#xA;&#xD;&#xA;For the Smart Contract to have funds you have to send funds previously, check this old question on StackExchange: [How to deposit into an Ink! Smart Contract][1]:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/71450149/how-to-deposit-into-an-ink-smart-contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="31555" PostHistoryTypeId="2" PostId="8025" RevisionGUID="958f24a0-3dda-4417-bd04-140c94fa82fe" CreationDate="2023-04-11T08:24:04.380" UserId="179" Text="I'm not sure this will answer 100% your question, but in the [The Polkadot Parachain Host Implementers' Guide][1], there are some references on how [Spam is being handled in the dispute mechanism][2] that might be worth checking out.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/polkadot/book/index.html&#xD;&#xA;  [2]: https://paritytech.github.io/polkadot/book/node/disputes/dispute-coordinator.html?highlight=spam#spam-considerations-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="31558" PostHistoryTypeId="2" PostId="8026" RevisionGUID="6dc1a088-db6b-435e-8710-675ffc1a8e0f" CreationDate="2023-04-11T08:51:33.950" UserId="2099" Text="The solution that works inside the extrinsic is the following:&#xD;&#xA;```rust&#xD;&#xA;let who = ensure_signed(origin)?;&#xD;&#xA;let who: AuthorityId = sp_application_crypto::sr25519::Public::from_raw(who.into()).into();&#xD;&#xA;```&#xD;&#xA;This keeps the `AccountId` as:&#xD;&#xA;```rust&#xD;&#xA;pub type AccountId = &lt;MultiSignature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;&#xD;&#xA;```&#xD;&#xA;I hope this solution is the right way to do the conversion.&#xD;&#xA;&#xD;&#xA;If not, please let me know!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31560" PostHistoryTypeId="2" PostId="8027" RevisionGUID="cafa3bf3-a236-468c-b6a8-8682a410264c" CreationDate="2023-04-11T08:54:38.797" UserId="3989" Text="I noticed that the chain specification for Polkadot contains a `paras` field that is empty. I have not been able to find any documentation on what it is used for or if I can specify parachains there to avoid having to reserve a spot after the chain has been launched. I am aiming to run a local relay chain and parachains for testing purposes. &#xD;&#xA;&#xD;&#xA;Will the `paras` field allow me to add parachains as part of the genesis state and is there anywhere I can find documentation on its usage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31562" PostHistoryTypeId="1" PostId="8027" RevisionGUID="cafa3bf3-a236-468c-b6a8-8682a410264c" CreationDate="2023-04-11T08:54:38.797" UserId="3989" Text="Is it possible to specify parachains in the polkadot chain specification for local testing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31563" PostHistoryTypeId="3" PostId="8027" RevisionGUID="cafa3bf3-a236-468c-b6a8-8682a410264c" CreationDate="2023-04-11T08:54:38.797" UserId="3989" Text="|polkadot|substrate-parachain-template|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31564" PostHistoryTypeId="2" PostId="8028" RevisionGUID="f9f0103e-b434-40c7-b101-8e9bfc4d0767" CreationDate="2023-04-11T09:15:42.253" UserId="4071" Text="During high load, HTTP requests to the node start failing with the error:&#xD;&#xA;&#xD;&#xA;&gt; &quot;429 Too many requests: Too many connections. Please try again later.&quot;&#xD;&#xA;&#xD;&#xA; This same error is also displayed in the node's logs (screenshot).&#xD;&#xA;Is there a way to increase the number of simultaneously open connections, similar to using the `'--ws-max-connections'` flag for websockets?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/U1sRh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31566" PostHistoryTypeId="1" PostId="8028" RevisionGUID="f9f0103e-b434-40c7-b101-8e9bfc4d0767" CreationDate="2023-04-11T09:15:42.253" UserId="4071" Text="429 Too many requests" ContentLicense="CC BY-SA 4.0" />
  <row Id="31567" PostHistoryTypeId="3" PostId="8028" RevisionGUID="f9f0103e-b434-40c7-b101-8e9bfc4d0767" CreationDate="2023-04-11T09:15:42.253" UserId="4071" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31568" PostHistoryTypeId="2" PostId="8029" RevisionGUID="79c94dd1-f6b8-4897-86a8-a6c2b203608b" CreationDate="2023-04-11T09:38:12.340" UserId="29" Text="If you want to setup a Relay chain with parachain(s) locally I recommend you start here:&#xD;&#xA;- https://docs.substrate.io/tutorials/build-a-parachain&#xD;&#xA;&#xD;&#xA;Once you are comfortable with how to setup a test network manually, you can then use Zombienet (which automates a lot of the manual work) to spin up a test network quickly:&#xD;&#xA;- https://docs.substrate.io/test/simulate-parachains&#xD;&#xA;&#xD;&#xA;Regarding your other question, chain spec fields are documented here:&#xD;&#xA;- https://paritytech.github.io/substrate/master/sc_service/trait.ChainSpec.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="31570" PostHistoryTypeId="5" PostId="8029" RevisionGUID="7100ecf7-1594-4308-bf74-d55dad8cfb18" CreationDate="2023-04-11T09:46:41.990" UserId="29" Comment="added 630 characters in body" Text="If you want to setup a Relay chain with parachain(s) locally I recommend you start here:&#xD;&#xA;- https://docs.substrate.io/tutorials/build-a-parachain&#xD;&#xA;&#xD;&#xA;Once you are comfortable with how to setup a test network manually, you can then use Zombienet (which automates a lot of the manual work) to spin up a test network quickly:&#xD;&#xA;- https://docs.substrate.io/test/simulate-parachains&#xD;&#xA;&#xD;&#xA;Regarding your other question, chain spec fields are documented here:&#xD;&#xA; - https://paritytech.github.io/substrate/master/sc_service/trait.ChainSpec.html&#xD;&#xA;&#xD;&#xA;The `paras` field you are referencing:&#xD;&#xA;```rust&#xD;&#xA;paras: Default::default(),&#xD;&#xA;```&#xD;&#xA; - https://github.com/paritytech/polkadot/blob/dbae30efe080a1d41fe54ef4da8af47614c9ca93/node/service/src/chain_spec.rs#L387&#xD;&#xA;&#xD;&#xA;This is part of the Polkadot `GenesisConfig`.&#xD;&#xA;&#xD;&#xA;This is referring to the `GenesisConfig` of the paras pallet found in Polkadot's runtime:&#xD;&#xA;```rust&#xD;&#xA;Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56,&#xD;&#xA;```&#xD;&#xA;You can find the `paras` `GenisisConfig` here:&#xD;&#xA; - https://github.com/paritytech/polkadot/blob/dbae30efe080a1d41fe54ef4da8af47614c9ca93/runtime/parachains/src/paras/mod.rs#L764-L788&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;pub struct GenesisConfig {&#xD;&#xA;	pub paras: Vec&lt;(ParaId, ParaGenesisArgs)&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;impl Default for GenesisConfig {&#xD;&#xA;	fn default() -&gt; Self {&#xD;&#xA;		GenesisConfig { paras: Default::default() }&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::genesis_build]&#xD;&#xA;impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig {&#xD;&#xA;	fn build(&amp;self) {&#xD;&#xA;		let mut parachains = ParachainsCache::new();&#xD;&#xA;		for (id, genesis_args) in &amp;self.paras {&#xD;&#xA;			if genesis_args.validation_code.0.is_empty() {&#xD;&#xA;				panic!(&quot;empty validation code is not allowed in genesis&quot;);&#xD;&#xA;			}&#xD;&#xA;			Pallet::&lt;T&gt;::initialize_para_now(&amp;mut parachains, *id, genesis_args);&#xD;&#xA;		}&#xD;&#xA;		// parachains are flushed on drop&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31571" PostHistoryTypeId="2" PostId="8030" RevisionGUID="ee5e55df-3e28-45ca-b106-d5bc1997ff11" CreationDate="2023-04-11T09:51:27.090" UserId="3843" Text="The above doesn't work with the contract address decoded to u8 Array and then converted to Hex. Instead you can pass directly AccountId as contract address with the code below, and it should give you the correct codeHash.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;export const fetchCodeHash = async (contractAddress: string) =&gt; {&#xD;&#xA;  const providerApi = await initializeProviderApi(); // provider API is the same as in the first answer, just abstracted away&#xD;&#xA;&#xD;&#xA;  if (!providerApi) return;&#xD;&#xA;&#xD;&#xA;  const { codeHash } = await (await providerApi.query.contracts.contractInfoOf(contractAddress)).toHuman() as { codeHash: string };&#xD;&#xA;&#xD;&#xA;  console.log(codeHash);&#xD;&#xA;};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31573" PostHistoryTypeId="2" PostId="8031" RevisionGUID="0631532b-7464-42cd-889b-184bbc495ea2" CreationDate="2023-04-11T09:51:27.093" UserId="2764" Text="Subxt currently exposes only the bytes of the extrinsic to users.&#xD;&#xA;We plan on adding support for decoding to a concrete type generated by the subxt macro.&#xD;&#xA;&#xD;&#xA;In the meanwhile, polkadot-introspector [here](https://github.com/paritytech/polkadot-introspector/blob/558b606bdcd335b54dfd8daa7d4171e8a1c3d406/introspector/src/core/api/subxt_wrapper.rs#L423-L453) is decoding manually the extrinsics.&#xD;&#xA;&#xD;&#xA;For example, polkadot-introspector is interested only in finding the `ParaInherent` event. &#xD;&#xA;&#xD;&#xA;Steps to decode the `ParaInherent` events:&#xD;&#xA;&#xD;&#xA; 1. Obtain the extrinsic data ([example](https://github.com/paritytech/polkadot-introspector/blob/558b606bdcd335b54dfd8daa7d4171e8a1c3d406/introspector/src/core/api/subxt_wrapper.rs#L434))&#xD;&#xA;&#xD;&#xA;Extrinsics are encoded in memory as:&#xD;&#xA; - Compact u32: Length of the extrinsic&#xD;&#xA; - first byte: abbbbbbb (a = 0 for unsigned, 1 for signed, b = version)&#xD;&#xA; - signature&#xD;&#xA; - extrinsic data&#xD;&#xA;&#xD;&#xA;Note: this makes the assumption that the `ParaInherent` is unsigned, please adjust this per your needs.&#xD;&#xA; &#xD;&#xA; 2. Decode the extrinsic date to `RuntimeCall` generated by subxt macro (may be similar to `kusama_client::runtime_types::kusama_runtime::RuntimeCall` for your use case)&#xD;&#xA; 3. Match and inspect data (ie `ParaInherent` data - similar to [here](https://github.com/paritytech/polkadot-introspector/blob/558b606bdcd335b54dfd8daa7d4171e8a1c3d406/introspector/src/core/api/subxt_wrapper.rs#L626-L635))&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31575" PostHistoryTypeId="2" PostId="8032" RevisionGUID="7056f818-e605-425c-a9ae-09f4650d2787" CreationDate="2023-04-11T10:01:48.587" UserId="474" Text="Also, Subxt doesn't currently have a means to decode transactions, but you can obtain the bytes for each transaction back currently eg:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let extrinsics = api.blocks().at(hash).await?.body().await?.extrinsics();&#xD;&#xA;for ext in extrinsics {&#xD;&#xA;    let bytes = ext.bytes();&#xD;&#xA;    // decode bytes&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've updated https://github.com/paritytech/subxt/issues/622 to go into more detail about what sort of interface Subxt could add here to this `ext` value.&#xD;&#xA;&#xD;&#xA;While Subxt doesn't support it at the moment, you can manually look into how to decode the extrinsic bytes. Some pointers for this:&#xD;&#xA;&#xD;&#xA;- Start by reading about the extrinsic format (eg see https://docs.substrate.io/reference/transaction-format/ or look at how Subxt encodes them starting at https://github.com/paritytech/subxt/blob/a69b3e45e71b5f6c3fd4aeeb7a38353f989ad9ea/subxt/src/tx/tx_client.rs#L197)&#xD;&#xA;- Once you've learned about the format of the extrinsic signature, you'll see that &quot;extra&quot; params are encoded as part of it. If you look into the node metadata you'll see that each &quot;extra&quot; param has a type ID assocaietd with it here, which describes the shape of it: https://github.com/paritytech/frame-metadata/blob/438a5b098bb9d5b5a09bdc5b68275b2c5e63a010/frame-metadata/src/v14.rs#L117&#xD;&#xA;- You can use `scale-decode` to decode types from bytes based on their metadata description: https://github.com/paritytech/scale-decode/blob/9164b12da2949f74eef5c6f02ed4fe82a9dc9907/scale-decode/src/lib.rs#L177. `scale-decode` also provides a generic `Value` type that anything can decode into, and a Visitor thing that you can use to skip over bytes you just want to ignore, given the type ID that they should decode to.&#xD;&#xA;- With all of that in mind, you can decode or skip over the signature portion of an extrinsic and are left with the pallet index, call index and then call data. You can look the call type up in the metadata given these indexes, and again get a type Id that you can pass to `scale-decode` to decode the call data into some type (either one of the statically generated types in Subxt or a Value type).&#xD;&#xA;&#xD;&#xA;.. You can see why it's something that we should add to Subxt in any case, as there are a number of steps to it :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31577" PostHistoryTypeId="2" PostId="8033" RevisionGUID="3ac7b33c-0a01-4ce2-9106-43f7ecd076d9" CreationDate="2023-04-11T13:56:35.833" UserId="165" Text="My first thought is that the `dest` argument is not correctly defined.&#xD;&#xA;&#xD;&#xA;I assume you are trying to that account you show there but in another chain. You are missing identifying the chain where this account should receive the funds. An interior defined like `X2 { paraid, account}` would look a bit better to me.&#xD;&#xA;&#xD;&#xA;But this question could use some more detail in general. Are these two parachains connected to a relaychain?, the same relaychain ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31579" PostHistoryTypeId="5" PostId="7684" RevisionGUID="0e46efa4-8e6a-4267-a8e3-6f607b26d1d1" CreationDate="2023-04-11T14:18:11.173" UserId="29" Comment="added 1 character in body" Text="Hey valuable Substrate community,&#xD;&#xA;&#xD;&#xA;I am running into the problem that I need to iterate over an unbounded `StorageMap`. So I need an `IterationLimit` and use an extrinsic which gets called multiple times.&#xD;&#xA;&#xD;&#xA;Example: https://github.com/zeitgeistpm/zeitgeist/blob/f81d03da05f1c3ab75b27af6964594df2dfee6d8/zrml/court/src/lib.rs#L510-L555&#xD;&#xA;&#xD;&#xA;The problem is that I can't drain the `StorageMap`, because the storage is still required. So I need to iterate and continue iterating in the subsequent calls.&#xD;&#xA;&#xD;&#xA;But it is possible that the `StorageMap` changes (keys inserted) between the calls that exceed the iteration limit.&#xD;&#xA;&#xD;&#xA;Test that fails with the last assert: https://github.com/zeitgeistpm/zeitgeist/blob/f81d03da05f1c3ab75b27af6964594df2dfee6d8/zrml/court/src/tests.rs#L429-L473&#xD;&#xA;&#xD;&#xA;With the above test I found out, that new key inserts are not ensured to be inserted after previous key inserts. So I can't use `iter_from` or `iter_keys_from`.&#xD;&#xA;&#xD;&#xA;So my aim is to iterate over all elements and if all elements inside the `StorageMap` fulfill a specific condition, then it should return Ok, otherwise it throws and error." ContentLicense="CC BY-SA 4.0" />
  <row Id="31580" PostHistoryTypeId="2" PostId="8034" RevisionGUID="4a8a95ba-ce79-4956-891f-eb5437c1ecf1" CreationDate="2023-04-11T14:24:51.200" UserId="94" Text="If you want to iterate over something then it cannot change in the meantime.  &#xD;&#xA;This applies to storage maps as well. Iterating over large StorageMaps in calls is not a good idea in general since it uses up a lot of weight and proof size.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I dont know what you do but there is a chance that you can use witnesses, or look into alternative data structures. Otherwise secondary indices which provide you the information without iteration (but need to be maintained on every modification) are possible as well.&#xD;&#xA;&#xD;&#xA;If you still really want to iterate then you somehow have to &quot;lock&quot; that map from modifications while the iteration happens. Like a `Locked` storage item or so, that would reject any modifications to the map." ContentLicense="CC BY-SA 4.0" />
  <row Id="31582" PostHistoryTypeId="5" PostId="8017" RevisionGUID="b91be338-b1d9-4fe3-895c-634359e1b78e" CreationDate="2023-04-11T14:25:42.943" UserId="2019" Comment="added 20 characters in body; edited tags; edited title" Text="How can transaction tips be disabled or configured (say, limited) with Aura consensus?&#xD;&#xA;&#xD;&#xA;[![Substrate UI][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fhFUQ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31583" PostHistoryTypeId="4" PostId="8017" RevisionGUID="b91be338-b1d9-4fe3-895c-634359e1b78e" CreationDate="2023-04-11T14:25:42.943" UserId="2019" Comment="added 20 characters in body; edited tags; edited title" Text="How to disable &quot;tips&quot; with Aura?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31584" PostHistoryTypeId="6" PostId="8017" RevisionGUID="b91be338-b1d9-4fe3-895c-634359e1b78e" CreationDate="2023-04-11T14:25:42.943" UserId="2019" Comment="added 20 characters in body; edited tags; edited title" Text="|transactions|aura|tips|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31585" PostHistoryTypeId="2" PostId="8035" RevisionGUID="55969ed6-b50f-4908-8a71-0983c3f15d1b" CreationDate="2023-04-11T14:42:31.580" UserId="279" Text="you can add the parachains to the `paras` field in your chain-spec. For doing this you can follow this steps:&#xD;&#xA;&#xD;&#xA; 1. Create the chain-spec in plain text &#xD;&#xA;  `polkadot build-spec --chain rococo-local --disable-default-bootnode&#xD;&#xA;    &gt; rococo-local-plain.json`&#xD;&#xA;  (I will use rococo-local as chain)&#xD;&#xA; 2. Edit this file and add your `para` into `paras` field, with this format &#xD;&#xA;   ```json&#xD;&#xA;    paras: [&#xD;&#xA;      [ &lt;para_id&gt;, [&lt;para_head&gt;,&lt;para_wasm&gt;, true]&#xD;&#xA;    ]&#xD;&#xA;  ```&#xD;&#xA;   Where:&#xD;&#xA;   `para_id` : is your parachain id.&#xD;&#xA;&#xD;&#xA;   `para_head` : you can get it running `polkadot-parachain export-genesis-state`&#xD;&#xA;&#xD;&#xA;   `para_wasm` : you can get it running `polkadot-parachain export-genesis-wasm`&#xD;&#xA;     And the last param (`true`) is to set the as parachain.&#xD;&#xA;&#xD;&#xA; 3. You need then to get the `raw` file from your edited plain file&#xD;&#xA;&#xD;&#xA;    `polkadot build-spec --chain ./rococo-local-plain.json --disable-default-bootnode  --raw &gt; ./rococo-local-raw.json`&#xD;&#xA;&#xD;&#xA;  4. Then you can start your relay-chain nodes using this chain-spec (`rococo-local-raw.json`).&#xD;&#xA;  5. You need to start a collator of your parachain, using this chain-spec for the relay-chain and you can use one of the dev accounts for the collator. For example `--alice`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can follow this tutorial (https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/) to get the step-by-step instructions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, this could be handled easily by [zombienet](https://github.com/paritytech/zombienet) and get your network running in one of the available providers (native, podman or kubernetes). Please, let me know if you have questions about zombienet and I can help you.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="31587" PostHistoryTypeId="2" PostId="8036" RevisionGUID="297d77fa-cf5c-4e76-bde6-86fa85af9f6c" CreationDate="2023-04-11T15:20:44.707" UserId="4001" Text="Hi~ I have some questions for developing staking process.&#xD;&#xA;I am using polkadot-api, developing staking part on shibuya-network.&#xD;&#xA;&#xD;&#xA;On 'portal.astar.network' site, I can see staking info on dAapp Staking dashboard.&#xD;&#xA;&#xD;&#xA;1st_Question)&#xD;&#xA;&quot;Available to claim&quot; shows &quot;#-Era&quot;. If I claim 1 Era, how much SBY can I get?&#xD;&#xA;On my Test Result, I got 0.00181..SBY by calculating on 'Not Re-stake after claiming' option 'off'.&#xD;&#xA;( [after-transferable-balance] - [prev-transferable-balance] + [claim-transaction-fee] = [1 Era-Reward] ).&#xD;&#xA;Can you give me some feedback upper actions and other guide?&#xD;&#xA;&#xD;&#xA;2nd_Question)&#xD;&#xA;I try to retrieve by using 'await api.query.dappsStaking.generalStakerInfo(staker, getDappAddressEnum(dAppCa));' API.&#xD;&#xA;'staker' is user-wallet and dAppCa is EVM Contracts Accounts.&#xD;&#xA;The result returns Quantity of SBY that staked at Era like below[currentEra : 2828 | Available to claim : 18 Era].&#xD;&#xA;{ &quot;stakes&quot;: [ { &quot;staked&quot;: &quot;0&quot;, &quot;era&quot;: &quot;2,805&quot; }, { &quot;staked&quot;: &quot;7,000,000,000,000,000,000&quot;, &quot;era&quot;: &quot;2,811&quot; }, { &quot;staked&quot;: &quot;7,007,761,889,397,804,870&quot;, &quot;era&quot;: &quot;2,817&quot; } ]}&#xD;&#xA;How can I get &quot;Available to claim-Era&quot; by using polkadot-API?&#xD;&#xA;How can I get 'A-staker' staking &quot;dApp-list and each dApp's staked value&quot; by using polkadot-API?&#xD;&#xA;I just wanna get upper infomations, like below function returns.&#xD;&#xA;If 'staker-wallet-address' staked on &quot;dApp-A : 7 SBY, 3Era&quot;, &quot;dApp-B : 5 SBY, 4Era&quot;, &quot;dApp-C : 9 SBY, 8Era&quot;&#xD;&#xA;input-paramater(staker-wallet-address) =&gt;  { &quot;dApp-A&quot; : [&quot;3Era(Meaning-Reward)&quot;, &quot;7 SBY&quot;], &quot;dApp-B&quot; : [&quot;4Era(Meaning-Reward)&quot;, &quot;5 SBY&quot;], &quot;dApp-C&quot; : [&quot;8Era(Meaning-Reward)&quot;, &quot;9 SBY&quot;] }&#xD;&#xA;&#xD;&#xA;3rd_Question) How 'Available to claim'-value is increase by staking quantity and multi-dAapp Staking situation like upper example?&#xD;&#xA;&#xD;&#xA;Where can I get some infomation about my upper questions? thx~^^ &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31589" PostHistoryTypeId="1" PostId="8036" RevisionGUID="297d77fa-cf5c-4e76-bde6-86fa85af9f6c" CreationDate="2023-04-11T15:20:44.707" UserId="4001" Text="ASTAR(SHIBUYA) Staking API Question(retrieve era, dAppCa EVM Contracts Accounts) &amp; How to calculate Reward?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31590" PostHistoryTypeId="3" PostId="8036" RevisionGUID="297d77fa-cf5c-4e76-bde6-86fa85af9f6c" CreationDate="2023-04-11T15:20:44.707" UserId="4001" Text="|polkadot-js|astar|era|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31595" PostHistoryTypeId="2" PostId="8037" RevisionGUID="a565611c-4551-47de-a8d0-aac0d0e3e727" CreationDate="2023-04-11T15:32:08.143" UserId="351" Text="I am using ReactJs and ContractPromise object cant/dont access contract query and txs object.&#xD;&#xA;&#xD;&#xA;    const contract = new ContractPromise(api,metadata( in json even string format), address);&#xD;&#xA;The object instantiated it seems dont actually access the metadata.&#xD;&#xA;&#xD;&#xA;    contract.query // wont access the queries, &#xD;&#xA;    contract.address // will access the address&#xD;&#xA;    contract.abi // will acess the abi&#xD;&#xA;    contract.tx // wont acess the transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="31597" PostHistoryTypeId="1" PostId="8037" RevisionGUID="a565611c-4551-47de-a8d0-aac0d0e3e727" CreationDate="2023-04-11T15:32:08.143" UserId="351" Text="ContractPromise from Polkadot Js do not load contract ABI when intantiating" ContentLicense="CC BY-SA 4.0" />
  <row Id="31598" PostHistoryTypeId="3" PostId="8037" RevisionGUID="a565611c-4551-47de-a8d0-aac0d0e3e727" CreationDate="2023-04-11T15:32:08.143" UserId="351" Text="|polkadot-js|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31601" PostHistoryTypeId="52" PostId="8027" RevisionGUID="bf26f8c6-e38f-45de-9c64-4d83d048251b" CreationDate="2023-04-11T16:54:45.350" />
  <row Id="31602" PostHistoryTypeId="2" PostId="8039" RevisionGUID="086e1802-2cd8-46f3-befc-9fae0392662c" CreationDate="2023-04-11T17:38:19.020" UserId="4074" Text="I managed to make it compile by upgrading ``jsonrpsee`` package from version ``0.15.1`` to version ``0.16.2``. I hope this helps you." ContentLicense="CC BY-SA 4.0" />
  <row Id="31604" PostHistoryTypeId="2" PostId="8040" RevisionGUID="df3de3f5-bbe4-4f8c-bd5d-b978f69d1d0d" CreationDate="2023-04-11T19:06:26.330" UserId="73" Text="If you want to do some work before announcing a block to the network, you can do it the following way. [You will need to change this code][1] to something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   // Don't let the internals announce the block automatically&#xD;&#xA;   config.announce_block = false;&#xD;&#xA; &#xD;&#xA;   // Start the network etc.&#xD;&#xA;   let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =&#xD;&#xA;		sc_service::build_network(sc_service::BuildNetworkParams {&#xD;&#xA;			config: &amp;config,&#xD;&#xA;			client: client.clone(),&#xD;&#xA;			transaction_pool: transaction_pool.clone(),&#xD;&#xA;			spawn_handle: task_manager.spawn_handle(),&#xD;&#xA;			import_queue,&#xD;&#xA;			block_announce_validator_builder: None,&#xD;&#xA;			warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)),&#xD;&#xA;		})?;&#xD;&#xA;    &#xD;&#xA;    let block_import = client.import_notification_stream();&#xD;&#xA;    let custom_block_announce = async move {&#xD;&#xA;        while let Some(import) = block_import.next().await {&#xD;&#xA;            // If the local node produced the block&#xD;&#xA;            if import.origin == BlockOrigin::Own {&#xD;&#xA;                // Insert your special logic here&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // Announce the block to the network&#xD;&#xA;            sync_service.announce_block(import.hash, None);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    task_manager.spawn_handle().spawn(&#xD;&#xA;        &quot;custom-block-announce&quot;,&#xD;&#xA;        None,&#xD;&#xA;        custom_block_announce.boxed(),&#xD;&#xA;    );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/8548a97f9272c7ca43ac7c091d81e6b9cc8b69e2/bin/node-template/node/src/service.rs#L173-L182" ContentLicense="CC BY-SA 4.0" />
  <row Id="31606" PostHistoryTypeId="2" PostId="8041" RevisionGUID="9fe0e13e-bdcf-4790-9736-2a02ff7ae0ef" CreationDate="2023-04-11T20:45:48.613" UserId="2340" Text="I'm working on a wrapped chain, inspired by frontier.&#xD;&#xA;We have a pallet, that contains a VM, that creates blocks that are pushed onto the outer block digest in the `on_finalize` hook.&#xD;&#xA;In our block header we have a hash root of a storage structure to compute and include. The computation of this root hash is really expensive, it takes up to one-third of the block time to be done. So our idea was to compute it asynchronously for block n, while we are creating block n+1, and include the root hash of the previous block in the header of the current block.&#xD;&#xA;&#xD;&#xA;Here is the timeline:&#xD;&#xA;1) block n is finished&#xD;&#xA;2) block n root hash computation start&#xD;&#xA;3) block n+1 creation start&#xD;&#xA;4) block n root hash computation is finished&#xD;&#xA;5) block n+1 is finished, it contains block n root hash&#xD;&#xA;&#xD;&#xA;At first, I thought I would be able to achieve this using `inherents`, the node producing the block would be able to compute the previous root hash while processing the current block transaction, and at some point, it would execute an `inherent` call in order to feed this value inside the runtime, with only minimal verification in the call itself.&#xD;&#xA;It would have been the role of the verifier nodes to execute the `check_inherent` function from the `ProvideInherent` trait when they receive new blocks, before including those in their own chain state.&#xD;&#xA;&#xD;&#xA;My problem is that since [this PR](https://github.com/paritytech/substrate/pull/8173) inherent has to be executed before any transaction (but after the `on_initialize` hook).&#xD;&#xA;Given that the computation takes roughly 1/3 of a block time, it probably won't be ready on time. The block execution will be delayed until the node finishes its root hash calculation. The timeline I imagine will probably look something like this:&#xD;&#xA;1) block n is received&#xD;&#xA;2) block n root hash computation start&#xD;&#xA;3) block n+1 `on_initialize` is executed&#xD;&#xA;4) we wait more or less 1/3 of the block time&#xD;&#xA;5) block n root hash is ready&#xD;&#xA;6) inherent is executed&#xD;&#xA;7) transaction start being processed&#xD;&#xA;8) block n+1 is finished&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA; - is my reasoning correct, will the root hash computation still bottleneck my block even when done in the next block as an inherent&#xD;&#xA; - what are my alternatives (a regular unsigned transaction does not seem like one, as it would require the computation to be done again in the runtime, in order to be sure that the value given is correct, and it won't be lightweight at all, so I don't see it working) ?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31608" PostHistoryTypeId="1" PostId="8041" RevisionGUID="9fe0e13e-bdcf-4790-9736-2a02ff7ae0ef" CreationDate="2023-04-11T20:45:48.613" UserId="2340" Text="In need for &quot;end of block&quot; inherent" ContentLicense="CC BY-SA 4.0" />
  <row Id="31609" PostHistoryTypeId="3" PostId="8041" RevisionGUID="9fe0e13e-bdcf-4790-9736-2a02ff7ae0ef" CreationDate="2023-04-11T20:45:48.613" UserId="2340" Text="|frontier|inherent|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31610" PostHistoryTypeId="5" PostId="8041" RevisionGUID="9d61a814-d4aa-4b29-b7c3-887416db24e7" CreationDate="2023-04-11T20:51:39.453" UserId="2340" Comment="added 238 characters in body" Text="I'm working on a wrapped chain, inspired by frontier.&#xD;&#xA;We have a pallet, that contains a VM, that creates blocks that are pushed onto the outer block digest in the `on_finalize` hook.&#xD;&#xA;In our block header we have a hash root of a storage structure to compute and include. The computation of this root hash is really expensive, it takes up to one-third of the block time to be done. So our idea was to compute it asynchronously for block n, while we are creating block n+1, and include the root hash of the previous block in the header of the current block.&#xD;&#xA;&#xD;&#xA;Here is the timeline:&#xD;&#xA;1) block n is finished&#xD;&#xA;2) block n root hash computation start&#xD;&#xA;3) block n+1 creation start&#xD;&#xA;4) block n root hash computation is finished&#xD;&#xA;5) block n+1 is finished, it contains block n root hash&#xD;&#xA;&#xD;&#xA;At first, I thought I would be able to achieve this using `inherents`, the node producing the block would be able to compute the previous root hash while processing the current block transaction, and at some point, it would execute an `inherent` call in order to feed this value inside the runtime, with only minimal verification in the call itself.&#xD;&#xA;It would have been the role of the verifier nodes to execute the `check_inherent` function from the `ProvideInherent` trait when they receive new blocks, before including those in their own chain state.&#xD;&#xA;&#xD;&#xA;My problem is that since [this PR](https://github.com/paritytech/substrate/pull/8173) inherent has to be executed before any transaction (but after the `on_initialize` hook).&#xD;&#xA;Given that the computation takes roughly 1/3 of a block time, it probably won't be ready on time. The block execution will be delayed until the node finishes its root hash calculation. The timeline I imagine will probably look something like this:&#xD;&#xA;1) block n is received&#xD;&#xA;2) block n root hash computation start&#xD;&#xA;3) block n+1 `on_initialize` is executed&#xD;&#xA;4) we wait more or less 1/3 of the block time&#xD;&#xA;5) block n root hash is ready&#xD;&#xA;6) inherent is executed&#xD;&#xA;7) transaction start being processed&#xD;&#xA;8) block n+1 is finished&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA; - is my reasoning correct, will the root hash computation still bottleneck my block even when done in the next block as an inherent&#xD;&#xA; - what are my alternatives?&#xD;&#xA;&#xD;&#xA;A regular unsigned transaction does not seem like one, as it would require the computation to be done again in the runtime, in order to be sure that the value given is correct, and it won't be lightweight at all, so I don't see it working.  &#xD;&#xA;Is there a way to be a bad boy and just let my specific `inherent` be executed later?  &#xD;&#xA;Are off-chain workers a solution?  &#xD;&#xA;Is there some other way for the node to inject data into the block, but near the end of it? (in the digest maybe)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31611" PostHistoryTypeId="6" PostId="8041" RevisionGUID="8b5c235d-6622-41a5-b4de-e8a66078dcf7" CreationDate="2023-04-11T21:04:03.513" UserId="2340" Comment="edited tags" Text="|inherent|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31612" PostHistoryTypeId="5" PostId="8041" RevisionGUID="8b5c235d-6622-41a5-b4de-e8a66078dcf7" CreationDate="2023-04-11T21:04:03.513" UserId="2340" Comment="edited tags" Text="I'm working on a wrapped chain, inspired by frontier.&#xD;&#xA;We have a pallet, that contains a VM, that creates blocks that are pushed onto the outer block digest in the `on_finalize` hook.&#xD;&#xA;In our block header we have a hash root of a storage structure to compute and include. The computation of this root hash is really expensive, it takes up to one-third of the block time to be done. So our idea was to compute it asynchronously for block n, while we are creating block n+1, and include the root hash of the previous block in the header of the current block.&#xD;&#xA;&#xD;&#xA;Here is the timeline:&#xD;&#xA;1) block n is finished&#xD;&#xA;2) block n root hash computation start&#xD;&#xA;3) block n+1 creation start&#xD;&#xA;4) block n root hash computation is finished&#xD;&#xA;5) block n+1 is finished, it contains block n root hash&#xD;&#xA;&#xD;&#xA;At first, I thought I would be able to achieve this using `inherents`, the node producing the block would be able to compute the previous root hash while processing the current block transaction, and at some point, it would execute an `inherent` call in order to feed this value inside the runtime, with only minimal verification in the call itself.&#xD;&#xA;It would have been the role of the verifier nodes to execute the `check_inherent` function from the `ProvideInherent` trait when they receive new blocks, before including those in their own chain state.&#xD;&#xA;&#xD;&#xA;My problem is that since [this PR](https://github.com/paritytech/substrate/pull/8173) inherent has to be executed before any transaction (but after the `on_initialize` hook).&#xD;&#xA;Given that the computation takes roughly 1/3 of a block time, it probably won't be ready on time. The block execution will be delayed until the node finishes its root hash calculation. The timeline I imagine will probably look something like this:&#xD;&#xA;1) block n is received&#xD;&#xA;2) block n root hash computation start&#xD;&#xA;3) block n+1 `on_initialize` is executed&#xD;&#xA;4) we wait more or less 1/3 of the block time&#xD;&#xA;5) block n root hash is ready&#xD;&#xA;6) inherent is executed&#xD;&#xA;7) transaction start being processed&#xD;&#xA;8) block n+1 is finished&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA; - is my reasoning correct, will the root hash computation still bottleneck my block even when done in the next block as an inherent&#xD;&#xA; - what are my alternatives?&#xD;&#xA;&#xD;&#xA;A regular unsigned transaction does not seem like one, as it would require the computation to be done again in the runtime, in order to be sure that the value given is correct, and it won't be lightweight at all, so I don't see it working.  &#xD;&#xA;Is there a way to be a bad boy and just let my specific `inherent` be executed later?  &#xD;&#xA;Are off-chain workers the best solution I have?  &#xD;&#xA;Is there some other way for the node to inject data into the block, but near the end of it? (in the digest maybe)" ContentLicense="CC BY-SA 4.0" />
  <row Id="31614" PostHistoryTypeId="5" PostId="8041" RevisionGUID="0715a605-f319-4896-a3c9-652443ab9ac3" CreationDate="2023-04-11T22:37:35.453" UserId="2340" Comment="added 371 characters in body" Text="I'm working on a wrapped chain, inspired by frontier.&#xD;&#xA;We have a pallet, that contains a VM, that creates blocks that are pushed onto the outer block digest in the `on_finalize` hook.&#xD;&#xA;In our block header we have a hash root of a storage structure to compute and include. The computation of this root hash is really expensive, it takes up to one-third of the block time to be done. So our idea was to compute it asynchronously for block n, while we are creating block n+1, and include the root hash of the previous block in the header of the current block.&#xD;&#xA;&#xD;&#xA;Here is the timeline:&#xD;&#xA;1) block n is finished&#xD;&#xA;2) block n root hash computation start&#xD;&#xA;3) block n+1 creation start&#xD;&#xA;4) block n root hash computation is finished&#xD;&#xA;5) block n+1 is finished, it contains block n root hash&#xD;&#xA;&#xD;&#xA;At first, I thought I would be able to achieve this using `inherents`, the node producing the block would be able to compute the previous root hash while processing the current block transaction, and at some point, it would execute an `inherent` call in order to feed this value inside the runtime, with only minimal verification in the call itself.&#xD;&#xA;It would have been the role of the verifier nodes to execute the `check_inherent` function from the `ProvideInherent` trait when they receive new blocks, before including those in their own chain state.&#xD;&#xA;&#xD;&#xA;My problem is that since [this PR](https://github.com/paritytech/substrate/pull/8173) inherent has to be executed before any transaction (but after the `on_initialize` hook).&#xD;&#xA;Given that the computation takes roughly 1/3 of a block time, it probably won't be ready on time. The block execution will be delayed until the node finishes its root hash calculation. The timeline I imagine will probably look something like this:&#xD;&#xA;1) block n is received&#xD;&#xA;2) block n root hash computation start&#xD;&#xA;3) block n+1 `on_initialize` is executed&#xD;&#xA;4) we wait more or less 1/3 of the block time&#xD;&#xA;5) block n root hash is ready&#xD;&#xA;6) inherent is executed&#xD;&#xA;7) transaction start being processed&#xD;&#xA;8) block n+1 is finished&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA; - is my reasoning correct, will the root hash computation still bottleneck my block even when done in the next block as an inherent&#xD;&#xA; - what are my alternatives?&#xD;&#xA;&#xD;&#xA;A regular unsigned transaction does not seem like one, as it would require the computation to be done again in the runtime, in order to be sure that the value given is correct, and it won't be lightweight at all, so I don't see it working.  &#xD;&#xA;Is there a way to be a bad boy and just let my specific `inherent` be executed later?  &#xD;&#xA;Are off-chain workers the best solution I have?  &#xD;&#xA;Is there some other way for the node to inject data into the block, but near the end of it? (in the digest maybe)&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;After looking into the code I found the `EnsureInherentsAreFirst` and the code generate by `construct_runtime` that implement this trait.&#xD;&#xA;Something possible would be to use `Signed` `inherents`, they would not be flaged by `FRAME` security and would still be recognized as inherent by the runtime.  &#xD;&#xA;Is it a good idea, to have my nodes sign such transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31615" PostHistoryTypeId="50" PostId="7540" RevisionGUID="94ed1b21-81b2-453e-bd46-aa22a0835a59" CreationDate="2023-04-12T00:07:05.893" UserId="-1" />
  <row Id="31616" PostHistoryTypeId="5" PostId="8036" RevisionGUID="45bf34cf-31d6-4fb9-9502-f1d93a96b148" CreationDate="2023-04-12T04:19:00.770" UserId="83" Comment="try to make question more readable" Text="Hi~ I have some questions about the developer staking process.&#xD;&#xA;I am using polkadot-api, developer staking part on shibuya-network.&#xD;&#xA;&#xD;&#xA;At [portal.astar.network][1], I can see staking info on the **dAapp Staking** dashboard.&#xD;&#xA;&#xD;&#xA;1st_Question)&#xD;&#xA;&quot;Available to claim&quot; shows &quot;#-Era&quot;. If I claim 1 Era, how much SBY can I get?&#xD;&#xA;On my Test Result, I got 0.00181..SBY by calculating on 'Not Re-stake after claiming' option 'off'. `( [after-transferable-balance] - [prev-transferable-balance] + [claim-transaction-fee] = [1 Era-Reward] ).`&#xD;&#xA;Can you give me some feedback about the above actions or some other guide?&#xD;&#xA;&#xD;&#xA;2nd_Question)&#xD;&#xA;I try to retrieve by using the API wth:&#xD;&#xA;```js&#xD;&#xA;await api.query.dappsStaking.generalStakerInfo(staker, getDappAddressEnum(dAppCa));&#xD;&#xA;```&#xD;&#xA;Where `staker` is a user-wallet and dAppCa is an EVM Contracts Account.&#xD;&#xA;The result returns Quantity of SBY that staked at Era like below:&#xD;&#xA;`[currentEra : 2828 | Available to claim : 18 Era]`.&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;stakes&quot;: [&#xD;&#xA;    { &quot;staked&quot;: &quot;0&quot;, &quot;era&quot;: &quot;2,805&quot; },&#xD;&#xA;    { &quot;staked&quot;: &quot;7,000,000,000,000,000,000&quot;, &quot;era&quot;: &quot;2,811&quot; },&#xD;&#xA;    { &quot;staked&quot;: &quot;7,007,761,889,397,804,870&quot;, &quot;era&quot;: &quot;2,817&quot; }&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I get &quot;Available to claim-Era&quot; by using polkadot-API?&#xD;&#xA;&#xD;&#xA;How can I get 'A-staker' staking &quot;dApp-list and each dApp's staked value&quot; by using polkadot-API?&#xD;&#xA;&#xD;&#xA;I just want to get the above information, like below function returns.&#xD;&#xA;If 'staker-wallet-address' staked on `&quot;dApp-A : 7 SBY, 3Era&quot;, &quot;dApp-B : 5 SBY, 4Era&quot;, &quot;dApp-C : 9 SBY, 8Era&quot;`&#xD;&#xA;```&#xD;&#xA;input-parameter(staker-wallet-address) =&gt;&#xD;&#xA;{ &#xD;&#xA;  &quot;dApp-A&quot; : [&quot;3Era(Meaning-Reward)&quot;, &quot;7 SBY&quot;],&#xD;&#xA;  &quot;dApp-B&quot; : [&quot;4Era(Meaning-Reward)&quot;, &quot;5 SBY&quot;],&#xD;&#xA;  &quot;dApp-C&quot; : [&quot;8Era(Meaning-Reward)&quot;, &quot;9 SBY&quot;]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3rd_Question) How is the 'Available to claim'-value increased by the staking quantity and multi-dAapp Staking situation like in the above example?&#xD;&#xA;&#xD;&#xA;Where can I get some infomation about my questions above? thx~^^ &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://portal.astar.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="31617" PostHistoryTypeId="5" PostId="8036" RevisionGUID="e696eca6-e3d2-4e8a-90e6-7cbcb5061a59" CreationDate="2023-04-12T04:26:06.070" UserId="83" Comment="fix the title" Text="Hi~ I have some questions about the developer staking process.&#xD;&#xA;I am using polkadot-api, developer staking part on shibuya-network.&#xD;&#xA;&#xD;&#xA;At [portal.astar.network][1], I can see staking info on the **dApp Staking** dashboard.&#xD;&#xA;&#xD;&#xA;1st_Question)&#xD;&#xA;&quot;Available to claim&quot; shows &quot;#-Era&quot;. If I claim 1 Era, how much SBY can I get?&#xD;&#xA;On my Test Result, I got 0.00181..SBY by calculating on 'Not Re-stake after claiming' option 'off'. `( [after-transferable-balance] - [prev-transferable-balance] + [claim-transaction-fee] = [1 Era-Reward] ).`&#xD;&#xA;Can you give me some feedback about the above actions or some other guide?&#xD;&#xA;&#xD;&#xA;2nd_Question)&#xD;&#xA;I try to retrieve by using the API wth:&#xD;&#xA;```js&#xD;&#xA;await api.query.dappsStaking.generalStakerInfo(staker, getDappAddressEnum(dAppCa));&#xD;&#xA;```&#xD;&#xA;Where `staker` is a user-wallet and dAppCa is an EVM Contracts Account.&#xD;&#xA;The result returns Quantity of SBY that staked at Era like below:&#xD;&#xA;`[currentEra : 2828 | Available to claim : 18 Era]`.&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;stakes&quot;: [&#xD;&#xA;    { &quot;staked&quot;: &quot;0&quot;, &quot;era&quot;: &quot;2,805&quot; },&#xD;&#xA;    { &quot;staked&quot;: &quot;7,000,000,000,000,000,000&quot;, &quot;era&quot;: &quot;2,811&quot; },&#xD;&#xA;    { &quot;staked&quot;: &quot;7,007,761,889,397,804,870&quot;, &quot;era&quot;: &quot;2,817&quot; }&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I get &quot;Available to claim-Era&quot; by using polkadot-API?&#xD;&#xA;&#xD;&#xA;How can I get 'A-staker' staking &quot;dApp-list and each dApp's staked value&quot; by using polkadot-API?&#xD;&#xA;&#xD;&#xA;I just want to get the above information, like below function returns.&#xD;&#xA;If 'staker-wallet-address' staked on `&quot;dApp-A : 7 SBY, 3Era&quot;, &quot;dApp-B : 5 SBY, 4Era&quot;, &quot;dApp-C : 9 SBY, 8Era&quot;`&#xD;&#xA;```&#xD;&#xA;input-parameter(staker-wallet-address) =&gt;&#xD;&#xA;{ &#xD;&#xA;  &quot;dApp-A&quot; : [&quot;3Era(Meaning-Reward)&quot;, &quot;7 SBY&quot;],&#xD;&#xA;  &quot;dApp-B&quot; : [&quot;4Era(Meaning-Reward)&quot;, &quot;5 SBY&quot;],&#xD;&#xA;  &quot;dApp-C&quot; : [&quot;8Era(Meaning-Reward)&quot;, &quot;9 SBY&quot;]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3rd_Question) How is the 'Available to claim'-value increased by the staking quantity and multi-dAapp Staking situation like in the above example?&#xD;&#xA;&#xD;&#xA;Where can I get some infomation about my questions above? thx~^^ &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://portal.astar.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="31618" PostHistoryTypeId="4" PostId="8036" RevisionGUID="e696eca6-e3d2-4e8a-90e6-7cbcb5061a59" CreationDate="2023-04-12T04:26:06.070" UserId="83" Comment="fix the title" Text="How to calculate claimable rewards from dApp Staking on Astar and Shibuya across multiple eras and multiple dApps?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31619" PostHistoryTypeId="6" PostId="8036" RevisionGUID="e696eca6-e3d2-4e8a-90e6-7cbcb5061a59" CreationDate="2023-04-12T04:26:06.070" UserId="83" Comment="fix the title" Text="|polkadot-js|astar|era|rewards|shibuya|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31620" PostHistoryTypeId="2" PostId="8042" RevisionGUID="eb409b5b-b7b0-45c0-9b69-8947e7ffae73" CreationDate="2023-04-12T06:27:18.847" UserId="29" Text="Issue discussed and closed here:&#xD;&#xA;- https://github.com/paritytech/polkadot/issues/7039" ContentLicense="CC BY-SA 4.0" />
  <row Id="31622" PostHistoryTypeId="4" PostId="8027" RevisionGUID="4aa6418f-5e3f-4473-81cc-c5cf35d6d6b0" CreationDate="2023-04-12T06:52:39.203" UserId="2" Comment="capitalization" Text="Is it possible to specify parachains in the Polkadot chain specification for local testing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31623" PostHistoryTypeId="24" PostId="8027" RevisionGUID="4aa6418f-5e3f-4473-81cc-c5cf35d6d6b0" CreationDate="2023-04-12T06:52:39.203" Comment="Proposed by 2 approved by 3989 edit id of 406" ContentLicense="CC BY-SA 4.0" />
  <row Id="31625" PostHistoryTypeId="50" PostId="7585" RevisionGUID="ae8d8e72-790a-4316-a20c-4a868b62239e" CreationDate="2023-04-12T09:00:05.323" UserId="-1" />
  <row Id="31626" PostHistoryTypeId="2" PostId="8043" RevisionGUID="5cba2fb6-1fa7-48ef-bcd1-5a5325eac650" CreationDate="2023-04-12T09:44:21.237" UserId="380" Text="I'm putting a single transaction into a batch utility call with zero value. The batch extrinsic is shown below. Each time I submit the batch transaction, a huge value is submitted to an unknown account. The value is approximately 500 times the gas fee of the single transaction in the batch. The receiving account is not a contract.&#xD;&#xA;&#xD;&#xA;What is this balance transfer for? &#xD;&#xA;&#xD;&#xA;I'm using substrate in dev mode on branch `polkadot-v0.9.40`.&#xD;&#xA;&#xD;&#xA;**Batch Extrinsic:**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;isSigned&quot;: true,&#xD;&#xA;  &quot;method&quot;: {&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;      &quot;calls&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;args&quot;: {&#xD;&#xA;            &quot;dest&quot;: {&#xD;&#xA;              &quot;Id&quot;: &quot;5Fmo4KdCK7jTLbaSbZ5RYXhYMZxzPCxEv7SVHwzTJ3WUbGJJ&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;value&quot;: &quot;0&quot;,&#xD;&#xA;            &quot;gas_limit&quot;: {&#xD;&#xA;              &quot;refTime&quot;: &quot;9,946,641,144&quot;,&#xD;&#xA;              &quot;proofSize&quot;: &quot;709,519&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;storage_deposit_limit&quot;: &quot;1,448,339,956,379,238&quot;,&#xD;&#xA;            &quot;data&quot;: &quot;0x5b965eaba456d313ea79628d7a768d77e3e5089289c4ada9170a647895125b73c3c1eee80105797b3529e14b9ff72548ef16865d4d9e0f79f1e393decd2f435ff5f2cc0c133b73f06b9945447b664b3f12cf45d227a315623db8611b110b2955b2531c10340f9161523bb730b4a180f9ab0144f89ce5d0c09d0934a386fbd3b804a0a9675a0b71a30f2531b3ac73f88bd8d0a15f1e3ce7840d456947a9c3235ff5f40e720101&quot;&#xD;&#xA;          },&#xD;&#xA;          &quot;method&quot;: &quot;call&quot;,&#xD;&#xA;          &quot;section&quot;: &quot;contracts&quot;&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    },&#xD;&#xA;    &quot;method&quot;: &quot;batch&quot;,&#xD;&#xA;    &quot;section&quot;: &quot;utility&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;era&quot;: {&#xD;&#xA;    &quot;MortalEra&quot;: {&#xD;&#xA;      &quot;period&quot;: &quot;128&quot;,&#xD;&#xA;      &quot;phase&quot;: &quot;117&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;nonce&quot;: &quot;3&quot;,&#xD;&#xA;  &quot;signature&quot;: &quot;0x01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101&quot;,&#xD;&#xA;  &quot;signer&quot;: {&#xD;&#xA;    &quot;Id&quot;: &quot;5DExyKNTzoweUafckatwBs4TDCyPH4C4zjXJhJpPzP8J7xqr&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;tip&quot;: &quot;0&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![huge unknown balance transfer][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7mfyl.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31628" PostHistoryTypeId="1" PostId="8043" RevisionGUID="5cba2fb6-1fa7-48ef-bcd1-5a5325eac650" CreationDate="2023-04-12T09:44:21.237" UserId="380" Text="What is this strange balance transfer that occurs during utility.batch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31629" PostHistoryTypeId="3" PostId="8043" RevisionGUID="5cba2fb6-1fa7-48ef-bcd1-5a5325eac650" CreationDate="2023-04-12T09:44:21.237" UserId="380" Text="|contracts|aura|batch|transaction-fees|dev-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31630" PostHistoryTypeId="2" PostId="8044" RevisionGUID="e210f00a-7dee-4c28-a455-b285dfd7c8fb" CreationDate="2023-04-12T10:32:27.333" UserId="3440" Text="A few months back, I added contract-pallet to the Polkadot using the [link](https://docs.substrate.io/reference/how-to-guides/pallet-design/add-contracts-pallet/). At that time, I used Polkadot 0.9.28 as the node version. There was another link from the substrate that uas also [useful](https://docs.substrate.io/tutorials/work-with-pallets/contracts-pallet/). &#xD;&#xA;&#xD;&#xA;At this point, both links are missing from the substrate page.&#xD;&#xA;Does it mean that the present versions have the contract-pallet enabled by default? &#xD;&#xA;&#xD;&#xA;If not enabled by default, how to get the contract-pallet enabled in Polkadot?&#xD;&#xA;Are any tutorials or links available for Polkadot 0.9.40 to enable contract-pallet? " ContentLicense="CC BY-SA 4.0" />
  <row Id="31632" PostHistoryTypeId="1" PostId="8044" RevisionGUID="e210f00a-7dee-4c28-a455-b285dfd7c8fb" CreationDate="2023-04-12T10:32:27.333" UserId="3440" Text="contract pallet installation issues" ContentLicense="CC BY-SA 4.0" />
  <row Id="31633" PostHistoryTypeId="3" PostId="8044" RevisionGUID="e210f00a-7dee-4c28-a455-b285dfd7c8fb" CreationDate="2023-04-12T10:32:27.333" UserId="3440" Text="|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31634" PostHistoryTypeId="5" PostId="8043" RevisionGUID="617eb59c-da9f-4b79-abf3-c22bacd21322" CreationDate="2023-04-12T11:18:17.970" UserId="380" Comment="added 1156 characters in body" Text="I'm putting a single transaction into a batch utility call with zero value. The batch extrinsic is shown below. Each time I submit the batch transaction, a huge value is submitted to an unknown account. The value is approximately 500 times the gas fee of the single transaction in the batch. The receiving account is not a contract. It is always the same account that receives the balance.&#xD;&#xA;&#xD;&#xA;What is this balance transfer for? &#xD;&#xA;&#xD;&#xA;I'm using substrate in dev mode on branch `polkadot-v0.9.40`.&#xD;&#xA;&#xD;&#xA;**Batch Extrinsic:**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;isSigned&quot;: true,&#xD;&#xA;  &quot;method&quot;: {&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;      &quot;calls&quot;: [&#xD;&#xA;        {&#xD;&#xA;          &quot;args&quot;: {&#xD;&#xA;            &quot;dest&quot;: {&#xD;&#xA;              &quot;Id&quot;: &quot;5Fmo4KdCK7jTLbaSbZ5RYXhYMZxzPCxEv7SVHwzTJ3WUbGJJ&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;value&quot;: &quot;0&quot;,&#xD;&#xA;            &quot;gas_limit&quot;: {&#xD;&#xA;              &quot;refTime&quot;: &quot;9,946,641,144&quot;,&#xD;&#xA;              &quot;proofSize&quot;: &quot;709,519&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;storage_deposit_limit&quot;: &quot;1,448,339,956,379,238&quot;,&#xD;&#xA;            &quot;data&quot;: &quot;0x5b965eaba456d313ea79628d7a768d77e3e5089289c4ada9170a647895125b73c3c1eee80105797b3529e14b9ff72548ef16865d4d9e0f79f1e393decd2f435ff5f2cc0c133b73f06b9945447b664b3f12cf45d227a315623db8611b110b2955b2531c10340f9161523bb730b4a180f9ab0144f89ce5d0c09d0934a386fbd3b804a0a9675a0b71a30f2531b3ac73f88bd8d0a15f1e3ce7840d456947a9c3235ff5f40e720101&quot;&#xD;&#xA;          },&#xD;&#xA;          &quot;method&quot;: &quot;call&quot;,&#xD;&#xA;          &quot;section&quot;: &quot;contracts&quot;&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    },&#xD;&#xA;    &quot;method&quot;: &quot;batch&quot;,&#xD;&#xA;    &quot;section&quot;: &quot;utility&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;era&quot;: {&#xD;&#xA;    &quot;MortalEra&quot;: {&#xD;&#xA;      &quot;period&quot;: &quot;128&quot;,&#xD;&#xA;      &quot;phase&quot;: &quot;117&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;nonce&quot;: &quot;3&quot;,&#xD;&#xA;  &quot;signature&quot;: &quot;0x01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101&quot;,&#xD;&#xA;  &quot;signer&quot;: {&#xD;&#xA;    &quot;Id&quot;: &quot;5DExyKNTzoweUafckatwBs4TDCyPH4C4zjXJhJpPzP8J7xqr&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;tip&quot;: &quot;0&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The hex encoded extrinsic:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0xa508840020c72af36a93a3b1aed897e3dfdcab993fcf002fa9ee7b043e7a70d667504972012c638bf5e21d3606f1338404c7a2ab61be62c0edb41ecbeae8b088635c2e940efd18b9a5b047cd0c6327fc68a8e2a4c2ac3d6bc0f324122320bc92627d88d48696060c0000010008130600a40b451091ece31354f2adf9864b6ae986de5f5fae473728e6900cff899635260007be3aa26702a6762b00010f662e9dec41250599025b965eab75c7a5d2da2fa1b7efb29e5e583b24adaba69426cb1aba8585d5fadc0a26245a0105797b3529e14b9ff72548ef16865d4d9e0f79f1e393decd2f435ff5f2cc0c640ee5b7b21dc015ec54f9f5730d8e1685928b94a09509770f6b3e69fe23e14c20c72af36a93a3b1aed897e3dfdcab993fcf002fa9ee7b043e7a70d6675049721e2a38e3ab30530788982adb381bbe732a53154804d3a543781ac5493e1881080101130600a40b451091ece31354f2adf9864b6ae986de5f5fae473728e6900cff89963526000787c15f65022e762b00010f662e9dec41250599025b965eab75c7a5d2da2fa1b7efb29e5e583b24adaba69426cb1aba8585d5fadc0a26245a0105797b3529e14b9ff72548ef16865d4d9e0f79f1e393decd2f435ff5f2cc0c1034cc61607ce2881a2e96fdef4eb44021791677a19592222c24ebc87532fe4220c72af36a93a3b1aed897e3dfdcab993fcf002fa9ee7b043e7a70d66750497260a9b3d30f22c2b7902267a17868d46e2980976e3093a7cb888f5819cd79b1320102&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![huge unknown balance transfer][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7mfyl.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31635" PostHistoryTypeId="2" PostId="8045" RevisionGUID="3bc02514-04e0-44bc-97aa-6ca9a1248232" CreationDate="2023-04-12T11:48:18.503" UserId="3317" Text="I think you mean the tutorial where `pallet-contracts` was added to the `substrate-node-template`. This tutorial is indeed removed.&#xD;&#xA;&#xD;&#xA;You can use [substrate-contracts-node][1] where you have a node-template with `pallet-contracts`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="31637" PostHistoryTypeId="2" PostId="8046" RevisionGUID="6ffb66de-a25e-442c-bc09-8df5ebdef828" CreationDate="2023-04-12T12:21:27.843" UserId="29" Text="There error that you are getting is a Transaction validity `BadProof` error. &#xD;&#xA;&#xD;&#xA;The Rust docs have some possible causes that may be helpful:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	/// General error to do with the transaction's proofs (e.g. signature).&#xD;&#xA;	///&#xD;&#xA;	/// # Possible causes&#xD;&#xA;	///&#xD;&#xA;	/// When using a signed extension that provides additional data for signing, it is required&#xD;&#xA;	/// that the signing and the verifying side use the same additional data. Additional&#xD;&#xA;	/// data will only be used to generate the signature, but will not be part of the transaction&#xD;&#xA;	/// itself. As the verifying side does not know which additional data was used while signing&#xD;&#xA;	/// it will only be able to assume a bad signature and cannot express a more meaningful error.&#xD;&#xA;	BadProof,&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/ea9ce4c0af36310c0b0db264ab12cf4766b83750/primitives/runtime/src/transaction_validity.rs#L49-L58&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31645" PostHistoryTypeId="2" PostId="8048" RevisionGUID="c5c482b5-ef37-4e6f-99ff-eb2a73647354" CreationDate="2023-04-12T12:55:42.740" UserId="3098" Text="You need to switch to rust stable channel by default and then run `cargo contract build --release`" ContentLicense="CC BY-SA 4.0" />
  <row Id="31648" PostHistoryTypeId="2" PostId="8049" RevisionGUID="3ef20899-fd64-4b51-bfaa-f620d8b83397" CreationDate="2023-04-12T13:25:31.657" UserId="1779" Text="I was running some benchmark, and noticed that the estimated proof size was less than the measured size, despite `MaxEncodedLen` being used in this crate. The estimation of 0 is clearly wrong, but this is the one that gets used in `Weight::from_parts`. My first guess was that `MaxEncodedLen` was perhaps implemented incorrectly, but they're all auto-derived so I don't think that can be the case. I also tried inspecting the `max_encoded_len()` of of the key type, and it was non-zero. What can cause this behavior? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	/// Storage: VaultRegistry MinimumCollateralVault (r:0 w:1)&#xD;&#xA;	/// Proof: VaultRegistry MinimumCollateralVault (max_values: None, max_size: Some(43), added: 2518, mode: MaxEncodedLen)&#xD;&#xA;	fn set_minimum_collateral() -&gt; Weight {&#xD;&#xA;		// Proof Size summary in bytes:&#xD;&#xA;		//  Measured:  `711`&#xD;&#xA;		//  Estimated: `0`&#xD;&#xA;		// Minimum execution time: 9_105_000 picoseconds.&#xD;&#xA;		Weight::from_parts(9_553_000, 0)&#xD;&#xA;			.saturating_add(T::DbWeight::get().writes(1_u64))&#xD;&#xA;	}" ContentLicense="CC BY-SA 4.0" />
  <row Id="31650" PostHistoryTypeId="1" PostId="8049" RevisionGUID="3ef20899-fd64-4b51-bfaa-f620d8b83397" CreationDate="2023-04-12T13:25:31.657" UserId="1779" Text="Estimated proof size less than measured" ContentLicense="CC BY-SA 4.0" />
  <row Id="31651" PostHistoryTypeId="3" PostId="8049" RevisionGUID="3ef20899-fd64-4b51-bfaa-f620d8b83397" CreationDate="2023-04-12T13:25:31.657" UserId="1779" Text="|weight|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31652" PostHistoryTypeId="5" PostId="3758" RevisionGUID="029c53af-0815-444b-a057-5c9d8d9bf8c7" CreationDate="2023-04-12T13:37:10.390" UserId="29" Comment="update links to perma links" Text="1. In order to do this you will need in your runtime the `pallet_asset_tx_payment` pallet. Here's an example of the [configuration][1].  &#xD;&#xA;(the pallet would need to be added into the `construct_runtime!` etc. See statemint as an example).&#xD;&#xA;&#xD;&#xA;2. Now that that type is available it needs to be added into the tuple that is the SignedExtra type like [this][2]. As you can see that then becomes part of the `UncheckedExtrinsic` type.&#xD;&#xA;&#xD;&#xA;3. Then on the client side when you construct the signed transaction the SignedExtra needs to be encoded too (eg. [subxt][3]). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/030db02f876461c19fc617dd7899536881b4ca26/parachains/runtimes/assets/statemint/src/lib.rs#L561-L573&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/blob/030db02f876461c19fc617dd7899536881b4ca26/parachains/runtimes/assets/statemint/src/lib.rs#L669&#xD;&#xA;  [3]: https://github.com/paritytech/subxt/blob/6012d2a75e3ea50209f9f5ab9638e6ee9e91a900/subxt/src/client.rs#L283" ContentLicense="CC BY-SA 4.0" />
  <row Id="31653" PostHistoryTypeId="2" PostId="8050" RevisionGUID="755ff10c-c566-4f9b-b25b-f52102f074e7" CreationDate="2023-04-12T13:55:43.870" UserId="4028" Text="I am trying to build the **libsecp256k1** library in a non STD environment and I get the following error when when building the contract:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[wasm-validator error in module]  unexpected true: memory max &gt;= initial, on memory&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems like this happens while using the recover function -&gt; The main problem is to try and recover a public key given an EDSA signature and message.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;libsecp256k1 = { version=&quot;0.7.1&quot;, default-features = false, features = [&quot;static-context&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It looks like I need the static-context feature to be able to use the recovery function, however, after digging through the source code, it seems like recovery actually calls recovery_with_context, which actually adds an additional parameter - context, defined like this&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg(all(feature = &quot;static-context&quot;, not(feature = &quot;lazy-static-context&quot;)))]&#xD;&#xA;/// A static ECMult context.&#xD;&#xA;// Correct `pre_g` values are fed into `ECMultContext::new_from_raw`, generated by build script.&#xD;&#xA;pub static ECMULT_CONTEXT: ECMultContext =&#xD;&#xA;    unsafe { ECMultContext::new_from_raw(include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/const.rs&quot;))) };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[cfg(all(feature = &quot;static-context&quot;, not(feature = &quot;lazy-static-context&quot;)))]&#xD;&#xA;/// A static ECMultGen context.&#xD;&#xA;// Correct `prec` values are fed into `ECMultGenContext::new_from_raw`, generated by build script.&#xD;&#xA;pub static ECMULT_GEN_CONTEXT: ECMultGenContext =&#xD;&#xA;    unsafe { ECMultGenContext::new_from_raw(include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/const_gen.rs&quot;))) };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please note, that since this example is meant for the Phala Ink! environment, no standard libraries can be used. Alternatives are also welcome - we just want to extract the public key from the signature and message, as stated before.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn recover_pubkey(&amp;self, v: u8, r: Vec&lt;u8&gt;, s: Vec&lt;u8&gt;, message: Vec&lt;u8&gt;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31655" PostHistoryTypeId="1" PostId="8050" RevisionGUID="755ff10c-c566-4f9b-b25b-f52102f074e7" CreationDate="2023-04-12T13:55:43.870" UserId="4028" Text="Error when building libsecp256k1 for Rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="31656" PostHistoryTypeId="3" PostId="8050" RevisionGUID="755ff10c-c566-4f9b-b25b-f52102f074e7" CreationDate="2023-04-12T13:55:43.870" UserId="4028" Text="|ink|rust|blockchain|phala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31657" PostHistoryTypeId="2" PostId="8051" RevisionGUID="fff0603b-85f2-4d2b-bed9-1f22cccfb5ec" CreationDate="2023-04-12T14:37:42.983" UserId="2445" Text="We do this at Encointer, the full code including a client that can pay in the custom asset can be found at https://github.com/encointer/encointer-node. I highlight the most important things here:&#xD;&#xA;&#xD;&#xA;### Runtime&#xD;&#xA;&#xD;&#xA;You need to include the pallet-asset-tx-payment: https://github.com/encointer/encointer-node/blob/6b5f32350874a099178115de09b163e2b2237e61/runtime/src/lib.rs#L467. We have defined our own `OnChargeTransaction` because we don't use the pallet-assets. You can just use the one that pallet-assets exposes.&#xD;&#xA;&#xD;&#xA;You need to add it to the signed extension: https://github.com/encointer/encointer-node/blob/6b5f32350874a099178115de09b163e2b2237e61/runtime/src/lib.rs#L523.&#xD;&#xA;&#xD;&#xA;This will add an `Option&lt;AssetId&gt;` to the signed extension. If it is `Some` in the extrinsic, it will use the defined asset as fee-payment token; otherwise it falls back to the native token.&#xD;&#xA;&#xD;&#xA;### Client&#xD;&#xA;&#xD;&#xA;In our encointer-client cli we use the substrate-api-client (subxt-alternative) library to connect to it: https://github.com/scs/substrate-api-client.&#xD;&#xA;&#xD;&#xA;Here, we define the signed extension type in extrinsic format: https://github.com/encointer/encointer-node/blob/6b5f32350874a099178115de09b163e2b2237e61/client/encointer-api-client-extension/src/extrinsic_params.rs#L17. It says `CommunityIdentifier` here because we don't use the pallet-assets. You will put `AssetId` there.&#xD;&#xA;&#xD;&#xA;At this point we define that we want to pay with the custom asset: https://github.com/encointer/encointer-node/blob/6b5f32350874a099178115de09b163e2b2237e61/client/src/main.rs#L331.&#xD;&#xA;&#xD;&#xA;#### Polkadot-js/apps sidenote&#xD;&#xA;&#xD;&#xA;The `SignedExtension` is not exposed in the metadata if I am not mistaken, hence you need to hardcode it, and this is why the polkadot-js/apps is not able to support custom payment based on metadata alone. You need to manually add it to the polkadot-js/api type registry, see https://github.com/polkadot-js/apps/blob/c484456c12dbeeaccc701ec89d891e5e3f53a4cc/packages/apps-config/src/api/spec/encointer-para.ts#L247.&#xD;&#xA;&#xD;&#xA;This fix was polkadot-js/apps fix is needed because otherwise polkadot-js/apps is not able to correctly interpret blocks that contain an extrinsic paid in the non-native asset, i.e., where the asset-tx-payment asset was `Some`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31659" PostHistoryTypeId="5" PostId="8051" RevisionGUID="b79cd216-b6bb-48bc-b4fe-a846a612aacd" CreationDate="2023-04-12T14:42:53.187" UserId="2445" Comment="deleted 28 characters in body" Text="We do this at Encointer, the full code including a client that can pay in the custom asset can be found at https://github.com/encointer/encointer-node. I highlight the most important things here:&#xD;&#xA;&#xD;&#xA;### Runtime&#xD;&#xA;&#xD;&#xA;You need to include the pallet-asset-tx-payment: https://github.com/encointer/encointer-node/blob/6b5f32350874a099178115de09b163e2b2237e61/runtime/src/lib.rs#L467. We have defined our own `OnChargeTransaction` because we don't use the pallet-assets. You can just use the one that pallet-assets exposes.&#xD;&#xA;&#xD;&#xA;You need to add it to the signed extension: https://github.com/encointer/encointer-node/blob/6b5f32350874a099178115de09b163e2b2237e61/runtime/src/lib.rs#L523.&#xD;&#xA;&#xD;&#xA;This will add an `Option&lt;AssetId&gt;` to the signed extension. If it is `Some` in the extrinsic, it will use the defined asset as fee-payment token; otherwise it falls back to the native token.&#xD;&#xA;&#xD;&#xA;### Client&#xD;&#xA;&#xD;&#xA;In our encointer-client cli we use the substrate-api-client (subxt-alternative) library to connect to it: https://github.com/scs/substrate-api-client.&#xD;&#xA;&#xD;&#xA;Here, we define the signed extension type in extrinsic format: https://github.com/encointer/encointer-node/blob/6b5f32350874a099178115de09b163e2b2237e61/client/encointer-api-client-extension/src/extrinsic_params.rs#L17. It says `CommunityIdentifier` here because we don't use the pallet-assets. You will put `AssetId` there.&#xD;&#xA;&#xD;&#xA;At this point we define that we want to pay with the custom asset: https://github.com/encointer/encointer-node/blob/6b5f32350874a099178115de09b163e2b2237e61/client/src/main.rs#L331.&#xD;&#xA;&#xD;&#xA;#### Polkadot-js/apps sidenote&#xD;&#xA;&#xD;&#xA;The `SignedExtension` is not exposed in the metadata, hence you need to hardcode it. You need to manually add it to the polkadot-js/api type registry, see https://github.com/polkadot-js/apps/blob/c484456c12dbeeaccc701ec89d891e5e3f53a4cc/packages/apps-config/src/api/spec/encointer-para.ts#L247.&#xD;&#xA;&#xD;&#xA;This polkadot-js/apps fix is needed because otherwise polkadot-js/apps is not able to correctly interpret blocks that contain an extrinsic paid in the non-native asset, i.e., where the asset-tx-payment signed extension was `Some&lt;AssetId&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31660" PostHistoryTypeId="2" PostId="8052" RevisionGUID="a3e173a2-87ff-4e6a-9754-cf9be7d41093" CreationDate="2023-04-12T15:00:33.277" UserId="3070" Text="Following the tutorial for adding Claims Pallet to a Substrate blockchain.&#xD;&#xA;```&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn create_storage(origin: OriginFor&lt;T&gt;, claim: T::Hash, data: BoundedVec&lt;u8, T::MaxStringLength&gt;) -&gt; DispatchResult {&#xD;&#xA;```&#xD;&#xA;We are getting a warning:&#xD;&#xA;```&#xD;&#xA;warning: use of deprecated struct `pallet::warnings::revoke_claim`:                     Implicit call indices are deprecated in favour of explicit ones.&#xD;&#xA;Please ensure that all calls have the `pallet::call_index` attribute or that the&#xD;&#xA;`dev-mode` of the pallet is enabled. For more info see:&#xD;&#xA;&lt;https://github.com/paritytech/substrate/pull/12891&gt; and&#xD;&#xA;&lt;https://github.com/paritytech/substrate/pull/11381&gt;.&#xD;&#xA;```&#xD;&#xA;not sure how to use the call_index attribute?&#xD;&#xA;	" ContentLicense="CC BY-SA 4.0" />
  <row Id="31662" PostHistoryTypeId="1" PostId="8052" RevisionGUID="a3e173a2-87ff-4e6a-9754-cf9be7d41093" CreationDate="2023-04-12T15:00:33.277" UserId="3070" Text="Substrate Claim Tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="31663" PostHistoryTypeId="3" PostId="8052" RevisionGUID="a3e173a2-87ff-4e6a-9754-cf9be7d41093" CreationDate="2023-04-12T15:00:33.277" UserId="3070" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31664" PostHistoryTypeId="2" PostId="8053" RevisionGUID="32939375-c811-42c2-a6e2-6c00d9c699aa" CreationDate="2023-04-12T15:06:07.743" UserId="1989" Text="We have an extrinsic where the complexity is dictated by the number of items held in storage. Is it appropriate to read from storage in the weight annotation? See for example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(T::WeightInfo::update(T::Tree::num_leaves(root_key)))]&#xD;&#xA;pub fn update(origin: Origin, root_key: RootKey) -&gt; DispatchResult {&#xD;&#xA;    for i in T::Tree::num_leaves(root_key) {&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub trait Tree&lt;RootKey&gt; {&#xD;&#xA;    fn num_leaves(root_key: RootKey) -&gt; u32;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Tree&lt;T::RootKey&gt; for OtherPallet&lt;T&gt; {&#xD;&#xA;    fn num_leaves(root_key: T::RootKey) -&gt; u32 {&#xD;&#xA;        Branch::get(root_key).len() as u32&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31666" PostHistoryTypeId="1" PostId="8053" RevisionGUID="32939375-c811-42c2-a6e2-6c00d9c699aa" CreationDate="2023-04-12T15:06:07.743" UserId="1989" Text="Reading from storage in weight annotation" ContentLicense="CC BY-SA 4.0" />
  <row Id="31667" PostHistoryTypeId="3" PostId="8053" RevisionGUID="32939375-c811-42c2-a6e2-6c00d9c699aa" CreationDate="2023-04-12T15:06:07.743" UserId="1989" Text="|storage|weight|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31668" PostHistoryTypeId="5" PostId="8052" RevisionGUID="eed04ca5-0703-4ab0-9c42-823e08eaf3ed" CreationDate="2023-04-12T15:07:52.760" UserId="3070" Comment="deleted 2 characters in body" Text="Following the tutorial for adding Claims Pallet to a Substrate blockchain.&#xD;&#xA;```&#xD;&#xA;	#[pallet::call]&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(0)]&#xD;&#xA;		pub fn create_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash, data: BoundedVec&lt;u8, T::MaxStringLength&gt;) -&gt; DispatchResult {&#xD;&#xA;```&#xD;&#xA;We are getting a warning:&#xD;&#xA;```&#xD;&#xA;warning: use of deprecated struct `pallet::warnings::create_claim`:                     Implicit call indices are deprecated in favour of explicit ones.&#xD;&#xA;Please ensure that all calls have the `pallet::call_index` attribute or that the&#xD;&#xA;`dev-mode` of the pallet is enabled. For more info see:&#xD;&#xA;&lt;https://github.com/paritytech/substrate/pull/12891&gt; and&#xD;&#xA;&lt;https://github.com/paritytech/substrate/pull/11381&gt;.&#xD;&#xA;```&#xD;&#xA;not sure how to use the call_index attribute?&#xD;&#xA;	" ContentLicense="CC BY-SA 4.0" />
  <row Id="31669" PostHistoryTypeId="5" PostId="8053" RevisionGUID="1c2adf2a-9fc6-4711-af3d-d580f5ec394a" CreationDate="2023-04-12T15:20:20.267" UserId="1989" Comment="added 380 characters in body" Text="We have an extrinsic where the complexity is dictated by the number of items held in storage. Is it appropriate to read from storage in the weight annotation? See for example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait Tree&lt;RootKey&gt; {&#xD;&#xA;    fn num_leaves(root_key: RootKey) -&gt; u32;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: other_pallet::Config {&#xD;&#xA;    type Tree: Tree&lt;Self::RootKey&gt;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::weight(T::WeightInfo::update(T::Tree::num_leaves(root_key)))]&#xD;&#xA;pub fn update(origin: Origin, root_key: RootKey) -&gt; DispatchResult {&#xD;&#xA;    for i in T::Tree::num_leaves(root_key) {&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod other_pallet {&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    pub type Branch&lt;T: Config&gt; =&#xD;&#xA;        StorageMap&lt;_, Blake2_128Concat, T::RootKey, BTreeSet&lt;T::Item&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;    #[pallet::pallet]&#xD;&#xA;    pub struct OtherPallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;    impl&lt;T: Config&gt; Tree&lt;T::RootKey&gt; for OtherPallet&lt;T&gt; {&#xD;&#xA;        fn num_leaves(root_key: T::RootKey) -&gt; u32 {&#xD;&#xA;            Branch::get(root_key).len() as u32&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31670" PostHistoryTypeId="2" PostId="8054" RevisionGUID="3f22e9a2-8b79-4cc8-a4af-035cada0c04e" CreationDate="2023-04-12T15:24:16.103" UserId="2762" Text="You have to add the macro `call_index` in above your extrinsics:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA; #[pallet::call_index(0)]&#xD;&#xA; #[pallet::weight(0)]&#xD;&#xA; pub fn create_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash, data: BoundedVec&lt;u8, T::MaxStringLength&gt;) -&gt; DispatchResult {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see the example in the [pallet_template][1] in the node_template.&#xD;&#xA;&#xD;&#xA;And you can read more information about this [Macro in the docs][2]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/pallets/template/src/lib.rs#L66&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/frame_support_procedural/attr.call_index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="31672" PostHistoryTypeId="2" PostId="8055" RevisionGUID="6176b023-767c-4990-814f-aea8fc67ad58" CreationDate="2023-04-12T15:54:20.897" UserId="494" Text="relay validators execute parachain blocks... if parachain collators are benchmarked on HW that's **faster** than standard, that means relay validators will spend more time than expected executing parachain blocks, which will lead to issues on consensus...&#xD;&#xA;&#xD;&#xA;honestly, I think that going with standard HW is just easier because it avoids confusion and potential footguns!&#xD;&#xA;&#xD;&#xA;but if really needed, it should be ok if parachain runtimes are benchmarked so that collators have specs that are lower than standard, but not higher...&#xD;&#xA;&#xD;&#xA;that would probably be a waste of relay blockspace though ... probably not a big issue if there's not much throughput on the parachain, but definitely wasteful when parachain blocks are full!" ContentLicense="CC BY-SA 4.0" />
  <row Id="31674" PostHistoryTypeId="2" PostId="8056" RevisionGUID="c518aed8-d0bd-4d33-bd12-d3de4df91ef1" CreationDate="2023-04-12T16:06:45.083" UserId="94" Text="No this is not possible. The weight calculation has to be stateless and very fast - since it is itself not benchmarked.&#xD;&#xA;&#xD;&#xA;A solution that is often possible is to use a length witness as argument.  &#xD;&#xA;This provides as worst-case upper bound to make the weight calculation stateless.  &#xD;&#xA;One example would be in the [Alliance](https://github.com/paritytech/substrate/blob/7bbfe737a180e548ace7e819099dcb62cf48fa11/frame/alliance/src/lib.rs#L602) pallet.&#xD;&#xA;&#xD;&#xA;The pattern is as follows:  &#xD;&#xA;```rust&#xD;&#xA;// `length_witness` provides an upper bound for the worst-case weight. This needs&#xD;&#xA;// to be provided by the user.&#xD;&#xA;fn call(origin…, length_witness: u32) {&#xD;&#xA;    // Now you do the state-access to figure out how much effort it will actually take.&#xD;&#xA;    let actual_length = State&lt;…&gt;::get().len();&#xD;&#xA;    // ... and reject if it would be more than expected.&#xD;&#xA;    ensure!(length_witness &gt;= actual_length, Error::&lt;T&gt;::BadWitness);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The weight for figuring out how much work needs to be done should be constant. In this example it is just one state read.  &#xD;&#xA;You can also do a weight refund to mitigate over-estimations a bit." ContentLicense="CC BY-SA 4.0" />
  <row Id="31676" PostHistoryTypeId="2" PostId="8057" RevisionGUID="6c228d17-9e33-467d-bbb0-c6eb40124827" CreationDate="2023-04-12T17:21:53.820" UserId="4080" Text="lenovo@lenovo-IdeaPad-3-15ADA05-Ua:~/substrate-node-template$ cargo check -p node-template-runtime&#xD;&#xA;error: failed to load manifest for workspace member `/home/lenovo/substrate-node-template/node`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load manifest for dependency `node-template-runtime`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to parse manifest at `/home/lenovo/substrate-node-template/runtime/Cargo.toml`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  feature `runtime-benchmarks` includes `frame-benchmarking/runtime-benchmarks`, but `frame-benchmarking` is not a dependency" ContentLicense="CC BY-SA 4.0" />
  <row Id="31678" PostHistoryTypeId="1" PostId="8057" RevisionGUID="6c228d17-9e33-467d-bbb0-c6eb40124827" CreationDate="2023-04-12T17:21:53.820" UserId="4080" Text="Add Nicks pallete" ContentLicense="CC BY-SA 4.0" />
  <row Id="31679" PostHistoryTypeId="3" PostId="8057" RevisionGUID="6c228d17-9e33-467d-bbb0-c6eb40124827" CreationDate="2023-04-12T17:21:53.820" UserId="4080" Text="|polkadot-js|substrate-node-template|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31680" PostHistoryTypeId="2" PostId="8058" RevisionGUID="6e8036d5-11ee-4111-8bfd-596b837e0de0" CreationDate="2023-04-12T17:48:47.810" UserId="2762" Text="You have to import `frame-benchmarking` in your Cargo.toml&#xD;&#xA;&#xD;&#xA;    frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v0.9.40&quot; }&#xD;&#xA;&#xD;&#xA;Make sure `branch = &quot;polkadot-v0.9.40&quot;` has the same version as the rest of the imports.&#xD;&#xA;&#xD;&#xA;Look at the substrate-node-template as an example:  https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/Cargo.toml#L47" ContentLicense="CC BY-SA 4.0" />
  <row Id="31682" PostHistoryTypeId="5" PostId="8057" RevisionGUID="d6ef4724-8d40-4813-983e-2078ec5eb186" CreationDate="2023-04-12T17:49:37.420" UserId="2762" Comment="improved formatting" Text="```&#xD;&#xA;lenovo@lenovo-IdeaPad-3-15ADA05-Ua:~/substrate-node-template$ cargo check -p node-template-runtime&#xD;&#xA;    error: failed to load manifest for workspace member `/home/lenovo/substrate-node-template/node`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load manifest for dependency `node-template-runtime`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to parse manifest at `/home/lenovo/substrate-node-template/runtime/Cargo.toml`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  feature `runtime-benchmarks` includes `frame-benchmarking/runtime-benchmarks`, but `frame-benchmarking` is not a dependency&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31683" PostHistoryTypeId="2" PostId="8059" RevisionGUID="1812edc4-8233-4255-b762-64e1e9608618" CreationDate="2023-04-12T18:01:23.353" UserId="94" Text="Looking at the comments shows that `MinimumCollateralVault` was not read - therefore it should not be in the proof. &#xD;&#xA;The problem here is actually that the `Measured` is wrong. The estimated Proof size of zero is correct.&#xD;&#xA;&#xD;&#xA;This was fixed in [#13485](https://github.com/paritytech/substrate/pull/13485). Please try to update your Substrate version.  &#xD;&#xA;In any case; thanks for letting us know, only like this can we improve! When you are sure that there is a bug, you can better open an issue in [GitHub directly](https://github.com/paritytech/substrate/issues/new/choose)." ContentLicense="CC BY-SA 4.0" />
  <row Id="31685" PostHistoryTypeId="5" PostId="8023" RevisionGUID="aef403eb-8c50-4646-9c3d-e4af784f6689" CreationDate="2023-04-12T18:15:42.553" UserId="3559" Comment="added 1018 characters in body" Text="To add a new collator key to your Polkadot parachain in a development setup, you can follow these steps:&#xD;&#xA;&#xD;&#xA;Generate a new key pair for the collator using a tool such as subkey or polkadot-js.&#xD;&#xA;&#xD;&#xA;Add the new key to your local node's keystore by running the following command:&#xD;&#xA;&#xD;&#xA;polkadot-js keyring add &lt;key-name&gt; --type sr25519 --suri &lt;path-to-my-key&gt;&#xD;&#xA;&#xD;&#xA;Replace &lt;key-name&gt; with the name you want to give to your new key and &lt;path-to-my-key&gt; with the path to the file containing your key.&#xD;&#xA;&#xD;&#xA;Update your node's configuration file to include the new collator key. The configuration file is usually located in the ./config directory and is named chain_spec.rs. You will need to update the genesis section and add the new key to the validators array:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&quot;genesis&quot;: {&#xD;&#xA;    ...&#xD;&#xA;    &quot;validatorIds&quot;: [&#xD;&#xA;        &quot;&lt;existing-validator-1&gt;&quot;,&#xD;&#xA;        &quot;&lt;existing-validator-2&gt;&quot;,&#xD;&#xA;        &quot;&lt;new-collator-key&gt;&quot;&#xD;&#xA;    ]&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Replace &lt;existing-validator-1&gt; and &lt;existing-validator-2&gt; &#xD;&#xA;&#xD;&#xA;with the existing validator keys that you want to retain, and replace &lt;new-collator-key&gt; with the new key you just generated.&#xD;&#xA;&#xD;&#xA;Restart your node to apply the changes.&#xD;&#xA;&#xD;&#xA;Once you have completed these steps, your node should be able to function as a collator using the new key you added.&#xD;&#xA;&#xD;&#xA;edit1: Have you gone through these steps?&#xD;&#xA;&#xD;&#xA;Generate a new keypair for the collator node using the subkey command-line tool.&#xD;&#xA;&#xD;&#xA;subkey generate --scheme sr25519&#xD;&#xA;&#xD;&#xA;Add the generated key to the aura section of the collator's chain specification file.&#xD;&#xA;&#xD;&#xA;&quot;aura&quot;: {&#xD;&#xA;  &quot;authorities&quot;: [&quot;your_generated_key&quot;],&#xD;&#xA;  &quot;params&quot;: {&#xD;&#xA;    &quot;stepDuration&quot;: 6,&#xD;&#xA;    &quot;validators&quot;: 1&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Launch the collator node with the new key using the --validator and --key flags.&#xD;&#xA;&#xD;&#xA;./collator_binary --validator --key &quot;your_generated_key_seed&quot;&#xD;&#xA;&#xD;&#xA;Update the relay chain's chain specification file to include the parachain with the collator's node endpoint and ID.&#xD;&#xA;&#xD;&#xA;&quot;parachains&quot;: {&#xD;&#xA;  &quot;2001&quot;: {&#xD;&#xA;    &quot;bin&quot;: &quot;path/to/parachain/binary&quot;,&#xD;&#xA;    &quot;id&quot;: 2001,&#xD;&#xA;    &quot;paraGenesis&quot;: &quot;path/to/para/genesis&quot;,&#xD;&#xA;    &quot;collatorEndpoint&quot;: &quot;/ip4/&lt;collator_node_ip&gt;/tcp/&lt;collator_node_port&gt;&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Finally, start the relay chain and connect it with the parachain by referencing its ID.&#xD;&#xA;&#xD;&#xA;./relaychain_binary --parachain-id 2001&#xD;&#xA;I hope this helps. " ContentLicense="CC BY-SA 4.0" />
  <row Id="31690" PostHistoryTypeId="5" PostId="8023" RevisionGUID="d42a2fae-9ee8-45dd-9e9e-7c3fb7056040" CreationDate="2023-04-12T19:18:39.377" UserId="3559" Comment="added 2 characters in body" Text="To add a new collator key to your Polkadot parachain in a development setup, you can follow these steps:&#xD;&#xA;&#xD;&#xA;Generate a new key pair for the collator using a tool such as subkey or polkadot-js.&#xD;&#xA;&#xD;&#xA;Add the new key to your local node's keystore by running the following command:&#xD;&#xA;&#xD;&#xA;polkadot-js keyring add &lt;key-name&gt; --type sr25519 --suri &lt;path-to-my-key&gt;&#xD;&#xA;&#xD;&#xA;Replace &lt;key-name&gt; with the name you want to give to your new key and &lt;path-to-my-key&gt; with the path to the file containing your key.&#xD;&#xA;&#xD;&#xA;Update your node's configuration file to include the new collator key. The configuration file is usually located in the ./config directory and is named chain_spec.rs. You will need to update the genesis section and add the new key to the validators array:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&quot;genesis&quot;: {&#xD;&#xA;    ...&#xD;&#xA;    &quot;validatorIds&quot;: [&#xD;&#xA;        &quot;&lt;existing-validator-1&gt;&quot;,&#xD;&#xA;        &quot;&lt;existing-validator-2&gt;&quot;,&#xD;&#xA;        &quot;&lt;new-collator-key&gt;&quot;&#xD;&#xA;    ]&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Replace &lt;existing-validator-1&gt; and &lt;existing-validator-2&gt; &#xD;&#xA;&#xD;&#xA;with the existing validator keys that you want to retain, and replace &lt;new-collator-key&gt; with the new key you just generated.&#xD;&#xA;&#xD;&#xA;Restart your node to apply the changes.&#xD;&#xA;&#xD;&#xA;Once you have completed these steps, your node should be able to function as a collator using the new key you added.&#xD;&#xA;&#xD;&#xA;edit1: Have you gone through these steps?&#xD;&#xA;&#xD;&#xA;Generate a new keypair for the collator node using the subkey command-line tool.&#xD;&#xA;&#xD;&#xA;subkey generate --scheme sr25519&#xD;&#xA;&#xD;&#xA;Add the generated key to the aura section of the collator's chain specification file.&#xD;&#xA;&#xD;&#xA;&quot;aura&quot;: {&#xD;&#xA;  &quot;authorities&quot;: [&quot;your_generated_key&quot;],&#xD;&#xA;  &quot;params&quot;: {&#xD;&#xA;    &quot;stepDuration&quot;: 6,&#xD;&#xA;    &quot;validators&quot;: 1&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Launch the collator node with the new key using the --validator and --key flags.&#xD;&#xA;&#xD;&#xA;./collator_binary --validator --key &quot;your_generated_key_seed&quot;&#xD;&#xA;&#xD;&#xA;Update the relay chain's chain specification file to include the parachain with the collator's node endpoint and ID.&#xD;&#xA;&#xD;&#xA;&quot;parachains&quot;: {&#xD;&#xA;  &quot;2001&quot;: {&#xD;&#xA;    &quot;bin&quot;: &quot;path/to/parachain/binary&quot;,&#xD;&#xA;    &quot;id&quot;: 2001,&#xD;&#xA;    &quot;paraGenesis&quot;: &quot;path/to/para/genesis&quot;,&#xD;&#xA;    &quot;collatorEndpoint&quot;: &quot;/ip4/&lt;collator_node_ip&gt;/tcp/&lt;collator_node_port&gt;&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Finally, start the relay chain and connect it with the parachain by referencing its ID.&#xD;&#xA;&#xD;&#xA;./relaychain_binary --parachain-id 2001&#xD;&#xA;&#xD;&#xA;I hope this helps. " ContentLicense="CC BY-SA 4.0" />
  <row Id="31694" PostHistoryTypeId="5" PostId="8050" RevisionGUID="3e0a274f-67a6-48c2-92ee-fd7979a9a01e" CreationDate="2023-04-12T21:44:39.290" UserId="4028" Comment="added 2 characters in body" Text="I am trying to use the **libsecp256k1** library in a no-std environment and I get the following error when building the contract:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[wasm-validator error in module]  unexpected true: memory max &gt;= initial, on memory&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems like this happens while using the recover function only -&gt; The main problem is to try and recover a public key given an ethereum  signature and message.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;libsecp256k1 = { version=&quot;0.7.1&quot;, default-features = false, features = [&quot;static-context&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It looks like I need the static-context feature to be able to use the recovery function, however, after digging through the source code, it seems like recovery actually calls recovery_with_context, which actually adds an additional parameter - context, defined like this&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg(all(feature = &quot;static-context&quot;, not(feature = &quot;lazy-static-context&quot;)))]&#xD;&#xA;/// A static ECMult context.&#xD;&#xA;// Correct `pre_g` values are fed into `ECMultContext::new_from_raw`, generated by build script.&#xD;&#xA;pub static ECMULT_CONTEXT: ECMultContext =&#xD;&#xA;    unsafe { ECMultContext::new_from_raw(include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/const.rs&quot;))) };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[cfg(all(feature = &quot;static-context&quot;, not(feature = &quot;lazy-static-context&quot;)))]&#xD;&#xA;/// A static ECMultGen context.&#xD;&#xA;// Correct `prec` values are fed into `ECMultGenContext::new_from_raw`, generated by build script.&#xD;&#xA;pub static ECMULT_GEN_CONTEXT: ECMultGenContext =&#xD;&#xA;    unsafe { ECMultGenContext::new_from_raw(include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/const_gen.rs&quot;))) };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please note, that since this example is meant for the Phala Ink! environment, no standard libraries can be used. Alternatives are also welcome - we just want to extract the public key from the signature and message, as stated before.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn recover_pubkey(&amp;self, v: u8, r: Vec&lt;u8&gt;, s: Vec&lt;u8&gt;, message: Vec&lt;u8&gt;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31695" PostHistoryTypeId="2" PostId="8061" RevisionGUID="2d0b8f99-19c1-4222-a5dc-16ea95ce8906" CreationDate="2023-04-13T02:19:23.703" UserId="251" Text="I encountered this too, a few weeks ago. This is an issue of the library.&#xD;&#xA;&#xD;&#xA;See https://github.com/paritytech/libsecp256k1/issues/134.&#xD;&#xA;&#xD;&#xA;I can use sp-io's functions which are some host functions. But I'm not sure if that works for ink." ContentLicense="CC BY-SA 4.0" />
  <row Id="31697" PostHistoryTypeId="2" PostId="8062" RevisionGUID="cd0b85d5-3ce1-4ead-b45d-d1bac1fa1f7c" CreationDate="2023-04-13T02:20:38.480" UserId="484" Text="Try in to benchmark node pallets after Polkadot upgrade from 0.9.36 to 0.9.38 and get `cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement` error.&#xD;&#xA;&#xD;&#xA;I double checked that node and wasm runtimes are built with `runtime-benchmarks` feature.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;nix:devenv-shell) (devenv) bash-5.2$ COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full nix run .#composable-bench-node --impure -- benchmark pallet --chain=picasso-dev --pallet=&quot;*&quot; --extrinsic=&quot;*&quot;&#xD;&#xA;warning: Git tree '/home/dz/github.com/ComposableFi/composable' is dirty&#xD;&#xA;warning: Using saved setting for 'extra-substituters = https://cache.nixos.org https://nix-community.cachix.org https://nixpkgs-update.cachix.org https://devenv.cachix.org https://composable-community.cachix.org' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;warning: Using saved setting for 'extra-trusted-public-keys = composable-community.cachix.org-1:GG4xJNpXJ+J97I8EyJ4qI5tRTAJ4i7h+NK2Z32I8sK8= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 0 at #0    &#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 1 at #0    &#xD;&#xA;Error: &#xD;&#xA;   0: Invalid input: Did not find the benchmarking metadata. This could mean that you either did not build the node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was not created by a node that was compiled with the flag: cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:&#xD;&#xA;&#xD;&#xA;       * 98.06% - 72936 bytes - module functions&#xD;&#xA;   0: &#xD;&#xA;&#xD;&#xA;  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━&#xD;&#xA;   1: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::h075a91586537bb83&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   2: eyre::capture_handler::hc455214d4a0ef82b&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   3: eyre::error::&lt;impl core::convert::From&lt;E&gt; for eyre::Report&gt;::from::h9144b87cb2ba7d68&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   4: composable::main::h9794ada59db822a4&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   5: std::sys_common::backtrace::__rust_begin_short_backtrace::h97c0b3729103fb66&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   6: std::rt::lang_start::{{closure}}::h5fc4f928913452c2&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   7: std::rt::lang_start_internal::h33bb8f2385eabf94&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   8: main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   9: __libc_start_call_main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  10: __libc_start_main_alias_1&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  11: _start&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;&#xD;&#xA;Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.&#xD;&#xA;2023-04-13 03:16:40 Cannot create a runtime error=Other(&quot;cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:\n\n * 98.06% - 72936 bytes - module functions\n&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error from https://github.com/paritytech/substrate/blob/07c77323010d54410143103c2617ebc12e0a12f3/client/executor/src/wasm_runtime.rs#L271" ContentLicense="CC BY-SA 4.0" />
  <row Id="31699" PostHistoryTypeId="1" PostId="8062" RevisionGUID="cd0b85d5-3ce1-4ead-b45d-d1bac1fa1f7c" CreationDate="2023-04-13T02:20:38.480" UserId="484" Text="cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes" ContentLicense="CC BY-SA 4.0" />
  <row Id="31700" PostHistoryTypeId="3" PostId="8062" RevisionGUID="cd0b85d5-3ce1-4ead-b45d-d1bac1fa1f7c" CreationDate="2023-04-13T02:20:38.480" UserId="484" Text="|runtime|benchmarking|wasm|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31701" PostHistoryTypeId="5" PostId="8062" RevisionGUID="db3c5853-55a0-4a09-b528-edcbb8bec0b9" CreationDate="2023-04-13T02:31:44.797" UserId="484" Comment="added 149 characters in body" Text="Try in to benchmark node pallets after Polkadot upgrade from 0.9.36 to 0.9.38 and get `cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement` error.&#xD;&#xA;&#xD;&#xA;I double checked that node and wasm runtimes are built with `runtime-benchmarks` feature.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;nix:devenv-shell) (devenv) bash-5.2$ COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full nix run .#composable-bench-node --impure -- benchmark pallet --chain=picasso-dev --pallet=&quot;*&quot; --extrinsic=&quot;*&quot;&#xD;&#xA;warning: Git tree '/home/dz/github.com/ComposableFi/composable' is dirty&#xD;&#xA;warning: Using saved setting for 'extra-substituters = https://cache.nixos.org https://nix-community.cachix.org https://nixpkgs-update.cachix.org https://devenv.cachix.org https://composable-community.cachix.org' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;warning: Using saved setting for 'extra-trusted-public-keys = composable-community.cachix.org-1:GG4xJNpXJ+J97I8EyJ4qI5tRTAJ4i7h+NK2Z32I8sK8= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 0 at #0    &#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 1 at #0    &#xD;&#xA;Error: &#xD;&#xA;   0: Invalid input: Did not find the benchmarking metadata. This could mean that you either did not build the node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was not created by a node that was compiled with the flag: cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:&#xD;&#xA;&#xD;&#xA;       * 98.06% - 72936 bytes - module functions&#xD;&#xA;   0: &#xD;&#xA;&#xD;&#xA;  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━&#xD;&#xA;   1: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::h075a91586537bb83&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   2: eyre::capture_handler::hc455214d4a0ef82b&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   3: eyre::error::&lt;impl core::convert::From&lt;E&gt; for eyre::Report&gt;::from::h9144b87cb2ba7d68&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   4: composable::main::h9794ada59db822a4&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   5: std::sys_common::backtrace::__rust_begin_short_backtrace::h97c0b3729103fb66&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   6: std::rt::lang_start::{{closure}}::h5fc4f928913452c2&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   7: std::rt::lang_start_internal::h33bb8f2385eabf94&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   8: main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   9: __libc_start_call_main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  10: __libc_start_main_alias_1&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  11: _start&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;&#xD;&#xA;Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.&#xD;&#xA;2023-04-13 03:16:40 Cannot create a runtime error=Other(&quot;cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:\n\n * 98.06% - 72936 bytes - module functions\n&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error from https://github.com/paritytech/substrate/blob/07c77323010d54410143103c2617ebc12e0a12f3/client/executor/src/wasm_runtime.rs#L271&#xD;&#xA;&#xD;&#xA;It seems related to WASM page size https://github.com/search?q=org%3Aparitytech+65536&amp;type=code . So I do not handle page size anywhere directly." ContentLicense="CC BY-SA 4.0" />
  <row Id="31702" PostHistoryTypeId="5" PostId="8062" RevisionGUID="32f1ee94-af29-4c4e-9a0c-a7216dc528fb" CreationDate="2023-04-13T02:39:57.010" UserId="484" Comment="added 60 characters in body" Text="Try in to benchmark node pallets after Polkadot upgrade from 0.9.36 to 0.9.38 and get `cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement` error.&#xD;&#xA;&#xD;&#xA;I double checked that node and wasm runtimes are built with `runtime-benchmarks` feature.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;nix:devenv-shell) (devenv) bash-5.2$ COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full nix run .#composable-bench-node --impure -- benchmark pallet --chain=picasso-dev --pallet=&quot;*&quot; --extrinsic=&quot;*&quot;&#xD;&#xA;warning: Git tree '/home/dz/github.com/ComposableFi/composable' is dirty&#xD;&#xA;warning: Using saved setting for 'extra-substituters = https://cache.nixos.org https://nix-community.cachix.org https://nixpkgs-update.cachix.org https://devenv.cachix.org https://composable-community.cachix.org' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;warning: Using saved setting for 'extra-trusted-public-keys = composable-community.cachix.org-1:GG4xJNpXJ+J97I8EyJ4qI5tRTAJ4i7h+NK2Z32I8sK8= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 0 at #0    &#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 1 at #0    &#xD;&#xA;Error: &#xD;&#xA;   0: Invalid input: Did not find the benchmarking metadata. This could mean that you either did not build the node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was not created by a node that was compiled with the flag: cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:&#xD;&#xA;&#xD;&#xA;       * 98.06% - 72936 bytes - module functions&#xD;&#xA;   0: &#xD;&#xA;&#xD;&#xA;  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━&#xD;&#xA;   1: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::h075a91586537bb83&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   2: eyre::capture_handler::hc455214d4a0ef82b&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   3: eyre::error::&lt;impl core::convert::From&lt;E&gt; for eyre::Report&gt;::from::h9144b87cb2ba7d68&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   4: composable::main::h9794ada59db822a4&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   5: std::sys_common::backtrace::__rust_begin_short_backtrace::h97c0b3729103fb66&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   6: std::rt::lang_start::{{closure}}::h5fc4f928913452c2&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   7: std::rt::lang_start_internal::h33bb8f2385eabf94&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   8: main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   9: __libc_start_call_main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  10: __libc_start_main_alias_1&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  11: _start&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;&#xD;&#xA;Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.&#xD;&#xA;2023-04-13 03:16:40 Cannot create a runtime error=Other(&quot;cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:\n\n * 98.06% - 72936 bytes - module functions\n&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error from https://github.com/paritytech/substrate/blob/07c77323010d54410143103c2617ebc12e0a12f3/client/executor/src/wasm_runtime.rs#L271&#xD;&#xA;&#xD;&#xA;It seems related to WASM page size https://github.com/search?q=org%3Aparitytech+65536&amp;type=code . So I do not handle page size anywhere directly.&#xD;&#xA;&#xD;&#xA;Setting `--heap-pages` to various values did not helped." ContentLicense="CC BY-SA 4.0" />
  <row Id="31703" PostHistoryTypeId="5" PostId="8062" RevisionGUID="c8cb620e-b19d-4acc-a333-96f3bb441699" CreationDate="2023-04-13T03:13:08.090" UserId="484" Comment="added 309 characters in body" Text="Try in to benchmark node pallets after Polkadot upgrade from 0.9.36 to 0.9.38 and get `cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement` error.&#xD;&#xA;&#xD;&#xA;I double checked that node and wasm runtimes are built with `runtime-benchmarks` feature.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;nix:devenv-shell) (devenv) bash-5.2$ COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full nix run .#composable-bench-node --impure -- benchmark pallet --chain=picasso-dev --pallet=&quot;*&quot; --extrinsic=&quot;*&quot;&#xD;&#xA;warning: Git tree '/home/dz/github.com/ComposableFi/composable' is dirty&#xD;&#xA;warning: Using saved setting for 'extra-substituters = https://cache.nixos.org https://nix-community.cachix.org https://nixpkgs-update.cachix.org https://devenv.cachix.org https://composable-community.cachix.org' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;warning: Using saved setting for 'extra-trusted-public-keys = composable-community.cachix.org-1:GG4xJNpXJ+J97I8EyJ4qI5tRTAJ4i7h+NK2Z32I8sK8= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 0 at #0    &#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 1 at #0    &#xD;&#xA;Error: &#xD;&#xA;   0: Invalid input: Did not find the benchmarking metadata. This could mean that you either did not build the node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was not created by a node that was compiled with the flag: cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:&#xD;&#xA;&#xD;&#xA;       * 98.06% - 72936 bytes - module functions&#xD;&#xA;   0: &#xD;&#xA;&#xD;&#xA;  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━&#xD;&#xA;   1: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::h075a91586537bb83&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   2: eyre::capture_handler::hc455214d4a0ef82b&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   3: eyre::error::&lt;impl core::convert::From&lt;E&gt; for eyre::Report&gt;::from::h9144b87cb2ba7d68&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   4: composable::main::h9794ada59db822a4&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   5: std::sys_common::backtrace::__rust_begin_short_backtrace::h97c0b3729103fb66&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   6: std::rt::lang_start::{{closure}}::h5fc4f928913452c2&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   7: std::rt::lang_start_internal::h33bb8f2385eabf94&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   8: main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   9: __libc_start_call_main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  10: __libc_start_main_alias_1&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  11: _start&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;&#xD;&#xA;Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.&#xD;&#xA;2023-04-13 03:16:40 Cannot create a runtime error=Other(&quot;cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:\n\n * 98.06% - 72936 bytes - module functions\n&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error from https://github.com/paritytech/substrate/blob/07c77323010d54410143103c2617ebc12e0a12f3/client/executor/src/wasm_runtime.rs#L271&#xD;&#xA;&#xD;&#xA;It seems related to WASM page size https://github.com/search?q=org%3Aparitytech+65536&amp;type=code . So I do not handle page size anywhere directly.&#xD;&#xA;&#xD;&#xA;Setting `--heap-pages` to various values did not helped.&#xD;&#xA;&#xD;&#xA;I got this run, &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full nix run .#composable-bench-node --impure -- benchmark pallet --chain=picasso-dev --pallet=&quot;*&quot; --extrinsic=&quot;*&quot; --execution=wasm  --no-verify --wasm-execution interpreted-i-know-what-i-do&#xD;&#xA;``` &#xD;&#xA;but sure I do not want benchmark interpreter." ContentLicense="CC BY-SA 4.0" />
  <row Id="31704" PostHistoryTypeId="5" PostId="8045" RevisionGUID="4901ee4d-fa74-4d74-9491-aa8345ed701a" CreationDate="2023-04-13T07:37:39.167" UserId="3317" Comment="added 457 characters in body" Text="I think you mean the tutorial where `pallet-contracts` was added to the `substrate-node-template`. This tutorial is indeed removed.&#xD;&#xA;&#xD;&#xA;You can use [substrate-contracts-node][1] where you have a node-template with `pallet-contracts`.&#xD;&#xA;&#xD;&#xA;EDIT (after comment): cargo contract uses JSON-RPC to interact with the contracts node template ([ref][2]):&#xD;&#xA;```&#xD;&#xA;cargo contract build&#xD;&#xA;cargo contract upload --suri //Alice&#xD;&#xA;cargo contract instantiate --suri //Alice --args ...&#xD;&#xA;cargo contract call --contract ... --message get --dry-run --suri //Alice&#xD;&#xA;```&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [2]: https://use.ink/getting-started/calling-your-contract&#xD;&#xA;  [3]: https://i.stack.imgur.com/BRvjW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31705" PostHistoryTypeId="5" PostId="8045" RevisionGUID="7dc02779-cc0f-49e4-b5b6-a1ea82b1f7c3" CreationDate="2023-04-13T07:43:22.587" UserId="3317" Comment="added 20 characters in body" Text="I think you mean the tutorial where `pallet-contracts` was added to the `substrate-node-template`. This tutorial is indeed removed.&#xD;&#xA;&#xD;&#xA;You can use [substrate-contracts-node][1] where you have a node-template with `pallet-contracts`.&#xD;&#xA;&#xD;&#xA;Additional info (after comment): cargo contract uses JSON-RPC to interact with the contracts node template ([see ink docs][2]):&#xD;&#xA;```&#xD;&#xA;cargo contract build&#xD;&#xA;cargo contract upload --suri //Alice&#xD;&#xA;cargo contract instantiate --suri //Alice --args ...&#xD;&#xA;cargo contract call --contract ... --message get --dry-run --suri //Alice&#xD;&#xA;```&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [2]: https://use.ink/getting-started/calling-your-contract&#xD;&#xA;  [3]: https://i.stack.imgur.com/BRvjW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31707" PostHistoryTypeId="2" PostId="8063" RevisionGUID="d1e9b8ee-3557-4fa3-abc5-e702ff8f2260" CreationDate="2023-04-13T08:09:45.190" UserId="29" Text="I am creating a [subxt](https://github.com/paritytech/subxt) call where I need to add a signed extension. Is there an example of where I would add the signed extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31709" PostHistoryTypeId="1" PostId="8063" RevisionGUID="d1e9b8ee-3557-4fa3-abc5-e702ff8f2260" CreationDate="2023-04-13T08:09:45.190" UserId="29" Text="Where do I add a SignedExtension in a subxt call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31710" PostHistoryTypeId="3" PostId="8063" RevisionGUID="d1e9b8ee-3557-4fa3-abc5-e702ff8f2260" CreationDate="2023-04-13T08:09:45.190" UserId="29" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31713" PostHistoryTypeId="2" PostId="8065" RevisionGUID="dd5918e4-e869-4927-b21b-3bdb646a3e81" CreationDate="2023-04-13T08:23:15.863" UserId="3989" Text="I have read through the documentation on `Substrate.io` and have created a network of nodes in both a relay and parachain with custom keys. The network is running in Kubernetes (I would like to have full control of the pods and therefore decided not to go with Zombienet after facing some issues with it) and the nodes are peering, but not authoring any blocks.&#xD;&#xA;&#xD;&#xA;I am using a fork of the Polkadot `v0.9.37` branch (without any changes) and a parachain built using the [substrate-parachain-template](https://github.com/substrate-developer-hub/substrate-parachain-template) (modified to use `v0.9.37` versions of the Substrate dependencies) with changes to the `template` pallet and custom RPC endpoints.&#xD;&#xA;&#xD;&#xA;I used the `rococo-local` as the foundation for my relay chain and the `local-testnet` (renamed it to `energy-testnet`) for my parachain.&#xD;&#xA;&#xD;&#xA;Log from parachain boot node:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-04-13 07:04:57 Parachain Collator Template&#xD;&#xA;2023-04-13 07:04:57 ✌️version 0.1.0-faec041209f&#xD;&#xA;2023-04-13 07:04:57 ❤️by Anonymous, 2020-2023&#xD;&#xA;2023-04-13 07:04:57  Chain specification: Local Testnet &#xD;&#xA;2023-04-13 07:04:57 Node name: energy-boot-node&#xD;&#xA;2023-04-13 07:04:57  Role: AUTHORITY&#xD;&#xA;2023-04-13 07:04:57  Database: RocksDb at /config/node/chains/energy_testnet/db/full&#xD;&#xA;2023-04-13 07:04:57 ⛓Native runtime: energychain-parachain-1 (energychain-parachain-0.tx1.au1)&#xD;&#xA;2023-04-13 07:05:00 Parachain id: Id(1000)&#xD;&#xA;2023-04-13 07:05:00 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ 2023-04-13 07:05:00 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000c98e1a39ca632a5836ccb914d2e3bc0fabe6246265025afa5a102bb29750206e03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400&#xD;&#xA;2023-04-13 07:05:00 Is collating: yes &#xD;&#xA;2023-04-13 07:05:02 [Parachain]  Initializing Genesis block/state (state: 0xc98e…206e, header-hash: 0xea88…7edd)&#xD;&#xA;2023-04-13 07:05:06 [Relaychain]  Initializing Genesis block/state (state: 0x3867…dcb5, header-hash: 0x3715…6934)&#xD;&#xA;2023-04-13 07:05:07 [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.&#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.&#xD;&#xA;2023-04-13 07:05:10 [Relaychain] Local node identity is: 12D3KooWSbRiHWMGXznDBD5SBWGDAEnCw4JHwfKFgHMEf87gcpHj&#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Operating system: linux &#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  CPU architecture: x86_64&#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Target environment: gnu &#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  CPU: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz 2023-04-13 07:05:10 [Relaychain]  CPU cores: 4&#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Memory: 15721MB &#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Kernel: 5.19.0-38-generic &#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Linux distribution: Ubuntu 22.04.1 LTS&#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Virtual machine: no &#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Highest known block at #0 &#xD;&#xA;2023-04-13 07:05:10 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616&#xD;&#xA;2023-04-13 07:05:10 [Relaychain] Running JSON-RPC HTTP server: addr=127.0.0.1:9934, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]&#xD;&#xA;2023-04-13 07:05:10 [Relaychain] Running JSON-RPC WS server: addr=127.0.0.1:9977, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;,&quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]&#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  CPU score: 333.41 MiBs&#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Memory score: 9.14 GiBs &#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Disk score (seq. writes): 113.87 MiBs &#xD;&#xA;2023-04-13 07:05:10 [Relaychain]  Disk score (rand. writes): 58.94 MiBs &#xD;&#xA;2023-04-13 07:05:10 [Relaychain] Starting with an empty approval vote DB. &#xD;&#xA;2023-04-13 07:05:10 [Parachain] Local node identity is: 12D3KooWJvrd6tfTbU33MnB8dyyW2iErNtvnKNyNYYWe7EzSqMU4&#xD;&#xA;2023-04-13 07:05:10 [Parachain]  Operating system: linux&#xD;&#xA;2023-04-13 07:05:10 [Parachain]  CPU architecture: x86_64 &#xD;&#xA;2023-04-13 07:05:10 [Parachain]  Target environment: gnu&#xD;&#xA;2023-04-13 07:05:10 [Parachain]  CPU: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz&#xD;&#xA;2023-04-13 07:05:10 [Parachain]  Memory: 15721MB&#xD;&#xA;2023-04-13 07:05:10 [Parachain]  Kernel: 5.19.0-38-generic &#xD;&#xA;2023-04-13 07:05:10 [Parachain]  Linux distribution: Ubuntu 22.04.1 LTS&#xD;&#xA;2023-04-13 07:05:10 [Parachain]  Virtual machine: no &#xD;&#xA;2023-04-13 07:05:10 [Parachain]  Highest known block at #0 &#xD;&#xA;2023-04-13 07:05:10 [Parachain] 〽️ Prometheus exporter started at 0.0.0.0:9615&#xD;&#xA;2023-04-13 07:05:10 [Parachain] Running JSON-RPC HTTP server: addr=0.0.0.0:9933, allowed origins=[&quot;*&quot;]&#xD;&#xA;2023-04-13 07:05:10 [Parachain] Running JSON-RPC WS server: addr=0.0.0.0:9944, allowed origins=[&quot;*&quot;]&#xD;&#xA;2023-04-13 07:05:10 [Parachain]  CPU score: 333.41 MiBs&#xD;&#xA;2023-04-13 07:05:10 [Parachain]  Memory score: 9.14 GiBs &#xD;&#xA;2023-04-13 07:05:10 [Parachain]  Disk score (seq. writes): 113.87 MiBs &#xD;&#xA;2023-04-13 07:05:10 [Parachain]  Disk score (rand. writes): 58.94 MiBs &#xD;&#xA;2023-04-13 07:05:10 [Relaychain] discovered: 12D3KooWJvrd6tfTbU33MnB8dyyW2iErNtvnKNyNYYWe7EzSqMU4 /ip4/10.244.1.4/tcp/30333 &#xD;&#xA;2023-04-13 07:05:10 [Parachain] discovered: 12D3KooWSbRiHWMGXznDBD5SBWGDAEnCw4JHwfKFgHMEf87gcpHj /ip4/10.244.1.4/tcp/30343/ws &#xD;&#xA;2023-04-13 07:05:14 Accepting new connection 1/100 &#xD;&#xA;2023-04-13 07:05:15 [Relaychain]  Idle (3 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 5.1kiB/s ⬆ 5.3kiB/s&#xD;&#xA;2023-04-13 07:05:15 [Parachain]  Idle (0 peers), best: #0 (0xea88…7edd), finalized #0 (0xea88…7edd), ⬇ 1.1kiB/s ⬆ 0.7kiB/s&#xD;&#xA;...&#xD;&#xA;2023-04-13 07:05:57 [Relaychain]  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 1.1kiB/s ⬆ 3.5kiB/s&#xD;&#xA;2023-04-13 07:05:57 [Parachain]  Idle (4 peers), best: #0 (0xea88…7edd), finalized #0 (0xea88…7edd), ⬇ 0.7kiB/s ⬆ 0.8kiB/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Log from relay chain boot node (with the `-lparachain=debug` flag):&#xD;&#xA;```&#xD;&#xA;2023-04-13 07:04:38.439  INFO main sc_cli::runner: Parity Polkadot                             &#xD;&#xA;2023-04-13 07:04:38.439  INFO main sc_cli::runner: ✌️  version 0.9.37-89e7646f52c               &#xD;&#xA;2023-04-13 07:04:38.439  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2023                   &#xD;&#xA;2023-04-13 07:04:38.439  INFO main sc_cli::runner:  Chain specification: Rococo Local Testnet&#xD;&#xA;2023-04-13 07:04:38.440  INFO main sc_cli::runner:   Node name: relay-boot-node               &#xD;&#xA;2023-04-13 07:04:38.440  INFO main sc_cli::runner:  Role: AUTHORITY                          &#xD;&#xA;2023-04-13 07:04:38.440  INFO main sc_cli::runner:  Database: RocksDb at /config/node/chains/rococo_local_testnet/db/full &#xD;&#xA;2023-04-13 07:04:38.440  INFO main sc_cli::runner: ⛓  Native runtime: rococo-9370 (parity-rococo-v2.0-0.tx18.au0)           &#xD;&#xA;2023-04-13 07:04:43.800  INFO main sc_service::client::client:  Initializing Genesis block/state (state: 0x3867…dcb5, header-hash: 0x3715…6934)                &#xD;&#xA;2023-04-13 07:04:43.816 DEBUG main parachain::chain-selection: Using dispute aware relay-chain selection algorithm          &#xD;&#xA;2023-04-13 07:04:43.819  INFO main grandpa:  Loading GRANDPA authority set from genesis on what appears to be first startup.                                   &#xD;&#xA;2023-04-13 07:04:45.541  INFO main babe:  Creating empty BABE epoch changes on what appears to be first startup.          &#xD;&#xA;2023-04-13 07:04:45.549  INFO main sub-libp2p:   Local node identity is: 12D3KooWSB9qo3ecn3YGz2MsDKcG8SAp4c61RYTpN5vQDhBhr5xn                                   &#xD;&#xA;2023-04-13 07:04:45.769  INFO main sc_sysinfo:  Operating system: linux                      &#xD;&#xA;2023-04-13 07:04:45.769  INFO main sc_sysinfo:  CPU architecture: x86_64                     &#xD;&#xA;2023-04-13 07:04:45.769  INFO main sc_sysinfo:  Target environment: gnu                      &#xD;&#xA;2023-04-13 07:04:45.769  INFO main sc_sysinfo:  CPU: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz&#xD;&#xA;2023-04-13 07:04:45.769  INFO main sc_sysinfo:  CPU cores: 4                                 &#xD;&#xA;2023-04-13 07:04:45.769  INFO main sc_sysinfo:  Memory: 15721MB                              &#xD;&#xA;2023-04-13 07:04:45.769  INFO main sc_sysinfo:  Kernel: 5.19.0-38-generic                    &#xD;&#xA;2023-04-13 07:04:45.769  INFO main sc_sysinfo:  Linux distribution: Ubuntu 22.04.1 LTS       &#xD;&#xA;2023-04-13 07:04:45.769  INFO main sc_sysinfo:  Virtual machine: no                          &#xD;&#xA;2023-04-13 07:04:45.769  INFO main sc_service::builder:  Highest known block at #0           &#xD;&#xA;2023-04-13 07:04:45.770  INFO tokio-runtime-worker substrate_prometheus_endpoint: 〽️ Prometheus exporter started at 127.0.0.1:9615                               &#xD;&#xA;2023-04-13 07:04:45.776  INFO                 main sc_rpc_server: Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]&#xD;&#xA;2023-04-13 07:04:45.778  INFO                 main sc_rpc_server: Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;,&quot;https://polkadot.js.org&quot;]&#xD;&#xA;2023-04-13 07:04:45.779  INFO                 main sc_sysinfo:  CPU score: 805.37 MiBs       &#xD;&#xA;2023-04-13 07:04:45.779  INFO                 main sc_sysinfo:  Memory score: 8.10 GiBs      &#xD;&#xA;2023-04-13 07:04:45.779  INFO                 main sc_sysinfo:  Disk score (seq. writes): 132.13 MiBs                     &#xD;&#xA;2023-04-13 07:04:45.779  INFO                 main sc_sysinfo:  Disk score (rand. writes): 65.58 MiBs                     &#xD;&#xA;2023-04-13 07:04:45.794  INFO tokio-runtime-worker parachain::approval-voting: Starting with an empty approval vote DB.     &#xD;&#xA;2023-04-13 07:04:45.795  INFO                 main babe:  Starting BABE Authorship worker                                                                                   &#xD;&#xA;2023-04-13 07:04:45.800 DEBUG tokio-runtime-worker parachain::pvf-checker: Examining activation of leaf 0x3715e8ad0100ec1d2cecc6f6441f6a8b5dffcf17e52d92c5b16e19e203216934 (0)&#xD;&#xA;2023-04-13 07:04:45.807 DEBUG tokio-runtime-worker parachain::gossip-support: New session detected session_index=0&#xD;&#xA;2023-04-13 07:04:45.808 DEBUG tokio-runtime-worker parachain::approval-distribution: Got new blocks []&#xD;&#xA;2023-04-13 07:04:45.808 DEBUG tokio-runtime-worker parachain::gossip-support: Determined past/present/future authorities authority_count=2                                    &#xD;&#xA;2023-04-13 07:04:45.808 DEBUG tokio-runtime-worker parachain::gossip-support: Issuing a connection request num=0                                                              &#xD;&#xA;2023-04-13 07:04:45.808 DEBUG tokio-runtime-worker parachain::gossip-support: error=NotAValidator                                                                             &#xD;&#xA;2023-04-13 07:04:45.808 DEBUG tokio-runtime-worker parachain::validator-discovery: New ConnectToValidators resolved request peer_set=Validation num_peers=0 removed=0         &#xD;&#xA;2023-04-13 07:04:50.780  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0 ⬆ 0                                  &#xD;&#xA;2023-04-13 07:04:50.794 DEBUG tokio-runtime-worker parachain::chain-selection: Prepared 0 stagnant entries for pruning up_to=1681279490 min_ts=0 max_ts=0                     &#xD;&#xA;2023-04-13 07:04:55.780  INFO tokio-runtime-worker substrate:  Idle (0 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0 ⬆ 0                                  &#xD;&#xA;2023-04-13 07:04:55.795 DEBUG tokio-runtime-worker parachain::chain-selection: Prepared 0 stagnant entries for pruning up_to=1681279495 min_ts=0 max_ts=0                     &#xD;&#xA;2023-04-13 07:04:59.513  INFO tokio-runtime-worker sub-libp2p:  Discovered new external address for our node: /dns/relay-boot-node-service/tcp/30333/p2p/12D3KooWSB9qo3ecn3YGz2MsDKcG8SAp4c61RYTpN5vQDhBhr5xn&#xD;&#xA;2023-04-13 07:05:00.781  INFO tokio-runtime-worker substrate:  Idle (1 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 1.5kiB/s ⬆ 1.5kiB/s                    &#xD;&#xA;2023-04-13 07:05:00.795 DEBUG tokio-runtime-worker parachain::chain-selection: Prepared 0 stagnant entries for pruning up_to=1681279500 min_ts=0 max_ts=0                     &#xD;&#xA;2023-04-13 07:05:05.782  INFO tokio-runtime-worker substrate:  Idle (1 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.2kiB/s ⬆ 0.1kiB/s                    &#xD;&#xA;2023-04-13 07:05:05.797 DEBUG tokio-runtime-worker parachain::chain-selection: Prepared 0 stagnant entries for pruning up_to=1681279505 min_ts=0 max_ts=0                     &#xD;&#xA;2023-04-13 07:05:10.783  INFO tokio-runtime-worker substrate:  Idle (3 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 2.0kiB/s ⬆ 2.0kiB/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Log from second parachain node:&#xD;&#xA;```&#xD;&#xA;2023-04-13 07:04:52 Parity Polkadot                                                                             &#xD;&#xA;2023-04-13 07:04:52 ✌️  version 0.9.37-89e7646f52c                                                               &#xD;&#xA;2023-04-13 07:04:52 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2023                                      &#xD;&#xA;2023-04-13 07:04:52  Chain specification: Rococo Local Testnet                                                &#xD;&#xA;2023-04-13 07:04:52   Node name: relay-node-0                                                                  &#xD;&#xA;2023-04-13 07:04:52  Role: AUTHORITY                                                                          &#xD;&#xA;2023-04-13 07:04:52  Database: RocksDb at /config/node/chains/rococo_local_testnet/db/full                    &#xD;&#xA;2023-04-13 07:04:52 ⛓  Native runtime: rococo-9370 (parity-rococo-v2.0-0.tx18.au0)                              &#xD;&#xA;2023-04-13 07:04:58  Creating empty BABE epoch changes on what appears to be first startup.                   &#xD;&#xA;2023-04-13 07:04:58   Local node identity is: 12D3KooWCdWwzXb4gEoGRYwbGwEVh2gcUaPP3qqSStNwZZYDhtgf             &#xD;&#xA;2023-04-13 07:04:58  Operating system: linux                                                                  &#xD;&#xA;2023-04-13 07:04:58  CPU architecture: x86_64                                                                 &#xD;&#xA;2023-04-13 07:04:58  Target environment: gnu                                                                  &#xD;&#xA;2023-04-13 07:04:58  CPU: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz                                            &#xD;&#xA;2023-04-13 07:04:58  CPU cores: 4                                                                             &#xD;&#xA;2023-04-13 07:04:58  Memory: 15721MB                                                                          &#xD;&#xA;2023-04-13 07:04:58  Kernel: 5.19.0-38-generic                                                                &#xD;&#xA;2023-04-13 07:04:58  Linux distribution: Ubuntu 22.04.1 LTS                                                   &#xD;&#xA;2023-04-13 07:04:58  Virtual machine: no                                                                      &#xD;&#xA;2023-04-13 07:04:58  Highest known block at #0                                                                &#xD;&#xA;2023-04-13 07:04:58 〽️ Prometheus exporter started at 127.0.0.1:9615                                            &#xD;&#xA;2023-04-13 07:04:58 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]&#xD;&#xA;2023-04-13 07:04:58 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]&#xD;&#xA;2023-04-13 07:04:58  CPU score: 879.27 MiBs                                                                   &#xD;&#xA;2023-04-13 07:04:58  Memory score: 10.49 GiBs                                                                 &#xD;&#xA;2023-04-13 07:04:58  Disk score (seq. writes): 126.21 MiBs                                                    &#xD;&#xA;2023-04-13 07:04:58  Disk score (rand. writes): 50.08 MiBs                                                    &#xD;&#xA;2023-04-13 07:04:58 Starting with an empty approval vote DB.                                                    &#xD;&#xA;2023-04-13 07:04:58  Starting BABE Authorship worker                                                          &#xD;&#xA;2023-04-13 07:05:03  Idle (1 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 1.5kiB/s ⬆ 1.6kiB/s&#xD;&#xA;2023-04-13 07:05:08  Idle (1 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.1kiB/s ⬆ 0.1kiB/s&#xD;&#xA;2023-04-13 07:05:13  Idle (3 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 2.3kiB/s ⬆ 2.5kiB/s &#xD;&#xA;2023-04-13 07:05:18  Idle (4 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 1.8kiB/s ⬆ 2.2kiB/s &#xD;&#xA;2023-04-13 07:05:23  Idle (4 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.3kiB/s ⬆ 0.8kiB/s &#xD;&#xA;2023-04-13 07:05:28  Idle (4 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.9kiB/s ⬆ 0.9kiB/s &#xD;&#xA;2023-04-13 07:05:33  Idle (6 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 3.2kiB/s ⬆ 3.8kiB/s &#xD;&#xA;2023-04-13 07:05:38  Idle (7 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 1.3kiB/s ⬆ 2.5kiB/s &#xD;&#xA;2023-04-13 07:05:43  Idle (8 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 1.7kiB/s ⬆ 4.8kiB/s &#xD;&#xA;2023-04-13 07:05:48  Idle (8 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.6kiB/s ⬆ 2.0kiB/s &#xD;&#xA;2023-04-13 07:05:53  Idle (9 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 1.1kiB/s ⬆ 2.7kiB/s &#xD;&#xA;2023-04-13 07:05:58  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 1.5kiB/s ⬆ 3.8kiB/s&#xD;&#xA;2023-04-13 07:06:03  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 8.1kiB/s ⬆ 3.9kiB/s&#xD;&#xA;2023-04-13 07:06:08  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.2kiB/s ⬆ 1.1kiB/s&#xD;&#xA;2023-04-13 07:06:13  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.6kiB/s ⬆ 3.1kiB/s&#xD;&#xA;2023-04-13 07:06:18  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.1kiB/s ⬆ 0.1kiB/s&#xD;&#xA;2023-04-13 07:06:23  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.3kiB/s ⬆ 1.6kiB/s&#xD;&#xA;2023-04-13 07:06:28  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.2kiB/s ⬆ 0.9kiB/s&#xD;&#xA;2023-04-13 07:06:33  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.4kiB/s ⬆ 1.6kiB/s&#xD;&#xA;2023-04-13 07:06:38  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.1kiB/s ⬆ 0.6kiB/s&#xD;&#xA;2023-04-13 07:06:43  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.3kiB/s ⬆ 1.1kiB/s&#xD;&#xA;2023-04-13 07:06:48  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.1kiB/s ⬆ 0.1kiB/s&#xD;&#xA;2023-04-13 07:06:53  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.3kiB/s ⬆ 1.5kiB/s&#xD;&#xA;2023-04-13 07:06:58  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.2kiB/s ⬆ 0.6kiB/s&#xD;&#xA;2023-04-13 07:07:03  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 2.7kiB/s ⬆ 0.8kiB/s&#xD;&#xA;2023-04-13 07:07:08  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 5.1kiB/s ⬆ 0.9kiB/s&#xD;&#xA;2023-04-13 07:07:13  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.2kiB/s ⬆ 0.6kiB/s&#xD;&#xA;2023-04-13 07:07:18  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.3kiB/s ⬆ 1.1kiB/s&#xD;&#xA;2023-04-13 07:07:23  Idle (10 peers), best: #0 (0x3715…6934), finalized #0 (0x3715…6934), ⬇ 0.2kiB/s ⬆ 0.8kiB/s&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Three things I notice:&#xD;&#xA; 1. No *Epochs* are started&#xD;&#xA; 2. No print of `... ⏱  Loaded block-time = 6s from block ...` as shown in the &quot;[Add trusted nodes tutorial](https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/)&quot;&#xD;&#xA; 3. The line `parachain::gossip-support: error=NotAValidator`&#xD;&#xA;&#xD;&#xA;I have updated both chain specifications with the SR25519 and ED25519 addresses (each with 4 active authorities), added the parachain as an entry in the relay chain specification with genesis wasm and state, and used these specifications when launching the nodes.&#xD;&#xA;&#xD;&#xA;Relay chain node flags (the boot node has `-lparachain=debug` instead of `--bootnodes ...`):&#xD;&#xA;```&#xD;&#xA;--validator --force-authoring --node-key-file=$(KEY-FILE)&#xD;&#xA;--name=$(NAME) --base-path=$(BASE-PATH)&#xD;&#xA;--port=30333 --ws-port=9944 --chain=$(CHAIN-SPEC-PATH) &#xD;&#xA;--bootnodes /dns/relay-boot-node-service/tcp/30333/p2p/12D3KooWSB9qo3ecn3YGz2MsDKcG8SAp4c61RYTpN5vQDhBhr5xn&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Parachain node flags:&#xD;&#xA;```&#xD;&#xA;--collator --force-authoring --name=$(NAME) --base-path=$(BASE-PATH)&#xD;&#xA;--node-key-file=$(KEY-FILE) --port=30333 --ws-port=9944 --chain=$(CHAIN-SPEC-PATH)&#xD;&#xA;--bootnodes=$(BOOT-NODE) --ws-external --unsafe-ws-external --rpc-cors=all --rpc-external &#xD;&#xA;--rpc-methods=Unsafe --prometheus-external&#xD;&#xA;--&#xD;&#xA;--execution=wasm --chain=$(RELAY-CHAIN-SPEC-PATH) --port=30343 --ws-port=9977&#xD;&#xA;--bootnodes=$(RELAY-CHAIN-BOOT-NODE)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have initialized keystores for all the nodes, but have left out the `--password-interactive` flag, due to the fact that I will only be running tests. Could this be the cause of my issues? Running the `author_hasSessionKeys` with the SR25519 public key returns `true`, but it might just check for the file and not whether it is valid?&#xD;&#xA;&#xD;&#xA;Relay chain node keystore initialization (before the node is started):&#xD;&#xA;```&#xD;&#xA;./polkadot key insert --base-path=/config/node/ --chain=/chain-specs/relay-chain-spec.json --scheme=ed25519 --suri=&quot;0x$SEED&quot; --key-type=gran&#xD;&#xA;./polkadot key insert --base-path=/config/node/ --chain=/chain-specs/relay-chain-spec.json --scheme=sr25519 --suri=&quot;0x$SEED&quot; --key-type=babe&#xD;&#xA;./polkadot key insert --base-path=/config/node/ --chain=/chain-specs/relay-chain-spec.json --scheme=sr25519 --suri=&quot;0x$SEED&quot; --key-type=imon&#xD;&#xA;./polkadot key insert --base-path=/config/node/ --chain=/chain-specs/relay-chain-spec.json --scheme=sr25519 --suri=&quot;0x$SEED&quot; --key-type=para&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The main thing I want to avoid is using a UI for setting up the system, as I hoped to run tests on the network, making manual steps a drawback.&#xD;&#xA;&#xD;&#xA;Hope that the information provided above gives an idea of my issue, otherwise please ask!&#xD;&#xA;Thanks in advance ❤️" ContentLicense="CC BY-SA 4.0" />
  <row Id="31715" PostHistoryTypeId="1" PostId="8065" RevisionGUID="dd5918e4-e869-4927-b21b-3bdb646a3e81" CreationDate="2023-04-13T08:23:15.863" UserId="3989" Text="No authoring in network using custom keys, a local Rococo chain specification, and a modified substrate-parachain-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="31716" PostHistoryTypeId="3" PostId="8065" RevisionGUID="dd5918e4-e869-4927-b21b-3bdb646a3e81" CreationDate="2023-04-13T08:23:15.863" UserId="3989" Text="|substrate-parachain-template|grandpa|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31717" PostHistoryTypeId="50" PostId="7594" RevisionGUID="18483bde-6a9a-4f98-9304-afa7b528d99e" CreationDate="2023-04-13T09:00:50.130" UserId="-1" />
  <row Id="31718" PostHistoryTypeId="2" PostId="8066" RevisionGUID="3864a995-9487-42c0-8982-d8b328df8358" CreationDate="2023-04-13T09:32:39.233" UserId="167" Text="&gt; Through the runtime call grandpaApi -&gt; grandpaAuthorities() which queries the current state of the authority set.&#xD;&#xA;&#xD;&#xA;Returns the authority session keys associated with grandpa, as described [here](https://wiki.polkadot.network/docs/learn-cryptography#session-keys). &#xD;&#xA;&#xD;&#xA;If you want to know the validator stash accounts associated with staking, you can use: &#xD;&#xA;&#xD;&#xA;- [`Session::Validators`](https://paritytech.github.io/substrate/master/pallet_session/pallet/storage_types/struct.Validators.html): current validators. &#xD;&#xA;- [`Session::QueuedKeys`](https://paritytech.github.io/substrate/master/pallet_session/pallet/storage_types/struct.QueuedKeys.html): set of next validators.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31720" PostHistoryTypeId="2" PostId="8067" RevisionGUID="0a511fed-584a-40ea-af2a-c16807041dd5" CreationDate="2023-04-13T09:42:38.123" UserId="474" Text="So, when you create a client in Subxt (eg an `OnlineClient`) you pass it some Config (eg `SubstrateConfig` or `PolkadotConfig`). One of the things that this config does it describe how to encode the signed extensions for an extrinsic.&#xD;&#xA;&#xD;&#xA;To implement your own encoding of custom signed extensions, implement the `ExtrinsicParams` trait (https://docs.rs/subxt/0.28.0/subxt/config/extrinsic_params/trait.ExtrinsicParams.html). This interface lets you define some &quot;builder&quot; type that users construct to pass params in to the relevant functions, and then how to encode the additional and extra params when asked to.&#xD;&#xA;&#xD;&#xA;By default, we implement this trait for a `BaseExtrinsicParams` type which covers default Substrate/Polkadot params like so: https://docs.rs/subxt/0.28.0/src/subxt/config/extrinsic_params.rs.html#59. Hopefully this implementation can serve as inspiration :) &#xD;&#xA;&#xD;&#xA;&gt; **Side Note**: How do you know which extra and additional things the node you're talking to expects? Well, if you look in the metadata downloaded from a node you want to connect to, it will contain an `extrinsic` property which then [contains a list of—in order—each extra and additional type that it's expecting](https://github.com/paritytech/frame-metadata/blob/438a5b098bb9d5b5a09bdc5b68275b2c5e63a010/frame-metadata/src/v14.rs#L117). You can make sure to encode the same types in your implementation of `ExtrinsicParams`.&#xD;&#xA;&#xD;&#xA;Once you have implemented this trait on your custom type, create some config like `MyConfig` which uses it:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum MyConfig {}&#xD;&#xA;impl Config for MyConfig {&#xD;&#xA;    type Index = &lt;SubstrateConfig as Config&gt;::Index;&#xD;&#xA;    type Hash = &lt;SubstrateConfig as Config&gt;::Hash;&#xD;&#xA;    type Hasher = &lt;SubstrateConfig as Config&gt;::Hasher;&#xD;&#xA;    type Header = &lt;SubstrateConfig as Config&gt;::Header;&#xD;&#xA;    type AccountId = &lt;SubstrateConfig as Config&gt;::AccountId;&#xD;&#xA;    type Address = &lt;SubstrateConfig as Config&gt;::Address;&#xD;&#xA;    type Signature = &lt;SubstrateConfig as Config&gt;::Signature;&#xD;&#xA;    // ExtrinsicParams are different; use the custom type:&#xD;&#xA;    type ExtrinsicParams = MyCustomExtrinsicParams;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(in this case, we are just using the same params as the `SubstrateConfig` and only changing how the extra/additional params are encoded; you may have other things you need to change though)&#xD;&#xA;&#xD;&#xA;Finally, use this config:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let client = OnlineClient::&lt;MyConfig&gt;::new().await?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And now when you crate extrinsics, the correct additional/extra params will be encoded by default, or can be provided by the user as an argument to calls like `api.tx().sign_and_submit_then_watch(...)`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31724" PostHistoryTypeId="5" PostId="8067" RevisionGUID="853653be-fdd3-42e4-962a-4dab16c901d0" CreationDate="2023-04-13T10:07:51.070" UserId="29" Comment="added 1 character in body" Text="So, when you create a client in Subxt (eg an `OnlineClient`) you pass it some Config (eg `SubstrateConfig` or `PolkadotConfig`). One of the things that this config does it describe how to encode the signed extensions for an extrinsic.&#xD;&#xA;&#xD;&#xA;To implement your own encoding of custom signed extensions, implement the `ExtrinsicParams` trait (https://docs.rs/subxt/0.28.0/subxt/config/extrinsic_params/trait.ExtrinsicParams.html). This interface lets you define some &quot;builder&quot; type that users construct to pass params in to the relevant functions, and then how to encode the additional and extra params when asked to.&#xD;&#xA;&#xD;&#xA;By default, we implement this trait for a `BaseExtrinsicParams` type which covers default Substrate/Polkadot params like so: https://docs.rs/subxt/0.28.0/src/subxt/config/extrinsic_params.rs.html#59. Hopefully this implementation can serve as inspiration :) &#xD;&#xA;&#xD;&#xA;&gt; **Side Note**: How do you know which extra and additional things the node you're talking to expects? Well, if you look in the metadata downloaded from a node you want to connect to, it will contain an `extrinsic` property which then [contains a list of—in order—each extra and additional type that it's expecting](https://github.com/paritytech/frame-metadata/blob/438a5b098bb9d5b5a09bdc5b68275b2c5e63a010/frame-metadata/src/v14.rs#L117). You can make sure to encode the same types in your implementation of `ExtrinsicParams`.&#xD;&#xA;&#xD;&#xA;Once you have implemented this trait on your custom type, create some config like `MyConfig` which uses it:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum MyConfig {}&#xD;&#xA;impl Config for MyConfig {&#xD;&#xA;    type Index = &lt;SubstrateConfig as Config&gt;::Index;&#xD;&#xA;    type Hash = &lt;SubstrateConfig as Config&gt;::Hash;&#xD;&#xA;    type Hasher = &lt;SubstrateConfig as Config&gt;::Hasher;&#xD;&#xA;    type Header = &lt;SubstrateConfig as Config&gt;::Header;&#xD;&#xA;    type AccountId = &lt;SubstrateConfig as Config&gt;::AccountId;&#xD;&#xA;    type Address = &lt;SubstrateConfig as Config&gt;::Address;&#xD;&#xA;    type Signature = &lt;SubstrateConfig as Config&gt;::Signature;&#xD;&#xA;    // ExtrinsicParams are different; use the custom type:&#xD;&#xA;    type ExtrinsicParams = MyCustomExtrinsicParams;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(in this case, we are just using the same params as the `SubstrateConfig` and only changing how the extra/additional params are encoded; you may have other things you need to change though)&#xD;&#xA;&#xD;&#xA;Finally, use this config:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let client = OnlineClient::&lt;MyConfig&gt;::new().await?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And now when you create extrinsics, the correct additional/extra params will be encoded by default, or can be provided by the user as an argument to calls like `api.tx().sign_and_submit_then_watch(...)`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31725" PostHistoryTypeId="5" PostId="8063" RevisionGUID="f92cf5a1-98ee-42b8-b785-3ffa18269ba3" CreationDate="2023-04-13T10:10:04.213" UserId="29" Comment="edited body" Text="I am creating a [Subxt](https://github.com/paritytech/subxt) call where I need to add a signed extension. Is there an example of where I would add the signed extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31726" PostHistoryTypeId="4" PostId="8063" RevisionGUID="f92cf5a1-98ee-42b8-b785-3ffa18269ba3" CreationDate="2023-04-13T10:10:04.213" UserId="29" Comment="edited body" Text="Where do I add a SignedExtension in a Subxt call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31727" PostHistoryTypeId="5" PostId="8063" RevisionGUID="db842b9e-8b55-4273-84f1-cf1d9efe997c" CreationDate="2023-04-13T10:16:06.703" UserId="29" Comment="added 39 characters in body" Text="I am creating a [Subxt](https://github.com/paritytech/subxt) call where I need to add support for a signed extension that my chain uses. Is there an example of where I can add support for a signed extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31728" PostHistoryTypeId="2" PostId="8068" RevisionGUID="2a86c30e-1f6c-48ef-bfcc-e950d8ca3fec" CreationDate="2023-04-13T11:56:38.780" UserId="3265" Text="Somehow our node starts to yield `429` errors and we do not find a reason for this. More specifically, we do not even know hot to debug this.&#xD;&#xA;&#xD;&#xA;I see that [this gentlemen][1] has logging for accepted connections, I do not see that, even with loglevel debug. &#xD;&#xA;&#xD;&#xA;What is the number of `Too many requests` in substrate and how do I configure and monitor it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/issues/7039" ContentLicense="CC BY-SA 4.0" />
  <row Id="31730" PostHistoryTypeId="1" PostId="8068" RevisionGUID="2a86c30e-1f6c-48ef-bfcc-e950d8ca3fec" CreationDate="2023-04-13T11:56:38.780" UserId="3265" Text="Debugging 429 Too Many Requests" ContentLicense="CC BY-SA 4.0" />
  <row Id="31731" PostHistoryTypeId="3" PostId="8068" RevisionGUID="2a86c30e-1f6c-48ef-bfcc-e950d8ca3fec" CreationDate="2023-04-13T11:56:38.780" UserId="3265" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31732" PostHistoryTypeId="2" PostId="8069" RevisionGUID="a609e092-fb5c-4599-9ba1-388f84e3da67" CreationDate="2023-04-13T12:01:38.700" UserId="354" Text="I also faced the same issue when I started with parachains, I solved the problem in following way:&#xD;&#xA;&#xD;&#xA; - The account which I used on relay chain to register the paraId was same as one of the collators in the `customSpec` of parachain and after adding parachain successfully to the relay, it started generating blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="31734" PostHistoryTypeId="2" PostId="8070" RevisionGUID="d3b1cf82-31fa-4841-b6f0-606c565620e5" CreationDate="2023-04-13T12:20:38.787" UserId="29" Text="&gt; You are doing the call against the old HTTP server right i.e, port&#xD;&#xA;&gt; --rpc-port, correct? It will use the default value by jsonrpsee which causes that to be 100 which was a breaking change I realized now.&#xD;&#xA;- https://github.com/paritytech/substrate/issues/13561#issuecomment-1462243398&#xD;&#xA;&#xD;&#xA;The link you referenced has lots of good explanations. As noted [here](https://github.com/paritytech/polkadot/issues/7039#issuecomment-1503160752) consider switching to the WS server which supports both HTTP and WebSocket. If you switch to WS using `--ws-port` then it will use `--ws-max-connections`. &#xD;&#xA;&#xD;&#xA;This issue will be permnanently fixed here:&#xD;&#xA;- https://github.com/paritytech/substrate/pull/13384" ContentLicense="CC BY-SA 4.0" />
  <row Id="31736" PostHistoryTypeId="10" PostId="8057" RevisionGUID="6f809309-9729-45aa-b528-5259c0939bd1" CreationDate="2023-04-13T13:48:04.227" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="31737" PostHistoryTypeId="10" PostId="8002" RevisionGUID="28d7045c-13fd-479b-ab47-40d260410e81" CreationDate="2023-04-13T13:48:58.297" UserId="34" Comment="103" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="31738" PostHistoryTypeId="10" PostId="8011" RevisionGUID="95c2be52-3a88-419d-8f53-b36e946d8f78" CreationDate="2023-04-13T13:49:12.557" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[7714],&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:2762,&quot;DisplayName&quot;:&quot;Alex Bean&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="31739" PostHistoryTypeId="10" PostId="7992" RevisionGUID="62615b03-f1bb-47e7-a2c1-5c57e173ed83" CreationDate="2023-04-13T13:50:17.373" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[7714],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Dan Shields&quot;}]}" />
  <row Id="31740" PostHistoryTypeId="5" PostId="8035" RevisionGUID="90154b5a-9c4f-4d2e-8b47-0c3093dd4232" CreationDate="2023-04-13T13:52:55.257" UserId="2" Comment="formatting, capitalization, thanks removed as per https://meta.stackexchange.com/q/2950/295232" Text="You can add the parachains to the `paras` field in your chain-spec. For doing this you can follow this steps:&#xD;&#xA;&#xD;&#xA; 1. Create the chain-spec in plain text &#xD;&#xA;  `polkadot build-spec --chain rococo-local --disable-default-bootnode&#xD;&#xA;    &gt; rococo-local-plain.json`&#xD;&#xA;  (I will use rococo-local as chain)&#xD;&#xA; 2. Edit this file and add your `para` into `paras` field, with this format &#xD;&#xA;   ```json&#xD;&#xA;    paras: [&#xD;&#xA;      [ &lt;para_id&gt;, [&lt;para_head&gt;,&lt;para_wasm&gt;, true]&#xD;&#xA;    ]&#xD;&#xA;  ```&#xD;&#xA;   Where:&#xD;&#xA;   `para_id` : is your parachain id.&#xD;&#xA;&#xD;&#xA;   `para_head` : you can get it running `polkadot-parachain export-genesis-state`&#xD;&#xA;&#xD;&#xA;   `para_wasm` : you can get it running `polkadot-parachain export-genesis-wasm`&#xD;&#xA;     And the last param (`true`) is to set the as parachain.&#xD;&#xA;&#xD;&#xA; 3. You need then to get the `raw` file from your edited plain file&#xD;&#xA;&#xD;&#xA;    `polkadot build-spec --chain ./rococo-local-plain.json --disable-default-bootnode  --raw &gt; ./rococo-local-raw.json`&#xD;&#xA;&#xD;&#xA;  4. Then you can start your relay-chain nodes using this chain-spec (`rococo-local-raw.json`).&#xD;&#xA;  5. You need to start a collator of your parachain, using this chain-spec for the relay-chain and you can use one of the dev accounts for the collator. For example `--alice`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can follow [this tutorial](https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/) to get the step-by-step instructions.&#xD;&#xA;&#xD;&#xA;Also, this could be handled easily by [zombienet](https://github.com/paritytech/zombienet) and get your network running in one of the available providers (native, podman or kubernetes). Please, let me know if you have questions about zombienet and I can help you." ContentLicense="CC BY-SA 4.0" />
  <row Id="31741" PostHistoryTypeId="24" PostId="8035" RevisionGUID="90154b5a-9c4f-4d2e-8b47-0c3093dd4232" CreationDate="2023-04-13T13:52:55.257" Comment="Proposed by 2 approved by 3317, 34 edit id of 407" ContentLicense="CC BY-SA 4.0" />
  <row Id="31742" PostHistoryTypeId="6" PostId="4764" RevisionGUID="6da4f724-a85f-4c83-a92c-218a2ad4d75b" CreationDate="2023-04-13T13:53:01.050" UserId="2" Comment="tags edited (perhaps there is a better one, though)" Text="|account|indexing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31743" PostHistoryTypeId="24" PostId="4764" RevisionGUID="6da4f724-a85f-4c83-a92c-218a2ad4d75b" CreationDate="2023-04-13T13:53:01.050" Comment="Proposed by 2 approved by 3317, 34 edit id of 404" ContentLicense="CC BY-SA 4.0" />
  <row Id="31746" PostHistoryTypeId="50" PostId="7615" RevisionGUID="10157b2f-563d-473e-aada-e60749e8149e" CreationDate="2023-04-13T14:04:50.557" UserId="-1" />
  <row Id="31747" PostHistoryTypeId="2" PostId="8071" RevisionGUID="6b3f15c1-737e-4c07-9db4-3b1001c87bae" CreationDate="2023-04-13T14:11:11.993" UserId="3371" Text="I'm getting the following error while running rococo alice validator node in kubernetes cluster:&#xD;&#xA;&#xD;&#xA;    cannot bind unix socket: Os { code: 30, kind: ReadOnlyFilesystem, message: &quot;Read-only file system&quot; } debug_id=prepare program_path=&quot;/usr/bin/polkadot&quot; extra_args=[&quot;prepare-worker&quot;, &quot;--node-impl-version&quot;, &quot;0.9.41-e203bfb396e&quot;]&#xD;&#xA;    failed to spawn a prepare worker: Bind&#xD;&#xA;&#xD;&#xA;Basically, I'm running my own rococo instance with 3 validators in Kubernetes. Everything works fine until the parachain is connected and start collating - then this error occurs in the alice validator node and parachain is stuck on importing new blocks. The validator is still running okay.&#xD;&#xA;&#xD;&#xA;P.S. Everything works fine locally so possibly there is some problem with the deployment configuration. I'm using parity helm charts for deployment.&#xD;&#xA;&#xD;&#xA;Have someone faced this problem? Any help is appreciated.&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="31749" PostHistoryTypeId="1" PostId="8071" RevisionGUID="6b3f15c1-737e-4c07-9db4-3b1001c87bae" CreationDate="2023-04-13T14:11:11.993" UserId="3371" Text="cannot bind unix socket: Os { code: 30, kind: ReadOnlyFilesystem, message: &quot;Read-only file system&quot; } error" ContentLicense="CC BY-SA 4.0" />
  <row Id="31750" PostHistoryTypeId="3" PostId="8071" RevisionGUID="6b3f15c1-737e-4c07-9db4-3b1001c87bae" CreationDate="2023-04-13T14:11:11.993" UserId="3371" Text="|parachain|relay-chain|docker|rococo-local|kubernetes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31751" PostHistoryTypeId="2" PostId="8072" RevisionGUID="f1d1ce7c-d8a5-49ad-96f5-a76d3ae8b067" CreationDate="2023-04-13T14:14:56.537" UserId="1891" Text="I have a running node without a council configured in genesis. I would like to add a council and initial council members using a runtime upgrade. Is this possible and how would i do it" ContentLicense="CC BY-SA 4.0" />
  <row Id="31753" PostHistoryTypeId="1" PostId="8072" RevisionGUID="f1d1ce7c-d8a5-49ad-96f5-a76d3ae8b067" CreationDate="2023-04-13T14:14:56.537" UserId="1891" Text="Is it possible to add council support and initial members during a runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31754" PostHistoryTypeId="3" PostId="8072" RevisionGUID="f1d1ce7c-d8a5-49ad-96f5-a76d3ae8b067" CreationDate="2023-04-13T14:14:56.537" UserId="1891" Text="|substrate-node-template|runtime-upgrade|governance|council|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31759" PostHistoryTypeId="2" PostId="8074" RevisionGUID="98cc680f-0216-49a6-9d30-93ecf91e36f9" CreationDate="2023-04-13T14:36:27.553" UserId="464" Text="We executed a chain migration that was not intended ( it was already executed one time and was executed again 2 times ) https://github.com/paritytech/substrate/blob/polkadot-v0.9.18/frame/system/src/migrations/mod.rs#L124 is there any way to revert it back easily ?  &#xD;&#xA;&#xD;&#xA;    /// Migrate from dual `u32` reference counting to triple `u32` reference counting.&#xD;&#xA;    pub fn migrate_from_dual_to_triple_ref_count&lt;T: V2ToV3&gt;() -&gt; Weight {&#xD;&#xA;    	let mut translated: usize = 0;&#xD;&#xA;    	&lt;Account&lt;T&gt;&gt;::translate::&lt;(T::Index, RefCount, RefCount, T::AccountData), _&gt;(&#xD;&#xA;    		|_key, (nonce, consumers, providers, data)| {&#xD;&#xA;    			translated = translated + 1;&#xD;&#xA;    			Some(AccountInfo { nonce, consumers, providers, sufficients: 0, data })&#xD;&#xA;    		},&#xD;&#xA;    	);&#xD;&#xA;    	log::info!(&#xD;&#xA;    		target: &quot;runtime::system&quot;,&#xD;&#xA;    		&quot;Applied migration from dual to triple reference counting to {:?} elements.&quot;,&#xD;&#xA;    		translated&#xD;&#xA;    	);&#xD;&#xA;    	&lt;UpgradedToTripleRefCount&gt;::put(true);&#xD;&#xA;    	Weight::max_value()&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="31761" PostHistoryTypeId="1" PostId="8074" RevisionGUID="98cc680f-0216-49a6-9d30-93ecf91e36f9" CreationDate="2023-04-13T14:36:27.553" UserId="464" Text="revert a chain migration" ContentLicense="CC BY-SA 4.0" />
  <row Id="31762" PostHistoryTypeId="3" PostId="8074" RevisionGUID="98cc680f-0216-49a6-9d30-93ecf91e36f9" CreationDate="2023-04-13T14:36:27.553" UserId="464" Text="|runtime-upgrade|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31763" PostHistoryTypeId="5" PostId="8070" RevisionGUID="7ce7ee19-30f4-4b6d-b93f-36617ca86706" CreationDate="2023-04-13T15:04:07.543" UserId="29" Comment="added 4 characters in body" Text="&gt; You are doing the call against the old HTTP server right i.e, port&#xD;&#xA;&gt; --rpc-port, correct? **It will use the default value by jsonrpsee which causes that to be 100** which was a breaking change I realized now.&#xD;&#xA;- https://github.com/paritytech/substrate/issues/13561#issuecomment-1462243398&#xD;&#xA;&#xD;&#xA;The link you referenced has lots of good explanations. As noted [here](https://github.com/paritytech/polkadot/issues/7039#issuecomment-1503160752) consider switching to the WS server which supports both HTTP and WebSocket. If you switch to WS using `--ws-port` then it will use `--ws-max-connections`. &#xD;&#xA;&#xD;&#xA;This issue will be permnanently fixed here:&#xD;&#xA;- https://github.com/paritytech/substrate/pull/13384" ContentLicense="CC BY-SA 4.0" />
  <row Id="31764" PostHistoryTypeId="2" PostId="8075" RevisionGUID="cf6b77d1-ce15-4adf-850d-c9a3e3fe697c" CreationDate="2023-04-13T15:10:20.963" UserId="251" Text="AFAIK, there are only 2 ways to do this.&#xD;&#xA;&#xD;&#xA;1. publish a new version, mark that block as a bad block and resync all chains with the new client. this is a hard fork.&#xD;&#xA;2. try to find out the opposite migration logic and apply it to your chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="31766" PostHistoryTypeId="2" PostId="8076" RevisionGUID="6307a279-f8b5-4042-b505-0b40fb268548" CreationDate="2023-04-13T15:11:49.510" UserId="251" Text="Sometimes, `sp-arithmetic` can not fit your requirement.&#xD;&#xA;&#xD;&#xA;Please also take a look at the [substrate-fixed](https://github.com/encointer/substrate-fixed)." ContentLicense="CC BY-SA 4.0" />
  <row Id="31771" PostHistoryTypeId="2" PostId="8078" RevisionGUID="ce0aa09f-4a26-4f58-b669-89d0f331b669" CreationDate="2023-04-13T17:59:44.997" UserId="275" Text="[![enter image description here][1]][1]I'm testing warp sync feature with a Parachain node which is available after these commits https://github.com/paritytech/substrate/pull/12761.&#xD;&#xA;In my testing, Warp sync for the embedded Relaychain side can smoothly sync the whole state. &#xD;&#xA;&#xD;&#xA;Making sure `--sync warp` is set to both para &amp; relay.&#xD;&#xA;&#xD;&#xA;    ./collator-bin --sync warp -- --sync warp&#xD;&#xA;&#xD;&#xA;However, Parachain side often get stuck at `AwaitingPeers` status after taking some time for Downloading states even though it has enough peers seen in logs.&#xD;&#xA;&#xD;&#xA;Downloading states (`DownloadingState` status) resumes if I restart the process.&#xD;&#xA;&#xD;&#xA;My question is&#xD;&#xA;What is `AwaitingPeers` actually mean in the warp sync context. In which condition warp sync status become `AwaitingPeers`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2mvVz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31773" PostHistoryTypeId="1" PostId="8078" RevisionGUID="ce0aa09f-4a26-4f58-b669-89d0f331b669" CreationDate="2023-04-13T17:59:44.997" UserId="275" Text="Parachain Warp sync get stuck at AwaitingPeers status" ContentLicense="CC BY-SA 4.0" />
  <row Id="31774" PostHistoryTypeId="3" PostId="8078" RevisionGUID="ce0aa09f-4a26-4f58-b669-89d0f331b669" CreationDate="2023-04-13T17:59:44.997" UserId="275" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31775" PostHistoryTypeId="5" PostId="8078" RevisionGUID="49fda6b1-f609-4688-8bfa-098de1900a0a" CreationDate="2023-04-13T18:17:56.940" UserId="275" Comment="added 12 characters in body" Text="[![enter image description here][1]][1]I'm testing warp sync feature with a Parachain node which is available after these commits https://github.com/paritytech/substrate/pull/12761.&#xD;&#xA;In my testing, Warp sync for the embedded Relaychain side can smoothly sync the whole state. &#xD;&#xA;&#xD;&#xA;Making sure `--sync warp` is set to both para &amp; relay.&#xD;&#xA;&#xD;&#xA;    ./collator-bin --sync warp -- --sync warp&#xD;&#xA;&#xD;&#xA;However, Parachain side often get stuck at `AwaitingPeers` status after taking some time for Downloading states even though it has enough peers seen in logs.&#xD;&#xA;&#xD;&#xA;Downloading states (`DownloadingState` status) resumes if I restart the node process itself.&#xD;&#xA;&#xD;&#xA;My question is&#xD;&#xA;What is `AwaitingPeers` actually mean in the warp sync context. In which condition warp sync status become `AwaitingPeers`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2mvVz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="31776" PostHistoryTypeId="2" PostId="8079" RevisionGUID="3238137b-15ef-4f2f-912b-4140dc58c3a0" CreationDate="2023-04-13T18:44:04.720" UserId="3327" Text="I am using export-state to copy a parachian running in production environment to development with all the configuration and blocks data. I am following these steps. Can any one please review the steps, if I am missing any thing. Since when I run the parachain in development, it does not produce blocks:&#xD;&#xA;&#xD;&#xA;1. I executed a command similar to the following in against production parachain node to generate its chain specs with the current state:&#xD;&#xA;&#xD;&#xA;./target/release/my-node export-state --chain=raw-parachain-chainspec.json --base-path /tmp/para/ali &gt; new_chainspc.json&#xD;&#xA;&#xD;&#xA;2. Generate genesis state file:&#xD;&#xA;&#xD;&#xA;./target/release/my-node export-genesis-state --chain=new_chainspc.json &gt; new-genesis&#xD;&#xA;&#xD;&#xA;3. Generate wasm:&#xD;&#xA;&#xD;&#xA;./target/release/my-node export-genesis-wasm --chain=new_chainspc.json &gt; new_wasm&#xD;&#xA;&#xD;&#xA;4. I spin two nodes of polkadot relaychian using follwoing commands in my development envirnoment:&#xD;&#xA;&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;--alice \&#xD;&#xA;--validator \&#xD;&#xA;--base-path /tmp/relay/ali \&#xD;&#xA;--chain ~/polkadot/polkadot/tmp/raw-local-chainspec.json \&#xD;&#xA;--port 30333 --ws-port 9944 \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external --rpc-cors=all&#xD;&#xA;&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;--bob \&#xD;&#xA;--validator \&#xD;&#xA;--base-path /tmp/relay/bob \&#xD;&#xA;--chain ~/polkadot/polkadot/tmp/raw-local-chainspec.json \&#xD;&#xA;--port 30334 --ws-port 9945 \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external --rpc-cors=all&#xD;&#xA;&#xD;&#xA;5. I run my parachian collator using the following command:&#xD;&#xA;&#xD;&#xA;./target/release/my-node \&#xD;&#xA;--collator \&#xD;&#xA;--chain new_chainspc.json \&#xD;&#xA;--port 40333 --ws-port 8844 --rpc-port 8833 \&#xD;&#xA;--base-path /tmp/para/ali \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external \&#xD;&#xA;--rpc-cors=all --rpc-methods=Unsafe \&#xD;&#xA;--node-key 7a9c984f2254f80eb54e09ab9f37b41261b1cf6ba230cff6ff7982e78e4584b6 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain raw-local-chainspec.json \&#xD;&#xA;--port 30343 --ws-port 9977 \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external \&#xD;&#xA;--rpc-cors=all&#xD;&#xA;&#xD;&#xA;6. Regisred parachain with relay chain using new_genesis and new_wasm genereted above. &#xD;&#xA;&#xD;&#xA;After performing all these steps, the relaychain start producing blocks but no parachian blocks are produced. Am I missing some importanr piece of info?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31778" PostHistoryTypeId="1" PostId="8079" RevisionGUID="3238137b-15ef-4f2f-912b-4140dc58c3a0" CreationDate="2023-04-13T18:44:04.720" UserId="3327" Text="Steps to import a parachain running in a production environment to test environment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31779" PostHistoryTypeId="3" PostId="8079" RevisionGUID="3238137b-15ef-4f2f-912b-4140dc58c3a0" CreationDate="2023-04-13T18:44:04.720" UserId="3327" Text="|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31781" PostHistoryTypeId="2" PostId="8080" RevisionGUID="613ce18c-a4e2-4448-b512-5fd4fae668bd" CreationDate="2023-04-13T19:18:31.677" UserId="2722" Text="I am working on a Substrate project and want to use the orml-traits and orml-tokens crates in my custom pallet. I have added these crates to my Cargo.toml:&#xD;&#xA;&#xD;&#xA;    orml-tokens = { git = &quot;https://github.com/open-web3-stack/open-runtime-module-library.git&quot;, default-features = false, version = &quot;0.4.0&quot; }&#xD;&#xA;    orml-traits = { git = &quot;https://github.com/open-web3-stack/open-runtime-module-library.git&quot;, default-features = false, version = &quot;0.4.0&quot; }&#xD;&#xA;&#xD;&#xA;My project uses `sp-io` version 7.0.0, but I'm facing a dependency conflict:&#xD;&#xA;&#xD;&#xA;    error[E0152]: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /home/kianoush/projects/music-chain/target/debug/wbuild/kitchensink-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-3f01c569c1bdc73f.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /home/kianoush/projects/music-chain/target/debug/wbuild/kitchensink-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-a6d4512a0b6fd246.rmeta&#xD;&#xA;&#xD;&#xA;      For more information about this error, try `rustc --explain E0152`.&#xD;&#xA;      warning: `pallet-dex` (lib) generated 2 warnings&#xD;&#xA;      error: could not compile `pallet-dex` due to previous error; 2 warnings emitted&#xD;&#xA;      warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;How can I make orml-traits and orml-tokens compatible with sp-io version 7.0.0 in my Substrate project?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31783" PostHistoryTypeId="1" PostId="8080" RevisionGUID="613ce18c-a4e2-4448-b512-5fd4fae668bd" CreationDate="2023-04-13T19:18:31.677" UserId="2722" Text="How to make orml-traits and orml-tokens compatible with sp-io version 7.0.0 in a Substrate project?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31784" PostHistoryTypeId="3" PostId="8080" RevisionGUID="613ce18c-a4e2-4448-b512-5fd4fae668bd" CreationDate="2023-04-13T19:18:31.677" UserId="2722" Text="|polkadot-js|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31786" PostHistoryTypeId="5" PostId="8079" RevisionGUID="5c9601c4-97d6-4080-a167-3da744f56fe3" CreationDate="2023-04-14T02:35:39.220" UserId="251" Comment="added 28 characters in body" Text="I am using export-state to copy a parachian running in production environment to development with all the configuration and blocks data. I am following these steps. Can any one please review the steps, if I am missing any thing. Since when I run the parachain in development, it does not produce blocks:&#xD;&#xA;&#xD;&#xA;1. I executed a command similar to the following in against production parachain node to generate its chain specs with the current state:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`./target/release/my-node export-state --chain=raw-parachain-chainspec.json --base-path /tmp/para/ali &gt; new_chainspc.json`&#xD;&#xA;&#xD;&#xA;2. Generate genesis state file:&#xD;&#xA;&#xD;&#xA;`./target/release/my-node export-genesis-state --chain=new_chainspc.json &gt; new-genesis`&#xD;&#xA;&#xD;&#xA;3. Generate wasm:&#xD;&#xA;&#xD;&#xA;`./target/release/my-node export-genesis-wasm --chain=new_chainspc.json &gt; new_wasm`&#xD;&#xA;&#xD;&#xA;4. I spin two nodes of polkadot relaychian using follwoing commands in my development envirnoment:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;--alice \&#xD;&#xA;--validator \&#xD;&#xA;--base-path /tmp/relay/ali \&#xD;&#xA;--chain ~/polkadot/polkadot/tmp/raw-local-chainspec.json \&#xD;&#xA;--port 30333 --ws-port 9944 \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external --rpc-cors=all&#xD;&#xA;&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;--bob \&#xD;&#xA;--validator \&#xD;&#xA;--base-path /tmp/relay/bob \&#xD;&#xA;--chain ~/polkadot/polkadot/tmp/raw-local-chainspec.json \&#xD;&#xA;--port 30334 --ws-port 9945 \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external --rpc-cors=all&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;5. I run my parachian collator using the following command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/my-node \&#xD;&#xA;--collator \&#xD;&#xA;--chain new_chainspc.json \&#xD;&#xA;--port 40333 --ws-port 8844 --rpc-port 8833 \&#xD;&#xA;--base-path /tmp/para/ali \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external \&#xD;&#xA;--rpc-cors=all --rpc-methods=Unsafe \&#xD;&#xA;--node-key 7a9c984f2254f80eb54e09ab9f37b41261b1cf6ba230cff6ff7982e78e4584b6 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain raw-local-chainspec.json \&#xD;&#xA;--port 30343 --ws-port 9977 \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external \&#xD;&#xA;--rpc-cors=all&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;6. Regisred parachain with relay chain using new_genesis and new_wasm genereted above. &#xD;&#xA;&#xD;&#xA;After performing all these steps, the relaychain start producing blocks but no parachian blocks are produced. Am I missing some importanr piece of info?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31787" PostHistoryTypeId="5" PostId="8079" RevisionGUID="d5465da8-eed3-4d5e-99f3-e61ff7b11149" CreationDate="2023-04-14T06:38:05.797" UserId="29" Comment="added 2 characters in body" Text="I am using export-state to copy a parachain running in production environment to development with all the configuration and blocks data. I am following these steps. Can any one please review the steps, if I am missing any thing. Since when I run the parachain in development, it does not produce blocks:&#xD;&#xA;&#xD;&#xA;1. I executed a command similar to the following in against production parachain node to generate its chain specs with the current state:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`./target/release/my-node export-state --chain=raw-parachain-chainspec.json --base-path /tmp/para/ali &gt; new_chainspc.json`&#xD;&#xA;&#xD;&#xA;2. Generate genesis state file:&#xD;&#xA;&#xD;&#xA;`./target/release/my-node export-genesis-state --chain=new_chainspc.json &gt; new-genesis`&#xD;&#xA;&#xD;&#xA;3. Generate wasm:&#xD;&#xA;&#xD;&#xA;`./target/release/my-node export-genesis-wasm --chain=new_chainspc.json &gt; new_wasm`&#xD;&#xA;&#xD;&#xA;4. I spin two nodes of polkadot relaychian using follwoing commands in my development envirnoment:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;--alice \&#xD;&#xA;--validator \&#xD;&#xA;--base-path /tmp/relay/ali \&#xD;&#xA;--chain ~/polkadot/polkadot/tmp/raw-local-chainspec.json \&#xD;&#xA;--port 30333 --ws-port 9944 \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external --rpc-cors=all&#xD;&#xA;&#xD;&#xA;./target/release/polkadot \&#xD;&#xA;--bob \&#xD;&#xA;--validator \&#xD;&#xA;--base-path /tmp/relay/bob \&#xD;&#xA;--chain ~/polkadot/polkadot/tmp/raw-local-chainspec.json \&#xD;&#xA;--port 30334 --ws-port 9945 \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external --rpc-cors=all&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;5. I run my parachain collator using the following command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/my-node \&#xD;&#xA;--collator \&#xD;&#xA;--chain new_chainspc.json \&#xD;&#xA;--port 40333 --ws-port 8844 --rpc-port 8833 \&#xD;&#xA;--base-path /tmp/para/ali \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external \&#xD;&#xA;--rpc-cors=all --rpc-methods=Unsafe \&#xD;&#xA;--node-key 7a9c984f2254f80eb54e09ab9f37b41261b1cf6ba230cff6ff7982e78e4584b6 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain raw-local-chainspec.json \&#xD;&#xA;--port 30343 --ws-port 9977 \&#xD;&#xA;--unsafe-rpc-external --unsafe-ws-external \&#xD;&#xA;--rpc-cors=all&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;6. Registered parachain with relay chain using new_genesis and new_wasm generated above. &#xD;&#xA;&#xD;&#xA;After performing all these steps, the relaychain start producing blocks but no parachain blocks are produced. Am I missing some important piece of info?&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31788" PostHistoryTypeId="6" PostId="8079" RevisionGUID="d5465da8-eed3-4d5e-99f3-e61ff7b11149" CreationDate="2023-04-14T06:38:05.797" UserId="29" Comment="added 2 characters in body" Text="|testing|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31793" PostHistoryTypeId="6" PostId="8078" RevisionGUID="e2a14b36-ed49-43e9-b2c1-315a894b7a17" CreationDate="2023-04-14T06:47:03.050" UserId="29" Comment="edited tags" Text="|parachain|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31794" PostHistoryTypeId="50" PostId="5725" RevisionGUID="514aeee3-b688-4b21-af2b-ef9654566cea" CreationDate="2023-04-14T07:05:50.777" UserId="-1" />
  <row Id="31795" PostHistoryTypeId="2" PostId="8082" RevisionGUID="48a2259e-37b8-4a18-94f2-9f0f7028f8b4" CreationDate="2023-04-14T07:06:19.340" UserId="2673" Text="This could be achieved by a [storage migration](https://docs.substrate.io/reference/how-to-guides/storage-migrations/) (read the linked docs page for details)." ContentLicense="CC BY-SA 4.0" />
  <row Id="31797" PostHistoryTypeId="2" PostId="8083" RevisionGUID="f5069fc3-e465-4926-b46a-51e7e1529a56" CreationDate="2023-04-14T08:33:52.077" UserId="3991" Text="There is no pallet named `Collective` defined in `construct_runtime!`. &#xD;&#xA;&#xD;&#xA;The pallets implementing `pallet_collective` are named `Council`, `TechnicalCommittee` and `AllianceMotion`. &#xD;&#xA;&#xD;&#xA;Try using a name from `construct_runtime!`, e.g.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./substrate-try-runtime try-runtime \&#xD;&#xA;    --runtime runtime-try-runtime.wasm \&#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    execute-block \&#xD;&#xA;    --try-state Council \      &#xD;&#xA;    live --uri ws://localhost:9944&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31799" PostHistoryTypeId="2" PostId="8084" RevisionGUID="0ee48e33-cf07-4b4e-bb48-5688869fe54f" CreationDate="2023-04-14T09:10:27.487" UserId="29" Text="I believe this is a bug if `warp_sync_params` is set to `None` it will get stuck in `AwaitingPeers`:&#xD;&#xA;```rust&#xD;&#xA;(None, SyncMode::Warp, _) =&gt;&#xD;&#xA;	Some(WarpSyncProgress { phase: WarpSyncPhase::AwaitingPeers, total_bytes: 0 }),&#xD;&#xA;```&#xD;&#xA; - https://github.com/paritytech/substrate/blob/53c58fbc3dc6060a2f611a8d7adfdeea655fe324/client/network/sync/src/lib.rs#L516-L517&#xD;&#xA;&#xD;&#xA;You can see this will not happen if you have `warp_sync_params` configured. Cumulus has a good example: &#xD;&#xA;```rust&#xD;&#xA;let warp_sync_params = match parachain_config.network.sync_mode {&#xD;&#xA;	SyncMode::Warp =&gt; {&#xD;&#xA;		let target_block = warp_sync_get::&lt;Block, RCInterface&gt;(&#xD;&#xA;			para_id,&#xD;&#xA;			relay_chain_interface.clone(),&#xD;&#xA;			spawn_handle.clone(),&#xD;&#xA;		);&#xD;&#xA;		Some(WarpSyncParams::WaitForTarget(target_block))&#xD;&#xA;	},&#xD;&#xA;	_ =&gt; None,&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;```rust&#xD;&#xA;sc_service::build_network(sc_service::BuildNetworkParams {&#xD;&#xA;	config: parachain_config,&#xD;&#xA;	client,&#xD;&#xA;	transaction_pool,&#xD;&#xA;	spawn_handle,&#xD;&#xA;	import_queue,&#xD;&#xA;	block_announce_validator_builder: Some(Box::new(block_announce_validator_builder)),&#xD;&#xA;	warp_sync_params,&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA; - https://github.com/paritytech/cumulus/blob/574f425fa2b9c822a1417af705169ab3a1835e24/client/service/src/lib.rs#L344-L368&#xD;&#xA;&#xD;&#xA;So make sure you have `warp_sync_params` configured.&#xD;&#xA;&#xD;&#xA;Issue was opened here: https://github.com/paritytech/substrate/issues/13921" ContentLicense="CC BY-SA 4.0" />
  <row Id="31801" PostHistoryTypeId="5" PostId="8084" RevisionGUID="a0321566-3926-470e-ab04-da185f1446c3" CreationDate="2023-04-14T09:36:15.517" UserId="29" Comment="deleted 5 characters in body" Text="This may be a bug, if `warp_sync_params` is set to `None` it will get stuck in `AwaitingPeers`:&#xD;&#xA;```rust&#xD;&#xA;(None, SyncMode::Warp, _) =&gt;&#xD;&#xA;	Some(WarpSyncProgress { phase: WarpSyncPhase::AwaitingPeers, total_bytes: 0 }),&#xD;&#xA;```&#xD;&#xA; - https://github.com/paritytech/substrate/blob/53c58fbc3dc6060a2f611a8d7adfdeea655fe324/client/network/sync/src/lib.rs#L516-L517&#xD;&#xA;&#xD;&#xA;You can see this will not happen if you have `warp_sync_params` configured. Cumulus has a good example: &#xD;&#xA;```rust&#xD;&#xA;let warp_sync_params = match parachain_config.network.sync_mode {&#xD;&#xA;	SyncMode::Warp =&gt; {&#xD;&#xA;		let target_block = warp_sync_get::&lt;Block, RCInterface&gt;(&#xD;&#xA;			para_id,&#xD;&#xA;			relay_chain_interface.clone(),&#xD;&#xA;			spawn_handle.clone(),&#xD;&#xA;		);&#xD;&#xA;		Some(WarpSyncParams::WaitForTarget(target_block))&#xD;&#xA;	},&#xD;&#xA;	_ =&gt; None,&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;```rust&#xD;&#xA;sc_service::build_network(sc_service::BuildNetworkParams {&#xD;&#xA;	config: parachain_config,&#xD;&#xA;	client,&#xD;&#xA;	transaction_pool,&#xD;&#xA;	spawn_handle,&#xD;&#xA;	import_queue,&#xD;&#xA;	block_announce_validator_builder: Some(Box::new(block_announce_validator_builder)),&#xD;&#xA;	warp_sync_params,&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA; - https://github.com/paritytech/cumulus/blob/574f425fa2b9c822a1417af705169ab3a1835e24/client/service/src/lib.rs#L344-L368&#xD;&#xA;&#xD;&#xA;So make sure you have `warp_sync_params` configured.&#xD;&#xA;&#xD;&#xA;Issue was opened here: https://github.com/paritytech/substrate/issues/13921" ContentLicense="CC BY-SA 4.0" />
  <row Id="31803" PostHistoryTypeId="2" PostId="8085" RevisionGUID="c31387a1-17fa-43ad-ac01-abc53418dbb1" CreationDate="2023-04-14T10:57:32.467" UserId="1779" Text="We use some external pallets that are highly configurable. The weight of the extrinsics in these pallets is highly dependent on the callback supplied in the config, and the existing benchmarks don't properly account for that. Is there any way to write a custom benchmark for an externally defined pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31805" PostHistoryTypeId="1" PostId="8085" RevisionGUID="c31387a1-17fa-43ad-ac01-abc53418dbb1" CreationDate="2023-04-14T10:57:32.467" UserId="1779" Text="Custom benchmarks for external pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="31806" PostHistoryTypeId="3" PostId="8085" RevisionGUID="c31387a1-17fa-43ad-ac01-abc53418dbb1" CreationDate="2023-04-14T10:57:32.467" UserId="1779" Text="|weight|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31807" PostHistoryTypeId="2" PostId="8086" RevisionGUID="119a8aab-48aa-47f3-a588-62a4c8a5cf04" CreationDate="2023-04-14T11:41:15.787" UserId="2762" Text="Yes, you always should generate the weights based on your runtime configuration and your hardware requirements.&#xD;&#xA;&#xD;&#xA;See and example from one of the FRAME pallets: the `pallet_balances`:&#xD;&#xA;In Polkadot has its own [Weights file][1] and is different than the [Wights file][2] in another chain, Kusama for example.&#xD;&#xA;Then in your Config have to specify your Weights. See the [runtime file][3] in Kusama. &#xD;&#xA;&#xD;&#xA;Take a look into this previous answer on StackExchange: [Benchmark FRAME pallets][4], for a more complete explanation about it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/weights/pallet_balances.rs&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/weights/pallet_balances.rs&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs#L303&#xD;&#xA;  [4]: https://substrate.stackexchange.com/a/3237/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="31809" PostHistoryTypeId="2" PostId="8087" RevisionGUID="4672fc9a-e2c7-40cc-962b-c88c6504bde7" CreationDate="2023-04-14T12:18:52.520" UserId="1891" Text="I have written code for storage migration but the unfortunately the council members have are not displaying after the runtime upgrade. Below is the code that i wrote for storage migration&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const COUNCIL_PREFIX: &amp;str = &quot;Instance1Council&quot;;&#xD;&#xA;&#xD;&#xA;pub struct CouncilStoragePrefixMigration;&#xD;&#xA;&#xD;&#xA;impl OnRuntimeUpgrade for CouncilStoragePrefixMigration {&#xD;&#xA;	fn on_runtime_upgrade() -&gt; frame_support::weights::Weight {&#xD;&#xA;		pallet_collective::migrations::v4::migrate::&lt;Runtime, Council, _&gt;(COUNCIL_PREFIX)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn pre_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		pallet_collective::migrations::v4::pre_migrate::&lt;Council, _&gt;(COUNCIL_PREFIX);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn post_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		pallet_collective::migrations::v4::post_migrate::&lt;Council, _&gt;(COUNCIL_PREFIX);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type Migrations = (&#xD;&#xA;	CouncilStoragePrefixMigration,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have also updated the ```spec_version``` but after the runtime upgrade the council members don't show up. How can now implement the storage migration correctly? Any help rendered will be highly appreciated. " ContentLicense="CC BY-SA 4.0" />
  <row Id="31811" PostHistoryTypeId="1" PostId="8087" RevisionGUID="4672fc9a-e2c7-40cc-962b-c88c6504bde7" CreationDate="2023-04-14T12:18:52.520" UserId="1891" Text="How do i upgrade the council through a runtime Upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31812" PostHistoryTypeId="3" PostId="8087" RevisionGUID="4672fc9a-e2c7-40cc-962b-c88c6504bde7" CreationDate="2023-04-14T12:18:52.520" UserId="1891" Text="|runtime-upgrade|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31813" PostHistoryTypeId="5" PostId="8087" RevisionGUID="be9e0ca1-ce04-435e-9983-f6b3e33b9f20" CreationDate="2023-04-14T12:21:30.217" UserId="3317" Comment="Grammer" Text="I have written code for a storage migration but unfortunately the council members are not displaying after the runtime upgrade. Below is the code that I wrote for the storage migration&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const COUNCIL_PREFIX: &amp;str = &quot;Instance1Council&quot;;&#xD;&#xA;&#xD;&#xA;pub struct CouncilStoragePrefixMigration;&#xD;&#xA;&#xD;&#xA;impl OnRuntimeUpgrade for CouncilStoragePrefixMigration {&#xD;&#xA;	fn on_runtime_upgrade() -&gt; frame_support::weights::Weight {&#xD;&#xA;		pallet_collective::migrations::v4::migrate::&lt;Runtime, Council, _&gt;(COUNCIL_PREFIX)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn pre_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		pallet_collective::migrations::v4::pre_migrate::&lt;Council, _&gt;(COUNCIL_PREFIX);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn post_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		pallet_collective::migrations::v4::post_migrate::&lt;Council, _&gt;(COUNCIL_PREFIX);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type Migrations = (&#xD;&#xA;	CouncilStoragePrefixMigration,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have also updated the ```spec_version``` but after the runtime upgrade the council members don't show up. How can I implement the storage migration correctly? Any help will be highly appreciated. " ContentLicense="CC BY-SA 4.0" />
  <row Id="31814" PostHistoryTypeId="2" PostId="8088" RevisionGUID="43378573-0345-4d57-990f-7498237f976e" CreationDate="2023-04-14T12:33:36.770" UserId="4087" Text="We (Web3 Labs) released an [ink! contract verification service][1] recently which provides this functionality.&#xD;&#xA;&#xD;&#xA;Unlike in Ethereum where hashes of contract source code and metadata files are used to verify the contract, Rust compiling to WASM is non-deterministic. Hence in order to produce a verifiable build you need to use the same environment to compile the contract code and subsequently verify it.&#xD;&#xA;&#xD;&#xA;At present the best way of achieving this is by using Docker images. The following [article][2] provides instructions on how to work with the service.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/web3labs/ink-verifier-server&#xD;&#xA;  [2]: https://medium.com/sirato/how-to-verify-ink-smart-contracts-83fec5de81aa" ContentLicense="CC BY-SA 4.0" />
  <row Id="31816" PostHistoryTypeId="2" PostId="8089" RevisionGUID="2db509ef-e6eb-4c10-aa6d-b304ad1b17c0" CreationDate="2023-04-14T12:39:53.810" UserId="3989" Text="For the next person facing a similar issue, I managed to get both the relay chain and the parachain to produce blocks.&#xD;&#xA;&#xD;&#xA;It turned out that I had an issue with the initialization of the keystore of the relay chain nodes. After fixing that, I was able to produce blocks on the relay chain, but the parachain started displaying the warning: `Collation wasn't advertised to any validator. ...`.&#xD;&#xA;&#xD;&#xA;I resolved this issue by adding three additional keys (`asgn`, `audi`, and `beef`) to the keystore of the relay chain nodes as described [here](https://substrate.stackexchange.com/questions/5397/how-to-properly-set-session-keys-for-relay-and-parachain-with-custom-keys).&#xD;&#xA;&#xD;&#xA;I included the parachain in the genesis of the chain specification I use for the relay chain nodes according to the answer I got from @pepoviola to my question posted [here](https://substrate.stackexchange.com/questions/8027/is-it-possible-to-specify-parachains-in-the-polkadot-chain-specification-for-loc/8035?noredirect=1#comment8073_8035)." ContentLicense="CC BY-SA 4.0" />
  <row Id="31818" PostHistoryTypeId="2" PostId="8090" RevisionGUID="da8e0d9e-d451-44b8-8b02-7c32bdfb309e" CreationDate="2023-04-14T13:06:42.890" UserId="29" Text="First and foremost, make sure you're **not** using the open-runtime-module-library from crates.io - it is super old&#xD;&#xA;&#xD;&#xA;You can patch all the Substrate dependencies to make sure they are the same throughout your project.&#xD;&#xA;&#xD;&#xA;For example, Acala is currently using polkadot-v0.9.38:&#xD;&#xA;```toml&#xD;&#xA;# substrate&#xD;&#xA;frame-executive = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.38&quot;, default-features = false }&#xD;&#xA;frame-support = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v0.9.38&quot;, default-features = false }&#xD;&#xA;....&#xD;&#xA;```&#xD;&#xA;- https://github.com/AcalaNetwork/Acala/blob/65b2ba1f97e96ff55afbc389acfa667c421bc797/runtime/karura/Cargo.toml#L16-L54&#xD;&#xA;&#xD;&#xA;And you can see they use a patch to override the substrate dependency with a specific revision which you can pick but make sure it has sp-io v7.0.0:&#xD;&#xA;```toml&#xD;&#xA;[patch.&quot;https://github.com/paritytech/substrate&quot;]&#xD;&#xA;frame-benchmarking = { git = &quot;https://github.com/paritytech//substrate&quot;, rev = &quot;18bb7c7c841b101c19a8d1881b893ae8e37de460&quot; }&#xD;&#xA;frame-benchmarking-cli = { git = &quot;https://github.com/paritytech//substrate&quot;, rev = &quot;18bb7c7c841b101c19a8d1881b893ae8e37de460&quot; }&#xD;&#xA;....&#xD;&#xA;```&#xD;&#xA;- https://github.com/AcalaNetwork/Acala/blob/65b2ba1f97e96ff55afbc389acfa667c421bc797/Cargo.toml#L128-L283&#xD;&#xA;&#xD;&#xA;And you can see that in open-runtime-module-library there is a polkadot-v0.9.38 branch that has a patch:&#xD;&#xA;```toml&#xD;&#xA;[patch.'https://github.com/paritytech/substrate']&#xD;&#xA;frame-benchmarking = { git = &quot;https://github.com/paritytech//substrate&quot;, rev = &quot;18bb7c7c841b101c19a8d1881b893ae8e37de460&quot; }&#xD;&#xA;frame-support = { git = &quot;https://github.com/paritytech//substrate&quot;, rev = &quot;18bb7c7c841b101c19a8d1881b893ae8e37de460&quot; }&#xD;&#xA;....&#xD;&#xA;```&#xD;&#xA; - https://github.com/open-web3-stack/open-runtime-module-library/blob/241d5cdc98cca53b8cf990853943c9ae1193a70e/Cargo.dev.toml#L39-L89&#xD;&#xA;&#xD;&#xA;Notice that the revisions from the orml library and Acala's substrate dependencies match up: &#xD;&#xA;`18bb7c7c841b101c19a8d1881b893ae8e37de460` == `18bb7c7c841b101c19a8d1881b893ae8e37de460`&#xD;&#xA;&#xD;&#xA;Your project should now work.&#xD;&#xA;&#xD;&#xA;If you're not familiar with how cargo's patch works:&#xD;&#xA;- https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html&#xD;&#xA;&#xD;&#xA;Specifically what we used above is this:&#xD;&#xA;- https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#overriding-repository-url&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31820" PostHistoryTypeId="2" PostId="8091" RevisionGUID="6c00f8c4-7d83-433e-b9f6-97aeb65f3a4b" CreationDate="2023-04-14T13:22:40.407" UserId="29" Text="It's hard to say without knowing more details about what your configuration is, where you're running it, what version of kubernetes, how your cluster is configured, etc.&#xD;&#xA;&#xD;&#xA;That being said, it could be that it's trying to spawn a worker on the root filesystem which is likely read-only as managed kubernetes clusters tend to make read only pods by default. The node will work fine because it's using a mounted volume for the database, but that's not where the bind is attempting to be established." ContentLicense="CC BY-SA 4.0" />
  <row Id="31822" PostHistoryTypeId="2" PostId="8092" RevisionGUID="56cd4e15-e43e-49e3-970c-ef77c891df62" CreationDate="2023-04-14T13:41:38.297" UserId="1732" Text="The Polkadot account `1vSN9CPVLXJWsY3JbdRU9KjAFFAx88yvEVpU1ayjnhSephy` is a proxy, controlled by a multisig (`13oHAjv9gNbdVKFk6uosaiyRAm2ybC48VnJ47Ss8F8pY7NgR`).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All attempts to initiate an extrinsic with it (token transfer, bonding) end up in a failure with `LiquidityRestrictions` error.&#xD;&#xA;example: https://polkadot.subscan.io/extrinsic/15084711-3&#xD;&#xA;[![extrinsic fail][1]][1]&#xD;&#xA;&#xD;&#xA;This account has 454.1998 DOT transferable, 20.2580 DOT reserved, nothing bonded nor locked. but even a 1 DOT transfer ends up in a failure.&#xD;&#xA;&#xD;&#xA;[![balance][2]][2]&#xD;&#xA;&#xD;&#xA;This account is also the root/toggler/nominator of the nomination pool #21.&#xD;&#xA;https://polkadot.subscan.io/nomination_pool/21&#xD;&#xA;But it has no tokens bonded to this pool.&#xD;&#xA;&#xD;&#xA;Following the [referenda #111][3] enacting the `nominationPools.minCreateBond` to 500 DOT, I suspect the runtime to check this amount on the pool's root, while storage doesn't consider it bonded.&#xD;&#xA;&#xD;&#xA;Could anyone confirm this is a bug?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6koRz.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Z5HxT.png&#xD;&#xA;  [3]: https://polkadot.polkassembly.io/referendum/111" ContentLicense="CC BY-SA 4.0" />
  <row Id="31824" PostHistoryTypeId="1" PostId="8092" RevisionGUID="56cd4e15-e43e-49e3-970c-ef77c891df62" CreationDate="2023-04-14T13:41:38.297" UserId="1732" Text="Polkadot - LiquidityRestrictions on an account having transferable tokens" ContentLicense="CC BY-SA 4.0" />
  <row Id="31825" PostHistoryTypeId="3" PostId="8092" RevisionGUID="56cd4e15-e43e-49e3-970c-ef77c891df62" CreationDate="2023-04-14T13:41:38.297" UserId="1732" Text="|polkadot|error|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31826" PostHistoryTypeId="5" PostId="8040" RevisionGUID="112f0a7d-f8a3-4629-9fea-eabed90dc8c8" CreationDate="2023-04-14T13:43:05.310" UserId="29" Comment="added 4 characters in body" Text="If you want to do some work before announcing a block to the network, you can do it the following way. [You will need to change this code][1] to something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;   // Don't let the internals announce the block automatically&#xD;&#xA;   config.announce_block = false;&#xD;&#xA; &#xD;&#xA;   // Start the network etc.&#xD;&#xA;   let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =&#xD;&#xA;		sc_service::build_network(sc_service::BuildNetworkParams {&#xD;&#xA;			config: &amp;config,&#xD;&#xA;			client: client.clone(),&#xD;&#xA;			transaction_pool: transaction_pool.clone(),&#xD;&#xA;			spawn_handle: task_manager.spawn_handle(),&#xD;&#xA;			import_queue,&#xD;&#xA;			block_announce_validator_builder: None,&#xD;&#xA;			warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)),&#xD;&#xA;		})?;&#xD;&#xA;    &#xD;&#xA;    let block_import = client.import_notification_stream();&#xD;&#xA;    let custom_block_announce = async move {&#xD;&#xA;        while let Some(import) = block_import.next().await {&#xD;&#xA;            // If the local node produced the block&#xD;&#xA;            if import.origin == BlockOrigin::Own {&#xD;&#xA;                // Insert your special logic here&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // Announce the block to the network&#xD;&#xA;            sync_service.announce_block(import.hash, None);&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    task_manager.spawn_handle().spawn(&#xD;&#xA;        &quot;custom-block-announce&quot;,&#xD;&#xA;        None,&#xD;&#xA;        custom_block_announce.boxed(),&#xD;&#xA;    );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/8548a97f9272c7ca43ac7c091d81e6b9cc8b69e2/bin/node-template/node/src/service.rs#L173-L182" ContentLicense="CC BY-SA 4.0" />
  <row Id="31828" PostHistoryTypeId="5" PostId="8087" RevisionGUID="20ed1f92-fb7e-42e3-9d6b-e6246e3945d0" CreationDate="2023-04-14T15:01:14.080" UserId="1891" Comment="deleted 10 characters in body" Text="I have written code for a storage migration but unfortunately the council members are not displaying after the runtime upgrade. Below is the code I wrote for the storage migration&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const COUNCIL_PREFIX: &amp;str = &quot;Instance1Council&quot;;&#xD;&#xA;&#xD;&#xA;pub struct CouncilStoragePrefixMigration;&#xD;&#xA;&#xD;&#xA;impl OnRuntimeUpgrade for CouncilStoragePrefixMigration {&#xD;&#xA;	fn on_runtime_upgrade() -&gt; frame_support::weights::Weight {&#xD;&#xA;		pallet_collective::migrations::v4::migrate::&lt;Runtime, Council, _&gt;(COUNCIL_PREFIX)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn pre_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		pallet_collective::migrations::v4::pre_migrate::&lt;Council, _&gt;(COUNCIL_PREFIX);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn post_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		pallet_collective::migrations::v4::post_migrate::&lt;Council, _&gt;(COUNCIL_PREFIX);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type Migrations = (&#xD;&#xA;	CouncilStoragePrefixMigration,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I also updated the ```spec_version``` but after the runtime upgrade the council members don't show up. How can I implement the storage migration correctly? Any help will be highly appreciated. " ContentLicense="CC BY-SA 4.0" />
  <row Id="31829" PostHistoryTypeId="5" PostId="7981" RevisionGUID="2a7afb94-9b7d-4019-aa48-507b18d4ad8c" CreationDate="2023-04-14T15:07:17.627" UserId="3317" Comment="added 124 characters in body" Text="You can have [max. 4][1] [`#[ink(topic)]`][2] in an `#[ink(event)]` when using the `DefaultEnvironment`. The signature of the event, however, is by default one of the topics of the event so that leaves 3. Except if you annotate the event with `#[ink(anonymous)]` ([ref][3]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/master/crates/env/src/types.rs#L189&#xD;&#xA;  [2]: https://use.ink/macros-attributes/topic&#xD;&#xA;  [3]: https://use.ink/basics/events" ContentLicense="CC BY-SA 4.0" />
  <row Id="31830" PostHistoryTypeId="2" PostId="8093" RevisionGUID="712953a8-877c-4ee1-9c36-e158db5cdcd3" CreationDate="2023-04-14T15:35:13.160" UserId="2025" Text="I believe the issue is not in the Proxy account but in the available balance of the multisig initiator account, i.e. `12bLdVAgWiKHgFHtAaQstasMUWVq35oG9iwHCwsKoFFNoNrk`. As you can see in [this wiki page](https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account) (&quot;How to use a multisig account&#xD;&#xA;&quot; section), the account needs more than 20 DOTs available to initiate a multisig operation. The mentioned account only has 6.496 transferable DOTs at the moment. Can you please try to send more funds to this account and try again?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31832" PostHistoryTypeId="4" PostId="8092" RevisionGUID="fc44c94b-0064-4d3a-9ae0-aee4793dd8cc" CreationDate="2023-04-14T16:15:40.437" UserId="1732" Comment="edited title" Text="Polkadot multisig - LiquidityRestrictions error to initiate a call from an account with &lt; 20 DOT" ContentLicense="CC BY-SA 4.0" />
  <row Id="31833" PostHistoryTypeId="6" PostId="8092" RevisionGUID="fc44c94b-0064-4d3a-9ae0-aee4793dd8cc" CreationDate="2023-04-14T16:15:40.437" UserId="1732" Comment="edited title" Text="|polkadot|error|balances|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31834" PostHistoryTypeId="2" PostId="8094" RevisionGUID="1d56f256-4f5c-488f-a190-e4887f6b24e3" CreationDate="2023-04-14T17:35:53.637" UserId="94" Text="In general it should not be necessary to implement custom benchmarks for external pallets.  &#xD;&#xA;&#xD;&#xA;You just have to configure the concrete callbacks in your runtime and re-run the benchmark. The weight of the callbacks will then be included in the output.  &#xD;&#xA;&#xD;&#xA;This is easier that to annotate weights in interface. Otherwise all interfaces that can be used as callback would need to expose their weight info as well.&#xD;&#xA;&#xD;&#xA;In your example i dont see a difference. Since every runtime config needs to re-run benches, the effort for the `CurrencyHooks` will be included." ContentLicense="CC BY-SA 4.0" />
  <row Id="31836" PostHistoryTypeId="5" PostId="8087" RevisionGUID="ac7f60ca-ddf6-40ad-bc88-6872a68076ef" CreationDate="2023-04-15T00:56:25.053" UserId="251" Comment="added 3 characters in body" Text="I have written code for a storage migration but unfortunately the council members are not displaying after the runtime upgrade. Below is the code I wrote for the storage migration&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;const COUNCIL_PREFIX: &amp;str = &quot;Instance1Council&quot;;&#xD;&#xA;&#xD;&#xA;pub struct CouncilStoragePrefixMigration;&#xD;&#xA;&#xD;&#xA;impl OnRuntimeUpgrade for CouncilStoragePrefixMigration {&#xD;&#xA;	fn on_runtime_upgrade() -&gt; frame_support::weights::Weight {&#xD;&#xA;		pallet_collective::migrations::v4::migrate::&lt;Runtime, Council, _&gt;(COUNCIL_PREFIX)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn pre_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		pallet_collective::migrations::v4::pre_migrate::&lt;Council, _&gt;(COUNCIL_PREFIX);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	fn post_upgrade() -&gt; Result&lt;(), &amp;'static str&gt; {&#xD;&#xA;		pallet_collective::migrations::v4::post_migrate::&lt;Council, _&gt;(COUNCIL_PREFIX);&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type Migrations = (&#xD;&#xA;	CouncilStoragePrefixMigration,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I also updated the ```spec_version``` but after the runtime upgrade the council members don't show up. How can I implement the storage migration correctly? Any help will be highly appreciated. " ContentLicense="CC BY-SA 4.0" />
  <row Id="31837" PostHistoryTypeId="2" PostId="8095" RevisionGUID="c0ef589d-0de7-4285-acf4-c4ea14f41d89" CreationDate="2023-04-15T04:53:45.270" UserId="2761" Text="Is it possible to combine a relay chain with several compatible parachains to create one single logical chain with shared account balances?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31839" PostHistoryTypeId="1" PostId="8095" RevisionGUID="c0ef589d-0de7-4285-acf4-c4ea14f41d89" CreationDate="2023-04-15T04:53:45.270" UserId="2761" Text="Horizontally scaling one chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="31840" PostHistoryTypeId="3" PostId="8095" RevisionGUID="c0ef589d-0de7-4285-acf4-c4ea14f41d89" CreationDate="2023-04-15T04:53:45.270" UserId="2761" Text="|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31841" PostHistoryTypeId="50" PostId="7664" RevisionGUID="530e3280-7064-4bab-929e-f9d1e5b29d24" CreationDate="2023-04-15T08:02:15.280" UserId="-1" />
  <row Id="31842" PostHistoryTypeId="5" PostId="8071" RevisionGUID="ee04cefb-921a-4cd3-b0ae-016517cc1ce1" CreationDate="2023-04-15T08:35:13.630" UserId="3371" Comment="added 290 characters in body" Text="I'm getting the following error while running rococo alice validator node in kubernetes cluster:&#xD;&#xA;&#xD;&#xA;    cannot bind unix socket: Os { code: 30, kind: ReadOnlyFilesystem, message: &quot;Read-only file system&quot; } debug_id=prepare program_path=&quot;/usr/bin/polkadot&quot; extra_args=[&quot;prepare-worker&quot;, &quot;--node-impl-version&quot;, &quot;0.9.41-e203bfb396e&quot;]&#xD;&#xA;    failed to spawn a prepare worker: Bind&#xD;&#xA;&#xD;&#xA;Basically, I'm running my own rococo instance with 3 validators in Kubernetes. Everything works fine until the parachain is connected and start collating - then this error occurs in the alice validator node and parachain is stuck on importing new blocks. The validator is still running okay.&#xD;&#xA;&#xD;&#xA;P.S. Everything works fine locally so possibly there is some problem with the deployment configuration. I'm using parity helm charts for deployment.&#xD;&#xA;&#xD;&#xA;Have someone faced this problem? Any help is appreciated.&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;UPD: My configuration:&#xD;&#xA;&#xD;&#xA;AWS EKS Managed cluster. Kubernetes version: 1.24. &#xD;&#xA;&#xD;&#xA;Polkadot relay chain image: polkadot/polkadot:latest (or v0.9.37 either)&#xD;&#xA;&#xD;&#xA;Running statefulset node pod with securityContext parameter set to root user(0). No specific permission limitations applied. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31843" PostHistoryTypeId="2" PostId="8096" RevisionGUID="a750cc02-2cf7-4389-a6aa-658548e634c8" CreationDate="2023-04-15T12:47:10.083" UserId="2722" Text="i want to use orml-traits in substrate project . im using this substrate repo : [Substrate Repository][1]&#xD;&#xA;&#xD;&#xA;and also i cloned this repo for using `orml` porject in local : &#xD;&#xA;&#xD;&#xA;[orml Repository][2]&#xD;&#xA;&#xD;&#xA;i changed some crates in `orml-traits` `Cargo.tmol` : &#xD;&#xA;&#xD;&#xA;i added these files into the `orml-traits Cargo.toml` insted of previous : &#xD;&#xA;&#xD;&#xA;        frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../frame/support&quot; }&#xD;&#xA;    frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../frame/system&quot; }&#xD;&#xA;    sp-io = { version = &quot;7.0.0&quot;, default-features = false, path = &quot;../../primitives/io&quot; }&#xD;&#xA;    sp-runtime = { version = &quot;7.0.0&quot;, default-features = false, path = &quot;../primitives//runtime&quot; }&#xD;&#xA;    sp-std = { version = &quot;5.0.0&quot;, default-features = false, path = &quot;../primitives/std&quot; }&#xD;&#xA;&#xD;&#xA;and use the `orml-traits` in pallet:&#xD;&#xA;&#xD;&#xA;    orml-traits = { path=&quot;../../../orlem/traits&quot;, default-features = false, version = &quot;0.4.1-dev&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but when i run `cargo check` every thing is ok and it doesn't show me any error . &#xD;&#xA;&#xD;&#xA;but when i run `cargo build --release` it show me this error : &#xD;&#xA;&#xD;&#xA;     = note: /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.15.rcgu.o): in function `wasm_to_host_trampoline':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.15:(.text+0x0): multiple definition of `wasm_to_host_trampoline'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.4.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.4:(.text+0x0): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.15.rcgu.o): in function `host_to_wasm_trampoline':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.15:(.text+0x20): multiple definition of `host_to_wasm_trampoline'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.4.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.4:(.text+0x20): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.2.rcgu.o): in function `resolve_vmctx_memory':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.2:(.text.resolve_vmctx_memory+0x0): multiple definition of `resolve_vmctx_memory'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.12.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.12:(.text.resolve_vmctx_memory+0x0): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.2.rcgu.o): in function `resolve_vmctx_memory_ptr':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.2:(.text.resolve_vmctx_memory_ptr+0x0): multiple definition of `resolve_vmctx_memory_ptr'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.12.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.12:(.text.resolve_vmctx_memory_ptr+0x0): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.2.rcgu.o): in function `set_vmctx_memory':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.2:(.text.set_vmctx_memory+0x0): multiple definition of `set_vmctx_memory'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.12.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.12:(.text.set_vmctx_memory+0x0): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.4.rcgu.o): in function `memory32_grow':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.4:(.text+0x0): multiple definition of `memory32_grow'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.11.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.11:(.text+0x0): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.4.rcgu.o): in function `table_copy':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.4:(.text+0x20): multiple definition of `table_copy'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.11.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.11:(.text+0x20): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.4.rcgu.o): in function `table_init':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.4:(.text+0x40): multiple definition of `table_init'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.11.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.11:(.text+0x40): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.4.rcgu.o): in function `elem_drop':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.4:(.text+0x60): multiple definition of `elem_drop'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.11.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.11:(.text+0x60): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.4.rcgu.o): in function `memory_copy':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.4:(.text+0x80): multiple definition of `memory_copy'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eb&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    error: could not compile `node-cli` due to previous error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate&#xD;&#xA;  [2]: https://github.com/open-web3-stack/open-runtime-module-library&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31845" PostHistoryTypeId="1" PostId="8096" RevisionGUID="a750cc02-2cf7-4389-a6aa-658548e634c8" CreationDate="2023-04-15T12:47:10.083" UserId="2722" Text="linking with `cc` failed: exit status: 1" ContentLicense="CC BY-SA 4.0" />
  <row Id="31846" PostHistoryTypeId="3" PostId="8096" RevisionGUID="a750cc02-2cf7-4389-a6aa-658548e634c8" CreationDate="2023-04-15T12:47:10.083" UserId="2722" Text="|substrate-node-template|orml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31851" PostHistoryTypeId="2" PostId="8098" RevisionGUID="4a9f146c-ef92-49f7-9013-1e97a088bd55" CreationDate="2023-04-15T15:56:35.463" UserId="1951" Text="The problem was within some of my dependencies. Rolling them back helped." ContentLicense="CC BY-SA 4.0" />
  <row Id="31857" PostHistoryTypeId="50" PostId="3807" RevisionGUID="c53e1d1b-baa5-4503-97f1-d8614e6cd518" CreationDate="2023-04-15T22:07:50.923" UserId="-1" />
  <row Id="31863" PostHistoryTypeId="2" PostId="8101" RevisionGUID="53deb917-0939-47a8-95d1-e3217c020041" CreationDate="2023-04-16T13:09:16.400" UserId="3989" Text="Just wanted to add the solution that worked for me for any future visitors. (Tested with `subxt v0.28`)&#xD;&#xA;&#xD;&#xA;To avoid manually checking and specifying `sp_*` versions, which did not solve my issues, I used the re-exported structs from `subxt` itself. I did the following:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use subxt::ext::sp_core::Pair;&#xD;&#xA;use subxt::tx::PairSigner;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;pub async fn something() -&gt; Result&lt;(), Box&lt;dyn Error&gt;&gt; {&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;    let pair = subxt::ext::sp_core::sr25519::Pair::from_string_with_seed(&lt;'0x'-PREFIXED PRIVATE SEED&gt;, None).unwrap();&#xD;&#xA;    let signer: PairSigner&lt;SubstrateConfig, subxt::ext::sp_core::sr25519::Pair&gt; = PairSigner::&lt;SubstrateConfig, subxt::ext::sp_core::sr25519::Pair&gt;::new(pair.0);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will presumably avoid having to check and update the version of each `sp_*` dependency if the `subxt` version is changed.&#xD;&#xA;&#xD;&#xA;If any `subxt` maintainer reads this, it could be great with some in-depth explanations/tutorials/guides to set up the tool with a custom Substrate chain. The provided examples and the rust documentation pages did not quite satisfy my needs.&#xD;&#xA;That said, the idea of having a tool for interacting with a live chain, which can be validated on compile-time through generated runtime APIs is super cool. I appreciate your hard work." ContentLicense="CC BY-SA 4.0" />
  <row Id="31865" PostHistoryTypeId="2" PostId="8102" RevisionGUID="b05cba85-38c3-4b1e-b067-14dd0528748c" CreationDate="2023-04-16T13:36:26.530" UserId="3989" Text="If you are still having issues, I got a compiling implementation after a long time of searching for an example using a hex-encoded seed. &#xD;&#xA;&#xD;&#xA;I posted it as an answer to another issue [here](https://substrate.stackexchange.com/a/8101/3989), but what I did was simply use the re-exported structs from `subxt` as seen below:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use subxt::ext::sp_core::Pair;&#xD;&#xA;use subxt::tx::PairSigner;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;pub async fn something() -&gt; Result&lt;(), Box&lt;dyn Error&gt;&gt; {&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;    let pair = subxt::ext::sp_core::sr25519::Pair::from_string_with_seed(&lt;'0x'-PREFIXED PRIVATE SEED&gt;, Some(&lt;PASSWORD&gt;)).unwrap();&#xD;&#xA;    let signer: PairSigner&lt;SubstrateConfig, subxt::ext::sp_core::sr25519::Pair&gt; = PairSigner::&lt;SubstrateConfig, subxt::ext::sp_core::sr25519::Pair&gt;::new(pair.0);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="31867" PostHistoryTypeId="50" PostId="5401" RevisionGUID="06910e6b-9291-4e93-8750-e32a5e8b34e3" CreationDate="2023-04-16T16:01:50.200" UserId="-1" />
  <row Id="31868" PostHistoryTypeId="2" PostId="8103" RevisionGUID="fcef887c-654c-4100-b334-15be8b3daf78" CreationDate="2023-04-16T16:05:39.350" UserId="3327" Text="I am experimenting with the export state command. For now I am testing it on my local machine. So, for this purpose, I spin up polkadot relay chain with two validators and connect one collator of my parachain with it. I am using my custom key to be used as sudo and collator/session keys. &#xD;&#xA;&#xD;&#xA;Afer executing export-state command, I restart my parachain collator using the newly generated chain-spec and registered it with the relaychain too (using the new genesis and wasm files). &#xD;&#xA;&#xD;&#xA;I observed that the collator hex address of my parachian has changed. I checked it using chainstate → auraExt → authorities. I wonder why is  the collator hex changed and how to add my actual collator?&#xD;&#xA;&#xD;&#xA;I am attaching the collator hex before and after executing the export-state command. &#xD;&#xA;&#xD;&#xA;Here is the collator hex address before export-state:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the collator hex after export-state:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cVLnN.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/if1nM.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="31870" PostHistoryTypeId="1" PostId="8103" RevisionGUID="fcef887c-654c-4100-b334-15be8b3daf78" CreationDate="2023-04-16T16:05:39.350" UserId="3327" Text="Export-State produces wrong collators hex" ContentLicense="CC BY-SA 4.0" />
  <row Id="31871" PostHistoryTypeId="3" PostId="8103" RevisionGUID="fcef887c-654c-4100-b334-15be8b3daf78" CreationDate="2023-04-16T16:05:39.350" UserId="3327" Text="|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31873" PostHistoryTypeId="2" PostId="8104" RevisionGUID="7eba5f29-a2df-4221-9524-c0344d1c08b2" CreationDate="2023-04-16T19:23:36.253" UserId="3630" Text="Did you initialise the offchain worker in service.rs file? These lines have to  be added to initialise offchain worker https://github.com/substrate-developer-hub/substrate-node-template/blob/150c6c9e66bd4e866cfd4704d4d2a16799edc2c0/node/src/service.rs#L205" ContentLicense="CC BY-SA 4.0" />
  <row Id="31875" PostHistoryTypeId="2" PostId="8105" RevisionGUID="1aa1112e-676f-40e5-b6a3-e5dd5fc7d8f6" CreationDate="2023-04-17T06:38:42.123" UserId="2281" Text="i am working on substrate i have created a custom token using `pallet_assets`,how can i configure the transaction_fee using the custom token i have  seen the `pallet_assets_transaction payment` which say's [![][1]][1] How can i add this to  &#xD;&#xA;&#xD;&#xA;&gt; SignedExtension&#xD;&#xA;&#xD;&#xA;i also tried to add into `pallet_transaction_payment::Config for Runtime` &#xD;&#xA;&#xD;&#xA;    type OnChargeTransaction = FungiblesAdapter&lt;Balances,()&gt;;&#xD;&#xA;but it did't work can i do something like this? or is there any other way to do this? i have taken the reference from [here][2] but it did't work for me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NqIOA.png&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/3752/how-to-pay-transaction-fees-using-the-custom-token-created-by-using-pallet-asset" ContentLicense="CC BY-SA 4.0" />
  <row Id="31877" PostHistoryTypeId="1" PostId="8105" RevisionGUID="1aa1112e-676f-40e5-b6a3-e5dd5fc7d8f6" CreationDate="2023-04-17T06:38:42.123" UserId="2281" Text="how to pay transaction fee through custom token?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31878" PostHistoryTypeId="3" PostId="8105" RevisionGUID="1aa1112e-676f-40e5-b6a3-e5dd5fc7d8f6" CreationDate="2023-04-17T06:38:42.123" UserId="2281" Text="|substrate-node-template|assets|signed-extensions|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31879" PostHistoryTypeId="2" PostId="8106" RevisionGUID="7d1e7c7c-d5d4-4302-8f83-535e7e2a76da" CreationDate="2023-04-17T08:00:46.370" UserId="29" Text="How do I compile only the Substrate node-template from the Substrate repo:&#xD;&#xA;- https://github.com/paritytech/substrate/tree/master/bin/node-template&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31881" PostHistoryTypeId="1" PostId="8106" RevisionGUID="7d1e7c7c-d5d4-4302-8f83-535e7e2a76da" CreationDate="2023-04-17T08:00:46.370" UserId="29" Text="How do I compile only the Substrate node-template from the Substrate repo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31882" PostHistoryTypeId="3" PostId="8106" RevisionGUID="7d1e7c7c-d5d4-4302-8f83-535e7e2a76da" CreationDate="2023-04-17T08:00:46.370" UserId="29" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31883" PostHistoryTypeId="2" PostId="8107" RevisionGUID="2b189c47-5b50-4d27-b8cb-b987f0b5df40" CreationDate="2023-04-17T08:00:46.370" UserId="29" Text="```sh&#xD;&#xA;cargo build -r -p node-template&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Keep in mind you can also use:&#xD;&#xA;- https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;&#xD;&#xA;Which is a CI that takes the node-template from the Substrate repo regularly." ContentLicense="CC BY-SA 4.0" />
  <row Id="31885" PostHistoryTypeId="2" PostId="8108" RevisionGUID="864aca40-c50c-4642-a0ac-a7d637f83d79" CreationDate="2023-04-17T09:03:06.670" UserId="3327" Text="Is is possible to add/delete session keys directly to the raw chain specs instead of plain chain specs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31887" PostHistoryTypeId="1" PostId="8108" RevisionGUID="864aca40-c50c-4642-a0ac-a7d637f83d79" CreationDate="2023-04-17T09:03:06.670" UserId="3327" Text="How to inject session key in raw chain specs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31888" PostHistoryTypeId="3" PostId="8108" RevisionGUID="864aca40-c50c-4642-a0ac-a7d637f83d79" CreationDate="2023-04-17T09:03:06.670" UserId="3327" Text="|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31889" PostHistoryTypeId="2" PostId="8109" RevisionGUID="12b23633-3d90-4286-971c-a300bcc3a121" CreationDate="2023-04-17T10:04:19.473" UserId="2372" Text="Hi I'm sending a message from millau-rialto in the bridge in which giving recipient and amount in the command. But the problem the source signer is only giving transaction fee and the target signer on another chain is paying the amount. Can someone please help me through this&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    ./target/debug/substrate-relay send-message millau-to-rialto \&#xD;&#xA;    			--source-host localhost \&#xD;&#xA;    			--source-port $MILLAU_PORT \&#xD;&#xA;    			--source-signer //Alice\&#xD;&#xA;    			--target-signer //Eve \&#xD;&#xA;    			--lane 00000000 \&#xD;&#xA;    			--origin Target \&#xD;&#xA;    			transfer \&#xD;&#xA;    			--amount 10000000000000 \&#xD;&#xA;    			--recipient 5qTnmq6AGPoZVr29wDsgXhoLhpp3sCukSFXh7zGSaQtgCa1U \" ContentLicense="CC BY-SA 4.0" />
  <row Id="31891" PostHistoryTypeId="1" PostId="8109" RevisionGUID="12b23633-3d90-4286-971c-a300bcc3a121" CreationDate="2023-04-17T10:04:19.473" UserId="2372" Text="Why target-signer account balance is deducted in parity-bridges-common?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31892" PostHistoryTypeId="3" PostId="8109" RevisionGUID="12b23633-3d90-4286-971c-a300bcc3a121" CreationDate="2023-04-17T10:04:19.473" UserId="2372" Text="|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31893" PostHistoryTypeId="2" PostId="8110" RevisionGUID="d87dbda7-e7e7-47b2-ab5d-adc390e4da0f" CreationDate="2023-04-17T10:05:26.890" UserId="425" Text="&#xD;&#xA;Wanted to get some clarity on repeated reads.&#xD;&#xA;&#xD;&#xA;Assuming this is the contract storage, two values both under the default `0x00000000` key in the storage.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct MyContract {&#xD;&#xA;  pub field_1: u32,&#xD;&#xA;  pub field_2: bool,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Now are the repeated calls to the storage within one message cached?&#xD;&#xA;Basically, will this incur two reads:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn get_values(&amp;self) -&gt; (u32, bool) {&#xD;&#xA;    (self.state.field_1, self.state.field_2)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there any difference if the storage is non-eager? E.g. with a contract like that:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Default, Debug)]&#xD;&#xA;#[ink::storage_item]&#xD;&#xA;pub struct State {&#xD;&#xA;    pub field_1: u32,&#xD;&#xA;    pub field_2: bool,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct MyContract {&#xD;&#xA;  pub state: Lazy&lt;State, ManualKey&lt;123&gt;&gt;,  &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;will the `123` cell be read twice, or is it cached on the first read?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn get_values(&amp;self) -&gt; (u32, bool) {&#xD;&#xA;    (self.state.get_or_default().field_1, self.state.get_or_default().field_2)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31895" PostHistoryTypeId="1" PostId="8110" RevisionGUID="d87dbda7-e7e7-47b2-ab5d-adc390e4da0f" CreationDate="2023-04-17T10:05:26.890" UserId="425" Text="Caching of smart contract storage reads" ContentLicense="CC BY-SA 4.0" />
  <row Id="31896" PostHistoryTypeId="3" PostId="8110" RevisionGUID="d87dbda7-e7e7-47b2-ab5d-adc390e4da0f" CreationDate="2023-04-17T10:05:26.890" UserId="425" Text="|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31897" PostHistoryTypeId="5" PostId="5685" RevisionGUID="8aeea763-15d2-49da-bb3d-c30fa4350547" CreationDate="2023-04-17T10:10:18.503" UserId="425" Comment="edited body" Text="I have a question regarding costs of executing a cross-contract call, in which one contract calls the method of another, already instantiated contract.&#xD;&#xA;&#xD;&#xA;Specifically how much more overhead (understood as gas costs) does the caller incur versus executing an inline instruction?&#xD;&#xA;&#xD;&#xA;Is it charged for reading the *entire* callee code from the storage (certainly looks like it)?&#xD;&#xA;&#xD;&#xA;Is there any caching - say I make two consecutive calls from A to B, will it double the fee?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31898" PostHistoryTypeId="2" PostId="8111" RevisionGUID="cf130bc8-fcfd-4409-af12-796204a371b7" CreationDate="2023-04-17T10:23:27.100" UserId="3317" Text="Since you are not providing a lot of information it is hard to help you, but let me give you the main configurations you have to make in your `runtime/src/lib.rs`:&#xD;&#xA;&#xD;&#xA;1. For paying fees with custom token you'd want the `pallet-asset-tx-payment` in stead of the `pallet-transaction-payment` (native token). You can implement it like its done in [Statemint][2].&#xD;&#xA;&#xD;&#xA;1. Adding it as a SignedExtension, [like so][1].&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/trappist/blob/main/runtime/trappist/src/lib.rs#L98&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/blob/863e94d8627bfd30c61cf2aeac3b8706f768bb8f/parachains/runtimes/assets/statemint/src/lib.rs#L561-L573" ContentLicense="CC BY-SA 4.0" />
  <row Id="31900" PostHistoryTypeId="5" PostId="8111" RevisionGUID="66330b87-abcd-4537-8954-4e8602dd510e" CreationDate="2023-04-17T10:33:46.567" UserId="3317" Comment="added 207 characters in body" Text="Since you are not providing a lot of information it is hard to help you, but let me give you the main configurations you have to make in your `runtime/src/lib.rs`:&#xD;&#xA;&#xD;&#xA;1. For paying fees with custom token you'd want the `pallet-asset-tx-payment` in stead of the `pallet-transaction-payment` (native token). You can implement it like its done in [Statemint][1].&#xD;&#xA;&#xD;&#xA;2. Adding it as a `SignedExtension`, [like so][2].&#xD;&#xA;&#xD;&#xA;3. Adding it in the `construct_runtime`, [like so][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/863e94d8627bfd30c61cf2aeac3b8706f768bb8f/parachains/runtimes/assets/statemint/src/lib.rs#L561-L573&#xD;&#xA;  [2]: https://github.com/paritytech/trappist/blob/main/runtime/trappist/src/lib.rs#L98&#xD;&#xA;  [3]: https://github.com/paritytech/cumulus/blob/863e94d8627bfd30c61cf2aeac3b8706f768bb8f/parachains/runtimes/assets/statemint/src/lib.rs#L626" ContentLicense="CC BY-SA 4.0" />
  <row Id="31901" PostHistoryTypeId="2" PostId="8112" RevisionGUID="0376dd05-a2e6-4ebb-8932-e2445792f78b" CreationDate="2023-04-17T10:45:46.613" UserId="451" Text="&gt; will the 123 cell be read twice, or is it cached on the first read?&#xD;&#xA;&#xD;&#xA;It will be read twice. At the moment the `Lazy` type is just a [thin wrapper][1] around `ink::get_contract_storage`. So arguably `Lazy` here is a misleading name since it could imply some form of caching/lazy loading.&#xD;&#xA;&#xD;&#xA;If not wrapped in either `Lazy` or `Mapping`, storage item data types which are part of the contract storage struct are stored in the same storage cell and thus loaded up on contract invocation. So repeated accesses to fields in that case are &quot;in memory&quot;.&#xD;&#xA;&#xD;&#xA;In `ink! 3` we originally had sophisticated caching data structures but those were removed in order to massively reduce contract binary sizes.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/blob/772f4bbc9a7f65b4c7dda80dfeab9858c181dbfc/crates/storage/src/lazy/mod.rs#L139" ContentLicense="CC BY-SA 4.0" />
  <row Id="31907" PostHistoryTypeId="2" PostId="8114" RevisionGUID="a50f70a9-3ce5-4911-af47-7b7a20585f9a" CreationDate="2023-04-17T11:15:34.327" UserId="377" Text="I want to release our chain as solochain. Do we have any checklist or something which help thought the process so that we cannot miss any step or configuration?&#xD;&#xA;&#xD;&#xA;Any help would be appreciable." ContentLicense="CC BY-SA 4.0" />
  <row Id="31909" PostHistoryTypeId="1" PostId="8114" RevisionGUID="a50f70a9-3ce5-4911-af47-7b7a20585f9a" CreationDate="2023-04-17T11:15:34.327" UserId="377" Text="How we can go live as solochain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31910" PostHistoryTypeId="3" PostId="8114" RevisionGUID="a50f70a9-3ce5-4911-af47-7b7a20585f9a" CreationDate="2023-04-17T11:15:34.327" UserId="377" Text="|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31911" PostHistoryTypeId="2" PostId="8115" RevisionGUID="416aeabe-9a5e-4d99-8fb9-2079e3d10c84" CreationDate="2023-04-17T11:21:14.590" UserId="3414" Text="I was working on parity-common-bridges and was transferring balance from millau chain to rialto chain account using this script.&#xD;&#xA;&#xD;&#xA;transfer)&#xD;&#xA;		RUST_LOG=runtime=trace,bin-substrate=trace,bridge=trace \&#xD;&#xA;		./target/release/bin-substrate  send-message millau-to-rialto \&#xD;&#xA;			--source-host localhost \&#xD;&#xA;			--source-port $MILLAU_PORT \&#xD;&#xA;			--source-signer //Alice \&#xD;&#xA;			--target-signer //Bob \&#xD;&#xA;			--lane 00000000 \&#xD;&#xA;			--origin Target \&#xD;&#xA;			transfer \&#xD;&#xA;			--amount 100000000000000 \&#xD;&#xA;			--recipient 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty \&#xD;&#xA;The problem here i am facing is that the balance is not deducted from source-signer, only the transaction fee is deducted from the same. On the other side balance is deducted from target-signer and is transferred to recipient account. My concern is that balance should be deducted from source-signer. If anyone can help me with this issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="31913" PostHistoryTypeId="1" PostId="8115" RevisionGUID="416aeabe-9a5e-4d99-8fb9-2079e3d10c84" CreationDate="2023-04-17T11:21:14.590" UserId="3414" Text="Why Balance is not deducted from source- signer in parity-bridges-common?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31914" PostHistoryTypeId="3" PostId="8115" RevisionGUID="416aeabe-9a5e-4d99-8fb9-2079e3d10c84" CreationDate="2023-04-17T11:21:14.590" UserId="3414" Text="|polkadot|substrate-parachain-template|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31915" PostHistoryTypeId="5" PostId="8105" RevisionGUID="5562baf5-86cb-4f29-884d-0a17aea030d7" CreationDate="2023-04-17T11:43:20.843" UserId="2281" Comment="added 375 characters in body" Text="i am working on substrate i have created a custom token using `pallet_assets`,how can i configure the transaction_fee using the custom token i have  seen the `pallet_assets_transaction payment` which say's [![][1]][1]&#xD;&#xA;&#xD;&#xA;i have added `pallet_asset_tx_payment` to my runtime Config and `construct_runtime` &amp; `SignedExtension`&#xD;&#xA;&#xD;&#xA;[![][2]][2]&#xD;&#xA;&#xD;&#xA;[![][3]][3]&#xD;&#xA;&#xD;&#xA; [![][4]][4]&#xD;&#xA;&#xD;&#xA;&gt; **After above implementation when i try to transfer the assets from account A to account B the fees is getting deducted from the native&#xD;&#xA;&gt; token.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i  tried to add into `pallet_transaction_payment::Config for Runtime` can i do something like this?&#xD;&#xA;&#xD;&#xA;    type OnChargeTransaction = FungiblesAdapter&lt;Balances,()&gt;;&#xD;&#xA;&#xD;&#xA; or is there any other way to do this? i have taken the reference from [here][5] but it did't work for me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NqIOA.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/cbx2G.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/gJ0mX.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/MuHvE.png&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/3752/how-to-pay-transaction-fees-using-the-custom-token-created-by-using-pallet-asset" ContentLicense="CC BY-SA 4.0" />
  <row Id="31917" PostHistoryTypeId="5" PostId="8115" RevisionGUID="627c1d6a-11e3-42a1-ae6f-77f220d3f72c" CreationDate="2023-04-17T12:42:07.700" UserId="2762" Comment="improved formatting" Text="I was working on `parity-common-bridges` and was transferring balance from millau chain to rialto chain account using this script.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RUST_LOG=runtime=trace,bin-substrate=trace,bridge=trace \&#xD;&#xA;./target/release/bin-substrate  send-message millau-to-rialto \&#xD;&#xA;			--source-host localhost \&#xD;&#xA;			--source-port $MILLAU_PORT \&#xD;&#xA;			--source-signer //Alice \&#xD;&#xA;			--target-signer //Bob \&#xD;&#xA;			--lane 00000000 \&#xD;&#xA;			--origin Target \&#xD;&#xA;			transfer \&#xD;&#xA;			--amount 100000000000000 \&#xD;&#xA;			--recipient 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty \&#xD;&#xA;```&#xD;&#xA;The problem here i am facing is that the balance is not deducted from source-signer, only the transaction fee is deducted from the same. On the other side balance is deducted from target-signer and is transferred to recipient account. My concern is that balance should be deducted from source-signer. If anyone can help me with this issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="31918" PostHistoryTypeId="2" PostId="8116" RevisionGUID="ccd4cbca-b666-4480-bded-0f8db0df0008" CreationDate="2023-04-17T13:23:42.587" UserId="3371" Text="The problem is in the helm charts configuration, especially when `node.customNodeKey` value is defined in custom values provided.&#xD;&#xA;&#xD;&#xA;The thing is that it mounts custom node key into the `/tmp/` folder with `readOnly` option set to true. This way the `/tmp/` folder in the filesystem  becomes `read-only` and when relay chain wants to spawn a PVF worker for parachain validation - it is using `/tmp/` folder for that which is read-only by the default configuration above.&#xD;&#xA;&#xD;&#xA;So ideally - the `custom node key` should be mounted under custom path that shouldn't interfere with such generic paths like `/tmp`, especially when it is getting restricted to 'read-only`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31920" PostHistoryTypeId="2" PostId="8117" RevisionGUID="03910042-1e8e-46bf-a97a-0f405f122b75" CreationDate="2023-04-17T14:21:21.680" UserId="426" Text="[This PR][1] covers my question above. It is in fact a bug.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/pull/7081" ContentLicense="CC BY-SA 4.0" />
  <row Id="31922" PostHistoryTypeId="2" PostId="8118" RevisionGUID="2518cfa9-1658-4b0b-85f5-a526acc96466" CreationDate="2023-04-17T14:29:44.593" UserId="251" Text="Yep. That's possible.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;[QueuedKeys](https://github.com/paritytech/substrate/blob/915d22ccaa45b2b93b1eb4194b4349c1db7930d8/frame/session/src/lib.rs#L520)&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// The queued keys for the next session. When the next session begins, these keys&#xD;&#xA;/// will be used to determine the validator's session keys.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn queued_keys)]&#xD;&#xA;pub type QueuedKeys&lt;T: Config&gt; = StorageValue&lt;_, Vec&lt;(T::ValidatorId, T::Keys)&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`T::ValidatorId` is the `AccountId` which you configured in the runtime. `T::Keys` is the `SessionKeys` which you configured in the runtime.&#xD;&#xA;&#xD;&#xA;- [`AccountId`](https://github.com/paritytech/substrate/blob/915d22ccaa45b2b93b1eb4194b4349c1db7930d8/bin/node/runtime/src/lib.rs#L228)&#xD;&#xA;- [`SessionKeys`](https://github.com/paritytech/substrate/blob/915d22ccaa45b2b93b1eb4194b4349c1db7930d8/bin/node/runtime/src/lib.rs#L513-L520)&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let validator_id = H256::default();&#xD;&#xA;let session_keys = SessionKeys { ..Default::default() };&#xD;&#xA;let queued_keys = vec![(validator_id, session_keys)].encode();&#xD;&#xA;let hex = array_bytes::bytes2hex(&quot;0x&quot;, queued_keys);&#xD;&#xA;&#xD;&#xA;println!(&quot;{hex}&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Use Subalfred, PolkadotJS or any other tools to get the storage key.&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;λ subalfred storage-key --pallet Session --item QueuedKeys&#xD;&#xA;0xcec5070d609dd3497f72bde07fc96ba0e0cdd062e6eaf24295ad4ccfc41d4609&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Open the raw JSON file, and search `0xcec5070d609dd3497f72bde07fc96ba0e0cdd062e6eaf24295ad4ccfc41d4609`. Change its value to `println!(&quot;{hex}&quot;);`'s output.&#xD;&#xA;&#xD;&#xA;And you need to do this for the other necessary storage as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="31924" PostHistoryTypeId="2" PostId="8119" RevisionGUID="a7cd6c4b-bf46-42d4-a48c-9a07d0d1ffd9" CreationDate="2023-04-17T14:35:12.507" UserId="251" Text="Follow [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template), you can get a solo chain.&#xD;&#xA;&#xD;&#xA;Follow [substrate-parachain-template](https://github.com/substrate-developer-hub/substrate-parachain-template), you can get a solo chain.&#xD;&#xA;&#xD;&#xA;The checklist is totally up to you. If you prefer to use `AURA` or `BABE` as your chain's consensus engine, ensure that those configurations are checked. Verify your genesis validators and other relevant items on the list.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Basically:&#xD;&#xA;&#xD;&#xA;1. runtime pallets&#xD;&#xA;2. pallets' configurations&#xD;&#xA;3. genesis&#xD;&#xA;&#xD;&#xA;These are the most important/basic things." ContentLicense="CC BY-SA 4.0" />
  <row Id="31926" PostHistoryTypeId="52" PostId="8105" RevisionGUID="1c6ef5b0-fb55-4283-a657-35cc6bf876c7" CreationDate="2023-04-17T14:42:53.417" />
  <row Id="31927" PostHistoryTypeId="2" PostId="8120" RevisionGUID="cd16c1b2-5396-4612-a0c2-81806de16d7e" CreationDate="2023-04-17T14:49:15.913" UserId="251" Text="Yep. Thanks to @bkchr.&#xD;&#xA;&#xD;&#xA;The `enact_authorized_upgrade` currently has a static weight. It won't cost too much.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I believe we can request funding for runtime upgrades from the treasury, regardless of the cost. The treasury will support us, whether it is a significant or minor expense." ContentLicense="CC BY-SA 4.0" />
  <row Id="31934" PostHistoryTypeId="2" PostId="8121" RevisionGUID="fac620d1-a770-442f-9bef-cce098861ac1" CreationDate="2023-04-17T16:20:31.907" UserId="4081" Text="Generally, it is recommended to avoid logging inside the runtime This can lead to some issues, a few I can think of are:&#xD;&#xA;&#xD;&#xA;- Increases the size of the Wasm binary that your chain will be running.&#xD;&#xA;- Ideally, you want to keep your extrinsics as concise as possible. Adding extra execution steps may result in an increase in weight, which could lead to higher fees for executing the call.&#xD;&#xA;- Depending on the wasm compiler used to create the binary, logging outside of a Debug environment can cause some problems. This is because WebAssembly might not have access to some system-level calls needed to print data.&#xD;&#xA;&#xD;&#xA;Refer to the [Debug Section - Substrate docs](https://docs.substrate.io/test/debug/) for more info.&#xD;&#xA;&#xD;&#xA;In a production environment, it is recommended to use Errors and Events to provide information on the internal behavior of the call within a pallet.&#xD;&#xA;&#xD;&#xA;Here’s an [answer to a different question](https://substrate.stackexchange.com/questions/4672/wasmstripped-printed-when-logging-from-the-runtime) that could also help." ContentLicense="CC BY-SA 4.0" />
  <row Id="31936" PostHistoryTypeId="2" PostId="8122" RevisionGUID="4be19f0f-aea1-4440-96c3-2b313bfdb68a" CreationDate="2023-04-17T17:01:13.970" UserId="74" Text="# Overview&#xD;&#xA;In the gossip network used by Substrate (based on Libp2p) messages are sent between peers. A few questions come to mind when building on top of this gossip network (sending new messages and building additional gossip protocols).&#xD;&#xA;1. Are MACs appended to messages before they hit the wire or before or never?&#xD;&#xA;2. Do protocol developers have to add MACs to prevent peers from tampering with sensitive messages?&#xD;&#xA;&#xD;&#xA;## Example&#xD;&#xA;We execute and coordinate an MPC over protocols built on top of Substrate's gossip primitives. We gossip encrypted payloads to the peers and attempt decrypt each message to identify if its for oneself. If any bits are added to these messages, decryption would undenaibly fail, and so we're curious if we need to handle this ourselves as well.. that messages aren't tampered with in transit." ContentLicense="CC BY-SA 4.0" />
  <row Id="31938" PostHistoryTypeId="1" PostId="8122" RevisionGUID="4be19f0f-aea1-4440-96c3-2b313bfdb68a" CreationDate="2023-04-17T17:01:13.970" UserId="74" Text="Does Substrate's underlying gossip network use MACs to authenticate message validity?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31939" PostHistoryTypeId="3" PostId="8122" RevisionGUID="4be19f0f-aea1-4440-96c3-2b313bfdb68a" CreationDate="2023-04-17T17:01:13.970" UserId="74" Text="|gossip|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31940" PostHistoryTypeId="2" PostId="8123" RevisionGUID="0111300c-8f93-4fb7-8cc1-6c7a94495e97" CreationDate="2023-04-17T17:29:02.683" UserId="3014" Text="I want to try out offchain minting feature in [pallet_nfts][1].&#xD;&#xA;This extrinsic `nfts.mintPreSigned(mintData, signature, signer)` should be used to claim the NFT as a final step. Before that, `mintData` attribute should be signed upfront by the collection owner. How can I do this using polkadot.js UI?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/nfts" ContentLicense="CC BY-SA 4.0" />
  <row Id="31942" PostHistoryTypeId="1" PostId="8123" RevisionGUID="0111300c-8f93-4fb7-8cc1-6c7a94495e97" CreationDate="2023-04-17T17:29:02.683" UserId="3014" Text="How to mint offchain NFT in pallet_nfts" ContentLicense="CC BY-SA 4.0" />
  <row Id="31943" PostHistoryTypeId="3" PostId="8123" RevisionGUID="0111300c-8f93-4fb7-8cc1-6c7a94495e97" CreationDate="2023-04-17T17:29:02.683" UserId="3014" Text="|offchain|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31944" PostHistoryTypeId="2" PostId="8124" RevisionGUID="666a849c-aa9d-4223-bc43-698d3a7edb15" CreationDate="2023-04-17T17:36:55.533" UserId="3319" Text="In outer node, i want to create a node that does not listen to gossiped transaction or in other words the transaction pool should not add any transaction from other peers, the only way to add transactions is done by the local node himself using [pool.submit_one()][1] method.&#xD;&#xA;&#xD;&#xA;PS: even when closing all the rpc ports, its still adds transactions and i assume its low level using libp2p.&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sc_transaction_pool/struct.Pool.html#method.submit_one" ContentLicense="CC BY-SA 4.0" />
  <row Id="31946" PostHistoryTypeId="1" PostId="8124" RevisionGUID="666a849c-aa9d-4223-bc43-698d3a7edb15" CreationDate="2023-04-17T17:36:55.533" UserId="3319" Text="how to stop listening for gossiped transaction (restrict access to the TXpool?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31947" PostHistoryTypeId="3" PostId="8124" RevisionGUID="666a849c-aa9d-4223-bc43-698d3a7edb15" CreationDate="2023-04-17T17:36:55.533" UserId="3319" Text="|substrate-node-template|tx-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31948" PostHistoryTypeId="2" PostId="8125" RevisionGUID="6c56a6f7-c3e0-4ed8-aeda-00323fa0271f" CreationDate="2023-04-17T17:40:36.910" UserId="4081" Text="Another suggestion is to install [sccache](https://github.com/mozilla/sccache).&#xD;&#xA;&#xD;&#xA;Compilation times can be a major bottleneck when building large projects. This tool caches compiled objects, so that they can be reused in future builds, thereby reducing the time taken to compile dependencies.&#xD;&#xA;&#xD;&#xA;To install sccache, you can follow the instructions provided in the GitHub repository. The installation process involves installing the tool and its dependencies, and configuring it to work with your build system. Once set up, sccache should work seamlessly in the background, helping to speed up your builds and save you time in the long run." ContentLicense="CC BY-SA 4.0" />
  <row Id="31950" PostHistoryTypeId="2" PostId="8126" RevisionGUID="cffe6832-ecba-46d2-995e-1dd134879ab0" CreationDate="2023-04-17T18:03:30.400" UserId="251" Text="You abosultely can log in runtime.&#xD;&#xA;&#xD;&#xA;No need to worry about the WASM. Just use it like you are developing a Rust program.&#xD;&#xA;&#xD;&#xA;You can enable this feature while building the runtime release. It will disable the log in the WASM.&#xD;&#xA;&#xD;&#xA;You can still see the log by not enable this feature in the binary build.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/fbb74beced0f1deb84ab2f7c808d84cc7b413e53/runtime/polkadot/Cargo.toml#L289-L294" ContentLicense="CC BY-SA 4.0" />
  <row Id="31952" PostHistoryTypeId="52" PostId="8110" RevisionGUID="783ad9ea-946a-499c-9e96-7fc7eb9baf5f" CreationDate="2023-04-17T18:05:30.143" />
  <row Id="31953" PostHistoryTypeId="2" PostId="8127" RevisionGUID="cbb8ea29-bb24-4f2e-8805-604b55f6857d" CreationDate="2023-04-17T19:12:35.500" UserId="2795" Text="I am getting this error on the block explorer &quot;Extrinsics&quot; tab the moment I add a debug related code into a Hello pallet into the node-template repo.&#xD;&#xA;&#xD;&#xA;E.g:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;#[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;pub fn say_hello(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;	// Ensure that the caller is a regular keypair account&#xD;&#xA;	let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;	print(&quot;Hello world&quot;);&#xD;&#xA;&#xD;&#xA;	frame_support::log::info!(&quot;{:?} said hello&quot;, who);&#xD;&#xA;&#xD;&#xA;	// Emit an event&#xD;&#xA;	Self::deposit_event(Event::SomeoneSaysHello { who });&#xD;&#xA;&#xD;&#xA;	// Return a successful DispatchResult&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After generating the runtime via `$ cargo build --release`, I run the binary using `$ RUST_LOG=runtime=debug ./target/release/node-template --dev`. And then I get this error.&#xD;&#xA;&#xD;&#xA;&gt; Please note that I am not getting this error when there is no `debug`&#xD;&#xA;&gt; related code in the pallet. Also, when I am using&#xD;&#xA;&gt; `sp_runtime::print()`, it works fine, but not in case of `log::info`,&#xD;&#xA;&gt; `log::debug`.&#xD;&#xA;&#xD;&#xA;Any help would be really appreciated.&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="31955" PostHistoryTypeId="1" PostId="8127" RevisionGUID="cbb8ea29-bb24-4f2e-8805-604b55f6857d" CreationDate="2023-04-17T19:12:35.500" UserId="2795" Text="1010: Invalid Transaction: Transaction has a bad signature" ContentLicense="CC BY-SA 4.0" />
  <row Id="31956" PostHistoryTypeId="3" PostId="8127" RevisionGUID="cbb8ea29-bb24-4f2e-8805-604b55f6857d" CreationDate="2023-04-17T19:12:35.500" UserId="2795" Text="|runtime-upgrade|relay-chain|debugging|log|frame-support|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31957" PostHistoryTypeId="2" PostId="8128" RevisionGUID="025a56a6-a3eb-4b6a-95f8-7d908849b4bd" CreationDate="2023-04-17T19:51:16.767" UserId="3122" Text="Is it possible to configure an off-chain with a command line argument?&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;```&#xD;&#xA;./target/release/cere --dev --alice --my-custom-arg true&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If not what are the other options?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31959" PostHistoryTypeId="1" PostId="8128" RevisionGUID="025a56a6-a3eb-4b6a-95f8-7d908849b4bd" CreationDate="2023-04-17T19:51:16.767" UserId="3122" Text="Configure offchain worker with command line argument" ContentLicense="CC BY-SA 4.0" />
  <row Id="31960" PostHistoryTypeId="3" PostId="8128" RevisionGUID="025a56a6-a3eb-4b6a-95f8-7d908849b4bd" CreationDate="2023-04-17T19:51:16.767" UserId="3122" Text="|runtime|offchain-worker|cli|oracles|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31961" PostHistoryTypeId="5" PostId="8128" RevisionGUID="ecce6904-a715-4f7b-bd35-57627606b069" CreationDate="2023-04-17T20:02:04.503" UserId="3122" Comment="deleted 11 characters in body" Text="Is configuring an off-chain with a command line argument possible?&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;```&#xD;&#xA;./target/release/cere --dev --alice --my-custom-url true&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If not what are the other options?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31962" PostHistoryTypeId="2" PostId="8129" RevisionGUID="52d545d1-6845-4ff9-b7bc-dee4dc0e0b4f" CreationDate="2023-04-17T20:33:25.817" UserId="74" Text="Yes, you will have to configure it using your own custom node. You can modify the CLI that your custom node uses to expose any flags you need and pipe those values into your OCW when you instantiate it in your `service.rs`." ContentLicense="CC BY-SA 4.0" />
  <row Id="31964" PostHistoryTypeId="2" PostId="8130" RevisionGUID="2b92778a-690a-421f-ab7a-8b7f088fa21a" CreationDate="2023-04-17T20:37:41.147" UserId="3327" Text="While running export-state command against my parachain, I observed that the resultant raw parachain specs has a diffirent collator address as compared to the original one.&#xD;&#xA;&#xD;&#xA;Does the export-sate changes the collator keys and generate some random key for the collator? If yes, how can I get my original collator(s) back in the raw chain specs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31966" PostHistoryTypeId="1" PostId="8130" RevisionGUID="2b92778a-690a-421f-ab7a-8b7f088fa21a" CreationDate="2023-04-17T20:37:41.147" UserId="3327" Text="Does export-state produces a random collator address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31967" PostHistoryTypeId="3" PostId="8130" RevisionGUID="2b92778a-690a-421f-ab7a-8b7f088fa21a" CreationDate="2023-04-17T20:37:41.147" UserId="3327" Text="|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31968" PostHistoryTypeId="2" PostId="8131" RevisionGUID="e3be9b70-e9d8-4d10-9d79-c0b113791047" CreationDate="2023-04-17T20:47:50.987" UserId="522" Text="I understand the entire path of a parachain block upto and including its candidateReciept being &quot;included&quot; on the relaychain, and its erasure coded PoVs being available with the relaychain validators - incase the parent block's collator fails to share the block.&#xD;&#xA;&#xD;&#xA;What I do not understand is how does the subsequent collator know which is the block (or rather the hash) that it should build on?&#xD;&#xA;&#xD;&#xA;Does the collator attempt to read the relaychain state to find the latest parchain block hash in the parachain relevant storage (the ones that are updated upon candidateReceipt inclusion) either explicitly or implicitly? Does it read the relaychain blocks for it? Does it somehow depend on the relaychain validators for this info? &#xD;&#xA;&#xD;&#xA;Also, at what point is this info apparent to the collator?&#xD;&#xA;&#xD;&#xA;Further, and very importantly, once a collator has recognized which parachain parent block to build on and then imported it, we can consider the parachain parent block to be &quot;finalized&quot;, right? Save for relaychain re-orgs that is.&#xD;&#xA;&#xD;&#xA;I would greatly appreciate if this were to be pointed out in code as well.&#xD;&#xA;&#xD;&#xA;Thank you very much!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="31970" PostHistoryTypeId="1" PostId="8131" RevisionGUID="e3be9b70-e9d8-4d10-9d79-c0b113791047" CreationDate="2023-04-17T20:47:50.987" UserId="522" Text="How does a parachain collator reliably know which parachain block (candidate recipt) got included on the relaychain to build the next block on?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31971" PostHistoryTypeId="3" PostId="8131" RevisionGUID="e3be9b70-e9d8-4d10-9d79-c0b113791047" CreationDate="2023-04-17T20:47:50.987" UserId="522" Text="|parachain-collator|cumulus|block-import|finalization|pov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31972" PostHistoryTypeId="2" PostId="8132" RevisionGUID="df3acbe7-e5ff-488c-9483-5935d211bfff" CreationDate="2023-04-17T20:48:07.273" UserId="3327" Text="We wanted to survey about all the pallets that implement some sort of voting functionality (Like democracy pallet). &#xD;&#xA;&#xD;&#xA;In our use case, an authorzed user will float a suggestion and Eligible voters will vote in favour of or against that suggestion. To vote, the voter will burn their tokens. &#xD;&#xA;&#xD;&#xA;Can any one please provide a list of all such pallets that implements functionality similar to the above. Since, we wanted to study all such pallets and then will the one that best suits our requirements. I need list of all such pallets othar than the followig (Since, we already know about these pallets):&#xD;&#xA;&#xD;&#xA;1. https://docs.rs/pallet-democracy/latest/pallet_democracy/&#xD;&#xA;2. https://crates.io/crates/pallet-elections-phragmen&#xD;&#xA;3. https://paritytech.github.io/substrate/master/pallet_treasury/pallet/index.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31974" PostHistoryTypeId="1" PostId="8132" RevisionGUID="df3acbe7-e5ff-488c-9483-5935d211bfff" CreationDate="2023-04-17T20:48:07.273" UserId="3327" Text="how to implement voting functionality?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31975" PostHistoryTypeId="3" PostId="8132" RevisionGUID="df3acbe7-e5ff-488c-9483-5935d211bfff" CreationDate="2023-04-17T20:48:07.273" UserId="3327" Text="|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31976" PostHistoryTypeId="2" PostId="8133" RevisionGUID="94e2c563-d130-4fc0-ab56-17165de71a6c" CreationDate="2023-04-17T20:56:02.827" UserId="74" Text="Some voting pallets that we are using at Webb are derived from ChainSafe/ChainBridge's pallet for voting on proposals. It's a simple threshold voting system. Our's works where only a single signature is needed to pass a proposal, where the signature is generated using a threshold-signature generation protocol using MPC.&#xD;&#xA;&#xD;&#xA;- https://github.com/webb-tools/protocol-substrate/blob/main/pallets/signature-bridge/src/lib.rs&#xD;&#xA;- https://github.com/ChainSafe/chainbridge-substrate/blob/main/chainbridge/src/lib.rs&#xD;&#xA;&#xD;&#xA;We also use the same style of pallet in our system for having relayers vote on specific types of proposals that uses the simple threshold process described above without MPC. This is nearly identical to ChainSafe's implementation of the chainbridge pallet with different terminology and updates to certain data structures/events, etc.&#xD;&#xA;- https://github.com/webb-tools/dkg-substrate/tree/master/pallets/dkg-proposals" ContentLicense="CC BY-SA 4.0" />
  <row Id="31978" PostHistoryTypeId="2" PostId="8134" RevisionGUID="7fae6ecf-210f-4eff-adf0-53ec16cf939a" CreationDate="2023-04-17T20:57:41.020" UserId="74" Text="It might not be a different key but rather the encoding of your collator address in the storage for that respective pallet. If you're looking at the (key,value) map in the exported state, it will contain the encoded (key,value) which is possibly the hash of the actual data you're looking for." ContentLicense="CC BY-SA 4.0" />
  <row Id="31980" PostHistoryTypeId="2" PostId="8135" RevisionGUID="642cc292-d131-4a24-a832-71db8c514bb7" CreationDate="2023-04-17T21:05:51.753" UserId="4098" Text="From the wiki (https://wiki.polkadot.network/docs/build-transaction-construction), &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { createSignedTx } from &quot;@substrate/txwrapper-polkadot&quot;;&#xD;&#xA;&#xD;&#xA;// Example code, replace `signWithAlice` with actual remote signer.&#xD;&#xA;// An example is given here:&#xD;&#xA;// https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/test-helpers/signWithAlice.ts&#xD;&#xA;const signature = await signWithAlice(signingPayload);&#xD;&#xA;console.log(signature);&#xD;&#xA;&#xD;&#xA;const signedTx = createSignedTx(unsigned, signature, { metadataRpc, registry });&#xD;&#xA;```&#xD;&#xA;The printed **signature** is simply a hash string like &quot;0x01b0e5778f36fd4c5adea875a5cd88b0da246154798fec28c5d1b4b2446d7b2028c46a423bd9706d26525706386d2dc34062bf83086db5178334d9da5016f2e684&quot;&#xD;&#xA;&#xD;&#xA;Question 1: I would like to know whether  we could decrypt this hash string to see what informations consist of this **signature**.&#xD;&#xA;&#xD;&#xA;From the test code (https://github.com/polkadot-js/api/blob/074e790bfc1326cda331b795b3a1e8e480493246/packages/types/src/extrinsic/v4/Extrinsic.spec.ts#L71), we can partly guess some of informations included in **signature**. &#xD;&#xA;&#xD;&#xA;Question 2: I would like to know from this test code what each data represents and where we could find how such hash strings are derived depending on the chosen cryptogrphy (ECDSA, Sr25519, or Ed25519). Particularly I look for source code for ECDSA signature.  &#xD;&#xA;&#xD;&#xA;'0x' + &#xD;&#xA;'00' + // ?&#xD;&#xA;'d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f' + // ?&#xD;&#xA;'00' + // ed25519 (00) ; sr25519 (01) ; ECDSA (02) &#xD;&#xA;'eb58b10100923b73df92010db6f9363300ea3947d4c7c92ce669da93931853e8' + // ?  'a2f21c8a7c73035b3ddd8cdd47ef5db3092aad09d15e6f5ed9d32d7864821409' + // ? &#xD;&#xA;'00040800' + // era &#xD;&#xA;'0600' + // nonce &#xD;&#xA;'00' + // tip &#xD;&#xA;'d7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9' + // ?&#xD;&#xA;'e56c' // ?&#xD;&#xA;&#xD;&#xA;I would be very grateful if anyone could advise me. Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31982" PostHistoryTypeId="1" PostId="8135" RevisionGUID="642cc292-d131-4a24-a832-71db8c514bb7" CreationDate="2023-04-17T21:05:51.753" UserId="4098" Text="What informations consist of a signature which is generated when siging a transaction payload offline?" ContentLicense="CC BY-SA 4.0" />
  <row Id="31983" PostHistoryTypeId="3" PostId="8135" RevisionGUID="642cc292-d131-4a24-a832-71db8c514bb7" CreationDate="2023-04-17T21:05:51.753" UserId="4098" Text="|polkadot-js|extrinsic|signed-extensions|typescript|ecdsa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31984" PostHistoryTypeId="5" PostId="8135" RevisionGUID="e781f90d-49fb-4995-a7c6-14e3eee9b176" CreationDate="2023-04-17T21:07:33.943" UserId="4098" Comment="added 10 characters in body" Text="From the wiki (https://wiki.polkadot.network/docs/build-transaction-construction), &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { createSignedTx } from &quot;@substrate/txwrapper-polkadot&quot;;&#xD;&#xA;&#xD;&#xA;// Example code, replace `signWithAlice` with actual remote signer.&#xD;&#xA;// An example is given here:&#xD;&#xA;// https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/test-helpers/signWithAlice.ts&#xD;&#xA;const signature = await signWithAlice(signingPayload);&#xD;&#xA;console.log(signature);&#xD;&#xA;&#xD;&#xA;const signedTx = createSignedTx(unsigned, signature, { metadataRpc, registry });&#xD;&#xA;```&#xD;&#xA;The printed **signature** is simply a hash string like &quot;0x01b0e5778f36fd4c5adea875a5cd88b0da246154798fec28c5d1b4b2446d7b2028c46a423bd9706d26525706386d2dc34062bf83086db5178334d9da5016f2e684&quot;&#xD;&#xA;&#xD;&#xA;Question 1: I would like to know whether  we could decrypt this hash string to see what informations consist of this **signature**.&#xD;&#xA;&#xD;&#xA;From the test code (https://github.com/polkadot-js/api/blob/074e790bfc1326cda331b795b3a1e8e480493246/packages/types/src/extrinsic/v4/Extrinsic.spec.ts#L71), we can partly guess some of informations included in **signature**. &#xD;&#xA;&#xD;&#xA;Question 2: I would like to know from this test code what each data represents and where we could find how such hash strings are derived depending on the chosen cryptogrphy (ECDSA, Sr25519, or Ed25519). Particularly I look for source code for ECDSA signature.  &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;'0x' + &#xD;&#xA;'00' + // ?&#xD;&#xA;'d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f' + // ?&#xD;&#xA;'00' + // ed25519 (00) ; sr25519 (01) ; ECDSA (02) &#xD;&#xA;'eb58b10100923b73df92010db6f9363300ea3947d4c7c92ce669da93931853e8' + // ?  'a2f21c8a7c73035b3ddd8cdd47ef5db3092aad09d15e6f5ed9d32d7864821409' + // ? &#xD;&#xA;'00040800' + // era &#xD;&#xA;'0600' + // nonce &#xD;&#xA;'00' + // tip &#xD;&#xA;'d7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9' + // ?&#xD;&#xA;'e56c' // ?&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would be very grateful if anyone could advise me. Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31985" PostHistoryTypeId="5" PostId="8135" RevisionGUID="16362f17-24c9-44c5-b4f2-4443d842bf35" CreationDate="2023-04-17T21:08:32.057" UserId="4098" Comment="added 2 characters in body" Text="From the wiki (https://wiki.polkadot.network/docs/build-transaction-construction), &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { createSignedTx } from &quot;@substrate/txwrapper-polkadot&quot;;&#xD;&#xA;&#xD;&#xA;// Example code, replace `signWithAlice` with actual remote signer.&#xD;&#xA;// An example is given here:&#xD;&#xA;// https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/test-helpers/signWithAlice.ts&#xD;&#xA;const signature = await signWithAlice(signingPayload);&#xD;&#xA;console.log(signature);&#xD;&#xA;&#xD;&#xA;const signedTx = createSignedTx(unsigned, signature, { metadataRpc, registry });&#xD;&#xA;```&#xD;&#xA;The printed **signature** is simply a hash string like &quot;0x01b0e5778f36fd4c5adea875a5cd88b0da246154798fec28c5d1b4b2446d7b2028c46a423bd9706d26525706386d2dc34062bf83086db5178334d9da5016f2e684&quot;&#xD;&#xA;&#xD;&#xA;Question 1: I would like to know whether  we could decrypt this hash string to see what informations consist of this **signature**.&#xD;&#xA;&#xD;&#xA;From the test code (https://github.com/polkadot-js/api/blob/074e790bfc1326cda331b795b3a1e8e480493246/packages/types/src/extrinsic/v4/Extrinsic.spec.ts#L71), we can partly guess some of informations included in **signature**. &#xD;&#xA;&#xD;&#xA;Question 2: I would like to know from this test code what each data represents and where we could find how such hash strings are derived depending on the chosen cryptogrphy (ECDSA, Sr25519, or Ed25519). Particularly I look for source code for ECDSA signature.  &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;'0x' + &#xD;&#xA;'00' + // ?&#xD;&#xA;'d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f' + // ?&#xD;&#xA;'00' + // ed25519 (00) ; sr25519 (01) ; ECDSA (02) &#xD;&#xA;'eb58b10100923b73df92010db6f9363300ea3947d4c7c92ce669da93931853e8' + // ?  &#xD;&#xA;'a2f21c8a7c73035b3ddd8cdd47ef5db3092aad09d15e6f5ed9d32d7864821409' + // ? &#xD;&#xA;'00040800' + // era &#xD;&#xA;'0600' + // nonce &#xD;&#xA;'00' + // tip &#xD;&#xA;'d7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9' + // ?&#xD;&#xA;'e56c' // ?&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would be very grateful if anyone could advise me. Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31986" PostHistoryTypeId="5" PostId="8135" RevisionGUID="95a3d6f4-f7f8-429c-8477-432a6222bef4" CreationDate="2023-04-17T21:11:32.953" UserId="4098" Comment="added 18 characters in body" Text="From the wiki (https://wiki.polkadot.network/docs/build-transaction-construction), &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { createSignedTx } from &quot;@substrate/txwrapper-polkadot&quot;;&#xD;&#xA;&#xD;&#xA;// Example code, replace `signWithAlice` with actual remote signer.&#xD;&#xA;// An example is given here:&#xD;&#xA;// https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/test-helpers/signWithAlice.ts&#xD;&#xA;const signature = await signWithAlice(signingPayload);&#xD;&#xA;console.log(signature);&#xD;&#xA;&#xD;&#xA;const signedTx = createSignedTx(unsigned, signature, { metadataRpc, registry });&#xD;&#xA;```&#xD;&#xA;The printed **signature** is simply a hash string like &quot;0x01b0e5778f36fd4c5adea875a5cd88b0da246154798fec28c5d1b4b2446d7b2028c46a423bd9706d26525706386d2dc34062bf83086db5178334d9da5016f2e684&quot;&#xD;&#xA;&#xD;&#xA;Question 1: I would like to know whether  we could decrypt this hash string to see what informations consist of this **signature**.&#xD;&#xA;&#xD;&#xA;From the test code (https://github.com/polkadot-js/api/blob/074e790bfc1326cda331b795b3a1e8e480493246/packages/types/src/extrinsic/v4/Extrinsic.spec.ts#L71), we can partly guess some of informations included in **signature**. &#xD;&#xA;&#xD;&#xA;Question 2: From this test code, I would like to know what each data represents as you see below and where we could find how such hash strings are derived depending on the chosen cryptogrphy (ECDSA, Sr25519, or Ed25519). Particularly I look for source code for ECDSA signature.  &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;'0x' + &#xD;&#xA;'00' + // ?&#xD;&#xA;'d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f' + // ?&#xD;&#xA;'00' + // ed25519 (00) ; sr25519 (01) ; ECDSA (02) &#xD;&#xA;'eb58b10100923b73df92010db6f9363300ea3947d4c7c92ce669da93931853e8' + // ?  &#xD;&#xA;'a2f21c8a7c73035b3ddd8cdd47ef5db3092aad09d15e6f5ed9d32d7864821409' + // ? &#xD;&#xA;'00040800' + // era &#xD;&#xA;'0600' + // nonce &#xD;&#xA;'00' + // tip &#xD;&#xA;'d7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9' + // ?&#xD;&#xA;'e56c' // ?&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would be very grateful if anyone could advise me. Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31987" PostHistoryTypeId="5" PostId="8135" RevisionGUID="e643aaf0-7da2-4b10-83d0-8c0fb30d6c98" CreationDate="2023-04-17T21:14:23.533" UserId="4098" Comment="added 56 characters in body" Text="From the wiki (https://wiki.polkadot.network/docs/build-transaction-construction), &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { createSignedTx } from &quot;@substrate/txwrapper-polkadot&quot;;&#xD;&#xA;&#xD;&#xA;// Example code, replace `signWithAlice` with actual remote signer.&#xD;&#xA;// An example is given here:&#xD;&#xA;// https://github.com/paritytech/txwrapper-core/blob/b213cabf50f18f0fe710817072a81596e1a53cae/packages/txwrapper-core/src/test-helpers/signWithAlice.ts&#xD;&#xA;const signature = await signWithAlice(signingPayload);&#xD;&#xA;console.log(signature);&#xD;&#xA;&#xD;&#xA;const signedTx = createSignedTx(unsigned, signature, { metadataRpc, registry });&#xD;&#xA;```&#xD;&#xA;The printed **signature** is simply a hash string like &quot;0x01b0e5778f36fd4c5adea875a5cd88b0da246154798fec28c5d1b4b2446d7b2028c46a423bd9706d26525706386d2dc34062bf83086db5178334d9da5016f2e684&quot;&#xD;&#xA;&#xD;&#xA;Question 1: I would like to know whether  we could decrypt this hash string to see what informations consist of this **signature**. i.e whether Polkadot.js APIs supports this decryption. &#xD;&#xA;&#xD;&#xA;From the test code (https://github.com/polkadot-js/api/blob/074e790bfc1326cda331b795b3a1e8e480493246/packages/types/src/extrinsic/v4/Extrinsic.spec.ts#L71), we can partly guess some of informations included in **signature**. &#xD;&#xA;&#xD;&#xA;Question 2: From this test code, I would like to know what each data represents as you see below and where we could find how such hash strings are derived depending on the chosen cryptogrphy (ECDSA, Sr25519, or Ed25519). Particularly I look for source code for ECDSA signature.  &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;'0x' + &#xD;&#xA;'00' + // ?&#xD;&#xA;'d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f' + // ?&#xD;&#xA;'00' + // ed25519 (00) ; sr25519 (01) ; ECDSA (02) &#xD;&#xA;'eb58b10100923b73df92010db6f9363300ea3947d4c7c92ce669da93931853e8' + // ?  &#xD;&#xA;'a2f21c8a7c73035b3ddd8cdd47ef5db3092aad09d15e6f5ed9d32d7864821409' + // ? &#xD;&#xA;'00040800' + // era &#xD;&#xA;'0600' + // nonce &#xD;&#xA;'00' + // tip &#xD;&#xA;'d7568e5f0a7eda67a82691ff379ac4bba4f9c9b859fe779b5d46363b61ad2db9' + // ?&#xD;&#xA;'e56c' // ?&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would be very grateful if anyone could advise me. Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31988" PostHistoryTypeId="2" PostId="8136" RevisionGUID="61484c24-b19a-4d31-b290-2482edaf9668" CreationDate="2023-04-17T22:13:27.437" UserId="3960" Text="I'm playing around with a custom hybrid PoW/PoA block production mechanism based on sp_consensus_pow import queue.&#xD;&#xA;&#xD;&#xA;As the PoW results are generated outside of Substrate, a trusted authority node set is maintained in order to provide fallback block production mechanism whenever PoW engine is idle.&#xD;&#xA;&#xD;&#xA;The fallback block production is a simple slot round robin timeout-based mechanism.&#xD;&#xA;&#xD;&#xA;Aura is not used here.&#xD;&#xA;&#xD;&#xA;I run two nodes and see that blocks are produced smoothly by alternate nodes as expected.&#xD;&#xA;&#xD;&#xA;Now a problem arises when I try to introduce ImOnline pallet as a part of resiliency mechanism for nodes going offline.&#xD;&#xA;&#xD;&#xA;I noticed that ImOnline reports offense for the both running nodes whenever a session ends.&#xD;&#xA;&#xD;&#xA;I use 4000 ms block time and 4 block-long sessions.&#xD;&#xA;&#xD;&#xA;I played around with ImOnline source code and it looks like that ```should_heartbeat``` variable in ```send_heartbeats``` function influences the relevant behavior.&#xD;&#xA;&#xD;&#xA;Whenever I force ```should_heartbeat``` to be always ```true``` the system behaves as expected and only reports offense when a node is down.&#xD;&#xA;&#xD;&#xA;However when ```should_heartbeat``` is used in its original functionality the heartbeat is often sent when the session is on it's 100% progress and it seems to be too late for the heartbeat to be registered and when the next session starts the offense is reported.&#xD;&#xA;&#xD;&#xA;Maybe a 4 block-log session chosen is too short ? &#xD;&#xA;Is there a typical parameter for session length such that heartbeats are sent in time ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="31990" PostHistoryTypeId="1" PostId="8136" RevisionGUID="61484c24-b19a-4d31-b290-2482edaf9668" CreationDate="2023-04-17T22:13:27.437" UserId="3960" Text="Offence reported by ImOnline pallet for running nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="31991" PostHistoryTypeId="3" PostId="8136" RevisionGUID="61484c24-b19a-4d31-b290-2482edaf9668" CreationDate="2023-04-17T22:13:27.437" UserId="3960" Text="|session|pallet-imonline|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31992" PostHistoryTypeId="2" PostId="8137" RevisionGUID="97f5627f-9417-4890-997d-ea68bac25e9d" CreationDate="2023-04-17T22:23:11.673" UserId="4100" Text="I want to read a single value from OffchainStorage of a live substrate node. Is it possible? Assume I can not use `localStorageGet` rpc request because it is an unsafe rpc." ContentLicense="CC BY-SA 4.0" />
  <row Id="31994" PostHistoryTypeId="1" PostId="8137" RevisionGUID="97f5627f-9417-4890-997d-ea68bac25e9d" CreationDate="2023-04-17T22:23:11.673" UserId="4100" Text="Read a value from offchain storage of a node" ContentLicense="CC BY-SA 4.0" />
  <row Id="31995" PostHistoryTypeId="3" PostId="8137" RevisionGUID="97f5627f-9417-4890-997d-ea68bac25e9d" CreationDate="2023-04-17T22:23:11.673" UserId="4100" Text="|substrate-node-template|storage|rpc|offchain-worker|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="31996" PostHistoryTypeId="50" PostId="7706" RevisionGUID="2f0ae2bc-4e67-49bc-b7a1-b9b4e85bf74f" CreationDate="2023-04-17T23:07:05.943" UserId="-1" />
  <row Id="31997" PostHistoryTypeId="2" PostId="8138" RevisionGUID="d895244a-1493-47c5-96c1-d5e5117e9e4d" CreationDate="2023-04-18T00:35:31.820" UserId="4103" Text="I'm trying to make some changes to the Flipper contract, trying to use a vector like the documentation say's it should be imported: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink::contract]&#xD;&#xA;pub mod flipper_plus {&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use ink::prelude::vec::Vec;&#xD;&#xA;```&#xD;&#xA;and during compilation got this errors: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0432]: unresolved import `crate::flipper_plus::vec`&#xD;&#xA; --&gt; /Users/pierina/Documents/rust_projects/flipper-contract/contracts/flipperPlus/src/lib.rs:7:30&#xD;&#xA;  |&#xD;&#xA;7 |     use crate::flipper_plus::vec::Vec;&#xD;&#xA;  |                              ^^^ could not find `vec` in `flipper_plus`&#xD;&#xA;&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;  --&gt; /Users/pierina/Documents/rust_projects/flipper-contract/contracts/flipperPlus/src/lib.rs:33:26&#xD;&#xA;   |&#xD;&#xA;33 |                 history: vec![(caller, init_value, Self::env().block_timestamp())], &#xD;&#xA;   |                          ^^^&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is my `Cargo.toml`:&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;flipper_plus&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;name = &quot;flipper_plus&quot;&#xD;&#xA;path = &quot;src/lib.rs&quot;&#xD;&#xA;crate-type = [&#xD;&#xA;	# Used for normal contract Wasm blobs.&#xD;&#xA;	&quot;cdylib&quot;,&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="31999" PostHistoryTypeId="1" PostId="8138" RevisionGUID="d895244a-1493-47c5-96c1-d5e5117e9e4d" CreationDate="2023-04-18T00:35:31.820" UserId="4103" Text="Problem with Vec using ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="32000" PostHistoryTypeId="3" PostId="8138" RevisionGUID="d895244a-1493-47c5-96c1-d5e5117e9e4d" CreationDate="2023-04-18T00:35:31.820" UserId="4103" Text="|ink|rust|smart-contract|vec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32001" PostHistoryTypeId="2" PostId="8139" RevisionGUID="1fd699fd-b5df-441f-8079-d65fef5425e4" CreationDate="2023-04-18T01:39:35.450" UserId="4104" Text="I want to automate sending astar(NOT EVM) with Python(SubstrateInterface). I received an error when executing the following code.&#xD;&#xA;&#xD;&#xA;    # Imports&#xD;&#xA;    from substrateinterface import SubstrateInterface, Keypair, KeypairType&#xD;&#xA;    from substrateinterface.exceptions import SubstrateRequestException&#xD;&#xA;    &#xD;&#xA;    # Construct the API provider&#xD;&#xA;    substrate = SubstrateInterface(&#xD;&#xA;        url=&quot;wss://rpc.astar.network&quot;,&#xD;&#xA;        ss58_format=42,&#xD;&#xA;        type_registry_preset='substrate-node-template',&#xD;&#xA;    )&#xD;&#xA;    &#xD;&#xA;    keypair = Keypair.create_from_mnemonic(&#xD;&#xA;        &quot;***&quot;,&#xD;&#xA;        ss58_format = 42,&#xD;&#xA;    )&#xD;&#xA;    print(keypair.ss58_address)&#xD;&#xA;    &#xD;&#xA;    # Form a transaction call&#xD;&#xA;    call = substrate.compose_call(&#xD;&#xA;        call_module='Balances',&#xD;&#xA;        call_function=&quot;transfer&quot;,&#xD;&#xA;        call_params={&#xD;&#xA;            &quot;dest&quot;: &quot;***&quot;,&#xD;&#xA;            'value': 1 * 10**16,&#xD;&#xA;            &quot;gas_limit&quot;: 21000,&#xD;&#xA;         }&#xD;&#xA;    )&#xD;&#xA;    &#xD;&#xA;    # Form a signed extrinsic&#xD;&#xA;    extrinsic = substrate.create_signed_extrinsic(&#xD;&#xA;        call = call,&#xD;&#xA;        keypair = keypair,&#xD;&#xA;        nonce = substrate.get_account_nonce(keypair.ss58_address),&#xD;&#xA;    )&#xD;&#xA;    print(extrinsic)&#xD;&#xA;    &#xD;&#xA;    # Submit the extrinsic&#xD;&#xA;    try:&#xD;&#xA;        receipt = substrate.submit_extrinsic(&#xD;&#xA;            extrinsic,&#xD;&#xA;            wait_for_inclusion = True,&#xD;&#xA;        )&#xD;&#xA;        print(&quot;Extrinsic '{}' sent and included in block '{}'&quot;.format(receipt.extrinsic_hash, receipt.block_hash))&#xD;&#xA;    except SubstrateRequestException as e:&#xD;&#xA;        print(&quot;Failed to send: {}&quot;.format(e))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Failed to send: { 'code': 1002, 'message': 'Verification Error:&#xD;&#xA;&gt; Runtime error: Execution failed: Execution aborted due to trap: wasm&#xD;&#xA;&gt; trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n   &#xD;&#xA;&gt; 0: 0x44fa8a - &lt;unknown&gt;!rust_begin_unwind\n    1: 0x3922e4 -&#xD;&#xA;&gt; &lt;unknown&gt;!core::panicking::panic_fmt::h32de9c76c9d5eb0c\n    2:&#xD;&#xA;&gt; 0x1e31a5 - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\n',&#xD;&#xA;&gt; 'data': 'RuntimeApi(&quot;Execution failed: Execution aborted due to trap:&#xD;&#xA;&gt; wasm trap: wasm `unreachable` instruction executed\\nWASM&#xD;&#xA;&gt; backtrace:\\n\\n    0: 0x44fa8a - &lt;unknown&gt;!rust_begin_unwind\\n    1:&#xD;&#xA;&gt; 0x3922e4 - &lt;unknown&gt;!core::panicking::panic_fmt::h32de9c76c9d5eb0c\\n &#xD;&#xA;&gt; 2: 0x1e31a5 -&#xD;&#xA;&gt; &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\\n&quot;)' }&#xD;&#xA;&#xD;&#xA;What could be the issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32003" PostHistoryTypeId="1" PostId="8139" RevisionGUID="1fd699fd-b5df-441f-8079-d65fef5425e4" CreationDate="2023-04-18T01:39:35.450" UserId="4104" Text="How to send Astar using Python(SubstrateInterface)" ContentLicense="CC BY-SA 4.0" />
  <row Id="32004" PostHistoryTypeId="3" PostId="8139" RevisionGUID="1fd699fd-b5df-441f-8079-d65fef5425e4" CreationDate="2023-04-18T01:39:35.450" UserId="4104" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32005" PostHistoryTypeId="2" PostId="8140" RevisionGUID="a1d3f12e-f3d6-443f-ac3e-299e9e29b96a" CreationDate="2023-04-18T06:30:10.677" UserId="29" Text="I was able to call this extrinsic successfully without errors:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(3)]&#xD;&#xA;#[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;pub fn say_hello(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;	let who = ensure_signed(origin)?;&#xD;&#xA;	frame_support::print(&quot;Hello world&quot;);&#xD;&#xA;	frame_support::log::info!(&quot;{:?} said hello&quot;, who);&#xD;&#xA;	Self::deposit_event(Event::SomeoneSaysHello { who });&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RUST_LOG=runtime=debug ./target/release/node-template --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Make sure you have the latest metadata update in the PolkadotJS Apps.&#xD;&#xA;&#xD;&#xA;Go to Settings &gt; Metadata &gt; It will say if there is an update there.&#xD;&#xA;&#xD;&#xA;Try reloading the PolkadotJS Apps browser page and trying again. Make sure you have the PolkadotJS Extension properly installed.&#xD;&#xA;&#xD;&#xA;Try with a dev account i.e. Alice" ContentLicense="CC BY-SA 4.0" />
  <row Id="32007" PostHistoryTypeId="5" PostId="8128" RevisionGUID="01dce8a1-49f7-4385-a6d0-5829fb025f1d" CreationDate="2023-04-18T07:32:07.253" UserId="3122" Comment="added 7 characters in body" Text="Is configuring an off-chain worker with a command line argument possible?&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;```&#xD;&#xA;./target/release/cere --dev --alice --my-custom-url &quot;http://my-...&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If not what are the other options?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32008" PostHistoryTypeId="4" PostId="8124" RevisionGUID="5b43e7e4-9090-4298-9e6f-f4353212a6c9" CreationDate="2023-04-18T07:53:35.860" UserId="3319" Comment="edited title" Text="how to stop listening for gossiped transaction (restrict access to the TXpool)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32009" PostHistoryTypeId="2" PostId="8141" RevisionGUID="c8a6c0e2-024b-4d13-abb0-d242b026f276" CreationDate="2023-04-18T08:47:42.503" UserId="251" Text="This might help someone who is working between `AccountId32` and `AccountId20` networks.&#xD;&#xA;&#xD;&#xA;I found this myself. You need to go the PolkadotApps's setting page and update the extension metadata when you switch between those networks. Otherwise, you will get this error." ContentLicense="CC BY-SA 4.0" />
  <row Id="32011" PostHistoryTypeId="2" PostId="8142" RevisionGUID="aa06154e-5a9d-4349-8bc8-0debe6669b80" CreationDate="2023-04-18T08:54:14.910" UserId="2762" Text="You can access the data stored in the OffchainStorage using offchain worker threads that have read and write access or through the on-chain logic using offchain indexing.&#xD;&#xA;&#xD;&#xA;Read more about Offchain Indexing in the [docs][1].&#xD;&#xA;&#xD;&#xA;&gt; Offchain indexing allows the runtime to write directly to the offchain storage without using offchain worker threads. You can enable this functionality to persist data by starting a Substrate node with the --enable-offchain-indexing command-line option.&#xD;&#xA;&#xD;&#xA;And take a look at this example [substrate-offchain-worker-demo][2].&#xD;&#xA;&#xD;&#xA;Before start working with Offchain Workers, I'd recommend read this post in the Polkadot Forum [Offchain Workers: Design Assumptions &amp; Vulnerabilities][3], to understand better possibles vulnerabilities.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/learn/offchain-operations/#offchain-indexing&#xD;&#xA;  [2]: https://github.com/jimmychu0807/substrate-offchain-worker-demo/blob/master/docs/indexing.md&#xD;&#xA;  [3]: https://forum.polkadot.network/t/offchain-workers-design-assumptions-vulnerabilities/2548" ContentLicense="CC BY-SA 4.0" />
  <row Id="32013" PostHistoryTypeId="2" PostId="8143" RevisionGUID="0ef37025-ce5d-45ce-84f8-4a3eefc667b8" CreationDate="2023-04-18T08:56:37.997" UserId="251" Text="You only imported `Vec`. So, it could not find `vec!`.&#xD;&#xA;&#xD;&#xA;And this error `use crate::flipper_plus::vec::Vec;`. It isn't the same as the code that you provided. `use ink::prelude::vec::Vec;`.&#xD;&#xA;&#xD;&#xA;So, please update those imports correctly.&#xD;&#xA;&#xD;&#xA;https://docs.rs/ink_prelude/4.1.0/ink_prelude/index.html&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use ink::prelude::{vec, vec::Vec};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32015" PostHistoryTypeId="2" PostId="8144" RevisionGUID="e584aff6-d978-4941-b66f-af4bcc9a57d0" CreationDate="2023-04-18T09:01:01.643" UserId="251" Text="I think that's impossible.&#xD;&#xA;&#xD;&#xA;`offchain-indexing` is an option. The node can access the offchain storage only when it enabled this feature. Not every node enables that.&#xD;&#xA;&#xD;&#xA;Also, you might notice that there is also a `localStorageSet` call, anybody can set the storage if you public this call.&#xD;&#xA;&#xD;&#xA;Moreover, the node needs to build the offchain DB from the importing logic from block #0. Every node maintains its own offchain DB. The offchain DB can not sync from other nodes.&#xD;&#xA;&#xD;&#xA;So, I think that's why it was marked as unsafe." ContentLicense="CC BY-SA 4.0" />
  <row Id="32017" PostHistoryTypeId="50" PostId="7708" RevisionGUID="1c178495-11c2-4529-bb3a-4be9137e4674" CreationDate="2023-04-18T09:06:20.803" UserId="-1" />
  <row Id="32020" PostHistoryTypeId="2" PostId="8145" RevisionGUID="37ee30b6-bf19-4167-965a-5b9e1750ebeb" CreationDate="2023-04-18T09:33:09.240" UserId="280" Text="I am wondering whether, and if so how, it is possible to submit a preimage which batches over other preimages, e.g.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const pre1= '0x09401eb25e90bf587fbde8d2a9be8af5ac0f3187f02f4e9e9f1f178b0314ebe5';&#xD;&#xA;const pre2 = '0x006de81a9bc71fe5929b9a36ee26c3a8cd8648f64ab9e1f0282d6bab8f91b7ae';&#xD;&#xA;&#xD;&#xA;const batchCall = api.tx.utility.batch([pre1, pre2]);&#xD;&#xA;const preimage = api.tx.preimage.notePreimage(batchCall.method.toHex());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I did not succeed doing so using Polkadot Js Apps or pure Polkadot Js. For now it seems like I need to instead submit a new preimage which batches over the re-played calls encoded in `pre1` and `pre2`." ContentLicense="CC BY-SA 4.0" />
  <row Id="32022" PostHistoryTypeId="1" PostId="8145" RevisionGUID="37ee30b6-bf19-4167-965a-5b9e1750ebeb" CreationDate="2023-04-18T09:33:09.240" UserId="280" Text="How to create a preimage which is the batch of other preimages?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32023" PostHistoryTypeId="3" PostId="8145" RevisionGUID="37ee30b6-bf19-4167-965a-5b9e1750ebeb" CreationDate="2023-04-18T09:33:09.240" UserId="280" Text="|polkadot-js|democracy|batch|preimage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32024" PostHistoryTypeId="2" PostId="8146" RevisionGUID="1d78c397-53fb-43f8-aad1-32eefe6deed6" CreationDate="2023-04-18T09:56:25.197" UserId="3317" Text="A collator consists of a relay chain node and a parachain node. One of the reasons is because it needs to communicate with the relay chain nodes (networking) to be in sync with the chain. In other words, be updated about the latest changes to the state (updates about latest (finalized) blocks). &#xD;&#xA;&#xD;&#xA;The relay chain state stores the latest [head-data][1], also known as [parahead][2], of each registered parachain ([ref][3]). When a collator (polkadot node side of things) receives a new best/finalized block, it can simply see which latest parahead was added to the state of the relay chain.&#xD;&#xA;&#xD;&#xA;Regarding finality, when a relay chain block is finalized. It means that the parachain block which was added in that block, as well as it ascendants, are finalized as well.&#xD;&#xA;&#xD;&#xA;This brings us to polkadot's shared security. The parachain's finalized state is guaranteed on the relay chain. More specifically, information regarding a parachain block, whether it is included, reverted or finalized, is acquired from the relay chain&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/396/what-is-head-data-and-how-do-i-get-it&#xD;&#xA;  [2]: https://spec.polkadot.network/#defn-para-block&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/master/runtime/parachains/src/paras/mod.rs#L644" ContentLicense="CC BY-SA 4.0" />
  <row Id="32026" PostHistoryTypeId="2" PostId="8147" RevisionGUID="371f0e55-11f1-4954-97ca-55e81f250ddf" CreationDate="2023-04-18T09:59:36.630" UserId="73" Text="All parachain nodes are required to follow the relay chain they are connected to as well. By following I mean to know about which relay chain blocks are being imported/finalized. To follow the relay chain a parachain node needs to be connected to a relay chain node. When using Cumulus there are multiple ways, like using the included relay chain node or using a relay chain node connected via RPC or a light client.&#xD;&#xA;&#xD;&#xA;To find out what is the best parachain block to build on, the parachain node will use the best relay chain block and read the state of this block. In the state of this relay chain block there is the parachain header stored and this header defines the parachain block &quot;assigned&quot; to this relay chain block. The same applies then to find out what is the last finalized parachain block.&#xD;&#xA;&#xD;&#xA;Collators are currently building on all the relay chain blocks they are &quot;seeing&quot;. The blocks they are building on are not required to be finalized." ContentLicense="CC BY-SA 4.0" />
  <row Id="32028" PostHistoryTypeId="2" PostId="8148" RevisionGUID="8dc111c4-32ac-4495-91de-c749e6c3432a" CreationDate="2023-04-18T10:19:01.127" UserId="2762" Text="Polkadot has [System Parachains][1].&#xD;&#xA;&#xD;&#xA;Moving logic in parachains instead of the Relay Chain, Polkadot uses its own scaling technology to host itself. System parachains remove transactions from the Relay Chain, allowing more Relay Chain blockspace to be used for Polkadot's primary purpose: validating parachains.&#xD;&#xA;&#xD;&#xA;In this article [Common Good Parachains][2] Joe mention something similar as your use case, using one System Parachain just to manage the balances.&#xD;&#xA;&#xD;&#xA;&gt; Examples of potential system level chains include parachains for&#xD;&#xA;&gt; balances, elections (for both staking and Council), governance, and&#xD;&#xA;&gt; identity. Eventually, the Relay Chain could become transactionless, as&#xD;&#xA;&gt; in, it would only validate parachain state transitions and all of its&#xD;&#xA;&gt; current transactional functionality would exist within parachains.&#xD;&#xA;&#xD;&#xA;And example of a System Parachain on Polkadot today is [Statemint][3], which is an asset portal for the entire network.&#xD;&#xA;&#xD;&#xA;To add a System Parachain in your Relay Chain you have [to add it through governance][4], see this [old question on StackExchange][5] to see how to do it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-system-chains&#xD;&#xA;  [2]: https://medium.com/polkadot-network/common-good-parachains-an-introduction-to-governance-allocated-parachain-slots-88e01812160d&#xD;&#xA;  [3]: https://github.com/paritytech/cumulus#statemint-&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/7792/trying-to-add-system-parachain&#xD;&#xA;  [5]: https://substrate.stackexchange.com/a/2283/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="32030" PostHistoryTypeId="2" PostId="8149" RevisionGUID="7aff6ad0-069b-499a-a992-5504697775c7" CreationDate="2023-04-18T10:20:14.953" UserId="2762" Text="The list you mention are great examples to study. Regards to the pallet-elections-phragmen I want to share this two posts on the Polkadot Forum that are worth reding: &#xD;&#xA;- [Thoughts on governance security and configs for parachains][1]&#xD;&#xA;- [(Mis) Configuring pallet-elections-phragmen][2]&#xD;&#xA;&#xD;&#xA;And just want to add one pallet into the list that might be useful for your research, from the Moombeam team: [The Conviction Voting Pallet][3]. See the code [here][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://forum.polkadot.network/t/thoughts-on-governance-security-and-configs-for-parachains/1166&#xD;&#xA;  [2]: https://forum.polkadot.network/t/mis-configuring-pallet-elections-phragmen/2502&#xD;&#xA;  [3]: https://docs.moonbeam.network/builders/pallets-precompiles/pallets/conviction-voting/&#xD;&#xA;  [4]: https://github.com/PureStake/moonbeam/blob/master/precompiles/conviction-voting/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="32032" PostHistoryTypeId="2" PostId="8150" RevisionGUID="49f08e62-a8e6-46fd-b3fb-5b867402a86b" CreationDate="2023-04-18T10:48:00.473" UserId="73" Text="Yes, transactions are gossiped via libp2p networking. If you don't want to receive/send transactions via libp2p networking you need to [change the following code][1]:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =&#xD;&#xA;		sc_service::build_network(sc_service::BuildNetworkParams {&#xD;&#xA;		config: &amp;config,&#xD;&#xA;		client: client.clone(),&#xD;&#xA;		transaction_pool: transaction_pool.clone(),&#xD;&#xA;		spawn_handle: task_manager.spawn_handle(),&#xD;&#xA;		import_queue,&#xD;&#xA;		block_announce_validator_builder: None,&#xD;&#xA;		warp_sync_params: Some(WarpSyncParams::WithProvider(warp_sync)),&#xD;&#xA;	})?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`transaction_pool` is the thing you need to change. You will need to provide your own implementation of the [`TransactionPool` trait][2]:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;struct DummyTxPool;&#xD;&#xA;&#xD;&#xA;impl&lt;B&gt; sc_network_transactions::config::TransactionPool&lt;Block::Hash, B&gt;&#xD;&#xA;	for DummyTxPool&#xD;&#xA;where&#xD;&#xA;	B: BlockT,&#xD;&#xA;{&#xD;&#xA;	fn transactions(&amp;self) -&gt; Vec&lt;(H, B::Extrinsic)&gt; {&#xD;&#xA;		// Don't propagate any transactions&#xD;&#xA;		vec![]&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn hash_of(&amp;self, tx: &amp;B::Extrinsic) -&gt; H {&#xD;&#xA;		sp_runtime::traits::HashFor::&lt;B&gt;::hash_of(tx)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn import(&amp;self, _: B::Extrinsic) -&gt; TransactionImportFuture {&#xD;&#xA;        // We just ignore the import request.&#xD;&#xA;		async { TransactionImport::None }.boxed()&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn on_broadcasted(&amp;self, _: HashMap&lt;H, Vec&lt;String&gt;&gt;) {}&#xD;&#xA;&#xD;&#xA;	fn transaction(&amp;self, _: &amp;H) -&gt; Option&lt;B::Extrinsic&gt; {&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you need to set `transaction_pool` to `DummyTxPool`. If you maybe want to still propagate your own local transactions, you need to modify `transactions` to return the ones you want to propagate.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/15bb9c61aecf73a3a7a1853151a27587edb34b97/bin/node/cli/src/service.rs#L352-L361&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/15bb9c61aecf73a3a7a1853151a27587edb34b97/client/network/transactions/src/config.rs#L57-L70" ContentLicense="CC BY-SA 4.0" />
  <row Id="32034" PostHistoryTypeId="2" PostId="8151" RevisionGUID="caf31026-e9cc-47a0-aacb-4b4610b2a904" CreationDate="2023-04-18T11:10:27.400" UserId="2762" Text="For the second question I suggest you check the code of library @polkadot/util-crypto, the library that PolkadotJS uses to sign/verify. &#xD;&#xA;Follow the [signatureVerify][1], where it checks what kind of signature is to know how to verify it. &#xD;&#xA;&#xD;&#xA;In your case ECDSA, the code source code to verify the signature is here [secp256k1Verify][2] and to sign [secp256k1Sign][3] where you can see how the couple (,) of the ECDSA signature are concatenated. &#xD;&#xA;&#xD;&#xA;Is a code in Rust but it can also be useful for you to check this old answer on StackExchange: [Recover ECDSA pub key from signature][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/common/blob/1f8b573d811ebc00f078cc9ad0a96b0d5476b13d/packages/util-crypto/src/signature/verify.ts#L90&#xD;&#xA;  [2]: https://github.com/polkadot-js/common/blob/1f8b573d81/packages/util-crypto/src/secp256k1/verify.ts#L16&#xD;&#xA;  [3]: https://github.com/polkadot-js/common/blob/1f8b573d81/packages/util-crypto/src/secp256k1/sign.ts&#xD;&#xA;  [4]: https://substrate.stackexchange.com/a/1419/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="32036" PostHistoryTypeId="2" PostId="8152" RevisionGUID="e862e46f-5c56-498c-a876-f8a86895558a" CreationDate="2023-04-18T12:04:41.353" UserId="4081" Text="Unfortunately, you cannot access the tokens sent to the ETH address using the private key of the Polkadot address. This is because the ETH and Polkadot blockchains are separate and have their own unique addresses and private keys.&#xD;&#xA;&#xD;&#xA;To clarify, an Ethereum address is generated based on a 20-byte hash derived from your private seed, while a Polkadot compatible address is generated from a 32-byte hash derived from the private seed.&#xD;&#xA;&#xD;&#xA;If you were to attempt to generate a Polkadot account using the private seed from your Ethereum address, the resulting Polkadot address would be completely different from the address &quot;0x9ebb1958fb8aecac3cb5c2f10aa473955f9c7ef1000000000000000000000000&quot; you are trying to access." ContentLicense="CC BY-SA 4.0" />
  <row Id="32038" PostHistoryTypeId="2" PostId="8153" RevisionGUID="2b6ddd50-b72c-45e0-989d-446bebfe631b" CreationDate="2023-04-18T13:04:12.990" UserId="4083" Text="I have a question about ink!. Is it possible from a smart contract A to manage the transfer of tokens of contract B IF contract B will be deployed later ? &#xD;&#xA;&#xD;&#xA;I want a user to call a function of smart contract A (deployed and that we can't modity), put as argument the hash of  contract B and make the transfer of tokens of the contract B (from the smart contract A). And this without put ```use smartcontractB``` in the smartcontract A.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32040" PostHistoryTypeId="1" PostId="8153" RevisionGUID="2b6ddd50-b72c-45e0-989d-446bebfe631b" CreationDate="2023-04-18T13:04:12.990" UserId="4083" Text="Call a smart contract ink! as a argument of another smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="32041" PostHistoryTypeId="3" PostId="8153" RevisionGUID="2b6ddd50-b72c-45e0-989d-446bebfe631b" CreationDate="2023-04-18T13:04:12.990" UserId="4083" Text="|ink|smart-contract|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32044" PostHistoryTypeId="2" PostId="8154" RevisionGUID="364b01f9-f29c-4995-aba8-2c0803a83c22" CreationDate="2023-04-18T15:23:20.313" UserId="2795" Text="Just pointing via screenshot&#xD;&#xA;&#xD;&#xA;Not clear from the above answers.&#xD;&#xA;&#xD;&#xA;Just need to reload the page. Often during development, we just view the explorer results shown in the page, but there is a requirement for reloading the page.&#xD;&#xA;&#xD;&#xA;And the same is applicable for Polkadot JS Apps.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/4d1W1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32046" PostHistoryTypeId="2" PostId="8155" RevisionGUID="5b744cc4-c9eb-4e06-9255-5965964ac289" CreationDate="2023-04-18T15:26:36.103" UserId="4081" Text="Here's a [moonbeam post about Open Gov](https://moonbeam.network/blog/opengov/) where the approval process for a proposal is better explained.&#xD;&#xA;&#xD;&#xA;The key take away from this post is that in order for a proposal to pass it must meet a certain approval and support threshold. Where approval takes into account only ayes and nays, and Support also takes into account abstentions to calculate the curve.&#xD;&#xA;&#xD;&#xA;Now the reason why the third option is &quot;**abstain**&quot; and not &quot;**neutral**&quot; is because both concepts imply very different things.&#xD;&#xA;&#xD;&#xA;- Abstaining to vote means choosing not to cast a vote or deliberately refraining from voting on a particular issue or in an election. It can be due to various reasons such as a lack of interest, disagreement with all the available options, or a protest against the system or process.&#xD;&#xA;&#xD;&#xA;- Being neutral in voting means casting a vote without taking a stance or expressing a preference for any particular option or candidate. It implies remaining impartial and not favoring any specific choice.&#xD;&#xA;&#xD;&#xA;A neutral vote would imply an active participation and decision on the voting process from the users perspective on the voting process. Whereas abstaining implies that the user doesn't get directly involved in the proposal." ContentLicense="CC BY-SA 4.0" />
  <row Id="32048" PostHistoryTypeId="2" PostId="8156" RevisionGUID="4c329b42-7bc0-4e33-bbdd-0c4b64cd49c0" CreationDate="2023-04-18T15:29:17.697" UserId="3317" Text="Yes this is possible. &#xD;&#xA;&#xD;&#xA;When instantiating a smart contract it gets an account id, just like a user has an account id. This means that transfering tokens works the same. &#xD;&#xA;&#xD;&#xA;Therefore, e.g. for the ERC20 contract, you can call [`fn transfer`][1] with parameter `to` the account id of `contract b`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/blob/ed91979c0c2442370ba2d204b3857ee62dc7dc03/erc20/lib.rs#L130" ContentLicense="CC BY-SA 4.0" />
  <row Id="32050" PostHistoryTypeId="5" PostId="8156" RevisionGUID="112e537a-9798-433b-849d-a7caeed5cbce" CreationDate="2023-04-18T15:36:52.447" UserId="3317" Comment="added 781 characters in body" Text="Yes this is possible. &#xD;&#xA;&#xD;&#xA;When instantiating a smart contract it gets an account id, just like a user has an account id. This means that transfering tokens works the same. &#xD;&#xA;&#xD;&#xA;Therefore, e.g. for the ERC20 contract, you can call [`fn transfer`][1] with parameter `to` the account id of `contract B`.&#xD;&#xA;&#xD;&#xA;I'm not sure if you still need `contract A` with this knowledge. But if you do, you can do something similar like:&#xD;&#xA;```&#xD;&#xA;        fn transfer_from_contract_a(&amp;self, to: AccountId, value: Balance) {&#xD;&#xA;            build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                .call(self.erc20_contract)&#xD;&#xA;                .gas_limit(0)&#xD;&#xA;                .transferred_value(0)&#xD;&#xA;                .call_flags(CallFlags::default().set_tail_call(true))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;transfer&quot;)))&#xD;&#xA;                        .push_arg(caller),&#xD;&#xA;                        .push_arg(value),&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;()&gt;()&#xD;&#xA;                .try_invoke();&#xD;&#xA;             .unreachable!(&quot;set_tail_call = true&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/blob/ed91979c0c2442370ba2d204b3857ee62dc7dc03/erc20/lib.rs#L130" ContentLicense="CC BY-SA 4.0" />
  <row Id="32051" PostHistoryTypeId="5" PostId="8156" RevisionGUID="2046ee54-38c3-4836-9d82-953703649b6d" CreationDate="2023-04-18T15:42:05.297" UserId="3317" Comment="added 781 characters in body" Text="Yes this is possible. &#xD;&#xA;&#xD;&#xA;When instantiating a smart contract it gets an account id, just like a user has an account id. This means that transfering tokens to/from smart contracts works the same. &#xD;&#xA;&#xD;&#xA;Therefore, e.g. for the ERC20 contract, you can call [`fn transfer`][1] with parameter `to` the account id of `contract B`.&#xD;&#xA;&#xD;&#xA;I'm not sure if you still need `contract A` with this knowledge. But if you do, you can do something similar like:&#xD;&#xA;```&#xD;&#xA;        fn transfer_from_contract_a(&amp;self, to: AccountId, value: Balance) {&#xD;&#xA;            build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                .call(self.erc20_contract)&#xD;&#xA;                .gas_limit(0)&#xD;&#xA;                .transferred_value(0)&#xD;&#xA;                .call_flags(CallFlags::default().set_tail_call(true))&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;transfer&quot;)))&#xD;&#xA;                        .push_arg(caller),&#xD;&#xA;                        .push_arg(value),&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;()&gt;()&#xD;&#xA;                .try_invoke();&#xD;&#xA;             .unreachable!(&quot;set_tail_call = true&quot;);&#xD;&#xA;```&#xD;&#xA;In this example the erc20 contract that it interacts with is stored in `contract A`. This can, however, be given as an argument as well:&#xD;&#xA;```&#xD;&#xA;        fn transfer_from_contract_a(&amp;self, to: AccountId, value: Balance, erc20_as_argument: AccountId) {&#xD;&#xA;            build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                .call(erc20_as_argument)&#xD;&#xA;                ...&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/blob/ed91979c0c2442370ba2d204b3857ee62dc7dc03/erc20/lib.rs#L130" ContentLicense="CC BY-SA 4.0" />
  <row Id="32052" PostHistoryTypeId="2" PostId="8157" RevisionGUID="2fdec9f3-7488-4ae1-8913-60c42822f40a" CreationDate="2023-04-18T16:43:39.730" UserId="4109" Text="We need to deploy a set of several smart contracts, x-compiled from Solidity to wasm, and maintain that deployment (deploy new contract instances and migrate to them once in a while).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So what we ideally would like to use is sort-of a `hardhat-deploy`, but for Substrate. **We are wondering how other dotsama ecosystem protocols do it.**&#xD;&#xA;&#xD;&#xA;`swanky` is a good start, but like one level too low. You still need sort-of a runner that checks what contracts have been deployed yet, which ones should be redeployed and then run deployment scripts that invoke swanky.&#xD;&#xA;&#xD;&#xA;Suggestions would be much appreciated!" ContentLicense="CC BY-SA 4.0" />
  <row Id="32054" PostHistoryTypeId="1" PostId="8157" RevisionGUID="2fdec9f3-7488-4ae1-8913-60c42822f40a" CreationDate="2023-04-18T16:43:39.730" UserId="4109" Text="Managing deployment of complex set of wasm contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="32055" PostHistoryTypeId="3" PostId="8157" RevisionGUID="2fdec9f3-7488-4ae1-8913-60c42822f40a" CreationDate="2023-04-18T16:43:39.730" UserId="4109" Text="|smart-contract|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32056" PostHistoryTypeId="2" PostId="8158" RevisionGUID="4d219744-a125-47af-b394-ca89004bd85f" CreationDate="2023-04-18T18:03:30.890" UserId="4110" Text="I'm working on the Swift library for Substrate networks and can't understand how AccountId should work for ECDSA.&#xD;&#xA;&#xD;&#xA;In Polkadot/Kusama, metadata returns AccountId as AccountId32 - 32-byte array.&#xD;&#xA;&#xD;&#xA;This 32-byte array is serialized and used in calls like `system_accountNextIndex`, which allows us to fetch the next index for extrinsic.&#xD;&#xA;&#xD;&#xA;In Polkadot and Kusama, Signature is the MultiSignature enum, which can be created with an ECDSA signature.&#xD;&#xA;&#xD;&#xA;But for ECDSA public key, AccountId will be AccountId33, one byte bigger.&#xD;&#xA;&#xD;&#xA;So in case, I want to use ECDSA keypair with Polkadot/Kusama, how can I obtain AccountId, which then can be used to get the next index in the network?&#xD;&#xA;&#xD;&#xA;Am I'm missing something?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32058" PostHistoryTypeId="1" PostId="8158" RevisionGUID="4d219744-a125-47af-b394-ca89004bd85f" CreationDate="2023-04-18T18:03:30.890" UserId="4110" Text="How to properly use AccountId for ECDSA keypairs" ContentLicense="CC BY-SA 4.0" />
  <row Id="32059" PostHistoryTypeId="3" PostId="8158" RevisionGUID="4d219744-a125-47af-b394-ca89004bd85f" CreationDate="2023-04-18T18:03:30.890" UserId="4110" Text="|account|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32060" PostHistoryTypeId="2" PostId="8159" RevisionGUID="13f5b57a-c80b-4229-a5b2-29d9cf7c0a05" CreationDate="2023-04-18T19:11:33.103" UserId="620" Text="Unfortunately the only recourse would be to go to governance and propose a `force_transfer` of those funds to another address. Other force transfers have generally not been approved but I think signing a message from that Ethereum account ID is a pretty strong case of rightful ownership. Ultimately it'd be up to governance, though." ContentLicense="CC BY-SA 4.0" />
  <row Id="32062" PostHistoryTypeId="2" PostId="8160" RevisionGUID="dedba785-5684-4010-80d0-97b16c54382f" CreationDate="2023-04-18T19:22:40.680" UserId="2722" Text="I am working on a decentralized exchange (DEX) using the Substrate framework, and I need help with transferring non-native tokens between user accounts within the DEX.&#xD;&#xA;&#xD;&#xA;Suppose a user creates a token named `ZZZ` on my chain. My goal is to facilitate transfers of this token between users within the DEX.&#xD;&#xA;&#xD;&#xA;Can someone please provide an example or guidance on implementing non-native token transfers between user accounts in a Substrate-based DEX ? Any relevant resources or suggestions would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="32064" PostHistoryTypeId="1" PostId="8160" RevisionGUID="dedba785-5684-4010-80d0-97b16c54382f" CreationDate="2023-04-18T19:22:40.680" UserId="2722" Text="Implementing non-native token transfers between users in a Substrate-based DEX" ContentLicense="CC BY-SA 4.0" />
  <row Id="32065" PostHistoryTypeId="3" PostId="8160" RevisionGUID="dedba785-5684-4010-80d0-97b16c54382f" CreationDate="2023-04-18T19:22:40.680" UserId="2722" Text="|polkadot-js|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32066" PostHistoryTypeId="2" PostId="8161" RevisionGUID="26e9e409-8dc2-460f-9822-c7de27ba69d0" CreationDate="2023-04-18T20:49:45.677" UserId="298" Text="I'm trying to clone and build this [branch (supersig-v1.0.0-ninja-2)][1], but getting an issue on my mac, while on ubuntu it works fine.&#xD;&#xA;&#xD;&#xA;`yarn build`:&#xD;&#xA;&#xD;&#xA;error:&#xD;&#xA;```&#xD;&#xA;apps % yarn build:code&#xD;&#xA;$ polkadot-dev-build-ts &#xD;&#xA;$ yarn polkadot-dev-clean-build&#xD;&#xA;$ polkadot-dev-clean-build &#xD;&#xA;$ yarn build:extra&#xD;&#xA;&#xD;&#xA;   3 not referenced in chains ::&#xD;&#xA;&#xD;&#xA;         chainsDustyPNG, chainsMangataxPNG, chainsPicassoSVG &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  18 not referenced in nodes ::&#xD;&#xA;&#xD;&#xA;         nodesAresPNG, nodesBeastSVG, nodesEaveSVG, nodesIdavollPNG, nodesIpseSVG, nodesKonomiPNG, nodesMoonrockPNG, nodesParamiJPEG, nodesPlasmPNG, nodesShellSVG, nodesSinglavenderSVG, nodesSubstrateCircleSVG, nodesSubstrateHexagonSVG, nodesSubstrateWhiteSVG, nodesUnitvPNG, nodesValiuPNG, nodesVaraSVG, nodesZenlinkSVG &#xD;&#xA;&#xD;&#xA;$ polkadot-dev-run-test --env node --require ./scripts/fixupModules.cjs --experimental-specifier-resolution=node packages/apps-config/src/api/typesBundle.spec.ts&#xD;&#xA;$ /usr/local/bin/node --no-warnings --enable-source-maps --loader @polkadot/dev/node/ts --require @polkadot/dev/node/test/node --require ./scripts/fixupModules.cjs --experimental-specifier-resolution=node /Users/ramsey/new-apps/apps/node_modules/@polkadot/dev/scripts/polkadot-exec-node-test.mjs packages/apps-config/src/api/typesBundle.spec.ts&#xD;&#xA;SyntaxError: The requested module 'node:test' does not provide an export named 'run'&#xD;&#xA;    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)&#xD;&#xA;    at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)&#xD;&#xA;    at async Promise.all (index 0)&#xD;&#xA;    at async ESMLoader.import (node:internal/modules/esm/loader:533:24)&#xD;&#xA;    at async loadESM (node:internal/process/esm_loader:91:5)&#xD;&#xA;    at async handleMainPromise (node:internal/modules/run_main:65:12)&#xD;&#xA;Error: Command failed: yarn build:extra&#xD;&#xA;    at checkExecSyncError (node:child_process:841:11)&#xD;&#xA;    at Object.execSync (node:child_process:912:15)&#xD;&#xA;    at execSync (file:///Users/ramsey/new-apps/apps/node_modules/@polkadot/dev/scripts/util.mjs:79:6)&#xD;&#xA;    at main (file:///Users/ramsey/new-apps/apps/node_modules/@polkadot/dev/scripts/polkadot-dev-build-ts.mjs:946:5)&#xD;&#xA;    at file:///Users/ramsey/new-apps/apps/node_modules/@polkadot/dev/scripts/polkadot-dev-build-ts.mjs:988:1&#xD;&#xA;    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)&#xD;&#xA;    at async Promise.all (index 0)&#xD;&#xA;    at async ESMLoader.import (node:internal/modules/esm/loader:533:24)&#xD;&#xA;    at async loadESM (node:internal/process/esm_loader:91:5) {&#xD;&#xA;  status: 1,&#xD;&#xA;  signal: null,&#xD;&#xA;  output: [ null, null, null ],&#xD;&#xA;  pid: 29518,&#xD;&#xA;  stdout: null,&#xD;&#xA;  stderr: null&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;highlighted error:&#xD;&#xA;```&#xD;&#xA;SyntaxError: The requested module 'node:test' does not provide an export named 'run'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/decentration/apps/tree/supersig-v1.0.0-ninja-2" ContentLicense="CC BY-SA 4.0" />
  <row Id="32068" PostHistoryTypeId="1" PostId="8161" RevisionGUID="26e9e409-8dc2-460f-9822-c7de27ba69d0" CreationDate="2023-04-18T20:49:45.677" UserId="298" Text="trying to yarn build polkadot-js/apps and getting error" ContentLicense="CC BY-SA 4.0" />
  <row Id="32069" PostHistoryTypeId="3" PostId="8161" RevisionGUID="26e9e409-8dc2-460f-9822-c7de27ba69d0" CreationDate="2023-04-18T20:49:45.677" UserId="298" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32070" PostHistoryTypeId="52" PostId="8153" RevisionGUID="ddfe5ece-5b76-48d7-a9a9-054f9603c940" CreationDate="2023-04-18T21:04:29.653" />
  <row Id="32071" PostHistoryTypeId="2" PostId="8162" RevisionGUID="315b6cbd-c8d6-40d7-a182-2daaeb5edf8e" CreationDate="2023-04-18T22:15:08.027" UserId="3327" Text="I have a requirement, such that, any person will submit a proposal that will be voted by other members and if the majority votes are achieved, the proposal will be executed. &#xD;&#xA;&#xD;&#xA;For this purpose, I am considering to use pallet_democracy. Can any body point me to some resource/guide that explains pallet_democracy in detail. As the documentation of the democracy pallet is not enough to grasp full concept of democracy pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="32073" PostHistoryTypeId="1" PostId="8162" RevisionGUID="315b6cbd-c8d6-40d7-a182-2daaeb5edf8e" CreationDate="2023-04-18T22:15:08.027" UserId="3327" Text="Can any one point me to some resource that explain pallet_democracy?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32074" PostHistoryTypeId="3" PostId="8162" RevisionGUID="315b6cbd-c8d6-40d7-a182-2daaeb5edf8e" CreationDate="2023-04-18T22:15:08.027" UserId="3327" Text="|pallet-democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32075" PostHistoryTypeId="2" PostId="8163" RevisionGUID="6985d599-b91f-4717-b4cf-f024a440cf4a" CreationDate="2023-04-19T02:14:42.277" UserId="116" Text="*In another question &#xD;&#xA;https://substrate.stackexchange.com/questions/6513/how-do-i-work-with-ss58-encoded-addresses the same question was addressed, this is however about how to do it without the std lib.*&#xD;&#xA;&#xD;&#xA;**How to convert an ss58 stored in a string to an `[u8;32]`**&#xD;&#xA;&#xD;&#xA;When running in rich environment, it is easy to convert from ss58 format to `AccountId32` using:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use sp_core::{crypto::AccountId32, sp_std};&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;let a:AccountId32 = sp_std::str::FromStr::from_str(&amp;s);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But checking the source code in `sp-core-20.0.0/src/crypto.rs` I can see the `FromStr` trait is guarded by a feature flag `#[cfg(feature = &quot;std&quot;)]`&#xD;&#xA;and defined only when compiled in std.&#xD;&#xA;&#xD;&#xA;It would of course be possible for me to clone and duplicate this code for `core` but is there a better way to run this conversion in a `no_std` environment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32077" PostHistoryTypeId="1" PostId="8163" RevisionGUID="6985d599-b91f-4717-b4cf-f024a440cf4a" CreationDate="2023-04-19T02:14:42.277" UserId="116" Text="How to parse an ss58 address in no_std rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="32078" PostHistoryTypeId="3" PostId="8163" RevisionGUID="6985d599-b91f-4717-b4cf-f024a440cf4a" CreationDate="2023-04-19T02:14:42.277" UserId="116" Text="|rust|no-std|ss58|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32079" PostHistoryTypeId="6" PostId="7149" RevisionGUID="2c0282b8-9e1f-470a-b527-b0fe829ba085" CreationDate="2023-04-19T02:27:06.427" UserId="251" Comment="edited tags" Text="|polkadot|ss58format|address|ss58|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32080" PostHistoryTypeId="5" PostId="8163" RevisionGUID="5b42c455-3a1c-44b1-9f6d-1c01aa555540" CreationDate="2023-04-19T03:48:21.190" UserId="116" Comment="added 238 characters in body" Text="*In another question &#xD;&#xA;https://substrate.stackexchange.com/questions/6513/how-do-i-work-with-ss58-encoded-addresses the same question was addressed, this is however about how to do it without the std lib.*&#xD;&#xA;&#xD;&#xA;**How to convert an ss58 stored in a string to an `[u8;32]`**&#xD;&#xA;&#xD;&#xA;When running in rich environment, it is easy to convert from ss58 format to `AccountId32` using:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use sp_core::{crypto::AccountId32, sp_std};&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;let a:AccountId32 = sp_std::str::FromStr::from_str(&amp;s);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But checking the source code in `sp-core-20.0.0/src/crypto.rs` I can see the `FromStr` trait is guarded by a feature flag `#[cfg(feature = &quot;std&quot;)]`&#xD;&#xA;and defined only when compiled in std.&#xD;&#xA;&#xD;&#xA;It would of course be possible for me to clone and duplicate this code for `core` but is there a better way to run this conversion in a `no_std` environment?&#xD;&#xA;&#xD;&#xA;Edit: *There is a similar question https://substrate.stackexchange.com/questions/7149/is-there-any-way-to-convert-an-ss58-address-to-the-32-bytes-pubkey but the answers is all about running in a shell which is not what I'm asking for*" ContentLicense="CC BY-SA 4.0" />
  <row Id="32081" PostHistoryTypeId="5" PostId="8163" RevisionGUID="ea40d29d-08ca-4039-85fa-4dded606acc7" CreationDate="2023-04-19T04:47:49.910" UserId="116" Comment="added 19 characters in body" Text="*In another question &#xD;&#xA;https://substrate.stackexchange.com/questions/6513/how-do-i-work-with-ss58-encoded-addresses the same question was addressed, this is however about how to do it without the std lib.*&#xD;&#xA;&#xD;&#xA;**How to convert an ss58 stored in a `String` to an `AccountId32` or `[u8;32]`**&#xD;&#xA;&#xD;&#xA;When running in rich environment, it is easy to convert from ss58 format to `AccountId32` using:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use sp_core::{crypto::AccountId32, sp_std};&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;let a:AccountId32 = sp_std::str::FromStr::from_str(&amp;s);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But checking the source code in `sp-core-20.0.0/src/crypto.rs` I can see the `FromStr` trait is guarded by a feature flag `#[cfg(feature = &quot;std&quot;)]`&#xD;&#xA;and defined only when compiled in std.&#xD;&#xA;&#xD;&#xA;It would of course be possible for me to clone and duplicate this code for `core` but is there a better way to run this conversion in a `no_std` environment?&#xD;&#xA;&#xD;&#xA;Edit: *There is a similar question https://substrate.stackexchange.com/questions/7149/is-there-any-way-to-convert-an-ss58-address-to-the-32-bytes-pubkey but the answers is all about running in a shell which is not what I'm asking for*" ContentLicense="CC BY-SA 4.0" />
  <row Id="32082" PostHistoryTypeId="2" PostId="8164" RevisionGUID="f799ee73-4ad0-4b85-b627-292fa9ab1dc1" CreationDate="2023-04-19T05:23:13.547" UserId="126" Text="I'm looking at ink! contracts and chain extensions. Two questions that came up that I did not find an answer by browsing the docs. Both questions are related to the design of integrating ink! with parachain runtimes.&#xD;&#xA;&#xD;&#xA;1. Why are chain extensions explicitly defined vs. giving ink! by default read access to all pallets' storage items and dispatchable functions? It seems quite the overhead to maintain both chain extensions and the pallets themselves. Both, storage and dispatchable functions are publicly accessible anyway so I was surprised, ink! needs to have explicitly stated chain extensions. What was the reason for this design decision?&#xD;&#xA;&#xD;&#xA;2. Why do chain extensions use function ids? In `construct_runtime` pallets already get an id, plus the pallets' storage items and dispatchable functions have explicit names. Using function ids in the chain extensions, I see two down sides: (1) ink! contract developers need to look up a potentially very long list of chain extension function ids that makes it error-prone during development and review as one might easily confuse function `1101` and `1011` that might have different functionality. (2) For runtime engineers, there seems to be an extra burden to ensure that chain extension function ids are maintained in parallel to the rest of the runtime code. What was the reason for this design decision?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32084" PostHistoryTypeId="1" PostId="8164" RevisionGUID="f799ee73-4ad0-4b85-b627-292fa9ab1dc1" CreationDate="2023-04-19T05:23:13.547" UserId="126" Text="ink design: Why are chain extensions explicitly defined and why do they use function ids instead of the runtime pallet and function naming?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32085" PostHistoryTypeId="3" PostId="8164" RevisionGUID="f799ee73-4ad0-4b85-b627-292fa9ab1dc1" CreationDate="2023-04-19T05:23:13.547" UserId="126" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32086" PostHistoryTypeId="2" PostId="8165" RevisionGUID="99cbb20b-83f0-47bc-b341-774d26319e59" CreationDate="2023-04-19T06:53:22.583" UserId="3317" Text="`Pallet-assets`, which I assume you are using for creating token `ZZZ`, offers the extrinsic [`fn transfer`][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/88e2c9e3935c3951da3c6e3bdb8fb1ae74dc1258/frame/assets/src/lib.rs#L838" ContentLicense="CC BY-SA 4.0" />
  <row Id="32088" PostHistoryTypeId="2" PostId="8166" RevisionGUID="c09484ce-c501-449b-a769-9e90bab4aae4" CreationDate="2023-04-19T06:59:23.727" UserId="3317" Text="Moonbeam has resources you can take a look at: https://docs.moonbeam.network/builders/pallets-precompiles/pallets/democracy/&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32090" PostHistoryTypeId="5" PostId="7989" RevisionGUID="15c28dde-e469-41fd-82df-619011ed8bd6" CreationDate="2023-04-19T07:01:56.870" UserId="251" Comment="deleted 41 characters in body; edited tags" Text="Hello Substrate and Polkadot community,&#xD;&#xA;&#xD;&#xA;I am working on creating a decentralized exchange (DEX) using Substrate pallets and I've encountered an issue related to transferring tokens from the contract owner to the pallet address.&#xD;&#xA;&#xD;&#xA;To add liquidity for a token pair (e.g., XXX/USDT) in my DEX, users need to provide the contract address of the token (e.g., XXX). Before initiating the transfer, I want to ensure that the user is indeed the owner of the contract. Once the ownership is verified, I need to transfer tokens from the contract address (e.g., `5xsdf6s5d4f6sd4f65sd4fs65df46s5d4f6s5d4f`) to the pallet address.&#xD;&#xA;&#xD;&#xA;Could anyone provide guidance or sample code on how to achieve this token transfer from the contract owner to the pallet address while ensuring the user is the actual owner of the contract?&#xD;&#xA;&#xD;&#xA;Any help or suggestions would be greatly appreciated. Thank you!&#xD;&#xA;&#xD;&#xA;**Update**&#xD;&#xA;&#xD;&#xA;i want to transfer token with this code : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call_index(9)]&#xD;&#xA;#[pallet::weight(10_000)]&#xD;&#xA;pub fn total_supply(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;   	token: T::AccountId,&#xD;&#xA;	currency: T::AccountId,&#xD;&#xA;    currency_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    token_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;   	let who = ensure_signed(origin)?;&#xD;&#xA;     &#xD;&#xA;    T::Currency::transfer(&amp;who, &amp;T::PalletId::get().into_account(), &#xD;&#xA;    T::MinDeposit::get(), ExistenceRequirement::KeepAlive)?; &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;but in this code transfer native token of the chain and i need to transfer from `XXX` token to the pallet account . " ContentLicense="CC BY-SA 4.0" />
  <row Id="32091" PostHistoryTypeId="6" PostId="7989" RevisionGUID="15c28dde-e469-41fd-82df-619011ed8bd6" CreationDate="2023-04-19T07:01:56.870" UserId="251" Comment="deleted 41 characters in body; edited tags" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32092" PostHistoryTypeId="2" PostId="8167" RevisionGUID="c04694de-9aa9-4939-a771-c76a3356d541" CreationDate="2023-04-19T07:16:53.647" UserId="2668" Text="why cause this?  &#xD;&#xA;&#xD;&#xA;    result, err := client.SignedExtrinsic(&#xD;&#xA;			&quot;0x186c09cac19834761b573b238b6542257d05b1fc5a57688311345d8cdf7e488d&quot;,&#xD;&#xA;			&quot;5FjKC4iC797yUWmFJuirEWqvVA2ABy3d41ugxZfHyrHs2AYx&quot;,&#xD;&#xA;			&quot;113000000000000000000&quot;,&#xD;&#xA;			&quot;0&quot;,&#xD;&#xA;		)&#xD;&#xA;		if err != nil {&#xD;&#xA;			panic(err)&#xD;&#xA;		}&#xD;&#xA;		info, err := client.PaymentQueryInfo(result)&#xD;&#xA;		if err != nil {&#xD;&#xA;			panic(err)&#xD;&#xA;		}&#xD;&#xA;		fmt.Println(info.PartialFee)" ContentLicense="CC BY-SA 4.0" />
  <row Id="32094" PostHistoryTypeId="1" PostId="8167" RevisionGUID="c04694de-9aa9-4939-a771-c76a3356d541" CreationDate="2023-04-19T07:16:53.647" UserId="2668" Text="During runtime upgrade, I estimate gas fee by PaymentQueryInfo api, the return result value is so high， more than the normal value" ContentLicense="CC BY-SA 4.0" />
  <row Id="32095" PostHistoryTypeId="3" PostId="8167" RevisionGUID="c04694de-9aa9-4939-a771-c76a3356d541" CreationDate="2023-04-19T07:16:53.647" UserId="2668" Text="|runtime-upgrade|gas|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32096" PostHistoryTypeId="5" PostId="8167" RevisionGUID="f5195115-e83d-4c40-8059-930fb88910f6" CreationDate="2023-04-19T07:20:45.333" UserId="251" Comment="deleted 18 characters in body" Text="why cause this?  &#xD;&#xA;&#xD;&#xA;```go&#xD;&#xA;result, err := client.SignedExtrinsic(&#xD;&#xA;	&quot;0x186c09cac19834761b573b238b6542257d05b1fc5a57688311345d8cdf7e488d&quot;,&#xD;&#xA;	&quot;5FjKC4iC797yUWmFJuirEWqvVA2ABy3d41ugxZfHyrHs2AYx&quot;,&#xD;&#xA;	&quot;113000000000000000000&quot;,&#xD;&#xA;	&quot;0&quot;,&#xD;&#xA;)&#xD;&#xA;if err != nil {&#xD;&#xA;	panic(err)&#xD;&#xA;}&#xD;&#xA;info, err := client.PaymentQueryInfo(result)&#xD;&#xA;if err != nil {&#xD;&#xA;	panic(err)&#xD;&#xA;}&#xD;&#xA;fmt.Println(info.PartialFee)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32097" PostHistoryTypeId="2" PostId="8168" RevisionGUID="0da55df2-af2c-4e3f-87eb-6cf4e47d55b3" CreationDate="2023-04-19T07:42:30.230" UserId="251" Text="The `set_code`'s weight is extremely large.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/88e2c9e3935c3951da3c6e3bdb8fb1ae74dc1258/frame/system/src/lib.rs#L400&#xD;&#xA;&#xD;&#xA;As you can see, it uses all the weight of a block. So, you need to pay a lot of fees for that." ContentLicense="CC BY-SA 4.0" />
  <row Id="32099" PostHistoryTypeId="2" PostId="8169" RevisionGUID="ef0a074f-0b05-4055-95b3-fc8687a75490" CreationDate="2023-04-19T07:49:08.560" UserId="567" Text="I.   &#xD;&#xA;(chain extension = CE)&#xD;&#xA;&#xD;&#xA;Yes maintaining CE is an overhead. Especially that most of CE will be a 1o1 wrapper around dispatchable and query functions of a given pallet.&#xD;&#xA;&#xD;&#xA;But smart-contracts are not meant to be updated. There is upgrade-able contracts but this targets specific use cases (bigger dApps managed by a DAO). But token standards for example will not be upgreadable (and some of them can use CE like an PSP22 pallet-assets for ex).&#xD;&#xA;So implementing contracts to pallet connection at CE level ensure backward compatibility.    &#xD;&#xA;A real world example:&#xD;&#xA;`assets-pallet` is evolving, it's API is not stable. If a smart-contracts call `destroy_asset()` to pallet-assets but the pallet API is updated, contracts become unusable. But updating inside the CE will ensure it will not break the contract as an runtime upgrade will fix the body of the CE function.&#xD;&#xA;&#xD;&#xA;Also CE can abstract logic to ease the use in a smart-contract (in the case of an XCM CE) and also delegates some computation to runtime (in order to lower the size of the contract) like crypto singature verification.&#xD;&#xA;&#xD;&#xA;EDIT (forgot to mention): a runtime call to any dispatchable is already availbale in ink! [call_runtime](https://github.com/paritytech/ink/blob/644c5470d1647c1930829735c65d885277dbf659/crates/env/src/api.rs#L739) and being [stabilized](https://github.com/paritytech/ink/pull/1749).&#xD;&#xA;&#xD;&#xA;II.   &#xD;&#xA;for runtime devs: functions ids are not meant to be updated (or all contracts  using it will be unusable). There is a [registry](https://github.com/paritytech/chainextension-registry) for chain-extension that can be used by several runtime. But id for the CE are not in collision with `construct_runtime` see [here](https://github.com/AstarNetwork/Astar/blob/1ec1358720e24c874021cf3e9198313358977f24/runtime/shibuya/src/chain_extensions.rs#L32)&#xD;&#xA;&#xD;&#xA;for smart-contracts devs: these ids can be abstracted like [here](https://github.com/swanky-dapps/chain-extension-contracts/blob/870dd2cfda2598e3d5c7571be3bd95979dd6c1c3/crates/assets/lib.rs#L18) and used like [here](https://github.com/swanky-dapps/chain-extension-contracts/blob/870dd2cfda2598e3d5c7571be3bd95979dd6c1c3/examples/assets/lib.rs#L22).&#xD;&#xA;The usage in ink! is being [updated](https://github.com/paritytech/ink/issues/1722) to make this kind of implementation easier. I don't think this is error prone for developers because a call to a non existing CE (an id that does't match) will throw [DecodingFailed](https://github.com/paritytech/substrate/blob/88e2c9e3935c3951da3c6e3bdb8fb1ae74dc1258/frame/contracts/src/lib.rs#L805) error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="32101" PostHistoryTypeId="5" PostId="8169" RevisionGUID="4c55b41b-2950-4f73-a18a-dae93e97bdc3" CreationDate="2023-04-19T08:06:14.437" UserId="567" Comment="added 34 characters in body" Text="I.   &#xD;&#xA;(chain extension = CE)&#xD;&#xA;&#xD;&#xA;Yes maintaining CE is an overhead. Especially that most of CE will be a 1o1 wrapper around dispatchable and query functions of a given pallet.&#xD;&#xA;&#xD;&#xA;But smart-contracts are not meant to be updated. There is upgrade-able contracts but this targets specific use cases (bigger dApps managed by a DAO). But token standards for example will not be upgreadable (and some of them can use CE like an PSP22 pallet-assets for ex).&#xD;&#xA;So implementing contracts to pallet connection at CE level ensure backward compatibility. Chain extension is a `stable API`    &#xD;&#xA;A real world example:&#xD;&#xA;`assets-pallet` is evolving, it's API is not stable. If a smart-contracts call `destroy_asset()` to pallet-assets but the pallet API is updated, contracts become unusable. But updating inside the CE will ensure it will not break the contract as an runtime upgrade will fix the body of the CE function.&#xD;&#xA;&#xD;&#xA;Also CE can abstract logic to ease the use in a smart-contract (in the case of an XCM CE) and also delegates some computation to runtime (in order to lower the size of the contract) like crypto singature verification.&#xD;&#xA;&#xD;&#xA;EDIT (forgot to mention): a runtime call to any dispatchable is already availbale in ink! [call_runtime](https://github.com/paritytech/ink/blob/644c5470d1647c1930829735c65d885277dbf659/crates/env/src/api.rs#L739) and being [stabilized](https://github.com/paritytech/ink/pull/1749).&#xD;&#xA;&#xD;&#xA;II.   &#xD;&#xA;for runtime devs: functions ids are not meant to be updated (or all contracts  using it will be unusable). There is a [registry](https://github.com/paritytech/chainextension-registry) for chain-extension that can be used by several runtime. But id for the CE are not in collision with `construct_runtime` see [here](https://github.com/AstarNetwork/Astar/blob/1ec1358720e24c874021cf3e9198313358977f24/runtime/shibuya/src/chain_extensions.rs#L32)&#xD;&#xA;&#xD;&#xA;for smart-contracts devs: these ids can be abstracted like [here](https://github.com/swanky-dapps/chain-extension-contracts/blob/870dd2cfda2598e3d5c7571be3bd95979dd6c1c3/crates/assets/lib.rs#L18) and used like [here](https://github.com/swanky-dapps/chain-extension-contracts/blob/870dd2cfda2598e3d5c7571be3bd95979dd6c1c3/examples/assets/lib.rs#L22).&#xD;&#xA;The usage in ink! is being [updated](https://github.com/paritytech/ink/issues/1722) to make this kind of implementation easier. I don't think this is error prone for developers because a call to a non existing CE (an id that does't match) will throw [DecodingFailed](https://github.com/paritytech/substrate/blob/88e2c9e3935c3951da3c6e3bdb8fb1ae74dc1258/frame/contracts/src/lib.rs#L805) error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="32102" PostHistoryTypeId="2" PostId="8170" RevisionGUID="ded7e7df-ea53-4933-a53a-6047aa8ce495" CreationDate="2023-04-19T08:29:14.527" UserId="3127" Text="Syed, have you watched the Friday Polkadot [Deep Dive][1] on pallet-democracy? It's one of the best resources to dive into such topics. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.youtube.com/watch?v=CgcUWK2E9Jo" ContentLicense="CC BY-SA 4.0" />
  <row Id="32104" PostHistoryTypeId="2" PostId="8171" RevisionGUID="fc14a965-e011-4b88-a214-912af5ac77eb" CreationDate="2023-04-19T08:51:08.937" UserId="251" Text="IMO, always check the official wiki first.&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/maintain-guides-democracy" ContentLicense="CC BY-SA 4.0" />
  <row Id="32106" PostHistoryTypeId="2" PostId="8172" RevisionGUID="5db3b900-9090-43d0-a7dd-004d93f302f8" CreationDate="2023-04-19T10:09:50.043" UserId="3123" Text="[GenesisConfig][1] is implemented for each pallet, but the runtime `GenesisConfig` (ex: `polkadot::GenesisConfig`) is not implemented explicitly. So my question is: how to implement a trait (`Debug` for example) for the generated runtime genesis config? Since trait implementation have to go along struct definition, where should this implementation go?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/genesis-configuration/" ContentLicense="CC BY-SA 4.0" />
  <row Id="32108" PostHistoryTypeId="1" PostId="8172" RevisionGUID="5db3b900-9090-43d0-a7dd-004d93f302f8" CreationDate="2023-04-19T10:09:50.043" UserId="3123" Text="How to implement Debug trait for runtime GenesisConfig?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32109" PostHistoryTypeId="3" PostId="8172" RevisionGUID="5db3b900-9090-43d0-a7dd-004d93f302f8" CreationDate="2023-04-19T10:09:50.043" UserId="3123" Text="|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32110" PostHistoryTypeId="2" PostId="8173" RevisionGUID="eef7588f-670f-4e41-b676-fe0834e1eddb" CreationDate="2023-04-19T11:50:56.273" UserId="2281" Text="i am using substrate `pallet_contracts` for wasm contract deployment how can i set the fees for contract deployment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32112" PostHistoryTypeId="1" PostId="8173" RevisionGUID="eef7588f-670f-4e41-b676-fe0834e1eddb" CreationDate="2023-04-19T11:50:56.273" UserId="2281" Text="How to decrease wasm smart contract deployment fee without decreasing Transaction fee?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32113" PostHistoryTypeId="3" PostId="8173" RevisionGUID="eef7588f-670f-4e41-b676-fe0834e1eddb" CreationDate="2023-04-19T11:50:56.273" UserId="2281" Text="|substrate-node-template|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32114" PostHistoryTypeId="2" PostId="8174" RevisionGUID="05bb2acd-402b-492b-a795-17c29a265268" CreationDate="2023-04-19T12:05:10.863" UserId="3708" Text="I'm following this [example][1] but I always get an error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My config.toml:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[settings]&#xD;&#xA;timeout = 1000&#xD;&#xA;&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;dave&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;chain = &quot;shibuya-dev&quot;&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [[parachains.collators]]&#xD;&#xA;  name = &quot;collator1&quot;  &#xD;&#xA;  command = &quot;./bin/astar-collator&quot;&#xD;&#xA;  args = [ &quot;-l=xcm=trace&quot;, &quot;--enable-evm-rpc&quot; ]&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2007&#xD;&#xA;chain = &quot;shiden-dev&quot;&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [[parachains.collators]]&#xD;&#xA;  name = &quot;collator2&quot;  &#xD;&#xA;  command = &quot;./bin/astar-collator&quot;&#xD;&#xA;  args = [ &quot;-l=xcm=trace&quot;, &quot;--enable-evm-rpc&quot; ]&#xD;&#xA;&#xD;&#xA;[[hrmp_channels]]&#xD;&#xA;  sender = 2000&#xD;&#xA;  recipient = 2007&#xD;&#xA;  max_capacity = 8&#xD;&#xA;  max_message_size = 512&#xD;&#xA;  &#xD;&#xA;[[hrmp_channels]]&#xD;&#xA;  sender = 2007&#xD;&#xA;  recipient = 2000&#xD;&#xA;  max_capacity = 8&#xD;&#xA;  max_message_size = 512&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My folder structure:&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;run-astar.sh:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet -p native spawn config-astart.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm using macbook pro M1. Do I need something else to configure?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AstarNetwork/Astar/blob/master/third-party/zombienet/multi_parachains.toml&#xD;&#xA;  [2]: https://i.stack.imgur.com/Iu0rp.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/c34Hw.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32116" PostHistoryTypeId="1" PostId="8174" RevisionGUID="05bb2acd-402b-492b-a795-17c29a265268" CreationDate="2023-04-19T12:05:10.863" UserId="3708" Text="Error running Astar parachains with zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="32117" PostHistoryTypeId="3" PostId="8174" RevisionGUID="05bb2acd-402b-492b-a795-17c29a265268" CreationDate="2023-04-19T12:05:10.863" UserId="3708" Text="|parachain|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32118" PostHistoryTypeId="6" PostId="8174" RevisionGUID="5fc0d472-f8c0-4d6d-b10b-5800c2639764" CreationDate="2023-04-19T12:42:01.440" UserId="3317" Comment="edited tags" Text="|parachain|astar|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32119" PostHistoryTypeId="2" PostId="8175" RevisionGUID="8ae90ea9-16aa-483a-8b43-4f83016cf3be" CreationDate="2023-04-19T12:52:35.620" UserId="354" Text="I want to implement a business logic that needs to know if the node of validators in waiting state are up or not. So for that according to me `pallet_im_online` was the best solution (but open to any other solutions). After doing some R&amp;D I found the function below [referenced][1]:&#xD;&#xA;&#xD;&#xA;    fn is_online_aux(authority_index: AuthIndex, authority: &amp;ValidatorId&lt;T&gt;) -&gt; bool {&#xD;&#xA;    	let current_session = T::ValidatorSet::session_index();&#xD;&#xA;    &#xD;&#xA;    	ReceivedHeartbeats::&lt;T&gt;::contains_key(&amp;current_session, &amp;authority_index) ||&#xD;&#xA;    		AuthoredBlocks::&lt;T&gt;::get(&amp;current_session, authority) != 0&#xD;&#xA;    }&#xD;&#xA;From this I understand if an `authority-node` is authoring blocks than it is online, or if it does not get the chance to author block it will send a `Heartbeat`.&#xD;&#xA;&#xD;&#xA;But all the above logic works for only the validators that are in `active_set` as I have mentioned in the question also I want this for validators in `waiting_set`.&#xD;&#xA;&#xD;&#xA;What I have done till now:&#xD;&#xA;&#xD;&#xA; - I was able to get the validators in `waiting_set` and when I passed it `fn is_online_aux`, it was showing in `offenders_list` instead of giving a `Heartbeat`.&#xD;&#xA; - Which I find later on that it was getting the list of online validators from `fn on_new_session&lt;'a, I: 'a&gt;(_changed: bool, validators: I, _queued_validators: I)` and using it find if authority node is online or not.&#xD;&#xA;&#xD;&#xA;Can someone tell me how to achieve it?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/50de15d8740a129db9c18a6698fbd183b00326a2/frame/im-online/src/lib.rs#L624-L629" ContentLicense="CC BY-SA 4.0" />
  <row Id="32121" PostHistoryTypeId="1" PostId="8175" RevisionGUID="8ae90ea9-16aa-483a-8b43-4f83016cf3be" CreationDate="2023-04-19T12:52:35.620" UserId="354" Text="How to find waiting validator node is online?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32122" PostHistoryTypeId="3" PostId="8175" RevisionGUID="8ae90ea9-16aa-483a-8b43-4f83016cf3be" CreationDate="2023-04-19T12:52:35.620" UserId="354" Text="|polkadot|substrate-node-template|runtime|pallet-imonline|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32123" PostHistoryTypeId="2" PostId="8176" RevisionGUID="27ae8067-caa6-438b-ab90-f8c2773ac7e4" CreationDate="2023-04-19T12:53:51.903" UserId="409" Text="```rust&#xD;&#xA;if !missed_any {&#xD;&#xA;	// burn some proportion of the remaining budget if we run a surplus.&#xD;&#xA;	let burn = (T::Burn::get() * budget_remaining).min(budget_remaining);&#xD;&#xA;	budget_remaining -= burn;&#xD;&#xA;&#xD;&#xA;	let (debit, credit) = T::Currency::pair(burn);&#xD;&#xA;	imbalance.subsume(debit);&#xD;&#xA;	T::BurnDestination::on_unbalanced(credit);&#xD;&#xA;	Self::deposit_event(Event::Burnt { burnt_funds: burn })&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Upper code is taken from [treasury](https://github.com/paritytech/substrate/blob/master/frame/treasury/src/lib.rs#L592) pallet. I checked the balances pallet, but can not find the `pair` call. Can anyone explain how this `pair` call works? Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="32125" PostHistoryTypeId="1" PostId="8176" RevisionGUID="27ae8067-caa6-438b-ab90-f8c2773ac7e4" CreationDate="2023-04-19T12:53:51.903" UserId="409" Text="How does `Currency::pair(burn)` work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32126" PostHistoryTypeId="3" PostId="8176" RevisionGUID="27ae8067-caa6-438b-ab90-f8c2773ac7e4" CreationDate="2023-04-19T12:53:51.903" UserId="409" Text="|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32127" PostHistoryTypeId="5" PostId="8176" RevisionGUID="9d3dfc32-d410-4679-8468-986e26ac673b" CreationDate="2023-04-19T12:55:42.597" UserId="409" Comment="added 73 characters in body" Text="```rust&#xD;&#xA;if !missed_any {&#xD;&#xA;	// burn some proportion of the remaining budget if we run a surplus.&#xD;&#xA;	let burn = (T::Burn::get() * budget_remaining).min(budget_remaining);&#xD;&#xA;	budget_remaining -= burn;&#xD;&#xA;&#xD;&#xA;	let (debit, credit) = T::Currency::pair(burn);&#xD;&#xA;	imbalance.subsume(debit);&#xD;&#xA;	T::BurnDestination::on_unbalanced(credit);&#xD;&#xA;	Self::deposit_event(Event::Burnt { burnt_funds: burn })&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Upper code is taken from [treasury](https://github.com/paritytech/substrate/blob/master/frame/treasury/src/lib.rs#L592) pallet. I checked the balances pallet, but can not find the `pair` call. Can anyone explain how this `pair` call works? I'll be appreciated if anyone can point out the source of this function. Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="32128" PostHistoryTypeId="2" PostId="8177" RevisionGUID="d962458a-b8d1-4572-8d5a-abca999ace4a" CreationDate="2023-04-19T13:03:31.840" UserId="2762" Text="In the treasury pallet the Currency trait is imported from the [frame support pallet][1] (see import [here][2]).&#xD;&#xA;&#xD;&#xA;If you go to the source code of the FRAME support pallet, you can check the  [Currency][3] trait and associated types, and the pair():&#xD;&#xA;```rs&#xD;&#xA;    /// Produce a pair of imbalances that cancel each other out exactly.&#xD;&#xA;	///&#xD;&#xA;	/// This is just the same as burning and issuing the same amount and has no effect on the&#xD;&#xA;	/// total issuance.&#xD;&#xA;	fn pair(amount: Self::Balance) -&gt; (Self::PositiveImbalance, Self::NegativeImbalance) {&#xD;&#xA;		(Self::burn(amount), Self::issue(amount))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/support&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/treasury/src/lib.rs#L75&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/support/src/traits/tokens/currency.rs#L97" ContentLicense="CC BY-SA 4.0" />
  <row Id="32130" PostHistoryTypeId="2" PostId="8178" RevisionGUID="23436622-5a5c-4c1e-8b57-0b79450e9650" CreationDate="2023-04-19T13:03:57.320" UserId="94" Text="Currently the pallet `GenesisConfig` nor the aggregated `GenesisConfig` implement `Debug`.&#xD;&#xA;A change to FRAME would be needed to also expand this derive ([#13955](https://github.com/paritytech/substrate/issues/13955)). Could definitely be done, but could break some existing downstream code that has non-`Debug` fields in their Configs.&#xD;&#xA;&#xD;&#xA;Anyway, you can just use `serde_json` to encode and &quot;print&quot; it.  &#xD;&#xA;For example the Polkadot testnet config (minus WASM blob) looks like this:  &#xD;&#xA;&#xD;&#xA;```pre&#xD;&#xA;{&#xD;&#xA;  &quot;system&quot;: {&#xD;&#xA;    &quot;code&quot;: &quot;0x&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;babe&quot;: {&#xD;&#xA;    &quot;authorities&quot;: [],&#xD;&#xA;    &quot;epochConfig&quot;: {&#xD;&#xA;      &quot;c&quot;: [&#xD;&#xA;        1,&#xD;&#xA;        4&#xD;&#xA;      ],&#xD;&#xA;      &quot;allowed_slots&quot;: &quot;PrimaryAndSecondaryVRFSlots&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;indices&quot;: {&#xD;&#xA;    &quot;indices&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;balances&quot;: {&#xD;&#xA;    &quot;balances&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;staking&quot;: {&#xD;&#xA;    &quot;validatorCount&quot;: 50,&#xD;&#xA;    &quot;minimumValidatorCount&quot;: 4,&#xD;&#xA;    &quot;invulnerables&quot;: [],&#xD;&#xA;    &quot;forceEra&quot;: &quot;ForceNone&quot;,&#xD;&#xA;    &quot;slashRewardFraction&quot;: 100000000,&#xD;&#xA;    &quot;canceledPayout&quot;: 0,&#xD;&#xA;    &quot;stakers&quot;: [],&#xD;&#xA;    &quot;minNominatorBond&quot;: 0,&#xD;&#xA;    &quot;minValidatorBond&quot;: 0,&#xD;&#xA;    &quot;maxValidatorCount&quot;: null,&#xD;&#xA;    &quot;maxNominatorCount&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;session&quot;: {&#xD;&#xA;    &quot;keys&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;grandpa&quot;: {&#xD;&#xA;    &quot;authorities&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;imOnline&quot;: {&#xD;&#xA;    &quot;keys&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;authorityDiscovery&quot;: {&#xD;&#xA;    &quot;keys&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;democracy&quot;: {&#xD;&#xA;    &quot;phantom&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;council&quot;: {&#xD;&#xA;    &quot;phantom&quot;: null,&#xD;&#xA;    &quot;members&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;technicalCommittee&quot;: {&#xD;&#xA;    &quot;phantom&quot;: null,&#xD;&#xA;    &quot;members&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;phragmenElection&quot;: {&#xD;&#xA;    &quot;members&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;technicalMembership&quot;: {&#xD;&#xA;    &quot;members&quot;: [],&#xD;&#xA;    &quot;phantom&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;treasury&quot;: null,&#xD;&#xA;  &quot;claims&quot;: {&#xD;&#xA;    &quot;claims&quot;: [],&#xD;&#xA;    &quot;vesting&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;vesting&quot;: {&#xD;&#xA;    &quot;vesting&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;nominationPools&quot;: {&#xD;&#xA;    &quot;minJoinBond&quot;: 0,&#xD;&#xA;    &quot;minCreateBond&quot;: 0,&#xD;&#xA;    &quot;maxPools&quot;: 16,&#xD;&#xA;    &quot;maxMembersPerPool&quot;: 32,&#xD;&#xA;    &quot;maxMembers&quot;: 512,&#xD;&#xA;    &quot;globalMaxCommission&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;configuration&quot;: {&#xD;&#xA;    &quot;config&quot;: {&#xD;&#xA;      &quot;max_code_size&quot;: 10485760,&#xD;&#xA;      &quot;max_head_data_size&quot;: 32768,&#xD;&#xA;      &quot;max_upward_queue_count&quot;: 8,&#xD;&#xA;      &quot;max_upward_queue_size&quot;: 1048576,&#xD;&#xA;      &quot;max_upward_message_size&quot;: 51200,&#xD;&#xA;      &quot;max_upward_message_num_per_candidate&quot;: 5,&#xD;&#xA;      &quot;hrmp_max_message_num_per_candidate&quot;: 5,&#xD;&#xA;      &quot;validation_upgrade_cooldown&quot;: 2,&#xD;&#xA;      &quot;validation_upgrade_delay&quot;: 2,&#xD;&#xA;      &quot;async_backing_params&quot;: {&#xD;&#xA;        &quot;max_candidate_depth&quot;: 0,&#xD;&#xA;        &quot;allowed_ancestry_len&quot;: 0&#xD;&#xA;      },&#xD;&#xA;      &quot;max_pov_size&quot;: 5242880,&#xD;&#xA;      &quot;max_downward_message_size&quot;: 1048576,&#xD;&#xA;      &quot;hrmp_max_parachain_outbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_max_parathread_outbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_sender_deposit&quot;: 0,&#xD;&#xA;      &quot;hrmp_recipient_deposit&quot;: 0,&#xD;&#xA;      &quot;hrmp_channel_max_capacity&quot;: 8,&#xD;&#xA;      &quot;hrmp_channel_max_total_size&quot;: 8192,&#xD;&#xA;      &quot;hrmp_max_parachain_inbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_max_parathread_inbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_channel_max_message_size&quot;: 1048576,&#xD;&#xA;      &quot;executor_params&quot;: [],&#xD;&#xA;      &quot;code_retention_period&quot;: 1200,&#xD;&#xA;      &quot;parathread_cores&quot;: 0,&#xD;&#xA;      &quot;parathread_retries&quot;: 0,&#xD;&#xA;      &quot;group_rotation_frequency&quot;: 20,&#xD;&#xA;      &quot;chain_availability_period&quot;: 4,&#xD;&#xA;      &quot;thread_availability_period&quot;: 4,&#xD;&#xA;      &quot;scheduling_lookahead&quot;: 0,&#xD;&#xA;      &quot;max_validators_per_core&quot;: null,&#xD;&#xA;      &quot;max_validators&quot;: null,&#xD;&#xA;      &quot;dispute_period&quot;: 6,&#xD;&#xA;      &quot;dispute_post_conclusion_acceptance_period&quot;: 100,&#xD;&#xA;      &quot;no_show_slots&quot;: 2,&#xD;&#xA;      &quot;n_delay_tranches&quot;: 25,&#xD;&#xA;      &quot;zeroth_delay_tranche_width&quot;: 0,&#xD;&#xA;      &quot;needed_approvals&quot;: 2,&#xD;&#xA;      &quot;relay_vrf_modulo_samples&quot;: 2,&#xD;&#xA;      &quot;pvf_checking_enabled&quot;: false,&#xD;&#xA;      &quot;pvf_voting_ttl&quot;: 2,&#xD;&#xA;      &quot;minimum_validation_upgrade_delay&quot;: 5&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;paras&quot;: {&#xD;&#xA;    &quot;paras&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;hrmp&quot;: {&#xD;&#xA;    &quot;preopenHrmpChannels&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;xcmPallet&quot;: {&#xD;&#xA;    &quot;safeXcmVersion&quot;: 3&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32132" PostHistoryTypeId="2" PostId="8179" RevisionGUID="a497f0b7-342a-418c-89ae-fe6bf5e1b2ed" CreationDate="2023-04-19T13:09:01.117" UserId="494" Text="In [Rob Habermeier's blogpost about Hybrid Chains](https://www.rob.tech/blog/hybrid-chains/), he mentions allocating contract execution to a limited fraction of the chain's blockspace.&#xD;&#xA;&#xD;&#xA;Is that some functionality that `pallet-contracts` provides?&#xD;&#xA;&#xD;&#xA;Or is it something that needs to be implemented on a different level of abstraction on the `FRAME` stack?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32134" PostHistoryTypeId="1" PostId="8179" RevisionGUID="a497f0b7-342a-418c-89ae-fe6bf5e1b2ed" CreationDate="2023-04-19T13:09:01.117" UserId="494" Text="Smart Contract blockspace allocation in Hybrid Chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="32135" PostHistoryTypeId="3" PostId="8179" RevisionGUID="a497f0b7-342a-418c-89ae-fe6bf5e1b2ed" CreationDate="2023-04-19T13:09:01.117" UserId="494" Text="|smart-contract|frame|wasm|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32136" PostHistoryTypeId="5" PostId="8178" RevisionGUID="955c711d-b93d-446f-ab25-26c16d72db68" CreationDate="2023-04-19T13:09:30.537" UserId="94" Comment="[Edit removed during grace period]; added 119 characters in body" Text="Currently the pallet `GenesisConfig` nor the aggregated `GenesisConfig` implement `Debug`.&#xD;&#xA;A change to FRAME would be needed to also expand this derive ([#13955](https://github.com/paritytech/substrate/issues/13955)). Could definitely be done, but could break some existing downstream code that has non-`Debug` fields in their Configs.&#xD;&#xA;&#xD;&#xA;You can additionally implement stuff on the `GenesisConfig` in the same module as the `construct_runtime!` - *should* work. So that could also work for `Debug` (did not try).&#xD;&#xA;&#xD;&#xA;Anyway, you can also use `serde_json` to encode and &quot;print&quot; it.  &#xD;&#xA;For example the Polkadot testnet config (minus WASM blob) looks like this:  &#xD;&#xA;&#xD;&#xA;```pre&#xD;&#xA;{&#xD;&#xA;  &quot;system&quot;: {&#xD;&#xA;    &quot;code&quot;: &quot;0x&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;babe&quot;: {&#xD;&#xA;    &quot;authorities&quot;: [],&#xD;&#xA;    &quot;epochConfig&quot;: {&#xD;&#xA;      &quot;c&quot;: [&#xD;&#xA;        1,&#xD;&#xA;        4&#xD;&#xA;      ],&#xD;&#xA;      &quot;allowed_slots&quot;: &quot;PrimaryAndSecondaryVRFSlots&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;indices&quot;: {&#xD;&#xA;    &quot;indices&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;balances&quot;: {&#xD;&#xA;    &quot;balances&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;staking&quot;: {&#xD;&#xA;    &quot;validatorCount&quot;: 50,&#xD;&#xA;    &quot;minimumValidatorCount&quot;: 4,&#xD;&#xA;    &quot;invulnerables&quot;: [],&#xD;&#xA;    &quot;forceEra&quot;: &quot;ForceNone&quot;,&#xD;&#xA;    &quot;slashRewardFraction&quot;: 100000000,&#xD;&#xA;    &quot;canceledPayout&quot;: 0,&#xD;&#xA;    &quot;stakers&quot;: [],&#xD;&#xA;    &quot;minNominatorBond&quot;: 0,&#xD;&#xA;    &quot;minValidatorBond&quot;: 0,&#xD;&#xA;    &quot;maxValidatorCount&quot;: null,&#xD;&#xA;    &quot;maxNominatorCount&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;session&quot;: {&#xD;&#xA;    &quot;keys&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;grandpa&quot;: {&#xD;&#xA;    &quot;authorities&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;imOnline&quot;: {&#xD;&#xA;    &quot;keys&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;authorityDiscovery&quot;: {&#xD;&#xA;    &quot;keys&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;democracy&quot;: {&#xD;&#xA;    &quot;phantom&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;council&quot;: {&#xD;&#xA;    &quot;phantom&quot;: null,&#xD;&#xA;    &quot;members&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;technicalCommittee&quot;: {&#xD;&#xA;    &quot;phantom&quot;: null,&#xD;&#xA;    &quot;members&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;phragmenElection&quot;: {&#xD;&#xA;    &quot;members&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;technicalMembership&quot;: {&#xD;&#xA;    &quot;members&quot;: [],&#xD;&#xA;    &quot;phantom&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;treasury&quot;: null,&#xD;&#xA;  &quot;claims&quot;: {&#xD;&#xA;    &quot;claims&quot;: [],&#xD;&#xA;    &quot;vesting&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;vesting&quot;: {&#xD;&#xA;    &quot;vesting&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;nominationPools&quot;: {&#xD;&#xA;    &quot;minJoinBond&quot;: 0,&#xD;&#xA;    &quot;minCreateBond&quot;: 0,&#xD;&#xA;    &quot;maxPools&quot;: 16,&#xD;&#xA;    &quot;maxMembersPerPool&quot;: 32,&#xD;&#xA;    &quot;maxMembers&quot;: 512,&#xD;&#xA;    &quot;globalMaxCommission&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;configuration&quot;: {&#xD;&#xA;    &quot;config&quot;: {&#xD;&#xA;      &quot;max_code_size&quot;: 10485760,&#xD;&#xA;      &quot;max_head_data_size&quot;: 32768,&#xD;&#xA;      &quot;max_upward_queue_count&quot;: 8,&#xD;&#xA;      &quot;max_upward_queue_size&quot;: 1048576,&#xD;&#xA;      &quot;max_upward_message_size&quot;: 51200,&#xD;&#xA;      &quot;max_upward_message_num_per_candidate&quot;: 5,&#xD;&#xA;      &quot;hrmp_max_message_num_per_candidate&quot;: 5,&#xD;&#xA;      &quot;validation_upgrade_cooldown&quot;: 2,&#xD;&#xA;      &quot;validation_upgrade_delay&quot;: 2,&#xD;&#xA;      &quot;async_backing_params&quot;: {&#xD;&#xA;        &quot;max_candidate_depth&quot;: 0,&#xD;&#xA;        &quot;allowed_ancestry_len&quot;: 0&#xD;&#xA;      },&#xD;&#xA;      &quot;max_pov_size&quot;: 5242880,&#xD;&#xA;      &quot;max_downward_message_size&quot;: 1048576,&#xD;&#xA;      &quot;hrmp_max_parachain_outbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_max_parathread_outbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_sender_deposit&quot;: 0,&#xD;&#xA;      &quot;hrmp_recipient_deposit&quot;: 0,&#xD;&#xA;      &quot;hrmp_channel_max_capacity&quot;: 8,&#xD;&#xA;      &quot;hrmp_channel_max_total_size&quot;: 8192,&#xD;&#xA;      &quot;hrmp_max_parachain_inbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_max_parathread_inbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_channel_max_message_size&quot;: 1048576,&#xD;&#xA;      &quot;executor_params&quot;: [],&#xD;&#xA;      &quot;code_retention_period&quot;: 1200,&#xD;&#xA;      &quot;parathread_cores&quot;: 0,&#xD;&#xA;      &quot;parathread_retries&quot;: 0,&#xD;&#xA;      &quot;group_rotation_frequency&quot;: 20,&#xD;&#xA;      &quot;chain_availability_period&quot;: 4,&#xD;&#xA;      &quot;thread_availability_period&quot;: 4,&#xD;&#xA;      &quot;scheduling_lookahead&quot;: 0,&#xD;&#xA;      &quot;max_validators_per_core&quot;: null,&#xD;&#xA;      &quot;max_validators&quot;: null,&#xD;&#xA;      &quot;dispute_period&quot;: 6,&#xD;&#xA;      &quot;dispute_post_conclusion_acceptance_period&quot;: 100,&#xD;&#xA;      &quot;no_show_slots&quot;: 2,&#xD;&#xA;      &quot;n_delay_tranches&quot;: 25,&#xD;&#xA;      &quot;zeroth_delay_tranche_width&quot;: 0,&#xD;&#xA;      &quot;needed_approvals&quot;: 2,&#xD;&#xA;      &quot;relay_vrf_modulo_samples&quot;: 2,&#xD;&#xA;      &quot;pvf_checking_enabled&quot;: false,&#xD;&#xA;      &quot;pvf_voting_ttl&quot;: 2,&#xD;&#xA;      &quot;minimum_validation_upgrade_delay&quot;: 5&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;paras&quot;: {&#xD;&#xA;    &quot;paras&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;hrmp&quot;: {&#xD;&#xA;    &quot;preopenHrmpChannels&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;xcmPallet&quot;: {&#xD;&#xA;    &quot;safeXcmVersion&quot;: 3&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32137" PostHistoryTypeId="2" PostId="8180" RevisionGUID="0aa6c7f9-bea4-4f77-9606-fa0992f97146" CreationDate="2023-04-19T13:13:38.927" UserId="29" Text="I want to setup my own custom Relay chain for development purposes.&#xD;&#xA;&#xD;&#xA;Is there a way to generate a `local` chain spec for Polkadot (Rococo) something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot build-spec --disable-default-bootnode --chain local &gt; localCustomSpec.json&#xD;&#xA;Error:&#xD;&#xA;   0: Invalid input: Error opening spec file `local`: No such file or directory (os error 2)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I do this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot build-spec --disable-default-bootnode --chain rococo-local &gt; rococoLocalCustomSpec.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It gives me all the dev keys i.e. Alice, Bob, etc configured in the chain spec. &#xD;&#xA;&#xD;&#xA;I want it with no keys so I can add my own custom keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="32139" PostHistoryTypeId="1" PostId="8180" RevisionGUID="0aa6c7f9-bea4-4f77-9606-fa0992f97146" CreationDate="2023-04-19T13:13:38.927" UserId="29" Text="How to create a Polkadot chain spec for development purposes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32140" PostHistoryTypeId="3" PostId="8180" RevisionGUID="0aa6c7f9-bea4-4f77-9606-fa0992f97146" CreationDate="2023-04-19T13:13:38.927" UserId="29" Text="|polkadot|relay-chain|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32141" PostHistoryTypeId="52" PostId="8164" RevisionGUID="b9c8b4e0-dfc9-4e1e-8882-7b18bf366a23" CreationDate="2023-04-19T13:28:38.320" />
  <row Id="32142" PostHistoryTypeId="2" PostId="8181" RevisionGUID="11cfd02d-a715-4533-8783-ba3145e0b088" CreationDate="2023-04-19T14:00:54.807" UserId="354" Text="Yes you can remove those keys in `customSpec.json` but it will still show in polkadot-js explorer, you need to remove it in the `chain_spec.rs` you can find it here https://github.com/paritytech/polkadot/blob/a6cfdb16e9a69259ee824fa0aa60c36e4c63f3fa/node/service/src/chain_spec.rs#L1897-L1917 " ContentLicense="CC BY-SA 4.0" />
  <row Id="32144" PostHistoryTypeId="2" PostId="8182" RevisionGUID="6fd7f55d-1b8e-4c06-94fc-67ed45ab96a7" CreationDate="2023-04-19T14:08:09.097" UserId="3708" Text="I changed the astar-dev id to 2006 and It worked. " ContentLicense="CC BY-SA 4.0" />
  <row Id="32146" PostHistoryTypeId="2" PostId="8183" RevisionGUID="0be6d81e-9d2d-4fb6-b1ef-a50dcb2ae298" CreationDate="2023-04-19T14:10:19.620" UserId="2960" Text="I am trying to run cargo update but I keep getting this error&#xD;&#xA;&#xD;&#xA;error: no matching package named `sp-beefy` found&#xD;&#xA;location searched: https://github.com/paritytech/substrate?branch=master&#xD;&#xA;required by package `bp-beefy v0.1.0  &#xD;&#xA;&#xD;&#xA;solo-para-bridge-poc/primitives/beefy)`&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32148" PostHistoryTypeId="1" PostId="8183" RevisionGUID="0be6d81e-9d2d-4fb6-b1ef-a50dcb2ae298" CreationDate="2023-04-19T14:10:19.620" UserId="2960" Text="Cargo update error - &quot; no matching package named `sp-beefy` found&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32149" PostHistoryTypeId="3" PostId="8183" RevisionGUID="0be6d81e-9d2d-4fb6-b1ef-a50dcb2ae298" CreationDate="2023-04-19T14:10:19.620" UserId="2960" Text="|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32150" PostHistoryTypeId="5" PostId="8178" RevisionGUID="4863dd64-9c61-4bae-abc5-b693acf4f8f5" CreationDate="2023-04-19T14:34:38.417" UserId="94" Comment="added 420 characters in body" Text="Currently the pallet `GenesisConfig` nor the aggregated `GenesisConfig` implement `Debug`.&#xD;&#xA;A change to FRAME would be needed to also expand this derive ([#13955](https://github.com/paritytech/substrate/issues/13955)). Could definitely be done, but could break some existing downstream code that has non-`Debug` fields in their Configs.&#xD;&#xA;&#xD;&#xA;You can additionally implement stuff on the `GenesisConfig` in the same module as the `construct_runtime!` - *should* work. So that could also work for `Debug` (did not try).&#xD;&#xA;&#xD;&#xA;Anyway, you can also use `serde_json` to encode and &quot;print&quot; it.  &#xD;&#xA;For example the Polkadot testnet config (minus WASM blob) looks like this:  &#xD;&#xA;&#xD;&#xA;```pre&#xD;&#xA;{&#xD;&#xA;  &quot;system&quot;: {&#xD;&#xA;    &quot;code&quot;: &quot;0x&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;babe&quot;: {&#xD;&#xA;    &quot;authorities&quot;: [],&#xD;&#xA;    &quot;epochConfig&quot;: {&#xD;&#xA;      &quot;c&quot;: [&#xD;&#xA;        1,&#xD;&#xA;        4&#xD;&#xA;      ],&#xD;&#xA;      &quot;allowed_slots&quot;: &quot;PrimaryAndSecondaryVRFSlots&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;indices&quot;: {&#xD;&#xA;    &quot;indices&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;balances&quot;: {&#xD;&#xA;    &quot;balances&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;staking&quot;: {&#xD;&#xA;    &quot;validatorCount&quot;: 50,&#xD;&#xA;    &quot;minimumValidatorCount&quot;: 4,&#xD;&#xA;    &quot;invulnerables&quot;: [],&#xD;&#xA;    &quot;forceEra&quot;: &quot;ForceNone&quot;,&#xD;&#xA;    &quot;slashRewardFraction&quot;: 100000000,&#xD;&#xA;    &quot;canceledPayout&quot;: 0,&#xD;&#xA;    &quot;stakers&quot;: [],&#xD;&#xA;    &quot;minNominatorBond&quot;: 0,&#xD;&#xA;    &quot;minValidatorBond&quot;: 0,&#xD;&#xA;    &quot;maxValidatorCount&quot;: null,&#xD;&#xA;    &quot;maxNominatorCount&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;session&quot;: {&#xD;&#xA;    &quot;keys&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;grandpa&quot;: {&#xD;&#xA;    &quot;authorities&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;imOnline&quot;: {&#xD;&#xA;    &quot;keys&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;authorityDiscovery&quot;: {&#xD;&#xA;    &quot;keys&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;democracy&quot;: {&#xD;&#xA;    &quot;phantom&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;council&quot;: {&#xD;&#xA;    &quot;phantom&quot;: null,&#xD;&#xA;    &quot;members&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;technicalCommittee&quot;: {&#xD;&#xA;    &quot;phantom&quot;: null,&#xD;&#xA;    &quot;members&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;phragmenElection&quot;: {&#xD;&#xA;    &quot;members&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;technicalMembership&quot;: {&#xD;&#xA;    &quot;members&quot;: [],&#xD;&#xA;    &quot;phantom&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;treasury&quot;: null,&#xD;&#xA;  &quot;claims&quot;: {&#xD;&#xA;    &quot;claims&quot;: [],&#xD;&#xA;    &quot;vesting&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;vesting&quot;: {&#xD;&#xA;    &quot;vesting&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;nominationPools&quot;: {&#xD;&#xA;    &quot;minJoinBond&quot;: 0,&#xD;&#xA;    &quot;minCreateBond&quot;: 0,&#xD;&#xA;    &quot;maxPools&quot;: 16,&#xD;&#xA;    &quot;maxMembersPerPool&quot;: 32,&#xD;&#xA;    &quot;maxMembers&quot;: 512,&#xD;&#xA;    &quot;globalMaxCommission&quot;: null&#xD;&#xA;  },&#xD;&#xA;  &quot;configuration&quot;: {&#xD;&#xA;    &quot;config&quot;: {&#xD;&#xA;      &quot;max_code_size&quot;: 10485760,&#xD;&#xA;      &quot;max_head_data_size&quot;: 32768,&#xD;&#xA;      &quot;max_upward_queue_count&quot;: 8,&#xD;&#xA;      &quot;max_upward_queue_size&quot;: 1048576,&#xD;&#xA;      &quot;max_upward_message_size&quot;: 51200,&#xD;&#xA;      &quot;max_upward_message_num_per_candidate&quot;: 5,&#xD;&#xA;      &quot;hrmp_max_message_num_per_candidate&quot;: 5,&#xD;&#xA;      &quot;validation_upgrade_cooldown&quot;: 2,&#xD;&#xA;      &quot;validation_upgrade_delay&quot;: 2,&#xD;&#xA;      &quot;async_backing_params&quot;: {&#xD;&#xA;        &quot;max_candidate_depth&quot;: 0,&#xD;&#xA;        &quot;allowed_ancestry_len&quot;: 0&#xD;&#xA;      },&#xD;&#xA;      &quot;max_pov_size&quot;: 5242880,&#xD;&#xA;      &quot;max_downward_message_size&quot;: 1048576,&#xD;&#xA;      &quot;hrmp_max_parachain_outbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_max_parathread_outbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_sender_deposit&quot;: 0,&#xD;&#xA;      &quot;hrmp_recipient_deposit&quot;: 0,&#xD;&#xA;      &quot;hrmp_channel_max_capacity&quot;: 8,&#xD;&#xA;      &quot;hrmp_channel_max_total_size&quot;: 8192,&#xD;&#xA;      &quot;hrmp_max_parachain_inbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_max_parathread_inbound_channels&quot;: 4,&#xD;&#xA;      &quot;hrmp_channel_max_message_size&quot;: 1048576,&#xD;&#xA;      &quot;executor_params&quot;: [],&#xD;&#xA;      &quot;code_retention_period&quot;: 1200,&#xD;&#xA;      &quot;parathread_cores&quot;: 0,&#xD;&#xA;      &quot;parathread_retries&quot;: 0,&#xD;&#xA;      &quot;group_rotation_frequency&quot;: 20,&#xD;&#xA;      &quot;chain_availability_period&quot;: 4,&#xD;&#xA;      &quot;thread_availability_period&quot;: 4,&#xD;&#xA;      &quot;scheduling_lookahead&quot;: 0,&#xD;&#xA;      &quot;max_validators_per_core&quot;: null,&#xD;&#xA;      &quot;max_validators&quot;: null,&#xD;&#xA;      &quot;dispute_period&quot;: 6,&#xD;&#xA;      &quot;dispute_post_conclusion_acceptance_period&quot;: 100,&#xD;&#xA;      &quot;no_show_slots&quot;: 2,&#xD;&#xA;      &quot;n_delay_tranches&quot;: 25,&#xD;&#xA;      &quot;zeroth_delay_tranche_width&quot;: 0,&#xD;&#xA;      &quot;needed_approvals&quot;: 2,&#xD;&#xA;      &quot;relay_vrf_modulo_samples&quot;: 2,&#xD;&#xA;      &quot;pvf_checking_enabled&quot;: false,&#xD;&#xA;      &quot;pvf_voting_ttl&quot;: 2,&#xD;&#xA;      &quot;minimum_validation_upgrade_delay&quot;: 5&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;paras&quot;: {&#xD;&#xA;    &quot;paras&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;hrmp&quot;: {&#xD;&#xA;    &quot;preopenHrmpChannels&quot;: []&#xD;&#xA;  },&#xD;&#xA;  &quot;xcmPallet&quot;: {&#xD;&#xA;    &quot;safeXcmVersion&quot;: 3&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Concretely, extending the `GenesisConfig` for Polkadot can be done like this. Note that it is only available in `std`:  &#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn extend_genesis() {&#xD;&#xA;	impl core::fmt::Debug for GenesisConfig {&#xD;&#xA;		fn fmt(&amp;self, writer: &amp;mut core::fmt::Formatter) -&gt; core::fmt::Result {&#xD;&#xA;			write!(writer, &quot;{}&quot;, serde_json::to_string_pretty(self).unwrap())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	println!(&quot;{:?}&quot;, GenesisConfig::default());&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32151" PostHistoryTypeId="5" PostId="8182" RevisionGUID="2200abc8-2799-42c2-a393-6ddebae884c1" CreationDate="2023-04-19T14:41:56.327" UserId="3708" Comment="deleted 4 characters in body" Text="I changed the first id to 2006 and It worked. " ContentLicense="CC BY-SA 4.0" />
  <row Id="32152" PostHistoryTypeId="5" PostId="8181" RevisionGUID="1180f3f5-f45f-421a-83aa-0e3b017bede8" CreationDate="2023-04-19T14:48:47.490" UserId="29" Comment="added 5 characters in body" Text="You can remove those keys in `customSpec.json` but it will still show in polkadot-js explorer. &#xD;&#xA;&#xD;&#xA;You need to remove it in the `chain_spec.rs` you can find it here: &#xD;&#xA;- https://github.com/paritytech/polkadot/blob/a6cfdb16e9a69259ee824fa0aa60c36e4c63f3fa/node/service/src/chain_spec.rs#L1897-L1917 " ContentLicense="CC BY-SA 4.0" />
  <row Id="32153" PostHistoryTypeId="2" PostId="8184" RevisionGUID="536e9588-b2f8-4c30-a425-804ed5d0a71a" CreationDate="2023-04-19T15:11:57.553" UserId="548" Text="In order to sign the `mintData` object, you would need to get its encoded version first. The easiest way to do this is to open the [mintPreSigned extrinsic's form][1] and fill it with the data:&#xD;&#xA;&#xD;&#xA;[![mintPreSigned form][2]][2]&#xD;&#xA;&#xD;&#xA;For the signature, select the `Sr25519` type and put a dummy signature as the value: `0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`&#xD;&#xA;&#xD;&#xA;Now, in the `encoded call data` field you should see smth like this:&#xD;&#xA;&#xD;&#xA;0x3425**7b000000c8010000040c6b65791476616c7565000000000000**01aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;&#xD;&#xA;\&#xD;&#xA;The next step would be to select and copy everything between `0x3425` and `01aaaaaaa....` (it's the encoded `mintData` object) and prefix that with `0x`.&#xD;&#xA;If we take the example above that would be `0x7b000000c8010000040c6b65791476616c7565000000000000`.&#xD;&#xA;&#xD;&#xA;\&#xD;&#xA;Now, you'll need to sign that string.\&#xD;&#xA;For that you could use a `subkey sign` command, or a simple JS script similar to this:&#xD;&#xA;```javascript&#xD;&#xA;import { Keyring } from '@polkadot/api';&#xD;&#xA;import { u8aToHex } from '@polkadot/util';&#xD;&#xA;&#xD;&#xA;const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;const pair = keyring.addFromUri('//Alice');&#xD;&#xA;const sig = pair.sign('0x7b000000c8010000040c6b65791476616c7565000000000000');&#xD;&#xA;console.log('sig hex', u8aToHex(sig));&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;P.S. Unfortunately, it's not possible to sign that object by using the PolkadotJS Extension or PolkadotJS UI (Developer -&gt; Sign message Page), since it wraps the string you enter with `&lt;Bytes&gt;&lt;/Bytes&gt;` which leads to an incorrect signature generated. This was discovered during the writing of this answer. We will try to add the support of both signing methods to the pallet and I will post an update here.&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwestmint-rpc.polkadot.io#/extrinsics&#xD;&#xA;  [2]: https://i.stack.imgur.com/Cexlw.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="32155" PostHistoryTypeId="2" PostId="8185" RevisionGUID="a8c5091c-5d0f-4f84-91b7-a8de1c43c070" CreationDate="2023-04-19T16:06:08.253" UserId="3778" Text="I've developing a pallet where I'm using the following custom data type to save a CID: `types.rs`&#xD;&#xA;```rust&#xD;&#xA;pub type CID = BoundedVec&lt;u8, ConstU32&lt;100&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to change the way I limit that boundedvec using a pallet constant as follows: `lib.rs`&#xD;&#xA;```rust&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaximunCID: Get&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;So, the final boundevec should be: `types.rs`&#xD;&#xA;```rust&#xD;&#xA;pub type CID = BoundedVec&lt;u8,  &lt;T as Config&gt;::MaximunCID&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then set the value of the constant in the runtime `lib.rs`:&#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const MaximunCID:u32 = 100;&#xD;&#xA;```&#xD;&#xA;```rust&#xD;&#xA;impl pallet_custom_pallet::Config for Runtime {&#xD;&#xA;	type MaximunCID = MaximunCID;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;### Questions:&#xD;&#xA;- Is a storage migration required to achieve it? As far as I understand, there's no change on the limit of the mentioned boundedvec. I just want to use a pallet constant to expose that limit in the API." ContentLicense="CC BY-SA 4.0" />
  <row Id="32157" PostHistoryTypeId="1" PostId="8185" RevisionGUID="a8c5091c-5d0f-4f84-91b7-a8de1c43c070" CreationDate="2023-04-19T16:06:08.253" UserId="3778" Text="Update the way to limit a boundedvec" ContentLicense="CC BY-SA 4.0" />
  <row Id="32158" PostHistoryTypeId="3" PostId="8185" RevisionGUID="a8c5091c-5d0f-4f84-91b7-a8de1c43c070" CreationDate="2023-04-19T16:06:08.253" UserId="3778" Text="|boundedvec|constants|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32159" PostHistoryTypeId="2" PostId="8186" RevisionGUID="5164cd15-b2db-44ba-a82e-cfde10f62e48" CreationDate="2023-04-19T17:07:11.703" UserId="251" Text="You don't need a migration for this. In low-level, it's just a `Vec`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Tips:&#xD;&#xA;But if your `MaximunCID` is less than 100 and you have a &quot;full&quot; `BoundedVec`, that might be an issue. So, please check the existing storage first." ContentLicense="CC BY-SA 4.0" />
  <row Id="32161" PostHistoryTypeId="5" PostId="7959" RevisionGUID="a9174556-14fb-45e5-b9ec-f92d7f972e60" CreationDate="2023-04-19T17:08:26.953" UserId="251" Comment="added 2 characters in body" Text="We are exploring how to wrap part of the runtime logic into a re-usable WASM blob that can be wrapped in a JS library.&#xD;&#xA;To do that, we are investigating using `wasm-pack` and `wasm-bindgen`. Unfortunately, `wasm-bindgen` does not support compiling for `no_std` environment, hence we are in the need of using the `std` feature while targeting the `wasm32-unknown-unknown` architecture.&#xD;&#xA;&#xD;&#xA;As I see, this does not currently seem to be possible because of the assumption that compiling for `wasm32-unknown-unknown` means compiling the runtime, which in this case is not true.&#xD;&#xA;Is there a way to do this? Or is bugging `wasm-bindgen` people to support `no_std` the best shot we have?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;   --&gt; /home/dev/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.8/src/lib.rs:263:9&#xD;&#xA;    |&#xD;&#xA;263 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported ...&#xD;&#xA;264 | |                         default, you may need to enable the \&quot;js\&quot; feature...&#xD;&#xA;265 | |                         For more information see: \&#xD;&#xA;266 | |                         https://docs.rs/getrandom/#webassembly-support...&#xD;&#xA;    | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;   --&gt; /home/dev/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.8/src/lib.rs:290:5&#xD;&#xA;    |&#xD;&#xA;290 |     imp::getrandom_inner(dest)&#xD;&#xA;    |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0433`.&#xD;&#xA;error: could not compile `getrandom` (lib) due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32162" PostHistoryTypeId="2" PostId="8187" RevisionGUID="c7964dc0-2913-4a13-8f9d-3a44dec5285d" CreationDate="2023-04-19T17:11:29.510" UserId="251" Text="I think you should extract that logic out. &#xD;&#xA;&#xD;&#xA;For example,&#xD;&#xA;&#xD;&#xA;`pallet-a -&gt; pallet-a + primitives-a/impls-a`. Get rid of the pallet/runtime framework. Then compile the `primitives-a/impls-a` to WASM." ContentLicense="CC BY-SA 4.0" />
  <row Id="32164" PostHistoryTypeId="5" PostId="8185" RevisionGUID="f972304c-1b58-47f8-b610-aeee35d1e10f" CreationDate="2023-04-19T17:39:45.170" UserId="3778" Comment="deleted 1 character in body" Text="I've developing a pallet where I'm using the following custom data type to save a CID: `types.rs`&#xD;&#xA;```rust&#xD;&#xA;pub type CID = BoundedVec&lt;u8, ConstU32&lt;100&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to change the way I limit that boundedvec using a pallet constant as follows: `lib.rs`&#xD;&#xA;```rust&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MaximunCID: Get&lt;u32&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;So, the final boundevec should be: `types.rs`&#xD;&#xA;```rust&#xD;&#xA;pub type CID = BoundedVec&lt;u8,  &lt;T as Config&gt;::MaximunCID&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then set the value of the constant in the runtime `lib.rs`:&#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const MaximunCID:u32 = 100;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```rust&#xD;&#xA;impl pallet_custom_pallet::Config for Runtime {&#xD;&#xA;	type MaximunCID = MaximunCID;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;### Questions:&#xD;&#xA;- Is a storage migration required to achieve it? As far as I understand, there's no change on the limit of the mentioned boundedvec. I just want to use a pallet constant to expose the limit in the API." ContentLicense="CC BY-SA 4.0" />
  <row Id="32165" PostHistoryTypeId="2" PostId="8188" RevisionGUID="5ae59b3c-6b2a-4efb-97c2-a28fd795c115" CreationDate="2023-04-19T17:54:51.407" UserId="94" Text="Yes this is fine. Just note that any reduction of that constant would incur a migration.  &#xD;&#xA;This may or may not be obvious to runtime developers that use your pallet, and should be documented." ContentLicense="CC BY-SA 4.0" />
  <row Id="32167" PostHistoryTypeId="5" PostId="8160" RevisionGUID="293ed743-7056-4715-a4a3-41fe55942e8e" CreationDate="2023-04-19T18:28:09.000" UserId="2722" Comment="added 16 characters in body" Text="I am working on a decentralized exchange (DEX) using the Substrate framework, and I need help with transferring non-native tokens between user accounts within the DEX.&#xD;&#xA;&#xD;&#xA;Suppose a user creates a token with smart contract for exmaple named ZZZ on my chain. My goal is to facilitate transfers of this token between users within the DEX.&#xD;&#xA;&#xD;&#xA;Can someone please provide an example or guidance on implementing non-native token transfers between user accounts in a Substrate-based DEX ? Any relevant resources or suggestions would be greatly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="32168" PostHistoryTypeId="2" PostId="8189" RevisionGUID="46178ffd-4e54-44bf-a3d8-eb84ce51514d" CreationDate="2023-04-19T20:21:35.293" UserId="3070" Text="Trying to add an ed25519 address to the chain_spec file.&#xD;&#xA;The node_template has the defaults&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;vec![get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We would like to add a custom address and we are using ed25519 and we cant seam to get it to work.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32170" PostHistoryTypeId="1" PostId="8189" RevisionGUID="46178ffd-4e54-44bf-a3d8-eb84ce51514d" CreationDate="2023-04-19T20:21:35.293" UserId="3070" Text="Add ed25519 address to chain_spec.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="32171" PostHistoryTypeId="3" PostId="8189" RevisionGUID="46178ffd-4e54-44bf-a3d8-eb84ce51514d" CreationDate="2023-04-19T20:21:35.293" UserId="3070" Text="|substrate-node-template|nodes|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32172" PostHistoryTypeId="2" PostId="8190" RevisionGUID="23ff5171-7c57-47fc-aba7-3fdfc46af2ba" CreationDate="2023-04-20T01:13:49.910" UserId="3960" Text="I'm trying to use ```sp_std::collections::btree_map::BTreeMap``` for offchain worker Local Storage.&#xD;&#xA;&#xD;&#xA;While &#xD;&#xA;``` &#xD;&#xA;let foo = StorageValueRef::persistent(b&quot;bar::foo&quot;);&#xD;&#xA;foo.get::&lt;BTreeMap&lt;u32, u32&gt;&gt;();&#xD;&#xA;```&#xD;&#xA;compiles,&#xD;&#xA;&#xD;&#xA;when a custom struct is used as a key as follows:&#xD;&#xA;```&#xD;&#xA;use sp_core::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug)]&#xD;&#xA;struct Foo(u32);&#xD;&#xA;&#xD;&#xA;let foo = StorageValueRef::persistent(b&quot;bar::foo&quot;);&#xD;&#xA;foo.get::&lt;BTreeMap&lt;Foo, u32&gt;&gt;();&#xD;&#xA;```&#xD;&#xA;compilation fails due to:&#xD;&#xA;```&#xD;&#xA;  18 |     foo.get::&lt;BTreeMap&lt;Foo, u32&gt;&gt;();&#xD;&#xA;     |               ^^^^^^^^^^^^^^^^^^ the trait `sp_core::Decode` is not implemented for `BTreeMap&lt;Foo, u32&gt;`&#xD;&#xA;     |&#xD;&#xA;     = help: the trait `sp_core::Decode` is implemented for `BTreeMap&lt;K, V&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Curiously, I can use a sp_std::vec::Vec like so&#xD;&#xA;```&#xD;&#xA;    let foo = StorageValueRef::persistent(b&quot;bar::foo&quot;);&#xD;&#xA;    foo.get::&lt;Vec&lt;(Foo, u32)&gt;&gt;();&#xD;&#xA;```&#xD;&#xA;which compiles just fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="32174" PostHistoryTypeId="1" PostId="8190" RevisionGUID="23ff5171-7c57-47fc-aba7-3fdfc46af2ba" CreationDate="2023-04-20T01:13:49.910" UserId="3960" Text="can't use BTreeMap with custom key struct for offchain Local Storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="32175" PostHistoryTypeId="3" PostId="8190" RevisionGUID="23ff5171-7c57-47fc-aba7-3fdfc46af2ba" CreationDate="2023-04-20T01:13:49.910" UserId="3960" Text="|storage|offchain|local|btreemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32176" PostHistoryTypeId="2" PostId="8191" RevisionGUID="2aca3dba-c73a-400a-8636-501d4da52e04" CreationDate="2023-04-20T02:10:28.813" UserId="251" Text="&gt; https://docs.rs/array-bytes/6.1.0/array_bytes/fn.hex_n_into_unchecked.html&#xD;&#xA;&gt; https://docs.rs/array-bytes/6.1.0/array_bytes/fn.hex2array_unchecked.html&#xD;&#xA;&gt;&#xD;&#xA;&gt; https://github.com/paritytech/substrate/blob/50de15d8740a129db9c18a6698fbd183b00326a2/bin/node/cli/src/chain_spec.rs#L90-L176&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let alice_hex_public_key = &quot;..&quot;;&#xD;&#xA;let alice: AccountId = array_bytes::hex_n_into_unchecked(alice_hex_public);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32178" PostHistoryTypeId="5" PostId="8190" RevisionGUID="0812116b-d7e2-4bad-8852-4a5c3b9d3a22" CreationDate="2023-04-20T02:12:44.790" UserId="251" Comment="added 8 characters in body" Text="I'm trying to use ```sp_std::collections::btree_map::BTreeMap``` for offchain worker Local Storage.&#xD;&#xA;&#xD;&#xA;While &#xD;&#xA;``` rs&#xD;&#xA;let foo = StorageValueRef::persistent(b&quot;bar::foo&quot;);&#xD;&#xA;foo.get::&lt;BTreeMap&lt;u32, u32&gt;&gt;();&#xD;&#xA;```&#xD;&#xA;compiles,&#xD;&#xA;&#xD;&#xA;when a custom struct is used as a key as follows:&#xD;&#xA;```rs&#xD;&#xA;use sp_core::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;#[derive(Clone, PartialEq, Eq, Encode, Decode, Debug)]&#xD;&#xA;struct Foo(u32);&#xD;&#xA;&#xD;&#xA;let foo = StorageValueRef::persistent(b&quot;bar::foo&quot;);&#xD;&#xA;foo.get::&lt;BTreeMap&lt;Foo, u32&gt;&gt;();&#xD;&#xA;```&#xD;&#xA;compilation fails due to:&#xD;&#xA;```rs&#xD;&#xA;  18 |     foo.get::&lt;BTreeMap&lt;Foo, u32&gt;&gt;();&#xD;&#xA;     |               ^^^^^^^^^^^^^^^^^^ the trait `sp_core::Decode` is not implemented for `BTreeMap&lt;Foo, u32&gt;`&#xD;&#xA;     |&#xD;&#xA;     = help: the trait `sp_core::Decode` is implemented for `BTreeMap&lt;K, V&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Curiously, I can use a sp_std::vec::Vec like so&#xD;&#xA;```rs&#xD;&#xA;    let foo = StorageValueRef::persistent(b&quot;bar::foo&quot;);&#xD;&#xA;    foo.get::&lt;Vec&lt;(Foo, u32)&gt;&gt;();&#xD;&#xA;```&#xD;&#xA;which compiles just fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="32179" PostHistoryTypeId="2" PostId="8192" RevisionGUID="85683094-c2fb-43a1-bfa3-dd0c4341a4a2" CreationDate="2023-04-20T02:24:03.440" UserId="251" Text="This line looks weird.&#xD;&#xA;```rs&#xD;&#xA;use sp_core::{Decode, Encode};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Try:&#xD;&#xA;```rs&#xD;&#xA;use codec::{Deocde, Encode}; &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32181" PostHistoryTypeId="12" PostId="8192" RevisionGUID="1d362110-1f55-45eb-a6b5-cdb03c281634" CreationDate="2023-04-20T04:20:32.617" UserId="251" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;}],&quot;DeleteType&quot;:1}" />
  <row Id="32182" PostHistoryTypeId="5" PostId="8192" RevisionGUID="46f640c8-4173-4fe4-9983-0df2a455211e" CreationDate="2023-04-20T04:25:29.750" UserId="251" Comment="added 418 characters in body" Text="&gt; https://docs.rs/parity-scale-codec/3.4.0/src/parity_scale_codec/codec.rs.html#1084-1093&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl_codec_through_iterator! {&#xD;&#xA;	BTreeMap { K: Ord, V } { LikeK, LikeV}&#xD;&#xA;		{ K: EncodeLike&lt;LikeK&gt;, LikeK: Encode, V: EncodeLike&lt;LikeV&gt;, LikeV: Encode }&#xD;&#xA;	BTreeSet { T: Ord } { LikeT }&#xD;&#xA;		{ T: EncodeLike&lt;LikeT&gt;, LikeT: Encode }&#xD;&#xA;	LinkedList { T } { LikeT }&#xD;&#xA;		{ T: EncodeLike&lt;LikeT&gt;, LikeT: Encode }&#xD;&#xA;	BinaryHeap { T: Ord } { LikeT }&#xD;&#xA;		{ T: EncodeLike&lt;LikeT&gt;, LikeT: Encode }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It only implements for `BTreeMap&lt;K, V: Decode&gt;`.&#xD;&#xA;&#xD;&#xA;But in your case, your `K` is a Decodeable thing, which does not satisfy this implementation.&#xD;&#xA;&#xD;&#xA;`BTreeMap&lt;u32, Foo&gt;` will work." ContentLicense="CC BY-SA 4.0" />
  <row Id="32183" PostHistoryTypeId="13" PostId="8192" RevisionGUID="525ffe56-255f-4c53-84a4-69483d480749" CreationDate="2023-04-20T04:25:32.473" UserId="251" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;}]}" />
  <row Id="32184" PostHistoryTypeId="2" PostId="8193" RevisionGUID="3358e76c-cfa7-4536-8d12-9fddf4a5a69b" CreationDate="2023-04-20T06:25:40.587" UserId="3885" Text="I know ss58 public key and private key, also I have derived the EVM HS160 account from the same public key, next is how I can import that EVM HS160 Account in metamask. If I put the private key of ss58 address, It points to some different HS160 Account Address from What I have derived." ContentLicense="CC BY-SA 4.0" />
  <row Id="32186" PostHistoryTypeId="1" PostId="8193" RevisionGUID="3358e76c-cfa7-4536-8d12-9fddf4a5a69b" CreationDate="2023-04-20T06:25:40.587" UserId="3885" Text="Derived H160 address is different than showing in metamask?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32187" PostHistoryTypeId="3" PostId="8193" RevisionGUID="3358e76c-cfa7-4536-8d12-9fddf4a5a69b" CreationDate="2023-04-20T06:25:40.587" UserId="3885" Text="|polkadot|substrate-node-template|frontier|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32188" PostHistoryTypeId="2" PostId="8194" RevisionGUID="6ff1be22-78be-4882-ad27-3637dd96280e" CreationDate="2023-04-20T06:35:16.447" UserId="251" Text="It depends on the deriving algorithm.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// sr25519&#xD;&#xA;privatek --f(privatek)--&gt; publick1&#xD;&#xA;// ecdsa&#xD;&#xA;privatek --g(privatek)--&gt; publick2&#xD;&#xA;// derived ecdsa (from sr25519)&#xD;&#xA;privatek --f(privatek)--&gt; publick1 --derive(publick1)--&gt; publick3&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;During the process that I show above. IMO, `publick1 == publick3` is impossible.&#xD;&#xA;&#xD;&#xA;And I don't recommend you use the same private key everywhere." ContentLicense="CC BY-SA 4.0" />
  <row Id="32190" PostHistoryTypeId="5" PostId="8165" RevisionGUID="d23efea3-1529-4ca8-80b3-ba999f714e3a" CreationDate="2023-04-20T06:45:46.923" UserId="3317" Comment="deleted 39 characters in body" Text="As example I use the ERC20 contract where you can simply use [`fn transfer`][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/blob/ed91979c0c2442370ba2d204b3857ee62dc7dc03/erc20/lib.rs#L130" ContentLicense="CC BY-SA 4.0" />
  <row Id="32191" PostHistoryTypeId="4" PostId="8160" RevisionGUID="e9817ac3-bc5d-4ba1-812d-825513b65c0f" CreationDate="2023-04-20T06:48:31.613" UserId="3317" Comment="edited title" Text="Implementing contract token transfers between users in a Substrate-based DEX" ContentLicense="CC BY-SA 4.0" />
  <row Id="32192" PostHistoryTypeId="2" PostId="8195" RevisionGUID="37e48d97-111a-41f0-835d-3b1b625dd63d" CreationDate="2023-04-20T07:02:32.047" UserId="3885" Text="I have created keypairs for aura and grandpa and added it into customSpec file but i need to add ethereum address in customSpec file to fund it with some amount of ethereum. So, i have generated ethereum address using same SS58 address 5GnfRXtp45X48ehgSZcLf5ERwsjb8hGmUu4UePEEHTgsXhgv which is derived from this private key 0x093c6aee6ea168a659f68d2d94d932e65c825b24b3784a38a5de7c4d6cbc1f18.Then,with help of frontier node utility tool i tried to generate ethereum address with the help of same SS58 key i.e. 5GnfRXtp45X48ehgSZcLf5ERwsjb8hGmUu4UePEEHTgsXhgv and i got 0x9f370f00490b86f426f58fce00f921e41b278e9a this ethereum address  but, when i am importing this in metamask whith this 0x093c6aee6ea168a659f68d2d94d932e65c825b24b3784a38a5de7c4d6cbc1f18 private key, my metamask is showing different address (0x2eefCaf4FF8723678CC02EE97bE3382c4DD66542)." ContentLicense="CC BY-SA 4.0" />
  <row Id="32194" PostHistoryTypeId="1" PostId="8195" RevisionGUID="37e48d97-111a-41f0-835d-3b1b625dd63d" CreationDate="2023-04-20T07:02:32.047" UserId="3885" Text="Generating ethereum address from SS58 address" ContentLicense="CC BY-SA 4.0" />
  <row Id="32195" PostHistoryTypeId="3" PostId="8195" RevisionGUID="37e48d97-111a-41f0-835d-3b1b625dd63d" CreationDate="2023-04-20T07:02:32.047" UserId="3885" Text="|polkadot|substrate-node-template|frontier|frontier-node-template|frontier-workshop|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32196" PostHistoryTypeId="5" PostId="8195" RevisionGUID="1eac4516-512a-45b7-8e96-842d3bee8b8f" CreationDate="2023-04-20T07:20:15.700" UserId="251" Comment="added 12 characters in body" Text="I have created keypairs for aura and grandpa and added it into customSpec file but i need to add ethereum address in customSpec file to fund it with some amount of ethereum. So, i have generated ethereum address using same SS58 address `5GnfRXtp45X48ehgSZcLf5ERwsjb8hGmUu4UePEEHTgsXhgv` which is derived from this private key `0x093c6aee6ea168a659f68d2d94d932e65c825b24b3784a38a5de7c4d6cbc1f18`.Then,with help of frontier node utility tool i tried to generate ethereum address with the help of same SS58 key i.e. `5GnfRXtp45X48ehgSZcLf5ERwsjb8hGmUu4UePEEHTgsXhgv` and i got `0x9f370f00490b86f426f58fce00f921e41b278e9a` this ethereum address  but, when i am importing this in metamask whith this `0x093c6aee6ea168a659f68d2d94d932e65c825b24b3784a38a5de7c4d6cbc1f18` private key, my metamask is showing different address (`0x2eefCaf4FF8723678CC02EE97bE3382c4DD66542`)." ContentLicense="CC BY-SA 4.0" />
  <row Id="32198" PostHistoryTypeId="5" PostId="8050" RevisionGUID="d1423866-3871-4034-a23f-b4ab066c8fad" CreationDate="2023-04-20T07:25:56.753" UserId="4028" Comment="deleted 1 character in body" Text="I am trying to use the **libsecp256k1** library in a no-std environment and I get the following error when building the contract:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[wasm-validator error in module]  unexpected true: memory max &gt;= initial, on memory&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems like this happens while using the recover function only -&gt; The main problem is to try and recover a public key given an ethereum  signature and message.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;libsecp256k1 = { version=&quot;0.7.1&quot;, default-features = false, features = [&quot;static-context&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It looks like I need the static-context feature to be able to use the recovery function, however, after digging through the source code, it seems like recovery actually calls recovery_with_context, which actually adds an additional parameter - context, defined like this&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg(all(feature = &quot;static-context&quot;, not(feature = &quot;lazy-static-context&quot;)))]&#xD;&#xA;/// A static ECMult context.&#xD;&#xA;// Correct `pre_g` values are fed into `ECMultContext::new_from_raw`, generated by build script.&#xD;&#xA;pub static ECMULT_CONTEXT: ECMultContext =&#xD;&#xA;    unsafe { ECMultContext::new_from_raw(include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/const.rs&quot;))) };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[cfg(all(feature = &quot;static-context&quot;, not(feature = &quot;lazy-static-context&quot;)))]&#xD;&#xA;/// A static ECMultGen context.&#xD;&#xA;// Correct `prec` values are fed into `ECMultGenContext::new_from_raw`, generated by build script.&#xD;&#xA;pub static ECMULT_GEN_CONTEXT: ECMultGenContext =&#xD;&#xA;    unsafe { ECMultGenContext::new_from_raw(include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/const_gen.rs&quot;))) };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please note, that since this example is meant for the Phala Ink! environment, no standard libraries can be used. Alternatives are also welcome - I just want to extract the public key from the signature and message, as stated before.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn recover_pubkey(&amp;self, v: u8, r: Vec&lt;u8&gt;, s: Vec&lt;u8&gt;, message: Vec&lt;u8&gt;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32199" PostHistoryTypeId="2" PostId="8196" RevisionGUID="e9ff28c8-f5fc-4895-a6e0-8bbd892167a3" CreationDate="2023-04-20T07:27:48.897" UserId="251" Text="Because the generations follow different paths.&#xD;&#xA;&#xD;&#xA;Check https://substrate.stackexchange.com/questions/8193/derived-h160-address-is-different-than-showing-in-metamask.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt; https://github.com/paritytech/frontier/blob/88f3e7741cd2039b4d2a90f1b852a183861b6e18/frame/evm/src/lib.rs#L623-L626&#xD;&#xA;&gt; https://github.com/paritytech/frontier/blob/88f3e7741cd2039b4d2a90f1b852a183861b6e18/template/utils/evm-address.js#L18&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;return `0x${crypto.blake2AsHex(crypto.decodeAddress(address), 256).substring(26)}`;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It just simply hashes the Substrate public key and truncates the result. The final result is your derived address.&#xD;&#xA;&#xD;&#xA;It's totally different than you use that private key as a seed to generate an account in Metamask." ContentLicense="CC BY-SA 4.0" />
  <row Id="32201" PostHistoryTypeId="5" PostId="8165" RevisionGUID="7e01b160-3254-461b-a8b4-127516d43245" CreationDate="2023-04-20T07:33:21.243" UserId="3317" Comment="added 923 characters in body" Text="If I were you I'd start looking into how a smart contract DEX works. E.g. [uniswap v1][1] is the most straightforward. Try to understand how the DEX smart contracts interact with the token contract (e.g. ERC20). &#xD;&#xA;&#xD;&#xA;Then, because you want a &quot;Substrate-based DEX&quot; interacting with these token contracts, start looking into [chain extensions][2]. With chain extensions you can expose parts of your runtime logic to smart contracts. Because that is the hardest part; in stead of having solely smart contracts interacting with each other, you have extrinsics interacting with smart contracts (and vice versa).&#xD;&#xA;&#xD;&#xA;But a simple answer to your question is that it will come down to [transfering][3] tokens from the user to the liq pool in exchange for the other token. This `fn transfer` message will probably be called within an extrinsic (because you want a substrate-based DEX).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Uniswap/v1-contracts/tree/master/contracts&#xD;&#xA;  [2]: https://use.ink/macros-attributes/chain-extension/&#xD;&#xA;  [3]: https://github.com/paritytech/ink-examples/blob/ed91979c0c2442370ba2d204b3857ee62dc7dc03/erc20/lib.rs#L130" ContentLicense="CC BY-SA 4.0" />
  <row Id="32202" PostHistoryTypeId="5" PostId="8165" RevisionGUID="60436054-62ff-46f7-9ef3-eac3192ab83f" CreationDate="2023-04-20T08:25:20.843" UserId="3317" Comment="deleted 1 character in body" Text="If I were you I'd start looking into how a smart contract DEX works. E.g. [uniswap v1][1] is the most straightforward. Try to understand how the DEX smart contracts interact with the token contract (e.g. ERC20). &#xD;&#xA;&#xD;&#xA;Then, because you want a &quot;Substrate-based DEX&quot; interacting with these token contracts, start looking into [chain extensions][2]. With chain extensions you can expose parts of your runtime logic to smart contracts. This is the hardest part because in stead of having solely smart contracts interacting with each other, you have extrinsics interacting with smart contracts (and vice versa).&#xD;&#xA;&#xD;&#xA;But a simple answer to your question is that it will come down to [transfering][3] tokens from the user to the liq pool in exchange for the other token. This `fn transfer` message will probably be called within an extrinsic (because you want a substrate-based DEX).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Uniswap/v1-contracts/tree/master/contracts&#xD;&#xA;  [2]: https://use.ink/macros-attributes/chain-extension/&#xD;&#xA;  [3]: https://github.com/paritytech/ink-examples/blob/ed91979c0c2442370ba2d204b3857ee62dc7dc03/erc20/lib.rs#L130" ContentLicense="CC BY-SA 4.0" />
  <row Id="32203" PostHistoryTypeId="2" PostId="8197" RevisionGUID="54bc6584-1b84-44c7-8319-51071e74dba8" CreationDate="2023-04-20T09:01:23.107" UserId="265" Text="i learned a lot in the year since asking this question. some of the things i learned were difficult to discover, but the implementation of the various configuration tweaks is easy to accomplish if you know what to look for. &#xD;&#xA;&#xD;&#xA;### tl;dr:&#xD;&#xA;you can set `ws-max-connections` to a value of `768` (with a default nginx setup, `worker_connections` is your cap) or `1024` (without nginx, the default soft ulimit is your cap) without making any other changes to a typical ubuntu server setup.&#xD;&#xA;&#xD;&#xA;if you want more from your hardware and have a higher volume of inbound connections, read on...&#xD;&#xA;&#xD;&#xA;### using higher values (like `16000`):&#xD;&#xA;&#xD;&#xA;here's my findings, whilst running substrate nodes on typical bare metal servers with ubuntu 22.04 server, nginx reverse proxy (for tls),  32gb ram, a modern 8+ core cpu and a 1+ gbps network connection (the numeric values below are the ones we use for calamari and work well with the hardware example above):&#xD;&#xA;&#xD;&#xA; - **nginx** and the `www-data` user it runs under, need to have configuration for the number of connections required and permission to open enough file handles to manage those connections:&#xD;&#xA;   - configure the number of allowable active connections in the *events* section of the nginx config. eg:&#xD;&#xA;&#xD;&#xA;     `/etc/nginx/nginx.conf`&#xD;&#xA;     ```&#xD;&#xA;     events {&#xD;&#xA;	   worker_connections 32768;&#xD;&#xA;	 }&#xD;&#xA;     ```&#xD;&#xA;   - configure the number of allowable open file handles to double the `worker_connections` value. nginx requires one for the incoming connection and another for the forward. eg:&#xD;&#xA;&#xD;&#xA;     `/etc/nginx/modules-enabled/worker_rlimit_nofile.conf`&#xD;&#xA;     ```&#xD;&#xA;     worker_rlimit_nofile 65536;&#xD;&#xA;     ```&#xD;&#xA;   - grant the nginx service account an adequate soft limit for open file handles (check the current setting with: `sudo -H -u www-data sh -c 'ulimit -nS'`, verify the hard limit is higher than your new soft limit: `sudo -H -u www-data sh -c 'ulimit -nH'`). eg:&#xD;&#xA;&#xD;&#xA;     `/etc/security/limits.d/www-data-soft-nofile.conf`&#xD;&#xA;     ```&#xD;&#xA;     www-data soft nofile 65536&#xD;&#xA;     ```&#xD;&#xA; - the **substrate node** and the user it runs under, need to have configuration for the number of connections required and permission to open enough file handles to manage those connections:&#xD;&#xA;   - configure the maximum number of websocket connections (`ws-max-connections`) in the node startup arguments. also set `max-runtime-instances` (i don't yet understand the significance of this value but `8` is default, `256` is max. 8 is not high enough for more than `ws-max-connections=1000`). [eg](https://github.com/Manta-Network/rubberneck/blob/ad0ee80/config/calamari.systems/f1/etc/systemd/system/calamari.service):&#xD;&#xA;&#xD;&#xA;     `/etc/systemd/system/substrate.service`&#xD;&#xA;     ```&#xD;&#xA;     ...&#xD;&#xA;     ExecStart=/usr/local/bin/substrate \&#xD;&#xA;     ...&#xD;&#xA;       --ws-max-connections 16000 \&#xD;&#xA;       --max-runtime-instances 256 \&#xD;&#xA;     ...&#xD;&#xA;     User=substrate&#xD;&#xA;     Group=substrate&#xD;&#xA;     ...&#xD;&#xA;     ```&#xD;&#xA;   - grant the substrate service account an adequate soft limit for open file handles (check the current setting with: `sudo -H -u substrate sh -c 'ulimit -nS'`, verify the hard limit is higher than your new soft limit: `sudo -H -u substrate sh -c 'ulimit -nH'`). eg:&#xD;&#xA;&#xD;&#xA;     `/etc/security/limits.d/substrate-soft-nofile.conf`&#xD;&#xA;     ```&#xD;&#xA;     substrate soft nofile 65536&#xD;&#xA;     ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32206" PostHistoryTypeId="50" PostId="6000" RevisionGUID="68735280-8a70-45f8-ab0d-fe20fe57be64" CreationDate="2023-04-20T10:05:10.650" UserId="-1" />
  <row Id="32207" PostHistoryTypeId="2" PostId="8198" RevisionGUID="bc636858-b007-4aa9-8102-a4b4c1364a95" CreationDate="2023-04-20T11:05:37.650" UserId="1721" Text="Check if your pallet account has enough native balance. If it has less than existential balance this error can occur" ContentLicense="CC BY-SA 4.0" />
  <row Id="32209" PostHistoryTypeId="2" PostId="8199" RevisionGUID="281023d7-0f0d-4ec7-9f05-7d1a712d2c8b" CreationDate="2023-04-20T11:21:11.240" UserId="4068" Text="As you can see in following link . I was not able to build contract using latest rust nighly ( rustc 1.70.0-nightly (17c116721 2023-03-29))  toolchain. &#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/7881/error-loading-of-original-wasm-failed&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I got the solution from git issues, here - &#xD;&#xA;https://github.com/paritytech/cargo-contract/issues/1058&#xD;&#xA;&#xD;&#xA;But now when i am trying to deploy the contract on substrate node it is not responding." ContentLicense="CC BY-SA 4.0" />
  <row Id="32211" PostHistoryTypeId="1" PostId="8199" RevisionGUID="281023d7-0f0d-4ec7-9f05-7d1a712d2c8b" CreationDate="2023-04-20T11:21:11.240" UserId="4068" Text="Unable to deploy the open-brush contracts build using toolchain nightly-2023-02-07 on substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="32212" PostHistoryTypeId="3" PostId="8199" RevisionGUID="281023d7-0f0d-4ec7-9f05-7d1a712d2c8b" CreationDate="2023-04-20T11:21:11.240" UserId="4068" Text="|ink|rust|smart-contract|substrate-contracts-node|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32213" PostHistoryTypeId="5" PostId="8197" RevisionGUID="5b1a0583-8e32-4aad-add1-c46e2f3c4578" CreationDate="2023-04-20T14:45:35.437" UserId="265" Comment="logic correction" Text="i learned a lot in the year since asking this question. some of the things i learned were difficult to discover, but the implementation of the various configuration tweaks is easy to accomplish if you know what to look for. &#xD;&#xA;&#xD;&#xA;### tl;dr:&#xD;&#xA;you can set `ws-max-connections` to a value of `512` if your os ulimit is 1024 without making any other changes to a typical ubuntu server setup.&#xD;&#xA;&#xD;&#xA;if you want more from your hardware and have a higher volume of inbound connections, read on...&#xD;&#xA;&#xD;&#xA;### using higher values (like `16000`):&#xD;&#xA;&#xD;&#xA;here's my findings, whilst running substrate nodes on typical bare metal servers with ubuntu 22.04 server, nginx reverse proxy (for tls),  32gb ram, a modern 8+ core cpu and a 1+ gbps network connection (the numeric values below are the ones we use for calamari and work well with the hardware example above):&#xD;&#xA;&#xD;&#xA; - **nginx** and the `www-data` user it runs under, need to have configuration for the number of connections required and permission to open enough file handles to manage those connections:&#xD;&#xA;   - configure the number of allowable active connections in the *events* section of the nginx config. eg:&#xD;&#xA;&#xD;&#xA;     `/etc/nginx/nginx.conf`&#xD;&#xA;     ```&#xD;&#xA;     events {&#xD;&#xA;	   worker_connections 32768;&#xD;&#xA;	 }&#xD;&#xA;     ```&#xD;&#xA;   - configure the number of allowable open file handles to double the `worker_connections` value. nginx requires one for the incoming connection and another for the forward. eg:&#xD;&#xA;&#xD;&#xA;     `/etc/nginx/modules-enabled/worker_rlimit_nofile.conf`&#xD;&#xA;     ```&#xD;&#xA;     worker_rlimit_nofile 65536;&#xD;&#xA;     ```&#xD;&#xA;   - grant the nginx service account an adequate soft limit for open file handles (check the current setting with: `sudo -H -u www-data sh -c 'ulimit -nS'`, verify the hard limit is higher than your new soft limit: `sudo -H -u www-data sh -c 'ulimit -nH'`). eg:&#xD;&#xA;&#xD;&#xA;     `/etc/security/limits.d/www-data-soft-nofile.conf`&#xD;&#xA;     ```&#xD;&#xA;     www-data soft nofile 65536&#xD;&#xA;     ```&#xD;&#xA; - the **substrate node** and the user it runs under, need to have configuration for the number of connections required and permission to open enough file handles to manage those connections:&#xD;&#xA;   - configure the maximum number of websocket connections (`ws-max-connections`) in the node startup arguments. also set `max-runtime-instances` (i don't yet understand the significance of this value but `8` is default, `256` is max. 8 is not high enough for more than `ws-max-connections=1000`). [eg](https://github.com/Manta-Network/rubberneck/blob/ad0ee80/config/calamari.systems/f1/etc/systemd/system/calamari.service):&#xD;&#xA;&#xD;&#xA;     `/etc/systemd/system/substrate.service`&#xD;&#xA;     ```&#xD;&#xA;     ...&#xD;&#xA;     ExecStart=/usr/local/bin/substrate \&#xD;&#xA;     ...&#xD;&#xA;       --ws-max-connections 16000 \&#xD;&#xA;       --max-runtime-instances 256 \&#xD;&#xA;     ...&#xD;&#xA;     User=substrate&#xD;&#xA;     Group=substrate&#xD;&#xA;     ...&#xD;&#xA;     ```&#xD;&#xA;   - grant the substrate service account an adequate soft limit for open file handles (check the current setting with: `sudo -H -u substrate sh -c 'ulimit -nS'`, verify the hard limit is higher than your new soft limit: `sudo -H -u substrate sh -c 'ulimit -nH'`). eg:&#xD;&#xA;&#xD;&#xA;     `/etc/security/limits.d/substrate-soft-nofile.conf`&#xD;&#xA;     ```&#xD;&#xA;     substrate soft nofile 65536&#xD;&#xA;     ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32214" PostHistoryTypeId="2" PostId="8200" RevisionGUID="67b9cd91-82ab-4f12-859d-ef5c0f71e5ca" CreationDate="2023-04-20T15:28:36.643" UserId="3708" Text="I'm using zombienet 1.3.43 and I built the Polkadot binary locally. I'm using macbook pro M1.&#xD;&#xA;&#xD;&#xA;config.toml:&#xD;&#xA;```&#xD;&#xA;[settings]&#xD;&#xA;timeout = 1000&#xD;&#xA;&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  ws_port = 9900&#xD;&#xA;  validator = true&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get this error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I have tested with previous versions of zombienet, the process finishes without any error:[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WQLGW.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/e8Pq1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32216" PostHistoryTypeId="1" PostId="8200" RevisionGUID="67b9cd91-82ab-4f12-859d-ef5c0f71e5ca" CreationDate="2023-04-20T15:28:36.643" UserId="3708" Text="Zombienet error running polkadot v0.9.37" ContentLicense="CC BY-SA 4.0" />
  <row Id="32217" PostHistoryTypeId="3" PostId="8200" RevisionGUID="67b9cd91-82ab-4f12-859d-ef5c0f71e5ca" CreationDate="2023-04-20T15:28:36.643" UserId="3708" Text="|polkadot|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32218" PostHistoryTypeId="5" PostId="8200" RevisionGUID="60bf695d-c38c-4463-b22c-1a7a4a5017c3" CreationDate="2023-04-20T16:00:34.310" UserId="3708" Comment="added 1296 characters in body" Text="I'm using zombienet 1.3.43 and I built the Polkadot binary locally. I'm using macbook pro M1.&#xD;&#xA;&#xD;&#xA;config.toml:&#xD;&#xA;```&#xD;&#xA;[settings]&#xD;&#xA;timeout = 1000&#xD;&#xA;&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  ws_port = 9900&#xD;&#xA;  validator = true&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get this error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I have tested with previous versions of zombienet, the process finishes without any error in console:[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Error in log:&#xD;&#xA;```&#xD;&#xA;2023-04-20 11:19:19.442  INFO main sc_cli::runner: Parity Polkadot    &#xD;&#xA;2023-04-20 11:19:19.443  INFO main sc_cli::runner: ✌️  version 0.9.37-645723987cf    &#xD;&#xA;2023-04-20 11:19:19.443  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2023    &#xD;&#xA;2023-04-20 11:19:19.443  INFO main sc_cli::runner:  Chain specification: Rococo Local Testnet    &#xD;&#xA;2023-04-20 11:19:19.443  INFO main sc_cli::runner:   Node name: alice    &#xD;&#xA;2023-04-20 11:19:19.443  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-04-20 11:19:19.443  INFO main sc_cli::runner:  Database: RocksDb at /var/folders/lc/2st7lfb94fl0_1mp5jl2s8c80000gq/T/zombie-0a02cef3367fa8a9f482d4d088ce1a17_-34666-EbTf4ChDfnO1/alice/data/chains/rococo_local_testnet/db/full    &#xD;&#xA;2023-04-20 11:19:19.443  INFO main sc_cli::runner: ⛓  Native runtime: rococo-9370 (parity-rococo-v2.0-0.tx18.au0)    &#xD;&#xA;Error: &#xD;&#xA;   0: [91mFailed to get runtime version: cannot deserialize module: UnknownOpcode(192)[0m&#xD;&#xA;&#xD;&#xA;Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.&#xD;&#xA;Run with RUST_BACKTRACE=full to include source snippets.&#xD;&#xA;2023-04-20 11:19:20.512  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WQLGW.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/e8Pq1.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32220" PostHistoryTypeId="2" PostId="8201" RevisionGUID="e69d5ebd-cfff-4882-843a-547b054aae2d" CreationDate="2023-04-20T16:55:33.440" UserId="2762" Text="The issue is not with Zombienet, is with your binary.&#xD;&#xA;&#xD;&#xA;You have to downgrade to `nightly 1.68` and build your binary again. See this previous StackExchange discussions where this was fixed: [Cannot run substrate on a fresh macbook m2][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/7714/cannot-run-substrate-on-a-fresh-macbook-m2" ContentLicense="CC BY-SA 4.0" />
  <row Id="32222" PostHistoryTypeId="5" PostId="8186" RevisionGUID="95a85569-8e52-4e08-8b68-3b0689324565" CreationDate="2023-04-20T17:00:49.670" UserId="251" Comment="added 72 characters in body" Text="You don't need a migration for this. In low-level, it's just a `Vec`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Tips:&#xD;&#xA;But if your `MaximunCID` is less than 100 and you have a &quot;full&quot; `BoundedVec`, that might be an issue. So, please check the existing storage first.&#xD;&#xA;&#xD;&#xA;BTW, you can use `WeakBoundedVec` instead of performing a migration. (if it's full)" ContentLicense="CC BY-SA 4.0" />
  <row Id="32223" PostHistoryTypeId="50" PostId="7724" RevisionGUID="1ff60aae-b5e3-45f4-b9e7-84ca7edbaa52" CreationDate="2023-04-20T17:02:05.307" UserId="-1" />
  <row Id="32224" PostHistoryTypeId="2" PostId="8202" RevisionGUID="895d1f7c-4add-47e7-9bbb-111d5e6f2f7f" CreationDate="2023-04-20T17:12:23.547" UserId="1891" Text="I would like to know how i can set up multiple bootnodes that share the same state. Would doing this require the bootnodes to share the same database? I know this is basic substrate staff but it would be helpful for a beginner like me to understand how the networking in substrate works. A detailed answer with some examples is highly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="32226" PostHistoryTypeId="1" PostId="8202" RevisionGUID="895d1f7c-4add-47e7-9bbb-111d5e6f2f7f" CreationDate="2023-04-20T17:12:23.547" UserId="1891" Text="How can I set multiple bootnodes and have them communicate with each other?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32227" PostHistoryTypeId="3" PostId="8202" RevisionGUID="895d1f7c-4add-47e7-9bbb-111d5e6f2f7f" CreationDate="2023-04-20T17:12:23.547" UserId="1891" Text="|runtime|nodes|networking|bootnode|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32228" PostHistoryTypeId="2" PostId="8203" RevisionGUID="22cc251b-2d53-4768-a9df-f8d7c8d98ffb" CreationDate="2023-04-20T18:39:44.363" UserId="494" Text="Frontier recently received support for Moonbeam's `AccountId20`: &#xD;&#xA;https://github.com/paritytech/frontier/pull/1019&#xD;&#xA;&#xD;&#xA;When trying to visualize the `Accounts` tab of PolkadotJS Apps on a local Frontier Template Node (which is using `AccountId20` by default now), I run into this:&#xD;&#xA;```&#xD;&#xA;Uncaught error. Something went wrong with the query and rendering of this component. Please supply all the details below when logging an issue, it may help in tracing the cause.&#xD;&#xA;&#xD;&#xA;createType(AccountId):: Invalid AccountId provided, expected 32 bytes, found 20&#xD;&#xA;f@https://polkadot.js.org/apps/modu.11aa8c11b71ff27c.js:50:76387&#xD;&#xA;createType@https://polkadot.js.org/apps/modu.11aa8c11b71ff27c.js:50:163159&#xD;&#xA;68087/C/&lt;@https://polkadot.js.org/apps/comm.32d65a12693478a9.js:871:1214&#xD;&#xA;B@https://polkadot.js.org/apps/comm.32d65a12693478a9.js:871:1808&#xD;&#xA;$@https://polkadot.js.org/apps/comm.32d65a12693478a9.js:871:2165&#xD;&#xA;@https://polkadot.js.org/apps/comm.32d65a12693478a9.js:921:183&#xD;&#xA;Ii@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:78769&#xD;&#xA;83426/t.useState@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:360539&#xD;&#xA;68087/P&lt;@https://polkadot.js.org/apps/comm.32d65a12693478a9.js:921:176&#xD;&#xA;Pi@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:75852&#xD;&#xA;xl@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:87473&#xD;&#xA;Pl@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:86681&#xD;&#xA;Bl@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:86286&#xD;&#xA;Ps@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:136008&#xD;&#xA;wu@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:121838&#xD;&#xA;yu@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:121766&#xD;&#xA;gu@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:121627&#xD;&#xA;iu@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:118434&#xD;&#xA;au@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:116989&#xD;&#xA;_@https://polkadot.js.org/apps/modu.78d8b73ab9b1a1c6.js:2:63065&#xD;&#xA;I@https://polkadot.js.org/apps/modu.78d8b73ab9b1a1c6.js:2:63596&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What are the necessary modifications (either on `github.com/polkadot-js/apps` or on `frontier-template-node`) in order to make this work out of the box?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32230" PostHistoryTypeId="1" PostId="8203" RevisionGUID="22cc251b-2d53-4768-a9df-f8d7c8d98ffb" CreationDate="2023-04-20T18:39:44.363" UserId="494" Text="PolkadotJS Apps can't show AccountId20 on Frontier Template Node" ContentLicense="CC BY-SA 4.0" />
  <row Id="32231" PostHistoryTypeId="3" PostId="8203" RevisionGUID="22cc251b-2d53-4768-a9df-f8d7c8d98ffb" CreationDate="2023-04-20T18:39:44.363" UserId="494" Text="|polkadot-js|frontier|frontier-node-template|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32232" PostHistoryTypeId="2" PostId="8204" RevisionGUID="85b30510-72f6-4266-962d-54478884cc0c" CreationDate="2023-04-20T19:03:31.357" UserId="3878" Text="As far as I know, Typechain allows writing some not hard scripts for deploying smart contracts, but I'm not sure that that's the thing you are searching for. Anyway, you can check it here: https://github.com/Brushfam/typechain-polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="32234" PostHistoryTypeId="5" PostId="8203" RevisionGUID="872ec2d3-6f88-4448-bd0b-798713cfec8f" CreationDate="2023-04-20T23:54:34.140" UserId="494" Comment="added 500 characters in body" Text="Frontier recently received support for Moonbeam's `AccountId20`: &#xD;&#xA;https://github.com/paritytech/frontier/pull/1019&#xD;&#xA;&#xD;&#xA;When trying to visualize the `Accounts` tab of PolkadotJS Apps on a local Frontier Template Node (which is using `AccountId20` by default now), I run into this:&#xD;&#xA;```&#xD;&#xA;Uncaught error. Something went wrong with the query and rendering of this component. Please supply all the details below when logging an issue, it may help in tracing the cause.&#xD;&#xA;&#xD;&#xA;createType(AccountId):: Invalid AccountId provided, expected 32 bytes, found 20&#xD;&#xA;f@https://polkadot.js.org/apps/modu.11aa8c11b71ff27c.js:50:76387&#xD;&#xA;createType@https://polkadot.js.org/apps/modu.11aa8c11b71ff27c.js:50:163159&#xD;&#xA;68087/C/&lt;@https://polkadot.js.org/apps/comm.32d65a12693478a9.js:871:1214&#xD;&#xA;B@https://polkadot.js.org/apps/comm.32d65a12693478a9.js:871:1808&#xD;&#xA;$@https://polkadot.js.org/apps/comm.32d65a12693478a9.js:871:2165&#xD;&#xA;@https://polkadot.js.org/apps/comm.32d65a12693478a9.js:921:183&#xD;&#xA;Ii@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:78769&#xD;&#xA;83426/t.useState@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:360539&#xD;&#xA;68087/P&lt;@https://polkadot.js.org/apps/comm.32d65a12693478a9.js:921:176&#xD;&#xA;Pi@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:75852&#xD;&#xA;xl@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:87473&#xD;&#xA;Pl@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:86681&#xD;&#xA;Bl@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:86286&#xD;&#xA;Ps@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:136008&#xD;&#xA;wu@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:121838&#xD;&#xA;yu@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:121766&#xD;&#xA;gu@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:121627&#xD;&#xA;iu@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:118434&#xD;&#xA;au@https://polkadot.js.org/apps/modu.6c9c978fa13ee45a.js:2:116989&#xD;&#xA;_@https://polkadot.js.org/apps/modu.78d8b73ab9b1a1c6.js:2:63065&#xD;&#xA;I@https://polkadot.js.org/apps/modu.78d8b73ab9b1a1c6.js:2:63596&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What are the necessary modifications (either on `github.com/polkadot-js/apps` or on `frontier-template-node`) in order to make this work out of the box?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;It was noted in the comments that this question is similar to https://substrate.stackexchange.com/questions/7775/how-do-i-use-the-accountid20-and-ethereumsignature-signer-with-polkadot-js-org, however the solution proposed there unfortunately is not enough, as [`packages/apps-config/src/settings/ethereumChains.ts` already contains `frontier-template`](https://github.com/polkadot-js/apps/blob/e774236407e3f3249dd0c538b71428068ddf3f7c/packages/apps-config/src/settings/ethereumChains.ts#L7)" ContentLicense="CC BY-SA 4.0" />
  <row Id="32235" PostHistoryTypeId="5" PostId="8203" RevisionGUID="05625b4a-74a3-40da-ad16-c6f2eea3a6e7" CreationDate="2023-04-21T00:02:00.017" UserId="494" Comment="added 500 characters in body" Text="Frontier recently received support for Moonbeam's `AccountId20`: &#xD;&#xA;https://github.com/paritytech/frontier/pull/1019&#xD;&#xA;&#xD;&#xA;So now I'm trying to use this new feature on PolkadotJS Apps.&#xD;&#xA;I'm running a Frontier Template Node (which now uses `AccountId20` by default), and I added the following JSON to `Settings`/`Developer` tab of PolkadotJS Apps:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;AccountId&quot;: &quot;EthereumAccountId&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, the `Accounts` tab is picking up Moonbeam's pre-funded accounts (`Alith`, `Baltathar`, etc), which don't really have funds on this template:&#xD;&#xA;![image](https://user-images.githubusercontent.com/9698228/233481045-5d32f52e-91b7-4bf3-91c6-9f58796ce81b.png)&#xD;&#xA;&#xD;&#xA;While [the prefunded accounts for Frontier Template Node](https://github.com/paritytech/frontier/blob/88f3e7741cd2039b4d2a90f1b852a183861b6e18/template/node/src/chain_spec.rs#L91-L94), which are simply `Alice`, `Bob`, etc, don't show up at all.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;- `Alith`: `0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac`, no balance, shows up on `Accounts` tab&#xD;&#xA;- `Alice`: `0xE04CC55ebEE1cBCE552f250e85c57B70B2E2625b`, correct balance, does not show up on `Accounts` tab&#xD;&#xA;&#xD;&#xA;What are the necessary modifications (either on `github.com/polkadot-js/apps` or on `frontier-template-node`) in order to make this work out of the box?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;edit: It was noted in the comments that this question is similar to https://substrate.stackexchange.com/questions/7775/how-do-i-use-the-accountid20-and-ethereumsignature-signer-with-polkadot-js-org, however the solution proposed there unfortunately is not enough, as [`packages/apps-config/src/settings/ethereumChains.ts` already contains `frontier-template`](https://github.com/polkadot-js/apps/blob/e774236407e3f3249dd0c538b71428068ddf3f7c/packages/apps-config/src/settings/ethereumChains.ts#L7)" ContentLicense="CC BY-SA 4.0" />
  <row Id="32236" PostHistoryTypeId="4" PostId="8203" RevisionGUID="05625b4a-74a3-40da-ad16-c6f2eea3a6e7" CreationDate="2023-04-21T00:02:00.017" UserId="494" Comment="added 500 characters in body" Text="PolkadotJS Apps shows wrong AccountId20 on Frontier Template Node" ContentLicense="CC BY-SA 4.0" />
  <row Id="32237" PostHistoryTypeId="2" PostId="8205" RevisionGUID="34fc860c-31c8-4800-a367-e5912e533876" CreationDate="2023-04-21T02:05:08.650" UserId="116" Text="I'm looking for a way to encode smart contract calls in javascript code with polkadot-js, the same way I can do it from the web UI, but I cannot find a description of the available API in the [documentation][1]&#xD;&#xA;&#xD;&#xA;1. is there a better documentation somewhere describing the methods and their arguments available somewhere?&#xD;&#xA;2. How should I use the ABI in my .contract file to encode a function call to a smart contract?&#xD;&#xA;&#xD;&#xA;The contract is written in ink and the chain uses the contracts pallet.&#xD;&#xA;&#xD;&#xA;*Parts of the functionally will use some code written in Rust and executed as wasm in the browser so if it is easier to do in no_std rust that is also an option for me*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api-contract/start" ContentLicense="CC BY-SA 4.0" />
  <row Id="32239" PostHistoryTypeId="1" PostId="8205" RevisionGUID="34fc860c-31c8-4800-a367-e5912e533876" CreationDate="2023-04-21T02:05:08.650" UserId="116" Text="Encode strings to SCALE encoded smart contract calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="32240" PostHistoryTypeId="3" PostId="8205" RevisionGUID="34fc860c-31c8-4800-a367-e5912e533876" CreationDate="2023-04-21T02:05:08.650" UserId="116" Text="|polkadot-js|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32241" PostHistoryTypeId="6" PostId="8202" RevisionGUID="9fe525ee-c343-4adb-88bf-b715cb76ef8a" CreationDate="2023-04-21T02:58:57.007" UserId="251" Comment="edited tags" Text="|nodes|networking|bootnode|live-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32242" PostHistoryTypeId="2" PostId="8206" RevisionGUID="be1c474f-a6c6-4597-b41b-1dd56b6a828f" CreationDate="2023-04-21T04:00:11.573" UserId="251" Text="1. Generate the key (two ways)&#xD;&#xA;    - Use subkey, and put the key into `&lt;DATA-DIR&gt;/chains/&lt;CHAIN-NAME&gt;/network/&lt;KEY&gt;`&#xD;&#xA;    - Run the node and stop it, the key will be created and it can be found under `&lt;DATA-DIR&gt;/chains/&lt;CHAIN-NAME&gt;/network/&lt;KEY&gt;`&#xD;&#xA;2. Read the your bootnode address&#xD;&#xA;    1. Run the node&#xD;&#xA;    2. Search the output like this&#xD;&#xA;        ```&#xD;&#xA;        [Parachain]  Discovered new external address for our node: /ip4/&lt;IP&gt;/tcp/&lt;PORT&gt;/ws/&lt;KEY&gt;&#xD;&#xA;        ````&#xD;&#xA;    3. Replace the `&lt;IP&gt;`with your ip.&#xD;&#xA;    - Note:&#xD;&#xA;        - `&lt;IP&gt;` might be a private address, that you read from the log directly, you need figure out your public ip address and make sure you have a public address&#xD;&#xA;        - if you are running a parachain, only focus on the `[Parachain]` log, not `[Relaychain]`&#xD;&#xA;        - `&lt;PORT&gt;` must be opened, without the firewall&#xD;&#xA;3. Finally, configure the bootnodes like this: https://github.com/darwinia-network/darwinia/blob/b2f5f4bb8937028d57bb8ebb5b0cafec6a37bba4/node/src/chain_spec/crab.rs#L270&#xD;&#xA;&#xD;&#xA;Tips: backup your key, once you delete the `&lt;DATA-DIR&gt;` the key will be lost, this happens a lot..." ContentLicense="CC BY-SA 4.0" />
  <row Id="32244" PostHistoryTypeId="2" PostId="8207" RevisionGUID="839db60b-53b7-4b7f-a3b6-bd183a028ba6" CreationDate="2023-04-21T07:34:35.547" UserId="3327" Text="In democracy pallet, user has to stack some token to put forward a proposal or to vote in favour of or against a proposal. How I can change this behaviour such that, some or all the tokens stacked by the user are burned instead of stacked?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32246" PostHistoryTypeId="1" PostId="8207" RevisionGUID="839db60b-53b7-4b7f-a3b6-bd183a028ba6" CreationDate="2023-04-21T07:34:35.547" UserId="3327" Text="How to modify democracy pallet to burn tokens?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32247" PostHistoryTypeId="3" PostId="8207" RevisionGUID="839db60b-53b7-4b7f-a3b6-bd183a028ba6" CreationDate="2023-04-21T07:34:35.547" UserId="3327" Text="|pallet-democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32248" PostHistoryTypeId="2" PostId="8208" RevisionGUID="a175e9e0-d5ad-4769-9210-44d02518922f" CreationDate="2023-04-21T07:57:16.197" UserId="251" Text="It isn't stuck. It has just been locked.&#xD;&#xA;&#xD;&#xA;Users can easily unlock it by:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Why do you want to burn the token? I don't that's a good idea.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ka7QM.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32250" PostHistoryTypeId="2" PostId="8209" RevisionGUID="dbcf4359-c910-45c1-b797-7e63b5386a0a" CreationDate="2023-04-21T09:05:52.550" UserId="200" Text="On [Jaco's comment][1]:&#xD;&#xA;&#xD;&#xA;1) The type lookup doesn't work because in Polkadotjs is hardcoded to the `account` namespace (`account::AccountId20`) - which is Moonbeam's - and in Frontier the type is declared in `fp_account::AccountId20`.&#xD;&#xA;2) The Alith, Baltathar.. accounts are also hardcoded for ethereum-like chains in Polkadotjs.&#xD;&#xA;&#xD;&#xA;To solve this:&#xD;&#xA;&#xD;&#xA;- PR polkadotjs to add `fp_account` namespace [here][2]&#xD;&#xA;- PR frontier to add Alith, Baltathar etc to genesis pre-funded accounts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/issues/9355#issuecomment-1517282414&#xD;&#xA;  [2]: https://github.com/polkadot-js/api/blob/abdc50f405e6d7b64c8a5f9c98371595a7d47c8f/packages/types/src/metadata/PortableRegistry/PortableRegistry.ts#L423" ContentLicense="CC BY-SA 4.0" />
  <row Id="32252" PostHistoryTypeId="2" PostId="8210" RevisionGUID="b2e6cd17-0206-4678-9a04-4c51d17e55c9" CreationDate="2023-04-21T09:25:07.103" UserId="3140" Text="This is a tool that we need in the ecosystem. You must currently do this via your own scripts + PolkadotJS, or via ContractsUI.&#xD;&#xA;&#xD;&#xA;If you or someone would like to build something like hardhat-deploy there are grants available through [use.ink/ubator/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/ubator/" ContentLicense="CC BY-SA 4.0" />
  <row Id="32254" PostHistoryTypeId="2" PostId="8211" RevisionGUID="37455fa8-8b43-4232-ae09-ed9a522c7925" CreationDate="2023-04-21T09:47:50.447" UserId="2762" Text="Technically it can be done, there might be other options but I show you two:&#xD;&#xA;&#xD;&#xA; - In the you can [Config][1] of the `pallet_democracy` you can specify your own Currency type for this pallet:&#xD;&#xA;```rs&#xD;&#xA;type Currency: ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;			+ LockableCurrency&lt;Self::AccountId, Moment = Self::BlockNumber&gt;;&#xD;&#xA;```&#xD;&#xA;And implement your traits ReservableCurrency and LockableCurrency to make them burn the tokens instead of reserve them.&#xD;&#xA;&#xD;&#xA;The node-template for example is using in its [Config][2] a trait defined in the FRAME Support pallet. You can see the implementation of this traits [here][3].&#xD;&#xA;&#xD;&#xA;- The second option is modify the pallet itself for your own use case.&#xD;&#xA;&#xD;&#xA;In the [function][4] where is doing the vote `try_vote`, you can instead of lock the currency, burn it. (See this [previous answer on Stackexchange][5]). &#xD;&#xA;Or keep the reserve token logic, and when you want to burn it Slash it with `T::Currency::slash_reserved`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is how it can be implemented in your pallet, but as the comment from AurevoirXavier is hard to see a use case where it makes sense to burn the tokens in a vote.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L235&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L949&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/master/frame/support/src/traits/tokens/currency&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L1274&#xD;&#xA;  [5]: https://substrate.stackexchange.com/a/8177/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="32256" PostHistoryTypeId="2" PostId="8212" RevisionGUID="e4d27a39-1a85-47c6-985f-ee6c95328eaf" CreationDate="2023-04-21T10:39:48.533" UserId="377" Text="Error: Service(Client(VersionInvalid(&quot;runtime requires function imports which are not present on the host: 'env:ext_benchmarking_current_time_version_1', 'env:ext_benchmarking_wipe_db_version_1', 'env:ext_benchmarking_get_read_and_written_keys_version_1', 'env:ext_benchmarking_reset_read_write_count_version_1', 'env:ext_benchmarking_commit_db_version_1', 'env:ext_benchmarking_read_write_count_version_1', 'env:ext_benchmarking_set_whitelist_version_1', 'env:ext_benchmarking_add_to_whitelist_version_1', 'env:ext_benchmarking_proof_size_version_1'&quot;)))&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am just running the solochain with the command&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;./target/release/main-node key insert --base-path  /tmp/node01 \&#xD;&#xA;--chain ./res/TestnetSpecRaw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri &lt;third_keyset-aura-secret-seed&gt; \&#xD;&#xA;--key-type aura&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;./target/release/main-node key insert --base-path  /tmp/node01 \&#xD;&#xA;--chain ./res/TestnetSpecRaw.json \&#xD;&#xA;--scheme Ed25519 \&#xD;&#xA;--suri &lt;third_keyset-granpa-secret-seed&gt; \&#xD;&#xA;--key-type gran&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;./target/release/main-node \&#xD;&#xA;  --base-path /tmp/node01 \&#xD;&#xA;  --chain ./res/TestnetSpecRaw.json \&#xD;&#xA;  --port 30333 \&#xD;&#xA;  --ws-port 9945 \&#xD;&#xA;  --rpc-port 9933 \&#xD;&#xA;  --validator \&#xD;&#xA;  --rpc-methods Unsafe \&#xD;&#xA;  --name MyNode01" ContentLicense="CC BY-SA 4.0" />
  <row Id="32258" PostHistoryTypeId="1" PostId="8212" RevisionGUID="e4d27a39-1a85-47c6-985f-ee6c95328eaf" CreationDate="2023-04-21T10:39:48.533" UserId="377" Text="How can i solve this error getting during running solochain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32259" PostHistoryTypeId="3" PostId="8212" RevisionGUID="e4d27a39-1a85-47c6-985f-ee6c95328eaf" CreationDate="2023-04-21T10:39:48.533" UserId="377" Text="|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32260" PostHistoryTypeId="5" PostId="8212" RevisionGUID="87255878-52ae-42e2-88cc-dd1ceb8b4ebe" CreationDate="2023-04-21T10:55:16.777" UserId="2762" Comment="improved formatting" Text="```&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;runtime requires function imports which are not present on the host: 'env:ext_benchmarking_current_time_version_1', 'env:ext_benchmarking_wipe_db_version_1', 'env:ext_benchmarking_get_read_and_written_keys_version_1', 'env:ext_benchmarking_reset_read_write_count_version_1', 'env:ext_benchmarking_commit_db_version_1', 'env:ext_benchmarking_read_write_count_version_1', 'env:ext_benchmarking_set_whitelist_version_1', 'env:ext_benchmarking_add_to_whitelist_version_1', 'env:ext_benchmarking_proof_size_version_1'&quot;)))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am just running the solochain with the command&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/main-node key insert --base-path  /tmp/node01 \&#xD;&#xA;--chain ./res/TestnetSpecRaw.json \&#xD;&#xA;--scheme Sr25519 \&#xD;&#xA;--suri &lt;third_keyset-aura-secret-seed&gt; \&#xD;&#xA;--key-type aura&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/main-node key insert --base-path  /tmp/node01 \&#xD;&#xA;--chain ./res/TestnetSpecRaw.json \&#xD;&#xA;--scheme Ed25519 \&#xD;&#xA;--suri &lt;third_keyset-granpa-secret-seed&gt; \&#xD;&#xA;--key-type gran&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/main-node \&#xD;&#xA;  --base-path /tmp/node01 \&#xD;&#xA;  --chain ./res/TestnetSpecRaw.json \&#xD;&#xA;  --port 30333 \&#xD;&#xA;  --ws-port 9945 \&#xD;&#xA;  --rpc-port 9933 \&#xD;&#xA;  --validator \&#xD;&#xA;  --rpc-methods Unsafe \&#xD;&#xA;  --name MyNode01&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32261" PostHistoryTypeId="2" PostId="8213" RevisionGUID="9e16a52f-41a9-4972-aa76-937ba6194456" CreationDate="2023-04-21T12:17:48.220" UserId="227" Text="Unfortunately, as far as I know, the best way currently would be to script something that under the hood uses `cargo-contract` or `polkadot-js/api`. &#xD;&#xA;&#xD;&#xA;I know this is far from ideal and we actively want to help get to a better solution. Please, if you have any requirements in `cargo-contract` that would ease this for you, just create an issue in https://github.com/paritytech/cargo-contract/issues.&#xD;&#xA;&#xD;&#xA;We will soon merge a PR for `cargo contract info`, which will enable you to query the state of a contract on-chain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="32263" PostHistoryTypeId="10" PostId="7149" RevisionGUID="04709e92-9bcf-4505-a5d9-9c82c036746c" CreationDate="2023-04-21T12:18:59.040" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[8163],&quot;Voters&quot;:[{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Nuke&quot;}]}" />
  <row Id="32264" PostHistoryTypeId="10" PostId="8195" RevisionGUID="1002edc9-a7a0-41d6-baf9-18f9a2ff8dcc" CreationDate="2023-04-21T12:20:06.537" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[8193],&quot;Voters&quot;:[{&quot;Id&quot;:2673,&quot;DisplayName&quot;:&quot;Adam Wierzbicki&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Nuke&quot;}]}" />
  <row Id="32270" PostHistoryTypeId="50" PostId="6032" RevisionGUID="c294099b-c51e-4c1a-8ccc-470a4c88ebe5" CreationDate="2023-04-21T13:01:40.203" UserId="-1" />
  <row Id="32271" PostHistoryTypeId="2" PostId="8215" RevisionGUID="f676c520-1997-40cd-85aa-4e5255845333" CreationDate="2023-04-21T13:58:55.423" UserId="4121" Text="Is there a way to benchmark an extrinsic whose expected behavior is to trigger an error?&#xD;&#xA;&#xD;&#xA;I stumbled on a project where we have two instances of the same pallet. `Instance1` will proceed normally for a given extrinsic, but `Instance2` will intentionally fail (based on runtime condition setup for this instance), triggering an error.&#xD;&#xA;&#xD;&#xA;I wonder if there is a way to benchmark the extrinsic for the failing condition and if not, how to gracefully handle this case." ContentLicense="CC BY-SA 4.0" />
  <row Id="32273" PostHistoryTypeId="1" PostId="8215" RevisionGUID="f676c520-1997-40cd-85aa-4e5255845333" CreationDate="2023-04-21T13:58:55.423" UserId="4121" Text="Benchmark failing extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="32274" PostHistoryTypeId="3" PostId="8215" RevisionGUID="f676c520-1997-40cd-85aa-4e5255845333" CreationDate="2023-04-21T13:58:55.423" UserId="4121" Text="|pallet|extrinsic|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32275" PostHistoryTypeId="52" PostId="8207" RevisionGUID="5f01cc17-55e2-4c92-b984-c3c014115043" CreationDate="2023-04-21T15:35:30.147" />
  <row Id="32276" PostHistoryTypeId="5" PostId="8062" RevisionGUID="27819292-bf77-4bb9-a23d-331bfe0393cd" CreationDate="2023-04-21T16:17:24.810" UserId="484" Comment="added 95 characters in body" Text="Try in to benchmark node pallets after Polkadot upgrade from 0.9.36 to 0.9.38 and get `cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement` error.&#xD;&#xA;&#xD;&#xA;I double checked that node and wasm runtimes are built with `runtime-benchmarks` feature.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;nix:devenv-shell) (devenv) bash-5.2$ COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full nix run .#composable-bench-node --impure -- benchmark pallet --chain=picasso-dev --pallet=&quot;*&quot; --extrinsic=&quot;*&quot;&#xD;&#xA;warning: Git tree '/home/dz/github.com/ComposableFi/composable' is dirty&#xD;&#xA;warning: Using saved setting for 'extra-substituters = https://cache.nixos.org https://nix-community.cachix.org https://nixpkgs-update.cachix.org https://devenv.cachix.org https://composable-community.cachix.org' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;warning: Using saved setting for 'extra-trusted-public-keys = composable-community.cachix.org-1:GG4xJNpXJ+J97I8EyJ4qI5tRTAJ4i7h+NK2Z32I8sK8= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 0 at #0    &#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 1 at #0    &#xD;&#xA;Error: &#xD;&#xA;   0: Invalid input: Did not find the benchmarking metadata. This could mean that you either did not build the node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was not created by a node that was compiled with the flag: cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:&#xD;&#xA;&#xD;&#xA;       * 98.06% - 72936 bytes - module functions&#xD;&#xA;   0: &#xD;&#xA;&#xD;&#xA;  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━&#xD;&#xA;   1: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::h075a91586537bb83&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   2: eyre::capture_handler::hc455214d4a0ef82b&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   3: eyre::error::&lt;impl core::convert::From&lt;E&gt; for eyre::Report&gt;::from::h9144b87cb2ba7d68&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   4: composable::main::h9794ada59db822a4&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   5: std::sys_common::backtrace::__rust_begin_short_backtrace::h97c0b3729103fb66&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   6: std::rt::lang_start::{{closure}}::h5fc4f928913452c2&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   7: std::rt::lang_start_internal::h33bb8f2385eabf94&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   8: main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   9: __libc_start_call_main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  10: __libc_start_main_alias_1&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  11: _start&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;&#xD;&#xA;Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.&#xD;&#xA;2023-04-13 03:16:40 Cannot create a runtime error=Other(&quot;cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:\n\n * 98.06% - 72936 bytes - module functions\n&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error from https://github.com/paritytech/substrate/blob/07c77323010d54410143103c2617ebc12e0a12f3/client/executor/src/wasm_runtime.rs#L271&#xD;&#xA;&#xD;&#xA;It seems related to WASM page size https://github.com/search?q=org%3Aparitytech+65536&amp;type=code . So I do not handle page size anywhere directly.&#xD;&#xA;&#xD;&#xA;Setting `--heap-pages` to various values did not helped.&#xD;&#xA;&#xD;&#xA;I got this run, &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full nix run .#composable-bench-node --impure -- benchmark pallet --chain=picasso-dev --pallet=&quot;*&quot; --extrinsic=&quot;*&quot; --execution=wasm  --no-verify --wasm-execution interpreted-i-know-what-i-do&#xD;&#xA;``` &#xD;&#xA;but sure I do not want benchmark interpreter.&#xD;&#xA;&#xD;&#xA;UPDATE: &#xD;&#xA;adding PR which fails our CI https://github.com/ComposableFi/composable/pull/3469" ContentLicense="CC BY-SA 4.0" />
  <row Id="32277" PostHistoryTypeId="5" PostId="7721" RevisionGUID="c82deff4-d3f9-4e65-9b49-7d41248b8525" CreationDate="2023-04-21T17:16:40.667" UserId="494" Comment="added 42 characters in body" Text="solved by downgrading nightly from `1.70` to `1.68`&#xD;&#xA;&#xD;&#xA;interestingly, I couldn't really downgrade by simply calling `rustup` commands&#xD;&#xA;&#xD;&#xA;I had to do `rustup install nightly-2023-01-01` to make `1.68`available, then I had to rename `~/.rustup/toolchains/nightly-2023-01-01-aarch64-apple-darwin` to `~/.rustup/toolchains/nightly-aarch64-apple-darwin`. This was the only way I could successfully downgrade nightly." ContentLicense="CC BY-SA 4.0" />
  <row Id="32278" PostHistoryTypeId="5" PostId="8062" RevisionGUID="df20c4b4-e084-42dc-a449-f86568cf610f" CreationDate="2023-04-21T17:37:59.293" UserId="484" Comment="added 415 characters in body" Text="Try in to benchmark node pallets after Polkadot upgrade from 0.9.36 to 0.9.38 and get `cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement` error.&#xD;&#xA;&#xD;&#xA;I double checked that node and wasm runtimes are built with `runtime-benchmarks` feature.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;nix:devenv-shell) (devenv) bash-5.2$ COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full nix run .#composable-bench-node --impure -- benchmark pallet --chain=picasso-dev --pallet=&quot;*&quot; --extrinsic=&quot;*&quot;&#xD;&#xA;warning: Git tree '/home/dz/github.com/ComposableFi/composable' is dirty&#xD;&#xA;warning: Using saved setting for 'extra-substituters = https://cache.nixos.org https://nix-community.cachix.org https://nixpkgs-update.cachix.org https://devenv.cachix.org https://composable-community.cachix.org' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;warning: Using saved setting for 'extra-trusted-public-keys = composable-community.cachix.org-1:GG4xJNpXJ+J97I8EyJ4qI5tRTAJ4i7h+NK2Z32I8sK8= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=' from ~/.local/share/nix/trusted-settings.json.&#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 0 at #0    &#xD;&#xA;2023-04-13 03:16:39 assembling new collators for new session 1 at #0    &#xD;&#xA;Error: &#xD;&#xA;   0: Invalid input: Did not find the benchmarking metadata. This could mean that you either did not build the node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was not created by a node that was compiled with the flag: cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:&#xD;&#xA;&#xD;&#xA;       * 98.06% - 72936 bytes - module functions&#xD;&#xA;   0: &#xD;&#xA;&#xD;&#xA;  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━&#xD;&#xA;   1: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::h075a91586537bb83&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   2: eyre::capture_handler::hc455214d4a0ef82b&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   3: eyre::error::&lt;impl core::convert::From&lt;E&gt; for eyre::Report&gt;::from::h9144b87cb2ba7d68&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   4: composable::main::h9794ada59db822a4&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   5: std::sys_common::backtrace::__rust_begin_short_backtrace::h97c0b3729103fb66&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   6: std::rt::lang_start::{{closure}}::h5fc4f928913452c2&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   7: std::rt::lang_start_internal::h33bb8f2385eabf94&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   8: main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   9: __libc_start_call_main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  10: __libc_start_main_alias_1&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  11: _start&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;&#xD;&#xA;Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.&#xD;&#xA;2023-04-13 03:16:40 Cannot create a runtime error=Other(&quot;cannot create module: instance allocation for this module requires 74376 bytes which exceeds the configured maximum of 65536 bytes; breakdown of allocation requirement:\n\n * 98.06% - 72936 bytes - module functions\n&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error from https://github.com/paritytech/substrate/blob/07c77323010d54410143103c2617ebc12e0a12f3/client/executor/src/wasm_runtime.rs#L271&#xD;&#xA;&#xD;&#xA;It seems related to WASM page size https://github.com/search?q=org%3Aparitytech+65536&amp;type=code . So I do not handle page size anywhere directly.&#xD;&#xA;&#xD;&#xA;Setting `--heap-pages` to various values did not helped.&#xD;&#xA;&#xD;&#xA;I got this run, &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full nix run .#composable-bench-node --impure -- benchmark pallet --chain=picasso-dev --pallet=&quot;*&quot; --extrinsic=&quot;*&quot; --execution=wasm  --no-verify --wasm-execution interpreted-i-know-what-i-do&#xD;&#xA;``` &#xD;&#xA;but sure I do not want benchmark interpreter.&#xD;&#xA;&#xD;&#xA;UPDATE: &#xD;&#xA;adding PR which fails our CI https://github.com/ComposableFi/composable/pull/3469&#xD;&#xA;&#xD;&#xA;https://github.com/ComposableFi/composable/actions/runs/4766804685/jobs/8474290562?pr=3469&#xD;&#xA;&#xD;&#xA;UPDATE2:&#xD;&#xA;&#xD;&#xA;Install  https://zero-to-nix.com/ (it is easy unisntall)&#xD;&#xA;&#xD;&#xA;Run &#xD;&#xA;```&#xD;&#xA;COLORBT_SHOW_HIDDEN=1 RUST_BACKTRACE=full nix run .#composable-bench-node --impure -- benchmark pallet --chain=picasso-dev --pallet=&quot;*&quot; --extrinsic=&quot;*&quot; --execution=wasm  --no-verify --wasm-execution compiled&#xD;&#xA;```&#xD;&#xA;to see issue&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32279" PostHistoryTypeId="2" PostId="8216" RevisionGUID="5d08f1d9-bc99-4523-ba93-d02abe3f4c7d" CreationDate="2023-04-21T17:41:23.860" UserId="4124" Text="I'm looking for guidance on how to best stub the win.injectedWeb3 object that's usually created by Polkadot{.js}. This is so that I can write some automated tests for a dApp  frontend in Cypress w/ typescript (and then automatically sign transactions etc). &#xD;&#xA;&#xD;&#xA;It seems like I need to utilize `injectExtension` from `@polkadot/extension-inject` but currently struggling to implement it properly to use a stub. &#xD;&#xA;&#xD;&#xA;I'm sure other dApp builders wanting to add some UI automation have encountered this same challenge so wondered if a recommend approach already existed? &#xD;&#xA;&#xD;&#xA;Welcoming any suggestions or pointers in the right direction, thanks in advance " ContentLicense="CC BY-SA 4.0" />
  <row Id="32281" PostHistoryTypeId="1" PostId="8216" RevisionGUID="5d08f1d9-bc99-4523-ba93-d02abe3f4c7d" CreationDate="2023-04-21T17:41:23.860" UserId="4124" Text="How to stub win.injectedWeb3 for testing dApp with Cypress?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32282" PostHistoryTypeId="3" PostId="8216" RevisionGUID="5d08f1d9-bc99-4523-ba93-d02abe3f4c7d" CreationDate="2023-04-21T17:41:23.860" UserId="4124" Text="|testing|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32283" PostHistoryTypeId="2" PostId="8217" RevisionGUID="c1090154-f957-458c-bdcc-3fc97d26ffab" CreationDate="2023-04-21T23:06:07.600" UserId="73" Text="The solution to your problem is to include the pr created by one of your colleagues: https://github.com/paritytech/substrate/pull/13298" ContentLicense="CC BY-SA 4.0" />
  <row Id="32286" PostHistoryTypeId="2" PostId="8218" RevisionGUID="48669d74-81bf-49cc-b264-33472aab466a" CreationDate="2023-04-22T07:36:39.847" UserId="3559" Text="`use ink_lang::contract;&#xD;&#xA;&#xD;&#xA;#[contract]&#xD;&#xA;mod sqrt_contract {&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct SqrtContract {}&#xD;&#xA;&#xD;&#xA;    impl SqrtContract {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            Self {}&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn calculate_sqrt(&amp;self, num: u64) -&gt; u64 {&#xD;&#xA;            ink_core::math::sqrt(num)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}`&#xD;&#xA;&#xD;&#xA;Keep in mind that Ink! is a statically-typed language, so you'll need to specify the data type of the input and output values. Also note that the sqrt function may not be available in all versions of Ink!, so make sure to check the documentation for your specific version." ContentLicense="CC BY-SA 4.0" />
  <row Id="32288" PostHistoryTypeId="2" PostId="8219" RevisionGUID="a665def0-dcf2-46f3-96d6-38b15c97f4d5" CreationDate="2023-04-22T08:44:18.453" UserId="29" Text="I'm attempting to integrate try-runtime into substrate-contracts-node and I get the following error when I call `Executive::try_runtime_upgrade()`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Compiling contracts-node-runtime v0.24.0 (/Users/bruno/src/substrate-contracts-node/runtime)&#xD;&#xA;  error[E0599]: the function or associated item `try_runtime_upgrade` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, ...&gt;, ..., ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /Users/bruno/src/substrate-contracts-node/runtime/src/lib.rs:600:28&#xD;&#xA;      |&#xD;&#xA;  600 |             let weight = Executive::try_runtime_upgrade(checks).unwrap();&#xD;&#xA;      |                                     ^^^^^^^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/Users/bruno/src/substrate-contracts-node/target/release/wbuild/contracts-node-runtime/target/wasm32-unknown-unknown/release/deps/contracts_node_runtime-51f958c1a37e4242.long-type-8782138364158150179.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `(frame_system::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_randomness_collective_flip::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_sudo::Pallet&lt;Runtime&gt;, pallet_contracts::Pallet&lt;Runtime&gt;, pallet_assets::Pallet&lt;Runtime&gt;): hidden_include::traits::TryState&lt;u32&gt;`&#xD;&#xA;&#xD;&#xA;  error[E0599]: the function or associated item `try_execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, ...&gt;, ..., ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /Users/bruno/src/substrate-contracts-node/runtime/src/lib.rs:612:15&#xD;&#xA;      |&#xD;&#xA;  612 |             Executive::try_execute_block(block, state_root_check, signature_check, select).expect(&quot;execute-block failed&quot;)&#xD;&#xA;      |                        ^^^^^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/Users/bruno/src/substrate-contracts-node/target/release/wbuild/contracts-node-runtime/target/wasm32-unknown-unknown/release/deps/contracts_node_runtime-51f958c1a37e4242.long-type-8782138364158150179.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `(frame_system::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_randomness_collective_flip::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_sudo::Pallet&lt;Runtime&gt;, pallet_contracts::Pallet&lt;Runtime&gt;, pallet_assets::Pallet&lt;Runtime&gt;): hidden_include::traits::TryState&lt;u32&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here all the code changes that I have done:&#xD;&#xA;- https://github.com/paritytech/substrate-contracts-node/commit/0b2473a37ba540fac4af780e98faca521d9807f6" ContentLicense="CC BY-SA 4.0" />
  <row Id="32290" PostHistoryTypeId="1" PostId="8219" RevisionGUID="a665def0-dcf2-46f3-96d6-38b15c97f4d5" CreationDate="2023-04-22T08:44:18.453" UserId="29" Text="trait bounds not satisfied with Executive::try_runtime_upgrade()" ContentLicense="CC BY-SA 4.0" />
  <row Id="32291" PostHistoryTypeId="3" PostId="8219" RevisionGUID="a665def0-dcf2-46f3-96d6-38b15c97f4d5" CreationDate="2023-04-22T08:44:18.453" UserId="29" Text="|substrate-contracts-node|try-runtime|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32292" PostHistoryTypeId="2" PostId="8220" RevisionGUID="3b545f16-0384-4f86-91d6-095217d73691" CreationDate="2023-04-22T11:52:51.870" UserId="94" Text="You are missing features on the pallet crates.  &#xD;&#xA;The following patch fixed this:  &#xD;&#xA;```patch&#xD;&#xA;diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml&#xD;&#xA;index 9a8d59f..4eebddd 100644&#xD;&#xA;--- a/runtime/Cargo.toml&#xD;&#xA;+++ b/runtime/Cargo.toml&#xD;&#xA;@@ -94,9 +94,13 @@ try-runtime = [&#xD;&#xA; 	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA; 	&quot;frame-system/try-runtime&quot;,&#xD;&#xA; 	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;+	&quot;pallet-assets/try-runtime&quot;,&#xD;&#xA; 	&quot;pallet-authorship/try-runtime&quot;,&#xD;&#xA; 	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;+	&quot;pallet-contracts/try-runtime&quot;,&#xD;&#xA;+	&quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA; 	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA; 	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA; 	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;+	&quot;pallet-utility/try-runtime&quot;,&#xD;&#xA; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it is a duplicate of &quot;https://substrate.stackexchange.com/questions/6576/allpalletswithsystem-trait-not-implemented-for-executive-when-running-tests&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="32294" PostHistoryTypeId="5" PostId="8220" RevisionGUID="90c10393-7d99-48a0-8bed-8fa54c1e6b0b" CreationDate="2023-04-22T12:24:15.807" UserId="94" Comment="deleted 2 characters in body" Text="You are missing features on the pallet crates.  &#xD;&#xA;The following patch fixed this:  &#xD;&#xA;```patch&#xD;&#xA;diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml&#xD;&#xA;index 9a8d59f..4eebddd 100644&#xD;&#xA;--- a/runtime/Cargo.toml&#xD;&#xA;+++ b/runtime/Cargo.toml&#xD;&#xA;@@ -94,9 +94,13 @@ try-runtime = [&#xD;&#xA; 	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA; 	&quot;frame-system/try-runtime&quot;,&#xD;&#xA; 	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;+	&quot;pallet-assets/try-runtime&quot;,&#xD;&#xA; 	&quot;pallet-authorship/try-runtime&quot;,&#xD;&#xA; 	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;+	&quot;pallet-contracts/try-runtime&quot;,&#xD;&#xA;+	&quot;pallet-randomness-collective-flip/try-runtime&quot;,&#xD;&#xA; 	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA; 	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA; 	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;+	&quot;pallet-utility/try-runtime&quot;,&#xD;&#xA; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it is a duplicate of https://substrate.stackexchange.com/questions/6576/allpalletswithsystem-trait-not-implemented-for-executive-when-running-tests." ContentLicense="CC BY-SA 4.0" />
  <row Id="32297" PostHistoryTypeId="2" PostId="8221" RevisionGUID="fdf66ca1-d809-4b3f-a609-12602c82efcd" CreationDate="2023-04-22T21:19:52.433" UserId="4096" Text="I have been having series of errors and i have not been able to find solution online. Please can anyone help me? I want to prompt users to connect wallet i.e when the connect button is clicked talisman, polkadotjs etc should pop up for confirmation. &#xD;&#xA;&#xD;&#xA;This is the function: &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```async function handleConnect () {&#xD;&#xA;  const provider = new WsProvider(WS_SECOND_ENDPOINT);&#xD;&#xA;  const oneApi = await ApiPromise.create({ provider });&#xD;&#xA;  const [chain, nodeName, nodeVersion] = await Promise.all([&#xD;&#xA;    oneApi.rpc.system.chain(),&#xD;&#xA;    oneApi.rpc.system.name(),&#xD;&#xA;    oneApi.rpc.system.version()&#xD;&#xA;  ]);&#xD;&#xA;await oneApi.connect();&#xD;&#xA;  console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`);&#xD;&#xA;}```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;when i remove ```await oneApi.connect();``` i get the error below on the console:&#xD;&#xA;&#xD;&#xA;```caught (in promise) Error: WebSocket is already connected&#xD;&#xA;    at WsProvider.connect (index.js:314:19)&#xD;&#xA;    at RpcCore.connect (bundle.js:91:30)&#xD;&#xA;    at ApiPromise.connect (index.js:29:30)&#xD;&#xA;    at newTest (App.tsx:49:14)```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5lX6f.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/jirxr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32299" PostHistoryTypeId="1" PostId="8221" RevisionGUID="fdf66ca1-d809-4b3f-a609-12602c82efcd" CreationDate="2023-04-22T21:19:52.433" UserId="4096" Text="Cannot prompt wallet to connect" ContentLicense="CC BY-SA 4.0" />
  <row Id="32300" PostHistoryTypeId="3" PostId="8221" RevisionGUID="fdf66ca1-d809-4b3f-a609-12602c82efcd" CreationDate="2023-04-22T21:19:52.433" UserId="4096" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32301" PostHistoryTypeId="50" PostId="5543" RevisionGUID="258c317f-a90a-49c6-a294-d989e3d13f5c" CreationDate="2023-04-22T23:05:30.593" UserId="-1" />
  <row Id="32302" PostHistoryTypeId="2" PostId="8222" RevisionGUID="590ec074-1eb7-4d7a-86ba-57c61e8704e2" CreationDate="2023-04-23T02:18:44.757" UserId="2844" Text="I am adding asset pallet to the runtime. When I try to interact with it with `sudo &gt; asset &gt; create`, I got `error: BadOrigin` issue. Can someone please help me why I am getting this issue.&#xD;&#xA;&#xD;&#xA;I found this in [stackexchange](https://substrate.stackexchange.com/questions/1941/sudobridgerococograndpa-setowner-call-resulting-in-badorigin-error) but it doesn't help me.&#xD;&#xA;&#xD;&#xA;I also try with not-root account but it didn't help.&#xD;&#xA;&#xD;&#xA;I have posted error image link [here](https://drive.google.com/file/d/1PzSdA9YIc7QHEjtZPRw6nhOt5Y3KLabW/view?usp=sharing)" ContentLicense="CC BY-SA 4.0" />
  <row Id="32304" PostHistoryTypeId="1" PostId="8222" RevisionGUID="590ec074-1eb7-4d7a-86ba-57c61e8704e2" CreationDate="2023-04-23T02:18:44.757" UserId="2844" Text="sudo.Sudid Error: BadOrigin on polkadotjs" ContentLicense="CC BY-SA 4.0" />
  <row Id="32305" PostHistoryTypeId="3" PostId="8222" RevisionGUID="590ec074-1eb7-4d7a-86ba-57c61e8704e2" CreationDate="2023-04-23T02:18:44.757" UserId="2844" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32306" PostHistoryTypeId="2" PostId="8223" RevisionGUID="bcf7c1a8-eaae-4915-bd41-cc9dfd3eb39a" CreationDate="2023-04-23T03:09:17.700" UserId="251" Text="It requires `CreateOrigin`. https://github.com/paritytech/substrate/blob/c7d26dcf3d6c19fa7dcbd1f2633e337e5a5cbc40/frame/assets/src/lib.rs#L601&#xD;&#xA;&#xD;&#xA;And the default configuration is not `EnsureRoot` if you are using the template. https://github.com/paritytech/substrate/blob/c7d26dcf3d6c19fa7dcbd1f2633e337e5a5cbc40/bin/node/runtime/src/lib.rs#L1488&#xD;&#xA;&#xD;&#xA;Please check what you have configured to the `CreateOrigin` and use the proper origin from the PolkadotJS." ContentLicense="CC BY-SA 4.0" />
  <row Id="32308" PostHistoryTypeId="2" PostId="8224" RevisionGUID="0f988b46-424a-4aa0-9502-dbe06a913c27" CreationDate="2023-04-23T03:32:05.613" UserId="3598" Text="I have a rococo collator running on aws eks that keeps failing, here are the logs:&#xD;&#xA;```&#xD;&#xA;2023-04-23 01:49:19 [Parachain]  Idle (0 peers), best: #0 (0x3865…1210), finalized #0 (0x3865…1210), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;candidate-validation-subsystem&quot; err=FromOrigin { origin: &quot;candidate-validation&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Overseer exited with error err=Generated(SubsystemStalled(&quot;availability-store-subsystem&quot;))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;dispute-coordinator-subsystem&quot; err=FromOrigin { origin: &quot;dispute-coordinator&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Essential task `overseer` failed. Shutting down service.    &#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;approval-voting-subsystem&quot; err=FromOrigin { origin: &quot;approval-voting&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;bitfield-signing-subsystem&quot; err=FromOrigin { origin: &quot;bitfield-signing&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] err=Subsystem(Generated(Context(&quot;Signal channel is terminated and empty.&quot;)))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;availability-recovery-subsystem&quot; err=FromOrigin { origin: &quot;availability-recovery&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;statement-distribution-subsystem&quot; err=FromOrigin { origin: &quot;statement-distribution&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Failed to receive a message from Overseer, exiting err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;network-bridge-rx-subsystem&quot; err=FromOrigin { origin: &quot;network-bridge&quot;, source: SubsystemError(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;chain-api-subsystem&quot; err=FromOrigin { origin: &quot;chain-api&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;runtime-api-subsystem&quot; err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;))```&#xD;&#xA;&#xD;&#xA;The parachain is not producing blocks yet. &#xD;&#xA;&#xD;&#xA;These are the parameters I'm passing to the binary:&#xD;&#xA;```--collator --base-path /var/www/collator-data/ --force-authoring --ws-port 9946 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --chain /var/www/substrate/resources/collator-raw-spec.json -- --execution wasm --base-path /var/www/relay-data/ --chain /var/www/substrate/resources/rococo.json --port 30333 --ws-port 9944 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --wasm-execution Compiled --pruning 10000```&#xD;&#xA;&#xD;&#xA;I've tried running it in different instance types, even c6id.2xlarge instance, but with the same results.&#xD;&#xA;&#xD;&#xA;The strange thing is that I'm also running a collator for polakdot and that one is running without any issues.&#xD;&#xA;&#xD;&#xA;Does anyone know what could be the cause of the issue?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32310" PostHistoryTypeId="1" PostId="8224" RevisionGUID="0f988b46-424a-4aa0-9502-dbe06a913c27" CreationDate="2023-04-23T03:32:05.613" UserId="3598" Text="Rococo collator running on aws eks fails and restart every few minutes" ContentLicense="CC BY-SA 4.0" />
  <row Id="32311" PostHistoryTypeId="3" PostId="8224" RevisionGUID="0f988b46-424a-4aa0-9502-dbe06a913c27" CreationDate="2023-04-23T03:32:05.613" UserId="3598" Text="|polkadot|rococo|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32312" PostHistoryTypeId="5" PostId="8224" RevisionGUID="fd531efd-260c-44b5-bd2f-422ac76bdc7f" CreationDate="2023-04-23T05:25:03.360" UserId="251" Comment="added 8 characters in body" Text="I have a rococo collator running on aws eks that keeps failing, here are the logs:&#xD;&#xA;```&#xD;&#xA;2023-04-23 01:49:19 [Parachain]  Idle (0 peers), best: #0 (0x3865…1210), finalized #0 (0x3865…1210), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;candidate-validation-subsystem&quot; err=FromOrigin { origin: &quot;candidate-validation&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Overseer exited with error err=Generated(SubsystemStalled(&quot;availability-store-subsystem&quot;))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;dispute-coordinator-subsystem&quot; err=FromOrigin { origin: &quot;dispute-coordinator&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Essential task `overseer` failed. Shutting down service.    &#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;approval-voting-subsystem&quot; err=FromOrigin { origin: &quot;approval-voting&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;bitfield-signing-subsystem&quot; err=FromOrigin { origin: &quot;bitfield-signing&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] err=Subsystem(Generated(Context(&quot;Signal channel is terminated and empty.&quot;)))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;availability-recovery-subsystem&quot; err=FromOrigin { origin: &quot;availability-recovery&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;statement-distribution-subsystem&quot; err=FromOrigin { origin: &quot;statement-distribution&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Failed to receive a message from Overseer, exiting err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;network-bridge-rx-subsystem&quot; err=FromOrigin { origin: &quot;network-bridge&quot;, source: SubsystemError(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;chain-api-subsystem&quot; err=FromOrigin { origin: &quot;chain-api&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;runtime-api-subsystem&quot; err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The parachain is not producing blocks yet. &#xD;&#xA;&#xD;&#xA;These are the parameters I'm passing to the binary:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--collator --base-path /var/www/collator-data/ --force-authoring --ws-port 9946 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --chain /var/www/substrate/resources/collator-raw-spec.json -- --execution wasm --base-path /var/www/relay-data/ --chain /var/www/substrate/resources/rococo.json --port 30333 --ws-port 9944 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --wasm-execution Compiled --pruning 10000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've tried running it in different instance types, even c6id.2xlarge instance, but with the same results.&#xD;&#xA;&#xD;&#xA;The strange thing is that I'm also running a collator for polakdot and that one is running without any issues.&#xD;&#xA;&#xD;&#xA;Does anyone know what could be the cause of the issue?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32313" PostHistoryTypeId="2" PostId="8225" RevisionGUID="c80e28ff-e230-4873-9eff-7221856d04bd" CreationDate="2023-04-23T07:54:57.860" UserId="29" Text="Try something like this:&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const connect = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const oneApi = new ApiPromise({ provider });&#xD;&#xA;    await oneApi.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    const [chain, nodeName, nodeVersion] = await Promise.all([&#xD;&#xA;        oneApi.rpc.system.chain(),&#xD;&#xA;        oneApi.rpc.system.name(),&#xD;&#xA;        oneApi.rpc.system.version()&#xD;&#xA;    ]);&#xD;&#xA;&#xD;&#xA;    console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`);&#xD;&#xA;    process.exit()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;2023-04-23 09:54:28        REGISTRY: Unknown signed extensions SetEvmOrigin found, treating them as no-effect&#xD;&#xA;2023-04-23 09:54:28        API/INIT: RPC methods not decorated: chainHead_unstable_body, chainHead_unstable_call, chainHead_unstable_follow, chainHead_unstable_genesisHash, chainHead_unstable_header, chainHead_unstable_stopBody, chainHead_unstable_stopCall, chainHead_unstable_stopStorage, chainHead_unstable_storage, chainHead_unstable_unfollow, chainHead_unstable_unpin, evm_blockLimits, evm_call, evm_estimateResources, oracle_getAllValues, oracle_getValue, tokens_queryExistentialDeposit, transaction_unstable_submitAndWatch, transaction_unstable_unwatch&#xD;&#xA;You are connected to chain Karura using Acala Node v2.13.0-unknown&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32315" PostHistoryTypeId="5" PostId="8221" RevisionGUID="66650211-c7c0-4a65-a778-ee1c67b8ecc1" CreationDate="2023-04-23T07:57:21.030" UserId="29" Comment="deleted 43 characters in body" Text="I have been having series of errors and I have not been able to find a solution online. Please can anyone help me? I want to prompt users to connect wallet i.e when the connect button is clicked talisman, polkadotjs etc should pop up for confirmation. &#xD;&#xA;&#xD;&#xA;This is the function: &#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;async function handleConnect () {&#xD;&#xA;  const provider = new WsProvider(WS_SECOND_ENDPOINT);&#xD;&#xA;  const oneApi = await ApiPromise.create({ provider });&#xD;&#xA;  const [chain, nodeName, nodeVersion] = await Promise.all([&#xD;&#xA;    oneApi.rpc.system.chain(),&#xD;&#xA;    oneApi.rpc.system.name(),&#xD;&#xA;    oneApi.rpc.system.version()&#xD;&#xA;  ]);&#xD;&#xA;await oneApi.connect();&#xD;&#xA;  console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/5lX6f.png)&#xD;&#xA;![](https://i.stack.imgur.com/jirxr.png)&#xD;&#xA;&#xD;&#xA;When i remove ```await oneApi.connect();``` I get the error below on the console:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;caught (in promise) Error: WebSocket is already connected&#xD;&#xA;    at WsProvider.connect (index.js:314:19)&#xD;&#xA;    at RpcCore.connect (bundle.js:91:30)&#xD;&#xA;    at ApiPromise.connect (index.js:29:30)&#xD;&#xA;    at newTest (App.tsx:49:14)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="32316" PostHistoryTypeId="5" PostId="8225" RevisionGUID="2b512000-9a46-4b86-a9bd-97721241da0e" CreationDate="2023-04-23T08:00:36.677" UserId="29" Comment="added 85 characters in body" Text="Try something like this:&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const connect = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider(&quot;wss://karura.api.onfinality.io/public-ws&quot;);&#xD;&#xA;    const oneApi = new ApiPromise({ provider });&#xD;&#xA;    await oneApi.isReadyOrError;&#xD;&#xA;&#xD;&#xA;    const [chain, nodeName, nodeVersion] = await Promise.all([&#xD;&#xA;        oneApi.rpc.system.chain(),&#xD;&#xA;        oneApi.rpc.system.name(),&#xD;&#xA;        oneApi.rpc.system.version()&#xD;&#xA;    ]);&#xD;&#xA;&#xD;&#xA;    console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`);&#xD;&#xA;    process.exit()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;2023-04-23 09:54:28        REGISTRY: Unknown signed extensions SetEvmOrigin found, treating them as no-effect&#xD;&#xA;2023-04-23 09:54:28        API/INIT: RPC methods not decorated: chainHead_unstable_body, chainHead_unstable_call, chainHead_unstable_follow, chainHead_unstable_genesisHash, chainHead_unstable_header, chainHead_unstable_stopBody, chainHead_unstable_stopCall, chainHead_unstable_stopStorage, chainHead_unstable_storage, chainHead_unstable_unfollow, chainHead_unstable_unpin, evm_blockLimits, evm_call, evm_estimateResources, oracle_getAllValues, oracle_getValue, tokens_queryExistentialDeposit, transaction_unstable_submitAndWatch, transaction_unstable_unwatch&#xD;&#xA;You are connected to chain Karura using Acala Node v2.13.0-unknown&#xD;&#xA;```&#xD;&#xA;Also, you may want to look at this:&#xD;&#xA;- https://polkadot.js.org/docs/extension/usage" ContentLicense="CC BY-SA 4.0" />
  <row Id="32317" PostHistoryTypeId="2" PostId="8226" RevisionGUID="8f766c0c-91a5-4b15-9d03-e274646e2ff6" CreationDate="2023-04-23T09:09:41.367" UserId="3559" Text="It sounds like you are trying to stub the win.injectedWeb3 object in order to write automated tests for your dApp frontend in Cypress with TypeScript. One option to achieve this is to use the @polkadot/extension-inject library to inject a custom provider into the win.injectedWeb3 object.&#xD;&#xA;&#xD;&#xA;Here's an example of how you can use @polkadot/extension-inject to inject a custom provider:&#xD;&#xA;&#xD;&#xA;    ```import { injectExtension } from '@polkadot/extension-inject';&#xD;&#xA;&#xD;&#xA;// Define a custom provider&#xD;&#xA;class CustomProvider {&#xD;&#xA;  // Implement the required methods of the provider interface&#xD;&#xA;  public async send(method: string, params: any[]): Promise&lt;any&gt; {&#xD;&#xA;    // ...&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  public async sendAsync(method: string, params: any[]): Promise&lt;any&gt; {&#xD;&#xA;    // ...&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Inject the custom provider into the global `window.injectedWeb3` object&#xD;&#xA;await injectExtension(new CustomProvider());```&#xD;&#xA;&#xD;&#xA;You can use this code to inject the custom provider before running your automated tests. This way, when your dApp frontend tries to access win.injectedWeb3, it will receive the injected provider instead of the real provider.&#xD;&#xA;&#xD;&#xA;To create a stub for the CustomProvider class, you can use a mocking library such as sinon.js or jest. Here's an example of how to use sinon.js to create a stub for the CustomProvider class:&#xD;&#xA;&#xD;&#xA;    ```import sinon from 'sinon';&#xD;&#xA;import { injectExtension } from '@polkadot/extension-inject';&#xD;&#xA;&#xD;&#xA;// Define a stub for the CustomProvider class&#xD;&#xA;const providerStub = sinon.createStubInstance(CustomProvider);&#xD;&#xA;&#xD;&#xA;// Inject the stub into the global `window.injectedWeb3` object&#xD;&#xA;await injectExtension(providerStub);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This code creates a stub for the CustomProvider class using sinon.createStubInstance(). You can then inject the stub into the win.injectedWeb3 object using injectExtension(). This way, when your dApp frontend tries to interact with win.injectedWeb3, it will receive the stubbed provider instead of the real provider." ContentLicense="CC BY-SA 4.0" />
  <row Id="32330" PostHistoryTypeId="5" PostId="8224" RevisionGUID="e18aa8c8-4e62-49d5-bc9f-54ab92ab3229" CreationDate="2023-04-23T14:34:47.223" UserId="3598" Comment="added 50 characters in body" Text="I have a rococo collator running on aws eks that keeps failing, here are the logs:&#xD;&#xA;```&#xD;&#xA;2023-04-23 01:49:19 [Parachain]  Idle (0 peers), best: #0 (0x3865…1210), finalized #0 (0x3865…1210), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;candidate-validation-subsystem&quot; err=FromOrigin { origin: &quot;candidate-validation&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Overseer exited with error err=Generated(SubsystemStalled(&quot;availability-store-subsystem&quot;))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;dispute-coordinator-subsystem&quot; err=FromOrigin { origin: &quot;dispute-coordinator&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Essential task `overseer` failed. Shutting down service.    &#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;approval-voting-subsystem&quot; err=FromOrigin { origin: &quot;approval-voting&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;bitfield-signing-subsystem&quot; err=FromOrigin { origin: &quot;bitfield-signing&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] err=Subsystem(Generated(Context(&quot;Signal channel is terminated and empty.&quot;)))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;availability-recovery-subsystem&quot; err=FromOrigin { origin: &quot;availability-recovery&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;statement-distribution-subsystem&quot; err=FromOrigin { origin: &quot;statement-distribution&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Failed to receive a message from Overseer, exiting err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;network-bridge-rx-subsystem&quot; err=FromOrigin { origin: &quot;network-bridge&quot;, source: SubsystemError(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;chain-api-subsystem&quot; err=FromOrigin { origin: &quot;chain-api&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;runtime-api-subsystem&quot; err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The parachain is not producing blocks yet. &#xD;&#xA;&#xD;&#xA;These are the parameters I'm passing to the binary:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--collator --base-path /var/www/collator-data/ --force-authoring --ws-port 9946 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --chain /var/www/substrate/resources/collator-raw-spec.json -- --execution wasm --base-path /var/www/relay-data/ --chain /var/www/substrate/resources/rococo.json --port 30333 --ws-port 9944 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --wasm-execution Compiled --pruning 10000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've tried running it in different instance types, even c6id.2xlarge instance, but with the same results.&#xD;&#xA;&#xD;&#xA;The strange thing is that I'm also running a collator for polkadot and that one is running without any issues.&#xD;&#xA;&#xD;&#xA;The node client version being used is: v0.9.38&#xD;&#xA;&#xD;&#xA;Does anyone know what could be the cause of the issue?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32333" PostHistoryTypeId="5" PostId="8224" RevisionGUID="502e622b-b334-484b-80cf-90f4d40b00d3" CreationDate="2023-04-23T20:29:46.193" UserId="3598" Comment="added 99 characters in body" Text="I have a rococo collator running on aws eks that keeps failing, here are the logs:&#xD;&#xA;```&#xD;&#xA;2023-04-23 01:49:19 [Parachain]  Idle (0 peers), best: #0 (0x3865…1210), finalized #0 (0x3865…1210), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;candidate-validation-subsystem&quot; err=FromOrigin { origin: &quot;candidate-validation&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Overseer exited with error err=Generated(SubsystemStalled(&quot;availability-store-subsystem&quot;))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;dispute-coordinator-subsystem&quot; err=FromOrigin { origin: &quot;dispute-coordinator&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Essential task `overseer` failed. Shutting down service.    &#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;approval-voting-subsystem&quot; err=FromOrigin { origin: &quot;approval-voting&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;bitfield-signing-subsystem&quot; err=FromOrigin { origin: &quot;bitfield-signing&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] err=Subsystem(Generated(Context(&quot;Signal channel is terminated and empty.&quot;)))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;availability-recovery-subsystem&quot; err=FromOrigin { origin: &quot;availability-recovery&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;statement-distribution-subsystem&quot; err=FromOrigin { origin: &quot;statement-distribution&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Failed to receive a message from Overseer, exiting err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;network-bridge-rx-subsystem&quot; err=FromOrigin { origin: &quot;network-bridge&quot;, source: SubsystemError(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;chain-api-subsystem&quot; err=FromOrigin { origin: &quot;chain-api&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;runtime-api-subsystem&quot; err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The parachain is not producing blocks yet. &#xD;&#xA;&#xD;&#xA;These are the parameters I'm passing to the binary:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--collator --base-path /var/www/collator-data/ --force-authoring --ws-port 9946 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --chain /var/www/substrate/resources/collator-raw-spec.json -- --execution wasm --base-path /var/www/relay-data/ --chain /var/www/substrate/resources/rococo.json --port 30333 --ws-port 9944 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --wasm-execution Compiled --pruning 10000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've tried running it in different instance types, even c6id.2xlarge instance, but with the same results.&#xD;&#xA;&#xD;&#xA;The strange thing is that I'm also running a collator for polkadot and that one is running without any issues.&#xD;&#xA;&#xD;&#xA;The node client version being used is: v0.9.38, the runtime on v0.9.27, as we want to test the upgrade on rococo before performing it on polkadot&#xD;&#xA;&#xD;&#xA;Does anyone know what could be the cause of the issue?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32334" PostHistoryTypeId="5" PostId="7009" RevisionGUID="68d9085b-f5ff-437d-ba8a-18f0b2eb9062" CreationDate="2023-04-23T22:07:08.903" UserId="234" Comment="Example moved in another repo so corrected the link referring to it." Text="This is one such link containing some examples of ink! contracts from parity's repo : https://github.com/paritytech/ink-examples/blob/main/rand-extension/lib.rs&#xD;&#xA;&#xD;&#xA;Is there a way to call a custom function from a library, say a cryptographic library from the ink contract?&#xD;&#xA;&#xD;&#xA;How to go about doing this?&#xD;&#xA;&#xD;&#xA;I tried to add all the code I had from the library inside the ink! contract and it could work, but it is one heck of a tedious task and I don't think it is the correct way either." ContentLicense="CC BY-SA 4.0" />
  <row Id="32337" PostHistoryTypeId="2" PostId="8231" RevisionGUID="a631b12a-bf7c-46a1-a05b-28d31eebab50" CreationDate="2023-04-24T05:14:53.970" UserId="2140" Text="As I've checked the `pallet-tx-payment`, I've figured it out the fee is withdrawn twice&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn validate() {&#xD;&#xA;    let (final_fee, _) = self.withdraw_fee(who, call, info, len)?;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn pre_dispatch() {&#xD;&#xA;    let (_fee, imbalance) = self.withdraw_fee(who, call, info, len)?;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As far as I understand transaction life cycle&#xD;&#xA; 1. Validate transaction and put into tx pool if valid (withdraw_fee)&#xD;&#xA;```&#xD;&#xA;pub fn validate_transaction {&#xD;&#xA;    ...&#xD;&#xA;    Extra::validate_transaction();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA; 2. Block author fetch the valid transaction and dispatch tx(withdraw_fee)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn apply_extrinsic() {&#xD;&#xA;    Extra::pre_dispatch();&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Question: Is tx fee withdrawn twice for 'who' account? Once for during validating tx and once for pre-dispatching tx?** &#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="32339" PostHistoryTypeId="1" PostId="8231" RevisionGUID="a631b12a-bf7c-46a1-a05b-28d31eebab50" CreationDate="2023-04-24T05:14:53.970" UserId="2140" Text="Transaction Fee Withdrawal" ContentLicense="CC BY-SA 4.0" />
  <row Id="32340" PostHistoryTypeId="3" PostId="8231" RevisionGUID="a631b12a-bf7c-46a1-a05b-28d31eebab50" CreationDate="2023-04-24T05:14:53.970" UserId="2140" Text="|frame|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32341" PostHistoryTypeId="2" PostId="8232" RevisionGUID="039f884b-31cf-4bfc-b6df-0bbfb5a4677f" CreationDate="2023-04-24T06:20:09.187" UserId="4120" Text="I have written an erc20 smart contract in ink(Rust). The contract has been compiled successfully. But I got an error while deploying my smart contract. Basically, the contract constructor takes total_spply as a parameter. So, how to pass this value while deploying a smart contract using swanky-cli? &#xD;&#xA;&#xD;&#xA;This is my constructor. &#xD;&#xA;&#xD;&#xA;      pub fn new(total_supply: Balance) -&gt; Self {&#xD;&#xA;            let mut balances = Mapping::default();&#xD;&#xA;            let caller = Self::env().caller();&#xD;&#xA;            balances.insert(&amp;caller, &amp;total_supply);&#xD;&#xA;&#xD;&#xA;            Self::env().emit_event(Transfer {&#xD;&#xA;                from: None,&#xD;&#xA;                to: Some(caller),&#xD;&#xA;                value: total_supply,&#xD;&#xA;            });&#xD;&#xA;&#xD;&#xA;            Self {&#xD;&#xA;                total_supply,&#xD;&#xA;                balances,&#xD;&#xA;                allowances: Default::default(),&#xD;&#xA;            }&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="32343" PostHistoryTypeId="1" PostId="8232" RevisionGUID="039f884b-31cf-4bfc-b6df-0bbfb5a4677f" CreationDate="2023-04-24T06:20:09.187" UserId="4120" Text="How to deploy smart contract in ink which constructor takes value in params" ContentLicense="CC BY-SA 4.0" />
  <row Id="32344" PostHistoryTypeId="3" PostId="8232" RevisionGUID="039f884b-31cf-4bfc-b6df-0bbfb5a4677f" CreationDate="2023-04-24T06:20:09.187" UserId="4120" Text="|ink|rust|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32345" PostHistoryTypeId="5" PostId="8232" RevisionGUID="c1e50982-67c1-42e3-af4a-1cf3e1292e7a" CreationDate="2023-04-24T06:22:05.860" UserId="4120" Comment="added 124 characters in body" Text="I have written an erc20 smart contract in ink(Rust). The contract has been compiled successfully. But I got an error while deploying my smart contract. Basically, the contract constructor takes total_spply as a parameter. So, how to pass this value while deploying a smart contract using swanky-cli? &#xD;&#xA;&#xD;&#xA;This command I am using to deploy smart contract:&#xD;&#xA;&#xD;&#xA;swanky contract deploy erc20 --account alice -g 10000000000 -a true&#xD;&#xA;&#xD;&#xA;This is my constructor. &#xD;&#xA;&#xD;&#xA;      pub fn new(total_supply: Balance) -&gt; Self {&#xD;&#xA;            let mut balances = Mapping::default();&#xD;&#xA;            let caller = Self::env().caller();&#xD;&#xA;            balances.insert(&amp;caller, &amp;total_supply);&#xD;&#xA;&#xD;&#xA;            Self::env().emit_event(Transfer {&#xD;&#xA;                from: None,&#xD;&#xA;                to: Some(caller),&#xD;&#xA;                value: total_supply,&#xD;&#xA;            });&#xD;&#xA;&#xD;&#xA;            Self {&#xD;&#xA;                total_supply,&#xD;&#xA;                balances,&#xD;&#xA;                allowances: Default::default(),&#xD;&#xA;            }&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="32348" PostHistoryTypeId="2" PostId="8234" RevisionGUID="f169c218-21da-4a1b-a65e-df6d380ec07a" CreationDate="2023-04-24T06:46:58.680" UserId="3732" Text="validate() and pre_dispatch() both call the same withdraw_fee function, but only pre_dispatch() actually reflects fee changes of the account in the node state. validate() is only for performing a quick validity check to queue the transaction into the transaction queue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;refer these links:&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/2148/transactions-lifecycle&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/learn/transaction-lifecycle/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32350" PostHistoryTypeId="5" PostId="8234" RevisionGUID="3460578e-a6ce-4710-9169-f23498d60e30" CreationDate="2023-04-24T07:15:25.803" UserId="3732" Comment="added 17 characters in body" Text="validate() and pre_dispatch() both call the same withdraw_fee function, but only pre_dispatch() actually reflects fee changes of the account in the node state. validate() doesn't execute any&#xD;&#xA;side-effects; it merely checks whether the transaction would panic if it were included or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;refer these links:&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/2148/transactions-lifecycle&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/learn/transaction-lifecycle/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32351" PostHistoryTypeId="2" PostId="8235" RevisionGUID="12423c1a-b998-445d-b130-45b6f6bbc0cb" CreationDate="2023-04-24T07:25:53.440" UserId="275" Text="Constructor takes `Balance` instead of boolean.&#xD;&#xA;So, you need to pass some Balance value via swanky command.&#xD;&#xA;E.g. `swanky contract deploy erc20 --account alice -g 10000000000 -a 10000000`" ContentLicense="CC BY-SA 4.0" />
  <row Id="32354" PostHistoryTypeId="6" PostId="8205" RevisionGUID="4f4e3960-31ce-47be-9991-5a0ea76c6291" CreationDate="2023-04-24T08:07:42.183" UserId="165" Comment="adding corresponding tags" Text="|polkadot-js|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32355" PostHistoryTypeId="2" PostId="8236" RevisionGUID="ea6ca932-e329-41ad-8284-acc5935b2ee0" CreationDate="2023-04-24T08:26:44.937" UserId="4083" Text="I try to cargo build the substrate node template on the server digital ocean. I have the exact same configuration between my own Ubuntu and Digitalocean droplet : Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /root/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;1.68.0-x86_64-unknown-linux-gnu&#xD;&#xA;1.69.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;1.69.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.69.0 (84c898d65 2023-04-16).&#xD;&#xA;&#xD;&#xA;When I cargo build the substrate node template, it works, whereas on digital ocean, I got this error :      Compiling sp-io v7.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;  error[E0557]: feature has been removed&#xD;&#xA;    --&gt; /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/946507b/primitives/io/src/lib.rs:22:43&#xD;&#xA;     |&#xD;&#xA;  22 | #![cfg_attr(not(feature = &quot;std&quot;), feature(alloc_error_handler))]&#xD;&#xA;     |                                           ^^^^^^^^^^^^^^^^^^^ feature has been removed&#xD;&#xA;     |&#xD;&#xA;     = note: now handled by panic handler.&#xD;&#xA;&#xD;&#xA;As if my version of Rust was not correct. But it is the same between my computer and digitalocean. Does anyone has any ideas ? (rustc --version&#xD;&#xA;rustc 1.69.0 (84c898d65 2023-04-16) in both case) " ContentLicense="CC BY-SA 4.0" />
  <row Id="32357" PostHistoryTypeId="1" PostId="8236" RevisionGUID="ea6ca932-e329-41ad-8284-acc5935b2ee0" CreationDate="2023-04-24T08:26:44.937" UserId="4083" Text="Build a substrat node template on digitalocean problem" ContentLicense="CC BY-SA 4.0" />
  <row Id="32358" PostHistoryTypeId="3" PostId="8236" RevisionGUID="ea6ca932-e329-41ad-8284-acc5935b2ee0" CreationDate="2023-04-24T08:26:44.937" UserId="4083" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32359" PostHistoryTypeId="5" PostId="8236" RevisionGUID="f822b871-865d-4bdd-8603-a5776b2034cd" CreationDate="2023-04-24T08:41:21.147" UserId="251" Comment="added 22 characters in body" Text="I try to cargo build the substrate node template on the server digital ocean. I have the exact same configuration between my own Ubuntu and Digitalocean droplet : Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /root/.rustup&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;1.68.0-x86_64-unknown-linux-gnu&#xD;&#xA;1.69.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;1.69.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.69.0 (84c898d65 2023-04-16).&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I cargo build the substrate node template, it works, whereas on digital ocean, I got this error :      &#xD;&#xA;```rs&#xD;&#xA;Compiling sp-io v7.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;  error[E0557]: feature has been removed&#xD;&#xA;    --&gt; /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/946507b/primitives/io/src/lib.rs:22:43&#xD;&#xA;     |&#xD;&#xA;  22 | #![cfg_attr(not(feature = &quot;std&quot;), feature(alloc_error_handler))]&#xD;&#xA;     |                                           ^^^^^^^^^^^^^^^^^^^ feature has been removed&#xD;&#xA;     |&#xD;&#xA;     = note: now handled by panic handler.&#xD;&#xA;```&#xD;&#xA;As if my version of Rust was not correct. But it is the same between my computer and digitalocean. Does anyone has any ideas ? (rustc --version&#xD;&#xA;rustc 1.69.0 (84c898d65 2023-04-16) in both case) " ContentLicense="CC BY-SA 4.0" />
  <row Id="32366" PostHistoryTypeId="2" PostId="8238" RevisionGUID="4063d6a4-4f36-4e5b-8fa6-69dcd635edc7" CreationDate="2023-04-24T09:36:02.443" UserId="351" Text="The main aim is to get Governance Origins using subxt from the encoded metadata" ContentLicense="CC BY-SA 4.0" />
  <row Id="32368" PostHistoryTypeId="1" PostId="8238" RevisionGUID="4063d6a4-4f36-4e5b-8fa6-69dcd635edc7" CreationDate="2023-04-24T09:36:02.443" UserId="351" Text="How to get Runtime types and Runtime (PalletCustomOrigins) from subxt metadata.scale" ContentLicense="CC BY-SA 4.0" />
  <row Id="32369" PostHistoryTypeId="3" PostId="8238" RevisionGUID="4063d6a4-4f36-4e5b-8fa6-69dcd635edc7" CreationDate="2023-04-24T09:36:02.443" UserId="351" Text="|subxt|metadata|origin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32370" PostHistoryTypeId="2" PostId="8239" RevisionGUID="529ad704-059c-49de-9eff-401f785c2145" CreationDate="2023-04-24T10:03:18.520" UserId="3989" Text="So I am trying to submit extrinsics to a running parachain node using subxt, but encounter a Codec error.&#xD;&#xA;&#xD;&#xA;The parachain is based on the [substrate-parachain-template](https://github.com/substrate-developer-hub/substrate-parachain-template), the relay chain is compiled directly from the [Polkadot repo](https://github.com/paritytech/polkadot), and I am using the latest subxt version (v0.28.0). Both the relay chain and the parachain are using the crates from the `polkadot-v0.9.37` branch of Substrate.&#xD;&#xA;&#xD;&#xA;The para- and relay chains are able to connect and finalize authored blocks, and subxt is able to subscribe to this finalization.&#xD;&#xA;&#xD;&#xA;However, trying to submit custom extrinsics results in the following errors:&#xD;&#xA;&#xD;&#xA;Error printed by the parachain node:&#xD;&#xA;```&#xD;&#xA;[Parachain] panicked at 'Bad input data provided to validate_transaction: Codec error', &lt;PARACHAIN_PATH&gt;/runtime/src/lib.rs:516:1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error printed by the subxt application (I tried to format it with newlines for better readability):&#xD;&#xA;```&#xD;&#xA;Rpc error: RPC error: RPC call failed: ErrorObject {&#xD;&#xA;    code: ServerError(1002), message: &quot;Verification Error: Runtime error: Execution failed: &#xD;&#xA;    Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;    0: 0x1d6993 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x3a74 - &lt;unknown&gt;!core::panicking::panic_fmt::h0c053f1c32a1ef70\&#xD;&#xA;    2: 0x15d8cc - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\&#xD;&#xA;\&quot;, &#xD;&#xA;data: Some(RawValue(&quot;RuntimeApi(\&quot;Execution failed: Execution aborted due to trap:&#xD;&#xA;wasm trap: wasm `unreachable` instruction executed\&#xD;&#xA;WASM backtrace:&#xD;&#xA;    0: 0x1d6993 - &lt;unknown&gt;!rust_begin_unwind\&#xD;&#xA;    1: 0x3a74 - &lt;unknown&gt;!core::panicking::panic_fmt::h0c053f1c32a1ef70\&#xD;&#xA;    2: 0x15d8cc - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\&#xD;&#xA;\&quot;)&quot;)) }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have not been able to find any documentation or posts by anyone else encountering this issue. I am trying to submit an extrinsic using subxt as seen here:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let pair = subxt::ext::sp_core::sr25519::Pair::from_string_with_seed(&lt;SEED_HEX&gt;, None).unwrap();&#xD;&#xA;    let signer: PairSigner&lt;SubstrateConfig, subxt::ext::sp_core::sr25519::Pair&gt; = PairSigner::&lt;SubstrateConfig, subxt::ext::sp_core::sr25519::Pair&gt;::new(pair.0);&#xD;&#xA;&#xD;&#xA;    let payload = chain_apis::energychain_api::api::tx().energychain().create_energy_offer(500, 4);&#xD;&#xA;&#xD;&#xA;    match connection.get_api().tx().validate(&amp;payload) {&#xD;&#xA;        Ok(_) =&gt; println!(&quot;Call okay!&quot;),&#xD;&#xA;        Err(e) =&gt; println!(&quot;Error from call: {:?}&quot;, e),&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    let tx_in_block = connection.get_api().tx()&#xD;&#xA;        .sign_and_submit_then_watch_default(&amp;payload, &amp;signer)&#xD;&#xA;        .await?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Before the error is printed, the `validate` match prints out `Call okay!`.&#xD;&#xA;&#xD;&#xA;The parachain I am trying to submit the extrinsic to has the following call defined:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(1000)]&#xD;&#xA;#[pallet::call_index(1)]&#xD;&#xA;pub fn create_energy_offer(origin: OriginFor&lt;T&gt;, amount: u16, price: u8) -&gt; DispatchResult {&#xD;&#xA;    let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;    ensure!(amount &gt; T::EnergyOfferMinW::get(), Error::&lt;T&gt;::EnergyOfferNotEnoughWatts);&#xD;&#xA;&#xD;&#xA;    let energy_offer = EnergyOffer { seller: who.clone(), amount: amount.clone(), price: price.clone() };&#xD;&#xA;&#xD;&#xA;    let energy_offer_id = T::Hashing::hash_of(&amp;energy_offer);&#xD;&#xA;    EnergyOffers::&lt;T&gt;::insert(energy_offer_id, energy_offer.clone());&#xD;&#xA;&#xD;&#xA;    Self::deposit_event(Event::EnergyOfferCreated(energy_offer.amount.clone(), energy_offer.price.clone(), who, energy_offer_id));&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any insights into the possible origin of this issue and, ideally, how it could be resolved is greatly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="32372" PostHistoryTypeId="1" PostId="8239" RevisionGUID="529ad704-059c-49de-9eff-401f785c2145" CreationDate="2023-04-24T10:03:18.520" UserId="3989" Text="Subxt call to custom pallet method returning `wasm 'unreachable'` - (`TaggedTransactionQueue_validate_transaction`)" ContentLicense="CC BY-SA 4.0" />
  <row Id="32373" PostHistoryTypeId="3" PostId="8239" RevisionGUID="529ad704-059c-49de-9eff-401f785c2145" CreationDate="2023-04-24T10:03:18.520" UserId="3989" Text="|parachain|pallet|extrinsic|substrate-parachain-template|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32374" PostHistoryTypeId="2" PostId="8240" RevisionGUID="0457ff18-9d8f-4ddf-9171-2d996a1a7803" CreationDate="2023-04-24T10:41:30.543" UserId="3559" Text="If you want to check whether a validator in the waiting set is online or not, you can modify the is_online_aux function to take into consideration the validators in the waiting set. Here's one way to do it:&#xD;&#xA;&#xD;&#xA;    fn is_online_aux(&#xD;&#xA;        authority_index: AuthIndex,&#xD;&#xA;        authority: &amp;ValidatorId&lt;T&gt;,&#xD;&#xA;    ) -&gt; bool {&#xD;&#xA;        let current_session = T::ValidatorSet::session_index();&#xD;&#xA;    &#xD;&#xA;        // Check if the authority is in the active set and has authored blocks&#xD;&#xA;        if T::ValidatorSet::is_active_validator(authority_index)&#xD;&#xA;            &amp;&amp; AuthoredBlocks::&lt;T&gt;::get(&amp;current_session, authority) != 0&#xD;&#xA;        {&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // Check if the authority has sent a heartbeat in the current session&#xD;&#xA;        if ReceivedHeartbeats::&lt;T&gt;::contains_key(&amp;current_session, &amp;authority_index) {&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        // Check if the authority is in the waiting set and has sent a heartbeat in the previous session&#xD;&#xA;        let previous_session = current_session.checked_sub(1).unwrap_or(0);&#xD;&#xA;        if T::ValidatorSet::is_waiting_validator(authority_index)&#xD;&#xA;            &amp;&amp; ReceivedHeartbeats::&lt;T&gt;::contains_key(&amp;previous_session, &amp;authority_index)&#xD;&#xA;        {&#xD;&#xA;            return true;&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        false&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In this modified version of the function, we first check if the authority is in the active set and has authored blocks. If so, we consider it online.&#xD;&#xA;&#xD;&#xA;If not, we check if the authority has sent a heartbeat in the current session. If it has, we consider it online.&#xD;&#xA;&#xD;&#xA;If the authority is neither in the active set nor has sent a heartbeat in the current session, we check if it is in the waiting set and has sent a heartbeat in the previous session. If it has, we consider it online.&#xD;&#xA;&#xD;&#xA;If none of the above conditions are met, we consider the authority offline.&#xD;&#xA;&#xD;&#xA;Note that the is_active_validator and is_waiting_validator functions are provided by the ValidatorSet trait, which is implemented by the runtime's pallet_session module. You'll need to make sure that your runtime includes this module and that you're using a version of pallet_im_online that is compatible with your version of pallet_session." ContentLicense="CC BY-SA 4.0" />
  <row Id="32376" PostHistoryTypeId="52" PostId="8231" RevisionGUID="16fbae31-366a-43c5-a121-ac1b082d0c8d" CreationDate="2023-04-24T13:15:56.280" />
  <row Id="32380" PostHistoryTypeId="2" PostId="8241" RevisionGUID="2c5d8a13-c28d-48bf-b1ca-0b6e983fc9ef" CreationDate="2023-04-24T16:25:41.690" UserId="351" Text="This can be accessed using the following syntax&#xD;&#xA;&#xD;&#xA;`#[subxt::subxt(runtime_metadata_path = &quot;testmetadata.scale&quot;)]&#xD;&#xA;pub mod runtime {}`&#xD;&#xA;&#xD;&#xA;Then access runtime types, Note: use subxt-cli to generate metadata.json so that you can easily see the path.&#xD;&#xA;&#xD;&#xA;Then, `runtime::runtime_types::kusama_runtime::governance::origins::pallet_custom_origins::Origin::{BigSpender,SmallSpender,....};`&#xD;&#xA;&#xD;&#xA;    &lt;metadata&gt;::&lt;runtime_types&gt;::&lt;kusama_runtime&gt;::&lt;pallet&gt;::&lt;types&gt;::&lt;follow the path&gt;;&#xD;&#xA;&#xD;&#xA;Hopefully it helps to access runtime_types , such as weightV2, Origins, Calls ..etc&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32382" PostHistoryTypeId="2" PostId="8242" RevisionGUID="c530217c-0959-4498-a390-ac7556d69cce" CreationDate="2023-04-24T18:09:24.997" UserId="1779" Text="For anyone finding this post in the future.. We got a working solution based on the frame_system benchmarks. See our custom benchmark [here](https://github.com/interlay/interbtc/pull/1023/files#diff-f66f26253b8fa098df5cb1609c3c380ab2fcd2f11ff1343f36e8851ddefb6955R12-R13). The idea is to define a new dummy `Pallet` and `Config` item, write benchmarks for them, and apply the generated weights to the original pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="32384" PostHistoryTypeId="2" PostId="8243" RevisionGUID="a3fa7886-7604-46c9-b874-b3bc43a2fed8" CreationDate="2023-04-24T20:25:41.257" UserId="73" Text="There are two possible solutions:&#xD;&#xA;&#xD;&#xA;1. Either use Substrate master to include the following fix: https://github.com/paritytech/substrate/pull/13580&#xD;&#xA;&#xD;&#xA;2. Or downgrade your rustc version to 1.68.0." ContentLicense="CC BY-SA 4.0" />
  <row Id="32386" PostHistoryTypeId="2" PostId="8244" RevisionGUID="3090c6ab-470b-4f29-b03e-de113cb1e9fc" CreationDate="2023-04-24T20:43:38.057" UserId="4132" Text="Coming over from the Ethereum ecosystem and haven't been able to find much information about integrating creator royalties into ERC721 contracts using rust or ink!. I know on Ethereum, the large marketplaces have royalty registry contracts that you can import and integrate in your ERC721 contract. Is this the way it is done on substrate-based blockchains as well(if so, could you point me in the direction of a few) or is there a different implementation, or none at all?&#xD;&#xA;&#xD;&#xA;Appreciate your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="32388" PostHistoryTypeId="1" PostId="8244" RevisionGUID="3090c6ab-470b-4f29-b03e-de113cb1e9fc" CreationDate="2023-04-24T20:43:38.057" UserId="4132" Text="Creator NFT Royalties on substrate-based blockchains possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32389" PostHistoryTypeId="3" PostId="8244" RevisionGUID="3090c6ab-470b-4f29-b03e-de113cb1e9fc" CreationDate="2023-04-24T20:43:38.057" UserId="4132" Text="|ink|rust|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32390" PostHistoryTypeId="2" PostId="8245" RevisionGUID="552ba4a1-be06-4ba8-8561-02f6816da065" CreationDate="2023-04-24T21:10:44.240" UserId="2463" Text="I am generating a partial unsigned extrinsic via subxt however cannot figure how to how to sign it using the polkadot.js api. For example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;polkadot_metadata.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;let dest = AccountId32::from([0; 32]);&#xD;&#xA;&#xD;&#xA;let api = OnlineClient::&lt;PolkadotConfig&gt;::from_url(&quot;wss://rpc.polkadot.io:443&quot;).await?;&#xD;&#xA;&#xD;&#xA;let tx = polkadot::tx()&#xD;&#xA;    .balances()&#xD;&#xA;    .transfer(MultiAddress::Address32([1; 32]), 123_456_789_012_345);&#xD;&#xA;&#xD;&#xA;let partial_extrinsic = api&#xD;&#xA;    .tx()&#xD;&#xA;    .create_partial_signed(&amp;tx, &amp;dest, Default::default())&#xD;&#xA;    .await&#xD;&#xA;    .unwrap();&#xD;&#xA;&#xD;&#xA;let signer_payload: Vec&lt;u8&gt; = partial_extrinsic.signer_payload();&#xD;&#xA;&#xD;&#xA;// hand signer_payload off to browser&#xD;&#xA;```&#xD;&#xA;The signer_payload being:&#xD;&#xA;```&#xD;&#xA;[5, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 121, 223, 13, 134, 72, 112, 0, 0, 0, 154, 36, 0, 0, 20, 0, 0, 0, 145, 177, 113, 187, 21, 142, 45, 56, 72, 250, 35, 169, 241, 194, 81, 130, 251, 142, 32, 49, 59, 44, 30, 180, 146, 25, 218, 122, 112, 206, 144, 195, 145, 177, 113, 187, 21, 142, 45, 56, 72, 250, 35, 169, 241, 194, 81, 130, 251, 142, 32, 49, 59, 44, 30, 180, 146, 25, 218, 122, 112, 206, 144, 195]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And in the browser:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let api = await ApiPromise.create({&#xD;&#xA;  provider: new WsProvider(&quot;wss://rpc.polkadot.io:443&quot;),&#xD;&#xA;});&#xD;&#xA;let injector = await web3FromAddress(address);&#xD;&#xA;const signerPayload = api.createType(&quot;SignerPayload&quot;, u8aToHex(signer_payload));&#xD;&#xA;await injector.signer.signPayload(signerPayload.toPayload());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Js is erroring with:&#xD;&#xA;```&#xD;&#xA;Error: createType(SignerPayload):: decodeU8aStruct: failed at 0x70ce90c391b171bb158e2d3848fa23a9… on address (index 8/13): {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Unable to create Enum via index 112, in Id, Index, Raw, Address32, Address20&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I instead use this tx (as a simpler example):&#xD;&#xA;```rust&#xD;&#xA;let tx = polkadot::tx().system().remark(&quot;hello&quot;.into());&#xD;&#xA;```&#xD;&#xA;The signer_payload is correctly parsed, however the address is unusable and errors when trying to sign.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;era&quot;: {&#xD;&#xA;    &quot;immortalEra&quot;: &quot;0x00&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;nonce&quot;: 0,&#xD;&#xA;  &quot;tip&quot;: 5,&#xD;&#xA;  &quot;specVersion&quot;: 1819043176,&#xD;&#xA;  &quot;transactionVersion&quot;: 111,&#xD;&#xA;  &quot;genesisHash&quot;: &quot;0x9a2400001400000091b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb4&quot;,&#xD;&#xA;  &quot;blockHash&quot;: &quot;0x9219da7a70ce90c391b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb4&quot;,&#xD;&#xA;  &quot;address&quot;: {&#xD;&#xA;    &quot;index&quot;: &quot;1HV2wGCy&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;blockNumber&quot;: 50064,&#xD;&#xA;  &quot;method&quot;: {&#xD;&#xA;    &quot;callIndex&quot;: &quot;0x0000&quot;,&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;      &quot;remark&quot;: &quot;0x&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;runtimeVersion&quot;: {&#xD;&#xA;    &quot;specName&quot;: &quot;&quot;,&#xD;&#xA;    &quot;implName&quot;: &quot;&quot;,&#xD;&#xA;    &quot;authoringVersion&quot;: 0,&#xD;&#xA;    &quot;specVersion&quot;: 0,&#xD;&#xA;    &quot;implVersion&quot;: 0,&#xD;&#xA;    &quot;apis&quot;: [],&#xD;&#xA;    &quot;transactionVersion&quot;: 0,&#xD;&#xA;    &quot;stateVersion&quot;: 0&#xD;&#xA;  },&#xD;&#xA;  &quot;signedExtensions&quot;: [],&#xD;&#xA;  &quot;version&quot;: 0&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How do I correctly use the generated signer_payload from subxt with polkadot.js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32392" PostHistoryTypeId="1" PostId="8245" RevisionGUID="552ba4a1-be06-4ba8-8561-02f6816da065" CreationDate="2023-04-24T21:10:44.240" UserId="2463" Text="In browser signing of payload generated with subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="32393" PostHistoryTypeId="3" PostId="8245" RevisionGUID="552ba4a1-be06-4ba8-8561-02f6816da065" CreationDate="2023-04-24T21:10:44.240" UserId="2463" Text="|polkadot-js|subxt|polkadot-js-extension|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32394" PostHistoryTypeId="5" PostId="8245" RevisionGUID="a588d3c2-2448-4b58-8765-14c041722c21" CreationDate="2023-04-24T21:16:24.493" UserId="2463" Comment="added 328 characters in body; edited title" Text="I am generating a partial unsigned extrinsic via subxt however cannot figure how to how to sign it using the polkadot.js api. For example:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;polkadot_metadata.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;let dest = AccountId32::from([0; 32]);&#xD;&#xA;&#xD;&#xA;let api = OnlineClient::&lt;PolkadotConfig&gt;::from_url(&quot;wss://rpc.polkadot.io:443&quot;).await?;&#xD;&#xA;&#xD;&#xA;let tx = polkadot::tx()&#xD;&#xA;    .balances()&#xD;&#xA;    .transfer(MultiAddress::Address32([1; 32]), 123_456_789_012_345);&#xD;&#xA;&#xD;&#xA;let partial_extrinsic = api&#xD;&#xA;    .tx()&#xD;&#xA;    .create_partial_signed(&amp;tx, &amp;dest, Default::default())&#xD;&#xA;    .await&#xD;&#xA;    .unwrap();&#xD;&#xA;&#xD;&#xA;let signer_payload: Vec&lt;u8&gt; = partial_extrinsic.signer_payload();&#xD;&#xA;&#xD;&#xA;// hand signer_payload off to browser&#xD;&#xA;```&#xD;&#xA;The signer_payload being:&#xD;&#xA;```&#xD;&#xA;[5, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 121, 223, 13, 134, 72, 112, 0, 0, 0, 154, 36, 0, 0, 20, 0, 0, 0, 145, 177, 113, 187, 21, 142, 45, 56, 72, 250, 35, 169, 241, 194, 81, 130, 251, 142, 32, 49, 59, 44, 30, 180, 146, 25, 218, 122, 112, 206, 144, 195, 145, 177, 113, 187, 21, 142, 45, 56, 72, 250, 35, 169, 241, 194, 81, 130, 251, 142, 32, 49, 59, 44, 30, 180, 146, 25, 218, 122, 112, 206, 144, 195]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And in the browser:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let api = await ApiPromise.create({&#xD;&#xA;  provider: new WsProvider(&quot;wss://rpc.polkadot.io:443&quot;),&#xD;&#xA;});&#xD;&#xA;let injector = await web3FromAddress(address);&#xD;&#xA;const signerPayload = api.createType(&quot;SignerPayload&quot;, u8aToHex(signer_payload));&#xD;&#xA;await injector.signer.signPayload(signerPayload.toPayload());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Js is erroring with:&#xD;&#xA;```&#xD;&#xA;Error: createType(SignerPayload):: decodeU8aStruct: failed at 0x70ce90c391b171bb158e2d3848fa23a9… on address (index 8/13): {&quot;_enum&quot;:{&quot;Id&quot;:&quot;AccountId&quot;,&quot;Index&quot;:&quot;Compact&lt;AccountIndex&gt;&quot;,&quot;Raw&quot;:&quot;Bytes&quot;,&quot;Address32&quot;:&quot;H256&quot;,&quot;Address20&quot;:&quot;H160&quot;}}:: Unable to create Enum via index 112, in Id, Index, Raw, Address32, Address20&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I instead use this tx (as a simpler example):&#xD;&#xA;```rust&#xD;&#xA;let tx = polkadot::tx().system().remark(&quot;hello&quot;.into());&#xD;&#xA;```&#xD;&#xA;The signer_payload is correctly parsed, however the address is unusable and errors when trying to sign.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;era&quot;: {&#xD;&#xA;    &quot;immortalEra&quot;: &quot;0x00&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;nonce&quot;: 0,&#xD;&#xA;  &quot;tip&quot;: 5,&#xD;&#xA;  &quot;specVersion&quot;: 1819043176,&#xD;&#xA;  &quot;transactionVersion&quot;: 111,&#xD;&#xA;  &quot;genesisHash&quot;: &quot;0x9a2400001400000091b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb4&quot;,&#xD;&#xA;  &quot;blockHash&quot;: &quot;0x9219da7a70ce90c391b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb4&quot;,&#xD;&#xA;  &quot;address&quot;: {&#xD;&#xA;    &quot;index&quot;: &quot;1HV2wGCy&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;blockNumber&quot;: 50064,&#xD;&#xA;  &quot;method&quot;: {&#xD;&#xA;    &quot;callIndex&quot;: &quot;0x0000&quot;,&#xD;&#xA;    &quot;args&quot;: {&#xD;&#xA;      &quot;remark&quot;: &quot;0x&quot;&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;runtimeVersion&quot;: {&#xD;&#xA;    &quot;specName&quot;: &quot;&quot;,&#xD;&#xA;    &quot;implName&quot;: &quot;&quot;,&#xD;&#xA;    &quot;authoringVersion&quot;: 0,&#xD;&#xA;    &quot;specVersion&quot;: 0,&#xD;&#xA;    &quot;implVersion&quot;: 0,&#xD;&#xA;    &quot;apis&quot;: [],&#xD;&#xA;    &quot;transactionVersion&quot;: 0,&#xD;&#xA;    &quot;stateVersion&quot;: 0&#xD;&#xA;  },&#xD;&#xA;  &quot;signedExtensions&quot;: [],&#xD;&#xA;  &quot;version&quot;: 0&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How do I correctly use the generated signer_payload from subxt with polkadot.js? I've tried manually overriding some of the values in the payload:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let payload = signerPayload.toPayload();&#xD;&#xA;payload.address = &quot;15LzmxXr1rztdAzVq5mMWjoFSdFZfrbXSKsASqEaKP3qHnbE&quot;;     &#xD;&#xA;payload.version = 4;&#xD;&#xA;```&#xD;&#xA;But the polkadot extension errors with &#xD;&#xA;`Cannot read properties of undefined (reading 'isImmortalEra')`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32395" PostHistoryTypeId="4" PostId="8245" RevisionGUID="a588d3c2-2448-4b58-8765-14c041722c21" CreationDate="2023-04-24T21:16:24.493" UserId="2463" Comment="added 328 characters in body; edited title" Text="In-browser signing of payload generated with subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="32396" PostHistoryTypeId="2" PostId="8246" RevisionGUID="ed8b11a9-088e-44dd-9a98-7f24529f08ee" CreationDate="2023-04-24T22:22:44.827" UserId="4134" Text="using the following code ,&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;    package main&#xD;&#xA;&#xD;&#xA;    import (&#xD;&#xA;	&quot;fmt&quot;&#xD;&#xA;	&quot;github.com/gorilla/websocket&quot;&#xD;&#xA;	&quot;log&quot;&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;    type Message struct {&#xD;&#xA;	Id      int         `json:&quot;id&quot;`&#xD;&#xA;	Jsonrpc string      `json:&quot;jsonrpc&quot;`&#xD;&#xA;	Method  string      `json:&quot;method&quot;`&#xD;&#xA;	Params  interface{} `json:&quot;params&quot;`&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    func main() {&#xD;&#xA;	// create a new WebSocket connection to the Polkadot node&#xD;&#xA;	endpoint := fmt.Sprintf(&quot;ws://%s:%d&quot;, &quot;localhost&quot;, 9944)&#xD;&#xA;	conn, _, err := websocket.DefaultDialer.Dial(endpoint, nil)&#xD;&#xA;	if err != nil {&#xD;&#xA;		log.Fatal(&quot;dial:&quot;, err)&#xD;&#xA;	}&#xD;&#xA;	defer conn.Close()&#xD;&#xA;&#xD;&#xA;	// subscribe to new block headers&#xD;&#xA;	message := Message{&#xD;&#xA;		Id:      1,&#xD;&#xA;		Jsonrpc: &quot;2.0&quot;,&#xD;&#xA;		Method:  &quot;system_health&quot;,&#xD;&#xA;		Params:  []interface{}{},&#xD;&#xA;	}&#xD;&#xA;	err = conn.WriteJSON(message)&#xD;&#xA;	if err != nil {&#xD;&#xA;		log.Fatal(&quot;write:&quot;, err)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// listen for new peers&#xD;&#xA;	for {&#xD;&#xA;		_, message, err := conn.ReadMessage()&#xD;&#xA;		if err != nil {&#xD;&#xA;			log.Fatal(&quot;read:&quot;, err)&#xD;&#xA;		}&#xD;&#xA;		fmt.Printf(&quot;New message: %s\n&quot;, message)&#xD;&#xA;		// Do something with the new message&#xD;&#xA;	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i get this response only once&#xD;&#xA;&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result{&quot;peers&quot;:32,&quot;isSyncing&quot;:true,&quot;shouldHavePeers&quot;:true},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;and the the code blocks here : conn.ReadMessage()&#xD;&#xA;&#xD;&#xA;however i expected it will stream the changes every time the peers count changes or isSyncing changes for example&#xD;&#xA;&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result{&quot;peers&quot;:32,&quot;isSyncing&quot;:true,&quot;shouldHavePeers&quot;:true},&quot;id&quot;:1}&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result{&quot;peers&quot;:33,&quot;isSyncing&quot;:true,&quot;shouldHavePeers&quot;:true},&quot;id&quot;:1}&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result{&quot;peers&quot;:34,&quot;isSyncing&quot;:true,&quot;shouldHavePeers&quot;:true},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;and so one.&#xD;&#xA;&#xD;&#xA;am i missing something here ?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32398" PostHistoryTypeId="1" PostId="8246" RevisionGUID="ed8b11a9-088e-44dd-9a98-7f24529f08ee" CreationDate="2023-04-24T22:22:44.827" UserId="4134" Text="Polkadot websocket API doesn't emits changes in stats like system_health or system_syncState" ContentLicense="CC BY-SA 4.0" />
  <row Id="32399" PostHistoryTypeId="3" PostId="8246" RevisionGUID="ed8b11a9-088e-44dd-9a98-7f24529f08ee" CreationDate="2023-04-24T22:22:44.827" UserId="4134" Text="|polkadot|golang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32400" PostHistoryTypeId="2" PostId="8247" RevisionGUID="b5477917-1b9b-4e31-bc2c-9c2d18df9fed" CreationDate="2023-04-24T23:02:19.603" UserId="4133" Text="I've been looking into Cumulus SDK's parachain and XCM handling functions in `XcmpQueue` to handle XCM protocol functions such as sending an XCM message with `send_xcm()`. I noticed that there's a message size limit check when sending the XCM message with `send_xcm()` but I did not see any message size limit check when handling the inbound XCM messages. &#xD;&#xA;&#xD;&#xA;My question is, what prevents a malicious user to write their own `send_xcm()` and spam large messages to block the queue? Is there an inherent message size limit in XCMP?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32402" PostHistoryTypeId="1" PostId="8247" RevisionGUID="b5477917-1b9b-4e31-bc2c-9c2d18df9fed" CreationDate="2023-04-24T23:02:19.603" UserId="4133" Text="What prevents a malicious user to spam large XCM messages?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32403" PostHistoryTypeId="3" PostId="8247" RevisionGUID="b5477917-1b9b-4e31-bc2c-9c2d18df9fed" CreationDate="2023-04-24T23:02:19.603" UserId="4133" Text="|xcm|xcmp|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32404" PostHistoryTypeId="50" PostId="3615" RevisionGUID="f4a6b1a9-f76f-48ca-886b-1615dceda04f" CreationDate="2023-04-25T00:06:55.900" UserId="-1" />
  <row Id="32405" PostHistoryTypeId="2" PostId="8248" RevisionGUID="c10cb575-ad3d-4050-bc6d-525a77450502" CreationDate="2023-04-25T00:23:29.040" UserId="4133" Text="I've been looking into Cumulus SDK's parachain and XCM handling functions in `XcmpQueue` to handle XCM protocol functions such as `send_xcm()`. It seems by default, messages are not signed when sent.&#xD;&#xA;&#xD;&#xA;If this is the case, what prevents a malicious person from replaying an XCM message to perform a replay attack?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32407" PostHistoryTypeId="1" PostId="8248" RevisionGUID="c10cb575-ad3d-4050-bc6d-525a77450502" CreationDate="2023-04-25T00:23:29.040" UserId="4133" Text="What prevents a replay attack in XCM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32408" PostHistoryTypeId="3" PostId="8248" RevisionGUID="c10cb575-ad3d-4050-bc6d-525a77450502" CreationDate="2023-04-25T00:23:29.040" UserId="4133" Text="|xcm|xcmp|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32409" PostHistoryTypeId="2" PostId="8249" RevisionGUID="4a5e520a-8796-4327-9f1a-405163969ba5" CreationDate="2023-04-25T00:23:39.090" UserId="2140" Text="I'll post an answer from Joshy Orndorff&#xD;&#xA;```&#xD;&#xA;Nothing that happens in the transaction pool API is committed to storage. &#xD;&#xA;Nodes call the transaction pool API when they first hear about a transaction to do some pre-checks. &#xD;&#xA;One of those pre-checks is making sure the transaction can pay its own fees. &#xD;&#xA;Only when the transaction is included in a block are the storage changes committed to state. &#xD;&#xA;So the fee amount is indeed checked twice, but only once is it deducted and written to storage. &#xD;&#xA;Ultimately the transactor only pays the fee once.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32411" PostHistoryTypeId="2" PostId="8250" RevisionGUID="5529e26a-391b-48f9-ac8e-1ad75d0fb8f6" CreationDate="2023-04-25T04:53:12.770" UserId="3470" Text="At `useInkathon` (https://github.com/scio-labs/use-inkathon) I offer a pretty straightforward `deployContract` script, together with some additional helpers defined in inkathon.xyz this results in super simple deploy scripts (example: https://github.com/scio-labs/inkathon/blob/main/packages/contracts/scripts/deploy.ts). Here at AZERO Domains we deploy a set of several dependant, rather complex contracts in a few lines only. " ContentLicense="CC BY-SA 4.0" />
  <row Id="32414" PostHistoryTypeId="2" PostId="8251" RevisionGUID="dcfeddc1-985a-4ff6-8215-80e872095f97" CreationDate="2023-04-25T05:35:38.827" UserId="2103" Text="We have been trying to build the node locally on a colleague's computer. The node successfully builds on my computer but fails to do so on the other computer. The error thrown is: &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UZ5tD.png&#xD;&#xA;&#xD;&#xA;Both the computer's have same version of rustc, also tried building the image through docker still the same issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="32416" PostHistoryTypeId="1" PostId="8251" RevisionGUID="dcfeddc1-985a-4ff6-8215-80e872095f97" CreationDate="2023-04-25T05:35:38.827" UserId="2103" Text="Feature has been removed" ContentLicense="CC BY-SA 4.0" />
  <row Id="32417" PostHistoryTypeId="3" PostId="8251" RevisionGUID="dcfeddc1-985a-4ff6-8215-80e872095f97" CreationDate="2023-04-25T05:35:38.827" UserId="2103" Text="|substrate-node-template|pallet|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32418" PostHistoryTypeId="2" PostId="8252" RevisionGUID="5342f36e-8123-45ca-bc19-79969cba9bd0" CreationDate="2023-04-25T06:04:36.773" UserId="4135" Text="I would like to submit a PR for a feature I am working on. I was able to clone `git@github.com:paritytech/substrate.git`, created a local branch/made the changes, and tried to push the branch (`git push --set-upstream origin &lt;branch name&gt;`). But I run into&#xD;&#xA;`ERROR: Permission to paritytech/substrate.git denied to &lt;user name&gt;` issue&#xD;&#xA;&#xD;&#xA;I tried all the usual github trouble shooting steps (created new set of ssh keys, verified authentication, verified&#xD;&#xA;I can read/write other github repos fine, etc). Is there anything else I might be missing? Do new contributors need to be added to any access groups, etc? &#xD;&#xA;&#xD;&#xA;[1] https://docs.github.com/en/authentication/troubleshooting-ssh/error-permission-to-userrepo-denied-to-other-user&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32420" PostHistoryTypeId="1" PostId="8252" RevisionGUID="5342f36e-8123-45ca-bc19-79969cba9bd0" CreationDate="2023-04-25T06:04:36.773" UserId="4135" Text="Unable to push a branch" ContentLicense="CC BY-SA 4.0" />
  <row Id="32421" PostHistoryTypeId="3" PostId="8252" RevisionGUID="5342f36e-8123-45ca-bc19-79969cba9bd0" CreationDate="2023-04-25T06:04:36.773" UserId="4135" Text="|dev|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32422" PostHistoryTypeId="2" PostId="8253" RevisionGUID="ca2b02b5-8bf4-481e-9988-fd026d2f40e7" CreationDate="2023-04-25T08:04:39.440" UserId="3317" Text="I try to keep it technical. First, NFT's can be can be created through a pallet (native business logic of the chain) or a smart contract (EVM / ink!) on Substrate-based chains. Have a look at [this question][1]. &#xD;&#xA;&#xD;&#xA;To your question now. You can use the same Solidity contracts on for example Moonbeam (through the EVM-pallet). You can use the same logic but write it in [ink!][2] (through pallet-contracts). Or, maybe the logic that you need is already to be found in for example the NFTs-pallet ([ref][3]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/6653/how-to-implement-nfts-on-a-substrate-chain/6664#6664&#xD;&#xA;  [2]: https://use.ink/&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/7963/what-is-the-purpose-of-tips-in-the-nfts-pallet/7966#7966" ContentLicense="CC BY-SA 4.0" />
  <row Id="32424" PostHistoryTypeId="2" PostId="8254" RevisionGUID="e05e3be6-f8eb-43d6-bbb8-b5fcfcde50d0" CreationDate="2023-04-25T08:08:04.667" UserId="165" Text="Please, take a look at the contribution guide&#xD;&#xA;- https://github.com/paritytech/substrate/blob/master/docs/CONTRIBUTING.adoc" ContentLicense="CC BY-SA 4.0" />
  <row Id="32426" PostHistoryTypeId="2" PostId="8255" RevisionGUID="9db64ac4-a8e8-488c-bfc3-fcaf4dc2313f" CreationDate="2023-04-25T09:21:44.033" UserId="94" Text="Just create a fork of Substrate in your own personal account. Then push your work onto there and create a MR back to the paritytech repo." ContentLicense="CC BY-SA 4.0" />
  <row Id="32428" PostHistoryTypeId="2" PostId="8256" RevisionGUID="41596a8e-ead6-4ca5-80f5-aa594c10d6aa" CreationDate="2023-04-25T10:19:09.910" UserId="2348" Text="i am currently using substrate full node . and i have created non native  custom  tokens through assets like of name KAR . when i transfer these custom tokens i.e KAR from one account to another the transaction fees is cutting through native tokens . can anyone please tell me how we can use these non native (custom) tokens i.e KAR for transaction fees  and where i have to  make  changes to do this ." ContentLicense="CC BY-SA 4.0" />
  <row Id="32430" PostHistoryTypeId="1" PostId="8256" RevisionGUID="41596a8e-ead6-4ca5-80f5-aa594c10d6aa" CreationDate="2023-04-25T10:19:09.910" UserId="2348" Text="how i can pay transaction fess through custom token" ContentLicense="CC BY-SA 4.0" />
  <row Id="32431" PostHistoryTypeId="3" PostId="8256" RevisionGUID="41596a8e-ead6-4ca5-80f5-aa594c10d6aa" CreationDate="2023-04-25T10:19:09.910" UserId="2348" Text="|assets|blockchain|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32432" PostHistoryTypeId="2" PostId="8257" RevisionGUID="3eb3fb8f-9edb-4981-84c8-73ffdf1acd07" CreationDate="2023-04-25T10:41:31.553" UserId="94" Text="Replay attacks only work in setups where messages are received via an un-trusted delivery mechanism - hence the need for signing; to authenticate the sender.  &#xD;&#xA;&#xD;&#xA;For XCMP, the delivery channel is already trusted. Only the sender can inject messages into the channel, no one else. The relay chain guarantees this.&#xD;&#xA;&#xD;&#xA;Now if you are *solely* looking at XCM as a language (and not the DotSama use for XCMP/VMP/HRMP) then yes - replay is possible. But so is in any other language without build-in authentication, like English." ContentLicense="CC BY-SA 4.0" />
  <row Id="32434" PostHistoryTypeId="2" PostId="8258" RevisionGUID="b9b942b1-dbdd-465e-ab48-ef84d941ae2a" CreationDate="2023-04-25T11:53:42.360" UserId="3437" Text="Would it be possible to get the information of all accounts in log? I would need this for debugging purpose.&#xD;&#xA;&#xD;&#xA;Can somebody please help me to provide this information?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32436" PostHistoryTypeId="1" PostId="8258" RevisionGUID="b9b942b1-dbdd-465e-ab48-ef84d941ae2a" CreationDate="2023-04-25T11:53:42.360" UserId="3437" Text="How to print all genesis accounts and their balances for debugging purpose?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32437" PostHistoryTypeId="3" PostId="8258" RevisionGUID="b9b942b1-dbdd-465e-ab48-ef84d941ae2a" CreationDate="2023-04-25T11:53:42.360" UserId="3437" Text="|polkadot|substrate-node-template|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32438" PostHistoryTypeId="2" PostId="8259" RevisionGUID="d0a45392-b77e-4677-b238-7d36369b95ea" CreationDate="2023-04-25T12:25:57.467" UserId="94" Text="Yes for the genesis state this is quite easy. You just need the binary and use the `build-spec` command. Having `jq` ready makes this as easy as:  &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;polkadot build-spec --dev | jq '.genesis.runtime.balances'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that on Rococo it is wrapped again in a `runtime_genesis_config`; here you have to use:  &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;polkadot build-spec --chain rococo-dev | jq '.genesis.runtime.runtime_genesis_config.balances'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The output is as expected and shows balances for `//Alice`, `//Bob`, etc.&#xD;&#xA;&#xD;&#xA;```pre&#xD;&#xA;{&#xD;&#xA;  &quot;balances&quot;: [&#xD;&#xA;    [&#xD;&#xA;      &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;      1e+18&#xD;&#xA;    ],&#xD;&#xA;    [&#xD;&#xA;      &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;      1e+18&#xD;&#xA;    ],&#xD;&#xA;    …&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32440" PostHistoryTypeId="2" PostId="8260" RevisionGUID="2a055dec-362f-495b-aae1-6f01b1077f3a" CreationDate="2023-04-25T12:40:15.170" UserId="4045" Text="I'm attempting to switch a node from using Aura to Babe by copying the usage of Babe in some public chains.&#xD;&#xA;&#xD;&#xA;However when I run multiple nodes together I get the error:&#xD;&#xA;```&#xD;&#xA;Unable to fetch auxiliary data for block 0x3d9c9122e3c7355cf0c21b8dc75cb858e4d03ce4a7f88f7639b59f6cde40b86d: Current state of blockchain has invalid authorities set &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've also noticed that `EpochStart` is `[0, 0]`. This is authorities:&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;    1&#xD;&#xA;  ]&#xD;&#xA;  [&#xD;&#xA;    0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48&#xD;&#xA;    1&#xD;&#xA;  ]&#xD;&#xA;  [&#xD;&#xA;    0x90b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22&#xD;&#xA;    1&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Genesis config sets the authoriries with&#xD;&#xA;```&#xD;&#xA;                vec![&#xD;&#xA;                    authority_keys_from_seed(&quot;Alice&quot;),&#xD;&#xA;                    authority_keys_from_seed(&quot;Bob&quot;),&#xD;&#xA;                    authority_keys_from_seed(&quot;Charlie&quot;),&#xD;&#xA;                ]&#xD;&#xA;```&#xD;&#xA;The full changeset PR is https://github.com/digicatapult/dscp-node/pull/130/files&#xD;&#xA;&#xD;&#xA;What could we causing this issue as the authorities appear to be valid?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32442" PostHistoryTypeId="1" PostId="8260" RevisionGUID="2a055dec-362f-495b-aae1-6f01b1077f3a" CreationDate="2023-04-25T12:40:15.170" UserId="4045" Text="Switching from Aura to Babe - 'Current state of blockchain has invalid authorities set'" ContentLicense="CC BY-SA 4.0" />
  <row Id="32443" PostHistoryTypeId="3" PostId="8260" RevisionGUID="2a055dec-362f-495b-aae1-6f01b1077f3a" CreationDate="2023-04-25T12:40:15.170" UserId="4045" Text="|babe|genesis|epoch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32444" PostHistoryTypeId="5" PostId="8260" RevisionGUID="26226e58-13dc-47a9-bfa1-5ef73fdb787f" CreationDate="2023-04-25T12:40:48.790" UserId="4045" Comment="edited body" Text="I'm attempting to switch a node from using Aura to Babe by copying the usage of Babe in some public chains.&#xD;&#xA;&#xD;&#xA;However when I run multiple nodes together I get the error:&#xD;&#xA;```&#xD;&#xA;Unable to fetch auxiliary data for block 0x3d9c9122e3c7355cf0c21b8dc75cb858e4d03ce4a7f88f7639b59f6cde40b86d: Current state of blockchain has invalid authorities set &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've also noticed that `EpochStart` is `[0, 0]`. This is authorities:&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  [&#xD;&#xA;    0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;    1&#xD;&#xA;  ]&#xD;&#xA;  [&#xD;&#xA;    0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48&#xD;&#xA;    1&#xD;&#xA;  ]&#xD;&#xA;  [&#xD;&#xA;    0x90b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22&#xD;&#xA;    1&#xD;&#xA;  ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Genesis config sets the authorities with&#xD;&#xA;```&#xD;&#xA;                vec![&#xD;&#xA;                    authority_keys_from_seed(&quot;Alice&quot;),&#xD;&#xA;                    authority_keys_from_seed(&quot;Bob&quot;),&#xD;&#xA;                    authority_keys_from_seed(&quot;Charlie&quot;),&#xD;&#xA;                ]&#xD;&#xA;```&#xD;&#xA;The full changeset PR is https://github.com/digicatapult/dscp-node/pull/130/files&#xD;&#xA;&#xD;&#xA;What could we causing this issue as the authorities appear to be valid?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32449" PostHistoryTypeId="2" PostId="8262" RevisionGUID="0541452c-955d-4b34-9600-be97a89ed99b" CreationDate="2023-04-25T13:54:45.680" UserId="3708" Text="I'm trying to create an asset but I always get this error:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;This is my config.toml:&#xD;&#xA;```&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;./bin/polkadot&quot;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  ws_port = 9900&#xD;&#xA;  extra_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  extra_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  extra_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;dave&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1282&#xD;&#xA;chain = &quot;moonbeam-local&quot;&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;alith&quot;&#xD;&#xA;  ws_port = 9910&#xD;&#xA;  command = &quot;./bin/moonbeam&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm using polkadot v0.9.37 and moonbeam 0.30.0-483f51e8c25. I also tried using moonbeam-dev, moonbase-dev and moonbase-loca but I get the same error.&#xD;&#xA;&#xD;&#xA;I noticed in Alith logs some warnings, can it be the problem?:&#xD;&#xA;```&#xD;&#xA;023-04-25 09:33:15.255  INFO main sc_cli::runner: Moonbeam Parachain Collator    &#xD;&#xA;2023-04-25 09:33:15.255  INFO main sc_cli::runner: ✌️  version 0.30.0-483f51e8c25    &#xD;&#xA;2023-04-25 09:33:15.255  INFO main sc_cli::runner: ❤️  by PureStake, 2019-2023    &#xD;&#xA;2023-04-25 09:33:15.255  INFO main sc_cli::runner:  Chain specification: Moonbeam Local Testnet    &#xD;&#xA;2023-04-25 09:33:15.255  INFO main sc_cli::runner:   Node name: alith    &#xD;&#xA;2023-04-25 09:33:15.255  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-04-25 09:33:15.255  INFO main sc_cli::runner:  Database: RocksDb at /var/folders/lc/2st7lfb94fl0_1mp5jl2s8c80000gq/T/zombie-1d8ef25f5cffaeeacce6550020882db4_-46194-KYAdJOYVs0ME/alith/data/chains/moonbeam_local/db/full    &#xD;&#xA;2023-04-25 09:33:15.255  INFO main sc_cli::runner: ⛓  Native runtime: moonbeam-2201 (moonbeam-0.tx2.au3)    &#xD;&#xA;2023-04-25 09:33:16.268  INFO main moonbeam_cli::command: Parachain id: Id(1282)    &#xD;&#xA;2023-04-25 09:33:16.268  INFO main moonbeam_cli::command: Parachain Account: 5Ec4AhNmfF6BURE35y65VanZ1nrUXyvdvPNF9keHhZHLtxJG    &#xD;&#xA;2023-04-25 09:33:16.268  INFO main moonbeam_cli::command: Parachain genesis state: 0x00000000000000000000000000000000000000000000000000000000000000000045fe0ca1772dbeb70680d480be2ebaacae4e6c8945444e46f9561ae7b3cd8a8603170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2023-04-25 09:33:16.268  INFO main moonbeam_cli::command: Is collating: yes    &#xD;&#xA;2023-04-25 09:33:17.115  INFO main sc_service::client::client: []  Initializing Genesis block/state (state: 0x45fe…8a86, header-hash: 0x39be…e12c)    &#xD;&#xA;2023-04-25 09:33:17.916  INFO main sc_service::client::client: [Relaychain]  Initializing Genesis block/state (state: 0xa2f1…fe39, header-hash: 0x70a7…4aa9)    &#xD;&#xA;2023-04-25 09:33:17.920 DEBUG main parachain::chain-selection: [Relaychain] Using dispute aware relay-chain selection algorithm&#xD;&#xA;2023-04-25 09:33:17.920  INFO main grandpa: [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2023-04-25 09:33:18.657  INFO main babe: [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2023-04-25 09:33:18.658  INFO main sub-libp2p: [Relaychain]   Local node identity is: 12D3KooWNWFU8YpAK9ekSHhCnkvpq82D2TABaVMJxfipVNRN8YSz    &#xD;&#xA;2023-04-25 09:33:18.671  INFO main sc_sysinfo: [Relaychain]  Operating system: macos    &#xD;&#xA;2023-04-25 09:33:18.671  INFO main sc_sysinfo: [Relaychain]  CPU architecture: aarch64    &#xD;&#xA;2023-04-25 09:33:18.671  INFO main sc_service::builder: [Relaychain]  Highest known block at #0    &#xD;&#xA;2023-04-25 09:33:18.671  INFO tokio-runtime-worker substrate_prometheus_endpoint: [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    &#xD;&#xA;2023-04-25 09:33:18.672  INFO                 main sc_rpc_server: [Relaychain] Running JSON-RPC HTTP server: addr=127.0.0.1:53798, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]    &#xD;&#xA;2023-04-25 09:33:18.672  INFO                 main sc_rpc_server: [Relaychain] Running JSON-RPC WS server: addr=127.0.0.1:53797, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]    &#xD;&#xA;2023-04-25 09:33:18.672  INFO                 main sc_sysinfo: [Relaychain]  CPU score: 810.05 MiBs    &#xD;&#xA;2023-04-25 09:33:18.672  INFO                 main sc_sysinfo: [Relaychain]  Memory score: 41.06 GiBs    &#xD;&#xA;2023-04-25 09:33:18.672  INFO                 main sc_sysinfo: [Relaychain]  Disk score (seq. writes): 3.63 GiBs    &#xD;&#xA;2023-04-25 09:33:18.672  INFO                 main sc_sysinfo: [Relaychain]  Disk score (rand. writes): 506.28 MiBs    &#xD;&#xA;2023-04-25 09:33:18.673  INFO tokio-runtime-worker parachain::approval-voting: [Relaychain] Starting with an empty approval vote DB.&#xD;&#xA;2023-04-25 09:33:18.673  WARN                 main sc_service::config: [] Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2023-04-25 09:33:18.673  INFO                 main sub-libp2p: []   Local node identity is: 12D3KooWCGmHA8TkwvxhCXhQgeragffknJL4qN1YQh4AwsE9EL4C    &#xD;&#xA;2023-04-25 09:33:18.674 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] New session detected session_index=0&#xD;&#xA;2023-04-25 09:33:18.674 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks []&#xD;&#xA;2023-04-25 09:33:18.674 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] Determined past/present/future authorities authority_count=4&#xD;&#xA;2023-04-25 09:33:18.674 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] Issuing a connection request num=0&#xD;&#xA;2023-04-25 09:33:18.674 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] error=NotAValidator&#xD;&#xA;2023-04-25 09:33:18.674 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Validation num_peers=0 removed=0&#xD;&#xA;2023-04-25 09:33:18.674  INFO                 main sc_sysinfo: []  Operating system: macos    &#xD;&#xA;2023-04-25 09:33:18.674  INFO                 main sc_sysinfo: []  CPU architecture: aarch64    &#xD;&#xA;2023-04-25 09:33:18.674  INFO                 main sc_service::builder: []  Highest known block at #0    &#xD;&#xA;2023-04-25 09:33:18.674  INFO tokio-runtime-worker substrate_prometheus_endpoint: [] 〽️ Prometheus exporter started at 0.0.0.0:53753    &#xD;&#xA;2023-04-25 09:33:18.674  INFO                 main sc_rpc_server: [] Running JSON-RPC HTTP server: addr=0.0.0.0:53752, allowed origins=[&quot;*&quot;]    &#xD;&#xA;2023-04-25 09:33:18.675  INFO                 main sc_rpc_server: [] Running JSON-RPC WS server: addr=0.0.0.0:9910, allowed origins=[&quot;*&quot;]    &#xD;&#xA;2023-04-25 09:33:18.675  INFO                 main sc_sysinfo: []  CPU score: 810.05 MiBs    &#xD;&#xA;2023-04-25 09:33:18.675  INFO                 main sc_sysinfo: []  Memory score: 41.06 GiBs    &#xD;&#xA;2023-04-25 09:33:18.675  INFO                 main sc_sysinfo: []  Disk score (seq. writes): 3.63 GiBs    &#xD;&#xA;2023-04-25 09:33:18.675  INFO                 main sc_sysinfo: []  Disk score (rand. writes): 506.28 MiBs    &#xD;&#xA;2023-04-25 09:33:18.675 DEBUG                 main parachain: [] Restoring chain level monitor from last finalized block: 0 0x39be…e12c    &#xD;&#xA;2023-04-25 09:33:18.675 DEBUG                 main parachain: [] Restored chain level monitor up to height 1    &#xD;&#xA;2023-04-25 09:33:18.676  INFO tokio-runtime-worker libp2p_mdns::behaviour: [Relaychain] discovered: 12D3KooWCGmHA8TkwvxhCXhQgeragffknJL4qN1YQh4AwsE9EL4C /ip4/192.168.0.101/tcp/53751/ws    &#xD;&#xA;2023-04-25 09:33:18.676  INFO tokio-runtime-worker libp2p_mdns::behaviour: [] discovered: 12D3KooWNWFU8YpAK9ekSHhCnkvpq82D2TABaVMJxfipVNRN8YSz /ip4/192.168.0.101/tcp/53796/ws    &#xD;&#xA;2023-04-25 09:33:18.677  INFO tokio-runtime-worker babe: [Relaychain]  New epoch 0 launching at block 0x8bd3…5580 (block slot 280404932 &gt;= start slot 280404932).    &#xD;&#xA;2023-04-25 09:33:18.677  INFO tokio-runtime-worker babe: [Relaychain]  Next epoch starts at slot 280404942    &#xD;&#xA;2023-04-25 09:33:18.678  WARN tokio-runtime-worker runtime::inclusion-inherent: [Relaychain] ParentBlockRandomness did not provide entropy    &#xD;&#xA;2023-04-25 09:33:18.679  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #1 (0x8bd3…5580)    &#xD;&#xA;2023-04-25 09:33:18.679 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x70a724d6471f57dbaa991e000c05525d373e42e78392ba8563317b70e60d4aa9&#xD;&#xA;2023-04-25 09:33:18.681 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0x8bd3544e5eab484ba720d0ce8deb0e068824ea291b655a71a16f9a0a8a885580&#xD;&#xA;2023-04-25 09:33:18.681 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=1 block_hash=0x8bd3544e5eab484ba720d0ce8deb0e068824ea291b655a71a16f9a0a8a885580 num_candidates=0&#xD;&#xA;2023-04-25 09:33:18.681 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x8bd3544e5eab484ba720d0ce8deb0e068824ea291b655a71a16f9a0a8a885580, 1)]&#xD;&#xA;2023-04-25 09:33:18.681  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #2 (0x44d0…0993)    &#xD;&#xA;2023-04-25 09:33:18.681 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x8bd3544e5eab484ba720d0ce8deb0e068824ea291b655a71a16f9a0a8a885580&#xD;&#xA;2023-04-25 09:33:18.682 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0x44d06834116be872f902b4708db507c87f4efd04f3de2bb07e98c8cde9dd0993&#xD;&#xA;2023-04-25 09:33:18.682 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=2 block_hash=0x44d06834116be872f902b4708db507c87f4efd04f3de2bb07e98c8cde9dd0993 num_candidates=0&#xD;&#xA;2023-04-25 09:33:18.682 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x44d06834116be872f902b4708db507c87f4efd04f3de2bb07e98c8cde9dd0993, 2)]&#xD;&#xA;2023-04-25 09:33:21.043  INFO tokio-runtime-worker jsonrpsee_server::server: Accepting new connection 1/100&#xD;&#xA;2023-04-25 09:33:23.673  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (4 peers), best: #2 (0x44d0…0993), finalized #0 (0x70a7…4aa9), ⬇ 9.6kiB/s ⬆ 7.4kiB/s    &#xD;&#xA;2023-04-25 09:33:23.673 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1682339603 min_ts=0 max_ts=0&#xD;&#xA;2023-04-25 09:33:23.675  INFO tokio-runtime-worker substrate: []  Idle (0 peers), best: #0 (0x39be…e12c), finalized #0 (0x39be…e12c), ⬇ 1.1kiB/s ⬆ 0.7kiB/s    &#xD;&#xA;2023-04-25 09:33:24.015  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #3 (0xa8e3…3f53)    &#xD;&#xA;2023-04-25 09:33:24.017 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x44d06834116be872f902b4708db507c87f4efd04f3de2bb07e98c8cde9dd0993&#xD;&#xA;2023-04-25 09:33:24.018 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0xa8e3ffd585325bef6b2995cb41792fd48dd998655b977e379de26e5a75c43f53&#xD;&#xA;2023-04-25 09:33:24.018 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=3 block_hash=0xa8e3ffd585325bef6b2995cb41792fd48dd998655b977e379de26e5a75c43f53 num_candidates=0&#xD;&#xA;2023-04-25 09:33:24.018 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0xa8e3ffd585325bef6b2995cb41792fd48dd998655b977e379de26e5a75c43f53, 3)]&#xD;&#xA;2023-04-25 09:33:26.641 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0x8bd3544e5eab484ba720d0ce8deb0e068824ea291b655a71a16f9a0a8a885580 block_number=1&#xD;&#xA;2023-04-25 09:33:28.518  INFO tokio-runtime-worker jsonrpsee_server::server: Accepting new connection 1/100&#xD;&#xA;2023-04-25 09:33:28.677 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1682339608 min_ts=0 max_ts=0&#xD;&#xA;2023-04-25 09:33:28.677  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (4 peers), best: #3 (0xa8e3…3f53), finalized #1 (0x8bd3…5580), ⬇ 5.4kiB/s ⬆ 3.3kiB/s    &#xD;&#xA;2023-04-25 09:33:28.677  INFO tokio-runtime-worker substrate: []  Idle (0 peers), best: #0 (0x39be…e12c), finalized #0 (0x39be…e12c), ⬇ 79 B/s ⬆ 79 B/s    &#xD;&#xA;2023-04-25 09:33:30.031  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #4 (0x2eef…5a1b)    &#xD;&#xA;2023-04-25 09:33:30.031 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0xa8e3ffd585325bef6b2995cb41792fd48dd998655b977e379de26e5a75c43f53&#xD;&#xA;2023-04-25 09:33:30.033  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #4 (0x98c0…917f)    &#xD;&#xA;2023-04-25 09:33:30.036 DEBUG tokio-runtime-worker parachain::dispute-distribution: [Relaychain] Dispute coordinator slow? We are still waiting for data on next active leaves update.&#xD;&#xA;2023-04-25 09:33:30.037 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0x2eef570f223d1a8bede53eb9b583c13bbd5bdf790c125168b707e9f9a5a65a1b&#xD;&#xA;2023-04-25 09:33:30.037 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=4 block_hash=0x2eef570f223d1a8bede53eb9b583c13bbd5bdf790c125168b707e9f9a5a65a1b num_candidates=0&#xD;&#xA;2023-04-25 09:33:30.037 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x2eef570f223d1a8bede53eb9b583c13bbd5bdf790c125168b707e9f9a5a65a1b, 4)]&#xD;&#xA;2023-04-25 09:33:30.038 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0x98c0832e090527293e8642e22d0e4ee714e8b4e5426efb7f0b67a1eddc19917f&#xD;&#xA;2023-04-25 09:33:30.038 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=4 block_hash=0x98c0832e090527293e8642e22d0e4ee714e8b4e5426efb7f0b67a1eddc19917f num_candidates=0&#xD;&#xA;2023-04-25 09:33:30.038 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x98c0832e090527293e8642e22d0e4ee714e8b4e5426efb7f0b67a1eddc19917f, 4)]&#xD;&#xA;2023-04-25 09:33:33.679 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1682339613 min_ts=0 max_ts=0&#xD;&#xA;2023-04-25 09:33:33.680  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (4 peers), best: #4 (0x2eef…5a1b), finalized #1 (0x8bd3…5580), ⬇ 3.6kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2023-04-25 09:33:33.680  INFO tokio-runtime-worker substrate: []  Idle (0 peers), best: #0 (0x39be…e12c), finalized #0 (0x39be…e12c), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-04-25 09:33:34.676 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0x44d06834116be872f902b4708db507c87f4efd04f3de2bb07e98c8cde9dd0993 block_number=2&#xD;&#xA;2023-04-25 09:33:36.030  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #5 (0x9d1d…f3b6)    &#xD;&#xA;2023-04-25 09:33:36.030 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x2eef570f223d1a8bede53eb9b583c13bbd5bdf790c125168b707e9f9a5a65a1b&#xD;&#xA;2023-04-25 09:33:36.033 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0x9d1d170e51affb122413baae533d39ae0b51d57fe6ca1cb398ad1de908fdf3b6&#xD;&#xA;2023-04-25 09:33:36.033 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=5 block_hash=0x9d1d170e51affb122413baae533d39ae0b51d57fe6ca1cb398ad1de908fdf3b6 num_candidates=0&#xD;&#xA;2023-04-25 09:33:36.033 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x9d1d170e51affb122413baae533d39ae0b51d57fe6ca1cb398ad1de908fdf3b6, 5)]&#xD;&#xA;2023-04-25 09:33:36.033  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #5 (0xde54…3a73)    &#xD;&#xA;2023-04-25 09:33:36.034 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0xde540b7ad56c1249c2422510afebcedb3d8c5eccf8bfc8b3161201ee5fe43a73&#xD;&#xA;2023-04-25 09:33:36.034 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=5 block_hash=0xde540b7ad56c1249c2422510afebcedb3d8c5eccf8bfc8b3161201ee5fe43a73 num_candidates=0&#xD;&#xA;2023-04-25 09:33:36.034 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0xde540b7ad56c1249c2422510afebcedb3d8c5eccf8bfc8b3161201ee5fe43a73, 5)]&#xD;&#xA;2023-04-25 09:33:38.686 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1682339618 min_ts=0 max_ts=0&#xD;&#xA;2023-04-25 09:33:38.686  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (4 peers), best: #5 (0x9d1d…f3b6), finalized #2 (0x44d0…0993), ⬇ 3.2kiB/s ⬆ 2.1kiB/s    &#xD;&#xA;2023-04-25 09:33:38.686  INFO tokio-runtime-worker substrate: []  Idle (0 peers), best: #0 (0x39be…e12c), finalized #0 (0x39be…e12c), ⬇ 49 B/s ⬆ 49 B/s    &#xD;&#xA;2023-04-25 09:33:38.689 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0xa8e3ffd585325bef6b2995cb41792fd48dd998655b977e379de26e5a75c43f53 block_number=3&#xD;&#xA;2023-04-25 09:33:42.028  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #6 (0xbd15…5084)    &#xD;&#xA;2023-04-25 09:33:42.028 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x9d1d170e51affb122413baae533d39ae0b51d57fe6ca1cb398ad1de908fdf3b6&#xD;&#xA;2023-04-25 09:33:42.030 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0xbd15c24dcff6b676af087227743eea46f4850a64fa2070e7c8e9fb31de3b5084&#xD;&#xA;2023-04-25 09:33:42.030 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=6 block_hash=0xbd15c24dcff6b676af087227743eea46f4850a64fa2070e7c8e9fb31de3b5084 num_candidates=0&#xD;&#xA;2023-04-25 09:33:42.030 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0xbd15c24dcff6b676af087227743eea46f4850a64fa2070e7c8e9fb31de3b5084, 6)]&#xD;&#xA;2023-04-25 09:33:43.690 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1682339623 min_ts=0 max_ts=0&#xD;&#xA;2023-04-25 09:33:43.691  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (4 peers), best: #6 (0xbd15…5084), finalized #3 (0xa8e3…3f53), ⬇ 2.9kiB/s ⬆ 2.7kiB/s    &#xD;&#xA;2023-04-25 09:33:43.691  INFO tokio-runtime-worker substrate: []  Idle (0 peers), best: #0 (0x39be…e12c), finalized #0 (0x39be…e12c), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-04-25 09:33:46.717 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x98c0832e090527293e8642e22d0e4ee714e8b4e5426efb7f0b67a1eddc19917f&#xD;&#xA;2023-04-25 09:33:46.717 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0x2eef570f223d1a8bede53eb9b583c13bbd5bdf790c125168b707e9f9a5a65a1b block_number=4&#xD;&#xA;2023-04-25 09:33:48.032  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #7 (0x94a9…ac6a)    &#xD;&#xA;2023-04-25 09:33:48.034 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0xbd15c24dcff6b676af087227743eea46f4850a64fa2070e7c8e9fb31de3b5084&#xD;&#xA;2023-04-25 09:33:48.036 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0x94a9187462a341ba057b526c15605ac3a83e0245df20bf80bb5c5872157fac6a&#xD;&#xA;2023-04-25 09:33:48.037 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=7 block_hash=0x94a9187462a341ba057b526c15605ac3a83e0245df20bf80bb5c5872157fac6a num_candidates=0&#xD;&#xA;2023-04-25 09:33:48.037 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x94a9187462a341ba057b526c15605ac3a83e0245df20bf80bb5c5872157fac6a, 7)]&#xD;&#xA;2023-04-25 09:33:48.692 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1682339628 min_ts=0 max_ts=0&#xD;&#xA;2023-04-25 09:33:48.695  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (4 peers), best: #7 (0x94a9…ac6a), finalized #4 (0x2eef…5a1b), ⬇ 2.4kiB/s ⬆ 2.1kiB/s    &#xD;&#xA;2023-04-25 09:33:48.695  INFO tokio-runtime-worker substrate: []  Idle (0 peers), best: #0 (0x39be…e12c), finalized #0 (0x39be…e12c), ⬇ 49 B/s ⬆ 49 B/s    &#xD;&#xA;2023-04-25 09:33:50.736 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0x9d1d170e51affb122413baae533d39ae0b51d57fe6ca1cb398ad1de908fdf3b6 block_number=5&#xD;&#xA;2023-04-25 09:33:50.737 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0xde540b7ad56c1249c2422510afebcedb3d8c5eccf8bfc8b3161201ee5fe43a73&#xD;&#xA;2023-04-25 09:33:53.695 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1682339633 min_ts=0 max_ts=0&#xD;&#xA;2023-04-25 09:33:53.696  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (4 peers), best: #7 (0x94a9…ac6a), finalized #5 (0x9d1d…f3b6), ⬇ 3.6kiB/s ⬆ 2.2kiB/s    &#xD;&#xA;2023-04-25 09:33:53.696  INFO tokio-runtime-worker substrate: []  Idle (0 peers), best: #0 (0x39be…e12c), finalized #0 (0x39be…e12c), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-04-25 09:33:54.036  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #8 (0xd158…5e05)    &#xD;&#xA;2023-04-25 09:33:54.037 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x94a9187462a341ba057b526c15605ac3a83e0245df20bf80bb5c5872157fac6a&#xD;&#xA;2023-04-25 09:33:54.040 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0xd1589f3741d5fceb8af08d98da8f565ad6c19403259f6e1b4f2e4b64892c5e05&#xD;&#xA;2023-04-25 09:33:54.040 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=8 block_hash=0xd1589f3741d5fceb8af08d98da8f565ad6c19403259f6e1b4f2e4b64892c5e05 num_candidates=0&#xD;&#xA;2023-04-25 09:33:54.040 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0xd1589f3741d5fceb8af08d98da8f565ad6c19403259f6e1b4f2e4b64892c5e05, 8)]&#xD;&#xA;2023-04-25 09:33:58.700 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1682339638 min_ts=0 max_ts=0&#xD;&#xA;2023-04-25 09:33:58.701  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (4 peers), best: #8 (0xd158…5e05), finalized #5 (0x9d1d…f3b6), ⬇ 1.6kiB/s ⬆ 1.1kiB/s    &#xD;&#xA;2023-04-25 09:33:58.701  INFO tokio-runtime-worker substrate: []  Idle (0 peers), best: #0 (0x39be…e12c), finalized #0 (0x39be…e12c), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-04-25 09:33:58.768 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0xbd15c24dcff6b676af087227743eea46f4850a64fa2070e7c8e9fb31de3b5084 block_number=6&#xD;&#xA;2023-04-25 09:34:00.034  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #9 (0x3c83…7789)    &#xD;&#xA;2023-04-25 09:34:00.034 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0xd1589f3741d5fceb8af08d98da8f565ad6c19403259f6e1b4f2e4b64892c5e05&#xD;&#xA;2023-04-25 09:34:00.037 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0x3c8333a7a58ed6eb576016f741aa4442a96944a8272b1e55630d8b3bbc787789&#xD;&#xA;2023-04-25 09:34:00.037 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=9 block_hash=0x3c8333a7a58ed6eb576016f741aa4442a96944a8272b1e55630d8b3bbc787789 num_candidates=0&#xD;&#xA;2023-04-25 09:34:00.037 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x3c8333a7a58ed6eb576016f741aa4442a96944a8272b1e55630d8b3bbc787789, 9)]&#xD;&#xA;2023-04-25 09:34:02.780 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0x94a9187462a341ba057b526c15605ac3a83e0245df20bf80bb5c5872157fac6a block_number=7&#xD;&#xA;2023-04-25 09:34:03.701 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1682339643 min_ts=0 max_ts=0&#xD;&#xA;2023-04-25 09:34:03.702  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (4 peers), best: #9 (0x3c83…7789), finalized #7 (0x94a9…ac6a), ⬇ 3.4kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2023-04-25 09:34:03.702  INFO tokio-runtime-worker substrate: []  Idle (0 peers), best: #0 (0x39be…e12c), finalized #0 (0x39be…e12c), ⬇ 49 B/s ⬆ 49 B/s    &#xD;&#xA;2023-04-25 09:34:06.032  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #10 (0x0042…469d)    &#xD;&#xA;2023-04-25 09:34:06.033 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x3c8333a7a58ed6eb576016f741aa4442a96944a8272b1e55630d8b3bbc787789&#xD;&#xA;2023-04-25 09:34:06.036  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #10 (0xa071…5e6a)    &#xD;&#xA;2023-04-25 09:34:06.037 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0x0042fb3548d9d61f4362deb38b02fda28bb58df0653c63cbbcf6a0be2987469d&#xD;&#xA;2023-04-25 09:34:06.037 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=10 block_hash=0x0042fb3548d9d61f4362deb38b02fda28bb58df0653c63cbbcf6a0be2987469d num_candidates=0&#xD;&#xA;2023-04-25 09:34:06.038 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0x0042fb3548d9d61f4362deb38b02fda28bb58df0653c63cbbcf6a0be2987469d, 10)]&#xD;&#xA;2023-04-25 09:34:06.042 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Insta-approving all candidates block_hash=0xa0711804f52dbac01f0e5ef0d3254b217097348993bffc0329f819c150785e6a&#xD;&#xA;2023-04-25 09:34:06.042 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Imported new block. block_number=10 block_hash=0xa0711804f52dbac01f0e5ef0d3254b217097348993bffc0329f819c150785e6a num_candidates=0&#xD;&#xA;2023-04-25 09:34:06.042 DEBUG tokio-runtime-worker parachain::approval-distribution: [Relaychain] Got new blocks [(0xa0711804f52dbac01f0e5ef0d3254b217097348993bffc0329f819c150785e6a, 10)]&#xD;&#xA;2023-04-25 09:34:08.705 DEBUG tokio-runtime-worker parachain::chain-selection: [Relaychain] Prepared 0 stagnant entries for pruning up_to=1682339648 min_ts=0 max_ts=0&#xD;&#xA;2023-04-25 09:34:08.707  INFO tokio-runtime-worker substrate: []  Idle (0 peers), best: #0 (0x39be…e12c), finalized #0 (0x39be…e12c), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-04-25 09:34:08.707  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (4 peers), best: #10 (0x0042…469d), finalized #7 (0x94a9…ac6a), ⬇ 2.2kiB/s ⬆ 1.7kiB/s    &#xD;&#xA;2023-04-25 09:34:10.817 DEBUG tokio-runtime-worker parachain::approval-voting: [Relaychain] Block finalized block_hash=0xd1589f3741d5fceb8af08d98da8f565ad6c19403259f6e1b4f2e4b64892c5e05 block_number=8&#xD;&#xA;2023-04-25 09:34:12.031  INFO tokio-runtime-worker babe: [Relaychain]  New epoch 1 launching at block 0x4a80…73b5 (block slot 280404942 &gt;= start slot 280404942).    &#xD;&#xA;2023-04-25 09:34:12.031  INFO tokio-runtime-worker babe: [Relaychain]  Next epoch starts at slot 280404952    &#xD;&#xA;2023-04-25 09:34:12.034  INFO tokio-runtime-worker babe: [Relaychain]  New epoch 1 launching at block 0x2cbe…cb10 (block slot 280404942 &gt;= start slot 280404942).    &#xD;&#xA;2023-04-25 09:34:12.034  INFO tokio-runtime-worker babe: [Relaychain]  Next epoch starts at slot 280404952    &#xD;&#xA;2023-04-25 09:34:12.034  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #11 (0x4a80…73b5)    &#xD;&#xA;2023-04-25 09:34:12.035 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Removing relay parent because our view changed. relay_parent=0x0042fb3548d9d61f4362deb38b02fda28bb58df0653c63cbbcf6a0be2987469d&#xD;&#xA;2023-04-25 09:34:12.036  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #11 (0x2cbe…cb10)    &#xD;&#xA;2023-04-25 09:34:12.039 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] New session detected session_index=1&#xD;&#xA;2023-04-25 09:34:12.039 DEBUG tokio-runtime-worker parachain::dispute-distribution: [Relaychain] Dispute coordinator slow? We are still waiting for data on next active leaves update.&#xD;&#xA;2023-04-25 09:34:12.039  INFO tokio-runtime-worker parachain::approval-voting: [Relaychain] Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 0, new_window_start: 0, new_window_end: 1 }&#xD;&#xA;2023-04-25 09:34:12.039 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] Determined past/present/future authorities authority_count=4&#xD;&#xA;2023-04-25 09:34:12.039 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] Issuing a connection request num=0&#xD;&#xA;2023-04-25 09:34:12.039 DEBUG tokio-runtime-worker parachain::gossip-support: [Relaychain] error=NotAValidator&#xD;&#xA;2023-04-25 09:34:12.039 DEBUG tokio-runtime-worker parachain::validator-discovery: [Relaychain] New ConnectToValidators resolved request peer_set=Validation num_peers=0 removed=0  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/PhrY0.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/5k1UN.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/Y3bzT.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="32451" PostHistoryTypeId="1" PostId="8262" RevisionGUID="0541452c-955d-4b34-9600-be97a89ed99b" CreationDate="2023-04-25T13:54:45.680" UserId="3708" Text="Error creating asset in moonbeam with zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="32452" PostHistoryTypeId="3" PostId="8262" RevisionGUID="0541452c-955d-4b34-9600-be97a89ed99b" CreationDate="2023-04-25T13:54:45.680" UserId="3708" Text="|zombienet|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32453" PostHistoryTypeId="52" PostId="8252" RevisionGUID="07ff6156-7a7d-4784-a8ef-af4d5a6dc379" CreationDate="2023-04-25T14:06:53.207" />
  <row Id="32454" PostHistoryTypeId="2" PostId="8263" RevisionGUID="d3a00d25-73d3-4232-9db3-7d28cff0e5b3" CreationDate="2023-04-25T15:07:11.133" UserId="4132" Text="Who is it voluntary for? The buyer or the creator of the NFT?&#xD;&#xA;&#xD;&#xA;Does the tip get awarded to the creator after every transfer? &#xD;&#xA;&#xD;&#xA;Is it voluntary for the buyer each time or is it only voluntary during the creation of the NFT and the first transfer?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="32456" PostHistoryTypeId="1" PostId="8263" RevisionGUID="d3a00d25-73d3-4232-9db3-7d28cff0e5b3" CreationDate="2023-04-25T15:07:11.133" UserId="4132" Text="How does the pay_tips parameter work for NFTs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32457" PostHistoryTypeId="3" PostId="8263" RevisionGUID="d3a00d25-73d3-4232-9db3-7d28cff0e5b3" CreationDate="2023-04-25T15:07:11.133" UserId="4132" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32458" PostHistoryTypeId="2" PostId="8264" RevisionGUID="4c520bb2-7ded-4aa6-aa0f-7d556d9995cf" CreationDate="2023-04-25T15:25:48.320" UserId="3977" Text="Simply removing the Cargo.lock file worked for me." ContentLicense="CC BY-SA 4.0" />
  <row Id="32460" PostHistoryTypeId="5" PostId="8263" RevisionGUID="41ddbd52-9b86-4c7e-bd36-55751e689a1f" CreationDate="2023-04-25T15:29:58.597" UserId="4132" Comment="added 95 characters in body" Text="Who is it voluntary for? The buyer or the creator of the NFT?&#xD;&#xA;&#xD;&#xA;Does the tip get awarded to the creator after every transfer? &#xD;&#xA;&#xD;&#xA;Is it voluntary for the buyer each time or is it only voluntary during the creation of the NFT and the first transfer?&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/nfts/src/features/buy_sell.rs#L25&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="32461" PostHistoryTypeId="2" PostId="8265" RevisionGUID="555dc030-fc80-4939-9950-9442550c71c3" CreationDate="2023-04-25T15:37:56.373" UserId="29" Text="So with [`pay_tips`](https://github.com/paritytech/substrate/blob/6f0f5a92739b92199b3345fc4a716211c8a8b46f/frame/nfts/src/lib.rs#L1712-L1727) dispatchable call there is a concept of a receiver and a sender. It is voluntary for this extrinsic to be called, meaning &quot;paying tips&quot; is not a required part of buying/selling an NFT in this pallet. &#xD;&#xA;&#xD;&#xA;Additionally, the receiver is defined within `ItemTip` struct:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Information about the tip.&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct ItemTip&lt;CollectionId, ItemId, AccountId, Amount&gt; {&#xD;&#xA;	/// The collection of the item.&#xD;&#xA;	pub(super) collection: CollectionId,&#xD;&#xA;	/// An item of which the tip is sent for.&#xD;&#xA;	pub(super) item: ItemId,&#xD;&#xA;	/// A sender of the tip.&#xD;&#xA;	pub(super) receiver: AccountId,&#xD;&#xA;	/// An amount the sender is willing to tip.&#xD;&#xA;	pub(super) amount: Amount,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/6f0f5a92739b92199b3345fc4a716211c8a8b46f/frame/nfts/src/types.rs#L182-L193&#xD;&#xA;&#xD;&#xA;Notice how the receiver is associated with a collection and item id - the design decision here was to use `pay_tips` for a buyer to voluntarily pay the creator royalties:&#xD;&#xA;&#xD;&#xA;&gt; `pay_tips`: Pay tips, could be used for paying the creator royalties.&#xD;&#xA;- https://github.com/paritytech/substrate/tree/master/frame/nfts#permissionless-dispatchables&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32463" PostHistoryTypeId="5" PostId="8265" RevisionGUID="85605d89-2459-4981-9c98-7726f2ae70a2" CreationDate="2023-04-25T15:43:21.157" UserId="29" Comment="added 204 characters in body" Text="So with [`pay_tips`](https://github.com/paritytech/substrate/blob/6f0f5a92739b92199b3345fc4a716211c8a8b46f/frame/nfts/src/lib.rs#L1712-L1727) dispatchable call there is a concept of a receiver and a sender. It is voluntary for this extrinsic to be called, meaning &quot;paying tips&quot; is not a required part of buying/selling an NFT in this pallet. &#xD;&#xA;&#xD;&#xA;Additionally, the receiver is defined within `ItemTip` struct:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Information about the tip.&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct ItemTip&lt;CollectionId, ItemId, AccountId, Amount&gt; {&#xD;&#xA;	/// The collection of the item.&#xD;&#xA;	pub(super) collection: CollectionId,&#xD;&#xA;	/// An item of which the tip is sent for.&#xD;&#xA;	pub(super) item: ItemId,&#xD;&#xA;	/// A sender of the tip.&#xD;&#xA;	pub(super) receiver: AccountId,&#xD;&#xA;	/// An amount the sender is willing to tip.&#xD;&#xA;	pub(super) amount: Amount,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/6f0f5a92739b92199b3345fc4a716211c8a8b46f/frame/nfts/src/types.rs#L182-L193&#xD;&#xA;&#xD;&#xA;Notice how the receiver is associated with a collection and item id - the design decision here was to use `pay_tips` for a buyer to voluntarily pay the creator royalties:&#xD;&#xA;&#xD;&#xA;&gt; `pay_tips`: Pay tips, could be used for paying the creator royalties.&#xD;&#xA;- https://github.com/paritytech/substrate/tree/master/frame/nfts#permissionless-dispatchables&#xD;&#xA;&#xD;&#xA;There is work being done to create a coupled pallet that makes royalties a requirement of NFT sales. You can follow the work on this branch:&#xD;&#xA;- https://github.com/paritytech/substrate/tree/bg/nfts-royalty" ContentLicense="CC BY-SA 4.0" />
  <row Id="32464" PostHistoryTypeId="6" PostId="8263" RevisionGUID="d7923cb3-d030-4ecf-97fe-629cbeb55a48" CreationDate="2023-04-25T15:47:27.500" UserId="29" Comment="edited tags" Text="|frame|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32466" PostHistoryTypeId="2" PostId="8266" RevisionGUID="f675b930-a17e-4ae7-b7ac-499bfdaecd61" CreationDate="2023-04-25T16:25:12.090" UserId="3244" Text="There is an enforced message size limit on the Polkadot side. &#xD;&#xA;&#xD;&#xA;Right now all XCM messages passed between Parachains are transported via HRMP (horizontal message passing). This involves passing the message up to the relay chain, which then forwards the message back down to another parachain.&#xD;&#xA;&#xD;&#xA;The relay chain simply drops any parachain block containing an oversized message. The message would never reach its destination. So you can’t spam another parachain with large messages in the way you suggested.&#xD;&#xA;&#xD;&#xA;ump::Pallet::check_upward_messages does this. The max size is currently 102_400 bytes per message as set in the HostConfiguration in Polkadot’s chain spec.&#xD;&#xA;&#xD;&#xA;When a message passing protocol other than HRMP is implemented for XCM, that protocol will need to mimic the size limiting that already takes place in HRMP.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32468" PostHistoryTypeId="2" PostId="8267" RevisionGUID="6d82483f-8804-4289-9635-28848eff8363" CreationDate="2023-04-25T17:51:27.967" UserId="29" Text="This is not a Zombienet issue.&#xD;&#xA;&#xD;&#xA;This is a `CallFilter` issue.&#xD;&#xA;&#xD;&#xA;It may be that your moon-xxx chain is running with a `NormalFilter`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Normal Call Filter&#xD;&#xA;/// **We dont allow to create nor mint assets**, this for now is disabled&#xD;&#xA;/// We only allow transfers. For now creation of assets will go through&#xD;&#xA;/// asset-manager, while minting/burning only happens through xcm messages&#xD;&#xA;/// This can change in the future&#xD;&#xA;pub struct NormalFilter;&#xD;&#xA;impl Contains&lt;RuntimeCall&gt; for NormalFilter {&#xD;&#xA;```&#xD;&#xA;- https://github.com/PureStake/moonbeam/blob/0545adc8c95551b2edfd263d7e1d77bbeeea1855/runtime/moonriver/src/lib.rs#L1000-L1005" ContentLicense="CC BY-SA 4.0" />
  <row Id="32470" PostHistoryTypeId="52" PostId="8258" RevisionGUID="8e8bc701-c290-4f74-8c02-2132cafca300" CreationDate="2023-04-25T19:53:49.320" />
  <row Id="32471" PostHistoryTypeId="2" PostId="8268" RevisionGUID="b69af90a-6bba-461f-b94e-b447327ff26b" CreationDate="2023-04-25T22:08:39.803" UserId="3598" Text="I noticed that the pallet_randomness_collective_flip been removed in polkadot-v0.9.39, why is this?&#xD;&#xA;&#xD;&#xA;What are the alternatives?&#xD;&#xA;&#xD;&#xA;Thanks," ContentLicense="CC BY-SA 4.0" />
  <row Id="32473" PostHistoryTypeId="1" PostId="8268" RevisionGUID="b69af90a-6bba-461f-b94e-b447327ff26b" CreationDate="2023-04-25T22:08:39.803" UserId="3598" Text="Why has the pallet_randomness_collective_flip been removed in polkadot-v0.9.39?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32474" PostHistoryTypeId="3" PostId="8268" RevisionGUID="b69af90a-6bba-461f-b94e-b447327ff26b" CreationDate="2023-04-25T22:08:39.803" UserId="3598" Text="|polkadot|pallet|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32475" PostHistoryTypeId="5" PostId="8268" RevisionGUID="00088cf7-d270-4d48-a6ae-4984cd7df96e" CreationDate="2023-04-25T22:08:59.810" UserId="3598" Comment="added 4 characters in body" Text="I noticed that the pallet_randomness_collective_flip has been removed in polkadot-v0.9.39, why is this?&#xD;&#xA;&#xD;&#xA;What are the alternatives?&#xD;&#xA;&#xD;&#xA;Thanks," ContentLicense="CC BY-SA 4.0" />
  <row Id="32476" PostHistoryTypeId="2" PostId="8269" RevisionGUID="673eb86e-13a2-409a-8c93-ba832d5670b4" CreationDate="2023-04-25T22:35:32.817" UserId="94" Text="It was renamed to `pallet-insecure-randomness-collective-flip` in [substrate#13301](https://github.com/paritytech/substrate/pull/13301) to clarify that it is not secure. There were indications that developers used this in production to generate random numbers for security relevant decisions.  &#xD;&#xA;&#xD;&#xA;The pallet was never intended for that, so we felt prompted to communicate this in a breaking way (by renaming the crate). As of today, there are no secure alternatives that i know of." ContentLicense="CC BY-SA 4.0" />
  <row Id="32478" PostHistoryTypeId="5" PostId="325" RevisionGUID="269c1e20-12e1-4aa7-9e95-cab7a93ae620" CreationDate="2023-04-26T00:38:48.147" UserId="29" Comment="added 91 characters in body" Text="If you take a look at this diagram:&#xD;&#xA;&#xD;&#xA;![](https://d33wubrfki0l68.cloudfront.net/04485e45edfb524bfbebdf0270455902ff5912af/56a28/static/505c4ec510929c01c0e608225c5c598a/6edca/off-chain-workers-v2.png)&#xD;&#xA; &#xD;&#xA;The dotted red lines indicate that the Off-Chain Worker (OCW), although existing in the Substrate Node in tandem with the Substrate Runtime, actually lives in its own separate WASM execution environment - denoted by the dotted red line. One of the main reasons the OCW lives in the Node with the Substrate Runtime is so that it can have access to on-chain state and also so that, if opted-in, the runtime can have access to Off-Chain Storage via Off-Chain Indexing.&#xD;&#xA;&#xD;&#xA;An OCW can be thought of as a second application that runs alongside the blockchain. That being said, your OCW can listen to events from the runtime and react in some manner to those events. Your Substrate Runtime should not have any idea that your OCW exists nor should it assume so.&#xD;&#xA;&#xD;&#xA;More info: https://docs.substrate.io/reference/how-to-guides/offchain-workers&#xD;&#xA;&#xD;&#xA;Also read:&#xD;&#xA;- https://forum.polkadot.network/t/offchain-workers-design-assumptions-vulnerabilities&#xD;&#xA;&#xD;&#xA;[This video](https://youtu.be/Gvu39Q2TcqA) has legacy code but is helpful in how one should think of OCWs." ContentLicense="CC BY-SA 4.0" />
  <row Id="32479" PostHistoryTypeId="5" PostId="383" RevisionGUID="b26f5624-509f-483b-a45d-b85b23670f2a" CreationDate="2023-04-26T00:42:30.567" UserId="29" Comment="added 52 characters in body" Text="The metadata provides essential information regarding the substrate blockchain you are connecting to.&#xD;&#xA;&#xD;&#xA;It is unique to that chain's runtime. &#xD;&#xA;&#xD;&#xA;The chain's runtime metadata includes information such as storage items, extrinsic calls, events, constants, and errors that are exposed by that chain's runtime via the various pallets that were used to construct it. &#xD;&#xA;&#xD;&#xA;The metadata most likely will change if the runtime gets upgraded. Therefore you need to make sure you always get the latest metadata.&#xD;&#xA;&#xD;&#xA;The [frame-metadata](https://github.com/paritytech/frame-metadata) repo defines the metadata. Substrate chains implement that type definition. [Frame-metadata](https://github.com/paritytech/frame-metadata) type definitions are versioned e.g. v12, v13, ...&#xD;&#xA;&#xD;&#xA;You can see a nicely formatted example of a metadata [here](https://gist.github.com/insipx/db5e49c0160b1f1bd421a3c34fefdf48).&#xD;&#xA;&#xD;&#xA;Reference: https://docs.substrate.io/build/application-development/#exposing-runtime-information-as-metadata&#xD;&#xA;&#xD;&#xA;I do see your logic though. There could be a way of caching the metadata on the client side so that subsequent requests only check the metadata's version number/hash with the one you have cached. If the version is the same, no need to get the full metadata. If the version you have is out-of-date, then pull the full metadata from the chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="32480" PostHistoryTypeId="5" PostId="405" RevisionGUID="c1bc71cc-9f87-4086-8705-e457dab4691b" CreationDate="2023-04-26T00:44:40.883" UserId="29" Comment="added 20 characters in body" Text="Looks like your error is coming from the rococo pallet with index 31 so that would be the [AssignedSlots pallet](https://github.com/paritytech/polkadot/blob/v0.9.16/runtime/rococo/src/lib.rs#L243), and specifically Error 1 which is [Cannot Onboard](https://github.com/paritytech/polkadot/blob/ccf7f7ffffe818d84bcf954152446e7a14dccbc9/runtime/parachains/src/paras/mod.rs#L497): &#xD;&#xA;&#xD;&#xA;&gt; Para cannot be onboarded because it is already tracked by our system.&#xD;&#xA;&#xD;&#xA;Which makes sense in your case because you mentioned that you are looking to extend therefore you're already in the system...&#xD;&#xA;&#xD;&#xA;So the issue that I see is a couple things...&#xD;&#xA;&#xD;&#xA;The `sudo` key is currently controlled by Parity Tech:&#xD;&#xA;- https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/#request-a-parachain-slot&#xD;&#xA;&#xD;&#xA;&gt; The Rococo `sudo` key is controlled by Parity tech at this time, so to&#xD;&#xA;&gt; have the operation required to get a slot, please place a request on&#xD;&#xA;&gt; the Parachain Technical matrix channel once you complete the above and&#xD;&#xA;&gt; are ready to connect! They will initiate the slot for you ASAP.&#xD;&#xA;&gt; &#xD;&#xA;&gt; At this point, requesting a permanent or temporary parachain slot&#xD;&#xA;&gt; still a privileged (sudo) operation to be performed by the (Rococo)&#xD;&#xA;&gt; test chain's operator (using a call to the assignedSlots pallet's&#xD;&#xA;&gt; dispatchable functions) but the long-term plan is to make it a&#xD;&#xA;&gt; community-driven process via Rococo's governance framework.&#xD;&#xA;&#xD;&#xA;Additionally, if you have already been approved and downgraded from your slot:&#xD;&#xA;&#xD;&#xA;&gt; Please do note that when your temporary slot's lease ends, the&#xD;&#xA;&gt; parachain is automatically downgraded to a parathread. Registered and&#xD;&#xA;&gt; approved slots are cycled through automatically in a round-robin&#xD;&#xA;&gt; fashion, so you will expect to come back online as a parachain from&#xD;&#xA;&gt; time to time.&#xD;&#xA;&#xD;&#xA;A note on **Temporary** Parachain Slots on Rococo:&#xD;&#xA;&#xD;&#xA;&gt; Temporary slots are parachain slots that are dynamically allocated in&#xD;&#xA;&gt; a continuous rollover manner. Concretely, at every start of a lease&#xD;&#xA;&gt; period, a certain number of parathreads (up to a maximum defined in&#xD;&#xA;&gt; the relay chain's configuration) will be automatically upgraded to&#xD;&#xA;&gt; parachains for a certain duration. The parachains that were active&#xD;&#xA;&gt; during the ending lease period will be automatically downgraded to&#xD;&#xA;&gt; parathreads to free the slots for others to use in the subsequent one." ContentLicense="CC BY-SA 4.0" />
  <row Id="32481" PostHistoryTypeId="2" PostId="8270" RevisionGUID="a9f16847-b775-4df3-9aaa-8c2f78a800fd" CreationDate="2023-04-26T02:01:22.777" UserId="2844" Text="We've minted some ERC20 tokens `XCAV coins` on our node. Can the Sporran wallet receive `XCAV token`? I transfer `XCAV` and it success but I didn't saw any token in wallet.&#xD;&#xA;&#xD;&#xA;Someone please give some advice. Thanks!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32483" PostHistoryTypeId="1" PostId="8270" RevisionGUID="a9f16847-b775-4df3-9aaa-8c2f78a800fd" CreationDate="2023-04-26T02:01:22.777" UserId="2844" Text="Receive XCAV token to sporran wallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="32484" PostHistoryTypeId="3" PostId="8270" RevisionGUID="a9f16847-b775-4df3-9aaa-8c2f78a800fd" CreationDate="2023-04-26T02:01:22.777" UserId="2844" Text="|polkadot-js|did|kilt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32485" PostHistoryTypeId="5" PostId="8256" RevisionGUID="291123af-874c-406d-939c-6626accb2c44" CreationDate="2023-04-26T05:33:34.840" UserId="2348" Comment="added 3 characters in body; edited title" Text="i am currently using substrate full node . and i have created non native  custom  tokens through assets like of name KAR . when i transfer these custom tokens i.e KAR from one account to another the transaction fees is dedeucting through native tokens . can anyone please tell me how we can use these non native (custom) tokens i.e KAR for transaction fees  and where i have to  make  changes to do this ." ContentLicense="CC BY-SA 4.0" />
  <row Id="32486" PostHistoryTypeId="4" PostId="8256" RevisionGUID="291123af-874c-406d-939c-6626accb2c44" CreationDate="2023-04-26T05:33:34.840" UserId="2348" Comment="added 3 characters in body; edited title" Text="how i can pay transaction fees through custom token" ContentLicense="CC BY-SA 4.0" />
  <row Id="32487" PostHistoryTypeId="2" PostId="8271" RevisionGUID="8fa9d10d-6ab6-499f-8ff7-0d378a88dd73" CreationDate="2023-04-26T05:44:34.760" UserId="492" Text="The sporran wallet only supports KILT coins. There is a development version which also supports the coins of the testnet Peregrine (PILT)." ContentLicense="CC BY-SA 4.0" />
  <row Id="32489" PostHistoryTypeId="52" PostId="8268" RevisionGUID="f2a48eba-0794-48e1-bcfc-65c715841f89" CreationDate="2023-04-26T06:09:06.747" />
  <row Id="32490" PostHistoryTypeId="2" PostId="8272" RevisionGUID="3cb19559-9613-490d-a8ed-ac3f2070cd39" CreationDate="2023-04-26T07:51:41.260" UserId="3319" Text="i want to to benchmark signing and verifying sr25519 signatures and for that i need to create a bunch of key pairs, sign some data then verify it, however using sp_core::sr25519::Pair is not allowed, it throws this error:&#xD;&#xA;&#xD;&#xA;      error[E0432]: unresolved import `sp_core::sr25519::Pair`&#xD;&#xA;       --&gt; /home/test/projects/custom/pallet/src/benchmarking.rs:8:5&#xD;&#xA;        |&#xD;&#xA;      8 | use sp_core::sr25519::Pair;&#xD;&#xA;        |     ^^^^^^^^^^^^^^^^^^^^^^ no `Pair` in `sr25519`&#xD;&#xA;&#xD;&#xA;i assume this is happening because it could be leaking som std features that im not aware of, so how do i solve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32492" PostHistoryTypeId="1" PostId="8272" RevisionGUID="3cb19559-9613-490d-a8ed-ac3f2070cd39" CreationDate="2023-04-26T07:51:41.260" UserId="3319" Text="how to create a bunch of key pairs when benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="32493" PostHistoryTypeId="3" PostId="8272" RevisionGUID="3cb19559-9613-490d-a8ed-ac3f2070cd39" CreationDate="2023-04-26T07:51:41.260" UserId="3319" Text="|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32494" PostHistoryTypeId="5" PostId="8264" RevisionGUID="994da09d-d410-4ee9-bbca-c6d0baa2211b" CreationDate="2023-04-26T07:54:05.007" UserId="3977" Comment="added 74 characters in body" Text="Removing Cargo.lock file and changing `optional = true` to `false` in Cargo.toml `frame-benchmarking`'s entry worked for me." ContentLicense="CC BY-SA 4.0" />
  <row Id="32495" PostHistoryTypeId="5" PostId="8272" RevisionGUID="ae8a6bf9-dcdb-42ae-8cb5-64a044ba6fc6" CreationDate="2023-04-26T08:04:48.920" UserId="3319" Comment="added 11 characters in body" Text="i want to to benchmark signing and verifying sr25519 signatures and for that i need to create a bunch of key pairs, sign some data then verify it, however using sp_core::sr25519::Pair is not allowed, it throws this error:&#xD;&#xA;&#xD;&#xA;      error[E0432]: unresolved import `sp_core::sr25519::Pair`&#xD;&#xA;       --&gt; /home/test/projects/custom/pallet/src/benchmarking.rs:8:5&#xD;&#xA;        |&#xD;&#xA;      8 | use sp_core::sr25519::Pair;&#xD;&#xA;        |     ^^^^^^^^^^^^^^^^^^^^^^ no `Pair` in `sr25519`&#xD;&#xA;&#xD;&#xA;i assume this is happening because it could be leaking some std features in Pair so it wouldn't compile, so how do i solve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32496" PostHistoryTypeId="5" PostId="8272" RevisionGUID="79acbad7-2f9c-4003-8e26-92ce13a116a1" CreationDate="2023-04-26T08:29:07.260" UserId="251" Comment="deleted 20 characters in body" Text="i want to to benchmark signing and verifying sr25519 signatures and for that i need to create a bunch of key pairs, sign some data then verify it, however using `sp_core::sr25519::Pair` is not allowed, it throws this error:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0432]: unresolved import `sp_core::sr25519::Pair`&#xD;&#xA; --&gt; /home/test/projects/custom/pallet/src/benchmarking.rs:8:5&#xD;&#xA;  |&#xD;&#xA;8 | use sp_core::sr25519::Pair;&#xD;&#xA;  |     ^^^^^^^^^^^^^^^^^^^^^^ no `Pair` in `sr25519`&#xD;&#xA;```&#xD;&#xA;I assume this is happening because it could be leaking some std features in Pair so it wouldn't compile, so how do I solve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32497" PostHistoryTypeId="2" PostId="8273" RevisionGUID="c4de7e17-6414-481f-be21-9e9b4986f8ad" CreationDate="2023-04-26T09:01:00.703" UserId="4105" Text="I am implementing a pallet, that stores in on-chain storage (aka StorageNMap's) some user provided data. Pallet is performing offchain computations by iterating on-chain storage from offchain-worker and creates transactions back on chain, but algorithm is quite unefficient, due structure of on-chain data is not optimized to iterate in a way that offchain algorithm needs.&#xD;&#xA;&#xD;&#xA;I am looking for some solution, to keep offchain cache of on-chain storage (like &quot;view&quot; on current on-chain data) without need to store stale/historical data. In other words, offchain worker needs to reorgainze structure of on-chain data for faster computations, but this structure is not beneficial from on-chain perspective. We can assume that amount of data in on-chain storage is huge, so recreating the cache from scratch in each block is expensive. Instead, it would be great to have an option to compute the cache and maintain it after each block for example by iterating events.&#xD;&#xA;&#xD;&#xA;I have analyzed few options there:&#xD;&#xA;1) There is an option to create fork-aware local storage via `StorageValueRef` API:&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;    let s_info = sp_runtime::offchain::storage::StorageValueRef::local(&#xD;&#xA;	    b&quot;my-pallet::cache_for_offchain_worker&quot;,&#xD;&#xA;	);&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;    If I assume that this cache will be able to maintain forks, I can try to lock this storage from offchain-worker each time offchain_worker function is called, iterate through events in a block and insert data to the storage, release mutex and perform offchain computations bases on a cached data.&#xD;&#xA;    But I am affraid of a cases, that offchain_worker function may be triggered multiple times (here mutex and keeping last block update number may help) and not triggered at all (according to the documentation it is possible as well). In this cases, my cache may be not up-to-date. &#xD;&#xA;&#xD;&#xA;2. To achieve deterministic writes to an offchain storage the next option is of course offchain indexing. But this method does not allow to modify data from on-chain code, instead it allows to create new or remove existing keys. Here in theory I can try to perform deterministic writes from `on_finalize` function and store in offchain storage events from this block:&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;       sp_io::offchain_index::set(b&quot;block_numer_here&quot;, b&quot;data_to_be_added_to_cache_for_this_block&quot;);&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;   This should in theory solve an issue from case 1) with nondeterministic writes, so offchain_worker call for block N may first check if cache exists, if not then iterate entire on-chain set, create cache and for N+1 blocks relay on data from offchain_index set. But this idea is in contradiction with a fact, that this cache does not need historical data, so I should probably implement some pruning window (like 10 blocks) and remove obsolete keys from offchain_index from `on_finalize` function. Also, offchain_worker still needs to perform &quot;modification&quot; of the cache with new data for N+1 scenario, due indexing is not able to do this.&#xD;&#xA;&#xD;&#xA;3) Third option I see is to reorganize the on-chain storage in a way that it will be optimized for offchain computations, but less optimized for everything else. Here the data may be stored in some sorted manner via BTreeMap's, so offchain worker will be able to perform queries faster and iterate data in expeced order. Then storing offchain data will be obsolete (offchain worker will be relaying only on on-chain storage). Reorganization of the on-chain structure will increase complexity of other operations, but it may be one of the trade-offs if maintaining of the cache will be more complex/hard to implement.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32499" PostHistoryTypeId="1" PostId="8273" RevisionGUID="c4de7e17-6414-481f-be21-9e9b4986f8ad" CreationDate="2023-04-26T09:01:00.703" UserId="4105" Text="Offchain cache/view of on-chain storage data" ContentLicense="CC BY-SA 4.0" />
  <row Id="32500" PostHistoryTypeId="3" PostId="8273" RevisionGUID="c4de7e17-6414-481f-be21-9e9b4986f8ad" CreationDate="2023-04-26T09:01:00.703" UserId="4105" Text="|offchain-worker|offchain-storage|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32501" PostHistoryTypeId="5" PostId="8272" RevisionGUID="b327a82d-6da9-4422-a679-7a7b29517625" CreationDate="2023-04-26T09:02:55.217" UserId="3319" Comment="added 13 characters in body" Text="i want to to benchmark verifying sr25519 signatures and for that i need to create a bunch of key pairs, sign some data then benchmark the verification process, however using `sp_core::sr25519::Pair` is not allowed, it throws this error:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0432]: unresolved import `sp_core::sr25519::Pair`&#xD;&#xA; --&gt; /home/test/projects/custom/pallet/src/benchmarking.rs:8:5&#xD;&#xA;  |&#xD;&#xA;8 | use sp_core::sr25519::Pair;&#xD;&#xA;  |     ^^^^^^^^^^^^^^^^^^^^^^ no `Pair` in `sr25519`&#xD;&#xA;```&#xD;&#xA;I assume this is happening because it could be leaking some std features in Pair so it wouldn't compile, so how do I solve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32502" PostHistoryTypeId="5" PostId="8272" RevisionGUID="35b58de7-2691-4747-b660-b63ab7c36147" CreationDate="2023-04-26T09:12:14.807" UserId="3319" Comment="added 181 characters in body" Text="i want to to benchmark verifying sr25519 signatures and for that i need to create a bunch of key pairs, sign some data then benchmark the verification process, however using `sp_core::sr25519::Pair` is not allowed, it throws this error:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0432]: unresolved import `sp_core::sr25519::Pair`&#xD;&#xA; --&gt; /home/test/projects/custom/pallet/src/benchmarking.rs:8:5&#xD;&#xA;  |&#xD;&#xA;8 | use sp_core::sr25519::Pair;&#xD;&#xA;  |     ^^^^^^^^^^^^^^^^^^^^^^ no `Pair` in `sr25519`&#xD;&#xA;```&#xD;&#xA;I assume this is happening because it could be leaking some std features in Pair so it wouldn't compile, so how do I solve this? &#xD;&#xA;&#xD;&#xA;PS: im not tied necessarily to that specific struct(in fact first time going to work with it) i used to work with a `cryptostore` that generates `sr25519` keys, so anything similar." ContentLicense="CC BY-SA 4.0" />
  <row Id="32503" PostHistoryTypeId="5" PostId="8273" RevisionGUID="0e1e4936-a306-4184-9da5-bb890d041289" CreationDate="2023-04-26T09:24:05.530" UserId="4105" Comment="added 2 characters in body" Text="I am implementing a pallet, that stores in on-chain storage (aka StorageNMap's) some user provided data. Pallet is performing offchain computations by iterating on-chain storage from offchain-worker and creates transactions back on chain, but algorithm is quite unefficient, due structure of on-chain data is not optimized to iterate in a way that offchain algorithm needs.&#xD;&#xA;&#xD;&#xA;I am looking for some solution, to keep offchain cache of on-chain storage (like &quot;view&quot; on current on-chain data) without need to store stale/historical data. In other words, offchain worker needs to reorgainze structure of on-chain data for faster computations, but this structure is not beneficial from on-chain perspective. We can assume that amount of data in on-chain storage is huge, so recreating the cache from scratch in each block is expensive. Instead, it would be great to have an option to compute the cache and maintain it after each block for example by iterating events.&#xD;&#xA;&#xD;&#xA;I have analyzed few options there:&#xD;&#xA;1) There is an option to create fork-aware local storage via `StorageValueRef` API:&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;    let s_info = sp_runtime::offchain::storage::StorageValueRef::local(&#xD;&#xA;	    b&quot;my-pallet::cache_for_offchain_worker&quot;,&#xD;&#xA;	);&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;    If I assume that this cache will be able to maintain forks, I can try to lock this storage from offchain-worker each time offchain_worker function is called, iterate through events in a block and insert data to the storage, release mutex and perform offchain computations bases on a cached data.&#xD;&#xA;    But I am affraid of a cases, that offchain_worker function may be triggered multiple times (here mutex and keeping last block update number may help) and not triggered at all (according to the documentation it is possible as well). In this cases, my cache may be not up-to-date. &#xD;&#xA;&#xD;&#xA;2. To achieve deterministic writes to an offchain storage the next option is of course offchain indexing. But this method does not allow to modify data from on-chain code, instead it allows to create new or remove existing keys. Here in theory I can try to perform deterministic writes from `on_finalize` function and store in offchain storage events from this block:&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;       sp_io::offchain_index::set(b&quot;block_numer_here&quot;, b&quot;data_to_be_added_to_cache_for_this_block&quot;);&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;   This should in theory solve an issue from case 1) with nondeterministic writes, so offchain_worker call for block N may first check if cache exists, if not then iterate entire on-chain set, create cache and for N+1 blocks relay on data from offchain_index set. But this idea is in contradiction with a fact, that this cache does not need historical data, so I should probably implement some pruning window (like 10 blocks) and remove obsolete keys from offchain_index from `on_initialize` function. Also, offchain_worker still needs to perform &quot;modification&quot; of the cache with new data for N+1 scenario, due indexing is not able to do this.&#xD;&#xA;&#xD;&#xA;3) Third option I see is to reorganize the on-chain storage in a way that it will be optimized for offchain computations, but less optimized for everything else. Here the data may be stored in some sorted manner via BTreeMap's, so offchain worker will be able to perform queries faster and iterate data in expeced order. Then storing offchain data will be obsolete (offchain worker will be relaying only on on-chain storage). Reorganization of the on-chain structure will increase complexity of other operations, but it may be one of the trade-offs if maintaining of the cache will be more complex/hard to implement.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32504" PostHistoryTypeId="2" PostId="8274" RevisionGUID="05285b14-51c9-4496-b0b7-d4d09af07065" CreationDate="2023-04-26T09:25:24.800" UserId="4065" Text="I follow this instruction [link][1]  to deploy an upgradable contract link. When I have to deploy the contract only gives me 2 methods flip and get. When I want to change the forward contract to invoke the change_forward_address method, the method Disappeared. Please help&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/tree/main/upgradeable-contracts/forward-calls&#xD;&#xA;  [2]: https://i.stack.imgur.com/2Ke2r.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32506" PostHistoryTypeId="1" PostId="8274" RevisionGUID="05285b14-51c9-4496-b0b7-d4d09af07065" CreationDate="2023-04-26T09:25:24.800" UserId="4065" Text="change_forward_address method Disappeared" ContentLicense="CC BY-SA 4.0" />
  <row Id="32507" PostHistoryTypeId="3" PostId="8274" RevisionGUID="05285b14-51c9-4496-b0b7-d4d09af07065" CreationDate="2023-04-26T09:25:24.800" UserId="4065" Text="|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32508" PostHistoryTypeId="50" PostId="7768" RevisionGUID="7ef58c75-34b1-43a6-a18a-825c80fb936c" CreationDate="2023-04-26T10:02:20.270" UserId="-1" />
  <row Id="32509" PostHistoryTypeId="2" PostId="8275" RevisionGUID="c4d87789-35be-482e-a6b3-ded434a6f02a" CreationDate="2023-04-26T10:34:23.743" UserId="234" Text="As mentioned at the end of the [README][1] :&#xD;&#xA;&#xD;&#xA;&gt; *To change the address of the smart contract where calls are forwarded&#xD;&#xA;&gt; to, you would switch the metadata (i.e. the Contract ABI) back to the&#xD;&#xA;&gt; forwards_calls contract and then invoke the change_forward_address&#xD;&#xA;&gt; message.*&#xD;&#xA;&#xD;&#xA;You would have to change again the metadata of the contract &quot;FLIPPER PROXY&quot; (assuming that this is the &quot;FORWARD CALLS&quot; contract that you initially changed its metadata) following the same steps (also mentioned in the README) as before in polkadot-js apps: &#xD;&#xA;- Click on the name of `FLIPPER_PROXY` and copy its address&#xD;&#xA;- Click on the top right button &quot;Add an existing contract&quot;, insert the just copied address and upload the `forward_calls.contract` for the Contract ABI.&#xD;&#xA;&#xD;&#xA;Then the methods `changeForwardAddress` and `forward` should re-appear under &quot;FLIPPER PROXY&quot;. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/tree/main/upgradeable-contracts/forward-calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="32511" PostHistoryTypeId="52" PostId="8270" RevisionGUID="ad7e2b5d-62b0-4f1c-ab04-195c239eaf01" CreationDate="2023-04-26T11:21:23.263" />
  <row Id="32512" PostHistoryTypeId="2" PostId="8276" RevisionGUID="6352635c-08b3-4c8f-9490-705311c4170b" CreationDate="2023-04-26T11:59:12.447" UserId="3319" Text="I have some heavy computation done off-chain (in outer node) and i want to benchmark those functions, does substrate offer tools for doing it or should i rely on a third party library to do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32514" PostHistoryTypeId="1" PostId="8276" RevisionGUID="6352635c-08b3-4c8f-9490-705311c4170b" CreationDate="2023-04-26T11:59:12.447" UserId="3319" Text="does substrate offer bunchamrking utilities in outer node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32515" PostHistoryTypeId="3" PostId="8276" RevisionGUID="6352635c-08b3-4c8f-9490-705311c4170b" CreationDate="2023-04-26T11:59:12.447" UserId="3319" Text="|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32516" PostHistoryTypeId="2" PostId="8277" RevisionGUID="a62ac7e3-0d82-45f9-a74f-36d92888d6ba" CreationDate="2023-04-26T12:19:05.450" UserId="4081" Text="The purpose of benchmarking in Substrate is to measure the resources and time it takes to execute different functions in the runtime and accurately assign weights to extrinsics, which determine their priority in the transaction queue&#xD;&#xA;&#xD;&#xA;If the computation is done outside the runtime there is no real purpose for assigning weights to those functions.&#xD;&#xA;&#xD;&#xA;But in the end benchmarks are just tests under the hood, so the traditional testing framework built in Rust should allow you to get any of the values you need to estimate the resources that your functions are using." ContentLicense="CC BY-SA 4.0" />
  <row Id="32518" PostHistoryTypeId="2" PostId="8278" RevisionGUID="d3168c60-5c20-41b3-b382-35fa1d414d90" CreationDate="2023-04-26T12:28:56.497" UserId="94" Text="FRAME benchmarking is only for pallet calls. Everything else can use Criterion et. al." ContentLicense="CC BY-SA 4.0" />
  <row Id="32520" PostHistoryTypeId="5" PostId="8256" RevisionGUID="c9a1eddc-6cea-4724-b494-4b4f3616862a" CreationDate="2023-04-26T12:47:34.383" UserId="2348" Comment="added 358 characters in body" Text="i am currently using substrate full node . and i have created non native  custom  tokens through assets like of name KAR . when i transfer these custom tokens i.e KAR from one account to another the transaction fees is dedeucting through native tokens . can anyone please tell me how we can use these non native (custom) tokens i.e KAR for transaction fees  and where i have to  make  changes to do this .&#xD;&#xA;&#xD;&#xA;i have followed [this][1] and made an Api for `SignedExtension` but still the fees is getting deducted from the native token the link for my api is [api][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3752/how-to-pay-transaction-fees-using-the-custom-token-created-by-using-pallet-asset&#xD;&#xA;  [2]: https://github.com/karanvir12/Asset_Api.git" ContentLicense="CC BY-SA 4.0" />
  <row Id="32521" PostHistoryTypeId="4" PostId="8276" RevisionGUID="8941c47a-3d5c-427f-a3ae-575e5edfab62" CreationDate="2023-04-26T13:37:49.767" UserId="4081" Comment="syntax fix" Text="Does substrate offer benchmarking utilities in outer node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32522" PostHistoryTypeId="24" PostId="8276" RevisionGUID="8941c47a-3d5c-427f-a3ae-575e5edfab62" CreationDate="2023-04-26T13:37:49.767" Comment="Proposed by 4081 approved by 29 edit id of 410" ContentLicense="CC BY-SA 4.0" />
  <row Id="32523" PostHistoryTypeId="2" PostId="8279" RevisionGUID="709b6ad0-29f7-4527-851d-4c67e1751b2a" CreationDate="2023-04-26T14:28:46.730" UserId="4140" Text="I'm developing an app and there I have the possibility to generate qrcodes to ask for payments in multiple blockchains using multiple tokens. For EVM blockchains I do have the eip681 to guide me (https://eips.ethereum.org/EIPS/eip-681) the idea is the qrcode be made of the described url. I could find for bitcoin (https://en.bitcoin.it/wiki/BIP_0021), Solana (https://github.com/solana-labs/solana-pay/blob/master/SPEC.md), Stellar (https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0007.md#operation-pay) but for Polkadot I'm searching for days with no success.&#xD;&#xA;&#xD;&#xA;Is there something similar for Polkadot? If so, where can I find the documentation for such?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32525" PostHistoryTypeId="1" PostId="8279" RevisionGUID="709b6ad0-29f7-4527-851d-4c67e1751b2a" CreationDate="2023-04-26T14:28:46.730" UserId="4140" Text="eip-681 equivalent for Polkadot to generate qrcodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="32526" PostHistoryTypeId="3" PostId="8279" RevisionGUID="709b6ad0-29f7-4527-851d-4c67e1751b2a" CreationDate="2023-04-26T14:28:46.730" UserId="4140" Text="|polkadot|evm|assets|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32527" PostHistoryTypeId="2" PostId="8280" RevisionGUID="d81101c5-30ca-4a59-bda1-2d7acbd4a684" CreationDate="2023-04-26T16:04:50.580" UserId="83" Text="If I go to https://substrate.io/developers/smart-contracts/ and click on any of the 6x hyperlinks called [Open ink! Playground][1] it takes me to https://ink-playground.substrate.io/ and returns `404 page not found`.&#xD;&#xA;&#xD;&#xA;But at https://substrate.io/developers/smart-contracts/ if I click the Developer &gt; [Playground][2] link in the footer it takes me to https://substrate.io/developers/playground/ where I can launch Substrate Node Template at https://playground.substrate.dev/?deploy=node-template or launch Substrate Front-End Template at https://playground.substrate.dev/?deploy=front-end-template.&#xD;&#xA;&#xD;&#xA;Why are the ink! Playground links broken?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://ink-playground.substrate.io/&#xD;&#xA;  [2]: https://substrate.io/developers/playground/" ContentLicense="CC BY-SA 4.0" />
  <row Id="32529" PostHistoryTypeId="1" PostId="8280" RevisionGUID="d81101c5-30ca-4a59-bda1-2d7acbd4a684" CreationDate="2023-04-26T16:04:50.580" UserId="83" Text="Why are all the ink! Playground links broken in the official Substrate docs at substrate.dev?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32530" PostHistoryTypeId="3" PostId="8280" RevisionGUID="d81101c5-30ca-4a59-bda1-2d7acbd4a684" CreationDate="2023-04-26T16:04:50.580" UserId="83" Text="|ink|smart-contract|documentation|playground|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32531" PostHistoryTypeId="5" PostId="8280" RevisionGUID="d312c5e6-ad3e-4535-b9d6-00d4255d3ece" CreationDate="2023-04-26T16:13:38.413" UserId="83" Comment="update question" Text="If I go to https://substrate.io/developers/smart-contracts/ and click on any of the 6x hyperlinks called [Open ink! Playground][1] it takes me to https://ink-playground.substrate.io/ and returns `404 page not found`.&#xD;&#xA;&#xD;&#xA;But at https://substrate.io/developers/smart-contracts/ if I click the Developer &gt; [Playground][2] link in the footer it takes me to https://substrate.io/developers/playground/ where I can launch Substrate Node Template at https://playground.substrate.dev/?deploy=node-template or launch Substrate Front-End Template at https://playground.substrate.dev/?deploy=front-end-template.&#xD;&#xA;&#xD;&#xA;Why are the all the ink! Playground links broken and does the official Substrate docs website use a broken link validator tool to update a site service health status page anywhere? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://ink-playground.substrate.io/&#xD;&#xA;  [2]: https://substrate.io/developers/playground/" ContentLicense="CC BY-SA 4.0" />
  <row Id="32532" PostHistoryTypeId="2" PostId="8281" RevisionGUID="1eea6fd1-f802-41c1-b168-0bcf1e17e718" CreationDate="2023-04-26T18:27:57.610" UserId="4065" Text="I Already write code with openbrush.io and set Attribute on constructor here my code :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;#![feature(min_specialization)]&#xD;&#xA;        &#xD;&#xA;#[openbrush::contract]&#xD;&#xA;pub mod my_psp34 {&#xD;&#xA;    &#xD;&#xA;    // imports from openbrush&#xD;&#xA;	use openbrush::traits::String;&#xD;&#xA;	use openbrush::traits::Storage;&#xD;&#xA;	use openbrush::contracts::psp34::extensions::mintable::*;&#xD;&#xA;	use openbrush::contracts::psp34::extensions::enumerable::*;&#xD;&#xA;	use openbrush::contracts::psp34::extensions::metadata::*;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(Default, Storage)]&#xD;&#xA;    pub struct Psp34Basic {&#xD;&#xA;    	#[storage_field]&#xD;&#xA;		psp34: psp34::Data&lt;Balances&gt;,&#xD;&#xA;		#[storage_field]&#xD;&#xA;		metadata: metadata::Data,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Section contains default implementation without any modifications&#xD;&#xA;	impl PSP34 for Psp34Basic {}&#xD;&#xA;	impl PSP34Mintable for Psp34Basic {}&#xD;&#xA;	impl PSP34Enumerable for Psp34Basic {}&#xD;&#xA;	impl PSP34Metadata for Psp34Basic {}&#xD;&#xA;     &#xD;&#xA;    impl Psp34Basic {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let mut _instance = Self::default();&#xD;&#xA;			_instance._mint_to(_instance.env().caller(), Id::U8(1)).expect(&quot;Can mint&quot;);&#xD;&#xA;			let collection_id = _instance.collection_id();&#xD;&#xA;			_instance._set_attribute(collection_id.clone(), String::from(&quot;name&quot;), String::from(&quot;PSP34BASIC&quot;));&#xD;&#xA;			_instance._set_attribute(collection_id, String::from(&quot;symbol&quot;), String::from(&quot;PSPB&quot;));&#xD;&#xA;			_instance&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The code success to deploy, when i want to get attribute using PSP34 metadata get_attribute the value is null. Please help me how i retrieve symbol attribute or name ?&#xD;&#xA;&#xD;&#xA;here i give image how i call the attribute?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5Ay53.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32534" PostHistoryTypeId="1" PostId="8281" RevisionGUID="1eea6fd1-f802-41c1-b168-0bcf1e17e718" CreationDate="2023-04-26T18:27:57.610" UserId="4065" Text="PSP34 Get Attribute Null Value" ContentLicense="CC BY-SA 4.0" />
  <row Id="32535" PostHistoryTypeId="3" PostId="8281" RevisionGUID="1eea6fd1-f802-41c1-b168-0bcf1e17e718" CreationDate="2023-04-26T18:27:57.610" UserId="4065" Text="|smart-contract|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32540" PostHistoryTypeId="2" PostId="8283" RevisionGUID="74c767b4-daf9-4292-8454-a74b985fc477" CreationDate="2023-04-26T18:58:36.960" UserId="555" Text="I need to change the balances of all the **accounts** in a pallet, For that first i need to fetch the accounts in the pallet. How to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32542" PostHistoryTypeId="1" PostId="8283" RevisionGUID="74c767b4-daf9-4292-8454-a74b985fc477" CreationDate="2023-04-26T18:58:36.960" UserId="555" Text="How to fetch all accounts in a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32543" PostHistoryTypeId="3" PostId="8283" RevisionGUID="74c767b4-daf9-4292-8454-a74b985fc477" CreationDate="2023-04-26T18:58:36.960" UserId="555" Text="|substrate-node-template|account|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32544" PostHistoryTypeId="5" PostId="2677" RevisionGUID="8e18aa70-1b45-403d-8343-80cdbcfc0e9a" CreationDate="2023-04-26T19:12:21.883" UserId="234" Comment="Updated the link that points to the ink example" Text="&gt;The code allows you to either upload `metadata.json` &amp;&amp; `cont.wasm` files or a `cont.contract` file.&#xD;&#xA;&#xD;&#xA;The difference between the files is as follows:&#xD;&#xA;&#xD;&#xA;### `hello-world.wasm`&#xD;&#xA;Just the WebAssembly bytecode. You can look at this in a somehow human readable form by executing `wasm2wat hello-world.wasm &gt; hello-world.wat` and viewing the file in an editor.&#xD;&#xA;&#xD;&#xA;_This file will be stored on-chain._&#xD;&#xA;&#xD;&#xA;### `metadata.json`&#xD;&#xA;Contains the contracts metadata. You might also know this under the term &quot;ABI&quot; from other blockchain projects. This file contains a multitude of information about the contract ‒ none which is stored in the `.wasm`.&#xD;&#xA;&#xD;&#xA;You can execute `cat metadata.json | jq .` to get a pretty print of the file. You'll see that it contains information such as: which functions can be invoked on the contract, which compiler was used for it (important for reproducible builds), the storage layout of the contract, etc..&#xD;&#xA;&#xD;&#xA;_It's important that this file is not stored on the blockchain._ &#xD;&#xA;&#xD;&#xA;This file is needed if you build e.g. a user interface, a Dapp, a client, something along those lines. Than that application would read the metadata to find out how to interact with the contract. For example, each function on the contract has a selector. This selector is a unique sequence of bytes that can be used to identify the function which is called. So in order to interact with the contract you need to know how the selectors are defined.&#xD;&#xA;&#xD;&#xA;### `hello-world.contract`&#xD;&#xA;&#xD;&#xA;This file is just the `metadata.json` with an additional field `.source.wasm`. This field contains the Wasm bytecode in hex encoding. You can pretty print this file and look at it by executing `cat hello-world.contract | jq .`. It really only has this one field more.&#xD;&#xA;&#xD;&#xA;_This file is used if you upload a contract to a chain, e.g. via Contracts UI or polkadot-js. It's Wasm bytecode part will be stored on-chain, it's metadata part will be used by the UI to display information and interaction possibilities for the contract._ &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And then for your second question:&#xD;&#xA;&#xD;&#xA;&gt;What is the difference between the usage of a `.json` &amp;&amp; `.wasm` file and a `.contract` file for instantiation?&#xD;&#xA;&#xD;&#xA;It's still in the UI's for two reasons:&#xD;&#xA;* For legacy reasons, we only introduced the `.contract` format later on.&#xD;&#xA;* If you want to work with upgradeable contracts you need an option to set a different `metadata.json` for a contract that already exists on-chain. This is because the originally uploaded `.contract` file might have been updated and now you want to interact with it using the metadata format from the contract to which it was upgraded. You can find more details on this in our readme for an example of such an upgradeable contract ([here](https://github.com/paritytech/ink-examples/tree/main/upgradeable-contracts/forward-calls))." ContentLicense="CC BY-SA 4.0" />
  <row Id="32545" PostHistoryTypeId="5" PostId="5005" RevisionGUID="34842372-38c1-40be-9db6-c739742b92df" CreationDate="2023-04-26T19:20:26.080" UserId="3123" Comment="use permalink instead of simple link" Text="This is not currently possible, and something I might not encourage anyway due to the intended deterministic nature of the runtime.&#xD;&#xA;&#xD;&#xA;You can see here we have had a similar need, and there is note that this is not handled yet:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/9476d2157a0d266677dee144a8a7bc44a6b821e1/frame/system/src/lib.rs#L371&#xD;&#xA;&#xD;&#xA;If this is a feature you think is needed, please [open an issue on Substrate](https://github.com/paritytech/substrate/issues/new/choose), and describe how you would like to use this feature." ContentLicense="CC BY-SA 4.0" />
  <row Id="32546" PostHistoryTypeId="24" PostId="5005" RevisionGUID="34842372-38c1-40be-9db6-c739742b92df" CreationDate="2023-04-26T19:20:26.080" Comment="Proposed by 3123 approved by 251, 28 edit id of 408" ContentLicense="CC BY-SA 4.0" />
  <row Id="32547" PostHistoryTypeId="2" PostId="8284" RevisionGUID="38e58fa2-a6f6-4152-929b-3bca430fd5ee" CreationDate="2023-04-26T20:20:38.443" UserId="29" Text="For ECDSA in Substrate you will get a 32 byte Account:&#xD;&#xA;```rust&#xD;&#xA;Self::Ecdsa(who) =&gt; sp_io::hashing::blake2_256(who.as_ref()).into()&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/943c520aa78fcfaf3509790009ad062e8d4c6990/primitives/runtime/src/lib.rs#L336&#xD;&#xA;&#xD;&#xA;If you want to replicate this outside of Substrate you can hash the 33 byte Ecdsa public key with blake2_256 which will return a 32 byte hash." ContentLicense="CC BY-SA 4.0" />
  <row Id="32550" PostHistoryTypeId="2" PostId="8285" RevisionGUID="e0d3dc7b-9562-41ed-9ff6-6ed5c8b645be" CreationDate="2023-04-26T20:37:37.657" UserId="29" Text="Try something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_io::crypto::{sr25519_generate, sr25519_sign};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let caller_public = sr25519_generate(0.into(), None);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And if you need a Substrate account from your sr25519 public key:&#xD;&#xA;```rust&#xD;&#xA;let caller = MultiSigner::Sr25519(caller_public).into_account().into();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see an example [here](https://github.com/paritytech/substrate/blob/943c520aa78fcfaf3509790009ad062e8d4c6990/frame/nfts/src/benchmarking.rs#L804-L805)." ContentLicense="CC BY-SA 4.0" />
  <row Id="32554" PostHistoryTypeId="5" PostId="8283" RevisionGUID="483c0dbe-cb3e-4dbe-9e51-4edca04005fd" CreationDate="2023-04-27T06:09:34.543" UserId="555" Comment="added 8 characters in body" Text="I need to change the balances of all the **accounts** in my custom pallet, For that first i need to fetch the accounts in the pallet. How to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32555" PostHistoryTypeId="50" PostId="6088" RevisionGUID="5d25e3f6-efd5-435f-8a6f-e3a468e1ac13" CreationDate="2023-04-27T08:03:00.360" UserId="-1" />
  <row Id="32556" PostHistoryTypeId="2" PostId="8286" RevisionGUID="651a2528-5f90-4d83-8cfe-cf9ccaa30f15" CreationDate="2023-04-27T10:36:02.817" UserId="251" Text="You can use [storage iter keys](https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageMap.html#method.iter_keys), and put this log in `on_initialize`. &#xD;&#xA;&#xD;&#xA;Pseudo code:&#xD;&#xA;```rs&#xD;&#xA;fn on_initialize(n: BlockNumber) {&#xD;&#xA;  // Run this every 5 blocks.&#xD;&#xA;  if n % 5 != 0 { return; }&#xD;&#xA;&#xD;&#xA;  &lt;Accounts&lt;T&gt;&gt;::iter_keys().for_each(|a| {&#xD;&#xA;    transfer(a, 10 * UNIT);&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note, if the `Accounts` map is large, this would require a lot of weight. Be careful with this." ContentLicense="CC BY-SA 4.0" />
  <row Id="32558" PostHistoryTypeId="2" PostId="8287" RevisionGUID="50114931-3204-4507-aaad-65c51b0f79e8" CreationDate="2023-04-27T12:09:08.283" UserId="3319" Text="I have the following `StorageMap` defined in my pallet:&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    pub(super) type Signatures&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;    	_,&#xD;&#xA;    	Blake2_128Concat,&#xD;&#xA;    	T::Hash,&#xD;&#xA;    	BoundedBTreeMap&lt;Public, BoundedVec&lt;u8, T::SignatureLength&gt;, T::MaxAuthorities&gt;,&#xD;&#xA;    &gt;;&#xD;&#xA;and in the benchmarks:&#xD;&#xA;&#xD;&#xA;    benchmarks!{&#xD;&#xA;    test_add{&#xD;&#xA;        type CustomMap= BoundedBTreeMap&lt;sp_core::sr25519::Public, BoundedVec&lt;u8, ConstU32&lt;64&gt;&gt;, ConstU32&lt;32&gt;&gt;;&#xD;&#xA;            let mut custom : CustomMap= BoundedBTreeMap::new();&#xD;&#xA;            let id = H256::default();// using a concrete type also wouldn't work&#xD;&#xA;            let hash = T::Hash::default();&#xD;&#xA;         }:{&#xD;&#xA;     Signatures::&lt;T&gt;::insert(hash, custom);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;it gives me the following error:&#xD;&#xA;&#xD;&#xA;     error[E0277]: the trait bound `frame_support::BoundedBTreeMap&lt;sp_core::sr25519::Public, frame_support::BoundedVec&lt;u8, ConstU32&lt;64&gt;&gt;, ConstU32&lt;32&gt;&gt;: EncodeL&#xD;&#xA;    ike&lt;frame_support::BoundedBTreeMap&lt;sp_core::sr25519::Public, frame_support::BoundedVec&lt;u8, &lt;T as pallet::Config&gt;::SignatureLength&gt;, &lt;T as pallet::Config&gt;::&#xD;&#xA;    MaxAuthorities&gt;&gt;` is not satisfied&#xD;&#xA;         --&gt; /home/test/projects/custom/pallet/src/benchmarking.rs:70:46&#xD;&#xA;          |&#xD;&#xA;      70  |             Signatures::&lt;T&gt;::insert(hash, custom);&#xD;&#xA;          |             ----------------------           ^^^^^^ the trait `EncodeLike&lt;frame_support::BoundedBTreeMap&lt;sp_core::sr25519::Public, frame_support::Bou&#xD;&#xA;    ndedVec&lt;u8, &lt;T as pallet::Config&gt;::SignatureLength&gt;, &lt;T as pallet::Config&gt;::MaxAuthorities&gt;&gt;` is not implemented for `frame_support::BoundedBTreeMap&lt;sp_cor&#xD;&#xA;    e::sr25519::Public, frame_support::BoundedVec&lt;u8, ConstU32&lt;64&gt;&gt;, ConstU32&lt;32&gt;&gt;`&#xD;&#xA;&#xD;&#xA;even though the same code is exucted perfectly in the pallet with no errors.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32560" PostHistoryTypeId="1" PostId="8287" RevisionGUID="50114931-3204-4507-aaad-65c51b0f79e8" CreationDate="2023-04-27T12:09:08.283" UserId="3319" Text="cant write to StorageMap when benchmarking, EncodeLike is not implemented for any type even if its the same in pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="32561" PostHistoryTypeId="3" PostId="8287" RevisionGUID="50114931-3204-4507-aaad-65c51b0f79e8" CreationDate="2023-04-27T12:09:08.283" UserId="3319" Text="|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32562" PostHistoryTypeId="2" PostId="8288" RevisionGUID="3b4539cc-56d5-41d0-95c2-7d6f60db052f" CreationDate="2023-04-27T12:35:47.220" UserId="94" Text="I think the problem is that you are using `ConstU32&lt;64&gt;` instead of the config constant `T::SignatureLength` (same for the other parameter). It is not correct and lead to problems when benchmarking your pallet later on.  &#xD;&#xA;For the hash type: you need to require it to have a `Default` in the config trait and then do `T::Hash::default()`. You can obviously not use concrete types here, since benchmarks are generic over the pallet config trait. But you could additionally require them to be `From&lt;H256&gt;` for benchmarking only by putting a `where_clause` on the benchmark.&#xD;&#xA;&#xD;&#xA;In your case you can probably let the Rust compiler guess the type like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;benchmarks!{&#xD;&#xA;test_add{&#xD;&#xA;        let mut custom = BoundedBTreeMap::new();&#xD;&#xA;        let id = H256::default();// using a concrete type also wouldn't work&#xD;&#xA;        let hash = T::Hash::default();&#xD;&#xA;     }:{&#xD;&#xA; Signatures::&lt;T&gt;::insert(hash, custom);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or if you really want to type it, then create a type alias with something like `SignatureOf&lt;T&gt;` for example like in the [Alliance](https://github.com/paritytech/substrate/blob/a507125d796760b21d433681cbf8a5d0ec2132d7/frame/alliance/src/lib.rs#L130-L131) pallet and use that.  &#xD;&#xA;If this does not answer your question the please provide source code. Otherwise it is not possible to debug." ContentLicense="CC BY-SA 4.0" />
  <row Id="32564" PostHistoryTypeId="2" PostId="8289" RevisionGUID="a9b7e669-e875-4ba7-befe-314c3d3af511" CreationDate="2023-04-27T12:41:01.933" UserId="380" Text="It seems this is related to running [sub calls](https://github.com/paritytech/substrate/blob/98f2e3451c9143278ec53c6718940aeabcd3b68a/frame/contracts/src/storage/meter.rs#L267-L281) in transactions. The batch is somewhat unrelated although it exacerbates the issue by doubling the transaction fees. There is no difference between the contracts node and aura node - I was previously confused by the difference in decimal places between the two types of node.&#xD;&#xA;&#xD;&#xA;The fee is small when [calling an `ink!` function that *does not* call another `ink!` message (a sub-call)](https://github.com/prosopo/batching/blob/17cf4696fec1040b5f75139f5ec4e09974e0e2e4/contract/lib.rs#L80-L83).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn faucet(&amp;mut self, accountid: AccountId) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            let token_holder = self.token_holder;&#xD;&#xA;            self.transfer_from_to(&amp;token_holder, &amp;accountid, self.faucet_amount)?;&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&gt; Tx Cost: 1 UNIT for extrinsic without sub call&#xD;&#xA;&#xD;&#xA;The fee is doubled [when the above call is batched](https://github.com/prosopo/batching/blob/17cf4696fec1040b5f75139f5ec4e09974e0e2e4/src/txs.ts#L236) but this is still small:&#xD;&#xA;&#xD;&#xA;&gt; Tx Cost: 2 UNIT for extrinsic without sub call in batch&#xD;&#xA;&#xD;&#xA;The fee explodes when calling an `ink!` [function that makes a sub-call](https://github.com/prosopo/batching/blob/17cf4696fec1040b5f75139f5ec4e09974e0e2e4/contract/lib.rs#L88-L100).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        /// Faucet function for sending tokens to humans that includes a call         #[ink(message)]&#xD;&#xA;        pub fn faucet_with_subcall(&amp;mut self, accountid: AccountId) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            let token_holder = self.token_holder;&#xD;&#xA;            self.transfer_from_to(&amp;token_holder, &amp;accountid, self.faucet_amount)?;&#xD;&#xA;&#xD;&#xA;            // SUB-CALL to a second #[ink(message)]&#xD;&#xA;&#xD;&#xA;            // record transfer or return error&#xD;&#xA;            match self.record_transfer(Transfer {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; Tx Cost: 481 UNIT for extrinsic with sub call&#xD;&#xA;&#xD;&#xA;And batching the tx with the sub-call causes the fee to double again.&#xD;&#xA;&#xD;&#xA;&gt; Tx Cost: 962 UNIT for extrinsic with sub call in batch`&#xD;&#xA;&#xD;&#xA;The `.Transfer` events in the block appear when the transactions contain sub-calls:&#xD;&#xA;&#xD;&#xA;[![balances.Transfer][1]][1]&#xD;&#xA;&#xD;&#xA;The value inside them is sent to what I presume is the contract's [`deposit_account`](https://github.com/paritytech/substrate/blob/98f2e3451c9143278ec53c6718940aeabcd3b68a/frame/contracts/src/storage.rs#L53), which is why it isn't a contract itself.&#xD;&#xA;&#xD;&#xA;The value sent to the `deposit_account` is the storageDeposit&#xD;&#xA;&#xD;&#xA;&gt; faucetWithSubcall response.storageDeposit { Charge: '480.0000 Unit' }&#xD;&#xA;&#xD;&#xA;I've created a [demo repo](https://github.com/prosopo/batching) to demonstrate the fees shown above.&#xD;&#xA;&#xD;&#xA;It would be nice if the `ink!` developers could comment on the preferred approach when calling additional functions inside `ink!`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VhJJz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32566" PostHistoryTypeId="2" PostId="8290" RevisionGUID="f234b6b3-d4b2-4d5d-b123-e2b71e8fe25d" CreationDate="2023-04-27T12:53:15.387" UserId="94" Text="You can benchmark failing calls. However, we normally don't do so since a failing transaction does not persist its changes to the DB, and that is normally the slowest part.  &#xD;&#xA;&#xD;&#xA;Keep in mind that you only have to benchmark the slowest path. Now if your slowest path is returning an error, then you indeed have to use that.  &#xD;&#xA;You can write it like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fail {&#xD;&#xA;	let caller = RawOrigin::Signed(whitelisted_caller());&#xD;&#xA;}: {&#xD;&#xA;	Pallet::&lt;T&gt;::fail(caller.into()).expect_err(&quot;Should fail&quot;);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;to be really correct it should exclude the overhead for the `BaseCallFilter`,  so rather use:  &#xD;&#xA;```rust&#xD;&#xA;fail {&#xD;&#xA;	let caller = RawOrigin::Signed(whitelisted_caller());&#xD;&#xA;	let call = Call::&lt;T&gt;::fail{};&#xD;&#xA;}: {&#xD;&#xA;	call.dispatch_bypass_filter(caller.into()).expect_err(&quot;Fails&quot;);&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32568" PostHistoryTypeId="2" PostId="8291" RevisionGUID="0234e580-4eaa-424e-b3ba-e24364cacfa9" CreationDate="2023-04-27T13:05:10.580" UserId="4024" Text="can anybody help me to understand what questions I should address before choosing the approach for keeping the runtime configuration for **Devnet/Testnet/Mainnet** environments in a substrate-based Solochain?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;From what I learned so far, there are 2 main approaches for organizing the runtime in substrate-based repo:&#xD;&#xA;&#xD;&#xA;1. Having a separate runtime build for each environment [like it is done](https://github.com/paritytech/polkadot/tree/master/runtime) in the `paritytech/polkadot` repo.&#xD;&#xA;2. Having a single runtime build for all environments and provide it a specific `chain_spec.json` file [like it is done](https://github.com/substrate-developer-hub/substrate-node-template/tree/main/runtime) in the `substrate-developer-hub/substrate-node-template` repo.&#xD;&#xA;&#xD;&#xA;The above approaches can be even mixed, based on [what I see in the polkadot node repo](https://github.com/paritytech/polkadot/blob/master/cli/src/command.rs#L89).&#xD;&#xA;&#xD;&#xA;As far as I understand, the approach with separate runtime builds looks reasonable when your **Devnet/Testnet/Mainnet** environments have a different composition of pallets. For example, it's good when a team is working on a new custom pallet that is available in **Devnet**, but it's not ready for the **Testnet** and **Mainnet** yet. &#xD;&#xA;But isn't this approach leads to a lack of consistency between different node executables? Can't it result to production **Mainnet** errors, that could not be detected preliminary at **Devnet/Testnet** because of differences between node executables?&#xD;&#xA;&#xD;&#xA;I think, that having a single binary for **Devnet/Testnet/Mainnet** environments is a more reliable approach, and there is a guarantee that the node executable is well-tested before deploying it to **Mainnet**. &#xD;&#xA;But I see that the official [polkadot node repo](https://github.com/paritytech/polkadot) utilizes the approach with separate builds for its **Polkadot/Kusama/Rococo/Westend** networks, and I want to understand is this approach reasonable for a substrate-based Solochain and wouldn't it be overhead?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32570" PostHistoryTypeId="1" PostId="8291" RevisionGUID="0234e580-4eaa-424e-b3ba-e24364cacfa9" CreationDate="2023-04-27T13:05:10.580" UserId="4024" Text="What are the best practices for keeping chain specifications for Devnet, Testnet, and Mainnet environments?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32571" PostHistoryTypeId="3" PostId="8291" RevisionGUID="0234e580-4eaa-424e-b3ba-e24364cacfa9" CreationDate="2023-04-27T13:05:10.580" UserId="4024" Text="|polkadot|substrate-node-template|runtime|kusama|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32572" PostHistoryTypeId="2" PostId="8292" RevisionGUID="3d879b2b-91fb-4194-b737-a1b0f784db8c" CreationDate="2023-04-27T15:14:36.250" UserId="4081" Text="That's an issue I came across in Windows 11. And turns out it might have something to do with your machine running out of RAM.&#xD;&#xA;&#xD;&#xA;In my windows machine I was building projects using WSL and it was capped at 2,5GB to avoid WSL from allocating all the RAM for itself. When trying to build a substrate node, the process needed more RAM to compile large dependencies like `librocksdb-sys` and would exit with and error.&#xD;&#xA;&#xD;&#xA;If anyone is running into this issue while using Windows, check the RAM cap of WSL." ContentLicense="CC BY-SA 4.0" />
  <row Id="32574" PostHistoryTypeId="2" PostId="8293" RevisionGUID="992f4d84-6022-4713-80d8-dffd8c0c2bf3" CreationDate="2023-04-27T15:59:39.680" UserId="351" Text="With subxt is straight-forward as you can access the types by generating them using metadata and use them in your fn arguments but in polkadot.js is kinda not straight forward as where and how the metadata types are being generated and used.&#xD;&#xA;&#xD;&#xA;Example,&#xD;&#xA;&#xD;&#xA;    Referenda.submit() // the arguments are PalletCustomOrigins,DispatchTime,Preimage" ContentLicense="CC BY-SA 4.0" />
  <row Id="32576" PostHistoryTypeId="1" PostId="8293" RevisionGUID="992f4d84-6022-4713-80d8-dffd8c0c2bf3" CreationDate="2023-04-27T15:59:39.680" UserId="351" Text="How to access Polkadot/Kusama runtime types from polkadot.js api to work with the transactions arguments" ContentLicense="CC BY-SA 4.0" />
  <row Id="32577" PostHistoryTypeId="3" PostId="8293" RevisionGUID="992f4d84-6022-4713-80d8-dffd8c0c2bf3" CreationDate="2023-04-27T15:59:39.680" UserId="351" Text="|polkadot-js|api|typegen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32578" PostHistoryTypeId="5" PostId="8286" RevisionGUID="a929c22e-c166-4046-9f32-ad6fa322749d" CreationDate="2023-04-27T19:01:05.483" UserId="251" Comment="added 2 characters in body" Text="You can use [storage iter keys](https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageMap.html#method.iter_keys), and put this logic in `on_initialize`. &#xD;&#xA;&#xD;&#xA;Pseudo code:&#xD;&#xA;```rs&#xD;&#xA;fn on_initialize(n: BlockNumber) {&#xD;&#xA;  // Run this every 5 blocks.&#xD;&#xA;  if n % 5 != 0 { return; }&#xD;&#xA;&#xD;&#xA;  &lt;Accounts&lt;T&gt;&gt;::iter_keys().for_each(|a| {&#xD;&#xA;    transfer(a, 10 * UNIT);&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note, if the `Accounts` map is large, this would require a lot of weight. Be careful with this." ContentLicense="CC BY-SA 4.0" />
  <row Id="32579" PostHistoryTypeId="52" PostId="8287" RevisionGUID="f1295e4a-4668-42e6-8343-73dc4975ef0a" CreationDate="2023-04-27T20:09:29.703" />
  <row Id="32581" PostHistoryTypeId="2" PostId="8294" RevisionGUID="caf6535e-8e17-420b-a670-3efa0644cb27" CreationDate="2023-04-28T07:20:31.163" UserId="4114" Text="I am trying to run a local network using [Substrate Node Template](https://github.com/substrate-developer-hub/substrate-node-template) and have replaced the wasm runtime with one, built from Go. Unfortunately, when I start the network I get the following error:&#xD;&#xA;&#xD;&#xA;&gt; Error: Service(Client(VersionInvalid(&quot;Error calling api function: Unknown version&quot;)))&#xD;&#xA;&#xD;&#xA;So far, I have been able to execute runtime functions (e.g. `Core_version`) using [Gossamer](https://github.com/chainsafe/gossamer), and using Rust's [wasmer](https://docs.rs/wasmer/latest/wasmer/) and [wasmtime](https://docs.rs/wasmtime/latest/wasmtime/).&#xD;&#xA;&#xD;&#xA;I was wondering if there is some specific requirement in [sc_executor](https://docs.rs/sc-executor/latest/sc_executor/) that might affect this." ContentLicense="CC BY-SA 4.0" />
  <row Id="32583" PostHistoryTypeId="1" PostId="8294" RevisionGUID="caf6535e-8e17-420b-a670-3efa0644cb27" CreationDate="2023-04-28T07:20:31.163" UserId="4114" Text="Using Go Runtime in Substrate node template" ContentLicense="CC BY-SA 4.0" />
  <row Id="32584" PostHistoryTypeId="3" PostId="8294" RevisionGUID="caf6535e-8e17-420b-a670-3efa0644cb27" CreationDate="2023-04-28T07:20:31.163" UserId="4114" Text="|substrate-node-template|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32585" PostHistoryTypeId="5" PostId="8272" RevisionGUID="a344b951-2f4f-410c-8cab-6707cf663b58" CreationDate="2023-04-28T08:34:59.680" UserId="2" Comment="typos corrected" Text="I want to benchmark verifying sr25519 signatures and for that I need to create a bunch of key pairs, sign some data, then benchmark the verification process, however using `sp_core::sr25519::Pair` is not allowed, it throws this error:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0432]: unresolved import `sp_core::sr25519::Pair`&#xD;&#xA; --&gt; /home/test/projects/custom/pallet/src/benchmarking.rs:8:5&#xD;&#xA;  |&#xD;&#xA;8 | use sp_core::sr25519::Pair;&#xD;&#xA;  |     ^^^^^^^^^^^^^^^^^^^^^^ no `Pair` in `sr25519`&#xD;&#xA;```&#xD;&#xA;I assume this is happening because it could be leaking some std features in Pair so it wouldn't compile, so how do I solve this? &#xD;&#xA;&#xD;&#xA;PS: I'm not tied necessarily to that specific struct (in fact this is the first time going to work with it); I used to work with a `cryptostore` that generates `sr25519` keys, so anything similar." ContentLicense="CC BY-SA 4.0" />
  <row Id="32586" PostHistoryTypeId="4" PostId="8272" RevisionGUID="a344b951-2f4f-410c-8cab-6707cf663b58" CreationDate="2023-04-28T08:34:59.680" UserId="2" Comment="typos corrected" Text="How to create a bunch of key pairs when benchmarking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32587" PostHistoryTypeId="24" PostId="8272" RevisionGUID="a344b951-2f4f-410c-8cab-6707cf663b58" CreationDate="2023-04-28T08:34:59.680" Comment="Proposed by 2 approved by 3317, 3319 edit id of 413" ContentLicense="CC BY-SA 4.0" />
  <row Id="32588" PostHistoryTypeId="5" PostId="8287" RevisionGUID="274f79f7-4f29-4b4d-b436-dc5809a7eb15" CreationDate="2023-04-28T08:35:13.943" UserId="2" Comment="typos corrected" Text="I have the following `StorageMap` defined in my pallet:&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    pub(super) type Signatures&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;    	_,&#xD;&#xA;    	Blake2_128Concat,&#xD;&#xA;    	T::Hash,&#xD;&#xA;    	BoundedBTreeMap&lt;Public, BoundedVec&lt;u8, T::SignatureLength&gt;, T::MaxAuthorities&gt;,&#xD;&#xA;    &gt;;&#xD;&#xA;and in the benchmarks:&#xD;&#xA;&#xD;&#xA;    benchmarks!{&#xD;&#xA;    test_add{&#xD;&#xA;        type CustomMap= BoundedBTreeMap&lt;sp_core::sr25519::Public, BoundedVec&lt;u8, ConstU32&lt;64&gt;&gt;, ConstU32&lt;32&gt;&gt;;&#xD;&#xA;            let mut custom : CustomMap= BoundedBTreeMap::new();&#xD;&#xA;            let id = H256::default();// using a concrete type also wouldn't work&#xD;&#xA;            let hash = T::Hash::default();&#xD;&#xA;         }:{&#xD;&#xA;     Signatures::&lt;T&gt;::insert(hash, custom);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;it gives me the following error:&#xD;&#xA;&#xD;&#xA;     error[E0277]: the trait bound `frame_support::BoundedBTreeMap&lt;sp_core::sr25519::Public, frame_support::BoundedVec&lt;u8, ConstU32&lt;64&gt;&gt;, ConstU32&lt;32&gt;&gt;: EncodeL&#xD;&#xA;    ike&lt;frame_support::BoundedBTreeMap&lt;sp_core::sr25519::Public, frame_support::BoundedVec&lt;u8, &lt;T as pallet::Config&gt;::SignatureLength&gt;, &lt;T as pallet::Config&gt;::&#xD;&#xA;    MaxAuthorities&gt;&gt;` is not satisfied&#xD;&#xA;         --&gt; /home/test/projects/custom/pallet/src/benchmarking.rs:70:46&#xD;&#xA;          |&#xD;&#xA;      70  |             Signatures::&lt;T&gt;::insert(hash, custom);&#xD;&#xA;          |             ----------------------           ^^^^^^ the trait `EncodeLike&lt;frame_support::BoundedBTreeMap&lt;sp_core::sr25519::Public, frame_support::Bou&#xD;&#xA;    ndedVec&lt;u8, &lt;T as pallet::Config&gt;::SignatureLength&gt;, &lt;T as pallet::Config&gt;::MaxAuthorities&gt;&gt;` is not implemented for `frame_support::BoundedBTreeMap&lt;sp_cor&#xD;&#xA;    e::sr25519::Public, frame_support::BoundedVec&lt;u8, ConstU32&lt;64&gt;&gt;, ConstU32&lt;32&gt;&gt;`&#xD;&#xA;&#xD;&#xA;even though the same code is executed perfectly in the pallet with no errors.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32589" PostHistoryTypeId="4" PostId="8287" RevisionGUID="274f79f7-4f29-4b4d-b436-dc5809a7eb15" CreationDate="2023-04-28T08:35:13.943" UserId="2" Comment="typos corrected" Text="Can't write to StorageMap when benchmarking, EncodeLike is not implemented for any type even if it's the same in pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="32590" PostHistoryTypeId="24" PostId="8287" RevisionGUID="274f79f7-4f29-4b4d-b436-dc5809a7eb15" CreationDate="2023-04-28T08:35:13.943" Comment="Proposed by 2 approved by 3317, 3319 edit id of 412" ContentLicense="CC BY-SA 4.0" />
  <row Id="32591" PostHistoryTypeId="2" PostId="8295" RevisionGUID="a17df826-ef8a-4ddb-a628-48bf7b017168" CreationDate="2023-04-28T09:25:33.997" UserId="73" Text="The idea of increasing the balance of every account every 5 blocks is a bad idea. Your chain would be very easily attack-able by creating a lot of accounts and thus forcing you to iterate over all these accounts. There are multiple ways to achieve what you are trying to do, without killing your chain.&#xD;&#xA;&#xD;&#xA;1. If you only have a subset of accounts. You could have a map of `LastUpdated&lt;AccountId, Block&gt;`. Then users would need to call a `mint` function and that calculates the amount of coins they are getting since the last time they called `mint` and then you need to update `LastUpdated`. This is a &quot;lazy&quot; way where the user need to do interact with the chain to get its funds.&#xD;&#xA;&#xD;&#xA;2. If you really want to increase the balance of every account. You could make every account balance be a percentage of the total supply. Then each time you want to increase the balance of all the accounts, you simply increase the total supply. But be aware that while this would work, nothing in FRAME is written in such a way currently." ContentLicense="CC BY-SA 4.0" />
  <row Id="32593" PostHistoryTypeId="2" PostId="8296" RevisionGUID="fd5df16a-e72e-4682-9d72-bd995e2e5528" CreationDate="2023-04-28T09:26:37.490" UserId="555" Text="I want to add pallet ethereum in our runtime but after adding this line:&#xD;&#xA;&#xD;&#xA;```pallet-ethereum = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/frontier&quot;, branch = &quot;polkadot-v0.9.39&quot; }```&#xD;&#xA;&#xD;&#xA;I'm facing this ```error: no matching package named `sc-consensus-grandpa` found```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32595" PostHistoryTypeId="1" PostId="8296" RevisionGUID="fd5df16a-e72e-4682-9d72-bd995e2e5528" CreationDate="2023-04-28T09:26:37.490" UserId="555" Text="error: no matching package named `sc-consensus-grandpa` found" ContentLicense="CC BY-SA 4.0" />
  <row Id="32596" PostHistoryTypeId="3" PostId="8296" RevisionGUID="fd5df16a-e72e-4682-9d72-bd995e2e5528" CreationDate="2023-04-28T09:26:37.490" UserId="555" Text="|pallet|evm|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32597" PostHistoryTypeId="2" PostId="8297" RevisionGUID="4897c3bf-250e-4d52-9b19-718b6567ada2" CreationDate="2023-04-28T10:01:45.207" UserId="265" Text="what specific extrinsic(s) should be run by a technical committee member in order to initiate the cancellation procedure for a running referendum?&#xD;&#xA;&#xD;&#xA;the polkadot wiki states this is possible here: https://wiki.polkadot.network/docs/learn-governance#canceling&#xD;&#xA;&#xD;&#xA;i am looking for the specific steps a technical committee member should take in order to initiate a vote by all of the technical committee members on whether or not the referendum should be cancelled." ContentLicense="CC BY-SA 4.0" />
  <row Id="32599" PostHistoryTypeId="1" PostId="8297" RevisionGUID="4897c3bf-250e-4d52-9b19-718b6567ada2" CreationDate="2023-04-28T10:01:45.207" UserId="265" Text="how do you cancel a parachain proposal or referendum?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32600" PostHistoryTypeId="3" PostId="8297" RevisionGUID="4897c3bf-250e-4d52-9b19-718b6567ada2" CreationDate="2023-04-28T10:01:45.207" UserId="265" Text="|extrinsic|governance|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32601" PostHistoryTypeId="5" PostId="8286" RevisionGUID="6e23f0f5-94c5-40de-b0ef-9d096f31726c" CreationDate="2023-04-28T12:11:59.233" UserId="251" Comment="added 311 characters in body" Text="You can use [storage iter keys](https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageMap.html#method.iter_keys), and put this logic in `on_initialize`. &#xD;&#xA;&#xD;&#xA;Pseudo code:&#xD;&#xA;```rs&#xD;&#xA;fn on_initialize(n: BlockNumber) {&#xD;&#xA;  // Run this every 5 blocks.&#xD;&#xA;  if n % 5 != 0 { return; }&#xD;&#xA;&#xD;&#xA;  &lt;Accounts&lt;T&gt;&gt;::iter_keys().for_each(|a| {&#xD;&#xA;    transfer(a, 10 * UNIT);&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note, if the `Accounts` map is large, this would require a lot of weight. Be careful with this.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;As I said this would cost a lot of weight, you need to pay more attention to this.&#xD;&#xA;&#xD;&#xA;But it's still reasonable to have this in the pallet.&#xD;&#xA;&#xD;&#xA;If your pallet is about building up a small group. And there are always a few people in the group(`your_pallet::Accounts&lt;T&gt;`), it's okay to use this.&#xD;&#xA;&#xD;&#xA;In the past, this is exactly how staking reward distribution got designed in Substrate. But as the number of Kusama validators/nominators grows up, they have to use another way to do this.&#xD;&#xA;&#xD;&#xA;So, I won't say this is wrong at all." ContentLicense="CC BY-SA 4.0" />
  <row Id="32602" PostHistoryTypeId="5" PostId="8286" RevisionGUID="b4c9845c-9401-4781-8d78-17a3088f3803" CreationDate="2023-04-28T12:17:02.107" UserId="251" Comment="added 311 characters in body" Text="You can use [storage iter keys](https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageMap.html#method.iter_keys), and put this logic in `on_initialize`. &#xD;&#xA;&#xD;&#xA;Pseudo code:&#xD;&#xA;```rs&#xD;&#xA;fn on_initialize(n: BlockNumber) {&#xD;&#xA;  // Run this every 5 blocks.&#xD;&#xA;  if n % 5 != 0 { return; }&#xD;&#xA;&#xD;&#xA;  &lt;Accounts&lt;T&gt;&gt;::iter_keys().for_each(|a| {&#xD;&#xA;    transfer(a, 10 * UNIT);&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note, if the `Accounts` map is large, this would require a lot of weight. Be careful with this.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I don't agree with @bkchr's comment.&#xD;&#xA;&#xD;&#xA;As I said this would cost a lot of weight, you need to pay more attention to this.&#xD;&#xA;&#xD;&#xA;But it's still reasonable to have this in the pallet.&#xD;&#xA;&#xD;&#xA;If your pallet is about building up a small group. And there are always a few people in the group(`your_pallet::Accounts&lt;T&gt;`), it's okay to use this.&#xD;&#xA;&#xD;&#xA;In the past, this is exactly how staking reward distribution got implemented in Substrate. But as the number of Kusama validators/nominators grows up, they have to use another way to do this.&#xD;&#xA;&#xD;&#xA;So, I won't say this is wrong at all. Just take some measures before you use this. Check if this is fit your cases." ContentLicense="CC BY-SA 4.0" />
  <row Id="32603" PostHistoryTypeId="2" PostId="8298" RevisionGUID="b3aab65f-f508-4cce-9a5b-eb80b3145b87" CreationDate="2023-04-28T12:28:49.247" UserId="4081" Text="Proposals are done though the [Democracy Pallet][1]. The pallet has an extrinsic called `emergency_cancel` that can only be called by the `Cancellation Origin`&#xD;&#xA;&#xD;&#xA;Here's a quote from the democracy pallet docs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;//! #### Cancellation Origin&#xD;&#xA;//!&#xD;&#xA;//! This call can only be made by the `CancellationOrigin`.&#xD;&#xA;//!&#xD;&#xA;//! - `emergency_cancel` - Schedules an emergency cancellation of a referendum. Can only happen once&#xD;&#xA;//!   to a specific referendum.&#xD;&#xA;```&#xD;&#xA;So in order to cancel the proposal you must call that extrinsic using an account that is part of the collective assigned to the `Cancelation Origin` defined in the pallets config. Egg:&#xD;&#xA;```rust&#xD;&#xA;impl pallet_democracy::Config for Runtime {&#xD;&#xA;  ...&#xD;&#xA; type CancellationOrigin = EitherOfDiverse&lt;&#xD;&#xA;		EnsureRoot&lt;AccountId&gt;,&#xD;&#xA;		pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 2, 3&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA; ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;You can watch this [Deep Dive of the pallet][2] done by the Delivery Services team at parity&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/democracy&#xD;&#xA;  [2]: https://www.youtube.com/watch?v=CgcUWK2E9Jo" ContentLicense="CC BY-SA 4.0" />
  <row Id="32605" PostHistoryTypeId="2" PostId="8299" RevisionGUID="8b3b1125-3208-4c08-9ec3-a876de7edf46" CreationDate="2023-04-28T12:41:08.517" UserId="1779" Text="I'm trying to constrain the value of an associated type of a trait inside a benchmark's `where` bound, like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[benchmarks(where T: currency::Config&lt;Balance = u128&gt;)]&#xD;&#xA;pub mod benchmarks {&#xD;&#xA;    use super::*;&#xD;&#xA;&#xD;&#xA;    #[benchmark]&#xD;&#xA;    pub fn set_nomination_enabled() {&#xD;&#xA;        #[extrinsic_call]&#xD;&#xA;        _(RawOrigin::Root, true);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, this results in an error:&#xD;&#xA;```&#xD;&#xA;error[E0284]: type annotations needed&#xD;&#xA;    |&#xD;&#xA;122 | #[benchmarks(where T: currency::Config&lt;Balance = u128&gt;)]&#xD;&#xA;    |                                        ^^^^^^^^^^^^^^ cannot infer type&#xD;&#xA;    |&#xD;&#xA;    = note: cannot satisfy `&lt;T as currency::Config&gt;::Balance == _`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `type annotations needed` error does not make any sense to me, and I suspect it may be because of some cleverness by the macro.. Am I doing something wrong?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32607" PostHistoryTypeId="1" PostId="8299" RevisionGUID="8b3b1125-3208-4c08-9ec3-a876de7edf46" CreationDate="2023-04-28T12:41:08.517" UserId="1779" Text="Associated types in benchmark `where` bound" ContentLicense="CC BY-SA 4.0" />
  <row Id="32608" PostHistoryTypeId="3" PostId="8299" RevisionGUID="8b3b1125-3208-4c08-9ec3-a876de7edf46" CreationDate="2023-04-28T12:41:08.517" UserId="1779" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32609" PostHistoryTypeId="2" PostId="8300" RevisionGUID="0eaf344f-8638-48c5-835f-3596b8ea669d" CreationDate="2023-04-28T12:54:50.040" UserId="94" Text="`where` bounds can only be used to require traits - not exact types.  &#xD;&#xA;Instead you can require `From&lt;u128&gt;`, or better: `From&lt;u32&gt;`.  &#xD;&#xA;Keep in mind that these bounds should be as *general as possible*.  &#xD;&#xA;Otherwise it artificially restricts the runtimes that your pallet can be deployed in.&#xD;&#xA;&#xD;&#xA;The correct bound would be:  &#xD;&#xA;```rust&#xD;&#xA;#[benchmarks(where &lt;T as pallet_balances::Config&gt;::Balance: From&lt;u32&gt;)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can use `.into()` to consturct it like `let balance = 10u32.into()`.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="32611" PostHistoryTypeId="5" PostId="8300" RevisionGUID="e722cd99-ace9-49ef-a8a6-6ec721b86d67" CreationDate="2023-04-28T13:46:19.400" UserId="94" Comment="added 58 characters in body" Text="Instead of requiring an exact type, you can use a trait like `From&lt;u128&gt;`, or better: `From&lt;u32&gt;`.  &#xD;&#xA;Keep in mind that these bounds should be as *general as possible*.  &#xD;&#xA;Otherwise it artificially restricts the runtimes that your pallet can be deployed in.  &#xD;&#xA;For example when forcing it to `u128`, it wont work anymore with runtimes that use `u64`.&#xD;&#xA;&#xD;&#xA;The correct bound would be:  &#xD;&#xA;```rust&#xD;&#xA;#[benchmarks(where &lt;T as pallet_balances::Config&gt;::Balance: From&lt;u32&gt;)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can use `.into()` to consturct it like `let balance = 10u32.into()`.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="32612" PostHistoryTypeId="2" PostId="8301" RevisionGUID="3cb6b74e-f912-43fd-83e8-55a3585bb90a" CreationDate="2023-04-28T13:54:10.953" UserId="3538" Text="The directory structure for my project is something like this&#xD;&#xA;```&#xD;&#xA;ink&#xD;&#xA; - contract&#xD;&#xA;runtime&#xD;&#xA;node&#xD;&#xA;and so on&#xD;&#xA;```&#xD;&#xA;I want to run the contract `ink/contract` e2e tests in GitHub CI using my own node instead of the `substrate-contracts-node`. I didn't find any existing solutions for this. Can anybody provide any suggestions?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="32614" PostHistoryTypeId="1" PostId="8301" RevisionGUID="3cb6b74e-f912-43fd-83e8-55a3585bb90a" CreationDate="2023-04-28T13:54:10.953" UserId="3538" Text="How to run ink! e2e tests in GitHub CI" ContentLicense="CC BY-SA 4.0" />
  <row Id="32615" PostHistoryTypeId="3" PostId="8301" RevisionGUID="3cb6b74e-f912-43fd-83e8-55a3585bb90a" CreationDate="2023-04-28T13:54:10.953" UserId="3538" Text="|ink|smart-contract|substrate-contracts-node|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32616" PostHistoryTypeId="5" PostId="8286" RevisionGUID="ff9a838a-8ed8-428d-a589-a73c20327519" CreationDate="2023-04-28T14:49:28.993" UserId="251" Comment="deleted 2 characters in body" Text="You can use [storage iter keys](https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.StorageMap.html#method.iter_keys), and put this logic in `on_initialize`. &#xD;&#xA;&#xD;&#xA;Pseudo code:&#xD;&#xA;```rs&#xD;&#xA;fn on_initialize(n: BlockNumber) {&#xD;&#xA;  // Run this every 5 blocks.&#xD;&#xA;  if n % 5 != 0 { return; }&#xD;&#xA;&#xD;&#xA;  &lt;Accounts&lt;T&gt;&gt;::iter_keys().for_each(|a| {&#xD;&#xA;    transfer(a, 10 * UNIT);&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note, if the `Accounts` map is large, this would require a lot of weight. Be careful with this.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I don't agree with @bkchr's comment.&#xD;&#xA;&#xD;&#xA;As I said this would cost a lot of weight, you need to pay more attention to this.&#xD;&#xA;&#xD;&#xA;But it's still reasonable to have this in the pallet.&#xD;&#xA;&#xD;&#xA;If your pallet is about building up a small group. And there are always a few people in the group(`your_pallet::Accounts&lt;T&gt;`), it's okay to use this.&#xD;&#xA;&#xD;&#xA;In the past, this is exactly how staking reward distribution got implemented in Substrate. But as the number of Kusama validators/nominators grows up, they have to find another way to do this.&#xD;&#xA;&#xD;&#xA;So, I won't say this is wrong at all. Just take some measures before you use this. Check if this fits your case." ContentLicense="CC BY-SA 4.0" />
  <row Id="32617" PostHistoryTypeId="2" PostId="8302" RevisionGUID="198fbc1a-a7d6-4f06-8b78-3796e93f4764" CreationDate="2023-04-28T14:51:01.687" UserId="4114" Text="The problem was that [here](https://github.com/paritytech/substrate/blob/master/client/executor/common/src/runtime_blob/runtime_blob.rs#L188), `min` and `max` were the same and whenever the memory wanted to `grow`, it could not, as it already had reached the maximum." ContentLicense="CC BY-SA 4.0" />
  <row Id="32619" PostHistoryTypeId="52" PostId="8294" RevisionGUID="bdce7f07-e26f-469a-b82c-f3c50ae3a02e" CreationDate="2023-04-28T15:20:44.447" />
  <row Id="32620" PostHistoryTypeId="2" PostId="8303" RevisionGUID="2375ed69-8485-4c20-ac25-795ebda263d5" CreationDate="2023-04-28T15:36:29.403" UserId="4065" Text="I, Already Know to Retrieve Symbol and name, create function &#xD;&#xA;```&#xD;&#xA;        //create function to get collection name and Symbol&#xD;&#xA;		#[ink(message)]&#xD;&#xA;		pub fn get_collection_name(&amp;self) -&gt; String {&#xD;&#xA;			self._get_attribute(self.collection_id(), String::from(&quot;name&quot;)).unwrap()&#xD;&#xA;		}&#xD;&#xA;		#[ink(message)]&#xD;&#xA;		pub fn get_collection_symbol(&amp;self) -&gt; String {&#xD;&#xA;			self._get_attribute(self.collection_id(), String::from(&quot;symbol&quot;)).unwrap()&#xD;&#xA;		}	&#xD;&#xA;&#xD;&#xA;		//crate function _get_attribute&#xD;&#xA;		fn _get_attribute(&amp;self, collection_id: Id, key: String) -&gt; Option&lt;String&gt; {&#xD;&#xA;			self.metadata.get_attribute(collection_id, key)	&#xD;&#xA;		}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32622" PostHistoryTypeId="2" PostId="8304" RevisionGUID="c7ea9415-4ed9-4a76-adc8-9cd23416edb7" CreationDate="2023-04-28T22:36:37.937" UserId="3114" Text="- I'm building a dApp and would like to treat the contract address as a String.&#xD;&#xA;- I was able to find a way to convert a String to an AccountId, but no example exists for the reverse case.&#xD;&#xA;- I also tried encoding with &quot;parity-scale-codec&quot; as shown below, but it is not guaranteed to be UTF-8, so it cannot be converted to String.&#xD;&#xA;&#xD;&#xA;If anyone knows how to convert please help.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn convert_accountid_to_string(&amp;self, account_id: AccountId) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;            let tmp :Vec&lt;u8&gt; = account_id.encode();&#xD;&#xA;            tmp&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32624" PostHistoryTypeId="1" PostId="8304" RevisionGUID="c7ea9415-4ed9-4a76-adc8-9cd23416edb7" CreationDate="2023-04-28T22:36:37.937" UserId="3114" Text="How to convert AccountId to String" ContentLicense="CC BY-SA 4.0" />
  <row Id="32625" PostHistoryTypeId="3" PostId="8304" RevisionGUID="c7ea9415-4ed9-4a76-adc8-9cd23416edb7" CreationDate="2023-04-28T22:36:37.937" UserId="3114" Text="|ink|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32626" PostHistoryTypeId="2" PostId="8305" RevisionGUID="eb2faee6-8c67-4819-be91-e406c7dd54cf" CreationDate="2023-04-29T00:37:57.223" UserId="3559" Text="you can convert an AccountId to a string using the ss58 crate. First, add the ss58 crate to your Cargo.toml dependencies:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;    dependencies&#xD;&#xA;    ]&#xD;&#xA;    ss58 = &quot;0.3.0&quot;&#xD;&#xA;&#xD;&#xA;Then, you can use the ss58::Ss58 trait to convert an AccountId to a string. Here's an example:&#xD;&#xA;&#xD;&#xA;    use sp_core::crypto::Ss58Codec;&#xD;&#xA;    use sp_core::H256;&#xD;&#xA;    &#xD;&#xA;    fn main() {&#xD;&#xA;        // Assuming you have an AccountId instance&#xD;&#xA;        let account_id = H256::from([/* your 32-byte array representing the AccountId */]);&#xD;&#xA;    &#xD;&#xA;        // Convert the AccountId to an SS58 encoded string&#xD;&#xA;        let account_id_string = account_id.to_ss58check();&#xD;&#xA;    &#xD;&#xA;        println!(&quot;AccountId as a string: {}&quot;, account_id_string);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This will convert the AccountId to an SS58 encoded string, which is the standard format for representing Substrate addresses as strings." ContentLicense="CC BY-SA 4.0" />
  <row Id="32633" PostHistoryTypeId="5" PostId="8304" RevisionGUID="f6a3bbaf-cf64-4107-ad6b-40e307910265" CreationDate="2023-04-29T02:52:24.197" UserId="3114" Comment="added 1327 characters in body" Text="- I'm building a dApp and would like to treat the contract address as a String.&#xD;&#xA;- I was able to find a way to convert a String to an AccountId, but no example exists for the reverse case.&#xD;&#xA;- I also tried encoding with &quot;parity-scale-codec&quot; as shown below, but it is not guaranteed to be UTF-8, so it cannot be converted to String.&#xD;&#xA;&#xD;&#xA;If anyone knows how to convert please help.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn convert_accountid_to_string(&amp;self, account_id: AccountId) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;            let tmp :Vec&lt;u8&gt; = account_id.encode();&#xD;&#xA;            tmp&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; - I implemented the following as advised, but got some errors and don't know how to work around it,&#xD;&#xA;&#xD;&#xA;Source Code:&#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn convert_accountid_to_string2(&amp;self, account_id: AccountId) -&gt; String {&#xD;&#xA;            let account_id = H256::from(account_id);&#xD;&#xA;&#xD;&#xA;            // Convert the AccountId to an SS58 encoded string&#xD;&#xA;            let account_id_string = account_id.to_ss58check();&#xD;&#xA;            account_id_string&#xD;&#xA;        &#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;Error Information:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `H256: From&lt;ink::ink_primitives::AccountId&gt;` is not satisfied&#xD;&#xA;  --&gt; /Users/shin.takahashi/develop/work/account_id_test/lib.rs:39:41&#xD;&#xA;   |&#xD;&#xA;39 |             let account_id = H256::from(account_id);&#xD;&#xA;   |                              ---------- ^^^^^^^^^^ the trait `From&lt;ink::ink_primitives::AccountId&gt;` is not implemented for `H256`&#xD;&#xA;   |                              |&#xD;&#xA;   |                              required by a bound introduced by this call&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;error[E0599]: no method named `to_ss58check` found for struct `H256` in the current scope&#xD;&#xA;  --&gt; /Users/shin.takahashi/develop/work/account_id_test/lib.rs:42:48&#xD;&#xA;   |&#xD;&#xA;42 |             let account_id_string = account_id.to_ss58check();&#xD;&#xA;   |                                                ^^^^^^^^^^^^ method not found in `H256`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32638" PostHistoryTypeId="2" PostId="8307" RevisionGUID="59d6b6b1-789f-49f9-a108-5dc19ae300f8" CreationDate="2023-04-29T06:06:57.827" UserId="4117" Text="If you don't care about SS58 format (which will be costly operation) and just want a string, then why not convert it to hex string? It will be a very cheap operation.&#xD;&#xA;&#xD;&#xA;Add [`hex`][1] crate to `Cargo.toml` like this&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;hex = { version = &quot;0.4.3&quot;, default-features = false, features = [&quot;alloc&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod contracts {&#xD;&#xA;    use ink::{&#xD;&#xA;        prelude::string::String,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // ...&#xD;&#xA;&#xD;&#xA;    impl Contracts {&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn account_to_string(&amp;self, account: AccountId) -&gt; String {&#xD;&#xA;            hex::encode(account)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;The output will be like this `&quot;d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;`&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Adding to [kayvan's answer][2] here (I can't post comments yet)&#xD;&#xA;&#xD;&#xA;The default ink! [`AccountId` has `AsRef&lt;[u8;32]&gt;`][3] implementation, you can use that to fix your `H256` conversion error.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn convert_accountid_to_string2(&amp;self, account_id: AccountId) -&gt; String {&#xD;&#xA;            // convert to &amp;[u8;32] first&#xD;&#xA;            let account_id: &amp;[u8;32] = account_id.as_ref();&#xD;&#xA;            let account_id = H256::from(account_id);&#xD;&#xA;&#xD;&#xA;            // Convert the AccountId to an SS58 encoded string&#xD;&#xA;            let account_id_string = account_id.to_ss58check();&#xD;&#xA;            account_id_string&#xD;&#xA;        &#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.io/crates/hex&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/8305/4117&#xD;&#xA;  [3]: https://github.com/paritytech/ink/blob/c1f14bcc1011a36ed72e6726dafb1efbde5bae4d/crates/primitives/src/types.rs#L28-L66" ContentLicense="CC BY-SA 4.0" />
  <row Id="32640" PostHistoryTypeId="2" PostId="8308" RevisionGUID="54282f71-8e5b-4f75-82ec-7caa4801f21d" CreationDate="2023-04-29T06:53:58.960" UserId="4019" Text="I am trying to set up a local blockchain network using the Substrate framework and two separate servers running on Alice (port 9944) and Bob (port 9944). However, I am encountering an issue where the blocks are not syncing and the finalised block number is showing as zero. I have run the following commands:&#xD;&#xA;&#xD;&#xA;    Alice: ./target/release/node-template --alice --validator --base-path /tmp/relay/alice --chain local --port 30333 --rpc-cors all --rpc-methods Safe --ws-port 9944&#xD;&#xA;    Bob: ./target/release/node-template --bob --validator --base-path /tmp/relay/bob --chain local --port 30333 --rpc-cors all --rpc-methods Safe --ws-port 9944 --bootnodes /dns/relaychain2.breedcoins.com/tcp/30333/p2p/12D3KooWN6xoVts4V1NDBm3UM4kVto8GRMKDscfdanbkjfadfasdjkfaskj&#xD;&#xA;&#xD;&#xA;I have received the following error messages:&#xD;&#xA;&#xD;&#xA;    Alice: &quot;Idle (0 peers), best: #0 (0xf7a1…2c01), finalized #0 (0xf7a1…2c01), ⬇ 0 ⬆ 0&quot;&#xD;&#xA;    Bob: &quot;Idle (0 peers), best: #0 (0x5f5e…1bb6), finalized #0 (0x5f5e…1bb6), ⬇ 0 ⬆ 0&quot;&#xD;&#xA;&#xD;&#xA;I referred this link:&#xD;&#xA;    https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Can someone please help me understand what is causing this issue and how I can resolve it? Thank you in advance for your assistance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NpR03.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32642" PostHistoryTypeId="1" PostId="8308" RevisionGUID="54282f71-8e5b-4f75-82ec-7caa4801f21d" CreationDate="2023-04-29T06:53:58.960" UserId="4019" Text="How to troubleshoot synchronisation issues between two nodes in a local Substrate blockchain network using server?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32643" PostHistoryTypeId="3" PostId="8308" RevisionGUID="54282f71-8e5b-4f75-82ec-7caa4801f21d" CreationDate="2023-04-29T06:53:58.960" UserId="4019" Text="|polkadot-js|polkadot|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32644" PostHistoryTypeId="5" PostId="8308" RevisionGUID="92aae9ab-6b56-4b13-8941-961d2fbc1383" CreationDate="2023-04-29T07:01:41.233" UserId="4019" Comment="deleted 1 character in body" Text="I am trying to set up a local blockchain network using the Substrate framework and two separate servers running on Alice (port 9944) and Bob (port 9944). However, I am encountering an issue where the blocks are not syncing and the finalised block number is showing as zero. I have run the following commands:&#xD;&#xA;&#xD;&#xA;    Alice: ./target/release/node-template --alice --validator --base-path /tmp/relay/alice --chain local --port 30333 --rpc-cors all --rpc-methods Safe --ws-port 9944&#xD;&#xA;    Bob: ./target/release/node-template --bob --validator --base-path /tmp/relay/bob --chain local --port 30333 --rpc-cors all --rpc-methods Safe --ws-port 9944 --bootnodes /dns/relaychain2.breedcoins.com/tcp/30333/p2p/12D3KooWN6xoVts4V1NDBm3UM4kVto8GRMKDscfdanbkjfadfasdjkfaskj&#xD;&#xA;&#xD;&#xA;I referred this link:&#xD;&#xA;    https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain&#xD;&#xA;&#xD;&#xA;I have received the following error messages:&#xD;&#xA;&#xD;&#xA;    Alice: &quot;Idle (0 peers), best: #0 (0xf7a1…2c01), finalized #0 (0xf7a1…2c01), ⬇ 0 ⬆ 0&quot;&#xD;&#xA;    Bob: &quot;Idle (0 peers), best: #0 (0x5f5e…1bb6), finalized #0 (0x5f5e…1bb6), ⬇ 0 ⬆ 0&quot;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Can someone please help me understand what is causing this issue and how I can resolve it? Thank you in advance for your assistance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NpR03.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32645" PostHistoryTypeId="2" PostId="8309" RevisionGUID="f6d72d79-9ec9-4b05-b6af-55a586ea9746" CreationDate="2023-04-29T10:33:10.433" UserId="4100" Text="How do I get Listen addresses of a node (and possibly other info like agent, protocols etc..) given that I only have node's `PeerId`? Is there any existing solutions available for this? Simple enter `PeerId` -&gt; get all node info.&#xD;&#xA;&#xD;&#xA;I found libp2p-lookup tool but it is working with full addresses only it seems." ContentLicense="CC BY-SA 4.0" />
  <row Id="32647" PostHistoryTypeId="1" PostId="8309" RevisionGUID="f6d72d79-9ec9-4b05-b6af-55a586ea9746" CreationDate="2023-04-29T10:33:10.433" UserId="4100" Text="Query node information from PeerId only" ContentLicense="CC BY-SA 4.0" />
  <row Id="32648" PostHistoryTypeId="3" PostId="8309" RevisionGUID="f6d72d79-9ec9-4b05-b6af-55a586ea9746" CreationDate="2023-04-29T10:33:10.433" UserId="4100" Text="|substrate-node-template|networking|libp2p|peers|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32650" PostHistoryTypeId="5" PostId="8307" RevisionGUID="d3d0ccda-6ed9-4a80-8751-d2958c824c8c" CreationDate="2023-04-29T10:49:12.300" UserId="4117" Comment="mentioned kayvan's answer is not going to work due to std requirement." Text="If you don't care about SS58 format (which will be costly operation) and just want a string, then why not convert it to hex string? It will be a very cheap operation.&#xD;&#xA;&#xD;&#xA;Add [`hex`][1] crate to `Cargo.toml` like this&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;hex = { version = &quot;0.4.3&quot;, default-features = false, features = [&quot;alloc&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod contracts {&#xD;&#xA;    use ink::{&#xD;&#xA;        prelude::string::String,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // ...&#xD;&#xA;&#xD;&#xA;    impl Contracts {&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn account_to_string(&amp;self, account: AccountId) -&gt; String {&#xD;&#xA;            hex::encode(account)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;The output will be like this `&quot;d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;`&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: Cannot work inside ink! (wasm32 target as it needs std), use above hex approach if you just want a string&#xD;&#xA;&#xD;&#xA;Adding to [kayvan's answer][2] here (I can't post comments yet)&#xD;&#xA;&#xD;&#xA;The default ink! [`AccountId` has `AsRef&lt;[u8;32]&gt;`][3] implementation, you can use that to fix your `H256` conversion error.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn convert_accountid_to_string2(&amp;self, account_id: AccountId) -&gt; String {&#xD;&#xA;            // convert to &amp;[u8;32] first&#xD;&#xA;            let account_id: &amp;[u8;32] = account_id.as_ref();&#xD;&#xA;            let account_id = H256::from(account_id);&#xD;&#xA;&#xD;&#xA;            // Convert the AccountId to an SS58 encoded string&#xD;&#xA;            let account_id_string = account_id.to_ss58check();&#xD;&#xA;            account_id_string&#xD;&#xA;        &#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.io/crates/hex&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/8305/4117&#xD;&#xA;  [3]: https://github.com/paritytech/ink/blob/c1f14bcc1011a36ed72e6726dafb1efbde5bae4d/crates/primitives/src/types.rs#L28-L66" ContentLicense="CC BY-SA 4.0" />
  <row Id="32651" PostHistoryTypeId="5" PostId="8307" RevisionGUID="7d5e2908-99a4-4c91-abb1-e6307fcf9619" CreationDate="2023-04-29T10:53:03.333" UserId="4117" Comment="added 4 characters in body" Text="If you don't care about SS58 format (which will be costly operation) and just want a string, then why not convert it to hex string? It will be a very cheap operation.&#xD;&#xA;&#xD;&#xA;Add [`hex`][1] crate to `Cargo.toml` like this&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;hex = { version = &quot;0.4.3&quot;, default-features = false, features = [&quot;alloc&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod contracts {&#xD;&#xA;    use ink::{&#xD;&#xA;        prelude::string::String,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // ...&#xD;&#xA;&#xD;&#xA;    impl Contracts {&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn account_to_string(&amp;self, account: AccountId) -&gt; String {&#xD;&#xA;            hex::encode(account)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;The output will be like this `&quot;d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;`&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**EDIT: Cannot work inside ink! (wasm32 target as it needs std), use above hex approach if you just want a string**&#xD;&#xA;&#xD;&#xA;Adding to [kayvan's answer][2] here (I can't post comments yet)&#xD;&#xA;&#xD;&#xA;The default ink! [`AccountId` has `AsRef&lt;[u8;32]&gt;`][3] implementation, you can use that to fix your `H256` conversion error.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn convert_accountid_to_string2(&amp;self, account_id: AccountId) -&gt; String {&#xD;&#xA;            // convert to &amp;[u8;32] first&#xD;&#xA;            let account_id: &amp;[u8;32] = account_id.as_ref();&#xD;&#xA;            let account_id = H256::from(account_id);&#xD;&#xA;&#xD;&#xA;            // Convert the AccountId to an SS58 encoded string&#xD;&#xA;            let account_id_string = account_id.to_ss58check();&#xD;&#xA;            account_id_string&#xD;&#xA;        &#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.io/crates/hex&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/8305/4117&#xD;&#xA;  [3]: https://github.com/paritytech/ink/blob/c1f14bcc1011a36ed72e6726dafb1efbde5bae4d/crates/primitives/src/types.rs#L28-L66" ContentLicense="CC BY-SA 4.0" />
  <row Id="32652" PostHistoryTypeId="5" PostId="8307" RevisionGUID="d5a4759c-1881-45bf-be2c-19e082aef2ef" CreationDate="2023-04-29T10:53:46.713" UserId="4117" Comment="deleted 1 character in body" Text="If you don't care about SS58 format (which will be costly operation) and just want a string, then why not convert it to hex string? It will be a very cheap operation.&#xD;&#xA;&#xD;&#xA;Add [`hex`][1] crate to `Cargo.toml` like this&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;hex = { version = &quot;0.4.3&quot;, default-features = false, features = [&quot;alloc&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod contracts {&#xD;&#xA;    use ink::{&#xD;&#xA;        prelude::string::String,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    // ...&#xD;&#xA;&#xD;&#xA;    impl Contracts {&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn account_to_string(&amp;self, account: AccountId) -&gt; String {&#xD;&#xA;            hex::encode(account)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;The output will be like this `&quot;d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&quot;`&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Adding to [kayvan's answer][2] here (I can't post comments yet)&#xD;&#xA;&#xD;&#xA;The default ink! [`AccountId` has `AsRef&lt;[u8;32]&gt;`][3] implementation, you can use that to fix your `H256` conversion error.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn convert_accountid_to_string2(&amp;self, account_id: AccountId) -&gt; String {&#xD;&#xA;            // convert to &amp;[u8;32] first&#xD;&#xA;            let account_id: &amp;[u8;32] = account_id.as_ref();&#xD;&#xA;            let account_id = H256::from(account_id);&#xD;&#xA;&#xD;&#xA;            // Convert the AccountId to an SS58 encoded string&#xD;&#xA;            let account_id_string = account_id.to_ss58check();&#xD;&#xA;            account_id_string&#xD;&#xA;        &#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**EDIT: This will not work inside ink! (wasm32 target as it needs std), use hex approach if you just want a string**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.io/crates/hex&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/8305/4117&#xD;&#xA;  [3]: https://github.com/paritytech/ink/blob/c1f14bcc1011a36ed72e6726dafb1efbde5bae4d/crates/primitives/src/types.rs#L28-L66" ContentLicense="CC BY-SA 4.0" />
  <row Id="32655" PostHistoryTypeId="2" PostId="8311" RevisionGUID="7fd21373-dcc5-425f-bdb2-f14fa13ebd54" CreationDate="2023-04-29T12:58:22.477" UserId="3559" Text="The error message &quot;failed to run custom build command for librocksdb-sys&quot; usually indicates that there is a problem with the RocksDB library or its dependencies.&#xD;&#xA;I had  the same error while building Substrate , since change linux distro its done , for example work in fedora its ok" ContentLicense="CC BY-SA 4.0" />
  <row Id="32657" PostHistoryTypeId="2" PostId="8312" RevisionGUID="65768e37-818e-4188-8075-fcc06c93d35d" CreationDate="2023-04-29T16:25:54.327" UserId="3319" Text="had exactly the same problem with opensuse tumbleweed because of clang and llvm, you actually need an older version not a new one, try with installing `v14` of `clang` and `llvm`" ContentLicense="CC BY-SA 4.0" />
  <row Id="32659" PostHistoryTypeId="2" PostId="8313" RevisionGUID="ff044db0-2461-4be4-86f5-2e53011dfe36" CreationDate="2023-04-29T19:25:12.907" UserId="4083" Text="I know that to upgrade a runtime of a parachain, we need to go to parachainSystem. &#xD;&#xA;&#xD;&#xA;But when we use a local relay chain, how could we access to the polkadot-js of the parachain ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="32661" PostHistoryTypeId="1" PostId="8313" RevisionGUID="ff044db0-2461-4be4-86f5-2e53011dfe36" CreationDate="2023-04-29T19:25:12.907" UserId="4083" Text="Upgrade runtime parachain when relay is local" ContentLicense="CC BY-SA 4.0" />
  <row Id="32662" PostHistoryTypeId="3" PostId="8313" RevisionGUID="ff044db0-2461-4be4-86f5-2e53011dfe36" CreationDate="2023-04-29T19:25:12.907" UserId="4083" Text="|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32663" PostHistoryTypeId="2" PostId="8314" RevisionGUID="55501708-8b1e-4828-8362-5311b470ed18" CreationDate="2023-04-29T19:56:33.230" UserId="251" Text="Simply replace the `${RPC_ENDPOINT}` with yours.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;https://polkadot.js.org/apps/?rpc=${RPC_ENDPOINT}#/explorer&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Tips:&#xD;&#xA;&#xD;&#xA;Make sure you have set up your parachain ws endpoint correctly." ContentLicense="CC BY-SA 4.0" />
  <row Id="32665" PostHistoryTypeId="5" PostId="8311" RevisionGUID="c894138f-dc24-4b5d-8c05-c81cc194dea4" CreationDate="2023-04-29T20:09:34.743" UserId="2" Comment="typos corrected" Text="The error message &quot;failed to run custom build command for librocksdb-sys&quot; usually indicates that there is a problem with the RocksDB library or its dependencies.&#xD;&#xA;I had  the same error while building Substrate, since I changed the linux distro it's done, for example in Fedora it works ok." ContentLicense="CC BY-SA 4.0" />
  <row Id="32666" PostHistoryTypeId="24" PostId="8311" RevisionGUID="c894138f-dc24-4b5d-8c05-c81cc194dea4" CreationDate="2023-04-29T20:09:34.743" Comment="Proposed by 2 approved by 3559 edit id of 414" ContentLicense="CC BY-SA 4.0" />
  <row Id="32667" PostHistoryTypeId="2" PostId="8315" RevisionGUID="44dc70ec-0611-41b3-9a9d-109f23b34902" CreationDate="2023-04-29T21:54:35.097" UserId="2960" Text="I am trying to bridge a solo substrate chain to a parachain .&#xD;&#xA;I am very new to this.&#xD;&#xA;I came across the parity-bridges-common repo (https://github.com/paritytech/parity-bridges-common) . I was able to run it using the instructions. &#xD;&#xA;1. How do I use thesame repo to bridge a solo-chain and a parachain since the example chains used i.e millau and rialto are solochains &#xD;&#xA;2. why are their two rialto chains in &#xD;&#xA;  1. bin/rialto&#xD;&#xA;  2. bin/rialto-parachain&#xD;&#xA;3. what modifications do I have to make to the code to bridge my own chains rather than milla and rialto&#xD;&#xA;4. is there any detailed documentation or support to accomplish this &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32669" PostHistoryTypeId="1" PostId="8315" RevisionGUID="44dc70ec-0611-41b3-9a9d-109f23b34902" CreationDate="2023-04-29T21:54:35.097" UserId="2960" Text="bridge substrate solo chain to parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="32670" PostHistoryTypeId="3" PostId="8315" RevisionGUID="44dc70ec-0611-41b3-9a9d-109f23b34902" CreationDate="2023-04-29T21:54:35.097" UserId="2960" Text="|polkadot|substrate-node-template|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32671" PostHistoryTypeId="50" PostId="7426" RevisionGUID="d78ed91a-b9f6-46b1-b7e2-c759009caf3c" CreationDate="2023-04-30T00:02:45.317" UserId="-1" />
  <row Id="32673" PostHistoryTypeId="2" PostId="8316" RevisionGUID="d05e2ecc-dd0a-477a-96ea-48462260abaa" CreationDate="2023-04-30T10:56:43.367" UserId="4146" Text="My contract emits several `[ink(event)]` events. My application subscribes to the events and receives [`Contracts_ContractEmitted`][1] data (from centrifuge go-substrate-rpc-client). How may I understand which of my events caused this?&#xD;&#xA;&#xD;&#xA;From my experiments, I see that `event.Topic[0]` somehow identifies the event - the same event has the same values, different have differents. If so, how is it encoded?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/centrifuge/go-substrate-rpc-client/blob/015965cf2e670ceb9b87ae40a8ddfe7ee8114a8f/types/event_record_test.go#L314" ContentLicense="CC BY-SA 4.0" />
  <row Id="32675" PostHistoryTypeId="1" PostId="8316" RevisionGUID="d05e2ecc-dd0a-477a-96ea-48462260abaa" CreationDate="2023-04-30T10:56:43.367" UserId="4146" Text="How to identify received contract event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32676" PostHistoryTypeId="3" PostId="8316" RevisionGUID="d05e2ecc-dd0a-477a-96ea-48462260abaa" CreationDate="2023-04-30T10:56:43.367" UserId="4146" Text="|ink|smart-contract|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32677" PostHistoryTypeId="5" PostId="8316" RevisionGUID="d7bb8f3e-2a4f-4f4b-93c1-ae4a28f4e4d9" CreationDate="2023-04-30T11:09:03.983" UserId="4146" Comment="code link update" Text="My contract emits several `[ink(event)]` events. My application subscribes to the events and receives [`Contracts_ContractEmitted`][1] data (from centrifuge go-substrate-rpc-client). How may I understand which of my events caused this?&#xD;&#xA;&#xD;&#xA;From my experiments, I see that `event.Topic[0]` somehow identifies the event - the same event has the same values, different have differents. If so, how is it encoded?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/centrifuge/go-substrate-rpc-client/blob/015965cf2e670ceb9b87ae40a8ddfe7ee8114a8f/types/events.go#L2961" ContentLicense="CC BY-SA 4.0" />
  <row Id="32680" PostHistoryTypeId="2" PostId="8317" RevisionGUID="a0fdd255-b208-4ccf-b6f1-4a157873ad87" CreationDate="2023-04-30T16:54:30.257" UserId="364" Text="Make sure your newly added substrate dependency have `default-features = false`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32682" PostHistoryTypeId="2" PostId="8318" RevisionGUID="7ee1dc79-1de5-4f3d-bb01-00023f26b8b0" CreationDate="2023-04-30T17:00:57.067" UserId="4152" Text="why would blockchains interoperate, what are some real world problems with real scenarios blockchain interoperability solve? &#xD;&#xA;&#xD;&#xA;i keep hearing easier transfer of value from one blockchain to another but thats so vague and i dont know any specific examples on this, when would you need to transfer value from one blockchain to another and why is it impossible currently, can't i simply create a bot and take the data and create a transaction and send it to another chain by respecting their rules(correct transaction format)?&#xD;&#xA;&#xD;&#xA;polkadot answer's to interoperability is the relay chain as far as i understand, a blockchain that connects blockchains, but why? why not create a common standard protocol and have every blockchain implement it however they want; like usual internet standards, what is the role of the relay chain in this and how does it make interoperability easier?&#xD;&#xA;&#xD;&#xA;i also keep hearing that blockchains(parachains) connected to the relay chain will benefit from the security of the relay chain, what does that mean? if each parachain has its own consensus model and security what can you add more to that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32684" PostHistoryTypeId="1" PostId="8318" RevisionGUID="7ee1dc79-1de5-4f3d-bb01-00023f26b8b0" CreationDate="2023-04-30T17:00:57.067" UserId="4152" Text="what problems does the relay chain solve? general questions about blockchain interoperability" ContentLicense="CC BY-SA 4.0" />
  <row Id="32685" PostHistoryTypeId="3" PostId="8318" RevisionGUID="7ee1dc79-1de5-4f3d-bb01-00023f26b8b0" CreationDate="2023-04-30T17:00:57.067" UserId="4152" Text="|polkadot|blockchain|general|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32687" PostHistoryTypeId="2" PostId="8319" RevisionGUID="9ee328aa-ee90-4842-b925-52ab3874d0f2" CreationDate="2023-05-01T00:17:56.423" UserId="3114" Text="- I finally implemented the code below. Make AccountId a string with hex. Then enter that string to restore the AccountId.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn convert_accountid_to_hexstring(&amp;self, account_id: AccountId) -&gt; String {&#xD;&#xA;            hex::encode(account_id)&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn convert_hexstring_to_accountid(&amp;self, hex_string:String) -&gt; Option&lt;AccountId&gt; {&#xD;&#xA;            match hex::decode(hex_string) {&#xD;&#xA;                Ok(value) =&gt; {&#xD;&#xA;                    let mut array = [0; 32];&#xD;&#xA;                    let bytes = &amp;value[..array.len()];&#xD;&#xA;                    array.copy_from_slice(bytes);&#xD;&#xA;                    let account_id: AccountId = array.into();&#xD;&#xA;                    return Some(account_id);&#xD;&#xA;                },&#xD;&#xA;                Err(_) =&gt; None,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32691" PostHistoryTypeId="12" PostId="8289" RevisionGUID="24797bfb-605d-4282-89fb-b66c4eaac30c" CreationDate="2023-05-01T09:05:05.543" UserId="380" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:380,&quot;DisplayName&quot;:&quot;forgetso&quot;}],&quot;DeleteType&quot;:1}" />
  <row Id="32694" PostHistoryTypeId="2" PostId="8321" RevisionGUID="22d1e0a0-0245-424c-b332-c7440fd956ef" CreationDate="2023-05-01T10:17:02.580" UserId="3114" Text="## Problem&#xD;&#xA; - I always use the following method to debug ink!&#xD;&#xA; - However, that method is not very efficient when implementing complex contracts.&#xD;&#xA; - Furthermore, there is a demerit that many debug statements will be included and the source code will be messy.&#xD;&#xA; - Please let me know if there is a more efficient debugging method.&#xD;&#xA;&#xD;&#xA;## Run local node with debug option:&#xD;&#xA;```&#xD;&#xA;./node_exe --dev --tmp -lruntime=debug&#xD;&#xA;```&#xD;&#xA;## Sample Code&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn test_function(&amp;self) -&gt; Result&lt;bool,Error&gt; {&#xD;&#xA;  &#xD;&#xA;  ink::env::debug_println!(&quot;# self.value:{:?} &quot;,self.value);&#xD;&#xA;  &#xD;&#xA;  let mut value2 = 0;&#xD;&#xA;  if self.value &gt;= 5 {&#xD;&#xA;    value2 = 50;&#xD;&#xA;  }&#xD;&#xA;  else if self.value &gt;= 3 {&#xD;&#xA;    value2 = 40;&#xD;&#xA;  }&#xD;&#xA;  else {&#xD;&#xA;    return Err(Error::InvalidValue);&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  ink::env::debug_println!(&quot;# value2:{:?} &quot;, value2);&#xD;&#xA;&#xD;&#xA;  if value2 == 50 {&#xD;&#xA;    return true;&#xD;&#xA;  }&#xD;&#xA;  else{&#xD;&#xA;   return false;&#xD;&#xA;  } &#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32696" PostHistoryTypeId="1" PostId="8321" RevisionGUID="22d1e0a0-0245-424c-b332-c7440fd956ef" CreationDate="2023-05-01T10:17:02.580" UserId="3114" Text="Efficient debugging method with ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="32697" PostHistoryTypeId="3" PostId="8321" RevisionGUID="22d1e0a0-0245-424c-b332-c7440fd956ef" CreationDate="2023-05-01T10:17:02.580" UserId="3114" Text="|ink|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32698" PostHistoryTypeId="2" PostId="8322" RevisionGUID="34606637-a56c-4824-9936-d7e094121737" CreationDate="2023-05-01T10:49:26.233" UserId="2940" Text="I'm building the substrate standalone chain with this `cargo build --release` command  and facing the issue:&#xD;&#xA;&#xD;&#xA;    thread 'main' panicked at 'Failed to compact generated WASM binary.: Error(UnknownOpcode(192))', /Users/asadali/.cargo/git/checkouts/substrate-7e08433d4c370a21/a3ed011/utils/wasm-builder/src/wasm_project.rs:673:14&#xD;&#xA;     note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace" ContentLicense="CC BY-SA 4.0" />
  <row Id="32700" PostHistoryTypeId="1" PostId="8322" RevisionGUID="34606637-a56c-4824-9936-d7e094121737" CreationDate="2023-05-01T10:49:26.233" UserId="2940" Text="Failed to compact generated WASM binary in substrate standalone chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="32701" PostHistoryTypeId="3" PostId="8322" RevisionGUID="34606637-a56c-4824-9936-d7e094121737" CreationDate="2023-05-01T10:49:26.233" UserId="2940" Text="|substrate-node-template|rust|wasm|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32702" PostHistoryTypeId="2" PostId="8323" RevisionGUID="86149c6a-f32d-4786-ba4b-d62915551e0d" CreationDate="2023-05-01T11:03:22.657" UserId="4117" Text="ink! currently don't have any dedicated debugger with features like breakpoints, watch expressions, call stack like the ones for Solidity. The only tool we got is `debug_println!`.&#xD;&#xA;&#xD;&#xA;&gt; However, that method is not very efficient when implementing complex contracts.&#xD;&#xA;&#xD;&#xA;This is indeed true, but at the same time it can be quite powerful if you manage to isolate the problem. I can't say for sure why you feel it is inefficient without context or example.&#xD;&#xA;&#xD;&#xA;Few recommendations from my side&#xD;&#xA;- Do not use `unwrap()` or `panic()` anywhere in ink! contract, instead define error and use `Result&lt;T, YourError&gt;` as return type and propagate the error to top level method.&#xD;&#xA;Simple pseduo example,&#xD;&#xA;```rust&#xD;&#xA;fn inner_method(id: u32) -&gt; Result&lt;u32, MyError&gt; {&#xD;&#xA;    // no unwrap(), propogate error&#xD;&#xA;    let a = do_something(id)?;&#xD;&#xA;    let b = do_something_more(a);&#xD;&#xA;    Ok(b)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn register_uuid(&amp;mut self, id: u32) -&gt; Result&lt;u32, MyError&gt; {&#xD;&#xA;    // no unwrap(), even if some different error type map it to your error&#xD;&#xA;    do_something_checks().map_err(|_| MyError::SomeError)?;&#xD;&#xA;    // no unwrap()&#xD;&#xA;    let a = inner_method(id)?;&#xD;&#xA;&#xD;&#xA;    self.env().emit(Event { id });&#xD;&#xA;&#xD;&#xA;    Ok(a)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This allows you to get more information out of your contract execution, if execution fails you can dry-run it to get the error to isolate the issue and effectively use `ink::env::debug_println` to debug.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Furthermore, there is a demerit that many debug statements will be included and the source code will be messy.&#xD;&#xA;&#xD;&#xA;If that is a problem for you, at best you can wrap the `ink::env::debug_println` [with conditional macro/method with different behaviour in release and debug][1] like this,&#xD;&#xA;```rust&#xD;&#xA;#[cfg(debug_assertions)]&#xD;&#xA;fn log(msg: &amp;'static str) {&#xD;&#xA;    ink::env::debug_println!(msg);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(not(debug_assertions))]&#xD;&#xA;fn log(_msg: &amp;'static str) {&#xD;&#xA;    // no op, --release&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Hope it helps!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/39204908/how-to-check-release-debug-builds-using-cfg-in-rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="32704" PostHistoryTypeId="5" PostId="8289" RevisionGUID="e7819abc-ad50-4be4-a75a-31b5c5f342ed" CreationDate="2023-05-01T11:13:39.820" UserId="380" Comment="Answer was wrong" Text="**Edited** after feedback from @German Nikolishin below.&#xD;&#xA;&#xD;&#xA;It seems this transfer is the cost associated with storing data in the contract. The value inside the transfer is sent to what I presume is the contract's [`deposit_account`](https://github.com/paritytech/substrate/blob/98f2e3451c9143278ec53c6718940aeabcd3b68a/frame/contracts/src/storage.rs#L53), which is why it isn't a contract itself.&#xD;&#xA;&#xD;&#xA;The value sent to the `deposit_account` is the storageDeposit&#xD;&#xA;&#xD;&#xA;&gt; faucetWithStore response.storageDeposit { Charge: '480.0000 Unit' }&#xD;&#xA;&#xD;&#xA;The deposit stays in the deposit account until the contract is terminated, at which point the deposit account uses the funds to remove any storage associated with the contract and then sends the remaining funds back to the recipient.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;            ink::env::terminate_contract::&lt;ink::env::DefaultEnvironment&gt;(recipient);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've created a [demo repo](https://github.com/prosopo/batching) to demonstrate the fees shown above.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VhJJz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32705" PostHistoryTypeId="13" PostId="8289" RevisionGUID="feafa117-0f55-4e43-a115-4d00e647c33d" CreationDate="2023-05-01T11:13:44.860" UserId="380" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:380,&quot;DisplayName&quot;:&quot;forgetso&quot;}]}" />
  <row Id="32706" PostHistoryTypeId="5" PostId="8302" RevisionGUID="70161b77-9109-4beb-b611-f2e99baeaa8b" CreationDate="2023-05-01T16:10:42.480" UserId="4114" Comment="edited body" Text="The problem was that [here](https://github.com/paritytech/substrate/blob/master/client/executor/common/src/runtime_blob/runtime_blob.rs#L188), `min` and `max` were the same and whenever the memory wanted to `grow`, it could not, as it had already reached the maximum." ContentLicense="CC BY-SA 4.0" />
  <row Id="32707" PostHistoryTypeId="2" PostId="8324" RevisionGUID="a869729a-57e6-4c31-a241-e30d2d678efc" CreationDate="2023-05-01T17:59:19.693" UserId="3407" Text="There are a few distinct questions here, so I'll answer each briefly.&#xD;&#xA;&#xD;&#xA;&gt; What are some real world problems with real scenarios blockchain interoperability solve?&#xD;&#xA;&#xD;&#xA;The problems solved by blockchain interoperability really depend on what problems are being solved by blockchains at any given point in time. A simple example is using an NFT on chain A to get some privilege on chain B. Suppose chain A supports an NFT marketplace, and chain B has a mechanism to manage ticket sales for a specific venue. A musician may want to sell an NFT collection on chain A, and say that anyone owning that NFT on chain A is given priority to buy a ticket for their upcoming concert, where tickets are sold on chain B. This is not possible without blockchain interoperability.&#xD;&#xA;&#xD;&#xA;There are a ton of other examples, and this is just one.&#xD;&#xA;&#xD;&#xA;&gt; Can't I simply create a bot and take the data and create a transaction and send it to another chain?&#xD;&#xA;&#xD;&#xA;Suppose you have some tokens worth 5 USD on chain A, and you want to send them to chain B. You have some value on chain A, and are trying to transfer it to another blockchain. You can't just submit some transaction to chain B sending things from chain A, because chain B *doesn't know anything* about chain A. It won't trust you &quot;just because&quot;. &#xD;&#xA;&#xD;&#xA;A current solution for this usecase is to use [bridges](https://ethereum.org/en/bridges/), however those are not always the most reliable, and historically have been very prone to being [hacked](https://www.forbes.com/sites/mariagraciasantillanalinares/2022/08/18/over-2-billion-stolen-this-year-in-blockchain-bridge-hacks-expose-defis-achilles-heel/?sh=6bc4c7a7e50b). Additionally, there is substantial lag, because chain B's side of the bridge needs to make sure the transaction on side A is finalized before giving you the assets.&#xD;&#xA;&#xD;&#xA;&gt; What does the relay chain do?&#xD;&#xA;&#xD;&#xA;The fundamental reason the relay chain exists is to share security among other blockchains, and to facilitate interoperability through parachains advancing in sync. &#xD;&#xA;&#xD;&#xA;The shared security is because the relay chain does [sharded execution](https://polkadot.network/blog/polkadot-v1-0-sharding-and-economic-security#sharding-scaling-by-subset-selection) of all parachains attached to it. Basically, what this guarantees is that the parachain block was executed according to the parachain's rules, which is guaranteed by the relay chain validators. So if the parachain's rules say that a transaction must be signed by the sender, and the sender must have enough balance, the relay chain will check that for every parachain block. This is more efficient than a normal blockchain because the execution is sharded amongst validators, as compared to the full replication of general blockchains. So it becomes equally expensive/difficult to attack any parachain as it would cost to attack the relay chain itself.&#xD;&#xA;&#xD;&#xA;By comparison, if there are two standalone chains, it will cost a different amount to attack each, based on the amount staked on each chain (or the collective mining power, depending on its consensus). This means that parachains are generally more secure than standalone chains.&#xD;&#xA;&#xD;&#xA;The interoperability comes through [XCM](https://wiki.polkadot.network/docs/learn-xcm), which is the language used for these parachains to communicate, and [XCMP](https://research.web3.foundation/en/latest/polkadot/XCMP/index.html), a protocol executed by the relay chain to pass trusted messages between parachains. The communication can be faster than between sovereign chains, because parachain A can act on a transaction in parachain B immediately after it occurs, knowing that if one gets rolled back, both will get rolled back.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32709" PostHistoryTypeId="52" PostId="8321" RevisionGUID="221bf6ad-4d55-4d5f-8470-2a5c20d061c1" CreationDate="2023-05-01T18:20:41.487" />
  <row Id="32710" PostHistoryTypeId="2" PostId="8325" RevisionGUID="faf6d0b8-5308-471c-9ab4-70e15dbf44a2" CreationDate="2023-05-01T18:52:31.333" UserId="3559" Text="[A prototype to show bridge between a solo-chain and a parachain based on Parity Substrate &lt;&gt; Substrate bridge.][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/solo-para-bridge-poc" ContentLicense="CC BY-SA 4.0" />
  <row Id="32713" PostHistoryTypeId="2" PostId="8326" RevisionGUID="343c723d-abf5-4e7e-a989-777da892d84b" CreationDate="2023-05-02T00:01:54.867" UserId="351" Text="This can be resolved using type augmentation in your codebase first,&#xD;&#xA;so `'@polkadot/api-augment/&lt;chain&gt;'` This augments the types needs to be used inside the functions api ( txn, queries ).&#xD;&#xA;&#xD;&#xA;And this gives clarity on what data types needs to be passed as function parameters.&#xD;&#xA;&#xD;&#xA;It is straight forward for Kusama and Polkadot chains for custom chains first generate the types from typegen tool." ContentLicense="CC BY-SA 4.0" />
  <row Id="32715" PostHistoryTypeId="2" PostId="8327" RevisionGUID="c92f7235-c573-4c09-ab16-8b0a3dcec993" CreationDate="2023-05-02T00:13:50.723" UserId="318" Text="I'm upgrading our parachain based on Polkadot 0.9.40 [here][1]. Now in the process of benchmarking xcm operations, I notice there is no benchmark for `reserve_asset_deposited` in XCM fungible benchmarks! I wonder how is it then benchmarked in Kusama and some other places?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/NodleCode/chain/pull/735" ContentLicense="CC BY-SA 4.0" />
  <row Id="32717" PostHistoryTypeId="1" PostId="8327" RevisionGUID="c92f7235-c573-4c09-ab16-8b0a3dcec993" CreationDate="2023-05-02T00:13:50.723" UserId="318" Text="Missing XCM benchmark `reserve_asset_deposited`" ContentLicense="CC BY-SA 4.0" />
  <row Id="32718" PostHistoryTypeId="3" PostId="8327" RevisionGUID="c92f7235-c573-4c09-ab16-8b0a3dcec993" CreationDate="2023-05-02T00:13:50.723" UserId="318" Text="|polkadot|xcm|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32719" PostHistoryTypeId="2" PostId="8328" RevisionGUID="40d0e5ec-87e6-4b44-939d-6b4d75204b9f" CreationDate="2023-05-02T04:27:06.057" UserId="4068" Text="In the case of solidity language -&#xD;&#xA;&#xD;&#xA;In smart contracts, state variables can be made public to allow for easy access and visibility of the data stored in the contract. When a state variable is declared as public, a getter function is automatically generated by the compiler, which allows any external entity to access the current value of that variable.&#xD;&#xA;&#xD;&#xA;so, is it also possible to ink smart contracts?&#xD;&#xA;&#xD;&#xA;    // SPDX-License-identifier:MIT&#xD;&#xA;&#xD;&#xA;import &quot;@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol&quot;;&#xD;&#xA;&#xD;&#xA;contract NFT is ERC721URIStorage{&#xD;&#xA;    uint public tokenCount;&#xD;&#xA;&#xD;&#xA;......&#xD;&#xA;......&#xD;&#xA;......&#xD;&#xA;......&#xD;&#xA;......&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32721" PostHistoryTypeId="1" PostId="8328" RevisionGUID="40d0e5ec-87e6-4b44-939d-6b4d75204b9f" CreationDate="2023-05-02T04:27:06.057" UserId="4068" Text="Do ink compiler automatically generate getter function for state variable ( if declared as public ) like solidity language?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32722" PostHistoryTypeId="3" PostId="8328" RevisionGUID="40d0e5ec-87e6-4b44-939d-6b4d75204b9f" CreationDate="2023-05-02T04:27:06.057" UserId="4068" Text="|ink|smart-contract|substrate-contracts-node|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32723" PostHistoryTypeId="2" PostId="8329" RevisionGUID="bf53772d-1a45-4cad-9fee-9fe59a309edc" CreationDate="2023-05-02T04:40:29.687" UserId="4117" Text="No, ink! does not generate the getter. You've to manually implement the getters.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod contracts {&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Contracts {&#xD;&#xA;        value: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Contracts {&#xD;&#xA;        /// Getter for self.value&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get(&amp;self) -&gt; bool {&#xD;&#xA;            self.value&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32729" PostHistoryTypeId="2" PostId="8331" RevisionGUID="0f502598-9c4f-4b62-8978-228005e56963" CreationDate="2023-05-02T10:48:45.727" UserId="2372" Text="I was making a new way to add sovereign accounts for a particular Network ID. Like in this https://github.com/paritytech/polkadot/blob/HEAD/xcm/xcm-builder/src/location_conversion.rs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    pub struct ChildParachainConvertsVia&lt;ParaId, AccountId&gt;(PhantomData&lt;(ParaId, AccountId)&gt;);&#xD;&#xA;    impl&lt;ParaId: From&lt;u32&gt; + Into&lt;u32&gt; + AccountIdConversion&lt;AccountId&gt;, AccountId: Clone&gt;&#xD;&#xA;    	Convert&lt;MultiLocation, AccountId&gt; for ChildParachainConvertsVia&lt;ParaId, AccountId&gt;&#xD;&#xA;    {&#xD;&#xA;    	fn convert_ref(location: impl Borrow&lt;MultiLocation&gt;) -&gt; Result&lt;AccountId, ()&gt; {&#xD;&#xA;    		match location.borrow() {&#xD;&#xA;    			MultiLocation { parents: 0, interior: X1(Parachain(id)) } =&gt;&#xD;&#xA;    				Ok(ParaId::from(*id).into_account_truncating()),&#xD;&#xA;    			_ =&gt; Err(()),&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	fn reverse_ref(who: impl Borrow&lt;AccountId&gt;) -&gt; Result&lt;MultiLocation, ()&gt; {&#xD;&#xA;    		if let Some(id) = ParaId::try_from_account(who.borrow()) {&#xD;&#xA;    			Ok(Parachain(id.into()).into())&#xD;&#xA;    		} else {&#xD;&#xA;    			Err(())&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;It is a way to add sovereign account of Parachain in the Relay chain. There are also other examples where we can add sibling sovereign account also.  I was making a new way to add sovereign account of particular NetworkId. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    pub struct NetworkIdConvertsVia&lt;Network, AccountId&gt;(PhantomData&lt;(Network, AccountId)&gt;);&#xD;&#xA;    impl&lt;Network: Get&lt;NetworkId&gt;, AccountId: From&lt;[u8; 32]&gt; + Into&lt;[u8; 32]&gt; + Clone &gt;&#xD;&#xA;    	Convert&lt;MultiLocation, AccountId&gt; for NetworkIdConvertsVia&lt;Network, AccountId&gt; where xcm::v3::NetworkId: From&lt;AccountId&gt;&#xD;&#xA;    {&#xD;&#xA;    &#xD;&#xA;    	fn convert(location: MultiLocation) -&gt; Result&lt;AccountId, MultiLocation&gt; {&#xD;&#xA;    		 let id = match location {&#xD;&#xA;   &#xD;&#xA;    		   MultiLocation { parents: 0, interior: X1(GlobalConsensus(network)) }  =&gt; network,  &#xD;&#xA;    		_=&gt;return Err(location)&#xD;&#xA;    	   };&#xD;&#xA;    	   Ok(id.into())&#xD;&#xA;    	&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// fn reverse(who: AccountId) -&gt; Result&lt;MultiLocation, AccountId&gt; {&#xD;&#xA;    	// //Ok(GlobalConsensus(NetworkId()).into())&#xD;&#xA;    	// )&#xD;&#xA;    	// }&#xD;&#xA;&#xD;&#xA;But I'm getting error &quot;the trait `From&lt;xcm::v3::NetworkId&gt;` is not implemented for `AccountId`&quot;&gt;please check&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32731" PostHistoryTypeId="1" PostId="8331" RevisionGUID="0f502598-9c4f-4b62-8978-228005e56963" CreationDate="2023-05-02T10:48:45.727" UserId="2372" Text="the trait `From&lt;xcm::v3::NetworkId&gt;` is not implemented for `AccountId`" ContentLicense="CC BY-SA 4.0" />
  <row Id="32732" PostHistoryTypeId="3" PostId="8331" RevisionGUID="0f502598-9c4f-4b62-8978-228005e56963" CreationDate="2023-05-02T10:48:45.727" UserId="2372" Text="|parachain|xcm|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32734" PostHistoryTypeId="2" PostId="8332" RevisionGUID="9c68d1f7-469d-4ef8-90c3-0f9d70047e5d" CreationDate="2023-05-02T11:05:09.637" UserId="4158" Text="we started our chain using substrate-node-template which is using PoA consensus with Aura for block production. Now we are trying to move to PoS with Babe. We found out that it is not possible to change consensus mechanism mid flight, and we need to restart our chain from block zero. So my question is, what other scenarios are there, where we need a chain restart?.&#xD;&#xA;&#xD;&#xA;What pallets we cannot simple add and use through a runtime upgrade and storage migration?&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="32736" PostHistoryTypeId="1" PostId="8332" RevisionGUID="9c68d1f7-469d-4ef8-90c3-0f9d70047e5d" CreationDate="2023-05-02T11:05:09.637" UserId="4158" Text="Which pallets cannot be added through a runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="32737" PostHistoryTypeId="3" PostId="8332" RevisionGUID="9c68d1f7-469d-4ef8-90c3-0f9d70047e5d" CreationDate="2023-05-02T11:05:09.637" UserId="4158" Text="|substrate-node-template|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32738" PostHistoryTypeId="5" PostId="8332" RevisionGUID="861d91b7-1e8d-4ab8-95c4-42e0e1d41c4c" CreationDate="2023-05-02T11:06:21.637" UserId="4158" Comment="edited body; edited title" Text="We started our chain using substrate-node-template which is using PoA consensus with Aura for block production. Now we are trying to move to PoS with Babe. We found out that it is not possible to change consensus mechanism mid flight, and we need to restart our chain from block zero. So my question is, what other scenarios are there, where we need a chain restart?.&#xD;&#xA;&#xD;&#xA;What pallets we cannot simple add and use through a runtime upgrade and storage migration?&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="32739" PostHistoryTypeId="4" PostId="8332" RevisionGUID="861d91b7-1e8d-4ab8-95c4-42e0e1d41c4c" CreationDate="2023-05-02T11:06:21.637" UserId="4158" Comment="edited body; edited title" Text="Which pallets cannot be added through a runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32740" PostHistoryTypeId="2" PostId="8333" RevisionGUID="0ae41fd5-3d86-478a-839a-1a7b01f41887" CreationDate="2023-05-02T11:20:19.523" UserId="4068" Text="This error message suggests that you are trying to use an AccountId as a NetworkId in a call to the Cross-Consensus Message (XCM) module in the Substrate blockchain framework.&#xD;&#xA;&#xD;&#xA;The From trait is a standard Rust trait that is used to define conversions between types. In this case, the From&lt;xcm::v3::NetworkId&gt; trait is required to convert an AccountId into a NetworkId type, which is used to identify the target network of a cross-chain message in the XCM protocol.&#xD;&#xA;&#xD;&#xA;To resolve this error, you need to ensure that the AccountId is properly converted to a NetworkId before it is used in the XCM call. You can do this using the TryFrom trait from the sp_std::convert module, which allows you to attempt to convert between types and handle errors if the conversion fails.&#xD;&#xA;&#xD;&#xA;Here's an example of how you can use TryFrom to convert an AccountId to a NetworkId:&#xD;&#xA;&#xD;&#xA;    use sp_std::convert::TryFrom;&#xD;&#xA;use xcm::v3::{NetworkId, AccountId32};&#xD;&#xA;&#xD;&#xA;// Convert an AccountId to a NetworkId&#xD;&#xA;let account_id = AccountId32::new([0u8; 32]); // Replace with your AccountId&#xD;&#xA;let network_id = NetworkId::try_from(account_id.clone()).map_err(|_| &quot;Invalid network ID&quot;)?;&#xD;&#xA;&#xD;&#xA;// Use the NetworkId in an XCM call&#xD;&#xA;let message = xcm::v3::Xcm::WithdrawAsset(xcm::v3::WithdrawAsset {&#xD;&#xA;    assets: vec![xcm::v3::MultiAsset::ConcreteFungible(xcm::v3::FungibleAsset {&#xD;&#xA;        id: [1u8; 32].into(),&#xD;&#xA;        amount: 100.into(),&#xD;&#xA;    })],&#xD;&#xA;    effects: xcm::v3::WithdrawAssetEffects::Transfer(xcm::v3::Transact {&#xD;&#xA;        origin_type: xcm::v3::OriginKind::SovereignAccount,&#xD;&#xA;        origin: account_id.into(),&#xD;&#xA;        require_weight_at_most: 100_000_000,&#xD;&#xA;        call: xcm::v3::Call::System(xcm::v3::SystemCall::Remark(vec![1, 2, 3])),&#xD;&#xA;    }),&#xD;&#xA;    dest: xcm::v3::MultiLocation::X1(&#xD;&#xA;        xcm::v3::Junction::AccountId32 {&#xD;&#xA;            network: network_id.clone(),&#xD;&#xA;            id: [2u8; 32].into(),&#xD;&#xA;        }&#xD;&#xA;        .into(),&#xD;&#xA;    ),&#xD;&#xA;    signer: xcm::v3::Signer::Sovereign(account_id),&#xD;&#xA;    strategy: xcm::v3::WithdrawStrategy::All,&#xD;&#xA;    max_payment: 100_000_000_000_000,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;// Send the XCM message&#xD;&#xA;xcm::send_xcm(message.into()).map_err(|_| &quot;Failed to send XCM message&quot;)?;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32742" PostHistoryTypeId="5" PostId="8332" RevisionGUID="b039b850-c487-4745-a7dc-5fbb43135c7d" CreationDate="2023-05-02T11:28:36.133" UserId="4158" Comment="deleted 1 character in body" Text="We started our chain using substrate-node-template which is using PoA consensus with Aura for block production. Now we are trying to move to PoS with Babe. We found out that it is not possible to change consensus mechanism mid flight, and we need to restart our chain from block zero. So my question is, what other scenarios are there, where we need a chain restart?&#xD;&#xA;&#xD;&#xA;What pallets we cannot simple add and use through a runtime upgrade and storage migration?&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="32743" PostHistoryTypeId="2" PostId="8334" RevisionGUID="25880871-d611-4ac8-9035-89c119d64be7" CreationDate="2023-05-02T11:31:39.730" UserId="4068" Text="The reason why offence reports are stored indefinitely in Polkadot is to prevent the possibility of a malicious party replaying the same offence report, resulting in the offender being slashed twice for the same offence. By storing all offence reports indefinitely, the system can always check if a new report is a duplicate or not.&#xD;&#xA;&#xD;&#xA;Regarding the second question, there is no fundamental reason why the offences pallet in the FRAME framework does not implement double-slashing prevention through the TimeSlot: Ord trait. It is possible to implement this using the Ord trait, as you have described. However, it may require some changes to the existing implementation of the offences pallet, which may not be trivial." ContentLicense="CC BY-SA 4.0" />
  <row Id="32745" PostHistoryTypeId="52" PostId="8328" RevisionGUID="b58b4057-b66e-4a49-b8cc-78c58b67e9de" CreationDate="2023-05-02T12:35:58.843" />
  <row Id="32746" PostHistoryTypeId="2" PostId="8335" RevisionGUID="9168f2c7-d0ba-44e9-bc61-6fa18cb0bd40" CreationDate="2023-05-02T12:57:36.910" UserId="380" Text="You can also [calculate the storage keys](https://github.com/paritytech/ink/issues/782) and use the `getStorage` method to avoid implementing getters.&#xD;&#xA;&#xD;&#xA;If you have a contract with storage as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    // Contract storage&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Dapp {&#xD;&#xA;        accounts: Lazy&lt;Vec&lt;AccountId&gt;&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And storage in your JSON ABI as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;            {&#xD;&#xA;              &quot;layout&quot;: {&#xD;&#xA;                &quot;root&quot;: {&#xD;&#xA;                  &quot;layout&quot;: {&#xD;&#xA;                    &quot;leaf&quot;: {&#xD;&#xA;                      &quot;key&quot;: &quot;0x87c1e648&quot;,&#xD;&#xA;                      &quot;ty&quot;: &quot;8&quot;&#xD;&#xA;                    }&#xD;&#xA;                  },&#xD;&#xA;                  &quot;root_key&quot;: &quot;0x87c1e648&quot;&#xD;&#xA;                }&#xD;&#xA;              },&#xD;&#xA;              &quot;name&quot;: &quot;accounts&quot;&#xD;&#xA;            },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can get the relevant storage key from the ABI using the following functions, although there is probably a better way in polkadot-js to do this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;class YourClass extends ContractPromise {&#xD;&#xA;    async getStorageKey(storageName: string): Promise&lt;`0x${string}`&gt; {&#xD;&#xA;&#xD;&#xA;        // Get the storage entry from the JSON which is the abi in ContractPromise&#xD;&#xA;        // Assuming here that you're in a class that extends ContractPromise&#xD;&#xA;        const json = this.abi.json&#xD;&#xA;&#xD;&#xA;        // Returns the JSON object above&#xD;&#xA;        let storage = json.storage.root.layout.struct.fields.filter(&#xD;&#xA;            (obj: { name: string }) =&gt; obj.name === storageName&#xD;&#xA;        )[0]&#xD;&#xA;&#xD;&#xA;        if (storage) {&#xD;&#xA;            while ('root' in storage.layout) {&#xD;&#xA;                storage = storage.layout.root&#xD;&#xA;            }&#xD;&#xA;            const rootKey = storage.root_key&#xD;&#xA;            const rootKeyReversed = reverseHexString(rootKey.slice(2))&#xD;&#xA;            return `0x${rootKeyReversed}`&#xD;&#xA;        }&#xD;&#xA;        throw new Error('Storage entry not found')&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;// used to reverse the hex key 0x87c1e648 above&#xD;&#xA;function reverseHexString(str: string): string {&#xD;&#xA;    return (&#xD;&#xA;        str&#xD;&#xA;            .match(/.{1,2}/g)&#xD;&#xA;            ?.reverse()&#xD;&#xA;            .join('') || ''&#xD;&#xA;    )&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Now get your storage with this code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { firstValueFrom } from 'rxjs'&#xD;&#xA;&#xD;&#xA;const storageKey = getStorageKey('accounts')&#xD;&#xA;const type = 'Vec&lt;AccountId&gt;'&#xD;&#xA;const promiseResult = api.rx.call.contractsApi.getStorage(contractAddress, storageKey)&#xD;&#xA;const result = await firstValueFrom(promiseResult)&#xD;&#xA;if (result) {&#xD;&#xA;    const optionBytes = this.abi.registry.createType('Option&lt;Bytes&gt;', result)&#xD;&#xA;    const accounts = this.abi.registry.createType(type, [optionBytes.unwrap().toU8a(true)])&#xD;&#xA;    console.log(accounts)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32748" PostHistoryTypeId="10" PostId="8251" RevisionGUID="cdb024cf-5c8b-40ed-a2b2-457b285b0716" CreationDate="2023-05-02T13:00:17.803" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[8236],&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;},{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:2281,&quot;DisplayName&quot;:&quot;Amit Kumar Yadav&quot;}]}" />
  <row Id="32749" PostHistoryTypeId="5" PostId="8335" RevisionGUID="5daa485c-cb3e-4e21-a0d9-b221b6e48056" CreationDate="2023-05-02T13:02:47.177" UserId="380" Comment="added 60 characters in body" Text="You can also [calculate the storage keys](https://github.com/paritytech/ink/issues/782) and use the `getStorage` method to avoid implementing getters.&#xD;&#xA;&#xD;&#xA;If you have a contract with storage as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    // Contract storage&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Dapp {&#xD;&#xA;        accounts: Lazy&lt;Vec&lt;AccountId&gt;&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And storage in your JSON ABI as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;            {&#xD;&#xA;              &quot;layout&quot;: {&#xD;&#xA;                &quot;root&quot;: {&#xD;&#xA;                  &quot;layout&quot;: {&#xD;&#xA;                    &quot;leaf&quot;: {&#xD;&#xA;                      &quot;key&quot;: &quot;0x87c1e648&quot;,&#xD;&#xA;                      &quot;ty&quot;: &quot;8&quot;&#xD;&#xA;                    }&#xD;&#xA;                  },&#xD;&#xA;                  &quot;root_key&quot;: &quot;0x87c1e648&quot;&#xD;&#xA;                }&#xD;&#xA;              },&#xD;&#xA;              &quot;name&quot;: &quot;accounts&quot;&#xD;&#xA;            },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can get the relevant storage key from the ABI using the following functions, although there is probably a better way in polkadot-js to do this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;class YourClass extends ContractPromise {&#xD;&#xA;    async getStorageKey(storageName: string): Promise&lt;`0x${string}`&gt; {&#xD;&#xA;&#xD;&#xA;        // Get the storage entry from the JSON which is the abi in ContractPromise&#xD;&#xA;        // Assuming here that you're in a class that extends ContractPromise&#xD;&#xA;        const json = this.abi.json&#xD;&#xA;&#xD;&#xA;        // Returns the JSON object above&#xD;&#xA;        let storage = json.storage.root.layout.struct.fields.filter(&#xD;&#xA;            (obj: { name: string }) =&gt; obj.name === storageName&#xD;&#xA;        )[0]&#xD;&#xA;&#xD;&#xA;        if (storage) {&#xD;&#xA;            while ('root' in storage.layout) {&#xD;&#xA;                storage = storage.layout.root&#xD;&#xA;            }&#xD;&#xA;            const rootKey = storage.root_key&#xD;&#xA;            const rootKeyReversed = reverseHexString(rootKey.slice(2))&#xD;&#xA;            return `0x${rootKeyReversed}`&#xD;&#xA;        }&#xD;&#xA;        throw new Error('Storage entry not found')&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;// used to reverse the hex key 0x87c1e648 above&#xD;&#xA;function reverseHexString(str: string): string {&#xD;&#xA;    return (&#xD;&#xA;        str&#xD;&#xA;            .match(/.{1,2}/g)&#xD;&#xA;            ?.reverse()&#xD;&#xA;            .join('') || ''&#xD;&#xA;    )&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Now get your storage with this code, again assuming you're in a class extending ContractPromise.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { firstValueFrom } from 'rxjs'&#xD;&#xA;&#xD;&#xA;const storageKey = getStorageKey('accounts')&#xD;&#xA;const type = 'Vec&lt;AccountId&gt;'&#xD;&#xA;const promiseResult = api.rx.call.contractsApi.getStorage(contractAddress, storageKey)&#xD;&#xA;const result = await firstValueFrom(promiseResult)&#xD;&#xA;if (result) {&#xD;&#xA;    const optionBytes = this.abi.registry.createType('Option&lt;Bytes&gt;', result)&#xD;&#xA;    const accounts = this.abi.registry.createType(type, [optionBytes.unwrap().toU8a(true)])&#xD;&#xA;    console.log(accounts)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32750" PostHistoryTypeId="5" PostId="7005" RevisionGUID="b961b896-f81e-4f3a-8acf-98fe9188ade6" CreationDate="2023-05-02T13:04:23.847" UserId="251" Comment="added 1 character in body" Text="`Config`s are some parameters which don't touch the storage. You can configure them in the runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Configure the pallet-balances.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/8cfe326e4e33c5077fc67f197d6a13dd871881c7/bin/node/runtime/src/lib.rs#L435-L445&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;`GenesisConfig`s are some data that you want to set into the genesis state. You can configure them in the chain spec.&#xD;&#xA;&#xD;&#xA;Setup the pallet-balances genesis state.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/8cfe326e4e33c5077fc67f197d6a13dd871881c7/bin/node/cli/src/chain_spec.rs#L299-L301" ContentLicense="CC BY-SA 4.0" />
  <row Id="32751" PostHistoryTypeId="5" PostId="8285" RevisionGUID="36a60ce6-fc0b-4cd2-808e-f3a8a082f17f" CreationDate="2023-05-02T13:06:38.957" UserId="3319" Comment="use key_type_id instead" Text="Try something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_io::crypto::{sr25519_generate, sr25519_sign};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let caller_public = sr25519_generate(key_type_id, None);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And if you need a Substrate account from your sr25519 public key:&#xD;&#xA;```rust&#xD;&#xA;let caller = MultiSigner::Sr25519(caller_public).into_account().into();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see an example [here](https://github.com/paritytech/substrate/blob/943c520aa78fcfaf3509790009ad062e8d4c6990/frame/nfts/src/benchmarking.rs#L804-L805)." ContentLicense="CC BY-SA 4.0" />
  <row Id="32752" PostHistoryTypeId="24" PostId="8285" RevisionGUID="36a60ce6-fc0b-4cd2-808e-f3a8a082f17f" CreationDate="2023-05-02T13:06:38.957" Comment="Proposed by 3319 approved by 3317, 29 edit id of 411" ContentLicense="CC BY-SA 4.0" />
  <row Id="32753" PostHistoryTypeId="5" PostId="8335" RevisionGUID="78084b12-2f00-46e0-9807-81cb1e90b1e7" CreationDate="2023-05-02T13:09:41.623" UserId="380" Comment="added 112 characters in body" Text="You can also [calculate the storage keys](https://github.com/paritytech/ink/issues/782) and use the `getStorage` method to avoid implementing getters.&#xD;&#xA;&#xD;&#xA;If you have a contract with storage as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    // Contract storage&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Dapp {&#xD;&#xA;        accounts: Lazy&lt;Vec&lt;AccountId&gt;&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And storage in your JSON ABI as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;            {&#xD;&#xA;              &quot;layout&quot;: {&#xD;&#xA;                &quot;root&quot;: {&#xD;&#xA;                  &quot;layout&quot;: {&#xD;&#xA;                    &quot;leaf&quot;: {&#xD;&#xA;                      &quot;key&quot;: &quot;0x87c1e648&quot;,&#xD;&#xA;                      &quot;ty&quot;: &quot;8&quot;&#xD;&#xA;                    }&#xD;&#xA;                  },&#xD;&#xA;                  &quot;root_key&quot;: &quot;0x87c1e648&quot;&#xD;&#xA;                }&#xD;&#xA;              },&#xD;&#xA;              &quot;name&quot;: &quot;accounts&quot;&#xD;&#xA;            },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can get the relevant storage key from the ABI using the following functions, although there is probably a better way in polkadot-js to do this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;class YourClass extends ContractPromise {&#xD;&#xA;    async getStorageKey(storageName: string): Promise&lt;`0x${string}`&gt; {&#xD;&#xA;&#xD;&#xA;        // Get the storage entry from the JSON which is the abi in ContractPromise&#xD;&#xA;        // Assuming here that you're in a class that extends ContractPromise&#xD;&#xA;        const json = this.abi.json&#xD;&#xA;&#xD;&#xA;        // Returns the JSON object above&#xD;&#xA;        let storage = json.storage.root.layout.struct.fields.filter(&#xD;&#xA;            (obj: { name: string }) =&gt; obj.name === storageName&#xD;&#xA;        )[0]&#xD;&#xA;&#xD;&#xA;        if (storage) {&#xD;&#xA;            while ('root' in storage.layout) {&#xD;&#xA;                storage = storage.layout.root&#xD;&#xA;            }&#xD;&#xA;            const rootKey = storage.root_key&#xD;&#xA;            const rootKeyReversed = reverseHexString(rootKey.slice(2))&#xD;&#xA;            return `0x${rootKeyReversed}`&#xD;&#xA;        }&#xD;&#xA;        throw new Error('Storage entry not found')&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;// used to reverse the hex key 0x87c1e648 above&#xD;&#xA;function reverseHexString(str: string): string {&#xD;&#xA;    return (&#xD;&#xA;        str&#xD;&#xA;            .match(/.{1,2}/g)&#xD;&#xA;            ?.reverse()&#xD;&#xA;            .join('') || ''&#xD;&#xA;    )&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Now get your storage with this code, again assuming you're in `YourClass` extending ContractPromise.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { firstValueFrom } from 'rxjs'&#xD;&#xA;&#xD;&#xA;const storageKey = getStorageKey('accounts')&#xD;&#xA;const type = 'Vec&lt;AccountId&gt;'&#xD;&#xA;const promiseResult = api.rx.call.contractsApi.getStorage(contractAddress, storageKey)&#xD;&#xA;const result = await firstValueFrom(promiseResult)&#xD;&#xA;if (result) {&#xD;&#xA;    const optionBytes = this.abi.registry.createType('Option&lt;Bytes&gt;', result)&#xD;&#xA;    const accounts = this.abi.registry.createType(type, [optionBytes.unwrap().toU8a(true)])&#xD;&#xA;    console.log(accounts)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Obviously, this process gets more complicated as your storage types get more complicated e.g. `Vec&lt;Struct&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="32754" PostHistoryTypeId="5" PostId="8335" RevisionGUID="3b9d2c71-72ee-46e5-9063-996cd79139eb" CreationDate="2023-05-02T15:13:29.477" UserId="380" Comment="added 29 characters in body" Text="You can also [calculate the storage keys](https://github.com/paritytech/ink/issues/782) and use the `getStorage` method to avoid implementing getters.&#xD;&#xA;&#xD;&#xA;If you have a contract with storage as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    // Contract storage&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Dapp {&#xD;&#xA;        accounts: Lazy&lt;Vec&lt;AccountId&gt;&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And storage in your JSON ABI as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;            {&#xD;&#xA;              &quot;layout&quot;: {&#xD;&#xA;                &quot;root&quot;: {&#xD;&#xA;                  &quot;layout&quot;: {&#xD;&#xA;                    &quot;leaf&quot;: {&#xD;&#xA;                      &quot;key&quot;: &quot;0x87c1e648&quot;,&#xD;&#xA;                      &quot;ty&quot;: &quot;8&quot;&#xD;&#xA;                    }&#xD;&#xA;                  },&#xD;&#xA;                  &quot;root_key&quot;: &quot;0x87c1e648&quot;&#xD;&#xA;                }&#xD;&#xA;              },&#xD;&#xA;              &quot;name&quot;: &quot;accounts&quot;&#xD;&#xA;            },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can get the relevant storage key from the ABI using the following functions, although there is probably a better way in polkadot-js to do this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;class YourClass extends ContractPromise {&#xD;&#xA;    async getStorageKey(storageName: string): Promise&lt;`0x${string}`&gt; {&#xD;&#xA;&#xD;&#xA;        // Get the storage entry from the JSON which is the abi in ContractPromise&#xD;&#xA;        // Assuming here that you're in a class that extends ContractPromise&#xD;&#xA;        const json = this.abi.json&#xD;&#xA;&#xD;&#xA;        // Returns the JSON object above&#xD;&#xA;        let storage = json.storage.root.layout.struct.fields.filter(&#xD;&#xA;            (obj: { name: string }) =&gt; obj.name === storageName&#xD;&#xA;        )[0]&#xD;&#xA;&#xD;&#xA;        if (storage) {&#xD;&#xA;            while ('root' in storage.layout) {&#xD;&#xA;                storage = storage.layout.root&#xD;&#xA;            }&#xD;&#xA;            const rootKey = storage.root_key&#xD;&#xA;            const rootKeyReversed = reverseHexString(rootKey.slice(2))&#xD;&#xA;            return `0x${rootKeyReversed}`&#xD;&#xA;        }&#xD;&#xA;        throw new Error('Storage entry not found')&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;// used to reverse the hex key 0x87c1e648 above, swapping the Endianness&#xD;&#xA;function reverseHexString(str: string): string {&#xD;&#xA;    return (&#xD;&#xA;        str&#xD;&#xA;            .match(/.{1,2}/g)&#xD;&#xA;            ?.reverse()&#xD;&#xA;            .join('') || ''&#xD;&#xA;    )&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Now get your storage with this code, again assuming you're in `YourClass` extending `ContractPromise`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { firstValueFrom } from 'rxjs'&#xD;&#xA;&#xD;&#xA;const storageKey = getStorageKey('accounts')&#xD;&#xA;const type = 'Vec&lt;AccountId&gt;'&#xD;&#xA;const promiseResult = api.rx.call.contractsApi.getStorage(contractAddress, storageKey)&#xD;&#xA;const result = await firstValueFrom(promiseResult)&#xD;&#xA;if (result) {&#xD;&#xA;    const optionBytes = this.abi.registry.createType('Option&lt;Bytes&gt;', result)&#xD;&#xA;    const accounts = this.abi.registry.createType(type, [optionBytes.unwrap().toU8a(true)])&#xD;&#xA;    console.log(accounts)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Obviously, this process gets more complicated as your storage types get more complicated e.g. `Vec&lt;Struct&gt;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="32755" PostHistoryTypeId="5" PostId="8335" RevisionGUID="eccefea4-c0dc-4130-b930-deceff974590" CreationDate="2023-05-02T15:19:24.450" UserId="380" Comment="added 29 characters in body" Text="You can also [calculate the storage keys](https://github.com/paritytech/ink/issues/782) and use the `getStorage` method to avoid implementing getters.&#xD;&#xA;&#xD;&#xA;If you have a contract with storage as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    // Contract storage&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Dapp {&#xD;&#xA;        accounts: Lazy&lt;Vec&lt;AccountId&gt;&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And storage in your JSON ABI as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;            {&#xD;&#xA;              &quot;layout&quot;: {&#xD;&#xA;                &quot;root&quot;: {&#xD;&#xA;                  &quot;layout&quot;: {&#xD;&#xA;                    &quot;leaf&quot;: {&#xD;&#xA;                      &quot;key&quot;: &quot;0x87c1e648&quot;,&#xD;&#xA;                      &quot;ty&quot;: &quot;8&quot;&#xD;&#xA;                    }&#xD;&#xA;                  },&#xD;&#xA;                  &quot;root_key&quot;: &quot;0x87c1e648&quot;&#xD;&#xA;                }&#xD;&#xA;              },&#xD;&#xA;              &quot;name&quot;: &quot;accounts&quot;&#xD;&#xA;            },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can get the relevant storage key from the ABI using the following functions, although there is probably a better way in polkadot-js to do this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;class YourClass extends ContractPromise {&#xD;&#xA;    async getStorageKey(storageName: string): Promise&lt;`0x${string}`&gt; {&#xD;&#xA;&#xD;&#xA;        // Get the storage entry from the JSON which is the abi in ContractPromise&#xD;&#xA;        // Assuming here that you're in a class that extends ContractPromise&#xD;&#xA;        const json = this.abi.json&#xD;&#xA;&#xD;&#xA;        // Returns the JSON object above&#xD;&#xA;        let storage = json.storage.root.layout.struct.fields.filter(&#xD;&#xA;            (obj: { name: string }) =&gt; obj.name === storageName&#xD;&#xA;        )[0]&#xD;&#xA;&#xD;&#xA;        if (storage) {&#xD;&#xA;            while ('root' in storage.layout) {&#xD;&#xA;                storage = storage.layout.root&#xD;&#xA;            }&#xD;&#xA;            const rootKey = storage.root_key&#xD;&#xA;            const rootKeyReversed = reverseHexString(rootKey.slice(2))&#xD;&#xA;            return `0x${rootKeyReversed}`&#xD;&#xA;        }&#xD;&#xA;        throw new Error('Storage entry not found')&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;// used to reverse the hex key 0x87c1e648 above, swapping the Endianness&#xD;&#xA;function reverseHexString(str: string): string {&#xD;&#xA;    return (&#xD;&#xA;        str&#xD;&#xA;            .match(/.{1,2}/g)&#xD;&#xA;            ?.reverse()&#xD;&#xA;            .join('') || ''&#xD;&#xA;    )&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Now get your storage with this code, again assuming you're in `YourClass` extending `ContractPromise`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { firstValueFrom } from 'rxjs'&#xD;&#xA;&#xD;&#xA;const storageKey = getStorageKey('accounts')&#xD;&#xA;const type = 'Vec&lt;AccountId&gt;'&#xD;&#xA;const promiseResult = api.rx.call.contractsApi.getStorage(contractAddress, storageKey)&#xD;&#xA;const result = await firstValueFrom(promiseResult)&#xD;&#xA;if (result) {&#xD;&#xA;    const optionBytes = this.abi.registry.createType('Option&lt;Bytes&gt;', result)&#xD;&#xA;    const accounts = this.abi.registry.createType(type, [optionBytes.unwrap().toU8a(true)])&#xD;&#xA;    console.log(accounts)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Obviously, this process gets more complicated as your storage types get more complicated e.g. `Vec&lt;Struct&gt;`. Then you should be able to use [typegen](https://github.com/polkadot-js/docs/tree/master/docs/api/examples/promise/typegen) to generate your contract types, import them to the API, and construct them from the results of `getStorage`." ContentLicense="CC BY-SA 4.0" />
  <row Id="32758" PostHistoryTypeId="2" PostId="8337" RevisionGUID="96beb01b-f7e2-40e0-84f1-3098af757ac5" CreationDate="2023-05-02T17:12:18.870" UserId="3960" Text="I'm playing around with a variation a of Substrate's PoW block production.&#xD;&#xA;Contrary to existing PoW engine my design relies on a PoW generation mechanism which is external to Substrate.&#xD;&#xA;&#xD;&#xA;The PoW results are obtained by a HTTP listener and the liveness is backed up by a secondary mechanism which involves a set of trusted nodes that produce dummy blocks based on timeouts.&#xD;&#xA;&#xD;&#xA;I need to store certain information on chain whenever a &quot;real&quot; PoW block is imported.&#xD;&#xA;&#xD;&#xA;First I tried to submit an inherent transaction with the relevant data, but I realized that the inherent transaction is not gossiped even if it is verified by implementing ```ValidateUnsigned```. &#xD;&#xA;This possibly refers to &#xD;&#xA;https://substrate.stackexchange.com/questions/5814/is-it-possible-to-gossip-inherents&#xD;&#xA;&#xD;&#xA;The next possible solution was to use Pre-Runtime Digests like so:&#xD;&#xA;- inject the relevant data into the Seal&#xD;&#xA;- modify the source code of ```start_mining_worker``` loop in such a way that the data from the ```DigestItem::Seal``` from the imported block is pushed into ```inherent_digest``` as a ```DigestItem::PreRuntime```&#xD;&#xA;- ```inherent_digest``` is inserted into the proposal - no change here&#xD;&#xA;- the ```DigestItem::PreRuntime``` is accessible from the Runtime (contrary to ```DigestItem::Seal```)&#xD;&#xA;&#xD;&#xA;This approach seems to work, at least I can see that the information is shared, but I'm uncertain it does not break things, like e.g. fork rules etc.&#xD;&#xA;&#xD;&#xA;I also tried a more relaxed approach by fetching a pre-runtime digest and submitting an offchain extrinsic, but it runs too early on the imported block, while the digest is pushed to the next block proposal which is not guaranteed to be produced by the same node. " ContentLicense="CC BY-SA 4.0" />
  <row Id="32760" PostHistoryTypeId="1" PostId="8337" RevisionGUID="96beb01b-f7e2-40e0-84f1-3098af757ac5" CreationDate="2023-05-02T17:12:18.870" UserId="3960" Text="Usage of Pre-Runtime Digest to gossip data from block creator node with PoW" ContentLicense="CC BY-SA 4.0" />
  <row Id="32761" PostHistoryTypeId="3" PostId="8337" RevisionGUID="96beb01b-f7e2-40e0-84f1-3098af757ac5" CreationDate="2023-05-02T17:12:18.870" UserId="3960" Text="|block-production|gossip|inherent|digest|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32762" PostHistoryTypeId="5" PostId="8335" RevisionGUID="e6d5c2aa-18dd-42e2-853b-08496b3937a1" CreationDate="2023-05-02T18:39:54.107" UserId="380" Comment="added 10 characters in body" Text="You can also [calculate the storage keys](https://github.com/paritytech/ink/issues/782) and use the `getStorage` method to avoid implementing getters.&#xD;&#xA;&#xD;&#xA;If you have a contract with storage as follows:&#xD;&#xA;&#xD;&#xA;```lang-rs&#xD;&#xA;    // Contract storage&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Dapp {&#xD;&#xA;        accounts: Lazy&lt;Vec&lt;AccountId&gt;&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And storage in your JSON ABI as follows:&#xD;&#xA;&#xD;&#xA;```lang-json&#xD;&#xA;            {&#xD;&#xA;              &quot;layout&quot;: {&#xD;&#xA;                &quot;root&quot;: {&#xD;&#xA;                  &quot;layout&quot;: {&#xD;&#xA;                    &quot;leaf&quot;: {&#xD;&#xA;                      &quot;key&quot;: &quot;0x87c1e648&quot;,&#xD;&#xA;                      &quot;ty&quot;: &quot;8&quot;&#xD;&#xA;                    }&#xD;&#xA;                  },&#xD;&#xA;                  &quot;root_key&quot;: &quot;0x87c1e648&quot;&#xD;&#xA;                }&#xD;&#xA;              },&#xD;&#xA;              &quot;name&quot;: &quot;accounts&quot;&#xD;&#xA;            },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you can get the relevant storage key from the ABI using the following functions, although there is probably a better way in polkadot-js to do this.&#xD;&#xA;&#xD;&#xA;```lang-ts&#xD;&#xA;class YourClass extends ContractPromise {&#xD;&#xA;    async getStorageKey(storageName: string): Promise&lt;`0x${string}`&gt; {&#xD;&#xA;&#xD;&#xA;        // Get the storage entry from the JSON which is the abi in ContractPromise&#xD;&#xA;        // Assuming here that you're in a class that extends ContractPromise&#xD;&#xA;        const json = this.abi.json&#xD;&#xA;&#xD;&#xA;        // Returns the JSON object above&#xD;&#xA;        let storage = json.storage.root.layout.struct.fields.filter(&#xD;&#xA;            (obj: { name: string }) =&gt; obj.name === storageName&#xD;&#xA;        )[0]&#xD;&#xA;&#xD;&#xA;        if (storage) {&#xD;&#xA;            while ('root' in storage.layout) {&#xD;&#xA;                storage = storage.layout.root&#xD;&#xA;            }&#xD;&#xA;            const rootKey = storage.root_key&#xD;&#xA;            const rootKeyReversed = reverseHexString(rootKey.slice(2))&#xD;&#xA;            return `0x${rootKeyReversed}`&#xD;&#xA;        }&#xD;&#xA;        throw new Error('Storage entry not found')&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```lang-ts&#xD;&#xA;// used to reverse the hex key 0x87c1e648 above, swapping the Endianness&#xD;&#xA;function reverseHexString(str: string): string {&#xD;&#xA;    return (&#xD;&#xA;        str&#xD;&#xA;            .match(/.{1,2}/g)&#xD;&#xA;            ?.reverse()&#xD;&#xA;            .join('') || ''&#xD;&#xA;    )&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Now get your storage with this code, again assuming you're in `YourClass` extending `ContractPromise`.&#xD;&#xA;&#xD;&#xA;```lang-ts&#xD;&#xA;import { firstValueFrom } from 'rxjs'&#xD;&#xA;&#xD;&#xA;const storageKey = getStorageKey('accounts')&#xD;&#xA;const type = 'Vec&lt;AccountId&gt;'&#xD;&#xA;const promiseResult = api.rx.call.contractsApi.getStorage(contractAddress, storageKey)&#xD;&#xA;const result = await firstValueFrom(promiseResult)&#xD;&#xA;if (result) {&#xD;&#xA;    const optionBytes = this.abi.registry.createType('Option&lt;Bytes&gt;', result)&#xD;&#xA;    const accounts = this.abi.registry.createType(type, [optionBytes.unwrap().toU8a(true)])&#xD;&#xA;    console.log(accounts)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Obviously, this process gets more complicated as your storage types get more complicated e.g. `Vec&lt;Struct&gt;`. Then you should be able to use [typegen](https://github.com/polkadot-js/docs/tree/master/docs/api/examples/promise/typegen) to generate your contract types, import them to the API, and construct them from the results of `getStorage`." ContentLicense="CC BY-SA 4.0" />
  <row Id="32763" PostHistoryTypeId="2" PostId="8338" RevisionGUID="595aa6d1-1198-4f9e-8fd7-90522816a353" CreationDate="2023-05-02T19:53:15.423" UserId="3310" Text="I got through a lot of documentation and official examples, but I still cannot understand how you estimate what precisely the values should be when implementing a given pallet's Config (i.e. pallet_assets::Config) for a Runtime. &#xD;&#xA;&#xD;&#xA;Example below:&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;impl pallet_assets::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = ();&#xD;&#xA;	type Balance = ();&#xD;&#xA;	type RemoveItemsLimit = ();&#xD;&#xA;	type AssetId = ();&#xD;&#xA;	type AssetIdParameter = ();&#xD;&#xA;	type Currency = ();&#xD;&#xA;	type CreateOrigin = ();&#xD;&#xA;	type ForceOrigin = ();&#xD;&#xA;	type AssetDeposit = ();&#xD;&#xA;	type AssetAccountDeposit = ();&#xD;&#xA;	type MetadataDepositBase = ();&#xD;&#xA;	type MetadataDepositPerByte = ();&#xD;&#xA;	type ApprovalDeposit = ();&#xD;&#xA;	type StringLimit = ();&#xD;&#xA;	type Freezer = ();&#xD;&#xA;	type Extra = ();&#xD;&#xA;	type CallbackHandle = ();&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So far I've been using LLM, Google, and other people's repositories in GitHub to find out what's needed for the concrete types, but that's really not a good approach.&#xD;&#xA;&#xD;&#xA;Can you please let me know what's the better way of doing this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32765" PostHistoryTypeId="1" PostId="8338" RevisionGUID="595aa6d1-1198-4f9e-8fd7-90522816a353" CreationDate="2023-05-02T19:53:15.423" UserId="3310" Text="how to implement Config of a pallet for runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="32766" PostHistoryTypeId="3" PostId="8338" RevisionGUID="595aa6d1-1198-4f9e-8fd7-90522816a353" CreationDate="2023-05-02T19:53:15.423" UserId="3310" Text="|pallet|runtime|config|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32767" PostHistoryTypeId="2" PostId="8339" RevisionGUID="2780a014-01bc-4504-bb26-d5aa7ae726ae" CreationDate="2023-05-02T20:52:39.777" UserId="1839" Text="I've got a couple of questions regarding the storage fields' key generation using `AutoKey` in the context of upgradable contracts and partial `ManualKey` usage.&#xD;&#xA;&#xD;&#xA;1. Does the use of `ManualKey` in some storage fields impact the keys generated by `AutoKey` for the rest of the fields?&#xD;&#xA;&#xD;&#xA;2. Can the change in the ordering of the fields which uses `ManualKey` impact the fields (keys) generated by `AutoKey`?&#xD;&#xA;&#xD;&#xA;3. Should we use `ManualKey` for every storage field in the case of upgradable contracts?&#xD;&#xA;&#xD;&#xA;    3.a. If so does that imply that each field will be loaded lazily? and does this result in higher read/write overhead?&#xD;&#xA;&#xD;&#xA;4. Can the use of sequentially numbered ManualKeys cause collisions?&#xD;&#xA;&#xD;&#xA;5. What other things to keep in mind while using `ManualKey` for upgradable contracts?&#xD;&#xA;&#xD;&#xA;A sample storage struct for reference:&#xD;&#xA;```rust&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct SampleStruct {&#xD;&#xA;	A: AccountId,&#xD;&#xA;	B: Mapping&lt;AccountId, Balance, ManualKey&lt;100&gt;&gt;,&#xD;&#xA;	C: String, &#xD;&#xA;	D: Lazy&lt;Vec&lt;AccountId&gt;, ManualKey&lt;101&gt;&gt;,&#xD;&#xA;}&#xD;&#xA;``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="32769" PostHistoryTypeId="1" PostId="8339" RevisionGUID="2780a014-01bc-4504-bb26-d5aa7ae726ae" CreationDate="2023-05-02T20:52:39.777" UserId="1839" Text="Factors affecting storage field key generation in ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="32770" PostHistoryTypeId="3" PostId="8339" RevisionGUID="2780a014-01bc-4504-bb26-d5aa7ae726ae" CreationDate="2023-05-02T20:52:39.777" UserId="1839" Text="|ink|smart-contract|upgradable-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32771" PostHistoryTypeId="50" PostId="4798" RevisionGUID="a9985827-0877-443e-ae0c-27242ace2cfb" CreationDate="2023-05-02T21:05:00.577" UserId="-1" />
  <row Id="32776" PostHistoryTypeId="50" PostId="7434" RevisionGUID="19b43c69-89c7-4eed-998c-6cf472545677" CreationDate="2023-05-03T02:04:30.457" UserId="-1" />
  <row Id="32778" PostHistoryTypeId="2" PostId="8341" RevisionGUID="8e1524f2-95f3-4863-9833-1e2af9f9cd67" CreationDate="2023-05-03T05:34:15.747" UserId="251" Text="It's arbitrary.&#xD;&#xA;&#xD;&#xA;You'd better start from the node-template's parameters.&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;&#xD;&#xA;Or you can take a look at the Polkadot/Kusama's.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot&#xD;&#xA;&#xD;&#xA;After that, you can try adjusting these parameters yourself to adapt your chain/network." ContentLicense="CC BY-SA 4.0" />
  <row Id="32780" PostHistoryTypeId="2" PostId="8342" RevisionGUID="9eba5f44-019a-4c89-a446-4cf10fdd7a25" CreationDate="2023-05-03T08:03:28.140" UserId="4068" Text="answer for your questions about storage field key generation using AutoKey and ManualKey in the context of upgradable contracts.&#xD;&#xA;&#xD;&#xA;1 - Does the use of ManualKey in some storage fields impact the keys generated by AutoKey for the rest of the fields?&#xD;&#xA;&#xD;&#xA;No, using ManualKey in some storage fields does not impact the keys generated by AutoKey for the rest of the fields. AutoKey generates sequential integer keys starting from 0, regardless of whether some fields use ManualKey or not. So, you can use ManualKey for some fields and AutoKey for others without any issues.&#xD;&#xA;&#xD;&#xA;2 - Can the change in the ordering of the fields which uses ManualKey impact the fields (keys) generated by AutoKey?&#xD;&#xA;&#xD;&#xA;No, the ordering of the fields that use ManualKey does not impact the keys generated by AutoKey. AutoKey generates keys sequentially based on the number of storage fields, regardless of their order or the use of ManualKey.&#xD;&#xA;&#xD;&#xA;3 - Should we use ManualKey for every storage field in the case of upgradable contracts?&#xD;&#xA;&#xD;&#xA;It depends on your use case. ManualKey can be useful for controlling the storage key of a specific field, which can be important for upgradable contracts. However, using ManualKey for every storage field may not always be necessary or efficient.&#xD;&#xA;&#xD;&#xA;3a -  If so does that imply that each field will be loaded lazily? and does this result in higher read/write overhead?&#xD;&#xA;&#xD;&#xA;Yes, if you use Lazy storage for fields that use ManualKey, it implies that those fields will be loaded lazily, which can result in higher read/write overhead. However, if you don't use Lazy storage, the field will be eagerly loaded.&#xD;&#xA;&#xD;&#xA;4 - Can the use of sequentially numbered ManualKeys cause collisions?&#xD;&#xA;&#xD;&#xA;Yes, if you use sequentially numbered ManualKeys for multiple fields, it can cause collisions. It's important to ensure that each ManualKey value is unique within the storage struct.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are some things to keep in mind while using ManualKey for upgradable contracts:&#xD;&#xA;&#xD;&#xA;Make sure to choose unique values for each ManualKey to avoid collisions.&#xD;&#xA;Using Lazy storage for fields that use ManualKey can result in higher read/write overhead.&#xD;&#xA;Be mindful of the storage size and cost when choosing ManualKey values.&#xD;&#xA;If you plan on upgrading the contract, be sure to consider the impact on storage layout and key generation when making changes to the storage struct.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32782" PostHistoryTypeId="2" PostId="8343" RevisionGUID="ed77d54d-9163-4693-970a-f6bd0d53849f" CreationDate="2023-05-03T08:11:39.973" UserId="73" Text="It is not really about &quot;estimation&quot; about most of these types! I think the general thing that is lacking here is documentation and a fundamental understanding of what `Config` and all these types are meaning. If you take a look at the [docs of `Config`][1] you will see a lot of these types are being explained. However, I can understand that even these explanations are not understandable for a newcomer. [It is being worked][2] on to make it easier for people to get a reasonable and secure default config relative easy. &#xD;&#xA;&#xD;&#xA;&gt;   ```&#xD;&#xA;&gt;   type AssetDeposit = ();&#xD;&#xA;&gt;   type AssetAccountDeposit = ();&#xD;&#xA;&gt;   type MetadataDepositBase = ();&#xD;&#xA;&gt;   type MetadataDepositPerByte = ();&#xD;&#xA;&gt;   type ApprovalDeposit = ();&#xD;&#xA;&gt;   type StringLimit = ();&#xD;&#xA;&#xD;&#xA;The first five are deposits that will get reserved in the user account for different kind of operations. The docs tell you when they are reserved.&#xD;&#xA;&#xD;&#xA;The `StringLimit` is the maximum length of a symbol that you can store for an asset.&#xD;&#xA;&#xD;&#xA;Stuff like&#xD;&#xA;&#xD;&#xA;&gt;```&#xD;&#xA;&gt;    type CreateOrigin = ();&#xD;&#xA;&gt;    type ForceOrigin = ();&#xD;&#xA;&gt;```&#xD;&#xA;&#xD;&#xA;are the origins that are allowed to create an asset or to force create an asset. While force creation is should be something that is only allowed for &quot;special&quot; origins as it gets more configuration possibilities.  &#xD;&#xA;&#xD;&#xA;Things like `RuntimeEvents` (and most of the other stuff that is prefixed with &quot;Runtime&quot;) requires you to pass the type that is being generated by `construct_runtime!` in your runtime. In your case here it would be `type RuntimeEvents = RuntimeEvents;`. &#xD;&#xA;&#xD;&#xA;Otherwise you can take a look at the configuration of Statemine or other chains: https://github.com/paritytech/cumulus/blob/9b4e0247137f158d1a35118197d34adfa58858b7/parachains/runtimes/assets/statemine/src/lib.rs#L238-L259&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/0bd9113afe29a95ce2dafe50eee1c24c251b9966/frame/assets/src/lib.rs#L220-L314&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/pull/13454" ContentLicense="CC BY-SA 4.0" />
  <row Id="32784" PostHistoryTypeId="2" PostId="8344" RevisionGUID="4c30df42-32fa-4fe9-8d46-2a49a1c4fb9e" CreationDate="2023-05-03T08:15:51.427" UserId="73" Text="`DigestItem::PreRuntime` is completely fine to put in a block. Nothing checks by default these pre-runtime digests. Your runtime should reject to build a block when there is no pre-runtime digest. It should also verify that the digest is valid and allows the node to produce the block." ContentLicense="CC BY-SA 4.0" />
  <row Id="32786" PostHistoryTypeId="5" PostId="8341" RevisionGUID="a8c148d4-67e7-49fe-a03a-f8d79c861a4e" CreationDate="2023-05-03T08:31:43.663" UserId="251" Comment="added 20 characters in body" Text="It's arbitrary.&#xD;&#xA;&#xD;&#xA;You'd better start from the node-template's parameters.&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;&#xD;&#xA;Or you can take a look at the Polkadot/Kusama's.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/tree/master/runtime&#xD;&#xA;&#xD;&#xA;After that, you can try adjusting these parameters yourself to adapt your chain/network." ContentLicense="CC BY-SA 4.0" />
  <row Id="32787" PostHistoryTypeId="2" PostId="8345" RevisionGUID="9edd395a-e007-4c1f-a21f-c764f64ea1c0" CreationDate="2023-05-03T09:00:43.100" UserId="4161" Text="We are looking to build private blockchain on Substrate. It should be scallbe up to 300 validators. Like start with 3 and scale it to 300 later on. Does standard AURA suitable for this? Can AURA handle 300 validators without any problems? Or should we integrate Staking pallet instead?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32789" PostHistoryTypeId="1" PostId="8345" RevisionGUID="9edd395a-e007-4c1f-a21f-c764f64ea1c0" CreationDate="2023-05-03T09:00:43.100" UserId="4161" Text="Consensus algorithm selection" ContentLicense="CC BY-SA 4.0" />
  <row Id="32790" PostHistoryTypeId="3" PostId="8345" RevisionGUID="9edd395a-e007-4c1f-a21f-c764f64ea1c0" CreationDate="2023-05-03T09:00:43.100" UserId="4161" Text="|staking|consensus|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32791" PostHistoryTypeId="2" PostId="8346" RevisionGUID="2f3dcee1-6bf2-4e08-aa9e-c6382a7d0e30" CreationDate="2023-05-03T09:20:17.633" UserId="3317" Text="Another way of debugging your WASM runtime is to use [wasmi][1]. Build the `cli` and run what you want to run. If something goes wrong and you cannot figure out what exactly, you can always add some logs to wasmi code. Or even make step-by-step execution logging values of interest&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/wasmi" ContentLicense="CC BY-SA 4.0" />
  <row Id="32794" PostHistoryTypeId="2" PostId="8347" RevisionGUID="74849129-c1fd-4b3a-b085-7a09e219e073" CreationDate="2023-05-03T11:42:35.330" UserId="523" Text="When declare `pubkeys` field as `generic-const-array` [here](https://github.com/Snowfork/snowbridge/blob/849e218b17597a11cd7e43b78b52ee14d1c936b2/parachain/primitives/beacon/src/types.rs#L182-L186) as following&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct SyncCommitteePrepared&lt;const COMMITTEE_SIZE: usize&gt; {&#xD;&#xA;	pub pubkeys: [PublicKeyPrepared; COMMITTEE_SIZE],&#xD;&#xA;	pub aggregate_pubkey: PublicKeyPrepared,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;benchmark failed with `wasm trap: out of bounds memory access` as following when tring to retrieve it from storage&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RUST_LOG=runtime=debug,ethereum-beacon-client=trace target/release/polkadot-parachain benchmark pallet --chain=bridge-hub-rococo-dev --pallet=snowbridge_ethereum_beacon_client '--extrinsic=*' --execution=wasm --wasm-execution=compiled --steps 50 --repeat 20 --extra --output ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs&#xD;&#xA;2023-05-03 09:54:21.954  INFO main pallet_collator_selection::pallet: assembling new collators for new session 0 at #0&#xD;&#xA;2023-05-03 09:54:21.954  INFO main pallet_collator_selection::pallet: assembling new collators for new session 1 at #0&#xD;&#xA;2023-05-03 09:54:21.956  INFO main ethereum-beacon-client:  Sync committee size is: 512&#xD;&#xA;2023-05-03 09:54:22.812  INFO main frame::benchmark::pallet: Starting benchmark: snowbridge_ethereum_beacon_client::sync_committee_period_update&#xD;&#xA;2023-05-03 09:54:22.812  INFO main ethereum-beacon-client:  Received initial sync, starting processing.&#xD;&#xA;2023-05-03 09:54:22.878 DEBUG main ethereum-beacon-client:  Updated latest sync committee period stored to 636.&#xD;&#xA;2023-05-03 09:54:22.878  INFO main ethereum-beacon-client:  Initial sync processing succeeded.&#xD;&#xA;2023-05-03 09:54:22.942 DEBUG main ethereum-beacon-client:  Updated latest sync committee period stored to 636.&#xD;&#xA;2023-05-03 09:54:22.942  INFO main ethereum-beacon-client:  Received sync committee update for period 636. Applying update&#xD;&#xA;2023-05-03 09:54:22.944 TRACE main ethereum-beacon-client:  latest committee period is: 636, attested_header period is: 636, signature_slot period is: 636&#xD;&#xA;2023-05-03 09:54:22.945  WARN main sp_state_machine::overlayed_changes::changeset: 2 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;2023-05-03 09:54:22.945  WARN main sp_state_machine::overlayed_changes::changeset: 2 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;Error: Input(&quot;Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: out of bounds memory access\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x1a02c2 - &lt;unknown&gt;!&lt;bridge_hub_rococo_runtime::PalletInfo as frame_support::traits::metadata::PalletInfo&gt;::name::hb49c0262c17914a3\n    1: 0x2f8ce6 - &lt;unknown&gt;!frame_support::storage::generator::map::StorageMap::storage_map_final_key::h728924b3847436f8\n    2: 0x2f93c7 - &lt;unknown&gt;!frame_support::storage::types::map::StorageMap&lt;Prefix,Hasher,Key,Value,QueryKind,OnEmpty,MaxValues&gt;::get::h29691a31aabbd1a3\n    3: 0xf727c - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;::sync_committee_for_period::hd6368b31c8eceda8\n    4: 0xfa268 - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;::process_sync_committee_period_update::h1d3f3447e6f3d7f4\n    5: 0x2d3979 - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::hff10ac733337c19e\n    6: 0x33215d - &lt;unknown&gt;!&lt;snowbridge_ethereum_beacon_client::pallet::Call&lt;T&gt; as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::{{closure}}::he363a0c5a91c3aaf\n    7: 0x3341f8 - &lt;unknown&gt;!environmental::local_key::LocalKey&lt;T&gt;::with::h2de68a539485e93b\n    8: 0x253fdd - &lt;unknown&gt;!core::ops::function::FnOnce::call_once{{vtable.shim}}::h72c89093876c4e93\n    9: 0xf2170 - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::benchmarking::&lt;impl frame_benchmarking::utils::Benchmarking for snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;&gt;::run_benchmark::haa5c0fc206b054d0\n   10: 0x1b6815 - &lt;unknown&gt;!&lt;bridge_hub_rococo_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_benchmark::BenchmarkV1&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,bridge_hub_rococo_runtime::RuntimeCall,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_spec_version::CheckSpecVersion&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;bridge_hub_rococo_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::BridgeRejectObsoleteHeadersAndMessages,(bridge_runtime_common::refund_relayer_extension::RefundBridgedParachainMessages&lt;bridge_hub_rococo_runtime::Runtime,bridge_runtime_common::refund_relayer_extension::RefundableParachain&lt;frame_support::instances::Instance2,bridge_hub_rococo_runtime::bridge_hub_wococo_config::BridgeHubRococoParachainId&gt;,bridge_runtime_common::refund_relayer_extension::RefundableMessagesLane&lt;frame_support::instances::Instance2,bridge_hub_rococo_runtime::bridge_hub_wococo_config::BridgeHubRococoMessagesLane&gt;,bridge_runtime_common::refund_relayer_extension::ActualFeeRefund&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::bridge_hub_wococo_config::PriorityBoostPerMessage,bridge_hub_rococo_runtime::bridge_hub_wococo_config::StrBridgeRefundBridgeHubRococoMessages&gt;,bridge_runtime_common::refund_relayer_extension::RefundBridgedParachainMessages&lt;bridge_hub_rococo_runtime::Runtime,bridge_runtime_common::refund_relayer_extension::RefundableParachain&lt;frame_support::instances::Instance1,bridge_hub_rococo_runtime::bridge_hub_rococo_config::BridgeHubWococoParachainId&gt;,bridge_runtime_common::refund_relayer_extension::RefundableMessagesLane&lt;frame_support::instances::Instance1,bridge_hub_rococo_runtime::bridge_hub_rococo_config::BridgeHubWococoMessagesLane&gt;,bridge_runtime_common::refund_relayer_extension::ActualFeeRefund&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::bridge_hub_rococo_config::PriorityBoostPerMessage,bridge_hub_rococo_runtime::bridge_hub_rococo_config::StrBridgeRefundBridgeHubWococoMessages&gt;))&gt;&gt;&gt;&gt;::dispatch_benchmark::hd277cc1a5e766c42\n   11: 0x25ef4e - &lt;unknown&gt;!Benchmark_dispatch_benchmark&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Just resolved when change to `BoundedVec` in this [commit](https://github.com/Snowfork/snowbridge/commit/22274fad4e604152a347fc03cfb9eefea28fbc6b) as following&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)]&#xD;&#xA;#[scale_info(skip_type_params(MaxCommitteeSize))]&#xD;&#xA;pub struct SyncCommitteePrepared&lt;MaxCommitteeSize: Get&lt;u32&gt;&gt; {&#xD;&#xA;	pub pubkeys: BoundedVec&lt;PublicKeyPrepared, MaxCommitteeSize&gt;,&#xD;&#xA;	pub aggregate_pubkey: PublicKeyPrepared,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Hope someone can help to confirm is it safe to use `Const-Generic` structure in runtime storage as above?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32796" PostHistoryTypeId="1" PostId="8347" RevisionGUID="74849129-c1fd-4b3a-b085-7a09e219e073" CreationDate="2023-05-03T11:42:35.330" UserId="523" Text="Is it safe to use `Const-Generic` structure in runtime storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32797" PostHistoryTypeId="3" PostId="8347" RevisionGUID="74849129-c1fd-4b3a-b085-7a09e219e073" CreationDate="2023-05-03T11:42:35.330" UserId="523" Text="|runtime|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32798" PostHistoryTypeId="2" PostId="8348" RevisionGUID="dd2c4ddf-0c0e-4d01-b4fc-2822c700f7ef" CreationDate="2023-05-03T11:43:57.893" UserId="4163" Text="Kylin network is waiting on a final review of their node implementation: https://github.com/Kylin-Network/kylin-collator/pull/127 &#xD;&#xA;Changes have been applied (https://github.com/Kylin-Network/kylin-collator/pull/127/files) but no action from SBP after 5 december 2022.&#xD;&#xA;What is the reason the review is not happening on this node implementation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32800" PostHistoryTypeId="1" PostId="8348" RevisionGUID="dd2c4ddf-0c0e-4d01-b4fc-2822c700f7ef" CreationDate="2023-05-03T11:43:57.893" UserId="4163" Text="Status of the SBP-M1 review on Kylin Network Node implementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="32801" PostHistoryTypeId="3" PostId="8348" RevisionGUID="dd2c4ddf-0c0e-4d01-b4fc-2822c700f7ef" CreationDate="2023-05-03T11:43:57.893" UserId="4163" Text="|polkadot|substrate-node|oracles|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32802" PostHistoryTypeId="2" PostId="8349" RevisionGUID="87cbea0f-8c8a-4914-9b2e-21888641cb1f" CreationDate="2023-05-03T12:28:37.427" UserId="3317" Text="AURA determines the next block author from a **given set of validators**. The [staking pallet][1] is used to manage **funds at stake by network maintainers**. &#xD;&#xA;&#xD;&#xA;They can be used in correlation; AURA determines the next block author from a **given set of validators**, this set can be chosen based on the amount of **funds at stake by network maintainers**.&#xD;&#xA;&#xD;&#xA;But to answer your question, I don't see a reason why you **can't** use AURA for a set of 300 validators.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="32804" PostHistoryTypeId="5" PostId="8347" RevisionGUID="593a9dce-3679-456b-aeb2-b4f0065f5bca" CreationDate="2023-05-03T12:29:59.543" UserId="523" Comment="added 2 characters in body" Text="When declare `pubkeys` field as `generic-const-array` [here](https://github.com/Snowfork/snowbridge/blob/849e218b17597a11cd7e43b78b52ee14d1c936b2/parachain/primitives/beacon/src/types.rs#L182-L186) as following&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct SyncCommitteePrepared&lt;const COMMITTEE_SIZE: usize&gt; {&#xD;&#xA;	pub pubkeys: [PublicKeyPrepared; COMMITTEE_SIZE],&#xD;&#xA;	pub aggregate_pubkey: PublicKeyPrepared,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;benchmark failed with `wasm trap: out of bounds memory access` as following when tring to retrieve it from storage&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RUST_LOG=runtime=debug,ethereum-beacon-client=trace target/release/polkadot-parachain benchmark pallet --chain=bridge-hub-rococo-dev --pallet=snowbridge_ethereum_beacon_client '--extrinsic=*' --execution=wasm --wasm-execution=compiled --steps 50 --repeat 20 --extra --output ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs&#xD;&#xA;2023-05-03 09:54:21.954  INFO main pallet_collator_selection::pallet: assembling new collators for new session 0 at #0&#xD;&#xA;2023-05-03 09:54:21.954  INFO main pallet_collator_selection::pallet: assembling new collators for new session 1 at #0&#xD;&#xA;2023-05-03 09:54:21.956  INFO main ethereum-beacon-client:  Sync committee size is: 512&#xD;&#xA;2023-05-03 09:54:22.812  INFO main frame::benchmark::pallet: Starting benchmark: snowbridge_ethereum_beacon_client::sync_committee_period_update&#xD;&#xA;2023-05-03 09:54:22.812  INFO main ethereum-beacon-client:  Received initial sync, starting processing.&#xD;&#xA;2023-05-03 09:54:22.878 DEBUG main ethereum-beacon-client:  Updated latest sync committee period stored to 636.&#xD;&#xA;2023-05-03 09:54:22.878  INFO main ethereum-beacon-client:  Initial sync processing succeeded.&#xD;&#xA;2023-05-03 09:54:22.942 DEBUG main ethereum-beacon-client:  Updated latest sync committee period stored to 636.&#xD;&#xA;2023-05-03 09:54:22.942  INFO main ethereum-beacon-client:  Received sync committee update for period 636. Applying update&#xD;&#xA;2023-05-03 09:54:22.944 TRACE main ethereum-beacon-client:  latest committee period is: 636, attested_header period is: 636, signature_slot period is: 636&#xD;&#xA;2023-05-03 09:54:22.945  WARN main sp_state_machine::overlayed_changes::changeset: 2 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;2023-05-03 09:54:22.945  WARN main sp_state_machine::overlayed_changes::changeset: 2 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;&#xD;&#xA;Error: Input(&quot;Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: out of bounds memory access&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x1a02c2 - &lt;unknown&gt;!&lt;bridge_hub_rococo_runtime::PalletInfo as frame_support::traits::metadata::PalletInfo&gt;::name::hb49c0262c17914a3&#xD;&#xA;    1: 0x2f8ce6 - &lt;unknown&gt;!frame_support::storage::generator::map::StorageMap::storage_map_final_key::h728924b3847436f8&#xD;&#xA;    2: 0x2f93c7 - &lt;unknown&gt;!frame_support::storage::types::map::StorageMap&lt;Prefix,Hasher,Key,Value,QueryKind,OnEmpty,MaxValues&gt;::get::h29691a31aabbd1a3&#xD;&#xA;    3: 0xf727c - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;::sync_committee_for_period::hd6368b31c8eceda8&#xD;&#xA;    4: 0xfa268 - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;::process_sync_committee_period_update::h1d3f3447e6f3d7f4&#xD;&#xA;    5: 0x2d3979 - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::hff10ac733337c19e&#xD;&#xA;    6: 0x33215d - &lt;unknown&gt;!&lt;snowbridge_ethereum_beacon_client::pallet::Call&lt;T&gt; as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::{{closure}}::he363a0c5a91c3aaf&#xD;&#xA;    7: 0x3341f8 - &lt;unknown&gt;!environmental::local_key::LocalKey&lt;T&gt;::with::h2de68a539485e93b&#xD;&#xA;    8: 0x253fdd - &lt;unknown&gt;!core::ops::function::FnOnce::call_once{{vtable.shim}}::h72c89093876c4e93&#xD;&#xA;    9: 0xf2170 - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::benchmarking::&lt;impl frame_benchmarking::utils::Benchmarking for snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;&gt;::run_benchmark::haa5c0fc206b054d0&#xD;&#xA;   10: 0x1b6815 - &lt;unknown&gt;!&lt;bridge_hub_rococo_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_benchmark::BenchmarkV1&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,bridge_hub_rococo_runtime::RuntimeCall,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_spec_version::CheckSpecVersion&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;bridge_hub_rococo_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::BridgeRejectObsoleteHeadersAndMessages,(bridge_runtime_common::refund_relayer_extension::RefundBridgedParachainMessages&lt;bridge_hub_rococo_runtime::Runtime,bridge_runtime_common::refund_relayer_extension::RefundableParachain&lt;frame_support::instances::Instance2,bridge_hub_rococo_runtime::bridge_hub_wococo_config::BridgeHubRococoParachainId&gt;,bridge_runtime_common::refund_relayer_extension::RefundableMessagesLane&lt;frame_support::instances::Instance2,bridge_hub_rococo_runtime::bridge_hub_wococo_config::BridgeHubRococoMessagesLane&gt;,bridge_runtime_common::refund_relayer_extension::ActualFeeRefund&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::bridge_hub_wococo_config::PriorityBoostPerMessage,bridge_hub_rococo_runtime::bridge_hub_wococo_config::StrBridgeRefundBridgeHubRococoMessages&gt;,bridge_runtime_common::refund_relayer_extension::RefundBridgedParachainMessages&lt;bridge_hub_rococo_runtime::Runtime,bridge_runtime_common::refund_relayer_extension::RefundableParachain&lt;frame_support::instances::Instance1,bridge_hub_rococo_runtime::bridge_hub_rococo_config::BridgeHubWococoParachainId&gt;,bridge_runtime_common::refund_relayer_extension::RefundableMessagesLane&lt;frame_support::instances::Instance1,bridge_hub_rococo_runtime::bridge_hub_rococo_config::BridgeHubWococoMessagesLane&gt;,bridge_runtime_common::refund_relayer_extension::ActualFeeRefund&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::bridge_hub_rococo_config::PriorityBoostPerMessage,bridge_hub_rococo_runtime::bridge_hub_rococo_config::StrBridgeRefundBridgeHubWococoMessages&gt;))&gt;&gt;&gt;&gt;::dispatch_benchmark::hd277cc1a5e766c42&#xD;&#xA;   11: 0x25ef4e - &lt;unknown&gt;!Benchmark_dispatch_benchmark&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Just resolved when change to `BoundedVec` in this [commit](https://github.com/Snowfork/snowbridge/commit/22274fad4e604152a347fc03cfb9eefea28fbc6b) as following&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)]&#xD;&#xA;#[scale_info(skip_type_params(MaxCommitteeSize))]&#xD;&#xA;pub struct SyncCommitteePrepared&lt;MaxCommitteeSize: Get&lt;u32&gt;&gt; {&#xD;&#xA;	pub pubkeys: BoundedVec&lt;PublicKeyPrepared, MaxCommitteeSize&gt;,&#xD;&#xA;	pub aggregate_pubkey: PublicKeyPrepared,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Hope someone can help to confirm is it safe to use `Const-Generic` structure in runtime storage as above?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32805" PostHistoryTypeId="52" PostId="8339" RevisionGUID="de066a6e-9783-401f-9dba-f077da3f258a" CreationDate="2023-05-03T13:11:18.127" />
  <row Id="32806" PostHistoryTypeId="5" PostId="3806" RevisionGUID="eda05ca8-a309-4821-acbe-8c863e7ae8f6" CreationDate="2023-05-03T14:02:37.827" UserId="494" Comment="deleted 4 characters in body" Text="The statement you quoted represents a security measure. This is a recommended best-practice because validators are sensitive nodes and attack surfaces must be reduced as much as possible.&#xD;&#xA;&#xD;&#xA;Theoretically speaking, there's nothing preventing a validator node having regular RPC methods exposed such that it can be used to submit transactions. However that would be considered a bad security practice.&#xD;&#xA;&#xD;&#xA;PolkadotJS (which I assume is what you mean by *Chrome extension*) sends RPC calls to regular (non-validator) full nodes. By having its p2p port open, the validator will receive transactions via gossip." ContentLicense="CC BY-SA 4.0" />
  <row Id="32807" PostHistoryTypeId="10" PostId="8348" RevisionGUID="6d04bec0-500a-453f-a7ac-ba38c714619f" CreationDate="2023-05-03T14:12:12.173" UserId="29" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:29,&quot;DisplayName&quot;:&quot;Bruno&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="32809" PostHistoryTypeId="5" PostId="8345" RevisionGUID="77315dab-c92b-441d-bb18-a247dcb4b4f1" CreationDate="2023-05-03T15:08:30.427" UserId="29" Comment="added 1 character in body" Text="We are looking to build private blockchain on Substrate. It should be scalable up to 300 validators. Like start with 3 and scale it to 300 later on. Does standard AURA suitable for this? Can AURA handle 300 validators without any problems? Or should we integrate Staking pallet instead?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32810" PostHistoryTypeId="2" PostId="8350" RevisionGUID="a4ff1c61-c45d-49df-9a99-16cfe559a867" CreationDate="2023-05-03T15:45:52.947" UserId="1810" Text="Your question rambles around, so you should maybe clarify the actual question.  If you're asking the standard &quot;Why is SipHash good enough?&quot; then..&#xD;&#xA;&#xD;&#xA;As a rule, probabilistic data structures like rust's HashMap need a secret seed to prevent DoS attacks.  [SipHash][1] was designed as a &quot;keyed hash function&quot; which &quot;maintains&quot; this security property, but you obtain the underlying secret seed from getrandom or similar via [`std::collections::hash_map::RandomState`][2].&#xD;&#xA;&#xD;&#xA;We do not worry about the OS kernel having backdoored randomness, so some flavor of SipHash and `RandomState` suffice, but one could discuss SipHash parameters or the counter in `RandomState` of course.  &#xD;&#xA;&#xD;&#xA;If otoh you envision a maliciously keyed `HashMap` then the birthday bound says no hash function could prevent collisions in a 64 bit key space.  &#xD;&#xA;&#xD;&#xA;  [1]: https://en.wikipedia.org/wiki/SipHash&#xD;&#xA;  [2]: https://doc.rust-lang.org/std/collections/hash_map/struct.RandomState.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="32812" PostHistoryTypeId="5" PostId="8350" RevisionGUID="9f021c12-1f6d-458d-8419-82f6c6c78524" CreationDate="2023-05-03T15:51:20.660" UserId="1810" Comment="added 144 characters in body" Text="Your question rambles around, so you should maybe clarify the actual question.  If you're asking the standard &quot;Why is SipHash good enough?&quot; then..&#xD;&#xA;&#xD;&#xA;As a rule, probabilistic data structures like rust's HashMap need a secret seed to prevent DoS attacks.  [SipHash][1] was designed as a &quot;keyed hash function&quot; which &quot;maintains&quot; this security property, but you obtain the underlying secret seed from getrandom or similar via [`std::collections::hash_map::RandomState`][2].&#xD;&#xA;&#xD;&#xA;We do not worry about the OS kernel having backdoored randomness, so some flavor of SipHash and `RandomState` suffice. One could discuss SipHash parameters or the counter in `RandomState` of course, but then Jean-Philippe Aumasson's opinion matters, like if he said anything about SipHash around https://eprint.iacr.org/2019/1492&#xD;&#xA;&#xD;&#xA;If otoh you envision a maliciously keyed `HashMap` then the birthday bound says no hash function could prevent collisions in a 64 bit key space.  This is just silly.&#xD;&#xA;&#xD;&#xA;  [1]: https://en.wikipedia.org/wiki/SipHash&#xD;&#xA;  [2]: https://doc.rust-lang.org/std/collections/hash_map/struct.RandomState.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="32813" PostHistoryTypeId="2" PostId="8351" RevisionGUID="421fde98-81de-4237-a69a-12bf26f696c5" CreationDate="2023-05-03T16:24:42.090" UserId="3711" Text="I've been unit testing an ink smart contract by calling the constructor and testing various methods on the smart contract.&#xD;&#xA;&#xD;&#xA;However, I now need to obtain the account of the contract in order to set its balance for testing purposes. How can I do this?&#xD;&#xA;&#xD;&#xA;Lots of methods, such as getting/setting the current balance, code hash, etc, require the address of the contract.&#xD;&#xA;&#xD;&#xA;What I've tried already:&#xD;&#xA;&#xD;&#xA;a)&#xD;&#xA;```&#xD;&#xA;let mut contract = MyContract::default();&#xD;&#xA;let code_hash = contract.env().own_code_hash(); // cannot access .env()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;b)&#xD;&#xA;```&#xD;&#xA;let mut contract = MyContract::default();&#xD;&#xA;let contract_addr = ink::env::account_id::&lt;ink::env::DefaultEnvironment&gt;(contract); // doesn't accept the contract as a parameter&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;c)&#xD;&#xA;```&#xD;&#xA;let mut contract = MyContract::default();&#xD;&#xA;let contract_addr = ink::env::account_id::&lt;ink::env::DefaultEnvironment&gt;(); // using it correctly, but always returns the account [1, 1, 1, ... , 1]&#xD;&#xA;&#xD;&#xA;let mut contract2 = MyContract::default();&#xD;&#xA;let contract_addr2 = ink::env::account_id::&lt;ink::env::DefaultEnvironment&gt;(); // returns the account [1, 1, 1, ... , 1] again, the two contracts can't have the same address!&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Essentially, I need access to the `.env()` in the unit tests somehow. Not sure how to do this or if this is the correct way to be doing it." ContentLicense="CC BY-SA 4.0" />
  <row Id="32815" PostHistoryTypeId="1" PostId="8351" RevisionGUID="421fde98-81de-4237-a69a-12bf26f696c5" CreationDate="2023-05-03T16:24:42.090" UserId="3711" Text="How to obtain code_hash, contract address, etc, when unit testing an ink smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32816" PostHistoryTypeId="3" PostId="8351" RevisionGUID="421fde98-81de-4237-a69a-12bf26f696c5" CreationDate="2023-05-03T16:24:42.090" UserId="3711" Text="|ink|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32817" PostHistoryTypeId="2" PostId="8352" RevisionGUID="5335afc8-6db3-4f82-b366-136754f88593" CreationDate="2023-05-03T18:21:49.557" UserId="1839" Text="Refer to the following snippet to obtain contract address:&#xD;&#xA;```rust&#xD;&#xA;use ink::codegen::Env;&#xD;&#xA;let mut contract = MyContract::default(); // init&#xD;&#xA;let address = contract.env().account_id();&#xD;&#xA;```&#xD;&#xA;You can similarly access other EnvAccess methods whose implementation is provided for off-chain environment. `code_hash()` &amp; `own_code_hash()` is not one of them though! &#xD;&#xA;&#xD;&#xA;**Disclaimer:** You need to manually set the callee before initialising a contract otherwise your contract address will be same as last set callee (which is by default [1;32]). Below is a sample implementation on how to do it.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let contract_addr: AccountId = AccountId::from([0xFF as u8; 32]);  &#xD;&#xA;set_callee::&lt;DefaultEnvironment&gt;(contract_addr);&#xD;&#xA;let mut contract = MyContract::default();&#xD;&#xA;&#xD;&#xA;assert_eq!(contract.env().account_id(), contract_addr); // true&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32819" PostHistoryTypeId="2" PostId="8353" RevisionGUID="c26a4503-dc20-489a-814f-854b1641b2b0" CreationDate="2023-05-03T20:57:49.927" UserId="4132" Text="I'm using polkadotjs to call my ink! smart contracts and I seem to be having trouble with calls that require parameters. For the call below I am getting the revert flag `{&quot;ok&quot;:{&quot;flags&quot;:[&quot;Revert&quot;],&quot;data&quot;:&quot;0x000110&quot;}}`, but I do not know what this means or how to figure it out. Appreciate any info you might be able to provide. Thanks&#xD;&#xA;&#xD;&#xA;    const { gasRequired, result: qResult } =&#xD;&#xA;        await blockchain.marketplaceContract.query[&quot;marketplaceSale::list&quot;](&#xD;&#xA;          blockchain.account.address,&#xD;&#xA;          {&#xD;&#xA;            gasLimit: getGasMaxLimit(),&#xD;&#xA;          },&#xD;&#xA;          contractAddress,&#xD;&#xA;          tokenId,&#xD;&#xA;          price&#xD;&#xA;        );" ContentLicense="CC BY-SA 4.0" />
  <row Id="32821" PostHistoryTypeId="1" PostId="8353" RevisionGUID="c26a4503-dc20-489a-814f-854b1641b2b0" CreationDate="2023-05-03T20:57:49.927" UserId="4132" Text="How can I decode this error message {&quot;ok&quot;:{&quot;flags&quot;:[&quot;Revert&quot;],&quot;data&quot;:&quot;0x000110&quot;}}?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32822" PostHistoryTypeId="3" PostId="8353" RevisionGUID="c26a4503-dc20-489a-814f-854b1641b2b0" CreationDate="2023-05-03T20:57:49.927" UserId="4132" Text="|polkadot-js|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32823" PostHistoryTypeId="2" PostId="8354" RevisionGUID="38e95b3c-c4ed-4e2b-9094-6846f3f326e4" CreationDate="2023-05-03T22:39:35.977" UserId="1950" Text="Code &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const CouncilMotionDuration: BlockNumber = 3 * MINUTES;&#xD;&#xA;	pub const CouncilMaxProposals: u32 = 100;&#xD;&#xA;	pub const CouncilMaxMembers: u32 = 100;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type TechnicalCollective = pallet_collective::Instance1;&#xD;&#xA;&#xD;&#xA;impl pallet_collective::Config&lt;TechnicalCollective&gt; for Runtime {&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	type Proposal = RuntimeCall;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type MotionDuration = CouncilMotionDuration;&#xD;&#xA;	type MaxProposals = CouncilMaxProposals;&#xD;&#xA;	type MaxMembers = CouncilMaxMembers;&#xD;&#xA;	type DefaultVote = pallet_collective::PrimeDefaultVote;&#xD;&#xA;	type WeightInfo = pallet_collective::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type EnsureRootOrHalfCouncil = EitherOfDiverse&lt;&#xD;&#xA;	EnsureRoot&lt;AccountId&gt;,&#xD;&#xA;	pallet_collective::EnsureProportionMoreThan&lt;AccountId, TechnicalCollective, 1, 2&gt;,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;impl pallet_validator_set::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	// see readme for type declaration&#xD;&#xA;	type AddRemoveOrigin = EnsureRootOrHalfCouncil;&#xD;&#xA;	type MinAuthorities = MinAuthorities;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Im looking a documentation where it explains how to use governance with a POa based chain , how to configure scheduling here?&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32825" PostHistoryTypeId="1" PostId="8354" RevisionGUID="38e95b3c-c4ed-4e2b-9094-6846f3f326e4" CreationDate="2023-05-03T22:39:35.977" UserId="1950" Text="How to configure collective pallet with a Proof of authority chain with scheduler and preimage pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="32826" PostHistoryTypeId="3" PostId="8354" RevisionGUID="38e95b3c-c4ed-4e2b-9094-6846f3f326e4" CreationDate="2023-05-03T22:39:35.977" UserId="1950" Text="|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32827" PostHistoryTypeId="5" PostId="8354" RevisionGUID="9d0abc2f-7cc8-4603-a7f9-934fc7c462fd" CreationDate="2023-05-03T23:06:19.390" UserId="1950" Comment="added 200 characters in body" Text="Code &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const CouncilMotionDuration: BlockNumber = 3 * MINUTES;&#xD;&#xA;	pub const CouncilMaxProposals: u32 = 100;&#xD;&#xA;	pub const CouncilMaxMembers: u32 = 100;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type TechnicalCollective = pallet_collective::Instance1;&#xD;&#xA;&#xD;&#xA;impl pallet_collective::Config&lt;TechnicalCollective&gt; for Runtime {&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	type Proposal = RuntimeCall;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type MotionDuration = CouncilMotionDuration;&#xD;&#xA;	type MaxProposals = CouncilMaxProposals;&#xD;&#xA;	type MaxMembers = CouncilMaxMembers;&#xD;&#xA;	type DefaultVote = pallet_collective::PrimeDefaultVote;&#xD;&#xA;	type WeightInfo = pallet_collective::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type EnsureRootOrHalfCouncil = EitherOfDiverse&lt;&#xD;&#xA;	EnsureRoot&lt;AccountId&gt;,&#xD;&#xA;	pallet_collective::EnsureProportionMoreThan&lt;AccountId, TechnicalCollective, 1, 2&gt;,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;impl pallet_validator_set::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	// see readme for type declaration&#xD;&#xA;	type AddRemoveOrigin = EnsureRootOrHalfCouncil;&#xD;&#xA;	type MinAuthorities = MinAuthorities;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Im looking a documentation where it explains how to use governance with a POa based chain , how to configure scheduling here?&gt;&#xD;&#xA;&#xD;&#xA;The Issue&#xD;&#xA;&#xD;&#xA; * How to execute an extrinsic with a custom origin with a given blocknumber after voting approval ?&#xD;&#xA; * Cannot see validators are rotating after an epoch &#xD;&#xA;&#xD;&#xA;How to configure those ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32828" PostHistoryTypeId="2" PostId="8355" RevisionGUID="8b39f616-b249-41dc-917d-d22f09f63e6b" CreationDate="2023-05-03T23:21:00.127" UserId="29" Text="&gt; How to execute an extrinsic with a custom origin with a given blocknumber after voting approval?&#xD;&#xA;&#xD;&#xA;Use the scheduler pallet with the preimage pallet or you can use the scheduler pallet with the utility pallet's dispatchAs extrinsic.&#xD;&#xA;&#xD;&#xA;&gt; Cannot see validators are rotating after an epoch&#xD;&#xA;&#xD;&#xA;Make sure you have the validator-set pallet and the session pallet properly configured:&#xD;&#xA;- https://github.com/gautamdhameja/substrate-validator-set#pallet-initialization---runtimesrclibrs&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32830" PostHistoryTypeId="50" PostId="6196" RevisionGUID="3b2431d3-af13-4fcc-b03f-a29350395d56" CreationDate="2023-05-04T00:02:25.510" UserId="-1" />
  <row Id="32837" PostHistoryTypeId="5" PostId="8347" RevisionGUID="cd343694-0692-4de4-8b47-be0e079e1d31" CreationDate="2023-05-04T02:20:42.440" UserId="523" Comment="deleted 1815 characters in body" Text="When declare `pubkeys` field as `generic-const-array` [here](https://github.com/Snowfork/snowbridge/blob/849e218b17597a11cd7e43b78b52ee14d1c936b2/parachain/primitives/beacon/src/types.rs#L182-L186) as following&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct SyncCommitteePrepared&lt;const COMMITTEE_SIZE: usize&gt; {&#xD;&#xA;	pub pubkeys: [PublicKeyPrepared; COMMITTEE_SIZE],&#xD;&#xA;	pub aggregate_pubkey: PublicKeyPrepared,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;benchmark failed with `wasm trap: out of bounds memory access` as following when tring to retrieve it from storage&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: out of bounds memory access\n&#xD;&#xA;&#xD;&#xA;WASM backtrace:\n&#xD;&#xA;error while executing at wasm backtrace:\n&#xD;&#xA;    0: 0x4aac8c - &lt;unknown&gt;!compiler_builtins::mem::memcpy::ha7ae349bf234661d\n&#xD;&#xA;    1: 0x4aa7a3 - &lt;unknown&gt;!memcpy\n&#xD;&#xA;    2: 0x3581a7 - &lt;unknown&gt;!snowbridge_beacon_primitives::types::_::&lt;impl parity_scale_codec::codec::Decode for snowbridge_beacon_primitives::types::SyncCommitteePrepared&lt;_&gt;&gt;::decode::hd88776f59538a9b9\n&#xD;&#xA;    3: 0x300d2c - &lt;unknown&gt;!frame_support::storage::types::map::StorageMap&lt;Prefix,Hasher,Key,Value,QueryKind,OnEmpty,MaxValues&gt;::get::h7f1c3a10c693c8aa\n&#xD;&#xA;    4: 0xfdf86 - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;::sync_committee_for_period::hbc4920725666ac12\n&#xD;&#xA;    5: 0x100e9b - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;::process_sync_committee_period_update::h9d8f30544088a699\n&#xD;&#xA;    6: 0x2d92e8 - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::hb1d1c484c1750f74\n&#xD;&#xA;    7: 0x338a69 - &lt;unknown&gt;!&lt;snowbridge_ethereum_beacon_client::pallet::Call&lt;T&gt; as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::{{closure}}::hf8a2139be9c19e40\n&#xD;&#xA;    8: 0x33b8cc - &lt;unknown&gt;!environmental::local_key::LocalKey&lt;T&gt;::with::h2be8bf922186fc4d\n&#xD;&#xA;    9: 0x25a42a - &lt;unknown&gt;!core::ops::function::FnOnce::call_once{{vtable.shim}}::h369b9896735a8a64\n&#xD;&#xA;   10: 0xf8648 - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::benchmarking::&lt;impl frame_benchmarking::utils::Benchmarking for snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;&gt;::run_benchmark::h5569c44f915b68d6\n&#xD;&#xA;   11: 0x1bdc21 - &lt;unknown&gt;!&lt;bridge_hub_rococo_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_benchmark::BenchmarkV1&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,bridge_hub_rococo_runtime::RuntimeCall,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_spec_version::CheckSpecVersion&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;bridge_hub_rococo_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::BridgeRejectObsoleteHeadersAndMessages,(bridge_runtime_common::refund_relayer_extension::RefundBridgedParachainMessages&lt;bridge_hub_rococo_runtime::Runtime,bridge_runtime_common::refund_relayer_extension::RefundableParachain&lt;frame_support::instances::Instance2,bridge_hub_rococo_runtime::bridge_hub_wococo_config::BridgeHubRococoParachainId&gt;,bridge_runtime_common::refund_relayer_extension::RefundableMessagesLane&lt;frame_support::instances::Instance2,bridge_hub_rococo_runtime::bridge_hub_wococo_config::BridgeHubRococoMessagesLane&gt;,bridge_runtime_common::refund_relayer_extension::ActualFeeRefund&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::bridge_hub_wococo_config::PriorityBoostPerMessage,bridge_hub_rococo_runtime::bridge_hub_wococo_config::StrBridgeRefundBridgeHubRococoMessages&gt;,bridge_runtime_common::refund_relayer_extension::RefundBridgedParachainMessages&lt;bridge_hub_rococo_runtime::Runtime,bridge_runtime_common::refund_relayer_extension::RefundableParachain&lt;frame_support::instances::Instance1,bridge_hub_rococo_runtime::bridge_hub_rococo_config::BridgeHubWococoParachainId&gt;,bridge_runtime_common::refund_relayer_extension::RefundableMessagesLane&lt;frame_support::instances::Instance1,bridge_hub_rococo_runtime::bridge_hub_rococo_config::BridgeHubWococoMessagesLane&gt;,bridge_runtime_common::refund_relayer_extension::ActualFeeRefund&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::bridge_hub_rococo_config::PriorityBoostPerMessage,bridge_hub_rococo_runtime::bridge_hub_rococo_config::StrBridgeRefundBridgeHubWococoMessages&gt;))&gt;&gt;&gt;&gt;::dispatch_benchmark::h9cf508cd5091e662\n&#xD;&#xA;   12: 0x2657ff - &lt;unknown&gt;!Benchmark_dispatch_benchmark&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Just resolved when change to `BoundedVec` in this [commit](https://github.com/Snowfork/snowbridge/commit/22274fad4e604152a347fc03cfb9eefea28fbc6b) as following&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)]&#xD;&#xA;#[scale_info(skip_type_params(MaxCommitteeSize))]&#xD;&#xA;pub struct SyncCommitteePrepared&lt;MaxCommitteeSize: Get&lt;u32&gt;&gt; {&#xD;&#xA;	pub pubkeys: BoundedVec&lt;PublicKeyPrepared, MaxCommitteeSize&gt;,&#xD;&#xA;	pub aggregate_pubkey: PublicKeyPrepared,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Hope someone can help to confirm is it safe to use `Const-Generic` structure in runtime storage as above?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32838" PostHistoryTypeId="5" PostId="8347" RevisionGUID="79d6d651-cfc2-4002-b8a1-3e4a316f1748" CreationDate="2023-05-04T06:06:35.990" UserId="523" Comment="deleted 4 characters in body" Text="When declare `pubkeys` field as `generic-const-array` [here](https://github.com/Snowfork/snowbridge/blob/849e218b17597a11cd7e43b78b52ee14d1c936b2/parachain/primitives/beacon/src/types.rs#L182-L186) as following&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct SyncCommitteePrepared&lt;const COMMITTEE_SIZE: usize&gt; {&#xD;&#xA;	pub pubkeys: [PublicKeyPrepared; COMMITTEE_SIZE],&#xD;&#xA;	pub aggregate_pubkey: PublicKeyPrepared,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;benchmark failed with `wasm trap: out of bounds memory access` as following when tring to retrieve and decode.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: out of bounds memory access\n&#xD;&#xA;&#xD;&#xA;WASM backtrace:\n&#xD;&#xA;error while executing at wasm backtrace:\n&#xD;&#xA;    0: 0x4aac8c - &lt;unknown&gt;!compiler_builtins::mem::memcpy::ha7ae349bf234661d\n&#xD;&#xA;    1: 0x4aa7a3 - &lt;unknown&gt;!memcpy\n&#xD;&#xA;    2: 0x3581a7 - &lt;unknown&gt;!snowbridge_beacon_primitives::types::_::&lt;impl parity_scale_codec::codec::Decode for snowbridge_beacon_primitives::types::SyncCommitteePrepared&lt;_&gt;&gt;::decode::hd88776f59538a9b9\n&#xD;&#xA;    3: 0x300d2c - &lt;unknown&gt;!frame_support::storage::types::map::StorageMap&lt;Prefix,Hasher,Key,Value,QueryKind,OnEmpty,MaxValues&gt;::get::h7f1c3a10c693c8aa\n&#xD;&#xA;    4: 0xfdf86 - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;::sync_committee_for_period::hbc4920725666ac12\n&#xD;&#xA;    5: 0x100e9b - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;::process_sync_committee_period_update::h9d8f30544088a699\n&#xD;&#xA;    6: 0x2d92e8 - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::hb1d1c484c1750f74\n&#xD;&#xA;    7: 0x338a69 - &lt;unknown&gt;!&lt;snowbridge_ethereum_beacon_client::pallet::Call&lt;T&gt; as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::{{closure}}::hf8a2139be9c19e40\n&#xD;&#xA;    8: 0x33b8cc - &lt;unknown&gt;!environmental::local_key::LocalKey&lt;T&gt;::with::h2be8bf922186fc4d\n&#xD;&#xA;    9: 0x25a42a - &lt;unknown&gt;!core::ops::function::FnOnce::call_once{{vtable.shim}}::h369b9896735a8a64\n&#xD;&#xA;   10: 0xf8648 - &lt;unknown&gt;!snowbridge_ethereum_beacon_client::benchmarking::&lt;impl frame_benchmarking::utils::Benchmarking for snowbridge_ethereum_beacon_client::pallet::Pallet&lt;T&gt;&gt;::run_benchmark::h5569c44f915b68d6\n&#xD;&#xA;   11: 0x1bdc21 - &lt;unknown&gt;!&lt;bridge_hub_rococo_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_benchmark::BenchmarkV1&lt;sp_runtime::generic::block::Block&lt;sp_runtime::generic::header::Header&lt;u32,sp_runtime::traits::BlakeTwo256&gt;,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic&lt;sp_runtime::multiaddress::MultiAddress&lt;&lt;&lt;sp_runtime::MultiSignature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId,()&gt;,bridge_hub_rococo_runtime::RuntimeCall,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_spec_version::CheckSpecVersion&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_tx_version::CheckTxVersion&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_genesis::CheckGenesis&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_mortality::CheckMortality&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_nonce::CheckNonce&lt;bridge_hub_rococo_runtime::Runtime&gt;,frame_system::extensions::check_weight::CheckWeight&lt;bridge_hub_rococo_runtime::Runtime&gt;,pallet_transaction_payment::ChargeTransactionPayment&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::BridgeRejectObsoleteHeadersAndMessages,(bridge_runtime_common::refund_relayer_extension::RefundBridgedParachainMessages&lt;bridge_hub_rococo_runtime::Runtime,bridge_runtime_common::refund_relayer_extension::RefundableParachain&lt;frame_support::instances::Instance2,bridge_hub_rococo_runtime::bridge_hub_wococo_config::BridgeHubRococoParachainId&gt;,bridge_runtime_common::refund_relayer_extension::RefundableMessagesLane&lt;frame_support::instances::Instance2,bridge_hub_rococo_runtime::bridge_hub_wococo_config::BridgeHubRococoMessagesLane&gt;,bridge_runtime_common::refund_relayer_extension::ActualFeeRefund&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::bridge_hub_wococo_config::PriorityBoostPerMessage,bridge_hub_rococo_runtime::bridge_hub_wococo_config::StrBridgeRefundBridgeHubRococoMessages&gt;,bridge_runtime_common::refund_relayer_extension::RefundBridgedParachainMessages&lt;bridge_hub_rococo_runtime::Runtime,bridge_runtime_common::refund_relayer_extension::RefundableParachain&lt;frame_support::instances::Instance1,bridge_hub_rococo_runtime::bridge_hub_rococo_config::BridgeHubWococoParachainId&gt;,bridge_runtime_common::refund_relayer_extension::RefundableMessagesLane&lt;frame_support::instances::Instance1,bridge_hub_rococo_runtime::bridge_hub_rococo_config::BridgeHubWococoMessagesLane&gt;,bridge_runtime_common::refund_relayer_extension::ActualFeeRefund&lt;bridge_hub_rococo_runtime::Runtime&gt;,bridge_hub_rococo_runtime::bridge_hub_rococo_config::PriorityBoostPerMessage,bridge_hub_rococo_runtime::bridge_hub_rococo_config::StrBridgeRefundBridgeHubWococoMessages&gt;))&gt;&gt;&gt;&gt;::dispatch_benchmark::h9cf508cd5091e662\n&#xD;&#xA;   12: 0x2657ff - &lt;unknown&gt;!Benchmark_dispatch_benchmark&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Just resolved when change to `BoundedVec` in this [commit](https://github.com/Snowfork/snowbridge/commit/22274fad4e604152a347fc03cfb9eefea28fbc6b) as following&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)]&#xD;&#xA;#[scale_info(skip_type_params(MaxCommitteeSize))]&#xD;&#xA;pub struct SyncCommitteePrepared&lt;MaxCommitteeSize: Get&lt;u32&gt;&gt; {&#xD;&#xA;	pub pubkeys: BoundedVec&lt;PublicKeyPrepared, MaxCommitteeSize&gt;,&#xD;&#xA;	pub aggregate_pubkey: PublicKeyPrepared,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Hope someone can help to confirm is it safe to use `Const-Generic` structure in runtime storage as above?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32839" PostHistoryTypeId="2" PostId="8358" RevisionGUID="12caa691-5f02-45ac-9996-567a8597dfe6" CreationDate="2023-05-04T06:59:20.190" UserId="629" Text="This is addressed in this [PR](https://github.com/substrate-developer-hub/substrate-docs/pull/1974#issuecomment-1533878806) and will fix the issue mentioned" ContentLicense="CC BY-SA 4.0" />
  <row Id="32841" PostHistoryTypeId="2" PostId="8359" RevisionGUID="c05f5ba1-8c46-4298-8e42-8e34fd5a812e" CreationDate="2023-05-04T07:48:15.547" UserId="4170" Text="I am trying to switch from `Aura` to `Babe` consensus. After successful building and node start I am getting an error &quot;Block import error: Incomplete block import pipeline.&quot;. This happens with genesis block. For finalization I use granpa consensus. Any ideas what did I  wrong? &#xD;&#xA;&#xD;&#xA;Version of substrate is `monthly-2022-09`" ContentLicense="CC BY-SA 4.0" />
  <row Id="32843" PostHistoryTypeId="1" PostId="8359" RevisionGUID="c05f5ba1-8c46-4298-8e42-8e34fd5a812e" CreationDate="2023-05-04T07:48:15.547" UserId="4170" Text="Switching from `Aura` to `Babe` consensus causes error &quot;Incomplete block import pipeline&quot; on genesis block" ContentLicense="CC BY-SA 4.0" />
  <row Id="32844" PostHistoryTypeId="3" PostId="8359" RevisionGUID="c05f5ba1-8c46-4298-8e42-8e34fd5a812e" CreationDate="2023-05-04T07:48:15.547" UserId="4170" Text="|consensus|grandpa|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32845" PostHistoryTypeId="2" PostId="8360" RevisionGUID="6fd567a6-f76e-4c90-8e19-859831469b77" CreationDate="2023-05-04T08:40:22.387" UserId="4155" Text="On the Astar Network'discord chnanel, I still can't find the #shibuya-faucet channel.I tried bellow action.anyone who can tell met the countermeasure? When I try to execute the contents of 3 and 4&#xD;&#xA;I tried to do 3 and 4, but could not find the corresponding channels.&#xD;&#xA;&#xD;&#xA;1. Join the Astar Network Discord server by visiting this link: &lt;https://discord.com/channels/644182966574252073/1097773162248278077&gt;&#xD;&#xA;2. Once you have joined the server, you should see a list of channels on the left side of the Discord application.&#xD;&#xA;3. Look for the `├──faucets` category, and expand it if needed.&#xD;&#xA;4. Under this category, you should find the `#shibuya-faucet` channel.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32847" PostHistoryTypeId="1" PostId="8360" RevisionGUID="6fd567a6-f76e-4c90-8e19-859831469b77" CreationDate="2023-05-04T08:40:22.387" UserId="4155" Text="still can't find the #shibuya-faucet channel" ContentLicense="CC BY-SA 4.0" />
  <row Id="32848" PostHistoryTypeId="3" PostId="8360" RevisionGUID="6fd567a6-f76e-4c90-8e19-859831469b77" CreationDate="2023-05-04T08:40:22.387" UserId="4155" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32849" PostHistoryTypeId="2" PostId="8361" RevisionGUID="85fd372f-1e43-4cbd-bea8-e1e1545970ae" CreationDate="2023-05-04T08:47:36.870" UserId="4117" Text="Faucet channel is named `sby-faucet` under faucet category. Try looking again.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/PslgM.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32851" PostHistoryTypeId="2" PostId="8362" RevisionGUID="b170b4a6-3f8b-42b1-9139-2e269e3846a4" CreationDate="2023-05-04T08:48:35.597" UserId="4171" Text="It is here, on the Portal. You will only be able to see the &quot;faucet&quot; button if your wallet is empty. If you already have some SBY in there, you can't request for more. &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/boVpv.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32853" PostHistoryTypeId="2" PostId="8363" RevisionGUID="d6abab21-0eb7-4a2d-9b3e-ef8cb574acd7" CreationDate="2023-05-04T09:22:38.960" UserId="523" Text="Seems something to do with rust compiler and resolved when upgrade toolchain to `nightly-2023-04-22`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="32855" PostHistoryTypeId="2" PostId="8364" RevisionGUID="7102d276-5a28-4d77-ac8c-2e3592e08acf" CreationDate="2023-05-04T10:30:50.937" UserId="3625" Text="I want a more extended than usual era period (it's pretty costly to change validators often), so it can take months on the single era. Still, it's not cool to bond validators without pay for such a long period. &#xD;&#xA;&#xD;&#xA;So, I'm interested in a per-session payout. Is it possible to implement? I have in mind to make a new pallet with a hook that would make custom payout every here and there. (also, I will disable the staking implementation), but maybe there is a better way of achieving it.&#xD;&#xA;&#xD;&#xA;Could you suggest any ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32857" PostHistoryTypeId="1" PostId="8364" RevisionGUID="7102d276-5a28-4d77-ac8c-2e3592e08acf" CreationDate="2023-05-04T10:30:50.937" UserId="3625" Text="Per session payout" ContentLicense="CC BY-SA 4.0" />
  <row Id="32858" PostHistoryTypeId="3" PostId="8364" RevisionGUID="7102d276-5a28-4d77-ac8c-2e3592e08acf" CreationDate="2023-05-04T10:30:50.937" UserId="3625" Text="|staking|rewards|payouts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32860" PostHistoryTypeId="2" PostId="8365" RevisionGUID="d35a242d-ee75-42c8-9db6-a1abb97e45eb" CreationDate="2023-05-04T15:56:35.267" UserId="3711" Text="I've been building unit tests in ink and have come across a strange issue. If I instantiate a contract multiple times, the account id is always the same. I thought the account id is the address of the contract, hence should be different between two contract instantiations.&#xD;&#xA;&#xD;&#xA;Code:&#xD;&#xA;```&#xD;&#xA;let c1 = MyContract::new();&#xD;&#xA;println!(&quot;{:?}&quot;, c1.env().account_id()); // prints AccountId([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])&#xD;&#xA;&#xD;&#xA;let c2 = MyContract::new();&#xD;&#xA;println!(&quot;{:?}&quot;, c2.env().account_id()); // prints AccountId([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])&#xD;&#xA;&#xD;&#xA;let c3 = MyContract::new();&#xD;&#xA;println!(&quot;{:?}&quot;, c3.env().account_id()); // prints AccountId([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Shouldn't the account id be different?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32862" PostHistoryTypeId="1" PostId="8365" RevisionGUID="d35a242d-ee75-42c8-9db6-a1abb97e45eb" CreationDate="2023-05-04T15:56:35.267" UserId="3711" Text="Why is the AccountId of a contract always 1 when unit testing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32863" PostHistoryTypeId="3" PostId="8365" RevisionGUID="d35a242d-ee75-42c8-9db6-a1abb97e45eb" CreationDate="2023-05-04T15:56:35.267" UserId="3711" Text="|ink|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32864" PostHistoryTypeId="2" PostId="8366" RevisionGUID="c2c5e949-df13-4380-b765-5f098297b5a4" CreationDate="2023-05-04T17:29:08.067" UserId="2446" Text="I used `PolkadotJS` to call a contract, when i did, it logged the status `&quot;in block&quot;`, Turns out it never makes any state change. I used `contracts-ui` it worked,  but with JS? Never. What can be the reason:&#xD;&#xA;This is my JS snippet:&#xD;&#xA;```&#xD;&#xA; const value = 10000;&#xD;&#xA;    const gasLimit = 3000n * 1000000n;&#xD;&#xA;    const storageDepositLimit = null;&#xD;&#xA;&#xD;&#xA; // Send the transaction, like elsewhere this is a normal extrinsic&#xD;&#xA;    await contract.tx&#xD;&#xA;        .commence({ storageDepositLimit, gasLimit }, hash, names, parties, ipfs_str, getFutureUnixTime(hours))&#xD;&#xA;        .signAndSend(alice, result =&gt; {&#xD;&#xA;            if (result.status.isInBlock) {&#xD;&#xA;                console.log('in a block');&#xD;&#xA;            } else if (result.status.isFinalized) {&#xD;&#xA;                console.log('finalized');&#xD;&#xA;            }&#xD;&#xA;        }).then(() =&gt; res.status(200).send({ data: `#elect-0-rate-${hash}` }));&#xD;&#xA;```&#xD;&#xA;Am i not calling it right? I took it off the `PolkadotJS` website" ContentLicense="CC BY-SA 4.0" />
  <row Id="32866" PostHistoryTypeId="1" PostId="8366" RevisionGUID="c2c5e949-df13-4380-b765-5f098297b5a4" CreationDate="2023-05-04T17:29:08.067" UserId="2446" Text="Polkadot-JS not calling my contract properly" ContentLicense="CC BY-SA 4.0" />
  <row Id="32867" PostHistoryTypeId="3" PostId="8366" RevisionGUID="c2c5e949-df13-4380-b765-5f098297b5a4" CreationDate="2023-05-04T17:29:08.067" UserId="2446" Text="|polkadot-js|ink|smart-contract|extrinsic|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32868" PostHistoryTypeId="2" PostId="8367" RevisionGUID="2e884b6a-ef5e-4cbb-bbbd-af97a0959aa1" CreationDate="2023-05-04T19:35:10.937" UserId="1839" Text="Off-chain environment used in the unit testing is just a mock environment so there aren't any dedicated mapping created b/w addresses &amp; contracts. Latter is just an object with some associated values (in context of ink! off-chain engine). So multiple contracts can have the same address.&#xD;&#xA;&#xD;&#xA;You need to manually set the callee before initialising a contract otherwise your contract address will be same as the last set callee (which is by default [1;32]). Below is a sample implementation on how to do it.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let contract_addr: AccountId = AccountId::from([0xFF as u8; 32]);  &#xD;&#xA;set_callee::&lt;DefaultEnvironment&gt;(contract_addr);&#xD;&#xA;let mut contract = MyContract::default();&#xD;&#xA;&#xD;&#xA;assert_eq!(contract.env().account_id(), contract_addr); // true&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32870" PostHistoryTypeId="52" PostId="8365" RevisionGUID="02613d0c-ed02-44f6-b421-582f4a37fb70" CreationDate="2023-05-04T23:56:45.153" />
  <row Id="32871" PostHistoryTypeId="5" PostId="8365" RevisionGUID="f5cf5e09-386a-43a5-ad50-246ced23f99a" CreationDate="2023-05-05T02:58:47.173" UserId="251" Comment="added 2 characters in body" Text="I've been building unit tests in ink and have come across a strange issue. If I instantiate a contract multiple times, the account id is always the same. I thought the account id is the address of the contract, hence should be different between two contract instantiations.&#xD;&#xA;&#xD;&#xA;Code:&#xD;&#xA;```rs&#xD;&#xA;let c1 = MyContract::new();&#xD;&#xA;println!(&quot;{:?}&quot;, c1.env().account_id()); // prints AccountId([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])&#xD;&#xA;&#xD;&#xA;let c2 = MyContract::new();&#xD;&#xA;println!(&quot;{:?}&quot;, c2.env().account_id()); // prints AccountId([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])&#xD;&#xA;&#xD;&#xA;let c3 = MyContract::new();&#xD;&#xA;println!(&quot;{:?}&quot;, c3.env().account_id()); // prints AccountId([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Shouldn't the account id be different?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32872" PostHistoryTypeId="2" PostId="8368" RevisionGUID="69835d4b-28af-42d2-8b01-1f9fed52471d" CreationDate="2023-05-05T03:54:33.790" UserId="372" Text="I'm trying to figure out where in the runtime's codebase the metadata that describes it is constructed.&#xD;&#xA;&#xD;&#xA;I've read all about the different versions of metadata and explored how they represent runtimes in the [frame metadata crate](https://github.com/paritytech/frame-metadata/blob/main/frame-metadata/src/v15.rs). I've also looked at how [scale-info](https://github.com/paritytech/scale-info) is used to attach compile-time type information. I believe I have a decent understanding of those aspects.&#xD;&#xA;&#xD;&#xA;In the runtime code I see the metadata runtime api implemented like this:&#xD;&#xA;```rust&#xD;&#xA;impl sp_api::Metadata&lt;Block&gt; for Runtime {&#xD;&#xA;	fn metadata() -&gt; OpaqueMetadata {&#xD;&#xA;		OpaqueMetadata::new(Runtime::metadata().into())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But where is this mysterious `metadata` method defined? The [rustdocs](https://paritytech.github.io/substrate/master/node_template_runtime/struct.Runtime.html#method.metadata) don't give too many clues.&#xD;&#xA;&#xD;&#xA;Ultimately, I want to understand how the runtime synthesizes all the information from the pallets into a single piece of metadata." ContentLicense="CC BY-SA 4.0" />
  <row Id="32874" PostHistoryTypeId="1" PostId="8368" RevisionGUID="69835d4b-28af-42d2-8b01-1f9fed52471d" CreationDate="2023-05-05T03:54:33.790" UserId="372" Text="In a FRAME runtime, where is the metadata actually constructed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32875" PostHistoryTypeId="3" PostId="8368" RevisionGUID="69835d4b-28af-42d2-8b01-1f9fed52471d" CreationDate="2023-05-05T03:54:33.790" UserId="372" Text="|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32876" PostHistoryTypeId="2" PostId="8369" RevisionGUID="c5f7cc54-d9d0-4c93-bf6d-1ada7e4196a9" CreationDate="2023-05-05T04:07:44.320" UserId="251" Text="It follows this path.&#xD;&#xA;&#xD;&#xA;- [`construct_runtime!`](https://github.com/paritytech/substrate/blob/133157a54d6602981b8a7a40c70da28b7cc60716/frame/support/procedural/src/construct_runtime/mod.rs#L266)&#xD;&#xA;  - [`expand_runtime_metadata`](https://github.com/paritytech/substrate/blob/133157a54d6602981b8a7a40c70da28b7cc60716/frame/support/procedural/src/construct_runtime/expand/metadata.rs#L24)&#xD;&#xA;    - expand each item&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For more detail about the items, check the `pallet` macro.&#xD;&#xA;&#xD;&#xA;E.G. [pallet calls metadata](https://github.com/paritytech/substrate/blob/133157a54d6602981b8a7a40c70da28b7cc60716/frame/support/procedural/src/pallet/expand/call.rs#LL410C8-L410C8)" ContentLicense="CC BY-SA 4.0" />
  <row Id="32878" PostHistoryTypeId="2" PostId="8370" RevisionGUID="63233af7-d168-4934-9d2a-363976e14b67" CreationDate="2023-05-05T06:07:17.733" UserId="251" Text="Here's a simplified version that demonstrates the method:&#xD;&#xA;&#xD;&#xA;Place the payout function within the `end_session`.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia/blob/646ebca9e99c727febbf410007f0967610e5d39c/pallet/staking/src/lib.rs#L1029&#xD;&#xA;&#xD;&#xA;The reward will be distributed at the end of a session." ContentLicense="CC BY-SA 4.0" />
  <row Id="32880" PostHistoryTypeId="2" PostId="8371" RevisionGUID="ee7edb8a-69fd-4faf-a2e0-dc3f763443a1" CreationDate="2023-05-05T06:19:58.650" UserId="567" Text="The best practice is to first dry-run to check for errors and then process the tx:&#xD;&#xA;    &#xD;&#xA;    // Get the initial gas WeightV2 using api.consts.system.blockWeights['maxBlock']&#xD;&#xA;    const gasLimit = api.registry.createType(&#xD;&#xA;      'WeightV2',&#xD;&#xA;      api.consts.system.blockWeights['maxBlock']&#xD;&#xA;    )&#xD;&#xA;    &#xD;&#xA;    // Query the contract message&#xD;&#xA;    // This will return the gas required and storageDeposit to execute the message&#xD;&#xA;    // and the result of the message&#xD;&#xA;    const { gasRequired, storageDeposit, result } = await contract.query.enter(&#xD;&#xA;      account.address,&#xD;&#xA;      {&#xD;&#xA;        gasLimit: gasLimit,&#xD;&#xA;        storageDepositLimit: null,&#xD;&#xA;        value: new BN('1000000000000000000')&#xD;&#xA;      }&#xD;&#xA;    )&#xD;&#xA;    &#xD;&#xA;    // Check for errors&#xD;&#xA;    if (result.isErr) {&#xD;&#xA;      let error = ''&#xD;&#xA;      if (result.asErr.isModule) {&#xD;&#xA;        const dispatchError = api.registry.findMetaError(result.asErr.asModule)&#xD;&#xA;        error = dispatchError.docs.length ? dispatchError.docs.concat().toString() : dispatchError.name&#xD;&#xA;      } else {&#xD;&#xA;        error = result.asErr.toString()&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      console.error(error)&#xD;&#xA;      return&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Even if the result is Ok, it could be a revert in the contract execution&#xD;&#xA;    if (result.isOk) {&#xD;&#xA;      const flags = result.asOk.flags.toHuman()&#xD;&#xA;      // Check if the result is a revert via flags&#xD;&#xA;      if (flags.includes('Revert')) {&#xD;&#xA;        const type = contract.abi.messages[5].returnType // here 5 is the index of the message in the ABI&#xD;&#xA;        const typeName = type?.lookupName || type?.type || ''&#xD;&#xA;        const error = contract.abi.registry.createTypeUnsafe(typeName, [result.asOk.data]).toHuman()&#xD;&#xA;    &#xD;&#xA;        console.error(error ? (error as any).Err : 'Revert')&#xD;&#xA;        return&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    // Gas require is more than gas returned in the query&#xD;&#xA;    // To be safe, we double the gasLimit.&#xD;&#xA;    // Note, doubling gasLimit will not cause spending more gas for the Tx&#xD;&#xA;    const estimatedGas = api.registry.createType(&#xD;&#xA;      'WeightV2',&#xD;&#xA;      {&#xD;&#xA;        refTime: gasRequired.refTime.toBn().mul(BN_TWO),&#xD;&#xA;        proofSize: gasRequired.proofSize.toBn().mul(BN_TWO),&#xD;&#xA;      }&#xD;&#xA;    ) as WeightV2&#xD;&#xA;    &#xD;&#xA;    setLoading(true)&#xD;&#xA;    &#xD;&#xA;    const unsub = await contract.tx&#xD;&#xA;      .enter({&#xD;&#xA;        gasLimit: estimatedGas,&#xD;&#xA;        storageDepositLimit: null,&#xD;&#xA;        value: new BN('1000000000000000000') // 1 TOKEN or it could be value you want to send to the contract in title&#xD;&#xA;      })&#xD;&#xA;      .signAndSend(account.address, (res) =&gt; {&#xD;&#xA;        // Send the transaction, like elsewhere this is a normal extrinsic&#xD;&#xA;        // with the same rules as applied in the API (As with the read example,&#xD;&#xA;        // additional params, if required can follow)&#xD;&#xA;        if (res.status.isInBlock) {&#xD;&#xA;          console.log('in a block')&#xD;&#xA;        }&#xD;&#xA;        if (res.status.isFinalized) {&#xD;&#xA;          console.log('Successfully sent the txn')&#xD;&#xA;          unsub()&#xD;&#xA;        }&#xD;&#xA;      })&#xD;&#xA;&#xD;&#xA;Code snippet from [Astar doc](https://docs.astar.network/docs/build/wasm/interact/astarjs/#send-contract-transaction-the-hard-way)" ContentLicense="CC BY-SA 4.0" />
  <row Id="32882" PostHistoryTypeId="2" PostId="8372" RevisionGUID="909b16ca-aefb-4b5c-8cab-29f4d4891a9f" CreationDate="2023-05-05T07:53:02.813" UserId="16" Text="&gt; Why are chain extensions explicitly defined vs. giving ink! by default&#xD;&#xA;&gt; read access to all pallets' storage items and dispatchable functions?&#xD;&#xA;&#xD;&#xA;Contracts [**do** have access to dispatchables](https://docs.rs/pallet-contracts/latest/pallet_contracts/api_doc/trait.Current.html#tymethod.call_runtime). The docs there also explain why we still need chain extensions: Dispatchables can't read data. They are setters. Allowing contracts to read arbitrary runtime storage is not viable because that would effectively prevent any storage migrations since contracts will then depend on storage layout. A solution for reading data that does not require a chain extension will be implemented soon and is called [view functions](https://github.com/paritytech/substrate/issues/13358). With both of those things chain extensions might not be required anymore for the vast majority of use cases.&#xD;&#xA;&#xD;&#xA;&gt; Why do chain extensions use function ids? In construct_runtime pallets&#xD;&#xA;&gt; already get an id, plus the pallets' storage items and dispatchable&#xD;&#xA;&gt; functions have explicit names.&#xD;&#xA;&#xD;&#xA;This assumes that a chain extension is always just a strict wrapper around pallet dispatchables. That might be true for many and those should be replaced by `call_runtime` (as explained above). For the rest there might not be such a strict correlation and hence individual identifiers are needed.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32884" PostHistoryTypeId="50" PostId="7937" RevisionGUID="19ac360c-dc84-4161-b90e-9650fe363d18" CreationDate="2023-05-05T08:04:25.513" UserId="-1" />
  <row Id="32885" PostHistoryTypeId="6" PostId="6340" RevisionGUID="167eaee2-b42c-460e-9983-ec568e92d4f4" CreationDate="2023-05-05T08:31:52.440" UserId="3317" Comment="edited tags" Text="|smart-contract|transactions|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32886" PostHistoryTypeId="2" PostId="8373" RevisionGUID="049eaddb-6c49-43e7-98e1-46774f904fda" CreationDate="2023-05-05T08:42:45.037" UserId="1942" Text="cargo run -- --dev -d ./data -l info&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frontier use HashedAddressMapping in evm pallet&#xD;&#xA;&#xD;&#xA;alice public key is d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;&#xD;&#xA;0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b = BlakeTwo256( b&quot;evm:&quot;[0..4] + 15fdd31c61141abd04a99fd6822c8558854ccde3 )&#xD;&#xA;&#xD;&#xA;5CMh6W6x5ZJaj2QGndYHa4Pc4ppvSFc9J66mBrxwteUkRe8p = ss58(0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct FindAuthorTruncated&lt;F&gt;(PhantomData&lt;F&gt;);&#xD;&#xA;impl&lt;F: FindAuthor&lt;u32&gt;&gt; FindAuthor&lt;H160&gt; for FindAuthorTruncated&lt;F&gt; {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;H160&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		if let Some(author_index) = F::find_author(digests) {&#xD;&#xA;			let authority_id = Aura::authorities()[author_index as usize].clone();&#xD;&#xA;			return Some(H160::from_slice(&amp;authority_id.to_raw_vec()[4..24]));&#xD;&#xA;		}&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;H: Hasher&lt;Out = H256&gt;&gt; AddressMapping&lt;AccountId32&gt; for HashedAddressMapping&lt;H&gt; {&#xD;&#xA;	fn into_account_id(address: H160) -&gt; AccountId32 {&#xD;&#xA;		let mut data = [0u8; 24];&#xD;&#xA;		data[0..4].copy_from_slice(b&quot;evm:&quot;);&#xD;&#xA;		data[4..24].copy_from_slice(&amp;address[..]);&#xD;&#xA;		let hash = H::hash(&amp;data);&#xD;&#xA;&#xD;&#xA;		AccountId32::from(Into::&lt;[u8; 32]&gt;::into(hash))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn pay_priority_fee(tip: Self::LiquidityInfo) {&#xD;&#xA;		// Default Ethereum behaviour: issue the tip to the block author.&#xD;&#xA;		if let Some(tip) = tip {&#xD;&#xA;			let account_id = T::AddressMapping::into_account_id(&lt;Pallet&lt;T&gt;&gt;::find_author());&#xD;&#xA;			let _ = C::deposit_into_existing(&amp;account_id, tip_after_commission.peek());&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32888" PostHistoryTypeId="1" PostId="8373" RevisionGUID="049eaddb-6c49-43e7-98e1-46774f904fda" CreationDate="2023-05-05T08:42:45.037" UserId="1942" Text="how can i withdraw frontier tip reward in dev mode, i use evm.withdraw(0x15fdd31c61141abd04a99fd6822c8558854ccde3, 1000000) report &quot;bad Origin&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32889" PostHistoryTypeId="3" PostId="8373" RevisionGUID="049eaddb-6c49-43e7-98e1-46774f904fda" CreationDate="2023-05-05T08:42:45.037" UserId="1942" Text="|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32890" PostHistoryTypeId="4" PostId="8373" RevisionGUID="f4471782-d5ea-49c6-aee4-a3f3330e9eca" CreationDate="2023-05-05T08:58:21.823" UserId="1942" Comment="edited title" Text="how can i withdraw frontier tip reward with alice in dev mode, i use evm.withdraw(0x15fdd31c61141abd04a99fd6822c8558854ccde3, 1) report &quot;bad Origin&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32891" PostHistoryTypeId="5" PostId="8373" RevisionGUID="f4471782-d5ea-49c6-aee4-a3f3330e9eca" CreationDate="2023-05-05T08:58:21.823" UserId="1942" Comment="edited title" Text="cargo run -- --dev -d ./data -l info&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frontier use HashedAddressMapping in evm pallet&#xD;&#xA;&#xD;&#xA;alice public key is d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;&#xD;&#xA;H160 is 0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b = BlakeTwo256( b&quot;evm:&quot;[0..4] + 15fdd31c61141abd04a99fd6822c8558854ccde3 )&#xD;&#xA;&#xD;&#xA;5CMh6W6x5ZJaj2QGndYHa4Pc4ppvSFc9J66mBrxwteUkRe8p = ss58(0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct FindAuthorTruncated&lt;F&gt;(PhantomData&lt;F&gt;);&#xD;&#xA;impl&lt;F: FindAuthor&lt;u32&gt;&gt; FindAuthor&lt;H160&gt; for FindAuthorTruncated&lt;F&gt; {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;H160&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		if let Some(author_index) = F::find_author(digests) {&#xD;&#xA;			let authority_id = Aura::authorities()[author_index as usize].clone();&#xD;&#xA;			return Some(H160::from_slice(&amp;authority_id.to_raw_vec()[4..24]));&#xD;&#xA;		}&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;H: Hasher&lt;Out = H256&gt;&gt; AddressMapping&lt;AccountId32&gt; for HashedAddressMapping&lt;H&gt; {&#xD;&#xA;	fn into_account_id(address: H160) -&gt; AccountId32 {&#xD;&#xA;		let mut data = [0u8; 24];&#xD;&#xA;		data[0..4].copy_from_slice(b&quot;evm:&quot;);&#xD;&#xA;		data[4..24].copy_from_slice(&amp;address[..]);&#xD;&#xA;		let hash = H::hash(&amp;data);&#xD;&#xA;&#xD;&#xA;		AccountId32::from(Into::&lt;[u8; 32]&gt;::into(hash))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn pay_priority_fee(tip: Self::LiquidityInfo) {&#xD;&#xA;		// Default Ethereum behaviour: issue the tip to the block author.&#xD;&#xA;		if let Some(tip) = tip {&#xD;&#xA;			let account_id = T::AddressMapping::into_account_id(&lt;Pallet&lt;T&gt;&gt;::find_author());&#xD;&#xA;			let _ = C::deposit_into_existing(&amp;account_id, tip_after_commission.peek());&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32892" PostHistoryTypeId="5" PostId="8373" RevisionGUID="ac669580-59c1-45fd-93b1-cf0f6536cb1d" CreationDate="2023-05-05T09:06:46.760" UserId="1942" Comment="added 50 characters in body; edited title" Text="https://github.com/AstarNetwork/frontier.git&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cargo run -- --dev -d ./data -l info&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frontier use HashedAddressMapping in evm pallet&#xD;&#xA;&#xD;&#xA;alice public key is d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;&#xD;&#xA;H160 is 0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b = BlakeTwo256( b&quot;evm:&quot;[0..4] + 15fdd31c61141abd04a99fd6822c8558854ccde3 )&#xD;&#xA;&#xD;&#xA;5CMh6W6x5ZJaj2QGndYHa4Pc4ppvSFc9J66mBrxwteUkRe8p = ss58(0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct FindAuthorTruncated&lt;F&gt;(PhantomData&lt;F&gt;);&#xD;&#xA;impl&lt;F: FindAuthor&lt;u32&gt;&gt; FindAuthor&lt;H160&gt; for FindAuthorTruncated&lt;F&gt; {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;H160&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		if let Some(author_index) = F::find_author(digests) {&#xD;&#xA;			let authority_id = Aura::authorities()[author_index as usize].clone();&#xD;&#xA;			return Some(H160::from_slice(&amp;authority_id.to_raw_vec()[4..24]));&#xD;&#xA;		}&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;H: Hasher&lt;Out = H256&gt;&gt; AddressMapping&lt;AccountId32&gt; for HashedAddressMapping&lt;H&gt; {&#xD;&#xA;	fn into_account_id(address: H160) -&gt; AccountId32 {&#xD;&#xA;		let mut data = [0u8; 24];&#xD;&#xA;		data[0..4].copy_from_slice(b&quot;evm:&quot;);&#xD;&#xA;		data[4..24].copy_from_slice(&amp;address[..]);&#xD;&#xA;		let hash = H::hash(&amp;data);&#xD;&#xA;&#xD;&#xA;		AccountId32::from(Into::&lt;[u8; 32]&gt;::into(hash))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn pay_priority_fee(tip: Self::LiquidityInfo) {&#xD;&#xA;		// Default Ethereum behaviour: issue the tip to the block author.&#xD;&#xA;		if let Some(tip) = tip {&#xD;&#xA;			let account_id = T::AddressMapping::into_account_id(&lt;Pallet&lt;T&gt;&gt;::find_author());&#xD;&#xA;			let _ = C::deposit_into_existing(&amp;account_id, tip_after_commission.peek());&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32893" PostHistoryTypeId="4" PostId="8373" RevisionGUID="ac669580-59c1-45fd-93b1-cf0f6536cb1d" CreationDate="2023-05-05T09:06:46.760" UserId="1942" Comment="added 50 characters in body; edited title" Text="how withdraw astar frontier tip reward with alice in dev mode, i use evm.withdraw(0x15fdd31c61141abd04a99fd6822c8558854ccde3, 1) report &quot;bad Origin&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32894" PostHistoryTypeId="2" PostId="8374" RevisionGUID="b73273da-ac52-430f-9484-bed88bb1a71a" CreationDate="2023-05-05T09:30:25.353" UserId="4067" Text="**I Cannot get the two Substrate Nodes to Work together in a local Network between two different PC running on Win11 + WSL**&#xD;&#xA;&#xD;&#xA;I have followed the Tutorial and everything seems ok till the point that i am not getting any Peer Connections.&#xD;&#xA;&#xD;&#xA;So my question is can the Substrate Node run in this setup or what i am doing wrong?&#xD;&#xA;i have checked Ports (See End of Post for Portcheck with netstat)&#xD;&#xA;can two PC communicate over 127.0.0.1? &#xD;&#xA;if not how do i set it up to run on a local Network like 192.168?&#xD;&#xA;or can i run it via ip4 or ip6 via the Internet?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks to everybody in advance who can help. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;***What i have done so far:***&#xD;&#xA;&#xD;&#xA;I have followed the tutorial [about ADD TRUSTED NODES][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/&#xD;&#xA;&#xD;&#xA;and i managed succssesfully to:&#xD;&#xA;&#xD;&#xA; 1. Generate local Keys&#xD;&#xA; 2. Custom Chain Specs (Added Aura and Grandpa Authorities and converted to RAW)&#xD;&#xA; 3. Started Node01 on first PC (Windows11+WSL)`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;  --base-path /tmp/node01 \&#xD;&#xA;  --chain ./customSpecRaw.json \&#xD;&#xA;  --port 30333 \&#xD;&#xA;  --ws-port 9945 \&#xD;&#xA;  --rpc-port 9933 \&#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;  --validator \&#xD;&#xA;  --rpc-methods Unsafe \&#xD;&#xA;  --name MyNode01 \&#xD;&#xA;  --password-interactive&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 4. Added Keystore to Node01 (Keystore check works, Node ask for PW when starting if PW is correct Node is starting up and Waiting for other Peers)&#xD;&#xA;&#xD;&#xA;This is the Output from Node 01 so Far:&#xD;&#xA;&#xD;&#xA;```2023-05-05 10:24:44 Substrate Network Node    &#xD;&#xA;2023-05-05 10:24:44 ✌️  version 4.0.0-dev-dbc8f3265f9      &#xD;&#xA;2023-05-05 10:24:44  Chain specification: Chain-Testnet-DEV    &#xD;&#xA;2023-05-05 10:24:44   Node name: MyNode01    &#xD;&#xA;2023-05-05 10:24:44  Role: AUTHORITY    &#xD;&#xA;2023-05-05 10:24:44  Database: RocksDb at /tmp/node01/chains/local_testnet/db/full    &#xD;&#xA;2023-05-05 10:24:44 ⛓  Native runtime: Network-Node-100 (Network-Node-1.tx1.au1)    &#xD;&#xA;2023-05-05 10:24:44 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2023-05-05 10:24:44   Local node identity is: 12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH    &#xD;&#xA;2023-05-05 10:24:44  Operating system: linux    &#xD;&#xA;2023-05-05 10:24:44  CPU architecture: x86_64    &#xD;&#xA;2023-05-05 10:24:44  Target environment: gnu    &#xD;&#xA;2023-05-05 10:24:44  CPU: AMD Ryzen 7 5800X 8-Core Processor    &#xD;&#xA;2023-05-05 10:24:44  CPU cores: 8    &#xD;&#xA;2023-05-05 10:24:44  Memory: 15958MB    &#xD;&#xA;2023-05-05 10:24:44  Kernel: 5.15.90.1-microsoft-standard-WSL2    &#xD;&#xA;2023-05-05 10:24:44  Linux distribution: Ubuntu 22.04.1 LTS    &#xD;&#xA;2023-05-05 10:24:44  Virtual machine: yes    &#xD;&#xA;2023-05-05 10:24:44  Highest known block at #0    &#xD;&#xA;2023-05-05 10:24:44 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2023-05-05 10:24:44 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]    &#xD;&#xA;2023-05-05 10:24:44 Running JSON-RPC WS server: addr=127.0.0.1:9945, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]    &#xD;&#xA;2023-05-05 10:24:49  Idle (0 peers), best: #0 (0x84c0…87ca), finalized #0 (0x84c0…87ca), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-05-05 10:24:54  Idle (0 peers), best: #0 (0x84c0…87ca), finalized #0 (0x84c0…87ca), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-05-05 10:24:59  Idle (0 peers), best: #0 (0x84c0…87ca), finalized #0 (0x84c0…87ca), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-05-05 10:25:04  Idle (0 peers), best: #0 (0x84c0…87ca), finalized #0 (0x84c0…87ca), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-05-05 10:25:04 ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Timeout }    &#xD;&#xA;2023-05-05 10:25:09  Idle (0 peers), best: #0 (0x84c0…87ca), finalized #0 (0x84c0…87ca), ⬇ 0 ⬆ 0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 5. Started Node02 on second PC (Windows11+WSL) Changed the NODE ID to my Node&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;&#xD;&#xA;  --base-path /tmp/node02 \&#xD;&#xA;  --chain ./customSpecRaw.json \&#xD;&#xA;  --port 30334 \&#xD;&#xA;  --ws-port 9946 \&#xD;&#xA;  --rpc-port 9934 \&#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;  --validator \&#xD;&#xA;  --rpc-methods Unsafe \&#xD;&#xA;  --name MyNode02 \&#xD;&#xA;  --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH \&#xD;&#xA;  --password-interactive`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 6. Added Keystore to Node02 (also Keystore check works, Node ask for PW when starting, if PW is correct Node is starting.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;here is the Output from Node02:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-05-05 10:40:01 ✌️  version 4.0.0-dev-66faadab556     &#xD;&#xA;2023-05-05 10:40:01  Chain specification: Chain-Testnet    &#xD;&#xA;2023-05-05 10:40:01   Node name: reminiscent-father-3257    &#xD;&#xA;2023-05-05 10:40:01  Role: FULL    &#xD;&#xA;2023-05-05 10:40:01  Database: RocksDb at /home/LOCALUSER/.local/share/node-template/chains/local_testnet/db/full    &#xD;&#xA;2023-05-05 10:40:01 ⛓  Native runtime: Network-Node-100 (Network-Node-1.tx1.au1)    &#xD;&#xA;2023-05-05 10:40:01 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2023-05-05 10:40:01   Local node identity is: 12D3KooWCouowzeu2c6p8YqxTjtBCnf4Wt2iwFGUsVSuj3dSmeZV    &#xD;&#xA;2023-05-05 10:40:01  Operating system: linux    &#xD;&#xA;2023-05-05 10:40:01  CPU architecture: x86_64    &#xD;&#xA;2023-05-05 10:40:01  Target environment: gnu    &#xD;&#xA;2023-05-05 10:40:01  CPU: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz    &#xD;&#xA;2023-05-05 10:40:01  CPU cores: 4    &#xD;&#xA;2023-05-05 10:40:01  Memory: 7817MB    &#xD;&#xA;2023-05-05 10:40:01  Kernel: 5.15.90.1-microsoft-standard-WSL2    &#xD;&#xA;2023-05-05 10:40:01  Linux distribution: Ubuntu 22.04.2 LTS    &#xD;&#xA;2023-05-05 10:40:01  Virtual machine: yes    &#xD;&#xA;2023-05-05 10:40:01  Highest known block at #0    &#xD;&#xA;2023-05-05 10:40:01 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2023-05-05 10:40:01 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]    &#xD;&#xA;2023-05-05 10:40:01 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]    &#xD;&#xA;2023-05-05 10:40:06  Idle (0 peers), best: #0 (0x4e7f…66ca), finalized #0 (0x4e7f…66ca), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-05-05 10:40:11  Idle (0 peers), best: #0 (0x4e7f…66ca), finalized #0 (0x4e7f…66ca), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-05-05 10:40:16  Idle (0 peers), best: #0 (0x4e7f…66ca), finalized #0 (0x4e7f…66ca), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-05-05 10:40:21  Idle (0 peers), best: #0 (0x4e7f…66ca), finalized #0 (0x4e7f…66ca), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-05-05 10:40:26  Idle (0 peers), best: #0 (0x4e7f…66ca), finalized #0 (0x4e7f…66ca), ⬇ 0 ⬆ 0   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have installed the netstat tool, started the node and checked Ports:&#xD;&#xA;Port Check on NODE01:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;netstat -tuln&#xD;&#xA;Active Internet connections (only servers)&#xD;&#xA;Proto Recv-Q Send-Q Local Address           Foreign Address         State&#xD;&#xA;tcp        0      0 127.0.0.1:40991         0.0.0.0:*               LISTEN&#xD;&#xA;tcp        0      0 127.0.0.1:32853         0.0.0.0:*               LISTEN&#xD;&#xA;tcp        0      0 127.0.0.1:9945          0.0.0.0:*               LISTEN&#xD;&#xA;tcp        0      0 127.0.0.1:9933          0.0.0.0:*               LISTEN&#xD;&#xA;tcp        0      0 127.0.0.1:9615          0.0.0.0:*               LISTEN&#xD;&#xA;tcp        0      0 0.0.0.0:30333           0.0.0.0:*               LISTEN&#xD;&#xA;tcp6       0      0 :::30333                :::*                    LISTEN&#xD;&#xA;udp    36864      0 0.0.0.0:5353            0.0.0.0:*&#xD;&#xA;udp        0      0 127.0.0.1:323           0.0.0.0:*&#xD;&#xA;udp6       0      0 ::1:323                 :::*&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Port Check on Node02:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;netstat -tuln&#xD;&#xA;Active Internet connections (only servers)&#xD;&#xA;Proto Recv-Q Send-Q Local Address           Foreign Address         State&#xD;&#xA;tcp        0      0 127.0.0.1:32803         0.0.0.0:*               LISTEN&#xD;&#xA;tcp        0      0 127.0.0.1:9615          0.0.0.0:*               LISTEN&#xD;&#xA;tcp        0      0 127.0.0.1:9944          0.0.0.0:*               LISTEN&#xD;&#xA;tcp        0      0 127.0.0.1:9933          0.0.0.0:*               LISTEN&#xD;&#xA;tcp        0      0 0.0.0.0:30333           0.0.0.0:*               LISTEN&#xD;&#xA;tcp6       0      0 :::30333                :::*                    LISTEN&#xD;&#xA;udp        0      0 127.0.0.1:323           0.0.0.0:*&#xD;&#xA;udp6       0      0 ::1:323                 :::*&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32896" PostHistoryTypeId="1" PostId="8374" RevisionGUID="b73273da-ac52-430f-9484-bed88bb1a71a" CreationDate="2023-05-05T09:30:25.353" UserId="4067" Text="Problems adding trusted Nodes on Windows 11 WSL CLI" ContentLicense="CC BY-SA 4.0" />
  <row Id="32897" PostHistoryTypeId="3" PostId="8374" RevisionGUID="b73273da-ac52-430f-9484-bed88bb1a71a" CreationDate="2023-05-05T09:30:25.353" UserId="4067" Text="|substrate-node-template|nodes|private-network|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32898" PostHistoryTypeId="2" PostId="8375" RevisionGUID="adf06d2c-5088-4251-888d-1ab4bd25c935" CreationDate="2023-05-05T10:02:52.580" UserId="4171" Text="To be able to view the channel, you need to verify yourself and get a role. Go to #verification." ContentLicense="CC BY-SA 4.0" />
  <row Id="32900" PostHistoryTypeId="2" PostId="8376" RevisionGUID="2e6f3608-d659-4760-9351-9583f45d4ff0" CreationDate="2023-05-05T10:12:44.773" UserId="3317" Text="What helped me to get a glimpse of this is to [`cargo expand`][1] a simple lib.rs file. &#xD;&#xA;&#xD;&#xA;I added two `events` to the flipper contract:&#xD;&#xA;```&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct Created {&#xD;&#xA;        value: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct Flipped {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        value: bool,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;I executed `cargo expand --lib &gt; expanded_lib.rs` and somewhere you can find the code where the `topics` are pushed (`push_topic`) to the `TopicsBuilderBackend`. &#xD;&#xA;```&#xD;&#xA;    const _: () = {&#xD;&#xA;        impl ::ink::env::Topics for Created {&#xD;&#xA;           type RemainingTopics = [::ink::env::topics::state::HasRemainingTopics; 1usize];&#xD;&#xA;            fn topics&lt;E, B&gt;(&#xD;&#xA;                &amp;self,&#xD;&#xA;                builder: ::ink::env::topics::TopicsBuilder&lt;&#xD;&#xA;                    ::ink::env::topics::state::Uninit,&#xD;&#xA;                    E,&#xD;&#xA;                    B,&#xD;&#xA;                &gt;,&#xD;&#xA;            ) -&gt; &lt;B as ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;&gt;::Output&#xD;&#xA;            where&#xD;&#xA;                E: ::ink::env::Environment,&#xD;&#xA;                B: ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;,&#xD;&#xA;            {&#xD;&#xA;                builder&#xD;&#xA;                    .build::&lt;Self&gt;()&#xD;&#xA;                    .push_topic::&lt;&#xD;&#xA;                        ::ink::env::topics::PrefixedValue&lt;[u8; 13usize]&gt;,&#xD;&#xA;                    &gt;(&#xD;&#xA;                        &amp;::ink::env::topics::PrefixedValue {&#xD;&#xA;                            value: b&quot;Test::Created&quot;,&#xD;&#xA;                            prefix: b&quot;&quot;,&#xD;&#xA;                        },&#xD;&#xA;                    )&#xD;&#xA;                    .finish()&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;    const _: () = {&#xD;&#xA;        impl ::ink::env::Topics for Flipped {&#xD;&#xA;            type RemainingTopics = [::ink::env::topics::state::HasRemainingTopics; 2usize];&#xD;&#xA;            fn topics&lt;E, B&gt;(&#xD;&#xA;                &amp;self,&#xD;&#xA;                builder: ::ink::env::topics::TopicsBuilder&lt;&#xD;&#xA;                    ::ink::env::topics::state::Uninit,&#xD;&#xA;                    E,&#xD;&#xA;                    B,&#xD;&#xA;                &gt;,&#xD;&#xA;            ) -&gt; &lt;B as ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;&gt;::Output&#xD;&#xA;            where&#xD;&#xA;                E: ::ink::env::Environment,&#xD;&#xA;                B: ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;,&#xD;&#xA;            {&#xD;&#xA;                builder&#xD;&#xA;                    .build::&lt;Self&gt;()&#xD;&#xA;                    .push_topic::&lt;&#xD;&#xA;                        ::ink::env::topics::PrefixedValue&lt;[u8; 13usize]&gt;,&#xD;&#xA;                    &gt;(&#xD;&#xA;                        &amp;::ink::env::topics::PrefixedValue {&#xD;&#xA;                            value: b&quot;Test::Flipped&quot;,&#xD;&#xA;                            prefix: b&quot;&quot;,&#xD;&#xA;                        },&#xD;&#xA;                    )&#xD;&#xA;                    .push_topic::&lt;&#xD;&#xA;                        ::ink::env::topics::PrefixedValue&lt;bool&gt;,&#xD;&#xA;                    &gt;(&#xD;&#xA;                        &amp;::ink::env::topics::PrefixedValue {&#xD;&#xA;                            value: &amp;self.value,&#xD;&#xA;                            prefix: b&quot;Test::Flipped::value&quot;,&#xD;&#xA;                        },&#xD;&#xA;                    )&#xD;&#xA;                    .finish()&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The first topic is the [`PrefixedValue`][2] of the event itself:&#xD;&#xA;&gt;PrefixedValue { value: b&quot;Test::Created&quot;, prefix: b&quot;&quot; }&#xD;&#xA;&#xD;&#xA;The second topic is the actual `#[ink(topic)]` in the struct:&#xD;&#xA;&gt; PrefixedValue { value: &amp;self.value, prefix: b&quot;Test::Flipped::value&quot; }&#xD;&#xA;&#xD;&#xA;When we add the [`anonymous` attribute][3] we get something like:&#xD;&#xA;```&#xD;&#xA;    const _: () = {&#xD;&#xA;        impl ::ink::env::Topics for Created {&#xD;&#xA;            type RemainingTopics = ::ink::env::topics::state::NoRemainingTopics;&#xD;&#xA;            fn topics&lt;E, B&gt;(&#xD;&#xA;                &amp;self,&#xD;&#xA;                builder: ::ink::env::topics::TopicsBuilder&lt;&#xD;&#xA;                    ::ink::env::topics::state::Uninit,&#xD;&#xA;                    E,&#xD;&#xA;                    B,&#xD;&#xA;                &gt;,&#xD;&#xA;            ) -&gt; &lt;B as ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;&gt;::Output&#xD;&#xA;            where&#xD;&#xA;                E: ::ink::env::Environment,&#xD;&#xA;                B: ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;,&#xD;&#xA;            {&#xD;&#xA;                builder.build::&lt;Self&gt;().finish()&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where you can see that no topics are pushed to `TopicsBuilderBackend`. Hope this helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dtolnay/cargo-expand&#xD;&#xA;  [2]: https://github.com/paritytech/ink/blob/c1f14bcc1011a36ed72e6726dafb1efbde5bae4d/crates/env/src/topics.rs#L208-L223&#xD;&#xA;  [3]: https://use.ink/macros-attributes/anonymous" ContentLicense="CC BY-SA 4.0" />
  <row Id="32902" PostHistoryTypeId="2" PostId="8377" RevisionGUID="b6ee737e-b2be-4407-afd0-ea1cf60feb22" CreationDate="2023-05-05T10:52:22.287" UserId="4067" Text="I have set up a Network of two Nodes in a local Network, but I cannot get the Polkadot Block explorer (polkadot.js.org) or the substrate-Front-End-Template to connect to it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;the polkadot app recognizes my custom end point somehow, but i am unable to connect.&#xD;&#xA;&#xD;&#xA;[![Screenshot of polkadot.js.org while trying to connect to the custom End Point][1]][1]&#xD;&#xA;&#xD;&#xA;How i got here:&#xD;&#xA;&#xD;&#xA;1.) i am running my the substrate node template with the tutorial: [add-trusted-nodes][2]&#xD;&#xA;&#xD;&#xA;2.) i got to the points where i get the nodes connected and producing blocks &#xD;&#xA;[![Screenshot of nodes connected][3]][3]&#xD;&#xA;&#xD;&#xA;3.) now i want to connect the Nodes to the Front-end but i cannot establish connection.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zIRFU.png&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/&#xD;&#xA;  [3]: https://i.stack.imgur.com/Eq5M1.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;4.) when starting the second Node it gives me this info about the descovered first node:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-05-05 12:45:29 discovered: 12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH /ip4/172.20.94.123/tcp/30333&#xD;&#xA;2023-05-05 12:45:30  Starting consensus session on top of parent 0x2343075c3dc49c60abf79f40bcb2bbefbb83e413f016ac42e1aebc537dea5d19&#xD;&#xA;2023-05-05 12:45:30  Prepared block for proposing at 472 (0 ms) [hash: 0x20e9259ca869ceefaaa28cc002157f5d3e0508a2b0c1f9a9845328fb1aa9959f; parent_hash: 0x2343…5d19; extrinsics (1): [0xe8e5…f0cd]]&#xD;&#xA;2023-05-05 12:45:30  Pre-sealed block for proposal at 472. Hash now 0xf9837311863e70f651e5c476ef77deff55be78202def9d2f&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**can someone give me advice how to connect to the front-end again?**&#xD;&#xA;***THANK YOU IN ADVANCE***&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32904" PostHistoryTypeId="1" PostId="8377" RevisionGUID="b6ee737e-b2be-4407-afd0-ea1cf60feb22" CreationDate="2023-05-05T10:52:22.287" UserId="4067" Text="Can not connect to https://polkadot.js.org/apps or Substrate-Front-END Template with a Custom END Point" ContentLicense="CC BY-SA 4.0" />
  <row Id="32905" PostHistoryTypeId="3" PostId="8377" RevisionGUID="b6ee737e-b2be-4407-afd0-ea1cf60feb22" CreationDate="2023-05-05T10:52:22.287" UserId="4067" Text="|polkadot-js|substrate-node-template|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32906" PostHistoryTypeId="2" PostId="8378" RevisionGUID="e3f22850-1617-4848-84c9-ef2e5063b6a8" CreationDate="2023-05-05T12:28:09.703" UserId="4081" Text="The address 127.0.0.1,is the loopback address, and it should work if both nodes are running on the same machine. However, if the nodes are running on different machines, you will need to use their respective IP addresses.&#xD;&#xA;&#xD;&#xA;I haven't tried this but I assume that if you change the bootnode flag when running the second node from 127.0.0.1 to the IP address of the machine running the first node then it should be able to discover the node.&#xD;&#xA;&#xD;&#xA;To get the IPv4 address run the command `ipconfig` on your PowerShell/CMD." ContentLicense="CC BY-SA 4.0" />
  <row Id="32908" PostHistoryTypeId="2" PostId="8379" RevisionGUID="0f73b995-a5b1-4e42-b269-2eca081cebd5" CreationDate="2023-05-05T12:39:34.483" UserId="4176" Text="Reef as well and a few other upcoming ones&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32915" PostHistoryTypeId="2" PostId="8380" RevisionGUID="ba0c7366-f222-4f18-afee-1927790c64c7" CreationDate="2023-05-05T13:06:27.063" UserId="2281" Text="you can check [this][1] these are the projects build using substrate&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.io/ecosystem/projects/" ContentLicense="CC BY-SA 4.0" />
  <row Id="32917" PostHistoryTypeId="5" PostId="8376" RevisionGUID="dd45c35d-3a94-446d-bb91-5f8edc0c20e0" CreationDate="2023-05-05T13:19:32.660" UserId="3317" Comment="added 181 characters in body" Text="What helped me to get a glimpse of this is to [`cargo expand`][1] a simple lib.rs file. &#xD;&#xA;&#xD;&#xA;I added two `events` to the flipper contract:&#xD;&#xA;```&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct Created {&#xD;&#xA;        value: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct Flipped {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        value: bool,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;I executed `cargo expand --lib &gt; expanded_lib.rs` and somewhere you can find the code where the `topics` are pushed (`push_topic`) to the `TopicsBuilderBackend`. &#xD;&#xA;```&#xD;&#xA;    const _: () = {&#xD;&#xA;        impl ::ink::env::Topics for Created {&#xD;&#xA;           type RemainingTopics = [::ink::env::topics::state::HasRemainingTopics; 1usize];&#xD;&#xA;            fn topics&lt;E, B&gt;(&#xD;&#xA;                &amp;self,&#xD;&#xA;                builder: ::ink::env::topics::TopicsBuilder&lt;&#xD;&#xA;                    ::ink::env::topics::state::Uninit,&#xD;&#xA;                    E,&#xD;&#xA;                    B,&#xD;&#xA;                &gt;,&#xD;&#xA;            ) -&gt; &lt;B as ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;&gt;::Output&#xD;&#xA;            where&#xD;&#xA;                E: ::ink::env::Environment,&#xD;&#xA;                B: ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;,&#xD;&#xA;            {&#xD;&#xA;                builder&#xD;&#xA;                    .build::&lt;Self&gt;()&#xD;&#xA;                    .push_topic::&lt;&#xD;&#xA;                        ::ink::env::topics::PrefixedValue&lt;[u8; 13usize]&gt;,&#xD;&#xA;                    &gt;(&#xD;&#xA;                        &amp;::ink::env::topics::PrefixedValue {&#xD;&#xA;                            value: b&quot;Test::Created&quot;,&#xD;&#xA;                            prefix: b&quot;&quot;,&#xD;&#xA;                        },&#xD;&#xA;                    )&#xD;&#xA;                    .finish()&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;    const _: () = {&#xD;&#xA;        impl ::ink::env::Topics for Flipped {&#xD;&#xA;            type RemainingTopics = [::ink::env::topics::state::HasRemainingTopics; 2usize];&#xD;&#xA;            fn topics&lt;E, B&gt;(&#xD;&#xA;                &amp;self,&#xD;&#xA;                builder: ::ink::env::topics::TopicsBuilder&lt;&#xD;&#xA;                    ::ink::env::topics::state::Uninit,&#xD;&#xA;                    E,&#xD;&#xA;                    B,&#xD;&#xA;                &gt;,&#xD;&#xA;            ) -&gt; &lt;B as ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;&gt;::Output&#xD;&#xA;            where&#xD;&#xA;                E: ::ink::env::Environment,&#xD;&#xA;                B: ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;,&#xD;&#xA;            {&#xD;&#xA;                builder&#xD;&#xA;                    .build::&lt;Self&gt;()&#xD;&#xA;                    .push_topic::&lt;&#xD;&#xA;                        ::ink::env::topics::PrefixedValue&lt;[u8; 13usize]&gt;,&#xD;&#xA;                    &gt;(&#xD;&#xA;                        &amp;::ink::env::topics::PrefixedValue {&#xD;&#xA;                            value: b&quot;Test::Flipped&quot;,&#xD;&#xA;                            prefix: b&quot;&quot;,&#xD;&#xA;                        },&#xD;&#xA;                    )&#xD;&#xA;                    .push_topic::&lt;&#xD;&#xA;                        ::ink::env::topics::PrefixedValue&lt;bool&gt;,&#xD;&#xA;                    &gt;(&#xD;&#xA;                        &amp;::ink::env::topics::PrefixedValue {&#xD;&#xA;                            value: &amp;self.value,&#xD;&#xA;                            prefix: b&quot;Test::Flipped::value&quot;,&#xD;&#xA;                        },&#xD;&#xA;                    )&#xD;&#xA;                    .finish()&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The first topic is the [`PrefixedValue`][2] of the event itself:&#xD;&#xA;&gt;PrefixedValue { value: b&quot;Test::Created&quot;, prefix: b&quot;&quot; }&#xD;&#xA;&#xD;&#xA;The second topic is the actual `#[ink(topic)]` in the struct:&#xD;&#xA;&gt; PrefixedValue { value: &amp;self.value, prefix: b&quot;Test::Flipped::value&quot; }&#xD;&#xA;&#xD;&#xA;When we add the [`anonymous` attribute][3] we get something like:&#xD;&#xA;```&#xD;&#xA;    const _: () = {&#xD;&#xA;        impl ::ink::env::Topics for Created {&#xD;&#xA;            type RemainingTopics = ::ink::env::topics::state::NoRemainingTopics;&#xD;&#xA;            fn topics&lt;E, B&gt;(&#xD;&#xA;                &amp;self,&#xD;&#xA;                builder: ::ink::env::topics::TopicsBuilder&lt;&#xD;&#xA;                    ::ink::env::topics::state::Uninit,&#xD;&#xA;                    E,&#xD;&#xA;                    B,&#xD;&#xA;                &gt;,&#xD;&#xA;            ) -&gt; &lt;B as ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;&gt;::Output&#xD;&#xA;            where&#xD;&#xA;                E: ::ink::env::Environment,&#xD;&#xA;                B: ::ink::env::topics::TopicsBuilderBackend&lt;E&gt;,&#xD;&#xA;            {&#xD;&#xA;                builder.build::&lt;Self&gt;().finish()&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where you can see that no topics are pushed to `TopicsBuilderBackend`. &#xD;&#xA;&#xD;&#xA;Additional info: [erc20 tests for emitted events][4].&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dtolnay/cargo-expand&#xD;&#xA;  [2]: https://github.com/paritytech/ink/blob/c1f14bcc1011a36ed72e6726dafb1efbde5bae4d/crates/env/src/topics.rs#L208-L223&#xD;&#xA;  [3]: https://use.ink/macros-attributes/anonymous&#xD;&#xA;  [4]: https://github.com/paritytech/ink-examples/blob/9e6c800b498c0da74e9a29fe5470696b63fee49f/erc20/lib.rs#L228-L275" ContentLicense="CC BY-SA 4.0" />
  <row Id="32920" PostHistoryTypeId="5" PostId="4095" RevisionGUID="04c66256-d60b-4cfd-a716-f09135169fde" CreationDate="2023-05-05T13:32:45.803" UserId="2281" Comment="deleted 206 characters in body" Text="As the title says, I have added EVM Compatibility to my NPoS runtime(using [chainsafe/substrate-node-template](https://github.com/ChainSafe/substrate-node-template/tree/dfo/gssmr-test-staking)), and when i run my node with Alice and Bob validators, the StakingElection begins to fail.&#xD;&#xA;&#xD;&#xA;**NOTE** The chainsafe template had an issue where eras didn't change hence no election occured, but I have solved that with [this pr](https://github.com/ChainSafe/substrate-node-template/pull/4), the NPoS election works fine not having added the EVM pallet.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**UPDATE 1** I have added pallet_ethereum, changed SubstrateBlockHashMapping to EthereuBlockhashMapping, still the same issue.&#xD;&#xA;If I remove all EVM related stuff, my NPoS works fine. Solution is submitted, election is finalized and a new authority set is chosen.&#xD;&#xA;&#xD;&#xA;**UPDATE 2**&#xD;&#xA;I forgot to add an image of whaat should normally happen(when pallet_evm is not installed)&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;**UPDATE 3**&#xD;&#xA;Here is the branch and repo in question [here][3]&#xD;&#xA;&#xD;&#xA;**UPDATE 4**&#xD;&#xA;It appears using fp_evm::GenesisAccount to create and endow some test accounts in chain_spec for EVMConfig breaks the NPoS election for both polkadotv0.9.22 and polkadotv0.9.25, without endowed test accounts I cannot test any of the EVM compatibility. &#xD;&#xA;&#xD;&#xA;**UPDATE 5**&#xD;&#xA;I have added 5 accounts in EVMGenesis config, but looks there aren't any&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;**UPDATE 6**&#xD;&#xA;In the block where StakingElection fails, logs show there are 2 consensus engines.&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;**LATEST UPDATE** &#xD;&#xA;Hey guys! I have figured out how to look at node's logs, and here are the results. Can someone please help?&#xD;&#xA;[![terminal logs][6]][6]&#xD;&#xA;&#xD;&#xA;[![explorer logs][7]][7]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2pO2q.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/t6yQZ.png&#xD;&#xA;  [3]: https://github.com/talhadaar/chainsafe-substrate-node-template/tree/question&#xD;&#xA;  [4]: https://i.stack.imgur.com/Pbvrm.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/28FGD.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/jfM0Y.jpg&#xD;&#xA;  [7]: https://i.stack.imgur.com/GdbWw.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="32921" PostHistoryTypeId="5" PostId="2647" RevisionGUID="1ddcab72-cea1-446b-86e3-e6a14c63cc91" CreationDate="2023-05-05T13:35:12.660" UserId="2281" Comment="added 25 characters in body" Text="I am following the tutorial on substrate playground, and when I run the cargo check, I get the following compilation error:&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;     error: failed to select a version for `impl-trait-for-tuples`.&#xD;&#xA;        ... required by package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.20#563f4820)`&#xD;&#xA;        ... which satisfies git dependency `frame-support` of package `pallet-nicks v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.20#563f4820)`&#xD;&#xA;        ... which satisfies git dependency `pallet-nicks` of package `node-template-runtime v4.0.0-dev (/home/playground/workspace/runtime)`&#xD;&#xA;        ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/playground/workspace/node)`&#xD;&#xA;    versions that meet the requirements `^0.2.2` are: 0.2.2&#xD;&#xA;    &#xD;&#xA;    all possible versions conflict with previously selected packages.&#xD;&#xA;    &#xD;&#xA;      previously selected package `impl-trait-for-tuples v0.2.1`&#xD;&#xA;        ... which satisfies dependency `impl-trait-for-tuples = &quot;^0.2.1&quot;` (locked to 0.2.1) of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#e6fbbd5c)`&#xD;&#xA;        ... which satisfies git dependency `frame-support` (locked to 4.0.0-dev) of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#e6fbbd5c)`&#xD;&#xA;        ... which satisfies git dependency `frame-benchmarking` (locked to 4.0.0-dev) of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?tag=devhub/latest#e6fbbd5c)`&#xD;&#xA;        ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/playground/workspace/node)`&#xD;&#xA;    &#xD;&#xA;    failed to select a version for `impl-trait-for-tuples` which could resolve this conflict how to solve this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32922" PostHistoryTypeId="2" PostId="8381" RevisionGUID="ee1520e5-96fd-43c3-aa97-5f77f5ba9455" CreationDate="2023-05-05T13:44:19.610" UserId="29" Text="I just ran the [substrate playground](https://playground.substrate.dev/) and the version that is in the Cargo.lock file is:&#xD;&#xA;```&#xD;&#xA;[[package]]&#xD;&#xA;name = &quot;impl-trait-for-tuples&quot;&#xD;&#xA;version = &quot;0.2.2&quot;&#xD;&#xA;source = &quot;registry+https://github.com/rust-lang/crates.io-index&quot;&#xD;&#xA;checksum = &quot;11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb&quot;&#xD;&#xA;dependencies = [&#xD;&#xA; &quot;proc-macro2&quot;,&#xD;&#xA; &quot;quote&quot;,&#xD;&#xA; &quot;syn&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you're still running into this issue, delete your Cargo.lock file and re-run cargo build." ContentLicense="CC BY-SA 4.0" />
  <row Id="32924" PostHistoryTypeId="4" PostId="2647" RevisionGUID="1bb8b937-be82-4bd9-9394-3b90696089f8" CreationDate="2023-05-05T13:44:32.820" UserId="29" Comment="edited title" Text="How to resolve the conflict in impl-trait-for-tuple version | nicks pallet tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="32925" PostHistoryTypeId="4" PostId="8374" RevisionGUID="69836fcb-6e90-435c-9fe1-203d51831f51" CreationDate="2023-05-05T13:45:58.740" UserId="4081" Comment="Fix tittle description" Text="Problems adding trusted Nodes on different machines on Windows 11(WSL)" ContentLicense="CC BY-SA 4.0" />
  <row Id="32926" PostHistoryTypeId="24" PostId="8374" RevisionGUID="69836fcb-6e90-435c-9fe1-203d51831f51" CreationDate="2023-05-05T13:45:58.740" Comment="Proposed by 4081 approved by 4067 edit id of 415" ContentLicense="CC BY-SA 4.0" />
  <row Id="32927" PostHistoryTypeId="2" PostId="8382" RevisionGUID="2ddf6ce8-6c38-48c1-a805-693a3c5a97bb" CreationDate="2023-05-05T14:45:04.453" UserId="2988" Text="so I am migrating my contract from version 3 to 4 &#xD;&#xA;my goal is to use the open brush as well but we can not use the open brush in ink version 4 because it still needs the nightly features and Ink v4 runs on stable. &#xD;&#xA;&#xD;&#xA;this is my current manifest file&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;now this works fine as long as I am building on nightly &#xD;&#xA;`cargo +nightly contract build --release`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but I have a function that needs to convert a FixesI128&lt;U4&gt; [from `fixed` crate]  to string which is where the issue is &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;everything is fine in this function except the highlighted line &#xD;&#xA;so with this line, if I build a contract [on nightly] I get this error &#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but if I remove this line this compiles down successfully &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;also, one more thing I am using String from Openbrush and to string from ink prelude as you can see in the picture &#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/V9XVx.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/FlBn9.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/iOL7T.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/H18hi.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;please let me know if there is any solution &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32929" PostHistoryTypeId="1" PostId="8382" RevisionGUID="2ddf6ce8-6c38-48c1-a805-693a3c5a97bb" CreationDate="2023-05-05T14:45:04.453" UserId="2988" Text="using String in ink version 4" ContentLicense="CC BY-SA 4.0" />
  <row Id="32930" PostHistoryTypeId="3" PostId="8382" RevisionGUID="2ddf6ce8-6c38-48c1-a805-693a3c5a97bb" CreationDate="2023-05-05T14:45:04.453" UserId="2988" Text="|ink|migration|cargo-contract|string|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32931" PostHistoryTypeId="2" PostId="8383" RevisionGUID="9482c78c-a440-4350-9d43-fed1ddca8f8b" CreationDate="2023-05-05T15:52:33.920" UserId="3252" Text="The link: https://github.com/paritytech/polkadot/releases&#xD;&#xA;&#xD;&#xA;The message: `Please note the upcoming deprecation of the balances.transfer call.`&#xD;&#xA;&#xD;&#xA;What is the `Balances::transfer becomes Balances::transfer_allow_death `meaning?&#xD;&#xA;&#xD;&#xA;Should I use it like this?&#xD;&#xA;```&#xD;&#xA;const { tx } = expandMetadata(this.api.registry, this.api.runtimeMetadata);&#xD;&#xA;const methodFunction2 = tx['balances']['transfer_allow_death'];&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32933" PostHistoryTypeId="1" PostId="8383" RevisionGUID="9482c78c-a440-4350-9d43-fed1ddca8f8b" CreationDate="2023-05-05T15:52:33.920" UserId="3252" Text="what is the `deprecation of the balances.transfer` meaning at Polkadot v0.9.42?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32934" PostHistoryTypeId="3" PostId="8383" RevisionGUID="9482c78c-a440-4350-9d43-fed1ddca8f8b" CreationDate="2023-05-05T15:52:33.920" UserId="3252" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32935" PostHistoryTypeId="2" PostId="8384" RevisionGUID="b97a2843-f57a-4000-998a-6920dfb38b20" CreationDate="2023-05-05T15:56:20.827" UserId="29" Text="That is correct.&#xD;&#xA;&#xD;&#xA;&gt; Some renaming:&#xD;&#xA;&gt; &#xD;&#xA;&gt; - Balances::set_balance becomes Balances::force_set_balance&#xD;&#xA;&gt; - Balances::transfer becomes Balances::transfer_allow_death&#xD;&#xA;&gt; &#xD;&#xA;&gt; In the latter case, since ecosystem tooling largely depends on using&#xD;&#xA;&gt; transfer, a compatibility stub for transfer remains, however this&#xD;&#xA;&gt; naming is DEPRECATED and ecosystem tools should move over to using&#xD;&#xA;&gt; transfer_allow_death within 3 months at which point the transfer alias&#xD;&#xA;&gt; will be removed.&#xD;&#xA;&#xD;&#xA;Taken from the PR description:&#xD;&#xA;- https://github.com/paritytech/substrate/pull/12951&#xD;&#xA;&#xD;&#xA;Please read the PR as there is a wealth of information." ContentLicense="CC BY-SA 4.0" />
  <row Id="32937" PostHistoryTypeId="50" PostId="3974" RevisionGUID="14f509e1-d2c4-40f5-8ee8-189b432a1c66" CreationDate="2023-05-05T16:01:20.230" UserId="-1" />
  <row Id="32938" PostHistoryTypeId="2" PostId="8385" RevisionGUID="62c12b27-e439-4e63-b59f-fada1c9558a5" CreationDate="2023-05-05T17:20:00.180" UserId="3960" Text="My use case is this:&#xD;&#xA;an Offchain Worker sends Http requests to certain endpoints.&#xD;&#xA;&#xD;&#xA;These endpoints are hardcoded on chain under current implementation.&#xD;&#xA;&#xD;&#xA;I would like to be able to configure those endpoints and some other parameters locally once the Node is up, so the configuration is local-specific.&#xD;&#xA;&#xD;&#xA;So I wonder if there is a way to access the Local Storage from the Outer Node ?&#xD;&#xA;&#xD;&#xA;I can compile ```StorageValueRef::persistent``` on the Outer Node after the essential tasks are spawned, however it panics because of calling out of Externalities context." ContentLicense="CC BY-SA 4.0" />
  <row Id="32940" PostHistoryTypeId="1" PostId="8385" RevisionGUID="62c12b27-e439-4e63-b59f-fada1c9558a5" CreationDate="2023-05-05T17:20:00.180" UserId="3960" Text="Is it possible to write-access Local Storage from the Node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32941" PostHistoryTypeId="3" PostId="8385" RevisionGUID="62c12b27-e439-4e63-b59f-fada1c9558a5" CreationDate="2023-05-05T17:20:00.180" UserId="3960" Text="|offchain-worker|offchain-storage|configuration|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32942" PostHistoryTypeId="2" PostId="8386" RevisionGUID="199b30b3-73ea-4b4e-82c9-cb97809f7a35" CreationDate="2023-05-05T20:46:41.087" UserId="599" Text="1. In your example - not. Each field has a unique auto-storage key based on the field's name.&#xD;&#xA;&#xD;&#xA;   In more complex cases like the one below, the `ManualKey` of the `Parent` may affect the storage keys of the `Child` type:&#xD;&#xA;&#xD;&#xA;	```rust&#xD;&#xA;	#[ink::storage_item]&#xD;&#xA;	pub Parent {&#xD;&#xA;		child_1: Child,&#xD;&#xA;		child_2: Child&lt;ManualKey&lt;123&gt;&gt;,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[ink::storage_item]&#xD;&#xA;	pub struct Child&lt;ParentKey: StorageKey = AutoKey&gt; {&#xD;&#xA;	    A: AccountId,&#xD;&#xA;	    B: Mapping&lt;AccountId, Balance, ManualKey&lt;100, ParentKey&gt;&gt;,&#xD;&#xA;	    C: String, &#xD;&#xA;	    D: Lazy&lt;Vec&lt;AccountId&gt;, ManualKey&lt;101, ParentKey&gt;&gt;,&#xD;&#xA;	}&#xD;&#xA;	```&#xD;&#xA;2. No. The field ordering works regardless of `AutoKey` or `ManualKey`. Because the auto storage key is generated based on the field's name, not on the position like in Solidity, so you can treat `ManualKey` in the same way as `AutoKey`, but instead of the name, you use a pre-defined number.&#xD;&#xA;&#xD;&#xA;	The ordering matters for the layout of your structure. You can change the order of layoutless fields without any problem. You can put them in any order or place, shuffle as you wish. You can't change the order of layoutful fields or remove them.&#xD;&#xA;&#xD;&#xA;	The field is layoutless if its type is `Lazy`, `Mapping`, or layoutless type. The type is layoutless if all its fields are layoutless.&#xD;&#xA;	The field is layoutful if it is not layoutless=) &#xD;&#xA;&#xD;&#xA;	Consequently, all [packed](https://use.ink/datastructures/storage-layout/#packed-vs-non-packed-layout) are layoutful by default, but not each non-packed type is layoutless.&#xD;&#xA;&#xD;&#xA;3. You can use `ManualKey` if you plan to change the field's name in the future, or if you are afraid that ink! will change the storage key calculation strategy; otherwise, `AutoKey` should be enough for you.&#xD;&#xA;&#xD;&#xA;	Regarding upgradability: It depends on your use case. Making each field layoutless allows you to add/remove/shuffle them as you wish. It decreases the chance of corrupting the storage layout. However, doing that for every storage field may not always be necessary or efficient.&#xD;&#xA;&#xD;&#xA;	a. Yes, it adds more overhead, but also may be useful in case of heavy fields that you don't use too much(so it's okay to load them lazily not too often). More about that you can read [here](https://use.ink/datastructures/storage-layout/#eager-loading-vs-lazy-loading).&#xD;&#xA;&#xD;&#xA;4. In your example  - no, if each key is unique within one struct. In the complex example from my answer to question `1`: the usage of the `ManualKey` when you want to use the same type several times causes problems if you don't specify `&lt;ParentKey: StorageKey = AutoKey&gt;` during the declaration of the `Child` type and don't pass the `ParentKey` into `ManualKey&lt;101, ParentKey&gt;`.&#xD;&#xA;&#xD;&#xA;5. I will put notes regarding upgradable contracts overall:&#xD;&#xA;&#xD;&#xA;	1. The Usage of the `ManualKey` or `AutoKey` for packed types is useless.&#xD;&#xA;	2. Use `ManualKey` if you plan to change the name of the field or are afraid that ink! can change the algorithm of the storage key calculation. Otherwise, `AutoKey` should be enough.&#xD;&#xA;	3. Each non-packed type should specify `&lt;ParentKey: StorageKey&gt;` generic during declaration to avoid a potential collision with other types. It guarantees that if types have the same field's names the auto storage key will be unique.&#xD;&#xA;	4. If you want to use `ManualKey` for your fields, then you need to propagate the parent storage key to each of your no-packed fields with `ManualKey` like `ManualKey&lt;123, ParentKey&gt;`.&#xD;&#xA;	5. The fields that can be updated in the future should be layoutless. The fields that will remain during the full lifecycle of the contract or can be dropped/ignored later can be layoutful.&#xD;&#xA;	5a. To be able to drop the field, you can put it into `Option`. And if you don't need the field anymore, you can always set it to `None`.&#xD;&#xA;&#xD;&#xA;	You can read the suggestions from the [OpenBrush](https://learn.brushfam.io/docs/OpenBrush/smart-contracts/upgradeable) on how to write upgradable contracts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Answers on  the follow-up question: &#xD;&#xA;&#xD;&#xA;&gt; If the ManualKey assigned to each field is unique, Can they still overlap with each other?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Storage keys can overlap in the complex struct case if you didn't propagate the parent storage key.&#xD;&#xA;&#xD;&#xA;&gt; Is it possible that a given field (maybe some complex struct?) occupies more than one storage key? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Technically the field occupies either zero or one storage slot. But the type itself may have many fields that occupy many storage slots. For example, the `Mapping` itself doesn't occupy any storage slot, but each element occupies its own single storage.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32944" PostHistoryTypeId="2" PostId="8387" RevisionGUID="bb79838f-ee7d-480a-8124-6e2b04bb55be" CreationDate="2023-05-05T20:54:54.483" UserId="251" Text="Yet, there is an RPC method.&#xD;&#xA;&#xD;&#xA;`offchain_localStorageSet`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;1. you need to enable `--offchian-indexing` for your node&#xD;&#xA;2. you need to enable `--rpc-methods unsafe` for your node&#xD;&#xA;3. you'd better don't expose your RPC endpoint, just use private network, because anyone can call this to set the storage&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/b0A7E.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32946" PostHistoryTypeId="5" PostId="8373" RevisionGUID="ab7833f1-38a0-4dcc-b9a7-29b7730cc1dc" CreationDate="2023-05-05T21:54:45.053" UserId="1942" Comment="added 21 characters in body" Text="https://github.com/AstarNetwork/frontier.git&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cargo run -- --dev -d ./data -l info&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frontier use HashedAddressMapping in evm pallet&#xD;&#xA;&#xD;&#xA;alice public key is d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;&#xD;&#xA;H160 is 0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b = BlakeTwo256( b&quot;evm:&quot;[0..4] + 15fdd31c61141abd04a99fd6822c8558854ccde3 )&#xD;&#xA;&#xD;&#xA;evm miner address is 5CMh6W6x5ZJaj2QGndYHa4Pc4ppvSFc9J66mBrxwteUkRe8p = ss58(0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct FindAuthorTruncated&lt;F&gt;(PhantomData&lt;F&gt;);&#xD;&#xA;impl&lt;F: FindAuthor&lt;u32&gt;&gt; FindAuthor&lt;H160&gt; for FindAuthorTruncated&lt;F&gt; {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;H160&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		if let Some(author_index) = F::find_author(digests) {&#xD;&#xA;			let authority_id = Aura::authorities()[author_index as usize].clone();&#xD;&#xA;			return Some(H160::from_slice(&amp;authority_id.to_raw_vec()[4..24]));&#xD;&#xA;		}&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;H: Hasher&lt;Out = H256&gt;&gt; AddressMapping&lt;AccountId32&gt; for HashedAddressMapping&lt;H&gt; {&#xD;&#xA;	fn into_account_id(address: H160) -&gt; AccountId32 {&#xD;&#xA;		let mut data = [0u8; 24];&#xD;&#xA;		data[0..4].copy_from_slice(b&quot;evm:&quot;);&#xD;&#xA;		data[4..24].copy_from_slice(&amp;address[..]);&#xD;&#xA;		let hash = H::hash(&amp;data);&#xD;&#xA;&#xD;&#xA;		AccountId32::from(Into::&lt;[u8; 32]&gt;::into(hash))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn pay_priority_fee(tip: Self::LiquidityInfo) {&#xD;&#xA;		// Default Ethereum behaviour: issue the tip to the block author.&#xD;&#xA;		if let Some(tip) = tip {&#xD;&#xA;			let account_id = T::AddressMapping::into_account_id(&lt;Pallet&lt;T&gt;&gt;::find_author());&#xD;&#xA;			let _ = C::deposit_into_existing(&amp;account_id, tip_after_commission.peek());&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32947" PostHistoryTypeId="6" PostId="8373" RevisionGUID="82646255-bb4c-45ca-9963-8762e24cf68f" CreationDate="2023-05-05T21:58:38.050" UserId="29" Comment="edited tags" Text="|frontier|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32948" PostHistoryTypeId="5" PostId="8387" RevisionGUID="56302f0b-67d5-4864-8b72-a0ceafc4b21e" CreationDate="2023-05-06T02:41:30.817" UserId="251" Comment="edited body" Text="Yes, there is an RPC method.&#xD;&#xA;&#xD;&#xA;`offchain_localStorageSet`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;1. you need to enable `--offchian-indexing` for your node&#xD;&#xA;2. you need to enable `--rpc-methods unsafe` for your node&#xD;&#xA;3. you'd better don't expose your RPC endpoint, just use private network, because anyone can call this to set the storage&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/b0A7E.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32949" PostHistoryTypeId="2" PostId="8388" RevisionGUID="56fb0f81-d22d-434b-83d3-d9923787b3fb" CreationDate="2023-05-06T15:01:21.753" UserId="3327" Text="In my parachain that I forked from substrate-node-template, github dependabot give me following security alert:&#xD;&#xA;&#xD;&#xA;&quot;rocksdb vulnerable to out-of-bounds read&quot;&#xD;&#xA;&#xD;&#xA;and the suggested solution is to upgrate rocksdb to 0.19.0. So how can I upgrade rocksdb to 0.19.0 t to fix this security alert?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32951" PostHistoryTypeId="1" PostId="8388" RevisionGUID="56fb0f81-d22d-434b-83d3-d9923787b3fb" CreationDate="2023-05-06T15:01:21.753" UserId="3327" Text="How to upgrade rocksdb used by substrate node template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32952" PostHistoryTypeId="3" PostId="8388" RevisionGUID="56fb0f81-d22d-434b-83d3-d9923787b3fb" CreationDate="2023-05-06T15:01:21.753" UserId="3327" Text="|rocks-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32953" PostHistoryTypeId="2" PostId="8389" RevisionGUID="1735a317-dbd5-49f8-ba9a-6122f04a5472" CreationDate="2023-05-06T15:26:15.767" UserId="251" Text="1. `rocksdb` is required by `kv-rocksdb`&#xD;&#xA;2. `kv-rocksdb` is required by `sc-client-db`&#xD;&#xA;3. `sc-client-db` is a Substrate workspace member/crate&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;To fix this:&#xD;&#xA;&#xD;&#xA;- update your Substrate version&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;- fork Substrate version that you are using now, and modify the `sc-client-db` yourself&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;You can try `cargo update`, but I think that won't help too much. Most of the time, Substrate sticks/locks on the specific rocksdb version." ContentLicense="CC BY-SA 4.0" />
  <row Id="32955" PostHistoryTypeId="52" PostId="8388" RevisionGUID="5445cfbe-873f-4927-b6be-6cc134cf5906" CreationDate="2023-05-07T01:14:10.720" />
  <row Id="32956" PostHistoryTypeId="2" PostId="8390" RevisionGUID="1ba39410-bc44-4a39-ada5-be9e544cc683" CreationDate="2023-05-07T02:45:59.860" UserId="4179" Text="I don't have a seed phrase.&#xD;&#xA;I have private key, ss58, public key, accountID key.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Need a seed phrase to access polkadot.js wallet. &#xD;&#xA;&#xD;&#xA;When I put the private key in the seed key input box, the ss58 address is different.&#xD;&#xA;&#xD;&#xA;I think&#xD;&#xA;1) Is there a way to access wallet with a private key?&#xD;&#xA;2) Is there a way to get a seed key with a private key?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32958" PostHistoryTypeId="1" PostId="8390" RevisionGUID="1ba39410-bc44-4a39-ada5-be9e544cc683" CreationDate="2023-05-07T02:45:59.860" UserId="4179" Text="polkadot_js How to access wallet only with a private key" ContentLicense="CC BY-SA 4.0" />
  <row Id="32959" PostHistoryTypeId="3" PostId="8390" RevisionGUID="1ba39410-bc44-4a39-ada5-be9e544cc683" CreationDate="2023-05-07T02:45:59.860" UserId="4179" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32960" PostHistoryTypeId="4" PostId="8390" RevisionGUID="e7e7205e-cd4d-4273-ac08-40d3d57c6d28" CreationDate="2023-05-07T02:57:09.133" UserId="4179" Comment="edited title" Text="How to access wallet only with a private key" ContentLicense="CC BY-SA 4.0" />
  <row Id="32963" PostHistoryTypeId="2" PostId="8391" RevisionGUID="1d68ca83-6557-4eea-934a-55fc71a6a710" CreationDate="2023-05-07T05:03:12.520" UserId="83" Text="To access the wallet with a private key (secret seed) and get its secret seed phrase (that you referred to as the seed key, but is also known as the mnemonic):&#xD;&#xA;* Install `subkey` by following the steps in the [Installation section here][1].&#xD;&#xA;* Run the `subkey inspect` command as shown in the example in the [Subkey Inspect section here][1], and provide the private key (secret seed) for the `uri` argument to display the associated secret phrase and public key (ss58).&#xD;&#xA;&#xD;&#xA;* Important notes:&#xD;&#xA;  * It may be safest to run the above commands on an air-gapped local machine with a fresh installation of an operating system that isn't infected.&#xD;&#xA;  * Follow security best practices such as verifying the checksum or GPG keys of any files that you download from the internet if available to check they were not intercepted and infected.&#xD;&#xA;  * It may be faster to install `subkey` from inside a Docker container by following [these steps][2]&#xD;&#xA;  * If you want to avoid entering your private key or secret phrase in the command line where it may be stored in history or tracked by key loggers, you may wish to write a script like [this][3] so you can enter the private key in a text file secret_input.txt, and then run `cat secret_input.txt | xargs subkey inspect $1 &gt; secret_input.txt` to output the secret phrase in another file called secret_input.txt&#xD;&#xA;  * It may be worthwhile importing the secret phrase into [Polkadot Vault (Parity Signer)][4] by following their instructions on and air-gapped device and using that to interact with Polkadot.js via scanning QR codes.&#xD;&#xA;  * If you are using a desktop machine and you're interacting with the [Polkadot.js Extension][5], and you're not using Polkadot Vault or a hardware wallet then you may wish to export your keys in bulk as a backup to a password encrypted JSON file, so you may conveniently re-import them all to that same machine or other machines. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/command-line-tools/subkey/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/docker&#xD;&#xA;  [3]: https://github.com/ltfschoen/Edgeware-seed-generating-script-SSSS&#xD;&#xA;  [4]: https://signer.parity.io/&#xD;&#xA;  [5]: https://github.com/polkadot-js/extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="32965" PostHistoryTypeId="52" PostId="8390" RevisionGUID="314e1f15-0b03-4953-ac4e-2c11353334a4" CreationDate="2023-05-07T10:52:01.807" />
  <row Id="32966" PostHistoryTypeId="2" PostId="8392" RevisionGUID="3a7965a2-796e-46b0-80f6-160aef8aa59b" CreationDate="2023-05-07T12:40:07.010" UserId="3327" Text="I forked my parachain from substrate-node-template (polkadot-v0.9.29). &#xD;&#xA;&#xD;&#xA;There are several security alerts generated by github dependabot, I am sharing just one here for an example:&#xD;&#xA;&#xD;&#xA;Security Alert (As generated by dependabot) : &#xD;&#xA;&#xD;&#xA;**h2 vulnerable to denial of service**&#xD;&#xA;&#xD;&#xA;Hyper is an HTTP library for Rust and h2 is an HTTP 2.0 client &amp; server implementation for Rust. An issue was discovered in h2 v0.2.4 when processing header frames. It incorrectly processes the HTTP2 RST_STREAM frames by not always releasing the memory immediately upon receiving the reset frame, leading to stream stacking. As a result, the memory and CPU usage are high which can lead to a Denial of Service (DoS).&#xD;&#xA;&#xD;&#xA;This issue affects users only when dealing with http2 connections.&#xD;&#xA;&#xD;&#xA;**Solutions (As advised by dependabot):** &#xD;&#xA;&#xD;&#xA;To updated dependend package &quot;h2&quot; to a version greater than or equal to: 0.3.17. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is just one example, in most of the cases, it is advised to update the dependent package to some &quot;patched&quot; version. For this we need to change our cargo.lock. Now I have two questions here:&#xD;&#xA;&#xD;&#xA;1. Is it a good practice to make changes manually to cargo.lock, since it is always advised not to change cargo.lock manually?&#xD;&#xA;&#xD;&#xA;2. What is the best way to update these dependent packages without updating to a new version of polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32968" PostHistoryTypeId="1" PostId="8392" RevisionGUID="3a7965a2-796e-46b0-80f6-160aef8aa59b" CreationDate="2023-05-07T12:40:07.010" UserId="3327" Text="How to update dependent packages to resolve dependabot security allert" ContentLicense="CC BY-SA 4.0" />
  <row Id="32969" PostHistoryTypeId="3" PostId="8392" RevisionGUID="3a7965a2-796e-46b0-80f6-160aef8aa59b" CreationDate="2023-05-07T12:40:07.010" UserId="3327" Text="|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32970" PostHistoryTypeId="5" PostId="8389" RevisionGUID="df838f19-e7a5-457f-8a54-9a4083e2d0e3" CreationDate="2023-05-07T17:28:48.890" UserId="251" Comment="deleted 2 characters in body" Text="1. `rocksdb` is required by `kv-rocksdb`&#xD;&#xA;2. `kv-rocksdb` is required by `sc-client-db`&#xD;&#xA;3. `sc-client-db` is a Substrate workspace member/crate&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;To fix this:&#xD;&#xA;&#xD;&#xA;- update your Substrate version&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;- fork Substrate version that you are using now, and modify the `sc-client-db` yourself&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;You can try `cargo update`, but I think that won't help too much. Most of the time, Substrate sticks/locks on a specific rocksdb version." ContentLicense="CC BY-SA 4.0" />
  <row Id="32972" PostHistoryTypeId="50" PostId="4706" RevisionGUID="063803e6-387a-4cc9-b8ab-110c0d6981b5" CreationDate="2023-05-07T22:07:30.907" UserId="-1" />
  <row Id="32973" PostHistoryTypeId="2" PostId="8393" RevisionGUID="076ae6c4-0aeb-4b87-8524-c23f16946ada" CreationDate="2023-05-07T22:25:09.473" UserId="3114" Text="- I accessed the URL below.&#xD;&#xA;- https://ink-playground.substrate.io/&#xD;&#xA;- However, HTTP Status Code 404 is returned and this site cannot be used.&#xD;&#xA;- Has this site been closed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32975" PostHistoryTypeId="1" PostId="8393" RevisionGUID="076ae6c4-0aeb-4b87-8524-c23f16946ada" CreationDate="2023-05-07T22:25:09.473" UserId="3114" Text="Is ink! playground closed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="32976" PostHistoryTypeId="3" PostId="8393" RevisionGUID="076ae6c4-0aeb-4b87-8524-c23f16946ada" CreationDate="2023-05-07T22:25:09.473" UserId="3114" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32977" PostHistoryTypeId="5" PostId="8387" RevisionGUID="04bfd4f4-d3f5-4af1-96a3-482f7229f5c8" CreationDate="2023-05-08T02:29:16.530" UserId="251" Comment="added 8 characters in body" Text="Yes, there is an RPC method.&#xD;&#xA;&#xD;&#xA;`offchain_localStorageSet`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;1. you need to enable `--offchian-indexing` for your node&#xD;&#xA;2. you need to enable `--rpc-methods unsafe` for your node&#xD;&#xA;3. you'd better don't expose your RPC endpoint, just use this in private network, because anyone can call this to set the storage&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/b0A7E.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="32978" PostHistoryTypeId="2" PostId="8394" RevisionGUID="61b50b69-b098-4d53-94fa-adcaecb7b673" CreationDate="2023-05-08T03:59:02.127" UserId="1950" Text="It appears to me that the output from rotatekeys shouldsplit in to half&#xD;&#xA;&#xD;&#xA;The first 64bits are the correct key " ContentLicense="CC BY-SA 4.0" />
  <row Id="32980" PostHistoryTypeId="2" PostId="8395" RevisionGUID="f17f9cbb-e27c-4c21-bd96-7ba5b9b6e09c" CreationDate="2023-05-08T05:22:38.023" UserId="3175" Text="We are working with ChainIDE to get an ink! IDE working. You can already test it out here: https://develop-2egludalf0.chainide.com/s/dashboard/projects" ContentLicense="CC BY-SA 4.0" />
  <row Id="32982" PostHistoryTypeId="5" PostId="8363" RevisionGUID="aa5d5a2a-17ba-4e6f-ae7f-0628b4e36615" CreationDate="2023-05-08T05:48:23.777" UserId="523" Comment="added 17 characters in body" Text="Upgrade toolchain to `nightly-2023-04-22`. &#xD;&#xA;&#xD;&#xA;also addressed by https://github.com/paritytech/parity-scale-codec/pull/426" ContentLicense="CC BY-SA 4.0" />
  <row Id="32983" PostHistoryTypeId="5" PostId="1798" RevisionGUID="98f5971a-cf3e-4aab-bebe-ecabb9d75e6f" CreationDate="2023-05-08T06:02:33.097" UserId="265" Comment="nginx configurations" Text="you *can* host it with a cloud provider **but** you certainly don't have to.&#xD;&#xA;making a node public is partly about making it reachable over the internet. this is a big subject because there's a lot to think about in terms of availability (is your node reachable behind your routers, switches and firewalls), security (is the access limited to things you are comfortable with and prepared for) and authenticity (can your node be impersonated by an imposter or mitm).&#xD;&#xA;&#xD;&#xA;substrate nodes expose a number of services over tcp. you can make none, some or all of these ports visible to the world:&#xD;&#xA;&#xD;&#xA;- **p2p**: usually on port `30333`. otherwise customised with cli arg: `--port 30333`. this port is used by the network to create consensus and share blockchain state. if you want other nodes to be able to learn about your node's blockchain state (a good thing), open this port first.&#xD;&#xA;- **ws**: usually on port `9944`. otherwise customised with cli arg: `--ws-port 9944`. listen on the public socket with `--ws-external`. this port responds to websocket queries that keep subscribers informed of the changing state of your node's ledger over time. it can also be used by polkadot.js to provide rich interactions with your node&#xD;&#xA;- **rpc**: usually on port `9933`. otherwise customised with cli arg: `--rpc-port 9933`. listen on the public socket with `--rpc-external`. this port responds to rpc queries enabling a limited set of interactions with your node. some rpc calls are not safe to expose to the world and substrate has some cli flags (like `--rpc-methods safe`) that help you to prevent exposure of unsafe rpc calls (like `author_insertKey`, amongst others)&#xD;&#xA;- **metrics**: usually on port `9615`. otherwise customised with cli arg: `--prometheus-port 9615`. listen on the public socket with `--prometheus-external`. this port exposes metrics that help you to monitor the health of your node. it can give you information about things like slow or stopped block production and is usually monitored by a metrics monitoring suite like prometheus, alertmanager and grafana.&#xD;&#xA;&#xD;&#xA;if you're running a parachain node, all of the above ports are duplicated (with default port numbers incremented by 1) because parachain binaries run both an embedded relay chain node and their own parachain node.&#xD;&#xA;&#xD;&#xA;the references to cli args for listening on public sockets above, modifies the node to listen on all interfaces (eg: `0.0.0.0:9944`) rather than just the loopback interface (eg: `127.0.0.1:9944`).&#xD;&#xA;&#xD;&#xA;to expose these ports to the world, you need to have:&#xD;&#xA;- an isp that does not block the port numbers you use and allows multiple, simultaneous inbound tcp connections (some german isps are known to throttle down when a substrate node instigates or receives more than a threshold number of connections)&#xD;&#xA;- a router capable of forwarding requests to those port numbers from the router that receives the request to the node system running your node&#xD;&#xA;- either a fixed ip address or dynamic dns that is synchronised to your dynamic ip address&#xD;&#xA;&#xD;&#xA;it is good practice to put any service you expose to the world behind ssl. a simple way to do this is to:&#xD;&#xA;- register a domain name (or use one provided by your dyn dns provider)&#xD;&#xA;- use let's encrypt's certbot to request an ssl certificate for yourdomain, to request a certificate,&#xD;&#xA;    - edit (or create) a default nginx configuration that listens on port 80 for letsencrypt challenges only and redirects all other requests to port 443 (the location for this file is conventionally `/etc/nginx/sites-available/default`). replace `mynode.example.com` with your node's full qualified domain name (fqdn):&#xD;&#xA;      ```nginx&#xD;&#xA;      server {&#xD;&#xA;        server_name mynode.example.com;&#xD;&#xA;        listen 80;&#xD;&#xA;        listen [::]:80;&#xD;&#xA;  &#xD;&#xA;        # certbot challenges&#xD;&#xA;        location ^~ /.well-known/acme-challenge/ {&#xD;&#xA;          default_type &quot;text/plain&quot;;&#xD;&#xA;          root /var/www/html;&#xD;&#xA;        }&#xD;&#xA;  &#xD;&#xA;        # tls redirect&#xD;&#xA;        if ($host = mynode.example.com) {&#xD;&#xA;          return 301 https://$host$request_uri;&#xD;&#xA;        }&#xD;&#xA;        return 404;&#xD;&#xA;      }&#xD;&#xA;      ```&#xD;&#xA;    - use certbot to request a cert. replace `mynode.example.com` with your node's fqdn and `ops@example.com` with your email address:&#xD;&#xA;      ```bash&#xD;&#xA;      sudo certbot certonly \&#xD;&#xA;        --noninteractive \&#xD;&#xA;        --cert-name mynode.example.com \&#xD;&#xA;        --key-type ecdsa \&#xD;&#xA;        -m ops@example.com \&#xD;&#xA;        --agree-tos \&#xD;&#xA;        --no-eff-email \&#xD;&#xA;        --preferred-challenges http \&#xD;&#xA;        --webroot \&#xD;&#xA;        --webroot-path /var/www/html \&#xD;&#xA;        -d mynode.example.com&#xD;&#xA;      ```&#xD;&#xA;- run an nginx reverse proxy listening on port 443 (ssl/tls) and forwarding requests to your node ports. here's an example nginx configuration that does this. you might place this file at `/etc/nginx/sites-available/mynode.example.com.conf`, then create a symlink at `/etc/nginx/sites-enabled/mynode.example.com.conf` which points to it. replace `mynode.example.com` with your node's fqdn:&#xD;&#xA;  ```nginx&#xD;&#xA;  server {&#xD;&#xA;    server_name mynode.example.com;&#xD;&#xA;    listen 443 ssl;&#xD;&#xA;&#xD;&#xA;    # websocket&#xD;&#xA;    location / {&#xD;&#xA;      proxy_pass http://127.0.0.1:9944;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # json rpc&#xD;&#xA;    location /rpc {&#xD;&#xA;      proxy_pass http://127.0.0.1:9933;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # health&#xD;&#xA;    location /health {&#xD;&#xA;      proxy_pass http://127.0.0.1:9933/health;&#xD;&#xA;      access_log off;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;      if ($request_method = 'GET') {&#xD;&#xA;        add_header 'Access-Control-Allow-Origin' '*' always;&#xD;&#xA;        add_header 'Access-Control-Allow-Methods' 'GET' always;&#xD;&#xA;        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;&#xD;&#xA;        add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # metrics&#xD;&#xA;    location /metrics {&#xD;&#xA;      proxy_pass http://127.0.0.1:9615/metrics;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ssl_certificate /etc/letsencrypt/live/mynode.example.com/fullchain.pem;&#xD;&#xA;    ssl_certificate_key /etc/letsencrypt/live/mynode.example.com/privkey.pem;&#xD;&#xA;  }&#xD;&#xA;  ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32984" PostHistoryTypeId="5" PostId="1798" RevisionGUID="357c92bc-19dc-43bc-a446-b3630ee4816f" CreationDate="2023-05-08T06:09:20.850" UserId="265" Comment="typo corrections" Text="you *can* host it with a cloud provider **but** you certainly don't have to.&#xD;&#xA;making a node public is partly about making it reachable over the internet. this is a big subject because there's a lot to think about in terms of availability (is your node reachable behind your routers, switches and firewalls), security (is the access limited to things you are comfortable with and prepared for) and authenticity (can your node be impersonated by an imposter or mitm).&#xD;&#xA;&#xD;&#xA;substrate nodes expose a number of services over tcp. you can make none, some or all of these ports visible to the world:&#xD;&#xA;&#xD;&#xA;- **p2p**: usually on port `30333`. otherwise customised with cli arg: `--port 30333`. this port is used by the network to create consensus and share blockchain state. if you want other nodes to be able to learn about your node's blockchain state (a good thing), open this port first.&#xD;&#xA;- **ws**: usually on port `9944`. otherwise customised with cli arg: `--ws-port 9944`. listen on the public socket with `--ws-external`. this port responds to websocket queries that keep subscribers informed of the changing state of your node's ledger over time. it can also be used by polkadot.js to provide rich interactions with your node&#xD;&#xA;- **rpc**: usually on port `9933`. otherwise customised with cli arg: `--rpc-port 9933`. listen on the public socket with `--rpc-external`. this port responds to rpc queries enabling a limited set of interactions with your node. some rpc calls are not safe to expose to the world and substrate has some cli flags (like `--rpc-methods safe`) that help you to prevent exposure of unsafe rpc calls (like `author_insertKey`, amongst others)&#xD;&#xA;- **metrics**: usually on port `9615`. otherwise customised with cli arg: `--prometheus-port 9615`. listen on the public socket with `--prometheus-external`. this port exposes metrics that help you to monitor the health of your node. it can give you information about things like slow or stopped block production and is usually monitored by a metrics monitoring suite like prometheus, alertmanager and grafana.&#xD;&#xA;&#xD;&#xA;if you're running a parachain node, all of the above ports are duplicated (with default port numbers incremented by 1) because parachain binaries run both an embedded relay chain node and their own parachain node.&#xD;&#xA;&#xD;&#xA;the references to cli args for listening on public sockets above, modifies the node to listen on all interfaces (eg: `0.0.0.0:9944`) rather than just the loopback interface (eg: `127.0.0.1:9944`).&#xD;&#xA;&#xD;&#xA;to expose these ports to the world, you need to have:&#xD;&#xA;- an isp that does not block the port numbers you use and allows multiple, simultaneous inbound tcp connections (some german isps are known to throttle down when a substrate node instigates or receives more than a threshold number of connections)&#xD;&#xA;- a router capable of forwarding requests to those port numbers from the router that receives the request to the node system running your node&#xD;&#xA;- either a fixed ip address or dynamic dns that is synchronised to your dynamic ip address&#xD;&#xA;&#xD;&#xA;it is good practice to put any service you expose to the world behind tls. a simple way to do this is to:&#xD;&#xA;- register a domain name (or use one provided by your dyn dns provider)&#xD;&#xA;- use let's encrypt's certbot to request an ssl certificate for yourdomain, to request a certificate,&#xD;&#xA;    - edit (or create) a default nginx configuration that listens on port 80 for letsencrypt challenges only and redirects all other requests to port 443 (the location for this file is conventionally `/etc/nginx/sites-available/default`). replace `mynode.example.com` with your node's fully qualified domain name (fqdn):&#xD;&#xA;      ```nginx&#xD;&#xA;      server {&#xD;&#xA;        server_name mynode.example.com;&#xD;&#xA;        listen 80;&#xD;&#xA;        listen [::]:80;&#xD;&#xA;  &#xD;&#xA;        # certbot challenges&#xD;&#xA;        location ^~ /.well-known/acme-challenge/ {&#xD;&#xA;          default_type &quot;text/plain&quot;;&#xD;&#xA;          root /var/www/html;&#xD;&#xA;        }&#xD;&#xA;  &#xD;&#xA;        # tls redirect&#xD;&#xA;        if ($host = mynode.example.com) {&#xD;&#xA;          return 301 https://$host$request_uri;&#xD;&#xA;        }&#xD;&#xA;        return 404;&#xD;&#xA;      }&#xD;&#xA;      ```&#xD;&#xA;    - use certbot to request a cert. replace `mynode.example.com` with your node's fqdn and `ops@example.com` with your email address:&#xD;&#xA;      ```bash&#xD;&#xA;      sudo certbot certonly \&#xD;&#xA;        --noninteractive \&#xD;&#xA;        --cert-name mynode.example.com \&#xD;&#xA;        --key-type ecdsa \&#xD;&#xA;        -m ops@example.com \&#xD;&#xA;        --agree-tos \&#xD;&#xA;        --no-eff-email \&#xD;&#xA;        --preferred-challenges http \&#xD;&#xA;        --webroot \&#xD;&#xA;        --webroot-path /var/www/html \&#xD;&#xA;        -d mynode.example.com&#xD;&#xA;      ```&#xD;&#xA;- run an nginx reverse proxy listening on port 443 (ssl/tls) and forwarding requests to your node ports. here's an example nginx configuration that does this. you might place this file at `/etc/nginx/sites-available/mynode.example.com.conf`, then create a symlink at `/etc/nginx/sites-enabled/mynode.example.com.conf` which points to it. replace `mynode.example.com` with your node's fqdn:&#xD;&#xA;  ```nginx&#xD;&#xA;  server {&#xD;&#xA;    server_name mynode.example.com;&#xD;&#xA;    listen 443 ssl;&#xD;&#xA;&#xD;&#xA;    # websocket&#xD;&#xA;    location / {&#xD;&#xA;      proxy_pass http://127.0.0.1:9944;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # json rpc&#xD;&#xA;    location /rpc {&#xD;&#xA;      proxy_pass http://127.0.0.1:9933;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # health&#xD;&#xA;    location /health {&#xD;&#xA;      proxy_pass http://127.0.0.1:9933/health;&#xD;&#xA;      access_log off;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;      if ($request_method = 'GET') {&#xD;&#xA;        add_header 'Access-Control-Allow-Origin' '*' always;&#xD;&#xA;        add_header 'Access-Control-Allow-Methods' 'GET' always;&#xD;&#xA;        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;&#xD;&#xA;        add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # metrics&#xD;&#xA;    location /metrics {&#xD;&#xA;      proxy_pass http://127.0.0.1:9615/metrics;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ssl_certificate /etc/letsencrypt/live/mynode.example.com/fullchain.pem;&#xD;&#xA;    ssl_certificate_key /etc/letsencrypt/live/mynode.example.com/privkey.pem;&#xD;&#xA;  }&#xD;&#xA;  ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32985" PostHistoryTypeId="5" PostId="1798" RevisionGUID="4a4bd0d2-4d48-43d0-a715-f793057acd62" CreationDate="2023-05-08T06:16:22.097" UserId="265" Comment="typo corrections" Text="you *can* host it with a cloud provider **but** you certainly don't have to.&#xD;&#xA;making a node public is partly about making it reachable over the internet. this is a big subject because there's a lot to think about in terms of availability (is your node reachable behind your routers, switches and firewalls), security (is the access limited to things you are comfortable with and prepared for) and authenticity (can your node be impersonated by an imposter or mitm).&#xD;&#xA;&#xD;&#xA;substrate nodes expose a number of services over tcp. you can make none, some or all of these ports visible to the world:&#xD;&#xA;&#xD;&#xA;- **p2p**: usually on port `30333`. otherwise customised with cli arg: `--port 30333`. this port is used by the network to create consensus and share blockchain state. if you want other nodes to be able to learn about your node's blockchain state (a good thing), open this port first.&#xD;&#xA;- **ws**: usually on port `9944`. otherwise customised with cli arg: `--ws-port 9944`. listen on the public socket with `--ws-external`. this port responds to websocket queries that keep subscribers informed of the changing state of your node's ledger over time. it can also be used by polkadot.js to provide rich interactions with your node&#xD;&#xA;- **rpc**: usually on port `9933`. otherwise customised with cli arg: `--rpc-port 9933`. listen on the public socket with `--rpc-external`. this port responds to rpc queries enabling a limited set of interactions with your node. some rpc calls are not safe to expose to the world and substrate has some cli flags (like `--rpc-methods safe`) that help you to prevent exposure of unsafe rpc calls (like `author_insertKey`, amongst others)&#xD;&#xA;- **metrics**: usually on port `9615`. otherwise customised with cli arg: `--prometheus-port 9615`. listen on the public socket with `--prometheus-external`. this port exposes metrics that help you to monitor the health of your node. it can give you information about things like slow or stopped block production and is usually monitored by a metrics monitoring suite like prometheus, alertmanager and grafana.&#xD;&#xA;&#xD;&#xA;if you're running a parachain node, all of the above ports are duplicated (with default port numbers incremented by 1) because parachain binaries run both an embedded relay chain node and their own parachain node.&#xD;&#xA;&#xD;&#xA;the references to cli args for listening on public sockets above, modifies the node to listen on all interfaces (eg: `0.0.0.0:9944`) rather than just the loopback interface (eg: `127.0.0.1:9944`).&#xD;&#xA;&#xD;&#xA;to expose these ports to the world, you need to have:&#xD;&#xA;- an isp that does not block the port numbers you use and allows multiple, simultaneous inbound tcp connections (some german isps are known to throttle down when a substrate node instigates or receives more than a threshold number of connections)&#xD;&#xA;- a router capable of forwarding requests to those port numbers from the router that receives the request to the node system running your node&#xD;&#xA;- either a fixed ip address or dynamic dns that is synchronised to your dynamic ip address&#xD;&#xA;&#xD;&#xA;it is good practice to put any service you expose to the world behind tls. a simple way to do this is to:&#xD;&#xA;- register a domain name (or use one provided by your dyn dns provider)&#xD;&#xA;- use let's encrypt's certbot to request a tls certificate for your domain, to request a certificate,&#xD;&#xA;    - edit (or create) a default nginx configuration that listens on port 80 for letsencrypt challenges only and redirects all other requests to port 443 (the location for this file is conventionally `/etc/nginx/sites-available/default`). replace `mynode.example.com` with your node's fully qualified domain name (fqdn):&#xD;&#xA;      ```nginx&#xD;&#xA;      server {&#xD;&#xA;        server_name mynode.example.com;&#xD;&#xA;        listen 80;&#xD;&#xA;        listen [::]:80;&#xD;&#xA;  &#xD;&#xA;        # certbot challenges&#xD;&#xA;        location ^~ /.well-known/acme-challenge/ {&#xD;&#xA;          default_type &quot;text/plain&quot;;&#xD;&#xA;          root /var/www/html;&#xD;&#xA;        }&#xD;&#xA;  &#xD;&#xA;        # tls redirect&#xD;&#xA;        if ($host = mynode.example.com) {&#xD;&#xA;          return 301 https://$host$request_uri;&#xD;&#xA;        }&#xD;&#xA;        return 404;&#xD;&#xA;      }&#xD;&#xA;      ```&#xD;&#xA;    - use certbot to request a cert. replace `mynode.example.com` with your node's fqdn and `ops@example.com` with your email address:&#xD;&#xA;      ```bash&#xD;&#xA;      sudo certbot certonly \&#xD;&#xA;        --noninteractive \&#xD;&#xA;        --cert-name mynode.example.com \&#xD;&#xA;        --key-type ecdsa \&#xD;&#xA;        -m ops@example.com \&#xD;&#xA;        --agree-tos \&#xD;&#xA;        --no-eff-email \&#xD;&#xA;        --preferred-challenges http \&#xD;&#xA;        --webroot \&#xD;&#xA;        --webroot-path /var/www/html \&#xD;&#xA;        -d mynode.example.com&#xD;&#xA;      ```&#xD;&#xA;- run an nginx reverse proxy listening on port 443 (ssl/tls) and forwarding requests to your node ports. here's an example nginx configuration that does this. you might place this file at `/etc/nginx/sites-available/mynode.example.com.conf`, then create a symlink at `/etc/nginx/sites-enabled/mynode.example.com.conf` which points to it. replace `mynode.example.com` with your node's fqdn:&#xD;&#xA;  ```nginx&#xD;&#xA;  server {&#xD;&#xA;    server_name mynode.example.com;&#xD;&#xA;    listen 443 ssl;&#xD;&#xA;&#xD;&#xA;    # websocket&#xD;&#xA;    location / {&#xD;&#xA;      proxy_pass http://127.0.0.1:9944;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # json rpc&#xD;&#xA;    location /rpc {&#xD;&#xA;      proxy_pass http://127.0.0.1:9933;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # health&#xD;&#xA;    location /health {&#xD;&#xA;      proxy_pass http://127.0.0.1:9933/health;&#xD;&#xA;      access_log off;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;      if ($request_method = 'GET') {&#xD;&#xA;        add_header 'Access-Control-Allow-Origin' '*' always;&#xD;&#xA;        add_header 'Access-Control-Allow-Methods' 'GET' always;&#xD;&#xA;        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;&#xD;&#xA;        add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # metrics&#xD;&#xA;    location /metrics {&#xD;&#xA;      proxy_pass http://127.0.0.1:9615/metrics;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ssl_certificate /etc/letsencrypt/live/mynode.example.com/fullchain.pem;&#xD;&#xA;    ssl_certificate_key /etc/letsencrypt/live/mynode.example.com/privkey.pem;&#xD;&#xA;  }&#xD;&#xA;  ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32986" PostHistoryTypeId="2" PostId="8396" RevisionGUID="4edaa89c-c987-4d48-b77a-00d86d10af81" CreationDate="2023-05-08T08:18:16.620" UserId="4197" Text="it is logs when i click tranfer in local web (use : https://github.com/substrate-developer-hub/substrate-front-end-template) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```2023-05-08 07:55:45   Starting consensus session on top of parent 0x1d62fc09c822d0857cd502b551b6552f1da4ff364e23340dc78544845ed8a70b    &#xD;&#xA;2023-05-08 07:55:45   Prepared block for proposing at 230 [hash: 0x80339fd8bbeb7bfa0aaa05ae378dc2c0a279d75b082590ef0c167f58f282033c; parent_hash: 0x1d62…a70b; extrinsics (1): [0xd9b2…9334]]    &#xD;&#xA;2023-05-08 07:55:45   Pre-sealed block for proposal at 230. Hash now 0x045ed0fb58b8bcf39f27532d75e2d9a7e403c888da811947612589686b6f1a86, previously 0x80339fd8bbeb7bfa0aaa05ae378dc2c0a279d75b082590ef0c167f58f282033c.    &#xD;&#xA;2023-05-08 07:55:45  ✨ Imported #230 (0x045e…1a86)    &#xD;&#xA;2023-05-08 07:55:46   Idle (0 peers), best: #230 (0x045e…1a86), finalized #227 (0x906b…bba2), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-05-08 07:55:47  panicked at 'Bad input data provided to query_info: Codec error', /opt/spacex/runtime/src/lib.rs:902:1    &#xD;&#xA;2023-05-08 07:55:47  Unknown error: Client(Execution(Other(&quot;Wasm execution trapped: wasm trap: unreachable&#xD;&#xA;wasm backtrace:&#xD;&#xA;    0: 0x2156 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x1ea3 - &lt;unknown&gt;!core::panicking::panic_fmt::h125c8438143be5c3&#xD;&#xA;    2: 0x1319ea - &lt;unknown&gt;!TransactionPaymentApi_query_info&#xD;&#xA;note: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to display more information&#xD;&#xA;&quot;)))    &#xD;&#xA;2023-05-08 07:55:48   Starting consensus session on top of parent 0x045ed0fb58b8bcf39f27532d75e2d9a7e403c888da811947612589686b6f1a86    &#xD;&#xA;2023-05-08 07:55:48   Prepared block for proposing at 231 [hash: 0x04084edcacd1ba011cd8a6a3b52871ab8b0067eab1cf57c1712bc6c6b94d8e9a; parent_hash: 0x045e…1a86; extrinsics (1): [0x2139…b8c3]]    &#xD;&#xA;2023-05-08 07:55:48   Pre-sealed block for proposal at 231. Hash now 0x6ac10d2fcf6e2e63eb18507cb42b9eee7df73e05f1f6c6a2e429d462f0e339dc, previously 0x04084edcacd1ba011cd8a6a3b52871ab8b0067eab1cf57c1712bc6c6b94d8e9a.    &#xD;&#xA;2023-05-08 07:55:48  ✨ Imported #231 (0x6ac1…39dc)```" ContentLicense="CC BY-SA 4.0" />
  <row Id="32988" PostHistoryTypeId="1" PostId="8396" RevisionGUID="4edaa89c-c987-4d48-b77a-00d86d10af81" CreationDate="2023-05-08T08:18:16.620" UserId="4197" Text="i get a error when running dev node and tranfer coin to test address" ContentLicense="CC BY-SA 4.0" />
  <row Id="32989" PostHistoryTypeId="3" PostId="8396" RevisionGUID="4edaa89c-c987-4d48-b77a-00d86d10af81" CreationDate="2023-05-08T08:18:16.620" UserId="4197" Text="|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32990" PostHistoryTypeId="2" PostId="8397" RevisionGUID="57fa4911-e9df-4b8f-a9c4-1929ff518993" CreationDate="2023-05-08T11:10:14.363" UserId="3838" Text="In the context of Substrate, is it feasible to introduce a layer on top, such as Kafka, to improve request processing times? Could this architecture enable Substrate to be utilized solely for blockchain verification purposes, with the supplementary layer facilitating accelerated request handling by only requesting substrate when changes occur?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="32992" PostHistoryTypeId="1" PostId="8397" RevisionGUID="57fa4911-e9df-4b8f-a9c4-1929ff518993" CreationDate="2023-05-08T11:10:14.363" UserId="3838" Text="Related to the architecture, new layer on top of Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="32993" PostHistoryTypeId="3" PostId="8397" RevisionGUID="57fa4911-e9df-4b8f-a9c4-1929ff518993" CreationDate="2023-05-08T11:10:14.363" UserId="3838" Text="|substrate-archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32994" PostHistoryTypeId="2" PostId="8398" RevisionGUID="0a0544fb-ef75-4d98-83d4-7cb264abd8fc" CreationDate="2023-05-08T11:28:35.667" UserId="3327" Text="I forked my parachain from substrate-node-template (polkadot-v0.9.29).&#xD;&#xA;&#xD;&#xA;Dependabot has generated following security alert:&#xD;&#xA;&#xD;&#xA;**wasmtime vulnerable to guest-controlled out-of-bounds read/write on x86_64**&#xD;&#xA;&#xD;&#xA;Dependabot can not patch the security issue automatically with the following error from dependabot:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&quot;Dependabot cannot update cranelift-codegen to a non-vulnerable version&#xD;&#xA;&#xD;&#xA;The latest possible version of cranelift-codegen that can be installed is 0.85.3.&#xD;&#xA;&#xD;&#xA;The earliest fixed version is 0.91.1.&quot;&#xD;&#xA;&#xD;&#xA;I tried to do it  manually by executing the following command:&#xD;&#xA;&#xD;&#xA;cargo update -p cranelift-codegen&#xD;&#xA;&#xD;&#xA;but the said package is not updated and no error message is generated. &#xD;&#xA;&#xD;&#xA;Can some one guide me, how to fix this error?[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YjFye.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="32996" PostHistoryTypeId="1" PostId="8398" RevisionGUID="0a0544fb-ef75-4d98-83d4-7cb264abd8fc" CreationDate="2023-05-08T11:28:35.667" UserId="3327" Text="How to fix dependabot security alert wasmtime vulnerable to guest-controlled out-of-bounds read/write on x86_64" ContentLicense="CC BY-SA 4.0" />
  <row Id="32997" PostHistoryTypeId="3" PostId="8398" RevisionGUID="0a0544fb-ef75-4d98-83d4-7cb264abd8fc" CreationDate="2023-05-08T11:28:35.667" UserId="3327" Text="|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="32998" PostHistoryTypeId="2" PostId="8399" RevisionGUID="e0c8f57a-a212-446e-bc0a-959780954655" CreationDate="2023-05-08T11:33:14.937" UserId="4146" Text="The [ContractsEmitted][1] event layout has `Contract` field - this is what you need.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/centrifuge/go-substrate-rpc-client/blob/015965cf2e670ceb9b87ae40a8ddfe7ee8114a8f/types/events.go#L2963" ContentLicense="CC BY-SA 4.0" />
  <row Id="33000" PostHistoryTypeId="2" PostId="8400" RevisionGUID="511d20a2-8bab-454a-8bb8-0c238deefd33" CreationDate="2023-05-08T11:37:43.497" UserId="406" Text="@china_zhangsan which version of explorer you are using. Try to switch to the older version of explorer and re-run the node by using the command :- ./target/release/&quot;binary_name&quot; --dev --tmp&#xD;&#xA;May be this will help you " ContentLicense="CC BY-SA 4.0" />
  <row Id="33004" PostHistoryTypeId="2" PostId="8402" RevisionGUID="191192e6-3f83-4080-8f17-778f267b3b64" CreationDate="2023-05-08T12:09:53.917" UserId="406" Text="You gave loopback ip in the another system, so it is finding the node in that system only, if you want to connect on different system you have to follow the following steps:-&#xD;&#xA;&#xD;&#xA; - Add the ip of the system to which you want to connect in the bootnode   `--bootnodes /ip4/&quot;system_ip&quot;/tcp/30333/p2p/12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH `&#xD;&#xA;example:- 192.126.1.3&#xD;&#xA; - To check the ip of the other system use the command:- ipconfig&#xD;&#xA;&#xD;&#xA; - Check that your system is able to listen the port of the other system. You can check this by using the command :- telnet other_system_ip 30333&#xD;&#xA;You are using 30333 for peer discovery that's why listening to this port is &#xD;&#xA;necessary" ContentLicense="CC BY-SA 4.0" />
  <row Id="33012" PostHistoryTypeId="2" PostId="8406" RevisionGUID="11ace3f1-7fea-40b7-9fc8-8a3aeb4f590c" CreationDate="2023-05-08T12:46:20.910" UserId="3136" Text="Kindly downgrade your nightly version. There is some issue in the new update of the nightly. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33014" PostHistoryTypeId="2" PostId="8407" RevisionGUID="605b45e2-7b7a-4512-b286-db93e1419e37" CreationDate="2023-05-08T12:51:30.737" UserId="2372" Text="No there is no way you can migrate blocks from one chain to another chain. You can only migrate data from one chain to another. Data like Staking ledger, System Accounts, Contracts and any other things. But cannot migrate Blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="33016" PostHistoryTypeId="2" PostId="8408" RevisionGUID="4863bc1a-2a0e-44dc-ac41-2a762a0b832d" CreationDate="2023-05-08T13:27:12.413" UserId="73" Text="&gt; I've been working on the data migration from the existing solo chain to the Relay Chain.&#xD;&#xA;&#xD;&#xA;If you mean from solo chain to a parachain, yes you could keep the block history. You would need to migrate from your solo chain directly to a parachain. This way you could keep your entire history of blocks and state. &#xD;&#xA;&#xD;&#xA;There is currently not an easy guide to follow. [Here][1] are some information.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33018" PostHistoryTypeId="2" PostId="8409" RevisionGUID="a3ec78e7-85b1-4a79-aac7-6f1b0f848abd" CreationDate="2023-05-08T14:18:13.757" UserId="29" Text="This work is being done in this PR:&#xD;&#xA;- https://github.com/paritytech/polkadot/pull/7077&#xD;&#xA;&#xD;&#xA;Relevant issue:&#xD;&#xA;- https://github.com/paritytech/polkadot/issues/7167&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33020" PostHistoryTypeId="2" PostId="8410" RevisionGUID="52b796dc-92f1-453a-a7e4-206f9ce8aea5" CreationDate="2023-05-08T15:35:41.087" UserId="2884" Text="Why should I choose one over the other?&#xD;&#xA;&#xD;&#xA;I see a lot of parachains using orml-tokens, and also x-tokens. Is using orml-tokens required to use all the other orml features like x-tokens? &#xD;&#xA;&#xD;&#xA;When should I use orml-currencies? I see for example Mangata using orml_tokens::CurrencyAdapter as the type for native currency, so why have orml-currencies in the first place?&#xD;&#xA;&#xD;&#xA;It would be nice to have an in-depth explanation of the difference between the 2, and when a parachain should choose one over the other. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33022" PostHistoryTypeId="1" PostId="8410" RevisionGUID="52b796dc-92f1-453a-a7e4-206f9ce8aea5" CreationDate="2023-05-08T15:35:41.087" UserId="2884" Text="orml-tokens vs pallet-assets" ContentLicense="CC BY-SA 4.0" />
  <row Id="33023" PostHistoryTypeId="3" PostId="8410" RevisionGUID="52b796dc-92f1-453a-a7e4-206f9ce8aea5" CreationDate="2023-05-08T15:35:41.087" UserId="2884" Text="|assets|orml-xtokens|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33024" PostHistoryTypeId="2" PostId="8411" RevisionGUID="b711403b-7422-4a56-8967-12e86f348896" CreationDate="2023-05-08T15:42:59.327" UserId="4146" Text="I need to subscribe to my smart-contract events (`#[ink(event)]`). So I `state_subscribeStorage` to &quot;System.Events&quot; storage key. But then I get all system events of all smart contracts in my chain. Can I save websocket traffic and have only events that I am interested in? &#xD;&#xA;&#xD;&#xA;Since substrate contract events have topics (`#[ink(topic)]`), there has to be a way to filter the received events by the topics. Or else why are the topics introduced?&#xD;&#xA;&#xD;&#xA;I know about [external indexers][1]. But I would like to be simple and use only the substrate node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/35/is-there-a-good-indexer-for-substrate-chains-like-the-graph" ContentLicense="CC BY-SA 4.0" />
  <row Id="33026" PostHistoryTypeId="1" PostId="8411" RevisionGUID="b711403b-7422-4a56-8967-12e86f348896" CreationDate="2023-05-08T15:42:59.327" UserId="4146" Text="How to filter the subscribed contracts events with their topics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33027" PostHistoryTypeId="3" PostId="8411" RevisionGUID="b711403b-7422-4a56-8967-12e86f348896" CreationDate="2023-05-08T15:42:59.327" UserId="4146" Text="|ink|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33028" PostHistoryTypeId="2" PostId="8412" RevisionGUID="2f145e15-d25c-4ec8-a53c-5611d5c5cf3e" CreationDate="2023-05-08T18:11:49.197" UserId="2281" Text="The error message you mentioned typically occurs when a package or module is not found in the specified package repository or in your local environment.&#xD;&#xA;you may try  to change `sc-consensus-grandpa` with `sc-finality-grandpa` make sure you use same branch of `substrate` and `Frontier`  if you are using `polkadot-v0.9.39` of frontier then switch to `polkadot-v0.9.39` in substrate also." ContentLicense="CC BY-SA 4.0" />
  <row Id="33030" PostHistoryTypeId="2" PostId="8413" RevisionGUID="f34531b7-2042-44f7-8376-c34febadfa95" CreationDate="2023-05-08T18:20:44.747" UserId="2281" Text="You may take reference from the some of the chains which have already integrated `pallet_evm` &amp; `paller_ethereum` into substrate some e.g are [ChainX][1] &amp; [Reef-chain][2] &amp; [Selendra][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chainx-org/ChainX&#xD;&#xA;  [2]: https://github.com/reef-defi/reef-chain&#xD;&#xA;  [3]: https://github.com/selendra/selendra" ContentLicense="CC BY-SA 4.0" />
  <row Id="33032" PostHistoryTypeId="5" PostId="8224" RevisionGUID="b24fa566-3cb9-483c-8bca-cbea9eeb1dcc" CreationDate="2023-05-08T18:38:18.360" UserId="3598" Comment="added 96 characters in body" Text="I have a rococo collator running on aws eks that keeps failing, here are the logs:&#xD;&#xA;```&#xD;&#xA;2023-04-23 01:49:19 [Parachain]  Idle (0 peers), best: #0 (0x3865…1210), finalized #0 (0x3865…1210), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;candidate-validation-subsystem&quot; err=FromOrigin { origin: &quot;candidate-validation&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Overseer exited with error err=Generated(SubsystemStalled(&quot;availability-store-subsystem&quot;))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;dispute-coordinator-subsystem&quot; err=FromOrigin { origin: &quot;dispute-coordinator&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Essential task `overseer` failed. Shutting down service.    &#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;approval-voting-subsystem&quot; err=FromOrigin { origin: &quot;approval-voting&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;bitfield-signing-subsystem&quot; err=FromOrigin { origin: &quot;bitfield-signing&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] err=Subsystem(Generated(Context(&quot;Signal channel is terminated and empty.&quot;)))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;availability-recovery-subsystem&quot; err=FromOrigin { origin: &quot;availability-recovery&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;statement-distribution-subsystem&quot; err=FromOrigin { origin: &quot;statement-distribution&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] Failed to receive a message from Overseer, exiting err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;network-bridge-rx-subsystem&quot; err=FromOrigin { origin: &quot;network-bridge&quot;, source: SubsystemError(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;chain-api-subsystem&quot; err=FromOrigin { origin: &quot;chain-api&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-04-23 01:49:22 [Relaychain] subsystem exited with error subsystem=&quot;runtime-api-subsystem&quot; err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;Error: Service(Other(&quot;Essential task failed.&quot;))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The parachain is not producing blocks yet. &#xD;&#xA;&#xD;&#xA;These are the parameters I'm passing to the binary:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--collator --base-path /var/www/collator-data/ --force-authoring --ws-port 9946 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --chain /var/www/substrate/resources/collator-raw-spec.json -- --execution wasm --base-path /var/www/relay-data/ --chain /var/www/substrate/resources/rococo.json --port 30333 --ws-port 9944 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --wasm-execution Compiled --pruning 10000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've tried running it in different instance types, even c6id.2xlarge instance, but with the same results.&#xD;&#xA;&#xD;&#xA;The strange thing is that I'm also running a collator for polkadot and that one is running without any issues.&#xD;&#xA;&#xD;&#xA;The node client version being used is: v0.9.38, the runtime on v0.9.27, as we want to test the upgrade on rococo before performing it on polkadot&#xD;&#xA;&#xD;&#xA;Does anyone know what could be the cause of the issue?&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;I've create the following issue: https://github.com/paritytech/polkadot/issues/7200&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33033" PostHistoryTypeId="2" PostId="8414" RevisionGUID="3283bb74-a370-480a-b355-16c574194917" CreationDate="2023-05-08T19:18:29.510" UserId="3708" Text="I'm running a local node using zombienet, I tried to access to XCM Precompile following [this][1] guide but when I instantiate the contract and call assets_reserve_transfer method it does not work. I only have access to the first three precompile addresses.&#xD;&#xA;Is it possible to use it or maybe I have to do something else?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm running Astar this way:&#xD;&#xA;```&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2006&#xD;&#xA;chain = &quot;astar-dev&quot;&#xD;&#xA;add_to_genesis = true&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [[parachains.collators]]&#xD;&#xA;  name = &quot;collator1&quot;&#xD;&#xA;  ws_port = 9920&#xD;&#xA;  rpc_port = 8920&#xD;&#xA;  command = &quot;./bin/astar-collator&quot;&#xD;&#xA;  args = [ &quot;-l=xcm=trace&quot;, &quot;--enable-evm-rpc&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.astar.network/docs/build/EVM/precompiles/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33035" PostHistoryTypeId="1" PostId="8414" RevisionGUID="3283bb74-a370-480a-b355-16c574194917" CreationDate="2023-05-08T19:18:29.510" UserId="3708" Text="Astar XCM Precompile" ContentLicense="CC BY-SA 4.0" />
  <row Id="33036" PostHistoryTypeId="3" PostId="8414" RevisionGUID="3283bb74-a370-480a-b355-16c574194917" CreationDate="2023-05-08T19:18:29.510" UserId="3708" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33037" PostHistoryTypeId="2" PostId="8415" RevisionGUID="4ddbf34d-709d-48f6-87eb-25a0c4620676" CreationDate="2023-05-08T20:17:20.467" UserId="2722" Text="I'm working on a Substrate pallet, and I have a custom associated type AssetId. I need to convert an AccountId into this AssetId. My Config trait looks like this:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + TypeInfo + pallet_contracts::Config {&#xD;&#xA;		/// Pallet ID.&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type PalletId: Get&lt;PalletId&gt;;&#xD;&#xA;&#xD;&#xA;		/// The overarching event type.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		/// The currency trait.&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		/// The balance type for assets (i.e. tokens).&#xD;&#xA;		type AssetBalance: Balance&#xD;&#xA;			+ FixedPointOperand&#xD;&#xA;			+ MaxEncodedLen&#xD;&#xA;			+ MaybeSerializeDeserialize&#xD;&#xA;			+ TypeInfo;&#xD;&#xA;&#xD;&#xA;		// Two-way conversion between asset and currency balances&#xD;&#xA;		type AssetToCurrencyBalance: Convert&lt;Self::AssetBalance, BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;		type CurrencyToAssetBalance: Convert&lt;BalanceOf&lt;Self&gt;, Self::AssetBalance&gt;;&#xD;&#xA;&#xD;&#xA;		/// The asset ID type.&#xD;&#xA;		type AssetId: MaybeSerializeDeserialize&#xD;&#xA;			+ MaxEncodedLen&#xD;&#xA;			+ TypeInfo&#xD;&#xA;			+ Clone&#xD;&#xA;			+ Debug&#xD;&#xA;			+ PartialEq&#xD;&#xA;			+ EncodeLike&#xD;&#xA;			+ Decode;&#xD;&#xA;&#xD;&#xA;		/// The type for tradable assets.&#xD;&#xA;		type Assets: Inspect&lt;Self::AccountId, AssetId = Self::AssetId, Balance = Self::AssetBalance&gt;&#xD;&#xA;			+ Transfer&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		/// The type for liquidity tokens.&#xD;&#xA;		type AssetRegistry: Inspect&lt;Self::AccountId, AssetId = Self::AccountId, Balance = Self::AssetBalance&gt;&#xD;&#xA;			+ Mutate&lt;Self::AccountId&gt;&#xD;&#xA;			+ Create&lt;Self::AccountId&gt;&#xD;&#xA;			+ Destroy&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		/// Information on runtime weights.&#xD;&#xA;		type WeightInfo: WeightInfo;&#xD;&#xA;&#xD;&#xA;		/// Provider fee numerator.&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type ProviderFeeNumerator: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;		/// Provider fee denominator.&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type ProviderFeeDenominator: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;		/// Minimum currency deposit for a new exchange.&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MinDeposit: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;this is the function i need to convert `&lt;T as SysConfig&gt;::AccountId to &lt;T as pallet::Config&gt;::AssetId` . &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[pallet::call_index(0)]&#xD;&#xA;    		#[pallet::weight(&lt;T as Config&gt;::WeightInfo::create_exchange())]&#xD;&#xA;    		#[transactional]&#xD;&#xA;    		pub fn create_exchange(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			asset_id:  AssetIdOf&lt;T&gt;,&#xD;&#xA;    			liquidity_token_id:  AssetIdOf&lt;T&gt;,&#xD;&#xA;    			currency_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    			token_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			// -------------------------- Validation part --------------------------&#xD;&#xA;    			let caller = ensure_signed(origin)?;&#xD;&#xA;    	&#xD;&#xA;    &#xD;&#xA;    			let exchange = Exchange {&#xD;&#xA;    				asset_id: asset_id.clone(),&#xD;&#xA;    				currency_reserve: &lt;BalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;    				token_reserve: &lt;AssetBalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;    				liquidity_token_id: liquidity_token_id.clone(),&#xD;&#xA;    			};&#xD;&#xA;    &#xD;&#xA;    			&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;and this is my strct :&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;    	pub struct Exchange&lt;T: Config&gt; {&#xD;&#xA;    		pub asset_id: T::AccountId,&#xD;&#xA;    		pub currency_reserve: BalanceOf&lt;T&gt;,&#xD;&#xA;    		pub token_reserve: AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    		pub liquidity_token_id: T::AccountId,&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;i have to use T::AccountId for call contract for some actions : &#xD;&#xA;&#xD;&#xA;    let result = pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;    			origin.clone(),&#xD;&#xA;    			contract_address.clone(),&#xD;&#xA;    			contracts_value,&#xD;&#xA;    			gas_limit,&#xD;&#xA;    			None,&#xD;&#xA;    			data,&#xD;&#xA;    			false,&#xD;&#xA;    			pallet_contracts::Determinism::Deterministic,&#xD;&#xA;    		);&#xD;&#xA;&#xD;&#xA;and use `AssetId` for using `T::AssetRegistry::mint_into` . &#xD;&#xA;&#xD;&#xA;	T::AssetRegistry::mint_into(&#xD;&#xA;				exchange.liquidity_token_id.clone(),&#xD;&#xA;				&amp;provider,&#xD;&#xA;				liquidity_minted,&#xD;&#xA;			)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;when i need to rin this code it show me this error : &#xD;&#xA;&#xD;&#xA;&gt;mismatched types&#xD;&#xA;expected associated type `&lt;T as pallet::Config&gt;::AssetId`&#xD;&#xA;   found associated type `&lt;T as SysConfig&gt;::AccountId`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**how can i sovle this problem ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="33039" PostHistoryTypeId="1" PostId="8415" RevisionGUID="4ddbf34d-709d-48f6-87eb-25a0c4620676" CreationDate="2023-05-08T20:17:20.467" UserId="2722" Text="How to convert an associated type AccountId into a custom associated type AssetId in a Substrate pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33040" PostHistoryTypeId="3" PostId="8415" RevisionGUID="4ddbf34d-709d-48f6-87eb-25a0c4620676" CreationDate="2023-05-08T20:17:20.467" UserId="2722" Text="|polkadot|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33041" PostHistoryTypeId="2" PostId="8416" RevisionGUID="6437af97-c7a6-4f20-a248-248e8a67c8e6" CreationDate="2023-05-09T00:53:23.160" UserId="494" Text="I used to ask myself similar questions.&#xD;&#xA;&#xD;&#xA;Not long ago I wrote [a pallet](https://github.com/SubstrateChess/pallet-chess) that was loosely coupled with `pallet-assets`. Then, we integrated it into [GMorDie](https://www.gmordie.com/), which uses an [ORML approach](https://github.com/SubstrateChess/pallet-chess/tree/gmordie) instead. This experience allowed me to clarify my mental model a bit.&#xD;&#xA;&#xD;&#xA;So this answer is based on my experience with both paths, which is somewhat limited so it is not 100% comprehensive.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Say you want to build some interface where the native asset (via `pallet-balances`) exposes the same APIs as the other fungible assets in your runtime (via `orml-tokens`). You'd give the native asset something like `CurrencyId = 0`, while the other fungible assets would map to the remaining `CurrencyId` values.&#xD;&#xA;&#xD;&#xA;That is what you can achieve with `orml_tokens::CurrencyAdapter`. So whenever you're doing stuff like checking some asset's minimum balance or doing a reserve deposit, you can use an unified API (provided by the `MultiCurrency` trait), instead of relying on some complex matching logic that gets re-routed to different pallets (which would have been the case with `pallet-balances` + `pallet-assets`).&#xD;&#xA;&#xD;&#xA;[GMorDie's runtime source code](https://github.com/GMorDIE/gm-chain/blob/main/runtime/src/lib.rs) is actually a good resource to assimilate these concepts.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I know the `BasicCurrencyExtended` and `MultiCurrencyExtended` traits also provide some extra functionality (when compared to vanilla FRAME) but my experience with them is somewhat limited, so I'll allow someone else to expand on those. &#xD;&#xA;&#xD;&#xA;Same goes for `orml-xtokens`. I know it's XCM related but I wouldn't be able to provide more detailed insights." ContentLicense="CC BY-SA 4.0" />
  <row Id="33043" PostHistoryTypeId="52" PostId="8410" RevisionGUID="eb4d9698-27c1-4339-8b0f-9c8b6ff73b24" CreationDate="2023-05-09T01:36:48.863" />
  <row Id="33053" PostHistoryTypeId="5" PostId="8413" RevisionGUID="4d910083-2c49-4a33-866e-23b26ee9d1ab" CreationDate="2023-05-09T06:22:05.067" UserId="2281" Comment="deleted 3 characters in body" Text="You may take reference from  some of the chains which have already integrated `pallet_evm` &amp; `paller_ethereum` into substrate some e.g are [ChainX][1] &amp; [Reef-chain][2] &amp; [Selendra][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chainx-org/ChainX&#xD;&#xA;  [2]: https://github.com/reef-defi/reef-chain&#xD;&#xA;  [3]: https://github.com/selendra/selendra" ContentLicense="CC BY-SA 4.0" />
  <row Id="33057" PostHistoryTypeId="5" PostId="8415" RevisionGUID="f34e6d7b-5d35-493a-90d2-d7931733b8f8" CreationDate="2023-05-09T06:34:33.523" UserId="2722" Comment="added 111 characters in body" Text="I'm working on a Substrate pallet, and I have a custom associated type AssetId. I need to convert an AccountId into this AssetId. My Config trait looks like this:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + TypeInfo + pallet_contracts::Config {&#xD;&#xA;		/// Pallet ID.&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type PalletId: Get&lt;PalletId&gt;;&#xD;&#xA;&#xD;&#xA;		/// The overarching event type.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		/// The currency trait.&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		/// The balance type for assets (i.e. tokens).&#xD;&#xA;		type AssetBalance: Balance&#xD;&#xA;			+ FixedPointOperand&#xD;&#xA;			+ MaxEncodedLen&#xD;&#xA;			+ MaybeSerializeDeserialize&#xD;&#xA;			+ TypeInfo;&#xD;&#xA;&#xD;&#xA;		// Two-way conversion between asset and currency balances&#xD;&#xA;		type AssetToCurrencyBalance: Convert&lt;Self::AssetBalance, BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;		type CurrencyToAssetBalance: Convert&lt;BalanceOf&lt;Self&gt;, Self::AssetBalance&gt;;&#xD;&#xA;&#xD;&#xA;		/// The asset ID type.&#xD;&#xA;		type AssetId: MaybeSerializeDeserialize&#xD;&#xA;			+ MaxEncodedLen&#xD;&#xA;			+ TypeInfo&#xD;&#xA;			+ Clone&#xD;&#xA;			+ Debug&#xD;&#xA;			+ PartialEq&#xD;&#xA;			+ EncodeLike&#xD;&#xA;			+ Decode;&#xD;&#xA;&#xD;&#xA;		/// The type for tradable assets.&#xD;&#xA;		type Assets: Inspect&lt;Self::AccountId, AssetId = Self::AssetId, Balance = Self::AssetBalance&gt;&#xD;&#xA;			+ Transfer&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		/// The type for liquidity tokens.&#xD;&#xA;		type AssetRegistry: Inspect&lt;Self::AccountId, AssetId = Self::AccountId, Balance = Self::AssetBalance&gt;&#xD;&#xA;			+ Mutate&lt;Self::AccountId&gt;&#xD;&#xA;			+ Create&lt;Self::AccountId&gt;&#xD;&#xA;			+ Destroy&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		/// Information on runtime weights.&#xD;&#xA;		type WeightInfo: WeightInfo;&#xD;&#xA;&#xD;&#xA;		/// Provider fee numerator.&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type ProviderFeeNumerator: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;		/// Provider fee denominator.&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type ProviderFeeDenominator: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;		/// Minimum currency deposit for a new exchange.&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type MinDeposit: Get&lt;BalanceOf&lt;Self&gt;&gt;;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;this is the function i need to convert `&lt;T as SysConfig&gt;::AccountId to &lt;T as pallet::Config&gt;::AssetId` . &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[pallet::call_index(0)]&#xD;&#xA;    		#[pallet::weight(&lt;T as Config&gt;::WeightInfo::create_exchange())]&#xD;&#xA;    		#[transactional]&#xD;&#xA;    		pub fn create_exchange(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			asset_id:  AssetIdOf&lt;T&gt;,&#xD;&#xA;    			liquidity_token_id:  AssetIdOf&lt;T&gt;,&#xD;&#xA;    			currency_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    			token_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			// -------------------------- Validation part --------------------------&#xD;&#xA;    			let caller = ensure_signed(origin)?;&#xD;&#xA;    	&#xD;&#xA;    &#xD;&#xA;    			let exchange = Exchange {&#xD;&#xA;    				asset_id: asset_id.clone(),&#xD;&#xA;    				currency_reserve: &lt;BalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;    				token_reserve: &lt;AssetBalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;    				liquidity_token_id: liquidity_token_id.clone(),&#xD;&#xA;    			};&#xD;&#xA;    &#xD;&#xA;    			&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;and this is my strct :&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;    	pub struct Exchange&lt;T: Config&gt; {&#xD;&#xA;    		pub asset_id: T::AccountId,&#xD;&#xA;    		pub currency_reserve: BalanceOf&lt;T&gt;,&#xD;&#xA;    		pub token_reserve: AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    		pub liquidity_token_id: T::AccountId,&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;i have to use T::AccountId for call contract for some actions : &#xD;&#xA;&#xD;&#xA;    let result = pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;    			origin.clone(),&#xD;&#xA;    			contract_address.clone(),&#xD;&#xA;    			contracts_value,&#xD;&#xA;    			gas_limit,&#xD;&#xA;    			None,&#xD;&#xA;    			data,&#xD;&#xA;    			false,&#xD;&#xA;    			pallet_contracts::Determinism::Deterministic,&#xD;&#xA;    		);&#xD;&#xA;&#xD;&#xA;and use `AssetId` for using `T::AssetRegistry::mint_into` . &#xD;&#xA;&#xD;&#xA;	T::AssetRegistry::mint_into(&#xD;&#xA;				exchange.liquidity_token_id.clone(),&#xD;&#xA;				&amp;provider,&#xD;&#xA;				liquidity_minted,&#xD;&#xA;			)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;when i need to rin this code it show me this error : &#xD;&#xA;&#xD;&#xA;&gt;mismatched types&#xD;&#xA;expected associated type `&lt;T as pallet::Config&gt;::AssetId`&#xD;&#xA;   found associated type `&lt;T as SysConfig&gt;::AccountId`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[Repository][1]&#xD;&#xA;&#xD;&#xA;**how can i sovle this problem ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Kianoush-Dortaj/substrate_dex/blob/main/frame/dex/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="33064" PostHistoryTypeId="2" PostId="8421" RevisionGUID="7fbed9fb-d284-4135-8378-3c26314f8db7" CreationDate="2023-05-09T08:01:48.963" UserId="2281" Text="you can try using the ip of the server to connect the node `--bootnodes /ip4/&quot;ip of server&quot;/tcp/30333/p2p/`  you need to enable some flags in your command to allow the external node connect `--ws-external --rpc-external --rpc-cors all --no-telemetry` look at [this][1] tutorial also.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33066" PostHistoryTypeId="5" PostId="1798" RevisionGUID="35da3ed2-8d96-465c-a04d-f7eec0d4f892" CreationDate="2023-05-09T10:50:15.287" UserId="265" Comment="formatting" Text="you *can* host it with a cloud provider **but** you certainly don't have to.&#xD;&#xA;making a node public is partly about making it reachable over the internet. this is a big subject because there's a lot to think about in terms of&#xD;&#xA;- **availability** *is your node reachable behind your routers, switches and firewalls?*&#xD;&#xA;- **security** *is the access limited to things you are comfortable with and prepared for?*&#xD;&#xA;- **authenticity** *can your node be impersonated by an imposter or mitm?*&#xD;&#xA;&#xD;&#xA;substrate nodes expose a number of services over tcp. you can make none, some or all of these ports visible to the world:&#xD;&#xA;&#xD;&#xA;- **p2p**: usually on port `30333`. otherwise customised with cli arg: `--port 30333`. this port is used by the network to create consensus and share blockchain state. if you want other nodes to be able to learn about your node's blockchain state (a good thing), open this port first.&#xD;&#xA;- **ws**: usually on port `9944`. otherwise customised with cli arg: `--ws-port 9944`. listen on the public socket with `--ws-external`. this port responds to websocket queries that keep subscribers informed of the changing state of your node's ledger over time. it can also be used by polkadot.js to provide rich interactions with your node&#xD;&#xA;- **rpc**: usually on port `9933`. otherwise customised with cli arg: `--rpc-port 9933`. listen on the public socket with `--rpc-external`. this port responds to rpc queries enabling a limited set of interactions with your node. some rpc calls are not safe to expose to the world and substrate has some cli flags (like `--rpc-methods safe`) that help you to prevent exposure of unsafe rpc calls (like `author_insertKey`, amongst others)&#xD;&#xA;- **metrics**: usually on port `9615`. otherwise customised with cli arg: `--prometheus-port 9615`. listen on the public socket with `--prometheus-external`. this port exposes metrics that help you to monitor the health of your node. it can give you information about things like slow or stopped block production and is usually monitored by a metrics monitoring suite like prometheus, alertmanager and grafana.&#xD;&#xA;&#xD;&#xA;if you're running a parachain node, all of the above ports are duplicated (with default port numbers incremented by 1) because parachain binaries run both an embedded relay chain node and their own parachain node.&#xD;&#xA;&#xD;&#xA;the references to cli args for listening on public sockets above, modifies the node to listen on all interfaces (eg: `0.0.0.0:9944`) rather than just the loopback interface (eg: `127.0.0.1:9944`).&#xD;&#xA;&#xD;&#xA;to expose these ports to the world, you need to have:&#xD;&#xA;- an isp that does not block the port numbers you use and allows multiple, simultaneous inbound tcp connections (some german isps are known to throttle down when a substrate node instigates or receives more than a threshold number of connections)&#xD;&#xA;- a router capable of forwarding requests to those port numbers from the router that receives the request to the node system running your node&#xD;&#xA;- either a fixed ip address or dynamic dns that is synchronised to your dynamic ip address&#xD;&#xA;&#xD;&#xA;it is good practice to put any service you expose to the world behind tls. a simple way to do this is to:&#xD;&#xA;- register a domain name (or use one provided by your dyn dns provider)&#xD;&#xA;- use let's encrypt's certbot to request a tls certificate for your domain, to request a certificate,&#xD;&#xA;    - edit (or create) a default nginx configuration that listens on port 80 for letsencrypt challenges only and redirects all other requests to port 443 (the location for this file is conventionally `/etc/nginx/sites-available/default`). replace `mynode.example.com` with your node's fully qualified domain name (fqdn):&#xD;&#xA;      ```nginx&#xD;&#xA;      server {&#xD;&#xA;        server_name mynode.example.com;&#xD;&#xA;        listen 80;&#xD;&#xA;        listen [::]:80;&#xD;&#xA;  &#xD;&#xA;        # certbot challenges&#xD;&#xA;        location ^~ /.well-known/acme-challenge/ {&#xD;&#xA;          default_type &quot;text/plain&quot;;&#xD;&#xA;          root /var/www/html;&#xD;&#xA;        }&#xD;&#xA;  &#xD;&#xA;        # tls redirect&#xD;&#xA;        if ($host = mynode.example.com) {&#xD;&#xA;          return 301 https://$host$request_uri;&#xD;&#xA;        }&#xD;&#xA;        return 404;&#xD;&#xA;      }&#xD;&#xA;      ```&#xD;&#xA;    - use certbot to request a cert. replace `mynode.example.com` with your node's fqdn and `ops@example.com` with your email address:&#xD;&#xA;      ```bash&#xD;&#xA;      sudo certbot certonly \&#xD;&#xA;        --noninteractive \&#xD;&#xA;        --cert-name mynode.example.com \&#xD;&#xA;        --key-type ecdsa \&#xD;&#xA;        -m ops@example.com \&#xD;&#xA;        --agree-tos \&#xD;&#xA;        --no-eff-email \&#xD;&#xA;        --preferred-challenges http \&#xD;&#xA;        --webroot \&#xD;&#xA;        --webroot-path /var/www/html \&#xD;&#xA;        -d mynode.example.com&#xD;&#xA;      ```&#xD;&#xA;- run an nginx reverse proxy listening on port 443 (ssl/tls) and forwarding requests to your node ports. here's an example nginx configuration that does this. you might place this file at `/etc/nginx/sites-available/mynode.example.com.conf`, then create a symlink at `/etc/nginx/sites-enabled/mynode.example.com.conf` which points to it. replace `mynode.example.com` with your node's fqdn:&#xD;&#xA;  ```nginx&#xD;&#xA;  server {&#xD;&#xA;    server_name mynode.example.com;&#xD;&#xA;    listen 443 ssl;&#xD;&#xA;&#xD;&#xA;    # websocket&#xD;&#xA;    location / {&#xD;&#xA;      proxy_pass http://127.0.0.1:9944;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # json rpc&#xD;&#xA;    location /rpc {&#xD;&#xA;      proxy_pass http://127.0.0.1:9933;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # health&#xD;&#xA;    location /health {&#xD;&#xA;      proxy_pass http://127.0.0.1:9933/health;&#xD;&#xA;      access_log off;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;      if ($request_method = 'GET') {&#xD;&#xA;        add_header 'Access-Control-Allow-Origin' '*' always;&#xD;&#xA;        add_header 'Access-Control-Allow-Methods' 'GET' always;&#xD;&#xA;        add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;&#xD;&#xA;        add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    # metrics&#xD;&#xA;    location /metrics {&#xD;&#xA;      proxy_pass http://127.0.0.1:9615/metrics;&#xD;&#xA;      proxy_http_version 1.1;&#xD;&#xA;      proxy_set_header X-Real-IP $remote_addr;&#xD;&#xA;      proxy_set_header Host $host;&#xD;&#xA;      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&#xD;&#xA;      proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;      proxy_set_header Connection &quot;upgrade&quot;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    ssl_certificate /etc/letsencrypt/live/mynode.example.com/fullchain.pem;&#xD;&#xA;    ssl_certificate_key /etc/letsencrypt/live/mynode.example.com/privkey.pem;&#xD;&#xA;  }&#xD;&#xA;  ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33067" PostHistoryTypeId="2" PostId="8422" RevisionGUID="8dc46596-5831-48fa-8de6-e67e3f68e34a" CreationDate="2023-05-09T11:20:00.440" UserId="377" Text="Need to create the spec on the other system. That was because of the Rust version installed in the system by which we created the specs." ContentLicense="CC BY-SA 4.0" />
  <row Id="33069" PostHistoryTypeId="2" PostId="8423" RevisionGUID="5c814310-a49d-4d3c-acea-cfacad7f2ecf" CreationDate="2023-05-09T11:35:45.057" UserId="4201" Text="I have run a local node on my local host using the substrate documentation at:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/&#xD;&#xA;&#xD;&#xA;Also I git cloned the UI Frontend for displaying the details.&#xD;&#xA;&#xD;&#xA;As you know on a Polkadot blockchain, or a local node created using the substrates, addresses are in 3 different formats as below:&#xD;&#xA;&#xD;&#xA;Chain address type	Address&#xD;&#xA;Polkadot (SS58)	15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5&#xD;&#xA;Kusama (SS58)	HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F&#xD;&#xA;Generic Substrate chain (SS58)	5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I want to know if and how we can change the format of theses addresses on a Generic Substrate chain.&#xD;&#xA;&#xD;&#xA;for example we want the addresses to begin with these three letters: &quot;aml&quot; and the rest of the random characters.&#xD;&#xA;&#xD;&#xA;Is there any way to make that happen on a local blockchain and how?&#xD;&#xA;&#xD;&#xA;Thanks in advance for your help." ContentLicense="CC BY-SA 4.0" />
  <row Id="33071" PostHistoryTypeId="1" PostId="8423" RevisionGUID="5c814310-a49d-4d3c-acea-cfacad7f2ecf" CreationDate="2023-05-09T11:35:45.057" UserId="4201" Text="How to change the format of addresses on a substrate local blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33072" PostHistoryTypeId="3" PostId="8423" RevisionGUID="5c814310-a49d-4d3c-acea-cfacad7f2ecf" CreationDate="2023-05-09T11:35:45.057" UserId="4201" Text="|substrate-node-template|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33073" PostHistoryTypeId="5" PostId="8423" RevisionGUID="4c86a286-b7c5-4f77-bd53-fd0e191c4428" CreationDate="2023-05-09T11:36:46.783" UserId="4201" Comment="added 16 characters in body" Text="I have run a local node on my local host using the substrate documentation at:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/&#xD;&#xA;&#xD;&#xA;Also I git cloned the UI Frontend for displaying the details.&#xD;&#xA;&#xD;&#xA;As you know on a Polkadot blockchain, or a local node created using the substrates, addresses are in 3 different formats as below:&#xD;&#xA;&#xD;&#xA;Chain address type	Address:&#xD;&#xA;&#xD;&#xA;Polkadot (SS58):&#xD;&#xA;	15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5&#xD;&#xA;&#xD;&#xA;Kusama (SS58):&#xD;&#xA;	HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F&#xD;&#xA;&#xD;&#xA;Generic Substrate chain (SS58):&#xD;&#xA;	5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I want to know if and how we can change the format of theses addresses on a Generic Substrate chain.&#xD;&#xA;&#xD;&#xA;for example we want the addresses to begin with these three letters: &quot;aml&quot; and the rest of the random characters.&#xD;&#xA;&#xD;&#xA;Is there any way to make that happen on a local blockchain and how?&#xD;&#xA;&#xD;&#xA;Thanks in advance for your help." ContentLicense="CC BY-SA 4.0" />
  <row Id="33074" PostHistoryTypeId="5" PostId="8423" RevisionGUID="0afbe2a0-969f-4bac-b663-dafea40a4823" CreationDate="2023-05-09T11:37:45.537" UserId="4201" Comment="deleted 38 characters in body" Text="I have run a local node on my local host using the substrate documentation at:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/&#xD;&#xA;&#xD;&#xA;Also I git cloned the UI Frontend for displaying the details.&#xD;&#xA;&#xD;&#xA;As you know on a Polkadot blockchain, or a local node created using the substrates, addresses are in 3 different formats as below:&#xD;&#xA;&#xD;&#xA;Chain address type	Address:&#xD;&#xA;&#xD;&#xA;Polkadot (SS58):&#xD;&#xA;	15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5&#xD;&#xA;&#xD;&#xA;Kusama (SS58):&#xD;&#xA;	HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F&#xD;&#xA;&#xD;&#xA;Generic Substrate chain (SS58):&#xD;&#xA;	5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I want to know if and how we can change the format of theses addresses on a Generic Substrate chain.&#xD;&#xA;&#xD;&#xA;for example we want the addresses to begin with these three letters: &quot;aml&quot;.&#xD;&#xA;&#xD;&#xA;Is there any way to make that happen on a local blockchain and how?&#xD;&#xA;&#xD;&#xA;Thanks in advance for your help." ContentLicense="CC BY-SA 4.0" />
  <row Id="33075" PostHistoryTypeId="2" PostId="8424" RevisionGUID="a6c6a52d-4e67-4b82-ae10-f095c650a3db" CreationDate="2023-05-09T11:42:32.243" UserId="251" Text="Change it here.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/f0c14f387baba0688afa9422a9bc24068d431716/bin/node-template/runtime/src/lib.rs#L200&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And the letters depend on the ss58 hash algorithm.&#xD;&#xA;&#xD;&#xA;The prefix range is `0 ~ 65535(u16::MAX)`. Maybe some of these numbers will derive the `aml` starting.&#xD;&#xA;&#xD;&#xA;It's impossible to specify the letters manually.&#xD;&#xA;&#xD;&#xA;Good luck!" ContentLicense="CC BY-SA 4.0" />
  <row Id="33077" PostHistoryTypeId="5" PostId="8414" RevisionGUID="527cbd59-a340-4e62-8e63-e7dec23ae33a" CreationDate="2023-05-09T13:00:26.480" UserId="3708" Comment="added 253 characters in body" Text="I'm running a local node using zombienet, I tried to access to XCM Precompile following [this][1] guide but when I instantiate the contract and call assets_reserve_transfer method it does not work. I only have access to the first three precompile addresses.&#xD;&#xA;Is it possible to use it or maybe I have to do something else?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm running Astar this way:&#xD;&#xA;```&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2006&#xD;&#xA;chain = &quot;astar-dev&quot;&#xD;&#xA;add_to_genesis = true&#xD;&#xA;cumulus_based = true&#xD;&#xA;&#xD;&#xA;  [[parachains.collators]]&#xD;&#xA;  name = &quot;collator1&quot;&#xD;&#xA;  ws_port = 9920&#xD;&#xA;  rpc_port = 8920&#xD;&#xA;  command = &quot;./bin/astar-collator&quot;&#xD;&#xA;  args = [ &quot;-l=xcm=trace&quot;, &quot;--enable-evm-rpc&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm trying to do this:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;const wallet = new ethers.Wallet(&#xD;&#xA; pk,&#xD;&#xA; provider&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;const contract = new ethers.Contract(&#xD;&#xA;  &quot;0x0000000000000000000000000000000000005004&quot;,&#xD;&#xA;   xcmAstarAbi,&#xD;&#xA;   wallet&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;contract.assets_reserve_transfer;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I used [this contract][2] for the ABI.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.astar.network/docs/build/EVM/precompiles/&#xD;&#xA;  [2]: https://github.com/AstarNetwork/astar-frame/blob/polkadot-v0.9.39/precompiles/xcm/XCM.sol" ContentLicense="CC BY-SA 4.0" />
  <row Id="33080" PostHistoryTypeId="6" PostId="8397" RevisionGUID="9ca667fa-b50a-4380-a89a-3315944497f9" CreationDate="2023-05-09T14:40:47.097" UserId="3838" Comment="edited tags" Text="|performance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33081" PostHistoryTypeId="2" PostId="8425" RevisionGUID="b5fdedbb-d71a-4b9a-bf88-46e808b1b1c5" CreationDate="2023-05-09T17:20:47.137" UserId="29" Text="Yes you can introduce a new layer or component into Substrate. You need to think at what level you want to do this i.e. on the runtime level, client level, off-chain level. I recommend you start by reading all of [these](https://docs.substrate.io/learn).&#xD;&#xA;&#xD;&#xA;&gt; Could this architecture enable Substrate to be utilized solely for blockchain verification purposes, with the supplementary layer facilitating accelerated request handling by only requesting substrate when changes occur?&#xD;&#xA;&#xD;&#xA;If you can build a nice solution around this, the community would be grateful." ContentLicense="CC BY-SA 4.0" />
  <row Id="33083" PostHistoryTypeId="2" PostId="8426" RevisionGUID="3934c0ee-e5bc-4a33-8a93-d71293bc843a" CreationDate="2023-05-09T21:40:01.477" UserId="83" Text="In your step 1) you say you followed the [add-trusted-node][1] tutorial. In that tutorial the section entitled &quot;View information about node operations&quot; says that _&quot;After you start the local node, information about the operations performed is displayed in the terminal shell. In that terminal, verify that you see output similar to the following&quot;_. In the tutorial the output shows `Listening for new connections on 127.0.0.1:9945.` and it says _&quot;The output specifies the IP address used for the node is the local host 127.0.0.1.&quot;_&#xD;&#xA;&#xD;&#xA;In your step 2) you don't share the start of your node logs, but we could assume that you're listening for connections on a local machine with IP address 127.0.0.1, but it is not clear what the public IP address is of that local machine.&#xD;&#xA;&#xD;&#xA;In your step 3) where you try to connect your first node to the Polkadot.js Apps front-end but cannot establish connection, as shown in your first screenshot, it shows you've tried to connect to IP address **127**.20.94.123 by going to https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.20.94.123%3A9944#/accounts.&#xD;&#xA;&#xD;&#xA;If you're trying to connect to your first node using a web browser  that is also running on the same machine as the first node, then you should be able to connect to it by going to https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/accounts to connect to the local IP address 127.0.0.1.&#xD;&#xA;&#xD;&#xA;Based on the terminal log outputs from your step 4), it looks like your first node was discovered with public IP address **172**.20.94.123, so you should be able to connect to it at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F172.20.94.123%3A9944#/accounts&#xD;&#xA;&#xD;&#xA;In your step 4) you also don't share the start of your node logs and we can't verify what the public IP address is of that second node that is listening for connections, as it might be running on a remote machine. In the logs of your second node it says it `discovered IP address **172**.20.94.123 with /ip4/172.20.94.123/tcp/30333`, which I assume is your first node running on IP address **172**.20.94.123 (not to be confused with **127**.20.94.123).&#xD;&#xA;&#xD;&#xA;**Connect to Polkadot.js Apps:**&#xD;&#xA; &#xD;&#xA;It's likely the reason why you can't connect the first node to the Polkadot.js Apps front-end in your step 3) is because you've accidentally used the wrong first byte in the IP address. If your first node is running on IP address **172**.20.94.123, then you should be able to connect to it at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F172.20.94.123%3A9944#/accounts, or at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/accounts if you're connecting to it using a web browser running on the same local machine as the first node. But instead it appears you may have entered the wrong first byte for your IP address and tried to connect with unsuccessfully with **127**.20.94.123 instead.&#xD;&#xA;&#xD;&#xA;**Connect to Substrate-front-end-template:**&#xD;&#xA;&#xD;&#xA;If your first node is running on public IP address **172**.20.94.123 on you're running the [substrate-front-end-template][2] on a different machine then to connect to it you would need to change the default `PROVIDER_SOCKET` value [here][3] to `&quot;ws://172.20.94.123:9944&quot;` and open the relevant ports, but if they are both running on the same machine then its default value of `&quot;ws://127.0.0.1:9944&quot;` should work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-front-end-template/blob/main/src/config/development.json#L2" ContentLicense="CC BY-SA 4.0" />
  <row Id="33085" PostHistoryTypeId="5" PostId="8426" RevisionGUID="2351c4f8-4aea-4310-b499-9770dd0887ef" CreationDate="2023-05-09T21:59:23.927" UserId="83" Comment="more info" Text="In your step 1) you say you followed the [add-trusted-node][1] tutorial. In that tutorial the section entitled &quot;View information about node operations&quot; says that _&quot;After you start the local node, information about the operations performed is displayed in the terminal shell. In that terminal, verify that you see output similar to the following&quot;_. In the tutorial the output shows `Listening for new connections on 127.0.0.1:9945.` and it says _&quot;The output specifies the IP address used for the node is the local host 127.0.0.1.&quot;_&#xD;&#xA;&#xD;&#xA;In your step 2) you don't share the start of your node logs, but we could assume that you're listening for connections on a local machine with IP address 127.0.0.1, but it is not clear what its Node ID is or what the public IP address is of that local machine.&#xD;&#xA;&#xD;&#xA;In your step 3) where you try to connect your first node to the Polkadot.js Apps front-end but cannot establish connection, as shown in your first screenshot, it shows you've tried to connect to IP address **127**.20.94.123 by going to https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.20.94.123%3A9944#/accounts.&#xD;&#xA;&#xD;&#xA;If you're trying to connect to your first node using a web browser  that is also running on the same machine as the first node, then you should be able to connect to it by going to https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/accounts to connect to the local IP address 127.0.0.1.&#xD;&#xA;&#xD;&#xA;Based on the terminal log outputs from your step 4), it looks like your first node was discovered with public IP address **172**.20.94.123, so you should be able to connect to it at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F172.20.94.123%3A9944#/accounts, but if the first node is running on a remote machine then you may need to check &#xD;&#xA; that you started that first node with additional flags to allow remote connections such as `--ws-external --rpc-external --rpc-cors=all` (as @AmitKumarYadav mentioned in the comments), which you may find by running `node-template --help` as mentioned [here][2].&#xD;&#xA;&#xD;&#xA;In your step 4) you also don't share the start of your node logs and we can't verify what the public IP address is of that second node that is listening for connections, as it might be running on a remote machine. In the logs of your second node it says it `discovered IP address **172**.20.94.123 with /ip4/172.20.94.123/tcp/30333`, which I assume is your first node running on IP address **172**.20.94.123 (not to be confused with **127**.20.94.123).&#xD;&#xA;&#xD;&#xA;When you started the second node did you specify the first node as a bootnode? For example, if the first node was running on local machine with IP address 127.0.0.1 and the second node was running on the same machine you'd use `--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH`, but if they were running on different machines then you'd specify the public IP address of the first node, which I assume is **172**.20.94.123, so `--bootnodes /ip4/172.20.94.123/tcp/30333/p2p/12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH`.&#xD;&#xA;&#xD;&#xA;**Connect to Polkadot.js Apps:**&#xD;&#xA; &#xD;&#xA;It's likely the reason why you can't connect the first node to the Polkadot.js Apps front-end in your step 3) is because you've accidentally used the wrong first byte in the IP address. If your first node is running on IP address **172**.20.94.123, then you should be able to connect to it at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F172.20.94.123%3A9944#/accounts, or at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/accounts if you're connecting to it using a web browser running on the same local machine as the first node. But instead it appears you may have entered the wrong first byte for your IP address and tried to connect with unsuccessfully with **127**.20.94.123 instead.&#xD;&#xA;&#xD;&#xA;**Connect to Substrate-front-end-template:**&#xD;&#xA;&#xD;&#xA;If your first node is running on public IP address **172**.20.94.123 and you're running the [substrate-front-end-template][3] on a different machine then to connect to it you would need to change the default `PROVIDER_SOCKET` value [here][4] to `&quot;ws://172.20.94.123:9944&quot;` and open the relevant ports, but if they are both running on the same machine then its default value of `&quot;ws://127.0.0.1:9944&quot;` should work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/&#xD;&#xA;  [2]: https://docs.substrate.io/reference/command-line-tools/node-template/&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/substrate-front-end-template/blob/main/src/config/development.json#L2" ContentLicense="CC BY-SA 4.0" />
  <row Id="33086" PostHistoryTypeId="5" PostId="8426" RevisionGUID="a67055c8-0137-4f0c-a342-cf7099848a51" CreationDate="2023-05-09T22:29:01.883" UserId="83" Comment="more info and show they need to use port 9945 " Text="In your step 1) you say you followed the [add-trusted-node][1] tutorial. In that tutorial the section entitled &quot;View information about node operations&quot; says that _&quot;After you start the local node, information about the operations performed is displayed in the terminal shell. In that terminal, verify that you see output similar to the following&quot;_. In the tutorial the output shows `Listening for new connections on 127.0.0.1:9945.` and it says _&quot;The output specifies the IP address used for the node is the local host 127.0.0.1.&quot;_&#xD;&#xA;&#xD;&#xA;&gt; Important Note: Usually for the first node you could just use the default Web Sockets (WS) port, which is `9944`, but for some reason in that tutorial in the &quot;Start first node&quot; section they unnecessarily decided to specify a custom Web Sockets port of `9945`.&#xD;&#xA;&#xD;&#xA;In your step 2) you don't share the start of your node logs so we can't verify whether you followed the tutorial precisely, but we could assume that you're listening for connections on a local machine with IP address 127.0.0.1, but it is not clear what its Node ID is (which you'd specify to connect other nodes to it as a bootnode) or what the public IP address is of that local machine.&#xD;&#xA;&#xD;&#xA;In your step 3) where you try to connect your first node to the Polkadot.js Apps front-end but cannot establish connection, as shown in your first screenshot, it shows you've tried to connect to IP address **127**.20.94.123 by going to https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.20.94.123%3A9944#/accounts, but if you were following that tutorial then the first node would be listening on WS port `9945` instead of `9944`, so if your IP address was really **127**.20.94.123, then you should be connecting to it at  https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.20.94.123%3A9945#/accounts&#xD;&#xA;&#xD;&#xA;If you're trying to connect to your first node using a web browser that is also running on the same machine as the first node, then you should be able to connect to it by going to https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9945#/accounts to connect to the local IP address 127.0.0.1 on WS port `9945`.&#xD;&#xA;&#xD;&#xA;Based on the terminal log outputs from your step 4), it looks like your first node was discovered with public IP address **172**.20.94.123, so you should be able to connect to it at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F172.20.94.123%3A9945#/accounts (assuming you started the first node with `--ws-port 9945`), but if the first node is running on a remote machine then you may need to check &#xD;&#xA; that you started that first node with additional flags to allow remote connections such as `--ws-external --rpc-external --rpc-cors=all` (as @AmitKumarYadav mentioned in the comments), which you may find by running `node-template --help` as mentioned [here][2].  &#xD;&#xA;&#xD;&#xA;In your step 4) you also don't share the command you used the start of your node logs so we can't verify whether you followed the tutorial precisely or what the public IP address is of that second node that is listening for connections, as it might be running on a remote machine. In the logs of your second node it says it `discovered IP address **172**.20.94.123 with /ip4/172.20.94.123/tcp/30333`, which I assume is your first node running on IP address **172**.20.94.123 (not to be confused with **127**.20.94.123). The first node uses port 30333 by default, or you may have followed the tutorial and specified it explicitly with `--port 30333`.&#xD;&#xA;&#xD;&#xA;When you started the second node did you specify the first node as a bootnode? For example, if the first node was running on local machine with IP address 127.0.0.1 and the second node was running on the same machine you'd use `--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH`, where `30333` corresponds to the first node being started using CLI option `--port 30333` and the `12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH` is the Node ID value that is shown in the logs when you started your first node, but if they were running on different machines then you'd specify the public IP address of the first node, which I assume is **172**.20.94.123, so `--bootnodes /ip4/172.20.94.123/tcp/30333/p2p/12D3KooWSY3YykHtFbyYsMZGgrpYnupVFwstz6GnGQ21wUJH3BUH`, and you'd need to ensure that the remote machine had ports that it uses like 30333 open.&#xD;&#xA;&#xD;&#xA;**Connect to Polkadot.js Apps:**&#xD;&#xA; &#xD;&#xA;It's likely the reason why you can't connect the first node to the Polkadot.js Apps front-end in your step 3) is because you've accidentally used the wrong first byte in the IP address. If your first node is running on IP address **172**.20.94.123, then you should be able to connect to it at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F172.20.94.123%3A9945#/accounts (assuming you started the first node with `--ws-port 9945`), or at https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9945#/accounts (assuming you started the first node with `--ws-port 9945`) if you're connecting to it using a web browser running on the same local machine as the first node. But instead it appears you may have entered the wrong first byte for your IP address and tried to connect with unsuccessfully with **127**.20.94.123 instead.&#xD;&#xA;&#xD;&#xA;**Connect to Substrate-front-end-template:**&#xD;&#xA;&#xD;&#xA;If your first node is running on public IP address **172**.20.94.123 and you're running the [substrate-front-end-template][3] on a different machine then to connect to it you would need to change the default `PROVIDER_SOCKET` value [here][4] to `&quot;ws://172.20.94.123:9945&quot;` (assuming you started the first node with `--ws-port 9945`) and open the relevant ports.&#xD;&#xA;&#xD;&#xA;If they are both running on the same machine then even the default value `&quot;ws://127.0.0.1:9944&quot;` used by the [substrate-front-end-template][3] will not work, because assuming you followed the [add-trusted-node][1] tutorial you would have started the first node with `--ws-port 9945` and you would have specified `--ws-port 9946` as the exposed WS port of the second node, so none of the nodes would be running on the default WS port of `9944` that is usually used by Substrate nodes, so you'd need to change it to a custom value of `&quot;ws://127.0.0.1:9945&quot;`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/&#xD;&#xA;  [2]: https://docs.substrate.io/reference/command-line-tools/node-template/&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/substrate-front-end-template/blob/main/src/config/development.json#L2" ContentLicense="CC BY-SA 4.0" />
  <row Id="33087" PostHistoryTypeId="5" PostId="8416" RevisionGUID="47b01c93-a3c0-4b13-bbd4-ff017ae64b1a" CreationDate="2023-05-09T23:26:32.490" UserId="494" Comment="deleted 4 characters in body" Text="I used to ask myself similar questions.&#xD;&#xA;&#xD;&#xA;Not long ago I wrote [a pallet](https://github.com/SubstrateChess/pallet-chess) that was loosely coupled with `pallet-assets`. Then, we integrated it into [GMorDie](https://www.gmordie.com/), which uses an [ORML approach](https://github.com/SubstrateChess/pallet-chess/tree/gmordie) instead. This experience allowed me to clarify my mental model a bit.&#xD;&#xA;&#xD;&#xA;So this answer is based on my experience with both paths, which is somewhat limited so it is not 100% comprehensive.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;Say you want to build some interface where the native asset (via `pallet-balances`) exposes the same APIs as the other fungible assets in your runtime (via `orml-tokens`). &#xD;&#xA;&#xD;&#xA;You'd give the native asset something like `CurrencyId = 0`, while the other fungible assets would map to the remaining `CurrencyId` values. (In practice, you'd actually achieve this with an `enum).&#xD;&#xA;&#xD;&#xA;So whenever you're doing stuff like checking some asset's minimum balance or doing a reserve deposit, you can use an unified API (provided by the `MultiCurrency` trait), instead of relying on some complex matching logic that gets re-routed to different pallets (which would have been the case with `pallet-balances` + `pallet-assets`).&#xD;&#xA;&#xD;&#xA;[GMorDie's runtime source code](https://github.com/GMorDIE/gm-chain/blob/main/runtime/src/lib.rs) is actually a good resource to assimilate these concepts.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I know the `BasicCurrencyExtended` and `MultiCurrencyExtended` traits also provide some extra functionality (when compared to vanilla FRAME) but my experience with them is somewhat limited, so I'll allow someone else to expand on those. &#xD;&#xA;&#xD;&#xA;Same goes for `orml-xtokens`. I know it's XCM related but I wouldn't be able to provide more detailed insights." ContentLicense="CC BY-SA 4.0" />
  <row Id="33088" PostHistoryTypeId="4" PostId="8377" RevisionGUID="f71696ad-1ace-4dad-a8c9-a88a23b2827b" CreationDate="2023-05-10T01:05:07.100" UserId="29" Comment="edited title" Text="Cannot connect to PJS Apps or Substrate front-end template with a custom endpoint" ContentLicense="CC BY-SA 4.0" />
  <row Id="33089" PostHistoryTypeId="6" PostId="8397" RevisionGUID="6b5fbe5b-9d5a-4df4-9a86-848d26f0b0cc" CreationDate="2023-05-10T01:05:59.817" UserId="29" Comment="edited tags" Text="|performance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33094" PostHistoryTypeId="2" PostId="8428" RevisionGUID="87c386b6-672c-4dc6-9734-47e83deceb88" CreationDate="2023-05-10T02:50:10.180" UserId="1786" Text="So i was able to get your code built. I would ensure you are using the correct version of `node` as the error you are posting comes from node-js itself. &#xD;&#xA;&#xD;&#xA;Ensure you are using version `18.15` or higher as declared in the `engine` field in the package.json. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33096" PostHistoryTypeId="5" PostId="4174" RevisionGUID="7565acd6-046c-4098-b71b-b1586219854e" CreationDate="2023-05-10T03:01:21.523" UserId="251" Comment="added 2 characters in body" Text="I am attempting to implement a custom pallet, but I keep running into this compile error:&#xD;&#xA;```rs&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /Users/jackson/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:235:9&#xD;&#xA;      |&#xD;&#xA;  235 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  236 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  237 | |                         For more information see: \&#xD;&#xA;  238 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /Users/jackson/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:262:5&#xD;&#xA;      |&#xD;&#xA;  262 |     imp::getrandom_inner(dest)&#xD;&#xA;      |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;```&#xD;&#xA;I have found a few other posts related to this but I haven't found an answer with a connection to the pallets. If I omit the custom pallet, then everything builds fine. Has anyone seen this issue before?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33097" PostHistoryTypeId="2" PostId="8429" RevisionGUID="00e36839-71d6-4a36-aa05-82856bc5f4ae" CreationDate="2023-05-10T04:00:40.420" UserId="359" Text="&gt; Is using orml-tokens required to use all the other orml features like x-tokens?&#xD;&#xA;&#xD;&#xA;No. Every ORML pallets are designed to be modularized. You can use whatever pallet combination you want.&#xD;&#xA;&#xD;&#xA;&gt; It would be nice to have an in-depth explanation of the difference between the 2, and when a parachain should choose one over the other.&#xD;&#xA;&#xD;&#xA;If you check the (not yet existent) feature list of orml-tokens and pallet-assets, it (hopefully) should be obvious that the difference of those pallets.&#xD;&#xA;&#xD;&#xA;orml-tokens implements the minimal amount of code to deal with tokens. If you know Solidity, think it as the basic OpenZepplin ERC20 template and that's it. The expectation is that you build additional features on top of it, in a different pallet (one example is orml-currencies, which I will get into it later). This is the general design philosophy for ORML: extensible and reusable pallets.&#xD;&#xA;&#xD;&#xA;pallet-assets implements lot more feature including token registration, mint, burn, freeze, etc. If you need those features, great, you can use them. If you don't need those features, well, you need to spend extra work to disable them and the extra code will just make your runtime wasm larger.&#xD;&#xA;&#xD;&#xA;So basically, if you need the extra features from pallet-assets, use pallet-assets. If you don't, use orml-tokens. Or for example, if the permission system of the pallet-assets doesn't really fit your requirements, then you can implement a new permission system on another pallet and use orml-tokens to handle tokens. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;orml-tokens / pallet-assets handles tokens which is great. But a lot of time people still want to use pallet-balances for native token. It is possible to not do so, but because tooling, life could be easier if native token is implemented with pallet-balances.&#xD;&#xA;&#xD;&#xA;But then we also really want to avoid picking pallet based on the token type. Native token is pallet-balances and other token is orml-tokens / pallet-assets? orml-currencies exists to provide an unified way to handle tokens no matter the type. In fact, if you check its implementation, it is just if native token use this else use that. So that the user of orml-currencies does not need to write those if else all over the places. &#xD;&#xA;&#xD;&#xA;I have this workshop that could also be useful. It is using a old Substrate version but the idea remains the same https://github.com/xlc/orml-workshop/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33101" PostHistoryTypeId="2" PostId="8431" RevisionGUID="e8743efe-d590-45cb-b311-4df85eaffcba" CreationDate="2023-05-10T06:12:50.440" UserId="2372" Text="I was making a function to store the some data in the pallet. &#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn number)]&#xD;&#xA;	// Learn more about declaring storage items:&#xD;&#xA;	// https://docs.substrate.io/main-docs/build/runtime-storage/#declaring-storage-items&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    pub type Number&lt;T&gt; = StorageMap&lt;_, Blake2_128Concat,u32,Vec&lt;u8&gt;,ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;    		pub fn store_data(origin: OriginFor&lt;T&gt;, number: u32, data: Vec&lt;u8&gt;) -&gt; DispatchResult {&#xD;&#xA;    			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;    			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;    			// https://docs.substrate.io/main-docs/build/origins/&#xD;&#xA;    			let who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Update storage.&#xD;&#xA;    			&lt;Number&lt;T&gt;&gt;::insert(number,data.clone());&#xD;&#xA;    &#xD;&#xA;    			// Emit an event.&#xD;&#xA;    			Self::deposit_event(Event::SomethingStored ( who.clone(),number.clone(),data.clone() ));&#xD;&#xA;    			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And i was making a function in which i want to print the current existing data of the particular storage. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    	#[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;		pub fn show_data(origin: OriginFor&lt;T&gt;,number: u32, data: Vec&lt;u8&gt; ) -&gt; DispatchResult {&#xD;&#xA;			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;			let who = ensure_signed(origin)?;&#xD;&#xA;		&#xD;&#xA;			// Update storage.&#xD;&#xA;			 &lt;Number&lt;T&gt;&gt;::get(number);&#xD;&#xA;			&lt;Number&lt;T&gt;&gt;::get(data.clone());&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;			// Emit an event.&#xD;&#xA;			Self::deposit_event(Event::Data(who.clone(),number.clone(),data.clone()));&#xD;&#xA;		&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the number(u32) is working fine. But in the get(Vec&lt;u8&gt;) is showing &#xD;&#xA;the trait `EncodeLike&lt;u32&gt;` is not implemented for `Vec&lt;u8&gt;`&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33103" PostHistoryTypeId="1" PostId="8431" RevisionGUID="e8743efe-d590-45cb-b311-4df85eaffcba" CreationDate="2023-05-10T06:12:50.440" UserId="2372" Text="the trait bound `Vec&lt;u8&gt;: EncodeLike&lt;u32&gt;` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="33104" PostHistoryTypeId="3" PostId="8431" RevisionGUID="e8743efe-d590-45cb-b311-4df85eaffcba" CreationDate="2023-05-10T06:12:50.440" UserId="2372" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33105" PostHistoryTypeId="2" PostId="8432" RevisionGUID="78899b8d-2381-4b66-941b-495faac06b1e" CreationDate="2023-05-10T06:31:01.730" UserId="4019" Text="Hello Substrate community!&#xD;&#xA;&#xD;&#xA;         If you have been following the tutorial on building a local blockchain using Substrate, you may have noticed that your address is hard-coded in a JSON file. To replace your address with my address, you can refer to the Substrate documentation on building a local blockchain: &#xD;&#xA;[https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/][1]&#xD;&#xA;&#xD;&#xA;Please let me know if you have any other suggestions or if you need further assistance.&#xD;&#xA;&#xD;&#xA;Thank you in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33107" PostHistoryTypeId="1" PostId="8432" RevisionGUID="78899b8d-2381-4b66-941b-495faac06b1e" CreationDate="2023-05-10T06:31:01.730" UserId="4019" Text="Replacing Endowed Account Address in a Local Substrate Blockchain: A Tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="33108" PostHistoryTypeId="3" PostId="8432" RevisionGUID="78899b8d-2381-4b66-941b-495faac06b1e" CreationDate="2023-05-10T06:31:01.730" UserId="4019" Text="|substrate-node-template|substrate-contracts-node|local|dev|dev-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33113" PostHistoryTypeId="2" PostId="8435" RevisionGUID="a711e55c-ceb5-4c9e-9420-d634af172c97" CreationDate="2023-05-10T06:58:11.027" UserId="2762" Text="The StorageValue `Number` is a data structure similar to traditional hash maps with key-to-value mapping (See the [docs][1]).&#xD;&#xA;&#xD;&#xA;The method `get` loads the value associated with the given key from the map.&#xD;&#xA;&#xD;&#xA;    fn get&lt;KeyArg: EncodeLike&lt;K&gt;&gt;(key: KeyArg) -&gt; Self::Query&#xD;&#xA;&#xD;&#xA;And the insert stores a value to be associated with the given key from the map:&#xD;&#xA;&#xD;&#xA;    fn insert&lt;KeyArg: EncodeLike&lt;K&gt;, ValArg: EncodeLike&lt;V&gt;&gt;(key: KeyArg, val: ValArg)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Therefore in your case it makes sense to retrieve the value from the number, because you are storing number as a key:&#xD;&#xA;&#xD;&#xA;    &lt;Number&lt;T&gt;&gt;::insert(number,data.clone());&#xD;&#xA;    let data_from_storage = &lt;Number&lt;T&gt;&gt;::get(number);&#xD;&#xA;&#xD;&#xA;But you can not do it the other way around (retrieve the key from the data)&#xD;&#xA;&#xD;&#xA;        &lt;Number&lt;T&gt;&gt;::get(data.clone());&#xD;&#xA;&#xD;&#xA;This will work in case you want to use the Vec as a Key and the number as a Value (But not sure if it makes sense):&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn number)]&#xD;&#xA;	pub type Number&lt;T&gt; = StorageMap&lt;_, Blake2_128Concat,Vec&lt;u8&gt;, u32, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;Then use Vec as a key:&#xD;&#xA;&#xD;&#xA;    &lt;Number&lt;T&gt;&gt;::insert(data.clone(), number);&#xD;&#xA;And you can retrieve the number:&#xD;&#xA;&#xD;&#xA;    let number_from_storage = &lt;Number&lt;T&gt;&gt;::get(data.clone());&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/storage/trait.StorageMap.html#required-methods" ContentLicense="CC BY-SA 4.0" />
  <row Id="33115" PostHistoryTypeId="5" PostId="8432" RevisionGUID="946def2d-a12a-4ee7-9952-4d2c82a04f53" CreationDate="2023-05-10T06:59:39.923" UserId="2762" Comment="improved formatting" Text="Hello Substrate community!&#xD;&#xA;&#xD;&#xA;If you have been following the tutorial on building a local blockchain using Substrate, you may have noticed that your address is hard-coded in a JSON file. &#xD;&#xA;&#xD;&#xA;To replace your address with my address, you can refer to the Substrate documentation on building a local blockchain: &#xD;&#xA;[https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/][1]&#xD;&#xA;&#xD;&#xA;Please let me know if you have any other suggestions or if you need further assistance.&#xD;&#xA;&#xD;&#xA;Thank you in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33116" PostHistoryTypeId="2" PostId="8436" RevisionGUID="b0e1480d-3d2d-460f-8ddf-3f4e65459661" CreationDate="2023-05-10T07:19:21.647" UserId="125" Text="&#xD;&#xA;I know there is a maximum PoV block size limit for the parachain, it's now 5M. Is there a way to query the historical blocks PoV block size, via Polkadot Apps, the third party tool or the way to write one?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33118" PostHistoryTypeId="1" PostId="8436" RevisionGUID="b0e1480d-3d2d-460f-8ddf-3f4e65459661" CreationDate="2023-05-10T07:19:21.647" UserId="125" Text="Is there a way to find the historic parachain block PoV size?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33119" PostHistoryTypeId="3" PostId="8436" RevisionGUID="b0e1480d-3d2d-460f-8ddf-3f4e65459661" CreationDate="2023-05-10T07:19:21.647" UserId="125" Text="|pov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33120" PostHistoryTypeId="2" PostId="8437" RevisionGUID="112054c5-ce7e-4500-89cc-56221c543569" CreationDate="2023-05-10T08:40:14.107" UserId="529" Text="When you look at the definition of `openbrush::traits::String` you can see that OB String is actually a vector `Vec&lt;u8&gt;`&#xD;&#xA;```rust&#xD;&#xA;pub struct String {&#xD;&#xA;    vec: Vec&lt;u8&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;One way to have both types of strings used is to use aliases:&#xD;&#xA;```rust&#xD;&#xA;use ink::prelude::string::{String as PreludeString};&#xD;&#xA;use openbrush::traits::String;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Depending on your needs you can use either of them or both. I find using `from` to be more convenient  than `to_string()`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// ink::prelude's String&#xD;&#xA;let s = PreludeString::from(res_str)&#xD;&#xA;&#xD;&#xA;// OB version &#xD;&#xA;let s = String::from(res_str)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33122" PostHistoryTypeId="50" PostId="7990" RevisionGUID="859251b0-d644-423e-9a0f-c2c51f0505e7" CreationDate="2023-05-10T09:04:30.543" UserId="-1" />
  <row Id="33123" PostHistoryTypeId="2" PostId="8438" RevisionGUID="4c0bf439-8e02-4a31-9f0d-75f7675cb75f" CreationDate="2023-05-10T09:14:50.130" UserId="2762" Text="I suggest you keep going with the tutorials, in this one [Add trusted nodes][1] you will see how to generate your own accounts with the tool [SubKey][4]&#xD;&#xA;and how to start the node.&#xD;&#xA;&#xD;&#xA;To customize the endowed accounts balances when start your chain you specify this in the `chain_spec.rs`. The chain specification is a source code file that defines a Substrate chain's initial (genesis) state.&#xD;&#xA;&#xD;&#xA;Here you can [see an example][2] of the node-template that the tutorial uses.&#xD;&#xA;&#xD;&#xA;See this previous StackExchange answer that explains how to do this in detail: [How to overwrite endowed account balances using additional accounts and balances][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs#L57&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/303/2762&#xD;&#xA;  [4]: https://docs.substrate.io/reference/command-line-tools/subkey/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33125" PostHistoryTypeId="2" PostId="8439" RevisionGUID="d38ba85a-fc7d-4d92-96e3-131bca372790" CreationDate="2023-05-10T09:22:41.007" UserId="2372" Text="The swap-token and dispatch functionality of the Parity Bridges project was disabled because they were not deemed necessary or actively being used by users. The developers of the project decided to focus on improving other aspects of the project that were more important and relevant to the needs of users.&#xD;&#xA;&#xD;&#xA;Additionally, the swap-token and dispatch functionality involved security risks and required significant resources to maintain, which further contributed to the decision to disable them.&#xD;&#xA;&#xD;&#xA;However, it is worth noting that the Parity Bridges project is open source, so anyone can fork the project and implement the swap-token and dispatch functionality if they wish to do so." ContentLicense="CC BY-SA 4.0" />
  <row Id="33127" PostHistoryTypeId="2" PostId="8440" RevisionGUID="7ecdc6a1-d64a-40e2-9f95-82d80854c344" CreationDate="2023-05-10T09:30:56.773" UserId="4203" Text="I’m trying to figure out differences between system pallets and modules. It’s not quite clear to me whether a system pallets can define a RPC interface or not. I’ve looked at https://github.com/pontem-network/pontem/tree/91f3b122e0d7b14ef1520f281c1e86d959c721d0/pallets/sp-mvm and indeed there is a ‘rpc’ directory but it’s not referenced from sp-mvm sources.&#xD;&#xA;On the other hand, I found this https://stackoverflow.com/questions/71734501/error-adding-custom-rpcs-for-custom-pallet-substrate and this https://hackmd.io/@d9WGfolYQmSRBmnxyOQmAg/BkEANECJs so it seems like defining RPC interface is definitely possible. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33129" PostHistoryTypeId="1" PostId="8440" RevisionGUID="7ecdc6a1-d64a-40e2-9f95-82d80854c344" CreationDate="2023-05-10T09:30:56.773" UserId="4203" Text="Can system pallets define RPC calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33130" PostHistoryTypeId="3" PostId="8440" RevisionGUID="7ecdc6a1-d64a-40e2-9f95-82d80854c344" CreationDate="2023-05-10T09:30:56.773" UserId="4203" Text="|pallet|modules|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33131" PostHistoryTypeId="2" PostId="8441" RevisionGUID="af255aec-ab6a-4f3c-833d-0f206925ae6e" CreationDate="2023-05-10T11:32:29.367" UserId="4098" Text="Could Polkadot experts execute the code below and advise me on the questions, please?&#xD;&#xA;&#xD;&#xA;You just need to replace the code by your own Westend accounts and nonce.&#xD;&#xA;```&#xD;&#xA;  import { construct, getRegistry, methods, deriveAddress } from &quot;@substrate/txwrapper-polkadot&quot;;&#xD;&#xA;  import { signatureVerify,  cryptoWaitReady } from '@polkadot/util-crypto';&#xD;&#xA;  import { Keyring } from '@polkadot/api';&#xD;&#xA;  import { EXTRINSIC_VERSION } from '@polkadot/types/extrinsic/v4/Extrinsic'&#xD;&#xA;&#xD;&#xA;await cryptoWaitReady();&#xD;&#xA;&#xD;&#xA;console.debug('build Keyring')&#xD;&#xA;const drhan_keyring = new Keyring({ type: &quot;sr25519&quot;}); &#xD;&#xA;&#xD;&#xA;console.debug('Some mnemonic phrase, Add an account, straight mnemonic')&#xD;&#xA;const drhan_substrateKeypair = drhan_keyring.addFromUri('world dutch flash motor outdoor major axis gloom rice pledge true suit'); &#xD;&#xA;&#xD;&#xA;console.debug(`publicKey: ${drhan_substrateKeypair.publicKey}`);&#xD;&#xA;&#xD;&#xA;console.debug('derive account address');&#xD;&#xA;const drhan_address = deriveAddress(drhan_substrateKeypair.publicKey, 42);&#xD;&#xA;console.debug(`address: ${drhan_address}`);&#xD;&#xA;&#xD;&#xA;const dest = &quot;5Da4PC8yrDnr2RcKFLFWyuZ9XNei5mPYdAvyn5aUpBGV5Ydk&quot;;&#xD;&#xA;const value = 1000000000;&#xD;&#xA;const nonce = &quot;34&quot;;&#xD;&#xA;&#xD;&#xA;console.debug('Get the meta information of the target substrate node');&#xD;&#xA;const { block } = await rpcToNode('chain_getBlock');&#xD;&#xA;const blockHash = await rpcToNode('chain_getBlockHash');&#xD;&#xA;const genesisHash = await rpcToNode('chain_getBlockHash', [0]);&#xD;&#xA;const metadataRpc = await rpcToNode('state_getMetadata');&#xD;&#xA;const { specVersion, transactionVersion, specName } = await rpcToNode('state_getRuntimeVersion');&#xD;&#xA;&#xD;&#xA;console.debug('build the registry of the target substrate node');&#xD;&#xA;const registry = getRegistry({&#xD;&#xA;    chainName: 'Polkadot',&#xD;&#xA;    specName,&#xD;&#xA;    specVersion,&#xD;&#xA;    metadataRpc&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;console.debug(&quot;create our `balances.transferKeepAlive` unsigned tx&quot;);&#xD;&#xA;const unsigned = methods.balances.transferKeepAlive(&#xD;&#xA;    {&#xD;&#xA;        value,&#xD;&#xA;        dest,&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;        address: drhan_address,&#xD;&#xA;        blockHash,&#xD;&#xA;        blockNumber: parseInt(block.header.number, 16),&#xD;&#xA;        eraPeriod: 50,&#xD;&#xA;        genesisHash,&#xD;&#xA;        metadataRpc,&#xD;&#xA;        nonce: parseInt(nonce),&#xD;&#xA;        specVersion,&#xD;&#xA;        tip: 0,&#xD;&#xA;        transactionVersion,&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry,&#xD;&#xA;    }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;console.debug(&quot;Construct the signing payload from an unsigned transaction&quot;);&#xD;&#xA;const signingPayload = construct.signingPayload(unsigned, { registry });&#xD;&#xA;&#xD;&#xA;console.debug(`signingPayload: ${signingPayload}`);&#xD;&#xA;&#xD;&#xA;console.debug(&quot;Construct signature&quot;);&#xD;&#xA;const { signature } = registry.createType('ExtrinsicPayload', signingPayload, {&#xD;&#xA;    version: EXTRINSIC_VERSION&#xD;&#xA;}).sign(drhan_substrateKeypair);&#xD;&#xA;&#xD;&#xA;console.debug(`signature: ${signature}`);&#xD;&#xA;&#xD;&#xA;console.debug(&quot;Construct the signed transaction&quot;);&#xD;&#xA;const signedTransaction = construct.signedTx(unsigned, signature, {&#xD;&#xA;    metadataRpc,&#xD;&#xA;    registry&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;console.debug(&quot;Derive the transaction hash of the signed transaction&quot;);&#xD;&#xA;const hashSignedTx = construct.txHash(signedTransaction);&#xD;&#xA;&#xD;&#xA;console.debug('check validity of signature');&#xD;&#xA;const validity = signatureVerify(signingPayload, signature, drhan_address).isValid;&#xD;&#xA;&#xD;&#xA;const response = {&#xD;&#xA;    &quot;signed_tx_payload&quot;: signedTransaction,&#xD;&#xA;    &quot;signed_tx_hash&quot;: hashSignedTx,&#xD;&#xA;    &quot;signatureVerify - valid?&quot; : validity&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;export function rpcToNode(&#xD;&#xA;     method: string,&#xD;&#xA;     params: any[] = []&#xD;&#xA; ): Promise&lt;any&gt; {&#xD;&#xA;     return fetch('https://westend-rpc.polkadot.io:443', {&#xD;&#xA;         body: JSON.stringify({&#xD;&#xA;             id: 1,&#xD;&#xA;             jsonrpc: '2.0',&#xD;&#xA;             method,&#xD;&#xA;             params,&#xD;&#xA;         }),&#xD;&#xA;         headers: {&#xD;&#xA;             'Content-Type': 'application/json',&#xD;&#xA;             connection: 'keep-alive',&#xD;&#xA;         },&#xD;&#xA;         method: 'POST',&#xD;&#xA;     })&#xD;&#xA;         .then((response) =&gt; response.json())&#xD;&#xA;         .then(({ error, result }) =&gt; {&#xD;&#xA;             if (error) {&#xD;&#xA;                 throw new Error(&#xD;&#xA;                     `${error.code} ${error.message}: ${JSON.stringify(error.data)}`&#xD;&#xA;                 );&#xD;&#xA;             }&#xD;&#xA; &#xD;&#xA;             return result;&#xD;&#xA;         });&#xD;&#xA; }&#xD;&#xA;```&#xD;&#xA;Then, I have got the result as below, for example&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;signed_tx_payload&quot;: &quot;0x39028400d6a55ba606625132346da20a84918fd03fc063e78beb65a708763ce212aba51e012ace240b88ccfda390bbef5547bf7bd353d77235c1055e0e58905f944b84343b63fe35ca27170fbf69596ddc4f941f6b4be25ea4cf07932591ef3512bc10828b65018800040300429f72a2498b5abaa44433210c5a5dc2d7b29946d0db1884101817871571f16302286bee&quot;,&#xD;&#xA;  &quot;signed_tx_hash&quot;: &quot;0xfbf53347d8a80dc3444bcc5527c5e0795426ac5bf26978c236a41f920143bf4c&quot;,&#xD;&#xA;  &quot;signatureVerify - valid?&quot;: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Then, I have submitted **signed_tx_payload** to Westend tesetnet as below&#xD;&#xA;```&#xD;&#xA;    const wsProvider = new WsProvider('wss://westend-rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    &#xD;&#xA;    const signed_tx_payload = &quot;0x39028400d6a55ba606625132346da20a84918fd03fc063e78beb65a708763ce212aba51e012ace240b88ccfda390bbef5547bf7bd353d77235c1055e0e58905f944b84343b63fe35ca27170fbf69596ddc4f941f6b4be25ea4cf07932591ef3512bc10828b65018800040300429f72a2498b5abaa44433210c5a5dc2d7b29946d0db1884101817871571f16302286bee&quot;;&#xD;&#xA;    &#xD;&#xA;    const parsedTransaction = api.tx(signed_tx_payload);&#xD;&#xA;    const TxHash = await api.rpc.author.submitExtrinsic(parsedTransaction);&#xD;&#xA;    console.log(`tx hash: ${TxHash.toString()}`);&#xD;&#xA;```&#xD;&#xA;Then the message has been returned from Westend&#xD;&#xA;```&#xD;&#xA;2023-05-10 11:29:29        API/INIT: RPC methods not decorated: mmr_root, mmr_verifyProof, mmr_verifyProofStateless&#xD;&#xA;2023-05-10 11:29:29        API/INIT: westend/9420: Not decorating runtime apis without matching versions: ParachainHost/4 (1/2/3 known), TransactionPaymentApi/4 (1/2/3 known)&#xD;&#xA;tx hash: 0xfbf53347d8a80dc3444bcc5527c5e0795426ac5bf26978c236a41f920143bf4c&#xD;&#xA;```&#xD;&#xA;I thought that the signed transaction offline was successfully accepted to Westend testnet because I got the same hash of the transantion from Westend. But I have several questions below:&#xD;&#xA;&#xD;&#xA;1. Although this extrinsic was accepted to Westend testnet, it have not been commited to a block as I can't confirm it on westend.subscan.io and the nonce has not been increased. Why this extrinsic has not been commited although I got the same hash value ?&#xD;&#xA;&#xD;&#xA;2. When creating a raw **unsigned** extrinsic (transaction) object above, I used **rpcToNode** function which is introduced in [here](https://github.com/paritytech/txwrapper-core/blob/992a657ec4fd74ab58dccf20348ec214286182ee/packages/txwrapper-examples/common/util.ts#L19). If there exists a better way, could you advise me, please?&#xD;&#xA;&#xD;&#xA;3. As you see above, the function **signatureVerify** returned false strangely. Really I do not make sense of this result. Could you advise me whether I passed the wrong arguments, please?&#xD;&#xA;&#xD;&#xA;4. I have also tested verification with **subkey** as below&#xD;&#xA;```&#xD;&#xA;subkey verify --hex --message &quot;signingPayload&quot; &quot;signature&quot; &quot;address(ss58 format)&quot;&#xD;&#xA;```&#xD;&#xA;where signingPayload and signature can be obtained from the code above &#xD;&#xA;```&#xD;&#xA;$subkey verify --hex --message 0x9c040300429f72a2498b5abaa44433210c5a5dc2d7b29946d0db1884101817871571f16302286bee65018800cc24000015000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423edfdac6269bf6f42a3dfde7683ca419c866b1d79b0449210345cbcea5b538f252 \&#xD;&#xA;0x012ace240b88ccfda390bbef5547bf7bd353d77235c1055e0e58905f944b84343b63fe35ca27170fbf69596ddc4f941f6b4be25ea4cf07932591ef3512bc10828b \&#xD;&#xA;5Gv9E4mSjXJsicL4QAuRe8zq3MfGeTGp1cVmB24aRhSgrKqs&#xD;&#xA;```&#xD;&#xA;then, I got an error&#xD;&#xA;```&#xD;&#xA;Error: SignatureFormatInvalid&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would be very grateful if anyone could advise me on the questions above.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33133" PostHistoryTypeId="1" PostId="8441" RevisionGUID="af255aec-ab6a-4f3c-833d-0f206925ae6e" CreationDate="2023-05-10T11:32:29.367" UserId="4098" Text="Sign a transaction offline for Westend testnet and verification of the transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="33134" PostHistoryTypeId="3" PostId="8441" RevisionGUID="af255aec-ab6a-4f3c-833d-0f206925ae6e" CreationDate="2023-05-10T11:32:29.367" UserId="4098" Text="|polkadot-js|extrinsic|transactions|rpc|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33135" PostHistoryTypeId="5" PostId="8441" RevisionGUID="4c101bd3-c717-4485-b9bd-b5bb74a1559f" CreationDate="2023-05-10T11:54:11.607" UserId="4098" Comment="added 13 characters in body" Text="Could Polkadot experts execute the code below and advise me on the questions, please?&#xD;&#xA;&#xD;&#xA;You just need to replace the code by your own Westend accounts and nonce.&#xD;&#xA;```&#xD;&#xA;  import { construct, getRegistry, methods, deriveAddress } from &quot;@substrate/txwrapper-polkadot&quot;;&#xD;&#xA;  import { signatureVerify,  cryptoWaitReady } from '@polkadot/util-crypto';&#xD;&#xA;  import { Keyring } from '@polkadot/api';&#xD;&#xA;  import { EXTRINSIC_VERSION } from '@polkadot/types/extrinsic/v4/Extrinsic'&#xD;&#xA;&#xD;&#xA;await cryptoWaitReady();&#xD;&#xA;&#xD;&#xA;console.debug('build Keyring')&#xD;&#xA;const drhan_keyring = new Keyring({ type: &quot;sr25519&quot;}); &#xD;&#xA;&#xD;&#xA;console.debug('Some mnemonic phrase, Add an account, straight mnemonic')&#xD;&#xA;const drhan_substrateKeypair = drhan_keyring.addFromUri('world dutch flash motor outdoor major axis gloom rice pledge true suit'); &#xD;&#xA;&#xD;&#xA;console.debug(`publicKey: ${drhan_substrateKeypair.publicKey}`);&#xD;&#xA;&#xD;&#xA;console.debug('derive account address');&#xD;&#xA;const drhan_address = deriveAddress(drhan_substrateKeypair.publicKey, 42);&#xD;&#xA;console.debug(`address: ${drhan_address}`);&#xD;&#xA;&#xD;&#xA;const dest = &quot;5Da4PC8yrDnr2RcKFLFWyuZ9XNei5mPYdAvyn5aUpBGV5Ydk&quot;;&#xD;&#xA;const value = 1000000000;&#xD;&#xA;const nonce = &quot;34&quot;;&#xD;&#xA;&#xD;&#xA;console.debug('Get the meta information of the target substrate node');&#xD;&#xA;const { block } = await rpcToNode('chain_getBlock');&#xD;&#xA;const blockHash = await rpcToNode('chain_getBlockHash');&#xD;&#xA;const genesisHash = await rpcToNode('chain_getBlockHash', [0]);&#xD;&#xA;const metadataRpc = await rpcToNode('state_getMetadata');&#xD;&#xA;const { specVersion, transactionVersion, specName } = await rpcToNode('state_getRuntimeVersion');&#xD;&#xA;&#xD;&#xA;console.debug('build the registry of the target substrate node');&#xD;&#xA;const registry = getRegistry({&#xD;&#xA;    chainName: 'Polkadot',&#xD;&#xA;    specName,&#xD;&#xA;    specVersion,&#xD;&#xA;    metadataRpc&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;console.debug(&quot;create our `balances.transferKeepAlive` unsigned tx&quot;);&#xD;&#xA;const unsigned = methods.balances.transferKeepAlive(&#xD;&#xA;    {&#xD;&#xA;        value,&#xD;&#xA;        dest,&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;        address: drhan_address,&#xD;&#xA;        blockHash,&#xD;&#xA;        blockNumber: parseInt(block.header.number, 16),&#xD;&#xA;        eraPeriod: 50,&#xD;&#xA;        genesisHash,&#xD;&#xA;        metadataRpc,&#xD;&#xA;        nonce: parseInt(nonce),&#xD;&#xA;        specVersion,&#xD;&#xA;        tip: 0,&#xD;&#xA;        transactionVersion,&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry,&#xD;&#xA;    }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;console.debug(&quot;Construct the signing payload from an unsigned transaction&quot;);&#xD;&#xA;const signingPayload = construct.signingPayload(unsigned, { registry });&#xD;&#xA;&#xD;&#xA;console.debug(`signingPayload: ${signingPayload}`);&#xD;&#xA;&#xD;&#xA;console.debug(&quot;Construct signature&quot;);&#xD;&#xA;const { signature } = registry.createType('ExtrinsicPayload', signingPayload, {&#xD;&#xA;    version: EXTRINSIC_VERSION&#xD;&#xA;}).sign(drhan_substrateKeypair);&#xD;&#xA;&#xD;&#xA;console.debug(`signature: ${signature}`);&#xD;&#xA;&#xD;&#xA;console.debug(&quot;Construct the signed transaction&quot;);&#xD;&#xA;const signedTransaction = construct.signedTx(unsigned, signature, {&#xD;&#xA;    metadataRpc,&#xD;&#xA;    registry&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;console.debug(&quot;Derive the transaction hash of the signed transaction&quot;);&#xD;&#xA;const hashSignedTx = construct.txHash(signedTransaction);&#xD;&#xA;&#xD;&#xA;console.debug('check validity of signature');&#xD;&#xA;const validity = signatureVerify(signingPayload, signature, drhan_address).isValid;&#xD;&#xA;&#xD;&#xA;const response = {&#xD;&#xA;    &quot;signed_tx_payload&quot;: signedTransaction,&#xD;&#xA;    &quot;signed_tx_hash&quot;: hashSignedTx,&#xD;&#xA;    &quot;signatureVerify - valid?&quot; : validity&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;export function rpcToNode(&#xD;&#xA;     method: string,&#xD;&#xA;     params: any[] = []&#xD;&#xA; ): Promise&lt;any&gt; {&#xD;&#xA;     return fetch('https://westend-rpc.polkadot.io:443', {&#xD;&#xA;         body: JSON.stringify({&#xD;&#xA;             id: 1,&#xD;&#xA;             jsonrpc: '2.0',&#xD;&#xA;             method,&#xD;&#xA;             params,&#xD;&#xA;         }),&#xD;&#xA;         headers: {&#xD;&#xA;             'Content-Type': 'application/json',&#xD;&#xA;             connection: 'keep-alive',&#xD;&#xA;         },&#xD;&#xA;         method: 'POST',&#xD;&#xA;     })&#xD;&#xA;         .then((response) =&gt; response.json())&#xD;&#xA;         .then(({ error, result }) =&gt; {&#xD;&#xA;             if (error) {&#xD;&#xA;                 throw new Error(&#xD;&#xA;                     `${error.code} ${error.message}: ${JSON.stringify(error.data)}`&#xD;&#xA;                 );&#xD;&#xA;             }&#xD;&#xA; &#xD;&#xA;             return result;&#xD;&#xA;         });&#xD;&#xA; }&#xD;&#xA;```&#xD;&#xA;Then, I have got the result as below, for example&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;signed_tx_payload&quot;: &quot;0x39028400d6a55ba606625132346da20a84918fd03fc063e78beb65a708763ce212aba51e012ace240b88ccfda390bbef5547bf7bd353d77235c1055e0e58905f944b84343b63fe35ca27170fbf69596ddc4f941f6b4be25ea4cf07932591ef3512bc10828b65018800040300429f72a2498b5abaa44433210c5a5dc2d7b29946d0db1884101817871571f16302286bee&quot;,&#xD;&#xA;  &quot;signed_tx_hash&quot;: &quot;0xfbf53347d8a80dc3444bcc5527c5e0795426ac5bf26978c236a41f920143bf4c&quot;,&#xD;&#xA;  &quot;signatureVerify - valid?&quot;: false&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Then, I have submitted **signed_tx_payload** to Westend tesetnet as below&#xD;&#xA;```&#xD;&#xA;    const wsProvider = new WsProvider('wss://westend-rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    &#xD;&#xA;    const signed_tx_payload = &quot;0x39028400d6a55ba606625132346da20a84918fd03fc063e78beb65a708763ce212aba51e012ace240b88ccfda390bbef5547bf7bd353d77235c1055e0e58905f944b84343b63fe35ca27170fbf69596ddc4f941f6b4be25ea4cf07932591ef3512bc10828b65018800040300429f72a2498b5abaa44433210c5a5dc2d7b29946d0db1884101817871571f16302286bee&quot;;&#xD;&#xA;    &#xD;&#xA;    const parsedTransaction = api.tx(signed_tx_payload);&#xD;&#xA;    const TxHash = await api.rpc.author.submitExtrinsic(parsedTransaction);&#xD;&#xA;    console.log(`tx hash: ${TxHash.toString()}`);&#xD;&#xA;```&#xD;&#xA;Then the message has been returned from Westend&#xD;&#xA;```&#xD;&#xA;2023-05-10 11:29:29        API/INIT: RPC methods not decorated: mmr_root, mmr_verifyProof, mmr_verifyProofStateless&#xD;&#xA;2023-05-10 11:29:29        API/INIT: westend/9420: Not decorating runtime apis without matching versions: ParachainHost/4 (1/2/3 known), TransactionPaymentApi/4 (1/2/3 known)&#xD;&#xA;tx hash: 0xfbf53347d8a80dc3444bcc5527c5e0795426ac5bf26978c236a41f920143bf4c&#xD;&#xA;```&#xD;&#xA;I thought that the signed transaction offline was successfully accepted to Westend testnet because I got the same hash of the transantion from Westend. But I have several questions below:&#xD;&#xA;&#xD;&#xA;1. Although this extrinsic was accepted to Westend testnet, it have not been commited to a block as I can't confirm it on westend.subscan.io and the nonce has not been increased. Why this extrinsic has not been commited although I got the same hash value from Westend ?&#xD;&#xA;&#xD;&#xA;2. When creating a raw **unsigned** extrinsic (transaction) object above, I used **rpcToNode** function which is introduced in [here](https://github.com/paritytech/txwrapper-core/blob/992a657ec4fd74ab58dccf20348ec214286182ee/packages/txwrapper-examples/common/util.ts#L19). If there exists a better way, could you advise me, please?&#xD;&#xA;&#xD;&#xA;3. As you see above, the function **signatureVerify** returned false strangely. Really I do not make sense of this result. Could you advise me whether I passed the wrong arguments, please?&#xD;&#xA;&#xD;&#xA;4. I have also tested verification with **subkey** as below&#xD;&#xA;```&#xD;&#xA;subkey verify --hex --message &quot;signingPayload&quot; &quot;signature&quot; &quot;address(ss58 format)&quot;&#xD;&#xA;```&#xD;&#xA;where signingPayload and signature can be obtained from the code above &#xD;&#xA;```&#xD;&#xA;$subkey verify --hex --message 0x9c040300429f72a2498b5abaa44433210c5a5dc2d7b29946d0db1884101817871571f16302286bee65018800cc24000015000000e143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423edfdac6269bf6f42a3dfde7683ca419c866b1d79b0449210345cbcea5b538f252 \&#xD;&#xA;0x012ace240b88ccfda390bbef5547bf7bd353d77235c1055e0e58905f944b84343b63fe35ca27170fbf69596ddc4f941f6b4be25ea4cf07932591ef3512bc10828b \&#xD;&#xA;5Gv9E4mSjXJsicL4QAuRe8zq3MfGeTGp1cVmB24aRhSgrKqs&#xD;&#xA;```&#xD;&#xA;then, I got an error&#xD;&#xA;```&#xD;&#xA;Error: SignatureFormatInvalid&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would be very grateful if anyone could advise me on the questions above.&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33136" PostHistoryTypeId="2" PostId="8442" RevisionGUID="4147e664-ffc8-45a2-8f1e-bda98415e87d" CreationDate="2023-05-10T13:12:38.820" UserId="1786" Text="For context all the information to answer this question is in this github issue: https://github.com/paritytech/txwrapper-core/issues/296&#xD;&#xA;&#xD;&#xA; 1. Given the address you are using to conduct the transaction, the transfers are going through, and the nonce is being increased. This can be confirmed on westend here: https://westend.subscan.io/account/5Gv9E4mSjXJsicL4QAuRe8zq3MfGeTGp1cVmB24aRhSgrKqs&#xD;&#xA;&#xD;&#xA; 2. This is just preference. You may use whatever suits your systems design. Depending on the output you can create a subscription as well using polkadot-js api, [`api.rpc.author.submitAndWatchExtrinsic`](https://polkadot.js.org/docs/substrate/rpc#submitandwatchextrinsicextrinsic-extrinsic-extrinsicstatus). If you choose to use rpcToNode you would need to scrape the blocks newly finalized blocks and search for your transaction in the extrinsics to confirm that the transfer was either successful or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 3. Here is a code snippet that fixes your `signatureVerify` functionality:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;    // Sign a payload. This operation should be performed on an offline device.&#xD;&#xA;    const s = registry&#xD;&#xA;        .createType('ExtrinsicPayload', signingPayload, {&#xD;&#xA;            version: EXTRINSIC_VERSION,&#xD;&#xA;        })&#xD;&#xA;    const { signature } = s.sign(sender);&#xD;&#xA;    console.log(`\nSignature: ${signature}`);&#xD;&#xA;&#xD;&#xA;    const v = signatureVerify(s.toU8a({ method: true }), signature, sender.publicKey)&#xD;&#xA;&#xD;&#xA;    console.log(v)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It is important to note that what is happening when you create an `ExtrinsicPayload` that the `method` bytes are being remove which can be seen in the code [here](https://github.com/polkadot-js/api/blob/master/packages/types/src/extrinsic/v4/ExtrinsicPayload.ts#L120). This means that the signingPayload you are passing in is not the same as the `ExtrinsicPayload`.&#xD;&#xA;&#xD;&#xA;I hope this satisfied your answer. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33138" PostHistoryTypeId="5" PostId="8442" RevisionGUID="1daf855d-772c-4e94-a8a7-8345b00a2432" CreationDate="2023-05-10T13:26:29.443" UserId="1786" Comment="edited body" Text="For context all the information to answer this question is in this github issue: https://github.com/paritytech/txwrapper-core/issues/296&#xD;&#xA;&#xD;&#xA; 1. Given the address you are using to conduct the transaction, the transfers are going through, and the nonce is being increased. This can be confirmed on westend here: https://westend.subscan.io/account/5Gv9E4mSjXJsicL4QAuRe8zq3MfGeTGp1cVmB24aRhSgrKqs&#xD;&#xA;&#xD;&#xA; 2. This is just preference. You may use whatever suits your systems design. Depending on the output you can create a subscription as well using polkadot-js api, [`api.rpc.author.submitAndWatchExtrinsic`](https://polkadot.js.org/docs/substrate/rpc#submitandwatchextrinsicextrinsic-extrinsic-extrinsicstatus). If you choose to use rpcToNode you would need to scrape the chains newly finalized blocks and search for your transaction in the extrinsics to confirm that the transfer was either successful or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 3. Here is a code snippet that fixes your `signatureVerify` functionality:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;    // Sign a payload. This operation should be performed on an offline device.&#xD;&#xA;    const s = registry&#xD;&#xA;        .createType('ExtrinsicPayload', signingPayload, {&#xD;&#xA;            version: EXTRINSIC_VERSION,&#xD;&#xA;        })&#xD;&#xA;    const { signature } = s.sign(sender);&#xD;&#xA;    console.log(`\nSignature: ${signature}`);&#xD;&#xA;&#xD;&#xA;    const v = signatureVerify(s.toU8a({ method: true }), signature, sender.publicKey)&#xD;&#xA;&#xD;&#xA;    console.log(v)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It is important to note that what is happening when you create an `ExtrinsicPayload` that the `method` bytes are being remove which can be seen in the code [here](https://github.com/polkadot-js/api/blob/master/packages/types/src/extrinsic/v4/ExtrinsicPayload.ts#L120). This means that the signingPayload you are passing in is not the same as the `ExtrinsicPayload`.&#xD;&#xA;&#xD;&#xA;I hope this satisfied your answer. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33139" PostHistoryTypeId="5" PostId="8442" RevisionGUID="2c0db349-b3d9-4927-bafe-de7b01777069" CreationDate="2023-05-10T13:47:54.123" UserId="1786" Comment="added 2 characters in body" Text="For context all the information to answer this question is in this github issue: https://github.com/paritytech/txwrapper-core/issues/296&#xD;&#xA;&#xD;&#xA; 1. Given the address you are using to conduct the transaction, the transfers are going through, and the nonce is being increased. This can be confirmed on westend here: https://westend.subscan.io/account/5Gv9E4mSjXJsicL4QAuRe8zq3MfGeTGp1cVmB24aRhSgrKqs&#xD;&#xA;&#xD;&#xA; 2. This is just preference. You may use whatever suits your systems design. Depending on the output you can create a subscription as well using polkadot-js api, [`api.rpc.author.submitAndWatchExtrinsic`](https://polkadot.js.org/docs/substrate/rpc#submitandwatchextrinsicextrinsic-extrinsic-extrinsicstatus). If you choose to use rpcToNode you would need to scrape the chains newly finalized blocks and search for your transaction in the extrinsics to confirm that the transfer was either successful or not.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 3. Here is a code snippet that fixes your `signatureVerify` functionality:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;    // Sign a payload. This operation should be performed on an offline device.&#xD;&#xA;    const s = registry&#xD;&#xA;        .createType('ExtrinsicPayload', signingPayload, {&#xD;&#xA;            version: EXTRINSIC_VERSION,&#xD;&#xA;        })&#xD;&#xA;    const { signature } = s.sign(sender);&#xD;&#xA;    console.log(`\nSignature: ${signature}`);&#xD;&#xA;&#xD;&#xA;    const v = signatureVerify(s.toU8a({ method: true }), signature, sender.publicKey)&#xD;&#xA;&#xD;&#xA;    console.log(v)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It is important to note that what is happening when you create an `ExtrinsicPayload` that the `method` bytes are being remove which can be seen in the code [here](https://github.com/polkadot-js/api/blob/master/packages/types/src/extrinsic/v4/ExtrinsicPayload.ts#L120). This means that the signingPayload you are passing in is not the same as the `ExtrinsicPayload`.&#xD;&#xA;&#xD;&#xA;I hope this satisfied your question. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33141" PostHistoryTypeId="2" PostId="8443" RevisionGUID="a059ab75-0f29-4710-934a-a5784311647a" CreationDate="2023-05-10T14:45:18.310" UserId="494" Text="I recently wrote a pallet that uses a (non-substrate) Rust crate as a dependency.&#xD;&#xA;This crate conveniently supports `no-std` and Wasm, but it is also quite extensive and there's a lot of code that my pallet simply doesn't use.&#xD;&#xA;&#xD;&#xA;When I compile a runtime with this pallet, the resulting wasm blob is way too big (in the order of Mb).&#xD;&#xA;&#xD;&#xA;Is there a clever way to make sure that compilation will only include wasm imports that my pallet actually uses, preventing unnecessary bloating of the runtime wasm?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33143" PostHistoryTypeId="1" PostId="8443" RevisionGUID="a059ab75-0f29-4710-934a-a5784311647a" CreationDate="2023-05-10T14:45:18.310" UserId="494" Text="Prevent unused imports from bloating up runtime wasm" ContentLicense="CC BY-SA 4.0" />
  <row Id="33144" PostHistoryTypeId="3" PostId="8443" RevisionGUID="a059ab75-0f29-4710-934a-a5784311647a" CreationDate="2023-05-10T14:45:18.310" UserId="494" Text="|rust|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33145" PostHistoryTypeId="2" PostId="8444" RevisionGUID="6f02d120-0b07-4840-8350-5b75583543d2" CreationDate="2023-05-10T16:03:48.653" UserId="139" Text="In general no, unless the code is feature gated in the library itself. There's simply no way to prove that some code is &quot;unnecessary&quot; if it is under the same feature umbrella as the import you're using. Although I bet that the same rust practices to reduce the size of the target can help, but you'll have to try them out: &#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[profile.release]&#xD;&#xA;lto = true&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found this code profile analyzer for wasm : https://github.com/rustwasm/twiggy that you may use to inspect what's taking up size and probably rewrite the code from the library that you're importing.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="33147" PostHistoryTypeId="2" PostId="8445" RevisionGUID="6bcb6081-b98e-42a7-ad92-47fc5cac0aa7" CreationDate="2023-05-10T17:36:57.550" UserId="3850" Text="I am getting an error attempting to deploy my delegator smart contract. Not sure how to debug this issue.&#xD;&#xA;&#xD;&#xA;I use the [deploy.sh][1] to upload all smart contract code hashes and pass it afterwards to the instantiate cargo command to deploy the delegator contract. I copied this script originally from the `ink-examples` repository.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;$ cargo contract instantiate --manifest-path=Cargo.toml -x --suri //Alice --args 0 0 0x2dc77005d1e64e51910fec8553abeb84d40bd28b1b7871e317e6ee062fe6a236 0x5138b191f83404c1a8d1c1c2a965558aa413868cae54be657d5522f4942c1b41 0xfd7c89608968d6da96747ea70f92909656982832818b227dfd99b74252741a24&#xD;&#xA;&#xD;&#xA; Dry-running new (skip with --skip-dry-run)&#xD;&#xA;          Result ModuleError: Contracts::ContractTrapped: [&quot;Contract trapped during execution.&quot;]&#xD;&#xA;    Gas Consumed Weight { ref_time: 1866330052, proof_size: 86246 }&#xD;&#xA;    Gas Required Weight { ref_time: 5231342013, proof_size: 646971 }&#xD;&#xA; Storage Deposit StorageDeposit::Charge(8060300000000000000)&#xD;&#xA;   Debug Message panicked at 'Cross-contract instantiation failed with TransferFailed', /home/snowmead/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_env-4.2.0/src/call/create_builder.rs:260:17&#xD;&#xA;```&#xD;&#xA;Here is the [github repo][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/michaelassaf/liquid-staking-sc/blob/main/deploy.sh&#xD;&#xA;  [2]: https://github.com/michaelassaf/liquid-staking-sc" ContentLicense="CC BY-SA 4.0" />
  <row Id="33149" PostHistoryTypeId="1" PostId="8445" RevisionGUID="6bcb6081-b98e-42a7-ad92-47fc5cac0aa7" CreationDate="2023-05-10T17:36:57.550" UserId="3850" Text="Cross-contract instantiation failed with TransferFailed" ContentLicense="CC BY-SA 4.0" />
  <row Id="33150" PostHistoryTypeId="3" PostId="8445" RevisionGUID="6bcb6081-b98e-42a7-ad92-47fc5cac0aa7" CreationDate="2023-05-10T17:36:57.550" UserId="3850" Text="|ink|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33151" PostHistoryTypeId="5" PostId="8445" RevisionGUID="3000f76a-5017-499d-868d-ec991eed8eae" CreationDate="2023-05-10T18:28:09.130" UserId="3850" Comment="added 161 characters in body" Text="I am getting an error attempting to deploy my delegator smart contract. Not sure how to debug this issue.&#xD;&#xA;&#xD;&#xA;I use the [deploy.sh][1] to upload all smart contract code hashes and pass it afterwards to the instantiate cargo command to deploy the delegator contract. I copied this script originally from the `ink-examples` repository.&#xD;&#xA;&#xD;&#xA;Here is the error I get when attempting to instantiate the [delegator contract][2]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;$ cargo contract instantiate --manifest-path=Cargo.toml -x --suri //Alice --args 0 0 0x2dc77005d1e64e51910fec8553abeb84d40bd28b1b7871e317e6ee062fe6a236 0x5138b191f83404c1a8d1c1c2a965558aa413868cae54be657d5522f4942c1b41 0xfd7c89608968d6da96747ea70f92909656982832818b227dfd99b74252741a24&#xD;&#xA;&#xD;&#xA; Dry-running new (skip with --skip-dry-run)&#xD;&#xA;          Result ModuleError: Contracts::ContractTrapped: [&quot;Contract trapped during execution.&quot;]&#xD;&#xA;    Gas Consumed Weight { ref_time: 1866330052, proof_size: 86246 }&#xD;&#xA;    Gas Required Weight { ref_time: 5231342013, proof_size: 646971 }&#xD;&#xA; Storage Deposit StorageDeposit::Charge(8060300000000000000)&#xD;&#xA;   Debug Message panicked at 'Cross-contract instantiation failed with TransferFailed', /home/snowmead/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_env-4.2.0/src/call/create_builder.rs:260:17&#xD;&#xA;```&#xD;&#xA;Here is the [github repo][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/michaelassaf/liquid-staking-sc/blob/main/deploy.sh&#xD;&#xA;  [2]: https://github.com/michaelassaf/liquid-staking-sc/blob/main/lib.rs&#xD;&#xA;  [3]: https://github.com/michaelassaf/liquid-staking-sc" ContentLicense="CC BY-SA 4.0" />
  <row Id="33152" PostHistoryTypeId="2" PostId="8446" RevisionGUID="dad96e9f-f9df-4918-8d72-b8b5934f8934" CreationDate="2023-05-10T18:51:08.653" UserId="29" Text="Pallets can have their own custom RPCs. You have referenced the correct resource:&#xD;&#xA;- https://hackmd.io/@d9WGfolYQmSRBmnxyOQmAg/BkEANECJs&#xD;&#xA;&#xD;&#xA;And here:&#xD;&#xA;- https://substrate.stackexchange.com/questions/5554/how-to-add-custom-rpcs&#xD;&#xA;&#xD;&#xA;There are several examples throughout Substrate pallets where a runtime api is defined for a pallet which can be exposed via RPC. Here is one:&#xD;&#xA;- https://github.com/paritytech/substrate/tree/e2c5a564e5a83e1f63d47a4fa300567901f00afc/frame/transaction-payment/rpc&#xD;&#xA;&#xD;&#xA;You can find system RPC methods here:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/e2c5a564e5a83e1f63d47a4fa300567901f00afc/client/rpc-api/src/system/mod.rs#L31-L123&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33154" PostHistoryTypeId="2" PostId="8447" RevisionGUID="665cd85f-9e84-41bc-9f00-5495ef7a810c" CreationDate="2023-05-10T19:31:05.377" UserId="3850" Text="The following changes to the endowment parameter value fixed the problem. it would be good to know what endowment is and why it made my build fail. [endowment][1] documentation is really not clear. &#xD;&#xA;&#xD;&#xA;`.endowment(total_balance / 4)` to `.endowment(0)`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let accumulator = AccumulatorRef::new(init_value)&#xD;&#xA;                .endowment(0)&#xD;&#xA;                .code_hash(accumulator_code_hash)&#xD;&#xA;                .salt_bytes(salt)&#xD;&#xA;                .instantiate();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ink_env/4.2.0/ink_env/call/struct.CreateBuilder.html#method.endowment" ContentLicense="CC BY-SA 4.0" />
  <row Id="33156" PostHistoryTypeId="52" PostId="8441" RevisionGUID="0fc28c25-c53e-434a-8d93-c3d08750ed36" CreationDate="2023-05-10T19:36:37.097" />
  <row Id="33157" PostHistoryTypeId="2" PostId="8448" RevisionGUID="df60f5b2-3147-4d53-871f-16e804f671aa" CreationDate="2023-05-10T20:10:02.103" UserId="3319" Text="in the latest version in substrate-node-template, i tried adding the following runtime api in the template pallet:&#xD;&#xA;&#xD;&#xA;    sp_api::decl_runtime_apis! {&#xD;&#xA;    	pub trait ExtrinsicDetails&lt;R&gt; where R:crate::Config&#xD;&#xA;    	{&#xD;&#xA;    		fn dummy_test(runtime: R::length) -&gt; R;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;given that i declare length in the pallet::Config like this:&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;    	/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    	type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    	/// Type representing the weight of this pallet&#xD;&#xA;    	type WeightInfo: WeightInfo;&#xD;&#xA;    	type length: Get&lt;u32&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and implemented like this: &#xD;&#xA;&#xD;&#xA;    impl pallet_template::Config for Runtime {&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type WeightInfo = pallet_template::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    	type length = ConstU32&lt;100&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;it kept throwing this error:&#xD;&#xA;&#xD;&#xA;     error[E0220]: associated type `length` not found for `R`&#xD;&#xA;         --&gt; /home/coder/project/substrate-node-template/pallets/template/src/lib.rs:114:30&#xD;&#xA;          |&#xD;&#xA;      114 |             fn dummy_test(runtime: R::length) -&gt; R;&#xD;&#xA;          |                                       ^^^^^^ there is a similarly named associated type `length` in the trait `pallet::Config`&#xD;&#xA;&#xD;&#xA;even though it has the same name, i also tried using `pallet::Config` instead of `crate::Config` and also just `Config`, all have the same error.&#xD;&#xA;&#xD;&#xA;Ps: same code was working in 0.9.28" ContentLicense="CC BY-SA 4.0" />
  <row Id="33159" PostHistoryTypeId="1" PostId="8448" RevisionGUID="df60f5b2-3147-4d53-871f-16e804f671aa" CreationDate="2023-05-10T20:10:02.103" UserId="3319" Text="decl_runtime_api behaving in a weird way" ContentLicense="CC BY-SA 4.0" />
  <row Id="33160" PostHistoryTypeId="3" PostId="8448" RevisionGUID="df60f5b2-3147-4d53-871f-16e804f671aa" CreationDate="2023-05-10T20:10:02.103" UserId="3319" Text="|pallet|runtime|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33163" PostHistoryTypeId="5" PostId="3948" RevisionGUID="33a3b1ea-8d50-42ac-ae96-ee22033ac3d6" CreationDate="2023-05-10T20:34:59.100" UserId="29" Comment="deleted 1 character in body" Text="According to the docs, using the macro gives you the extra benefit of having it included in the metadatas:&#xD;&#xA;&#xD;&#xA;&gt; To put Get associated type into metadatas, use the attribute #[pallet::constant], e.g.:&#xD;&#xA;&gt; &#xD;&#xA;&gt; ```rs&#xD;&#xA;&gt; #[pallet::config] &#xD;&#xA;&gt; pub trait Config: frame_system::Config { 		&#xD;&#xA;&gt;   #[pallet::constant] 		&#xD;&#xA;&gt;   type Foo: Get&lt;u32&gt;; &#xD;&#xA;&gt; }&#xD;&#xA;&gt; ```&#xD;&#xA;- https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html#palletconstant&#xD;&#xA;&#xD;&#xA;You can see the full definition and implementation of this constant macro here:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0ba251c9388452c879bfcca425ada66f1f9bc802/frame/support/procedural/src/pallet/expand/constants.rs#L20-L108" ContentLicense="CC BY-SA 4.0" />
  <row Id="33164" PostHistoryTypeId="5" PostId="8448" RevisionGUID="aab38922-6e27-447c-bfa6-c93ba91d8b39" CreationDate="2023-05-10T20:49:58.590" UserId="3319" Comment="added 32 characters in body" Text="in the latest version in substrate-node-template, i tried adding the following runtime api in the template pallet:&#xD;&#xA;&#xD;&#xA;    sp_api::decl_runtime_apis! {&#xD;&#xA;    	pub trait ExtrinsicDetails&lt;R&gt; where R:crate::Config&#xD;&#xA;    	{&#xD;&#xA;    		fn dummy_test(runtime: R::length) -&gt; R;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;given that i declare length in the pallet::Config like this:&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;    	/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    	type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    	/// Type representing the weight of this pallet&#xD;&#xA;    	type WeightInfo: WeightInfo;&#xD;&#xA;        #[pallet::constant]&#xD;&#xA;        type length: Get&lt;u32&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and implemented like this: &#xD;&#xA;&#xD;&#xA;    impl pallet_template::Config for Runtime {&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type WeightInfo = pallet_template::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    	type length = ConstU32&lt;100&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;it kept throwing this error:&#xD;&#xA;&#xD;&#xA;     error[E0220]: associated type `length` not found for `R`&#xD;&#xA;         --&gt; /home/coder/project/substrate-node-template/pallets/template/src/lib.rs:114:30&#xD;&#xA;          |&#xD;&#xA;      114 |             fn dummy_test(runtime: R::length) -&gt; R;&#xD;&#xA;          |                                       ^^^^^^ there is a similarly named associated type `length` in the trait `pallet::Config`&#xD;&#xA;&#xD;&#xA;even though it has the same name, i also tried using `pallet::Config` instead of `crate::Config` and also just `Config`, all have the same error.&#xD;&#xA;&#xD;&#xA;Ps: same code was working in 0.9.28" ContentLicense="CC BY-SA 4.0" />
  <row Id="33166" PostHistoryTypeId="2" PostId="8450" RevisionGUID="48fb9068-cf82-4c11-8474-09be2f9399f6" CreationDate="2023-05-10T21:22:04.913" UserId="29" Text="Error resolves for me on `v0.9.40` by capitalizing the letter `L` in these two places:&#xD;&#xA;&#xD;&#xA;pallets/template/src/lib.rs&#xD;&#xA;```rust&#xD;&#xA;type Length: Get&lt;u32&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;runtime/src/lib.rs&#xD;&#xA;```rust&#xD;&#xA;type Length = ConstU32&lt;100&gt;;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33168" PostHistoryTypeId="2" PostId="8451" RevisionGUID="a3c6cff0-ea49-4303-97b7-16269814c32f" CreationDate="2023-05-11T01:24:38.067" UserId="377" Text="How we can fetch the node identity(local node identity in snapshort) after running the node i would need it so that i can make process automatic to start the second node by using that node key&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SVWZy.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33170" PostHistoryTypeId="1" PostId="8451" RevisionGUID="a3c6cff0-ea49-4303-97b7-16269814c32f" CreationDate="2023-05-11T01:24:38.067" UserId="377" Text="How can i fetch the node identity from cli?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33171" PostHistoryTypeId="3" PostId="8451" RevisionGUID="a3c6cff0-ea49-4303-97b7-16269814c32f" CreationDate="2023-05-11T01:24:38.067" UserId="377" Text="|substrate-node-template|nodes|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33172" PostHistoryTypeId="2" PostId="8452" RevisionGUID="9fc2d93b-58c8-4fcd-8f52-1ca456c70b72" CreationDate="2023-05-11T01:26:58.867" UserId="377" Text="How we can do the integration testing of the substrate application? " ContentLicense="CC BY-SA 4.0" />
  <row Id="33174" PostHistoryTypeId="1" PostId="8452" RevisionGUID="9fc2d93b-58c8-4fcd-8f52-1ca456c70b72" CreationDate="2023-05-11T01:26:58.867" UserId="377" Text="How we can do the integration testing of a substrate project?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33175" PostHistoryTypeId="3" PostId="8452" RevisionGUID="9fc2d93b-58c8-4fcd-8f52-1ca456c70b72" CreationDate="2023-05-11T01:26:58.867" UserId="377" Text="|pallet|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33177" PostHistoryTypeId="2" PostId="8453" RevisionGUID="69e31362-2b7c-4739-aaef-64f274d3b8cb" CreationDate="2023-05-11T03:51:21.657" UserId="354" Text="You can use curl command from cli to get the node identity using the following command: &#xD;&#xA;&#xD;&#xA;`curl -sS -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;system_localPeerId&quot;}' http://localhost:9933/`&#xD;&#xA;&#xD;&#xA;Just replace the rpc url if you have hosted your node somewhere or if accessing the node locally than the above command is good to go." ContentLicense="CC BY-SA 4.0" />
  <row Id="33179" PostHistoryTypeId="2" PostId="8454" RevisionGUID="20f56bfc-9395-4550-b216-941936b3e204" CreationDate="2023-05-11T06:48:53.580" UserId="83" Text="I got a similar error `ERROR tokio-runtime-worker jsonrpsee_server::transport::ws: WS transport error: i/o error: Transport endpoint is not connected (os error 107); terminate connection: 0`.&#xD;&#xA;It happened when running Substrate Contracts Node using the latest [contracts-ci-linux][1] Dockerfile that I reported [here][2] before discovering this post, which uses the latest commit in the 'master' branch of the &quot;cargo-contracts&quot; repo [here][3] and the latest commit in the 'main' branch of the &quot;substrate-contracts-node&quot; repo [here][4].&#xD;&#xA;&#xD;&#xA;So that was using Substrate Contracts Node version `substrate-contracts-node --version` of `substrate-contracts-node 0.25.0-a2b09462c7c`&#xD;&#xA;and Cargo Contract version `cargo contract --version` of `cargo-contract-contract 2.2.1-7253c6a-x86_64-unknown-linux-gnu`.&#xD;&#xA;&#xD;&#xA;I resolved the error by just following https://use.ink/getting-started/setup instructions and updating the Dockerfile so it would install a specific older version substrate-contracts-node (instead of its latest commit) with `cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked` and by installing the latest stable version of Cargo Contract cargo-contract (instead of the latest commit) with `cargo install cargo-contract --version 2.2.1` as shown in my commit [here][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/scripts/blob/master/dockerfiles/contracts-ci-linux/Dockerfile&#xD;&#xA;  [2]: https://github.com/paritytech/cargo-contract/issues/1108&#xD;&#xA;  [3]: https://github.com/paritytech/scripts/blame/master/dockerfiles/contracts-ci-linux/Dockerfile#L61&#xD;&#xA;  [4]: https://github.com/paritytech/scripts/blame/master/dockerfiles/contracts-ci-linux/Dockerfile#L65&#xD;&#xA;  [5]: https://github.com/ltfschoen/InkTest/commit/1edf0b5fd6ebb5f361de758127a8dc70028feef9#diff-f34da55ca08f1a30591d8b0b3e885bcc678537b2a9a4aadea4f190806b374ddc" ContentLicense="CC BY-SA 4.0" />
  <row Id="33181" PostHistoryTypeId="2" PostId="8455" RevisionGUID="b5022c0a-9a06-4702-a9fe-b694356e2c54" CreationDate="2023-05-11T08:30:02.683" UserId="4208" Text="I was looking to implement smart-contract into substrate-node-template as I do not want to use substrate-contracts-node. &#xD;&#xA;I was trying to follow this guide - https://substrate-developer-hub.github.io/substrate-how-to-guides/docs/pallet-design/add-contracts-pallet/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, I went into this error the moment I've insert the dependencies and tried ```cargo build```.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# Contracts specific packages&#xD;&#xA;pallet-contracts = { git = &quot;https://github.com/paritytech/substrate&quot;, package = &quot;pallet-contracts&quot;, default-features = false, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;pallet-contracts-primitives = { git = &quot;https://github.com/paritytech/substrate&quot;, package = &quot;pallet-contracts-primitives&quot;, default-features = false, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There are a total of 11 errors and these are two of most common ones.&#xD;&#xA;```&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;   --&gt; /home/&lt;name&gt;/.cargo/git/checkouts/substrate-7e08433d4c370a21/3bb3882/frame/contracts/src/lib.rs:549:6&#xD;&#xA;    |&#xD;&#xA;549 |                     vec![T::Hashing::hash_of(&amp;dest), code_hash, contract.code_hash],&#xD;&#xA;&#xD;&#xA;error: cannot find macro `thread_local` in this scope&#xD;&#xA;   --&gt; /home/chinbinghong/.cargo/git/checkouts/substrate-7e08433d4c370a21/3bb3882/frame/contracts/src/lib.rs:975:3&#xD;&#xA;    |&#xD;&#xA;975 |         environmental!(executing_contract: bool);&#xD;&#xA;    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My current setup is vanilla, cloned from - https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;&#xD;&#xA;This is my current rustc version&#xD;&#xA;```&#xD;&#xA;rustup 1.26.0 (5af9b9484 2023-04-05)&#xD;&#xA;info: This is the version for the rustup toolchain manager, not the rustc compiler.&#xD;&#xA;info: The currently active `rustc` version is `rustc 1.71.0-nightly (74c482104 2023-05-04)`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Things I tried to do:&#xD;&#xA;- Changing the toolchain version to nightly-2023-01-01-x86_64-unknown-linux-gnu&#xD;&#xA;- Tried to follow this: https://substrate.stackexchange.com/questions/7031/problem-adding-a-smart-contract-into-a-substrate-node&#xD;&#xA;- Clean install&#xD;&#xA;&#xD;&#xA;Side note: is there any updated tutorial on implementing smart contract into substrate node template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33183" PostHistoryTypeId="1" PostId="8455" RevisionGUID="b5022c0a-9a06-4702-a9fe-b694356e2c54" CreationDate="2023-05-11T08:30:02.683" UserId="4208" Text="Error when implementing contract-pallet into substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="33184" PostHistoryTypeId="3" PostId="8455" RevisionGUID="b5022c0a-9a06-4702-a9fe-b694356e2c54" CreationDate="2023-05-11T08:30:02.683" UserId="4208" Text="|substrate-node-template|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33185" PostHistoryTypeId="2" PostId="8456" RevisionGUID="600c257b-34af-4835-8201-f494f333d0c3" CreationDate="2023-05-11T09:08:48.493" UserId="3469" Text="i wanna to craete wallet for user in nodejs and substrate . i using these codes for connect to substrate node and create a wallet : &#xD;&#xA;&#xD;&#xA;    const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;    const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;    const { cryptoWaitReady, mnemonicGenerate, mnemonicToMiniSecret, schnorrkelKeypairFromSeed } = require('@polkadot/util-crypto');&#xD;&#xA;    const { TypeRegistry } = require('@polkadot/types'); // Add this import&#xD;&#xA;    &#xD;&#xA;    class PolkadotWrapper {&#xD;&#xA;      constructor(endpoint) {&#xD;&#xA;        this.endpoint = endpoint;&#xD;&#xA;        this.api = null;&#xD;&#xA;      }&#xD;&#xA;    &#xD;&#xA;      async connect() {&#xD;&#xA;        const wsProvider = new WsProvider(this.endpoint);&#xD;&#xA;        const registry = new TypeRegistry();&#xD;&#xA;      &#xD;&#xA;        this.api = await ApiPromise.create({&#xD;&#xA;          provider: wsProvider,&#xD;&#xA;          registry, &#xD;&#xA;          types: {}, &#xD;&#xA;        });&#xD;&#xA;      &#xD;&#xA;        await this.api.isReady;&#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;    &#xD;&#xA;      createAccount() {&#xD;&#xA;        const mnemonic = mnemonicGenerate();&#xD;&#xA;        const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;        const newAccount = keyring.createFromUri(mnemonic);&#xD;&#xA;      &#xD;&#xA;        return {&#xD;&#xA;          instance: newAccount, &#xD;&#xA;          mnemonic,&#xD;&#xA;          address: newAccount.address,&#xD;&#xA;          publicKey: newAccount.publicKey.toString('hex'),&#xD;&#xA;        };&#xD;&#xA;      }&#xD;&#xA;      &#xD;&#xA;    &#xD;&#xA;    and it create a wallet for user but when i need to call this function whith that created account with `createAccount` function : &#xD;&#xA;    &#xD;&#xA;      const newAccount = wrapper.createAccount();&#xD;&#xA;      console.log('New account:', newAccount.instance);&#xD;&#xA;&#xD;&#xA;transafer function : &#xD;&#xA;&#xD;&#xA;      async transfer(fromAccount, toAddress, amount) {&#xD;&#xA;        if (!this.api) throw new Error('API not connected');&#xD;&#xA;    &#xD;&#xA;        // Prepare the extrinsic&#xD;&#xA;        const extrinsic = this.api.tx.balances.transfer(toAddress, amount);&#xD;&#xA;    &#xD;&#xA;        // Sign and send the extrinsic&#xD;&#xA;        const { nonce } = await this.api.query.system.account(fromAccount.address);&#xD;&#xA;        const signedExtrinsic = extrinsic.sign(fromAccount, { nonce });&#xD;&#xA;    &#xD;&#xA;        // Submit the transaction and return the result&#xD;&#xA;        const result = await new Promise((resolve, reject) =&gt; {&#xD;&#xA;          signedExtrinsic.send(({ status, events }) =&gt; {&#xD;&#xA;            if (status.isInBlock || status.isFinalized) {&#xD;&#xA;              events.forEach(({ event }) =&gt; {&#xD;&#xA;                if (event.section === 'system' &amp;&amp; event.method === 'ExtrinsicFailed') {&#xD;&#xA;                  reject(new Error('Extrinsic failed'));&#xD;&#xA;                } else if (event.section === 'system' &amp;&amp; event.method === 'ExtrinsicSuccess') {&#xD;&#xA;                  resolve({ blockHash: status.asInBlock.toHex() });&#xD;&#xA;                }&#xD;&#xA;              });&#xD;&#xA;            }&#xD;&#xA;          }).catch((error) =&gt; {&#xD;&#xA;            reject(error);&#xD;&#xA;          });&#xD;&#xA;        });&#xD;&#xA;    &#xD;&#xA;        return result;&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;it show me this error : &#xD;&#xA;&#xD;&#xA;`Transaction failed: Cannot read properties of undefined (reading 'specVersion')`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**what the problem ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33187" PostHistoryTypeId="1" PostId="8456" RevisionGUID="600c257b-34af-4835-8201-f494f333d0c3" CreationDate="2023-05-11T09:08:48.493" UserId="3469" Text="create wallet for use in substrate and nodejs" ContentLicense="CC BY-SA 4.0" />
  <row Id="33188" PostHistoryTypeId="3" PostId="8456" RevisionGUID="600c257b-34af-4835-8201-f494f333d0c3" CreationDate="2023-05-11T09:08:48.493" UserId="3469" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33189" PostHistoryTypeId="4" PostId="8456" RevisionGUID="e603dd4f-b8d6-4689-b498-26a301704635" CreationDate="2023-05-11T09:09:30.777" UserId="3469" Comment="edited title" Text="problem with sign wallet for use in substrate and nodejs : Cannot read properties of undefined (reading 'specVersion')" ContentLicense="CC BY-SA 4.0" />
  <row Id="33190" PostHistoryTypeId="5" PostId="8448" RevisionGUID="b089c7b2-e13d-4e5d-aebf-a16b17c33206" CreationDate="2023-05-11T09:48:17.357" UserId="3319" Comment="added 1593 characters in body" Text="in the [project][1] we are currently working on, we declared some [runtime apis][2] in our custom pallet, we tried to update the dependecies from `0.9.28` to `0.9.42` but the build fails with the following error:&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `R: pallet::Config` is not satisfied&#xD;&#xA;       --&gt; pallet/src/lib.rs:196:2&#xD;&#xA;        |&#xD;&#xA;    196 | /     sp_api::decl_runtime_apis! {&#xD;&#xA;    197 | |         /// Get extrinsic ids from a vector of extrinsics&#xD;&#xA;    198 | |         /// that should be used to quickly retrieve all the event ids (hashes) given a vector of&#xD;&#xA;    199 | |         /// extrinsics currently used to inspect the proposed block event ids and whether they are&#xD;&#xA;    ...   |&#xD;&#xA;    210 | |         }&#xD;&#xA;    211 | |     }&#xD;&#xA;        | |_____^ the trait `pallet::Config` is not implemented for `R`&#xD;&#xA;        |&#xD;&#xA;        = note: this error originates in the macro `sp_api::decl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    help: consider further restricting type parameter `R`&#xD;&#xA;        |&#xD;&#xA;    211 |     }, R: pallet::Config&#xD;&#xA;        |      +++++++++++++++++++&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;&#xD;&#xA;this error is a bit misleading as far as i understand since im already implementing pallet::Config, so i i decided to run a minimal setup with substrate-node-template and see if there are any problems with the macro itself.&#xD;&#xA;&#xD;&#xA;in the latest version in substrate-node-template, i tried adding the following runtime api in the template pallet:&#xD;&#xA;&#xD;&#xA;    sp_api::decl_runtime_apis! {&#xD;&#xA;    	pub trait ExtrinsicDetails&lt;R&gt; where R:crate::Config&#xD;&#xA;    	{&#xD;&#xA;    		fn dummy_test(runtime: R::length) -&gt; R;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;given that i declare length in the pallet::Config like this:&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;    	/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    	type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    	/// Type representing the weight of this pallet&#xD;&#xA;    	type WeightInfo: WeightInfo;&#xD;&#xA;        #[pallet::constant]&#xD;&#xA;        type length: Get&lt;u32&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and implemented like this: &#xD;&#xA;&#xD;&#xA;    impl pallet_template::Config for Runtime {&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type WeightInfo = pallet_template::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    	type length = ConstU32&lt;100&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;it kept throwing this error:&#xD;&#xA;&#xD;&#xA;     error[E0220]: associated type `length` not found for `R`&#xD;&#xA;         --&gt; /home/coder/project/substrate-node-template/pallets/template/src/lib.rs:114:30&#xD;&#xA;          |&#xD;&#xA;      114 |             fn dummy_test(runtime: R::length) -&gt; R;&#xD;&#xA;          |                                       ^^^^^^ there is a similarly named associated type `length` in the trait `pallet::Config`&#xD;&#xA;&#xD;&#xA;even though it has the same name, i also tried using `pallet::Config` instead of `crate::Config` and also just `Config`, all have the same error.&#xD;&#xA;&#xD;&#xA;Ps: same code was working in 0.9.28&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/revoltez/validated-streams/&#xD;&#xA;  [2]: https://github.com/revoltez/validated-streams/blob/51d5a3ebbd5ee5177c11792562fb8ba986a8f2b8/pallet/src/lib.rs#L196-L214" ContentLicense="CC BY-SA 4.0" />
  <row Id="33191" PostHistoryTypeId="2" PostId="8457" RevisionGUID="4a888f52-18d7-4c3c-b64e-01f234d950b5" CreationDate="2023-05-11T10:07:26.000" UserId="4210" Text="Do you know if it is possible to create a substrate pallet that implements a specific function/message that when it is sent within TX other validators pick it up and can respond to it? &#xD;&#xA;&#xD;&#xA;Something like a ping protocol on the chain. &#xD;&#xA;&#xD;&#xA;We send TX with PING VALIDATOR X and VALIDATOR X can respond with PONG. &#xD;&#xA;&#xD;&#xA;Thank you for any replies. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33193" PostHistoryTypeId="1" PostId="8457" RevisionGUID="4a888f52-18d7-4c3c-b64e-01f234d950b5" CreationDate="2023-05-11T10:07:26.000" UserId="4210" Text="On chain protocol for validator" ContentLicense="CC BY-SA 4.0" />
  <row Id="33194" PostHistoryTypeId="3" PostId="8457" RevisionGUID="4a888f52-18d7-4c3c-b64e-01f234d950b5" CreationDate="2023-05-11T10:07:26.000" UserId="4210" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33198" PostHistoryTypeId="2" PostId="8458" RevisionGUID="084d6d44-d7db-4c63-a292-45a7b50093f1" CreationDate="2023-05-11T11:48:11.907" UserId="2762" Text="Yes is possible to create a pallet with that logic.&#xD;&#xA;&#xD;&#xA;I'd suggest you first of all check the workshop: [Create a new pallet][1] from the Substrate docs where you'll learn how to create a custom Substrate pallet from scratch.&#xD;&#xA;&#xD;&#xA;And after take a look into this FRAME pallet that has a logic similar as the one you want to implement: [pallet_im_online][2].&#xD;&#xA;&#xD;&#xA;&gt; Allows validators to gossip a heartbeat transaction with each new&#xD;&#xA;&gt; session to signal that the node is online.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/collectibles-workshop/03-create-pallet/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/im-online/README.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="33200" PostHistoryTypeId="2" PostId="8459" RevisionGUID="af552557-e811-4345-b499-cd90f5c39b62" CreationDate="2023-05-11T12:45:30.713" UserId="3123" Text="I'm implementing a client based on `subxt`, and have difficulties with subxt errors:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;the trait `From&lt;Result&lt;std::option::Option&lt;u32&gt;, subxt::Error&gt;&gt;` is not implemented for `Result&lt;std::option::Option&lt;u32&gt;, anyhow::Error&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I see that subxt's error type derives from [thiserror][1] which should implement `std::error::Error` trait.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Debug, thiserror::Error)]&#xD;&#xA;pub enum Error {&#xD;&#xA;    // [...]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From [anyhow][2] side, it should accept any type implementing the `std::error::Error` trait.&#xD;&#xA;&#xD;&#xA;Is there some particular configuration of `#[subxt::subxt(_____)]` for error type to derive error trait? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/thiserror/latest/thiserror/&#xD;&#xA;  [2]: https://docs.rs/anyhow/latest/anyhow/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33202" PostHistoryTypeId="1" PostId="8459" RevisionGUID="af552557-e811-4345-b499-cd90f5c39b62" CreationDate="2023-05-11T12:45:30.713" UserId="3123" Text="Why do subxt::Error not fit in anyhow::Error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33203" PostHistoryTypeId="3" PostId="8459" RevisionGUID="af552557-e811-4345-b499-cd90f5c39b62" CreationDate="2023-05-11T12:45:30.713" UserId="3123" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33204" PostHistoryTypeId="5" PostId="8455" RevisionGUID="2bd9d451-8375-437a-9952-62c194dd8a92" CreationDate="2023-05-11T13:09:23.513" UserId="4208" Comment="deleted 6 characters in body" Text="I was looking to implement smart-contract into substrate-node-template as I do not want to use substrate-contracts-node. &#xD;&#xA;I was trying to follow this guide - https://substrate-developer-hub.github.io/substrate-how-to-guides/docs/pallet-design/add-contracts-pallet/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, I went into this error the moment I've insert the dependencies and tried ```cargo build```.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# Contracts specific packages&#xD;&#xA;pallet-contracts = { git = &quot;https://github.com/paritytech/substrate&quot;, package = &quot;pallet-contracts&quot;, default-features = false, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;pallet-contracts-primitives = { git = &quot;https://github.com/paritytech/substrate&quot;, package = &quot;pallet-contracts-primitives&quot;, default-features = false, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There are a total of 11 errors and these are two of most common ones.&#xD;&#xA;```&#xD;&#xA;error: cannot find macro `vec` in this scope&#xD;&#xA;   --&gt; /home/&lt;name&gt;/.cargo/git/checkouts/substrate-7e08433d4c370a21/3bb3882/frame/contracts/src/lib.rs:549:6&#xD;&#xA;    |&#xD;&#xA;549 |                     vec![T::Hashing::hash_of(&amp;dest), code_hash, contract.code_hash],&#xD;&#xA;&#xD;&#xA;error: cannot find macro `thread_local` in this scope&#xD;&#xA;   --&gt; /home/&lt;name&gt;/.cargo/git/checkouts/substrate-7e08433d4c370a21/3bb3882/frame/contracts/src/lib.rs:975:3&#xD;&#xA;    |&#xD;&#xA;975 |         environmental!(executing_contract: bool);&#xD;&#xA;    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My current setup is vanilla, cloned from - https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;&#xD;&#xA;This is my current rustc version&#xD;&#xA;```&#xD;&#xA;rustup 1.26.0 (5af9b9484 2023-04-05)&#xD;&#xA;info: This is the version for the rustup toolchain manager, not the rustc compiler.&#xD;&#xA;info: The currently active `rustc` version is `rustc 1.71.0-nightly (74c482104 2023-05-04)`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Things I tried to do:&#xD;&#xA;- Changing the toolchain version to nightly-2023-01-01-x86_64-unknown-linux-gnu&#xD;&#xA;- Tried to follow this: https://substrate.stackexchange.com/questions/7031/problem-adding-a-smart-contract-into-a-substrate-node&#xD;&#xA;- Clean install&#xD;&#xA;&#xD;&#xA;Side note: is there any updated tutorial on implementing smart contract into substrate node template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33206" PostHistoryTypeId="2" PostId="8461" RevisionGUID="59cfda0e-8e29-437b-8682-293dbef4216a" CreationDate="2023-05-11T13:10:13.817" UserId="4208" Text="I am using substrate-contracts-node. I've uploaded and instantiated the smart contract.&#xD;&#xA;I will like to interact and query the function using py-subtrate-interface. However, I ran into an error while following this guide - https://polkascan.github.io/py-substrate-interface/usage/ink-contract-interfacing/#deploy-a-contract&#xD;&#xA;&#xD;&#xA;This is my code: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;contract_address = '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31'&#xD;&#xA;# Create contract instance from deterministic address&#xD;&#xA;contract = ContractInstance.create_from_address(&#xD;&#xA;    contract_address=contract_address,&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), '/home/&lt;name&gt;/TODO-List/todo_list/target/ink', 'metadata.json'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;result = contract.read(keypair, 'get_owner')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the error message:&#xD;&#xA;```&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/types.py&quot;, line 1232, in process&#xD;&#xA;    enum_type_mapping = self.type_mapping[self.index]&#xD;&#xA;IndexError: list index out of range&#xD;&#xA;&#xD;&#xA;During handling of the above exception, another exception occurred:&#xD;&#xA;&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;main.py&quot;, line 24, in &lt;module&gt;&#xD;&#xA;    result = contract.read(keypair, 'get_owner')&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/substrateinterface/contracts.py&quot;, line 766, in read&#xD;&#xA;    call_result = self.substrate.runtime_call(&quot;ContractsApi&quot;, &quot;call&quot;, {&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/substrateinterface/base.py&quot;, line 1258, in runtime_call&#xD;&#xA;    result_obj.decode(ScaleBytes(result_data['result']))&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/base.py&quot;, line 874, in decode&#xD;&#xA;    self.value_serialized = self.process()&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/types.py&quot;, line 1755, in process&#xD;&#xA;    value = super().process()&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/types.py&quot;, line 1245, in process&#xD;&#xA;    raise ValueError(&quot;Index '{}' not present in Enum type mapping&quot;.format(self.index))&#xD;&#xA;ValueError: Index '202' not present in Enum type mapping&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Smart contract was tested and built without any issue. `get_owner()` is a simple function in smart contract to return an AccountId." ContentLicense="CC BY-SA 4.0" />
  <row Id="33208" PostHistoryTypeId="1" PostId="8461" RevisionGUID="59cfda0e-8e29-437b-8682-293dbef4216a" CreationDate="2023-05-11T13:10:13.817" UserId="4208" Text="Error calling smart contract with py-susbtrate-interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="33209" PostHistoryTypeId="3" PostId="8461" RevisionGUID="59cfda0e-8e29-437b-8682-293dbef4216a" CreationDate="2023-05-11T13:10:13.817" UserId="4208" Text="|substrate-contracts-node|substrateinterface|python|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33213" PostHistoryTypeId="2" PostId="8462" RevisionGUID="2cda0eb1-b596-4157-bde9-587a981f1b37" CreationDate="2023-05-11T14:50:25.830" UserId="3035" Text="Not sure if this what you are looking for, but you could have a higher abstraction for your `do_things`, a `DoThings` trait. Your `pallet2` via `Config` will depend from a higher abstraction `DoThings`.&#xD;&#xA;&#xD;&#xA;Example:&#xD;&#xA;`Preimage` type of `Scheduler`'s pallet config, it is defined as a type requiring `QueryPreimage` and `StorePreimage` traits, and one of the implementations of these traits is `Preimage` pallet.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/e2c5a564e5a83e1f63d47a4fa300567901f00afc/frame/scheduler/src/lib.rs#L230&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33215" PostHistoryTypeId="2" PostId="8463" RevisionGUID="7239dccf-46b3-4f63-837f-e53596b77fdc" CreationDate="2023-05-11T15:15:32.323" UserId="3035" Text="There are few tool which might be useful, &#xD;&#xA;- [subxt][1] - a library to submit extrinsics to a substrate node via RPC. (from its readme)&#xD;&#xA;- XCM emulator to test XCM configurations - [original location][2], [fork in cumulus][3]&#xD;&#xA;- [parachains-integration-tests][4] - define your chains in a config,  describe you test cases in yaml file and run them. Note this tool is at alfa stage, but it works and we using it. You are welcome to help us to improve it. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt&#xD;&#xA;  [2]: https://github.com/shaunxw/xcm-simulator/tree/master/xcm-emulator&#xD;&#xA;  [3]: https://github.com/paritytech/cumulus/pull/2447&#xD;&#xA;  [4]: https://github.com/paritytech/parachains-integration-tests/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33217" PostHistoryTypeId="2" PostId="8464" RevisionGUID="fb681cad-7bd9-4fa4-91ce-86ae627f291d" CreationDate="2023-05-11T15:38:44.247" UserId="3035" Text="if I understand you right, you probably want to have some account id associated to a particular exchange from your example. You can create a system account for it, for example combining some prefix `sacc/exch` + `asset_id`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[System Accounts][1] &#xD;&#xA;&#xD;&#xA;[Example][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-account-advanced#system-accounts&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/blob/e623cf170826a531a8fb1b6b839e6a7ce56e9c62/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs#L480" ContentLicense="CC BY-SA 4.0" />
  <row Id="33219" PostHistoryTypeId="2" PostId="8465" RevisionGUID="dca8f083-3075-4713-8c6a-f683669b0ac2" CreationDate="2023-05-11T16:08:12.633" UserId="3035" Text="I had the same challenge, but could not find a way.&#xD;&#xA;At the end I listed my addresses as [u8;32] but using `hex-literal`for some ergonomic, and had a [std] test asserting the list against the same list of address in `ss58` format. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33221" PostHistoryTypeId="2" PostId="8466" RevisionGUID="f5dabc63-3009-4292-977f-81bc16046934" CreationDate="2023-05-11T18:11:32.783" UserId="29" Text="This is a good basic tutorial on adding a pallet (I am sure you are aware of it):&#xD;&#xA;- https://docs.substrate.io/tutorials/build-application-logic/add-a-pallet&#xD;&#xA;&#xD;&#xA;Generally speaking, whenever I want to add a pallet, I refer to the &quot;kitchensink&quot; runtime, as it has a conglomerate of pallets already configured:&#xD;&#xA;- https://github.com/paritytech/substrate/blob/a87e56f1696cae44593cdc069a01d8bed0bab636/bin/node/runtime/src/lib.rs#L1808&#xD;&#xA;&#xD;&#xA;I also put together a repo for you. It is the substrate-node-template with pallet contracts. You can follow the commits to see how I added it.&#xD;&#xA;- https://github.com/brunopgalvao/substrate-contracts-template&#xD;&#xA;&#xD;&#xA;Keep in mind this is for demo purposes and the you may want to change the contracts pallet config to your liking." ContentLicense="CC BY-SA 4.0" />
  <row Id="33223" PostHistoryTypeId="2" PostId="8467" RevisionGUID="f2033ebc-cf68-434e-883f-9cc0593ea8fb" CreationDate="2023-05-11T19:01:53.607" UserId="29" Text="Try initializing your API like so:&#xD;&#xA;```js&#xD;&#xA;const wsProvider = new WsProvider(this.endpoint);&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also, here is some working code that may help you.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;&#xD;&#xA;import { mnemonicGenerate } from '@polkadot/util-crypto'&#xD;&#xA;import { Keyring } from '@polkadot/keyring';&#xD;&#xA;&#xD;&#xA;// const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;const wsProvider = new WsProvider(&quot;ws://127.0.0.1:54185&quot;);&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;const mnemonic = mnemonicGenerate();&#xD;&#xA;const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;const brunoPair = keyring.addFromUri(mnemonic, { name: 'Bruno' }, 'sr25519');&#xD;&#xA;console.log(brunoPair.meta.name, 'has address', brunoPair.address);&#xD;&#xA;&#xD;&#xA;// For testing purposes&#xD;&#xA;const alicePair = keyring.addFromUri('//Alice');&#xD;&#xA;const bobPair = keyring.addFromUri('//Bob');&#xD;&#xA;&#xD;&#xA;export const createAccount = async () =&gt; {&#xD;&#xA;&#xD;&#xA;    const mnemonic = mnemonicGenerate();&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;    const pair = keyring.addFromUri(mnemonic, { name: 'Bruno' }, 'sr25519');&#xD;&#xA;    console.log(pair.meta.name, 'has address', pair.address);&#xD;&#xA;&#xD;&#xA;    return {&#xD;&#xA;      pair, &#xD;&#xA;      mnemonic,&#xD;&#xA;      address: pair.address,&#xD;&#xA;      publicKey: pair.publicKey.toString('hex'),&#xD;&#xA;    };&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  console.log(`New account: {}`, await createAccount());&#xD;&#xA;&#xD;&#xA;  const transfer = async (fromAccount, toAddress, amount) =&gt; {&#xD;&#xA;    &#xD;&#xA;    const { nonce } = await api.query.system.account(fromAccount);&#xD;&#xA;&#xD;&#xA;    // You need to get the account from the keyring&#xD;&#xA;    const fromAccountPair = keyring.getPair(fromAccount);&#xD;&#xA;&#xD;&#xA;    api.tx.balances.transfer(toAddress, amount).signAndSend(fromAccountPair, { nonce }, ({ events = [], status }) =&gt; {&#xD;&#xA;        console.log('Transaction status:', status.type);&#xD;&#xA;  &#xD;&#xA;        if (status.isInBlock) {&#xD;&#xA;          console.log('Included at block hash', status.asInBlock.toHex());&#xD;&#xA;          console.log('Events:');&#xD;&#xA;  &#xD;&#xA;          events.forEach(({ event: { data, method, section }, phase }) =&gt; {&#xD;&#xA;            console.log('\t', phase.toString(), `: ${section}.${method}`, data.toString());&#xD;&#xA;          });&#xD;&#xA;        } else if (status.isFinalized) {&#xD;&#xA;          console.log('Finalized block hash', status.asFinalized.toHex());&#xD;&#xA;  &#xD;&#xA;          process.exit(0);&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  // transfer from Alice to Bob&#xD;&#xA;  transfer(alicePair.address, bobPair.address, 7000000000000000);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33225" PostHistoryTypeId="2" PostId="8468" RevisionGUID="00910357-84d9-4dea-8c00-b47fee5ba80c" CreationDate="2023-05-11T19:38:14.300" UserId="3407" Text="To answer the question of &quot;Do I need to worry about access control for `do_things` if other pallets can call it?&quot;, the answer is no, you don't need to worry. Even though it is accessible from other pallets, only the one deploying an appchain or parachain can choose which pallets exist and what they do. As long as you make sure that there are appropriate access control checks whenever an extrinsic causes `pallet2` to call `pallet1::do_things`, you'll be fine.&#xD;&#xA;&#xD;&#xA;For these public non-extrinsic functions to be executed, they need to be a side effect of someone submitting an extrinsic to one of the pallets running in your chain.&#xD;&#xA;&#xD;&#xA;In general, for functions that change things to be accessible externally, they need to be caused by an extrinsic. So if this function changes any state, it can't meaningfully be called via RPC alone." ContentLicense="CC BY-SA 4.0" />
  <row Id="33227" PostHistoryTypeId="2" PostId="8469" RevisionGUID="77e4d46e-91c4-4e52-b4ea-41d647b8c2c6" CreationDate="2023-05-11T21:25:56.317" UserId="3407" Text="I've repro'd the error with a minimal example, and although the conversion `subxt::Error -&gt; anyhow::Error` is implemented, it is not implemented when wrapped in a result. Thus, you can either manually use `map_err` or the `?` operator.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use anyhow;&#xD;&#xA;use subxt;&#xD;&#xA;&#xD;&#xA;fn failable_func() -&gt; Result&lt;Option&lt;u32&gt;, anyhow::Error&gt; {&#xD;&#xA;    let err = subxt::Error::Other(&quot;Here's an error&quot;.to_string());&#xD;&#xA;    let res: Result&lt;Option&lt;u32&gt;, subxt::Error&gt; = Err(err);&#xD;&#xA;    // The line below would fail to compile, because result -&gt; result&#xD;&#xA;    // let err2 = res.into()&#xD;&#xA;    // But we can manually map the error without issues&#xD;&#xA;    let err2: Result&lt;Option&lt;u32&gt;, anyhow::Error&gt; = res.map_err(|e| e.into());&#xD;&#xA;    // This would also work&#xD;&#xA;    let inner = res?;&#xD;&#xA;    Ok(inner)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33229" PostHistoryTypeId="2" PostId="8470" RevisionGUID="ea349edb-8aaf-4904-8199-105cf9ddf70b" CreationDate="2023-05-11T21:54:58.993" UserId="4135" Text="I am in the process of making the block handler modular (https://github.com/paritytech/substrate/pull/14014 pending now). We have this scenario:&#xD;&#xA;1. `build_network()` expects all the components constructed/passed in before the network is created&#xD;&#xA;2. If say one of these components needs a handle to the network (for example, to perform request/response), this becomes a problem: as the network is not yet created when the component is created.&#xD;&#xA;&#xD;&#xA;We are resorting to some not so nice ways to work around this (e.g) the custom block handler has an `Option&lt;NetworkHandle&lt;Block&gt;&gt;`. This starts as None, eventually gets filled in with a valid handle, so on.&#xD;&#xA;&#xD;&#xA;The sync layer internally works around this using [NetworkServiceHandle][1], which is a wrapper around a channel send end point. But this doesn't work for external users. One possible solution would be to take `Option&lt;NetworkServiceHandle&gt;`(or something equivalent) during the build_network(), so the caller keeps a (cloned) copy of the handle for later use&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sc_network_sync/service/network/struct.NetworkServiceHandle.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="33231" PostHistoryTypeId="1" PostId="8470" RevisionGUID="ea349edb-8aaf-4904-8199-105cf9ddf70b" CreationDate="2023-05-11T21:54:58.993" UserId="4135" Text="Circular dependency" ContentLicense="CC BY-SA 4.0" />
  <row Id="33232" PostHistoryTypeId="3" PostId="8470" RevisionGUID="ea349edb-8aaf-4904-8199-105cf9ddf70b" CreationDate="2023-05-11T21:54:58.993" UserId="4135" Text="|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33233" PostHistoryTypeId="2" PostId="8471" RevisionGUID="e76f6876-bd4f-4b53-bf37-a9c5a57debd7" CreationDate="2023-05-11T22:13:49.200" UserId="2485" Text="i have an rpc call that returns a balance of an asset for a user, balance type is u128. when the number is large i get this error createType(u128):: Number needs to be an integer &lt;= Number.MAX_SAFE_INTEGER, i.e. 2 ^ 53 - 1. I have tried specifying different types to make it cast to u128 but rpc kept failing. CURL for the rpc works in terminal and returns large numbers. Seems like the problem on JS, how can i cast the returned value into a BigInt? Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="33235" PostHistoryTypeId="1" PostId="8471" RevisionGUID="e76f6876-bd4f-4b53-bf37-a9c5a57debd7" CreationDate="2023-05-11T22:13:49.200" UserId="2485" Text="polkadot js RPC can't get u128" ContentLicense="CC BY-SA 4.0" />
  <row Id="33236" PostHistoryTypeId="3" PostId="8471" RevisionGUID="e76f6876-bd4f-4b53-bf37-a9c5a57debd7" CreationDate="2023-05-11T22:13:49.200" UserId="2485" Text="|polkadot-js|rpc|json-rpc|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33238" PostHistoryTypeId="2" PostId="8472" RevisionGUID="4af16c5e-48c5-4723-a250-10675532ec7a" CreationDate="2023-05-12T07:16:52.670" UserId="83" Text="Questions: &#xD;&#xA;* What version of substrate-interface are you using?&#xD;&#xA;* Where is the source code of the todo_list smart contract?&#xD;&#xA;* What network did you deploy the smart contract to that the contract address that you mentioned '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31' corresponds to?&#xD;&#xA;&#xD;&#xA;I just tried to replicate your issue using the following recent versions:&#xD;&#xA;* substrate-interface 1.7.0&#xD;&#xA;* python 3.11&#xD;&#xA;* flipper example smart contract that I generated using cargo contract 2.2.1&#xD;&#xA;&#xD;&#xA;It is shown in your logs that you're using python 3.8. Perhaps you could try using more recent versions?&#xD;&#xA;&#xD;&#xA;I followed the same guide as you with the steps [here][1].&#xD;&#xA;&#xD;&#xA;First I got an error `TypeError: ContractCode.deploy() got an unexpected keyword argument 'endowment'`.&#xD;&#xA;&#xD;&#xA;So I reviewed the substrate-interface 1.7.0 source code that I found at [https://github.com/polkascan/py-substrate-interface/blob/v1.7.0/substrateinterface/contracts.py][2] to discover that argument has been removed, so the guide appears to be outdated.&#xD;&#xA;&#xD;&#xA;Then I got the following error:&#xD;&#xA;```&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 592, in process_encode&#xD;&#xA;    value = {key: value[idx] for idx, (key, _) in enumerate(self.type_mapping)}&#xD;&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 592, in &lt;dictcomp&gt;&#xD;&#xA;    value = {key: value[idx] for idx, (key, _) in enumerate(self.type_mapping)}&#xD;&#xA;                  ~~~~~^^^^^&#xD;&#xA;IndexError: tuple index out of range&#xD;&#xA;&#xD;&#xA;During handling of the above exception, another exception occurred:&#xD;&#xA;&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/app/docker/ink-python/src/app.py&quot;, line 52, in &lt;module&gt;&#xD;&#xA;    contract = code.deploy(&#xD;&#xA;               ^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/substrateinterface/contracts.py&quot;, line 658, in deploy&#xD;&#xA;    call = self.substrate.compose_call(&#xD;&#xA;           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/substrateinterface/base.py&quot;, line 1380, in compose_call&#xD;&#xA;    call.encode({&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/base.py&quot;, line 925, in encode&#xD;&#xA;    self.data = self.process_encode(self.value_serialized)&#xD;&#xA;                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 1687, in process_encode&#xD;&#xA;    data += arg_obj.encode(param_value)&#xD;&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/base.py&quot;, line 925, in encode&#xD;&#xA;    self.data = self.process_encode(self.value_serialized)&#xD;&#xA;                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 594, in process_encode&#xD;&#xA;    raise ValueError(&quot;Not enough items in tuple to match type_mapping&quot;)&#xD;&#xA;ValueError: Not enough items in tuple to match type_mapping&#xD;&#xA;```&#xD;&#xA;That was again caused because that guide is outdated since they are using a an argument value of `gas_limit=1000000000000,` instead of a dictionary tuple like `gas_limit={'ref_time': 25990000000, 'proof_size': 11990},`.&#xD;&#xA;So after I changed that it fully deployed the smart contract to Contracts Rococo successfully and returned `Current value of &quot;get&quot;: {'Ok': True}`.&#xD;&#xA;&#xD;&#xA;I tried replacing my contract address with the contract address that you provided '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31' to see if you had also deployed to Contracts Rococo but that doesn't appear to be the case.&#xD;&#xA;&#xD;&#xA;This is the code I used. Note: I just made up any value for the ref_time and proof_size that worked without causing an OutOfGas error.&#xD;&#xA;```python&#xD;&#xA;import os&#xD;&#xA;from dotenv import load_dotenv&#xD;&#xA;from substrateinterface import SubstrateInterface, Keypair, KeypairType, ContractCode, ContractInstance&#xD;&#xA;&#xD;&#xA;load_dotenv()&#xD;&#xA;&#xD;&#xA;MNEMONIC = os.getenv('MNEMONIC')&#xD;&#xA;&#xD;&#xA;provider_rococo = &quot;wss://rococo-contracts-rpc.polkadot.io&quot;&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=provider_rococo,&#xD;&#xA;    ss58_format=42,&#xD;&#xA;    type_registry_preset='substrate-node-template',&#xD;&#xA;)&#xD;&#xA;keypair_ls = Keypair.create_from_mnemonic(&#xD;&#xA;    MNEMONIC,&#xD;&#xA;    crypto_type=KeypairType.SR25519&#xD;&#xA;)&#xD;&#xA;print(keypair_ls.ss58_address)&#xD;&#xA;&#xD;&#xA;# deploy contract&#xD;&#xA;up = [os.pardir]*3&#xD;&#xA;go_up = os.path.join(*up)&#xD;&#xA;code = ContractCode.create_from_contract_files(&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.json'),&#xD;&#xA;    wasm_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.wasm'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;contract = code.deploy(&#xD;&#xA;    keypair=keypair_ls,&#xD;&#xA;    constructor=&quot;new&quot;,&#xD;&#xA;    args={'init_value': True},&#xD;&#xA;    value=0,&#xD;&#xA;    gas_limit={'ref_time': 25990000000, 'proof_size': 11990},&#xD;&#xA;    deployment_salt=&quot;&quot;,&#xD;&#xA;    upload_code=True,&#xD;&#xA;    storage_deposit_limit=1000000000000&#xD;&#xA;)&#xD;&#xA;print(f'✅ Deployed @ {contract.contract_address}')&#xD;&#xA;&#xD;&#xA;# create contract instance from deterministic address&#xD;&#xA;contract_existing = ContractInstance.create_from_address(&#xD;&#xA;    contract_address=contract.contract_address,&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.json'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;print(f'Existing deployed @ {contract_existing.contract_address}')&#xD;&#xA;&#xD;&#xA;# read data from contract&#xD;&#xA;result = contract_existing.read(keypair_ls, 'get')&#xD;&#xA;print('Current value of &quot;get&quot;:', result.contract_result_data)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://polkascan.github.io/py-substrate-interface/usage/ink-contract-interfacing/&#xD;&#xA;  [2]: https://github.com/polkascan/py-substrate-interface/blob/v1.7.0/substrateinterface/contracts.py" ContentLicense="CC BY-SA 4.0" />
  <row Id="33240" PostHistoryTypeId="5" PostId="8461" RevisionGUID="b68ba44e-1dc5-4459-9487-a282062578f2" CreationDate="2023-05-12T07:19:45.767" UserId="83" Comment="typos" Text="I am using substrate-contracts-node. I've uploaded and instantiated the smart contract.&#xD;&#xA;I will like to interact and query the function using py-substrate-interface. However, I ran into an error while following this guide - https://polkascan.github.io/py-substrate-interface/usage/ink-contract-interfacing/#deploy-a-contract&#xD;&#xA;&#xD;&#xA;This is my code: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;contract_address = '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31'&#xD;&#xA;# Create contract instance from deterministic address&#xD;&#xA;contract = ContractInstance.create_from_address(&#xD;&#xA;    contract_address=contract_address,&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), '/home/&lt;name&gt;/TODO-List/todo_list/target/ink', 'metadata.json'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;result = contract.read(keypair, 'get_owner')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the error message:&#xD;&#xA;```&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/types.py&quot;, line 1232, in process&#xD;&#xA;    enum_type_mapping = self.type_mapping[self.index]&#xD;&#xA;IndexError: list index out of range&#xD;&#xA;&#xD;&#xA;During handling of the above exception, another exception occurred:&#xD;&#xA;&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;main.py&quot;, line 24, in &lt;module&gt;&#xD;&#xA;    result = contract.read(keypair, 'get_owner')&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/substrateinterface/contracts.py&quot;, line 766, in read&#xD;&#xA;    call_result = self.substrate.runtime_call(&quot;ContractsApi&quot;, &quot;call&quot;, {&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/substrateinterface/base.py&quot;, line 1258, in runtime_call&#xD;&#xA;    result_obj.decode(ScaleBytes(result_data['result']))&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/base.py&quot;, line 874, in decode&#xD;&#xA;    self.value_serialized = self.process()&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/types.py&quot;, line 1755, in process&#xD;&#xA;    value = super().process()&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/types.py&quot;, line 1245, in process&#xD;&#xA;    raise ValueError(&quot;Index '{}' not present in Enum type mapping&quot;.format(self.index))&#xD;&#xA;ValueError: Index '202' not present in Enum type mapping&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Smart contract was tested and built without any issue. `get_owner()` is a simple function in smart contract to return an AccountId." ContentLicense="CC BY-SA 4.0" />
  <row Id="33241" PostHistoryTypeId="4" PostId="8461" RevisionGUID="b68ba44e-1dc5-4459-9487-a282062578f2" CreationDate="2023-05-12T07:19:45.767" UserId="83" Comment="typos" Text="Error calling smart contract with py-substrate-interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="33242" PostHistoryTypeId="5" PostId="8472" RevisionGUID="7fb12fb2-61a7-45db-8c46-74961eb13c75" CreationDate="2023-05-12T07:24:11.413" UserId="83" Comment="update since they actually did mention where they deployed it" Text="Questions: &#xD;&#xA;* What version of substrate-interface are you using?&#xD;&#xA;* Where is the source code of the todo_list smart contract?&#xD;&#xA;&#xD;&#xA;Perhaps you could try using more recent version of both substrate-interface and python?&#xD;&#xA;&#xD;&#xA;I understand that you used [substrate-contracts-node][1] to deploy the smart contract to a local testnet on your machine at '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31'.&#xD;&#xA;&#xD;&#xA;I just tried to replicate your issue using the following recent versions:&#xD;&#xA;* substrate-interface 1.7.0&#xD;&#xA;* python 3.11&#xD;&#xA;* flipper example smart contract that I generated using cargo contract 2.2.1&#xD;&#xA;&#xD;&#xA;It is shown in your logs that you're using and older version of python 3.8.&#xD;&#xA;&#xD;&#xA;I followed the same guide as you with the steps [here][2].&#xD;&#xA;&#xD;&#xA;First I got an error `TypeError: ContractCode.deploy() got an unexpected keyword argument 'endowment'`.&#xD;&#xA;&#xD;&#xA;So I reviewed the substrate-interface 1.7.0 source code that I found at [https://github.com/polkascan/py-substrate-interface/blob/v1.7.0/substrateinterface/contracts.py][3] to discover that argument has been removed, so the guide appears to be outdated.&#xD;&#xA;&#xD;&#xA;Then I got the following error:&#xD;&#xA;```&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 592, in process_encode&#xD;&#xA;    value = {key: value[idx] for idx, (key, _) in enumerate(self.type_mapping)}&#xD;&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 592, in &lt;dictcomp&gt;&#xD;&#xA;    value = {key: value[idx] for idx, (key, _) in enumerate(self.type_mapping)}&#xD;&#xA;                  ~~~~~^^^^^&#xD;&#xA;IndexError: tuple index out of range&#xD;&#xA;&#xD;&#xA;During handling of the above exception, another exception occurred:&#xD;&#xA;&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/app/docker/ink-python/src/app.py&quot;, line 52, in &lt;module&gt;&#xD;&#xA;    contract = code.deploy(&#xD;&#xA;               ^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/substrateinterface/contracts.py&quot;, line 658, in deploy&#xD;&#xA;    call = self.substrate.compose_call(&#xD;&#xA;           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/substrateinterface/base.py&quot;, line 1380, in compose_call&#xD;&#xA;    call.encode({&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/base.py&quot;, line 925, in encode&#xD;&#xA;    self.data = self.process_encode(self.value_serialized)&#xD;&#xA;                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 1687, in process_encode&#xD;&#xA;    data += arg_obj.encode(param_value)&#xD;&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/base.py&quot;, line 925, in encode&#xD;&#xA;    self.data = self.process_encode(self.value_serialized)&#xD;&#xA;                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 594, in process_encode&#xD;&#xA;    raise ValueError(&quot;Not enough items in tuple to match type_mapping&quot;)&#xD;&#xA;ValueError: Not enough items in tuple to match type_mapping&#xD;&#xA;```&#xD;&#xA;That was again caused because that guide is outdated since they are using a an argument value of `gas_limit=1000000000000,` instead of a dictionary tuple like `gas_limit={'ref_time': 25990000000, 'proof_size': 11990},`.&#xD;&#xA;So after I changed that it fully deployed the smart contract to Contracts Rococo successfully and returned `Current value of &quot;get&quot;: {'Ok': True}`.&#xD;&#xA;&#xD;&#xA;I tried replacing my contract address with the contract address that you provided '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31' to see if you had also deployed to Contracts Rococo but that doesn't appear to be the case.&#xD;&#xA;&#xD;&#xA;This is the code I used. Note: I just made up any value for the ref_time and proof_size that worked without causing an OutOfGas error.&#xD;&#xA;```python&#xD;&#xA;import os&#xD;&#xA;from dotenv import load_dotenv&#xD;&#xA;from substrateinterface import SubstrateInterface, Keypair, KeypairType, ContractCode, ContractInstance&#xD;&#xA;&#xD;&#xA;load_dotenv()&#xD;&#xA;&#xD;&#xA;MNEMONIC = os.getenv('MNEMONIC')&#xD;&#xA;&#xD;&#xA;provider_rococo = &quot;wss://rococo-contracts-rpc.polkadot.io&quot;&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=provider_rococo,&#xD;&#xA;    ss58_format=42,&#xD;&#xA;    type_registry_preset='substrate-node-template',&#xD;&#xA;)&#xD;&#xA;keypair_ls = Keypair.create_from_mnemonic(&#xD;&#xA;    MNEMONIC,&#xD;&#xA;    crypto_type=KeypairType.SR25519&#xD;&#xA;)&#xD;&#xA;print(keypair_ls.ss58_address)&#xD;&#xA;&#xD;&#xA;# deploy contract&#xD;&#xA;up = [os.pardir]*3&#xD;&#xA;go_up = os.path.join(*up)&#xD;&#xA;code = ContractCode.create_from_contract_files(&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.json'),&#xD;&#xA;    wasm_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.wasm'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;contract = code.deploy(&#xD;&#xA;    keypair=keypair_ls,&#xD;&#xA;    constructor=&quot;new&quot;,&#xD;&#xA;    args={'init_value': True},&#xD;&#xA;    value=0,&#xD;&#xA;    gas_limit={'ref_time': 25990000000, 'proof_size': 11990},&#xD;&#xA;    deployment_salt=&quot;&quot;,&#xD;&#xA;    upload_code=True,&#xD;&#xA;    storage_deposit_limit=1000000000000&#xD;&#xA;)&#xD;&#xA;print(f'✅ Deployed @ {contract.contract_address}')&#xD;&#xA;&#xD;&#xA;# create contract instance from deterministic address&#xD;&#xA;contract_existing = ContractInstance.create_from_address(&#xD;&#xA;    contract_address=contract.contract_address,&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.json'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;print(f'Existing deployed @ {contract_existing.contract_address}')&#xD;&#xA;&#xD;&#xA;# read data from contract&#xD;&#xA;result = contract_existing.read(keypair_ls, 'get')&#xD;&#xA;print('Current value of &quot;get&quot;:', result.contract_result_data)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [2]: https://polkascan.github.io/py-substrate-interface/usage/ink-contract-interfacing/&#xD;&#xA;  [3]: https://github.com/polkascan/py-substrate-interface/blob/v1.7.0/substrateinterface/contracts.py" ContentLicense="CC BY-SA 4.0" />
  <row Id="33243" PostHistoryTypeId="2" PostId="8473" RevisionGUID="ec63ff00-9539-4900-b06a-7d28c3e12b7e" CreationDate="2023-05-12T08:24:50.073" UserId="49" Text="Cumulus ties the parachain and the relaychain together, allowing to exchange essential information necessary for the block production of the parachain. Since a parachain collator must build a block (currently) within a limited time frame after the latest relaychain block, it is dependent on the speed of the relaychain node that provides that data within the Cumulus context.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Assuming that both nodes live on the same server, how much do the relaychain node hardware requirements dictate the minimum parachain node hardware requirements?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33245" PostHistoryTypeId="1" PostId="8473" RevisionGUID="ec63ff00-9539-4900-b06a-7d28c3e12b7e" CreationDate="2023-05-12T08:24:50.073" UserId="49" Text="How much do relaychain node hardware requirements dictate the parachain collator hardware requirements?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33246" PostHistoryTypeId="3" PostId="8473" RevisionGUID="ec63ff00-9539-4900-b06a-7d28c3e12b7e" CreationDate="2023-05-12T08:24:50.073" UserId="49" Text="|parachain|relay-chain|block-production|collator|hardware|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33247" PostHistoryTypeId="5" PostId="8472" RevisionGUID="322576ba-3d9c-4699-af7a-7808fc687d2f" CreationDate="2023-05-12T08:35:35.397" UserId="83" Comment="repo indicates python 3.8 supported" Text="Questions: &#xD;&#xA;* What version of substrate-interface are you using?&#xD;&#xA;* Where is the source code of the todo_list smart contract?&#xD;&#xA;&#xD;&#xA;Perhaps you could try using a more recent version of both substrate-interface, and python even though you're using version 3.8 and the repo indicates that it's supported.&#xD;&#xA;&#xD;&#xA;I understand that you used [substrate-contracts-node][1] to deploy the smart contract to a local testnet on your machine at '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31'.&#xD;&#xA;&#xD;&#xA;I just tried to replicate your issue using the following recent versions:&#xD;&#xA;* substrate-interface 1.7.0&#xD;&#xA;* python 3.11&#xD;&#xA;* flipper example smart contract that I generated using cargo contract 2.2.1&#xD;&#xA;&#xD;&#xA;I followed the same guide as you with the steps [here][2].&#xD;&#xA;&#xD;&#xA;First I got an error `TypeError: ContractCode.deploy() got an unexpected keyword argument 'endowment'`.&#xD;&#xA;&#xD;&#xA;So I reviewed the substrate-interface 1.7.0 source code that I found at [https://github.com/polkascan/py-substrate-interface/blob/v1.7.0/substrateinterface/contracts.py][3] to discover that argument has been removed, so the guide appears to be outdated.&#xD;&#xA;&#xD;&#xA;Then I got the following error:&#xD;&#xA;```&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 592, in process_encode&#xD;&#xA;    value = {key: value[idx] for idx, (key, _) in enumerate(self.type_mapping)}&#xD;&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 592, in &lt;dictcomp&gt;&#xD;&#xA;    value = {key: value[idx] for idx, (key, _) in enumerate(self.type_mapping)}&#xD;&#xA;                  ~~~~~^^^^^&#xD;&#xA;IndexError: tuple index out of range&#xD;&#xA;&#xD;&#xA;During handling of the above exception, another exception occurred:&#xD;&#xA;&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/app/docker/ink-python/src/app.py&quot;, line 52, in &lt;module&gt;&#xD;&#xA;    contract = code.deploy(&#xD;&#xA;               ^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/substrateinterface/contracts.py&quot;, line 658, in deploy&#xD;&#xA;    call = self.substrate.compose_call(&#xD;&#xA;           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/substrateinterface/base.py&quot;, line 1380, in compose_call&#xD;&#xA;    call.encode({&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/base.py&quot;, line 925, in encode&#xD;&#xA;    self.data = self.process_encode(self.value_serialized)&#xD;&#xA;                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 1687, in process_encode&#xD;&#xA;    data += arg_obj.encode(param_value)&#xD;&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/base.py&quot;, line 925, in encode&#xD;&#xA;    self.data = self.process_encode(self.value_serialized)&#xD;&#xA;                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 594, in process_encode&#xD;&#xA;    raise ValueError(&quot;Not enough items in tuple to match type_mapping&quot;)&#xD;&#xA;ValueError: Not enough items in tuple to match type_mapping&#xD;&#xA;```&#xD;&#xA;That was again caused because that guide is outdated since they are using a an argument value of `gas_limit=1000000000000,` instead of a dictionary tuple like `gas_limit={'ref_time': 25990000000, 'proof_size': 11990},`.&#xD;&#xA;So after I changed that it fully deployed the smart contract to Contracts Rococo successfully and returned `Current value of &quot;get&quot;: {'Ok': True}`.&#xD;&#xA;&#xD;&#xA;I tried replacing my contract address with the contract address that you provided '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31' to see if you had also deployed to Contracts Rococo but that doesn't appear to be the case.&#xD;&#xA;&#xD;&#xA;This is the code I used. Note: I just made up any value for the ref_time and proof_size that worked without causing an OutOfGas error.&#xD;&#xA;```python&#xD;&#xA;import os&#xD;&#xA;from dotenv import load_dotenv&#xD;&#xA;from substrateinterface import SubstrateInterface, Keypair, KeypairType, ContractCode, ContractInstance&#xD;&#xA;&#xD;&#xA;load_dotenv()&#xD;&#xA;&#xD;&#xA;MNEMONIC = os.getenv('MNEMONIC')&#xD;&#xA;&#xD;&#xA;provider_rococo = &quot;wss://rococo-contracts-rpc.polkadot.io&quot;&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=provider_rococo,&#xD;&#xA;    ss58_format=42,&#xD;&#xA;    type_registry_preset='substrate-node-template',&#xD;&#xA;)&#xD;&#xA;keypair_ls = Keypair.create_from_mnemonic(&#xD;&#xA;    MNEMONIC,&#xD;&#xA;    crypto_type=KeypairType.SR25519&#xD;&#xA;)&#xD;&#xA;print(keypair_ls.ss58_address)&#xD;&#xA;&#xD;&#xA;# deploy contract&#xD;&#xA;up = [os.pardir]*3&#xD;&#xA;go_up = os.path.join(*up)&#xD;&#xA;code = ContractCode.create_from_contract_files(&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.json'),&#xD;&#xA;    wasm_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.wasm'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;contract = code.deploy(&#xD;&#xA;    keypair=keypair_ls,&#xD;&#xA;    constructor=&quot;new&quot;,&#xD;&#xA;    args={'init_value': True},&#xD;&#xA;    value=0,&#xD;&#xA;    gas_limit={'ref_time': 25990000000, 'proof_size': 11990},&#xD;&#xA;    deployment_salt=&quot;&quot;,&#xD;&#xA;    upload_code=True,&#xD;&#xA;    storage_deposit_limit=1000000000000&#xD;&#xA;)&#xD;&#xA;print(f'✅ Deployed @ {contract.contract_address}')&#xD;&#xA;&#xD;&#xA;# create contract instance from deterministic address&#xD;&#xA;contract_existing = ContractInstance.create_from_address(&#xD;&#xA;    contract_address=contract.contract_address,&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.json'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;print(f'Existing deployed @ {contract_existing.contract_address}')&#xD;&#xA;&#xD;&#xA;# read data from contract&#xD;&#xA;result = contract_existing.read(keypair_ls, 'get')&#xD;&#xA;print('Current value of &quot;get&quot;:', result.contract_result_data)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [2]: https://polkascan.github.io/py-substrate-interface/usage/ink-contract-interfacing/&#xD;&#xA;  [3]: https://github.com/polkascan/py-substrate-interface/blob/v1.7.0/substrateinterface/contracts.py" ContentLicense="CC BY-SA 4.0" />
  <row Id="33248" PostHistoryTypeId="2" PostId="8474" RevisionGUID="d63630d1-f15e-4d6e-a709-2fce0e703f6f" CreationDate="2023-05-12T08:51:24.800" UserId="83" Text="please try using `.toBigInt()` mentioned [here][1] in the Polkadot.js API docs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/start/types.basics/#working-with-numbers" ContentLicense="CC BY-SA 4.0" />
  <row Id="33250" PostHistoryTypeId="5" PostId="8472" RevisionGUID="3689c24c-adab-4e8c-9907-7b7b6b51166b" CreationDate="2023-05-12T09:42:53.723" UserId="83" Comment="Shorten" Text="Questions: &#xD;&#xA;* What version of substrate-interface are you using?&#xD;&#xA;* Where is the source code of the todo_list smart contract?&#xD;&#xA;&#xD;&#xA;Perhaps you could try using a more recent version of both substrate-interface, and python even though you're using version 3.8 and the repo indicates that it's supported.&#xD;&#xA;&#xD;&#xA;I understand that you used [substrate-contracts-node][1] to deploy the smart contract to a local testnet on your machine at '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31'.&#xD;&#xA;&#xD;&#xA;I just tried to replicate your issue using the following recent versions:&#xD;&#xA;* substrate-interface 1.7.0&#xD;&#xA;* python 3.11&#xD;&#xA;* flipper example smart contract that I generated using cargo contract 2.2.1&#xD;&#xA;&#xD;&#xA;I followed the same guide as you with the steps [here][2].&#xD;&#xA;&#xD;&#xA;First I got an error `TypeError: ContractCode.deploy() got an unexpected keyword argument 'endowment'`.&#xD;&#xA;&#xD;&#xA;So I reviewed the substrate-interface 1.7.0 source code that I found at [https://github.com/polkascan/py-substrate-interface/blob/v1.7.0/substrateinterface/contracts.py][3] to discover that argument has been removed, so the guide appears to be outdated.&#xD;&#xA;&#xD;&#xA;Then I got the following error:&#xD;&#xA;```&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 592, in process_encode&#xD;&#xA;    value = {key: value[idx] for idx, (key, _) in enumerate(self.type_mapping)}&#xD;&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 592, in &lt;dictcomp&gt;&#xD;&#xA;    value = {key: value[idx] for idx, (key, _) in enumerate(self.type_mapping)}&#xD;&#xA;                  ~~~~~^^^^^&#xD;&#xA;IndexError: tuple index out of range&#xD;&#xA;&#xD;&#xA;During handling of the above exception, another exception occurred:&#xD;&#xA;&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/app/docker/ink-python/src/app.py&quot;, line 52, in &lt;module&gt;&#xD;&#xA;    contract = code.deploy(&#xD;&#xA;               ^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/substrateinterface/contracts.py&quot;, line 658, in deploy&#xD;&#xA;    call = self.substrate.compose_call(&#xD;&#xA;... &#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 594, in process_encode&#xD;&#xA;    raise ValueError(&quot;Not enough items in tuple to match type_mapping&quot;)&#xD;&#xA;ValueError: Not enough items in tuple to match type_mapping&#xD;&#xA;```&#xD;&#xA;That was again caused because that guide is outdated since they are using a an argument value of `gas_limit=1000000000000,` instead of a dictionary tuple like `gas_limit={'ref_time': 25990000000, 'proof_size': 11990},`.&#xD;&#xA;So after I changed that it fully deployed the smart contract to Contracts Rococo successfully and returned `Current value of &quot;get&quot;: {'Ok': True}`.&#xD;&#xA;&#xD;&#xA;This is the code I used. Note: I just made up any value for the ref_time and proof_size that worked without causing an OutOfGas error.&#xD;&#xA;```python&#xD;&#xA;import os&#xD;&#xA;from dotenv import load_dotenv&#xD;&#xA;from substrateinterface import SubstrateInterface, Keypair, KeypairType, ContractCode, ContractInstance&#xD;&#xA;&#xD;&#xA;load_dotenv()&#xD;&#xA;&#xD;&#xA;MNEMONIC = os.getenv('MNEMONIC')&#xD;&#xA;&#xD;&#xA;provider_rococo = &quot;wss://rococo-contracts-rpc.polkadot.io&quot;&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=provider_rococo,&#xD;&#xA;    ss58_format=42,&#xD;&#xA;    type_registry_preset='substrate-node-template',&#xD;&#xA;)&#xD;&#xA;keypair_ls = Keypair.create_from_mnemonic(&#xD;&#xA;    MNEMONIC,&#xD;&#xA;    crypto_type=KeypairType.SR25519&#xD;&#xA;)&#xD;&#xA;print(keypair_ls.ss58_address)&#xD;&#xA;&#xD;&#xA;# deploy contract&#xD;&#xA;up = [os.pardir]*3&#xD;&#xA;go_up = os.path.join(*up)&#xD;&#xA;code = ContractCode.create_from_contract_files(&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.json'),&#xD;&#xA;    wasm_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.wasm'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;contract = code.deploy(&#xD;&#xA;    keypair=keypair_ls,&#xD;&#xA;    constructor=&quot;new&quot;,&#xD;&#xA;    args={'init_value': True},&#xD;&#xA;    value=0,&#xD;&#xA;    gas_limit={'ref_time': 25990000000, 'proof_size': 11990},&#xD;&#xA;    deployment_salt=&quot;&quot;,&#xD;&#xA;    upload_code=True,&#xD;&#xA;    storage_deposit_limit=1000000000000&#xD;&#xA;)&#xD;&#xA;print(f'✅ Deployed @ {contract.contract_address}')&#xD;&#xA;&#xD;&#xA;# create contract instance from deterministic address&#xD;&#xA;contract_existing = ContractInstance.create_from_address(&#xD;&#xA;    contract_address=contract.contract_address,&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.json'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;print(f'Existing deployed @ {contract_existing.contract_address}')&#xD;&#xA;&#xD;&#xA;# read data from contract&#xD;&#xA;result = contract_existing.read(keypair_ls, 'get')&#xD;&#xA;print('Current value of &quot;get&quot;:', result.contract_result_data)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [2]: https://polkascan.github.io/py-substrate-interface/usage/ink-contract-interfacing/&#xD;&#xA;  [3]: https://github.com/polkascan/py-substrate-interface/blob/v1.7.0/substrateinterface/contracts.py" ContentLicense="CC BY-SA 4.0" />
  <row Id="33251" PostHistoryTypeId="2" PostId="8475" RevisionGUID="eb46461f-f8ba-49eb-b1c1-27d66511ef35" CreationDate="2023-05-12T12:04:30.753" UserId="94" Text="I dont know of any existing mechanisms that easily allows for this. You would have to write an indexer yourself. It could sync a parachain from scratch and store the PoV size of each block. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33253" PostHistoryTypeId="6" PostId="2430" RevisionGUID="facf4255-4123-44e1-8d09-1500a4743689" CreationDate="2023-05-12T12:16:16.320" UserId="2" Comment="tags edited" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33254" PostHistoryTypeId="24" PostId="2430" RevisionGUID="facf4255-4123-44e1-8d09-1500a4743689" CreationDate="2023-05-12T12:16:16.320" Comment="Proposed by 2 approved by 251, -1 edit id of 416" ContentLicense="CC BY-SA 4.0" />
  <row Id="33255" PostHistoryTypeId="6" PostId="2430" RevisionGUID="091d3d9e-4d48-4fb5-a9f1-199d646984df" CreationDate="2023-05-12T12:16:16.320" UserId="354" Comment="tags edited" Text="|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33256" PostHistoryTypeId="2" PostId="8476" RevisionGUID="55178674-0a6c-4736-a124-c79d23606134" CreationDate="2023-05-12T12:39:49.370" UserId="4081" Text="As far as I know the minimum requirements for a parachain are stablished by the relay-chains minimum hardware. I would have to dig deeper as to where this is imposed but there is a pretty interesting block of code that can give you some insight on the [parachain-node-templete client][1]&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;if let Some(hwbench) = hwbench {&#xD;&#xA;		sc_sysinfo::print_hwbench(&amp;hwbench);&#xD;&#xA;		// Here you can check whether the hardware meets your chains' requirements. Putting a link&#xD;&#xA;		// in there and swapping out the requirements for your own are probably a good idea. The&#xD;&#xA;		// requirements for a para-chain are dictated by its relay-chain.&#xD;&#xA;		if !SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&amp;hwbench) &amp;&amp; validator {&#xD;&#xA;			log::warn!(&#xD;&#xA;				&quot;⚠️  The hardware does not meet the minimal requirements for role 'Authority'.&quot;&#xD;&#xA;			);&#xD;&#xA;		}&#xD;&#xA;        ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/a04589bc06143080982345acdf17635c4118fe48/node/src/service.rs#L229" ContentLicense="CC BY-SA 4.0" />
  <row Id="33258" PostHistoryTypeId="5" PostId="8471" RevisionGUID="e85ec46a-7b33-4a3d-a38e-2f40422c89ee" CreationDate="2023-05-12T12:53:33.450" UserId="2485" Comment="added 116 characters in body" Text="i have an rpc call that returns an array of structs with multiple fields, one of which is balance of an asset for a user, balance type is u128. when the number is large i get this error createType(u128):: Number needs to be an integer &lt;= Number.MAX_SAFE_INTEGER, i.e. 2 ^ 53 - 1. I have tried specifying different types to make it cast to u128 but rpc kept failing. CURL for the rpc works in terminal and returns large numbers. Seems like the problem on JS, what can i do to be able to be to parse the structs such that the value of balance is a valid number, possibly a BigInt? Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="33259" PostHistoryTypeId="50" PostId="8006" RevisionGUID="ffd32411-5604-4d7b-84d7-ac793cd575f6" CreationDate="2023-05-12T13:08:31.070" UserId="-1" />
  <row Id="33260" PostHistoryTypeId="2" PostId="8477" RevisionGUID="16cc71d3-5530-469d-b5ca-fad999fd1121" CreationDate="2023-05-12T13:22:07.200" UserId="29" Text="I notice that in the node-template there is `BlockWeights` and some differences in weights compared to the &quot;kitchensink&quot; runtime where we have `RuntimeBlockWeights`.&#xD;&#xA;&#xD;&#xA;What is the difference between `BlockWeights` and `RuntimeBlockWeights`? Is there a reason why both runtimes are not the same?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const BlockHashCount: BlockNumber = 2400;&#xD;&#xA;	pub const Version: RuntimeVersion = VERSION;&#xD;&#xA;	/// We allow for 2 seconds of compute with a 6 second average block time.&#xD;&#xA;	pub BlockWeights: frame_system::limits::BlockWeights =&#xD;&#xA;		frame_system::limits::BlockWeights::with_sensible_defaults(&#xD;&#xA;			Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX),&#xD;&#xA;			NORMAL_DISPATCH_RATIO,&#xD;&#xA;		);&#xD;&#xA;	pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength&#xD;&#xA;		::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);&#xD;&#xA;	pub const SS58Prefix: u8 = 42;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/2fc9c39a9fb9f38b6256f82cda4c955eb0de2706/bin/node-template/runtime/src/lib.rs#LL136C1-L150C2&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// We assume that ~10% of the block weight is consumed by `on_initialize` handlers.&#xD;&#xA;/// This is used to limit the maximal weight of a single extrinsic.&#xD;&#xA;const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);&#xD;&#xA;/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used&#xD;&#xA;/// by  Operational  extrinsics.&#xD;&#xA;const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);&#xD;&#xA;/// We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size.&#xD;&#xA;const MAXIMUM_BLOCK_WEIGHT: Weight =&#xD;&#xA;	Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const BlockHashCount: BlockNumber = 2400;&#xD;&#xA;	pub const Version: RuntimeVersion = VERSION;&#xD;&#xA;	pub RuntimeBlockLength: BlockLength =&#xD;&#xA;		BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);&#xD;&#xA;	pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()&#xD;&#xA;		.base_block(BlockExecutionWeight::get())&#xD;&#xA;		.for_class(DispatchClass::all(), |weights| {&#xD;&#xA;			weights.base_extrinsic = ExtrinsicBaseWeight::get();&#xD;&#xA;		})&#xD;&#xA;		.for_class(DispatchClass::Normal, |weights| {&#xD;&#xA;			weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);&#xD;&#xA;		})&#xD;&#xA;		.for_class(DispatchClass::Operational, |weights| {&#xD;&#xA;			weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT);&#xD;&#xA;			// Operational transactions have some extra reserved space, so that they&#xD;&#xA;			// are included even if block reached `MAXIMUM_BLOCK_WEIGHT`.&#xD;&#xA;			weights.reserved = Some(&#xD;&#xA;				MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT&#xD;&#xA;			);&#xD;&#xA;		})&#xD;&#xA;		.avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)&#xD;&#xA;		.build_or_panic();&#xD;&#xA;	pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/2fc9c39a9fb9f38b6256f82cda4c955eb0de2706/bin/node/runtime/src/lib.rs#L180-L214" ContentLicense="CC BY-SA 4.0" />
  <row Id="33262" PostHistoryTypeId="1" PostId="8477" RevisionGUID="16cc71d3-5530-469d-b5ca-fad999fd1121" CreationDate="2023-05-12T13:22:07.200" UserId="29" Text="What is the difference between `RuntimeBlockWeights` vs `BlockWeights`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33263" PostHistoryTypeId="3" PostId="8477" RevisionGUID="16cc71d3-5530-469d-b5ca-fad999fd1121" CreationDate="2023-05-12T13:22:07.200" UserId="29" Text="|weight|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33264" PostHistoryTypeId="2" PostId="8478" RevisionGUID="55157d07-500c-4d11-a719-5c4e499140de" CreationDate="2023-05-12T13:24:55.113" UserId="3850" Text="What is the difference in these two approaches for cross contract calls? One uses the `{Contract}Ref` and the other uses the `build_call().delegate()` method. Both methods do not require the contract to be instantiated and only require the code hash.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let adder = AdderRef::new(accumulator.clone(), staker_code_hash)&#xD;&#xA;                .endowment(0)&#xD;&#xA;                .code_hash(adder_code_hash)&#xD;&#xA;                .salt_bytes(salt)&#xD;&#xA;                .instantiate();&#xD;&#xA;&#xD;&#xA;adder.inc(by)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                 .delegate(self.staker_code_hash)&#xD;&#xA;                 .exec_input(&#xD;&#xA;                     ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;get_stake&quot;)))&#xD;&#xA;                 )&#xD;&#xA;                 .returns::&lt;i32&gt;()&#xD;&#xA;                 .try_invoke() {&#xD;&#xA;                     Ok(value) =&gt; value,&#xD;&#xA;                     Err(err) =&gt; match err {&#xD;&#xA;                         ink_env::Error::Decode(err) =&gt; panic!(&quot;Failed to decode return value: {:?}&quot;, err.to_string()),&#xD;&#xA;                         _ =&gt; panic!(&quot;Failed to invoke `stake`&quot;),&#xD;&#xA;                     }&#xD;&#xA;                 }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33266" PostHistoryTypeId="1" PostId="8478" RevisionGUID="55157d07-500c-4d11-a719-5c4e499140de" CreationDate="2023-05-12T13:24:55.113" UserId="3850" Text="Cross contract calls - Difference between {Contract}Ref and build_call().delegate()" ContentLicense="CC BY-SA 4.0" />
  <row Id="33267" PostHistoryTypeId="3" PostId="8478" RevisionGUID="55157d07-500c-4d11-a719-5c4e499140de" CreationDate="2023-05-12T13:24:55.113" UserId="3850" Text="|ink|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33268" PostHistoryTypeId="5" PostId="8476" RevisionGUID="54aea8be-fb8e-4c67-82b4-aa971ba02c9d" CreationDate="2023-05-12T13:42:49.330" UserId="4081" Comment="added 1 character in body" Text="As far as I know the minimum requirements for a parachain are stablished by the relay-chains minimum hardware. I would have to dig deeper as to where this is imposed but there is a pretty interesting block of code that can give you some insight on the [parachain-node-template service][1]&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;if let Some(hwbench) = hwbench {&#xD;&#xA;		sc_sysinfo::print_hwbench(&amp;hwbench);&#xD;&#xA;		// Here you can check whether the hardware meets your chains' requirements. Putting a link&#xD;&#xA;		// in there and swapping out the requirements for your own are probably a good idea. The&#xD;&#xA;		// requirements for a para-chain are dictated by its relay-chain.&#xD;&#xA;		if !SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&amp;hwbench) &amp;&amp; validator {&#xD;&#xA;			log::warn!(&#xD;&#xA;				&quot;⚠️  The hardware does not meet the minimal requirements for role 'Authority'.&quot;&#xD;&#xA;			);&#xD;&#xA;		}&#xD;&#xA;        ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/a04589bc06143080982345acdf17635c4118fe48/node/src/service.rs#L229" ContentLicense="CC BY-SA 4.0" />
  <row Id="33269" PostHistoryTypeId="2" PostId="8479" RevisionGUID="4e5721fe-5413-40f4-85c1-b7de0fa4563f" CreationDate="2023-05-12T15:16:13.093" UserId="94" Text="It is just the naming and how complicated they are set up.  &#xD;&#xA;The template runtime is always kept simple to have a minimal working example. The kitchensink on the other hand tries to use most features, and acts like a &quot;fat&quot; runtime that is closer to how a real chain would be configured." ContentLicense="CC BY-SA 4.0" />
  <row Id="33271" PostHistoryTypeId="2" PostId="8480" RevisionGUID="b35014b3-674d-4246-b8fb-32ff69ac23fc" CreationDate="2023-05-12T16:04:27.633" UserId="1786" Text="Given that one of the fields in one of the many structs is a u128 you will need to sanitize the values yourself. I would suggest iterating through each value (you may also do this with recursion as we handle sanitization in [sidecar](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/sanitize/sanitizeNumbers.ts#L167)), and then check the actual type with `toRawType()` for u128. When it comes back as a u128 then you can use `toString()`, `toBigInt`, or `toBn` i believe." ContentLicense="CC BY-SA 4.0" />
  <row Id="33273" PostHistoryTypeId="52" PostId="8471" RevisionGUID="4b766cd2-717d-48a2-b0e7-8333ad506c45" CreationDate="2023-05-12T16:19:50.733" />
  <row Id="33274" PostHistoryTypeId="2" PostId="8481" RevisionGUID="1abad1e8-aa93-460c-b34c-f1f9e9fa984b" CreationDate="2023-05-12T19:57:52.747" UserId="3319" Text="Recently i have been trying to understand the block import for Aura and grandpa but i dont understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't aura supposed to just create blocks and should not care about justifications or finality because thats what [import_block][2] method does? in the `new_full()` method, when starting aura, same thing, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237" ContentLicense="CC BY-SA 4.0" />
  <row Id="33276" PostHistoryTypeId="1" PostId="8481" RevisionGUID="1abad1e8-aa93-460c-b34c-f1f9e9fa984b" CreationDate="2023-05-12T19:57:52.747" UserId="3319" Text="understanding service.rs in substrate node template" ContentLicense="CC BY-SA 4.0" />
  <row Id="33277" PostHistoryTypeId="3" PostId="8481" RevisionGUID="1abad1e8-aa93-460c-b34c-f1f9e9fa984b" CreationDate="2023-05-12T19:57:52.747" UserId="3319" Text="|substrate-node-template|grandpa|aura|service|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33278" PostHistoryTypeId="2" PostId="8482" RevisionGUID="27257a15-3f72-4257-b42b-c4ade6366204" CreationDate="2023-05-12T20:04:38.930" UserId="1839" Text="You don't need the contract interface reference object in advance for using buil_call. You just pass the contract address with function selector and its parameter in low-level call format." ContentLicense="CC BY-SA 4.0" />
  <row Id="33280" PostHistoryTypeId="50" PostId="6320" RevisionGUID="6bd98adf-5ef7-4d36-9091-27d5fda62cb8" CreationDate="2023-05-12T20:11:26.317" UserId="-1" />
  <row Id="33281" PostHistoryTypeId="5" PostId="8481" RevisionGUID="256d6eae-e0c0-47c4-a2ba-7159d4414196" CreationDate="2023-05-12T20:11:38.943" UserId="3319" Comment="added 154 characters in body" Text="Recently i have been trying to understand the block import for Aura and grandpa but i dont understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't aura supposed to just create blocks and should not care about justifications or finality because thats what [import_block][2] method does? in the `new_full()` method, when starting aura, same thing, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- why would grandpa execute blocks if we are using the same block import, shoudln't grandpa just vote on chains and not care whats inside the block because thats the job of aura?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237" ContentLicense="CC BY-SA 4.0" />
  <row Id="33283" PostHistoryTypeId="2" PostId="8483" RevisionGUID="ba215c67-325c-49ba-b69b-5e74e3165a0e" CreationDate="2023-05-13T08:31:53.990" UserId="3319" Text="I suggest you do all the tutorials in substrate docs to understand more what you can do, it wont take long to finish all of them (around 3 days, which is worth it), after you finish the tutorials you will understand that substrate just a bunch of tools and libraries that you can combine however you want to build whatever you want, the only limitation is your imagination (and maybe your project requirements).&#xD;&#xA;&#xD;&#xA;Let me give you an example to answer your question in your comment,currently we are working on a [project][1](basically to do exactly what you are describing, scaling request processing) to validate a stream of events so most of our work was basically done offchain, we are runing a grpc server on each validator and gossiping some events using libp2p gossipsub and submitting transactions finally to substrate to be included in a block and listening for finalized blocks and returning responses to clients, all of this is done mostly in outer-node.&#xD;&#xA;&#xD;&#xA;You can think of substrate as a state machine, and you can do whatever you want with state machines :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/comrade-coop/validated-streams" ContentLicense="CC BY-SA 4.0" />
  <row Id="33286" PostHistoryTypeId="50" PostId="6298" RevisionGUID="93f0a59f-4ba2-4407-9ff1-82a363180487" CreationDate="2023-05-13T11:13:41.730" UserId="-1" />
  <row Id="33287" PostHistoryTypeId="5" PostId="8481" RevisionGUID="158a17f6-ca9f-4c2c-9f5c-71b78f633625" CreationDate="2023-05-13T12:42:01.783" UserId="83" Comment="grammar spelling" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks if we are using the same block import, shouldn't Grandpa just vote on chains and not care what's inside the block because thats the job of Aura?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237" ContentLicense="CC BY-SA 4.0" />
  <row Id="33288" PostHistoryTypeId="4" PostId="8481" RevisionGUID="158a17f6-ca9f-4c2c-9f5c-71b78f633625" CreationDate="2023-05-13T12:42:01.783" UserId="83" Comment="grammar spelling" Text="Understanding service.rs in substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="33289" PostHistoryTypeId="2" PostId="8484" RevisionGUID="4427f5f0-43ce-4f27-a055-d5436274accb" CreationDate="2023-05-13T13:12:37.900" UserId="4215" Text="I am experiencing an issue when using cargo-contract (version 1.5.1) to build a project (command: cargo +nightly contract build). The specified toolchain is not being recognized, and the process is forcibly calling nightly-2022-06-30 instead.&#xD;&#xA;&#xD;&#xA;This occurs on both my M2 MacOS and Ubuntu (within the Windows11 WSL environment), suggesting that the problem is likely not device-dependent. I have followed the installation instructions as outlined in Astar Doc's Ink! Environment (https://docs.astar.network/docs/build/environment/ink_environment/).&#xD;&#xA;&#xD;&#xA;The issue surfaces when building a flipper created by cargo contract new flipper. Interestingly, the problem does not occur when I install cargo-contract V2, suggesting that the issue might specifically be with V1.5.1.&#xD;&#xA;&#xD;&#xA;There are no elements that could potentially influence the toolchain specification (such as environment variables or specification via the rust-toolchain file). Even after uninstalling nightly-2022-06-30 using rustup toolchain uninstall, the process still attempts to call this version.&#xD;&#xA;&#xD;&#xA;Here is the corresponding log:&#xD;&#xA;&#xD;&#xA;yasuyasu@mocomocha:~/astar/flipper$ cargo +nightly contract build&#xD;&#xA;2023-05-13T12:50:30.989598Z  INFO cargo_contract::crate_metadata: Fetching cargo metadata for Cargo.toml&#xD;&#xA;2023-05-13T12:50:31.050626Z  INFO cargo_contract::util: Invoking cargo: &quot;/home/yasuyasu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;tree&quot; &quot;-i&quot; &quot;parity-scale-codec&quot; &quot;--duplicates&quot;&#xD;&#xA;2023-05-13T12:50:31.070036Z  INFO cargo_contract::util: Invoking cargo: &quot;/home/yasuyasu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;tree&quot; &quot;-i&quot; &quot;scale-info&quot; &quot;--duplicates&quot;&#xD;&#xA;2023-05-13T12:50:31.088857Z  INFO cargo_contract::cmd::build: Contract version: Version { major: 3, minor: 4, patch: 0 }&#xD;&#xA; [1/5] Checking ink! linting rules&#xD;&#xA;2023-05-13T12:50:31.113119Z  INFO cargo_contract::util: Invoking cargo: cd &quot;/home/yasuyasu/astar/flipper&quot; &amp;&amp; DYLINT_LIBRARY_PATH=&quot;/tmp/cargo-contract-dylint_CAz4e7&quot; &quot;/home/yasuyasu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;dylint&quot; &quot;--lib&quot; &quot;ink_linting&quot; &quot;--manifest-path=/home/yasuyasu/astar/flipper/Cargo.toml&quot;&#xD;&#xA;Checking with toolchain `nightly-2022-06-30-x86_64-unknown-linux-gnu`&#xD;&#xA;    Checking scale-info v2.6.0&#xD;&#xA;error[E0658]: `let...else` statements are unstable&#xD;&#xA;   --&gt; /home/yasuyasu/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.6.0/src/portable.rs:130:17&#xD;&#xA;    |&#xD;&#xA;130 | /                 let Some(ty) = &amp;param.ty else {&#xD;&#xA;131 | |                     continue&#xD;&#xA;132 | |                 };&#xD;&#xA;    | |__________________^&#xD;&#xA;    |&#xD;&#xA;    = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;    = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0658`.&#xD;&#xA;error: could not compile `scale-info` due to previous error&#xD;&#xA;Error: Compilation failed with toolchain `nightly-2022-06-30-x86_64-unknown-linux-gnu`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    command failed: CLIPPY_DISABLE_DOCS_LINKS=&quot;null&quot; DYLINT_LIBS=&quot;[\&quot;/tmp/cargo-contract-dylint_CAz4e7/libink_linting@nightly-2022-06-30-x86_64-unknown-linux-gnu.so\&quot;]&quot; RUSTC_WORKSPACE_WRAPPER=&quot;/home/yasuyasu/.dylint_drivers/nightly-2022-06-30-x86_64-unknown-linux-gnu/dylint-driver&quot; RUSTUP_TOOLCHAIN=&quot;nightly-2022-06-30-x86_64-unknown-linux-gnu&quot; &quot;cargo&quot; &quot;check&quot; &quot;--target-dir&quot; &quot;/home/yasuyasu/astar/flipper/target/dylint/target/nightly-2022-06-30-x86_64-unknown-linux-gnu&quot; &quot;--manifest-path&quot; &quot;/home/yasuyasu/astar/flipper/Cargo.toml&quot;&#xD;&#xA;ERROR: `cd &quot;/home/yasuyasu/astar/flipper&quot; &amp;&amp; DYLINT_LIBRARY_PATH=&quot;/tmp/cargo-contract-dylint_CAz4e7&quot; &quot;/home/yasuyasu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;dylint&quot; &quot;--lib&quot; &quot;ink_linting&quot; &quot;--manifest-path=/home/yasuyasu/astar/flipper/Cargo.toml&quot;` failed with exit code: Some(1)&#xD;&#xA;yasuyasu@mocomocha:~/astar/flipper$" ContentLicense="CC BY-SA 4.0" />
  <row Id="33291" PostHistoryTypeId="1" PostId="8484" RevisionGUID="4427f5f0-43ce-4f27-a055-d5436274accb" CreationDate="2023-05-13T13:12:37.900" UserId="4215" Text="Cargo-contract forcibly calls nightly-2022-06-30 regardless of specified toolchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="33292" PostHistoryTypeId="3" PostId="8484" RevisionGUID="4427f5f0-43ce-4f27-a055-d5436274accb" CreationDate="2023-05-13T13:12:37.900" UserId="4215" Text="|ink|rust|astar|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33293" PostHistoryTypeId="50" PostId="8068" RevisionGUID="e585979a-156e-4e3a-b129-d7cf8ee4ce9f" CreationDate="2023-05-13T15:07:45.853" UserId="-1" />
  <row Id="33294" PostHistoryTypeId="5" PostId="8481" RevisionGUID="08cb6088-68bc-4555-871f-fbf2d7888515" CreationDate="2023-05-13T18:17:46.270" UserId="3319" Comment="added 39 characters in body" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237" ContentLicense="CC BY-SA 4.0" />
  <row Id="33295" PostHistoryTypeId="2" PostId="8485" RevisionGUID="75388762-3a5e-4bda-95f9-65b0f5a8fac3" CreationDate="2023-05-13T21:50:08.353" UserId="258" Text="According to ink!:&#xD;&#xA;&#xD;&#xA;&quot;Storage data is always encoded with the SCALE codec. The storage API operates by storing and loading entries into and from a single storage cells, where each storage cell is accessed under its own dedicated storage key.&quot;&#xD;&#xA;&#xD;&#xA;How can i query pallet contract to return the Scale encoded value of a contract Storage key? &#xD;&#xA;&#xD;&#xA;I want to do this such that i can always fetch the value of a particular contract storage item without interacting with the contract itself but the blockchain pallet contract. &#xD;&#xA;&#xD;&#xA;Think of it like how you can query a slot in Ethereum and fetch the value stored for a contract in it which is done by calculating the keys(e.g for Arrays, Maps e.t.c)" ContentLicense="CC BY-SA 4.0" />
  <row Id="33297" PostHistoryTypeId="1" PostId="8485" RevisionGUID="75388762-3a5e-4bda-95f9-65b0f5a8fac3" CreationDate="2023-05-13T21:50:08.353" UserId="258" Text="How can i query pallet contract to give the Scale codec value of a Contract Root Storage Key" ContentLicense="CC BY-SA 4.0" />
  <row Id="33298" PostHistoryTypeId="3" PostId="8485" RevisionGUID="75388762-3a5e-4bda-95f9-65b0f5a8fac3" CreationDate="2023-05-13T21:50:08.353" UserId="258" Text="|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33299" PostHistoryTypeId="2" PostId="8486" RevisionGUID="f36b0e68-c14e-49ad-b580-4d8d41462253" CreationDate="2023-05-13T23:39:32.420" UserId="2340" Text="Ideally, I would like to build a chain with Substrate but using Tendermint as the consensus engine.&#xD;&#xA;&#xD;&#xA;The problem is that it's a lot of work to implement it correctly.&#xD;&#xA;&#xD;&#xA;But what if I use AURA (round robin + delegated) and GRANDPA (propose, pre-commit, commit) with `sc_consensus::LongestChain` a custom `VotingRule` that triggers a vote for every block?&#xD;&#xA;I would end up with something that behaves kind of close to Tendermint from a high-level point of view.&#xD;&#xA;&#xD;&#xA;What would be the core difference? Would it scale as well as Tendermint? Is there some risk to do this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33301" PostHistoryTypeId="1" PostId="8486" RevisionGUID="f36b0e68-c14e-49ad-b580-4d8d41462253" CreationDate="2023-05-13T23:39:32.420" UserId="2340" Text="How to achieve instant finality with substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33302" PostHistoryTypeId="3" PostId="8486" RevisionGUID="f36b0e68-c14e-49ad-b580-4d8d41462253" CreationDate="2023-05-13T23:39:32.420" UserId="2340" Text="|consensus|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33303" PostHistoryTypeId="6" PostId="8470" RevisionGUID="c97ed598-c326-40f2-a7ab-5525e9da43ae" CreationDate="2023-05-14T01:52:14.833" UserId="4135" Comment="edited tags" Text="|networking|dev|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33304" PostHistoryTypeId="50" PostId="4309" RevisionGUID="dc098ce3-5d00-4270-906b-a2ba308d5177" CreationDate="2023-05-14T06:08:05.897" UserId="-1" />
  <row Id="33305" PostHistoryTypeId="50" PostId="4306" RevisionGUID="4dac5618-e7df-44e4-bd2d-453a8cf999fc" CreationDate="2023-05-14T09:11:36.363" UserId="-1" />
  <row Id="33306" PostHistoryTypeId="2" PostId="8487" RevisionGUID="998f0149-d7aa-44af-a43f-1b4d47d2ccb3" CreationDate="2023-05-14T11:52:43.837" UserId="275" Text="I'm trying to add custom RPC to Substrate node template.&#xD;&#xA;As explained in the jsonrpsee's proc_macro doc [here][1], I define `BalancesApi` trait, and implement `BalancesApiServer` to the struct `Balances`.&#xD;&#xA;&#xD;&#xA;I expect that macro implements `into_rpc` behind the scenes. However, compiler says no method named `into_rpc` found for struct `Balances` in the current scope.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;If I expand macro, I can see `into_rpc` is generated,&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;How can I implement in on Api struct which will be used in `create_full` function? Some additional procedure is required?&#xD;&#xA;&#xD;&#xA;Just an additional info, This is my working branch https://github.com/AstarNetwork/swanky-node/pull/67&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/jsonrpsee/blob/master/examples/examples/proc_macro.rs&#xD;&#xA;  [2]: https://i.stack.imgur.com/HtVTZ.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/JDpd4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33308" PostHistoryTypeId="1" PostId="8487" RevisionGUID="998f0149-d7aa-44af-a43f-1b4d47d2ccb3" CreationDate="2023-05-14T11:52:43.837" UserId="275" Text="jsonrpsee's rpc macro doesn't generate `into_rpc` method" ContentLicense="CC BY-SA 4.0" />
  <row Id="33309" PostHistoryTypeId="3" PostId="8487" RevisionGUID="998f0149-d7aa-44af-a43f-1b4d47d2ccb3" CreationDate="2023-05-14T11:52:43.837" UserId="275" Text="|substrate-node-template|rpc|jsonrpsee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33310" PostHistoryTypeId="4" PostId="8487" RevisionGUID="71bf99fd-edb4-4b8e-beab-a06b79944854" CreationDate="2023-05-14T12:10:20.613" UserId="275" Comment="edited title" Text="How to implement `into_rpc` method in jsonrpsee's rpc macro" ContentLicense="CC BY-SA 4.0" />
  <row Id="33311" PostHistoryTypeId="5" PostId="8487" RevisionGUID="71bf99fd-edb4-4b8e-beab-a06b79944854" CreationDate="2023-05-14T12:10:20.613" UserId="275" Comment="edited title" Text="I'm trying to add custom RPC to Substrate node template.&#xD;&#xA;As explained in the jsonrpsee's proc_macro doc [here][1], I define `BalancesApi` trait where #[rpc(server)] attribute added, and implement `BalancesApiServer` to the struct `Balances`.&#xD;&#xA;&#xD;&#xA;I expect that macro implements `into_rpc` behind the scenes. However, compiler says no method named `into_rpc` found for struct `Balances` in the current scope.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;If I expand macro, I can see `into_rpc` trait is generated,&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;How can I implement in on `BalancesApi` struct which will be used in `create_full` function? Some additional procedure is required?&#xD;&#xA;&#xD;&#xA;Just an additional info, This is my working branch https://github.com/AstarNetwork/swanky-node/pull/67&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/jsonrpsee/blob/master/examples/examples/proc_macro.rs&#xD;&#xA;  [2]: https://i.stack.imgur.com/HtVTZ.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/JDpd4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33313" PostHistoryTypeId="50" PostId="6234" RevisionGUID="7abf1f33-3b96-40ea-a15d-86c1d297b5a5" CreationDate="2023-05-14T12:16:36.997" UserId="-1" />
  <row Id="33314" PostHistoryTypeId="5" PostId="8481" RevisionGUID="095c5b05-e1d9-4d7f-a2b0-4ca5137b876a" CreationDate="2023-05-14T12:28:09.173" UserId="3319" Comment="added 222 characters in body" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, this would be impossible.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237" ContentLicense="CC BY-SA 4.0" />
  <row Id="33315" PostHistoryTypeId="5" PostId="8481" RevisionGUID="1a68877c-5717-4b34-959e-4bf736d4d7ca" CreationDate="2023-05-14T13:23:06.603" UserId="3319" Comment="added 181 characters in body" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, if a majority of validators accept the block in aura, grandpa would simply finalize it by importing it directly with no verification, this would be impossible currently as they are executing the same logic.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237" ContentLicense="CC BY-SA 4.0" />
  <row Id="33316" PostHistoryTypeId="5" PostId="8481" RevisionGUID="34da9208-cd44-41f6-b1bf-90b30c764328" CreationDate="2023-05-14T14:02:06.590" UserId="3319" Comment="added 574 characters in body" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, if a majority of validators accept the block in aura, grandpa would simply finalize it by importing it directly with no verification, this would be impossible currently as they are executing the same logic.&#xD;&#xA;&#xD;&#xA;3- im tempted to import the block directly via the [client][4] in the Aura import queue, then let grandpa do the finalisation with grandpa_block_import,would that be wrong? because there is a not to use it carefully &#xD;&#xA;&#xD;&#xA;&gt; NOTE: only use this implementation when there are NO consensus-level&#xD;&#xA;&gt; BlockImport objects. Otherwise, importing blocks directly into the&#xD;&#xA;&gt; client would be bypassing important verification work.&#xD;&#xA;&#xD;&#xA;4- what does no consensus-level BlockImport objects mean?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_service/client/struct.Client.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="33317" PostHistoryTypeId="5" PostId="8481" RevisionGUID="e022359a-a012-489c-895e-133603398631" CreationDate="2023-05-14T14:15:30.523" UserId="3319" Comment="added 1 character in body" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, if a majority of validators accept the block in aura, grandpa would simply finalize it by importing it directly with no verification, this would be impossible currently as they are executing the same logic.&#xD;&#xA;&#xD;&#xA;3- im tempted to import the block directly via the [client][4] in the Aura import queue, then let grandpa do the finalisation with grandpa_block_import,would that be wrong? because there is a note to use it carefully &#xD;&#xA;&#xD;&#xA;&gt; NOTE: only use this implementation when there are NO consensus-level&#xD;&#xA;&gt; BlockImport objects. Otherwise, importing blocks directly into the&#xD;&#xA;&gt; client would be bypassing important verification work.&#xD;&#xA;&#xD;&#xA;4- what does no consensus-level BlockImport objects mean?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_service/client/struct.Client.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="33318" PostHistoryTypeId="5" PostId="8481" RevisionGUID="1b44a863-213e-4f5a-8652-eb20e974df1c" CreationDate="2023-05-14T14:33:33.837" UserId="3319" Comment="added 24 characters in body" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does of `GrandpaBlockImport`? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, if a majority of validators accept the block in aura, grandpa would simply finalize it by importing it directly with no verification, this would be impossible currently as they are executing the same logic.&#xD;&#xA;&#xD;&#xA;3- im tempted to import the block directly via the [client][4] in the Aura import queue, then let grandpa do the finalisation with grandpa_block_import,would that be wrong? because there is a note to use it carefully &#xD;&#xA;&#xD;&#xA;&gt; NOTE: only use this implementation when there are NO consensus-level&#xD;&#xA;&gt; BlockImport objects. Otherwise, importing blocks directly into the&#xD;&#xA;&gt; client would be bypassing important verification work.&#xD;&#xA;&#xD;&#xA;4- what does no consensus-level BlockImport objects mean?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_service/client/struct.Client.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="33319" PostHistoryTypeId="5" PostId="8481" RevisionGUID="c8694d1f-53b5-43c0-b114-73df28d338e7" CreationDate="2023-05-14T15:03:01.527" UserId="3319" Comment="added 35 characters in body" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does of `GrandpaBlockImport`? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, if a majority of validators accept the block in aura, grandpa would simply finalize it by importing it directly with no verification, this would be impossible currently as they are executing the same logic.&#xD;&#xA;&#xD;&#xA;3- im tempted to import the block directly via the [client][4] in the Aura import queue in `new_partial()`, then let grandpa do the finalisation with grandpa_block_import in `new_full()`,would that be wrong? because there is a note to use it carefully &#xD;&#xA;&#xD;&#xA;&gt; NOTE: only use this implementation when there are NO consensus-level&#xD;&#xA;&gt; BlockImport objects. Otherwise, importing blocks directly into the&#xD;&#xA;&gt; client would be bypassing important verification work.&#xD;&#xA;&#xD;&#xA;4- what does no consensus-level BlockImport objects mean?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_service/client/struct.Client.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="33320" PostHistoryTypeId="5" PostId="8481" RevisionGUID="d6a96bb8-3509-4155-9966-1a59942ceb0d" CreationDate="2023-05-14T15:10:45.903" UserId="3319" Comment="added 29 characters in body" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does of `GrandpaBlockImport`? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, if a majority of validators accept the block in aura, grandpa would simply finalize it by importing it directly with no verification, this would be impossible currently as they are executing the same logic.&#xD;&#xA;&#xD;&#xA;3- im tempted to import the block directly via the [client][4] in the Aura import queue in `new_partial()`, then let grandpa do the finalisation with grandpa_block_import in `new_full()`,would that be wrong? because there is a note to use it carefully which i dont fully understand&#xD;&#xA;&#xD;&#xA;&gt; NOTE: only use this implementation when there are NO consensus-level&#xD;&#xA;&gt; BlockImport objects. Otherwise, importing blocks directly into the&#xD;&#xA;&gt; client would be bypassing important verification work.&#xD;&#xA;&#xD;&#xA;4- what does no consensus-level BlockImport objects mean?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_service/client/struct.Client.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="33321" PostHistoryTypeId="5" PostId="8481" RevisionGUID="397a70fa-87c9-4c04-b23b-02231a886aa6" CreationDate="2023-05-14T15:16:36.707" UserId="3319" Comment="added 29 characters in body" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does of `GrandpaBlockImport`? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, if a majority of validators accept the block in aura, grandpa would simply finalize it by importing it directly with no verification, this would be impossible currently as they are executing the same logic.&#xD;&#xA;&#xD;&#xA;3- im tempted to import the block directly via the [client][4] in the Aura import queue in `new_partial()`, then let grandpa do the finalisation with grandpa_block_import in `new_full()`  Meaning even if aura rejects a block it should be imported if grandpa finalized it, would that be wrong? because there is a note to use it carefully which i dont fully understand&#xD;&#xA;&#xD;&#xA;&gt; NOTE: only use this implementation when there are NO consensus-level&#xD;&#xA;&gt; BlockImport objects. Otherwise, importing blocks directly into the&#xD;&#xA;&gt; client would be bypassing important verification work.&#xD;&#xA;&#xD;&#xA;4- what does no consensus-level BlockImport objects mean?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_service/client/struct.Client.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="33322" PostHistoryTypeId="5" PostId="8481" RevisionGUID="e903b9c7-66e9-4182-971f-8555ed5fd92a" CreationDate="2023-05-14T16:20:25.987" UserId="3319" Comment="added 148 characters in body" Text="Recently I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does of `GrandpaBlockImport`? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura? because this way it should instantly finalize all aura blocks since its the same block import but is not, so what is import_block() actually doing?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, if a majority of validators accept the block in aura, grandpa would simply finalize it by importing it directly with no verification, this would be impossible currently as they are executing the same logic.&#xD;&#xA;&#xD;&#xA;3- im tempted to import the block directly via the [client][4] in the Aura import queue in `new_partial()`, then let grandpa do the finalisation with grandpa_block_import in `new_full()`  Meaning even if aura rejects a block it should be imported if grandpa finalized it, would that be wrong? if so, how to achieve that? because there is a note to use it carefully which i dont fully understand&#xD;&#xA;&#xD;&#xA;&gt; NOTE: only use this implementation when there are NO consensus-level&#xD;&#xA;&gt; BlockImport objects. Otherwise, importing blocks directly into the&#xD;&#xA;&gt; client would be bypassing important verification work.&#xD;&#xA;&#xD;&#xA;4- what does no consensus-level BlockImport objects mean?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_service/client/struct.Client.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="33323" PostHistoryTypeId="2" PostId="8488" RevisionGUID="d2c0eb9b-6d54-4909-b898-adbe9a5dc0ee" CreationDate="2023-05-14T16:21:01.577" UserId="3437" Text="I tried to clone https://github.com/polkadot-js/apps and run on local. When I execute `yarn` or `yarn install`, I get below logs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;➤ YN0013: │ @polkadot/react-identicon@npm:3.4.1 can't be found in the cache and will be fetched from the remote registry&#xD;&#xA;➤ YN0013: │ @polkadot/react-qr@npm:3.4.1 can't be found in the cache and will be fetched from the remote registry&#xD;&#xA;➤ YN0013: │ @polkadot/networks@npm:12.2.1 can't be found in the cache and will be fetched from the remote registry&#xD;&#xA;➤ YN0013: │ @polkadot/phishing@npm:0.21.3 can't be found in the cache and will be fetched from the remote registry&#xD;&#xA;➤ YN0013: │ @polkadot/react-identicon@npm:3.4.1 can't be found in the cache and will be fetched from the remote registry&#xD;&#xA;➤ YN0013: │ @polkadot/react-qr@npm:3.4.1 can't be found in the cache and will be fetched from the remote registry&#xD;&#xA;➤ YN0013: │ @polkadot/rpc-augment@npm:10.7.1 can't be found in the cache and will be fetched from the remote registry&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My node version is v19.4.0 and yarn version is 3.2.0. Can somebody please help me fix this?&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33325" PostHistoryTypeId="1" PostId="8488" RevisionGUID="d2c0eb9b-6d54-4909-b898-adbe9a5dc0ee" CreationDate="2023-05-14T16:21:01.577" UserId="3437" Text="Not able to run PolkadotJS apps on local" ContentLicense="CC BY-SA 4.0" />
  <row Id="33326" PostHistoryTypeId="3" PostId="8488" RevisionGUID="d2c0eb9b-6d54-4909-b898-adbe9a5dc0ee" CreationDate="2023-05-14T16:21:01.577" UserId="3437" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33327" PostHistoryTypeId="2" PostId="8489" RevisionGUID="28f7d41d-8c3a-4385-b8c7-9113b87f4ec0" CreationDate="2023-05-14T17:27:32.953" UserId="1786" Text="The logs you posted above are not error logs, but this is `yarn berry` informing you that you don't have those packages cached (probably because this is your first install), and will fetch them from the registry.&#xD;&#xA;&#xD;&#xA;After you `yarn install` you need to run `yarn start` or `yarn start:electron` in order to run polkadot-js/apps locally. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33329" PostHistoryTypeId="5" PostId="8461" RevisionGUID="2beaf536-ee7b-4449-8617-a365b6c36ed6" CreationDate="2023-05-14T19:47:36.120" UserId="83" Comment="update spelling and tags" Text="I am using substrate-contracts-node. I've uploaded and instantiated the smart contract.&#xD;&#xA;I would like to interact and query the function using py-substrate-interface. However, I ran into an error while following this guide - https://polkascan.github.io/py-substrate-interface/usage/ink-contract-interfacing/#deploy-a-contract&#xD;&#xA;&#xD;&#xA;This is my code: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;contract_address = '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31'&#xD;&#xA;# Create contract instance from deterministic address&#xD;&#xA;contract = ContractInstance.create_from_address(&#xD;&#xA;    contract_address=contract_address,&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), '/home/&lt;name&gt;/TODO-List/todo_list/target/ink', 'metadata.json'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;result = contract.read(keypair, 'get_owner')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the error message:&#xD;&#xA;```&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/types.py&quot;, line 1232, in process&#xD;&#xA;    enum_type_mapping = self.type_mapping[self.index]&#xD;&#xA;IndexError: list index out of range&#xD;&#xA;&#xD;&#xA;During handling of the above exception, another exception occurred:&#xD;&#xA;&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;main.py&quot;, line 24, in &lt;module&gt;&#xD;&#xA;    result = contract.read(keypair, 'get_owner')&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/substrateinterface/contracts.py&quot;, line 766, in read&#xD;&#xA;    call_result = self.substrate.runtime_call(&quot;ContractsApi&quot;, &quot;call&quot;, {&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/substrateinterface/base.py&quot;, line 1258, in runtime_call&#xD;&#xA;    result_obj.decode(ScaleBytes(result_data['result']))&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/base.py&quot;, line 874, in decode&#xD;&#xA;    self.value_serialized = self.process()&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/types.py&quot;, line 1755, in process&#xD;&#xA;    value = super().process()&#xD;&#xA;  File &quot;/home/&lt;name&gt;/TODO-List/myenv/lib/python3.8/site-packages/scalecodec/types.py&quot;, line 1245, in process&#xD;&#xA;    raise ValueError(&quot;Index '{}' not present in Enum type mapping&quot;.format(self.index))&#xD;&#xA;ValueError: Index '202' not present in Enum type mapping&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Smart contract was tested and built without any issue. `get_owner()` is a simple function in a smart contract that returns an AccountId." ContentLicense="CC BY-SA 4.0" />
  <row Id="33330" PostHistoryTypeId="6" PostId="8461" RevisionGUID="2beaf536-ee7b-4449-8617-a365b6c36ed6" CreationDate="2023-05-14T19:47:36.120" UserId="83" Comment="update spelling and tags" Text="|ink|substrate-contracts-node|python|polkascan|py-substrate-interface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33331" PostHistoryTypeId="5" PostId="8472" RevisionGUID="cce9f374-2cc8-43f0-af32-fcf17e6e850b" CreationDate="2023-05-14T19:48:51.053" UserId="83" Comment="grammar" Text="Questions: &#xD;&#xA;* What version of substrate-interface are you using?&#xD;&#xA;* Where is the source code of the todo_list smart contract?&#xD;&#xA;&#xD;&#xA;Perhaps you could try using a more recent version of both substrate-interface, and python even though you're using version 3.8 and the repo indicates that it's supported.&#xD;&#xA;&#xD;&#xA;I understand that you used [substrate-contracts-node][1] to deploy the smart contract to a local testnet on your machine at '5Guya7pPPJC5bDy6yjpLZQ6Tw4D3pow8pvebEnFxMsyd5d31'.&#xD;&#xA;&#xD;&#xA;I just tried to replicate your issue using the following recent versions:&#xD;&#xA;* substrate-interface 1.7.0&#xD;&#xA;* python 3.11&#xD;&#xA;* flipper example smart contract that I generated using cargo contract 2.2.1&#xD;&#xA;&#xD;&#xA;I followed the same guide as you with the steps [here][2].&#xD;&#xA;&#xD;&#xA;First I got an error `TypeError: ContractCode.deploy() got an unexpected keyword argument 'endowment'`.&#xD;&#xA;&#xD;&#xA;So I reviewed the substrate-interface 1.7.0 source code that I found at [https://github.com/polkascan/py-substrate-interface/blob/v1.7.0/substrateinterface/contracts.py][3] to discover that argument has been removed, so the guide appears to be outdated.&#xD;&#xA;&#xD;&#xA;Then I got the following error:&#xD;&#xA;```&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 592, in process_encode&#xD;&#xA;    value = {key: value[idx] for idx, (key, _) in enumerate(self.type_mapping)}&#xD;&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 592, in &lt;dictcomp&gt;&#xD;&#xA;    value = {key: value[idx] for idx, (key, _) in enumerate(self.type_mapping)}&#xD;&#xA;                  ~~~~~^^^^^&#xD;&#xA;IndexError: tuple index out of range&#xD;&#xA;&#xD;&#xA;During handling of the above exception, another exception occurred:&#xD;&#xA;&#xD;&#xA;Traceback (most recent call last):&#xD;&#xA;  File &quot;/app/docker/ink-python/src/app.py&quot;, line 52, in &lt;module&gt;&#xD;&#xA;    contract = code.deploy(&#xD;&#xA;               ^^^^^^^^^^^^&#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/substrateinterface/contracts.py&quot;, line 658, in deploy&#xD;&#xA;    call = self.substrate.compose_call(&#xD;&#xA;... &#xD;&#xA;  File &quot;/usr/local/lib/python3.11/site-packages/scalecodec/types.py&quot;, line 594, in process_encode&#xD;&#xA;    raise ValueError(&quot;Not enough items in tuple to match type_mapping&quot;)&#xD;&#xA;ValueError: Not enough items in tuple to match type_mapping&#xD;&#xA;```&#xD;&#xA;That was again caused because that guide is outdated since they are using an argument value of `gas_limit=1000000000000,` instead of a dictionary tuple like `gas_limit={'ref_time': 25990000000, 'proof_size': 11990},`.&#xD;&#xA;So after I changed that it fully deployed the smart contract to Contracts Rococo successfully and returned `Current value of &quot;get&quot;: {'Ok': True}`.&#xD;&#xA;&#xD;&#xA;This is the code I used. Note: I just made up any value for the ref_time and proof_size that worked without causing an OutOfGas error.&#xD;&#xA;```python&#xD;&#xA;import os&#xD;&#xA;from dotenv import load_dotenv&#xD;&#xA;from substrateinterface import SubstrateInterface, Keypair, KeypairType, ContractCode, ContractInstance&#xD;&#xA;&#xD;&#xA;load_dotenv()&#xD;&#xA;&#xD;&#xA;MNEMONIC = os.getenv('MNEMONIC')&#xD;&#xA;&#xD;&#xA;provider_rococo = &quot;wss://rococo-contracts-rpc.polkadot.io&quot;&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=provider_rococo,&#xD;&#xA;    ss58_format=42,&#xD;&#xA;    type_registry_preset='substrate-node-template',&#xD;&#xA;)&#xD;&#xA;keypair_ls = Keypair.create_from_mnemonic(&#xD;&#xA;    MNEMONIC,&#xD;&#xA;    crypto_type=KeypairType.SR25519&#xD;&#xA;)&#xD;&#xA;print(keypair_ls.ss58_address)&#xD;&#xA;&#xD;&#xA;# deploy contract&#xD;&#xA;up = [os.pardir]*3&#xD;&#xA;go_up = os.path.join(*up)&#xD;&#xA;code = ContractCode.create_from_contract_files(&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.json'),&#xD;&#xA;    wasm_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.wasm'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;contract = code.deploy(&#xD;&#xA;    keypair=keypair_ls,&#xD;&#xA;    constructor=&quot;new&quot;,&#xD;&#xA;    args={'init_value': True},&#xD;&#xA;    value=0,&#xD;&#xA;    gas_limit={'ref_time': 25990000000, 'proof_size': 11990},&#xD;&#xA;    deployment_salt=&quot;&quot;,&#xD;&#xA;    upload_code=True,&#xD;&#xA;    storage_deposit_limit=1000000000000&#xD;&#xA;)&#xD;&#xA;print(f'✅ Deployed @ {contract.contract_address}')&#xD;&#xA;&#xD;&#xA;# create contract instance from deterministic address&#xD;&#xA;contract_existing = ContractInstance.create_from_address(&#xD;&#xA;    contract_address=contract.contract_address,&#xD;&#xA;    metadata_file=os.path.join(os.path.dirname(__file__), go_up, 'target', 'ink', 'flipper', 'flipper.json'),&#xD;&#xA;    substrate=substrate&#xD;&#xA;)&#xD;&#xA;print(f'Existing deployed @ {contract_existing.contract_address}')&#xD;&#xA;&#xD;&#xA;# read data from contract&#xD;&#xA;result = contract_existing.read(keypair_ls, 'get')&#xD;&#xA;print('Current value of &quot;get&quot;:', result.contract_result_data)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [2]: https://polkascan.github.io/py-substrate-interface/usage/ink-contract-interfacing/&#xD;&#xA;  [3]: https://github.com/polkascan/py-substrate-interface/blob/v1.7.0/substrateinterface/contracts.py" ContentLicense="CC BY-SA 4.0" />
  <row Id="33332" PostHistoryTypeId="50" PostId="4284" RevisionGUID="91d9b843-3de0-45cf-975a-d6fd8b610e5c" CreationDate="2023-05-15T00:06:15.673" UserId="-1" />
  <row Id="33333" PostHistoryTypeId="2" PostId="8490" RevisionGUID="cdd219f1-2575-42df-9f14-529b42d21a5d" CreationDate="2023-05-15T01:22:46.087" UserId="3344" Text="What is/are the preferred approach/es (crates, pallets, etc.) to efficiently limiting NFT transfers to members of a group?&#xD;&#xA;&#xD;&#xA;Here efficiently refers to the resources consumed to execute the transfer.&#xD;&#xA;&#xD;&#xA;Ideally the following characteristics would still be supported:&#xD;&#xA;- The NFT is soulbound to the group (can't be transferred to another group)&#xD;&#xA;- The group can be delimited by a Parachain (but doesn't have to be)&#xD;&#xA;- The NFT can be destroyed by the current owner and a group account&#xD;&#xA;- The NFT can by minted by a group-account and the to-be-owner&#xD;&#xA;- The NFT transfer can be prepared/signed off-line by the group member-pair&#xD;&#xA;- The on-chain NFT transfer requires only the receiving member and a group account&#xD;&#xA;- The NFT data is all on-chain&#xD;&#xA;&#xD;&#xA;Appreciate any pointers.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33335" PostHistoryTypeId="1" PostId="8490" RevisionGUID="cdd219f1-2575-42df-9f14-529b42d21a5d" CreationDate="2023-05-15T01:22:46.087" UserId="3344" Text="Efficiently limit NFT transfers to members of a group" ContentLicense="CC BY-SA 4.0" />
  <row Id="33336" PostHistoryTypeId="3" PostId="8490" RevisionGUID="cdd219f1-2575-42df-9f14-529b42d21a5d" CreationDate="2023-05-15T01:22:46.087" UserId="3344" Text="|transactions|nft|security|loose-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33337" PostHistoryTypeId="52" PostId="8488" RevisionGUID="59a8fdc9-20d4-4e1f-a7d2-c2b0c5bd5f2a" CreationDate="2023-05-15T01:29:29.133" />
  <row Id="33338" PostHistoryTypeId="2" PostId="8491" RevisionGUID="21aad4fa-f902-4bb6-bfff-da9c676e431b" CreationDate="2023-05-15T03:22:10.450" UserId="3850" Text="I copied the [pausable ink example][1] and am running into the following error (here is the [repo][2]):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `__ink_TraitInfo`, `pausedOutput`&#xD;&#xA; --&gt; /home/snowmead/opt/projects/liquid-staking/contracts/staker_facet_v1/src/lib.rs:4:1&#xD;&#xA;  |&#xD;&#xA;4 | #[openbrush::contract]&#xD;&#xA;  | ^^^^^^^^^^^^^^^^^^^^^^ missing `__ink_TraitInfo`, `pausedOutput` in implementation&#xD;&#xA;  |&#xD;&#xA;  = note: this error originates in the attribute macro `openbrush::contract` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;  = help: implement the missing item: `type __ink_TraitInfo = /* Type */;`&#xD;&#xA;  = help: implement the missing item: `type pausedOutput = /* Type */;`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0046`.&#xD;&#xA;error: could not compile `staker_facet_v1` (lib) due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Brushfam/openbrush-contracts/tree/main/examples/pausable&#xD;&#xA;  [2]: https://github.com/ok-Alice/liquid-staking/tree/main/contracts/staker" ContentLicense="CC BY-SA 4.0" />
  <row Id="33340" PostHistoryTypeId="1" PostId="8491" RevisionGUID="21aad4fa-f902-4bb6-bfff-da9c676e431b" CreationDate="2023-05-15T03:22:10.450" UserId="3850" Text="Missing trait items: `__ink_TraitInfo`, `pausedOutput`" ContentLicense="CC BY-SA 4.0" />
  <row Id="33341" PostHistoryTypeId="3" PostId="8491" RevisionGUID="21aad4fa-f902-4bb6-bfff-da9c676e431b" CreationDate="2023-05-15T03:22:10.450" UserId="3850" Text="|ink|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33342" PostHistoryTypeId="5" PostId="8491" RevisionGUID="d5f01f45-8bee-4664-a77c-bc6d62f264b7" CreationDate="2023-05-15T03:28:09.800" UserId="3850" Comment="added 25 characters in body" Text="I copied the [pausable ink example][1] and am running into the following error (here is the [repo][2]/`diamond-pattern` branch):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `__ink_TraitInfo`, `pausedOutput`&#xD;&#xA; --&gt; /home/snowmead/opt/projects/liquid-staking/contracts/staker_facet_v1/src/lib.rs:4:1&#xD;&#xA;  |&#xD;&#xA;4 | #[openbrush::contract]&#xD;&#xA;  | ^^^^^^^^^^^^^^^^^^^^^^ missing `__ink_TraitInfo`, `pausedOutput` in implementation&#xD;&#xA;  |&#xD;&#xA;  = note: this error originates in the attribute macro `openbrush::contract` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;  = help: implement the missing item: `type __ink_TraitInfo = /* Type */;`&#xD;&#xA;  = help: implement the missing item: `type pausedOutput = /* Type */;`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0046`.&#xD;&#xA;error: could not compile `staker_facet_v1` (lib) due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Brushfam/openbrush-contracts/tree/main/examples/pausable&#xD;&#xA;  [2]: https://github.com/ok-Alice/liquid-staking/tree/main/contracts/staker" ContentLicense="CC BY-SA 4.0" />
  <row Id="33343" PostHistoryTypeId="10" PostId="8347" RevisionGUID="13c186d9-ca82-41da-ae6d-2cf5c6853874" CreationDate="2023-05-15T04:28:54.213" UserId="-1" Comment="102" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:73,&quot;DisplayName&quot;:&quot;bkchr&quot;},{&quot;Id&quot;:523,&quot;DisplayName&quot;:&quot;Ron&quot;},{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:354,&quot;DisplayName&quot;:&quot;Shubham Gupta&quot;}],&quot;SiteSpecificCloseReasonIds&quot;:[]}" />
  <row Id="33344" PostHistoryTypeId="10" PostId="8322" RevisionGUID="5970e080-8d25-4bb3-9dc1-ddb683fde86d" CreationDate="2023-05-15T04:29:33.557" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[7939],&quot;Voters&quot;:[{&quot;Id&quot;:3317,&quot;DisplayName&quot;:&quot;Daan van der Plas&quot;},{&quot;Id&quot;:2281,&quot;DisplayName&quot;:&quot;Amit Kumar Yadav&quot;},{&quot;Id&quot;:2673,&quot;DisplayName&quot;:&quot;Adam Wierzbicki&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:354,&quot;DisplayName&quot;:&quot;Shubham Gupta&quot;}]}" />
  <row Id="33345" PostHistoryTypeId="2" PostId="8492" RevisionGUID="ad0fcc52-a471-4d01-bff0-267a2cadc842" CreationDate="2023-05-15T06:39:12.517" UserId="3919" Text="May I ask what is the issue with starting the corresponding relay chain reporting an error.  &#xD;&#xA;Check that the disk and memory are sufficient.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;dell@dell:~/Test/Relay$ ./polkadot \&#xD;&#xA;&gt; --validator \&#xD;&#xA;&gt; --name RelayNode \&#xD;&#xA;&gt; --base-path /home/dell/Test/Relay/store/node \&#xD;&#xA;&gt; --chain /home/dell/Test/Relay/relay.json \&#xD;&#xA;&gt; --port 20335 --ws-port 9946 --rpc-port 9935  \&#xD;&#xA;&gt; --out-peers 1000  --in-peers 1000 \&#xD;&#xA;&gt; --rpc-methods=unsafe \&#xD;&#xA;&gt; --rpc-cors=all \&#xD;&#xA;&gt; --allow-private-ipv4 --rpc-external --ws-external&#xD;&#xA;2023-05-15 06:20:03 It isn't safe to expose RPC publicly without a proxy server that filters available set of RPC methods.&#xD;&#xA;2023-05-15 06:20:03 It isn't safe to expose RPC publicly without a proxy server that filters available set of RPC methods.&#xD;&#xA;2023-05-15 06:20:03 Parity Polkadot&#xD;&#xA;2023-05-15 06:20:03 ✌️  version 0.9.12-unknown-x86_64-linux-gnu&#xD;&#xA;2023-05-15 06:20:03 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2023&#xD;&#xA;2023-05-15 06:20:03  Chain specification: Rococo Test Testnet&#xD;&#xA;2023-05-15 06:20:03  Node name: RelayNode&#xD;&#xA;2023-05-15 06:20:03  Role: AUTHORITY&#xD;&#xA;2023-05-15 06:20:03  Database: RocksDb at /home/dell/Test/Relay/store/node/chains/rococo_test_testnet/db/full&#xD;&#xA;2023-05-15 06:20:03 ⛓  Native runtime: rococo-300 (parity-rococo-v1.8-0.tx0.au0)&#xD;&#xA;2023-05-15 06:20:03  Local node identity is: 12D3KooWQVQm5hKkb9mUtRb4tUzaF4u2omxajc............&#xD;&#xA;2023-05-15 06:20:03  Highest known block at #2686275&#xD;&#xA;2023-05-15 06:20:03 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;2023-05-15 06:20:03 Listening for new connections on 0.0.0.0:9946.&#xD;&#xA;2023-05-15 06:20:03  Starting BABE Authorship worker&#xD;&#xA;&#xD;&#xA;thread 'tokio-runtime-worker' has overflowed its stack&#xD;&#xA;fatal runtime error: stack overflow&#xD;&#xA;Aborted (core dumped)&#xD;&#xA;```&#xD;&#xA;/home/dell/Test/Relay/store/node/chains/rococo_test_testnet/db/full&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qLULX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33347" PostHistoryTypeId="1" PostId="8492" RevisionGUID="ad0fcc52-a471-4d01-bff0-267a2cadc842" CreationDate="2023-05-15T06:39:12.517" UserId="3919" Text="thread 'tokio-runtime-worker' has overflowed its stack" ContentLicense="CC BY-SA 4.0" />
  <row Id="33348" PostHistoryTypeId="3" PostId="8492" RevisionGUID="ad0fcc52-a471-4d01-bff0-267a2cadc842" CreationDate="2023-05-15T06:39:12.517" UserId="3919" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33349" PostHistoryTypeId="2" PostId="8493" RevisionGUID="e7d2c2bf-b226-4404-93c5-14f8625161f7" CreationDate="2023-05-15T06:45:06.963" UserId="275" Text="This was because state trie version migration hasn't been done yet.&#xD;&#xA;state version needs to be `1`.&#xD;&#xA;For more information&#xD;&#xA;https://github.com/paritytech/substrate/issues/13921#issuecomment-1518812972&#xD;&#xA;https://hackmd.io/@kizi/HyoSO3lf9" ContentLicense="CC BY-SA 4.0" />
  <row Id="33351" PostHistoryTypeId="5" PostId="8492" RevisionGUID="b59172c4-a34b-462c-a2dc-28655ef6379c" CreationDate="2023-05-15T06:58:04.153" UserId="3919" Comment="added 89 characters in body" Text="May I ask what is the issue with starting the corresponding relay chain reporting an error.  &#xD;&#xA;Check that the disk and memory are sufficient.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;dell@dell:~/Test/Relay$ ./polkadot \&#xD;&#xA;&gt; --validator \&#xD;&#xA;&gt; --name RelayNode \&#xD;&#xA;&gt; --base-path /home/dell/Test/Relay/store/node \&#xD;&#xA;&gt; --chain /home/dell/Test/Relay/relay.json \&#xD;&#xA;&gt; --port 20335 --ws-port 9946 --rpc-port 9935  \&#xD;&#xA;&gt; --out-peers 1000  --in-peers 1000 \&#xD;&#xA;&gt; --rpc-methods=unsafe \&#xD;&#xA;&gt; --rpc-cors=all \&#xD;&#xA;&gt; --allow-private-ipv4 --rpc-external --ws-external&#xD;&#xA;2023-05-15 06:20:03 It isn't safe to expose RPC publicly without a proxy server that filters available set of RPC methods.&#xD;&#xA;2023-05-15 06:20:03 It isn't safe to expose RPC publicly without a proxy server that filters available set of RPC methods.&#xD;&#xA;2023-05-15 06:20:03 Parity Polkadot&#xD;&#xA;2023-05-15 06:20:03 ✌️  version 0.9.12-unknown-x86_64-linux-gnu&#xD;&#xA;2023-05-15 06:20:03 ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2023&#xD;&#xA;2023-05-15 06:20:03  Chain specification: Rococo Test Testnet&#xD;&#xA;2023-05-15 06:20:03  Node name: RelayNode&#xD;&#xA;2023-05-15 06:20:03  Role: AUTHORITY&#xD;&#xA;2023-05-15 06:20:03  Database: RocksDb at /home/dell/Test/Relay/store/node/chains/rococo_test_testnet/db/full&#xD;&#xA;2023-05-15 06:20:03 ⛓  Native runtime: rococo-300 (parity-rococo-v1.8-0.tx0.au0)&#xD;&#xA;2023-05-15 06:20:03  Local node identity is: 12D3KooWQVQm5hKkb9mUtRb4tUzaF4u2omxajc............&#xD;&#xA;2023-05-15 06:20:03  Highest known block at #2686275&#xD;&#xA;2023-05-15 06:20:03 〽️ Prometheus exporter started at 127.0.0.1:9615&#xD;&#xA;2023-05-15 06:20:03 Listening for new connections on 0.0.0.0:9946.&#xD;&#xA;2023-05-15 06:20:03  Starting BABE Authorship worker&#xD;&#xA;&#xD;&#xA;thread 'tokio-runtime-worker' has overflowed its stack&#xD;&#xA;fatal runtime error: stack overflow&#xD;&#xA;Aborted (core dumped)&#xD;&#xA;```&#xD;&#xA;/home/dell/Test/Relay/store/node/chains/rococo_test_testnet/db/full&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qLULX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/3X7kJ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33352" PostHistoryTypeId="2" PostId="8494" RevisionGUID="26b4041b-f4a3-4a88-b945-fbc6cbf10600" CreationDate="2023-05-15T07:09:17.037" UserId="4218" Text="Trying to call a function marked as `#[require_transactional]` from on_idle() hook triggers the error `Err : Transactional(NoLayer)`. &#xD;&#xA;&#xD;&#xA;I realise the transactional macro is optional for extrinsics and the default behaviour of all extrinsics is transactional after https://github.com/paritytech/substrate/pull/11927. But I'm curious if its safe to execute transactional calls from pallet hooks?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33354" PostHistoryTypeId="1" PostId="8494" RevisionGUID="26b4041b-f4a3-4a88-b945-fbc6cbf10600" CreationDate="2023-05-15T07:09:17.037" UserId="4218" Text="Are on_idle hooks transactional?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33355" PostHistoryTypeId="3" PostId="8494" RevisionGUID="26b4041b-f4a3-4a88-b945-fbc6cbf10600" CreationDate="2023-05-15T07:09:17.037" UserId="4218" Text="|runtime|transactions|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33357" PostHistoryTypeId="2" PostId="8495" RevisionGUID="1453576c-2c08-4d9d-9759-caf0398d5025" CreationDate="2023-05-15T09:19:24.717" UserId="325" Text="So lets say I have an unsigned transaction. Is there any way I can simulate the transaction without actually sending it to the chain to see if the transaction will fail or if it will be succesfull? Basically something like `estimateGas` on EVM chains. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33359" PostHistoryTypeId="1" PostId="8495" RevisionGUID="1453576c-2c08-4d9d-9759-caf0398d5025" CreationDate="2023-05-15T09:19:24.717" UserId="325" Text="Simulate transaction before sending" ContentLicense="CC BY-SA 4.0" />
  <row Id="33360" PostHistoryTypeId="3" PostId="8495" RevisionGUID="1453576c-2c08-4d9d-9759-caf0398d5025" CreationDate="2023-05-15T09:19:24.717" UserId="325" Text="|transactions|unsigned|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33361" PostHistoryTypeId="2" PostId="8496" RevisionGUID="63c91167-5040-467f-b22a-c705b9a83c8a" CreationDate="2023-05-15T09:30:23.357" UserId="3319" Text="you can try [validate_transaction][1] by calling into the runtime api using the client that you can get handle from outer node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html#method.validate_transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="33363" PostHistoryTypeId="2" PostId="8497" RevisionGUID="dbf6cdc4-4434-4048-ae79-6466e66ad7fc" CreationDate="2023-05-15T09:36:12.280" UserId="2762" Text="The implementation looks good, but it seems like you are missing some import of the pallet-balances-rpc because there is a warning saying `BalancesApiServer` is unused.&#xD;&#xA;&#xD;&#xA;You can try to follow this guide on StackExchange: [How to add custom RPCs?][1], which is a step by step guide about how to create a custom RPC in the pallet template.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5554/how-to-add-custom-rpcs" ContentLicense="CC BY-SA 4.0" />
  <row Id="33365" PostHistoryTypeId="5" PostId="8496" RevisionGUID="5e9ee2cf-25fd-44f7-8911-10dd4e0dbb44" CreationDate="2023-05-15T09:41:01.797" UserId="3319" Comment="added 59 characters in body" Text="you can try [validate_transaction][1] by calling into the runtime api using the client that you can get handle from outer node &#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA; from https://polkadot.js.org/apps/#/explorer -&gt; developer -&gt; Runtime calls -&gt; taggedTransactionQueue -&gt; validate_transaction .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_transaction_pool/runtime_api/trait.TaggedTransactionQueue.html#method.validate_transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="33366" PostHistoryTypeId="2" PostId="8498" RevisionGUID="4739cabd-7664-4002-9bf5-c736ac9a0fd3" CreationDate="2023-05-15T09:53:44.567" UserId="1842" Text="When reasoning about a particular problem, I realized that I don't know how session changes work with chain reversions. To my knowledge session changes are based on time/slots and not on blocks. So let's assume the following chain:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;                              Session N                          N + 1&#xD;&#xA;------------------------------^--|--------------------------------!|------------------------------------&#xD;&#xA;                &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A reversion is triggered at `!` back to `^`, so the new chain looks like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;       Still session N - 1                        &#xD;&#xA;------------------------------^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We are back to session `N - 1`, but given that we can not revert time, we will change session on the very next block being produced, but how? Time wise we will already be in session `N + 1`. So what happens? Do we lose a session? Will we jump somehow to session `N + 1` immediately? Will we have two session changes in direct sequence. (`^-` block will be session `N` and `^--` will be already session `N + 1`?)&#xD;&#xA;&#xD;&#xA;Put differently: Are we catching up or skip or something else entirely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33368" PostHistoryTypeId="1" PostId="8498" RevisionGUID="4739cabd-7664-4002-9bf5-c736ac9a0fd3" CreationDate="2023-05-15T09:53:44.567" UserId="1842" Text="Session changes on reversion" ContentLicense="CC BY-SA 4.0" />
  <row Id="33369" PostHistoryTypeId="3" PostId="8498" RevisionGUID="4739cabd-7664-4002-9bf5-c736ac9a0fd3" CreationDate="2023-05-15T09:53:44.567" UserId="1842" Text="|consensus|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33370" PostHistoryTypeId="2" PostId="8499" RevisionGUID="7798d581-c757-4b74-a87b-71da576e4cce" CreationDate="2023-05-15T10:00:40.490" UserId="2762" Text="You can do it via a runtime API call, using the contractsApi endpoint provided by the contracts pallet. &#xD;&#xA;&#xD;&#xA;The endpoint provides a getStorage method, where you have to specify as argument the contract address and the Contract Root Storage Key.&#xD;&#xA;&#xD;&#xA;Check this in the docs for more info and an example: [Accessing storage items with the contractsApi runtime call API][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/datastructures/storage-in-metadata#accessing-storage-items-with-the-contractsapi-runtime-call-api" ContentLicense="CC BY-SA 4.0" />
  <row Id="33372" PostHistoryTypeId="2" PostId="8500" RevisionGUID="ccc5cf17-1e49-4741-8247-21757e3859fb" CreationDate="2023-05-15T10:35:16.360" UserId="4222" Text="I was following the substrate SDK official documentation for building a parachain on the Polkadot blockchain, and in the connect a local parachain tutorial(https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/), the collator node is not starting and giving the following error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/x0A2R.png&#xD;&#xA;&#xD;&#xA;I added the rust-toolchain.toml file in the substrate-parachain-template as given in the following link https://substrate.stackexchange.com/questions/7714/cannot-run-substrate-on-a-fresh-macbook-m2 and compiled it again but it is still giving the same error please help.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33374" PostHistoryTypeId="1" PostId="8500" RevisionGUID="ccc5cf17-1e49-4741-8247-21757e3859fb" CreationDate="2023-05-15T10:35:16.360" UserId="4222" Text="(Parachain) cannot create a runtime error=Other(&quot;cannot deserialize module: unknown Opcode(192)&quot;)" ContentLicense="CC BY-SA 4.0" />
  <row Id="33375" PostHistoryTypeId="3" PostId="8500" RevisionGUID="ccc5cf17-1e49-4741-8247-21757e3859fb" CreationDate="2023-05-15T10:35:16.360" UserId="4222" Text="|polkadot|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33376" PostHistoryTypeId="5" PostId="8484" RevisionGUID="5dc50c90-b0a4-4ed4-ad4c-d4e46e0ff62f" CreationDate="2023-05-15T10:57:51.780" UserId="2762" Comment="improved formatting" Text="I am experiencing an issue when using cargo-contract (version 1.5.1) to build a project (command: `cargo +nightly contract build`). The specified toolchain is not being recognized, and the process is forcibly calling nightly-2022-06-30 instead.&#xD;&#xA;&#xD;&#xA;This occurs on both my M2 MacOS and Ubuntu (within the Windows11 WSL environment), suggesting that the problem is likely not device-dependent. I have followed the installation instructions as outlined in Astar Doc's Ink! Environment (https://docs.astar.network/docs/build/environment/ink_environment/).&#xD;&#xA;&#xD;&#xA;The issue surfaces when building a flipper created by cargo contract new flipper. Interestingly, the problem does not occur when I install cargo-contract V2, suggesting that the issue might specifically be with V1.5.1.&#xD;&#xA;&#xD;&#xA;There are no elements that could potentially influence the toolchain specification (such as environment variables or specification via the rust-toolchain file). Even after uninstalling nightly-2022-06-30 using rustup toolchain uninstall, the process still attempts to call this version.&#xD;&#xA;&#xD;&#xA;Here is the corresponding log:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;yasuyasu@mocomocha:~/astar/flipper$ cargo +nightly contract build&#xD;&#xA;2023-05-13T12:50:30.989598Z  INFO cargo_contract::crate_metadata: Fetching cargo metadata for Cargo.toml&#xD;&#xA;2023-05-13T12:50:31.050626Z  INFO cargo_contract::util: Invoking cargo: &quot;/home/yasuyasu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;tree&quot; &quot;-i&quot; &quot;parity-scale-codec&quot; &quot;--duplicates&quot;&#xD;&#xA;2023-05-13T12:50:31.070036Z  INFO cargo_contract::util: Invoking cargo: &quot;/home/yasuyasu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;tree&quot; &quot;-i&quot; &quot;scale-info&quot; &quot;--duplicates&quot;&#xD;&#xA;2023-05-13T12:50:31.088857Z  INFO cargo_contract::cmd::build: Contract version: Version { major: 3, minor: 4, patch: 0 }&#xD;&#xA; [1/5] Checking ink! linting rules&#xD;&#xA;2023-05-13T12:50:31.113119Z  INFO cargo_contract::util: Invoking cargo: cd &quot;/home/yasuyasu/astar/flipper&quot; &amp;&amp; DYLINT_LIBRARY_PATH=&quot;/tmp/cargo-contract-dylint_CAz4e7&quot; &quot;/home/yasuyasu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;dylint&quot; &quot;--lib&quot; &quot;ink_linting&quot; &quot;--manifest-path=/home/yasuyasu/astar/flipper/Cargo.toml&quot;&#xD;&#xA;Checking with toolchain `nightly-2022-06-30-x86_64-unknown-linux-gnu`&#xD;&#xA;    Checking scale-info v2.6.0&#xD;&#xA;error[E0658]: `let...else` statements are unstable&#xD;&#xA;   --&gt; /home/yasuyasu/.cargo/registry/src/github.com-1ecc6299db9ec823/scale-info-2.6.0/src/portable.rs:130:17&#xD;&#xA;    |&#xD;&#xA;130 | /                 let Some(ty) = &amp;param.ty else {&#xD;&#xA;131 | |                     continue&#xD;&#xA;132 | |                 };&#xD;&#xA;    | |__________________^&#xD;&#xA;    |&#xD;&#xA;    = note: see issue #87335 &lt;https://github.com/rust-lang/rust/issues/87335&gt; for more information&#xD;&#xA;    = help: add `#![feature(let_else)]` to the crate attributes to enable&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0658`.&#xD;&#xA;error: could not compile `scale-info` due to previous error&#xD;&#xA;Error: Compilation failed with toolchain `nightly-2022-06-30-x86_64-unknown-linux-gnu`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    command failed: CLIPPY_DISABLE_DOCS_LINKS=&quot;null&quot; DYLINT_LIBS=&quot;[\&quot;/tmp/cargo-contract-dylint_CAz4e7/libink_linting@nightly-2022-06-30-x86_64-unknown-linux-gnu.so\&quot;]&quot; RUSTC_WORKSPACE_WRAPPER=&quot;/home/yasuyasu/.dylint_drivers/nightly-2022-06-30-x86_64-unknown-linux-gnu/dylint-driver&quot; RUSTUP_TOOLCHAIN=&quot;nightly-2022-06-30-x86_64-unknown-linux-gnu&quot; &quot;cargo&quot; &quot;check&quot; &quot;--target-dir&quot; &quot;/home/yasuyasu/astar/flipper/target/dylint/target/nightly-2022-06-30-x86_64-unknown-linux-gnu&quot; &quot;--manifest-path&quot; &quot;/home/yasuyasu/astar/flipper/Cargo.toml&quot;&#xD;&#xA;ERROR: `cd &quot;/home/yasuyasu/astar/flipper&quot; &amp;&amp; DYLINT_LIBRARY_PATH=&quot;/tmp/cargo-contract-dylint_CAz4e7&quot; &quot;/home/yasuyasu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;dylint&quot; &quot;--lib&quot; &quot;ink_linting&quot; &quot;--manifest-path=/home/yasuyasu/astar/flipper/Cargo.toml&quot;` failed with exit code: Some(1)&#xD;&#xA;yasuyasu@mocomocha:~/astar/flipper$&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33378" PostHistoryTypeId="2" PostId="8501" RevisionGUID="47e744af-6a1a-4e59-aeae-605e7a31dc39" CreationDate="2023-05-15T11:40:48.650" UserId="4222" Text="How do I verify I have the correct version of substrate binaries and libraries as required by substrate-parachain-template, and how do I write a rust-toolchain.toml file that matches the versions required by substrate node template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33380" PostHistoryTypeId="1" PostId="8501" RevisionGUID="47e744af-6a1a-4e59-aeae-605e7a31dc39" CreationDate="2023-05-15T11:40:48.650" UserId="4222" Text="How do i verify i have the correct version of substrate binaries and libraries as required by substrate-parachain-template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33381" PostHistoryTypeId="3" PostId="8501" RevisionGUID="47e744af-6a1a-4e59-aeae-605e7a31dc39" CreationDate="2023-05-15T11:40:48.650" UserId="4222" Text="|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33382" PostHistoryTypeId="2" PostId="8502" RevisionGUID="38b2f0d0-ef65-45e4-8587-c267047e6534" CreationDate="2023-05-15T12:29:10.600" UserId="2762" Text="FRAME has the [NFTs pallet][1] with the logic to deal with Nfts, it is highly configurable to adjust it to the logic you want when adding it into your chain. For example with the [Pallet-level feature flags][2] would allow disabling functionalities not needed in the runtime.&#xD;&#xA;&#xD;&#xA;See the full documentation here: https://wiki.polkadot.network/docs/learn-nft-pallets&#xD;&#xA;&#xD;&#xA;If with all the configuration you still can't can implement your own logic, you can build your own pallet coupling it to the NFTs pallet.&#xD;&#xA;An example of this is a work in progress feature: NFTs fractionalization, ([see in the docs][3]).&#xD;&#xA;&#xD;&#xA;Another alternative is implement this logic with a Smart Contract, see this previous StackExchange question: [When should I build a Substrate FRAME Pallet versus a Smart Contract?][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/nfts&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/pull/12367&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/learn-nft-pallets#work-in-progress&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/4/when-should-i-build-a-substrate-frame-pallet-versus-a-smart-contract/5#5" ContentLicense="CC BY-SA 4.0" />
  <row Id="33384" PostHistoryTypeId="5" PostId="8502" RevisionGUID="b6e36a74-b8ae-45f4-ab2c-4e859b7589aa" CreationDate="2023-05-15T12:47:12.150" UserId="2762" Comment="added 180 characters in body" Text="FRAME has the [NFTs pallet][1] with the logic to deal with Nfts, it is highly configurable to adjust it to the logic you want when adding it into your chain. For example with the [Pallet-level feature flags][2] would allow disabling functionalities not needed in the runtime.&#xD;&#xA;&#xD;&#xA;It has an extrinsic to change the permissions over a collection of items that can be useful for your use case:&#xD;&#xA;&#xD;&#xA;&gt; `set_team`: Alter the permissioned accounts of a collection.&#xD;&#xA;&#xD;&#xA;See the full documentation here: https://wiki.polkadot.network/docs/learn-nft-pallets&#xD;&#xA;&#xD;&#xA;If with all the configuration you still can't can implement your own logic, you can build your own pallet coupling it to the NFTs pallet.&#xD;&#xA;An example of this is a work in progress feature: NFTs fractionalization, ([see in the docs][3]).&#xD;&#xA;&#xD;&#xA;Another alternative is implement this logic with a Smart Contract, see this previous StackExchange question: [When should I build a Substrate FRAME Pallet versus a Smart Contract?][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame/nfts&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/pull/12367&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/learn-nft-pallets#work-in-progress&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/4/when-should-i-build-a-substrate-frame-pallet-versus-a-smart-contract/5#5" ContentLicense="CC BY-SA 4.0" />
  <row Id="33385" PostHistoryTypeId="2" PostId="8503" RevisionGUID="fcf4a51b-b041-498d-9b48-44bbe6aebaac" CreationDate="2023-05-15T12:54:27.543" UserId="2372" Text="Kindly add more clarity to your question. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33387" PostHistoryTypeId="2" PostId="8504" RevisionGUID="bb60cd49-ab08-4d8a-b3df-66903ec54cd9" CreationDate="2023-05-15T12:54:37.667" UserId="3850" Text="Was missing `#[ink(message)]` on the `paused` implemented method." ContentLicense="CC BY-SA 4.0" />
  <row Id="33389" PostHistoryTypeId="2" PostId="8505" RevisionGUID="2f443938-2f2d-439a-9d22-cd26505de1ff" CreationDate="2023-05-15T12:56:33.693" UserId="2372" Text="Kindly downgrade your nightly version. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33391" PostHistoryTypeId="5" PostId="8505" RevisionGUID="f066cff9-64c7-4147-ab2b-076e86e2b5aa" CreationDate="2023-05-15T12:58:43.660" UserId="2281" Comment="added 26 characters in body" Text="Kindly downgrade your nightly version you can downgrade it to 68." ContentLicense="CC BY-SA 4.0" />
  <row Id="33392" PostHistoryTypeId="6" PostId="8500" RevisionGUID="02a4f205-0489-4a12-8782-f4110103e0ce" CreationDate="2023-05-15T13:01:07.300" UserId="354" Comment="edited tags" Text="|parachain|substrate-parachain-template|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33393" PostHistoryTypeId="2" PostId="8506" RevisionGUID="d9a779fa-a2b2-4090-8013-d34cce3efd85" CreationDate="2023-05-15T13:04:45.633" UserId="3711" Text="Whilst reading the [docs](https://use.ink/datastructures/storage-layout) for ink I came across this warning:&#xD;&#xA;&gt;CAUTION&#xD;&#xA;If any type exhibiting Packed layout gets large enough (an ever-growing Vec might be a prime candidate for this), it will break your contract. This is because for encoding and decoding storage items, there is a buffer with only limited capacity (around 16KB in the default configuration) available. This means any contract trying to decode more than that will trap! If you are unsure about the potential size a data structure might get, consider using an ink! Mapping, which can store an arbitrary number of elements, instead.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It looks like the `StorageLayout` has been changed from this [pull request](https://github.com/paritytech/ink/pull/1331), so I'm not sure if this is still an issue. However, it has made me wonder about the size constraints of the variables I am using in my contract storage.&#xD;&#xA;&#xD;&#xA;So for my contract storage in `ink`, given:&#xD;&#xA;&#xD;&#xA;1. `Mapping&lt;A,B&gt;`, how large can `A` be?&#xD;&#xA;1. `Mapping&lt;A,B&gt;`, how large can `B` be?&#xD;&#xA;1. `Mapping&lt;A,B&gt;`, what's the max number of key-value pairs the map can handle?&#xD;&#xA;1. `Vec&lt;A&gt;`, what's the max length of the vec?&#xD;&#xA;1. `Vec&lt;A&gt;`, what's the max size of `A`?&#xD;&#xA;1. `Lazy&lt;Vec&lt;A&gt;&gt;`, does the lazy container change any size limits of (4) or (5)?&#xD;&#xA;1. Is there an overall contract storage size limit?&#xD;&#xA;1. Will these limits change per chain? The warning above mentioned &quot;16KB in the default configuration&quot; so I assume this varies?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33395" PostHistoryTypeId="1" PostId="8506" RevisionGUID="d9a779fa-a2b2-4090-8013-d34cce3efd85" CreationDate="2023-05-15T13:04:45.633" UserId="3711" Text="What are the size limits of contract storage in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33396" PostHistoryTypeId="3" PostId="8506" RevisionGUID="d9a779fa-a2b2-4090-8013-d34cce3efd85" CreationDate="2023-05-15T13:04:45.633" UserId="3711" Text="|ink|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33397" PostHistoryTypeId="5" PostId="8494" RevisionGUID="0701e513-8a4c-4548-8a7e-048fa7646ed0" CreationDate="2023-05-15T13:17:36.520" UserId="2281" Comment="improved formatting" Text="Trying to call a function marked as `#[require_transactional]` from on_idle() hook triggers the error `Err : Transactional(NoLayer)`. &#xD;&#xA;&#xD;&#xA;I realise the transactional macro is optional for extrinsics and the default behaviour of all extrinsics is transactional after [this][1]. But I'm curious if its safe to execute transactional calls from pallet hooks?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/11927" ContentLicense="CC BY-SA 4.0" />
  <row Id="33398" PostHistoryTypeId="5" PostId="8504" RevisionGUID="2babb1bf-c875-45a2-8dcc-52cfa745b644" CreationDate="2023-05-15T13:29:26.857" UserId="2281" Comment="added 36 characters in body" Text="Was missing `#[ink(message)]` on the `paused` implemented method.After adding this solved my problem." ContentLicense="CC BY-SA 4.0" />
  <row Id="33399" PostHistoryTypeId="5" PostId="8503" RevisionGUID="83a16d86-94db-49ae-a015-33c8ef2577c6" CreationDate="2023-05-15T13:31:13.457" UserId="2281" Comment="added 61 characters in body" Text="Kindly add more clarity to your question.try to add some screenshots and to give more details about it." ContentLicense="CC BY-SA 4.0" />
  <row Id="33400" PostHistoryTypeId="2" PostId="8507" RevisionGUID="90151371-89b8-4e4a-9cbc-0cd73ecc67c0" CreationDate="2023-05-15T14:07:32.043" UserId="3980" Text="I looked into this a little bit. It looks like there is nothing built in at the moment.&#xD;&#xA;&#xD;&#xA;In frame there is one signed extension [CheckedWeight][1]&#xD;&#xA;that make sure that the weight for a specific [DispatchClass][2] (Operational, Mandatory, Normal) does not exceed the configured limit. However this can't be done at the Pallet level.&#xD;&#xA;&#xD;&#xA;One solution would be to create a similar signed extension that gives a maximum authorized weights for pallet-contracts extrinsics.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_system/struct.CheckWeight.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/frame_support/dispatch/enum.DispatchClass.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="33402" PostHistoryTypeId="2" PostId="8508" RevisionGUID="e538b33a-f740-43ad-92a7-0fe5a9271d1d" CreationDate="2023-05-15T15:48:38.760" UserId="3711" Text="How can I have a fixed size array in my ink smart contract storage?&#xD;&#xA;&#xD;&#xA;E.g.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;    // Contract storage&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct MyContract {&#xD;&#xA;        myArray: [u8; 64]&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get &quot;the trait `StorageLayout` is not implemented for `[u8; 64]`&quot; as the error during compilation.&#xD;&#xA;&#xD;&#xA;I don't want to use a `Vec&lt;u8&gt;` as I would have to do size checks all over the place to ensure it's consistently 64 elements long." ContentLicense="CC BY-SA 4.0" />
  <row Id="33404" PostHistoryTypeId="1" PostId="8508" RevisionGUID="e538b33a-f740-43ad-92a7-0fe5a9271d1d" CreationDate="2023-05-15T15:48:38.760" UserId="3711" Text="Fixed size array in ink smart contract storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="33405" PostHistoryTypeId="3" PostId="8508" RevisionGUID="e538b33a-f740-43ad-92a7-0fe5a9271d1d" CreationDate="2023-05-15T15:48:38.760" UserId="3711" Text="|ink|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33414" PostHistoryTypeId="2" PostId="8509" RevisionGUID="4748e7b0-de1b-4a26-a153-9fe49edf30ca" CreationDate="2023-05-15T17:18:44.887" UserId="28" Text="No, pallet hooks are not transactional by default, only extrinsics are.&#xD;&#xA;&#xD;&#xA;You should be able to create a transactional layer within the pallet hook so that the error of `NoLayer` goes away, but generally, you should keep logic within your hooks to be infalliable.&#xD;&#xA;&#xD;&#xA;If you choose to use a transactional layer, something as simple as this should work:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn on_idle(_block: T::BlockNumber, remaining_weight: Weight) -&gt; Weight {&#xD;&#xA;    #[transactional]&#xD;&#xA;    {&#xD;&#xA;         // your transactional function here&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33416" PostHistoryTypeId="5" PostId="8509" RevisionGUID="3942f247-d830-49c7-abef-2761cb539d5a" CreationDate="2023-05-15T17:26:53.023" UserId="28" Comment="deleted 2 characters in body" Text="No, pallet hooks are not transactional by default, only extrinsics are.&#xD;&#xA;&#xD;&#xA;You should be able to create a transactional layer within the pallet hook so that the error of `NoLayer` goes away, but generally, you should keep logic within your hooks to be infalliable.&#xD;&#xA;&#xD;&#xA;If you choose to use a transactional layer, something as simple as this should work:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn on_idle(_block: T::BlockNumber, remaining_weight: Weight) -&gt; Weight {&#xD;&#xA;    with_transaction(|| {&#xD;&#xA;        // your transactional function here&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33417" PostHistoryTypeId="2" PostId="8510" RevisionGUID="9c134d1c-1b8d-4409-8ee9-6dcf5f71fc6f" CreationDate="2023-05-15T22:35:40.900" UserId="4213" Text="When I try to deploy a solidity smart contract on my substrate node I get the following error:&#xD;&#xA;&#xD;&#xA;&quot;Gas estimation failed&#xD;&#xA;Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?&#xD;&#xA;Returned error: {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:&quot;unknown field `type`, expected one of `from`, `to`, `gasPrice`, `maxFeePerGas`, `maxPriorityFeePerGas`, `gas`, `value`, `data`, `nonce`, `accessList` at line 1 column 8639&quot;,&quot;id&quot;:339420499546212}&quot;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/pwq6Q.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33419" PostHistoryTypeId="1" PostId="8510" RevisionGUID="9c134d1c-1b8d-4409-8ee9-6dcf5f71fc6f" CreationDate="2023-05-15T22:35:40.900" UserId="4213" Text="Problems deploying EVM contract with substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="33420" PostHistoryTypeId="3" PostId="8510" RevisionGUID="9c134d1c-1b8d-4409-8ee9-6dcf5f71fc6f" CreationDate="2023-05-15T22:35:40.900" UserId="4213" Text="|evm|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33421" PostHistoryTypeId="2" PostId="8511" RevisionGUID="ca4d23d3-2c06-46ec-a5b5-0b73c6dbd3ab" CreationDate="2023-05-15T23:56:11.577" UserId="3344" Text="Collating information here that (eventually, in the fullness of time, etc.) should address the use case. Open questions will reflect the state of play.&#xD;&#xA;&#xD;&#xA;- The [uniques](https://paritytech.github.io/substrate/master/pallet_uniques/index.html) pallet has [`set_team`](https://paritytech.github.io/substrate/master/pallet_uniques/pallet/dispatchables/fn.set_team.html) functionality and is listed in the [Substrate docs](https://docs.substrate.io/reference/frame-pallets/)&#xD;&#xA;- The [NFTs pallet](https://github.com/paritytech/substrate/tree/master/frame/nfts) also has [`set_team`](https://paritytech.github.io/substrate/master/pallet_nfts/pallet/dispatchables/fn.set_team.html)&#xD;&#xA;- Offline transactions can be prepared using [`txwrapper`](https://wiki.polkadot.network/docs/build-transaction-construction#tx-wrapper)" ContentLicense="CC BY-SA 4.0" />
  <row Id="33423" PostHistoryTypeId="2" PostId="8512" RevisionGUID="0791b022-60be-4510-a86f-764cf4fbb5ae" CreationDate="2023-05-16T04:08:43.670" UserId="2844" Text="This is my [substrate-code](https://github.com/ganesh1233456/substrate-node). Running `cargo build --release` works fine but while starting node using `./target/release/node-template --dev`, I get this error. &#xD;&#xA;&#xD;&#xA;`Thread 'main' panicked at 'epoch_config must not be None',`&#xD;&#xA;&#xD;&#xA;Someone please help me what's going on here.&#xD;&#xA;&#xD;&#xA;ganesholi@Ganeshs-MacBook-Air default-substrate-node-template % ./target/release/node-template --dev                                 &#xD;&#xA;2023-05-16 09:45:58 Substrate Node    &#xD;&#xA;2023-05-16 09:45:58 ✌️  version 4.0.0-dev-unknown    &#xD;&#xA;2023-05-16 09:45:58 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2023    &#xD;&#xA;2023-05-16 09:45:58  Chain specification: Development    &#xD;&#xA;2023-05-16 09:45:58   Node name: unknown-limit-2196    &#xD;&#xA;2023-05-16 09:45:58  Role: AUTHORITY    &#xD;&#xA;2023-05-16 09:45:58  Database: RocksDb at /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/substrateGQ0JqC/chains/dev/db/full    &#xD;&#xA;2023-05-16 09:45:58 ⛓  Native runtime: node-268 (substrate-node-0.tx2.au10)    &#xD;&#xA;&#xD;&#xA;====================&#xD;&#xA;&#xD;&#xA;Version: 4.0.0-dev-unknown&#xD;&#xA;&#xD;&#xA;   0: backtrace::capture::Backtrace::new&#xD;&#xA;   1: sp_panic_handler::set::{{closure}}&#xD;&#xA;   2: &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::Fn&lt;Args&gt;&gt;::call&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/alloc/src/boxed.rs:2002:9&#xD;&#xA;      std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:692:13&#xD;&#xA;   3: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:579:13&#xD;&#xA;   4: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/sys_common/backtrace.rs:137:18&#xD;&#xA;   5: rust_begin_unwind&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:575:5&#xD;&#xA;   6: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/core/src/panicking.rs:64:14&#xD;&#xA;   7: core::panicking::panic_display&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/core/src/panicking.rs:136:5&#xD;&#xA;   8: core::panicking::panic_str&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/core/src/panicking.rs:120:5&#xD;&#xA;   9: core::option::expect_failed&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/core/src/option.rs:1923:5&#xD;&#xA;  10: &lt;pallet_babe::pallet::GenesisConfig as frame_support::traits::hooks::GenesisBuild&lt;T&gt;&gt;::build&#xD;&#xA;  11: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  12: sp_state_machine::basic::BasicExternalities::execute_with_storage&#xD;&#xA;  13: &lt;node_template_runtime::GenesisConfig as sp_runtime::BuildStorage&gt;::assimilate_storage&#xD;&#xA;  14: &lt;sc_chain_spec::chain_spec::ChainSpec&lt;G,E&gt; as sp_runtime::BuildStorage&gt;::assimilate_storage&#xD;&#xA;  15: sp_runtime::BuildStorage::build_storage&#xD;&#xA;  16: sc_chain_spec::genesis::GenesisBlockBuilder&lt;Block,B,E&gt;::new&#xD;&#xA;  17: sc_service::builder::new_full_parts&#xD;&#xA;  18: node_template::service::new_partial&#xD;&#xA;  19: node_template::service::new_full&#xD;&#xA;  20: tokio::runtime::park::CachedParkThread::block_on&#xD;&#xA;  21: tokio::runtime::scheduler::multi_thread::MultiThread::block_on&#xD;&#xA;  22: tokio::runtime::runtime::Runtime::block_on&#xD;&#xA;  23: node_template::command::run&#xD;&#xA;  24: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  25: std::rt::lang_start::{{closure}}&#xD;&#xA;  26: core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/core/src/ops/function.rs:287:13&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:483:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:447:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panic.rs:140:14&#xD;&#xA;      std::rt::lang_start_internal::{{closure}}&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/rt.rs:148:48&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:483:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:447:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panic.rs:140:14&#xD;&#xA;      std::rt::lang_start_internal&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/rt.rs:148:20&#xD;&#xA;  27: _main&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'main' panicked at 'epoch_config must not be None', /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/3bb3882/frame/babe/src/lib.rs:330&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;&#xD;&#xA;        support.anonymous.an&#xD;&#xA;&#xD;&#xA;ganesholi@Ganeshs-MacBook-Air default-substrate-node-template %    " ContentLicense="CC BY-SA 4.0" />
  <row Id="33425" PostHistoryTypeId="1" PostId="8512" RevisionGUID="0791b022-60be-4510-a86f-764cf4fbb5ae" CreationDate="2023-05-16T04:08:43.670" UserId="2844" Text="epoch_config must not be None" ContentLicense="CC BY-SA 4.0" />
  <row Id="33426" PostHistoryTypeId="3" PostId="8512" RevisionGUID="0791b022-60be-4510-a86f-764cf4fbb5ae" CreationDate="2023-05-16T04:08:43.670" UserId="2844" Text="|substrate-node-template|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33427" PostHistoryTypeId="5" PostId="8511" RevisionGUID="01c51dba-d587-457e-8307-7c0c3b8da20b" CreationDate="2023-05-16T04:17:40.797" UserId="3344" Comment="added 70 characters in body" Text="Collating information here that (eventually, in the fullness of time, etc.) should address the use case. Open questions will reflect the state of play.&#xD;&#xA;&#xD;&#xA;- The [uniques](https://paritytech.github.io/substrate/master/pallet_uniques/index.html) pallet has [`set_team`](https://paritytech.github.io/substrate/master/pallet_uniques/pallet/dispatchables/fn.set_team.html) functionality and is listed in the [Substrate docs](https://docs.substrate.io/reference/frame-pallets/)&#xD;&#xA;- The [NFTs pallet](https://github.com/paritytech/substrate/tree/master/frame/nfts) also has [`set_team`](https://paritytech.github.io/substrate/master/pallet_nfts/pallet/dispatchables/fn.set_team.html)&#xD;&#xA;- Offline transactions can be prepared using [`txwrapper`](https://wiki.polkadot.network/docs/build-transaction-construction#tx-wrapper)&#xD;&#xA;- Multisig-like functionality could be achieved via council+treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="33428" PostHistoryTypeId="2" PostId="8513" RevisionGUID="ac449d7e-9062-46b3-9a21-55ff6fc63c9c" CreationDate="2023-05-16T04:55:17.527" UserId="3993" Text="I am using the pallet_xcm_benchmarks, in the config for pallet_xcm_benchmarks::generic,&#xD;&#xA;I used &#xD;&#xA;```&#xD;&#xA;impl pallet_xcm_benchmarks::generic::Config for Runtime {&#xD;&#xA;fn worst_case_asset_exchange() -&gt; Result&lt;(MultiAssets, MultiAssets), BenchmarkError&gt; {&#xD;&#xA;					Err(BenchmarkError::Skip)&#xD;&#xA;				}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;this should have skipped the benchmark&#xD;&#xA;```&#xD;&#xA;exchange_asset {&#xD;&#xA;		let (give, want) = T::worst_case_asset_exchange().map_err(|_| BenchmarkError::Skip)?;&#xD;&#xA;		let assets = give.clone();&#xD;&#xA;&#xD;&#xA;		let mut executor = new_executor::&lt;T&gt;(Default::default());&#xD;&#xA;		executor.set_holding(give.into());&#xD;&#xA;		let instruction = Instruction::ExchangeAsset {&#xD;&#xA;			give: assets.into(),&#xD;&#xA;			want: want.clone(),&#xD;&#xA;			maximal: true,&#xD;&#xA;		};&#xD;&#xA;		let xcm = Xcm(vec![instruction]);&#xD;&#xA;	}: {&#xD;&#xA;		executor.bench_process(xcm)?;&#xD;&#xA;	} verify {&#xD;&#xA;		assert_eq!(executor.holding(), &amp;want.into());&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when I run the benchmark, it shows&#xD;&#xA;```&#xD;&#xA;023-05-16 09:32:01 WARNING: benchmark error skipped - exchange_asset    &#xD;&#xA;Error: Input(&quot;Benchmark pallet_xcm_benchmarks::generic::exchange_asset failed: Benchmark not found for this pallet.&quot;)&#xD;&#xA;```&#xD;&#xA;The same config is used in kusama https://github.com/paritytech/polkadot/blob/6ad852c129eef68baffd92a47797177e59d8f958/runtime/kusama/src/lib.rs#L2085&#xD;&#xA;&#xD;&#xA;How to fix this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33430" PostHistoryTypeId="1" PostId="8513" RevisionGUID="ac449d7e-9062-46b3-9a21-55ff6fc63c9c" CreationDate="2023-05-16T04:55:17.527" UserId="3993" Text="Benchmarks not getting skipped with Err(BenchmarkError::Skip)" ContentLicense="CC BY-SA 4.0" />
  <row Id="33431" PostHistoryTypeId="3" PostId="8513" RevisionGUID="ac449d7e-9062-46b3-9a21-55ff6fc63c9c" CreationDate="2023-05-16T04:55:17.527" UserId="3993" Text="|xcm|benchmarking|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33432" PostHistoryTypeId="2" PostId="8514" RevisionGUID="cd2b4e19-b6f2-4ef2-a5f7-744e13d342ec" CreationDate="2023-05-16T05:15:12.320" UserId="2281" Text="This error generally occur due to the wrong `gas_estimation`done by `metamask` to get rid of this error you can decrease the `gas_fee`of your chain or you can use metamask advance options to set the `gas_limit` manually.you can see [this][1] to customize the `gas_limit` on metamask or you can simply decrease your `gas_fee`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.metamask.io/hc/en-us/articles/360022895972-How-to-customize-gas-settings" ContentLicense="CC BY-SA 4.0" />
  <row Id="33434" PostHistoryTypeId="5" PostId="8514" RevisionGUID="26838455-5011-4187-ad80-5aef18e4e1ce" CreationDate="2023-05-16T05:20:23.830" UserId="2281" Comment="added 75 characters in body" Text="This error generally occur due to the wrong `gas_estimation` to get rid of this error you can decrease the `gas_fee`of your chain or you can use metamask advance options to set the `gas_limit` manually.you can also decrease the `gas_limit given in remix ide 3000000 to 30000`. you can see [this][1] to customize the `gas_limit` on metamask or you can simply decrease your `gas_fee`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.metamask.io/hc/en-us/articles/360022895972-How-to-customize-gas-settings" ContentLicense="CC BY-SA 4.0" />
  <row Id="33435" PostHistoryTypeId="5" PostId="8510" RevisionGUID="f5f0c3d4-13b1-4bfe-83de-ca2f4ec883ef" CreationDate="2023-05-16T05:24:21.883" UserId="2281" Comment="added 28 characters in body; edited title" Text="When I try to deploy a solidity smart contract on my substrate node I get the following error:&#xD;&#xA;&#xD;&#xA;&quot;Gas estimation failed&#xD;&#xA;Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?&#xD;&#xA;Returned error: {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:&quot;unknown field `type`, expected one of `from`, `to`, `gasPrice`, `maxFeePerGas`, `maxPriorityFeePerGas`, `gas`, `value`, `data`, `nonce`, `accessList` at line 1 column 8639&quot;,&quot;id&quot;:339420499546212}&quot;. How to solve this problem?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/pwq6Q.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33436" PostHistoryTypeId="4" PostId="8510" RevisionGUID="f5f0c3d4-13b1-4bfe-83de-ca2f4ec883ef" CreationDate="2023-05-16T05:24:21.883" UserId="2281" Comment="added 28 characters in body; edited title" Text="Getting &quot;Gas estimation failed&quot; error while deploying EVM contract on Substrate Node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33440" PostHistoryTypeId="5" PostId="8513" RevisionGUID="39ad9883-19d1-4626-9f4d-7ea8059f98ea" CreationDate="2023-05-16T05:50:18.997" UserId="2281" Comment="added 50 characters in body; edited tags" Text="I am using the pallet_xcm_benchmarks, in the config for pallet_xcm_benchmarks::generic,&#xD;&#xA;I have used&#xD;&#xA;&#xD;&#xA;    impl pallet_xcm_benchmarks::generic::Config for Runtime {&#xD;&#xA;    fn worst_case_asset_exchange() -&gt; Result&lt;(MultiAssets, MultiAssets), BenchmarkError&gt; {&#xD;&#xA;    					Err(BenchmarkError::Skip)&#xD;&#xA;    				}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**this should have skipped the benchmark**&#xD;&#xA;```&#xD;&#xA;exchange_asset {&#xD;&#xA;		let (give, want) = T::worst_case_asset_exchange().map_err(|_| BenchmarkError::Skip)?;&#xD;&#xA;		let assets = give.clone();&#xD;&#xA;&#xD;&#xA;		let mut executor = new_executor::&lt;T&gt;(Default::default());&#xD;&#xA;		executor.set_holding(give.into());&#xD;&#xA;		let instruction = Instruction::ExchangeAsset {&#xD;&#xA;			give: assets.into(),&#xD;&#xA;			want: want.clone(),&#xD;&#xA;			maximal: true,&#xD;&#xA;		};&#xD;&#xA;		let xcm = Xcm(vec![instruction]);&#xD;&#xA;	}: {&#xD;&#xA;		executor.bench_process(xcm)?;&#xD;&#xA;	} verify {&#xD;&#xA;		assert_eq!(executor.holding(), &amp;want.into());&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**when I run the benchmark, it shows**&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;023-05-16 09:32:01 WARNING: benchmark error skipped - exchange_asset   Error: Input(&quot;Benchmark pallet_xcm_benchmarks::generic::exchange_asset failed: Benchmark not found for this pallet.&quot;)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;The same config is used in [kusama][1]  How to fix this problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/6ad852c129eef68baffd92a47797177e59d8f958/runtime/kusama/src/lib.rs#L2085" ContentLicense="CC BY-SA 4.0" />
  <row Id="33441" PostHistoryTypeId="6" PostId="8513" RevisionGUID="39ad9883-19d1-4626-9f4d-7ea8059f98ea" CreationDate="2023-05-16T05:50:18.997" UserId="2281" Comment="added 50 characters in body; edited tags" Text="|pallet|xcm|benchmarking|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33442" PostHistoryTypeId="6" PostId="8510" RevisionGUID="992a66f4-9135-4fc0-b2b4-8ebd2c35200d" CreationDate="2023-05-16T05:56:37.800" UserId="2281" Comment="edited tags" Text="|evm|gas|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33443" PostHistoryTypeId="5" PostId="8512" RevisionGUID="5b30f4d0-2df2-475a-83ce-0a6debcb308c" CreationDate="2023-05-16T06:00:30.540" UserId="251" Comment="added 12 characters in body" Text="This is my [substrate-code](https://github.com/ganesh1233456/substrate-node). Running `cargo build --release` works fine but while starting node using `./target/release/node-template --dev`, I get this error. &#xD;&#xA;&#xD;&#xA;`Thread 'main' panicked at 'epoch_config must not be None',`&#xD;&#xA;&#xD;&#xA;Someone please help me what's going on here.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;ganesholi@Ganeshs-MacBook-Air default-substrate-node-template % ./target/release/node-template --dev                                 &#xD;&#xA;2023-05-16 09:45:58 Substrate Node    &#xD;&#xA;2023-05-16 09:45:58 ✌️  version 4.0.0-dev-unknown    &#xD;&#xA;2023-05-16 09:45:58 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2023    &#xD;&#xA;2023-05-16 09:45:58  Chain specification: Development    &#xD;&#xA;2023-05-16 09:45:58   Node name: unknown-limit-2196    &#xD;&#xA;2023-05-16 09:45:58  Role: AUTHORITY    &#xD;&#xA;2023-05-16 09:45:58  Database: RocksDb at /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/substrateGQ0JqC/chains/dev/db/full    &#xD;&#xA;2023-05-16 09:45:58 ⛓  Native runtime: node-268 (substrate-node-0.tx2.au10)    &#xD;&#xA;&#xD;&#xA;====================&#xD;&#xA;&#xD;&#xA;Version: 4.0.0-dev-unknown&#xD;&#xA;&#xD;&#xA;   0: backtrace::capture::Backtrace::new&#xD;&#xA;   1: sp_panic_handler::set::{{closure}}&#xD;&#xA;   2: &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::Fn&lt;Args&gt;&gt;::call&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/alloc/src/boxed.rs:2002:9&#xD;&#xA;      std::panicking::rust_panic_with_hook&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:692:13&#xD;&#xA;   3: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:579:13&#xD;&#xA;   4: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/sys_common/backtrace.rs:137:18&#xD;&#xA;   5: rust_begin_unwind&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:575:5&#xD;&#xA;   6: core::panicking::panic_fmt&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/core/src/panicking.rs:64:14&#xD;&#xA;   7: core::panicking::panic_display&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/core/src/panicking.rs:136:5&#xD;&#xA;   8: core::panicking::panic_str&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/core/src/panicking.rs:120:5&#xD;&#xA;   9: core::option::expect_failed&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/core/src/option.rs:1923:5&#xD;&#xA;  10: &lt;pallet_babe::pallet::GenesisConfig as frame_support::traits::hooks::GenesisBuild&lt;T&gt;&gt;::build&#xD;&#xA;  11: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  12: sp_state_machine::basic::BasicExternalities::execute_with_storage&#xD;&#xA;  13: &lt;node_template_runtime::GenesisConfig as sp_runtime::BuildStorage&gt;::assimilate_storage&#xD;&#xA;  14: &lt;sc_chain_spec::chain_spec::ChainSpec&lt;G,E&gt; as sp_runtime::BuildStorage&gt;::assimilate_storage&#xD;&#xA;  15: sp_runtime::BuildStorage::build_storage&#xD;&#xA;  16: sc_chain_spec::genesis::GenesisBlockBuilder&lt;Block,B,E&gt;::new&#xD;&#xA;  17: sc_service::builder::new_full_parts&#xD;&#xA;  18: node_template::service::new_partial&#xD;&#xA;  19: node_template::service::new_full&#xD;&#xA;  20: tokio::runtime::park::CachedParkThread::block_on&#xD;&#xA;  21: tokio::runtime::scheduler::multi_thread::MultiThread::block_on&#xD;&#xA;  22: tokio::runtime::runtime::Runtime::block_on&#xD;&#xA;  23: node_template::command::run&#xD;&#xA;  24: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  25: std::rt::lang_start::{{closure}}&#xD;&#xA;  26: core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;F&gt;::call_once&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/core/src/ops/function.rs:287:13&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:483:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:447:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panic.rs:140:14&#xD;&#xA;      std::rt::lang_start_internal::{{closure}}&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/rt.rs:148:48&#xD;&#xA;      std::panicking::try::do_call&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:483:40&#xD;&#xA;      std::panicking::try&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panicking.rs:447:19&#xD;&#xA;      std::panic::catch_unwind&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/panic.rs:140:14&#xD;&#xA;      std::rt::lang_start_internal&#xD;&#xA;             at /rustc/574b64a97f52162f965bc201e47f0af8279ca65d/library/std/src/rt.rs:148:20&#xD;&#xA;  27: _main&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'main' panicked at 'epoch_config must not be None', /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/3bb3882/frame/babe/src/lib.rs:330&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;&#xD;&#xA;        support.anonymous.an&#xD;&#xA;&#xD;&#xA;ganesholi@Ganeshs-MacBook-Air default-substrate-node-template %&#xD;&#xA;```    " ContentLicense="CC BY-SA 4.0" />
  <row Id="33444" PostHistoryTypeId="2" PostId="8515" RevisionGUID="00bdb459-b4a6-47cc-abab-328b0b449660" CreationDate="2023-05-16T06:22:56.507" UserId="251" Text="Just like it said, `must not be None`.&#xD;&#xA;&#xD;&#xA;Source: https://github.com/paritytech/substrate/blob/dd478bc60eb83a5f8f25aa65fdac2e519e9545ab/frame/babe/src/lib.rs#L329-L331&#xD;&#xA;&#xD;&#xA;Soluation: https://github.com/paritytech/substrate/blob/dd478bc60eb83a5f8f25aa65fdac2e519e9545ab/bin/node/cli/src/chain_spec.rs#L344" ContentLicense="CC BY-SA 4.0" />
  <row Id="33446" PostHistoryTypeId="5" PostId="8513" RevisionGUID="a6020d40-196c-4c11-8fb7-efd2b98fd900" CreationDate="2023-05-16T06:23:36.373" UserId="251" Comment="added 14 characters in body" Text="I am using the pallet_xcm_benchmarks, in the config for pallet_xcm_benchmarks::generic,&#xD;&#xA;I have used&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl pallet_xcm_benchmarks::generic::Config for Runtime {&#xD;&#xA;    fn worst_case_asset_exchange() -&gt; Result&lt;(MultiAssets, MultiAssets), BenchmarkError&gt; {&#xD;&#xA;		Err(BenchmarkError::Skip)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**this should have skipped the benchmark**&#xD;&#xA;```rs&#xD;&#xA;exchange_asset {&#xD;&#xA;	let (give, want) = T::worst_case_asset_exchange().map_err(|_| BenchmarkError::Skip)?;&#xD;&#xA;	let assets = give.clone();&#xD;&#xA;&#xD;&#xA;	let mut executor = new_executor::&lt;T&gt;(Default::default());&#xD;&#xA;	executor.set_holding(give.into());&#xD;&#xA;	let instruction = Instruction::ExchangeAsset {&#xD;&#xA;		give: assets.into(),&#xD;&#xA;		want: want.clone(),&#xD;&#xA;		maximal: true,&#xD;&#xA;	};&#xD;&#xA;	let xcm = Xcm(vec![instruction]);&#xD;&#xA;	}: {&#xD;&#xA;		executor.bench_process(xcm)?;&#xD;&#xA;	} verify {&#xD;&#xA;		assert_eq!(executor.holding(), &amp;want.into());&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**when I run the benchmark, it shows**&#xD;&#xA;```rs&#xD;&#xA;&#xD;&#xA;023-05-16 09:32:01 WARNING: benchmark error skipped - exchange_asset   Error: Input(&quot;Benchmark pallet_xcm_benchmarks::generic::exchange_asset failed: Benchmark not found for this pallet.&quot;)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;The same config is used in [kusama][1]  How to fix this problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/6ad852c129eef68baffd92a47797177e59d8f958/runtime/kusama/src/lib.rs#L2085" ContentLicense="CC BY-SA 4.0" />
  <row Id="33447" PostHistoryTypeId="5" PostId="8498" RevisionGUID="a5df70c2-9f2e-456b-b48c-9f1322ea9800" CreationDate="2023-05-16T06:45:06.070" UserId="2281" Comment="added 4 characters in body" Text="When reasoning about a particular problem, I realized that I don't know how session changes work with chain reversions. To my knowledge session changes are based on time/slots and not on blocks. So let's assume the following chain:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;&#xD;&#xA;                              Session N                          N + 1&#xD;&#xA;------------------------------^--|--------------------------------!|------------------------------------&#xD;&#xA;                &#xD;&#xA;```rs&#xD;&#xA;&#xD;&#xA;A reversion is triggered at `!` back to `^`, so the new chain looks like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;       Still session N - 1                        &#xD;&#xA;------------------------------^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We are back to session `N - 1`, but given that we can not revert time, we will change session on the very next block being produced, but how? Time wise we will already be in session `N + 1`. So what happens? Do we lose a session? Will we jump somehow to session `N + 1` immediately? Will we have two session changes in direct sequence. (`^-` block will be session `N` and `^--` will be already session `N + 1`?)&#xD;&#xA;&#xD;&#xA;Put differently: Are we catching up or skip or something else entirely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33449" PostHistoryTypeId="2" PostId="8516" RevisionGUID="f85e6fa0-90d8-46e5-aac7-752005f14fc0" CreationDate="2023-05-16T09:48:14.500" UserId="2844" Text="`sc-network-statement = { version = &quot;0.10.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }`&#xD;&#xA;&#xD;&#xA;I am using this package from substrate repo [here](https://github.com/paritytech/substrate/blob/master/client/network/statement/Cargo.toml). But it gives error `no package found`. Other package works fine but what I am getting this issue with this specific package? &#xD;&#xA;&#xD;&#xA;This is my code [repo](https://github.com/ganesh1233456/substrate-node)" ContentLicense="CC BY-SA 4.0" />
  <row Id="33451" PostHistoryTypeId="1" PostId="8516" RevisionGUID="f85e6fa0-90d8-46e5-aac7-752005f14fc0" CreationDate="2023-05-16T09:48:14.500" UserId="2844" Text="no matching package named `sc-network-statement` found" ContentLicense="CC BY-SA 4.0" />
  <row Id="33452" PostHistoryTypeId="3" PostId="8516" RevisionGUID="f85e6fa0-90d8-46e5-aac7-752005f14fc0" CreationDate="2023-05-16T09:48:14.500" UserId="2844" Text="|substrate-node-template|runtime|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33453" PostHistoryTypeId="5" PostId="8373" RevisionGUID="bf2e016d-333c-496f-a3ec-3db4a04b688f" CreationDate="2023-05-16T11:03:07.453" UserId="1942" Comment="added 85 characters in body" Text="[![enter image description here][1]][1]https://github.com/AstarNetwork/frontier.git&#xD;&#xA;&#xD;&#xA;https://github.com/AstarNetwork/Astar.git&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;cargo run -- --dev -d ./data -l info&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;frontier use HashedAddressMapping in evm pallet&#xD;&#xA;&#xD;&#xA;alice public key is d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;&#xD;&#xA;H160 is 0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b = BlakeTwo256( b&quot;evm:&quot;[0..4] + 15fdd31c61141abd04a99fd6822c8558854ccde3 )&#xD;&#xA;&#xD;&#xA;evm miner address is 5CMh6W6x5ZJaj2QGndYHa4Pc4ppvSFc9J66mBrxwteUkRe8p = ss58(0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct FindAuthorTruncated&lt;F&gt;(PhantomData&lt;F&gt;);&#xD;&#xA;impl&lt;F: FindAuthor&lt;u32&gt;&gt; FindAuthor&lt;H160&gt; for FindAuthorTruncated&lt;F&gt; {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;H160&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		if let Some(author_index) = F::find_author(digests) {&#xD;&#xA;			let authority_id = Aura::authorities()[author_index as usize].clone();&#xD;&#xA;			return Some(H160::from_slice(&amp;authority_id.to_raw_vec()[4..24]));&#xD;&#xA;		}&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;H: Hasher&lt;Out = H256&gt;&gt; AddressMapping&lt;AccountId32&gt; for HashedAddressMapping&lt;H&gt; {&#xD;&#xA;	fn into_account_id(address: H160) -&gt; AccountId32 {&#xD;&#xA;		let mut data = [0u8; 24];&#xD;&#xA;		data[0..4].copy_from_slice(b&quot;evm:&quot;);&#xD;&#xA;		data[4..24].copy_from_slice(&amp;address[..]);&#xD;&#xA;		let hash = H::hash(&amp;data);&#xD;&#xA;&#xD;&#xA;		AccountId32::from(Into::&lt;[u8; 32]&gt;::into(hash))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn pay_priority_fee(tip: Self::LiquidityInfo) {&#xD;&#xA;		// Default Ethereum behaviour: issue the tip to the block author.&#xD;&#xA;		if let Some(tip) = tip {&#xD;&#xA;			let account_id = T::AddressMapping::into_account_id(&lt;Pallet&lt;T&gt;&gt;::find_author());&#xD;&#xA;			let _ = C::deposit_into_existing(&amp;account_id, tip_after_commission.peek());&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/UMrIZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33454" PostHistoryTypeId="52" PostId="8512" RevisionGUID="a4e4b532-f26a-4f81-8b72-efe03854dcff" CreationDate="2023-05-16T12:08:48.967" />
  <row Id="33455" PostHistoryTypeId="2" PostId="8517" RevisionGUID="488b5bc8-ac9a-4890-a56c-d0a56f788f22" CreationDate="2023-05-16T12:11:06.827" UserId="2424" Text="I'm trying to integrate Fellowship in this [PR](https://github.com/bifrost-finance/bifrost/pull/972/files#diff-d95a0d9c89d0dbeca1ef180360379f0258ced158f3c72626ae5723a5f37d7ea3R1801) according to &lt;https://github.com/paritytech/polkadot/pull/5205&gt;,&#xD;&#xA;but when I run `make check-all` it produces the following error:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `(frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_indices::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, parachain_staking::Pallet&lt;Runtime&gt;, pallet_democracy::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_collective::Pallet&lt;Runtime, Instance2&gt;, pallet_elections_phragmen::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_conviction_voting::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime, Instance2&gt;, pallet_ranked_collective::Pallet&lt;Runtime, Instance1&gt;, governance::origins::custom_origins::Pallet&lt;Runtime&gt;, pallet_whitelist::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_proxy::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, bifrost_vesting::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_bounties::Pallet&lt;Runtime&gt;, pallet_tips::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, orml_tokens::Pallet&lt;Runtime&gt;, orml_currencies::Pallet&lt;Runtime&gt;, orml_unknown_tokens::Pallet&lt;Runtime&gt;, orml_xcm::Pallet&lt;Runtime&gt;, zenlink_protocol::Pallet&lt;Runtime&gt;, merkle_distributor::Pallet&lt;Runtime&gt;, zenlink_stable_amm::Pallet&lt;Runtime&gt;, zenlink_swap_router::Pallet&lt;Runtime&gt;, bifrost_flexible_fee::Pallet&lt;Runtime&gt;, bifrost_salp::Pallet&lt;Runtime&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance2&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance1&gt;, bifrost_token_issuer::Pallet&lt;Runtime&gt;, bifrost_lightening_redeem::Pallet&lt;Runtime&gt;, bifrost_salp_lite::Pallet&lt;Runtime&gt;, bifrost_call_switchgear::Pallet&lt;Runtime&gt;, bifrost_vsbond_auction::Pallet&lt;Runtime&gt;, bifrost_asset_registry::Pallet&lt;Runtime&gt;, bifrost_vtoken_minting::Pallet&lt;Runtime&gt;, bifrost_slp::Pallet&lt;Runtime&gt;, xcm_interface::Pallet&lt;Runtime&gt;, bifrost_vstoken_conversion::Pallet&lt;Runtime&gt;, bifrost_farming::Pallet&lt;Runtime&gt;, bifrost_system_staking::Pallet&lt;Runtime&gt;, bifrost_system_maker::Pallet&lt;Runtime&gt;, bifrost_fee_share::Pallet&lt;Runtime&gt;, bifrost_cross_in_out::Pallet&lt;Runtime&gt;): PalletsInfoAccess` is not satisfied&#xD;&#xA;   --&gt; runtime/bifrost-kusama/src/xcm_config.rs:596:29&#xD;&#xA;    |&#xD;&#xA;596 |     type PalletInstancesInfo = AllPalletsWithSystem;&#xD;&#xA;    |                                ^^^^^^^^^^^^^^^^^^^^ the trait `PalletsInfoAccess` is not implemented for `(frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_indices::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, parachain_staking::Pallet&lt;Runtime&gt;, pallet_democracy::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_collective::Pallet&lt;Runtime, Instance2&gt;, pallet_elections_phragmen::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_conviction_voting::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime, Instance2&gt;, pallet_ranked_collective::Pallet&lt;Runtime, Instance1&gt;, governance::origins::custom_origins::Pallet&lt;Runtime&gt;, pallet_whitelist::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_proxy::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, bifrost_vesting::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_bounties::Pallet&lt;Runtime&gt;, pallet_tips::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, orml_tokens::Pallet&lt;Runtime&gt;, orml_currencies::Pallet&lt;Runtime&gt;, orml_unknown_tokens::Pallet&lt;Runtime&gt;, orml_xcm::Pallet&lt;Runtime&gt;, zenlink_protocol::Pallet&lt;Runtime&gt;, merkle_distributor::Pallet&lt;Runtime&gt;, zenlink_stable_amm::Pallet&lt;Runtime&gt;, zenlink_swap_router::Pallet&lt;Runtime&gt;, bifrost_flexible_fee::Pallet&lt;Runtime&gt;, bifrost_salp::Pallet&lt;Runtime&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance2&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance1&gt;, bifrost_token_issuer::Pallet&lt;Runtime&gt;, bifrost_lightening_redeem::Pallet&lt;Runtime&gt;, bifrost_salp_lite::Pallet&lt;Runtime&gt;, bifrost_call_switchgear::Pallet&lt;Runtime&gt;, bifrost_vsbond_auction::Pallet&lt;Runtime&gt;, bifrost_asset_registry::Pallet&lt;Runtime&gt;, bifrost_vtoken_minting::Pallet&lt;Runtime&gt;, bifrost_slp::Pallet&lt;Runtime&gt;, xcm_interface::Pallet&lt;Runtime&gt;, bifrost_vstoken_conversion::Pallet&lt;Runtime&gt;, bifrost_farming::Pallet&lt;Runtime&gt;, bifrost_system_staking::Pallet&lt;Runtime&gt;, bifrost_system_maker::Pallet&lt;Runtime&gt;, bifrost_fee_share::Pallet&lt;Runtime&gt;, bifrost_cross_in_out::Pallet&lt;Runtime&gt;)`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `PalletsInfoAccess`:&#xD;&#xA;              ()&#xD;&#xA;              (TupleElement0, TupleElement1)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)&#xD;&#xA;            and 57 others&#xD;&#xA;note: required by a bound in `xcm_executor::Config::PalletInstancesInfo`&#xD;&#xA;   --&gt; /home/yml/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/097ffd2/xcm/xcm-executor/src/config.rs:80:28&#xD;&#xA;    |&#xD;&#xA;80  |     type PalletInstancesInfo: PalletsInfoAccess;&#xD;&#xA;    |                               ^^^^^^^^^^^^^^^^^ required by this bound in `xcm_executor::Config::PalletInstancesInfo`&#xD;&#xA;&#xD;&#xA;    Checking polkadot-client v0.9.38 (https://github.com/paritytech/polkadot?branch=release-v0.9.38#097ffd24)&#xD;&#xA;error[E0277]: the trait bound `(frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_indices::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, parachain_staking::Pallet&lt;Runtime&gt;, pallet_democracy::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_collective::Pallet&lt;Runtime, Instance2&gt;, pallet_elections_phragmen::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_conviction_voting::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime, Instance2&gt;, pallet_ranked_collective::Pallet&lt;Runtime, Instance1&gt;, governance::origins::custom_origins::Pallet&lt;Runtime&gt;, pallet_whitelist::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_proxy::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, bifrost_vesting::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_bounties::Pallet&lt;Runtime&gt;, pallet_tips::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, orml_tokens::Pallet&lt;Runtime&gt;, orml_currencies::Pallet&lt;Runtime&gt;, orml_unknown_tokens::Pallet&lt;Runtime&gt;, orml_xcm::Pallet&lt;Runtime&gt;, zenlink_protocol::Pallet&lt;Runtime&gt;, merkle_distributor::Pallet&lt;Runtime&gt;, zenlink_stable_amm::Pallet&lt;Runtime&gt;, zenlink_swap_router::Pallet&lt;Runtime&gt;, bifrost_flexible_fee::Pallet&lt;Runtime&gt;, bifrost_salp::Pallet&lt;Runtime&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance2&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance1&gt;, bifrost_token_issuer::Pallet&lt;Runtime&gt;, bifrost_lightening_redeem::Pallet&lt;Runtime&gt;, bifrost_salp_lite::Pallet&lt;Runtime&gt;, bifrost_call_switchgear::Pallet&lt;Runtime&gt;, bifrost_vsbond_auction::Pallet&lt;Runtime&gt;, bifrost_asset_registry::Pallet&lt;Runtime&gt;, bifrost_vtoken_minting::Pallet&lt;Runtime&gt;, bifrost_slp::Pallet&lt;Runtime&gt;, xcm_interface::Pallet&lt;Runtime&gt;, bifrost_vstoken_conversion::Pallet&lt;Runtime&gt;, bifrost_farming::Pallet&lt;Runtime&gt;, bifrost_system_staking::Pallet&lt;Runtime&gt;, bifrost_system_maker::Pallet&lt;Runtime&gt;, bifrost_fee_share::Pallet&lt;Runtime&gt;, bifrost_cross_in_out::Pallet&lt;Runtime&gt;): OnGenesis` is not satisfied&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33457" PostHistoryTypeId="1" PostId="8517" RevisionGUID="488b5bc8-ac9a-4890-a56c-d0a56f788f22" CreationDate="2023-05-16T12:11:06.827" UserId="2424" Text="How to integrate Fellowship" ContentLicense="CC BY-SA 4.0" />
  <row Id="33458" PostHistoryTypeId="3" PostId="8517" RevisionGUID="488b5bc8-ac9a-4890-a56c-d0a56f788f22" CreationDate="2023-05-16T12:11:06.827" UserId="2424" Text="|parachain|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33459" PostHistoryTypeId="5" PostId="8517" RevisionGUID="dbdc05c2-13cd-4355-a1ea-d7fbf78d2912" CreationDate="2023-05-16T12:23:02.170" UserId="2281" Comment="deleted 5 characters in body" Text="I'm trying to integrate Fellowship in this [PR](https://github.com/bifrost-finance/bifrost/pull/972/files#diff-d95a0d9c89d0dbeca1ef180360379f0258ced158f3c72626ae5723a5f37d7ea3R1801) according to &lt;https://github.com/paritytech/polkadot/pull/5205&gt;,&#xD;&#xA;but when I run `make check-all` it produces the following error:&#xD;&#xA;```rs&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `(frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_indices::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, parachain_staking::Pallet&lt;Runtime&gt;, pallet_democracy::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_collective::Pallet&lt;Runtime, Instance2&gt;, pallet_elections_phragmen::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_conviction_voting::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime, Instance2&gt;, pallet_ranked_collective::Pallet&lt;Runtime, Instance1&gt;, governance::origins::custom_origins::Pallet&lt;Runtime&gt;, pallet_whitelist::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_proxy::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, bifrost_vesting::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_bounties::Pallet&lt;Runtime&gt;, pallet_tips::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, orml_tokens::Pallet&lt;Runtime&gt;, orml_currencies::Pallet&lt;Runtime&gt;, orml_unknown_tokens::Pallet&lt;Runtime&gt;, orml_xcm::Pallet&lt;Runtime&gt;, zenlink_protocol::Pallet&lt;Runtime&gt;, merkle_distributor::Pallet&lt;Runtime&gt;, zenlink_stable_amm::Pallet&lt;Runtime&gt;, zenlink_swap_router::Pallet&lt;Runtime&gt;, bifrost_flexible_fee::Pallet&lt;Runtime&gt;, bifrost_salp::Pallet&lt;Runtime&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance2&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance1&gt;, bifrost_token_issuer::Pallet&lt;Runtime&gt;, bifrost_lightening_redeem::Pallet&lt;Runtime&gt;, bifrost_salp_lite::Pallet&lt;Runtime&gt;, bifrost_call_switchgear::Pallet&lt;Runtime&gt;, bifrost_vsbond_auction::Pallet&lt;Runtime&gt;, bifrost_asset_registry::Pallet&lt;Runtime&gt;, bifrost_vtoken_minting::Pallet&lt;Runtime&gt;, bifrost_slp::Pallet&lt;Runtime&gt;, xcm_interface::Pallet&lt;Runtime&gt;, bifrost_vstoken_conversion::Pallet&lt;Runtime&gt;, bifrost_farming::Pallet&lt;Runtime&gt;, bifrost_system_staking::Pallet&lt;Runtime&gt;, bifrost_system_maker::Pallet&lt;Runtime&gt;, bifrost_fee_share::Pallet&lt;Runtime&gt;, bifrost_cross_in_out::Pallet&lt;Runtime&gt;): PalletsInfoAccess` is not satisfied    --&gt; runtime/bifrost-kusama/src/xcm_config.rs:596:29&#xD;&#xA;    | 596 |     type PalletInstancesInfo = AllPalletsWithSystem;&#xD;&#xA;    |                                ^^^^^^^^^^^^^^^^^^^^ the trait `PalletsInfoAccess` is not implemented for `(frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_indices::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, parachain_staking::Pallet&lt;Runtime&gt;, pallet_democracy::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_collective::Pallet&lt;Runtime, Instance2&gt;, pallet_elections_phragmen::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_conviction_voting::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime, Instance2&gt;, pallet_ranked_collective::Pallet&lt;Runtime, Instance1&gt;, governance::origins::custom_origins::Pallet&lt;Runtime&gt;, pallet_whitelist::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_proxy::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, bifrost_vesting::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_bounties::Pallet&lt;Runtime&gt;, pallet_tips::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, orml_tokens::Pallet&lt;Runtime&gt;, orml_currencies::Pallet&lt;Runtime&gt;, orml_unknown_tokens::Pallet&lt;Runtime&gt;, orml_xcm::Pallet&lt;Runtime&gt;, zenlink_protocol::Pallet&lt;Runtime&gt;, merkle_distributor::Pallet&lt;Runtime&gt;, zenlink_stable_amm::Pallet&lt;Runtime&gt;, zenlink_swap_router::Pallet&lt;Runtime&gt;, bifrost_flexible_fee::Pallet&lt;Runtime&gt;, bifrost_salp::Pallet&lt;Runtime&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance2&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance1&gt;, bifrost_token_issuer::Pallet&lt;Runtime&gt;, bifrost_lightening_redeem::Pallet&lt;Runtime&gt;, bifrost_salp_lite::Pallet&lt;Runtime&gt;, bifrost_call_switchgear::Pallet&lt;Runtime&gt;, bifrost_vsbond_auction::Pallet&lt;Runtime&gt;, bifrost_asset_registry::Pallet&lt;Runtime&gt;, bifrost_vtoken_minting::Pallet&lt;Runtime&gt;, bifrost_slp::Pallet&lt;Runtime&gt;, xcm_interface::Pallet&lt;Runtime&gt;, bifrost_vstoken_conversion::Pallet&lt;Runtime&gt;, bifrost_farming::Pallet&lt;Runtime&gt;, bifrost_system_staking::Pallet&lt;Runtime&gt;, bifrost_system_maker::Pallet&lt;Runtime&gt;, bifrost_fee_share::Pallet&lt;Runtime&gt;, bifrost_cross_in_out::Pallet&lt;Runtime&gt;)`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `PalletsInfoAccess`:&#xD;&#xA;              ()&#xD;&#xA;              (TupleElement0, TupleElement1)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)&#xD;&#xA;            and 57 others note: required by a bound in `xcm_executor::Config::PalletInstancesInfo`    --&gt; /home/yml/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/097ffd2/xcm/xcm-executor/src/config.rs:80:28&#xD;&#xA;    | 80  |     type PalletInstancesInfo: PalletsInfoAccess;&#xD;&#xA;    |                               ^^^^^^^^^^^^^^^^^ required by this bound in `xcm_executor::Config::PalletInstancesInfo`&#xD;&#xA;&#xD;&#xA;    Checking polkadot-client v0.9.38 (https://github.com/paritytech/polkadot?branch=release-v0.9.38#097ffd24) error[E0277]: the trait bound `(frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_indices::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, parachain_staking::Pallet&lt;Runtime&gt;, pallet_democracy::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_collective::Pallet&lt;Runtime, Instance2&gt;, pallet_elections_phragmen::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_conviction_voting::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime, Instance2&gt;, pallet_ranked_collective::Pallet&lt;Runtime, Instance1&gt;, governance::origins::custom_origins::Pallet&lt;Runtime&gt;, pallet_whitelist::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_proxy::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, bifrost_vesting::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_bounties::Pallet&lt;Runtime&gt;, pallet_tips::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, orml_tokens::Pallet&lt;Runtime&gt;, orml_currencies::Pallet&lt;Runtime&gt;, orml_unknown_tokens::Pallet&lt;Runtime&gt;, orml_xcm::Pallet&lt;Runtime&gt;, zenlink_protocol::Pallet&lt;Runtime&gt;, merkle_distributor::Pallet&lt;Runtime&gt;, zenlink_stable_amm::Pallet&lt;Runtime&gt;, zenlink_swap_router::Pallet&lt;Runtime&gt;, bifrost_flexible_fee::Pallet&lt;Runtime&gt;, bifrost_salp::Pallet&lt;Runtime&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance2&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance1&gt;, bifrost_token_issuer::Pallet&lt;Runtime&gt;, bifrost_lightening_redeem::Pallet&lt;Runtime&gt;, bifrost_salp_lite::Pallet&lt;Runtime&gt;, bifrost_call_switchgear::Pallet&lt;Runtime&gt;, bifrost_vsbond_auction::Pallet&lt;Runtime&gt;, bifrost_asset_registry::Pallet&lt;Runtime&gt;, bifrost_vtoken_minting::Pallet&lt;Runtime&gt;, bifrost_slp::Pallet&lt;Runtime&gt;, xcm_interface::Pallet&lt;Runtime&gt;, bifrost_vstoken_conversion::Pallet&lt;Runtime&gt;, bifrost_farming::Pallet&lt;Runtime&gt;, bifrost_system_staking::Pallet&lt;Runtime&gt;, bifrost_system_maker::Pallet&lt;Runtime&gt;, bifrost_fee_share::Pallet&lt;Runtime&gt;, bifrost_cross_in_out::Pallet&lt;Runtime&gt;): OnGenesis` is not satisfied&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33460" PostHistoryTypeId="2" PostId="8518" RevisionGUID="305c3f13-c7e1-46c1-8915-b321608f880e" CreationDate="2023-05-16T15:05:22.057" UserId="172" Text="It's hard to determine what happened without inspecting the new runtime and knowing what steps you took from pre to post upgrade. &#xD;&#xA;&#xD;&#xA;The first thing to verify is to look at was upgraded in the runtime and make sure the upgrade didn't corrupt this StorageMap inside the pallet itself. Then, are you sure there were no dispatchables called post upgrade that could have updated the key to `A` ? Steps that could help understand what happened here would be:&#xD;&#xA;&#xD;&#xA;1. Reproduce the new runtime&#xD;&#xA;2. Inspect it using [sr-tool](https://docs.substrate.io/reference/command-line-tools/srtool/) and compare against the runtime that gave the unexpected storage. If they're not the same, you can look where they differ and fix your runtime code. &#xD;&#xA;3. If they are the same, then update your runtime with the new blob and make no other extrinsics to the pallet (again, this could have been an issue but its hard to know based on your problem description).&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33462" PostHistoryTypeId="2" PostId="8519" RevisionGUID="ccb3ecaa-393b-4af6-8f07-c5a50cf521d8" CreationDate="2023-05-16T15:26:11.690" UserId="3546" Text="I answered this on Github but we could use the recently-introduced `FullNetworkConfiguration` for storing the `NetworkServiceProvider` handle pair, add ability for protocols to allocate TX handles to the provider and then consume the RX handle in `NetworkWorker`. This would probably deprecate `NetworkService` so it's not a small task but this could possibly fix the issue you're having." ContentLicense="CC BY-SA 4.0" />
  <row Id="33464" PostHistoryTypeId="2" PostId="8520" RevisionGUID="2fe684cf-3793-43fc-b7af-c3e222efa514" CreationDate="2023-05-16T16:09:41.293" UserId="29" Text="Looks like according to your error message, the issue could be here: `runtime/bifrost-kusama/src/xcm_config.rs:596:29`&#xD;&#xA;&#xD;&#xA;Looks like you do not have `AllPalletsWithSystem` imported.&#xD;&#xA;&#xD;&#xA;Try:&#xD;&#xA;```rust&#xD;&#xA;use super::AllPalletsWithSystem&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33466" PostHistoryTypeId="2" PostId="8521" RevisionGUID="c6f1578e-cb86-4c12-aa1f-74873a830058" CreationDate="2023-05-16T16:49:19.790" UserId="172" Text="The bond amount should be at least some minimum value, or a percentage of the value requested to be spent. This will be reimbursed if spending proposal succeeds, and burnt otherwise. &#xD;&#xA;&#xD;&#xA;This is calculated in the `calculate_bond` function like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	/// The needed bond for a proposal whose spend is `value`.&#xD;&#xA;	fn calculate_bond(value: BalanceOf&lt;T, I&gt;) -&gt; BalanceOf&lt;T, I&gt; {&#xD;&#xA;		let mut r = T::ProposalBondMinimum::get().max(T::ProposalBond::get() * value);&#xD;&#xA;		if let Some(m) = T::ProposalBondMaximum::get() {&#xD;&#xA;			r = r.min(m);&#xD;&#xA;		}&#xD;&#xA;		r&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;See the above code snippet in context [here](https://github.com/paritytech/substrate/blob/1cb8fb032197e77301940a4f809b18d1269b95c2/frame/treasury/src/lib.rs#L525-L532).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The Treasury pallet is designed to ensure that at least the minimum bond is deposited in the case where `value`*`ProposalBond` is less than that. Optionally, you can also define a maximum bond value using the `ProposalBondMaximum` constant which sets an upper bound for the deposit of large spending proposals. AFAIK this upper bound [was introduced](https://github.com/paritytech/substrate/pull/10689) because the Polkadot community wanted to see more long term proposals with higher amounts. With no upper bound to the proposal bond, high spending proposers would need to bond proportionally high deposits for extended periods of time which isn't very practical.&#xD;&#xA;&#xD;&#xA;Look at the different values set in Kusama and Polkadot:&#xD;&#xA;&#xD;&#xA;In Kusama (v0.9.40):&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In Polkadot (v0.9.36):&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Of course the units of value in the real world don't hold the same economic worth, however readers can draw their own conclusions about the real world implications of these values (e.g. more or less capital needed as minimum bond; the ratio between the max and min values; the percentage of the value to calculate the default bond). &#xD;&#xA;&#xD;&#xA;When making decisions about what values to have here, it's useful to look at what other production chains have set for these constants, to base your decisions on production tested runtimes but also to think of your end-users such as what protective measures are in place, bearing in mind that the entire reason for these values is to discourage bad actors using economics while also keeping an eye to user experience.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/b5ChE.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/R8Fzf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33468" PostHistoryTypeId="4" PostId="1933" RevisionGUID="28532c6f-ac30-4b71-84fd-963405ef28ea" CreationDate="2023-05-16T16:54:27.780" UserId="172" Comment="Added relevant title and tag" Text="Retrieving all validator accounts with the Go Substrate RPC Client" ContentLicense="CC BY-SA 4.0" />
  <row Id="33469" PostHistoryTypeId="6" PostId="1933" RevisionGUID="28532c6f-ac30-4b71-84fd-963405ef28ea" CreationDate="2023-05-16T16:54:27.780" UserId="172" Comment="Added relevant title and tag" Text="|staking|validator|golang|go-substrate-rpc-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33470" PostHistoryTypeId="2" PostId="8522" RevisionGUID="dfce916e-d098-47b2-860b-5c76c3f90f18" CreationDate="2023-05-16T18:57:45.917" UserId="172" Text=" 1. The FRAME System `AccountData` type could track any data structure that implements `Member + FullCodec + Clone + Default + TypeInfo + MaxEncodedLen` (which we know by looking at what `AccountData` is bound by [here](https://github.com/paritytech/substrate/blob/8423d2f59e53bf178d3462b28ddd7152d83de17e/frame/system/src/lib.rs#L325-L327)).&#xD;&#xA;&#xD;&#xA;    The [`AccountData`&#xD;&#xA;    type](https://paritytech.github.io/substrate/master/pallet_balances/struct.AccountData.html)&#xD;&#xA;    from the Balances pallet satisfies this requirement. And in this&#xD;&#xA;    context, this type is just a struct that holds account information.&#xD;&#xA;&#xD;&#xA; 2. The Balances pallet could be configured to use storage native to its own instance, so long as it satisfies the [`AccountStore`](https://paritytech.github.io/substrate/master/pallet_balances/pallet/trait.Config.html#associatedtype.AccountStore) type it's configuration expects. This type is the Balance pallet's concept for &quot;_a location to store information about accounts using me_&quot;. Because under the hood this type expects a [`StoredMap`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.StoredMap.html), any type that implements `StoredMap` can be used here.&#xD;&#xA;&#xD;&#xA;    The reason the Balances pallet is typically set to use the `System`&#xD;&#xA;    pallet (which has an [implementation for `StoredMap`](https://paritytech.github.io/substrate/master/frame_system/pallet/struct.Pallet.html#impl-StoredMap%3C%3CT+as+Config%3E::AccountId,+%3CT+as+Config%3E::AccountData%3E-for-Pallet%3CT%3E)) is because `AccountData` from the Balances pallet is most commonly used&#xD;&#xA;    alongside other data the System pallet keeps track of (such as `nonce`,&#xD;&#xA;    `consumers`, `providers` and `sufficients`.&#xD;&#xA;&#xD;&#xA;    This may sound more intuitive if you look into the `system.account` storage item of any Substrate chain built with FRAME:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;     {&#xD;&#xA;      nonce: 0&#xD;&#xA;      consumers: 0&#xD;&#xA;      providers: 0&#xD;&#xA;      sufficients: 0&#xD;&#xA;      data: {     // &lt; - this is taken from `AccountData`&#xD;&#xA;        free: 0&#xD;&#xA;        reserved: 0&#xD;&#xA;        miscFrozen: 0&#xD;&#xA;        feeFrozen: 0&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA;   &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33472" PostHistoryTypeId="5" PostId="102" RevisionGUID="81cdbd48-b5ea-46aa-b7ac-38325902c1d2" CreationDate="2023-05-16T18:59:42.917" UserId="172" Comment="Clarified title and layout of questions." Text="The [FRAME system for runtime development][1] defines an [`AccountData` type][2], which is coupled with [data from the Balances Pallet][3] in [the Polkadot runtime][4]. &#xD;&#xA;&#xD;&#xA;1. What other types of data could be tracked using this type? &#xD;&#xA;2. Why doesn't the Balances Pallet track its metadata &quot;natively&quot; as opposed to coupling with the FRAME System `AccountData` type?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/runtime/frame/&#xD;&#xA;  [2]: https://crates.parity.io/frame_system/pallet/trait.Config.html#associatedtype.AccountData&#xD;&#xA;  [3]: https://crates.parity.io/pallet_balances/struct.AccountData.html&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/v0.9.16/runtime/polkadot/src/lib.rs#L221" ContentLicense="CC BY-SA 4.0" />
  <row Id="33473" PostHistoryTypeId="4" PostId="102" RevisionGUID="81cdbd48-b5ea-46aa-b7ac-38325902c1d2" CreationDate="2023-05-16T18:59:42.917" UserId="172" Comment="Clarified title and layout of questions." Text="How does the AccountData type work in FRAME runtimes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33474" PostHistoryTypeId="50" PostId="2597" RevisionGUID="b5e2e9eb-2aaf-44cc-bc32-e2fbd8547296" CreationDate="2023-05-16T20:17:27.140" UserId="-1" />
  <row Id="33475" PostHistoryTypeId="2" PostId="8523" RevisionGUID="36e76b5d-65d2-4dfc-bf20-1af30387e484" CreationDate="2023-05-17T00:20:23.057" UserId="4222" Text="As a major project for my college, we are trying to modify the substrate node template for the voting system use case. Can anyone guide us on what would be the most important modules, palettes, and areas in the documentation we should refer to in order to successfully modify the substrate node template for the voting system use case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33477" PostHistoryTypeId="1" PostId="8523" RevisionGUID="36e76b5d-65d2-4dfc-bf20-1af30387e484" CreationDate="2023-05-17T00:20:23.057" UserId="4222" Text="Modifying substrate-node-template for voting system use case" ContentLicense="CC BY-SA 4.0" />
  <row Id="33478" PostHistoryTypeId="3" PostId="8523" RevisionGUID="36e76b5d-65d2-4dfc-bf20-1af30387e484" CreationDate="2023-05-17T00:20:23.057" UserId="4222" Text="|substrate-node-template|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33479" PostHistoryTypeId="2" PostId="8524" RevisionGUID="08d6479c-cb76-4066-ab4b-565ad9afbbc1" CreationDate="2023-05-17T03:08:01.390" UserId="4230" Text="if you don't want to remove '0x',you could use `Macro ckb_types::h256` in https://docs.rs/ckb-types/0.110.0/ckb_types/macro.h256.html :&#xD;&#xA;```rust&#xD;&#xA;use ckb_types::h256;&#xD;&#xA;h256!(&quot;0xf8dd02cc2a3174933fac4e87d7f6360c3cc67167db105b28d0bc434a60674e49&quot;)&#xD;&#xA;```&#xD;&#xA;with cargo.toml:&#xD;&#xA;ckb-types = &quot;0.108&quot; &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33481" PostHistoryTypeId="2" PostId="8525" RevisionGUID="62ae6cf7-713f-4c65-ac27-3a53c30415ef" CreationDate="2023-05-17T03:36:15.550" UserId="4228" Text="I'm currently struggling on obtaining logs of the events emitted from my smart contract on the frontend dapp. The smart contract code itself should work just fine as it emits the event perfectly fine on Substrate UI. It's just the frontend dapp that I'm struggling to do so. This is what I did on my smart contract:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;//snippets of code&#xD;&#xA;#[ink(event)]&#xD;&#xA;       pub struct GameResult {&#xD;&#xA;           #[ink(topic)]&#xD;&#xA;           win: bool&#xD;&#xA;       }&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;//skip&#xD;&#xA;//&#xD;&#xA;&#xD;&#xA;       #[ink(message)]&#xD;&#xA;       pub fn playgame(&amp;mut self, amount: Balance) -&gt; Result&lt;(), BetError&gt; {&#xD;&#xA;&#xD;&#xA;//skip&#xD;&#xA;//&#xD;&#xA;&#xD;&#xA;                self.env().emit_event(GameResult{&#xD;&#xA;                       win,&#xD;&#xA;                     });&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;I don't really know the syntax to log events on the frontend side but this is my current code for the frontend:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;//snippets&#xD;&#xA;.signAndSend(&#xD;&#xA;                props.activeAccount.address,&#xD;&#xA;                  { signer: props.signer },&#xD;&#xA;                  ({events=[], status}) =&gt; {&#xD;&#xA;                      if (status.isFinalized) {&#xD;&#xA;&#xD;&#xA;                        props.api.query.system.events((events) =&gt; {&#xD;&#xA;                          events.forEach(({ event }) =&gt; {&#xD;&#xA;&#xD;&#xA;                            if (&#xD;&#xA;                              event.section === &quot;GameContract&quot; &amp;&amp;&#xD;&#xA;                              event.method === &quot;GameResult&quot;&#xD;&#xA;                            ) {&#xD;&#xA;                              console.log(&quot;GameResult&quot;, event.toJSON());&#xD;&#xA;                            }&#xD;&#xA;                          });&#xD;&#xA;                        });&#xD;&#xA;                      }&#xD;&#xA;```&#xD;&#xA;With the above code, when I do signAndSend, got event arrays and the GameResult events did not get logged. What am I doing wrong? I think my syntax is wrong. Let me know thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="33483" PostHistoryTypeId="1" PostId="8525" RevisionGUID="62ae6cf7-713f-4c65-ac27-3a53c30415ef" CreationDate="2023-05-17T03:36:15.550" UserId="4228" Text="How to log events on frontend dapp from emit_event of smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33484" PostHistoryTypeId="3" PostId="8525" RevisionGUID="62ae6cf7-713f-4c65-ac27-3a53c30415ef" CreationDate="2023-05-17T03:36:15.550" UserId="4228" Text="|polkadot-js|polkadot|substrate-front-end|frontend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33485" PostHistoryTypeId="5" PostId="8525" RevisionGUID="6bda44c9-8a83-4df9-bc97-21f12657c913" CreationDate="2023-05-17T04:13:40.477" UserId="354" Comment="deleted 254 characters in body; edited tags" Text="I'm currently struggling on obtaining logs of the events emitted from my smart contract on the frontend dapp. The smart contract code itself should work just fine as it emits the event perfectly fine on Substrate UI. It's just the frontend dapp that I'm struggling to do so. This is what I did on my smart contract:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;//snippets of code&#xD;&#xA;#[ink(event)]&#xD;&#xA;pub struct GameResult {&#xD;&#xA;  #[ink(topic)]&#xD;&#xA;  win: bool&#xD;&#xA;}    &#xD;&#xA;//skip&#xD;&#xA;//&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn playgame(&amp;mut self, amount: Balance) -&gt; Result&lt;(), BetError&gt; {&#xD;&#xA;//skip&#xD;&#xA;//&#xD;&#xA;   self.env().emit_event(GameResult{&#xD;&#xA;   win,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;I don't really know the syntax to log events on the frontend side but this is my current code for the frontend:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;//snippets&#xD;&#xA;.signAndSend(&#xD;&#xA;    props.activeAccount.address,&#xD;&#xA;     { signer: props.signer },&#xD;&#xA;     ({events=[], status}) =&gt; {&#xD;&#xA;        if (status.isFinalized) {&#xD;&#xA;            props.api.query.system.events((events) =&gt; {&#xD;&#xA;                events.forEach(({ event }) =&gt; {&#xD;&#xA;                  if (&#xD;&#xA;                      event.section === &quot;GameContract&quot; &amp;&amp;&#xD;&#xA;                      event.method === &quot;GameResult&quot;&#xD;&#xA;                      ) {&#xD;&#xA;                      console.log(&quot;GameResult&quot;, event.toJSON());&#xD;&#xA;                        }&#xD;&#xA;                    });&#xD;&#xA;                 });&#xD;&#xA;             }&#xD;&#xA;```&#xD;&#xA;With the above code, when I do signAndSend, got event arrays and the GameResult events did not get logged. What am I doing wrong? I think my syntax is wrong. Let me know thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="33486" PostHistoryTypeId="6" PostId="8525" RevisionGUID="6bda44c9-8a83-4df9-bc97-21f12657c913" CreationDate="2023-05-17T04:13:40.477" UserId="354" Comment="deleted 254 characters in body; edited tags" Text="|polkadot-js|ink|events|frontend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33487" PostHistoryTypeId="5" PostId="8523" RevisionGUID="b55a44dc-f9e4-420a-8680-0148e7fa2608" CreationDate="2023-05-17T05:20:12.590" UserId="4222" Comment="added 22 characters in body" Text="As a major project for my college, we are trying to modify the substrate node template for the voting system use case. Can anyone guide us on what would be the most important modules, palettes, and areas in the documentation we should refer to in order to successfully modify the substrate node template for the election (government) voting system use case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33489" PostHistoryTypeId="2" PostId="8526" RevisionGUID="76d7ef3e-0d26-4c79-8588-b319f58f0761" CreationDate="2023-05-17T05:44:38.593" UserId="354" Text="You don't need to modify any pallet, you need to make a new pallet and write you election logic in it, refer the link on how build a custom pallet. [https://docs.substrate.io/build/custom-pallets/][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/custom-pallets/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33491" PostHistoryTypeId="2" PostId="8527" RevisionGUID="39e0a3f8-e0bd-478c-b641-a4d656fa001c" CreationDate="2023-05-17T06:27:28.197" UserId="4222" Text="I installed subkey by following instructions https://docs.substrate.io/reference/command-line-tools/subkey/   and ./target/release/subkey --help command is working but any other subkey commands are not working and giving command not found error how to fix it?&#xD;&#xA;&#xD;&#xA;[![subkey:command not found error][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/O5pzx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33493" PostHistoryTypeId="1" PostId="8527" RevisionGUID="39e0a3f8-e0bd-478c-b641-a4d656fa001c" CreationDate="2023-05-17T06:27:28.197" UserId="4222" Text="subkey: command not found error" ContentLicense="CC BY-SA 4.0" />
  <row Id="33494" PostHistoryTypeId="3" PostId="8527" RevisionGUID="39e0a3f8-e0bd-478c-b641-a4d656fa001c" CreationDate="2023-05-17T06:27:28.197" UserId="4222" Text="|substrate-node-template|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33495" PostHistoryTypeId="2" PostId="8528" RevisionGUID="12574194-0c7d-415d-a98f-7fd2c8d8cbcd" CreationDate="2023-05-17T06:40:43.033" UserId="2281" Text="`./target/release/subkey --version` try this" ContentLicense="CC BY-SA 4.0" />
  <row Id="33497" PostHistoryTypeId="5" PostId="8527" RevisionGUID="d3f0e7a3-994d-4482-ba57-d3c2540b0b8c" CreationDate="2023-05-17T06:43:44.167" UserId="2281" Comment="added 93 characters in body; edited tags" Text="I installed subkey by following instructions &#xD;&#xA;&#xD;&#xA;[`https://docs.substrate.io/reference/command-line-tools/subkey/`][1]&#xD;&#xA;&#xD;&#xA;   and `./target/release/subkey --help` command is working fine but any other subkey commands are not working and giving command not found error how to fix it?&#xD;&#xA;&#xD;&#xA;[![subkey:command not found error][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/command-line-tools/subkey/&#xD;&#xA;  [2]: https://i.stack.imgur.com/O5pzx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33498" PostHistoryTypeId="6" PostId="8527" RevisionGUID="d3f0e7a3-994d-4482-ba57-d3c2540b0b8c" CreationDate="2023-05-17T06:43:44.167" UserId="2281" Comment="added 93 characters in body; edited tags" Text="|substrate-node-template|subkey|command|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33499" PostHistoryTypeId="2" PostId="8529" RevisionGUID="3447e13a-af74-4c3e-aa46-5335b36d1fce" CreationDate="2023-05-17T06:49:59.817" UserId="2736" Text="You have just built the binary locally and it is available only by the direct call to it (`./target/release/subkey`). If you want to use it as a command/alias (just `subkey`) you have to either create an shell alias or add the path to this binary to the $PATH env" ContentLicense="CC BY-SA 4.0" />
  <row Id="33501" PostHistoryTypeId="2" PostId="8530" RevisionGUID="bedb0537-3412-4da0-a43b-5517ad1e98ef" CreationDate="2023-05-17T06:57:13.910" UserId="2736" Text="you have to 'register' all host functions in your node as well (see `sc_executor`); for example:&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;impl sc_executor::NativeExecutionDispatch for ExecutorDispatch {&#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;&#xD;&#xA;    #[cfg(not(feature = &quot;runtime-benchmarks&quot;))]&#xD;&#xA;    type ExtendHostFunctions = ();&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33504" PostHistoryTypeId="8" PostId="8498" RevisionGUID="4fd147c7-2201-487a-9db8-69b7ef1b4285" CreationDate="2023-05-17T08:00:46.687" UserId="1842" Comment="Rollback to [4739cabd-7664-4002-9bf5-c736ac9a0fd3]" Text="When reasoning about a particular problem, I realized that I don't know how session changes work with chain reversions. To my knowledge session changes are based on time/slots and not on blocks. So let's assume the following chain:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;                              Session N                          N + 1&#xD;&#xA;------------------------------^--|--------------------------------!|------------------------------------&#xD;&#xA;                &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A reversion is triggered at `!` back to `^`, so the new chain looks like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;       Still session N - 1                        &#xD;&#xA;------------------------------^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We are back to session `N - 1`, but given that we can not revert time, we will change session on the very next block being produced, but how? Time wise we will already be in session `N + 1`. So what happens? Do we lose a session? Will we jump somehow to session `N + 1` immediately? Will we have two session changes in direct sequence. (`^-` block will be session `N` and `^--` will be already session `N + 1`?)&#xD;&#xA;&#xD;&#xA;Put differently: Are we catching up or skip or something else entirely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33505" PostHistoryTypeId="2" PostId="8531" RevisionGUID="f39094b6-da44-4a10-a101-b20393a8dd8b" CreationDate="2023-05-17T08:35:10.053" UserId="2736" Text="Based on:&#xD;&#xA; - https://substrate.stackexchange.com/questions/4903/use-std-only-rust-library-to-extend-substrate-runtime-interface/&#xD;&#xA; - https://substrate.stackexchange.com/questions/1421/how-to-understand-runtime-interface-and-externalities/&#xD;&#xA;&#xD;&#xA;I understand that I should be able to:&#xD;&#xA;1. have a crate that is **not** wasm/no-std friendly, e.g. relies on `std` library&#xD;&#xA;2. put its functionalities under a trait with `#[sp_runtime_interface::runtime_interface]` attribute&#xD;&#xA;3. register corresponding host function in the node's executor&#xD;&#xA;4. call the functionality from a pallet&#xD;&#xA;&#xD;&#xA;However, when I'm trying to do so, I'm getting the classical error:&#xD;&#xA;```&#xD;&#xA;  error[E0152]: duplicate lang item in crate `std` (which `serde` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /home/ec2-user/remote-builds/8351322047856898080/target/release/wbuild/aleph-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-adc573607c02c939.rmeta&#xD;&#xA;    = note: second definition in `std` loaded from /home/ec2-user/.rustup/toolchains/nightly-2022-10-30-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-013c81c18ec4954a.rlib&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm pretty sure that I have set up all `default-features` and `/std` features correctly. The problem is gone when I remove the std-based dependencies from my crate, but that's the thing - I want to use them in my runtime.&#xD;&#xA;&#xD;&#xA;Maybe the problem is in the way I should call the host function from the pallet. I have put my crate as a dependency and I'm calling it with `&lt;crate_name&gt;::&lt;snake_case_trait_name&gt;::&lt;trait_method_name&gt;`. Is this the correct way or should I use some magic with externalities etc. I couldn't find any example in the Substrate repo, apart from `statement_store`, which is actually is no-std/wasm compatible, so it doesn't help." ContentLicense="CC BY-SA 4.0" />
  <row Id="33507" PostHistoryTypeId="1" PostId="8531" RevisionGUID="f39094b6-da44-4a10-a101-b20393a8dd8b" CreationDate="2023-05-17T08:35:10.053" UserId="2736" Text="Calling std-based host function from a pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="33508" PostHistoryTypeId="3" PostId="8531" RevisionGUID="f39094b6-da44-4a10-a101-b20393a8dd8b" CreationDate="2023-05-17T08:35:10.053" UserId="2736" Text="|pallet|runtime|no-std|host-functions|runtime-interface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33509" PostHistoryTypeId="2" PostId="8532" RevisionGUID="7580dc85-a13d-48da-875a-32b95b1d1636" CreationDate="2023-05-17T08:35:45.870" UserId="3235" Text="From the ink! cross-contract docs, contract references give developers a **type-safe** way of interacting with a contract. However, this is not only available when the contract is already instantiated. &#xD;&#xA;&#xD;&#xA;My question is, given the `AccountId` or code hash of the contract, is there a way to convert that to a `ContractRef` so I'm sure that `AccountId` really points to a contract with the expected type?&#xD;&#xA;&#xD;&#xA;Currently, ink! has the `CallBuilder` but this doesn't ensure the contract is of the expected type.&#xD;&#xA;For instance, supposed I've 3 contracts. The first contract has the main struct named `First`, the second `Second`, and the third `Third`. Assume both `First` and `Second` has a method called `flip`. Within the `Third` contract, if I want to call the `flip` method from the *already instantiated* `First` contract, implementing it would be:&#xD;&#xA;``` rust&#xD;&#xA;let my_return_value = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;    .call(contracts_address)&#xD;&#xA;    .gas_limit(0)&#xD;&#xA;    .transferred_value(10)&#xD;&#xA;    .exec_input(&#xD;&#xA;        ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;flip&quot;)))&#xD;&#xA;            .push_arg(42u8)&#xD;&#xA;    )&#xD;&#xA;    .returns::&lt;bool&gt;()&#xD;&#xA;    .invoke();&#xD;&#xA;```&#xD;&#xA;However this doesn't ensure only the `First` contract's flip method is called. Using the `Second` contract's address would also work." ContentLicense="CC BY-SA 4.0" />
  <row Id="33511" PostHistoryTypeId="1" PostId="8532" RevisionGUID="7580dc85-a13d-48da-875a-32b95b1d1636" CreationDate="2023-05-17T08:35:45.870" UserId="3235" Text="How to get the ContractRef from AccountId or codehash with Ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="33512" PostHistoryTypeId="3" PostId="8532" RevisionGUID="7580dc85-a13d-48da-875a-32b95b1d1636" CreationDate="2023-05-17T08:35:45.870" UserId="3235" Text="|polkadot|ink|smart-contract|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33513" PostHistoryTypeId="2" PostId="8533" RevisionGUID="9122521b-f990-4a89-b93f-eeb663d2c292" CreationDate="2023-05-17T09:16:55.473" UserId="3385" Text="From the snippet you gave, it looks like you want to _call_ a contract, not create it. You can't convert `CodeHash` into a `ContractRef` b/c they're different things. `CodeHash` represents the code of the contract lives, not an address of a specific _instance_ of the contract. &#xD;&#xA;&#xD;&#xA;To turn an `AccountId` into a specific contract ref, you can follow the example given here https://github.com/Cardinal-Cryptography/bulletin-board-example/blob/main/contracts/bulletin_board/lib.rs#L497-L504" ContentLicense="CC BY-SA 4.0" />
  <row Id="33515" PostHistoryTypeId="2" PostId="8534" RevisionGUID="e1a5a458-fb1a-4c26-8e0a-a4db2ccb3098" CreationDate="2023-05-17T09:43:01.497" UserId="354" Text="Substrate provide [sp-std][1] and [sp-io][2] for `std` calls in a `no_std` environment. By the error I can understand you are using `std` instead of `sp-std` or `sp-io` so it is giving you the error `duplicate lang item in crate`. I hope this helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/primitives/std&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/primitives/io" ContentLicense="CC BY-SA 4.0" />
  <row Id="33517" PostHistoryTypeId="2" PostId="8535" RevisionGUID="85f42a87-53ab-4ffa-91c8-4552de993e36" CreationDate="2023-05-17T11:24:28.337" UserId="2372" Text="I've added a new amiquip dependency in cargo.toml &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;sender&quot;&#xD;&#xA;    version = &quot;0.1.0&quot;&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    &#xD;&#xA;    [package.metadata.docs.rs]&#xD;&#xA;    targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;    	&quot;derive&quot;,&#xD;&#xA;    ] }&#xD;&#xA;    amiquip = { version = &quot;0.4&quot;, default-features = false, optional = true }&#xD;&#xA;    scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [dev-dependencies]&#xD;&#xA;    sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-io = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-runtime = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&quot;codec/std&quot;, &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;    &quot;amiquip&quot;,&#xD;&#xA;     &quot;frame-support/std&quot;, &#xD;&#xA;     &quot;frame-system/std&quot;,&#xD;&#xA;      &quot;scale-info/std&quot;]&#xD;&#xA;    runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;    try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;&#xD;&#xA;But it still showing me this error use of &quot;undeclared crate or module `amiquip`&quot;. I've also tried extern crate amiquip. But it didn't work. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA; [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Xv9hd.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33519" PostHistoryTypeId="1" PostId="8535" RevisionGUID="85f42a87-53ab-4ffa-91c8-4552de993e36" CreationDate="2023-05-17T11:24:28.337" UserId="2372" Text="unresolved import `amiquip`" ContentLicense="CC BY-SA 4.0" />
  <row Id="33520" PostHistoryTypeId="3" PostId="8535" RevisionGUID="85f42a87-53ab-4ffa-91c8-4552de993e36" CreationDate="2023-05-17T11:24:28.337" UserId="2372" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33521" PostHistoryTypeId="5" PostId="644" RevisionGUID="06806cc2-fa3e-461e-9f72-157dd30da19a" CreationDate="2023-05-17T12:13:31.973" UserId="3991" Comment="Original reference references outdated code" Text="There is a nice test that could be helpful for you to discover how to use `sudo`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let call = Call::Balances(BalancesCall::transfer {&#xD;&#xA;	dest: bob,&#xD;&#xA;	value: 10_000,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;let found_event = cxt&#xD;&#xA;	.api&#xD;&#xA;	.tx()&#xD;&#xA;	.sudo()&#xD;&#xA;	.sudo(call)&#xD;&#xA;	.sign_and_submit_then_watch(&amp;alice)&#xD;&#xA;	.await?&#xD;&#xA;	.wait_for_finalized_success()&#xD;&#xA;	.await?&#xD;&#xA;	.has::&lt;sudo::events::Sudid&gt;()?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Reference: https://github.com/paritytech/subxt/blob/b1b717332eb44af3f992ad4486b0d43a8d1f6d79/subxt/tests/integration/frame/sudo.rs#L42&#xD;&#xA;&#xD;&#xA;**Update May 2023:**&#xD;&#xA;&#xD;&#xA;Original reference is outdated, new reference here:&#xD;&#xA;https://github.com/paritytech/subxt/blob/81494027c8f5ae62d44883167585d5e557f0fcba/testing/integration-tests/src/frame/sudo.rs#L26" ContentLicense="CC BY-SA 4.0" />
  <row Id="33522" PostHistoryTypeId="24" PostId="644" RevisionGUID="06806cc2-fa3e-461e-9f72-157dd30da19a" CreationDate="2023-05-17T12:13:31.973" Comment="Proposed by 3991 approved by 2281, 29 edit id of 417" ContentLicense="CC BY-SA 4.0" />
  <row Id="33523" PostHistoryTypeId="2" PostId="8536" RevisionGUID="2173dec7-6228-4fc0-8b71-4c91bb562982" CreationDate="2023-05-17T12:59:06.850" UserId="1990" Text="I'd like to set an upper limit on the size of a storage map. Is there a data structure that supports this check within its methods? Or has anyone defined their own wrapper data structure that performs these checks on each insertion?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33525" PostHistoryTypeId="1" PostId="8536" RevisionGUID="2173dec7-6228-4fc0-8b71-4c91bb562982" CreationDate="2023-05-17T12:59:06.850" UserId="1990" Text="`BoundedBTreeMap` equivalent for `StorageMap`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33526" PostHistoryTypeId="3" PostId="8536" RevisionGUID="2173dec7-6228-4fc0-8b71-4c91bb562982" CreationDate="2023-05-17T12:59:06.850" UserId="1990" Text="|storage|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33527" PostHistoryTypeId="2" PostId="8537" RevisionGUID="3aac5640-fea2-4fdb-ad91-0c2fb71e2235" CreationDate="2023-05-17T13:00:40.633" UserId="2348" Text="I am not sure this particular error is because of this pallet but randomness-collective-flip pallet is important part of blockchain as it provides randomness  in blockchain as our  blockchain lies on concept of randomness." ContentLicense="CC BY-SA 4.0" />
  <row Id="33529" PostHistoryTypeId="2" PostId="8538" RevisionGUID="a76c4865-230b-4ac2-b05f-c2bdbf6c8a44" CreationDate="2023-05-17T13:30:21.153" UserId="1779" Text="There is a counted storage map: https://github.com/paritytech/substrate/blob/6507a79b2baf7e4cc6f5868aa490dfe275144f9a/frame/support/src/storage/types/counted_map.rs#L38-L50" ContentLicense="CC BY-SA 4.0" />
  <row Id="33531" PostHistoryTypeId="2" PostId="8539" RevisionGUID="6b40dcfe-7a5b-4692-b805-6c278b51a39e" CreationDate="2023-05-17T13:34:40.847" UserId="2762" Text="Yes, it has to work too. As suggested in the previous answer check that you are doing the initialisation.&#xD;&#xA;&#xD;&#xA;Do the Substrate tutorial: [Add offchain workers][1] to see how to implement the pallet in the runtime&#xD;&#xA;&#xD;&#xA;Or see this previous StackExchange answer with an example: [Working up-to-date complete source code for offchain workers?][2]&#xD;&#xA;&#xD;&#xA;Another guide that is a bit old, but worth to check is this: [Transactions in Off-chain Workers][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-application-logic/add-offchain-workers/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/5617/2762&#xD;&#xA;  [3]: https://github.com/JoshOrndorff/recipes/blob/master/text/off-chain-workers/transactions.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="33533" PostHistoryTypeId="5" PostId="8373" RevisionGUID="09dfa047-9d3d-408e-8004-ffda10fe4742" CreationDate="2023-05-17T13:51:35.820" UserId="1942" Comment="deleted 30 characters in body" Text="[![enter image description here][1]]&#xD;&#xA;https://github.com/AstarNetwork/Astar.git&#xD;&#xA;&#xD;&#xA;./target/release/astar-collator --dev -d ./data -l info&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;astar frontier evm use HashedAddressMapping in evm pallet&#xD;&#xA;&#xD;&#xA;alice public key is d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;&#xD;&#xA;H160 is 0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b = BlakeTwo256( b&quot;evm:&quot;[0..4] + 15fdd31c61141abd04a99fd6822c8558854ccde3 )&#xD;&#xA;&#xD;&#xA;evm miner address is 5CMh6W6x5ZJaj2QGndYHa4Pc4ppvSFc9J66mBrxwteUkRe8p = ss58(0cf49bc5aca76015898fbdfc914af870bf057aeff1d347225b6c01595ad0699b)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct FindAuthorTruncated&lt;F&gt;(PhantomData&lt;F&gt;);&#xD;&#xA;impl&lt;F: FindAuthor&lt;u32&gt;&gt; FindAuthor&lt;H160&gt; for FindAuthorTruncated&lt;F&gt; {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;H160&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		if let Some(author_index) = F::find_author(digests) {&#xD;&#xA;			let authority_id = Aura::authorities()[author_index as usize].clone();&#xD;&#xA;			return Some(H160::from_slice(&amp;authority_id.to_raw_vec()[4..24]));&#xD;&#xA;		}&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;H: Hasher&lt;Out = H256&gt;&gt; AddressMapping&lt;AccountId32&gt; for HashedAddressMapping&lt;H&gt; {&#xD;&#xA;	fn into_account_id(address: H160) -&gt; AccountId32 {&#xD;&#xA;		let mut data = [0u8; 24];&#xD;&#xA;		data[0..4].copy_from_slice(b&quot;evm:&quot;);&#xD;&#xA;		data[4..24].copy_from_slice(&amp;address[..]);&#xD;&#xA;		let hash = H::hash(&amp;data);&#xD;&#xA;&#xD;&#xA;		AccountId32::from(Into::&lt;[u8; 32]&gt;::into(hash))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn pay_priority_fee(tip: Self::LiquidityInfo) {&#xD;&#xA;		// Default Ethereum behaviour: issue the tip to the block author.&#xD;&#xA;		if let Some(tip) = tip {&#xD;&#xA;			let account_id = T::AddressMapping::into_account_id(&lt;Pallet&lt;T&gt;&gt;::find_author());&#xD;&#xA;			let _ = C::deposit_into_existing(&amp;account_id, tip_after_commission.peek());&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/UMrIZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33534" PostHistoryTypeId="5" PostId="8522" RevisionGUID="c5fc0321-635f-4cf6-b45e-f436e556b550" CreationDate="2023-05-17T14:30:19.540" UserId="172" Comment="added 1 character in body" Text=" 1. The FRAME System `AccountData` type could track any data structure that implements `Member + FullCodec + Clone + Default + TypeInfo + MaxEncodedLen` (which we know by looking at what `AccountData` is bound by [here](https://github.com/paritytech/substrate/blob/8423d2f59e53bf178d3462b28ddd7152d83de17e/frame/system/src/lib.rs#L325-L327)).&#xD;&#xA;&#xD;&#xA;    The [`AccountData`&#xD;&#xA;    type](https://paritytech.github.io/substrate/master/pallet_balances/struct.AccountData.html)&#xD;&#xA;    from the Balances pallet satisfies this requirement. And in this&#xD;&#xA;    context, this type is just a struct that holds account information.&#xD;&#xA;&#xD;&#xA; 2. The Balances pallet could be configured to use storage native to its own instance, so long as it satisfies the [`AccountStore`](https://paritytech.github.io/substrate/master/pallet_balances/pallet/trait.Config.html#associatedtype.AccountStore) type it's configuration expects. This type is the Balance pallet's concept for &quot;_a location to store information about accounts using me_&quot;. Because under the hood this type expects a [`StoredMap`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.StoredMap.html), any type that implements `StoredMap` can be used here.&#xD;&#xA;&#xD;&#xA;    The reason the Balances pallet is typically set to use the `System`&#xD;&#xA;    pallet (which has an [implementation for `StoredMap`](https://paritytech.github.io/substrate/master/frame_system/pallet/struct.Pallet.html#impl-StoredMap%3C%3CT+as+Config%3E::AccountId,+%3CT+as+Config%3E::AccountData%3E-for-Pallet%3CT%3E)) is because `AccountData` from the Balances pallet is most commonly used&#xD;&#xA;    alongside other data the System pallet keeps track of (such as `nonce`,&#xD;&#xA;    `consumers`, `providers` and `sufficients`).&#xD;&#xA;&#xD;&#xA;    This may sound more intuitive if you look into the `system.account` storage item of any Substrate chain built with FRAME:&#xD;&#xA;&#xD;&#xA;    ```&#xD;&#xA;     {&#xD;&#xA;      nonce: 0&#xD;&#xA;      consumers: 0&#xD;&#xA;      providers: 0&#xD;&#xA;      sufficients: 0&#xD;&#xA;      data: {     // &lt; - this is taken from `AccountData`&#xD;&#xA;        free: 0&#xD;&#xA;        reserved: 0&#xD;&#xA;        miscFrozen: 0&#xD;&#xA;        feeFrozen: 0&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    ```&#xD;&#xA;   &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33535" PostHistoryTypeId="50" PostId="8114" RevisionGUID="2d651b28-10b1-47bf-81b9-91e216acc248" CreationDate="2023-05-17T15:08:20.943" UserId="-1" />
  <row Id="33536" PostHistoryTypeId="2" PostId="8540" RevisionGUID="5f2cd6f1-492a-4d20-8165-bbcdaa33553e" CreationDate="2023-05-17T15:28:25.437" UserId="3070" Text="We are on arch linux and have been compiling the substrate node template just fine. Then with a recent rolling update of the OS we cannot compile the substrate template node.&#xD;&#xA;Some warnings about wasm-opt-sys&#xD;&#xA;```&#xD;&#xA;The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;warning: In file included from /home/...myuser/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-opt-sys-0.111.0/binaryen/src/wasm/wat-lexer.cpp:25:&#xD;&#xA;warning: /home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-opt-sys-0.111.0/binaryen/src/wat-lexer.h:62:3: error: ‘uint64_t’ does not name a type&#xD;&#xA;warning:    62 |   uint64_t n;&#xD;&#xA;warning:       |   ^~~~~~~~&#xD;&#xA;```&#xD;&#xA;after a lot of warnings then the error&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `wasm-opt-sys v0.111.0`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/.../code/target/release/build/wasm-opt-sys-100767d7e9b2317c/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; running: &quot;c++&quot; &quot;-O0&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;/home/.../code/target/release/build/wasm-opt-sys-9d165c4dcf677b01/out/cxxbridge/include&quot; &quot;-I&quot; &quot;/home/.../code/target/release/build/wasm-opt-sys-9d165c4dcf677b01/out/cxxbridge/crate&quot; &quot;-I&quot; &quot;/home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-opt-sys-0.111.0/binaryen/src&quot; &quot;-I&quot; &quot;/home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-opt-sys-0.111.0/binaryen/src/tools&quot; &quot;-I&quot; &quot;/home/.../code/target/release/build/wasm-opt-sys-9d165c4dcf677b01/out&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wno-unused-parameter&quot; &quot;-DTHROW_ON_FATAL&quot; &quot;-o&quot; &quot;/home/.../code/target/release/build/wasm-opt-sys-9d165c4dcf677b01/out/a309b73c06d115a2-lib.rs.o&quot; &quot;-c&quot; &quot;/home/.../code/target/release/build/wasm-opt-sys-9d165c4dcf677b01/out/cxxbridge/sources/wasm-opt-sys/src/lib.rs.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;and it also fails on building rocksdb&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `librocksdb-sys v0.8.3+7.4.4`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33538" PostHistoryTypeId="1" PostId="8540" RevisionGUID="5f2cd6f1-492a-4d20-8165-bbcdaa33553e" CreationDate="2023-05-17T15:28:25.437" UserId="3070" Text="Compilation Errors on Template Node" ContentLicense="CC BY-SA 4.0" />
  <row Id="33539" PostHistoryTypeId="3" PostId="8540" RevisionGUID="5f2cd6f1-492a-4d20-8165-bbcdaa33553e" CreationDate="2023-05-17T15:28:25.437" UserId="3070" Text="|substrate-node-template|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33540" PostHistoryTypeId="2" PostId="8541" RevisionGUID="7dd7842d-936e-4015-a30f-52978f91be90" CreationDate="2023-05-17T16:19:49.753" UserId="251" Text="Actually, this is not a Substrate or Rust question.&#xD;&#xA;&#xD;&#xA;There is a change in GCC 13.&#xD;&#xA;&#xD;&#xA;I'm an ArchLinux user. I always keep the dependencies on the latest version.&#xD;&#xA;&#xD;&#xA;I have to use GCC 12 now.&#xD;&#xA;&#xD;&#xA;Try:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;CC=gcc-12 CXX=g++-12 cargo build --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you don't have `gcc-12` or `g++-12` you need to install it yourself. If you are an ArchLinux user, when your upgrade your system, these packages will be kept for you." ContentLicense="CC BY-SA 4.0" />
  <row Id="33542" PostHistoryTypeId="6" PostId="8540" RevisionGUID="dbb14a60-49c2-416b-a084-868ae91d83df" CreationDate="2023-05-17T16:23:52.287" UserId="251" Comment="edited tags" Text="|compile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33543" PostHistoryTypeId="2" PostId="8542" RevisionGUID="054533e6-6f32-41e2-a910-7f9f040def5c" CreationDate="2023-05-17T17:34:58.967" UserId="94" Text="If you want a hard limit, then you have to create a wrapper.  &#xD;&#xA;The `MaxValues` on `StorageMap` and `CountedStorageMap` are only a soft limit for PoV estimations.&#xD;&#xA;&#xD;&#xA;I dont know of any implementations of this. Not sure what you are trying to do either." ContentLicense="CC BY-SA 4.0" />
  <row Id="33545" PostHistoryTypeId="2" PostId="8543" RevisionGUID="722282e4-ada6-42b4-8c98-9e88b752f854" CreationDate="2023-05-17T19:04:03.010" UserId="1839" Text="You cannot obtain ContractRef from code-hash or AccountId but you may determine whether a given function (function selector; to be precise) exists at a given address to some extend by using `try_invoke` rather than `invoke` (Not the best way though :p).&#xD;&#xA;&#xD;&#xA;Bonus: You can also look at ERC165 to know more ways to tackle this kind of problem.&#xD;&#xA;&#xD;&#xA;P.S: If a contract supports wildcard selector then this may not hold true." ContentLicense="CC BY-SA 4.0" />
  <row Id="33547" PostHistoryTypeId="2" PostId="8544" RevisionGUID="a3bd2ba3-8b39-4eb2-bde4-984298b073e3" CreationDate="2023-05-17T20:17:15.410" UserId="3171" Text="I want to spin up parachain LOCALLY faster. each 6 sec.&#xD;&#xA;How to configure polkadot with parachain?&#xD;&#xA;&#xD;&#xA;I have seen [this][1] and [this][2] &#xD;&#xA;and [this post][3]&#xD;&#xA;&#xD;&#xA;So my zombienet contains&#xD;&#xA;polkadot(obviusly) &#xD;&#xA;and two parachains. each of them with one collator node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4454/block-times-in-parachain-are-twice-as-long-as-configured&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/4558/why-my-solo-chain-block-time-is-12-seconds-when-set-to-6&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/3028/what-is-the-possible-minimum-block-time" ContentLicense="CC BY-SA 4.0" />
  <row Id="33549" PostHistoryTypeId="1" PostId="8544" RevisionGUID="a3bd2ba3-8b39-4eb2-bde4-984298b073e3" CreationDate="2023-05-17T20:17:15.410" UserId="3171" Text="How to configure polkadot + parachain locally to validate parachain block each 6 sec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33550" PostHistoryTypeId="3" PostId="8544" RevisionGUID="a3bd2ba3-8b39-4eb2-bde4-984298b073e3" CreationDate="2023-05-17T20:17:15.410" UserId="3171" Text="|polkadot|parachain|substrate-parachain-template|relay-chain|substrate-block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33551" PostHistoryTypeId="50" PostId="8130" RevisionGUID="46e2dd40-4197-487f-9e28-ad333bc33a2f" CreationDate="2023-05-17T21:11:16.273" UserId="-1" />
  <row Id="33552" PostHistoryTypeId="52" PostId="8540" RevisionGUID="299c1caa-a035-41df-9740-b4ee9739f7cb" CreationDate="2023-05-18T02:36:15.853" />
  <row Id="33553" PostHistoryTypeId="2" PostId="8545" RevisionGUID="fe3d59de-1829-4981-88f5-2c4e08fcc0b2" CreationDate="2023-05-18T03:55:23.543" UserId="4222" Text="I am trying to make a substrate solo blockchain for the election voting using homomorphic encryption scheme use case.&#xD;&#xA;&#xD;&#xA;Till now, I have created a permissioned blockchain, used the node authorization pallet, and authorized two election commission nodes for authoring and validating blocks and two voter nodes with the FULL node role.&#xD;&#xA;&#xD;&#xA;referance:(https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/)&#xD;&#xA;&#xD;&#xA;I have a doubt how do I create an encoded identity for each candidate for election(homomorphic encryption) and make an extrinsic that only allows election commission nodes to upload to the blockchain the candidate list with their encoded identity and manifesto before the beginning of the election in the setup phase?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33555" PostHistoryTypeId="1" PostId="8545" RevisionGUID="fe3d59de-1829-4981-88f5-2c4e08fcc0b2" CreationDate="2023-05-18T03:55:23.543" UserId="4222" Text="how to make an extrinsic that allows election commission (author+validator) to upload the encoded candidate list to the blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="33556" PostHistoryTypeId="3" PostId="8545" RevisionGUID="fe3d59de-1829-4981-88f5-2c4e08fcc0b2" CreationDate="2023-05-18T03:55:23.543" UserId="4222" Text="|substrate-node-template|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33557" PostHistoryTypeId="2" PostId="8546" RevisionGUID="323ba8e5-70c8-4653-8660-b22109936982" CreationDate="2023-05-18T05:52:39.053" UserId="354" Text="If you want to run the relay chain and parachain locally follow [https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/][1].&#xD;&#xA;&#xD;&#xA;The above tutorial will help you set up a relay chain locally and also will tell you how to connect a local parachain to it, after setting up the chain you can configure it according to your needs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33560" PostHistoryTypeId="2" PostId="8547" RevisionGUID="e4d704d0-7821-4d46-9bfe-2261f6f1920f" CreationDate="2023-05-18T07:10:47.817" UserId="213" Text="After transaction is send, it waits till block is included.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The following code doesn't work, it doesn't return the value:&#xD;&#xA;```javascript&#xD;&#xA;export async function transfer_balance(wsprovider, mnemonic, credit_user, value) {&#xD;&#xA;    const api = await get_api(wsprovider);&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;    const pair = keyring.createFromUri(mnemonic);&#xD;&#xA;&#xD;&#xA;    api.tx.balances.transfer(credit_user, value)&#xD;&#xA;        .signAndSend(pair, ({ status, dispatchError }) =&gt; {&#xD;&#xA;            if (dispatchError) {&#xD;&#xA;                if (dispatchError.isModule) {&#xD;&#xA;                    const decoded = api.registry.findMetaError(dispatchError.asModule);&#xD;&#xA;                    const { docs, name, section } = decoded;&#xD;&#xA;                    return `Error ${section}.${name}: ${docs.join(' ')}`;&#xD;&#xA;                } else {&#xD;&#xA;                    return `Error ${dispatchError.toString()}`;&#xD;&#xA;                }&#xD;&#xA;            } else if (status.isFinalized) {&#xD;&#xA;                return `Finalized ${status.asFinalized.toString()}`;&#xD;&#xA;            }&#xD;&#xA;        })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;How to get the dispatchError and asFinalized as return variable?&#xD;&#xA;&#xD;&#xA;I am using the code in wasm.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use wasm_bindgen::prelude::*;&#xD;&#xA;use js_sys::Promise;&#xD;&#xA;&#xD;&#xA;#[wasm_bindgen(module = &quot;/src/package.js&quot;)]&#xD;&#xA;extern &quot;C&quot; {&#xD;&#xA;    #[wasm_bindgen]&#xD;&#xA;    pub fn transfer_balance(wsprovider: String, mnemonic: String, credit_user: String, value: i32) -&gt; String;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33562" PostHistoryTypeId="1" PostId="8547" RevisionGUID="e4d704d0-7821-4d46-9bfe-2261f6f1920f" CreationDate="2023-05-18T07:10:47.817" UserId="213" Text="How to get the dispatch error as return variable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33563" PostHistoryTypeId="3" PostId="8547" RevisionGUID="e4d704d0-7821-4d46-9bfe-2261f6f1920f" CreationDate="2023-05-18T07:10:47.817" UserId="213" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33564" PostHistoryTypeId="5" PostId="8547" RevisionGUID="f8faada0-20d0-4626-b84a-8ce38748a9d8" CreationDate="2023-05-18T07:23:56.173" UserId="213" Comment="added 22 characters in body" Text="After transaction is send, it waits till block is included.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The following code though transaction gets successful, it doesn't return the value:&#xD;&#xA;```javascript&#xD;&#xA;export async function transfer_balance(wsprovider, mnemonic, credit_user, value) {&#xD;&#xA;    const api = await get_api(wsprovider);&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;    const pair = keyring.createFromUri(mnemonic);&#xD;&#xA;&#xD;&#xA;    api.tx.balances.transfer(credit_user, value)&#xD;&#xA;        .signAndSend(pair, ({ status, dispatchError }) =&gt; {&#xD;&#xA;            if (dispatchError) {&#xD;&#xA;                if (dispatchError.isModule) {&#xD;&#xA;                    const decoded = api.registry.findMetaError(dispatchError.asModule);&#xD;&#xA;                    const { docs, name, section } = decoded;&#xD;&#xA;                    return `Error ${section}.${name}: ${docs.join(' ')}`;&#xD;&#xA;                } else {&#xD;&#xA;                    return `Error ${dispatchError.toString()}`;&#xD;&#xA;                }&#xD;&#xA;            } else if (status.isFinalized) {&#xD;&#xA;                return `Finalized ${status.asFinalized.toString()}`;&#xD;&#xA;            }&#xD;&#xA;        })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;How to get the dispatchError and asFinalized as return variable?&#xD;&#xA;&#xD;&#xA;I am using the code in wasm.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use wasm_bindgen::prelude::*;&#xD;&#xA;use js_sys::Promise;&#xD;&#xA;&#xD;&#xA;#[wasm_bindgen(module = &quot;/src/package.js&quot;)]&#xD;&#xA;extern &quot;C&quot; {&#xD;&#xA;    #[wasm_bindgen]&#xD;&#xA;    pub fn transfer_balance(wsprovider: String, mnemonic: String, credit_user: String, value: i32) -&gt; String;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33565" PostHistoryTypeId="5" PostId="2557" RevisionGUID="d98d9c38-2b18-4d83-a4a5-772ca4cf7a36" CreationDate="2023-05-18T07:28:14.740" UserId="2372" Comment="added 2 characters in body" Text="I am trying to add the staking pallet with other dependencies in node-template and getting this error during compiling, I will be thankful if someone help me to resolve this issue...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1VjoU.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33566" PostHistoryTypeId="2" PostId="8548" RevisionGUID="d567ec63-c605-455e-836f-2d06aaec279b" CreationDate="2023-05-18T07:34:03.767" UserId="4222" Text="I was following the substate documentation of authorize specific nodes tutorial &#xD;&#xA;&#xD;&#xA;referance:-https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/&#xD;&#xA;&#xD;&#xA;In the add genesis storage for authorized nodes I want to add different nodes other than the predefined nodes(ALICE AND BOB) as authorized nodes so using the subkey I generated two keys for two nodes ec1 and ec2 and tried to add their peerid and account id as argument as in the figure attached&#xD;&#xA;&#xD;&#xA;[![added custom peerid and account id inplace of BOB and ALICE accounts][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but it is giving the following error:&#xD;&#xA;&#xD;&#xA;[![Error in the account id][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rAlbT.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/S7eP0.png&#xD;&#xA;&#xD;&#xA;Please kindly help ....how to fix it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33568" PostHistoryTypeId="1" PostId="8548" RevisionGUID="d567ec63-c605-455e-836f-2d06aaec279b" CreationDate="2023-05-18T07:34:03.767" UserId="4222" Text="integer literal is too large error" ContentLicense="CC BY-SA 4.0" />
  <row Id="33569" PostHistoryTypeId="3" PostId="8548" RevisionGUID="d567ec63-c605-455e-836f-2d06aaec279b" CreationDate="2023-05-18T07:34:03.767" UserId="4222" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33570" PostHistoryTypeId="2" PostId="8549" RevisionGUID="2305b40e-1b6a-4242-ab55-340babc14104" CreationDate="2023-05-18T07:40:10.207" UserId="2372" Text="I was running my substrate-blockchain on dev mode. And it is showing me this error.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/K19d9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33572" PostHistoryTypeId="1" PostId="8549" RevisionGUID="2305b40e-1b6a-4242-ab55-340babc14104" CreationDate="2023-05-18T07:40:10.207" UserId="2372" Text="Cannot create a runtime error=Other(&quot;can't convert a memory import into an export: failed to insert a new memory section" ContentLicense="CC BY-SA 4.0" />
  <row Id="33573" PostHistoryTypeId="3" PostId="8549" RevisionGUID="2305b40e-1b6a-4242-ab55-340babc14104" CreationDate="2023-05-18T07:40:10.207" UserId="2372" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33574" PostHistoryTypeId="2" PostId="8550" RevisionGUID="667e1015-22bc-4d72-9e05-e8cc3ef3d75d" CreationDate="2023-05-18T07:44:30.490" UserId="354" Text="you can follow [https://docs.substrate.io/reference/how-to-guides/consensus-models/create-a-hybrid-node/][1] for the same. The one that you were using was old one.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/consensus-models/create-a-hybrid-node/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33576" PostHistoryTypeId="5" PostId="8548" RevisionGUID="88b69ea3-afd2-447e-89db-e40b4e6415f2" CreationDate="2023-05-18T07:49:41.853" UserId="354" Comment="added 96 characters in body" Text="I was following the substate documentation of authorize specific nodes tutorial &#xD;&#xA;&#xD;&#xA;referance:-[https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/][1]&#xD;&#xA;&#xD;&#xA;In the add genesis storage for authorized nodes I want to add different nodes other than the predefined nodes(ALICE AND BOB) as authorized nodes so using the subkey I generated two keys for two nodes ec1 and ec2 and tried to add their peerid and account id as argument as in the figure attached&#xD;&#xA;&#xD;&#xA;[![added custom peerid and account id inplace of BOB and ALICE accounts][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but it is giving the following error:&#xD;&#xA;&#xD;&#xA;[![Error in the account id][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please kindly help ....how to fix it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/&#xD;&#xA;  [2]: https://i.stack.imgur.com/rAlbT.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/S7eP0.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33577" PostHistoryTypeId="2" PostId="8551" RevisionGUID="2710ca3d-b974-4c49-980b-18f1313e1cf1" CreationDate="2023-05-18T08:00:38.637" UserId="354" Text="The second parameter you are giving is not in right format you can do it in two was:&#xD;&#xA;&#xD;&#xA; 1. Change the endowed accounts and use it that account `endowed_accounts[0].clone()` like this on the place of 0 you can right the index of your on which you have added the endowed index.&#xD;&#xA; 2. The other way is to add the account that you want add in the `customSpec.json` before make the `customSpecRaw.json` file.&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="33579" PostHistoryTypeId="2" PostId="8552" RevisionGUID="a2f860e5-4cc6-4678-9eaa-9222f3a1c71a" CreationDate="2023-05-18T08:26:00.573" UserId="265" Text="`1006` can be an indication that no connection was made at all.&#xD;&#xA;&#xD;&#xA;to debug whether or not your node is even listening on the port you expect to find it, tail the node logs to check for log messages like:&#xD;&#xA;&#xD;&#xA;&gt; Accepting new connection 1/100&#xD;&#xA;&#xD;&#xA;&gt; Accepting new connection 2/100&#xD;&#xA;&#xD;&#xA;then attempt new connections from something that isn't previously untested code like [websocat](https://github.com/vi/websocat#installation). eg:&#xD;&#xA;```bash&#xD;&#xA;echo '{&#xD;&#xA;  &quot;id&quot;:1,&#xD;&#xA;  &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;  &quot;method&quot;: &quot;rpc_methods&quot;,&#xD;&#xA;  &quot;params&quot;:[]&#xD;&#xA;}' | websocat -n1 -B 99999999 ws://127.0.0.1:9944&#xD;&#xA;```&#xD;&#xA;if you don't get a response to your websocat request, and you don't see new connections being made in the node logs, your problem is in the network layer. you may have a firewall or selinux setting blocking access to the port, the node may be listening on a non-default port (check your `--ws-port` node startup args) or ahy number of other things.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33581" PostHistoryTypeId="2" PostId="8553" RevisionGUID="c3bf2f65-8d87-4c73-80c2-354a90fa6780" CreationDate="2023-05-18T08:46:56.287" UserId="251" Text="&gt; https://github.com/paritytech/substrate/blob/f4a2e84ee5974b219f2a03cd195105060c41e3cd/frame/node-authorization/src/lib.rs#L113&#xD;&#xA;&gt;&#xD;&#xA;&gt; https://docs.rs/array-bytes/6.1.0/array_bytes/fn.hex2bytes_unchecked.html&#xD;&#xA;&#xD;&#xA;The type is `Vec&lt;(PeerId, T::AccountId)&gt;`.&#xD;&#xA;&#xD;&#xA;But here is what you passed to: `Vec&lt;PeerId, integer)&gt;`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You should do:&#xD;&#xA;```rs&#xD;&#xA;OpaquePeerId(&#xD;&#xA;  ss58::decode(...).into_vec().unwrap(),&#xD;&#xA;  array_bytes::hex2bytes_unchecked($put_your_address_here_in_str_format),&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33583" PostHistoryTypeId="5" PostId="8553" RevisionGUID="865f6ab6-9f6e-4110-8ff2-7cb05049c6b8" CreationDate="2023-05-18T08:54:24.560" UserId="251" Comment="added 8 characters in body" Text="&gt; https://github.com/paritytech/substrate/blob/f4a2e84ee5974b219f2a03cd195105060c41e3cd/frame/node-authorization/src/lib.rs#L113&#xD;&#xA;&gt;&#xD;&#xA;&gt; https://docs.rs/array-bytes/6.1.0/array_bytes/fn.hex2bytes_unchecked.html&#xD;&#xA;&#xD;&#xA;The correct type is `Vec&lt;(PeerId, T::AccountId)&gt;`.&#xD;&#xA;&#xD;&#xA;But here is what you passed to: `Vec&lt;PeerId, integer)&gt;`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You should do:&#xD;&#xA;```rs&#xD;&#xA;OpaquePeerId(&#xD;&#xA;  ss58::decode(...).into_vec().unwrap(),&#xD;&#xA;  array_bytes::hex2bytes_unchecked(&quot;your account id in hex format here, e.g. 0x...&quot;),&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33584" PostHistoryTypeId="52" PostId="8544" RevisionGUID="b8c7a9fd-1bdd-48a1-86b5-38c72fce0649" CreationDate="2023-05-18T09:06:42.843" />
  <row Id="33585" PostHistoryTypeId="5" PostId="8547" RevisionGUID="6ea682df-124b-4916-a02e-125e532305b0" CreationDate="2023-05-18T09:20:43.107" UserId="213" Comment="added 1124 characters in body" Text="After transaction is send, it waits till block is included.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The following code though transaction gets successful, it doesn't return the value:&#xD;&#xA;```javascript&#xD;&#xA;export async function transfer_balance(wsprovider, mnemonic, credit_user, value) {&#xD;&#xA;    const api = await get_api(wsprovider);&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;    const pair = keyring.createFromUri(mnemonic);&#xD;&#xA;&#xD;&#xA;    api.tx.balances.transfer(credit_user, value)&#xD;&#xA;        .signAndSend(pair, ({ status, dispatchError }) =&gt; {&#xD;&#xA;            if (dispatchError) {&#xD;&#xA;                if (dispatchError.isModule) {&#xD;&#xA;                    const decoded = api.registry.findMetaError(dispatchError.asModule);&#xD;&#xA;                    const { docs, name, section } = decoded;&#xD;&#xA;                    return `Error ${section}.${name}: ${docs.join(' ')}`;&#xD;&#xA;                } else {&#xD;&#xA;                    return `Error ${dispatchError.toString()}`;&#xD;&#xA;                }&#xD;&#xA;            } else if (status.isFinalized) {&#xD;&#xA;                return `Finalized ${status.asFinalized.toString()}`;&#xD;&#xA;            }&#xD;&#xA;        })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;How to get the dispatchError and asFinalized as return variable?&#xD;&#xA;&#xD;&#xA;I am using the code in wasm.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use wasm_bindgen::prelude::*;&#xD;&#xA;use js_sys::Promise;&#xD;&#xA;&#xD;&#xA;#[wasm_bindgen(module = &quot;/src/package.js&quot;)]&#xD;&#xA;extern &quot;C&quot; {&#xD;&#xA;    #[wasm_bindgen]&#xD;&#xA;    pub fn transfer_balance(wsprovider: String, mnemonic: String, credit_user: String, value: i32) -&gt; String;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I also tried promises, still it doesn't work.&#xD;&#xA;```javascript&#xD;&#xA;export function transfer_balance(wsprovider, mnemonic, credit_user, value) {&#xD;&#xA;    return new Promise((resolve, reject) =&gt; {&#xD;&#xA;        const api = get_api(wsprovider);&#xD;&#xA;        const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;        const pair = keyring.createFromUri(mnemonic);&#xD;&#xA;&#xD;&#xA;        api.tx.balances.transfer(credit_user, value)&#xD;&#xA;            .signAndSend(pair, ({ status, dispatchError }) =&gt; {&#xD;&#xA;                if (dispatchError) {&#xD;&#xA;                    if (dispatchError.isModule) {&#xD;&#xA;                        const decoded = api.registry.findMetaError(dispatchError.asModule);&#xD;&#xA;                        const { docs, name, section } = decoded;&#xD;&#xA;                        reject(`Error ${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;                    } else {&#xD;&#xA;                        reject(`Error ${dispatchError.toString()}`);&#xD;&#xA;                    }&#xD;&#xA;                } else if (status.isFinalized) {&#xD;&#xA;                    resolve(`Finalized ${status.asFinalized.toString()}`);&#xD;&#xA;                }&#xD;&#xA;            })&#xD;&#xA;            .catch(reject);&#xD;&#xA;    });&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33586" PostHistoryTypeId="5" PostId="8544" RevisionGUID="c1c8d933-4651-4650-857c-487e406dc597" CreationDate="2023-05-18T10:10:56.423" UserId="3171" Comment="added 701 characters in body" Text="I want to spin up parachain LOCALLY faster. each 6 sec.&#xD;&#xA;How to configure polkadot with parachain?&#xD;&#xA;&#xD;&#xA;I have seen [this][1] and [this][2] &#xD;&#xA;and [this post][3]&#xD;&#xA;&#xD;&#xA;So my zombienet contains&#xD;&#xA;polkadot(obviusly) &#xD;&#xA;and two parachains. each of them with one collator node.&#xD;&#xA;&#xD;&#xA;I changed relaychain&#xD;&#xA;&#xD;&#xA;    pub const MILLISECS_PER_BLOCK: u64 = 3000;&#xD;&#xA;&#xD;&#xA;and now relay chain produce the block each 3 sec. it is good.&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;I changed. the value. from 12000 to 6000&#xD;&#xA;&#xD;&#xA;    pub const MILLISECS_PER_BLOCK: u64 = 6000;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;BUT parachain still produce the block each 12 sec instead of 6&#xD;&#xA;even when relay chain produce block each 3 sec.&#xD;&#xA;&#xD;&#xA;I understand that i need to reconfigure relay chain to sing and send transaction to parachain more often. as i understand set_validate_data extrinisc in parachain system&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4454/block-times-in-parachain-are-twice-as-long-as-configured&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/4558/why-my-solo-chain-block-time-is-12-seconds-when-set-to-6&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/3028/what-is-the-possible-minimum-block-time&#xD;&#xA;  [4]: https://i.stack.imgur.com/TKQHK.jpg&#xD;&#xA;  [5]: https://i.stack.imgur.com/XABa7.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="33587" PostHistoryTypeId="2" PostId="8554" RevisionGUID="2744486e-de45-4d01-a6fa-8b331be466a9" CreationDate="2023-05-18T10:13:15.347" UserId="213" Text="It worked with following code:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;import { Keyring } from '@polkadot/keyring';&#xD;&#xA;import { waitReady } from &quot;@polkadot/wasm-crypto&quot;;&#xD;&#xA;export async function transfer_balance(wsprovider, mnemonic, credit_user, value) {&#xD;&#xA;    await waitReady();&#xD;&#xA;    return new Promise((resolve, reject) =&gt; {&#xD;&#xA;        const apiPromise = get_api(wsprovider);&#xD;&#xA;        const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;        const pair = keyring.createFromUri(mnemonic);&#xD;&#xA;         apiPromise.then((api) =&gt; {&#xD;&#xA;            api.tx.balances.transfer(credit_user, value)&#xD;&#xA;                .signAndSend(pair, ({ status, dispatchError }) =&gt; {&#xD;&#xA;                    if (dispatchError) {&#xD;&#xA;                        if (dispatchError.isModule) {&#xD;&#xA;                            const decoded = api.registry.findMetaError(dispatchError.asModule);&#xD;&#xA;                            const { docs, name, section } = decoded;&#xD;&#xA;                            reject(`Error ${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;                        } else {&#xD;&#xA;                            reject(`Error ${dispatchError.toString()}`);&#xD;&#xA;                        }&#xD;&#xA;                    } else if (status.isFinalized) {&#xD;&#xA;                        resolve(`Finalized ${status.asFinalized.toString()}`);&#xD;&#xA;                    }&#xD;&#xA;                })&#xD;&#xA;                .catch(reject);&#xD;&#xA;        }).catch(reject);&#xD;&#xA;    });&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33589" PostHistoryTypeId="5" PostId="8544" RevisionGUID="fe51dd12-8fa6-40f6-96d5-60051a1dd82a" CreationDate="2023-05-18T10:39:47.020" UserId="3171" Comment="added 22 characters in body" Text="I want to spin up parachain LOCALLY faster. each 6 sec.&#xD;&#xA;How to configure polkadot with parachain?&#xD;&#xA;&#xD;&#xA;I have seen [this][1] and [this][2] &#xD;&#xA;and [this post][3]&#xD;&#xA;&#xD;&#xA;So my zombienet contains&#xD;&#xA;polkadot(obviusly) &#xD;&#xA;and two parachains. each of them with one collator node.&#xD;&#xA;&#xD;&#xA;I changed relaychain&#xD;&#xA;&#xD;&#xA;    pub const MILLISECS_PER_BLOCK: u64 = 3000;&#xD;&#xA;&#xD;&#xA;and now relay chain produce the block each 3 sec. it is good.&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;I changed for parachain runtime. the value. from 12000 to 6000&#xD;&#xA;&#xD;&#xA;    pub const MILLISECS_PER_BLOCK: u64 = 6000;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;BUT parachain still produce the block each 12 sec instead of 6&#xD;&#xA;even when relay chain produce block each 3 sec.&#xD;&#xA;&#xD;&#xA;I understand that i need to reconfigure relay chain to sing and send transaction to parachain more often. as i understand set_validate_data extrinisc in parachain system&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4454/block-times-in-parachain-are-twice-as-long-as-configured&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/4558/why-my-solo-chain-block-time-is-12-seconds-when-set-to-6&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/3028/what-is-the-possible-minimum-block-time&#xD;&#xA;  [4]: https://i.stack.imgur.com/TKQHK.jpg&#xD;&#xA;  [5]: https://i.stack.imgur.com/XABa7.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="33590" PostHistoryTypeId="5" PostId="8535" RevisionGUID="f9af6bc5-0f18-4ed1-8b54-e8e0b040ef7c" CreationDate="2023-05-18T10:41:11.417" UserId="2281" Comment="added 14 characters in body; edited tags" Text="I've added a new amiquip dependency in cargo.toml &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;sender&quot;&#xD;&#xA;    version = &quot;0.1.0&quot;&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    &#xD;&#xA;    [package.metadata.docs.rs]&#xD;&#xA;    targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;    	&quot;derive&quot;,&#xD;&#xA;    ] }&#xD;&#xA;    amiquip = { version = &quot;0.4&quot;, default-features = false, optional = true }&#xD;&#xA;    scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [dev-dependencies]&#xD;&#xA;    sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-io = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-runtime = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&quot;codec/std&quot;, &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;    &quot;amiquip&quot;,&#xD;&#xA;     &quot;frame-support/std&quot;, &#xD;&#xA;     &quot;frame-system/std&quot;,&#xD;&#xA;      &quot;scale-info/std&quot;]&#xD;&#xA;    runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;    try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; But it still showing me this error use of &quot;undeclared crate or module&#xD;&#xA;&gt; `amiquip`&quot;. I've also tried extern crate amiquip. But it didn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Xv9hd.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33591" PostHistoryTypeId="6" PostId="8535" RevisionGUID="f9af6bc5-0f18-4ed1-8b54-e8e0b040ef7c" CreationDate="2023-05-18T10:41:11.417" UserId="2281" Comment="added 14 characters in body; edited tags" Text="|substrate-node-template|rust|modules|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33592" PostHistoryTypeId="2" PostId="8555" RevisionGUID="b0a5d79f-19a3-471c-b066-830eadcf7e1e" CreationDate="2023-05-18T10:43:43.627" UserId="2372" Text="Check the fn send-message in the send-message.rs of bin-substrate folder. You can add the target-signer for particular message-dispatch. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33594" PostHistoryTypeId="5" PostId="8544" RevisionGUID="06534fe5-ce71-42fc-8565-e11c2ffda641" CreationDate="2023-05-18T11:58:35.137" UserId="3171" Comment="deleted 14 characters in body" Text="I want to spin up parachain LOCALLY faster. each 6 sec.&#xD;&#xA;How to configure polkadot with parachain?&#xD;&#xA;&#xD;&#xA;I have seen [this][1] and [this][2] &#xD;&#xA;and [this post][3]&#xD;&#xA;&#xD;&#xA;So my zombienet contains&#xD;&#xA;polkadot(obviusly) &#xD;&#xA;and two parachains. each of them with one collator node.&#xD;&#xA;&#xD;&#xA;I changed relaychain&#xD;&#xA;&#xD;&#xA;    pub const MILLISECS_PER_BLOCK: u64 = 3000;&#xD;&#xA;&#xD;&#xA;and now relay chain produce the block each 3 sec. it is good.&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;I changed for parachain runtime. the value. from 12000 to 6000&#xD;&#xA;&#xD;&#xA;    pub const MILLISECS_PER_BLOCK: u64 = 6000;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;BUT parachain still produce the block each 12 sec instead of 6&#xD;&#xA;even when relay chain produce block each 3 sec.&#xD;&#xA;&#xD;&#xA;I understand that i need to reconfigure relay chain to sign and send transaction to parachain more often. `set_validate_data` extrinisc in parachain system&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4454/block-times-in-parachain-are-twice-as-long-as-configured&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/4558/why-my-solo-chain-block-time-is-12-seconds-when-set-to-6&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/3028/what-is-the-possible-minimum-block-time&#xD;&#xA;  [4]: https://i.stack.imgur.com/TKQHK.jpg&#xD;&#xA;  [5]: https://i.stack.imgur.com/XABa7.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="33595" PostHistoryTypeId="50" PostId="8135" RevisionGUID="7b0a3af0-b2b3-4e42-8897-9215c05f918a" CreationDate="2023-05-18T12:08:51.120" UserId="-1" />
  <row Id="33596" PostHistoryTypeId="2" PostId="8556" RevisionGUID="631a6313-8431-4de4-b645-5fc35bbc3cf1" CreationDate="2023-05-18T14:14:06.843" UserId="2065" Text="I am currently upgrading our chain to polkadot-v0.9.38 but when I run the build I get the following error: &#xD;&#xA;&#xD;&#xA;    error[E0405]: cannot find trait `Signature` in crate `signature`&#xD;&#xA;       --&gt; /home/albrayanov/.cargo/registry/src/github.com-1ecc6299db9ec823/ed25519-1.5.2/src/lib.rs:335:17&#xD;&#xA;        |&#xD;&#xA;    335 | impl signature::Signature for Signature {&#xD;&#xA;        |                 ^^^^^^^^^ not found in `signature`&#xD;&#xA;&#xD;&#xA;Any ideas on how to resolve this since the **signature::Signature** implementation is not defined in our code (link to the branch can be found [here][1])?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chexware/Bit-Country-Blockchain/tree/runtime-upgrade/polkadot-v0.9.38" ContentLicense="CC BY-SA 4.0" />
  <row Id="33598" PostHistoryTypeId="1" PostId="8556" RevisionGUID="631a6313-8431-4de4-b645-5fc35bbc3cf1" CreationDate="2023-05-18T14:14:06.843" UserId="2065" Text="error[E0405]: cannot find trait `Signature` in crate `signature`" ContentLicense="CC BY-SA 4.0" />
  <row Id="33599" PostHistoryTypeId="3" PostId="8556" RevisionGUID="631a6313-8431-4de4-b645-5fc35bbc3cf1" CreationDate="2023-05-18T14:14:06.843" UserId="2065" Text="|runtime-upgrade|error|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33601" PostHistoryTypeId="5" PostId="4245" RevisionGUID="6f26e5bf-2fd7-4341-aa21-fd44458d651b" CreationDate="2023-05-18T20:24:36.500" UserId="494" Comment="added 59 characters in body" Text="When creating a `StorageMap`, a hashing algorithm needs to be chosen for the `StorageHasher`.&#xD;&#xA;&#xD;&#xA;`frame_support` provides [a few options][1]:&#xD;&#xA;- `Identity`&#xD;&#xA;- `Blake2_128`&#xD;&#xA;- `Blake2_128Concat`&#xD;&#xA;- `Blake2_256`&#xD;&#xA;- `Twox64Concat`&#xD;&#xA;- `Twox128`&#xD;&#xA;- `Twox256`&#xD;&#xA;&#xD;&#xA;(edit: the non-`*Concat` versions are being deprecated)&#xD;&#xA;&#xD;&#xA;Where `Identity` means using the key directly (with no hashing), `Blake2_*` means using some variation of the [BLAKE2](https://www.blake2.net/) algorithm, and `Twox*` means using some variation of the [xxHash](https://cyan4973.github.io/xxHash/) algorithm.&#xD;&#xA;&#xD;&#xA;The question here is: what criteria would one take into account when choosing BLAKE2 vs xxHash for their `StorageHasher` object? When to choose one over the other?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/frame-support/2.0.0-rc2/frame_support/index.html#structs" ContentLicense="CC BY-SA 4.0" />
  <row Id="33603" PostHistoryTypeId="5" PostId="8183" RevisionGUID="37ba62b3-52b0-432b-9f7a-8bb94bbb69ac" CreationDate="2023-05-19T02:31:09.907" UserId="251" Comment="added 6 characters in body" Text="I am trying to run cargo update but I keep getting this error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: no matching package named `sp-beefy` found&#xD;&#xA;location searched: https://github.com/paritytech/substrate?branch=master&#xD;&#xA;required by package `bp-beefy v0.1.0  &#xD;&#xA;&#xD;&#xA;solo-para-bridge-poc/primitives/beefy)`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33604" PostHistoryTypeId="2" PostId="8557" RevisionGUID="bb5b8d17-4bc7-44a4-a5f5-3eee54667443" CreationDate="2023-05-19T02:34:19.670" UserId="251" Text="If looks like that you update your dependencies accidentally.&#xD;&#xA;&#xD;&#xA;Don't modify the `Cargo.lock` or run `cargo update` after you cloned the repository. (if you don't know what this does)&#xD;&#xA;&#xD;&#xA;`sp-beefy` was renamed to `sp-consensus-beefy`.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/13484" ContentLicense="CC BY-SA 4.0" />
  <row Id="33607" PostHistoryTypeId="2" PostId="8558" RevisionGUID="7480bdfa-0524-4682-85e8-43ea8590ee43" CreationDate="2023-05-19T04:06:44.853" UserId="1777" Text="I just cloned [frontier][1] and modified the code for using H256 address following [this][2]&#xD;&#xA;&#xD;&#xA;These are my changes in ***runtime/src/lib.rs***:&#xD;&#xA;&#xD;&#xA;    pub type Signature = MultiSignature;&#xD;&#xA;&#xD;&#xA;    impl pallet_evm::Config for Runtime {&#xD;&#xA;    	type CallOrigin = EnsureAddressTruncated;&#xD;&#xA;    	type WithdrawOrigin = EnsureAddressTruncated;&#xD;&#xA;    	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl pallet_hotfix_sufficients::Config for Runtime {&#xD;&#xA;    	type AddressMapping = HashedAddressMapping&lt;BlakeTwo256&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And changes in ***node/src/chain_spec.rs***&#xD;&#xA;&#xD;&#xA;					// Sudo account&#xD;&#xA;					get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;					// Pre-funded accounts&#xD;&#xA;					vec![&#xD;&#xA;						get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;						get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;						get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;						get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;					],&#xD;&#xA;Then I started with [polkadotjs][3] and get this error&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;    Uncaught error. Something went wrong with the query and rendering of this component. Please supply all the details below when logging an issue, it may help in tracing the cause.&#xD;&#xA;    &#xD;&#xA;    createType(AccountId):: Invalid AccountId provided, expected 32 bytes, found 20&#xD;&#xA;    &#xD;&#xA;    Error: createType(AccountId):: Invalid AccountId provided, expected 32 bytes, found 20&#xD;&#xA;    at h (https://polkadot.js.org/apps/modu.b1c146caef756c6c.js:50:76567)&#xD;&#xA;    at j.createType (https://polkadot.js.org/apps/modu.b1c146caef756c6c.js:50:163671)&#xD;&#xA;    at Array.&lt;anonymous&gt; (https://polkadot.js.org/apps/comm.6c4b6b9d268abd8d.js:871:1214)&#xD;&#xA;    at D (https://polkadot.js.org/apps/comm.6c4b6b9d268abd8d.js:871:1808)&#xD;&#xA;    at L (https://polkadot.js.org/apps/comm.6c4b6b9d268abd8d.js:871:2164)&#xD;&#xA;    at https://polkadot.js.org/apps/comm.6c4b6b9d268abd8d.js:921:182&#xD;&#xA;    at Object.Ii [as useState] (https://polkadot.js.org/apps/modu.542970b4dea9bb45.js:2:78769)&#xD;&#xA;    at t.useState (https://polkadot.js.org/apps/modu.542970b4dea9bb45.js:2:361050)&#xD;&#xA;    at https://polkadot.js.org/apps/comm.6c4b6b9d268abd8d.js:921:176&#xD;&#xA;    at Pi (https://polkadot.js.org/apps/modu.542970b4dea9bb45.js:2:75852)&#xD;&#xA;&#xD;&#xA;Am I missing to change anything in the code?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/frontier&#xD;&#xA;  [2]: https://github.com/paritytech/frontier/blob/master/docs/accounts.md&#xD;&#xA;  [3]: https://polkadot.js.org/apps/#/explorer&#xD;&#xA;  [4]: https://i.stack.imgur.com/GYOMp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33609" PostHistoryTypeId="1" PostId="8558" RevisionGUID="7480bdfa-0524-4682-85e8-43ea8590ee43" CreationDate="2023-05-19T04:06:44.853" UserId="1777" Text="Frontier template using sr25519 - polkajsapi" ContentLicense="CC BY-SA 4.0" />
  <row Id="33610" PostHistoryTypeId="3" PostId="8558" RevisionGUID="7480bdfa-0524-4682-85e8-43ea8590ee43" CreationDate="2023-05-19T04:06:44.853" UserId="1777" Text="|polkadot-js|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33611" PostHistoryTypeId="2" PostId="8559" RevisionGUID="462db63c-3987-41a3-b444-97c414d768a5" CreationDate="2023-05-19T04:18:50.997" UserId="3881" Text="I´m trying to make a parachain runtime upgrade without a migration, as a way to understand the process before trying with a migration.&#xD;&#xA;&#xD;&#xA;I´m using version 0.9.40 of polkadot for the relay chain and the parachain template with the same version.&#xD;&#xA;&#xD;&#xA;As I understand the process it should be as follow:&#xD;&#xA;- To make the upgrade in the parachain as in a solo chain, as explained here: https://docs.substrate.io/tutorials/build-a-blockchain/upgrade-a-running-network/&#xD;&#xA;&#xD;&#xA;- Then notify the relay chain of the upgrade via a priviledged transaction.&#xD;&#xA;&#xD;&#xA;Is this correct? &#xD;&#xA;&#xD;&#xA;I have seen other similar questions here but with a different extrinsic to be called, for example here: https://substrate.stackexchange.com/questions/1061/what-is-the-proper-way-of-executing-a-runtime-upgrade-on-a-parachain  . AuthorizeUpgrade from parachainSystem is being called. I didn´t found something similar in the relay chain. What I have encountered that seems to be similar is: ForceScheduleCodeUpgrade from paras&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;In case I should use that, I don´t know how to get relayParentNumber to make the call. &#xD;&#xA;&#xD;&#xA;Any help could be appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zERMj.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33613" PostHistoryTypeId="1" PostId="8559" RevisionGUID="462db63c-3987-41a3-b444-97c414d768a5" CreationDate="2023-05-19T04:18:50.997" UserId="3881" Text="How to make a parachain runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="33614" PostHistoryTypeId="3" PostId="8559" RevisionGUID="462db63c-3987-41a3-b444-97c414d768a5" CreationDate="2023-05-19T04:18:50.997" UserId="3881" Text="|parachain|runtime-upgrade|substrate-parachain-template|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33615" PostHistoryTypeId="2" PostId="8560" RevisionGUID="ea168d9a-109c-492e-9a6f-309085732e1b" CreationDate="2023-05-19T07:02:13.283" UserId="1777" Text="I will need to change the name of blockchain. It is because &quot;frontier-template&quot; is **ethereum** chain type [references][1]&#xD;&#xA;&#xD;&#xA;    pub const VERSION: RuntimeVersion = RuntimeVersion {&#xD;&#xA;    	spec_name: create_runtime_str!(&quot;newName&quot;),&#xD;&#xA;    	impl_name: create_runtime_str!(&quot;newName&quot;),&#xD;&#xA;    	authoring_version: 1,&#xD;&#xA;    	spec_version: 1,&#xD;&#xA;    	impl_version: 1,&#xD;&#xA;    	apis: RUNTIME_API_VERSIONS,&#xD;&#xA;    	transaction_version: 1,&#xD;&#xA;    	state_version: 1,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/blob/e774236407e3f3249dd0c538b71428068ddf3f7c/packages/apps-config/src/settings/ethereumChains.ts#L7" ContentLicense="CC BY-SA 4.0" />
  <row Id="33617" PostHistoryTypeId="5" PostId="8559" RevisionGUID="306db686-934f-4462-995d-659df2292ae8" CreationDate="2023-05-19T07:09:02.557" UserId="3881" Comment="edited body" Text="I´m trying to make a parachain runtime upgrade without a migration, as a way to understand the process before trying with a migration.&#xD;&#xA;&#xD;&#xA;I´m using version 0.9.40 of polkadot for the relay chain and the parachain template with the same version.&#xD;&#xA;&#xD;&#xA;As I understand the process it should be as follow:&#xD;&#xA;- To make the upgrade in the parachain as in a solo chain, as explained here: https://docs.substrate.io/tutorials/build-a-blockchain/upgrade-a-running-network/&#xD;&#xA;&#xD;&#xA;- Then notify the relay chain of the upgrade via a priviledged transaction.&#xD;&#xA;&#xD;&#xA;Is this correct? &#xD;&#xA;&#xD;&#xA;I have seen other similar questions here but with a different extrinsic to be called, for example here: https://substrate.stackexchange.com/questions/1061/what-is-the-proper-way-of-executing-a-runtime-upgrade-on-a-parachain  . AuthorizeUpgrade from parachainSystem is being called. I didn´t found something similar in the relay chain. What I have encountered that seems to be similar is: ForceScheduleCodeUpgrade from paras&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;In case I should use that, I don´t know how to get relayParentNumber to make the call. &#xD;&#xA;&#xD;&#xA;Any help would be appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zERMj.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33619" PostHistoryTypeId="2" PostId="8561" RevisionGUID="a5beb252-3ac5-41fb-81d9-80284e6aa8a6" CreationDate="2023-05-19T07:32:14.073" UserId="251" Text="You should connect to your parachain node instead of the relaychain node. Because you want to upgrade the parachain. And the `ParachainSystem` only exists in parachain.&#xD;&#xA;&#xD;&#xA;After that, follow the tutorial that you found. `authorize -&gt; enact`." ContentLicense="CC BY-SA 4.0" />
  <row Id="33621" PostHistoryTypeId="2" PostId="8562" RevisionGUID="22d363c0-7e00-4092-8133-93e7416b46cd" CreationDate="2023-05-19T07:42:13.780" UserId="445" Text="My code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const main = async() =&gt; {&#xD;&#xA;&#xD;&#xA;    //Get wasm &#xD;&#xA;&#xD;&#xA;    let wasm = fs.readFileSync(&quot;../../res/counter.wasm&quot;);&#xD;&#xA;    &#xD;&#xA;    // API creation for connection to the chain&#xD;&#xA;    const wsProvider = new WsProvider(process.env.WSS_PROVIDER);&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const keyring = new Keyring({ type: &quot;ed25519&quot; });&#xD;&#xA;    const userKeyring = keyring.addFromMnemonic(process.env.MNEMONIC_PHRASE);&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    // maximum gas to be consumed for the instantiation. if limit is too small the instantiation will fail.&#xD;&#xA;    const gasLimit = 500000n * 1000000n;&#xD;&#xA;    &#xD;&#xA;    // a limit to how much Balance to be used to pay for the storage created by the instantiation&#xD;&#xA;    // if null is passed, unlimited balance can be used&#xD;&#xA;    const storageDepositLimit = null&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Sign transaction to deploy contract&#xD;&#xA;    //Define deployed contract with metadata + contract address&#xD;&#xA;    const contract = new ContractPromise(api, metadata, '5GEMqSuQUCgYCoR5zZSzCX1of68o7F2pnyUapmkJhvbwT2BD');&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    // Query value from contract&#xD;&#xA;    const {result, output } = await contract.query.get(&#xD;&#xA;    userKeyring.address,&#xD;&#xA;    {&#xD;&#xA;        gasLimit,&#xD;&#xA;        storageDepositLimit,&#xD;&#xA;    }&#xD;&#xA;    );&#xD;&#xA;    // check if the call was successful&#xD;&#xA;    if (result.isOk) {&#xD;&#xA;        // output the return value&#xD;&#xA;        console.log('Success -&gt; Value:', output.toHuman());&#xD;&#xA;    } else {&#xD;&#xA;        console.error('Error', result.asErr);&#xD;&#xA;    }&#xD;&#xA; &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;main().catch((error) =&gt; {&#xD;&#xA;    console.error(error);&#xD;&#xA;    process.exitCode = 1;&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Error:** &#xD;&#xA;&#xD;&#xA;`Error Type { registry: TypeRegistry {}, initialU8aLength: 6 }`&#xD;&#xA;&#xD;&#xA;**Environment:**&#xD;&#xA;&#xD;&#xA;+ Dependencies:&#xD;&#xA;`&#xD;&#xA;&quot;@polkadot/api&quot;: &quot;10.1.3&quot;,&#xD;&#xA;&quot;@polkadot/api-contract&quot;: &quot;10.1.3&quot;,&#xD;&#xA;`&#xD;&#xA;+ Ink!: version 4&#xD;&#xA;&#xD;&#xA;+ Substrate node version: `0.9.36`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33623" PostHistoryTypeId="1" PostId="8562" RevisionGUID="22d363c0-7e00-4092-8133-93e7416b46cd" CreationDate="2023-05-19T07:42:13.780" UserId="445" Text="Error Type { registry: TypeRegistry {}, initialU8aLength: 6 } when try to query ink! smart contract by @polkadotjs/api-contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="33624" PostHistoryTypeId="3" PostId="8562" RevisionGUID="22d363c0-7e00-4092-8133-93e7416b46cd" CreationDate="2023-05-19T07:42:13.780" UserId="445" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33625" PostHistoryTypeId="50" PostId="8167" RevisionGUID="08abe423-db37-434c-b91d-129ec03fec44" CreationDate="2023-05-19T08:07:35.920" UserId="-1" />
  <row Id="33626" PostHistoryTypeId="2" PostId="8563" RevisionGUID="2a3d059f-d14e-4408-b190-2fa09f637aa5" CreationDate="2023-05-19T10:56:29.670" UserId="3030" Text="My understanding is that when anything about the storage type is changed for example the encoded type stored, the keys, prefix etc then a storage migration is required.&#xD;&#xA;&#xD;&#xA;But when else? &#xD;&#xA;Is there a standard definition of when storage migrations are required?&#xD;&#xA;What happens if a StorageMap is removed from a pallet for example?&#xD;&#xA;&#xD;&#xA;Thanks " ContentLicense="CC BY-SA 4.0" />
  <row Id="33628" PostHistoryTypeId="1" PostId="8563" RevisionGUID="2a3d059f-d14e-4408-b190-2fa09f637aa5" CreationDate="2023-05-19T10:56:29.670" UserId="3030" Text="Is there a canonical resource describing when migrations are needed" ContentLicense="CC BY-SA 4.0" />
  <row Id="33629" PostHistoryTypeId="3" PostId="8563" RevisionGUID="2a3d059f-d14e-4408-b190-2fa09f637aa5" CreationDate="2023-05-19T10:56:29.670" UserId="3030" Text="|runtime|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33630" PostHistoryTypeId="5" PostId="8562" RevisionGUID="f9ad9989-e35f-4c5c-85a0-78c8cbc14680" CreationDate="2023-05-19T11:30:08.893" UserId="2281" Comment="added 2 characters in body" Text="My code:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;const main = async() =&gt; {&#xD;&#xA;&#xD;&#xA;    //Get wasm &#xD;&#xA;&#xD;&#xA;    let wasm = fs.readFileSync(&quot;../../res/counter.wasm&quot;);&#xD;&#xA;    &#xD;&#xA;    // API creation for connection to the chain&#xD;&#xA;    const wsProvider = new WsProvider(process.env.WSS_PROVIDER);&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const keyring = new Keyring({ type: &quot;ed25519&quot; });&#xD;&#xA;    const userKeyring = keyring.addFromMnemonic(process.env.MNEMONIC_PHRASE);&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    // maximum gas to be consumed for the instantiation. if limit is too small the instantiation will fail.&#xD;&#xA;    const gasLimit = 500000n * 1000000n;&#xD;&#xA;    &#xD;&#xA;    // a limit to how much Balance to be used to pay for the storage created by the instantiation&#xD;&#xA;    // if null is passed, unlimited balance can be used&#xD;&#xA;    const storageDepositLimit = null&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Sign transaction to deploy contract&#xD;&#xA;    //Define deployed contract with metadata + contract address&#xD;&#xA;    const contract = new ContractPromise(api, metadata, '5GEMqSuQUCgYCoR5zZSzCX1of68o7F2pnyUapmkJhvbwT2BD');&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    // Query value from contract&#xD;&#xA;    const {result, output } = await contract.query.get(&#xD;&#xA;    userKeyring.address,&#xD;&#xA;    {&#xD;&#xA;        gasLimit,&#xD;&#xA;        storageDepositLimit,&#xD;&#xA;    }&#xD;&#xA;    );&#xD;&#xA;    // check if the call was successful&#xD;&#xA;    if (result.isOk) {&#xD;&#xA;        // output the return value&#xD;&#xA;        console.log('Success -&gt; Value:', output.toHuman());&#xD;&#xA;    } else {&#xD;&#xA;        console.error('Error', result.asErr);&#xD;&#xA;    }&#xD;&#xA; &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;main().catch((error) =&gt; {&#xD;&#xA;    console.error(error);&#xD;&#xA;    process.exitCode = 1;&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Error:** &#xD;&#xA;&#xD;&#xA;`Error Type { registry: TypeRegistry {}, initialU8aLength: 6 }`&#xD;&#xA;&#xD;&#xA;**Environment:**&#xD;&#xA;&#xD;&#xA;+ Dependencies:&#xD;&#xA;`&#xD;&#xA;&quot;@polkadot/api&quot;: &quot;10.1.3&quot;,&#xD;&#xA;&quot;@polkadot/api-contract&quot;: &quot;10.1.3&quot;,&#xD;&#xA;`&#xD;&#xA;+ Ink!: version 4&#xD;&#xA;&#xD;&#xA;+ Substrate node version: `0.9.36`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33631" PostHistoryTypeId="52" PostId="8559" RevisionGUID="97ea45cf-21fd-4191-87f4-982521a93433" CreationDate="2023-05-19T12:41:14.687" />
  <row Id="33632" PostHistoryTypeId="50" PostId="8180" RevisionGUID="b4a37763-100e-4eec-9367-42f2efb0956e" CreationDate="2023-05-19T15:00:25.070" UserId="-1" />
  <row Id="33633" PostHistoryTypeId="2" PostId="8564" RevisionGUID="43f627fd-f530-49d7-9bb3-492d0f0f0dd0" CreationDate="2023-05-19T17:43:00.137" UserId="3850" Text="I assume that through a Diamond contract, I have to call the [`forward`](https://github.com/ok-Alice/liquid-staking/blob/diamond-pattern/lib.rs#L26-L29) ink message to execute an ink message on a facet contract. Based on the diamond [`_fallback`](https://github.com/Brushfam/openbrush-contracts/blob/a255c212debdace8b82f84cb104e84b716ccd6ac/contracts/src/upgradeability/diamond/diamond.rs#L172-L195) method, it seems that I have to pass a `selector` and its corresponding args. But how do I pass the `selector` as input if there is no args in the `_fallback` method signature? &#xD;&#xA;&#xD;&#xA;I am trying to call the [`pausable::paused`](https://github.com/ok-Alice/liquid-staking/blob/diamond-pattern/contracts/staker_facet_v1/src/lib.rs#L46-L49) ink message in my facet contract. How would I achieve this in PolkadotJS? &#xD;&#xA;&#xD;&#xA;When I execute the [query method](https://github.com/ok-Alice/liquid-staking/blob/diamond-pattern/scripts/include/contract-operations.ts#L98-L131) with the [following arguments](https://github.com/ok-Alice/liquid-staking/blob/diamond-pattern/scripts/deploy-diamond-and-facets.ts#L251-L257), I get the following output:&#xD;&#xA;```&#xD;&#xA;Error: Expected 0 arguments to contract message 'forward', found 1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is expected since the `forward` ink message does not accept any arguments. But how can I pass the `selector` as [input](https://github.com/Brushfam/openbrush-contracts/blob/a255c212debdace8b82f84cb104e84b716ccd6ac/contracts/src/upgradeability/diamond/diamond.rs#L173) for `_fallback` method? " ContentLicense="CC BY-SA 4.0" />
  <row Id="33635" PostHistoryTypeId="1" PostId="8564" RevisionGUID="43f627fd-f530-49d7-9bb3-492d0f0f0dd0" CreationDate="2023-05-19T17:43:00.137" UserId="3850" Text="How do I call a diamond facet ink message with PolkadotJS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33636" PostHistoryTypeId="3" PostId="8564" RevisionGUID="43f627fd-f530-49d7-9bb3-492d0f0f0dd0" CreationDate="2023-05-19T17:43:00.137" UserId="3850" Text="|ink|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33637" PostHistoryTypeId="2" PostId="8565" RevisionGUID="488bb323-be21-450e-a350-29b00aaafdf8" CreationDate="2023-05-19T19:30:59.937" UserId="73" Text="As you already said correctly, sessions are based on time. There is no logic to catch up or similar, we will just skip the sessions. For quite some time this would have been problematic for chains using BABE. They would have seen the famous &quot;unexpected epoch change&quot; error. However, the latest version of BABE also supports to skip sessions/epochs without rendering the chain invalid." ContentLicense="CC BY-SA 4.0" />
  <row Id="33639" PostHistoryTypeId="2" PostId="8566" RevisionGUID="dc9efd87-0422-4d10-9e20-93bd0ac2eeac" CreationDate="2023-05-19T19:35:21.157" UserId="73" Text="&gt; My understanding is that when anything about the storage type is changed for example the encoded type stored, the keys, prefix etc then a storage migration is required.&#xD;&#xA;&#xD;&#xA;That is the correct understanding and also includes all the cases when a storage migration is required.&#xD;&#xA;&#xD;&#xA;When you remove a storage type, you should also write a migration to clean up the storage. Otherwise there will be data left in the state that is useless." ContentLicense="CC BY-SA 4.0" />
  <row Id="33641" PostHistoryTypeId="2" PostId="8567" RevisionGUID="7e82da7b-9f93-430b-bb51-0f3a7dab1c8a" CreationDate="2023-05-19T20:16:30.223" UserId="28" Text="&gt; Is there a standard definition of when storage migrations are required?&#xD;&#xA;&#xD;&#xA;I believe the most concise answer to this is to consider your blockchain two separate parts that need to work together:&#xD;&#xA;&#xD;&#xA;- The logic of your chain (runtime)&#xD;&#xA;- The state of your chain (storage)&#xD;&#xA;&#xD;&#xA;If at any point these two parts become incompatible with one another, your chain is basically bricked.&#xD;&#xA;&#xD;&#xA;Thus, the question you need to ask yourself when upgrading the logic of your chain, is what expectations it has on the underlying storage available.&#xD;&#xA;&#xD;&#xA;For example, adding a new callable function (extrinsic) does not affect the behavior or layout of your storage, so no such storage migration is needed. Also, removing callable functions, or even entire modules has no impact. Adding new storage items, which will start empty also have no impact. There are a ton of things which can change in your runtime logic, which have no impact on storage, and thus needs no migration.&#xD;&#xA;&#xD;&#xA;One reason you might need to migrate storage is a change in the serialization of the storage, which can come from refactoring the layout of structures.&#xD;&#xA;&#xD;&#xA;For example, imagine something as simple as changing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct MyStruct&lt;T&gt; {&#xD;&#xA;    id: u32,&#xD;&#xA;    value: T::Balance,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Into:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct MyStruct&lt;T&gt; {&#xD;&#xA;    value: T::Balance,&#xD;&#xA;    id: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Nothing about the content or meaning of the struct has changed. In fact, the total encoded bytes of the object has stayed exactly the same, but the order of the items in the struct has flipped. This means, when the struct was originally put into storage, the first bits in the serialized form of the struct was the `id`, but after the logic change, it will try to parse those same bits as the `value`, and this will lead to problems. This actually won't brick your chain, as the encoded bytes will still fit perfectly, but you will end up totally misrepresenting the intended data.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;So ultimately the question you need to ask yourself is:&#xD;&#xA;&#xD;&#xA;**Did an upgrade to the logic change the assumptions about the underlying storage?**&#xD;&#xA;&#xD;&#xA;If yes, then you need a storage migration." ContentLicense="CC BY-SA 4.0" />
  <row Id="33643" PostHistoryTypeId="2" PostId="8568" RevisionGUID="6ccac35d-122c-47b2-806a-d24e992fdc4c" CreationDate="2023-05-19T23:39:33.120" UserId="4235" Text="is there any way to disconnect a wallet from the frontend? If not, why?&#xD;&#xA;&#xD;&#xA;    walletProvider.disable()" ContentLicense="CC BY-SA 4.0" />
  <row Id="33645" PostHistoryTypeId="1" PostId="8568" RevisionGUID="6ccac35d-122c-47b2-806a-d24e992fdc4c" CreationDate="2023-05-19T23:39:33.120" UserId="4235" Text="disconnect wallets programatically from the frontend side" ContentLicense="CC BY-SA 4.0" />
  <row Id="33646" PostHistoryTypeId="3" PostId="8568" RevisionGUID="6ccac35d-122c-47b2-806a-d24e992fdc4c" CreationDate="2023-05-19T23:39:33.120" UserId="4235" Text="|wallet|frontend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33650" PostHistoryTypeId="52" PostId="8563" RevisionGUID="71b3136b-7b36-4782-9d4e-efb74dbdd6d8" CreationDate="2023-05-20T02:58:29.063" />
  <row Id="33651" PostHistoryTypeId="2" PostId="8569" RevisionGUID="ea7c34e1-a8ce-4cb9-8aa7-044cc3e561fc" CreationDate="2023-05-20T05:43:39.937" UserId="4236" Text="When running Substrate-node-template - basically the Kitties - and with a callable eg create_kitty() as a dispatchableResult in the call pallet, what I assume to be an extrinsic in the metadata, this function is not returned by calling either state_getMetadata in javascript or the Polkadot js extrinsics. In fact, both show causeError() and do-something(). I have no idea where these methods come from and the actual callable method is not in the metadata at all. I really need clarification about what's going on here.Thanks. Kim" ContentLicense="CC BY-SA 4.0" />
  <row Id="33653" PostHistoryTypeId="1" PostId="8569" RevisionGUID="ea7c34e1-a8ce-4cb9-8aa7-044cc3e561fc" CreationDate="2023-05-20T05:43:39.937" UserId="4236" Text="Why doesn't getMetadata show my callable methods as extrinsics in Substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="33654" PostHistoryTypeId="3" PostId="8569" RevisionGUID="ea7c34e1-a8ce-4cb9-8aa7-044cc3e561fc" CreationDate="2023-05-20T05:43:39.937" UserId="4236" Text="|polkadot-js|substrate-node-template|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33655" PostHistoryTypeId="50" PostId="8160" RevisionGUID="ea72ed31-1568-44da-b539-6169efe6ea66" CreationDate="2023-05-20T09:06:55.820" UserId="-1" />
  <row Id="33656" PostHistoryTypeId="2" PostId="8570" RevisionGUID="724d20c2-616c-487a-b655-e4f664da309e" CreationDate="2023-05-20T14:44:24.477" UserId="1927" Text="Was going through documentation of Substrate. I came across transaction lifecycle. https://docs.substrate.io/learn/transaction-lifecycle/&#xD;&#xA;&#xD;&#xA;I'm confused about one line it which says&#xD;&#xA;&#xD;&#xA;&gt;  &quot;The transaction pool only deals with the validity of the transaction&#xD;&#xA;&gt; and the ordering of valid transactions placed in a transaction queue.&quot;&#xD;&#xA;&#xD;&#xA;This poses a question &#xD;&#xA;&#xD;&#xA;**Are transaction pool and transaction queue two different things?**&#xD;&#xA;&#xD;&#xA;If yes how are they related to each other?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33658" PostHistoryTypeId="1" PostId="8570" RevisionGUID="724d20c2-616c-487a-b655-e4f664da309e" CreationDate="2023-05-20T14:44:24.477" UserId="1927" Text="Are Transaction Pool and Transaction Queue the same thing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33659" PostHistoryTypeId="3" PostId="8570" RevisionGUID="724d20c2-616c-487a-b655-e4f664da309e" CreationDate="2023-05-20T14:44:24.477" UserId="1927" Text="|transactions|transaction-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33660" PostHistoryTypeId="2" PostId="8571" RevisionGUID="0b87b5f5-fa15-48fe-97d1-07b5bec934aa" CreationDate="2023-05-20T15:08:40.443" UserId="3319" Text="In order for transactions to be included in the transaction pool and finally be included in a block they need to be validated and they need to be in a place, that place is the transaction queue." ContentLicense="CC BY-SA 4.0" />
  <row Id="33662" PostHistoryTypeId="2" PostId="8572" RevisionGUID="ec6d2b3b-c8f6-4cc2-8ed0-0b72b9e0ad51" CreationDate="2023-05-20T16:25:44.700" UserId="1927" Text="This is intended behavior. &#xD;&#xA;&#xD;&#xA;Two major points to notice &#xD;&#xA;&#xD;&#xA;**1. It's optional dependency**&#xD;&#xA;```toml&#xD;&#xA;amiquip = { version = &quot;0.4&quot;, default-features = false, optional = true }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**2. It's will be part of target only when std feature is enabled**&#xD;&#xA;```toml&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&quot;codec/std&quot;, &quot;frame-benchmarking?/std&quot;,&#xD;&#xA; &quot;amiquip&quot;,&#xD;&#xA; &quot;frame-support/std&quot;, &#xD;&#xA; &quot;frame-system/std&quot;,&#xD;&#xA; &quot;scale-info/std&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What you actually need to do is something like&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	use amiquip;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please adjust your features and dependent features wisely.&#xD;&#xA;&#xD;&#xA;For more on cargo features refer https://doc.rust-lang.org/cargo/reference/features.html&#xD;&#xA;&#xD;&#xA;Hope it helps! &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33664" PostHistoryTypeId="5" PostId="8564" RevisionGUID="b3653ed3-19be-4113-a409-d7ff7b341029" CreationDate="2023-05-20T20:24:42.150" UserId="3850" Comment="deleted 263 characters in body" Text="[`_fallback`](https://github.com/Brushfam/openbrush-contracts/blob/a255c212debdace8b82f84cb104e84b716ccd6ac/contracts/src/upgradeability/diamond/diamond.rs#L193) method panics with the following error when attempting to execute a delegate call to the diamond facet contract:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-05-20 16:16:58.992 DEBUG tokio-runtime-worker runtime::contracts: Execution finished with debug buffer: panicked at 'could not properly decode storage entry', liquid-staking/contracts/staker_facet_v1/src/lib.rs:9:5&#xD;&#xA;panicked at 'delegate call to Some(Hash([46, 17, 244, 97, 239, 143, 12, 230, 177, 213, 29, 31, 98, 41, 120, 162, 191, 252, 0, 246, 27, 27, 11, 181, 169, 178, 84, 85, 242, 153, 54, 95])) failed due to CalleeTrapped', openbrush-contracts-4c291f7aab99c37d/13e82f3/contracts/src/upgradeability/diamond/diamond.rs:193:35&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am executing a [contract query](https://github.com/ok-Alice/liquid-staking/blob/diamond-pattern/scripts/include/contract-operations.ts#L98-L131) with the following [arguments](https://github.com/ok-Alice/liquid-staking/blob/diamond-pattern/scripts/deploy-diamond-and-facets.ts#L253-L261) utilizing PolkadotJS which calls the facet contract ink message [`pausable::paused`](https://github.com/ok-Alice/liquid-staking/blob/diamond-pattern/contracts/staker_facet_v1/src/lib.rs#LL47C21-L47C21). " ContentLicense="CC BY-SA 4.0" />
  <row Id="33665" PostHistoryTypeId="52" PostId="8570" RevisionGUID="aaaea444-6af7-41b3-a273-953e4ad8cac1" CreationDate="2023-05-21T01:28:58.707" />
  <row Id="33666" PostHistoryTypeId="2" PostId="8573" RevisionGUID="143d78bb-37ca-4b72-b47c-35ea62ee4c35" CreationDate="2023-05-21T07:10:12.247" UserId="3881" Text="causeError() and do-something() are extrinsics from the substrate-node-template. You can check it here https://github.com/substrate-developer-hub/substrate-node-template/blob/main/pallets/template/src/lib.rs, or at the same location in your local copy of the node.&#xD;&#xA;&#xD;&#xA;The kitties extrinsics are part of a different pallet, that should be located at the same pallets directory.&#xD;&#xA;&#xD;&#xA;So if the kitties pallets is added to the node you are using it should be showed via the polkadot js under kitties pallet and not the template pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="33668" PostHistoryTypeId="50" PostId="8203" RevisionGUID="f587de47-6fbe-460c-a6f0-92f2ab2aa9f7" CreationDate="2023-05-21T10:08:41.090" UserId="-1" />
  <row Id="33669" PostHistoryTypeId="2" PostId="8574" RevisionGUID="40001aae-9775-4549-ad3b-ab9872688747" CreationDate="2023-05-21T11:22:26.993" UserId="555" Text="I want to build a frontend for our local chain. how can we connect our local to chain to the frontend? " ContentLicense="CC BY-SA 4.0" />
  <row Id="33671" PostHistoryTypeId="1" PostId="8574" RevisionGUID="40001aae-9775-4549-ad3b-ab9872688747" CreationDate="2023-05-21T11:22:26.993" UserId="555" Text="How to connect the our local chain to the frontend?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33672" PostHistoryTypeId="3" PostId="8574" RevisionGUID="40001aae-9775-4549-ad3b-ab9872688747" CreationDate="2023-05-21T11:22:26.993" UserId="555" Text="|polkadot-js|api|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33673" PostHistoryTypeId="2" PostId="8575" RevisionGUID="1a8072a8-9bb1-4e08-97cc-9c4ad7f678f6" CreationDate="2023-05-21T12:23:41.527" UserId="1950" Text="I have the following Subtrate runtime configuration &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.&#xD;&#xA;#![recursion_limit = &quot;256&quot;]&#xD;&#xA;&#xD;&#xA;// Make the WASM binary available.&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/wasm_binary.rs&quot;));&#xD;&#xA;&#xD;&#xA;use pallet_grandpa::{&#xD;&#xA;	fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList,&#xD;&#xA;};&#xD;&#xA;use primitives::{&#xD;&#xA;	types::{CollectionType, NftPermissions},&#xD;&#xA;	CollectionId, ItemId,&#xD;&#xA;};&#xD;&#xA;use sp_api::impl_runtime_apis;&#xD;&#xA;use sp_consensus_aura::sr25519::AuthorityId as AuraId;&#xD;&#xA;use sp_core::{crypto::KeyTypeId, OpaqueMetadata};&#xD;&#xA;use sp_runtime::{&#xD;&#xA;	create_runtime_str, generic, impl_opaque_keys,&#xD;&#xA;	traits::{&#xD;&#xA;		AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, NumberFor, One, Verify,&#xD;&#xA;	},&#xD;&#xA;	transaction_validity::{TransactionSource, TransactionValidity},&#xD;&#xA;	ApplyExtrinsicResult, MultiSignature,&#xD;&#xA;};&#xD;&#xA;use sp_std::prelude::*;&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;use sp_version::NativeVersion;&#xD;&#xA;use sp_version::RuntimeVersion;&#xD;&#xA;&#xD;&#xA;// A few exports that help ease life for downstream crates.&#xD;&#xA;use frame_support::traits::{EitherOfDiverse, EqualPrivilegeOnly};&#xD;&#xA;pub use frame_support::{&#xD;&#xA;	construct_runtime, parameter_types,&#xD;&#xA;	traits::{&#xD;&#xA;		AsEnsureOriginWithArg, ConstU128, ConstU32, ConstU64, ConstU8, KeyOwnerProofSystem,&#xD;&#xA;		Randomness, StorageInfo,&#xD;&#xA;	},&#xD;&#xA;	weights::{&#xD;&#xA;		constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},&#xD;&#xA;		IdentityFee, Weight,&#xD;&#xA;	},&#xD;&#xA;	StorageValue,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;pub use frame_system::Call as SystemCall;&#xD;&#xA;use frame_system::{EnsureRoot, EnsureSigned};&#xD;&#xA;&#xD;&#xA;pub use pallet_balances::Call as BalancesCall;&#xD;&#xA;pub use pallet_timestamp::Call as TimestampCall;&#xD;&#xA;use pallet_transaction_payment::{ConstFeeMultiplier, CurrencyAdapter, Multiplier};&#xD;&#xA;use sp_runtime::traits::OpaqueKeys;&#xD;&#xA;#[cfg(any(feature = &quot;std&quot;, test))]&#xD;&#xA;pub use sp_runtime::BuildStorage;&#xD;&#xA;pub use sp_runtime::{Perbill, Permill};&#xD;&#xA;&#xD;&#xA;pub use pallet_collective;&#xD;&#xA;pub use pallet_rogan;&#xD;&#xA;pub use pallet_rogan_pepa;&#xD;&#xA;pub use pallet_nft;&#xD;&#xA;pub use pallet_session;&#xD;&#xA;pub use pallet_validator_set;&#xD;&#xA;&#xD;&#xA;/// An index to a block.&#xD;&#xA;pub type BlockNumber = u32;&#xD;&#xA;&#xD;&#xA;/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.&#xD;&#xA;pub type Signature = MultiSignature;&#xD;&#xA;&#xD;&#xA;/// Some way of identifying an account on the chain. We intentionally make it equivalent&#xD;&#xA;/// to the public key of our transaction signing scheme.&#xD;&#xA;pub type AccountId = &lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;&#xD;&#xA;&#xD;&#xA;/// Balance of an account.&#xD;&#xA;pub type Balance = u128;&#xD;&#xA;&#xD;&#xA;/// Index of a transaction in the chain.&#xD;&#xA;pub type Index = u32;&#xD;&#xA;&#xD;&#xA;/// A hash of some data used by the chain.&#xD;&#xA;pub type Hash = sp_core::H256;&#xD;&#xA;&#xD;&#xA;/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know&#xD;&#xA;/// the specifics of the runtime. They can then be made to be agnostic over specific formats&#xD;&#xA;/// of data like extrinsics, allowing for them to continue syncing the network through upgrades&#xD;&#xA;/// to even the core data structures.&#xD;&#xA;pub mod opaque {&#xD;&#xA;	use super::*;&#xD;&#xA;&#xD;&#xA;	pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;&#xD;&#xA;&#xD;&#xA;	/// Opaque block header type.&#xD;&#xA;	pub type Header = generic::Header&lt;BlockNumber, BlakeTwo256&gt;;&#xD;&#xA;	/// Opaque block type.&#xD;&#xA;	pub type Block = generic::Block&lt;Header, UncheckedExtrinsic&gt;;&#xD;&#xA;	/// Opaque block identifier type.&#xD;&#xA;	pub type BlockId = generic::BlockId&lt;Block&gt;;&#xD;&#xA;&#xD;&#xA;	impl_opaque_keys! {&#xD;&#xA;		pub struct SessionKeys {&#xD;&#xA;			pub aura: Aura,&#xD;&#xA;			pub grandpa: Grandpa,&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;pub mod constants;&#xD;&#xA;use constants::currency::*;&#xD;&#xA;&#xD;&#xA;// To learn more about runtime versioning, see:&#xD;&#xA;// https://docs.substrate.io/main-docs/build/upgrade#runtime-versioning&#xD;&#xA;#[sp_version::runtime_version]&#xD;&#xA;pub const VERSION: RuntimeVersion = RuntimeVersion {&#xD;&#xA;	spec_name: create_runtime_str!(&quot;node-rogan&quot;),&#xD;&#xA;	impl_name: create_runtime_str!(&quot;node-rogan&quot;),&#xD;&#xA;	authoring_version: 1,&#xD;&#xA;	spec_version: 104,&#xD;&#xA;	impl_version: 1,&#xD;&#xA;	apis: RUNTIME_API_VERSIONS,&#xD;&#xA;	transaction_version: 1,&#xD;&#xA;	state_version: 1,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;/// This determines the average expected block time that we are targeting.&#xD;&#xA;/// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`.&#xD;&#xA;/// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked&#xD;&#xA;/// up by `pallet_aura` to implement `fn slot_duration()`.&#xD;&#xA;///&#xD;&#xA;/// Change this to adjust the block time.&#xD;&#xA;pub const MILLISECS_PER_BLOCK: u64 = 12000;&#xD;&#xA;&#xD;&#xA;// NOTE: Currently it is not possible to change the slot duration after the chain has started.&#xD;&#xA;//       Attempting to do so will brick block production.&#xD;&#xA;pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;&#xD;&#xA;&#xD;&#xA;// Time is measured by number of blocks.&#xD;&#xA;pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);&#xD;&#xA;pub const HOURS: BlockNumber = MINUTES * 60;&#xD;&#xA;pub const DAYS: BlockNumber = HOURS * 24;&#xD;&#xA;&#xD;&#xA;/// The version information used to identify this runtime when compiled natively.&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;pub fn native_version() -&gt; NativeVersion {&#xD;&#xA;	NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const BlockHashCount: BlockNumber = 2400;&#xD;&#xA;	pub const Version: RuntimeVersion = VERSION;&#xD;&#xA;	/// We allow for 2 seconds of compute with a 6 second average block time.&#xD;&#xA;	pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights&#xD;&#xA;		::with_sensible_defaults(2u64 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO);&#xD;&#xA;	pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength&#xD;&#xA;		::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);&#xD;&#xA;	pub const SS58Prefix: u8 = 42;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Configure FRAME pallets to include in runtime.&#xD;&#xA;&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;	/// The basic call filter to use in dispatchable.&#xD;&#xA;	type BaseCallFilter = frame_support::traits::Everything;&#xD;&#xA;	/// Block &amp; extrinsics weights: base values and limits.&#xD;&#xA;	type BlockWeights = BlockWeights;&#xD;&#xA;	/// The maximum length of a block (in bytes).&#xD;&#xA;	type BlockLength = BlockLength;&#xD;&#xA;	/// The ubiquitous origin type.&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	/// The aggregated dispatch type that is available for extrinsics.&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	/// The index type for storing how many extrinsics an account has signed.&#xD;&#xA;	type Index = Index;&#xD;&#xA;	/// The index type for blocks.&#xD;&#xA;	type BlockNumber = BlockNumber;&#xD;&#xA;	/// The type for hashing blocks and tries.&#xD;&#xA;	type Hash = Hash;&#xD;&#xA;	/// The hashing algorithm used.&#xD;&#xA;	type Hashing = BlakeTwo256;&#xD;&#xA;	/// The identifier used to distinguish between accounts.&#xD;&#xA;	type AccountId = AccountId;&#xD;&#xA;	/// The lookup mechanism to get account ID from whatever is passed in dispatchers.&#xD;&#xA;	type Lookup = AccountIdLookup&lt;AccountId, ()&gt;;&#xD;&#xA;	/// The header type.&#xD;&#xA;	type Header = generic::Header&lt;BlockNumber, BlakeTwo256&gt;;&#xD;&#xA;	/// The ubiquitous event type.&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	/// Maximum number of block number to block hash mappings to keep (oldest pruned first).&#xD;&#xA;	type BlockHashCount = BlockHashCount;&#xD;&#xA;	/// The weight of database operations that the runtime can invoke.&#xD;&#xA;	type DbWeight = RocksDbWeight;&#xD;&#xA;	/// Version of the runtime.&#xD;&#xA;	type Version = Version;&#xD;&#xA;	/// Converts a module to the index of the module in `construct_runtime!`.&#xD;&#xA;	///&#xD;&#xA;	/// This type is being generated by `construct_runtime!`.&#xD;&#xA;	type PalletInfo = PalletInfo;&#xD;&#xA;	/// The data to be stored in an account.&#xD;&#xA;	type AccountData = pallet_balances::AccountData&lt;Balance&gt;;&#xD;&#xA;	/// What to do if a new account is created.&#xD;&#xA;	type OnNewAccount = ();&#xD;&#xA;	/// What to do if an account is fully reaped from the system.&#xD;&#xA;	type OnKilledAccount = ();&#xD;&#xA;	/// Weight information for the extrinsics of this pallet.&#xD;&#xA;	type SystemWeightInfo = ();&#xD;&#xA;	/// This is used as an identifier of the chain. 42 is the generic substrate prefix.&#xD;&#xA;	type SS58Prefix = SS58Prefix;&#xD;&#xA;	/// The set code logic, just the default since we're not a parachain.&#xD;&#xA;	type OnSetCode = ();&#xD;&#xA;	type MaxConsumers = frame_support::traits::ConstU32&lt;16&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_randomness_collective_flip::Config for Runtime {}&#xD;&#xA;&#xD;&#xA;impl pallet_aura::Config for Runtime {&#xD;&#xA;	type AuthorityId = AuraId;&#xD;&#xA;	type MaxAuthorities = ConstU32&lt;32&gt;;&#xD;&#xA;	type DisabledValidators = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_grandpa::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;&#xD;&#xA;	type KeyOwnerProof =&#xD;&#xA;		&lt;Self::KeyOwnerProofSystem as KeyOwnerProofSystem&lt;(KeyTypeId, GrandpaId)&gt;&gt;::Proof;&#xD;&#xA;&#xD;&#xA;	type KeyOwnerIdentification = &lt;Self::KeyOwnerProofSystem as KeyOwnerProofSystem&lt;(&#xD;&#xA;		KeyTypeId,&#xD;&#xA;		GrandpaId,&#xD;&#xA;	)&gt;&gt;::IdentificationTuple;&#xD;&#xA;&#xD;&#xA;	type KeyOwnerProofSystem = ();&#xD;&#xA;&#xD;&#xA;	type HandleEquivocation = ();&#xD;&#xA;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type MaxAuthorities = ConstU32&lt;32&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_timestamp::Config for Runtime {&#xD;&#xA;	/// A timestamp: milliseconds since the unix epoch.&#xD;&#xA;	type Moment = u64;&#xD;&#xA;	type OnTimestampSet = Aura;&#xD;&#xA;	type MinimumPeriod = ConstU64&lt;{ SLOT_DURATION / 2 }&gt;;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Existential deposit.&#xD;&#xA;pub const EXISTENTIAL_DEPOSIT: u128 = 600;&#xD;&#xA;&#xD;&#xA;impl pallet_balances::Config for Runtime {&#xD;&#xA;	/// The type for recording an account's balance.&#xD;&#xA;	type Balance = Balance;&#xD;&#xA;	type DustRemoval = ();&#xD;&#xA;	/// The ubiquitous event type.&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type ExistentialDeposit = ConstU128&lt;EXISTENTIAL_DEPOSIT&gt;;&#xD;&#xA;	type AccountStore = System;&#xD;&#xA;	type WeightInfo = pallet_balances::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;	type MaxLocks = ConstU32&lt;50&gt;;&#xD;&#xA;	type MaxReserves = ();&#xD;&#xA;	type ReserveIdentifier = [u8; 8];&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub FeeMultiplier: Multiplier = Multiplier::one();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;5&gt;;&#xD;&#xA;	type WeightToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ConstFeeMultiplier&lt;FeeMultiplier&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_sudo::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const MinimumOfferAmount: Balance = UNITS / 100;&#xD;&#xA;	pub const RoyaltyBondAmount: Balance = 0;&#xD;&#xA;	pub ReserveCollectionIdUpTo: u128 = 999_999;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_nft::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type WeightInfo = pallet_nft::weights::NFTWeight&lt;Runtime&gt;;&#xD;&#xA;	type MinimumOfferAmount = MinimumOfferAmount;&#xD;&#xA;	type RoyaltyBondAmount = RoyaltyBondAmount;&#xD;&#xA;	type NftCollectionId = CollectionId;&#xD;&#xA;	type NftItemId = ItemId;&#xD;&#xA;	type CollectionType = CollectionType;&#xD;&#xA;	type Permissions = NftPermissions;&#xD;&#xA;	type ReserveCollectionIdUpTo = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;impl pallet_rogan::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type ExternalOrigin = RootOrAtLeastHalfOfCommittee;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const CollectionDeposit: Balance = 10 * CENTS;&#xD;&#xA;	pub const ItemDeposit: Balance = DOLLARS;&#xD;&#xA;	pub const KeyLimit: u32 = 32;&#xD;&#xA;	pub const ValueLimit: u32 = 256;&#xD;&#xA;	pub const UniquesMetadataDepositBase: Balance = 10 * CENTS;&#xD;&#xA;	pub const AttributeDepositBase: Balance = 10 * CENTS;&#xD;&#xA;	pub const DepositPerByte: Balance = CENTS;&#xD;&#xA;	pub const UniquesStringLimit: u32 = 128;&#xD;&#xA;	pub const MaxPropertiesPerTheme: u32 = 100;&#xD;&#xA;	pub const MaxCollectionsEquippablePerPart: u32 = 100;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_uniques::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type CollectionId = u32;&#xD;&#xA;	type ItemId = u32;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type ForceOrigin = frame_system::EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type CreateOrigin = AsEnsureOriginWithArg&lt;EnsureSigned&lt;AccountId&gt;&gt;;&#xD;&#xA;	type Locker = ();&#xD;&#xA;	type CollectionDeposit = CollectionDeposit;&#xD;&#xA;	type ItemDeposit = ItemDeposit;&#xD;&#xA;	type MetadataDepositBase = UniquesMetadataDepositBase;&#xD;&#xA;	type AttributeDepositBase = AttributeDepositBase;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type StringLimit = UniquesStringLimit;&#xD;&#xA;	type KeyLimit = KeyLimit;&#xD;&#xA;	type ValueLimit = ValueLimit;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const MaxMetadataSize: u32 = 2048;&#xD;&#xA;	pub const MaxDIDsPerAccount: u32 = 100;&#xD;&#xA;	pub const PublicKeySize: u32 = 128;&#xD;&#xA;	pub const VCFingerPrintSize: u32 = 32;&#xD;&#xA;	pub const DIDURISize: u32 = 57;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_rogan_pepa::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type MetadataSize = MaxMetadataSize;&#xD;&#xA;	type MaxDIDsPerAccount = MaxDIDsPerAccount;&#xD;&#xA;	type PublicKeySize = PublicKeySize;&#xD;&#xA;	type VCFingerPrintSize = VCFingerPrintSize;&#xD;&#xA;	type DIDURISize = DIDURISize;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const CouncilMotionDuration: BlockNumber = 2 * MINUTES;&#xD;&#xA;	pub const CouncilMaxProposals: u32 = 10;&#xD;&#xA;	pub const CouncilMaxMembers: u32 = 5;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type TechnicalCollective = pallet_collective::Instance1;&#xD;&#xA;&#xD;&#xA;impl pallet_collective::Config&lt;TechnicalCollective&gt; for Runtime {&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	type Proposal = RuntimeCall;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type MotionDuration = CouncilMotionDuration;&#xD;&#xA;	type MaxProposals = CouncilMaxProposals;&#xD;&#xA;	type MaxMembers = CouncilMaxMembers;&#xD;&#xA;	type DefaultVote = pallet_collective::PrimeDefaultVote;&#xD;&#xA;	type WeightInfo = pallet_collective::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const Period: u32 = 2 * MINUTES;&#xD;&#xA;	pub const Offset: u32 = 0;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_session::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type ValidatorId = &lt;Self as frame_system::Config&gt;::AccountId;&#xD;&#xA;	type ValidatorIdOf = pallet_validator_set::ValidatorOf&lt;Self&gt;;&#xD;&#xA;	type ShouldEndSession = pallet_session::PeriodicSessions&lt;Period, Offset&gt;;&#xD;&#xA;	type NextSessionRotation = pallet_session::PeriodicSessions&lt;Period, Offset&gt;;&#xD;&#xA;	type SessionManager = ValidatorSet;&#xD;&#xA;	type SessionHandler = &lt;opaque::SessionKeys as OpaqueKeys&gt;::KeyTypeIdProviders;&#xD;&#xA;	type Keys = opaque::SessionKeys;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const PreimageMaxSize: u32 = 4096 * 1024;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_preimage::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type ManagerOrigin = RootOrAtLeastHalfOfCommittee;&#xD;&#xA;	type MaxSize = PreimageMaxSize;&#xD;&#xA;	type BaseDeposit = ();&#xD;&#xA;	type ByteDeposit = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) *&#xD;&#xA;	BlockWeights::get().max_block;&#xD;&#xA;	pub const MaxScheduledPerBlock: u32 = 50;&#xD;&#xA;	pub const NoPreimagePostponement: Option&lt;u32&gt; = Some(10);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_scheduler::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	type PalletsOrigin = OriginCaller;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	type MaximumWeight = MaximumSchedulerWeight;&#xD;&#xA;	type ScheduleOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type OriginPrivilegeCmp = frame_support::traits::EqualPrivilegeOnly;&#xD;&#xA;	type MaxScheduledPerBlock = MaxScheduledPerBlock;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type PreimageProvider = ();&#xD;&#xA;	type NoPreimagePostponement = NoPreimagePostponement;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const MinAuthorities: u32 = 2;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;type EnsureRootOrHalfCouncil = EitherOfDiverse&lt;&#xD;&#xA;	EnsureRoot&lt;AccountId&gt;,&#xD;&#xA;	pallet_collective::EnsureProportionMoreThan&lt;AccountId, TechnicalCollective, 1, 2&gt;,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;type RootOrAtLeastHalfOfCommittee = EitherOfDiverse&lt;&#xD;&#xA;	EnsureRoot&lt;AccountId&gt;,&#xD;&#xA;	pallet_collective::EnsureProportionAtLeast&lt;AccountId, TechnicalCollective, 1, 2&gt;,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;impl pallet_validator_set::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	// see readme for type declaration&#xD;&#xA;	type AddRemoveOrigin = EnsureRootOrHalfCouncil;&#xD;&#xA;	type MinAuthorities = MinAuthorities;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Create the runtime by composing the FRAME pallets that were previously configured.&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub struct Runtime&#xD;&#xA;	where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = opaque::Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		RandomnessCollectiveFlip: pallet_randomness_collective_flip,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;&#xD;&#xA;		ValidatorSet: pallet_validator_set,&#xD;&#xA;		Session: pallet_session,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;&#xD;&#xA;		ROGANCouncil: pallet_collective::&lt;Instance1&gt;,&#xD;&#xA;&#xD;&#xA;		ROGAN: pallet_rogan,&#xD;&#xA;		NFT: pallet_nft,&#xD;&#xA;		Uniques: pallet_uniques::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		Scheduler: pallet_scheduler,&#xD;&#xA;&#xD;&#xA;		Preimage: pallet_preimage,&#xD;&#xA;&#xD;&#xA;		ROGANDID: pallet_rogan_pepa::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;/// The address format for describing accounts.&#xD;&#xA;pub type Address = sp_runtime::MultiAddress&lt;AccountId, ()&gt;;&#xD;&#xA;/// Block header type as expected by this runtime.&#xD;&#xA;pub type Header = generic::Header&lt;BlockNumber, BlakeTwo256&gt;;&#xD;&#xA;/// Block type as expected by this runtime.&#xD;&#xA;pub type Block = generic::Block&lt;Header, UncheckedExtrinsic&gt;;&#xD;&#xA;/// The SignedExtension to the basic transaction logic.&#xD;&#xA;pub type SignedExtra = (&#xD;&#xA;	frame_system::CheckNonZeroSender&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckSpecVersion&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckTxVersion&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckGenesis&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckEra&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckNonce&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckWeight&lt;Runtime&gt;,&#xD;&#xA;	pallet_transaction_payment::ChargeTransactionPayment&lt;Runtime&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;/// Unchecked extrinsic type as expected by this runtime.&#xD;&#xA;pub type UncheckedExtrinsic =&#xD;&#xA;	generic::UncheckedExtrinsic&lt;Address, RuntimeCall, Signature, SignedExtra&gt;;&#xD;&#xA;/// The payload being signed in transactions.&#xD;&#xA;pub type SignedPayload = generic::SignedPayload&lt;RuntimeCall, SignedExtra&gt;;&#xD;&#xA;/// Executive: handles dispatch to the various modules.&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;#[macro_use]&#xD;&#xA;extern crate frame_benchmarking;&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benches {&#xD;&#xA;	define_benchmarks!(&#xD;&#xA;		[frame_benchmarking, BaselineBench::&lt;Runtime&gt;]&#xD;&#xA;		[frame_system, SystemBench::&lt;Runtime&gt;]&#xD;&#xA;		[pallet_balances, Balances]&#xD;&#xA;		[pallet_timestamp, Timestamp]&#xD;&#xA;		[pallet_rogan, ROGAN]&#xD;&#xA;		[pallet_nft, NFT]&#xD;&#xA;		[pallet_validator_set, ValidatorSet]&#xD;&#xA;		[pallet_collective, ROGANCouncil]&#xD;&#xA;		[pallet_rogan_pepa, ROGANPEPA]&#xD;&#xA;&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl_runtime_apis! {&#xD;&#xA;	impl sp_api::Core&lt;Block&gt; for Runtime {&#xD;&#xA;		fn version() -&gt; RuntimeVersion {&#xD;&#xA;			VERSION&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn execute_block(block: Block) {&#xD;&#xA;			Executive::execute_block(block);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn initialize_block(header: &amp;&lt;Block as BlockT&gt;::Header) {&#xD;&#xA;			Executive::initialize_block(header)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl sp_api::Metadata&lt;Block&gt; for Runtime {&#xD;&#xA;		fn metadata() -&gt; OpaqueMetadata {&#xD;&#xA;			OpaqueMetadata::new(Runtime::metadata().into())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl sp_block_builder::BlockBuilder&lt;Block&gt; for Runtime {&#xD;&#xA;		fn apply_extrinsic(extrinsic: &lt;Block as BlockT&gt;::Extrinsic) -&gt; ApplyExtrinsicResult {&#xD;&#xA;			Executive::apply_extrinsic(extrinsic)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn finalize_block() -&gt; &lt;Block as BlockT&gt;::Header {&#xD;&#xA;			Executive::finalize_block()&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn inherent_extrinsics(data: sp_inherents::InherentData) -&gt; Vec&lt;&lt;Block as BlockT&gt;::Extrinsic&gt; {&#xD;&#xA;			data.create_extrinsics()&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn check_inherents(&#xD;&#xA;			block: Block,&#xD;&#xA;			data: sp_inherents::InherentData,&#xD;&#xA;		) -&gt; sp_inherents::CheckInherentsResult {&#xD;&#xA;			data.check_extrinsics(&amp;block)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl sp_transaction_pool::runtime_api::TaggedTransactionQueue&lt;Block&gt; for Runtime {&#xD;&#xA;		fn validate_transaction(&#xD;&#xA;			source: TransactionSource,&#xD;&#xA;			tx: &lt;Block as BlockT&gt;::Extrinsic,&#xD;&#xA;			block_hash: &lt;Block as BlockT&gt;::Hash,&#xD;&#xA;		) -&gt; TransactionValidity {&#xD;&#xA;			Executive::validate_transaction(source, tx, block_hash)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl sp_offchain::OffchainWorkerApi&lt;Block&gt; for Runtime {&#xD;&#xA;		fn offchain_worker(header: &amp;&lt;Block as BlockT&gt;::Header) {&#xD;&#xA;			Executive::offchain_worker(header)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl sp_consensus_aura::AuraApi&lt;Block, AuraId&gt; for Runtime {&#xD;&#xA;		fn slot_duration() -&gt; sp_consensus_aura::SlotDuration {&#xD;&#xA;			sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn authorities() -&gt; Vec&lt;AuraId&gt; {&#xD;&#xA;			Aura::authorities().into_inner()&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl sp_session::SessionKeys&lt;Block&gt; for Runtime {&#xD;&#xA;		fn generate_session_keys(seed: Option&lt;Vec&lt;u8&gt;&gt;) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;			opaque::SessionKeys::generate(seed)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn decode_session_keys(&#xD;&#xA;			encoded: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; Option&lt;Vec&lt;(Vec&lt;u8&gt;, KeyTypeId)&gt;&gt; {&#xD;&#xA;			opaque::SessionKeys::decode_into_raw_public_keys(&amp;encoded)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl fg_primitives::GrandpaApi&lt;Block&gt; for Runtime {&#xD;&#xA;		fn grandpa_authorities() -&gt; GrandpaAuthorityList {&#xD;&#xA;			Grandpa::grandpa_authorities()&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn current_set_id() -&gt; fg_primitives::SetId {&#xD;&#xA;			Grandpa::current_set_id()&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn submit_report_equivocation_unsigned_extrinsic(&#xD;&#xA;			_equivocation_proof: fg_primitives::EquivocationProof&lt;&#xD;&#xA;				&lt;Block as BlockT&gt;::Hash,&#xD;&#xA;				NumberFor&lt;Block&gt;,&#xD;&#xA;			&gt;,&#xD;&#xA;			_key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof,&#xD;&#xA;		) -&gt; Option&lt;()&gt; {&#xD;&#xA;			None&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn generate_key_ownership_proof(&#xD;&#xA;			_set_id: fg_primitives::SetId,&#xD;&#xA;			_authority_id: GrandpaId,&#xD;&#xA;		) -&gt; Option&lt;fg_primitives::OpaqueKeyOwnershipProof&gt; {&#xD;&#xA;			// NOTE: this is the only implementation possible since we've&#xD;&#xA;			// defined our key owner proof type as a bottom type (i.e. a type&#xD;&#xA;			// with no values).&#xD;&#xA;			None&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl frame_system_rpc_runtime_api::AccountNonceApi&lt;Block, AccountId, Index&gt; for Runtime {&#xD;&#xA;		fn account_nonce(account: AccountId) -&gt; Index {&#xD;&#xA;			System::account_nonce(account)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi&lt;Block, Balance&gt; for Runtime {&#xD;&#xA;		fn query_info(&#xD;&#xA;			uxt: &lt;Block as BlockT&gt;::Extrinsic,&#xD;&#xA;			len: u32,&#xD;&#xA;		) -&gt; pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo&lt;Balance&gt; {&#xD;&#xA;			TransactionPayment::query_info(uxt, len)&#xD;&#xA;		}&#xD;&#xA;		fn query_fee_details(&#xD;&#xA;			uxt: &lt;Block as BlockT&gt;::Extrinsic,&#xD;&#xA;			len: u32,&#xD;&#xA;		) -&gt; pallet_transaction_payment::FeeDetails&lt;Balance&gt; {&#xD;&#xA;			TransactionPayment::query_fee_details(uxt, len)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi&lt;Block, Balance, RuntimeCall&gt;&#xD;&#xA;		for Runtime&#xD;&#xA;	{&#xD;&#xA;		fn query_call_info(&#xD;&#xA;			call: RuntimeCall,&#xD;&#xA;			len: u32,&#xD;&#xA;		) -&gt; pallet_transaction_payment::RuntimeDispatchInfo&lt;Balance&gt; {&#xD;&#xA;			TransactionPayment::query_call_info(call, len)&#xD;&#xA;		}&#xD;&#xA;		fn query_call_fee_details(&#xD;&#xA;			call: RuntimeCall,&#xD;&#xA;			len: u32,&#xD;&#xA;		) -&gt; pallet_transaction_payment::FeeDetails&lt;Balance&gt; {&#xD;&#xA;			TransactionPayment::query_call_fee_details(call, len)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	impl frame_benchmarking::Benchmark&lt;Block&gt; for Runtime {&#xD;&#xA;		fn benchmark_metadata(extra: bool) -&gt; (&#xD;&#xA;			Vec&lt;frame_benchmarking::BenchmarkList&gt;,&#xD;&#xA;			Vec&lt;frame_support::traits::StorageInfo&gt;,&#xD;&#xA;		) {&#xD;&#xA;			use frame_benchmarking::{baseline, Benchmarking, BenchmarkList};&#xD;&#xA;			use frame_support::traits::StorageInfoTrait;&#xD;&#xA;			use frame_system_benchmarking::Pallet as SystemBench;&#xD;&#xA;			use baseline::Pallet as BaselineBench;&#xD;&#xA;&#xD;&#xA;			let mut list = Vec::&lt;BenchmarkList&gt;::new();&#xD;&#xA;			list_benchmarks!(list, extra);&#xD;&#xA;&#xD;&#xA;			let storage_info = AllPalletsWithSystem::storage_info();&#xD;&#xA;&#xD;&#xA;			(list, storage_info)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn dispatch_benchmark(&#xD;&#xA;			config: frame_benchmarking::BenchmarkConfig&#xD;&#xA;		) -&gt; Result&lt;Vec&lt;frame_benchmarking::BenchmarkBatch&gt;, sp_runtime::RuntimeString&gt; {&#xD;&#xA;			use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch, TrackedStorageKey};&#xD;&#xA;&#xD;&#xA;			use frame_system_benchmarking::Pallet as SystemBench;&#xD;&#xA;			use baseline::Pallet as BaselineBench;&#xD;&#xA;&#xD;&#xA;			impl frame_system_benchmarking::Config for Runtime {}&#xD;&#xA;			impl baseline::Config for Runtime {}&#xD;&#xA;&#xD;&#xA;			use frame_support::traits::WhitelistedStorageKeys;&#xD;&#xA;			let whitelist: Vec&lt;TrackedStorageKey&gt; = AllPalletsWithSystem::whitelisted_storage_keys();&#xD;&#xA;&#xD;&#xA;			let mut batches = Vec::&lt;BenchmarkBatch&gt;::new();&#xD;&#xA;			let params = (&amp;config, &amp;whitelist);&#xD;&#xA;			add_benchmarks!(params, batches);&#xD;&#xA;&#xD;&#xA;			Ok(batches)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	impl frame_try_runtime::TryRuntime&lt;Block&gt; for Runtime {&#xD;&#xA;		fn on_runtime_upgrade() -&gt; (Weight, Weight) {&#xD;&#xA;			// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to&#xD;&#xA;			// have a backtrace here. If any of the pre/post migration checks fail, we shall stop&#xD;&#xA;			// right here and right now.&#xD;&#xA;			let weight = Executive::try_runtime_upgrade().unwrap();&#xD;&#xA;			(weight, BlockWeights::get().max_block)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn execute_block(&#xD;&#xA;			block: Block,&#xD;&#xA;			state_root_check: bool,&#xD;&#xA;			select: frame_try_runtime::TryStateSelect&#xD;&#xA;		) -&gt; Weight {&#xD;&#xA;			// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to&#xD;&#xA;			// have a backtrace here.&#xD;&#xA;			Executive::try_execute_block(block, state_root_check, select).expect(&quot;execute-block failed&quot;)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_support::traits::WhitelistedStorageKeys;&#xD;&#xA;	use sp_core::hexdisplay::HexDisplay;&#xD;&#xA;	use std::collections::HashSet;&#xD;&#xA;&#xD;&#xA;	#[test]&#xD;&#xA;	fn check_whitelist() {&#xD;&#xA;		let whitelist: HashSet&lt;String&gt; = AllPalletsWithSystem::whitelisted_storage_keys()&#xD;&#xA;			.iter()&#xD;&#xA;			.map(|e| HexDisplay::from(&amp;e.key).to_string())&#xD;&#xA;			.collect();&#xD;&#xA;&#xD;&#xA;		// Block Number&#xD;&#xA;		assert!(&#xD;&#xA;			whitelist.contains(&quot;26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac&quot;)&#xD;&#xA;		);&#xD;&#xA;		// Total Issuance&#xD;&#xA;		assert!(&#xD;&#xA;			whitelist.contains(&quot;c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80&quot;)&#xD;&#xA;		);&#xD;&#xA;		// Execution Phase&#xD;&#xA;		assert!(&#xD;&#xA;			whitelist.contains(&quot;26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a&quot;)&#xD;&#xA;		);&#xD;&#xA;		// Event Count&#xD;&#xA;		assert!(&#xD;&#xA;			whitelist.contains(&quot;26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850&quot;)&#xD;&#xA;		);&#xD;&#xA;		// System Events&#xD;&#xA;		assert!(&#xD;&#xA;			whitelist.contains(&quot;26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7&quot;)&#xD;&#xA;		);&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have configured the governance as `ROGANCouncil` &#xD;&#xA;&#xD;&#xA;But this is not appearing on PolkadotJS Technical Committee tab and Im unable tp create motions. How to fix this issue ? It only shows `preimage` in Governance&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;and how to create a motion and execute extinsics?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/i8VWY.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/pcI1c.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33675" PostHistoryTypeId="1" PostId="8575" RevisionGUID="1a8072a8-9bb1-4e08-97cc-9c4ad7f678f6" CreationDate="2023-05-21T12:23:41.527" UserId="1950" Text="Created technical committee Rogan Council does not appear in PolkadotJS app's Governance tab and unable to create a motion" ContentLicense="CC BY-SA 4.0" />
  <row Id="33676" PostHistoryTypeId="3" PostId="8575" RevisionGUID="1a8072a8-9bb1-4e08-97cc-9c4ad7f678f6" CreationDate="2023-05-21T12:23:41.527" UserId="1950" Text="|governance|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33677" PostHistoryTypeId="2" PostId="8576" RevisionGUID="d93158c6-7c28-42b5-80d9-310fd8580b7d" CreationDate="2023-05-21T13:02:26.707" UserId="3319" Text="you can start with https://polkadot.js.org/docs/api &#xD;&#xA;&#xD;&#xA;&gt; The API provides application developers the ability to query a node&#xD;&#xA;&gt; and interact with the Polkadot or Substrate chains using Javascript." ContentLicense="CC BY-SA 4.0" />
  <row Id="33679" PostHistoryTypeId="2" PostId="8577" RevisionGUID="df4569a3-7171-47d0-90df-ceb70e61a3d9" CreationDate="2023-05-21T20:22:10.177" UserId="3088" Text="Let's imagine that we have some blacklist pallet that stores accounts that are restricted to make some calls. How do we implement origins filtering based on that blacklist?&#xD;&#xA;&#xD;&#xA;We could add corresponding logic to our own pallets, but it is not suitable for external pallets we use. We also could implement this (I guess) through adding `SignedExtension` but it is also an inappropriate solution.&#xD;&#xA;&#xD;&#xA;It would be nice to implement this as runtime-level logic similar to how we can filter calls with `system` pallet's `BaseCallFilter` and it would be great to be able to return custom error. What are the options? Maybe we could customize `RuntimeOrigin` or smt?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33681" PostHistoryTypeId="1" PostId="8577" RevisionGUID="df4569a3-7171-47d0-90df-ceb70e61a3d9" CreationDate="2023-05-21T20:22:10.177" UserId="3088" Text="How to filter extrinsics senders?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33682" PostHistoryTypeId="3" PostId="8577" RevisionGUID="df4569a3-7171-47d0-90df-ceb70e61a3d9" CreationDate="2023-05-21T20:22:10.177" UserId="3088" Text="|runtime|account|origin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33683" PostHistoryTypeId="2" PostId="8578" RevisionGUID="480ca56c-0a0e-4fcf-ae82-c29cb1144956" CreationDate="2023-05-22T00:20:44.763" UserId="19" Text="I try to solve Rust's error that I included below:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    = note: expected struct `Mapping&lt;ink::ink_primitives::AccountId, u128&gt;`&#xD;&#xA;            found reference `&amp;Mapping&lt;ink::ink_primitives::AccountId, u128, ResolverKey&lt;AutoKey, ManualKey&lt;3381773259&gt;&gt;&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I am not sure that, I correctly assign type to `token1_balance` variable like:&#xD;&#xA;&#xD;&#xA;`&#xD;&#xA;token1_balance: Mapping&lt;AccountId, Balance&gt;, &#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;In the [ink_primitives documentation](https://paritytech.github.io/ink/ink_primitives/struct.AccountId.html) is written:&#xD;&#xA;&#xD;&#xA;&gt; This is a mirror of the AccountId type used in the default configuration of PALLET contracts.&#xD;&#xA;&#xD;&#xA;And I do not know if `ink::ink_primitives::AccountId` are exactly the same like default `AccountId` or not? [Here](https://github.com/TomaszWaszczyk/ink-automated-market-maker/blob/master/automated_market_maker/lib.rs#L28) is the wider context of the question." ContentLicense="CC BY-SA 4.0" />
  <row Id="33685" PostHistoryTypeId="1" PostId="8578" RevisionGUID="480ca56c-0a0e-4fcf-ae82-c29cb1144956" CreationDate="2023-05-22T00:20:44.763" UserId="19" Text="Difference between &quot;ink_primitives::AccountId&quot; and just default &quot;AccountId&quot; type" ContentLicense="CC BY-SA 4.0" />
  <row Id="33686" PostHistoryTypeId="3" PostId="8578" RevisionGUID="480ca56c-0a0e-4fcf-ae82-c29cb1144956" CreationDate="2023-05-22T00:20:44.763" UserId="19" Text="|ink|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33687" PostHistoryTypeId="52" PostId="8574" RevisionGUID="81f4e5a8-feaa-476f-b2bf-bfeddbc4cae3" CreationDate="2023-05-22T01:28:39.670" />
  <row Id="33688" PostHistoryTypeId="2" PostId="8579" RevisionGUID="5fb4a0b0-1ac0-446a-be8b-9f70461925dc" CreationDate="2023-05-22T02:21:04.083" UserId="251" Text="Take a look at the `pallet-assets`'s `CreateOrigin`. https://github.com/paritytech/substrate/blob/e85188b800c63ca3be545c1a43a0927fe0b6fd11/frame/assets/src/lib.rs#L271-L277&#xD;&#xA;&#xD;&#xA;Here's an example, we configured a whitelist(`[ROOT]`) for it. https://github.com/darwinia-network/darwinia/blob/ae96c262f7998174081ec57e9d45b600aaa24cec/runtime/darwinia/src/pallets/assets.rs#L41-L43&#xD;&#xA;&#xD;&#xA;You might not need to use `EnsureOriginWithArg`, you should also take a look at `EnsureOrigin`." ContentLicense="CC BY-SA 4.0" />
  <row Id="33690" PostHistoryTypeId="2" PostId="8580" RevisionGUID="e5eb42d1-b60b-4174-8b4a-60c32476c4ca" CreationDate="2023-05-22T03:37:55.427" UserId="2844" Text="following [this](https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/#create-a-custom-chain-specification) tutorial, I created `CustomSpec.json` file and this contains balances like this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I change the default set balance into like this, it doesn't change in polkadotjs frontend.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/M3Cp4.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/XqlQ9.jpg&#xD;&#xA;&#xD;&#xA;Someone please advice me why balance is not changing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33692" PostHistoryTypeId="1" PostId="8580" RevisionGUID="e5eb42d1-b60b-4174-8b4a-60c32476c4ca" CreationDate="2023-05-22T03:37:55.427" UserId="2844" Text="CustomSpec Balance doesn't change" ContentLicense="CC BY-SA 4.0" />
  <row Id="33693" PostHistoryTypeId="3" PostId="8580" RevisionGUID="e5eb42d1-b60b-4174-8b4a-60c32476c4ca" CreationDate="2023-05-22T03:37:55.427" UserId="2844" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33694" PostHistoryTypeId="5" PostId="8580" RevisionGUID="bf89efda-e43d-445d-aba7-6ad6eff4dfe2" CreationDate="2023-05-22T04:19:04.013" UserId="2844" Comment="added 91 characters in body" Text="following [this](https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/#create-a-custom-chain-specification) tutorial, I created `CustomSpec.json` file and this contains balances like this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I change the default set balance into like this, it doesn't change in polkadotjs frontend.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/M3Cp4.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/XqlQ9.jpg&#xD;&#xA;&#xD;&#xA;Someone please advice me why balance is not changing?&#xD;&#xA;This is code [link](https://github.com/XcavateBlockchain/default-substrate-node-template)" ContentLicense="CC BY-SA 4.0" />
  <row Id="33695" PostHistoryTypeId="2" PostId="8581" RevisionGUID="8d20c6df-67a9-4298-8511-1da78f726222" CreationDate="2023-05-22T06:12:49.870" UserId="3881" Text="I have made the change you wanted. I did the following:&#xD;&#xA;&#xD;&#xA;1. Cloned the repo:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;git clone https://github.com/XcavateBlockchain/default-substrate-node-template.git&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Compiled&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cargo build –release &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Followed the tutorial for change the specs: &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template build-spec --disable-default-bootnode --chain local &gt; customSpec.json &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Convert it to raw without change &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode &gt; customSpecRaw.json &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;4. Run it: &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template \ &#xD;&#xA;  --base-path /tmp/node01 \ &#xD;&#xA;  --chain ./customSpecRaw.json \ &#xD;&#xA;  --port 30333 \ &#xD;&#xA;  --ws-port 9945 \ &#xD;&#xA;  --rpc-port 9933 \ &#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ &#xD;&#xA;  --validator \ &#xD;&#xA;  --rpc-methods Unsafe \ &#xD;&#xA;  --name MyNode01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Take capture:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Stop it&#xD;&#xA; &#xD;&#xA;5. modify the specs&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Convert it to raw without change &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode &gt; customSpecRaw.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;6. Removed /tmp/node01 folder &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;rm -rf /tmp/node01  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;7. run it again:  &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template \  --base-path /tmp/node01 \ &#xD;&#xA;  --chain ./customSpecRaw.json \ &#xD;&#xA;  --port 30333 \ &#xD;&#xA;  --ws-port 9945 \ &#xD;&#xA;  --rpc-port 9933 \ &#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ &#xD;&#xA;  --validator \ &#xD;&#xA;  --rpc-methods Unsafe \ &#xD;&#xA;  --name MyNode01 &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Take capture: &#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kZ8gT.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ntKfg.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/ddEsz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33697" PostHistoryTypeId="2" PostId="8582" RevisionGUID="1bd3c647-f6c9-491d-8487-d6afbe768871" CreationDate="2023-05-22T06:54:32.000" UserId="2348" Text="I have been working on substrate blockchain. i want to know about each event and process happening  in  each epoch  of blockchain . " ContentLicense="CC BY-SA 4.0" />
  <row Id="33699" PostHistoryTypeId="1" PostId="8582" RevisionGUID="1bd3c647-f6c9-491d-8487-d6afbe768871" CreationDate="2023-05-22T06:54:32.000" UserId="2348" Text="What happens in epoch of a blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33700" PostHistoryTypeId="3" PostId="8582" RevisionGUID="1bd3c647-f6c9-491d-8487-d6afbe768871" CreationDate="2023-05-22T06:54:32.000" UserId="2348" Text="|blockchain|epoch|time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33701" PostHistoryTypeId="5" PostId="8582" RevisionGUID="c89bcfdf-de8c-40d0-9c7c-7f6f79871578" CreationDate="2023-05-22T07:30:00.447" UserId="2281" Comment="added 38 characters in body; edited tags" Text="I have been working on substrate blockchain. i want to know about the event's and process happening  in  each `epoch`  of blockchain and whats concept behind the `epoch`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33702" PostHistoryTypeId="6" PostId="8582" RevisionGUID="c89bcfdf-de8c-40d0-9c7c-7f6f79871578" CreationDate="2023-05-22T07:30:00.447" UserId="2281" Comment="added 38 characters in body; edited tags" Text="|blockchain|session|epoch|time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33703" PostHistoryTypeId="2" PostId="8583" RevisionGUID="343b626d-373d-44b2-a9f6-4af418605437" CreationDate="2023-05-22T07:47:18.617" UserId="2762" Text="Yes, you can.&#xD;&#xA;How are you doing the wallet connection? I'd recomment to take a look at this library `@polkadot-onboard` ([link on github][1]).&#xD;&#xA;&#xD;&#xA;&gt; @polkadot-onboard provides a set of packages for developers to easily onboard and add different type of polkadot wallets to their dapps. It provides a universal interface for working with different type of wallets (e.g. Injected-wallets, Wallet-Connect, hardware-wallets).&#xD;&#xA;&#xD;&#xA;[Here is an example of the connect()][2]. For the disconnect would be similar, and delete if you are storing the state of the account:&#xD;&#xA;&#xD;&#xA;    await wallet.disconnect();&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-onboard/blob/main/README.md&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-onboard/blob/main/examples/react-headless/src/components/Wallet.tsx#LL40C9-L40C32" ContentLicense="CC BY-SA 4.0" />
  <row Id="33705" PostHistoryTypeId="2" PostId="8584" RevisionGUID="6f19c207-0454-462f-a870-f68fd8853ae0" CreationDate="2023-05-22T07:57:35.487" UserId="4238" Text="I am experimenting with cross contract with a combination of psp22 and psp37 in my project. But there is a problem when uploading json file and wasm file and deploying. It just shows the &quot;contracts.instantiateWithCode broadcast&quot; message and no further action takes place. But the transaction count in Account is increased by 1. But no contract is executed. How do I fix it&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rMMUf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/7yVjG.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/YqXwP.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33707" PostHistoryTypeId="1" PostId="8584" RevisionGUID="6f19c207-0454-462f-a870-f68fd8853ae0" CreationDate="2023-05-22T07:57:35.487" UserId="4238" Text="Upload and Deploy code in Rococo Contract (Testnet) and Shibuya Testnet not working?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33708" PostHistoryTypeId="3" PostId="8584" RevisionGUID="6f19c207-0454-462f-a870-f68fd8853ae0" CreationDate="2023-05-22T07:57:35.487" UserId="4238" Text="|ink|rococo|cross-contract-call|shibuya|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33709" PostHistoryTypeId="2" PostId="8585" RevisionGUID="ccf8c4ce-b8d7-4d4c-b1e5-10637028fff4" CreationDate="2023-05-22T08:05:54.627" UserId="3319" Text="An epoch is generally used with babe consensus algorithm, i suggest you learn more about how the algorithm works [here][1]&#xD;&#xA;&#xD;&#xA;&gt; BABE execution happens in sequential non-overlapping phases known as&#xD;&#xA;&gt; epochs. Each epoch is divided into a predefined number of slots. All&#xD;&#xA;&gt; slots in each epoch are sequentially indexed starting from 0 (slot&#xD;&#xA;&gt; number). At the beginning of each epoch, the BABE node needs to run&#xD;&#xA;&gt; the Block-Production-Lottery algorithm to find out in which slots it&#xD;&#xA;&gt; should produce a block and gossip to the other block producers.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/blog/polkadot-consensus-part-3-babe/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33711" PostHistoryTypeId="5" PostId="8585" RevisionGUID="357a199a-abfa-49ea-920e-44967909b26b" CreationDate="2023-05-22T08:12:28.953" UserId="3319" Comment="added 218 characters in body" Text="An epoch is generally used with babe consensus algorithm, i suggest you learn more about how the algorithm works [here][1]&#xD;&#xA;&#xD;&#xA;&gt; BABE execution happens in sequential non-overlapping phases known as&#xD;&#xA;&gt; epochs. Each epoch is divided into a predefined number of slots. All&#xD;&#xA;&gt; slots in each epoch are sequentially indexed starting from 0 (slot&#xD;&#xA;&gt; number). At the beginning of each epoch, the BABE node needs to run&#xD;&#xA;&gt; the Block-Production-Lottery algorithm to find out in which slots it&#xD;&#xA;&gt; should produce a block and gossip to the other block producers.&#xD;&#xA;&#xD;&#xA;if we dont have epochs we would have just infinite number of steps but that would make the VRF computation impractical and inefficient. Epochs provide a way to update the randomness and the validator set periodically in a more random and fair way.&#xD;&#xA;&#xD;&#xA;&gt;  To make a long story short, a lot of applications depend on random&#xD;&#xA;&gt; number generation, but it can be difficult to find randomness that&#xD;&#xA;&gt; everyone agrees is random (and not gamed such that the generator&#xD;&#xA;&gt; benefits) when all on-chain operations must be deterministic and&#xD;&#xA;&gt; verifiable.&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/blog/polkadot-consensus-part-3-babe/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33712" PostHistoryTypeId="5" PostId="8581" RevisionGUID="0506cec5-40d4-4ede-8702-52fa9848bd0e" CreationDate="2023-05-22T08:19:47.473" UserId="3881" Comment="deleted 3 characters in body" Text="I have made the change you wanted. I did the following:&#xD;&#xA;&#xD;&#xA;1. Cloned the repo:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;git clone https://github.com/XcavateBlockchain/default-substrate-node-template.git&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Compiled&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cargo build –release &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Followed the tutorial for change the specs: &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template build-spec --disable-default-bootnode --chain local &gt; customSpec.json &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Convert it to raw without change &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode &gt; customSpecRaw.json &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;4. Run it: &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template \ &#xD;&#xA;  --base-path /tmp/node01 \ &#xD;&#xA;  --chain ./customSpecRaw.json \ &#xD;&#xA;  --port 30333 \ &#xD;&#xA;  --ws-port 9945 \ &#xD;&#xA;  --rpc-port 9933 \ &#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ &#xD;&#xA;  --validator \ &#xD;&#xA;  --rpc-methods Unsafe \ &#xD;&#xA;  --name MyNode01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Take capture:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Stop it&#xD;&#xA; &#xD;&#xA;5. modify the specs&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Convert it to raw after change&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode &gt; customSpecRaw.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;6. Removed /tmp/node01 folder &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;rm -rf /tmp/node01  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;7. run it again:  &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;./target/release/node-template \  --base-path /tmp/node01 \ &#xD;&#xA;  --chain ./customSpecRaw.json \ &#xD;&#xA;  --port 30333 \ &#xD;&#xA;  --ws-port 9945 \ &#xD;&#xA;  --rpc-port 9933 \ &#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \ &#xD;&#xA;  --validator \ &#xD;&#xA;  --rpc-methods Unsafe \ &#xD;&#xA;  --name MyNode01 &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Take capture: &#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kZ8gT.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ntKfg.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/ddEsz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33713" PostHistoryTypeId="2" PostId="8586" RevisionGUID="701992c6-30ac-4385-a9dd-c2ce88ac20f2" CreationDate="2023-05-22T08:49:38.920" UserId="2736" Text="you can also check out Aleph Zero node repository here: https://github.com/Cardinal-Cryptography/aleph-node for how we set up both node and runtime (we are running solo-chain mainnet for 1.5 years now)" ContentLicense="CC BY-SA 4.0" />
  <row Id="33716" PostHistoryTypeId="5" PostId="8562" RevisionGUID="c707285f-c7e6-4b8f-a5ea-829ea09e70be" CreationDate="2023-05-22T09:03:08.977" UserId="445" Comment="added 190 characters in body" Text="My code:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;const main = async() =&gt; {&#xD;&#xA;&#xD;&#xA;    //Get wasm &#xD;&#xA;    // This file wasm I already build through &quot;cargo contract build&quot;&#xD;&#xA;    let wasm = fs.readFileSync(&quot;../../res/incrementer.wasm&quot;);&#xD;&#xA;    &#xD;&#xA;    // API creation for connection to the chain&#xD;&#xA;    const wsProvider = new WsProvider(process.env.WSS_PROVIDER);&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const keyring = new Keyring({ type: &quot;ed25519&quot; });&#xD;&#xA;    const userKeyring = keyring.addFromMnemonic(process.env.MNEMONIC_PHRASE);&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    // maximum gas to be consumed for the instantiation. if limit is too small the instantiation will fail.&#xD;&#xA;    const gasLimit = 500000n * 1000000n;&#xD;&#xA;    &#xD;&#xA;    // a limit to how much Balance to be used to pay for the storage created by the instantiation&#xD;&#xA;    // if null is passed, unlimited balance can be used&#xD;&#xA;    const storageDepositLimit = null&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Sign transaction to deploy contract&#xD;&#xA;    //Define deployed contract with metadata + contract address&#xD;&#xA;    const contract = new ContractPromise(api, metadata, '5GEMqSuQUCgYCoR5zZSzCX1of68o7F2pnyUapmkJhvbwT2BD');&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    // Query value from contract&#xD;&#xA;    const {result, output } = await contract.query.get(&#xD;&#xA;    userKeyring.address,&#xD;&#xA;    {&#xD;&#xA;        gasLimit,&#xD;&#xA;        storageDepositLimit,&#xD;&#xA;    }&#xD;&#xA;    );&#xD;&#xA;    // check if the call was successful&#xD;&#xA;    if (result.isOk) {&#xD;&#xA;        // output the return value&#xD;&#xA;        console.log('Success -&gt; Value:', output.toHuman());&#xD;&#xA;    } else {&#xD;&#xA;        console.error('Error', result.asErr);&#xD;&#xA;    }&#xD;&#xA; &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;main().catch((error) =&gt; {&#xD;&#xA;    console.error(error);&#xD;&#xA;    process.exitCode = 1;&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Error:** &#xD;&#xA;&#xD;&#xA;`Error Type { registry: TypeRegistry {}, initialU8aLength: 6 }`&#xD;&#xA;&#xD;&#xA;**Environment:**&#xD;&#xA;&#xD;&#xA; + Dependencies:&#xD;&#xA;&#xD;&#xA; package.json&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;dependencies&quot;: {&#xD;&#xA;    &quot;@polkadot/api&quot;: &quot;10.1.3&quot;,&#xD;&#xA;    &quot;@polkadot/api-contract&quot;: &quot;10.1.3&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;type&quot;: &quot;module&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA; + Ink!: version 4&#xD;&#xA;&#xD;&#xA; + Substrate node version: `0.9.36`&#xD;&#xA;&#xD;&#xA; + My source `incrementer` ink! code: https://github.com/paritytech/ink-examples/blob/main/incrementer/lib.rs&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33717" PostHistoryTypeId="5" PostId="8569" RevisionGUID="f24679ce-a0c8-47c7-aa87-96d133039985" CreationDate="2023-05-22T09:07:09.420" UserId="2281" Comment="deleted 15 characters in body" Text="When running `Substrate-node-template` - basically the Kitties - and with a callable eg `create_kitty()` as a `dispatchableResult` in the call pallet, what I assume to be an extrinsic in the metadata, this function is not returned by calling either `state_getMetadata` in javascript or the Polkadot js extrinsics. In fact, both show `causeError()` and `do-something()`. I have no idea where these methods come from and the actual callable method is not in the metadata at all. I really need clarification about this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33718" PostHistoryTypeId="5" PostId="8562" RevisionGUID="b1ea792f-3a54-42b1-88dc-30e5f621fc45" CreationDate="2023-05-22T09:08:27.510" UserId="445" Comment="added 190 characters in body" Text="My code:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;const main = async() =&gt; {&#xD;&#xA;&#xD;&#xA;    //Get wasm &#xD;&#xA;    // This file wasm I already build through &quot;cargo contract build&quot;&#xD;&#xA;    let wasm = fs.readFileSync(&quot;../../res/incrementer.wasm&quot;);&#xD;&#xA;    &#xD;&#xA;    // API creation for connection to the chain&#xD;&#xA;    const wsProvider = new WsProvider(process.env.WSS_PROVIDER);&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const keyring = new Keyring({ type: &quot;ed25519&quot; });&#xD;&#xA;    const userKeyring = keyring.addFromMnemonic(process.env.MNEMONIC_PHRASE);&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    // maximum gas to be consumed for the instantiation. if limit is too small the instantiation will fail.&#xD;&#xA;    const gasLimit = 500000n * 1000000n;&#xD;&#xA;    &#xD;&#xA;    // a limit to how much Balance to be used to pay for the storage created by the instantiation&#xD;&#xA;    // if null is passed, unlimited balance can be used&#xD;&#xA;    const storageDepositLimit = null&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Sign transaction to deploy contract&#xD;&#xA;    //Define deployed contract with metadata + contract address&#xD;&#xA;    const contract = new ContractPromise(api, metadata, '5GEMqSuQUCgYCoR5zZSzCX1of68o7F2pnyUapmkJhvbwT2BD');&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;    // Query value from contract&#xD;&#xA;    const {result, output } = await contract.query.get(&#xD;&#xA;    userKeyring.address,&#xD;&#xA;    {&#xD;&#xA;        gasLimit,&#xD;&#xA;        storageDepositLimit,&#xD;&#xA;    }&#xD;&#xA;    );&#xD;&#xA;    // check if the call was successful&#xD;&#xA;    if (result.isOk) {&#xD;&#xA;        // output the return value&#xD;&#xA;        console.log('Success -&gt; Value:', output.toHuman());&#xD;&#xA;    } else {&#xD;&#xA;        console.error('Error', result.asErr);&#xD;&#xA;    }&#xD;&#xA; &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;main().catch((error) =&gt; {&#xD;&#xA;    console.error(error);&#xD;&#xA;    process.exitCode = 1;&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Error:** &#xD;&#xA;&#xD;&#xA;I can not query `get` function in `incrementer` smart contract through `@polkadot/api-contract`. I try to replicate this context in contracts-ui -&gt; its working properly.&#xD;&#xA;&#xD;&#xA;I have no idea why I encounter this issue&#xD;&#xA;&#xD;&#xA;`Error Type { registry: TypeRegistry {}, initialU8aLength: 6 }`&#xD;&#xA;&#xD;&#xA;**Environment:**&#xD;&#xA;&#xD;&#xA; + Dependencies:&#xD;&#xA;&#xD;&#xA; package.json&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;dependencies&quot;: {&#xD;&#xA;    &quot;@polkadot/api&quot;: &quot;10.1.3&quot;,&#xD;&#xA;    &quot;@polkadot/api-contract&quot;: &quot;10.1.3&quot;&#xD;&#xA;  },&#xD;&#xA;  &quot;type&quot;: &quot;module&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA; + Ink!: version 4&#xD;&#xA;&#xD;&#xA; + Substrate node version: `0.9.36`&#xD;&#xA;&#xD;&#xA; + My source `incrementer` ink! code: https://github.com/paritytech/ink-examples/blob/main/incrementer/lib.rs&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33719" PostHistoryTypeId="2" PostId="8587" RevisionGUID="cc62c4a6-a37d-4144-ac7d-8ec97175b888" CreationDate="2023-05-22T10:02:53.827" UserId="3980" Text="You can adjust `DepositPerItem` and `DepositPerByte` in the `pallet-contracts` configuration.&#xD;&#xA;&#xD;&#xA;You can take a look at how this is configured in Substrate (do not use these values as they are likely unsuitable for something that has economic value). Here is the link to the configuration file: [GitHub - Substrate runtime configuration](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1216-L1241).&#xD;&#xA;&#xD;&#xA;If you are deploying to a solo chain that has different hardware specifications than Polkadot, you should probably run the weight benchmark against hardware that matches the specifications of your network. This thread might be helpful for that: [Stack Exchange - How to generate WeightInfo for pallets](https://substrate.stackexchange.com/questions/295/how-to-generate-weightinfo-for-pallets).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33721" PostHistoryTypeId="2" PostId="8588" RevisionGUID="55878d03-12b6-4aed-9df2-72b89ea3bbf4" CreationDate="2023-05-22T10:24:43.483" UserId="100" Text="To my knowledge, this is not documented anywhere unfortunately. You don't use the .contract file directly, but create an `Abi` instance from it.&#xD;&#xA;&#xD;&#xA;Taking flipper as an example, the steps would be like so:&#xD;&#xA;&#xD;&#xA;1. Create an `Abi` object either directly or by creating a `ContractPromise`&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;const abi = new Abi(flipper.json, api.registry.getChainProperties())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;const contract = new ContractPromise(api, flipper.json, address)&#xD;&#xA;const abi = contract.abi&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Encode your call input&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const inputData = abi.messages[&quot;flip&quot;].toU8a([true])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can use this encoded data for runtime calls where the arguments are not encoded automatically.&#xD;&#xA;&#xD;&#xA;If you use api-contract and do contract calls via the ContractPromise interface the data is encoded for you. Just need to pass an array with values for the message params.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;contract.tx[&quot;flip&quot;]({gasLimit, storageDepositLimit}, [true]).signAndSend(...)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33723" PostHistoryTypeId="2" PostId="8589" RevisionGUID="e134e280-f95d-438f-a587-46bc11a64c99" CreationDate="2023-05-22T10:25:05.737" UserId="165" Text="I would say the approach you can find in the polkadot repo works nicely. Though, you have to find what fits best for your needs.&#xD;&#xA;&#xD;&#xA;About your concerns of having one binary that may present problems between dev/test/prod, I would just point to that what is actually different are the runtimes, not really the client itself (or at least, not at all times, maybe you need some host functions at some point - but this can very well be managed in a different branch with changes to the client until it can land in `master` or whatever you might be using ).&#xD;&#xA;&#xD;&#xA;So, what I want to say is that you definitely can have different runtimes for dev/test/prod in the same node, and you will achieve that with a mix of different runtimes, and different chain specs configurations. Though, these different runtimes don't **need** to live in the same node repo. And at the moment of launching nodes these will be running with the proper spec based on whether they are meant to run in dev/test/prod network.&#xD;&#xA;&#xD;&#xA;This read might be of interest to you: https://forum.polkadot.network/t/psa-parity-is-currently-working-on-merging-the-polkadot-stack-repositories-into-one-single-repository/2883 " ContentLicense="CC BY-SA 4.0" />
  <row Id="33725" PostHistoryTypeId="2" PostId="8590" RevisionGUID="6c444aca-821c-421b-8dab-aeec9ce4e704" CreationDate="2023-05-22T11:53:51.873" UserId="404" Text="I am trying to use subxt (latest master branch) to submit transactions on our substrate chain. I get the following error:&#xD;&#xA;&#xD;&#xA;     actix_web::middleware::logger] Error in response: SubxtError(Rpc(ClientError(Call(Custom(ErrorObject { code: ServerError(1002), message: &quot;Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x17a85a - &lt;unknown&gt;!rust_begin_unwind\n    1: 0x161756 - &lt;unknown&gt;!core::panicking::panic_fmt::h55a9886e2bf4227a\n    2: 0x6b01a - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction&quot;, data: Some(RawValue(&quot;RuntimeApi(\&quot;Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\\nWASM backtrace:\\nerror while executing at wasm backtrace:\\n    0: 0x17a85a - &lt;unknown&gt;!rust_begin_unwind\\n    1: 0x161756 - &lt;unknown&gt;!core::panicking::panic_fmt::h55a9886e2bf4227a\\n    2: 0x6b01a - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\&quot;)&quot;)) })))))&#xD;&#xA;&#xD;&#xA;The same transactions work just fine from https://polkadot.js.org/&#xD;&#xA;RPC query methods are also working fine via subxt." ContentLicense="CC BY-SA 4.0" />
  <row Id="33727" PostHistoryTypeId="1" PostId="8590" RevisionGUID="6c444aca-821c-421b-8dab-aeec9ce4e704" CreationDate="2023-05-22T11:53:51.873" UserId="404" Text="Failing to execute transactions via subxt on a substrate chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="33728" PostHistoryTypeId="3" PostId="8590" RevisionGUID="6c444aca-821c-421b-8dab-aeec9ce4e704" CreationDate="2023-05-22T11:53:51.873" UserId="404" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33729" PostHistoryTypeId="2" PostId="8591" RevisionGUID="034181ed-617f-48d6-aee7-e45703f77814" CreationDate="2023-05-22T12:00:06.607" UserId="2372" Text="Kindly use the command cargo update and Then let me know" ContentLicense="CC BY-SA 4.0" />
  <row Id="33731" PostHistoryTypeId="50" PostId="3348" RevisionGUID="bb8893a6-eacc-47f8-a97f-78798647a5f8" CreationDate="2023-05-22T14:08:51.087" UserId="-1" />
  <row Id="33732" PostHistoryTypeId="2" PostId="8592" RevisionGUID="a6bab748-0a14-4801-8f66-0a4b5b4d95b0" CreationDate="2023-05-22T14:16:47.433" UserId="567" Text="There is an issue with delegate call (described in OpenBrush repo):&#xD;&#xA;https://github.com/Brushfam/openbrush-contracts/issues/36" ContentLicense="CC BY-SA 4.0" />
  <row Id="33734" PostHistoryTypeId="2" PostId="8593" RevisionGUID="cda0a63a-4edd-460b-9f0d-2dbe7dd17764" CreationDate="2023-05-22T14:18:31.557" UserId="100" Text="Considering the following scenario, is it possible to execute all calls in a batch and therefore sign only once using `utility.batchAll` in polkadot.js?&#xD;&#xA;&#xD;&#xA;1. Create `PureProxy` from account A &#xD;&#xA;2. Assign account X as anyProxy for the newly created `PureProxy`&#xD;&#xA;3. De-assign account A as anyProxy&#xD;&#xA;&#xD;&#xA;To execute 2 and 3 we need the address generated in step 1 which is accessible via the `proxy.PureCreated` event. Is there a way to pipe this event data to the following calls in the batch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33736" PostHistoryTypeId="1" PostId="8593" RevisionGUID="cda0a63a-4edd-460b-9f0d-2dbe7dd17764" CreationDate="2023-05-22T14:18:31.557" UserId="100" Text="Can I use event data from previous calls in a batch?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33737" PostHistoryTypeId="3" PostId="8593" RevisionGUID="cda0a63a-4edd-460b-9f0d-2dbe7dd17764" CreationDate="2023-05-22T14:18:31.557" UserId="100" Text="|polkadot-js|pallet-proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33738" PostHistoryTypeId="2" PostId="8594" RevisionGUID="24d7b265-1f10-49c4-b5af-88c461299d5d" CreationDate="2023-05-22T14:34:17.753" UserId="165" Text="As far as I know that is not something that `batchAll` enables, nor any of the other extrinsics exposed in `pallet_utility`.&#xD;&#xA;&#xD;&#xA;Though, it doesn't seem like a trivial approach, as what would happen if the first call emits an event containing more values than what the following call is expecting as parameters, or what happens in the scenario of a call emitting more than one event.&#xD;&#xA;&#xD;&#xA;After all, events are there to let users/clients know that something has happened on chain. I don't think there is an approach that saves you from signing more than 1 call if that exact flow is not covered in an extrinsic." ContentLicense="CC BY-SA 4.0" />
  <row Id="33740" PostHistoryTypeId="2" PostId="8595" RevisionGUID="133e9d83-9184-4396-8f1d-43b3c4ea3497" CreationDate="2023-05-22T14:40:36.883" UserId="3140" Text="Would you please provide more information? For your second argument you can try using an ABI instance. This works for me.&#xD;&#xA;&#xD;&#xA;`new Abi(metadata, api.registry.getChainProperties())`&#xD;&#xA;&#xD;&#xA;[Here](https://github.com/paritytech/useink/blob/89fc375d309e3cc4e29c75bbca5fcd5c232656ce/core/hooks/contracts/useContract.ts#L24) is a full example from [useink](https://use.ink/frontend/overview), a React hooks library." ContentLicense="CC BY-SA 4.0" />
  <row Id="33742" PostHistoryTypeId="2" PostId="8596" RevisionGUID="0641b942-f7bc-4a16-8463-83b43cd7efb1" CreationDate="2023-05-22T14:42:53.723" UserId="494" Text="I'm trying to understand the rationale behind Moonbeam's [`GAS_PER_SECOND`](https://github.com/PureStake/moonbeam/blob/fc1fd7b45f3bc243959f55596fe0f88749c72ecd/runtime/moonbeam/src/lib.rs#L361-L365):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Current approximation of the gas/s consumption considering&#xD;&#xA;/// EVM execution over compiled WASM (on 4.4Ghz CPU).&#xD;&#xA;/// Given the 500ms Weight, from which 75% only are used for transactions,&#xD;&#xA;/// the total EVM execution gas limit is: GAS_PER_SECOND * 0.500 * 0.75 ~= 15_000_000.&#xD;&#xA;pub const GAS_PER_SECOND: u64 = 40_000_000;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The 75% makes sense, as it's the default [`NORMAL_DISPATCH_RATIO`](https://github.com/paritytech/substrate/blob/20bd05cac4112a8455ec542e83313e22fcc77ddb/bin/node/runtime/src/lib.rs#L183-L185) for most Substrate chains.&#xD;&#xA;&#xD;&#xA;But I was puzzled by the `500ms Weight`, which didn't seem obvious to me.&#xD;&#xA;After some searching, I found [this line](https://github.com/PureStake/moonbeam/blob/fc1fd7b45f3bc243959f55596fe0f88749c72ecd/tests/util/constants.ts#L43) mentioning that: `// Our weight limit is 500ms.`&#xD;&#xA;&#xD;&#xA;So I wanted to ask: is this some mechanism limit the total EVM execution within a block, so that there's also execution available for native Substrate calls? Or is there some different rationale behind this value?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33744" PostHistoryTypeId="1" PostId="8596" RevisionGUID="0641b942-f7bc-4a16-8463-83b43cd7efb1" CreationDate="2023-05-22T14:42:53.723" UserId="494" Text="Rationale on Moonbeam's GAS_PER_SECOND" ContentLicense="CC BY-SA 4.0" />
  <row Id="33745" PostHistoryTypeId="3" PostId="8596" RevisionGUID="0641b942-f7bc-4a16-8463-83b43cd7efb1" CreationDate="2023-05-22T14:42:53.723" UserId="494" Text="|weight|evm|moonbeam|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33746" PostHistoryTypeId="52" PostId="8582" RevisionGUID="168a0549-370c-4008-b8ab-495fb650fd86" CreationDate="2023-05-22T15:00:52.023" />
  <row Id="33747" PostHistoryTypeId="5" PostId="8588" RevisionGUID="48f64ca4-ebba-4888-8dec-48a1e2ff0f44" CreationDate="2023-05-22T15:02:53.547" UserId="100" Comment="typo" Text="To my knowledge, this is not documented anywhere unfortunately. You don't use the .contract file directly, but create an `Abi` instance from it.&#xD;&#xA;&#xD;&#xA;Taking flipper as an example, the steps would be like so:&#xD;&#xA;&#xD;&#xA;1. Create an `Abi` object either directly or by creating a `ContractPromise`&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;const abi = new Abi(flipper.json, api.registry.getChainProperties())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;const contract = new ContractPromise(api, flipper.json, address)&#xD;&#xA;const abi = contract.abi&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Encode your call input&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const inputData = abi.messages[&quot;flip&quot;].toU8a([true])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can use this encoded data for runtime calls where the arguments are not encoded automatically.&#xD;&#xA;&#xD;&#xA;If you use api-contract and do contract calls via the ContractPromise interface the data is encoded for you. Just need to pass an array with values for the message params.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;contract.tx[&quot;flip&quot;]({gasLimit, storageDepositLimit}, true).signAndSend(...)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33748" PostHistoryTypeId="2" PostId="8597" RevisionGUID="ab9fbc1f-bb82-41ba-a002-923441d0567a" CreationDate="2023-05-22T16:16:20.803" UserId="699" Text="The 500ms weight limit is a suggested time limit (initially in cumulus) used for block production in order to maximize the size and the probability of a block to be accepted.&#xD;&#xA;&#xD;&#xA;Currently (before Asynchronous Backing), it is required to build a parachain block on top of the last relay block. However a relay block is produced every 6 seconds, so it means the parachain has 6s to:&#xD;&#xA; 1. import the relay block&#xD;&#xA; 2. produce the parachain block&#xD;&#xA; 3. produce the PoV&#xD;&#xA; 4. send the PoV to the assigned validators (usually 5)&#xD;&#xA; 5. have the validator verify the PoV (by executing the block)&#xD;&#xA; 6. have the validator broadcast its result&#xD;&#xA;&#xD;&#xA;All of those in 6s." ContentLicense="CC BY-SA 4.0" />
  <row Id="33750" PostHistoryTypeId="2" PostId="8598" RevisionGUID="8030dfc4-7f24-4a49-bd22-5f88f828a398" CreationDate="2023-05-22T16:18:02.647" UserId="100" Text="Are your calls failing with `OutOfGas` when submitted individually or only when batched? &#xD;&#xA;&#xD;&#xA;The difference may be due to the different runtime apis called under the hood:&#xD;&#xA;- `transactionPaymentApi.queryInfo` for `tx.paymentInfo`&#xD;&#xA;- `contractsApi.call` for `contract.query`&#xD;&#xA;&#xD;&#xA;There may be extra costs for batching that are not estimated by `contractsApi`" ContentLicense="CC BY-SA 4.0" />
  <row Id="33752" PostHistoryTypeId="2" PostId="8599" RevisionGUID="6fc73993-12e3-4b2e-9e1c-51a831429b69" CreationDate="2023-05-22T18:44:20.487" UserId="3437" Text="I have a scenario where I have to ender all values of a storage in drop down through Polkadot JS UI. &#xD;&#xA;&#xD;&#xA;Suppose I have a pallet `TestPallet` and an extrinsic `rate`. There are two storage `Items`  and `Rating`.&#xD;&#xA;&#xD;&#xA;If a user selects `TestPallet` &gt;&gt; `rate`, I want to show all the items stored in `Items` so that user can select and rate.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In `Items`, items are stored with an id. So when user selects any item, I can store in `Rating` with `ItemId`.&#xD;&#xA;&#xD;&#xA;Can someone please help me to provide the solution? Thanks in advance. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33754" PostHistoryTypeId="1" PostId="8599" RevisionGUID="6fc73993-12e3-4b2e-9e1c-51a831429b69" CreationDate="2023-05-22T18:44:20.487" UserId="3437" Text="Is there a way to render all values of a storage in drop down through Polkadot JS UI?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33755" PostHistoryTypeId="3" PostId="8599" RevisionGUID="6fc73993-12e3-4b2e-9e1c-51a831429b69" CreationDate="2023-05-22T18:44:20.487" UserId="3437" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33762" PostHistoryTypeId="5" PostId="8599" RevisionGUID="a522de3d-06d4-41f6-a784-843ab9b960fc" CreationDate="2023-05-22T19:09:57.267" UserId="354" Comment="edited body; edited tags" Text="I have a scenario where I have to enter all values of a storage in drop down through Polkadot JS UI. &#xD;&#xA;&#xD;&#xA;Suppose I have a pallet `TestPallet` and an extrinsic `rate`. There are two storage `Items`  and `Rating`.&#xD;&#xA;&#xD;&#xA;If a user selects `TestPallet` &gt;&gt; `rate`, I want to show all the items stored in `Items` so that user can select and rate.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In `Items`, items are stored with an id. So when user selects any item, I can store in `Rating` with `ItemId`.&#xD;&#xA;&#xD;&#xA;Can someone please help me to provide the solution? Thanks in advance. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33763" PostHistoryTypeId="6" PostId="8599" RevisionGUID="a522de3d-06d4-41f6-a784-843ab9b960fc" CreationDate="2023-05-22T19:09:57.267" UserId="354" Comment="edited body; edited tags" Text="|polkadot-js|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33766" PostHistoryTypeId="2" PostId="8603" RevisionGUID="05da51fc-be2d-4e5e-86f2-1352c8de880b" CreationDate="2023-05-22T19:39:37.090" UserId="2762" Text="It is possible to retrieve a list of all the keys and entries from a maps and double-maps with: `.entries(&lt;args&gt;): [StorageKey, Type][]`.&#xD;&#xA;&#xD;&#xA;An example in your case will be more or less like this:&#xD;&#xA;&#xD;&#xA;    const items = await api.query.testPallet.items.entries();&#xD;&#xA;And this will be an array of key-values.&#xD;&#xA;&#xD;&#xA;See in this previous StackExchange question an example to get all contracts: [How to get a list of all the smart contract account ids and WASM blobs on a parachain][1]&#xD;&#xA;&#xD;&#xA;And see an example in the [PolkadotJS docs][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/6534/2762&#xD;&#xA;  [2]: https://polkadot.js.org/docs/api/start/api.query.other/&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33773" PostHistoryTypeId="52" PostId="8593" RevisionGUID="8878b8c1-27ff-4a98-be7d-2d783d6515ce" CreationDate="2023-05-22T22:18:50.757" />
  <row Id="33774" PostHistoryTypeId="52" PostId="8596" RevisionGUID="bcebe1a4-247b-47e9-af7b-d5f327111458" CreationDate="2023-05-22T22:43:06.470" />
  <row Id="33775" PostHistoryTypeId="5" PostId="8596" RevisionGUID="86990c28-88c0-435d-8201-4d9db031d5ab" CreationDate="2023-05-22T22:50:01.383" UserId="494" Comment="deleted 177 characters in body" Text="I'm trying to understand the rationale behind Moonbeam's [`GAS_PER_SECOND`](https://github.com/PureStake/moonbeam/blob/fc1fd7b45f3bc243959f55596fe0f88749c72ecd/runtime/moonbeam/src/lib.rs#L361-L365):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Current approximation of the gas/s consumption considering&#xD;&#xA;/// EVM execution over compiled WASM (on 4.4Ghz CPU).&#xD;&#xA;/// Given the 500ms Weight, from which 75% only are used for transactions,&#xD;&#xA;/// the total EVM execution gas limit is: GAS_PER_SECOND * 0.500 * 0.75 ~= 15_000_000.&#xD;&#xA;pub const GAS_PER_SECOND: u64 = 40_000_000;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The 75% makes sense, as it's the default [`NORMAL_DISPATCH_RATIO`](https://github.com/paritytech/substrate/blob/20bd05cac4112a8455ec542e83313e22fcc77ddb/bin/node/runtime/src/lib.rs#L183-L185) for most Substrate chains.&#xD;&#xA;&#xD;&#xA;But I was puzzled by the `500ms Weight`, which didn't seem obvious to me.&#xD;&#xA;After some searching, I found [this line](https://github.com/PureStake/moonbeam/blob/fc1fd7b45f3bc243959f55596fe0f88749c72ecd/tests/util/constants.ts#L43) mentioning that: `// Our weight limit is 500ms.`&#xD;&#xA;&#xD;&#xA;What is rationale behind this value?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33776" PostHistoryTypeId="5" PostId="8596" RevisionGUID="da02cc67-3647-4369-b25b-7f457c50b8eb" CreationDate="2023-05-22T23:53:38.577" UserId="494" Comment="added 49 characters in body" Text="I'm trying to understand the rationale behind Moonbeam's [`GAS_PER_SECOND`](https://github.com/PureStake/moonbeam/blob/fc1fd7b45f3bc243959f55596fe0f88749c72ecd/runtime/moonbeam/src/lib.rs#L361-L365):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Current approximation of the gas/s consumption considering&#xD;&#xA;/// EVM execution over compiled WASM (on 4.4Ghz CPU).&#xD;&#xA;/// Given the 500ms Weight, from which 75% only are used for transactions,&#xD;&#xA;/// the total EVM execution gas limit is: GAS_PER_SECOND * 0.500 * 0.75 ~= 15_000_000.&#xD;&#xA;pub const GAS_PER_SECOND: u64 = 40_000_000;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The 75% makes sense, as it's the default [`NORMAL_DISPATCH_RATIO`](https://github.com/paritytech/substrate/blob/20bd05cac4112a8455ec542e83313e22fcc77ddb/bin/node/runtime/src/lib.rs#L183-L185) for most Substrate chains.&#xD;&#xA;&#xD;&#xA;But I was puzzled by the `500ms Weight`, which didn't seem obvious to me.&#xD;&#xA;After some searching, I found [this line](https://github.com/PureStake/moonbeam/blob/fc1fd7b45f3bc243959f55596fe0f88749c72ecd/tests/util/constants.ts#L43) mentioning that: `// Our weight limit is 500ms.`&#xD;&#xA;&#xD;&#xA;What is rationale behind `500ms`?&#xD;&#xA;&#xD;&#xA;Also, what is the rationale behind `15_000_000`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33777" PostHistoryTypeId="5" PostId="8584" RevisionGUID="bfca78b1-c457-47f3-aaf0-ab76a00abb9b" CreationDate="2023-05-23T02:00:14.653" UserId="4238" Comment="added 89 characters in body" Text="I am experimenting with cross contract with a combination of psp22 and psp37 in my project. But there is a problem when uploading json file and wasm file and deploying. It just shows the &quot;contracts.instantiateWithCode broadcast&quot; message and no further action takes place. But the transaction count in Account is increased by 1. But no contract is executed. How do I fix it&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rMMUf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/7yVjG.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/YqXwP.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/i8D4L.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33779" PostHistoryTypeId="2" PostId="8605" RevisionGUID="583756ec-26ea-4b82-a3eb-0e0fae65a321" CreationDate="2023-05-23T02:42:33.700" UserId="3960" Text="I need to programmatically pack an extrinsic for an RPC, I believe I'm looking for the following front-end functionality:&#xD;&#xA;- extract relevant indices from the Metadata&#xD;&#xA;- fill the extrinsic parameters&#xD;&#xA;- properly Scale/hex encode it, be it signed or unsigned&#xD;&#xA;exactly as PolkadotJS app does.&#xD;&#xA;Something like this Rust code, but for the front-end:&#xD;&#xA;https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/05_transfer_balance.rs&#xD;&#xA;&#xD;&#xA;Please could anyone  indicate me relevant packages in the PolkadotJS sources that do the job, maybe some code snippets that demonstrate the codification routine ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33781" PostHistoryTypeId="1" PostId="8605" RevisionGUID="583756ec-26ea-4b82-a3eb-0e0fae65a321" CreationDate="2023-05-23T02:42:33.700" UserId="3960" Text="How to encode an extrinsic for RPC from a web client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33782" PostHistoryTypeId="3" PostId="8605" RevisionGUID="583756ec-26ea-4b82-a3eb-0e0fae65a321" CreationDate="2023-05-23T02:42:33.700" UserId="3960" Text="|polkadot-js|extrinsic|rpc|api|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33783" PostHistoryTypeId="2" PostId="8606" RevisionGUID="12ebb4b8-b12a-42c1-8bae-bf9d95a0193f" CreationDate="2023-05-23T04:56:27.773" UserId="3414" Text="I was trying to execute a function **reportEquivocation(equivocationProof, keyOwnerProof)**in the babe pallet . I was struck in filling the parameters for the same.Could anyone guide me about how to fill **slot** and **keyOwnerProof** parameter.[enter image description here][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7wHly.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/jCakC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33785" PostHistoryTypeId="1" PostId="8606" RevisionGUID="12ebb4b8-b12a-42c1-8bae-bf9d95a0193f" CreationDate="2023-05-23T04:56:27.773" UserId="3414" Text="How to execute reportEquivocation function in babe pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33786" PostHistoryTypeId="3" PostId="8606" RevisionGUID="12ebb4b8-b12a-42c1-8bae-bf9d95a0193f" CreationDate="2023-05-23T04:56:27.773" UserId="3414" Text="|substrate-node-template|polkadot|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33787" PostHistoryTypeId="5" PostId="8606" RevisionGUID="4ed5686d-a2be-43aa-8413-49e4c7d85177" CreationDate="2023-05-23T05:00:59.840" UserId="2281" Comment="deleted 85 characters in body; edited tags" Text="I was trying to execute a function `reportEquivocation(equivocationProof, keyOwnerProof)`in the babe pallet . I was stuck in filling the parameters for the same.Could anyone guide me about how to fill `slot` and `keyOwnerProof` parameter?&#xD;&#xA;[][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7wHly.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/jCakC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33788" PostHistoryTypeId="6" PostId="8606" RevisionGUID="4ed5686d-a2be-43aa-8413-49e4c7d85177" CreationDate="2023-05-23T05:00:59.840" UserId="2281" Comment="deleted 85 characters in body; edited tags" Text="|substrate-node-template|polkadot|babe|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33789" PostHistoryTypeId="5" PostId="8597" RevisionGUID="13975501-801f-42d8-a681-53bb1d68c76a" CreationDate="2023-05-23T06:34:56.880" UserId="699" Comment="added 398 characters in body" Text="The 500ms weight limit is a suggested time limit (initially in cumulus) used for block production in order to maximize the size and the probability of a block to be accepted.&#xD;&#xA;&#xD;&#xA;Currently (before Asynchronous Backing), it is required to build a parachain block on top of the last relay block. However a relay block is produced every 6 seconds, so it means the parachain has 6s to:&#xD;&#xA; 1. import the relay block&#xD;&#xA; 2. produce the parachain block&#xD;&#xA; 3. produce the PoV&#xD;&#xA; 4. send the PoV to the assigned validators (usually 5)&#xD;&#xA; 5. have the validator verify the PoV (by executing the block)&#xD;&#xA; 6. have the validator broadcast its result&#xD;&#xA;&#xD;&#xA;Concerning the 15_000_000, it simply reflected (it changed since) the maximum gas allowed in an Ethereum Block.&#xD;&#xA;&#xD;&#xA;Our overall goal in that formula was to find a way to convert our target gas (15_000_000) into our target weight (500ms) and by luck, it did match closely using the hardware of reference (7700k intel CPU), allowing us to simply convert gas to weight using a ratio of 40_000_000 (pico seconds) per gas. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33790" PostHistoryTypeId="2" PostId="8607" RevisionGUID="df79993e-3abe-4ecc-ab0a-e00919821adc" CreationDate="2023-05-23T07:07:13.703" UserId="251" Text="https://github.com/paritytech/cumulus/pull/2213/files#diff-04c884d6f18e6732821418360f30ce293a09a5a817672f3a5d100d82696f70d1R721&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let info_provider = timestamp_with_aura_info(6000);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;IIRC, all the cumulus nodes have 12s block time." ContentLicense="CC BY-SA 4.0" />
  <row Id="33792" PostHistoryTypeId="1" PostId="8607" RevisionGUID="df79993e-3abe-4ecc-ab0a-e00919821adc" CreationDate="2023-05-23T07:07:13.703" UserId="251" Text="Why the block time is 6s here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33793" PostHistoryTypeId="3" PostId="8607" RevisionGUID="df79993e-3abe-4ecc-ab0a-e00919821adc" CreationDate="2023-05-23T07:07:13.703" UserId="251" Text="|block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33794" PostHistoryTypeId="2" PostId="8608" RevisionGUID="e675a328-86c5-43cd-9fa9-788c2bbf6c30" CreationDate="2023-05-23T07:39:46.900" UserId="3994" Text="UPDATE: A [PR](https://github.com/paritytech/substrate/pull/13708) has been merged to **master** that allows Root to call contracts and adds the `caller_is_root() -&gt; bool` method.&#xD;&#xA;You can then use this to build your custom `ensure_root`." ContentLicense="CC BY-SA 4.0" />
  <row Id="33796" PostHistoryTypeId="2" PostId="8609" RevisionGUID="4c6f9fb8-e23c-4b32-8b7b-ed4954613049" CreationDate="2023-05-23T08:50:22.653" UserId="2762" Text="I believe this is the library you want to use [txwrapper-core][1], is a set of  tools to quickly create, test, and maintain a library of helper functions for offline transaction generation with your chain. &#xD;&#xA;&#xD;&#xA;An example you can use as a reference about how to use it is here: https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/polkadot/src/polkadot.ts&#xD;&#xA;&#xD;&#xA;First it gets the metadata with `state_getMetadata`, with this creates the Polkadot's type registry and then it construct the extrinsic with the help of the library `@substrate/txwrapper-polkadot`. The example also shows you how to generate the signed extrinsic and how to send it to the node within the RPC `author_submitExtrinsic`.&#xD;&#xA;&#xD;&#xA;Another option to encode/decode SCALE with typescript is the library [parity-scale-codec-ts][2]. You can see an example of how to use it in this previous StackExchange answer: [How to handle XCM encoding and building in JavaScript][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/txwrapper-core&#xD;&#xA;  [2]: https://github.com/paritytech/scale-ts&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/4977/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="33798" PostHistoryTypeId="5" PostId="3739" RevisionGUID="359354e3-5ad8-4789-a64e-54c2a4ec00a1" CreationDate="2023-05-23T09:09:00.550" UserId="377" Comment="added 1 character in body" Text="You can try use compact.compressed.wasm instead of compact.wasm. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33799" PostHistoryTypeId="50" PostId="8216" RevisionGUID="291a74ac-84df-408b-a53d-778947b7694e" CreationDate="2023-05-23T10:06:20.727" UserId="-1" />
  <row Id="33800" PostHistoryTypeId="50" PostId="7369" RevisionGUID="0ba63e9e-2894-461b-8c6d-ec0545702f84" CreationDate="2023-05-23T11:00:50.103" UserId="-1" />
  <row Id="33801" PostHistoryTypeId="2" PostId="8610" RevisionGUID="1ba3d87a-46c0-4560-91ba-cbd661d40086" CreationDate="2023-05-23T11:02:17.373" UserId="3440" Text="I have a substrate node of Polkadot 0.9.28.  It is customised to enable contracts, and I have enabled the contract and runtime pallets. The tutorial I worked on is no more available in substrate docs. I have updated my Ink version from 3 to 4. Now while working with the nodejs to deploy the contract on the chain I am facing issues. I have updated my *@polkadot/api* and *@polkadot/api-contrat* packages. I don't know why the development does not work. Hence I would like to update Polakdot to a new version while retaining the features of **contract-pallet** and **runtime-pallet**. Is there a way to update it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33803" PostHistoryTypeId="1" PostId="8610" RevisionGUID="1ba3d87a-46c0-4560-91ba-cbd661d40086" CreationDate="2023-05-23T11:02:17.373" UserId="3440" Text="upgrading substrate node from Polkadot 0.9.28 to 0.9.40" ContentLicense="CC BY-SA 4.0" />
  <row Id="33804" PostHistoryTypeId="3" PostId="8610" RevisionGUID="1ba3d87a-46c0-4560-91ba-cbd661d40086" CreationDate="2023-05-23T11:02:17.373" UserId="3440" Text="|substrate-node-template|pallet|pallet-contracts|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33805" PostHistoryTypeId="2" PostId="8611" RevisionGUID="67b40267-def7-4473-ab9c-99efabe90e13" CreationDate="2023-05-23T11:46:32.427" UserId="354" Text="There are three cases according to me in your case:&#xD;&#xA;&#xD;&#xA; - If you haven't done any changes in the contracts pallet or any other pallet than you are good to go with a runtime upgrade from `0.9.28` -&gt; `0.9.40` using  the tutorial [https://docs.substrate.io/maintain/runtime-upgrades/][1]. &#xD;&#xA; - But if there are some changes in your `contracts pallet` than you need to apply those changes in `0.9.40` and do the runtime upgrade. &#xD;&#xA; - But if there are some breaking changes than you need to a storage migration with the runtime upgrade for that you can follow [https://docs.substrate.io/reference/how-to-guides/storage-migrations/][2].&#xD;&#xA;&#xD;&#xA;After identifying what you require for your case, you can once try it on development mode are make a [private network][3] replicating your scenario to test it out first.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/maintain/runtime-upgrades/&#xD;&#xA;  [2]: https://docs.substrate.io/reference/how-to-guides/storage-migrations/&#xD;&#xA;  [3]: https://docs.substrate.io/tutorials/build-a-blockchain/simulate-network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="33807" PostHistoryTypeId="52" PostId="8605" RevisionGUID="85899cad-3895-41bf-805c-128f19cec4d1" CreationDate="2023-05-23T12:14:36.877" />
  <row Id="33808" PostHistoryTypeId="2" PostId="8612" RevisionGUID="bcb5dc67-f4d6-4434-a7fd-5441f6741996" CreationDate="2023-05-23T12:15:45.043" UserId="3955" Text="What is idiomatic way to get peer's [Multiaddr][1] given we have its [PeerId][2]?&#xD;&#xA;&#xD;&#xA;There exists [get_authority_ids_by_peer_id][3] which seems useful but when spinning up multiple nodes locally which connect to each other it always returns `None`.&#xD;&#xA;&#xD;&#xA;Digging into it, it seems internal `addr_cache` (which holds `PeerId` -&gt; `AuthorityId` -&gt; `Multiaddr` mappings) is only populated when handling `DhtEvent::ValueFound(...)` which are not being emitted in my case.&#xD;&#xA;&#xD;&#xA;Some background info on how I run nodes locally:&#xD;&#xA;1. spin up first node with `alice` account&#xD;&#xA;2. spin up 4 more nodes using also predefined accounts by setting 1. as bootnode&#xD;&#xA;&#xD;&#xA;Looking at node logs and invoking `system_peers` RPC confirms nodes are connected with each other.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/libp2p/latest/libp2p/struct.Multiaddr.html&#xD;&#xA;  [2]: https://docs.rs/libp2p/latest/libp2p/struct.PeerId.html&#xD;&#xA;  [3]: https://docs.rs/sc-authority-discovery/latest/sc_authority_discovery/struct.Service.html#method.get_authority_ids_by_peer_id" ContentLicense="CC BY-SA 4.0" />
  <row Id="33810" PostHistoryTypeId="1" PostId="8612" RevisionGUID="bcb5dc67-f4d6-4434-a7fd-5441f6741996" CreationDate="2023-05-23T12:15:45.043" UserId="3955" Text="How to get Multiaddr of a peer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33811" PostHistoryTypeId="3" PostId="8612" RevisionGUID="bcb5dc67-f4d6-4434-a7fd-5441f6741996" CreationDate="2023-05-23T12:15:45.043" UserId="3955" Text="|peers|multiaddress|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33812" PostHistoryTypeId="2" PostId="8613" RevisionGUID="021b58c4-387d-4f59-8298-fb7c87c67693" CreationDate="2023-05-23T14:49:31.097" UserId="3850" Text="Is it possible to control a nomination pool via XCM from a Parachain and is there any related documentation for this. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33814" PostHistoryTypeId="1" PostId="8613" RevisionGUID="021b58c4-387d-4f59-8298-fb7c87c67693" CreationDate="2023-05-23T14:49:31.097" UserId="3850" Text="Does Polkadot expose nomination pool extrinsics via XCM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33815" PostHistoryTypeId="3" PostId="8613" RevisionGUID="021b58c4-387d-4f59-8298-fb7c87c67693" CreationDate="2023-05-23T14:49:31.097" UserId="3850" Text="|parachain|xcm|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33816" PostHistoryTypeId="2" PostId="8614" RevisionGUID="dbdee519-acc8-4085-9f9b-4b7e06ff9399" CreationDate="2023-05-23T16:38:14.330" UserId="3112" Text="I am attempting to build a smart contract for an imaginary burger shop. But I keep getting this error when I run the build command. &#xD;&#xA;&#xD;&#xA;[![the wasm*-unknown-unknown targets are not supported by default][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ctCCT.png&#xD;&#xA;&#xD;&#xA;The test compiles, and `cargo check` compiles successfully too. &#xD;&#xA;&#xD;&#xA;Here is the source code.&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod burger_shop {&#xD;&#xA;&#xD;&#xA;    use ink::prelude::*;&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use scale::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct BurgerShop {&#xD;&#xA;        orders: Vec&lt;(u32, Order)&gt;,&#xD;&#xA;        orders_mapping: Mapping&lt;u32, Order&gt;,&#xD;&#xA;        shop_owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // TODO: add logic to calculate gas fees for user&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Order {&#xD;&#xA;        burger_menu: String,&#xD;&#xA;        customer: AccountId,&#xD;&#xA;        price: u32,&#xD;&#xA;        amount: u32,&#xD;&#xA;        paid: bool,&#xD;&#xA;        delivered: bool,&#xD;&#xA;        status: Status,&#xD;&#xA;        completed: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Provide a detailed comment on the error&#xD;&#xA;        PaymentError,&#xD;&#xA;        OrderNotCompleted,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // result type&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    pub enum Status {&#xD;&#xA;        GettingIngredients,&#xD;&#xA;        Preparing,&#xD;&#xA;        SentForDelivery,&#xD;&#xA;        Delivered,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for Status {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Status::GettingIngredients&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl BurgerShop {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let list_of_orders = Mapping::new();&#xD;&#xA;            Self {&#xD;&#xA;                orders: vec![],&#xD;&#xA;                orders_mapping: list_of_orders,&#xD;&#xA;                shop_owner: Self::env().caller(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        /// A message that can be called on instantiated contracts.&#xD;&#xA;        /// This one flips the value of the stored `bool` from `true`&#xD;&#xA;        /// to `false` and vice versa.&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_orders(&amp;self) -&gt; Vec&lt;(u32, Order)&gt; {&#xD;&#xA;            // ensure the call is from the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;            self.orders.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn new_order(&amp;mut self, order: Order) {&#xD;&#xA;            let count = self.orders.len() as u32;&#xD;&#xA;            // ensure order is from the customer&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(&#xD;&#xA;                order.completed == false,&#xD;&#xA;                &quot;Cant add an already completed order!&quot;&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            self.orders_mapping.insert(count, &amp;order);&#xD;&#xA;&#xD;&#xA;            self.orders.push((count, order));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_single_order(&amp;self, id: u32) -&gt; (u32, Order) {&#xD;&#xA;            let tuple_order = (id, self.orders_mapping.get(id).expect(&quot;Order not found!&quot;));&#xD;&#xA;            tuple_order&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mark_completed(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;            assert!(order.paid == true, &quot;Order not paid!&quot;);&#xD;&#xA;            assert!(order.delivered == true, &quot;Order not delivered!&quot;);&#xD;&#xA;            assert!(order.status == Status::Delivered, &quot;Order not delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            if order.paid &amp;&amp; order.delivered &amp;&amp; order.status == Status::Delivered {&#xD;&#xA;                order.completed = true;&#xD;&#xA;                Ok(())&#xD;&#xA;            } else {&#xD;&#xA;                Err(Error::OrderNotCompleted)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn make_payment(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;            assert!(order.paid == false, &quot;Order already paid!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that sender is the caller&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not delivered&#xD;&#xA;            assert!(order.delivered == false, &quot;Order already delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            // make payment&#xD;&#xA;            match self.env().transfer(self.shop_owner, order.price.into()) {&#xD;&#xA;                Ok(_) =&gt; {&#xD;&#xA;                    order.paid = true;&#xD;&#xA;                    order.status = Status::Preparing;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                Err(_) =&gt; Err(Error::PaymentError),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn change_status(&amp;mut self, id: u32, status: Status) {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure caller is the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            order.status = status;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn it_works() {&#xD;&#xA;            let mut burger_shop = BurgerShop::new();&#xD;&#xA;            let order = Order {&#xD;&#xA;                burger_menu: &quot;Cheese Burger&quot;.to_string(),&#xD;&#xA;                customer: AccountId::from([0x01; 32]),&#xD;&#xA;                price: 100,&#xD;&#xA;                amount: 1,&#xD;&#xA;                paid: false,&#xD;&#xA;                delivered: false,&#xD;&#xA;                status: Status::GettingIngredients,&#xD;&#xA;                completed: false,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            burger_shop.new_order(order.clone());&#xD;&#xA;&#xD;&#xA;            let orders = burger_shop.get_orders();&#xD;&#xA;            assert_eq!(orders.len(), 1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What could I be doing wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33818" PostHistoryTypeId="1" PostId="8614" RevisionGUID="dbdee519-acc8-4085-9f9b-4b7e06ff9399" CreationDate="2023-05-23T16:38:14.330" UserId="3112" Text="&quot;the wasm*-unknown-unknown targets are not supported by default&quot; -error while compiling ink smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="33819" PostHistoryTypeId="3" PostId="8614" RevisionGUID="dbdee519-acc8-4085-9f9b-4b7e06ff9399" CreationDate="2023-05-23T16:38:14.330" UserId="3112" Text="|ink|rust|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33820" PostHistoryTypeId="5" PostId="8614" RevisionGUID="e46411c0-9376-4791-a733-f0360ade012a" CreationDate="2023-05-23T16:40:16.993" UserId="3112" Comment="deleted 180 characters in body" Text="I am attempting to build a smart contract for an imaginary burger shop. But I keep getting this error when I run the build command. &#xD;&#xA;&#xD;&#xA;[![the wasm*-unknown-unknown targets are not supported by default][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ctCCT.png&#xD;&#xA;&#xD;&#xA;The test compiles, and `cargo check` compiles successfully too. &#xD;&#xA;&#xD;&#xA;Here is the source code.&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod burger_shop {&#xD;&#xA;&#xD;&#xA;    use ink::prelude::*;&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use scale::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct BurgerShop {&#xD;&#xA;        orders: Vec&lt;(u32, Order)&gt;,&#xD;&#xA;        orders_mapping: Mapping&lt;u32, Order&gt;,&#xD;&#xA;        shop_owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // TODO: add logic to calculate gas fees for user&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Order {&#xD;&#xA;        burger_menu: String,&#xD;&#xA;        customer: AccountId,&#xD;&#xA;        price: u32,&#xD;&#xA;        amount: u32,&#xD;&#xA;        paid: bool,&#xD;&#xA;        delivered: bool,&#xD;&#xA;        status: Status,&#xD;&#xA;        completed: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Provide a detailed comment on the error&#xD;&#xA;        PaymentError,&#xD;&#xA;        OrderNotCompleted,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // result type&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    pub enum Status {&#xD;&#xA;        GettingIngredients,&#xD;&#xA;        Preparing,&#xD;&#xA;        SentForDelivery,&#xD;&#xA;        Delivered,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for Status {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Status::GettingIngredients&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl BurgerShop {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let list_of_orders = Mapping::new();&#xD;&#xA;            Self {&#xD;&#xA;                orders: vec![],&#xD;&#xA;                orders_mapping: list_of_orders,&#xD;&#xA;                shop_owner: Self::env().caller(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_orders(&amp;self) -&gt; Vec&lt;(u32, Order)&gt; {&#xD;&#xA;            // ensure the call is from the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;            self.orders.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn new_order(&amp;mut self, order: Order) {&#xD;&#xA;            let count = self.orders.len() as u32;&#xD;&#xA;            // ensure order is from the customer&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(&#xD;&#xA;                order.completed == false,&#xD;&#xA;                &quot;Cant add an already completed order!&quot;&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            self.orders_mapping.insert(count, &amp;order);&#xD;&#xA;&#xD;&#xA;            self.orders.push((count, order));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_single_order(&amp;self, id: u32) -&gt; (u32, Order) {&#xD;&#xA;            let tuple_order = (id, self.orders_mapping.get(id).expect(&quot;Order not found!&quot;));&#xD;&#xA;            tuple_order&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mark_completed(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;            assert!(order.paid == true, &quot;Order not paid!&quot;);&#xD;&#xA;            assert!(order.delivered == true, &quot;Order not delivered!&quot;);&#xD;&#xA;            assert!(order.status == Status::Delivered, &quot;Order not delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            if order.paid &amp;&amp; order.delivered &amp;&amp; order.status == Status::Delivered {&#xD;&#xA;                order.completed = true;&#xD;&#xA;                Ok(())&#xD;&#xA;            } else {&#xD;&#xA;                Err(Error::OrderNotCompleted)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn make_payment(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;            assert!(order.paid == false, &quot;Order already paid!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that sender is the caller&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not delivered&#xD;&#xA;            assert!(order.delivered == false, &quot;Order already delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            // make payment&#xD;&#xA;            match self.env().transfer(self.shop_owner, order.price.into()) {&#xD;&#xA;                Ok(_) =&gt; {&#xD;&#xA;                    order.paid = true;&#xD;&#xA;                    order.status = Status::Preparing;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                Err(_) =&gt; Err(Error::PaymentError),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn change_status(&amp;mut self, id: u32, status: Status) {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure caller is the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            order.status = status;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn it_works() {&#xD;&#xA;            let mut burger_shop = BurgerShop::new();&#xD;&#xA;            let order = Order {&#xD;&#xA;                burger_menu: &quot;Cheese Burger&quot;.to_string(),&#xD;&#xA;                customer: AccountId::from([0x01; 32]),&#xD;&#xA;                price: 100,&#xD;&#xA;                amount: 1,&#xD;&#xA;                paid: false,&#xD;&#xA;                delivered: false,&#xD;&#xA;                status: Status::GettingIngredients,&#xD;&#xA;                completed: false,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            burger_shop.new_order(order.clone());&#xD;&#xA;&#xD;&#xA;            let orders = burger_shop.get_orders();&#xD;&#xA;            assert_eq!(orders.len(), 1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What could I be doing wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33821" PostHistoryTypeId="5" PostId="8612" RevisionGUID="5f61f844-0779-428b-842e-804f56fa7966" CreationDate="2023-05-23T16:50:12.137" UserId="3955" Comment="added 247 characters in body" Text="What is idiomatic way to get peer's [Multiaddr][1] given we have its [PeerId][2]?&#xD;&#xA;&#xD;&#xA;There exists [get_authority_ids_by_peer_id][3] which seems useful but when spinning up multiple nodes locally which connect to each other it always returns `None`.&#xD;&#xA;&#xD;&#xA;Digging into it, it seems internal `addr_cache` (which holds `PeerId` -&gt; `AuthorityId` -&gt; `Multiaddr` mappings) is only populated when handling `DhtEvent::ValueFound(...)` which are not being emitted in my case.&#xD;&#xA;&#xD;&#xA;Some background info on how I run nodes locally:&#xD;&#xA;1. spin up first node with `alice` account&#xD;&#xA;2. spin up 4 more nodes using also predefined accounts by setting 1. as bootnode&#xD;&#xA;&#xD;&#xA;Looking at node logs and invoking `system_peers` RPC confirms nodes are connected with each other.&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;&#xD;&#xA;Seems like `DhtEvent::ValueNotFound(...)` events are being emitted for corresponding Kademlia `get_value` requests that `authority-discovery` worker is creating. So it's probably problem with DHT not having proper entries initially.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/libp2p/latest/libp2p/struct.Multiaddr.html&#xD;&#xA;  [2]: https://docs.rs/libp2p/latest/libp2p/struct.PeerId.html&#xD;&#xA;  [3]: https://docs.rs/sc-authority-discovery/latest/sc_authority_discovery/struct.Service.html#method.get_authority_ids_by_peer_id" ContentLicense="CC BY-SA 4.0" />
  <row Id="33822" PostHistoryTypeId="2" PostId="8615" RevisionGUID="f12e34f8-9eef-4f4b-beea-897cb22689b6" CreationDate="2023-05-23T17:17:20.800" UserId="3035" Text="There is no specific instructions for the nomination pools in XCM protocol. &#xD;&#xA;But you can use `Transact` instruction of the protocol to execute arbitrary call/s on a remote chain.&#xD;&#xA;&#xD;&#xA; - https://github.com/paritytech/xcm-format#transact&#xD;&#xA; - https://github.com/paritytech/polkadot/blob/e05b78689d3fb0deb555ede9f0f0e191cc5e18b5/xcm/src/v3/mod.rs#L480" ContentLicense="CC BY-SA 4.0" />
  <row Id="33824" PostHistoryTypeId="5" PostId="8615" RevisionGUID="8b9e43ab-80f5-4fff-a95a-83d43605680a" CreationDate="2023-05-23T17:23:01.137" UserId="3035" Comment="added 507 characters in body" Text="There is no specific instructions for the nomination pools in XCM protocol. &#xD;&#xA;But you can use `Transact` instruction of the protocol to execute arbitrary call/s on a remote chain.&#xD;&#xA;&#xD;&#xA;It should be possible to execute nomination pool call over XCM from the parachains. The execution should be paid (check the barriers).&#xD;&#xA; - barriers which you should take into account - https://github.com/paritytech/polkadot/blob/7c1dc9429245d705ffb188b16ad5339c6de281c1/runtime/polkadot/src/xcm_config.rs#L158&#xD;&#xA; - calls filter which includes nomination pools - https://github.com/paritytech/polkadot/blob/7c1dc9429245d705ffb188b16ad5339c6de281c1/runtime/polkadot/src/xcm_config.rs#L286&#xD;&#xA; - docs - https://github.com/paritytech/xcm-format#transact&#xD;&#xA; - instruction -https://github.com/paritytech/polkadot/blob/e05b78689d3fb0deb555ede9f0f0e191cc5e18b5/xcm/src/v3/mod.rs#L480" ContentLicense="CC BY-SA 4.0" />
  <row Id="33825" PostHistoryTypeId="50" PostId="4460" RevisionGUID="60735bd2-d6d0-44c5-ac9b-871ae4c3dfb5" CreationDate="2023-05-23T22:07:31.040" UserId="-1" />
  <row Id="33826" PostHistoryTypeId="52" PostId="8613" RevisionGUID="18477bbd-70ad-4edf-88c0-2ce6be2caf95" CreationDate="2023-05-23T22:49:44.977" />
  <row Id="33827" PostHistoryTypeId="5" PostId="8511" RevisionGUID="768f72c9-758b-4251-ae5e-6d4313b2f492" CreationDate="2023-05-23T23:24:59.677" UserId="3344" Comment="Add subxt detail" Text="Collating information here that (eventually, in the fullness of time, etc.) should address the use case. Open questions will reflect the state of play.&#xD;&#xA;&#xD;&#xA;- The [NFTs pallet](https://github.com/paritytech/substrate/tree/master/frame/nfts) has [`set_team`](https://paritytech.github.io/substrate/master/pallet_nfts/pallet/dispatchables/fn.set_team.html) to set the Issuer, Admin and Freezer of a collection. The [uniques](https://paritytech.github.io/substrate/master/pallet_uniques/index.html) pallet is deprecated (HT: @alex-bean ).&#xD;&#xA;- Offline transactions can be prepared using:&#xD;&#xA;  - Rust: [`subxt`](https://github.com/paritytech/subxt) may have to implement something like [`createSignedTx`](https://github.com/paritytech/txwrapper-core/blob/v4.0.1/packages/txwrapper-core/src/core/construct/createSignedTx.ts) from the Typescript txwrapper-core.&#xD;&#xA;  - Typescript: [`txwrapper`](https://wiki.polkadot.network/docs/build-transaction-construction#tx-wrapper)&#xD;&#xA;- Multisig-like functionality could be achieved via council+treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="33829" PostHistoryTypeId="5" PostId="8511" RevisionGUID="87656113-cdce-4280-aebb-de28f842c05d" CreationDate="2023-05-24T00:39:08.713" UserId="3344" Comment="Add subxt links" Text="Collating information here that (eventually, in the fullness of time, etc.) should address the use case. Open questions will reflect the state of play.&#xD;&#xA;&#xD;&#xA;- The [NFTs pallet](https://github.com/paritytech/substrate/tree/master/frame/nfts) has [`set_team`](https://paritytech.github.io/substrate/master/pallet_nfts/pallet/dispatchables/fn.set_team.html) to set the Issuer, Admin and Freezer of a collection. The [uniques](https://paritytech.github.io/substrate/master/pallet_uniques/index.html) pallet is deprecated (HT: @alex-bean ).&#xD;&#xA;- Offline transactions can be prepared using:&#xD;&#xA;  - Rust: [`subxt`](https://github.com/paritytech/subxt). Creating un/signed transactions is [supported out-of-the-box](https://github.com/paritytech/subxt/blob/f344d0dd4d96c4b6398900a40546ec6660a8134a/testing/integration-tests/src/blocks/mod.rs#L132), and has [documentation](https://github.com/paritytech/subxt/blob/f344d0dd4d96c4b6398900a40546ec6660a8134a/subxt/src/book/usage/transactions.rs).&#xD;&#xA;  - Typescript: [`txwrapper`](https://wiki.polkadot.network/docs/build-transaction-construction#tx-wrapper)&#xD;&#xA;- Multisig-like functionality could be achieved via council+treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="33830" PostHistoryTypeId="5" PostId="4460" RevisionGUID="40f1c549-c1f3-4748-bc41-8fd168cb4f9e" CreationDate="2023-05-24T04:53:24.447" UserId="2281" Comment="added 12 characters in body" Text="I want to modify some `on-chain storage` from `offchain` worker by sending a `signed transaction`, so I write a dispatch function which handles the transaction. But the dispatch function also can be accessed from other way as normal（such as a user sign an extrinsic out of blockchain）. I want to block the other ways so the on-chain storage only can be modified by `offchain worker`. How to do this, or is there any method that can distinguish different access path？&#xD;&#xA;&#xD;&#xA;Or how can I extract the `KeyTypeId` from `AccountId`？？" ContentLicense="CC BY-SA 4.0" />
  <row Id="33831" PostHistoryTypeId="2" PostId="8616" RevisionGUID="1dd1563a-d52a-4dfc-93fe-5a0190406e13" CreationDate="2023-05-24T08:33:21.197" UserId="258" Text="I have a pallet which ensures a particular custom origin  of H160(20 bytes). Actually, this pallet is to ensure that the Origin is that of an ethereum address(20 bytes).&#xD;&#xA;&#xD;&#xA;I am therefore writing Integration tests using PolkadotJS, how can i send and sign a transaction by using a 20 bytes address origin?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33833" PostHistoryTypeId="1" PostId="8616" RevisionGUID="1dd1563a-d52a-4dfc-93fe-5a0190406e13" CreationDate="2023-05-24T08:33:21.197" UserId="258" Text="How can I sign and execute transactions using custom origin(20 bytes address) in PolkadotJS" ContentLicense="CC BY-SA 4.0" />
  <row Id="33834" PostHistoryTypeId="3" PostId="8616" RevisionGUID="1dd1563a-d52a-4dfc-93fe-5a0190406e13" CreationDate="2023-05-24T08:33:21.197" UserId="258" Text="|polkadot-js|polkadot|blockchain|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33835" PostHistoryTypeId="2" PostId="8617" RevisionGUID="1bcba24d-0697-46d8-958c-d188f4e358da" CreationDate="2023-05-24T08:39:44.287" UserId="139" Text="In a substrate runtime, take the node-template as an example, we have two definitions from `Block`, among other types such as `BlockId` but let's focus on `Block`.. : &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// runtime/src/lib.rs&#xD;&#xA;pub type Block = generic::Block&lt;Header, UncheckedExtrinsic&gt;;&#xD;&#xA;&#xD;&#xA;pub mod opaque {&#xD;&#xA; pub type Block = generic::Block&lt;Header, UncheckedExtrinsic&gt;;&#xD;&#xA; // -- snip --&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, as per my understanding, these `opaque::*` types are used in the client side of things as a placeholder type to correctly check trait bounds, for instance, when instantiating an RPC server, you must make sure that your runtime has the correct `RuntimeApi`s. For that you need this type information such as `Block` as demonstrated in the trait bound below : &#xD;&#xA;```rust&#xD;&#xA;// node/src/rpc.rs&#xD;&#xA;fn create_full&lt;_&gt;() where ... // -- snip --&#xD;&#xA;	C::Api: BlockBuilder&lt;Block&gt;, // Here, Block is runtime::opaque::Block&#xD;&#xA;    { ... } &#xD;&#xA;```&#xD;&#xA;and from what I see, this is generally imported as: &#xD;&#xA;```rust&#xD;&#xA;use runtime::opaque::Block;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A brief description of opaque types is given just above the `opaque` module as : &#xD;&#xA;```&#xD;&#xA;Opaque types. These are used by the CLI to instantiate machinery that don't need to know&#xD;&#xA;the specifics of the runtime. They can then be made to be agnostic over specific formats&#xD;&#xA;of data like extrinsics, allowing for them to continue syncing the network through upgrades&#xD;&#xA;to even the core data structures.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My question:  &#xD;&#xA;&#xD;&#xA;Why use `runtime::opaque::Block` instead of `runtime::Block` ? If I understand correctly, `opaque::Block` and `Block` must be aliases to the same type in the runtime or else we couldn't make sure that our trait bounds for RuntimeApis would be satisfied in the node-client code. In other words, I don't quite understand the rationale behind Opaque types as pasted above.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33837" PostHistoryTypeId="1" PostId="8617" RevisionGUID="1bcba24d-0697-46d8-958c-d188f4e358da" CreationDate="2023-05-24T08:39:44.287" UserId="139" Text="What's the difference between the runtime Block type and the opaque::Block type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33838" PostHistoryTypeId="3" PostId="8617" RevisionGUID="1bcba24d-0697-46d8-958c-d188f4e358da" CreationDate="2023-05-24T08:39:44.287" UserId="139" Text="|runtime|block|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33839" PostHistoryTypeId="5" PostId="8614" RevisionGUID="fe417b5a-c4ab-4cc6-9551-c3d9b24d9725" CreationDate="2023-05-24T09:52:19.100" UserId="3112" Comment="added 694 characters in body" Text="I am attempting to build a smart contract for an imaginary burger shop. But I keep getting this error when I run the build command. &#xD;&#xA;&#xD;&#xA;[![the wasm*-unknown-unknown targets are not supported by default][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ctCCT.png&#xD;&#xA;&#xD;&#xA;The test compiles, and `cargo check` compiles successfully too. &#xD;&#xA;&#xD;&#xA;Here is the source code.&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod burger_shop {&#xD;&#xA;&#xD;&#xA;    use ink::prelude::*;&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use scale::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct BurgerShop {&#xD;&#xA;        orders: Vec&lt;(u32, Order)&gt;,&#xD;&#xA;        orders_mapping: Mapping&lt;u32, Order&gt;,&#xD;&#xA;        shop_owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // TODO: add logic to calculate gas fees for user&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Order {&#xD;&#xA;        burger_menu: String,&#xD;&#xA;        customer: AccountId,&#xD;&#xA;        price: u32,&#xD;&#xA;        amount: u32,&#xD;&#xA;        paid: bool,&#xD;&#xA;        delivered: bool,&#xD;&#xA;        status: Status,&#xD;&#xA;        completed: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Provide a detailed comment on the error&#xD;&#xA;        PaymentError,&#xD;&#xA;        OrderNotCompleted,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // result type&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    pub enum Status {&#xD;&#xA;        GettingIngredients,&#xD;&#xA;        Preparing,&#xD;&#xA;        SentForDelivery,&#xD;&#xA;        Delivered,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for Status {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Status::GettingIngredients&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl BurgerShop {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let list_of_orders = Mapping::new();&#xD;&#xA;            Self {&#xD;&#xA;                orders: vec![],&#xD;&#xA;                orders_mapping: list_of_orders,&#xD;&#xA;                shop_owner: Self::env().caller(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_orders(&amp;self) -&gt; Vec&lt;(u32, Order)&gt; {&#xD;&#xA;            // ensure the call is from the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;            self.orders.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn new_order(&amp;mut self, order: Order) {&#xD;&#xA;            let count = self.orders.len() as u32;&#xD;&#xA;            // ensure order is from the customer&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(&#xD;&#xA;                order.completed == false,&#xD;&#xA;                &quot;Cant add an already completed order!&quot;&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            self.orders_mapping.insert(count, &amp;order);&#xD;&#xA;&#xD;&#xA;            self.orders.push((count, order));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_single_order(&amp;self, id: u32) -&gt; (u32, Order) {&#xD;&#xA;            let tuple_order = (id, self.orders_mapping.get(id).expect(&quot;Order not found!&quot;));&#xD;&#xA;            tuple_order&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mark_completed(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;            assert!(order.paid == true, &quot;Order not paid!&quot;);&#xD;&#xA;            assert!(order.delivered == true, &quot;Order not delivered!&quot;);&#xD;&#xA;            assert!(order.status == Status::Delivered, &quot;Order not delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            if order.paid &amp;&amp; order.delivered &amp;&amp; order.status == Status::Delivered {&#xD;&#xA;                order.completed = true;&#xD;&#xA;                Ok(())&#xD;&#xA;            } else {&#xD;&#xA;                Err(Error::OrderNotCompleted)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn make_payment(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;            assert!(order.paid == false, &quot;Order already paid!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that sender is the caller&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not delivered&#xD;&#xA;            assert!(order.delivered == false, &quot;Order already delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            // make payment&#xD;&#xA;            match self.env().transfer(self.shop_owner, order.price.into()) {&#xD;&#xA;                Ok(_) =&gt; {&#xD;&#xA;                    order.paid = true;&#xD;&#xA;                    order.status = Status::Preparing;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                Err(_) =&gt; Err(Error::PaymentError),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn change_status(&amp;mut self, id: u32, status: Status) {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure caller is the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            order.status = status;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn it_works() {&#xD;&#xA;            let mut burger_shop = BurgerShop::new();&#xD;&#xA;            let order = Order {&#xD;&#xA;                burger_menu: &quot;Cheese Burger&quot;.to_string(),&#xD;&#xA;                customer: AccountId::from([0x01; 32]),&#xD;&#xA;                price: 100,&#xD;&#xA;                amount: 1,&#xD;&#xA;                paid: false,&#xD;&#xA;                delivered: false,&#xD;&#xA;                status: Status::GettingIngredients,&#xD;&#xA;                completed: false,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            burger_shop.new_order(order.clone());&#xD;&#xA;&#xD;&#xA;            let orders = burger_shop.get_orders();&#xD;&#xA;            assert_eq!(orders.len(), 1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What could I be doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the Cargo.toml file &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```lang-toml&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;name = &quot;burger_shop&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Ayomide Bajo &lt;oluwashinabajo@gmail.com&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.1&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;sp-io = &quot;22.0.0&quot;&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.0.1&quot;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33840" PostHistoryTypeId="2" PostId="8618" RevisionGUID="174778db-db6a-4225-a1aa-c41fc764d75a" CreationDate="2023-05-24T10:02:30.780" UserId="3711" Text="Resolved via an issue raised on the (ink github)[https://github.com/paritytech/ink/pull/1787]. This will be available in releases post ink v4.2." ContentLicense="CC BY-SA 4.0" />
  <row Id="33842" PostHistoryTypeId="2" PostId="8619" RevisionGUID="7d7531c5-a444-4d44-9145-eb72618f6e60" CreationDate="2023-05-24T10:35:27.747" UserId="4161" Text="Is there a way to backup ink smart contract storage and later restore on another chain? Lets say we have chain with 3 validators and deployed smart contract containing certain information in its storage. &#xD;&#xA;&#xD;&#xA;Next we setup a larger chain with 300 validators. How can we migrate smart contracts storage to this newer chain ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33844" PostHistoryTypeId="1" PostId="8619" RevisionGUID="7d7531c5-a444-4d44-9145-eb72618f6e60" CreationDate="2023-05-24T10:35:27.747" UserId="4161" Text="How to migrate / backup &amp; restore ink smart contract storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33845" PostHistoryTypeId="3" PostId="8619" RevisionGUID="7d7531c5-a444-4d44-9145-eb72618f6e60" CreationDate="2023-05-24T10:35:27.747" UserId="4161" Text="|ink|smart-contract|storage|nodes|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33846" PostHistoryTypeId="2" PostId="8620" RevisionGUID="78001c33-c2a6-4164-880b-68961f8a9a47" CreationDate="2023-05-24T10:52:27.343" UserId="377" Text="On one hand, if we emit extrinsic event with no data and other hand we emit the extrinsic event with data. &#xD;&#xA;Will the second option will increase the block size or on both cases the block-size will be same?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33848" PostHistoryTypeId="1" PostId="8620" RevisionGUID="78001c33-c2a6-4164-880b-68961f8a9a47" CreationDate="2023-05-24T10:52:27.343" UserId="377" Text="Do data in events increase the size of the block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33849" PostHistoryTypeId="3" PostId="8620" RevisionGUID="78001c33-c2a6-4164-880b-68961f8a9a47" CreationDate="2023-05-24T10:52:27.343" UserId="377" Text="|block-production|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33850" PostHistoryTypeId="2" PostId="8621" RevisionGUID="8f4a4493-e4d6-4ede-a9cd-a67fc571cdc0" CreationDate="2023-05-24T10:58:46.370" UserId="4068" Text="When you go through the openbrush smart contract library. You will notice they are using upgradeble smart contract storage and while diffiening storage they are uing some empty struct as key of perticuler lib name  and using pub _reserved: Option&lt;()&gt;, in data stuct.&#xD;&#xA;&#xD;&#xA;    pub const STORAGE_KEY: u32 = openbrush::storage_unique_key!(Data);&#xD;&#xA;&#xD;&#xA;#[derive(Default, Debug)]&#xD;&#xA;#[openbrush::upgradeable_storage(STORAGE_KEY)]&#xD;&#xA;pub struct Data {&#xD;&#xA;    pub attributes: Mapping&lt;(Id, String), String, AttributesKey&gt;,&#xD;&#xA;    pub _reserved: Option&lt;()&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub token_owner: Mapping&lt;Id, Owner&gt;,&#xD;&#xA;&#xD;&#xA;pub struct AttributesKey;&#xD;&#xA;&#xD;&#xA;impl&lt;'a&gt; TypeGuard&lt;'a&gt; for AttributesKey {&#xD;&#xA;    type Type = &amp;'a (&amp;'a Id, &amp;'a String);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Why we use  pub struct AttributesKey and pub _reserved: Option&lt;()&gt; here ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33852" PostHistoryTypeId="1" PostId="8621" RevisionGUID="8f4a4493-e4d6-4ede-a9cd-a67fc571cdc0" CreationDate="2023-05-24T10:58:46.370" UserId="4068" Text="Why we use empty struct named as key of perticuler lib name in mapping while using it in storage of openbrush libraries" ContentLicense="CC BY-SA 4.0" />
  <row Id="33853" PostHistoryTypeId="3" PostId="8621" RevisionGUID="8f4a4493-e4d6-4ede-a9cd-a67fc571cdc0" CreationDate="2023-05-24T10:58:46.370" UserId="4068" Text="|ink|rust|substrate-contracts-node|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33854" PostHistoryTypeId="50" PostId="8175" RevisionGUID="4e5895c9-e832-4172-b94a-6c6afc28bf89" CreationDate="2023-05-24T11:00:35.127" UserId="-1" />
  <row Id="33855" PostHistoryTypeId="5" PostId="8621" RevisionGUID="bd444d31-d31e-4aee-8a28-ab34d07a86db" CreationDate="2023-05-24T11:47:08.087" UserId="2281" Comment="added 134 characters in body" Text="When you go through the openbrush smart contract library. You will notice they are using upgradeable smart contract storage and while defining storage they are using some empty struct as key of similar  lib name  and using `pub _reserved: Option&lt;()&gt;`, in data struct.&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     pub const STORAGE_KEY: u32 = openbrush::storage_unique_key!(Data)&#xD;&#xA;        &#xD;&#xA;        #[derive(Default, Debug)]&#xD;&#xA;        #[openbrush::upgradeable_storage(STORAGE_KEY)]&#xD;&#xA;        pub struct Data {&#xD;&#xA;            pub attributes: Mapping&lt;(Id, String), String, AttributesKey&gt;,&#xD;&#xA;            pub _reserved: Option&lt;()&gt;,&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        pub token_owner: Mapping&lt;Id, Owner&gt;,&#xD;&#xA;        &#xD;&#xA;        pub struct AttributesKey;&#xD;&#xA;        &#xD;&#xA;        impl&lt;'a&gt; TypeGuard&lt;'a&gt; for AttributesKey {&#xD;&#xA;            type Type = &amp;'a (&amp;'a Id, &amp;'a String);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Why we use  pub struct `AttributesKey` and `pub _reserved: Option&lt;()&gt;` here ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33856" PostHistoryTypeId="5" PostId="8619" RevisionGUID="42323460-c768-430d-b6e1-b5527668652b" CreationDate="2023-05-24T11:49:43.697" UserId="2281" Comment="added 8 characters in body" Text="Is there a way to backup ink smart contract `storage` and later restore on another chain? Lets say we have chain with `3 validators` and deployed smart contract containing certain information in its storage. &#xD;&#xA;&#xD;&#xA;Next we setup a `larger chain with 300 validators`. How can we `migrate smart contracts storage` to this newer chain ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33857" PostHistoryTypeId="2" PostId="8622" RevisionGUID="3ce43614-0160-4e3f-8856-bb9b968550aa" CreationDate="2023-05-24T11:53:32.187" UserId="29" Text="Looks like Ethereum is supported in `@polkadot/keyring`:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const PairFromSeed = {&#xD;&#xA;  ecdsa: (seed: Uint8Array): Keypair =&gt; secp256k1FromSeed(seed),&#xD;&#xA;  ed25519: (seed: Uint8Array): Keypair =&gt; ed25519FromSeed(seed),&#xD;&#xA;  ethereum: (seed: Uint8Array): Keypair =&gt; secp256k1FromSeed(seed),&#xD;&#xA;  sr25519: (seed: Uint8Array): Keypair =&gt; sr25519FromSeed(seed)&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;- https://github.com/polkadot-js/common/blob/dcf214f250d6effcb99629968e5a3de1468b31af/packages/keyring/src/keyring.ts#LL14C1-L19C3&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So you could do something like this:&#xD;&#xA;```js&#xD;&#xA;// Import the keyring as required&#xD;&#xA;import Keyring from '@polkadot/keyring';&#xD;&#xA;&#xD;&#xA;// Create a keyring instance&#xD;&#xA;const keyring = new Keyring({ type: 'ethereum' });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Moonbeam has excellent docs on this. As well as an example script:&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;import { Keyring } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;const wsProvider = new WsProvider('WSS-API-ENDPOINT-HERE');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;const keyring = new Keyring({ type: 'ethereum' });&#xD;&#xA;&#xD;&#xA;const alice = keyring.addFromUri('ALICE-ACCOUNT-PRIVATE-KEY-HERE');&#xD;&#xA;const bob = 'BOB-ACCOUNT-PUBLIC-KEY-HERE';&#xD;&#xA;&#xD;&#xA;const tx = await api.tx.balances&#xD;&#xA;  .transfer(bob, 12345n)&#xD;&#xA;&#xD;&#xA;const encodedCallData = tx.method.toHex()&#xD;&#xA;console.log(encodedCallData)&#xD;&#xA;&#xD;&#xA;const txHash = await tx&#xD;&#xA;  .signAndSend(alice);&#xD;&#xA;&#xD;&#xA;console.log(`Submitted with hash ${txHash}`);&#xD;&#xA;&#xD;&#xA;// Disconnect the API&#xD;&#xA;api.disconnect();&#xD;&#xA;```&#xD;&#xA;- https://docs.moonbeam.network/builders/build/substrate-api/polkadot-js-api/#transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="33859" PostHistoryTypeId="2" PostId="8623" RevisionGUID="b40aa05b-de2a-4b2f-abfa-377dc971ed28" CreationDate="2023-05-24T12:29:48.230" UserId="29" Text="The actual events are **not** stored in the block, rather they are part of your blockchain's state and are stored in your blockchain's **storage**.&#xD;&#xA;&#xD;&#xA;The state root is the only thing related to your events that is stored in the block and that will change accordingly.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Events deposited for the current block.&#xD;&#xA;///&#xD;&#xA;/// NOTE: The item is unbound and should therefore never be read on chain.&#xD;&#xA;/// It could otherwise inflate the PoV size of a block.&#xD;&#xA;///&#xD;&#xA;/// Events have a large in-memory size. Box the events to not go out-of-memory&#xD;&#xA;/// just in case someone still reads them from within the runtime.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::whitelist_storage]&#xD;&#xA;#[pallet::unbounded]&#xD;&#xA;pub(super) type Events&lt;T: Config&gt; =&#xD;&#xA;	StorageValue&lt;_, Vec&lt;Box&lt;EventRecord&lt;T::RuntimeEvent, T::Hash&gt;&gt;&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Events are stored in an unbounded vector in storage therefore you should never have logic in your runtime that interacts with events.&#xD;&#xA;&#xD;&#xA;So my advice is to analyze events from a blockchain storage perspective and not from a block perspective.&#xD;&#xA;&#xD;&#xA;For example, if you have lots of &quot;heavy&quot; events accumulating in your storage, it would require more of an archive node to sync with your chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Related questions:&#xD;&#xA;- https://substrate.stackexchange.com/questions/370/which-data-to-put-in-a-pallet-event&#xD;&#xA;- https://substrate.stackexchange.com/questions/4126/why-are-events-stored" ContentLicense="CC BY-SA 4.0" />
  <row Id="33861" PostHistoryTypeId="6" PostId="8620" RevisionGUID="ef700610-835c-433a-9d05-ee1db3f92d2c" CreationDate="2023-05-24T12:33:39.250" UserId="29" Comment="edited tags" Text="|events|block-production|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33862" PostHistoryTypeId="5" PostId="8610" RevisionGUID="96955c84-a1f4-4cbf-b950-9f87d6858f33" CreationDate="2023-05-24T13:10:29.753" UserId="2281" Comment="added 8 characters in body" Text="I have a substrate node of `Polkadot 0.9.28`.  It is customised to enable contracts, and I have enabled the contract and runtime pallets. The tutorial I worked on is no more available in substrate docs. I have updated my Ink version from `3 to 4`. Now while working with the nodejs to deploy the contract on the chain I am facing issues. I have updated my `@polkadot/api` and `@polkadot/api-contrat packages`. I don't know why the development does not work. Hence I would like to update Polakdot to a new version while retaining the features of **`contract-pallet`** and **`runtime-pallet`**. Is there a way to update it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33863" PostHistoryTypeId="5" PostId="6969" RevisionGUID="c25bce55-7842-442d-ae07-fff349447cbf" CreationDate="2023-05-24T13:13:19.463" UserId="2281" Comment="added 4 characters in body" Text="Solution to this is chill your nominators/validators, and validate/nominate again so that new implementation will record your votes in `T::VoterList.` And maybe `forceNewEra()` using sudo account.  re-try a couple of times until you see staking.Elected.&#xD;&#xA;&#xD;&#xA;Make sure you have setup a private network and you have minimum 3 validators." ContentLicense="CC BY-SA 4.0" />
  <row Id="33864" PostHistoryTypeId="2" PostId="8624" RevisionGUID="5d7552d5-e503-45f2-a33e-85b4c446ff00" CreationDate="2023-05-24T13:16:41.467" UserId="73" Text="Given the question in the comment, how to retrieve the addresses of all the peers the node is aware of: &#xD;&#xA;&#xD;&#xA;1. This is only giving you information that your node has been learned from other nodes. It doesn't mean that these are all nodes or similar. &#xD;&#xA;&#xD;&#xA;2. There is currently no way to access this information. You could &quot;abuse&quot; the the [`network_state`][1] function. However, as the docs already tell you, you should not use this function.&#xD;&#xA;&#xD;&#xA;3. I still think that you did not explained your issue well enough on what you want to achieve and thus, can not get proper help here. If I'm incorrect, you can open a pr to Substrate to give you this information in a more &quot;stable&quot; way, aka not using `network_state`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/3ff1afa643a2d1d552f463d923a10c5179267feb/client/network/src/service.rs#L632-L650" ContentLicense="CC BY-SA 4.0" />
  <row Id="33866" PostHistoryTypeId="2" PostId="8625" RevisionGUID="de0df811-05b6-4292-9a67-e2940e97dd9a" CreationDate="2023-05-24T13:16:50.137" UserId="496" Text="I've implemented ```use primitive_types::U256``` and now Im trying to return a U256 int as a result from one of my functions, but Im getting the following error ```the trait TypeInfo is not implemented for primitive_types::U256``` , I understand that i need to implement TypeInfo in my smart contract but i just dont understand how.&#xD;&#xA;&#xD;&#xA;Here is the mentioned function: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_est_price_psp22_to_a01(&#xD;&#xA;            &amp;self,&#xD;&#xA;            psp22_amount_in:Balance&#xD;&#xA;        )   -&gt; Result&lt;U256, TradingPairErrors&gt; {&#xD;&#xA;&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;&#xD;&#xA;            //fetching caller current PSP22 balance&#xD;&#xA;            let caller_current_balance:Balance = PSP22Ref::balance_of(&#xD;&#xA;                &amp;self.panx_contract,&#xD;&#xA;                caller&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            let actual_fee:Balance;&#xD;&#xA;&#xD;&#xA;            //calculating the actual LP fee&#xD;&#xA;            match self.fee.checked_div(10u128.pow(18)) {&#xD;&#xA;                Some(result) =&gt; {&#xD;&#xA;                    actual_fee = result;&#xD;&#xA;                }&#xD;&#xA;                None =&gt; {&#xD;&#xA;                    return Err(TradingPairErrors::Overflow);&#xD;&#xA;                }&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            let mut amount_in_with_lp_fees:Balance;&#xD;&#xA;&#xD;&#xA;            //reducting the LP fee from the PSP22 amount in&#xD;&#xA;            match psp22_amount_in.checked_mul(100u128 - actual_fee) {&#xD;&#xA;                Some(result) =&gt; {&#xD;&#xA;                    amount_in_with_lp_fees = result;&#xD;&#xA;                }&#xD;&#xA;                None =&gt; {&#xD;&#xA;                    return Err(TradingPairErrors::Overflow);&#xD;&#xA;                }&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            let tokens_to_validate:Balance = 3500u128 * 10u128.pow(18);&#xD;&#xA;&#xD;&#xA;            //validating if caller has more than 3500 PANX to verify if the caller is eligible for the incentive program &#xD;&#xA;            if caller_current_balance &gt;= tokens_to_validate{&#xD;&#xA;&#xD;&#xA;                if self.fee  &lt;= 1400000000000u128 {&#xD;&#xA;&#xD;&#xA;                    //reducting HALF of the LP fee from PSP22 amount in, if the caller has more than 3500 PANX and the LP fee is less than 1.4%&#xD;&#xA;                    match psp22_amount_in.checked_mul(100u128 - (actual_fee / 2u128)) {&#xD;&#xA;                        Some(result) =&gt; {&#xD;&#xA;                            amount_in_with_lp_fees = result;&#xD;&#xA;                        }&#xD;&#xA;                        None =&gt; {&#xD;&#xA;                            return Err(TradingPairErrors::Overflow);&#xD;&#xA;                        }&#xD;&#xA;                    };   &#xD;&#xA;                }&#xD;&#xA; &#xD;&#xA;                if self.fee  &gt; 1400000000000u128 {&#xD;&#xA;&#xD;&#xA;                    //reducting (LP fee - 1) of the LP fee from PSP22 amount in, if the caller has more than 3500 PANX and the LP fee is more than 1.4%&#xD;&#xA;                    match psp22_amount_in.checked_mul(100u128 - (actual_fee - 1u128)) {&#xD;&#xA;                        Some(result) =&gt; {&#xD;&#xA;                            amount_in_with_lp_fees = result;&#xD;&#xA;                        }&#xD;&#xA;                        None =&gt; {&#xD;&#xA;                            return Err(TradingPairErrors::Overflow);&#xD;&#xA;                        }&#xD;&#xA;                    };  &#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;             &#xD;&#xA;            let a0_amount_out = self.casted_div(amount_in_with_lp_fees * self.get_a0_balance(),(self.get_psp22_balance() * 100u128) + amount_in_with_lp_fees);&#xD;&#xA;            &#xD;&#xA;            //calculating the final A0 amount to transfer to the caller.&#xD;&#xA;            //match (amount_in_with_lp_fees * self.get_a0_balance()).checked_div((self.get_psp22_balance() * 100u128) + amount_in_with_lp_fees) {&#xD;&#xA;            //    Some(result) =&gt; {&#xD;&#xA;            //        a0_amount_out = result;&#xD;&#xA;            //    }&#xD;&#xA;            //    None =&gt; {&#xD;&#xA;            //        return Err(TradingPairErrors::Overflow);&#xD;&#xA;            //    }&#xD;&#xA;            //};&#xD;&#xA;&#xD;&#xA;            Ok(a0_amount_out)  &#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Im using &quot;casted_div&quot; function which takes 2 u128 objects and turns them into U256:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        fn casted_div(&#xD;&#xA;            &amp;self,&#xD;&#xA;            value1: u128,&#xD;&#xA;            value2: u128&#xD;&#xA;        ) -&gt; U256 {&#xD;&#xA;&#xD;&#xA;            U256::from(value1) / U256::from(value2)&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thank you and have a pleasant day :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="33868" PostHistoryTypeId="1" PostId="8625" RevisionGUID="de0df811-05b6-4292-9a67-e2940e97dd9a" CreationDate="2023-05-24T13:16:50.137" UserId="496" Text="Trying to implement U256 in rust ink! 4.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="33869" PostHistoryTypeId="3" PostId="8625" RevisionGUID="de0df811-05b6-4292-9a67-e2940e97dd9a" CreationDate="2023-05-24T13:16:50.137" UserId="496" Text="|ink|rust|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33870" PostHistoryTypeId="2" PostId="8626" RevisionGUID="be77dbd6-5a75-4f6d-93be-d5fe63d1136f" CreationDate="2023-05-24T13:27:17.390" UserId="567" Text="It is not possible to implement a Trait on a type outside of his crate (Rust oprhan rule).&#xD;&#xA;So the only option is to create a new type that will wrap arround U256 and  derive `TypeInfo`:&#xD;&#xA;&#xD;&#xA;    #[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Encode, Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub struct WrappedU256(U256);&#xD;&#xA;    &#xD;&#xA;    impl From&lt;WrappedU256&gt; for U256 {&#xD;&#xA;        fn from(value: WrappedU256) -&gt; Self {&#xD;&#xA;            value.0&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl From&lt;U256&gt; for WrappedU256 {&#xD;&#xA;        fn from(value: U256) -&gt; Self {&#xD;&#xA;            WrappedU256(value)&#xD;&#xA;        }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="33872" PostHistoryTypeId="5" PostId="8577" RevisionGUID="9a4e2e9e-dcff-40f3-9918-3649e31c5406" CreationDate="2023-05-24T13:36:02.097" UserId="3088" Comment="added 18 characters in body" Text="Let's imagine that we have some blacklist pallet that stores accounts that are restricted to make some calls. How do we implement origins filtering based on that blacklist for other pallets?&#xD;&#xA;&#xD;&#xA;We could add corresponding logic to our own pallets, but it is not suitable for external pallets we use. We also could implement this (I guess) through adding `SignedExtension` but it is also an inappropriate solution.&#xD;&#xA;&#xD;&#xA;It would be nice to implement this as runtime-level logic similar to how we can filter calls with `system` pallet's `BaseCallFilter` and it would be great to be able to return custom error. What are the options? Maybe we could customize `RuntimeOrigin` or smt?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33873" PostHistoryTypeId="2" PostId="8627" RevisionGUID="cd101922-5561-4a30-a797-2f91656a61d4" CreationDate="2023-05-24T14:11:19.330" UserId="354" Text="Is there a way to produce and finalize blocks when a parachain is waiting for a slot on polkadot. Lets consider a scenario where there is a parachain who has applied for the slot on polkadot but did not get any slot for 2years so what happens in those 2years is it just waiting to be added as a parachain or is it producing and finalizing blocks with its own consensus?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33875" PostHistoryTypeId="1" PostId="8627" RevisionGUID="cd101922-5561-4a30-a797-2f91656a61d4" CreationDate="2023-05-24T14:11:19.330" UserId="354" Text="What happens when parachain is waiting for slot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33876" PostHistoryTypeId="3" PostId="8627" RevisionGUID="cd101922-5561-4a30-a797-2f91656a61d4" CreationDate="2023-05-24T14:11:19.330" UserId="354" Text="|polkadot|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33877" PostHistoryTypeId="5" PostId="8614" RevisionGUID="9e4f124c-eae3-47e0-9140-b7731d4a5fed" CreationDate="2023-05-24T14:30:34.187" UserId="3112" Comment="added 354 characters in body" Text="I am attempting to build a smart contract for an imaginary burger shop. But I keep getting this error when I run the build command. &#xD;&#xA;&#xD;&#xA;[![the wasm*-unknown-unknown targets are not supported by default][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The test compiles, and `cargo check` compiles successfully too. &#xD;&#xA;&#xD;&#xA;Here is the source code.&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod burger_shop {&#xD;&#xA;&#xD;&#xA;    use ink::prelude::*;&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use scale::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct BurgerShop {&#xD;&#xA;        orders: Vec&lt;(u32, Order)&gt;,&#xD;&#xA;        orders_mapping: Mapping&lt;u32, Order&gt;,&#xD;&#xA;        shop_owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // TODO: add logic to calculate gas fees for user&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Order {&#xD;&#xA;        burger_menu: String,&#xD;&#xA;        customer: AccountId,&#xD;&#xA;        price: u32,&#xD;&#xA;        amount: u32,&#xD;&#xA;        paid: bool,&#xD;&#xA;        delivered: bool,&#xD;&#xA;        status: Status,&#xD;&#xA;        completed: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Provide a detailed comment on the error&#xD;&#xA;        PaymentError,&#xD;&#xA;        OrderNotCompleted,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // result type&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    pub enum Status {&#xD;&#xA;        GettingIngredients,&#xD;&#xA;        Preparing,&#xD;&#xA;        SentForDelivery,&#xD;&#xA;        Delivered,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for Status {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Status::GettingIngredients&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl BurgerShop {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let list_of_orders = Mapping::new();&#xD;&#xA;            Self {&#xD;&#xA;                orders: vec![],&#xD;&#xA;                orders_mapping: list_of_orders,&#xD;&#xA;                shop_owner: Self::env().caller(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_orders(&amp;self) -&gt; Vec&lt;(u32, Order)&gt; {&#xD;&#xA;            // ensure the call is from the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;            self.orders.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn new_order(&amp;mut self, order: Order) {&#xD;&#xA;            let count = self.orders.len() as u32;&#xD;&#xA;            // ensure order is from the customer&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(&#xD;&#xA;                order.completed == false,&#xD;&#xA;                &quot;Cant add an already completed order!&quot;&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            self.orders_mapping.insert(count, &amp;order);&#xD;&#xA;&#xD;&#xA;            self.orders.push((count, order));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_single_order(&amp;self, id: u32) -&gt; (u32, Order) {&#xD;&#xA;            let tuple_order = (id, self.orders_mapping.get(id).expect(&quot;Order not found!&quot;));&#xD;&#xA;            tuple_order&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mark_completed(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;            assert!(order.paid == true, &quot;Order not paid!&quot;);&#xD;&#xA;            assert!(order.delivered == true, &quot;Order not delivered!&quot;);&#xD;&#xA;            assert!(order.status == Status::Delivered, &quot;Order not delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            if order.paid &amp;&amp; order.delivered &amp;&amp; order.status == Status::Delivered {&#xD;&#xA;                order.completed = true;&#xD;&#xA;                Ok(())&#xD;&#xA;            } else {&#xD;&#xA;                Err(Error::OrderNotCompleted)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn make_payment(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;            assert!(order.paid == false, &quot;Order already paid!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that sender is the caller&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not delivered&#xD;&#xA;            assert!(order.delivered == false, &quot;Order already delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            // make payment&#xD;&#xA;            match self.env().transfer(self.shop_owner, order.price.into()) {&#xD;&#xA;                Ok(_) =&gt; {&#xD;&#xA;                    order.paid = true;&#xD;&#xA;                    order.status = Status::Preparing;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                Err(_) =&gt; Err(Error::PaymentError),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn change_status(&amp;mut self, id: u32, status: Status) {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure caller is the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            order.status = status;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn it_works() {&#xD;&#xA;            let mut burger_shop = BurgerShop::new();&#xD;&#xA;            let order = Order {&#xD;&#xA;                burger_menu: &quot;Cheese Burger&quot;.to_string(),&#xD;&#xA;                customer: AccountId::from([0x01; 32]),&#xD;&#xA;                price: 100,&#xD;&#xA;                amount: 1,&#xD;&#xA;                paid: false,&#xD;&#xA;                delivered: false,&#xD;&#xA;                status: Status::GettingIngredients,&#xD;&#xA;                completed: false,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            burger_shop.new_order(order.clone());&#xD;&#xA;&#xD;&#xA;            let orders = burger_shop.get_orders();&#xD;&#xA;            assert_eq!(orders.len(), 1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What could I be doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the Cargo.toml file &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```lang-toml&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;name = &quot;burger_shop&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Ayomide Bajo &lt;oluwashinabajo@gmail.com&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.1&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;sp-io = &quot;22.0.0&quot;&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.0.1&quot;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The `rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release` run successfully but `cargo contract build` still results in the same error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is weird.  `cargo build` compiles but `cargo contract build` doesn't. [![rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ctCCT.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/xv3eb.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33878" PostHistoryTypeId="2" PostId="8628" RevisionGUID="0d8c17dd-9dae-491a-a35e-9f3800dd45d6" CreationDate="2023-05-24T14:39:48.270" UserId="29" Text="A few scenarios I see:&#xD;&#xA;- You wait for the next auction and win the next slot; in the meantime you will not produce and finalize any blocks&#xD;&#xA;  - probably not what you wanted but a the end of the day that is what you're bidding for: high quality blockspace for a period of time&#xD;&#xA;- You could become a parathread and subscribe to the pay-as-you-go model until you have an opportunity to win the next slot&#xD;&#xA;  - parathreads are on the roadmap, you can learn more [here](https://wiki.polkadot.network/docs/learn-parathreads).&#xD;&#xA;- You run a Substrate solo chain and when you win the next slot, you migrate your solo chain to your parachain&#xD;&#xA;  - downside here is the quality of the blockspace&#xD;&#xA;- You could run a smart contract to finalize your transactions on a parachain that already has a secured slot while you wait for the next slot" ContentLicense="CC BY-SA 4.0" />
  <row Id="33880" PostHistoryTypeId="5" PostId="8614" RevisionGUID="7e7d101d-82ba-4131-8f70-85af35c15849" CreationDate="2023-05-24T14:41:03.560" UserId="3112" Comment="added 93 characters in body" Text="I am attempting to build a smart contract for an imaginary burger shop. But I keep getting this error when I run the build command. &#xD;&#xA;&#xD;&#xA;[![the wasm*-unknown-unknown targets are not supported by default][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The test compiles, and `cargo check` compiles successfully too. &#xD;&#xA;&#xD;&#xA;Here is the source code.&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod burger_shop {&#xD;&#xA;&#xD;&#xA;    use ink::prelude::*;&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use scale::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct BurgerShop {&#xD;&#xA;        orders: Vec&lt;(u32, Order)&gt;,&#xD;&#xA;        orders_mapping: Mapping&lt;u32, Order&gt;,&#xD;&#xA;        shop_owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // TODO: add logic to calculate gas fees for user&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Order {&#xD;&#xA;        burger_menu: String,&#xD;&#xA;        customer: AccountId,&#xD;&#xA;        price: u32,&#xD;&#xA;        amount: u32,&#xD;&#xA;        paid: bool,&#xD;&#xA;        delivered: bool,&#xD;&#xA;        status: Status,&#xD;&#xA;        completed: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Provide a detailed comment on the error&#xD;&#xA;        PaymentError,&#xD;&#xA;        OrderNotCompleted,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // result type&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    pub enum Status {&#xD;&#xA;        GettingIngredients,&#xD;&#xA;        Preparing,&#xD;&#xA;        SentForDelivery,&#xD;&#xA;        Delivered,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for Status {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Status::GettingIngredients&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl BurgerShop {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let list_of_orders = Mapping::new();&#xD;&#xA;            Self {&#xD;&#xA;                orders: vec![],&#xD;&#xA;                orders_mapping: list_of_orders,&#xD;&#xA;                shop_owner: Self::env().caller(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_orders(&amp;self) -&gt; Vec&lt;(u32, Order)&gt; {&#xD;&#xA;            // ensure the call is from the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;            self.orders.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn new_order(&amp;mut self, order: Order) {&#xD;&#xA;            let count = self.orders.len() as u32;&#xD;&#xA;            // ensure order is from the customer&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(&#xD;&#xA;                order.completed == false,&#xD;&#xA;                &quot;Cant add an already completed order!&quot;&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            self.orders_mapping.insert(count, &amp;order);&#xD;&#xA;&#xD;&#xA;            self.orders.push((count, order));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_single_order(&amp;self, id: u32) -&gt; (u32, Order) {&#xD;&#xA;            let tuple_order = (id, self.orders_mapping.get(id).expect(&quot;Order not found!&quot;));&#xD;&#xA;            tuple_order&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mark_completed(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;            assert!(order.paid == true, &quot;Order not paid!&quot;);&#xD;&#xA;            assert!(order.delivered == true, &quot;Order not delivered!&quot;);&#xD;&#xA;            assert!(order.status == Status::Delivered, &quot;Order not delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            if order.paid &amp;&amp; order.delivered &amp;&amp; order.status == Status::Delivered {&#xD;&#xA;                order.completed = true;&#xD;&#xA;                Ok(())&#xD;&#xA;            } else {&#xD;&#xA;                Err(Error::OrderNotCompleted)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn make_payment(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;            assert!(order.paid == false, &quot;Order already paid!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that sender is the caller&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not delivered&#xD;&#xA;            assert!(order.delivered == false, &quot;Order already delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            // make payment&#xD;&#xA;            match self.env().transfer(self.shop_owner, order.price.into()) {&#xD;&#xA;                Ok(_) =&gt; {&#xD;&#xA;                    order.paid = true;&#xD;&#xA;                    order.status = Status::Preparing;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                Err(_) =&gt; Err(Error::PaymentError),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn change_status(&amp;mut self, id: u32, status: Status) {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure caller is the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            order.status = status;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn it_works() {&#xD;&#xA;            let mut burger_shop = BurgerShop::new();&#xD;&#xA;            let order = Order {&#xD;&#xA;                burger_menu: &quot;Cheese Burger&quot;.to_string(),&#xD;&#xA;                customer: AccountId::from([0x01; 32]),&#xD;&#xA;                price: 100,&#xD;&#xA;                amount: 1,&#xD;&#xA;                paid: false,&#xD;&#xA;                delivered: false,&#xD;&#xA;                status: Status::GettingIngredients,&#xD;&#xA;                completed: false,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            burger_shop.new_order(order.clone());&#xD;&#xA;&#xD;&#xA;            let orders = burger_shop.get_orders();&#xD;&#xA;            assert_eq!(orders.len(), 1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What could I be doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the Cargo.toml file &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```lang-toml&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;name = &quot;burger_shop&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Ayomide Bajo &lt;oluwashinabajo@gmail.com&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.1&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;sp-io = &quot;22.0.0&quot;&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.0.1&quot;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The `rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release` run successfully but `cargo contract build` still results in the same error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is weird.  `cargo build` compiles but `cargo contract build` doesn't. [![rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ctCCT.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/xv3eb.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If `cargo contract build` command doesn't work for my smart contract I can't deploy it." ContentLicense="CC BY-SA 4.0" />
  <row Id="33881" PostHistoryTypeId="2" PostId="8629" RevisionGUID="41c0082e-6211-47d5-979a-956054ab7ad8" CreationDate="2023-05-24T14:44:38.777" UserId="4240" Text="Please remove `sp-io = &quot;22.0.0&quot;` from `cargo.toml`. It is not used and it is causing a dependency conflict. After that `cargo build contract` should work." ContentLicense="CC BY-SA 4.0" />
  <row Id="33883" PostHistoryTypeId="5" PostId="8629" RevisionGUID="31163d92-7f82-4e6e-8e0f-9411d9c8903a" CreationDate="2023-05-24T14:53:32.233" UserId="4240" Comment="edited body" Text="Please remove `sp-io = &quot;22.0.0&quot;` from `cargo.toml`. It is not used and it is causing a dependency conflict. After that `cargo contract build` should work." ContentLicense="CC BY-SA 4.0" />
  <row Id="33884" PostHistoryTypeId="5" PostId="8614" RevisionGUID="6c47fbe1-5964-4a4a-9a43-024960466318" CreationDate="2023-05-24T14:55:39.217" UserId="3112" Comment="added 146 characters in body" Text="I am attempting to build a smart contract for an imaginary burger shop. But I keep getting this error when I run the build command. &#xD;&#xA;&#xD;&#xA;[![the wasm*-unknown-unknown targets are not supported by default][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The test compiles, and `cargo check` compiles successfully too. &#xD;&#xA;&#xD;&#xA;Here is the source code.&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod burger_shop {&#xD;&#xA;&#xD;&#xA;    use ink::prelude::*;&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use scale::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct BurgerShop {&#xD;&#xA;        orders: Vec&lt;(u32, Order)&gt;,&#xD;&#xA;        orders_mapping: Mapping&lt;u32, Order&gt;,&#xD;&#xA;        shop_owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // TODO: add logic to calculate gas fees for user&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Order {&#xD;&#xA;        burger_menu: String,&#xD;&#xA;        customer: AccountId,&#xD;&#xA;        price: u32,&#xD;&#xA;        amount: u32,&#xD;&#xA;        paid: bool,&#xD;&#xA;        delivered: bool,&#xD;&#xA;        status: Status,&#xD;&#xA;        completed: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Provide a detailed comment on the error&#xD;&#xA;        PaymentError,&#xD;&#xA;        OrderNotCompleted,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // result type&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    pub enum Status {&#xD;&#xA;        GettingIngredients,&#xD;&#xA;        Preparing,&#xD;&#xA;        SentForDelivery,&#xD;&#xA;        Delivered,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for Status {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Status::GettingIngredients&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl BurgerShop {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let list_of_orders = Mapping::new();&#xD;&#xA;            Self {&#xD;&#xA;                orders: vec![],&#xD;&#xA;                orders_mapping: list_of_orders,&#xD;&#xA;                shop_owner: Self::env().caller(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_orders(&amp;self) -&gt; Vec&lt;(u32, Order)&gt; {&#xD;&#xA;            // ensure the call is from the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;            self.orders.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn new_order(&amp;mut self, order: Order) {&#xD;&#xA;            let count = self.orders.len() as u32;&#xD;&#xA;            // ensure order is from the customer&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(&#xD;&#xA;                order.completed == false,&#xD;&#xA;                &quot;Cant add an already completed order!&quot;&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            self.orders_mapping.insert(count, &amp;order);&#xD;&#xA;&#xD;&#xA;            self.orders.push((count, order));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_single_order(&amp;self, id: u32) -&gt; (u32, Order) {&#xD;&#xA;            let tuple_order = (id, self.orders_mapping.get(id).expect(&quot;Order not found!&quot;));&#xD;&#xA;            tuple_order&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mark_completed(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;            assert!(order.paid == true, &quot;Order not paid!&quot;);&#xD;&#xA;            assert!(order.delivered == true, &quot;Order not delivered!&quot;);&#xD;&#xA;            assert!(order.status == Status::Delivered, &quot;Order not delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            if order.paid &amp;&amp; order.delivered &amp;&amp; order.status == Status::Delivered {&#xD;&#xA;                order.completed = true;&#xD;&#xA;                Ok(())&#xD;&#xA;            } else {&#xD;&#xA;                Err(Error::OrderNotCompleted)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn make_payment(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;            assert!(order.paid == false, &quot;Order already paid!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that sender is the caller&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not delivered&#xD;&#xA;            assert!(order.delivered == false, &quot;Order already delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            // make payment&#xD;&#xA;            match self.env().transfer(self.shop_owner, order.price.into()) {&#xD;&#xA;                Ok(_) =&gt; {&#xD;&#xA;                    order.paid = true;&#xD;&#xA;                    order.status = Status::Preparing;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                Err(_) =&gt; Err(Error::PaymentError),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn change_status(&amp;mut self, id: u32, status: Status) {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure caller is the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            order.status = status;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn it_works() {&#xD;&#xA;            let mut burger_shop = BurgerShop::new();&#xD;&#xA;            let order = Order {&#xD;&#xA;                burger_menu: &quot;Cheese Burger&quot;.to_string(),&#xD;&#xA;                customer: AccountId::from([0x01; 32]),&#xD;&#xA;                price: 100,&#xD;&#xA;                amount: 1,&#xD;&#xA;                paid: false,&#xD;&#xA;                delivered: false,&#xD;&#xA;                status: Status::GettingIngredients,&#xD;&#xA;                completed: false,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            burger_shop.new_order(order.clone());&#xD;&#xA;&#xD;&#xA;            let orders = burger_shop.get_orders();&#xD;&#xA;            assert_eq!(orders.len(), 1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What could I be doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the Cargo.toml file &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```lang-toml&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;name = &quot;burger_shop&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Ayomide Bajo &lt;oluwashinabajo@gmail.com&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.1&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;sp-io = &quot;22.0.0&quot;&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.0.1&quot;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The `rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release` run successfully but `cargo contract build` still results in the same error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is weird.  `cargo build` compiles but `cargo contract build` doesn't. [![rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If `cargo contract build` command doesn't work for my smart contract I can't deploy it.&#xD;&#xA;&#xD;&#xA;After removing sp-io from the .toml file. &#xD;&#xA;&#xD;&#xA;I get a new error lol [![new error from wasm][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ctCCT.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/xv3eb.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/rTjRN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33885" PostHistoryTypeId="5" PostId="8614" RevisionGUID="d48762b3-25e0-4180-a37c-1b7f620b3bf4" CreationDate="2023-05-24T14:56:35.463" UserId="3112" Comment="edited body" Text="I am attempting to build a smart contract for an imaginary burger shop. But I keep getting this error when I run the build command. &#xD;&#xA;&#xD;&#xA;[![the wasm*-unknown-unknown targets are not supported by default][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The test compiles, and `cargo check` compiles successfully too. &#xD;&#xA;&#xD;&#xA;Here is the source code.&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod burger_shop {&#xD;&#xA;&#xD;&#xA;    use ink::prelude::*;&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use scale::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct BurgerShop {&#xD;&#xA;        orders: Vec&lt;(u32, Order)&gt;,&#xD;&#xA;        orders_mapping: Mapping&lt;u32, Order&gt;,&#xD;&#xA;        shop_owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // TODO: add logic to calculate gas fees for user&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Order {&#xD;&#xA;        burger_menu: String,&#xD;&#xA;        customer: AccountId,&#xD;&#xA;        price: u32,&#xD;&#xA;        amount: u32,&#xD;&#xA;        paid: bool,&#xD;&#xA;        delivered: bool,&#xD;&#xA;        status: Status,&#xD;&#xA;        completed: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Provide a detailed comment on the error&#xD;&#xA;        PaymentError,&#xD;&#xA;        OrderNotCompleted,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // result type&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    pub enum Status {&#xD;&#xA;        GettingIngredients,&#xD;&#xA;        Preparing,&#xD;&#xA;        SentForDelivery,&#xD;&#xA;        Delivered,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for Status {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Status::GettingIngredients&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl BurgerShop {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let list_of_orders = Mapping::new();&#xD;&#xA;            Self {&#xD;&#xA;                orders: vec![],&#xD;&#xA;                orders_mapping: list_of_orders,&#xD;&#xA;                shop_owner: Self::env().caller(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_orders(&amp;self) -&gt; Vec&lt;(u32, Order)&gt; {&#xD;&#xA;            // ensure the call is from the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;            self.orders.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn new_order(&amp;mut self, order: Order) {&#xD;&#xA;            let count = self.orders.len() as u32;&#xD;&#xA;            // ensure order is from the customer&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(&#xD;&#xA;                order.completed == false,&#xD;&#xA;                &quot;Cant add an already completed order!&quot;&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            self.orders_mapping.insert(count, &amp;order);&#xD;&#xA;&#xD;&#xA;            self.orders.push((count, order));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_single_order(&amp;self, id: u32) -&gt; (u32, Order) {&#xD;&#xA;            let tuple_order = (id, self.orders_mapping.get(id).expect(&quot;Order not found!&quot;));&#xD;&#xA;            tuple_order&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mark_completed(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;            assert!(order.paid == true, &quot;Order not paid!&quot;);&#xD;&#xA;            assert!(order.delivered == true, &quot;Order not delivered!&quot;);&#xD;&#xA;            assert!(order.status == Status::Delivered, &quot;Order not delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            if order.paid &amp;&amp; order.delivered &amp;&amp; order.status == Status::Delivered {&#xD;&#xA;                order.completed = true;&#xD;&#xA;                Ok(())&#xD;&#xA;            } else {&#xD;&#xA;                Err(Error::OrderNotCompleted)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn make_payment(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;            assert!(order.paid == false, &quot;Order already paid!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that sender is the caller&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not delivered&#xD;&#xA;            assert!(order.delivered == false, &quot;Order already delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            // make payment&#xD;&#xA;            match self.env().transfer(self.shop_owner, order.price.into()) {&#xD;&#xA;                Ok(_) =&gt; {&#xD;&#xA;                    order.paid = true;&#xD;&#xA;                    order.status = Status::Preparing;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                Err(_) =&gt; Err(Error::PaymentError),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn change_status(&amp;mut self, id: u32, status: Status) {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure caller is the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            order.status = status;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn it_works() {&#xD;&#xA;            let mut burger_shop = BurgerShop::new();&#xD;&#xA;            let order = Order {&#xD;&#xA;                burger_menu: &quot;Cheese Burger&quot;.to_string(),&#xD;&#xA;                customer: AccountId::from([0x01; 32]),&#xD;&#xA;                price: 100,&#xD;&#xA;                amount: 1,&#xD;&#xA;                paid: false,&#xD;&#xA;                delivered: false,&#xD;&#xA;                status: Status::GettingIngredients,&#xD;&#xA;                completed: false,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            burger_shop.new_order(order.clone());&#xD;&#xA;&#xD;&#xA;            let orders = burger_shop.get_orders();&#xD;&#xA;            assert_eq!(orders.len(), 1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What could I be doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the Cargo.toml file &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```lang-toml&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;name = &quot;burger_shop&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Ayomide Bajo &lt;oluwashinabajo@gmail.com&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.1&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;sp-io = &quot;22.0.0&quot;&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.0.1&quot;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The `rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release` run successfully but `cargo contract build` still results in the same error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is weird.  `cargo build` compiles but `cargo contract build` doesn't. [![rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If `cargo contract build` command doesn't work for my smart contract I can't deploy it.&#xD;&#xA;&#xD;&#xA;After removing sp-io from the .toml file. &#xD;&#xA;&#xD;&#xA;I get a new error lol [![new error from wasm][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ctCCT.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/xv3eb.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/NTe6P.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33886" PostHistoryTypeId="5" PostId="8629" RevisionGUID="f7e0ef78-f84f-438c-8d84-2cf72cde1ccf" CreationDate="2023-05-24T15:06:17.217" UserId="4240" Comment="added 163 characters in body" Text="Please remove `sp-io = &quot;22.0.0&quot;` from `cargo.toml`. It is not used and it is causing a dependency conflict. After that `cargo contract build` should work.&#xD;&#xA;&#xD;&#xA;If you run into more errors, try cleaning the build with the following:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;$ cargo clean &amp;&amp; cargo build --release &amp;&amp; cargo contract build --release&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33887" PostHistoryTypeId="2" PostId="8630" RevisionGUID="e137f27d-d0ab-4d23-bcb6-9879ab4d5220" CreationDate="2023-05-24T15:06:28.310" UserId="3112" Text="I checked my Rustc compiler version, turns out I was using the nightly+ version which contains some unstable updates for compiling to WASM(I guess). &#xD;&#xA;&#xD;&#xA;After switching to the stable version, it worked. Thanks, guys!" ContentLicense="CC BY-SA 4.0" />
  <row Id="33889" PostHistoryTypeId="5" PostId="8630" RevisionGUID="e8d3cf03-4307-47f6-a83c-5a02c6e4b354" CreationDate="2023-05-24T15:07:24.217" UserId="3112" Comment="added 36 characters in body" Text="I checked my Rustc compiler version, turns out I was using the nightly+ version which contains some unstable updates for compiling to WASM(I guess). &#xD;&#xA;&#xD;&#xA;After switching to the stable version. This fixed the last weird error and it worked. Thanks, guys!" ContentLicense="CC BY-SA 4.0" />
  <row Id="33890" PostHistoryTypeId="2" PostId="8631" RevisionGUID="1e7ff2a5-abab-462c-83bb-ed78cc937678" CreationDate="2023-05-24T17:01:02.090" UserId="3122" Text="I'm working on Substrate based project. In the project, each blockchain validator has an offchain worker. `author_insertKey()` is used to set up a key so the offchain worker can sign transactions. Each offchain worker has an identical key as its blockchain validator.&#xD;&#xA;&#xD;&#xA;The questions:&#xD;&#xA; 1. How to get the validator's AccountId in offchain worker? &#xD;&#xA; 2. Optionally, how to get the offchain worker key set with `author_insertKey()`?&#xD;&#xA;&#xD;&#xA;Additional info:&#xD;&#xA; 1. I've tried to take the AccountId from [Signer](https://crates.parity.io/frame_system/offchain/struct.Signer.html) but looks like it can return only public keys of all offchain workers or a random one. &#xD;&#xA; 2. I've also tried [sp_io::crypto::sr25519_public_keys(key_type)](https://docs.rs/sp-io/latest/sp_io/crypto/fn.sr25519_public_keys.html) but the result is the same as in point one.&#xD;&#xA; 3. I run two nodes locally with `./target/release/node --alice --ws-port 9944 --rpc-port 9933 --rpc-cors=all --chain=local --base-path /tmp/alice` and `./target/release/node --bob --ws-port 9945 --rpc-port 9934 --rpc-cors=all --chain=local --base-path /tmp/bob`&#xD;&#xA; 4. There is a [similar question](https://substrate.stackexchange.com/questions/7193/is-there-any-way-to-access-the-accountid-inside-the-offchain-worker) but it has no answer how to get node AccountId in offchain worker. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33892" PostHistoryTypeId="1" PostId="8631" RevisionGUID="1e7ff2a5-abab-462c-83bb-ed78cc937678" CreationDate="2023-05-24T17:01:02.090" UserId="3122" Text="AccountId in offchain worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="33893" PostHistoryTypeId="3" PostId="8631" RevisionGUID="1e7ff2a5-abab-462c-83bb-ed78cc937678" CreationDate="2023-05-24T17:01:02.090" UserId="3122" Text="|transactions|account|offchain-worker|offchain|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33894" PostHistoryTypeId="5" PostId="8631" RevisionGUID="87457d87-408c-4cb4-a626-c7e6284b9669" CreationDate="2023-05-24T17:07:15.397" UserId="3122" Comment="added 9 characters in body" Text="I'm working on Substrate based project. In the project, each blockchain validator has an offchain worker. `author_insertKey()` is used to set up a key so the offchain worker can sign transactions. Each offchain worker has an identical key as its blockchain validator.&#xD;&#xA;&#xD;&#xA;The questions:&#xD;&#xA; 1. How to get the validator's AccountId in the offchain worker? &#xD;&#xA; 2. Optionally, how to get the offchain worker key set with `author_insertKey()`?&#xD;&#xA;&#xD;&#xA;Additional info:&#xD;&#xA; 1. I've tried to take the AccountId from [Signer](https://crates.parity.io/frame_system/offchain/struct.Signer.html) but looks like it can return only public keys of all offchain workers or a random one. &#xD;&#xA; 2. I've also tried [sp_io::crypto::sr25519_public_keys(key_type)](https://docs.rs/sp-io/latest/sp_io/crypto/fn.sr25519_public_keys.html) but the result is the same as in point one.&#xD;&#xA; 3. I run two nodes locally with `./target/release/node --alice --ws-port 9944 --rpc-port 9933 --rpc-cors=all --chain=local --base-path /tmp/alice` and `./target/release/node --bob --ws-port 9945 --rpc-port 9934 --rpc-cors=all --chain=local --base-path /tmp/bob`&#xD;&#xA; 4. There is a [similar question](https://substrate.stackexchange.com/questions/7193/is-there-any-way-to-access-the-accountid-inside-the-offchain-worker) but it has no answer to how to get node AccountId in an offchain worker. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33895" PostHistoryTypeId="2" PostId="8632" RevisionGUID="45350715-0aa2-434f-95b6-1cb1e5539bb2" CreationDate="2023-05-24T19:03:15.090" UserId="286" Text="Bear in mind that a particular node isn't inherently associated with a particular on chain validator. Node X is only validator X because to happens to have the current session keys for that validator. A user could rotate the keys to another node, and that would become validator X a few sessions later. At least in theory node X could also be validator X and validator Y if it has the current session keys for both (this breaks finality signing, but it'll still make blocks as both validators).&#xD;&#xA;&#xD;&#xA;Bearing that in mind, I think the offchain worker could do something like this:&#xD;&#xA;&#xD;&#xA; - Make a WS RPC call (to any RPC node) to check the current ilst of&#xD;&#xA;   validators and their associated session keys (you could probably pull&#xD;&#xA;   it from raw storage with the HTTP RPC if you prefer).&#xD;&#xA; - Use the HTTP RPC on the (local?) node to check if it has the keys for&#xD;&#xA;   each validator address in turn - there's an author_hasKey method&#xD;&#xA;   which I think would work (I'm pretty sure it tells you if the node&#xD;&#xA;   you are talking to has that key). There's an author_hasSessionKeys&#xD;&#xA;   too, which might be more useful - not sure.&#xD;&#xA; - When you find a matching key, you know the local node is acting as&#xD;&#xA;   the validator for that key.&#xD;&#xA;&#xD;&#xA;I'm pretty sure that would work. I'm not sure it's optimal.&#xD;&#xA;&#xD;&#xA;If the offchain worker is using the HTTP RPC to insert keys, and they are then being assigned to the chain as validator keys, I suspect you are going to have some fun with security... You'd need to be sure someone external couldn't access the HTTP RPC and insert their own key, I think. (If both are on the same machine, or one can ssh into the other, you might be better off grabbing / inserting the private from/to the node keystore folder, rather than using the RPC. Indeed, with direct access to the keystore, you can just check the keys directly against the list of session keys - and it's probably quicker.&#xD;&#xA;&#xD;&#xA;You'd potentially have to recheck every session - I think you could check ahead of the start of the session by looking at the queued keys list.&#xD;&#xA;&#xD;&#xA;In case you aren't aware - when you update keys for a validator on-chain, they go into the pending session key list at the start of the next session, and then the active list at the start of the session after that - so it can take up to two sessions for the change to take effect.  You might know that already." ContentLicense="CC BY-SA 4.0" />
  <row Id="33897" PostHistoryTypeId="2" PostId="8633" RevisionGUID="e8575cd9-bc6c-4a2c-bbb5-ce09e630d91a" CreationDate="2023-05-24T19:43:50.377" UserId="404" Text="I am struggling to figure out how to supply tuple parameters to a dynamic call in the latest subxt master branch. I know parameters are combinations of Value types.&#xD;&#xA;&#xD;&#xA;My current non-working code looks like:&#xD;&#xA;````&#xD;&#xA; let call = subxt::dynamic::tx(&#xD;&#xA;        MODULE,&#xD;&#xA;        &quot;create_group&quot;,&#xD;&#xA;        vec![&#xD;&#xA;            Value::from_bytes(json.name.as_bytes()),&#xD;&#xA;            Value::unnamed_composite(&#xD;&#xA;                members&#xD;&#xA;                    .into_iter()&#xD;&#xA;                    .map(|(account_id, weight)| {&#xD;&#xA;                        Value::unnamed_composite(vec![&#xD;&#xA;                            Value::from_bytes(account_id),&#xD;&#xA;                            Value::u128(weight.into()),&#xD;&#xA;                        ])&#xD;&#xA;                    })&#xD;&#xA;                    .collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;            ),&#xD;&#xA;            Value::u128(json.threshold.into()),&#xD;&#xA;            Value::u128(json.initial_balance),&#xD;&#xA;        ],&#xD;&#xA;    );&#xD;&#xA;````&#xD;&#xA;The call signature is :&#xD;&#xA;````&#xD;&#xA;     pub fn create_group(&#xD;&#xA;            origin: OriginFor&lt;T&gt;,&#xD;&#xA;            name: Vec&lt;u8&gt;,&#xD;&#xA;            members: Vec&lt;(T::AccountId, T::MemberCount)&gt;,&#xD;&#xA;            threshold: T::MemberCount,&#xD;&#xA;            initial_balance: &lt;&lt;T as Config&gt;::Currency as Currency&lt;T::AccountId&gt;&gt;::Balance,&#xD;&#xA;        ) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;It compiles but I get the error:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;Error encoding from dynamic value: Error at [0].[1]: Cannot encode to type; expected length 2 but got length 32&#xD;&#xA;````&#xD;&#xA;The auto-generated call works fine, but I am using dynamic calls because I need to be able to pass the call as a parameter to other extrinsics and it appears that that can only be done with dynamic queries.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33899" PostHistoryTypeId="1" PostId="8633" RevisionGUID="e8575cd9-bc6c-4a2c-bbb5-ce09e630d91a" CreationDate="2023-05-24T19:43:50.377" UserId="404" Text="How to supply tuple parameters to a dynamic all in subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="33900" PostHistoryTypeId="3" PostId="8633" RevisionGUID="e8575cd9-bc6c-4a2c-bbb5-ce09e630d91a" CreationDate="2023-05-24T19:43:50.377" UserId="404" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33901" PostHistoryTypeId="4" PostId="8633" RevisionGUID="d6146c4d-d928-47b8-886e-4e2252992c5b" CreationDate="2023-05-24T19:57:17.220" UserId="29" Comment="edited title" Text="How to supply tuple parameters to a dynamic call in subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="33902" PostHistoryTypeId="2" PostId="8634" RevisionGUID="6c77b3af-96dd-4acc-9be1-4cf2eef04e63" CreationDate="2023-05-24T23:48:40.660" UserId="3407" Text="The reason for this is exactly as the comment you quoted above the `opaque` module describes--agnosticity over runtime format changes.&#xD;&#xA;&#xD;&#xA;To be more specific, `runtime::opaque::Block` and `runtime::Block` are _not_ aliases to the same type. A block is a header (which does not change with WASM runtime upgrades) and extrinsics.&#xD;&#xA;&#xD;&#xA;## The Opaque Block&#xD;&#xA;The relevant snippets of code are below:&#xD;&#xA;```rust&#xD;&#xA;// runtime/src/lib.rs&#xD;&#xA;pub mod opaque {&#xD;&#xA;  pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;&#xD;&#xA;  &#xD;&#xA;  /// Opaque block type.&#xD;&#xA;  pub type Block = generic::Block&lt;Header, UncheckedExtrinsic&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// sp_runtime&#xD;&#xA;/// Simple blob to hold an extrinsic without committing to its format and ensure it is serialized&#xD;&#xA;/// correctly.&#xD;&#xA;#[derive(PartialEq, Eq, Clone, Default, Encode, Decode, TypeInfo)]&#xD;&#xA;pub struct OpaqueExtrinsic(Vec&lt;u8&gt;);&#xD;&#xA;```&#xD;&#xA;The block is actually just a header, and a vector of bytes for the extrinsics.&#xD;&#xA;&#xD;&#xA;## The Runtime Block&#xD;&#xA;The relevant snippets of code are:&#xD;&#xA;```rust&#xD;&#xA;// runtime/src/lib.rs&#xD;&#xA;pub type Block = generic::Block&lt;Header, UncheckedExtrinsic&gt;;&#xD;&#xA;&#xD;&#xA;// This is different!!!&#xD;&#xA;pub type UncheckedExtrinsic = generic::UncheckedExtrinsic&lt;&#xD;&#xA;  Address,&#xD;&#xA;  RuntimeCall,&#xD;&#xA;  Signature,&#xD;&#xA;  SignedExtra&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;// sp_runtime::generic&#xD;&#xA;pub struct UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt; {&#xD;&#xA;  pub signature: Option&lt;(Address, Signature, Extra)&gt;,&#xD;&#xA;  pub function: Call,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;In the runtime block, the extrinsic depends on the `RuntimeCall`, which is changed whenever any of the runtime logic changes! So this `Block` type looks very different than the opaque block.&#xD;&#xA;&#xD;&#xA;## Putting them together&#xD;&#xA;Given that we have these very different structs, how do we use them interchangeably? Being able to use them together is a consequence of how they are encoded and decoded. `generic::UncheckedExtrinsic` has some special SCALE [encoding](https://github.com/paritytech/substrate/blob/79d37ef461a4bdcf6ede7b37d64b28b58484dc7c/primitives/runtime/src/generic/unchecked_extrinsic.rs#LL285C4-L285C4) and [decoding](https://github.com/paritytech/substrate/blob/79d37ef461a4bdcf6ede7b37d64b28b58484dc7c/primitives/runtime/src/generic/unchecked_extrinsic.rs#L246) logic so that it can losslessly be encoded to and decoded from a vector of `u8`s.&#xD;&#xA;&#xD;&#xA;Because the `Header` type for both `opaque::Block` and `Block` are the same, and the `Extrinsic` type encodes/decodes the same, these blocks interoperate. In practice, extrinsics and blocks come in to the [outer node](https://docs.substrate.io/learn/architecture/) (or client) of the substrate node as opaque extrinsics and blocks, which are just bytes. Then, they are passed into the WASM runtime by being encoded. Finally, they are decoded _inside_ the runtime into the _runtime_ extrinsic and block types, which can change with WASM upgrades." ContentLicense="CC BY-SA 4.0" />
  <row Id="33904" PostHistoryTypeId="2" PostId="8635" RevisionGUID="1bbd9424-db1d-4ba9-bf78-b79b56efa3b8" CreationDate="2023-05-25T03:45:06.800" UserId="683" Text="Does any of these methods make a call to `state_getRuntimeVersion` internally?&#xD;&#xA;&#xD;&#xA;`api.rpc.chain.getHeader`&#xD;&#xA;`api.rpc.chain.getBlockHash`&#xD;&#xA;`api.rpc.chain.getBlock`&#xD;&#xA;`api.rpc.state.getStorage`&#xD;&#xA;&#xD;&#xA;because, I see double the number of calls to `state_getRuntimeVersion` than what i'm actually making through polkadot.js (`api.rpc.state.getRuntimeVersion`). And i'm not making any other rpc calls other than to the methods listed above." ContentLicense="CC BY-SA 4.0" />
  <row Id="33906" PostHistoryTypeId="1" PostId="8635" RevisionGUID="1bbd9424-db1d-4ba9-bf78-b79b56efa3b8" CreationDate="2023-05-25T03:45:06.800" UserId="683" Text="Extra calls to state_getRuntimeVersion with polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="33907" PostHistoryTypeId="3" PostId="8635" RevisionGUID="1bbd9424-db1d-4ba9-bf78-b79b56efa3b8" CreationDate="2023-05-25T03:45:06.800" UserId="683" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33908" PostHistoryTypeId="5" PostId="8216" RevisionGUID="242c5627-8558-43de-9ce0-05356cb7434f" CreationDate="2023-05-25T05:35:55.337" UserId="2281" Comment="added 6 characters in body" Text="I'm looking for guidance on how to best stub the `win.injectedWeb3` object that's usually created by `Polkadot{.js}`. This is so that I can write some automated tests for a dApp  frontend in `Cypress w/ typescript` (and then automatically sign transactions etc). &#xD;&#xA;&#xD;&#xA;It seems like I need to utilize `injectExtension` from `@polkadot/extension-inject` but currently struggling to implement it properly to use a stub. &#xD;&#xA;&#xD;&#xA;I'm sure other dApp builders wanting to add some UI automation have encountered this same challenge so wondered if a recommend approach already existed? &#xD;&#xA;&#xD;&#xA;Welcoming any suggestions or pointers in the right direction, thanks in advance " ContentLicense="CC BY-SA 4.0" />
  <row Id="33909" PostHistoryTypeId="5" PostId="6140" RevisionGUID="9426f000-cff8-4e90-8435-36c4f24cb93f" CreationDate="2023-05-25T05:38:59.947" UserId="2281" Comment="added 12 characters in body" Text="I deploy an ink smart contract through a properly configured `pallet_contracts` **(4.0.0-dev from the Substrate branch polkadot-v0.9.29)** on chain. Then I use the unique address of that smart contract and through `pallet_balances`, transfer some funds to that address. If I now go to the contracts panel in `polkadot.js.org/apps (version 0.122.2)`, the transferred fund shows up for that contract instance. However if I check the chain state of the `pallet_balances` for that address, it is still 0 (both free and reserved). My question is why? Is it a feature or a bug?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33910" PostHistoryTypeId="5" PostId="8635" RevisionGUID="d0cb8433-69ca-4204-9eaa-bceb40b7dbdb" CreationDate="2023-05-25T06:16:06.257" UserId="683" Comment="added 341 characters in body" Text="Does any of these methods make a call to `state_getRuntimeVersion` internally?&#xD;&#xA;&#xD;&#xA;`api.rpc.chain.getHeader`&#xD;&#xA;`api.rpc.chain.getBlockHash`&#xD;&#xA;`api.rpc.chain.getBlock`&#xD;&#xA;`api.rpc.state.getStorage`&#xD;&#xA;&#xD;&#xA;because, I see double the number of calls to `state_getRuntimeVersion` than what i'm actually making through polkadot.js (`api.rpc.state.getRuntimeVersion`). And i'm not making any other rpc calls other than to the methods listed above.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;XXXX stats {&#xD;&#xA;  chain_getBlockHash: 115,&#xD;&#xA;  state_getRuntimeVersion: 211,&#xD;&#xA;  system_chain: 1,&#xD;&#xA;  system_properties: 1,&#xD;&#xA;  rpc_methods: 1,&#xD;&#xA;  state_getMetadata: 2,&#xD;&#xA;  state_subscribeRuntimeVersion: 1,&#xD;&#xA;  chain_getFinalizedHead: 7,&#xD;&#xA;  chain_getHeader: 210,&#xD;&#xA;  chain_getBlock: 100,&#xD;&#xA;  state_getStorage: 100,&#xD;&#xA;  system_health: 2&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33911" PostHistoryTypeId="5" PostId="8633" RevisionGUID="a5551bc7-5566-4464-b06b-679f50e85d8b" CreationDate="2023-05-25T06:41:50.890" UserId="404" Comment="added 262 characters in body" Text="I am struggling to figure out how to supply tuple parameters to a dynamic call in the latest subxt master branch. I know parameters are combinations of Value types.&#xD;&#xA;&#xD;&#xA;My current non-working code looks like:&#xD;&#xA;````&#xD;&#xA; let call = subxt::dynamic::tx(&#xD;&#xA;        MODULE,&#xD;&#xA;        &quot;create_group&quot;,&#xD;&#xA;        vec![&#xD;&#xA;            Value::from_bytes(json.name.as_bytes()),&#xD;&#xA;            Value::unnamed_composite(&#xD;&#xA;                members&#xD;&#xA;                    .into_iter()&#xD;&#xA;                    .map(|(account_id, weight)| {&#xD;&#xA;                        Value::unnamed_composite(vec![&#xD;&#xA;                            Value::from_bytes(account_id),&#xD;&#xA;                            Value::u128(weight.into()),&#xD;&#xA;                        ])&#xD;&#xA;                    })&#xD;&#xA;                    .collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;            ),&#xD;&#xA;            Value::u128(json.threshold.into()),&#xD;&#xA;            Value::u128(json.initial_balance),&#xD;&#xA;        ],&#xD;&#xA;    );&#xD;&#xA;````&#xD;&#xA;The call signature is :&#xD;&#xA;````&#xD;&#xA;     pub fn create_group(&#xD;&#xA;            origin: OriginFor&lt;T&gt;,&#xD;&#xA;            name: Vec&lt;u8&gt;,&#xD;&#xA;            members: Vec&lt;(T::AccountId, T::MemberCount)&gt;,&#xD;&#xA;            threshold: T::MemberCount,&#xD;&#xA;            initial_balance: &lt;&lt;T as Config&gt;::Currency as Currency&lt;T::AccountId&gt;&gt;::Balance,&#xD;&#xA;        ) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;It compiles but I get the error:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;Error encoding from dynamic value: Error at [0].[1]: Cannot encode to type; expected length 2 but got length 32&#xD;&#xA;````&#xD;&#xA;The auto-generated call works fine, but I am using dynamic calls because I need to be able to pass the call as a parameter to other extrinsics and it appears that that can only be done with dynamic queries.&#xD;&#xA;&#xD;&#xA;The autogenerated call that works is:&#xD;&#xA;````&#xD;&#xA;     let call = borlaug_subxt::tx().groups().create_group(&#xD;&#xA;         json.name.into(),&#xD;&#xA;         members,&#xD;&#xA;         json.threshold,&#xD;&#xA;         json.initial_balance,&#xD;&#xA;    );&#xD;&#xA;````&#xD;&#xA;And members is a vec of tuples of Account32,u32&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33912" PostHistoryTypeId="2" PostId="8636" RevisionGUID="cfb4a602-ead0-4b01-8427-15439fc37b5e" CreationDate="2023-05-25T06:47:09.040" UserId="404" Text="I was able to fix this by using the subxt provided `PolkadotConfig` rather than my custom config that was based on `SubstrateConfig`. There must be some differences I was not able to determine relating to extrinsic validation." ContentLicense="CC BY-SA 4.0" />
  <row Id="33922" PostHistoryTypeId="5" PostId="8226" RevisionGUID="0dfdb684-3149-422c-bff7-219976bcae1a" CreationDate="2023-05-25T08:04:26.613" UserId="2762" Comment="improved formatting" Text="It sounds like you are trying to stub the win.injectedWeb3 object in order to write automated tests for your dApp frontend in Cypress with TypeScript. One option to achieve this is to use the @polkadot/extension-inject library to inject a custom provider into the win.injectedWeb3 object.&#xD;&#xA;&#xD;&#xA;Here's an example of how you can use @polkadot/extension-inject to inject a custom provider:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { injectExtension } from '@polkadot/extension-inject';&#xD;&#xA;&#xD;&#xA;// Define a custom provider&#xD;&#xA;class CustomProvider {&#xD;&#xA;  // Implement the required methods of the provider interface&#xD;&#xA;  public async send(method: string, params: any[]): Promise&lt;any&gt; {&#xD;&#xA;    // ...&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  public async sendAsync(method: string, params: any[]): Promise&lt;any&gt; {&#xD;&#xA;    // ...&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Inject the custom provider into the global `window.injectedWeb3` object&#xD;&#xA;await injectExtension(new CustomProvider());```&#xD;&#xA;```&#xD;&#xA;You can use this code to inject the custom provider before running your automated tests. This way, when your dApp frontend tries to access win.injectedWeb3, it will receive the injected provider instead of the real provider.&#xD;&#xA;&#xD;&#xA;To create a stub for the CustomProvider class, you can use a mocking library such as sinon.js or jest. Here's an example of how to use `sinon.js` to create a stub for the CustomProvider class:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import sinon from 'sinon';&#xD;&#xA;import { injectExtension } from '@polkadot/extension-inject';&#xD;&#xA;&#xD;&#xA;// Define a stub for the CustomProvider class&#xD;&#xA;const providerStub = sinon.createStubInstance(CustomProvider);&#xD;&#xA;&#xD;&#xA;// Inject the stub into the global `window.injectedWeb3` object&#xD;&#xA;await injectExtension(providerStub);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This code creates a stub for the CustomProvider class using sinon.createStubInstance(). You can then inject the stub into the win.injectedWeb3 object using injectExtension(). This way, when your dApp frontend tries to interact with win.injectedWeb3, it will receive the stubbed provider instead of the real provider." ContentLicense="CC BY-SA 4.0" />
  <row Id="33923" PostHistoryTypeId="5" PostId="8607" RevisionGUID="fa5f5daf-ec36-4397-9b0f-22636d493952" CreationDate="2023-05-25T08:32:11.517" UserId="251" Comment="added 1 character in body" Text="https://github.com/paritytech/cumulus/pull/2213/files#diff-04c884d6f18e6732821418360f30ce293a09a5a817672f3a5d100d82696f70d1R721&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let info_provider = timestamp_with_aura_info(6000);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;IIRC, the block time of all cumulus nodes is 12s." ContentLicense="CC BY-SA 4.0" />
  <row Id="33924" PostHistoryTypeId="2" PostId="8639" RevisionGUID="c1bb7dd4-9a4b-46d8-b043-5da774d1e9aa" CreationDate="2023-05-25T09:46:27.683" UserId="2762" Text="The `slot` is just the slot number (u64) at which the equivocation you want to report happened.&#xD;&#xA;&#xD;&#xA;You can see the rest of the struct for the EquivocationProof [here][1]:&#xD;&#xA;```rs&#xD;&#xA;#[derive(Clone, Debug, Decode, Encode, PartialEq, TypeInfo, Eq)]&#xD;&#xA;pub struct EquivocationProof&lt;Header, Id&gt; {&#xD;&#xA;	/// Returns the authority id of the equivocator.&#xD;&#xA;	pub offender: Id,&#xD;&#xA;	/// The slot at which the equivocation happened.&#xD;&#xA;	pub slot: Slot,&#xD;&#xA;	/// The first header involved in the equivocation.&#xD;&#xA;	pub first_header: Header,&#xD;&#xA;	/// The second header involved in the equivocation.&#xD;&#xA;	pub second_header: Header,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `keyOwnerProof` is the proof of key ownership. The proof must include the session index and validator count of the session at which the equivocation occurred.&#xD;&#xA;&#xD;&#xA;You specify it when you implement babe in your runtime, an example in [Rococo runtime][2]. In that scenario the fields you need to fill are these (see primitive [here][3]):&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[derive(Encode, Decode, Clone, Eq, PartialEq, Default, RuntimeDebug, scale_info::TypeInfo)]&#xD;&#xA;pub struct MembershipProof {&#xD;&#xA;	/// The session index on which the specific key is a member.&#xD;&#xA;	pub session: SessionIndex,&#xD;&#xA;	/// Trie nodes of a merkle proof of session membership.&#xD;&#xA;	pub trie_nodes: Vec&lt;Vec&lt;u8&gt;&gt;,&#xD;&#xA;	/// The validator count of the session on which the specific key is a member.&#xD;&#xA;	pub validator_count: ValidatorCount,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/primitives/consensus/slots/src/lib.rs#L134&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs#L254&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/primitives/session/src/lib.rs#L57" ContentLicense="CC BY-SA 4.0" />
  <row Id="33926" PostHistoryTypeId="2" PostId="8640" RevisionGUID="87f5d6f6-ae8a-4d79-9411-5994862cee1d" CreationDate="2023-05-25T12:21:05.177" UserId="4257" Text="I am currently bridging tokens from one Parachain to another, and I am examining two events to ensure the successful completion of the transaction. The first event is `xcmpQueue.Success`, which occurs on the destination chain, while the second event is `xcmpQueue.XcmpMessageSent`, which takes place on the chain from which I am bridging the tokens.&#xD;&#xA;&#xD;&#xA;Both of these events provide a `messageHash` that I can compare to establish a connection between the two events and verify the successful execution of the transaction.&#xD;&#xA;&#xD;&#xA;However, this approach requires me to maintain connections with both chains, which may be unnecessary. I am considering an alternative solution to address this concern.&#xD;&#xA;&#xD;&#xA;In the block where the XCM message is received, I can examine the `parachainSystem.setValidationData` extrinsic and inspect the `downwardMessages`. Here is an example of what I observed:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  ...&#xD;&#xA;  2001: [&#xD;&#xA;    {&#xD;&#xA;      sentAt: 18,066,095&#xD;&#xA;      data: 0x000210010400010200451f06080001000700e87648170a1300010200451f06080001000700e8764817010220bcbe0d01000400010100d8a1107cf72bacdb288d6fd9af62dc85988f267043c4958821b215a24055706d&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Although I am unsure about the specific contents of the data, my assumption is that it could be used to compute the same hash as in the `xcmpQueue.Success` event. Hence, my question is twofold: How can I decode the data field, or is there an entirely different approach that would allow me to achieve my intended outcome?&#xD;&#xA;&#xD;&#xA;I would greatly appreciate any assistance or guidance you can provide. Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="33928" PostHistoryTypeId="1" PostId="8640" RevisionGUID="87f5d6f6-ae8a-4d79-9411-5994862cee1d" CreationDate="2023-05-25T12:21:05.177" UserId="4257" Text="How to verify that the XCM message went through successfully?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33929" PostHistoryTypeId="3" PostId="8640" RevisionGUID="87f5d6f6-ae8a-4d79-9411-5994862cee1d" CreationDate="2023-05-25T12:21:05.177" UserId="4257" Text="|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33930" PostHistoryTypeId="5" PostId="8640" RevisionGUID="2bc9f5dd-6ee7-490b-af63-b69deb12ef63" CreationDate="2023-05-25T12:31:48.710" UserId="2281" Comment="added 4 characters in body; edited tags" Text="I am currently bridging tokens from one `Parachain` to another, and I am examining two events to ensure the successful completion of the transaction. The first event is `xcmpQueue.Success`, which occurs on the destination chain, while the second event is `xcmpQueue.XcmpMessageSent`, which takes place on the chain from which I am bridging the tokens.&#xD;&#xA;&#xD;&#xA;Both of these events provide a `messageHash` that I can compare to establish a connection between the two events and verify the successful execution of the transaction.&#xD;&#xA;&#xD;&#xA;However, this approach requires me to maintain connections with both chains, which may be unnecessary. I am considering an alternative solution to address this concern.&#xD;&#xA;&#xD;&#xA;In the block where the XCM message is received, I can examine the `parachainSystem.setValidationData` extrinsic and inspect the `downwardMessages`. Here is an example of what I observed:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;{&#xD;&#xA;  ...&#xD;&#xA;  2001: [&#xD;&#xA;    {&#xD;&#xA;      sentAt: 18,066,095&#xD;&#xA;      data: 0x000210010400010200451f06080001000700e87648170a1300010200451f06080001000700e8764817010220bcbe0d01000400010100d8a1107cf72bacdb288d6fd9af62dc85988f267043c4958821b215a24055706d&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Although I am unsure about the specific contents of the data, my assumption is that it could be used to compute the same hash as in the `xcmpQueue.Success` event. Hence, my question is twofold: How can I decode the data field, or is there an entirely different approach that would allow me to achieve my intended outcome?&#xD;&#xA;&#xD;&#xA;I would greatly appreciate any assistance or guidance you can provide. Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="33931" PostHistoryTypeId="6" PostId="8640" RevisionGUID="2bc9f5dd-6ee7-490b-af63-b69deb12ef63" CreationDate="2023-05-25T12:31:48.710" UserId="2281" Comment="added 4 characters in body; edited tags" Text="|xcmp|parity-bridges-common|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33932" PostHistoryTypeId="2" PostId="8641" RevisionGUID="80e86649-c94a-4a35-99d0-a128559c5207" CreationDate="2023-05-25T13:18:44.467" UserId="451" Text="`U256` does implement `TypeInfo`, but it is behind a feature: https://github.com/paritytech/parity-common/blob/master/primitive-types/src/lib.rs#L40.&#xD;&#xA;&#xD;&#xA;Enable the `features = [&quot;scale-info&quot;]&quot; for your primtive-types dependency and it should work." ContentLicense="CC BY-SA 4.0" />
  <row Id="33934" PostHistoryTypeId="2" PostId="8642" RevisionGUID="daa97610-d742-42db-9a0a-003ec4f4daf4" CreationDate="2023-05-25T13:43:22.763" UserId="1786" Text="From what I understand RPC calls don't have any underlying or additional calls made when on their own (with the exception of `system_health` pinging the node with an open websocket connection). It's different when using `api.at()` for storage queries, there are underlying caching mechanisms that will make certain checks that might require making rpc calls.&#xD;&#xA;&#xD;&#xA;That being said, if you would like more detailed logging in order to see what exactly is being called per rpc call, you can set the following env variable for websocket connections:&#xD;&#xA;&#xD;&#xA;`export DEBUG=api-ws` - This can be seen in the following code inside of [rpc-provider for websockets](https://github.com/polkadot-js/api/blob/master/packages/rpc-provider/src/ws/index.ts#L47). &#xD;&#xA;&#xD;&#xA;More details on how logging works can be seen inside of the [common packcage](https://github.com/polkadot-js/common/blob/master/packages/util/src/logger.ts#L135-L148)." ContentLicense="CC BY-SA 4.0" />
  <row Id="33936" PostHistoryTypeId="52" PostId="8635" RevisionGUID="ac7d10df-029b-4d7c-9626-e4455cf68292" CreationDate="2023-05-25T13:55:54.383" />
  <row Id="33937" PostHistoryTypeId="5" PostId="8642" RevisionGUID="70d530d5-702a-45c1-8e59-ebd0a5f14d08" CreationDate="2023-05-25T13:58:18.793" UserId="1786" Comment="deleted 1 character in body" Text="From what I understand RPC calls don't have any underlying or additional calls made when on their own (with the exception of `system_health` pinging the node with an open websocket connection). It's different when using `api.at()` for storage queries, there are underlying caching mechanisms that will make certain checks that might require making rpc calls.&#xD;&#xA;&#xD;&#xA;That being said, if you would like more detailed logging in order to see what exactly is being called per rpc call, you can set the following env variable for websocket connections:&#xD;&#xA;&#xD;&#xA;`export DEBUG=api-ws` - This can be seen in the following code inside of [rpc-provider for websockets](https://github.com/polkadot-js/api/blob/master/packages/rpc-provider/src/ws/index.ts#L47). &#xD;&#xA;&#xD;&#xA;More details on how logging works can be seen inside of the [common package](https://github.com/polkadot-js/common/blob/master/packages/util/src/logger.ts#L135-L148)." ContentLicense="CC BY-SA 4.0" />
  <row Id="33938" PostHistoryTypeId="2" PostId="8643" RevisionGUID="e6596c9e-f0f9-4116-9889-bfb23cb4a6ec" CreationDate="2023-05-25T14:24:55.237" UserId="3850" Text="I started working from the [substrate-parachain-template](https://github.com/substrate-developer-hub/substrate-parachain-template) and added the `pallet_contracts` to the runtime. When I open the Contracts UI, I get the error message that states the node does not support WeightV2. I can't find any documentation related to this or how to modify the runtime to upgrade the weight. Here is the [parachain-contracts-node](https://github.com/ok-Alice/parachain-contracts-node).&#xD;&#xA;&#xD;&#xA;[![Unsupported node version WeightV2][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VpbyV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33940" PostHistoryTypeId="1" PostId="8643" RevisionGUID="e6596c9e-f0f9-4116-9889-bfb23cb4a6ec" CreationDate="2023-05-25T14:24:55.237" UserId="3850" Text="Support WeightV2 in a substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33941" PostHistoryTypeId="3" PostId="8643" RevisionGUID="e6596c9e-f0f9-4116-9889-bfb23cb4a6ec" CreationDate="2023-05-25T14:24:55.237" UserId="3850" Text="|weight|substrate-parachain-template|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33942" PostHistoryTypeId="2" PostId="8644" RevisionGUID="e7145923-05ee-49ae-8ed3-47e29e82fd0d" CreationDate="2023-05-25T14:39:35.390" UserId="2581" Text="I want to get extrinsic fee using polkadot.js/api.&#xD;&#xA;&#xD;&#xA;I am checking kusama chain. &#xD;&#xA;&#xD;&#xA;https://kusama.subscan.io/extrinsic/17981827-3&#xD;&#xA;&#xD;&#xA;I need to get `0.00053835621` fee from above extrinsic. Which api can I use in polkadot.js/api?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33944" PostHistoryTypeId="1" PostId="8644" RevisionGUID="e7145923-05ee-49ae-8ed3-47e29e82fd0d" CreationDate="2023-05-25T14:39:35.390" UserId="2581" Text="Get extrinsic fee using Polkadot.js/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="33945" PostHistoryTypeId="3" PostId="8644" RevisionGUID="e7145923-05ee-49ae-8ed3-47e29e82fd0d" CreationDate="2023-05-25T14:39:35.390" UserId="2581" Text="|polkadot-js|extrinsic|kusama|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33946" PostHistoryTypeId="2" PostId="8645" RevisionGUID="bba58b18-15f9-4d6d-a19c-470b644b4864" CreationDate="2023-05-25T14:48:39.260" UserId="2762" Text="If your node is still using the old Weights format you still can deploy your smart contract using this link: https://weightv1--contracts-ui.netlify.app/&#xD;&#xA;&#xD;&#xA;See this previous answer on StackExchange: [Problem adding a smart contract into a Substrate node][1]&#xD;&#xA;&#xD;&#xA;If you want to update to Weights V2, check this old question on StackExchange: [Prepare pallets for Weights v2][2] or check how the weigths are calculate in the node-template: [benchmarking.rs][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/7059/2762&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/7926/prepare-pallets-for-weights-v2&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/bin/node-template/pallets/template/src/benchmarking.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="33948" PostHistoryTypeId="2" PostId="8646" RevisionGUID="da0b5ba3-7bac-4220-b640-1bf151194331" CreationDate="2023-05-25T15:20:32.633" UserId="2762" Text="I am not sure how Subscan is getting this values, but I believe to get the ***Used Fee*** you have to scan the events, see this previous answer in StackExchange: [Is there a way to collect fee of transaction?][1]&#xD;&#xA;&#xD;&#xA;&gt; In particular for fees in balance transfers, a Withdraw event will&#xD;&#xA;&gt; tell us the fee amount the sender account paid whereas Deposit events&#xD;&#xA;&gt; will tell us the amount of that fee that was deposited to the Treasury&#xD;&#xA;&gt; account and the amount that was deposited as tip to the block&#xD;&#xA;&gt; validator account&#xD;&#xA;&#xD;&#xA;The Estimated Fee you can estimated querying the [queryFeeDetails][2] call with the extrinsic encoded.&#xD;&#xA;See this previous answer as an example of how to do it using PolkadotJS: [Estimated fee and Used fee][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/2849/2762&#xD;&#xA;  [2]: https://polkadot.js.org/docs/substrate/rpc/#queryfeedetailsextrinsic-bytes-at-blockhash-feedetails&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/6579/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="33950" PostHistoryTypeId="2" PostId="8647" RevisionGUID="4ef8aee6-9b5e-497b-9e78-0200e023504b" CreationDate="2023-05-25T17:58:16.370" UserId="4259" Text="I create a smart contract using ink! v4.2 and deploy it using contracts-ui.substrate.io&#xD;&#xA;Then in my front (which uses @polkadot/api-contract: 10.7.2, @polkadot/api: 10.7.2) I run this code: &#xD;&#xA;```js&#xD;&#xA;await ApiPromise.create({ new WsProvider(&quot;wss://ws.test.azero.dev&quot;), signer: connectedAccount });&#xD;&#xA;const contract = new ContractPromise(api, abiDataJson, contractAddress);&#xD;&#xA;```&#xD;&#xA;Where,&#xD;&#xA;&#xD;&#xA;api: is correct for sure&#xD;&#xA;&#xD;&#xA;abiDataJson: json generated in /target/ink after run `cargo contract build --release`&#xD;&#xA;&#xD;&#xA;contractAddress: obtained in contracts-ui.substrate.io in the part that shows &quot;You instantiated this contract 5...&quot;, just below the title of the smart contract name&#xD;&#xA;&#xD;&#xA; And when I run &#xD;&#xA; ```js&#xD;&#xA;const { gasRequired, storageDeposit, result, output } = await contract.query.totalSupply(account.address, { gasLimit: -1, storageDepositLimit: null });&#xD;&#xA;console.log('result.toHuman(): ', result.toHuman());&#xD;&#xA;console.log(&quot;output: &quot;, output);&#xD;&#xA; ```&#xD;&#xA; I obtain &#xD;&#xA;```&#xD;&#xA;result.toHuman():  {Err: {…}}&#xD;&#xA;output: null&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think the error might be related to contractAddress, because if I put a different addres I get the same thing.&#xD;&#xA;Anybody know where the error is? &#xD;&#xA;Thanks in advance :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="33952" PostHistoryTypeId="1" PostId="8647" RevisionGUID="4ef8aee6-9b5e-497b-9e78-0200e023504b" CreationDate="2023-05-25T17:58:16.370" UserId="4259" Text="Output null when using ContractPromise for ink! v4 smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="33953" PostHistoryTypeId="3" PostId="8647" RevisionGUID="4ef8aee6-9b5e-497b-9e78-0200e023504b" CreationDate="2023-05-25T17:58:16.370" UserId="4259" Text="|polkadot-js|ink|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33954" PostHistoryTypeId="5" PostId="8647" RevisionGUID="81f0bc67-2fe5-4c87-9ca3-d232da04065f" CreationDate="2023-05-25T18:19:55.327" UserId="4259" Comment="added 116 characters in body" Text="I create a smart contract using ink! v4.2 and deploy it using contracts-ui.substrate.io&#xD;&#xA;Then in my front (which uses @polkadot/api-contract: 10.7.2, @polkadot/api: 10.7.2) I run this code: &#xD;&#xA;```js&#xD;&#xA;await ApiPromise.create({ new WsProvider(&quot;wss://ws.test.azero.dev&quot;), signer: connectedAccount });&#xD;&#xA;const contract = new ContractPromise(api, abiDataJson, contractAddress);&#xD;&#xA;```&#xD;&#xA;Where,&#xD;&#xA;&#xD;&#xA;api: is correct for sure&#xD;&#xA;&#xD;&#xA;abiDataJson: json generated in /target/ink after run `cargo contract build --release`&#xD;&#xA;&#xD;&#xA;contractAddress: obtained in contracts-ui.substrate.io in the part that shows &quot;You instantiated this contract 5...&quot;, just below the title of the smart contract name&#xD;&#xA;&#xD;&#xA; And when I run &#xD;&#xA; ```js&#xD;&#xA;const { gasRequired, storageDeposit, result, output } = await contract.query.totalSupply(account.address, { gasLimit: -1, storageDepositLimit: null });&#xD;&#xA;console.log('result.toHuman(): ', result.toHuman());&#xD;&#xA;console.log(&quot;output: &quot;, output);&#xD;&#xA; ```&#xD;&#xA; I obtain &#xD;&#xA;```&#xD;&#xA;result.toHuman():  {Err: {…}}&#xD;&#xA;output: null&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think the error might be related to contractAddress, because if I put a different addres I get the same thing. In addition, the smart contract is deployed successfully as it works by calling it from contracts-ui.substrate.io&#xD;&#xA;&#xD;&#xA;Anybody know where the error is? &#xD;&#xA;Thanks in advance :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="33955" PostHistoryTypeId="2" PostId="8648" RevisionGUID="903ce290-8078-4f8d-b71b-091a9963388e" CreationDate="2023-05-25T22:48:04.260" UserId="83" Text="I got the same error `&#xD;&#xA;API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure&#xD;&#xA;` in [this](https://github.com/ltfschoen/InkTest/commit/b9cf368091c0cb1e9b593a5bea07d1831b986486) commit when trying to access http://localhost:3000 on my host machine to access an ink! DApp that I was running from within a Docker container.&#xD;&#xA;&#xD;&#xA;To fix it I had to modify the Docker Compose file [here](https://github.com/ltfschoen/InkTest/blob/b9cf368091c0cb1e9b593a5bea07d1831b986486/docker-compose.yml#L32) by explicitly exposing port mappings from the Docker container to the host machine with:&#xD;&#xA;```&#xD;&#xA;ports:&#xD;&#xA;  - &quot;0.0.0.0:8080:8080&quot;&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;instead of just&#xD;&#xA;```&#xD;&#xA;ports:&#xD;&#xA;  - &quot;8080:8080&quot;&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;It was also necessary to remove `network_mode: host` [here](https://github.com/ltfschoen/InkTest/blob/b9cf368091c0cb1e9b593a5bea07d1831b986486/docker-compose.yml#L41) in that docker-compose.yml file too.&#xD;&#xA;&#xD;&#xA;I've since changed the code to use `docker run` instead of `docker compose` in the latest commits [here](https://github.com/ltfschoen/InkTest/blob/main/docker/docker.sh#L67) so I need to similarly publish the ports to the host machine:&#xD;&#xA;```&#xD;&#xA;docker run -it -d \&#xD;&#xA;  ...&#xD;&#xA;  --publish 0.0.0.0:8080:8080&#xD;&#xA;  ...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="33957" PostHistoryTypeId="5" PostId="8648" RevisionGUID="9235b92e-aa3c-4f2f-bd3d-1f9bdde8ebdc" CreationDate="2023-05-26T00:35:04.503" UserId="83" Comment="show what still doesn't work" Text="I got the same error `&#xD;&#xA;API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure&#xD;&#xA;` in [this](https://github.com/ltfschoen/InkTest/commit/b9cf368091c0cb1e9b593a5bea07d1831b986486) commit when trying to access http://localhost:3000 on my host machine to access an ink! DApp that I was running from within a Docker container.&#xD;&#xA;&#xD;&#xA;To fix it I had to modify the Docker Compose file [here](https://github.com/ltfschoen/InkTest/blob/b9cf368091c0cb1e9b593a5bea07d1831b986486/docker-compose.yml#L32) by explicitly exposing port mappings from the Docker container to the host machine with:&#xD;&#xA;```&#xD;&#xA;ports:&#xD;&#xA;  - &quot;0.0.0.0:8080:8080&quot;&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;instead of just&#xD;&#xA;```&#xD;&#xA;ports:&#xD;&#xA;  - &quot;8080:8080&quot;&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;It was also necessary to remove `network_mode: host` [here](https://github.com/ltfschoen/InkTest/blob/b9cf368091c0cb1e9b593a5bea07d1831b986486/docker-compose.yml#L41) in that docker-compose.yml file too.&#xD;&#xA;&#xD;&#xA;I've since changed the code to use `docker run` instead of `docker compose` in the latest commits [here](https://github.com/ltfschoen/InkTest/blob/main/docker/docker.sh#L67) so I need to similarly publish the ports to the host machine:&#xD;&#xA;```&#xD;&#xA;docker run -it -d \&#xD;&#xA;  ...&#xD;&#xA;  --publish 0.0.0.0:8080:8080&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: Whilst this change resolved the error and allowed me to access the Flipper DApp at http://locahost:3000, it didn't also allow me to access `https://contracts-ui.substrate.io/?rpc=ws://127.0.0.1:9944`, which still returned and error. As did changing it to `ws://0.0.0.0:9944`" ContentLicense="CC BY-SA 4.0" />
  <row Id="33958" PostHistoryTypeId="5" PostId="8648" RevisionGUID="b028474b-cf2e-44c8-9593-0ab71b6af9db" CreationDate="2023-05-26T00:43:48.213" UserId="83" Comment="show how to resolve so can connect to contracts-ui" Text="I got the same error `API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure` in [this](https://github.com/ltfschoen/InkTest/commit/b9cf368091c0cb1e9b593a5bea07d1831b986486) commit when trying to access http://localhost:3000 on my host machine to access an ink! DApp that I was running from within a Docker container.&#xD;&#xA;&#xD;&#xA;To fix it I had to modify the Docker Compose file [here](https://github.com/ltfschoen/InkTest/blob/b9cf368091c0cb1e9b593a5bea07d1831b986486/docker-compose.yml#L32) by explicitly exposing port mappings from the Docker container to the host machine with:&#xD;&#xA;```&#xD;&#xA;ports:&#xD;&#xA;  - &quot;0.0.0.0:8080:8080&quot;&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;instead of just&#xD;&#xA;```&#xD;&#xA;ports:&#xD;&#xA;  - &quot;8080:8080&quot;&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;It was also necessary to remove `network_mode: host` [here](https://github.com/ltfschoen/InkTest/blob/b9cf368091c0cb1e9b593a5bea07d1831b986486/docker-compose.yml#L41) in that docker-compose.yml file too.&#xD;&#xA;&#xD;&#xA;I've since changed the code to use `docker run` instead of `docker compose` in the latest commits [here](https://github.com/ltfschoen/InkTest/blob/main/docker/docker.sh#L67) so I need to similarly publish the ports to the host machine:&#xD;&#xA;```&#xD;&#xA;docker run -it -d \&#xD;&#xA;  ...&#xD;&#xA;  --publish 0.0.0.0:8080:8080&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: Whilst this change resolved the error and allowed me to access the Flipper DApp at http://locahost:3000 when running my node with substrate-contracts-node with:&#xD;&#xA;```bash&#xD;&#xA;substrate-contracts-node \&#xD;&#xA;	--dev \&#xD;&#xA;	--alice \&#xD;&#xA;	--name &quot;ink-test&quot; \&#xD;&#xA;	--base-path &quot;/tmp/ink&quot; \&#xD;&#xA;	--force-authoring \&#xD;&#xA;	--port 30333 \&#xD;&#xA;	--rpc-port 9933 \&#xD;&#xA;	--ws-port 9944 \&#xD;&#xA;	--ws-external \&#xD;&#xA;	--rpc-methods Unsafe \&#xD;&#xA;	--rpc-external \&#xD;&#xA;	--rpc-cors all \&#xD;&#xA;	--prometheus-external \&#xD;&#xA;	--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;	-lsync=debug,runtime::contracts=debug&#xD;&#xA;```&#xD;&#xA;It didn't also allow me to access https://contracts-ui.substrate.io/?rpc=ws://127.0.0.1:9944, which also returned the same error `API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure`.&#xD;&#xA;&#xD;&#xA;I was able to solve that error by using `--unsafe-ws-external` and `--unsafe-rpc-external` when running the substrate-contracts-node`. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33959" PostHistoryTypeId="5" PostId="8648" RevisionGUID="836a053d-285a-4d34-b150-9b7a8ed85c51" CreationDate="2023-05-26T00:50:04.553" UserId="83" Comment="show where error still occurs" Text="I got the same error `API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure` in [this](https://github.com/ltfschoen/InkTest/commit/b9cf368091c0cb1e9b593a5bea07d1831b986486) commit when trying to access http://localhost:3000 on my host machine to access an ink! DApp that I was running from within a Docker container.&#xD;&#xA;&#xD;&#xA;To fix it I had to modify the Docker Compose file [here](https://github.com/ltfschoen/InkTest/blob/b9cf368091c0cb1e9b593a5bea07d1831b986486/docker-compose.yml#L32) by explicitly exposing port mappings from the Docker container to the host machine with:&#xD;&#xA;```&#xD;&#xA;ports:&#xD;&#xA;  - &quot;0.0.0.0:8080:8080&quot;&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;instead of just&#xD;&#xA;```&#xD;&#xA;ports:&#xD;&#xA;  - &quot;8080:8080&quot;&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;It was also necessary to remove `network_mode: host` [here](https://github.com/ltfschoen/InkTest/blob/b9cf368091c0cb1e9b593a5bea07d1831b986486/docker-compose.yml#L41) in that docker-compose.yml file too.&#xD;&#xA;&#xD;&#xA;I've since changed the code to use `docker run` instead of `docker compose` in the latest commits [here](https://github.com/ltfschoen/InkTest/blob/main/docker/docker.sh#L67) so I need to similarly publish the ports to the host machine:&#xD;&#xA;```&#xD;&#xA;docker run -it -d \&#xD;&#xA;  ...&#xD;&#xA;  --publish 0.0.0.0:8080:8080&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: Whilst this change resolved the error and allowed me to access the Flipper DApp at http://locahost:3000 when running my node with substrate-contracts-node with:&#xD;&#xA;```bash&#xD;&#xA;substrate-contracts-node \&#xD;&#xA;	--dev \&#xD;&#xA;	--alice \&#xD;&#xA;	--name &quot;ink-test&quot; \&#xD;&#xA;	--base-path &quot;/tmp/ink&quot; \&#xD;&#xA;	--force-authoring \&#xD;&#xA;	--port 30333 \&#xD;&#xA;	--rpc-port 9933 \&#xD;&#xA;	--ws-port 9944 \&#xD;&#xA;	--ws-external \&#xD;&#xA;	--rpc-methods Unsafe \&#xD;&#xA;	--rpc-external \&#xD;&#xA;	--rpc-cors all \&#xD;&#xA;	--prometheus-external \&#xD;&#xA;	--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;	-lsync=debug,runtime::contracts=debug&#xD;&#xA;```&#xD;&#xA;It didn't also allow me to access https://contracts-ui.substrate.io/?rpc=ws://127.0.0.1:9944, which also returned the same error `API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure`.&#xD;&#xA;&#xD;&#xA;I was able to solve that error by using `--unsafe-ws-external` and `--unsafe-rpc-external` when running the substrate-contracts-node`. &#xD;&#xA;&#xD;&#xA;Note: If I try to access `https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer` it still gives error `API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure`" ContentLicense="CC BY-SA 4.0" />
  <row Id="33960" PostHistoryTypeId="5" PostId="8648" RevisionGUID="4b2760f0-2fd2-474f-a06f-dceafc21ad5a" CreationDate="2023-05-26T00:59:40.267" UserId="83" Comment="show how to disable brave shields" Text="I got the same error `API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure` in [this](https://github.com/ltfschoen/InkTest/commit/b9cf368091c0cb1e9b593a5bea07d1831b986486) commit when trying to access http://localhost:3000 on my host machine to access an ink! DApp that I was running from within a Docker container.&#xD;&#xA;&#xD;&#xA;To fix it I had to modify the Docker Compose file [here](https://github.com/ltfschoen/InkTest/blob/b9cf368091c0cb1e9b593a5bea07d1831b986486/docker-compose.yml#L32) by explicitly exposing port mappings from the Docker container to the host machine with:&#xD;&#xA;```&#xD;&#xA;ports:&#xD;&#xA;  - &quot;0.0.0.0:8080:8080&quot;&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;instead of just&#xD;&#xA;```&#xD;&#xA;ports:&#xD;&#xA;  - &quot;8080:8080&quot;&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;It was also necessary to remove `network_mode: host` [here](https://github.com/ltfschoen/InkTest/blob/b9cf368091c0cb1e9b593a5bea07d1831b986486/docker-compose.yml#L41) in that docker-compose.yml file too.&#xD;&#xA;&#xD;&#xA;I've since changed the code to use `docker run` instead of `docker compose` in the latest commits [here](https://github.com/ltfschoen/InkTest/blob/main/docker/docker.sh#L67) so I need to similarly publish the ports to the host machine:&#xD;&#xA;```&#xD;&#xA;docker run -it -d \&#xD;&#xA;  ...&#xD;&#xA;  --publish 0.0.0.0:8080:8080&#xD;&#xA;  ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note: Whilst this change resolved the error and allowed me to access the Flipper DApp at http://locahost:3000 when running my node with substrate-contracts-node with:&#xD;&#xA;```bash&#xD;&#xA;substrate-contracts-node \&#xD;&#xA;	--dev \&#xD;&#xA;	--alice \&#xD;&#xA;	--name &quot;ink-test&quot; \&#xD;&#xA;	--base-path &quot;/tmp/ink&quot; \&#xD;&#xA;	--force-authoring \&#xD;&#xA;	--port 30333 \&#xD;&#xA;	--rpc-port 9933 \&#xD;&#xA;	--ws-port 9944 \&#xD;&#xA;	--ws-external \&#xD;&#xA;	--rpc-methods Unsafe \&#xD;&#xA;	--rpc-external \&#xD;&#xA;	--rpc-cors all \&#xD;&#xA;	--prometheus-external \&#xD;&#xA;	--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;	-lsync=debug,runtime::contracts=debug&#xD;&#xA;```&#xD;&#xA;It didn't also allow me to access https://contracts-ui.substrate.io/?rpc=ws://127.0.0.1:9944, which also returned the same error `API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure`.&#xD;&#xA;&#xD;&#xA;I was able to solve that error by using `--unsafe-ws-external` and `--unsafe-rpc-external` when running the substrate-contracts-node`. &#xD;&#xA;&#xD;&#xA;I was also able to access https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944#/explorer.&#xD;&#xA;&#xD;&#xA;Note: As others have mentioned, if you are using Brave browser, even if you make the changes shown above you will still get error `API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure` unless you either:&#xD;&#xA;* click the Brave shield icon and you open &quot;Advanced controls&quot; and select &quot;Allow all trackers &amp; ads&quot;, or;&#xD;&#xA;* click to disable &quot;Shields are up&quot; to turn them off completely, as shown below&#xD;&#xA;[![disable Brave shields][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YwfSs.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="33961" PostHistoryTypeId="2" PostId="8649" RevisionGUID="889e2c4a-e64e-40c6-b86e-cae80aed4f7d" CreationDate="2023-05-26T04:08:57.593" UserId="683" Text="when I make a call to `api.rpc.chain.getBlock` , I see that there is a call to `chain_getHeader` and `state_getRuntimeVersion` before the block is fetched.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zqeHi.png&#xD;&#xA;&#xD;&#xA;But, runtimeVersion does not get stored in the SignedBlock object that is returned. So, why fetch it? and is it possible to prevent this fetch by manually passing the runtimeVersion to the function from my local cache?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33963" PostHistoryTypeId="1" PostId="8649" RevisionGUID="889e2c4a-e64e-40c6-b86e-cae80aed4f7d" CreationDate="2023-05-26T04:08:57.593" UserId="683" Text="RuntimeVersion in SignedBlock - polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="33964" PostHistoryTypeId="3" PostId="8649" RevisionGUID="889e2c4a-e64e-40c6-b86e-cae80aed4f7d" CreationDate="2023-05-26T04:08:57.593" UserId="683" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33965" PostHistoryTypeId="2" PostId="8650" RevisionGUID="0fffcbc9-d7f0-48e9-ab34-46df8ad87a48" CreationDate="2023-05-26T04:24:32.633" UserId="2372" Text="It was due to a different version of toml are present in the code. If the cargo tomls has version = &quot;0.9.36&quot; and some of the tomls have version =&quot;0.9.41&quot;.That's why it is showing duplicate sections." ContentLicense="CC BY-SA 4.0" />
  <row Id="33967" PostHistoryTypeId="5" PostId="8630" RevisionGUID="3dd2900f-be28-481d-84f6-2f523432d995" CreationDate="2023-05-26T04:29:35.820" UserId="2281" Comment="added 12 characters in body" Text="I checked my `Rustc` compiler version, turns out I was using the nightly+ version which contains some unstable updates for compiling to &#xD;&#xA;&#xD;&#xA;    WASM(I guess). &#xD;&#xA;&#xD;&#xA;After switching to the stable version. This fixed the last weird error and it worked. Thanks, guys!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33968" PostHistoryTypeId="2" PostId="8651" RevisionGUID="ed8f1400-e8b7-4963-9bf8-5f7d8c50e4fd" CreationDate="2023-05-26T04:33:17.363" UserId="2372" Text="you need to go to vanity generator in explorer after starting your private network. Then you need to add secret phase of the keys you have added. After that your account will be added with the exact amount that you have mentioned in your customSpec" ContentLicense="CC BY-SA 4.0" />
  <row Id="33970" PostHistoryTypeId="4" PostId="8621" RevisionGUID="2069ffc8-c153-46f5-a2df-bb83a91e42b8" CreationDate="2023-05-26T04:35:57.097" UserId="3136" Comment="In the section of Title there is a spelling mistake of particular " Text="Why we use empty struct named as key of particular lib name in mapping while using it in storage of openbrush libraries" ContentLicense="CC BY-SA 4.0" />
  <row Id="33971" PostHistoryTypeId="24" PostId="8621" RevisionGUID="2069ffc8-c153-46f5-a2df-bb83a91e42b8" CreationDate="2023-05-26T04:35:57.097" Comment="Proposed by 3136 approved by 2281, 4068 edit id of 418" ContentLicense="CC BY-SA 4.0" />
  <row Id="33972" PostHistoryTypeId="2" PostId="8652" RevisionGUID="435e6b04-b9a8-4717-8be8-13a9fc1d4116" CreationDate="2023-05-26T04:41:10.623" UserId="2372" Text="Error: Failed to Transact asset means that you don't have balance in your sovereign account of the particular parachain in the relay chain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33974" PostHistoryTypeId="2" PostId="8653" RevisionGUID="ab87c929-3522-4fa0-b502-517cf2545a8e" CreationDate="2023-05-26T04:44:30.400" UserId="139" Text="So it's often seen in `Precompile` implementations as a trait bound : &#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: LinearCostPrecompile&gt; Precompile for T {&#xD;&#xA;```&#xD;&#xA;and the trait itself : &#xD;&#xA;```rust&#xD;&#xA;pub trait LinearCostPrecompile {&#xD;&#xA;	const BASE: u64;&#xD;&#xA;	const WORD: u64;&#xD;&#xA;&#xD;&#xA;	fn execute(&#xD;&#xA;		input: &amp;[u8],&#xD;&#xA;		cost: u64,&#xD;&#xA;	) -&gt; core::result::Result&lt;(ExitSucceed, Vec&lt;u8&gt;), PrecompileFailure&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Can someone explain the why and what of this trait? " ContentLicense="CC BY-SA 4.0" />
  <row Id="33976" PostHistoryTypeId="1" PostId="8653" RevisionGUID="ab87c929-3522-4fa0-b502-517cf2545a8e" CreationDate="2023-05-26T04:44:30.400" UserId="139" Text="Frontier: What is trait LinearCostPrecompile about?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33977" PostHistoryTypeId="3" PostId="8653" RevisionGUID="ab87c929-3522-4fa0-b502-517cf2545a8e" CreationDate="2023-05-26T04:44:30.400" UserId="139" Text="|evm|frontier|precompile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33978" PostHistoryTypeId="2" PostId="8654" RevisionGUID="01c65936-63d9-4fd8-b83c-be708f770458" CreationDate="2023-05-26T04:47:12.713" UserId="2372" Text="You need to add keys in the parachain.If you are making private network , then you need to add aura or babe keys(any one of them present in your code) in the customSpec and insert them in the rpc calls of the explorer in the parachain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33980" PostHistoryTypeId="5" PostId="8654" RevisionGUID="dc7c246f-1017-445f-a995-92a3fc9ffc51" CreationDate="2023-05-26T06:33:40.753" UserId="2281" Comment="added 12 characters in body" Text="You need to add keys in the `parachain`.If you are making private network , then you need to add `aura` or `babe keys`(any one of them present in your code) in the `customSpec` and insert them in the `rpc calls` of the explorer in the `parachain`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="33981" PostHistoryTypeId="5" PostId="4223" RevisionGUID="2acaa8ca-24b3-4f45-a42f-6c1973d602b1" CreationDate="2023-05-26T07:35:28.527" UserId="2025" Comment="added 155 characters in body" Text="Conveniently, you have the relevant RPC method to get the metadata from a Substrate chain as the first example of [the custom RPC documentation on Substrate](https://docs.substrate.io/build/remote-procedure-calls/).&#xD;&#xA;&#xD;&#xA;Additionally, if you are considering to use Polkadot.js, [this is the relevant method to get the metadata](https://polkadot.js.org/docs/substrate/runtime#metadata).&#xD;&#xA;&#xD;&#xA;Finally, [this answer](https://substrate.stackexchange.com/questions/5554/how-to-add-custom-rpcs) should cover how to do this in a custom RPC call." ContentLicense="CC BY-SA 4.0" />
  <row Id="33982" PostHistoryTypeId="2" PostId="8655" RevisionGUID="8edbba82-3617-43ed-bc53-ae0ac9079e1d" CreationDate="2023-05-26T09:34:13.490" UserId="4068" Text="I am trying to understand the working of upgradeble storage used by openbrush libraries.&#xD;&#xA;&#xD;&#xA;I am unable to understand Mapping used in impls of psp34 trait eg &#xD;&#xA;&#xD;&#xA;        pub operator_approvals: Mapping&lt;(Owner, Operator, Option&lt;Id&gt;), (), ApprovalsKey&gt;,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;from storage of psp34 library given bellow&#xD;&#xA;&#xD;&#xA;    #[openbrush::upgradeable_storage(STORAGE_KEY)]&#xD;&#xA;#[derive(Default, Debug)]&#xD;&#xA;pub struct Data&lt;B = balances::Balances&gt;&#xD;&#xA;where&#xD;&#xA;    B: Storable&#xD;&#xA;        + AutoStorableHint&lt;ManualKey&lt;453953544, ManualKey&lt;{ STORAGE_KEY }&gt;&gt;, Type = B&gt;&#xD;&#xA;        + StorableHint&lt;ManualKey&lt;{ STORAGE_KEY }&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;    pub token_owner: Mapping&lt;Id, Owner&gt;,&#xD;&#xA;    pub operator_approvals: Mapping&lt;(Owner, Operator, Option&lt;Id&gt;), (), ApprovalsKey&gt;,&#xD;&#xA;    pub balances: B,&#xD;&#xA;    pub _reserved: Option&lt;()&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33984" PostHistoryTypeId="1" PostId="8655" RevisionGUID="8edbba82-3617-43ed-bc53-ae0ac9079e1d" CreationDate="2023-05-26T09:34:13.490" UserId="4068" Text="Explain components of Mapping used by Openbrush. Mainly placeholders for the actual type used in the code. Like ApprovalsKey used in bellow example" ContentLicense="CC BY-SA 4.0" />
  <row Id="33985" PostHistoryTypeId="3" PostId="8655" RevisionGUID="8edbba82-3617-43ed-bc53-ae0ac9079e1d" CreationDate="2023-05-26T09:34:13.490" UserId="4068" Text="|ink|smart-contract|wasm|substrate-contracts-node|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33986" PostHistoryTypeId="2" PostId="8656" RevisionGUID="cdc6f02e-5b72-4539-99f0-1f952be4d886" CreationDate="2023-05-26T09:34:13.490" UserId="4068" Text="The code defines a public (i.e., accessible from outside the module or contract) variable called `operator_approvals`. Let's break down the code and understand its components:&#xD;&#xA;&#xD;&#xA;    pub operator_approvals: Mapping&lt;(Owner, Operator, Option&lt;Id&gt;), (), ApprovalsKey&gt;,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. `pub`: This keyword indicates that the variable `operator_approvals` is public and can be accessed from outside the module or contract. Other parts of the code can read and modify this variable.&#xD;&#xA;&#xD;&#xA;2. `operator_approvals`: This is the name of the variable. It represents a mapping or dictionary-like data structure that associates keys with values.&#xD;&#xA;&#xD;&#xA;3. `Mapping&lt;(Owner, Operator, Option&lt;Id&gt;)`: This specifies the key type for the `operator_approvals` mapping. The key is defined as a tuple `(Owner, Operator, Option&lt;Id&gt;)`. Here, `Owner`, `Operator`, and `Id` are placeholders for the actual types used in the code. The key tuple represents the parameters that uniquely identify an approval.&#xD;&#xA;&#xD;&#xA;4. `(), ApprovalsKey`: This specifies the value type for the `operator_approvals` mapping. The value type is defined as `()`, which represents an empty tuple or unit value. Additionally, `ApprovalsKey` is a placeholder for the actual type used in the code.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; The ApprovalsKey serves as a placeholder for the actual type used in the code.&#xD;&#xA;&#xD;&#xA;By using placeholders like ApprovalsKey, Openbrush allows for flexibility in defining the specific type that will be used for the values in the mapping. This approach enables customization and adaptability to different requirements and contexts where the Openbrush code is utilized." ContentLicense="CC BY-SA 4.0" />
  <row Id="33988" PostHistoryTypeId="5" PostId="8655" RevisionGUID="c4f4a523-0c31-49bd-8e86-a52766a7292e" CreationDate="2023-05-26T09:41:06.377" UserId="4068" Comment="edited the code section" Text="I am trying to understand the working of upgradeble storage used by openbrush libraries.&#xD;&#xA;&#xD;&#xA;I am unable to understand Mapping used in impls of psp34 trait eg &#xD;&#xA;&#xD;&#xA;        pub operator_approvals: Mapping&lt;(Owner, Operator, Option&lt;Id&gt;), (), ApprovalsKey&gt;,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;from storage of psp34 library given bellow&#xD;&#xA;&#xD;&#xA;    #[openbrush::upgradeable_storage(STORAGE_KEY)]&#xD;&#xA;    #[derive(Default, Debug)]&#xD;&#xA;    pub struct Data&lt;B = balances::Balances&gt;&#xD;&#xA;    where&#xD;&#xA;        B: Storable&#xD;&#xA;            + AutoStorableHint&lt;ManualKey&lt;453953544, ManualKey&lt;{ STORAGE_KEY }&gt;&gt;, Type = B&gt;&#xD;&#xA;            + StorableHint&lt;ManualKey&lt;{ STORAGE_KEY }&gt;&gt;,&#xD;&#xA;    {&#xD;&#xA;        pub token_owner: Mapping&lt;Id, Owner&gt;,&#xD;&#xA;        pub operator_approvals: Mapping&lt;(Owner, Operator, Option&lt;Id&gt;), (), ApprovalsKey&gt;,&#xD;&#xA;        pub balances: B,&#xD;&#xA;        pub _reserved: Option&lt;()&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="33989" PostHistoryTypeId="2" PostId="8657" RevisionGUID="3b084b28-5141-42a4-a10f-406c8cc6d8ac" CreationDate="2023-05-26T10:11:56.960" UserId="4068" Text="I am trying to fetch caller address in ink smart contract to apply some checks.&#xD;&#xA;&#xD;&#xA;    let owner = self._check_token_exists(&amp;id)?;&#xD;&#xA;    let caller = Self::env().caller();&#xD;&#xA;&#xD;&#xA;I am confused which one i should use ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="33991" PostHistoryTypeId="1" PostId="8657" RevisionGUID="3b084b28-5141-42a4-a10f-406c8cc6d8ac" CreationDate="2023-05-26T10:11:56.960" UserId="4068" Text="What is distinction between self (lowercase) and Self (uppercase) In Rust?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33992" PostHistoryTypeId="3" PostId="8657" RevisionGUID="3b084b28-5141-42a4-a10f-406c8cc6d8ac" CreationDate="2023-05-26T10:11:56.960" UserId="4068" Text="|substrate-node-template|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33993" PostHistoryTypeId="2" PostId="8658" RevisionGUID="1439c73b-4ac3-4d33-bdfd-1312629a25a5" CreationDate="2023-05-26T10:11:56.960" UserId="4068" Text="In Rust, there is a distinction between self (lowercase) and Self (uppercase):&#xD;&#xA;&#xD;&#xA;1- self (lowercase):&#xD;&#xA;&#xD;&#xA;In method definitions, self refers to the current instance of a struct, enum, or trait implementation on which the method is being called. It allows you to access the fields and methods of the current instance.&#xD;&#xA;For example, if you have a struct called MyStruct with a method my_method, you can access the fields of the struct using self.field_name within the method.&#xD;&#xA;&#xD;&#xA;2- Self (uppercase):&#xD;&#xA;&#xD;&#xA;In traits and associated items, Self refers to the implementing type itself. It is used to specify that the implementing type will be used or returned.&#xD;&#xA;When you define a trait, you can use Self to refer to the implementing type instead of specifying the concrete type explicitly. This allows for more flexibility when implementing the trait for different types.&#xD;&#xA;For example, if you have a trait called MyTrait with an associated function new, you can use Self as the return type to indicate that the implementing type will be returned from the function.&#xD;&#xA;Here's an example to illustrate the difference:&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;     struct MyStruct {&#xD;&#xA;        value: i32,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl MyStruct {&#xD;&#xA;        fn my_method(&amp;self) {&#xD;&#xA;            println!(&quot;Value: {}&quot;, self.value);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    trait MyTrait {&#xD;&#xA;        fn new() -&gt; Self;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    struct AnotherStruct;&#xD;&#xA;    &#xD;&#xA;    impl MyTrait for AnotherStruct {&#xD;&#xA;        fn new() -&gt; Self {&#xD;&#xA;            AnotherStruct&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fn main() {&#xD;&#xA;        let my_struct = MyStruct { value: 42 };&#xD;&#xA;        my_struct.my_method();&#xD;&#xA;    &#xD;&#xA;        let another_struct: AnotherStruct = MyTrait::new();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In the example above, self is used within the my_method method to refer to the current instance of MyStruct. Self is used within the MyTrait trait to refer to the implementing type, which allows different types (such as AnotherStruct) to implement the trait and provide their own implementation of the associated function new." ContentLicense="CC BY-SA 4.0" />
  <row Id="33995" PostHistoryTypeId="2" PostId="8659" RevisionGUID="a7d8b3fd-53a7-4cb2-8912-7e2a6057992e" CreationDate="2023-05-26T12:40:43.557" UserId="4261" Text=" I am getting error in  #[pallet::generate_store(pub(super) trait Store)]  which is  showing deprecated warning due to which I could not compile my custom pallet is there any solution" ContentLicense="CC BY-SA 4.0" />
  <row Id="33997" PostHistoryTypeId="1" PostId="8659" RevisionGUID="a7d8b3fd-53a7-4cb2-8912-7e2a6057992e" CreationDate="2023-05-26T12:40:43.557" UserId="4261" Text="Pallet generate store is deprecated how to avoid this warning and compile the code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="33998" PostHistoryTypeId="3" PostId="8659" RevisionGUID="a7d8b3fd-53a7-4cb2-8912-7e2a6057992e" CreationDate="2023-05-26T12:40:43.557" UserId="4261" Text="|substrate-node-template|pallet|rust|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="33999" PostHistoryTypeId="2" PostId="8660" RevisionGUID="5d2e453f-9873-417f-bd2d-0b2cfcafe1eb" CreationDate="2023-05-26T13:47:54.690" UserId="3752" Text="I have developed Substrate Network with EVM compatibility andd POA consensus algorithm. &#xD;&#xA;It was working fine and transaction execution time was although alot but for now getting an error from `EVM-core`. &#xD;&#xA;I have tried to deploy smart contract and it failed. Then i tried to execute light weight transactions as like sending ethers from wallet 1 to wallet 2 but still it was throwing error of &#xD;&#xA;&#xD;&#xA;&gt; **EvmCoreErrorExitReason (OutOfFund)**&#xD;&#xA;&#xD;&#xA;on PolkaDot Explorer. Let me know how i can enhance the execution time of transactions and how i can Fix this error as well. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34001" PostHistoryTypeId="1" PostId="8660" RevisionGUID="5d2e453f-9873-417f-bd2d-0b2cfcafe1eb" CreationDate="2023-05-26T13:47:54.690" UserId="3752" Text="Transaction execution error of EVM &quot;EvmCoreErrorExitReason (OutOfFund)&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34002" PostHistoryTypeId="3" PostId="8660" RevisionGUID="5d2e453f-9873-417f-bd2d-0b2cfcafe1eb" CreationDate="2023-05-26T13:47:54.690" UserId="3752" Text="|evm|substrate-node|frontend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34003" PostHistoryTypeId="2" PostId="8661" RevisionGUID="00edb9c9-c33e-4d30-a566-104f63b2376a" CreationDate="2023-05-26T14:43:28.323" UserId="1786" Text="So polkadot-js has a very complex and intricate system underneath the hood that caches and detects changes between runtime versions in order to decorate the registry we use to decode, and create types. It's important to understand that the api does ALOT of heavy lifting to ensure the registries created are correct from a historical standpoint and current standpoint. &#xD;&#xA;&#xD;&#xA;In this case, I wrote a very simple script to demonstrate the following:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const main = async () =&gt; {&#xD;&#xA;    const api = await ApiPromise.create({&#xD;&#xA;        provider: new WsProvider('wss://rpc.polkadot.io'),&#xD;&#xA;    });&#xD;&#xA;    await api.rpc.chain.getBlock()&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now when we run this we will get the first following calls made below. These results are cached and stored in the api. You can see exactly where in the code this happens [here](https://github.com/polkadot-js/api/blob/master/packages/api/src/base/Init.ts#L318-L328).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-05-26 10:16:15          API-WS: calling chain_getBlockHash {&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;chain_getBlockHash&quot;,&quot;params&quot;:[0]}&#xD;&#xA;2023-05-26 10:16:15          API-WS: calling state_getRuntimeVersion {&quot;id&quot;:2,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_getRuntimeVersion&quot;,&quot;params&quot;:[]}&#xD;&#xA;2023-05-26 10:16:15          API-WS: calling system_chain {&quot;id&quot;:3,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;system_chain&quot;,&quot;params&quot;:[]}&#xD;&#xA;2023-05-26 10:16:15          API-WS: calling system_properties {&quot;id&quot;:4,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;system_properties&quot;,&quot;params&quot;:[]}&#xD;&#xA;2023-05-26 10:16:15          API-WS: calling rpc_methods {&quot;id&quot;:5,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;rpc_methods&quot;,&quot;params&quot;:[]}&#xD;&#xA;2023-05-26 10:16:15          API-WS: calling state_getMetadata {&quot;id&quot;:6,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_getMetadata&quot;,&quot;params&quot;:[]}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then after the above we get the following calls:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-05-26 10:16:15          API-WS: calling chain_getHeader {&quot;id&quot;:8,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;chain_getHeader&quot;,&quot;params&quot;:[&quot;0xfd9d5f2d26fa639a4154a8735da44337d7cf967e99fc365d2cfaf805a594b05e&quot;]}&#xD;&#xA;2023-05-26 10:16:15          API-WS: received {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;ovMti9lPXcTP1sQ0&quot;,&quot;id&quot;:7}&#xD;&#xA;2023-05-26 10:16:15          API-WS: received {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_runtimeVersion&quot;,&quot;params&quot;:{&quot;subscription&quot;:&quot;ovMti9lPXcTP1sQ0&quot;,&quot;result&quot;:{&quot;specName&quot;:&quot;polkadot&quot;,&quot;implName&quot;:&quot;parity-polkadot&quot;,&quot;authoringVersion&quot;:0,&quot;specVersion&quot;:9370,&quot;implVersion&quot;:0,&quot;apis&quot;:[[&quot;0xdf6acb689907609b&quot;,4],[&quot;0x37e397fc7c91f5e4&quot;,1],[&quot;0x40fe3ad401f8959a&quot;,6],[&quot;0x17a6bc0d0062aeb3&quot;,1],[&quot;0xd2bc9897eed08f15&quot;,3],[&quot;0xf78b278be53f454c&quot;,2],[&quot;0xaf2c0297a23e6d3d&quot;,2],[&quot;0x49eaaf1b548a0cb0&quot;,1],[&quot;0x91d5df18b0d2cf58&quot;,1],[&quot;0xed99c5acb25eedf5&quot;,3],[&quot;0xcbca25e39f142387&quot;,2],[&quot;0x687ad44ad37f03c2&quot;,1],[&quot;0xab3c0572291feb8b&quot;,1],[&quot;0xbc9d89904f5b923f&quot;,1],[&quot;0x37c8bb1350a9a2a8&quot;,2],[&quot;0xf3ff14d5ab527059&quot;,2]],&quot;transactionVersion&quot;:20,&quot;stateVersion&quot;:0}}}&#xD;&#xA;2023-05-26 10:16:15          API-WS: received {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:{&quot;parentHash&quot;:&quot;0xda2fce23bc3a9d6c46812a7b7e00ef97068f06dccb952d7778e08c32beaceb35&quot;,&quot;number&quot;:&quot;0xef70da&quot;,&quot;stateRoot&quot;:&quot;0x432ca10d3c50b440a0b39edc604856c85ba843cdab796b6b7504e9268cea9992&quot;,&quot;extrinsicsRoot&quot;:&quot;0xb4976bc6db95bff85c9c3e5eb6ac9559975fb320a0016e1cb773c221318965db&quot;,&quot;digest&quot;:{&quot;logs&quot;:[&quot;0x0642414245b50103780000002e75bd1000000000627c85812a0d35e0f65079d575d7fe8fb635079615060e00f750ab9f25c57e3722aa3b6e5a3786228e8036ba6dc6df485c91923bad33620702e89f497c908806e36a514dd93eef9def1dc259372e305a77d9038cd463e246c511573eb4704b0c&quot;,&quot;0x0542414245010174fd1eea2459ff260fdf1af8d3d17adc1aba7af585dbe4de4257ff4ccf58052b485603ed538f97f48c108f50e2e8d24556e7af11ff01b466626d7badc0d91485&quot;]}},&quot;id&quot;:8}&#xD;&#xA;2023-05-26 10:16:15          API-WS: calling state_getRuntimeVersion {&quot;id&quot;:9,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_getRuntimeVersion&quot;,&quot;params&quot;:[&quot;0xda2fce23bc3a9d6c46812a7b7e00ef97068f06dccb952d7778e08c32beaceb35&quot;]}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now the following calls are being used to ensure we have the correct information to retrieve the correct `VersionedRegistry`. You can see the following code here where the following RPC calls are made: https://github.com/polkadot-js/api/blob/master/packages/api/src/base/Init.ts#L185-L222&#xD;&#xA;&#xD;&#xA;There is no way to turn this off as far as I know and understand from reading the underlying code, but nor would you want too. It increases performance for the longevity of the api's open connection, and also ensures that any and all information you have, create or decode is correct in respect to the registry it is fetching." ContentLicense="CC BY-SA 4.0" />
  <row Id="34005" PostHistoryTypeId="2" PostId="8662" RevisionGUID="186a26ee-efba-414a-8fbd-37fade9b3c12" CreationDate="2023-05-26T14:44:55.707" UserId="29" Text="Here is a detailed, step-by-step instruction.&#xD;&#xA;&#xD;&#xA;First create an NFT collection.&#xD;&#xA;&#xD;&#xA;![](https://hackmd.io/_uploads/SJESZITSn.png)&#xD;&#xA;![](https://hackmd.io/_uploads/r1gkGUTSn.png)&#xD;&#xA;&#xD;&#xA;Encoded call data: &#xD;&#xA;```&#xD;&#xA;0x2a0000d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0000000000000000010a000000000000000000000000000000&#xD;&#xA;```&#xD;&#xA;Next we have to do three things:&#xD;&#xA;- create our mint data (this will be the NFT we want to be minted)&#xD;&#xA;- encode the mint data &#xD;&#xA;- sign the encoded mint data&#xD;&#xA;    - the account that signs the encoded mint data should be an issuer for the collection, meaning, they have approval to mint&#xD;&#xA;&gt; Note: when creating the mint data, if you only intend one account to have permission to mint that NFT then specify this in the `only_account` attribute otherwise, any account will have permission to mint the pre-signed NFT.&#xD;&#xA;&#xD;&#xA;We can use PolkadotJs Apps to construct the mint data like so:&#xD;&#xA;&#xD;&#xA;![](https://hackmd.io/_uploads/Sk7lx86r2.png)&#xD;&#xA;![](https://hackmd.io/_uploads/SyIEx8aS2.png)&#xD;&#xA;&#xD;&#xA;&gt; We are not going to submit this transaction. We are only using it to obtain the encoded mint data. You could also construct this using JavaScript and PolkadotJS API or similar.&#xD;&#xA;&#xD;&#xA;Keep in mind that `onlyAccount` here is set to `None`. This means that any account that has access to this mint data, once it is signed, could mint this.&#xD;&#xA;&#xD;&#xA;For `deadline` specify the block number where this transaction will be valid for. The transaction will be valid up to this block number.&#xD;&#xA;&#xD;&#xA;Notice the encoding details on the bottom right of the screen.&#xD;&#xA;&#xD;&#xA;From that we can concatenate and construct our encoded mint data:&#xD;&#xA;```&#xD;&#xA;0x000000000000000004106e616d65304272756e6f2047616c76616f0000d0070000&#xD;&#xA;```&#xD;&#xA;We now have to sign the encoded mint data.&#xD;&#xA;&#xD;&#xA;![](https://hackmd.io/_uploads/HJce7LaHh.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Alternatively, here is a nice script:&#xD;&#xA;```js&#xD;&#xA;import { Keyring } from '@polkadot/keyring';&#xD;&#xA;import { u8aToHex } from '@polkadot/util';&#xD;&#xA;import { cryptoWaitReady } from '@polkadot/util-crypto';&#xD;&#xA;&#xD;&#xA;export const sign = async () =&gt; {&#xD;&#xA;    await cryptoWaitReady();&#xD;&#xA;&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;    const pair = keyring.addFromUri('//Alice');&#xD;&#xA;    const sig = pair.sign('0x000000000000000004106e616d65304272756e6f2047616c76616f0000d0070000');&#xD;&#xA;    console.log('Signature: ', u8aToHex(sig));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;Signature:  0x163b1eb3420cf2b78b4ffedca11e9618dd8528e6e7485cb343379d9db6aa84305f9995b6bf2120d4541d36a9056f6a158ccc5e8745794657073ae23cb3de838f&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We can now create the `mintPreSigned` extrinsic and include our signature:&#xD;&#xA;&#xD;&#xA;![](https://hackmd.io/_uploads/Hkx5qRhSh.png)&#xD;&#xA;![](https://hackmd.io/_uploads/ry_5sA2B3.png)&#xD;&#xA;&#xD;&#xA;Click &quot;Submit Transaction&quot; and you should now have a crisp, fresh NFT minted.&#xD;&#xA;&#xD;&#xA;![](https://hackmd.io/_uploads/By6_J8aH3.png)&#xD;&#xA;&#xD;&#xA;Success! Done.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Resources&#xD;&#xA;&#xD;&#xA;Offchain Minting PR&#xD;&#xA;- https://github.com/paritytech/substrate/pull/13158&#xD;&#xA;&#xD;&#xA;Test for offchain minting (super useful to read):&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0cf64f8bd72d719818be2f109c0919c7c9325cd1/frame/nfts/src/tests.rs#L3171-L3337" ContentLicense="CC BY-SA 4.0" />
  <row Id="34007" PostHistoryTypeId="5" PostId="8642" RevisionGUID="8e777935-9c96-4d70-a0be-a993393e4596" CreationDate="2023-05-26T14:47:13.230" UserId="1786" Comment="added 194 characters in body" Text="&lt;s&gt;From what I understand RPC calls don't have any underlying or additional calls made when on their own &lt;/s&gt; (with the exception of `system_health` pinging the node with an open websocket connection). It's different when using `api.at()` for storage queries, there are underlying caching mechanisms that will make certain checks that might require making rpc calls.&#xD;&#xA;&#xD;&#xA;That being said, if you would like more detailed logging in order to see what exactly is being called per rpc call, you can set the following env variable for websocket connections:&#xD;&#xA;&#xD;&#xA;`export DEBUG=api-ws` - This can be seen in the following code inside of [rpc-provider for websockets](https://github.com/polkadot-js/api/blob/master/packages/rpc-provider/src/ws/index.ts#L47). &#xD;&#xA;&#xD;&#xA;More details on how logging works can be seen inside of the [common package](https://github.com/polkadot-js/common/blob/master/packages/util/src/logger.ts#L135-L148).&#xD;&#xA;&#xD;&#xA;Edit: Rpc calls do make underlying calls for registry caching: See answer here: https://substrate.stackexchange.com/questions/8649/runtimeversion-in-signedblock-polkadot-js/8661#8661" ContentLicense="CC BY-SA 4.0" />
  <row Id="34008" PostHistoryTypeId="2" PostId="8663" RevisionGUID="75bab52f-acdf-46a8-b1ac-9cff6442b4fe" CreationDate="2023-05-26T14:51:46.290" UserId="2762" Text="I am using [subxt][1] to get the list of parachains on the Polkadot network. Firstly I used the `subxt-cli` tool to download the metadata:&#xD;&#xA;&#xD;&#xA;    subxt metadata --url https://rpc.polkadot.io:443 -f bytes &gt; polkadot-metadata.scale&#xD;&#xA;&#xD;&#xA;The file looks fine:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;metadata/polkadot_metadata.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then I query the storage to retrieve the parachains:&#xD;&#xA;```rs&#xD;&#xA;let storage_query = polkadot::storage().paras().parachains();&#xD;&#xA;&#xD;&#xA;let result = api&#xD;&#xA;        .storage()&#xD;&#xA;        .at_latest()&#xD;&#xA;        .await?&#xD;&#xA;        .fetch(&amp;storage_query)&#xD;&#xA;        .await?;&#xD;&#xA;```&#xD;&#xA;But when I run it I get an error:&#xD;&#xA;&#xD;&#xA;    Error: Metadata(PalletNotFound)&#xD;&#xA;&#xD;&#xA;What am I doing wrong here? How can I check that I have the correct metadata? Or the list of pallets I can query?&#xD;&#xA;&#xD;&#xA;The query on PolkadotJS is the following:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt/tree/master&#xD;&#xA;  [2]: https://i.stack.imgur.com/h5NPs.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34010" PostHistoryTypeId="1" PostId="8663" RevisionGUID="75bab52f-acdf-46a8-b1ac-9cff6442b4fe" CreationDate="2023-05-26T14:51:46.290" UserId="2762" Text="Metadata(PalletNotFound) with subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="34011" PostHistoryTypeId="3" PostId="8663" RevisionGUID="75bab52f-acdf-46a8-b1ac-9cff6442b4fe" CreationDate="2023-05-26T14:51:46.290" UserId="2762" Text="|subxt|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34012" PostHistoryTypeId="2" PostId="8664" RevisionGUID="c9e8e65f-6d10-4c2d-b8e8-822bf5927567" CreationDate="2023-05-26T16:18:21.997" UserId="251" Text="Simply remove that line.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For more detail, check https://github.com/paritytech/substrate/pull/13535." ContentLicense="CC BY-SA 4.0" />
  <row Id="34014" PostHistoryTypeId="52" PostId="8655" RevisionGUID="64050859-61b8-4c69-87a9-ea94bafd1f3d" CreationDate="2023-05-26T17:34:59.810" />
  <row Id="34015" PostHistoryTypeId="2" PostId="8665" RevisionGUID="3c7b3593-af20-471c-aadc-6831a9798295" CreationDate="2023-05-26T18:09:59.583" UserId="83" Text="I've written [this ink! quickstart script][1] that I can repeatedly call to run these steps to flood my local testnet with instances of Flipper contracts:&#xD;&#xA;&#xD;&#xA;1. Kills an existing substrate-contracts-node running on default port 30333&#xD;&#xA;2. Kills the associated database&#xD;&#xA;3. Starts the substrate-contracts-node again&#xD;&#xA;4. Waits for 15 seconds that seems to be an adequate amount of time before interacting with it to avoid errors like `ERROR: Rpc error: RPC error: Networking or low-level protocol error: Error when opening the TCP socket: Cannot assign requested address (os error 99)`&#xD;&#xA;5. Creates the Flipper DApp boilerplate&#xD;&#xA;6. **Builds** the Flipper smart contract&#xD;&#xA;7. Updates the Flipper DApp ABI with the latest build of flipper.json&#xD;&#xA;8. **Uploads** the smart contract to a **Code Hash**&#xD;&#xA;9. **Instantiates** the smart contract at a **Contract Address**&#xD;&#xA;10. Calls various smart contract functions&#xD;&#xA;&#xD;&#xA;But I can't just have the script only do steps 5-10 repeatedly because I'll get error `ERROR: This contract has already been uploaded with code hash:`. Hence why I destroy the chain database before restarting the node and uploading and deploying the smart contract again. But each time the substrate-contracts-node restarts and I upload and instantiate it, it always gets uploaded to the same Code Hash and is instantiated with the same Contract Address. &#xD;&#xA;&#xD;&#xA;In **_step 9_**. where we're **instantiating** the contract at a Contract Address with this command:&#xD;&#xA;```bash&#xD;&#xA;cargo contract instantiate --suri //Bob --constructor new --args true --execute --skip-confirm | tail -1&#xD;&#xA;```&#xD;&#xA;I can't instantiate it again with the same `--suri //Bob` or it gives error:&#xD;&#xA;```bash&#xD;&#xA;ERROR: ModuleError: Contracts::DuplicateContract: [&quot;A contract with the same AccountId already exists.&quot;]&#xD;&#xA;```&#xD;&#xA;If I change it to `--suri //Charlie` so a different account instantiates the smart contract it actually generates a different Contract Address.&#xD;&#xA;So I could flood the local testnet with multiple instances of the same contract as long as I generate a unique account to instantiate each one.&#xD;&#xA;&#xD;&#xA;But in earlier **_step 8_**. where we're **uploading** the contract with this command:&#xD;&#xA;```bash&#xD;&#xA;cargo contract upload --suri //Alice --execute --skip-confirm | tail -1&#xD;&#xA;```&#xD;&#xA;If I change it to `--suri //Bob` so a different account uploads the smart contract it still generates the same Code Hash and returns error:&#xD;&#xA;```bash&#xD;&#xA;ERROR: This contract has already been uploaded with code hash: 0x__&#xD;&#xA;```&#xD;&#xA;So is it possible to upload exactly the same same ink! smart contract code multiple times on the same network with a different Code Hash?&#xD;&#xA;Or is the only possible way to do that by adding an extra step to generate a unique account that'd be used to upload it with?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ltfschoen/InkTemplate/blob/main/docker/quickstart.sh" ContentLicense="CC BY-SA 4.0" />
  <row Id="34017" PostHistoryTypeId="1" PostId="8665" RevisionGUID="3c7b3593-af20-471c-aadc-6831a9798295" CreationDate="2023-05-26T18:09:59.583" UserId="83" Text="How to upload the same ink! smart contract to a different code hash?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34018" PostHistoryTypeId="3" PostId="8665" RevisionGUID="3c7b3593-af20-471c-aadc-6831a9798295" CreationDate="2023-05-26T18:09:59.583" UserId="83" Text="|ink|smart-contract|substrate-contracts-node|cargo-contract|code-hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34019" PostHistoryTypeId="5" PostId="8665" RevisionGUID="f7db7393-b093-4875-b536-c8630c514274" CreationDate="2023-05-26T18:18:55.253" UserId="83" Comment="Fix question" Text="I've written [this ink! quickstart script][1] that I can repeatedly call to run these steps to flood my local testnet with instances of Flipper contracts:&#xD;&#xA;&#xD;&#xA;1. Kills an existing substrate-contracts-node running on default port 30333&#xD;&#xA;2. Kills the associated database&#xD;&#xA;3. Starts the substrate-contracts-node again&#xD;&#xA;4. Waits for 15 seconds that seems to be an adequate amount of time before interacting with it to avoid errors like `ERROR: Rpc error: RPC error: Networking or low-level protocol error: Error when opening the TCP socket: Cannot assign requested address (os error 99)`&#xD;&#xA;5. Creates the Flipper DApp boilerplate&#xD;&#xA;6. **Builds** the Flipper smart contract&#xD;&#xA;7. Updates the Flipper DApp ABI with the latest build of flipper.json&#xD;&#xA;8. **Uploads** the smart contract to a **Code Hash**&#xD;&#xA;9. **Instantiates** the smart contract at a **Contract Address**&#xD;&#xA;10. Calls various smart contract functions&#xD;&#xA;&#xD;&#xA;But I can't just have the script only do steps 5-10 repeatedly because I'll get error `ERROR: This contract has already been uploaded with code hash:`. Hence why I destroy the chain database before restarting the node and uploading and deploying the smart contract again. But each time the substrate-contracts-node restarts and I upload and instantiate it, it always gets uploaded to the same Code Hash and is instantiated with the same Contract Address. &#xD;&#xA;&#xD;&#xA;In **_step 9_**. where we're **instantiating** the contract at a Contract Address with this command:&#xD;&#xA;```bash&#xD;&#xA;cargo contract instantiate --suri //Bob --constructor new --args true --execute --skip-confirm | tail -1&#xD;&#xA;```&#xD;&#xA;I can't instantiate it again with the same `--suri //Bob` or it gives error:&#xD;&#xA;```bash&#xD;&#xA;ERROR: ModuleError: Contracts::DuplicateContract: [&quot;A contract with the same AccountId already exists.&quot;]&#xD;&#xA;```&#xD;&#xA;If I change it to `--suri //Charlie` so a different account instantiates the smart contract it actually generates a different Contract Address.&#xD;&#xA;So I could flood the local testnet with multiple instances of the same contract as long as I generate a unique account to instantiate each one.&#xD;&#xA;&#xD;&#xA;But in earlier **_step 8_**. where we're **uploading** the contract with this command:&#xD;&#xA;```bash&#xD;&#xA;cargo contract upload --suri //Alice --execute --skip-confirm | tail -1&#xD;&#xA;```&#xD;&#xA;If I change it to `--suri //Bob` so a different account uploads the smart contract it still generates the same Code Hash and returns error:&#xD;&#xA;```bash&#xD;&#xA;ERROR: This contract has already been uploaded with code hash: 0x__&#xD;&#xA;```&#xD;&#xA;So is it possible to upload exactly the same same ink! smart contract code multiple times on the same network with a different Code Hash?&#xD;&#xA;Or is the only possible way to do that by adding an extra step to slightly modify the smart contract code that would be getting built and uploaded?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ltfschoen/InkTemplate/blob/main/docker/quickstart.sh" ContentLicense="CC BY-SA 4.0" />
  <row Id="34020" PostHistoryTypeId="2" PostId="8666" RevisionGUID="185a8783-8e63-4756-bc4a-e00ddf9ff407" CreationDate="2023-05-26T19:40:12.727" UserId="4259" Text="I finally figured it out! The -1 value of `gasLimit` is generating the error. I solve it by modifying it in the following way: &#xD;&#xA;```js &#xD;&#xA;const gasLimit = api.registry.createType('WeightV2', { refTime: 3912368128, proofSize: 131072 });&#xD;&#xA;```&#xD;&#xA;Where `refTime` and `proofSize` values are obtained using contracts-ui.substrate.io" ContentLicense="CC BY-SA 4.0" />
  <row Id="34027" PostHistoryTypeId="5" PostId="8665" RevisionGUID="f01a417d-da2e-46aa-8c79-e1bcbfa5ac1f" CreationDate="2023-05-27T03:53:49.020" UserId="83" Comment="make it clear what the question is" Text="I've written [this ink! quickstart script][1] that I can repeatedly call to run these steps to flood my local testnet with instances of Flipper contracts:&#xD;&#xA;&#xD;&#xA;1. Kills an existing substrate-contracts-node running on default port 30333&#xD;&#xA;2. Kills the associated database&#xD;&#xA;3. Starts the substrate-contracts-node again&#xD;&#xA;4. Waits for 15 seconds that seems to be an adequate amount of time before interacting with it to avoid errors like `ERROR: Rpc error: RPC error: Networking or low-level protocol error: Error when opening the TCP socket: Cannot assign requested address (os error 99)`&#xD;&#xA;5. Creates the Flipper DApp boilerplate&#xD;&#xA;6. **Builds** the Flipper smart contract&#xD;&#xA;7. Updates the Flipper DApp ABI with the latest build of flipper.json&#xD;&#xA;8. **Uploads** the smart contract to a **Code Hash**&#xD;&#xA;9. **Instantiates** the smart contract at a **Contract Address**&#xD;&#xA;10. Calls various smart contract functions&#xD;&#xA;&#xD;&#xA;But I can't just have the script only do steps 5-10 repeatedly because I'll get error `ERROR: This contract has already been uploaded with code hash:`. Hence why I destroy the chain database before restarting the node and uploading and deploying the smart contract again. But each time the substrate-contracts-node restarts and I upload and instantiate it, it always gets uploaded to the same Code Hash and is instantiated with the same Contract Address. &#xD;&#xA;&#xD;&#xA;In **_step 9_**. where we're **instantiating** the contract at a Contract Address with this command:&#xD;&#xA;```bash&#xD;&#xA;cargo contract instantiate --suri //Bob --constructor new --args true --execute --skip-confirm | tail -1&#xD;&#xA;```&#xD;&#xA;I can't instantiate it again with the same `--suri //Bob` or it gives error:&#xD;&#xA;```bash&#xD;&#xA;ERROR: ModuleError: Contracts::DuplicateContract: [&quot;A contract with the same AccountId already exists.&quot;]&#xD;&#xA;```&#xD;&#xA;If I change it to `--suri //Charlie` so a different account instantiates the smart contract it actually generates a different Contract Address.&#xD;&#xA;So I could flood the local testnet with multiple instances of the same contract as long as I generate a unique account to instantiate each one.&#xD;&#xA;&#xD;&#xA;But in earlier **_step 8_**. where we're **uploading** the contract with this command:&#xD;&#xA;```bash&#xD;&#xA;cargo contract upload --suri //Alice --execute --skip-confirm | tail -1&#xD;&#xA;```&#xD;&#xA;If I change it to `--suri //Bob` so a different account uploads the smart contract it still generates the same Code Hash and returns error:&#xD;&#xA;```bash&#xD;&#xA;ERROR: This contract has already been uploaded with code hash: 0x__&#xD;&#xA;```&#xD;&#xA;**Question:** So is it possible to upload exactly the same same ink! smart contract code multiple times on the same network with a different Code Hash?&#xD;&#xA;Or is the only possible way to do that by adding an extra step to slightly modify the smart contract code that would be getting built and uploaded?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ltfschoen/InkTemplate/blob/main/docker/quickstart.sh" ContentLicense="CC BY-SA 4.0" />
  <row Id="34028" PostHistoryTypeId="5" PostId="8659" RevisionGUID="e30d05a6-6f63-4820-88f6-5bf8c4ddfb9d" CreationDate="2023-05-27T04:14:47.583" UserId="251" Comment="edited body" Text=" I am getting error in `#[pallet::generate_store(pub(super) trait Store)]` which is  showing deprecated warning due to which I could not compile my custom pallet is there any solution" ContentLicense="CC BY-SA 4.0" />
  <row Id="34029" PostHistoryTypeId="5" PostId="8660" RevisionGUID="4f5e8b0a-1092-4c5d-93ec-9757e723066a" CreationDate="2023-05-27T10:38:05.100" UserId="2281" Comment="added 5 characters in body" Text="I have developed Substrate Network with `EVM compatibility` and `POA consensus algorithm`. &#xD;&#xA;It was working fine and transaction execution time was although alot but for now getting an error from `EVM-core`. &#xD;&#xA;I have tried to deploy smart contract and it failed. Then i tried to execute light weight transactions as like sending ethers from wallet 1 to wallet 2 but still it was throwing error of &#xD;&#xA;&#xD;&#xA;&gt; **EvmCoreErrorExitReason (OutOfFund)**&#xD;&#xA;&#xD;&#xA;on `PolkaDot Explorer`. Let me know how i can enhance the execution time of transactions and how i can Fix this error as well. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34030" PostHistoryTypeId="5" PostId="8662" RevisionGUID="c4f89b27-0624-402c-9842-8a7d76b2032f" CreationDate="2023-05-27T13:36:46.940" UserId="29" Comment="added 402 characters in body" Text="Offchain minting is a feature built into the NFTs pallet. It is the ability to mint NFTs by having the issuer of a collection sign encoded mint data offchain, this encoded mint data will either designate the account that can mint the NFT or if any account can mint it. Once signed by the issuer, the enduser can mint the NFT onchain via the `mint_pre_signed` extrinsic.&#xD;&#xA;&#xD;&#xA;Okay.. so how do we do this in Substrate?&#xD;&#xA;&#xD;&#xA;Follow these steps.&#xD;&#xA;&#xD;&#xA;First we have to create an NFT collection.&#xD;&#xA;&#xD;&#xA;![](https://hackmd.io/_uploads/SJESZITSn.png)&#xD;&#xA;![](https://hackmd.io/_uploads/r1gkGUTSn.png)&#xD;&#xA;&#xD;&#xA;Encoded call data: &#xD;&#xA;```&#xD;&#xA;0x2a0000d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0000000000000000010a000000000000000000000000000000&#xD;&#xA;```&#xD;&#xA;Next we have to do three things:&#xD;&#xA;- create our mint data (this will be the NFT we want to be minted)&#xD;&#xA;- encode the mint data &#xD;&#xA;- sign the encoded mint data&#xD;&#xA;    - the account that signs the encoded mint data should be an issuer for the collection, meaning, they have approval to mint&#xD;&#xA;&gt; Note: when creating the mint data, if you only intend one account to have permission to mint that NFT then specify this in the `only_account` attribute otherwise, any account will be able to mint the NFT.&#xD;&#xA;&#xD;&#xA;We can use PolkadotJs Apps to construct the mint data like so:&#xD;&#xA;&#xD;&#xA;![](https://hackmd.io/_uploads/Sk7lx86r2.png)&#xD;&#xA;![](https://hackmd.io/_uploads/SyIEx8aS2.png)&#xD;&#xA;&#xD;&#xA;&gt; We are not going to submit this transaction. We are only using it to obtain the encoded mint data. You could also construct this using JavaScript and PolkadotJS API or similar.&#xD;&#xA;&#xD;&#xA;Keep in mind that `onlyAccount` here is set to `None`. This means that any account that has access to this mint data, once it is signed, could mint this NFT.&#xD;&#xA;&#xD;&#xA;For `deadline` specify the block number where this transaction will be valid for. The transaction will be valid up to this block number.&#xD;&#xA;&#xD;&#xA;Notice the encoding details on the bottom right of the screen.&#xD;&#xA;&#xD;&#xA;From that we can concatenate and construct our encoded mint data:&#xD;&#xA;```&#xD;&#xA;0x000000000000000004106e616d65304272756e6f2047616c76616f0000d0070000&#xD;&#xA;```&#xD;&#xA;We now have to sign the encoded mint data.&#xD;&#xA;&#xD;&#xA;![](https://hackmd.io/_uploads/HJce7LaHh.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Alternatively, here is a nice script:&#xD;&#xA;```js&#xD;&#xA;import { Keyring } from '@polkadot/keyring';&#xD;&#xA;import { u8aToHex } from '@polkadot/util';&#xD;&#xA;import { cryptoWaitReady } from '@polkadot/util-crypto';&#xD;&#xA;&#xD;&#xA;export const sign = async () =&gt; {&#xD;&#xA;    await cryptoWaitReady();&#xD;&#xA;&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;    const pair = keyring.addFromUri('//Alice');&#xD;&#xA;    const sig = pair.sign('0x000000000000000004106e616d65304272756e6f2047616c76616f0000d0070000');&#xD;&#xA;    console.log('Signature: ', u8aToHex(sig));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Output:&#xD;&#xA;```&#xD;&#xA;Signature:  0x163b1eb3420cf2b78b4ffedca11e9618dd8528e6e7485cb343379d9db6aa84305f9995b6bf2120d4541d36a9056f6a158ccc5e8745794657073ae23cb3de838f&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We can now create the `mintPreSigned` extrinsic and include our signature:&#xD;&#xA;&#xD;&#xA;![](https://hackmd.io/_uploads/Hkx5qRhSh.png)&#xD;&#xA;![](https://hackmd.io/_uploads/ry_5sA2B3.png)&#xD;&#xA;&#xD;&#xA;Click &quot;Submit Transaction&quot; and you have now minted a crisp, fresh NFT.&#xD;&#xA;&#xD;&#xA;![](https://hackmd.io/_uploads/By6_J8aH3.png)&#xD;&#xA;&#xD;&#xA;Success! Done.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Resources&#xD;&#xA;&#xD;&#xA;Offchain Minting PR&#xD;&#xA;- https://github.com/paritytech/substrate/pull/13158&#xD;&#xA;&#xD;&#xA;Test for offchain minting (super useful to read):&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0cf64f8bd72d719818be2f109c0919c7c9325cd1/frame/nfts/src/tests.rs#L3171-L3337" ContentLicense="CC BY-SA 4.0" />
  <row Id="34031" PostHistoryTypeId="50" PostId="6488" RevisionGUID="e80076a3-9ef9-4391-8ea7-d7d9a8c0b1c8" CreationDate="2023-05-27T16:04:35.480" UserId="-1" />
  <row Id="34032" PostHistoryTypeId="2" PostId="8667" RevisionGUID="77d76e21-5ab2-4683-a0c2-3069c60180e6" CreationDate="2023-05-27T18:47:22.070" UserId="4272" Text="#![cfg_attr(not(feature = &quot;std&quot;), no_std, no_main)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod safe_math {&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Variables {&#xD;&#xA;        a: u128,&#xD;&#xA;        b: u128,&#xD;&#xA;        multiplier: u128&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Variables {&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(a: u128, b: u128) -&gt; Self {&#xD;&#xA;            Variables {&#xD;&#xA;                a: a,&#xD;&#xA;                b: b,&#xD;&#xA;                multiplier: 1_000_000_000_000&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn default() -&gt; Self {&#xD;&#xA;            Variables {&#xD;&#xA;                a: Default::default(),&#xD;&#xA;                b: Default::default(),&#xD;&#xA;                multiplier: 1_000_000_000_000&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn initializer(&amp;mut self, a: u128, b: u128) -&gt; bool{&#xD;&#xA;            self.a = a;&#xD;&#xA;            self.b = b;&#xD;&#xA;            true&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn div(&amp;self) -&gt; u128 {&#xD;&#xA;            (self.a*self.multiplier/self.b) as u128&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;when I try to build above contract i'm getting this error - &#xD;&#xA;ERROR: Validation of the Wasm failed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ERROR: An unexpected panic function import was found in the contract Wasm.&#xD;&#xA;This typically goes back to a known bug in the Rust compiler:&#xD;&#xA;https://github.com/rust-lang/rust/issues/78744&#xD;&#xA;&#xD;&#xA;As a workaround try to insert `overflow-checks = false` into your `Cargo.toml`.&#xD;&#xA;This will disable safe math operations, but unfortunately we are currently not&#xD;&#xA;aware of a better workaround until the bug in the compiler is fixed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ERROR: An unexpected import function was found in the contract Wasm: _ZN4core9panicking5panic17h8d2687444d110f05E.&#xD;&#xA;Import funtions must either be prefixed with 'memory', or part of a module prefixed with 'seal'&#xD;&#xA;&#xD;&#xA;Ignore with `--skip-wasm-validation`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34034" PostHistoryTypeId="1" PostId="8667" RevisionGUID="77d76e21-5ab2-4683-a0c2-3069c60180e6" CreationDate="2023-05-27T18:47:22.070" UserId="4272" Text="Error while dividing two u128/Balance types" ContentLicense="CC BY-SA 4.0" />
  <row Id="34035" PostHistoryTypeId="3" PostId="8667" RevisionGUID="77d76e21-5ab2-4683-a0c2-3069c60180e6" CreationDate="2023-05-27T18:47:22.070" UserId="4272" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34036" PostHistoryTypeId="5" PostId="8667" RevisionGUID="b426b82b-23d5-4968-874e-e01f3711d73a" CreationDate="2023-05-27T18:48:59.643" UserId="4272" Comment="deleted 92 characters in body" Text="    #[ink(storage)]&#xD;&#xA;    pub struct Variables {&#xD;&#xA;        a: u128,&#xD;&#xA;        b: u128,&#xD;&#xA;        multiplier: u128&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Variables {&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(a: u128, b: u128) -&gt; Self {&#xD;&#xA;            Variables {&#xD;&#xA;                a: a,&#xD;&#xA;                b: b,&#xD;&#xA;                multiplier: 1_000_000_000_000&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn default() -&gt; Self {&#xD;&#xA;            Variables {&#xD;&#xA;                a: Default::default(),&#xD;&#xA;                b: Default::default(),&#xD;&#xA;                multiplier: 1_000_000_000_000&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn initializer(&amp;mut self, a: u128, b: u128) -&gt; bool{&#xD;&#xA;            self.a = a;&#xD;&#xA;            self.b = b;&#xD;&#xA;            true&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn div(&amp;self) -&gt; u128 {&#xD;&#xA;            (self.a*self.multiplier/self.b) as u128&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;when I try to build above contract i'm getting this error - &#xD;&#xA;ERROR: Validation of the Wasm failed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ERROR: An unexpected panic function import was found in the contract Wasm.&#xD;&#xA;This typically goes back to a known bug in the Rust compiler:&#xD;&#xA;https://github.com/rust-lang/rust/issues/78744&#xD;&#xA;&#xD;&#xA;As a workaround try to insert `overflow-checks = false` into your `Cargo.toml`.&#xD;&#xA;This will disable safe math operations, but unfortunately we are currently not&#xD;&#xA;aware of a better workaround until the bug in the compiler is fixed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ERROR: An unexpected import function was found in the contract Wasm: _ZN4core9panicking5panic17h8d2687444d110f05E.&#xD;&#xA;Import funtions must either be prefixed with 'memory', or part of a module prefixed with 'seal'&#xD;&#xA;&#xD;&#xA;Ignore with `--skip-wasm-validation`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34037" PostHistoryTypeId="2" PostId="8668" RevisionGUID="f2ebe075-568a-4f99-acc5-fda81e1c2ef3" CreationDate="2023-05-27T19:37:49.523" UserId="4273" Text="I am facing fetchPOV timeout issue with basilisk chain 100% of the time while para-validating.&#xD;&#xA;I am suspecting this could be a geolocation issue(Singapore) as many other validators in Singapore is facing this timeout issue as well.&#xD;&#xA;I would like to know if there is any way I could resolve it.&#xD;&#xA;&#xD;&#xA;Many thanks in advanced! &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YzCP3.jpg&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34039" PostHistoryTypeId="1" PostId="8668" RevisionGUID="f2ebe075-568a-4f99-acc5-fda81e1c2ef3" CreationDate="2023-05-27T19:37:49.523" UserId="4273" Text="FetchPOV Timeout issue with Basilisk(Kusama)" ContentLicense="CC BY-SA 4.0" />
  <row Id="34040" PostHistoryTypeId="3" PostId="8668" RevisionGUID="f2ebe075-568a-4f99-acc5-fda81e1c2ef3" CreationDate="2023-05-27T19:37:49.523" UserId="4273" Text="|validator|validation|validator-set|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34041" PostHistoryTypeId="5" PostId="8668" RevisionGUID="cae88bd0-9da0-462e-9880-53d7a81e6b5a" CreationDate="2023-05-27T19:38:32.970" UserId="4273" Comment="deleted 1 character in body" Text="I am facing fetchPOV timeout issue with basilisk chain 100% of the time while para-validating.&#xD;&#xA;I suspect that this could be a geolocation issue(Singapore) as many other validators in Singapore are facing this timeout issue as well.&#xD;&#xA;I would like to know if there is any way I could resolve it.&#xD;&#xA;&#xD;&#xA;Many thanks in advance! &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YzCP3.jpg&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34042" PostHistoryTypeId="5" PostId="8667" RevisionGUID="f2b40253-7119-45f5-ace7-a4f548fb4170" CreationDate="2023-05-28T02:08:28.647" UserId="354" Comment="added 22 characters in body" Text="    #[ink(storage)]&#xD;&#xA;    pub struct Variables {&#xD;&#xA;        a: u128,&#xD;&#xA;        b: u128,&#xD;&#xA;        multiplier: u128&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Variables {&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(a: u128, b: u128) -&gt; Self {&#xD;&#xA;            Variables {&#xD;&#xA;                a: a,&#xD;&#xA;                b: b,&#xD;&#xA;                multiplier: 1_000_000_000_000&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn default() -&gt; Self {&#xD;&#xA;            Variables {&#xD;&#xA;                a: Default::default(),&#xD;&#xA;                b: Default::default(),&#xD;&#xA;                multiplier: 1_000_000_000_000&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn initializer(&amp;mut self, a: u128, b: u128) -&gt; bool{&#xD;&#xA;            self.a = a;&#xD;&#xA;            self.b = b;&#xD;&#xA;            true&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn div(&amp;self) -&gt; u128 {&#xD;&#xA;            (self.a*self.multiplier/self.b) as u128&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;when I try to build above contract i'm getting this error - &#xD;&#xA;`ERROR: Validation of the Wasm failed`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ERROR: An unexpected panic function import was found in the contract Wasm.&#xD;&#xA;    This typically goes back to a known bug in the Rust compiler:&#xD;&#xA;    https://github.com/rust-lang/rust/issues/78744&#xD;&#xA;&#xD;&#xA;As a workaround try to insert `overflow-checks = false` into your `Cargo.toml`.&#xD;&#xA;This will disable safe math operations, but unfortunately we are currently not&#xD;&#xA;aware of a better workaround until the bug in the compiler is fixed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ERROR: An unexpected import function was found in the contract Wasm: _ZN4core9panicking5panic17h8d2687444d110f05E.&#xD;&#xA;    Import funtions must either be prefixed with 'memory', or part of a module prefixed with 'seal'&#xD;&#xA;&#xD;&#xA;Ignore with `--skip-wasm-validation`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34043" PostHistoryTypeId="2" PostId="8669" RevisionGUID="75a0a340-9deb-4835-b537-8593c32b5fdd" CreationDate="2023-05-28T05:07:13.497" UserId="3881" Text="What I´m trying to do is to condition some option/modal to be shown in on the screen depending on the logged user/account being the owner or not so to have something similar to:&#xD;&#xA;&#xD;&#xA;accountPair.address === NFT.owner&#xD;&#xA;&#xD;&#xA;I know it has to be related with the addresses inside keyring. But how do I identify the current account being logged in the UI? I´m working with the front end template of polkadot js." ContentLicense="CC BY-SA 4.0" />
  <row Id="34045" PostHistoryTypeId="1" PostId="8669" RevisionGUID="75a0a340-9deb-4835-b537-8593c32b5fdd" CreationDate="2023-05-28T05:07:13.497" UserId="3881" Text="How do I get the accountPair.address with polkadot js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34046" PostHistoryTypeId="3" PostId="8669" RevisionGUID="75a0a340-9deb-4835-b537-8593c32b5fdd" CreationDate="2023-05-28T05:07:13.497" UserId="3881" Text="|polkadot-js|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34047" PostHistoryTypeId="2" PostId="8670" RevisionGUID="87b4484c-4db6-405a-85d8-850c65fd8ac5" CreationDate="2023-05-28T06:26:36.193" UserId="139" Text="I am reading through this section of XCM Instructions : https://github.com/paritytech/polkadot/blob/97930a8b2cc211ecfb80f289c4c578a9157e6dc4/xcm/src/v2/mod.rs#L532-L565&#xD;&#xA;And what I find here is that both `HrmpNewChannelOpenRequest` &amp; `HrmpChannelAccepted` have comments saying that these messages _must_ or rather are only _safe_ when originated on a relay chain. I am not familiar with HRMP channels so can someone explain to me, why should both of these messages be relay-chain origin only? &#xD;&#xA;&#xD;&#xA;My understanding is that a channel open request could be sent by either the parachain or the relay chain, and `HrmpChannelAccepted` should be a message to acknowledge the aforementioned request. So what is different ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="34049" PostHistoryTypeId="1" PostId="8670" RevisionGUID="87b4484c-4db6-405a-85d8-850c65fd8ac5" CreationDate="2023-05-28T06:26:36.193" UserId="139" Text="Why is `HrmpChannelAccepted` described as only being safe to originate from a relay chain and not a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34050" PostHistoryTypeId="3" PostId="8670" RevisionGUID="87b4484c-4db6-405a-85d8-850c65fd8ac5" CreationDate="2023-05-28T06:26:36.193" UserId="139" Text="|xcm|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34051" PostHistoryTypeId="5" PostId="8669" RevisionGUID="cba13d0b-b8b9-4d72-97e9-0967fe4c24e7" CreationDate="2023-05-28T06:47:30.243" UserId="2281" Comment="added 14 characters in body; edited tags" Text="What I´m trying to do is to condition some `option/modal` to be shown in on the screen depending on the logged `user/account` being the owner or not so to have something similar to:&#xD;&#xA;&#xD;&#xA;    accountPair.address === NFT.owner&#xD;&#xA;&#xD;&#xA;I know it has to be related with the addresses inside `keyring`. But how do I identify the current account being logged in the UI? I´m working with the `front end template` of polkadot js.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34052" PostHistoryTypeId="6" PostId="8669" RevisionGUID="cba13d0b-b8b9-4d72-97e9-0967fe4c24e7" CreationDate="2023-05-28T06:47:30.243" UserId="2281" Comment="added 14 characters in body; edited tags" Text="|polkadot-js|polkadot|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34053" PostHistoryTypeId="5" PostId="8668" RevisionGUID="55e0cff4-5a1a-4f9f-a598-cdf761ceed30" CreationDate="2023-05-28T06:48:50.550" UserId="2281" Comment="added 10 characters in body" Text="I am facing `fetchPOV` timeout issue with `basilisk chain` 100% of the time while `para-validating.`&#xD;&#xA;I suspect that this could be a `geolocation issue(Singapore)` as many other `validators` in Singapore are facing this timeout issue as well.&#xD;&#xA;I would like to know if there is any way I could resolve it.&#xD;&#xA;&#xD;&#xA;Many thanks in advance! &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YzCP3.jpg&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34054" PostHistoryTypeId="4" PostId="8669" RevisionGUID="e892efa4-7176-46c3-bde1-add9a70e3462" CreationDate="2023-05-28T06:54:03.700" UserId="3881" Comment="edited title" Text="How do I get the currently logged address in front end template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34055" PostHistoryTypeId="50" PostId="6087" RevisionGUID="5fc76529-e546-48fc-97a4-1d97dd3b885a" CreationDate="2023-05-28T10:07:05.980" UserId="-1" />
  <row Id="34056" PostHistoryTypeId="2" PostId="8671" RevisionGUID="38cf47b9-5e50-4539-a61b-51899fc3c061" CreationDate="2023-05-28T11:03:37.980" UserId="3327" Text="Subsrate-node-template uses Aura as a default  block authoring algorithem. How can one repalace aura with babe?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34058" PostHistoryTypeId="1" PostId="8671" RevisionGUID="38cf47b9-5e50-4539-a61b-51899fc3c061" CreationDate="2023-05-28T11:03:37.980" UserId="3327" Text="How to replace aura with babe?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34059" PostHistoryTypeId="3" PostId="8671" RevisionGUID="38cf47b9-5e50-4539-a61b-51899fc3c061" CreationDate="2023-05-28T11:03:37.980" UserId="3327" Text="|babe|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34060" PostHistoryTypeId="50" PostId="6486" RevisionGUID="db217101-dc7a-44a9-8b20-4edb5b81ba0a" CreationDate="2023-05-28T12:00:30.057" UserId="-1" />
  <row Id="34061" PostHistoryTypeId="50" PostId="8299" RevisionGUID="810daf8a-6975-4706-91a4-cf47e6b20df3" CreationDate="2023-05-28T14:04:10.787" UserId="-1" />
  <row Id="34062" PostHistoryTypeId="2" PostId="8672" RevisionGUID="dfe469f5-b1a5-4fea-a4c3-5f10261d1848" CreationDate="2023-05-28T17:55:48.327" UserId="4277" Text="Hi i am trying to use the sp-consensus-babe but I am having issues when I run the command &#xD;&#xA;&#xD;&#xA;command: cargo build --release&#xD;&#xA;&#xD;&#xA;The issue that I am receiving is this &#xD;&#xA;&#xD;&#xA;error: failed to load manifest for workspace member `/Users/abubakarmujahid/Desktop/Substrate/substrate-node-template/node`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load manifest for dependency `node-template-runtime`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to parse manifest at `/Users/abubakarmujahid/Desktop/Substrate/substrate-node-template/runtime/Cargo.toml`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  key `branch` is ignored for dependency (sp-consensus-babe).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I have defined the dependency correctly in cargo.toml. I have described it in the following way.&#xD;&#xA;&#xD;&#xA;sp-consensus-babe = { version = &quot;0.10.0-dev&quot;, default-features = false, path = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can anyone know how to fix this ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34064" PostHistoryTypeId="1" PostId="8672" RevisionGUID="dfe469f5-b1a5-4fea-a4c3-5f10261d1848" CreationDate="2023-05-28T17:55:48.327" UserId="4277" Text="sp-consensus-babe issue key `branch` is ignored for dependency (sp-consensus-babe)" ContentLicense="CC BY-SA 4.0" />
  <row Id="34065" PostHistoryTypeId="3" PostId="8672" RevisionGUID="dfe469f5-b1a5-4fea-a4c3-5f10261d1848" CreationDate="2023-05-28T17:55:48.327" UserId="4277" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34066" PostHistoryTypeId="2" PostId="8673" RevisionGUID="421bacb6-680a-4ba5-bde6-3731ae8a25c8" CreationDate="2023-05-29T01:47:33.060" UserId="2844" Text="In ink! smart contract, we upload `.contract` file on chain and get the deployed contract address and use `metadata.json` file in frontend to interact with contract. Can someone tell me what's the procedures to interact with `substrate-node-template` runtime with react frontend? I found [`substrate-front-end-template`], It hasn't included any of the file from node that we generated while building.&#xD;&#xA;&#xD;&#xA;**We are not using `substrate-front-end-template` we are building our own**" ContentLicense="CC BY-SA 4.0" />
  <row Id="34068" PostHistoryTypeId="1" PostId="8673" RevisionGUID="421bacb6-680a-4ba5-bde6-3731ae8a25c8" CreationDate="2023-05-29T01:47:33.060" UserId="2844" Text="How to interact substrate node with reactjs frontend?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34069" PostHistoryTypeId="3" PostId="8673" RevisionGUID="421bacb6-680a-4ba5-bde6-3731ae8a25c8" CreationDate="2023-05-29T01:47:33.060" UserId="2844" Text="|substrate-node-template|runtime|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34070" PostHistoryTypeId="2" PostId="8674" RevisionGUID="b4a611b3-8562-4e8a-9fbe-3e491786b0b1" CreationDate="2023-05-29T02:35:09.660" UserId="1959" Text="[HRMP](https://wiki.polkadot.network/docs/learn-xcm-transport#hrmp-xcmp-lite) is a stop-gap protocol for XCMP, it stores all messages in the Relay Chain storage.&#xD;&#xA;Before the channel is opened, the two parachains are not interoperable, and can only establish a connection with the VMP through the relaychain.&#xD;&#xA;&#xD;&#xA;When ParachainA wants to open a channel to ParachainB, ParachainA should send XCM `Transact(hrmpInitOpenChannel)` to relaychain, then the relaychain [send XCM `HrmpNewChannelOpenRequest` notification](https://github.com/paritytech/polkadot/blob/release-v0.9.40/runtime/parachains/src/hrmp.rs#L1200) to ParachainB via DMP. So the origin is relaychain.&#xD;&#xA;&#xD;&#xA;When ParachainB wants to accept the channel request, ParachainB should send XCM `hrmpAcceptOpenChannel` to relaychain, then the relaychain [send XCM `HrmpChannelAccepted` notification](https://github.com/paritytech/polkadot/blob/release-v0.9.40/runtime/parachains/src/hrmp.rs#L1261) to ParachainA via DMP. So the origin is relaychain." ContentLicense="CC BY-SA 4.0" />
  <row Id="34072" PostHistoryTypeId="2" PostId="8675" RevisionGUID="c4dfa5e4-2738-46e4-8cf8-448b3512def9" CreationDate="2023-05-29T04:14:51.223" UserId="3136" Text="I want to connect polkadot relay chain but i'm not able to select keys for the customSpec generated by the binary of Moonbeam-Parachain. The customSpec is this-&gt;&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;Moonbeam Local Testnet&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;moonbeam_local&quot;,&#xD;&#xA;      &quot;chainType&quot;: &quot;Local&quot;,&#xD;&#xA;      &quot;bootNodes&quot;: [],&#xD;&#xA;      &quot;telemetryEndpoints&quot;: null,&#xD;&#xA;      &quot;protocolId&quot;: null,&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;SS58Prefix&quot;: 1284,&#xD;&#xA;        &quot;tokenDecimals&quot;: 18,&#xD;&#xA;        &quot;tokenSymbol&quot;: &quot;GLMR&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;relayChain&quot;: &quot;polkadot-local&quot;,&#xD;&#xA;      &quot;paraId&quot;: 1000,&#xD;&#xA;      &quot;codeSubstitutes&quot;: {},&#xD;&#xA;      &quot;genesis&quot;: {&#xD;&#xA;        &quot;runtime&quot;: {&#xD;&#xA;          &quot;system&quot;: {&#xD;&#xA;            &#xD;&#xA;          },&#xD;&#xA;      &quot;parachainInfo&quot;: {&#xD;&#xA;        &quot;parachainId&quot;: 1000&#xD;&#xA;      },&#xD;&#xA;      &quot;balances&quot;: {&#xD;&#xA;        &quot;balances&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfc&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x773539d4ac0e786233d90a233654ccee26a613d9&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;transactionPayment&quot;: {&#xD;&#xA;        &quot;multiplier&quot;: &quot;8000000000000000000&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;parachainStaking&quot;: {&#xD;&#xA;        &quot;candidates&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;            2000000000000000000000000&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;            2000000000000000000000000&#xD;&#xA;          ]&#xD;&#xA;        ],&#xD;&#xA;        &quot;delegations&quot;: [],&#xD;&#xA;        &quot;inflationConfig&quot;: {&#xD;&#xA;          &quot;expect&quot;: {&#xD;&#xA;            &quot;min&quot;: 10000000000000000000000000,&#xD;&#xA;            &quot;ideal&quot;: 20000000000000000000000000,&#xD;&#xA;            &quot;max&quot;: 50000000000000000000000000&#xD;&#xA;          },&#xD;&#xA;          &quot;annual&quot;: {&#xD;&#xA;            &quot;min&quot;: 40000000,&#xD;&#xA;            &quot;ideal&quot;: 50000000,&#xD;&#xA;            &quot;max&quot;: 50000000&#xD;&#xA;          },&#xD;&#xA;          &quot;round&quot;: {&#xD;&#xA;            &quot;min&quot;: 26846,&#xD;&#xA;            &quot;ideal&quot;: 33396,&#xD;&#xA;            &quot;max&quot;: 33396&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;collatorCommission&quot;: 200000000,&#xD;&#xA;        &quot;parachainBondReservePercent&quot;: 30,&#xD;&#xA;        &quot;blocksPerRound&quot;: 1800,&#xD;&#xA;        &quot;numSelectedCandidates&quot;: 8&#xD;&#xA;      },&#xD;&#xA;      &quot;authorFilter&quot;: {&#xD;&#xA;        &quot;eligibleCount&quot;: 50&#xD;&#xA;      },&#xD;&#xA;      &quot;authorMapping&quot;: {&#xD;&#xA;        &quot;mappings&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;            &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;            &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;maintenanceMode&quot;: {&#xD;&#xA;        &quot;startInMaintenanceMode&quot;: false&#xD;&#xA;      },&#xD;&#xA;      &quot;migrations&quot;: null,&#xD;&#xA;      &quot;proxyGenesisCompanion&quot;: {&#xD;&#xA;        &quot;proxies&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;ethereumChainId&quot;: {&#xD;&#xA;        &quot;chainId&quot;: 1280&#xD;&#xA;      },&#xD;&#xA;      &quot;evm&quot;: {&#xD;&#xA;        &quot;accounts&quot;: {&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000001&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000002&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000003&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000004&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000005&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000006&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000007&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000008&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000009&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000400&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000401&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000402&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000800&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000801&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000802&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000803&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000804&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000805&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000806&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000807&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000808&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000809&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080a&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080b&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080c&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080d&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080e&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080f&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000810&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000811&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000812&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000813&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000814&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000815&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;ethereum&quot;: {},&#xD;&#xA;      &quot;democracy&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null&#xD;&#xA;      },&#xD;&#xA;      &quot;councilCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;          &quot;0x798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfc&quot;,&#xD;&#xA;          &quot;0x773539d4ac0e786233d90a233654ccee26a613d9&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;techCommitteeCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;treasuryCouncilCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;          &quot;0x798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfc&quot;,&#xD;&#xA;          &quot;0x773539d4ac0e786233d90a233654ccee26a613d9&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;openTechCommitteeCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;treasury&quot;: null,&#xD;&#xA;      &quot;crowdloanRewards&quot;: {&#xD;&#xA;        &quot;fundedAmount&quot;: 150000000000000000000000000&#xD;&#xA;      },&#xD;&#xA;      &quot;polkadotXcm&quot;: {&#xD;&#xA;        &quot;safeXcmVersion&quot;: 3&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Which Keys should I insert in the above following ? And what should i insert in the Rpc calls after making customSpec?.&#xD;&#xA;&#xD;&#xA;Can someone please guide me through this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34074" PostHistoryTypeId="1" PostId="8675" RevisionGUID="c4dfa5e4-2738-46e4-8cf8-448b3512def9" CreationDate="2023-05-29T04:14:51.223" UserId="3136" Text="How to connect to Polkadot Relay-Chain through the code of moonbeam parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34075" PostHistoryTypeId="3" PostId="8675" RevisionGUID="c4dfa5e4-2738-46e4-8cf8-448b3512def9" CreationDate="2023-05-29T04:14:51.223" UserId="3136" Text="|polkadot-js|relay-chain|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34076" PostHistoryTypeId="5" PostId="8675" RevisionGUID="3655dbf8-2f1b-4bde-a96d-c8a4605dcb89" CreationDate="2023-05-29T04:25:22.680" UserId="2281" Comment="added 3 characters in body" Text="I want to connect `polkadot relay` chain but i'm not able to select keys for the `customSpec` generated by the binary of `Moonbeam-Parachain`. The **customSpec** is this-&gt;&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;Moonbeam Local Testnet&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;moonbeam_local&quot;,&#xD;&#xA;      &quot;chainType&quot;: &quot;Local&quot;,&#xD;&#xA;      &quot;bootNodes&quot;: [],&#xD;&#xA;      &quot;telemetryEndpoints&quot;: null,&#xD;&#xA;      &quot;protocolId&quot;: null,&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;SS58Prefix&quot;: 1284,&#xD;&#xA;        &quot;tokenDecimals&quot;: 18,&#xD;&#xA;        &quot;tokenSymbol&quot;: &quot;GLMR&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;relayChain&quot;: &quot;polkadot-local&quot;,&#xD;&#xA;      &quot;paraId&quot;: 1000,&#xD;&#xA;      &quot;codeSubstitutes&quot;: {},&#xD;&#xA;      &quot;genesis&quot;: {&#xD;&#xA;        &quot;runtime&quot;: {&#xD;&#xA;          &quot;system&quot;: {&#xD;&#xA;            &#xD;&#xA;          },&#xD;&#xA;      &quot;parachainInfo&quot;: {&#xD;&#xA;        &quot;parachainId&quot;: 1000&#xD;&#xA;      },&#xD;&#xA;      &quot;balances&quot;: {&#xD;&#xA;        &quot;balances&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfc&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x773539d4ac0e786233d90a233654ccee26a613d9&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;transactionPayment&quot;: {&#xD;&#xA;        &quot;multiplier&quot;: &quot;8000000000000000000&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;parachainStaking&quot;: {&#xD;&#xA;        &quot;candidates&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;            2000000000000000000000000&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;            2000000000000000000000000&#xD;&#xA;          ]&#xD;&#xA;        ],&#xD;&#xA;        &quot;delegations&quot;: [],&#xD;&#xA;        &quot;inflationConfig&quot;: {&#xD;&#xA;          &quot;expect&quot;: {&#xD;&#xA;            &quot;min&quot;: 10000000000000000000000000,&#xD;&#xA;            &quot;ideal&quot;: 20000000000000000000000000,&#xD;&#xA;            &quot;max&quot;: 50000000000000000000000000&#xD;&#xA;          },&#xD;&#xA;          &quot;annual&quot;: {&#xD;&#xA;            &quot;min&quot;: 40000000,&#xD;&#xA;            &quot;ideal&quot;: 50000000,&#xD;&#xA;            &quot;max&quot;: 50000000&#xD;&#xA;          },&#xD;&#xA;          &quot;round&quot;: {&#xD;&#xA;            &quot;min&quot;: 26846,&#xD;&#xA;            &quot;ideal&quot;: 33396,&#xD;&#xA;            &quot;max&quot;: 33396&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;collatorCommission&quot;: 200000000,&#xD;&#xA;        &quot;parachainBondReservePercent&quot;: 30,&#xD;&#xA;        &quot;blocksPerRound&quot;: 1800,&#xD;&#xA;        &quot;numSelectedCandidates&quot;: 8&#xD;&#xA;      },&#xD;&#xA;      &quot;authorFilter&quot;: {&#xD;&#xA;        &quot;eligibleCount&quot;: 50&#xD;&#xA;      },&#xD;&#xA;      &quot;authorMapping&quot;: {&#xD;&#xA;        &quot;mappings&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;            &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;            &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;maintenanceMode&quot;: {&#xD;&#xA;        &quot;startInMaintenanceMode&quot;: false&#xD;&#xA;      },&#xD;&#xA;      &quot;migrations&quot;: null,&#xD;&#xA;      &quot;proxyGenesisCompanion&quot;: {&#xD;&#xA;        &quot;proxies&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;ethereumChainId&quot;: {&#xD;&#xA;        &quot;chainId&quot;: 1280&#xD;&#xA;      },&#xD;&#xA;      &quot;evm&quot;: {&#xD;&#xA;        &quot;accounts&quot;: {&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000001&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000002&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000003&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000004&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000005&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000006&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000007&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000008&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000009&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000400&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000401&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000402&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000800&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000801&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000802&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000803&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000804&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000805&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000806&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000807&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000808&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000809&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080a&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080b&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080c&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080d&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080e&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080f&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000810&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000811&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000812&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000813&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000814&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000815&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;ethereum&quot;: {},&#xD;&#xA;      &quot;democracy&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null&#xD;&#xA;      },&#xD;&#xA;      &quot;councilCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;          &quot;0x798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfc&quot;,&#xD;&#xA;          &quot;0x773539d4ac0e786233d90a233654ccee26a613d9&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;techCommitteeCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;treasuryCouncilCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;          &quot;0x798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfc&quot;,&#xD;&#xA;          &quot;0x773539d4ac0e786233d90a233654ccee26a613d9&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;openTechCommitteeCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;treasury&quot;: null,&#xD;&#xA;      &quot;crowdloanRewards&quot;: {&#xD;&#xA;        &quot;fundedAmount&quot;: 150000000000000000000000000&#xD;&#xA;      },&#xD;&#xA;      &quot;polkadotXcm&quot;: {&#xD;&#xA;        &quot;safeXcmVersion&quot;: 3&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;Which Keys should I insert in the above? And what should i insert in the `Rpc calls` after making `customSpec`?.&#xD;&#xA;&#xD;&#xA;Can someone please guide me through this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34077" PostHistoryTypeId="2" PostId="8676" RevisionGUID="de3f1d02-3d7d-4223-be6d-4d8ec25f1f03" CreationDate="2023-05-29T04:31:00.160" UserId="3414" Text="As Substrate-node-template is based on POA(Proof of Authority) Consensus. In order to replace aura with babe you need to shift the substrate-node-template to POS(proof of stake) consensus." ContentLicense="CC BY-SA 4.0" />
  <row Id="34079" PostHistoryTypeId="5" PostId="8675" RevisionGUID="30ac7717-9363-4789-9c33-f65f0f110180" CreationDate="2023-05-29T04:37:53.007" UserId="2281" Comment="added 3 characters in body" Text="&#xD;&#xA;I want to connect `polkadot relay` chain but i'm not able to select keys for the `customSpec` generated by the binary of `Moonbeam-Parachain`. The **customSpec** is this-&gt;&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      &quot;name&quot;: &quot;Moonbeam Local Testnet&quot;,&#xD;&#xA;      &quot;id&quot;: &quot;moonbeam_local&quot;,&#xD;&#xA;      &quot;chainType&quot;: &quot;Local&quot;,&#xD;&#xA;      &quot;bootNodes&quot;: [],&#xD;&#xA;      &quot;telemetryEndpoints&quot;: null,&#xD;&#xA;      &quot;protocolId&quot;: null,&#xD;&#xA;      &quot;properties&quot;: {&#xD;&#xA;        &quot;SS58Prefix&quot;: 1284,&#xD;&#xA;        &quot;tokenDecimals&quot;: 18,&#xD;&#xA;        &quot;tokenSymbol&quot;: &quot;GLMR&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;relayChain&quot;: &quot;polkadot-local&quot;,&#xD;&#xA;      &quot;paraId&quot;: 1000,&#xD;&#xA;      &quot;codeSubstitutes&quot;: {},&#xD;&#xA;      &quot;genesis&quot;: {&#xD;&#xA;        &quot;runtime&quot;: {&#xD;&#xA;          &quot;system&quot;: {&#xD;&#xA;            &#xD;&#xA;          },&#xD;&#xA;      &quot;parachainInfo&quot;: {&#xD;&#xA;        &quot;parachainId&quot;: 1000&#xD;&#xA;      },&#xD;&#xA;      &quot;balances&quot;: {&#xD;&#xA;        &quot;balances&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfc&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x773539d4ac0e786233d90a233654ccee26a613d9&quot;,&#xD;&#xA;            1298074214633706907132624082305024&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;transactionPayment&quot;: {&#xD;&#xA;        &quot;multiplier&quot;: &quot;8000000000000000000&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;parachainStaking&quot;: {&#xD;&#xA;        &quot;candidates&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;            2000000000000000000000000&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;            2000000000000000000000000&#xD;&#xA;          ]&#xD;&#xA;        ],&#xD;&#xA;        &quot;delegations&quot;: [],&#xD;&#xA;        &quot;inflationConfig&quot;: {&#xD;&#xA;          &quot;expect&quot;: {&#xD;&#xA;            &quot;min&quot;: 10000000000000000000000000,&#xD;&#xA;            &quot;ideal&quot;: 20000000000000000000000000,&#xD;&#xA;            &quot;max&quot;: 50000000000000000000000000&#xD;&#xA;          },&#xD;&#xA;          &quot;annual&quot;: {&#xD;&#xA;            &quot;min&quot;: 40000000,&#xD;&#xA;            &quot;ideal&quot;: 50000000,&#xD;&#xA;            &quot;max&quot;: 50000000&#xD;&#xA;          },&#xD;&#xA;          &quot;round&quot;: {&#xD;&#xA;            &quot;min&quot;: 26846,&#xD;&#xA;            &quot;ideal&quot;: 33396,&#xD;&#xA;            &quot;max&quot;: 33396&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;collatorCommission&quot;: 200000000,&#xD;&#xA;        &quot;parachainBondReservePercent&quot;: 30,&#xD;&#xA;        &quot;blocksPerRound&quot;: 1800,&#xD;&#xA;        &quot;numSelectedCandidates&quot;: 8&#xD;&#xA;      },&#xD;&#xA;      &quot;authorFilter&quot;: {&#xD;&#xA;        &quot;eligibleCount&quot;: 50&#xD;&#xA;      },&#xD;&#xA;      &quot;authorMapping&quot;: {&#xD;&#xA;        &quot;mappings&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;            &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;            &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;maintenanceMode&quot;: {&#xD;&#xA;        &quot;startInMaintenanceMode&quot;: false&#xD;&#xA;      },&#xD;&#xA;      &quot;migrations&quot;: null,&#xD;&#xA;      &quot;proxyGenesisCompanion&quot;: {&#xD;&#xA;        &quot;proxies&quot;: []&#xD;&#xA;      },&#xD;&#xA;      &quot;ethereumChainId&quot;: {&#xD;&#xA;        &quot;chainId&quot;: 1280&#xD;&#xA;      },&#xD;&#xA;      &quot;evm&quot;: {&#xD;&#xA;        &quot;accounts&quot;: {&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000001&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000002&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000003&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000004&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000005&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000006&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000007&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000008&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000009&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000400&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000401&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000402&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000800&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000801&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000802&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000803&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000804&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000805&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000806&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000807&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000808&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000809&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080a&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080b&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080c&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080d&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080e&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x000000000000000000000000000000000000080f&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000810&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000811&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000812&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000813&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000814&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;0x0000000000000000000000000000000000000815&quot;: {&#xD;&#xA;            &quot;nonce&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;balance&quot;: &quot;0x0&quot;,&#xD;&#xA;            &quot;storage&quot;: {},&#xD;&#xA;            &quot;code&quot;: [&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              96,&#xD;&#xA;              0,&#xD;&#xA;              253&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;ethereum&quot;: {},&#xD;&#xA;      &quot;democracy&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null&#xD;&#xA;      },&#xD;&#xA;      &quot;councilCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;          &quot;0x798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfc&quot;,&#xD;&#xA;          &quot;0x773539d4ac0e786233d90a233654ccee26a613d9&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;techCommitteeCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;treasuryCouncilCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;,&#xD;&#xA;          &quot;0x798d4ba9baf0064ec19eb4f0a1a45785ae9d6dfc&quot;,&#xD;&#xA;          &quot;0x773539d4ac0e786233d90a233654ccee26a613d9&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;openTechCommitteeCollective&quot;: {&#xD;&#xA;        &quot;phantom&quot;: null,&#xD;&#xA;        &quot;members&quot;: [&#xD;&#xA;          &quot;0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac&quot;,&#xD;&#xA;          &quot;0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;treasury&quot;: null,&#xD;&#xA;      &quot;crowdloanRewards&quot;: {&#xD;&#xA;        &quot;fundedAmount&quot;: 150000000000000000000000000&#xD;&#xA;      },&#xD;&#xA;      &quot;polkadotXcm&quot;: {&#xD;&#xA;        &quot;safeXcmVersion&quot;: 3&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which Keys should I insert in the above? And what should i insert in the `Rpc calls` after making `customSpec`?.&#xD;&#xA;&#xD;&#xA;Can someone please guide me through this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34080" PostHistoryTypeId="2" PostId="8677" RevisionGUID="2d94f1b0-e9c7-4d41-85c6-978d82e45ac7" CreationDate="2023-05-29T05:01:00.690" UserId="354" Text="You can replace aura with babe but easier way is to use the [substrate node][1] directly which already implements babe and has NPoS consensus.&#xD;&#xA;&#xD;&#xA;If you still want to convert aura to babe than first go through their [definitions][2], babe is a weight based algorithm and aura is round robin. So to change it first you need to change `node/src/service.rs` file in `node-template` you can have reference from [here][3] and you also need to change the `client` and `grandpa` according to `babe`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate&#xD;&#xA;  [2]: https://docs.substrate.io/learn/consensus/#default-consensus-models&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/service.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="34082" PostHistoryTypeId="52" PostId="8671" RevisionGUID="cfe79c7d-8f4b-4cad-acac-0c7268f80473" CreationDate="2023-05-29T05:34:14.893" />
  <row Id="34083" PostHistoryTypeId="5" PostId="8667" RevisionGUID="628fdd47-ef35-4d67-af05-19dc532e4f2a" CreationDate="2023-05-29T06:02:24.380" UserId="2281" Comment="added 14 characters in body; edited tags" Text="```rs&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Variables {&#xD;&#xA;        a: u128,&#xD;&#xA;        b: u128,&#xD;&#xA;        multiplier: u128&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Variables {&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(a: u128, b: u128) -&gt; Self {&#xD;&#xA;            Variables {&#xD;&#xA;                a: a,&#xD;&#xA;                b: b,&#xD;&#xA;                multiplier: 1_000_000_000_000&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn default() -&gt; Self {&#xD;&#xA;            Variables {&#xD;&#xA;                a: Default::default(),&#xD;&#xA;                b: Default::default(),&#xD;&#xA;                multiplier: 1_000_000_000_000&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn initializer(&amp;mut self, a: u128, b: u128) -&gt; bool{&#xD;&#xA;            self.a = a;&#xD;&#xA;            self.b = b;&#xD;&#xA;            true&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn div(&amp;self) -&gt; u128 {&#xD;&#xA;            (self.a*self.multiplier/self.b) as u128&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when I try to build above contract i'm getting this error - &#xD;&#xA;`ERROR: Validation of the Wasm failed`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ERROR: An unexpected panic function import was found in the contract Wasm.&#xD;&#xA;    This typically goes back to a known bug in the Rust compiler:&#xD;&#xA;    https://github.com/rust-lang/rust/issues/78744&#xD;&#xA;&#xD;&#xA;As a workaround try to insert `overflow-checks = false` into your `Cargo.toml`.&#xD;&#xA;This will disable safe math operations, but unfortunately we are currently not&#xD;&#xA;aware of a better workaround until the bug in the compiler is fixed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ERROR: An unexpected import function was found in the contract Wasm: _ZN4core9panicking5panic17h8d2687444d110f05E.&#xD;&#xA;    Import funtions must either be prefixed with 'memory', or part of a module prefixed with 'seal'&#xD;&#xA;&#xD;&#xA;Ignore with `--skip-wasm-validation`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34084" PostHistoryTypeId="6" PostId="8667" RevisionGUID="628fdd47-ef35-4d67-af05-19dc532e4f2a" CreationDate="2023-05-29T06:02:24.380" UserId="2281" Comment="added 14 characters in body; edited tags" Text="|ink|smart-contract|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34085" PostHistoryTypeId="5" PostId="8672" RevisionGUID="2088078d-e154-4b7c-96f4-cbb5c9e0ce8c" CreationDate="2023-05-29T06:04:13.277" UserId="2281" Comment="added 35 characters in body" Text="Hi i am trying to use the `sp-consensus-babe` but I am having issues when I run the command &#xD;&#xA;&#xD;&#xA;**`command: cargo build --release`**&#xD;&#xA;&#xD;&#xA;The issue that I am receiving is this &#xD;&#xA;&#xD;&#xA;&gt; error: failed to load manifest for workspace member&#xD;&#xA;&gt; `/Users/abubakarmujahid/Desktop/Substrate/substrate-node-template/node`&#xD;&#xA;&gt; &#xD;&#xA;&gt; Caused by:   failed to load manifest for dependency&#xD;&#xA;&gt; `node-template-runtime`&#xD;&#xA;&gt; &#xD;&#xA;&gt; Caused by:   failed to parse manifest at&#xD;&#xA;&gt; `/Users/abubakarmujahid/Desktop/Substrate/substrate-node-template/runtime/Cargo.toml`&#xD;&#xA;&gt; &#xD;&#xA;&gt; Caused by:   key `branch` is ignored for dependency&#xD;&#xA;&gt; (sp-consensus-babe).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I have defined the dependency correctly in cargo.toml. I have described it in the following way.&#xD;&#xA;&#xD;&#xA;    sp-consensus-babe = { version = &quot;0.10.0-dev&quot;, default-features = false, path = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can anyone know how to fix this ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34086" PostHistoryTypeId="2" PostId="8678" RevisionGUID="d3a0ad23-ca62-4fc1-bfb2-59db79b1b708" CreationDate="2023-05-29T06:09:30.327" UserId="4277" Text="The issue was that in the dependency instead of the path = to I have to mention the git= &#xD;&#xA;&#xD;&#xA;**Previously it was**&#xD;&#xA;&#xD;&#xA;    sp-consensus-babe = { version = &quot;0.10.0-dev&quot;, default-features = false, path = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**But it has to be in this manner**&#xD;&#xA;&#xD;&#xA;    sp-consensus-babe = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34088" PostHistoryTypeId="2" PostId="8679" RevisionGUID="b5ba7586-1266-454a-b3fd-20452c657243" CreationDate="2023-05-29T09:38:22.390" UserId="1795" Text="What happens if an XCM is sent from blockchain A to blockchain B before finalisation, and then the block on blockchain A is reverted? Is blockchain's B block also reverted?&#xD;&#xA;&#xD;&#xA;Is it safe to assume that there is can be no inconsistencies arising from such scenario? E.g. an asset transfer reverted on chain A but still executed on chain B?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34090" PostHistoryTypeId="1" PostId="8679" RevisionGUID="b5ba7586-1266-454a-b3fd-20452c657243" CreationDate="2023-05-29T09:38:22.390" UserId="1795" Text="XCM and block finalisation/revert" ContentLicense="CC BY-SA 4.0" />
  <row Id="34091" PostHistoryTypeId="3" PostId="8679" RevisionGUID="b5ba7586-1266-454a-b3fd-20452c657243" CreationDate="2023-05-29T09:38:22.390" UserId="1795" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34092" PostHistoryTypeId="5" PostId="8679" RevisionGUID="aa784ebe-deb4-4db7-b835-114f3f2e13a2" CreationDate="2023-05-29T09:44:38.343" UserId="1795" Comment="deleted 3 characters in body" Text="What happens if an XCM is sent from blockchain A to blockchain B before finalisation, and then the block on blockchain A is reverted? Is blockchain's B block also reverted?&#xD;&#xA;&#xD;&#xA;Is it safe to assume that there can be no inconsistencies arising from such scenario? E.g. an asset transfer reverted on chain A but still executed on chain B?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34093" PostHistoryTypeId="2" PostId="8680" RevisionGUID="0ae22f3d-18d1-4b24-96b5-efb966ae2ec2" CreationDate="2023-05-29T09:49:41.013" UserId="2762" Text="Use the hook `useSubstrateState` (see the code [here][1]).&#xD;&#xA;An example is:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const { api, currentAccount } = useSubstrateState()&#xD;&#xA;const yourAddress = currentAccount.address;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-front-end-template/blob/main/src/substrate-lib/SubstrateContext.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="34095" PostHistoryTypeId="2" PostId="8681" RevisionGUID="db7e2096-b203-4fc7-ae23-7ca100edbc50" CreationDate="2023-05-29T10:17:30.160" UserId="4277" Text="     error[E0583]: file not found for module `sys`&#xD;&#xA;        --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:26:1&#xD;&#xA;         |&#xD;&#xA;      26 | mod sys;&#xD;&#xA;         | ^^^^^^^^&#xD;&#xA;         |&#xD;&#xA;         = help: to create the module `sys`, create file &quot;/Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/sys.rs&quot; or &quot;/Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/sys/mod.rs&quot;&#xD;&#xA;&#xD;&#xA;      error[E0425]: cannot find function `with_description` in module `sys`&#xD;&#xA;        --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:47:14&#xD;&#xA;         |&#xD;&#xA;      47 |         sys::with_description(*self, |desc| {&#xD;&#xA;         |    &#xD;&#xA;&#xD;&#xA;     &#xD;&#xA;&#xD;&#xA;         ^^^^^^^^^^^^^^^^ not found in `sys`&#xD;&#xA;    &#xD;&#xA;      error[E0425]: cannot find function `with_description` in module `sys`&#xD;&#xA;        --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:58:14&#xD;&#xA;         |&#xD;&#xA;      58 |         sys::with_description(*self, |desc| match desc {&#xD;&#xA;         |              ^^^^^^^^^^^^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;      error[E0425]: cannot find value `STRERROR_NAME` in module `sys`&#xD;&#xA;        --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:64:22&#xD;&#xA;         |&#xD;&#xA;      64 |                 sys::STRERROR_NAME,&#xD;&#xA;         |                      ^^^^^^^^^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     error[E0425]: cannot find function `errno` in module `sys`&#xD;&#xA;        --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:95:10&#xD;&#xA;         |&#xD;&#xA;      95 |     sys::errno()&#xD;&#xA;         |          ^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;      error[E0425]: cannot find function `set_errno` in module `sys`&#xD;&#xA;         --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:100:10&#xD;&#xA;          |&#xD;&#xA;      100 |     sys::set_errno(err)&#xD;&#xA;          |          ^^^^^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34097" PostHistoryTypeId="1" PostId="8681" RevisionGUID="db7e2096-b203-4fc7-ae23-7ca100edbc50" CreationDate="2023-05-29T10:17:30.160" UserId="4277" Text="file not found for module `sys`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34098" PostHistoryTypeId="3" PostId="8681" RevisionGUID="db7e2096-b203-4fc7-ae23-7ca100edbc50" CreationDate="2023-05-29T10:17:30.160" UserId="4277" Text="|substrate-node-template|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34099" PostHistoryTypeId="2" PostId="8682" RevisionGUID="b3ffb65b-e15c-460d-b2b8-bab22984b928" CreationDate="2023-05-29T10:24:22.673" UserId="2762" Text="I am not sure about the specific question you area asing here, so I am going to share with you some useful resources for building frontend substrate Dapps.&#xD;&#xA;&#xD;&#xA;The [front-end-template][1] is the basic example, it uses ReactJS to render a web browser interface that enables you to interact with the Substrate-based blockchain node. It uses the [PolkadotJS tool][2]. Another framework you can use for interactions with Substrate chains is [CAPI][3].&#xD;&#xA;&#xD;&#xA;[polkadot-js-api-ts-template][4] is a template that you can use to quickly start hacking in top of any substrate based chain, it creates for you all the basics.&#xD;&#xA;&#xD;&#xA;Another example to interact with a substrate node you can look is: [Substrate Contracts UI][5]. It is a web application for deploying and interacting with WASM smart contracts on Substrate blockchains that include the FRAME Contracts Pallet.&#xD;&#xA;&#xD;&#xA;You can also take a look at the code of a production-ready frontend app: [Polkadot Staking Dashboard][6]&#xD;&#xA;&#xD;&#xA;Other front end examples: [substrate-society][7], [chess-substrate-dapp][8] ...&#xD;&#xA;&#xD;&#xA;Is good to see how the community is creating more front-end related tools, and example thet can be useful for you to interact with Smart Contracts from your frontend is [useInkathon][9]&#xD;&#xA;&#xD;&#xA;&gt; Typesafe React Hooks abstracting functionality by polkadot.js for&#xD;&#xA;&gt; working with Substrate-based networks and ink! Smart Contracts.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;  [2]: https://polkadot.js.org/docs/api/&#xD;&#xA;  [3]: https://github.com/paritytech/capi&#xD;&#xA;  [4]: https://github.com/kianenigma/polkadot-js-api-ts-template&#xD;&#xA;  [5]: https://github.com/paritytech/contracts-ui&#xD;&#xA;  [6]: https://github.com/paritytech/polkadot-staking-dashboard&#xD;&#xA;  [7]: https://github.com/shawntabrizi/substrate-society&#xD;&#xA;  [8]: https://github.com/AlexD10S/chess-substrate-dapp&#xD;&#xA;  [9]: https://github.com/scio-labs/use-inkathon" ContentLicense="CC BY-SA 4.0" />
  <row Id="34101" PostHistoryTypeId="52" PostId="8673" RevisionGUID="05bd95e0-8128-4ddb-9cfa-99aa3e89891a" CreationDate="2023-05-29T10:35:20.967" />
  <row Id="34102" PostHistoryTypeId="2" PostId="8683" RevisionGUID="f4bf4c26-3c26-4de9-9ff4-63f0fb4ebc99" CreationDate="2023-05-29T10:44:23.010" UserId="170" Text="You should add these lines to your Cargo.toml file (as suggested)&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[profile.dev]&#xD;&#xA;overflow-checks = false&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that it is not needed in ink! if you build with `--release` flag" ContentLicense="CC BY-SA 4.0" />
  <row Id="34104" PostHistoryTypeId="2" PostId="8684" RevisionGUID="105f2836-efca-4c0e-83c6-88c0cb858f24" CreationDate="2023-05-29T11:14:22.990" UserId="2764" Text="First of all, thanks for asking about this topic&#xD;&#xA;&#xD;&#xA;Any metadata on the disk can be further inspected with the use of subxt-cli, we've also added some new features that allows users to quickly explore the metadata information (in [this PR](https://github.com/paritytech/subxt/pull/950)). However, you can still go back and forth between the binary format and the JSON format with older subxt versions.&#xD;&#xA;&#xD;&#xA;As you mentioned above, the metadata is downloaded as&#xD;&#xA;```bash&#xD;&#xA;cargo run --release -p subxt-cli -- metadata --url https://rpc.polkadot.io:443 -f bytes &gt; artifacts/test_metadata.scale&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We can see all the pallets present in the metadata by doing a&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cargo run --release -p subxt-cli -- explore --file artifacts/test_metadata.scale&#xD;&#xA;&#xD;&#xA;..&#xD;&#xA;    ParachainsOrigin&#xD;&#xA;    Paras&#xD;&#xA;    ParasDisputes&#xD;&#xA;..&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then we can see the storage entries of the `Paras` pallet with the following&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cargo run --release -p subxt-cli -- explore --file artifacts/test_metadata.scale Paras storage&#xD;&#xA;&#xD;&#xA;..&#xD;&#xA;    ParaLifecycles&#xD;&#xA;    Parachains&#xD;&#xA;    PastCodeHash&#xD;&#xA;..&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Using the same code lines from your question I do get the output:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cargo run --example stack_8663                                                                                                                                                                                                                                     14:02:55&#xD;&#xA;&#xD;&#xA;polkadot::storage().paras().parachains(): Some([Id(1000), Id(1001), Id(1002), Id(2000), Id(2002), Id(2004), Id(2006), Id(2007), Id(2008), Id(2011), Id(2012), Id(2013), Id(2019), Id(2021), Id(2026), Id(2027), Id(2030), Id(2031), Id(2032), Id(2034), Id(2035), Id(2037), Id(2039), Id(2040), Id(2043), Id(2046), Id(2048), Id(2051), Id(2052), Id(2053), Id(2055), Id(2056), Id(2058), Id(2086), Id(2090), Id(2091), Id(2092), Id(2093), Id(2094), Id(2097), Id(2101), Id(2104), Id(2106), Id(3333), Id(3334), Id(3336)])&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can give my example a go from the branch [lexnv/stack_8663](https://github.com/paritytech/subxt/tree/lexnv/stack_8663) (commit [6c4c58e0](https://github.com/paritytech/subxt/commit/6c4c58e00491fe23f13ea9b7753af9862438f966)):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    // Create a new API client, configured to talk to Polkadot nodes.&#xD;&#xA;    let api = OnlineClient::&lt;PolkadotConfig&gt;::from_url(&quot;wss://rpc.polkadot.io:443&quot;).await?;&#xD;&#xA;&#xD;&#xA;    // Build the query.&#xD;&#xA;    let storage_query = polkadot::storage().paras().parachains();&#xD;&#xA;&#xD;&#xA;    // Fetch the result.&#xD;&#xA;    let result = api&#xD;&#xA;        .storage()&#xD;&#xA;        .at_latest()&#xD;&#xA;        .await?&#xD;&#xA;        .fetch(&amp;storage_query)&#xD;&#xA;        .await?;&#xD;&#xA;&#xD;&#xA;    println!(&quot;polkadot::storage().paras().parachains(): {result:?}&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Further Debugging&#xD;&#xA;&#xD;&#xA;The `Error: Metadata(PalletNotFound)` suggests that the pallet `Paras` (in this case I presume) is missing. &#xD;&#xA;There are two possibilities here:&#xD;&#xA; - Is your metadata in sync? (ie, you may be using older metadata -- please check that the path is correct and regenerate the metadata as above)&#xD;&#xA; - Are you doing any other subxt calls? (ie, you may call other queries for storage / tx with other pallets, pallets that may no longer be present in the chain)&#xD;&#xA;&#xD;&#xA;Another thing worth mentioning is how you build your subxt client (although not that relevant -- I construct the client with `OnlineClient::&lt;PolkadotConfig&gt;::from_url(&quot;wss://rpc.polkadot.io:443&quot;).await?`)." ContentLicense="CC BY-SA 4.0" />
  <row Id="34106" PostHistoryTypeId="2" PostId="8685" RevisionGUID="057745ab-d75b-40e1-8f4f-999c9f6caee2" CreationDate="2023-05-29T11:24:35.133" UserId="2764" Text="Glad you figure it out!&#xD;&#xA;&#xD;&#xA;We are also providing an example [here](https://github.com/paritytech/subxt/blob/master/examples/examples/setup_client_custom_config.rs) on how to setup a custom client `Config`.&#xD;&#xA;&#xD;&#xA;Although, we encourage the users first to try the `Polkadot`/`Substrate` config. If that doesn't work, go one step lower in the stack, and implement their own config when targeting some custom chains (ie, parachains that differ from the configs we provide).&#xD;&#xA;&#xD;&#xA;One tricky area around having a custom config may be the `type ExtrinsicParams`, but in practice, any other fields can diverge. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34108" PostHistoryTypeId="5" PostId="8681" RevisionGUID="cf671ecb-97a7-4b58-947c-c66b394cd1f0" CreationDate="2023-05-29T11:55:43.883" UserId="2281" Comment="added 62 characters in body" Text="Geeting following error's how can i fix this error?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;     error[E0583]: file not found for module `sys`&#xD;&#xA;        --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:26:1&#xD;&#xA;         |&#xD;&#xA;      26 | mod sys;&#xD;&#xA;         | ^^^^^^^^&#xD;&#xA;         |&#xD;&#xA;         = help: to create the module `sys`, create file &quot;/Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/sys.rs&quot; or &quot;/Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/sys/mod.rs&quot;&#xD;&#xA;&#xD;&#xA;      error[E0425]: cannot find function `with_description` in module `sys`&#xD;&#xA;        --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:47:14&#xD;&#xA;         |&#xD;&#xA;      47 |         sys::with_description(*self, |desc| {&#xD;&#xA;         |    &#xD;&#xA;&#xD;&#xA;     &#xD;&#xA;&#xD;&#xA;         ^^^^^^^^^^^^^^^^ not found in `sys`&#xD;&#xA;    &#xD;&#xA;      error[E0425]: cannot find function `with_description` in module `sys`&#xD;&#xA;        --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:58:14&#xD;&#xA;         |&#xD;&#xA;      58 |         sys::with_description(*self, |desc| match desc {&#xD;&#xA;         |              ^^^^^^^^^^^^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;      error[E0425]: cannot find value `STRERROR_NAME` in module `sys`&#xD;&#xA;        --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:64:22&#xD;&#xA;         |&#xD;&#xA;      64 |                 sys::STRERROR_NAME,&#xD;&#xA;         |                      ^^^^^^^^^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     error[E0425]: cannot find function `errno` in module `sys`&#xD;&#xA;        --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:95:10&#xD;&#xA;         |&#xD;&#xA;      95 |     sys::errno()&#xD;&#xA;         |          ^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;      error[E0425]: cannot find function `set_errno` in module `sys`&#xD;&#xA;         --&gt; /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/src/lib.rs:100:10&#xD;&#xA;          |&#xD;&#xA;      100 |     sys::set_errno(err)&#xD;&#xA;          |          ^^^^^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34109" PostHistoryTypeId="2" PostId="8686" RevisionGUID="9ace57ff-2f14-41e8-b1d0-1109dc0379e5" CreationDate="2023-05-29T13:50:29.917" UserId="19" Text="There are any alternatives for `HashMap` today `Mapping` that developers can use and have possibility to iterate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34111" PostHistoryTypeId="2" PostId="8687" RevisionGUID="be9962c0-95ec-4df0-99a4-ae4eeeb3697e" CreationDate="2023-05-29T14:39:57.400" UserId="4279" Text="im trying to send polkadot transaction with python script,&#xD;&#xA;im using this rust code as a reference &lt;https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/05_transfer_balance.rs&gt;&#xD;&#xA;but im having trouble to convert  call.encode_to(&amp;mut tmp) with &#xD;&#xA;py-scale-codec.&#xD;&#xA; &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34113" PostHistoryTypeId="1" PostId="8687" RevisionGUID="be9962c0-95ec-4df0-99a4-ae4eeeb3697e" CreationDate="2023-05-29T14:39:57.400" UserId="4279" Text="sending polkadot transaction with python script" ContentLicense="CC BY-SA 4.0" />
  <row Id="34114" PostHistoryTypeId="3" PostId="8687" RevisionGUID="be9962c0-95ec-4df0-99a4-ae4eeeb3697e" CreationDate="2023-05-29T14:39:57.400" UserId="4279" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34115" PostHistoryTypeId="2" PostId="8688" RevisionGUID="a75d7799-2e52-4251-a123-f27491912ba7" CreationDate="2023-05-29T14:46:37.873" UserId="73" Text="Just an oversight. You are right and it should be `12000`." ContentLicense="CC BY-SA 4.0" />
  <row Id="34124" PostHistoryTypeId="2" PostId="8690" RevisionGUID="0a4c0cea-34ce-439f-b98f-ad30e2b08855" CreationDate="2023-05-30T02:01:01.267" UserId="3555" Text="I've upgraded the frontier-node-template to substrate polkadot-v0.9.38, I've fixed all issues in runtime, migrated my code as well.&#xD;&#xA;But since last few days, I'm stuck in converting service.rs file in node folder from &quot;aura&quot; to &quot;Babe&quot;. &#xD;&#xA;I'm new to Rust and substrate therefore, having problems in trait implementations, get lot's of trait bound errors using BabeLink.&#xD;&#xA;&#xD;&#xA;I've referred to the substrate branches' available which implement Babe but those some how are not compatible with my frontier code.&#xD;&#xA;&#xD;&#xA;Any help will be appreciated, I will share my service.rs file if required please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34126" PostHistoryTypeId="1" PostId="8690" RevisionGUID="0a4c0cea-34ce-439f-b98f-ad30e2b08855" CreationDate="2023-05-30T02:01:01.267" UserId="3555" Text="frontier template upgrade to polkadotv0.9.38 but using Babe instead of Aura" ContentLicense="CC BY-SA 4.0" />
  <row Id="34127" PostHistoryTypeId="3" PostId="8690" RevisionGUID="0a4c0cea-34ce-439f-b98f-ad30e2b08855" CreationDate="2023-05-30T02:01:01.267" UserId="3555" Text="|frontier|babe|aura|upgrade|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34128" PostHistoryTypeId="5" PostId="8690" RevisionGUID="ca8b2414-9adf-48c3-a085-249357df4b6e" CreationDate="2023-05-30T04:42:27.557" UserId="354" Comment="added 4 characters in body" Text="I've upgraded the frontier-node-template to substrate `polkadot-v0.9.38`, I've fixed all issues in runtime, migrated my code as well.&#xD;&#xA;But since last few days, I'm stuck in converting `service.rs` file in node folder from `aura` to `Babe`. &#xD;&#xA;I'm new to Rust and substrate therefore, having problems in trait implementations, get lot's of trait bound errors using BabeLink.&#xD;&#xA;&#xD;&#xA;I've referred to the substrate branches' available which implement Babe but those some how are not compatible with my frontier code.&#xD;&#xA;&#xD;&#xA;Any help will be appreciated, I will share my service.rs file if required please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34129" PostHistoryTypeId="5" PostId="8687" RevisionGUID="ad95acb4-e971-4e3b-bfd8-e8116c36573b" CreationDate="2023-05-30T05:27:39.117" UserId="2281" Comment="added 23 characters in body" Text="i am trying to send `polkadot transaction` with python script,&#xD;&#xA;i am using this rust code as a [reference][1]&#xD;&#xA;but im having trouble to convert  `call.encode_to(&amp;mut tmp)` with &#xD;&#xA;`py-scale-codec`.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/05_transfer_balance.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="34130" PostHistoryTypeId="2" PostId="8691" RevisionGUID="29351a92-8f9f-47ee-8c97-bcbebac75fd4" CreationDate="2023-05-30T05:28:29.953" UserId="139" Text="This is not an easy question to answer for multiple reasons. My suggestion is to first go through the other multiple answers on here on how the `aura` -&gt; `babe` transition goes. You're correct that this requires you to make changes to the `import_queue` and the `block_import`, in the `service.rs` file, make changes to the `rpc.rs` file to include `BabeDeps` and `BabeRpcHandler` like so : &#xD;&#xA;```rust&#xD;&#xA;	io.extend_with(sc_consensus_babe_rpc::BabeApi::to_delegate(BabeRpcHandler::new(&#xD;&#xA;		client.clone(),&#xD;&#xA;		shared_epoch_changes.clone(),&#xD;&#xA;		keystore,&#xD;&#xA;		babe_config,&#xD;&#xA;		select_chain,&#xD;&#xA;		deny_unsafe,&#xD;&#xA;	)));&#xD;&#xA;	io.extend_with(sc_finality_grandpa_rpc::GrandpaApi::to_delegate(GrandpaRpcHandler::new(&#xD;&#xA;		shared_authority_set.clone(),&#xD;&#xA;		shared_voter_state,&#xD;&#xA;		justification_stream,&#xD;&#xA;		subscription_executor,&#xD;&#xA;		finality_provider,&#xD;&#xA;	)));&#xD;&#xA;```&#xD;&#xA; besides having the necessary pallets in the runtime. Also you need to make the adjustments in the `GenesisConfig` struct in your `chain_spec.rs`.&#xD;&#xA;&#xD;&#xA;To get a better feel for this, I would suggest migrating a vanilla substrate-node-template to use `babe`. This would give you enough experience to know what exact changes are needed to be made. Then you may do the same with the frontier template as it's almost exactly like the substrate-node-template except it has `frontier` integrated into it, and not such a straightforward directory structure as one you'd find on the node-template. &#xD;&#xA;&#xD;&#xA;If you're still stuck after doing all this which is unlikely, then I just editing your question to include a repository link where someone might be able to take a look at what you're doing wrong. But I highly recommend trying to troubleshoot it yourself first." ContentLicense="CC BY-SA 4.0" />
  <row Id="34134" PostHistoryTypeId="5" PostId="7250" RevisionGUID="94c114e1-ac2f-4b03-bf5f-7bb22ae39298" CreationDate="2023-05-30T09:14:58.923" UserId="2281" Comment="added 4 characters in body" Text="I'm on Windows 11, (intel core i7-9700K processor) and have stable-x86_64-pc-windows-msvc (default), rustc 1.67.1 (d5a82bbd2 2023-02-07) and cargo 1.67.1 (8ecd4f20a 2023-01-10)&#xD;&#xA;&#xD;&#xA;When I'm compiling some project code, it gives the error ```error[E0432]: unresolved import `windows_sys::Win32::Foundation` ```. See the entire error tree below.&#xD;&#xA;&#xD;&#xA;Is there any way to overcome this on Windows natively?  I've just uninstalled and reinstalled via rust-init.exe, so it's not that.  Is there an nightly / later release than the one I have above that fixes it?&#xD;&#xA;&#xD;&#xA;I expect that I could try going through the kerfuffle of getting everything into and out of WSL2, which may or may not work in the end, but is there some kind of windows_sys::Win32::Foundation shim available to get this working on Windows?&#xD;&#xA;Thanks for any pointers!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;***start compilation output with error***&#xD;&#xA;&#xD;&#xA;   ...downloading and compilation successful to here&#xD;&#xA;   ```rs&#xD;&#xA;Compiling integer-sqrt v0.1.5&#xD;&#xA;   Compiling wasmtime-cache v1.0.2&#xD;&#xA;error[E0432]: unresolved import `windows_sys::Win32::Foundation`&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:90:37&#xD;&#xA;   |&#xD;&#xA;90 |             use windows_sys::Win32::Foundation::*;&#xD;&#xA;   |                                     ^^^^^^^^^^ could not find `Foundation` in `Win32`&#xD;&#xA;&#xD;&#xA;error[E0432]: unresolved import `windows_sys::Win32::Foundation`&#xD;&#xA; --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:3:25&#xD;&#xA;  |&#xD;&#xA;3 | use windows_sys::Win32::Foundation::*;&#xD;&#xA;  |                         ^^^^^^^^^^ could not find `Foundation` in `Win32`&#xD;&#xA;&#xD;&#xA;   Compiling lru v0.8.1&#xD;&#xA;   Compiling trie-root v0.17.0&#xD;&#xA;error[E0412]: cannot find type `EXCEPTION_POINTERS` in this scope&#xD;&#xA; --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:8:42&#xD;&#xA;  |&#xD;&#xA;8 | pub type SignalHandler&lt;'a&gt; = dyn Fn(*mut EXCEPTION_POINTERS) -&gt; bool + Send + Sync + 'a;&#xD;&#xA;  |                                          ^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0412]: cannot find type `EXCEPTION_POINTERS` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:22:66&#xD;&#xA;   |&#xD;&#xA;22 | unsafe extern &quot;system&quot; fn exception_handler(exception_info: *mut EXCEPTION_POINTERS) -&gt; i32 {&#xD;&#xA;   |                                                                  ^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_ACCESS_VIOLATION` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:27:32&#xD;&#xA;   |&#xD;&#xA;27 |     if record.ExceptionCode != EXCEPTION_ACCESS_VIOLATION&#xD;&#xA;   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_ILLEGAL_INSTRUCTION` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:28:36&#xD;&#xA;   |&#xD;&#xA;28 |         &amp;&amp; record.ExceptionCode != EXCEPTION_ILLEGAL_INSTRUCTION&#xD;&#xA;   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_INT_DIVIDE_BY_ZERO` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:29:36&#xD;&#xA;   |&#xD;&#xA;29 |         &amp;&amp; record.ExceptionCode != EXCEPTION_INT_DIVIDE_BY_ZERO&#xD;&#xA;   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_INT_OVERFLOW` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:30:36&#xD;&#xA;   |&#xD;&#xA;30 |         &amp;&amp; record.ExceptionCode != EXCEPTION_INT_OVERFLOW&#xD;&#xA;   |                                    ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;   Compiling memory-db v0.31.0&#xD;&#xA;   Compiling trie-db v0.24.0&#xD;&#xA;   Compiling sp-panic-handler v5.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `GetCurrentThread` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-cache-1.0.2\src\worker.rs:240:17&#xD;&#xA;    |&#xD;&#xA;240 |                 GetCurrentThread(),&#xD;&#xA;    |                 ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `GetCurrentThreadId`&#xD;&#xA;    |&#xD;&#xA;   ::: C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-sys-0.36.1\src\Windows\Win32\System\Threading\mod.rs:283:5&#xD;&#xA;    |&#xD;&#xA;283 |     pub fn GetCurrentThreadId() -&gt; u32;&#xD;&#xA;    |     ---------------------------------- similarly named function `GetCurrentThreadId` defined here&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `SetThreadPriority` in this scope&#xD;&#xA;    --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-cache-1.0.2\src\worker.rs:239:13&#xD;&#xA;     |&#xD;&#xA;239  |             SetThreadPriority(&#xD;&#xA;     |             ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `UmsThreadPriority`&#xD;&#xA;     |&#xD;&#xA;    ::: C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-sys-0.36.1\src\Windows\Win32\System\Threading\mod.rs:1725:1&#xD;&#xA;     |&#xD;&#xA;1725 | pub const UmsThreadPriority: RTL_UMS_THREAD_INFO_CLASS = 2i32;&#xD;&#xA;     | ------------------------------------------------------ similarly named constant `UmsThreadPriority` defined here&#xD;&#xA;&#xD;&#xA;   Compiling sp-arithmetic v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualFree` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\instance\allocator\pooling\windows.rs:22:17&#xD;&#xA;   |&#xD;&#xA;22 |     if unsafe { VirtualFree(addr as _, len, MEM_DECOMMIT) } == 0 {&#xD;&#xA;   |                 ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0425`.&#xD;&#xA;error: could not compile `wasmtime-cache` due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `CreateFileMappingW` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:114:31&#xD;&#xA;    |&#xD;&#xA;114 |                 let mapping = CreateFileMappingW(&#xD;&#xA;    |                               ^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `MapViewOfFile` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:129:27&#xD;&#xA;    |&#xD;&#xA;129 |                 let ptr = MapViewOfFile(mapping, FILE_MAP_READ | FILE_MAP_EXECUTE, 0, 0, len);&#xD;&#xA;    |                           ^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `CloseHandle` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:131:17&#xD;&#xA;    |&#xD;&#xA;131 |                 CloseHandle(mapping);&#xD;&#xA;    |                 ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:146:20&#xD;&#xA;    |&#xD;&#xA;146 |                 if VirtualProtect(ret.ptr as *mut _, ret.len, PAGE_READONLY, &amp;mut old) == 0 {&#xD;&#xA;    |                    ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:396:17&#xD;&#xA;    |&#xD;&#xA;396 |                 VirtualProtect(base, len, PAGE_WRITECOPY, &amp;mut old)&#xD;&#xA;    |                 ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:398:17&#xD;&#xA;    |&#xD;&#xA;398 |                 VirtualProtect(base, len, PAGE_READWRITE, &amp;mut old)&#xD;&#xA;    |                 ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:432:26&#xD;&#xA;    |&#xD;&#xA;432 |             let result = VirtualProtect(base, len, PAGE_EXECUTE_READ, &amp;mut old);&#xD;&#xA;    |                          ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualFree` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:468:34&#xD;&#xA;    |&#xD;&#xA;468 |                 let r = unsafe { VirtualFree(self.ptr as *mut c_void, 0, MEM_RELEASE) };&#xD;&#xA;    |                                  ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `UnmapViewOfFile` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:471:34&#xD;&#xA;    |&#xD;&#xA;471 |                 let r = unsafe { UnmapViewOfFile(self.ptr as *mut c_void) };&#xD;&#xA;    |                                  ^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `AddVectoredExceptionHandler` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:14:8&#xD;&#xA;    |&#xD;&#xA;14  |     if AddVectoredExceptionHandler(1, Some(exception_handler)).is_null() {&#xD;&#xA;    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `RemoveVectoredExceptionHandler`&#xD;&#xA;    |&#xD;&#xA;   ::: C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-sys-0.36.1\src\Windows\Win32\System\Diagnostics\Debug\mod.rs:305:5&#xD;&#xA;    |&#xD;&#xA;305 |     pub fn RemoveVectoredExceptionHandler(handle: *const ::core::ffi::c_void) -&gt; u32;&#xD;&#xA;    |     -------------------------------------------------------------------------------- similarly named function `RemoveVectoredExceptionHandler` defined here&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0412, E0425, E0432.&#xD;&#xA;For more information about an error, try `rustc --explain E0412`.&#xD;&#xA;error: could not compile `wasmtime-runtime` due to 19 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;***end compilation output with error***" ContentLicense="CC BY-SA 4.0" />
  <row Id="34135" PostHistoryTypeId="5" PostId="2562" RevisionGUID="eb83b9a6-ce95-4566-a3fe-43eb21604ca4" CreationDate="2023-05-30T09:46:30.140" UserId="354" Comment="added 2 characters in body" Text="I have a very basic question - ink! now has a [Mapping][1] struct for `key-value pairs`. It seems it does not implement the `Iterator` trait?  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/ink/ink_storage/struct.Mapping.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="34136" PostHistoryTypeId="2" PostId="8693" RevisionGUID="583362a1-9970-4059-af0b-7d0f7c7edb91" CreationDate="2023-05-30T12:11:11.100" UserId="3332" Text="Hello guys i am trying to get the metadata as a `0x${string}` type. I am calling the api endpoint state_getMetadata with `await api.rpc.state.getMetadata()` however this returns an object of Metadata and i am trying to do offline singing of transctions. &#xD;&#xA;&#xD;&#xA;I have followed the [github](https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/polkadot/src/polkadot.ts) examples where they are doing same thing however when i try to sign the transaction it wants the metadata to be of type `0x${string}` how do i properly convert or implement this? &#xD;&#xA;&#xD;&#xA;thanks in advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="34138" PostHistoryTypeId="1" PostId="8693" RevisionGUID="583362a1-9970-4059-af0b-7d0f7c7edb91" CreationDate="2023-05-30T12:11:11.100" UserId="3332" Text="how to get metadata as a `0x${string}` type" ContentLicense="CC BY-SA 4.0" />
  <row Id="34139" PostHistoryTypeId="3" PostId="8693" RevisionGUID="583362a1-9970-4059-af0b-7d0f7c7edb91" CreationDate="2023-05-30T12:11:11.100" UserId="3332" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34140" PostHistoryTypeId="2" PostId="8694" RevisionGUID="ff3388e4-1fef-42ee-a073-5f0ccf0c0803" CreationDate="2023-05-30T12:54:56.153" UserId="4277" Text="So I cargo.toml file you have to do this there.&#xD;&#xA;&#xD;&#xA;pallet-session, instead of features = [&quot;historical&quot;], replace it with default-features = false" ContentLicense="CC BY-SA 4.0" />
  <row Id="34142" PostHistoryTypeId="2" PostId="8695" RevisionGUID="dc7fa19b-42a9-48bd-a0db-1cea8069e96f" CreationDate="2023-05-30T13:20:13.450" UserId="1786" Text="In order to have the return value of `await api.rpc.state.getMetadata()` be a type of `0x${string}` all you need to do is call `.toHex()` on the return type.&#xD;&#xA;&#xD;&#xA;So:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const metadata = await api.rpc.state.getMetadata();&#xD;&#xA;const metadataHex = metadata.toHex();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34144" PostHistoryTypeId="2" PostId="8696" RevisionGUID="1ae48f47-b209-497b-a56c-d53bc5290435" CreationDate="2023-05-30T14:19:46.893" UserId="2909" Text="A Parachain team is nearing the end of their Kusama parachain lease and they want to renew it. Is there an available checklist of steps they need to do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34146" PostHistoryTypeId="1" PostId="8696" RevisionGUID="1ae48f47-b209-497b-a56c-d53bc5290435" CreationDate="2023-05-30T14:19:46.893" UserId="2909" Text="Checklist for renewing a parachain slot" ContentLicense="CC BY-SA 4.0" />
  <row Id="34147" PostHistoryTypeId="3" PostId="8696" RevisionGUID="1ae48f47-b209-497b-a56c-d53bc5290435" CreationDate="2023-05-30T14:19:46.893" UserId="2909" Text="|parachain|auctions|lease|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34148" PostHistoryTypeId="2" PostId="8697" RevisionGUID="50b2edca-1523-41f3-ac9c-f9c1b83ae80a" CreationDate="2023-05-30T15:40:31.597" UserId="4285" Text="For now I have custom `SignedExtension` in my substrate node:&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;pub struct CheckAccount&lt;T&gt; {&#xD;&#xA;	timestamp: u64,&#xD;&#xA;	_marker: PhantomData&lt;T&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my polkadot-js-api I define this like so:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let signedExtensions = {&#xD;&#xA;    CheckAccount: {&#xD;&#xA;      extrinsic: {&#xD;&#xA;        timestamp: &quot;u64&quot;,&#xD;&#xA;      },&#xD;&#xA;      payload: {},&#xD;&#xA;    },&#xD;&#xA;  };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;    ...&#xD;&#xA;    SignedExtensions,&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And to perform transaction I have specify extension value manually&#xD;&#xA;```js&#xD;&#xA;api.tx.balances&#xD;&#xA;    .transfer(bob, 1000)&#xD;&#xA;    .signAndSend(alice, { timestamp: Date.now() })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The questing is how can I get behaviour for my custom `SignedExtension`, for example  like `CheckNonce` have, when it automatically initialised with api and don't have to specify it manually? " ContentLicense="CC BY-SA 4.0" />
  <row Id="34150" PostHistoryTypeId="1" PostId="8697" RevisionGUID="50b2edca-1523-41f3-ac9c-f9c1b83ae80a" CreationDate="2023-05-30T15:40:31.597" UserId="4285" Text="How to automatically pass the value to custom SignedExtension" ContentLicense="CC BY-SA 4.0" />
  <row Id="34151" PostHistoryTypeId="3" PostId="8697" RevisionGUID="50b2edca-1523-41f3-ac9c-f9c1b83ae80a" CreationDate="2023-05-30T15:40:31.597" UserId="4285" Text="|polkadot|api|javascript|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34152" PostHistoryTypeId="2" PostId="8698" RevisionGUID="b7ef8b9a-27b3-4150-8de7-eb51245c55de" CreationDate="2023-05-30T17:39:58.267" UserId="165" Text="Per my understanding,&#xD;&#xA;&#xD;&#xA;The transaction pool doesn't know much about the extrinsics, pretty much they are opaque for the pool. But the runtime comes to save the day.&#xD;&#xA;&#xD;&#xA;`Extra` is part of the extrinsic itself already, from the beginning - [`UncheckedExtrinsic`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/primitives/runtime/src/generic/unchecked_extrinsic.rs#L46-L56).&#xD;&#xA;&#xD;&#xA;As you very well mention the node will call into the runtime to to perform the necessary checks and validations for the extrinsics. Being one of the first operations checking the extrinsic  - [impl for `UncheckedExtrinsic`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/primitives/runtime/src/generic/unchecked_extrinsic.rs#L139).&#xD;&#xA;&#xD;&#xA;After that the relevant `dispatch_info` will be retrieved and eventually the, now `CheckedExtrinsic`, will be validated - impl for [`CheckedExtrinsic`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/primitives/runtime/src/generic/checked_extrinsic.rs#L52-L67), and here is where those `SignedExtension`s from `Extra` are validated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The source of the steps I have described can be found [here](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/frame/executive/src/lib.rs#L615).&#xD;&#xA;&#xD;&#xA;I don't know if this will actually solve your questions or maybe it was to broad." ContentLicense="CC BY-SA 4.0" />
  <row Id="34154" PostHistoryTypeId="5" PostId="8698" RevisionGUID="28ae6ac2-c76c-48f0-b85d-37aa25fc00c5" CreationDate="2023-05-30T18:24:14.653" UserId="165" Comment="adding a clarification" Text="Per my understanding,&#xD;&#xA;&#xD;&#xA;The transaction pool doesn't know much about the extrinsics, pretty much they are opaque for the pool. But the runtime comes to save the day. `TaggedTransactionQueue` runtime API will end up calling to `pallet_executive`, which will take care of [orchestrating the whole validation][1]. - impl of [`TaggedTransactionQueue`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/bin/node/runtime/src/lib.rs#L2111-L2119) for a runtime.&#xD;&#xA;&#xD;&#xA;`Extra` is part of the extrinsic itself already, from the beginning - [`UncheckedExtrinsic`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/primitives/runtime/src/generic/unchecked_extrinsic.rs#L46-L56).&#xD;&#xA;&#xD;&#xA;As you very well mention the node will call into the runtime to to perform the necessary checks and validations for the extrinsics. Being one of the first operations checking the extrinsic  - [impl for `UncheckedExtrinsic`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/primitives/runtime/src/generic/unchecked_extrinsic.rs#L139).&#xD;&#xA;&#xD;&#xA;After that the relevant `dispatch_info` will be retrieved and eventually the, now `CheckedExtrinsic`, will be validated - impl for [`CheckedExtrinsic`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/primitives/runtime/src/generic/checked_extrinsic.rs#L52-L67), and here is where those `SignedExtension`s from `Extra` are validated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The source of the steps I have described can be found [here](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/frame/executive/src/lib.rs#L615).&#xD;&#xA;&#xD;&#xA;I don't know if this will actually solve your questions or maybe it was to broad.&#xD;&#xA;&#xD;&#xA;EDIT: Adding a clarification&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/frame/executive/src/lib.rs#L615" ContentLicense="CC BY-SA 4.0" />
  <row Id="34155" PostHistoryTypeId="2" PostId="8699" RevisionGUID="bf6098f4-feaa-40d4-b872-04b49507ec69" CreationDate="2023-05-30T18:39:33.997" UserId="165" Text="Have into account that the whole communication model around XCM is [asynchronous][1], so from the PoV of parachain A sending a message to parachain B, most likely all its responsibility and all it should be concerned about is that this concrete message is sent, it doesn't really care about the outcomes of executing said message at destination.&#xD;&#xA;&#xD;&#xA;XCVM allows to check the status of a certain transaction or report it, but in the above scenario how the state of parachain A advances its completely independent to what is happening on parachain B.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/xcm-format#11-xcm-communication-model" ContentLicense="CC BY-SA 4.0" />
  <row Id="34157" PostHistoryTypeId="5" PostId="8698" RevisionGUID="b087ca7e-d990-4245-8d71-43af81b2a110" CreationDate="2023-05-30T18:52:07.807" UserId="165" Comment="added 229 characters in body" Text="Per my understanding,&#xD;&#xA;&#xD;&#xA;The transaction pool doesn't know much about the extrinsics, pretty much they are opaque for the pool. But the runtime comes to save the day. `TaggedTransactionQueue` runtime API will end up calling to `pallet_executive`, which will take care of [orchestrating the whole validation][1]. - impl of [`TaggedTransactionQueue`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/bin/node/runtime/src/lib.rs#L2111-L2119) for a runtime.&#xD;&#xA;&#xD;&#xA;`Extra` is part of the extrinsic itself already, from the beginning - [`UncheckedExtrinsic`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/primitives/runtime/src/generic/unchecked_extrinsic.rs#L46-L56).&#xD;&#xA;&#xD;&#xA;As you very well mention the node will call into the runtime to to perform the necessary checks and validations for the extrinsics. Being one of the first operations checking the extrinsic  - [impl for `UncheckedExtrinsic`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/primitives/runtime/src/generic/unchecked_extrinsic.rs#L139).&#xD;&#xA;&#xD;&#xA;After that the relevant `dispatch_info` will be retrieved and eventually the, now `CheckedExtrinsic`, will be validated - impl for [`CheckedExtrinsic`](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/primitives/runtime/src/generic/checked_extrinsic.rs#L52-L67), and here is where those `SignedExtension`s from `Extra` are validated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The source of the steps I have described can be found [here](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/frame/executive/src/lib.rs#L615).&#xD;&#xA;And, for reference, you can see here how an Extrinsic is built, embedding `Extra` in it - [build()](https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/test-utils/runtime/src/extrinsic.rs#L191)&#xD;&#xA;&#xD;&#xA;I don't know if this will actually solve your questions or maybe it was to broad.&#xD;&#xA;&#xD;&#xA;EDIT: Adding a clarification&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/252156d9006ee45eda09ab80f687c066f2f4eaac/frame/executive/src/lib.rs#L615" ContentLicense="CC BY-SA 4.0" />
  <row Id="34158" PostHistoryTypeId="2" PostId="8700" RevisionGUID="af2f826b-587b-49da-b0c5-b630bbe4d4bb" CreationDate="2023-05-30T19:33:56.693" UserId="3850" Text="When I call the pallet extrinsic [bond_and_stake](https://github.com/ok-Alice/astar-frame/blob/main/frame/nomination-pool-staking/src/pallet/mod.rs#LL206C31-L206C31), the [Event](https://github.com/ok-Alice/astar-frame/blob/main/frame/nomination-pool-staking/src/pallet/mod.rs#L215) `BondAndStake` gets triggered. But when I call it through the [chain extension method](https://github.com/ok-Alice/astar-frame/blob/main/chain-extensions/nomination-pool-staking/src/lib.rs#L75-L101) from my [ink smart contract message](https://github.com/ok-Alice/liquid-staking/blob/main/contracts/issuer_staker/src/lib.rs#L100-L115), the event does not trigger, which leads me to believe that it didn't reach the pallet extrinsic function." ContentLicense="CC BY-SA 4.0" />
  <row Id="34160" PostHistoryTypeId="1" PostId="8700" RevisionGUID="af2f826b-587b-49da-b0c5-b630bbe4d4bb" CreationDate="2023-05-30T19:33:56.693" UserId="3850" Text="Pallet extrinsic event not triggering when called through chain extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="34161" PostHistoryTypeId="3" PostId="8700" RevisionGUID="af2f826b-587b-49da-b0c5-b630bbe4d4bb" CreationDate="2023-05-30T19:33:56.693" UserId="3850" Text="|ink|pallet|parachain|events|chain-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34162" PostHistoryTypeId="52" PostId="8693" RevisionGUID="3f785b26-3775-4002-8661-3acc81374adb" CreationDate="2023-05-30T20:11:28.277" />
  <row Id="34163" PostHistoryTypeId="2" PostId="8701" RevisionGUID="0b692675-ceea-4fe1-bdde-d1e84264abc0" CreationDate="2023-05-30T21:43:32.230" UserId="4287" Text="I was exploring GRANDPA verification algorithm and stumbled upon this code by the link &#xD;&#xA;https://github.com/paritytech/finality-grandpa/blame/master/src/lib.rs#L494&#xD;&#xA;&#xD;&#xA;# Source&#xD;&#xA;&#xD;&#xA;This is part of method `validate_commit` which verifies that GRANDPA finalized correctly a block given particular voter set. The usage of `equivocated` set is not completely clear to me. It is used only in this part of the method.&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;let mut equivocated = std::collections::BTreeSet::new();&#xD;&#xA;&#xD;&#xA;	// add all precommits to the round with correct counting logic&#xD;&#xA;	let mut round = round::Round::new(round::RoundParams {&#xD;&#xA;		round_number: 0, // doesn't matter here.&#xD;&#xA;		voters: voters.clone(),&#xD;&#xA;		base,&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;	for SignedPrecommit { precommit, id, signature } in &amp;valid_precommits {&#xD;&#xA;		match round.import_precommit(chain, precommit.clone(), id.clone(), signature.clone())? {&#xD;&#xA;			ImportResult { equivocation: Some(_), .. } =&gt; {&#xD;&#xA;				validation_result.num_equivocations += 1;&#xD;&#xA;				// allow only one equivocation per voter, as extras are redundant.&#xD;&#xA;				if !equivocated.insert(id) {&#xD;&#xA;					return Ok(validation_result)&#xD;&#xA;				}&#xD;&#xA;			},&#xD;&#xA;			ImportResult { duplicated, .. } =&gt;&#xD;&#xA;				if duplicated {&#xD;&#xA;					validation_result.num_duplicated_precommits += 1;&#xD;&#xA;				},&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**This is how I understand this code:**&#xD;&#xA; 1. We detect equivocations and duplicates in `round.import_precommit(...)`.&#xD;&#xA; 2. We register the detected equivocations in `equivocated` set by adding `id` of the voter there.&#xD;&#xA; 3. If it's only first time we observe this voter equivocating — we continue.&#xD;&#xA; 4. If we've already seen the voter equivocating — we return.&#xD;&#xA;&#xD;&#xA; `validation_result.valid` is `false` in this case (default value).&#xD;&#xA; &#xD;&#xA; 5. If we detect duplicates, they don't affect validity status.&#xD;&#xA;&#xD;&#xA; 6. In the end, validity status is set to `true` if we computed valid GHOST.&#xD;&#xA;&#xD;&#xA;So, `validate_commit` still can succeed even in presence of equivocations.&#xD;&#xA;&#xD;&#xA;# Questions&#xD;&#xA;&#xD;&#xA;I've scanned GRANDPA docs, whitepaper at W3F website and GitHub issues but couldn't find anything about tolerance to equivocations. Please, could anyone clarify it to me?&#xD;&#xA;&#xD;&#xA;**Are the following statements correct?**&#xD;&#xA; 1. The method `validate_commit` is intended to be used in a light client.&#xD;&#xA; 2. Successful status of `validate_commit`, i.e. `CommitValidationResult::valid == true`, means that the header containing it CAN be accepted and update the light client.&#xD;&#xA; 3. Failed status of `validate_commit`, i.e. `CommitValidationResult::valid == false`, means that the header containing this proof MUST NOT be accepted.&#xD;&#xA; 4. Equivocations are forbidden in any amount, all voters from `equivocated` set must be slashed.&#xD;&#xA; 5. Equivocations don't make the proof invalid by themselves.&#xD;&#xA; 6. Finality proof SHOULD contain equivocations if there been any. This &quot;seals&quot; fact of misbehaviour into the blockchain.&#xD;&#xA; 7. Finality proof MUST NOT contain more than 1 equivocation for a voter, this is important because we don't want to bloat the proofs.&#xD;&#xA;&#xD;&#xA;Probably, all of the above is correct, or none of it.&#xD;&#xA;&#xD;&#xA;**Please, make it clear!**" ContentLicense="CC BY-SA 4.0" />
  <row Id="34165" PostHistoryTypeId="1" PostId="8701" RevisionGUID="0b692675-ceea-4fe1-bdde-d1e84264abc0" CreationDate="2023-05-30T21:43:32.230" UserId="4287" Text="GRANDPA finality proofs validation and equivocations" ContentLicense="CC BY-SA 4.0" />
  <row Id="34166" PostHistoryTypeId="3" PostId="8701" RevisionGUID="0b692675-ceea-4fe1-bdde-d1e84264abc0" CreationDate="2023-05-30T21:43:32.230" UserId="4287" Text="|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34167" PostHistoryTypeId="5" PostId="8701" RevisionGUID="e52fe376-98a1-4aab-92c8-b3bc6ec4426b" CreationDate="2023-05-30T21:49:17.350" UserId="4287" Comment="wording" Text="I was exploring GRANDPA verification algorithm and stumbled upon this code by the link &#xD;&#xA;https://github.com/paritytech/finality-grandpa/blame/master/src/lib.rs#L494&#xD;&#xA;&#xD;&#xA;# Source&#xD;&#xA;&#xD;&#xA;This is the part of method `validate_commit` which verifies that GRANDPA finalized correctly a block given particular voter set. The usage of `equivocated` set is not completely clear to me. It is used only in this part of the method.&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;let mut equivocated = std::collections::BTreeSet::new();&#xD;&#xA;&#xD;&#xA;	// add all precommits to the round with correct counting logic&#xD;&#xA;	let mut round = round::Round::new(round::RoundParams {&#xD;&#xA;		round_number: 0, // doesn't matter here.&#xD;&#xA;		voters: voters.clone(),&#xD;&#xA;		base,&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;	for SignedPrecommit { precommit, id, signature } in &amp;valid_precommits {&#xD;&#xA;		match round.import_precommit(chain, precommit.clone(), id.clone(), signature.clone())? {&#xD;&#xA;			ImportResult { equivocation: Some(_), .. } =&gt; {&#xD;&#xA;				validation_result.num_equivocations += 1;&#xD;&#xA;				// allow only one equivocation per voter, as extras are redundant.&#xD;&#xA;				if !equivocated.insert(id) {&#xD;&#xA;					return Ok(validation_result)&#xD;&#xA;				}&#xD;&#xA;			},&#xD;&#xA;			ImportResult { duplicated, .. } =&gt;&#xD;&#xA;				if duplicated {&#xD;&#xA;					validation_result.num_duplicated_precommits += 1;&#xD;&#xA;				},&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**This is how I understand this code:**&#xD;&#xA; 1. We detect equivocations and duplicates in `round.import_precommit(...)`.&#xD;&#xA; 2. We register the detected equivocations in `equivocated` set by adding `id` of the voter there.&#xD;&#xA; 3. If it's only first time we observe this voter equivocating — we continue.&#xD;&#xA; 4. If we've already seen the voter equivocating — we return.&#xD;&#xA;&#xD;&#xA; `validation_result.valid` is `false` in this case (default value).&#xD;&#xA; &#xD;&#xA; 5. If we detect duplicates, they don't affect validity status.&#xD;&#xA;&#xD;&#xA; 6. In the end, validity status is set to `true` if we computed valid GHOST.&#xD;&#xA;&#xD;&#xA;So, `validate_commit` still can succeed even in presence of equivocations.&#xD;&#xA;&#xD;&#xA;# Questions&#xD;&#xA;&#xD;&#xA;I've scanned GRANDPA docs, W3F website and GitHub issues but couldn't find anything about tolerance to equivocations. Please, could anyone clarify it to me?&#xD;&#xA;&#xD;&#xA;**Are the following statements correct?**&#xD;&#xA; 1. The method `validate_commit` is intended to be used in a light client.&#xD;&#xA; 2. Successful status of `validate_commit`, i.e. `CommitValidationResult::valid == true`, means that the header containing it CAN be accepted and update the light client.&#xD;&#xA; 3. Failed status of `validate_commit`, i.e. `CommitValidationResult::valid == false`, means that the header containing this proof MUST NOT be accepted.&#xD;&#xA; 4. Equivocations are forbidden in any amount, all voters from `equivocated` set must get slashed.&#xD;&#xA; 5. Equivocations don't make the finality proof invalid.&#xD;&#xA; 6. Finality proof SHOULD contain equivocations if there been any. This &quot;seals&quot; fact of misbehaviour into the blockchain.&#xD;&#xA; 7. Finality proof MUST NOT contain more than 1 equivocation for a voter, this is important because we don't want to bloat the proofs.&#xD;&#xA;&#xD;&#xA;Probably, all of the above is correct, or none of it.&#xD;&#xA;&#xD;&#xA;**Please, make it clear!**" ContentLicense="CC BY-SA 4.0" />
  <row Id="34168" PostHistoryTypeId="2" PostId="8702" RevisionGUID="38da61b9-832f-4e48-aeb8-a13d0464b902" CreationDate="2023-05-30T21:54:43.420" UserId="3850" Text="The problem was fixed by changing the parameter in the `build` method to `0x10001`. The indexes of the chain extension and function id were not correct." ContentLicense="CC BY-SA 4.0" />
  <row Id="34170" PostHistoryTypeId="2" PostId="8703" RevisionGUID="8f709507-d2fd-448a-be12-06b843d4167f" CreationDate="2023-05-31T03:29:15.007" UserId="3947" Text="Something like following can be tried out:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const { ApiPromise, Keyring } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;// Create a custom type registry  &#xD;&#xA;&#xD;&#xA;const types = {&#xD;&#xA;  CheckAccount: {&#xD;&#xA;    timestamp: 'u64',&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;// Create the api instance with the custom type registry  &#xD;&#xA;&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;  provider: wsProvider,&#xD;&#xA;  types,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;// Create a wrapper function for the transfer transaction  &#xD;&#xA;&#xD;&#xA;const transferWithTimestamp = async (from, to, amount) =&gt; {&#xD;&#xA;  const transaction = api.tx.balances.transfer(to, amount);&#xD;&#xA;&#xD;&#xA;  // Get the current timestamp  &#xD;&#xA;  const timestamp = Date.now();&#xD;&#xA;&#xD;&#xA;  // Set the timestamp in the transaction payload  &#xD;&#xA;  const payload = {&#xD;&#xA;    CheckAccount: {&#xD;&#xA;      timestamp,&#xD;&#xA;    },&#xD;&#xA;  };&#xD;&#xA;&#xD;&#xA;  // Sign and send the transaction with the payload  &#xD;&#xA;  await transaction.signAndSend(from, { payload });&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;// Use the wrapper function to perform the transfer with the timestamp&#xD;&#xA;transferWithTimestamp(alice, bob, 1000);&#xD;&#xA;```&#xD;&#xA;here  `timestamp = Date.now()` is evaluated every time and passed in without need to enter manually &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34172" PostHistoryTypeId="10" PostId="8696" RevisionGUID="569971ce-f82d-4118-8dce-4be5daba0385" CreationDate="2023-05-31T04:36:39.090" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[2874],&quot;Voters&quot;:[{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Alejandro Martínez&quot;},{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="34173" PostHistoryTypeId="2" PostId="8704" RevisionGUID="5ff1e9c8-89ad-424e-81f4-7cdc23787479" CreationDate="2023-05-31T05:26:07.887" UserId="2372" Text="I'm sending one XCM message from one chain to another through Bridge. But i'm facing one issue for receiving the message.&#xD;&#xA;&#xD;&#xA;    023-05-31 10:40:30.010 TRACE tokio-runtime-worker runtime::bridge-messages: Cannot dispatch any more messages on lane [0, 0, 0, 0]. Weight: declared=Weight(ref_time: 4000000000, proof_size: 262144), left=Weight(ref_time: 0, proof_size: 0)    &#xD;&#xA;    2023-05-31 10:40:30.010 TRACE tokio-runtime-worker runtime::bridge-messages: Received messages: total=1, valid=0. Weight used: Weight(ref_time: 365960000, proof_size: 123455)/Weight(ref_time: 365960000, proof_size: 123455)    &#xD;&#xA;    2023-05-31 10:40:30.010 TRACE tokio-runtime-worker run\&#xD;&#xA;&#xD;&#xA;The function which execute in receiving is this&#xD;&#xA;&#xD;&#xA;    pub fn receive_messages_proof(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			relayer_id_at_bridged_chain: T::InboundRelayer,&#xD;&#xA;    			proof: MessagesProofOf&lt;T, I&gt;,&#xD;&#xA;    			messages_count: u32,&#xD;&#xA;    			dispatch_weight: Weight,&#xD;&#xA;    		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    			ensure_not_halted::&lt;T, I&gt;()?;&#xD;&#xA;    			let relayer_id_at_this_chain = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// reject transactions that are declaring too many messages&#xD;&#xA;    			ensure!(&#xD;&#xA;    				MessageNonce::from(messages_count) &lt;= T::MaxUnconfirmedMessagesAtInboundLane::get(),&#xD;&#xA;    				Error::&lt;T, I&gt;::TooManyMessagesInTheProof&#xD;&#xA;    			);&#xD;&#xA;    &#xD;&#xA;    		&#xD;&#xA;    			let declared_weight = T::WeightInfo::receive_messages_proof_weight(&#xD;&#xA;    				&amp;proof,&#xD;&#xA;    				messages_count,&#xD;&#xA;    				dispatch_weight,&#xD;&#xA;    			);&#xD;&#xA;    			let mut actual_weight = declared_weight;&#xD;&#xA;    &#xD;&#xA;    			// verify messages proof &amp;&amp; convert proof into messages&#xD;&#xA;    			let messages = verify_and_decode_messages_proof::&lt;&#xD;&#xA;    				T::SourceHeaderChain,&#xD;&#xA;    				T::InboundMessageFee,&#xD;&#xA;    				T::InboundPayload,&#xD;&#xA;    			&gt;(proof, messages_count)&#xD;&#xA;    			.map_err(|err| {&#xD;&#xA;    				log::trace!(&#xD;&#xA;    					target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    					&quot;Rejecting invalid messages proof: {:?}&quot;,&#xD;&#xA;    					err,&#xD;&#xA;    				);&#xD;&#xA;    &#xD;&#xA;    				Error::&lt;T, I&gt;::InvalidMessagesProof&#xD;&#xA;    			})?;&#xD;&#xA;    &#xD;&#xA;    			// dispatch messages and (optionally) update lane(s) state(s)&#xD;&#xA;    			let mut total_messages = 0;&#xD;&#xA;    			let mut valid_messages = 0;&#xD;&#xA;    			let mut dispatch_weight_left = dispatch_weight;&#xD;&#xA;    			for (lane_id, lane_data) in messages {&#xD;&#xA;    				let mut lane = inbound_lane::&lt;T, I&gt;(lane_id);&#xD;&#xA;    &#xD;&#xA;    				if let Some(lane_state) = lane_data.lane_state {&#xD;&#xA;    					let updated_latest_confirmed_nonce = lane.receive_state_update(lane_state);&#xD;&#xA;    					if let Some(updated_latest_confirmed_nonce) = updated_latest_confirmed_nonce {&#xD;&#xA;    						log::trace!(&#xD;&#xA;    							target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    							&quot;Received lane {:?} state update: latest_confirmed_nonce={}&quot;,&#xD;&#xA;    							lane_id,&#xD;&#xA;    							updated_latest_confirmed_nonce,&#xD;&#xA;    						);&#xD;&#xA;    					}&#xD;&#xA;    				}&#xD;&#xA;    &#xD;&#xA;    				for mut message in lane_data.messages {&#xD;&#xA;    					debug_assert_eq!(message.key.lane_id, lane_id);&#xD;&#xA;    					total_messages += 1;&#xD;&#xA;    &#xD;&#xA;    					// ensure that relayer has declared enough weight for dispatching next message&#xD;&#xA;    					// on this lane. We can't dispatch lane messages out-of-order, so if declared&#xD;&#xA;    					// weight is not enough, let's move to next lane&#xD;&#xA;    					let dispatch_weight = T::MessageDispatch::dispatch_weight(&amp;mut message);&#xD;&#xA;    					if dispatch_weight.any_gt(dispatch_weight_left ){&#xD;&#xA;    						log::trace!(&#xD;&#xA;    							target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    							&quot;Cannot dispatch any more messages on lane {:?}. Weight: declared={}, left={}&quot;,&#xD;&#xA;    							lane_id,&#xD;&#xA;    							dispatch_weight,&#xD;&#xA;    							dispatch_weight_left,&#xD;&#xA;    						);&#xD;&#xA;    						break&#xD;&#xA;    					}&#xD;&#xA;    					total_messages += 1;&#xD;&#xA;    &#xD;&#xA;    					let receival_result = lane.receive_message::&lt;T::MessageDispatch, T::AccountId&gt;(&#xD;&#xA;    						&amp;relayer_id_at_bridged_chain,&#xD;&#xA;    						&amp;relayer_id_at_this_chain,&#xD;&#xA;    						message.key.nonce,&#xD;&#xA;    						message.data,&#xD;&#xA;    					);&#xD;&#xA;    &#xD;&#xA;    				&#xD;&#xA;    					let (unspent_weight, refund_pay_dispatch_fee) = match receival_result {&#xD;&#xA;    						ReceivalResult::Dispatched(dispatch_result) =&gt; {&#xD;&#xA;    							valid_messages += 1;&#xD;&#xA;    							(&#xD;&#xA;    								dispatch_result.unspent_weight,&#xD;&#xA;    								!dispatch_result.dispatch_fee_paid_during_dispatch,&#xD;&#xA;    							)&#xD;&#xA;    						},&#xD;&#xA;    						ReceivalResult::InvalidNonce |&#xD;&#xA;    						ReceivalResult::TooManyUnrewardedRelayers |&#xD;&#xA;    						ReceivalResult::TooManyUnconfirmedMessages =&gt; (dispatch_weight, true),&#xD;&#xA;    					};&#xD;&#xA;    &#xD;&#xA;    					let unspent_weight = unspent_weight.min(dispatch_weight);&#xD;&#xA;    					dispatch_weight_left -= dispatch_weight - unspent_weight;&#xD;&#xA;    					actual_weight = actual_weight.saturating_sub(unspent_weight).saturating_sub(&#xD;&#xA;    					// 	// delivery call weight formula assumes that the fee is paid at&#xD;&#xA;    					// 	// this (target) chain. If the message is prepaid at the source&#xD;&#xA;    					// 	// chain, let's refund relayer with this extra cost.&#xD;&#xA;    					if refund_pay_dispatch_fee {&#xD;&#xA;    						T::WeightInfo::pay_inbound_dispatch_fee_overhead()&#xD;&#xA;    					} else {&#xD;&#xA;    						Weight::zero()&#xD;&#xA;    					},&#xD;&#xA;    				);&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			log::trace!(&#xD;&#xA;    				target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    				&quot;Received messages: total={}, valid={}. Weight used: {}/{}&quot;,&#xD;&#xA;    				total_messages,&#xD;&#xA;    				valid_messages,&#xD;&#xA;    				actual_weight,&#xD;&#xA;    				declared_weight,&#xD;&#xA;    			);&#xD;&#xA;    &#xD;&#xA;    			Ok(PostDispatchInfo { actual_weight: Some(actual_weight), pays_fee: Pays::Yes })&#xD;&#xA;    		}&#xD;&#xA;&#xD;&#xA;On sending message i'm getting this log&#xD;&#xA;&#xD;&#xA;    2023-05-31 10:40:12.011 TRACE tokio-runtime-worker runtime::bridge-messages: T::OnMessageAccepted callback has spent less weight than expected. Refunding: Weight(ref_time: 125000000, proof_size: 0) - Weight(ref_time: 0, proof_size: 0) = Weight(ref_time: 125000000, proof_size: 0)    &#xD;&#xA;    2023-05-31 10:40:12.011 TRACE tokio-runtime-worker runtime::bridge-messages: Accepted message 1 to lane [0, 0, 0, 0]. Message size: 87    &#xD;&#xA;    2023-05-31 10:40:12.011 DEBUG tokio-runtime-worker runtime::bridge: Sent XCM message [0, 0, 0, 0]/1 to [112, 101, 101, 114]: [167, 96, 230, 244, 244, 220, 186, 46, 0, 142, 206, 231, 18, 60, 1, 107, 131, 115, 253, 63, 45, 38, 187, 97, 175, 149, 137, 34, 34, 220, 141, 64]  &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34175" PostHistoryTypeId="1" PostId="8704" RevisionGUID="5ff1e9c8-89ad-424e-81f4-7cdc23787479" CreationDate="2023-05-31T05:26:07.887" UserId="2372" Text="Cannot dispatch any more messages on lane [0, 0, 0, 0]" ContentLicense="CC BY-SA 4.0" />
  <row Id="34176" PostHistoryTypeId="3" PostId="8704" RevisionGUID="5ff1e9c8-89ad-424e-81f4-7cdc23787479" CreationDate="2023-05-31T05:26:07.887" UserId="2372" Text="|substrate-node-template|xcm|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34177" PostHistoryTypeId="5" PostId="8704" RevisionGUID="53aff42e-29b9-4d54-8568-2c440adfaac2" CreationDate="2023-05-31T06:04:11.447" UserId="2281" Comment="added 40 characters in body" Text="I'm sending one XCM message from one chain to another through Bridge. But i'm facing one issue for receiving the message.&#xD;&#xA;```json&#xD;&#xA;&#xD;&#xA;    023-05-31 10:40:30.010 TRACE tokio-runtime-worker runtime::bridge-messages: Cannot dispatch any more messages on lane [0, 0, 0, 0]. Weight: declared=Weight(ref_time: 4000000000, proof_size: 262144), left=Weight(ref_time: 0, proof_size: 0)    &#xD;&#xA;    2023-05-31 10:40:30.010 TRACE tokio-runtime-worker runtime::bridge-messages: Received messages: total=1, valid=0. Weight used: Weight(ref_time: 365960000, proof_size: 123455)/Weight(ref_time: 365960000, proof_size: 123455)    &#xD;&#xA;    2023-05-31 10:40:30.010 TRACE tokio-runtime-worker run\&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The function which execute in receiving is this&#xD;&#xA;```rs&#xD;&#xA;&#xD;&#xA;    pub fn receive_messages_proof(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			relayer_id_at_bridged_chain: T::InboundRelayer,&#xD;&#xA;    			proof: MessagesProofOf&lt;T, I&gt;,&#xD;&#xA;    			messages_count: u32,&#xD;&#xA;    			dispatch_weight: Weight,&#xD;&#xA;    		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    			ensure_not_halted::&lt;T, I&gt;()?;&#xD;&#xA;    			let relayer_id_at_this_chain = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// reject transactions that are declaring too many messages&#xD;&#xA;    			ensure!(&#xD;&#xA;    				MessageNonce::from(messages_count) &lt;= T::MaxUnconfirmedMessagesAtInboundLane::get(),&#xD;&#xA;    				Error::&lt;T, I&gt;::TooManyMessagesInTheProof&#xD;&#xA;    			);&#xD;&#xA;    &#xD;&#xA;    		&#xD;&#xA;    			let declared_weight = T::WeightInfo::receive_messages_proof_weight(&#xD;&#xA;    				&amp;proof,&#xD;&#xA;    				messages_count,&#xD;&#xA;    				dispatch_weight,&#xD;&#xA;    			);&#xD;&#xA;    			let mut actual_weight = declared_weight;&#xD;&#xA;    &#xD;&#xA;    			// verify messages proof &amp;&amp; convert proof into messages&#xD;&#xA;    			let messages = verify_and_decode_messages_proof::&lt;&#xD;&#xA;    				T::SourceHeaderChain,&#xD;&#xA;    				T::InboundMessageFee,&#xD;&#xA;    				T::InboundPayload,&#xD;&#xA;    			&gt;(proof, messages_count)&#xD;&#xA;    			.map_err(|err| {&#xD;&#xA;    				log::trace!(&#xD;&#xA;    					target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    					&quot;Rejecting invalid messages proof: {:?}&quot;,&#xD;&#xA;    					err,&#xD;&#xA;    				);&#xD;&#xA;    &#xD;&#xA;    				Error::&lt;T, I&gt;::InvalidMessagesProof&#xD;&#xA;    			})?;&#xD;&#xA;    &#xD;&#xA;    			// dispatch messages and (optionally) update lane(s) state(s)&#xD;&#xA;    			let mut total_messages = 0;&#xD;&#xA;    			let mut valid_messages = 0;&#xD;&#xA;    			let mut dispatch_weight_left = dispatch_weight;&#xD;&#xA;    			for (lane_id, lane_data) in messages {&#xD;&#xA;    				let mut lane = inbound_lane::&lt;T, I&gt;(lane_id);&#xD;&#xA;    &#xD;&#xA;    				if let Some(lane_state) = lane_data.lane_state {&#xD;&#xA;    					let updated_latest_confirmed_nonce = lane.receive_state_update(lane_state);&#xD;&#xA;    					if let Some(updated_latest_confirmed_nonce) = updated_latest_confirmed_nonce {&#xD;&#xA;    						log::trace!(&#xD;&#xA;    							target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    							&quot;Received lane {:?} state update: latest_confirmed_nonce={}&quot;,&#xD;&#xA;    							lane_id,&#xD;&#xA;    							updated_latest_confirmed_nonce,&#xD;&#xA;    						);&#xD;&#xA;    					}&#xD;&#xA;    				}&#xD;&#xA;    &#xD;&#xA;    				for mut message in lane_data.messages {&#xD;&#xA;    					debug_assert_eq!(message.key.lane_id, lane_id);&#xD;&#xA;    					total_messages += 1;&#xD;&#xA;    &#xD;&#xA;    					// ensure that relayer has declared enough weight for dispatching next message&#xD;&#xA;    					// on this lane. We can't dispatch lane messages out-of-order, so if declared&#xD;&#xA;    					// weight is not enough, let's move to next lane&#xD;&#xA;    					let dispatch_weight = T::MessageDispatch::dispatch_weight(&amp;mut message);&#xD;&#xA;    					if dispatch_weight.any_gt(dispatch_weight_left ){&#xD;&#xA;    						log::trace!(&#xD;&#xA;    							target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    							&quot;Cannot dispatch any more messages on lane {:?}. Weight: declared={}, left={}&quot;,&#xD;&#xA;    							lane_id,&#xD;&#xA;    							dispatch_weight,&#xD;&#xA;    							dispatch_weight_left,&#xD;&#xA;    						);&#xD;&#xA;    						break&#xD;&#xA;    					}&#xD;&#xA;    					total_messages += 1;&#xD;&#xA;    &#xD;&#xA;    					let receival_result = lane.receive_message::&lt;T::MessageDispatch, T::AccountId&gt;(&#xD;&#xA;    						&amp;relayer_id_at_bridged_chain,&#xD;&#xA;    						&amp;relayer_id_at_this_chain,&#xD;&#xA;    						message.key.nonce,&#xD;&#xA;    						message.data,&#xD;&#xA;    					);&#xD;&#xA;    &#xD;&#xA;    				&#xD;&#xA;    					let (unspent_weight, refund_pay_dispatch_fee) = match receival_result {&#xD;&#xA;    						ReceivalResult::Dispatched(dispatch_result) =&gt; {&#xD;&#xA;    							valid_messages += 1;&#xD;&#xA;    							(&#xD;&#xA;    								dispatch_result.unspent_weight,&#xD;&#xA;    								!dispatch_result.dispatch_fee_paid_during_dispatch,&#xD;&#xA;    							)&#xD;&#xA;    						},&#xD;&#xA;    						ReceivalResult::InvalidNonce |&#xD;&#xA;    						ReceivalResult::TooManyUnrewardedRelayers |&#xD;&#xA;    						ReceivalResult::TooManyUnconfirmedMessages =&gt; (dispatch_weight, true),&#xD;&#xA;    					};&#xD;&#xA;    &#xD;&#xA;    					let unspent_weight = unspent_weight.min(dispatch_weight);&#xD;&#xA;    					dispatch_weight_left -= dispatch_weight - unspent_weight;&#xD;&#xA;    					actual_weight = actual_weight.saturating_sub(unspent_weight).saturating_sub(&#xD;&#xA;    					// 	// delivery call weight formula assumes that the fee is paid at&#xD;&#xA;    					// 	// this (target) chain. If the message is prepaid at the source&#xD;&#xA;    					// 	// chain, let's refund relayer with this extra cost.&#xD;&#xA;    					if refund_pay_dispatch_fee {&#xD;&#xA;    						T::WeightInfo::pay_inbound_dispatch_fee_overhead()&#xD;&#xA;    					} else {&#xD;&#xA;    						Weight::zero()&#xD;&#xA;    					},&#xD;&#xA;    				);&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			log::trace!(&#xD;&#xA;    				target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    				&quot;Received messages: total={}, valid={}. Weight used: {}/{}&quot;,&#xD;&#xA;    				total_messages,&#xD;&#xA;    				valid_messages,&#xD;&#xA;    				actual_weight,&#xD;&#xA;    				declared_weight,&#xD;&#xA;    			);&#xD;&#xA;    &#xD;&#xA;    			Ok(PostDispatchInfo { actual_weight: Some(actual_weight), pays_fee: Pays::Yes })&#xD;&#xA;    		}&#xD;&#xA;```&#xD;&#xA;**On sending message i'm getting this log**&#xD;&#xA;```json&#xD;&#xA;    2023-05-31 10:40:12.011 TRACE tokio-runtime-worker runtime::bridge-messages: T::OnMessageAccepted callback has spent less weight than expected. Refunding: Weight(ref_time: 125000000, proof_size: 0) - Weight(ref_time: 0, proof_size: 0) = Weight(ref_time: 125000000, proof_size: 0)    &#xD;&#xA;    2023-05-31 10:40:12.011 TRACE tokio-runtime-worker runtime::bridge-messages: Accepted message 1 to lane [0, 0, 0, 0]. Message size: 87    &#xD;&#xA;    2023-05-31 10:40:12.011 DEBUG tokio-runtime-worker runtime::bridge: Sent XCM message [0, 0, 0, 0]/1 to [112, 101, 101, 114]: [167, 96, 230, 244, 244, 220, 186, 46, 0, 142, 206, 231, 18, 60, 1, 107, 131, 115, 253, 63, 45, 38, 187, 97, 175, 149, 137, 34, 34, 220, 141, 64]  &#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34178" PostHistoryTypeId="5" PostId="8697" RevisionGUID="52644674-dda1-4311-a943-d95ee89f8063" CreationDate="2023-05-31T06:19:17.320" UserId="4285" Comment="added 762 characters in body" Text="For now I have custom `SignedExtension` in my substrate node:&#xD;&#xA;```rust&#xD;&#xA;#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;pub struct CheckAccount&lt;T&gt; {&#xD;&#xA;	timestamp: u64,&#xD;&#xA;	_marker: PhantomData&lt;T&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my polkadot-js-api I define this like so:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let signedExtensions = {&#xD;&#xA;    CheckAccount: {&#xD;&#xA;      extrinsic: {&#xD;&#xA;        timestamp: &quot;u64&quot;,&#xD;&#xA;      },&#xD;&#xA;      payload: {},&#xD;&#xA;    },&#xD;&#xA;  };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;    ...&#xD;&#xA;    SignedExtensions,&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And to perform transaction I have specify extension value manually&#xD;&#xA;```js&#xD;&#xA;api.tx.balances&#xD;&#xA;    .transfer(bob, 1000)&#xD;&#xA;    .signAndSend(alice, { timestamp: Date.now() })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The questing is how can I get behaviour for my custom `SignedExtension`, for example  like `CheckNonce` have, when it automatically initialised with api and don't have to specify it manually? &#xD;&#xA;&#xD;&#xA;**Update**&#xD;&#xA;&#xD;&#xA;I want to get something like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;api.setGetterForSignedExtension(&quot;CheckAccount&quot;, Date.now);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then I just simply can call&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;api.tx.balances&#xD;&#xA;    .transfer(bob, 1000)&#xD;&#xA;    .signAndSend(Alice);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;P.S.&#xD;&#xA;&#xD;&#xA;And if this possible can custom SignedExtension be integrated with polkadot/apps to allow submit extrinsic throw polkadot ui. Now when I try do it got this error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;1002: Verification Error: Runtime error: Execution failed: Runtime panicked: Bad input data provided to validate_transaction: Could not decode `RuntimeCall`, variant doesn't exist: RuntimeApi, Execution failed: Runtime panicked: Bad input data provided to validate_transaction: Could not decode `RuntimeCall`, variant doesn't exist&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34179" PostHistoryTypeId="2" PostId="8705" RevisionGUID="2a50e121-e35f-417f-b3e9-636c8adefbce" CreationDate="2023-05-31T07:29:08.303" UserId="4062" Text="I trying to build permissioned network with Substrate. I don't understand diagram following. Let help me explain it. Thanks.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Hy0G8.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34181" PostHistoryTypeId="1" PostId="8705" RevisionGUID="2a50e121-e35f-417f-b3e9-636c8adefbce" CreationDate="2023-05-31T07:29:08.303" UserId="4062" Text="Permissioned network with Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="34182" PostHistoryTypeId="3" PostId="8705" RevisionGUID="2a50e121-e35f-417f-b3e9-636c8adefbce" CreationDate="2023-05-31T07:29:08.303" UserId="4062" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34183" PostHistoryTypeId="5" PostId="8701" RevisionGUID="a74f5d17-5e48-447d-a5aa-e1254791beb8" CreationDate="2023-05-31T08:11:07.953" UserId="4287" Comment="deleted 21 characters in body" Text="I was exploring GRANDPA verification algorithm and stumbled upon this code by the link &#xD;&#xA;https://github.com/paritytech/finality-grandpa/blame/master/src/lib.rs#L494&#xD;&#xA;&#xD;&#xA;# Source&#xD;&#xA;&#xD;&#xA;This is the part of method `validate_commit` which verifies that GRANDPA finalized correctly a block given particular voter set. The usage of `equivocated` set is not completely clear to me. It is used only in this part of the method.&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;let mut equivocated = std::collections::BTreeSet::new();&#xD;&#xA;&#xD;&#xA;// add all precommits to the round with correct counting logic&#xD;&#xA;let mut round = round::Round::new(round::RoundParams {&#xD;&#xA;	round_number: 0, // doesn't matter here.&#xD;&#xA;	voters: voters.clone(),&#xD;&#xA;	base,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;for SignedPrecommit { precommit, id, signature } in &amp;valid_precommits {&#xD;&#xA;	match round.import_precommit(chain, precommit.clone(), id.clone(), signature.clone())? {&#xD;&#xA;		ImportResult { equivocation: Some(_), .. } =&gt; {&#xD;&#xA;			validation_result.num_equivocations += 1;&#xD;&#xA;			// allow only one equivocation per voter, as extras are redundant.&#xD;&#xA;			if !equivocated.insert(id) {&#xD;&#xA;				return Ok(validation_result)&#xD;&#xA;			}&#xD;&#xA;		},&#xD;&#xA;		ImportResult { duplicated, .. } =&gt;&#xD;&#xA;			if duplicated {&#xD;&#xA;				validation_result.num_duplicated_precommits += 1;&#xD;&#xA;			},&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**This is how I understand this code:**&#xD;&#xA; 1. We detect equivocations and duplicates in `round.import_precommit(...)`.&#xD;&#xA; 2. We register the detected equivocations in `equivocated` set by adding `id` of the voter there.&#xD;&#xA; 3. If it's only first time we observe this voter equivocating — we continue.&#xD;&#xA; 4. If we've already seen the voter equivocating — we return.&#xD;&#xA;&#xD;&#xA; `validation_result.valid` is `false` in this case (default value).&#xD;&#xA; &#xD;&#xA; 5. If we detect duplicates, they don't affect validity status.&#xD;&#xA;&#xD;&#xA; 6. In the end, validity status is set to `true` if we computed valid GHOST.&#xD;&#xA;&#xD;&#xA;So, `validate_commit` still can succeed even in presence of equivocations.&#xD;&#xA;&#xD;&#xA;# Questions&#xD;&#xA;&#xD;&#xA;I've scanned GRANDPA docs, W3F website and GitHub issues but couldn't find anything about tolerance to equivocations. Please, could anyone clarify it to me?&#xD;&#xA;&#xD;&#xA;**Are the following statements correct?**&#xD;&#xA; 1. The method `validate_commit` is intended to be used in a light client.&#xD;&#xA; 2. Successful status of `validate_commit`, i.e. `CommitValidationResult::valid == true`, means that the header containing it CAN be accepted and update the light client.&#xD;&#xA; 3. Failed status of `validate_commit`, i.e. `CommitValidationResult::valid == false`, means that the header containing this proof MUST NOT be accepted.&#xD;&#xA; 4. Equivocations are forbidden in any amount, all voters from `equivocated` set must get slashed.&#xD;&#xA; 5. Equivocations don't make the finality proof invalid.&#xD;&#xA; 6. Finality proof SHOULD contain equivocations if there been any. This &quot;seals&quot; fact of misbehaviour into the blockchain.&#xD;&#xA; 7. Finality proof MUST NOT contain more than 1 equivocation for a voter, this is important because we don't want to bloat the proofs.&#xD;&#xA;&#xD;&#xA;Probably, all of the above is correct, or none of it.&#xD;&#xA;&#xD;&#xA;**Please, make it clear!**" ContentLicense="CC BY-SA 4.0" />
  <row Id="34184" PostHistoryTypeId="2" PostId="8706" RevisionGUID="281ca768-02c6-43df-bef0-7d0470cf6963" CreationDate="2023-05-31T08:51:53.353" UserId="554" Text="I have one storagemap which stores u32 values, now i need to migrate this to ``` Vec&lt;T::AccountId&gt;``` How to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34186" PostHistoryTypeId="1" PostId="8706" RevisionGUID="281ca768-02c6-43df-bef0-7d0470cf6963" CreationDate="2023-05-31T08:51:53.353" UserId="554" Text="Need to migrate u32 to Vec&lt;T::AccountId&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34187" PostHistoryTypeId="3" PostId="8706" RevisionGUID="281ca768-02c6-43df-bef0-7d0470cf6963" CreationDate="2023-05-31T08:51:53.353" UserId="554" Text="|migration|storage-migration|substarte|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34188" PostHistoryTypeId="2" PostId="8707" RevisionGUID="bd672c32-b78a-4c61-b622-51d286881b1d" CreationDate="2023-05-31T08:54:50.810" UserId="2762" Text="A permissioned network is one where only authorized nodes are allowed to perform specific network activities. &#xD;&#xA;&#xD;&#xA;The diagram shows you a network with 4 nodes: Alice and Bob are the nodes predefined in the genesis specification for genesis state which basically means the 2 nodes that will start the network.&#xD;&#xA;&#xD;&#xA;In a permissionless blockchain anyone can join the network by running the node software, but in the case you want to build you have to add a new node as a well-known node. In the diagram Charlie and Dave has been added lately into the network.&#xD;&#xA;&#xD;&#xA;To add these nodes in Substrate is recommended to use the [node-authorization pallet][1].&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&gt; The node-authorization pallet is a prebuilt FRAME pallet that enables&#xD;&#xA;&gt; you to manage a configurable set of nodes for a network.&#xD;&#xA;&#xD;&#xA;For more practical knowledge I suggest you to go and build that network following these tutorials: [Add trusted nodes][2] and [Authorize specific nodes][3].&#xD;&#xA;After this you will understand better the diagram, how to run a network and how to use the node-authorization pallet to add nodes into your network.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/pallet_node_authorization/index.html&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/&#xD;&#xA;  [3]: https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/" ContentLicense="CC BY-SA 4.0" />
  <row Id="34190" PostHistoryTypeId="6" PostId="8706" RevisionGUID="c03065ed-a746-42a2-b30f-fdb49c7993c4" CreationDate="2023-05-31T08:57:35.587" UserId="554" Comment="edited tags" Text="|migration|substrate-node|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34191" PostHistoryTypeId="2" PostId="8708" RevisionGUID="25584496-8385-452d-97fe-ceea52c31303" CreationDate="2023-05-31T09:10:49.760" UserId="3171" Text="polkadot/service/chain_spec.rs&#xD;&#xA;**will override** &#xD;&#xA;&#xD;&#xA;    MILLISECS_PER_BLOCK&#xD;&#xA;&#xD;&#xA;So you do not need change `MILLISECS_PER_BLOCK` directly.&#xD;&#xA;You need to change &#xD;&#xA;&#xD;&#xA;session_length_in_blocks&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;rococo-native&quot;)]&#xD;&#xA;    pub fn rococo_development_config() -&gt; Result&lt;RococoChainSpec, String&gt; {&#xD;&#xA;    	let wasm_binary = rococo::WASM_BINARY.ok_or(&quot;Rococo development wasm not available&quot;)?;&#xD;&#xA;    &#xD;&#xA;        	Ok(RococoChainSpec::from_genesis(&#xD;&#xA;        		&quot;Development&quot;,&#xD;&#xA;        		&quot;rococo_dev&quot;,&#xD;&#xA;        		ChainType::Development,&#xD;&#xA;        		move || RococoGenesisExt {&#xD;&#xA;        			runtime_genesis_config: rococo_development_config_genesis(wasm_binary),&#xD;&#xA;        			// Use 1 minute session length.&#xD;&#xA;        			session_length_in_blocks: Some(10),&#xD;&#xA;        		},&#xD;&#xA;        		vec![],&#xD;&#xA;        		None,&#xD;&#xA;        		Some(DEFAULT_PROTOCOL_ID),&#xD;&#xA;        		None,&#xD;&#xA;        		None,&#xD;&#xA;        		Default::default(),&#xD;&#xA;        	))&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Because the value of `MILLISECS_PER_BLOCK`&#xD;&#xA;will be overided byt this code&#xD;&#xA;&#xD;&#xA;    #[cfg(feature = &quot;rococo-native&quot;)]&#xD;&#xA;    impl sp_runtime::BuildStorage for RococoGenesisExt {&#xD;&#xA;    	fn assimilate_storage(&amp;self, storage: &amp;mut sp_core::storage::Storage) -&gt; Result&lt;(), String&gt; {&#xD;&#xA;    		sp_state_machine::BasicExternalities::execute_with_storage(storage, || {&#xD;&#xA;    			if let Some(length) = self.session_length_in_blocks.as_ref() {&#xD;&#xA;    				rococo_runtime_constants::time::EpochDurationInBlocks::set(&amp;length);&#xD;&#xA;    			}&#xD;&#xA;    		});&#xD;&#xA;    		self.runtime_genesis_config.assimilate_storage(storage)&#xD;&#xA;    	}&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="34193" PostHistoryTypeId="2" PostId="8709" RevisionGUID="ac79493f-da2d-473a-a467-5c15b4c385aa" CreationDate="2023-05-31T10:51:45.117" UserId="515" Text="My pallet has over 1,000 lines of codes so far(already separated implementation of the call functions).&#xD;&#xA;Over 30 call functions which are pretty messy to maintain.&#xD;&#xA;&#xD;&#xA;Should I split them into small pallets and couple them all together?&#xD;&#xA;Should I split the test file and benchmarking as well?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34195" PostHistoryTypeId="1" PostId="8709" RevisionGUID="ac79493f-da2d-473a-a467-5c15b4c385aa" CreationDate="2023-05-31T10:51:45.117" UserId="515" Text="Best Practice for the Structure of a Big Pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="34196" PostHistoryTypeId="3" PostId="8709" RevisionGUID="ac79493f-da2d-473a-a467-5c15b4c385aa" CreationDate="2023-05-31T10:51:45.117" UserId="515" Text="|pallet|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34197" PostHistoryTypeId="2" PostId="8710" RevisionGUID="693ff4b2-1f87-4eb4-8f03-39e39adc9687" CreationDate="2023-05-31T10:53:03.353" UserId="4288" Text="is there any simple example to **send data to network**?&#xD;&#xA;&#xD;&#xA;like name, email, phone, address (which is made keyring), and address, etc" ContentLicense="CC BY-SA 4.0" />
  <row Id="34199" PostHistoryTypeId="1" PostId="8710" RevisionGUID="693ff4b2-1f87-4eb4-8f03-39e39adc9687" CreationDate="2023-05-31T10:53:03.353" UserId="4288" Text="How to send data to custom network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34200" PostHistoryTypeId="3" PostId="8710" RevisionGUID="693ff4b2-1f87-4eb4-8f03-39e39adc9687" CreationDate="2023-05-31T10:53:03.353" UserId="4288" Text="|polkadot-js|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34201" PostHistoryTypeId="2" PostId="8711" RevisionGUID="d32034be-7c15-492a-bd58-28e9b9745af3" CreationDate="2023-05-31T11:07:43.837" UserId="2736" Text="you can check Substrate tutorial on storage migrations: https://docs.substrate.io/reference/how-to-guides/storage-migrations/basic-storage-migration/" ContentLicense="CC BY-SA 4.0" />
  <row Id="34203" PostHistoryTypeId="2" PostId="8712" RevisionGUID="3ba4a6cb-64ab-4f45-976c-3484903fafd3" CreationDate="2023-05-31T13:49:18.613" UserId="2762" Text="In Substrate you have the [pallet identity][1]:&#xD;&#xA;&#xD;&#xA;&gt; Enables a federated naming system that allows multiple registrars to be added from a specified origin. Registrars can set a fee to provide identity-verification service.&#xD;&#xA;&#xD;&#xA;It has an extrinsic [set_identity][2] that associates the identity of an account. (You can see the struct IdentityInfo [here][3]).&#xD;&#xA;&#xD;&#xA;This pallet exists in Polkadot, so you can store data associated to an account there. If you want to do it in your custom network you can integrate that pallet in your network. Take an example about how the Polkadot runtime is configured to use this pallet [here][4].&#xD;&#xA;&#xD;&#xA;And finally as you added the tag `Polkadot-js` in order to set the identity  using this tool: `api.tx.identity.setIdentity`.&#xD;&#xA;&#xD;&#xA;Check the [docs][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/identity/README.md&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/identity/src/lib.rs#L330&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/identity/src/types.rs#L290&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/lib.rs#L626&#xD;&#xA;  [5]: https://polkadot.js.org/docs/substrate/extrinsics/#setidentityinfo-palletidentityidentityinfo" ContentLicense="CC BY-SA 4.0" />
  <row Id="34205" PostHistoryTypeId="2" PostId="8713" RevisionGUID="a5db264e-a273-46ac-ae02-6be56741917d" CreationDate="2023-05-31T14:01:26.683" UserId="2762" Text="I'd suggest to take a look at some of the [FRAME pallets][1].&#xD;&#xA;The [balances pallet][2] is a good example, it has the test file, benchmarking, types and different traits implementations in their own files.&#xD;&#xA;&#xD;&#xA;Take a look into the [nfts-pallet][3], it has more than 30 call functions too, and another example of a even bigger pallet is the [staking pallet][4], where it splits some logic in their own pallets.&#xD;&#xA;&#xD;&#xA;Also I'd like to share with you another interesting resources:&#xD;&#xA;&#xD;&#xA;- [General coding practices from Substrate docs][5].&#xD;&#xA;&#xD;&#xA;- A workshop that was prepared for a hackathon: [Best Practices in Building Substrate Pallets][6]&#xD;&#xA;&#xD;&#xA;That's a good question, I'd love to see other answers with more feedback about best practices building a pallet.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/master/frame&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/balances/README.md&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/nfts/README.md&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/staking/README.md&#xD;&#xA;  [5]: https://docs.substrate.io/build/troubleshoot-your-code/&#xD;&#xA;  [6]: https://www.youtube.com/watch?v=yBEcgKJseTc" ContentLicense="CC BY-SA 4.0" />
  <row Id="34207" PostHistoryTypeId="2" PostId="8714" RevisionGUID="ccbc33d1-8e82-4f54-ada4-87c064c95ac1" CreationDate="2023-05-31T15:07:24.367" UserId="3721" Text="Could help me to understand if there is any special purpose to add a `#[transactional]` attribute to an extrinsic?&#xD;&#xA;&#xD;&#xA;For instance, in `pallet-uniques` there is a call `buy_item` tagged with `frame_support::transactional` attribute: [github.com/parity/substrate/frame/uniques/src/lib.rs#L1526](https://github.com/paritytech/substrate/blob/7a64651e0ec6823cc2773f5b4823f56943d2d076/frame/uniques/src/lib.rs#L1526).&#xD;&#xA;&#xD;&#xA;Aren't all the functions under #[pallet::call] transactional by default?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34209" PostHistoryTypeId="1" PostId="8714" RevisionGUID="ccbc33d1-8e82-4f54-ada4-87c064c95ac1" CreationDate="2023-05-31T15:07:24.367" UserId="3721" Text="Any purpose to add #[transactional] attribute to an extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34210" PostHistoryTypeId="3" PostId="8714" RevisionGUID="ccbc33d1-8e82-4f54-ada4-87c064c95ac1" CreationDate="2023-05-31T15:07:24.367" UserId="3721" Text="|pallet|extrinsic|transactional|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34211" PostHistoryTypeId="5" PostId="8714" RevisionGUID="03ec4d0a-5382-4d9a-bfd4-709b09eddb5d" CreationDate="2023-05-31T15:08:19.753" UserId="3721" Comment="added 2 characters in body" Text="Could help me to understand if there is any special purpose to add a `#[transactional]` attribute to an extrinsic?&#xD;&#xA;&#xD;&#xA;For instance, in `pallet-uniques` there is a call `buy_item` tagged with `frame_support::transactional` attribute: [github.com/parity/substrate/frame/uniques/src/lib.rs#L1526](https://github.com/paritytech/substrate/blob/7a64651e0ec6823cc2773f5b4823f56943d2d076/frame/uniques/src/lib.rs#L1526).&#xD;&#xA;&#xD;&#xA;Aren't all the functions under `#[pallet::call]` transactional by default?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34212" PostHistoryTypeId="2" PostId="8715" RevisionGUID="0f230478-1fe8-4a3e-991f-fc3305c9de01" CreationDate="2023-05-31T16:06:30.643" UserId="2485" Text="I am following this tutorial to get a slot on Kusama https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/. The process of generating WebAssembly runtime file and parachain genesis state file is clear. it is also clear how to participate in auction. Could you please let me know what are the steps after the auction is won and lease has started? is running a collator node the only thing needed or are there other actions needed to be taken, maybe using the account that registered ParaId?&#xD;&#xA;&#xD;&#xA;what are the steps to do if the parachain is not onboarded? I see that at https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains there are parachains in gray although their slot lease has started. Why are they not onboarded how to avoid their issues? Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="34214" PostHistoryTypeId="1" PostId="8715" RevisionGUID="0f230478-1fe8-4a3e-991f-fc3305c9de01" CreationDate="2023-05-31T16:06:30.643" UserId="2485" Text="how to onboard parachain to Kusama after auction" ContentLicense="CC BY-SA 4.0" />
  <row Id="34215" PostHistoryTypeId="3" PostId="8715" RevisionGUID="0f230478-1fe8-4a3e-991f-fc3305c9de01" CreationDate="2023-05-31T16:06:30.643" UserId="2485" Text="|parachain|auctions|lease|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34216" PostHistoryTypeId="5" PostId="8715" RevisionGUID="3ff3e3a8-8ef6-498c-aa65-899a6b24633b" CreationDate="2023-05-31T17:53:21.823" UserId="354" Comment="added 6 characters in body" Text="I am following this tutorial to get a slot on Kusama https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/. The process of generating `WebAssembly runtime` file and `parachain genesis state` file is clear. it is also clear how to participate in auction. Could you please let me know what are the steps after the auction is won and lease has started? is running a `collator node` the only thing needed or are there other actions needed to be taken, maybe using the account that registered ParaId?&#xD;&#xA;&#xD;&#xA;what are the steps to do if the parachain is not onboarded? I see that at https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains there are parachains in gray although their slot lease has started. Why are they not onboarded how to avoid their issues? Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="34217" PostHistoryTypeId="52" PostId="8709" RevisionGUID="bab47ff7-6604-4057-a161-a278e533f40f" CreationDate="2023-05-31T18:54:27.333" />
  <row Id="34218" PostHistoryTypeId="50" PostId="8315" RevisionGUID="854f1fdf-edd1-4dd1-9029-b95cce4d64c8" CreationDate="2023-05-31T19:07:20.933" UserId="-1" />
  <row Id="34219" PostHistoryTypeId="2" PostId="8716" RevisionGUID="44d00cda-6c38-4c82-af07-f163ad4be89f" CreationDate="2023-05-31T21:21:13.150" UserId="251" Text="I think that's a history code.&#xD;&#xA;&#xD;&#xA;All the calls are transactional by default in the latest Substrate version." ContentLicense="CC BY-SA 4.0" />
  <row Id="34221" PostHistoryTypeId="2" PostId="8717" RevisionGUID="5fb95a8a-f57e-4579-ad72-e06787675bf5" CreationDate="2023-05-31T21:29:34.180" UserId="251" Text="You can check how Substrate migrates the account references.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/pull/8221/files#diff-68096a50d12854e07693a4828590517bb81fea37a9253640278ecdc5b93b6992&#xD;&#xA;&#xD;&#xA;The link shows you how to migrate.&#xD;&#xA;&#xD;&#xA;And for your case:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;YourMap::&lt;T&gt;::translate(|_key, old_u32_value|&#xD;&#xA;	// This is just an example, put your `u32 -&gt; Vec&lt;AccountId&gt;` logic here&#xD;&#xA;	Some(vec![AccountId::from_u32(old_u32_value)])&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34223" PostHistoryTypeId="2" PostId="8718" RevisionGUID="31bae05f-cc7b-4920-85d6-e4b54291c187" CreationDate="2023-05-31T23:02:25.777" UserId="3346" Text="**My question is: what is the best way to specify bootnodes for substrate-connect, inside the JS application, in this situation?**&#xD;&#xA;&#xD;&#xA;We are integrating substrate-connect into a JS application that uses the Polkadot-JS API. I understand from these docs: https://docs.substrate.io/learn/light-clients-in-substrate-connect/ that the code for integrating substrate-connect into such an application looks like this:&#xD;&#xA;&#xD;&#xA;    import { ScProvider } from &quot;@polkadot/rpc-provider/substrate-connect&quot;;&#xD;&#xA;    import { ApiPromise } from &quot;@polkadot/api&quot;;&#xD;&#xA;    import jsonCustomSpec from &quot;./MyChainSpec.json&quot;;&#xD;&#xA;    // Create the provider for the custom chain&#xD;&#xA;    const customSpec = JSON.stringify(jsonCustomSpec);&#xD;&#xA;    const provider = new ScProvider(customSpec);&#xD;&#xA;    // Establish the connection (and catch possible errors)&#xD;&#xA;    await provider.connect();&#xD;&#xA;    // Create the PolkadotJS api instance&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;    await api.rpc.chain.subscribeNewHeads(lastHeader =&gt; {&#xD;&#xA;      console.log(lastHeader.hash);&#xD;&#xA;    });&#xD;&#xA;    await api.disconnect();&#xD;&#xA;&#xD;&#xA;However, our chain spec does not specify bootnodes. When validator nodes join, they use one of a set of available bootnodes in their node startup code, rather than relying on bootnodes in the spec. So bootnodes exist, they are just not in the spec. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34225" PostHistoryTypeId="1" PostId="8718" RevisionGUID="31bae05f-cc7b-4920-85d6-e4b54291c187" CreationDate="2023-05-31T23:02:25.777" UserId="3346" Text="Substrate-Connect Integration For Custom Chain Without BootNodes In The Chain Spec JSON" ContentLicense="CC BY-SA 4.0" />
  <row Id="34226" PostHistoryTypeId="3" PostId="8718" RevisionGUID="31bae05f-cc7b-4920-85d6-e4b54291c187" CreationDate="2023-05-31T23:02:25.777" UserId="3346" Text="|bootnode|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34227" PostHistoryTypeId="52" PostId="8714" RevisionGUID="ef7c0a7a-23c4-49bf-8e1f-22a3fca0b1cb" CreationDate="2023-05-31T23:09:44.580" />
  <row Id="34228" PostHistoryTypeId="2" PostId="8719" RevisionGUID="02c586c9-45ac-4fc5-b523-1b0ace9dd002" CreationDate="2023-05-31T23:10:17.560" UserId="318" Text="Yes the extrinsics are transactional by default. In fact, if you need to make them non transactional you'd need to mark them accordingly as explained [here][1]. The transactional tag is just a legacy thing remained from when it wasn't the default behavior.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/5836/318" ContentLicense="CC BY-SA 4.0" />
  <row Id="34230" PostHistoryTypeId="50" PostId="8293" RevisionGUID="c65d25e8-5af8-4fea-9b03-4e36dfe892e3" CreationDate="2023-06-01T00:03:35.503" UserId="-1" />
  <row Id="34231" PostHistoryTypeId="2" PostId="8720" RevisionGUID="44b17547-72e2-4516-b33b-7ae6d964e984" CreationDate="2023-06-01T01:18:32.847" UserId="4290" Text="I have a asynchronous task running in ```service.spawn_essential_task(task).```&#xD;&#xA;&#xD;&#xA;Which does some stuff and wants to write data in storage. How can i achieve this?&#xD;&#xA;&#xD;&#xA;Changing state by making runtime_apis to pallet functions which are not extrinsics and changing state through them does not really change state and this seems to have a local state which changes data there and not in on-chain.&#xD;&#xA;&#xD;&#xA;And can we call these task as off chain worker or are these just seperate tasks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34233" PostHistoryTypeId="1" PostId="8720" RevisionGUID="44b17547-72e2-4516-b33b-7ae6d964e984" CreationDate="2023-06-01T01:18:32.847" UserId="4290" Text="Change state from a task" ContentLicense="CC BY-SA 4.0" />
  <row Id="34234" PostHistoryTypeId="3" PostId="8720" RevisionGUID="44b17547-72e2-4516-b33b-7ae6d964e984" CreationDate="2023-06-01T01:18:32.847" UserId="4290" Text="|runtime|storage|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34235" PostHistoryTypeId="2" PostId="8721" RevisionGUID="b3407b06-0a17-4c21-8a8c-886ca43df87e" CreationDate="2023-06-01T01:36:50.447" UserId="83" Text="In the repository of the cargo-contract CLI tool, which currently _&quot;helps you develop smart contracts in Parity's ink!, which is a Rust eDSL allowing you to write smart contracts for blockchains built on the Substrate framework&quot;_, there is an opportunity [here][1] to extend it to support Solang so developers could use it to write smart contracts in either ink! (which compiles to WASM) or Solidity (which compiles to WASM using Solang compiler), which they could then deploy it to chains that implement the Substrate Contracts module. However, they'd need to use a different compiler like solc to compile down to EVM-compatible bytecode if they wanted to deploy it to chains that implement the EVM, so I think the CLI should give them a choice of whether they want to compile the Solidity code to WASM or EVM-compatible bytecode.&#xD;&#xA;&#xD;&#xA;If cargo-contract had this feature of also supporting smart contracts written in Solidity then I was thinking it could be valuable for decentralization and adoption of blockchain and Web3 and multi-chain deployment, since developers could more seamlessly build the smart contracts of a DApp that uses a combination of both ink! and Solidity at the same time.&#xD;&#xA;&#xD;&#xA;They'd be able to write smart contracts in Solidity that I think would be able to interact with Moonbeam-specific precompiles (EVM bytecodes used to run cryptographic computations within acceptable gas limits) through Solidity interfaces using the Ethereum API, which are ultimately used to interact with the underlying Substrate interface, as shown [here][2].&#xD;&#xA;&#xD;&#xA;But the smart contracts written in Solidity (or other languages like Vyper) that use solc to compile down to EVM-compatible bytecode could only be deployed to chains that have a full EVM implementation, such as Ethereum and Moonbeam.&#xD;&#xA;&#xD;&#xA;Whilst the smart contracts written in ink! are compiled into the web binary standard WebAssembly with file extension .wasm that may be deployed to chains that have a Substrate Contracts module implementation.&#xD;&#xA;&#xD;&#xA;But if in the future chains like Ethereum 2.0 and Moonbeam, and chains implementing the Substrate Contracts module, all supported a gas-efficient eWASM (Ethereum WebAssembly) standard, then most precompiles could become redundant.&#xD;&#xA;&#xD;&#xA;Then CLI tools like cargo-contract could compile smart contracts written in ink! and Solidity into eWASM, and they could be deployed to any chain that supported eWASM.&#xD;&#xA;&#xD;&#xA;**Question:** But how would it be possible to build smart contracts written in ink! that call public functions in smart contracts written in Solidity and vice versa? Could the smart contracts written in ink! use Rust FFI to interface with the smart contracts written in Solidity?  Or would it make more sense in any case to (or be necessary to) just first transpile Solidity to ink! using a transpiler like [sol2ink][3], and then compile to WASM (or eWASM in future).&#xD;&#xA;&#xD;&#xA;References:&#xD;&#xA;* https://use.ink/ink-vs-solidity/&#xD;&#xA;* https://www.parity.io/blog/wasm-smart-contract-development/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/68&#xD;&#xA;  [2]: https://docs.moonbeam.network/builders/pallets-precompiles/precompiles/overview/&#xD;&#xA;  [3]: https://github.com/Supercolony-net/sol2ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="34237" PostHistoryTypeId="1" PostId="8721" RevisionGUID="b3407b06-0a17-4c21-8a8c-886ca43df87e" CreationDate="2023-06-01T01:36:50.447" UserId="83" Text="How to interact between a smart contract written in Solidity from a smart contract written in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34238" PostHistoryTypeId="3" PostId="8721" RevisionGUID="b3407b06-0a17-4c21-8a8c-886ca43df87e" CreationDate="2023-06-01T01:36:50.447" UserId="83" Text="|ink|wasm|evm|cargo-contract|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34239" PostHistoryTypeId="5" PostId="8721" RevisionGUID="e7a82e7f-3338-45a6-a2da-75791e8ab67c" CreationDate="2023-06-01T02:45:08.650" UserId="83" Comment="discovered solang already thinking about this" Text="In the repository of the cargo-contract CLI tool, which currently _&quot;helps you develop smart contracts in Parity's ink!, which is a Rust eDSL allowing you to write smart contracts for blockchains built on the Substrate framework&quot;_, there is an opportunity [here][1] to extend it to support Solang so developers could use it to write smart contracts in either ink! (which compiles to WASM) or Solidity (which compiles to WASM using Solang compiler), which they could then deploy it to chains that implement the Substrate Contracts module. However, they'd need to use a different compiler like solc to compile down to EVM-compatible bytecode if they wanted to deploy it to chains that implement the EVM, so I think the CLI should give them a choice of whether they want to compile the Solidity code to WASM or EVM-compatible bytecode.&#xD;&#xA;&#xD;&#xA;If cargo-contract had this feature of also supporting smart contracts written in Solidity then I was thinking it could be valuable for decentralization and adoption of blockchain and Web3 and multi-chain deployment, since developers could more seamlessly build the smart contracts of a DApp that uses a combination of both ink! and Solidity at the same time.&#xD;&#xA;&#xD;&#xA;They'd be able to write smart contracts in Solidity that I think would be able to interact with Moonbeam-specific precompiles (EVM bytecodes used to run cryptographic computations within acceptable gas limits) through Solidity interfaces using the Ethereum API, which are ultimately used to interact with the underlying Substrate interface, as shown [here][2].&#xD;&#xA;&#xD;&#xA;But the smart contracts written in Solidity (or other languages like Vyper) that use solc to compile down to EVM-compatible bytecode could only be deployed to chains that have a full EVM implementation, such as Ethereum and Moonbeam.&#xD;&#xA;&#xD;&#xA;Whilst the smart contracts written in ink! are compiled into the web binary standard WebAssembly with file extension .wasm that may be deployed to chains that have a Substrate Contracts module implementation.&#xD;&#xA;&#xD;&#xA;But if in the future chains like Ethereum 2.0 and Moonbeam, and chains implementing the Substrate Contracts module, all supported a gas-efficient eWASM (Ethereum WebAssembly) standard, then most precompiles could become redundant.&#xD;&#xA;&#xD;&#xA;Then CLI tools like cargo-contract could compile smart contracts written in ink! and Solidity into eWASM, and they could be deployed to any chain that supported eWASM.&#xD;&#xA;&#xD;&#xA;**Question:** But how would it be possible to build smart contracts written in ink! that call public functions in smart contracts written in Solidity and vice versa? Could the smart contracts written in ink! use Rust FFI to interface with the smart contracts written in Solidity?  Or would it make more sense in any case to (or be necessary to) just first transpile Solidity to ink! using a transpiler like [sol2ink][3], and then compile to WASM (or eWASM in future).&#xD;&#xA;&#xD;&#xA;Update: It seems like the Solang team have already thought about this possibility [here][4].&#xD;&#xA;&#xD;&#xA;References:&#xD;&#xA;* https://use.ink/ink-vs-solidity/&#xD;&#xA;* https://www.parity.io/blog/wasm-smart-contract-development/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/68&#xD;&#xA;  [2]: https://docs.moonbeam.network/builders/pallets-precompiles/precompiles/overview/&#xD;&#xA;  [3]: https://github.com/Supercolony-net/sol2ink&#xD;&#xA;  [4]: https://github.com/hyperledger/solang/issues/976" ContentLicense="CC BY-SA 4.0" />
  <row Id="34240" PostHistoryTypeId="5" PostId="8721" RevisionGUID="b191f11e-7664-474e-81c4-8c92a871bbfa" CreationDate="2023-06-01T03:42:28.853" UserId="83" Comment="typos" Text="In the repository of the cargo-contract CLI tool, which currently _&quot;helps you develop smart contracts in Parity's ink!, which is a Rust eDSL allowing you to write smart contracts for blockchains built on the Substrate framework&quot;_, there is an opportunity [here][1] to extend it to support Solang so developers could use it to write smart contracts in either ink! (which compiles to WASM) or Solidity (which compiles to WASM using Solang compiler), which they could then deploy to chains that implement the Substrate Contracts module. However, they'd need to use a different compiler like solc to compile down to EVM-compatible bytecode if they wanted to deploy it to chains that implement the EVM, so I think the CLI should give them a choice of whether they want to compile the Solidity code to WASM or EVM-compatible bytecode.&#xD;&#xA;&#xD;&#xA;If cargo-contract had this feature of also supporting smart contracts written in Solidity then I was thinking it could be valuable for decentralization and adoption of blockchain and Web3 and multi-chain deployment, since developers could more seamlessly build the smart contracts of a DApp that uses a combination of both ink! and Solidity at the same time.&#xD;&#xA;&#xD;&#xA;They'd be able to write smart contracts in Solidity that I think would be able to interact with Moonbeam-specific precompiles (EVM bytecodes used to run cryptographic computations within acceptable gas limits) through Solidity interfaces using the Ethereum API, which are ultimately used to interact with the underlying Substrate interface, as shown [here][2].&#xD;&#xA;&#xD;&#xA;But the smart contracts written in Solidity (or other languages like Vyper) that use solc to compile down to EVM-compatible bytecode could only be deployed to chains that have a full EVM implementation, such as Ethereum and Moonbeam.&#xD;&#xA;&#xD;&#xA;Whilst the smart contracts written in ink! are compiled into the web binary standard WebAssembly with file extension .wasm that may be deployed to chains that have a Substrate Contracts module implementation.&#xD;&#xA;&#xD;&#xA;But if in the future chains like Ethereum 2.0 and Moonbeam, and chains implementing the Substrate Contracts module, all supported a gas-efficient eWASM (Ethereum WebAssembly) standard, then most precompiles could become redundant.&#xD;&#xA;&#xD;&#xA;Then CLI tools like cargo-contract could compile smart contracts written in ink! and Solidity into eWASM, and they could be deployed to any chain that supported eWASM.&#xD;&#xA;&#xD;&#xA;**Question:** But how would it be possible to build smart contracts written in ink! that call public functions in smart contracts written in Solidity and vice versa? Could the smart contracts written in ink! use Rust FFI to interface with the smart contracts written in Solidity?  Or would it make more sense in any case to (or be necessary to) just first transpile Solidity to ink! using a transpiler like [sol2ink][3], and then compile to WASM (or eWASM in future).&#xD;&#xA;&#xD;&#xA;Update: It seems like the Solang team have already thought about this possibility [here][4].&#xD;&#xA;&#xD;&#xA;References:&#xD;&#xA;* https://use.ink/ink-vs-solidity/&#xD;&#xA;* https://www.parity.io/blog/wasm-smart-contract-development/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/68&#xD;&#xA;  [2]: https://docs.moonbeam.network/builders/pallets-precompiles/precompiles/overview/&#xD;&#xA;  [3]: https://github.com/Supercolony-net/sol2ink&#xD;&#xA;  [4]: https://github.com/hyperledger/solang/issues/976" ContentLicense="CC BY-SA 4.0" />
  <row Id="34241" PostHistoryTypeId="4" PostId="8721" RevisionGUID="8784aafb-4935-49aa-b663-8bc4374197af" CreationDate="2023-06-01T03:51:47.787" UserId="83" Comment="fix typo" Text="How to interact between a smart contract written in Solidity from a smart contract written in ink!?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34242" PostHistoryTypeId="2" PostId="8722" RevisionGUID="8c0342b6-53c0-4cdb-9e91-5dc380f7ccdc" CreationDate="2023-06-01T04:13:17.547" UserId="4288" Text="I'm making a wallet that has an address book / contacts feature so that it's easier and faster for users to send balances to other users.&#xD;&#xA;&#xD;&#xA;Is storing the address book / contacts in the network is a good and correct way?&#xD;&#xA;&#xD;&#xA;should data such as contacts not be stored in blocks but stored in local storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34244" PostHistoryTypeId="1" PostId="8722" RevisionGUID="8c0342b6-53c0-4cdb-9e91-5dc380f7ccdc" CreationDate="2023-06-01T04:13:17.547" UserId="4288" Text="How to create address book?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34245" PostHistoryTypeId="3" PostId="8722" RevisionGUID="8c0342b6-53c0-4cdb-9e91-5dc380f7ccdc" CreationDate="2023-06-01T04:13:17.547" UserId="4288" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34247" PostHistoryTypeId="5" PostId="8720" RevisionGUID="e893f8ff-d00a-4e63-a65c-d39b02523619" CreationDate="2023-06-01T04:53:39.470" UserId="2281" Comment="added 4 characters in body" Text="I have a asynchronous task running in ```service.spawn_essential_task(task).```&#xD;&#xA;&#xD;&#xA;Which does some stuff and wants to write data in storage. How can i achieve this?&#xD;&#xA;&#xD;&#xA;Changing state by making `runtime_apis` to pallet functions which are not extrinsics and changing state through them does not really change state and this seems to have a local state which changes data there and not in `on-chain.`&#xD;&#xA;&#xD;&#xA;And can we call these task as off chain worker or are these just seperate tasks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34248" PostHistoryTypeId="2" PostId="8723" RevisionGUID="e7603b70-e119-4384-b3a3-35e32f400af8" CreationDate="2023-06-01T08:31:20.877" UserId="3049" Text="&gt; But how would it be possible to build smart contracts written in ink! that call public functions in smart contracts written in Solidity and vice versa?&#xD;&#xA;&#xD;&#xA;We need to distinguish between Solidity contracts compiled to Wasm running on the contracts pallet (i.e. they execute within the same runtime) vs. Solidity contracts compiled into EVM bytecode running on pallet EVM.&#xD;&#xA;&#xD;&#xA;For the first case, technically it does not matter in what language a contract was written. In practice there are 2 small nuances.&#xD;&#xA;&#xD;&#xA; - The concepts of the `Result` type and the [language error][2] don't exist in Solidity. Instead, the contract will always return the concrete value instead of a `Result&lt;T, LanguageError&gt;` returned by ink! contracts.&#xD;&#xA; - Solidity and ink! have different (incompatible) ways of calculating their function selectors. &#xD;&#xA;&#xD;&#xA;You can refer to [this solang integration test][1] as an example how to call into a Solidity contract from ink!. Calling ink! contracts from Solidity does work fine too.&#xD;&#xA; &#xD;&#xA;The latter case requires cross contract calls between 2 different execution engines. Which is much more sophisticated and requires something [like this][3] to work.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/hyperledger/solang/blob/main/integration/substrate/ink/caller/lib.rs#L33-L38&#xD;&#xA;  [2]: https://docs.rs/ink/4.0.0/ink/enum.LangError.html&#xD;&#xA;  [3]: https://docs.astar.network/docs/build/EVM/precompiles/xvm/" ContentLicense="CC BY-SA 4.0" />
  <row Id="34251" PostHistoryTypeId="2" PostId="8724" RevisionGUID="cbd2d6c6-4b18-48a5-b98e-2871020024c6" CreationDate="2023-06-01T09:43:16.930" UserId="496" Text="After doing a simple calculation in rust ink! 4.0 smart contract, the result is incorrect and doesnt match the expected result.&#xD;&#xA;&#xD;&#xA;Here is the simple formula:&#xD;&#xA;&#xD;&#xA;```let a0_balance_mul:U256 = U256::from(amount_in_with_lp_fees * self.get_a0_balance());```&#xD;&#xA;&#xD;&#xA;The variables for the above formula are:&#xD;&#xA;&#xD;&#xA; 1. ```amount_in_with_lp_fees = 100,000,000,000,000,000,000```&#xD;&#xA; 2. ```self.get_a0_balance() = 10,000,000,000,000,000,000```&#xD;&#xA;&#xD;&#xA;The result that Im getting is : ```319,435,266,158,123,073,073,250,785,136,463,577,088```&#xD;&#xA;Which should be : ```1000000000000000000000000000000000000000```&#xD;&#xA;&#xD;&#xA;I've checked both numbers and they are both represented correctly using U256 int.&#xD;&#xA;&#xD;&#xA;Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="34253" PostHistoryTypeId="1" PostId="8724" RevisionGUID="cbd2d6c6-4b18-48a5-b98e-2871020024c6" CreationDate="2023-06-01T09:43:16.930" UserId="496" Text="Calculation gives the wrong result" ContentLicense="CC BY-SA 4.0" />
  <row Id="34254" PostHistoryTypeId="3" PostId="8724" RevisionGUID="cbd2d6c6-4b18-48a5-b98e-2871020024c6" CreationDate="2023-06-01T09:43:16.930" UserId="496" Text="|ink|rust|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34255" PostHistoryTypeId="2" PostId="8725" RevisionGUID="264c3591-f190-41bf-b273-a7730ba6eb26" CreationDate="2023-06-01T10:34:15.257" UserId="3136" Text="when a parachain lease runs out then simply your parachain  block producion is stop that is `best block` which shown in the top of the explorer.&#xD;&#xA;there is a some ways to do when your lease period runs out...&#xD;&#xA;&#xD;&#xA;Auction Process: Before the lease period ends, an auction is typically held to determine which parachain will be allocated the slot next. This auction allows parachain projects to bid for a lease extension or a new slot on the network.&#xD;&#xA;&#xD;&#xA;Slot Reassignment: Once the auction concludes, the winning parachain is assigned the slot previously occupied by the expiring parachain. This ensures continuous operation of the network and allows new projects to join.&#xD;&#xA;&#xD;&#xA;Parachain Removal: After the slot is reassigned, the expiring parachain is removed from the network. This removal involves detaching the parachain's state and stopping the validation and block production activities associated with it.&#xD;&#xA;&#xD;&#xA;State Backup: Before removal, it is common for the parachain's state to be backed up. This ensures that the historical data and state of the expiring parachain are preserved for future reference or potential reintegration." ContentLicense="CC BY-SA 4.0" />
  <row Id="34257" PostHistoryTypeId="2" PostId="8726" RevisionGUID="8828175e-ffc3-4c51-8948-3a434493baa6" CreationDate="2023-06-01T10:36:32.313" UserId="4292" Text="I have a simple question . if i use off chain workers to get calls to https://somecoinexchange/ to get data for some calculation, what will be the gas usage. I was presuming that since no chain work is done, no gas will be used. &#xD;&#xA;Any help" ContentLicense="CC BY-SA 4.0" />
  <row Id="34259" PostHistoryTypeId="1" PostId="8726" RevisionGUID="8828175e-ffc3-4c51-8948-3a434493baa6" CreationDate="2023-06-01T10:36:32.313" UserId="4292" Text="Off chain worker for https:// request" ContentLicense="CC BY-SA 4.0" />
  <row Id="34260" PostHistoryTypeId="3" PostId="8726" RevisionGUID="8828175e-ffc3-4c51-8948-3a434493baa6" CreationDate="2023-06-01T10:36:32.313" UserId="4292" Text="|polkadot|rpc|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34261" PostHistoryTypeId="2" PostId="8727" RevisionGUID="98257d9b-2998-4e89-b4a0-92d61e76dadf" CreationDate="2023-06-01T10:38:49.483" UserId="496" Text="I should've converted both ```amount_in_with_lp_fees``` and ```self.get_a0_balance()``` into U256 int, they were u128." ContentLicense="CC BY-SA 4.0" />
  <row Id="34263" PostHistoryTypeId="2" PostId="8728" RevisionGUID="83fb493a-090b-4612-9e7b-5491fc5fb083" CreationDate="2023-06-01T10:40:38.203" UserId="139" Text="```rust&#xD;&#xA;pub enum ChainType {&#xD;&#xA;	/// A development chain that runs mainly on one node.&#xD;&#xA;	Development,&#xD;&#xA;	/// A local chain that runs locally on multiple nodes for testing purposes.&#xD;&#xA;	Local,&#xD;&#xA;	/// A live chain.&#xD;&#xA;	Live,&#xD;&#xA;	/// Some custom chain type.&#xD;&#xA;	Custom(String),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The question arises from seeing two separate functions in the node template, `development_config() -&gt; ChainSpec` and `local_config() -&gt; ChainSpec`, where the only difference I could spot was the difference in `ChainType` of the aforementioned `ChainSpec`. Reading the code docs I get that a `Local` is suited for multiple peers, but is there any code that I can look at that specifically makes use of this distinction, i.e. `ChainType::Development` vs `ChainType::Local`? " ContentLicense="CC BY-SA 4.0" />
  <row Id="34265" PostHistoryTypeId="1" PostId="8728" RevisionGUID="83fb493a-090b-4612-9e7b-5491fc5fb083" CreationDate="2023-06-01T10:40:38.203" UserId="139" Text="What's the difference b/w ChainType::Development vs Local?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34266" PostHistoryTypeId="3" PostId="8728" RevisionGUID="83fb493a-090b-4612-9e7b-5491fc5fb083" CreationDate="2023-06-01T10:40:38.203" UserId="139" Text="|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34267" PostHistoryTypeId="5" PostId="8726" RevisionGUID="81521640-cb89-453c-a386-f2697b2b3ecb" CreationDate="2023-06-01T10:40:58.957" UserId="2281" Comment="deleted 7 characters in body" Text="I have a simple question if i use `off chain workers` to get calls to https://somecoinexchange/ to get data for `some calculation`, what will be the `gas usage`. I was presuming that since no chain work is done, no gas will be used." ContentLicense="CC BY-SA 4.0" />
  <row Id="34268" PostHistoryTypeId="2" PostId="8729" RevisionGUID="7818dd5d-b238-4576-8769-45c0b6114844" CreationDate="2023-06-01T11:06:41.343" UserId="3136" Text="`parathred` can not produce a block`(best block)` .&#xD;&#xA;You can test it simply by cloning a parachain node template and polkadot code and then make a private network and connect your parachain into relay chain and then you will see there that parathred is not able to produce best block that `best block`  is block prodution.&#xD;&#xA;If you want to know how to make private network and connect parachain into relay chain then reply in the same comment." ContentLicense="CC BY-SA 4.0" />
  <row Id="34270" PostHistoryTypeId="2" PostId="8730" RevisionGUID="aceb2e70-9a6b-4a80-ad0d-ca63653a89cb" CreationDate="2023-06-01T11:24:06.987" UserId="3136" Text="I was make a private network in `relay-chain` and `parachain` and connected `parachain` into relay chain through `sudo` `assign slot pallet` &amp; `slot` locally.&#xD;&#xA;but i want to add my `parachain` into `relay-chain` through auction process and by bid.&#xD;&#xA;Is there any way to add my `parachain` to `relay-chain` locally through auction.  &#xD;&#xA;Can anyone explain the process.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34272" PostHistoryTypeId="1" PostId="8730" RevisionGUID="aceb2e70-9a6b-4a80-ad0d-ca63653a89cb" CreationDate="2023-06-01T11:24:06.987" UserId="3136" Text="How parachain added into Polkadot-Relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34273" PostHistoryTypeId="3" PostId="8730" RevisionGUID="aceb2e70-9a6b-4a80-ad0d-ca63653a89cb" CreationDate="2023-06-01T11:24:06.987" UserId="3136" Text="|polkadot|parachain|substrate-parachain-template|relay-chain|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34275" PostHistoryTypeId="5" PostId="8730" RevisionGUID="1bddc8c0-398a-4e77-a871-9d743bee1756" CreationDate="2023-06-01T11:50:44.843" UserId="3136" Comment="added 76 characters in body" Text="I was make a private network in `relay-chain` and `parachain` and connected `parachain` into relay chain through `sudo` `assign slot pallet` &amp; `slot` locally.&#xD;&#xA;but i want to add my `parachain` into `relay-chain` through auction process and by bid.&#xD;&#xA;Is there any way to add my `parachain` into `relay-chain` locally through auction and also is there anything in polkaodot to open there slot in `relay-chain` &#xD;&#xA;Can anyone explain the process.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34276" PostHistoryTypeId="2" PostId="8731" RevisionGUID="ad21f212-7eb7-4fb3-b6ba-460528daa38d" CreationDate="2023-06-01T12:04:44.890" UserId="139" Text="Does this answer your question : https://wiki.polkadot.network/docs/learn-auction ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34278" PostHistoryTypeId="2" PostId="8732" RevisionGUID="618cdb75-6e12-4e04-9b71-a50bc9a8e6cb" CreationDate="2023-06-01T13:06:25.040" UserId="4293" Text="I'm customising the srtool (Substrate runtime toolbox) for our chain built based on substrate.&#xD;&#xA;&#xD;&#xA;The srtool docker image was built successful, but when Github running test against myChain, it failed with an error&#xD;&#xA;```&#xD;&#xA;  Rust nightly not installed, please install it!&#xD;&#xA;  parse error: Invalid numeric literal at line 1, column 2&#xD;&#xA;  Error: Process completed with exit code 4.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here's how rustup was updated, and toolchain are installed and target is setup in In `Dockerfile`&#xD;&#xA;```&#xD;&#xA;RUN echo $SHELL &amp;&amp; \&#xD;&#xA;    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain $RUSTC_VERSION -y  &amp;&amp; \&#xD;&#xA;    . $CARGO_HOME/env &amp;&amp; \&#xD;&#xA;    rustup myChain add stable ${RUSTC_VERSION} &amp;&amp; \&#xD;&#xA;    rustup target add wasm32-unknown-unknown --toolchain $RUSTC_VERSION &amp;&amp; \&#xD;&#xA;    chmod -R a+w $RUSTUP_HOME $CARGO_HOME &amp;&amp; \&#xD;&#xA;    rustup show &amp;&amp; rustc -V&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Not sure why the docker image was built successfully with nightly, but failed in the test.&#xD;&#xA;```&#xD;&#xA;      - name: Run srtool build for ${{ matrix.chain }}&#xD;&#xA;        id: srtool_build&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34280" PostHistoryTypeId="1" PostId="8732" RevisionGUID="618cdb75-6e12-4e04-9b71-a50bc9a8e6cb" CreationDate="2023-06-01T13:06:25.040" UserId="4293" Text="Build error on Substrate Toolbox - rust nightly not installed" ContentLicense="CC BY-SA 4.0" />
  <row Id="34281" PostHistoryTypeId="3" PostId="8732" RevisionGUID="618cdb75-6e12-4e04-9b71-a50bc9a8e6cb" CreationDate="2023-06-01T13:06:25.040" UserId="4293" Text="|srtool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34282" PostHistoryTypeId="2" PostId="8733" RevisionGUID="dc26737d-d060-4511-87e0-2db8c166e65a" CreationDate="2023-06-01T13:59:12.947" UserId="4019" Text="how we can implement stacking and made council in local testnet ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1][![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Thanks in Advance,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HZZf9.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/2kEom.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34284" PostHistoryTypeId="1" PostId="8733" RevisionGUID="dc26737d-d060-4511-87e0-2db8c166e65a" CreationDate="2023-06-01T13:59:12.947" UserId="4019" Text="Implementing Stacking and Creating a Council in a Local Testnet" ContentLicense="CC BY-SA 4.0" />
  <row Id="34285" PostHistoryTypeId="3" PostId="8733" RevisionGUID="dc26737d-d060-4511-87e0-2db8c166e65a" CreationDate="2023-06-01T13:59:12.947" UserId="4019" Text="|polkadot-js|governance|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34286" PostHistoryTypeId="2" PostId="8734" RevisionGUID="3a19131f-1b8c-44e3-b4c9-35c75cc0d664" CreationDate="2023-06-01T14:40:15.090" UserId="3850" Text="I get the following error when trying to convert my `frame_system::Config::AccountId` to a `MultiAddress`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;expected enum `MultiAddress&lt;sp_runtime::AccountId32, ()&gt;`&#xD;&#xA;   found enum `MultiAddress&lt;&lt;T as frame_system::Config&gt;::AccountId, _&gt;`&#xD;&#xA;consider constraining the associated type `&lt;T as frame_system::Config&gt;::AccountId` to `sp_runtime::AccountId32`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the code that fails to create a `MultiAddress` from the `AccountId`.&#xD;&#xA;```&#xD;&#xA;Self::ensure_pallet_enabled()?;&#xD;&#xA;&#xD;&#xA;let staker = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;let location: MultiLocation = MultiLocation {&#xD;&#xA;    parents: 1,&#xD;&#xA;    interior: Here,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;let create_nomination_pool =&#xD;&#xA;                RuntimeCall::NominationPools(pallet_nomination_pools::Call::&lt;&#xD;&#xA;                    polkadot_runtime::Runtime,&#xD;&#xA;                &gt;::create {&#xD;&#xA;                    amount: 10000,&#xD;&#xA;                    root: MultiAddress::from(staker),&#xD;&#xA;                    nominator: MultiAddress::from(staker),&#xD;&#xA;                    bouncer: MultiAddress::from(staker),&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the type of my `frame_system::Config::AccountId`.&#xD;&#xA;```&#xD;&#xA;pub type AccountId = &lt;&lt;Signature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34288" PostHistoryTypeId="1" PostId="8734" RevisionGUID="3a19131f-1b8c-44e3-b4c9-35c75cc0d664" CreationDate="2023-06-01T14:40:15.090" UserId="3850" Text="How can I convert an account of type sp_runtime::traits::IdentifyAccount::AccountId to sp_runtime::AccountId32?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34289" PostHistoryTypeId="3" PostId="8734" RevisionGUID="3a19131f-1b8c-44e3-b4c9-35c75cc0d664" CreationDate="2023-06-01T14:40:15.090" UserId="3850" Text="|config|accountid|traits|multiaddress|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34290" PostHistoryTypeId="2" PostId="8735" RevisionGUID="636bd14c-d8c8-4d07-aa98-30b5c25bd00e" CreationDate="2023-06-01T14:43:53.747" UserId="3142" Text="I am seeing this compile error with `xcm-builder` when building our chain w/Polkadot 0.9.38. What should I change to fix it?  This issue is also discussed here https://github.com/paritytech/subport/issues/149 but I wasn't able to get it to work.&#xD;&#xA;&#xD;&#xA;      error[E0046]: not all trait items implemented, missing: `try_successful_origin`&#xD;&#xA;         --&gt; /home/test/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/097ffd2/xcm/xcm-builder/src/origin_conversion.rs:247:1&#xD;&#xA;          |&#xD;&#xA;      247 | / impl&lt;RuntimeOrigin: OriginTrait + Clone, Conversion: Convert&lt;RuntimeOrigin, MultiLocation&gt;&gt;&#xD;&#xA;      248 | |     EnsureOrigin&lt;RuntimeOrigin&gt; for EnsureXcmOrigin&lt;RuntimeOrigin, Conversion&gt;&#xD;&#xA;          | |______________________________________________________________________________^ missing `try_successful_origin` in implementation&#xD;&#xA;          |&#xD;&#xA;          = help: implement the missing item: `fn try_successful_origin() -&gt; Result&lt;OuterOrigin, ()&gt; { todo!() }`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34292" PostHistoryTypeId="1" PostId="8735" RevisionGUID="636bd14c-d8c8-4d07-aa98-30b5c25bd00e" CreationDate="2023-06-01T14:43:53.747" UserId="3142" Text="error[E0046]: not all trait items implemented, missing: `try_successful_origin`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34293" PostHistoryTypeId="3" PostId="8735" RevisionGUID="636bd14c-d8c8-4d07-aa98-30b5c25bd00e" CreationDate="2023-06-01T14:43:53.747" UserId="3142" Text="|polkadot|xcm|cargo|features|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34294" PostHistoryTypeId="2" PostId="8736" RevisionGUID="467e012f-9be2-4f10-bc3e-9ef6f11a6bcb" CreationDate="2023-06-01T14:59:29.620" UserId="4277" Text="    error: failed to select a version for `zstd-sys`.&#xD;&#xA;        ... required by package `zstd-safe v4.1.1+zstd.1.5.0`&#xD;&#xA;        ... which satisfies dependency `zstd-safe = &quot;=4.1.1&quot;` of package `zstd v0.9.0+zstd.1.5.0`&#xD;&#xA;        ... which satisfies dependency `zstd = &quot;^0.9.0&quot;` of package `sp-maybe-compressed-blob v4.1.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sp-maybe-compressed-blob` of package `sc-executor-common v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sc-executor-common` of package `sc-executor v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sc-executor` of package `sc-client-api v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sc-client-api` of package `sc-block-builder v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sc-block-builder` of package `sc-finality-grandpa v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sc-finality-grandpa` of package `sc-finality-grandpa-rpc v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34296" PostHistoryTypeId="1" PostId="8736" RevisionGUID="467e012f-9be2-4f10-bc3e-9ef6f11a6bcb" CreationDate="2023-06-01T14:59:29.620" UserId="4277" Text="failed to select a version for `zstd-sys`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34297" PostHistoryTypeId="3" PostId="8736" RevisionGUID="467e012f-9be2-4f10-bc3e-9ef6f11a6bcb" CreationDate="2023-06-01T14:59:29.620" UserId="4277" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34298" PostHistoryTypeId="2" PostId="8737" RevisionGUID="a2c9b667-464d-4709-a0ed-411276264d73" CreationDate="2023-06-01T15:57:36.487" UserId="251" Text="You can add a trait to do this.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::config]&#xD;&#xA;trait Config: frame_system::Config {&#xD;&#xA;  AccountIdConvertor: AccountIdConvertor&lt;Self::AccountId&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;trait AccountIdConvertor&lt;A&gt; {&#xD;&#xA;  fn to_32(a: A) -&gt; AccountId32;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::call]&#xD;&#xA;fn c(origin: OriginFor&lt;T&gt;) {&#xD;&#xA;  let a = ensure_signed(origin)?;&#xD;&#xA;  let a_32 = T::AccountIdConvertor::to_u32(a);&#xD;&#xA;&#xD;&#xA;  ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or you can limit only accountid32 chain can use this pallet.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::config]&#xD;&#xA;trait Config: frame_system::Config&lt;Account = AccountId32&gt; {}&#xD;&#xA;&#xD;&#xA;..&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34300" PostHistoryTypeId="2" PostId="8738" RevisionGUID="f76dbdcf-0332-4481-8331-3d787ed24480" CreationDate="2023-06-01T15:58:47.557" UserId="29" Text="If you're speaking of Relay chain staking like Polkadot then you will need the [staking pallet](https://github.com/paritytech/substrate/tree/master/frame/staking).&#xD;&#xA;&#xD;&#xA;There is a guide on how to use pallet staking [here](https://substrate.stackexchange.com/a/3289/29).&#xD;&#xA;&#xD;&#xA;If you're looking to have the substrate-node-template be able to stake, then look here:&#xD;&#xA;- https://substrate.stackexchange.com/questions/6042/substrate-change-node-template-from-poa-to-pos&#xD;&#xA;&#xD;&#xA;If you want a council, you can use the [collective pallet](https://github.com/paritytech/substrate/tree/master/frame/collective). You can see how Polkadot configures it [here](https://github.com/paritytech/polkadot/blob/26b4a21d6ea8d7df343b8f907b12351367e49c45/runtime/polkadot/src/governance/old.rs#L105-L117).&#xD;&#xA;&#xD;&#xA;You can also see a basic council configuration [here](https://github.com/paritytech/substrate/blob/2577379be50ec2738174d70740c6c3a8d8eb815b/bin/node/runtime/src/lib.rs#L994-L1012)." ContentLicense="CC BY-SA 4.0" />
  <row Id="34302" PostHistoryTypeId="2" PostId="8739" RevisionGUID="23560c90-23fb-4566-b878-b02dda1c5f5a" CreationDate="2023-06-01T16:10:00.877" UserId="3035" Text="Make sure you enabled the `runtime-benchmarks` feature of the `xcm-builder` in the `Cargo.toml` of your crate. &#xD;&#xA;&#xD;&#xA;Here the example - https://github.com/paritytech/cumulus/blob/fa1d47f3686bfd78d8bee320d84b3c67d1fdf003/parachains/runtimes/collectives/collectives-polkadot/Cargo.toml#L100" ContentLicense="CC BY-SA 4.0" />
  <row Id="34304" PostHistoryTypeId="2" PostId="8740" RevisionGUID="db64df0c-7941-43d3-98bc-8e8360312ba7" CreationDate="2023-06-01T18:29:39.637" UserId="698" Text="At times when using Polkadot.JS/Api connections would either timeout or become disconnected from the provider.  When this happens the app crashes and exits. &#xD;&#xA;&#xD;&#xA;Is there any native setting to reconnect without throwing an error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34306" PostHistoryTypeId="1" PostId="8740" RevisionGUID="db64df0c-7941-43d3-98bc-8e8360312ba7" CreationDate="2023-06-01T18:29:39.637" UserId="698" Text="Polkadot.JS API / Reconnect" ContentLicense="CC BY-SA 4.0" />
  <row Id="34307" PostHistoryTypeId="3" PostId="8740" RevisionGUID="db64df0c-7941-43d3-98bc-8e8360312ba7" CreationDate="2023-06-01T18:29:39.637" UserId="698" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34308" PostHistoryTypeId="2" PostId="8741" RevisionGUID="5706b3a8-d88e-4ecd-9c4c-a638a35e6548" CreationDate="2023-06-01T19:31:15.153" UserId="29" Text="Reconnecting is a default feature of `WsProvider`:&#xD;&#xA;```js&#xD;&#xA;/**&#xD;&#xA;   * @param {string | string[]}  endpoint    The endpoint url. Usually `ws://ip:9944` or `wss://ip:9944`, may provide an array of endpoint strings.&#xD;&#xA;   * @param {number | false} autoConnectMs Whether to connect automatically or not (default). Provided value is used as a delay between retries.&#xD;&#xA;   * @param {Record&lt;string, string&gt;} headers The headers provided to the underlying WebSocket&#xD;&#xA;   * @param {number} [timeout] Custom timeout value used per request . Defaults to `DEFAULT_TIMEOUT_MS`&#xD;&#xA;   */&#xD;&#xA;```&#xD;&#xA;- https://github.com/polkadot-js/api/blob/d9ea5ee921841319dde53cc15b37a3820e4ec697/packages/rpc-provider/src/ws/index.ts#L107&#xD;&#xA;&#xD;&#xA;&gt; In all cases the API will handle reconnecting automatically. This means that when you connect and the endpoint is not (yet) ready, the promise will not resolve immediately, but rather when connected. The same applies to when connection is lost, the API will manage re-connections.&#xD;&#xA;&gt; &#xD;&#xA;&gt; In cases where the API does not support the chain being connected to,&#xD;&#xA;&gt; such as it using an unknown metadata version, the ready promise will&#xD;&#xA;&gt; fail to resolve and instead reject.&#xD;&#xA;&#xD;&#xA;- https://polkadot.js.org/docs/api/start/create#failures&#xD;&#xA;&#xD;&#xA;By error I am assuming you mean something like this in your logs:&#xD;&#xA;```&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You could do something like this:&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const reconnect = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider('wss://localhost:9944', 1000);&#xD;&#xA;&#xD;&#xA;    // Skip logging the default message&#xD;&#xA;    console.error = (message) =&gt; {&#xD;&#xA;        if (typeof message === 'string' &amp;&amp; message.startsWith('API-WS: disconnected from')) {&#xD;&#xA;            return; // Skip logging the default message&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    provider.on('disconnected', () =&gt; {&#xD;&#xA;        // Optional custom message&#xD;&#xA;        console.log('WebSocket connection closed unexpectedly.');&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The second param in the `WsProvider` constructor is called &quot;autoConnectMs&quot; and is set to true by default. You can also specify a number which would be the milliseconds to delay before reconnect." ContentLicense="CC BY-SA 4.0" />
  <row Id="34310" PostHistoryTypeId="5" PostId="8741" RevisionGUID="d2ade3fe-bcf7-4ec6-a589-58dbe6102d49" CreationDate="2023-06-01T19:46:32.880" UserId="29" Comment="added 50 characters in body" Text="Reconnecting is a default feature of `WsProvider`:&#xD;&#xA;```js&#xD;&#xA;/**&#xD;&#xA;   * @param {string | string[]}  endpoint    The endpoint url. Usually `ws://ip:9944` or `wss://ip:9944`, may provide an array of endpoint strings.&#xD;&#xA;   * @param {number | false} autoConnectMs Whether to connect automatically or not (default). Provided value is used as a delay between retries.&#xD;&#xA;   * @param {Record&lt;string, string&gt;} headers The headers provided to the underlying WebSocket&#xD;&#xA;   * @param {number} [timeout] Custom timeout value used per request . Defaults to `DEFAULT_TIMEOUT_MS`&#xD;&#xA;   */&#xD;&#xA;```&#xD;&#xA;- https://github.com/polkadot-js/api/blob/d9ea5ee921841319dde53cc15b37a3820e4ec697/packages/rpc-provider/src/ws/index.ts#L107&#xD;&#xA;&#xD;&#xA;&gt; In all cases the API will handle reconnecting automatically. This means that when you connect and the endpoint is not (yet) ready, the promise will not resolve immediately, but rather when connected. The same applies to when connection is lost, the API will manage re-connections.&#xD;&#xA;&gt; &#xD;&#xA;&gt; In cases where the API does not support the chain being connected to,&#xD;&#xA;&gt; such as it using an unknown metadata version, the ready promise will&#xD;&#xA;&gt; fail to resolve and instead reject.&#xD;&#xA;&#xD;&#xA;- https://polkadot.js.org/docs/api/start/create#failures&#xD;&#xA;&#xD;&#xA;By error I am assuming you mean something like this in your logs:&#xD;&#xA;```&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;2023-06-01 15:17:46          API-WS: disconnected from wss://localhost:9944: 1006:: connection failed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You could do something like this:&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;export const reconnect = async () =&gt; {&#xD;&#xA;    const provider = new WsProvider('wss://localhost:9944', 1000);&#xD;&#xA;&#xD;&#xA;    // Skip logging the default message&#xD;&#xA;    console.error = (message) =&gt; {&#xD;&#xA;        if (typeof message === 'string' &amp;&amp; message.startsWith('API-WS: disconnected from')) {&#xD;&#xA;            return; // Skip logging the default message&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    provider.on('disconnected', () =&gt; {&#xD;&#xA;        // Optional custom message&#xD;&#xA;        console.log('WebSocket connection closed unexpectedly.');&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The second param in the `WsProvider` constructor is called &quot;autoConnectMs&quot; and you can set to `true` - which would try to reconnect immediately with no delay OR you can specify a number which would be the milliseconds to delay before reconnect." ContentLicense="CC BY-SA 4.0" />
  <row Id="34311" PostHistoryTypeId="5" PostId="5446" RevisionGUID="99c1ef2a-08c4-4005-b4a1-36fc10133406" CreationDate="2023-06-01T22:37:47.463" UserId="29" Comment="added 4 characters in body" Text="&gt; Feel free to update/modify this if you see something that can be improved upon&#xD;&#xA;&#xD;&#xA;# Opening HRMP channels between parachains&#xD;&#xA;&#xD;&#xA;&gt; If you are new to XCM, read the following:&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-the-cross-consensus-message-format&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-part-two-versioning-and-compatibility&#xD;&#xA;&gt; - https://polkadot.network/blog/xcm-part-three-execution-and-error-management&#xD;&#xA;&gt; - https://github.com/paritytech/xcm-format&#xD;&#xA;&#xD;&#xA;Here is the setup for this tutorial:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/RoUeZ.png)&#xD;&#xA;&#xD;&#xA;You will need the following:&#xD;&#xA;- rococo-local relay chain&#xD;&#xA;- parachain with paraId 1001&#xD;&#xA;- parachain with paraId 1002&#xD;&#xA;&gt; You can read up more on how to set up a test network here:&#xD;&#xA;&gt; - https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet&#xD;&#xA;&#xD;&#xA;Since this tutorial is for example purposes, both parachains should have the sudo pallet configured. In a production chain this would be substituted with governance.&#xD;&#xA;&#xD;&#xA;## What is HRMP (also known as XCMP-Lite)?&#xD;&#xA;&#xD;&#xA;Here is an excerpt from the Polkadot Wiki:&#xD;&#xA;&#xD;&#xA;&gt; While XCMP is still being implemented, a stop-gap&#xD;&#xA;&gt; protocol (see definition below) known as Horizontal Relay-routed&#xD;&#xA;&gt; Message Passing (HRMP) exists in its place. HRMP has the same&#xD;&#xA;&gt; interface and functionality as XCMP but is much more demanding on&#xD;&#xA;&gt; resources since it stores all messages in the Relay Chain storage.&#xD;&#xA;&gt; When XCMP has been implemented, HRMP is planned to be deprecated and&#xD;&#xA;&gt; phased out in favor of it.&#xD;&#xA;&#xD;&#xA;Source:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-xcm#hrmp-xcmp-lite&#xD;&#xA;&#xD;&#xA;**HRMP channels are unidirectional**&#xD;&#xA;&#xD;&#xA;The parachain that wants to open an HRMP channel must make a request to the parachain it wishes to have an open channel with. Once that is done, the other parachain needs to accept this request. This is what we mean by unidirectional flow. For bidirectional communication we need to open another channel in the opposite direction.&#xD;&#xA;&#xD;&#xA;A channel can be opened only after the recipient confirms it and only on a session change.&#xD;&#xA;&#xD;&#xA;So in recap, for this tutorial, the idea is that we want bidirectional communication between parachain 1001 and parachain 1002 so that they can exchange XCM's.&#xD;&#xA;&#xD;&#xA;## Create an HRMP open channel request&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. First we need to create an [`hrmpInitOpenChannel`](https://github.com/paritytech/polkadot/blob/efcaa57d5f9d72c1c3fa79dcd929da9cced3af74/runtime/parachains/src/hrmp.rs#L451-L462) call. **Do not submit the call**, instead copy the encoded call data for later use:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Yvakr.png)&#xD;&#xA;&#xD;&#xA;- `proposed_max_capacity` - specifies how many messages can be in the channel at once.&#xD;&#xA;- `proposed_max_message_size` - specifies the maximum size of the messages.&#xD;&#xA;&#xD;&#xA;These numbers are a subject to the relay chain's configuration limits.&#xD;&#xA;&#xD;&#xA;You can find this in the relay chain's active configuration:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/fHgdV.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Fund the parachain's sovereign account&#xD;&#xA;&#xD;&#xA;The next step will be to create and submit an XCM on parachain 1001 with our encoded call data from above, but before we can do this we need to make sure parachain 1001's sovereign account on the relay chain is funded so it can take care of any XCM transact fees.&#xD;&#xA;&#xD;&#xA;Let's add parachain 1001's sovereign account to our address book.&#xD;&#xA;&#xD;&#xA;On the relay chain, open the address book and add the following contact:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Svqpy.png)&#xD;&#xA;&#xD;&#xA;&gt; If you're unsure as to how to calculate the parachain's sovereign account checkout this post:&#xD;&#xA;&gt; - https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain&#xD;&#xA;&gt; ![](https://i.stack.imgur.com/yoDMV.png)&#xD;&#xA;&gt; &#xD;&#xA;&gt; Note that if the parachain's `paraId` changes, then sovereign account will also change. Therefore, as a rule-of-thumb, avoid hard coding the parachain's sovereign account.&#xD;&#xA;&#xD;&#xA;We can now transfer some tokens from Alice to the sovereign account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/XHrwT.png)&#xD;&#xA;&#xD;&#xA;And the account is now funded!&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/KP7wQ.png)&#xD;&#xA;&#xD;&#xA;## Create the XCM to initiate the open channel request&#xD;&#xA;&#xD;&#xA;We can now create the XCM on parachain 1001:&#xD;&#xA;&#xD;&#xA;&gt; A few things to note. &#xD;&#xA;&gt; - Below you will see we use `sudo`, in the real-world this would be done via governance.&#xD;&#xA;&gt; - Always check what the XCM configuration is for the relay chain you are working with. The numbers below are for example purposes.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/P9gHr.png)&#xD;&#xA;![](https://i.stack.imgur.com/Jxt40.png)&#xD;&#xA;![](https://i.stack.imgur.com/Vxz1r.png)&#xD;&#xA;![](https://i.stack.imgur.com/B4qqq.png)&#xD;&#xA;![](https://i.stack.imgur.com/4dYO4.png)&#xD;&#xA;![](https://i.stack.imgur.com/9u1gb.png)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Notice the encoded call that we created in the beginning of this tutorial is now used in the `Transact`.&#xD;&#xA;&#xD;&#xA;In the above call, we are executing a few instructions:&#xD;&#xA;- [`WithdrawAsset`](https://github.com/paritytech/xcm-format#withdrawasset) - Removes the on-chain asset(s) and accrue them into the XCVM Holding Register. More info [here](https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-the-holding-register).&#xD;&#xA;- [`BuyExecution`](https://github.com/paritytech/xcm-format#buyexecution) - Pays for the execution of the current message using the asset(s) that were deposited in the XCVM Holding Register from our previous `WithdrawAsset` instruction. More info [here](https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-fee-payment-in-xcm).&#xD;&#xA;- [`RefundSurplus`](https://github.com/paritytech/xcm-format#refundsurplus) - Increases Refunded Weight Register to the value of Surplus Weight Register. Attempts to accrue fees previously paid via `BuyExecution` into the XCVM Holding Register for the amount that Refunded Weight Register is increased.&#xD;&#xA;- [`DepositAsset`](https://github.com/paritytech/xcm-format#depositasset) - Subtracts the asset(s) from the XCVM Holding Register and deposits on-chain equivalent assets under the ownership of the beneficiary. The operands are:&#xD;&#xA;    - assets: The asset(s) to remove from the Holding Register.&#xD;&#xA;    - max_assets: The maximum number of unique assets/asset instances to remove from the Holding Register. Only the first max_assets assets/instances of those matched by assets will be removed, prioritized under standard asset ordering. Any others will remain in holding.&#xD;&#xA;    - beneficiary: The new owner for the assets.&#xD;&#xA;&#xD;&#xA;Notice that with `DepositAsset` we are specifying an account where the surplus will go. In this example we have used Eve's account. *In general, we can use the sovereign account of our sender chain(here is `{0, X1(Parachain(1001))}`), so that we can use the surplus tokens to open the next HRMP channel.*&#xD;&#xA;&#xD;&#xA;Read more on how `RefundSurplus` and `DepositAsset` work here:&#xD;&#xA;- https://polkadot.network/blog/xcm-part-three-execution-and-error-management/#-weight&#xD;&#xA;&#xD;&#xA;The first part of this call is the destination - where we want to send the XCM to be executed. In our case we are saying `parent: 1` - the parent of parachain 1001 is the relay chain and in the context of the `parent` we are specifying an `interior: Here` meaning that we want the relay chain to execute the XCM. This is all done by using `MultiLocation`. If you're not familiar with `MultiLocation` then read up here:&#xD;&#xA;- https://github.com/paritytech/xcm-format#7-universal-consensus-location-identifiers&#xD;&#xA;&#xD;&#xA;Additionally, the actual XCM instructions themselves e.g. `WithdrawAsset`, `BuyExecution`, etc. also use `MultiLocation`. In this case the `MultiLocation` is in respect to the system that will be executing the XCM message:&#xD;&#xA;&#xD;&#xA;&gt; Throughout XCM, messages are authored such that when interpreted from the receiver's point of view they will have the desired meaning/effect. This means that relative paths should always by constructed to be read from the point of view of the receiving system, which may have a completely different meaning in the authoring system.&#xD;&#xA;&#xD;&#xA;More info here:&#xD;&#xA;- https://github.com/paritytech/xcm-format#concrete-identifiers&#xD;&#xA;&#xD;&#xA;As far as the amount that is needed to withdraw to cover execution, this is something that you will need to calculate ahead of time. More info can be found here:&#xD;&#xA;- https://polkadot.network/blog/xcm-the-cross-consensus-message-format/#-fee-payment-in-xcm&#xD;&#xA;&#xD;&#xA;And a nice StackExchange write up from a community member on weights and paying for execution here:&#xD;&#xA;- https://substrate.stackexchange.com/a/5430/29&#xD;&#xA;&#xD;&#xA;So in summary, we are going to withdraw some amount from the parachain sovereign account to the XCVM Holding Register. Use the amount in there to &quot;buy&quot; execution time for our XCM `Transact` instruction. Execute the `Transact`. And whatever amount is left over (determined by `RefundSurplus` ) is deposited into an account we specify by using the `DepositAsset` instruction.&#xD;&#xA;&#xD;&#xA;Before submitting this call, let's open the parachain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/egbma.png)&#xD;&#xA;&#xD;&#xA;Also, open the relay chain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/3LFor.png)&#xD;&#xA;&#xD;&#xA;You can now submit the XCM extrinsic and you will see the events.&#xD;&#xA;&#xD;&#xA;First you will see the events in the parachain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Mg7zj.png)&#xD;&#xA;&#xD;&#xA;Then you will see the events in the relay chain's explorer:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/1HjTD.png)&#xD;&#xA;&#xD;&#xA;Success!&#xD;&#xA;&#xD;&#xA;But let's double check. Check the chain state on the relay chain to see if there is now an HRMP open channel request from parachain 1001 to parachain 1002:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/P0WNR.png)&#xD;&#xA;&#xD;&#xA;You can also check here:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/CNtJm.png)&#xD;&#xA;&#xD;&#xA;And note that some amount has been deducted from the sovereign account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/gXIZ8.png)&#xD;&#xA;&#xD;&#xA;The surplus has gone to Eve's account:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/Vnx77.png)&#xD;&#xA;&#xD;&#xA;Their balance went from 1,000,000,000,000,000,000 to 1,000,000,885,011,945,986!&#xD;&#xA;&#xD;&#xA;Awesome!&#xD;&#xA;&#xD;&#xA;We have succeeded in creating an HRMP open channel request. The next step is for parachain 1002 to accept the request.&#xD;&#xA;&#xD;&#xA;## Accept the HRMP open channel request&#xD;&#xA;&#xD;&#xA;On the relay chain create the following call:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/0slRE.png)&#xD;&#xA;&#xD;&#xA;Copy the encoded call data for later use in our XCM.&#xD;&#xA;&#xD;&#xA;## Fund the parachain's sovereign account&#xD;&#xA;&#xD;&#xA;Make sure that parachain 1002's sovereign account is funded. &#xD;&#xA;&gt; You will have to repeat the process of adding and funding parachain 1002's sovereign account which was documented above for parachain 1001.&#xD;&#xA;&#xD;&#xA;## Create the XCM to accept the HRMP open channel request&#xD;&#xA;&#xD;&#xA;Now, create the XCM on parachain 1002:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/2BMAJ.png)&#xD;&#xA;![](https://i.stack.imgur.com/JhxsL.png)&#xD;&#xA;![](https://i.stack.imgur.com/4BQSG.png)&#xD;&#xA;![](https://i.stack.imgur.com/tvcbq.png)&#xD;&#xA;![](https://i.stack.imgur.com/qZwa9.png)&#xD;&#xA;&#xD;&#xA;Submit.&#xD;&#xA;&#xD;&#xA;Wait one epoch for the change to take place.&#xD;&#xA;&#xD;&#xA;You now have established a unidirectional HRMP channel between parachain 1001 and parachain 1002!&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/oD2T1.png)&#xD;&#xA;&#xD;&#xA;## Create an HRMP channel from parachain 1002 to parachain 1001&#xD;&#xA;&#xD;&#xA;And finally, we **repeat** the same process documented throughout this article but instead we do it from parachain 1002 to parachain 1001 and in doing so we will have succefully created a **bidirectional** HRMP channel.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34312" PostHistoryTypeId="5" PostId="8735" RevisionGUID="393b49f9-9607-4be5-81d8-2a3d823d15f3" CreationDate="2023-06-02T04:44:01.070" UserId="2281" Comment="added 14 characters in body" Text="I am seeing this compile error with `xcm-builder` when building our chain `w/Polkadot 0.9.38`. What should I change to fix it?  This issue is also discussed here https://github.com/paritytech/subport/issues/149 but I wasn't able to get it to work.&#xD;&#xA;```rs&#xD;&#xA;      error[E0046]: not all trait items implemented, missing: `try_successful_origin`&#xD;&#xA;         --&gt; /home/test/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/097ffd2/xcm/xcm-builder/src/origin_conversion.rs:247:1&#xD;&#xA;          |&#xD;&#xA;      247 | / impl&lt;RuntimeOrigin: OriginTrait + Clone, Conversion: Convert&lt;RuntimeOrigin, MultiLocation&gt;&gt;&#xD;&#xA;      248 | |     EnsureOrigin&lt;RuntimeOrigin&gt; for EnsureXcmOrigin&lt;RuntimeOrigin, Conversion&gt;&#xD;&#xA;          | |______________________________________________________________________________^ missing `try_successful_origin` in implementation&#xD;&#xA;          |&#xD;&#xA;          = help: implement the missing item: `fn try_successful_origin() -&gt; Result&lt;OuterOrigin, ()&gt; { todo!() }`&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34313" PostHistoryTypeId="5" PostId="8732" RevisionGUID="2d737de7-9483-4390-b3c9-f2c60dd76a4c" CreationDate="2023-06-02T04:46:30.303" UserId="2281" Comment="added 4 characters in body" Text="I'm customising the `srtool (Substrate runtime toolbox)` for our chain built based on substrate.&#xD;&#xA;&#xD;&#xA;The srtool docker image was built successful, but when Github running test against myChain, it failed with an error&#xD;&#xA;```&#xD;&#xA;  Rust nightly not installed, please install it!&#xD;&#xA;  parse error: Invalid numeric literal at line 1, column 2&#xD;&#xA;  Error: Process completed with exit code 4.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here's how rustup was updated, and toolchain are installed and target is setup in In `Dockerfile`&#xD;&#xA;```sh&#xD;&#xA;RUN echo $SHELL &amp;&amp; \&#xD;&#xA;    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain $RUSTC_VERSION -y  &amp;&amp; \&#xD;&#xA;    . $CARGO_HOME/env &amp;&amp; \&#xD;&#xA;    rustup myChain add stable ${RUSTC_VERSION} &amp;&amp; \&#xD;&#xA;    rustup target add wasm32-unknown-unknown --toolchain $RUSTC_VERSION &amp;&amp; \&#xD;&#xA;    chmod -R a+w $RUSTUP_HOME $CARGO_HOME &amp;&amp; \&#xD;&#xA;    rustup show &amp;&amp; rustc -V&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Not sure why the docker image was built successfully with nightly, but failed in the test.&#xD;&#xA;```&#xD;&#xA;      - name: Run srtool build for ${{ matrix.chain }}&#xD;&#xA;        id: srtool_build&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34314" PostHistoryTypeId="6" PostId="8732" RevisionGUID="2d737de7-9483-4390-b3c9-f2c60dd76a4c" CreationDate="2023-06-02T04:46:30.303" UserId="2281" Comment="added 4 characters in body" Text="|substrate-node|srtool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34315" PostHistoryTypeId="4" PostId="8730" RevisionGUID="31f81d15-286c-471c-a2e0-1597834cc698" CreationDate="2023-06-02T05:13:18.393" UserId="3136" Comment="edited title" Text="How polkadot open there slot for auction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34316" PostHistoryTypeId="2" PostId="8742" RevisionGUID="cc4d313f-c166-4879-878d-6dbde7729969" CreationDate="2023-06-02T05:54:19.057" UserId="4296" Text="We are running public relaychain rpc endpoints and are further deploying polkadot-parachain endpoints, starting with statemine/statemint/westmint.  &#xD;&#xA;&#xD;&#xA;Everything works but when using our endpoints in polkadot.js they don't show the identities of stashes but only the stash itself while in other endpoint the stashed translate to identities. &#xD;&#xA;&#xD;&#xA;So ours only show &quot;HPUEzi4v3YJmhBfSbcGEFFiNKPAGVnGkfDiUzBNTR7j1CxT&quot; while the other endpoints show &quot;LUCKYFRIDAY.IO&quot;. See also [stakeworld rpc](https://polkadot.js.org/apps/?rpc=wss://ksm-rpc.stakeworld.io/statemine#/collators) versus [parity rpc](https://polkadot.js.org/apps/?rpc=wss://statemine-rpc.polkadot.io#/collators)&#xD;&#xA;&#xD;&#xA;It could be that this lookup only works when our node get's included in polkadot.js but I doubt thats the problem.&#xD;&#xA;&#xD;&#xA;The nodes are running on dedicated updated ubuntu 22.04 servers, latest `polkadot-parachain` running via systemctl, open p2p/ws/wss ports, no errors in the logs. Besides the identity problem everything works perfectly. &#xD;&#xA;&#xD;&#xA;What i've tried so far: &#xD;&#xA;* checked that all ports are open&#xD;&#xA;* direct connection vs load balancer&#xD;&#xA;* relaychain connection via rpc `--relay-chain-rpc-urls=` vs running relaychain native via `polkadot-parachain` binary&#xD;&#xA;* relaychain archive node vs pruned node&#xD;&#xA;* downgraded binary (so tried v0.9.420 and v0.9.400)&#xD;&#xA;&#xD;&#xA;Anybody an idea where to look?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34318" PostHistoryTypeId="1" PostId="8742" RevisionGUID="cc4d313f-c166-4879-878d-6dbde7729969" CreationDate="2023-06-02T05:54:19.057" UserId="4296" Text="Polkadot.js not showing identities of stashes on parachain rpc server" ContentLicense="CC BY-SA 4.0" />
  <row Id="34319" PostHistoryTypeId="3" PostId="8742" RevisionGUID="cc4d313f-c166-4879-878d-6dbde7729969" CreationDate="2023-06-02T05:54:19.057" UserId="4296" Text="|polkadot-js|parachain|pallet-identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34320" PostHistoryTypeId="2" PostId="8743" RevisionGUID="8590b043-befb-43c2-b62c-15921fb2d10c" CreationDate="2023-06-02T06:24:02.333" UserId="3136" Text="You can use these commands one by one and check it your rust nightly and rust version using these commands--&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    rustup show&#xD;&#xA;&#xD;&#xA;    rustup target add wasm32-unknown-unknown --toolchain nightly-2023-01-01-x86_64-unknown-linux-gnu&#xD;&#xA;     rustup install nightly-2023-01-01&#xD;&#xA;     rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;     rustup target add wasm32-unknown-unknown --toolchain nightly-2023-01-01-x86_64-unknown-linux-gnu&#xD;&#xA;     rustup target add wasm32-unknown-unknown --toolchain nightly-2023-01-01-x86_64-unknown-linux-gnu" ContentLicense="CC BY-SA 4.0" />
  <row Id="34322" PostHistoryTypeId="5" PostId="8743" RevisionGUID="7bb312ff-24cb-43aa-98a9-aae98436caa5" CreationDate="2023-06-02T06:33:49.907" UserId="3136" Comment="deleted 40 characters in body" Text="You can use these commands one by one and check is it work?&#xD;&#xA;let me know its works or not.&#xD;&#xA;&#xD;&#xA;    rustup target add wasm32-unknown-unknown --toolchain nightly-2023-01-01-x86_64-unknown-linux-gnu&#xD;&#xA;     rustup install nightly-2023-01-01&#xD;&#xA;     rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;     rustup target add wasm32-unknown-unknown --toolchain nightly-2023-01-01-x86_64-unknown-linux-gnu&#xD;&#xA;     rustup target add wasm32-unknown-unknown --toolchain nightly-2023-01-01-x86_64-unknown-linux-gnu" ContentLicense="CC BY-SA 4.0" />
  <row Id="34323" PostHistoryTypeId="5" PostId="8736" RevisionGUID="68eeea41-1ca1-4bbf-8d77-247f975ba11f" CreationDate="2023-06-02T07:12:30.863" UserId="2281" Comment="added 9 characters in body" Text="```sh&#xD;&#xA;    error: failed to select a version for `zstd-sys`.&#xD;&#xA;        ... required by package `zstd-safe v4.1.1+zstd.1.5.0`&#xD;&#xA;        ... which satisfies dependency `zstd-safe = &quot;=4.1.1&quot;` of package `zstd v0.9.0+zstd.1.5.0`&#xD;&#xA;        ... which satisfies dependency `zstd = &quot;^0.9.0&quot;` of package `sp-maybe-compressed-blob v4.1.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sp-maybe-compressed-blob` of package `sc-executor-common v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sc-executor-common` of package `sc-executor v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sc-executor` of package `sc-client-api v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sc-client-api` of package `sc-block-builder v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sc-block-builder` of package `sc-finality-grandpa v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;        ... which satisfies git dependency `sc-finality-grandpa` of package `sc-finality-grandpa-rpc v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;&#xD;&#xA;``" ContentLicense="CC BY-SA 4.0" />
  <row Id="34324" PostHistoryTypeId="5" PostId="8742" RevisionGUID="867efaac-90ef-48af-b106-cb3191a908e1" CreationDate="2023-06-02T08:54:34.343" UserId="4296" Comment="added 95 characters in body" Text="We are running public relaychain rpc endpoints and are further deploying polkadot-parachain endpoints, starting with statemine/statemint/westmint.  &#xD;&#xA;&#xD;&#xA;Everything works but when using our endpoints in polkadot.js they don't show the identities of stashes but only the stash itself while in other endpoint the stashed translate to identities. &#xD;&#xA;&#xD;&#xA;So ours only show &quot;HPUEzi4v3YJmhBfSbcGEFFiNKPAGVnGkfDiUzBNTR7j1CxT&quot; while the other endpoints show &quot;LUCKYFRIDAY.IO&quot;. See also [stakeworld rpc](https://polkadot.js.org/apps/?rpc=wss://ksm-rpc.stakeworld.io/statemine#/collators) versus [parity rpc](https://polkadot.js.org/apps/?rpc=wss://statemine-rpc.polkadot.io#/collators)&#xD;&#xA;&#xD;&#xA;It could be that this lookup only works when our node get's included in polkadot.js but I doubt thats the problem.&#xD;&#xA;&#xD;&#xA;The nodes are running on dedicated updated ubuntu 22.04 servers, latest `polkadot-parachain` running via systemctl, open p2p/ws/wss ports, no errors in the logs. Besides the identity problem everything works perfectly. &#xD;&#xA;&#xD;&#xA;What i've tried so far: &#xD;&#xA;* checked that all ports are open&#xD;&#xA;* direct connection vs load balancer&#xD;&#xA;* relaychain connection via rpc `--relay-chain-rpc-urls=` vs running relaychain native via `polkadot-parachain` binary&#xD;&#xA;* relaychain archive node vs pruned node&#xD;&#xA;* downgraded binary (so tried v0.9.420 and v0.9.400)&#xD;&#xA;* Looked at chrome developer tool/console to see if there are specific errors (no difference)&#xD;&#xA;&#xD;&#xA;Anybody an idea where to look?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34326" PostHistoryTypeId="4" PostId="8730" RevisionGUID="d7837e06-1fa2-4cb7-a701-b05e5e5467c5" CreationDate="2023-06-02T09:46:33.640" UserId="3136" Comment="edited title" Text="How polkadot open their slot for auction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34327" PostHistoryTypeId="2" PostId="8744" RevisionGUID="b56aca87-78cb-48e1-a6db-9b6ab569db1d" CreationDate="2023-06-02T09:57:52.713" UserId="3752" Text="I have sorted this by myself. &#xD;&#xA;The Error was because of MetaMask wallet. Sometimes the transaction fails and the nonce of MetaMask wallet increases but the chain expects the previous nonce. &#xD;&#xA;&#xD;&#xA;After reseting the MetaMask Account and Nonce to 0, I Initialised transactions and every transaction was executing smoothly. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34329" PostHistoryTypeId="2" PostId="8745" RevisionGUID="7f9d03df-2533-4bd4-bb29-a8842d649846" CreationDate="2023-06-02T10:24:34.313" UserId="2372" Text="     `the trait bound` `&lt;RuntimeApi as ConstructRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_service::client::client::Client&lt;sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, NativeElseWasmExecutor&lt;ExecutorDispatch&gt;&gt;, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, RuntimeApi&gt;&gt;&gt;::RuntimeApi: fp_rpc::ConvertTransactionRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;` is not satisfied&#xD;&#xA;        --&gt; node/service/src/lib.rs:1279:30&#xD;&#xA;         |&#xD;&#xA;    1279 |             polkadot_rpc::create_full(deps,subscription_executor.clone(), backend.clone()).map_err(Into::into)&#xD;&#xA;         |             ------------------------- ^^^^ the trait `fp_rpc::ConvertTransactionRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;` is not implemented for `&lt;RuntimeApi as ConstructRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_service::client::client::Client&lt;sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, NativeElseWasmExecutor&lt;ExecutorDispatch&gt;&gt;, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, RuntimeApi&gt;&gt;&gt;::RuntimeApi`&#xD;&#xA;         |             |&#xD;&#xA;         |             required by a bound introduced by this call&#xD;&#xA;         |&#xD;&#xA;    note: required by a bound in `polkadot_rpc::create_full`&#xD;&#xA;        --&gt; /Users/user/parachain/peer-polka/rpc/src/lib.rs:205:10&#xD;&#xA;         |&#xD;&#xA;    205  |     C::Api: fp_rpc::ConvertTransactionRuntimeApi&lt;Block&gt;,    &#xD;&#xA;         |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `create_full`&#xD;&#xA;    help: consider further restricting the associated type&#xD;&#xA;         |&#xD;&#xA;    910  |     OverseerGenerator: OverseerGen, &lt;RuntimeApi as ConstructRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_service::client::client::Client&lt;sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, NativeElseWasmExecutor&lt;ExecutorDispatch&gt;&gt;, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, RuntimeApi&gt;&gt;&gt;::RuntimeApi: fp_rpc::ConvertTransactionRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt; &#xD;&#xA;&#xD;&#xA;I'm integrating the Frontier in the Relay Chain. But in the service.rs i'm facing this issue. I've already mentioned this in the runtime. &#xD;&#xA;&#xD;&#xA;    impl fp_rpc::ConvertTransaction&lt;opaque::UncheckedExtrinsic&gt; for TransactionConverter {&#xD;&#xA;    	fn convert_transaction(&#xD;&#xA;    		&amp;self,&#xD;&#xA;    		transaction: pallet_ethereum::Transaction,&#xD;&#xA;    	) -&gt; opaque::UncheckedExtrinsic {&#xD;&#xA;    		let extrinsic = UncheckedExtrinsic::new_unsigned(&#xD;&#xA;    			pallet_ethereum::Call::&lt;Runtime&gt;::transact { transaction }.into(),&#xD;&#xA;    		);&#xD;&#xA;    		let encoded = extrinsic.encode();&#xD;&#xA;    		opaque::UncheckedExtrinsic::decode(&amp;mut &amp;encoded[..])&#xD;&#xA;    			.expect(&quot;Encoded extrinsic is always valid&quot;)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;        " ContentLicense="CC BY-SA 4.0" />
  <row Id="34331" PostHistoryTypeId="1" PostId="8745" RevisionGUID="7f9d03df-2533-4bd4-bb29-a8842d649846" CreationDate="2023-06-02T10:24:34.313" UserId="2372" Text="the trait bound `&lt;RuntimeApi as ConstructRuntimeApi&lt;sp_runtime::generic::Block&lt;, OpaqueExtrinsic&gt;&gt;` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="34332" PostHistoryTypeId="3" PostId="8745" RevisionGUID="7f9d03df-2533-4bd4-bb29-a8842d649846" CreationDate="2023-06-02T10:24:34.313" UserId="2372" Text="|relay-chain|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34333" PostHistoryTypeId="2" PostId="8746" RevisionGUID="3a0e34bc-c815-4708-b10d-5fdbdd8cb1e7" CreationDate="2023-06-02T13:59:02.907" UserId="2898" Text="I want to change some of the `on_chain` data after running some asynchronous task running in `task_manager`. What is the best way to achieve this?&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="34335" PostHistoryTypeId="1" PostId="8746" RevisionGUID="3a0e34bc-c815-4708-b10d-5fdbdd8cb1e7" CreationDate="2023-06-02T13:59:02.907" UserId="2898" Text="What is the best practice to change on-chain storage from asynchronous task?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34336" PostHistoryTypeId="3" PostId="8746" RevisionGUID="3a0e34bc-c815-4708-b10d-5fdbdd8cb1e7" CreationDate="2023-06-02T13:59:02.907" UserId="2898" Text="|pallet|runtime|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34337" PostHistoryTypeId="2" PostId="8747" RevisionGUID="e6194891-c38d-4283-aa19-be4e2df5780f" CreationDate="2023-06-02T14:50:08.113" UserId="258" Text="I am writing a test to test evm contract instantiation using polkadot api. &#xD;&#xA;&#xD;&#xA;I get to derive the evm account like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const alice = keyring.addFromUri('//Alice', { name: 'Alice default' });&#xD;&#xA;const aliceEthAccount = addressToEvm(alice.addressRaw);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;where `addressToEvm` is an helper function from @polkadot/util-crypto&#xD;&#xA;&#xD;&#xA; This piece of code from [frontier][1] does the conversion from H160 to AccountId on chain&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn into_account_id(address: H160) -&gt; AccountId32 {&#xD;&#xA;		let mut data = [0u8; 24];&#xD;&#xA;		data[0..4].copy_from_slice(b&quot;evm:&quot;);&#xD;&#xA;		data[4..24].copy_from_slice(&amp;address[..]);&#xD;&#xA;		let hash = H::hash(&amp;data);&#xD;&#xA;&#xD;&#xA;		AccountId32::from(Into::&lt;[u8; 32]&gt;::into(hash))&#xD;&#xA; }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But then when i feed the `aliceEthAccount` to my extrinsic to instantiate the evm contract, i get an address which does not correspond to my alice substrate address, which makes the origin wrong and also funds cannot be withdrawn from that wrong generated address.&#xD;&#xA;&#xD;&#xA;Am i missing something? or is the way i am generating the H160(ethereum account) address wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/PureStake/frontier/blob/master/frame/evm/src/lib.rs#L533" ContentLicense="CC BY-SA 4.0" />
  <row Id="34339" PostHistoryTypeId="1" PostId="8747" RevisionGUID="e6194891-c38d-4283-aa19-be4e2df5780f" CreationDate="2023-06-02T14:50:08.113" UserId="258" Text="I Can't Generate The right AccountId from Ethereum(H160) Address" ContentLicense="CC BY-SA 4.0" />
  <row Id="34340" PostHistoryTypeId="3" PostId="8747" RevisionGUID="e6194891-c38d-4283-aa19-be4e2df5780f" CreationDate="2023-06-02T14:50:08.113" UserId="258" Text="|polkadot-js|smart-contract|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34341" PostHistoryTypeId="2" PostId="8748" RevisionGUID="4366abf0-1a2e-4dc0-bcc9-70931345754f" CreationDate="2023-06-02T15:17:26.657" UserId="3711" Text="I've used `Mapping`, `BTreeSet`, `BTreeMap` and `Vec` for various purposes in our ink contract and have observed the contract size fluctuating based on usage of these four data structures. This leads me to the question of what data structures are best in regards to reducing contract size?&#xD;&#xA;&#xD;&#xA;We currently have a 128KB contract size limit which I have hit many times now." ContentLicense="CC BY-SA 4.0" />
  <row Id="34343" PostHistoryTypeId="1" PostId="8748" RevisionGUID="4366abf0-1a2e-4dc0-bcc9-70931345754f" CreationDate="2023-06-02T15:17:26.657" UserId="3711" Text="How much do data structures contribute towards ink contract storage size?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34344" PostHistoryTypeId="3" PostId="8748" RevisionGUID="4366abf0-1a2e-4dc0-bcc9-70931345754f" CreationDate="2023-06-02T15:17:26.657" UserId="3711" Text="|ink|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34345" PostHistoryTypeId="2" PostId="8749" RevisionGUID="f61ad102-40c2-423f-9d14-5b0ecfafc1da" CreationDate="2023-06-02T15:17:26.657" UserId="3711" Text="I've done a bunch of benchmarking [here](https://github.com/goastler/ink_contract_size_benchmark). This takes an empty ink contract and adds data structures to the contract storage, observing the change in contract size under debug and release conditions. Here's an excerpt:&#xD;&#xA;&#xD;&#xA;## Results&#xD;&#xA;Takeaways (from release contract size):&#xD;&#xA;- an empty contract is 0.8KB&#xD;&#xA;&#xD;&#xA;### Importing (i.e. 1 use of the data structure in the contract storage)&#xD;&#xA;- importing `Vec` is 2KB&#xD;&#xA;- importing `BTreeSet` is 8.3KB&#xD;&#xA;- importing `BTreeMap` is 9.1KB&#xD;&#xA;- importing `BTreeMap` and `BTreeSet` is 16.1KB, which is less than their combined sizes so there is some shared code here&#xD;&#xA;- a single `Mapping` takes 0.5KB&#xD;&#xA;&#xD;&#xA;### Additional (i.e. 2 uses of the data structure in the contract storage)&#xD;&#xA;- adding another `Vec` adds 2.3KB&#xD;&#xA;- adding another `BTreeSet` adds 0.4KB&#xD;&#xA;- adding another `BTreeMap` adds 0.5KB, so `BTreeMap` is slightly heavier than `BTreeSet`&#xD;&#xA;- adding another `Mapping` takes 0.6KB&#xD;&#xA;&#xD;&#xA;### As the value type of `Mapping` (on top of the 0.5KB for a `Mapping` in the first place) (e.g. `Mapping&lt;AccountId, BTreeSet&lt;AccountId&gt;&gt;`)&#xD;&#xA;- a `Mapping` with `Vec` adds 0.6KB&#xD;&#xA;- a `Mapping` with `BTreeSet` adds ~0KB (I think this is small because a lot of the `BTreeSet` functionality is not used due to it being the value of a `Mapping`, and therefore removed from the contract)&#xD;&#xA;- a `Mapping` with `BTreeMap` adds 0.4KB&#xD;&#xA;&#xD;&#xA;### Comparison&#xD;&#xA;- `Mapping` is a lot lighter-weight than `BTreeSet` or `BTreeMap` to import (I imagine this is because `Mapping` is always compiled into the contract, so is present in the empty contract and importing it does not do anything. This is supported by the single `Mapping` contract increase being almost equal to that of adding another `Mapping` above)&#xD;&#xA;- adding additional `Mapping`, `BTreeSet` or `BTreeMap` increases contract size by ~0.5KB for each&#xD;&#xA;- adding additional `Vec` is rather expensive at 2.3KB each, but the original import is much smaller than `BTreeSet` or `BTreeMap`&#xD;&#xA;- having data structures like `Vec`, `BTreeSet` or `BTreeMap` loaded via a `Mapping` costs less than having them in the contract storage directly. (I imagine this is because much of their functionality can be optimised away based on their usage)&#xD;&#xA;&#xD;&#xA;|Type|Import size (KB)|Usage size (KB)|&#xD;&#xA;|---|---|---|&#xD;&#xA;|`Mapping`|0.5|0.6|&#xD;&#xA;|`BTreeSet`|8.7|0.4|&#xD;&#xA;|`BTreeMap`|9.1|0.5|&#xD;&#xA;|`Vec`|2|2.3|&#xD;&#xA;* import size is the cost of using only 1 of the data structure&#xD;&#xA;* usage size is the cost of each additional use of the data structure&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;## Tldr;&#xD;&#xA;- Avoiding `BTreeSet` or `BTreeMap` can save ~10KB&#xD;&#xA;- Each `Vec` cost ~2KB&#xD;&#xA;- Use `Mapping` (or `BTreeSet` or `BTreeMap` if already in use elsewhere) over `Vec` where possible to save ~1.5KB&#xD;&#xA;- Adding additional `Mapping`, `BTreeSet` or `BTreeMap` all cost approximately the same amount (~0.5KB)&#xD;&#xA;- Lazy load `BTreeSet`, `BTreeMap` and `Vec` to save ~0.6KB at most&#xD;&#xA;- Using five or more `BTreeSet`s or `BTreeMap`s is more cost-effective than using `Vec`s overall&#xD;&#xA;- Using less than five `Vec`s is more cost-effective than using `BTreeSet`s or `BTreeMap`s overall" ContentLicense="CC BY-SA 4.0" />
  <row Id="34347" PostHistoryTypeId="5" PostId="7782" RevisionGUID="c5207d15-20eb-487e-9d60-3a5260ef9abc" CreationDate="2023-06-02T16:38:48.130" UserId="19" Comment="added 10 characters in body" Text="Around one year ago I have implemented simple DEX in ink!, but today I want to migrate the code to newest `ink!` and I have an error, in the code I have:&#xD;&#xA;&#xD;&#xA;`use ink_storage::collections::HashMap;`&#xD;&#xA;&#xD;&#xA;And this line made me strong headache. Is is possible to use `HashMap` in ink! If so, how?&#xD;&#xA;&#xD;&#xA;I know that the question could be &quot;simple&quot; for someone who writes `ink!` on daily basis, but I would say thanks for three cents of empathy and awareness that not everyone writes code in `ink!` every day. I was looking for the answer in documentation, and the link that in my humble opinion makes sense, does not work: https://paritytech.github.io/substrate/master/scale_info/prelude/collections/struct.HashMap.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="34348" PostHistoryTypeId="2" PostId="8750" RevisionGUID="45ef5a89-85f7-419b-b4ae-f6ff2c5fe282" CreationDate="2023-06-02T17:22:31.930" UserId="504" Text="I have a pallet that does some light calculation on one or more storage items (`GasReserve` and `IdleFunds` below) or wraps some internal functionality. E.g.&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        pub fn get_time() -&gt; Option&lt;T::BlockNumber&gt; {&#xD;&#xA;            T::Scheduler::next_dispatch_time(b&quot;sum/name&quot;).ok()&#xD;&#xA;        }&#xD;&#xA;        pub fn idle_surplus_funds() -&gt; BalanceOf&lt;T&gt; {&#xD;&#xA;            Self::idle_funds().saturating_sub(Self::gas_reserve())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would want this function to be directly accessible to a frontend using `polkadot.js` API. These getters don't modify state, so I don't want to expose them as extrinsics using `#[pallet::call]`.&#xD;&#xA;Any fn defined as `#[pallet::getter(fn fn_name)]` on a storage item becomes available through `api.query.pallet.fn_name`&#xD;&#xA;&#xD;&#xA;I want to similarly expose the above funtion which does not directly map to a single storage item. Is this possible somehow? Preferably without creating a `RuntimeApi` section on this pallet, these getters are not relevant to the substrate client, only to a web frontend.&#xD;&#xA;&#xD;&#xA;Benefit of exposing these: Code duplication between frontend and backend is avoided (as the frontend would have to query the underlying storage items and then compute the result internally), helping maintainability." ContentLicense="CC BY-SA 4.0" />
  <row Id="34350" PostHistoryTypeId="1" PostId="8750" RevisionGUID="45ef5a89-85f7-419b-b4ae-f6ff2c5fe282" CreationDate="2023-06-02T17:22:31.930" UserId="504" Text="Expose a custom `pub fn` from my pallet to frontend via polkadot.js API" ContentLicense="CC BY-SA 4.0" />
  <row Id="34351" PostHistoryTypeId="3" PostId="8750" RevisionGUID="45ef5a89-85f7-419b-b4ae-f6ff2c5fe282" CreationDate="2023-06-02T17:22:31.930" UserId="504" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34352" PostHistoryTypeId="2" PostId="8751" RevisionGUID="0c91a9da-7bd6-4803-9f1e-5ca9278d0cd5" CreationDate="2023-06-02T18:02:30.163" UserId="4298" Text="how can i use the complex structure(like Mapping&lt;String, Vec&lt;Map&lt;String, String&gt;&gt;&gt;) in ink!&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod mycontract {&#xD;&#xA;    use ink_prelude::string::String;&#xD;&#xA;    use ink_prelude::vec::Vec;&#xD;&#xA;    use ink_storage::{traits::SpreadAllocate, Mapping};&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    /// Defines the storage of your contract.&#xD;&#xA;    /// Add new fields to the below struct in order&#xD;&#xA;    /// to add new static storage fields to your contract.&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Mycontract {&#xD;&#xA;        /// 存储 key 对应的哈希值&#xD;&#xA;        hash_value_map: Mapping&lt;String, Vec&lt;Mapping&lt;String, String&gt;&gt;&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Mycontract {&#xD;&#xA;&#xD;&#xA;        /// 合约构造器，用于合约的初始化&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn default() -&gt; Self {&#xD;&#xA;            ink_lang::utils::initialize_contract(|_: &amp;mut Self| {})&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn set_data(&amp;mut self, key_value:String, data:i32) {&#xD;&#xA;            match self.hash_value_map.get(&amp;key_value) {&#xD;&#xA;                None =&gt; {&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;                Some(test) =&gt; {&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            // match self.hash_value_map.get(&amp;key_value) {&#xD;&#xA;            //     None =&gt; {&#xD;&#xA;            //         let mut vec:Vec&lt;i32&gt; = Vec::new();&#xD;&#xA;            //         vec.push(data);&#xD;&#xA;            //         self.hash_value_map.insert(key_value, &amp;vec);&#xD;&#xA;            //     }&#xD;&#xA;            //     Some(mut vec) =&gt; {&#xD;&#xA;            //         vec.push(data);&#xD;&#xA;            //         self.hash_value_map.insert(key_value, &amp;vec);&#xD;&#xA;            //     }&#xD;&#xA;            // }&#xD;&#xA;        }&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_data(&amp;self, hash_key: String) -&gt; Result&lt;String,String&gt; {&#xD;&#xA;            // match self.hash_value_map.get(&amp;hash_key) {&#xD;&#xA;            //     None =&gt; {&#xD;&#xA;            //         return Err(String::from(&quot;DATA_NOT_FOUND&quot;))&#xD;&#xA;            //     }&#xD;&#xA;            //     Some(vec) =&gt; {&#xD;&#xA;            //         return Ok(vec)&#xD;&#xA;            //     }&#xD;&#xA;            // };&#xD;&#xA;            return Ok(String::from(&quot;Test&quot;))&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /// Unit tests in Rust are normally defined within such a `#[cfg(test)]`&#xD;&#xA;    /// module and test functions are marked with a `#[test]` attribute.&#xD;&#xA;    /// The below code is technically just normal Rust code.&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        /// Imports all the definitions from the outer scope so we can use them here.&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        /// Imports `ink_lang` so we can use `#[ink::test]`.&#xD;&#xA;        use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;        /// We test if the default constructor does its job.&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn default_works() {&#xD;&#xA;            let _mycontract = Mycontract::default();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;i try this, but there are some errors&#xD;&#xA;```&#xD;&#xA;error[E0599]: the method `get` exists for struct `ink_storage::Mapping&lt;std::string::String, std::vec::Vec&lt;ink_storage::Mapping&lt;std::string::String, std::string::String&gt;&gt;&gt;`, but its trait bounds were not satisfied&#xD;&#xA;  --&gt; lib.rs:30:39&#xD;&#xA;   |&#xD;&#xA;30 |               match self.hash_value_map.get(&amp;key_value) {&#xD;&#xA;   |                                         ^^^ method cannot be called on `ink_storage::Mapping&lt;std::string::String, std::vec::Vec&lt;ink_storage::Mapping&lt;std::string::String, std::string::String&gt;&gt;&gt;` due to unsatisfied trait bounds&#xD;&#xA;   |&#xD;&#xA;   = note: the following trait bounds were not satisfied:&#xD;&#xA;           `std::vec::Vec&lt;ink_storage::Mapping&lt;std::string::String, std::string::String&gt;&gt;: ink_storage::traits::PackedLayout`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0599`.&#xD;&#xA;error: could not compile `mycontract` due to previous error&#xD;&#xA;Error: Compilation failed with toolchain `nightly-2022-06-30-x86_64-unknown-linux-gnu`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    command failed: &quot;cargo&quot; &quot;check&quot; &quot;--target-dir&quot; &quot;/root/mycontract/target/dylint/target/nightly-2022-06-30-x86_64-unknown-linux-gnu&quot; &quot;--manifest-path&quot; &quot;/root/mycontract/Cargo.toml&quot;&#xD;&#xA;ERROR: `&quot;/root/.rustup/toolchains/nightly-2022-12-24-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;dylint&quot; &quot;--lib&quot; &quot;ink_linting&quot; &quot;--manifest-path=/root/mycontract/Cargo.toml&quot;` failed with exit code: Some(1)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34354" PostHistoryTypeId="1" PostId="8751" RevisionGUID="0c91a9da-7bd6-4803-9f1e-5ca9278d0cd5" CreationDate="2023-06-02T18:02:30.163" UserId="4298" Text="How can I use complex structure in ink! version3" ContentLicense="CC BY-SA 4.0" />
  <row Id="34355" PostHistoryTypeId="3" PostId="8751" RevisionGUID="0c91a9da-7bd6-4803-9f1e-5ca9278d0cd5" CreationDate="2023-06-02T18:02:30.163" UserId="4298" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34356" PostHistoryTypeId="2" PostId="8752" RevisionGUID="2d94a797-9abd-467d-bf89-5e7c1ce3bc9b" CreationDate="2023-06-02T18:42:19.550" UserId="2898" Text="There is not much info about using an asynchronous task in substrate docs i.e. `task_manager` in `service.rs`&#xD;&#xA;&#xD;&#xA;I want to know when one should be using offchain-worker and when one should use background asynchronous tasks.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34358" PostHistoryTypeId="1" PostId="8752" RevisionGUID="2d94a797-9abd-467d-bf89-5e7c1ce3bc9b" CreationDate="2023-06-02T18:42:19.550" UserId="2898" Text="offchain-workers vs asynchronous task" ContentLicense="CC BY-SA 4.0" />
  <row Id="34359" PostHistoryTypeId="3" PostId="8752" RevisionGUID="2d94a797-9abd-467d-bf89-5e7c1ce3bc9b" CreationDate="2023-06-02T18:42:19.550" UserId="2898" Text="|runtime|offchain-worker|service|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34360" PostHistoryTypeId="2" PostId="8753" RevisionGUID="ac30140b-b565-4d79-a3cb-19eb1a9d69d4" CreationDate="2023-06-02T19:59:05.473" UserId="1793" Text="Try update to latest version of polkadot typegen and use this&#xD;&#xA;&#xD;&#xA;    &quot;generate:defs&quot;: &quot;node --experimental-specifier-resolution=node --loader ts-node/esm  node_modules/.bin/polkadot-types-from-defs --package dscp-matchmaker-api/interfaces  --input ./src/interfaces --endpoint ./metadata.json&quot;,&#xD;&#xA;    &quot;generate:meta&quot;: &quot;node --experimental-specifier-resolution=node --loader ts-node/esm  node_modules/.bin/polkadot-types-from-chain --endpoint ./metadata.json --output ./src/interfaces&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34362" PostHistoryTypeId="2" PostId="8754" RevisionGUID="6fecbd78-a4dd-4447-8938-557aa5ac06db" CreationDate="2023-06-03T00:33:39.680" UserId="251" Text="There isn’t Alice or Bob in H160.&#xD;&#xA;&#xD;&#xA;Use these instead:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;	{&#xD;&#xA;		&quot;name&quot;: &quot;Alith&quot;,&#xD;&#xA;		&quot;p&quot;: &quot;0x02509540919faacf9ab52146c9aa40db68172d83777250b28e4679176e49ccdd9f&quot;,&#xD;&#xA;		&quot;s&quot;: &quot;0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133&quot;&#xD;&#xA;	},&#xD;&#xA;	{&#xD;&#xA;		&quot;name&quot;: &quot;Baltathar&quot;,&#xD;&#xA;		&quot;p&quot;: &quot;0x033bc19e36ff1673910575b6727a974a9abd80c9a875d41ab3e2648dbfb9e4b518&quot;,&#xD;&#xA;		&quot;s&quot;: &quot;0x8075991ce870b93a8870eca0c0f91913d12f47948ca0fd25b49c6fa7cdbeee8b&quot;&#xD;&#xA;	},&#xD;&#xA;	{&#xD;&#xA;		&quot;name&quot;: &quot;Charleth&quot;,&#xD;&#xA;		&quot;p&quot;: &quot;0x0234637bdc0e89b5d46543bcbf8edff329d2702bc995e27e9af4b1ba009a3c2a5e&quot;,&#xD;&#xA;		&quot;s&quot;: &quot;0x0b6e18cafb6ed99687ec547bd28139cafdd2bffe70e6b688025de6b445aa5c5b&quot;&#xD;&#xA;	},&#xD;&#xA;	{&#xD;&#xA;		&quot;name&quot;: &quot;Dorothy&quot;,&#xD;&#xA;		&quot;p&quot;: &quot;0x02a00d60b2b408c2a14c5d70cdd2c205db8985ef737a7e55ad20ea32cc9e7c417c&quot;,&#xD;&#xA;		&quot;s&quot;: &quot;0x39539ab1876910bbf3a223d84a29e28f1cb4e2e456503e7e91ed39b2e7223d68&quot;&#xD;&#xA;	},&#xD;&#xA;	{&#xD;&#xA;		&quot;name&quot;: &quot;Ethan&quot;,&#xD;&#xA;		&quot;p&quot;: &quot;0x025cdc005b752651cd3f728fb9192182acb3a9c89e19072cbd5b03f3ee1f1b3ffa&quot;,&#xD;&#xA;		&quot;s&quot;: &quot;0x7dce9bc8babb68fec1409be38c8e1a52650206a7ed90ff956ae8a6d15eeaaef4&quot;&#xD;&#xA;	},&#xD;&#xA;	{&#xD;&#xA;		&quot;name&quot;: &quot;Faith&quot;,&#xD;&#xA;		&quot;p&quot;: &quot;0x037964b6c9d546da4646ada28a99e34acaa1d14e7aba861a9055f9bd200c8abf74&quot;,&#xD;&#xA;		&quot;s&quot;: &quot;0xb9d2ea9a615f3165812e8d44de0d24da9bbd164b65c4f0573e1ce2c8dbd9c8df&quot;&#xD;&#xA;	}&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These built in keys can also be found at https://github.com/polkadot-js/common. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34364" PostHistoryTypeId="5" PostId="8737" RevisionGUID="98785224-6e45-4932-95e0-68a981fa39e6" CreationDate="2023-06-03T00:37:14.493" UserId="251" Comment="added 2 characters in body" Text="You can add a trait to do this.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::config]&#xD;&#xA;trait Config: frame_system::Config {&#xD;&#xA;  AccountIdConvertor: AccountIdConvertor&lt;Self::AccountId&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;trait AccountIdConvertor&lt;A&gt; {&#xD;&#xA;  fn to_32(a: A) -&gt; AccountId32;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::call]&#xD;&#xA;fn c(origin: OriginFor&lt;T&gt;) {&#xD;&#xA;  let a = ensure_signed(origin)?;&#xD;&#xA;  let a_32 = T::AccountIdConvertor::to_u32(a);&#xD;&#xA;&#xD;&#xA;  ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or you can limit only accountid32 chain can use this pallet.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::config]&#xD;&#xA;trait Config: frame_system::Config&lt;AccountId = AccountId32&gt; {}&#xD;&#xA;&#xD;&#xA;..&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34367" PostHistoryTypeId="5" PostId="8752" RevisionGUID="33ef0ab5-6d8b-43c2-845a-d31ca01439eb" CreationDate="2023-06-03T02:04:50.753" UserId="354" Comment="added 2 characters in body" Text="There is not much info about using an asynchronous task in substrate docs i.e. `task_manager` in `service.rs`&#xD;&#xA;&#xD;&#xA;I want to know when one should be using `offchain-worker` and when one should use background asynchronous tasks.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34368" PostHistoryTypeId="52" PostId="8748" RevisionGUID="b8acec1a-08e2-4100-bf5e-87b4a3201510" CreationDate="2023-06-03T02:55:21.607" />
  <row Id="34369" PostHistoryTypeId="5" PostId="8734" RevisionGUID="ec6e81f9-743f-4058-af83-afdf48a8c454" CreationDate="2023-06-03T05:34:38.150" UserId="2281" Comment="added 6 characters in body" Text="I get the following error when trying to convert my `frame_system::Config::AccountId` to a `MultiAddress`.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;expected enum `MultiAddress&lt;sp_runtime::AccountId32, ()&gt;`&#xD;&#xA;   found enum `MultiAddress&lt;&lt;T as frame_system::Config&gt;::AccountId, _&gt;`&#xD;&#xA;consider constraining the associated type `&lt;T as frame_system::Config&gt;::AccountId` to `sp_runtime::AccountId32`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the code that fails to create a `MultiAddress` from the `AccountId`.&#xD;&#xA;```rs&#xD;&#xA;Self::ensure_pallet_enabled()?;&#xD;&#xA;&#xD;&#xA;let staker = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;let location: MultiLocation = MultiLocation {&#xD;&#xA;    parents: 1,&#xD;&#xA;    interior: Here,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;let create_nomination_pool =&#xD;&#xA;                RuntimeCall::NominationPools(pallet_nomination_pools::Call::&lt;&#xD;&#xA;                    polkadot_runtime::Runtime,&#xD;&#xA;                &gt;::create {&#xD;&#xA;                    amount: 10000,&#xD;&#xA;                    root: MultiAddress::from(staker),&#xD;&#xA;                    nominator: MultiAddress::from(staker),&#xD;&#xA;                    bouncer: MultiAddress::from(staker),&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the type of my `frame_system::Config::AccountId`.&#xD;&#xA;```rs&#xD;&#xA;pub type AccountId = &lt;&lt;Signature as sp_runtime::traits::Verify&gt;::Signer as sp_runtime::traits::IdentifyAccount&gt;::AccountId;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34370" PostHistoryTypeId="5" PostId="8751" RevisionGUID="8a3f86c5-3622-4575-9466-f54172da8fe5" CreationDate="2023-06-03T05:37:30.337" UserId="2281" Comment="added 14 characters in body; edited tags" Text="how can i use the complex structure`(like Mapping&lt;String, Vec&lt;Map&lt;String, String&gt;&gt;&gt;)` in ink!&#xD;&#xA;```rs&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod mycontract {&#xD;&#xA;    use ink_prelude::string::String;&#xD;&#xA;    use ink_prelude::vec::Vec;&#xD;&#xA;    use ink_storage::{traits::SpreadAllocate, Mapping};&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    /// Defines the storage of your contract.&#xD;&#xA;    /// Add new fields to the below struct in order&#xD;&#xA;    /// to add new static storage fields to your contract.&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(SpreadAllocate)]&#xD;&#xA;    pub struct Mycontract {&#xD;&#xA;        /// 存储 key 对应的哈希值&#xD;&#xA;        hash_value_map: Mapping&lt;String, Vec&lt;Mapping&lt;String, String&gt;&gt;&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Mycontract {&#xD;&#xA;&#xD;&#xA;        /// 合约构造器，用于合约的初始化&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn default() -&gt; Self {&#xD;&#xA;            ink_lang::utils::initialize_contract(|_: &amp;mut Self| {})&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn set_data(&amp;mut self, key_value:String, data:i32) {&#xD;&#xA;            match self.hash_value_map.get(&amp;key_value) {&#xD;&#xA;                None =&gt; {&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;                Some(test) =&gt; {&#xD;&#xA;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            // match self.hash_value_map.get(&amp;key_value) {&#xD;&#xA;            //     None =&gt; {&#xD;&#xA;            //         let mut vec:Vec&lt;i32&gt; = Vec::new();&#xD;&#xA;            //         vec.push(data);&#xD;&#xA;            //         self.hash_value_map.insert(key_value, &amp;vec);&#xD;&#xA;            //     }&#xD;&#xA;            //     Some(mut vec) =&gt; {&#xD;&#xA;            //         vec.push(data);&#xD;&#xA;            //         self.hash_value_map.insert(key_value, &amp;vec);&#xD;&#xA;            //     }&#xD;&#xA;            // }&#xD;&#xA;        }&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_data(&amp;self, hash_key: String) -&gt; Result&lt;String,String&gt; {&#xD;&#xA;            // match self.hash_value_map.get(&amp;hash_key) {&#xD;&#xA;            //     None =&gt; {&#xD;&#xA;            //         return Err(String::from(&quot;DATA_NOT_FOUND&quot;))&#xD;&#xA;            //     }&#xD;&#xA;            //     Some(vec) =&gt; {&#xD;&#xA;            //         return Ok(vec)&#xD;&#xA;            //     }&#xD;&#xA;            // };&#xD;&#xA;            return Ok(String::from(&quot;Test&quot;))&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /// Unit tests in Rust are normally defined within such a `#[cfg(test)]`&#xD;&#xA;    /// module and test functions are marked with a `#[test]` attribute.&#xD;&#xA;    /// The below code is technically just normal Rust code.&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        /// Imports all the definitions from the outer scope so we can use them here.&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        /// Imports `ink_lang` so we can use `#[ink::test]`.&#xD;&#xA;        use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;        /// We test if the default constructor does its job.&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn default_works() {&#xD;&#xA;            let _mycontract = Mycontract::default();&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**`i try this, but there are some errors`**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0599]: the method `get` exists for struct `ink_storage::Mapping&lt;std::string::String, std::vec::Vec&lt;ink_storage::Mapping&lt;std::string::String, std::string::String&gt;&gt;&gt;`, but its trait bounds were not satisfied&#xD;&#xA;  --&gt; lib.rs:30:39&#xD;&#xA;   |&#xD;&#xA;30 |               match self.hash_value_map.get(&amp;key_value) {&#xD;&#xA;   |                                         ^^^ method cannot be called on `ink_storage::Mapping&lt;std::string::String, std::vec::Vec&lt;ink_storage::Mapping&lt;std::string::String, std::string::String&gt;&gt;&gt;` due to unsatisfied trait bounds&#xD;&#xA;   |&#xD;&#xA;   = note: the following trait bounds were not satisfied:&#xD;&#xA;           `std::vec::Vec&lt;ink_storage::Mapping&lt;std::string::String, std::string::String&gt;&gt;: ink_storage::traits::PackedLayout`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0599`.&#xD;&#xA;error: could not compile `mycontract` due to previous error&#xD;&#xA;Error: Compilation failed with toolchain `nightly-2022-06-30-x86_64-unknown-linux-gnu`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    command failed: &quot;cargo&quot; &quot;check&quot; &quot;--target-dir&quot; &quot;/root/mycontract/target/dylint/target/nightly-2022-06-30-x86_64-unknown-linux-gnu&quot; &quot;--manifest-path&quot; &quot;/root/mycontract/Cargo.toml&quot;&#xD;&#xA;ERROR: `&quot;/root/.rustup/toolchains/nightly-2022-12-24-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;dylint&quot; &quot;--lib&quot; &quot;ink_linting&quot; &quot;--manifest-path=/root/mycontract/Cargo.toml&quot;` failed with exit code: Some(1)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34371" PostHistoryTypeId="6" PostId="8751" RevisionGUID="8a3f86c5-3622-4575-9466-f54172da8fe5" CreationDate="2023-06-03T05:37:30.337" UserId="2281" Comment="added 14 characters in body; edited tags" Text="|ink|smart-contract|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34372" PostHistoryTypeId="5" PostId="7923" RevisionGUID="20d897c7-9820-4dd6-96bb-4d7adfc2044d" CreationDate="2023-06-03T05:42:05.403" UserId="2281" Comment="added 2 characters in body" Text="I've been trying to follow the documentation for generating types for `@polkadot/api` https://polkadot.js.org/docs/api/examples/promise/typegen/. However the generated files seem to be missing many types, revealed by `tsc`:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(87,22): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(115,20): error TS2304: Cannot find name 'FrameSystemLimitsBlockLength'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(119,21): error TS2304: Cannot find name 'FrameSystemLimitsBlockWeights'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(123,17): error TS2304: Cannot find name 'SpWeightsRuntimeDbWeight'.&#xD;&#xA;Error: src/interfaces/augment-api-consts.ts(135,16): error TS2304: Cannot find name 'SpVersionRuntimeVersion'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(44,121): error TS2304: Cannot find name 'FrameSupportTokensMiscBalanceStatus'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(44,230): error TS2304: Cannot find name 'FrameSupportTokensMiscBalanceStatus'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(70,52): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(74,56): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(84,74): error TS2304: Cannot find name 'SpFinalityGrandpaAppPublic'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(84,139): error TS2304: Cannot find name 'SpFinalityGrandpaAppPublic'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(197,64): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(216,113): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(216,210): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(256,64): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(256,117): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(260,69): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(260,122): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,64): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,102): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,154): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(274,192): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(278,64): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(278,115): error TS2304: Cannot find name 'FrameSupportDispatchDispatchInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(312,83): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(312,152): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(316,89): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-events.ts(316,158): error TS2304: Cannot find name 'SpRuntimeDispatchError'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(24,65): error TS2304: Cannot find name 'SpConsensusAuraSr25519AppSr25519Public'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(63,95): error TS2304: Cannot find name 'PalletBalancesAccountData'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(72,97): error TS2304: Cannot find name 'PalletBalancesBalanceLock'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(76,100): error TS2304: Cannot find name 'PalletBalancesReserveData'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(99,70): error TS2304: Cannot find name 'PalletGrandpaStoredPendingChange'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(120,55): error TS2304: Cannot find name 'PalletGrandpaStoredState'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(174,97): error TS2304: Cannot find name 'PalletPreimageRequestStatus'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(184,131): error TS2304: Cannot find name 'PalletProcessValidationProcess'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(207,100): error TS2304: Cannot find name 'PalletSchedulerScheduled'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(226,101): error TS2304: Cannot find name 'PalletSimpleNftToken'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(246,95): error TS2304: Cannot find name 'FrameSystemAccountInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(258,61): error TS2304: Cannot find name 'FrameSupportDispatchPerDispatchClassWeight'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(262,56): error TS2304: Cannot find name 'SpRuntimeDigest'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(276,60): error TS2304: Cannot find name 'FrameSystemEventRecord'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(293,71): error TS2304: Cannot find name 'FrameSystemPhase'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(305,75): error TS2304: Cannot find name 'FrameSystemLastRuntimeUpgradeInfo'.&#xD;&#xA;Error: src/interfaces/augment-api-query.ts(352,94): error TS2304: Cannot find name 'PalletCollectiveVotes'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(144,106): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(144,231): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,68): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,179): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,233): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(172,269): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,76): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,187): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,241): error TS2304: Cannot find name 'SpFinalityGrandpaEquivocationProof'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(184,277): error TS2304: Cannot find name 'SpCoreVoid'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(367,90): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(367,161): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(367,337): error TS2304: Cannot find name 'PalletProcessValidationBinaryExpressionTreeBooleanExpressionSymbol'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,50): error TS2304: Cannot find name 'DscpPalletTraitsProcessFullyQualifiedId'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,211): error TS2304: Cannot find name 'PalletSimpleNftOutput'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,237): error TS2304: Cannot find name 'PalletSimpleNftOutput'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,354): error TS2304: Cannot find name 'DscpPalletTraitsProcessFullyQualifiedId'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(405,410): error TS2304: Cannot find name 'PalletSimpleNftOutput'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(451,102): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(451,227): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(534,145): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/augment-api-tx.ts(534,336): error TS2304: Cannot find name 'SpWeightsWeightV2Weight'.&#xD;&#xA;Error: src/interfaces/index.ts(4,15): error TS2306: File '/home/runner/work/dscp-matchmaker-api/dscp-matchmaker-api/src/interfaces/types.ts' is not a module.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It also generates an empty `types.ts` - I've not added any custom definitions. &#xD;&#xA;&#xD;&#xA;`metadata.json` was generated with `curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:&quot;1&quot;, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getMetadata&quot;, &quot;params&quot;:[]}' http://localhost:9944` hitting our local node.&#xD;&#xA;&#xD;&#xA;Is there something I'm missing or getting wrong in my setup?&#xD;&#xA;&#xD;&#xA;**[PR showing the commands used and files generated][1]** . Thank you&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/digicatapult/dscp-matchmaker-api/pull/43/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="34373" PostHistoryTypeId="5" PostId="8745" RevisionGUID="9cd4c864-2088-4069-bcd8-ac83b1cf1988" CreationDate="2023-06-03T05:45:14.943" UserId="2281" Comment="added 29 characters in body; edited tags" Text="```rs&#xD;&#xA;     `the trait bound` `&lt;RuntimeApi as ConstructRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_service::client::client::Client&lt;sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, NativeElseWasmExecutor&lt;ExecutorDispatch&gt;&gt;, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, RuntimeApi&gt;&gt;&gt;::RuntimeApi: fp_rpc::ConvertTransactionRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;` is not satisfied&#xD;&#xA;        --&gt; node/service/src/lib.rs:1279:30&#xD;&#xA;         |&#xD;&#xA;    1279 |             polkadot_rpc::create_full(deps,subscription_executor.clone(), backend.clone()).map_err(Into::into)&#xD;&#xA;         |             ------------------------- ^^^^ the trait `fp_rpc::ConvertTransactionRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;` is not implemented for `&lt;RuntimeApi as ConstructRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_service::client::client::Client&lt;sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, NativeElseWasmExecutor&lt;ExecutorDispatch&gt;&gt;, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, RuntimeApi&gt;&gt;&gt;::RuntimeApi`&#xD;&#xA;         |             |&#xD;&#xA;         |             required by a bound introduced by this call&#xD;&#xA;         |&#xD;&#xA;    note: required by a bound in `polkadot_rpc::create_full`&#xD;&#xA;        --&gt; /Users/user/parachain/peer-polka/rpc/src/lib.rs:205:10&#xD;&#xA;         |&#xD;&#xA;    205  |     C::Api: fp_rpc::ConvertTransactionRuntimeApi&lt;Block&gt;,    &#xD;&#xA;         |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `create_full`&#xD;&#xA;    help: consider further restricting the associated type&#xD;&#xA;         |&#xD;&#xA;    910  |     OverseerGenerator: OverseerGen, &lt;RuntimeApi as ConstructRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_service::client::client::Client&lt;sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, LocalCallExecutor&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, sc_client_db::Backend&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt;, NativeElseWasmExecutor&lt;ExecutorDispatch&gt;&gt;, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;, RuntimeApi&gt;&gt;&gt;::RuntimeApi: fp_rpc::ConvertTransactionRuntimeApi&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, OpaqueExtrinsic&gt;&gt; &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm integrating the `Frontier` in the `Relay Chain`. But in the `service.rs` i'm facing this issue. I've already mentioned this in the runtime. &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    impl fp_rpc::ConvertTransaction&lt;opaque::UncheckedExtrinsic&gt; for TransactionConverter {&#xD;&#xA;    	fn convert_transaction(&#xD;&#xA;    		&amp;self,&#xD;&#xA;    		transaction: pallet_ethereum::Transaction,&#xD;&#xA;    	) -&gt; opaque::UncheckedExtrinsic {&#xD;&#xA;    		let extrinsic = UncheckedExtrinsic::new_unsigned(&#xD;&#xA;    			pallet_ethereum::Call::&lt;Runtime&gt;::transact { transaction }.into(),&#xD;&#xA;    		);&#xD;&#xA;    		let encoded = extrinsic.encode();&#xD;&#xA;    		opaque::UncheckedExtrinsic::decode(&amp;mut &amp;encoded[..])&#xD;&#xA;    			.expect(&quot;Encoded extrinsic is always valid&quot;)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;   ```    " ContentLicense="CC BY-SA 4.0" />
  <row Id="34374" PostHistoryTypeId="6" PostId="8745" RevisionGUID="9cd4c864-2088-4069-bcd8-ac83b1cf1988" CreationDate="2023-06-03T05:45:14.943" UserId="2281" Comment="added 29 characters in body; edited tags" Text="|relay-chain|evm|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34375" PostHistoryTypeId="4" PostId="8742" RevisionGUID="8689109e-4073-480c-a6bd-6e5045d3b13b" CreationDate="2023-06-03T08:00:58.560" UserId="2372" Comment="edited title" Text="Polkadot.Js not showing identities of stashes on parachain rpc server" ContentLicense="CC BY-SA 4.0" />
  <row Id="34376" PostHistoryTypeId="2" PostId="8755" RevisionGUID="6c1d61ea-9875-4c69-b5c4-b3936bcd4a55" CreationDate="2023-06-03T08:56:35.423" UserId="2135" Text="As the title mention, I would like to know what would be the best way to ensure that an extrinsic can be executed only if it's the first call in the block (ignoring timestamp).&#xD;&#xA;It also need to work with batches, scheduler or any governance body.&#xD;&#xA;&#xD;&#xA;Is there an idiomatic way to do that ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34378" PostHistoryTypeId="1" PostId="8755" RevisionGUID="6c1d61ea-9875-4c69-b5c4-b3936bcd4a55" CreationDate="2023-06-03T08:56:35.423" UserId="2135" Text="How to ensure a call is the first to execute in a block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34379" PostHistoryTypeId="3" PostId="8755" RevisionGUID="6c1d61ea-9875-4c69-b5c4-b3936bcd4a55" CreationDate="2023-06-03T08:56:35.423" UserId="2135" Text="|extrinsic|weight|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34380" PostHistoryTypeId="2" PostId="8756" RevisionGUID="4d0d48a4-3eb8-420f-9b91-b38c9808818f" CreationDate="2023-06-03T09:17:16.377" UserId="251" Text="Add a storage item and create a wrapper call. While this call gets called, modify that storage.&#xD;&#xA;&#xD;&#xA;If this storage is some refuse the incoming call. &#xD;&#xA;&#xD;&#xA;Kill this storage on `on_finalze`. &#xD;&#xA;&#xD;&#xA;If you want to do this with the substrate native pallets, I think it’s impossible. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34382" PostHistoryTypeId="5" PostId="8755" RevisionGUID="30f393b1-c065-41cf-95bc-343d1af954df" CreationDate="2023-06-03T09:42:03.283" UserId="2135" Comment="added 691 characters in body" Text="As the title mention, I would like to know what would be the best way to ensure that an extrinsic can be executed only if it's the first call in the block (ignoring timestamp).&#xD;&#xA;It also need to work with batches, scheduler or any governance body.&#xD;&#xA;&#xD;&#xA;Is there an idiomatic way to do that ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit : &#xD;&#xA;&#xD;&#xA;Initially I had to lead to solve this : &#xD;&#xA;- The first one is kinda similar to what you are proposing : Having a storage that gets flipped when the extrinsic is called and the call would be applied in the `on_initialize` of the next block. (This is kinda overload since we'll do a storage read on every block for a quite rare call)&#xD;&#xA;- The second was to use the extrinsic count or event count in the extrinsic itself to ensure a good position (since it's ok to refuse the extrinsic if it does not respect the rule). But it's not safe since the ordering of events will change in case of batches, or governance calls and also reading the events in runtime is, I guess too heavy." ContentLicense="CC BY-SA 4.0" />
  <row Id="34383" PostHistoryTypeId="2" PostId="8757" RevisionGUID="48323442-f356-4c85-8478-d87f0506c243" CreationDate="2023-06-03T11:26:33.183" UserId="3344" Text="Are there any signature schemes in Substrate that prevent recovering/extracting the public key from a signature?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34385" PostHistoryTypeId="1" PostId="8757" RevisionGUID="48323442-f356-4c85-8478-d87f0506c243" CreationDate="2023-06-03T11:26:33.183" UserId="3344" Text="Signature schemes that prevent extracting public key" ContentLicense="CC BY-SA 4.0" />
  <row Id="34386" PostHistoryTypeId="3" PostId="8757" RevisionGUID="48323442-f356-4c85-8478-d87f0506c243" CreationDate="2023-06-03T11:26:33.183" UserId="3344" Text="|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34387" PostHistoryTypeId="2" PostId="8758" RevisionGUID="9442f126-9a72-4156-a4d9-e46ebd5686c8" CreationDate="2023-06-03T16:05:17.467" UserId="3344" Text="It appears using [SR21559](https://doc.deepernetwork.org/v3/advanced/cryptography/#sr25519) has the desired property:&#xD;&#xA;&#xD;&#xA;&gt; One sacrifice that is made when using Schnorr signatures over ECDSA is that both require 64 bytes, but only ECDSA signatures communicate their public key." ContentLicense="CC BY-SA 4.0" />
  <row Id="34389" PostHistoryTypeId="50" PostId="4643" RevisionGUID="b5d94c17-a646-4c4d-a4fb-a39557457fa4" CreationDate="2023-06-03T17:06:50.807" UserId="-1" />
  <row Id="34390" PostHistoryTypeId="2" PostId="8759" RevisionGUID="4fb59bb7-6ae3-4a9b-a1d9-be21f82a9948" CreationDate="2023-06-03T19:21:29.610" UserId="19" Text="I have following code where I want to use with new `Mapping` (now it works but with legacy `HashMap`). I think that the source code below is self-explanatory:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    self.balances &#xD;&#xA;        .entry(caller)&#xD;&#xA;        .and_modify(|val| *val += new_balance)&#xD;&#xA;        .or_insert(new_balance);&#xD;&#xA;My doubt is how to rewrite the source code to use `Mapping`, like below: &#xD;&#xA;&#xD;&#xA;    balances: Mapping&lt;AccountId, Balance&gt;&#xD;&#xA;&#xD;&#xA;I think that developers will want to use `Mapping` often to update entries and I have issues to rewrite the source code." ContentLicense="CC BY-SA 4.0" />
  <row Id="34392" PostHistoryTypeId="1" PostId="8759" RevisionGUID="4fb59bb7-6ae3-4a9b-a1d9-be21f82a9948" CreationDate="2023-06-03T19:21:29.610" UserId="19" Text="Migration from legacy HashMap to Mapping" ContentLicense="CC BY-SA 4.0" />
  <row Id="34393" PostHistoryTypeId="3" PostId="8759" RevisionGUID="4fb59bb7-6ae3-4a9b-a1d9-be21f82a9948" CreationDate="2023-06-03T19:21:29.610" UserId="19" Text="|ink|mapping|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34394" PostHistoryTypeId="2" PostId="8760" RevisionGUID="a5e8de7f-e4ec-480f-a130-7cffcd6954ce" CreationDate="2023-06-03T22:23:30.253" UserId="19" Text="You need firstly add to your `Cargo.toml` following line:&#xD;&#xA;&#xD;&#xA;    ink_prelude = { version = &quot;4.0.2&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;and then you can use `vec` like:&#xD;&#xA;&#xD;&#xA;    use ink::prelude::{vec, vec::Vec};&#xD;&#xA;&#xD;&#xA;Documentation: [https://crates.io/crates/ink_prelude][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.io/crates/ink_prelude" ContentLicense="CC BY-SA 4.0" />
  <row Id="34396" PostHistoryTypeId="2" PostId="8761" RevisionGUID="488c8c57-f40d-4f0d-a5a8-7ad2167cc81f" CreationDate="2023-06-04T03:03:49.610" UserId="2372" Text="I'm adding EVM compatibility to relay chain but I'm getting this error after running my blockchain. [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/KJtDK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34398" PostHistoryTypeId="1" PostId="8761" RevisionGUID="488c8c57-f40d-4f0d-a5a8-7ad2167cc81f" CreationDate="2023-06-04T03:03:49.610" UserId="2372" Text="Other: IO error: lock hold by current process, acquire time 1685847508 acquiring thread 196910: /tmp/chains/dev/frontier/db/LOCK: No locks available" ContentLicense="CC BY-SA 4.0" />
  <row Id="34399" PostHistoryTypeId="3" PostId="8761" RevisionGUID="488c8c57-f40d-4f0d-a5a8-7ad2167cc81f" CreationDate="2023-06-04T03:03:49.610" UserId="2372" Text="|relay-chain|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34400" PostHistoryTypeId="5" PostId="8511" RevisionGUID="3043b598-3643-4cfe-9dff-5aaa07a91a5b" CreationDate="2023-06-04T04:17:40.420" UserId="3344" Comment="Add OW3S" Text="Collating information here that (eventually, in the fullness of time, etc.) should address the use case. Open questions will reflect the state of play.&#xD;&#xA;&#xD;&#xA;- You define the group multiple ways, e.g. off-chain vs on-chain. If on-chain, one privacy preserving approach is to use [Zero-Knowledge Proofs for Set Membership](https://zkproof.org/2020/02/27/zkp-set-membership/)&#xD;&#xA;- The [Open Web3 Stack](https://github.com/open-web3-stack) provides the [NFT pallet](https://github.com/open-web3-stack/open-runtime-module-library/blob/master/nft), which contain some informative [tests](https://github.com/open-web3-stack/open-runtime-module-library/blob/master/nft/src/tests.rs). Here they discuss how to [allow to check arbitrary PreConditions before transfers](https://github.com/open-web3-stack/open-runtime-module-library/pull/678).&#xD;&#xA;  - Alternatively, [Substrate NFTs pallet](https://github.com/paritytech/substrate/tree/master/frame/nfts) has [`set_team`](https://paritytech.github.io/substrate/master/pallet_nfts/pallet/dispatchables/fn.set_team.html) to set the Issuer, Admin and Freezer of a collection. The [uniques](https://paritytech.github.io/substrate/master/pallet_uniques/index.html) pallet is deprecated (HT: @alex-bean ).&#xD;&#xA;- Offline transactions can be prepared using:&#xD;&#xA;  - Rust: [`subxt`](https://github.com/paritytech/subxt). Creating un/signed transactions is [supported out-of-the-box](https://github.com/paritytech/subxt/blob/f344d0dd4d96c4b6398900a40546ec6660a8134a/testing/integration-tests/src/blocks/mod.rs#L132), and has [documentation](https://github.com/paritytech/subxt/blob/f344d0dd4d96c4b6398900a40546ec6660a8134a/subxt/src/book/usage/transactions.rs).&#xD;&#xA;  - Typescript: [`txwrapper`](https://wiki.polkadot.network/docs/build-transaction-construction#tx-wrapper)&#xD;&#xA;- Multisig-like functionality could be achieved via council+treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="34401" PostHistoryTypeId="2" PostId="8762" RevisionGUID="6cb5b3d2-e60b-43c1-97df-f74f16068d4f" CreationDate="2023-06-04T10:16:15.180" UserId="251" Text="I think you didn't close your previous node or you close it unproperly.&#xD;&#xA;&#xD;&#xA;Try to find out and close that node. If no node is running. Simply delete that FILE.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/tmp/chains/dev/frontier/db/LOCK&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;BTW, I guess you are developing. Maybe you don't care about the cache. Simply remove the entire DB also works for you.&#xD;&#xA;&#xD;&#xA;And if you use `--tmp` in the command, it will use a new path every time. So, you don't need to care about this." ContentLicense="CC BY-SA 4.0" />
  <row Id="34403" PostHistoryTypeId="50" PostId="4426" RevisionGUID="d095ed26-6c5e-4624-a40c-2a78dbcffbf7" CreationDate="2023-06-04T23:08:16.080" UserId="-1" />
  <row Id="34409" PostHistoryTypeId="2" PostId="8764" RevisionGUID="8b4ea2a8-604e-4b48-b792-42373cd8b6ec" CreationDate="2023-06-05T09:21:54.360" UserId="4121" Text="After upgrading to 0.9.42, we have `ERROR tokio-runtime-worker sc_service::task_manager: Essential task babe-worker failed. Shutting down service.` error starting the node using `cargo run -- --dev`. Using `cargo run -- --dev --sealing=instant` the node start correctly.&#xD;&#xA;&#xD;&#xA;The update requires few modifications concerning babe in `node/src/service.rs`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;@@ -520,47 +518,48 @@ where&#xD;&#xA;         } else {&#xD;&#xA;             let client_clone = client.clone();&#xD;&#xA;             let slot_duration = babe_link.config().slot_duration();&#xD;&#xA;-            let babe_config = babe::BabeParams {&#xD;&#xA;-                keystore: keystore_container.sync_keystore(),&#xD;&#xA;+            let babe_config = sc_consensus_babe::BabeParams {&#xD;&#xA;+                keystore: keystore_container.keystore(),&#xD;&#xA;                 client: client.clone(),&#xD;&#xA;                 select_chain,&#xD;&#xA;                 block_import,&#xD;&#xA;                 env: proposer_factory,&#xD;&#xA;-                sync_oracle: network.clone(),&#xD;&#xA;-                justification_sync_link: network.clone(),&#xD;&#xA;+                sync_oracle: sync_service.clone(),&#xD;&#xA;+                justification_sync_link: sync_service.clone(),&#xD;&#xA;                 create_inherent_data_providers: move |parent, ()| {&#xD;&#xA;                     let client_clone = client_clone.clone();&#xD;&#xA; &#xD;&#xA;                     async move {&#xD;&#xA;-                        let uncles = sc_consensus_uncles::create_uncles_inherent_data_provider(&#xD;&#xA;-                            &amp;*client_clone,&#xD;&#xA;-                            parent,&#xD;&#xA;-                        )?;&#xD;&#xA;-&#xD;&#xA;                         let timestamp = sp_timestamp::InherentDataProvider::from_system_time();&#xD;&#xA; &#xD;&#xA;                         let slot =&#xD;&#xA;-                            sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(&#xD;&#xA;-                                    *timestamp,&#xD;&#xA;-                                    slot_duration,&#xD;&#xA;-                                );&#xD;&#xA;-&#xD;&#xA;-                        Ok((slot, timestamp, uncles))&#xD;&#xA;+						sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(&#xD;&#xA;+							*timestamp,&#xD;&#xA;+							slot_duration,&#xD;&#xA;+						);&#xD;&#xA;+&#xD;&#xA;+                        let storage_proof =&#xD;&#xA;+                            sp_transaction_storage_proof::registration::new_data_provider(&#xD;&#xA;+                                &amp;*client_clone,&#xD;&#xA;+                                &amp;parent,&#xD;&#xA;+                            )?;&#xD;&#xA;+&#xD;&#xA;+                        Ok((slot, timestamp, storage_proof))&#xD;&#xA;                     }&#xD;&#xA;                 },&#xD;&#xA;                 force_authoring,&#xD;&#xA;                 backoff_authoring_blocks,&#xD;&#xA;                 babe_link,&#xD;&#xA;-                block_proposal_slot_portion: babe::SlotProportion::new(2f32 / 3f32),&#xD;&#xA;+                block_proposal_slot_portion: sc_consensus_babe::SlotProportion::new(2f32 / 3f32),&#xD;&#xA;                 max_block_proposal_slot_portion: None,&#xD;&#xA;                 telemetry: telemetry.as_ref().map(|x| x.handle()),&#xD;&#xA;             };&#xD;&#xA;-            let babe = babe::start_babe(babe_config)?;&#xD;&#xA;+            let babe = sc_consensus_babe::start_babe(babe_config)?;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any ideas where this error might come from?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34411" PostHistoryTypeId="1" PostId="8764" RevisionGUID="8b4ea2a8-604e-4b48-b792-42373cd8b6ec" CreationDate="2023-06-05T09:21:54.360" UserId="4121" Text="babe-worker failed after upgrade to 0.9.42" ContentLicense="CC BY-SA 4.0" />
  <row Id="34412" PostHistoryTypeId="3" PostId="8764" RevisionGUID="8b4ea2a8-604e-4b48-b792-42373cd8b6ec" CreationDate="2023-06-05T09:21:54.360" UserId="4121" Text="|error|nodes|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34413" PostHistoryTypeId="2" PostId="8765" RevisionGUID="f8fa4ca0-a9ac-497f-8013-aca6bb833150" CreationDate="2023-06-05T09:37:52.877" UserId="139" Text="It looks like the code you pasted below implements `ConvertTransaction` for a struct `TransactionConverter`. This is not what the error is for. The error specifically says that this bound doesn't exist on `C::Api` which is your `RuntimeApi`. You need to add an implementation for `fp_rpc::ConvertTransaction` in your runtime api impl : &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl_runtime_apis! {&#xD;&#xA;// -- snip --&#xD;&#xA; impl fp_rpc::ConvertTransaction&lt;opaque::UncheckedExtrinsic&gt; for Runtime {&#xD;&#xA;        fn convert_transaction(&#xD;&#xA;            &amp;self,&#xD;&#xA;            transaction: pallet_ethereum::Transaction,&#xD;&#xA;        ) -&gt; opaque::UncheckedExtrinsic {&#xD;&#xA;            let extrinsic = UncheckedExtrinsic::new_unsigned(&#xD;&#xA;                pallet_ethereum::Call::&lt;Runtime&gt;::transact { transaction }.into(),&#xD;&#xA;            );&#xD;&#xA;            let encoded = extrinsic.encode();&#xD;&#xA;            opaque::UncheckedExtrinsic::decode(&amp;mut &amp;encoded[..])&#xD;&#xA;                .expect(&quot;Encoded extrinsic is always valid&quot;)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;} // end of impl_runtime_apis!&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34415" PostHistoryTypeId="2" PostId="8766" RevisionGUID="4f57759c-a749-41c7-9ee9-aa507aa63824" CreationDate="2023-06-05T09:38:16.087" UserId="3437" Text="I am using [Substrate node template][1] for my application. I have added custom pallet.&#xD;&#xA;&#xD;&#xA;This is a solo chain. I just want to know where transaction fee goes after a successful balance transfer. I have read [here][2] that For Polkadot and Kusama, 80% of the transaction fees go to the treasury, and 20% go to the block producer. But I don't have treasury pallet integrated in my runtime. &#xD;&#xA;&#xD;&#xA;Can somebody please tell where does it to go without a treasury pellet? Does 100% go to block producer?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/337/where-do-the-transaction-fees-go-to" ContentLicense="CC BY-SA 4.0" />
  <row Id="34417" PostHistoryTypeId="1" PostId="8766" RevisionGUID="4f57759c-a749-41c7-9ee9-aa507aa63824" CreationDate="2023-06-05T09:38:16.087" UserId="3437" Text="Where does the transaction fee go after balance transfer without a treasury pallet in solo chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34418" PostHistoryTypeId="3" PostId="8766" RevisionGUID="4f57759c-a749-41c7-9ee9-aa507aa63824" CreationDate="2023-06-05T09:38:16.087" UserId="3437" Text="|substrate-node-template|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34419" PostHistoryTypeId="2" PostId="8767" RevisionGUID="151d80b1-fd10-4dd3-92c7-12851b3e2309" CreationDate="2023-06-05T09:58:10.807" UserId="474" Text="Just to give this an answer; this was actually due to a bug in `scale-value` ([see here](https://github.com/paritytech/subxt/issues/982) and [here](https://github.com/paritytech/scale-value/pull/32)). If you do a `cargo update` or otherwise ensure that you're using `scale-value &gt;= 0.8.1`, it should now be fixed.&#xD;&#xA;&#xD;&#xA;The value:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;Value::unnamed_composite(vec![Value::unnamed_composite(vec![&#xD;&#xA;    Value::u128(20u8.into()),&#xD;&#xA;    Value::u128(30u16.into()),&#xD;&#xA;])]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Was previously not correctly being encoded into a `Vec&lt;(T::AccountId, T::MemberCount)&gt;`, but it will be now :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="34421" PostHistoryTypeId="2" PostId="8768" RevisionGUID="c686fa08-d849-42cd-8f99-27f04ef09194" CreationDate="2023-06-05T10:04:29.750" UserId="251" Text="For the node template.&#xD;&#xA;&#xD;&#xA;It uses [`CurrencyAdapter&lt;Balance, ()&gt;`](https://github.com/substrate-developer-hub/substrate-node-template/blob/87b1b4728e29f68c6b2bafde7f3d0f4c8af9b302/runtime/src/lib.rs#L258).&#xD;&#xA;&#xD;&#xA;The second parameter is `()` instead of a treasury instance, which means the fee will be burned.&#xD;&#xA;&#xD;&#xA;Check https://paritytech.github.io/substrate/master/pallet_transaction_payment/struct.CurrencyAdapter.html and https://paritytech.github.io/substrate/master/frame_support/traits/tokens/imbalance/trait.OnUnbalanced.html#impl-OnUnbalanced%3CImbalance%3E-for-()." ContentLicense="CC BY-SA 4.0" />
  <row Id="34423" PostHistoryTypeId="5" PostId="8764" RevisionGUID="f1b001f1-23e1-4655-89d3-bcf35dc403d2" CreationDate="2023-06-05T10:06:14.533" UserId="251" Comment="added 3 characters in body" Text="After upgrading to 0.9.42, we have `ERROR tokio-runtime-worker sc_service::task_manager: Essential task babe-worker failed. Shutting down service.` error starting the node using `cargo run -- --dev`. Using `cargo run -- --dev --sealing=instant` the node starts correctly.&#xD;&#xA;&#xD;&#xA;The update requires a few modifications concerning babe in `node/src/service.rs`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;@@ -520,47 +518,48 @@ where&#xD;&#xA;         } else {&#xD;&#xA;             let client_clone = client.clone();&#xD;&#xA;             let slot_duration = babe_link.config().slot_duration();&#xD;&#xA;-            let babe_config = babe::BabeParams {&#xD;&#xA;-                keystore: keystore_container.sync_keystore(),&#xD;&#xA;+            let babe_config = sc_consensus_babe::BabeParams {&#xD;&#xA;+                keystore: keystore_container.keystore(),&#xD;&#xA;                 client: client.clone(),&#xD;&#xA;                 select_chain,&#xD;&#xA;                 block_import,&#xD;&#xA;                 env: proposer_factory,&#xD;&#xA;-                sync_oracle: network.clone(),&#xD;&#xA;-                justification_sync_link: network.clone(),&#xD;&#xA;+                sync_oracle: sync_service.clone(),&#xD;&#xA;+                justification_sync_link: sync_service.clone(),&#xD;&#xA;                 create_inherent_data_providers: move |parent, ()| {&#xD;&#xA;                     let client_clone = client_clone.clone();&#xD;&#xA; &#xD;&#xA;                     async move {&#xD;&#xA;-                        let uncles = sc_consensus_uncles::create_uncles_inherent_data_provider(&#xD;&#xA;-                            &amp;*client_clone,&#xD;&#xA;-                            parent,&#xD;&#xA;-                        )?;&#xD;&#xA;-&#xD;&#xA;                         let timestamp = sp_timestamp::InherentDataProvider::from_system_time();&#xD;&#xA; &#xD;&#xA;                         let slot =&#xD;&#xA;-                            sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(&#xD;&#xA;-                                    *timestamp,&#xD;&#xA;-                                    slot_duration,&#xD;&#xA;-                                );&#xD;&#xA;-&#xD;&#xA;-                        Ok((slot, timestamp, uncles))&#xD;&#xA;+						sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(&#xD;&#xA;+							*timestamp,&#xD;&#xA;+							slot_duration,&#xD;&#xA;+						);&#xD;&#xA;+&#xD;&#xA;+                        let storage_proof =&#xD;&#xA;+                            sp_transaction_storage_proof::registration::new_data_provider(&#xD;&#xA;+                                &amp;*client_clone,&#xD;&#xA;+                                &amp;parent,&#xD;&#xA;+                            )?;&#xD;&#xA;+&#xD;&#xA;+                        Ok((slot, timestamp, storage_proof))&#xD;&#xA;                     }&#xD;&#xA;                 },&#xD;&#xA;                 force_authoring,&#xD;&#xA;                 backoff_authoring_blocks,&#xD;&#xA;                 babe_link,&#xD;&#xA;-                block_proposal_slot_portion: babe::SlotProportion::new(2f32 / 3f32),&#xD;&#xA;+                block_proposal_slot_portion: sc_consensus_babe::SlotProportion::new(2f32 / 3f32),&#xD;&#xA;                 max_block_proposal_slot_portion: None,&#xD;&#xA;                 telemetry: telemetry.as_ref().map(|x| x.handle()),&#xD;&#xA;             };&#xD;&#xA;-            let babe = babe::start_babe(babe_config)?;&#xD;&#xA;+            let babe = sc_consensus_babe::start_babe(babe_config)?;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any ideas where this error might come from?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34424" PostHistoryTypeId="2" PostId="8769" RevisionGUID="026d8876-7f48-46ac-bada-a98552064ca2" CreationDate="2023-06-05T10:11:19.817" UserId="474" Text="V15 metadata will be exposing Runtime API type information for clients to consume in order to do things like generate web interfaces to make Runtime API calls. The `state_call` RPC method exists to allow people to call these runtime APIs and get back results in a web UI.&#xD;&#xA;&#xD;&#xA;So, if you want to make some information available to the outside world, I would create a RuntimeApi for it, knowing that they can already do what you want, and support for calling them will only be improving over time :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="34426" PostHistoryTypeId="2" PostId="8770" RevisionGUID="3fa89374-d536-4a9f-b4e5-8ec7d261eebc" CreationDate="2023-06-05T10:11:46.643" UserId="251" Text="To my understanding, tasks are some client-only properties.&#xD;&#xA;&#xD;&#xA;OCW has the ability to access the runtime directly. It's much easier to query the storage and submit some off-chain extrinsics.&#xD;&#xA;&#xD;&#xA;Examples: &#xD;&#xA;&#xD;&#xA;If you want to watch your disk usage periodically use the service task.&#xD;&#xA;&#xD;&#xA;If you want to submit the `I'm online` messages periodically use the OCW." ContentLicense="CC BY-SA 4.0" />
  <row Id="34428" PostHistoryTypeId="2" PostId="8771" RevisionGUID="5cca4f99-239e-4e26-b35f-948659078bb6" CreationDate="2023-06-05T10:22:04.987" UserId="251" Text="I can't answer your question perfectly.&#xD;&#xA;&#xD;&#xA;It's a marker/property, which means it's hard to find out all usage of it. We don't how many apps use this marker/property.&#xD;&#xA;&#xD;&#xA;For example, if your chain type is development, polkadot.js/talisman wallet won't pop up the `update the metadata` window while connecting to a node. This is pretty tricky. I spent a lot of time debugging this last month. The app told me that I need to update the metadata. But I can't update it from the UI. That part was disabled.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34430" PostHistoryTypeId="50" PostId="4668" RevisionGUID="e59e1dda-7c6d-4cd5-bff8-75ff356bc72d" CreationDate="2023-06-05T11:08:00.913" UserId="-1" />
  <row Id="34431" PostHistoryTypeId="5" PostId="8770" RevisionGUID="be71063e-1d8e-4e57-9bb6-fac3b131477f" CreationDate="2023-06-05T11:20:04.703" UserId="251" Comment="added 2 characters in body" Text="To my understanding, tasks are some client-only properties.&#xD;&#xA;&#xD;&#xA;OCW has the ability to access the runtime directly. It's much easier to query the storage and submit some off-chain extrinsics.&#xD;&#xA;&#xD;&#xA;Examples: &#xD;&#xA;&#xD;&#xA;If you want to watch your disk usage periodically, use the service task.&#xD;&#xA;&#xD;&#xA;If you want to submit the `I'm online` messages periodically, use the OCW." ContentLicense="CC BY-SA 4.0" />
  <row Id="34432" PostHistoryTypeId="5" PostId="8633" RevisionGUID="98ee7273-8d81-4b2e-a234-d80ac29c49ce" CreationDate="2023-06-05T11:27:46.360" UserId="2281" Comment="added 6 characters in body" Text="I am struggling to figure out how to supply tuple parameters to a dynamic call in the latest subxt master branch. I know parameters are combinations of Value types.&#xD;&#xA;&#xD;&#xA;My current non-working code looks like:&#xD;&#xA;````rs&#xD;&#xA; let call = subxt::dynamic::tx(&#xD;&#xA;        MODULE,&#xD;&#xA;        &quot;create_group&quot;,&#xD;&#xA;        vec![&#xD;&#xA;            Value::from_bytes(json.name.as_bytes()),&#xD;&#xA;            Value::unnamed_composite(&#xD;&#xA;                members&#xD;&#xA;                    .into_iter()&#xD;&#xA;                    .map(|(account_id, weight)| {&#xD;&#xA;                        Value::unnamed_composite(vec![&#xD;&#xA;                            Value::from_bytes(account_id),&#xD;&#xA;                            Value::u128(weight.into()),&#xD;&#xA;                        ])&#xD;&#xA;                    })&#xD;&#xA;                    .collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;            ),&#xD;&#xA;            Value::u128(json.threshold.into()),&#xD;&#xA;            Value::u128(json.initial_balance),&#xD;&#xA;        ],&#xD;&#xA;    );&#xD;&#xA;````&#xD;&#xA;The call signature is :&#xD;&#xA;````rs&#xD;&#xA;     pub fn create_group(&#xD;&#xA;            origin: OriginFor&lt;T&gt;,&#xD;&#xA;            name: Vec&lt;u8&gt;,&#xD;&#xA;            members: Vec&lt;(T::AccountId, T::MemberCount)&gt;,&#xD;&#xA;            threshold: T::MemberCount,&#xD;&#xA;            initial_balance: &lt;&lt;T as Config&gt;::Currency as Currency&lt;T::AccountId&gt;&gt;::Balance,&#xD;&#xA;        ) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;It compiles but I get the error:&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;Error encoding from dynamic value: Error at [0].[1]: Cannot encode to type; expected length 2 but got length 32&#xD;&#xA;````&#xD;&#xA;The auto-generated call works fine, but I am using dynamic calls because I need to be able to pass the call as a parameter to other extrinsics and it appears that that can only be done with dynamic queries.&#xD;&#xA;&#xD;&#xA;The autogenerated call that works is:&#xD;&#xA;````rs&#xD;&#xA;     let call = borlaug_subxt::tx().groups().create_group(&#xD;&#xA;         json.name.into(),&#xD;&#xA;         members,&#xD;&#xA;         json.threshold,&#xD;&#xA;         json.initial_balance,&#xD;&#xA;    );&#xD;&#xA;````&#xD;&#xA;And members is a vec of tuples of Account32,u32&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34433" PostHistoryTypeId="2" PostId="8772" RevisionGUID="a3ca02ea-8468-43c7-9aaf-e21ecf547265" CreationDate="2023-06-05T12:13:21.920" UserId="3414" Text="There are some functions present in the relay-chain(fn partial) and (fn new_full) in which variables are defined multiple times . Go through them and give single definition for each variable. I hope this will solve your error." ContentLicense="CC BY-SA 4.0" />
  <row Id="34435" PostHistoryTypeId="5" PostId="8772" RevisionGUID="e394712b-3572-43dc-aea7-ff078a539833" CreationDate="2023-06-05T12:17:14.867" UserId="2281" Comment="added 6 characters in body" Text="There are some functions present in the `relay-chain(fn partial)` and `(fn new_full)` in which variables are defined multiple times . Go through them and give single definition for `each variable`. I hope this will solve your error." ContentLicense="CC BY-SA 4.0" />
  <row Id="34436" PostHistoryTypeId="2" PostId="8773" RevisionGUID="9f2aeb5d-ff0b-4fa8-87c2-5ce6e8a42c2e" CreationDate="2023-06-05T13:00:27.207" UserId="73" Text="FRAME doesn't use the concept of gas. It uses weight, which is currently determined based on running benchmarks on some standard hardware. However, everything that runs in `offchain_worker` doesn't use any weight at all. The runtime code itself is seen as trusted code, but nodes are still allowed to opt-out from running `offchain_worker`.&#xD;&#xA;&#xD;&#xA;TDLR: Your assumption that no weight/gas is being used is correct." ContentLicense="CC BY-SA 4.0" />
  <row Id="34438" PostHistoryTypeId="2" PostId="8774" RevisionGUID="57fecd78-5d93-4b08-8870-e13b930b0e53" CreationDate="2023-06-05T13:03:58.740" UserId="73" Text="To do any kind of state change on chain, you will need to send an extrinsic. You can write to the storage in a runtime api, but the changes are thrown away. The runtime is a state transition function and every node needs to do the same transition to come to the same result. However, this would not work if the nodes would use the runtime api to do some changes to the state.&#xD;&#xA;&#xD;&#xA;&gt; And can we call these task as off chain worker or are these just seperate tasks?&#xD;&#xA;&#xD;&#xA;You could introduce some custom host functions that would allow you to access your custom task." ContentLicense="CC BY-SA 4.0" />
  <row Id="34440" PostHistoryTypeId="2" PostId="8775" RevisionGUID="c7ce55bb-e37d-4ced-8aab-b97ec3403321" CreationDate="2023-06-05T13:09:12.947" UserId="4303" Text="I just want to simply add an account in the development config but have no idea how to do it, i tried simply adding the seed in the development_config function but it doesnt work, what can i do to add an account names Max for it to show in the runtime[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iGVRl.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34442" PostHistoryTypeId="1" PostId="8775" RevisionGUID="c7ce55bb-e37d-4ced-8aab-b97ec3403321" CreationDate="2023-06-05T13:09:12.947" UserId="4303" Text="adding an account" ContentLicense="CC BY-SA 4.0" />
  <row Id="34443" PostHistoryTypeId="3" PostId="8775" RevisionGUID="c7ce55bb-e37d-4ced-8aab-b97ec3403321" CreationDate="2023-06-05T13:09:12.947" UserId="4303" Text="|substrate-node-template|frame|account|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34444" PostHistoryTypeId="5" PostId="8775" RevisionGUID="2f5a5faa-93c5-4430-b4c6-cf184ecd9cb3" CreationDate="2023-06-05T13:57:48.550" UserId="2281" Comment="added 4 characters in body" Text="I just want to simply add an account in the `development config` but have no idea how to do it, i tried simply adding the seed in the `development_config` function but it dosent work, what can i do to add an account names Max for it to show in the runtime[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iGVRl.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34445" PostHistoryTypeId="4" PostId="1706" RevisionGUID="8ace5cb9-79b9-4d37-af03-e5eaa0e392c0" CreationDate="2023-06-05T14:09:34.773" UserId="3136" Comment="making correction in title" Text="Does the auction happen automatically during Crowd Loan?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34446" PostHistoryTypeId="24" PostId="1706" RevisionGUID="8ace5cb9-79b9-4d37-af03-e5eaa0e392c0" CreationDate="2023-06-05T14:09:34.773" Comment="Proposed by 3136 approved by 2281, 2673 edit id of 419" ContentLicense="CC BY-SA 4.0" />
  <row Id="34447" PostHistoryTypeId="5" PostId="8722" RevisionGUID="a81a155a-61dc-4410-9d1e-e4ad8fbdffe3" CreationDate="2023-06-05T14:09:58.487" UserId="3414" Comment="Improved formatting" Text="I'm making a **wallet** that has an **address book / contacts** feature so that it's easier and faster for users to send balances to other users.&#xD;&#xA;&#xD;&#xA;Is storing the **address book / contacts** in the **network** is a good and correct way?&#xD;&#xA;&#xD;&#xA;Should data such as contacts not be stored in blocks but stored in local storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34448" PostHistoryTypeId="24" PostId="8722" RevisionGUID="a81a155a-61dc-4410-9d1e-e4ad8fbdffe3" CreationDate="2023-06-05T14:09:58.487" Comment="Proposed by 3414 approved by 2281, 2673 edit id of 421" ContentLicense="CC BY-SA 4.0" />
  <row Id="34449" PostHistoryTypeId="2" PostId="8776" RevisionGUID="78e14c27-a3e3-434e-9ae5-585ecd7e9391" CreationDate="2023-06-05T14:30:09.133" UserId="2135" Text="The easiest solution was to use the current block weight and refuse the extrinsic if it was greater than a weight limitation." ContentLicense="CC BY-SA 4.0" />
  <row Id="34452" PostHistoryTypeId="2" PostId="8777" RevisionGUID="d205d650-4a57-4b5c-9edb-d3c790da131e" CreationDate="2023-06-05T14:32:33.150" UserId="29" Text="You are close. You could do something like this:&#xD;&#xA;```rust&#xD;&#xA;// Pre-funded accounts&#xD;&#xA;	vec![&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;		hex!(&quot;c02563505b8fc10f0acb3e97982d663424d4617baced9bcf51c847bd879ff827&quot;).into(),&#xD;&#xA;	],&#xD;&#xA;```&#xD;&#xA;You will need to import `hex` crate:&#xD;&#xA;```rust&#xD;&#xA;use hex_literal::hex;&#xD;&#xA;```&#xD;&#xA;And add it to your Cargo.toml:&#xD;&#xA;```&#xD;&#xA;hex-literal = &quot;0.4.1&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If needed use `subkey` to get the Account ID:&#xD;&#xA;```&#xD;&#xA;subkey inspect 5GQeA6J8XqtX7hvZy5JNyTyzYxfK5UD9tLoUPpa47CNm8dvS&#xD;&#xA;5GQeA6J8XqtX7hvZy5JNyTyzYxfK5UD9tLoUPpa47CNm8dvS&#xD;&#xA;Public Key URI `5GQeA6J8XqtX7hvZy5JNyTyzYxfK5UD9tLoUPpa47CNm8dvS` is account:&#xD;&#xA;  Network ID/Version: substrate&#xD;&#xA;  Public key (hex):   0xc02563505b8fc10f0acb3e97982d663424d4617baced9bcf51c847bd879ff827&#xD;&#xA;  Account ID:         0xc02563505b8fc10f0acb3e97982d663424d4617baced9bcf51c847bd879ff827&#xD;&#xA;  Public key (SS58):  5GQeA6J8XqtX7hvZy5JNyTyzYxfK5UD9tLoUPpa47CNm8dvS&#xD;&#xA;  SS58 Address:       5GQeA6J8XqtX7hvZy5JNyTyzYxfK5UD9tLoUPpa47CNm8dvS&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Worth noting, if you're also using PolkadotJs Apps and do not see the account appear. It is because PolkadotJs Apps shows predefined accounts in the UI for development config. More info here:&#xD;&#xA; - https://substrate.stackexchange.com/a/621/29" ContentLicense="CC BY-SA 4.0" />
  <row Id="34454" PostHistoryTypeId="6" PostId="8720" RevisionGUID="e293216a-8c59-4b62-b1cd-a574f7daab6f" CreationDate="2023-06-05T14:57:26.640" UserId="2898" Comment="Adding appropriate tags" Text="|pallet|runtime|storage|extrinsic|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34455" PostHistoryTypeId="24" PostId="8720" RevisionGUID="e293216a-8c59-4b62-b1cd-a574f7daab6f" CreationDate="2023-06-05T14:57:26.640" Comment="Proposed by 2898 approved by 2281, 4290 edit id of 420" ContentLicense="CC BY-SA 4.0" />
  <row Id="34456" PostHistoryTypeId="5" PostId="8759" RevisionGUID="5fb4d2e1-6ef7-48a3-84c6-8dcacb57615e" CreationDate="2023-06-05T15:05:37.827" UserId="2281" Comment="added 26 characters in body" Text="I have following code where I want to use with new `Mapping` (now it works but with legacy `HashMap`). I think that the source code below is self-explanatory:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;&#xD;&#xA;    self.balances &#xD;&#xA;        .entry(caller)&#xD;&#xA;        .and_modify(|val| *val += new_balance)&#xD;&#xA;        .or_insert(new_balance);&#xD;&#xA;```&#xD;&#xA;My doubt is how to rewrite the source code to use `Mapping`, like below: &#xD;&#xA;```rs&#xD;&#xA;&#xD;&#xA;    balances: Mapping&lt;AccountId, Balance&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think that developers will want to use `Mapping` often to update entries and I have issues to `rewrite` the source code." ContentLicense="CC BY-SA 4.0" />
  <row Id="34457" PostHistoryTypeId="5" PostId="8701" RevisionGUID="a4b8120b-1f7e-4da9-8374-eb23533a3362" CreationDate="2023-06-05T15:07:06.817" UserId="2281" Comment="added 2 characters in body" Text="I was exploring GRANDPA verification algorithm and stumbled upon this code by the link &#xD;&#xA;https://github.com/paritytech/finality-grandpa/blame/master/src/lib.rs#L494&#xD;&#xA;&#xD;&#xA;# Source&#xD;&#xA;&#xD;&#xA;This is the part of method `validate_commit` which verifies that GRANDPA finalized correctly a block given particular voter set. The usage of `equivocated` set is not completely clear to me. It is used only in this part of the method.&#xD;&#xA;```rs&#xD;&#xA;...&#xD;&#xA;let mut equivocated = std::collections::BTreeSet::new();&#xD;&#xA;&#xD;&#xA;// add all precommits to the round with correct counting logic&#xD;&#xA;let mut round = round::Round::new(round::RoundParams {&#xD;&#xA;	round_number: 0, // doesn't matter here.&#xD;&#xA;	voters: voters.clone(),&#xD;&#xA;	base,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;for SignedPrecommit { precommit, id, signature } in &amp;valid_precommits {&#xD;&#xA;	match round.import_precommit(chain, precommit.clone(), id.clone(), signature.clone())? {&#xD;&#xA;		ImportResult { equivocation: Some(_), .. } =&gt; {&#xD;&#xA;			validation_result.num_equivocations += 1;&#xD;&#xA;			// allow only one equivocation per voter, as extras are redundant.&#xD;&#xA;			if !equivocated.insert(id) {&#xD;&#xA;				return Ok(validation_result)&#xD;&#xA;			}&#xD;&#xA;		},&#xD;&#xA;		ImportResult { duplicated, .. } =&gt;&#xD;&#xA;			if duplicated {&#xD;&#xA;				validation_result.num_duplicated_precommits += 1;&#xD;&#xA;			},&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**This is how I understand this code:**&#xD;&#xA; 1. We detect equivocations and duplicates in `round.import_precommit(...)`.&#xD;&#xA; 2. We register the detected equivocations in `equivocated` set by adding `id` of the voter there.&#xD;&#xA; 3. If it's only first time we observe this voter equivocating — we continue.&#xD;&#xA; 4. If we've already seen the voter equivocating — we return.&#xD;&#xA;&#xD;&#xA; `validation_result.valid` is `false` in this case (default value).&#xD;&#xA; &#xD;&#xA; 5. If we detect duplicates, they don't affect validity status.&#xD;&#xA;&#xD;&#xA; 6. In the end, validity status is set to `true` if we computed valid GHOST.&#xD;&#xA;&#xD;&#xA;So, `validate_commit` still can succeed even in presence of equivocations.&#xD;&#xA;&#xD;&#xA;# Questions&#xD;&#xA;&#xD;&#xA;I've scanned GRANDPA docs, W3F website and GitHub issues but couldn't find anything about tolerance to equivocations. Please, could anyone clarify it to me?&#xD;&#xA;&#xD;&#xA;**Are the following statements correct?**&#xD;&#xA; 1. The method `validate_commit` is intended to be used in a light client.&#xD;&#xA; 2. Successful status of `validate_commit`, i.e. `CommitValidationResult::valid == true`, means that the header containing it CAN be accepted and update the light client.&#xD;&#xA; 3. Failed status of `validate_commit`, i.e. `CommitValidationResult::valid == false`, means that the header containing this proof MUST NOT be accepted.&#xD;&#xA; 4. Equivocations are forbidden in any amount, all voters from `equivocated` set must get slashed.&#xD;&#xA; 5. Equivocations don't make the finality proof invalid.&#xD;&#xA; 6. Finality proof SHOULD contain equivocations if there been any. This &quot;seals&quot; fact of misbehaviour into the blockchain.&#xD;&#xA; 7. Finality proof MUST NOT contain more than 1 equivocation for a voter, this is important because we don't want to bloat the proofs.&#xD;&#xA;&#xD;&#xA;Probably, all of the above is correct, or none of it.&#xD;&#xA;&#xD;&#xA;**Please, make it clear!**" ContentLicense="CC BY-SA 4.0" />
  <row Id="34458" PostHistoryTypeId="2" PostId="8778" RevisionGUID="0360eefc-10ff-4678-afc1-ccbdc9a89e60" CreationDate="2023-06-05T16:27:23.157" UserId="4296" Text="After inclusion of the endpoints in the polkadot.js code the identity lookups started working so apparently identity for parachains is linked with inclusion in polkadot.js.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="34460" PostHistoryTypeId="52" PostId="8766" RevisionGUID="aa3eea3f-c0af-4b51-bc9f-9c7d65428292" CreationDate="2023-06-05T17:38:55.800" />
  <row Id="34461" PostHistoryTypeId="52" PostId="8775" RevisionGUID="867117d0-057f-47fe-beb3-4c2ec0d4cb1f" CreationDate="2023-06-05T21:11:40.940" />
  <row Id="34462" PostHistoryTypeId="2" PostId="8779" RevisionGUID="89a14b2f-3175-4891-b8bd-3aa0a738261d" CreationDate="2023-06-05T21:40:38.970" UserId="2762" Text="In my opinion there is no need to store the list of contacts of a user on chain, I can't see the benefits and it costs fees.&#xD;&#xA;&#xD;&#xA;Storing in the local storage might be enough (with an option of export/import even better)&#xD;&#xA;&#xD;&#xA;PolkadotJS UI has this functionality: [Address Account][1], and it uses the [keyring][2] ([@polkadot/ui-keyring][3]) to store them.&#xD;&#xA;&#xD;&#xA;If you want to store it on chain anyway, Polkadot for example has the [identiy_pallet][4] that allows a user to register its identity on-chain. It makes easier among other things to identify people and send them balances.&#xD;&#xA;You can think of building something similar (pallet or smart contracts) to store the list of contacts of a user.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000170036-polkadot-js-ui-the-difference-between-accounts-and-address-book&#xD;&#xA;  [2]: https://polkadot.js.org/docs/ui-keyring/start/addresses/&#xD;&#xA;  [3]: https://www.npmjs.com/package/@polkadot/ui-keyring&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/identity/README.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="34469" PostHistoryTypeId="2" PostId="8781" RevisionGUID="c94c50f4-641a-43e8-91fa-bc49d30f85c2" CreationDate="2023-06-06T04:36:45.737" UserId="3538" Text="I've seen some Substrate repo's where the `SessionKeys` (Aura, Babe, Grandpa, etc) are used with `unchecked_into()` while the `stash/controller` keys are only used with `into()`. &#xD;&#xA;These are some examples:&#xD;&#xA;- Substrate: [Link](https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L90)&#xD;&#xA;- EdgeWare: [Link](https://github.com/edgeware-network/edgeware-node/blob/master/node/cli/src/mainnet_fixtures.rs#L256)&#xD;&#xA;- ChainX: [Link](https://github.com/chainx-org/ChainX/blob/develop-2022/cli/src/chain_spec.rs#L280)&#xD;&#xA;&#xD;&#xA;Can someone please explain the actual reasoning behind this? " ContentLicense="CC BY-SA 4.0" />
  <row Id="34471" PostHistoryTypeId="1" PostId="8781" RevisionGUID="c94c50f4-641a-43e8-91fa-bc49d30f85c2" CreationDate="2023-06-06T04:36:45.737" UserId="3538" Text="Custom session keys in Chainspec for Mainnet config" ContentLicense="CC BY-SA 4.0" />
  <row Id="34472" PostHistoryTypeId="3" PostId="8781" RevisionGUID="c94c50f4-641a-43e8-91fa-bc49d30f85c2" CreationDate="2023-06-06T04:36:45.737" UserId="3538" Text="|babe|aura|substrate-node|session|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34473" PostHistoryTypeId="2" PostId="8782" RevisionGUID="b5571f2e-2a30-4d59-b92d-7f522fd11731" CreationDate="2023-06-06T04:46:45.280" UserId="4052" Text="I'm facing an issue. I used a query subscription to listen and update the free balance on UI. But I don't know why, when I log free in callback, they always return a balance of receiver and then a balance of the sender&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import BigNumber from 'bignumber.js';&#xD;&#xA;import BN from 'bn.js';&#xD;&#xA;import {  useEffect, useState } from 'react';&#xD;&#xA;&#xD;&#xA;import { polkadotApiInstant } from '~/polkadot/api';&#xD;&#xA;&#xD;&#xA;const useFetchCurrentBanlance = (address: string) =&gt; {&#xD;&#xA;  const [balance, setBalance] = useState&lt;BN&gt;();&#xD;&#xA;  const [balanceValue, setBalanceValue] = useState&lt;string&gt;();&#xD;&#xA;  const [loading, setLoading] = useState&lt;boolean&gt;(false);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  const getBalance = async () =&gt; {&#xD;&#xA;    setLoading(true);&#xD;&#xA;&#xD;&#xA;    const api = polkadotApiInstant as any;&#xD;&#xA;&#xD;&#xA;    await api.isReady;&#xD;&#xA;    api.query.system.account(&#xD;&#xA;      address,&#xD;&#xA;      ({ data: { free } }: { nonce: any; data: { free: BN } }) =&gt; {&#xD;&#xA;        const valueBN = new BigNumber(free.toString())&#xD;&#xA;          .div(10 ** DECIMAL)&#xD;&#xA;          .toString();&#xD;&#xA;        setBalanceValue(valueBN);&#xD;&#xA;        setBalance(free);&#xD;&#xA;&#xD;&#xA;        setLoading(false);&#xD;&#xA;      }&#xD;&#xA;    );&#xD;&#xA;  };&#xD;&#xA;  useEffect(() =&gt; {&#xD;&#xA;    getBalance();&#xD;&#xA;  }, [address]);&#xD;&#xA;  return { balance, balanceValue, loading };&#xD;&#xA;};&#xD;&#xA;export default useFetchCurrentBanlance;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34475" PostHistoryTypeId="1" PostId="8782" RevisionGUID="b5571f2e-2a30-4d59-b92d-7f522fd11731" CreationDate="2023-06-06T04:46:45.280" UserId="4052" Text="Listen to balance changes wrong after transfer token" ContentLicense="CC BY-SA 4.0" />
  <row Id="34476" PostHistoryTypeId="3" PostId="8782" RevisionGUID="b5571f2e-2a30-4d59-b92d-7f522fd11731" CreationDate="2023-06-06T04:46:45.280" UserId="4052" Text="|polkadot-js|balances|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34477" PostHistoryTypeId="2" PostId="8783" RevisionGUID="27324fba-9792-40cf-b5b1-40e9a94a2ea9" CreationDate="2023-06-06T06:45:40.163" UserId="4304" Text="I was doing an assignment and for that I have cloned a repo. After that I have run the command ```cargo build --release```. After that I was getting the error[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After that according to this-  https://substrate.stackexchange.com/questions/3479/error-building-substrate-contract-nodeerrore0603-module-group-is-private  &#xD;&#xA;I have used the command ```cargo update -p syn@1.0.109 --precise 1.0.96``` &#xD;&#xA;I have used syn@1.0.109 as I have two syn as in image.[![enter image description here][2]][2]&#xD;&#xA;After that I was getting this error[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Can anyone help me in that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DuwjG.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/MTOmi.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/6Qo2H.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="34479" PostHistoryTypeId="1" PostId="8783" RevisionGUID="27324fba-9792-40cf-b5b1-40e9a94a2ea9" CreationDate="2023-06-06T06:45:40.163" UserId="4304" Text="How to solve this Failed to compact generated WASM binary.: Error(UnknownOpcode(192))" ContentLicense="CC BY-SA 4.0" />
  <row Id="34480" PostHistoryTypeId="3" PostId="8783" RevisionGUID="27324fba-9792-40cf-b5b1-40e9a94a2ea9" CreationDate="2023-06-06T06:45:40.163" UserId="4304" Text="|substrate-node-template|polkadot|rust|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34481" PostHistoryTypeId="5" PostId="8783" RevisionGUID="b749dcae-dc8b-44fa-8166-3a3745d69ffe" CreationDate="2023-06-06T06:53:08.140" UserId="4304" Comment="deleted 22 characters in body" Text="For one assignment I have run the command ```cargo build --release``` so that I can build the pallet. After that I was getting the error[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After that according to this-  https://substrate.stackexchange.com/questions/3479/error-building-substrate-contract-nodeerrore0603-module-group-is-private  &#xD;&#xA;I have used the command ```cargo update -p syn@1.0.109 --precise 1.0.96``` &#xD;&#xA;I have used syn@1.0.109 as I have two syn as in image.[![enter image description here][2]][2]&#xD;&#xA;After that I was getting this error[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Can anyone help me in that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DuwjG.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/MTOmi.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/6Qo2H.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="34482" PostHistoryTypeId="2" PostId="8784" RevisionGUID="806f1c46-6528-42ac-bd89-742de5cbfe43" CreationDate="2023-06-06T07:06:32.113" UserId="4052" Text="Plus, I have a debugger, the reason is the local storage cache. When I switch 2 accounts in one wallet, it's happening &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SNmHA.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/wqtSz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34486" PostHistoryTypeId="2" PostId="8785" RevisionGUID="9f341da2-524e-4b09-b8a6-c1c70b8107c0" CreationDate="2023-06-06T10:42:40.980" UserId="452" Text="GRANDPA tolerates up to 1/3 of the validator set equivocating. Whenever a voter equivocates that is counted as voting for everything (quoting from the paper: &quot;We count equivocations as votes for everything so that observing a vote is monotonic&quot;), that is why we need to track equivocations when validating a justification since they contribute as a &quot;vote&quot; for something to get finalized. Since an equivocation is counted as voting for everything we only care about keeping track of a single equivocation per voter, adding more equivocated votes for the same voter to the justification would just be unnecessary bloat. The method `validate_commit` is meant to be used by anyone that wants to validate a commit, both full and light clients will do this. Equivocators do get slashed but that isn't dealt with here, we only detect equivocations and report them to staking." ContentLicense="CC BY-SA 4.0" />
  <row Id="34488" PostHistoryTypeId="5" PostId="8783" RevisionGUID="19078176-8797-4a57-9af6-16601f913931" CreationDate="2023-06-06T10:58:22.197" UserId="2281" Comment="added 6 characters in body" Text="For one assignment I have run the command ```cargo build --release``` so that I can build the pallet. After that I was getting the error[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After that according to this-  https://substrate.stackexchange.com/questions/3479/error-building-substrate-contract-nodeerrore0603-module-group-is-private  &#xD;&#xA;I have used the command ```cargo update -p syn@1.0.109 --precise 1.0.96``` &#xD;&#xA;I have used `syn@1.0.109` as I have two syn as in image.[![enter image description here][2]][2]&#xD;&#xA;**After that I was getting this error**[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Can anyone help me in that.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/DuwjG.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/MTOmi.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/6Qo2H.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="34489" PostHistoryTypeId="2" PostId="8786" RevisionGUID="80df3bae-b792-41c7-9576-a88104321243" CreationDate="2023-06-06T11:37:52.270" UserId="3528" Text="I want to calculate fees for historical EIP-1559 transactions on Astar EVM. For this, I need to use the `GasPrice` formula:&#xD;&#xA;&#xD;&#xA;    GasPrice = BaseFee + MaxPriorityFeePerGas &lt; MaxFeePerGas ? &#xD;&#xA;            BaseFee + MaxPriorityFeePerGas : &#xD;&#xA;            MaxFeePerGas;&#xD;&#xA;&#xD;&#xA;`MaxPriorityFeePerGas` and `MaxFeePerGas` values are available in transaction data and are set by the user but `BaseFee` value is not. As far as I know this value is set by the system and is dynamic. Is there a way to retrieve this `BaseFee` value for historical blocks? Is this information stored in the blockchain and can it be read directly?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34491" PostHistoryTypeId="1" PostId="8786" RevisionGUID="80df3bae-b792-41c7-9576-a88104321243" CreationDate="2023-06-06T11:37:52.270" UserId="3528" Text="How can I retrieve the baseFeePerGas value for historical blocks on Astar?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34492" PostHistoryTypeId="3" PostId="8786" RevisionGUID="80df3bae-b792-41c7-9576-a88104321243" CreationDate="2023-06-06T11:37:52.270" UserId="3528" Text="|evm|astar|fee|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34493" PostHistoryTypeId="52" PostId="8782" RevisionGUID="b80ddf0f-5046-4c79-ab76-ccf804fd828e" CreationDate="2023-06-06T12:48:27.827" />
  <row Id="34494" PostHistoryTypeId="2" PostId="8787" RevisionGUID="d1f07e1d-4d74-405f-bb29-be92f44a1cf9" CreationDate="2023-06-06T13:12:27.027" UserId="712" Text="Here is a method to get historical `baseFeePerGas` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const { ethers } = require(&quot;ethers&quot;);&#xD;&#xA;&#xD;&#xA;async function getBaseFee(blockNumber) {&#xD;&#xA;    const rpc = &quot;https://evm.astar.network&quot;&#xD;&#xA;    let provider = new ethers.providers.JsonRpcProvider(rpc);&#xD;&#xA;    let block = await provider.getBlock(blockNumber);&#xD;&#xA;    return block.baseFeePerGas;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;let blockNumber = 1300000;  // replace with the block number you're interested in&#xD;&#xA;getBaseFee(blockNumber)&#xD;&#xA;    .then(baseFee =&gt; console.log(`Base fee for block ${blockNumber}: ${baseFee}`))&#xD;&#xA;    .catch(err =&gt; console.log(err));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've made also a [replit you can play with][1]. &#xD;&#xA;&#xD;&#xA;  [1]: https://replit.com/@gluneau/Get-get-base-fee-price-per-gas-from-Astars-EVM?v=1" ContentLicense="CC BY-SA 4.0" />
  <row Id="34496" PostHistoryTypeId="2" PostId="8788" RevisionGUID="c58c4d6a-77a5-4597-a1f4-8983155361e7" CreationDate="2023-06-06T13:29:20.053" UserId="2025" Text="As Alejandro said above, this is outside the scope of XCM. XCM is just a message format and it assumes that there is a transport layer to transfer the XCM messages from chain A to chain B.&#xD;&#xA;&#xD;&#xA;I recommend you to read this article to get an idea on how messages (XCM or any arbitrary information) can be passed among parachains with no additional trust assumptions beyond the economic security of the relay chain:&#xD;&#xA;&#xD;&#xA;https://medium.com/web3foundation/polkadots-messaging-scheme-b1ec560908b7" ContentLicense="CC BY-SA 4.0" />
  <row Id="34498" PostHistoryTypeId="2" PostId="8789" RevisionGUID="b987e11d-5d1e-4230-9c92-6d50ad37202d" CreationDate="2023-06-06T13:32:46.143" UserId="4306" Text="Someone sent me $WND tokens from faucet but I did not receive it.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Also, why do you have 1 !drip request quota on your faucet? I find it hard to test with all this blockers you set in place. They're slowing me down.&#xD;&#xA;&#xD;&#xA;I want to mint some meme coins on Westmint which I'll later implement on Polkadot. I cant do it because you make it hard for testers to do so.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zE6A3.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Q9Rss.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34500" PostHistoryTypeId="1" PostId="8789" RevisionGUID="b987e11d-5d1e-4230-9c92-6d50ad37202d" CreationDate="2023-06-06T13:32:46.143" UserId="4306" Text="Westend/Westmint: Difficulty in Minting a Fungible Asset in Westmint" ContentLicense="CC BY-SA 4.0" />
  <row Id="34501" PostHistoryTypeId="3" PostId="8789" RevisionGUID="b987e11d-5d1e-4230-9c92-6d50ad37202d" CreationDate="2023-06-06T13:32:46.143" UserId="4306" Text="|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34502" PostHistoryTypeId="5" PostId="8789" RevisionGUID="428cf753-74ee-41d8-b3a4-c5c10bb4d51a" CreationDate="2023-06-06T13:47:02.737" UserId="4306" Comment="added 26 characters in body" Text="Someone sent me $WND tokens from faucet but I did not receive it.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Also, why do you have 1 !drip request quota on your faucet? I find it hard to test with all this blockers you set in place. They're slowing me down. This is so anticlimactic.&#xD;&#xA;&#xD;&#xA;I want to mint some meme coins on Westmint which I'll later implement on Polkadot. I cant do it because you make it hard for testers to do so. I cant get $WND tokens!&#xD;&#xA;&#xD;&#xA;Can you send me 50 $WND pls?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zE6A3.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Q9Rss.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34503" PostHistoryTypeId="5" PostId="8789" RevisionGUID="e6b880d8-b63b-4c1f-8c65-6f285619951f" CreationDate="2023-06-06T15:13:33.867" UserId="2281" Comment="added 12 characters in body" Text="Someone sent me `$WND tokens` from faucet but I did not receive it.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Also, why do you have 1 !drip request quota on your faucet? I find it hard to test with all this blockers you set in place. They're slowing me down. This is so anticlimactic.&#xD;&#xA;&#xD;&#xA;I want to `mint` some meme coins on `Westmint` which I'll later implement on `Polkadot`. I cant do it because you make it hard for testers to do so. I cant get `$WND tokens!`&#xD;&#xA;&#xD;&#xA;Can you send me `50 $WND` pls?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zE6A3.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Q9Rss.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34504" PostHistoryTypeId="2" PostId="8790" RevisionGUID="58725e34-e326-4dd8-b32e-5962dcbb2e3f" CreationDate="2023-06-06T18:40:45.827" UserId="251" Text="Because `AccountId` was implemented `From&lt;[u8; 32]&gt;`. And the `KeyId`(aura, babe, grandpa...) was implemented `UncheckedFrom&lt;[u8; 32]&gt;` instead of `From&lt;[u8; 32]&gt;`.&#xD;&#xA;&#xD;&#xA;Read more: https://paritytech.github.io/substrate/master/sp_core/crypto/trait.UncheckedFrom.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="34506" PostHistoryTypeId="52" PostId="8786" RevisionGUID="7d7f8e8a-8481-4c4b-a6c0-36fd19bb227b" CreationDate="2023-06-06T19:38:37.840" />
  <row Id="34507" PostHistoryTypeId="2" PostId="8791" RevisionGUID="9c2f1ac1-8e46-4ed0-aa84-e7327b9af459" CreationDate="2023-06-06T19:43:46.290" UserId="2722" Text="I am currently working on a project that involves creating a Substrate chain and I have several questions related to this:&#xD;&#xA;&#xD;&#xA;**Integration with MetaMask:** I want to be able to connect my Substrate chain to MetaMask. How can I accomplish this?&#xD;&#xA;&#xD;&#xA;**Deploying Smart Contracts in Solidity:** I'd like to give users of the network the ability to deploy smart contracts using Solidity. What are the steps that I need to follow?&#xD;&#xA;&#xD;&#xA;**Transaction Fee Customization:** I am looking for a way to set custom transaction fees for different functions within my network. Is there a way to do this?&#xD;&#xA;&#xD;&#xA;**Implementing ERC-721:** I plan to use ERC-721 technology in my project. How can I integrate this with my Substrate chain?&#xD;&#xA;&#xD;&#xA;Lastly, I have come across the Frontier project, and I wonder if it might provide solutions to my questions. Has anyone used Frontier in this context and what has been your experience?&#xD;&#xA;&#xD;&#xA;Any help or guidance would be much appreciated. Thank you.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34509" PostHistoryTypeId="1" PostId="8791" RevisionGUID="9c2f1ac1-8e46-4ed0-aa84-e7327b9af459" CreationDate="2023-06-06T19:43:46.290" UserId="2722" Text="How to Integrate a Substrate Chain with MetaMask and Implement Specific Features?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34510" PostHistoryTypeId="3" PostId="8791" RevisionGUID="9c2f1ac1-8e46-4ed0-aa84-e7327b9af459" CreationDate="2023-06-06T19:43:46.290" UserId="2722" Text="|substrate-node-template|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34511" PostHistoryTypeId="5" PostId="8786" RevisionGUID="ab18dcc5-d378-4c65-b37f-8d30d077462a" CreationDate="2023-06-06T19:53:15.507" UserId="3528" Comment="add solutions for both APIs" Text="I want to calculate fees for historical EIP-1559 transactions on Astar EVM. For this, I need to use the `GasPrice` formula:&#xD;&#xA;&#xD;&#xA;    GasPrice = BaseFee + MaxPriorityFeePerGas &lt; MaxFeePerGas ? &#xD;&#xA;            BaseFee + MaxPriorityFeePerGas : &#xD;&#xA;            MaxFeePerGas;&#xD;&#xA;&#xD;&#xA;`MaxPriorityFeePerGas` and `MaxFeePerGas` values are available in transaction data and are set by the user but `BaseFee` value is not. As far as I know this value is set by the system and is dynamic. Is there a way to retrieve this `BaseFee` value for historical blocks? Is this information stored in the blockchain and can it be read directly?&#xD;&#xA;&#xD;&#xA;**Solution:**&#xD;&#xA;&#xD;&#xA;In order to get `baseFee` value using the Ethereum API see [@gluneau][1] answer.&#xD;&#xA;&#xD;&#xA;When it comes to the Substrate API:&#xD;&#xA;In the Astar blockchain, there exists a `BaseFee` pallet, which stores the `baseFee` value for each block. We can access its storage to fetch the `baseFee` value for any specific block.&#xD;&#xA;&#xD;&#xA;For instance, with the Substrate Sidecar API, we can use the following path to obtain the `baseFeePerGas` value for block number 1300000:&#xD;&#xA;&#xD;&#xA;    /pallets/base-fee/storage/BaseFeePerGas?at=1300000&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/users/712/gluneau" ContentLicense="CC BY-SA 4.0" />
  <row Id="34512" PostHistoryTypeId="2" PostId="8792" RevisionGUID="4aa1c96d-3a31-4908-99fb-9060e0b0479f" CreationDate="2023-06-06T20:37:58.317" UserId="3142" Text="How can I obtain the Polkadot release version in Rust that my node was compiled against?  I want to log it at node startup.  e.g.  Polkadot 0.9.42" ContentLicense="CC BY-SA 4.0" />
  <row Id="34514" PostHistoryTypeId="1" PostId="8792" RevisionGUID="4aa1c96d-3a31-4908-99fb-9060e0b0479f" CreationDate="2023-06-06T20:37:58.317" UserId="3142" Text="How to obtain Polkadot release version?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34515" PostHistoryTypeId="3" PostId="8792" RevisionGUID="4aa1c96d-3a31-4908-99fb-9060e0b0479f" CreationDate="2023-06-06T20:37:58.317" UserId="3142" Text="|polkadot|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34516" PostHistoryTypeId="2" PostId="8793" RevisionGUID="6e1b6fbd-d26b-4672-a6e5-e9a25ed40e4d" CreationDate="2023-06-06T20:50:40.837" UserId="3042" Text="There are 2 open issues which might solve your problem&#xD;&#xA;https://github.com/paritytech/polkadot-testnet-faucet/issues/152&#xD;&#xA;https://github.com/paritytech/polkadot-testnet-faucet/issues/151&#xD;&#xA;&#xD;&#xA;The westend faucet drips tokens only to westend relay-chain, not to westmint for now&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34518" PostHistoryTypeId="2" PostId="8794" RevisionGUID="cd821371-0249-40e6-a430-2d9ece5e6447" CreationDate="2023-06-06T21:11:07.997" UserId="198" Text="&gt; Also, why do you have 1 !drip request quota on your faucet?&#xD;&#xA;&#xD;&#xA;This is to prevent hoarding and attacks against the network.&#xD;&#xA;&#xD;&#xA;&gt; I find it hard to test with all this blockers you set in place. They're slowing me down. This is so anticlimactic.&#xD;&#xA;&#xD;&#xA;You can test a lot with a few WND. Note that you can drip the faucet daily.&#xD;&#xA;&#xD;&#xA;&gt; I want to mint some meme coins on Westmint which I'll later implement on Polkadot. I cant do it because you make it hard for testers to do so. I cant get $WND tokens! &#xD;&#xA;&#xD;&#xA;Yes, you can request that and you will get them.&#xD;&#xA;&#xD;&#xA;&gt; Can you send me 50 $WND pls?&#xD;&#xA;&#xD;&#xA;Sure but for that you'd need to provide an address !&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34520" PostHistoryTypeId="2" PostId="8795" RevisionGUID="8c589cea-ae51-4420-b6b8-46cab36701b1" CreationDate="2023-06-06T21:41:28.457" UserId="198" Text="So after some research I found your address:&#xD;&#xA;https://westend.subscan.io/account/5EfFtggHCobGTgfS7FuAvnyuZfZhX2RDc2TbgMSGfPqPebdX&#xD;&#xA;&#xD;&#xA;So you did get 2x 1 WND. WND are tokens for the `Westend` network. This is a **test** network.&#xD;&#xA;&#xD;&#xA;I toped you up 50 WND. You can see the tx here: https://westend.subscan.io/account/5EfFtggHCobGTgfS7FuAvnyuZfZhX2RDc2TbgMSGfPqPebdX&#xD;&#xA;&#xD;&#xA;Those tokens are only credited to your account on the Westend network and **not** on the Polkadot network.&#xD;&#xA;&#xD;&#xA;While you could reuse an address on several networks, this is not recommended. Many clients do some magic to make it work seamlessly but tokens remains on their chain and the Westend faucet will not send any token on the Polkadot network.&#xD;&#xA;&#xD;&#xA;I see you use Talisman. Make sure to enabled testnets:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;then ensure you pick the right chain:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;finally select the account you want to use.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/epkPA.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/B6rs6.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="34522" PostHistoryTypeId="2" PostId="8796" RevisionGUID="7d7f3b84-d537-4c8a-b852-c9bc8f42231b" CreationDate="2023-06-06T23:32:37.963" UserId="4307" Text="I have tried to use @polkadot/react-components in React project&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here, AddressInfo component component is from @polkadot/react-components&#xD;&#xA;When I try to use this component, I got this issue&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/jEoHX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/OtpCN.png&#xD;&#xA;&#xD;&#xA;I'd really appreciate if anyone can help me to fix this issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="34524" PostHistoryTypeId="1" PostId="8796" RevisionGUID="7d7f3b84-d537-4c8a-b852-c9bc8f42231b" CreationDate="2023-06-06T23:32:37.963" UserId="4307" Text="How to use @polkadot/react-components? version issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="34525" PostHistoryTypeId="3" PostId="8796" RevisionGUID="7d7f3b84-d537-4c8a-b852-c9bc8f42231b" CreationDate="2023-06-06T23:32:37.963" UserId="4307" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34527" PostHistoryTypeId="52" PostId="8789" RevisionGUID="ceb03a2c-d387-4000-9c45-fc5893dafc0e" CreationDate="2023-06-07T02:24:04.303" />
  <row Id="34528" PostHistoryTypeId="5" PostId="8796" RevisionGUID="b2609f57-0509-40ef-a801-39ab3bd8aa76" CreationDate="2023-06-07T02:26:48.173" UserId="354" Comment="added 3 characters in body" Text="I have tried to use `@polkadot/react-components`in React project&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here, AddressInfo component component is from `@polkadot/react-components`&#xD;&#xA;When I try to use this component, I got this issue&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/jEoHX.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/OtpCN.png&#xD;&#xA;&#xD;&#xA;I'd really appreciate if anyone can help me to fix this issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="34531" PostHistoryTypeId="5" PostId="8792" RevisionGUID="3d746493-1cc9-4296-b5e1-f90cd69458d3" CreationDate="2023-06-07T03:16:29.200" UserId="354" Comment="added 2 characters in body" Text="How can I obtain the Polkadot release version in Rust that my node was compiled against?  I want to log it at node startup.  e.g.  `Polkadot 0.9.42`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34532" PostHistoryTypeId="50" PostId="7785" RevisionGUID="3f3d29e9-cbe6-4544-8b75-c51736e519c9" CreationDate="2023-06-07T04:07:50.883" UserId="-1" />
  <row Id="34533" PostHistoryTypeId="2" PostId="8798" RevisionGUID="18537a27-1c99-48c1-8554-1affba560b4e" CreationDate="2023-06-07T04:55:12.433" UserId="4306" Text="Thank you to the community who initially answered my question here:&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/8789/westend-westmint-difficulty-in-minting-a-fungible-asset-in-westmint&#xD;&#xA;&#xD;&#xA;So this is where Im at, I have 52 $WND tokens in Westend:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But the minting center for NFTs is at Westmint, which is sitting on Westend relay chain.&#xD;&#xA;So ofc, I got to Westmint. But I go there and I see I have no $WND tokens, which is what's needed to pay my custom NFT Fungible asset.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/E6jiO.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/7cPWK.png&#xD;&#xA;&#xD;&#xA;So, again, Im stuck and faced with impediment. &#xD;&#xA;&#xD;&#xA;Can you please help me how to resolve this? What step am I missing?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34535" PostHistoryTypeId="1" PostId="8798" RevisionGUID="18537a27-1c99-48c1-8554-1affba560b4e" CreationDate="2023-06-07T04:55:12.433" UserId="4306" Text="How to Transfer $WND Tokens from Westend going to Westmint to MINT Fungible Token?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34536" PostHistoryTypeId="3" PostId="8798" RevisionGUID="18537a27-1c99-48c1-8554-1affba560b4e" CreationDate="2023-06-07T04:55:12.433" UserId="4306" Text="|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34538" PostHistoryTypeId="2" PostId="8799" RevisionGUID="4571ca69-24c7-4714-950e-3f77b2b779cf" CreationDate="2023-06-07T05:20:07.907" UserId="2281" Text="You need to Integrate the [Frontier][1] into your `Substrate` Chain Frontier have `Pallet_evm` and `Pallet_ethereum` which provide EVM comaptibility to substrate for integrating the pallets you can follow this [tutorial][2] and For the `Metmask`support you need to integrate the `RPC's` into you substrate node and make changes to your `Services.rs` file,you can take reference from  [ChainX][3] , [Reef-chain][4].&#xD;&#xA;&#xD;&#xA;For `Transaction Fee` Customization you can change [here][5] and customize it according to your requirement.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/frontier.git&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/build-application-logic/add-a-pallet/&#xD;&#xA;  [3]: https://github.com/chainx-org/ChainX.git&#xD;&#xA;  [4]: https://github.com/reef-defi/reef-chain.git&#xD;&#xA;  [5]: https://github1s.com/paritytech/substrate/blob/HEAD/bin/node/runtime/src/lib.rs#L460-L461" ContentLicense="CC BY-SA 4.0" />
  <row Id="34540" PostHistoryTypeId="5" PostId="8791" RevisionGUID="a63bca92-4b61-4eda-968d-9ee1c2e1db32" CreationDate="2023-06-07T05:20:47.443" UserId="2281" Comment="added 2 characters in body; edited tags" Text="I am currently working on a project that involves creating a `Substrate chain` and I have several questions related to this:&#xD;&#xA;&#xD;&#xA;**Integration with MetaMask:** I want to be able to connect my Substrate chain to MetaMask. How can I accomplish this?&#xD;&#xA;&#xD;&#xA;**Deploying Smart Contracts in Solidity:** I'd like to give users of the network the ability to deploy smart contracts using Solidity. What are the steps that I need to follow?&#xD;&#xA;&#xD;&#xA;**Transaction Fee Customization:** I am looking for a way to set custom transaction fees for different functions within my network. Is there a way to do this?&#xD;&#xA;&#xD;&#xA;**Implementing ERC-721:** I plan to use ERC-721 technology in my project. How can I integrate this with my Substrate chain?&#xD;&#xA;&#xD;&#xA;Lastly, I have come across the Frontier project, and I wonder if it might provide solutions to my questions. Has anyone used Frontier in this context and what has been your experience?&#xD;&#xA;&#xD;&#xA;Any help or guidance would be much appreciated. Thank you.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34541" PostHistoryTypeId="6" PostId="8791" RevisionGUID="a63bca92-4b61-4eda-968d-9ee1c2e1db32" CreationDate="2023-06-07T05:20:47.443" UserId="2281" Comment="added 2 characters in body; edited tags" Text="|substrate-node-template|evm|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34542" PostHistoryTypeId="5" PostId="8799" RevisionGUID="62415ca6-fb07-474a-be74-653344f728a1" CreationDate="2023-06-07T05:30:55.323" UserId="2281" Comment="added 62 characters in body" Text="You need to Integrate the [Frontier][1] into your `Substrate` Chain Frontier have `Pallet_evm` and `Pallet_ethereum` which provide EVM comaptibility to substrate for integrating the pallets you can follow this [tutorial][2] and For the `Metmask`support you need to integrate the `RPC's` into you substrate node and make changes to your `Services.rs` file,you can take reference from  [ChainX][3] , [Reef-chain][4] &amp; [Moonbeam][5].&#xD;&#xA;&#xD;&#xA;For `Transaction Fee` Customization you can change [here][6] and customize it according to your requirement.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/frontier.git&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/build-application-logic/add-a-pallet/&#xD;&#xA;  [3]: https://github.com/chainx-org/ChainX.git&#xD;&#xA;  [4]: https://github.com/reef-defi/reef-chain.git&#xD;&#xA;  [5]: https://github.com/PureStake/moonbeam&#xD;&#xA;  [6]: https://github1s.com/paritytech/substrate/blob/HEAD/bin/node/runtime/src/lib.rs#L460-L461" ContentLicense="CC BY-SA 4.0" />
  <row Id="34543" PostHistoryTypeId="2" PostId="8800" RevisionGUID="dd2fc4c4-b527-4273-9abc-aba8c0a6bf37" CreationDate="2023-06-07T06:17:16.943" UserId="3667" Text="This doesn't seem like a substrate-specific question but rather a rust/dependency question. You're asking, if I am not mistaken, a way to pull in the string from `branch=` in the following: &#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;polkadot-parachain = { git = &quot;https://github.com/paritytech/polkadot&quot;, default-features = false, branch = &quot;release-v0.9.42&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Firstly, why not embed the polkadot version directly into your node like so?&#xD;&#xA;```rs&#xD;&#xA;log::info!(&quot;this node was compiled against polkadot-v0.9.42&quot;);&#xD;&#xA;```&#xD;&#xA;This has the advantage of being a simple solution, and since you're updating your polkadot/substrate dependencies anyways, might as well update this loc as a part of the process.&#xD;&#xA;&#xD;&#xA;AFAIK, this is not possible to do _inside_ a rust program, but you can use `cargo metadata` to check what dependencies your program is using, and then maybe use some fancy regex to pull in the specific string, such as match something along the lines of `cargo metadata | rg 'release-v0.*'`&#xD;&#xA;&#xD;&#xA;Now with that said you can certainly run this command inside rust using `Command` : &#xD;&#xA;```rs&#xD;&#xA;use std::process::Command;&#xD;&#xA;&#xD;&#xA;    let output = Command::new(&quot;cargo&quot;)&#xD;&#xA;        .arg(&quot;metadata&quot;)&#xD;&#xA;        .output()&#xD;&#xA;        .expect(&quot;Failed to execute command&quot;);&#xD;&#xA;&#xD;&#xA;    if output.status.success() {&#xD;&#xA;        let stdout = String::from_utf8_lossy(&amp;output.stdout);&#xD;&#xA;        // -- do pattern matching here --&#xD;&#xA;        println!(&quot;Command executed successfully:\n{}&quot;, stdout);&#xD;&#xA;    } else {&#xD;&#xA;        let stderr = String::from_utf8_lossy(&amp;output.stderr);&#xD;&#xA;        println!(&quot;Command failed:\n{}&quot;, stderr);&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;But again, this rabbit hole goes deep into writing a rust program just for something very simple to just open up and look. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34547" PostHistoryTypeId="2" PostId="8802" RevisionGUID="ed856309-0465-49c4-9324-b6e4d1ab8b87" CreationDate="2023-06-07T07:39:07.483" UserId="198" Text="There **used to** be a **teleport** item in the menu under `Accounts` or `Network` if I recall but I see this is no longer there. But worry not, there is a way :)&#xD;&#xA;&#xD;&#xA;You will need to craft an extrinsic from the `Developer`/`Extrinsics` Menu.&#xD;&#xA;&#xD;&#xA;To get start started, I created a template transaction for you:&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwestend-rpc.polkadot.io#/extrinsics/decode/0x630103000100a10f030001010096d522d22a25ff4b30146d13e274a6c940be96f191e3e13b524d9040c6bdd4190304000000000b00a0724e180900000000&#xD;&#xA;&#xD;&#xA;Clicking on that link will open PolkadotJS and show you a transaction you can edit as shown below:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;First click the `Submission` button/tab so you can edit the tx:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Make sure to send the tx from an account of yours that has enough funds.&#xD;&#xA;Here is a screenshot of the XCM call, it shows the relevant information:&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Here are a few caveats:&#xD;&#xA;- select an account of yours&#xD;&#xA;- your account should have enough funds&#xD;&#xA;- provide the right parachain ID, westmint is `1000`&#xD;&#xA;- the fungible amount is in units, so 10 WND = 10_000_000_000_000 (+ 12 zeroes)&#xD;&#xA;- make sure the `feeAssetItem` is `0`&#xD;&#xA;&#xD;&#xA;Note that upon transaction success, you will need to wait a few more seconds (usually less than 12s) on the parachain for your WND to show up on Westmint.&#xD;&#xA;&#xD;&#xA;See you on the other side :) and have fun.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vKuv6.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/El2rs.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/1TwCN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34549" PostHistoryTypeId="5" PostId="8791" RevisionGUID="9cc3a51f-b37e-4c68-a3b9-2f4abf81d879" CreationDate="2023-06-07T08:55:47.943" UserId="2722" Comment="added 204 characters in body" Text="I am currently working on a project that involves creating a `Substrate chain` and I have several questions related to this:&#xD;&#xA;&#xD;&#xA;**Integration with MetaMask:** I want to be able to connect my Substrate chain to MetaMask. How can I accomplish this?&#xD;&#xA;&#xD;&#xA;**Deploying Smart Contracts in Solidity:** I'd like to give users of the network the ability to deploy smart contracts using Solidity. What are the steps that I need to follow?&#xD;&#xA;&#xD;&#xA;**Transaction Fee Customization:** I am looking for a way to set custom transaction fees for different functions within my network. Is there a way to do this?&#xD;&#xA;&#xD;&#xA;**Implementing ERC-721:** I plan to use ERC-721 technology in my project. How can I integrate this with my Substrate chain?&#xD;&#xA;&#xD;&#xA;Lastly, I have come across the Frontier project, and I wonder if it might provide solutions to my questions. Has anyone used Frontier in this context and what has been your experience?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What I mean by this question is whether there will be a change in the way of coding in palettes or not? Or does it make our network compatible with Metamask and the implementation of Solidity codes?&#xD;&#xA;&#xD;&#xA;Any help or guidance would be much appreciated. Thank you.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34550" PostHistoryTypeId="5" PostId="2295" RevisionGUID="269e1e9f-a300-4ada-94c4-1b0f2f744701" CreationDate="2023-06-07T09:20:39.743" UserId="116" Comment="Spelling cant -&gt; can't" Text="I was trying to submit items (extrinsics) to my Substrate blockchain instance, but it keeps getting rejected. I use the key pair I generate using `from_string` function from `sp_core::crypto::Pair`, but the extrinsics I signed using this key pair does not get submitted to the chain. The key pair that gets generated is the same type from Substrate's/Parity's `AccountKeyRing` module, but I keep getting `InvalidHexString` error. &#xD;&#xA;&#xD;&#xA;I was able to submit extrinsics signed by `AccountKeyring::Bob.pair()`. I'm confident the Key Pair I generated is the same type as `AccountKeyring::Bob.pair()`, but it's not working for me for some reason. The `secret phrase` I provide to the `from_string` should be valid because it came from `subkey tool`&#xD;&#xA;&#xD;&#xA;Anyways, I get this error in my external client:&#xD;&#xA;&#xD;&#xA;&gt;thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidHexString(InvalidStringLength)', src/services/route_actions/extrinsic_submitters.rs:25:73&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The secret phrase I provided to the `from_string` function are valid since this is generated from `subkey tool` (NOT USED IN PROD). This is my code snippet&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  let priv_key: String = &quot;endorse doctor arch helmet master dragon wild favorite property mercy vault maze&quot;.to_owned();&#xD;&#xA;  let from = Pair::from_string(&amp;priv_key[..], None).unwrap();&#xD;&#xA;  //let from = AccountKeyring::Bob.pair();&#xD;&#xA;  let api = Api::new(client).map(|api| api.set_signer(from)).unwrap();&#xD;&#xA;  ....&#xD;&#xA;  extrinsic_submitters::submit_to_save_item(api, incoming_item, now, datetime);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the code for the submission of the extrinsic I have:&#xD;&#xA;```rust&#xD;&#xA;#[allow(clippy::redundant_clone)]&#xD;&#xA;    let xt: UncheckedExtrinsicV4&lt;_&gt; = compose_extrinsic!(&#xD;&#xA;      api.clone(),&#xD;&#xA;      &quot;Auditor&quot;,&#xD;&#xA;      &quot;save_audit_item&quot;,&#xD;&#xA;      now.to_rfc3339().to_string().into_bytes()&#xD;&#xA;    );&#xD;&#xA;  &#xD;&#xA;    println!(&quot;[+] Composed Extrinsic:\n {:?}\n&quot;, xt);&#xD;&#xA;    &#xD;&#xA;    // send and watch extrinsic until finalized&#xD;&#xA;    let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;the error is thrown at:&#xD;&#xA;```rust&#xD;&#xA;let blockh = api.send_extrinsic(xt.hex_encode(), XtStatus::InBlock).unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the subkey tool cmd I used: `subkey generate`&#xD;&#xA;```&#xD;&#xA;Secret phrase:       endorse doctor arch helmet master dragon wild favorite property mercy vault maze&#xD;&#xA;  Network ID:        substrate&#xD;&#xA;  Secret seed:       0x78b8fbbbea218509c00d3531e72128d4eae54089f15deb24d721e30b351733ad&#xD;&#xA;  Public key (hex):  0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Account ID:        0x14e121f6e6cc2891cbbd5f6692e3724672d13e93a3562e3905d4310c2ba1c510&#xD;&#xA;  Public key (SS58): 5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;  SS58 Address:      5CY5hAGkTB7RZrouimGJ3S7zTDtnE6yg7z41DHrQeBcoc1PN&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the error I get from my node:&#xD;&#xA;&#xD;&#xA;&gt;Failed to submit extrinsic: Transaction pool error: Invalid transaction validity: InvalidTransaction::Payment&#xD;&#xA;&#xD;&#xA;It looks like there may be multiple reasons why the transaction is invalid, such as too high nonce, not enough funds in the account, and signature is invalid. I generated the keypair item via the info provided by subkey, and the signature should be valid, but I am not certain for sure since the error message is pretty general. My dispatchable function shouldn't cost anything because it has `#[pallet::weight(0)]`. Any tips how to expand on this `InvalidTransaction::Payment` error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34551" PostHistoryTypeId="4" PostId="2295" RevisionGUID="269e1e9f-a300-4ada-94c4-1b0f2f744701" CreationDate="2023-06-07T09:20:39.743" UserId="116" Comment="Spelling cant -&gt; can't" Text="Can't submit an extrinsic signed by generated key pair" ContentLicense="CC BY-SA 4.0" />
  <row Id="34552" PostHistoryTypeId="24" PostId="2295" RevisionGUID="269e1e9f-a300-4ada-94c4-1b0f2f744701" CreationDate="2023-06-07T09:20:39.743" Comment="Proposed by 116 approved by 2281, 354 edit id of 427" ContentLicense="CC BY-SA 4.0" />
  <row Id="34553" PostHistoryTypeId="5" PostId="3936" RevisionGUID="63e7075f-21d1-4fc6-9fd5-49d61c58c73f" CreationDate="2023-06-07T09:20:55.450" UserId="116" Comment="Rephrased the answer from `why not use` to a suggestible answer to better fit the Q&amp;A format. " Text="One way of achieving what you ask for is to enclose every `assert!` statement in a `#cfg[test]`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#cfg[test]&#xD;&#xA;assert!(...)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34554" PostHistoryTypeId="24" PostId="3936" RevisionGUID="63e7075f-21d1-4fc6-9fd5-49d61c58c73f" CreationDate="2023-06-07T09:20:55.450" Comment="Proposed by 116 approved by 2281, 354 edit id of 422" ContentLicense="CC BY-SA 4.0" />
  <row Id="34559" PostHistoryTypeId="2" PostId="8804" RevisionGUID="7768b692-4063-468c-b0b2-39f2604bf888" CreationDate="2023-06-07T09:45:13.793" UserId="298" Text="We are building a custom UI for chains containing pallet-supersig. It is very similar to a polkadot-js clone we built, but much simpler. In our simple custom UI, we are having some issues with making rpc calls to our custom rpc server and then displaying the info without any type decoration errors. &#xD;&#xA;&#xD;&#xA;### The task&#xD;&#xA;We want to make an RPC call such as `api.rpc.superSig.listMembers` from a chain called Soupcan from an RPC module called Supersig rpc, which connects to supersig pallet, and display the information on screen, without errors. &#xD;&#xA;&#xD;&#xA;`rpc: wss://soupcan1.jelliedowl.com`&#xD;&#xA;&#xD;&#xA;here you can see a working version: [Soupcan - polkadot-js clone](https://apps.decentration.org/?rpc=wss%3A%2F%2Fsoupcan1.jelliedowl.com#/supersig/dashboard) that succesfully connects with the rpc and displays information in a table. &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;So we can safely assume there is not a problem with the chain, pallet or rpc server. Link to the code we creates the Dashboard Table and rpc is [here](https://github.com/decentration/apps/blob/dd13433868abb2246766ff3b1494e3cdce8c3e79/packages/page-supersig/src/Supersig/Dashboard)&#xD;&#xA;&#xD;&#xA;Types we need to use to decorate the RPC are [here](https://github.com/decentration/apps/blob/fa92f1963259010d043d8f9561ee33b3ddc2754d/packages/apps-config/src/api/spec/kabocha.ts) we also have [supersig custom types npm package](https://github.com/decentration/supersig-types/tree/master)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This the rpc server for pallet_supersig is [here](https://github.com/decentration/pallet_supersig/blob/master/rpc/src/lib.rs)&#xD;&#xA;&#xD;&#xA;### Errors&#xD;&#xA;The problem is we are getting some errors:&#xD;&#xA;&#xD;&#xA;RPC-CORE: listMembers(supersig_id: AccountId): Vec&lt;(AccountId, Role)&gt;:: 2: Supersig error: Module, ModuleError { index: 42, error: [1, 0, 0, 0], message: None }&#xD;&#xA;&#xD;&#xA;42 means that the pallet number is 42 meaning supersig pallet&#xD;&#xA;&#xD;&#xA;VEC: Unable to decode on index 0 Tuple: failed on 1:: DoNotConstruct: Cannot construct unknown type Role&#xD;&#xA;&#xD;&#xA; [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Here is a link to the [branch](https://github.com/decentration/subverse-frontend/tree/issue-status)&#xD;&#xA;&#xD;&#xA;**Replicate Issue**&#xD;&#xA;&#xD;&#xA;steps to replicate the above listMembers error:&#xD;&#xA;&#xD;&#xA; - `npm install`&#xD;&#xA; - `npm start`&#xD;&#xA; - Connect to Soupcan node (soupcan1.jelliedowl.com) in the top left of the screen (make sure not to connect to soupcan2).&#xD;&#xA; - Go to Dashboard in the Sidebar. &#xD;&#xA; - Go to ./src/components/Dashboard/Dashboard.tsx to find the relevant code. &#xD;&#xA;&#xD;&#xA;The task is to successfully display the listMembers information in the table like in the first screenshot (or at least hard code a solution that successfully connects and decorates the information.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aABhh.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/DrMHq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34561" PostHistoryTypeId="1" PostId="8804" RevisionGUID="7768b692-4063-468c-b0b2-39f2604bf888" CreationDate="2023-06-07T09:45:13.793" UserId="298" Text="How to make an RPC call from custom RPC and then decorate types and display info succesfully?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34562" PostHistoryTypeId="3" PostId="8804" RevisionGUID="7768b692-4063-468c-b0b2-39f2604bf888" CreationDate="2023-06-07T09:45:13.793" UserId="298" Text="|custom-rpc|custom-types|ui|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34563" PostHistoryTypeId="5" PostId="8798" RevisionGUID="7d431057-8944-4b49-8ef1-d27ef1187e92" CreationDate="2023-06-07T09:49:15.883" UserId="4306" Comment="deleted 1 character in body" Text="Thank you to the community who initially answered my question here:&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/8789/westend-westmint-difficulty-in-minting-a-fungible-asset-in-westmint&#xD;&#xA;&#xD;&#xA;So this is where Im at, I have 52 $WND tokens in Westend:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But the minting center for NFTs is at Westmint, which is sitting on Westend relay chain.&#xD;&#xA;So ofc, I go to Westmint. But I go there and I see I have no $WND tokens, which is what's needed to pay my custom NFT Fungible asset.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/E6jiO.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/7cPWK.png&#xD;&#xA;&#xD;&#xA;So, again, Im stuck and faced with impediment. &#xD;&#xA;&#xD;&#xA;Can you please help me how to resolve this? What step am I missing?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34568" PostHistoryTypeId="5" PostId="5840" RevisionGUID="bb5652e0-3adb-4e29-adea-f084867ec62a" CreationDate="2023-06-07T10:06:08.627" UserId="116" Comment="Spellcheck and language" Text="I want to change my substrate chain consensus but I don't know how to set the new consensus in substrate. &#xD;&#xA;&#xD;&#xA;I want to set dops consensus for my substrate chain also please guide my for implement dpos in substrate. &#xD;&#xA;&#xD;&#xA;**How can i implement dpos? How can I set custom consensus as default in substrate ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="34569" PostHistoryTypeId="24" PostId="5840" RevisionGUID="bb5652e0-3adb-4e29-adea-f084867ec62a" CreationDate="2023-06-07T10:06:08.627" Comment="Proposed by 116 approved by 2281, 298 edit id of 425" ContentLicense="CC BY-SA 4.0" />
  <row Id="34570" PostHistoryTypeId="5" PostId="7067" RevisionGUID="f5a19e7a-11b8-4a55-be2d-0dd3c5306904" CreationDate="2023-06-07T10:06:19.843" UserId="116" Comment="Spelling dont -&gt; don't" Text="I'm trying to create a decentralized exchange (dEX) in Substrate and I have a function called `create_exchange` that has two parameters: `asset_id` and `liquidity_token_id`. I'm having trouble filling the `asset_id` parameter with the desired `AssetIdOf&lt;T&gt;` value in my local Substrate environment. I don't know how can i fill the `assetId`.&#xD;&#xA;&#xD;&#xA;**How can I fill assetId in substrate?**&#xD;&#xA;&#xD;&#xA;this is my repository [Repo][1]&#xD;&#xA;   &#xD;&#xA;    pub fn create_exchange(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			asset_id: AssetIdOf&lt;T&gt;,&#xD;&#xA;    			liquidity_token_id: AssetIdOf&lt;T&gt;,&#xD;&#xA;    			currency_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    			token_amount: AssetBalanceOf&lt;T&gt;,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			// -------------------------- Validation part --------------------------&#xD;&#xA;    			let caller = ensure_signed(origin)?;&#xD;&#xA;    			ensure!(currency_amount &gt;= T::MinDeposit::get(), Error::&lt;T&gt;::CurrencyAmountTooLow);&#xD;&#xA;    			ensure!(token_amount &gt; Zero::zero(), Error::&lt;T&gt;::TokenAmountIsZero);&#xD;&#xA;    			if T::Assets::total_issuance(asset_id.clone()).is_zero() {&#xD;&#xA;    				Err(Error::&lt;T&gt;::AssetNotFound)?&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			if &lt;Exchanges&lt;T&gt;&gt;::contains_key(asset_id.clone()) {&#xD;&#xA;    				Err(Error::&lt;T&gt;::ExchangeAlreadyExists)?&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			// ----------------------- Create liquidity token ----------------------&#xD;&#xA;    			T::AssetRegistry::create(&#xD;&#xA;    				liquidity_token_id.clone(),&#xD;&#xA;    				T::pallet_account(),&#xD;&#xA;    				false,&#xD;&#xA;    				&lt;AssetBalanceOf&lt;T&gt;&gt;::one(),&#xD;&#xA;    			)&#xD;&#xA;    			.map_err(|_| Error::&lt;T&gt;::TokenIdTaken)?;&#xD;&#xA;    &#xD;&#xA;    			// -------------------------- Update storage ---------------------------&#xD;&#xA;    			let exchange = Exchange {&#xD;&#xA;    				asset_id: asset_id.clone(),&#xD;&#xA;    				currency_reserve: &lt;BalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;    				token_reserve: &lt;AssetBalanceOf&lt;T&gt;&gt;::zero(),&#xD;&#xA;    				liquidity_token_id: liquidity_token_id.clone(),&#xD;&#xA;    			};&#xD;&#xA;    			let liquidity_minted = T::currency_to_asset(currency_amount);&#xD;&#xA;    &#xD;&#xA;    			Self::do_add_liquidity(&#xD;&#xA;    				exchange,&#xD;&#xA;    				currency_amount,&#xD;&#xA;    				token_amount,&#xD;&#xA;    				liquidity_minted,&#xD;&#xA;    				caller,&#xD;&#xA;    			)?;&#xD;&#xA;    &#xD;&#xA;    			Self::deposit_event(Event::ExchangeCreated(asset_id, liquidity_token_id));&#xD;&#xA;    			Ok(())&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_dex/blob/main/pallets/dex/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="34571" PostHistoryTypeId="24" PostId="7067" RevisionGUID="f5a19e7a-11b8-4a55-be2d-0dd3c5306904" CreationDate="2023-06-07T10:06:19.843" Comment="Proposed by 116 approved by 2281, 298 edit id of 426" ContentLicense="CC BY-SA 4.0" />
  <row Id="34572" PostHistoryTypeId="5" PostId="8037" RevisionGUID="02898548-cae7-4dc3-b42d-1f019775c236" CreationDate="2023-06-07T10:06:25.633" UserId="116" Comment="Spelling dont -&gt; don't" Text="I'm using ReactJs and ContractPromise object can't/don't access contract query and txs object.&#xD;&#xA;&#xD;&#xA;    const contract = new ContractPromise(api,metadata( in json even string format), address);&#xD;&#xA;The object instantiated it seems don't actually access the metadata.&#xD;&#xA;&#xD;&#xA;    contract.query // wont access the queries, &#xD;&#xA;    contract.address // will access the address&#xD;&#xA;    contract.abi // will access the abi&#xD;&#xA;    contract.tx // wont access the transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="34573" PostHistoryTypeId="24" PostId="8037" RevisionGUID="02898548-cae7-4dc3-b42d-1f019775c236" CreationDate="2023-06-07T10:06:25.633" Comment="Proposed by 116 approved by 2281, 298 edit id of 423" ContentLicense="CC BY-SA 4.0" />
  <row Id="34574" PostHistoryTypeId="5" PostId="4301" RevisionGUID="a09dac5e-362f-428c-ac24-79df3d52f757" CreationDate="2023-06-07T10:06:30.507" UserId="116" Comment="Spellcheck and language" Text="[![Screenshot][1]][1]I recently got a parachain ie, 4058 via subport issues request form&#xD;&#xA;&#xD;&#xA;When I was starting my parachain-collator-template with the following command &#xD;&#xA;&#xD;&#xA;*./target/release/parachain-collator \&#xD;&#xA;--bob \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain rococo-local-parachain-2000-raw.json \&#xD;&#xA;--base-path /tmp/parachain/bob \&#xD;&#xA;--port 40334 \&#xD;&#xA;--ws-port 8845 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain rococo.json \&#xD;&#xA;--port 30344 \&#xD;&#xA;--ws-port 9978*&#xD;&#xA;&#xD;&#xA;[rococo.json](https://drive.google.com/file/d/1CgM4qa81-xsWYOPVih3b3yiBuNPxmLRh/view?usp=sharing  &quot;chain spec file&quot;)&#xD;&#xA;&#xD;&#xA;[rococo-local-parachain-2000-raw.json ](https://drive.google.com/file/d/1K_i5QLPi-n1-Z81sRJE9Ksozi2VBXKk_/view?usp=sharing  &quot;chain spec file&quot;)&#xD;&#xA;&#xD;&#xA;It just shows logs of syncing peers&#xD;&#xA;&#xD;&#xA;I'm not able to produce new blocks via collators&#xD;&#xA;&#xD;&#xA;Can anyone help me? How can I able to solve this problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/nyqIz.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="34575" PostHistoryTypeId="4" PostId="4301" RevisionGUID="a09dac5e-362f-428c-ac24-79df3d52f757" CreationDate="2023-06-07T10:06:30.507" UserId="116" Comment="Spellcheck and language" Text="Collator nodes are not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="34576" PostHistoryTypeId="24" PostId="4301" RevisionGUID="a09dac5e-362f-428c-ac24-79df3d52f757" CreationDate="2023-06-07T10:06:30.507" Comment="Proposed by 116 approved by 2281, 298 edit id of 429" ContentLicense="CC BY-SA 4.0" />
  <row Id="34577" PostHistoryTypeId="5" PostId="6384" RevisionGUID="5bdb1b76-ffa5-4e49-9552-cbc39bf06b42" CreationDate="2023-06-07T10:06:37.733" UserId="116" Comment="Spelling cant -&gt; can't" Text="I am doing error handling in an app using polkadotJSAPI 7.13.1&#xD;&#xA;There are two ways to fetch info if an extrinsic succeeds or fails, the first one is via `dispatchError` in `signAndSend` like so&#xD;&#xA;&#xD;&#xA;    transferExtrinsic.signAndSend(account_from, { signer: injector.signer }, ({ status, events, dispatchError }) =&gt; {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The second is [described in docs][1]&#xD;&#xA;&#xD;&#xA;Both generally work for most extrinsics, but not for&#xD;&#xA; `transferExtrinsic = api.tx.balances.transfer(account_to, (amount));,` &#xD;&#xA;for example when trying to send more tokens than exists in a wallet. Both approaches give either DispatchError = undefined or doesn't find an event with extrinsicfailed. PolkadotJS web interface catches the error correctly. How do I check if any extrinsic succeeds or errors out, including balances.transfer extrinsic?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/cookbook/blocks/#how-do-i-map-extrinsics-to-their-events" ContentLicense="CC BY-SA 4.0" />
  <row Id="34578" PostHistoryTypeId="4" PostId="6384" RevisionGUID="5bdb1b76-ffa5-4e49-9552-cbc39bf06b42" CreationDate="2023-06-07T10:06:37.733" UserId="116" Comment="Spelling cant -&gt; can't" Text="Can't get extrinsic error from balances.sendTransfer extrinsic in polkadotJSAPI" ContentLicense="CC BY-SA 4.0" />
  <row Id="34579" PostHistoryTypeId="24" PostId="6384" RevisionGUID="5bdb1b76-ffa5-4e49-9552-cbc39bf06b42" CreationDate="2023-06-07T10:06:37.733" Comment="Proposed by 116 approved by 2281, 298 edit id of 428" ContentLicense="CC BY-SA 4.0" />
  <row Id="34580" PostHistoryTypeId="5" PostId="1423" RevisionGUID="974bcd07-fe12-4cd8-8192-b13631dc2976" CreationDate="2023-06-07T10:06:41.557" UserId="116" Comment="Spelling dont -&gt; don't" Text="```Rust&#xD;&#xA;#[derive(Encode,Decode,TypeInfo)&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;Pub struct Asset&lt;T:Config&gt; {&#xD;&#xA;  Id:###&#xD;&#xA;  Name:##&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;So in the above example if you don't include the second macro. The compiler will yell at you that typeinfo is not implemented in type `T`. &#xD;&#xA;But if you include the macro it compiles fine. &#xD;&#xA;So what does the macro do to the struct and how does it tackle the issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34581" PostHistoryTypeId="24" PostId="1423" RevisionGUID="974bcd07-fe12-4cd8-8192-b13631dc2976" CreationDate="2023-06-07T10:06:41.557" Comment="Proposed by 116 approved by 2281, 298 edit id of 424" ContentLicense="CC BY-SA 4.0" />
  <row Id="34582" PostHistoryTypeId="2" PostId="8806" RevisionGUID="b46cef46-ffd8-46aa-bbb9-7249283d92fd" CreationDate="2023-06-07T10:13:42.790" UserId="4168" Text="Can I write code smart contract in a pallet and then deploy file build .wasm or another file to Contracts. That code build work as a smart contract the same write by ink. anyway&#xD;&#xA;That is my thought, because I like coding with Pallet. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34584" PostHistoryTypeId="1" PostId="8806" RevisionGUID="b46cef46-ffd8-46aa-bbb9-7249283d92fd" CreationDate="2023-06-07T10:13:42.790" UserId="4168" Text="idea: Deploy a custom pallet to Contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="34585" PostHistoryTypeId="3" PostId="8806" RevisionGUID="b46cef46-ffd8-46aa-bbb9-7249283d92fd" CreationDate="2023-06-07T10:13:42.790" UserId="4168" Text="|ink|pallet|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34586" PostHistoryTypeId="5" PostId="8806" RevisionGUID="796b596d-67ea-4331-8e90-84536d6ea910" CreationDate="2023-06-07T10:26:52.360" UserId="2281" Comment="added 6 characters in body" Text="Can I write code `smart contract` in a pallet and then `deploy` file build .wasm or another file to `Contracts`. That code build work as a smart contract the same write by ink. anyway&#xD;&#xA;That is my thought, because I like coding with Pallet. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34587" PostHistoryTypeId="5" PostId="8764" RevisionGUID="8fb684e5-659a-4a95-a682-bc49d2470583" CreationDate="2023-06-07T10:38:14.713" UserId="4121" Comment="Improve commit difference." Text="After upgrading to 0.9.42, we have `ERROR tokio-runtime-worker sc_service::task_manager: Essential task babe-worker failed. Shutting down service.` error starting the node using `cargo run -- --dev`. Using `cargo run -- --dev --sealing=instant` the node starts correctly.&#xD;&#xA;&#xD;&#xA;The update requires a few modifications concerning babe in `node/src/`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;diff --git a/node/src/command/key.rs b/node/src/command/key.rs&#xD;&#xA;index 655ebc2..6aa6ffe 100644&#xD;&#xA;--- a/node/src/command/key.rs&#xD;&#xA;+++ b/node/src/command/key.rs&#xD;&#xA;@@ -20,7 +20,7 @@ use sc_cli::{&#xD;&#xA; use sc_keystore::LocalKeystore;&#xD;&#xA; use sc_service::config::{BasePath, KeystoreConfig};&#xD;&#xA; use sp_core::crypto::{AccountId32, KeyTypeId, SecretString};&#xD;&#xA;-use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr};&#xD;&#xA;+use sp_keystore::{Keystore, KeystorePtr};&#xD;&#xA; use std::sync::Arc;&#xD;&#xA; &#xD;&#xA; #[derive(Debug, clap::Subcommand)]&#xD;&#xA;@@ -82,18 +82,17 @@ impl GenSessionKeysCmd {&#xD;&#xA;         let mut public_keys_bytes = Vec::with_capacity(128);&#xD;&#xA;         for (key_type_id, crypto_scheme) in KEY_TYPES {&#xD;&#xA;             let (keystore, public) = match self.keystore_params.keystore_config(&amp;config_dir)? {&#xD;&#xA;-                (_, KeystoreConfig::Path { path, password }) =&gt; {&#xD;&#xA;+                KeystoreConfig::Path { path, password } =&gt; {&#xD;&#xA;                     let public =&#xD;&#xA;                         with_crypto_scheme!(crypto_scheme, to_vec(&amp;suri, password.clone()))?;&#xD;&#xA;-                    let keystore: SyncCryptoStorePtr =&#xD;&#xA;-                        Arc::new(LocalKeystore::open(path, password)?);&#xD;&#xA;+                    let keystore: KeystorePtr = Arc::new(LocalKeystore::open(path, password)?);&#xD;&#xA;                     (keystore, public)&#xD;&#xA;                 }&#xD;&#xA;                 _ =&gt; unreachable!(&quot;keystore_config always returns path and password; qed&quot;),&#xD;&#xA;             };&#xD;&#xA; &#xD;&#xA;-            SyncCryptoStore::insert_unknown(&amp;*keystore, key_type_id, &amp;suri, &amp;public[..])&#xD;&#xA;-                .map_err(|_| Error::KeyStoreOperation)?;&#xD;&#xA;+            Keystore::insert(&amp;*keystore, key_type_id, &amp;suri, &amp;public[..])&#xD;&#xA;+                .map_err(|_| Error::KeystoreOperation)?;&#xD;&#xA; &#xD;&#xA;             public_keys_bytes.extend_from_slice(&amp;public[..]);&#xD;&#xA;         }&#xD;&#xA;diff --git a/node/src/service.rs b/node/src/service.rs&#xD;&#xA;index 258b8af..8cb3132 100644&#xD;&#xA;--- a/node/src/service.rs&#xD;&#xA;+++ b/node/src/service.rs&#xD;&#xA;@@ -238,13 +238,6 @@ where&#xD;&#xA;         RuntimeApiCollection&lt;StateBackend = sc_client_api::StateBackendFor&lt;FullBackend, Block&gt;&gt;,&#xD;&#xA;     Executor: sc_executor::NativeExecutionDispatch + 'static,&#xD;&#xA; {&#xD;&#xA;-    if config.keystore_remote.is_some() {&#xD;&#xA;-        return Err(ServiceError::Other(&#xD;&#xA;-            &quot;Remote Keystores are not supported.&quot;.to_owned(),&#xD;&#xA;-        ));&#xD;&#xA;-    }&#xD;&#xA;-    // TODO deprecated ?&#xD;&#xA;-&#xD;&#xA;     let telemetry = config&#xD;&#xA;         .telemetry_endpoints&#xD;&#xA;         .clone()&#xD;&#xA;@@ -311,7 +304,7 @@ where&#xD;&#xA;         )&#xD;&#xA;     } else {&#xD;&#xA;         let slot_duration = babe_link.config().slot_duration();&#xD;&#xA;-        let import_queue = sc_consensus_babe::import_queue(&#xD;&#xA;+        let (import_queue, _) = sc_consensus_babe::import_queue(&#xD;&#xA;             babe_link.clone(),&#xD;&#xA;             babe_block_import.clone(),&#xD;&#xA;             Some(Box::new(justification_import)),&#xD;&#xA;@@ -347,13 +340,6 @@ where&#xD;&#xA;     })&#xD;&#xA; }&#xD;&#xA; &#xD;&#xA;-fn remote_keystore(_url: &amp;str) -&gt; Result&lt;Arc&lt;LocalKeystore&gt;, &amp;'static str&gt; {&#xD;&#xA;-    // FIXME: here would the concrete keystore be built,&#xD;&#xA;-    //        must return a concrete type (NOT `LocalKeystore`) that&#xD;&#xA;-    //        implements `CryptoStore` and `SyncCryptoStore`&#xD;&#xA;-    Err(&quot;Remote Keystore not supported.&quot;)&#xD;&#xA;-}&#xD;&#xA;-&#xD;&#xA; /// Builds a new service for a full client.&#xD;&#xA; pub fn new_full&lt;RuntimeApi, Executor&gt;(&#xD;&#xA;     mut config: Configuration,&#xD;&#xA;@@ -373,24 +359,12 @@ where&#xD;&#xA;         backend,&#xD;&#xA;         mut task_manager,&#xD;&#xA;         import_queue,&#xD;&#xA;-        mut keystore_container,&#xD;&#xA;+        keystore_container,&#xD;&#xA;         select_chain,&#xD;&#xA;         transaction_pool,&#xD;&#xA;         other: (block_import, babe_link, grandpa_link, mut telemetry),&#xD;&#xA;     } = new_partial::&lt;RuntimeApi, Executor&gt;(&amp;config, sealing.is_manual_consensus())?;&#xD;&#xA; &#xD;&#xA;-    if let Some(url) = &amp;config.keystore_remote {&#xD;&#xA;-        match remote_keystore(url) {&#xD;&#xA;-            Ok(k) =&gt; keystore_container.set_remote_keystore(k),&#xD;&#xA;-            Err(e) =&gt; {&#xD;&#xA;-                return Err(ServiceError::Other(format!(&#xD;&#xA;-                    &quot;Error hooking up remote keystore for {}: {}&quot;,&#xD;&#xA;-                    url, e&#xD;&#xA;-                )))&#xD;&#xA;-            }&#xD;&#xA;-        };&#xD;&#xA;-    } // TODO deprecated ?&#xD;&#xA;-&#xD;&#xA;     let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name(&#xD;&#xA;         &amp;client&#xD;&#xA;             .block_hash(0)&#xD;&#xA;@@ -415,7 +389,6 @@ where&#xD;&#xA;     let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =&#xD;&#xA;         sc_service::build_network(sc_service::BuildNetworkParams {&#xD;&#xA;             config: &amp;config,&#xD;&#xA;-            //net_config: net_config,&#xD;&#xA;             client: client.clone(),&#xD;&#xA;             transaction_pool: transaction_pool.clone(),&#xD;&#xA;             spawn_handle: task_manager.spawn_handle(),&#xD;&#xA;@@ -489,7 +462,7 @@ where&#xD;&#xA;             let babe_consensus_data_provider =&#xD;&#xA;                 sc_consensus_manual_seal::consensus::babe::BabeConsensusDataProvider::new(&#xD;&#xA;                     client.clone(),&#xD;&#xA;-                    keystore_container.sync_keystore(),&#xD;&#xA;+                    keystore_container.keystore(),&#xD;&#xA;                     babe_link.epoch_changes().clone(),&#xD;&#xA;                     vec![(&#xD;&#xA;                         sp_consensus_babe::AuthorityId::from(&#xD;&#xA;@@ -532,7 +505,7 @@ where&#xD;&#xA;             let client_clone = client.clone();&#xD;&#xA;             let slot_duration = babe_link.config().slot_duration();&#xD;&#xA;             let babe_config = sc_consensus_babe::BabeParams {&#xD;&#xA;-                keystore: keystore_container.sync_keystore(),&#xD;&#xA;+                keystore: keystore_container.keystore(),&#xD;&#xA;                 client: client.clone(),&#xD;&#xA;                 select_chain,&#xD;&#xA;                 block_import,&#xD;&#xA;@@ -581,7 +554,7 @@ where&#xD;&#xA; &#xD;&#xA;     let rpc_extensions_builder = {&#xD;&#xA;         let client = client.clone();&#xD;&#xA;-        //let keystore = keystore_container.sync_keystore();&#xD;&#xA;+        //let keystore = keystore_container.keystore();&#xD;&#xA;         let pool = transaction_pool.clone();&#xD;&#xA;         //let select_chain = select_chain.clone();&#xD;&#xA;         //let chain_spec = config.chain_spec.cloned_box();&#xD;&#xA;@@ -611,7 +584,7 @@ where&#xD;&#xA;         network: network.clone(),&#xD;&#xA;         sync_service: sync_service.clone(),&#xD;&#xA;         client,&#xD;&#xA;-        keystore: keystore_container.sync_keystore(),&#xD;&#xA;+        keystore: keystore_container.keystore(),&#xD;&#xA;         task_manager: &amp;mut task_manager,&#xD;&#xA;         transaction_pool,&#xD;&#xA;         rpc_builder: rpc_extensions_builder,&#xD;&#xA;@@ -623,7 +596,7 @@ where&#xD;&#xA;     // if the node isn't actively participating in consensus then it doesn't&#xD;&#xA;     // need a keystore, regardless of which protocol we use below.&#xD;&#xA;     let keystore = if role.is_authority() {&#xD;&#xA;-        Some(keystore_container.sync_keystore())&#xD;&#xA;+        Some(keystore_container.keystore())&#xD;&#xA;     } else {&#xD;&#xA;         None&#xD;&#xA;     };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any ideas where this error might come from?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34594" PostHistoryTypeId="2" PostId="8808" RevisionGUID="c18ffc79-7cc9-4fbc-8e32-46dd866ef7f0" CreationDate="2023-06-07T12:43:06.553" UserId="3136" Text="Do add ConvertTransaction and TransactionConverter in your runtime/lib.rs. And check in the trait RuntimeApiCollection of Node/Client/lib.rs that you have added or not" ContentLicense="CC BY-SA 4.0" />
  <row Id="34596" PostHistoryTypeId="52" PostId="8798" RevisionGUID="85002200-4533-490e-a137-d929a01c04ff" CreationDate="2023-06-07T12:58:32.937" />
  <row Id="34597" PostHistoryTypeId="2" PostId="8809" RevisionGUID="05f8e588-1924-48b3-ae11-22a0d2ad4e83" CreationDate="2023-06-07T13:05:34.547" UserId="3088" Text="In `Config` of my pallet I have:&#xD;&#xA;```&#xD;&#xA;type FilteredOrigin: EnsureOriginWithArg&lt;&#xD;&#xA;			Self::RuntimeOrigin,&#xD;&#xA;			SomeEnum,&#xD;&#xA;			Success = Self::AccountId&#xD;&#xA;		&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And there is an extrinsic in my pallet `extrinsic_name` where i do a check `T::FilteredOrigin::ensure_origin(origin)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Firstly I wrote the bench like this using v1:&#xD;&#xA;```&#xD;&#xA;    extrinsic_name{&#xD;&#xA;        let origin = T::FilteredOrigin::try_successful_origin(&amp;SomeEnum::SomeOption).unwrap();&#xD;&#xA;        // omitted&#xD;&#xA;        let data = Data {...};&#xD;&#xA;    }: _(origin, data)&#xD;&#xA;```&#xD;&#xA;And got the following error: expected associated type `&lt;T as frame_system::Config&gt;::RuntimeOrigin`&#xD;&#xA;                          found enum `Result&lt;RawOrigin&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;, &lt;T as frame_system::Config&gt;::RuntimeOrigin&gt;`&#xD;&#xA;&#xD;&#xA;Then I found a solution in one of the frame's pallets (**&lt;T::RuntimeOrigin&gt;** added):&#xD;&#xA;```&#xD;&#xA;    extrinsic_name{&#xD;&#xA;        let origin = T::FilteredOrigin::try_successful_origin(&amp;SomeEnum::SomeOption).unwrap();&#xD;&#xA;        // omitted&#xD;&#xA;        let data = Data {...};&#xD;&#xA;    }: _&lt;T::RuntimeOrigin&gt;(origin, data)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now I'm trying to use `frame_benchmarking::v2`, I have written the following code and got the same error:&#xD;&#xA;```&#xD;&#xA;#[benchmarks]&#xD;&#xA;mod benchmarks {&#xD;&#xA;    use super::*;&#xD;&#xA;&#xD;&#xA;    #[benchmark]&#xD;&#xA;    fn extrinsic_name() {&#xD;&#xA;        let origin = T::FilteredOrigin::try_successful_origin(&amp;SomeEnum::SomeOption).unwrap();&#xD;&#xA;        &#xD;&#xA;        // omitted&#xD;&#xA;        let data = Data {...};&#xD;&#xA;&#xD;&#xA;        #[extrinsic_call]&#xD;&#xA;        _(origin, data);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I guess the solution is described in [the doc][1], also there is an example of doing similar thing in the [pallet-lottery][2] and I should do this way:&#xD;&#xA;```&#xD;&#xA;#[benchmarks]&#xD;&#xA;mod benchmarks {&#xD;&#xA;    use super::*;&#xD;&#xA;&#xD;&#xA;    #[benchmark]&#xD;&#xA;    fn extrinsic_name() {&#xD;&#xA;        let origin = T::FilteredOrigin::try_successful_origin(&amp;SomeEnum::SomeOption).unwrap();&#xD;&#xA;        &#xD;&#xA;        // omitted&#xD;&#xA;        let data = Data {...};&#xD;&#xA;&#xD;&#xA;        #[extrinsic_call]&#xD;&#xA;        _(origin as T::RuntimeOrigin, data);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;But compiler complains to this casting. On the other hand this is working in pallet-lottery. Could someone please clarify the problem occured here and point out what am I doing wrong?&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_benchmarking/v2/index.html#extrinsic_call-and-block&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/bc4055bb9fdd02ff4a97d33c6aaae3c635225b22/frame/lottery/src/benchmarking.rs#L90" ContentLicense="CC BY-SA 4.0" />
  <row Id="34599" PostHistoryTypeId="1" PostId="8809" RevisionGUID="05f8e588-1924-48b3-ae11-22a0d2ad4e83" CreationDate="2023-06-07T13:05:34.547" UserId="3088" Text="frame-benchmarking::v2 doesn't work for force_origin" ContentLicense="CC BY-SA 4.0" />
  <row Id="34600" PostHistoryTypeId="3" PostId="8809" RevisionGUID="05f8e588-1924-48b3-ae11-22a0d2ad4e83" CreationDate="2023-06-07T13:05:34.547" UserId="3088" Text="|pallet|benchmarking|origin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34601" PostHistoryTypeId="2" PostId="8810" RevisionGUID="eb613f34-7401-4aba-ba0c-227743d9f394" CreationDate="2023-06-07T13:23:08.640" UserId="4019" Text="I have already run a relay chain on two ports, but when I try to connect my parachain to the relay chain, I encounter the following error. I have attached a screenshot of the error to this message.&#xD;&#xA;&#xD;&#xA;Error message:&#xD;&#xA;2023-06-07 13:07:11 Parachain Collator Template    &#xD;&#xA;2023-06-07 13:07:11 ✌️ Version 0.1.0-677a1a238a9    &#xD;&#xA;2023-06-07 13:07:11 ❤️ By Anonymous, 2020-2023    &#xD;&#xA;2023-06-07 13:07:11  Chain specification: Local Testnet    &#xD;&#xA;2023-06-07 13:07:11  Node name: Bob    &#xD;&#xA;2023-06-07 13:07:11  Role: AUTHORITY    &#xD;&#xA;2023-06-07 13:07:11  Database: RocksDb at /tmp/parachain/bob/chains/local_testnet/db/full    &#xD;&#xA;2023-06-07 13:07:11 ⛓ Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)    &#xD;&#xA;2023-06-07 13:07:13 Parachain ID: Id(1000)    &#xD;&#xA;2023-06-07 13:07:13 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    &#xD;&#xA;2023-06-07 13:07:13 Parachain genesis state: 0x0000000000000000000000000000000000000000000000000000000000000000004f3fb323d861297b5ffdafa44cae2b676644e242cc24ad1ca45eb430ad191c2803170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2023-06-07 13:07:13 Is collating: yes    &#xD;&#xA;Error: Service(Other(&quot;Polkadot service error: Failed to get runtime version: Unsupported or invalid BabeApi version&quot;))&#xD;&#xA;&#xD;&#xA;I followed this link: &#xD;&#xA;https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/&#xD;&#xA;&#xD;&#xA;Please suggest how to resolve this error.&#xD;&#xA;&#xD;&#xA;Thanks in advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="34603" PostHistoryTypeId="1" PostId="8810" RevisionGUID="eb613f34-7401-4aba-ba0c-227743d9f394" CreationDate="2023-06-07T13:23:08.640" UserId="4019" Text="Error Connecting Parachain to Relay Chain: Unsupported or Invalid BabeApi Version" ContentLicense="CC BY-SA 4.0" />
  <row Id="34604" PostHistoryTypeId="3" PostId="8810" RevisionGUID="eb613f34-7401-4aba-ba0c-227743d9f394" CreationDate="2023-06-07T13:23:08.640" UserId="4019" Text="|substrate-node-template|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34605" PostHistoryTypeId="5" PostId="8810" RevisionGUID="e447d44d-481c-4e05-bc4a-e5e640e11343" CreationDate="2023-06-07T13:28:25.410" UserId="4019" Comment="added 87 characters in body" Text="[![enter image description here][1]][1]I have already run a relay chain on two ports, but when I try to connect my parachain to the relay chain, I encounter the following error. I have attached a screenshot of the error to this message.&#xD;&#xA;&#xD;&#xA;Error message:&#xD;&#xA;2023-06-07 13:07:11 Parachain Collator Template    &#xD;&#xA;2023-06-07 13:07:11 ✌️ Version 0.1.0-677a1a238a9    &#xD;&#xA;2023-06-07 13:07:11 ❤️ By Anonymous, 2020-2023    &#xD;&#xA;2023-06-07 13:07:11  Chain specification: Local Testnet    &#xD;&#xA;2023-06-07 13:07:11  Node name: Bob    &#xD;&#xA;2023-06-07 13:07:11  Role: AUTHORITY    &#xD;&#xA;2023-06-07 13:07:11  Database: RocksDb at /tmp/parachain/bob/chains/local_testnet/db/full    &#xD;&#xA;2023-06-07 13:07:11 ⛓ Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)    &#xD;&#xA;2023-06-07 13:07:13 Parachain ID: Id(1000)    &#xD;&#xA;2023-06-07 13:07:13 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    &#xD;&#xA;2023-06-07 13:07:13 Parachain genesis state: 0x0000000000000000000000000000000000000000000000000000000000000000004f3fb323d861297b5ffdafa44cae2b676644e242cc24ad1ca45eb430ad191c2803170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2023-06-07 13:07:13 Is collating: yes    &#xD;&#xA;Error: Service(Other(&quot;Polkadot service error: Failed to get runtime version: Unsupported or invalid BabeApi version&quot;))&#xD;&#xA;&#xD;&#xA;I followed this link: &#xD;&#xA;https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/&#xD;&#xA;&#xD;&#xA;Please suggest how to resolve this error.&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/otPLo.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34606" PostHistoryTypeId="2" PostId="8811" RevisionGUID="2ba7bfc7-1506-45c0-85a1-e153a10c2812" CreationDate="2023-06-07T13:32:48.067" UserId="4303" Text="In the crowdfund pallet linked here:&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-how-to-guides/blob/main/example-code/template-node/pallets/simple-crowdfund/src/lib.rs&#xD;&#xA;&#xD;&#xA;the withdraw function works by calling the T::Currency::withdraw() fn in currency trait and passing that return value into the T::Currency::resolve_into_existing() fn instead why can i just use T::Currency::transfer like its done in the contribute() fn but swap the source and dest ?[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/U27PP.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/oj7M8.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34608" PostHistoryTypeId="1" PostId="8811" RevisionGUID="2ba7bfc7-1506-45c0-85a1-e153a10c2812" CreationDate="2023-06-07T13:32:48.067" UserId="4303" Text="Whats the difference between calling T::Currency::transfer() and T::Currency::withdraw()" ContentLicense="CC BY-SA 4.0" />
  <row Id="34609" PostHistoryTypeId="3" PostId="8811" RevisionGUID="2ba7bfc7-1506-45c0-85a1-e153a10c2812" CreationDate="2023-06-07T13:32:48.067" UserId="4303" Text="|substrate-node-template|pallet|transfer|lockable-currency|crowdfunding|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34610" PostHistoryTypeId="2" PostId="8812" RevisionGUID="3790cd4b-548e-4d37-be6b-0b314ad88e4f" CreationDate="2023-06-07T13:38:00.950" UserId="167" Text="I want to add that the purpose of [`DebugNoBound`](https://paritytech.github.io/substrate/master/frame_support/derive.DebugNoBound.html), `CloneNoBound` and similar derive macros is similar: If the deriving type is generic over `T: Config`, these derives can be used other than the default ones. &#xD;&#xA;&#xD;&#xA;See the full list of such derives [by searching `NoBound` in the substrate rust-docs](https://paritytech.github.io/substrate/master/frame_support/index.html?search=NoBound). " ContentLicense="CC BY-SA 4.0" />
  <row Id="34612" PostHistoryTypeId="2" PostId="8813" RevisionGUID="e90de504-03fa-4b22-bcf1-e4c5286e3e65" CreationDate="2023-06-07T13:50:35.897" UserId="94" Text="This is a bug that was fixes in [#13845](https://github.com/paritytech/substrate/pull/13845). It is included in tag Substrate tag `polkadot-v0.9.42`.  &#xD;&#xA;&#xD;&#xA;So please update to that version or remain with the `V1` benchmarking.   &#xD;&#xA;If you find any more bugs, please report them on GitHub. The `V2` syntax is not stabilized yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="34614" PostHistoryTypeId="5" PostId="8813" RevisionGUID="837d366d-e8a1-441a-be7d-363097723850" CreationDate="2023-06-07T14:59:19.597" UserId="94" Comment="edited body" Text="This is a bug that was fixed in [#13845](https://github.com/paritytech/substrate/pull/13845). It is included in Substrate tag `polkadot-v0.9.42`.  &#xD;&#xA;&#xD;&#xA;So please update to that version or remain with the `V1` benchmarking.   &#xD;&#xA;If you find any more bugs, please report them on GitHub. The `V2` syntax is not stabilized yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="34615" PostHistoryTypeId="2" PostId="8814" RevisionGUID="73503cbf-e301-48a5-b53c-822dbe93da7c" CreationDate="2023-06-07T15:35:22.807" UserId="4121" Text="Finally, I tracked the error to https://github.com/paritytech/substrate/commit/cb954820a8d8d765ce75021e244223a3b4d5722d and the solution is to add `BabeDeps` dependency that uses `babe_worker_handle` to instantiate the RPC extensions (that seem to be mandatory for 0.9.42). " ContentLicense="CC BY-SA 4.0" />
  <row Id="34617" PostHistoryTypeId="5" PostId="8804" RevisionGUID="e313b53a-9aeb-4e46-84f4-ac3a0d602e30" CreationDate="2023-06-07T17:32:28.017" UserId="298" Comment="added 23 characters in body" Text="We are building a custom UI for chains containing pallet-supersig. It is very similar to a polkadot-js clone we built, but much simpler. In our simple custom UI, we are having some issues with making rpc calls to our custom rpc server and then displaying the info, but we are being roadblocked with type decoration errors. &#xD;&#xA;&#xD;&#xA;### The task&#xD;&#xA;We want to make an RPC call such as `api.rpc.superSig.listMembers` from a chain called Soupcan from an RPC module called Supersig rpc, which connects to supersig pallet, and display the information on screen, without errors. &#xD;&#xA;&#xD;&#xA;`rpc: wss://soupcan1.jelliedowl.com`&#xD;&#xA;&#xD;&#xA;here you can see a working version: [Soupcan - polkadot-js clone](https://apps.decentration.org/?rpc=wss%3A%2F%2Fsoupcan1.jelliedowl.com#/supersig/dashboard) that succesfully connects with the rpc and displays information in a table. &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;So we can safely assume there is not a problem with the chain, pallet or rpc server. Link to the code we creates the Dashboard Table and rpc is [here](https://github.com/decentration/apps/blob/dd13433868abb2246766ff3b1494e3cdce8c3e79/packages/page-supersig/src/Supersig/Dashboard)&#xD;&#xA;&#xD;&#xA;Types we need to use to decorate the RPC are [here](https://github.com/decentration/apps/blob/fa92f1963259010d043d8f9561ee33b3ddc2754d/packages/apps-config/src/api/spec/kabocha.ts) we also have [supersig custom types npm package](https://github.com/decentration/supersig-types/tree/master)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This the rpc server for pallet_supersig is [here](https://github.com/decentration/pallet_supersig/blob/master/rpc/src/lib.rs)&#xD;&#xA;&#xD;&#xA;### Errors&#xD;&#xA;The problem is we are getting some errors:&#xD;&#xA;&#xD;&#xA;RPC-CORE: listMembers(supersig_id: AccountId): Vec&lt;(AccountId, Role)&gt;:: 2: Supersig error: Module, ModuleError { index: 42, error: [1, 0, 0, 0], message: None }&#xD;&#xA;&#xD;&#xA;42 means that the pallet number is 42 meaning supersig pallet&#xD;&#xA;&#xD;&#xA;VEC: Unable to decode on index 0 Tuple: failed on 1:: DoNotConstruct: Cannot construct unknown type Role&#xD;&#xA;&#xD;&#xA; [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Here is a link to the [branch](https://github.com/decentration/subverse-frontend/tree/issue-status)&#xD;&#xA;&#xD;&#xA;**Replicate Issue**&#xD;&#xA;&#xD;&#xA;steps to replicate the above listMembers error:&#xD;&#xA;&#xD;&#xA; - `npm install`&#xD;&#xA; - `npm start`&#xD;&#xA; - Connect to Soupcan node (soupcan1.jelliedowl.com) in the top left of the screen (make sure not to connect to soupcan2).&#xD;&#xA; - Go to Dashboard in the Sidebar. &#xD;&#xA; - Go to ./src/components/Dashboard/Dashboard.tsx to find the relevant code. &#xD;&#xA;&#xD;&#xA;The task is to successfully display the listMembers information in the table like in the first screenshot (or at least hard code a solution that successfully connects and decorates the information.)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aABhh.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/DrMHq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34618" PostHistoryTypeId="5" PostId="8814" RevisionGUID="19eba2a0-c97f-4155-ba8b-6b32e45fed42" CreationDate="2023-06-07T18:35:38.897" UserId="4121" Comment="add code" Text="Finally, I tracked the error to https://github.com/paritytech/substrate/commit/cb954820a8d8d765ce75021e244223a3b4d5722d and the solution is to add `BabeDeps` dependency that uses `babe_worker_handle` to instantiate the RPC extensions (that seem to be mandatory for 0.9.42).&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;diff --git a/node/src/rpc.rs b/node/src/rpc.rs&#xD;&#xA;index 039e43e..cb13628 100644&#xD;&#xA;--- a/node/src/rpc.rs&#xD;&#xA;+++ b/node/src/rpc.rs&#xD;&#xA;@@ -26,29 +26,47 @@ pub use sc_rpc_api::DenyUnsafe;&#xD;&#xA; use common_runtime::Block;&#xD;&#xA; use common_runtime::{AccountId, Balance, Index};&#xD;&#xA; use jsonrpsee::RpcModule;&#xD;&#xA;+use sc_consensus_babe::BabeApi;&#xD;&#xA;+use sc_consensus_babe::BabeWorkerHandle;&#xD;&#xA; use sc_transaction_pool_api::TransactionPool;&#xD;&#xA; use sp_api::ProvideRuntimeApi;&#xD;&#xA; use sp_block_builder::BlockBuilder;&#xD;&#xA; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};&#xD;&#xA;+use sp_consensus::SelectChain;&#xD;&#xA;+use sp_keystore::KeystorePtr;&#xD;&#xA; use std::sync::Arc;&#xD;&#xA; &#xD;&#xA;+/// Extra dependencies for BABE.&#xD;&#xA;+pub struct BabeDeps {&#xD;&#xA;+    /// A handle to the BABE worker for issuing requests.&#xD;&#xA;+    pub babe_worker_handle: BabeWorkerHandle&lt;Block&gt;,&#xD;&#xA;+    /// The keystore that manages the keys of the node.&#xD;&#xA;+    pub keystore: KeystorePtr,&#xD;&#xA;+}&#xD;&#xA;+&#xD;&#xA; /// Full client dependencies.&#xD;&#xA;-pub struct FullDeps&lt;C, P&gt; {&#xD;&#xA;+pub struct FullDeps&lt;C, P, SC&gt; {&#xD;&#xA;     /// The client instance to use.&#xD;&#xA;     pub client: Arc&lt;C&gt;,&#xD;&#xA;     /// Transaction pool instance.&#xD;&#xA;     pub pool: Arc&lt;P&gt;,&#xD;&#xA;+    /// The SelectChain Strategy&#xD;&#xA;+    pub select_chain: SC,&#xD;&#xA;+    /// A copy of the chain spec.&#xD;&#xA;+    pub chain_spec: Box&lt;dyn sc_chain_spec::ChainSpec&gt;,&#xD;&#xA;     /// Whether to deny unsafe calls&#xD;&#xA;     pub deny_unsafe: DenyUnsafe,&#xD;&#xA;     /// Manual seal command sink&#xD;&#xA;     pub command_sink_opt: Option&lt;&#xD;&#xA;         futures::channel::mpsc::Sender&lt;sc_consensus_manual_seal::EngineCommand&lt;sp_core::H256&gt;&gt;,&#xD;&#xA;     &gt;,&#xD;&#xA;+    /// BABE specific dependencies.&#xD;&#xA;+    pub babe: BabeDeps,&#xD;&#xA; }&#xD;&#xA; &#xD;&#xA; /// Instantiate all full RPC extensions.&#xD;&#xA;-pub fn create_full&lt;C, P&gt;(&#xD;&#xA;-    deps: FullDeps&lt;C, P&gt;,&#xD;&#xA;+pub fn create_full&lt;C, P, SC&gt;(&#xD;&#xA;+    deps: FullDeps&lt;C, P, SC&gt;,&#xD;&#xA; ) -&gt; Result&lt;RpcModule&lt;()&gt;, Box&lt;dyn std::error::Error + Send + Sync&gt;&gt;&#xD;&#xA; where&#xD;&#xA;     C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;@@ -56,10 +74,13 @@ where&#xD;&#xA;     C: Send + Sync + 'static,&#xD;&#xA;     C::Api: substrate_frame_rpc_system::AccountNonceApi&lt;Block, AccountId, Index&gt;,&#xD;&#xA;     C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi&lt;Block, Balance&gt;,&#xD;&#xA;+    C::Api: BabeApi&lt;Block&gt;,&#xD;&#xA;     C::Api: BlockBuilder&lt;Block&gt;,&#xD;&#xA;     P: TransactionPool + 'static,&#xD;&#xA;+    SC: SelectChain&lt;Block&gt; + 'static,&#xD;&#xA; {&#xD;&#xA;     use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};&#xD;&#xA;+    use sc_consensus_babe_rpc::{Babe, BabeApiServer};&#xD;&#xA;     use sc_consensus_manual_seal::rpc::{ManualSeal, ManualSealApiServer};&#xD;&#xA;     use substrate_frame_rpc_system::{System, SystemApiServer};&#xD;&#xA; &#xD;&#xA;@@ -67,13 +88,30 @@ where&#xD;&#xA;     let FullDeps {&#xD;&#xA;         client,&#xD;&#xA;         pool,&#xD;&#xA;+        select_chain,&#xD;&#xA;+        chain_spec,&#xD;&#xA;         deny_unsafe,&#xD;&#xA;         command_sink_opt,&#xD;&#xA;+        babe,&#xD;&#xA;     } = deps;&#xD;&#xA; &#xD;&#xA;-    module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?;&#xD;&#xA;-    module.merge(TransactionPayment::new(client).into_rpc())?;&#xD;&#xA;+    let BabeDeps {&#xD;&#xA;+        babe_worker_handle,&#xD;&#xA;+        keystore,&#xD;&#xA;+    } = babe;&#xD;&#xA; &#xD;&#xA;+    module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?;&#xD;&#xA;+    module.merge(TransactionPayment::new(client.clone()).into_rpc())?;&#xD;&#xA;+    module.merge(&#xD;&#xA;+        Babe::new(&#xD;&#xA;+            client.clone(),&#xD;&#xA;+            babe_worker_handle.clone(),&#xD;&#xA;+            keystore,&#xD;&#xA;+            select_chain,&#xD;&#xA;+            deny_unsafe,&#xD;&#xA;+        )&#xD;&#xA;+        .into_rpc(),&#xD;&#xA;+    )?;&#xD;&#xA;     if let Some(command_sink) = command_sink_opt {&#xD;&#xA;         // We provide the rpc handler with the sending end of the channel to allow the rpc&#xD;&#xA;         // send EngineCommands to the background block authorship task.&#xD;&#xA;diff --git a/node/src/service.rs b/node/src/service.rs&#xD;&#xA;index 55443d3..eb636f6 100644&#xD;&#xA;--- a/node/src/service.rs&#xD;&#xA;+++ b/node/src/service.rs&#xD;&#xA;@@ -218,6 +218,7 @@ pub fn new_partial&lt;RuntimeApi, Executor&gt;(&#xD;&#xA;                 FullGrandpaBlockImport&lt;RuntimeApi, Executor&gt;,&#xD;&#xA;             &gt;,&#xD;&#xA;             sc_consensus_babe::BabeLink&lt;Block&gt;,&#xD;&#xA;+            sc_consensus_babe::BabeWorkerHandle&lt;Block&gt;,&#xD;&#xA;             sc_consensus_grandpa::LinkHalf&lt;&#xD;&#xA;                 Block,&#xD;&#xA;                 FullClient&lt;RuntimeApi, Executor&gt;,&#xD;&#xA;@@ -237,13 +238,6 @@ where&#xD;&#xA;         RuntimeApiCollection&lt;StateBackend = sc_client_api::StateBackendFor&lt;FullBackend, Block&gt;&gt;,&#xD;&#xA;     Executor: sc_executor::NativeExecutionDispatch + 'static,&#xD;&#xA; {&#xD;&#xA;-    /*if config.keystore_remote.is_some() {&#xD;&#xA;-        return Err(ServiceError::Other(&#xD;&#xA;-            &quot;Remote Keystores are not supported.&quot;.to_owned(),&#xD;&#xA;-        ));&#xD;&#xA;-    }*/&#xD;&#xA;-    // TODO deprecated ?&#xD;&#xA;-&#xD;&#xA;     let telemetry = config&#xD;&#xA;         .telemetry_endpoints&#xD;&#xA;         .clone()&#xD;&#xA;@@ -297,37 +291,36 @@ where&#xD;&#xA;         client.clone(),&#xD;&#xA;     )?;&#xD;&#xA; &#xD;&#xA;-    let import_queue = if consensus_manual {&#xD;&#xA;-        sc_consensus_manual_seal::import_queue(&#xD;&#xA;+    let slot_duration = babe_link.config().slot_duration();&#xD;&#xA;+    let (import_queue, babe_worker_handle) = sc_consensus_babe::import_queue(&#xD;&#xA;+        babe_link.clone(),&#xD;&#xA;+        babe_block_import.clone(),&#xD;&#xA;+        Some(Box::new(justification_import)),&#xD;&#xA;+        client.clone(),&#xD;&#xA;+        select_chain.clone(),&#xD;&#xA;+        move |_, ()| async move {&#xD;&#xA;+            let timestamp = sp_timestamp::InherentDataProvider::from_system_time();&#xD;&#xA;+&#xD;&#xA;+            let slot =&#xD;&#xA;+                sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(&#xD;&#xA;+                    *timestamp,&#xD;&#xA;+                    slot_duration,&#xD;&#xA;+                );&#xD;&#xA;+            Ok((slot, timestamp))&#xD;&#xA;+        },&#xD;&#xA;+        &amp;task_manager.spawn_essential_handle(),&#xD;&#xA;+        config.prometheus_registry(),&#xD;&#xA;+        telemetry.as_ref().map(|x| x.handle()),&#xD;&#xA;+    )?;&#xD;&#xA;+&#xD;&#xA;+    // Shadow import_queue&#xD;&#xA;+    if consensus_manual {&#xD;&#xA;+        let import_queue = sc_consensus_manual_seal::import_queue(&#xD;&#xA;             Box::new(babe_block_import.clone()),&#xD;&#xA;             &amp;task_manager.spawn_essential_handle(),&#xD;&#xA;             config.prometheus_registry(),&#xD;&#xA;-        )&#xD;&#xA;-    } else {&#xD;&#xA;-        let slot_duration = babe_link.config().slot_duration();&#xD;&#xA;-        let (import_queue, _) = sc_consensus_babe::import_queue(&#xD;&#xA;-            babe_link.clone(),&#xD;&#xA;-            babe_block_import.clone(),&#xD;&#xA;-            Some(Box::new(justification_import)),&#xD;&#xA;-            client.clone(),&#xD;&#xA;-            select_chain.clone(),&#xD;&#xA;-            move |_, ()| async move {&#xD;&#xA;-                let timestamp = sp_timestamp::InherentDataProvider::from_system_time();&#xD;&#xA;-&#xD;&#xA;-                let slot =&#xD;&#xA;-                    sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(&#xD;&#xA;-                        *timestamp,&#xD;&#xA;-                        slot_duration,&#xD;&#xA;-                    );&#xD;&#xA;-&#xD;&#xA;-                Ok((slot, timestamp))&#xD;&#xA;-            },&#xD;&#xA;-            &amp;task_manager.spawn_essential_handle(),&#xD;&#xA;-            config.prometheus_registry(),&#xD;&#xA;-            telemetry.as_ref().map(|x| x.handle()),&#xD;&#xA;-        )?;&#xD;&#xA;-        import_queue&#xD;&#xA;-    };&#xD;&#xA;+        );&#xD;&#xA;+    }&#xD;&#xA; &#xD;&#xA;     Ok(sc_service::PartialComponents {&#xD;&#xA;         client,&#xD;&#xA;@@ -337,7 +330,13 @@ where&#xD;&#xA;         keystore_container,&#xD;&#xA;         select_chain,&#xD;&#xA;         transaction_pool,&#xD;&#xA;-        other: (babe_block_import, babe_link, grandpa_link, telemetry),&#xD;&#xA;+        other: (&#xD;&#xA;+            babe_block_import,&#xD;&#xA;+            babe_link,&#xD;&#xA;+            babe_worker_handle,&#xD;&#xA;+            grandpa_link,&#xD;&#xA;+            telemetry,&#xD;&#xA;+        ),&#xD;&#xA;     })&#xD;&#xA; }&#xD;&#xA; &#xD;&#xA;@@ -363,21 +362,9 @@ where&#xD;&#xA;         keystore_container,&#xD;&#xA;         select_chain,&#xD;&#xA;         transaction_pool,&#xD;&#xA;-        other: (block_import, babe_link, grandpa_link, mut telemetry),&#xD;&#xA;+        other: (block_import, babe_link, babe_worker_handle, grandpa_link, mut telemetry),&#xD;&#xA;     } = new_partial::&lt;RuntimeApi, Executor&gt;(&amp;config, sealing.is_manual_consensus())?;&#xD;&#xA; &#xD;&#xA;-    /*if let Some(url) = &amp;config.keystore_remote {&#xD;&#xA;-        match remote_keystore(url) {&#xD;&#xA;-            Ok(k) =&gt; keystore_container.set_remote_keystore(k),&#xD;&#xA;-            Err(e) =&gt; {&#xD;&#xA;-                return Err(ServiceError::Other(format!(&#xD;&#xA;-                    &quot;Error hooking up remote keystore for {}: {}&quot;,&#xD;&#xA;-                    url, e&#xD;&#xA;-                )))&#xD;&#xA;-            }&#xD;&#xA;-        };&#xD;&#xA;-    }*/// TODO deprecated ?&#xD;&#xA;-&#xD;&#xA;     let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name(&#xD;&#xA;         &amp;client&#xD;&#xA;             .block_hash(0)&#xD;&#xA;@@ -398,11 +385,9 @@ where&#xD;&#xA;         Vec::default(),&#xD;&#xA;     ));&#xD;&#xA; &#xD;&#xA;-    //let mut net_config = sc_network::config::FullNetworkConfiguration::new(&amp;config.network);&#xD;&#xA;     let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =&#xD;&#xA;         sc_service::build_network(sc_service::BuildNetworkParams {&#xD;&#xA;             config: &amp;config,&#xD;&#xA;-            //net_config: net_config,&#xD;&#xA;             client: client.clone(),&#xD;&#xA;             transaction_pool: transaction_pool.clone(),&#xD;&#xA;             spawn_handle: task_manager.spawn_handle(),&#xD;&#xA;@@ -497,7 +482,7 @@ where&#xD;&#xA;                     client: client.clone(),&#xD;&#xA;                     pool: transaction_pool.clone(),&#xD;&#xA;                     commands_stream,&#xD;&#xA;-                    select_chain,&#xD;&#xA;+                    select_chain: select_chain.clone(),&#xD;&#xA;                     consensus_data_provider: Some(Box::new(babe_consensus_data_provider)),&#xD;&#xA;                     create_inherent_data_providers: move |_, _| {&#xD;&#xA;                         let client = client_clone.clone();&#xD;&#xA;@@ -521,7 +506,7 @@ where&#xD;&#xA;             let babe_config = sc_consensus_babe::BabeParams {&#xD;&#xA;                 keystore: keystore_container.keystore(),&#xD;&#xA;                 client: client.clone(),&#xD;&#xA;-                select_chain,&#xD;&#xA;+                select_chain: select_chain.clone(),&#xD;&#xA;                 block_import,&#xD;&#xA;                 env: proposer_factory,&#xD;&#xA;                 sync_oracle: sync_service.clone(),&#xD;&#xA;@@ -568,23 +553,22 @@ where&#xD;&#xA; &#xD;&#xA;     let rpc_extensions_builder = {&#xD;&#xA;         let client = client.clone();&#xD;&#xA;-        //let keystore = keystore_container.sync_keystore();&#xD;&#xA;         let pool = transaction_pool.clone();&#xD;&#xA;-        //let select_chain = select_chain.clone();&#xD;&#xA;-        //let chain_spec = config.chain_spec.cloned_box();&#xD;&#xA;+        let select_chain = select_chain.clone();&#xD;&#xA;+        let chain_spec = config.chain_spec.cloned_box();&#xD;&#xA;+        let keystore = keystore_container.keystore().clone();&#xD;&#xA; &#xD;&#xA;         Box::new(move |deny_unsafe, _| {&#xD;&#xA;             let deps = crate::rpc::FullDeps {&#xD;&#xA;                 client: client.clone(),&#xD;&#xA;                 pool: pool.clone(),&#xD;&#xA;-                //select_chain: select_chain.clone(),&#xD;&#xA;-                //chain_spec: chain_spec.cloned_box(),&#xD;&#xA;+                select_chain: select_chain.clone(),&#xD;&#xA;+                chain_spec: chain_spec.cloned_box(),&#xD;&#xA;                 deny_unsafe,&#xD;&#xA;-                /*babe: crate::rpc::BabeDeps {&#xD;&#xA;-                    babe_config: babe_config.clone(),&#xD;&#xA;-                    shared_epoch_changes: shared_epoch_changes.clone(),&#xD;&#xA;+                babe: crate::rpc::BabeDeps {&#xD;&#xA;+                    babe_worker_handle: babe_worker_handle.clone(),&#xD;&#xA;                     keystore: keystore.clone(),&#xD;&#xA;-                },*/&#xD;&#xA;+                },&#xD;&#xA;                 command_sink_opt: command_sink_opt.clone(),&#xD;&#xA;             };&#xD;&#xA; ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34619" PostHistoryTypeId="2" PostId="8815" RevisionGUID="ef35348e-8665-49e8-bfac-02b3189b6414" CreationDate="2023-06-07T19:19:34.840" UserId="4210" Text="We would like to implement custom emitting of the native token, like 1 token per block. Can you point us where the minting happens using substrate? Which pallet implements it? &#xD;&#xA;&#xD;&#xA;Also is there a way to implement max total supply of the native token?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34621" PostHistoryTypeId="1" PostId="8815" RevisionGUID="ef35348e-8665-49e8-bfac-02b3189b6414" CreationDate="2023-06-07T19:19:34.840" UserId="4210" Text="Custom emitting" ContentLicense="CC BY-SA 4.0" />
  <row Id="34622" PostHistoryTypeId="3" PostId="8815" RevisionGUID="ef35348e-8665-49e8-bfac-02b3189b6414" CreationDate="2023-06-07T19:19:34.840" UserId="4210" Text="|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34623" PostHistoryTypeId="2" PostId="8816" RevisionGUID="ead3256a-daf0-4394-bc7a-ee6d5ba99d89" CreationDate="2023-06-07T19:24:01.663" UserId="4081" Text="A great resource for this is to just look at the definitions of [transfer][1] and [withdraw][2] for the Currency trait inside of the [Substrate][3] repo.&#xD;&#xA;&#xD;&#xA;Transfer:&#xD;&#xA;```rust&#xD;&#xA;    /// Transfer some liquid free balance to another staker.&#xD;&#xA;	///&#xD;&#xA;	/// This is a very high-level function. It will ensure all appropriate fees are paid&#xD;&#xA;	/// and no imbalance in the system remains.&#xD;&#xA;	fn transfer(&#xD;&#xA;		source: &amp;AccountId,&#xD;&#xA;		dest: &amp;AccountId,&#xD;&#xA;		value: Self::Balance,&#xD;&#xA;		existence_requirement: ExistenceRequirement,&#xD;&#xA;	) -&gt; DispatchResult;&#xD;&#xA;```&#xD;&#xA;Withdraw&#xD;&#xA;```rust&#xD;&#xA;    /// Removes some free balance from `who` account for `reason` if possible. If `liveness` is&#xD;&#xA;	/// `KeepAlive`, then no less than `ExistentialDeposit` must be left remaining.&#xD;&#xA;	///&#xD;&#xA;	/// This checks any locks, vesting, and liquidity requirements. If the removal is not possible,&#xD;&#xA;	/// then it returns `Err`.&#xD;&#xA;	///&#xD;&#xA;	/// If the operation is successful, this will return `Ok` with a `NegativeImbalance` whose value&#xD;&#xA;	/// is `value`.&#xD;&#xA;	fn withdraw(&#xD;&#xA;		who: &amp;AccountId,&#xD;&#xA;		value: Self::Balance,&#xD;&#xA;		reasons: WithdrawReasons,&#xD;&#xA;		liveness: ExistenceRequirement,&#xD;&#xA;	) -&gt; Result&lt;Self::NegativeImbalance, DispatchError&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/src/frame_support/traits/tokens/currency.rs.html#125&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/src/frame_support/traits/tokens/currency.rs.html#178&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_service/index.html?search=" ContentLicense="CC BY-SA 4.0" />
  <row Id="34625" PostHistoryTypeId="5" PostId="8816" RevisionGUID="b422343f-03fc-4c39-b492-4fbd0e99dff0" CreationDate="2023-06-07T19:30:36.910" UserId="4081" Comment="added 331 characters in body" Text="A great resource for this is to just look at the definitions of [transfer][1] and [withdraw][2] for the Currency trait inside of the [Substrate][3] repo.&#xD;&#xA;&#xD;&#xA;Transfer:&#xD;&#xA;```rust&#xD;&#xA;    /// Transfer some liquid free balance to another staker.&#xD;&#xA;	///&#xD;&#xA;	/// This is a very high-level function. It will ensure all appropriate fees are paid&#xD;&#xA;	/// and no imbalance in the system remains.&#xD;&#xA;	fn transfer(&#xD;&#xA;		source: &amp;AccountId,&#xD;&#xA;		dest: &amp;AccountId,&#xD;&#xA;		value: Self::Balance,&#xD;&#xA;		existence_requirement: ExistenceRequirement,&#xD;&#xA;	) -&gt; DispatchResult;&#xD;&#xA;```&#xD;&#xA;Withdraw&#xD;&#xA;```rust&#xD;&#xA;    /// Removes some free balance from `who` account for `reason` if possible. If `liveness` is&#xD;&#xA;	/// `KeepAlive`, then no less than `ExistentialDeposit` must be left remaining.&#xD;&#xA;	///&#xD;&#xA;	/// This checks any locks, vesting, and liquidity requirements. If the removal is not possible,&#xD;&#xA;	/// then it returns `Err`.&#xD;&#xA;	///&#xD;&#xA;	/// If the operation is successful, this will return `Ok` with a `NegativeImbalance` whose value&#xD;&#xA;	/// is `value`.&#xD;&#xA;	fn withdraw(&#xD;&#xA;		who: &amp;AccountId,&#xD;&#xA;		value: Self::Balance,&#xD;&#xA;		reasons: WithdrawReasons,&#xD;&#xA;		liveness: ExistenceRequirement,&#xD;&#xA;	) -&gt; Result&lt;Self::NegativeImbalance, DispatchError&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;----&#xD;&#xA;Most runtimes use the [`pallet_balances`][4] inside the Substrate repo that implements the Currency trait so reading the implementation of both methods in this pallet can also help a lot to understand how they work and what they do.&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/src/frame_support/traits/tokens/currency.rs.html#125&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/src/frame_support/traits/tokens/currency.rs.html#178&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_service/index.html?search=&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/src/pallet_balances/lib.rs.html#18" ContentLicense="CC BY-SA 4.0" />
  <row Id="34626" PostHistoryTypeId="2" PostId="8817" RevisionGUID="5cc00c83-cd29-4edc-a8db-cf91f8985bcb" CreationDate="2023-06-07T20:02:34.197" UserId="2722" Text="I'm trying to make my Substrate-based blockchain compatible with Solidity and MetaMask. I've cloned Substrate from the polkadot-v0.9.39 branch and am trying to integrate Frontier's Ethereum compatibility pallets, specifically pallet-ethereum and pallet-evm.&#xD;&#xA;&#xD;&#xA;My Cargo.toml dependencies look like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    fp-rpc = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    fp-self-contained = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-dynamic-fee = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-ethereum = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm-precompile-modexp = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm-precompile-sha3fips = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm-precompile-simple = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-base-fee = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;&#xD;&#xA;However, when I add the following code:&#xD;&#xA;&#xD;&#xA;        use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction};&#xD;&#xA;    use pallet_evm::{Account as EVMAccount, EnsureAddressTruncated, HashedAddressMapping, Runner};&#xD;&#xA;&#xD;&#xA;I get this error:&#xD;&#xA;&#xD;&#xA;        error[E0152]: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `kitchensink_runtime` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /home/kianoush/projects/hearvers/target/debug/wbuild/kitchensink-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-b8b7b73b41341229.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /home/kianoush/projects/hearvers/target/debug/wbuild/kitchensink-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-e1bd7f9d1961d62b.rmeta&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0152`.&#xD;&#xA;    warning: `kitchensink-runtime` (lib) generated 3 warnings&#xD;&#xA;    error: could not compile `kitchensink-runtime` due to previous error; 3 warnings emitted&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;How can I resolve this sp_io conflict? I'm finding it difficult to align the sp_io versions used by kitchensink-runtime and frame_support. Any suggestions or insights would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Remember to add appropriate tags to your question to attract the right audience. Some suggestions are: rust, substrate, solidity, metamask, ethereum, blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="34628" PostHistoryTypeId="1" PostId="8817" RevisionGUID="5cc00c83-cd29-4edc-a8db-cf91f8985bcb" CreationDate="2023-06-07T20:02:34.197" UserId="2722" Text="Duplicate lang item error (E0152) with sp_io crate when integrating Frontier pallets with Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="34629" PostHistoryTypeId="3" PostId="8817" RevisionGUID="5cc00c83-cd29-4edc-a8db-cf91f8985bcb" CreationDate="2023-06-07T20:02:34.197" UserId="2722" Text="|substrate-node-template|evm|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34630" PostHistoryTypeId="52" PostId="8809" RevisionGUID="b5f4b786-bd53-4fec-b6f6-d3f580022de6" CreationDate="2023-06-07T21:09:01.087" />
  <row Id="34631" PostHistoryTypeId="2" PostId="8818" RevisionGUID="19418b45-eff2-41a3-bddd-d6bd4826c575" CreationDate="2023-06-07T22:20:06.687" UserId="29" Text="For minting logic in Substrate you can use the `fungible` trait:&#xD;&#xA;- https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungible&#xD;&#xA;&#xD;&#xA;For example, you could use `mint_into` trait to mint:&#xD;&#xA;- https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungible/trait.Mutate.html#method.mint_into&#xD;&#xA;&#xD;&#xA;&gt; Note: There is also the [`Currency`](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/currency/index.html) trait but that is being deprecated in favor of the [`fungible`](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungible) trait.&#xD;&#xA;&#xD;&#xA;Pallet-wise you can use pallet-balances - it is designed to store and manage your native currency.&#xD;&#xA;&#xD;&#xA;Pallet balances sets the total issuance of your native currency in its `GenesisBuild` by adding up the amount that each &quot;genesis&quot; account has:&#xD;&#xA;```rust&#xD;&#xA;let total = self.balances.iter().fold(Zero::zero(), |acc: T::Balance, &amp;(_, n)| acc + n);&#xD;&#xA;&#xD;&#xA;&lt;TotalIssuance&lt;T, I&gt;&gt;::put(total);&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/aeb8c3107f79afef081dde2b9aa2866a6596f6ba/frame/balances/src/lib.rs#L468-L470&#xD;&#xA;&#xD;&#xA;These accounts can be endowed in the `GenesisConfig`. &#xD;&#xA;&#xD;&#xA;For example in the Substrate node-template, you will see the following in the chain spec:&#xD;&#xA;```rust&#xD;&#xA;balances: BalancesConfig {&#xD;&#xA;	// Configure endowed accounts with initial balance of 1 &lt;&lt; 60.&#xD;&#xA;	balances: endowed_accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect(),&#xD;&#xA;},&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/aeb8c3107f79afef081dde2b9aa2866a6596f6ba/bin/node-template/node/src/chain_spec.rs#LL140C1-L143C5&#xD;&#xA;&#xD;&#xA;If you spin up the node-template and check the `totalIssuance`, you will see the following:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/SKxQD.png)&#xD;&#xA;&#xD;&#xA;For the development config there are four accounts:&#xD;&#xA;```rust&#xD;&#xA;// Pre-funded accounts&#xD;&#xA;vec![&#xD;&#xA;    get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;],&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/aeb8c3107f79afef081dde2b9aa2866a6596f6ba/bin/node-template/node/src/chain_spec.rs#L55-L60&#xD;&#xA;&#xD;&#xA;`1 &lt;&lt; 60` is equivalent to 1,152,921,504,606,846,976&#xD;&#xA;&#xD;&#xA;So pallet balance's total issuance will be 1,152,921,504,606,846,976 * 4 == 4,611,686,018,427,387,904 which is what you see in the attached screenshot.&#xD;&#xA;&#xD;&#xA;Keep in mind `totalIssuance` can change, but it is up to you to define the logic when to change `totalIssuance`. You can simply not have any logic that will increment `totalIssuance` - hence giving it a &quot;soft&quot; cap.&#xD;&#xA;&#xD;&#xA;Related post:&#xD;&#xA;- https://substrate.stackexchange.com/questions/3717/how-does-a-substrate-chain-set-the-max-total-supply&#xD;&#xA;- https://substrate.stackexchange.com/questions/711/when-should-i-use-balances-pallet-and-when-should-i-use-assets-pallet/712#712&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34633" PostHistoryTypeId="5" PostId="8818" RevisionGUID="8c8e9a0d-4da9-400b-a251-07f29780385f" CreationDate="2023-06-07T22:31:00.350" UserId="29" Comment="added 188 characters in body" Text="For minting logic in Substrate you can use the `fungible` trait:&#xD;&#xA;- https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungible&#xD;&#xA;&#xD;&#xA;For example, you could use `mint_into` trait to mint:&#xD;&#xA;- https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungible/trait.Mutate.html#method.mint_into&#xD;&#xA;&#xD;&#xA;&gt; Note: There is also the [`Currency`](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/currency/index.html) trait but that is being deprecated in favor of the [`fungible`](https://paritytech.github.io/substrate/master/frame_support/traits/tokens/fungible) trait.&#xD;&#xA;&#xD;&#xA;Pallet-wise you can use pallet-balances - it is designed to store and manage your native currency.&#xD;&#xA;&#xD;&#xA;Pallet balances sets the total issuance of your native currency in its `GenesisBuild` by adding up the amount that each &quot;genesis&quot; account has:&#xD;&#xA;```rust&#xD;&#xA;let total = self.balances.iter().fold(Zero::zero(), |acc: T::Balance, &amp;(_, n)| acc + n);&#xD;&#xA;&#xD;&#xA;&lt;TotalIssuance&lt;T, I&gt;&gt;::put(total);&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/aeb8c3107f79afef081dde2b9aa2866a6596f6ba/frame/balances/src/lib.rs#L468-L470&#xD;&#xA;&#xD;&#xA;These accounts can be endowed in the `GenesisConfig`. &#xD;&#xA;&#xD;&#xA;For example in the Substrate node-template, you will see the following in the chain spec:&#xD;&#xA;```rust&#xD;&#xA;balances: BalancesConfig {&#xD;&#xA;	// Configure endowed accounts with initial balance of 1 &lt;&lt; 60.&#xD;&#xA;	balances: endowed_accounts.iter().cloned().map(|k| (k, 1 &lt;&lt; 60)).collect(),&#xD;&#xA;},&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/aeb8c3107f79afef081dde2b9aa2866a6596f6ba/bin/node-template/node/src/chain_spec.rs#LL140C1-L143C5&#xD;&#xA;&#xD;&#xA;If you spin up the node-template and check the `totalIssuance`, you will see the following:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/SKxQD.png)&#xD;&#xA;&#xD;&#xA;For the development config there are four accounts:&#xD;&#xA;```rust&#xD;&#xA;// Pre-funded accounts&#xD;&#xA;vec![&#xD;&#xA;    get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;],&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/aeb8c3107f79afef081dde2b9aa2866a6596f6ba/bin/node-template/node/src/chain_spec.rs#L55-L60&#xD;&#xA;&#xD;&#xA;`1 &lt;&lt; 60` is equivalent to 1,152,921,504,606,846,976&#xD;&#xA;&#xD;&#xA;So pallet balance's total issuance will be 1,152,921,504,606,846,976 * 4 == 4,611,686,018,427,387,904 which is what you see in the attached screenshot.&#xD;&#xA;&#xD;&#xA;Keep in mind `totalIssuance` can change, but it is up to you to define the logic when to change `totalIssuance`. You can simply not have any logic that will increment `totalIssuance` - hence giving it a &quot;soft&quot; cap.&#xD;&#xA;&#xD;&#xA;Related post:&#xD;&#xA;- https://substrate.stackexchange.com/questions/3717/how-does-a-substrate-chain-set-the-max-total-supply&#xD;&#xA;- https://substrate.stackexchange.com/questions/711/when-should-i-use-balances-pallet-and-when-should-i-use-assets-pallet/712#712&#xD;&#xA;&#xD;&#xA;For doing something every block, you can use Substrate's `on_initialize` hook:&#xD;&#xA;- https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_initialize&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34634" PostHistoryTypeId="2" PostId="8819" RevisionGUID="e8e435bc-dc52-4f7d-b9ca-a65bfa6c0460" CreationDate="2023-06-07T22:32:28.747" UserId="19" Text="I write tests for my smart contract and got this error:&#xD;&#xA;&#xD;&#xA;&gt; no caller has been set&#xD;&#xA;&#xD;&#xA;The error comes from: `ink_engine-4.2.0/src/ext.rs:325:14`. In function that I want to write tests I have following line:&#xD;&#xA;&#xD;&#xA;    let caller = self.env().caller();&#xD;&#xA;&#xD;&#xA;Any suggestion what I do wrongly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34636" PostHistoryTypeId="1" PostId="8819" RevisionGUID="e8e435bc-dc52-4f7d-b9ca-a65bfa6c0460" CreationDate="2023-06-07T22:32:28.747" UserId="19" Text="no caller has been set" ContentLicense="CC BY-SA 4.0" />
  <row Id="34637" PostHistoryTypeId="3" PostId="8819" RevisionGUID="e8e435bc-dc52-4f7d-b9ca-a65bfa6c0460" CreationDate="2023-06-07T22:32:28.747" UserId="19" Text="|ink|testing|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34638" PostHistoryTypeId="4" PostId="8815" RevisionGUID="f9b3ed00-a44e-4ec6-a482-feb06d4e12a7" CreationDate="2023-06-07T22:39:08.473" UserId="29" Comment="edited tags; edited title" Text="Custom emitting, minting, and max total supply" ContentLicense="CC BY-SA 4.0" />
  <row Id="34639" PostHistoryTypeId="6" PostId="8815" RevisionGUID="f9b3ed00-a44e-4ec6-a482-feb06d4e12a7" CreationDate="2023-06-07T22:39:08.473" UserId="29" Comment="edited tags; edited title" Text="|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34640" PostHistoryTypeId="2" PostId="8820" RevisionGUID="3a03e2a5-32a6-4c28-89ca-0f605a82a5d4" CreationDate="2023-06-07T23:38:31.237" UserId="341" Text="As stated in the [description][1], this package is not intended to be used by others developers. &#xD;&#xA;&#xD;&#xA;&gt; WARNING: This is an internal package to polkadot-js/apps so is not inteded (yet) for broad use.&#xD;&#xA;&#xD;&#xA;[1]: https://www.npmjs.com/package/@polkadot/react-components" ContentLicense="CC BY-SA 4.0" />
  <row Id="34642" PostHistoryTypeId="5" PostId="8819" RevisionGUID="4ff252be-6180-4de2-a35d-bf7c9fc859a2" CreationDate="2023-06-08T00:22:36.390" UserId="19" Comment="added 384 characters in body" Text="I write tests for my smart contract and got this error:&#xD;&#xA;&#xD;&#xA;&gt; no caller has been set&#xD;&#xA;&#xD;&#xA;The error comes from: `ink_engine-4.2.0/src/ext.rs:325:14`. In function that I want to write tests I have following line:&#xD;&#xA;&#xD;&#xA;    let caller = self.env().caller();&#xD;&#xA;&#xD;&#xA;Any suggestion what I do wrongly?&#xD;&#xA;&#xD;&#xA;I look at the place the error comes from, and I see following code:&#xD;&#xA;&#xD;&#xA;    /// Returns the address of the caller.&#xD;&#xA;    pub fn caller(&amp;self, output: &amp;mut &amp;mut [u8]) {&#xD;&#xA;        let caller = self&#xD;&#xA;            .exec_context&#xD;&#xA;            .caller&#xD;&#xA;            .as_ref()&#xD;&#xA;            .expect(&quot;no caller has been set&quot;)&#xD;&#xA;            .as_bytes();&#xD;&#xA;        set_output(output, caller);&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="34643" PostHistoryTypeId="2" PostId="8821" RevisionGUID="b2daff8d-2b17-4eec-8991-f5a52aaa6e4d" CreationDate="2023-06-08T02:48:25.820" UserId="19" Text="I want to write tests and found [the question][1] that potentially soles my problem, but made exactly all what is recommended but still has the same issue.&#xD;&#xA;&#xD;&#xA;I have added on top of my module with tests following line `#[cfg(feature = &quot;ink-experimental-engine&quot;)]` and added dependency to my `Cargo.toml` like `ink-experimental-engine = [&quot;ink_env/ink-experimental-engine&quot;]`.&#xD;&#xA;&#xD;&#xA;I was looking at on the documentation page of ink! under key word: `set_caller` and have found nothing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/69829061/how-can-i-set-a-caller-in-ink-contract-unit-testing-function" ContentLicense="CC BY-SA 4.0" />
  <row Id="34645" PostHistoryTypeId="1" PostId="8821" RevisionGUID="b2daff8d-2b17-4eec-8991-f5a52aaa6e4d" CreationDate="2023-06-08T02:48:25.820" UserId="19" Text="the package `` depends on `ink_env`, with features: `ink-experimental-engine` but `ink_env` does not have these features" ContentLicense="CC BY-SA 4.0" />
  <row Id="34646" PostHistoryTypeId="3" PostId="8821" RevisionGUID="b2daff8d-2b17-4eec-8991-f5a52aaa6e4d" CreationDate="2023-06-08T02:48:25.820" UserId="19" Text="|ink|testing|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34647" PostHistoryTypeId="5" PostId="8821" RevisionGUID="7c8fb970-9161-40fb-af07-3c89b1334756" CreationDate="2023-06-08T02:58:49.830" UserId="116" Comment="Spellcheck and language" Text="I want to write tests and found [the question][1] that potentially soles my problem, but made exactly all what is recommended but still has the same issue.&#xD;&#xA;&#xD;&#xA;I have added on top of my module with tests following line `#[cfg(feature = &quot;ink-experimental-engine&quot;)]` and added dependency to my `Cargo.toml` like `ink-experimental-engine = [&quot;ink_env/ink-experimental-engine&quot;]`.&#xD;&#xA;&#xD;&#xA;I was looking at on the documentation page of ink! under key word: `set_caller` but haven't found anything.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/69829061/how-can-i-set-a-caller-in-ink-contract-unit-testing-function" ContentLicense="CC BY-SA 4.0" />
  <row Id="34648" PostHistoryTypeId="4" PostId="8821" RevisionGUID="7c8fb970-9161-40fb-af07-3c89b1334756" CreationDate="2023-06-08T02:58:49.830" UserId="116" Comment="Spellcheck and language" Text="The package `` depends on `ink_env`, with features: `ink-experimental-engine` but `ink_env` does not have these features" ContentLicense="CC BY-SA 4.0" />
  <row Id="34649" PostHistoryTypeId="24" PostId="8821" RevisionGUID="7c8fb970-9161-40fb-af07-3c89b1334756" CreationDate="2023-06-08T02:58:49.830" Comment="Proposed by 116 approved by 19 edit id of 433" ContentLicense="CC BY-SA 4.0" />
  <row Id="34650" PostHistoryTypeId="4" PostId="8819" RevisionGUID="317003a0-18b7-4dcf-b297-60e9376408e9" CreationDate="2023-06-08T02:59:02.997" UserId="116" Comment="Title, added capitalization " Text="No caller has been set" ContentLicense="CC BY-SA 4.0" />
  <row Id="34651" PostHistoryTypeId="24" PostId="8819" RevisionGUID="317003a0-18b7-4dcf-b297-60e9376408e9" CreationDate="2023-06-08T02:59:02.997" Comment="Proposed by 116 approved by 19 edit id of 434" ContentLicense="CC BY-SA 4.0" />
  <row Id="34652" PostHistoryTypeId="2" PostId="8822" RevisionGUID="5859785e-7e99-428c-8ebb-81904e296565" CreationDate="2023-06-08T04:12:35.690" UserId="19" Text="I write some test for ink! smart contract, my code has these three lines:&#xD;&#xA;&#xD;&#xA;        // Set the contract as callee and Bob as caller.&#xD;&#xA;        let _contract = ink_env::account_id::&lt;ink_env::DefaultEnvironment&gt;();&#xD;&#xA;        ink_env::test::set_callee::&lt;ink_env::DefaultEnvironment&gt;(_contract);&#xD;&#xA;        ink_env::test::set_caller::&lt;ink_env::DefaultEnvironment&gt;(_accounts.alice);&#xD;&#xA;&#xD;&#xA;But still I get `no callee has been set` error, what I do wrongly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34654" PostHistoryTypeId="1" PostId="8822" RevisionGUID="5859785e-7e99-428c-8ebb-81904e296565" CreationDate="2023-06-08T04:12:35.690" UserId="19" Text="No callee has been set" ContentLicense="CC BY-SA 4.0" />
  <row Id="34655" PostHistoryTypeId="3" PostId="8822" RevisionGUID="5859785e-7e99-428c-8ebb-81904e296565" CreationDate="2023-06-08T04:12:35.690" UserId="19" Text="|ink|unit-tests|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34656" PostHistoryTypeId="2" PostId="8823" RevisionGUID="f4784ecc-74dd-40f9-bad5-bc2685d385ad" CreationDate="2023-06-08T05:18:18.370" UserId="3538" Text="Check `std` feature, this error is mostly about that some dependencies are missed in `std` feature in `Cargo.toml`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34658" PostHistoryTypeId="52" PostId="8815" RevisionGUID="881c3ad4-c34e-407d-9271-ceffc6ffbefc" CreationDate="2023-06-08T05:24:55.513" />
  <row Id="34659" PostHistoryTypeId="5" PostId="8817" RevisionGUID="a1ca2f50-fdda-4494-93df-b68c0549915e" CreationDate="2023-06-08T06:19:02.467" UserId="116" Comment="Remove text from template" Text="I'm trying to make my Substrate-based blockchain compatible with Solidity and MetaMask. I've cloned Substrate from the polkadot-v0.9.39 branch and am trying to integrate Frontier's Ethereum compatibility pallets, specifically pallet-ethereum and pallet-evm.&#xD;&#xA;&#xD;&#xA;My Cargo.toml dependencies look like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    fp-rpc = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    fp-self-contained = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-dynamic-fee = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-ethereum = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm-precompile-modexp = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm-precompile-sha3fips = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm-precompile-simple = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-base-fee = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;&#xD;&#xA;However, when I add the following code:&#xD;&#xA;&#xD;&#xA;        use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction};&#xD;&#xA;    use pallet_evm::{Account as EVMAccount, EnsureAddressTruncated, HashedAddressMapping, Runner};&#xD;&#xA;&#xD;&#xA;I get this error:&#xD;&#xA;&#xD;&#xA;        error[E0152]: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `kitchensink_runtime` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /home/kianoush/projects/hearvers/target/debug/wbuild/kitchensink-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-b8b7b73b41341229.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /home/kianoush/projects/hearvers/target/debug/wbuild/kitchensink-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-e1bd7f9d1961d62b.rmeta&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0152`.&#xD;&#xA;    warning: `kitchensink-runtime` (lib) generated 3 warnings&#xD;&#xA;    error: could not compile `kitchensink-runtime` due to previous error; 3 warnings emitted&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;How can I resolve this sp_io conflict? I'm finding it difficult to align the sp_io versions used by kitchensink-runtime and frame_support. Any suggestions or insights would be greatly appreciated.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34660" PostHistoryTypeId="24" PostId="8817" RevisionGUID="a1ca2f50-fdda-4494-93df-b68c0549915e" CreationDate="2023-06-08T06:19:02.467" Comment="Proposed by 116 approved by -1 edit id of 436" ContentLicense="CC BY-SA 4.0" />
  <row Id="34661" PostHistoryTypeId="5" PostId="8817" RevisionGUID="61eb1763-b3b2-4028-b4af-3e400ebfa14f" CreationDate="2023-06-08T06:19:02.467" UserId="2281" Comment="Remove text from template" Text="I'm trying to make my `Substrate-based blockchain` compatible with Solidity and `MetaMask`. I've cloned Substrate from the `polkadot-v0.9.39` branch and am trying to `integrate Frontier's Ethereum` compatibility pallets, specifically `pallet-ethereum` and `pallet-evm`.&#xD;&#xA;&#xD;&#xA;My Cargo.toml dependencies look like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    fp-rpc = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    fp-self-contained = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-dynamic-fee = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-ethereum = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm-precompile-modexp = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm-precompile-sha3fips = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-evm-precompile-simple = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;    pallet-base-fee = { default-features = false, branch=&quot;polkadot-v0.9.39&quot;, git = &quot;https://github.com/paritytech/frontier.git&quot; }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;However, when I add the following code:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;        use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction};&#xD;&#xA;    use pallet_evm::{Account as EVMAccount, EnsureAddressTruncated, HashedAddressMapping, Runner};&#xD;&#xA;&#xD;&#xA;I get this error:&#xD;&#xA;&#xD;&#xA;        error[E0152]: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `kitchensink_runtime` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /home/kianoush/projects/hearvers/target/debug/wbuild/kitchensink-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-b8b7b73b41341229.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /home/kianoush/projects/hearvers/target/debug/wbuild/kitchensink-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-e1bd7f9d1961d62b.rmeta&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0152`.&#xD;&#xA;    warning: `kitchensink-runtime` (lib) generated 3 warnings&#xD;&#xA;    error: could not compile `kitchensink-runtime` due to previous error; 3 warnings emitted&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;How can I resolve this `sp_io conflict`? I'm finding it difficult to align the `sp_io` versions used by `kitchensink-runtime` and `frame_support`. Any suggestions or insights would be greatly appreciated.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34663" PostHistoryTypeId="2" PostId="8824" RevisionGUID="6b1064af-504e-453a-a8e0-211a8a4d28e7" CreationDate="2023-06-08T07:53:15.273" UserId="2372" Text="I want to generate a customSpec where i can manually add the accounts of the initial nominators. I've seen the code [chain_spec.rs][1] where we can see in the [fn testnet_genesis][2] there is initial nominators. How can we add this in CustomSpec?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L242" ContentLicense="CC BY-SA 4.0" />
  <row Id="34665" PostHistoryTypeId="1" PostId="8824" RevisionGUID="6b1064af-504e-453a-a8e0-211a8a4d28e7" CreationDate="2023-06-08T07:53:15.273" UserId="2372" Text="How to add initial nominators in the customSpec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34666" PostHistoryTypeId="3" PostId="8824" RevisionGUID="6b1064af-504e-453a-a8e0-211a8a4d28e7" CreationDate="2023-06-08T07:53:15.273" UserId="2372" Text="|substrate-node-template|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34667" PostHistoryTypeId="50" PostId="8308" RevisionGUID="9f0aa8d7-f01e-4810-8d05-b30ab5cb8d02" CreationDate="2023-06-08T09:06:05.773" UserId="-1" />
  <row Id="34668" PostHistoryTypeId="5" PostId="8824" RevisionGUID="a21bf0c9-605a-49dd-a084-868bf8dfbede" CreationDate="2023-06-08T09:09:30.923" UserId="354" Comment="added 16 characters in body; edited tags; edited title" Text="I want to generate a `customSpec.json` where i can manually add the accounts of the `initial_nominators`. I've seen the code [chain_spec.rs][1] where we can see in the [fn testnet_genesis][2] there is initial nominators. How can we add this in `customSpec.json`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L242" ContentLicense="CC BY-SA 4.0" />
  <row Id="34669" PostHistoryTypeId="4" PostId="8824" RevisionGUID="a21bf0c9-605a-49dd-a084-868bf8dfbede" CreationDate="2023-06-08T09:09:30.923" UserId="354" Comment="added 16 characters in body; edited tags; edited title" Text="How to add initial nominators in the customSpec.json?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34670" PostHistoryTypeId="6" PostId="8824" RevisionGUID="a21bf0c9-605a-49dd-a084-868bf8dfbede" CreationDate="2023-06-08T09:09:30.923" UserId="354" Comment="added 16 characters in body; edited tags; edited title" Text="|genesis|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34671" PostHistoryTypeId="2" PostId="8825" RevisionGUID="0b17aa50-60ea-4391-8edb-231b303c9929" CreationDate="2023-06-08T10:00:45.633" UserId="116" Text="This is where you should start reading:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/build/chain-spec/&#xD;&#xA;&#xD;&#xA;You have already found chain_spec.rs where there are a few functions &#xD;&#xA;&#xD;&#xA;`staging_testnet_config_genesis` and `local_testnet_config` cosponsoring to the different chains defined as names like `dev` `local` or `testing`&#xD;&#xA;&#xD;&#xA;Basically run your node with argument `--chain=mychain` and save the output generated chainspec" ContentLicense="CC BY-SA 4.0" />
  <row Id="34673" PostHistoryTypeId="50" PostId="8423" RevisionGUID="cdb5d741-0130-4200-9b69-f2db39177c56" CreationDate="2023-06-08T12:02:50.343" UserId="-1" />
  <row Id="34674" PostHistoryTypeId="5" PostId="8825" RevisionGUID="08f0c793-de3b-45b7-b73d-42ee8c35fa7e" CreationDate="2023-06-08T12:05:57.770" UserId="2372" Comment="added 1 character in body" Text="This is where you should start reading:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/build/chain-spec/&#xD;&#xA;&#xD;&#xA;You have already found chain_spec.rs where there are a few functions &#xD;&#xA;&#xD;&#xA;`staging_testnet_config_genesis` and `local_testnet_config` cosponsoring to the different chains defined as names like `dev` `local` or `testing`.&#xD;&#xA;&#xD;&#xA;Basically run your node with argument `--chain=mychain` and save the output generated chainspec" ContentLicense="CC BY-SA 4.0" />
  <row Id="34675" PostHistoryTypeId="5" PostId="8423" RevisionGUID="9a3a1abe-78be-417b-950b-f7d6bb17ed42" CreationDate="2023-06-08T12:28:40.957" UserId="2281" Comment="added 7 characters in body" Text="I have run a local node on my local host using the substrate documentation at:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/&#xD;&#xA;&#xD;&#xA;Also I git cloned the UI Frontend for displaying the details.&#xD;&#xA;&#xD;&#xA;As you know on a Polkadot blockchain, or a local node created using the substrates, addresses are in 3 different formats as below:&#xD;&#xA;&#xD;&#xA;Chain address type	Address:&#xD;&#xA;```&#xD;&#xA;Polkadot (SS58):&#xD;&#xA;	15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5&#xD;&#xA;&#xD;&#xA;Kusama (SS58):&#xD;&#xA;	HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F&#xD;&#xA;&#xD;&#xA;Generic Substrate chain (SS58):&#xD;&#xA;	5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;I want to know if and how we can change the format of these addresses on a `Generic Substrate` chain.&#xD;&#xA;&#xD;&#xA;for example we want the addresses to begin with these three letters: &quot;aml&quot;.&#xD;&#xA;&#xD;&#xA;Is there any way to make that happen on a local blockchain and how?&#xD;&#xA;&#xD;&#xA;Thanks in advance for your help." ContentLicense="CC BY-SA 4.0" />
  <row Id="34679" PostHistoryTypeId="50" PostId="6623" RevisionGUID="b9783b88-ce06-4ffe-93f5-efeb1676e1f8" CreationDate="2023-06-08T13:08:11.023" UserId="-1" />
  <row Id="34680" PostHistoryTypeId="2" PostId="8827" RevisionGUID="139c8d81-eaf6-43ab-9e6b-374e22a10e6c" CreationDate="2023-06-08T13:12:48.187" UserId="19" Text="I think that this is not ideal solution, but working.&#xD;&#xA;&#xD;&#xA;    let _accounts = ink_env::test::default_accounts::&lt;ink_env::DefaultEnvironment&gt;();&#xD;&#xA;    let contract_addr: AccountId = AccountId::from([0xFF as u8; 32]);&#xD;&#xA;    set_callee::&lt;DefaultEnvironment&gt;(contract_addr);" ContentLicense="CC BY-SA 4.0" />
  <row Id="34682" PostHistoryTypeId="2" PostId="8828" RevisionGUID="d3316e95-6eb2-42a3-8dab-16e7e0551942" CreationDate="2023-06-08T13:13:49.570" UserId="19" Text="I think that this is not ideal solution, but working.&#xD;&#xA;&#xD;&#xA;    let _accounts = ink_env::test::default_accounts::&lt;ink_env::DefaultEnvironment&gt;();&#xD;&#xA;    let contract_addr: AccountId = AccountId::from([0xFF as u8; 32]);&#xD;&#xA;    ink_env::test::set_caller::&lt;ink_env::DefaultEnvironment&gt;(_accounts.alice);" ContentLicense="CC BY-SA 4.0" />
  <row Id="34685" PostHistoryTypeId="5" PostId="8825" RevisionGUID="24e69c29-1ee7-4870-a8f7-26189edc8974" CreationDate="2023-06-08T13:42:40.483" UserId="116" Comment="added 435 characters in body" Text="This is where you should start reading:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/build/chain-spec/&#xD;&#xA;&#xD;&#xA;You have already found chain_spec.rs where there are a few functions&#xD;&#xA; `staging_testnet_config_genesis` and `local_testnet_config` cosponsoring to the different chains defined as names like `dev` `local` or `testing`.&#xD;&#xA;&#xD;&#xA;At [line 242][1] the vector `initial_nominators` is defined and at [line 384][2]  it is called with an empty argument, fill this vector with something like &#xD;&#xA;`vec![authority_keys_from_seed(&quot;Bob&quot;)]` to get some initial nominators.&#xD;&#xA;&#xD;&#xA;Then compile and run your node with argument `--chain=mychain` and save the output generated chainspec.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L242&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L384" ContentLicense="CC BY-SA 4.0" />
  <row Id="34686" PostHistoryTypeId="2" PostId="8829" RevisionGUID="1a361a74-973f-4ff2-9636-7c7981ae6011" CreationDate="2023-06-08T15:14:38.753" UserId="251" Text="On the parachain auction page. IIUC, there isn't any on-chain storage to store these values. How can I get that?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lf70L.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34688" PostHistoryTypeId="1" PostId="8829" RevisionGUID="1a361a74-973f-4ff2-9636-7c7981ae6011" CreationDate="2023-06-08T15:14:38.753" UserId="251" Text="How does the PolkadotApps get the lease period?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34689" PostHistoryTypeId="3" PostId="8829" RevisionGUID="1a361a74-973f-4ff2-9636-7c7981ae6011" CreationDate="2023-06-08T15:14:38.753" UserId="251" Text="|polkadot-js|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34690" PostHistoryTypeId="2" PostId="8830" RevisionGUID="128707bb-f295-4d04-afe2-adb0830090cc" CreationDate="2023-06-08T15:26:26.507" UserId="251" Text="I'm not sure if this is correct.&#xD;&#xA;&#xD;&#xA;It reads from the `auctions.winning: Option&lt;[Option&lt;(AccountId32,u32,u128)&gt;;36]&gt;`.&#xD;&#xA;&#xD;&#xA;And the result is:&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      [&#xD;&#xA;        xxx&#xD;&#xA;        xxx&#xD;&#xA;        xxx&#xD;&#xA;      ]&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;      null&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;According to the slot range:&#xD;&#xA;```&#xD;&#xA;// pub enum SlotRange {&#xD;&#xA;// 	ZeroZero,		0&#xD;&#xA;// 	ZeroOne,		1&#xD;&#xA;// 	ZeroTwo,		2&#xD;&#xA;// 	ZeroThree,		3&#xD;&#xA;// 	ZeroFour,		4&#xD;&#xA;// 	ZeroFive,		5&#xD;&#xA;// 	ZeroSix,		6&#xD;&#xA;// 	ZeroSeven,		7&#xD;&#xA;// 	OneOne,			8&#xD;&#xA;// 	OneTwo,			9&#xD;&#xA;// 	OneThree,		10&#xD;&#xA;// 	OneFour,		11&#xD;&#xA;// 	OneFive,		12&#xD;&#xA;// 	OneSix,			13&#xD;&#xA;// 	OneSeven,		14&#xD;&#xA;// 	TwoTwo,			15&#xD;&#xA;// 	TwoThree,		16&#xD;&#xA;// 	TwoFour,		17&#xD;&#xA;// 	TwoFive,		18&#xD;&#xA;// 	TwoSix,			19&#xD;&#xA;// 	TwoSeven,		20&#xD;&#xA;// 	ThreeThree,		21&#xD;&#xA;// 	ThreeFour,		22&#xD;&#xA;// 	ThreeFive,		23&#xD;&#xA;// 	ThreeSix,		24&#xD;&#xA;// 	ThreeSeven,		25&#xD;&#xA;// 	FourFour,		26&#xD;&#xA;// 	FourFive,		27&#xD;&#xA;// 	FourSix,		28&#xD;&#xA;// 	FourSeven,		29&#xD;&#xA;// 	FiveFive,		30&#xD;&#xA;// 	FiveSix,		31&#xD;&#xA;// 	FiveSeven,		32&#xD;&#xA;// 	SixSix,			33&#xD;&#xA;// 	SixSeven,		34&#xD;&#xA;// 	SevenSeven,		35&#xD;&#xA;// }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It's `OneSeven`. And this auction's start index is `30`.&#xD;&#xA;&#xD;&#xA;So, `30 + 1 ~ 30 + 7`." ContentLicense="CC BY-SA 4.0" />
  <row Id="34692" PostHistoryTypeId="2" PostId="8831" RevisionGUID="b93d0cc6-3bbd-41b7-8bd2-6c2ae7a4b5d1" CreationDate="2023-06-08T15:51:36.050" UserId="3850" Text="I am running the [Astar](https://github.com/ok-Alice/Astar) node locally and pointing to the [astar-frame](https://github.com/ok-Alice/astar-frame/tree/main) repository which is cloned on my local machine. In the `Astar` node repository, I added the [paths-override](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#paths-overrides) method to point all dependencies of `astar-frame` to the local folder which solved some dependency issues. &#xD;&#xA;&#xD;&#xA;When building the `Astar` node using `cargo build --release`, I get the following error:&#xD;&#xA;```&#xD;&#xA;  error[E0046]: not all trait items implemented, missing: `reserve_withdraw_assets`&#xD;&#xA;    --&gt; /Users/snowmead/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/c22e1c4/runtime/polkadot/src/weights/pallet_xcm.rs:47:1&#xD;&#xA;     |&#xD;&#xA;  47 | impl&lt;T: frame_system::Config&gt; pallet_xcm::WeightInfo for WeightInfo&lt;T&gt; {&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `reserve_withdraw_assets` in implementation&#xD;&#xA;     |&#xD;&#xA;     = help: implement the missing item: `fn reserve_withdraw_assets() -&gt; _feps::Weight { todo!() }`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Since I haven't modified anything in `astar-frame` [pallet-xcm](https://github.com/ok-Alice/astar-frame/tree/main/frame/pallet-xcm), I believe this might be a dependency issue. And to confirm that this trait item is implemented, we see in the [`pallet_xcm::Config`](https://github.com/ok-Alice/Astar/blob/master/runtime/shibuya/src/xcm_config.rs#L247) trait that it uses [`pallet_xcm::weights::SubstrateWeight&lt;Runtime&gt;;`](https://github.com/ok-Alice/astar-frame/blob/main/frame/pallet-xcm/src/weights.rs#L51) which implements the [`reserve_withdraw_assets`](https://github.com/ok-Alice/astar-frame/blob/main/frame/pallet-xcm/src/weights.rs#L239) trait item. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34694" PostHistoryTypeId="1" PostId="8831" RevisionGUID="b93d0cc6-3bbd-41b7-8bd2-6c2ae7a4b5d1" CreationDate="2023-06-08T15:51:36.050" UserId="3850" Text="Trait item implementation is missing: `reserve_withdraw_assets`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34695" PostHistoryTypeId="3" PostId="8831" RevisionGUID="b93d0cc6-3bbd-41b7-8bd2-6c2ae7a4b5d1" CreationDate="2023-06-08T15:51:36.050" UserId="3850" Text="|runtime|frame|config|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34697" PostHistoryTypeId="6" PostId="8831" RevisionGUID="5944c9dd-91db-48ab-bccf-800c223520b9" CreationDate="2023-06-08T15:57:06.940" UserId="29" Comment="edited tags; edited tags" Text="|xcm|frame|astar|config|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34698" PostHistoryTypeId="52" PostId="8824" RevisionGUID="a339a3eb-2c35-4fda-b6f6-4f82757bc31e" CreationDate="2023-06-08T15:57:39.840" />
  <row Id="34699" PostHistoryTypeId="2" PostId="8832" RevisionGUID="4c6627b7-e2f6-463d-8b18-220b85816aa5" CreationDate="2023-06-08T18:01:59.490" UserId="3395" Text="I have a parachain with no sudo pallet. However, in order to perform an upgrade, the first step [authorize][1] requires Root origin.&#xD;&#xA;&#xD;&#xA;I have tried to run [ForceScheduleCodeUpgrade][2] from the relay chain, but after the upgrade takes place, the parachain panics with the following log:&#xD;&#xA;```&#xD;&#xA;2023-06-08 16:48:48 [Parachain] panicked at 'No new validation function found in storage, GoAhead signal is not expected', /home/c/.cargo/git/checkouts/cumulus-59522f43471fa161/422a22c/pallets/parachain-system/src/lib.rs:396:21    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/cumulus/cumulus_pallet_parachain_system/pallet/struct.Pallet.html#method.authorize_upgrade&#xD;&#xA;  [2]: https://docs.rs/gekko/latest/gekko/runtime/kusama/extrinsics/paras/struct.ForceScheduleCodeUpgrade.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="34701" PostHistoryTypeId="1" PostId="8832" RevisionGUID="4c6627b7-e2f6-463d-8b18-220b85816aa5" CreationDate="2023-06-08T18:01:59.490" UserId="3395" Text="Upgrade parachain without sudo" ContentLicense="CC BY-SA 4.0" />
  <row Id="34702" PostHistoryTypeId="3" PostId="8832" RevisionGUID="4c6627b7-e2f6-463d-8b18-220b85816aa5" CreationDate="2023-06-08T18:01:59.490" UserId="3395" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34703" PostHistoryTypeId="50" PostId="5951" RevisionGUID="97af4ce3-75ee-4d82-9c87-820f510547c7" CreationDate="2023-06-08T18:02:45.297" UserId="-1" />
  <row Id="34704" PostHistoryTypeId="5" PostId="8832" RevisionGUID="4df29107-5e36-4969-b352-013049b837db" CreationDate="2023-06-08T18:07:38.963" UserId="3395" Comment="added 120 characters in body" Text="I have a parachain with no sudo pallet. However, in order to perform an upgrade, the first step [authorize][1] requires Root origin.&#xD;&#xA;&#xD;&#xA;I have tried to run [ForceScheduleCodeUpgrade][2] from the relay chain, but after the upgrade takes place, the parachain panics with the following log:&#xD;&#xA;```&#xD;&#xA;2023-06-08 16:48:48 [Parachain] panicked at 'No new validation function found in storage, GoAhead signal is not expected', /home/c/.cargo/git/checkouts/cumulus-59522f43471fa161/422a22c/pallets/parachain-system/src/lib.rs:396:21    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there any way to perform the upgrade without having to set everything up from scratch, including the sudo pallet?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/cumulus/cumulus_pallet_parachain_system/pallet/struct.Pallet.html#method.authorize_upgrade&#xD;&#xA;  [2]: https://docs.rs/gekko/latest/gekko/runtime/kusama/extrinsics/paras/struct.ForceScheduleCodeUpgrade.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="34705" PostHistoryTypeId="2" PostId="8833" RevisionGUID="a1aa9f86-4e8d-4822-8b22-c324a9544b06" CreationDate="2023-06-08T18:17:37.430" UserId="251" Text="The first step is correct.&#xD;&#xA;&#xD;&#xA;However, for the second step, you should call `parachain_system::enact_authorize_upgrade` on the parachain side. This function can be called by anyone and it's free if successful, but that account still needs some funds, the system will charge a fee which will be returned upon success." ContentLicense="CC BY-SA 4.0" />
  <row Id="34707" PostHistoryTypeId="5" PostId="8832" RevisionGUID="37cfcd36-04e8-4092-ba94-e170c96595aa" CreationDate="2023-06-08T19:15:42.463" UserId="3395" Comment="added 17 characters in body" Text="I have a parachain with no sudo pallet. However, in order to perform an upgrade, the first step [authorize][1] requires Root origin.&#xD;&#xA;&#xD;&#xA;As a workaround, I have tried to run [ForceScheduleCodeUpgrade][2] from the relay chain, but after the upgrade takes place, the parachain panics with the following log:&#xD;&#xA;```&#xD;&#xA;2023-06-08 16:48:48 [Parachain] panicked at 'No new validation function found in storage, GoAhead signal is not expected', /home/c/.cargo/git/checkouts/cumulus-59522f43471fa161/422a22c/pallets/parachain-system/src/lib.rs:396:21    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there any way to perform the upgrade without having to set everything up from scratch, including the sudo pallet?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/cumulus/cumulus_pallet_parachain_system/pallet/struct.Pallet.html#method.authorize_upgrade&#xD;&#xA;  [2]: https://docs.rs/gekko/latest/gekko/runtime/kusama/extrinsics/paras/struct.ForceScheduleCodeUpgrade.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="34708" PostHistoryTypeId="5" PostId="4813" RevisionGUID="2d4979fc-acc0-4fb0-8f6d-35b39d8ad5c6" CreationDate="2023-06-08T19:44:39.090" UserId="116" Comment="Spelling cant -&gt; can't and  i-&gt;I" Text="Imagine I have a on_initialize hook like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	    fn on_initialize(n: T::BlockNumber) -&gt; Weight {&#xD;&#xA;            return T::DbWeight::get().writes(1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'd like a test that can verify the hook, something like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;	#[test]&#xD;&#xA;	fn valid_weights() {&#xD;&#xA;		new_test_ext().execute_with(|| {&#xD;&#xA;			assert_eq!(&#xD;&#xA;                &lt;MyPallet as OnInitialize&lt;u64&gt;&gt;::on_initialize(1),&#xD;&#xA;			    &lt;TestRuntime as sp_weights&gt;::DbWeight::get().writes(2) //&lt;-- sp_weight is unknown&#xD;&#xA;			);&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;/!\ I use substrate branch `polkadot-v0.9.22`, where sp_weight is not available as a package, so I can't import it&#xD;&#xA;&#xD;&#xA;the problem is... That I can't find a way to do it. I couldn't find a way to use something like `Test::DbWeight::get().writes(1)`, the closest I could get was this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;	&lt;&lt;TestRuntime as frame_system::Config&gt;::DbWeight&gt;::get().reads(1)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   type annotations needed&#xD;&#xA;   cannot infer type for type parameter `T` declared on the trait `Get`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34709" PostHistoryTypeId="24" PostId="4813" RevisionGUID="2d4979fc-acc0-4fb0-8f6d-35b39d8ad5c6" CreationDate="2023-06-08T19:44:39.090" Comment="Proposed by 116 approved by 2281, 94 edit id of 430" ContentLicense="CC BY-SA 4.0" />
  <row Id="34710" PostHistoryTypeId="2" PostId="8834" RevisionGUID="0c124129-2a6c-4af5-b0d3-d0e9c7290796" CreationDate="2023-06-08T21:56:40.990" UserId="3171" Text="I want to decode bytes on solidity side to that was decoded with scale codec.&#xD;&#xA;Is the any implementation of scale codec. (decode) on solidity side?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34712" PostHistoryTypeId="1" PostId="8834" RevisionGUID="0c124129-2a6c-4af5-b0d3-d0e9c7290796" CreationDate="2023-06-08T21:56:40.990" UserId="3171" Text="I want to use scale codec in solidity? Is the any implementation of scale codec to decode bytes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34713" PostHistoryTypeId="3" PostId="8834" RevisionGUID="0c124129-2a6c-4af5-b0d3-d0e9c7290796" CreationDate="2023-06-08T21:56:40.990" UserId="3171" Text="|smart-contract|contracts|scale-codec|substrate-node|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34714" PostHistoryTypeId="5" PostId="8825" RevisionGUID="758c9ab5-feb9-4f82-8310-2c522eab2170" CreationDate="2023-06-09T01:32:05.743" UserId="116" Comment="added 212 characters in body" Text="This is where you should start reading:&#xD;&#xA;&#xD;&#xA;[https://docs.substrate.io/build/chain-spec/][1]&#xD;&#xA;&#xD;&#xA;You have already found chain_spec.rs where there are a few functions&#xD;&#xA; `staging_testnet_config_genesis` and `local_testnet_config` cosponsoring to the different chains defined as names like `dev` `local` or `staging` [(defined in command.rs)][2].&#xD;&#xA;&#xD;&#xA;At [line 242][3] the vector `initial_nominators` is defined and at [line 384][4]  it is called with an empty argument, fill this vector with something like &#xD;&#xA;`vec![authority_keys_from_seed(&quot;Bob&quot;)]` to get some initial nominators.&#xD;&#xA;&#xD;&#xA;Then compile and run your node with argument `--chain=staging` and save the output generated chainspec.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/chain-spec/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/e434882d5dbf3f3f6085cb7f1d017dbc4ac11f0a/bin/node/cli/src/command.rs#L66&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L242&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L384" ContentLicense="CC BY-SA 4.0" />
  <row Id="34715" PostHistoryTypeId="52" PostId="8832" RevisionGUID="af9a4386-38f1-4124-b0ae-da67232e7c95" CreationDate="2023-06-09T02:02:10.953" />
  <row Id="34716" PostHistoryTypeId="5" PostId="8832" RevisionGUID="af0be5b9-7a6c-4057-aa41-b8ea530d770f" CreationDate="2023-06-09T04:55:12.680" UserId="2281" Comment="added 6 characters in body; edited tags" Text="I have a `parachain` with no `sudo pallet`. However, in order to perform an upgrade, the first step [authorize][1] requires Root origin.&#xD;&#xA;&#xD;&#xA;As a workaround, I have tried to run [ForceScheduleCodeUpgrade][2] from the relay chain, but after the upgrade takes place, the parachain panics with the following log:&#xD;&#xA;```rs&#xD;&#xA;2023-06-08 16:48:48 [Parachain] panicked at 'No new validation function found in storage, GoAhead signal is not expected', /home/c/.cargo/git/checkouts/cumulus-59522f43471fa161/422a22c/pallets/parachain-system/src/lib.rs:396:21    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-08 16:48:48 [Parachain] ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there any way to perform the upgrade without having to set everything up from scratch, including the sudo pallet?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/cumulus/cumulus_pallet_parachain_system/pallet/struct.Pallet.html#method.authorize_upgrade&#xD;&#xA;  [2]: https://docs.rs/gekko/latest/gekko/runtime/kusama/extrinsics/paras/struct.ForceScheduleCodeUpgrade.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="34717" PostHistoryTypeId="6" PostId="8832" RevisionGUID="af0be5b9-7a6c-4057-aa41-b8ea530d770f" CreationDate="2023-06-09T04:55:12.680" UserId="2281" Comment="added 6 characters in body; edited tags" Text="|parachain|runtime-upgrade|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34718" PostHistoryTypeId="5" PostId="6698" RevisionGUID="5d3f0d54-ce1b-41b1-83ef-adb2d13f1f06" CreationDate="2023-06-09T06:01:57.563" UserId="116" Comment="Spelling and language:  dont -&gt; don't;  i-&gt; I and some  is-&gt;are " Text="I want to add `pallet-assets` in substrate runtime.rs . &#xD;&#xA;&#xD;&#xA;[Repository][1]&#xD;&#xA;&#xD;&#xA;I did these steps: &#xD;&#xA;&#xD;&#xA;1 -  add pallet-assets into `Cargo.toml` : &#xD;&#xA;&#xD;&#xA;    pallet-assets = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &quot;pallet-assets/std&quot;,&#xD;&#xA;&#xD;&#xA;2 - add these configs into runtime file : &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    pub type AssetBalance = Balance;&#xD;&#xA;    pub type AssetId = u32;&#xD;&#xA;    &#xD;&#xA;    parameter_types! {&#xD;&#xA;        pub const AssetDeposit: Balance = 10 * UNITS; // 10 UNITS deposit to create fungible asset class&#xD;&#xA;        pub const AssetAccountDeposit: Balance = deposit(1, 16);&#xD;&#xA;        pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;&#xD;&#xA;        pub const AssetsStringLimit: u32 = 50;&#xD;&#xA;        pub const MetadataDepositBase: Balance = deposit(1, 68);&#xD;&#xA;        pub const MetadataDepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_assets::Config for Runtime {&#xD;&#xA;        type RuntimeEvent = RuntimeEvent;&#xD;&#xA;        type Balance = Balance;&#xD;&#xA;        type AssetId = u32;&#xD;&#xA;        type AssetIdParameter = u32;&#xD;&#xA;        type CreateOrigin = AsEnsureOriginWithArg&lt;frame_system::EnsureSigned&lt;AccountId&gt;&gt;;&#xD;&#xA;        type Currency = Balances;&#xD;&#xA;        type ForceOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type AssetDeposit = AssetDeposit;&#xD;&#xA;        type MetadataDepositBase = MetadataDepositBase;&#xD;&#xA;        type MetadataDepositPerByte = MetadataDepositPerByte;&#xD;&#xA;        type ApprovalDeposit = ApprovalDeposit;&#xD;&#xA;        type RemoveItemsLimit = ConstU32&lt;1000&gt;;&#xD;&#xA;        type StringLimit = AssetsStringLimit;&#xD;&#xA;        type Freezer = ();&#xD;&#xA;        type Extra = ();&#xD;&#xA;        type WeightInfo = ();&#xD;&#xA;        type AssetAccountDeposit = AssetAccountDeposit;&#xD;&#xA;    &#xD;&#xA;        #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        type BenchmarkHelper = ();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and final add `pallet-assets` file into the constructor: &#xD;&#xA;&#xD;&#xA;    Assets: pallet_assets,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;after I run this command `cargo check` it faced 116 errors:&#xD;&#xA;&#xD;&#xA;I don't know what the problems are? How can I solves these problems? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;        |&#xD;&#xA;        = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ff5bbb618e892e0d.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-9869b6e941266003.rmeta&#xD;&#xA;    &#xD;&#xA;      error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `oom`.&#xD;&#xA;        |&#xD;&#xA;        = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ff5bbb618e892e0d.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-9869b6e941266003.rmeta&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:283:6&#xD;&#xA;          |&#xD;&#xA;      283 | impl pallet_assets::Config for Runtime {&#xD;&#xA;          |      ^^^^^^^^^^^^^^^^^^^^^ the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;          |&#xD;&#xA;      note: required by a bound in `pallet_assets::Config`&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/2a0eeff/frame/assets/src/lib.rs:201:37&#xD;&#xA;          |&#xD;&#xA;      201 |     pub trait Config&lt;I: 'static = ()&gt;: frame_system::Config {&#xD;&#xA;          |                                        ^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_assets::Config`&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `pallet_assets::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:308:11&#xD;&#xA;          |&#xD;&#xA;      308 |         Block = Block,&#xD;&#xA;          |                 ^^^^^ within `RuntimeCall`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_assets::Pallet&lt;Runtime&gt;`&#xD;&#xA;          |&#xD;&#xA;          = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                    frame_system::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                    pallet_grandpa::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_randomness_collective_flip::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_session::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_sudo::Pallet&lt;T&gt;&#xD;&#xA;                  and 3 others&#xD;&#xA;      note: required because it appears within the type `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `sp_runtime::generic::UncheckedExtrinsic`&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/2a0eeff/primitives/runtime/src/generic/unchecked_extrinsic.rs:44:40&#xD;&#xA;          |&#xD;&#xA;      44  | pub struct UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;&#xD;&#xA;          |                                        ^^^^ required by this bound in `sp_runtime::generic::UncheckedExtrinsic`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: required because it appears within the type `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `From`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:369:20&#xD;&#xA;          |&#xD;&#xA;      369 | pub trait From&lt;T&gt;: Sized {&#xD;&#xA;          |                    ^^^^^ required by this bound in `From`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: required because it appears within the type `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `TryInto`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:393:23&#xD;&#xA;          |&#xD;&#xA;      393 | pub trait TryInto&lt;T&gt;: Sized {&#xD;&#xA;          |                       ^^^^^ required by this bound in `TryInto`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = note: required because it appears within the type `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;      note: required by a bound in `From`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:369:16&#xD;&#xA;          |&#xD;&#xA;      369 | pub trait From&lt;T&gt;: Sized {&#xD;&#xA;          |                ^ required by this bound in `From`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = note: required because it appears within the type `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;      note: required by a bound in `TryInto`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:393:19&#xD;&#xA;          |&#xD;&#xA;      393 | pub trait TryInto&lt;T&gt;: Sized {&#xD;&#xA;          |                   ^ required by this bound in `TryInto`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = note: required because it appears within the type `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;      note: required by a bound in `Result`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:504:17&#xD;&#xA;          |&#xD;&#xA;      504 | pub enum Result&lt;T, E&gt; {&#xD;&#xA;          |                 ^ required by this bound in `Result`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `pallet_assets::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                    frame_system::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                    pallet_grandpa::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_randomness_collective_flip::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_session::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_sudo::Pallet&lt;T&gt;&#xD;&#xA;                  and 3 others&#xD;&#xA;      note: required because it appears within the type `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `From`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:369:20&#xD;&#xA;          |&#xD;&#xA;      369 | pub trait From&lt;T&gt;: Sized {&#xD;&#xA;          |                    ^^^^^ required by this bound in `From`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `pallet_assets::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                    frame_system::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                    pallet_grandpa::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_randomness_collective_flip::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_session::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_sudo::Pallet&lt;T&gt;&#xD;&#xA;                  and 3 others&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0283]: type annotations needed&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: multiple `impl`s satisfying `RuntimeCall: IsSubType&lt;_&gt;` found&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | || -&#xD;&#xA;          | ||_|&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | |  in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0283]: type annotations needed&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: multiple `impl`s satisfying `RuntimeCall: From&lt;_&gt;` found&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | || -&#xD;&#xA;          | ||_|&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | |  in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and these are:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        rror[E0277]: the trait bound `sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;: Decode` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:383:32&#xD;&#xA;          |&#xD;&#xA;      383 |         fn initialize_block(header: &amp;&lt;Block as BlockT&gt;::Header) {&#xD;&#xA;          |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Decode` is not implemented for `sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;`&#xD;&#xA;          |&#xD;&#xA;          = help: the trait `Decode` is implemented for `sp_runtime::generic::UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;`&#xD;&#xA;          = note: required because of the requirements on the impl of `Codec` for `sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;`&#xD;&#xA;          = note: required because of the requirements on the impl of `sp_api::BlockT` for `sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, sp_runtime::traits::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;&gt;`&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_dex&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34719" PostHistoryTypeId="4" PostId="6698" RevisionGUID="5d3f0d54-ce1b-41b1-83ef-adb2d13f1f06" CreationDate="2023-06-09T06:01:57.563" UserId="116" Comment="Spelling and language:  dont -&gt; don't;  i-&gt; I and some  is-&gt;are " Text="Error when need to add pallet-assets in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="34720" PostHistoryTypeId="24" PostId="6698" RevisionGUID="5d3f0d54-ce1b-41b1-83ef-adb2d13f1f06" CreationDate="2023-06-09T06:01:57.563" Comment="Proposed by 116 approved by -1 edit id of 437" ContentLicense="CC BY-SA 4.0" />
  <row Id="34721" PostHistoryTypeId="5" PostId="6698" RevisionGUID="dc31c147-e999-44c8-97af-f1ad588c6764" CreationDate="2023-06-09T06:01:57.563" UserId="2281" Comment="Spelling and language:  dont -&gt; don't;  i-&gt; I and some  is-&gt;are " Text="I want to add `pallet-assets` in substrate runtime.rs . &#xD;&#xA;&#xD;&#xA;[Repository][1]&#xD;&#xA;&#xD;&#xA;I did these steps: &#xD;&#xA;&#xD;&#xA;1 -  add pallet-assets into `Cargo.toml` : &#xD;&#xA;```rs&#xD;&#xA;    pallet-assets = { default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.35&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    &quot;pallet-assets/std&quot;,&#xD;&#xA;```&#xD;&#xA;2 - add these configs into runtime file : &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;```rs&#xD;&#xA;    pub type AssetBalance = Balance;&#xD;&#xA;    pub type AssetId = u32;&#xD;&#xA;    &#xD;&#xA;    parameter_types! {&#xD;&#xA;        pub const AssetDeposit: Balance = 10 * UNITS; // 10 UNITS deposit to create fungible asset class&#xD;&#xA;        pub const AssetAccountDeposit: Balance = deposit(1, 16);&#xD;&#xA;        pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;&#xD;&#xA;        pub const AssetsStringLimit: u32 = 50;&#xD;&#xA;        pub const MetadataDepositBase: Balance = deposit(1, 68);&#xD;&#xA;        pub const MetadataDepositPerByte: Balance = deposit(0, 1);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_assets::Config for Runtime {&#xD;&#xA;        type RuntimeEvent = RuntimeEvent;&#xD;&#xA;        type Balance = Balance;&#xD;&#xA;        type AssetId = u32;&#xD;&#xA;        type AssetIdParameter = u32;&#xD;&#xA;        type CreateOrigin = AsEnsureOriginWithArg&lt;frame_system::EnsureSigned&lt;AccountId&gt;&gt;;&#xD;&#xA;        type Currency = Balances;&#xD;&#xA;        type ForceOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type AssetDeposit = AssetDeposit;&#xD;&#xA;        type MetadataDepositBase = MetadataDepositBase;&#xD;&#xA;        type MetadataDepositPerByte = MetadataDepositPerByte;&#xD;&#xA;        type ApprovalDeposit = ApprovalDeposit;&#xD;&#xA;        type RemoveItemsLimit = ConstU32&lt;1000&gt;;&#xD;&#xA;        type StringLimit = AssetsStringLimit;&#xD;&#xA;        type Freezer = ();&#xD;&#xA;        type Extra = ();&#xD;&#xA;        type WeightInfo = ();&#xD;&#xA;        type AssetAccountDeposit = AssetAccountDeposit;&#xD;&#xA;    &#xD;&#xA;        #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        type BenchmarkHelper = ();&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;and final add `pallet-assets` file into the constructor: &#xD;&#xA;```rs&#xD;&#xA;    Assets: pallet_assets,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;after I run this command `cargo check` it faced 116 errors:&#xD;&#xA;&#xD;&#xA;I don't know what the problems are? How can I solves these problems? &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;        error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;        |&#xD;&#xA;        = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ff5bbb618e892e0d.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-9869b6e941266003.rmeta&#xD;&#xA;    &#xD;&#xA;      error: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `oom`.&#xD;&#xA;        |&#xD;&#xA;        = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;        = note: first definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-ff5bbb618e892e0d.rmeta&#xD;&#xA;        = note: second definition in `sp_io` loaded from /home/kianoush/projects/substrate_dex/target/debug/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-9869b6e941266003.rmeta&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:283:6&#xD;&#xA;          |&#xD;&#xA;      283 | impl pallet_assets::Config for Runtime {&#xD;&#xA;          |      ^^^^^^^^^^^^^^^^^^^^^ the trait `frame_system::pallet::Config` is not implemented for `Runtime`&#xD;&#xA;          |&#xD;&#xA;      note: required by a bound in `pallet_assets::Config`&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/2a0eeff/frame/assets/src/lib.rs:201:37&#xD;&#xA;          |&#xD;&#xA;      201 |     pub trait Config&lt;I: 'static = ()&gt;: frame_system::Config {&#xD;&#xA;          |                                        ^^^^^^^^^^^^^^^^^^^^ required by this bound in `pallet_assets::Config`&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `pallet_assets::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:308:11&#xD;&#xA;          |&#xD;&#xA;      308 |         Block = Block,&#xD;&#xA;          |                 ^^^^^ within `RuntimeCall`, the trait `Callable&lt;Runtime&gt;` is not implemented for `pallet_assets::Pallet&lt;Runtime&gt;`&#xD;&#xA;          |&#xD;&#xA;          = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                    frame_system::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                    pallet_grandpa::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_randomness_collective_flip::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_session::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_sudo::Pallet&lt;T&gt;&#xD;&#xA;                  and 3 others&#xD;&#xA;      note: required because it appears within the type `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `sp_runtime::generic::UncheckedExtrinsic`&#xD;&#xA;         --&gt; /home/kianoush/.cargo/git/checkouts/substrate-7e08433d4c370a21/2a0eeff/primitives/runtime/src/generic/unchecked_extrinsic.rs:44:40&#xD;&#xA;          |&#xD;&#xA;      44  | pub struct UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;&#xD;&#xA;          |                                        ^^^^ required by this bound in `sp_runtime::generic::UncheckedExtrinsic`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: required because it appears within the type `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `From`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:369:20&#xD;&#xA;          |&#xD;&#xA;      369 | pub trait From&lt;T&gt;: Sized {&#xD;&#xA;          |                    ^^^^^ required by this bound in `From`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: required because it appears within the type `RuntimeEvent`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `TryInto`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:393:23&#xD;&#xA;          |&#xD;&#xA;      393 | pub trait TryInto&lt;T&gt;: Sized {&#xD;&#xA;          |                       ^^^^^ required by this bound in `TryInto`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = note: required because it appears within the type `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;      note: required by a bound in `From`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:369:16&#xD;&#xA;          |&#xD;&#xA;      369 | pub trait From&lt;T&gt;: Sized {&#xD;&#xA;          |                ^ required by this bound in `From`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = note: required because it appears within the type `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;      note: required by a bound in `TryInto`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:393:19&#xD;&#xA;          |&#xD;&#xA;      393 | pub trait TryInto&lt;T&gt;: Sized {&#xD;&#xA;          |                   ^ required by this bound in `TryInto`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = note: required because it appears within the type `pallet_assets::Event&lt;Runtime&gt;`&#xD;&#xA;      note: required by a bound in `Result`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:504:17&#xD;&#xA;          |&#xD;&#xA;      504 | pub enum Result&lt;T, E&gt; {&#xD;&#xA;          |                 ^ required by this bound in `Result`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `pallet_assets::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied in `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                    frame_system::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                    pallet_grandpa::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_randomness_collective_flip::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_session::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_sudo::Pallet&lt;T&gt;&#xD;&#xA;                  and 3 others&#xD;&#xA;      note: required because it appears within the type `RuntimeCall`&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;      note: required by a bound in `From`&#xD;&#xA;         --&gt; /home/kianoush/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:369:20&#xD;&#xA;          |&#xD;&#xA;      369 | pub trait From&lt;T&gt;: Sized {&#xD;&#xA;          |                    ^^^^^ required by this bound in `From`&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `pallet_assets::Pallet&lt;Runtime&gt;: Callable&lt;Runtime&gt;` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;          = help: the following other types implement trait `Callable&lt;T&gt;`:&#xD;&#xA;                    frame_system::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_aura::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_authorship::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_balances::Pallet&lt;T, I&gt;&#xD;&#xA;                    pallet_grandpa::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_randomness_collective_flip::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_session::pallet::Pallet&lt;T&gt;&#xD;&#xA;                    pallet_sudo::Pallet&lt;T&gt;&#xD;&#xA;                  and 3 others&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0283]: type annotations needed&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: multiple `impl`s satisfying `RuntimeCall: IsSubType&lt;_&gt;` found&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | || -&#xD;&#xA;          | ||_|&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | |  in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    &#xD;&#xA;      error[E0283]: type annotations needed&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | ||_- in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          |&#xD;&#xA;      note: multiple `impl`s satisfying `RuntimeCall: From&lt;_&gt;` found&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:305:1&#xD;&#xA;          |&#xD;&#xA;      305 |    construct_runtime!(&#xD;&#xA;          |   _^&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          |  |_|&#xD;&#xA;          | ||&#xD;&#xA;      306 | ||     pub struct Runtime&#xD;&#xA;      307 | ||     where&#xD;&#xA;      308 | ||         Block = Block,&#xD;&#xA;      ...   ||&#xD;&#xA;      323 | ||     }&#xD;&#xA;      324 | || );&#xD;&#xA;          | || -&#xD;&#xA;          | ||_|&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | ||_in this macro invocation&#xD;&#xA;          | |  in this macro invocation&#xD;&#xA;      ...   |&#xD;&#xA;          = note: this error originates in the macro `frame_support::construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and these are:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        rror[E0277]: the trait bound `sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;: Decode` is not satisfied&#xD;&#xA;         --&gt; /home/kianoush/projects/substrate_dex/runtime/src/lib.rs:383:32&#xD;&#xA;          |&#xD;&#xA;      383 |         fn initialize_block(header: &amp;&lt;Block as BlockT&gt;::Header) {&#xD;&#xA;          |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Decode` is not implemented for `sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;`&#xD;&#xA;          |&#xD;&#xA;          = help: the trait `Decode` is implemented for `sp_runtime::generic::UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;`&#xD;&#xA;          = note: required because of the requirements on the impl of `Codec` for `sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;`&#xD;&#xA;          = note: required because of the requirements on the impl of `sp_api::BlockT` for `sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, sp_runtime::traits::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;&gt;`&#xD;&#xA;    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/dortajkianoush/substrate_dex&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34722" PostHistoryTypeId="5" PostId="8810" RevisionGUID="a51000ff-7843-4ff3-8e09-43a8853b7b14" CreationDate="2023-06-09T06:09:50.257" UserId="2281" Comment="added 67 characters in body" Text="&#xD;&#xA;&#xD;&#xA;I have already run a `relay chain` on two ports, but when I try to connect my `parachain` to the `relay chain`, I encounter the following error. I have attached a screenshot of the error to this message.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&gt; **I am getting this error message**&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;Error message:&#xD;&#xA;2023-06-07 13:07:11 Parachain Collator Template    &#xD;&#xA;2023-06-07 13:07:11 ✌️ Version 0.1.0-677a1a238a9    &#xD;&#xA;2023-06-07 13:07:11 ❤️ By Anonymous, 2020-2023    &#xD;&#xA;2023-06-07 13:07:11  Chain specification: Local Testnet    &#xD;&#xA;2023-06-07 13:07:11  Node name: Bob    &#xD;&#xA;2023-06-07 13:07:11  Role: AUTHORITY    &#xD;&#xA;2023-06-07 13:07:11  Database: RocksDb at /tmp/parachain/bob/chains/local_testnet/db/full    &#xD;&#xA;2023-06-07 13:07:11 ⛓ Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)    &#xD;&#xA;2023-06-07 13:07:13 Parachain ID: Id(1000)    &#xD;&#xA;2023-06-07 13:07:13 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    &#xD;&#xA;2023-06-07 13:07:13 Parachain genesis state: 0x0000000000000000000000000000000000000000000000000000000000000000004f3fb323d861297b5ffdafa44cae2b676644e242cc24ad1ca45eb430ad191c2803170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2023-06-07 13:07:13 Is collating: yes    &#xD;&#xA;Error: Service(Other(&quot;Polkadot service error: Failed to get runtime version: Unsupported or invalid BabeApi version&quot;))&#xD;&#xA;```&#xD;&#xA;I followed this link: &#xD;&#xA;https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/&#xD;&#xA;&#xD;&#xA;Please suggest how to resolve this error.&#xD;&#xA;&#xD;&#xA;Thanks in advance&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/otPLo.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34725" PostHistoryTypeId="2" PostId="8836" RevisionGUID="c0b79ef3-1b6f-4fe3-a5aa-f5b80fa40518" CreationDate="2023-06-09T07:01:46.323" UserId="2862" Text="We are working on an alternative implementation of the Polkadot protocol, but since the spec is missing a lot of details regarding the Runtime, we rely heavily on the Substrate implementation.&#xD;&#xA;&#xD;&#xA;So we want to identify which Substrate pallets (functionality) should be considered as constituting the core of the protocol, the ones that at some point should be generalized and added as part of the spec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34727" PostHistoryTypeId="1" PostId="8836" RevisionGUID="c0b79ef3-1b6f-4fe3-a5aa-f5b80fa40518" CreationDate="2023-06-09T07:01:46.323" UserId="2862" Text="What is the core functionality (pallets) that should be part of the specification" ContentLicense="CC BY-SA 4.0" />
  <row Id="34728" PostHistoryTypeId="3" PostId="8836" RevisionGUID="c0b79ef3-1b6f-4fe3-a5aa-f5b80fa40518" CreationDate="2023-06-09T07:01:46.323" UserId="2862" Text="|polkadot|pallet|runtime|specs|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34729" PostHistoryTypeId="2" PostId="8837" RevisionGUID="2b6cd06e-7f66-4f3f-9cdf-4bfcde22ca7a" CreationDate="2023-06-09T07:12:59.427" UserId="3136" Text="I think you did a mistake in your parachain command i know you were follow a doc but you can try once my command and let me know is it works or not..&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    **  ./target/release/parachain-template-node --alice --collator&#xD;&#xA;    --force-authoring --chain raw-parachain-chainspec.json --base-path /data/para1 --port 40333 --ws-port 8844 -- --execution wasm --chain&#xD;&#xA;     ../polkadot/customSpecRaw.json --port 30343 --ws-port 9945 --bootnodes&#xD;&#xA;     /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWD9puWKTqjajFmsiBj7it9iHLoM2sdWKztrg81CRkHZ3a**&#xD;&#xA;&#xD;&#xA;You can change path according to your path and the last address is your local identity of your relay chain which is ```12D3KooWD9puWKTqjajFmsiBj7it9iHLoM2sdWKztrg81CRkHZ3a``` and ws-port 9945 is your relay chain port you can edit command according to you. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34731" PostHistoryTypeId="5" PostId="8837" RevisionGUID="45f1a9b1-f6e9-48ff-b0f0-5c001c96dae0" CreationDate="2023-06-09T07:21:14.823" UserId="3136" Comment="added 35 characters in body" Text="I think you did a mistake in your parachain command i know you were follow a doc but you can try once my command and let me know is it works or not..&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    **  ./target/release/parachain-template-node --alice --collator&#xD;&#xA;    --force-authoring --chain raw-parachain-chainspec.json --base-path /data/para1 --port 40333 --ws-port 8844 -- --execution wasm --chain&#xD;&#xA;     ../polkadot/customSpecRaw.json --port 30343 --ws-port 9945 --bootnodes&#xD;&#xA;     /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWD9puWKTqjajFmsiBj7it9iHLoM2sdWKztrg81CRkHZ3a**&#xD;&#xA;&#xD;&#xA;You can change path according to your path and the last address is local identity of relay chain which is ```12D3KooWD9puWKTqjajFmsiBj7it9iHLoM2sdWKztrg81CRkHZ3a```you can add your relay chain local identity and ws-port 9945 is relay chain port you can edit command according to your ws-port" ContentLicense="CC BY-SA 4.0" />
  <row Id="34732" PostHistoryTypeId="2" PostId="8838" RevisionGUID="148144e5-0956-42b4-8c88-7dbb6ae8186d" CreationDate="2023-06-09T08:57:30.027" UserId="380" Text="The experimental engine doesn't exist anymore. Its just part of ink now so you don't need to add this macro. This happened around [March 2022](https://github.com/paritytech/ink/issues/1164#issuecomment-1059293430)." ContentLicense="CC BY-SA 4.0" />
  <row Id="34734" PostHistoryTypeId="2" PostId="8839" RevisionGUID="e07fbe68-245a-4e03-9d04-d12536e42370" CreationDate="2023-06-09T09:55:27.150" UserId="2862" Text="Why Host set storage information directly and not through the Runtime api? (e.g. Grandpa Authorities, Accounts, Code, Heap_Pages)&#xD;&#xA;Is this an expected behavior? " ContentLicense="CC BY-SA 4.0" />
  <row Id="34736" PostHistoryTypeId="1" PostId="8839" RevisionGUID="e07fbe68-245a-4e03-9d04-d12536e42370" CreationDate="2023-06-09T09:55:27.150" UserId="2862" Text="Why Hosts set storage information directly and not through the Runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="34737" PostHistoryTypeId="3" PostId="8839" RevisionGUID="e07fbe68-245a-4e03-9d04-d12536e42370" CreationDate="2023-06-09T09:55:27.150" UserId="2862" Text="|runtime|storage|host-functions|architecture|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34738" PostHistoryTypeId="5" PostId="8821" RevisionGUID="ea9c609c-4cd2-45d0-a6ad-17d560bce8da" CreationDate="2023-06-09T13:12:21.577" UserId="19" Comment="added 1 character in body" Text="I want to write tests and found [the question][1] that potentially soles my problem, but made exactly all what is recommended but still have the same issue.&#xD;&#xA;&#xD;&#xA;I have added on top of my module with tests following line `#[cfg(feature = &quot;ink-experimental-engine&quot;)]` and added dependency to my `Cargo.toml` like `ink-experimental-engine = [&quot;ink_env/ink-experimental-engine&quot;]`.&#xD;&#xA;&#xD;&#xA;I was looking at on the documentation page of ink! under key word: `set_caller` but haven't found anything.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/69829061/how-can-i-set-a-caller-in-ink-contract-unit-testing-function" ContentLicense="CC BY-SA 4.0" />
  <row Id="34739" PostHistoryTypeId="2" PostId="8840" RevisionGUID="b4b59d62-54f3-489e-8fef-218a28668776" CreationDate="2023-06-09T13:53:46.130" UserId="1786" Text="So for clarity we wrote out a lot of parachain auctions, leases, crowdloan logic in [`substrate-api-sidecar`](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/services/paras/ParasService.ts) to which you can checkout if you want more information about what you can query and grab.&#xD;&#xA;&#xD;&#xA;Okay so to the question above, here is some code get the leasePeriods.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const apiAt = api.at(&lt;some_block_hash&gt;);&#xD;&#xA;&#xD;&#xA;const auctionInfoAt = apiAt.query.auctions.auctionInfo&lt;Option&lt;Vec&lt;BlockNumber&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;let leasePeriodIndex: BlockNumber | null;&#xD;&#xA;if (auctionInfoAt.isSome) {&#xD;&#xA;    [leasePeriodIndex, _] = auctionInfoOpt.unwrap();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const leasePeriodsPerSlot = apiAt.consts.auctions.leasePeriodsPerSlot.toNumber()&#xD;&#xA;&#xD;&#xA;const leasePeriods = leasePeriodIndex !== null&#xD;&#xA;	? Array(leasePeriodsPerSlot)&#xD;&#xA;			.fill(0)&#xD;&#xA;			.map((_, i) =&gt; i + (leasePeriodIndex as BN).toNumber())&#xD;&#xA;	: null;&#xD;&#xA;&#xD;&#xA;console.log(leasePeriods)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will yield a result like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;        &quot;30&quot;,&#xD;&#xA;        &quot;31&quot;,&#xD;&#xA;        &quot;32&quot;,&#xD;&#xA;        &quot;33&quot;,&#xD;&#xA;        &quot;34&quot;,&#xD;&#xA;        &quot;35&quot;,&#xD;&#xA;        &quot;36&quot;,&#xD;&#xA;        &quot;37&quot;&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34741" PostHistoryTypeId="5" PostId="8840" RevisionGUID="0fd7970a-d068-44dc-b207-7b239be90331" CreationDate="2023-06-09T13:59:36.010" UserId="1786" Comment="deleted 15 characters in body" Text="So for clarity we wrote out a lot of parachain auctions, leases, crowdloan logic in [`substrate-api-sidecar`](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/services/paras/ParasService.ts) to which you can checkout if you want more information about what you can query and grab.&#xD;&#xA;&#xD;&#xA;Okay so to the question above, here is some code to get the leasePeriods.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const apiAt = api.at(&lt;some_block_hash&gt;);&#xD;&#xA;&#xD;&#xA;const auctionInfoAt = apiAt.query.auctions.auctionInfo&lt;Option&lt;Vec&lt;BlockNumber&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;let leasePeriodIndex: BlockNumber | null;&#xD;&#xA;if (auctionInfoAt.isSome) {&#xD;&#xA;    [leasePeriodIndex, _] = auctionInfoOpt.unwrap();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const leasePeriodsPerSlot = apiAt.consts.auctions.leasePeriodsPerSlot.toNumber()&#xD;&#xA;&#xD;&#xA;const leasePeriods = leasePeriodIndex !== null&#xD;&#xA;	? Array(leasePeriodsPerSlot)&#xD;&#xA;			.fill(0)&#xD;&#xA;			.map((_, i) =&gt; i + (leasePeriodIndex as BN).toNumber())&#xD;&#xA;	: null;&#xD;&#xA;&#xD;&#xA;console.log(leasePeriods)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will yield a result like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;        &quot;31&quot;,&#xD;&#xA;        &quot;32&quot;,&#xD;&#xA;        &quot;33&quot;,&#xD;&#xA;        &quot;34&quot;,&#xD;&#xA;        &quot;35&quot;,&#xD;&#xA;        &quot;36&quot;,&#xD;&#xA;        &quot;37&quot;&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34742" PostHistoryTypeId="2" PostId="8841" RevisionGUID="d08addf0-9fbb-4583-9e2e-bad42eeb8d4b" CreationDate="2023-06-09T21:46:27.680" UserId="181" Text="I am trying to spin up a small BABE PoS network of four nodes and not able to get GRANDPA to start. &#xD;&#xA;&#xD;&#xA;It's hard to know what exact pieces of information to provide, here are some notes.&#xD;&#xA;&#xD;&#xA;A few notes:&#xD;&#xA; - I am inserting the session keys immediately with the --alice, --bob, etc flags for testing, for now, and I can confirm the expected keys are set via RPC.&#xD;&#xA; - Blocks produce, authored by any validator running,but don't finalize. All the nodes are peered correctly.&#xD;&#xA; - In a previous configuration, I noted at least Alice could get finalization to start https://substrate.stackexchange.com/questions/844/grandpa-not-finalizing-with-2-of-3-nodes-on-network. Then I switched to four nodes due to that answer.&#xD;&#xA; - I note every node spits out the following grandpa log message endlessly&#xD;&#xA;```&#xD;&#xA;2023-06-09 17:22:00.006 TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;2023-06-09 17:22:00.457 TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;2023-06-09 17:22:00.841 TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)  &#xD;&#xA;```&#xD;&#xA;Here is an example of the response from the roundState RPC. Any of the nodes report three keys in missing prevotes, and four in missing precommits, though I don't understand what to do with that information.&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  setId: 0&#xD;&#xA;  best: {&#xD;&#xA;    round: 1&#xD;&#xA;    totalWeight: 4&#xD;&#xA;    thresholdWeight: 3&#xD;&#xA;    prevotes: {&#xD;&#xA;      currentWeight: 1&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;    precommits: {&#xD;&#xA;      currentWeight: 0&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;        0x35476F4e6b66365764627843466E5064416E5959&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;  background: []&#xD;&#xA;}&#xD;&#xA; ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34744" PostHistoryTypeId="1" PostId="8841" RevisionGUID="d08addf0-9fbb-4583-9e2e-bad42eeb8d4b" CreationDate="2023-06-09T21:46:27.680" UserId="181" Text="Grandpa stuck at &quot;Polling&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34745" PostHistoryTypeId="3" PostId="8841" RevisionGUID="d08addf0-9fbb-4583-9e2e-bad42eeb8d4b" CreationDate="2023-06-09T21:46:27.680" UserId="181" Text="|consensus|nodes|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34746" PostHistoryTypeId="2" PostId="8842" RevisionGUID="dd590cb8-c9d7-4b9b-9cdf-62a4da4bbba3" CreationDate="2023-06-10T00:59:42.400" UserId="408" Text="You can refer to [frameless-runtime](https://github.com/JoshOrndorff/frameless-node-template/blob/main/frameless-runtime/src/lib.rs), which is a minimal substrate runtime implementation written from scratch.&#xD;&#xA;&#xD;&#xA;It doesn't use the `construct_runtime!` macro, instead it manually implements the required methods on the `Runtime` struct. You can check the `impl Runtime { ... }` code block for more details." ContentLicense="CC BY-SA 4.0" />
  <row Id="34752" PostHistoryTypeId="5" PostId="8842" RevisionGUID="3557f9ed-10d1-49ee-8f75-a4591f568536" CreationDate="2023-06-10T01:04:59.803" UserId="408" Comment="added 91 characters in body" Text="You can refer to [frameless-runtime](https://github.com/JoshOrndorff/frameless-node-template/blob/main/frameless-runtime/src/lib.rs), which is a minimal substrate runtime implementation written from scratch.&#xD;&#xA;&#xD;&#xA;It doesn't use the `construct_runtime!` macro, instead it manually implements the required methods on the `Runtime` struct, which in turn are used to implement various runtime apis. You can check the `impl Runtime { ... }` and `impl_runtime_apis! { ... }` code block for details." ContentLicense="CC BY-SA 4.0" />
  <row Id="34754" PostHistoryTypeId="5" PostId="8841" RevisionGUID="5b35aae8-2837-4ab4-a24c-7e894b874a1b" CreationDate="2023-06-10T06:06:45.867" UserId="2281" Comment="added 6 characters in body" Text="I am trying to spin up a small BABE PoS network of four nodes and not able to get GRANDPA to start. &#xD;&#xA;&#xD;&#xA;It's hard to know what exact pieces of information to provide, here are some notes.&#xD;&#xA;&#xD;&#xA;A few notes:&#xD;&#xA; - I am inserting the session keys immediately with the --alice, --bob, etc flags for testing, for now, and I can confirm the expected keys are set via RPC.&#xD;&#xA; - Blocks produce, authored by any validator running,but don't finalize. All the nodes are peered correctly.&#xD;&#xA; - In a previous configuration, I noted at least Alice could get finalization to start https://substrate.stackexchange.com/questions/844/grandpa-not-finalizing-with-2-of-3-nodes-on-network. Then I switched to four nodes due to that answer.&#xD;&#xA; - I note every node spits out the following grandpa log message endlessly&#xD;&#xA;```rs&#xD;&#xA;2023-06-09 17:22:00.006 TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;2023-06-09 17:22:00.457 TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;2023-06-09 17:22:00.841 TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)  &#xD;&#xA;```&#xD;&#xA;Here is an example of the response from the roundState RPC. Any of the nodes report three keys in missing prevotes, and four in missing precommits, though I don't understand what to do with that information.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;{&#xD;&#xA;  setId: 0&#xD;&#xA;  best: {&#xD;&#xA;    round: 1&#xD;&#xA;    totalWeight: 4&#xD;&#xA;    thresholdWeight: 3&#xD;&#xA;    prevotes: {&#xD;&#xA;      currentWeight: 1&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;    precommits: {&#xD;&#xA;      currentWeight: 0&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;        0x35476F4e6b66365764627843466E5064416E5959&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;  background: []&#xD;&#xA;}&#xD;&#xA; ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34755" PostHistoryTypeId="5" PostId="7530" RevisionGUID="c5f6ea82-d471-4844-bf8c-e8a2ee6358c2" CreationDate="2023-06-10T06:43:45.937" UserId="116" Comment="Spelling and language:  dont -&gt; don't;  i-&gt;I" Text="Added preimage pallet [here][1], (because it seems to be a necessity in the &gt; polkadot-0.9.37)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;It shows up in `developer &gt; extrinsics &gt; preimage&#xD;&#xA;[![Screenshot][2]][2]&#xD;&#xA;&#xD;&#xA;but does not show up in `query &gt; preimage`... &#xD;&#xA;[![Screenshot][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have added the necessary changes to the `runtime/src/lib.rs` but I'm not sure what's missing? &#xD;&#xA;&#xD;&#xA;Do I need to add a runtime api? But I don't see it added in other examples...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;you can view it in [polkadot-js-apps here][4]&#xD;&#xA;&#xD;&#xA;and here is the [branch][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kabocha-network/parachain/blob/kab-release-v0.2.6-soupcan-new-xcm/runtime/src/lib.rs&#xD;&#xA;  [2]: https://i.stack.imgur.com/cJyQl.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/h2Pcv.png&#xD;&#xA;  [4]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fsoupcan1.jelliedowl.com#/chainstate" ContentLicense="CC BY-SA 4.0" />
  <row Id="34756" PostHistoryTypeId="24" PostId="7530" RevisionGUID="c5f6ea82-d471-4844-bf8c-e8a2ee6358c2" CreationDate="2023-06-10T06:43:45.937" Comment="Proposed by 116 approved by 2281, 298 edit id of 439" ContentLicense="CC BY-SA 4.0" />
  <row Id="34757" PostHistoryTypeId="5" PostId="8810" RevisionGUID="55ca2943-7d3b-4609-8123-2cc43bacdf4c" CreationDate="2023-06-10T06:43:59.493" UserId="3136" Comment="code modified in body" Text="&#xD;&#xA;&#xD;&#xA;I have already run a `relay chain` on two ports, but when I try to connect my `parachain` to the `relay chain`, I encounter the following error. I have attached a screenshot of the error to this message.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&gt; **I am getting this error message**&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;Error message:&#xD;&#xA;2023-06-07 13:07:11 Parachain Collator Template    &#xD;&#xA;2023-06-07 13:07:11 ✌️ Version 0.1.0-677a1a238a9    &#xD;&#xA;2023-06-07 13:07:11 ❤️ By Anonymous, 2020-2023    &#xD;&#xA;2023-06-07 13:07:11  Chain specification: Local Testnet    &#xD;&#xA;2023-06-07 13:07:11  Node name: Bob    &#xD;&#xA;2023-06-07 13:07:11  Role: AUTHORITY    &#xD;&#xA;2023-06-07 13:07:11  Database: RocksDb at /tmp/parachain/bob/chains/local_testnet/db/full    &#xD;&#xA;2023-06-07 13:07:11 ⛓ Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)    &#xD;&#xA;2023-06-07 13:07:13 Parachain ID: Id(1000)    &#xD;&#xA;2023-06-07 13:07:13 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ    &#xD;&#xA;2023-06-07 13:07:13 Parachain genesis state: 0x0000000000000000000000000000000000000000000000000000000000000000004f3fb323d861297b5ffdafa44cae2b676644e242cc24ad1ca45eb430ad191c2803170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2023-06-07 13:07:13 Is collating: yes    &#xD;&#xA;Error: Service(Other(&quot;Polkadot service error: Failed to get runtime version: Unsupported or invalid BabeApi version&quot;))&#xD;&#xA;```&#xD;&#xA;I followed this link: &#xD;&#xA;&#xD;&#xA;    [https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/]&#xD;&#xA;&#xD;&#xA;Please suggest how to resolve this error?&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/otPLo.png&#xD;&#xA;  [2]: https://%20https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="34758" PostHistoryTypeId="4" PostId="8810" RevisionGUID="55ca2943-7d3b-4609-8123-2cc43bacdf4c" CreationDate="2023-06-10T06:43:59.493" UserId="3136" Comment="code modified in body" Text="Error- Connecting Parachain to Relay Chain: Unsupported or Invalid BabeApi Version" ContentLicense="CC BY-SA 4.0" />
  <row Id="34759" PostHistoryTypeId="24" PostId="8810" RevisionGUID="55ca2943-7d3b-4609-8123-2cc43bacdf4c" CreationDate="2023-06-10T06:43:59.493" Comment="Proposed by 3136 approved by 2281, 298 edit id of 445" ContentLicense="CC BY-SA 4.0" />
  <row Id="34760" PostHistoryTypeId="5" PostId="8811" RevisionGUID="55cece1d-4f83-4d71-b59c-d7fd5990fb98" CreationDate="2023-06-10T06:44:09.977" UserId="116" Comment="Code block" Text="In the crowdfund pallet linked here:&#xD;&#xA;&#xD;&#xA;https://github.com/substrate-developer-hub/substrate-how-to-guides/blob/main/example-code/template-node/pallets/simple-crowdfund/src/lib.rs&#xD;&#xA;&#xD;&#xA;the withdraw function works by calling the `T::Currency::withdraw()` fn in currency trait and passing that return value into the `T::Currency::resolve_into_existing()` fn instead why can i just use `T::Currency::transfer like its done in the contribute()` fn but swap the source and dest ?[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/U27PP.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/oj7M8.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34761" PostHistoryTypeId="4" PostId="8811" RevisionGUID="55cece1d-4f83-4d71-b59c-d7fd5990fb98" CreationDate="2023-06-10T06:44:09.977" UserId="116" Comment="Code block" Text="What's the difference between calling T::Currency::transfer() and T::Currency::withdraw()" ContentLicense="CC BY-SA 4.0" />
  <row Id="34762" PostHistoryTypeId="24" PostId="8811" RevisionGUID="55cece1d-4f83-4d71-b59c-d7fd5990fb98" CreationDate="2023-06-10T06:44:09.977" Comment="Proposed by 116 approved by 2281, 298 edit id of 435" ContentLicense="CC BY-SA 4.0" />
  <row Id="34763" PostHistoryTypeId="5" PostId="7672" RevisionGUID="963f72ac-53a7-48c7-bd81-9a6373b1763f" CreationDate="2023-06-10T06:44:20.817" UserId="116" Comment="Spelling and language:  dont -&gt; don't;  i-&gt; I" Text="Are there offchain storage options in substrate? Like a regular  mongodb- or mysql database, I don't want to use something else and just stick with something supported with substrate stack.&#xD;&#xA;&#xD;&#xA;The only thing that I found is [LocalStorage][1] but it requires a [Database][2] and the only thing that implements that trait is [in-memory][3] database which means its not persistent storage&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sc_client_db/offchain/struct.LocalStorage.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_client_db/trait.Database.html&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sp_database/struct.MemDb.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="34764" PostHistoryTypeId="24" PostId="7672" RevisionGUID="963f72ac-53a7-48c7-bd81-9a6373b1763f" CreationDate="2023-06-10T06:44:20.817" Comment="Proposed by 116 approved by 2281, 298 edit id of 440" ContentLicense="CC BY-SA 4.0" />
  <row Id="34765" PostHistoryTypeId="5" PostId="5525" RevisionGUID="72e83644-bd84-49f8-b9ab-dd35fd65d949" CreationDate="2023-06-10T06:44:30.487" UserId="116" Comment="Spelling cant -&gt; can't and point of view" Text="Can any one please point me to some very good step by step resource/course to learn substrate? I can't find any resources that would guide me step by step starting from substrate architecture and guide me through the whole processes of building my own frame." ContentLicense="CC BY-SA 4.0" />
  <row Id="34766" PostHistoryTypeId="24" PostId="5525" RevisionGUID="72e83644-bd84-49f8-b9ab-dd35fd65d949" CreationDate="2023-06-10T06:44:30.487" Comment="Proposed by 116 approved by 2281, 298 edit id of 431" ContentLicense="CC BY-SA 4.0" />
  <row Id="34767" PostHistoryTypeId="5" PostId="8625" RevisionGUID="a8d5d668-90d5-4f83-a6b6-d6956f5f29b1" CreationDate="2023-06-10T06:44:39.537" UserId="116" Comment="Spellcheck and language i-&gt;I Removed codeblock to decrease indentation" Text="I've implemented `use primitive_types::U256` and now I'm trying to return a `U256` int as a result from one of my functions, but I'm getting the following error: *the trait `TypeInfo` is not implemented for `primitive_types::U256`*, I understand that I need to implement `TypeInfo` in my smart contract but I just don't understand how.&#xD;&#xA;&#xD;&#xA;Here is the mentioned function:&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_est_price_psp22_to_a01(&#xD;&#xA;            &amp;self,&#xD;&#xA;            psp22_amount_in:Balance&#xD;&#xA;        )   -&gt; Result&lt;U256, TradingPairErrors&gt; {&#xD;&#xA;&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;&#xD;&#xA;            //fetching caller current PSP22 balance&#xD;&#xA;            let caller_current_balance:Balance = PSP22Ref::balance_of(&#xD;&#xA;                &amp;self.panx_contract,&#xD;&#xA;                caller&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            let actual_fee:Balance;&#xD;&#xA;&#xD;&#xA;            //calculating the actual LP fee&#xD;&#xA;            match self.fee.checked_div(10u128.pow(18)) {&#xD;&#xA;                Some(result) =&gt; {&#xD;&#xA;                    actual_fee = result;&#xD;&#xA;                }&#xD;&#xA;                None =&gt; {&#xD;&#xA;                    return Err(TradingPairErrors::Overflow);&#xD;&#xA;                }&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            let mut amount_in_with_lp_fees:Balance;&#xD;&#xA;&#xD;&#xA;            //reducting the LP fee from the PSP22 amount in&#xD;&#xA;            match psp22_amount_in.checked_mul(100u128 - actual_fee) {&#xD;&#xA;                Some(result) =&gt; {&#xD;&#xA;                    amount_in_with_lp_fees = result;&#xD;&#xA;                }&#xD;&#xA;                None =&gt; {&#xD;&#xA;                    return Err(TradingPairErrors::Overflow);&#xD;&#xA;                }&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            let tokens_to_validate:Balance = 3500u128 * 10u128.pow(18);&#xD;&#xA;&#xD;&#xA;            //validating if caller has more than 3500 PANX to verify if the caller is eligible for the incentive program &#xD;&#xA;            if caller_current_balance &gt;= tokens_to_validate{&#xD;&#xA;&#xD;&#xA;                if self.fee  &lt;= 1400000000000u128 {&#xD;&#xA;&#xD;&#xA;                    //reducting HALF of the LP fee from PSP22 amount in, if the caller has more than 3500 PANX and the LP fee is less than 1.4%&#xD;&#xA;                    match psp22_amount_in.checked_mul(100u128 - (actual_fee / 2u128)) {&#xD;&#xA;                        Some(result) =&gt; {&#xD;&#xA;                            amount_in_with_lp_fees = result;&#xD;&#xA;                        }&#xD;&#xA;                        None =&gt; {&#xD;&#xA;                            return Err(TradingPairErrors::Overflow);&#xD;&#xA;                        }&#xD;&#xA;                    };   &#xD;&#xA;                }&#xD;&#xA; &#xD;&#xA;                if self.fee  &gt; 1400000000000u128 {&#xD;&#xA;&#xD;&#xA;                    //reducting (LP fee - 1) of the LP fee from PSP22 amount in, if the caller has more than 3500 PANX and the LP fee is more than 1.4%&#xD;&#xA;                    match psp22_amount_in.checked_mul(100u128 - (actual_fee - 1u128)) {&#xD;&#xA;                        Some(result) =&gt; {&#xD;&#xA;                            amount_in_with_lp_fees = result;&#xD;&#xA;                        }&#xD;&#xA;                        None =&gt; {&#xD;&#xA;                            return Err(TradingPairErrors::Overflow);&#xD;&#xA;                        }&#xD;&#xA;                    };  &#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;             &#xD;&#xA;            let a0_amount_out = self.casted_div(amount_in_with_lp_fees * self.get_a0_balance(),(self.get_psp22_balance() * 100u128) + amount_in_with_lp_fees);&#xD;&#xA;            &#xD;&#xA;            //calculating the final A0 amount to transfer to the caller.&#xD;&#xA;            //match (amount_in_with_lp_fees * self.get_a0_balance()).checked_div((self.get_psp22_balance() * 100u128) + amount_in_with_lp_fees) {&#xD;&#xA;            //    Some(result) =&gt; {&#xD;&#xA;            //        a0_amount_out = result;&#xD;&#xA;            //    }&#xD;&#xA;            //    None =&gt; {&#xD;&#xA;            //        return Err(TradingPairErrors::Overflow);&#xD;&#xA;            //    }&#xD;&#xA;            //};&#xD;&#xA;&#xD;&#xA;            Ok(a0_amount_out)  &#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I'm using `casted_div` function which takes two `u128` objects and turns them into `U256`:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        fn casted_div(&#xD;&#xA;            &amp;self,&#xD;&#xA;            value1: u128,&#xD;&#xA;            value2: u128&#xD;&#xA;        ) -&gt; U256 {&#xD;&#xA;&#xD;&#xA;            U256::from(value1) / U256::from(value2)&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you and have a pleasant day." ContentLicense="CC BY-SA 4.0" />
  <row Id="34768" PostHistoryTypeId="24" PostId="8625" RevisionGUID="a8d5d668-90d5-4f83-a6b6-d6956f5f29b1" CreationDate="2023-06-10T06:44:39.537" Comment="Proposed by 116 approved by 2281, 298 edit id of 441" ContentLicense="CC BY-SA 4.0" />
  <row Id="34769" PostHistoryTypeId="5" PostId="368" RevisionGUID="9c896668-3e4e-4b31-abae-51382c6942e1" CreationDate="2023-06-10T06:47:09.763" UserId="3136" Comment="correction in body" Text="The `substrate-node-template` comes up with `PoA` by default. I am trying to change this consensus engine to `Proof of stake`, so far I have just changed `aura` to `babe`. How can I achieve changing the consensus to `PoS`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34770" PostHistoryTypeId="24" PostId="368" RevisionGUID="9c896668-3e4e-4b31-abae-51382c6942e1" CreationDate="2023-06-10T06:47:09.763" Comment="Proposed by 3136 approved by 2281, -1 edit id of 446" ContentLicense="CC BY-SA 4.0" />
  <row Id="34771" PostHistoryTypeId="5" PostId="368" RevisionGUID="92d2f8ac-1f00-4b8b-956f-a1ad0e4fca57" CreationDate="2023-06-10T06:47:09.763" UserId="298" Comment="correction in body" Text="The `substrate-node-template` comes up with `PoA` by default. I am trying to change this consensus engine to `Proof of stake`, so far I have just changed `aura` to `babe`. What else do I need to do to change the consensus to `PoS`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34772" PostHistoryTypeId="5" PostId="4070" RevisionGUID="cdf5982a-426b-4f0b-947f-47c9b47fa75b" CreationDate="2023-06-10T06:47:20.750" UserId="116" Comment="Spelling dont -&gt; don't" Text="I have a question in regard to RPC node for Polkadot or Substrate. &#xD;&#xA;&#xD;&#xA;RPC node configuration - I don't see too many information about this. Is there public information on how to setup a RPC, if there isn't, I am willing to do that if someone is willing to help me to understand how to setup.  &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;If there are any more information on how to setup RPC node, and back to Polkadot.JS. please don't hesitate to contact me and help me with me. Much appreciate. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34773" PostHistoryTypeId="24" PostId="4070" RevisionGUID="cdf5982a-426b-4f0b-947f-47c9b47fa75b" CreationDate="2023-06-10T06:47:20.750" Comment="Proposed by 116 approved by 2281, 298 edit id of 432" ContentLicense="CC BY-SA 4.0" />
  <row Id="34774" PostHistoryTypeId="5" PostId="8585" RevisionGUID="2fb4c16b-aecd-4391-b26e-f8b023348ada" CreationDate="2023-06-10T06:47:28.850" UserId="116" Comment="Spelling dont -&gt; don't (and some changes to make 6 chars in total)" Text="An epoch is generally used with babe consensus algorithm, I suggest you learn more about how the algorithm works [here][1]&#xD;&#xA;&#xD;&#xA;&gt; BABE execution happens in sequential non-overlapping phases known as epochs. Each epoch is divided into a predefined number of slots. All slots in each epoch are sequentially indexed starting from 0 (slot number). At the beginning of each epoch, the BABE node needs to run the Block-Production-Lottery algorithm to find out in which slots it should produce a block and gossip to the other block producers.&#xD;&#xA;&#xD;&#xA;If we don't have epochs we would have just infinite number of steps but that would make the VRF computation impractical and inefficient. Epochs provide a way to update the randomness and the validator set periodically in a more random and fair way.&#xD;&#xA;&#xD;&#xA;&gt; To make a long story short, a lot of applications depend on random&#xD;&#xA;&gt; number generation, but it can be difficult to find randomness that&#xD;&#xA;&gt; everyone agrees is random (and not gamed such that the generator&#xD;&#xA;&gt; benefits) when all on-chain operations must be deterministic and&#xD;&#xA;&gt; verifiable.&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/blog/polkadot-consensus-part-3-babe/" ContentLicense="CC BY-SA 4.0" />
  <row Id="34775" PostHistoryTypeId="24" PostId="8585" RevisionGUID="2fb4c16b-aecd-4391-b26e-f8b023348ada" CreationDate="2023-06-10T06:47:28.850" Comment="Proposed by 116 approved by 2281, 298 edit id of 442" ContentLicense="CC BY-SA 4.0" />
  <row Id="34776" PostHistoryTypeId="5" PostId="7989" RevisionGUID="9a638c0c-100d-48af-ad8d-5d041352bb0a" CreationDate="2023-06-10T06:47:41.357" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="Hello Substrate and Polkadot community,&#xD;&#xA;&#xD;&#xA;I am working on creating a decentralized exchange (DEX) using Substrate pallets and I've encountered an issue related to transferring tokens from the contract owner to the pallet address.&#xD;&#xA;&#xD;&#xA;To add liquidity for a token pair (e.g., XXX/USDT) in my DEX, users need to provide the contract address of the token (e.g., XXX). Before initiating the transfer, I want to ensure that the user is indeed the owner of the contract. Once the ownership is verified, I need to transfer tokens from the contract address (e.g., `5xsdf6s5d4f6sd4f65sd4fs65df46s5d4f6s5d4f`) to the pallet address.&#xD;&#xA;&#xD;&#xA;Could anyone provide guidance or sample code on how to achieve this token transfer from the contract owner to the pallet address while ensuring the user is the actual owner of the contract?&#xD;&#xA;&#xD;&#xA;Any help or suggestions would be greatly appreciated. Thank you!&#xD;&#xA;&#xD;&#xA;**Update**&#xD;&#xA;&#xD;&#xA;I want to transfer token with this code:&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;#[pallet::call_index(9)]&#xD;&#xA;#[pallet::weight(10_000)]&#xD;&#xA;pub fn total_supply(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;   	token: T::AccountId,&#xD;&#xA;	currency: T::AccountId,&#xD;&#xA;    currency_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;    token_amount: BalanceOf&lt;T&gt;,&#xD;&#xA;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;   	let who = ensure_signed(origin)?;&#xD;&#xA;     &#xD;&#xA;    T::Currency::transfer(&amp;who, &amp;T::PalletId::get().into_account(), &#xD;&#xA;    T::MinDeposit::get(), ExistenceRequirement::KeepAlive)?; &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but in this code transfer native token of the chain and I need to transfer from `XXX` token to the pallet account." ContentLicense="CC BY-SA 4.0" />
  <row Id="34777" PostHistoryTypeId="24" PostId="7989" RevisionGUID="9a638c0c-100d-48af-ad8d-5d041352bb0a" CreationDate="2023-06-10T06:47:41.357" Comment="Proposed by 116 approved by 2281, 298 edit id of 438" ContentLicense="CC BY-SA 4.0" />
  <row Id="34778" PostHistoryTypeId="33" PostId="8804" RevisionGUID="5c7e45c4-12ca-4d00-b474-a9604665c755" CreationDate="2023-06-10T06:52:21.373" UserId="298" Comment="22" />
  <row Id="34779" PostHistoryTypeId="5" PostId="8804" RevisionGUID="c036370e-3bf3-4186-abab-fb7996838a76" CreationDate="2023-06-10T07:16:02.063" UserId="298" Comment="improved readability and flow" Text="We are building a custom UI for chains containing a specific custom pallet and rpc module.&#xD;&#xA;&#xD;&#xA;The custom UI is similar to a polkadot-js clone we built, but much simpler. In our simple custom UI, we are having some issues with making rpc calls to the custom rpc server and then displaying the info, but we are being roadblocked with type decoration errors. &#xD;&#xA;&#xD;&#xA;### The issue&#xD;&#xA;We want to make an RPC call such as `api.rpc.superSig.listMembers` from a live testnet [chain][1], which contains an RPC module called Supersig rpc, which connects to supersig pallet, and display the information on screen, without errors. &#xD;&#xA;&#xD;&#xA;`rpc: wss://soupcan1.jelliedowl.com`&#xD;&#xA;&#xD;&#xA;**Working version**&#xD;&#xA;here you can see a working version: [Soupcan - polkadot-js clone](https://apps.decentration.org/?rpc=wss%3A%2F%2Fsoupcan1.jelliedowl.com#/supersig/dashboard) that succesfully connects with the rpc and displays information in a table. &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;So we can safely assume there is not a problem with the chain, pallet or rpc server. Link to the code we creates the Dashboard Table and rpc is [here](https://github.com/decentration/apps/blob/dd13433868abb2246766ff3b1494e3cdce8c3e79/packages/page-supersig/src/Supersig/Dashboard)&#xD;&#xA;&#xD;&#xA;Types we need to use to decorate the RPC are [here](https://github.com/decentration/apps/blob/fa92f1963259010d043d8f9561ee33b3ddc2754d/packages/apps-config/src/api/spec/kabocha.ts) we also have [supersig custom types npm package](https://github.com/decentration/supersig-types/tree/master)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The rpc in our pallet is [here](https://github.com/decentration/pallet_supersig/blob/master/rpc/src/lib.rs)&#xD;&#xA;&#xD;&#xA;### Errors&#xD;&#xA;The problem is we are getting some errors when creating a custom UI:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RPC-CORE: listMembers(supersig_id: AccountId): Vec&lt;(AccountId, Role)&gt;:: 2: Supersig error: Module, ModuleError { index: 42, error: [1, 0, 0, 0], message: None }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&quot;42&quot; means that the pallet number is 42 meaning supersig pallet.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;VEC: Unable to decode on index 0 Tuple: failed on 1:: DoNotConstruct: Cannot construct unknown type Role&#xD;&#xA;```&#xD;&#xA; [![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Here is a link to the [branch(https://github.com/decentration/subverse-frontend/tree/issue-status) of our custom UI.&#xD;&#xA;&#xD;&#xA;**Replicate Issue**&#xD;&#xA;&#xD;&#xA;steps to replicate the above listMembers error:&#xD;&#xA;&#xD;&#xA; - clone [branch](https://github.com/decentration/subverse-frontend/tree/issue-status)&#xD;&#xA; - `npm install`&#xD;&#xA; - `npm start`&#xD;&#xA; - Connect to Soupcan node (soupcan1.jelliedowl.com) in the top left of the screen (make sure not to connect to soupcan2).&#xD;&#xA; - Go to Dashboard in the Sidebar. &#xD;&#xA; - Go to ./src/components/Dashboard/Dashboard.tsx to find the relevant code. &#xD;&#xA;&#xD;&#xA;How do you successfully display the listMembers information? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://apps.decentration.org/?rpc=wss%3A%2F%2Fsoupcan1.jelliedowl.com#/supersig/dashboard&#xD;&#xA;  [2]: https://i.stack.imgur.com/DrMHq.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/aABhh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34780" PostHistoryTypeId="4" PostId="8804" RevisionGUID="c036370e-3bf3-4186-abab-fb7996838a76" CreationDate="2023-06-10T07:16:02.063" UserId="298" Comment="improved readability and flow" Text="How to make an RPC call from working custom RPC, decorate types and display info successfully?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34781" PostHistoryTypeId="4" PostId="8804" RevisionGUID="05706a51-030a-4573-88a5-e1e0a4291eff" CreationDate="2023-06-10T07:28:59.300" UserId="298" Comment="edited title" Text="How to make an RPC call from a working custom RPC, decorate types and display info successfully?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34782" PostHistoryTypeId="50" PostId="8448" RevisionGUID="600fe1ae-4597-4dd1-9fdd-4358e9ae1fd9" CreationDate="2023-06-10T10:06:05.707" UserId="-1" />
  <row Id="34783" PostHistoryTypeId="5" PostId="293" RevisionGUID="355eea39-3459-419c-9c30-78030e2848c0" CreationDate="2023-06-10T11:40:52.003" UserId="94" Comment="added 152 characters in body" Text="**Update**: All storage changes are now reverted when an error from a call is returned. This makes writing code much easier.&#xD;&#xA;&#xD;&#xA;**Original answer**:  &#xD;&#xA;Currently you need to make sure to **never return an error after you modified storage**.  &#xD;&#xA;In your case you need to do all checks that can error before modifying something.  &#xD;&#xA;Returning `Err` after a modification will most likely put your pallet in an undefined state.  &#xD;&#xA;&#xD;&#xA;This is not the most ergonomic and will gladly change in the future.  &#xD;&#xA;An annotation à la `#[storage_layer]` or something similar will be added.  &#xD;&#xA;This would allow to write code more easily as it would revert all changes upon error.  &#xD;&#xA;&#xD;&#xA;Will update this post once its done." ContentLicense="CC BY-SA 4.0" />
  <row Id="34784" PostHistoryTypeId="50" PostId="8457" RevisionGUID="a916f685-3813-4e22-91e0-2b56fcf62363" CreationDate="2023-06-10T12:04:45.567" UserId="-1" />
  <row Id="34785" PostHistoryTypeId="2" PostId="8843" RevisionGUID="ed153439-a120-4d7a-b95e-18fbe7766ef5" CreationDate="2023-06-10T14:56:06.730" UserId="4317" Text="while running this project https://github.com/jimmychu0807/substrate-offchain-worker-demo&#xD;&#xA;Getting above error." ContentLicense="CC BY-SA 4.0" />
  <row Id="34787" PostHistoryTypeId="1" PostId="8843" RevisionGUID="ed153439-a120-4d7a-b95e-18fbe7766ef5" CreationDate="2023-06-10T14:56:06.730" UserId="4317" Text="error[E0282]: type annotations needed --&gt; /libp2p-noise-0.32.0/src/protocol/x25519.rs:221:45" ContentLicense="CC BY-SA 4.0" />
  <row Id="34788" PostHistoryTypeId="3" PostId="8843" RevisionGUID="ed153439-a120-4d7a-b95e-18fbe7766ef5" CreationDate="2023-06-10T14:56:06.730" UserId="4317" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34789" PostHistoryTypeId="50" PostId="4226" RevisionGUID="c1ec6ae8-97ab-4e28-9e6e-3c58f670d1a4" CreationDate="2023-06-11T00:06:45.943" UserId="-1" />
  <row Id="34790" PostHistoryTypeId="50" PostId="4677" RevisionGUID="041a2e63-6d67-4447-a608-47c8e9769e0a" CreationDate="2023-06-11T04:02:55.360" UserId="-1" />
  <row Id="34792" PostHistoryTypeId="2" PostId="8844" RevisionGUID="cd13a074-9826-4b17-a80c-47f0c44d6274" CreationDate="2023-06-11T08:36:42.960" UserId="3538" Text="I've updated the `ChainSpec` type from:&#xD;&#xA;```&#xD;&#xA;pub type ChainSpec = sc_service::GenericChainSpec&lt;GenesisConfig, Extensions&gt;;&#xD;&#xA;```&#xD;&#xA;to &#xD;&#xA;```&#xD;&#xA;pub type ChainSpec = sc_service::GenericChainSpec&lt;Result&lt;GenesisConfig, String&gt;, Extensions&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But, I'm getting this error in the `command.rs`:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `Result&lt;node_template_runtime::GenesisConfig, std::string::String&gt;: BuildStorage` is not satisfied&#xD;&#xA;  --&gt; node/src/command.rs:49:12&#xD;&#xA;   |&#xD;&#xA;49 |         Ok(Box::new(spec))&#xD;&#xA;   |            ^^^^^^^^^^^^^^ the trait `BuildStorage` is not implemented for `Result&lt;node_template_runtime::GenesisConfig, std::string::String&gt;`&#xD;&#xA;   |&#xD;&#xA;   = help: the following other types implement trait `BuildStorage`:&#xD;&#xA;             ()&#xD;&#xA;             GenericChainSpec&lt;G, E&gt;&#xD;&#xA;             node_template_runtime::GenesisConfig&#xD;&#xA;             sp_runtime::Storage&#xD;&#xA;   = note: required for `Result&lt;node_template_runtime::GenesisConfig, std::string::String&gt;` to implement `RuntimeGenesis`&#xD;&#xA;   = note: required for `GenericChainSpec&lt;Result&lt;node_template_runtime::GenesisConfig, std::string::String&gt;, Extensions&gt;` to implement `sc_chain_spec::ChainSpec`&#xD;&#xA;   = note: required for the cast from `GenericChainSpec&lt;Result&lt;node_template_runtime::GenesisConfig, std::string::String&gt;, Extensions&gt;` to the object type `dyn sc_chain_spec::ChainSpec`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;```&#xD;&#xA;Is there a way to `unwrap` the `ChainSpec` in the `load_spec()` method? " ContentLicense="CC BY-SA 4.0" />
  <row Id="34794" PostHistoryTypeId="1" PostId="8844" RevisionGUID="cd13a074-9826-4b17-a80c-47f0c44d6274" CreationDate="2023-06-11T08:36:42.960" UserId="3538" Text="Having trouble with the `ChainSpec` Type" ContentLicense="CC BY-SA 4.0" />
  <row Id="34795" PostHistoryTypeId="3" PostId="8844" RevisionGUID="cd13a074-9826-4b17-a80c-47f0c44d6274" CreationDate="2023-06-11T08:36:42.960" UserId="3538" Text="|chainspec|genesis|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34796" PostHistoryTypeId="5" PostId="8843" RevisionGUID="f44a14df-14c1-4bd0-bb59-f1fd714f10dc" CreationDate="2023-06-11T10:09:42.893" UserId="2281" Comment="added 2 characters in body" Text="while `running` this project https://github.com/jimmychu0807/substrate-offchain-worker-demo&#xD;&#xA;Getting above error." ContentLicense="CC BY-SA 4.0" />
  <row Id="34797" PostHistoryTypeId="5" PostId="8844" RevisionGUID="03316dec-43c4-492b-a95c-99527ca6792e" CreationDate="2023-06-11T10:11:10.570" UserId="2281" Comment="added 6 characters in body" Text="I've updated the `ChainSpec` type from:&#xD;&#xA;```rs&#xD;&#xA;pub type ChainSpec = sc_service::GenericChainSpec&lt;GenesisConfig, Extensions&gt;;&#xD;&#xA;```&#xD;&#xA;to &#xD;&#xA;```rs&#xD;&#xA;pub type ChainSpec = sc_service::GenericChainSpec&lt;Result&lt;GenesisConfig, String&gt;, Extensions&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But, I'm getting this error in the `command.rs`:&#xD;&#xA;```rs&#xD;&#xA;error[E0277]: the trait bound `Result&lt;node_template_runtime::GenesisConfig, std::string::String&gt;: BuildStorage` is not satisfied&#xD;&#xA;  --&gt; node/src/command.rs:49:12&#xD;&#xA;   |&#xD;&#xA;49 |         Ok(Box::new(spec))&#xD;&#xA;   |            ^^^^^^^^^^^^^^ the trait `BuildStorage` is not implemented for `Result&lt;node_template_runtime::GenesisConfig, std::string::String&gt;`&#xD;&#xA;   |&#xD;&#xA;   = help: the following other types implement trait `BuildStorage`:&#xD;&#xA;             ()&#xD;&#xA;             GenericChainSpec&lt;G, E&gt;&#xD;&#xA;             node_template_runtime::GenesisConfig&#xD;&#xA;             sp_runtime::Storage&#xD;&#xA;   = note: required for `Result&lt;node_template_runtime::GenesisConfig, std::string::String&gt;` to implement `RuntimeGenesis`&#xD;&#xA;   = note: required for `GenericChainSpec&lt;Result&lt;node_template_runtime::GenesisConfig, std::string::String&gt;, Extensions&gt;` to implement `sc_chain_spec::ChainSpec`&#xD;&#xA;   = note: required for the cast from `GenericChainSpec&lt;Result&lt;node_template_runtime::GenesisConfig, std::string::String&gt;, Extensions&gt;` to the object type `dyn sc_chain_spec::ChainSpec`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;```&#xD;&#xA;Is there a way to `unwrap` the `ChainSpec` in the `load_spec()` method? " ContentLicense="CC BY-SA 4.0" />
  <row Id="34798" PostHistoryTypeId="5" PostId="4226" RevisionGUID="9fcf949f-ad52-4bb5-9010-ff1c38fa0ad2" CreationDate="2023-06-11T10:12:44.860" UserId="2281" Comment="added 10 characters in body" Text="As a `sudo` of a `parachain` on Kusama, i am making the first runtime upgrade. &#xD;&#xA;&#xD;&#xA;Initially, i made the upgrade as a sudo unchecked weight and setCode without checks. The transaction looked successful it went &quot;in block&quot;. But the the runtime didnt upgrade, and the spec version stayed the same. &#xD;&#xA;&#xD;&#xA;Then i went the correct route creating an hash and going to parachainSystem &gt; AuthorizeUpgrade and then enactAuthorizeUpgrade, but i get this error `parachainSystem.ProhibitedByPolkadot`...&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;sudo.Sudid&#xD;&#xA;A sudo just took place. [result] &#xD;&#xA;sudoResult: Result&lt;Null, SpRuntimeDispatchError&gt;&#xD;&#xA;Err&#xD;&#xA;DispatchError&#xD;&#xA;{&#xD;&#xA;  Module: {&#xD;&#xA;    index: 1&#xD;&#xA;    error: 1&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;type&#xD;&#xA;parachainSystem.ProhibitedByPolkadot&#xD;&#xA;details&#xD;&#xA;Polkadot currently prohibits this parachain from upgrading its validation function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Are we blocked out for a period of time? How can we succesfully make an upgrade?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="34799" PostHistoryTypeId="2" PostId="8845" RevisionGUID="c88f7d2c-8bd3-4222-ad71-05f1f4147031" CreationDate="2023-06-11T10:33:57.517" UserId="2551" Text="I used the example `Flipper`, and changed the code like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn flip(&amp;mut self) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            self.value = !self.value;&#xD;&#xA;            return Err(Error::InsufficientAllowance);&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I deployed the contract on chain, the function will not change the state `value`.&#xD;&#xA;&#xD;&#xA;If I run `cargo test`, the state will be changed." ContentLicense="CC BY-SA 4.0" />
  <row Id="34801" PostHistoryTypeId="1" PostId="8845" RevisionGUID="c88f7d2c-8bd3-4222-ad71-05f1f4147031" CreationDate="2023-06-11T10:33:57.517" UserId="2551" Text="A function returning Result::Error will not revert the execution" ContentLicense="CC BY-SA 4.0" />
  <row Id="34802" PostHistoryTypeId="3" PostId="8845" RevisionGUID="c88f7d2c-8bd3-4222-ad71-05f1f4147031" CreationDate="2023-06-11T10:33:57.517" UserId="2551" Text="|ink|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34803" PostHistoryTypeId="5" PostId="8840" RevisionGUID="704a8f81-57a4-409f-bbe0-28efde89f78a" CreationDate="2023-06-11T13:29:04.993" UserId="1786" Comment="added 2 characters in body" Text="So for clarity we wrote out a lot of parachain auctions, leases, crowdloan logic in [`substrate-api-sidecar`](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/services/paras/ParasService.ts) to which you can checkout if you want more information about what you can query and grab.&#xD;&#xA;&#xD;&#xA;Okay so to the question above, here is some code to get the leasePeriods.&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const apiAt = api.at(&lt;some_block_hash&gt;);&#xD;&#xA;&#xD;&#xA;const auctionInfoOpt = apiAt.query.auctions.auctionInfo&lt;Option&lt;Vec&lt;BlockNumber&gt;&gt;&gt;();&#xD;&#xA;&#xD;&#xA;let leasePeriodIndex: BlockNumber | null;&#xD;&#xA;if (auctionInfoOpt.isSome) {&#xD;&#xA;    [leasePeriodIndex, _] = auctionInfoOpt.unwrap();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const leasePeriodsPerSlot = apiAt.consts.auctions.leasePeriodsPerSlot.toNumber()&#xD;&#xA;&#xD;&#xA;const leasePeriods = leasePeriodIndex !== null&#xD;&#xA;	? Array(leasePeriodsPerSlot)&#xD;&#xA;			.fill(0)&#xD;&#xA;			.map((_, i) =&gt; i + (leasePeriodIndex as BN).toNumber())&#xD;&#xA;	: null;&#xD;&#xA;&#xD;&#xA;console.log(leasePeriods)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will yield a result like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;        &quot;31&quot;,&#xD;&#xA;        &quot;32&quot;,&#xD;&#xA;        &quot;33&quot;,&#xD;&#xA;        &quot;34&quot;,&#xD;&#xA;        &quot;35&quot;,&#xD;&#xA;        &quot;36&quot;,&#xD;&#xA;        &quot;37&quot;&#xD;&#xA;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34804" PostHistoryTypeId="2" PostId="8846" RevisionGUID="20da2175-4996-4cd5-bf72-ed947c511acd" CreationDate="2023-06-11T13:30:39.187" UserId="4056" Text="I am fetching specific block by hash using subxt:&#xD;&#xA;```rust&#xD;&#xA;    let block_hash = subxt::utils::H256::from_str(&#xD;&#xA;        &quot;0xfb6f67233cc212a40522351c88d86d9ac83f68a6b6d6be14c0cb69e83a5b8407&quot;&#xD;&#xA;    ).unwrap();&#xD;&#xA;    let block = api.rpc()&#xD;&#xA;        .block(Some(block_hash))&#xD;&#xA;        .await.unwrap().unwrap();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now I want to find the Account ID of the validator that produced this block. I have found this in regards to finding the block author with JS API https://polkadot.js.org/docs/api/start/api.rpc#detour-into-derives but I am not able to find anything similar with subxt.&#xD;&#xA;&#xD;&#xA;I am also curious how the JS API is deriving block producer information since I do not see anything in `ChainBlock` where this information could be included, or is it perhaps determined from leader schedule?&#xD;&#xA;&#xD;&#xA;I would appreciate any pointers.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34806" PostHistoryTypeId="1" PostId="8846" RevisionGUID="20da2175-4996-4cd5-bf72-ed947c511acd" CreationDate="2023-06-11T13:30:39.187" UserId="4056" Text="How to get block author with Subxt?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34807" PostHistoryTypeId="3" PostId="8846" RevisionGUID="20da2175-4996-4cd5-bf72-ed947c511acd" CreationDate="2023-06-11T13:30:39.187" UserId="4056" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34808" PostHistoryTypeId="50" PostId="8473" RevisionGUID="c1cafd10-d236-4826-92ca-ad65c0f30a9e" CreationDate="2023-06-11T14:05:40.703" UserId="-1" />
  <row Id="34809" PostHistoryTypeId="2" PostId="8847" RevisionGUID="cc5f3363-6d36-4535-a5b1-230fbb059064" CreationDate="2023-06-11T17:22:19.093" UserId="94" Text="A parachain needs to use the same hardware for benchmarking as the relay chain to ensure that the validators will be able to *import* the block in time.  &#xD;&#xA;So this is primarily about block import - not building.  &#xD;&#xA;A parachain can use faster hardware than the relay, as long as the weights were still generated on the reference hardware.  &#xD;&#xA;Otherwise there could be a situation where the collator thinks that a block should be importable in 1s, but the relay will need 10s because its benchmarking hardware is slower. And that can lead the import timing out and the parachain missing its slot." ContentLicense="CC BY-SA 4.0" />
  <row Id="34811" PostHistoryTypeId="5" PostId="8829" RevisionGUID="79b19567-d061-4c99-929a-85f046026307" CreationDate="2023-06-11T17:32:09.417" UserId="251" Comment="edited body" Text="On the parachain auction page. IIUC, there isn't any on-chain storage to store these values. How can I get that?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/rFicb.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34812" PostHistoryTypeId="5" PostId="7882" RevisionGUID="7c17a030-c55e-4f0b-a41b-40a5f910e10d" CreationDate="2023-06-12T00:12:18.430" UserId="83" Comment="show latest solution and reason why" Text="Solved! This was caused by the nightly toolchain. Switching to the stable toolchain solved this issue.&#xD;&#xA;&#xD;&#xA;Edit: As pointed out by Shunsuke, this is specific to the 1.70.0 nightly build. 1.68.0 version seems to work.&#xD;&#xA;&#xD;&#xA;Edit (12th June 2023): If you are using the latest version 3.0.1 of `cargo-contract --version` then you must fallback to 1.69 (since neither stable or nightly 1.70.0 worked). The CI for cargo-contract has pinned that version, see https://github.com/paritytech/cargo-contract/blob/master/.github/workflows/ci.yml#LL184C62-L184C118&#xD;&#xA;```bash&#xD;&#xA;rustup update stable&#xD;&#xA;rustup install 1.69&#xD;&#xA;rustup default 1.69&#xD;&#xA;rustup component add rust-src --toolchain 1.69&#xD;&#xA;rustup target add wasm32-unknown-unknown --toolchain 1.69&#xD;&#xA;cargo contract build&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34813" PostHistoryTypeId="2" PostId="8848" RevisionGUID="229ee1d0-6d22-4ca7-b905-aa8c7e005de5" CreationDate="2023-06-12T00:28:31.900" UserId="1950" Text="I have a running chain which was on `polkadot-v0.9.30` and updated all the libraries on to `polkadot-v0.9.42`&#xD;&#xA;&#xD;&#xA;Havent received any errors when uploading but after updating got the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9&#xD;&#xA;2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0xfa66b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x2df7 - &lt;unknown&gt;!core::panicking::panic_fmt::h6d1629d4208ae76c&#xD;&#xA;    2: 0x3198 - &lt;unknown&gt;!core::result::unwrap_failed::h8ef12658cee03bf1&#xD;&#xA;    3: 0xe0dc - &lt;unknown&gt;!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d&#xD;&#xA;    4: 0x70937 - &lt;unknown&gt;!&lt;pallet_scheduler::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnInitialize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_initialize::h4b32587c5fd765a6&#xD;&#xA;    5: 0x91420 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hffb3eafa82bbd60b&#xD;&#xA;    6: 0xa66d5 - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;How to fix this issue ? or is there any guidance around this ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aYcGI.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="34815" PostHistoryTypeId="1" PostId="8848" RevisionGUID="229ee1d0-6d22-4ca7-b905-aa8c7e005de5" CreationDate="2023-06-12T00:28:31.900" UserId="1950" Text="Substrate Error after updating from polkadot version polkadot 0.9.30 to polkadot 0.9.42" ContentLicense="CC BY-SA 4.0" />
  <row Id="34816" PostHistoryTypeId="3" PostId="8848" RevisionGUID="229ee1d0-6d22-4ca7-b905-aa8c7e005de5" CreationDate="2023-06-12T00:28:31.900" UserId="1950" Text="|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34817" PostHistoryTypeId="5" PostId="8848" RevisionGUID="085fe348-5729-46d1-9525-b5e86841e690" CreationDate="2023-06-12T00:36:39.840" UserId="1950" Comment="deleted 2 characters in body" Text="I have a running chain which was on `polkadot-v0.9.30` and updated all the libraries on to `polkadot-v0.9.42`&#xD;&#xA;&#xD;&#xA;Havent received any errors when uploading but after updating got the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9&#xD;&#xA;2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0xfa66b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x2df7 - &lt;unknown&gt;!core::panicking::panic_fmt::h6d1629d4208ae76c&#xD;&#xA;    2: 0x3198 - &lt;unknown&gt;!core::result::unwrap_failed::h8ef12658cee03bf1&#xD;&#xA;    3: 0xe0dc - &lt;unknown&gt;!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d&#xD;&#xA;    4: 0x70937 - &lt;unknown&gt;!&lt;pallet_scheduler::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnInitialize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_initialize::h4b32587c5fd765a6&#xD;&#xA;    5: 0x91420 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hffb3eafa82bbd60b&#xD;&#xA;    6: 0xa66d5 - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;How to fix this issue ? or is there any guidance around this ?&#xD;&#xA;&#xD;&#xA; [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iMz6Y.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="34818" PostHistoryTypeId="5" PostId="8848" RevisionGUID="f2cf0f22-4db5-4e91-9d95-6388c951e290" CreationDate="2023-06-12T00:48:36.483" UserId="116" Comment="Screenshot was hidden in codeblock" Text="I have a running chain which was on `polkadot-v0.9.30` and updated all the libraries on to `polkadot-v0.9.42`&#xD;&#xA;&#xD;&#xA;Havent received any errors when uploading but after updating got the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9&#xD;&#xA;2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0xfa66b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x2df7 - &lt;unknown&gt;!core::panicking::panic_fmt::h6d1629d4208ae76c&#xD;&#xA;    2: 0x3198 - &lt;unknown&gt;!core::result::unwrap_failed::h8ef12658cee03bf1&#xD;&#xA;    3: 0xe0dc - &lt;unknown&gt;!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d&#xD;&#xA;    4: 0x70937 - &lt;unknown&gt;!&lt;pallet_scheduler::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnInitialize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_initialize::h4b32587c5fd765a6&#xD;&#xA;    5: 0x91420 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hffb3eafa82bbd60b&#xD;&#xA;    6: 0xa66d5 - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue ? or is there any guidance around this ?&#xD;&#xA;&#xD;&#xA;[![Screemshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iMz6Y.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="34819" PostHistoryTypeId="24" PostId="8848" RevisionGUID="f2cf0f22-4db5-4e91-9d95-6388c951e290" CreationDate="2023-06-12T00:48:36.483" Comment="Proposed by 116 approved by 1950 edit id of 447" ContentLicense="CC BY-SA 4.0" />
  <row Id="34820" PostHistoryTypeId="5" PostId="8848" RevisionGUID="e7e6104f-808b-4cbe-a092-926d87197204" CreationDate="2023-06-12T00:48:55.453" UserId="1950" Comment="added 91 characters in body" Text="I have a running chain which was on `polkadot-v0.9.30` and updated all the libraries on to `polkadot-v0.9.42`&#xD;&#xA;&#xD;&#xA;Havent received any errors when uploading but after updating got the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9&#xD;&#xA;2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0xfa66b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x2df7 - &lt;unknown&gt;!core::panicking::panic_fmt::h6d1629d4208ae76c&#xD;&#xA;    2: 0x3198 - &lt;unknown&gt;!core::result::unwrap_failed::h8ef12658cee03bf1&#xD;&#xA;    3: 0xe0dc - &lt;unknown&gt;!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d&#xD;&#xA;    4: 0x70937 - &lt;unknown&gt;!&lt;pallet_scheduler::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnInitialize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_initialize::h4b32587c5fd765a6&#xD;&#xA;    5: 0x91420 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hffb3eafa82bbd60b&#xD;&#xA;    6: 0xa66d5 - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue ? or is there any guidance around this ?&#xD;&#xA;&#xD;&#xA;[![Screemshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iMz6Y.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="34821" PostHistoryTypeId="5" PostId="8848" RevisionGUID="7ee38882-b55a-44a4-a3dd-152d97ad5052" CreationDate="2023-06-12T00:54:05.273" UserId="1950" Comment="added 91 characters in body" Text="I have a running chain which was on `polkadot-v0.9.30` and updated all the libraries on to `polkadot-v0.9.42`&#xD;&#xA;&#xD;&#xA;Havent received any errors when uploading but after updating got the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The error originates from &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Create a sensible default weights system given only expected maximal block weight and the&#xD;&#xA;	/// ratio that `Normal` extrinsics should occupy.&#xD;&#xA;	///&#xD;&#xA;	/// Assumptions:&#xD;&#xA;	///  - Average block initialization is assumed to be `10%`.&#xD;&#xA;	///  - `Operational` transactions have reserved allowance (`1.0 - normal_ratio`)&#xD;&#xA;	pub fn with_sensible_defaults(expected_block_weight: Weight, normal_ratio: Perbill) -&gt; Self {&#xD;&#xA;		let normal_weight = normal_ratio * expected_block_weight;&#xD;&#xA;		Self::builder()&#xD;&#xA;			.for_class(DispatchClass::Normal, |weights| {&#xD;&#xA;				weights.max_total = normal_weight.into();&#xD;&#xA;			})&#xD;&#xA;			.for_class(DispatchClass::Operational, |weights| {&#xD;&#xA;				weights.max_total = expected_block_weight.into();&#xD;&#xA;				weights.reserved = (expected_block_weight - normal_weight).into();&#xD;&#xA;			})&#xD;&#xA;			.avg_block_initialization(Perbill::from_percent(10))&#xD;&#xA;			.build()&#xD;&#xA;			.expect(&quot;Sensible defaults are tested to be valid; qed&quot;)&#xD;&#xA;```&#xD;&#xA;I have 3 functions which has `0` weights, but they only gives warnings&#xD;&#xA;```&#xD;&#xA;2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9&#xD;&#xA;2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0xfa66b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x2df7 - &lt;unknown&gt;!core::panicking::panic_fmt::h6d1629d4208ae76c&#xD;&#xA;    2: 0x3198 - &lt;unknown&gt;!core::result::unwrap_failed::h8ef12658cee03bf1&#xD;&#xA;    3: 0xe0dc - &lt;unknown&gt;!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d&#xD;&#xA;    4: 0x70937 - &lt;unknown&gt;!&lt;pallet_scheduler::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnInitialize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_initialize::h4b32587c5fd765a6&#xD;&#xA;    5: 0x91420 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hffb3eafa82bbd60b&#xD;&#xA;    6: 0xa66d5 - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue ? or is there any guidance around this ?&#xD;&#xA;&#xD;&#xA;[![Screemshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iMz6Y.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="34822" PostHistoryTypeId="5" PostId="8848" RevisionGUID="fa5f7e08-56d8-4f44-abec-fce16c089240" CreationDate="2023-06-12T01:24:09.227" UserId="1950" Comment="added 669 characters in body" Text="I have a running chain which was on `polkadot-v0.9.30` and updated all the libraries on to `polkadot-v0.9.42`&#xD;&#xA;&#xD;&#xA;Havent received any errors when uploading but after updating got the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The error originates from &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Create a sensible default weights system given only expected maximal block weight and the&#xD;&#xA;	/// ratio that `Normal` extrinsics should occupy.&#xD;&#xA;	///&#xD;&#xA;	/// Assumptions:&#xD;&#xA;	///  - Average block initialization is assumed to be `10%`.&#xD;&#xA;	///  - `Operational` transactions have reserved allowance (`1.0 - normal_ratio`)&#xD;&#xA;	pub fn with_sensible_defaults(expected_block_weight: Weight, normal_ratio: Perbill) -&gt; Self {&#xD;&#xA;		let normal_weight = normal_ratio * expected_block_weight;&#xD;&#xA;		Self::builder()&#xD;&#xA;			.for_class(DispatchClass::Normal, |weights| {&#xD;&#xA;				weights.max_total = normal_weight.into();&#xD;&#xA;			})&#xD;&#xA;			.for_class(DispatchClass::Operational, |weights| {&#xD;&#xA;				weights.max_total = expected_block_weight.into();&#xD;&#xA;				weights.reserved = (expected_block_weight - normal_weight).into();&#xD;&#xA;			})&#xD;&#xA;			.avg_block_initialization(Perbill::from_percent(10))&#xD;&#xA;			.build()&#xD;&#xA;			.expect(&quot;Sensible defaults are tested to be valid; qed&quot;)&#xD;&#xA;```&#xD;&#xA;I have 3 functions which has `0` weights, but they only gives warnings&#xD;&#xA;```&#xD;&#xA;2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9&#xD;&#xA;2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0xfa66b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x2df7 - &lt;unknown&gt;!core::panicking::panic_fmt::h6d1629d4208ae76c&#xD;&#xA;    2: 0x3198 - &lt;unknown&gt;!core::result::unwrap_failed::h8ef12658cee03bf1&#xD;&#xA;    3: 0xe0dc - &lt;unknown&gt;!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d&#xD;&#xA;    4: 0x70937 - &lt;unknown&gt;!&lt;pallet_scheduler::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnInitialize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_initialize::h4b32587c5fd765a6&#xD;&#xA;    5: 0x91420 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hffb3eafa82bbd60b&#xD;&#xA;    6: 0xa66d5 - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue ? or is there any guidance around this ?&#xD;&#xA;&#xD;&#xA;[![Screemshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iMz6Y.jpg&#xD;&#xA;&#xD;&#xA;Changes made for version updates&#xD;&#xA; * sp_consensus_grandpa and sc_consensus_grandpa&#xD;&#xA; * removed `#[pallet::generate_store(pub(super) trait Store)]` since its no longer supporting&#xD;&#xA; * Added #[pallet::call_index()]&#xD;&#xA; * Changed `fn create_verifiable_credential() -&gt; Weight {&#xD;&#xA;		Weight::from_ref_time(10_000_000_u64)` to `fn revoke_did_document() -&gt; Weight {&#xD;&#xA;		Weight::from_parts(10_000_000_u64, 1600)&#xD;&#xA;	}`&#xD;&#xA;    &#xD;&#xA; * In runtime/build.rs changed to &#xD;&#xA; ```&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	{&#xD;&#xA;		substrate_wasm_builder::WasmBuilder::new()&#xD;&#xA;			.with_current_project()&#xD;&#xA;			.export_heap_base()&#xD;&#xA;			.import_memory()&#xD;&#xA;			.build();&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;Those were the some of significant changes" ContentLicense="CC BY-SA 4.0" />
  <row Id="34823" PostHistoryTypeId="5" PostId="8848" RevisionGUID="8de4d208-a546-458d-b109-44c6328948c4" CreationDate="2023-06-12T02:57:27.237" UserId="1950" Comment="deleted 69 characters in body" Text="I have a running chain which was on `polkadot-v0.9.30` and updated all the libraries on to `polkadot-v0.9.42`&#xD;&#xA;&#xD;&#xA;Havent received any errors when uploading but after updating got the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The error originates from &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Create a sensible default weights system given only expected maximal block weight and the&#xD;&#xA;	/// ratio that `Normal` extrinsics should occupy.&#xD;&#xA;	///&#xD;&#xA;	/// Assumptions:&#xD;&#xA;	///  - Average block initialization is assumed to be `10%`.&#xD;&#xA;	///  - `Operational` transactions have reserved allowance (`1.0 - normal_ratio`)&#xD;&#xA;	pub fn with_sensible_defaults(expected_block_weight: Weight, normal_ratio: Perbill) -&gt; Self {&#xD;&#xA;		let normal_weight = normal_ratio * expected_block_weight;&#xD;&#xA;		Self::builder()&#xD;&#xA;			.for_class(DispatchClass::Normal, |weights| {&#xD;&#xA;				weights.max_total = normal_weight.into();&#xD;&#xA;			})&#xD;&#xA;			.for_class(DispatchClass::Operational, |weights| {&#xD;&#xA;				weights.max_total = expected_block_weight.into();&#xD;&#xA;				weights.reserved = (expected_block_weight - normal_weight).into();&#xD;&#xA;			})&#xD;&#xA;			.avg_block_initialization(Perbill::from_percent(10))&#xD;&#xA;			.build()&#xD;&#xA;			.expect(&quot;Sensible defaults are tested to be valid; qed&quot;)&#xD;&#xA;```&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9&#xD;&#xA;2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0xfa66b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x2df7 - &lt;unknown&gt;!core::panicking::panic_fmt::h6d1629d4208ae76c&#xD;&#xA;    2: 0x3198 - &lt;unknown&gt;!core::result::unwrap_failed::h8ef12658cee03bf1&#xD;&#xA;    3: 0xe0dc - &lt;unknown&gt;!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d&#xD;&#xA;    4: 0x70937 - &lt;unknown&gt;!&lt;pallet_scheduler::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnInitialize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_initialize::h4b32587c5fd765a6&#xD;&#xA;    5: 0x91420 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hffb3eafa82bbd60b&#xD;&#xA;    6: 0xa66d5 - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue ? or is there any guidance around this ?&#xD;&#xA;&#xD;&#xA;[![Screemshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iMz6Y.jpg&#xD;&#xA;&#xD;&#xA;Changes made for version updates&#xD;&#xA; * sp_consensus_grandpa and sc_consensus_grandpa&#xD;&#xA; * removed `#[pallet::generate_store(pub(super) trait Store)]` since its no longer supporting&#xD;&#xA; * Added #[pallet::call_index()]&#xD;&#xA; * Changed `fn create_verifiable_credential() -&gt; Weight {&#xD;&#xA;		Weight::from_ref_time(10_000_000_u64)` to `fn revoke_did_document() -&gt; Weight {&#xD;&#xA;		Weight::from_parts(10_000_000_u64, 1600)&#xD;&#xA;	}`&#xD;&#xA;    &#xD;&#xA; * In runtime/build.rs changed to &#xD;&#xA; ```&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	{&#xD;&#xA;		substrate_wasm_builder::WasmBuilder::new()&#xD;&#xA;			.with_current_project()&#xD;&#xA;			.export_heap_base()&#xD;&#xA;			.import_memory()&#xD;&#xA;			.build();&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;Those were the some of significant changes" ContentLicense="CC BY-SA 4.0" />
  <row Id="34824" PostHistoryTypeId="5" PostId="8848" RevisionGUID="4d910a4d-a0bc-49a1-875e-08ed2b09b968" CreationDate="2023-06-12T05:11:40.883" UserId="1950" Comment="added 119 characters in body" Text="I have a running chain which was on `polkadot-v0.9.30` and updated all the libraries on to `polkadot-v0.9.42`&#xD;&#xA;&#xD;&#xA;Havent received any errors when uploading but after updating got the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The error originates from &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Create a sensible default weights system given only expected maximal block weight and the&#xD;&#xA;	/// ratio that `Normal` extrinsics should occupy.&#xD;&#xA;	///&#xD;&#xA;	/// Assumptions:&#xD;&#xA;	///  - Average block initialization is assumed to be `10%`.&#xD;&#xA;	///  - `Operational` transactions have reserved allowance (`1.0 - normal_ratio`)&#xD;&#xA;	pub fn with_sensible_defaults(expected_block_weight: Weight, normal_ratio: Perbill) -&gt; Self {&#xD;&#xA;		let normal_weight = normal_ratio * expected_block_weight;&#xD;&#xA;		Self::builder()&#xD;&#xA;			.for_class(DispatchClass::Normal, |weights| {&#xD;&#xA;				weights.max_total = normal_weight.into();&#xD;&#xA;			})&#xD;&#xA;			.for_class(DispatchClass::Operational, |weights| {&#xD;&#xA;				weights.max_total = expected_block_weight.into();&#xD;&#xA;				weights.reserved = (expected_block_weight - normal_weight).into();&#xD;&#xA;			})&#xD;&#xA;			.avg_block_initialization(Perbill::from_percent(10))&#xD;&#xA;			.build()&#xD;&#xA;			.expect(&quot;Sensible defaults are tested to be valid; qed&quot;)&#xD;&#xA;```&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9&#xD;&#xA;2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0xfa66b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x2df7 - &lt;unknown&gt;!core::panicking::panic_fmt::h6d1629d4208ae76c&#xD;&#xA;    2: 0x3198 - &lt;unknown&gt;!core::result::unwrap_failed::h8ef12658cee03bf1&#xD;&#xA;    3: 0xe0dc - &lt;unknown&gt;!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d&#xD;&#xA;    4: 0x70937 - &lt;unknown&gt;!&lt;pallet_scheduler::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnInitialize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_initialize::h4b32587c5fd765a6&#xD;&#xA;    5: 0x91420 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hffb3eafa82bbd60b&#xD;&#xA;    6: 0xa66d5 - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue ? or is there any guidance around this ?&#xD;&#xA;&#xD;&#xA;[![Screemshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iMz6Y.jpg&#xD;&#xA;&#xD;&#xA;Changes made for version updates&#xD;&#xA; * sp_consensus_grandpa and sc_consensus_grandpa&#xD;&#xA; * removed `#[pallet::generate_store(pub(super) trait Store)]` since its no longer supporting&#xD;&#xA; * Added #[pallet::call_index()]&#xD;&#xA; * Changed `fn create_verifiable_credential() -&gt; Weight {&#xD;&#xA;		Weight::from_ref_time(10_000_000_u64)` to `fn revoke_did_document() -&gt; Weight {&#xD;&#xA;		Weight::from_parts(10_000_000_u64, 1600)&#xD;&#xA;	}`&#xD;&#xA;    &#xD;&#xA; * In runtime/build.rs changed to &#xD;&#xA; ```&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	{&#xD;&#xA;		substrate_wasm_builder::WasmBuilder::new()&#xD;&#xA;			.with_current_project()&#xD;&#xA;			.export_heap_base()&#xD;&#xA;			.import_memory()&#xD;&#xA;			.build();&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;Those were the some of significant changes&#xD;&#xA;&#xD;&#xA;Did not crash the process, update went smoothly , the error message keeps popping up and blocks are not finalising " ContentLicense="CC BY-SA 4.0" />
  <row Id="34825" PostHistoryTypeId="50" PostId="4794" RevisionGUID="c42e13c7-c64b-490b-af0c-d42991e885d5" CreationDate="2023-06-12T06:03:30.453" UserId="-1" />
  <row Id="34826" PostHistoryTypeId="5" PostId="8845" RevisionGUID="1207abda-63fd-4728-b734-eb0e10b94571" CreationDate="2023-06-12T06:14:42.730" UserId="2281" Comment="added 4 characters in body" Text="I used the example `Flipper`, and changed the code like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn flip(&amp;mut self) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            self.value = !self.value;&#xD;&#xA;            return Err(Error::InsufficientAllowance);&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I deployed the `contract` on chain, the function will not change the state `value`.&#xD;&#xA;&#xD;&#xA;If I run `cargo test`, the state will be changed." ContentLicense="CC BY-SA 4.0" />
  <row Id="34827" PostHistoryTypeId="50" PostId="6706" RevisionGUID="8f35b82b-a9ed-4d84-8036-515d696af393" CreationDate="2023-06-12T07:05:05.613" UserId="-1" />
  <row Id="34828" PostHistoryTypeId="2" PostId="8849" RevisionGUID="5ac7fda4-fa2e-4ea6-81e7-2b738bf7e0cd" CreationDate="2023-06-12T07:39:48.807" UserId="2551" Text="It is the problem with Rust version. When I use 1.69.0, it works well." ContentLicense="CC BY-SA 4.0" />
  <row Id="34830" PostHistoryTypeId="2" PostId="8850" RevisionGUID="27652193-1833-4383-a112-66143dca487b" CreationDate="2023-06-12T07:42:46.843" UserId="4320" Text="I am working on substrate and trying to benchmark my node. I'm sending unsigned extrinsics to the pool and implemented the `ValidateUnsigned` trait where I add priority, longevity, provide and require tags. The benchmark launches about 100k extrinsics, using the `author_submitExtrinsic` endpoint. While sending these extrinsics, I check the status of the pool by querying the `author_pendingExtrinsics` endpoint. &#xD;&#xA;&#xD;&#xA;After about 14k transactions have entered the pool, the amount of extrinsics stagnates, with sometimes ~100 extra extrinsics entering. Also looking at the extrinsic data, it looks like even after 4-5 blocks, although transactions are being executed (I see extrinsics being added to blocks in the logs), it seems like no extrinsics have been removed from the pool and I start getting nonce errors (which confirmes that they have been executed but are now being reexecuted?). &#xD;&#xA;&#xD;&#xA;What I tried so far:&#xD;&#xA;- confirming that sending a lower amount of extrinsics (10k) allows them to be processed correctly and that they are removed from the pool&#xD;&#xA;- replacing my implementation of the ValidateUnsigned yields the same result&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34832" PostHistoryTypeId="1" PostId="8850" RevisionGUID="27652193-1833-4383-a112-66143dca487b" CreationDate="2023-06-12T07:42:46.843" UserId="4320" Text="Pool overloading in benchmark" ContentLicense="CC BY-SA 4.0" />
  <row Id="34833" PostHistoryTypeId="3" PostId="8850" RevisionGUID="27652193-1833-4383-a112-66143dca487b" CreationDate="2023-06-12T07:42:46.843" UserId="4320" Text="|extrinsic|transaction-pool|tx-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34834" PostHistoryTypeId="2" PostId="8851" RevisionGUID="e407d7fa-7b5d-402f-a561-9c8cddd03e38" CreationDate="2023-06-12T08:15:42.617" UserId="3241" Text="I have been following the public documentation of polkadot API to deploy contract: https://polkadot.js.org/docs/api-contract/start/code&#xD;&#xA;&#xD;&#xA;but I'm getting error `Uncaught (in promise) TypeError: code.tx.new is not a function`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;here is my script:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;import { CodePromise, ContractPromise } from &quot;@polkadot/api-contract&quot;;&#xD;&#xA;import { Keyring } from &quot;@polkadot/keyring&quot;;&#xD;&#xA;&#xD;&#xA;export const deployContract= async (wasm,abi,providerURL =&quot;wss://rococo-contracts-rpc.polkadot.io&quot;,endowment=123456789,gasLimit=5000000n)=&gt;{&#xD;&#xA;    if(!wasm || !abi) {alert('wasm or abi not provided!'); return;}&#xD;&#xA;&#xD;&#xA;    const provider = new WsProvider(providerURL);&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;    const code = new CodePromise(api, abi, wasm);&#xD;&#xA;    const keyring = new Keyring({ type: &quot;sr25519&quot; });&#xD;&#xA;    const dataJsonAccount = {THIS_IS_JUST_PLACEHOLDER} &#xD;&#xA;    const tx = code.tx.new({gasLimit,storageDepositLimit:null})&#xD;&#xA;    let address;&#xD;&#xA;    const account = keyring.addFromJson(dataJsonAccount);&#xD;&#xA;    account.decodePkcs8('THIS_IS_JUST_PLACEHOLDER');&#xD;&#xA;&#xD;&#xA;    try{&#xD;&#xA;      const unsub = await tx.signAndSend(account, ({ contract, status }) =&gt; {&#xD;&#xA;        if (status.isInBlock || status.isFinalized) {&#xD;&#xA;          address = contract.address.toString();&#xD;&#xA;          console.info(address)&#xD;&#xA;          unsub();&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  catch(e){&#xD;&#xA;    console.info(e);&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Later I tried to print what is `code.tx` and I got result that there is a only `construct` function.&#xD;&#xA;&#xD;&#xA;so I used that one like this:&#xD;&#xA;```&#xD;&#xA;          const tx = code.tx.construct({gasLimit,storageDepositLimit:null})&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and it kinda worked, but I'm never getting my contract deployed for some reason.&#xD;&#xA;I'm getting this error:&#xD;&#xA;```&#xD;&#xA;          TypeError: Cannot read properties of undefined (reading 'address')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which means contract here: &#xD;&#xA;```&#xD;&#xA;          address = contract.address.toString();&#xD;&#xA;```&#xD;&#xA;is never deployed.&#xD;&#xA;&#xD;&#xA;I also tried using Contracts-UI to deploy contract manually(by just uploading &lt;contract-name&gt;.contract, and it works.&#xD;&#xA;&#xD;&#xA;What I'm missing, what I'm doing wrong?  " ContentLicense="CC BY-SA 4.0" />
  <row Id="34836" PostHistoryTypeId="1" PostId="8851" RevisionGUID="e407d7fa-7b5d-402f-a561-9c8cddd03e38" CreationDate="2023-06-12T08:15:42.617" UserId="3241" Text="Problem deploying smart contract on rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="34837" PostHistoryTypeId="3" PostId="8851" RevisionGUID="e407d7fa-7b5d-402f-a561-9c8cddd03e38" CreationDate="2023-06-12T08:15:42.617" UserId="3241" Text="|polkadot-js|smart-contract|transactions|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34838" PostHistoryTypeId="2" PostId="8852" RevisionGUID="565ecbe3-cbfc-4d77-8c3c-32b4483e5458" CreationDate="2023-06-12T08:45:59.430" UserId="4051" Text="I am trying to create a `SignerPayloadJSON` from an encoded partial extrinsic in polkadotjs. The partial extrinsic has the following hex representation&#xD;&#xA;```&#xD;&#xA;0x00001448656c6c6f000000c22400001600000081bf2e35e70dbc700b2b3a189a6ced2a3f4d098aaf08dbdd63089bc714de2c2e81bf2e35e70dbc700b2b3a189a6ced2a3f4d098aaf08dbdd63089bc714de2c2e&#xD;&#xA;```&#xD;&#xA;and decodes to the following data when decoded by the polkadot js browser app:&#xD;&#xA;```&#xD;&#xA;callIndex&#xD;&#xA;	0000&#xD;&#xA;remark&#xD;&#xA;	14 48656c6c6f&#xD;&#xA;era&#xD;&#xA;	00 00&#xD;&#xA;nonce&#xD;&#xA;	00&#xD;&#xA;tip&#xD;&#xA;	00&#xD;&#xA;specVersion&#xD;&#xA;	c2240000&#xD;&#xA;transactionVersion&#xD;&#xA;	16000000&#xD;&#xA;genesisHash&#xD;&#xA;	81bf2e35e70dbc700b2b3a189a6ced2a3f4d098aaf08dbdd63089bc714de2c2e&#xD;&#xA;blockHash&#xD;&#xA;	81bf2e35e70dbc700b2b3a189a6ced2a3f4d098aaf08dbdd63089bc714de2c2e&#xD;&#xA;```&#xD;&#xA;We create an api connection to a local node like so:&#xD;&#xA;```&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;    provider: new WsProvider(&quot;ws://127.0.0.1:9944&quot;),&#xD;&#xA;  });&#xD;&#xA;await api.isReady;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can we create the `SignerPayloadJSON` object, given that we have access to the ss58 formatted address of the user? We tried to first decode the data into an ExtrinsicPayload like so: &#xD;&#xA;```&#xD;&#xA;let extrinsicPayload = api.createType(&quot;ExtrinsicPayload&quot;, payload_hex, {&#xD;&#xA;    version: 4,&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;But this `extrinsicPayload` object then has an empty field `method: &quot;&quot;` which seems odd.&#xD;&#xA;&#xD;&#xA;I tried to craft this payload manually like so:&#xD;&#xA;```&#xD;&#xA;let hand_crafted_signer_payload = {&#xD;&#xA;    address: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;    blockHash:&#xD;&#xA;      &quot;0x559440460afd0b06684f4cecced86acdb4a278e0b77fa26b0eb67531523d6f34&quot;,&#xD;&#xA;    blockNumber: &quot;0x02&quot;,&#xD;&#xA;    era: &quot;0x0000&quot;,&#xD;&#xA;    genesisHash:&#xD;&#xA;      &quot;0x81bf2e35e70dbc700b2b3a189a6ced2a3f4d098aaf08dbdd63089bc714de2c2e&quot;,&#xD;&#xA;    method: &quot;0x00001448656c6c6f&quot;,&#xD;&#xA;    nonce: &quot;0x00&quot;,&#xD;&#xA;    specVersion: &quot;0xc2240000&quot;,&#xD;&#xA;    tip: &quot;0x00&quot;,&#xD;&#xA;    transactionVersion: &quot;0x16000000&quot;,&#xD;&#xA;    signedExtensions: [],&#xD;&#xA;    version: 4,&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;But submitting it to the extension to be signed like this:&#xD;&#xA;```&#xD;&#xA;const injector = await dapp.web3FromSource(&quot;polkadot-js&quot;);&#xD;&#xA;let { signature } = await injector?.signer?.signPayload(hand_crafted_signer_payload);&#xD;&#xA;```&#xD;&#xA;always led to an error by the extension:&#xD;&#xA;&#xD;&#xA;[![Error image][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hoH67.png&#xD;&#xA;&#xD;&#xA;**TLDR:** How can we create a valid `SignerPayloadJSON` from a hex encoded payload and a given ss58 address, such that we can give it for signing to the polkadotjs extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34840" PostHistoryTypeId="1" PostId="8852" RevisionGUID="565ecbe3-cbfc-4d77-8c3c-32b4483e5458" CreationDate="2023-06-12T08:45:59.430" UserId="4051" Text="Creating SignerPayload for PolkadotJS Extenstion: Unsupported extrinsic payload version 0" ContentLicense="CC BY-SA 4.0" />
  <row Id="34841" PostHistoryTypeId="3" PostId="8852" RevisionGUID="565ecbe3-cbfc-4d77-8c3c-32b4483e5458" CreationDate="2023-06-12T08:45:59.430" UserId="4051" Text="|polkadot-js|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34842" PostHistoryTypeId="2" PostId="8853" RevisionGUID="56edf8cb-d88a-4e04-ad26-9488d53d050b" CreationDate="2023-06-12T08:50:14.757" UserId="2762" Text="I am doing sudo call using this example [Making sudo call using subxt][1]:&#xD;&#xA;```&#xD;&#xA;let found_event = api&#xD;&#xA;        .tx()&#xD;&#xA;        .sign_and_submit_then_watch_default(&amp;tx, &amp;bob)&#xD;&#xA;        .await?&#xD;&#xA;        .wait_for_finalized_success()&#xD;&#xA;        .await?&#xD;&#xA;        .has::&lt;rococo::sudo::events::Sudid&gt;()?;&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;I want to throw an error if the extrinsic fails, like in this example someone without sudo privileges (Bob) tries to do the call.&#xD;&#xA;&#xD;&#xA;How is the best way using `subxt` to submit an extrinsic to catch and parse the error?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/632/making-sudo-call-using-subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="34844" PostHistoryTypeId="1" PostId="8853" RevisionGUID="56edf8cb-d88a-4e04-ad26-9488d53d050b" CreationDate="2023-06-12T08:50:14.757" UserId="2762" Text="Subxt - Catch Extrinsic Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="34845" PostHistoryTypeId="3" PostId="8853" RevisionGUID="56edf8cb-d88a-4e04-ad26-9488d53d050b" CreationDate="2023-06-12T08:50:14.757" UserId="2762" Text="|subxt|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34846" PostHistoryTypeId="2" PostId="8854" RevisionGUID="4da3a046-0169-490a-a880-db6d596f2a51" CreationDate="2023-06-12T09:05:00.190" UserId="2762" Text="This error looks an issue with versions, you are trying to run an example very old. You can try to fix it, see for example this previous StackExchange question similar to your error: [type annotations needed in libp2p-noise][1].&#xD;&#xA;&#xD;&#xA;But I would suggest to check the Substrate documentation: [Add offchain workers][2] where you have the [Offchain Worker Example Pallet][3].&#xD;&#xA;&#xD;&#xA;There is also a PR open in Substrate with a new example: [refactor Offchain Worker examples][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2442/type-annotations-needed-in-libp2p-noise&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/build-application-logic/add-offchain-workers/&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/master/frame/examples/offchain-worker&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/pull/14280" ContentLicense="CC BY-SA 4.0" />
  <row Id="34848" PostHistoryTypeId="2" PostId="8855" RevisionGUID="aff8c99b-7b43-4daa-b740-6cac408447db" CreationDate="2023-06-12T09:26:53.253" UserId="3241" Text="Actually, this: https://substrate.stackexchange.com/questions/6401/smart-contract-function-call-error solved my question.&#xD;&#xA;&#xD;&#xA;It seems that Polkadot documentation is not up to date." ContentLicense="CC BY-SA 4.0" />
  <row Id="34850" PostHistoryTypeId="2" PostId="8856" RevisionGUID="6bd5abda-f10a-457b-963d-3700143427be" CreationDate="2023-06-12T09:51:25.070" UserId="2762" Text="I'd suggest you take a look into this previous StackExchange question with a list of resources about voting on Substrate: [How to implement voting functionality?][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/8132/how-to-implement-voting-functionality" ContentLicense="CC BY-SA 4.0" />
  <row Id="34852" PostHistoryTypeId="6" PostId="8853" RevisionGUID="2e62e915-b960-475f-8d78-3bf0e82e4c7e" CreationDate="2023-06-12T09:51:45.063" UserId="116" Comment="This is more a question about how to handle errors in rust than a sudo pallet question" Text="|rust|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34853" PostHistoryTypeId="24" PostId="8853" RevisionGUID="2e62e915-b960-475f-8d78-3bf0e82e4c7e" CreationDate="2023-06-12T09:51:45.063" Comment="Proposed by 116 approved by 2762 edit id of 450" ContentLicense="CC BY-SA 4.0" />
  <row Id="34855" PostHistoryTypeId="5" PostId="8839" RevisionGUID="e7805b63-8580-4464-9057-ba83c5382c35" CreationDate="2023-06-12T10:30:14.190" UserId="2862" Comment="added 10 characters in body" Text="Why Host set storage information directly and not through the Runtime api? (e.g. Grandpa Authorities, Accounts, Code, Heap_Pages)&#xD;&#xA;Is this an expected behavior or legacy? " ContentLicense="CC BY-SA 4.0" />
  <row Id="34856" PostHistoryTypeId="5" PostId="8839" RevisionGUID="4e6b75cb-5e54-462a-ae6f-19c1dd5de1c2" CreationDate="2023-06-12T10:33:41.503" UserId="354" Comment="added 10 characters in body" Text="Why Host set storage information directly and not through the `Runtime api`? (e.g. `Grandpa Authorities`, `Accounts`, `Code`, `Heap_Pages`)&#xD;&#xA;Is this an expected behavior or legacy? " ContentLicense="CC BY-SA 4.0" />
  <row Id="34858" PostHistoryTypeId="2" PostId="8857" RevisionGUID="dd7f40e8-993a-461f-8852-fdc235bbaa94" CreationDate="2023-06-12T10:48:43.423" UserId="474" Text="I had a bit of a dig to see how this might be done, and it turns out that Polkadot.js does a lot of work under the hood here. I hope somebody might be able to refine this, but I had a go at transcribing the PJS code into Subxt pseudocode to give a general idea of what it appears to look like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// fetch current block details we need:&#xD;&#xA;let current_block = api.blocks().at_latest().await?;&#xD;&#xA;let digest_logs = &amp;current_block.header().digest.logs;&#xD;&#xA;&#xD;&#xA;// fetch list of validators for current block:&#xD;&#xA;let validators = api.storage()&#xD;&#xA;    .at_block(current_hash)&#xD;&#xA;    .fetch(runtime::storage().session().validators());&#xD;&#xA;    .await?;&#xD;&#xA;&#xD;&#xA;// Find first PreRuntime, Consensus and Seal digest item in logs:&#xD;&#xA;let pre_runtime = digest_logs.iter().find(|item| matches!(item, DigestItem::PreRuntime(..)));&#xD;&#xA;let consensus = digest_logs.iter().find(|item| matches!(item, DigestItem::Consensus(..)));&#xD;&#xA;let seal = digest_logs.iter().find(|item| matches!(item, DigestItem::Seal(..)));&#xD;&#xA;&#xD;&#xA;// In this order, try to extract author from the logs:&#xD;&#xA;if let Some(DigestItem::PreRuntime(engine, data)) = consensus {&#xD;&#xA;    extract_author(engine, data, &amp;validators)&#xD;&#xA;} else if let Some(DigestItem::Consensus(engine, data)) = consensus {&#xD;&#xA;    extract_author(engine, data, &amp;validators)&#xD;&#xA;} else if let Some(DigestItem::Seal(engine, data)) = consensus {&#xD;&#xA;    extract_author(engine, data, &amp;validators)&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Extracting author looks something like this (I'm just trying to transcribe the PJS code here):&#xD;&#xA;fn extract_author(engine: ConsensusEngineId, data: Vec&lt;u8&gt;, validators) -&gt; Option&lt;subxt::utils::MultiAddress&gt; {&#xD;&#xA;    if !validators.is_empty() {&#xD;&#xA;        if is_aura(engine) {&#xD;&#xA;            let d = sp_consensus::aura::digest::PreDigest::decode(&amp;mut &amp;*data).unwrap();&#xD;&#xA;            let n: u64 = *d.slot();&#xD;&#xA;            subxt::utils::MultiAddress::Address32(validators[n % validators.len()].try_into().unwrap())&#xD;&#xA;        } else if is_babe(engine) {&#xD;&#xA;            // Not sure; for PreRuntime looks like you can decode a u64 directly to &#xD;&#xA;            // access validator in list. Maybe that's all that matters?&#xD;&#xA;            let d = u64::decode(&amp;mut &amp;*data).unwrap();&#xD;&#xA;            subxt::utils::MultiAddress::Address32(validators[d].try_into().unwrap())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // For pow &amp; Moonbeam, the bytes are the actual author&#xD;&#xA;    if is_pow(engine) || data.len() == 20 {&#xD;&#xA;        subxt::utils::MultiAddress::Address20(data.try_into().unwrap())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    None&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn is_aura(engine: ConsensusEngineId) -&gt; bool {&#xD;&#xA;    engine == [b'a', b'u', b'r', b'a']&#xD;&#xA;}&#xD;&#xA;fn is_babe(engine: ConsensusEngineId) -&gt; bool {&#xD;&#xA;    engine == [b'B', b'A', b'B', b'E']&#xD;&#xA;}&#xD;&#xA;fn is_pow(engine: ConsensusEngineId) -&gt; bool {&#xD;&#xA;    engine == [b'p', b'o', b'w', b'_']&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'd have to properly check and test the above, no guarantees on its accuracy, but hopefully it gives a starting point.&#xD;&#xA;&#xD;&#xA;As you can see, it varies depending on the consensus mechanism and chain. Even the block header itself is generic in Subxt and can be changed entirely.&#xD;&#xA;&#xD;&#xA;Search for `function createHeaderExtended` in the https://github.com/polkadot-js/api repo (I checked the code out locally for this) to follow the logic that PJS uses :) " ContentLicense="CC BY-SA 4.0" />
  <row Id="34860" PostHistoryTypeId="2" PostId="8858" RevisionGUID="9b123171-a81f-4dfa-a774-16e69ade4ea0" CreationDate="2023-06-12T10:59:20.267" UserId="474" Text="A `DispatchError` is returned if the extrinsic failed; this ends up being returned from the above as a `subxt::Error::Runtime(dispatch_error)` after `wait_for_finalized_success`, so you can match on it there and inspect the error to see what went wrong, eg like this pseudocode:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn submit_foo() -&gt; Result&lt;bool, subxt::Error&gt; {&#xD;&#xA;    api&#xD;&#xA;        .tx()&#xD;&#xA;        .sign_and_submit_then_watch_default(&amp;tx, &amp;bob)&#xD;&#xA;        .await?&#xD;&#xA;        .wait_for_finalized_success()&#xD;&#xA;        .await?&#xD;&#xA;        .has::&lt;rococo::sudo::events::Sudid&gt;()?&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;if let Err(subxt::Error::Runtime(dispatch_err)) = submit_foo() {&#xD;&#xA;    eprintln!(&quot;{dispatch_err}&quot;); &#xD;&#xA;    // ...or match on it to check for specific variants,&#xD;&#xA;    // DispatchError::Module(module_err) for instance lets&#xD;&#xA;    // you access and work with pallet specific errors.&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34862" PostHistoryTypeId="2" PostId="8859" RevisionGUID="ed245712-6380-47ce-85f7-7b3d673d570a" CreationDate="2023-06-12T12:10:53.110" UserId="2372" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/tpuW4.png&#xD;&#xA;&#xD;&#xA;I've added pallet-nft and pallet-uniques in the Relay Chain. All the things are working fine but when i'm signing the transaction in the `pallet-uniques` fn `create(collection,admin)`, it is showing me this error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34864" PostHistoryTypeId="1" PostId="8859" RevisionGUID="ed245712-6380-47ce-85f7-7b3d673d570a" CreationDate="2023-06-12T12:10:53.110" UserId="2372" Text="1002: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable`" ContentLicense="CC BY-SA 4.0" />
  <row Id="34865" PostHistoryTypeId="3" PostId="8859" RevisionGUID="ed245712-6380-47ce-85f7-7b3d673d570a" CreationDate="2023-06-12T12:10:53.110" UserId="2372" Text="|substrate-node-template|runtime|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34866" PostHistoryTypeId="5" PostId="8850" RevisionGUID="ce87f211-e598-4491-b868-94e59d154c13" CreationDate="2023-06-12T12:23:07.423" UserId="2281" Comment="added 6 characters in body" Text="I am working on `substrate` and trying to benchmark my node. I'm sending `unsigned extrinsics` to the pool and implemented the `ValidateUnsigned` trait where I add priority, longevity, provide and require tags. The benchmark launches about 100k extrinsics, using the `author_submitExtrinsic` endpoint. While sending these extrinsics, I check the status of the pool by querying the `author_pendingExtrinsics` endpoint. &#xD;&#xA;&#xD;&#xA;After about `14k transactions` have entered the pool, the amount of extrinsics stagnates, with sometimes ~100 extra extrinsics entering. Also looking at the extrinsic data, it looks like even after 4-5 blocks, although transactions are being executed (I see extrinsics being added to blocks in the logs), it seems like no extrinsics have been removed from the pool and I start getting nonce errors (which confirmes that they have been executed but are now being reexecuted?). &#xD;&#xA;&#xD;&#xA;What I tried so far:&#xD;&#xA;- confirming that sending a lower amount of extrinsics (10k) allows them to be processed correctly and that they are removed from the pool&#xD;&#xA;- replacing my implementation of the ValidateUnsigned yields the same result&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34867" PostHistoryTypeId="5" PostId="8851" RevisionGUID="59dfbe54-55fc-493c-bdb7-bb11866c9b82" CreationDate="2023-06-12T12:27:05.157" UserId="2281" Comment="added 6 characters in body" Text="I have been following the public documentation of polkadot API to deploy contract: https://polkadot.js.org/docs/api-contract/start/code&#xD;&#xA;&#xD;&#xA;but I'm getting error `Uncaught (in promise) TypeError: code.tx.new is not a function`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;here is my script:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;import { CodePromise, ContractPromise } from &quot;@polkadot/api-contract&quot;;&#xD;&#xA;import { Keyring } from &quot;@polkadot/keyring&quot;;&#xD;&#xA;&#xD;&#xA;export const deployContract= async (wasm,abi,providerURL =&quot;wss://rococo-contracts-rpc.polkadot.io&quot;,endowment=123456789,gasLimit=5000000n)=&gt;{&#xD;&#xA;    if(!wasm || !abi) {alert('wasm or abi not provided!'); return;}&#xD;&#xA;&#xD;&#xA;    const provider = new WsProvider(providerURL);&#xD;&#xA;    const api = await ApiPromise.create({ provider });&#xD;&#xA;    const code = new CodePromise(api, abi, wasm);&#xD;&#xA;    const keyring = new Keyring({ type: &quot;sr25519&quot; });&#xD;&#xA;    const dataJsonAccount = {THIS_IS_JUST_PLACEHOLDER} &#xD;&#xA;    const tx = code.tx.new({gasLimit,storageDepositLimit:null})&#xD;&#xA;    let address;&#xD;&#xA;    const account = keyring.addFromJson(dataJsonAccount);&#xD;&#xA;    account.decodePkcs8('THIS_IS_JUST_PLACEHOLDER');&#xD;&#xA;&#xD;&#xA;    try{&#xD;&#xA;      const unsub = await tx.signAndSend(account, ({ contract, status }) =&gt; {&#xD;&#xA;        if (status.isInBlock || status.isFinalized) {&#xD;&#xA;          address = contract.address.toString();&#xD;&#xA;          console.info(address)&#xD;&#xA;          unsub();&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  catch(e){&#xD;&#xA;    console.info(e);&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Later I tried to print what is `code.tx` and I got result that there is a only `construct` function.&#xD;&#xA;&#xD;&#xA;so I used that one like this:&#xD;&#xA;```sh&#xD;&#xA;          const tx = code.tx.construct({gasLimit,storageDepositLimit:null})&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and it kinda worked, but I'm never getting my contract deployed for some reason.&#xD;&#xA;I'm getting this error:&#xD;&#xA;```sh&#xD;&#xA;          TypeError: Cannot read properties of undefined (reading 'address')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which means contract here: &#xD;&#xA;```&#xD;&#xA;          address = contract.address.toString();&#xD;&#xA;```&#xD;&#xA;is never deployed.&#xD;&#xA;&#xD;&#xA;I also tried using Contracts-UI to deploy contract manually(by just uploading &lt;contract-name&gt;.contract, and it works.&#xD;&#xA;&#xD;&#xA;What I'm missing, what I'm doing wrong?  " ContentLicense="CC BY-SA 4.0" />
  <row Id="34868" PostHistoryTypeId="5" PostId="8457" RevisionGUID="eaa60030-485a-43e6-8c44-1a8ed1d3e1b0" CreationDate="2023-06-12T12:29:13.003" UserId="2281" Comment="added 10 characters in body" Text="Do you know if it is possible to create a substrate pallet that implements a specific `function/message` that when it is sent within TX other `validators` pick it up and can respond to it? &#xD;&#xA;&#xD;&#xA;Something like a `ping protocol` on the chain. &#xD;&#xA;&#xD;&#xA;We send TX with `PING VALIDATOR` X and `VALIDATOR` X can respond with PONG. &#xD;&#xA;&#xD;&#xA;Thank you for any replies. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34869" PostHistoryTypeId="6" PostId="8836" RevisionGUID="b8aa82e3-0e3d-4c08-a275-9bd204386788" CreationDate="2023-06-12T13:39:27.287" UserId="2862" Comment="edited tags" Text="|polkadot|pallet|runtime|specs|architecture|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34870" PostHistoryTypeId="2" PostId="8860" RevisionGUID="eb5c1c41-14ba-4237-8c4c-7d746c296c35" CreationDate="2023-06-12T14:16:46.103" UserId="4320" Text="So I can't be 100% sure of the issue, my guess is that my `validate_unsigned` logic was too heavy, causing the pool to spend too much time validating and preventing it from pruning executed transactions. Reduced the workload on the `validate_unsigned` and moved most of this heavy logic to `pre_dispatch`, might not be a perfect solution, if anyone has some better idea would love to hear it !" ContentLicense="CC BY-SA 4.0" />
  <row Id="34872" PostHistoryTypeId="2" PostId="8861" RevisionGUID="c7c3d27c-c4e4-4b66-8b57-dbc43e9f9c3a" CreationDate="2023-06-12T15:05:12.380" UserId="496" Text="Im getting the following error when compiling a rust ink! 4.0;&#xD;&#xA;```ERROR: Loading of original wasm failed```&#xD;&#xA;&#xD;&#xA;It's started happening to me after i ```rustup update``` and now my rustc versions are:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;stable-aarch64-apple-darwin unchanged - rustc 1.70.0 (90c541806 2023-05-31)&#xD;&#xA;nightly-aarch64-apple-darwin unchanged - rustc 1.72.0-nightly (37998ab50 2023-06-11)&#xD;&#xA;1.64-aarch64-apple-darwin unchanged - rustc 1.64.0 (a55dd71d5 2022-09-19)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thank you very much :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="34874" PostHistoryTypeId="1" PostId="8861" RevisionGUID="c7c3d27c-c4e4-4b66-8b57-dbc43e9f9c3a" CreationDate="2023-06-12T15:05:12.380" UserId="496" Text="&quot;ERROR: Loading of original wasm failed&quot; after upgrading rustup" ContentLicense="CC BY-SA 4.0" />
  <row Id="34875" PostHistoryTypeId="3" PostId="8861" RevisionGUID="c7c3d27c-c4e4-4b66-8b57-dbc43e9f9c3a" CreationDate="2023-06-12T15:05:12.380" UserId="496" Text="|ink|rust|smart-contract|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34876" PostHistoryTypeId="2" PostId="8862" RevisionGUID="60b8d907-7818-45eb-bc9b-1303fd0394cc" CreationDate="2023-06-12T15:45:51.977" UserId="3098" Text="It is a known issues: https://github.com/paritytech/cargo-contract/issues/1139&#xD;&#xA;caused by https://github.com/rust-lang/rust/issues/109807" ContentLicense="CC BY-SA 4.0" />
  <row Id="34880" PostHistoryTypeId="52" PostId="8851" RevisionGUID="c2e5a823-1578-46b2-b0a1-4bc3f06676a2" CreationDate="2023-06-12T16:21:34.047" />
  <row Id="34881" PostHistoryTypeId="52" PostId="8853" RevisionGUID="1e6e262d-7bd5-45e9-84f7-c28807539688" CreationDate="2023-06-12T16:54:54.197" />
  <row Id="34882" PostHistoryTypeId="50" PostId="6710" RevisionGUID="d9e77baa-d6ea-4f06-8131-4128fbec4464" CreationDate="2023-06-12T20:07:25.897" UserId="-1" />
  <row Id="34883" PostHistoryTypeId="2" PostId="8864" RevisionGUID="03d4841d-68f5-4c05-998f-0bd0bf2a277e" CreationDate="2023-06-12T21:30:51.067" UserId="4322" Text="I need to only keep state for the last few blocks, but I don't want to wait for the full sync of the node, is there a way to do that faster than by using `--sync=full`? Because it seems like all the current modes either download the full history or just the latest state." ContentLicense="CC BY-SA 4.0" />
  <row Id="34885" PostHistoryTypeId="1" PostId="8864" RevisionGUID="03d4841d-68f5-4c05-998f-0bd0bf2a277e" CreationDate="2023-06-12T21:30:51.067" UserId="4322" Text="What's the fastest way to sync a node only keeping full state for the last N blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34886" PostHistoryTypeId="3" PostId="8864" RevisionGUID="03d4841d-68f5-4c05-998f-0bd0bf2a277e" CreationDate="2023-06-12T21:30:51.067" UserId="4322" Text="|sync|state|pruning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34887" PostHistoryTypeId="2" PostId="8865" RevisionGUID="c226484e-1744-498e-8ea9-76fed958ac4b" CreationDate="2023-06-12T23:41:09.757" UserId="341" Text="My overall goal is to build a generic extrinsic builder, just like the extrinsic tab from polkadot-js/apps. This code is very old and very hard to decipher unfortunately and I couldn't find any doc for this.&#xD;&#xA;&#xD;&#xA;The UI lists all the pallets and their methods. The next step is to show all the arguments for each method, with JS/TS types corresponding to the Rust types.&#xD;&#xA;&#xD;&#xA;I'm taking a very specific type as an example and we can go from there.&#xD;&#xA;&#xD;&#xA;The `democracy.vote` call takes the following arguments&#xD;&#xA; - `{ name: &quot;refIndex&quot;, type: &quot;Compact&lt;u32&gt;&quot;, typeName: &quot;ReferendumIndex&quot; }`  &#xD;&#xA; this translates to an integer. &#xD;&#xA; - `{ name: &quot;vote&quot;, type: &quot;PalletDemocracyVoteAccountVote&quot;, typeName: &quot;AccountVote&quot; }`  &#xD;&#xA;this is more complex and is the reason why I post here.&#xD;&#xA;&#xD;&#xA;Here is how I get this:&#xD;&#xA;```js&#xD;&#xA;import { getTypeDef } from '@polkadot/types/create'&#xD;&#xA;&#xD;&#xA;const arg = api.tx[&quot;democracy&quot;][&quot;vote&quot;].meta.args[1]&#xD;&#xA;const argTypeDef = getTypeDef(arg.type)&#xD;&#xA;console.log('argTypeDef', argTypeDef)&#xD;&#xA;// { name: &quot;vote&quot;, type: &quot;PalletDemocracyVoteAccountVote&quot;, typeName: &quot;AccountVote&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, under the hood, this type `AccountVote` is an enum as seen in the [rust doc][1]. It has other nested types such as `Vote` and `Conviction`&#xD;&#xA;&#xD;&#xA;How would you go about coming from the `AccountVote` to have something incrementally translated into JS, which is what I could pass the the api to construct this call?&#xD;&#xA;```js&#xD;&#xA;{&#xD;&#xA;    Standard {&#xD;&#xA;        vote: {&#xD;&#xA;          aye: boolean,&#xD;&#xA;          conviction: string&#xD;&#xA;        },&#xD;&#xA;        balance: string,&#xD;&#xA;    },&#xD;&#xA;    Split {&#xD;&#xA;        aye: string,&#xD;&#xA;        nay: string,&#xD;&#xA;    },&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The closest I came is to create an instance of this type, but it initializes it with the defaults so we're missing part of the information.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const instance = argTypeDef.type &amp;&amp; api.registry.createType(argTypeDef.type)&#xD;&#xA;console.log(instance.toHuman())&#xD;&#xA;// {&#xD;&#xA;//  &quot;Standard&quot;: {&#xD;&#xA;//    &quot;vote&quot;: {&#xD;&#xA;//      &quot;conviction&quot;: &quot;None&quot;,&#xD;&#xA;//      &quot;vote&quot;: &quot;Nay&quot;&#xD;&#xA;//    },&#xD;&#xA;//    &quot;balance&quot;: &quot;0&quot;&#xD;&#xA;//  }&#xD;&#xA;//}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/pallet-democracy/latest/pallet_democracy/enum.AccountVote.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="34889" PostHistoryTypeId="1" PostId="8865" RevisionGUID="c226484e-1744-498e-8ea9-76fed958ac4b" CreationDate="2023-06-12T23:41:09.757" UserId="341" Text="Decompose complex types in JS" ContentLicense="CC BY-SA 4.0" />
  <row Id="34890" PostHistoryTypeId="3" PostId="8865" RevisionGUID="c226484e-1744-498e-8ea9-76fed958ac4b" CreationDate="2023-06-12T23:41:09.757" UserId="341" Text="|polkadot-js|extrinsic|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34891" PostHistoryTypeId="2" PostId="8866" RevisionGUID="88510c00-d48f-4f4d-88fe-a0c64ae89864" CreationDate="2023-06-13T03:23:55.310" UserId="116" Text="**Alternative 3: smaller batches.**&#xD;&#xA;&#xD;&#xA;Figure out how much you are able to fit in a `utiliy.batch()` call, it depends on the weights of the inner transactions. When I did something similar on my chain I was able to fit 20-50 transactions into one batch.&#xD;&#xA;&#xD;&#xA; 1. Enable mortality, set lifetime to 16 blocks, so you know a batch which did not end up on chain does not suddenly come back alive.&#xD;&#xA; 2. Pace the submissions to not exhaust the transaction pool. Submit three to four blocks worth of extrinsics at once, to be able to fill all the block's capacity&#xD;&#xA; 3. wait until the first few batch extrinsics are completed, then submit a few more.&#xD;&#xA;&#xD;&#xA;If some of the internal calls have dependencies it is possible put `utility.batch()`, `utility.bactchAll()` and `utility.forceBatch()` into each other to achieve failable atomic transaction without stopping the correct ones." ContentLicense="CC BY-SA 4.0" />
  <row Id="34893" PostHistoryTypeId="50" PostId="4853" RevisionGUID="1a0ebed6-f87a-4725-b2be-1d27c15ebf38" CreationDate="2023-06-13T04:04:25.597" UserId="-1" />
  <row Id="34894" PostHistoryTypeId="2" PostId="8867" RevisionGUID="b6ad1078-03e1-4fbf-9b53-1acc61e0b3e6" CreationDate="2023-06-13T04:43:28.627" UserId="83" Text="In an ink! contract I need to use `Self.env().block_number()` to get the current block number to compare it with a `block_number_guessed` value that I provide when instantiating the contract and check that it is less than the current block number.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl OracleContract {&#xD;&#xA;    #[ink(constructor)]&#xD;&#xA;    pub fn new(&#xD;&#xA;        id_market: MarketGuessId,&#xD;&#xA;        block_number_guessed: BlockNumber,&#xD;&#xA;    ) -&gt; Self {&#xD;&#xA;        let mut instance = Self::default();&#xD;&#xA;        let caller = instance.env().caller();&#xD;&#xA;        let block_number_current = Self::env().block_number();&#xD;&#xA;        assert!(&#xD;&#xA;            block_number_current &gt; block_number_guessed,&#xD;&#xA;            &quot;block number when guessing occurred must be before the current block number&quot;&#xD;&#xA;        );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have written a test but I don't know how to provide a fake value of `Self.env().block_number()` in the unit tests to pretend that the current block number is greater than the fake value of `100` that I have used for `block_number_guessed` so that the assertion in the implementation when the contract is instantiated is satisfied and the test passes.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests {&#xD;&#xA;    use super::*;&#xD;&#xA;&#xD;&#xA;    use crate::oracle_contract::OracleContract;&#xD;&#xA;    use std::str::FromStr;&#xD;&#xA;&#xD;&#xA;    /// We test a simple use case of our contract.&#xD;&#xA;    #[ink::test]&#xD;&#xA;    fn it_works() {&#xD;&#xA;        let id_market: Vec&lt;u8&gt; = String::from_utf8(&quot;my_id&quot;.into()).unwrap().into();&#xD;&#xA;        let block_number_guessed = 100;&#xD;&#xA;        let mut oracle_contract = OracleContract::new(&#xD;&#xA;            id_market.clone(),&#xD;&#xA;            block_number_guessed.clone(),&#xD;&#xA;        );&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried to use a custom environment `CustomEnvironment` and a custom chain extension `CustomBlocknumberExtension` like mentioned [here][1] as shown in the below code snippet, but I don't know how to write the implementation of `fake_current_block_number`, and I don't know if this is even a valid way to solve the issue.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests {&#xD;&#xA;    use super::*;&#xD;&#xA;&#xD;&#xA;    use crate::oracle_contract::OracleContract;&#xD;&#xA;    use std::str::FromStr;&#xD;&#xA;&#xD;&#xA;    use ink::env::{&#xD;&#xA;        Environment,&#xD;&#xA;        DefaultEnvironment,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    #[ink::chain_extension]&#xD;&#xA;    pub trait CustomBlocknumberExtension {&#xD;&#xA;        type ErrorCode = CustomBlocknumberError;&#xD;&#xA;&#xD;&#xA;        #[ink(extension = 0x1111)]&#xD;&#xA;        fn fake_current_block_number() -&gt; BlockNumber&gt;;&#xD;&#xA;    }    &#xD;&#xA;&#xD;&#xA;    /// An environment using default ink environment types&#xD;&#xA;    #[derive(Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum CustomEnvironment {}&#xD;&#xA;&#xD;&#xA;    impl Environment for CustomEnvironment {&#xD;&#xA;        const MAX_EVENT_TOPICS: usize =&#xD;&#xA;            &lt;ink::env::DefaultEnvironment as Environment&gt;::MAX_EVENT_TOPICS;&#xD;&#xA;&#xD;&#xA;        type AccountId = &lt;ink::env::DefaultEnvironment as Environment&gt;::AccountId;&#xD;&#xA;        type Balance = &lt;ink::env::DefaultEnvironment as Environment&gt;::Balance;&#xD;&#xA;        type Hash = &lt;ink::env::DefaultEnvironment as Environment&gt;::Hash;&#xD;&#xA;        type Timestamp = &lt;ink::env::DefaultEnvironment as Environment&gt;::Timestamp;&#xD;&#xA;        type BlockNumber = &lt;ink::env::DefaultEnvironment as Environment&gt;::BlockNumber;&#xD;&#xA;&#xD;&#xA;        type ChainExtension = crate::CustomBlocknumberExtension;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /// We test a simple use case of our contract.&#xD;&#xA;    #[ink::test(env = crate::CustomEnvironment)]&#xD;&#xA;    fn it_works() {&#xD;&#xA;        assert!(self.env().extension().fake_current_block_number(), 200);&#xD;&#xA;        ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I looked through all the [ink! examples][2] repository, but I can't find any that stub the ink! environment in their tests.&#xD;&#xA;&#xD;&#xA;How should we stub the ink! environment function `Self.env().block_number()` &#xD;&#xA;so we can provide a fake value for the current block number in our unit tests?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/macros-attributes/chain-extension#example-environment&#xD;&#xA;  [2]: https://github.com/paritytech/ink-examples" ContentLicense="CC BY-SA 4.0" />
  <row Id="34896" PostHistoryTypeId="1" PostId="8867" RevisionGUID="b6ad1078-03e1-4fbf-9b53-1acc61e0b3e6" CreationDate="2023-06-13T04:43:28.627" UserId="83" Text="How to stub ink! contract environment to produce fake values for use in tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34897" PostHistoryTypeId="3" PostId="8867" RevisionGUID="b6ad1078-03e1-4fbf-9b53-1acc61e0b3e6" CreationDate="2023-06-13T04:43:28.627" UserId="83" Text="|ink|testing|unit-tests|blocknumber|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34898" PostHistoryTypeId="5" PostId="8867" RevisionGUID="8fc10893-328f-414d-976a-c1ef4267d509" CreationDate="2023-06-13T05:00:09.680" UserId="83" Comment="remove fromstr since not using in this example" Text="In an ink! contract I need to use `Self.env().block_number()` to get the current block number to compare it with a `block_number_guessed` value that I provide when instantiating the contract and check that it is less than the current block number.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl MyContract {&#xD;&#xA;    #[ink(constructor)]&#xD;&#xA;    pub fn new(&#xD;&#xA;        block_number_guessed: BlockNumber,&#xD;&#xA;    ) -&gt; Self {&#xD;&#xA;        let mut instance = Self::default();&#xD;&#xA;        let block_number_current = Self::env().block_number();&#xD;&#xA;        assert!(&#xD;&#xA;            block_number_current &gt; block_number_guessed,&#xD;&#xA;            &quot;block number when guessing occurred must be before the current block number&quot;&#xD;&#xA;        );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have written a test but I don't know how to provide a fake value of `Self.env().block_number()` in the unit tests to pretend that the current block number is greater than the fake value of `100` that I have used for `block_number_guessed` so that the assertion in the implementation when the contract is instantiated is satisfied and the test passes.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests {&#xD;&#xA;    use super::*;&#xD;&#xA;&#xD;&#xA;    use crate::my_contract::MyContract;&#xD;&#xA;&#xD;&#xA;    /// We test a simple use case of our contract.&#xD;&#xA;    #[ink::test]&#xD;&#xA;    fn it_works() {&#xD;&#xA;        let block_number_guessed = 100;&#xD;&#xA;        let mut my_contract = MyContract::new(&#xD;&#xA;            block_number_guessed.clone(),&#xD;&#xA;        );&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried to use a custom environment `CustomEnvironment` and a custom chain extension `CustomBlocknumberExtension` like mentioned [here][1] as shown in the below code snippet, but I don't know how to write the implementation of `fake_current_block_number`, and I don't know if this is even a valid way to solve the issue.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests {&#xD;&#xA;    use super::*;&#xD;&#xA;&#xD;&#xA;    use crate::my_contract::MyContract;&#xD;&#xA;&#xD;&#xA;    use ink::env::{&#xD;&#xA;        Environment,&#xD;&#xA;        DefaultEnvironment,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    #[ink::chain_extension]&#xD;&#xA;    pub trait CustomBlocknumberExtension {&#xD;&#xA;        type ErrorCode = CustomBlocknumberError;&#xD;&#xA;&#xD;&#xA;        #[ink(extension = 0x1111)]&#xD;&#xA;        fn fake_current_block_number() -&gt; BlockNumber&gt;;&#xD;&#xA;    }    &#xD;&#xA;&#xD;&#xA;    /// An environment using default ink environment types&#xD;&#xA;    #[derive(Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum CustomEnvironment {}&#xD;&#xA;&#xD;&#xA;    impl Environment for CustomEnvironment {&#xD;&#xA;        const MAX_EVENT_TOPICS: usize =&#xD;&#xA;            &lt;ink::env::DefaultEnvironment as Environment&gt;::MAX_EVENT_TOPICS;&#xD;&#xA;&#xD;&#xA;        type AccountId = &lt;ink::env::DefaultEnvironment as Environment&gt;::AccountId;&#xD;&#xA;        type Balance = &lt;ink::env::DefaultEnvironment as Environment&gt;::Balance;&#xD;&#xA;        type Hash = &lt;ink::env::DefaultEnvironment as Environment&gt;::Hash;&#xD;&#xA;        type Timestamp = &lt;ink::env::DefaultEnvironment as Environment&gt;::Timestamp;&#xD;&#xA;        type BlockNumber = &lt;ink::env::DefaultEnvironment as Environment&gt;::BlockNumber;&#xD;&#xA;&#xD;&#xA;        type ChainExtension = crate::CustomBlocknumberExtension;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /// We test a simple use case of our contract.&#xD;&#xA;    #[ink::test(env = crate::CustomEnvironment)]&#xD;&#xA;    fn it_allows_use_of_stubbed_blocknumber() {&#xD;&#xA;        assert!(self.env().extension().fake_current_block_number(), 200);&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I looked through all the [ink! examples][2] repository, but I can't find any that stub the ink! environment in their tests.&#xD;&#xA;&#xD;&#xA;How should we stub the ink! environment function `Self.env().block_number()` &#xD;&#xA;so we can provide a fake value for the current block number in our unit tests?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/macros-attributes/chain-extension#example-environment&#xD;&#xA;  [2]: https://github.com/paritytech/ink-examples" ContentLicense="CC BY-SA 4.0" />
  <row Id="34899" PostHistoryTypeId="5" PostId="8867" RevisionGUID="ed34cee5-90d5-4b10-bbdc-3d351ec0a4ef" CreationDate="2023-06-13T05:16:28.167" UserId="83" Comment="try to make it make more sense" Text="In an ink! contract I need to use `Self.env().block_number()` to get the current block number to compare it with a `block_number_guessed` value that I provide when instantiating the contract and check that it is less than the current block number.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl MyContract {&#xD;&#xA;    #[ink(constructor)]&#xD;&#xA;    pub fn new(&#xD;&#xA;        block_number_guessed: BlockNumber,&#xD;&#xA;    ) -&gt; Self {&#xD;&#xA;        let mut instance = Self::default();&#xD;&#xA;        let block_number_current = Self::env().block_number();&#xD;&#xA;        assert!(&#xD;&#xA;            block_number_current &gt; block_number_guessed,&#xD;&#xA;            &quot;block number when guessing occurred must be before the current block number&quot;&#xD;&#xA;        );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have written a test but I don't know how to provide a fake value of `Self.env().block_number()` in the unit tests to pretend that the current block number is greater than the fake value of `100` that I have used for `block_number_guessed` so that the assertion in the implementation when the contract is instantiated is satisfied and the test passes.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests {&#xD;&#xA;    use super::*;&#xD;&#xA;&#xD;&#xA;    use crate::my_contract::MyContract;&#xD;&#xA;&#xD;&#xA;    /// We test a simple use case of our contract.&#xD;&#xA;    #[ink::test]&#xD;&#xA;    fn it_works() {&#xD;&#xA;        let block_number_guessed = 100;&#xD;&#xA;        let mut my_contract = MyContract::new(&#xD;&#xA;            block_number_guessed.clone(),&#xD;&#xA;        );&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried to use a custom environment `CustomEnvironment` and a custom chain extension `CustomBlocknumberExtension` like mentioned [here][1] as shown in the below code snippet, but I don't know how to write the implementation of `fake_current_block_number`, and I don't know if this is even a valid way to solve the issue.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(test)]&#xD;&#xA;mod tests {&#xD;&#xA;    use super::*;&#xD;&#xA;&#xD;&#xA;    use crate::my_contract::MyContract;&#xD;&#xA;&#xD;&#xA;    use ink::env::{&#xD;&#xA;        Environment,&#xD;&#xA;        DefaultEnvironment,&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    #[ink::chain_extension]&#xD;&#xA;    pub trait CustomBlocknumberExtension {&#xD;&#xA;        type ErrorCode = CustomBlocknumberError;&#xD;&#xA;&#xD;&#xA;        #[ink(extension = 0x1111)]&#xD;&#xA;        fn fake_current_block_number() -&gt; BlockNumber&gt;;&#xD;&#xA;    }    &#xD;&#xA;&#xD;&#xA;    /// An environment using default ink environment types&#xD;&#xA;    #[derive(Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum CustomEnvironment {}&#xD;&#xA;&#xD;&#xA;    impl Environment for CustomEnvironment {&#xD;&#xA;        const MAX_EVENT_TOPICS: usize =&#xD;&#xA;            &lt;ink::env::DefaultEnvironment as Environment&gt;::MAX_EVENT_TOPICS;&#xD;&#xA;&#xD;&#xA;        type AccountId = &lt;ink::env::DefaultEnvironment as Environment&gt;::AccountId;&#xD;&#xA;        type Balance = &lt;ink::env::DefaultEnvironment as Environment&gt;::Balance;&#xD;&#xA;        type Hash = &lt;ink::env::DefaultEnvironment as Environment&gt;::Hash;&#xD;&#xA;        type Timestamp = &lt;ink::env::DefaultEnvironment as Environment&gt;::Timestamp;&#xD;&#xA;        type BlockNumber = &lt;ink::env::DefaultEnvironment as Environment&gt;::BlockNumber;&#xD;&#xA;&#xD;&#xA;        type ChainExtension = crate::CustomBlocknumberExtension;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    /// We test a simple use case of our contract.&#xD;&#xA;    #[ink::test(env = crate::CustomEnvironment)]&#xD;&#xA;    fn it_allows_use_of_stubbed_blocknumber() {&#xD;&#xA;        assert_eq!(env().extension().fake_current_block_number(), 200);&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I looked through all the [ink! examples][2] repository, but I can't find any that stub the ink! environment in their tests.&#xD;&#xA;&#xD;&#xA;How should we stub the ink! environment function `Self.env().block_number()` &#xD;&#xA;so we can provide a fake value for the current block number in our unit tests?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/macros-attributes/chain-extension#example-environment&#xD;&#xA;  [2]: https://github.com/paritytech/ink-examples" ContentLicense="CC BY-SA 4.0" />
  <row Id="34900" PostHistoryTypeId="5" PostId="8864" RevisionGUID="5b7c9bbc-48d6-4b15-97b1-72890be112e1" CreationDate="2023-06-13T05:24:08.907" UserId="2281" Comment="added 4 characters in body" Text="I need to only keep `state` for the last few blocks, but I don't want to wait for the full sync of the node, is there a way to do that faster than by using `--sync=full`? Because it seems like all the current modes either download the `full history` or just the latest state." ContentLicense="CC BY-SA 4.0" />
  <row Id="34901" PostHistoryTypeId="5" PostId="8859" RevisionGUID="b9a0d172-4b8f-4fb6-95c7-b85f813f2d73" CreationDate="2023-06-13T06:25:21.730" UserId="2281" Comment="added 4 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/tpuW4.png&#xD;&#xA;&#xD;&#xA;I've added `pallet-nft` and `pallet-uniques` in the Relay Chain. All the things are working fine but when i'm signing the transaction in the `pallet-uniques` fn `create(collection,admin)`, it is showing me this error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34902" PostHistoryTypeId="5" PostId="8473" RevisionGUID="99cf4460-4992-4b68-9086-a3a09418129a" CreationDate="2023-06-13T06:26:47.033" UserId="2281" Comment="added 12 characters in body" Text="`Cumulus` ties the `parachain` and the `relaychain` together, allowing to exchange essential information necessary for the block production of the `parachain`. Since a parachain collator must build a block (currently) within a limited time frame after the latest `relaychain` block, it is dependent on the speed of the `relaychain` node that provides that data within the Cumulus context.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Assuming that both nodes live on the same server, how much do the relaychain node hardware requirements dictate the minimum parachain node hardware requirements?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34903" PostHistoryTypeId="6" PostId="8852" RevisionGUID="3b64f6a9-d7b8-4f40-913c-20e47f125f62" CreationDate="2023-06-13T07:44:29.340" UserId="474" Comment="add signing tag" Text="|polkadot-js|polkadot-js-extension|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34904" PostHistoryTypeId="24" PostId="8852" RevisionGUID="3b64f6a9-d7b8-4f40-913c-20e47f125f62" CreationDate="2023-06-13T07:44:29.340" Comment="Proposed by 474 approved by 2281, 4051 edit id of 449" ContentLicense="CC BY-SA 4.0" />
  <row Id="34905" PostHistoryTypeId="5" PostId="8804" RevisionGUID="9803df23-118c-4dab-93c4-4db6e99161b8" CreationDate="2023-06-13T10:24:26.650" UserId="298" Comment="deleted 7 characters in body" Text="We are building a custom UI for chains containing a specific custom pallet and rpc module.&#xD;&#xA;&#xD;&#xA;The custom UI is similar to a polkadot-js clone we built, but much simpler. In our simple custom UI, we are having some issues with making rpc calls to the custom rpc server and then displaying the info, and being roadblocked by type decoration errors. &#xD;&#xA;&#xD;&#xA;### The issue&#xD;&#xA;We want to make an RPC call such as `api.rpc.superSig.listMembers` from a live testnet [chain][1], which contains an RPC module called Supersig rpc, which connects to supersig pallet, and display the information on screen, without errors. &#xD;&#xA;&#xD;&#xA;`rpc: wss://soupcan1.jelliedowl.com`&#xD;&#xA;&#xD;&#xA;**Working version**&#xD;&#xA;here you can see a working version: [Soupcan - polkadot-js clone](https://apps.decentration.org/?rpc=wss%3A%2F%2Fsoupcan1.jelliedowl.com#/supersig/dashboard) that succesfully connects with the rpc and displays information in a table. &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;So we can safely assume there is not a problem with the chain, pallet or rpc server. Link to the code we creates the Dashboard Table and rpc is [here](https://github.com/decentration/apps/blob/dd13433868abb2246766ff3b1494e3cdce8c3e79/packages/page-supersig/src/Supersig/Dashboard)&#xD;&#xA;&#xD;&#xA;Types we need to use to decorate the RPC are [here](https://github.com/decentration/apps/blob/fa92f1963259010d043d8f9561ee33b3ddc2754d/packages/apps-config/src/api/spec/kabocha.ts) we also have [supersig custom types npm package](https://github.com/decentration/supersig-types/tree/master)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The rpc in our pallet is [here](https://github.com/decentration/pallet_supersig/blob/master/rpc/src/lib.rs)&#xD;&#xA;&#xD;&#xA;### Errors&#xD;&#xA;The problem is we are getting some errors when creating a custom UI:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RPC-CORE: listMembers(supersig_id: AccountId): Vec&lt;(AccountId, Role)&gt;:: 2: Supersig error: Module, ModuleError { index: 42, error: [1, 0, 0, 0], message: None }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&quot;42&quot; means that the pallet number is 42 meaning supersig pallet.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;VEC: Unable to decode on index 0 Tuple: failed on 1:: DoNotConstruct: Cannot construct unknown type Role&#xD;&#xA;```&#xD;&#xA; [![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Here is a link to the [branch(https://github.com/decentration/subverse-frontend/tree/issue-status) of our custom UI.&#xD;&#xA;&#xD;&#xA;**Replicate Issue**&#xD;&#xA;&#xD;&#xA;steps to replicate the above listMembers error:&#xD;&#xA;&#xD;&#xA; - clone [branch](https://github.com/decentration/subverse-frontend/tree/issue-status)&#xD;&#xA; - `npm install`&#xD;&#xA; - `npm start`&#xD;&#xA; - Connect to Soupcan node (soupcan1.jelliedowl.com) in the top left of the screen (make sure not to connect to soupcan2).&#xD;&#xA; - Go to Dashboard in the Sidebar. &#xD;&#xA; - Go to ./src/components/Dashboard/Dashboard.tsx to find the relevant code. &#xD;&#xA;&#xD;&#xA;How do you successfully display the listMembers information? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://apps.decentration.org/?rpc=wss%3A%2F%2Fsoupcan1.jelliedowl.com#/supersig/dashboard&#xD;&#xA;  [2]: https://i.stack.imgur.com/DrMHq.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/aABhh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34906" PostHistoryTypeId="5" PostId="2640" RevisionGUID="f072f5f1-7114-49c9-af73-c396f0a011a4" CreationDate="2023-06-13T10:38:12.050" UserId="2025" Comment="fix broken links" Text="In my opinion, what makes the implementation of Substrate's transaction pool unique is the concept of [Signed Extensions][1]. Developers can use the signed extensions to add any custom logic prior to including or dispatching a specific transaction/extrinsic in their Substrate based chains. You can refer to [this doc][2] to learn about what functions this trait exposes in order to do this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/transaction-format/#signed-extensions&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sp_runtime/traits/trait.SignedExtension.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="34907" PostHistoryTypeId="2" PostId="8868" RevisionGUID="3ce6d4bd-6475-465a-b432-415761fdf14c" CreationDate="2023-06-13T11:50:45.377" UserId="3136" Text="I'm trying to connect my `parachain` to a `relay-chain` locally via auction.&#xD;&#xA;I bid in the auction and set the auction ending period to 2 minutes,&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA; the bidding process is done but after bidding I got this error.&#xD;&#xA;[![enter image description here][2]][2] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sB0ES.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Cd30Y.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34909" PostHistoryTypeId="1" PostId="8868" RevisionGUID="3ce6d4bd-6475-465a-b432-415761fdf14c" CreationDate="2023-06-13T11:50:45.377" UserId="3136" Text="Getting error while biding in relaychain for adding my parachain into relay-chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="34910" PostHistoryTypeId="3" PostId="8868" RevisionGUID="3ce6d4bd-6475-465a-b432-415761fdf14c" CreationDate="2023-06-13T11:50:45.377" UserId="3136" Text="|polkadot|parachain|substrate-parachain-template|relay-chain|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34911" PostHistoryTypeId="5" PostId="8868" RevisionGUID="e721a24e-fb2e-44a8-b8db-bb5245b89962" CreationDate="2023-06-13T11:57:04.853" UserId="2281" Comment="added 28 characters in body" Text="I'm trying to connect my `parachain` to a `relay-chain` locally via `auction.`&#xD;&#xA;I bid in the `auction` and set the auction ending period to `2 minutes,`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;```&#xD;&#xA; The bidding process is done but after bidding I got this error.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sB0ES.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Cd30Y.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34912" PostHistoryTypeId="5" PostId="8804" RevisionGUID="17947859-c8cd-47ce-8fe4-9a9f9308db4f" CreationDate="2023-06-13T12:51:56.690" UserId="298" Comment="added 18 characters in body" Text="We are building a custom UI for chains containing a specific custom pallet and rpc module.&#xD;&#xA;&#xD;&#xA;The custom UI is similar to a polkadot-js clone we built, but much simpler. In our simple custom UI, we are having some issues with making rpc calls to the custom rpc server and then displaying the info, and being roadblocked by type decoration errors. &#xD;&#xA;&#xD;&#xA;### The issue&#xD;&#xA;We want to make an RPC call such as `api.rpc.superSig.listMembers` from a live testnet [chain][1], which contains an RPC module called Supersig rpc, which connects to supersig pallet, and display the information on screen, without errors. &#xD;&#xA;&#xD;&#xA;`rpc: wss://soupcan1.jelliedowl.com`&#xD;&#xA;&#xD;&#xA;**Working version**&#xD;&#xA;here you can see a working version: [Soupcan - polkadot-js clone](https://apps.decentration.org/?rpc=wss%3A%2F%2Fsoupcan1.jelliedowl.com#/supersig/dashboard) that succesfully connects with the rpc and displays information in a table. &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;So we can safely assume there is not a problem with the chain, pallet or rpc server. Link to the code we creates the Dashboard Table and rpc is [here](https://github.com/decentration/apps/blob/dd13433868abb2246766ff3b1494e3cdce8c3e79/packages/page-supersig/src/Supersig/Dashboard)&#xD;&#xA;&#xD;&#xA;Types we need to use to decorate the RPC are [here](https://github.com/decentration/apps/blob/fa92f1963259010d043d8f9561ee33b3ddc2754d/packages/apps-config/src/api/spec/kabocha.ts) we also have [supersig custom types npm package](https://github.com/decentration/supersig-types/tree/master)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The rpc in our pallet is [here](https://github.com/decentration/pallet_supersig/blob/master/rpc/src/lib.rs)&#xD;&#xA;&#xD;&#xA;### Errors&#xD;&#xA;The problem is we are getting some errors when creating a custom UI:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;RPC-CORE: listMembers(supersig_id: AccountId): Vec&lt;(AccountId, Role)&gt;:: 2: Supersig error: Module, ModuleError { index: 42, error: [1, 0, 0, 0], message: None }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&quot;42&quot; means that the pallet number is 42 meaning supersig pallet.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;VEC: Unable to decode on index 0 Tuple: failed on 1:: DoNotConstruct: Cannot construct unknown type Role&#xD;&#xA;```&#xD;&#xA; [![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Here is a link to the [branch(https://github.com/decentration/subverse-frontend/tree/issue-status) of our custom UI.&#xD;&#xA;&#xD;&#xA;**Replicate Issue**&#xD;&#xA;&#xD;&#xA;steps to replicate the above listMembers error:&#xD;&#xA;&#xD;&#xA; - clone [branch](https://github.com/decentration/subverse-frontend/tree/issue-status)&#xD;&#xA; - `npm install`&#xD;&#xA; - `npm start`&#xD;&#xA; - Connect to Soupcan node (soupcan1.jelliedowl.com) in the top left of the screen (make sure not to connect to soupcan2).&#xD;&#xA; - Go to Dashboard in the Sidebar. &#xD;&#xA; - Go to ./src/components/Dashboard/Dashboard.tsx to find the relevant code. &#xD;&#xA; - Check console&#xD;&#xA;&#xD;&#xA;How do you successfully display the listMembers information? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://apps.decentration.org/?rpc=wss%3A%2F%2Fsoupcan1.jelliedowl.com#/supersig/dashboard&#xD;&#xA;  [2]: https://i.stack.imgur.com/DrMHq.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/aABhh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34913" PostHistoryTypeId="2" PostId="8869" RevisionGUID="1060a39e-41c0-4bc7-bead-d9e1bf478ce9" CreationDate="2023-06-13T13:20:30.413" UserId="354" Text="I bump into [https://substrate.stackexchange.com/questions/8498/session-changes-on-reversion/8565#8565][1] question and tried out the solution given by @bkchr, there was no `unexpected epoch change` error after an epoch is skipped due to finalisation getting stopped. But the thing is after an epoch is skipped I was not able to perform any extrinsics.&#xD;&#xA;&#xD;&#xA;Steps I followed:&#xD;&#xA;  &#xD;&#xA; - Cloned the commit mentioned in above question [https://github.com/paritytech/substrate/blob/18b1fdcf984bcf87a81728e0622c5f9d33a0aa67/frame/babe/src/lib.rs#L588-L600][2]&#xD;&#xA; - Set the epoch time to 1 minute.&#xD;&#xA; - Built it and run it on dev mode and also made its private network&#xD;&#xA; - Stopped the finalization of chain so that block production time increases.&#xD;&#xA; - After the block production time is more than epoch time didn't get `unexpected epoch change` error but the blocks were still producing.&#xD;&#xA; - Than I try to start the finalization by executing `note_stalled` but the extrisinc was not completing.&#xD;&#xA; - Than I tried other extrisincs like balance transafer and they were also not working.&#xD;&#xA; - System extrinsics are working fine such as `heartbeat`, and `elections` I can see their events in new block.&#xD;&#xA;&#xD;&#xA;So from this my understanding is that even if the block generation does not stop the chain is still not working and we need to restart the chain from scratch, or maybe I am doing something wrong, can someone help me with this.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/8498/session-changes-on-reversion/8565#8565&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/18b1fdcf984bcf87a81728e0622c5f9d33a0aa67/frame/babe/src/lib.rs#L588-L600" ContentLicense="CC BY-SA 4.0" />
  <row Id="34915" PostHistoryTypeId="1" PostId="8869" RevisionGUID="1060a39e-41c0-4bc7-bead-d9e1bf478ce9" CreationDate="2023-06-13T13:20:30.413" UserId="354" Text="After skipping epoch, not able to perform any extrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="34916" PostHistoryTypeId="3" PostId="8869" RevisionGUID="1060a39e-41c0-4bc7-bead-d9e1bf478ce9" CreationDate="2023-06-13T13:20:30.413" UserId="354" Text="|substrate-node|session|epoch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34917" PostHistoryTypeId="2" PostId="8870" RevisionGUID="a053c4f4-5388-4c36-b853-485bab4bea4c" CreationDate="2023-06-13T13:40:51.370" UserId="3088" Text="As we know from [this doc][1], account get reaped when it's consumers/providers/sufficients (all of them) reference count decreased to 0. These counters described as:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  /// The number of other modules that currently depend on this account's existence. The account&#xD;&#xA;  /// cannot be reaped until this is zero.&#xD;&#xA;  pub consumers: RefCount,&#xD;&#xA;  /// The number of other modules that allow this account to exist. The account may not be reaped&#xD;&#xA;  /// until this and `sufficients` are both zero.&#xD;&#xA;  pub providers: RefCount,&#xD;&#xA;  /// The number of modules that allow this account to exist for their own purposes only. The&#xD;&#xA;  /// account may not be reaped until this and `providers` are both zero.&#xD;&#xA;  pub sufficients: RefCount,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Suppose that we have a pallet that has storage map `AccountId -&gt; SomeData`. And in this pallet we could increment some of the references counts mentioned above to keep account alive until we descrease this. Let's consider a case when we don't do this. The questions are the following:&#xD;&#xA;&#xD;&#xA; 1. Are there any differences between account that was reaped and then endowed again and account that was not reaped because we added a reference?&#xD;&#xA;&#xD;&#xA; 2. When we **really should** modify these counters in our pallets?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/account-data-structures/#account-reference-counters" ContentLicense="CC BY-SA 4.0" />
  <row Id="34919" PostHistoryTypeId="1" PostId="8870" RevisionGUID="a053c4f4-5388-4c36-b853-485bab4bea4c" CreationDate="2023-06-13T13:40:51.370" UserId="3088" Text="Are there any reasons to ensure account existence through incrementing account's references?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34920" PostHistoryTypeId="3" PostId="8870" RevisionGUID="a053c4f4-5388-4c36-b853-485bab4bea4c" CreationDate="2023-06-13T13:40:51.370" UserId="3088" Text="|pallet|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34921" PostHistoryTypeId="5" PostId="8841" RevisionGUID="fd9834ab-21aa-4e10-8399-84b29fa4ddaf" CreationDate="2023-06-13T14:28:03.713" UserId="4321" Comment="Added logs with -lafg=debug" Text="I am trying to spin up a small BABE PoS network of four nodes and not able to get GRANDPA to start. &#xD;&#xA;&#xD;&#xA;It's hard to know what exact pieces of information to provide, here are some notes.&#xD;&#xA;&#xD;&#xA;A few notes:&#xD;&#xA; - I am inserting the session keys immediately with the --alice, --bob, etc flags for testing, for now, and I can confirm the expected keys are set via RPC.&#xD;&#xA; - Blocks produce, authored by any validator running,but don't finalize. All the nodes are peered correctly.&#xD;&#xA; - In a previous configuration, I noted at least Alice could get finalization to start https://substrate.stackexchange.com/questions/844/grandpa-not-finalizing-with-2-of-3-nodes-on-network. Then I switched to four nodes due to that answer.&#xD;&#xA; - I note every node spits out the following grandpa log message endlessly&#xD;&#xA;```rs&#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Casting prevote for round 1    &#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Announcing block 0xb0d7…cad6 to peers which we voted on in round 1 in set 0    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Round 1: Got incoming message    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.18.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/10.0.0.143/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.17.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.23.0.1/tcp/30334    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/10.0.0.143/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.23.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.18.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.17.0.1/tcp/30335    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)&#xD;&#xA;```&#xD;&#xA;Here is an example of the response from the roundState RPC. Any of the nodes report three keys in missing prevotes, and four in missing precommits, though I don't understand what to do with that information.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;{&#xD;&#xA;  setId: 0&#xD;&#xA;  best: {&#xD;&#xA;    round: 1&#xD;&#xA;    totalWeight: 4&#xD;&#xA;    thresholdWeight: 3&#xD;&#xA;    prevotes: {&#xD;&#xA;      currentWeight: 1&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;    precommits: {&#xD;&#xA;      currentWeight: 0&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;        0x35476F4e6b66365764627843466E5064416E5959&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;  background: []&#xD;&#xA;}&#xD;&#xA; ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34922" PostHistoryTypeId="24" PostId="8841" RevisionGUID="fd9834ab-21aa-4e10-8399-84b29fa4ddaf" CreationDate="2023-06-13T14:28:03.713" Comment="Proposed by 4321 approved by 2281, 29 edit id of 452" ContentLicense="CC BY-SA 4.0" />
  <row Id="34923" PostHistoryTypeId="2" PostId="8871" RevisionGUID="7213356b-076e-4636-ba6c-d1cff5b81cec" CreationDate="2023-06-13T14:39:36.620" UserId="73" Text="You can only interact with the runtime/on-chain state by sending a transaction. This transaction can then change the on chain data." ContentLicense="CC BY-SA 4.0" />
  <row Id="34925" PostHistoryTypeId="5" PostId="6476" RevisionGUID="a38a9432-9912-4a82-b8a0-0a8f49438434" CreationDate="2023-06-13T15:02:22.217" UserId="116" Comment="Spelling dont -&gt; don't" Text="I don't think it is currently doable like you described.  &#xD;&#xA;You can abuse the `--in-peers` and `--out-peers` flags and set them to `0` to not sync your node.  &#xD;&#xA;Then you have to restart it once you want it to sync without the flags. Not quite what you asked for, but at least close." ContentLicense="CC BY-SA 4.0" />
  <row Id="34926" PostHistoryTypeId="24" PostId="6476" RevisionGUID="a38a9432-9912-4a82-b8a0-0a8f49438434" CreationDate="2023-06-13T15:02:22.217" Comment="Proposed by 116 approved by 2281, 94 edit id of 455" ContentLicense="CC BY-SA 4.0" />
  <row Id="34927" PostHistoryTypeId="2" PostId="8872" RevisionGUID="b5a23e29-bcc2-4337-adf1-d1eeda93717c" CreationDate="2023-06-13T15:06:09.210" UserId="94" Text="PolkadotJS offers a status indication for a transaction receipt that is called `isRetracted`.  &#xD;&#xA;What does it mean and when does it occur?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34929" PostHistoryTypeId="1" PostId="8872" RevisionGUID="b5a23e29-bcc2-4337-adf1-d1eeda93717c" CreationDate="2023-06-13T15:06:09.210" UserId="94" Text="When is a transaction `retracted`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34930" PostHistoryTypeId="3" PostId="8872" RevisionGUID="b5a23e29-bcc2-4337-adf1-d1eeda93717c" CreationDate="2023-06-13T15:06:09.210" UserId="94" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34931" PostHistoryTypeId="2" PostId="8873" RevisionGUID="abdd52b2-9da0-47b2-980a-55576a3ec938" CreationDate="2023-06-13T15:13:43.533" UserId="73" Text="A transaction can be in different [states][1]. The `retracted` state means that the transaction was included into a block `X`. This block `X` was seen as best block of the chain. At some later point there was another block `Y` imported as best block and this block `Y` is a fork of block `X`. So, the transaction pool sends the `retracted` event for all the transactions included in block `X` as they are not part of the best chain anymore. However, some of them are probably included in block `Y` and thus the transaction pool will send directly the `included` event for these transactions.&#xD;&#xA;&#xD;&#xA;TLDR: A transaction was included in the best chain and then there was a re-org to another chain that may doesn't include the transaction yet.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/5ee019610b9a163f10d97a8b04645db0a8b892ca/client/transaction-pool/api/src/lib.rs#L107-L133" ContentLicense="CC BY-SA 4.0" />
  <row Id="34933" PostHistoryTypeId="2" PostId="8874" RevisionGUID="7e94ffd1-dae2-4e93-a7bb-a46eebb8f86e" CreationDate="2023-06-13T15:25:51.277" UserId="3016" Text="Seems like the error is a runtime error&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34935" PostHistoryTypeId="5" PostId="8874" RevisionGUID="c1a015b6-7a93-43a7-8376-660dabf21247" CreationDate="2023-06-13T15:32:47.053" UserId="3016" Comment="added 1075 characters in body" Text="Seems like it's an issue with the runtime, not in front-end.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;//rpc/src/lib.rs&#xD;&#xA;fn list_members(&#xD;&#xA;	&amp;self,&#xD;&#xA;	supersig_account: AccountId,&#xD;&#xA;	at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;,&#xD;&#xA;) -&gt; RpcResult&lt;Vec&lt;(AccountId, Role)&gt;&gt; {&#xD;&#xA;	let api = self.client.runtime_api();&#xD;&#xA;	let at = BlockId::hash(at.unwrap_or_else(|| self.client.info().best_hash));&#xD;&#xA;	let members = api&#xD;&#xA;		.list_members(&amp;at, supersig_account)&#xD;&#xA;		.map_err(runtime_error_into_rpc_err)?&#xD;&#xA;		.map_err(supersig_rpc_error)?;&#xD;&#xA;&#xD;&#xA;	Ok(members)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;const RUNTIME_ERROR: i32 = 1;&#xD;&#xA;const SUPERSIG_ERROR: i32 = 2;&#xD;&#xA;&#xD;&#xA;/// Converts a runtime trap into an RPC error.&#xD;&#xA;fn runtime_error_into_rpc_err(err: impl std::fmt::Debug) -&gt; JsonRpseeError {&#xD;&#xA;	CallError::Custom(ErrorObject::owned(&#xD;&#xA;		RUNTIME_ERROR,&#xD;&#xA;		&quot;Runtime error&quot;,&#xD;&#xA;		Some(format!(&quot;{:?}&quot;, err)),&#xD;&#xA;	))&#xD;&#xA;	.into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// src/rpc.rs&#xD;&#xA;pub fn list_members(&#xD;&#xA;	supersig_account: &amp;T::AccountId,&#xD;&#xA;) -&gt; Result&lt;Vec&lt;(T::AccountId, Role)&gt;, DispatchError&gt; {&#xD;&#xA;	let supersig_id = Self::get_supersig_id_from_account(supersig_account)?;&#xD;&#xA;	Ok(Members::&lt;T&gt;::iter_prefix(supersig_id).collect())&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34936" PostHistoryTypeId="5" PostId="8841" RevisionGUID="b7564e54-01da-4ffa-8ac2-d772e643fdfb" CreationDate="2023-06-13T15:33:02.947" UserId="181" Comment="added 476 characters in body" Text="I am trying to spin up a small BABE PoS network of four nodes and not able to get GRANDPA to start. &#xD;&#xA;&#xD;&#xA;It's hard to know what exact pieces of information to provide, here are some notes.&#xD;&#xA;&#xD;&#xA;A few notes:&#xD;&#xA; - I am inserting the session keys immediately with the --alice, --bob, etc flags for testing, for now, and I can confirm the expected keys are set via RPC.&#xD;&#xA; - Blocks produce, authored by any validator running,but don't finalize. All the nodes are peered correctly.&#xD;&#xA; - In a previous configuration, I noted at least Alice could get finalization to start https://substrate.stackexchange.com/questions/844/grandpa-not-finalizing-with-2-of-3-nodes-on-network. Then I switched to four nodes due to that answer.&#xD;&#xA; - I note every node spits out the following grandpa log message endlessly&#xD;&#xA;```rs&#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Casting prevote for round 1    &#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Announcing block 0xb0d7…cad6 to peers which we voted on in round 1 in set 0    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Round 1: Got incoming message    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.18.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/10.0.0.143/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.17.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.23.0.1/tcp/30334    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/10.0.0.143/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.23.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.18.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.17.0.1/tcp/30335    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)&#xD;&#xA;```&#xD;&#xA;Here is an example of the response from the roundState RPC. Any of the nodes report three keys in missing prevotes, and four in missing precommits, though I don't understand what to do with that information.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;{&#xD;&#xA;  setId: 0&#xD;&#xA;  best: {&#xD;&#xA;    round: 1&#xD;&#xA;    totalWeight: 4&#xD;&#xA;    thresholdWeight: 3&#xD;&#xA;    prevotes: {&#xD;&#xA;      currentWeight: 1&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;    precommits: {&#xD;&#xA;      currentWeight: 0&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;        0x35476F4e6b66365764627843466E5064416E5959&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;  background: []&#xD;&#xA;}&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;I am starting the nodes like: &#xD;&#xA;```&#xD;&#xA; ./target/release/my-node --chain ./dev.json --node-key=&quot;3a9a7f43c5e6415106d09334fe698a33eda6c204667524a7127b475630e3953b&quot; --alice --in-peers 256 --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --base-path=&quot;./data/node1&quot;&#xD;&#xA;&#xD;&#xA; ./target/release/my-node --chain ./dev.json --node- --bob --in-peers 256 --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --base-path=&quot;./data/node2&quot;&#xD;&#xA;&#xD;&#xA;and so on...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34937" PostHistoryTypeId="5" PostId="8841" RevisionGUID="c53dc473-d310-4375-82fd-49b6adae73ab" CreationDate="2023-06-13T15:56:11.333" UserId="181" Comment="added 119 characters in body" Text="I am trying to spin up a small BABE PoS network of four nodes and not able to get GRANDPA to start. &#xD;&#xA;&#xD;&#xA;It's hard to know what exact pieces of information to provide, here are some notes.&#xD;&#xA;&#xD;&#xA;A few notes:&#xD;&#xA; - I am inserting the session keys immediately with the --alice, --bob, etc flags for testing, for now, and I can confirm the expected keys are set via RPC.&#xD;&#xA;- I cannot share the code at this moment, but for substrate dependencies, we are using the branch &quot;polkadot-v0.9.39&quot;.&#xD;&#xA; - Blocks produce, authored by any validator running,but don't finalize. All the nodes are peered correctly.&#xD;&#xA; - In a previous configuration, I noted at least Alice could get finalization to start https://substrate.stackexchange.com/questions/844/grandpa-not-finalizing-with-2-of-3-nodes-on-network. Then I switched to four nodes due to that answer.&#xD;&#xA; - I note every node spits out the following grandpa log message endlessly&#xD;&#xA;```rs&#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Casting prevote for round 1    &#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Announcing block 0xb0d7…cad6 to peers which we voted on in round 1 in set 0    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Round 1: Got incoming message    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.18.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/10.0.0.143/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.17.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.23.0.1/tcp/30334    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/10.0.0.143/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.23.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.18.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.17.0.1/tcp/30335    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)&#xD;&#xA;```&#xD;&#xA;Here is an example of the response from the roundState RPC. Any of the nodes report three keys in missing prevotes, and four in missing precommits, though I don't understand what to do with that information.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;{&#xD;&#xA;  setId: 0&#xD;&#xA;  best: {&#xD;&#xA;    round: 1&#xD;&#xA;    totalWeight: 4&#xD;&#xA;    thresholdWeight: 3&#xD;&#xA;    prevotes: {&#xD;&#xA;      currentWeight: 1&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;    precommits: {&#xD;&#xA;      currentWeight: 0&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;        0x35476F4e6b66365764627843466E5064416E5959&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;  background: []&#xD;&#xA;}&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;I am starting the nodes like: &#xD;&#xA;```&#xD;&#xA; ./target/release/my-node --chain ./dev.json --node-key=&quot;3a9a7f43c5e6415106d09334fe698a33eda6c204667524a7127b475630e3953b&quot; --alice --in-peers 256 --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --base-path=&quot;./data/node1&quot;&#xD;&#xA;&#xD;&#xA; ./target/release/my-node --chain ./dev.json --node- --bob --in-peers 256 --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --base-path=&quot;./data/node2&quot;&#xD;&#xA;&#xD;&#xA;and so on...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34938" PostHistoryTypeId="2" PostId="8875" RevisionGUID="07325ebe-37c4-4b26-8951-813e6d5fe23f" CreationDate="2023-06-13T18:25:13.480" UserId="3264" Text="We are having issues with RPC &amp; Collator nodes connecting to Rococo relaychain. The running chain works but once we restart any node, it cannot find relay peers on the relaychain and thus stalls / stop syncing. We noticed just recently because we restarted some nodes. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34940" PostHistoryTypeId="1" PostId="8875" RevisionGUID="07325ebe-37c4-4b26-8951-813e6d5fe23f" CreationDate="2023-06-13T18:25:13.480" UserId="3264" Text="Nodes not connecting to Rococo relaychain" ContentLicense="CC BY-SA 4.0" />
  <row Id="34941" PostHistoryTypeId="3" PostId="8875" RevisionGUID="07325ebe-37c4-4b26-8951-813e6d5fe23f" CreationDate="2023-06-13T18:25:13.480" UserId="3264" Text="|rococo|chainspec|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34942" PostHistoryTypeId="2" PostId="8876" RevisionGUID="bd3b1a32-8c7b-4d47-9a7e-d1f28c0fb056" CreationDate="2023-06-13T18:27:16.817" UserId="3264" Text="For any other Project having issues with connecting to the Rococo relaychain please check if you are using old relay-chain bootnodes on your collator (due to importing old polkadot). We would recommend you override it with the latest rococo chainspec. By using '-- --chain chainspec.json' and using this file https://raw.githubusercontent.com/paritytech/polkadot/master/node/service/chain-specs/rococo.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="34944" PostHistoryTypeId="5" PostId="8876" RevisionGUID="d0af9596-4923-4696-ba57-82ebf2531a10" CreationDate="2023-06-13T18:28:51.480" UserId="3264" Comment="edited body" Text="For any other Project having issues with connecting to the Rococo relaychain please check if you are using old relay-chain bootnodes on your collator (due to importing old polkadot). We would recommend you override it with the latest rococo chainspec. By using `-- --chain chainspec.json` and using this file https://raw.githubusercontent.com/paritytech/polkadot/master/node/service/chain-specs/rococo.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="34945" PostHistoryTypeId="2" PostId="8877" RevisionGUID="4da84e9e-5192-458c-be2f-f97424c95bf8" CreationDate="2023-06-13T18:48:20.570" UserId="2722" Text="i'm trying to create a blockchain runtime module using Substrate. I have defined a few data structures with the `#[derive(MaxEncodedLen)] `attribute, but I'm running into a problem when trying to compile the code. Specifically, the compiler is giving an error for structures containing `Vec&lt;u8&gt;`.&#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    #[scale_info(skip_type_params(AccountId, Data, Quantity))]&#xD;&#xA;    pub struct Collection&lt;AccountId, Data, Quantity&gt; {&#xD;&#xA;        /// Class metadata&#xD;&#xA;        pub metadata: Vec&lt;u8&gt;,&#xD;&#xA;        //...&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    #[scale_info(skip_type_params(AccountId))]&#xD;&#xA;    pub struct ShareProfitsInfo&lt;AccountId&gt; {&#xD;&#xA;        /// Token metadata&#xD;&#xA;        pub percentage: Vec&lt;u8&gt;,&#xD;&#xA;        //...&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    #[scale_info(skip_type_params(AccountId, Data))]&#xD;&#xA;    pub struct NFT&lt;AccountId, Data&gt; {&#xD;&#xA;        /// Token metadata&#xD;&#xA;        pub metadata: Vec&lt;u8&gt;,&#xD;&#xA;        //...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The compiler error message is:&#xD;&#xA;&#xD;&#xA;    no function or associated item named max_encoded_lenfound for structVec&lt;u8&gt;in the current scope function or associated item not found inVec&lt;u8&gt;`&#xD;&#xA;&#xD;&#xA;As I understand, the `MaxEncodedLen` trait isn't implemented for `Vec&lt;u8&gt;`, but I'm not sure how to go about solving this issue. How can I implement `MaxEncodedLen` for my structures containing `Vec&lt;u8&gt;`?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34947" PostHistoryTypeId="1" PostId="8877" RevisionGUID="4da84e9e-5192-458c-be2f-f97424c95bf8" CreationDate="2023-06-13T18:48:20.570" UserId="2722" Text="How to Implement MaxEncodedLen Trait for Structs Containing Vec&lt;u8&gt; in Rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="34948" PostHistoryTypeId="3" PostId="8877" RevisionGUID="4da84e9e-5192-458c-be2f-f97424c95bf8" CreationDate="2023-06-13T18:48:20.570" UserId="2722" Text="|polkadot-js|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34949" PostHistoryTypeId="2" PostId="8878" RevisionGUID="78fbbf2a-e7b9-4200-95b1-10dacb98a5dd" CreationDate="2023-06-13T20:05:03.280" UserId="94" Text="`Vec` can never be `MaxEncodedLen` (MEL), since it does not have a sensible maximal encode length.  &#xD;&#xA;You can use `BoundedVec&lt;T, L&gt;`. It directly implements `MaxEncodedLen` and has a limited maximal length. &#xD;&#xA;Now inductively the `T` also needs to be MEL. The MEL of the `BoundedVec` can then be calculated at compile time.&#xD;&#xA;&#xD;&#xA;For example `BoundedVec&lt;u8, ConstU32&lt;32&gt;&gt;` is a vector that can have at most 32 bytes. Its MEL will be slightly larger than 32 bytes though, because it has to prefix its length like all vectors do." ContentLicense="CC BY-SA 4.0" />
  <row Id="34951" PostHistoryTypeId="5" PostId="8878" RevisionGUID="cb5df3f4-acbf-4628-9c55-b8384dc23858" CreationDate="2023-06-13T20:13:04.553" UserId="94" Comment="added 224 characters in body" Text="`Vec` can never be `MaxEncodedLen` (MEL), since it does not have a sensible maximal encode length.  &#xD;&#xA;You can use `BoundedVec&lt;T, L&gt;`. It directly implements `MaxEncodedLen` and has a limited maximal length. &#xD;&#xA;Now inductively the `T` also needs to be MEL. The MEL of the `BoundedVec` can then be calculated at compile time.&#xD;&#xA;&#xD;&#xA;For example `BoundedVec&lt;u8, ConstU32&lt;32&gt;&gt;` is a vector that can have at most 32 bytes. Its MEL will be slightly larger than 32 bytes though, because it has to prefix its length like all vectors do.  &#xD;&#xA;You can take a look at the [convition-voting-pallet](https://github.com/paritytech/substrate/blob/e374a33fe1d99d59eb24a08981090bdb4503e81b/frame/conviction-voting/src/vote.rs#L177) for a complete example of how to do it." ContentLicense="CC BY-SA 4.0" />
  <row Id="34952" PostHistoryTypeId="52" PostId="8872" RevisionGUID="06af1d1a-e646-410a-85c5-0b6ce2fbd1cd" CreationDate="2023-06-13T23:06:44.333" />
  <row Id="34953" PostHistoryTypeId="2" PostId="8879" RevisionGUID="43a25964-c983-4464-a05b-e6ec56236122" CreationDate="2023-06-13T23:09:53.140" UserId="3278" Text="Achieved in Capi's devnet spawning logic [like so](https://github.com/paritytech/capi/blob/57f09bd0a2d0a9f54e1ce1eaef8b9f0549eede75/nets/chain_spec/addDevUsers.ts)." ContentLicense="CC BY-SA 4.0" />
  <row Id="34955" PostHistoryTypeId="2" PostId="8880" RevisionGUID="ad03b1bc-ab33-42ec-89cf-a810cbc427d3" CreationDate="2023-06-14T02:18:43.297" UserId="1950" Text="After digging  in to version differences I found that I was missing the configuration &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub BlockWeights: frame_system::limits::BlockWeights =&#xD;&#xA;		frame_system::limits::BlockWeights::with_sensible_defaults(&#xD;&#xA;			Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX),&#xD;&#xA;			NORMAL_DISPATCH_RATIO,&#xD;&#xA;		);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This causes the whole execution to panic after. &#xD;&#xA;&#xD;&#xA;So Make sure you have updated all the runtime configuration for the version 0.9.42&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const BlockHashCount: BlockNumber = 2400;&#xD;&#xA;	pub const Version: RuntimeVersion = VERSION;&#xD;&#xA;	/// We allow for 2 seconds of compute with a 6 second average block time.&#xD;&#xA;	pub BlockWeights: frame_system::limits::BlockWeights =&#xD;&#xA;		frame_system::limits::BlockWeights::with_sensible_defaults(&#xD;&#xA;			Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX),&#xD;&#xA;			NORMAL_DISPATCH_RATIO,&#xD;&#xA;		);&#xD;&#xA;	pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength&#xD;&#xA;		::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);&#xD;&#xA;	pub const SS58Prefix: u8 = 42;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="34957" PostHistoryTypeId="52" PostId="8875" RevisionGUID="c9cda5e1-a42e-4697-9487-ccab46a279a3" CreationDate="2023-06-14T02:26:42.877" />
  <row Id="34958" PostHistoryTypeId="52" PostId="8877" RevisionGUID="143cafb0-961a-4ec4-8977-a8f20829d49f" CreationDate="2023-06-14T02:56:46.360" />
  <row Id="34959" PostHistoryTypeId="5" PostId="8848" RevisionGUID="aaf1d684-a3d5-42bc-a353-b35b652b5df5" CreationDate="2023-06-14T03:32:25.360" UserId="1950" Comment="added 212 characters in body" Text="I have a running chain which was on `polkadot-v0.9.30` and updated all the libraries on to `polkadot-v0.9.42`&#xD;&#xA;&#xD;&#xA;Havent received any errors when uploading but after updating got the error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The error originates from &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Create a sensible default weights system given only expected maximal block weight and the&#xD;&#xA;	/// ratio that `Normal` extrinsics should occupy.&#xD;&#xA;	///&#xD;&#xA;	/// Assumptions:&#xD;&#xA;	///  - Average block initialization is assumed to be `10%`.&#xD;&#xA;	///  - `Operational` transactions have reserved allowance (`1.0 - normal_ratio`)&#xD;&#xA;	pub fn with_sensible_defaults(expected_block_weight: Weight, normal_ratio: Perbill) -&gt; Self {&#xD;&#xA;		let normal_weight = normal_ratio * expected_block_weight;&#xD;&#xA;		Self::builder()&#xD;&#xA;			.for_class(DispatchClass::Normal, |weights| {&#xD;&#xA;				weights.max_total = normal_weight.into();&#xD;&#xA;			})&#xD;&#xA;			.for_class(DispatchClass::Operational, |weights| {&#xD;&#xA;				weights.max_total = expected_block_weight.into();&#xD;&#xA;				weights.reserved = (expected_block_weight - normal_weight).into();&#xD;&#xA;			})&#xD;&#xA;			.avg_block_initialization(Perbill::from_percent(10))&#xD;&#xA;			.build()&#xD;&#xA;			.expect(&quot;Sensible defaults are tested to be valid; qed&quot;)&#xD;&#xA;```&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9&#xD;&#xA;2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0xfa66b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x2df7 - &lt;unknown&gt;!core::panicking::panic_fmt::h6d1629d4208ae76c&#xD;&#xA;    2: 0x3198 - &lt;unknown&gt;!core::result::unwrap_failed::h8ef12658cee03bf1&#xD;&#xA;    3: 0xe0dc - &lt;unknown&gt;!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d&#xD;&#xA;    4: 0x70937 - &lt;unknown&gt;!&lt;pallet_scheduler::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnInitialize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_initialize::h4b32587c5fd765a6&#xD;&#xA;    5: 0x91420 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hffb3eafa82bbd60b&#xD;&#xA;    6: 0xa66d5 - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue ? or is there any guidance around this ?&#xD;&#xA;&#xD;&#xA;[![Screemshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iMz6Y.jpg&#xD;&#xA;&#xD;&#xA;Changes made for version updates&#xD;&#xA; * sp_consensus_grandpa and sc_consensus_grandpa&#xD;&#xA; * removed `#[pallet::generate_store(pub(super) trait Store)]` since its no longer supporting&#xD;&#xA; * Added #[pallet::call_index()]&#xD;&#xA; * Changed `fn create_verifiable_credential() -&gt; Weight {&#xD;&#xA;		Weight::from_ref_time(10_000_000_u64)` to `fn revoke_did_document() -&gt; Weight {&#xD;&#xA;		Weight::from_parts(10_000_000_u64, 1600)&#xD;&#xA;	}`&#xD;&#xA;    &#xD;&#xA; * In runtime/build.rs changed to &#xD;&#xA; ```&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	{&#xD;&#xA;		substrate_wasm_builder::WasmBuilder::new()&#xD;&#xA;			.with_current_project()&#xD;&#xA;			.export_heap_base()&#xD;&#xA;			.import_memory()&#xD;&#xA;			.build();&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;Those were the some of significant changes&#xD;&#xA;&#xD;&#xA;Did not crash the process, update went smoothly , the error message keeps popping up and blocks are not finalising &#xD;&#xA;&#xD;&#xA;This question totally unrelated with https://substrate.stackexchange.com/questions/5557/construct-runtime-integrity-test-failing. since this does not occur in tests and happens after successful runtime update" ContentLicense="CC BY-SA 4.0" />
  <row Id="34962" PostHistoryTypeId="5" PostId="8875" RevisionGUID="c30a72be-fd05-4245-ab1f-0754df39c4f7" CreationDate="2023-06-14T09:45:26.820" UserId="2281" Comment="added 8 characters in body" Text="We are having issues with `RPC &amp; Collator` nodes connecting to `Rococo relaychain.` The running chain works but once we restart any node, it cannot find relay peers on the `relaychain` and thus `stalls / stop` syncing. We noticed just recently because we restarted some nodes. " ContentLicense="CC BY-SA 4.0" />
  <row Id="34963" PostHistoryTypeId="50" PostId="8487" RevisionGUID="ed10ef40-82ea-4383-8678-aa192bbb0b3c" CreationDate="2023-06-14T10:04:35.527" UserId="-1" />
  <row Id="34964" PostHistoryTypeId="2" PostId="8881" RevisionGUID="7d2aa373-eff4-417c-8831-0720a6cddb9d" CreationDate="2023-06-14T11:26:59.713" UserId="3316" Text="I would like to use the rpc call to query a contract.&#xD;&#xA;&#xD;&#xA;I try to use the method &quot;call&quot; from the endpoint &quot;state&quot; with the first parameter &quot;ContractsApi_call&quot; but I am not able to fully build the second parameter (data).&#xD;&#xA;Here an example:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;In this example the data bytes are:&#xD;&#xA;0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d1200ccd8b1a8f39b6d1d69463f5c4281bf9ec5ddfd80eedbba0ee221a30a02a600000000000000000000000000000000000020ba48eafe0c313233&#xD;&#xA;&#xD;&#xA;From my understanding the data bytes are decomposed like this:&#xD;&#xA;  - the origin address :  d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  - the contract address: 1200ccd8b1a8f39b6d1d69463f5c4281bf9ec5ddfd80eedbba0ee221a30a02a6&#xD;&#xA;  - the missing piece: 00000000000000000000000000000000000020 &#xD;&#xA;  - the selector of the method to call : ba48eafe&#xD;&#xA;  - the args of the method: 0c313233&#xD;&#xA;&#xD;&#xA;I would like to understand how is build the missing piece (00000000000000000000000000000000000020), in particular last part(20).&#xD;&#xA;&#xD;&#xA;Anyone could help me to understand?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2YymC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34966" PostHistoryTypeId="1" PostId="8881" RevisionGUID="7d2aa373-eff4-417c-8831-0720a6cddb9d" CreationDate="2023-06-14T11:26:59.713" UserId="3316" Text="Build the data bytes to query a contract with the api state_call" ContentLicense="CC BY-SA 4.0" />
  <row Id="34967" PostHistoryTypeId="3" PostId="8881" RevisionGUID="7d2aa373-eff4-417c-8831-0720a6cddb9d" CreationDate="2023-06-14T11:26:59.713" UserId="3316" Text="|contracts|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34974" PostHistoryTypeId="2" PostId="8882" RevisionGUID="1c475c31-526a-4c30-ac13-642138f7449e" CreationDate="2023-06-14T12:11:28.163" UserId="1960" Text="The following error msg is given out&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `tikv-jemalloc-sys v0.5.3+5.3.0-patched`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Clang version &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Apple clang version 14.0.0 (clang-1400.0.29.202)&#xD;&#xA;Target: arm64-apple-darwin22.2.0&#xD;&#xA;Thread model: posix&#xD;&#xA;InstalledDir: /Library/Developer/CommandLineTools/usr/bin&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;GCC version&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Apple clang version 14.0.0 (clang-1400.0.29.202)&#xD;&#xA;Target: arm64-apple-darwin22.2.0&#xD;&#xA;Thread model: posix&#xD;&#xA;InstalledDir: /Library/Developer/CommandLineTools/usr/bin&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;rustup show&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/nakul/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-2022-12-15-aarch64-apple-darwin&#xD;&#xA;nightly-2023-01-01-aarch64-apple-darwin&#xD;&#xA;nightly-2023-02-21-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-2022-12-15-aarch64-apple-darwin &#xD;&#xA;rustc 1.68.0-nightly (b70baa4f9 2022-12-14)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34976" PostHistoryTypeId="1" PostId="8882" RevisionGUID="1c475c31-526a-4c30-ac13-642138f7449e" CreationDate="2023-06-14T12:11:28.163" UserId="1960" Text="Enable to build substrate node template on M2" ContentLicense="CC BY-SA 4.0" />
  <row Id="34977" PostHistoryTypeId="3" PostId="8882" RevisionGUID="1c475c31-526a-4c30-ac13-642138f7449e" CreationDate="2023-06-14T12:11:28.163" UserId="1960" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34978" PostHistoryTypeId="2" PostId="8883" RevisionGUID="7d8fa571-dc83-40a7-a22a-9601e12cfbed" CreationDate="2023-06-14T12:48:46.490" UserId="2135" Text="I am struggling to understand some behaviour on a custom 7 validators solochain.&#xD;&#xA;&#xD;&#xA;Currently using babe with a `1/4 primary slots probability`, the `block time is 20 sec`, and we have `PrimaryAndSecondaryPlainSlots` as allowed slots.&#xD;&#xA;&#xD;&#xA;Things i'm wondering : &#xD;&#xA;&#xD;&#xA; - While adding log the babe module, I computed a real primary probability of arround 22.5% instead of 25% (on a &quot;relatively small&quot; sample of 10000 blocks). &#xD;&#xA; - Also on the network, I notice a lot of fork / uncles set.&#xD;&#xA; - The most problematic is this morning, I saw the a slot was missed (both primary and secondary) and the time between two block was twice what it should be (40 seconds instead of 20)&#xD;&#xA;&#xD;&#xA;**Is this a normal behaviour ? Is there an actual probability of missing a slot to produce a block ?**&#xD;&#xA;&#xD;&#xA;Usefull links :&#xD;&#xA;- [Config][1]&#xD;&#xA;- [Network explorer][2]&#xD;&#xA;- [Block][3] - [Parent block][4]&#xD;&#xA;- [Logs][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/availproject/avail/blob/develop/runtime/src/constants.rs#L323-L326&#xD;&#xA;  [2]: https://kate.avail.tools/#/staking&#xD;&#xA;  [3]: https://kate.avail.tools/#/explorer/query/33525&#xD;&#xA;  [4]: https://kate.avail.tools/#/explorer/query/0x744e952ebddb37919e8a82e76f9e1494a465d8475732b2ae00c8da44332da9e0&#xD;&#xA;  [5]: https://i.stack.imgur.com/rWHOw.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="34980" PostHistoryTypeId="1" PostId="8883" RevisionGUID="7d8fa571-dc83-40a7-a22a-9601e12cfbed" CreationDate="2023-06-14T12:48:46.490" UserId="2135" Text="How does primary slots and secondary vrf slots work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="34981" PostHistoryTypeId="3" PostId="8883" RevisionGUID="7d8fa571-dc83-40a7-a22a-9601e12cfbed" CreationDate="2023-06-14T12:48:46.490" UserId="2135" Text="|validator|block-production|fork|block-time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34982" PostHistoryTypeId="2" PostId="8884" RevisionGUID="39dcbdb6-c3e0-4fd3-a96e-158ec3289f91" CreationDate="2023-06-14T13:10:27.460" UserId="29" Text="If you want to stick to 1.68, I just tried compiling [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template) and it worked fine, only difference is the monthly.&#xD;&#xA;&#xD;&#xA;Here is my `rustup show`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Default host: aarch64-apple-darwin&#xD;&#xA;rustup home:  /Users/bruno/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;nightly-2023-01-01-aarch64-apple-darwin&#xD;&#xA;nightly-2023-01-30-aarch64-apple-darwin&#xD;&#xA;nightly-aarch64-apple-darwin&#xD;&#xA;1.68.0-aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-2023-01-01-aarch64-apple-darwin (directory override for '/Users/bruno/src')&#xD;&#xA;rustc 1.68.0-nightly (574b64a97 2022-12-31)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can try switching by creating a `rust-toolchain.toml` file in your project's root directory:&#xD;&#xA;```&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;nightly-2023-01-01&quot;&#xD;&#xA;components = [ &quot;rustfmt&quot; ]&#xD;&#xA;targets = [ &quot;wasm32-unknown-unknown&quot; ]&#xD;&#xA;profile = &quot;minimal&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;OR by using the `rustup override set nightly-2023-01-01` command inside your project directory." ContentLicense="CC BY-SA 4.0" />
  <row Id="34984" PostHistoryTypeId="5" PostId="8841" RevisionGUID="49fa66da-cb47-411d-9d30-da071440c10e" CreationDate="2023-06-14T14:04:21.647" UserId="181" Comment="deleted 28 characters in body" Text="I am trying to spin up a small BABE PoS network of four nodes and not able to get GRANDPA to start. &#xD;&#xA;&#xD;&#xA;It's hard to know what exact pieces of information to provide, here are some notes.&#xD;&#xA;&#xD;&#xA;A few notes:&#xD;&#xA; - I am inserting the session keys immediately with the --alice, --bob, etc flags for testing, for now, and I can confirm the expected keys are set via RPC.&#xD;&#xA; - Blocks produce, authored by any validator running,but don't finalize. All the nodes are peered correctly.&#xD;&#xA; - In a previous configuration, I noted at least Alice could get finalization to start https://substrate.stackexchange.com/questions/844/grandpa-not-finalizing-with-2-of-3-nodes-on-network. Then I switched to four nodes due to that answer.&#xD;&#xA; - I note every node spits out the following grandpa log message endlessly&#xD;&#xA;```rs&#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Casting prevote for round 1    &#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Announcing block 0xb0d7…cad6 to peers which we voted on in round 1 in set 0    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Round 1: Got incoming message    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.18.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/10.0.0.143/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.17.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.23.0.1/tcp/30334    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/10.0.0.143/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.23.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.18.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.17.0.1/tcp/30335    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)&#xD;&#xA;```&#xD;&#xA;Here is an example of the response from the roundState RPC. Any of the nodes report three keys in missing prevotes, and four in missing precommits, though I don't understand what to do with that information.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;{&#xD;&#xA;  setId: 0&#xD;&#xA;  best: {&#xD;&#xA;    round: 1&#xD;&#xA;    totalWeight: 4&#xD;&#xA;    thresholdWeight: 3&#xD;&#xA;    prevotes: {&#xD;&#xA;      currentWeight: 1&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;    precommits: {&#xD;&#xA;      currentWeight: 0&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;        0x35476F4e6b66365764627843466E5064416E5959&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;  background: []&#xD;&#xA;}&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;You can see the code [here][1]&#xD;&#xA;I am starting the nodes like: &#xD;&#xA;```&#xD;&#xA; ./target/release/my-node --chain ./dev.json --node-key=&quot;3a9a7f43c5e6415106d09334fe698a33eda6c204667524a7127b475630e3953b&quot; --alice --in-peers 256 --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --base-path=&quot;./data/node1&quot;&#xD;&#xA;&#xD;&#xA; ./target/release/my-node --chain ./dev.json --node- --bob --in-peers 256 --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --base-path=&quot;./data/node2&quot;&#xD;&#xA;&#xD;&#xA;and so on...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/justinFrevert/transmit-test" ContentLicense="CC BY-SA 4.0" />
  <row Id="34985" PostHistoryTypeId="2" PostId="8885" RevisionGUID="e121cd69-e5b0-46c9-9718-5a938cca40ca" CreationDate="2023-06-14T15:01:07.130" UserId="19" Text="Try to install following libraries:&#xD;&#xA;1. `apt get install make` and/or&#xD;&#xA;2. `cargo install fd-find`&#xD;&#xA;&#xD;&#xA;Also try to use both versions of toolchains:&#xD;&#xA;1. `rustup default stable`&#xD;&#xA;2. `rustup default nightly`&#xD;&#xA;&#xD;&#xA;[More information][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/gnzlbg/jemallocator/issues/148" ContentLicense="CC BY-SA 4.0" />
  <row Id="34987" PostHistoryTypeId="2" PostId="8886" RevisionGUID="d652ca7d-e27e-47d1-848f-89c0e9a99e6c" CreationDate="2023-06-14T18:27:27.047" UserId="496" Text="Im getting the following error while trying to run e2e rust ink! smart contracts tests:&#xD;&#xA;```#![feature(min_specialization)]``` using the following command: ```cargo test --features e2e-tests```&#xD;&#xA;&#xD;&#xA;Im using the following example to run the e2e tests : https://github.com/swanky-dapps/manic-minter&#xD;&#xA;&#xD;&#xA;The smart contract itself compiles successfully with the following command: &#xD;&#xA;```cargo contract build```&#xD;&#xA;&#xD;&#xA;Here is how the e2e test looks like:&#xD;&#xA;```&#xD;&#xA;    #[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;    mod e2e_tests {&#xD;&#xA;        use super::*;&#xD;&#xA;        use crate::manicminter::ManicMinterRef;&#xD;&#xA;        use ink::primitives::AccountId;&#xD;&#xA;        use ink_e2e::build_message;&#xD;&#xA;        use openbrush::contracts::ownable::ownable_external::Ownable;&#xD;&#xA;        use openbrush::contracts::psp22::psp22_external::PSP22;&#xD;&#xA;        use oxygen::oxygen::OxygenRef;&#xD;&#xA;&#xD;&#xA;        type E2EResult&lt;T&gt; = std::result::Result&lt;T, Box&lt;dyn std::error::Error&gt;&gt;;&#xD;&#xA;&#xD;&#xA;        const AMOUNT: Balance = 100;&#xD;&#xA;        const PRICE: Balance = 10;&#xD;&#xA;&#xD;&#xA;        /// Helper to get Bob's account_id from `ink_e2e::bob()` PairSigner&#xD;&#xA;        fn get_bob_account_id() -&gt; AccountId {&#xD;&#xA;            let bob = ink_e2e::bob::&lt;ink_e2e::PolkadotConfig&gt;();&#xD;&#xA;            let bob_account_id_32 = bob.account_id();&#xD;&#xA;            let bob_account_id = AccountId::try_from(bob_account_id_32.as_ref()).unwrap();&#xD;&#xA;&#xD;&#xA;            bob_account_id&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is my Cargo.toml file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.0&quot;, default-features = false }&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;openbrush = { git = &quot;https://github.com/727-Ventures/openbrush-contracts&quot;, tag=&quot;3.0.0&quot;, default-features= false, features = [&quot;psp22&quot;] }&#xD;&#xA;my_psp22 = { path = &quot;../my_psp22&quot;,version=&quot;1.0.0&quot;,default-features = false, features = [&quot;ink-as-dependency&quot;] }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.0.1&quot; &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks in advance :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="34989" PostHistoryTypeId="1" PostId="8886" RevisionGUID="d652ca7d-e27e-47d1-848f-89c0e9a99e6c" CreationDate="2023-06-14T18:27:27.047" UserId="496" Text="Error while trying to run e2e rust ink! tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="34990" PostHistoryTypeId="3" PostId="8886" RevisionGUID="d652ca7d-e27e-47d1-848f-89c0e9a99e6c" CreationDate="2023-06-14T18:27:27.047" UserId="496" Text="|ink|rust|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34991" PostHistoryTypeId="2" PostId="8887" RevisionGUID="75959c16-d408-4f7e-81ab-4f405759cbb6" CreationDate="2023-06-14T19:58:02.043" UserId="2960" Text="I am following the [build a parachain](https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/)&#xD;&#xA;however, after I run the parachain collator and the relay chain validators, and then make a transfer from one account to another (Alice to Bob) on the parachain using the polkadotjs ui. The transaction succeeds (from the event notification) but it seems like the parachain block is not finalized on the relay chain so the accounts values remain unchanged. I can see the following message on the parachain logs below &#xD;&#xA;&#xD;&#xA;Note: I have followed the [tutorial](https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/) to setup the relay chain correctly&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;       2023-06-14 23:48:25.545 ERROR tokio-runtime-worker jsonrpsee_server::transport::ws: WS transport error: i/o error: Socket is not connected (os error 57); terminate connection: 2&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="34993" PostHistoryTypeId="1" PostId="8887" RevisionGUID="75959c16-d408-4f7e-81ab-4f405759cbb6" CreationDate="2023-06-14T19:58:02.043" UserId="2960" Text="Local Parachain blocks not getting finalized - logs show websocket error" ContentLicense="CC BY-SA 4.0" />
  <row Id="34994" PostHistoryTypeId="3" PostId="8887" RevisionGUID="75959c16-d408-4f7e-81ab-4f405759cbb6" CreationDate="2023-06-14T19:58:02.043" UserId="2960" Text="|substrate-node-template|polkadot|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="34995" PostHistoryTypeId="2" PostId="8888" RevisionGUID="4c455e29-b0fb-4db7-9cb7-02aec57c0da1" CreationDate="2023-06-14T22:06:26.470" UserId="3346" Text="I am trying to understand how the light client reduces dependence on RPC nodes. The typical RPC node uses the &#xD;&#xA;&#xD;&#xA;    --ws-max-connections&#xD;&#xA;&#xD;&#xA;flag to set a specific limit on the number of web socket connections to that node. If you are using that RPC node as a light client bootnode, light client connections also come in on web socket. **So wouldn't this limit on ws connections also limit the number of light clients booting off of that node?** Is there a way to make that unlimited? Or will NGINX limit that itself regardless? **Is the answer to scaling light client users simply to have lots of light client boot nodes? Which means having lots of RPC nodes?** " ContentLicense="CC BY-SA 4.0" />
  <row Id="34997" PostHistoryTypeId="1" PostId="8888" RevisionGUID="4c455e29-b0fb-4db7-9cb7-02aec57c0da1" CreationDate="2023-06-14T22:06:26.470" UserId="3346" Text="Light Client Bootnode Max Connections Limit" ContentLicense="CC BY-SA 4.0" />
  <row Id="34998" PostHistoryTypeId="3" PostId="8888" RevisionGUID="4c455e29-b0fb-4db7-9cb7-02aec57c0da1" CreationDate="2023-06-14T22:06:26.470" UserId="3346" Text="|bootnode|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35005" PostHistoryTypeId="2" PostId="8890" RevisionGUID="24025881-b762-46c1-bd21-129bd72ac596" CreationDate="2023-06-15T00:30:04.153" UserId="3881" Text="I'm following this [article][1] about substrate keys. And I was unable to convert the account ID to account bytes in hex as it guides:&#xD;&#xA;&#xD;&#xA;from this:&#xD;&#xA;```&#xD;&#xA;Account ID&#xD;&#xA;&#xD;&#xA;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;```&#xD;&#xA;to this:&#xD;&#xA;```&#xD;&#xA;Account Bytes in Hex&#xD;&#xA;&#xD;&#xA;0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Do you know how it should be done?&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate/transparent-keys-in-substrate/" ContentLicense="CC BY-SA 4.0" />
  <row Id="35007" PostHistoryTypeId="1" PostId="8890" RevisionGUID="24025881-b762-46c1-bd21-129bd72ac596" CreationDate="2023-06-15T00:30:04.153" UserId="3881" Text="How to convert Account ID into Account Bytes in Hex using polkadot js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35008" PostHistoryTypeId="3" PostId="8890" RevisionGUID="24025881-b762-46c1-bd21-129bd72ac596" CreationDate="2023-06-15T00:30:04.153" UserId="3881" Text="|polkadot-js|pallet|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35009" PostHistoryTypeId="2" PostId="8891" RevisionGUID="a2fb6034-307d-4298-80e7-39b8aeeb11c2" CreationDate="2023-06-15T01:27:19.310" UserId="1786" Text="### SS58 -&gt; public key&#xD;&#xA;&#xD;&#xA;So what you are looking for here is the public key of the SS58 Account ID. Here is an example on how you can retrieve the above public key in polkadot-js with a simple script in two different ways:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;require('@polkadot/api-augment');&#xD;&#xA;const { cryptoWaitReady } = require('@polkadot/util-crypto');&#xD;&#xA;const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;const { u8aToHex } = require('@polkadot/util');&#xD;&#xA;&#xD;&#xA;const main = async () =&gt; {&#xD;&#xA;    await cryptoWaitReady();&#xD;&#xA;&#xD;&#xA;    const keyring = new Keyring();&#xD;&#xA;    keyring.addFromAddress('5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY');&#xD;&#xA;&#xD;&#xA;    console.log(u8aToHex(keyring.publicKeys[0]))&#xD;&#xA;&#xD;&#xA;    // OR&#xD;&#xA;&#xD;&#xA;    const keyring2 = new Keyring();&#xD;&#xA;    console.log(u8aToHex(keyring.decodeAddress('5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY')))&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;main().finally(() =&gt; process.exit());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will output `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d `&#xD;&#xA;&#xD;&#xA;To expand on the Keyring object it has more to it than the above.&#xD;&#xA;&#xD;&#xA;The `Keyring` class can also take in options such as:&#xD;&#xA; - `type`: which would declare the type of scheme we want to specify such as `sr25519`, `ecdsa`, or `ed25519`.&#xD;&#xA; - `ss58Format`: which would declare the ss58 prefix we want the Keyring to specify.&#xD;&#xA;&#xD;&#xA;So for example:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const keyring = new Keyring({ type: 'sr5519, ss58Format: 42 });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Public key -&gt; SS58&#xD;&#xA;&#xD;&#xA;We can also derive an address from a cryptographic public key with polkadot-js, lets take a look:&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;require('@polkadot/api-augment');&#xD;&#xA;const { cryptoWaitReady } = require('@polkadot/util-crypto');&#xD;&#xA;const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;const { hexToU8a } = require('@polkadot/util');&#xD;&#xA;&#xD;&#xA;const main = async () =&gt; {&#xD;&#xA;    await cryptoWaitReady();&#xD;&#xA;&#xD;&#xA;    const publicKey = '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d';&#xD;&#xA;    const ss58Format = 42;&#xD;&#xA;    const scheme = 'sr25519';&#xD;&#xA;&#xD;&#xA;    const u8aKey = hexToU8a(publicKey);&#xD;&#xA;    const keyring = new Keyring({ type: scheme, ss58Format: ss58Format });&#xD;&#xA;	const address = keyring.encodeAddress(u8aKey, ss58Format);&#xD;&#xA;&#xD;&#xA;    console.log(address);&#xD;&#xA;&#xD;&#xA;    // Note: If the scheme type is `ecdsa` we need to make sure we blake2a hash the public key if its&#xD;&#xA;    // above 32 bytes in length. That would looks like:&#xD;&#xA;    // (p.length &gt; 32 ? blake2AsU8a(p) : p)&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;main().finally(() =&gt; process.exit());&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35012" PostHistoryTypeId="5" PostId="8888" RevisionGUID="d205da0f-2f84-4b44-9eae-814d9f54afde" CreationDate="2023-06-15T05:20:31.303" UserId="354" Comment="deleted 9 characters in body" Text="I am trying to understand how the light client reduces dependence on RPC nodes. The typical RPC node uses the `--ws-max-connections` flag to set a specific limit on the number of web socket connections to that node. If you are using that RPC node as a light client bootnode, light client connections also come in on web socket. **So wouldn't this limit on ws connections also limit the number of light clients booting off of that node?** Is there a way to make that unlimited? Or will NGINX limit that itself regardless? **Is the answer to scaling light client users simply to have lots of light client boot nodes? Which means having lots of RPC nodes?** " ContentLicense="CC BY-SA 4.0" />
  <row Id="35013" PostHistoryTypeId="5" PostId="8887" RevisionGUID="fd3200e1-bdd0-4fc8-a167-54017079c37d" CreationDate="2023-06-15T05:22:35.143" UserId="354" Comment="added 6 characters in body" Text="I am following the [build a parachain](https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/)&#xD;&#xA;however, after I run the parachain collator and the relay chain validators, and then make a `transfer` from one account to another (`Alice to Bob`) on the parachain using the `polkadotjs ui`. The transaction succeeds (from the event notification) but it seems like the parachain block is not finalized on the relay chain so the accounts values remain unchanged. I can see the following message on the parachain logs below &#xD;&#xA;&#xD;&#xA;Note: I have followed the [tutorial](https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/) to setup the relay chain correctly&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;       2023-06-14 23:48:25.545 ERROR tokio-runtime-worker jsonrpsee_server::transport::ws: WS transport error: i/o error: Socket is not connected (os error 57); terminate connection: 2&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35021" PostHistoryTypeId="5" PostId="8881" RevisionGUID="ac37e237-c09c-4bc3-8f8f-218cd96a67c3" CreationDate="2023-06-15T06:14:26.500" UserId="2281" Comment="added 34 characters in body" Text="I would like to use the `rpc call` to query a contract.&#xD;&#xA;&#xD;&#xA;I try to use the method `&quot;call&quot;` from the endpoint `&quot;state&quot;` with the first parameter `&quot;ContractsApi_call&quot;` but I am not able to fully build the second parameter (data).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here an example:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In this example the data bytes are:&#xD;&#xA;```&#xD;&#xA;0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d1200ccd8b1a8f39b6d1d69463f5c4281bf9ec5ddfd80eedbba0ee221a30a02a600000000000000000000000000000000000020ba48eafe0c313233&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From my understanding the data bytes are decomposed like this:&#xD;&#xA;```&#xD;&#xA;  - the origin address :  d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;  - the contract address: 1200ccd8b1a8f39b6d1d69463f5c4281bf9ec5ddfd80eedbba0ee221a30a02a6&#xD;&#xA;  - the missing piece: 00000000000000000000000000000000000020 &#xD;&#xA;  - the selector of the method to call : ba48eafe&#xD;&#xA;  - the args of the method: 0c313233&#xD;&#xA;```&#xD;&#xA;I would like to understand how is build the missing piece (00000000000000000000000000000000000020), in particular last part(20).&#xD;&#xA;&#xD;&#xA;Anyone could help me to understand?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/2YymC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35022" PostHistoryTypeId="5" PostId="5798" RevisionGUID="aa54c6fe-55dc-4d07-8990-38ecbdebd093" CreationDate="2023-06-15T07:25:11.987" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="Hey I have some call data which is similar to [this](https://github.com/paritytech/subxt/blob/da507fa6d29a1583f1ef0e6cdfd0760290f67f7e/subxt/src/tx/tx_client.rs#L167).&#xD;&#xA;&#xD;&#xA;I am signing it using [schnorrkel libaray function function](https://github.com/w3f/schnorrkel/blob/master/src/sign.rs#L203). as `secret.sign_simple(&amp;[], msg)` where `secret` is a [Keypair](https://github.com/w3f/schnorrkel/blob/master/src/keys.rs#L692) and `msg` is in bytes.&#xD;&#xA;&#xD;&#xA;Then I create a multisignature using &#xD;&#xA;```&#xD;&#xA;let sig_slice: &amp;[u8] = &amp;sig_bytes;&#xD;&#xA;let sig = Signature::try_from(sig_slice).unwrap();&#xD;&#xA;let multisig = MultiSignature::Sr25519(sig);&#xD;&#xA;```&#xD;&#xA;where `&amp;sig_bytes` in bytes returned by signing and if I add that signature to make a extrinsic bytes e.g. [here](https://github.com/paritytech/subxt/blob/da507fa6d29a1583f1ef0e6cdfd0760290f67f7e/subxt/src/tx/tx_client.rs#L186)&#xD;&#xA;&#xD;&#xA;I get error `Transaction has a bad signature.`&#xD;&#xA;&#xD;&#xA;And if I send the same extrinsic using subxt and pass the signer as `PairSigner&lt;SubstrateConfig, sr25519::Pair&gt;` it works fine. But I can't use this pair sign function when signing a msg because of nature of architecture. I have to use an independent lib something more generic. How can I solve this error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35023" PostHistoryTypeId="24" PostId="5798" RevisionGUID="aa54c6fe-55dc-4d07-8990-38ecbdebd093" CreationDate="2023-06-15T07:25:11.987" Comment="Proposed by 116 approved by -1 edit id of 462" ContentLicense="CC BY-SA 4.0" />
  <row Id="35024" PostHistoryTypeId="5" PostId="5798" RevisionGUID="8096737a-052b-4534-b7da-1b7e37c0eb1b" CreationDate="2023-06-15T07:25:11.987" UserId="2281" Comment="Spellcheck and language i-&gt;I" Text="Hey I have some call data which is similar to [this](https://github.com/paritytech/subxt/blob/da507fa6d29a1583f1ef0e6cdfd0760290f67f7e/subxt/src/tx/tx_client.rs#L167).&#xD;&#xA;&#xD;&#xA;I am signing it using [schnorrkel libaray function function](https://github.com/w3f/schnorrkel/blob/master/src/sign.rs#L203). as `secret.sign_simple(&amp;[], msg)` where `secret` is a [Keypair](https://github.com/w3f/schnorrkel/blob/master/src/keys.rs#L692) and `msg` is in bytes.&#xD;&#xA;&#xD;&#xA;Then I create a multisignature using &#xD;&#xA;```rs&#xD;&#xA;let sig_slice: &amp;[u8] = &amp;sig_bytes;&#xD;&#xA;let sig = Signature::try_from(sig_slice).unwrap();&#xD;&#xA;let multisig = MultiSignature::Sr25519(sig);&#xD;&#xA;```&#xD;&#xA;where `&amp;sig_bytes` in bytes returned by signing and if I add that signature to make a extrinsic bytes e.g. [here](https://github.com/paritytech/subxt/blob/da507fa6d29a1583f1ef0e6cdfd0760290f67f7e/subxt/src/tx/tx_client.rs#L186)&#xD;&#xA;&#xD;&#xA;I get error `Transaction has a bad signature.`&#xD;&#xA;&#xD;&#xA;And if I send the same extrinsic using subxt and pass the signer as `PairSigner&lt;SubstrateConfig, sr25519::Pair&gt;` it works fine. But I can't use this pair sign function when signing a msg because of nature of architecture. I have to use an independent lib something more generic.&#xD;&#xA;&#xD;&#xA; How can I solve this error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35025" PostHistoryTypeId="2" PostId="8892" RevisionGUID="e11c4431-aaa6-4e3f-8e41-4ddb7df6726a" CreationDate="2023-06-15T07:49:40.373" UserId="3752" Text="We have followed the comets of moonBeam and implemented Unified Accounts. Now we're facing issues while adding session keys for aura and grandpa and I'm online. &#xD;&#xA;we're using [this method][1] for Aura and Grandpa session keys generation. How we can attach a wallet address with these session keys? &#xD;&#xA;When we try to generate session keys through polkaDot explorer by using rotate-keys method and then try to add these session keys so it create error [mentioned in image][2] &#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;There's conflict in between session keys generation. How we can fix this ? &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AsadAli-BB/storage-chain-poa/blob/b7e07cbb9e2d8917e8dd22be0b9eedb8f27a3264/node/src/chain_spec.rs#L55C1-L57&#xD;&#xA;  [2]: https://ibb.co/zbVqrtH&#xD;&#xA;  [3]: https://i.stack.imgur.com/tScQ6.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35027" PostHistoryTypeId="1" PostId="8892" RevisionGUID="e11c4431-aaa6-4e3f-8e41-4ddb7df6726a" CreationDate="2023-06-15T07:49:40.373" UserId="3752" Text="Unified Accounts" ContentLicense="CC BY-SA 4.0" />
  <row Id="35028" PostHistoryTypeId="3" PostId="8892" RevisionGUID="e11c4431-aaa6-4e3f-8e41-4ddb7df6726a" CreationDate="2023-06-15T07:49:40.373" UserId="3752" Text="|extrinsic|evm|session|accountid|poa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35029" PostHistoryTypeId="5" PostId="8273" RevisionGUID="def6ea72-9f0f-445b-9689-b343e65c61ea" CreationDate="2023-06-15T08:03:33.527" UserId="4105" Comment="added 59 characters in body" Text="I am implementing a pallet, that stores in on-chain storage (aka StorageNMap's) some user provided data. Pallet is performing offchain computations by iterating on-chain storage from offchain-worker and creates transactions back on chain, but algorithm is quite unefficient, due structure of on-chain data is not optimized to iterate in a way that offchain algorithm needs.&#xD;&#xA;&#xD;&#xA;I am looking for some solution, to keep offchain cache of on-chain storage (like &quot;view&quot; on current on-chain data) without need to store stale/historical data. In other words, offchain worker needs to reorgainze structure of on-chain data for faster computations, but this structure is not beneficial from on-chain perspective. We can assume that amount of data in on-chain storage is huge, so recreating the cache from scratch in each block is expensive. Instead, it would be great to have an option to compute the cache and maintain it after each block for example by iterating events.&#xD;&#xA;&#xD;&#xA;I have analyzed few options there:&#xD;&#xA;1) There is an option to create fork-aware local storage via `StorageValueRef` API:&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;    let s_info = sp_runtime::offchain::storage::StorageValueRef::local(&#xD;&#xA;	    b&quot;my-pallet::cache_for_offchain_worker&quot;,&#xD;&#xA;	);&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;    If I assume that this cache will be able to maintain forks, I can try to lock this storage from offchain-worker each time offchain_worker function is called, iterate through events in a block and insert data to the storage, release mutex and perform offchain computations bases on a cached data.&#xD;&#xA;    But I am affraid of a cases, that offchain_worker function may be triggered multiple times (here mutex and keeping last block update number may help) and not triggered at all (according to the documentation it is possible as well). In this cases, my cache may be not up-to-date. &#xD;&#xA;&#xD;&#xA;2. To achieve deterministic writes to an offchain storage the next option is of course offchain indexing. But this method does not allow to modify data from on-chain code, instead it allows to create new or remove existing keys. Here in theory I can try to perform deterministic writes from `on_finalize` function and store in offchain storage events from this block:&#xD;&#xA;&#xD;&#xA;    ```rust&#xD;&#xA;       sp_io::offchain_index::set(b&quot;block_numer_here&quot;, b&quot;data_to_be_added_to_cache_for_this_block&quot;);&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;   This should in theory solve an issue from case 1) with nondeterministic writes, so offchain_worker call for block N may first check if cache exists, if not then iterate entire on-chain set, create cache and for N+1 blocks relay on data from offchain_index set. But this idea is in contradiction with a fact, that this cache does not need historical data, so I should probably implement some pruning window (like 10 blocks) and remove obsolete keys from offchain_index from `on_initialize` function. Also, offchain_worker still needs to perform &quot;modification&quot; of the cache with new data for N+1 scenario, due indexing is not able to do this.&#xD;&#xA;&#xD;&#xA;3) Third option I see is to reorganize the on-chain storage in a way that it will be optimized for offchain computations, but less optimized for everything else. Here the data may be stored in some sorted manner via BTreeMap's, so offchain worker will be able to perform queries faster and iterate data in expeced order. Then storing offchain data will be obsolete (offchain worker will be relaying only on on-chain storage). Reorganization of the on-chain structure will increase complexity of other operations, but it may be one of the trade-offs if maintaining of the cache will be more complex/hard to implement.&#xD;&#xA;&#xD;&#xA;Do you have some thoughts how such cache can be achieved?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35030" PostHistoryTypeId="2" PostId="8893" RevisionGUID="d3ed8cf8-11b0-4bfe-8345-216bc8b0fa62" CreationDate="2023-06-15T08:07:49.700" UserId="529" Text="Whenever you see this macro `#![feature(min_specialization)]` in the error message it is most likely that you are not using rust nightly.&#xD;&#xA;This macro is not supported by the stable rust version and you need to add `+nightly`to build it:&#xD;&#xA;&#xD;&#xA;```cargo +nightly contract build --release```&#xD;&#xA;&#xD;&#xA;You might be using [manic-minter][1] as example but you are using different ink versions than manic-minter which uses ink v4.1. If you use manic-minter example you do not need to worry about this `+nightly`because you will have [rust-toolchain.toml][2].&#xD;&#xA;&#xD;&#xA;Also in your cargo.toml the version of ink and ink_e2e better be the same.&#xD;&#xA;&#xD;&#xA;Please upgrade all of your contracts to ink v4.2.1 due to known security issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/swanky-dapps/manic-minter&#xD;&#xA;  [2]: https://github.com/swanky-dapps/manic-minter/blob/main/rust-toolchain.toml" ContentLicense="CC BY-SA 4.0" />
  <row Id="35032" PostHistoryTypeId="2" PostId="8894" RevisionGUID="cae09036-d380-4266-b059-3898fe0231cb" CreationDate="2023-06-15T08:30:04.010" UserId="529" Text="There is `advanece_block` function in the ink::test&#xD;&#xA;you can do something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn advance_n_blocks(n: u32) {&#xD;&#xA;    for _ in 0..n {&#xD;&#xA;        advance_block();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;fn advance_block() {&#xD;&#xA;    ink::env::test::advance_block::&lt;ink::env::DefaultEnvironment&gt;();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35034" PostHistoryTypeId="52" PostId="8890" RevisionGUID="b13c7a6d-7ce4-4fcc-b4e1-f12ae432f16e" CreationDate="2023-06-15T08:30:38.227" />
  <row Id="35036" PostHistoryTypeId="5" PostId="8894" RevisionGUID="f1d48540-2b7c-4fd4-9336-fcee8bf65130" CreationDate="2023-06-15T08:45:36.320" UserId="529" Comment="wrong spelling" Text="There is `advance_block` function in the `ink::env::test` and&#xD;&#xA;you can do something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn advance_n_blocks(n: u32) {&#xD;&#xA;    for _ in 0..n {&#xD;&#xA;        advance_block();&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;fn advance_block() {&#xD;&#xA;    ink::env::test::advance_block::&lt;ink::env::DefaultEnvironment&gt;();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35037" PostHistoryTypeId="2" PostId="8895" RevisionGUID="dfa90289-5a09-4bf6-a120-d7c41ac1ddd4" CreationDate="2023-06-15T09:23:01.003" UserId="2762" Text="I want to get the list of **Parathreads** in my network.&#xD;&#xA;&#xD;&#xA;In this previous question: [How to list all the parachains in a Polkadot network?][1] it explains how to get a list of all parachains in the relay chain, querying the storage Parachains.&#xD;&#xA;&#xD;&#xA;If I query the [ParaLifecycles][2] storage I get the whole list of Para IDs (Parachains and Parathreads) and in my app I can filter this list to have only the parathreads list. But is there a better way to get only the list of **Parathreads**?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://stackoverflow.com/questions/68766718/how-to-list-all-the-parachains-in-a-polkadot-network&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/264b81abe854646b4f98f34b711deb0cf96f1ea3/runtime/parachains/src/paras/mod.rs#L567" ContentLicense="CC BY-SA 4.0" />
  <row Id="35039" PostHistoryTypeId="1" PostId="8895" RevisionGUID="dfa90289-5a09-4bf6-a120-d7c41ac1ddd4" CreationDate="2023-06-15T09:23:01.003" UserId="2762" Text="How to list all the parathreads in a Polkadot network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35040" PostHistoryTypeId="3" PostId="8895" RevisionGUID="dfa90289-5a09-4bf6-a120-d7c41ac1ddd4" CreationDate="2023-06-15T09:23:01.003" UserId="2762" Text="|parachain|rococo|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35041" PostHistoryTypeId="2" PostId="8896" RevisionGUID="a06c4bac-79ee-4c30-b4a4-073d0167e887" CreationDate="2023-06-15T09:30:46.250" UserId="165" Text="I believe you are already following the best approach one could use at the moment, because [`Paras`][1] in `paras_registrar` keeps every registered paraId along with its `ParaInfo`, but then you won't be able to filter which of those are parathreads / parachains.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/7a54fd6e0b38ce69b320f1d1825ea47888f13291/runtime/common/src/paras_registrar.rs#L186" ContentLicense="CC BY-SA 4.0" />
  <row Id="35043" PostHistoryTypeId="5" PostId="8892" RevisionGUID="de2bfd25-d564-4b26-a8b7-709725eae1ad" CreationDate="2023-06-15T09:37:44.450" UserId="2281" Comment="added 23 characters in body" Text="We have followed the comets of `moonBeam` and implemented `Unified Accounts`. Now we're facing issues while adding `session keys` for `aura`, `grandpa` and `I'm online`. &#xD;&#xA;we're using [this method][1] for `Aura and Grandpa` session keys generation. How we can attach a wallet address with these session keys? &#xD;&#xA;When we try to generate session keys through polkaDot explorer by using `rotate-keys` method and then try to add these session keys so it create error [mentioned in image][2] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;**There's conflict in between session keys generation. How we can fix this ?** &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AsadAli-BB/storage-chain-poa/blob/b7e07cbb9e2d8917e8dd22be0b9eedb8f27a3264/node/src/chain_spec.rs#L55C1-L57&#xD;&#xA;  [2]: https://ibb.co/zbVqrtH&#xD;&#xA;  [3]: https://i.stack.imgur.com/tScQ6.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35044" PostHistoryTypeId="5" PostId="8883" RevisionGUID="6c85093a-cfbd-4c51-8a00-21e6819f8243" CreationDate="2023-06-15T10:52:46.077" UserId="2135" Comment="added 1 character in body" Text="I am struggling to understand some behaviour on a custom 7 validators solochain.&#xD;&#xA;&#xD;&#xA;Currently using babe with a `1/4 primary slots probability`, the `block time is 20 sec`, and we have `PrimaryAndSecondaryPlainSlots` as allowed slots.&#xD;&#xA;&#xD;&#xA;Things i'm wondering : &#xD;&#xA;&#xD;&#xA; - While adding log the babe module, I computed a real primary probability of arround 22.5% instead of 25% (on a &quot;relatively small&quot; sample of 10000 blocks). &#xD;&#xA; - Also on the network, I notice a lot of fork / uncles set.&#xD;&#xA; - The most problematic is this morning, I saw that a slot was missed (both primary and secondary) and the time between two block was twice what it should be (40 seconds instead of 20)&#xD;&#xA;&#xD;&#xA;**Is this a normal behaviour ? Is there an actual probability of missing a slot to produce a block ?**&#xD;&#xA;&#xD;&#xA;Usefull links :&#xD;&#xA;- [Config][1]&#xD;&#xA;- [Network explorer][2]&#xD;&#xA;- [Block][3] - [Parent block][4]&#xD;&#xA;- [Logs][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/availproject/avail/blob/develop/runtime/src/constants.rs#L323-L326&#xD;&#xA;  [2]: https://kate.avail.tools/#/staking&#xD;&#xA;  [3]: https://kate.avail.tools/#/explorer/query/33525&#xD;&#xA;  [4]: https://kate.avail.tools/#/explorer/query/0x744e952ebddb37919e8a82e76f9e1494a465d8475732b2ae00c8da44332da9e0&#xD;&#xA;  [5]: https://i.stack.imgur.com/rWHOw.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35045" PostHistoryTypeId="2" PostId="8897" RevisionGUID="e2b4c9e0-0dbc-4c56-a5f5-4036d6081851" CreationDate="2023-06-15T11:22:48.163" UserId="3414" Text="It seems that there is some problem in connecting your parachain to relay chain.&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node --name a1 --collator --force-authoring --chain raw-parachain-chainspec.json --base-path /tmp/parachain/a1 --port 40333 --ws-port 8844 -- --execution wasm --chain ../polkadot/customSpecRaw.json --port 30343 --ws-port 9977 --bootnodes /ip4/172.15.14.155/tcp/30333/p2p/12D3KooWBh14B1a9Xh5WPPedT6EohwXNkKYvWJ3p2xt1GKndka1j &#xD;&#xA;&#xD;&#xA;You can try this command for connecting your parachain to relay chain.Put the ip address of your system where relay chain is running and also the local id of the relay chain in this command. Let me know if this solves your problem. " ContentLicense="CC BY-SA 4.0" />
  <row Id="35047" PostHistoryTypeId="5" PostId="8897" RevisionGUID="aa181a89-a729-4c9b-949f-c85ddfd57a80" CreationDate="2023-06-15T12:25:57.830" UserId="2281" Comment="deleted 33 characters in body" Text="It seems that there is some problem in connecting your parachain to relay chain.&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node --name a1 --collator --force-authoring --chain raw-parachain-chainspec.json --base-path /tmp/parachain/a1 --port 40333 --ws-port 8844 -- --execution wasm --chain ../polkadot/customSpecRaw.json --port 30343 --ws-port 9977 --bootnodes /ip4/172.15.14.155/tcp/30333/p2p/12D3KooWBh14B1a9Xh5WPPedT6EohwXNkKYvWJ3p2xt1GKndka1j &#xD;&#xA;&#xD;&#xA;You can try this `command` for connecting your `parachain` to `relay chain`.Put the `ip address` of your system where relay chain is running and also the `local id` of the relay chain in this command. " ContentLicense="CC BY-SA 4.0" />
  <row Id="35048" PostHistoryTypeId="5" PostId="8883" RevisionGUID="31565b24-1566-4576-8f8e-61cabd83bd7a" CreationDate="2023-06-15T12:28:10.680" UserId="2281" Comment="added 14 characters in body" Text="I am struggling to understand some behaviour on a custom `7 validators solochain`.&#xD;&#xA;&#xD;&#xA;Currently using babe with a `1/4 primary slots probability`, the `block time is 20 sec`, and we have `PrimaryAndSecondaryPlainSlots` as allowed slots.&#xD;&#xA;&#xD;&#xA;Things i'm wondering : &#xD;&#xA;&#xD;&#xA;&gt;  - While adding log the babe module, I computed a real primary probability of arround 22.5% instead of 25% (on a &quot;relatively small&quot;&#xD;&#xA;&gt; sample of 10000 blocks). &#xD;&#xA;&gt;  - Also on the network, I notice a lot of fork / uncles set.&#xD;&#xA;&gt;  - The most problematic is this morning, I saw that a slot was missed (both primary and secondary) and the time between two block was twice&#xD;&#xA;&gt; what it should be (40 seconds instead of 20)&#xD;&#xA;&#xD;&#xA;**Is this a normal behaviour ? Is there an actual probability of missing a slot to produce a block ?**&#xD;&#xA;&#xD;&#xA;Usefull links :&#xD;&#xA;- [Config][1]&#xD;&#xA;- [Network explorer][2]&#xD;&#xA;- [Block][3] - [Parent block][4]&#xD;&#xA;- [Logs][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/availproject/avail/blob/develop/runtime/src/constants.rs#L323-L326&#xD;&#xA;  [2]: https://kate.avail.tools/#/staking&#xD;&#xA;  [3]: https://kate.avail.tools/#/explorer/query/33525&#xD;&#xA;  [4]: https://kate.avail.tools/#/explorer/query/0x744e952ebddb37919e8a82e76f9e1494a465d8475732b2ae00c8da44332da9e0&#xD;&#xA;  [5]: https://i.stack.imgur.com/rWHOw.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35049" PostHistoryTypeId="5" PostId="8841" RevisionGUID="066b77a1-a3eb-444b-90b3-3f995fcad184" CreationDate="2023-06-15T12:29:15.947" UserId="2281" Comment="edited body" Text="I am trying to spin up a small BABE PoS network of four nodes and not able to get GRANDPA to start. &#xD;&#xA;&#xD;&#xA;It's hard to know what exact pieces of information to provide, here are some notes.&#xD;&#xA;&#xD;&#xA;A few notes:&#xD;&#xA; - I am inserting the session keys immediately with the --alice, --bob, etc flags for testing, for now, and I can confirm the expected keys are set via RPC.&#xD;&#xA; - Blocks produce, authored by any validator running,but don't finalize. All the nodes are peered correctly.&#xD;&#xA; - In a previous configuration, I noted at least Alice could get finalization to start https://substrate.stackexchange.com/questions/844/grandpa-not-finalizing-with-2-of-3-nodes-on-network. Then I switched to four nodes due to that answer.&#xD;&#xA; - I note every node spits out the following grandpa log message endlessly&#xD;&#xA;```sh&#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Casting prevote for round 1    &#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Announcing block 0xb0d7…cad6 to peers which we voted on in round 1 in set 0    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Round 1: Got incoming message    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.18.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/10.0.0.143/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.17.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.23.0.1/tcp/30334    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/10.0.0.143/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.23.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.18.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.17.0.1/tcp/30335    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)&#xD;&#xA;```&#xD;&#xA;Here is an example of the response from the roundState RPC. Any of the nodes report three keys in missing prevotes, and four in missing precommits, though I don't understand what to do with that information.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;{&#xD;&#xA;  setId: 0&#xD;&#xA;  best: {&#xD;&#xA;    round: 1&#xD;&#xA;    totalWeight: 4&#xD;&#xA;    thresholdWeight: 3&#xD;&#xA;    prevotes: {&#xD;&#xA;      currentWeight: 1&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;    precommits: {&#xD;&#xA;      currentWeight: 0&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;        0x35476F4e6b66365764627843466E5064416E5959&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;  background: []&#xD;&#xA;}&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;You can see the code [here][1]&#xD;&#xA;I am starting the nodes like: &#xD;&#xA;```&#xD;&#xA; ./target/release/my-node --chain ./dev.json --node-key=&quot;3a9a7f43c5e6415106d09334fe698a33eda6c204667524a7127b475630e3953b&quot; --alice --in-peers 256 --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --base-path=&quot;./data/node1&quot;&#xD;&#xA;&#xD;&#xA; ./target/release/my-node --chain ./dev.json --node- --bob --in-peers 256 --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --base-path=&quot;./data/node2&quot;&#xD;&#xA;&#xD;&#xA;and so on...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/justinFrevert/transmit-test" ContentLicense="CC BY-SA 4.0" />
  <row Id="35050" PostHistoryTypeId="2" PostId="8898" RevisionGUID="78cbf81c-21bf-4ef8-b83d-1e3420358615" CreationDate="2023-06-15T13:36:27.890" UserId="4329" Text="When I transferred Approve_as_multi Tx from a child address in a multisig wallet at the time I went up to Polkadot Runtime v9420, I got a `Failed&#xD;&#xA;(ConsumerRemaining)` error.&#xD;&#xA;This is the first time I have seen this error, what is the reason?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35052" PostHistoryTypeId="1" PostId="8898" RevisionGUID="78cbf81c-21bf-4ef8-b83d-1e3420358615" CreationDate="2023-06-15T13:36:27.890" UserId="4329" Text="What is the cause of `ConsumerRemaining` error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35053" PostHistoryTypeId="3" PostId="8898" RevisionGUID="78cbf81c-21bf-4ef8-b83d-1e3420358615" CreationDate="2023-06-15T13:36:27.890" UserId="4329" Text="|polkadot|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35054" PostHistoryTypeId="2" PostId="8899" RevisionGUID="fdde6551-f472-49f1-a446-5122c0e05840" CreationDate="2023-06-15T13:45:35.950" UserId="4330" Text="I've been working on getting a test relay up and running in the cloud (Docker containers running on Debian virtual machines) for remote testing, and we've got everything running. The relay chain is able to sync, and sees the parachain. The collators see each other. We then noticed the following:&#xD;&#xA;&#xD;&#xA;1) The parachain is trying to collate, but the blocks are never picked up by the relay.&#xD;&#xA;2) We're getting a log that collation was not advertised to any validators.&#xD;&#xA;3) That seems to be because finality is dropping behind on the relay chain, to the point where the relay's finalized block was 200 behind the current best.&#xD;&#xA;4) 2 of our 3 validators are always offline, and it cycles almost perfectly. So the online validator will be A, then next block B, then next block C. That would cause the slow and stalled finality, and probably the lack of collation being advertised.&#xD;&#xA;&#xD;&#xA;For reference, we also just registered a parathread on Rococo and put a request through for a temporary parachain slot, currently waiting for onboarding. My hope was to check whether that parachain worked appropriately.&#xD;&#xA;&#xD;&#xA;I also tested this exact relay/para chain spec pair locally and it worked perfectly.&#xD;&#xA;&#xD;&#xA;Has anyone seen something like this before? Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="35056" PostHistoryTypeId="1" PostId="8899" RevisionGUID="fdde6551-f472-49f1-a446-5122c0e05840" CreationDate="2023-06-15T13:45:35.950" UserId="4330" Text="Local Relay Stops Finalizing" ContentLicense="CC BY-SA 4.0" />
  <row Id="35057" PostHistoryTypeId="3" PostId="8899" RevisionGUID="fdde6551-f472-49f1-a446-5122c0e05840" CreationDate="2023-06-15T13:45:35.950" UserId="4330" Text="|parachain|relay-chain|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35058" PostHistoryTypeId="6" PostId="8881" RevisionGUID="280c627b-b454-4f43-942f-3539218f3090" CreationDate="2023-06-15T13:48:57.747" UserId="3316" Comment="edited tags" Text="|smart-contract|pallet-contracts|contracts|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35059" PostHistoryTypeId="2" PostId="8900" RevisionGUID="aa0ff2fb-5569-4a6a-8a63-78ccaa244826" CreationDate="2023-06-15T15:48:34.043" UserId="3850" Text="I applied a temporary fix which was to rename the `pallet-xcm` dependency to `astar-xcm` in `astar-frame` and `Astar` to avoid dependency conflicts with the `pallet-xcm` subdependency from `polkadot-runtime`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="35061" PostHistoryTypeId="5" PostId="8899" RevisionGUID="89a3b074-710c-4718-a76f-14ea8bd4ee7c" CreationDate="2023-06-15T17:16:02.197" UserId="4330" Comment="added 1030 characters in body" Text="I've been working on getting a test relay up and running in the cloud (Docker containers running on Debian virtual machines) for remote testing, and we've got everything running. The relay chain is able to sync, and sees the parachain. The collators see each other. We then noticed the following:&#xD;&#xA;&#xD;&#xA;1) The parachain is trying to collate, but the blocks are never picked up by the relay.&#xD;&#xA;2) We're getting a log that collation was not advertised to any validators.&#xD;&#xA;3) That seems to be because finality is dropping behind on the relay chain, to the point where the relay's finalized block was 200 behind the current best.&#xD;&#xA;4) 2 of our 3 validators are always offline, and it cycles almost perfectly. So the online validator will be A, then next block B, then next block C. That would cause the slow and stalled finality, and probably the lack of collation being advertised.&#xD;&#xA;&#xD;&#xA;For reference, we also just registered a parathread on Rococo and put a request through for a temporary parachain slot, currently waiting for onboarding. My hope was to check whether that parachain worked appropriately.&#xD;&#xA;&#xD;&#xA;I also tested this exact relay/para chain spec pair locally and it worked perfectly.&#xD;&#xA;&#xD;&#xA;Has anyone seen something like this before? Thanks.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Both the relay and the parachain are on polkadot-v0.9.37. We're running the parachain with&#xD;&#xA;```&#xD;&#xA;parachain-node --collator --force-authoring --chain raw-parachain-chainspec.json --base-path /tmp/parachain/alice --port 40333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --rpc-methods Unsafe --name Fennel0 --node-key $(cat para-key.sh) --unsafe-ws-external --rpc-external --rpc-cors=all -- --execution wasm --chain /app/polkadotspec.json --port 30343 --ws-port 9977 --bootnodes /ip4/[relay_ip]/tcp/30333/p2p/12D3KooWLj8FgbwDtLQbA5ozWqqx6vM1n2rmjwQMczSiDveyWa5G --rpc-external --ws-external --prometheus-external --rpc-cors all&#xD;&#xA;```&#xD;&#xA;and the relay bootnode with&#xD;&#xA;```&#xD;&#xA;polkadot --validator --base-path /tmp/relay/alice --chain /app/chainspec.json --port 30333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --name FnlDot0 --node-key $(cat node_key) --rpc-cors all --prometheus-external --rpc-methods Unsafe --rpc-external --ws-external&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35062" PostHistoryTypeId="52" PostId="8895" RevisionGUID="17ccd077-1613-46e1-a045-1dcf49d23a07" CreationDate="2023-06-15T17:23:04.183" />
  <row Id="35063" PostHistoryTypeId="5" PostId="8899" RevisionGUID="6161d12b-8262-4d9b-b82a-a28acb7a6c36" CreationDate="2023-06-15T22:50:46.630" UserId="4330" Comment="added 148 characters in body" Text="I've been working on getting a test relay up and running in the cloud (Docker containers running on Debian virtual machines) for remote testing, and we've got everything running. The relay chain is able to sync, and sees the parachain. The collators see each other. We then noticed the following:&#xD;&#xA;&#xD;&#xA;1) The parachain is trying to collate, but the blocks are never picked up by the relay.&#xD;&#xA;2) We're getting a log that collation was not advertised to any validators.&#xD;&#xA;3) That seems to be because finality is dropping behind on the relay chain, to the point where the relay's finalized block was 200 behind the current best.&#xD;&#xA;4) 2 of our 3 validators are always offline, and it cycles almost perfectly. So the online validator will be A, then next block B, then next block C. That would cause the slow and stalled finality, and probably the lack of collation being advertised.&#xD;&#xA;&#xD;&#xA;For reference, we also just registered a parathread on Rococo and put a request through for a temporary parachain slot, currently waiting for onboarding. My hope was to check whether that parachain worked appropriately.&#xD;&#xA;&#xD;&#xA;I also tested this exact relay/para chain spec pair locally and it worked perfectly.&#xD;&#xA;&#xD;&#xA;Has anyone seen something like this before? Thanks.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Both the relay and the parachain are on polkadot-v0.9.37. We're running the parachain with&#xD;&#xA;```&#xD;&#xA;parachain-node --collator --force-authoring --chain raw-parachain-chainspec.json --base-path /tmp/parachain/alice --port 40333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --rpc-methods Unsafe --name Fennel0 --node-key $(cat para-key.sh) --unsafe-ws-external --rpc-external --rpc-cors=all -- --execution wasm --chain /app/polkadotspec.json --port 30343 --ws-port 9977 --bootnodes /ip4/[relay_ip]/tcp/30333/p2p/12D3KooWLj8FgbwDtLQbA5ozWqqx6vM1n2rmjwQMczSiDveyWa5G --rpc-external --ws-external --prometheus-external --rpc-cors all&#xD;&#xA;```&#xD;&#xA;and the relay bootnode with&#xD;&#xA;```&#xD;&#xA;polkadot --validator --base-path /tmp/relay/alice --chain /app/chainspec.json --port 30333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --name FnlDot0 --node-key $(cat node_key) --rpc-cors all --prometheus-external --rpc-methods Unsafe --rpc-external --ws-external&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here's a pastebin for the boot node's log: https://pastebin.com/raw/VAC1a50W&#xD;&#xA;&#xD;&#xA;And one of the collator logs:&#xD;&#xA;https://pastebin.com/raw/EyCUCRKD" ContentLicense="CC BY-SA 4.0" />
  <row Id="35064" PostHistoryTypeId="5" PostId="8899" RevisionGUID="404328c1-4802-46b3-8d44-810cbe4016dc" CreationDate="2023-06-15T23:16:18.917" UserId="4330" Comment="added 173 characters in body" Text="I've been working on getting a test relay up and running in the cloud (Docker containers running on Debian virtual machines) for remote testing, and we've got everything running. The relay chain is able to sync, and sees the parachain. The collators see each other. We then noticed the following:&#xD;&#xA;&#xD;&#xA;1) The parachain is trying to collate, but the blocks are never picked up by the relay.&#xD;&#xA;2) We're getting a log that collation was not advertised to any validators.&#xD;&#xA;3) That seems to be because finality is dropping behind on the relay chain, to the point where the relay's finalized block was 200 behind the current best.&#xD;&#xA;4) 2 of our 3 validators are always offline, and it cycles almost perfectly. So the online validator will be A, then next block B, then next block C. That would cause the slow and stalled finality, and probably the lack of collation being advertised.&#xD;&#xA;&#xD;&#xA;For reference, we also just registered a parathread on Rococo and put a request through for a temporary parachain slot, currently waiting for onboarding. My hope was to check whether that parachain worked appropriately.&#xD;&#xA;&#xD;&#xA;I also tested this exact relay/para chain spec pair locally and it worked perfectly.&#xD;&#xA;&#xD;&#xA;Has anyone seen something like this before? Thanks.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Both the relay and the parachain are on polkadot-v0.9.37. We're running the parachain with&#xD;&#xA;```&#xD;&#xA;parachain-node --collator --force-authoring --chain raw-parachain-chainspec.json --base-path /tmp/parachain/alice --port 40333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --rpc-methods Unsafe --name Fennel0 --node-key $(cat para-key.sh) --unsafe-ws-external --rpc-external --rpc-cors=all -- --execution wasm --chain /app/polkadotspec.json --port 30343 --ws-port 9977 --bootnodes /ip4/[relay_ip]/tcp/30333/p2p/12D3KooWLj8FgbwDtLQbA5ozWqqx6vM1n2rmjwQMczSiDveyWa5G --rpc-external --ws-external --prometheus-external --rpc-cors all&#xD;&#xA;```&#xD;&#xA;and the relay bootnode with&#xD;&#xA;```&#xD;&#xA;polkadot --validator --base-path /tmp/relay/alice --chain /app/chainspec.json --port 30333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --name FnlDot0 --node-key $(cat node_key) --rpc-cors all --prometheus-external --rpc-methods Unsafe --rpc-external --ws-external&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;After re-running, our Relay network is working again. All three nodes are in and finality has been running fine. Our parachain is, however, still not collating.&#xD;&#xA;&#xD;&#xA;Here's a pastebin for the boot node's log: https://pastebin.com/raw/VAC1a50W&#xD;&#xA;&#xD;&#xA;And one of the collator logs:&#xD;&#xA;https://pastebin.com/raw/EyCUCRKD" ContentLicense="CC BY-SA 4.0" />
  <row Id="35066" PostHistoryTypeId="2" PostId="8901" RevisionGUID="2c2e8d46-ad8a-4c9e-bcba-4088dbefecd8" CreationDate="2023-06-16T00:51:42.267" UserId="83" Text="In [this commit of this Pull Request][1] I'm using a modified version of this [ink! basic-contract-caller example][2] where there is a BasicContractCaller main contract and a OtherContract sub-contract.&#xD;&#xA;&#xD;&#xA;To run it, I follow the steps in the [README file][3] and then after entering the Docker container I run `cd /app &amp;&amp; ./docker/quickstart-basic-contract-caller.sh` and it runs through these steps without generating any errors:&#xD;&#xA;&#xD;&#xA; 0. Starts a fresh local node using substrate-contracts-node&#xD;&#xA; 1. Builds both of those contracts&#xD;&#xA; 2. Uploads both of those contracts&#xD;&#xA; 3. Instantiates both of those contracts&#xD;&#xA; 4. Calls a setter method `flip()` in the sub-contract directly `cargo contract call --suri //Alice --contract $CONTRACT_ADDR_SUB --message get --execute --gas 100000000000 --proof-size 100000000000 --skip-confirm`&#xD;&#xA; 5. Calls a getter method `get()` in the sub-contract directly with `cargo contract call --suri //Alice --contract $CONTRACT_ADDR_SUB --message get --execute --skip-confirm`&#xD;&#xA; 6. Calls a method `get()` in the main contract that calls a getter method `get()` in the sub-contract `cargo contract call --suri //Alice --contract $CONTRACT_ADDR_MAIN --message get --execute --skip-confirm`&#xD;&#xA;&#xD;&#xA;But if I simply remove step 6. by removing the method/message `get()` from the main contract and comment out the code in the bash script that calls it, then when I run `./docker/quickstart-basic-contract-caller.sh` again it generates the following error:&#xD;&#xA;```&#xD;&#xA;ERROR: No constructor or message with the name 'get' found&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So my question is, if I remove step 6. which involves removing the method `get()` from the main contract that is used to call `get()` method in the sub-contract [as shown in this subsequent commit that reproduces the error][4], how may I then still call the `get()` method in the sub-contract directly in step 5. without encountering this error?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ltfschoen/InkTemplate/pull/16/commits/ed4290e1fc13624388bd97a2fcee9c4f1a3296d0&#xD;&#xA;  [2]: https://github.com/paritytech/ink-examples/blob/main/basic_contract_caller&#xD;&#xA;  [3]: https://github.com/ltfschoen/InkTemplate/blob/unnamed/README.md#setup-docker-container-&#xD;&#xA;  [4]: https://github.com/ltfschoen/InkTemplate/pull/16/commits/931fe208737aca934a01768e75ff715e9ded3b53" ContentLicense="CC BY-SA 4.0" />
  <row Id="35068" PostHistoryTypeId="1" PostId="8901" RevisionGUID="2c2e8d46-ad8a-4c9e-bcba-4088dbefecd8" CreationDate="2023-06-16T00:51:42.267" UserId="83" Text="Why can't I still directly call method in sub-contract of basic-contract-caller example after removing method that allows calling from main contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35069" PostHistoryTypeId="3" PostId="8901" RevisionGUID="2c2e8d46-ad8a-4c9e-bcba-4088dbefecd8" CreationDate="2023-06-16T00:51:42.267" UserId="83" Text="|ink|cross-contract-call|basic-contract-caller|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35070" PostHistoryTypeId="2" PostId="8902" RevisionGUID="652c4bd3-a3ca-418f-9bdb-a6103ef13b2e" CreationDate="2023-06-16T03:03:24.680" UserId="251" Text="I have no idea why this call uses such a lot proof size (around 4MB).&#xD;&#xA;&#xD;&#xA;It looks like it doesn't change too much storage items.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-messages-substrate/blob/e5d24b2fa56abf512fe944a7ab22ecd21f0eed66/modules/grandpa/src/lib.rs#L166&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia/blame/fc35306420e515de56575c483c6fcfe8b357b285/runtime/crab/src/weights/pallet_bridge_grandpa.rs#L78" ContentLicense="CC BY-SA 4.0" />
  <row Id="35072" PostHistoryTypeId="1" PostId="8902" RevisionGUID="652c4bd3-a3ca-418f-9bdb-a6103ef13b2e" CreationDate="2023-06-16T03:03:24.680" UserId="251" Text="How does the benchmark calculate the prrof size?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35073" PostHistoryTypeId="3" PostId="8902" RevisionGUID="652c4bd3-a3ca-418f-9bdb-a6103ef13b2e" CreationDate="2023-06-16T03:03:24.680" UserId="251" Text="|benchmarking|pov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35074" PostHistoryTypeId="5" PostId="8902" RevisionGUID="e4676abf-2030-4add-890c-aeec25a09a26" CreationDate="2023-06-16T03:26:06.290" UserId="251" Comment="edited body" Text="I have no idea why this call uses such a lot proof size (around 4MB).&#xD;&#xA;&#xD;&#xA;It looks like it doesn't change too many storage items.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia-messages-substrate/blob/e5d24b2fa56abf512fe944a7ab22ecd21f0eed66/modules/grandpa/src/lib.rs#L166&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia/blame/fc35306420e515de56575c483c6fcfe8b357b285/runtime/crab/src/weights/pallet_bridge_grandpa.rs#L78" ContentLicense="CC BY-SA 4.0" />
  <row Id="35075" PostHistoryTypeId="2" PostId="8903" RevisionGUID="33f8c77f-50f6-45c5-9060-e9ca16c9020b" CreationDate="2023-06-16T09:00:25.233" UserId="2844" Text="I wan't to integrate sporran wallet in my reactjs application. Could someone point me some resources. Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35077" PostHistoryTypeId="1" PostId="8903" RevisionGUID="33f8c77f-50f6-45c5-9060-e9ca16c9020b" CreationDate="2023-06-16T09:00:25.233" UserId="2844" Text="How to inject sporran wallet in react js application?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35078" PostHistoryTypeId="3" PostId="8903" RevisionGUID="33f8c77f-50f6-45c5-9060-e9ca16c9020b" CreationDate="2023-06-16T09:00:25.233" UserId="2844" Text="|did|kilt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35079" PostHistoryTypeId="2" PostId="8904" RevisionGUID="e42c54e6-5f0c-4052-8b1d-e6e05e4412c9" CreationDate="2023-06-16T09:36:00.647" UserId="83" Text="This question is an extension of [this previous question][1] where [this commit of this Pull Request][2] I used a modified version of this [ink! basic-contract-caller example][3] where there is a `BasicContractCaller` main contract and a `OtherContract` sub-contract.&#xD;&#xA;&#xD;&#xA;But this question relates to changes I made to that code by using the **Builders approach** section's `CreateBuilder` and `CallBuilder` as mentioned in the ink! documentation [here][4].&#xD;&#xA;&#xD;&#xA;The Builder approach that I implemented is in [this commit][5].&#xD;&#xA;&#xD;&#xA;To run it, I follow the steps in the [README file][6] and then after entering the Docker container I run `cd /app &amp;&amp; ./docker/quickstart-basic-contract-caller.sh` and it runs through these steps:&#xD;&#xA;&#xD;&#xA; 0. Starts a fresh local node using substrate-contracts-node&#xD;&#xA; 1. Builds both of those contracts&#xD;&#xA; 2. Uploads both of those contracts&#xD;&#xA; 3. Instantiates both of those contracts with&#xD;&#xA;`cargo contract instantiate --manifest-path $PARENT_DIR/dapps/basic_contract_caller/Cargo.toml --suri //Alice --constructor new --args $CODE_HASH_SUB $CONTRACT_ADDR_SUB --execute --gas 200000000000 --proof-size 100000000000 --skip-confirm`. &#xD;&#xA;Note: It was necessary to provide more gas `--gas 200000000000` otherwise I got error [`The executed contract exhausted its gas limit`][7].&#xD;&#xA;Note: It was also necessary to use `.endowment(0)`, otherwise I got error [`Cross-contract instantiation failed with TransferFailed`][8].&#xD;&#xA; 4. Calls a setter method `flip()` in the sub-contract directly `cargo contract call --suri //Alice --contract $CONTRACT_ADDR_SUB --message get --execute --gas 200000000000 --proof-size 100000000000 --skip-confirm`&#xD;&#xA; 5. Calls a getter method `get()` in the sub-contract directly with `cargo contract call --suri //Alice --contract $CONTRACT_ADDR_SUB --message get --execute --skip-confirm`&#xD;&#xA; 6. Calls a method `get()` in the main contract that calls a getter method `get()` in the sub-contract `cargo contract call --suri //Alice --contract $CONTRACT_ADDR_MAIN --message get --execute --skip-confirm`.&#xD;&#xA;&#xD;&#xA;Based on that ink! documentation I thought it was necessary to remove use of Contract Ref from the Contract References Approach if I was going to use the Builder approach instead, however I was not able remove having to import the sub-contract that I want to call as a dependency of the main contract since in the documentation [here][9] it seems necessary to provide the Contract Ref in the Builder Approach implementation example like this `build_create::&lt;OtherContractRef&gt;()`.&#xD;&#xA;&#xD;&#xA;Whilst I was able to get the above steps 0-5 to work, I wasn't able to solve the [previous question][10], and **I got errors running step 6**, which calls the sub-contract via the main contract, since it outputs:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;Calling contract method get ...&#xD;&#xA;ERROR: Pre-submission dry-run failed. Use --skip-dry-run to skip this step.&#xD;&#xA;```&#xD;&#xA;And I then ran it with `--skip-dry-run` as the error suggests I do by adding these additional options [here][11]:&#xD;&#xA;```&#xD;&#xA;    --gas 200000000000&#xD;&#xA;    --proof-size 100000000000&#xD;&#xA;    --skip-dry-run&#xD;&#xA;```&#xD;&#xA;then instead it outputs the below error, which based on [this question][12], which indicates that a panic has occurred, but in that `get()` method in the main contract [here][13] I feel like I'm already handling errors appropriately, and the `get()` method it should call in the sub-contract is basic as shown [here][14].&#xD;&#xA;```bash&#xD;&#xA;Calling contract method get ...&#xD;&#xA;ERROR: ModuleError: Contracts::ContractTrapped: [&quot;Contract trapped during execution.&quot;]&#xD;&#xA;```&#xD;&#xA;**How would I fully remove using Contracts Ref now that I'm using the Builders Approach incase that is the cause of the error??**&#xD;&#xA;&#xD;&#xA;Note: Unfortunately it doesn't seem possible to debug using this Builder Approach though. They highlight this limitation in the ink! documentation _You will not be able to get any feedback about this at at compile time. You will only find out your call failed at runtime!_.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/q/8901/83&#xD;&#xA;  [2]: https://github.com/ltfschoen/InkTemplate/pull/16/commits/ed4290e1fc13624388bd97a2fcee9c4f1a3296d0&#xD;&#xA;  [3]: https://github.com/paritytech/ink-examples/blob/main/basic_contract_caller&#xD;&#xA;  [4]: https://use.ink/basics/cross-contract-calling#builders&#xD;&#xA;  [5]: https://github.com/ltfschoen/InkTemplate/pull/16/commits/455c222c08127f461b2f23897ead1663a9e1d927&#xD;&#xA;  [6]: https://github.com/ltfschoen/InkTemplate/blob/unnamed/README.md#setup-docker-container-&#xD;&#xA;  [7]: https://substrate.stackexchange.com/questions/3992/i-get-a-the-executed-contract-exhausted-its-gas-limit-when-attempting-to-inst&#xD;&#xA;  [8]: https://substrate.stackexchange.com/questions/8445/cross-contract-instantiation-failed-with-transferfailed/8447#8447&#xD;&#xA;  [9]: https://use.ink/basics/cross-contract-calling#createbuilder&#xD;&#xA;  [10]: https://substrate.stackexchange.com/questions/8901/why-cant-i-still-directly-call-method-in-sub-contract-of-basic-contract-caller&#xD;&#xA;  [11]: https://github.com/ltfschoen/InkTemplate/pull/16/commits/455c222c08127f461b2f23897ead1663a9e1d927#diff-5b2787966dfcd6f68c1db89beb454f6113e3d519c12c149f8cc6ebb36e2e48a3R183&#xD;&#xA;  [12]: https://substrate.stackexchange.com/questions/7457/contracttrapped-transfer-from-calleetrapped&#xD;&#xA;  [13]: https://github.com/ltfschoen/InkTemplate/pull/16/commits/455c222c08127f461b2f23897ead1663a9e1d927#diff-84af1add043372bf3be8123a2d3477b5f1d436cc0dbbf322c0bcd3c99249adb2R67&#xD;&#xA;  [14]: https://github.com/ltfschoen/InkTemplate/pull/16/files#diff-16556624fa5972a5348e9b062eb7965d702c694b78d5190aa7097dc66d70a79bR28" ContentLicense="CC BY-SA 4.0" />
  <row Id="35081" PostHistoryTypeId="1" PostId="8904" RevisionGUID="e42c54e6-5f0c-4052-8b1d-e6e05e4412c9" CreationDate="2023-06-16T09:36:00.647" UserId="83" Text="How to use the Builders Approach in the basic-contract-caller example without using the Contract References approach?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35082" PostHistoryTypeId="3" PostId="8904" RevisionGUID="e42c54e6-5f0c-4052-8b1d-e6e05e4412c9" CreationDate="2023-06-16T09:36:00.647" UserId="83" Text="|ink|cross-contract-call|basic-contract-caller|contract-references-approach|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35083" PostHistoryTypeId="5" PostId="4606" RevisionGUID="3fda767a-3374-4a8d-83c7-4d2d24d3d63c" CreationDate="2023-06-16T09:40:48.487" UserId="165" Comment="added 2 characters in body" Text="When swapping between two parachains you are transfering slot information of each one to the other, same thing happens with crowdloan info.&#xD;&#xA;&#xD;&#xA;[`swap` is part of registrar pallet][1], and defines that for this case, both paras are parachains at the same time, the logic handling the swap will be defined at runtime level.&#xD;&#xA;```rust&#xD;&#xA;// --snip&#xD;&#xA;// If both chains are currently parachains, there is nothing funny we&#xD;&#xA;// need to do for their lifecycle management, just swap the underlying&#xD;&#xA;// data.&#xD;&#xA;T::OnSwap::on_swap(id, other);&#xD;&#xA;// --snip&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If we check registrar pallet config on Kusama we can see the following:&#xD;&#xA;```rust&#xD;&#xA;impl paras_registrar::Config for Runtime {&#xD;&#xA;	type Event = Event;&#xD;&#xA;	type Origin = Origin;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type OnSwap = (Crowdloan, Slots); // implementations of OnSwap on these pallets&#xD;&#xA;	type ParaDeposit = ParaDeposit;&#xD;&#xA;	type DataDepositPerByte = DataDepositPerByte;&#xD;&#xA;	type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo&lt;Runtime&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;So, when swapping, the logic handling the information movement is located in the following pallets, per runtime definition:&#xD;&#xA;&#xD;&#xA; - [crowdloan][2]: swapping Funds information between paras.&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; crate::traits::OnSwap for Pallet&lt;T&gt; {&#xD;&#xA;	fn on_swap(one: ParaId, other: ParaId) {&#xD;&#xA;		Funds::&lt;T&gt;::mutate(one, |x| Funds::&lt;T&gt;::mutate(other, |y| sp_std::mem::swap(x, y)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; - [slots][3]: swapping Leases information between paras.&#xD;&#xA;``` rust&#xD;&#xA;impl&lt;T: Config&gt; crate::traits::OnSwap for Pallet&lt;T&gt; {&#xD;&#xA;	fn on_swap(one: ParaId, other: ParaId) {&#xD;&#xA;		Leases::&lt;T&gt;::mutate(one, |x| Leases::&lt;T&gt;::mutate(other, |y| sp_std::mem::swap(x, y)))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Meaning that if there was a parachain, with `ParaId=2222` which is at its last LP, close to the end of its parachain lifecycle, and it swaps with another parachain with `ParaId=3333` that has more LPs, meaning it will be parachain for longer.&#xD;&#xA;`2222` will receive the LPs of `3333`, then we achieve to keep `2222` for longer as a parachain. `3333` in the other hand will end its parachain lifecycle when `2222` was going to, as it holds the `Leases` information that was `2222`'s before the swap.&#xD;&#xA;Similar story with `Funds` info.&#xD;&#xA;&#xD;&#xA;So answering your question, `ParaId`s don't swap, but you can make one of them stick for longer, and thus keep on using it, and this doesn't present any kind of problems.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/6217ef5e29023375876460d3e831d6463c074bdd/runtime/common/src/paras_registrar.rs#L274&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/66374ef1f8dce7ce072e5ae7fdff87b660f04a66/runtime/common/src/crowdloan/mod.rs#L819-L823&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/slots/mod.rs#L328-L332" ContentLicense="CC BY-SA 4.0" />
  <row Id="35084" PostHistoryTypeId="5" PostId="8501" RevisionGUID="564862a2-1cdc-4e7f-b6e7-05e78b35ec37" CreationDate="2023-06-16T10:06:24.287" UserId="2372" Comment="edited body" Text="How do I verify I have the correct version of substrate binaries and libraries as required by substrate-parachain-template, and How do I write a rust-toolchain.toml file that matches the versions required by substrate node template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35085" PostHistoryTypeId="2" PostId="8905" RevisionGUID="30f46c4d-73b0-40ee-ab88-932cd789c614" CreationDate="2023-06-16T10:19:18.957" UserId="4277" Text="Currently i was using substrate node template and now i have done all my work in that i want to add now i want to make it for my production use my own blockchain, Can someone tell me is there any guide that what changes i have to make in the template node to make it my own chain and how can i deploy it as my own blockchain so it is ready for anyone to connect with it and deploy contracts on that." ContentLicense="CC BY-SA 4.0" />
  <row Id="35087" PostHistoryTypeId="1" PostId="8905" RevisionGUID="30f46c4d-73b0-40ee-ab88-932cd789c614" CreationDate="2023-06-16T10:19:18.957" UserId="4277" Text="Production ready substrate chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="35088" PostHistoryTypeId="3" PostId="8905" RevisionGUID="30f46c4d-73b0-40ee-ab88-932cd789c614" CreationDate="2023-06-16T10:19:18.957" UserId="4277" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35089" PostHistoryTypeId="2" PostId="8906" RevisionGUID="c7f742f7-715c-4c95-b2ba-f02664110391" CreationDate="2023-06-16T10:31:13.750" UserId="2762" Text="I was executing a transaction using Alice account to make a sudo call in local Rococo Network&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let alice = PairSigner::new(AccountKeyring::Alice.pair())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am trying to change it to use my own account following this previous answers on StackExchange in: [Is it possible to make a transaction with my own account?][1].&#xD;&#xA;To test it I got the Alice's keys from: [What are the predefined accounts (ALICE, BOB, etc)?][2]&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let mnemonic_phrase = std::env::var(&quot;SEED&quot;).expect(&quot;Error: No mnemonic phrase&quot;);&#xD;&#xA;let pair = sp_core::sr25519::Pair::from_string(&amp;mnemonic_phrase, None).unwrap();&#xD;&#xA;let alice = PairSigner::new(pair);&#xD;&#xA;&#xD;&#xA;println!(&quot;pair: {:?}&quot;, pair.public());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It looks like is recovering Alice account fine, but when I try to execute the extrinsic I am getting an error: `Error: Metadata(IncompatibleCodegen)`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3854/is-it-possible-to-make-a-transaction-with-my-own-account&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/41/what-are-the-predefined-accounts-alice-bob-etc" ContentLicense="CC BY-SA 4.0" />
  <row Id="35091" PostHistoryTypeId="1" PostId="8906" RevisionGUID="c7f742f7-715c-4c95-b2ba-f02664110391" CreationDate="2023-06-16T10:31:13.750" UserId="2762" Text="Error Metadata(IncompatibleCodegen) - subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="35092" PostHistoryTypeId="3" PostId="8906" RevisionGUID="c7f742f7-715c-4c95-b2ba-f02664110391" CreationDate="2023-06-16T10:31:13.750" UserId="2762" Text="|extrinsic|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35093" PostHistoryTypeId="2" PostId="8907" RevisionGUID="f3828b87-4018-4da7-bc98-5c7bf33bf5b6" CreationDate="2023-06-16T10:38:12.703" UserId="94" Text="You can see where the bulk part comes from:  &#xD;&#xA;```pre&#xD;&#xA;BridgePolkadotGrandpa CurrentAuthoritySet (max_values: Some(1), max_size: Some(4000012), added: 4000507, mode: MaxEncodedLen)&#xD;&#xA;```&#xD;&#xA;It is using the `MaxEncodedLen` of that type to calculate the worst-case proof size. You configured `MaxBridgedAuthorities` to be [100k](https://github.com/darwinia-network/darwinia/blob/fc35306420e515de56575c483c6fcfe8b357b285/runtime/crab/src/pallets/bridge_grandpa.rs#L29).  &#xD;&#xA;That means it will assume the worst case to have 100k entries in the authority set - therefore resulting in 4 MB, which seems to be in line with 40 byte per authority from [here](https://github.com/paritytech/cumulus/blob/9e1afcafb580b77379bebb60bb823f05c9ef8a16/bridges/modules/grandpa/src/storage_types.rs#L130).  &#xD;&#xA;I am not sure why 100k (or if that is a good number) but it should be possible to do post-dispatch correction with the [`unused_proof_size`](https://github.com/paritytech/cumulus/blob/9e1afcafb580b77379bebb60bb823f05c9ef8a16/bridges/modules/grandpa/src/storage_types.rs#LL70C9-L70C26) function to refund the unused Proof weight." ContentLicense="CC BY-SA 4.0" />
  <row Id="35095" PostHistoryTypeId="5" PostId="8905" RevisionGUID="a01ebaec-9b67-409b-b9aa-85c57c2bbb8e" CreationDate="2023-06-16T12:32:51.427" UserId="354" Comment="deleted 44 characters in body" Text="Currently i am using `substrate-node-template` and I have done all my work in that I want to make it production ready, Can someone tell me is there any guide that what changes I have to make in the template node to make it my own chain and how can i deploy it as my own blockchain so it is ready for anyone to connect with it and deploy contracts on that." ContentLicense="CC BY-SA 4.0" />
  <row Id="35096" PostHistoryTypeId="2" PostId="8908" RevisionGUID="9bf041f4-524b-45e2-bd66-7a804a846ff1" CreationDate="2023-06-16T12:56:13.713" UserId="2762" Text="I guess you want to use the [Sporran Wallet][1] to do some kind of authentication using DIDs or Verifiable Credentials that the users hold in their wallets.&#xD;&#xA;&#xD;&#xA;You have to implement first your logic using the [KILT SDK][2] (see the documentation [here][3]). Can take a look into [DIDsign][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.sporran.org/&#xD;&#xA;  [2]: https://github.com/KILTprotocol/sdk-js&#xD;&#xA;  [3]: https://docs.kilt.io/docs/develop/sdk/quickstart/&#xD;&#xA;  [4]: https://github.com/BTE-Trusted-Entity/didsign" ContentLicense="CC BY-SA 4.0" />
  <row Id="35098" PostHistoryTypeId="2" PostId="8909" RevisionGUID="576cea31-e0a5-4b28-aea4-a9186f87c6d9" CreationDate="2023-06-16T12:59:08.970" UserId="354" Text="You first need to decide what consensus you want to use for block production [babe][1] or [aura][2], as `node-template` use aura and [substrate][3] uses babe.&#xD;&#xA;&#xD;&#xA;You must be familiar with how to set a [private network][4] you just need to set up the network on any cloud service like `AWS`, there is no specific guide on how to launch a production ready chain. You can follow [this][5] if it helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/glossary/#blind-assignment-of-blockchain-extension-babe&#xD;&#xA;  [2]: https://docs.substrate.io/reference/glossary/#authority-round-aura&#xD;&#xA;  [3]: https://github.com/paritytech/substrate&#xD;&#xA;  [4]: https://docs.substrate.io/tutorials/build-a-blockchain/simulate-network/&#xD;&#xA;  [5]: https://wiki.polkadot.network/docs/maintain-bootnode" ContentLicense="CC BY-SA 4.0" />
  <row Id="35100" PostHistoryTypeId="2" PostId="8910" RevisionGUID="907f6ac6-1af5-4c83-aff2-5fbc1c41040b" CreationDate="2023-06-16T13:13:36.947" UserId="3317" Text="Bootnodes don't necessarily need to be rpc nodes. Bootnodes are simply there to have a node join the network.&#xD;&#xA;&#xD;&#xA;In addition, light clients will not only establish connections with RPC nodes. That's the cool thing regarding light clients. They join the network like any other node. " ContentLicense="CC BY-SA 4.0" />
  <row Id="35102" PostHistoryTypeId="4" PostId="8902" RevisionGUID="3dc2de6a-73e2-4549-91d2-07e2215a5ceb" CreationDate="2023-06-16T13:23:39.860" UserId="94" Comment="Fixing title" Text="How does the benchmark calculate the proof size?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35103" PostHistoryTypeId="2" PostId="8911" RevisionGUID="5e5a1e51-63b7-483d-b561-569ab6be2c5b" CreationDate="2023-06-16T14:02:29.527" UserId="2898" Text="While using `offchain` workers when do we want to use a `StorageLock` and when would we want to use a `mutate` function on `StorageValueRef` since both of them are kind of lock on db." ContentLicense="CC BY-SA 4.0" />
  <row Id="35105" PostHistoryTypeId="1" PostId="8911" RevisionGUID="5e5a1e51-63b7-483d-b561-569ab6be2c5b" CreationDate="2023-06-16T14:02:29.527" UserId="2898" Text="Offchain Storage lock vs compare-set/mutate function" ContentLicense="CC BY-SA 4.0" />
  <row Id="35106" PostHistoryTypeId="3" PostId="8911" RevisionGUID="5e5a1e51-63b7-483d-b561-569ab6be2c5b" CreationDate="2023-06-16T14:02:29.527" UserId="2898" Text="|database|offchain|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35107" PostHistoryTypeId="2" PostId="8912" RevisionGUID="5f5d3874-9006-4bcf-a3a1-19c9fe6db253" CreationDate="2023-06-16T14:08:45.063" UserId="2762" Text="&#xD;&#xA;The first resource I'd go is the [Network Maintainers][1] section in the Polkadot wiki, where you have guides to set up the validators, nodes...&#xD;&#xA;&#xD;&#xA;I want to share with you previous questions on StackExchange about this topic:&#xD;&#xA;- [Solo Substrate chains - are there any examples yet?][2].&#xD;&#xA;- [How to deploy a hardened, secure, production-ready Substrate node?][3]&#xD;&#xA;- [How we can go live as solochain?][4]&#xD;&#xA;&#xD;&#xA;Also, if you want the smart contract functionality on top of the `substrate-node-template`, you have been using you have to add the [Pallet Contracts][5] or the EVM pallets if you want to allow the deployment of EVM smart contracts (Solidity).&#xD;&#xA;You can take a look in these templates:&#xD;&#xA;- [Substrate-contracts-node][6], for a node with the pallet contracts.&#xD;&#xA;- [Frontier][7], a template with EVM.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-index&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1517/solo-substrate-chains-are-there-any-examples-yet&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/2060/how-to-deploy-a-hardened-secure-production-ready-substrate-node?rq=1&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/8114/how-we-can-go-live-as-solochain/&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/tree/master/frame/contracts&#xD;&#xA;  [6]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [7]: https://github.com/paritytech/frontier" ContentLicense="CC BY-SA 4.0" />
  <row Id="35109" PostHistoryTypeId="2" PostId="8913" RevisionGUID="9d66611f-d217-4bc6-a0ca-a708768248a1" CreationDate="2023-06-16T14:20:31.733" UserId="2762" Text="Check this guide from the Polkadot Wiki: [Set up a Full Node][1]. Running as a simple sync node, only the state of the past 256 blocks will be kept, if you want all the history [run as an Archive Node][2].&#xD;&#xA;&#xD;&#xA;If you want a faster sync you can use the flag `--sync warp` &#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;--sync &lt;SYNC_MODE&gt;&#xD;&#xA;    Blockchain syncing mode.&#xD;&#xA;    &#xD;&#xA;    - `full`: Download and validate full blockchain history.&#xD;&#xA;    - `fast`: Download blocks and the latest state only.&#xD;&#xA;    - `fast-unsafe`: Same as `fast`, but skip downloading state proofs.&#xD;&#xA;    - `warp`: Download the latest state and proof.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;More information about why is faster: [Is GRANDPA warp sync the recommended method for syncing a node?][3] and in the [Polkadot Protocol Specification][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-sync&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/maintain-sync#running-an-archive-node&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/5855/is-grandpa-warp-sync-the-recommended-method-for-syncing-a-node&#xD;&#xA;  [4]: https://spec.polkadot.network/chap-sync#sect-sync-warp" ContentLicense="CC BY-SA 4.0" />
  <row Id="35111" PostHistoryTypeId="52" PostId="8902" RevisionGUID="682b4575-c755-4ed5-b1f7-901824b6acfc" CreationDate="2023-06-16T14:27:28.513" />
  <row Id="35112" PostHistoryTypeId="2" PostId="8914" RevisionGUID="ed0121cd-eb04-4478-b1eb-d5d85cf8cc42" CreationDate="2023-06-16T14:37:28.807" UserId="2762" Text="1- No, unless you scan the blockchain to see all the events related to that account you won't know if has been reaped before.&#xD;&#xA;&#xD;&#xA;&gt; Having an account go below the existential deposit causes that account&#xD;&#xA;&gt; to be reaped. The account will be wiped from the blockchain's state to&#xD;&#xA;&gt; conserve space, along with any funds in that address. You do not lose&#xD;&#xA;&gt; access to the reaped address - as long as you have your private key or&#xD;&#xA;&gt; recovery phrase, you can still use the address - but it needs a top-up&#xD;&#xA;&gt; of another existential deposit to be able to interact with the chain.&#xD;&#xA;&#xD;&#xA;This is how the clean up of the account works under the hood: [How does Substrate clean up accounts whose balance is below the existential deposit?][1]&#xD;&#xA;&#xD;&#xA;2- If your pallet depend on an account (consumers) or may need the existence of this account for the pallet own purposes (sufficients).&#xD;&#xA;&#xD;&#xA;See this previous StackExchange answers for more detailed explanations:&#xD;&#xA;- [What is the meaning of the account provider, sufficients and consumer?][2]&#xD;&#xA;- [Do assets (from the asset pallet on State\[mine/mint\]) have an existential deposit?][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/4964/2762&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/263/what-is-the-meaning-of-the-account-provider-sufficients-and-consumer&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/5917/do-assets-from-the-asset-pallet-on-statemine-mint-have-an-existential-deposi" ContentLicense="CC BY-SA 4.0" />
  <row Id="35114" PostHistoryTypeId="6" PostId="8892" RevisionGUID="ca79d5ef-d13a-418e-be0c-0d1c64077d31" CreationDate="2023-06-16T14:47:08.950" UserId="2762" Comment="edited tags" Text="|extrinsic|evm|frontier|moonbeam|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35115" PostHistoryTypeId="5" PostId="8899" RevisionGUID="821a8849-02fb-4fa1-9b51-b6cef583e951" CreationDate="2023-06-16T16:13:01.233" UserId="4330" Comment="added 233 characters in body" Text="I've been working on getting a test relay up and running in the cloud (Docker containers running on Debian virtual machines) for remote testing, and we've got everything running. The relay chain is able to sync, and sees the parachain. The collators see each other. We then noticed the following:&#xD;&#xA;&#xD;&#xA;1) The parachain is trying to collate, but the blocks are never picked up by the relay.&#xD;&#xA;2) We're getting a log that collation was not advertised to any validators.&#xD;&#xA;3) That seems to be because finality is dropping behind on the relay chain, to the point where the relay's finalized block was 200 behind the current best.&#xD;&#xA;4) 2 of our 3 validators are always offline, and it cycles almost perfectly. So the online validator will be A, then next block B, then next block C. That would cause the slow and stalled finality, and probably the lack of collation being advertised.&#xD;&#xA;&#xD;&#xA;For reference, we also just registered a parathread on Rococo and put a request through for a temporary parachain slot, currently waiting for onboarding. My hope was to check whether that parachain worked appropriately.&#xD;&#xA;&#xD;&#xA;I also tested this exact relay/para chain spec pair locally and it worked perfectly.&#xD;&#xA;&#xD;&#xA;Has anyone seen something like this before? Thanks.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Both the relay and the parachain are on polkadot-v0.9.37. We're running the parachain with&#xD;&#xA;```&#xD;&#xA;parachain-node --collator --force-authoring --chain raw-parachain-chainspec.json --base-path /tmp/parachain/alice --port 40333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --rpc-methods Unsafe --name Fennel0 --node-key $(cat para-key.sh) --unsafe-ws-external --rpc-external --rpc-cors=all -- --execution wasm --chain /app/polkadotspec.json --port 30343 --ws-port 9977 --bootnodes /ip4/[relay_ip]/tcp/30333/p2p/12D3KooWLj8FgbwDtLQbA5ozWqqx6vM1n2rmjwQMczSiDveyWa5G --rpc-external --ws-external --prometheus-external --rpc-cors all&#xD;&#xA;```&#xD;&#xA;and the relay bootnode with&#xD;&#xA;```&#xD;&#xA;polkadot --validator --base-path /tmp/relay/alice --chain /app/chainspec.json --port 30333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --name FnlDot0 --node-key $(cat node_key) --rpc-cors all --prometheus-external --rpc-methods Unsafe --rpc-external --ws-external&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;After re-running, our Relay network is working again. All three nodes are in and finality has been running fine. Our parachain is, however, still not collating.&#xD;&#xA;&#xD;&#xA;Here's a pastebin for the boot node's log: https://pastebin.com/raw/VAC1a50W&#xD;&#xA;&#xD;&#xA;And one of the collator logs:&#xD;&#xA;https://pastebin.com/raw/EyCUCRKD&#xD;&#xA;&#xD;&#xA;The Dockerfile for our relay nodes is https://github.com/fennelLabs/polkadot/blob/release-v0.9.37/Dockerfile&#xD;&#xA;&#xD;&#xA;And the Dockerfile for our parachain nodes is https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/Dockerfile" ContentLicense="CC BY-SA 4.0" />
  <row Id="35116" PostHistoryTypeId="2" PostId="8915" RevisionGUID="79451ce7-adbc-4184-8fca-e3ad592b98da" CreationDate="2023-06-16T16:24:19.670" UserId="3316" Text="I found myself the answer and I put it there if it can help anyone else.&#xD;&#xA;&#xD;&#xA;I need to create the following struct:&#xD;&#xA;&#xD;&#xA;ContractCall {&#xD;&#xA;  origin : AccountId, &#xD;&#xA;  dest : AccountId,&#xD;&#xA;  value : Balance,&#xD;&#xA;  gas_limit : Option&lt;WeightV2&gt;,&#xD;&#xA;  storage_deposit_limit : Option&lt;Balance&gt;,&#xD;&#xA;  data: Vec&lt;u8&gt;,&#xD;&#xA;}&#xD;&#xA;In my case the data is the concatenation of:&#xD;&#xA;  - the selector of the method: [u8;4]&#xD;&#xA;  - the args of the method: Vec&lt;u8&gt;&#xD;&#xA;&#xD;&#xA;and encode the whole struct." ContentLicense="CC BY-SA 4.0" />
  <row Id="35118" PostHistoryTypeId="5" PostId="8899" RevisionGUID="109c46ea-cbcf-4b72-8133-753d19282513" CreationDate="2023-06-16T16:42:01.407" UserId="4330" Comment="added 148 characters in body" Text="I've been working on getting a test relay up and running in the cloud (Docker containers running on Debian virtual machines) for remote testing, and we've got everything running. The relay chain is able to sync, and sees the parachain. The collators see each other. We then noticed the following:&#xD;&#xA;&#xD;&#xA;1) The parachain is trying to collate, but the blocks are never picked up by the relay.&#xD;&#xA;2) We're getting a log that collation was not advertised to any validators.&#xD;&#xA;3) That seems to be because finality is dropping behind on the relay chain, to the point where the relay's finalized block was 200 behind the current best.&#xD;&#xA;4) 2 of our 3 validators are always offline, and it cycles almost perfectly. So the online validator will be A, then next block B, then next block C. That would cause the slow and stalled finality, and probably the lack of collation being advertised.&#xD;&#xA;&#xD;&#xA;For reference, we also just registered a parathread on Rococo and put a request through for a temporary parachain slot, currently waiting for onboarding. My hope was to check whether that parachain worked appropriately.&#xD;&#xA;&#xD;&#xA;I also tested this exact relay/para chain spec pair locally and it worked perfectly.&#xD;&#xA;&#xD;&#xA;Has anyone seen something like this before? Thanks.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Both the relay and the parachain are on polkadot-v0.9.37. We're running the parachain with&#xD;&#xA;```&#xD;&#xA;parachain-node --collator --force-authoring --chain raw-parachain-chainspec.json --base-path /tmp/parachain/alice --port 40333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --rpc-methods Unsafe --name Fennel0 --node-key $(cat para-key.sh) --unsafe-ws-external --rpc-external --rpc-cors=all -- --execution wasm --chain /app/polkadotspec.json --port 30343 --ws-port 9977 --bootnodes /ip4/[relay_ip]/tcp/30333/p2p/12D3KooWLj8FgbwDtLQbA5ozWqqx6vM1n2rmjwQMczSiDveyWa5G --rpc-external --ws-external --prometheus-external --rpc-cors all&#xD;&#xA;```&#xD;&#xA;and the relay bootnode with&#xD;&#xA;```&#xD;&#xA;polkadot --validator --base-path /tmp/relay/alice --chain /app/chainspec.json --port 30333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --name FnlDot0 --node-key $(cat node_key) --rpc-cors all --prometheus-external --rpc-methods Unsafe --rpc-external --ws-external&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;After re-running, our Relay network is working again. All three nodes are in and finality has been running fine. Our parachain is, however, still not collating.&#xD;&#xA;&#xD;&#xA;Here's a pastebin for the boot node's log: https://pastebin.com/raw/VAC1a50W&#xD;&#xA;&#xD;&#xA;And one of the collator logs:&#xD;&#xA;https://pastebin.com/raw/EyCUCRKD&#xD;&#xA;&#xD;&#xA;The Dockerfile for our relay nodes is https://github.com/fennelLabs/polkadot/blob/release-v0.9.37/Dockerfile&#xD;&#xA;&#xD;&#xA;And the Dockerfile for our parachain nodes is https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/Dockerfile&#xD;&#xA;&#xD;&#xA;UPDATED LOGS WITH -lparachain::collator-protocol=trace&#xD;&#xA;&#xD;&#xA;Bootnode: https://pastebin.com/raw/CnYe4M3r&#xD;&#xA;&#xD;&#xA;Collator: https://pastebin.com/raw/EG2C7uY7" ContentLicense="CC BY-SA 4.0" />
  <row Id="35119" PostHistoryTypeId="2" PostId="8916" RevisionGUID="982cdf9b-3f48-45ee-b7e2-237d634abe47" CreationDate="2023-06-16T16:57:26.820" UserId="234" Text="I am trying to define the Era of a [mortal transaction][1] in two ways :&#xD;&#xA;&#xD;&#xA;**Manually**&#xD;&#xA;&#xD;&#xA;Meaning I am not using the [mortal][2] function and I have to input the correct values for `Period`and `Phase` myself which are the parameters of the variant `Mortal`. As mentioned also in this [SE answer][3], `Period` and `Phase` have to be hex in SCALE format. So I can double check that I am inputting the right values by using also these [substrate js utilities][4] where the last option helps me convert &quot;u8 Array to Hex&quot; and vice versa. &#xD;&#xA;&#xD;&#xA;The question in this case is : for the `Phase` argument how do I know what is the correct value to input (so I can then scale format it accordingly) ?&#xD;&#xA;&#xD;&#xA;*From the [definition][5] and the [example][6] it seems to me that the value of `phase` depends on the value of `period` but still is not quite clear to me how I can calculate it if I have to input it manually.*&#xD;&#xA;&#xD;&#xA;**Not Manually**&#xD;&#xA;&#xD;&#xA;Meaning I am using the [mortal][2] function. In this case, the arguments I need to pass are `period` and `current`. When using this, I do not have to worry about the value of `phase` since it is calculated [here][7] based on the two aforementioned arguments. &#xD;&#xA;&#xD;&#xA;However, the question in this case is : How do I know which are the correct values for `period` and `current`?&#xD;&#xA;&#xD;&#xA;Thank you so much for any feedback on this one!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/aeb24c2545422b1157bd6a85f4017aaf5287678a/primitives/runtime/src/generic/era.rs#L47&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/aeb24c2545422b1157bd6a85f4017aaf5287678a/primitives/runtime/src/generic/era.rs#L65&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/1902/234&#xD;&#xA;  [4]: https://www.shawntabrizi.com/substrate-js-utilities/&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/aeb24c2545422b1157bd6a85f4017aaf5287678a/primitives/runtime/src/generic/era.rs#L38L46&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/aeb24c2545422b1157bd6a85f4017aaf5287678a/primitives/runtime/src/generic/era.rs#L50L56&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/aeb24c2545422b1157bd6a85f4017aaf5287678a/primitives/runtime/src/generic/era.rs#L67" ContentLicense="CC BY-SA 4.0" />
  <row Id="35121" PostHistoryTypeId="1" PostId="8916" RevisionGUID="982cdf9b-3f48-45ee-b7e2-237d634abe47" CreationDate="2023-06-16T16:57:26.820" UserId="234" Text="Era of Mortal Extrinsic - How to set `period`, `phase` and `current` arguments" ContentLicense="CC BY-SA 4.0" />
  <row Id="35122" PostHistoryTypeId="3" PostId="8916" RevisionGUID="982cdf9b-3f48-45ee-b7e2-237d634abe47" CreationDate="2023-06-16T16:57:26.820" UserId="234" Text="|extrinsic|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35123" PostHistoryTypeId="5" PostId="8899" RevisionGUID="6bc6da74-fe8f-4f7a-b876-9ae73e5a1505" CreationDate="2023-06-16T16:57:40.240" UserId="4330" Comment="added 422 characters in body" Text="I've been working on getting a test relay up and running in the cloud (Docker containers running on Debian virtual machines) for remote testing, and we've got everything running. The relay chain is able to sync, and sees the parachain. The collators see each other. We then noticed the following:&#xD;&#xA;&#xD;&#xA;1) The parachain is trying to collate, but the blocks are never picked up by the relay.&#xD;&#xA;2) We're getting a log that collation was not advertised to any validators.&#xD;&#xA;3) That seems to be because finality is dropping behind on the relay chain, to the point where the relay's finalized block was 200 behind the current best.&#xD;&#xA;4) 2 of our 3 validators are always offline, and it cycles almost perfectly. So the online validator will be A, then next block B, then next block C. That would cause the slow and stalled finality, and probably the lack of collation being advertised.&#xD;&#xA;&#xD;&#xA;For reference, we also just registered a parathread on Rococo and put a request through for a temporary parachain slot, currently waiting for onboarding. My hope was to check whether that parachain worked appropriately.&#xD;&#xA;&#xD;&#xA;I also tested this exact relay/para chain spec pair locally and it worked perfectly.&#xD;&#xA;&#xD;&#xA;Has anyone seen something like this before? Thanks.&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Both the relay and the parachain are on polkadot-v0.9.37. We're running the parachain with&#xD;&#xA;```&#xD;&#xA;parachain-node --collator --force-authoring --chain raw-parachain-chainspec.json --base-path /tmp/parachain/alice --port 40333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --rpc-methods Unsafe --name Fennel0 --node-key $(cat para-key.sh) --unsafe-ws-external --rpc-external --rpc-cors=all -- --execution wasm --chain /app/polkadotspec.json --port 30343 --ws-port 9977 --bootnodes /ip4/[relay_ip]/tcp/30333/p2p/12D3KooWLj8FgbwDtLQbA5ozWqqx6vM1n2rmjwQMczSiDveyWa5G --rpc-external --ws-external --prometheus-external --rpc-cors all&#xD;&#xA;```&#xD;&#xA;and the relay bootnode with&#xD;&#xA;```&#xD;&#xA;polkadot --validator --base-path /tmp/relay/alice --chain /app/chainspec.json --port 30333 --ws-port 9944 --rpc-port 9934 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --name FnlDot0 --node-key $(cat node_key) --rpc-cors all --prometheus-external --rpc-methods Unsafe --rpc-external --ws-external&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;After re-running, our Relay network is working again. All three nodes are in and finality has been running fine. Our parachain is, however, still not collating.&#xD;&#xA;&#xD;&#xA;Here's a pastebin for the boot node's log: https://pastebin.com/raw/VAC1a50W&#xD;&#xA;&#xD;&#xA;And one of the collator logs:&#xD;&#xA;https://pastebin.com/raw/EyCUCRKD&#xD;&#xA;&#xD;&#xA;The Dockerfile for our relay nodes is https://github.com/fennelLabs/polkadot/blob/release-v0.9.37/Dockerfile&#xD;&#xA;&#xD;&#xA;And the Dockerfile for our parachain nodes is https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/Dockerfile&#xD;&#xA;&#xD;&#xA;We are exposing more ports at runtime through `docker run`.&#xD;&#xA;&#xD;&#xA;UPDATED LOGS WITH -lparachain::collator-protocol=trace&#xD;&#xA;&#xD;&#xA;Bootnode: https://pastebin.com/raw/CnYe4M3r&#xD;&#xA;&#xD;&#xA;Collator: https://pastebin.com/raw/EG2C7uY7&#xD;&#xA;&#xD;&#xA;And just for more information and context, here's some sample scripts we're using to provision our VMs and run the nodes:&#xD;&#xA;&#xD;&#xA;Bootnode: https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/fennel-protocol-boot-terraform-start.sh&#xD;&#xA;&#xD;&#xA;Collator: https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/fennel-protocol-collator-1-terraform-start.sh" ContentLicense="CC BY-SA 4.0" />
  <row Id="35125" PostHistoryTypeId="5" PostId="8907" RevisionGUID="83808cbb-014b-4fbe-8fb0-efee9d08d4b5" CreationDate="2023-06-16T18:16:12.513" UserId="94" Comment="added 527 characters in body" Text="You can see where the bulk part comes from:  &#xD;&#xA;```pre&#xD;&#xA;BridgePolkadotGrandpa CurrentAuthoritySet (max_values: Some(1), max_size: Some(4000012), added: 4000507, mode: MaxEncodedLen)&#xD;&#xA;```&#xD;&#xA;It is using the `MaxEncodedLen` of that type to calculate the worst-case proof size. You configured `MaxBridgedAuthorities` to be [100k](https://github.com/darwinia-network/darwinia/blob/fc35306420e515de56575c483c6fcfe8b357b285/runtime/crab/src/pallets/bridge_grandpa.rs#L29).  &#xD;&#xA;That means it will assume the worst case to have 100k entries in the authority set - therefore resulting in 4 MB, which seems to be in line with 40 byte per authority from [here](https://github.com/paritytech/cumulus/blob/9e1afcafb580b77379bebb60bb823f05c9ef8a16/bridges/modules/grandpa/src/storage_types.rs#L130).  &#xD;&#xA;I am not sure why 100k (or if that is a good number) but it should be possible to do post-dispatch correction with the [`unused_proof_size`](https://github.com/paritytech/cumulus/blob/9e1afcafb580b77379bebb60bb823f05c9ef8a16/bridges/modules/grandpa/src/storage_types.rs#LL70C9-L70C26) function to refund the unused Proof weight.&#xD;&#xA;&#xD;&#xA;The `MaxEncodedLen` is used since that represents the worst case. Note that benchmarking always has to consider the worst case scenario. There exists an alternative benchmarking mode; `measured` that will use the size of the actual accessed storage elements and add some overhead estimations on top. It looks like this: [`#[pov_mode = Measured]`](https://github.com/paritytech/substrate/blob/be58e48f609c044fb832d78cf0f85c51e894d2dc/frame/benchmarking/pov/src/benchmarking.rs#L105) but should not be needed in 99% of cases." ContentLicense="CC BY-SA 4.0" />
  <row Id="35126" PostHistoryTypeId="2" PostId="8917" RevisionGUID="1e40d55e-f8c0-4890-a739-6379c6232737" CreationDate="2023-06-16T19:43:20.467" UserId="3171" Text="I want to execute extra logic when xcm call deliver and deposit succeed.&#xD;&#xA;I can pass extra parameters in beneficiary MultiLocation with a description what todo next.&#xD;&#xA;I have a MultiLocation &#xD;&#xA;MultiLocation { &#xD;&#xA;        parents: 0, interior: X4(&#xD;&#xA;		PalletInstance(pallet_id), &#xD;&#xA;		AccountId32{ id, network: None }, &#xD;&#xA;		GeneralIndex(chain_id), &#xD;&#xA;		AccountId32{ id: _, network: None } ) } =&gt; id,&#xD;&#xA;&#xD;&#xA;This is beneficiary in xcm (reserve_transfer_assets xcmPallet)&#xD;&#xA;&#xD;&#xA;I want to use AccountId32 from MultiLocation to send received xcm tokens on that account  but also apply/execute extra logic depends on other parameters as PalletInstance and GeneralIndex. &#xD;&#xA;&#xD;&#xA;I want your advise.&#xD;&#xA;Is it reasonable approach?&#xD;&#xA;&#xD;&#xA;I have this Location into Account Id convertor&#xD;&#xA;&#xD;&#xA;    pub struct AccountId32Batch&lt;AccountId&gt;(PhantomData&lt;AccountId&gt;);&#xD;&#xA;    impl&lt;AccountId: From&lt;[u8; 32]&gt; + Into&lt;[u8; 32]&gt; + Clone&gt;&#xD;&#xA;    	xcm_executor::traits::Convert&lt;MultiLocation, AccountId&gt; for AccountId32Batch&lt;AccountId&gt;&#xD;&#xA;    {&#xD;&#xA;    	fn convert(location: MultiLocation) -&gt; Result&lt;AccountId, MultiLocation&gt; {&#xD;&#xA;    		let id = match location {&#xD;&#xA;    			MultiLocation { parents: 0, interior: X4(&#xD;&#xA;    				PalletInstance(_), &#xD;&#xA;    				AccountId32{ id, network: None }, &#xD;&#xA;    				GeneralIndex(_), &#xD;&#xA;    				AccountId32{ id: _, network: None } ) } =&gt; id,&#xD;&#xA;    			_ =&gt; return Err(location),&#xD;&#xA;    		};&#xD;&#xA;    		Ok(id.into())&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	fn reverse(who: AccountId) -&gt; Result&lt;MultiLocation, AccountId&gt; {&#xD;&#xA;    		Err(who)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I want to execute extra logic when deposit succeeded.&#xD;&#xA;There is no `on_success_callback` in MultiCurrency. only on_failed&#xD;&#xA;https://github.com/open-web3-stack/open-runtime-module-library/blob/master/xcm-support/src/currency_adapter.rs#L148-L161&#xD;&#xA;&#xD;&#xA;So i will create wrapper for MultiCurrency to pass callback function that will be executed when deposit is succeed.&#xD;&#xA;&#xD;&#xA;What do you think about this approach?&#xD;&#xA;Did you ever see any similar behaviour that apply extra logic on deposit/withdraw success? " ContentLicense="CC BY-SA 4.0" />
  <row Id="35128" PostHistoryTypeId="1" PostId="8917" RevisionGUID="1e40d55e-f8c0-4890-a739-6379c6232737" CreationDate="2023-06-16T19:43:20.467" UserId="3171" Text="How to execute/apply extra logic when xcm call delivered and deposit is succeed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35129" PostHistoryTypeId="3" PostId="8917" RevisionGUID="1e40d55e-f8c0-4890-a739-6379c6232737" CreationDate="2023-06-16T19:43:20.467" UserId="3171" Text="|polkadot|parachain|xcm|substrate-parachain-template|orml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35130" PostHistoryTypeId="4" PostId="8917" RevisionGUID="fca16547-163c-49e0-b729-de1fe07d5990" CreationDate="2023-06-16T20:08:59.417" UserId="3171" Comment="edited title" Text="How to execute/apply extra logic when xcm call delivered and deposit is succeed? or register callback?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35131" PostHistoryTypeId="33" PostId="8841" RevisionGUID="d6e68a41-d2d5-4bc9-888f-86e75eea88a2" CreationDate="2023-06-17T00:17:38.570" UserId="181" Comment="23" />
  <row Id="35135" PostHistoryTypeId="2" PostId="8918" RevisionGUID="bf0df9c8-3243-4658-a9dd-6c82c64b90ab" CreationDate="2023-06-17T01:05:32.017" UserId="474" Text="Just some general points about transaction mortality from my digging and understanding so far:&#xD;&#xA;&#xD;&#xA;- The goal of mortality is to define when a transaction is valid from (must be some recent block hash/number) and _roughly_ how many blocks it'll be valid for until it expires and can no longer be added to a block.&#xD;&#xA;- There are two parts to mortality; first, the `Era` (`Mortal` or `Immortal`; the `Mortal` variant containing a &quot;phase&quot; and &quot;period&quot; value), and second the &quot;mortality checkpoint&quot; (the block hash of the first block that the transaction is valid from). &#xD;&#xA;- The `Era` is encoded into a compact 1 or 2 byte representation (for immortal or mortal respectively) and is a part of the &quot;signed extra&quot; details of the extrinsic. This compact encoding is important to save space in a block.&#xD;&#xA;- The &quot;mortality checkpoint&quot; hash is a part of the signer payload; ie it's not a part of the extrinsic details, but the node must be able to reproduce it to verify the signature. The node uses the &quot;period&quot; value to work out _which_ block hash should be a part of the signer payload for verification.&#xD;&#xA;&#xD;&#xA;With that in mind, let's get to the questions:&#xD;&#xA;&#xD;&#xA;#### Not Manually&#xD;&#xA;&#xD;&#xA;The `Era::mortal` function takes two arguments, `period` and `current` (both u64s).&#xD;&#xA;&#xD;&#xA;- `current` is the block number that you'd like the transaction to be valid from. This block number **must** point to the same block as the block hash provided in the &quot;mortality checkpoint&quot; signer payload argument. Probably it should be some recent block (ie fetching the latest finalized block for instance and using that block hash/number seems like a good default approach).&#xD;&#xA;- `period` is the number of blocks after this block that the transaction will be valid for. It should be a power of 2 in the range [4,65536] (the `Era::mortal` function will make this be the case if the value you provide is not already). The reason for this rounding-to-power-of-two is, I think, so that it can be compressed (along with the internal &quot;phase&quot; value) into just 2 bytes. &#xD;&#xA;&#xD;&#xA;These two values are what you really care about when defining mortality; from which block is the tx valid from and after which block does it expire.&#xD;&#xA;&#xD;&#xA;#### Manually&#xD;&#xA;&#xD;&#xA;If you're not using the `Era::manual(..)` function (eg because an equivalent is not available in the language you're using), personally my approach would be to copy the logic of it out into your own function. Take care to also copy the logic for how the `Era` is SCALE encoded and decoded, if that's not handled for you ([see here](https://github.com/paritytech/substrate/blob/aeb24c2545422b1157bd6a85f4017aaf5287678a/primitives/runtime/src/generic/era.rs#L103)).&#xD;&#xA;&#xD;&#xA;Internally, the `Era::Mortal` stores a `period` and `phase` as u64s, and when being SCALE encoded or decoded, it mangles these into just 2 bytes. &#xD;&#xA;- `period` has already been described above. &#xD;&#xA;- `phase` is a value that a validator can use to work out which block hash it should expect in the signer payload in order to produce an identical signature to that which was given with the tx. [See `Era::mortal()`](https://github.com/paritytech/substrate/blob/aeb24c2545422b1157bd6a85f4017aaf5287678a/primitives/runtime/src/generic/era.rs#L65) for how it's calculated.&#xD;&#xA;&#xD;&#xA;The spec goes into more detail about the mortality phase and period: https://spec.polkadot.network/id-extrinsics#id-mortality" ContentLicense="CC BY-SA 4.0" />
  <row Id="35145" PostHistoryTypeId="50" PostId="3187" RevisionGUID="226ebbf9-015b-4a3e-925f-d51525738a4f" CreationDate="2023-06-17T09:03:30.417" UserId="-1" />
  <row Id="35146" PostHistoryTypeId="2" PostId="8921" RevisionGUID="946ee304-b522-46c6-b116-1d8ab9606a37" CreationDate="2023-06-17T18:51:56.087" UserId="83" Text="Please try the following:&#xD;&#xA; - It seems like you've tried to created a custom chain definition to synchronise and validate with different authorities. &#xD;&#xA;But you've only created a custom chain specification customSpec.json based on code changes in your &quot;dev&quot; chain id that you specified in src/chain_spec.rs. &#xD;&#xA;But when you've tried to then build a &quot;raw&quot; chain definition for the new chain from the custom chain specification you haven't used `--raw`, so try using that as shown below:&#xD;&#xA;```&#xD;&#xA;./target/release/transmit-node build-spec --chain customSpec.json --disable-default-bootnode --raw &gt; dev.json&#xD;&#xA;```&#xD;&#xA; - Have you tried changing the `--node-key` to `88dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee` (without the `0x` prefix)? &#xD;&#xA; - Why don't you explicitly specify a different `--rpc-port` for Bob (i.e. 9934) and Charlie (i.e. 9935) other than the RPC port 9933 that Alice is using? &#xD;&#xA; - Why are you running two Charlie validators (both using `--charlie`) instead of just one Charlie and one Dave `--dave`? &#xD;&#xA; - Have you tried using `--unsafe-ws-external` and `--unsafe-rpc-external` too? &#xD;&#xA; - Does `unsafe` need to use a capital letter like `--rpc-methods=Unsafe`? &#xD;&#xA; - Why do you need `--in-peers 256`? &#xD;&#xA; - Have you tried using `--execution=native -lruntime=debug`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35148" PostHistoryTypeId="5" PostId="8921" RevisionGUID="4b7e6ddd-8c00-43c4-8f23-1bf2cac191a2" CreationDate="2023-06-17T19:03:42.450" UserId="83" Comment="cleanup" Text="Please try the following:&#xD;&#xA; - It seems like you've tried to created a custom chain definition to synchronise and validate with different authorities. &#xD;&#xA;But you've only created a custom chain specification customSpec.json based on code changes in your &quot;dev&quot; chain id that you specified in src/chain_spec.rs. &#xD;&#xA;But when you've tried to then build a &quot;raw&quot; chain definition for the new chain from the custom chain specification you haven't used `--raw`, so try using that as shown below:&#xD;&#xA;```&#xD;&#xA;./target/release/transmit-node build-spec --chain customSpec.json --disable-default-bootnode --raw &gt; dev.json&#xD;&#xA;```&#xD;&#xA; - Have you tried changing the `--node-key` to `88dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee` (without the `0x` prefix)? &#xD;&#xA; - Why don't you explicitly specify a different `--rpc-port` for Bob (i.e. 9934) and Charlie (i.e. 9935) other than the RPC port 9933 that Alice is using? &#xD;&#xA; - Why are you running two Charlie validators (both using `--charlie`) instead of just one Charlie and one Dave `--dave`? &#xD;&#xA; - Have you tried using `--unsafe-ws-external` and `--unsafe-rpc-external` too? &#xD;&#xA; - Does `unsafe` need to use a capital letter like `--rpc-methods=Unsafe`? &#xD;&#xA; - Why do you need `--in-peers 256`? &#xD;&#xA; - Have you tried using `--execution=native -lruntime=debug`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/justinFrevert/transmit-test/blob/main/node/src/chain_spec.rs#L103" ContentLicense="CC BY-SA 4.0" />
  <row Id="35149" PostHistoryTypeId="5" PostId="8921" RevisionGUID="2b85b754-b534-4ff3-96e8-b06574431bd3" CreationDate="2023-06-17T19:22:19.070" UserId="83" Comment="mention wrong chain id used" Text="Please try the following:&#xD;&#xA; - It seems like you've tried to created a custom chain definition to synchronise and validate with different authorities. But you've only created a custom chain specification customSpec.json based on code changes in a &quot;dev&quot; chain id that should be specified in src/chain_spec.rs. But you don't have a chain id &quot;dev&quot; since it appears you renamed that chain id to &quot;tread_dev&quot; [here][1], so create your custom chain specification with the correct chain id that exists:&#xD;&#xA;```bash&#xD;&#xA;./target/release/transmit-node build-spec --chain tread_dev --disable-default-bootnode &gt; customSpec.json&#xD;&#xA;``` &#xD;&#xA;Also after trying to generate a chain specification you've tried to then build a &quot;raw&quot; chain definition for the new chain from the custom chain specification, but you haven't used `--raw`, so try using that flag as shown below:&#xD;&#xA;```&#xD;&#xA;./target/release/transmit-node build-spec --chain customSpec.json --disable-default-bootnode --raw &gt; dev.json&#xD;&#xA;```&#xD;&#xA; - Have you tried changing the `--node-key` to `88dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee` (without the `0x` prefix)? &#xD;&#xA; - Why don't you explicitly specify a different `--rpc-port` for Bob (i.e. 9934) and Charlie (i.e. 9935) other than the RPC port 9933 that Alice is using? &#xD;&#xA; - Why are you running two Charlie validators (both using `--charlie`) instead of just one Charlie and one Dave `--dave`? &#xD;&#xA; - Have you tried using `--unsafe-ws-external` and `--unsafe-rpc-external` too? &#xD;&#xA; - Does `unsafe` need to use a capital letter like `--rpc-methods=Unsafe`? &#xD;&#xA; - Why do you need `--in-peers 256`? &#xD;&#xA; - Have you tried using `--execution=native -lruntime=debug`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/justinFrevert/transmit-test/blob/main/node/src/chain_spec.rs#L69" ContentLicense="CC BY-SA 4.0" />
  <row Id="35150" PostHistoryTypeId="5" PostId="8921" RevisionGUID="91f3f862-c021-4e86-97e7-be14d499ba2b" CreationDate="2023-06-17T19:53:32.413" UserId="83" Comment="show season key steps" Text="Please try the following:&#xD;&#xA; - It seems like you've tried to created a custom chain definition to synchronise and validate with different authorities. But you've only created a custom chain specification customSpec.json based on code changes in a &quot;dev&quot; chain id that should be specified in src/chain_spec.rs. But you don't have a chain id &quot;dev&quot; since it appears you renamed that chain id to &quot;tread_dev&quot; [here][1], so create your custom chain specification with the correct chain id that exists:&#xD;&#xA;```bash&#xD;&#xA;./target/release/transmit-node build-spec --chain tread_dev --disable-default-bootnode &gt; customSpec.json&#xD;&#xA;``` &#xD;&#xA;Also after trying to generate a chain specification you've tried to then build a &quot;raw&quot; chain definition for the new chain from the custom chain specification, but you haven't used `--raw`, so try using that flag as shown below:&#xD;&#xA;```&#xD;&#xA;./target/release/transmit-node build-spec --chain customSpec.json --disable-default-bootnode --raw &gt; dev.json&#xD;&#xA;```&#xD;&#xA; - Have you tried changing the `--node-key` to `88dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee` (without the `0x` prefix)? &#xD;&#xA; - Why don't you explicitly specify a different `--rpc-port` for Bob (i.e. 9934) and Charlie (i.e. 9935) and Dave (i.e. 9936) other than the RPC port 9933 that Alice is using? &#xD;&#xA; - Why are you running two Charlie validators (both using `--charlie`) instead of just one Charlie and one Dave `--dave`?&#xD;&#xA; - In the code for your chain specification [here][1] you mention four authorities Alice, Bob, Charlie, and Dave. You're also using Babe, ImOnline, and Grandpa session keys [here][2]. &#xD;&#xA;So you need to generate season keys for each of those four authorities like in the example shown below (which only generates them for Alice, so repeat for Bob, and Charlie, and Dave by changing it from `Alice` to `Bob`, etc):&#xD;&#xA;```bash&#xD;&#xA;subkey inspect --scheme ed25519 &quot;//Alice&quot;&#xD;&#xA;subkey inspect --scheme sr25519 &quot;//Alice&quot;//babe&#xD;&#xA;subkey inspect --scheme sr25519 &quot;//Alice&quot;//imonline&#xD;&#xA;subkey inspect --scheme ed25519 &quot;//Alice&quot;//grandpa&#xD;&#xA;```&#xD;&#xA;Then after starting all the validator nodes insert each of their session keys (only Alice shown below). Repeat below for Bob, Charlie, and Dave using their respective secret key and unique Public Key (hex) that was shown in the output from the previous step. Also change the respective RPC port of each cURL request to match the explicit different RPC port that you started each authority with so Alice (i.e. 9933), Bob (i.e. 9934), Charlie (i.e. 9935) and Dave (i.e. 9936) &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;babe&quot;, &quot;//Alice//babe&quot;, &quot;0x46ffa3a808850b2ad55732e958e781146ed1e6436ffb83290e0cb810aacf5070&quot;],&quot;id&quot;:1 }' 127.0.0.1:9933&#xD;&#xA;curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;imon&quot;, &quot;//Alice//imonline&quot;, &quot;0xee725cf87fa2d6f264f26d7d8b84b1054d2182cdcce51fdea95ec868be9d1e17&quot;],&quot;id&quot;:1 }' 127.0.0.1:9933&#xD;&#xA;curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;gran&quot;, &quot;//Alice//grandpa&quot;, &quot;0x6e2de2e5087b56ed2370359574f479d7e5da1973e17ca1b55882c4773f154d2f&quot;],&quot;id&quot;:1 }' 127.0.0.1:9933&#xD;&#xA;```&#xD;&#xA;Then restart all the authorities and verify they're all finalising blocks. &#xD;&#xA; - Have you tried using `--unsafe-ws-external` and `--unsafe-rpc-external` too? &#xD;&#xA; - Does `unsafe` need to use a capital letter like `--rpc-methods=Unsafe`? &#xD;&#xA; - Why do you need `--in-peers 256`? &#xD;&#xA; - Have you tried using `--execution=native -lruntime=debug`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/justinFrevert/transmit-test/blob/main/node/src/chain_spec.rs#L69&#xD;&#xA;  [2]: https://github.com/justinFrevert/transmit-test/blob/main/node/src/chain_spec.rs#L53" ContentLicense="CC BY-SA 4.0" />
  <row Id="35152" PostHistoryTypeId="5" PostId="8841" RevisionGUID="0fb66c9e-9ee2-4f58-bb75-de20b6444849" CreationDate="2023-06-18T00:42:53.920" UserId="181" Comment="deleted 8 characters in body" Text="I am trying to spin up a small BABE PoS network of four nodes and not able to get GRANDPA to start. &#xD;&#xA;&#xD;&#xA;It's hard to know what exact pieces of information to provide, here are some notes.&#xD;&#xA;&#xD;&#xA;A few notes:&#xD;&#xA; - I am inserting the session keys immediately with the --alice, --bob, etc flags for testing, for now, and I can confirm the expected keys are set via RPC.&#xD;&#xA; - Blocks produce, authored by any validator running,but don't finalize. All the nodes are peered correctly.&#xD;&#xA; - In a previous configuration, I noted at least Alice could get finalization to start https://substrate.stackexchange.com/questions/844/grandpa-not-finalizing-with-2-of-3-nodes-on-network. Then I switched to four nodes due to that answer.&#xD;&#xA; - I note every node spits out the following grandpa log message endlessly&#xD;&#xA;```sh&#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Casting prevote for round 1    &#xD;&#xA;DEBUG tokio-runtime-worker grandpa: Announcing block 0xb0d7…cad6 to peers which we voted on in round 1 in set 0    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Round 1: Got incoming message    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.18.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/10.0.0.143/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.17.0.1/tcp/30334    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWBWC4U9DsmbrDHqDBvUbk9o6xbxnSZaDyXpzpPsJm6GVe /ip4/172.23.0.1/tcp/30334    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/10.0.0.143/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.23.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.18.0.1/tcp/30335    &#xD;&#xA;INFO tokio-runtime-worker libp2p_mdns::behaviour: discovered: 12D3KooWCtSAfr4yMvLZDXvid8vLPHKWyG5JLYi6MUFPj93nXbd2 /ip4/172.17.0.1/tcp/30335    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)    &#xD;&#xA;TRACE tokio-runtime-worker grandpa: Polling round 1, state = State { prevote_ghost: None, finalized: None, estimate: None, completable: false }, step = Some(Prevoted)&#xD;&#xA;```&#xD;&#xA;Here is an example of the response from the roundState RPC. Any of the nodes report three keys in missing prevotes, and four in missing precommits, though I don't understand what to do with that information.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;{&#xD;&#xA;  setId: 0&#xD;&#xA;  best: {&#xD;&#xA;    round: 1&#xD;&#xA;    totalWeight: 4&#xD;&#xA;    thresholdWeight: 3&#xD;&#xA;    prevotes: {&#xD;&#xA;      currentWeight: 1&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;    precommits: {&#xD;&#xA;      currentWeight: 0&#xD;&#xA;      missing: [&#xD;&#xA;        0x3544624b6A684E4c707158337A715a644e426339&#xD;&#xA;        0x35454354777636635a356e4a51506b3674576661&#xD;&#xA;        0x354641396e51445667323637444564386d315A79&#xD;&#xA;        0x35476F4e6b66365764627843466E5064416E5959&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;  background: []&#xD;&#xA;}&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;You can see the code [here][1]&#xD;&#xA;I am starting the nodes like: &#xD;&#xA;```&#xD;&#xA; ./target/release/my-node --chain ./dev.json --node-key=&quot;3a9a7f43c5e6415106d09334fe698a33eda6c204667524a7127b475630e3953b&quot; --alice --in-peers 256 --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --base-path=&quot;./data/node1&quot;&#xD;&#xA;&#xD;&#xA; ./target/release/my-node --chain ./dev.json --bob --in-peers 256 --validator --ws-external --rpc-external --rpc-cors all --rpc-methods=unsafe --base-path=&quot;./data/node2&quot;&#xD;&#xA;&#xD;&#xA;and so on...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/justinFrevert/transmit-test" ContentLicense="CC BY-SA 4.0" />
  <row Id="35154" PostHistoryTypeId="50" PostId="8183" RevisionGUID="e0dca515-6d76-4c95-a202-5adc9bce5074" CreationDate="2023-06-18T03:07:15.830" UserId="-1" />
  <row Id="35156" PostHistoryTypeId="50" PostId="8558" RevisionGUID="03ae5726-7a18-4f2f-96b9-a488d935583c" CreationDate="2023-06-18T07:04:50.550" UserId="-1" />
  <row Id="35157" PostHistoryTypeId="34" PostId="8804" RevisionGUID="a2bff9d0-63d7-4c77-a621-c2eb27f13711" CreationDate="2023-06-18T08:06:05.747" UserId="-1" Comment="22" />
  <row Id="35158" PostHistoryTypeId="2" PostId="8922" RevisionGUID="55ac8c13-078f-47c6-8534-def5b489049a" CreationDate="2023-06-18T09:30:58.970" UserId="83" Text="I do not think resolving the error `ContractTrapped` needs Contracts Ref to be fully removed when using the Builders Approach.&#xD;&#xA;&#xD;&#xA;I tried using `try_invoke()` instead of `invoke()` [here][1] as suggested in the ink! documentation [here][2] and that improved feedback at compile time. Instead of the previous error `ContractTrapped` that was not helpful, it gave the error shown below that suggested it was transfer related:&#xD;&#xA;```&#xD;&#xA;DEBUG tokio-runtime-worker runtime::contracts: Execution finished with debug buffer: my_return_value Err(TransferFailed)&#xD;&#xA;error TransferFailed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in the main contract I changing it from `.transferred_value(10)` to `.transferred_value(0)` and that resolved the `TransferFailed` error. &#xD;&#xA;&#xD;&#xA;I only used `.transferred_value(10)` because they use that non-zero value in the CallBuilder example [here][3], but I do not know how it is possible to get a non-zero value to work. &#xD;&#xA;&#xD;&#xA;I was only able to get it to work using a value of `0` in `.transferred_value(0)`, but not with any larger number, even if I added `payable` in my code [here][4] or with `#[ink(message, payable)]` to the `flip()` method in the sub-contract that I was calling via the main contract, as mentioned in the ink! documentation [here][5].&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ltfschoen/InkTemplate/pull/16/commits/e5f449ad44479cc7a1afd70494eda010eaf96123#diff-84af1add043372bf3be8123a2d3477b5f1d436cc0dbbf322c0bcd3c99249adb2R80&#xD;&#xA;  [2]: https://use.ink/basics/cross-contract-calling#builder-error-handling&#xD;&#xA;  [3]: https://use.ink/basics/cross-contract-calling/#callbuilder&#xD;&#xA;  [4]: https://github.com/ltfschoen/InkTemplate/pull/16/commits/e5f449ad44479cc7a1afd70494eda010eaf96123#diff-16556624fa5972a5348e9b062eb7965d702c694b78d5190aa7097dc66d70a79bR23&#xD;&#xA;  [5]: https://use.ink/macros-attributes/payable" ContentLicense="CC BY-SA 4.0" />
  <row Id="35160" PostHistoryTypeId="2" PostId="8923" RevisionGUID="3a579359-6ca2-4236-b726-682ee10e7cdd" CreationDate="2023-06-18T11:55:33.323" UserId="2604" Text="I was looking at removing some extrinsics from my pallet and wanted to know the safe way of going about it.&#xD;&#xA;&#xD;&#xA; - Can/should I reuse the call_index? &#xD;&#xA; - How will historic transaction data be impacted?&#xD;&#xA;&#xD;&#xA;Anything else I need to watch out for?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="35162" PostHistoryTypeId="1" PostId="8923" RevisionGUID="3a579359-6ca2-4236-b726-682ee10e7cdd" CreationDate="2023-06-18T11:55:33.323" UserId="2604" Text="Safe way to remove an extrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="35163" PostHistoryTypeId="3" PostId="8923" RevisionGUID="3a579359-6ca2-4236-b726-682ee10e7cdd" CreationDate="2023-06-18T11:55:33.323" UserId="2604" Text="|pallet|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35164" PostHistoryTypeId="2" PostId="8924" RevisionGUID="d07b8e78-ee44-46b3-a260-55e9e5750d35" CreationDate="2023-06-18T16:22:49.727" UserId="3123" Text="In subxt we can have Rust types directly from scale-encoded runtime metadata. Is the same possible in polkadotjs? Is there a &quot;polkadotts&quot; which has typescript types automatically derived from runtime metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35166" PostHistoryTypeId="1" PostId="8924" RevisionGUID="d07b8e78-ee44-46b3-a260-55e9e5750d35" CreationDate="2023-06-18T16:22:49.727" UserId="3123" Text="How to get runtime types in polkadotjs (typescript)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35167" PostHistoryTypeId="3" PostId="8924" RevisionGUID="d07b8e78-ee44-46b3-a260-55e9e5750d35" CreationDate="2023-06-18T16:22:49.727" UserId="3123" Text="|polkadot-js|metadata|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35168" PostHistoryTypeId="5" PostId="8924" RevisionGUID="c4af59f5-8292-4e0a-81c3-db96aebdfc4d" CreationDate="2023-06-18T16:28:41.177" UserId="3123" Comment="add link to doc" Text="In subxt we can have Rust types directly from scale-encoded runtime metadata. Is the same possible in polkadotjs? Is there a &quot;polkadotts&quot; which has typescript types automatically derived from runtime metadata?&#xD;&#xA;&#xD;&#xA;- doc https://polkadot.js.org/docs/api/start/types.create" ContentLicense="CC BY-SA 4.0" />
  <row Id="35170" PostHistoryTypeId="50" PostId="4939" RevisionGUID="3f706904-c4d4-41ed-a37e-69291d78472b" CreationDate="2023-06-19T01:03:00.310" UserId="-1" />
  <row Id="35171" PostHistoryTypeId="2" PostId="8925" RevisionGUID="c7e0c323-b8bc-4523-a8f7-1413e515c625" CreationDate="2023-06-19T02:30:52.123" UserId="116" Text="***What is the best practice regarding try-runtime, what errors and warnings should one look out for in the output.***&#xD;&#xA;&#xD;&#xA;When upgrading a chain it is good practice to try to execute storage migration before upgrade&#xD;&#xA;[Substrate docs describes how to enable try-runtime][1]&#xD;&#xA;and [this answer describes how it works][2]&#xD;&#xA;&#xD;&#xA;So now we have a try-runtime step in CI, but what output from try-runtime requires actions from the engineer preparing the upgrade?&#xD;&#xA;Is the only potential outcome that one of the upstream dependencies is about to run a costly migration on chain upgrade? Are there other problems which this could reveal?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/tools/use-try-runtime/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/3526/116" ContentLicense="CC BY-SA 4.0" />
  <row Id="35173" PostHistoryTypeId="1" PostId="8925" RevisionGUID="c7e0c323-b8bc-4523-a8f7-1413e515c625" CreationDate="2023-06-19T02:30:52.123" UserId="116" Text="How to use try runtime in when upgrading a chain/parachin to latest substrate release?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35174" PostHistoryTypeId="3" PostId="8925" RevisionGUID="c7e0c323-b8bc-4523-a8f7-1413e515c625" CreationDate="2023-06-19T02:30:52.123" UserId="116" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35175" PostHistoryTypeId="2" PostId="8926" RevisionGUID="3dfa71be-4eef-4460-a7f2-6209b84653af" CreationDate="2023-06-19T03:00:06.607" UserId="4062" Text="I'm learning about transaction lifecycle in substrate docs, I saw the diagram but I don't understand the flow operation of this diagram. Please, let's explain the flow operation of the transaction lifecycle.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mYZx7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35177" PostHistoryTypeId="1" PostId="8926" RevisionGUID="3dfa71be-4eef-4460-a7f2-6209b84653af" CreationDate="2023-06-19T03:00:06.607" UserId="4062" Text="Transaction lifecycle substrate, Polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="35178" PostHistoryTypeId="3" PostId="8926" RevisionGUID="3dfa71be-4eef-4460-a7f2-6209b84653af" CreationDate="2023-06-19T03:00:06.607" UserId="4062" Text="|polkadot|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35179" PostHistoryTypeId="5" PostId="8926" RevisionGUID="c0d1d3b2-e554-44af-8161-bdf8eadbed3f" CreationDate="2023-06-19T05:20:46.583" UserId="2281" Comment="added 4 characters in body" Text="I'm learning about `transaction lifecycle` in `substrate` docs, I saw the diagram but I don't understand the flow operation of this diagram. Please, let's explain the flow operation of the transaction lifecycle.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mYZx7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35180" PostHistoryTypeId="2" PostId="8927" RevisionGUID="1ac0ef83-c2b1-41cd-a5a4-b33eb8c3360b" CreationDate="2023-06-19T05:33:10.353" UserId="4338" Text="I need to get the rpc_url value set initially from the explorer. The localStorageGet rpc function returns the correct value of the rpc_url. &#xD;&#xA;This returns `https://eth-mainnet.g.alchemy.com/v2/MY_API_KEY`&#xD;&#xA;&#xD;&#xA;But while fetching the rpc_url through the storage call like this: &#xD;&#xA;&#xD;&#xA;    let eth_execution_rpc_url = StorageValueRef::persistent(ETHEREUM_EXECUTION_RPC)&#xD;&#xA;        .get::&lt;Vec&lt;u8&gt;&gt;()&#xD;&#xA;        .map_err(|_| OffchainWorkerError::GetStorageFailed)?&#xD;&#xA;        .ok_or(OffchainWorkerError::EthRpcNotSet)?;&#xD;&#xA;    &#xD;&#xA;     let endpoint: &amp;str =&#xD;&#xA;        core::str::from_utf8(&amp;eth_execution_rpc_url).map_err(|_| OffchainWorkerError::FormatBytesFailed)?;&#xD;&#xA;&#xD;&#xA;This returns `endpoint = ttps://eth-mainnet.g.alche`&#xD;&#xA;&#xD;&#xA;I've checked the offchain storage docs and I think I'm querying the value correctly.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35182" PostHistoryTypeId="1" PostId="8927" RevisionGUID="1ac0ef83-c2b1-41cd-a5a4-b33eb8c3360b" CreationDate="2023-06-19T05:33:10.353" UserId="4338" Text="Fetching offchain storage value returns different value than the value fetched using localStorageGet function" ContentLicense="CC BY-SA 4.0" />
  <row Id="35183" PostHistoryTypeId="3" PostId="8927" RevisionGUID="1ac0ef83-c2b1-41cd-a5a4-b33eb8c3360b" CreationDate="2023-06-19T05:33:10.353" UserId="4338" Text="|storage|offchain-worker|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35185" PostHistoryTypeId="5" PostId="8927" RevisionGUID="c7dafc26-e4a6-4c78-8ce7-235bae7adc2a" CreationDate="2023-06-19T05:52:34.517" UserId="2281" Comment="added 8 characters in body" Text="I need to get the rpc_url value set initially from the explorer. The localStorageGet rpc function returns the correct value of the rpc_url. &#xD;&#xA;This returns `https://eth-mainnet.g.alchemy.com/v2/MY_API_KEY`&#xD;&#xA;&#xD;&#xA;But while fetching the rpc_url through the storage call like this: &#xD;&#xA;```rs&#xD;&#xA;    let eth_execution_rpc_url = StorageValueRef::persistent(ETHEREUM_EXECUTION_RPC)&#xD;&#xA;        .get::&lt;Vec&lt;u8&gt;&gt;()&#xD;&#xA;        .map_err(|_| OffchainWorkerError::GetStorageFailed)?&#xD;&#xA;        .ok_or(OffchainWorkerError::EthRpcNotSet)?;&#xD;&#xA;    &#xD;&#xA;     let endpoint: &amp;str =&#xD;&#xA;        core::str::from_utf8(&amp;eth_execution_rpc_url).map_err(|_| OffchainWorkerError::FormatBytesFailed)?;&#xD;&#xA;```&#xD;&#xA;This returns `endpoint = ttps://eth-mainnet.g.alche`&#xD;&#xA;&#xD;&#xA;I've checked the offchain storage docs and I think I'm querying the value correctly.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35186" PostHistoryTypeId="5" PostId="8923" RevisionGUID="97317c7e-86e7-4625-aa1b-695182c01628" CreationDate="2023-06-19T06:20:27.550" UserId="354" Comment="added 4 characters in body" Text="I was looking at removing some extrinsics from my pallet and wanted to know the safe way of going about it.&#xD;&#xA;&#xD;&#xA; - Can/should I reuse the `call_index`? &#xD;&#xA; - How will `historic transaction` data be impacted?&#xD;&#xA;&#xD;&#xA;Anything else I need to watch out for?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="35187" PostHistoryTypeId="2" PostId="8928" RevisionGUID="27b801f6-1f81-49d9-8c7e-7e68721c4e3b" CreationDate="2023-06-19T06:32:44.557" UserId="2844" Text="I am using `staking-pallet` in my runtime [here](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/staking-pallet-testing) , added all the requirements and after that I try to check dependencies using `cargo check -p node-template-runtime --release` this command but I get this issue.&#xD;&#xA;&#xD;&#xA;the trait bound `Runtime: SendTransactionTypes&lt;pallet_election_provider_multi_phase::Call&lt;Runtime&gt;&gt;` is not satisfied&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CgHmT.png&#xD;&#xA;&#xD;&#xA;The code is [here](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/staking-pallet-testing)&#xD;&#xA;&#xD;&#xA;Someone please help. Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35189" PostHistoryTypeId="1" PostId="8928" RevisionGUID="27b801f6-1f81-49d9-8c7e-7e68721c4e3b" CreationDate="2023-06-19T06:32:44.557" UserId="2844" Text="The trait bound is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="35190" PostHistoryTypeId="3" PostId="8928" RevisionGUID="27b801f6-1f81-49d9-8c7e-7e68721c4e3b" CreationDate="2023-06-19T06:32:44.557" UserId="2844" Text="|substrate-node-template|pallet|substrate-node|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35191" PostHistoryTypeId="2" PostId="8929" RevisionGUID="1285339a-1b0f-4014-843a-2f2e164e4fa1" CreationDate="2023-06-19T06:41:11.490" UserId="251" Text="As the error said.&#xD;&#xA;&#xD;&#xA;You missed this.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/ae1a608c91a5da441a0ee7c26a4d5d410713580d/bin/node/runtime/src/lib.rs#L1314-L1320" ContentLicense="CC BY-SA 4.0" />
  <row Id="35193" PostHistoryTypeId="5" PostId="8927" RevisionGUID="1e8e69a1-8bae-4ede-8e87-74e6e04ffff3" CreationDate="2023-06-19T07:11:56.423" UserId="4338" Comment="added 84 characters in body" Text="I need to get the rpc_url value set initially from the explorer. The localStorageGet rpc function returns the correct value of the rpc_url. &#xD;&#xA;This returns `https://eth-mainnet.g.alchemy.com/v2/MY_API_KEY`&#xD;&#xA;&#xD;&#xA;But while fetching the rpc_url through the storage call like this: &#xD;&#xA;```rs&#xD;&#xA;    pub const ETHEREUM_EXECUTION_RPC: &amp;[u8] = b&quot;starknet::ETHEREUM_EXECUTION_RPC&quot;;&#xD;&#xA;    let eth_execution_rpc_url = StorageValueRef::persistent(ETHEREUM_EXECUTION_RPC)&#xD;&#xA;        .get::&lt;Vec&lt;u8&gt;&gt;()&#xD;&#xA;        .map_err(|_| OffchainWorkerError::GetStorageFailed)?&#xD;&#xA;        .ok_or(OffchainWorkerError::EthRpcNotSet)?;&#xD;&#xA;    &#xD;&#xA;     let endpoint: &amp;str =&#xD;&#xA;        core::str::from_utf8(&amp;eth_execution_rpc_url).map_err(|_| OffchainWorkerError::FormatBytesFailed)?;&#xD;&#xA;```&#xD;&#xA;This returns `endpoint = ttps://eth-mainnet.g.alche`&#xD;&#xA;&#xD;&#xA;I've checked the offchain storage docs and I think I'm querying the value correctly.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35195" PostHistoryTypeId="5" PostId="8928" RevisionGUID="6dfcaca8-4e21-4a6a-b452-d2c03e31c213" CreationDate="2023-06-19T07:25:14.507" UserId="2372" Comment="added 6 characters in body" Text="I am using `staking-pallet` in my runtime [here](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/staking-pallet-testing) , added all the requirements and after that I try to check dependencies using `cargo check -p node-template-runtime --release` this command but I'm getting this issue.&#xD;&#xA;&#xD;&#xA;the trait bound `Runtime: SendTransactionTypes&lt;pallet_election_provider_multi_phase::Call&lt;Runtime&gt;&gt;` is not satisfied&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CgHmT.png&#xD;&#xA;&#xD;&#xA;The code is [here](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/staking-pallet-testing)&#xD;&#xA;&#xD;&#xA;Someone please help. Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35198" PostHistoryTypeId="2" PostId="8931" RevisionGUID="1823164b-7a31-46ff-9f3c-8cbe88409516" CreationDate="2023-06-19T07:36:59.797" UserId="2372" Text="use `cargo update` command or Make the dependencies compatible with other in the `cargo.toml`" ContentLicense="CC BY-SA 4.0" />
  <row Id="35200" PostHistoryTypeId="5" PostId="8736" RevisionGUID="97a07be0-c496-465d-ad9d-be3d92605deb" CreationDate="2023-06-19T07:37:26.377" UserId="2372" Comment="added 52 characters in body" Text="    ```sh&#xD;&#xA;        error: failed to select a version for `zstd-sys`.&#xD;&#xA;            ... required by package `zstd-safe v4.1.1+zstd.1.5.0`&#xD;&#xA;            ... which satisfies dependency `zstd-safe = &quot;=4.1.1&quot;` of package `zstd v0.9.0+zstd.1.5.0`&#xD;&#xA;            ... which satisfies dependency `zstd = &quot;^0.9.0&quot;` of package `sp-maybe-compressed-blob v4.1.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;            ... which satisfies git dependency `sp-maybe-compressed-blob` of package `sc-executor-common v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;            ... which satisfies git dependency `sc-executor-common` of package `sc-executor v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;            ... which satisfies git dependency `sc-executor` of package `sc-client-api v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;            ... which satisfies git dependency `sc-client-api` of package `sc-block-builder v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;            ... which satisfies git dependency `sc-block-builder` of package `sc-finality-grandpa v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;            ... which satisfies git dependency `sc-finality-grandpa` of package `sc-finality-grandpa-rpc v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)`&#xD;&#xA;    &#xD;&#xA;    ``" ContentLicense="CC BY-SA 4.0" />
  <row Id="35201" PostHistoryTypeId="2" PostId="8932" RevisionGUID="5b0b9a73-51d6-4d49-91e3-ae99597b3210" CreationDate="2023-06-19T08:12:10.443" UserId="2762" Text="The transaction is submitted to a network within a JSON-RPC request and will be processed by an authoring node.&#xD;&#xA;&#xD;&#xA;Transactions are first validated using the rules that are defined in the runtime and queued on the local node in a transaction pool.&#xD;&#xA;After the initial validity check, the transaction pool periodically checks whether existing transactions in the pool are still valid. If a transaction is found to be invalid or has expired, it is dropped from the pool.&#xD;&#xA;&#xD;&#xA;If a transaction is identified as valid, the transaction pool moves the transaction into a transaction queue.&#xD;&#xA;The next block author node uses a priority system to order the transactions for the next block. The transactions are ordered from high to low priority until the block reaches the maximum weight or length.&#xD;&#xA;&#xD;&#xA;From the transaction queue the executive module orchestrates how transactions are executed to produce a block. Once the block is produced, the block is published to the network.&#xD;&#xA;&#xD;&#xA;**Other resources:**&#xD;&#xA;&#xD;&#xA;The [Substrate docs official][1] documentation has a summary that I like: &#xD;&#xA;&#xD;&#xA;&gt; 1.  The local node listens for transactions on the network.&#xD;&#xA;&gt; 2.  Each transaction is verified.&#xD;&#xA;&gt; 3. Valid transactions are placed in the transaction pool.&#xD;&#xA;&gt; 4. The transaction pool orders the valid transactions in the appropriate transaction queue and the executive module calls into the runtime to begin the next block.&#xD;&#xA;&gt; 5. Transactions are executed and state changes are stored in local memory.&#xD;&#xA;&gt; 6. The constructed block is published to the network.&#xD;&#xA;&#xD;&#xA;This previous StackExchange answer has a very detailed explanation with links into the codebase: [Transactions lifecycle][2]&#xD;&#xA;&#xD;&#xA;A video on youtube [Transaction lifecycle | Substrate Seminar][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/learn/transaction-lifecycle/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/2148/transactions-lifecycle&#xD;&#xA;  [3]: https://www.youtube.com/watch?v=3pfM0GOp02c" ContentLicense="CC BY-SA 4.0" />
  <row Id="35203" PostHistoryTypeId="2" PostId="8933" RevisionGUID="ff4b51df-a1bf-4d8a-bf20-f9219bd7cc63" CreationDate="2023-06-19T08:27:14.180" UserId="632" Text="Hello we are using frontier with substrate to be able to deploy evm smart contract.&#xD;&#xA;When I create a transfer between two evm address and that the second one does not exist, the node create a new ss58 address, but I cant figure out what is the used algo ? because it does not correspond to subkey is giving for example ? &#xD;&#xA;&#xD;&#xA;thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="35205" PostHistoryTypeId="1" PostId="8933" RevisionGUID="ff4b51df-a1bf-4d8a-bf20-f9219bd7cc63" CreationDate="2023-06-19T08:27:14.180" UserId="632" Text="How substrate / frontier convert address" ContentLicense="CC BY-SA 4.0" />
  <row Id="35206" PostHistoryTypeId="3" PostId="8933" RevisionGUID="ff4b51df-a1bf-4d8a-bf20-f9219bd7cc63" CreationDate="2023-06-19T08:27:14.180" UserId="632" Text="|evm|frontier|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35207" PostHistoryTypeId="5" PostId="8929" RevisionGUID="f7067e4f-9e7c-4dd9-91c0-fb37cc7bf629" CreationDate="2023-06-19T08:36:08.617" UserId="251" Comment="added 520 characters in body" Text="As the error said.&#xD;&#xA;&#xD;&#xA;You missed this.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/ae1a608c91a5da441a0ee7c26a4d5d410713580d/bin/node/runtime/src/lib.rs#L1314-L1320&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl&lt;C&gt; frame_system::offchain::SendTransactionTypes&lt;C&gt; for Runtime&#xD;&#xA;where&#xD;&#xA;	RuntimeCall: From&lt;C&gt;,&#xD;&#xA;{&#xD;&#xA;	type Extrinsic = UncheckedExtrinsic;&#xD;&#xA;	type OverarchingCall = RuntimeCall;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Why?&#xD;&#xA;&#xD;&#xA;Because it requires the `SendTransactionTypes` trait bound.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/ae1a608c91a5da441a0ee7c26a4d5d410713580d/frame/election-provider-multi-phase/src/lib.rs#LL575C2-L575C77&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub trait Config: frame_system::Config + SendTransactionTypes&lt;Call&lt;Self&gt;&gt; {&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35208" PostHistoryTypeId="2" PostId="8934" RevisionGUID="ae6a7335-20c6-44c0-b8e4-d46de5583ad2" CreationDate="2023-06-19T08:41:28.187" UserId="4319" Text="Question: I use substrate in order to develop polkadot and I need depth information about substrate validators. There are a lot of data about polkadot validators but i haven't seen usefull data about substrate validators. Are the two the same?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35210" PostHistoryTypeId="2" PostId="8935" RevisionGUID="6ceb1073-eac9-47cd-a8ce-d3d38449c29b" CreationDate="2023-06-19T08:44:11.720" UserId="4319" Text="I use substrate in order to develop polkadot and I need depth information about substrate validators. There are a lot of data about polkadot validators but i haven't seen usefull data about substrate validators. Are the two the same?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35212" PostHistoryTypeId="1" PostId="8935" RevisionGUID="6ceb1073-eac9-47cd-a8ce-d3d38449c29b" CreationDate="2023-06-19T08:44:11.720" UserId="4319" Text="the difference between polkadot validators and substrate validators: are they the same?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35213" PostHistoryTypeId="3" PostId="8935" RevisionGUID="6ceb1073-eac9-47cd-a8ce-d3d38449c29b" CreationDate="2023-06-19T08:44:11.720" UserId="4319" Text="|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35214" PostHistoryTypeId="5" PostId="8935" RevisionGUID="5d3fd477-6169-44b8-a7a1-221ff7fddf79" CreationDate="2023-06-19T08:44:55.907" UserId="4319" Comment="deleted 3 characters in body" Text="I use substrate in order to develop polkadot and I need depth information about substrate validators. There are a lot of data about polkadot validators but i haven't seen usefull data about substrate validators. Are they the same?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35215" PostHistoryTypeId="5" PostId="8935" RevisionGUID="0f731f81-a156-436b-badb-d29757fc95e6" CreationDate="2023-06-19T08:47:14.077" UserId="4319" Comment="added 49 characters in body" Text="I use substrate in order to develop polkadot and I need depth information about substrate validators. There are a lot of data about polkadot validators but i haven't seen usefull data about substrate validators. Are they the same? If no, please help me get the information I need" ContentLicense="CC BY-SA 4.0" />
  <row Id="35216" PostHistoryTypeId="2" PostId="8936" RevisionGUID="5b19b52a-e2b4-441e-89a4-832d33e15781" CreationDate="2023-06-19T08:55:32.550" UserId="2762" Text="You can calculated it with this tool: [Substrate EVM Utilities][1].&#xD;&#xA;An example with a random account generated:&#xD;&#xA;&#xD;&#xA;      Secret phrase:     worth wrestle meat ecology merry ginger online glad soda usage peasant lava&#xD;&#xA;      Network ID:        substrate&#xD;&#xA;      Secret seed:       0x8e940c2a136dadf87c3b4b408866ff5fb1cbb64893a933493341c5e400a81690&#xD;&#xA;      Public key (hex):  0x381faf1906bf0ea763e7e25f110b26b880680d55bed21f52b76d9d5973fcee6e&#xD;&#xA;      Account ID:        0x381faf1906bf0ea763e7e25f110b26b880680d55bed21f52b76d9d5973fcee6e&#xD;&#xA;      Public key (SS58): 5DLHx6nDCn9EiYHryuyELhvsDKBmZGwLZthSdD3cshjAzusN&#xD;&#xA;      SS58 Address:      5DLHx6nDCn9EiYHryuyELhvsDKBmZGwLZthSdD3cshjAzusN&#xD;&#xA;&#xD;&#xA;I calculated the Ethereum Address for my account, basically truncating the Public key (hex) value above: `0x381faf1906bf0ea763e7e25f110b26b880680d55`&#xD;&#xA;&#xD;&#xA;See the Susbtrate docs [Access EVM accounts][2], for more info. And I open a question here a long time with a doubt with the private keys on Frontier if you want more information on that too: [Private key for EVM Frontier][3] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/frontier-node-template/blob/main/utils/README.md#--evm-address-address&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts/&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/6674/private-key-for-evm-frontier" ContentLicense="CC BY-SA 4.0" />
  <row Id="35218" PostHistoryTypeId="2" PostId="8937" RevisionGUID="f074badc-e420-4ccc-b7a9-e9c1e4e5087e" CreationDate="2023-06-19T09:08:13.223" UserId="165" Text="Each call receives an index depending on its position in the Call Enum of a pallet. One could as well explicitly assign a concrete index to a call, for instance:&#xD;&#xA;&#xD;&#xA;[source][1]&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;#[pallet::weight(&lt;T as Config&gt;::WeightInfo::register_fast_unstake())]&#xD;&#xA;pub fn register_fast_unstake(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This index will be, among other things, used to properly encode the call.&#xD;&#xA;&#xD;&#xA;By explicitly assigning indices to each call you are shielding your calls against getting another index after a runtime upgrade where one other call has been removed, reorganising the indices for all the following calls in this pallet's Call Enum.&#xD;&#xA;&#xD;&#xA;Similarly this happens as well with pallets in `construct_runtime!`, where we can also assign explicit indices for them.&#xD;&#xA;&#xD;&#xA;My advise would be that in this runtime upgrade you are about to make, assign explicit indices to your calls too in case you are not doing that already so that when removing a certain call it doesn't mess with the rest of indices.&#xD;&#xA;&#xD;&#xA;After the upgrade clients encoding non existing calls will just get an error back, but if the rest of them kept the same index and its pallet did too, those call encodings should work fine.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/ae1a608c91a5da441a0ee7c26a4d5d410713580d/frame/fast-unstake/src/lib.rs#L338" ContentLicense="CC BY-SA 4.0" />
  <row Id="35220" PostHistoryTypeId="5" PostId="4992" RevisionGUID="4d64d9eb-35c1-45b1-883d-6e55f9dc2a18" CreationDate="2023-06-19T09:22:32.410" UserId="116" Comment="Spelling cant -&gt; can't" Text="&gt; error: failed to load manifest for workspace member `/home/kaioh/dropbox-clone/node`&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load manifest for dependency `node-dropbox-runtime`&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load manifest for dependency `pallet-dropbox`&#xD;&#xA;Caused by:&#xD;&#xA;  failed to read `/home/kaioh/dropbox-clone/pallets/template/Cargo.toml`&#xD;&#xA;Caused by:&#xD;&#xA;  No such file or directory (os error 2)&#xD;&#xA;&#xD;&#xA;I am trying to create a custom pallet in substrate for a dropbox clone. I forked the substrate node template and tried to edit it to suit what I want to do. I have tried checking through my `cargo.toml` files for node, runtime and also pallet template and can't find anything wrong. Can someone give me any tips on what to look for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35221" PostHistoryTypeId="24" PostId="4992" RevisionGUID="4d64d9eb-35c1-45b1-883d-6e55f9dc2a18" CreationDate="2023-06-19T09:22:32.410" Comment="Proposed by 116 approved by 2281, 2976 edit id of 461" ContentLicense="CC BY-SA 4.0" />
  <row Id="35222" PostHistoryTypeId="2" PostId="8938" RevisionGUID="937799f9-d805-4191-8211-3301dde26009" CreationDate="2023-06-19T09:37:05.220" UserId="474" Text="If you run into an `Metadata(IncompatibleCodegen)`, it means that the metadata used to generate the static interface (either via the `subxt` macro or `subxt codegen` CLI tool) is out of date (or otherwise different) from the metadata of the node you're trying to talk to. &#xD;&#xA;&#xD;&#xA;The error basically means &quot;the interface has changed, and so your code needs to be updated&quot;. In this case, the thing to do is download new metadata from the node, and then fix any compilation errors that crop up as a result of the interface changes :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35224" PostHistoryTypeId="5" PostId="8918" RevisionGUID="bf9bc312-a4a3-4525-add0-6f1f814e113f" CreationDate="2023-06-19T09:38:39.800" UserId="474" Comment="deleted 1 character in body" Text="Just some general points about transaction mortality from my digging and understanding so far:&#xD;&#xA;&#xD;&#xA;- The goal of mortality is to define when a transaction is valid from (must be some recent block hash/number) and _roughly_ how many blocks it'll be valid for until it expires and can no longer be added to a block.&#xD;&#xA;- There are two parts to mortality; first, the `Era` (`Mortal` or `Immortal`; the `Mortal` variant containing a &quot;phase&quot; and &quot;period&quot; value), and second the &quot;mortality checkpoint&quot; (the block hash of the first block that the transaction is valid from). &#xD;&#xA;- The `Era` is encoded into a compact 1 or 2 byte representation (for immortal or mortal respectively) and is a part of the &quot;signed extra&quot; details of the extrinsic. This compact encoding is important to save space in a block.&#xD;&#xA;- The &quot;mortality checkpoint&quot; hash is a part of the signer payload; ie it's not a part of the extrinsic details, but the node must be able to reproduce it to verify the signature. The node uses the &quot;phase&quot; value to work out _which_ block hash should be a part of the signer payload for verification.&#xD;&#xA;&#xD;&#xA;With that in mind, let's get to the questions:&#xD;&#xA;&#xD;&#xA;#### Not Manually&#xD;&#xA;&#xD;&#xA;The `Era::mortal` function takes two arguments, `period` and `current` (both u64s).&#xD;&#xA;&#xD;&#xA;- `current` is the block number that you'd like the transaction to be valid from. This block number **must** point to the same block as the block hash provided in the &quot;mortality checkpoint&quot; signer payload argument. Probably it should be some recent block (ie fetching the latest finalized block for instance and using that block hash/number seems like a good default approach).&#xD;&#xA;- `period` is the number of blocks after this block that the transaction will be valid for. It should be a power of 2 in the range [4,65536] (the `Era::mortal` function will make this be the case if the value you provide is not already). The reason for this rounding-to-power-of-two is, I think, so that it can be compressed (along with the internal &quot;phase&quot; value) into just 2 bytes. &#xD;&#xA;&#xD;&#xA;These two values are what you really care about when defining mortality; from which block is the tx valid from and after which block does it expire.&#xD;&#xA;&#xD;&#xA;#### Manually&#xD;&#xA;&#xD;&#xA;If you're not using the `Era::manual(..)` function (eg because an equivalent is not available in the language you're using), personally my approach would be to copy the logic of it out into your own function. Take care to also copy the logic for how the `Era` is SCALE encoded and decoded, if that's not handled for you ([see here](https://github.com/paritytech/substrate/blob/aeb24c2545422b1157bd6a85f4017aaf5287678a/primitives/runtime/src/generic/era.rs#L103)).&#xD;&#xA;&#xD;&#xA;Internally, the `Era::Mortal` stores a `period` and `phase` as u64s, and when being SCALE encoded or decoded, it mangles these into just 2 bytes. &#xD;&#xA;- `period` has already been described above. &#xD;&#xA;- `phase` is a value that a validator can use to work out which block hash it should expect in the signer payload in order to produce an identical signature to that which was given with the tx. [See `Era::mortal()`](https://github.com/paritytech/substrate/blob/aeb24c2545422b1157bd6a85f4017aaf5287678a/primitives/runtime/src/generic/era.rs#L65) for how it's calculated.&#xD;&#xA;&#xD;&#xA;The spec goes into more detail about the mortality phase and period: https://spec.polkadot.network/id-extrinsics#id-mortality" ContentLicense="CC BY-SA 4.0" />
  <row Id="35227" PostHistoryTypeId="2" PostId="8940" RevisionGUID="768865d5-5d67-4706-8e6f-f233d2b1ea77" CreationDate="2023-06-19T10:21:34.413" UserId="2281" Text="Substrate is a `Software Development Kit (SDK)` that allows you to build application-specific blockchains that can run as standalone services or in parallel with other chains with the shared security provided by the `Polkadot ecosystem.`&#xD;&#xA;&#xD;&#xA;[Validators][1] are participants in a `blockchain network` who play a crucial role in achieving consensus and securing the network. They validate and verify transactions, propose new blocks, and participate in the consensus mechanism to maintain the integrity and security of the blockchain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-validator" ContentLicense="CC BY-SA 4.0" />
  <row Id="35229" PostHistoryTypeId="5" PostId="8934" RevisionGUID="45f2891f-77ef-448a-b41c-4f1544f89696" CreationDate="2023-06-19T10:26:41.477" UserId="2281" Comment="deleted 4 characters in body" Text=" I use substrate in order to develop polkadot and I need depth information about substrate validators. There are a lot of data about polkadot validators but i haven't seen useful data about substrate validators. Are the two the same?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35230" PostHistoryTypeId="5" PostId="8582" RevisionGUID="81a821a3-1ec5-45d6-8a22-b58d24cbb051" CreationDate="2023-06-19T10:27:44.663" UserId="116" Comment="Spellcheck and language i-&gt;I Made epoc bold instead of code" Text="I have been working on a substrate blockchain. I want to know about the events and process happening in each ***epoch*** of blockchain and what are the concepts behind the ***epoch***?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35231" PostHistoryTypeId="24" PostId="8582" RevisionGUID="81a821a3-1ec5-45d6-8a22-b58d24cbb051" CreationDate="2023-06-19T10:27:44.663" Comment="Proposed by 116 approved by 298, 354 edit id of 443" ContentLicense="CC BY-SA 4.0" />
  <row Id="35232" PostHistoryTypeId="5" PostId="8940" RevisionGUID="5650e5d6-fe4e-404a-9ab5-2ebdfdb58110" CreationDate="2023-06-19T10:30:03.250" UserId="2281" Comment="added 138 characters in body" Text="Substrate is a `Software Development Kit (SDK)` that allows you to build application-specific blockchains that can run as standalone services or in parallel with other chains with the shared security provided by the `Polkadot ecosystem.`&#xD;&#xA;&#xD;&#xA;[Validators][1] are participants in a `blockchain network` who play a crucial role in achieving consensus and securing the network. They validate and verify transactions, propose new blocks, and participate in the consensus mechanism to maintain the integrity and security of the blockchain.&#xD;&#xA;&#xD;&#xA;you can also check [this][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-validator&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/7/whats-the-difference-between-substrate-and-polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="35233" PostHistoryTypeId="2" PostId="8941" RevisionGUID="bca0243f-e1da-47eb-809e-4037d37cc04a" CreationDate="2023-06-19T10:30:38.720" UserId="2372" Text="&#xD;&#xA;Validators in Polkadot:&#xD;&#xA;&#xD;&#xA;In Polkadot, validators refer to the entities that participate in the consensus algorithm called GRANDPA (GHOST-based Recursive Ancestor Deriving Prefix Agreement). These validators are responsible for producing and finalizing blocks in the Polkadot network.&#xD;&#xA;Validators in Polkadot are selected based on their stake in the network's native token, DOT. The more DOT tokens a validator holds, the higher their chances of being selected to participate in block production and consensus.&#xD;&#xA;Validators in Polkadot play a crucial role in maintaining the security and integrity of the network.&#xD;&#xA;Validators in Substrate:&#xD;&#xA;&#xD;&#xA;In Substrate, validators have a broader meaning and can refer to entities that perform various tasks within a Substrate-based blockchain. The term &quot;validator&quot; can encompass multiple roles, including block production, consensus, transaction validation, and more.&#xD;&#xA;Substrate allows for flexible customization of blockchain functionality, and the specific responsibilities and roles of validators can be defined by the design and implementation of the Substrate-based blockchain itself.&#xD;&#xA;Validators in Substrate can be involved in block production, transaction validation, executing runtime logic, executing smart contracts, and other tasks necessary for the operation of the blockchain.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35235" PostHistoryTypeId="52" PostId="8926" RevisionGUID="ebea358d-337b-4fcf-a1ed-722cc9822829" CreationDate="2023-06-19T11:00:07.610" />
  <row Id="35237" PostHistoryTypeId="2" PostId="8942" RevisionGUID="28400ff5-e13a-4b34-85f1-7bd2850d4b8a" CreationDate="2023-06-19T11:45:47.207" UserId="3136" Text="There is a very easy way to set a private netwrok on two computers.&#xD;&#xA;on your first computer generate a `customSpec.json` file of your project  and insert address of validators,session keys and all in your `customSpec.json` then generate a `customSpecRaw` and run the private network commanad..&#xD;&#xA;Then on your second computer send your project binary,`customSpecRaw`file and your first node local identity with your ip address&#xD;&#xA;now you are ready to run second node on your computer using your private netwrok command." ContentLicense="CC BY-SA 4.0" />
  <row Id="35239" PostHistoryTypeId="2" PostId="8943" RevisionGUID="75fc659f-cfff-4930-862e-bdf245c61957" CreationDate="2023-06-19T12:21:17.763" UserId="2844" Text="This is my github repo [here](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/staking-pallet-testing).&#xD;&#xA;&#xD;&#xA;I am getting this issue. I try to look how `pallet_collective` implemented in substrate main branch runtime [here](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs) but I can't able to find any solution.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5kwSl.png&#xD;&#xA;&#xD;&#xA;Someone please help me on this issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="35241" PostHistoryTypeId="1" PostId="8943" RevisionGUID="75fc659f-cfff-4930-862e-bdf245c61957" CreationDate="2023-06-19T12:21:17.763" UserId="2844" Text="the trait bound `RuntimeOrigin: From&lt;pallet_collective::RawOrigin&lt;AccountId32, Instance2&gt;&gt;` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="35242" PostHistoryTypeId="3" PostId="8943" RevisionGUID="75fc659f-cfff-4930-862e-bdf245c61957" CreationDate="2023-06-19T12:21:17.763" UserId="2844" Text="|substrate-node-template|pallet|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35243" PostHistoryTypeId="2" PostId="8944" RevisionGUID="a46b215d-73da-4730-a852-04884dbb34ff" CreationDate="2023-06-19T12:44:52.847" UserId="251" Text="https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/e798e1095531be77a01e55f61d80846e3b466b33/runtime/src/lib.rs#L975&#xD;&#xA;&#xD;&#xA;The compiler complained about &quot;cannot find Instance2 and Instance3&quot; because you only constructed `Instance1` in the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="35245" PostHistoryTypeId="2" PostId="8945" RevisionGUID="2c24277b-36b5-4691-81c1-4cbc04453024" CreationDate="2023-06-19T13:47:57.920" UserId="3850" Text="Trying to build `Astar` `shibuya-runtime` crate is failing after adding the `ink_env` dependency an `astar-frame` chain-extension. &#xD;&#xA;&#xD;&#xA;Here are the changes to both [`Astar`](https://github.com/AstarNetwork/Astar/pull/958) and [`astar-frame`](https://github.com/AstarNetwork/astar-frame/pull/165).&#xD;&#xA;&#xD;&#xA;**Run**: `cargo build --release -p shibuya-runtime`&#xD;&#xA;&#xD;&#xA;**Error:** &#xD;&#xA;```&#xD;&#xA;  error[E0152]: duplicate lang item in crate `ink_env` (which `nomination_pool_staking_chain_extension_types` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `frame_support` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/snowmead/opt/projects/Astar/target/release/wbuild/shibuya-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-0c1432171814e3b5.rmeta&#xD;&#xA;    = note: second definition in `ink_env` loaded from /Users/snowmead/opt/projects/Astar/target/release/wbuild/shibuya-runtime/target/wasm32-unknown-unknown/release/deps/libink_env-71d05e5639e89bfd.rmeta&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `ink_env` dependency is included in the nomination-pool chain extension types crate [here](https://github.com/AstarNetwork/astar-frame/pull/165/files#diff-698c90beaf1f7500ef073ca0c4ed5f791370b74acfd75cf0c3f427b8fffd5a02R13)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35247" PostHistoryTypeId="1" PostId="8945" RevisionGUID="2c24277b-36b5-4691-81c1-4cbc04453024" CreationDate="2023-06-19T13:47:57.920" UserId="3850" Text="duplicate lang item in crate `ink_env` - astar-frame/astar" ContentLicense="CC BY-SA 4.0" />
  <row Id="35248" PostHistoryTypeId="3" PostId="8945" RevisionGUID="2c24277b-36b5-4691-81c1-4cbc04453024" CreationDate="2023-06-19T13:47:57.920" UserId="3850" Text="|ink|frame|astar|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35249" PostHistoryTypeId="2" PostId="8946" RevisionGUID="1a98d943-fa03-4442-81ce-513a0e09274d" CreationDate="2023-06-19T13:51:21.517" UserId="409" Text="In substrate ranked-collective pallet, we can see the function call. &#xD;&#xA;```rust&#xD;&#xA;let min_rank = T::MinRankOfClass::convert(class);&#xD;&#xA;```&#xD;&#xA;Check the code [here](https://github.com/paritytech/substrate/blob/master/frame/ranked-collective/src/lib.rs#L596).&#xD;&#xA;&#xD;&#xA;In the polkadot repo, I can only find the configuration for `type MinRankOfClass`.&#xD;&#xA;```rust&#xD;&#xA;type MinRankOfClass = sp_runtime::traits::Identity;&#xD;&#xA;```&#xD;&#xA;Check the code [here](https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/governance/fellowship.rs#L356).&#xD;&#xA;&#xD;&#xA;The problem is I still can not find where is the `convert` function implementation which works for fellowship collective(ranked-collective pallet). Could anybody help me out of this? Many thanks.&#xD;&#xA;&#xD;&#xA;The reason I need to understand this code is I have to judge whether the rank of a fellowship member is enough to vote a fellowship referendum." ContentLicense="CC BY-SA 4.0" />
  <row Id="35251" PostHistoryTypeId="1" PostId="8946" RevisionGUID="1a98d943-fa03-4442-81ce-513a0e09274d" CreationDate="2023-06-19T13:51:21.517" UserId="409" Text="Where is the implementation of `MinRankOfClass::convert`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35252" PostHistoryTypeId="3" PostId="8946" RevisionGUID="1a98d943-fa03-4442-81ce-513a0e09274d" CreationDate="2023-06-19T13:51:21.517" UserId="409" Text="|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35254" PostHistoryTypeId="2" PostId="8947" RevisionGUID="d889f43d-50fb-4e98-99c6-dcdbfdf2aae7" CreationDate="2023-06-19T15:09:53.003" UserId="4340" Text="The Runtime storage in Substrate is based on a tree structure rather than a flat structure. While this allows for efficient integrity verification, it incurs data retrieval overhead. According to the [documentation][1]:&#xD;&#xA;&gt; Accessing trie data is costly. Each read operation takes O(log N)&#xD;&#xA;&gt; time, where N is the number of elements stored in the trie. To&#xD;&#xA;&gt; mitigate this, we use a key-value cache.&#xD;&#xA;&#xD;&#xA;To optimize data retrieval, I'm interested in exploring alternative storage approaches. Specifically:&#xD;&#xA; * Is it possible to use a flat structure storage in the Runtime? If so, what are the necessary steps to implement it?&#xD;&#xA; * Are there any other recommended approaches or strategies to improve data retrieval performance in Substrate?&#xD;&#xA;&#xD;&#xA;I appreciate any insights, recommendations, or references regarding alternative storage options and techniques to improve data retrieval efficiency in Substrate's Runtime storage.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/learn/state-transitions-and-storage/" ContentLicense="CC BY-SA 4.0" />
  <row Id="35256" PostHistoryTypeId="1" PostId="8947" RevisionGUID="d889f43d-50fb-4e98-99c6-dcdbfdf2aae7" CreationDate="2023-06-19T15:09:53.003" UserId="4340" Text="Is it possible to use a flat structure storage in the Runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35257" PostHistoryTypeId="3" PostId="8947" RevisionGUID="d889f43d-50fb-4e98-99c6-dcdbfdf2aae7" CreationDate="2023-06-19T15:09:53.003" UserId="4340" Text="|runtime|storage|trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35258" PostHistoryTypeId="52" PostId="8933" RevisionGUID="3dc6017a-494e-467a-b270-1841e650fb22" CreationDate="2023-06-19T16:28:45.280" />
  <row Id="35259" PostHistoryTypeId="52" PostId="8935" RevisionGUID="636a1e1b-c0d6-4b1b-b902-fe0bbe7f179e" CreationDate="2023-06-19T16:44:14.160" />
  <row Id="35260" PostHistoryTypeId="50" PostId="8535" RevisionGUID="50950716-cfe8-4815-88cb-e938d5cc48dd" CreationDate="2023-06-19T17:05:45.660" UserId="-1" />
  <row Id="35261" PostHistoryTypeId="50" PostId="6813" RevisionGUID="ec9e3888-b824-4282-a289-0bf2c6dc774f" CreationDate="2023-06-19T18:07:05.843" UserId="-1" />
  <row Id="35262" PostHistoryTypeId="2" PostId="8948" RevisionGUID="fca8cffb-300a-43bd-b64c-107b4a49e32c" CreationDate="2023-06-19T19:12:03.073" UserId="699" Text="I think this should be split into 2 questions:&#xD;&#xA;&#xD;&#xA; 1. How many collators total can have a parachain ?&#xD;&#xA; 2. How many collators can collate at the same block height ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I suspect those number would be approximative but also are dependent of the network settings of the validators of the given network (Kusama, Polkadot) ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35264" PostHistoryTypeId="1" PostId="8948" RevisionGUID="fca8cffb-300a-43bd-b64c-107b4a49e32c" CreationDate="2023-06-19T19:12:03.073" UserId="699" Text="How many collators can a parachain have?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35265" PostHistoryTypeId="3" PostId="8948" RevisionGUID="fca8cffb-300a-43bd-b64c-107b4a49e32c" CreationDate="2023-06-19T19:12:03.073" UserId="699" Text="|parachain|collator|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35266" PostHistoryTypeId="50" PostId="6819" RevisionGUID="3b6aa03a-2491-4259-8111-3222eca5482a" CreationDate="2023-06-19T20:08:41.050" UserId="-1" />
  <row Id="35267" PostHistoryTypeId="2" PostId="8949" RevisionGUID="1964dc5b-703d-4437-8a28-cdf4fc132f26" CreationDate="2023-06-19T20:50:25.873" UserId="29" Text="&gt; How to use try runtime in when upgrading a chain/parachin to latest substrate release?&#xD;&#xA;&#xD;&#xA;If there are any upstream migrations, you should use [try-runtime on-runtime-upgrade](https://paritytech.github.io/substrate/master/try_runtime_cli/commands/on_runtime_upgrade/struct.OnRuntimeUpgradeCmd.html) subcommand to test that the storage migration is successful before you apply the changes in a production environment.&#xD;&#xA;&#xD;&#xA;&gt; What is the best practice regarding try-runtime, what errors and warnings should one look out for in the output.&#xD;&#xA;&#xD;&#xA;In regards to `on-runtime-upgrade` you want to make sure that the storage migration was applied correctly on your storage by using pre- and post-upgrade checks. When running try-runtime on-runtime-upgrade you also want to confirm that the runtime spec version was bumped. In regards to a pallet storage migration you may need to bump the storage_version for your pallet. &#xD;&#xA;&#xD;&#xA;When running try-runtime on-runtime-upgrade, ideally you have an RPC node dedicated for this with flags set to enable large request/response size so that you can test off of live chain state:&#xD;&#xA;```&#xD;&#xA;./node-try-runtime \                                                                    &#xD;&#xA;    try-runtime \&#xD;&#xA;    --runtime runtime-try-runtime.wasm \&#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    on-runtime-upgrade \&#xD;&#xA;    live --uri ws://try-runtime-prod-chain-rpc-node:9921&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All your migrations should pass with green. Look at the output of the try-runtime logs, it will tell you. You may also want to look at the consumed weight for your migrations, wildly off consumed weight may indicate a flaw in your storage migration's logic. Never take the upstream migrations blindly, always review the code and see if it fits your chain.&#xD;&#xA;&#xD;&#xA;I would recommend you test with try-runtime-upgrade, then test on a live test network for some time, then if all good, you go to production.&#xD;&#xA;&#xD;&#xA;Ideally, you have a try-runtime CI pipeline set with your repo for testing releases as well as try-runtime bot that you can kick off manually.&#xD;&#xA;&#xD;&#xA;The on-runtime-upgrade subcommand also has an optional [try-state](https://paritytech.github.io/substrate/master/frame_support/traits/trait.TryState.html#tymethod.try_state) hook which can be used to check the pallet's state (sanity check)&#xD;&#xA;&#xD;&#xA;Of course, this is only the icing on the cake, try-runtime include a few other subcommands which can be useful for testing such as:&#xD;&#xA;```&#xD;&#xA;  execute-block       Executes the given block against some state&#xD;&#xA;  offchain-worker     Executes *the offchain worker hooks* of a given block against some state&#xD;&#xA;  follow-chain        Follow the given chain's finalized blocks and apply all of its extrinsics&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example, say you're testing a complex storage migration that your team wrote and it touches several aspects of your pallets storage, you may want to `on-runtime-upgrade` to ensure your storage migration executed as expected and for added peace-of-mind you may also want to test that the chain continues to produce blocks as expected using `follow-chain`.&#xD;&#xA;&#xD;&#xA;try-runtime can also be used for testing other scenarios, not only storage migrations. For example, perhaps your team discovered a bug in your code that happened in production at block X. Your team then writes code to fix the bug and they could use the try-runtime [execute-block](https://paritytech.github.io/substrate/master/try_runtime_cli/commands/execute_block/struct.ExecuteBlockCmd.html) subcommand to execute that code against block X to make sure the bug has been fixed before rolling out the fix to production.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Resource&#xD;&#xA;- https://paritytech.github.io/substrate/master/try_runtime_cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="35269" PostHistoryTypeId="5" PostId="8949" RevisionGUID="28a47953-524c-476f-a132-8628a3c957c4" CreationDate="2023-06-19T20:55:33.613" UserId="29" Comment="added 26 characters in body" Text="&gt; How to use try runtime in when upgrading a chain/parachin to latest substrate release?&#xD;&#xA;&#xD;&#xA;If there are any upstream migrations, you should use [try-runtime on-runtime-upgrade](https://paritytech.github.io/substrate/master/try_runtime_cli/commands/on_runtime_upgrade/struct.OnRuntimeUpgradeCmd.html) subcommand to test that the storage migration is successful before you apply the changes in a production environment.&#xD;&#xA;&#xD;&#xA;&gt; What is the best practice regarding try-runtime, what errors and warnings should one look out for in the output.&#xD;&#xA;&#xD;&#xA;In regards to `on-runtime-upgrade` you want to make sure that the storage migration was applied correctly on your storage by using pre- and post-upgrade checks. When running try-runtime on-runtime-upgrade you also want to confirm that the runtime spec version was bumped. In regards to a pallet storage migration you may need to bump the storage_version for your pallet. &#xD;&#xA;&#xD;&#xA;When running try-runtime on-runtime-upgrade, ideally you have an RPC node dedicated for this with flags set to enable large request/response size so that you can test off of live chain state:&#xD;&#xA;```&#xD;&#xA;./node-try-runtime \                                                                    &#xD;&#xA;    try-runtime \&#xD;&#xA;    --runtime runtime-try-runtime.wasm \&#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    on-runtime-upgrade \&#xD;&#xA;    live --uri ws://try-runtime-prod-chain-rpc-node:9921&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All your migrations should pass with green. Look at the output of the try-runtime logs, it will tell you. You may also want to look at the consumed weight for your migrations, wildly off consumed weight may indicate a flaw in your storage migration's logic. Never take the upstream migrations blindly, always review the code and see if it fits your chain.&#xD;&#xA;&#xD;&#xA;A good pipeline is to test with try-runtime-upgrade, then test on a live test network for some time by enacting the upgrade there, then if all is good --&gt; production.&#xD;&#xA;&#xD;&#xA;Ideally, you have a try-runtime CI workflow set with your repo for testing releases as well as try-runtime bot that you can kick off manually.&#xD;&#xA;&#xD;&#xA;The on-runtime-upgrade subcommand also has an optional [try-state](https://paritytech.github.io/substrate/master/frame_support/traits/trait.TryState.html#tymethod.try_state) hook which can be used to check the pallet's state (sanity check)&#xD;&#xA;&#xD;&#xA;Of course, this is only the icing on the cake, try-runtime include a few other subcommands which can be useful for testing such as:&#xD;&#xA;```&#xD;&#xA;  execute-block       Executes the given block against some state&#xD;&#xA;  offchain-worker     Executes *the offchain worker hooks* of a given block against some state&#xD;&#xA;  follow-chain        Follow the given chain's finalized blocks and apply all of its extrinsics&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example, say you're testing a complex storage migration that your team wrote and it touches several aspects of your pallets storage, you may want to `on-runtime-upgrade` to ensure your storage migration executed as expected and for added peace-of-mind you may also want to test that the chain continues to produce blocks as expected using `follow-chain`.&#xD;&#xA;&#xD;&#xA;try-runtime can also be used for testing other scenarios, not only storage migrations. For example, perhaps your team discovered a bug in your code that happened in production at block X. Your team then writes code to fix the bug and they could use the try-runtime [execute-block](https://paritytech.github.io/substrate/master/try_runtime_cli/commands/execute_block/struct.ExecuteBlockCmd.html) subcommand to execute that code against block X to make sure the bug has been fixed before rolling out the fix to production.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Resource&#xD;&#xA;- https://paritytech.github.io/substrate/master/try_runtime_cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="35270" PostHistoryTypeId="5" PostId="8949" RevisionGUID="1fb26857-7a00-4010-9a5a-962f25f1c622" CreationDate="2023-06-19T21:44:07.277" UserId="29" Comment="added 145 characters in body" Text="&gt; How to use try runtime in when upgrading a chain/parachin to latest substrate release?&#xD;&#xA;&#xD;&#xA;If there are any upstream migrations, you should use [try-runtime on-runtime-upgrade](https://paritytech.github.io/substrate/master/try_runtime_cli/commands/on_runtime_upgrade/struct.OnRuntimeUpgradeCmd.html) subcommand to test that the storage migration is successful before you apply the changes in a production environment.&#xD;&#xA;&#xD;&#xA;&gt; What is the best practice regarding try-runtime, what errors and warnings should one look out for in the output.&#xD;&#xA;&#xD;&#xA;In regards to `on-runtime-upgrade` you want to make sure that the storage migration was applied correctly on your storage by using pre- and post-upgrade checks. When running try-runtime on-runtime-upgrade you also want to confirm that the runtime spec version was bumped. In regards to a pallet storage migration you may need to bump the storage_version for your pallet. &#xD;&#xA;&#xD;&#xA;When running try-runtime on-runtime-upgrade, ideally you have an RPC node dedicated for this with flags set to enable large request/response size so that you can test off of live chain state:&#xD;&#xA;```&#xD;&#xA;./node-try-runtime \                                                                    &#xD;&#xA;    try-runtime \&#xD;&#xA;    --runtime runtime-try-runtime.wasm \&#xD;&#xA;    -lruntime=debug \&#xD;&#xA;    on-runtime-upgrade \&#xD;&#xA;    live --uri ws://try-runtime-prod-chain-rpc-node:9921&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;All your migrations should pass with green. Look at the output of the try-runtime logs, it will tell you. You may also want to look at the consumed weight for your migrations, wildly off consumed weight may indicate a flaw in your storage migration's logic. Never take the upstream migrations blindly, always review the code and see if it fits your chain.&#xD;&#xA;&#xD;&#xA;A good pipeline is to test with try-runtime-upgrade, then test on a live test network for some time by enacting the upgrade there, then if all is good --&gt; production.&#xD;&#xA;&#xD;&#xA;Ideally, you have a try-runtime CI workflow set with your repo for testing releases as well as try-runtime bot that you can kick off manually.&#xD;&#xA;&#xD;&#xA;The on-runtime-upgrade subcommand also has an optional [try-state](https://paritytech.github.io/substrate/master/frame_support/traits/trait.TryState.html#tymethod.try_state) hook which can be used to check the pallet's state (sanity check)&#xD;&#xA;&#xD;&#xA;Of course, this is only the icing on the cake, try-runtime include a few other subcommands which can be useful for testing such as:&#xD;&#xA;```&#xD;&#xA;  execute-block       Executes the given block against some state&#xD;&#xA;  offchain-worker     Executes *the offchain worker hooks* of a given block against some state&#xD;&#xA;  follow-chain        Follow the given chain's finalized blocks and apply all of its extrinsics&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example, say you're testing a complex storage migration that your team wrote and it touches several aspects of your pallets storage, you may want to `on-runtime-upgrade` to ensure your storage migration executed as expected and for added peace-of-mind you may also want to test that the chain continues to produce blocks as expected using `follow-chain`.&#xD;&#xA;&#xD;&#xA;try-runtime can also be used for testing other scenarios, not only storage migrations. For example, perhaps your team discovered a bug in your code that happened in production at block X. Your team then writes code to fix the bug and they could use the try-runtime [execute-block](https://paritytech.github.io/substrate/master/try_runtime_cli/commands/execute_block/struct.ExecuteBlockCmd.html) subcommand to execute that code against block X to make sure the bug has been fixed before rolling out the fix to production.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Resource&#xD;&#xA;- https://paritytech.github.io/substrate/master/try_runtime_cli&#xD;&#xA;&#xD;&#xA;Related&#xD;&#xA;- https://substrate.stackexchange.com/questions/2762/do-i-need-to-write-migration-script-if-upstream-pallets-storage-has-been-change" ContentLicense="CC BY-SA 4.0" />
  <row Id="35271" PostHistoryTypeId="4" PostId="8925" RevisionGUID="fed8ccd3-9ec5-4192-b0ab-9e1a7cf79701" CreationDate="2023-06-19T22:03:05.647" UserId="83" Comment="spelling" Text="How to use try-runtime when upgrading a chain/parachain to latest substrate release?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35272" PostHistoryTypeId="2" PostId="8950" RevisionGUID="a468f99b-5d29-471d-852d-755033cf4894" CreationDate="2023-06-19T22:08:26.490" UserId="2065" Text="After upgrading our chain to polkadot version 0.9.38 and run `SKIP_WASM_BUILD= cargo test --all` I get  the following test error &#xD;&#xA;&#xD;&#xA;    --- '__construct_runtime_integrity_test::runtime_integrity_tests' panicked at 'Builder finished with `build_or_panic`; The panic is expected if runtime weights are not correct: ValidationErrors { has_errors: true, errors: [&quot;[DispatchClass::Normal] Weight { ref_time: 375000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 381015000, proof_size: 0 } (base block) &amp; Weight { ref_time: 99840000, proof_size: 0 } (base extrinsic)&quot;, &quot;[DispatchClass::Normal] Some(Weight { ref_time: 349900160000, proof_size: 0 }) (max_extrinsic) must not be 0. Check base cost and average initialization cost.&quot;, &quot;[DispatchClass::Normal] Weight { ref_time: 500000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 480855000, proof_size: 0 } (base weight)&quot;, &quot;[DispatchClass::Operational] Weight { ref_time: 500000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 381015000, proof_size: 0 } (base block) &amp; Weight { ref_time: 99840000, proof_size: 0 } (base extrinsic)&quot;, &quot;[DispatchClass::Operational] Some(Weight { ref_time: 474900160000, proof_size: 0 }) (max_extrinsic) must not be 0. Check base cost and average initialization cost.&quot;, &quot;[DispatchClass::Operational] Weight { ref_time: 125000000000, proof_size: 0 } (reserved) has to be greater than Weight { ref_time: 99840000, proof_size: 0 } (base extrinsic) if set&quot;, &quot;[DispatchClass::Operational] Weight { ref_time: 500000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 480855000, proof_size: 0 } (base weight)&quot;, &quot;[DispatchClass::Mandatory] Weight { ref_time: 500000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 480855000, proof_size: 0 } (base weight)&quot;] }', &#xD;&#xA;&#xD;&#xA;I was running the tests for each pallet separately and they seems to pass as expected. Any guidance on how to resolve it.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35274" PostHistoryTypeId="1" PostId="8950" RevisionGUID="a468f99b-5d29-471d-852d-755033cf4894" CreationDate="2023-06-19T22:08:26.490" UserId="2065" Text="__construct_runtime_integrity_test fails after upgrading to polkadot 0.9.38" ContentLicense="CC BY-SA 4.0" />
  <row Id="35275" PostHistoryTypeId="3" PostId="8950" RevisionGUID="a468f99b-5d29-471d-852d-755033cf4894" CreationDate="2023-06-19T22:08:26.490" UserId="2065" Text="|error|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35276" PostHistoryTypeId="2" PostId="8951" RevisionGUID="6b7c3db5-b9a8-4a08-ab2f-bf24d2ce8c02" CreationDate="2023-06-19T22:17:33.493" UserId="2065" Text="After upgrading our chain to polkadot 0.9.38 I managed to build the benchmarking using `cargo build --release --features runtime-benchmarks&#xD;&#xA;` but when I try to benchmark any pallet after the build I always get the following error&#xD;&#xA;&#xD;&#xA;    Builder finished with `build_or_panic`; The panic is expected if runtime weights are not correct:&#xD;&#xA;&#xD;&#xA;    Error: Input(&quot;Did not find the benchmarking metadata. This could mean that you either did not build the node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was not created by a node that was compiled with the flag:&#xD;&#xA;&#xD;&#xA;Any guidance on how to fix that error?&#xD;&#xA;&#xD;&#xA;Link to code [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chexware/Bit-Country-Blockchain/tree/runtime-upgrade/polkadot-v0.9.38" ContentLicense="CC BY-SA 4.0" />
  <row Id="35278" PostHistoryTypeId="1" PostId="8951" RevisionGUID="6b7c3db5-b9a8-4a08-ab2f-bf24d2ce8c02" CreationDate="2023-06-19T22:17:33.493" UserId="2065" Text="Error: &quot;Did not find the benchmarking metadata&quot; after building runtime for benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="35279" PostHistoryTypeId="3" PostId="8951" RevisionGUID="6b7c3db5-b9a8-4a08-ab2f-bf24d2ce8c02" CreationDate="2023-06-19T22:17:33.493" UserId="2065" Text="|benchmarking|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35280" PostHistoryTypeId="5" PostId="8950" RevisionGUID="c64ca496-db0e-4965-9fec-6c67372c997b" CreationDate="2023-06-19T22:18:13.563" UserId="2065" Comment="added 122 characters in body" Text="After upgrading our chain to polkadot version 0.9.38 and run `SKIP_WASM_BUILD= cargo test --all` I get  the following test error &#xD;&#xA;&#xD;&#xA;    --- '__construct_runtime_integrity_test::runtime_integrity_tests' panicked at 'Builder finished with `build_or_panic`; The panic is expected if runtime weights are not correct: ValidationErrors { has_errors: true, errors: [&quot;[DispatchClass::Normal] Weight { ref_time: 375000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 381015000, proof_size: 0 } (base block) &amp; Weight { ref_time: 99840000, proof_size: 0 } (base extrinsic)&quot;, &quot;[DispatchClass::Normal] Some(Weight { ref_time: 349900160000, proof_size: 0 }) (max_extrinsic) must not be 0. Check base cost and average initialization cost.&quot;, &quot;[DispatchClass::Normal] Weight { ref_time: 500000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 480855000, proof_size: 0 } (base weight)&quot;, &quot;[DispatchClass::Operational] Weight { ref_time: 500000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 381015000, proof_size: 0 } (base block) &amp; Weight { ref_time: 99840000, proof_size: 0 } (base extrinsic)&quot;, &quot;[DispatchClass::Operational] Some(Weight { ref_time: 474900160000, proof_size: 0 }) (max_extrinsic) must not be 0. Check base cost and average initialization cost.&quot;, &quot;[DispatchClass::Operational] Weight { ref_time: 125000000000, proof_size: 0 } (reserved) has to be greater than Weight { ref_time: 99840000, proof_size: 0 } (base extrinsic) if set&quot;, &quot;[DispatchClass::Operational] Weight { ref_time: 500000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 480855000, proof_size: 0 } (base weight)&quot;, &quot;[DispatchClass::Mandatory] Weight { ref_time: 500000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 480855000, proof_size: 0 } (base weight)&quot;] }', &#xD;&#xA;&#xD;&#xA;I was running the tests for each pallet separately and they seems to pass as expected. Any guidance on how to resolve it&#xD;&#xA;&#xD;&#xA;Link to code [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chexware/Bit-Country-Blockchain/tree/runtime-upgrade/polkadot-v0.9.38" ContentLicense="CC BY-SA 4.0" />
  <row Id="35281" PostHistoryTypeId="2" PostId="8952" RevisionGUID="165aa27b-eaee-4ff8-bfea-507eedb6c01b" CreationDate="2023-06-19T22:22:00.100" UserId="83" Text="After instantiating a contract using `CreateBuilder` as shown [here][1].&#xD;&#xA;If I then try to call the contract using `CallBuilder` as shown [here][2] and use `#[ink(message, payable)]` in the callee message of the contract being called as shown [here][3] it only compiles if I use `.transferred_value(0)` with a transfer value of `0`.&#xD;&#xA;&#xD;&#xA;But if I follow the ink! cross-contract documentation [here][4] and change the transfer value to a non-zero value as they use in their examples, it always results in `TransferFailed` error. Note: I also get the error when just using the Contracts Ref Approach without the Builders Approach.&#xD;&#xA;&#xD;&#xA;Why can't I pass a non-zero value to `transferred_value`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ltfschoen/InkTemplate/pull/16/files#diff-84af1add043372bf3be8123a2d3477b5f1d436cc0dbbf322c0bcd3c99249adb2R45&#xD;&#xA;  [2]: https://github.com/ltfschoen/InkTemplate/pull/16/files#diff-84af1add043372bf3be8123a2d3477b5f1d436cc0dbbf322c0bcd3c99249adb2R69&#xD;&#xA;  [3]: https://github.com/ltfschoen/InkTemplate/pull/16/files#diff-16556624fa5972a5348e9b062eb7965d702c694b78d5190aa7097dc66d70a79bR35&#xD;&#xA;  [4]: https://use.ink/basics/cross-contract-calling#builders" ContentLicense="CC BY-SA 4.0" />
  <row Id="35283" PostHistoryTypeId="1" PostId="8952" RevisionGUID="165aa27b-eaee-4ff8-bfea-507eedb6c01b" CreationDate="2023-06-19T22:22:00.100" UserId="83" Text="Cross-contract call failed with TransferFailed" ContentLicense="CC BY-SA 4.0" />
  <row Id="35284" PostHistoryTypeId="3" PostId="8952" RevisionGUID="165aa27b-eaee-4ff8-bfea-507eedb6c01b" CreationDate="2023-06-19T22:22:00.100" UserId="83" Text="|ink|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35285" PostHistoryTypeId="5" PostId="8950" RevisionGUID="a5f910aa-146e-4091-8e3c-c2e691f65f42" CreationDate="2023-06-20T02:54:10.623" UserId="251" Comment="added 23 characters in body" Text="After upgrading our chain to polkadot version 0.9.38 and run `SKIP_WASM_BUILD= cargo test --all` I get  the following test error &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;'__construct_runtime_integrity_test::runtime_integrity_tests' panicked at &#xD;&#xA;'Builder finished with `build_or_panic`; &#xD;&#xA;The panic is expected if runtime weights are not correct: &#xD;&#xA;ValidationErrors { has_errors: true, errors: [&#xD;&#xA;	&quot;[DispatchClass::Normal] Weight { ref_time: 375000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 381015000, proof_size: 0 } (base block) &amp; Weight { ref_time: 99840000, proof_size: 0 } (base extrinsic)&quot;,&#xD;&#xA;	&quot;[DispatchClass::Normal] Some(Weight { ref_time: 349900160000, proof_size: 0 }) (max_extrinsic) must not be 0. Check base cost and average initialization cost.&quot;,&#xD;&#xA;	&quot;[DispatchClass::Normal] Weight { ref_time: 500000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 480855000, proof_size: 0 } (base weight)&quot;,&#xD;&#xA;	&quot;[DispatchClass::Operational] Weight { ref_time: 500000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 381015000, proof_size: 0 } (base block) &amp; Weight { ref_time: 99840000, proof_size: 0 } (base extrinsic)&quot;,&#xD;&#xA;	&quot;[DispatchClass::Operational] Some(Weight { ref_time: 474900160000, proof_size: 0 }) (max_extrinsic) must not be 0. Check base cost and average initialization cost.&quot;,&#xD;&#xA;	&quot;[DispatchClass::Operational] Weight { ref_time: 125000000000, proof_size: 0 } (reserved) has to be greater than Weight { ref_time: 99840000, proof_size: 0 } (base extrinsic) if set&quot;,&#xD;&#xA;	&quot;[DispatchClass::Operational] Weight { ref_time: 500000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 480855000, proof_size: 0 } (base weight)&quot;,&#xD;&#xA;	&quot;[DispatchClass::Mandatory] Weight { ref_time: 500000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 480855000, proof_size: 0 } (base weight)&quot;&#xD;&#xA;]}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I was running the tests for each pallet separately and they seems to pass as expected. Any guidance on how to resolve it&#xD;&#xA;&#xD;&#xA;Link to code [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chexware/Bit-Country-Blockchain/tree/runtime-upgrade/polkadot-v0.9.38" ContentLicense="CC BY-SA 4.0" />
  <row Id="35286" PostHistoryTypeId="50" PostId="4376" RevisionGUID="69d7202d-fc3c-4a45-95cf-9e14ca806195" CreationDate="2023-06-20T03:04:25.463" UserId="-1" />
  <row Id="35287" PostHistoryTypeId="2" PostId="8953" RevisionGUID="63400488-c208-4130-ba09-728366c0d5e1" CreationDate="2023-06-20T04:52:47.273" UserId="4342" Text="I'm fairly new to Rust and Ink itself. &#xD;&#xA;&#xD;&#xA;I'm trying to compile and build an extremly basic PSP22 Contract.&#xD;&#xA;&#xD;&#xA;**I get the following error when I compile &amp; build :** &#xD;&#xA;&#xD;&#xA;(running `cargo +nightly contract build`)&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The following is my **Contract** (`lib.rs`) : &#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    #![feature(min_specialization)]&#xD;&#xA;            &#xD;&#xA;    #[openbrush::contract]&#xD;&#xA;    pub mod my_psp22 {&#xD;&#xA;        &#xD;&#xA;        // imports from openbrush&#xD;&#xA;    	use openbrush::contracts::psp22::*;&#xD;&#xA;    	use openbrush::traits::Storage;&#xD;&#xA;    &#xD;&#xA;        #[ink(storage)]&#xD;&#xA;        #[derive(Default, Storage)]&#xD;&#xA;        pub struct Ipsp22 {&#xD;&#xA;        	#[storage_field]&#xD;&#xA;    		psp22: psp22::Data,&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        // Section contains default implementation without any modifications&#xD;&#xA;    	impl PSP22 for Ipsp22 {}&#xD;&#xA;         &#xD;&#xA;        impl Ipsp22 {&#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn new(initial_supply: Balance) -&gt; Self {&#xD;&#xA;                let mut _instance = Self::default();&#xD;&#xA;    			_instance._mint_to(_instance.env().caller(), initial_supply).expect(&quot;Should mint&quot;); &#xD;&#xA;    			_instance&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And here is my **Cargo.toml** : &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;my_token&quot;&#xD;&#xA;    version = &quot;0.1.0&quot;&#xD;&#xA;    authors = [&quot;0xD1x0n&quot;]&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    license = &quot;Apache 2.0&quot;&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    ink = { version = &quot;~4.0.0&quot;, default-features = false }&#xD;&#xA;    openbrush = { git = &quot;https://github.com/727-Ventures/openbrush-contracts/&quot;, tag = &quot;3.0.0&quot;, default-features = false, features = [&quot;psp22&quot;, &quot;ownable&quot;] }&#xD;&#xA;    &#xD;&#xA;    scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    &#xD;&#xA;    [lib]&#xD;&#xA;    name = &quot;my_token&quot;&#xD;&#xA;    path = &quot;lib.rs&quot;&#xD;&#xA;    crate-type = [&#xD;&#xA;        &quot;cdylib&quot;,&#xD;&#xA;        &quot;rlib&quot;,&#xD;&#xA;    ]&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;        &quot;ink/std&quot;,&#xD;&#xA;        &quot;scale/std&quot;,&#xD;&#xA;        &quot;scale-info/std&quot;,&#xD;&#xA;        &quot;openbrush/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;    ink-as-dependency = []&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;**I am using the following versions of these tools :** &#xD;&#xA;&#xD;&#xA; - rustc 1.69.0 (84c898d65 2023-04-16)&#xD;&#xA; - cargo-contract-contract 2.2.1-91b5a86-aarch64-apple-darwin&#xD;&#xA; - rustup 1.26.0 (5af9b9484 2023-04-05)&#xD;&#xA;&#xD;&#xA;I'm not quite sure why its happening, any help would be deeply appriciated&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/422d2.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35289" PostHistoryTypeId="1" PostId="8953" RevisionGUID="63400488-c208-4130-ba09-728366c0d5e1" CreationDate="2023-06-20T04:52:47.273" UserId="4342" Text="Specialization impl does not specialize any associated items" ContentLicense="CC BY-SA 4.0" />
  <row Id="35290" PostHistoryTypeId="3" PostId="8953" RevisionGUID="63400488-c208-4130-ba09-728366c0d5e1" CreationDate="2023-06-20T04:52:47.273" UserId="4342" Text="|ink|rust|wasm|cargo|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35291" PostHistoryTypeId="5" PostId="8789" RevisionGUID="38074583-2f13-4cbd-8054-cb2856036387" CreationDate="2023-06-20T04:58:28.157" UserId="116" Comment="Spelling cant -&gt; can't" Text="Someone sent me `$WND tokens` from faucet but I did not receive it.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Also, why do you have 1 !drip request quota on your faucet? I find it hard to test with all this blockers you set in place. They're slowing me down. This is so anticlimactic.&#xD;&#xA;&#xD;&#xA;I want to `mint` some meme coins on `Westmint` which I'll later implement on `Polkadot`. I can't do it because you make it hard for testers to do so. I can't get `$WND tokens!`&#xD;&#xA;&#xD;&#xA;Can you please send me `50 $WND`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zE6A3.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Q9Rss.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35292" PostHistoryTypeId="24" PostId="8789" RevisionGUID="38074583-2f13-4cbd-8054-cb2856036387" CreationDate="2023-06-20T04:58:28.157" Comment="Proposed by 116 approved by 2281, 354 edit id of 459" ContentLicense="CC BY-SA 4.0" />
  <row Id="35293" PostHistoryTypeId="5" PostId="3474" RevisionGUID="241b93ab-9393-484f-ae1a-93b4d1d7b6f7" CreationDate="2023-06-20T04:58:43.200" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="Context: I need to put some data on vesting pallet. There is no such things as `setVestedStorage`, so I need to use `system.setStorage` (`api.tx.system.storage` for the complete form) from the polkadotjs API&#xD;&#xA;&#xD;&#xA;The problem is that I can't find ANY documentation on this function, the only thing i know is it's interface: `setStorage(Vec&lt;Bytes, Bytes&gt;)`, and that the first bytes parameter are the &quot;old bytes&quot;, and the second the &quot;new bytes&quot; (according to the only appearance of `setStorage` in [substrate github repo][1]), but that's all.&#xD;&#xA;&#xD;&#xA;How do I get the old bytes ?&#xD;&#xA;How do I get the new bytes ? Especially as I use the function in a js script.&#xD;&#xA;How am I supposed to call this function ?&#xD;&#xA;Do I have to call it multiple times if I have an enormous amount of data (200k entries), or can I call it a single time ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/search?q=setStorage" ContentLicense="CC BY-SA 4.0" />
  <row Id="35294" PostHistoryTypeId="24" PostId="3474" RevisionGUID="241b93ab-9393-484f-ae1a-93b4d1d7b6f7" CreationDate="2023-06-20T04:58:43.200" Comment="Proposed by 116 approved by 2281, 354 edit id of 463" ContentLicense="CC BY-SA 4.0" />
  <row Id="35295" PostHistoryTypeId="5" PostId="898" RevisionGUID="04816781-a2cc-4d9d-b155-aa6e4f9de09d" CreationDate="2023-06-20T04:58:58.143" UserId="3136" Comment="correct the format of title and change in body" Text="I performed an upward teleport from Encointer `Parachain` to `Kusama- Relay Chain`.&#xD;&#xA;&#xD;&#xA;The `parachain` confirmed the XCM extrinsic `polkadotXcm.limitedTeleportAssets` and an Event was disposed: `polkadotXcm.Attempted` with&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  Complete: 2,000,000,000&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And the balance was deducted indeed.&#xD;&#xA;&#xD;&#xA;I see that the balance on the relaychain is correct now (it increased by the expected amount). But is there an Event to listen to to detect that the teleport was successful?&#xD;&#xA;&#xD;&#xA;I tried a subscan search for palletXCM events:&#xD;&#xA;https://kusama.subscan.io/event?address=&amp;module=xcmpallet&amp;event=all&amp;startDate=&amp;endDate=&amp;startBlock=&amp;endBlock=&amp;timeType=date&amp;version=9170&#xD;&#xA;&#xD;&#xA;But that wont yield an Event for my upwards teleport&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35296" PostHistoryTypeId="4" PostId="898" RevisionGUID="04816781-a2cc-4d9d-b155-aa6e4f9de09d" CreationDate="2023-06-20T04:58:58.143" UserId="3136" Comment="correct the format of title and change in body" Text="How to verify upward teleport on Relay Chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35297" PostHistoryTypeId="24" PostId="898" RevisionGUID="04816781-a2cc-4d9d-b155-aa6e4f9de09d" CreationDate="2023-06-20T04:58:58.143" Comment="Proposed by 3136 approved by 2281, 354 edit id of 468" ContentLicense="CC BY-SA 4.0" />
  <row Id="35298" PostHistoryTypeId="5" PostId="8861" RevisionGUID="e9a504bc-db93-4ca4-a298-92e91187f9b5" CreationDate="2023-06-20T05:00:00.693" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I'm getting the following error when compiling a rust ink! 4.0;&#xD;&#xA;&gt;ERROR: Loading of original wasm failed&#xD;&#xA;&#xD;&#xA;It's started happening to me after I `rustup update` and now my rustc versions are:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;stable-aarch64-apple-darwin unchanged - rustc 1.70.0 (90c541806 2023-05-31)&#xD;&#xA;nightly-aarch64-apple-darwin unchanged - rustc 1.72.0-nightly (37998ab50 2023-06-11)&#xD;&#xA;1.64-aarch64-apple-darwin unchanged - rustc 1.64.0 (a55dd71d5 2022-09-19)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thank you very much :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35299" PostHistoryTypeId="24" PostId="8861" RevisionGUID="e9a504bc-db93-4ca4-a298-92e91187f9b5" CreationDate="2023-06-20T05:00:00.693" Comment="Proposed by 116 approved by 2281, 354 edit id of 453" ContentLicense="CC BY-SA 4.0" />
  <row Id="35300" PostHistoryTypeId="5" PostId="8948" RevisionGUID="241be5fe-b37b-4861-af46-d551ec54bd75" CreationDate="2023-06-20T05:02:14.417" UserId="354" Comment="edited body" Text="I think this should be split into 2 questions:&#xD;&#xA;&#xD;&#xA; 1. How many total collators can a parachain have ?&#xD;&#xA; 2. How many collators can collate at the same block height ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I suspect those number would be approximative but also are dependent of the network settings of the validators of the given network (Kusama, Polkadot) ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35301" PostHistoryTypeId="2" PostId="8954" RevisionGUID="667f9369-a437-400f-8a99-eaf0b8f39a7b" CreationDate="2023-06-20T05:14:04.190" UserId="354" Text="&gt; How many total collators can a parachain have ?&#xD;&#xA;&#xD;&#xA;There is no particular bound on how many collators can a parachain have, there is bound on how many [parachains can connect to polkadot][1]. You can check [this tutorial][2] on how to add collators to your parachain, there are different implementations for the same, for example moonbeam has a `DPoS` as its collator selection mechanism.&#xD;&#xA;&#xD;&#xA;&gt; How many collators can collate at the same block height ?&#xD;&#xA;&#xD;&#xA;It again depends on the collator selection mechanism, means which collator is selected to collate at a time.&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-parachains#parachain-slot-acquisition&#xD;&#xA;  [2]: https://docs.substrate.io/reference/how-to-guides/parachains/select-collators/" ContentLicense="CC BY-SA 4.0" />
  <row Id="35305" PostHistoryTypeId="2" PostId="8955" RevisionGUID="2a8a5e1f-e347-4b85-aab0-bd7fc3907409" CreationDate="2023-06-20T08:14:06.500" UserId="251" Text="Here you go.&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/substrate/master/src/sp_runtime/traits.rs.html#729-733&#xD;&#xA;&#xD;&#xA;Just like its name said, identity.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// A structure that performs identity conversion.&#xD;&#xA;pub struct Identity;&#xD;&#xA;impl&lt;T&gt; Convert&lt;T, T&gt; for Identity {&#xD;&#xA;	fn convert(a: T) -&gt; T {&#xD;&#xA;		a&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35307" PostHistoryTypeId="5" PostId="8714" RevisionGUID="83c14d35-9b69-491e-977b-2dedcaf00f68" CreationDate="2023-06-20T08:56:48.117" UserId="3721" Comment="added 4 characters in body" Text="Could you help me to understand if there is any special purpose to add a `#[transactional]` attribute to an extrinsic?&#xD;&#xA;&#xD;&#xA;For instance, in `pallet-uniques` there is a call `buy_item` tagged with `frame_support::transactional` attribute: [github.com/parity/substrate/frame/uniques/src/lib.rs#L1526](https://github.com/paritytech/substrate/blob/7a64651e0ec6823cc2773f5b4823f56943d2d076/frame/uniques/src/lib.rs#L1526).&#xD;&#xA;&#xD;&#xA;Aren't all the functions under `#[pallet::call]` transactional by default?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35308" PostHistoryTypeId="2" PostId="8956" RevisionGUID="25cb4517-a27f-4624-b27b-9a4d4b4eca53" CreationDate="2023-06-20T08:56:56.020" UserId="94" Text="Bruno gave a good overview of the practical part; I will focus a bit on the theoretical part of your questions.&#xD;&#xA;&#xD;&#xA;&gt;So now we have a try-runtime step in CI, but what output from try-runtime requires actions from the engineer preparing the upgrade?&#xD;&#xA;&#xD;&#xA;The try-runtime CLI is designed to error out when there is a problem. Errors like &quot;Undecodable storage&quot; can come from migrations themselves, but are fine, as long as it does not abort.&#xD;&#xA;&#xD;&#xA;&gt;Is the only potential outcome that one of the upstream dependencies is about to run a costly migration on chain upgrade?&#xD;&#xA;&#xD;&#xA;The outcome of running try-runtime can be: There is a migration missing, wrong or in the wrong order. Additionally with the try-state checks it also runs some consistency checks in all pallets that support it. Ideally when all pallets would expose this, then it should be possible to really ensure that nothing is missing.&#xD;&#xA;&#xD;&#xA;&gt;Are there other problems which this could reveal?&#xD;&#xA;&#xD;&#xA;There are some additional commands being worked on like `follow-chain` or `fast-forward`, that will be able to ensure that not only the migrations worked, but the chain is also in a usable state afterwards. Some problems dont manifest immediately but take some blocks, which is currently not detected by the CLI." ContentLicense="CC BY-SA 4.0" />
  <row Id="35310" PostHistoryTypeId="2" PostId="8957" RevisionGUID="c862ad29-eb5f-4530-9232-f818ffb33ecc" CreationDate="2023-06-20T10:35:21.733" UserId="4319" Text="I want to implement pallet-assets on a type which is:&#xD;&#xA;&#xD;&#xA;    pub trait Config&lt;I: 'static = ()&gt;: Config {&#xD;&#xA;    type RuntimeEvent: From&lt;Event&lt;Self, I&gt;&gt; + IsType&lt;&lt;Self as Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize + MaxEncodedLen + TypeInfo;&#xD;&#xA;    type RemoveItemsLimit: Get&lt;u32&gt;;&#xD;&#xA;    type AssetId: Member + Parameter + Copy + MaybeSerializeDeserialize + MaxEncodedLen;&#xD;&#xA;    type AssetIdParameter: Parameter + Copy + From&lt;Self::AssetId&gt; + Into&lt;Self::AssetId&gt; + MaxEncodedLen;&#xD;&#xA;    type Currency: ReservableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;    type CreateOrigin: EnsureOriginWithArg&lt;Self::RuntimeOrigin, Self::AssetId, Success = Self::AccountId&gt;;&#xD;&#xA;    type ForceOrigin: EnsureOrigin&lt;Self::RuntimeOrigin&gt;;&#xD;&#xA;    type AssetDeposit: Get&lt;&lt;&lt;Self as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;Self as SystemConfig&gt;::AccountId&gt;&gt;::Balance&gt;;&#xD;&#xA;    type AssetAccountDeposit: Get&lt;&lt;&lt;Self as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;Self as SystemConfig&gt;::AccountId&gt;&gt;::Balance&gt;;&#xD;&#xA;    type MetadataDepositBase: Get&lt;&lt;&lt;Self as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;Self as SystemConfig&gt;::AccountId&gt;&gt;::Balance&gt;;&#xD;&#xA;    type MetadataDepositPerByte: Get&lt;&lt;&lt;Self as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;Self as SystemConfig&gt;::AccountId&gt;&gt;::Balance&gt;;&#xD;&#xA;    type ApprovalDeposit: Get&lt;&lt;&lt;Self as Config&lt;I&gt;&gt;::Currency as Currency&lt;&lt;Self as SystemConfig&gt;::AccountId&gt;&gt;::Balance&gt;;&#xD;&#xA;    type StringLimit: Get&lt;u32&gt;;&#xD;&#xA;    type Freezer: FrozenBalance&lt;Self::AssetId, Self::AccountId, Self::Balance&gt;;&#xD;&#xA;    type Extra: Member + Parameter + Default + MaxEncodedLen;&#xD;&#xA;    type CallbackHandle: AssetsCallback&lt;Self::AssetId, Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;in order to use in runtime/src/lib.rs&#xD;&#xA;could you pls help me?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35312" PostHistoryTypeId="1" PostId="8957" RevisionGUID="c862ad29-eb5f-4530-9232-f818ffb33ecc" CreationDate="2023-06-20T10:35:21.733" UserId="4319" Text="implement trait on a type" ContentLicense="CC BY-SA 4.0" />
  <row Id="35313" PostHistoryTypeId="3" PostId="8957" RevisionGUID="c862ad29-eb5f-4530-9232-f818ffb33ecc" CreationDate="2023-06-20T10:35:21.733" UserId="4319" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35314" PostHistoryTypeId="2" PostId="8958" RevisionGUID="4f4922cf-d2e5-46bc-8af9-ce84552fb1f2" CreationDate="2023-06-20T10:58:11.813" UserId="2372" Text="You are trying to implement a trait called Config with several associated types and constants for a pallet that deals with assets. Please have a look at [this][1] for implementation of pallets-assets in the runtime of your code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1510" ContentLicense="CC BY-SA 4.0" />
  <row Id="35316" PostHistoryTypeId="2" PostId="8959" RevisionGUID="5a9bfa28-cb83-4d39-b1de-dd91993a8a84" CreationDate="2023-06-20T11:03:34.707" UserId="83" Text="I made these changes to your code and it compiled successfully:&#xD;&#xA;&#xD;&#xA;[![changes to code shown in the question to make it work][1]][1]&#xD;&#xA;&#xD;&#xA;I was using these versions:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;rustc 1.69.0 (84c898d65 2023-04-16)&#xD;&#xA;cargo-contract-contract 3.0.1-unknown-x86_64-unknown-linux-gnu&#xD;&#xA;rustup 1.26.0 (5af9b9484 2023-04-05)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I was running it in a Docker container running:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Debian GNU/Linux 11 (bullseye)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I ran it with the following and it worked:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cargo +nightly-2023-03-21-x86_64-unknown-linux-gnu contract build&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mRJ2c.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35318" PostHistoryTypeId="2" PostId="8960" RevisionGUID="be69e805-eb36-437d-bb52-b03dda83f2f8" CreationDate="2023-06-20T11:04:44.563" UserId="445" Text="Please walk through this topic:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/build/pallet-coupling/ &#xD;&#xA;&#xD;&#xA;Then you can understand how to use pallet in src/runtime/lib.rs ( Implement specific pallet for Runtime) by using existing implementation or new implementation by yourself &#xD;&#xA;&#xD;&#xA;Some resources that you can learn:&#xD;&#xA;&#xD;&#xA; + https://docs.substrate.io/tutorials/build-application-logic/add-a-pallet/&#xD;&#xA; + https://github.com/PureStake/moonbeam/blob/master/runtime/moonbase/src/asset_config.rs#L94&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35320" PostHistoryTypeId="2" PostId="8961" RevisionGUID="011db715-755b-4f99-9fdb-5aef4d1283d1" CreationDate="2023-06-20T11:27:52.980" UserId="4343" Text="In the First one there is missing &#xD;&#xA;&#xD;&#xA;    Type Event = Event &#xD;&#xA;&#xD;&#xA;and in the second , there is missing MaxcodedLen in the Struct RawOrigin in your code" ContentLicense="CC BY-SA 4.0" />
  <row Id="35322" PostHistoryTypeId="5" PostId="8961" RevisionGUID="f63b493c-f9f4-4c53-a1be-9dac5905765b" CreationDate="2023-06-20T11:28:18.800" UserId="4343" Comment="added 4 characters in body" Text="In the First one there is missing &#xD;&#xA;&#xD;&#xA;    Type Event = Event &#xD;&#xA;&#xD;&#xA;and in the second , there is missing `MaxcodedLen` in the `Struct RawOrigin` in your code" ContentLicense="CC BY-SA 4.0" />
  <row Id="35323" PostHistoryTypeId="5" PostId="8806" RevisionGUID="db5f6afc-2cb5-4656-b63d-82b610427271" CreationDate="2023-06-20T12:44:42.900" UserId="83" Comment="combine sentences" Text="I enjoy writing [custom pallets][1] so I would like to know if instead of writing an ink! smart contract and then compiling it to .wasm and deploying it to the [Contracts module/pallet][2] of a Substrate-based chain, would it be possible to instead write the same logic in a [custom pallet][1] and then compile that to .wasm, and then deploy it to the [Contracts pallet/module][2] of a Substrate-based chain?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/custom-pallets/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/frame/contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="35324" PostHistoryTypeId="4" PostId="8806" RevisionGUID="db5f6afc-2cb5-4656-b63d-82b610427271" CreationDate="2023-06-20T12:44:42.900" UserId="83" Comment="combine sentences" Text="How to compile to wasm and deploy a custom pallet instead of an ink! smart contract to the Contracts module/pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35325" PostHistoryTypeId="2" PostId="8962" RevisionGUID="21d63fbb-19a3-4358-b72e-11236a238a82" CreationDate="2023-06-20T13:59:57.037" UserId="4062" Text="I am learning substrate lifecycle [transaction lifecycle][1]&#xD;&#xA;in the section &quot;Executing transactions and producing blocks&quot;, I want to read the source to understand the operation of Initializing a block, Executing the transactions to be included in a block, and Finalizing block building. But I don't find out source code for that. let's help me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/learn/transaction-lifecycle/#validating-and-queuing-transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="35327" PostHistoryTypeId="1" PostId="8962" RevisionGUID="21d63fbb-19a3-4358-b72e-11236a238a82" CreationDate="2023-06-20T13:59:57.037" UserId="4062" Text="Where can i find reading source code functions on_idle, on_initialize, and on_finalize of the pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35328" PostHistoryTypeId="3" PostId="8962" RevisionGUID="21d63fbb-19a3-4358-b72e-11236a238a82" CreationDate="2023-06-20T13:59:57.037" UserId="4062" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35329" PostHistoryTypeId="2" PostId="8963" RevisionGUID="904ed593-daf6-4cf2-af23-6bab2536ee12" CreationDate="2023-06-20T14:06:34.637" UserId="251" Text="The easiest way is using cargo doc.&#xD;&#xA;&#xD;&#xA;E.G.&#xD;&#xA;&#xD;&#xA;Search `on_initalize`: https://paritytech.github.io/substrate/master/sc_service/index.html?search=on_initalize.&#xD;&#xA;&#xD;&#xA;Click one and then click the source in the new page.&#xD;&#xA;&#xD;&#xA;[![][1]][1]&#xD;&#xA;&#xD;&#xA;And you can see the file tree, you can follow that to navigate in GitHub repo if you prefer using GitHub.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And for your question I suggest you starting from `frame_executive`.&#xD;&#xA;&#xD;&#xA;Check https://github.com/paritytech/substrate/tree/master/frame/executive.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fVztM.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/lESqM.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35331" PostHistoryTypeId="2" PostId="8964" RevisionGUID="45203cbb-d256-47df-91e4-d584cb7e5ef7" CreationDate="2023-06-20T14:50:30.633" UserId="2762" Text="From the ink! docs:&#xD;&#xA;&#xD;&#xA;&gt; ink! is just standard Rust in a well defined &quot;contract format&quot; with specialized #[ink(…)] attribute macros. These attribute macros tell ink! what the different parts of your Rust smart contract represent, and ultimately allow ink! to do all the magic needed to create Substrate compatible Wasm bytecode!&#xD;&#xA;&#xD;&#xA;In my opinion is a very interesting question, I hope to see some good ideas answering your question. Here is mine: &#xD;&#xA;&#xD;&#xA;As far as I know there is not a direct way to do that, as Luke suggested in the comment one option would be to create a tool that translate the pallet runtime code into the ink! code, and then we will be able to generate a `Wasm binary`, a `metadata file` (which contains the contract's ABI) and a `.contract` file which bundles both.&#xD;&#xA;&#xD;&#xA;A few months ago I did that exercise manually, I built a [pallet][1] and I convert it into a [smart contract][2] in ink!.&#xD;&#xA;I was able to reuse  most of the code and replace the [FRAME Macros][3]  with the [ink! macros][4] was not a big deal. However I found a couple of stoppers where the translation was not that trivial:&#xD;&#xA;&#xD;&#xA; - [ensure_root in ink!][5]. (It is possible now. The ink! team implemented a few weeks ago).&#xD;&#xA; - [BoundedVec on ink!][6]. (A workaround in the answer).&#xD;&#xA;&#xD;&#xA;So keep in mind that some of the things that you can do on pallets will need a very special tratment using ink!, and example might be [interacting with other pallets in the runtime][7]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AlexD10S/substrate-betting/blob/main/src/lib.rs&#xD;&#xA;  [2]: https://github.com/AlexD10S/betting-smart-contract&#xD;&#xA;  [3]: https://docs.substrate.io/reference/frame-macros/&#xD;&#xA;  [4]: https://use.ink/macros-attributes&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/7608/ensure-root-in-ink&#xD;&#xA;  [6]: https://substrate.stackexchange.com/questions/7562/boundedvec-on-ink&#xD;&#xA;  [7]: https://use.ink/macros-attributes/chain-extension/" ContentLicense="CC BY-SA 4.0" />
  <row Id="35333" PostHistoryTypeId="2" PostId="8965" RevisionGUID="5a709578-7696-4c70-950e-dac7b3dd6b8c" CreationDate="2023-06-20T15:55:12.270" UserId="560" Text="I want to get the meta function description of pallets storage maps. Returning an output like this:&#xD;&#xA;```&#xD;&#xA;{ Twox64Concat, [u8; 16], u32 } = query.storagemap(pallet: &quot;template&quot;, storagemap: &quot;SomeMap&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is a storage map I created and spun up the substrate node template:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type SomeMap&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, [u8; 16], u32&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The metadata only gives limited information about the storage map:&#xD;&#xA;```rust&#xD;&#xA;              {&#xD;&#xA;                name: SomeMap&#xD;&#xA;                modifier: Optional&#xD;&#xA;                type: {&#xD;&#xA;                  Map: {&#xD;&#xA;                    hashers: [&#xD;&#xA;                      Twox64Concat&#xD;&#xA;                    ]&#xD;&#xA;                    key: 111&#xD;&#xA;                    value: 4&#xD;&#xA;                  }&#xD;&#xA;                }&#xD;&#xA;                fallback: 0x00&#xD;&#xA;                docs: []&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm trying to get the function input types, &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The only type information I'm able to gathered is what polkadot.js gives me:&#xD;&#xA;&#xD;&#xA;[![polkadot.js][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/U80eQ.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks!   &#xD;&#xA;~ flipchan" ContentLicense="CC BY-SA 4.0" />
  <row Id="35335" PostHistoryTypeId="1" PostId="8965" RevisionGUID="5a709578-7696-4c70-950e-dac7b3dd6b8c" CreationDate="2023-06-20T15:55:12.270" UserId="560" Text="Query chain for types in a storagemap" ContentLicense="CC BY-SA 4.0" />
  <row Id="35336" PostHistoryTypeId="3" PostId="8965" RevisionGUID="5a709578-7696-4c70-950e-dac7b3dd6b8c" CreationDate="2023-06-20T15:55:12.270" UserId="560" Text="|pallet|runtime|storage|storagemap|storagevalue|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35337" PostHistoryTypeId="2" PostId="8966" RevisionGUID="7296b3bd-1f9b-4ed8-bef3-91fb7ba85ca5" CreationDate="2023-06-20T16:49:40.150" UserId="251" Text="There is also a type map in the metadata.&#xD;&#xA;&#xD;&#xA;Something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; metadata: {&#xD;&#xA;    V14: {&#xD;&#xA;      lookup: {&#xD;&#xA;        types: [&#xD;&#xA;          {&#xD;&#xA;            id: 0&#xD;&#xA;            type: {&#xD;&#xA;              path: [&#xD;&#xA;                account&#xD;&#xA;                AccountId20&#xD;&#xA;              ]&#xD;&#xA;              params: []&#xD;&#xA;              def: {&#xD;&#xA;                Composite: {&#xD;&#xA;                  fields: [&#xD;&#xA;                    {&#xD;&#xA;                      name: null&#xD;&#xA;                      type: 1&#xD;&#xA;                      typeName: [u8; 20]&#xD;&#xA;                      docs: []&#xD;&#xA;                    }&#xD;&#xA;                  ]&#xD;&#xA;                }&#xD;&#xA;              }&#xD;&#xA;              docs: []&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You need to follow the type id to construct the type base on that map to get the real type.&#xD;&#xA;&#xD;&#xA;E.G. this is my chain's `[u8; 16]` which is located at `105`:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  name: Array16&#xD;&#xA;  fields: [&#xD;&#xA;    {&#xD;&#xA;      name: null&#xD;&#xA;      type: 105&#xD;&#xA;      typeName: [u8; 16]&#xD;&#xA;      docs: []&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;  index: 4&#xD;&#xA;  docs: []&#xD;&#xA;}&#xD;&#xA;{&#xD;&#xA;  id: 105&#xD;&#xA;  type: {&#xD;&#xA;    path: []&#xD;&#xA;    params: []&#xD;&#xA;    def: {&#xD;&#xA;      Array: {&#xD;&#xA;        len: 16&#xD;&#xA;        type: 2&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    docs: []&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35339" PostHistoryTypeId="5" PostId="8966" RevisionGUID="f1029908-0931-4e99-baf2-21c3c2e67747" CreationDate="2023-06-20T16:54:57.573" UserId="251" Comment="added 87 characters in body" Text="There is also a type map in the metadata.&#xD;&#xA;&#xD;&#xA;Something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; metadata: {&#xD;&#xA;    V14: {&#xD;&#xA;      lookup: {&#xD;&#xA;        types: [&#xD;&#xA;          {&#xD;&#xA;            id: 0&#xD;&#xA;            type: {&#xD;&#xA;              path: [&#xD;&#xA;                account&#xD;&#xA;                AccountId20&#xD;&#xA;              ]&#xD;&#xA;              params: []&#xD;&#xA;              def: {&#xD;&#xA;                Composite: {&#xD;&#xA;                  fields: [&#xD;&#xA;                    {&#xD;&#xA;                      name: null&#xD;&#xA;                      type: 1&#xD;&#xA;                      typeName: [u8; 20]&#xD;&#xA;                      docs: []&#xD;&#xA;                    }&#xD;&#xA;                  ]&#xD;&#xA;                }&#xD;&#xA;              }&#xD;&#xA;              docs: []&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You need to follow the type id to construct the type base on that map to get the real type.&#xD;&#xA;&#xD;&#xA;E.G. this is my chain's `[u8; 16]` which is located at `105`:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  name: Array16&#xD;&#xA;  fields: [&#xD;&#xA;    {&#xD;&#xA;      name: null&#xD;&#xA;      type: 105&#xD;&#xA;      typeName: [u8; 16]&#xD;&#xA;      docs: []&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;  index: 4&#xD;&#xA;  docs: []&#xD;&#xA;}&#xD;&#xA;{&#xD;&#xA;  id: 105&#xD;&#xA;  type: {&#xD;&#xA;    path: []&#xD;&#xA;    params: []&#xD;&#xA;    def: {&#xD;&#xA;      Array: {&#xD;&#xA;        len: 16&#xD;&#xA;        type: 2&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    docs: []&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;In simple terms, find the storage, find the type id then construct the type." ContentLicense="CC BY-SA 4.0" />
  <row Id="35340" PostHistoryTypeId="2" PostId="8967" RevisionGUID="85a769eb-f5f6-4b0b-a1a4-f2da0a6d50de" CreationDate="2023-06-20T17:11:53.223" UserId="225" Text="Most of the merklized structures I can think of, are usually based on multiple nodes linked/hashed together with no cycle (tree, patricia trie, or mmr).&#xD;&#xA;Meaning that runtime like the ones produce by cumulus it will be difficult or a rather big change.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note that some key value indexing for key value database are not flat but also log(N), eg for paritydb we got a hashmap like indexing (this one is flat but I don't know how to define a merkle proof for it), but also a btree indexing. One possibility to improve perf would be to attach the merklized info directly into the db indexing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There may be some way to produce proof based on different crypto, but that is a lot out of my scope and I guess would be not straight forward to integrate with substrate (we use different merkle state structure at different chain height as a way to maintain history of state)." ContentLicense="CC BY-SA 4.0" />
  <row Id="35342" PostHistoryTypeId="5" PostId="8967" RevisionGUID="42249aa3-6d4d-4024-96bb-8d9ef72beaed" CreationDate="2023-06-20T18:04:29.053" UserId="225" Comment="added 165 characters in body" Text="Most of the merklized structures I can think of, are usually based on multiple nodes linked/hashed together with no cycle (tree, patricia trie, or mmr).&#xD;&#xA;Meaning that runtime like the ones produce by cumulus it will be difficult or a rather big change.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note that some key value indexing for key value database are not flat but also log(N), eg for paritydb we got a hashmap like indexing (this one is flat but I don't know how to define a merkle proof for it), but also a btree indexing. One possibility to improve perf would be to attach the merklized info directly into the db indexing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There may be some way to produce proof based on different crypto, but that is a lot out of my scope and I guess would be not straight forward to integrate with substrate (we use different merkle state structure at different chain height as a way to maintain history of state).&#xD;&#xA;&#xD;&#xA;Edit: can also envision some head of chain direct key value db storage like ethereum snapshot, but it only cover part of the use case (read access when syncing)." ContentLicense="CC BY-SA 4.0" />
  <row Id="35343" PostHistoryTypeId="52" PostId="8957" RevisionGUID="7084c937-2ac6-4c57-9a84-1cdc2e908d28" CreationDate="2023-06-20T18:35:51.580" />
  <row Id="35344" PostHistoryTypeId="2" PostId="8968" RevisionGUID="bc82ff04-a276-4fab-804e-d614642909f0" CreationDate="2023-06-20T18:45:26.913" UserId="2722" Text="I'm working with a Substrate blockchain and have a structure with a field named end_date. I'd like to check if the current date is greater than end_date within a Substrate runtime module, but I'm unsure how to implement this.&#xD;&#xA;&#xD;&#xA;How can I retrieve the current date from the Substrate framework, and then compare it to end_date?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35346" PostHistoryTypeId="1" PostId="8968" RevisionGUID="bc82ff04-a276-4fab-804e-d614642909f0" CreationDate="2023-06-20T18:45:26.913" UserId="2722" Text="How to compare current date with a stored date in a Substrate blockchain module?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35347" PostHistoryTypeId="3" PostId="8968" RevisionGUID="bc82ff04-a276-4fab-804e-d614642909f0" CreationDate="2023-06-20T18:45:26.913" UserId="2722" Text="|polkadot-js|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35348" PostHistoryTypeId="2" PostId="8969" RevisionGUID="ea93a6bd-2042-4834-85f6-08c7d27ef766" CreationDate="2023-06-20T20:21:06.097" UserId="73" Text="You need to change your declaration of `MAXIMUM_BLOCK_WEIGHT` to:&#xD;&#xA;```&#xD;&#xA;pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(&#xD;&#xA;	WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),&#xD;&#xA;	polkadot_primitives::MAX_POV_SIZE as u64,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In your code base you don't set the pov size and this will make the initialization of `RuntimeBlockWeights` fail." ContentLicense="CC BY-SA 4.0" />
  <row Id="35350" PostHistoryTypeId="5" PostId="8964" RevisionGUID="790b28c8-84d0-4b36-9fda-aa44c568200a" CreationDate="2023-06-21T00:34:31.703" UserId="83" Comment="typo" Text="From the ink! docs:&#xD;&#xA;&#xD;&#xA;&gt; ink! is just standard Rust in a well defined &quot;contract format&quot; with specialized #[ink(…)] attribute macros. These attribute macros tell ink! what the different parts of your Rust smart contract represent, and ultimately allow ink! to do all the magic needed to create Substrate compatible Wasm bytecode!&#xD;&#xA;&#xD;&#xA;In my opinion is a very interesting question, I hope to see some good ideas answering your question. Here is mine: &#xD;&#xA;&#xD;&#xA;As far as I know there is not a direct way to do that, as Luke suggested in the comment one option would be to create a tool that translate the pallet runtime code into the ink! code, and then we will be able to generate a `Wasm binary`, a `metadata file` (which contains the contract's ABI) and a `.contract` file which bundles both.&#xD;&#xA;&#xD;&#xA;A few months ago I did that exercise manually, I built a [pallet][1] and I convert it into a [smart contract][2] in ink!.&#xD;&#xA;I was able to reuse  most of the code and replace the [FRAME Macros][3]  with the [ink! macros][4] was not a big deal. However I found a couple of stoppers where the translation was not that trivial:&#xD;&#xA;&#xD;&#xA; - [ensure_root in ink!][5]. (It is possible now. The ink! team implemented a few weeks ago).&#xD;&#xA; - [BoundedVec on ink!][6]. (A workaround in the answer).&#xD;&#xA;&#xD;&#xA;So keep in mind that some of the things that you can do on pallets will need a very special treatment using ink!, and example might be [interacting with other pallets in the runtime][7]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AlexD10S/substrate-betting/blob/main/src/lib.rs&#xD;&#xA;  [2]: https://github.com/AlexD10S/betting-smart-contract&#xD;&#xA;  [3]: https://docs.substrate.io/reference/frame-macros/&#xD;&#xA;  [4]: https://use.ink/macros-attributes&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/7608/ensure-root-in-ink&#xD;&#xA;  [6]: https://substrate.stackexchange.com/questions/7562/boundedvec-on-ink&#xD;&#xA;  [7]: https://use.ink/macros-attributes/chain-extension/" ContentLicense="CC BY-SA 4.0" />
  <row Id="35351" PostHistoryTypeId="2" PostId="8970" RevisionGUID="761fe2e0-f77d-4e21-84f8-560efd87bca9" CreationDate="2023-06-21T02:23:44.183" UserId="2065" Text="The error was coming from setting the `MAXIMUM_BLOCK_WEIGHT` value using `Weight::from_ref_time` instead of `Weight::from_parts` using `polkadot_primitives::MAX_POV_SIZE as u64` as proof size value&#xD;&#xA;&#xD;&#xA;The correct value is  &#xD;&#xA;&#xD;&#xA;    pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(&#xD;&#xA;        WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),&#xD;&#xA;        polkadot_primitives::MAX_POV_SIZE as u64,&#xD;&#xA;    );" ContentLicense="CC BY-SA 4.0" />
  <row Id="35353" PostHistoryTypeId="2" PostId="8971" RevisionGUID="c61266e3-fad1-4323-aa1f-84c81ee73bd8" CreationDate="2023-06-21T02:30:43.117" UserId="2844" Text="I Added `pallet-staking` and it's build fine. When I run the node in dev mode using `./target/release/node-template --dev` this command, it doesn't create any blocks. Can someone point out me why block are not producing after adding `staking-pallet`.&#xD;&#xA;&#xD;&#xA;This is terminal output.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vu4ts.jpg&#xD;&#xA;&#xD;&#xA;Code is in [github](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/staking-pallet-testing)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35355" PostHistoryTypeId="1" PostId="8971" RevisionGUID="c61266e3-fad1-4323-aa1f-84c81ee73bd8" CreationDate="2023-06-21T02:30:43.117" UserId="2844" Text="Why my node doesn't create any block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35356" PostHistoryTypeId="3" PostId="8971" RevisionGUID="c61266e3-fad1-4323-aa1f-84c81ee73bd8" CreationDate="2023-06-21T02:30:43.117" UserId="2844" Text="|substrate-node-template|pallet|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35357" PostHistoryTypeId="5" PostId="8970" RevisionGUID="9eed9b8e-9449-45f5-bade-5cb17408c4dc" CreationDate="2023-06-21T02:52:07.540" UserId="2065" Comment="added 225 characters in body" Text="The error was coming from setting the `MAXIMUM_BLOCK_WEIGHT` value using `Weight::from_ref_time` instead of `Weight::from_parts` using `polkadot_primitives::MAX_POV_SIZE as u64` as proof size value&#xD;&#xA;&#xD;&#xA;The correct value is  &#xD;&#xA;&#xD;&#xA;    pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(&#xD;&#xA;        WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),&#xD;&#xA;        polkadot_primitives::MAX_POV_SIZE as u64,&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;Found the solution to the problem through the answer of a question I asked [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/8950/construct-runtime-integrity-test-fails-after-upgrading-to-polkadot-0-9-38" ContentLicense="CC BY-SA 4.0" />
  <row Id="35358" PostHistoryTypeId="2" PostId="8972" RevisionGUID="a545aaa8-33c0-404f-bfae-fba27e11fd66" CreationDate="2023-06-21T03:11:52.940" UserId="251" Text="Because there isn't any genesis stakers.&#xD;&#xA;&#xD;&#xA;No validators means no one to produce the block.&#xD;&#xA;&#xD;&#xA;https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/fd6743b04455fbf1f2d0aaccf4885970d951076b/node/src/chain_spec.rs#L180&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I suggest you always checking the Substrate example node first before asking the question.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/6e0059a416a5768e58765a49b33c21920c0b0eb9/bin/node/cli/src/chain_spec.rs#L315" ContentLicense="CC BY-SA 4.0" />
  <row Id="35360" PostHistoryTypeId="50" PostId="6245" RevisionGUID="dddeb21d-c09f-4de9-960a-f46d068669d6" CreationDate="2023-06-21T04:07:55.880" UserId="-1" />
  <row Id="35362" PostHistoryTypeId="5" PostId="8971" RevisionGUID="0852b74a-6cf1-406f-9450-cc183440fd6e" CreationDate="2023-06-21T05:02:12.333" UserId="2372" Comment="added 6 characters in body" Text="I Added `pallet-staking` and it's build fine. When I'm running the node in dev mode using `./target/release/node-template --dev` this command, it doesn't create any blocks. Can someone point out me why block are not producing after adding `staking-pallet`.&#xD;&#xA;&#xD;&#xA;This is terminal output.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vu4ts.jpg&#xD;&#xA;&#xD;&#xA;Code is in [github](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/staking-pallet-testing)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35363" PostHistoryTypeId="2" PostId="8973" RevisionGUID="7d2a8c2a-67de-43df-a3ed-b564687c467c" CreationDate="2023-06-21T05:45:56.393" UserId="2372" Text="When i'm starting my node in the M2, it is continuously showing this error&#xD;&#xA;&#xD;&#xA;.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CJgJm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35365" PostHistoryTypeId="1" PostId="8973" RevisionGUID="7d2a8c2a-67de-43df-a3ed-b564687c467c" CreationDate="2023-06-21T05:45:56.393" UserId="2372" Text="Rejected connection: Transport(handshake was not a GET request)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35366" PostHistoryTypeId="3" PostId="8973" RevisionGUID="7d2a8c2a-67de-43df-a3ed-b564687c467c" CreationDate="2023-06-21T05:45:56.393" UserId="2372" Text="|nodes|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35367" PostHistoryTypeId="50" PostId="6829" RevisionGUID="7d29b453-3290-45ac-abe4-f5a30477e379" CreationDate="2023-06-21T06:02:55.330" UserId="-1" />
  <row Id="35369" PostHistoryTypeId="2" PostId="8974" RevisionGUID="9ec4545a-9bfc-4cf4-b0fa-75492a783be7" CreationDate="2023-06-21T07:23:17.600" UserId="3980" Text="I don't think you should have ink_env as a dependency of your chain extension,&#xD;&#xA;If you want to use the shared `nomination-pool-staking-chain-extension-types` package, you might need to rely on optional dependencies and feature flags to only compile the `ink_env::chain_extension::FromStatusCode` trait implementation when you compile it inside your contract " ContentLicense="CC BY-SA 4.0" />
  <row Id="35371" PostHistoryTypeId="2" PostId="8975" RevisionGUID="9d73628f-c3bf-4280-94b0-c68677fbf356" CreationDate="2023-06-21T07:48:37.373" UserId="165" Text="So it looks like it is necessary to wrap a signed payload with &quot;\&lt;Bytes&gt;&quot; &quot;\&lt;/Bytes&gt;&quot; before verifying its signature.&#xD;&#xA;&#xD;&#xA;Some examples I have found are:&#xD;&#xA;&#xD;&#xA;[Offchain signature validation in NFTS pallet](https://github.com/paritytech/substrate/blob/6e0059a416a5768e58765a49b33c21920c0b0eb9/frame/nfts/src/common_functions.rs#L34-L56)&#xD;&#xA;&#xD;&#xA;Where it even shows the following comment&#xD;&#xA;```&#xD;&#xA;// NOTE: for security reasons modern UIs implicitly wrap the data requested to sign into&#xD;&#xA;// &lt;Bytes&gt;&lt;/Bytes&gt;, that's why we support both wrapped and raw versions.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Again, the same wrapping found [here](https://github.com/LibertyDSNP/frequency/blob/b4abdf037ff4d49ae289b018f9c865a2b2b0ce12/common/primitives/src/utils.rs#L100-L110)&#xD;&#xA;&#xD;&#xA;So my questions is, where can I find some documentation about this, or some historic explanation of why we need to do this ?. I get that this is how it has to be done, but I have not been able to find anything more about it.&#xD;&#xA;&#xD;&#xA;Thanks for any answer beforehand!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35373" PostHistoryTypeId="1" PostId="8975" RevisionGUID="9d73628f-c3bf-4280-94b0-c68677fbf356" CreationDate="2023-06-21T07:48:37.373" UserId="165" Text="Wrapping data with &lt;Bytes&gt; when validating signatures" ContentLicense="CC BY-SA 4.0" />
  <row Id="35374" PostHistoryTypeId="3" PostId="8975" RevisionGUID="9d73628f-c3bf-4280-94b0-c68677fbf356" CreationDate="2023-06-21T07:48:37.373" UserId="165" Text="|signatures|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35375" PostHistoryTypeId="2" PostId="8976" RevisionGUID="74e48553-ce03-46c7-9204-4d6d3bd747d1" CreationDate="2023-06-21T08:02:57.873" UserId="548" Text="If you don't wrap it with `&lt;Bytes&gt; &lt;/Bytes&gt;`, a dapp could ask a user to sign a legit transaction instead of a random harmless payload.&#xD;&#xA;&#xD;&#xA;In Ethereum, wallets that support the EIP-1271 standard will display the actual payload the user would need to sign. &#xD;&#xA;Without that standard, the only thing user will see is just the hex string.&#xD;&#xA;&#xD;&#xA;So, wrapping with `&lt;Bytes&gt; &lt;/Bytes&gt;` acts as a simple solution to avoid blind signing of forged transactions." ContentLicense="CC BY-SA 4.0" />
  <row Id="35377" PostHistoryTypeId="50" PostId="8568" RevisionGUID="963a926c-bcca-40ba-9d21-85ff60384171" CreationDate="2023-06-21T08:07:05.917" UserId="-1" />
  <row Id="35378" PostHistoryTypeId="2" PostId="8977" RevisionGUID="f9e4bad8-13ac-493f-be3f-edb3d9d4248f" CreationDate="2023-06-21T08:40:20.207" UserId="2909" Text="Based on the Polkadot wiki: https://wiki.polkadot.network/docs/learn-identity&#xD;&#xA;the cost of setting an identity is as follows: &quot;Users must reserve funds in a bond to store their information on chain: 20.258 DOT and 0.066 DOT per each field beyond the legal name.&quot;. Additionally there is an additional layer (Judgments) where the users can pick registrars and an additional cost is associated with this.&#xD;&#xA;&#xD;&#xA; - Typically, do the parachains initially have to incur these costs to onboard the Users? This is relevant for us as we budget out different costs for our network going forward.&#xD;&#xA; - Additionally is it mandatory to implement the judgement process (because we are integrating with Kilt DID)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35380" PostHistoryTypeId="1" PostId="8977" RevisionGUID="f9e4bad8-13ac-493f-be3f-edb3d9d4248f" CreationDate="2023-06-21T08:40:20.207" UserId="2909" Text="What is the cost incurred in relation to setting an identity on Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35381" PostHistoryTypeId="3" PostId="8977" RevisionGUID="f9e4bad8-13ac-493f-be3f-edb3d9d4248f" CreationDate="2023-06-21T08:40:20.207" UserId="2909" Text="|identity|pallet-identity|kilt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35382" PostHistoryTypeId="2" PostId="8978" RevisionGUID="9e2e899a-25ca-4d09-8695-1b383d75d26b" CreationDate="2023-06-21T08:40:20.207" UserId="2909" Text="Judgements essentially is a business model on Polkadot that all different types of parties can provide the service for a fee. You could even provide your own judgement service.&#xD;&#xA;&#xD;&#xA;The Web3 Foundation has a judgement service as well:&#xD;&#xA;https://support.polkadot.network/support/solutions/articles/65000181990-how-to-request-and-cancel-identity-judgement&#xD;&#xA;&#xD;&#xA;&quot;The W3F registrar service is currently free to use on Polkadot, however on Kusama it requires a small fee of 0.04 KSM, which can be entered in the &quot;maxFee&quot; field as a value in Plancks, i.e. 40,000,000,000.&quot;&#xD;&#xA;&#xD;&#xA;In the context of using Kilt, judgements is not totally necessary - it is mainly if the users want to link their Kilt DID with their Polkadot account identity: https://docs.kilt.io/docs/develop/sdk/cookbook/account_linking/account-link&#xD;&#xA;&#xD;&#xA;This is for users who want their name/website etc on their Polkadot account identity to be tied to additional credentials on Kilt. Also this is not your cost, it is the user's cost to pay for judgements. Kilt has similar types of credential issuance that have services used for verification: https://docs.kilt.io/docs/develop/sdk/cookbook/public_credentials/public-credential-issuance&#xD;&#xA;&#xD;&#xA;Ultimately this means it depends on who your target audience is and do they care if they want their identities linked to achieve your team's use case?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35384" PostHistoryTypeId="2" PostId="8979" RevisionGUID="30b42427-8a9a-4e44-b925-8491839f4240" CreationDate="2023-06-21T08:55:18.460" UserId="2862" Text="What is required from a technical point of view (specific pallets and APIs) for parachains to support light clients? I saw that only a few parachains have the option to interact with the light clients." ContentLicense="CC BY-SA 4.0" />
  <row Id="35386" PostHistoryTypeId="1" PostId="8979" RevisionGUID="30b42427-8a9a-4e44-b925-8491839f4240" CreationDate="2023-06-21T08:55:18.460" UserId="2862" Text="Parachain support for light clients" ContentLicense="CC BY-SA 4.0" />
  <row Id="35387" PostHistoryTypeId="3" PostId="8979" RevisionGUID="30b42427-8a9a-4e44-b925-8491839f4240" CreationDate="2023-06-21T08:55:18.460" UserId="2862" Text="|parachain|runtime|api|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35388" PostHistoryTypeId="50" PostId="8114" RevisionGUID="4301ecab-0e39-4e35-90af-f90d5243aa21" CreationDate="2023-06-21T09:01:30.193" UserId="-1" />
  <row Id="35389" PostHistoryTypeId="50" PostId="8569" RevisionGUID="d7e94144-f5f6-45e7-910b-d4351e7adffa" CreationDate="2023-06-21T10:07:00.967" UserId="-1" />
  <row Id="35390" PostHistoryTypeId="52" PostId="8971" RevisionGUID="942acb19-4fdd-46ed-b0c4-dd362093d8ed" CreationDate="2023-06-21T10:31:54.500" />
  <row Id="35392" PostHistoryTypeId="2" PostId="8980" RevisionGUID="4891a12f-1aba-4373-aa28-d06448ad7afc" CreationDate="2023-06-21T11:07:33.367" UserId="2844" Text="I am getting this issue while running node using `./target/release/node-template --dev ` this command. I try to change `GenesisConfig -&gt; balance` same as substrate example from [here](https://github.com/paritytech/substrate/blob/6e0059a416a5768e58765a49b33c21920c0b0eb9/bin/node/cli/src/chain_spec.rs#L299) and add `GenesisConfig -&gt; staking` like [this](https://github.com/paritytech/substrate/blob/6e0059a416a5768e58765a49b33c21920c0b0eb9/bin/node/cli/src/chain_spec.rs#L315) in my node but I am getting issue. Someone please help what is wrong here.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/L01YE.png&#xD;&#xA;&#xD;&#xA;[code link](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/staking-pallet-testing)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35394" PostHistoryTypeId="1" PostId="8980" RevisionGUID="4891a12f-1aba-4373-aa28-d06448ad7afc" CreationDate="2023-06-21T11:07:33.367" UserId="2844" Text="Stash does not have enough balance to bond" ContentLicense="CC BY-SA 4.0" />
  <row Id="35395" PostHistoryTypeId="3" PostId="8980" RevisionGUID="4891a12f-1aba-4373-aa28-d06448ad7afc" CreationDate="2023-06-21T11:07:33.367" UserId="2844" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35396" PostHistoryTypeId="2" PostId="8981" RevisionGUID="82321e90-0741-438c-8878-0e83a3002fdb" CreationDate="2023-06-21T11:21:13.023" UserId="251" Text="&gt; https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/b4e1b56ac1a6757f79595d9fe291d5f3fd990798/node/src/chain_spec.rs#L63-L76&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// Initial PoA authorities&#xD;&#xA;vec![&#xD;&#xA;	authority_keys_from_seed(&quot;Alice&quot;),&#xD;&#xA;	authority_keys_from_seed(&quot;Bob&quot;),&#xD;&#xA;	authority_keys_from_seed(&quot;Charlie&quot;),&#xD;&#xA;	authority_keys_from_seed(&quot;Dave&quot;),&#xD;&#xA;],&#xD;&#xA;// Sudo account&#xD;&#xA;get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;// Pre-funded accounts&#xD;&#xA;vec![&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;	get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;],&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You only funded Alice and Bob. Hence, Charlie and Dave don't have enough money to bond.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;*I'm very happy to answer your question. But maybe you should pay more patient with your code?&#xD;&#xA;You got a pretty clear code comment, you shouldn't miss it... :)*" ContentLicense="CC BY-SA 4.0" />
  <row Id="35398" PostHistoryTypeId="5" PostId="925" RevisionGUID="1a735349-5196-419f-a7c7-6a3e086b6e41" CreationDate="2023-06-21T12:08:17.870" UserId="3136" Comment="modify in body" Text="For a `parachain` is it ok to have `RPC` and `collator` in one node? If not why? I'd love to hear some deeper explanation." ContentLicense="CC BY-SA 4.0" />
  <row Id="35399" PostHistoryTypeId="24" PostId="925" RevisionGUID="1a735349-5196-419f-a7c7-6a3e086b6e41" CreationDate="2023-06-21T12:08:17.870" Comment="Proposed by 3136 approved by 2281, 2673 edit id of 467" ContentLicense="CC BY-SA 4.0" />
  <row Id="35400" PostHistoryTypeId="5" PostId="6401" RevisionGUID="e8aa0cca-df57-47fb-a90c-dd8e7925bc67" CreationDate="2023-06-21T12:08:24.593" UserId="116" Comment="code in code blocks Error in error block" Text="I am deploying flipper ink! smart contract to shibuya, but when I tried to read the value using `get()` I am getting this error:&#xD;&#xA;&gt; { Err: { Module: { index: 70 error: 0x02000000 } } }&#xD;&#xA;&#xD;&#xA;I also tried deploying it to rococo and getting similar error:&#xD;&#xA;&gt; { Err: { Module: { index: 40 error: 0x02000000 } } }&#xD;&#xA;&#xD;&#xA;any idea what is the error and why ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35401" PostHistoryTypeId="24" PostId="6401" RevisionGUID="e8aa0cca-df57-47fb-a90c-dd8e7925bc67" CreationDate="2023-06-21T12:08:24.593" Comment="Proposed by 116 approved by 2281, 2673 edit id of 458" ContentLicense="CC BY-SA 4.0" />
  <row Id="35402" PostHistoryTypeId="5" PostId="5044" RevisionGUID="8718ea12-8c04-498b-ac92-499926ed8a03" CreationDate="2023-06-21T12:08:31.357" UserId="116" Comment="Spelling dont -&gt; don't" Text="I am currently using the polkadot sdk in my typescript project and while I was attempting to upgrade their versions, I deleted my yarn.lock file and reran yarn install but now I get this when I try and run the project&#xD;&#xA;&#xD;&#xA;[![screenshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I saw online that yarn dedupe would help but since I am already using yarn v2, it should be built in and thus I am not able to run that command manually.&#xD;&#xA;&#xD;&#xA;Here are the three polkadot dependencies I am trying to import into my project: [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I'm struggling to figure out how to fix this as I don't want to have to rely on manually going in and deleting duplicate packets every time I do a fresh yarn install.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Ytcx2.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/zpwaY.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35403" PostHistoryTypeId="24" PostId="5044" RevisionGUID="8718ea12-8c04-498b-ac92-499926ed8a03" CreationDate="2023-06-21T12:08:31.357" Comment="Proposed by 116 approved by 2281, 2673 edit id of 465" ContentLicense="CC BY-SA 4.0" />
  <row Id="35404" PostHistoryTypeId="5" PostId="8843" RevisionGUID="5e3a0b0f-5462-403a-b1e0-bd3d923eaf73" CreationDate="2023-06-21T12:09:02.640" UserId="116" Comment="Moved the error to the question too" Text="While `running` this project https://github.com/jimmychu0807/substrate-offchain-worker-demo&#xD;&#xA;I get this error:&#xD;&#xA;&#xD;&#xA;&gt;error[E0282]: type annotations needed --&gt; /libp2p-noise-0.32.0/src/protocol/x25519.rs:221:45" ContentLicense="CC BY-SA 4.0" />
  <row Id="35405" PostHistoryTypeId="24" PostId="8843" RevisionGUID="5e3a0b0f-5462-403a-b1e0-bd3d923eaf73" CreationDate="2023-06-21T12:09:02.640" Comment="Proposed by 116 approved by 2281, 2673 edit id of 451" ContentLicense="CC BY-SA 4.0" />
  <row Id="35406" PostHistoryTypeId="5" PostId="8859" RevisionGUID="86d0da1d-9085-4427-a96d-530708496a22" CreationDate="2023-06-21T12:09:12.807" UserId="116" Comment="Added error from comments" Text="[![Screenshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/tpuW4.png&#xD;&#xA;&#xD;&#xA;I've added `pallet-nft` and `pallet-uniques` in the Relay Chain. All the things are working fine but when I'm signing the transaction in the `pallet-uniques` `fn create(collection,admin)`, it is showing me this error:&#xD;&#xA;&#xD;&#xA;&gt; 1002: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm unreachable instruction executed WASM backtrace: 0: 0x547257 - &lt;unknown&gt;!rust_begin_unwind 1: 0x54ee - &lt;unknown&gt;!core::panicking::panic_fmt::hca80ede79c2b9c5b 2: 0x29ff1c - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction : RuntimeApi, Execution failed: Execution aborted due to trap: wasm trap: wasm unreachable instruction executed\nWASM backtrace:\n\n 0: 0x547257 - &lt;unknown&gt;!rust_begin_unwind\n 1: 0x54ee " ContentLicense="CC BY-SA 4.0" />
  <row Id="35407" PostHistoryTypeId="24" PostId="8859" RevisionGUID="86d0da1d-9085-4427-a96d-530708496a22" CreationDate="2023-06-21T12:09:12.807" Comment="Proposed by 116 approved by 2281, 2673 edit id of 457" ContentLicense="CC BY-SA 4.0" />
  <row Id="35408" PostHistoryTypeId="5" PostId="905" RevisionGUID="8ac55891-f1e7-453e-a36d-302608e12398" CreationDate="2023-06-21T12:09:17.870" UserId="3136" Comment="modify in body" Text="I'm trying to post on Subsocial but when I hit `&quot;Create Post&quot;` the sign request isn't popping up. I have tried logging in and out, changing the sign request type, disabling and enabling the `extension`, updating `metadata`, and I have been all through the extension trying to get the signature request to pop up. I do have a ping next to the extension logo saying &quot;1&quot; with a red square, signifying that I have a sign request but for some reason I can't access it. Thanks for any and all help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35409" PostHistoryTypeId="24" PostId="905" RevisionGUID="8ac55891-f1e7-453e-a36d-302608e12398" CreationDate="2023-06-21T12:09:17.870" Comment="Proposed by 3136 approved by 2281, 2673 edit id of 466" ContentLicense="CC BY-SA 4.0" />
  <row Id="35410" PostHistoryTypeId="5" PostId="5024" RevisionGUID="66a2d55f-fe8b-47dc-b52d-2f2313443d6d" CreationDate="2023-06-21T12:09:29.453" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I'm following the guide in [polkadot-js/typegen][1], the github source is shared. I am trying to follow along and decorate the api for my custom node-template called [supersig-template][2]&#xD;&#xA;&#xD;&#xA;I have successfully created an output of the metadata:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:&quot;1&quot;, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;state_getMetadata&quot;, &quot;params&quot;:[]}' http://localhost:9933 &gt; supersig-template.json&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I am not very clearly in the github source where I should be running `yarn build`. I try in the root of forking [/docs][3] repo. But I don't think that is the correct place.&#xD;&#xA;&#xD;&#xA;Then I went into `/docs/api/examples/promise/typegen` separated it into its own repo, changed package json to include `--endpoint ./supersig-template.json` then ran `yarn build` and got this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;typegen % yarn build&#xD;&#xA;yarn run v1.22.19&#xD;&#xA;$ yarn generate:defs &amp;&amp; yarn generate:meta&#xD;&#xA;$ ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package sample-polkadotjs-typegen/interfaces --input /src/interfaces --endpoint /Users/ramsey/decentration/typegen/supersig-template.json&#xD;&#xA;Options:&#xD;&#xA;  --help     Show help                                                 [boolean]&#xD;&#xA;  --version  Show version number                                       [boolean]&#xD;&#xA;  --input    The directory to use for the user definitions   [string] [required]&#xD;&#xA;  --package  The package name &amp; path to use for the user types&#xD;&#xA;                                                             [string] [required]&#xD;&#xA;&#xD;&#xA;Unknown argument: endpoint&#xD;&#xA;error Command failed with exit code 1.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A few questions:&#xD;&#xA;&#xD;&#xA;- is typegen still up to date and something that can be used to decorate APIs?&#xD;&#xA;- has endpoint been removed as an argument?&#xD;&#xA;- am I going about thing the correct way to decorate the api?&#xD;&#xA;&#xD;&#xA;**Solution to &quot;unknown endpoint&quot; issue: Make sure to bump the version of both polkadot/api and polkadot/typegen to ^8.13.1 and it will `yarn build` successfully.**&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/typegen&#xD;&#xA;  [2]: https://github.com/decentration/substrate-supersig-template&#xD;&#xA;  [3]: https://github.com/polkadot-js/docs" ContentLicense="CC BY-SA 4.0" />
  <row Id="35411" PostHistoryTypeId="24" PostId="5024" RevisionGUID="66a2d55f-fe8b-47dc-b52d-2f2313443d6d" CreationDate="2023-06-21T12:09:29.453" Comment="Proposed by 116 approved by 2281, 2673 edit id of 473" ContentLicense="CC BY-SA 4.0" />
  <row Id="35412" PostHistoryTypeId="5" PostId="2774" RevisionGUID="48bad5f2-abfc-4c9d-a219-cf1c96ab8791" CreationDate="2023-06-21T12:10:20.790" UserId="116" Comment="Spelling dont -&gt; don't" Text="Currently dealing with an issue building my chain where `parity-util-mem` is conflicting with `parity-util-mem-ban` duplicates and I don't know the exact way to specify a certain version for all dependencies to use as I installed lots of pallets. Here is the full error just for reference&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/substrate-developer-hub/pallet-did`&#xD;&#xA;error: failed to select a version for `parity-util-mem`.&#xD;&#xA;&#xD;&#xA;    ... required by package `sp-core v3.0.0`&#xD;&#xA;    ... which satisfies dependency `sp-core = &quot;^3.0.0&quot;` of package `frame-support v3.0.0`&#xD;&#xA;    ... which satisfies dependency `frame-support = &quot;^3.0.0&quot;` of package `frame-system v3.0.0`&#xD;&#xA;    ... which satisfies dependency `frame-system = &quot;^3.0.0&quot;` of package `pallet-did v3.0.0 (https://github.com/substrate-developer-hub/pallet-did#8510c92b)`&#xD;&#xA;    ... which satisfies git dependency `did` of package `node-template-runtime v2.0.0 (C:\Users\throwaway\Documents\GitHub\Argonaut-Chain\runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 2.0.0) of package `node-template v2.0.0 (C:\Users\throwaway\Documents\GitHub\Argonaut-Chain\node)`&#xD;&#xA;versions that meet the requirements `^0.9.0` are: 0.9.0&#xD;&#xA;&#xD;&#xA;the package `parity-util-mem` links to the native library `parity-util-mem-ban-duplicates`, but it conflicts with a previous package which links to `parity-util-mem-ban-duplicates` as well:&#xD;&#xA;package `parity-util-mem v0.7.0`&#xD;&#xA;&#xD;&#xA;    ... which satisfies dependency `parity-util-mem = &quot;^0.7&quot;` of package `kvdb v0.7.0`&#xD;&#xA;    ... which satisfies dependency `kvdb = &quot;^0.7.0&quot;` (locked to 0.7.0) of package `sc-client-api v2.0.0`&#xD;&#xA;    ... which satisfies dependency `sc-client-api = &quot;^2.0.0&quot;` (locked to 2.0.0) of package `node-template v2.0.0 (C:\Users\throwaway)\Documents\GitHub\Argonaut-Chain\node)`&#xD;&#xA;Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='parity-util-mem' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.&#xD;&#xA;&#xD;&#xA;failed to select a version for `parity-util-mem` which could resolve this conflict" ContentLicense="CC BY-SA 4.0" />
  <row Id="35413" PostHistoryTypeId="24" PostId="2774" RevisionGUID="48bad5f2-abfc-4c9d-a219-cf1c96ab8791" CreationDate="2023-06-21T12:10:20.790" Comment="Proposed by 116 approved by 2281, 2673 edit id of 472" ContentLicense="CC BY-SA 4.0" />
  <row Id="35414" PostHistoryTypeId="5" PostId="8189" RevisionGUID="34e9bcd0-a943-4e10-9760-eecff5976e15" CreationDate="2023-06-21T12:10:25.380" UserId="116" Comment="Spelling cant -&gt; can't" Text="Trying to add an ed25519 address to the chain_spec file.&#xD;&#xA;The node_template has the defaults&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;vec![get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We would like to add a custom address and we are using ed25519 and we can't seem to get it to work.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35415" PostHistoryTypeId="24" PostId="8189" RevisionGUID="34e9bcd0-a943-4e10-9760-eecff5976e15" CreationDate="2023-06-21T12:10:25.380" Comment="Proposed by 116 approved by 2281, 2673 edit id of 460" ContentLicense="CC BY-SA 4.0" />
  <row Id="35416" PostHistoryTypeId="5" PostId="3492" RevisionGUID="96514fb6-1a06-48e0-9aef-589060c59046" CreationDate="2023-06-21T12:10:37.007" UserId="116" Comment="Spelling dont -&gt; don't i-&gt;I" Text="What should I choose between these two options:&#xD;&#xA;&#xD;&#xA;1) `utility.batch()`&#xD;&#xA;&#xD;&#xA;I can batch multiple calls into one call, so it avoids making too many calls, but I'm afraid this will exceed the size of the block if I put all of my 20 000 transactions, and I would end up with something unwanted. Or does `batch()` can dispatch the calls on multiple blocks ?&#xD;&#xA;&#xD;&#xA;2) the call&#xD;&#xA;&#xD;&#xA;Or I could just `signAndSend` each transaction. It makes a lot of transaction, but I think it would be the best way as I'm (almost) sure everything will be sent across multiple blocks, but it will also be very long, and I'll need to make sure I don't have network/PC problem while the script is running" ContentLicense="CC BY-SA 4.0" />
  <row Id="35417" PostHistoryTypeId="24" PostId="3492" RevisionGUID="96514fb6-1a06-48e0-9aef-589060c59046" CreationDate="2023-06-21T12:10:37.007" Comment="Proposed by 116 approved by 2281, 2673 edit id of 454" ContentLicense="CC BY-SA 4.0" />
  <row Id="35418" PostHistoryTypeId="5" PostId="6472" RevisionGUID="cb0b493a-83b5-41f5-adbd-2248fc0c25b5" CreationDate="2023-06-21T12:10:48.530" UserId="116" Comment="Code block" Text="Substrate automatically syncs up upon starting and supports `--sync &lt;SYNC_MODE&gt;` `full`, `fast,` `fast-unsafe` and `wrap`&#xD;&#xA;However, I'd like to have `manual` to prevent the node from synchronizing when starting the node for my specific reason to do so...&#xD;&#xA;&#xD;&#xA;Here's my naive idea to make sync configurable:&#xD;&#xA; 1. Add **SyncMode::Manual**&#xD;&#xA; ```Rust&#xD;&#xA;if self.mode == SyncMode::Manual { // stop peers connection }&#xD;&#xA;```&#xD;&#xA; 2. Add rpc `sync` command -&gt; synchronize the node, downloading the blocks manually, once getting the best block or target block hash, then stop it.&#xD;&#xA;&#xD;&#xA;Is that doable??&#xD;&#xA;Much appreciated for any advice and guidance." ContentLicense="CC BY-SA 4.0" />
  <row Id="35419" PostHistoryTypeId="24" PostId="6472" RevisionGUID="cb0b493a-83b5-41f5-adbd-2248fc0c25b5" CreationDate="2023-06-21T12:10:48.530" Comment="Proposed by 116 approved by 2281, 2673 edit id of 456" ContentLicense="CC BY-SA 4.0" />
  <row Id="35420" PostHistoryTypeId="2" PostId="8982" RevisionGUID="93bbfaec-8fde-4950-b60f-d0d5eafb2082" CreationDate="2023-06-21T12:51:17.990" UserId="4346" Text="I want to create a node with a different syncing logic than SyncingEngine (I have my own struct that implements the same API as SyncingEngine). To be clear, I want to use the substrate NetworkService&#xD;&#xA;&#xD;&#xA;How can I do that? This is what I tried to do:&#xD;&#xA;&#xD;&#xA;The function build_network in the client builds a NetworkService and spawns a thread that runs a SyncingEngine. I tried to copy it to my repo and change the usage of SyncingEngine with my own struct. The problem was that it uses private functions/structs (build_network_future, build_system_rpc_future and TransactionPoolAdapter)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35422" PostHistoryTypeId="1" PostId="8982" RevisionGUID="93bbfaec-8fde-4950-b60f-d0d5eafb2082" CreationDate="2023-06-21T12:51:17.990" UserId="4346" Text="How to use a custom syncing logic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35423" PostHistoryTypeId="3" PostId="8982" RevisionGUID="93bbfaec-8fde-4950-b60f-d0d5eafb2082" CreationDate="2023-06-21T12:51:17.990" UserId="4346" Text="|substrate-node|sync|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35424" PostHistoryTypeId="52" PostId="8975" RevisionGUID="2f05269e-32f4-4d54-8499-d481c2d16b67" CreationDate="2023-06-21T15:53:44.220" />
  <row Id="35429" PostHistoryTypeId="2" PostId="8983" RevisionGUID="b7bc57f3-647e-4424-9dfc-507c6be3ec71" CreationDate="2023-06-21T21:18:53.253" UserId="3395" Text="I would like to read the state of a pallet using web3 clients (Metamask, Truffle). Let's suppose the pallet has exposed the function `getValue()`.&#xD;&#xA;&#xD;&#xA;I have not installed either EVM and Ethereum pallet because I don't need to be fully EVM compatible.&#xD;&#xA;&#xD;&#xA;I was thinking about the following flow as a possible approach:&#xD;&#xA;&#xD;&#xA;    1&#xD;&#xA;    +------------------------+&#xD;&#xA;    | Web3 Client            |&#xD;&#xA;    | (Metamask, Truffle)    |&#xD;&#xA;    +------------------------+&#xD;&#xA;               |&#xD;&#xA;    2          v&#xD;&#xA;    +------------------------+&#xD;&#xA;    | Server implements      |&#xD;&#xA;    | EVM JSON-RPC           |&#xD;&#xA;    +------------------------+&#xD;&#xA;               |&#xD;&#xA;    3          v&#xD;&#xA;    +------------------------+&#xD;&#xA;    | RPC Substrate Client   |&#xD;&#xA;    +------------------------+&#xD;&#xA;               |&#xD;&#xA;    4          v&#xD;&#xA;    +------------------------+&#xD;&#xA;    | Substrate Node         |&#xD;&#xA;    +------------------------+&#xD;&#xA;&#xD;&#xA;**1.** The Web3 client would perform the reading request. In this step, I would also need to implement the `getValue()` function in Solidity so it could be called from the client, as it needs the ABI to perform the request.&#xD;&#xA;**2.** The RPC Server would implement the endpoint, so the request would be redirected when `getValue()` was instantiated.&#xD;&#xA;**3.** The Substrate RPC client would connect to the Substrate node.&#xD;&#xA;**4.** The Substrate node would return the result.&#xD;&#xA;&#xD;&#xA;Does this approach make sense? Is there something similar that has already been implemented? Or is there any library that I could use?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35431" PostHistoryTypeId="1" PostId="8983" RevisionGUID="b7bc57f3-647e-4424-9dfc-507c6be3ec71" CreationDate="2023-06-21T21:18:53.253" UserId="3395" Text="Read pallet state using Metamask" ContentLicense="CC BY-SA 4.0" />
  <row Id="35432" PostHistoryTypeId="3" PostId="8983" RevisionGUID="b7bc57f3-647e-4424-9dfc-507c6be3ec71" CreationDate="2023-06-21T21:18:53.253" UserId="3395" Text="|pallet|evm|metamask|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35433" PostHistoryTypeId="2" PostId="8984" RevisionGUID="7b86b626-77f3-4a4c-8dbc-fb62702f4478" CreationDate="2023-06-22T02:11:41.487" UserId="4348" Text="Recently anytime i try to run sunstrate node i get this error message, all attempts to update packages hasn't been helpful&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-06-22 02:56:29.665  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35435" PostHistoryTypeId="1" PostId="8984" RevisionGUID="7b86b626-77f3-4a4c-8dbc-fb62702f4478" CreationDate="2023-06-22T02:11:41.487" UserId="4348" Text="Substate node not compiling on Archlinux" ContentLicense="CC BY-SA 4.0" />
  <row Id="35436" PostHistoryTypeId="3" PostId="8984" RevisionGUID="7b86b626-77f3-4a4c-8dbc-fb62702f4478" CreationDate="2023-06-22T02:11:41.487" UserId="4348" Text="|substrate-node-template|runtime|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35437" PostHistoryTypeId="2" PostId="8985" RevisionGUID="55a5299c-c7b9-4ef8-a163-51668da4803b" CreationDate="2023-06-22T02:40:58.630" UserId="3667" Text="```shell &#xD;&#xA;rustup target add wasm32-unknown-unknown --toolchain nightly&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Why can't the stable toolchain be used to compile, what I beleive is the runtime to WASM? Why is nightly needed? " ContentLicense="CC BY-SA 4.0" />
  <row Id="35439" PostHistoryTypeId="1" PostId="8985" RevisionGUID="55a5299c-c7b9-4ef8-a163-51668da4803b" CreationDate="2023-06-22T02:40:58.630" UserId="3667" Text="Why does compiling substrate require nightly toolchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35440" PostHistoryTypeId="3" PostId="8985" RevisionGUID="55a5299c-c7b9-4ef8-a163-51668da4803b" CreationDate="2023-06-22T02:40:58.630" UserId="3667" Text="|rust|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35441" PostHistoryTypeId="2" PostId="8986" RevisionGUID="25d6d318-d2ed-4205-bbe2-e59cecf20a57" CreationDate="2023-06-22T02:43:54.473" UserId="139" Text="This is a substrate issue with latest rust (after 1.69) and releases before `polkadot-v0.9.39`. You should use `nightly-2023-01-01` or rustc at 1.68 or earlier to compile: &#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;cargo +nightly-2023-01-01 build --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;More info here : https://substrate.stackexchange.com/questions/7714/cannot-run-substrate-on-a-fresh-macbook-m2&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35443" PostHistoryTypeId="2" PostId="8987" RevisionGUID="b4f34e1b-e37d-4609-8071-435295a37fa3" CreationDate="2023-06-22T04:21:39.407" UserId="116" Text="It doesn't anymore it compiles with stable since release 0.9.42" ContentLicense="CC BY-SA 4.0" />
  <row Id="35445" PostHistoryTypeId="5" PostId="8982" RevisionGUID="d092d130-973e-4bbc-b9f3-bb42a3875426" CreationDate="2023-06-22T04:23:48.210" UserId="354" Comment="added 18 characters in body" Text="I want to create a node with a different syncing logic than `SyncingEngine` (I have my own struct that implements the same API as `SyncingEngine`). To be clear, I want to use the substrate `NetworkService`&#xD;&#xA;&#xD;&#xA;How can I do that? This is what I tried to do:&#xD;&#xA;&#xD;&#xA;The function build_network in the client builds a `NetworkService` and spawns a thread that runs a `SyncingEngine`. I tried to copy it to my repo and change the usage of `SyncingEngine` with my own struct. The problem was that it uses private functions/structs (`build_network_future`, `build_system_rpc_future` and `TransactionPoolAdapter`)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35446" PostHistoryTypeId="5" PostId="8987" RevisionGUID="d05b7689-c5f6-4f31-947f-38beb1052c21" CreationDate="2023-06-22T04:28:14.143" UserId="116" Comment="added 112 characters in body" Text="It doesn't require nightly [anymore][1], now substrate compiles with stable rust compiler of at least version 1.68&#xD;&#xA;&#xD;&#xA; [1]:https://github.com/paritytech/substrate/pull/13580&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35447" PostHistoryTypeId="5" PostId="8987" RevisionGUID="334de0ff-ad31-477f-9756-e7b94ce7b1de" CreationDate="2023-06-22T04:34:46.207" UserId="116" Comment="added 112 characters in body" Text="It [doesn't require nightly anymore][1], now substrate compiles with stable rust compiler of at least version 1.68&#xD;&#xA;&#xD;&#xA;The original requirement was because [important features were not yet stabilized][2] when the project started.&#xD;&#xA;&#xD;&#xA; [1]:https://github.com/paritytech/substrate/pull/13580&#xD;&#xA; [2]:https://github.com/paritytech/substrate/issues/1252&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35448" PostHistoryTypeId="5" PostId="8984" RevisionGUID="586025f8-bb4d-4f09-b599-5ba9be46bde7" CreationDate="2023-06-22T05:08:39.527" UserId="2281" Comment="added 12 characters in body" Text="Recently anytime i try to run `substrate` node i get this error message, all attempts to update packages hasn't been helpful&#xD;&#xA;&#xD;&#xA;    Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;    2023-06-22 02:56:29.665  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35453" PostHistoryTypeId="2" PostId="8989" RevisionGUID="77bd933b-59a1-4832-92f2-97e7bc9a5597" CreationDate="2023-06-22T06:50:32.057" UserId="2281" Text="i am trying to fork my chain using [fork-off-substrate][1] but when i run the  `new chain` using the genesis file i.e `fork.json` is does not `produce`or `finalize` the blocks.How can i solve this or what is the reason for blocks not being `finalized` or produced?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/maxsam4/fork-off-substrate&#xD;&#xA;  [2]: https://i.stack.imgur.com/tbWd4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35455" PostHistoryTypeId="1" PostId="8989" RevisionGUID="77bd933b-59a1-4832-92f2-97e7bc9a5597" CreationDate="2023-06-22T06:50:32.057" UserId="2281" Text="fork chain using fork-off-substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35456" PostHistoryTypeId="3" PostId="8989" RevisionGUID="77bd933b-59a1-4832-92f2-97e7bc9a5597" CreationDate="2023-06-22T06:50:32.057" UserId="2281" Text="|substrate-node|fork|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35457" PostHistoryTypeId="5" PostId="8989" RevisionGUID="52b6a615-dd99-4000-ba35-29b364ca5556" CreationDate="2023-06-22T07:09:17.477" UserId="3136" Comment="correct the format of title and change in body" Text="i am trying to fork my chain using [fork-off-substrate][1] but when i run the  `new chain` using the genesis file i.e `fork.json` is does not `produce`or `finalize` the blocks.How can i solve this or what is the reason for blocks not being `finalized` or `produced`?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/maxsam4/fork-off-substrate&#xD;&#xA;  [2]: https://i.stack.imgur.com/tbWd4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35458" PostHistoryTypeId="4" PostId="8989" RevisionGUID="52b6a615-dd99-4000-ba35-29b364ca5556" CreationDate="2023-06-22T07:09:17.477" UserId="3136" Comment="correct the format of title and change in body" Text="Fork Chain using fork-off-substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35459" PostHistoryTypeId="24" PostId="8989" RevisionGUID="52b6a615-dd99-4000-ba35-29b364ca5556" CreationDate="2023-06-22T07:09:17.477" Comment="Proposed by 3136 approved by 2281 edit id of 480" ContentLicense="CC BY-SA 4.0" />
  <row Id="35460" PostHistoryTypeId="5" PostId="8989" RevisionGUID="f8ab4085-3f65-44be-82da-7809e9aaacba" CreationDate="2023-06-22T07:13:17.513" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I'm trying to fork my chain using [fork-off-substrate][1] but when I run the  `new chain` using the genesis file i.e `fork.json` is does not `produce`or `finalize` the blocks. How can I solve this or what is the reason for blocks not being `finalized` or `produced`?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/maxsam4/fork-off-substrate&#xD;&#xA;  [2]: https://i.stack.imgur.com/tbWd4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35461" PostHistoryTypeId="24" PostId="8989" RevisionGUID="f8ab4085-3f65-44be-82da-7809e9aaacba" CreationDate="2023-06-22T07:13:17.513" Comment="Proposed by 116 approved by 2281 edit id of 481" ContentLicense="CC BY-SA 4.0" />
  <row Id="35462" PostHistoryTypeId="5" PostId="347" RevisionGUID="28818cbb-5ac8-471e-b764-5a033e743891" CreationDate="2023-06-22T07:13:58.443" UserId="3136" Comment="correct the msg format" Text="I've done the [Start a private network tutorial][1]. However, in this tutorial, they run `two-nodes` on the same computer with different `ports`. Now I want to run a private network with different computers but I'm not quite sure how to do that.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/private-network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="35463" PostHistoryTypeId="24" PostId="347" RevisionGUID="28818cbb-5ac8-471e-b764-5a033e743891" CreationDate="2023-06-22T07:13:58.443" Comment="Proposed by 3136 approved by 2281, 354 edit id of 469" ContentLicense="CC BY-SA 4.0" />
  <row Id="35464" PostHistoryTypeId="5" PostId="838" RevisionGUID="4714fd09-ddd4-4517-84cd-eb04d48d1588" CreationDate="2023-06-22T07:14:18.937" UserId="83" Comment="typo and consistent naming " Text="The API provides application developers the ability to query a node and interact with the Polkadot or Substrate-based chains using JavaScript.&#xD;&#xA;&#xD;&#xA;Learn more here: https://polkadot.js.org" ContentLicense="CC BY-SA 4.0" />
  <row Id="35465" PostHistoryTypeId="24" PostId="838" RevisionGUID="4714fd09-ddd4-4517-84cd-eb04d48d1588" CreationDate="2023-06-22T07:14:18.937" Comment="Proposed by 83 approved by 2281, 354 edit id of 470" ContentLicense="CC BY-SA 4.0" />
  <row Id="35467" PostHistoryTypeId="5" PostId="8989" RevisionGUID="6ae101a6-a9fa-4340-9ecd-10a024cf12d6" CreationDate="2023-06-22T07:16:49.233" UserId="2281" Comment="added 2006 characters in body" Text="I'm trying to fork my chain using [fork-off-substrate][1] but when I run the  `new chain` using the genesis file i.e `fork.json` is does not `produce`or `finalize` the blocks. How can I solve this or what is the reason for blocks not being `finalized` or `produced`?&#xD;&#xA;&#xD;&#xA;**i am getting following error:**&#xD;&#xA;```sh&#xD;&#xA;2023-06-22 12:32:33  Idle (2 peers), best: #0 (0x3e1d…46c8), finalized #0 (0x3e1d…46c8), ⬇ 0.8kiB/s ⬆ 0.8kiB/s    &#xD;&#xA;2023-06-22 12:32:38  Idle (2 peers), best: #0 (0x3e1d…46c8), finalized #0 (0x3e1d…46c8), ⬇ 87 B/s ⬆ 79 B/s    &#xD;&#xA;2023-06-22 12:32:39  Starting consensus session on top of parent 0x3e1dd501b4db59fc98469a8aeb7a353a42c8a2b25e4699c0dd9b9c30112746c8    &#xD;&#xA;2023-06-22 12:32:39 [115] ‍♂️ Running migration with current storage version StorageVersion(3) / onchain StorageVersion(3)    &#xD;&#xA;2023-06-22 12:32:39     &#xD;&#xA;2023-06-22 12:32:39 [115] ‍♂️ MigrateToV2 did not executed. This probably should be removed    &#xD;&#xA;2023-06-22 12:32:39 ⚠️ Ethereum declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    &#xD;&#xA;2023-06-22 12:32:39  Prepared block for proposing at 1 (3 ms) [hash: 0x5f831cb083500e516e32fe7613bce1add9849f24185d9baffcc35e2a29cdd730; parent_hash: 0x3e1d…46c8; extrinsics (1): [0xcb0f…d372]]    &#xD;&#xA;2023-06-22 12:32:39  Pre-sealed block for proposal at 1. Hash now 0x93d7c0b4c439265fc1b2cfc712529f8856537ff7400e34b058cb5b0f768aad9e, previously 0x5f831cb083500e516e32fe7613bce1add9849f24185d9baffcc35e2a29cdd730.    &#xD;&#xA;2023-06-22 12:32:39 Error with block built on 0x3e1dd501b4db59fc98469a8aeb7a353a42c8a2b25e4699c0dd9b9c30112746c8: Import failed: Expected epoch change to happen at 0x93d7c0b4c439265fc1b2cfc712529f8856537ff7400e34b058cb5b0f768aad9e, s562472453    &#xD;&#xA;2023-06-22 12:32:43  Idle (2 peers), best: #0 (0x3e1d…46c8), finalized #0 (0x3e1d…46c8), ⬇ 1.3kiB/s ⬆ 1.4kiB/s    &#xD;&#xA;2023-06-22 12:32:48  Idle (2 peers), best: #0 (0x3e1d…46c8), finalized #0 (0x3e1d…46c8), ⬇ 49 B/s ⬆ 49 B/s    &#xD;&#xA;2023-06-22 12:32:51  Starting consensus session on top of parent 0x3e1dd501b4db59fc98469a8aeb7a353a42c8a2b25e4699c0dd9b9c30112746c8    &#xD;&#xA;2023-06-22 12:32:51 [115] ‍♂️ Running migration with current storage version StorageVersion(3) / onchain StorageVersion(3)    &#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/maxsam4/fork-off-substrate&#xD;&#xA;  [2]: https://i.stack.imgur.com/tbWd4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35468" PostHistoryTypeId="2" PostId="8990" RevisionGUID="a3f9c6fa-d925-4e7d-aedc-b68f4904eb98" CreationDate="2023-06-22T07:34:44.923" UserId="2372" Text="By default, Para-chains don't trust each other.But there are two ways that u can teleport the assets. &#xD;&#xA;&#xD;&#xA;First, You need a sovereign account of your parachain in the relay chain and you need to use `Transfer asset` instruction in the  `fn send message` . &#xD;&#xA;&#xD;&#xA;Secondly, You can even send the assets through the fn `teleport-assets`, but parachains only trust the assets from sovereign account. You need to change the ensure [here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/xcm/xcm-executor/src/lib.rs#L492" ContentLicense="CC BY-SA 4.0" />
  <row Id="35475" PostHistoryTypeId="2" PostId="8992" RevisionGUID="4419fee9-8a89-4a11-9e9f-eea025a0e9e4" CreationDate="2023-06-22T09:06:32.763" UserId="2762" Text="Can you update your libraries? If so, I suggest you look into a project that works and use the same configuration and example [PolkadotJS][1] or [Polkadot Staking Dashboard][2].&#xD;&#xA;```json&#xD;&#xA;&quot;@polkadot/api&quot;: &quot;^10.9.1&quot;,&#xD;&#xA;&quot;@polkadot/keyring&quot;: &quot;^12.3.2&quot;,&#xD;&#xA;&quot;@polkadot/util-crypto&quot;: &quot;^12.3.2&quot;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/blob/master/package.json&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-staking-dashboard/blob/main/package.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="35477" PostHistoryTypeId="5" PostId="7285" RevisionGUID="4e9e7f7e-6936-4b6d-9355-fc6118359ee0" CreationDate="2023-06-22T09:19:07.683" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I found the problem, and it was when implementing the validate_unsigned trait, I needed to make each extrinsic unique in the tags, and I did it by encoding the whole call, like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;ValidTransaction::with_tag_prefix(&quot;MyPallet&quot;)&#xD;&#xA;	.and_provides(call.encode())&#xD;&#xA;	.build()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35478" PostHistoryTypeId="24" PostId="7285" RevisionGUID="4e9e7f7e-6936-4b6d-9355-fc6118359ee0" CreationDate="2023-06-22T09:19:07.683" Comment="Proposed by 116 approved by 2281, 354 edit id of 478" ContentLicense="CC BY-SA 4.0" />
  <row Id="35479" PostHistoryTypeId="5" PostId="8448" RevisionGUID="5eafbdc8-02dc-49d7-a528-b761f3f4ddf4" CreationDate="2023-06-22T09:19:22.180" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="In the [project][1] we are currently working on, we declared some [runtime apis][2] in our custom pallet, we tried to update the dependencies from `0.9.28` to `0.9.42` but the build fails with the following error:&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `R: pallet::Config` is not satisfied&#xD;&#xA;       --&gt; pallet/src/lib.rs:196:2&#xD;&#xA;        |&#xD;&#xA;    196 | /     sp_api::decl_runtime_apis! {&#xD;&#xA;    197 | |         /// Get extrinsic ids from a vector of extrinsics&#xD;&#xA;    198 | |         /// that should be used to quickly retrieve all the event ids (hashes) given a vector of&#xD;&#xA;    199 | |         /// extrinsics currently used to inspect the proposed block event ids and whether they are&#xD;&#xA;    ...   |&#xD;&#xA;    210 | |         }&#xD;&#xA;    211 | |     }&#xD;&#xA;        | |_____^ the trait `pallet::Config` is not implemented for `R`&#xD;&#xA;        |&#xD;&#xA;        = note: this error originates in the macro `sp_api::decl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;    help: consider further restricting type parameter `R`&#xD;&#xA;        |&#xD;&#xA;    211 |     }, R: pallet::Config&#xD;&#xA;        |      +++++++++++++++++++&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;&#xD;&#xA;this error is a bit misleading as far as I understand since I'm already implementing `pallet::Config`, so I decided to run a minimal setup with substrate-node-template and see if there are any problems with the macro itself.&#xD;&#xA;&#xD;&#xA;In the latest version in substrate-node-template, I tried adding the following runtime api in the template pallet:&#xD;&#xA;&#xD;&#xA;    sp_api::decl_runtime_apis! {&#xD;&#xA;    	pub trait ExtrinsicDetails&lt;R&gt; where R:crate::Config&#xD;&#xA;    	{&#xD;&#xA;    		fn dummy_test(runtime: R::length) -&gt; R;&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;given that I declare length in the pallet::Config like this:&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;    	/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    	type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    	/// Type representing the weight of this pallet&#xD;&#xA;    	type WeightInfo: WeightInfo;&#xD;&#xA;        #[pallet::constant]&#xD;&#xA;        type length: Get&lt;u32&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and implemented like this: &#xD;&#xA;&#xD;&#xA;    impl pallet_template::Config for Runtime {&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type WeightInfo = pallet_template::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    	type length = ConstU32&lt;100&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;it kept throwing this error:&#xD;&#xA;&#xD;&#xA;     error[E0220]: associated type `length` not found for `R`&#xD;&#xA;         --&gt; /home/coder/project/substrate-node-template/pallets/template/src/lib.rs:114:30&#xD;&#xA;          |&#xD;&#xA;      114 |             fn dummy_test(runtime: R::length) -&gt; R;&#xD;&#xA;          |                                       ^^^^^^ there is a similarly named associated type `length` in the trait `pallet::Config`&#xD;&#xA;&#xD;&#xA;even though it has the same name, i also tried using `pallet::Config` instead of `crate::Config` and also just `Config`, all have the same error.&#xD;&#xA;&#xD;&#xA;Ps: same code was working in 0.9.28&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/revoltez/validated-streams/&#xD;&#xA;  [2]: https://github.com/revoltez/validated-streams/blob/51d5a3ebbd5ee5177c11792562fb8ba986a8f2b8/pallet/src/lib.rs#L196-L214" ContentLicense="CC BY-SA 4.0" />
  <row Id="35480" PostHistoryTypeId="24" PostId="8448" RevisionGUID="5eafbdc8-02dc-49d7-a528-b761f3f4ddf4" CreationDate="2023-06-22T09:19:22.180" Comment="Proposed by 116 approved by 2281, 354 edit id of 475" ContentLicense="CC BY-SA 4.0" />
  <row Id="35481" PostHistoryTypeId="5" PostId="7936" RevisionGUID="703a13ed-5b9c-4b95-baf9-23971588656a" CreationDate="2023-06-22T09:19:42.450" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I have written a simple block import that wraps grandpa block import, it does tiny verification and calls grandpa block import after that, it looks like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub struct CustomBlockImport&lt;I&gt; {&#xD;&#xA;	grandpa_block_import: I,&#xD;&#xA;}&#xD;&#xA;#[async_trait::async_trait]&#xD;&#xA;impl&lt;I: sc_consensus::BlockImport&lt;Block&gt;&gt; sc_consensus::BlockImport&lt;Block&gt; for WitnessBlockImport&lt;I&gt;&#xD;&#xA;where&#xD;&#xA;	I: Send,&#xD;&#xA;{&#xD;&#xA;	type Error = ConsensusError;&#xD;&#xA;	type Transaction = I::Transaction;&#xD;&#xA;&#xD;&#xA;	async fn check_block(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		block: BlockCheckParams&lt;Block&gt;,&#xD;&#xA;	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;return self&#xD;&#xA;				.grandpa_block_import&#xD;&#xA;				.import_block(block, cache)&#xD;&#xA;				.await&#xD;&#xA;				.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	async fn import_block(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		block: BlockImportParams&lt;Block, Self::Transaction&gt;,&#xD;&#xA;		cache: HashMap&lt;well_known_cache_keys::Id, Vec&lt;u8&gt;&gt;,&#xD;&#xA;	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;// if block is already finalized no need for my custom verification, just run grandpa block import		&#xD;&#xA;if block.finalized {&#xD;&#xA;			log::info!(&quot;block already finalized&quot;);&#xD;&#xA;return self&#xD;&#xA;				.grandpa_block_import&#xD;&#xA;				.import_block(block, cache)&#xD;&#xA;				.await&#xD;&#xA;				.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;		}&#xD;&#xA;		// do some verification&#xD;&#xA;		return self&#xD;&#xA;			.grandpa_block_import&#xD;&#xA;			.import_block(block, cache)&#xD;&#xA;			.await&#xD;&#xA;			.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried using `block.finalized` field to detect whether its already finalized or not however in my simple network, I start three authorities  (Alice, Bob, Charlie) and delay running the final authority (Dave) after quite some time (so that the first three get to finalize some blocks); when I start the Dave node, it does not log `block already finalized` as it should, instead it goes and do my custom verification logic.&#xD;&#xA;&#xD;&#xA;why is this happening and how to solve this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35482" PostHistoryTypeId="4" PostId="7936" RevisionGUID="703a13ed-5b9c-4b95-baf9-23971588656a" CreationDate="2023-06-22T09:19:42.450" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="How to detect if a block is finalized already in block import" ContentLicense="CC BY-SA 4.0" />
  <row Id="35483" PostHistoryTypeId="24" PostId="7936" RevisionGUID="703a13ed-5b9c-4b95-baf9-23971588656a" CreationDate="2023-06-22T09:19:42.450" Comment="Proposed by 116 approved by 2281, 354 edit id of 477" ContentLicense="CC BY-SA 4.0" />
  <row Id="35484" PostHistoryTypeId="5" PostId="5571" RevisionGUID="09548118-b920-4567-94b8-29a8037349f9" CreationDate="2023-06-22T09:20:45.817" UserId="116" Comment="Spelling dont -&gt; don't i-&gt;I" Text="I have read their official [documentation][1] and I'm not sure I completely understand the process of block creation or finalization.&#xD;&#xA;&#xD;&#xA;I know that after each period of time, there is a block author that creates a block and broadcast it to the other validators, does the others need to sign the block and resend it and only after 2/3 collected signatures the block gets added? or they simply accept it based on the `BlockImport` rules? &#xD;&#xA;&#xD;&#xA;In other words is it like proof of work where when you receive a block you need to verify its validaity based on some rules and you don't care whether others added it or not, or is it that you need another round to make sure everyone received the same block from the author and then add it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://openethereum.github.io/Aura" ContentLicense="CC BY-SA 4.0" />
  <row Id="35485" PostHistoryTypeId="24" PostId="5571" RevisionGUID="09548118-b920-4567-94b8-29a8037349f9" CreationDate="2023-06-22T09:20:45.817" Comment="Proposed by 116 approved by 2281, 354 edit id of 474" ContentLicense="CC BY-SA 4.0" />
  <row Id="35486" PostHistoryTypeId="5" PostId="839" RevisionGUID="5442fef0-e17f-4253-9df1-ac944c9c49c9" CreationDate="2023-06-22T09:20:55.910" UserId="83" Comment="typo and consistent naming " Text="Questions about the Polkadot-JS API used to interact with Substrate-based chains using JavaScript." ContentLicense="CC BY-SA 4.0" />
  <row Id="35487" PostHistoryTypeId="24" PostId="839" RevisionGUID="5442fef0-e17f-4253-9df1-ac944c9c49c9" CreationDate="2023-06-22T09:20:55.910" Comment="Proposed by 83 approved by 2281, 354 edit id of 471" ContentLicense="CC BY-SA 4.0" />
  <row Id="35488" PostHistoryTypeId="5" PostId="7250" RevisionGUID="4c10ff50-6c33-4052-893f-8ae20e45a82f" CreationDate="2023-06-22T09:21:18.090" UserId="116" Comment="Spellcheck and language" Text="I'm on Windows 11, (intel core i7-9700K processor) and have stable-x86_64-pc-windows-msvc (default), rustc 1.67.1 (d5a82bbd2 2023-02-07) and cargo 1.67.1 (8ecd4f20a 2023-01-10)&#xD;&#xA;&#xD;&#xA;When I'm compiling some project code, it gives the error `&#xD;&#xA;error[E0432]: unresolved import `windows_sys::Win32::Foundation`&#xD;&#xA;`. See the entire error tree below.&#xD;&#xA;&#xD;&#xA;Is there any way to overcome this on Windows nativly?  I've just uninstalled and reinstalled via `rust-init.exe`, so it's not that.  Is there an nightly / later release than the one I have above that fixes it?&#xD;&#xA;&#xD;&#xA;I expect that I could try going through the kerfuffle of getting everything into and out of WSL2, which may or may not work in the end, but is there some kind of windows_sys::Win32::Foundation shim available to get this working on Windows?&#xD;&#xA;Thanks for any pointers!&#xD;&#xA;&#xD;&#xA;***start compilation output with error***&#xD;&#xA;&#xD;&#xA;   ...downloading and compilation successful to here&#xD;&#xA;   ```rs&#xD;&#xA;Compiling integer-sqrt v0.1.5&#xD;&#xA;   Compiling wasmtime-cache v1.0.2&#xD;&#xA;error[E0432]: unresolved import `windows_sys::Win32::Foundation`&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:90:37&#xD;&#xA;   |&#xD;&#xA;90 |             use windows_sys::Win32::Foundation::*;&#xD;&#xA;   |                                     ^^^^^^^^^^ could not find `Foundation` in `Win32`&#xD;&#xA;&#xD;&#xA;error[E0432]: unresolved import `windows_sys::Win32::Foundation`&#xD;&#xA; --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:3:25&#xD;&#xA;  |&#xD;&#xA;3 | use windows_sys::Win32::Foundation::*;&#xD;&#xA;  |                         ^^^^^^^^^^ could not find `Foundation` in `Win32`&#xD;&#xA;&#xD;&#xA;   Compiling lru v0.8.1&#xD;&#xA;   Compiling trie-root v0.17.0&#xD;&#xA;error[E0412]: cannot find type `EXCEPTION_POINTERS` in this scope&#xD;&#xA; --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:8:42&#xD;&#xA;  |&#xD;&#xA;8 | pub type SignalHandler&lt;'a&gt; = dyn Fn(*mut EXCEPTION_POINTERS) -&gt; bool + Send + Sync + 'a;&#xD;&#xA;  |                                          ^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0412]: cannot find type `EXCEPTION_POINTERS` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:22:66&#xD;&#xA;   |&#xD;&#xA;22 | unsafe extern &quot;system&quot; fn exception_handler(exception_info: *mut EXCEPTION_POINTERS) -&gt; i32 {&#xD;&#xA;   |                                                                  ^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_ACCESS_VIOLATION` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:27:32&#xD;&#xA;   |&#xD;&#xA;27 |     if record.ExceptionCode != EXCEPTION_ACCESS_VIOLATION&#xD;&#xA;   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_ILLEGAL_INSTRUCTION` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:28:36&#xD;&#xA;   |&#xD;&#xA;28 |         &amp;&amp; record.ExceptionCode != EXCEPTION_ILLEGAL_INSTRUCTION&#xD;&#xA;   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_INT_DIVIDE_BY_ZERO` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:29:36&#xD;&#xA;   |&#xD;&#xA;29 |         &amp;&amp; record.ExceptionCode != EXCEPTION_INT_DIVIDE_BY_ZERO&#xD;&#xA;   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find value `EXCEPTION_INT_OVERFLOW` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:30:36&#xD;&#xA;   |&#xD;&#xA;30 |         &amp;&amp; record.ExceptionCode != EXCEPTION_INT_OVERFLOW&#xD;&#xA;   |                                    ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;   Compiling memory-db v0.31.0&#xD;&#xA;   Compiling trie-db v0.24.0&#xD;&#xA;   Compiling sp-panic-handler v5.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `GetCurrentThread` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-cache-1.0.2\src\worker.rs:240:17&#xD;&#xA;    |&#xD;&#xA;240 |                 GetCurrentThread(),&#xD;&#xA;    |                 ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `GetCurrentThreadId`&#xD;&#xA;    |&#xD;&#xA;   ::: C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-sys-0.36.1\src\Windows\Win32\System\Threading\mod.rs:283:5&#xD;&#xA;    |&#xD;&#xA;283 |     pub fn GetCurrentThreadId() -&gt; u32;&#xD;&#xA;    |     ---------------------------------- similarly named function `GetCurrentThreadId` defined here&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `SetThreadPriority` in this scope&#xD;&#xA;    --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-cache-1.0.2\src\worker.rs:239:13&#xD;&#xA;     |&#xD;&#xA;239  |             SetThreadPriority(&#xD;&#xA;     |             ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `UmsThreadPriority`&#xD;&#xA;     |&#xD;&#xA;    ::: C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-sys-0.36.1\src\Windows\Win32\System\Threading\mod.rs:1725:1&#xD;&#xA;     |&#xD;&#xA;1725 | pub const UmsThreadPriority: RTL_UMS_THREAD_INFO_CLASS = 2i32;&#xD;&#xA;     | ------------------------------------------------------ similarly named constant `UmsThreadPriority` defined here&#xD;&#xA;&#xD;&#xA;   Compiling sp-arithmetic v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba)&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualFree` in this scope&#xD;&#xA;  --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\instance\allocator\pooling\windows.rs:22:17&#xD;&#xA;   |&#xD;&#xA;22 |     if unsafe { VirtualFree(addr as _, len, MEM_DECOMMIT) } == 0 {&#xD;&#xA;   |                 ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0425`.&#xD;&#xA;error: could not compile `wasmtime-cache` due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `CreateFileMappingW` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:114:31&#xD;&#xA;    |&#xD;&#xA;114 |                 let mapping = CreateFileMappingW(&#xD;&#xA;    |                               ^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `MapViewOfFile` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:129:27&#xD;&#xA;    |&#xD;&#xA;129 |                 let ptr = MapViewOfFile(mapping, FILE_MAP_READ | FILE_MAP_EXECUTE, 0, 0, len);&#xD;&#xA;    |                           ^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `CloseHandle` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:131:17&#xD;&#xA;    |&#xD;&#xA;131 |                 CloseHandle(mapping);&#xD;&#xA;    |                 ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:146:20&#xD;&#xA;    |&#xD;&#xA;146 |                 if VirtualProtect(ret.ptr as *mut _, ret.len, PAGE_READONLY, &amp;mut old) == 0 {&#xD;&#xA;    |                    ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:396:17&#xD;&#xA;    |&#xD;&#xA;396 |                 VirtualProtect(base, len, PAGE_WRITECOPY, &amp;mut old)&#xD;&#xA;    |                 ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:398:17&#xD;&#xA;    |&#xD;&#xA;398 |                 VirtualProtect(base, len, PAGE_READWRITE, &amp;mut old)&#xD;&#xA;    |                 ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualProtect` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:432:26&#xD;&#xA;    |&#xD;&#xA;432 |             let result = VirtualProtect(base, len, PAGE_EXECUTE_READ, &amp;mut old);&#xD;&#xA;    |                          ^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `VirtualFree` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:468:34&#xD;&#xA;    |&#xD;&#xA;468 |                 let r = unsafe { VirtualFree(self.ptr as *mut c_void, 0, MEM_RELEASE) };&#xD;&#xA;    |                                  ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `UnmapViewOfFile` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\mmap.rs:471:34&#xD;&#xA;    |&#xD;&#xA;471 |                 let r = unsafe { UnmapViewOfFile(self.ptr as *mut c_void) };&#xD;&#xA;    |                                  ^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;error[E0425]: cannot find function, tuple struct or tuple variant `AddVectoredExceptionHandler` in this scope&#xD;&#xA;   --&gt; C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\wasmtime-runtime-1.0.2\src\traphandlers\windows.rs:14:8&#xD;&#xA;    |&#xD;&#xA;14  |     if AddVectoredExceptionHandler(1, Some(exception_handler)).is_null() {&#xD;&#xA;    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `RemoveVectoredExceptionHandler`&#xD;&#xA;    |&#xD;&#xA;   ::: C:\Users\conor\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-sys-0.36.1\src\Windows\Win32\System\Diagnostics\Debug\mod.rs:305:5&#xD;&#xA;    |&#xD;&#xA;305 |     pub fn RemoveVectoredExceptionHandler(handle: *const ::core::ffi::c_void) -&gt; u32;&#xD;&#xA;    |     -------------------------------------------------------------------------------- similarly named function `RemoveVectoredExceptionHandler` defined here&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0412, E0425, E0432.&#xD;&#xA;For more information about an error, try `rustc --explain E0412`.&#xD;&#xA;error: could not compile `wasmtime-runtime` due to 19 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;***end compilation output with error***" ContentLicense="CC BY-SA 4.0" />
  <row Id="35489" PostHistoryTypeId="4" PostId="7250" RevisionGUID="4c10ff50-6c33-4052-893f-8ae20e45a82f" CreationDate="2023-06-22T09:21:18.090" UserId="116" Comment="Spellcheck and language" Text="Compilation error. unresolved windows_sys::Win32::Foundation" ContentLicense="CC BY-SA 4.0" />
  <row Id="35490" PostHistoryTypeId="24" PostId="7250" RevisionGUID="4c10ff50-6c33-4052-893f-8ae20e45a82f" CreationDate="2023-06-22T09:21:18.090" Comment="Proposed by 116 approved by 2281, 354 edit id of 479" ContentLicense="CC BY-SA 4.0" />
  <row Id="35491" PostHistoryTypeId="5" PostId="7916" RevisionGUID="553390a4-c604-4e7b-a451-f336a52ca85f" CreationDate="2023-06-22T09:21:30.467" UserId="116" Comment="spelling and tag" Text="In substrate-node-template, are there any available ways to execute a task or provide a callback to be executed just before the block gets gossiped to other validators, right after it has produced the block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35492" PostHistoryTypeId="6" PostId="7916" RevisionGUID="553390a4-c604-4e7b-a451-f336a52ca85f" CreationDate="2023-06-22T09:21:30.467" UserId="116" Comment="spelling and tag" Text="|substrate-node-template|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35493" PostHistoryTypeId="24" PostId="7916" RevisionGUID="553390a4-c604-4e7b-a451-f336a52ca85f" CreationDate="2023-06-22T09:21:30.467" Comment="Proposed by 116 approved by 2281, 354 edit id of 476" ContentLicense="CC BY-SA 4.0" />
  <row Id="35494" PostHistoryTypeId="6" PostId="28" RevisionGUID="2d6e762f-88bc-4c4c-a270-f0a122103f1b" CreationDate="2023-06-22T09:32:15.550" UserId="83" Comment="edited tags" Text="|ink|testing|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35495" PostHistoryTypeId="6" PostId="4778" RevisionGUID="a20b8c68-5d56-442b-b6ea-78fecb63e524" CreationDate="2023-06-22T09:33:12.797" UserId="83" Comment="edited tags" Text="|ink|smart-contract|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35496" PostHistoryTypeId="6" PostId="2797" RevisionGUID="62fdf2f6-8aba-4c70-85dc-f18c9b7ca934" CreationDate="2023-06-22T09:33:47.160" UserId="83" Comment="edited tags" Text="|ink|smart-contract|substrate-contracts-node|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35497" PostHistoryTypeId="6" PostId="2006" RevisionGUID="74559be5-94a5-4d08-8009-e74e98076ab5" CreationDate="2023-06-22T09:35:16.760" UserId="83" Comment="edited tags" Text="|ink|pallet-contracts|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35498" PostHistoryTypeId="6" PostId="2561" RevisionGUID="8e7aeccd-7d76-4f15-ae03-afa6b97b271b" CreationDate="2023-06-22T09:36:29.077" UserId="83" Comment="edited tags" Text="|ink|substrate-contracts-node|events|cross-contract-call|blockchain-events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35499" PostHistoryTypeId="33" PostId="8704" RevisionGUID="aaa6d3d9-17c6-40d3-9183-bc592eb4842d" CreationDate="2023-06-22T09:44:38.350" UserId="2372" Comment="24" />
  <row Id="35500" PostHistoryTypeId="2" PostId="8993" RevisionGUID="648d7d46-299b-44eb-927e-a649a1ab7c0c" CreationDate="2023-06-22T09:55:36.143" UserId="2372" Text="I'm interested in transferring NFTs between a relay chain and a parachain. Does anyone have any knowledge or ideas about how to accomplish this&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35502" PostHistoryTypeId="1" PostId="8993" RevisionGUID="648d7d46-299b-44eb-927e-a649a1ab7c0c" CreationDate="2023-06-22T09:55:36.143" UserId="2372" Text="I want to make pallet to transfer NFTs between different chains through xcm?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35503" PostHistoryTypeId="3" PostId="8993" RevisionGUID="648d7d46-299b-44eb-927e-a649a1ab7c0c" CreationDate="2023-06-22T09:55:36.143" UserId="2372" Text="|xcm|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35504" PostHistoryTypeId="2" PostId="8994" RevisionGUID="1bb3d8ba-0a42-4d25-a05e-089ee32f8a2c" CreationDate="2023-06-22T10:05:27.717" UserId="3395" Text="After limiting the number jobs in order to handle the amount of resources used by rust-analyzer it keeps using all cores so my computer ends up hanged out:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;In addition, I've noticed that several processes continue to run even after stopping the rust-analyzer. Notably, it's these processes that are consuming all available cores:&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;/usr/lib/gcc/x86_64-linux-gnu/12/cc1plus -quite -I /home/c/rust-project/target/debug/build/wasm-opt-sys...&#xD;&#xA;/usr/lib/gcc/x86_64-linux-gnu/12/cc1plus -quite -I rocksdb/include/ -I rocksdb/ -I rocksdb/third-party/gtest-1.8.1/fused-src/ -I snappy...&#xD;&#xA;/usr/lib/gcc/x86_64-linux-gnu/12/cc1plus -quite -I rocksdb/include/ -I rocksdb/ -I rocksdb/third-party/gtest-1.8.1/fused-src/ -I snappy...&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For reference, my laptop is equipped with 16 cores and has 16GB RAM.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SfpkF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35506" PostHistoryTypeId="1" PostId="8994" RevisionGUID="1bb3d8ba-0a42-4d25-a05e-089ee32f8a2c" CreationDate="2023-06-22T10:05:27.717" UserId="3395" Text="Persistent overuse of system resources by rust-analyzer" ContentLicense="CC BY-SA 4.0" />
  <row Id="35507" PostHistoryTypeId="3" PostId="8994" RevisionGUID="1bb3d8ba-0a42-4d25-a05e-089ee32f8a2c" CreationDate="2023-06-22T10:05:27.717" UserId="3395" Text="|rust|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35508" PostHistoryTypeId="2" PostId="8995" RevisionGUID="70834d75-13ba-4791-a0fd-c9594582299f" CreationDate="2023-06-22T10:26:29.887" UserId="4350" Text="I want to call an external RPC method from the `offchain_worker`. I checked multiple jsonrpc clients but none of them were `no_std` compatible. I want to know if there are any clients out there which can be used within the ocw of substrate.&#xD;&#xA;&#xD;&#xA;I also tried to call the RPCs using `sp_runtime::offchain::http::Request`, but couldn't find an example of `post` method, any examples/help would be much appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="35510" PostHistoryTypeId="1" PostId="8995" RevisionGUID="70834d75-13ba-4791-a0fd-c9594582299f" CreationDate="2023-06-22T10:26:29.887" UserId="4350" Text="Calling external RPC method from OCW" ContentLicense="CC BY-SA 4.0" />
  <row Id="35511" PostHistoryTypeId="3" PostId="8995" RevisionGUID="70834d75-13ba-4791-a0fd-c9594582299f" CreationDate="2023-06-22T10:26:29.887" UserId="4350" Text="|offchain-worker|json-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35512" PostHistoryTypeId="5" PostId="8995" RevisionGUID="0bd0ab37-62cc-42b6-aeac-ed27c5549eb0" CreationDate="2023-06-22T10:37:29.417" UserId="4350" Comment="added 262 characters in body" Text="I want to call an external RPC method from the `offchain_worker`. I checked multiple jsonrpc clients but none of them were `no_std` compatible. I want to know if there are any clients out there which can be used within the ocw of substrate.&#xD;&#xA;&#xD;&#xA;I also tried to call the RPCs using `sp_runtime::offchain::http::Request`, but couldn't find an example of `post` method, any examples/help would be much appreciated.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;[EDIT]&#xD;&#xA;just found an example of the latter part [here](https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-http-requests/#read-and-submit-the-response), so please just let me know if there are `no_std` jsonrpc clients out there." ContentLicense="CC BY-SA 4.0" />
  <row Id="35513" PostHistoryTypeId="2" PostId="8996" RevisionGUID="00612140-aecc-4526-9452-5ded39501d01" CreationDate="2023-06-22T10:41:31.990" UserId="3395" Text="I've realized that the more appropriate parameter for setting the number of jobs is &quot;**cargo**.extraArgs&quot;, not &quot;**check**.extraArgs&quot;. As of now, no cargo command will use more than the specified number of jobs.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vAJHQ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35517" PostHistoryTypeId="2" PostId="8998" RevisionGUID="5c952ed0-3a5c-4d0d-8f52-d8ea710a2fc0" CreationDate="2023-06-22T11:19:33.650" UserId="2722" Text="i wanna add new pallet in substrate `runtime.rs`&#xD;&#xA; &#xD;&#xA;this is the contract of the file : &#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    /// Edit this file to define custom logic or remove it if it is not needed.&#xD;&#xA;    /// Learn more about FRAME and the core library of Substrate FRAME pallets:&#xD;&#xA;    /// &lt;https://docs.substrate.io/reference/frame-pallets/&gt;&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod mock;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests;&#xD;&#xA;    &#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    mod benchmarking;&#xD;&#xA;    pub mod weights;&#xD;&#xA;    pub use weights::*;&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    	use super::*;&#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    		/// Type representing the weight of this pallet&#xD;&#xA;    		type WeightInfo: WeightInfo;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// The pallet's runtime storage items.&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/runtime-storage/&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn something)]&#xD;&#xA;    	// Learn more about declaring storage items:&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/runtime-storage/#declaring-storage-items&#xD;&#xA;    	pub type Something&lt;T&gt; = StorageValue&lt;_, u32&gt;;&#xD;&#xA;    &#xD;&#xA;    	// Pallets use events to inform users when important changes are made.&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/events-errors/&#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// Event documentation should end with an array that provides descriptive names for event&#xD;&#xA;    		/// parameters. [something, who]&#xD;&#xA;    		SomethingStored { something: u32, who: T::AccountId },&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Errors inform users that something went wrong.&#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// Error names should be descriptive.&#xD;&#xA;    		NoneValue,&#xD;&#xA;    		/// Errors should have helpful documentation associated with them.&#xD;&#xA;    		StorageOverflow,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Dispatchable functions allows users to interact with the pallet and invoke state changes.&#xD;&#xA;    	// These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;    	// Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		/// An example dispatchable that takes a singles value as a parameter, writes the value to&#xD;&#xA;    		/// storage and emits an event. This function must be dispatched by a signed extrinsic.&#xD;&#xA;    		#[pallet::call_index(0)]&#xD;&#xA;    		#[pallet::weight(T::WeightInfo::do_something())]&#xD;&#xA;    		pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResult {&#xD;&#xA;    			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;    			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;    			// https://docs.substrate.io/main-docs/build/origins/&#xD;&#xA;    			let who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Update storage.&#xD;&#xA;    			&lt;Something&lt;T&gt;&gt;::put(something);&#xD;&#xA;    &#xD;&#xA;    			// Emit an event.&#xD;&#xA;    			Self::deposit_event(Event::SomethingStored { something, who });&#xD;&#xA;    			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		/// An example dispatchable that may throw a custom error.&#xD;&#xA;    		#[pallet::call_index(1)]&#xD;&#xA;    		#[pallet::weight(T::WeightInfo::cause_error())]&#xD;&#xA;    		pub fn cause_error(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;    			let _who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Read a value from storage.&#xD;&#xA;    			match &lt;Something&lt;T&gt;&gt;::get() {&#xD;&#xA;    				// Return an error if the value has not been set.&#xD;&#xA;    				None =&gt; return Err(Error::&lt;T&gt;::NoneValue.into()),&#xD;&#xA;    				Some(old) =&gt; {&#xD;&#xA;    					// Increment the value read from storage; will error in the event of overflow.&#xD;&#xA;    					let new = old.checked_add(1).ok_or(Error::&lt;T&gt;::StorageOverflow)?;&#xD;&#xA;    					// Update the value in storage with the incremented result.&#xD;&#xA;    					&lt;Something&lt;T&gt;&gt;::put(new);&#xD;&#xA;    					Ok(())&#xD;&#xA;    				},&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and i added this line in runtime `cargo.toml` : &#xD;&#xA;&#xD;&#xA;    pallet-acn = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../../../frame/acn&quot; }&#xD;&#xA;    &#xD;&#xA;    &quot;pallet-acn/std&quot;,&#xD;&#xA;&#xD;&#xA; i add this code in runtime file : &#xD;&#xA;&#xD;&#xA;    impl pallet_acn::Config for Runtime {&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type WeightInfo = pallet_acn::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    construct_runtime!(&#xD;&#xA;    		ACN:pallet_acn,&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;and i wanna run the `cargo check` , i faced this error :&#xD;&#xA;&#xD;&#xA;    the function or associated item `offchain_worker` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckMortality&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeAssetTxPayment&lt;Runtime&gt;)&gt;&gt;, ChainContext&lt;Runtime&gt;, Runtime, (Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance1&gt;, Pallet&lt;Runtime, Instance2&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance1&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance1&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance3&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance2&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;), (MigrateToV2&lt;Runtime&gt;, Migration&lt;Runtime&gt;, Migration&lt;Runtime&gt;)&gt;`, but its trait bounds were not satisfied&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and when i removed this two line , every thing will be fine .&#xD;&#xA;&#xD;&#xA;**whats the problem ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="35519" PostHistoryTypeId="1" PostId="8998" RevisionGUID="5c952ed0-3a5c-4d0d-8f52-d8ea710a2fc0" CreationDate="2023-06-22T11:19:33.650" UserId="2722" Text="the function or associated item `offchain_worker` exists for struct" ContentLicense="CC BY-SA 4.0" />
  <row Id="35520" PostHistoryTypeId="3" PostId="8998" RevisionGUID="5c952ed0-3a5c-4d0d-8f52-d8ea710a2fc0" CreationDate="2023-06-22T11:19:33.650" UserId="2722" Text="|substrate-node-template|polkadot|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35521" PostHistoryTypeId="2" PostId="8999" RevisionGUID="ff9d992b-7192-4079-b817-b60529dcab25" CreationDate="2023-06-22T11:37:51.673" UserId="2762" Text="It would be amazing to have this. As far as I know there is no implementation about that yet. But I know there is a discussion on the Polkadot Forum that you should check: [WrappedEVM Eth RPC compatibility layer][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://forum.polkadot.network/t/wrappedevm-eth-rpc-compatibility-layer/2775" ContentLicense="CC BY-SA 4.0" />
  <row Id="35523" PostHistoryTypeId="2" PostId="9000" RevisionGUID="946a61bb-35f1-4119-b4f0-93e5b7007e31" CreationDate="2023-06-22T11:43:56.250" UserId="3832" Text="The standard way to track extrinsics is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.tx.balances&#xD;&#xA;  .transfer(recipient, 123)&#xD;&#xA;  .signAndSend(sender, ({ status, events }) =&gt; {&#xD;&#xA;    if (status.isInBlock) {&#xD;&#xA;      // here we know that our tx is in chain and can check if it succeeded or not&#xD;&#xA;    }&#xD;&#xA;  })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I need to support a case where something can go wrong on client before extrinsic gets in the block, so I'm looking for something like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let txHash = await api.tx.balances&#xD;&#xA;  .transfer(recipient, 123)&#xD;&#xA;  .signAndSend(sender);&#xD;&#xA;&#xD;&#xA;store_hash_in_db(txHash);&#xD;&#xA;&#xD;&#xA;// later somewhere else in the code, for example after server restart or page refresh&#xD;&#xA;&#xD;&#xA;let txHash = load_hash_from_db();&#xD;&#xA;&#xD;&#xA;// how to check here if extrinsic got included in block and in which one?&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm aware that tx hash isn't a unique identifier and block hash + index should be used instead (https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics), but that only works if I wait until transaction gets included, which may be a long time during which things can go wrong.&#xD;&#xA;&#xD;&#xA;What's the solution here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35525" PostHistoryTypeId="1" PostId="9000" RevisionGUID="946a61bb-35f1-4119-b4f0-93e5b7007e31" CreationDate="2023-06-22T11:43:56.250" UserId="3832" Text="How to independently check in which block extrinsic got included?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35526" PostHistoryTypeId="3" PostId="9000" RevisionGUID="946a61bb-35f1-4119-b4f0-93e5b7007e31" CreationDate="2023-06-22T11:43:56.250" UserId="3832" Text="|polkadot-js|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35527" PostHistoryTypeId="5" PostId="8996" RevisionGUID="7a38995c-dbfb-42ea-9b54-88a47091778d" CreationDate="2023-06-22T12:11:57.003" UserId="3395" Comment="added 8 characters in body" Text="I've realized that the more appropriate parameter for setting the number of jobs is &quot;**cargo**.extraArgs&quot;, rather than &quot;**check**.extraArgs&quot;. As of now, no cargo command will use more than the specified number of jobs.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vAJHQ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35528" PostHistoryTypeId="5" PostId="8557" RevisionGUID="9782c18c-5c62-4b85-ac8b-35d616e91bb2" CreationDate="2023-06-22T12:42:47.783" UserId="251" Comment="added 23 characters in body" Text="It seems that you have updated your dependencies unintentionally.&#xD;&#xA;&#xD;&#xA;Please avoid modifying the Cargo.lock file or running &quot;cargo update&quot; after cloning the repository (if you are unsure of its consequences).&#xD;&#xA;&#xD;&#xA;`sp-beefy` was renamed to `sp-consensus-beefy`, check https://github.com/paritytech/substrate/pull/13484." ContentLicense="CC BY-SA 4.0" />
  <row Id="35529" PostHistoryTypeId="2" PostId="9001" RevisionGUID="77d6fcad-f77f-4e86-a097-b732ad7eceb4" CreationDate="2023-06-22T14:19:36.620" UserId="4105" Text="I am implementing a pallet which interacts with pallet_balances via Currency trait. For some reason, when I call any operation on currency trait (like Slash on screen below), it is not aligned to number of decimals and unit is not shown. In explorer all fee related payments are scaled (here Withdraw), but all calls done by my pallet not.&#xD;&#xA;&#xD;&#xA;[![Missing currency and decimals recalculation][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WOPPV.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl my_pallet::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type ReserveIdentifier = &lt;Runtime as pallet_balances::Config&gt;::ReserveIdentifier;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;	/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;	type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt;&#xD;&#xA;		+ IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;&#xD;&#xA;		+ TryInto&lt;Event&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	/// The Currency handler for pallet.&#xD;&#xA;	type Currency: NamedReservableCurrency&lt;&#xD;&#xA;		Self::AccountId,&#xD;&#xA;		ReserveIdentifier = Self::ReserveIdentifier,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	/// The id type for named reserves.&#xD;&#xA;	type ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy + From&lt;[u8; 8]&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;#[pallet::weight(T::WeightInfo::my_extrinsic())]&#xD;&#xA;#[frame_support::transactional]&#xD;&#xA;pub fn my_extrinsic(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;    let origin = ensure_signed(origin)?;&#xD;&#xA;    T::Currency::slash(&amp;origin, 100_000_000_u32.into());&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please note, that it occurs even I call RAW Currency trait, not ReservableCurrency or NamedReservableCurrency.&#xD;&#xA;&#xD;&#xA;Do you have any ideas how to fix it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35531" PostHistoryTypeId="1" PostId="9001" RevisionGUID="77d6fcad-f77f-4e86-a097-b732ad7eceb4" CreationDate="2023-06-22T14:19:36.620" UserId="4105" Text="Polkadot JS units for currency" ContentLicense="CC BY-SA 4.0" />
  <row Id="35532" PostHistoryTypeId="3" PostId="9001" RevisionGUID="77d6fcad-f77f-4e86-a097-b732ad7eceb4" CreationDate="2023-06-22T14:19:36.620" UserId="4105" Text="|polkadot-js|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35533" PostHistoryTypeId="2" PostId="9002" RevisionGUID="a8e3d165-b017-4473-986f-e1f2c4d49840" CreationDate="2023-06-22T14:21:50.780" UserId="29" Text="There was a PR regarding supporting non-fungibles [here](https://github.com/paritytech/polkadot/pull/4950).&#xD;&#xA;&#xD;&#xA;And there are also some nice examples in the XCM Simulator:&#xD;&#xA;```rust&#xD;&#xA;/// Scenario:&#xD;&#xA;/// The relay-chain teleports an NFT to a parachain.&#xD;&#xA;///&#xD;&#xA;/// Asserts that the parachain accounts are updated as expected.&#xD;&#xA;#[test]&#xD;&#xA;fn teleport_nft() {&#xD;&#xA;	MockNet::reset();&#xD;&#xA;&#xD;&#xA;	Relay::execute_with(|| {&#xD;&#xA;		// Mint the NFT (1, 69) and give it to our &quot;parachain#1 alias&quot;.&#xD;&#xA;		assert_ok!(relay_chain::Uniques::mint(&#xD;&#xA;			relay_chain::RuntimeOrigin::signed(ALICE),&#xD;&#xA;			1,&#xD;&#xA;			69,&#xD;&#xA;			child_account_account_id(1, ALICE),&#xD;&#xA;		));&#xD;&#xA;		// The parachain#1 alias of Alice is what must hold it on the Relay-chain for it to be&#xD;&#xA;		// withdrawable by Alice on the parachain.&#xD;&#xA;		assert_eq!(&#xD;&#xA;			relay_chain::Uniques::owner(1, 69),&#xD;&#xA;			Some(child_account_account_id(1, ALICE))&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;	ParaA::execute_with(|| {&#xD;&#xA;		assert_ok!(parachain::ForeignUniques::force_create(&#xD;&#xA;			parachain::RuntimeOrigin::root(),&#xD;&#xA;			(Parent, GeneralIndex(1)).into(),&#xD;&#xA;			ALICE,&#xD;&#xA;			false,&#xD;&#xA;		));&#xD;&#xA;		assert_eq!(&#xD;&#xA;			parachain::ForeignUniques::owner((Parent, GeneralIndex(1)).into(), 69u32.into()),&#xD;&#xA;			None,&#xD;&#xA;		);&#xD;&#xA;		assert_eq!(parachain::Balances::reserved_balance(&amp;ALICE), 0);&#xD;&#xA;&#xD;&#xA;		// IRL Alice would probably just execute this locally on the Relay-chain, but we can't&#xD;&#xA;		// easily do that here since we only send between chains.&#xD;&#xA;		let message = Xcm(vec![&#xD;&#xA;			WithdrawAsset((GeneralIndex(1), 69u32).into()),&#xD;&#xA;			InitiateTeleport {&#xD;&#xA;				assets: AllCounted(1).into(),&#xD;&#xA;				dest: Parachain(1).into(),&#xD;&#xA;				xcm: Xcm(vec![DepositAsset {&#xD;&#xA;					assets: AllCounted(1).into(),&#xD;&#xA;					beneficiary: (AccountId32 { id: ALICE.into(), network: None },).into(),&#xD;&#xA;				}]),&#xD;&#xA;			},&#xD;&#xA;		]);&#xD;&#xA;		// Send teleport&#xD;&#xA;		let alice = AccountId32 { id: ALICE.into(), network: None };&#xD;&#xA;		assert_ok!(ParachainPalletXcm::send_xcm(alice, Parent, message));&#xD;&#xA;	});&#xD;&#xA;	ParaA::execute_with(|| {&#xD;&#xA;		assert_eq!(&#xD;&#xA;			parachain::ForeignUniques::owner((Parent, GeneralIndex(1)).into(), 69u32.into()),&#xD;&#xA;			Some(ALICE),&#xD;&#xA;		);&#xD;&#xA;		assert_eq!(parachain::Balances::reserved_balance(&amp;ALICE), 1000);&#xD;&#xA;	});&#xD;&#xA;	Relay::execute_with(|| {&#xD;&#xA;		assert_eq!(relay_chain::Uniques::owner(1, 69), None);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Scenario:&#xD;&#xA;/// The relay-chain transfers an NFT into a parachain's sovereign account, who then mints a&#xD;&#xA;/// trustless-backed-derivated locally.&#xD;&#xA;///&#xD;&#xA;/// Asserts that the parachain accounts are updated as expected.&#xD;&#xA;#[test]&#xD;&#xA;fn reserve_asset_transfer_nft() {&#xD;&#xA;	sp_tracing::init_for_tests();&#xD;&#xA;	MockNet::reset();&#xD;&#xA;&#xD;&#xA;	Relay::execute_with(|| {&#xD;&#xA;		assert_ok!(relay_chain::Uniques::force_create(&#xD;&#xA;			relay_chain::RuntimeOrigin::root(),&#xD;&#xA;			2,&#xD;&#xA;			ALICE,&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;		assert_ok!(relay_chain::Uniques::mint(&#xD;&#xA;			relay_chain::RuntimeOrigin::signed(ALICE),&#xD;&#xA;			2,&#xD;&#xA;			69,&#xD;&#xA;			child_account_account_id(1, ALICE)&#xD;&#xA;		));&#xD;&#xA;		assert_eq!(&#xD;&#xA;			relay_chain::Uniques::owner(2, 69),&#xD;&#xA;			Some(child_account_account_id(1, ALICE))&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;	ParaA::execute_with(|| {&#xD;&#xA;		assert_ok!(parachain::ForeignUniques::force_create(&#xD;&#xA;			parachain::RuntimeOrigin::root(),&#xD;&#xA;			(Parent, GeneralIndex(2)).into(),&#xD;&#xA;			ALICE,&#xD;&#xA;			false,&#xD;&#xA;		));&#xD;&#xA;		assert_eq!(&#xD;&#xA;			parachain::ForeignUniques::owner((Parent, GeneralIndex(2)).into(), 69u32.into()),&#xD;&#xA;			None,&#xD;&#xA;		);&#xD;&#xA;		assert_eq!(parachain::Balances::reserved_balance(&amp;ALICE), 0);&#xD;&#xA;&#xD;&#xA;		let message = Xcm(vec![&#xD;&#xA;			WithdrawAsset((GeneralIndex(2), 69u32).into()),&#xD;&#xA;			DepositReserveAsset {&#xD;&#xA;				assets: AllCounted(1).into(),&#xD;&#xA;				dest: Parachain(1).into(),&#xD;&#xA;				xcm: Xcm(vec![DepositAsset {&#xD;&#xA;					assets: AllCounted(1).into(),&#xD;&#xA;					beneficiary: (AccountId32 { id: ALICE.into(), network: None },).into(),&#xD;&#xA;				}]),&#xD;&#xA;			},&#xD;&#xA;		]);&#xD;&#xA;		// Send transfer&#xD;&#xA;		let alice = AccountId32 { id: ALICE.into(), network: None };&#xD;&#xA;		assert_ok!(ParachainPalletXcm::send_xcm(alice, Parent, message));&#xD;&#xA;	});&#xD;&#xA;	ParaA::execute_with(|| {&#xD;&#xA;		log::debug!(target: &quot;xcm-exceutor&quot;, &quot;Hello&quot;);&#xD;&#xA;		assert_eq!(&#xD;&#xA;			parachain::ForeignUniques::owner((Parent, GeneralIndex(2)).into(), 69u32.into()),&#xD;&#xA;			Some(ALICE),&#xD;&#xA;		);&#xD;&#xA;		assert_eq!(parachain::Balances::reserved_balance(&amp;ALICE), 1000);&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;	Relay::execute_with(|| {&#xD;&#xA;		assert_eq!(relay_chain::Uniques::owner(2, 69), Some(child_account_id(1)));&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/60af0cab8bbfe3fb23d605b296acd60030e25504/xcm/xcm-simulator/example/src/lib.rs#L359-L492&#xD;&#xA;&#xD;&#xA;There was also some discussion in the Polkadot Forum:&#xD;&#xA;- https://forum.polkadot.network/t/cross-chain-nft-transfer" ContentLicense="CC BY-SA 4.0" />
  <row Id="35535" PostHistoryTypeId="2" PostId="9003" RevisionGUID="027eebf0-498d-4041-874c-36642fe889be" CreationDate="2023-06-22T14:24:39.590" UserId="3142" Text="It could be that the node you are connecting to is out of connections.&#xD;&#xA;&#xD;&#xA;This can be changed using ```--ws-max-connections nnn``` where *nnn* is the number of connections when starting the node." ContentLicense="CC BY-SA 4.0" />
  <row Id="35537" PostHistoryTypeId="5" PostId="9001" RevisionGUID="6b54df9b-4557-421a-a83d-273e37f1ac35" CreationDate="2023-06-22T14:27:16.433" UserId="4105" Comment="added 373 characters in body" Text="I am implementing a pallet which interacts with pallet_balances via Currency trait. For some reason, when I call any operation on currency trait (like Slash on screen below), it is not aligned to number of decimals and unit is not shown. In explorer all fee related payments are scaled (here Withdraw), but all calls done by my pallet not.&#xD;&#xA;&#xD;&#xA;[![Missing currency and decimals recalculation][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WOPPV.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl my_pallet::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type ReserveIdentifier = &lt;Runtime as pallet_balances::Config&gt;::ReserveIdentifier;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;	/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;	type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt;&#xD;&#xA;		+ IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;&#xD;&#xA;		+ TryInto&lt;Event&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	/// The Currency handler for pallet.&#xD;&#xA;	type Currency: NamedReservableCurrency&lt;&#xD;&#xA;		Self::AccountId,&#xD;&#xA;		ReserveIdentifier = Self::ReserveIdentifier,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	/// The id type for named reserves.&#xD;&#xA;	type ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy + From&lt;[u8; 8]&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;type AccountOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;pub type BalanceOf&lt;T&gt; =&#xD;&#xA;	&lt;&lt;T as Config&gt;::Currency as frame_support::traits::Currency&lt;AccountOf&lt;T&gt;&gt;&gt;::Balance;&#xD;&#xA;pub type ReserveIdentifierOf&lt;T&gt; =&#xD;&#xA;	&lt;&lt;T as Config&gt;::Currency as NamedReservableCurrency&lt;AccountOf&lt;T&gt;&gt;&gt;::ReserveIdentifier;&#xD;&#xA;type NegativeImbalanceOf&lt;T&gt; =&#xD;&#xA;	&lt;&lt;T as Config&gt;::Currency as Currency&lt;AccountOf&lt;T&gt;&gt;&gt;::NegativeImbalance;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;#[pallet::weight(T::WeightInfo::my_extrinsic())]&#xD;&#xA;#[frame_support::transactional]&#xD;&#xA;pub fn my_extrinsic(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;    let origin = ensure_signed(origin)?;&#xD;&#xA;    T::Currency::slash(&amp;origin, 100_000_000_u32.into());&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please note, that it occurs even I call RAW Currency trait, not ReservableCurrency or NamedReservableCurrency.&#xD;&#xA;&#xD;&#xA;Do you have any ideas how to fix it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35538" PostHistoryTypeId="2" PostId="9004" RevisionGUID="c97264ad-e8a9-459e-8434-7ea107f74472" CreationDate="2023-06-22T14:27:58.783" UserId="3142" Text="Which crate is logging `Accepting new connection 1/100`?  Is it in *tokio*?  *jsonrpsee*?  In the logs, there is no way to distinguish between new connections for the node vs for the relay.  I would like to understand where this is being logged and see if I can customize it (or create a ticket for that project to allow customization.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35540" PostHistoryTypeId="1" PostId="9004" RevisionGUID="c97264ad-e8a9-459e-8434-7ea107f74472" CreationDate="2023-06-22T14:27:58.783" UserId="3142" Text="Accepting new connection 1/nnn" ContentLicense="CC BY-SA 4.0" />
  <row Id="35541" PostHistoryTypeId="3" PostId="9004" RevisionGUID="c97264ad-e8a9-459e-8434-7ea107f74472" CreationDate="2023-06-22T14:27:58.783" UserId="3142" Text="|polkadot|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35542" PostHistoryTypeId="5" PostId="8998" RevisionGUID="3419bf59-7965-4ed4-97e5-6904c483917b" CreationDate="2023-06-22T16:39:40.120" UserId="2722" Comment="added 113 characters in body" Text="i wanna add new pallet in substrate `runtime.rs`&#xD;&#xA; &#xD;&#xA;this is the contract of the file : &#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    /// Edit this file to define custom logic or remove it if it is not needed.&#xD;&#xA;    /// Learn more about FRAME and the core library of Substrate FRAME pallets:&#xD;&#xA;    /// &lt;https://docs.substrate.io/reference/frame-pallets/&gt;&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod mock;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests;&#xD;&#xA;    &#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    mod benchmarking;&#xD;&#xA;    pub mod weights;&#xD;&#xA;    pub use weights::*;&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    	use super::*;&#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    		/// Type representing the weight of this pallet&#xD;&#xA;    		type WeightInfo: WeightInfo;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// The pallet's runtime storage items.&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/runtime-storage/&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn something)]&#xD;&#xA;    	// Learn more about declaring storage items:&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/runtime-storage/#declaring-storage-items&#xD;&#xA;    	pub type Something&lt;T&gt; = StorageValue&lt;_, u32&gt;;&#xD;&#xA;    &#xD;&#xA;    	// Pallets use events to inform users when important changes are made.&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/events-errors/&#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// Event documentation should end with an array that provides descriptive names for event&#xD;&#xA;    		/// parameters. [something, who]&#xD;&#xA;    		SomethingStored { something: u32, who: T::AccountId },&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Errors inform users that something went wrong.&#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// Error names should be descriptive.&#xD;&#xA;    		NoneValue,&#xD;&#xA;    		/// Errors should have helpful documentation associated with them.&#xD;&#xA;    		StorageOverflow,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Dispatchable functions allows users to interact with the pallet and invoke state changes.&#xD;&#xA;    	// These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;    	// Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		/// An example dispatchable that takes a singles value as a parameter, writes the value to&#xD;&#xA;    		/// storage and emits an event. This function must be dispatched by a signed extrinsic.&#xD;&#xA;    		#[pallet::call_index(0)]&#xD;&#xA;    		#[pallet::weight(T::WeightInfo::do_something())]&#xD;&#xA;    		pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResult {&#xD;&#xA;    			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;    			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;    			// https://docs.substrate.io/main-docs/build/origins/&#xD;&#xA;    			let who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Update storage.&#xD;&#xA;    			&lt;Something&lt;T&gt;&gt;::put(something);&#xD;&#xA;    &#xD;&#xA;    			// Emit an event.&#xD;&#xA;    			Self::deposit_event(Event::SomethingStored { something, who });&#xD;&#xA;    			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		/// An example dispatchable that may throw a custom error.&#xD;&#xA;    		#[pallet::call_index(1)]&#xD;&#xA;    		#[pallet::weight(T::WeightInfo::cause_error())]&#xD;&#xA;    		pub fn cause_error(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;    			let _who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Read a value from storage.&#xD;&#xA;    			match &lt;Something&lt;T&gt;&gt;::get() {&#xD;&#xA;    				// Return an error if the value has not been set.&#xD;&#xA;    				None =&gt; return Err(Error::&lt;T&gt;::NoneValue.into()),&#xD;&#xA;    				Some(old) =&gt; {&#xD;&#xA;    					// Increment the value read from storage; will error in the event of overflow.&#xD;&#xA;    					let new = old.checked_add(1).ok_or(Error::&lt;T&gt;::StorageOverflow)?;&#xD;&#xA;    					// Update the value in storage with the incremented result.&#xD;&#xA;    					&lt;Something&lt;T&gt;&gt;::put(new);&#xD;&#xA;    					Ok(())&#xD;&#xA;    				},&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and i added this line in runtime `cargo.toml` : &#xD;&#xA;&#xD;&#xA;    pallet-acn = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../../../frame/acn&quot; }&#xD;&#xA;    &#xD;&#xA;    &quot;pallet-acn/std&quot;,&#xD;&#xA;&#xD;&#xA; i add this code in runtime file : &#xD;&#xA;&#xD;&#xA;    impl pallet_acn::Config for Runtime {&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type WeightInfo = pallet_acn::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    construct_runtime!(&#xD;&#xA;    		ACN:pallet_acn,&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;and i wanna run the `cargo check` , i faced this error :&#xD;&#xA;&#xD;&#xA;    the function or associated item `offchain_worker` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckMortality&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeAssetTxPayment&lt;Runtime&gt;)&gt;&gt;, ChainContext&lt;Runtime&gt;, Runtime, (Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance1&gt;, Pallet&lt;Runtime, Instance2&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance1&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance1&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance3&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance2&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;), (MigrateToV2&lt;Runtime&gt;, Migration&lt;Runtime&gt;, Migration&lt;Runtime&gt;)&gt;`, but its trait bounds were not satisfied&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and when i removed this two line , every thing will be fine .&#xD;&#xA;&#xD;&#xA;[Complete Error File][1]&#xD;&#xA;&#xD;&#xA;[Runtime File][2]&#xD;&#xA;&#xD;&#xA;**whats the problem ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://gist.github.com/Kianoush-Dortaj/4622bbe340689ac8c676e6c13617e01a&#xD;&#xA;  [2]: https://gist.github.com/Kianoush-Dortaj/7995d95ddd968f24fdf3ac311234d56a" ContentLicense="CC BY-SA 4.0" />
  <row Id="35543" PostHistoryTypeId="2" PostId="9005" RevisionGUID="1372bbfe-9566-4d19-b39c-0dcc93da06e8" CreationDate="2023-06-22T18:32:48.680" UserId="2762" Text="I have a CLI tool that gets a [WebAssembly runtime file][1]:&#xD;&#xA;```rs&#xD;&#xA;let validation_code_content = fs::read_to_string(path_validation_code)&#xD;&#xA;        .expect(&quot;Should have been able to read the validation code file&quot;);&#xD;&#xA;```&#xD;&#xA;If I print `validation_code_content` I can see the content is correct. Now I want to send this file into an extrinsic (e.g: [register][2]), which needs to be converted into the `[ValidationCode][3]` struct:&#xD;&#xA;```rs&#xD;&#xA;/// Parachain validation code.&#xD;&#xA;#[derive(&#xD;&#xA;	PartialEq,&#xD;&#xA;	Eq,&#xD;&#xA;	Clone,&#xD;&#xA;	Encode,&#xD;&#xA;	Decode,&#xD;&#xA;	RuntimeDebug,&#xD;&#xA;	derive_more::From,&#xD;&#xA;	TypeInfo,&#xD;&#xA;	Serialize,&#xD;&#xA;	Deserialize,&#xD;&#xA;)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Hash))]&#xD;&#xA;pub struct ValidationCode(#[serde(with = &quot;bytes&quot;)] pub Vec&lt;u8&gt;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can see in the [tests][3] on the pallet that I need a vector of bytes:&#xD;&#xA;```rs&#xD;&#xA;fn test_validation_code(size: usize) -&gt; ValidationCode {&#xD;&#xA;		let validation_code = vec![0u8; size as usize];&#xD;&#xA;		ValidationCode(validation_code)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So my approach is convert the String in the vector of bytes and cast it to ValidationCode:&#xD;&#xA;```rs&#xD;&#xA;    let validation_code = validation_code_content.into_bytes()&#xD;&#xA;    let call = Call::Registrar(RegistrarCall::register {&#xD;&#xA;        id: RococoId(para_id),&#xD;&#xA;        genesis_head: HeadData(genesis_head),&#xD;&#xA;        validation_code: ValidationCode(validation_code),&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The code compiles but the extrinsic fails because something is wrong with the validation code. Did I lose data when I am doing the conversion?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/#prepare-the-parachain-collator&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/paras_registrar.rs#L232&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/master/runtime/common/src/paras_registrar.rs#L883" ContentLicense="CC BY-SA 4.0" />
  <row Id="35545" PostHistoryTypeId="1" PostId="9005" RevisionGUID="1372bbfe-9566-4d19-b39c-0dcc93da06e8" CreationDate="2023-06-22T18:32:48.680" UserId="2762" Text="WebAssembly runtime file into ValidationCode" ContentLicense="CC BY-SA 4.0" />
  <row Id="35546" PostHistoryTypeId="3" PostId="9005" RevisionGUID="1372bbfe-9566-4d19-b39c-0dcc93da06e8" CreationDate="2023-06-22T18:32:48.680" UserId="2762" Text="|rust|wasm|subxt|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35547" PostHistoryTypeId="2" PostId="9006" RevisionGUID="434708a9-0b28-4c53-9fcf-cf53c92da98a" CreationDate="2023-06-22T19:12:40.627" UserId="388" Text="The `set_keys` extrinsic in `pallet_session` has a second argument [`proof`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/frame/session/src/lib.rs#L588), which seems to be intended as an ownership proof of the `keys`.&#xD;&#xA;&#xD;&#xA;Looking at the body, there is a call to [`ownership_proof_is_valid`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/frame/session/src/lib.rs#L590).&#xD;&#xA;&#xD;&#xA;The `ownership_proof_is_valid` method is defined on the [`OpaqueKeys`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/primitives/runtime/src/traits.rs#L1724-L1725) trait, with a default implementation that just returns `true`.&#xD;&#xA;&#xD;&#xA;The intended way to implement `OpaqueKeys` is, as far as I know, to use the [`impl_opaque_keys` macro](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/primitives/runtime/src/traits.rs#L2047). That macro, however generates an implementation that does not [override the default implementation of `ownership_proof_is_valid`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/primitives/runtime/src/traits.rs#L1990-L2018).&#xD;&#xA;&#xD;&#xA;It seems to me, then, that in practice `ownership_proof_is_valid` will always return `true`. If that's the case, what is the purpose of the `proof` argument?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35549" PostHistoryTypeId="1" PostId="9006" RevisionGUID="434708a9-0b28-4c53-9fcf-cf53c92da98a" CreationDate="2023-06-22T19:12:40.627" UserId="388" Text="Pallet session: What is the purpose of the `proof` argument on the `set_keys` extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35550" PostHistoryTypeId="3" PostId="9006" RevisionGUID="434708a9-0b28-4c53-9fcf-cf53c92da98a" CreationDate="2023-06-22T19:12:40.627" UserId="388" Text="|pallet|extrinsic|key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35551" PostHistoryTypeId="2" PostId="9007" RevisionGUID="b5e948a2-f8ee-4393-8d05-31408fd3b725" CreationDate="2023-06-22T19:20:18.910" UserId="49" Text="When building a Substrate project, I receive the following error: `protoc failed: bitswap.v1.2.0.proto: No such file or directory`" ContentLicense="CC BY-SA 4.0" />
  <row Id="35553" PostHistoryTypeId="1" PostId="9007" RevisionGUID="b5e948a2-f8ee-4393-8d05-31408fd3b725" CreationDate="2023-06-22T19:20:18.910" UserId="49" Text="Build fails: protoc failed: bitswap.v1.2.0.proto: No such file or directory" ContentLicense="CC BY-SA 4.0" />
  <row Id="35554" PostHistoryTypeId="3" PostId="9007" RevisionGUID="b5e948a2-f8ee-4393-8d05-31408fd3b725" CreationDate="2023-06-22T19:20:18.910" UserId="49" Text="|error|build|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35555" PostHistoryTypeId="2" PostId="9008" RevisionGUID="29e1328a-8c49-4aa7-929b-4784c492f63c" CreationDate="2023-06-22T19:20:18.910" UserId="49" Text="**Most likely your protobuf-compiler version is outdated**. &#xD;&#xA;&#xD;&#xA;Starting from Substrate dependency version `polkadot-v0.9.32`, the `protobuf-compiler` version supplied by the apt repository on Ubuntu 18 or older does not meet the version requirement to build a Substrate project. This can also happen with package managers used by other operating systems.&#xD;&#xA;&#xD;&#xA;To resolve on Ubuntu 18 or older:&#xD;&#xA;1. Remove protobuf-compiler: `sudo apt remove protobuf-compiler`&#xD;&#xA;2. Use temporary folder: `tmp_folder=&quot;/tmp/proto-$RANDOM&quot; &amp;&amp; mkdir -p &quot;$tmp_folder&quot; &amp;&amp; pushd &quot;$tmp_folder&quot; &gt; /dev/null`&#xD;&#xA;3. Download a recent version of Protobuf from the [official repository](https://github.com/protocolbuffers/protobuf/releases) (the following version was tested): `wget https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip`&#xD;&#xA;4. Unpack protoc from zip file: `unzip protoc-23.3-linux-x86_64.zip bin/protoc`&#xD;&#xA;5. Move protoc into binary folder: `sudo cp -r ./bin/ /usr`&#xD;&#xA;6. Move back to starting point: `popd &gt; /dev/null`&#xD;&#xA;7. (Optional when using `/tmp`) Clean up: `rm -r &quot;$tmp_folder&quot;`&#xD;&#xA;8. Verify that protobuf-compiler was installed and can be located: `protoc --version` (should emit &quot;libprotoc 23.3&quot; in this case)&#xD;&#xA;&#xD;&#xA;All-in-one command:&#xD;&#xA;```bash&#xD;&#xA;sudo apt remove protobuf-compiler \&#xD;&#xA;  &amp;&amp; tmp_folder=&quot;/tmp/proto-$RANDOM&quot; \&#xD;&#xA;  &amp;&amp; mkdir -p &quot;$tmp_folder&quot; \&#xD;&#xA;  &amp;&amp; pushd &quot;$tmp_folder&quot; &gt; /dev/null \&#xD;&#xA;  &amp;&amp; wget https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-linux-x86_64.zip \&#xD;&#xA;  &amp;&amp; unzip protoc-23.3-linux-x86_64.zip bin/protoc \&#xD;&#xA;  &amp;&amp; sudo cp -r ./bin/ /usr \&#xD;&#xA;  &amp;&amp; popd &gt; /dev/null \&#xD;&#xA;  &amp;&amp; rm -r &quot;$tmp_folder&quot; \&#xD;&#xA;  &amp;&amp; protoc --version&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35557" PostHistoryTypeId="2" PostId="9009" RevisionGUID="a37a5ee8-a529-4cd8-a6be-555217bfeeba" CreationDate="2023-06-22T20:25:05.657" UserId="4335" Text="I have a question about `on_finalize` hook and inherent transactions. I have added an inherent transaction to [starknet pallet](https://github.com/keep-starknet-strange/madara/blob/main/crates/pallets/starknet/src/lib.rs#L409) in the Madara repo, that fetches the sequencer address from the local offchain storage of a node authoring the block, and puts it into the pallet storage. There is a boolean storage item `SeqAddrUpdate` that keeps track of whether there has been an update of the sequencer address in each block. &#xD;&#xA;&#xD;&#xA;Inherent: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;#[pallet::weight((0, DispatchClass::Mandatory))]&#xD;&#xA;pub fn set_sequencer_address(origin: OriginFor&lt;T&gt;, addr: [u8; 32]) -&gt; DispatchResult {&#xD;&#xA;    ensure_none(origin)?;&#xD;&#xA;    assert!(!SeqAddrUpdate::&lt;T&gt;::exists(), &quot;Sequencer address can be updated only once in the block&quot;);&#xD;&#xA;    SequencerAddress::&lt;T&gt;::put(addr);&#xD;&#xA;    SeqAddrUpdate::&lt;T&gt;::put(true);&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Hook: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn on_finalize(_n: T::BlockNumber) {&#xD;&#xA;    assert!(SeqAddrUpdate::&lt;T&gt;::take(), &quot;Sequencer address must be set for the block&quot;);&#xD;&#xA;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Expected behaviour: for block N, the inherent checks that `SeqAddrUpdate` is `false`, updates the `SequencerAddress`, and sets `SeqAddrUpdate` to `true`. Another attempt to update the storage item results in a panic. Then the `on_finalize` hook checks that the value is `true`, and does `.take()` on the value, so the storage item is again `false`.&#xD;&#xA;&#xD;&#xA;In the `build` function for `GenesisConfig` we initialize the value like so: &#xD;&#xA;```&#xD;&#xA;SeqAddrUpdate::&lt;T&gt;::put(self.seq_addr_updated);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 1. If the value is set to `true`, the inherent panics during block 1, but after the panic message, the chain keeps producing blocks. It makes sense, because the inherent expects to see `false`. Trace: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'Sequencer address can be updated only once in the block', /Users/lana/github/madara/crates/pallets/starknet/src/lib.rs:415&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;&#xD;&#xA;	support.anonymous.an&#xD;&#xA;&#xD;&#xA;2023-06-22 21:30:12 Evicting failed runtime instance error=Runtime panicked: Sequencer address can be updated only once in the block&#xD;&#xA;2023-06-22 21:30:12 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-22 21:30:12 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-22 21:30:12 ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Runtime panicked: Sequencer address can be updated only once in the block. Dropping.    &#xD;&#xA;2023-06-22 21:30:12  Prepared block for proposing at 1 (0 ms) [hash: 0x72f03e4de7c72b5d3faa03375e148fd9fbd491ca2d7335e3ebe3c7f1d256d208; parent_hash: 0x4bd0…0321; extrinsics (1)  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 2. But, if at genesis the value is set to `false`, the chain stalls completely, and we see both panics, even though they are supposed to exclude each other: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'Sequencer address must be set for the block', /Users/lana/github/madara/crates/pallets/starknet/src/lib.rs:167&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;&#xD;&#xA;	support.anonymous.an&#xD;&#xA;&#xD;&#xA;2023-06-22 21:58:48 Evicting failed runtime instance error=Runtime panicked: Sequencer address can be updated only once in the block&#xD;&#xA;2023-06-22 21:58:48 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-22 21:58:48 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-06-22 21:58:48 ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Runtime panicked: Sequencer address can be updated only once in the block. Dropping.    &#xD;&#xA;2023-06-22 21:58:48 Evicting failed runtime instance error=Runtime panicked: Sequencer address must be set for the block&#xD;&#xA;2023-06-22 21:58:48 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Runtime panicked: Sequencer address must be set for the block    &#xD;&#xA;2023-06-22 21:58:52  Idle (0 peers), best: #0 (0x169c…c26d), finalized #0 (0x169c…c26d), ⬇ 0 ⬆ 0  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So, we start with `true`, so the `on_finalize` hook does not fail at proposing block #1. In order to avoid the inherent panic, I added [a fix to the pallet](https://github.com/keep-starknet-strange/madara/blob/main/crates/pallets/starknet/src/lib.rs#L411), now we skip the inherent check for block 1, and start with block 2. So flow is block 1 `true` -&gt; finalize to `false`, block 2 `false` -&gt; inherent to `true` -&gt; finalize to `false`. &#xD;&#xA;&#xD;&#xA;Question: is this fix good? Why starting the hook and the inherent both at the start of the chain creates the panics? Thank you! " ContentLicense="CC BY-SA 4.0" />
  <row Id="35559" PostHistoryTypeId="1" PostId="9009" RevisionGUID="a37a5ee8-a529-4cd8-a6be-555217bfeeba" CreationDate="2023-06-22T20:25:05.657" UserId="4335" Text="Chain stalls because of inherent transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="35560" PostHistoryTypeId="3" PostId="9009" RevisionGUID="a37a5ee8-a529-4cd8-a6be-555217bfeeba" CreationDate="2023-06-22T20:25:05.657" UserId="4335" Text="|hook|inherent|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35561" PostHistoryTypeId="2" PostId="9010" RevisionGUID="c5ca313a-73de-48f2-8181-9ead59db85b3" CreationDate="2023-06-22T22:45:35.100" UserId="4353" Text="When upgrading our codebase on top of substrate's `polkadot-v0.9.42`, we discovered it is no longer possible to make nested request to `fn execute_in_transaction(call)`, from within the `call`.&#xD;&#xA;&#xD;&#xA;Given in `polkadot-v0.9.42`:&#xD;&#xA;```&#xD;&#xA;			fn execute_in_transaction&lt;F: FnOnce(&amp;Self) -&gt; #crate_::TransactionOutcome&lt;R&gt;, R&gt;(&#xD;&#xA;				&amp;self,&#xD;&#xA;				call: F,&#xD;&#xA;			) -&gt; R where Self: Sized {&#xD;&#xA;				self.start_transaction();&#xD;&#xA;&#xD;&#xA;				*std::cell::RefCell::borrow_mut(&amp;self.commit_on_success) = false;&#xD;&#xA;				let res = call(self);&#xD;&#xA;				*std::cell::RefCell::borrow_mut(&amp;self.commit_on_success) = true;&#xD;&#xA;&#xD;&#xA;				self.commit_or_rollback(std::matches!(res, #crate_::TransactionOutcome::Commit(_)));&#xD;&#xA;&#xD;&#xA;				res.into_inner()&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			fn start_transaction(&amp;self) {&#xD;&#xA;				if !*std::cell::RefCell::borrow(&amp;self.commit_on_success) {&#xD;&#xA;					return&#xD;&#xA;				}&#xD;&#xA;&#xD;&#xA;				#crate_::OverlayedChanges::start_transaction(&#xD;&#xA;					&amp;mut std::cell::RefCell::borrow_mut(&amp;self.changes)&#xD;&#xA;				);&#xD;&#xA;				if let Some(recorder) = &amp;self.recorder {&#xD;&#xA;					#crate_::ProofRecorder::&lt;Block&gt;::start_transaction(&amp;recorder);&#xD;&#xA;				}&#xD;&#xA;			}&#xD;&#xA;```&#xD;&#xA;We get:&#xD;&#xA;```&#xD;&#xA;execute_in_transaction {&#xD;&#xA;  start_transaction&#xD;&#xA;  commit_on_success = false&#xD;&#xA;  execute_in_transaction {&#xD;&#xA;    start_transaction &lt;- returns, no transaction created in overlay&#xD;&#xA;    res = ...&#xD;&#xA;    commit_on_success = true&#xD;&#xA;    commit_or_rollback(res) &lt;- closes the outer transaction&#xD;&#xA;  }&#xD;&#xA;  commit_on_success = true&#xD;&#xA;  commit_or_rollback(res) &lt;- fails on `NoOpenTransaction`&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Q1: Are these changes intentional to disallow such nested behaviour? Or is this something that might be supported in the future ?**&#xD;&#xA;&#xD;&#xA;The problem:&#xD;&#xA;In Mangata, transaction included into block `N` is executed in block `N+1` because of &#xD;&#xA;shuffling(VER prevention) mechanism. Instead of pushing extrinsics into the current block, we also build the next one, apply the extrinsics there, get the list of valid ones, and rollback the entire new block changes.&#xD;&#xA;&#xD;&#xA;eg.&#xD;&#xA;```&#xD;&#xA;authorship.propose {&#xD;&#xA;  ...&#xD;&#xA;  apply_previous_block_extrinsics&#xD;&#xA;  valid_txs = execute_in_transaction {&#xD;&#xA;    init_new_block&#xD;&#xA;    txs = []&#xD;&#xA;    for tx in tx_pool {&#xD;&#xA;      execute_in_transaction {&#xD;&#xA;        apply_extrinsic_with_context(tx)&#xD;&#xA;      } is OK ? txs.push(tx)&#xD;&#xA;    }&#xD;&#xA;	TransactionOutcome::Rollback(txs)&#xD;&#xA;  }&#xD;&#xA;  create_enqueue_txs_inherent(valid_txs)&#xD;&#xA;  continue building the block as usual...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Without modifying the `impl_runtime_apis`, our initial idea was to instantiate another `runtime_api()` and apply changes to both of them until the next block validation step. We would use the duplicate runtime api to verify a new block with trxs and just discard the changes.&#xD;&#xA;Such solution would have some performance implications having to apply changes twice.&#xD;&#xA;&#xD;&#xA;Ideally, we would imagine creating a disposable snapshot of the current runtime to validate next block execution against.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Q2: Are there currently any other substrate apis we could leverage to achieve our goal?** " ContentLicense="CC BY-SA 4.0" />
  <row Id="35563" PostHistoryTypeId="1" PostId="9010" RevisionGUID="c5ca313a-73de-48f2-8181-9ead59db85b3" CreationDate="2023-06-22T22:45:35.100" UserId="4353" Text="Nested runtime Api's `fn execute_in_transaction` calls no longer supported in v0.9.42?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35564" PostHistoryTypeId="3" PostId="9010" RevisionGUID="c5ca313a-73de-48f2-8181-9ead59db85b3" CreationDate="2023-06-22T22:45:35.100" UserId="4353" Text="|storage|runtime-api|transactional|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35566" PostHistoryTypeId="2" PostId="9011" RevisionGUID="28d43457-65bd-4336-8e74-cba610bc7bf9" CreationDate="2023-06-23T01:33:40.510" UserId="19" Text="I build some custom pallet and today I saw following warning while building my node and I would like to ask: only me has the warning?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    warning: some crates are on edition 2021 which defaults to `resolver = &quot;2&quot;`, but virtual workspaces default to `resolver = &quot;1&quot;`&#xD;&#xA;        note: to keep the current resolver, specify `workspace.resolver = &quot;1&quot;` in the workspace root's manifest&#xD;&#xA;        note: to use the edition 2021 resolver, specify `workspace.resolver = &quot;2&quot;` in the workspace root's manifest&#xD;&#xA;&#xD;&#xA;I ask because I want to avoid too much chaos while building.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35568" PostHistoryTypeId="1" PostId="9011" RevisionGUID="28d43457-65bd-4336-8e74-cba610bc7bf9" CreationDate="2023-06-23T01:33:40.510" UserId="19" Text="Warning: some crates are on edition 2021 which defaults to resolver = &quot;2&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35569" PostHistoryTypeId="3" PostId="9011" RevisionGUID="28d43457-65bd-4336-8e74-cba610bc7bf9" CreationDate="2023-06-23T01:33:40.510" UserId="19" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35570" PostHistoryTypeId="50" PostId="4460" RevisionGUID="2418c790-3f1c-4da6-8226-1adbe81fd4d6" CreationDate="2023-06-23T05:07:25.903" UserId="-1" />
  <row Id="35577" PostHistoryTypeId="2" PostId="9012" RevisionGUID="fd931177-8311-4681-acd3-1a6e8c383b3d" CreationDate="2023-06-23T09:08:20.897" UserId="2762" Text="You are right `transactionHash` is not unique, from the Polkadot wiki:&#xD;&#xA;&#xD;&#xA;&gt; Many infrastructure providers on existing blockchains, e.g. Ethereum, consider a transaction's hash as a unique identifier. In Substrate-based chains like Polkadot, a transaction's hash only serves as a fingerprint of the information within a transaction, and there are times when two transactions with the same hash are both valid.&#xD;&#xA;&#xD;&#xA;You can see a real example of 3 extrinsics with the same Hash in this previous StackEchange answer: [Why could we find the same transaction hash in 3 different blocks?][1].&#xD;&#xA;&#xD;&#xA;If you can't to see in which block has been included is a bit tricky. I can think on some options you can implement (I'd to see other people ideas in this question):&#xD;&#xA;&#xD;&#xA;The first one is to be monitoring **Events**, extrinsics can trigger events, so depending on your use case this can be enough. And for example is the [Transfer event][2], if you are monitoring the events you can see in which block has been included. Now if you have the the block number the solution is easy: [How do I view extrinsic information?][3] &#xD;&#xA; or [To get the extrinsic data from the extrinsic Hash][4].&#xD;&#xA;&#xD;&#xA;&gt; If you want to monitor deposits into an address, keep in mind that&#xD;&#xA;&gt; several transactions can initiate a balance transfer (such as&#xD;&#xA;&gt; balances.transferKeepAlive and a utility.batch transaction with a&#xD;&#xA;&gt; transfer inside of it). Only monitoring balances.transfer transactions&#xD;&#xA;&gt; will not be sufficient. Make sure that you monitor events in each&#xD;&#xA;&gt; block for events that contain your addresses of interest. Monitor&#xD;&#xA;&gt; events instead of transaction names to ensure that you can properly&#xD;&#xA;&gt; credit deposits.&#xD;&#xA;&#xD;&#xA;Another is to [**batch your transactions**][5], so in that case you improve a bit the waiting time (you don't need to wait each time you are sending a transaction).&#xD;&#xA;This was the solution on a very specific use case: [Best practices for generating and monitoring transactions][6].&#xD;&#xA;&#xD;&#xA;And finally (this is not 100% accurate) but you can **guess** when is going to be included, when you store your txHash:  `store_hash_in_db(txHash)` store the block you are right now, and later when you look for this transaction Hash you try to find the one that is closer to this txHash.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2536/why-could-we-find-the-same-transaction-hash-in-3-different-blocks/2538#2538&#xD;&#xA;  [2]: https://polkadot.js.org/docs/substrate/events/#transferaccountid32-accountid32-u128&#xD;&#xA;  [3]: https://polkadot.js.org/docs/api/cookbook/blocks/#how-do-i-view-extrinsic-information&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/626/to-get-the-extrinsic-data-from-the-extrinsic-hash/653#653&#xD;&#xA;  [5]: https://polkadot.js.org/docs/api/cookbook/tx/#how-can-i-batch-transactions&#xD;&#xA;  [6]: https://substrate.stackexchange.com/questions/6869/best-practices-for-generating-and-monitoring-transactions/6899#6899" ContentLicense="CC BY-SA 4.0" />
  <row Id="35579" PostHistoryTypeId="2" PostId="9013" RevisionGUID="329b89fb-e2d0-4c8c-84d1-e2e942a16470" CreationDate="2023-06-23T09:09:40.057" UserId="251" Text="I think there is something wrong with your call data.&#xD;&#xA;&#xD;&#xA;I don't know which client you are using.&#xD;&#xA;&#xD;&#xA;I guess you need to write something like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;RegistrarCall::register {&#xD;&#xA;    id: RococoId(para_id),&#xD;&#xA;    genesis_head: HeadData(genesis_head),&#xD;&#xA;    validation_code: ValidationCode(validation_code),&#xD;&#xA;}.encode()&#xD;&#xA;```&#xD;&#xA;Or&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;RegistrarCall::register {&#xD;&#xA;    id: RococoId(para_id).encode(),&#xD;&#xA;    genesis_head: HeadData(genesis_head).encode(),&#xD;&#xA;    validation_code: ValidationCode(validation_code).encode(),&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35581" PostHistoryTypeId="2" PostId="9014" RevisionGUID="6d27956c-84b8-4495-986b-aca77ad90f17" CreationDate="2023-06-23T09:34:24.407" UserId="73" Text="Just add the following to your workspace `Cargo.toml`:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[workspace]&#xD;&#xA;resolver = &quot;2&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[Here][1] are more information on this new resolver. You want this as crates of Substrate are requiring to use this resolver, otherwise you will see weird errors ;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2" ContentLicense="CC BY-SA 4.0" />
  <row Id="35583" PostHistoryTypeId="50" PostId="4970" RevisionGUID="6c6a9367-4308-4b11-8c7d-31f534caf101" CreationDate="2023-06-23T10:08:51.030" UserId="-1" />
  <row Id="35584" PostHistoryTypeId="50" PostId="8616" RevisionGUID="08f3e893-8dd9-4b81-b899-2969a785929b" CreationDate="2023-06-23T12:01:45.200" UserId="-1" />
  <row Id="35585" PostHistoryTypeId="2" PostId="9015" RevisionGUID="e22fbc84-21b3-48ba-b1e8-c6c2601f8601" CreationDate="2023-06-23T12:18:46.330" UserId="4354" Text="rustup target add wasm32-unknown-unknown &#xD;&#xA;&#xD;&#xA;try and enter this command worked for me&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35587" PostHistoryTypeId="2" PostId="9016" RevisionGUID="875293c3-1a97-4d11-9f50-d4da37abe08f" CreationDate="2023-06-23T12:48:56.757" UserId="386" Text="I've made some changes to my blockchain setup recently. I switched the signature over to EthereumSignature, which changed my AccountId to an H160 size. Thankfully, I can still use scripts to manage balances and move funds between accounts.&#xD;&#xA;&#xD;&#xA;I also set up four prefunded accounts on the dev node for testing. But here's where I hit a snag. Polkadot.js doesn't seem to be recognizing these prefunded dev accounts.&#xD;&#xA;&#xD;&#xA;Anyone else run into this or have any ideas on how to fix it? Any suggestions would be much appreciated!&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The 4 prefunded account are defined as such:&#xD;&#xA;```&#xD;&#xA;AccountId::from(hex!(&quot;f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac&quot;)),&#xD;&#xA;AccountId::from(hex!(&quot;3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0&quot;)),&#xD;&#xA;AccountId::from(hex!(&quot;798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc&quot;)),&#xD;&#xA;AccountId::from(hex!(&quot;773539d4Ac0e786233D90A233654ccEE26a613D9&quot;)),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bHhrJ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35589" PostHistoryTypeId="1" PostId="9016" RevisionGUID="875293c3-1a97-4d11-9f50-d4da37abe08f" CreationDate="2023-06-23T12:48:56.757" UserId="386" Text="Troubleshooting Polkadot.js Recognition of Prefunded Dev Accounts on a Network Using EthereumSignature" ContentLicense="CC BY-SA 4.0" />
  <row Id="35590" PostHistoryTypeId="3" PostId="9016" RevisionGUID="875293c3-1a97-4d11-9f50-d4da37abe08f" CreationDate="2023-06-23T12:48:56.757" UserId="386" Text="|polkadot-js|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35591" PostHistoryTypeId="5" PostId="9016" RevisionGUID="9c37aee0-4b65-4881-a798-a52e7723b731" CreationDate="2023-06-23T12:56:19.543" UserId="386" Comment="added 23 characters in body" Text="I've made some changes to my blockchain setup recently. I switched the signature over to EthereumSignature, which changed my AccountId to an H160 size. Thankfully, I can still use scripts to manage balances and move funds between accounts.&#xD;&#xA;&#xD;&#xA;I also set up four prefunded accounts on the dev node for testing. But here's where I hit a snag. Polkadot.js doesn't seem to be recognizing these prefunded dev accounts.&#xD;&#xA;&#xD;&#xA;Anyone else run into this or have any ideas on how to fix it? Any suggestions would be much appreciated!&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The 4 prefunded account are defined as such:&#xD;&#xA;```&#xD;&#xA;AccountId::from(hex!(&quot;f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac&quot;)),&#xD;&#xA;AccountId::from(hex!(&quot;3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0&quot;)),&#xD;&#xA;AccountId::from(hex!(&quot;798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc&quot;)),&#xD;&#xA;AccountId::from(hex!(&quot;773539d4Ac0e786233D90A233654ccEE26a613D9&quot;)),&#xD;&#xA;```&#xD;&#xA;What polkadot.js shows:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bHhrJ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35592" PostHistoryTypeId="2" PostId="9017" RevisionGUID="97aabf79-914b-4300-9dd3-a8155193d1e5" CreationDate="2023-06-23T13:03:52.980" UserId="165" Text="I believe that polkadot.js just show some well known keys in accounts when connecting to a development node, not necessarily the ones you have prefunded in your genesis config.&#xD;&#xA;&#xD;&#xA;I must be missing some details, but I think it works this way." ContentLicense="CC BY-SA 4.0" />
  <row Id="35594" PostHistoryTypeId="2" PostId="9018" RevisionGUID="7b008fb8-03b9-488a-a833-a3cf324af85b" CreationDate="2023-06-23T13:43:29.063" UserId="73" Text="The function `execute_in_transaction` was actually never written with nested transaction in mind. In the early implementation we did not even supported &quot;real&quot; transactions. But yeah the last years it was accidentally working with nested transactions until I broke it :P&#xD;&#xA;&#xD;&#xA;[This pull request][1] will support nested transactions officially :)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/14447" ContentLicense="CC BY-SA 4.0" />
  <row Id="35596" PostHistoryTypeId="50" PostId="8627" RevisionGUID="87a25e2a-3d1f-448a-be28-27de70115bcf" CreationDate="2023-06-23T16:03:05.360" UserId="-1" />
  <row Id="35597" PostHistoryTypeId="2" PostId="9019" RevisionGUID="81efb725-535d-4eb2-92e3-4b83925f8295" CreationDate="2023-06-23T18:08:43.403" UserId="4330" Text="I'm running a local relay for testing, which is all working great. The issue comes in when joining a parachain to the network - I can get as far as submitting an upload for the genesis state and WASM. It sits for a minute, goes through an epoch or two, but then I get an event called &quot;PvfCheckRejected&quot;.&#xD;&#xA;&#xD;&#xA;Reading through some issues on the Polkadot repository, I can find that this seems to occur when 2/3 validators are unable to process the uploaded WASM in a reasonable amount of time, but the runtime used to upload fine and other than an upgrade to polkadot-v0.9.43 we haven't changed anything. I've rebuilt the chain spec a few times and regenerated the WASM and genesis state, but we're still getting the same response. I doubt it's a problem with the relay chain spec, since the relay's validators are working perfectly, and I did just double-check to make sure the validation code matches the validation code found in the chain spec.&#xD;&#xA;&#xD;&#xA;I'm wondering if there's something I'm overlooking.&#xD;&#xA;&#xD;&#xA;Our chain spec is https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/plain-parachain-chainspec.json&#xD;&#xA;&#xD;&#xA;If it's helpful, the WASM for the runtime on that chain is located next to the chain spec at https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/para-1000-wasm" ContentLicense="CC BY-SA 4.0" />
  <row Id="35599" PostHistoryTypeId="1" PostId="9019" RevisionGUID="81efb725-535d-4eb2-92e3-4b83925f8295" CreationDate="2023-06-23T18:08:43.403" UserId="4330" Text="The given validation code was rejected by the PVF pre-checking vote" ContentLicense="CC BY-SA 4.0" />
  <row Id="35600" PostHistoryTypeId="3" PostId="9019" RevisionGUID="81efb725-535d-4eb2-92e3-4b83925f8295" CreationDate="2023-06-23T18:08:43.403" UserId="4330" Text="|parachain|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35601" PostHistoryTypeId="5" PostId="9019" RevisionGUID="66f53ebe-5bcb-4a0c-a0e3-b4064e13ccdc" CreationDate="2023-06-23T18:34:27.483" UserId="4330" Comment="added 170 characters in body" Text="I'm running a local relay for testing, which is all working great. The issue comes in when joining a parachain to the network - I can get as far as submitting an upload for the genesis state and WASM. It sits for a minute, goes through an epoch or two, but then I get an event called &quot;PvfCheckRejected&quot;.&#xD;&#xA;&#xD;&#xA;Reading through some issues on the Polkadot repository, I can find that this seems to occur when 2/3 validators are unable to process the uploaded WASM in a reasonable amount of time, but the runtime used to upload fine and other than an upgrade to polkadot-v0.9.43 we haven't changed anything. I've rebuilt the chain spec a few times and regenerated the WASM and genesis state, but we're still getting the same response. I doubt it's a problem with the relay chain spec, since the relay's validators are working perfectly, and I did just double-check to make sure the validation code matches the validation code found in the chain spec.&#xD;&#xA;&#xD;&#xA;I'm wondering if there's something I'm overlooking.&#xD;&#xA;&#xD;&#xA;Our chain spec is https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/plain-parachain-chainspec.json&#xD;&#xA;&#xD;&#xA;If it's helpful, the WASM for the runtime on that chain is located next to the chain spec at https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/para-1000-wasm&#xD;&#xA;&#xD;&#xA;Bootnode log with `-ldebug`: https://app.warp.dev/block/xQm8E0wWaMRIzXcVjff18V&#xD;&#xA;&#xD;&#xA;Main collator log with `-ldebug`:&#xD;&#xA;https://app.warp.dev/block/cPt2XzChSTVfrEuN2QlJst" ContentLicense="CC BY-SA 4.0" />
  <row Id="35602" PostHistoryTypeId="5" PostId="9019" RevisionGUID="b3572b8a-664f-42a2-89a8-78bf01e8215f" CreationDate="2023-06-23T19:01:14.800" UserId="4330" Comment="added 202 characters in body" Text="I'm running a local relay for testing, which is all working great. The issue comes in when joining a parachain to the network - I can get as far as submitting an upload for the genesis state and WASM. It sits for a minute, goes through an epoch or two, but then I get an event called &quot;PvfCheckRejected&quot;.&#xD;&#xA;&#xD;&#xA;Reading through some issues on the Polkadot repository, I can find that this seems to occur when 2/3 validators are unable to process the uploaded WASM in a reasonable amount of time, but the runtime used to upload fine and other than an upgrade to polkadot-v0.9.43 we haven't changed anything. I've rebuilt the chain spec a few times and regenerated the WASM and genesis state, but we're still getting the same response. I doubt it's a problem with the relay chain spec, since the relay's validators are working perfectly, and I did just double-check to make sure the validation code matches the validation code found in the chain spec.&#xD;&#xA;&#xD;&#xA;I'm wondering if there's something I'm overlooking.&#xD;&#xA;&#xD;&#xA;Our chain spec is https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/plain-parachain-chainspec.json&#xD;&#xA;&#xD;&#xA;If it's helpful, the WASM for the runtime on that chain is located next to the chain spec at https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/para-1000-wasm&#xD;&#xA;&#xD;&#xA;Bootnode runner script:https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/boot.sh&#xD;&#xA;&#xD;&#xA;Bootnode log with `-ldebug`: https://app.warp.dev/block/xQm8E0wWaMRIzXcVjff18V&#xD;&#xA;&#xD;&#xA;Main collator runner script: https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/collator-1.sh&#xD;&#xA;&#xD;&#xA;Main collator log with `-ldebug`:&#xD;&#xA;https://app.warp.dev/block/cPt2XzChSTVfrEuN2QlJst" ContentLicense="CC BY-SA 4.0" />
  <row Id="35603" PostHistoryTypeId="2" PostId="9020" RevisionGUID="675538ee-cbd7-4544-b940-86f46396a9d6" CreationDate="2023-06-23T19:19:27.537" UserId="3850" Text="I have a couple of questions related to sending XCM messages. More specifically, I am trying to send a message from an Astar node to the Polkadot relay chain. &#xD;&#xA;&#xD;&#xA;The XCM message contains the `Instruction::Transact` to target the [create nomination pool extrinsic](https://github.com/paritytech/polkadot/blob/7c1dc9429245d705ffb188b16ad5339c6de281c1/runtime/polkadot/src/xcm_config.rs#L293C39-L293C39) ([parameters](https://github.com/paritytech/substrate/blob/dc3fb3d4cf9efb779a068cdc201babc7ae2d233c/frame/nomination-pools/src/lib.rs#L2236) of the extrinsic in paritech/substrate).&#xD;&#xA;&#xD;&#xA;I am getting the following event in the Polkadot relay chain which contains the error **`AssetNotFound`**:&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;Does this error indicate that the target extrinsic itself was not found?&#xD;&#xA;&#xD;&#xA;And it is not clear to me how Polkadot can use Alice's currency `BSPY` since the account is in Astar and is not using `DOT`. How can Polkadot create a nomination pool using Alice's `BSPY` funds?&#xD;&#xA;[![enter image description here][2]][2] &#xD;&#xA;&#xD;&#xA;**Here is the [XCM code](https://github.com/ok-Alice/Astar/blob/liquid-staking/pallets/nomination-pools-staking/src/pallet/mod.rs#L219-L276) executed from Astar pallet extrinsic.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/EZ6Po.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/OZon7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35605" PostHistoryTypeId="1" PostId="9020" RevisionGUID="675538ee-cbd7-4544-b940-86f46396a9d6" CreationDate="2023-06-23T19:19:27.537" UserId="3850" Text="Error AssetNotFound - How to send XCM Instruction::Transact?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35606" PostHistoryTypeId="3" PostId="9020" RevisionGUID="675538ee-cbd7-4544-b940-86f46396a9d6" CreationDate="2023-06-23T19:19:27.537" UserId="3850" Text="|xcm|staking|astar|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35607" PostHistoryTypeId="5" PostId="9020" RevisionGUID="5afe2d20-065d-493a-bebe-78bb1a8e8b30" CreationDate="2023-06-23T19:37:16.250" UserId="3850" Comment="added 221 characters in body" Text="I have a couple of questions related to sending XCM messages. More specifically, I am trying to send a message from an Astar node to the Polkadot relay chain. &#xD;&#xA;&#xD;&#xA;The XCM message contains the `Instruction::Transact` to target the [create nomination pool extrinsic](https://github.com/paritytech/polkadot/blob/7c1dc9429245d705ffb188b16ad5339c6de281c1/runtime/polkadot/src/xcm_config.rs#L293C39-L293C39) ([parameters](https://github.com/paritytech/substrate/blob/dc3fb3d4cf9efb779a068cdc201babc7ae2d233c/frame/nomination-pools/src/lib.rs#L2236) of the extrinsic in paritech/substrate).&#xD;&#xA;&#xD;&#xA;I am getting the following event in the Polkadot relay chain which contains the error **`AssetNotFound`**:&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;Does this error indicate that the target extrinsic itself was not found?&#xD;&#xA;&#xD;&#xA;And it is not clear to me how Polkadot can use Alice's currency `BSPY` since the account is in Astar and is not using `DOT`. How can Polkadot create a nomination pool using Alice's `BSPY` funds?&#xD;&#xA;[![enter image description here][2]][2] &#xD;&#xA;&#xD;&#xA;I made sure as well that my type indexes matched the NominationPool pallet and create extrinsic [here](https://github.com/ok-Alice/Astar/blob/liquid-staking/pallets/nomination-pools-staking/src/pallet/mod.rs#L45-L61).&#xD;&#xA;&#xD;&#xA;**Here is the [XCM code](https://github.com/ok-Alice/Astar/blob/liquid-staking/pallets/nomination-pools-staking/src/pallet/mod.rs#L219-L276) executed from Astar pallet extrinsic.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/EZ6Po.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/OZon7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35608" PostHistoryTypeId="2" PostId="9021" RevisionGUID="fb7011d3-955d-42e6-890f-1000374ae80a" CreationDate="2023-06-23T19:42:41.393" UserId="181" Text="The issue was the error: &quot;ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1    &quot;&#xD;&#xA;This is resolved by registering the grandpa protocol correctly. " ContentLicense="CC BY-SA 4.0" />
  <row Id="35610" PostHistoryTypeId="2" PostId="9022" RevisionGUID="f7f7a133-f4b4-46cf-b01a-aeb00a6bd63e" CreationDate="2023-06-23T22:49:23.940" UserId="3142" Text="I can do this to get all the structs in my storage:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        let queryResult = await api.query.mypallet.mystorage.entries();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but I want this query AT a specific block hash:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;        let currentHeader = await api.rpc.chain.getHeader();&#xD;&#xA;        let currentBlockNumber = currentHeader.number;&#xD;&#xA;        let currentBlockHash = currentHeader.hash;&#xD;&#xA;        console.log(&quot;currentBlockNumber=&quot; + currentBlockNumber);&#xD;&#xA;        console.log(&quot;currentBlockHash=&quot; + currentBlockHash);&#xD;&#xA;&#xD;&#xA;        let queryResult = await api.query.mypallet.mystorage.entries(); // ??????????&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I do it?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35612" PostHistoryTypeId="1" PostId="9022" RevisionGUID="f7f7a133-f4b4-46cf-b01a-aeb00a6bd63e" CreationDate="2023-06-23T22:49:23.940" UserId="3142" Text="How to perform chain state query for entries AND at a block hash?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35613" PostHistoryTypeId="3" PostId="9022" RevisionGUID="f7f7a133-f4b4-46cf-b01a-aeb00a6bd63e" CreationDate="2023-06-23T22:49:23.940" UserId="3142" Text="|polkadot-js|query|block-hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35615" PostHistoryTypeId="2" PostId="9023" RevisionGUID="c279b90a-6316-4d95-887e-1084ddfb5199" CreationDate="2023-06-24T03:45:40.537" UserId="1905" Text="Did you try `await api.query.mypallet.mystorage.entriesAt(blockHash)`?&#xD;&#xA;&#xD;&#xA;The method `entriesAt` is defined [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/8282159f703a17d448c3bba8fa0ec5165209dfd6/packages/api/src/base/Decorate.ts#L739-L742" ContentLicense="CC BY-SA 4.0" />
  <row Id="35617" PostHistoryTypeId="2" PostId="9024" RevisionGUID="abd338f2-f99d-45a0-9c48-d70f940011ec" CreationDate="2023-06-24T08:58:37.170" UserId="4355" Text="I am currently in the process of integrating and testing the &quot;try-runtime&quot; feature on Starknet Madara.&#xD;&#xA;&#xD;&#xA;https://github.com/keep-starknet-strange/madara/pull/690&#xD;&#xA;&#xD;&#xA;However, I have encountered some challenges with the &quot;fast-forward&quot; sub-command. Specifically, I am receiving an error message stating &quot;ERROR main runtime: panicked at 'Timestamp slot must match `CurrentSlot`'&quot;, originating from aura.&#xD;&#xA;&#xD;&#xA;I would greatly appreciate any suggestions or insights regarding the potential cause of this issue, as well as guidance on how to resolve it.&#xD;&#xA;&#xD;&#xA;&gt; Commands and Traces used for execution:&#xD;&#xA;&#xD;&#xA;**live**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;export RPC_WS_URL=&quot;ws://127.0.0.1:9931&quot; &amp;&amp; \&#xD;&#xA;export CHAIN_SPEC=&quot;./crates/node/chain-specs/madara-local-cfg2-raw.json&quot; &amp;&amp; \&#xD;&#xA;RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace \&#xD;&#xA;cargo \&#xD;&#xA;    run \&#xD;&#xA;    --release \&#xD;&#xA;    --features=try-runtime \&#xD;&#xA;    --bin madara \&#xD;&#xA;    -- \&#xD;&#xA;    try-runtime \&#xD;&#xA;    --runtime existing \&#xD;&#xA;    --chain  &quot;$CHAIN_SPEC&quot; \&#xD;&#xA;    fast-forward \&#xD;&#xA;	--n-blocks=2 \&#xD;&#xA;	--try-state=all \&#xD;&#xA;    live \&#xD;&#xA;    --uri  &quot;$RPC_WS_URL&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&quot;ERROR main runtime: panicked at 'Timestamp slot must match `CurrentSlot`&quot;&#xD;&#xA;&#xD;&#xA;![](https://i.imgur.com/k7GW3Xb.png)&#xD;&#xA;&#xD;&#xA;**snap**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;export RPC_WS_URL=&quot;ws://127.0.0.1:9931&quot; &amp;&amp; \&#xD;&#xA;export SNAPSHOT_PATH=&quot;../000-01-install/madara-localnet.snap&quot; &amp;&amp; \&#xD;&#xA;export CHAIN_SPEC=&quot;./crates/node/chain-specs/madara-local-cfg2-raw.json&quot; &amp;&amp; \&#xD;&#xA;RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace \&#xD;&#xA;cargo \&#xD;&#xA;    run \&#xD;&#xA;    --release \&#xD;&#xA;    --features=try-runtime \&#xD;&#xA;    --bin madara \&#xD;&#xA;    -- \&#xD;&#xA;    try-runtime \&#xD;&#xA;    --runtime existing \&#xD;&#xA;    --chain  &quot;$CHAIN_SPEC&quot; \&#xD;&#xA;    fast-forward \&#xD;&#xA;	--block-ws-uri=&quot;$RPC_WS_URL&quot; \&#xD;&#xA;	--try-state=all \&#xD;&#xA;	--n-blocks=2 \&#xD;&#xA;    snap \&#xD;&#xA;    --snapshot-path &quot;$SNAPSHOT_PATH&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&quot;ERROR main runtime: panicked at 'Timestamp slot must match `CurrentSlot`&quot;&#xD;&#xA;&#xD;&#xA;![](https://i.imgur.com/lFMBlPP.png)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35619" PostHistoryTypeId="1" PostId="9024" RevisionGUID="abd338f2-f99d-45a0-9c48-d70f940011ec" CreationDate="2023-06-24T08:58:37.170" UserId="4355" Text="substrate | try-runtime | sub-command | &quot;fast-forward&quot; | &quot;ERROR main runtime: panicked at 'Timestamp slot must match `CurrentSlot`'&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35620" PostHistoryTypeId="3" PostId="9024" RevisionGUID="abd338f2-f99d-45a0-9c48-d70f940011ec" CreationDate="2023-06-24T08:58:37.170" UserId="4355" Text="|substrate-node|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35621" PostHistoryTypeId="2" PostId="9025" RevisionGUID="4ba8cc43-3d71-4a48-87cf-4d0268a21045" CreationDate="2023-06-24T10:33:13.327" UserId="4335" Text="Update: &#xD;&#xA;&#xD;&#xA;Replacing &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;assert!(!SeqAddrUpdate::&lt;T&gt;::exists(), &quot;Sequencer address can be updated only once in the block&quot;);&#xD;&#xA;                &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;with &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;assert!(SeqAddrUpdate::&lt;T&gt;::get() == false, &quot;Sequencer address can be updated only once in the block&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;solved the panics when starting both hook and inherent at the start with `false`. Before, with the `false` that was put into storage, the inherent panicked because it did not expect that a value exists in storage explicitly, so it panicked and didn't set it to `true`, `on_finalize` hook panicked because `.take()` expected that the value exists and is set to `true`. The first time the inherent can go through is after the `on_finalize` takes the value in block 1, so it's indeed OK to do the storage check on block 2. " ContentLicense="CC BY-SA 4.0" />
  <row Id="35623" PostHistoryTypeId="2" PostId="9026" RevisionGUID="f130dff7-3e14-441f-b3d3-9e74775ddaac" CreationDate="2023-06-24T14:03:30.210" UserId="94" Text="Yea some inherent from BABE or Aura errors out.  &#xD;&#xA;It is a known bug and tracked in [substrate#13831](https://github.com/paritytech/substrate/issues/13831)." ContentLicense="CC BY-SA 4.0" />
  <row Id="35629" PostHistoryTypeId="50" PostId="4908" RevisionGUID="ceb9c2d5-02ee-4933-9f20-8f16c4987541" CreationDate="2023-06-24T20:08:05.973" UserId="-1" />
  <row Id="35631" PostHistoryTypeId="34" PostId="8841" RevisionGUID="29cff8b2-0515-4d53-83e6-e4cdaf3061d6" CreationDate="2023-06-25T02:05:25.663" UserId="-1" Comment="23" />
  <row Id="35632" PostHistoryTypeId="2" PostId="9028" RevisionGUID="08267cd4-e46d-4dab-8704-661cd476a729" CreationDate="2023-06-25T04:13:37.657" UserId="359" Text="There is no recognition logic, just hardcoded values&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-js/common/blob/master/packages/keyring/src/testing.ts&#xD;&#xA;&#xD;&#xA;So you just should update the addresses of prefunded accounts to match the hardcoded pairs." ContentLicense="CC BY-SA 4.0" />
  <row Id="35634" PostHistoryTypeId="5" PostId="9024" RevisionGUID="988cbb23-0a34-4f3e-871b-03a604920884" CreationDate="2023-06-25T07:52:44.133" UserId="2281" Comment="added 4 characters in body" Text="I am currently in the process of integrating and testing the &quot;try-runtime&quot; feature on Starknet Madara.&#xD;&#xA;&#xD;&#xA;https://github.com/keep-starknet-strange/madara/pull/690&#xD;&#xA;&#xD;&#xA;However, I have encountered some challenges with the &quot;fast-forward&quot; sub-command. Specifically, I am receiving an error message stating &quot;ERROR main runtime: panicked at 'Timestamp slot must match `CurrentSlot`'&quot;, originating from aura.&#xD;&#xA;&#xD;&#xA;I would greatly appreciate any suggestions or insights regarding the potential cause of this issue, as well as guidance on how to resolve it.&#xD;&#xA;&#xD;&#xA;&gt; Commands and Traces used for execution:&#xD;&#xA;&#xD;&#xA;**live**&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;export RPC_WS_URL=&quot;ws://127.0.0.1:9931&quot; &amp;&amp; \&#xD;&#xA;export CHAIN_SPEC=&quot;./crates/node/chain-specs/madara-local-cfg2-raw.json&quot; &amp;&amp; \&#xD;&#xA;RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace \&#xD;&#xA;cargo \&#xD;&#xA;    run \&#xD;&#xA;    --release \&#xD;&#xA;    --features=try-runtime \&#xD;&#xA;    --bin madara \&#xD;&#xA;    -- \&#xD;&#xA;    try-runtime \&#xD;&#xA;    --runtime existing \&#xD;&#xA;    --chain  &quot;$CHAIN_SPEC&quot; \&#xD;&#xA;    fast-forward \&#xD;&#xA;	--n-blocks=2 \&#xD;&#xA;	--try-state=all \&#xD;&#xA;    live \&#xD;&#xA;    --uri  &quot;$RPC_WS_URL&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&quot;ERROR main runtime: panicked at 'Timestamp slot must match `CurrentSlot`&quot;&#xD;&#xA;&#xD;&#xA;![](https://i.imgur.com/k7GW3Xb.png)&#xD;&#xA;&#xD;&#xA;**snap**&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;export RPC_WS_URL=&quot;ws://127.0.0.1:9931&quot; &amp;&amp; \&#xD;&#xA;export SNAPSHOT_PATH=&quot;../000-01-install/madara-localnet.snap&quot; &amp;&amp; \&#xD;&#xA;export CHAIN_SPEC=&quot;./crates/node/chain-specs/madara-local-cfg2-raw.json&quot; &amp;&amp; \&#xD;&#xA;RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace \&#xD;&#xA;cargo \&#xD;&#xA;    run \&#xD;&#xA;    --release \&#xD;&#xA;    --features=try-runtime \&#xD;&#xA;    --bin madara \&#xD;&#xA;    -- \&#xD;&#xA;    try-runtime \&#xD;&#xA;    --runtime existing \&#xD;&#xA;    --chain  &quot;$CHAIN_SPEC&quot; \&#xD;&#xA;    fast-forward \&#xD;&#xA;	--block-ws-uri=&quot;$RPC_WS_URL&quot; \&#xD;&#xA;	--try-state=all \&#xD;&#xA;	--n-blocks=2 \&#xD;&#xA;    snap \&#xD;&#xA;    --snapshot-path &quot;$SNAPSHOT_PATH&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&quot;ERROR main runtime: panicked at 'Timestamp slot must match `CurrentSlot`&quot;&#xD;&#xA;&#xD;&#xA;![](https://i.imgur.com/lFMBlPP.png)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35635" PostHistoryTypeId="50" PostId="6883" RevisionGUID="071c4cbf-6530-4be7-b75c-436b6c1036bd" CreationDate="2023-06-25T13:04:00.427" UserId="-1" />
  <row Id="35636" PostHistoryTypeId="2" PostId="9029" RevisionGUID="49d84255-177b-47de-9d88-4167d8c003ac" CreationDate="2023-06-25T13:47:03.723" UserId="3850" Text="Solved this by changing the `MultiAsset` location to point to the target chain I would be executed the operation on. In this case, the location should be the Polkadot relay chain (parent). &#xD;&#xA;&#xD;&#xA;Changed from this:&#xD;&#xA;```&#xD;&#xA;calls.push(Instruction::WithdrawAsset((Here, 10_000_000u64).into()));&#xD;&#xA;calls.push(Instruction::BuyExecution {&#xD;&#xA;      fees: (Here, 10_000_000u64).into(),&#xD;&#xA;      weight_limit: xcm::v3::WeightLimit::Unlimited,&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;to this: &#xD;&#xA;```&#xD;&#xA;let location: MultiLocation = MultiLocation {&#xD;&#xA;    parents: 1,&#xD;&#xA;    interior: Here,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;calls.push(Instruction::WithdrawAsset((location, 10_000_000u64).into()));&#xD;&#xA;calls.push(Instruction::BuyExecution {&#xD;&#xA;      fees: (location, 10_000_000u64).into(),&#xD;&#xA;      weight_limit: xcm::v3::WeightLimit::Unlimited,&#xD;&#xA;});&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35638" PostHistoryTypeId="5" PostId="9029" RevisionGUID="540f605d-8733-45a2-a1be-b750b7cfe772" CreationDate="2023-06-25T13:53:41.037" UserId="3850" Comment="added 8 characters in body" Text="Solved this by changing the `MultiAsset` location to point to the target chain I would be executed the operation on. In this case, the location should be the Polkadot relay chain (parent). &#xD;&#xA;&#xD;&#xA;Changed from this:&#xD;&#xA;```rust&#xD;&#xA;calls.push(Instruction::WithdrawAsset((Here, 10_000_000u64).into()));&#xD;&#xA;calls.push(Instruction::BuyExecution {&#xD;&#xA;      fees: (Here, 10_000_000u64).into(),&#xD;&#xA;      weight_limit: xcm::v3::WeightLimit::Unlimited,&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;to this: &#xD;&#xA;```rust&#xD;&#xA;let location: MultiLocation = MultiLocation {&#xD;&#xA;    parents: 1,&#xD;&#xA;    interior: Here,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;calls.push(Instruction::WithdrawAsset((location, 10_000_000u64).into()));&#xD;&#xA;calls.push(Instruction::BuyExecution {&#xD;&#xA;      fees: (location, 10_000_000u64).into(),&#xD;&#xA;      weight_limit: xcm::v3::WeightLimit::Unlimited,&#xD;&#xA;});&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35639" PostHistoryTypeId="2" PostId="9030" RevisionGUID="a3a7cccb-5283-440f-ba8d-3ca00d3bca44" CreationDate="2023-06-25T14:03:45.667" UserId="4348" Text="Finally figured it out after trying all the options, running this helps rebuild the dependencies for rocksdb&#xD;&#xA;```pacman -U https://archive.archlinux.org/packages/g/gcc/gcc-12.2.1-4-x86_64.pkg.tar.zst https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-12.2.1-4-x86_64.pkg.tar.zst ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35641" PostHistoryTypeId="5" PostId="8794" RevisionGUID="ff10a622-797b-4caa-97be-36c8c8053825" CreationDate="2023-06-25T14:09:23.640" UserId="116" Comment="Spelling cant -&gt; can't" Text="&gt; Also, why do you have 1 !drip request quota on your faucet?&#xD;&#xA;&#xD;&#xA;This is to prevent hoarding and attacks against the network.&#xD;&#xA;&#xD;&#xA;&gt; I find it hard to test with all this blockers you set in place.&#xD;&#xA;&gt; They're slowing me down. &#xD;&#xA;&gt; This is so anticlimactic.&#xD;&#xA;&#xD;&#xA;You can test a lot with a few WND. Note that you can drip the faucet daily.&#xD;&#xA;&#xD;&#xA;&gt; I want to mint some meme coins on Westmint which I'll later implement on Polkadot. I can't do it because you make it hard for testers to do so. I can't get $WND tokens! &#xD;&#xA;&#xD;&#xA;Yes, you can request that and you will get them.&#xD;&#xA;&#xD;&#xA;&gt; Can you send me 50 $WND pls?&#xD;&#xA;&#xD;&#xA;Sure but for that you'd need to provide an address!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35642" PostHistoryTypeId="24" PostId="8794" RevisionGUID="ff10a622-797b-4caa-97be-36c8c8053825" CreationDate="2023-06-25T14:09:23.640" Comment="Proposed by 116 approved by 2281, 198 edit id of 485" ContentLicense="CC BY-SA 4.0" />
  <row Id="35643" PostHistoryTypeId="2" PostId="9031" RevisionGUID="959dc654-a5b3-4051-92db-954f8218f456" CreationDate="2023-06-25T14:28:21.250" UserId="3850" Text="I am getting the XCM error [`WeightNotComputable`](https://github.com/paritytech/polkadot/blob/75a1bf47bd04c15be230bb09bb2c3d79de3db8b8/xcm/src/v3/traits.rs#L155). What could be the cause of this? &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Here is the [XCM code](https://github.com/ok-Alice/Astar/blob/liquid-staking/pallets/nomination-pools-staking/src/pallet/mod.rs#L221-L275) which fails. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fAXDC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35645" PostHistoryTypeId="1" PostId="9031" RevisionGUID="959dc654-a5b3-4051-92db-954f8218f456" CreationDate="2023-06-25T14:28:21.250" UserId="3850" Text="Error WeightNotComputable - XCM Transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="35646" PostHistoryTypeId="3" PostId="9031" RevisionGUID="959dc654-a5b3-4051-92db-954f8218f456" CreationDate="2023-06-25T14:28:21.250" UserId="3850" Text="|parachain|xcm|weight|error|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35647" PostHistoryTypeId="2" PostId="9032" RevisionGUID="82fe9063-0737-42b4-aa74-9cd2a4c717de" CreationDate="2023-06-25T14:47:58.530" UserId="2163" Text="I have two ink! contracts and one of those contracts is making calls to the other one using a `CallBuilder`.&#xD;&#xA;&#xD;&#xA;I want to test that with `e2e` ink! tests and I am running into a problem.&#xD;&#xA;&#xD;&#xA;For reference, one of the contracts is called `Identity` while the other one is called `AddressBook`.&#xD;&#xA;&#xD;&#xA;The `AddressBook` contract is calling the `Identity` contract. The `e2e` test is in the `AddressBook` contract code.&#xD;&#xA;&#xD;&#xA;The following `e2e` successfully compiles as far as there are no events in the `AddressBook` contract:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;mod e2e_tests {&#xD;&#xA;	use super::AddressBookRef;&#xD;&#xA;	use ink_e2e::build_message;&#xD;&#xA;	use identity::IdentityRef;&#xD;&#xA;&#xD;&#xA;	type E2EResult&lt;T&gt; = std::result::Result&lt;T, Box&lt;dyn std::error::Error&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	#[ink_e2e::test]&#xD;&#xA;	async fn add_identity_works(mut client: ink_e2e::Client&lt;C, E&gt;) -&gt; E2EResult&lt;()&gt; {&#xD;&#xA;		let identity_constructor = IdentityRef::new();&#xD;&#xA;&#xD;&#xA;		let identity_acc_id = client&#xD;&#xA;			.instantiate(&quot;identity&quot;, &amp;ink_e2e::alice(), identity_constructor, 0, None)&#xD;&#xA;			.await&#xD;&#xA;			.expect(&quot;instantiate failed&quot;)&#xD;&#xA;			.account_id;&#xD;&#xA;&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When events are defined in the address book contract I get the following error: &#xD;&#xA;```&#xD;&#xA;error[E0284]: type annotations needed&#xD;&#xA;   --&gt; contracts/address-book/lib.rs:116:15&#xD;&#xA;    |&#xD;&#xA;116 |             self.env().emit_event(AddressBookCreated { owner: caller });&#xD;&#xA;    |                        ^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = note: cannot satisfy `&lt;_ as ContractEventBase&gt;::Type == _`&#xD;&#xA;help: try using a fully qualified path to specify the expected types&#xD;&#xA;    |&#xD;&#xA;116 |             &lt;EnvAccess&lt;'_, DefaultEnvironment&gt; as EmitEvent&lt;C&gt;&gt;::emit_event::&lt;address_book::AddressBookCreated&gt;(self.env(), AddressBookCreated { owner: caller });&#xD;&#xA;    |             ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          ~&#xD;&#xA;&#xD;&#xA;error[E0283]: type annotations needed&#xD;&#xA;   --&gt; contracts/address-book/lib.rs:116:15&#xD;&#xA;    |&#xD;&#xA;116 |             self.env().emit_event(AddressBookCreated { owner: caller });&#xD;&#xA;    |                        ^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;note: multiple `impl`s satisfying `EnvAccess&lt;'_, DefaultEnvironment&gt;: EmitEvent&lt;_&gt;` found&#xD;&#xA;   --&gt; contracts/address-book/lib.rs:33:1&#xD;&#xA;    |&#xD;&#xA;33  | #[ink::contract]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^&#xD;&#xA;    = note: and another `impl` found in the `identity` crate: `impl&lt;'a&gt; EmitEvent&lt;identity::Identity&gt; for EnvAccess&lt;'a, &lt;identity::Identity as ContractEnv&gt;::Env&gt;;`&#xD;&#xA;    = note: this error originates in the attribute macro `ink::contract` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: try using a fully qualified path to specify the expected types&#xD;&#xA;    |&#xD;&#xA;116 |             &lt;EnvAccess&lt;'_, DefaultEnvironment&gt; as EmitEvent&lt;C&gt;&gt;::emit_event::&lt;address_book::AddressBookCreated&gt;(self.env(), AddressBookCreated { owner: caller });&#xD;&#xA;    |             ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          ~&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I fix this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35649" PostHistoryTypeId="1" PostId="9032" RevisionGUID="82fe9063-0737-42b4-aa74-9cd2a4c717de" CreationDate="2023-06-25T14:47:58.530" UserId="2163" Text="Cross Contract e2e test type annotation needed for events" ContentLicense="CC BY-SA 4.0" />
  <row Id="35650" PostHistoryTypeId="3" PostId="9032" RevisionGUID="82fe9063-0737-42b4-aa74-9cd2a4c717de" CreationDate="2023-06-25T14:47:58.530" UserId="2163" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35651" PostHistoryTypeId="2" PostId="9033" RevisionGUID="6021fc58-2d7d-4f09-8564-52fb222fbf64" CreationDate="2023-06-25T16:09:21.057" UserId="372" Text="Apps actually does have a dedicated set of ethereum-style dev accounts and it does know how to make ethereum-style signatures. The tricky part is that it only enables this feature on a few hard-coded chain spec names.&#xD;&#xA;&#xD;&#xA;Check out https://github.com/polkadot-js/apps/blob/e55b9fc67b0dc1f36f2123948fb4a8f18cdc7a38/packages/apps-config/src/settings/ethereumChains.ts#L4 for the hard-coded list.&#xD;&#xA;&#xD;&#xA;If you are building a production chain, you could open a PR to add your spec name to that list. But if you are just developing and experimenting, you could consider changing your spec name to one that is already on the list. I used `frontier-template` and now Apps is working for me!&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I would love it if there were some way to manually tell Apps to use the ethereum-style signatures and accounts. I've opened a feature request for that here https://github.com/polkadot-js/apps/issues/9632&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XTvgi.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35653" PostHistoryTypeId="2" PostId="9034" RevisionGUID="e154ca8d-8a13-4426-b843-ac2c6895ccfd" CreationDate="2023-06-25T16:57:06.820" UserId="4359" Text="Solang is a solidity compiler that compiles to the wasm pallet. In Solang's CLI, there are options to configure the target parachain address length and value length. What I want to add is a feature that enables the user to specify the target parachain on a high level E.g. &quot;pallet-contract with version v0.22.1&quot;, &quot;shiden parachain&quot; or &quot;substrate version X.Y.Z&quot;, then generate the correct address length and value length accordingly. My question is, where do I find the mapping between the parachain name and these parameters as there is no mention of the required information in the parachains docs.&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35655" PostHistoryTypeId="1" PostId="9034" RevisionGUID="e154ca8d-8a13-4426-b843-ac2c6895ccfd" CreationDate="2023-06-25T16:57:06.820" UserId="4359" Text="I need a way to gather information about the address length and value length of each parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="35656" PostHistoryTypeId="3" PostId="9034" RevisionGUID="e154ca8d-8a13-4426-b843-ac2c6895ccfd" CreationDate="2023-06-25T16:57:06.820" UserId="4359" Text="|parachain|address|solidity|solang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35657" PostHistoryTypeId="5" PostId="9019" RevisionGUID="8faf8437-b6ce-4307-9c8e-70a99440dbfd" CreationDate="2023-06-25T23:13:52.180" UserId="4330" Comment="added 187 characters in body" Text="I'm running a local relay for testing, which is all working great. The issue comes in when joining a parachain to the network - I can get as far as submitting an upload for the genesis state and WASM. It sits for a minute, goes through an epoch or two, but then I get an event called &quot;PvfCheckRejected&quot;.&#xD;&#xA;&#xD;&#xA;Reading through some issues on the Polkadot repository, I can find that this seems to occur when 2/3 validators are unable to process the uploaded WASM in a reasonable amount of time, but the runtime used to upload fine and other than an upgrade to polkadot-v0.9.43 we haven't changed anything. I've rebuilt the chain spec a few times and regenerated the WASM and genesis state, but we're still getting the same response. I doubt it's a problem with the relay chain spec, since the relay's validators are working perfectly, and I did just double-check to make sure the validation code matches the validation code found in the chain spec.&#xD;&#xA;&#xD;&#xA;I'm wondering if there's something I'm overlooking.&#xD;&#xA;&#xD;&#xA;Our chain spec is https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/plain-parachain-chainspec.json&#xD;&#xA;&#xD;&#xA;If it's helpful, the WASM for the runtime on that chain is located next to the chain spec at https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/para-1000-wasm&#xD;&#xA;&#xD;&#xA;Bootnode runner script:https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/boot.sh&#xD;&#xA;&#xD;&#xA;Bootnode log with `-ldebug`: https://app.warp.dev/block/xQm8E0wWaMRIzXcVjff18V&#xD;&#xA;&#xD;&#xA;Main collator runner script: https://github.com/fennelLabs/Fennel-Protocol/blob/terraform/collator-1.sh&#xD;&#xA;&#xD;&#xA;Main collator log with `-ldebug`:&#xD;&#xA;https://app.warp.dev/block/cPt2XzChSTVfrEuN2QlJst&#xD;&#xA;&#xD;&#xA;The parachain does onboard successfully (but doesn't begin collating, but that's a different problem) if I use the dev accounts (Alice, Bob, Charlie) for the validators and collators." ContentLicense="CC BY-SA 4.0" />
  <row Id="35658" PostHistoryTypeId="2" PostId="9035" RevisionGUID="1f1a8d44-93df-471c-b2e8-ea8536c7124e" CreationDate="2023-06-25T23:13:59.930" UserId="318" Text="The command `substrate build-spec &gt; plain-chain-spec.json` used to generate a human readable version of the chain spec in json. To create the more stable machine friendly version of that chain spec one must call: `substrate build-spec --raw &gt; raw-chain-spec.json`. But now that I'm testing a node built on top of Polkadot 0.9.42, I'm observing that the output of the former command is also raw! How can the plain version is producible then?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35660" PostHistoryTypeId="1" PostId="9035" RevisionGUID="1f1a8d44-93df-471c-b2e8-ea8536c7124e" CreationDate="2023-06-25T23:13:59.930" UserId="318" Text="Building plain chain spec yields raw output" ContentLicense="CC BY-SA 4.0" />
  <row Id="35661" PostHistoryTypeId="3" PostId="9035" RevisionGUID="1f1a8d44-93df-471c-b2e8-ea8536c7124e" CreationDate="2023-06-25T23:13:59.930" UserId="318" Text="|chainspec|command|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35662" PostHistoryTypeId="2" PostId="9036" RevisionGUID="f1c6c688-b7ed-441c-a52b-f4bd83e0d3ee" CreationDate="2023-06-26T00:55:24.503" UserId="4330" Text="Thanks to the answer posted at https://substrate.stackexchange.com/a/5747/4330, I was able to determine that *I was missing private keys that should have been inserted.*&#xD;&#xA;&#xD;&#xA;Following the documentation, I knew I needed to insert the `babe` and `gran` keys, but missed the other 5 keys (`imon`, `para`, `asgn`, `audi`, `beef`) listed in that table. They were already in my chain spec, but needed to be specifically inserted by name. Once I inserted them, it works perfectly.&#xD;&#xA;&#xD;&#xA;From what I can tell, the PVF check runs before validation code is committed from a new parachain, and needs the `para` key inserted on every validator so they can sign their votes to accept or reject the parachain. That explains why validation worked perfectly but other pallets didn't." ContentLicense="CC BY-SA 4.0" />
  <row Id="35664" PostHistoryTypeId="5" PostId="9034" RevisionGUID="1d208ed8-2190-41b7-9b2a-9d6fe14a455f" CreationDate="2023-06-26T05:13:19.370" UserId="2281" Comment="added 10 characters in body" Text="Solang is a solidity compiler that compiles to the `wasm pallet`. In `Solang's CLI`, there are options to configure the target parachain address length and value length. What I want to add is a feature that enables the user to specify the target parachain on a high level `E.g. &quot;pallet-contract with version v0.22.1&quot;`, `&quot;shiden parachain&quot;` or `&quot;substrate version X.Y.Z&quot;`, then generate the correct address length and value length accordingly. My question is, where do I find the mapping between the parachain name and these parameters as there is no mention of the required information in the parachains docs.&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35666" PostHistoryTypeId="5" PostId="1284" RevisionGUID="7ad6b275-b50e-4768-bfc2-672f24c1388a" CreationDate="2023-06-26T05:26:26.917" UserId="116" Comment="command line options in code blocks" Text="Using `--dev` instead of `--chain dev` is a better option for these kinds of tests. The reason is `--dev` has an implicit `--tmp` which makes sure you don’t need to deal with the previous history of your development tests. It starts a fresh chain for you. In your case I’m afraid that while you’re running a new client with the benchmark features built-in, your runtime is still coming from your previous builds, meaning it doesn’t feature the benchmark option. This is because the runtime would only change on a runtime upgrade. But when you start a fresh dev blockchain the currently built runtime will be used as your runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="35667" PostHistoryTypeId="24" PostId="1284" RevisionGUID="7ad6b275-b50e-4768-bfc2-672f24c1388a" CreationDate="2023-06-26T05:26:26.917" Comment="Proposed by 116 approved by 2281, 354 edit id of 486" ContentLicense="CC BY-SA 4.0" />
  <row Id="35668" PostHistoryTypeId="5" PostId="109" RevisionGUID="fd3d831c-f6e9-4d26-b1f0-1717831920df" CreationDate="2023-06-26T05:27:31.223" UserId="3136" Comment="modify in body" Text="Each `parachain` has a `crowdloan account` when they conduct `crowdloans` for the purpose of winning a slot auction. How are these crowdloan accounts generated and does the `parachain` have the private keys to access the accounts on their `crowdloan accounts`? So can they submit extrinsics via the crowdloan account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35669" PostHistoryTypeId="24" PostId="109" RevisionGUID="fd3d831c-f6e9-4d26-b1f0-1717831920df" CreationDate="2023-06-26T05:27:31.223" Comment="Proposed by 3136 approved by 2281, 354 edit id of 483" ContentLicense="CC BY-SA 4.0" />
  <row Id="35670" PostHistoryTypeId="5" PostId="4908" RevisionGUID="2cbd6ba4-593b-4b09-8d70-7268c726a852" CreationDate="2023-06-26T05:30:15.303" UserId="354" Comment="added 8 characters in body" Text="web3Enable returns an array of all the injected sources/extensions. Is there any way to prevent it from prompting permissions for every installed extension and instead have it only throw out the one the user selects? I want the user to be able to choose from a list of extensions (like singular.app does it) without getting hit with unnecessary popups.&#xD;&#xA;&#xD;&#xA;    code Example:&#xD;&#xA;    const allInjected = await web3Enable('my cool dapp');" ContentLicense="CC BY-SA 4.0" />
  <row Id="35671" PostHistoryTypeId="2" PostId="9037" RevisionGUID="282ea3f5-6529-4258-9595-df23508f2fa9" CreationDate="2023-06-26T07:15:56.513" UserId="165" Text="For me, it worked locally just by removing everything related to `seq_addr_updated` from the genesis config and chainspec.rs.&#xD;&#xA;Plus removing your fix to start from block 1 instead of genesis." ContentLicense="CC BY-SA 4.0" />
  <row Id="35673" PostHistoryTypeId="5" PostId="42" RevisionGUID="e733c962-56aa-4621-bda0-f3e749ba0959" CreationDate="2023-06-26T09:06:47.480" UserId="139" Comment="added 6 characters in body" Text="In the pallet_babe config one can see the type `KeyOwnerProofSystem` as being set to Historical which is a reference to `pallet_session::historical`.&#xD;&#xA;&#xD;&#xA;What functions does a `KeyProofSystem` serve? What is it &quot;proving&quot; and for whom? " ContentLicense="CC BY-SA 4.0" />
  <row Id="35674" PostHistoryTypeId="2" PostId="9038" RevisionGUID="e1185624-c827-4ed7-8f34-edbb2e402c14" CreationDate="2023-06-26T09:44:39.240" UserId="4113" Text="I am running tests of my !ink smart contracts using `@727-ventures/typechain-polkadot` module.&#xD;&#xA;But when I am running tests, sometimes getting OutOfGas Error.&#xD;&#xA;The strange thing is that not all cases are failing.&#xD;&#xA;I tried to put `gasLimit` manually but didn't work.&#xD;&#xA;Here is the code for calling smart contract.&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const MAX_CALL_WEIGHT = new BN(5_000_000_000_000_000).isub(BN_ONE)&#xD;&#xA;const PROOFSIZE = new BN(1_000_000_000)&#xD;&#xA;const gasLimit = api?.registry.createType('WeightV2', {&#xD;&#xA;  refTime: MAX_CALL_WEIGHT,&#xD;&#xA;  proofSize: PROOFSIZE,&#xD;&#xA;}) as WeightV2&#xD;&#xA;&#xD;&#xA;const result = await contract.query.func(...args, { gasLimit })&#xD;&#xA;const gasRequired = preview.gasRequired as WeightV2&#xD;&#xA;const newGasLimit = api?.registry.createType('WeightV2', gasRequired) as WeightV2&#xD;&#xA;const res = await contract.tx.func(...args, { gasLimit: newGasLimit })&#xD;&#xA;```&#xD;&#xA;This code is running well sometimes but getting error sometimes." ContentLicense="CC BY-SA 4.0" />
  <row Id="35676" PostHistoryTypeId="1" PostId="9038" RevisionGUID="e1185624-c827-4ed7-8f34-edbb2e402c14" CreationDate="2023-06-26T09:44:39.240" UserId="4113" Text="Getting OutOfGas Error when trying to call smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="35677" PostHistoryTypeId="3" PostId="9038" RevisionGUID="e1185624-c827-4ed7-8f34-edbb2e402c14" CreationDate="2023-06-26T09:44:39.240" UserId="4113" Text="|ink|smart-contract|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35678" PostHistoryTypeId="2" PostId="9039" RevisionGUID="9c735c61-d9a0-473e-bc59-98516fc63dc1" CreationDate="2023-06-26T10:48:39.320" UserId="3667" Text="Trying to play around with `pallet-collective` and I see this : &#xD;&#xA;[![pallet collective length bound][1]][1]&#xD;&#xA;&#xD;&#xA;I have no clue what to set as a `lengthBound: Compact&lt;u32&gt;`. Bonus question: Why do proposers need to specify a lengthbound in the first place? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dBBYu.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35680" PostHistoryTypeId="1" PostId="9039" RevisionGUID="9c735c61-d9a0-473e-bc59-98516fc63dc1" CreationDate="2023-06-26T10:48:39.320" UserId="3667" Text="What is lengthBound for pallet colective proposal?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35681" PostHistoryTypeId="3" PostId="9039" RevisionGUID="9c735c61-d9a0-473e-bc59-98516fc63dc1" CreationDate="2023-06-26T10:48:39.320" UserId="3667" Text="|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35682" PostHistoryTypeId="5" PostId="8933" RevisionGUID="913b5761-0d1b-4a0a-9deb-181f6a74889e" CreationDate="2023-06-26T12:23:38.377" UserId="116" Comment="Spelling cant -&gt; can't" Text="We are using frontier with substrate to be able to deploy evm smart contract.&#xD;&#xA;When I create a transfer between two evm address and that the second one does not exist, the node create a new ss58 address, but I can't figure out what is the used algo? because it does not correspond to subkey is giving for example?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35683" PostHistoryTypeId="24" PostId="8933" RevisionGUID="913b5761-0d1b-4a0a-9deb-181f6a74889e" CreationDate="2023-06-26T12:23:38.377" Comment="Proposed by 116 approved by 2281, 2372 edit id of 484" ContentLicense="CC BY-SA 4.0" />
  <row Id="35684" PostHistoryTypeId="5" PostId="8808" RevisionGUID="0db70751-3a58-4d50-8a4b-2fca1e4ec29c" CreationDate="2023-06-26T12:31:43.227" UserId="2281" Comment="added 10 characters in body" Text="Do add `ConvertTransaction` and `TransactionConverter` in your `runtime/lib.rs`. And check in the trait `RuntimeApiCollection` of `Node/Client/lib.rs` that you have added or not" ContentLicense="CC BY-SA 4.0" />
  <row Id="35685" PostHistoryTypeId="2" PostId="9040" RevisionGUID="8fa4646d-3467-42d2-a91e-7244b21d35f7" CreationDate="2023-06-26T14:05:10.927" UserId="4247" Text="I have Alice, bob and so on accounts created by cumulus itself. However, account's have only 1 MUnit and I want to add more of them. I already tried !drip in faucet but that account is not added in my local rococo network." ContentLicense="CC BY-SA 4.0" />
  <row Id="35687" PostHistoryTypeId="1" PostId="9040" RevisionGUID="8fa4646d-3467-42d2-a91e-7244b21d35f7" CreationDate="2023-06-26T14:05:10.927" UserId="4247" Text="Add ROC token on local Rococo account created using cumulus" ContentLicense="CC BY-SA 4.0" />
  <row Id="35688" PostHistoryTypeId="3" PostId="9040" RevisionGUID="8fa4646d-3467-42d2-a91e-7244b21d35f7" CreationDate="2023-06-26T14:05:10.927" UserId="4247" Text="|cumulus|rococo-local|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35689" PostHistoryTypeId="2" PostId="9041" RevisionGUID="612e9bd2-e111-4741-8a5b-c5609b64911d" CreationDate="2023-06-26T15:35:58.223" UserId="1876" Text="Looking at the code you provided, couple of things needs to be modified:&#xD;&#xA;&#xD;&#xA;1) The line&#xD;&#xA;```&#xD;&#xA;const gasRequired = preview.gasRequired as WeightV2&#xD;&#xA;```&#xD;&#xA;should probably be &#xD;&#xA;```&#xD;&#xA;const gasRequired = result.gasRequired as WeightV2&#xD;&#xA;```&#xD;&#xA;But that can be destructured as well. &#xD;&#xA;&#xD;&#xA;2) As per the [docs][1], you should also include `storageDeposit` in the options&#xD;&#xA;&#xD;&#xA;3) Options should be the first parameter passed to the `.func` method&#xD;&#xA;&#xD;&#xA;Also, you don't need to create the type again, as `result.gasRequired` should be of the correct type already.&#xD;&#xA;&#xD;&#xA;So, something like this should work:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const MAX_CALL_WEIGHT = new BN(5_000_000_000_000_000).isub(BN_ONE);&#xD;&#xA;const PROOFSIZE = new BN(1_000_000_000);&#xD;&#xA;const gasLimit = api?.registry.createType('WeightV2', {&#xD;&#xA;  refTime: MAX_CALL_WEIGHT,&#xD;&#xA;  proofSize: PROOFSIZE,&#xD;&#xA;});&#xD;&#xA;const storageDepositLimit = null;&#xD;&#xA;const {storageDeposit, gasRequired} = await contract.query.func({ gasLimit, storageDepositLimit }, ...args);&#xD;&#xA;const res = await contract.tx.func({ gasLimit: gasRequired, storageDepositLimit: storageDeposit }, ...args);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api-contract/start/contract.tx" ContentLicense="CC BY-SA 4.0" />
  <row Id="35691" PostHistoryTypeId="52" PostId="9038" RevisionGUID="62b6abfc-c2df-4697-9eda-ed42668a06e8" CreationDate="2023-06-26T17:44:56.877" />
  <row Id="35692" PostHistoryTypeId="2" PostId="9042" RevisionGUID="31a24ec2-bef9-4dcf-a273-47aabffd00a3" CreationDate="2023-06-26T18:35:12.343" UserId="4330" Text="What eventually fixed this issue was an upgrade to the latest version of Polkadot. After the upgrade, and after the answer found in https://substrate.stackexchange.com/a/9036/4330, we're now collating properly." ContentLicense="CC BY-SA 4.0" />
  <row Id="35694" PostHistoryTypeId="2" PostId="9043" RevisionGUID="95b80f6c-a410-4965-a8bd-f5ff930b8245" CreationDate="2023-06-26T20:51:23.757" UserId="3407" Text="The `lengthBound` should be set to some value greater than the size of the encoded proposal. In practice, it should be fine to set it equal to or just above the encoded call data size. This can be found from the polkadot.js field `encoded call data` if you fill out the fields to submit the same extrinsic you want to submit via the council. It will be the length in bytes of the hex-encoded &quot;encoded call data&quot;.&#xD;&#xA;&#xD;&#xA;[![Encoded call data][1]][1]&#xD;&#xA;&#xD;&#xA;As to the question of why this is necessary, it's because the proposal may need to be stored before being voted on, and the manner in which it's passed into the pallet doesn't allow a quick lookup of the proposal's size. The weight of the submitted extrinsic needs to be able to be calculated cheaply, which means the user needs to submit this extra data, which is then checked during execution.&#xD;&#xA;&#xD;&#xA;In an actual application, the frontend would always calculate this `lengthBound` behind the scenes before submitting an extrinsic, so it should come at no real usability cost.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3A6RV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35696" PostHistoryTypeId="5" PostId="2081" RevisionGUID="8594870e-39a4-4c8d-b610-5964632c7366" CreationDate="2023-06-26T20:51:24.940" UserId="29" Comment="fix broken link" Text="[This](https://docs.substrate.io/design/decide-what-to-build) article has quite a few strong points between smart contract vs runtime development.&#xD;&#xA;&#xD;&#xA;&gt; It aims to provide insight on reasons for choosing smart contract development over runtime development for your on-chain logic.&#xD;&#xA;&#xD;&#xA;The Polkadot wiki has some notes on this:&#xD;&#xA;- https://wiki.polkadot.network/docs/build-smart-contracts&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35697" PostHistoryTypeId="33" PostId="8953" RevisionGUID="262a9e43-0a9c-4c0e-bc09-2434e91311a9" CreationDate="2023-06-26T22:52:06.417" UserId="4342" Comment="25" />
  <row Id="35699" PostHistoryTypeId="4" PostId="9039" RevisionGUID="7392ffbf-74e0-4495-a172-5eed9d93b9ad" CreationDate="2023-06-27T09:19:18.913" UserId="2281" Comment="edited title" Text="What is lengthBound for pallet collective proposal?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35700" PostHistoryTypeId="2" PostId="9044" RevisionGUID="2cdd1ebd-c1ef-4f52-8e23-0819fff141c9" CreationDate="2023-06-27T10:37:57.060" UserId="2163" Text="I am trying to create a local network natively. I followed the instructions from [here](https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet) and I am running into a problem.&#xD;&#xA;&#xD;&#xA;I built Polkadot and the substrate parachain template by running: `cargo build --release`&#xD;&#xA;&#xD;&#xA;I copied the `config.toml` file and run: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;zombienet-macos -p native spawn config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I run the command it initially looks like everything is working fine but at the end I get a pretty unclear error.&#xD;&#xA;&#xD;&#xA;The logs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;╔════════════════════╤════════════════════════════════════════════════════════════════════════════════════════════════════╗&#xD;&#xA;║  Zombienet     │ Initiation                                                                                         ║&#xD;&#xA;╟────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────╢&#xD;&#xA;║ Provider           │ native                                                                                             ║&#xD;&#xA;╟────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────╢&#xD;&#xA;║ Namespace          │ zombie-2a6e1b30d94f3d512696cfc8eb81be8b                                                            ║&#xD;&#xA;╟────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────╢&#xD;&#xA;║ Temp Dir           │ /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-m… ║&#xD;&#xA;╚════════════════════╧════════════════════════════════════════════════════════════════════════════════════════════════════╝&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp                                                                                               │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/polkadot-v0.9.37 build-spec --chain rococo-local --disable-default-boot              │&#xD;&#xA;│                    │ node &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb8         │&#xD;&#xA;│                    │ 1be8b_-62430-mjm71GiqpijY/cfg/rococo-local-plain.json                                              │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp                                                                           │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Starting with a fresh authority set...                                                                              │&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ alice              │ 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY                     │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ bob                │ 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc                     │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ charlie            │ 5Ck5SLSHYac6WFt5UZRSsdJjwmpSZq85fd5TRNAdZQVzEAPT                     │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ dave               │ 5HKPmK9GYtE1PSLsS1qiYU9xQ9Si1NcEhdeCq9sw5bqu4ns8                     │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-1                                                                                             │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 build-spec  --disable-default-bootnode               │&#xD;&#xA;│                    │ &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b         │&#xD;&#xA;│                    │ _-62430-mjm71GiqpijY/cfg/rococo-local-plain.json                                                   │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-1                                                                         │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Starting with a fresh authority set...                                                                              │&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ parac              │ 5FRLoYYZKfkttHNnrHVgWq99Mawjucq6BtKjnk33hxTn3fq2                     │&#xD;&#xA;│                              │ hain-1000-         │                                                                      │&#xD;&#xA;│                              │ collator          │                                                                      │&#xD;&#xA;│                              │ 0m                 │                                                                      │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added CollatorSelection   │ parac              │ 5DkrxSirabpHmXuqBe5p5ufjsVpo7sxHLTEKtk1NshXfUJ84                     │&#xD;&#xA;│                              │ hain-1000-         │                                                                      │&#xD;&#xA;│                              │ collator          │                                                                      │&#xD;&#xA;│                              │ 0m                 │                                                                      │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-2                                                                                             │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 build-spec --chain /var/folders/07/snp6              │&#xD;&#xA;│                    │ b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1         │&#xD;&#xA;│                    │ 000-rococo-local-plain.json --disable-default-bootnode  --raw &gt; /var/folders/07/snp6b9qn5f         │&#xD;&#xA;│                    │ x3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1000-ro         │&#xD;&#xA;│                    │ coco-local-raw.json                                                                                │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-2                                                                         │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-collator                                                                                      │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 export-genesis-state --chain /var/folde              │&#xD;&#xA;│                    │ rs/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm7         │&#xD;&#xA;│                    │ 1GiqpijY/1000-rococo-local.json &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-         │&#xD;&#xA;│                    │ 2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/cfg/genesis-state &amp;&amp; ./bin/parachain-         │&#xD;&#xA;│                    │ template-node-v0.9.37 export-genesis-wasm --chain /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc         │&#xD;&#xA;│                    │ 0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1000-rococo-local.jso         │&#xD;&#xA;│                    │ n &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be         │&#xD;&#xA;│                    │ 8b_-62430-mjm71GiqpijY/cfg/genesis-wasm                                                            │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-collator                                                                  │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-3                                                                                             │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 build-spec  --disable-default-bootnode               │&#xD;&#xA;│                    │ &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b         │&#xD;&#xA;│                    │ _-62430-mjm71GiqpijY/cfg/rococo-local-plain.json                                                   │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-3                                                                         │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Starting with a fresh authority set...                                                                              │&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ parac              │ 5Eemri42rj8zTkGdHa7HG7fH8xGrMjhGGEHvQeAQRfknkP35                     │&#xD;&#xA;│                              │ hain-1001-         │                                                                      │&#xD;&#xA;│                              │ collator          │                                                                      │&#xD;&#xA;│                              │ 0m                 │                                                                      │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added CollatorSelection   │ parac              │ 5DXpDP1yS6vHCk4PANb7nLKNuLkziZbBVeG8EBtkcwTGF4BG                     │&#xD;&#xA;│                              │ hain-1001-         │                                                                      │&#xD;&#xA;│                              │ collator          │                                                                      │&#xD;&#xA;│                              │ 0m                 │                                                                      │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-4                                                                                             │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 build-spec --chain /var/folders/07/snp6              │&#xD;&#xA;│                    │ b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1         │&#xD;&#xA;│                    │ 001-rococo-local-plain.json --disable-default-bootnode  --raw &gt; /var/folders/07/snp6b9qn5f         │&#xD;&#xA;│                    │ x3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1001-ro         │&#xD;&#xA;│                    │ coco-local-raw.json                                                                                │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-4                                                                         │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-collator-1                                                                                    │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 export-genesis-state --chain /var/folde              │&#xD;&#xA;│                    │ rs/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm7         │&#xD;&#xA;│                    │ 1GiqpijY/1001-rococo-local.json &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-         │&#xD;&#xA;│                    │ 2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/cfg/genesis-state &amp;&amp; ./bin/parachain-         │&#xD;&#xA;│                    │ template-node-v0.9.37 export-genesis-wasm --chain /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc         │&#xD;&#xA;│                    │ 0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1001-rococo-local.jso         │&#xD;&#xA;│                    │ n &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be         │&#xD;&#xA;│                    │ 8b_-62430-mjm71GiqpijY/cfg/genesis-wasm                                                            │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-collator-1                                                                │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;&#xD;&#xA; ✓ Added Genesis Parachain 1000&#xD;&#xA;&#xD;&#xA; ✓ Added Genesis Parachain 1001&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-5                                                                                             │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/polkadot-v0.9.37 build-spec --chain /var/folders/07/snp6b9qn5fx3tvnw19z              │&#xD;&#xA;│                    │ hp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/rococo-local-pla         │&#xD;&#xA;│                    │ in.json --disable-default-bootnode  --raw &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn         │&#xD;&#xA;│                    │ /T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/rococo-local-raw.json               │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-5                                                                         │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗&#xD;&#xA;║ Chain name: Rococo Local Testnet                                                                                       ║&#xD;&#xA;╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Rococo Local Testnet ⚙ Clear Boot Nodes                                                                                │&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ alice                                                                                              │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ ./bin/polkadot-v0.9.37 --chain /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombi              │&#xD;&#xA;│                    │ e-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/alice/cfg/rococo-local.json --name          │&#xD;&#xA;│                    │ alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lpar         │&#xD;&#xA;│                    │ achain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db         │&#xD;&#xA;│                    │ 186d6e90 --no-telemetry --prometheus-external --validator --prometheus-port 55576 --rpc-po         │&#xD;&#xA;│                    │ rt 55575 --ws-port 55574 --listen-addr /ip4/0.0.0.0/tcp/55573/ws --base-path /var/folders/         │&#xD;&#xA;│                    │ 07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71Gi         │&#xD;&#xA;│                    │ qpijY/alice/data                                                                                   │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;dError: Timeout(60) for node : alice&#xD;&#xA;    at NativeClient.&lt;anonymous&gt; (/snapshot/javascript/packages/orchestrator/dist/providers/native/nativeClient.js)&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at fulfilled (/snapshot/javascript/packages/orchestrator/dist/providers/native/nativeClient.js)&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Node'              │ /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-m… │&#xD;&#xA;│ s logs:            │                                                                                                    │&#xD;&#xA;│ m                  │                                                                                                    │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;Error: Command failed with exit code 1: /bin/bash -c kill -9 62452&#xD;&#xA;/bin/bash: line 0: kill: (62452) - No such process&#xD;&#xA;    at makeError (/snapshot/javascript/node_modules/execa/lib/error.js:60:11)&#xD;&#xA;    at handlePromise (/snapshot/javascript/node_modules/execa/index.js:118:26)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5) {&#xD;&#xA;  shortMessage: 'Command failed with exit code 1: /bin/bash -c kill -9 62452',&#xD;&#xA;  command: '/bin/bash -c kill -9 62452',&#xD;&#xA;  escapedCommand: '&quot;/bin/bash&quot; -c &quot;kill -9 62452&quot;',&#xD;&#xA;  exitCode: 1,&#xD;&#xA;  signal: undefined,&#xD;&#xA;  signalDescription: undefined,&#xD;&#xA;  stdout: '',&#xD;&#xA;  stderr: '/bin/bash: line 0: kill: (62452) - No such process',&#xD;&#xA;  failed: true,&#xD;&#xA;  timedOut: false,&#xD;&#xA;  isCanceled: false,&#xD;&#xA;  killed: false&#xD;&#xA;}&#xD;&#xA;UnhandledRejection: Error: Command failed with exit code 1: /bin/bash -c kill -9 62452&#xD;&#xA;/bin/bash: line 0: kill: (62452) - No such process&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35702" PostHistoryTypeId="1" PostId="9044" RevisionGUID="2cdd1ebd-c1ef-4f52-8e23-0819fff141c9" CreationDate="2023-06-27T10:37:57.060" UserId="2163" Text="Running a local network with zombienet doesn't work" ContentLicense="CC BY-SA 4.0" />
  <row Id="35703" PostHistoryTypeId="3" PostId="9044" RevisionGUID="2cdd1ebd-c1ef-4f52-8e23-0819fff141c9" CreationDate="2023-06-27T10:37:57.060" UserId="2163" Text="|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35704" PostHistoryTypeId="5" PostId="8848" RevisionGUID="0989dcbc-4614-44bd-8c94-0f3a9f22b5f4" CreationDate="2023-06-27T10:46:51.827" UserId="3136" Comment="modify in body" Text="I have a running chain which was on `polkadot-v0.9.30` and updated all the libraries on to `polkadot-v0.9.42`&#xD;&#xA;&#xD;&#xA;No error found while uploading but got error after updating&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The error originates from &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;/// Create a sensible default weights system given only expected maximal block weight and the&#xD;&#xA;	/// ratio that `Normal` extrinsics should occupy.&#xD;&#xA;	///&#xD;&#xA;	/// Assumptions:&#xD;&#xA;	///  - Average block initialization is assumed to be `10%`.&#xD;&#xA;	///  - `Operational` transactions have reserved allowance (`1.0 - normal_ratio`)&#xD;&#xA;	pub fn with_sensible_defaults(expected_block_weight: Weight, normal_ratio: Perbill) -&gt; Self {&#xD;&#xA;		let normal_weight = normal_ratio * expected_block_weight;&#xD;&#xA;		Self::builder()&#xD;&#xA;			.for_class(DispatchClass::Normal, |weights| {&#xD;&#xA;				weights.max_total = normal_weight.into();&#xD;&#xA;			})&#xD;&#xA;			.for_class(DispatchClass::Operational, |weights| {&#xD;&#xA;				weights.max_total = expected_block_weight.into();&#xD;&#xA;				weights.reserved = (expected_block_weight - normal_weight).into();&#xD;&#xA;			})&#xD;&#xA;			.avg_block_initialization(Perbill::from_percent(10))&#xD;&#xA;			.build()&#xD;&#xA;			.expect(&quot;Sensible defaults are tested to be valid; qed&quot;)&#xD;&#xA;```&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;2023-06-12 12:21:36 panicked at 'Sensible defaults are tested to be valid; qed: &lt;wasm:stripped&gt;', /dep/.cargo/git/checkouts/substrate-7e08433d4c370a21/569aae5/frame/system/src/limits.rs:325:9&#xD;&#xA;2023-06-12 12:21:36 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0xfa66b - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x2df7 - &lt;unknown&gt;!core::panicking::panic_fmt::h6d1629d4208ae76c&#xD;&#xA;    2: 0x3198 - &lt;unknown&gt;!core::result::unwrap_failed::h8ef12658cee03bf1&#xD;&#xA;    3: 0xe0dc - &lt;unknown&gt;!frame_system::limits::BlockWeights::with_sensible_defaults::hddec9606e207be2d&#xD;&#xA;    4: 0x70937 - &lt;unknown&gt;!&lt;pallet_scheduler::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnInitialize&lt;&lt;T as frame_system::pallet::Config&gt;::BlockNumber&gt;&gt;::on_initialize::h4b32587c5fd765a6&#xD;&#xA;    5: 0x91420 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hffb3eafa82bbd60b&#xD;&#xA;    6: 0xa66d5 - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue ? or is there any guidance around this ?&#xD;&#xA;&#xD;&#xA;[![Screemshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iMz6Y.jpg&#xD;&#xA;&#xD;&#xA;Changes made for version updates&#xD;&#xA; * sp_consensus_grandpa and sc_consensus_grandpa&#xD;&#xA; * removed `#[pallet::generate_store(pub(super) trait Store)]` since its no longer supporting&#xD;&#xA; * Added #[pallet::call_index()]&#xD;&#xA; * Changed `fn create_verifiable_credential() -&gt; Weight {&#xD;&#xA;		Weight::from_ref_time(10_000_000_u64)` to `fn revoke_did_document() -&gt; Weight {&#xD;&#xA;		Weight::from_parts(10_000_000_u64, 1600)&#xD;&#xA;	}`&#xD;&#xA;    &#xD;&#xA; * In runtime/build.rs changed to &#xD;&#xA; ```&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	{&#xD;&#xA;		substrate_wasm_builder::WasmBuilder::new()&#xD;&#xA;			.with_current_project()&#xD;&#xA;			.export_heap_base()&#xD;&#xA;			.import_memory()&#xD;&#xA;			.build();&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;Those were the some of significant changes&#xD;&#xA;&#xD;&#xA;Did not crash the process, update went smoothly , the error message keeps popping up and blocks are not finalising &#xD;&#xA;&#xD;&#xA;This question totally unrelated with https://substrate.stackexchange.com/questions/5557/construct-runtime-integrity-test-failing. since this does not occur in tests and happens after successful runtime update" ContentLicense="CC BY-SA 4.0" />
  <row Id="35705" PostHistoryTypeId="2" PostId="9045" RevisionGUID="341b719a-03c0-475a-87a8-3bcd3c247110" CreationDate="2023-06-27T10:50:14.713" UserId="4363" Text="The `IncomingBlock` struct has a field called `indexed_body`, containing a `Vec&lt;Vec&lt;u8&gt;&gt;`. As far as I can tell this is sometimes sent with a block, although only when specifically requested. If received in such a situation, the data is (afaict) put directly in the database, without any verification – common and aura import queues pass it on without checking, so does `Client` and later `BlockImportOperation`, so either the DB has some constraints or I missed something. There are methods to get it out of the DB, but they are mostly used to answer these requests.&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA;1. What is this used for? Is it possible that we don't use this in our chain?&#xD;&#xA;2. If we don't use it, is it safe to always ignore this field, i.e. never send it and discard if received?&#xD;&#xA;3. Does this really never get validated during import? If so, isn't there a possibility of filling someone's DB with junk through this mechanism?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35707" PostHistoryTypeId="1" PostId="9045" RevisionGUID="341b719a-03c0-475a-87a8-3bcd3c247110" CreationDate="2023-06-27T10:50:14.713" UserId="4363" Text="What exactly is `indexed_body` and how to deal with it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35708" PostHistoryTypeId="3" PostId="9045" RevisionGUID="341b719a-03c0-475a-87a8-3bcd3c247110" CreationDate="2023-06-27T10:50:14.713" UserId="4363" Text="|block|sync|block-import|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35709" PostHistoryTypeId="5" PostId="610" RevisionGUID="9f8fc2b9-6372-4c4a-a138-0a72562f1296" CreationDate="2023-06-27T12:11:26.910" UserId="3136" Comment="modify in body" Text="With not much `XCM` experience, I understand that with the `Transact` instruction one can call an `arbitrary extrinsic` in another chain passing the encoded `Call` which is specific to a particular chain(e.g. the index is based on the order of definition of the pallets).&#xD;&#xA;&#xD;&#xA;What I'd like to know, maybe for a future `XCM version` if not currently possible, is how to send generic instructions that are chain agnostic and don't depend on specific implementations, e.g. the common case of asset transfers that follow the `fungibles` interface. I believe there's already support for fungibles so one question is how does it work and another is how could we implement more of those &quot;standards&quot; easily." ContentLicense="CC BY-SA 4.0" />
  <row Id="35710" PostHistoryTypeId="24" PostId="610" RevisionGUID="9f8fc2b9-6372-4c4a-a138-0a72562f1296" CreationDate="2023-06-27T12:11:26.910" Comment="Proposed by 3136 approved by 2281, 354 edit id of 487" ContentLicense="CC BY-SA 4.0" />
  <row Id="35711" PostHistoryTypeId="5" PostId="9040" RevisionGUID="906b5f68-9a40-427a-beaa-249a9585c36a" CreationDate="2023-06-27T12:11:39.540" UserId="3136" Comment="correct the format of title and change in body" Text="I have Alice, bob and so on accounts created by `cumulus` itself. However, account's have only `1 MUnit` and I want to add more of them. I already tried !drip in faucet but that account is not added in my `local-rococo` network." ContentLicense="CC BY-SA 4.0" />
  <row Id="35712" PostHistoryTypeId="4" PostId="9040" RevisionGUID="906b5f68-9a40-427a-beaa-249a9585c36a" CreationDate="2023-06-27T12:11:39.540" UserId="3136" Comment="correct the format of title and change in body" Text="Added ROC token on local Rococo account created using cumulus" ContentLicense="CC BY-SA 4.0" />
  <row Id="35713" PostHistoryTypeId="24" PostId="9040" RevisionGUID="906b5f68-9a40-427a-beaa-249a9585c36a" CreationDate="2023-06-27T12:11:39.540" Comment="Proposed by 3136 approved by 2281, 354 edit id of 488" ContentLicense="CC BY-SA 4.0" />
  <row Id="35714" PostHistoryTypeId="5" PostId="516" RevisionGUID="a1fddb6b-5233-4543-a3ed-7335401a5e93" CreationDate="2023-06-27T12:11:47.307" UserId="3136" Comment="modify in body" Text="When I add [BitcoinDevKit](https://docs.rs/bdk/latest/bdk/index.html) as a dependency to the `pallet-template`, I get compilation errors within the `socks` crate that I don't get when compiling BDK standalone. It seems that BDK supports compilation to `WASM`, but I am not sure. &#xD;&#xA;&#xD;&#xA;Is it possible to use `BDK functionality` within a pallet? How can I satisfy these compilation errors? &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error[E0599]: no method named `writev` found for struct `UdpSocket` in the current scope&#xD;&#xA;     --&gt; /home/max/.cargo/registry/src/github.com-1ecc6299db9ec823/socks-0.3.4/src/v5.rs:391:21&#xD;&#xA;      |&#xD;&#xA;  391 |         self.socket.writev([&amp;header[..len + 3], buf])&#xD;&#xA;      |                     ^^^^^^ method not found in `UdpSocket`&#xD;&#xA;      |&#xD;&#xA;      = help: items from traits can only be used if the trait is implemented and in scope&#xD;&#xA;  note: `WritevExt` defines an item `writev`, perhaps you need to implement it&#xD;&#xA;     --&gt; /home/max/.cargo/registry/src/github.com-1ecc6299db9ec823/socks-0.3.4/src/writev.rs:4:1&#xD;&#xA;      |&#xD;&#xA;  4   | pub trait WritevExt {&#xD;&#xA;      | ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35715" PostHistoryTypeId="24" PostId="516" RevisionGUID="a1fddb6b-5233-4543-a3ed-7335401a5e93" CreationDate="2023-06-27T12:11:47.307" Comment="Proposed by 3136 approved by 2281, 354 edit id of 489" ContentLicense="CC BY-SA 4.0" />
  <row Id="35716" PostHistoryTypeId="2" PostId="9046" RevisionGUID="ae3a4a77-349c-44f0-a9fc-fbb88239478a" CreationDate="2023-06-27T12:47:50.307" UserId="372" Text="I worked around this issue by using rust 1.69 instead. Specifically I just added a `rust-toolchain` file with these contents:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;1.69.0&quot;&#xD;&#xA;components = [ &quot;rustfmt&quot;, &quot;clippy&quot;, &quot;rust-src&quot; ]&#xD;&#xA;targets = [ &quot;wasm32-unknown-unknown&quot; ]&#xD;&#xA;profile = &quot;minimal&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35718" PostHistoryTypeId="5" PostId="9044" RevisionGUID="7046a511-70d4-4187-920a-078e8357848e" CreationDate="2023-06-27T13:17:54.393" UserId="2163" Comment="added 1372 characters in body" Text="I am trying to create a local network natively. I followed the instructions from [here](https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet) and I am running into a problem.&#xD;&#xA;&#xD;&#xA;I built Polkadot and the substrate parachain template by running: `cargo build --release`&#xD;&#xA;&#xD;&#xA;I copied the `config.toml` file and run: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;zombienet-macos -p native spawn config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I run the command it initially looks like everything is working fine but at the end I get a pretty unclear error.&#xD;&#xA;&#xD;&#xA;The logs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;╔════════════════════╤════════════════════════════════════════════════════════════════════════════════════════════════════╗&#xD;&#xA;║  Zombienet     │ Initiation                                                                                         ║&#xD;&#xA;╟────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────╢&#xD;&#xA;║ Provider           │ native                                                                                             ║&#xD;&#xA;╟────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────╢&#xD;&#xA;║ Namespace          │ zombie-2a6e1b30d94f3d512696cfc8eb81be8b                                                            ║&#xD;&#xA;╟────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────╢&#xD;&#xA;║ Temp Dir           │ /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-m… ║&#xD;&#xA;╚════════════════════╧════════════════════════════════════════════════════════════════════════════════════════════════════╝&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp                                                                                               │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/polkadot-v0.9.37 build-spec --chain rococo-local --disable-default-boot              │&#xD;&#xA;│                    │ node &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb8         │&#xD;&#xA;│                    │ 1be8b_-62430-mjm71GiqpijY/cfg/rococo-local-plain.json                                              │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp                                                                           │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Starting with a fresh authority set...                                                                              │&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ alice              │ 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY                     │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ bob                │ 5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc                     │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ charlie            │ 5Ck5SLSHYac6WFt5UZRSsdJjwmpSZq85fd5TRNAdZQVzEAPT                     │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ dave               │ 5HKPmK9GYtE1PSLsS1qiYU9xQ9Si1NcEhdeCq9sw5bqu4ns8                     │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-1                                                                                             │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 build-spec  --disable-default-bootnode               │&#xD;&#xA;│                    │ &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b         │&#xD;&#xA;│                    │ _-62430-mjm71GiqpijY/cfg/rococo-local-plain.json                                                   │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-1                                                                         │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Starting with a fresh authority set...                                                                              │&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ parac              │ 5FRLoYYZKfkttHNnrHVgWq99Mawjucq6BtKjnk33hxTn3fq2                     │&#xD;&#xA;│                              │ hain-1000-         │                                                                      │&#xD;&#xA;│                              │ collator          │                                                                      │&#xD;&#xA;│                              │ 0m                 │                                                                      │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added CollatorSelection   │ parac              │ 5DkrxSirabpHmXuqBe5p5ufjsVpo7sxHLTEKtk1NshXfUJ84                     │&#xD;&#xA;│                              │ hain-1000-         │                                                                      │&#xD;&#xA;│                              │ collator          │                                                                      │&#xD;&#xA;│                              │ 0m                 │                                                                      │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-2                                                                                             │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 build-spec --chain /var/folders/07/snp6              │&#xD;&#xA;│                    │ b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1         │&#xD;&#xA;│                    │ 000-rococo-local-plain.json --disable-default-bootnode  --raw &gt; /var/folders/07/snp6b9qn5f         │&#xD;&#xA;│                    │ x3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1000-ro         │&#xD;&#xA;│                    │ coco-local-raw.json                                                                                │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-2                                                                         │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-collator                                                                                      │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 export-genesis-state --chain /var/folde              │&#xD;&#xA;│                    │ rs/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm7         │&#xD;&#xA;│                    │ 1GiqpijY/1000-rococo-local.json &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-         │&#xD;&#xA;│                    │ 2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/cfg/genesis-state &amp;&amp; ./bin/parachain-         │&#xD;&#xA;│                    │ template-node-v0.9.37 export-genesis-wasm --chain /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc         │&#xD;&#xA;│                    │ 0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1000-rococo-local.jso         │&#xD;&#xA;│                    │ n &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be         │&#xD;&#xA;│                    │ 8b_-62430-mjm71GiqpijY/cfg/genesis-wasm                                                            │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-collator                                                                  │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-3                                                                                             │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 build-spec  --disable-default-bootnode               │&#xD;&#xA;│                    │ &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b         │&#xD;&#xA;│                    │ _-62430-mjm71GiqpijY/cfg/rococo-local-plain.json                                                   │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-3                                                                         │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Starting with a fresh authority set...                                                                              │&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added Genesis Authority   │ parac              │ 5Eemri42rj8zTkGdHa7HG7fH8xGrMjhGGEHvQeAQRfknkP35                     │&#xD;&#xA;│                              │ hain-1001-         │                                                                      │&#xD;&#xA;│                              │ collator          │                                                                      │&#xD;&#xA;│                              │ 0m                 │                                                                      │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌──────────────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│  Added CollatorSelection   │ parac              │ 5DXpDP1yS6vHCk4PANb7nLKNuLkziZbBVeG8EBtkcwTGF4BG                     │&#xD;&#xA;│                              │ hain-1001-         │                                                                      │&#xD;&#xA;│                              │ collator          │                                                                      │&#xD;&#xA;│                              │ 0m                 │                                                                      │&#xD;&#xA;└──────────────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-4                                                                                             │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 build-spec --chain /var/folders/07/snp6              │&#xD;&#xA;│                    │ b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1         │&#xD;&#xA;│                    │ 001-rococo-local-plain.json --disable-default-bootnode  --raw &gt; /var/folders/07/snp6b9qn5f         │&#xD;&#xA;│                    │ x3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1001-ro         │&#xD;&#xA;│                    │ coco-local-raw.json                                                                                │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-4                                                                         │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-collator-1                                                                                    │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/parachain-template-node-v0.9.37 export-genesis-state --chain /var/folde              │&#xD;&#xA;│                    │ rs/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm7         │&#xD;&#xA;│                    │ 1GiqpijY/1001-rococo-local.json &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-         │&#xD;&#xA;│                    │ 2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/cfg/genesis-state &amp;&amp; ./bin/parachain-         │&#xD;&#xA;│                    │ template-node-v0.9.37 export-genesis-wasm --chain /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc         │&#xD;&#xA;│                    │ 0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/1001-rococo-local.jso         │&#xD;&#xA;│                    │ n &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be         │&#xD;&#xA;│                    │ 8b_-62430-mjm71GiqpijY/cfg/genesis-wasm                                                            │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-collator-1                                                                │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;&#xD;&#xA; ✓ Added Genesis Parachain 1000&#xD;&#xA;&#xD;&#xA; ✓ Added Genesis Parachain 1001&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ temp-5                                                                                             │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ bash -c ./bin/polkadot-v0.9.37 build-spec --chain /var/folders/07/snp6b9qn5fx3tvnw19z              │&#xD;&#xA;│                    │ hp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/rococo-local-pla         │&#xD;&#xA;│                    │ in.json --disable-default-bootnode  --raw &gt; /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn         │&#xD;&#xA;│                    │ /T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/rococo-local-raw.json               │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                                    │ temp-5                                                                         │&#xD;&#xA;├────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status                                 │ Ready                                                                          │&#xD;&#xA;└────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗&#xD;&#xA;║ Chain name: Rococo Local Testnet                                                                                       ║&#xD;&#xA;╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Rococo Local Testnet ⚙ Clear Boot Nodes                                                                                │&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Pod                │ alice                                                                                              │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Status             │ Launching                                                                                          │&#xD;&#xA;├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ Command            │ ./bin/polkadot-v0.9.37 --chain /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombi              │&#xD;&#xA;│                    │ e-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71GiqpijY/alice/cfg/rococo-local.json --name          │&#xD;&#xA;│                    │ alice --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --unsafe-ws-external -lpar         │&#xD;&#xA;│                    │ achain=debug --no-mdns --node-key 2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db         │&#xD;&#xA;│                    │ 186d6e90 --no-telemetry --prometheus-external --validator --prometheus-port 55576 --rpc-po         │&#xD;&#xA;│                    │ rt 55575 --ws-port 55574 --listen-addr /ip4/0.0.0.0/tcp/55573/ws --base-path /var/folders/         │&#xD;&#xA;│                    │ 07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-mjm71Gi         │&#xD;&#xA;│                    │ qpijY/alice/data                                                                                   │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;dError: Timeout(60) for node : alice&#xD;&#xA;    at NativeClient.&lt;anonymous&gt; (/snapshot/javascript/packages/orchestrator/dist/providers/native/nativeClient.js)&#xD;&#xA;    at Generator.next (&lt;anonymous&gt;)&#xD;&#xA;    at fulfilled (/snapshot/javascript/packages/orchestrator/dist/providers/native/nativeClient.js)&#xD;&#xA;┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Node'              │ /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-2a6e1b30d94f3d512696cfc8eb81be8b_-62430-m… │&#xD;&#xA;│ s logs:            │                                                                                                    │&#xD;&#xA;│ m                  │                                                                                                    │&#xD;&#xA;└────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;Error: Command failed with exit code 1: /bin/bash -c kill -9 62452&#xD;&#xA;/bin/bash: line 0: kill: (62452) - No such process&#xD;&#xA;    at makeError (/snapshot/javascript/node_modules/execa/lib/error.js:60:11)&#xD;&#xA;    at handlePromise (/snapshot/javascript/node_modules/execa/index.js:118:26)&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5) {&#xD;&#xA;  shortMessage: 'Command failed with exit code 1: /bin/bash -c kill -9 62452',&#xD;&#xA;  command: '/bin/bash -c kill -9 62452',&#xD;&#xA;  escapedCommand: '&quot;/bin/bash&quot; -c &quot;kill -9 62452&quot;',&#xD;&#xA;  exitCode: 1,&#xD;&#xA;  signal: undefined,&#xD;&#xA;  signalDescription: undefined,&#xD;&#xA;  stdout: '',&#xD;&#xA;  stderr: '/bin/bash: line 0: kill: (62452) - No such process',&#xD;&#xA;  failed: true,&#xD;&#xA;  timedOut: false,&#xD;&#xA;  isCanceled: false,&#xD;&#xA;  killed: false&#xD;&#xA;}&#xD;&#xA;UnhandledRejection: Error: Command failed with exit code 1: /bin/bash -c kill -9 62452&#xD;&#xA;/bin/bash: line 0: kill: (62452) - No such process&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;EDIT: After updating zombienet to version 1.3.58 I don't get above mentioned error anymore.&#xD;&#xA;&#xD;&#xA;I now get another error that is not stopping the program but the error is getting logged continuously.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Local Testnet ⚙ Added Boot Nodes                                                                                       │&#xD;&#xA;├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ /ip4/127.0.0.1/tcp/58081/ws/p2p/12D3KooWPA68TQCYEUd4mTUyd4ds93nhhK8QJjEknjWeJNQHXXcp                                   │&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;(node:66553) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time&#xD;&#xA;(Use `zombienet-macos --trace-warnings ...` to show where the warning was created)&#xD;&#xA;&#xD;&#xA;Error 	 fetching metrics from: http://127.0.0.1:58064/metrics&#xD;&#xA;&#xD;&#xA;Error 	 fetching metrics from: http://127.0.0.1:58068/metrics&#xD;&#xA;&#xD;&#xA;Error 	 fetching metrics from: http://127.0.0.1:58076/metrics&#xD;&#xA;&#xD;&#xA;Error 	 fetching metrics from: http://127.0.0.1:58072/metrics&#xD;&#xA;&#xD;&#xA;Error 	 fetching metrics from: http://127.0.0.1:58080/metrics&#xD;&#xA;&#xD;&#xA;# and so on&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35719" PostHistoryTypeId="5" PostId="2081" RevisionGUID="8afb8831-98f5-43a0-b7b8-f5ae020cb188" CreationDate="2023-06-27T14:27:51.830" UserId="29" Comment="added 136 characters in body" Text="[This](https://docs.substrate.io/design/decide-what-to-build) article has quite a few strong points between smart contract vs runtime development.&#xD;&#xA;&#xD;&#xA;&gt; It aims to provide insight on reasons for choosing smart contract development over runtime development for your on-chain logic.&#xD;&#xA;&#xD;&#xA;The Polkadot wiki has some notes on this:&#xD;&#xA;- https://wiki.polkadot.network/docs/build-smart-contracts&#xD;&#xA;&#xD;&#xA;Also related, a nice blog article on using both pallets + smart contracts: &quot;hybrid chains&quot;:&#xD;&#xA;- https://www.rob.tech/blog/hybrid-chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="35720" PostHistoryTypeId="2" PostId="9047" RevisionGUID="af7d90d8-a65a-4198-87a0-4bb93eae1834" CreationDate="2023-06-27T17:32:12.860" UserId="538" Text="I had the same problem with fetching metrics. After stopping the zombienet and restarting it, the problem went away. It is as if it is clearing some artifact the first time." ContentLicense="CC BY-SA 4.0" />
  <row Id="35722" PostHistoryTypeId="2" PostId="9048" RevisionGUID="4029a22d-7377-439c-91c9-a14bd852d5d0" CreationDate="2023-06-27T17:47:31.193" UserId="2722" Text="I'm working on a Substrate project, and I have the following storage definition:&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::getter(fn bids)]&#xD;&#xA;    pub(super) type Bids&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;        _,&#xD;&#xA;        Twox64Concat,&#xD;&#xA;        Key&lt;T&gt;,&#xD;&#xA;        Twox64Concat,&#xD;&#xA;        HashId&lt;T&gt;,&#xD;&#xA;        (Key&lt;T&gt;, BalanceOf&lt;T&gt;),&#xD;&#xA;        OptionQuery,&#xD;&#xA;    &gt;;&#xD;&#xA;&#xD;&#xA;I'm trying to retrieve all items associated with a specific auction key using the Bids storage. Here's the code I'm using:&#xD;&#xA;&#xD;&#xA;    let auction_key: Key&lt;T&gt; = ...; // Set the auction key appropriately&#xD;&#xA;    &#xD;&#xA;    let bid_history: = Bids::&lt;T&gt;::get(&amp;auction_key);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;This function takes 2 arguments but 1 argument was supplied&#xD;&#xA;&#xD;&#xA;It seems that the get function of Bids requires two arguments instead of one. I'm looking for a way to retrieve all items related to the auction_key. How can I modify my code to achieve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35724" PostHistoryTypeId="1" PostId="9048" RevisionGUID="4029a22d-7377-439c-91c9-a14bd852d5d0" CreationDate="2023-06-27T17:47:31.193" UserId="2722" Text="This function takes 2 arguments but 1 argument was supplied" ContentLicense="CC BY-SA 4.0" />
  <row Id="35725" PostHistoryTypeId="3" PostId="9048" RevisionGUID="4029a22d-7377-439c-91c9-a14bd852d5d0" CreationDate="2023-06-27T17:47:31.193" UserId="2722" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35726" PostHistoryTypeId="2" PostId="9049" RevisionGUID="8d3d7de8-3105-443f-9183-cbb5deeefe84" CreationDate="2023-06-27T18:34:48.597" UserId="2762" Text="You have to use `iter_prefix_values` (see [Rust Docs][1]), to iterates over values that share the first key. &#xD;&#xA;&#xD;&#xA;See an example in [this test][2] in the FRAME support pallet:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;type A = StorageDoubleMap&lt;Prefix, Blake2_128Concat, u16, Twox64Concat, u8, u32, OptionQuery&gt;;&#xD;&#xA;A::insert(3, 30, 11);&#xD;&#xA;A::insert(3, 31, 12);&#xD;&#xA;&#xD;&#xA;assert_eq!(A::iter_prefix_values(3).collect::&lt;Vec&lt;_&gt;&gt;(), vec![12, 11]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_support/storage/trait.StorageDoubleMap.html#tymethod.iter_prefix_values&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/support/src/storage/types/double_map.rs#L959" ContentLicense="CC BY-SA 4.0" />
  <row Id="35728" PostHistoryTypeId="2" PostId="9050" RevisionGUID="9a250439-fab3-419c-ab12-d62efe7a8d4b" CreationDate="2023-06-27T19:56:10.040" UserId="3796" Text="The [docker-compose.yml][1] file has been removed from the [Substrate Node Template][2].&#xD;&#xA;&#xD;&#xA;I previously found that using Docker Compose is a great way to get started with the node.&#xD;&#xA;The `docker-compose.yml` file is independent from the codebase and relies on the Docker image `paritytech/ci-linux:production`, so it is still working the same way for me.&#xD;&#xA;&#xD;&#xA;This all made me wonder about the following:&#xD;&#xA;- Why was it removed from the project? Are there some downsides I should be aware of?&#xD;&#xA;- Is there a recommended way to run a node with Docker? I have noticed the [Substrate Builder Docker Image][3], but I am not too sure about it. Would I need it if I editing the node code, writing custom runtimes, adding palets, etc?&#xD;&#xA;&#xD;&#xA;**Note:** As of the time of writing this, the latest commit in the Substrate Node Template is https://github.com/substrate-developer-hub/substrate-node-template/commit/6a8b2b12371395979099d2c79ccc1860531b0449&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/autoupdate_polkadot-v0.9.30_2022-09-28_12-57-56/docker-compose.yml&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/master/docker" ContentLicense="CC BY-SA 4.0" />
  <row Id="35730" PostHistoryTypeId="1" PostId="9050" RevisionGUID="9a250439-fab3-419c-ab12-d62efe7a8d4b" CreationDate="2023-06-27T19:56:10.040" UserId="3796" Text="Substrate Node and Docker Compose" ContentLicense="CC BY-SA 4.0" />
  <row Id="35731" PostHistoryTypeId="3" PostId="9050" RevisionGUID="9a250439-fab3-419c-ab12-d62efe7a8d4b" CreationDate="2023-06-27T19:56:10.040" UserId="3796" Text="|substrate-node-template|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35732" PostHistoryTypeId="50" PostId="6939" RevisionGUID="8daf576a-93ee-4529-8a00-295a2cd5430f" CreationDate="2023-06-27T22:07:05.890" UserId="-1" />
  <row Id="35733" PostHistoryTypeId="2" PostId="9051" RevisionGUID="ef510297-e130-44c2-9c1b-ee722b03c787" CreationDate="2023-06-27T22:44:05.757" UserId="3344" Text="Hopefully this helps: A [repository](https://github.com/anagolay/repa) targeting a production setup of a relay and parachain was [recently announced](https://forum.polkadot.network/t/repa-relaychain-and-parachain-production-setup/2264). &#xD;&#xA;&#xD;&#xA;I'm not privy to why that compose file was removed. I do know that substrate is being moved under polkadot, so this change may be related to those changes?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35735" PostHistoryTypeId="52" PostId="9048" RevisionGUID="d19f63b6-6465-4ffe-91da-69da40d54a22" CreationDate="2023-06-28T01:48:52.697" />
  <row Id="35736" PostHistoryTypeId="2" PostId="9052" RevisionGUID="c3344590-f5b5-4b11-af9a-5039e5b9b77f" CreationDate="2023-06-28T01:56:05.380" UserId="3732" Text="The `WeightNotComputable` error is returned as an `Err` from the `prepare` function below. The `Weighter::weight` function returns the maximum amount of weight that an attempted execution of this message could consume, so it seems like it has failed to infer the max weight.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn prepare(&#xD;&#xA;		mut message: Xcm&lt;Config::RuntimeCall&gt;,&#xD;&#xA;	) -&gt; Result&lt;Self::Prepared, Xcm&lt;Config::RuntimeCall&gt;&gt; {&#xD;&#xA;		match Config::Weigher::weight(&amp;mut message) {&#xD;&#xA;			Ok(weight) =&gt; Ok(WeighedMessage(weight, message)),&#xD;&#xA;			Err(_) =&gt; Err(message),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could you please check whether the weight is being loaded correctly in `#[pallet::weight(&lt;T as pallet::pallet::Config&gt;::WeightInfo::create_nomination_pool())]`?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35738" PostHistoryTypeId="5" PostId="742" RevisionGUID="d58465a5-9d4b-4982-8d0b-571cb30b93dc" CreationDate="2023-06-28T04:34:54.927" UserId="3136" Comment="code modified in body" Text="I'd like to make sure that after `sudo` access is gone forever, there still remains the following functionality in our `PoA` blockchain:&#xD;&#xA;&#xD;&#xA;1. new aura and grandpa validators can join.&#xD;&#xA;2. new bootnodes can appear.&#xD;&#xA;&#xD;&#xA;I guess, to implement such functionality, we don't need `PoW` or `PoS`, and all can be done with `PoA` combined with some kind of democratic voting among existing participants.&#xD;&#xA;&#xD;&#xA;I'm willing to give an opportunity to anyone to become a validator and/or create a bootnode with my zero involvement, so that existing validators by themselves could accept newcomers willing to join.&#xD;&#xA;&#xD;&#xA;So the question is: what pallets should I add to the blockchain, how am I supposed to change runtime or node to add such functionality? &#xD;&#xA;&#xD;&#xA;The [Private Network tutorial][1] provide the answers only if I fully own the network, which I would like to avoid. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/private-network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="35740" PostHistoryTypeId="2" PostId="9053" RevisionGUID="8ae89d67-e545-4897-b40f-2e30a8c9296a" CreationDate="2023-06-28T07:19:33.637" UserId="3414" Text="I am working on `transferring Nft` from one chain to another chain using `XCM`. For this i need to remove Nfts from `storage` of `source chain` and add Nfts to `storage` of `destination chain`. Could anyone provide me some ideas related to this." ContentLicense="CC BY-SA 4.0" />
  <row Id="35742" PostHistoryTypeId="1" PostId="9053" RevisionGUID="8ae89d67-e545-4897-b40f-2e30a8c9296a" CreationDate="2023-06-28T07:19:33.637" UserId="3414" Text="Can we modify storages using Cross chain Message Passing(XCM)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35743" PostHistoryTypeId="3" PostId="9053" RevisionGUID="8ae89d67-e545-4897-b40f-2e30a8c9296a" CreationDate="2023-06-28T07:19:33.637" UserId="3414" Text="|polkadot|xcm|substrate-parachain-template|xcmp|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35744" PostHistoryTypeId="5" PostId="9053" RevisionGUID="92386a01-598a-4d65-b053-979eb227c618" CreationDate="2023-06-28T07:21:24.557" UserId="2372" Comment="added 4 characters in body" Text="I am working on `transferring Nft` from one chain to another chain using `XCM`. For this i need to remove the Nfts from `storage` of `source chain` and add Nfts to `storage` of `destination chain`. Could anyone provide me some ideas related to this." ContentLicense="CC BY-SA 4.0" />
  <row Id="35745" PostHistoryTypeId="5" PostId="9053" RevisionGUID="067c22af-9521-4416-9dc8-3bb9d824fbe4" CreationDate="2023-06-28T07:24:14.630" UserId="3136" Comment="correct the format of title and change in body" Text="I am working on `transferring Nft` from one chain to another chain using `XCM`. For this i need to remove the `Nfts` from `storage` of `source chain` and add `Nfts` to `storage` of `destination chain`. Could anyone provide me some ideas related to this." ContentLicense="CC BY-SA 4.0" />
  <row Id="35746" PostHistoryTypeId="4" PostId="9053" RevisionGUID="067c22af-9521-4416-9dc8-3bb9d824fbe4" CreationDate="2023-06-28T07:24:14.630" UserId="3136" Comment="correct the format of title and change in body" Text="Can we modify storages using Cross Chain Message Passing(XCM)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35747" PostHistoryTypeId="5" PostId="9053" RevisionGUID="6051219c-05de-4baa-a9b1-e38c9f39d03a" CreationDate="2023-06-28T07:27:49.990" UserId="2372" Comment="added 65 characters in body" Text="I am currently working on transferring NFTs from one chain to another using XCM. To accomplish this, I need to remove the NFTs from the storage of the source chain and add them to the storage of the destination chain. I would greatly appreciate it if anyone could provide me with some ideas related to this process.is." ContentLicense="CC BY-SA 4.0" />
  <row Id="35748" PostHistoryTypeId="5" PostId="8672" RevisionGUID="93ad40d5-ba8f-43b2-b192-2186205f9079" CreationDate="2023-06-28T07:48:26.683" UserId="2372" Comment="added 6 characters in body" Text="Hi i am trying to use the `sp-consensus-babe` but I am having issues when I'm running the command &#xD;&#xA;&#xD;&#xA;**`command: cargo build --release`**&#xD;&#xA;&#xD;&#xA;The issue that I am receiving is this &#xD;&#xA;&#xD;&#xA;&gt; error: failed to load manifest for workspace member&#xD;&#xA;&gt; `/Users/abubakarmujahid/Desktop/Substrate/substrate-node-template/node`&#xD;&#xA;&gt; &#xD;&#xA;&gt; Caused by:   failed to load manifest for dependency&#xD;&#xA;&gt; `node-template-runtime`&#xD;&#xA;&gt; &#xD;&#xA;&gt; Caused by:   failed to parse manifest at&#xD;&#xA;&gt; `/Users/abubakarmujahid/Desktop/Substrate/substrate-node-template/runtime/Cargo.toml`&#xD;&#xA;&gt; &#xD;&#xA;&gt; Caused by:   key `branch` is ignored for dependency&#xD;&#xA;&gt; (sp-consensus-babe).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I have defined the dependency correctly in cargo.toml. I have described it in the following way.&#xD;&#xA;&#xD;&#xA;    sp-consensus-babe = { version = &quot;0.10.0-dev&quot;, default-features = false, path = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can anyone know how to fix this ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35749" PostHistoryTypeId="5" PostId="5086" RevisionGUID="16302f7b-c1c6-42fb-8008-ca1fb5f23793" CreationDate="2023-06-28T07:49:17.923" UserId="2372" Comment="added 4 characters in body" Text="I was upgrading a para chain from polkadot version 0.9.28 to v0.9.29 when I encountered a few suspicious looking build errors originating from deep inside substrate.&#xD;&#xA;&#xD;&#xA;To eliminate the risk of some integration error I first built the branch `polkadot-v0.9.28` on the [cumulus repo][1] without any problems then checked out `polkadot-v0.9.29` and were able to reproduce the same build error.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cumulus$ cargo build --release&#xD;&#xA;   Compiling sp-keystore v0.12.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;   Compiling sp-state-machine v0.12.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;   Compiling sc-allocator v4.1.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;   Compiling sp-rpc v6.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#7c4ac358)&#xD;&#xA;   Compiling librocksdb-sys v0.6.1+6.28.2&#xD;&#xA;   Compiling rococo-runtime v0.9.29 (https://github.com/paritytech/polkadot?branch=release-v0.9.29#94078b44)&#xD;&#xA;   Compiling polkadot-runtime v0.9.29 (https://github.com/paritytech/polkadot?branch=release-v0.9.29#94078b44)&#xD;&#xA;   Compiling kusama-runtime v0.9.29 (https://github.com/paritytech/polkadot?branch=release-v0.9.29#94078b44)&#xD;&#xA;   Compiling polkadot-test-runtime v0.9.29 (https://github.com/paritytech/polkadot?branch=release-v0.9.29#94078b44)&#xD;&#xA;   Compiling cumulus-test-runtime v0.1.0 (/home/simson/nodle/cumulus/test/runtime)&#xD;&#xA;   Compiling cumulus-test-relay-validation-worker-provider v0.1.0 (/home/simson/nodle/cumulus/test/relay-validation-worker-provider)&#xD;&#xA;   Compiling parachain-template-runtime v0.1.0 (/home/simson/nodle/cumulus/parachain-template/runtime)&#xD;&#xA;   Compiling statemine-runtime v2.0.0 (/home/simson/nodle/cumulus/parachains/runtimes/assets/statemine)&#xD;&#xA;   Compiling collectives-polkadot-runtime v1.0.0 (/home/simson/nodle/cumulus/parachains/runtimes/collectives/collectives-polkadot)&#xD;&#xA;   Compiling shell-runtime v0.1.0 (/home/simson/nodle/cumulus/parachains/runtimes/starters/shell)&#xD;&#xA;   Compiling rococo-parachain-runtime v0.1.0 (/home/simson/nodle/cumulus/parachains/runtimes/testing/rococo-parachain)&#xD;&#xA;   Compiling seedling-runtime v0.1.0 (/home/simson/nodle/cumulus/parachains/runtimes/starters/seedling)&#xD;&#xA;   Compiling statemint-runtime v1.0.0 (/home/simson/nodle/cumulus/parachains/runtimes/assets/statemint)&#xD;&#xA;   Compiling contracts-rococo-runtime v0.2.0 (/home/simson/nodle/cumulus/parachains/runtimes/contracts/contracts-rococo)&#xD;&#xA;error: `sp_trie::recorder::Recorder&lt;H&gt;::as_trie_recorder::{opaque#0}&lt;'_&gt;` does not live long enough&#xD;&#xA;   --&gt; /home/simson/.cargo/git/checkouts/substrate-7e08433d4c370a21/7c4ac35/primitives/state-machine/src/trie_backend_essence.rs:181:44&#xD;&#xA;    |&#xD;&#xA;181 |         let recorder = recorder.as_mut().map(|r| r as _);&#xD;&#xA;    |                                                  ^&#xD;&#xA;&#xD;&#xA;error: `sp_trie::recorder::Recorder&lt;H&gt;::as_trie_recorder::{opaque#0}&lt;'_&gt;` does not live long enough&#xD;&#xA;   --&gt; /home/simson/.cargo/git/checkouts/substrate-7e08433d4c370a21/7c4ac35/primitives/state-machine/src/trie_backend_essence.rs:219:44&#xD;&#xA;    |&#xD;&#xA;219 |         let recorder = recorder.as_mut().map(|r| r as _);&#xD;&#xA;    |                                                  ^&#xD;&#xA;&#xD;&#xA;error: could not compile `sp-state-machine` due to 2 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: failed to run custom build command for `cumulus-test-relay-validation-worker-provider v0.1.0 (/home/simson/nodle/cumulus/test/relay-validation-worker-provider)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/simson/nodle/cumulus/target/release/build/cumulus-test-relay-validation-worker-provider-12e504f71174b33a/build-script-build` (exit status: 1)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any ideas what could be the problem here and how to solve it?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus" ContentLicense="CC BY-SA 4.0" />
  <row Id="35750" PostHistoryTypeId="5" PostId="9040" RevisionGUID="8489afd8-f11a-4b40-98c6-bf553267f573" CreationDate="2023-06-28T07:50:37.127" UserId="2372" Comment="added 4 characters in body" Text="I have Alice, bob and so on accounts created by `cumulus` itself. However, these account's have only `1 MUnit` and I want to add more of them. I already tried !drip in faucet but that account is not added in my `local-rococo` network." ContentLicense="CC BY-SA 4.0" />
  <row Id="35751" PostHistoryTypeId="5" PostId="8852" RevisionGUID="9f50b96d-b454-48d0-ac25-14d4737264b6" CreationDate="2023-06-28T07:53:41.957" UserId="2372" Comment="added 2 characters in body" Text="I am trying to create a `SignerPayloadJSON` from an encoded partial extrinsic in polkadotjs. The partial extrinsic has the following hex representation&#xD;&#xA;```&#xD;&#xA;0x00001448656c6c6f000000c22400001600000081bf2e35e70dbc700b2b3a189a6ced2a3f4d098aaf08dbdd63089bc714de2c2e81bf2e35e70dbc700b2b3a189a6ced2a3f4d098aaf08dbdd63089bc714de2c2e&#xD;&#xA;```&#xD;&#xA;and decodes to the following data when decoded by the polkadot js browser app:&#xD;&#xA;```&#xD;&#xA;callIndex&#xD;&#xA;	0000&#xD;&#xA;remark&#xD;&#xA;	14 48656c6c6f&#xD;&#xA;era&#xD;&#xA;	00 00&#xD;&#xA;nonce&#xD;&#xA;	00&#xD;&#xA;tip&#xD;&#xA;	00&#xD;&#xA;specVersion&#xD;&#xA;	c2240000&#xD;&#xA;transactionVersion&#xD;&#xA;	16000000&#xD;&#xA;genesisHash&#xD;&#xA;	81bf2e35e70dbc700b2b3a189a6ced2a3f4d098aaf08dbdd63089bc714de2c2e&#xD;&#xA;blockHash&#xD;&#xA;	81bf2e35e70dbc700b2b3a189a6ced2a3f4d098aaf08dbdd63089bc714de2c2e&#xD;&#xA;```&#xD;&#xA;We create an api connection to a local node like so:&#xD;&#xA;```&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;    provider: new WsProvider(&quot;ws://127.0.0.1:9944&quot;),&#xD;&#xA;  });&#xD;&#xA;await api.isReady;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can we create the `SignerPayloadJSON` object, given that we have access to the ss58 formatted address of the user? We tried to first decode the data into an ExtrinsicPayload like so: &#xD;&#xA;```&#xD;&#xA;let extrinsicPayload = api.createType(&quot;ExtrinsicPayload&quot;, payload_hex, {&#xD;&#xA;    version: 4,&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;But this `extrinsicPayload` object then has an empty field `method: &quot;&quot;` which seems odd.&#xD;&#xA;&#xD;&#xA;I tried to craft this payload manually like so:&#xD;&#xA;```&#xD;&#xA;let hand_crafted_signer_payload = {&#xD;&#xA;    address: &quot;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&quot;,&#xD;&#xA;    blockHash:&#xD;&#xA;      &quot;0x559440460afd0b06684f4cecced86acdb4a278e0b77fa26b0eb67531523d6f34&quot;,&#xD;&#xA;    blockNumber: &quot;0x02&quot;,&#xD;&#xA;    era: &quot;0x0000&quot;,&#xD;&#xA;    genesisHash:&#xD;&#xA;      &quot;0x81bf2e35e70dbc700b2b3a189a6ced2a3f4d098aaf08dbdd63089bc714de2c2e&quot;,&#xD;&#xA;    method: &quot;0x00001448656c6c6f&quot;,&#xD;&#xA;    nonce: &quot;0x00&quot;,&#xD;&#xA;    specVersion: &quot;0xc2240000&quot;,&#xD;&#xA;    tip: &quot;0x00&quot;,&#xD;&#xA;    transactionVersion: &quot;0x16000000&quot;,&#xD;&#xA;    signedExtensions: [],&#xD;&#xA;    version: 4,&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;But submitting it to the extension to be signed like this:&#xD;&#xA;```&#xD;&#xA;const injector = await dapp.web3FromSource(&quot;polkadot-js&quot;);&#xD;&#xA;let { signature } = await injector?.signer?.signPayload(hand_crafted_signer_payload);&#xD;&#xA;```&#xD;&#xA;always led to an error by the extension:&#xD;&#xA;&#xD;&#xA;[![Error image][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/hoH67.png&#xD;&#xA;&#xD;&#xA;**TLDR:** How can we create a valid `SignerPayloadJSON` from a hex encoded payload and a given ss58 address, such that we can give it for signing to the `polkadotjs` extension?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35753" PostHistoryTypeId="5" PostId="9031" RevisionGUID="50a2d593-26d1-4e10-aaba-0e9fd5e3d125" CreationDate="2023-06-28T09:06:09.373" UserId="2372" Comment="added 3 characters in body" Text="I am getting the XCM error of [`WeightNotComputable`](https://github.com/paritytech/polkadot/blob/75a1bf47bd04c15be230bb09bb2c3d79de3db8b8/xcm/src/v3/traits.rs#L155). What could be the cause of this? &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Here is the [XCM code](https://github.com/ok-Alice/Astar/blob/liquid-staking/pallets/nomination-pools-staking/src/pallet/mod.rs#L221-L275) which fails. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fAXDC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35754" PostHistoryTypeId="50" PostId="8669" RevisionGUID="56437210-228c-49f2-b4e2-cdffb6645b7f" CreationDate="2023-06-28T10:03:55.450" UserId="-1" />
  <row Id="35755" PostHistoryTypeId="5" PostId="6308" RevisionGUID="06afcc51-f7c9-422a-8f93-d1b42b999a76" CreationDate="2023-06-28T10:58:17.010" UserId="2372" Comment="added 2 characters in body" Text="in the `substrate-node-template` case , I don't want to compile rocks-db at all. how it would be possible compile parity-db instead of rocks-db?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35756" PostHistoryTypeId="5" PostId="6121" RevisionGUID="26a6520b-149c-4c5d-a365-c101fa6bed7c" CreationDate="2023-06-28T10:58:44.870" UserId="2372" Comment="added 4 characters in body" Text="I'm developing my own client using `libp2p` to connect to a `substrate-based parachain` (in this case I'm testing with moonbeam/moonriver).&#xD;&#xA;&#xD;&#xA;However, my client gets disconnected after a while with this error:&#xD;&#xA;&#xD;&#xA;    2022-11-29 17:04:02.095 DEBUG tokio-runtime-worker libp2p_swarm: [] Connection closed with error KeepAliveTimeout: Connected { endpoint: Listener { local_addr: &quot;/ip4/127.0.0.1/tcp/30333&quot;, send_back_addr: &quot;/ip4/127.0.0.1/tcp/9999&quot; }, peer_id: PeerId(&quot;12D3Koo...&quot;) }; Total (peer): 1.&#xD;&#xA;    2022-11-29 17:04:02.095 TRACE tokio-runtime-worker sub-libp2p: [] Libp2p =&gt; Disconnected(12D3Koo..., SetId(0), ConnectionId(136)): Enabled.&#xD;&#xA;    2022-11-29 17:04:02.095 TRACE tokio-runtime-worker sub-libp2p: [] Libp2p =&gt; Disconnected(12D3Koo..., SetId(1), ConnectionId(136)): Enabled.&#xD;&#xA;    2022-11-29 17:04:02.095 DEBUG tokio-runtime-worker sub-libp2p: [] Libp2p =&gt; Disconnected(PeerId(&quot;12D3Koo...&quot;), Some(KeepAliveTimeout))&#xD;&#xA;&#xD;&#xA;This then lowers my score and so on. I'd like to know what possible reasons are there to get this error so that I can try to fix them on my client." ContentLicense="CC BY-SA 4.0" />
  <row Id="35757" PostHistoryTypeId="5" PostId="5585" RevisionGUID="106461ac-4afb-47c1-98ac-d4103a2375c5" CreationDate="2023-06-28T10:59:24.720" UserId="2372" Comment="added 4 characters in body" Text="I want to write runtime storage migration for our parachain. This time it will scan large storage maps with more than 10k entries. This may results in very large PoV block size. I'm wondering what the limitation is, and how I can check the PoV block size created by the migration.&#xD;&#xA;&#xD;&#xA;In the past, I have the impression that after running `try_runtime`, it prints the PoV block size. But it looks like the log was removed in the recent version. It only prints the weights now." ContentLicense="CC BY-SA 4.0" />
  <row Id="35758" PostHistoryTypeId="5" PostId="3845" RevisionGUID="d776c51e-8ce9-4782-aa60-e3dfb9b93596" CreationDate="2023-06-28T11:01:13.560" UserId="2372" Comment="added 2 characters in body" Text="So there is a repo [parity-bridges-common](https://github.com/paritytech/parity-bridges-common) that contains &quot;Useful Bridge Building Tools&quot; and is currently under development.&#xD;&#xA;&#xD;&#xA;This repo [uses XCMv3 branches of polkadot and substrate]() (which is not released to master yet), however we need to work with main versions of `Substrate/Polkadot` (for example, with latest polkadot v0.9.26). What would be the best way to organise it (i.e. how to use these templates/examples in more recent versions)?&#xD;&#xA;&#xD;&#xA;In [parity-bridges-common's Cargo.toml](https://github.com/paritytech/parity-bridges-common/blob/16aaeb9f9d80c5437001f4739b7f8a338287bf4b/Cargo.toml#L17) and in some [old PR](https://github.com/paritytech/parity-bridges-common/pull/1378) it is written that the intention is to move to the main versions later when the 3rd XCM version will be released. So one way is to work with this branch as well. However, it would require to (kind of) rollback to older version of substrate (since the XCM branch diverged from main ones about 3 months ago). Furthermore, I'm worried that latter migration to newer substrate version (on XCM v3 release) may turn out labour intensive.&#xD;&#xA;&#xD;&#xA;Is there any better way to use these bridge tools for development or such overhead is unavoidable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35759" PostHistoryTypeId="5" PostId="8640" RevisionGUID="7e452160-94f7-4e92-a6d6-5b09d28233ba" CreationDate="2023-06-28T11:02:04.323" UserId="2372" Comment="added 4 characters in body" Text="I am currently bridging the tokens from one `Parachain` to another, and I am examining two events to ensure the successful completion of the transaction. The first event is `xcmpQueue.Success`, which occurs on the destination chain, while the second event is `xcmpQueue.XcmpMessageSent`, which takes place on the chain from which I am bridging the tokens.&#xD;&#xA;&#xD;&#xA;Both of these events provide a `messageHash` that I can compare to establish a connection between the two events and verify the successful execution of the transaction.&#xD;&#xA;&#xD;&#xA;However, this approach requires me to maintain connections with both chains, which may be unnecessary. I am considering an alternative solution to address this concern.&#xD;&#xA;&#xD;&#xA;In the block where the XCM message is received, I can examine the `parachainSystem.setValidationData` extrinsic and inspect the `downwardMessages`. Here is an example of what I observed:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;{&#xD;&#xA;  ...&#xD;&#xA;  2001: [&#xD;&#xA;    {&#xD;&#xA;      sentAt: 18,066,095&#xD;&#xA;      data: 0x000210010400010200451f06080001000700e87648170a1300010200451f06080001000700e8764817010220bcbe0d01000400010100d8a1107cf72bacdb288d6fd9af62dc85988f267043c4958821b215a24055706d&#xD;&#xA;    }&#xD;&#xA;  ]&#xD;&#xA;  ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Although I am unsure about the specific contents of the data, my assumption is that it could be used to compute the same hash as in the `xcmpQueue.Success` event. Hence, my question is twofold: How can I decode the data field, or is there an entirely different approach that would allow me to achieve my intended outcome?&#xD;&#xA;&#xD;&#xA;I would greatly appreciate any assistance or guidance you can provide. Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="35760" PostHistoryTypeId="5" PostId="9053" RevisionGUID="337d3ef8-30fa-4bc5-866c-591f176b35dd" CreationDate="2023-06-28T11:45:47.487" UserId="3414" Comment="added 8 characters in body" Text="I am currently working on transferring NFTs from one chain to another using XCM. To accomplish this, I need to remove the NFTs from the storage of the source chain and add them to the storage of Pallet-nfts present at destination chain. I would greatly appreciate it if anyone could provide me with some ideas related to this." ContentLicense="CC BY-SA 4.0" />
  <row Id="35761" PostHistoryTypeId="5" PostId="8481" RevisionGUID="b4349b08-7f58-419a-9dc6-99fcc2619d61" CreationDate="2023-06-28T11:46:11.417" UserId="2372" Comment="added 1 character in body" Text="Recently, I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does of `GrandpaBlockImport`? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because thats the job of Aura? because this way it should instantly finalize all aura blocks since its the same block import but is not, so what is import_block() actually doing?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, if a majority of validators accept the block in aura, grandpa would simply finalize it by importing it directly with no verification, this would be impossible currently as they are executing the same logic.&#xD;&#xA;&#xD;&#xA;3- im tempted to import the block directly via the [client][4] in the Aura import queue in `new_partial()`, then let grandpa do the finalisation with grandpa_block_import in `new_full()`  Meaning even if aura rejects a block it should be imported if grandpa finalized it, would that be wrong? if so, how to achieve that? because there is a note to use it carefully which i dont fully understand&#xD;&#xA;&#xD;&#xA;&gt; NOTE: only use this implementation when there are NO consensus-level&#xD;&#xA;&gt; BlockImport objects. Otherwise, importing blocks directly into the&#xD;&#xA;&gt; client would be bypassing important verification work.&#xD;&#xA;&#xD;&#xA;4- what does no consensus-level BlockImport objects mean?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_service/client/struct.Client.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="35762" PostHistoryTypeId="5" PostId="4833" RevisionGUID="91777e25-f9bc-41d4-8dd0-318e289421cd" CreationDate="2023-06-28T11:46:29.290" UserId="2372" Comment="added 2 characters in body" Text="Is it possible to register custom metrics to be exported via `Prometheus`? Specifically, we would like to write values specific to the runtime - e.g. TVL, average throughput, etc.." ContentLicense="CC BY-SA 4.0" />
  <row Id="35763" PostHistoryTypeId="5" PostId="9034" RevisionGUID="e9caba47-a963-429b-a95c-62944113db3d" CreationDate="2023-06-28T11:47:20.163" UserId="2372" Comment="added 2 characters in body" Text="Solang is a solidity compiler that compiles to the `wasm pallet`. In `Solang's CLI`, there are options to configure the target parachain address length and value length. What I want to add is a feature that enables the user to specify the target parachain on a high level `E.g. &quot;pallet-contract with version v0.22.1&quot;`, `&quot;shiden parachain&quot;` or `&quot;substrate version X.Y.Z&quot;`, then generate the correct address length and value length accordingly. My question is, where do I find the mapping between the parachain name and these parameters as there is no mention of the required information in the `parachains` docs.&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35764" PostHistoryTypeId="5" PostId="8868" RevisionGUID="096311a4-7153-42ad-be75-bd9875142202" CreationDate="2023-06-28T11:47:37.460" UserId="2372" Comment="added 4 characters in body" Text="I'm trying to connect my `parachain` to a `relay-chain` locally via `auction.`&#xD;&#xA;I bid in the `auction` and set the auction ending period to `2 minutes,`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;```&#xD;&#xA; The bidding process is done but after the bidding I got this error.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sB0ES.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/Cd30Y.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35767" PostHistoryTypeId="5" PostId="8487" RevisionGUID="3bdb7be9-204c-4b90-8a6a-f1d7b320d09f" CreationDate="2023-06-28T11:49:51.353" UserId="2372" Comment="added 2 characters in body" Text="I'm trying to add `custom RPC` to Substrate node template.&#xD;&#xA;As explained in the jsonrpsee's proc_macro doc [here][1], I define `BalancesApi` trait where #[rpc(server)] attribute added, and implement `BalancesApiServer` to the struct `Balances`.&#xD;&#xA;&#xD;&#xA;I expect that macro implements `into_rpc` behind the scenes. However, compiler says no method named `into_rpc` found for struct `Balances` in the current scope.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;If I expand macro, I can see `into_rpc` trait is generated,&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;How can I implement in on `BalancesApi` struct which will be used in `create_full` function? Some additional procedure is required?&#xD;&#xA;&#xD;&#xA;Just an additional info, This is my working branch https://github.com/AstarNetwork/swanky-node/pull/67&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/jsonrpsee/blob/master/examples/examples/proc_macro.rs&#xD;&#xA;  [2]: https://i.stack.imgur.com/HtVTZ.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/JDpd4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35768" PostHistoryTypeId="5" PostId="8239" RevisionGUID="e79b59d8-3c57-42fd-94a2-607643a6ec45" CreationDate="2023-06-28T11:50:10.250" UserId="2372" Comment="added 2 characters in body" Text="So I am trying to submit `extrinsics` to a running parachain node using subxt, but encounter a Codec error.&#xD;&#xA;&#xD;&#xA;The parachain is based on the [substrate-parachain-template](https://github.com/substrate-developer-hub/substrate-parachain-template), the relay chain is compiled directly from the [Polkadot repo](https://github.com/paritytech/polkadot), and I am using the latest subxt version (v0.28.0). Both the relay chain and the parachain are using the crates from the `polkadot-v0.9.37` branch of Substrate.&#xD;&#xA;&#xD;&#xA;The para- and relay chains are able to connect and finalize authored blocks, and subxt is able to subscribe to this finalization.&#xD;&#xA;&#xD;&#xA;However, trying to submit custom extrinsics results in the following errors:&#xD;&#xA;&#xD;&#xA;Error printed by the parachain node:&#xD;&#xA;```&#xD;&#xA;[Parachain] panicked at 'Bad input data provided to validate_transaction: Codec error', &lt;PARACHAIN_PATH&gt;/runtime/src/lib.rs:516:1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error printed by the subxt application (I tried to format it with newlines for better readability):&#xD;&#xA;```&#xD;&#xA;Rpc error: RPC error: RPC call failed: ErrorObject {&#xD;&#xA;    code: ServerError(1002), message: &quot;Verification Error: Runtime error: Execution failed: &#xD;&#xA;    Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;    0: 0x1d6993 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x3a74 - &lt;unknown&gt;!core::panicking::panic_fmt::h0c053f1c32a1ef70\&#xD;&#xA;    2: 0x15d8cc - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\&#xD;&#xA;\&quot;, &#xD;&#xA;data: Some(RawValue(&quot;RuntimeApi(\&quot;Execution failed: Execution aborted due to trap:&#xD;&#xA;wasm trap: wasm `unreachable` instruction executed\&#xD;&#xA;WASM backtrace:&#xD;&#xA;    0: 0x1d6993 - &lt;unknown&gt;!rust_begin_unwind\&#xD;&#xA;    1: 0x3a74 - &lt;unknown&gt;!core::panicking::panic_fmt::h0c053f1c32a1ef70\&#xD;&#xA;    2: 0x15d8cc - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\&#xD;&#xA;\&quot;)&quot;)) }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have not been able to find any documentation or posts by anyone else encountering this issue. I am trying to submit an extrinsic using subxt as seen here:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let pair = subxt::ext::sp_core::sr25519::Pair::from_string_with_seed(&lt;SEED_HEX&gt;, None).unwrap();&#xD;&#xA;    let signer: PairSigner&lt;SubstrateConfig, subxt::ext::sp_core::sr25519::Pair&gt; = PairSigner::&lt;SubstrateConfig, subxt::ext::sp_core::sr25519::Pair&gt;::new(pair.0);&#xD;&#xA;&#xD;&#xA;    let payload = chain_apis::energychain_api::api::tx().energychain().create_energy_offer(500, 4);&#xD;&#xA;&#xD;&#xA;    match connection.get_api().tx().validate(&amp;payload) {&#xD;&#xA;        Ok(_) =&gt; println!(&quot;Call okay!&quot;),&#xD;&#xA;        Err(e) =&gt; println!(&quot;Error from call: {:?}&quot;, e),&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    let tx_in_block = connection.get_api().tx()&#xD;&#xA;        .sign_and_submit_then_watch_default(&amp;payload, &amp;signer)&#xD;&#xA;        .await?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Before the error is printed, the `validate` match prints out `Call okay!`.&#xD;&#xA;&#xD;&#xA;The parachain I am trying to submit the extrinsic to has the following call defined:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(1000)]&#xD;&#xA;#[pallet::call_index(1)]&#xD;&#xA;pub fn create_energy_offer(origin: OriginFor&lt;T&gt;, amount: u16, price: u8) -&gt; DispatchResult {&#xD;&#xA;    let who = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;    ensure!(amount &gt; T::EnergyOfferMinW::get(), Error::&lt;T&gt;::EnergyOfferNotEnoughWatts);&#xD;&#xA;&#xD;&#xA;    let energy_offer = EnergyOffer { seller: who.clone(), amount: amount.clone(), price: price.clone() };&#xD;&#xA;&#xD;&#xA;    let energy_offer_id = T::Hashing::hash_of(&amp;energy_offer);&#xD;&#xA;    EnergyOffers::&lt;T&gt;::insert(energy_offer_id, energy_offer.clone());&#xD;&#xA;&#xD;&#xA;    Self::deposit_event(Event::EnergyOfferCreated(energy_offer.amount.clone(), energy_offer.price.clone(), who, energy_offer_id));&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any insights into the possible origin of this issue and, ideally, how it could be resolved is greatly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="35769" PostHistoryTypeId="5" PostId="8175" RevisionGUID="bb3ea264-d562-4d11-8996-e4861ae39cb9" CreationDate="2023-06-28T11:54:02.470" UserId="2372" Comment="added 1 character in body" Text="I want to implement a business logic that needs to know if the node of validators in waiting state are up or not. So for that according to me `pallet_im_online` was the best solution (but open to any other solutions). After doing some R&amp;D, I found the function below [referenced][1]:&#xD;&#xA;&#xD;&#xA;    fn is_online_aux(authority_index: AuthIndex, authority: &amp;ValidatorId&lt;T&gt;) -&gt; bool {&#xD;&#xA;    	let current_session = T::ValidatorSet::session_index();&#xD;&#xA;    &#xD;&#xA;    	ReceivedHeartbeats::&lt;T&gt;::contains_key(&amp;current_session, &amp;authority_index) ||&#xD;&#xA;    		AuthoredBlocks::&lt;T&gt;::get(&amp;current_session, authority) != 0&#xD;&#xA;    }&#xD;&#xA;From this I understand if an `authority-node` is authoring blocks than it is online, or if it does not get the chance to author block it will send a `Heartbeat`.&#xD;&#xA;&#xD;&#xA;But all the above logic works for only the validators that are in `active_set` as I have mentioned in the question also I want this for validators in `waiting_set`.&#xD;&#xA;&#xD;&#xA;What I have done till now:&#xD;&#xA;&#xD;&#xA; - I was able to get the validators in `waiting_set` and when I passed it `fn is_online_aux`, it was showing in `offenders_list` instead of giving a `Heartbeat`.&#xD;&#xA; - Which I find later on that it was getting the list of online validators from `fn on_new_session&lt;'a, I: 'a&gt;(_changed: bool, validators: I, _queued_validators: I)` and using it find if authority node is online or not.&#xD;&#xA;&#xD;&#xA;Can someone tell me how to achieve it?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/50de15d8740a129db9c18a6698fbd183b00326a2/frame/im-online/src/lib.rs#L624-L629" ContentLicense="CC BY-SA 4.0" />
  <row Id="35770" PostHistoryTypeId="5" PostId="8669" RevisionGUID="6b4b2194-35d5-4e50-ac74-5e04be305d7c" CreationDate="2023-06-28T11:54:47.413" UserId="2372" Comment="deleted 3 characters in body" Text="What I´m trying to do is to condition some `option/modal` to be shown in the screen depending on the logged `user/account` being the owner or not so to have something similar to:&#xD;&#xA;&#xD;&#xA;    accountPair.address === NFT.owner&#xD;&#xA;&#xD;&#xA;I know it has to be related with the addresses inside `keyring`. But how do I identify the current account being logged in the UI? I´m working with the `front end template` of polkadot js.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35771" PostHistoryTypeId="5" PostId="6883" RevisionGUID="41f88772-2213-47ba-9690-44c8eed9def7" CreationDate="2023-06-28T11:55:23.490" UserId="2372" Comment="edited body" Text="I'm setting up a local-testnet with multiple nodes and would like to know if there is a way to premine DOT without using the UI&#xD;&#xA;Here is a copy of my docker-compose from following the steps on https://github.com/paritytech/polkadot&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;version: '2'&#xD;&#xA;&#xD;&#xA;services:&#xD;&#xA;  polkadot:&#xD;&#xA;    container_name: polkadot&#xD;&#xA;    image: parity/polkadot&#xD;&#xA;    # volumes:&#xD;&#xA;    #   - /my/local/folder:/polkadot&#xD;&#xA;    command: [&#xD;&#xA;      # &quot;--name&quot;, &quot;PolkaDocker&quot;,&#xD;&#xA;      # &quot;--ws-external&quot;,&#xD;&#xA;      # &quot;--rpc-external&quot;, #must need&#xD;&#xA;      # &quot;--rpc-cors&quot;, &quot;all&quot;&#xD;&#xA;      &quot;--chain=polkadot-local&quot;,&#xD;&#xA;      &quot;--alice&quot;, &quot;-d&quot;, &quot;/tmp/alice&quot;,&#xD;&#xA;      &quot;--node-key&quot;, &quot;0000000000000000000000000000000000000000000000000000000000000002&quot;&#xD;&#xA;    ]&#xD;&#xA;    networks:&#xD;&#xA;      polkadotnw:&#xD;&#xA;        ipv4_address: 10.0.0.10&#xD;&#xA;  polkadot2:&#xD;&#xA;    container_name: polkadot2&#xD;&#xA;    image: parity/polkadot&#xD;&#xA;    # volumes:&#xD;&#xA;    #   - /my/local/folder:/polkadot&#xD;&#xA;    command: [&#xD;&#xA;      # &quot;--name&quot;, &quot;PolkaDocker&quot;,&#xD;&#xA;      # &quot;--ws-external&quot;,&#xD;&#xA;      # &quot;--rpc-external&quot;,&#xD;&#xA;      # &quot;--rpc-cors&quot;, &quot;all&quot;&#xD;&#xA;      &quot;--chain=polkadot-local&quot;, &#xD;&#xA;      &quot;--bob&quot;, &quot;-d&quot;, &quot;/tmp/bob&quot;, &#xD;&#xA;      &quot;--bootnodes&quot;, &quot;/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWHdiAxVd8uMQR1hGWXccidmfCwLqcMpGwR6QcTP6QRMuD&quot;&#xD;&#xA;    ]&#xD;&#xA;    networks:&#xD;&#xA;      polkadotnw:&#xD;&#xA;        ipv4_address: 10.0.0.20&#xD;&#xA;    depends_on:&#xD;&#xA;      - polkadot&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;networks:&#xD;&#xA;  polkadotnw:&#xD;&#xA;    driver: bridge&#xD;&#xA;    ipam:&#xD;&#xA;      config:&#xD;&#xA;        - subnet: 10.0.0.0/24&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35772" PostHistoryTypeId="5" PostId="8735" RevisionGUID="548b49da-1b7b-445f-942d-7339c4dd71b0" CreationDate="2023-06-28T11:55:56.257" UserId="2372" Comment="added 4 characters in body" Text="I am seeing this compile error with the `xcm-builder` when building our chain `w/Polkadot 0.9.38`. What should I change to fix it?  This issue is also discussed here https://github.com/paritytech/subport/issues/149 but I wasn't able to get it to work.&#xD;&#xA;```rs&#xD;&#xA;      error[E0046]: not all trait items implemented, missing: `try_successful_origin`&#xD;&#xA;         --&gt; /home/test/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/097ffd2/xcm/xcm-builder/src/origin_conversion.rs:247:1&#xD;&#xA;          |&#xD;&#xA;      247 | / impl&lt;RuntimeOrigin: OriginTrait + Clone, Conversion: Convert&lt;RuntimeOrigin, MultiLocation&gt;&gt;&#xD;&#xA;      248 | |     EnsureOrigin&lt;RuntimeOrigin&gt; for EnsureXcmOrigin&lt;RuntimeOrigin, Conversion&gt;&#xD;&#xA;          | |______________________________________________________________________________^ missing `try_successful_origin` in implementation&#xD;&#xA;          |&#xD;&#xA;          = help: implement the missing item: `fn try_successful_origin() -&gt; Result&lt;OuterOrigin, ()&gt; { todo!() }`&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35773" PostHistoryTypeId="5" PostId="8843" RevisionGUID="c773a1ef-a205-4b9d-8b77-3f052ce64539" CreationDate="2023-06-28T11:56:16.080" UserId="2372" Comment="added 5 characters in body" Text="While `running` this project https://github.com/jimmychu0807/substrate-offchain-worker-demo&#xD;&#xA;I'm geting this error:&#xD;&#xA;&#xD;&#xA;&gt;error[E0282]: type annotations needed --&gt; /libp2p-noise-0.32.0/src/protocol/x25519.rs:221:45" ContentLicense="CC BY-SA 4.0" />
  <row Id="35774" PostHistoryTypeId="5" PostId="8715" RevisionGUID="3462c3fb-1627-4f6e-9e82-27dd057e66e3" CreationDate="2023-06-28T11:56:33.083" UserId="2372" Comment="added 4 characters in body" Text="I am following this tutorial to get a slot on the Kusama https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/. The process of generating `WebAssembly runtime` file and `parachain genesis state` file is clear. it is also clear how to participate in auction. Could you please let me know what are the steps after the auction is won and lease has started? is running a `collator node` the only thing needed or are there other actions needed to be taken, maybe using the account that registered ParaId?&#xD;&#xA;&#xD;&#xA;what are the steps to do if the parachain is not onboarded? I see that at https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains there are parachains in gray although their slot lease has started. Why are they not onboarded how to avoid their issues? Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35775" PostHistoryTypeId="5" PostId="8621" RevisionGUID="c9a62b66-3da7-44d0-b1a5-eb76db057ff0" CreationDate="2023-06-28T11:57:06.337" UserId="2372" Comment="added 2 characters in body" Text="When you go through the `openbrush` smart contract library. You will notice they are using upgradeable smart contract storage and while defining storage they are using some empty struct as key of similar  lib name  and using `pub _reserved: Option&lt;()&gt;`, in data struct.&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     pub const STORAGE_KEY: u32 = openbrush::storage_unique_key!(Data)&#xD;&#xA;        &#xD;&#xA;        #[derive(Default, Debug)]&#xD;&#xA;        #[openbrush::upgradeable_storage(STORAGE_KEY)]&#xD;&#xA;        pub struct Data {&#xD;&#xA;            pub attributes: Mapping&lt;(Id, String), String, AttributesKey&gt;,&#xD;&#xA;            pub _reserved: Option&lt;()&gt;,&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        pub token_owner: Mapping&lt;Id, Owner&gt;,&#xD;&#xA;        &#xD;&#xA;        pub struct AttributesKey;&#xD;&#xA;        &#xD;&#xA;        impl&lt;'a&gt; TypeGuard&lt;'a&gt; for AttributesKey {&#xD;&#xA;            type Type = &amp;'a (&amp;'a Id, &amp;'a String);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Why we use  pub struct `AttributesKey` and `pub _reserved: Option&lt;()&gt;` here ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35776" PostHistoryTypeId="5" PostId="8513" RevisionGUID="8c2fa1f4-037b-4c02-898e-089cf245a16b" CreationDate="2023-06-28T11:57:25.283" UserId="2372" Comment="added 4 characters in body" Text="I am using the `pallet_xcm_benchmarks`, in the config for `pallet_xcm_benchmarks::generic`,&#xD;&#xA;I have used&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl pallet_xcm_benchmarks::generic::Config for Runtime {&#xD;&#xA;    fn worst_case_asset_exchange() -&gt; Result&lt;(MultiAssets, MultiAssets), BenchmarkError&gt; {&#xD;&#xA;		Err(BenchmarkError::Skip)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;**this should have skipped the benchmark**&#xD;&#xA;```rs&#xD;&#xA;exchange_asset {&#xD;&#xA;	let (give, want) = T::worst_case_asset_exchange().map_err(|_| BenchmarkError::Skip)?;&#xD;&#xA;	let assets = give.clone();&#xD;&#xA;&#xD;&#xA;	let mut executor = new_executor::&lt;T&gt;(Default::default());&#xD;&#xA;	executor.set_holding(give.into());&#xD;&#xA;	let instruction = Instruction::ExchangeAsset {&#xD;&#xA;		give: assets.into(),&#xD;&#xA;		want: want.clone(),&#xD;&#xA;		maximal: true,&#xD;&#xA;	};&#xD;&#xA;	let xcm = Xcm(vec![instruction]);&#xD;&#xA;	}: {&#xD;&#xA;		executor.bench_process(xcm)?;&#xD;&#xA;	} verify {&#xD;&#xA;		assert_eq!(executor.holding(), &amp;want.into());&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**when I run the benchmark, it shows**&#xD;&#xA;```rs&#xD;&#xA;&#xD;&#xA;023-05-16 09:32:01 WARNING: benchmark error skipped - exchange_asset   Error: Input(&quot;Benchmark pallet_xcm_benchmarks::generic::exchange_asset failed: Benchmark not found for this pallet.&quot;)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;The same config is used in [kusama][1]  How to fix this problem?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/6ad852c129eef68baffd92a47797177e59d8f958/runtime/kusama/src/lib.rs#L2085" ContentLicense="CC BY-SA 4.0" />
  <row Id="35777" PostHistoryTypeId="5" PostId="898" RevisionGUID="37b54032-b0e2-4b1e-9bbd-6d2e61bdaa13" CreationDate="2023-06-28T11:58:37.990" UserId="2372" Comment="edited body" Text="I performed an upward teleport from `Encointer-Parachain` to `Kusama- Relay Chain`.&#xD;&#xA;&#xD;&#xA;The `parachain` confirmed the XCM extrinsic `polkadotXcm.limitedTeleportAssets` and an Event was disposed: `polkadotXcm.Attempted` with&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  Complete: 2,000,000,000&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And the balance was deducted indeed.&#xD;&#xA;&#xD;&#xA;I see that the balance on the relaychain is correct now (it increased by the expected amount). But is there an Event to listen to to detect that the teleport was successful?&#xD;&#xA;&#xD;&#xA;I tried a subscan search for palletXCM events:&#xD;&#xA;https://kusama.subscan.io/event?address=&amp;module=xcmpallet&amp;event=all&amp;startDate=&amp;endDate=&amp;startBlock=&amp;endBlock=&amp;timeType=date&amp;version=9170&#xD;&#xA;&#xD;&#xA;But that wont yield an Event for my upwards teleport&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35778" PostHistoryTypeId="5" PostId="8831" RevisionGUID="112ac2fc-2444-463f-a077-7539284041c7" CreationDate="2023-06-28T11:59:02.327" UserId="2372" Comment="added 4 characters in body" Text="I am running the [Astar](https://github.com/ok-Alice/Astar) node locally and pointing to the [astar-frame](https://github.com/ok-Alice/astar-frame/tree/main) repository which is cloned on my local machine. In the `Astar` node repository, I added the [paths-override](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#paths-overrides) method to the point all dependencies of `astar-frame` to the local folder which solved some dependency issues. &#xD;&#xA;&#xD;&#xA;When building the `Astar` node using `cargo build --release`, I get the following error:&#xD;&#xA;```&#xD;&#xA;  error[E0046]: not all trait items implemented, missing: `reserve_withdraw_assets`&#xD;&#xA;    --&gt; /Users/snowmead/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/c22e1c4/runtime/polkadot/src/weights/pallet_xcm.rs:47:1&#xD;&#xA;     |&#xD;&#xA;  47 | impl&lt;T: frame_system::Config&gt; pallet_xcm::WeightInfo for WeightInfo&lt;T&gt; {&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `reserve_withdraw_assets` in implementation&#xD;&#xA;     |&#xD;&#xA;     = help: implement the missing item: `fn reserve_withdraw_assets() -&gt; _feps::Weight { todo!() }`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Since I haven't modified anything in `astar-frame` [pallet-xcm](https://github.com/ok-Alice/astar-frame/tree/main/frame/pallet-xcm), I believe this might be a dependency issue. And to confirm that this trait item is implemented, we see in the [`pallet_xcm::Config`](https://github.com/ok-Alice/Astar/blob/master/runtime/shibuya/src/xcm_config.rs#L247) trait that it uses [`pallet_xcm::weights::SubstrateWeight&lt;Runtime&gt;;`](https://github.com/ok-Alice/astar-frame/blob/main/frame/pallet-xcm/src/weights.rs#L51) which implements the [`reserve_withdraw_assets`](https://github.com/ok-Alice/astar-frame/blob/main/frame/pallet-xcm/src/weights.rs#L239) trait item. " ContentLicense="CC BY-SA 4.0" />
  <row Id="35779" PostHistoryTypeId="5" PostId="8679" RevisionGUID="43128eb1-c024-47c2-b200-9377c0497b49" CreationDate="2023-06-28T11:59:27.573" UserId="2372" Comment="added 2 characters in body" Text="What happens if an `XCM` is sent from blockchain A to blockchain B before finalisation, and then the block on blockchain A is reverted? Is blockchain's B block also reverted?&#xD;&#xA;&#xD;&#xA;Is it safe to assume that there can be no inconsistencies arising from such scenario? E.g. an asset transfer reverted on chain A but still executed on chain B?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35780" PostHistoryTypeId="5" PostId="5445" RevisionGUID="4da50858-a789-43ad-9ae7-9b35ff1aa9ed" CreationDate="2023-06-28T11:59:43.780" UserId="2372" Comment="added 2 characters in body" Text="I can see that many `parachains` have opened HRMP channels on Rococo and are beginning to experiment with XCM:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Source:&#xD;&#xA;- https://dotsama-channels.vercel.app&#xD;&#xA;&#xD;&#xA;I would like to open HRMP channels between parachains on a local Rococo test network. &#xD;&#xA;&#xD;&#xA;How do I do this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/G7mkx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35781" PostHistoryTypeId="5" PostId="8613" RevisionGUID="dde71d8c-4d9f-44f5-90f0-9c33590d125d" CreationDate="2023-06-28T11:59:58.543" UserId="2372" Comment="added 4 characters in body" Text="Is it possible to control a nomination pool via `XCM` from a `Parachain` and is there any related documentation for this. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35782" PostHistoryTypeId="5" PostId="8006" RevisionGUID="d50f693b-6584-48f5-b418-82911c4e6ebb" CreationDate="2023-06-28T12:00:18.960" UserId="2372" Comment="added 2 characters in body" Text="Our team ([Fearless Wallet][1]) has recently faced an issue while trying making XCM transfers between `parachains` on Mobile clients. The odd thing is that the same extrinsic on Polkadot JS dApp works fine without any errors. But for Mobile clients and IDE Emulators we have an error like that at 50% of cases.:&#xD;&#xA;&#xD;&#xA;**```&quot;Invalid Transaction&quot;, code: 1010, data: Optional(&quot;Transaction has a bad signature&quot;)```**&#xD;&#xA;&#xD;&#xA;The extrinsic example on Polkadot JS App is [here][2].&#xD;&#xA;&#xD;&#xA;Here you can find a link to the [extrinsic][3] assembled on Mobile client side. We have been investigating the issue for several days. And we haven’t find any possible cause or solution yet.&#xD;&#xA;&#xD;&#xA;We really appreciate any support and suggestions.&#xD;&#xA;Any ideas and advises are welcome.&#xD;&#xA;#stayfearless&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://fearlesswallet.io&#xD;&#xA;  [2]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbifrost-rpc.dwellir.com#/extrinsics/decode/0x4601010000010608000100070010a5d4e801010200411f0100cace42531af9f52edfc06bb216706a094cbad3c393fac3d905c37d4b792f3b4c010700f2052a01&#xD;&#xA;  [3]: https://pastebin.pl/view/7de1a0c3" ContentLicense="CC BY-SA 4.0" />
  <row Id="35783" PostHistoryTypeId="5" PostId="8327" RevisionGUID="c920f217-8867-4fda-828f-9becaeca3d9a" CreationDate="2023-06-28T12:00:32.487" UserId="2372" Comment="added 2 characters in body" Text="I'm upgrading our `parachain` based on Polkadot 0.9.40 [here][1]. Now in the process of benchmarking xcm operations, I notice there is no benchmark for `reserve_asset_deposited` in XCM fungible benchmarks! I wonder how is it then benchmarked in Kusama and some other places?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/NodleCode/chain/pull/735" ContentLicense="CC BY-SA 4.0" />
  <row Id="35784" PostHistoryTypeId="5" PostId="3974" RevisionGUID="7a1db971-fb2d-4f89-a743-b1619f07aaea" CreationDate="2023-06-28T12:01:03.353" UserId="2372" Comment="edited body" Text="I'm trying to enforce a `same native token` rule for the relay and all future parachains in my local environment. For this, I must first configure my parachain to accept teleports from a relay account to a parachain account.&#xD;&#xA;&#xD;&#xA;I saw that natively the cumulus template parachain has teleported disabled:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct XcmConfig;&#xD;&#xA;impl xcm_executor::Config for XcmConfig {&#xD;&#xA;	...&#xD;&#xA;	type IsTeleporter = (); // Teleporting is disabled.&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So I enabled teleports from the relay chain (0.9.20 fork) by coding the following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct XcmConfig;&#xD;&#xA;impl xcm_executor::Config for XcmConfig {&#xD;&#xA;	...&#xD;&#xA;	type IsTeleporter = (xcm_builder::Case&lt;DotFromPolkadot&gt;,);&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const DotLocation: MultiLocation = MultiLocation::parent();&#xD;&#xA;	pub const Polkadot: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(DotLocation::get()) });&#xD;&#xA;	pub const DotFromPolkadot: (MultiAssetFilter, MultiLocation) = (Polkadot::get(), DotLocation);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Parachain recognizes the relay chain as a teleporter.&#xD;&#xA;pub type TrustedTeleporters = (xcm_builder::Case&lt;DotFromPolkadot&gt;,);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From what I understood the actual execution of teleporting is already implemented in the xcm pallet, and all I have to do is configure it in this xcm_config.rs inside the runtime folder.&#xD;&#xA;&#xD;&#xA;But when running a teleport using the frontend of polkador.js.apps, it makes the runtime panic with the following message:&#xD;&#xA;&#xD;&#xA;```zsh&#xD;&#xA;2022-07-28 11:22:24.026 ERROR tokio-runtime-worker runtime: [Parachain] panicked at 'assertion failed: `(left == right)`&#xD;&#xA;  left: `0x01992e7b9de1178b594c0a24dc30f820d61caad33f9fda514c93c9400426d1cd`,&#xD;&#xA; right: `0x0000000000000000000000000000000000000000000000000000000000000000`', /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/4bbedb3/pallets/parachain-system/src/lib.rs:774:9    &#xD;&#xA;2022-07-28 11:22:24.026  WARN tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x1bd944 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;. Dropping.    &#xD;&#xA;2022-07-28 11:22:24.026 ERROR tokio-runtime-worker runtime: [Parachain] panicked at 'set_validation_data inherent needs to be present in every block!', /Users/juan/.cargo/git/checkouts/cumulus-59522f43471fa161/4bbedb3/pallets/parachain-system/src/lib.rs:143:13    &#xD;&#xA;2022-07-28 11:22:24.026  WARN tokio-runtime-worker aura: [Parachain] Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;&#xD;&#xA;    0: 0x1bd944 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is this because the actual teleporting logic is not implemented? or what do I have to do to enable this? Any help or direction would be appreciated.&#xD;&#xA;&#xD;&#xA;Also if you know resources on how to implement having the same token shared between all parachains and relay chain it would be a big help!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35785" PostHistoryTypeId="5" PostId="8248" RevisionGUID="10502323-4255-4ff2-b017-f472c57d57a1" CreationDate="2023-06-28T12:01:25.010" UserId="2372" Comment="added 2 characters in body" Text="I've been looking into Cumulus SDK's parachain and `XCM` handling functions in `XcmpQueue` to handle XCM protocol functions such as `send_xcm()`. It seems by default, messages are not signed when sent.&#xD;&#xA;&#xD;&#xA;If this is the case, what prevents a malicious person from replaying an XCM message to perform a replay attack?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35787" PostHistoryTypeId="5" PostId="8257" RevisionGUID="35b1ae4b-e370-4c5a-831f-d3481ec1df15" CreationDate="2023-06-28T12:02:01.927" UserId="2372" Comment="added 2 characters in body" Text="Replay attacks only work in setups where messages are received via an un-trusted delivery mechanism - hence the need for signing; to authenticate the sender.  &#xD;&#xA;&#xD;&#xA;For `XCMP`, the delivery channel is already trusted. Only the sender can inject messages into the channel, no one else. The relay chain guarantees this.&#xD;&#xA;&#xD;&#xA;Now if you are *solely* looking at XCM as a language (and not the DotSama use for XCMP/VMP/HRMP) then yes - replay is possible. But so is in any other language without build-in authentication, like English." ContentLicense="CC BY-SA 4.0" />
  <row Id="35788" PostHistoryTypeId="5" PostId="8616" RevisionGUID="ce6720b9-34ff-48c1-bd62-dbb04014321e" CreationDate="2023-06-28T12:03:25.303" UserId="2372" Comment="added 4 characters in body" Text="I have a pallet which ensures a particular custom origin  of H160(20 bytes). Actually, this `pallet` is to ensure that the Origin is that of an `ethereum` address(20 bytes).&#xD;&#xA;&#xD;&#xA;I am therefore writing Integration tests using PolkadotJS, how can i send and sign a transaction by using a 20 bytes address origin?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35789" PostHistoryTypeId="5" PostId="8523" RevisionGUID="542bf83e-b014-4141-a9da-6dcb85fdf841" CreationDate="2023-06-28T12:03:42.650" UserId="2372" Comment="added 2 characters in body" Text="As a major project for my college, we are trying to modify the `substrate node template` for the voting system use case. Can anyone guide us on what would be the most important modules, palettes, and areas in the documentation we should refer to in order to successfully modify the substrate node template for the election (government) voting system use case?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35790" PostHistoryTypeId="5" PostId="6623" RevisionGUID="edb8cac6-33ef-4fc4-b6fe-547aa0b030c5" CreationDate="2023-06-28T12:04:11.633" UserId="2372" Comment="added 2 characters in body" Text=" i am working on `substrate blockchain` its era time and epoch are  set too 2 minutes and when i changed unbonding duration to 4 min in blockchain it is working fine . when i have added evm base to to substrate blochchain with era time and epoch time of 2 min. and when i set unbonding time to any  value rather than the default one i.e 2 min ,10 min etc .when i use my funds to nominate the validator and want to unbond funds the balance is not coming back to account and is still in locked funds . can you please help me out of it . how to change unbonding time  ." ContentLicense="CC BY-SA 4.0" />
  <row Id="35791" PostHistoryTypeId="5" PostId="8318" RevisionGUID="35205c77-3acb-4f31-bd96-41fea6e13bf5" CreationDate="2023-06-28T12:04:41.663" UserId="2372" Comment="added 4 characters in body" Text="why would blockchains interoperate, what are some real world problems with real scenarios blockchain interoperability solve? &#xD;&#xA;&#xD;&#xA;i keep hearing easier transfer of value from one blockchain to another but thats so vague and i dont know any specific examples on this, when would you need to transfer value from one blockchain to the another and why is it impossible currently, can't i simply create a bot and take the data and create a transaction and send it to another chain by respecting their rules(correct transaction format)?&#xD;&#xA;&#xD;&#xA;polkadot answer's to interoperability is the relay chain as far as i understand, a blockchain that connects blockchains, but why? why not create a common standard protocol and have every blockchain implement it however they want; like usual internet standards, what is the role of the relay chain in this and how does it make interoperability easier?&#xD;&#xA;&#xD;&#xA;i also keep hearing that blockchains(parachains) connected to the relay chain will benefit from the security of the relay chain, what does that mean? if each parachain has its own consensus model and security what can you add more to that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35792" PostHistoryTypeId="5" PostId="8279" RevisionGUID="3e662e38-73f3-4f2b-918c-4fec12ab0a7e" CreationDate="2023-06-28T12:04:57.430" UserId="2372" Comment="added 2 characters in body" Text="I'm developing an app and there I have the possibility to generate qrcodes to ask for payments in multiple `blockchains` using multiple tokens. For EVM blockchains I do have the eip681 to guide me (https://eips.ethereum.org/EIPS/eip-681) the idea is the qrcode be made of the described url. I could find for bitcoin (https://en.bitcoin.it/wiki/BIP_0021), Solana (https://github.com/solana-labs/solana-pay/blob/master/SPEC.md), Stellar (https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0007.md#operation-pay) but for Polkadot I'm searching for days with no success.&#xD;&#xA;&#xD;&#xA;Is there something similar for Polkadot? If so, where can I find the documentation for such?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35793" PostHistoryTypeId="5" PostId="8256" RevisionGUID="24fb3353-a5fa-47d5-ab35-c1b02e570ac1" CreationDate="2023-06-28T12:05:13.447" UserId="2372" Comment="deleted 1 character in body" Text="i am currently using substrate full node . and i have created non native  custom  tokens through assets like of name KAR . when i transfer these custom tokens i.e KAR from one account to another the transaction fees is deducting through native tokens . can anyone please tell me how we can use these non native (custom) tokens i.e KAR for transaction fees  and where i have to  make  changes to do this .&#xD;&#xA;&#xD;&#xA;i have followed [this][1] and made an Api for `SignedExtension` but still the fees is getting deducted from the native token the link for my api is [api][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3752/how-to-pay-transaction-fees-using-the-custom-token-created-by-using-pallet-asset&#xD;&#xA;  [2]: https://github.com/karanvir12/Asset_Api.git" ContentLicense="CC BY-SA 4.0" />
  <row Id="35794" PostHistoryTypeId="5" PostId="8050" RevisionGUID="d805cb59-af2a-452f-9c3a-3d8f79b2b614" CreationDate="2023-06-28T12:05:31.017" UserId="2372" Comment="deleted 2 characters in body" Text="I am trying to use the `libsecp256k1` library in a no-std environment and I get the following error when building the contract:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[wasm-validator error in module]  unexpected true: memory max &gt;= initial, on memory&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It seems like this happens while using the recover function only -&gt; The main problem is to try and recover a public key given an ethereum  signature and message.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;libsecp256k1 = { version=&quot;0.7.1&quot;, default-features = false, features = [&quot;static-context&quot;] }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It looks like I need the static-context feature to be able to use the recovery function, however, after digging through the source code, it seems like recovery actually calls recovery_with_context, which actually adds an additional parameter - context, defined like this&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg(all(feature = &quot;static-context&quot;, not(feature = &quot;lazy-static-context&quot;)))]&#xD;&#xA;/// A static ECMult context.&#xD;&#xA;// Correct `pre_g` values are fed into `ECMultContext::new_from_raw`, generated by build script.&#xD;&#xA;pub static ECMULT_CONTEXT: ECMultContext =&#xD;&#xA;    unsafe { ECMultContext::new_from_raw(include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/const.rs&quot;))) };&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[cfg(all(feature = &quot;static-context&quot;, not(feature = &quot;lazy-static-context&quot;)))]&#xD;&#xA;/// A static ECMultGen context.&#xD;&#xA;// Correct `prec` values are fed into `ECMultGenContext::new_from_raw`, generated by build script.&#xD;&#xA;pub static ECMULT_GEN_CONTEXT: ECMultGenContext =&#xD;&#xA;    unsafe { ECMultGenContext::new_from_raw(include!(concat!(env!(&quot;OUT_DIR&quot;), &quot;/const_gen.rs&quot;))) };&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please note, that since this example is meant for the Phala Ink! environment, no standard libraries can be used. Alternatives are also welcome - I just want to extract the public key from the signature and message, as stated before.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn recover_pubkey(&amp;self, v: u8, r: Vec&lt;u8&gt;, s: Vec&lt;u8&gt;, message: Vec&lt;u8&gt;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35795" PostHistoryTypeId="5" PostId="7947" RevisionGUID="1309a443-0cbd-4dd4-ac09-989dee4ce821" CreationDate="2023-06-28T12:05:54.170" UserId="2372" Comment="added 2 characters in body" Text="I'd like to propose an idea for creating a general reference and help tool utilizing a chatbot trained on data from Substrate-based chains `(e.g., Polkadot, Kusama, Parachains)` and their associated repositories. While I don't plan to implement this myself, I am curious to discuss its feasibility and potential impact.&#xD;&#xA;&#xD;&#xA;1. Would it be technically feasible to extract and preprocess the necessary data from these chains and repositories to train a chatbot model?&#xD;&#xA;2. Do you think the resulting chatbot would provide valuable insights and assistance to developers?&#xD;&#xA;3. Are there any potential legal or ethical concerns with using the data from these chains and repositories for this purpose?&#xD;&#xA;4. Would the chatbot model be able to keep up with the constantly evolving nature of these ecosystems?&#xD;&#xA;&#xD;&#xA;I'm interested in hearing your thoughts on this proposal, any suggestions for improving the idea, and any potential challenges that could arise." ContentLicense="CC BY-SA 4.0" />
  <row Id="35796" PostHistoryTypeId="6" PostId="7555" RevisionGUID="b1d2487e-192d-434e-99a7-5881eaf94f26" CreationDate="2023-06-28T12:11:12.107" UserId="2372" Comment="edited tags" Text="|rust|weight|parity-bridges-common|weighttofee|frame-support|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35797" PostHistoryTypeId="5" PostId="8984" RevisionGUID="3cd3d6fe-01f2-4f43-a2dc-f01c96f83786" CreationDate="2023-06-28T12:41:03.770" UserId="2372" Comment="edited body" Text="Recently anytime i try to run `substrate-node` i get this error message, all attempts to update packages hasn't been helpful&#xD;&#xA;&#xD;&#xA;    Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;    2023-06-22 02:56:29.665  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35798" PostHistoryTypeId="2" PostId="9054" RevisionGUID="2a661806-b43d-41df-a05b-eedadd1c4790" CreationDate="2023-06-28T16:13:34.857" UserId="2960" Text="I am running a local parachain setup.&#xD;&#xA;how do I add statemine to the network ? is there a github registry for statemine with instructions? basically I would like to setup a local relaychain with assets on statemine" ContentLicense="CC BY-SA 4.0" />
  <row Id="35800" PostHistoryTypeId="1" PostId="9054" RevisionGUID="2a661806-b43d-41df-a05b-eedadd1c4790" CreationDate="2023-06-28T16:13:34.857" UserId="2960" Text="how do I add statemine to local parachain setup? where do I find the statemine repo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35801" PostHistoryTypeId="3" PostId="9054" RevisionGUID="2a661806-b43d-41df-a05b-eedadd1c4790" CreationDate="2023-06-28T16:13:34.857" UserId="2960" Text="|substrate-node-template|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35802" PostHistoryTypeId="2" PostId="9055" RevisionGUID="16bf9ca4-0fce-4f18-a2b9-febb54ae294e" CreationDate="2023-06-28T16:19:32.910" UserId="372" Text="[Cargo Contract](https://github.com/paritytech/cargo-contract/) is a popular tool for developing ink! contracts.&#xD;&#xA;&#xD;&#xA;This tool is known to work well with the [substrate contracts node](https://github.com/paritytech/substrate-contracts-node), and I thought it should work with other chains that support pallet contracts as well.&#xD;&#xA;&#xD;&#xA;I'm currently trying to adapt cargo contract to work with Substrate chains that use the `AccountId20` type and `EthereumSignature`s instead of the more &quot;normal&quot; `AccoutId32` type.&#xD;&#xA;&#xD;&#xA;My question is, what is the content and purpose of the [contracts_runtime.scale file](https://github.com/paritytech/cargo-contract/blob/master/crates/cargo-contract/src/cmd/runtime_api/contracts_runtime.scale)? If I had to guess I would guess that it is scale encoded metadata from the substrate contracts node. But is that right? And if so, do I need to supply my own encoded metadata to make cargo contract work with my chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35804" PostHistoryTypeId="1" PostId="9055" RevisionGUID="16bf9ca4-0fce-4f18-a2b9-febb54ae294e" CreationDate="2023-06-28T16:19:32.910" UserId="372" Text="What is the purpose of the `contracts_runtime.scale` file in the `cargo-contracts` repository?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35805" PostHistoryTypeId="3" PostId="9055" RevisionGUID="16bf9ca4-0fce-4f18-a2b9-febb54ae294e" CreationDate="2023-06-28T16:19:32.910" UserId="372" Text="|metadata|scale-codec|cargo-contract|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35806" PostHistoryTypeId="2" PostId="9056" RevisionGUID="5bf8d056-5cca-48d9-8738-262bd605ab5a" CreationDate="2023-06-28T17:09:02.457" UserId="372" Text="I found some helpful context in the docs for the `subxt` macro https://docs.rs/subxt/0.29.0/subxt/attr.subxt.html&#xD;&#xA;&#xD;&#xA;I guess this macro generates a strongly typed API from the metadata. So I guess in the case of changing the AccountId type, I would need to re-generate the metadata.&#xD;&#xA;&#xD;&#xA;I still don't know the exact binary format, but that doesn't matter so much to me." ContentLicense="CC BY-SA 4.0" />
  <row Id="35808" PostHistoryTypeId="2" PostId="9057" RevisionGUID="14670b94-e280-430f-96a0-ad3694172e88" CreationDate="2023-06-28T18:18:52.540" UserId="251" Text="All the `state*` parachains can be found in the cumulus repository.&#xD;&#xA;&#xD;&#xA;Here is the specific link you are looking for: [https://github.com/paritytech/cumulus/blob/f0f13e09ddd203b8d29eb2f10123230557ce2da3/polkadot-parachain/src/chain_spec/asset_hubs.rs#L259](https://github.com/paritytech/cumulus/blob/f0f13e09ddd203b8d29eb2f10123230557ce2da3/polkadot-parachain/src/chain_spec/asset_hubs.rs#L259)&#xD;&#xA;&#xD;&#xA;Recently, the structs have been renamed to `asset-hub*`. However, if you check the runtime files, they are still referred to as `state*` at present. You can find them here: [https://github.com/paritytech/cumulus/blob/f0f13e09ddd203b8d29eb2f10123230557ce2da3/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs#L103](https://github.com/paritytech/cumulus/blob/f0f13e09ddd203b8d29eb2f10123230557ce2da3/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs#L103)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35810" PostHistoryTypeId="2" PostId="9058" RevisionGUID="58e67a46-360e-47d6-9331-918a1490cb65" CreationDate="2023-06-28T18:55:01.097" UserId="2135" Text="We have a customized [substrate chain][1] currently running and we are facing some signature issues ([repo][2]).&#xD;&#xA;This chain has custom types, custom header and an additional extension to check a parameter called appId. This extension does not add an additional signed value.&#xD;&#xA;&#xD;&#xA;When running with polkadot api and a keyring, everything is fine : &#xD;&#xA;```&#xD;&#xA;const extrinsic = api.tx.balances.transfer(&#xD;&#xA;  &quot;5CDGXH8Q9DzD3TnATTG6qm6f4yR1kbECBGUmh2XbEBQ8Jfa5&quot;,&#xD;&#xA;  1&#xD;&#xA;);&#xD;&#xA;const accountKeyring = getKeyringFromSeed(&quot;...&quot;);&#xD;&#xA;await extrinsic.signAndSend(accountKeyring, ({ status }) =&gt; { // &lt;-- Successful&#xD;&#xA;  if (status.isInBlock) {&#xD;&#xA;    setStatus(`Transaction included in block: ${status.asInBlock}`);&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when signing with extension, I got a bad `transaction has a bad signature` error from the node.&#xD;&#xA;```&#xD;&#xA;const extrinsic = api.tx.balances.transfer(&#xD;&#xA;  &quot;5CDGXH8Q9DzD3TnATTG6qm6f4yR1kbECBGUmh2XbEBQ8Jfa5&quot;,&#xD;&#xA;  1&#xD;&#xA;);&#xD;&#xA;extrinsic.signAndSend(&#xD;&#xA;  account.address,&#xD;&#xA;  { signer: injector.signer },&#xD;&#xA;  ({ status }) =&gt; { // &lt;-- Fails&#xD;&#xA;    if (status.isInBlock) {&#xD;&#xA;      setStatus(`Transaction included in block: ${status.asInBlock}`);&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don't know where to look at since:&#xD;&#xA;&#xD;&#xA; 1. The local script initialize the types correctly&#xD;&#xA; 2. From a local built extension, data are correctly received even with the additional extension&#xD;&#xA; 3. From the node I can seem to find the difference between what I receive&#xD;&#xA;&#xD;&#xA;What did I miss that could cause this issue ?&#xD;&#xA;&#xD;&#xA;  [1]: https://kate.avail.tools/#/explorer&#xD;&#xA;  [2]: https://github.com/availproject/avail" ContentLicense="CC BY-SA 4.0" />
  <row Id="35812" PostHistoryTypeId="1" PostId="9058" RevisionGUID="58e67a46-360e-47d6-9331-918a1490cb65" CreationDate="2023-06-28T18:55:01.097" UserId="2135" Text="Transaction fails when using Polkadot extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="35813" PostHistoryTypeId="3" PostId="9058" RevisionGUID="58e67a46-360e-47d6-9331-918a1490cb65" CreationDate="2023-06-28T18:55:01.097" UserId="2135" Text="|error|api|signed-extensions|polkadot-js-extension|signatures|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35814" PostHistoryTypeId="50" PostId="5103" RevisionGUID="2a273e7f-9b91-48f7-8ba1-bb34c0bf344f" CreationDate="2023-06-28T23:03:15.437" UserId="-1" />
  <row Id="35815" PostHistoryTypeId="5" PostId="9058" RevisionGUID="eb7e3dd5-1dcc-4758-927d-8ab7a5804230" CreationDate="2023-06-29T04:43:10.027" UserId="2372" Comment="added 2 characters in body" Text="We have a customized [substrate chain][1] currently running and we are facing some signature issues ([repo][2]).&#xD;&#xA;This chain has custom types, custom header and an additional extension to check a parameter called appId. This extension does not add an additional signed value.&#xD;&#xA;&#xD;&#xA;When running with `polkadot api` and a keyring, everything is fine : &#xD;&#xA;```&#xD;&#xA;const extrinsic = api.tx.balances.transfer(&#xD;&#xA;  &quot;5CDGXH8Q9DzD3TnATTG6qm6f4yR1kbECBGUmh2XbEBQ8Jfa5&quot;,&#xD;&#xA;  1&#xD;&#xA;);&#xD;&#xA;const accountKeyring = getKeyringFromSeed(&quot;...&quot;);&#xD;&#xA;await extrinsic.signAndSend(accountKeyring, ({ status }) =&gt; { // &lt;-- Successful&#xD;&#xA;  if (status.isInBlock) {&#xD;&#xA;    setStatus(`Transaction included in block: ${status.asInBlock}`);&#xD;&#xA;  }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when signing with extension, I got a bad `transaction has a bad signature` error from the node.&#xD;&#xA;```&#xD;&#xA;const extrinsic = api.tx.balances.transfer(&#xD;&#xA;  &quot;5CDGXH8Q9DzD3TnATTG6qm6f4yR1kbECBGUmh2XbEBQ8Jfa5&quot;,&#xD;&#xA;  1&#xD;&#xA;);&#xD;&#xA;extrinsic.signAndSend(&#xD;&#xA;  account.address,&#xD;&#xA;  { signer: injector.signer },&#xD;&#xA;  ({ status }) =&gt; { // &lt;-- Fails&#xD;&#xA;    if (status.isInBlock) {&#xD;&#xA;      setStatus(`Transaction included in block: ${status.asInBlock}`);&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don't know where to look at since:&#xD;&#xA;&#xD;&#xA; 1. The local script initialize the types correctly&#xD;&#xA; 2. From a local built extension, data are correctly received even with the additional extension&#xD;&#xA; 3. From the node I can seem to find the difference between what I receive&#xD;&#xA;&#xD;&#xA;What did I miss that could cause this issue ?&#xD;&#xA;&#xD;&#xA;  [1]: https://kate.avail.tools/#/explorer&#xD;&#xA;  [2]: https://github.com/availproject/avail" ContentLicense="CC BY-SA 4.0" />
  <row Id="35816" PostHistoryTypeId="5" PostId="8486" RevisionGUID="78213639-9e63-454c-8f8c-acd41f559341" CreationDate="2023-06-29T04:47:35.677" UserId="354" Comment="added 4 characters in body" Text="Ideally, I would like to build a chain with Substrate but using Tendermint as the consensus engine.&#xD;&#xA;&#xD;&#xA;The problem is that it's a lot of work to implement it correctly.&#xD;&#xA;&#xD;&#xA;But what if I use `AURA` (round robin + delegated) and `GRANDPA` (propose, pre-commit, commit) with `sc_consensus::LongestChain` a custom `VotingRule` that triggers a vote for every block?&#xD;&#xA;I would end up with something that behaves kind of close to Tendermint from a high-level point of view.&#xD;&#xA;&#xD;&#xA;What would be the core difference? Would it scale as well as Tendermint? Is there some risk to do this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35817" PostHistoryTypeId="2" PostId="9059" RevisionGUID="b4205f04-4fa0-4cb0-9b18-a170be084f29" CreationDate="2023-06-29T04:59:33.173" UserId="354" Text="There might be some issue with the command you are using to generate the `plain spec file`, you can follow the steps mentioned in this tutorial [https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/#create-a-custom-chain-specification][1], also the command to generate the plain spec file is as follows:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template build-spec --disable-default-bootnode --chain local &gt; customSpec.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/#create-a-custom-chain-specification" ContentLicense="CC BY-SA 4.0" />
  <row Id="35819" PostHistoryTypeId="5" PostId="9035" RevisionGUID="07fe89e7-6c2e-4b2f-8408-f68905423a50" CreationDate="2023-06-29T05:00:23.980" UserId="354" Comment="added 2 characters in body" Text="The command `substrate build-spec &gt; plain-chain-spec.json` used to generate a human readable version of the chain spec in json. To create the more stable machine friendly version of that chain spec one must call: `substrate build-spec --raw &gt; raw-chain-spec.json`. But now that I'm testing a node built on top of `Polkadot 0.9.42`, I'm observing that the output of the former command is also raw! How can the plain version is producible then?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35820" PostHistoryTypeId="5" PostId="8989" RevisionGUID="01124dd9-1a5d-45f2-b8ed-1a7c39dcd582" CreationDate="2023-06-29T05:21:13.943" UserId="354" Comment="added 2 characters in body" Text="I'm trying to fork my chain using [fork-off-substrate][1] but when running the  `new chain` using the genesis file i.e `fork.json` is does not `produce`or `finalize` the blocks. How can I solve this or what is the reason for blocks not being `finalized` or `produced`?&#xD;&#xA;&#xD;&#xA;**i am getting following error:**&#xD;&#xA;```sh&#xD;&#xA;2023-06-22 12:32:33  Idle (2 peers), best: #0 (0x3e1d…46c8), finalized #0 (0x3e1d…46c8), ⬇ 0.8kiB/s ⬆ 0.8kiB/s    &#xD;&#xA;2023-06-22 12:32:38  Idle (2 peers), best: #0 (0x3e1d…46c8), finalized #0 (0x3e1d…46c8), ⬇ 87 B/s ⬆ 79 B/s    &#xD;&#xA;2023-06-22 12:32:39  Starting consensus session on top of parent 0x3e1dd501b4db59fc98469a8aeb7a353a42c8a2b25e4699c0dd9b9c30112746c8    &#xD;&#xA;2023-06-22 12:32:39 [115] ‍♂️ Running migration with current storage version StorageVersion(3) / onchain StorageVersion(3)    &#xD;&#xA;2023-06-22 12:32:39     &#xD;&#xA;2023-06-22 12:32:39 [115] ‍♂️ MigrateToV2 did not executed. This probably should be removed    &#xD;&#xA;2023-06-22 12:32:39 ⚠️ Ethereum declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`    &#xD;&#xA;2023-06-22 12:32:39  Prepared block for proposing at 1 (3 ms) [hash: 0x5f831cb083500e516e32fe7613bce1add9849f24185d9baffcc35e2a29cdd730; parent_hash: 0x3e1d…46c8; extrinsics (1): [0xcb0f…d372]]    &#xD;&#xA;2023-06-22 12:32:39  Pre-sealed block for proposal at 1. Hash now 0x93d7c0b4c439265fc1b2cfc712529f8856537ff7400e34b058cb5b0f768aad9e, previously 0x5f831cb083500e516e32fe7613bce1add9849f24185d9baffcc35e2a29cdd730.    &#xD;&#xA;2023-06-22 12:32:39 Error with block built on 0x3e1dd501b4db59fc98469a8aeb7a353a42c8a2b25e4699c0dd9b9c30112746c8: Import failed: Expected epoch change to happen at 0x93d7c0b4c439265fc1b2cfc712529f8856537ff7400e34b058cb5b0f768aad9e, s562472453    &#xD;&#xA;2023-06-22 12:32:43  Idle (2 peers), best: #0 (0x3e1d…46c8), finalized #0 (0x3e1d…46c8), ⬇ 1.3kiB/s ⬆ 1.4kiB/s    &#xD;&#xA;2023-06-22 12:32:48  Idle (2 peers), best: #0 (0x3e1d…46c8), finalized #0 (0x3e1d…46c8), ⬇ 49 B/s ⬆ 49 B/s    &#xD;&#xA;2023-06-22 12:32:51  Starting consensus session on top of parent 0x3e1dd501b4db59fc98469a8aeb7a353a42c8a2b25e4699c0dd9b9c30112746c8    &#xD;&#xA;2023-06-22 12:32:51 [115] ‍♂️ Running migration with current storage version StorageVersion(3) / onchain StorageVersion(3)    &#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/maxsam4/fork-off-substrate&#xD;&#xA;  [2]: https://i.stack.imgur.com/tbWd4.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35821" PostHistoryTypeId="2" PostId="9060" RevisionGUID="4c296e4e-e9e9-4f7b-87d2-38e090e838b0" CreationDate="2023-06-29T05:21:19.677" UserId="354" Text="The error you mentioned above maybe coming due to the the `authority node`, when you are running your new nodes try to run it with `--validator` tag. It may solve your issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="35823" PostHistoryTypeId="2" PostId="9061" RevisionGUID="51749728-a43f-4ac9-8d01-0141b75190cb" CreationDate="2023-06-29T06:04:21.157" UserId="354" Text="The error you are getting might be due to the `api-version` of `polkajs explorer`, &#xD;&#xA;&#xD;&#xA;&gt; The bidding process is done but after the bidding I got this error.&#xD;&#xA;&#xD;&#xA;After bidding you were not able to get any slot because of the timings I can see in the screenshot that `ending period` is also `2 mins`, my guess is when you changed the timing of `epoch`, you didn't changed the time for `lease period`, so after the bidding ends your `launch period` starts but the `lease period` is still not active.&#xD;&#xA;&#xD;&#xA;`Lease period` should start before the bid ends so that you can launch your parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="35825" PostHistoryTypeId="50" PostId="8690" RevisionGUID="41dfb425-542a-4df0-98c7-040187a97d42" CreationDate="2023-06-29T06:09:16.240" UserId="-1" />
  <row Id="35826" PostHistoryTypeId="2" PostId="9062" RevisionGUID="5cb5403e-4fee-4e74-80c4-5f11c6b3d8df" CreationDate="2023-06-29T06:31:25.530" UserId="3414" Text="I was using xcm and while filling parameters in `destination`, i encountered through a field `Interior:xcmv2multilocationJunction`&#xD;&#xA; and i selected `x1` there . After that there is `x1:xcmv2Junction` which contains different options. My query is what is the use of `PalletInstance` there. Could anyone guide me through this." ContentLicense="CC BY-SA 4.0" />
  <row Id="35828" PostHistoryTypeId="1" PostId="9062" RevisionGUID="5cb5403e-4fee-4e74-80c4-5f11c6b3d8df" CreationDate="2023-06-29T06:31:25.530" UserId="3414" Text="How to use pallet Instance in xcm?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35829" PostHistoryTypeId="3" PostId="9062" RevisionGUID="5cb5403e-4fee-4e74-80c4-5f11c6b3d8df" CreationDate="2023-06-29T06:31:25.530" UserId="3414" Text="|polkadot|substrate-parachain-template|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35830" PostHistoryTypeId="2" PostId="9063" RevisionGUID="a29cc922-e916-4d18-9f13-7c9c389aac79" CreationDate="2023-06-29T06:42:42.947" UserId="354" Text="You need to update the modules according to new WeightV2, there might be some modules left in your code that needs to be udpated." ContentLicense="CC BY-SA 4.0" />
  <row Id="35832" PostHistoryTypeId="2" PostId="9064" RevisionGUID="3b64c5c9-f1e6-44b9-b71a-a13b176b9d46" CreationDate="2023-06-29T06:42:56.903" UserId="2372" Text="I'm going through the xcm and stumbled on junciton `PalletInstance`, and was wondering how to use it.&#xD;&#xA;I have 2 questions here:&#xD;&#xA;&#xD;&#xA; 1. Will I be able to call extrinsics of other chain via XCM?&#xD;&#xA; 2. Will I be able to modify the storage of a pallet on other chain?&#xD;&#xA;If someone could clarify the same it would be very helpful, and point to the relevant resources to read about it." ContentLicense="CC BY-SA 4.0" />
  <row Id="35834" PostHistoryTypeId="1" PostId="9064" RevisionGUID="3b64c5c9-f1e6-44b9-b71a-a13b176b9d46" CreationDate="2023-06-29T06:42:56.903" UserId="2372" Text="How to use PalletInstance in XCM?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35835" PostHistoryTypeId="3" PostId="9064" RevisionGUID="3b64c5c9-f1e6-44b9-b71a-a13b176b9d46" CreationDate="2023-06-29T06:42:56.903" UserId="2372" Text="|polkadot|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35836" PostHistoryTypeId="34" PostId="8704" RevisionGUID="e54bcb27-07e9-490a-929c-0041bf58e71a" CreationDate="2023-06-29T06:43:14.710" UserId="2372" Comment="24" />
  <row Id="35837" PostHistoryTypeId="5" PostId="9064" RevisionGUID="4957151c-9f8d-4aab-9f84-e6bef1b61107" CreationDate="2023-06-29T06:44:35.477" UserId="354" Comment="added 2 characters in body" Text="I'm going through the xcm and stumbled on junciton `PalletInstance`, and was wondering how to use it.&#xD;&#xA;I have 2 questions here:&#xD;&#xA;&#xD;&#xA; 1. Will I be able to call extrinsics of other chain via XCM?&#xD;&#xA; 2. Will I be able to modify the storage of a pallet on other chain?&#xD;&#xA;&#xD;&#xA;If someone could clarify the same it would be very helpful, and point to the relevant resources to read about it." ContentLicense="CC BY-SA 4.0" />
  <row Id="35838" PostHistoryTypeId="4" PostId="9062" RevisionGUID="8347a92e-2100-4d4c-8813-54b1efcff363" CreationDate="2023-06-29T06:46:31.173" UserId="3414" Comment="edited title" Text="How to use pallet Instance in Xcm?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35839" PostHistoryTypeId="5" PostId="9062" RevisionGUID="1d8988c0-c1aa-4227-925c-0c2f9692e80d" CreationDate="2023-06-29T06:48:38.747" UserId="354" Comment="deleted 4 characters in body; edited tags" Text="I was using xcm and while filling parameters in `destination`, I encountered through a field `Interior:xcmv2multilocationJunction`&#xD;&#xA; and i selected `x1` there . After that there is `x1:xcmv2Junction` which contains different options. &#xD;&#xA;&#xD;&#xA;My query is how to use `PalletInstance` there. Could anyone guide me through this." ContentLicense="CC BY-SA 4.0" />
  <row Id="35840" PostHistoryTypeId="6" PostId="9062" RevisionGUID="1d8988c0-c1aa-4227-925c-0c2f9692e80d" CreationDate="2023-06-29T06:48:38.747" UserId="354" Comment="deleted 4 characters in body; edited tags" Text="|polkadot|xcm|substrate-parachain-template|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35844" PostHistoryTypeId="2" PostId="9065" RevisionGUID="0267834c-5131-497a-b9bf-61d2b3145187" CreationDate="2023-06-29T08:20:36.853" UserId="2163" Text="I am testing some things out with XCM and I want to make a ROC token transfer from one Rococo account to another Rococo account using XCM. I am calling the `execute` extrinsic and providing the `TransferAsset` XCM message.&#xD;&#xA;&#xD;&#xA;For some reason the transfer doesn't occur, but the status of the extrinsic is successful: https://rococo.subscan.io/extrinsic/6027042-2" ContentLicense="CC BY-SA 4.0" />
  <row Id="35846" PostHistoryTypeId="1" PostId="9065" RevisionGUID="0267834c-5131-497a-b9bf-61d2b3145187" CreationDate="2023-06-29T08:20:36.853" UserId="2163" Text="XCM TransferAsset from one account to another account on Rococo doesn't work" ContentLicense="CC BY-SA 4.0" />
  <row Id="35847" PostHistoryTypeId="3" PostId="9065" RevisionGUID="0267834c-5131-497a-b9bf-61d2b3145187" CreationDate="2023-06-29T08:20:36.853" UserId="2163" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35848" PostHistoryTypeId="2" PostId="9066" RevisionGUID="7e4c35ab-0708-4ff3-9c55-f80b4415b37a" CreationDate="2023-06-29T09:02:54.713" UserId="4368" Text="I noticed that in the following code snippet, the `Env` associated type is not constrained to be `'static`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait ContractEnv {&#xD;&#xA;    /// The environment type.&#xD;&#xA;    type Env: crate::Environment;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm wondering why this is the case. If `Env` were `'static`, it would be possible to use it more easily in standalone `#[ink::trait_definition]` implementations, like so:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink::trait_definition]&#xD;&#xA;pub trait IAccount {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    fn validate_user_op(&#xD;&#xA;        &amp;self,&#xD;&#xA;        user_op: UserOperation&lt;Self::Env&gt;,&#xD;&#xA;        user_op_hash: Hash&lt;Self::Env&gt;,&#xD;&#xA;        missing_account_funds: Balance&lt;Self::Env&gt;,&#xD;&#xA;    ) -&gt; ValidationData&lt;Self::Env&gt;;&#xD;&#xA;}&#xD;&#xA;type Hash&lt;E&gt; = &lt;E as Environment&gt;::Hash;&#xD;&#xA;type Balance&lt;E&gt; = &lt;E as Environment&gt;::Balance;&#xD;&#xA;&#xD;&#xA;#[derive(scale::Encode, scale::Decode, Clone, Hash, Debug)]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;pub struct UserOperation&lt;E: Environment&gt; {&#xD;&#xA;    pub sender: E::AccountId,&#xD;&#xA;    pub nonce: u64,&#xD;&#xA;    pub init_code: Vec&lt;u8&gt;,&#xD;&#xA;    pub call_data: Vec&lt;u8&gt;,&#xD;&#xA;    pub call_gas_limit: E::Balance,&#xD;&#xA;    pub verification_gas_limit: E::Balance,&#xD;&#xA;    pub pre_verification_gas: E::Balance,&#xD;&#xA;    pub max_fee_per_gas: E::Balance,&#xD;&#xA;    pub max_priority_fee_per_gas: E::Balance,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm aware that there are workarounds for this issue, but they can be quite cumbersome. Is there a specific reason why `'static` was not added as a constraint for the `Env` associated type?&#xD;&#xA;&#xD;&#xA;Thank you for your time." ContentLicense="CC BY-SA 4.0" />
  <row Id="35850" PostHistoryTypeId="1" PostId="9066" RevisionGUID="7e4c35ab-0708-4ff3-9c55-f80b4415b37a" CreationDate="2023-06-29T09:02:54.713" UserId="4368" Text="Difficulty using #[ink::trait_definition] with non-'static associated type Env" ContentLicense="CC BY-SA 4.0" />
  <row Id="35851" PostHistoryTypeId="3" PostId="9066" RevisionGUID="7e4c35ab-0708-4ff3-9c55-f80b4415b37a" CreationDate="2023-06-29T09:02:54.713" UserId="4368" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35852" PostHistoryTypeId="5" PostId="8834" RevisionGUID="1f545613-0d4a-476e-a3d4-0d681fffeae3" CreationDate="2023-06-29T09:13:30.777" UserId="2372" Comment="added 2 characters in body" Text="I want to decode bytes on solidity side to that was decoded with scale codec.&#xD;&#xA;Is the any implementation of `scale codec`. (decode) on solidity side?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35853" PostHistoryTypeId="5" PostId="8792" RevisionGUID="94eac461-6f96-455d-be48-a898fc6cc287" CreationDate="2023-06-29T09:14:11.177" UserId="2372" Comment="edited body" Text="How can I obtain the Polkadot release version in Rust that my node was compiled against?  I want to log it at node startup.  e.g.  `Polkadot-0.9.42`" ContentLicense="CC BY-SA 4.0" />
  <row Id="35854" PostHistoryTypeId="5" PostId="8781" RevisionGUID="a7c07c41-18d7-44cc-a12f-8f76059fcf08" CreationDate="2023-06-29T09:14:37.393" UserId="2372" Comment="added 1 character in body" Text="I've seen some Substrate repo's where the `SessionKeys` (Aura, Babe, Grandpa, etc) are used with `unchecked_into()` .While the `stash/controller` keys are only used with `into()`. &#xD;&#xA;These are some examples:&#xD;&#xA;- Substrate: [Link](https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L90)&#xD;&#xA;- EdgeWare: [Link](https://github.com/edgeware-network/edgeware-node/blob/master/node/cli/src/mainnet_fixtures.rs#L256)&#xD;&#xA;- ChainX: [Link](https://github.com/chainx-org/ChainX/blob/develop-2022/cli/src/chain_spec.rs#L280)&#xD;&#xA;&#xD;&#xA;Can someone please explain the actual reasoning behind this? " ContentLicense="CC BY-SA 4.0" />
  <row Id="35855" PostHistoryTypeId="5" PostId="8732" RevisionGUID="ed789c91-edd8-4324-92d6-ec661e2b60b2" CreationDate="2023-06-29T09:15:33.573" UserId="2372" Comment="added 2 characters in body" Text="I'm customising the `srtool (Substrate runtime toolbox)` for our chain built based on `substrate`.&#xD;&#xA;&#xD;&#xA;The srtool docker image was built successful, but when Github running test against myChain, it failed with an error&#xD;&#xA;```&#xD;&#xA;  Rust nightly not installed, please install it!&#xD;&#xA;  parse error: Invalid numeric literal at line 1, column 2&#xD;&#xA;  Error: Process completed with exit code 4.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here's how rustup was updated, and toolchain are installed and target is setup in In `Dockerfile`&#xD;&#xA;```sh&#xD;&#xA;RUN echo $SHELL &amp;&amp; \&#xD;&#xA;    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain $RUSTC_VERSION -y  &amp;&amp; \&#xD;&#xA;    . $CARGO_HOME/env &amp;&amp; \&#xD;&#xA;    rustup myChain add stable ${RUSTC_VERSION} &amp;&amp; \&#xD;&#xA;    rustup target add wasm32-unknown-unknown --toolchain $RUSTC_VERSION &amp;&amp; \&#xD;&#xA;    chmod -R a+w $RUSTUP_HOME $CARGO_HOME &amp;&amp; \&#xD;&#xA;    rustup show &amp;&amp; rustc -V&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Not sure why the docker image was built successfully with nightly, but failed in the test.&#xD;&#xA;```&#xD;&#xA;      - name: Run srtool build for ${{ matrix.chain }}&#xD;&#xA;        id: srtool_build&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35858" PostHistoryTypeId="5" PostId="4813" RevisionGUID="a4377516-ac45-4d52-b82a-e66e1cf67eb7" CreationDate="2023-06-29T09:18:46.237" UserId="2372" Comment="added 2 characters in body" Text="Imagine I have a `on_initialize` hook like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	    fn on_initialize(n: T::BlockNumber) -&gt; Weight {&#xD;&#xA;            return T::DbWeight::get().writes(1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'd like a test that can verify the hook, something like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;	#[test]&#xD;&#xA;	fn valid_weights() {&#xD;&#xA;		new_test_ext().execute_with(|| {&#xD;&#xA;			assert_eq!(&#xD;&#xA;                &lt;MyPallet as OnInitialize&lt;u64&gt;&gt;::on_initialize(1),&#xD;&#xA;			    &lt;TestRuntime as sp_weights&gt;::DbWeight::get().writes(2) //&lt;-- sp_weight is unknown&#xD;&#xA;			);&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;/!\ I use substrate branch `polkadot-v0.9.22`, where sp_weight is not available as a package, so I can't import it&#xD;&#xA;&#xD;&#xA;the problem is... That I can't find a way to do it. I couldn't find a way to use something like `Test::DbWeight::get().writes(1)`, the closest I could get was this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;	&lt;&lt;TestRuntime as frame_system::Config&gt;::DbWeight&gt;::get().reads(1)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   type annotations needed&#xD;&#xA;   cannot infer type for type parameter `T` declared on the trait `Get`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35859" PostHistoryTypeId="5" PostId="5951" RevisionGUID="a7d9df99-63d6-44f8-af1b-cc3e6906a7b2" CreationDate="2023-06-29T09:18:57.333" UserId="2372" Comment="edited body" Text="I watched polkadot seminar on benchmarking here:&#xD;&#xA;&#xD;&#xA;https://www.youtube.com/watch?v=Qa6sTyUqgek&amp;t=9177s&#xD;&#xA;&#xD;&#xA;Can any one please guid how to benchmark a pallet public functions? more ever, it will be nice if there is some example with step wise explanation &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35860" PostHistoryTypeId="5" PostId="8643" RevisionGUID="1871b8cc-90e8-44f6-b812-635a8d0bd4e7" CreationDate="2023-06-29T09:19:27.890" UserId="2372" Comment="added 6 characters in body" Text="I started working from the [substrate-parachain-template](https://github.com/substrate-developer-hub/substrate-parachain-template) and added the `pallet_contracts` to the runtime. When I open the Contracts UI, I'm getting the error message that states the node does not support WeightV2. I can't find any documentation related to this or how to modify the runtime to upgrade the weight. Here is the [parachain-contracts-node](https://github.com/ok-Alice/parachain-contracts-node).&#xD;&#xA;&#xD;&#xA;[![Unsupported node version WeightV2][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VpbyV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="35861" PostHistoryTypeId="5" PostId="8968" RevisionGUID="78422480-5313-401c-a20f-10655be91c2f" CreationDate="2023-06-29T10:51:49.183" UserId="2372" Comment="added 2 characters in body" Text="I'm working with a `Substrate blockchain` and have a structure with a field named end_date. I'd like to check if the current date is greater than end_date within a Substrate runtime module, but I'm unsure how to implement this.&#xD;&#xA;&#xD;&#xA;How can I retrieve the current date from the Substrate framework, and then compare it to end_date?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35862" PostHistoryTypeId="5" PostId="8952" RevisionGUID="ca92a2c4-1d92-4200-b412-3d1054606b00" CreationDate="2023-06-29T10:52:03.530" UserId="2372" Comment="added 4 characters in body" Text="After instantiating a contract using the `CreateBuilder` as shown [here][1].&#xD;&#xA;If I then try to call the contract using `CallBuilder` as shown [here][2] and use `#[ink(message, payable)]` in the callee message of the contract being called as shown [here][3] it only compiles if I use `.transferred_value(0)` with a transfer value of `0`.&#xD;&#xA;&#xD;&#xA;But if I follow the ink! cross-contract documentation [here][4] and change the transfer value to a non-zero value as they use in their examples, it always results in `TransferFailed` error. Note: I also get the error when just using the Contracts Ref Approach without the Builders Approach.&#xD;&#xA;&#xD;&#xA;Why can't I pass a non-zero value to `transferred_value`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ltfschoen/InkTemplate/pull/16/files#diff-84af1add043372bf3be8123a2d3477b5f1d436cc0dbbf322c0bcd3c99249adb2R45&#xD;&#xA;  [2]: https://github.com/ltfschoen/InkTemplate/pull/16/files#diff-84af1add043372bf3be8123a2d3477b5f1d436cc0dbbf322c0bcd3c99249adb2R69&#xD;&#xA;  [3]: https://github.com/ltfschoen/InkTemplate/pull/16/files#diff-16556624fa5972a5348e9b062eb7965d702c694b78d5190aa7097dc66d70a79bR35&#xD;&#xA;  [4]: https://use.ink/basics/cross-contract-calling#builders" ContentLicense="CC BY-SA 4.0" />
  <row Id="35863" PostHistoryTypeId="5" PostId="8924" RevisionGUID="4fc8120f-7d78-4164-90ec-5a6a324872b2" CreationDate="2023-06-29T10:52:43.670" UserId="2372" Comment="deleted 1 character in body" Text="In subxt we can have Rust types directly from scale-encoded runtime metadata. Is the same possible in polkadotjs? Is there a &quot;polkadots&quot; which has typescript types automatically derived from runtime metadata?&#xD;&#xA;&#xD;&#xA;- doc https://polkadot.js.org/docs/api/start/types.create" ContentLicense="CC BY-SA 4.0" />
  <row Id="35864" PostHistoryTypeId="5" PostId="8917" RevisionGUID="dcfb642d-e571-4bbf-9606-407a44e8095f" CreationDate="2023-06-29T10:53:10.017" UserId="2372" Comment="added 2 characters in body" Text="I want to execute extra logic when xcm call deliver and deposit succeed.&#xD;&#xA;I can pass extra parameters in beneficiary MultiLocation with a description what todo next.&#xD;&#xA;I have a MultiLocation &#xD;&#xA;MultiLocation { &#xD;&#xA;        parents: 0, interior: X4(&#xD;&#xA;		PalletInstance(pallet_id), &#xD;&#xA;		AccountId32{ id, network: None }, &#xD;&#xA;		GeneralIndex(chain_id), &#xD;&#xA;		AccountId32{ id: _, network: None } ) } =&gt; id,&#xD;&#xA;&#xD;&#xA;This is beneficiary in xcm `(reserve_transfer_assets xcmPallet)`&#xD;&#xA;&#xD;&#xA;I want to use AccountId32 from MultiLocation to send received xcm tokens on that account  but also apply/execute extra logic depends on other parameters as PalletInstance and GeneralIndex. &#xD;&#xA;&#xD;&#xA;I want your advise.&#xD;&#xA;Is it reasonable approach?&#xD;&#xA;&#xD;&#xA;I have this Location into Account Id convertor&#xD;&#xA;&#xD;&#xA;    pub struct AccountId32Batch&lt;AccountId&gt;(PhantomData&lt;AccountId&gt;);&#xD;&#xA;    impl&lt;AccountId: From&lt;[u8; 32]&gt; + Into&lt;[u8; 32]&gt; + Clone&gt;&#xD;&#xA;    	xcm_executor::traits::Convert&lt;MultiLocation, AccountId&gt; for AccountId32Batch&lt;AccountId&gt;&#xD;&#xA;    {&#xD;&#xA;    	fn convert(location: MultiLocation) -&gt; Result&lt;AccountId, MultiLocation&gt; {&#xD;&#xA;    		let id = match location {&#xD;&#xA;    			MultiLocation { parents: 0, interior: X4(&#xD;&#xA;    				PalletInstance(_), &#xD;&#xA;    				AccountId32{ id, network: None }, &#xD;&#xA;    				GeneralIndex(_), &#xD;&#xA;    				AccountId32{ id: _, network: None } ) } =&gt; id,&#xD;&#xA;    			_ =&gt; return Err(location),&#xD;&#xA;    		};&#xD;&#xA;    		Ok(id.into())&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	fn reverse(who: AccountId) -&gt; Result&lt;MultiLocation, AccountId&gt; {&#xD;&#xA;    		Err(who)&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I want to execute extra logic when deposit succeeded.&#xD;&#xA;There is no `on_success_callback` in MultiCurrency. only on_failed&#xD;&#xA;https://github.com/open-web3-stack/open-runtime-module-library/blob/master/xcm-support/src/currency_adapter.rs#L148-L161&#xD;&#xA;&#xD;&#xA;So i will create wrapper for MultiCurrency to pass callback function that will be executed when deposit is succeed.&#xD;&#xA;&#xD;&#xA;What do you think about this approach?&#xD;&#xA;Did you ever see any similar behaviour that apply extra logic on deposit/withdraw success? " ContentLicense="CC BY-SA 4.0" />
  <row Id="35865" PostHistoryTypeId="5" PostId="8865" RevisionGUID="9295a2ea-b55f-4e8a-a88f-8698c51b3890" CreationDate="2023-06-29T10:53:44.780" UserId="2372" Comment="added 2 characters in body" Text="My overall goal is to build a generic extrinsic builder, just like the extrinsic tab from `polkadot-js/apps`. This code is very old and very hard to decipher unfortunately and I couldn't find any doc for this.&#xD;&#xA;&#xD;&#xA;The UI lists all the pallets and their methods. The next step is to show all the arguments for each method, with JS/TS types corresponding to the Rust types.&#xD;&#xA;&#xD;&#xA;I'm taking a very specific type as an example and we can go from there.&#xD;&#xA;&#xD;&#xA;The `democracy.vote` call takes the following arguments&#xD;&#xA; - `{ name: &quot;refIndex&quot;, type: &quot;Compact&lt;u32&gt;&quot;, typeName: &quot;ReferendumIndex&quot; }`  &#xD;&#xA; this translates to an integer. &#xD;&#xA; - `{ name: &quot;vote&quot;, type: &quot;PalletDemocracyVoteAccountVote&quot;, typeName: &quot;AccountVote&quot; }`  &#xD;&#xA;this is more complex and is the reason why I post here.&#xD;&#xA;&#xD;&#xA;Here is how I get this:&#xD;&#xA;```js&#xD;&#xA;import { getTypeDef } from '@polkadot/types/create'&#xD;&#xA;&#xD;&#xA;const arg = api.tx[&quot;democracy&quot;][&quot;vote&quot;].meta.args[1]&#xD;&#xA;const argTypeDef = getTypeDef(arg.type)&#xD;&#xA;console.log('argTypeDef', argTypeDef)&#xD;&#xA;// { name: &quot;vote&quot;, type: &quot;PalletDemocracyVoteAccountVote&quot;, typeName: &quot;AccountVote&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, under the hood, this type `AccountVote` is an enum as seen in the [rust doc][1]. It has other nested types such as `Vote` and `Conviction`&#xD;&#xA;&#xD;&#xA;How would you go about coming from the `AccountVote` to have something incrementally translated into JS, which is what I could pass the the api to construct this call?&#xD;&#xA;```js&#xD;&#xA;{&#xD;&#xA;    Standard {&#xD;&#xA;        vote: {&#xD;&#xA;          aye: boolean,&#xD;&#xA;          conviction: string&#xD;&#xA;        },&#xD;&#xA;        balance: string,&#xD;&#xA;    },&#xD;&#xA;    Split {&#xD;&#xA;        aye: string,&#xD;&#xA;        nay: string,&#xD;&#xA;    },&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The closest I came is to create an instance of this type, but it initializes it with the defaults so we're missing part of the information.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const instance = argTypeDef.type &amp;&amp; api.registry.createType(argTypeDef.type)&#xD;&#xA;console.log(instance.toHuman())&#xD;&#xA;// {&#xD;&#xA;//  &quot;Standard&quot;: {&#xD;&#xA;//    &quot;vote&quot;: {&#xD;&#xA;//      &quot;conviction&quot;: &quot;None&quot;,&#xD;&#xA;//      &quot;vote&quot;: &quot;Nay&quot;&#xD;&#xA;//    },&#xD;&#xA;//    &quot;balance&quot;: &quot;0&quot;&#xD;&#xA;//  }&#xD;&#xA;//}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/pallet-democracy/latest/pallet_democracy/enum.AccountVote.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="35866" PostHistoryTypeId="5" PostId="8995" RevisionGUID="2ea709c0-6304-4a22-b5fd-9273527662d9" CreationDate="2023-06-29T10:54:20.700" UserId="2372" Comment="added 2 characters in body" Text="I want to call an external RPC method from the `offchain_worker`. I checked multiple jsonrpc clients but none of them were `no_std` compatible. I want to know if there are any clients out there which can be used within the ocw of `substrate`.&#xD;&#xA;&#xD;&#xA;I also tried to call the RPCs using `sp_runtime::offchain::http::Request`, but couldn't find an example of `post` method, any examples/help would be much appreciated.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;[EDIT]&#xD;&#xA;just found an example of the latter part [here](https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-http-requests/#read-and-submit-the-response), so please just let me know if there are `no_std` jsonrpc clients out there." ContentLicense="CC BY-SA 4.0" />
  <row Id="35867" PostHistoryTypeId="5" PostId="8471" RevisionGUID="3f40404f-bf57-4dcc-9de5-11f8a9c8e930" CreationDate="2023-06-29T10:54:41.923" UserId="2372" Comment="added 2 characters in body" Text="i have an rpc call that returns an array of structs with multiple fields, one of which is balance of an asset for a user, balance type is u128. when the number is large i get this error createType(u128):: Number needs to be an integer `&lt;= Number.MAX_SAFE_INTEGER`, i.e. 2 ^ 53 - 1. I have tried specifying different types to make it cast to u128 but rpc kept failing. CURL for the rpc works in terminal and returns large numbers. Seems like the problem on JS, what can i do to be able to be to parse the structs such that the value of balance is a valid number, possibly a BigInt? Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35868" PostHistoryTypeId="5" PostId="7666" RevisionGUID="3b20d6a6-9f09-4a6c-8ce4-de13117b7cae" CreationDate="2023-06-29T10:54:59.973" UserId="2372" Comment="added 2 characters in body" Text="why the two ways to get `blockhash` is not same ?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vmKiH.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35869" PostHistoryTypeId="5" PostId="7020" RevisionGUID="d747eb2c-938a-475a-b952-369385d9a8da" CreationDate="2023-06-29T10:55:17.457" UserId="2372" Comment="added 2 characters in body" Text="I have `custom RPC`, which looks like so&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[rpc(client, server)]&#xD;&#xA;pub trait SomeRpcApi {&#xD;&#xA;	#[method(name = &quot;some_submitData&quot;)]&#xD;&#xA;	async fn submit_data(&#xD;&#xA;		&amp;self,&#xD;&#xA;        id: u64,&#xD;&#xA;		message: [u8; 32],&#xD;&#xA;	) -&gt; RpcResult&lt;()&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and I'm trying to call it using this TS script&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;    provider: wsProvider,&#xD;&#xA;    rpc: {&#xD;&#xA;        some: {&#xD;&#xA;            submitData: {&#xD;&#xA;                description: '',&#xD;&#xA;                params: [&#xD;&#xA;                    {&#xD;&#xA;                        name: 'id',&#xD;&#xA;                        type: 'u64'&#xD;&#xA;                    },&#xD;&#xA;                    {&#xD;&#xA;                        name: 'message',&#xD;&#xA;                        type: '[u8; 32]'&#xD;&#xA;                    }&#xD;&#xA;                ],&#xD;&#xA;                type: 'RpcResult&lt;((), u32)&gt;'&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;const message = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32]);&#xD;&#xA;const id = api.createType('u64', 1);&#xD;&#xA;const data = api.createType('[u8; 32]', message);&#xD;&#xA;const resp = await api.rpc.time.submitForSigning(id, data);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;bun on submitting I'm getting this error:&#xD;&#xA;&#xD;&#xA;&gt;  RPC-CORE: submitData(id: u64, message: [u8; 32]):&#xD;&#xA;&gt; RpcResult&lt;((), u32)&gt;:: -32602: invalid type: string&#xD;&#xA;&gt; &quot;0x1ddf7f02f19991b8e2b56d7e325f05835bb1d66b5c0d87ba98b4230f2a28c085&quot;,&#xD;&#xA;&gt; expected a sequence at line 1 column 68&#xD;&#xA;&#xD;&#xA;Where's the issue here? Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="35872" PostHistoryTypeId="5" PostId="9007" RevisionGUID="28de980b-3f69-4717-924a-664f50dc4ad8" CreationDate="2023-06-29T10:59:19.493" UserId="2372" Comment="edited body" Text="When building a Substrate-project, I receive the following error: `protoc failed: bitswap.v1.2.0.proto: No such file or directory`" ContentLicense="CC BY-SA 4.0" />
  <row Id="35873" PostHistoryTypeId="5" PostId="9006" RevisionGUID="9d1a3bcc-7b66-4f3f-af43-ea51cc6d9560" CreationDate="2023-06-29T11:00:01.410" UserId="2372" Comment="added 1 character in body" Text="The `set_keys` extrinsic in `pallet_session` has a second argument [`proof`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/frame/session/src/lib.rs#L588), which seems to be intended as an ownership proof of the `keys`.&#xD;&#xA;&#xD;&#xA;Looking at the body, there is a call to [`ownership_proof_is_valid`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/frame/session/src/lib.rs#L590).&#xD;&#xA;&#xD;&#xA;The `ownership_proof_is_valid` method is defined on the [`OpaqueKeys`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/primitives/runtime/src/traits.rs#L1724-L1725) trait, with a default implementation that just returns `true`.&#xD;&#xA;&#xD;&#xA;The intended way to implement `OpaqueKeys` is, as far as I know, to use the [`impl_opaque_keys` macro](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/primitives/runtime/src/traits.rs#L2047). That macro, however generates an implementation that does not [override the default implementation of `ownership_proof_is_valid`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/primitives/runtime/src/traits.rs#L1990-L2018).&#xD;&#xA;&#xD;&#xA;It seems to me, then, that in practice `ownership_proof_is_valid` will always return `true`. If that's the case, what is the purpose of the `proof` argument ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35874" PostHistoryTypeId="5" PostId="8998" RevisionGUID="b38aec73-ab92-469f-b673-dc87bf70e84c" CreationDate="2023-06-29T11:01:12.840" UserId="2372" Comment="added 2 characters in body" Text="i wanna add a new pallet in substrate `runtime.rs`&#xD;&#xA; &#xD;&#xA;this is the contract of the file : &#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    /// Edit this file to define custom logic or remove it if it is not needed.&#xD;&#xA;    /// Learn more about FRAME and the core library of Substrate FRAME pallets:&#xD;&#xA;    /// &lt;https://docs.substrate.io/reference/frame-pallets/&gt;&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod mock;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests;&#xD;&#xA;    &#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    mod benchmarking;&#xD;&#xA;    pub mod weights;&#xD;&#xA;    pub use weights::*;&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    	use super::*;&#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    		/// Type representing the weight of this pallet&#xD;&#xA;    		type WeightInfo: WeightInfo;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// The pallet's runtime storage items.&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/runtime-storage/&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn something)]&#xD;&#xA;    	// Learn more about declaring storage items:&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/runtime-storage/#declaring-storage-items&#xD;&#xA;    	pub type Something&lt;T&gt; = StorageValue&lt;_, u32&gt;;&#xD;&#xA;    &#xD;&#xA;    	// Pallets use events to inform users when important changes are made.&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/events-errors/&#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// Event documentation should end with an array that provides descriptive names for event&#xD;&#xA;    		/// parameters. [something, who]&#xD;&#xA;    		SomethingStored { something: u32, who: T::AccountId },&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Errors inform users that something went wrong.&#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// Error names should be descriptive.&#xD;&#xA;    		NoneValue,&#xD;&#xA;    		/// Errors should have helpful documentation associated with them.&#xD;&#xA;    		StorageOverflow,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Dispatchable functions allows users to interact with the pallet and invoke state changes.&#xD;&#xA;    	// These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;    	// Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		/// An example dispatchable that takes a singles value as a parameter, writes the value to&#xD;&#xA;    		/// storage and emits an event. This function must be dispatched by a signed extrinsic.&#xD;&#xA;    		#[pallet::call_index(0)]&#xD;&#xA;    		#[pallet::weight(T::WeightInfo::do_something())]&#xD;&#xA;    		pub fn do_something(origin: OriginFor&lt;T&gt;, something: u32) -&gt; DispatchResult {&#xD;&#xA;    			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;    			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;    			// https://docs.substrate.io/main-docs/build/origins/&#xD;&#xA;    			let who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Update storage.&#xD;&#xA;    			&lt;Something&lt;T&gt;&gt;::put(something);&#xD;&#xA;    &#xD;&#xA;    			// Emit an event.&#xD;&#xA;    			Self::deposit_event(Event::SomethingStored { something, who });&#xD;&#xA;    			// Return a successful DispatchResultWithPostInfo&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		/// An example dispatchable that may throw a custom error.&#xD;&#xA;    		#[pallet::call_index(1)]&#xD;&#xA;    		#[pallet::weight(T::WeightInfo::cause_error())]&#xD;&#xA;    		pub fn cause_error(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;    			let _who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Read a value from storage.&#xD;&#xA;    			match &lt;Something&lt;T&gt;&gt;::get() {&#xD;&#xA;    				// Return an error if the value has not been set.&#xD;&#xA;    				None =&gt; return Err(Error::&lt;T&gt;::NoneValue.into()),&#xD;&#xA;    				Some(old) =&gt; {&#xD;&#xA;    					// Increment the value read from storage; will error in the event of overflow.&#xD;&#xA;    					let new = old.checked_add(1).ok_or(Error::&lt;T&gt;::StorageOverflow)?;&#xD;&#xA;    					// Update the value in storage with the incremented result.&#xD;&#xA;    					&lt;Something&lt;T&gt;&gt;::put(new);&#xD;&#xA;    					Ok(())&#xD;&#xA;    				},&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;and i added this line in runtime `cargo.toml` : &#xD;&#xA;&#xD;&#xA;    pallet-acn = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../../../frame/acn&quot; }&#xD;&#xA;    &#xD;&#xA;    &quot;pallet-acn/std&quot;,&#xD;&#xA;&#xD;&#xA; i add this code in runtime file : &#xD;&#xA;&#xD;&#xA;    impl pallet_acn::Config for Runtime {&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type WeightInfo = pallet_acn::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    construct_runtime!(&#xD;&#xA;    		ACN:pallet_acn,&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;and i wanna run the `cargo check` , i faced this error :&#xD;&#xA;&#xD;&#xA;    the function or associated item `offchain_worker` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;MultiAddress&lt;AccountId32, u32&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckMortality&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeAssetTxPayment&lt;Runtime&gt;)&gt;&gt;, ChainContext&lt;Runtime&gt;, Runtime, (Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance1&gt;, Pallet&lt;Runtime, Instance2&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance1&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance1&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance3&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime, Instance2&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;, Pallet&lt;Runtime&gt;), (MigrateToV2&lt;Runtime&gt;, Migration&lt;Runtime&gt;, Migration&lt;Runtime&gt;)&gt;`, but its trait bounds were not satisfied&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and when i removed this two line , every thing will be fine .&#xD;&#xA;&#xD;&#xA;[Complete Error File][1]&#xD;&#xA;&#xD;&#xA;[Runtime File][2]&#xD;&#xA;&#xD;&#xA;**whats the problem ?**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://gist.github.com/Kianoush-Dortaj/4622bbe340689ac8c676e6c13617e01a&#xD;&#xA;  [2]: https://gist.github.com/Kianoush-Dortaj/7995d95ddd968f24fdf3ac311234d56a" ContentLicense="CC BY-SA 4.0" />
  <row Id="35875" PostHistoryTypeId="5" PostId="8979" RevisionGUID="b92fd598-7928-468b-bba4-d2b2c72adac0" CreationDate="2023-06-29T11:01:29.583" UserId="2372" Comment="added 2 characters in body" Text="What is required from a technical point of view `(specific pallets and APIs)` for parachains to support light clients? I saw that only a few parachains have the option to interact with the light clients." ContentLicense="CC BY-SA 4.0" />
  <row Id="35876" PostHistoryTypeId="5" PostId="7444" RevisionGUID="29520215-54e2-4263-978b-38b346dde471" CreationDate="2023-06-29T11:02:26.477" UserId="2372" Comment="added 2 characters in body" Text="I'm currently exploring the possibility of having one solochain governed by another `solochain` using XCM and a trustless bridge. From my understanding, XCM is a communication standard used to facilitate cross-consensus communication, and a trustless bridge enables interoperability between chains without requiring any trust between them.&#xD;&#xA;&#xD;&#xA;However, I'm not entirely sure how this would work in practice. Can anyone shed some light on how one solochain can govern another in this way? Are there any potential limitations or downsides to this approach? &#xD;&#xA;&#xD;&#xA;Thank you in advance for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35877" PostHistoryTypeId="5" PostId="6520" RevisionGUID="a8727e79-1c87-42ab-87f2-717d48e39549" CreationDate="2023-06-29T11:02:40.053" UserId="2372" Comment="added 2 characters in body" Text="I am looking for a bridging solution between EVM compatible chains and a substrate-based solo chain (i.e. not a parachain).&#xD;&#xA;The bridges is purely for cross chain asset transfer.&#xD;&#xA;I am aware of the [parity bridges common][1] framework. However I was looking for a more high level solution, such as [`Darwinia`][2], however it doesn’t support Polygon yet (for example)&#xD;&#xA;What solutions do you recommend?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/parity-bridges-common/find/master&#xD;&#xA;  [2]: https://darwinia.network/" ContentLicense="CC BY-SA 4.0" />
  <row Id="35878" PostHistoryTypeId="5" PostId="8477" RevisionGUID="9a63ecec-6370-45fc-92a5-75ffc3120fc8" CreationDate="2023-06-29T11:05:00.373" UserId="2372" Comment="added 2 characters in body" Text="I notice that in the node-template there is `BlockWeights` and some differences in weights compared to the `&quot;kitchensink&quot;` runtime where we have `RuntimeBlockWeights`.&#xD;&#xA;&#xD;&#xA;What is the difference between `BlockWeights` and `RuntimeBlockWeights`? Is there a reason why both runtimes are not the same?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const BlockHashCount: BlockNumber = 2400;&#xD;&#xA;	pub const Version: RuntimeVersion = VERSION;&#xD;&#xA;	/// We allow for 2 seconds of compute with a 6 second average block time.&#xD;&#xA;	pub BlockWeights: frame_system::limits::BlockWeights =&#xD;&#xA;		frame_system::limits::BlockWeights::with_sensible_defaults(&#xD;&#xA;			Weight::from_parts(2u64 * WEIGHT_REF_TIME_PER_SECOND, u64::MAX),&#xD;&#xA;			NORMAL_DISPATCH_RATIO,&#xD;&#xA;		);&#xD;&#xA;	pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength&#xD;&#xA;		::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);&#xD;&#xA;	pub const SS58Prefix: u8 = 42;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/2fc9c39a9fb9f38b6256f82cda4c955eb0de2706/bin/node-template/runtime/src/lib.rs#LL136C1-L150C2&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// We assume that ~10% of the block weight is consumed by `on_initialize` handlers.&#xD;&#xA;/// This is used to limit the maximal weight of a single extrinsic.&#xD;&#xA;const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);&#xD;&#xA;/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used&#xD;&#xA;/// by  Operational  extrinsics.&#xD;&#xA;const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);&#xD;&#xA;/// We allow for 2 seconds of compute with a 6 second average block time, with maximum proof size.&#xD;&#xA;const MAXIMUM_BLOCK_WEIGHT: Weight =&#xD;&#xA;	Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const BlockHashCount: BlockNumber = 2400;&#xD;&#xA;	pub const Version: RuntimeVersion = VERSION;&#xD;&#xA;	pub RuntimeBlockLength: BlockLength =&#xD;&#xA;		BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);&#xD;&#xA;	pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()&#xD;&#xA;		.base_block(BlockExecutionWeight::get())&#xD;&#xA;		.for_class(DispatchClass::all(), |weights| {&#xD;&#xA;			weights.base_extrinsic = ExtrinsicBaseWeight::get();&#xD;&#xA;		})&#xD;&#xA;		.for_class(DispatchClass::Normal, |weights| {&#xD;&#xA;			weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);&#xD;&#xA;		})&#xD;&#xA;		.for_class(DispatchClass::Operational, |weights| {&#xD;&#xA;			weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT);&#xD;&#xA;			// Operational transactions have some extra reserved space, so that they&#xD;&#xA;			// are included even if block reached `MAXIMUM_BLOCK_WEIGHT`.&#xD;&#xA;			weights.reserved = Some(&#xD;&#xA;				MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT&#xD;&#xA;			);&#xD;&#xA;		})&#xD;&#xA;		.avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)&#xD;&#xA;		.build_or_panic();&#xD;&#xA;	pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/substrate/blob/2fc9c39a9fb9f38b6256f82cda4c955eb0de2706/bin/node/runtime/src/lib.rs#L180-L214" ContentLicense="CC BY-SA 4.0" />
  <row Id="35879" PostHistoryTypeId="5" PostId="7952" RevisionGUID="65c0230e-5692-43a3-a49e-a1c251c358c2" CreationDate="2023-06-29T11:05:45.180" UserId="2372" Comment="added 2 characters in body" Text="We have two instances of a pallet with different runtime configurations. How can we run the benchmarks separately to generate two distinct sets of weights?&#xD;&#xA;&#xD;&#xA;As far as I can tell this is not possible and if you list multiple pallet instances (such as in the `kusama runtime` [here](https://github.com/paritytech/polkadot/blob/dc230b323b5baeb9b4297430ed539b208d30bf6a/runtime/kusama/src/lib.rs#L1556-L1557)) it will use the last instance." ContentLicense="CC BY-SA 4.0" />
  <row Id="35880" PostHistoryTypeId="5" PostId="1990" RevisionGUID="6c004c1f-7325-4d68-86cc-cad3e17eaef2" CreationDate="2023-06-29T11:05:45.420" UserId="354" Comment="added 4 characters in body" Text="When trying to migrate the runtime from a very early version of `substrate 3 (aug 2021)` to `polkadot 0.9.18` we are getting the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Failed to extract the runtime version from the new runtime., ,  Either calling `Core_version` or decoding `RuntimeVersion` failed.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Following RuntimeVersion struct was defined:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub const VERSION: RuntimeVersion = RuntimeVersion {&#xD;&#xA;	spec_name: create_runtime_str!(&quot;substrate-threefold&quot;),&#xD;&#xA;	impl_name: create_runtime_str!(&quot;substrate-threefold&quot;),&#xD;&#xA;	authoring_version: 1,&#xD;&#xA;	// The version of the runtime specification. A full node will not attempt to use its native&#xD;&#xA;	//   runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,&#xD;&#xA;	//   `spec_version`, and `authoring_version` are the same between Wasm and native.&#xD;&#xA;	// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use&#xD;&#xA;	//   the compatible custom types.&#xD;&#xA;	spec_version: 100,&#xD;&#xA;	impl_version: 1,&#xD;&#xA;	apis: RUNTIME_API_VERSIONS,&#xD;&#xA;	transaction_version: 2,&#xD;&#xA;	state_version: 0,&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I read that `state_version` should be set to 0 in order to perform the migration. But it seems like it's not working." ContentLicense="CC BY-SA 4.0" />
  <row Id="35881" PostHistoryTypeId="5" PostId="7814" RevisionGUID="eb01e11c-2820-4d85-ae8e-9626c00363f7" CreationDate="2023-06-29T11:05:58.400" UserId="2372" Comment="added 2 characters in body" Text="We're updating our weights to `weights 2.0` but we're getting a lot of `Proof Skipped` lines in the output. What is the impact of this, and how do we fix it?&#xD;&#xA;&#xD;&#xA;Example output:&#xD;&#xA;```&#xD;&#xA;/// Proof Skipped: Escrow Locked (max_values: None, max_size: None, mode: Measured)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35882" PostHistoryTypeId="5" PostId="8982" RevisionGUID="5400134a-ffe1-49b8-8b4a-4c9b3663da9b" CreationDate="2023-06-29T11:06:56.787" UserId="2372" Comment="added 2 characters in body" Text="I want to create a node with a different syncing logic than `SyncingEngine` (I have my own struct that implements the same API as `SyncingEngine`). To be clear, I want to use the substrate `NetworkService`&#xD;&#xA;&#xD;&#xA;How can I do that? This is what I tried to do:&#xD;&#xA;&#xD;&#xA;The function `build_network` in the client builds a `NetworkService` and spawns a thread that runs a `SyncingEngine`. I tried to copy it to my repo and change the usage of `SyncingEngine` with my own struct. The problem was that it uses private functions/structs (`build_network_future`, `build_system_rpc_future` and `TransactionPoolAdapter`)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35883" PostHistoryTypeId="5" PostId="8948" RevisionGUID="fefc01b7-4224-4132-90c1-95ca8a52068f" CreationDate="2023-06-29T11:07:09.013" UserId="2372" Comment="added 2 characters in body" Text="I think this should be split into 2 questions:&#xD;&#xA;&#xD;&#xA; 1. How many total collators can a `parachain` have ?&#xD;&#xA; 2. How many collators can collate at the same block height ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I suspect those number would be approximative but also are dependent of the network settings of the validators of the given network (Kusama, Polkadot) ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35884" PostHistoryTypeId="5" PostId="6550" RevisionGUID="26b80626-7318-4334-8132-f9c3d4664444" CreationDate="2023-06-29T11:07:26.117" UserId="2372" Comment="deleted 1 character in body" Text="I am using the substrate node template binary in 2 ubuntu servers and their IPs are&#xD;&#xA;&#xD;&#xA;10.100.20.1 and 10.100.20.2&#xD;&#xA;Host names are `telsher001` and `telsher002`&#xD;&#xA;&#xD;&#xA;Im following this tutorial https://docs.substrate.io/tutorials/get-started/simulate-network/ to simulate a network&#xD;&#xA;&#xD;&#xA;I am using  the exact run commands as follows in 2 machines &#xD;&#xA;&#xD;&#xA;On 1st VM machine 10.100.20.1 I'm running the genesis node as follows&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./substrate-node-template --base-path /tmp/alice --chain local --alice --port 30333 --ws-port 9944 --rpc-port 9933 --node-key 0000000000000000000000000000000000000000000000000000000000000001 --rpc-methods Unsafe --validator&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On the 2nd VM machine 10.100.20.2 &#xD;&#xA;Im using the following command to run the project&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./substrate-node-template&#xD;&#xA;--base-path /tmp/bob --chain local --bob --port 30333 --ws-port 9944 --rpc-port 9933 --validator --bootnodes /ip4/10.100.20.2/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In both terminals, there are no errors, but Peer discovery is not happening &#xD;&#xA;Im looking for a way to get the peer discovery working &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Even I checked firewall settings on both VMs which look like this. Please note that these virtual machines does not have access to outside internet &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Status: active&#xD;&#xA;&#xD;&#xA;To                         Action      From&#xD;&#xA;--                         ------      ----&#xD;&#xA;30333                      ALLOW       Anywhere&#xD;&#xA;9933                       ALLOW       Anywhere&#xD;&#xA;9944                       ALLOW       Anywhere&#xD;&#xA;22                         ALLOW       Anywhere&#xD;&#xA;80                         ALLOW       Anywhere&#xD;&#xA;443                        ALLOW       Anywhere&#xD;&#xA;22/tcp                     ALLOW       Anywhere&#xD;&#xA;30333 (v6)                 ALLOW       Anywhere (v6)&#xD;&#xA;9933 (v6)                  ALLOW       Anywhere (v6)&#xD;&#xA;9944 (v6)                  ALLOW       Anywhere (v6)&#xD;&#xA;22 (v6)                    ALLOW       Anywhere (v6)&#xD;&#xA;80 (v6)                    ALLOW       Anywhere (v6)&#xD;&#xA;443 (v6)                   ALLOW       Anywhere (v6)&#xD;&#xA;22/tcp (v6)                ALLOW       Anywhere (v6)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am looking a solution for this &#xD;&#xA;Thanks " ContentLicense="CC BY-SA 4.0" />
  <row Id="35885" PostHistoryTypeId="5" PostId="2080" RevisionGUID="4a9f98e7-23fe-4f61-b8d9-f6cf244151cb" CreationDate="2023-06-29T11:12:55.190" UserId="354" Comment="added 2 characters in body; edited tags" Text="We are currently backing up our parachain DB on a daily base: `/path/to/db/full/`, I thought it can be used for recovery when the DB gets accidentally deleted/corrupted. But it seems that once the onchain state is newer than the backed-up DB, it can't be used anymore.&#xD;&#xA;&#xD;&#xA;The steps that I've done:&#xD;&#xA;1. Start a `2 relaychain + 1 parachain node network`, so this parachain node is the sole collator in this case&#xD;&#xA;2. Assume the parachain runs to block #30, kill the parachain, make the backup (= copy the parachain-db folder to somewhere else)&#xD;&#xA;3. Remove the parachain DB, restart parachain, the parachain will be stuck at #0 =&gt; `OK`&#xD;&#xA;4. Stop parachain, replace the parachain DB with the backed-up one, restart parachain&#xD;&#xA;5. Parachain will start from #30 and continues to produce blocks =&gt; `OK`&#xD;&#xA;6. Wait until it runs to #40, stop parachain, remove the parachain DB (simulates that the DB gets accidentally deleted and we only have an older backup)&#xD;&#xA;7. Restart parachain, it will be stuck at #0 =&gt; `OK`&#xD;&#xA;8. Stop parachain, replace the parachain DB with the backed-up one, restart parachain&#xD;&#xA;9. Parachain will be stuck at #30 and can't produce blocks anymore =&gt; `NOK`&#xD;&#xA;&#xD;&#xA;So it looks like that an older backup can not be used for recovery. Did I understand it correctly? If so what's the point of backing up DBs? Just for faster syncing for a newly launched node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35886" PostHistoryTypeId="6" PostId="2080" RevisionGUID="4a9f98e7-23fe-4f61-b8d9-f6cf244151cb" CreationDate="2023-06-29T11:12:55.190" UserId="354" Comment="added 2 characters in body; edited tags" Text="|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35887" PostHistoryTypeId="5" PostId="2121" RevisionGUID="e6bb809b-2ddd-439b-ba90-4f1c68e5edac" CreationDate="2023-06-29T11:14:16.787" UserId="354" Comment="added 4 characters in body" Text="I am looking to aggregate `On-Chain` data in an `Off-Chain Worker`, e.g. summing transaction fees included in blocks from the last 24 hrs. This is listed as one of the main use cases for [Off-Chain Workers][1].&#xD;&#xA;&#xD;&#xA;However, I have not yet found a clean API for accessing this data. Is there a recommended way to read data from locally stored blocks? If not, are there best practices that should be followed? If possible, I would like to eliminate the need to make an external web request. &#xD;&#xA;&#xD;&#xA;[Note]: As mentioned below, the [availability store][2] is only on Polkadot and does not exist for general Substrate chains.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/v3/concepts/off-chain-features/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/discussions/9701" ContentLicense="CC BY-SA 4.0" />
  <row Id="35888" PostHistoryTypeId="2" PostId="9068" RevisionGUID="7b61b861-036b-4625-8b9a-3be6fa54eec6" CreationDate="2023-06-29T11:16:35.663" UserId="2025" Text="The `PalletInstance` is just an `u8` representing the index of a pallet within the relevant runtime. For example, in [Polkadot Asset Hub](https://wiki.polkadot.network/docs/learn-assets), `&quot;PalletInstance&quot;:50` refers to the assets pallet. Hence the junction is pointing to a location which is within the asset pallet storage, i.e., a specific asset living in the asset pallet of the Polkadot Asset Hub.&#xD;&#xA;&#xD;&#xA;[Here you have more information](https://github.com/paritytech/xcm-format#interior-locations--junctions) of all the possible junction types and other relevant information about multi locations in XCM." ContentLicense="CC BY-SA 4.0" />
  <row Id="35890" PostHistoryTypeId="2" PostId="9069" RevisionGUID="de11f567-fec7-46c1-bb87-42df9032a7eb" CreationDate="2023-06-29T13:38:41.347" UserId="4370" Text="For those who are having the same problem since version 1.72.0, you need to do the same: pause updates of nightly rust.&#xD;&#xA;You can do this by editing `rust-toolchain.toml` file:&#xD;&#xA;```&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;nightly-2023-06-15&quot;&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35892" PostHistoryTypeId="2" PostId="9070" RevisionGUID="a8c84a04-ac3a-4edf-a7a9-ed139d151c0f" CreationDate="2023-06-29T15:02:20.117" UserId="4113" Text="devs. I am writing the e2e tests for my smart contracts using `ink_e2e`&#xD;&#xA;In contracts, I define the e2e-tests like this.&#xD;&#xA;``` rust&#xD;&#xA;#[openbrush::contract]&#xD;&#xA;pub mod controller {&#xD;&#xA;    ...&#xD;&#xA;    &#xD;&#xA;    #[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;    mod e2e_tests {&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I want to define tests like this.&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;#[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;mod e2e_tests {}&#xD;&#xA;&#xD;&#xA;#[openbrush::contract]&#xD;&#xA;pub mod controller {&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this case, I have noticed that `e2e-tests` feature is disabled.&#xD;&#xA;Anybody met this issue and solved it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35894" PostHistoryTypeId="1" PostId="9070" RevisionGUID="a8c84a04-ac3a-4edf-a7a9-ed139d151c0f" CreationDate="2023-06-29T15:02:20.117" UserId="4113" Text="Can we define ink_e2e tests outside of contracts module?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35895" PostHistoryTypeId="3" PostId="9070" RevisionGUID="a8c84a04-ac3a-4edf-a7a9-ed139d151c0f" CreationDate="2023-06-29T15:02:20.117" UserId="4113" Text="|ink|smart-contract|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35896" PostHistoryTypeId="2" PostId="9071" RevisionGUID="0b3c3e96-54ab-4afc-9a4e-2be0becf5330" CreationDate="2023-06-29T15:36:27.560" UserId="451" Text="The metadata was downloaded from a running `substrate-contracts-node` and is used to generate the APIs and types required for constructing contract extrinsics and querying storage from a compatible node.&#xD;&#xA;&#xD;&#xA;Therefore, at the moment `cargo-contract` will only work against nodes which are compatible with these types. Supporting nodes using different types and configurations will indeed require downloading and storing the metadata for each different target node.&#xD;&#xA;&#xD;&#xA;So for compatibility with multiple node configurations will require making the codebase generic over the environment types e.g. `AccountId` and `Balance`, and additionally supporting the metadata for multiple nodes. &#xD;&#xA;&#xD;&#xA;It is a hugely important goal for us to support this functionality for any type of chain which uses `pallet-contracts`.&#xD;&#xA;&#xD;&#xA;Related issue: https://github.com/paritytech/cargo-contract/issues/1168" ContentLicense="CC BY-SA 4.0" />
  <row Id="35898" PostHistoryTypeId="2" PostId="9072" RevisionGUID="b6d58284-6722-4117-9d36-b7273ca3fcae" CreationDate="2023-06-29T18:35:54.993" UserId="2761" Text="After reading through the BLS related issues in the substrate repo, it isn't quite clear to me what type of support is planned for the BLS signature scheme. It seems like the primary goal is to integrate it into BEEFY. &#xD;&#xA;&#xD;&#xA;But could we also be seeing BLS supported in the `MultiSignature` enum? Will it be possible to use BLS public keys to control funds from the balances pallet? If we were to build a pallet today with future BLS support in mind, are there any recommendations on how to proceed?&#xD;&#xA;&#xD;&#xA;In particular, it seems that the BLS public keys are not 32 bytes and they cannot be recovered from the signature in the way that `ecdsa` signatures can be. Hence, we would not be able to use `AccountId32` for the `AccountId` associated type in the `frame_system::Config` trait and would instead need an enum type instead of `AccountId32`. That is at least one issue I see. Thus, I am guessing substrate may not directly support BLS in their `MultiSignature` type. So if we were to plan for eventual BLS support and develop a runtime with future compatibility, would it make sense to use an enum for the `AccountId` associated type and then eventually append a type that represents BLS public keys?&#xD;&#xA;&#xD;&#xA;For my use case, I'd like to implement a rollup pallet to batch extrinsics that would use a storage map with `u32` as the key and BLS public key type as the value. The payload for each subextrinsic would contain `u32` values instead of public keys which would point to stored BLS public keys which would control their own funds. Operations would then be performed on the accounts' behalf once the aggregated signature is verified." ContentLicense="CC BY-SA 4.0" />
  <row Id="35900" PostHistoryTypeId="1" PostId="9072" RevisionGUID="b6d58284-6722-4117-9d36-b7273ca3fcae" CreationDate="2023-06-29T18:35:54.993" UserId="2761" Text="Will we be able to use the BLS signature scheme to control funds?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35901" PostHistoryTypeId="3" PostId="9072" RevisionGUID="b6d58284-6722-4117-9d36-b7273ca3fcae" CreationDate="2023-06-29T18:35:54.993" UserId="2761" Text="|balances|substrate-node|accountid|signatures|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35902" PostHistoryTypeId="2" PostId="9073" RevisionGUID="3d0bc799-e375-40dd-967d-e4280abd2b2b" CreationDate="2023-06-29T18:50:54.940" UserId="3708" Text="What's the differences between using V2 or V3 for example if I wanna send DOT from Polkadot to Astar. Do I have to pay less fee?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35904" PostHistoryTypeId="1" PostId="9073" RevisionGUID="3d0bc799-e375-40dd-967d-e4280abd2b2b" CreationDate="2023-06-29T18:50:54.940" UserId="3708" Text="Differences using xcm V2 or V3" ContentLicense="CC BY-SA 4.0" />
  <row Id="35905" PostHistoryTypeId="3" PostId="9073" RevisionGUID="3d0bc799-e375-40dd-967d-e4280abd2b2b" CreationDate="2023-06-29T18:50:54.940" UserId="3708" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35906" PostHistoryTypeId="2" PostId="9074" RevisionGUID="ca275ac7-ad1e-4a13-8078-1dc5148fbf9f" CreationDate="2023-06-29T22:03:40.757" UserId="3960" Text="I'm trying to arrange some unit tests for a local http server connectivity my node communicates with.&#xD;&#xA;&#xD;&#xA;While the node has no troubles while sending requests, I face difficulties trying to build basic unit tests for this functionality.&#xD;&#xA;&#xD;&#xA;My code looks as follows:&#xD;&#xA;```rust&#xD;&#xA;    let (mut offchain, _offchain_state) = TestOffchainExt::with_offchain_db(ext.offchain_db());&#xD;&#xA;	ext.register_extension(OffchainWorkerExt::new(offchain.clone()));&#xD;&#xA;    if let Ok(request) = offchain.http_request_start(&quot;GET&quot;, &quot;http://127.0.0.1:9800&quot;, &amp;[]) {&#xD;&#xA;        offchain.http_response_wait(&amp;[request], None);&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;which yields a panic in&#xD;&#xA;```primitives/core/src/offchain/testing.rs -&gt; fn http_response_wait(...)```&#xD;&#xA;&#xD;&#xA;I also tried to run a similar logic inside the externalities context like so: &#xD;&#xA;```rust&#xD;&#xA;	ext.register_extension(OffchainWorkerExt::new(offchain.clone()));&#xD;&#xA;	ext.execute_with(|| {&#xD;&#xA;        Request::get(&quot;http://127.0.0.1:9800&quot;).send().map(PendingRequest::wait);&#xD;&#xA;    // snip&#xD;&#xA;```&#xD;&#xA;with exactly the same result.&#xD;&#xA;&#xD;&#xA;And I can see that on the server side no request arrives.&#xD;&#xA;On the other hand when I run the node everything works fine, so I guess this is not a server problem and I must have missed something. " ContentLicense="CC BY-SA 4.0" />
  <row Id="35908" PostHistoryTypeId="1" PostId="9074" RevisionGUID="ca275ac7-ad1e-4a13-8078-1dc5148fbf9f" CreationDate="2023-06-29T22:03:40.757" UserId="3960" Text="sending an http request in unit tests?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35909" PostHistoryTypeId="3" PostId="9074" RevisionGUID="ca275ac7-ad1e-4a13-8078-1dc5148fbf9f" CreationDate="2023-06-29T22:03:40.757" UserId="3960" Text="|offchain|unit-tests|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35910" PostHistoryTypeId="8" PostId="9006" RevisionGUID="b8e4ff49-6080-4b98-95c6-4e36f9701439" CreationDate="2023-06-30T01:07:33.023" UserId="388" Comment="Rollback to [434708a9-0b28-4c53-9fcf-cf53c92da98a]" Text="The `set_keys` extrinsic in `pallet_session` has a second argument [`proof`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/frame/session/src/lib.rs#L588), which seems to be intended as an ownership proof of the `keys`.&#xD;&#xA;&#xD;&#xA;Looking at the body, there is a call to [`ownership_proof_is_valid`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/frame/session/src/lib.rs#L590).&#xD;&#xA;&#xD;&#xA;The `ownership_proof_is_valid` method is defined on the [`OpaqueKeys`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/primitives/runtime/src/traits.rs#L1724-L1725) trait, with a default implementation that just returns `true`.&#xD;&#xA;&#xD;&#xA;The intended way to implement `OpaqueKeys` is, as far as I know, to use the [`impl_opaque_keys` macro](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/primitives/runtime/src/traits.rs#L2047). That macro, however generates an implementation that does not [override the default implementation of `ownership_proof_is_valid`](https://github.com/paritytech/substrate/blob/074dc1dfee4132b597db6eb147a86c72b751f03c/primitives/runtime/src/traits.rs#L1990-L2018).&#xD;&#xA;&#xD;&#xA;It seems to me, then, that in practice `ownership_proof_is_valid` will always return `true`. If that's the case, what is the purpose of the `proof` argument?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35912" PostHistoryTypeId="5" PostId="9073" RevisionGUID="665ef895-4088-4e98-a13e-d695b005a133" CreationDate="2023-06-30T05:06:15.130" UserId="116" Comment="Spellcheck and language" Text="What's the differences between using XCM V2 or V3? For example if I want to send DOT from Polkadot to Astar. Do I have to pay less fee?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35913" PostHistoryTypeId="24" PostId="9073" RevisionGUID="665ef895-4088-4e98-a13e-d695b005a133" CreationDate="2023-06-30T05:06:15.130" Comment="Proposed by 116 approved by -1 edit id of 490" ContentLicense="CC BY-SA 4.0" />
  <row Id="35914" PostHistoryTypeId="5" PostId="9073" RevisionGUID="165bdaeb-184f-478e-bcca-66c03ffce1f8" CreationDate="2023-06-30T05:06:15.130" UserId="354" Comment="Spellcheck and language" Text="What are the differences while using `XCM V2` or `V3`? For example if I want to send DOT from Polkadot to Astar. Do I have to pay less fee?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35915" PostHistoryTypeId="6" PostId="9073" RevisionGUID="165bdaeb-184f-478e-bcca-66c03ffce1f8" CreationDate="2023-06-30T05:06:15.130" UserId="354" Comment="Spellcheck and language" Text="|polkadot|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35916" PostHistoryTypeId="5" PostId="9069" RevisionGUID="4c4cff4b-b404-4836-a769-84769e7aad1b" CreationDate="2023-06-30T05:09:54.563" UserId="2281" Comment="added 2 characters in body" Text="For those who are having the same problem since `version 1.72.0`, you need to do the same: pause updates of nightly rust.&#xD;&#xA;You can do this by editing `rust-toolchain.toml` file:&#xD;&#xA;```&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;nightly-2023-06-15&quot;&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35917" PostHistoryTypeId="2" PostId="9075" RevisionGUID="344869f4-4404-48d2-ba15-947f3bd935c9" CreationDate="2023-06-30T05:34:50.917" UserId="2372" Text="The XCM V3 version offers an expanded set of instructions compared to V2. Among the new instructions are:&#xD;&#xA;&#xD;&#xA;- UnpaidExecution&#xD;&#xA;&#xD;&#xA;- LockAsset&#xD;&#xA;&#xD;&#xA;- UnlockAsset&#xD;&#xA;&#xD;&#xA;- Burn Asset&#xD;&#xA;&#xD;&#xA;Additionally, there are several other instructions available in the XCM V3 version, providing even greater functionality and versatility.&#xD;&#xA;&#xD;&#xA;For transferring assets you can check it [this][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm" ContentLicense="CC BY-SA 4.0" />
  <row Id="35919" PostHistoryTypeId="5" PostId="9075" RevisionGUID="19b25307-b57b-47de-9646-91262340390d" CreationDate="2023-06-30T05:41:03.753" UserId="2372" Comment="added 67 characters in body; added 18 characters in body" Text="The XCM V3 version offers an expanded set of instructions compared to V2. Among the new instructions are:&#xD;&#xA;&#xD;&#xA; - UnpaidExecution&#xD;&#xA; - LockAsset&#xD;&#xA; - UnlockAsset&#xD;&#xA; - Burn Asset &#xD;&#xA; - NoteUnlockable&#xD;&#xA;&#xD;&#xA;Additionally, there are several other instructions available in the XCM V3 version, providing even greater functionality and versatility.&#xD;&#xA;&#xD;&#xA;For transferring assets you can check it [this][1] and approximately same amount of fees is deducted in both V2 and V3&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm" ContentLicense="CC BY-SA 4.0" />
  <row Id="35921" PostHistoryTypeId="5" PostId="1033" RevisionGUID="7bc47535-8c73-449b-b204-733cc397929a" CreationDate="2023-06-30T06:25:24.760" UserId="3136" Comment="modify in body" Text="I am following this PR https://github.com/substrate-developer-hub/substrate-parachain-template/pull/103 to upgrade codebase to `Polkadot 0.9.18` but facing the below issue&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;   Compiling cexpr v0.6.0&#xD;&#xA;error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable&#xD;&#xA;   --&gt; /home/deployer/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.9.8/src/atomic.rs:314:6&#xD;&#xA;    |&#xD;&#xA;314 | impl&lt;T: ?Sized + Pointable&gt; Atomic&lt;T&gt; {&#xD;&#xA;    |      ^&#xD;&#xA;...&#xD;&#xA;346 |     pub const fn null() -&gt; Atomic&lt;T&gt; {&#xD;&#xA;    |     -------------------------------- function declared as const here&#xD;&#xA;    |&#xD;&#xA;    = note: see issue #93706 &lt;https://github.com/rust-lang/rust/issues/93706&gt; for more information&#xD;&#xA;    = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0658`.&#xD;&#xA;error: could not compile `crossbeam-epoch` due to previous error&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: build failed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can someone please help me to fix this? Here is code https://github.com/DataHighway-DHX/DataHighway-Parachain/tree/change-para-id&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;installed toolchains&#xD;&#xA;&#xD;&#xA;nightly-2022-02-23-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;nightly-2022-02-23-x86_64-unknown-linux-gnu (directory override for '/home/deployer/Parachain')&#xD;&#xA;rustc 1.61.0-nightly (68369a041 2022-02-22)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35922" PostHistoryTypeId="5" PostId="856" RevisionGUID="a493393d-4111-4008-9966-021046c790cd" CreationDate="2023-06-30T06:26:59.200" UserId="3136" Comment="code modified in body" Text="I linked a new Ledger to the `Polkadot.js` wallet and transferred some refunded DOT tokens into this wallet. But when I opened up my Ledger Live again, the DOT account is showing a `0` balance. Then I went on the `Polkadot.js` Chrome extension and attempted to link this same ledger, it also shows a zero balance AND it showed a different address for the same Ledger: &#xD;&#xA;&#xD;&#xA;14TaEDyp2QJovndX21KaiHpynuktGEP9eSTgVswsd6WC5jMp&#xD;&#xA;&#xD;&#xA;13NySAb5HVFE786mcizE5CUJ2p3mHWzS5apcYzhxiL4cJgX&#xD;&#xA;&#xD;&#xA;The above are those 2 addresses for the same Ledger: one added on the “Accounts” tab and the other on the Chrome extension. &#xD;&#xA;&#xD;&#xA;Now I am hoping to contribute some of the DOT tokens to the Unique crowdloan, but I can't transfer my tokens because Ledger shows a zero balance and my attempt to transfer to other Polkadot.js accounts also failed. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35923" PostHistoryTypeId="5" PostId="657" RevisionGUID="4cfd1585-c5e5-4ea3-a378-f3ef6701af43" CreationDate="2023-06-30T06:28:56.447" UserId="3136" Comment="correct the format of title and change in body" Text="When using the `PolkadotJS API` to query an ink! `erc20` smart contract balanceOf() function from inside of react it returns some strange values. For example if i try this from a node script balanceOf.output returns these values the way you'd expect (a balance of 99 tokens). However, inside of react when querying balanceOf on a users token balance the only values i can seem to find that correspond to balance values are ones inside of balanceOf.output.words;&#xD;&#xA;&#xD;&#xA;this is the output of querying the account of a user who has a token balance of 99&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lasqT.png&#xD;&#xA;&#xD;&#xA;as you can see inside of output the only values that appear to correspond to balance values are inside of word but are not what you would expect (would expect 99) &#xD;&#xA;&#xD;&#xA;any ideas how to interpret these values or convert them such that they display the true value of the users balance?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35924" PostHistoryTypeId="5" PostId="625" RevisionGUID="45cdc39f-efc9-485b-be85-affdc0f10d47" CreationDate="2023-06-30T06:30:07.823" UserId="3136" Comment="modify in body" Text="I deployed a smart contract to a substrate chain. How can I upgrade the `smart contract's` logic to a newer version?&#xD;&#xA;&#xD;&#xA;Edit: I'm using `ink!` and deployed on `Shibuya` (Astar testnet)" ContentLicense="CC BY-SA 4.0" />
  <row Id="35925" PostHistoryTypeId="2" PostId="9076" RevisionGUID="d1ec970f-5a55-41c4-879a-6c0a8e051e46" CreationDate="2023-06-30T08:07:38.230" UserId="637" Text="I am currently working on a project that involves P2P encryption using Substrate addresses and sr25519 cryptographic keys. However, I am encountering difficulties in implementing encryption and decryption with the `NaCl` library.&#xD;&#xA;&#xD;&#xA;The library doesn't work with sr25519. I tried using `ed2curve`, but it seems strange. Is there any other way to encrypt/decrypt with sr25519?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35927" PostHistoryTypeId="1" PostId="9076" RevisionGUID="d1ec970f-5a55-41c4-879a-6c0a8e051e46" CreationDate="2023-06-30T08:07:38.230" UserId="637" Text="How to Implement P2P Encryption with sr25519 key pair using NaCl or alternatives?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35928" PostHistoryTypeId="3" PostId="9076" RevisionGUID="d1ec970f-5a55-41c4-879a-6c0a8e051e46" CreationDate="2023-06-30T08:07:38.230" UserId="637" Text="|javascript|sr25519|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35929" PostHistoryTypeId="2" PostId="9077" RevisionGUID="8a2819c4-4879-4b18-9e98-56b2d7c36e12" CreationDate="2023-06-30T11:26:29.940" UserId="3319" Text="up until block (best:#34, finalized #32) all nodes have the same output, then&#xD;&#xA;we are seeing the following log statements from some of our validators like this:&#xD;&#xA;&#xD;&#xA;&gt;2023-06-24 15:32:22  Idle (4 peers), best: #34 (0xf462…47f8), finalized #32 (0x8c72…b75c), ⬇ 54.0kiB/s ⬆ 107.8kiB/s  	&#xD;&#xA;2023-06-24 15:32:24  Starting consensus session on top of parent 0xf462ebeab54847910b09a4449a4c8278c575dcecdabff6c81b223f7a97e147f8 	 &#xD;&#xA;2023-06-24 15:32:24  Pre-sealed block for proposal at 35. Hash now 0x548..b3b4f, previously 0x89b0..9012736.  &#xD;&#xA;2023-06-24 15:32:24 ✨ Imported #35 (0x5487…3b4f)     &#xD;&#xA;2023-06-24 15:32:25 ♻️  Reorg on #35,0x5487…3b4f to #36,0x68c9…e904, common ancestor #33,0x9fa8…72cc&#xD;&#xA;2023-06-24 15:32:25 ✨ Imported #36 (0x68c9…e904)  &#xD;&#xA;	2023-06-24 15:32:27  Idle (6 peers), best: #41 (0xc1f8…8e57), finalized #39 (0x6b82…69a6), ⬇ 31.4kiB/s ⬆ 123.1kiB/s&#xD;&#xA;   &#xD;&#xA;can someone explain what does reorg mean?&#xD;&#xA;&#xD;&#xA;and why there are no logs for finalized blocks from 32-39, is it just logging problem?&#xD;&#xA;&#xD;&#xA;not all nodes are doing this reorg, however they all are omitting the logs of blocks from #32 until #35, the logs of the rest of the nodes are like this:&#xD;&#xA;&#xD;&#xA;    15:31:32  Idle (25 peers), best: #35 (0x7056…8528), finalized #32 (0x8c72…b75c), ⬇ 153.7kiB/s ⬆ 92.6kiB/s   &#xD;&#xA;    15:31:36 ✨ Imported #36 (0x68c9…e904)&#xD;&#xA;    15:31:37  Idle (27 peers), best: #36 (0x68c9…e904), finalized #32 (0x8c72…b75c), ⬇ 39.5kiB/s ⬆ 90.6kiB/s &#xD;&#xA;    15:31:42 ✨ Imported #37 (0x16da…0b07)&#xD;&#xA;    15:31:42  Idle (27 peers), best: #37 (0x16da…0b07), finalized #32 (0x8c72…b75c), ⬇ 19.4kiB/s ⬆ 21.1kiB/s &#xD;&#xA;    15:31:47  Idle (28 peers), best: #37 (0x16da…0b07), finalized #35 (0x7056…8528), ⬇ 36.8kiB/s ⬆ 34.4kiB/s &#xD;&#xA;&#xD;&#xA;so best blocks are incrementing normally but there is no finalized count for block 33 and 34.&#xD;&#xA;&#xD;&#xA;ps: other nodes are doing the reorg on block 33 not 35:&#xD;&#xA;&#xD;&#xA;    2023-06-24 15:32:24 ♻️  Reorg on #33,0xc232…42a5 to #34,0x1404…38cc, common ancestor #32,0x8c72…b75c " ContentLicense="CC BY-SA 4.0" />
  <row Id="35931" PostHistoryTypeId="1" PostId="9077" RevisionGUID="8a2819c4-4879-4b18-9e98-56b2d7c36e12" CreationDate="2023-06-30T11:26:29.940" UserId="3319" Text="what does reorg means in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35932" PostHistoryTypeId="3" PostId="9077" RevisionGUID="8a2819c4-4879-4b18-9e98-56b2d7c36e12" CreationDate="2023-06-30T11:26:29.940" UserId="3319" Text="|substrate-node-template|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35933" PostHistoryTypeId="2" PostId="9078" RevisionGUID="516f2e76-f611-4797-8306-5f1a25123b4a" CreationDate="2023-06-30T15:00:09.470" UserId="3395" Text="After performing an upgrade on a remote node that includes a new pallet in my runtime, I attempted to sync a local node with the remote one, but I encountered the following error:&#xD;&#xA;```&#xD;&#xA;Bootnode with peer id `12D..` is on a different chain (our genesis: 0x40b7…db79 theirs: 0xa82a…1bc2)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have been using the same chain spec JSON file for both nodes. To test this, I compiled both the remote and local codebases, the latter of which includes the new pallet's code. I ran both nodes using the same chain spec JSON file. However, as I stated earlier, I encountered an error in the second case.&#xD;&#xA;&#xD;&#xA;I'm unable to understand why this is occurring when I'm using the same chain spec for both nodes, which should mean they have the same genesis. Am I wrong or missing something here?&#xD;&#xA;&#xD;&#xA;How can I debug this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35935" PostHistoryTypeId="1" PostId="9078" RevisionGUID="516f2e76-f611-4797-8306-5f1a25123b4a" CreationDate="2023-06-30T15:00:09.470" UserId="3395" Text="Unable to sync after runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="35936" PostHistoryTypeId="3" PostId="9078" RevisionGUID="516f2e76-f611-4797-8306-5f1a25123b4a" CreationDate="2023-06-30T15:00:09.470" UserId="3395" Text="|runtime-upgrade|chainspec|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35937" PostHistoryTypeId="2" PostId="9079" RevisionGUID="1c4503ee-7f5d-4249-906d-75cc22ca9fd1" CreationDate="2023-06-30T15:34:07.250" UserId="2960" Text="I am quite new to substrate and polkadot parachains. I am trying to bridge a parachain and a solochain using the  [substrate bridge repo][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/parity-bridges-common&#xD;&#xA;&#xD;&#xA;1. Is it possible to send arbitrary data from the para chain to the solochain via theabove bridge using XCM or call an extrinsic on the solo chain from the parachain ? &#xD;&#xA;2. how do I use MultiLocation to send data from the para chain to the solochain currently what would be the Location of the bridge / solochain and I can send the xcm message ?&#xD;&#xA;3. Is there a guide or example for this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35939" PostHistoryTypeId="1" PostId="9079" RevisionGUID="1c4503ee-7f5d-4249-906d-75cc22ca9fd1" CreationDate="2023-06-30T15:34:07.250" UserId="2960" Text="How to send XCM message from parachain to solochain via the parity bridge" ContentLicense="CC BY-SA 4.0" />
  <row Id="35940" PostHistoryTypeId="3" PostId="9079" RevisionGUID="1c4503ee-7f5d-4249-906d-75cc22ca9fd1" CreationDate="2023-06-30T15:34:07.250" UserId="2960" Text="|substrate-node-template|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35941" PostHistoryTypeId="2" PostId="9080" RevisionGUID="fabc15ae-bdd9-4627-8f8b-435d0fe50015" CreationDate="2023-06-30T15:43:42.987" UserId="3395" Text="&quot;Reorg&quot; refers to the network shifting from one valid chain of blocks to another due to multiple blocks being produced nearly simultaneously, a situation that can arise from the randomness introduced by BABE's use of a Verifiable Random Function (VRF). Meaning that one or more validators may be selected to propose a block for the same slot. This reorg process ensures the network agrees on a single, canonical chain of blocks.&#xD;&#xA;&#xD;&#xA;As for the missing finalized blocks between #32 and #39, GRANDPA, the finality gadget, does not need to finalize blocks one-by-one and can finalize several blocks at once, which might be why those block logs aren't seen.&#xD;&#xA;&#xD;&#xA;Lastly, different nodes performing reorg at different blocks (#33 and #35) can be due to network latency and the propagation time of blocks across the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="35943" PostHistoryTypeId="2" PostId="9081" RevisionGUID="82626516-9e55-4952-81c5-697fffa1582b" CreationDate="2023-06-30T18:42:53.997" UserId="4377" Text="Is it possible make http requests outside of an offchain worker context. It seems like the only thing that is preventing http calls is simply that `OffchainWorkerExt` is not registered in the runtime. I'm thinking it could be possible to make a separate `Ext` that only has the ability to make http request or possibly add the `OffchainWorkerExt` into the substrate Runtime environment to allow for http calls.&#xD;&#xA;&#xD;&#xA;We are aware of the fact that making network requests inside of the Substrate runtime on chain is typically ill-advised, but have a plan in place to manage this system.&#xD;&#xA;&#xD;&#xA;The only other solution to this would be to have a system of relays that post submit data on chain and that would need to be verified on addition. This solution has the issue that gas costs would be increasing over time and eventually discourage relayers to submit blocks to our node." ContentLicense="CC BY-SA 4.0" />
  <row Id="35945" PostHistoryTypeId="1" PostId="9081" RevisionGUID="82626516-9e55-4952-81c5-697fffa1582b" CreationDate="2023-06-30T18:42:53.997" UserId="4377" Text="Using http calls outside of offchain worker context" ContentLicense="CC BY-SA 4.0" />
  <row Id="35946" PostHistoryTypeId="3" PostId="9081" RevisionGUID="82626516-9e55-4952-81c5-697fffa1582b" CreationDate="2023-06-30T18:42:53.997" UserId="4377" Text="|pallet|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35947" PostHistoryTypeId="52" PostId="9077" RevisionGUID="235b26fd-7e25-4b36-9a5d-ae5b0948849b" CreationDate="2023-06-30T19:26:42.177" />
  <row Id="35950" PostHistoryTypeId="50" PostId="6900" RevisionGUID="b72fa7cd-c4f8-4311-8805-be36df6fec2d" CreationDate="2023-07-01T04:09:01.067" UserId="-1" />
  <row Id="35951" PostHistoryTypeId="5" PostId="9081" RevisionGUID="77932608-4d7f-4a64-8196-1d893f6f194a" CreationDate="2023-07-01T05:35:54.100" UserId="354" Comment="added 2 characters in body; edited tags" Text="Is it possible make http requests outside of an `offchain worker` context. It seems like the only thing that is preventing http calls is simply that `OffchainWorkerExt` is not registered in the runtime. I'm thinking it could be possible to make a separate `Ext` that only has the ability to make http request or possibly add the `OffchainWorkerExt` into the substrate Runtime environment to allow for http calls.&#xD;&#xA;&#xD;&#xA;We are aware of the fact that making network requests inside of the Substrate runtime on chain is typically ill-advised, but have a plan in place to manage this system.&#xD;&#xA;&#xD;&#xA;The only other solution to this would be to have a system of relays that post submit data on chain and that would need to be verified on addition. This solution has the issue that gas costs would be increasing over time and eventually discourage relayers to submit blocks to our node." ContentLicense="CC BY-SA 4.0" />
  <row Id="35952" PostHistoryTypeId="6" PostId="9081" RevisionGUID="77932608-4d7f-4a64-8196-1d893f6f194a" CreationDate="2023-07-01T05:35:54.100" UserId="354" Comment="added 2 characters in body; edited tags" Text="|pallet|offchain-worker|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35953" PostHistoryTypeId="5" PostId="9078" RevisionGUID="e340ec7f-3908-461d-acba-c7f3494f0d4e" CreationDate="2023-07-01T05:38:07.970" UserId="354" Comment="added 4 characters in body" Text="After performing an upgrade on a remote node that includes a new pallet in my runtime, I attempted to sync a local node with the remote one, but I encountered the following error:&#xD;&#xA;```&#xD;&#xA;Bootnode with peer id `12D..` is on a different chain (our genesis: 0x40b7…db79 theirs: 0xa82a…1bc2)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have been using the same chain spec `JSON` file for both nodes. To test this, I compiled both the remote and local codebases, the latter of which includes the new pallet's code. I ran both nodes using the same chain spec `JSON` file. However, as I stated earlier, I encountered an error in the second case.&#xD;&#xA;&#xD;&#xA;I'm unable to understand why this is occurring when I'm using the same chain spec for both nodes, which should mean they have the same genesis. Am I wrong or missing something here?&#xD;&#xA;&#xD;&#xA;How can I debug this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35954" PostHistoryTypeId="2" PostId="9082" RevisionGUID="9b84c7ff-f405-441f-b62e-0dca3404245b" CreationDate="2023-07-01T05:58:45.723" UserId="354" Text="&gt; Bootnode with peer id `12D..` is on a different chain (our genesis:&#xD;&#xA;&gt; 0x40b7…db79 theirs: 0xa82a…1bc2)&#xD;&#xA;&#xD;&#xA;The above error occurs when you are trying to connect to your node with a node that has a different `peerId` that you have provided in `--bootnodes` command. So just check it once and also double check that you are giving the right `IP address` .&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;      --base-path /tmp/node02 \&#xD;&#xA;      --chain ./customSpecRaw.json \&#xD;&#xA;      --port 30334 \&#xD;&#xA;      --ws-port 9946 \&#xD;&#xA;      --rpc-port 9934 \&#xD;&#xA;      --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;      --validator \&#xD;&#xA;      --rpc-methods Unsafe \&#xD;&#xA;      --name MyNode02 \&#xD;&#xA;      --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWLmrYDLoNTyTYtRdDyZLWDe1paxzxTw5RgjmHLfzW96SX \&#xD;&#xA;      --password-interactive&#xD;&#xA;&#xD;&#xA;The other scenario in which this error comes is when you haven't deleted the chain data of a previously, so what you need to do is purge the chain and start it again. You can use the below commnand to purge the chain. &#xD;&#xA;&#xD;&#xA;    ./target/release/substrate purge-chain --base-path /tmp/node02 --chain staging -y" ContentLicense="CC BY-SA 4.0" />
  <row Id="35956" PostHistoryTypeId="5" PostId="9080" RevisionGUID="882270b1-5f71-4636-be4d-df1c979f96a4" CreationDate="2023-07-01T06:44:59.570" UserId="2281" Comment="added 14 characters in body" Text="&quot;Reorg&quot; refers to the network shifting from one valid chain of blocks to another due to multiple blocks being produced nearly simultaneously, a situation that can arise from the randomness introduced by BABE's use of a `Verifiable Random Function (VRF)`. Meaning that one or more validators may be selected to propose a block for the same slot. This reorg process ensures the network agrees on a single, canonical chain of blocks.&#xD;&#xA;&#xD;&#xA;As for the missing finalized blocks between `#32 and #39`, GRANDPA, the finality gadget, does not need to finalize blocks one-by-one and can `finalize several blocks at once`, which might be why those block logs aren't seen.&#xD;&#xA;&#xD;&#xA;Lastly, different nodes performing `reorg` at different blocks `(#33 and #35)` can be due to `network latency` and the `propagation time` of blocks across the network." ContentLicense="CC BY-SA 4.0" />
  <row Id="35957" PostHistoryTypeId="33" PostId="9044" RevisionGUID="88d0c431-c5d6-452a-be9f-e7dc46c1c1b4" CreationDate="2023-07-01T09:49:58.407" UserId="2163" Comment="26" />
  <row Id="35958" PostHistoryTypeId="2" PostId="9083" RevisionGUID="4f706ab4-5486-4f73-bba8-219963188457" CreationDate="2023-07-01T10:28:31.623" UserId="4381" Text="for running validate nodes, through set up, now i can see my node on the telemetry. but i dont know  how to connect to polkadot.js.  &#xD;&#xA;&#xD;&#xA;polka wiki says&#xD;&#xA;&quot;You can generate your Session keys in the client via the apps RPC. If you are doing this, make sure that you have the PolkadotJS-Apps explorer attached to your validator node&quot; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but i dont get it. how i generate session keys?&#xD;&#xA;i use ssh though google cloud, do i have to do something in ssh??, what code is to get the session keys and how my node can attach my poladotjs-app??&#xD;&#xA;&#xD;&#xA;sorry im poor.... i need your help....plz" ContentLicense="CC BY-SA 4.0" />
  <row Id="35960" PostHistoryTypeId="1" PostId="9083" RevisionGUID="4f706ab4-5486-4f73-bba8-219963188457" CreationDate="2023-07-01T10:28:31.623" UserId="4381" Text="validating node, how connet to polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="35961" PostHistoryTypeId="3" PostId="9083" RevisionGUID="4f706ab4-5486-4f73-bba8-219963188457" CreationDate="2023-07-01T10:28:31.623" UserId="4381" Text="|polkadot-js|extrinsic|rpc|validator|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35962" PostHistoryTypeId="2" PostId="9084" RevisionGUID="bf6ac20c-b6ec-4175-a9ea-2b5ab14e8298" CreationDate="2023-07-01T10:37:35.193" UserId="2163" Text="In the documentation `getChainProperties`(https://polkadot.js.org/docs/api/examples/promise/chain-info/) is mentioned for getting the properties for a blockchain, but it contains very little amount of information.&#xD;&#xA;&#xD;&#xA;How could I query the chainspec of a blockchain from an RPC? I am specifically interested in the &quot;name&quot; and &quot;para_id&quot;(if a parachain) fields." ContentLicense="CC BY-SA 4.0" />
  <row Id="35964" PostHistoryTypeId="1" PostId="9084" RevisionGUID="bf6ac20c-b6ec-4175-a9ea-2b5ab14e8298" CreationDate="2023-07-01T10:37:35.193" UserId="2163" Text="How to query chainspec with @polkadot/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="35965" PostHistoryTypeId="3" PostId="9084" RevisionGUID="bf6ac20c-b6ec-4175-a9ea-2b5ab14e8298" CreationDate="2023-07-01T10:37:35.193" UserId="2163" Text="|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35966" PostHistoryTypeId="5" PostId="9083" RevisionGUID="c73a9b9e-3c04-4e13-9970-53ebb53e978c" CreationDate="2023-07-01T11:54:54.990" UserId="4381" Comment="added 83 characters in body" Text="for running validate nodes, through set up, now i can see my node on the telemetry. but i dont know  how to connect to polkadot.js.  &#xD;&#xA;&#xD;&#xA;polka wiki says&#xD;&#xA;&quot;You can generate your Session keys in the client via the apps RPC. If you are doing this, make sure that you have the PolkadotJS-Apps explorer attached to your validator node&quot; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but i dont get it. how i generate session keys?&#xD;&#xA;i use ssh though google cloud, do i have to do something in ssh??, what code is to get the session keys and how my node can attach my poladotjs-app??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;how can i find custom endpoint???(node`s address) from the google cloud (SHH)&#xD;&#xA;&#xD;&#xA;sorry im poor.... i need your help....plz" ContentLicense="CC BY-SA 4.0" />
  <row Id="35967" PostHistoryTypeId="5" PostId="9083" RevisionGUID="68858f55-11d5-4709-880b-6e359587fd3f" CreationDate="2023-07-01T11:55:48.677" UserId="4381" Comment="added 30 characters in body" Text="for running validate nodes, through set up, now i can see my node on the telemetry. but i dont know  how to connect to polkadot.js.  &#xD;&#xA;&#xD;&#xA;polka wiki says&#xD;&#xA;&quot;You can generate your Session keys in the client via the apps RPC. If you are doing this, make sure that you have the PolkadotJS-Apps explorer attached to your validator node&quot; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but i dont get it. how i generate session keys?&#xD;&#xA;i use ssh though google cloud, do i have to do something in ssh??, what code is to get the session keys and how my node can attach my poladotjs-app??&#xD;&#xA;&#xD;&#xA;i think my main question is &#xD;&#xA;&quot;how can i find custom endpoint(node`s address) from the google cloud (SHH)???&quot;&#xD;&#xA;&#xD;&#xA;sorry im poor.... i need your help....plz" ContentLicense="CC BY-SA 4.0" />
  <row Id="35968" PostHistoryTypeId="5" PostId="9083" RevisionGUID="4b636d3f-a013-41e0-aab5-550fe9f379c6" CreationDate="2023-07-01T11:56:14.920" UserId="4381" Comment="added 6 characters in body" Text="for running validate nodes, through set up, now i can see my node on the telemetry. but i dont know  how to connect to polkadot.js.  &#xD;&#xA;&#xD;&#xA;polka wiki says&#xD;&#xA;&quot;You can generate your Session keys in the client via the apps RPC. If you are doing this, make sure that you have the PolkadotJS-Apps explorer attached to your validator node&quot; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but i dont get it. how i generate session keys?&#xD;&#xA;i use ssh though google cloud, do i have to do something in ssh??, what code is to get the session keys and how my node can attach my poladotjs-app??&#xD;&#xA;&#xD;&#xA;i think my main question is &#xD;&#xA;&quot;how can i find custom endpoint(node`s address) from the google cloud (SHH, code)???&quot;&#xD;&#xA;&#xD;&#xA;sorry im poor.... i need your help....plz" ContentLicense="CC BY-SA 4.0" />
  <row Id="35969" PostHistoryTypeId="2" PostId="9085" RevisionGUID="00585ddb-9c50-4e12-bb34-442e0e4ca074" CreationDate="2023-07-01T13:12:16.923" UserId="213" Text="In tests we use following statement to check error:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;   assert_noop!(&#xD;&#xA;			ProfileValidation::add_citizen(RuntimeOrigin::signed(1), content.clone()),&#xD;&#xA;			Error::&lt;Test&gt;::NoMoreUpdates&#xD;&#xA;	);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But how to get error from another coupled pallet.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;OtherCoupledPallet::Error::&lt;Test&gt;::EvidencePeriodNotOver&#xD;&#xA; // or &#xD;&#xA;&lt;other_coupled_pallet::Pallet&lt;mock::Test&gt; as TryCollect&gt;::Error::EvidencePeriodNotOver&#xD;&#xA;```&#xD;&#xA;It doesn't work&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35971" PostHistoryTypeId="1" PostId="9085" RevisionGUID="00585ddb-9c50-4e12-bb34-442e0e4ca074" CreationDate="2023-07-01T13:12:16.923" UserId="213" Text="How to get Error from different pallet in test?" ContentLicense="CC BY-SA 4.0" />
  <row Id="35972" PostHistoryTypeId="3" PostId="9085" RevisionGUID="00585ddb-9c50-4e12-bb34-442e0e4ca074" CreationDate="2023-07-01T13:12:16.923" UserId="213" Text="|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35973" PostHistoryTypeId="33" PostId="9031" RevisionGUID="5b308ca6-5d88-4b94-a724-331927102618" CreationDate="2023-07-01T13:31:53.413" UserId="3850" Comment="27" />
  <row Id="35974" PostHistoryTypeId="5" PostId="9044" RevisionGUID="fa82355d-ddc5-4b40-a7c4-fd92090e19f6" CreationDate="2023-07-01T14:26:04.533" UserId="2163" Comment="deleted 24724 characters in body" Text="I am trying to create a local network natively. I followed the instructions from [here](https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet) and I am running into a problem.&#xD;&#xA;&#xD;&#xA;I built Polkadot and the substrate parachain template by running: `cargo build --release`&#xD;&#xA;&#xD;&#xA;I copied the `config.toml` file and run: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;zombienet-macos -p native spawn config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I run the command it initially looks like everything is working fine but at the end I get a pretty unclear error.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT: After updating zombienet to version 1.3.58 I don't get above mentioned error anymore.&#xD;&#xA;&#xD;&#xA;I now get another error that is not stopping the program but the error is getting logged continuously.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│ Local Testnet ⚙ Added Boot Nodes                                                                                       │&#xD;&#xA;├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;│ /ip4/127.0.0.1/tcp/58081/ws/p2p/12D3KooWPA68TQCYEUd4mTUyd4ds93nhhK8QJjEknjWeJNQHXXcp                                   │&#xD;&#xA;└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;(node:66553) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time&#xD;&#xA;(Use `zombienet-macos --trace-warnings ...` to show where the warning was created)&#xD;&#xA;&#xD;&#xA;Error 	 fetching metrics from: http://127.0.0.1:58064/metrics&#xD;&#xA;&#xD;&#xA;Error 	 fetching metrics from: http://127.0.0.1:58068/metrics&#xD;&#xA;&#xD;&#xA;Error 	 fetching metrics from: http://127.0.0.1:58076/metrics&#xD;&#xA;&#xD;&#xA;Error 	 fetching metrics from: http://127.0.0.1:58072/metrics&#xD;&#xA;&#xD;&#xA;Error 	 fetching metrics from: http://127.0.0.1:58080/metrics&#xD;&#xA;&#xD;&#xA;# and so on&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The logs(they are the same for every parachain and validator):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-07-01 16:16:15.155  INFO main sc_cli::runner: Parity Polkadot    &#xD;&#xA;2023-07-01 16:16:15.156  INFO main sc_cli::runner: ✌️  version 0.9.37-645723987cf    &#xD;&#xA;2023-07-01 16:16:15.156  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2023    &#xD;&#xA;2023-07-01 16:16:15.156  INFO main sc_cli::runner:  Chain specification: Rococo Local Testnet    &#xD;&#xA;2023-07-01 16:16:15.156  INFO main sc_cli::runner:   Node name: bob    &#xD;&#xA;2023-07-01 16:16:15.156  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-07-01 16:16:15.156  INFO main sc_cli::runner:  Database: RocksDb at /var/folders/07/snp6b9qn5fx3tvnw19zhp3jc0000gn/T/zombie-fb721b33984e1cd2280384de6398eed6_-14227-OnbVG2XaLP0F/bob/data/chains/rococo_local_testnet/db/full    &#xD;&#xA;2023-07-01 16:16:15.156  INFO main sc_cli::runner: ⛓  Native runtime: rococo-9370 (parity-rococo-v2.0-0.tx18.au0)    &#xD;&#xA;Error: &#xD;&#xA;   0: Failed to get runtime version: cannot deserialize module: UnknownOpcode(192)&#xD;&#xA;&#xD;&#xA;  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━&#xD;&#xA;   1: backtrace::capture::Backtrace::create::hfad00a4f7b97e831&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   2: backtrace::capture::Backtrace::new::he4f988bb52487744&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   3: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::h3f9d14d3b2e64441&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   4: eyre::capture_handler::h2090812ea1c4f8f7&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   5: eyre::error::&lt;impl eyre::Report&gt;::from_std::h036cc641f7180345&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   6: polkadot::main::h1fe20747cba2fd19&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   7: std::sys_common::backtrace::__rust_begin_short_backtrace::h275865e011bf8454&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   8: std::rt::lang_start::{{closure}}::h819dadd8812ce71a&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;   9: std::rt::lang_start_internal::hff0642c3803389b9&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;  10: _main&lt;unknown&gt;&#xD;&#xA;      at &lt;unknown source file&gt;:&lt;unknown line&gt;&#xD;&#xA;&#xD;&#xA;Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.&#xD;&#xA;Run with RUST_BACKTRACE=full to include source snippets.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="35975" PostHistoryTypeId="5" PostId="9065" RevisionGUID="09d414b5-facb-4c84-9f21-766ab1db6525" CreationDate="2023-07-01T16:31:46.863" UserId="2163" Comment="added 130 characters in body" Text="I am testing some things out with XCM and I want to make a ROC token transfer from one Rococo account to another Rococo account using XCM. I am calling the `execute` extrinsic and providing the `TransferAsset` XCM message.&#xD;&#xA;&#xD;&#xA;For some reason, the transfer doesn't occur, but the status of the extrinsic is successful: https://rococo.subscan.io/extrinsic/6027042-2&#xD;&#xA;&#xD;&#xA;To be more specific, the exact problem I have is that the ROC tokens don't get transferred from one account to the other one." ContentLicense="CC BY-SA 4.0" />
  <row Id="35976" PostHistoryTypeId="5" PostId="9083" RevisionGUID="0ed81546-da6f-4671-8770-b9aaa4bba43f" CreationDate="2023-07-01T17:52:30.647" UserId="4381" Comment="added 13 characters in body" Text="for running validate nodes, through set up, now i can see my node on the telemetry. but i dont know  how to connect to polkadot.js.  &#xD;&#xA;&#xD;&#xA;polka wiki says&#xD;&#xA;&quot;You can generate your Session keys in the client via the apps RPC. If you are doing this, make sure that you have the PolkadotJS-Apps explorer attached to your validator node&quot; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but i dont get it. how i generate session keys?&#xD;&#xA;i use ssh though google cloud, do i have to do something in ssh??, what code is to get the session keys and how my node can attach my poladotjs-app??&#xD;&#xA;&#xD;&#xA;i think my main question is &#xD;&#xA;&quot;how can i find custom endpoint(node`s address, wss) from the google cloud (SHH, code, or etc)???&quot;&#xD;&#xA;&#xD;&#xA;sorry im poor.... i need your help....plz" ContentLicense="CC BY-SA 4.0" />
  <row Id="35977" PostHistoryTypeId="2" PostId="9086" RevisionGUID="0c0d19a5-1919-4adc-8a5b-13232a9373bb" CreationDate="2023-07-01T19:55:14.487" UserId="4296" Text="The polkadot wiki is your friend, if you look on the same page a little [lower][1] you see the cli instructions (cli=command line interface=what you need when using ssh).&#xD;&#xA;&#xD;&#xA;Using polkadot.js is a lot more difficult because you need to set it up on your server of create a ssl proxy when using the public version. &#xD;&#xA;&#xD;&#xA;In short you need to run the following command in a shell on your server: `echo '{&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_rotateKeys&quot;,&quot;params&quot;:[]}' | websocat -n1 -B 99999999 ws://127.0.0.1:9944` &#xD;&#xA;&#xD;&#xA;The port (9944) can be different depending in your startup command.&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#option-2-cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="35979" PostHistoryTypeId="2" PostId="9087" RevisionGUID="7fa919af-734c-45fb-a12f-59ea1a3e196e" CreationDate="2023-07-01T20:04:12.687" UserId="279" Text="first let me point that the [answer](https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet) you use as reference is pointing to download zombienet from the [releases](https://github.com/paritytech/zombienet/releases) page but the `wget` command used as example is downloading and old version. &#xD;&#xA;One easy way to debug this kind of issues is to first running `zombienet` with `full` debug mode, this is managed with the `DEBUG` environment variable and you can run this way&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;DEBUG=zombie* zombienet-macos -p native spawn config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then, you can check the logs of the nodes (you need to look the `/logs` directory inside of the `temporal directory printed at start`. Because could be the case that the node are crashing.&#xD;&#xA;&#xD;&#xA;Also, if you find something that doesn't work as expected or you think is a bug please open an [issue](https://github.com/paritytech/zombienet/issues) in zombienet's repo and we will check/fix.&#xD;&#xA;&#xD;&#xA;Thanks for using zombienet and for you feedback!" ContentLicense="CC BY-SA 4.0" />
  <row Id="35981" PostHistoryTypeId="2" PostId="9088" RevisionGUID="2cb5a290-0fe1-48e1-813f-4c79320c9365" CreationDate="2023-07-01T21:26:44.270" UserId="2722" Text="I am working on a project using a Substrate blockchain that is EVM-compatible. I am encountering problems when trying to call functions on this Substrate instance.&#xD;&#xA;&#xD;&#xA;Here's the function I am using to sign and send transactions to Substrate pallets:&#xD;&#xA;&#xD;&#xA;        async _signAndSendTransaction(account, tx) {&#xD;&#xA;        try {&#xD;&#xA;            const { cryptoWaitReady, mnemonicGenerate } = require('@polkadot/util-crypto');&#xD;&#xA;            const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;    &#xD;&#xA;            await cryptoWaitReady();&#xD;&#xA;    &#xD;&#xA;            const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;            const senderAccount = keyring.addFromUri(account.mnemonic); &#xD;&#xA;            console.log(senderAccount.address)&#xD;&#xA;            // const nonce = await this.api.rpc.system.accountNextIndex(account.address);&#xD;&#xA;            const signedTx = await tx.signAsync(senderAccount);&#xD;&#xA;            const hash = await signedTx.send();&#xD;&#xA;    &#xD;&#xA;            return hash.toHex();&#xD;&#xA;        } catch (error) {&#xD;&#xA;            console.log(error.message)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;For wallet connection, I'm utilizing Metamask, and the EVM-based address that I use to call the functions is 0x6C45Ada1e3bE236D2667b4f2828888991263A4dD.&#xD;&#xA;&#xD;&#xA;However, when I log the following lines:&#xD;&#xA;&#xD;&#xA;    const senderAccount = keyring.addFromUri(account.mnemonic);&#xD;&#xA;    console.log(senderAccount.address)&#xD;&#xA;&#xD;&#xA;I get a different address: 5E4bnwDsLFpe28WtyYVva5joGxhDUQ7M1Gzd4ndWCY52R21e.&#xD;&#xA;&#xD;&#xA;Finally, I encounter this error message:&#xD;&#xA;&#xD;&#xA;&gt;2023-07-02 00:15:42 RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low&#xD;&#xA;1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low&#xD;&#xA;&#xD;&#xA;I'd appreciate any guidance on how I might solve this issue. Thanks in advance for your help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35983" PostHistoryTypeId="1" PostId="9088" RevisionGUID="2cb5a290-0fe1-48e1-813f-4c79320c9365" CreationDate="2023-07-01T21:26:44.270" UserId="2722" Text="Issues with Function Call on EVM-Compatible Substrate Using Metamask and Polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="35984" PostHistoryTypeId="3" PostId="9088" RevisionGUID="2cb5a290-0fe1-48e1-813f-4c79320c9365" CreationDate="2023-07-01T21:26:44.270" UserId="2722" Text="|substrate-node-template|evm|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35985" PostHistoryTypeId="2" PostId="9089" RevisionGUID="d22879b4-a52d-48a3-bf31-8c91ac9f79ce" CreationDate="2023-07-02T02:58:36.110" UserId="2844" Text="Even though I set genesis staker [here](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/8405ddf83687c587b9cfac799f0b536a7580c073/node/src/chain_spec.rs#L230) no block are producing. Someone please help me.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate % ./target/release/node-template --dev&#xD;&#xA;    2023-07-02 08:15:58 Substrate Node    &#xD;&#xA;    2023-07-02 08:15:58 ✌️  version 4.0.0-dev-98d3cb5bfe8    &#xD;&#xA;    2023-07-02 08:15:58 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2023    &#xD;&#xA;    2023-07-02 08:15:58  Chain specification: Development    &#xD;&#xA;    2023-07-02 08:15:58   Node name: tearful-feast-1220    &#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate % ./target/release/node-template --dev&#xD;&#xA;    2023-07-02 08:18:07 Substrate Node    &#xD;&#xA;    2023-07-02 08:18:07 ✌️  version 4.0.0-dev-98d3cb5bfe8    &#xD;&#xA;    2023-07-02 08:18:07 ❤️  by Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;, 2017-2023    &#xD;&#xA;    2023-07-02 08:18:07  Chain specification: Development    &#xD;&#xA;    2023-07-02 08:18:07   Node name: nosy-creator-5275    &#xD;&#xA;    2023-07-02 08:18:07  Role: AUTHORITY    &#xD;&#xA;    2023-07-02 08:18:07  Database: RocksDb at /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/substrated8RqHa/chains/dev/db/full    &#xD;&#xA;    2023-07-02 08:18:07 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)    &#xD;&#xA;    2023-07-02 08:18:07 [0]  generated 0 npos voters, 0 from validators and 0 nominators    &#xD;&#xA;    2023-07-02 08:18:07 [0]  generated 0 npos targets    &#xD;&#xA;    2023-07-02 08:18:08  Initializing Genesis block/state (state: 0x5974…be17, header-hash: 0x35c3…43f4)    &#xD;&#xA;    2023-07-02 08:18:08  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;    2023-07-02 08:18:10 Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;    2023-07-02 08:18:10   Local node identity is: 12D3KooWEk1L8JKCSJHhZyrypSLpbPnnhNq4qi7XxKmeZCHP3wR1    &#xD;&#xA;    2023-07-02 08:18:10  Operating system: macos    &#xD;&#xA;    2023-07-02 08:18:10  CPU architecture: aarch64    &#xD;&#xA;    2023-07-02 08:18:10  Highest known block at #0    &#xD;&#xA;    2023-07-02 08:18:10 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;    2023-07-02 08:18:10 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=[&quot;*&quot;]    &#xD;&#xA;    2023-07-02 08:18:10 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=[&quot;*&quot;]    &#xD;&#xA;    2023-07-02 08:18:15  Idle (0 peers), best: #0 (0x35c3…43f4), finalized #0 (0x35c3…43f4), ⬇ 0 ⬆ 0    &#xD;&#xA;    2023-07-02 08:18:20  Idle (0 peers), best: #0 (0x35c3…43f4), finalized #0 (0x35c3…43f4), ⬇ 0 ⬆ 0    &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/L6R5O.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="35987" PostHistoryTypeId="1" PostId="9089" RevisionGUID="d22879b4-a52d-48a3-bf31-8c91ac9f79ce" CreationDate="2023-07-02T02:58:36.110" UserId="2844" Text="No block are producing while running node in dev mode" ContentLicense="CC BY-SA 4.0" />
  <row Id="35988" PostHistoryTypeId="3" PostId="9089" RevisionGUID="d22879b4-a52d-48a3-bf31-8c91ac9f79ce" CreationDate="2023-07-02T02:58:36.110" UserId="2844" Text="|substrate-node-template|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35989" PostHistoryTypeId="5" PostId="9084" RevisionGUID="158001fd-7f67-4e6a-9ee7-42f1b1f450a2" CreationDate="2023-07-02T02:59:42.533" UserId="354" Comment="edited body; edited tags" Text="In the documentation `getChainProperties`(https://polkadot.js.org/docs/api/examples/promise/chain-info/) is mentioned for getting the properties for a blockchain, but it contains very little amount of information.&#xD;&#xA;&#xD;&#xA;How could I query the chainspec of a blockchain from an RPC? I am specifically interested in the `name` and `para_id`(if a parachain) fields." ContentLicense="CC BY-SA 4.0" />
  <row Id="35990" PostHistoryTypeId="6" PostId="9084" RevisionGUID="158001fd-7f67-4e6a-9ee7-42f1b1f450a2" CreationDate="2023-07-02T02:59:42.533" UserId="354" Comment="edited body; edited tags" Text="|polkadot-js|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="35991" PostHistoryTypeId="2" PostId="9090" RevisionGUID="e6ac31f2-9023-44f0-aaa3-779a6f81d976" CreationDate="2023-07-02T03:28:01.680" UserId="354" Text="I can see from repo you provided, you are changing consensus from `AURA` to `BABE` but as I go through your [runtime][1], there were still the implementation of `AURA` consensus present, that needs to be removed and also you haven't changed the [service.rs][2] file, the file is still using `AURA` and not `BABE`, as most of the spawn tasks are handled there you need to do changes there also. Refer [this][3] for changes in `service.rs` file.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/8405ddf83687c587b9cfac799f0b536a7580c073/runtime/src/lib.rs#L1243-L1251&#xD;&#xA;  [2]: https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/8405ddf83687c587b9cfac799f0b536a7580c073/node/src/service.rs&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/service.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="35993" PostHistoryTypeId="2" PostId="9091" RevisionGUID="89d5dd77-b3be-4b17-903e-b685af9069f2" CreationDate="2023-07-02T04:05:26.013" UserId="3109" Text="To query the chainspec of a blockchain from an RPC, you can use the following code:&#xD;&#xA;&#xD;&#xA;`import polkadot from 'polkadot-js';`&#xD;&#xA;&#xD;&#xA;`const client = polkadot.createClient();`&#xD;&#xA;&#xD;&#xA;`const chainspec = await client.rpc.chainSpec();`&#xD;&#xA;&#xD;&#xA;`const name = chainspec.name;`&#xD;&#xA;&#xD;&#xA;`const paraId = chainspec.paraId;`&#xD;&#xA;&#xD;&#xA;`console.log(The chain name is ${name});`&#xD;&#xA;&#xD;&#xA;`console.log(The para chain ID is ${paraId});`&#xD;&#xA;&#xD;&#xA;This code will first create a client object for the Polkadot network. Then, it will call the rpc.chainSpec() method to get the chainspec for the current chain. Finally, it will print the name and para chain ID of the chain to the console.&#xD;&#xA;&#xD;&#xA;For example, if you are running this code on the Polkadot mainnet, the name of the chain will be &quot;Polkadot&quot; and the para chain ID will be 0.&#xD;&#xA;&#xD;&#xA;Here is a breakdown of the code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The import polkadot from 'polkadot-js'; line imports the Polkadot JavaScript library.&#xD;&#xA;&#xD;&#xA;The const client = polkadot.createClient(); line creates a client object for the Polkadot network.&#xD;&#xA;&#xD;&#xA;The const chainspec = await client.rpc.chainSpec(); line calls the rpc.chainSpec() method to get the chainspec for the current chain.&#xD;&#xA;&#xD;&#xA;The const name = chainspec.name; line gets the name of the chain from the chainspec.&#xD;&#xA;&#xD;&#xA;The const paraId = chainspec.paraId; line gets the para chain ID of the chain from the chainspec.&#xD;&#xA;&#xD;&#xA;The console.log(The chain name is ${name}); line prints the name of the chain to the console.&#xD;&#xA;&#xD;&#xA;The console.log(The para chain ID is ${paraId}); line prints the para chain ID of the chain to the console.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35995" PostHistoryTypeId="2" PostId="9092" RevisionGUID="9f98bd07-6339-4689-92aa-46d2feaad93e" CreationDate="2023-07-02T05:10:06.563" UserId="3109" Text="To get the error from another coupled pallet in a test, you can use the following syntax:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;assert_err!(&#xD;&#xA;    OtherCoupledPallet::some_function(),&#xD;&#xA;    &quot;Expected error message&quot;&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Replace `OtherCoupledPallet::some_function()` with the actual function call you are testing in the other coupled pallet. Make sure to include any required parameters for the function.&#xD;&#xA;&#xD;&#xA;In the error message, replace `&quot;Expected error message&quot;` with the specific error message you are expecting. This should be the exact error message that you anticipate the function to produce.&#xD;&#xA;&#xD;&#xA;By using `assert_err!`, you can verify that the function call results in an error with the expected error message. If the error message does not match, the assertion will fail, indicating a test failure.&#xD;&#xA;&#xD;&#xA;Remember to import the necessary macros at the beginning of your test file:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_support::assert_err;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Including this code in your test should help you check for errors from another coupled pallet. " ContentLicense="CC BY-SA 4.0" />
  <row Id="35997" PostHistoryTypeId="5" PostId="9088" RevisionGUID="3358b625-1ca9-4174-9d6c-d7133b6b1375" CreationDate="2023-07-02T05:34:29.740" UserId="116" Comment="Spellcheck and language and code format" Text="I'm working on a project using an EVM-compatible Substrate blockchain. I am encountering problems when trying to call functions on this Substrate instance.&#xD;&#xA;&#xD;&#xA;Here's the function used to sign and send transactions to Substrate pallets:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    async _signAndSendTransaction(account, tx) {&#xD;&#xA;        try {&#xD;&#xA;            const { cryptoWaitReady, mnemonicGenerate } = require('@polkadot/util-crypto');&#xD;&#xA;            const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;    &#xD;&#xA;            await cryptoWaitReady();&#xD;&#xA;    &#xD;&#xA;            const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;            const senderAccount = keyring.addFromUri(account.mnemonic); &#xD;&#xA;            console.log(senderAccount.address)&#xD;&#xA;            // const nonce = await this.api.rpc.system.accountNextIndex(account.address);&#xD;&#xA;            const signedTx = await tx.signAsync(senderAccount);&#xD;&#xA;            const hash = await signedTx.send();&#xD;&#xA;    &#xD;&#xA;            return hash.toHex();&#xD;&#xA;        } catch (error) {&#xD;&#xA;            console.log(error.message)&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;For wallet connection, I'm utilizing Metamask, and the EVM-based address that I use to call the functions is `0x6C45Ada1e3bE236D2667b4f2828888991263A4dD`.&#xD;&#xA;&#xD;&#xA;However, when I log the following lines:&#xD;&#xA;&#xD;&#xA;    const senderAccount = keyring.addFromUri(account.mnemonic);&#xD;&#xA;    console.log(senderAccount.address)&#xD;&#xA;&#xD;&#xA;I get a different address: `5E4bnwDsLFpe28WtyYVva5joGxhDUQ7M1Gzd4ndWCY52R21e`.&#xD;&#xA;&#xD;&#xA;Finally, I encounter this error message:&#xD;&#xA;&#xD;&#xA;&gt;2023-07-02 00:15:42 RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low&#xD;&#xA;1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low&#xD;&#xA;&#xD;&#xA;I'd appreciate any guidance on how I might solve this issue. Thanks in advance for your help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="35998" PostHistoryTypeId="24" PostId="9088" RevisionGUID="3358b625-1ca9-4174-9d6c-d7133b6b1375" CreationDate="2023-07-02T05:34:29.740" Comment="Proposed by 116 approved by 2722 edit id of 492" ContentLicense="CC BY-SA 4.0" />
  <row Id="35999" PostHistoryTypeId="2" PostId="9093" RevisionGUID="5fef34ad-d44f-4233-ba4f-da2b604e5097" CreationDate="2023-07-02T07:22:56.200" UserId="2163" Text="I did not find a specific way to query the chainspec, but using a different approach I am able to get the parachain id and the name of the blockchain.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise } from '@polkadot/api';&#xD;&#xA;&#xD;&#xA;/* snip */&#xD;&#xA;&#xD;&#xA;// Create an API&#xD;&#xA;api = await ApiPromise.create({ provider: wsProvider, noInitWarn: true });&#xD;&#xA;&#xD;&#xA;// Get the blockchain name:&#xD;&#xA;const name = await api.rpc.system.chain();&#xD;&#xA;console.log(name.toHuman());&#xD;&#xA;&#xD;&#xA;// Get the parachain id:&#xD;&#xA;const parachainId = await api.query.parachainInfo.parachainId();&#xD;&#xA;console.log(parachainId.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36001" PostHistoryTypeId="33" PostId="9065" RevisionGUID="0d7babe3-0311-4a18-a620-8758b50ab52b" CreationDate="2023-07-02T07:49:31.447" UserId="2163" Comment="28" />
  <row Id="36004" PostHistoryTypeId="2" PostId="9095" RevisionGUID="7e3c5bdf-651c-426b-91dd-9818e601c370" CreationDate="2023-07-02T09:51:58.890" UserId="4383" Text="Error with block built on 0xxxx: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #xx&quot;)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Block production and also finalization stopped, in txpool I found sudo call, and remove it via author_removeExtrinsic, but block production not fixed" ContentLicense="CC BY-SA 4.0" />
  <row Id="36006" PostHistoryTypeId="1" PostId="9095" RevisionGUID="7e3c5bdf-651c-426b-91dd-9818e601c370" CreationDate="2023-07-02T09:51:58.890" UserId="4383" Text="Stopped block production / aura" ContentLicense="CC BY-SA 4.0" />
  <row Id="36007" PostHistoryTypeId="3" PostId="9095" RevisionGUID="7e3c5bdf-651c-426b-91dd-9818e601c370" CreationDate="2023-07-02T09:51:58.890" UserId="4383" Text="|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36008" PostHistoryTypeId="50" PostId="8660" RevisionGUID="988f864b-359c-49ae-82e3-bfaea807a440" CreationDate="2023-07-02T10:03:15.390" UserId="-1" />
  <row Id="36009" PostHistoryTypeId="2" PostId="9096" RevisionGUID="ff04d8e0-3e08-4f4c-aaa0-e5368bc34f4a" CreationDate="2023-07-02T11:40:59.790" UserId="3171" Text="I want to convert bytes into string address.&#xD;&#xA;I have only two options because of Junction limitation: bytes32 or bytes20.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    pub enum Junction {&#xD;&#xA;       ...&#xD;&#xA;       AccountId32 { network: Option&lt;NetworkId&gt;, id: [u8; 32] },&#xD;&#xA;       ...&#xD;&#xA;       AccountKey20 { network: Option&lt;NetworkId&gt;, key: [u8; 20] },&#xD;&#xA;       ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I want to convert bytes32 into bech32 string address:&#xD;&#xA;*xxxxxx1amkywxzsvshqrtw4vcsplp9v83k8w6r8auedp7*&#xD;&#xA;&#xD;&#xA;But there is no no_std library.&#xD;&#xA;Is the anyway to do it? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36011" PostHistoryTypeId="1" PostId="9096" RevisionGUID="ff04d8e0-3e08-4f4c-aaa0-e5368bc34f4a" CreationDate="2023-07-02T11:40:59.790" UserId="3171" Text="Is the bech32 library for wasm no_std to convert address bytes32 into string in pallet runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36012" PostHistoryTypeId="3" PostId="9096" RevisionGUID="ff04d8e0-3e08-4f4c-aaa0-e5368bc34f4a" CreationDate="2023-07-02T11:40:59.790" UserId="3171" Text="|substrate-node-template|polkadot|parachain|no-std|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36013" PostHistoryTypeId="4" PostId="9096" RevisionGUID="74b88894-6ca0-4162-8062-ee348964bf64" CreationDate="2023-07-02T11:47:06.120" UserId="3171" Comment="edited title" Text="Bech32 encode/decode library for no_std to convert bytes32 into string address in runtime pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36014" PostHistoryTypeId="34" PostId="9044" RevisionGUID="6a036153-5f3f-4629-9eda-5f52835ab253" CreationDate="2023-07-02T12:12:02.953" UserId="2163" Comment="26" />
  <row Id="36015" PostHistoryTypeId="5" PostId="9096" RevisionGUID="c4e1adf7-07bb-497f-9977-fc5376ee79fb" CreationDate="2023-07-02T14:33:57.187" UserId="354" Comment="added 14 characters in body" Text="I want to convert bytes into string address.&#xD;&#xA;I have only two options because of Junction limitation: `bytes32` or `bytes20`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    pub enum Junction {&#xD;&#xA;       ...&#xD;&#xA;       AccountId32 { network: Option&lt;NetworkId&gt;, id: [u8; 32] },&#xD;&#xA;       ...&#xD;&#xA;       AccountKey20 { network: Option&lt;NetworkId&gt;, key: [u8; 20] },&#xD;&#xA;       ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I want to convert `bytes32` into `bech32` string address:&#xD;&#xA;&#xD;&#xA;    xxxxxx1amkywxzsvshqrtw4vcsplp9v83k8w6r8auedp7&#xD;&#xA;&#xD;&#xA;But there is no `no_std` library.&#xD;&#xA;Is the anyway to do it? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36016" PostHistoryTypeId="5" PostId="9095" RevisionGUID="b9b33b1d-e2b0-4a31-bec0-10b3cb12605f" CreationDate="2023-07-02T14:35:16.157" UserId="354" Comment="added 8 characters in body" Text="Error with block built on &#xD;&#xA;&#xD;&#xA;`0xxxx: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #xx&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Block production and also finalization stopped, in txpool I found sudo call, and remove it via `author_removeExtrinsic`, but block production not fixed" ContentLicense="CC BY-SA 4.0" />
  <row Id="36017" PostHistoryTypeId="5" PostId="7832" RevisionGUID="fe6b61a2-4818-4f76-a4c9-c06e1f8c3757" CreationDate="2023-07-02T14:39:57.463" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I'm retrieving the list of authorities from aura in the pallet like this:&#xD;&#xA;&#xD;&#xA;    let authorities = pallet_aura::Pallet::&lt;T&gt;::authorities();&#xD;&#xA;&#xD;&#xA;this should return a `Vec&lt;T::AuthorityId&gt;` which is supposedly the same as `sp_core::sr25519::Public` since `AuthorityId` in Aura is defined like that [here][1], so I did the following:&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;    authorities.into_iter().map(|id| Public::from_h256(H256::from_slice(id.as_slice())));&#xD;&#xA;&#xD;&#xA;I'm doing it this way because for some reason in `AuthorityId` I don't have access to any method like `sp_core::sr25519::Public`, (I specifically need the [verify][2] method) which is why in the pallet it throws an error:&#xD;&#xA;&#xD;&#xA;     no method named `as_slice` found for associated type `&lt;T as pallet_aura::Config&gt;::AuthorityId` in the current scope&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;now, having said that, in outer node if I call the runtime api [`authorities()`][3] and I try to create sr25519 keys from it, it works:&#xD;&#xA;&#xD;&#xA;	let authorities= client&#xD;&#xA;		.runtime_api()&#xD;&#xA;		.authorities(&amp;block_id)&#xD;&#xA;		.expect(&quot;error&quot;);&#xD;&#xA;	authorities&#xD;&#xA;		.iter()&#xD;&#xA;		.map(|pubkey| Public::from_h256(H256::from_slice(pubkey.as_slice())))&#xD;&#xA;		.collect()&#xD;&#xA;&#xD;&#xA;- why is this happening, even though its completely the same function, I`m stuck with `AuthorityId` which has literally zero methods? and are there simpler ways to retrieve the Public keys of the current authorities that does not require all this mess?&#xD;&#xA;&#xD;&#xA;Ps: I tried importing the trait `use sp_core::ByteArray;` but it still didn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://releases.parity.io/substrate-rustdoc/sp_consensus_aura/sr25519/type.AuthorityId.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sp_application_crypto/trait.RuntimePublic.html#tymethod.verify&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sc_consensus_aura/trait.AuraApi.html#method.authorities" ContentLicense="CC BY-SA 4.0" />
  <row Id="36018" PostHistoryTypeId="24" PostId="7832" RevisionGUID="fe6b61a2-4818-4f76-a4c9-c06e1f8c3757" CreationDate="2023-07-02T14:39:57.463" Comment="Proposed by 116 approved by 2281, 354 edit id of 491" ContentLicense="CC BY-SA 4.0" />
  <row Id="36019" PostHistoryTypeId="2" PostId="9097" RevisionGUID="120e459d-265f-40eb-8e54-380ba59f5b38" CreationDate="2023-07-02T14:56:55.280" UserId="3171" Text="Okay, so there is no_std implementation with struct feature in bech32-no_std crate&#xD;&#xA;&#xD;&#xA;    [dependencies]&#xD;&#xA;    bech32-no_std = { version = &quot;0.7.3&quot;, default-features = false, features = [&quot;strict&quot;] }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36021" PostHistoryTypeId="5" PostId="9095" RevisionGUID="eb8b16ae-ba6b-49b6-8497-fd4ca5ec9383" CreationDate="2023-07-02T16:21:43.057" UserId="4383" Comment="added 490 characters in body" Text="Error with block built on &#xD;&#xA;&#xD;&#xA;`0xxxx: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #xx&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Block production and also finalization stopped, in txpool I found sudo call, and remove it via `author_removeExtrinsic`, but block production not fixed&#xD;&#xA;&#xD;&#xA;UPD:&#xD;&#xA;&#xD;&#xA;Yes, there were 2 validators in the network and I wanted to add a third one using validatorSet.addValidator. However, I mistakenly executed validatorSet.forceRotateSession().&#xD;&#xA;&#xD;&#xA;Prior to that, I also executed grandpa.NoteStalled() because finalization had stopped.&#xD;&#xA;&#xD;&#xA;After this, validatorSet.forceRotateSession() took a very long time and the transaction did not go through, getting stuck in the queue. Now everything has stopped, including block production and finalization.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36022" PostHistoryTypeId="5" PostId="9095" RevisionGUID="06762dab-9e97-453f-9727-99682945e6b5" CreationDate="2023-07-02T16:21:55.477" UserId="4383" Comment="deleted 5 characters in body" Text="Error with block built on &#xD;&#xA;&#xD;&#xA;`0xxxx: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #xx&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Block production and also finalization stopped, in txpool I found sudo call, and remove it via `author_removeExtrinsic`, but block production not fixed&#xD;&#xA;&#xD;&#xA;UPD:&#xD;&#xA;&#xD;&#xA;There were 2 validators in the network and I wanted to add a third one using validatorSet.addValidator. However, I mistakenly executed validatorSet.forceRotateSession().&#xD;&#xA;&#xD;&#xA;Prior to that, I also executed grandpa.NoteStalled() because finalization had stopped.&#xD;&#xA;&#xD;&#xA;After this, validatorSet.forceRotateSession() took a very long time and the transaction did not go through, getting stuck in the queue. Now everything has stopped, including block production and finalization.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36023" PostHistoryTypeId="5" PostId="9095" RevisionGUID="d27b05cc-4fd1-4578-9a7b-aa23b60036de" CreationDate="2023-07-02T16:22:23.363" UserId="4383" Comment="added 10 characters in body" Text="Error with block built on &#xD;&#xA;&#xD;&#xA;`0xxxx: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #xx&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Block production and also finalization stopped, in txpool I found sudo call, and remove it via `author_removeExtrinsic`, but block production not fixed&#xD;&#xA;&#xD;&#xA;UPD:&#xD;&#xA;&#xD;&#xA;There were 2 validators in the network and I wanted to add a third one using `validatorSet.addValidator()`. However, I mistakenly executed `validatorSet.forceRotateSession()`.&#xD;&#xA;&#xD;&#xA;Prior to that, I also executed `grandpa.NoteStalled()` because finalization had stopped.&#xD;&#xA;&#xD;&#xA;After this, `validatorSet.forceRotateSession()` took a very long time and the transaction did not go through, getting stuck in the queue. Now everything has stopped, including block production and finalization.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36024" PostHistoryTypeId="5" PostId="9095" RevisionGUID="cc290bf8-7136-44a3-8ac1-e34abb81209a" CreationDate="2023-07-02T16:25:45.193" UserId="4383" Comment="added 2121 characters in body" Text="Error with block built on &#xD;&#xA;&#xD;&#xA;`0xxxx: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #xx&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Block production and also finalization stopped, in txpool I found sudo call, and remove it via `author_removeExtrinsic`, but block production not fixed&#xD;&#xA;&#xD;&#xA;UPD:&#xD;&#xA;&#xD;&#xA;There were 2 validators in the network and I wanted to add a third one using `validatorSet.addValidator()`. However, I mistakenly executed `validatorSet.forceRotateSession()`.&#xD;&#xA;&#xD;&#xA;Prior to that, I also executed `grandpa.NoteStalled()` because finalization had stopped.&#xD;&#xA;&#xD;&#xA;After this, `validatorSet.forceRotateSession()` took a very long time and the transaction did not go through, getting stuck in the queue. Now everything has stopped, including block production and finalization.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;LOG:&#xD;&#xA;&#xD;&#xA;2023-07-02 16:24:58.678  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 9690000. Hash now 0x4b213b2037de7268cb629cc9dbcc2799fc1f85a473bcc40009145b72af2afc45, previously 0x2be5e583e9a8e921884e54ce0692dc1c58b2fe25ae655f6051c62508ae103163.&#xD;&#xA;2023-07-02 16:24:58.678  INFO tokio-runtime-worker afg: Not applying authority set change forced at block #9689995, due to pending standard change at block #9689962&#xD;&#xA;2023-07-02 16:24:58.680  WARN tokio-runtime-worker aura: Error with block built on 0x7a4e64085afc435b04e366871435ad7c394c09f730a19caaf31d7da2645a6813: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #9689962&quot;)&#xD;&#xA;2023-07-02 16:24:58.689  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x7a4e64085afc435b04e366871435ad7c394c09f730a19caaf31d7da2645a6813&#xD;&#xA;2023-07-02 16:24:58.715  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 9690000 [hash: 0xdbb7c1026537c7ded7a69b878ebec1570dd0d7d9a151673bf75ba76555fd957b; parent_hash: 0x7a4e…6813; extrinsics (3): [0x105c…49a3, 0x0e90…8485, 0xaf9f…8ed2]]&#xD;&#xA;2023-07-02 16:24:58.716  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 9690000. Hash now 0x5628567644e59458cba37accf115ffa14c7b2df8cff0f46da8f1f49afeb21379, previously 0xdbb7c1026537c7ded7a69b878ebec1570dd0d7d9a151673bf75ba76555fd957b.&#xD;&#xA;2023-07-02 16:24:58.717  INFO tokio-runtime-worker afg: Not applying authority set change forced at block #9689995, due to pending standard change at block #9689962&#xD;&#xA;2023-07-02 16:24:58.717  WARN tokio-runtime-worker aura: Error with block built on 0x7a4e64085afc435b04e366871435ad7c394c09f730a19caaf31d7da2645a6813: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #9689962&quot;)&#xD;&#xA;2023-07-02 16:25:03.149  INFO tokio-runtime-worker substrate:  Idle (1 peers), best: #9689999 (0x7a4e…6813), finalized #9689961 (0x4b87…a82f), ⬇ 83 B/s ⬆ 0.7kiB/s" ContentLicense="CC BY-SA 4.0" />
  <row Id="36025" PostHistoryTypeId="5" PostId="9095" RevisionGUID="d7afd78a-da42-46e3-863a-18f0f2dfabcb" CreationDate="2023-07-02T16:26:29.537" UserId="4383" Comment="deleted 715 characters in body" Text="Error with block built on &#xD;&#xA;&#xD;&#xA;`0xxxx: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #xx&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Block production and also finalization stopped, in txpool I found sudo call, and remove it via `author_removeExtrinsic`, but block production not fixed&#xD;&#xA;&#xD;&#xA;UPD:&#xD;&#xA;&#xD;&#xA;There were 2 validators in the network and I wanted to add a third one using `validatorSet.addValidator()`. However, I mistakenly executed `validatorSet.forceRotateSession()`.&#xD;&#xA;&#xD;&#xA;Prior to that, I also executed `grandpa.NoteStalled()` because finalization had stopped.&#xD;&#xA;&#xD;&#xA;After this, `validatorSet.forceRotateSession()` took a very long time and the transaction did not go through, getting stuck in the queue. Now everything has stopped, including block production and finalization.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;LOG:&#xD;&#xA;&#xD;&#xA;`&#xD;&#xA;2023-07-02 16:24:58.689  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x7a4e64085afc435b04e366871435ad7c394c09f730a19caaf31d7da2645a6813&#xD;&#xA;2023-07-02 16:24:58.715  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 9690000 [hash: 0xdbb7c1026537c7ded7a69b878ebec1570dd0d7d9a151673bf75ba76555fd957b; parent_hash: 0x7a4e…6813; extrinsics (3): [0x105c…49a3, 0x0e90…8485, 0xaf9f…8ed2]]&#xD;&#xA;2023-07-02 16:24:58.716  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 9690000. Hash now 0x5628567644e59458cba37accf115ffa14c7b2df8cff0f46da8f1f49afeb21379, previously 0xdbb7c1026537c7ded7a69b878ebec1570dd0d7d9a151673bf75ba76555fd957b.&#xD;&#xA;2023-07-02 16:24:58.717  INFO tokio-runtime-worker afg: Not applying authority set change forced at block #9689995, due to pending standard change at block #9689962&#xD;&#xA;2023-07-02 16:24:58.717  WARN tokio-runtime-worker aura: Error with block built on 0x7a4e64085afc435b04e366871435ad7c394c09f730a19caaf31d7da2645a6813: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #9689962&quot;)&#xD;&#xA;2023-07-02 16:25:03.149  INFO tokio-runtime-worker substrate:  Idle (1 peers), best: #9689999 (0x7a4e…6813), finalized #9689961 (0x4b87…a82f), ⬇ 83 B/s ⬆ 0.7kiB/s&#xD;&#xA;&#xD;&#xA;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="36026" PostHistoryTypeId="5" PostId="9095" RevisionGUID="0d74318a-7b2d-462e-8e32-bb809e8066d2" CreationDate="2023-07-02T16:26:54.833" UserId="4383" Comment="added 22 characters in body" Text="Error with block built on &#xD;&#xA;&#xD;&#xA;`0xxxx: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #xx&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Block production and also finalization stopped, in txpool I found sudo call, and remove it via `author_removeExtrinsic`, but block production not fixed&#xD;&#xA;&#xD;&#xA;UPD:&#xD;&#xA;&#xD;&#xA;There were 2 validators in the network and I wanted to add a third one using `validatorSet.addValidator()`. However, I mistakenly executed `validatorSet.forceRotateSession()`.&#xD;&#xA;&#xD;&#xA;Prior to that, I also executed `grandpa.NoteStalled()` because finalization had stopped.&#xD;&#xA;&#xD;&#xA;After this, `validatorSet.forceRotateSession()` took a very long time and the transaction did not go through, getting stuck in the queue. Now everything has stopped, including block production and finalization.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;LOG:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    2023-07-02 16:24:58.689  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x7a4e64085afc435b04e366871435ad7c394c09f730a19caaf31d7da2645a6813&#xD;&#xA;    2023-07-02 16:24:58.715  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 9690000 [hash: 0xdbb7c1026537c7ded7a69b878ebec1570dd0d7d9a151673bf75ba76555fd957b; parent_hash: 0x7a4e…6813; extrinsics (3): [0x105c…49a3, 0x0e90…8485, 0xaf9f…8ed2]]&#xD;&#xA;    2023-07-02 16:24:58.716  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 9690000. Hash now 0x5628567644e59458cba37accf115ffa14c7b2df8cff0f46da8f1f49afeb21379, previously 0xdbb7c1026537c7ded7a69b878ebec1570dd0d7d9a151673bf75ba76555fd957b.&#xD;&#xA;    2023-07-02 16:24:58.717  INFO tokio-runtime-worker afg: Not applying authority set change forced at block #9689995, due to pending standard change at block #9689962&#xD;&#xA;    2023-07-02 16:24:58.717  WARN tokio-runtime-worker aura: Error with block built on 0x7a4e64085afc435b04e366871435ad7c394c09f730a19caaf31d7da2645a6813: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #9689962&quot;)&#xD;&#xA;    2023-07-02 16:25:03.149  INFO tokio-runtime-worker substrate:  Idle (1 peers), best: #9689999 (0x7a4e…6813), finalized #9689961 (0x4b87…a82f), ⬇ 83 B/s ⬆ 0.7kiB/s&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36027" PostHistoryTypeId="33" PostId="9078" RevisionGUID="4740ee1a-4e17-40b8-8c4e-5f1663f08373" CreationDate="2023-07-02T17:33:22.283" UserId="3395" Comment="29" />
  <row Id="36028" PostHistoryTypeId="5" PostId="9097" RevisionGUID="cf7f45e3-cb3f-4df4-b90b-53be8407a928" CreationDate="2023-07-02T17:37:49.643" UserId="3171" Comment="edited body" Text="Okay, so there is no_std implementation with strict feature in bech32-no_std crate&#xD;&#xA;&#xD;&#xA;    [dependencies]&#xD;&#xA;    bech32-no_std = { version = &quot;0.7.3&quot;, default-features = false, features = [&quot;strict&quot;] }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36030" PostHistoryTypeId="2" PostId="9098" RevisionGUID="48fa4184-5137-458c-ab36-9252e63b9305" CreationDate="2023-07-02T17:59:12.403" UserId="251" Text="It's really easy.&#xD;&#xA;&#xD;&#xA;Check this test. https://github.com/darwinia-network/darwinia/blob/12466db6d4a8d19b2d16461af05b7f155362223b/pallet/deposit/src/tests.rs#L237-L268&#xD;&#xA;&#xD;&#xA;This will use the current pallet's `Error`:&#xD;&#xA;```rs&#xD;&#xA;assert_noop!(&#xD;&#xA;	Deposit::lock(RuntimeOrigin::signed(1), UNIT, 1),&#xD;&#xA;	&lt;Error&lt;Runtime&gt;&gt;::ExceedMaxDeposits&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And if you want to use an `Error` from other (e.g. `pallet_balances`) pallet, simply write:&#xD;&#xA;```rs&#xD;&#xA;assert_noop!(&#xD;&#xA;	Deposit::lock(RuntimeOrigin::signed(2), 2_001 * UNIT, 1),&#xD;&#xA;	&lt;pallet_balances::Error&lt;Runtime&gt;&gt;::InsufficientBalance&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To use this, make sure you have `impl other_pallet::Config for mock::Runtime {}`." ContentLicense="CC BY-SA 4.0" />
  <row Id="36032" PostHistoryTypeId="50" PostId="7040" RevisionGUID="7966d566-c6db-4423-ac0d-418eac12f159" CreationDate="2023-07-02T18:07:50.953" UserId="-1" />
  <row Id="36033" PostHistoryTypeId="5" PostId="8953" RevisionGUID="4c6ab191-afc8-4d7b-8889-a24399bd9547" CreationDate="2023-07-02T20:18:17.643" UserId="83" Comment="typos" Text="I'm fairly new to Rust and ink! itself. &#xD;&#xA;&#xD;&#xA;I'm trying to compile and build an extremely basic PSP22 Contract.&#xD;&#xA;&#xD;&#xA;**I get the following error when I compile &amp; build:** &#xD;&#xA;&#xD;&#xA;(running `cargo +nightly contract build`)&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The following is my **Contract** (`lib.rs`) : &#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    #![feature(min_specialization)]&#xD;&#xA;            &#xD;&#xA;    #[openbrush::contract]&#xD;&#xA;    pub mod my_psp22 {&#xD;&#xA;        &#xD;&#xA;        // imports from openbrush&#xD;&#xA;    	use openbrush::contracts::psp22::*;&#xD;&#xA;    	use openbrush::traits::Storage;&#xD;&#xA;    &#xD;&#xA;        #[ink(storage)]&#xD;&#xA;        #[derive(Default, Storage)]&#xD;&#xA;        pub struct Ipsp22 {&#xD;&#xA;        	#[storage_field]&#xD;&#xA;    		psp22: psp22::Data,&#xD;&#xA;        }&#xD;&#xA;        &#xD;&#xA;        // Section contains default implementation without any modifications&#xD;&#xA;    	impl PSP22 for Ipsp22 {}&#xD;&#xA;         &#xD;&#xA;        impl Ipsp22 {&#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn new(initial_supply: Balance) -&gt; Self {&#xD;&#xA;                let mut _instance = Self::default();&#xD;&#xA;    			_instance._mint_to(_instance.env().caller(), initial_supply).expect(&quot;Should mint&quot;); &#xD;&#xA;    			_instance&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And here is my **Cargo.toml** : &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;my_token&quot;&#xD;&#xA;    version = &quot;0.1.0&quot;&#xD;&#xA;    authors = [&quot;0xD1x0n&quot;]&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    license = &quot;Apache 2.0&quot;&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    ink = { version = &quot;~4.0.0&quot;, default-features = false }&#xD;&#xA;    openbrush = { git = &quot;https://github.com/727-Ventures/openbrush-contracts/&quot;, tag = &quot;3.0.0&quot;, default-features = false, features = [&quot;psp22&quot;, &quot;ownable&quot;] }&#xD;&#xA;    &#xD;&#xA;    scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    &#xD;&#xA;    [lib]&#xD;&#xA;    name = &quot;my_token&quot;&#xD;&#xA;    path = &quot;lib.rs&quot;&#xD;&#xA;    crate-type = [&#xD;&#xA;        &quot;cdylib&quot;,&#xD;&#xA;        &quot;rlib&quot;,&#xD;&#xA;    ]&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;        &quot;ink/std&quot;,&#xD;&#xA;        &quot;scale/std&quot;,&#xD;&#xA;        &quot;scale-info/std&quot;,&#xD;&#xA;        &quot;openbrush/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;    ink-as-dependency = []&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;**I am using the following versions of these tools:** &#xD;&#xA;&#xD;&#xA; - rustc 1.69.0 (84c898d65 2023-04-16)&#xD;&#xA; - cargo-contract-contract 2.2.1-91b5a86-aarch64-apple-darwin&#xD;&#xA; - rustup 1.26.0 (5af9b9484 2023-04-05)&#xD;&#xA;&#xD;&#xA;I'm not quite sure why its happening, any help would be deeply appreciated&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/422d2.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36034" PostHistoryTypeId="50" PostId="5108" RevisionGUID="caa80d17-0fc0-4ebc-9440-d0399a270a6d" CreationDate="2023-07-02T22:03:40.403" UserId="-1" />
  <row Id="36035" PostHistoryTypeId="2" PostId="9099" RevisionGUID="030004fa-c2ea-4340-a851-34992f9e8980" CreationDate="2023-07-03T01:49:20.897" UserId="4247" Text="Are there any pallet examples for custom making XCM call. I know there is ping pallet provided by cumulus but I believe that is pretty old. &#xD;&#xA;&#xD;&#xA;Is ping pallet still works? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36037" PostHistoryTypeId="1" PostId="9099" RevisionGUID="030004fa-c2ea-4340-a851-34992f9e8980" CreationDate="2023-07-03T01:49:20.897" UserId="4247" Text="Simple Custom Pallet making XCM call" ContentLicense="CC BY-SA 4.0" />
  <row Id="36038" PostHistoryTypeId="3" PostId="9099" RevisionGUID="030004fa-c2ea-4340-a851-34992f9e8980" CreationDate="2023-07-03T01:49:20.897" UserId="4247" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36039" PostHistoryTypeId="2" PostId="9100" RevisionGUID="05616e7d-0741-4320-a93d-c9254f91300f" CreationDate="2023-07-03T02:09:54.327" UserId="1959" Text="This is because your reftime is specified as 0, which is not enough, it will cause `WeightLimitReached` error, you can try to specify reftime as `3000000000`&#xD;&#xA;&#xD;&#xA;This is my test record: https://rococo.subscan.io/extrinsic/6078033-2" ContentLicense="CC BY-SA 4.0" />
  <row Id="36041" PostHistoryTypeId="5" PostId="9099" RevisionGUID="4e1eacf6-13d7-4d94-99f8-5c12d9a4b66f" CreationDate="2023-07-03T04:36:28.717" UserId="354" Comment="added 2 characters in body; edited tags" Text="Are there any pallet examples for custom making `XCM` call. I know there is ping pallet provided by cumulus but I believe that is pretty old. &#xD;&#xA;&#xD;&#xA;Is ping pallet still works? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36042" PostHistoryTypeId="6" PostId="9099" RevisionGUID="4e1eacf6-13d7-4d94-99f8-5c12d9a4b66f" CreationDate="2023-07-03T04:36:28.717" UserId="354" Comment="added 2 characters in body; edited tags" Text="|xcm|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36043" PostHistoryTypeId="2" PostId="9101" RevisionGUID="3473e21e-9659-4a0e-aeee-390f65b2fcc3" CreationDate="2023-07-03T05:40:29.740" UserId="2762" Text="It looks that the account you have in Metamask is different as the one you are getting with your mnemonic phrase in your code snippet. And you have no funds to pay fees in the account that is sending the extrinsic.&#xD;&#xA;&#xD;&#xA;You can check this using the [subkey tool][1]:&#xD;&#xA;&#xD;&#xA;    subkey inspect &quot;your-mnemonic&quot;&#xD;&#xA;&#xD;&#xA;Then calculate the Eth Address of this account with this guide: [How to convert a Substrate address to an Etherum address?][2].&#xD;&#xA;&#xD;&#xA;If you are building on a Moonbeam chain, this guide: [How to use Polkadot.js Apps to Interact with Moonbeam][3].&#xD;&#xA;&#xD;&#xA;Another example, check this previous issue with the keys when sending an extrinsic: [Private key for EVM Frontier][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/command-line-tools/subkey/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1752/how-to-convert-a-substrate-address-to-an-etherum-address&#xD;&#xA;  [3]: https://docs.moonbeam.network/tokens/connect/polkadotjs/&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/6674/private-key-for-evm-frontier" ContentLicense="CC BY-SA 4.0" />
  <row Id="36045" PostHistoryTypeId="2" PostId="9102" RevisionGUID="fda6faee-d5d0-48cf-bcb1-4c6c6262e747" CreationDate="2023-07-03T06:12:59.227" UserId="2372" Text=" [Here][1] you can checkout that Transact will execute the encoded call that you prepared on the relay chain.Please check the requireWeightAtMost to specify the maximum amount of weight to use in dispatching the XCM call.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/open-message-passing-channels/&#xD;&#xA;  [2]: https://i.stack.imgur.com/Ai3T9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36048" PostHistoryTypeId="2" PostId="9103" RevisionGUID="a19bee1a-cd6e-4181-8be9-1f2746df4040" CreationDate="2023-07-03T06:42:42.043" UserId="4350" Text="So looks like there's no RPC client ATM which supports `no_std`.&#xD;&#xA;the following is the implementation of an RPC method using `sp_runtime::offchain::http::Request` and `serde`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use serde::{Deserialize, Serialize};&#xD;&#xA;use scale_info::prelude::string::String;&#xD;&#xA;use sp_runtime::{&#xD;&#xA;  offchain::{&#xD;&#xA;    http::Request,&#xD;&#xA;    Duration,    &#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;#[derive(Serialize, Deserialize, Clone)]&#xD;&#xA;struct RpcObject {&#xD;&#xA;  jsonrpc: String,&#xD;&#xA;  method: String,&#xD;&#xA;  params: String, // could be a nested object&#xD;&#xA;  id: String&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[derive(Serialize, Deserialize, Clone)]&#xD;&#xA;struct RpcResponse {&#xD;&#xA;  result: String,&#xD;&#xA;  id: String&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn call_rpc_method(url: &amp;str, method: String, params: String) -&gt; Result&lt;Vec&lt;u8&gt;, Error&lt;T&gt;&gt; {&#xD;&#xA;    let request_body = RpcObject {&#xD;&#xA;      jsonrpc: String::from(&quot;2.0&quot;),&#xD;&#xA;      method: method.into(),&#xD;&#xA;      params: params.into(),&#xD;&#xA;      id: String::from(&quot;1&quot;)&#xD;&#xA;    };&#xD;&#xA;    let request_body_str = serde_json::to_string(&amp;request_body).map_err(|_| &lt;Error&lt;T&gt;&gt;::Error)?;&#xD;&#xA;    let request = Request::post(url, vec![request_body_str.clone()])&#xD;&#xA;      .add_header(&quot;content-type&quot;, &quot;application/json&quot;);&#xD;&#xA;&#xD;&#xA;    let timeout = sp_io::offchain::timestamp()&#xD;&#xA;      .add(Duration::from_millis(FETCH_TIMEOUT_PERIOD));&#xD;&#xA;&#xD;&#xA;    let pending = request&#xD;&#xA;      .deadline(timeout)&#xD;&#xA;      .body(vec![request_body_str.clone()])&#xD;&#xA;      .send() // Sending the request out by the host&#xD;&#xA;      .map_err(|e| {&#xD;&#xA;        log::error!(&quot;rpc request err: {:?}&quot;, e);&#xD;&#xA;        &lt;Error&lt;T&gt;&gt;::Error&#xD;&#xA;      })?;&#xD;&#xA;&#xD;&#xA;    let response = pending&#xD;&#xA;      .try_wait(timeout)&#xD;&#xA;      .map_err(|e| {&#xD;&#xA;        log::error!(&quot;rpc error: {:?}&quot;, e);&#xD;&#xA;        &lt;Error&lt;T&gt;&gt;::HttpFetchingError&#xD;&#xA;      })?&#xD;&#xA;      .map_err(|e| {&#xD;&#xA;        log::error!(&quot;rpc error: {:?}&quot;, e);&#xD;&#xA;        &lt;Error&lt;T&gt;&gt;::HttpFetchingError&#xD;&#xA;      })?;&#xD;&#xA;&#xD;&#xA;    if response.code != 200 {&#xD;&#xA;      log::error!(&quot;Unexpected http request status code: {}&quot;, response.code);&#xD;&#xA;      return Err(&lt;Error&lt;T&gt;&gt;::HttpFetchingError);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // Next we fully read the response body and collect it to a vector of bytes.&#xD;&#xA;    let resp_bytes = response.body().collect::&lt;Vec&lt;u8&gt;&gt;();&#xD;&#xA;    Ok(resp_bytes)&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;next you can use the response like:&#xD;&#xA;```rust&#xD;&#xA;let resut: RpcResponse = serde_json::from_slice(&amp;res)&#xD;&#xA;            .map_err(|e| {&#xD;&#xA;              log::info!(&quot;deserialize error: {:?}&quot;, e);&#xD;&#xA;              &lt;Error&lt;T&gt;&gt;::DeserializeToObjError&#xD;&#xA;            })?;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36050" PostHistoryTypeId="2" PostId="9104" RevisionGUID="69db2654-05dd-4a95-90c7-602f48aed528" CreationDate="2023-07-03T08:01:24.460" UserId="2372" Text="To make the pallet locally and update the visibility of the update_ledger function from pub (crate) to pub, you can follow these steps:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA; - Locate the file where the update_ledger function is defined within   &#xD;&#xA;   your pallet.&#xD;&#xA;          Change the visibility of the update_ledger function from pub (crate)    to pub. This makes the function publicly accessible&#xD;&#xA;   outside of the    crate." ContentLicense="CC BY-SA 4.0" />
  <row Id="36052" PostHistoryTypeId="2" PostId="9105" RevisionGUID="e1ddea28-dbd7-4ace-bc73-38787f498aaf" CreationDate="2023-07-03T08:20:27.757" UserId="73" Text="Looks like you have bricked your network by sending a wrong `noteStalled`. You need to restart the chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="36054" PostHistoryTypeId="2" PostId="9106" RevisionGUID="a9581c90-b38d-457e-baa3-83dbeb80c213" CreationDate="2023-07-03T08:25:28.840" UserId="3317" Text="As for [Smoldot][1], it can connect to the Relay chains we know today and all its parachains. However, there is a long list of small things that smoldot or high level UIs assume are done a certain way when connecting to a chain. For example, Smoldot won't be compatible if parachains:&#xD;&#xA; - use different networking protocols&#xD;&#xA; - use a different trie format&#xD;&#xA; - change the number of bytes of the block number&#xD;&#xA; - use different hash function&#xD;&#xA; - decide to not have the metadata&#xD;&#xA; - and more such a like&#xD;&#xA;&#xD;&#xA;But other than that, Smoldot should be good to go!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/smol-dot/smoldot#does-smoldot-support-blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="36056" PostHistoryTypeId="34" PostId="9065" RevisionGUID="4905c876-c752-4898-9ba5-6fc50345f729" CreationDate="2023-07-03T09:16:30.613" UserId="2163" Comment="28" />
  <row Id="36057" PostHistoryTypeId="2" PostId="9107" RevisionGUID="b8edc329-c197-4c8a-9ab7-dd277a49df69" CreationDate="2023-07-03T09:35:44.973" UserId="3414" Text="I'm adding ping pallet in the parachain and i'm facing this issue &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OXxnd.png&#xD;&#xA;&#xD;&#xA;Can anyone guide me through this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36059" PostHistoryTypeId="1" PostId="9107" RevisionGUID="b8edc329-c197-4c8a-9ab7-dd277a49df69" CreationDate="2023-07-03T09:35:44.973" UserId="3414" Text="error: `&lt;C as TrieCacheProvider&lt;H&gt;&gt;::Cache&lt;'_&gt;` does not live long enough" ContentLicense="CC BY-SA 4.0" />
  <row Id="36060" PostHistoryTypeId="3" PostId="9107" RevisionGUID="b8edc329-c197-4c8a-9ab7-dd277a49df69" CreationDate="2023-07-03T09:35:44.973" UserId="3414" Text="|polkadot|parachain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36061" PostHistoryTypeId="2" PostId="9108" RevisionGUID="5a50567a-fbc9-4cfe-8a00-d78399bd5863" CreationDate="2023-07-03T09:39:16.037" UserId="2372" Text="It appears that your Cargo.toml file has multiple dependencies. You need to modify your Cargo.toml file to include only the necessary dependencies or remove any duplicate or conflicting dependencies." ContentLicense="CC BY-SA 4.0" />
  <row Id="36063" PostHistoryTypeId="2" PostId="9109" RevisionGUID="4cd528e4-62d1-4674-b982-5df32c0c0a94" CreationDate="2023-07-03T09:56:26.250" UserId="2372" Text="I want to pass the collection id in the from of MultiAssets to transfer it to the another chain. But i'm facing one issue &#xD;&#xA;&#xD;&#xA;    error[E0614]: type `&lt;T as pallet_nfts::Config&gt;::CollectionId` cannot be dereferenced&#xD;&#xA;       --&gt; xnft/src/lib.rs:201:30&#xD;&#xA;        |&#xD;&#xA;    201 |             let assets: MultiAssets = (*collection_id).try_into().map_err(|()| Error::&lt;T&gt;::BadVersion)?;&#xD;&#xA;        |                     &#xD;&#xA;&#xD;&#xA;                  ^^^^^^^^^^^^^^^^" ContentLicense="CC BY-SA 4.0" />
  <row Id="36065" PostHistoryTypeId="1" PostId="9109" RevisionGUID="4cd528e4-62d1-4674-b982-5df32c0c0a94" CreationDate="2023-07-03T09:56:26.250" UserId="2372" Text="error[E0614]: type `&lt;T as pallet_nfts::Config&gt;::CollectionId` cannot be dereferenced" ContentLicense="CC BY-SA 4.0" />
  <row Id="36066" PostHistoryTypeId="3" PostId="9109" RevisionGUID="4cd528e4-62d1-4674-b982-5df32c0c0a94" CreationDate="2023-07-03T09:56:26.250" UserId="2372" Text="|xcm|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36067" PostHistoryTypeId="2" PostId="9110" RevisionGUID="839a51f9-0c79-4be4-aba2-27b992310a46" CreationDate="2023-07-03T10:07:38.587" UserId="3109" Text="The error message  indicates that you're trying to dereference a type `&lt;T as pallet_nfts::Config&gt;::CollectionId`, but it is not a type that can be dereferenced. &#xD;&#xA;&#xD;&#xA;To resolve this issue, you should avoid dereferencing the `collection_id` directly. Instead, you can use the `Into` trait to convert it into the desired type. Here's an example of how you can modify your code to fix the issue:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let assets: MultiAssets = collection_id.into();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;By using the `Into` trait, the `collection_id` will be automatically converted into the appropriate type, as long as there is an implementation of `Into&lt;MultiAssets&gt;` for `CollectionId`.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36071" PostHistoryTypeId="2" PostId="9111" RevisionGUID="61b58505-23fa-49e8-bae9-bce83b780a92" CreationDate="2023-07-03T10:32:44.843" UserId="4068" Text="In the context of the Substrate framework, I'm trying to understand the differences between an HTTP server, an RPC server, and WebSockets. Specifically, how do these communication mechanisms relate to Substrate and what are their use cases within the framework? How does each of them facilitate interactions with the Substrate blockchain network? Are there any advantages or disadvantages of using one over the others? I'm looking for insights into the technical aspects and practical implications of choosing between an HTTP server, an RPC server, or WebSockets when developing applications on the Substrate framework." ContentLicense="CC BY-SA 4.0" />
  <row Id="36073" PostHistoryTypeId="1" PostId="9111" RevisionGUID="61b58505-23fa-49e8-bae9-bce83b780a92" CreationDate="2023-07-03T10:32:44.843" UserId="4068" Text="Difference between HTTP server, RPC server, and WebSockets in the context of Substrate framework?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36074" PostHistoryTypeId="3" PostId="9111" RevisionGUID="61b58505-23fa-49e8-bae9-bce83b780a92" CreationDate="2023-07-03T10:32:44.843" UserId="4068" Text="|substrate-node|websocket|rpc-server|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36075" PostHistoryTypeId="2" PostId="9112" RevisionGUID="1d299f3e-d580-470f-a991-d3c925dc4fe4" CreationDate="2023-07-03T10:32:44.843" UserId="4068" Text="The answer i got is -&#xD;&#xA;&#xD;&#xA;HTTP servers can be employed to expose RESTful APIs for interacting with the blockchain.&#xD;&#xA;The RPC server is a built-in component in Substrate, providing methods for external clients to interact with the blockchain network.&#xD;&#xA;WebSockets can be used to establish a persistent connection between clients and the Substrate node, enabling real-time data streaming and push notifications. The Substrate RPC server also supports WebSocket connections.&#xD;&#xA;&#xD;&#xA;But i am still confussed. &#xD;&#xA;&#xD;&#xA;Please provide some practicle examplse." ContentLicense="CC BY-SA 4.0" />
  <row Id="36077" PostHistoryTypeId="5" PostId="9111" RevisionGUID="4c65489d-01f9-4d67-bffb-74d704624fbf" CreationDate="2023-07-03T10:46:37.023" UserId="4068" Comment="added 366 characters in body" Text="In the context of the Substrate framework, I'm trying to understand the differences between an HTTP server, an RPC server, and WebSockets. Specifically, how do these communication mechanisms relate to Substrate and what are their use cases within the framework? How does each of them facilitate interactions with the Substrate blockchain network? Are there any advantages or disadvantages of using one over the others? I'm looking for insights into the technical aspects and practical implications of choosing between an HTTP server, an RPC server, or WebSockets when developing applications on the Substrate framework.&#xD;&#xA;&#xD;&#xA;To assist you better, I would like to clarify that the calls made to Substrate can be categorized based on the protocols used: HTTP, RPC, and WS. It would be greatly appreciated if you could provide an explanation along with a separate list for each category. Additionally, it would be helpful to understand the rationale behind categorizing them separately.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36078" PostHistoryTypeId="5" PostId="9112" RevisionGUID="528dffbf-864d-4ae3-9409-7f660bafbda7" CreationDate="2023-07-03T10:52:50.257" UserId="4068" Comment="added 3471 characters in body" Text="The answer i got is -&#xD;&#xA;&#xD;&#xA;HTTP servers can be employed to expose RESTful APIs for interacting with the blockchain.&#xD;&#xA;The RPC server is a built-in component in Substrate, providing methods for external clients to interact with the blockchain network.&#xD;&#xA;WebSockets can be used to establish a persistent connection between clients and the Substrate node, enabling real-time data streaming and push notifications. The Substrate RPC server also supports WebSocket connections.&#xD;&#xA;&#xD;&#xA;Let's break down the different calls we can make to Substrate using HTTP, RPC, and WebSockets:&#xD;&#xA;&#xD;&#xA;1. HTTP Server:&#xD;&#xA;&#xD;&#xA;HTTP is a stateless protocol, and in the context of Substrate, it is commonly used for simple, read-only operations and off-chain interactions. It offers a RESTful interface, where each HTTP request corresponds to a specific action or query.&#xD;&#xA;&#xD;&#xA;Common HTTP calls to Substrate:&#xD;&#xA;- GET /block/{blockHash or blockNumber}: Retrieves information about a specific block by its hash or number.&#xD;&#xA;- GET /extrinsic/{extrinsicHash}: Fetches details about a specific extrinsic (transaction) by its hash.&#xD;&#xA;- GET /storage/{storageKey}: Retrieves the value stored at the specified storage key.&#xD;&#xA;- POST /rpc: Submits extrinsics (transactions) to the Substrate node.&#xD;&#xA;&#xD;&#xA;2. RPC Server (Remote Procedure Call):&#xD;&#xA;&#xD;&#xA;RPC is a protocol used to communicate between a client (often an application) and a server (Substrate node) to execute specific functions and obtain results. Substrate exposes an RPC interface to interact with its blockchain, and it provides a broader range of functionalities compared to HTTP.&#xD;&#xA;&#xD;&#xA;Common RPC calls to Substrate:&#xD;&#xA;- chain_getBlock: Gets information about a specific block.&#xD;&#xA;- state_getStorage: Retrieves the value stored at the specified storage key.&#xD;&#xA;- author_submitExtrinsic: Submits an extrinsic (transaction) to the Substrate node.&#xD;&#xA;- system_health: Checks the health and status of the Substrate node.&#xD;&#xA;&#xD;&#xA;3. WebSockets:&#xD;&#xA;&#xD;&#xA;WebSockets offer a full-duplex communication channel over a single, long-lived connection, enabling real-time data streaming and bidirectional communication between the client and the Substrate node. WebSockets are useful for applications that require continuous updates or real-time data from the blockchain.&#xD;&#xA;&#xD;&#xA;Common WebSocket calls to Substrate:&#xD;&#xA;- chain_subscribeNewHeads: Subscribes to new block headers as they are added to the blockchain.&#xD;&#xA;- chain_subscribeFinalizedHeads: Subscribes to finalized block headers.&#xD;&#xA;- state_subscribeStorage: Subscribes to changes in a specific storage key.&#xD;&#xA;- author_submitAndWatchExtrinsic: Submits an extrinsic (transaction) and subscribes to its status updates.&#xD;&#xA;&#xD;&#xA;Advantages and Disadvantages:&#xD;&#xA;&#xD;&#xA;- HTTP:&#xD;&#xA;  - Advantages: Simple to use and widely supported by various programming languages and libraries. Suitable for read-only operations and public data retrieval.&#xD;&#xA;  - Disadvantages: Limited real-time capabilities, not ideal for streaming real-time data.&#xD;&#xA;&#xD;&#xA;- RPC:&#xD;&#xA;  - Advantages: Provides a broader set of functionalities compared to HTTP. Well-suited for various use cases, including extrinsic submission and state queries.&#xD;&#xA;  - Disadvantages: Still lacks the real-time capabilities of WebSockets.&#xD;&#xA;&#xD;&#xA;- WebSockets:&#xD;&#xA;  - Advantages: Offers real-time data streaming and bidirectional communication, making it perfect for applications that require continuous updates or interactivity with the blockchain.&#xD;&#xA;  - Disadvantages: Slightly more complex to implement than HTTP or RPC, and may not be supported by all clients or libraries.&#xD;&#xA;&#xD;&#xA;When developing applications on the Substrate framework, choosing the appropriate communication mechanism (HTTP, RPC, or WebSockets) depends on the specific requirements of the application. For basic read-only interactions, HTTP might suffice. For more complex and real-time use cases, WebSockets could be the preferred choice. Meanwhile, RPC covers a wide range of functionalities, making it a versatile option for many scenarios.&#xD;&#xA;&#xD;&#xA;But i am still confussed. &#xD;&#xA;&#xD;&#xA;Please provide some practicle examplse." ContentLicense="CC BY-SA 4.0" />
  <row Id="36081" PostHistoryTypeId="5" PostId="9111" RevisionGUID="09af4c9c-a535-4e94-8a95-153579dc8720" CreationDate="2023-07-03T10:54:56.643" UserId="3136" Comment="modify in body" Text="In the context of the Substrate framework, I'm trying to understand the differences between an `HTTP server`, an `RPC server`, and `WebSockets`. Specifically, how do these communication mechanisms relate to Substrate and what are their use cases within the framework? How does each of them facilitate interactions with the Substrate blockchain network? Are there any advantages or disadvantages of using one over the others? I'm looking for insights into the technical aspects and practical implications of choosing between an HTTP server, an RPC server, or WebSockets when developing applications on the Substrate framework.&#xD;&#xA;&#xD;&#xA;To assist you better, I would like to clarify that the calls made to Substrate can be categorized based on the protocols used: HTTP, RPC, and WS. It would be greatly appreciated if you could provide an explanation along with a separate list for each category. Additionally, it would be helpful to understand the rationale behind categorizing them separately.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36086" PostHistoryTypeId="2" PostId="9115" RevisionGUID="7280c9b9-dedc-44f8-a6bb-e0130b99707d" CreationDate="2023-07-03T13:49:03.473" UserId="2722" Text="I'm working on a project involving an EVM-compatible Substrate blockchain and facing a challenge. The problem arises when trying to map Ethereum-based addresses, acquired through Metamask, to the corresponding Substrate addresses.&#xD;&#xA;&#xD;&#xA;Here's what I'm trying to achieve:&#xD;&#xA;&#xD;&#xA;I need to map an EVM address to a Substrate address.&#xD;&#xA;The balance associated with the EVM address should also be reflected or accessible in the Substrate environment.&#xD;&#xA;I understand that the cryptographic algorithms (sr25519 or ed25519 for Substrate and secp256k1 for Ethereum) yield different addresses even with the same private key.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any guidance, advice, or code examples would be greatly appreciated. Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="36088" PostHistoryTypeId="1" PostId="9115" RevisionGUID="7280c9b9-dedc-44f8-a6bb-e0130b99707d" CreationDate="2023-07-03T13:49:03.473" UserId="2722" Text="Mapping EVM Address to Substrate Address with Preserved Balance" ContentLicense="CC BY-SA 4.0" />
  <row Id="36089" PostHistoryTypeId="3" PostId="9115" RevisionGUID="7280c9b9-dedc-44f8-a6bb-e0130b99707d" CreationDate="2023-07-03T13:49:03.473" UserId="2722" Text="|substrate-node-template|evm|moonbeam|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36090" PostHistoryTypeId="2" PostId="9116" RevisionGUID="575b48c1-0e7f-4d33-b771-018b42e88f3a" CreationDate="2023-07-03T16:06:07.713" UserId="2762" Text="Finally I found the solution, as suspected was related to the conversion of the WASM file. Checking how the WASM runtime file is generated [here][1]:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;Some(cli::Subcommand::ExportGenesisWasm(_params)) =&gt; {&#xD;&#xA;			let collator = Collator::new();&#xD;&#xA;			println!(&quot;0x{:?}&quot;, HexDisplay::from(&amp;collator.validation_code()));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The first thing that has to be done is remove the `0x` in the file, an easy way to do it is deleting the first 2 characters:&#xD;&#xA;```rs&#xD;&#xA;validation_code.remove(0);&#xD;&#xA;validation_code.remove(0);  &#xD;&#xA;```&#xD;&#xA;And as seen in the code, the format of the file is `hex`, so importing the hex library in the Cargo and decoding the hex will make the proper conversion to bytes.&#xD;&#xA;```rs&#xD;&#xA;let code = hex::decode(validation_code).expect(&quot;Decoding failed&quot;):&#xD;&#xA;```&#xD;&#xA;And now with the cast `ValidationCode(code)` it works in the extrinsic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/parachain/test-parachains/adder/collator/src/main.rs#L45" ContentLicense="CC BY-SA 4.0" />
  <row Id="36092" PostHistoryTypeId="50" PostId="8757" RevisionGUID="84088965-247f-4ebd-825b-cc0c58fe2f3e" CreationDate="2023-07-03T16:08:36.003" UserId="-1" />
  <row Id="36095" PostHistoryTypeId="2" PostId="9117" RevisionGUID="5ee470b3-2c88-4578-8c24-9943978daf9c" CreationDate="2023-07-03T16:43:38.457" UserId="3711" Text="Let's say I have a simple/contrived ink contract:&#xD;&#xA;```&#xD;&#xA;#[ink(storage)&#xD;&#xA;pub struct MyContract {&#xD;&#xA;    a: u8,&#xD;&#xA;    b: u8,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Now let's say it's in production and `a == 1` and `b == 2`.&#xD;&#xA;&#xD;&#xA;I've done some work and realised that I no longer need `a` and instead need a new variable in storage, `c`.&#xD;&#xA;```&#xD;&#xA;#[ink(storage)&#xD;&#xA;pub struct MyContract {&#xD;&#xA;    a: u8,&#xD;&#xA;    b: u8,&#xD;&#xA;    c: u8,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've compiled the contract and done a `set_code_hash()` on my production contract. I've also set the `c` variable to `3`.&#xD;&#xA;&#xD;&#xA;I now no longer need `a` in my contract storage, so I remove it. Here's where the problem lies. The contract storage is currently laid out like so:&#xD;&#xA;```&#xD;&#xA;[1,2,3]&#xD;&#xA; ^ ^ ^&#xD;&#xA; a b c&#xD;&#xA;```&#xD;&#xA;Removing the `a` field like so:&#xD;&#xA;```&#xD;&#xA;#[ink(storage)&#xD;&#xA;pub struct MyContract {&#xD;&#xA;    b: u8,&#xD;&#xA;    c: u8,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and doing a `set_code_hash()` leaves the underlying storage unchanged, but the fields shift like so:&#xD;&#xA;```&#xD;&#xA;[1,2,3]&#xD;&#xA; ^ ^ &#xD;&#xA; b c &#xD;&#xA;```&#xD;&#xA;Which is rather frustrating. How can I remove the `a` variable from the storage too? Something to make the storage become:&#xD;&#xA;```&#xD;&#xA;[2,3]&#xD;&#xA; ^ ^ &#xD;&#xA; b c &#xD;&#xA;```&#xD;&#xA;I've contemplated doing some kind of bit shift on the contract storage by the size of the field being removed, but I have no idea where to start accessing the `byte[]` for the contract storage!&#xD;&#xA;&#xD;&#xA;Further, imagine using complex types where the fields being removed are not at the start. How could that be done?&#xD;&#xA;E.g.&#xD;&#xA;```&#xD;&#xA;#[ink(storage)&#xD;&#xA;pub struct MyContract {&#xD;&#xA;    a: u8,&#xD;&#xA;    b: u8,&#xD;&#xA;    c: u8,&#xD;&#xA;    d: Mapping&lt;AccountId, AccountId&gt;, // &lt;-- let's say I want to remove this field&#xD;&#xA;    e: Vec&lt;u8&gt;,&#xD;&#xA;    f: u128,&#xD;&#xA;    g: Mapping&lt;u8, u8&gt;,&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36097" PostHistoryTypeId="1" PostId="9117" RevisionGUID="5ee470b3-2c88-4578-8c24-9943978daf9c" CreationDate="2023-07-03T16:43:38.457" UserId="3711" Text="How do I upgrade an ink contract with storage changes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36098" PostHistoryTypeId="3" PostId="9117" RevisionGUID="5ee470b3-2c88-4578-8c24-9943978daf9c" CreationDate="2023-07-03T16:43:38.457" UserId="3711" Text="|ink|smart-contract|storage|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36099" PostHistoryTypeId="2" PostId="9118" RevisionGUID="195efa29-0efa-474c-ba93-1eb3bd261838" CreationDate="2023-07-03T16:49:31.987" UserId="170" Text="You should not change the layout of the storage after upgrade. The order and types of the fields has to remain the same. If you want to remove the field `a`, you can simply rename it to `c` as the order will still be `u8, u8`.&#xD;&#xA;&#xD;&#xA;You can read more about upgrading storage in ink! [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/basics/upgradeable-contracts#storage-compatibility" ContentLicense="CC BY-SA 4.0" />
  <row Id="36101" PostHistoryTypeId="5" PostId="9115" RevisionGUID="d8d1dd37-c749-4756-8a38-0c575040081d" CreationDate="2023-07-03T17:06:27.823" UserId="354" Comment="added 10 characters in body" Text="I'm working on a project involving an `EVM-compatible` Substrate blockchain and facing a challenge. The problem arises when trying to map `Ethereum-based` addresses, acquired through Metamask, to the corresponding Substrate addresses.&#xD;&#xA;&#xD;&#xA;Here's what I'm trying to achieve:&#xD;&#xA;&#xD;&#xA;I need to map an EVM address to a Substrate address.&#xD;&#xA;The balance associated with the EVM address should also be reflected or accessible in the Substrate environment.&#xD;&#xA;I understand that the cryptographic algorithms (`sr25519` or `ed25519` for Substrate and `secp256k1` for Ethereum) yield different addresses even with the same private key.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any guidance, advice, or code examples would be greatly appreciated. Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="36102" PostHistoryTypeId="52" PostId="9111" RevisionGUID="04734c79-7bfc-47cd-ab30-d01872bc7e80" CreationDate="2023-07-03T18:35:51.857" />
  <row Id="36103" PostHistoryTypeId="2" PostId="9119" RevisionGUID="eef477be-a865-4143-ab20-4576c64f1b44" CreationDate="2023-07-03T18:48:24.780" UserId="2454" Text="When running an API function using rust, we get this error:&#xD;&#xA;&#xD;&#xA;```GenericError { reason: &quot;Failed to get unsigned proposals: FailedToDecodeReturnValue { function: \&quot;DKGApi_get_unsigned_proposals\&quot;, error: Error { cause: None, desc: \&quot;Not enough data to fill buffer\&quot; } }&quot; }```&#xD;&#xA;&#xD;&#xA;What could be causing this?&#xD;&#xA;&#xD;&#xA;**Background**&#xD;&#xA;&#xD;&#xA;Repository: https://github.com/webb-tools/dkg-substrate&#xD;&#xA;&#xD;&#xA;Host OS: Mac Ventura&#xD;&#xA;&#xD;&#xA;CPU: Mac M1&#xD;&#xA;&#xD;&#xA;Substrate: `0.9.39`&#xD;&#xA;&#xD;&#xA;Executed in repository root with: `./scripts/run-standalone.sh --clean`" ContentLicense="CC BY-SA 4.0" />
  <row Id="36105" PostHistoryTypeId="1" PostId="9119" RevisionGUID="eef477be-a865-4143-ab20-4576c64f1b44" CreationDate="2023-07-03T18:48:24.780" UserId="2454" Text="Not enough data to fill buffer" ContentLicense="CC BY-SA 4.0" />
  <row Id="36106" PostHistoryTypeId="3" PostId="9119" RevisionGUID="eef477be-a865-4143-ab20-4576c64f1b44" CreationDate="2023-07-03T18:48:24.780" UserId="2454" Text="|parachain|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36107" PostHistoryTypeId="5" PostId="9101" RevisionGUID="cd7ef5ae-5ec0-4417-a938-5b2ec16c48ef" CreationDate="2023-07-03T18:51:57.947" UserId="2762" Comment="Update info" Text="The account you have in Metamask is different as the one you are getting with your mnemonic phrase in your code snippet. And you have no funds to pay fees in the account that is sending the extrinsic.&#xD;&#xA;&#xD;&#xA;You can check this using the [subkey tool][1]:&#xD;&#xA;&#xD;&#xA;    subkey inspect &quot;your-mnemonic&quot;&#xD;&#xA;&#xD;&#xA;Then calculate the Eth Address of this account with this guide: [How to convert a Substrate address to an Etherum address?][2].&#xD;&#xA;&#xD;&#xA;If you are building on a Moonbeam chain, this guide: [How to use Polkadot.js Apps to Interact with Moonbeam][3].&#xD;&#xA;&#xD;&#xA;*Edited*&#xD;&#xA;&#xD;&#xA;When you use your mnemonic to recover the keys in Metamask or in an EVM chain it results in a public_key different to the one you get on Substrate, due the fact that Substrate uses different crypto system than Ethereum's&#xD;&#xA;More information, check this previous issue on StackExchange when is better explained in the answers: [Private key for EVM Frontier][4].&#xD;&#xA;&#xD;&#xA;Parachains has different approaches to this problem, for example in Acala to get the same account on Metamask in order to see for example the balance you have to bind your MetaMask account to your Substrate account. &#xD;&#xA;&#xD;&#xA;Check this [guide from the Acala Documentation][5].&#xD;&#xA;&#xD;&#xA;Moonbeam has a [unified accounts][6] system, which replaces the default Substrate-style accounts and keys with Ethereum-style accounts and keys. As a result, you can interact with your Moonbeam account using MetaMask and Ethereum tools you may already be familiar with, such as Remix and Hardhat.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/command-line-tools/subkey/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1752/how-to-convert-a-substrate-address-to-an-etherum-address&#xD;&#xA;  [3]: https://docs.moonbeam.network/tokens/connect/polkadotjs/&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/6674/private-key-for-evm-frontier&#xD;&#xA;  [5]: https://evmdocs.acala.network/tooling/development-account#bind-accounts&#xD;&#xA;  [6]: https://docs.moonbeam.network/learn/features/unified-accounts/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36108" PostHistoryTypeId="5" PostId="9119" RevisionGUID="1644a424-9e60-4388-8ad3-029257e0a6dd" CreationDate="2023-07-03T18:56:43.683" UserId="2454" Comment="added 153 characters in body" Text="When running an API function using rust, we get this error:&#xD;&#xA;&#xD;&#xA;```GenericError { reason: &quot;Failed to get unsigned proposals: FailedToDecodeReturnValue { function: \&quot;DKGApi_get_unsigned_proposals\&quot;, error: Error { cause: None, desc: \&quot;Not enough data to fill buffer\&quot; } }&quot; }```&#xD;&#xA;&#xD;&#xA;What could be causing this?&#xD;&#xA;&#xD;&#xA;**Background**&#xD;&#xA;&#xD;&#xA;Repository: https://github.com/webb-tools/dkg-substrate&#xD;&#xA;&#xD;&#xA;Host OS: Mac Ventura&#xD;&#xA;&#xD;&#xA;CPU: Mac M1&#xD;&#xA;&#xD;&#xA;Substrate: `0.9.39`&#xD;&#xA;&#xD;&#xA;Executed in repository root with: `./scripts/run-standalone.sh --clean`&#xD;&#xA;&#xD;&#xA;Error raised at: https://github.com/webb-tools/dkg-substrate/blob/a1ac55ae6d8b8218aceef3731a1c3567af29b302/dkg-gadget/src/signing_manager/mod.rs#L101" ContentLicense="CC BY-SA 4.0" />
  <row Id="36109" PostHistoryTypeId="2" PostId="9120" RevisionGUID="c2aba745-de82-4cf5-b723-57bdc1ff0d64" CreationDate="2023-07-03T23:00:14.177" UserId="2960" Text="I am getting ump.InvalidFormat when I sending a XCM / UMP from local a local parachin setup to relay chain to. the message instruction is[1][withdraw, buydeposit, deposit] on the relaychain&#xD;&#xA;I am using the substrate-parahchain-template and polkadot.git as relay chain and zomebiet net to start a local chain in order to test sending anc XCM. I am following the example  [here][1] to create and send the xcm message. I have attached images of the zombienet config, xcm message and xcm events are the relaychain&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA; [![enter image description here][2]]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZBCMV.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ehzys.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/jO0dx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36111" PostHistoryTypeId="1" PostId="9120" RevisionGUID="c2aba745-de82-4cf5-b723-57bdc1ff0d64" CreationDate="2023-07-03T23:00:14.177" UserId="2960" Text="Getting ump.InvalidFormat at relaychain when sending XCM message" ContentLicense="CC BY-SA 4.0" />
  <row Id="36112" PostHistoryTypeId="3" PostId="9120" RevisionGUID="c2aba745-de82-4cf5-b723-57bdc1ff0d64" CreationDate="2023-07-03T23:00:14.177" UserId="2960" Text="|polkadot|parachain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36113" PostHistoryTypeId="2" PostId="9121" RevisionGUID="dbc77902-109c-4f09-bc04-ae8267132b62" CreationDate="2023-07-04T01:59:31.970" UserId="2415" Text="An RPC is the thing you want to do, e.g. [get the chain ID](https://polkadot.js.org/docs/substrate/rpc/#chainid-u64). As you can see this RPC is called `chainId` in the group `eth`.&#xD;&#xA;&#xD;&#xA;You have two ways to connect to the server and do these RPCs. You can convert an RPC calls into an HTTP request so you can send it. The procedure is documented [somewhere else](https://www.jsonrpc.org/specification). You turn it into a JSON object then send the JSON in an HTTP POST request. The request looks like this (I did not test it so there could be a mistake):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;POST / HTTP/1.1&#xD;&#xA;Host: name.of.server&#xD;&#xA;Content-Type: application/json-rpc&#xD;&#xA;Content-Length: 63&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;eth_chainId&quot;, &quot;params&quot;: [], &quot;id&quot;:0}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the response is like:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;HTTP/1.1 200 OK&#xD;&#xA;Content-Type: application/json-rpc&#xD;&#xA;Content-Length: 56&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;result&quot;: 1234, &quot;error&quot;: null, &quot;id&quot;: 0}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A different way to connect to the server and call RPCs is to use websockets. The websocket protocol is more complicated - you start making an HTTP connection and then convert it to a websocket connection, and then you can send a lot of RPC calls without having to make a new connection and send a bunch of extra metadata each time." ContentLicense="CC BY-SA 4.0" />
  <row Id="36115" PostHistoryTypeId="5" PostId="9121" RevisionGUID="07a473c4-66c6-4ace-a93b-6f4f31aa4f2a" CreationDate="2023-07-04T04:43:35.137" UserId="2281" Comment="added 4 characters in body" Text="An RPC is the thing you want to do, e.g. [get the chain ID](https://polkadot.js.org/docs/substrate/rpc/#chainid-u64). As you can see this RPC is called `chainId` in the group `eth`.&#xD;&#xA;&#xD;&#xA;You have two ways to connect to the server and do these RPCs. You can convert an RPC calls into an HTTP request so you can send it. The procedure is documented [somewhere else](https://www.jsonrpc.org/specification). You turn it into a JSON object then send the JSON in an HTTP POST request. The request looks like this (I did not test it so there could be a mistake):&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;POST / HTTP/1.1&#xD;&#xA;Host: name.of.server&#xD;&#xA;Content-Type: application/json-rpc&#xD;&#xA;Content-Length: 63&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;eth_chainId&quot;, &quot;params&quot;: [], &quot;id&quot;:0}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the response is like:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;HTTP/1.1 200 OK&#xD;&#xA;Content-Type: application/json-rpc&#xD;&#xA;Content-Length: 56&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;result&quot;: 1234, &quot;error&quot;: null, &quot;id&quot;: 0}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A different way to connect to the server and call RPCs is to use websockets. The websocket protocol is more complicated - you start making an HTTP connection and then convert it to a websocket connection, and then you can send a lot of RPC calls without having to make a new connection and send a bunch of extra metadata each time." ContentLicense="CC BY-SA 4.0" />
  <row Id="36116" PostHistoryTypeId="2" PostId="9122" RevisionGUID="39feb72c-c351-4812-b165-b3f2ae501f5c" CreationDate="2023-07-04T05:33:21.293" UserId="4389" Text="Example for HTTP Server : Assume you have developed a decentralized social media application using Substrate. You can set up an HTTP server that exposes an API endpoint /posts that allows users to retrieve the latest posts from the blockchain. The server can handle HTTP GET requests to /posts and respond with a JSON array containing the posts data.&#xD;&#xA;&#xD;&#xA;Example For RPC Server : Let's say you have created a substrate-based supply chain management system. You can create an RPC server that exposes methods like getProductDetails(productId) and createShipment(orderId, destination). External clients can make RPC calls to these methods, passing parameters needed to retrieve product details or create new shipments in the supply chain.&#xD;&#xA;&#xD;&#xA;Example For WebSocket : Imagine that you have developed a real-time trading platform on Substrate. You can establish a WebSocket connection between the trading platform client and the Substrate node. The server can transmit real-time updates, such as new trade orders or price updates, to the client via a WebSocket connection. This allows clients to receive instant notifications and update the trading interface accordingly.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36118" PostHistoryTypeId="2" PostId="9123" RevisionGUID="37749bd9-ecdf-4e10-bfb8-4eb92f139c04" CreationDate="2023-07-04T06:06:12.010" UserId="4381" Text="in polkadot.js staking , when i put the sestionkey, the result is  &quot;duplicated sessionkey&quot;&#xD;&#xA;&#xD;&#xA;i use the command in SSH &quot;echo '{&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_rotateKeys&quot;,&quot;params&quot;:[]}' | websocat -n1 -B 99999999 ws://127.0.0.1:9944&quot;&#xD;&#xA;&#xD;&#xA;i run nodes with different server address..&#xD;&#xA;&#xD;&#xA;what is the problem??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36120" PostHistoryTypeId="1" PostId="9123" RevisionGUID="37749bd9-ecdf-4e10-bfb8-4eb92f139c04" CreationDate="2023-07-04T06:06:12.010" UserId="4381" Text="duplicated sessionkey" ContentLicense="CC BY-SA 4.0" />
  <row Id="36121" PostHistoryTypeId="3" PostId="9123" RevisionGUID="37749bd9-ecdf-4e10-bfb8-4eb92f139c04" CreationDate="2023-07-04T06:06:12.010" UserId="4381" Text="|polkadot-js|polkadot|runtime|validator|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36122" PostHistoryTypeId="5" PostId="9123" RevisionGUID="07d9dc79-0f08-4b6b-a290-364d7ca62977" CreationDate="2023-07-04T06:11:17.587" UserId="4381" Comment="added 152 characters in body" Text="in polkadot.js staking , when i put the sestionkey, the result is  &quot;duplicated sessionkey&quot;&#xD;&#xA;&#xD;&#xA;i use the command in SSH &quot;echo '{&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_rotateKeys&quot;,&quot;params&quot;:[]}' | websocat -n1 -B 99999999 ws://127.0.0.1:9944&quot;&#xD;&#xA;&#xD;&#xA;i run 2 nodes with different server, i alreay erase the node and start new node with different server, so i wanted change the sesstioney but it does`nt work. duplicated sessionkey again and again&#xD;&#xA;&#xD;&#xA;what is the problem??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36123" PostHistoryTypeId="5" PostId="9123" RevisionGUID="5219c2c7-ad62-4302-9c4e-2913cee49891" CreationDate="2023-07-04T06:28:08.303" UserId="354" Comment="added 9 characters in body" Text="In polkadot.js staking , when i put the session key, the result is  &quot;duplicated session key&quot;&#xD;&#xA;&#xD;&#xA;I use the command in SSH &quot;echo `'{&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_rotateKeys&quot;,&quot;params&quot;:[]}' | websocket -n1 -B 99999999 ws://127.0.0.1:9944&quot;`&#xD;&#xA;&#xD;&#xA;I run 2 nodes with different server, I already erase the node and start new node with different server, so I wanted change the session key but it does not work. duplicated session key again and again&#xD;&#xA;&#xD;&#xA;what is the problem??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36124" PostHistoryTypeId="2" PostId="9124" RevisionGUID="56d281c5-1ddf-4512-ac02-e3f8e6fdb07a" CreationDate="2023-07-04T06:50:21.077" UserId="1959" Text="Try to `WithdrawAsset(0, Here)` rather than `(1, Here)`. `(0,Here)` is the native token in Relaychain, and relaychain cannot handle other tokens." ContentLicense="CC BY-SA 4.0" />
  <row Id="36126" PostHistoryTypeId="2" PostId="9125" RevisionGUID="b68134ff-8d3f-4f59-9365-48d1b94a5ccb" CreationDate="2023-07-04T06:58:40.243" UserId="251" Text="1. Have you properly cleaned the database? Make sure to stop all nodes and clean their respective databases. If you stop-clean-start each node individually, the new database will immediately sync with the data from the old node.&#xD;&#xA;2. There is no need to set this again if you have already set the keys in genesis.&#xD;&#xA;3. Did you accidentally send multiple `set_keys` extrinsics?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36132" PostHistoryTypeId="2" PostId="9127" RevisionGUID="f34dd4f4-ecb0-423b-9480-bb12370d41f5" CreationDate="2023-07-04T07:29:32.683" UserId="3721" Text="What is the best practice to create a URI in an off-chain worker hook? The `String` and `format!` usage is discouraged. But what is the most convenient way to create a URI from given parts like hostname, path, and maybe query parameters or a request body?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36134" PostHistoryTypeId="1" PostId="9127" RevisionGUID="f34dd4f4-ecb0-423b-9480-bb12370d41f5" CreationDate="2023-07-04T07:29:32.683" UserId="3721" Text="URI creation best practice" ContentLicense="CC BY-SA 4.0" />
  <row Id="36135" PostHistoryTypeId="3" PostId="9127" RevisionGUID="f34dd4f4-ecb0-423b-9480-bb12370d41f5" CreationDate="2023-07-04T07:29:32.683" UserId="3721" Text="|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36137" PostHistoryTypeId="2" PostId="9128" RevisionGUID="86b04d19-9fcb-4ece-8767-307639176a74" CreationDate="2023-07-04T07:47:24.003" UserId="1959" Text="It was because you use instruction [`WithdrawAsset(1,Here)`](https://github.com/ok-Alice/Astar/blob/liquid-staking/pallets/nomination-pools-staking/src/pallet/mod.rs#L254), but the relaychain [cannot handle this token](https://github.com/paritytech/polkadot/blob/release-v0.9.42/runtime/kusama/src/weights/xcm/mod.rs#L41), it only can handle the native token which is `(0, Here)`, this will [return Weight::MAX](https://github.com/paritytech/polkadot/blob/release-v0.9.42/runtime/kusama/src/weights/xcm/mod.rs#L82) when getting the weight of the instruction. Then cause the error `WeightNotComputable`." ContentLicense="CC BY-SA 4.0" />
  <row Id="36139" PostHistoryTypeId="2" PostId="9129" RevisionGUID="a1db91fd-2b01-4efa-ab87-97eaf77c7c3b" CreationDate="2023-07-04T07:54:22.943" UserId="251" Text="Because a lot of crates or specs are using `&amp;str` as the `uri` argument. I suggest still using `String` in OCW. You just need to write `extern crate alloc;` and `use alloc::string::String`." ContentLicense="CC BY-SA 4.0" />
  <row Id="36141" PostHistoryTypeId="6" PostId="9120" RevisionGUID="6208d008-a425-4bc1-a1b2-beb299921622" CreationDate="2023-07-04T07:54:39.457" UserId="1959" Comment="edited tags" Text="|polkadot|parachain|xcm|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36143" PostHistoryTypeId="2" PostId="9130" RevisionGUID="bd80b6a1-3efe-4359-b381-71a472ba386a" CreationDate="2023-07-04T08:02:58.833" UserId="251" Text="There are numeric examples in this pallet. You can check them at the following link: [GitHub - Open Web3 Stack - XTokens README](https://github.com/open-web3-stack/open-runtime-module-library/blob/master/xtokens/README.md).&#xD;&#xA;&#xD;&#xA;For example, you can construct an XCM using the code snippet provided here: [GitHub - Open Web3 Stack - XTokens lib.rs](https://github.com/open-web3-stack/open-runtime-module-library/blob/28a2e6f0df9540d91db4018c7ecebb8bfc217a2a/xtokens/src/lib.rs#L687-L694)." ContentLicense="CC BY-SA 4.0" />
  <row Id="36145" PostHistoryTypeId="5" PostId="8541" RevisionGUID="12f5d700-f72a-4517-9e38-5d7c5cae8cb3" CreationDate="2023-07-04T08:08:04.593" UserId="251" Comment="added 75 characters in body" Text="Actually, this is not a Substrate or Rust question.&#xD;&#xA;&#xD;&#xA;There is a change in GCC 13.&#xD;&#xA;&#xD;&#xA;I'm an ArchLinux user. I always keep the dependencies on the latest version.&#xD;&#xA;&#xD;&#xA;I have to use GCC 12 now.&#xD;&#xA;&#xD;&#xA;Try:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;CC=gcc-12 CXX=g++-12 cargo build --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you don't have `gcc-12` or `g++-12` you need to install it yourself. If you are an ArchLinux user, when your upgrade your system, these packages will be kept for you.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Linking issue: https://github.com/brson/wasm-opt-rs/issues/147." ContentLicense="CC BY-SA 4.0" />
  <row Id="36146" PostHistoryTypeId="2" PostId="9131" RevisionGUID="c3b94d25-a19a-4c4f-9b0d-2f1d34fbcb09" CreationDate="2023-07-04T08:31:20.723" UserId="1959" Text="&gt; Will I be able to call extrinsics of other chain via XCM?&#xD;&#xA;&#xD;&#xA;Yes, You can do it through the `Transact` instruction.&#xD;&#xA;&#xD;&#xA;&gt; Will I be able to modify the storage of a pallet on other chain?&#xD;&#xA;&#xD;&#xA;Sure, for example, there is an extrinsic in ChainA can change the storage of its pallet, you can call it via XCM from ChainB, then the storage in ChainA will be changed.&#xD;&#xA;&#xD;&#xA;These two questions are unrelated to `PalletInstance`, which is an instanced, indexed pallet that forms a constituent part of the context. Each pallet used in [`construct_runtime!`](https://github.com/darwinia-network/darwinia/blob/v6.3.4/runtime/darwinia/src/lib.rs#L115) is a instanced pallet (PalletInstance). And in XCM, it's also a Junction. For example, [Darwinia use the PalletInstance(Balance Pallet index)](https://github.com/darwinia-network/darwinia/blob/v6.3.4/runtime/darwinia/src/pallets/polkadot_xcm.rs#L107) to represent the native token ID. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36148" PostHistoryTypeId="2" PostId="9132" RevisionGUID="7731a08e-a580-4b31-af74-aa02a69a94df" CreationDate="2023-07-04T09:15:31.220" UserId="354" Text="I am using [subalfred][1] to fork my chain and was able to achieve the it, I got the latest state of the `old-chain` to the `forked-chain` but the `forked-chain` is starting from the genesis block or we can say starting a new chain with the state of the `old-chain`.&#xD;&#xA;&#xD;&#xA;But what I want is to get all blocks from `old-chain` to `forked-chain` like what `Ethereum` did in their **London Hard Fork**.&#xD;&#xA;&#xD;&#xA;Is there a way to that in substrate means retaining all the blocks even after doing a `hard-fork`, if yes please point to the resources for the same.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://subalfred.hack.ink/user/cli/state.html#command-state-fork-off" ContentLicense="CC BY-SA 4.0" />
  <row Id="36150" PostHistoryTypeId="1" PostId="9132" RevisionGUID="7731a08e-a580-4b31-af74-aa02a69a94df" CreationDate="2023-07-04T09:15:31.220" UserId="354" Text="How to get all the blocks when forking the chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36151" PostHistoryTypeId="3" PostId="9132" RevisionGUID="7731a08e-a580-4b31-af74-aa02a69a94df" CreationDate="2023-07-04T09:15:31.220" UserId="354" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36152" PostHistoryTypeId="5" PostId="9132" RevisionGUID="31b3e8df-73f8-4ee8-96c0-c76f506d71ff" CreationDate="2023-07-04T09:17:29.290" UserId="2281" Comment="deleted 3 characters in body" Text="I am using [subalfred][1] to fork my chain and was able to achieve  it, I got the latest state of the `old-chain` to the `forked-chain` but the `forked-chain` is starting from the genesis block or we can say starting a new chain with the state of the `old-chain`.&#xD;&#xA;&#xD;&#xA;But what I want is to get all blocks from `old-chain` to `forked-chain` like what `Ethereum` did in their **London Hard Fork**.&#xD;&#xA;&#xD;&#xA;Is there a way to that in substrate means retaining all the blocks even after doing a `hard-fork`, if yes please point to the resources for the same.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://subalfred.hack.ink/user/cli/state.html#command-state-fork-off" ContentLicense="CC BY-SA 4.0" />
  <row Id="36153" PostHistoryTypeId="5" PostId="844" RevisionGUID="6186c9ce-ae42-416f-8b96-0c2a278443a7" CreationDate="2023-07-04T09:32:20.680" UserId="3136" Comment="modify in body" Text="I setup a small `3 node` network that is using BABE and GRANDPA. When all 3 nodes are connected, it can produce blocks and `finalize` them. When 2 of the 3 nodes are connected, it can produce `blocks` but NOT finalize them.&#xD;&#xA;&#xD;&#xA;How can I configure GRANDPA so that blocks can be `finalized` when 2 of the `3 nodes` are connected?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36156" PostHistoryTypeId="5" PostId="1106" RevisionGUID="0139a9d6-1a95-41eb-b9d1-d91ea57d1f86" CreationDate="2023-07-04T09:49:12.643" UserId="3136" Comment="modify in body" Text="Can you tell me how to mock a `trait` in `benchmarking`?&#xD;&#xA;&#xD;&#xA;We have a pallet which takes NFTTrait as one of the configs. See below.&#xD;&#xA;&#xD;&#xA;        #[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;    		/// NFT Handler&#xD;&#xA;    		type NFTHandler: NFTTrait&lt;Self::AccountId, ClassId = ClassId, TokenId = TokenId&gt;;&#xD;&#xA;    	}&#xD;&#xA;&#xD;&#xA;In the mock, we have created a struct to mock NFTTrait and pass it to the config. &#xD;&#xA;&#xD;&#xA;    pub struct NFTHandler;&#xD;&#xA;&#xD;&#xA;    impl NFTTrait&lt;u128&gt; for NFTHandler {&#xD;&#xA;       fn check_ownership(who: &amp;AccountId, asset_id: &amp;Self::AssetId) -&gt; Result&lt;bool&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Config for Runtime {&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type NFTHandler = NFTHandler;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;So how do I achieve the same thing in benchmarking? I tried to &#xD;&#xA;add `use crate::mock::NFTHandler;` on top of benchmarking class. Although IDE can find the correct reference, it did give me an error when I built it.&#xD;&#xA;&#xD;&#xA;    error[E0432]: unresolved import `crate::mock`&#xD;&#xA;      --&gt; pallets/marketplace/src/benchmarking.rs:34:12&#xD;&#xA;       |&#xD;&#xA;    34 | use crate::mock::NFTHandler;&#xD;&#xA;       |            ^^^^ could not find `mock` in the crate root&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Below is a snippet from benchmarking file&#xD;&#xA;&#xD;&#xA;    #![cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    &#xD;&#xA;    use super::*;&#xD;&#xA;    use sp_std::prelude::*;&#xD;&#xA;    use sp_std::vec;&#xD;&#xA;    &#xD;&#xA;    #[allow(unused)]&#xD;&#xA;    use crate::*;&#xD;&#xA;    use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller};&#xD;&#xA;    use frame_support::traits::{Currency, Get};&#xD;&#xA;    use frame_system::RawOrigin;&#xD;&#xA;    use pallet_nft::{Attributes, CollectionType, TokenType};&#xD;&#xA;    use sp_runtime::traits::{AccountIdConversion, StaticLookup, UniqueSaturatedInto};&#xD;&#xA;    use crate::{Call, Config};&#xD;&#xA;    use crate::mock::NFTHandler;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    const SEED: u32 = 0;&#xD;&#xA;    pub type AccountId = u128;&#xD;&#xA;    pub type AssetId = u128;&#xD;&#xA;    &#xD;&#xA;    const ALICE: AccountId = 1;&#xD;&#xA;    const NFT_ID: AssetId = 99;&#xD;&#xA;    &#xD;&#xA;    fn mint_NFT&lt;T: Config&gt;(caller: T::AccountId) {&#xD;&#xA;    	NFTModule::&lt;T&gt;::mint(&#xD;&#xA;    		RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;    		ALICE,&#xD;&#xA;    		test_attributes(1)		&#xD;&#xA;    	);&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    benchmarks! {	&#xD;&#xA;    	list_item{&#xD;&#xA;    		let caller: T::AccountId = account('caller', 0, SEED);&#xD;&#xA;    &#xD;&#xA;            mint_NFT::&lt;T&gt;(caller.clone());&#xD;&#xA;    	}: _(RawOrigin::Signed(caller.clone()), NFT_ID)&#xD;&#xA;    	verify {&#xD;&#xA;    		let listing_id = crate::Pallet::&lt;T&gt;::get_listing_item(NFT_ID);&#xD;&#xA;    		assert_eq!(listing_id, 0);&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl_benchmark_test_suite!(Pallet, crate::benchmarking::tests::new_test_ext(), crate::mock::Test);&#xD;&#xA;&#xD;&#xA;Any suggestions are welcome, thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="36157" PostHistoryTypeId="5" PostId="1103" RevisionGUID="faf1eba0-d695-4523-bfb0-ffebef302eec" CreationDate="2023-07-04T09:51:28.213" UserId="3136" Comment="modify in body" Text="As the title suggests, I've been trying to call `assert_last_event` on the tests.rs class without success. The problem first happened when developing the kitties tutorial and after several toolchain version changes later, even more problems started to appear. I've noticed  [XLC's Kitties repo][1] doesn't emit events in the frontend, although the tests.rs class runs successfully despite calling assert_last_event. I've also tried [Substrate Node Template's repo][2], in all the branches that mention 'kitties', but all of them fire the following error:&#xD;&#xA;&#xD;&#xA;    error: failed to get `frame-benchmarking` as a dependency of package `node-template v4.0.0-dev (/home/frkmnt/Documents/Rust/kitties/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;    failed to load source for dependency `frame-benchmarking`&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;    Unable to update https://github.com/paritytech/substrate.git?tag=devhub/latest#e6fbbd5c&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;    object not found - no match for id (e6fbbd5cdf72a5ed7fd65138072ed1f8a320a33d); class=Odb (9); code=NotFound (-3)&#xD;&#xA;&#xD;&#xA;Attempting to update the toolchain as mentioned yields no result and updating the required versions only creates more dependency errors. I also tried it in a blank project, using the template pallet using the latest stable toolchain 1.59.0, along with several others, and modified the existing test to assert the last event as shown:&#xD;&#xA;&#xD;&#xA;    #[test]&#xD;&#xA;    fn it_works_for_default_value() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		assert_ok!(TemplateModule::do_something(Origin::signed(1), 42));&#xD;&#xA;		assert_eq!(TemplateModule::something(), Some(42));&#xD;&#xA;		System::assert_last_event(self::Event::TemplateModule(crate::Event::&lt;Test&gt;::SomethingStored(1, 42)))&#xD;&#xA;	});&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;My original project fired this same error, even though this is the only version that successfully ran:&#xD;&#xA;&#xD;&#xA;    ---- tests::it_works_for_default_value stdout ----&#xD;&#xA;    thread 'tests::it_works_for_default_value' panicked at 'events expected', &#xD;&#xA;    /mnt/dados/andre/.cargo/git/checkouts/substrate- &#xD;&#xA;    7e08433d4c370a21/32a4fe0/frame/system/src/lib.rs:1442:42&#xD;&#xA;&#xD;&#xA;I have no warnings and all my code compiles successfully. Before this, it also emitted events and worked perfectly in the frontend when ran with cargo run -- --dev.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/xlc/substrate-kitties&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template.git" ContentLicense="CC BY-SA 4.0" />
  <row Id="36158" PostHistoryTypeId="5" PostId="1102" RevisionGUID="dea7d58b-cb60-4e95-ac8d-8a39e663dd4e" CreationDate="2023-07-04T09:52:23.753" UserId="3136" Comment="modify in body" Text="A parachain had an upgrade schedule on a relay chain, but the upgrade did not go through, forcing the parachain to stop `producing blocks`. I tried forcing a new `validationCode` using SUDO, but that did not work either, and the parachain is still waiting to upgrade.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;What's the best solution to unbrick the chain? I don't need to recover any of it's state and ideally I want to remove it. For reference this is the current (March 23 2022) status of [paraID 2000 on Rococo][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UlGIa.png&#xD;&#xA;  [2]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="36159" PostHistoryTypeId="5" PostId="1098" RevisionGUID="2deb2027-c26c-490e-b76d-ca39ef408955" CreationDate="2023-07-04T09:53:08.133" UserId="3136" Comment="modify in body" Text="I'm playing around with some `front end` utilities where Substrate libraries like `sp_core` would be useful, but I'm getting the following error on compilation.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `secp256k1-sys v0.4.2`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/bread/Workspace/playground/wasm-pack-test/target/release/build/secp256k1-sys-64710e640e2fadab/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  TARGET = Some(&quot;wasm32-unknown-unknown&quot;)&#xD;&#xA;  OPT_LEVEL = Some(&quot;s&quot;)&#xD;&#xA;  HOST = Some(&quot;aarch64-apple-darwin&quot;)&#xD;&#xA;  CC_wasm32-unknown-unknown = None&#xD;&#xA;  CC_wasm32_unknown_unknown = None&#xD;&#xA;  TARGET_CC = None&#xD;&#xA;  CC = None&#xD;&#xA;  CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;  CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;  TARGET_CFLAGS = None&#xD;&#xA;  CFLAGS = None&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  CC_wasm32-unknown-unknown = None&#xD;&#xA;  CC_wasm32_unknown_unknown = None&#xD;&#xA;  TARGET_CC = None&#xD;&#xA;  CC = None&#xD;&#xA;  CFLAGS_wasm32-unknown-unknown = None&#xD;&#xA;  CFLAGS_wasm32_unknown_unknown = None&#xD;&#xA;  TARGET_CFLAGS = None&#xD;&#xA;  CFLAGS = None&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  running: &quot;clang&quot; &quot;-Os&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;-I&quot; &quot;depend/secp256k1/&quot; &quot;-I&quot; &quot;depend/secp256k1/include&quot; &quot;-I&quot; &quot;depend/secp256k1/src&quot; &quot;-I&quot; &quot;wasm-sysroot&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-DSECP256K1_API=&quot; &quot;-DENABLE_MODULE_ECDH=1&quot; &quot;-DENABLE_MODULE_SCHNORRSIG=1&quot; &quot;-DENABLE_MODULE_EXTRAKEYS=1&quot; &quot;-DUSE_NUM_NONE=1&quot; &quot;-DUSE_FIELD_INV_BUILTIN=1&quot; &quot;-DUSE_SCALAR_INV_BUILTIN=1&quot; &quot;-DECMULT_GEN_PREC_BITS=4&quot; &quot;-DECMULT_WINDOW_SIZE=15&quot; &quot;-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1&quot; &quot;-DENABLE_MODULE_RECOVERY=1&quot; &quot;-o&quot; &quot;/Users/bread/Workspace/playground/wasm-pack-test/target/wasm32-unknown-unknown/release/build/secp256k1-sys-923268476155554b/out/depend/secp256k1/contrib/lax_der_parsing.o&quot; &quot;-c&quot; &quot;depend/secp256k1/contrib/lax_der_parsing.c&quot;&#xD;&#xA;  cargo:warning=error: unable to create target: 'No available targets are compatible with triple &quot;wasm32-unknown-unknown&quot;'&#xD;&#xA;  cargo:warning=1 error generated.&#xD;&#xA;  exit status: 1&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I figured this should be possible since it can be used in Substrate runtimes that target wasm but perhaps I'm misunderstanding something." ContentLicense="CC BY-SA 4.0" />
  <row Id="36160" PostHistoryTypeId="5" PostId="1096" RevisionGUID="5a9a7d79-c8aa-463e-aa08-eb8a34cbde3c" CreationDate="2023-07-04T09:54:10.790" UserId="3136" Comment="modify in body" Text="So reading the [validators docs][1]:&#xD;&#xA;&#xD;&#xA;&gt; If a validator was unresponsive or found to have committed a slashable offense within two era, the `validator` will be removed from the active set in a process known as involuntary chilling.&#xD;&#xA;&#xD;&#xA;It is unclear to myself if 'within two era means consecutive. What greater time frame must I avoid offences for to get a clean rap sheet?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-how-to-chill#involuntary-chills" ContentLicense="CC BY-SA 4.0" />
  <row Id="36161" PostHistoryTypeId="5" PostId="1091" RevisionGUID="960eac2f-ea9c-4565-89db-60447b8408d9" CreationDate="2023-07-04T09:55:09.213" UserId="3136" Comment="modify in body" Text="I came across the `ink_storage::Mapping` data structure. The official doc seems to explain that how to use it but not why it's needed. It seems more complicated to initialize and work with than the maps defined by `Rust's standard library`." ContentLicense="CC BY-SA 4.0" />
  <row Id="36162" PostHistoryTypeId="5" PostId="1090" RevisionGUID="710dc77c-140c-4c8b-bfc1-2518d961ba97" CreationDate="2023-07-04T09:55:41.460" UserId="3136" Comment="correct the format of title and change in body" Text="I'm trying to get transaction history (ie. `transfers`) using just the account id. From my understanding the only way this can be done is if you go through every single block and look up the transaction and see if it matches up with the account number. Is there a better way to do this and is there a way to do it without the use of some sort of database to store all the transaction of the blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36163" PostHistoryTypeId="5" PostId="1083" RevisionGUID="ea315995-fac5-4004-b5d7-bdc87edbc250" CreationDate="2023-07-04T09:56:23.403" UserId="3136" Comment="correct the format of title and change in body" Text="Upon an extrinsic call one of our collators `stopped to produce blocks` and here's the error log snippet: &#xD;&#xA;```&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Since then it was out of sync and couldn't connect to the parachain network anymore:&#xD;&#xA;```&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Idle (0 peers), best: #117412 (0x6db7…430e), finalized #117411 (0x4f1e…9e09), ⬇ 111.7kiB/s ⬆ 5.6kiB/s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The other collators are working fine.&#xD;&#xA;Restarting this collator didn't seem to help. The collators were built based on `polkadot-v0.9.17` branch.&#xD;&#xA;&#xD;&#xA;Why did it happen?&#xD;&#xA;Is there a way to recover from this? Delete the whole local parachain DB and restart it?&#xD;&#xA;&#xD;&#xA;Here's the full log, thanks for any help!&#xD;&#xA;```&#xD;&#xA;2022-03-21 14:48:00 [Parachain]  Idle (5 peers), best: #117409 (0xd230…1c6a), finalized #117408 (0xd2b2…85a8), ⬇ 4.1kiB/s ⬆ 0.3kiB/s&#xD;&#xA;2022-03-21 14:48:00 [Relaychain] ✨ Imported #11906559 (0xa6d4…39f0)&#xD;&#xA;2022-03-21 14:48:01 [Relaychain] ♻️  Reorg on #11906559,0xa6d4…39f0 to #11906559,0xf481…863c, common ancestor #11906558,0xc316…cb4c&#xD;&#xA;2022-03-21 14:48:01 [Relaychain] ✨ Imported #11906559 (0xf481…863c)&#xD;&#xA;2022-03-21 14:48:03 [Relaychain]  Idle (46 peers), best: #11906559 (0xf481…863c), finalized #11906554 (0x6aa2…2c9a), ⬇ 357.9kiB/s ⬆ 387.9kiB/s&#xD;&#xA;2022-03-21 14:48:05 [Parachain]  Idle (5 peers), best: #117409 (0xd230…1c6a), finalized #117408 (0xd2b2…85a8), ⬇ 0.3kiB/s ⬆ 0.3kiB/s&#xD;&#xA;2022-03-21 14:48:06 [Relaychain] ✨ Imported #11906560 (0xac51…57fc)&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Starting collation. relay_parent=0xac51c45933f7f20cd091043a409a0ac7eb85d28cc2cb932bce3f6bfd129257fc at=0x1d3031df9370bc788e04dd83b6ae06539cc33729a5041501e7f5973064c6e380&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Starting consensus session on top of parent 0x1d3031df9370bc788e04dd83b6ae06539cc33729a5041501e7f5973064c6e380&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Prepared block for proposing at 117411 (1 ms) [hash: 0x4644f38f1e294fdfa9548654eb517340c7948f7d77d20ba7293bbaaff574cddf; parent_hash: 0x1d30…e380; extrinsics (2): [0x20c3…76d4, 0x1a4e…62f0]]&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Pre-sealed block for proposal at 117411. Hash now 0x4f1e697ca979e8f00015ba04f544cb87a31aaf22867a4dd0c36c4a2a69349e09, previously 0x4644f38f1e294fdfa9548654eb517340c7948f7d77d20ba7293bbaaff574cddf.&#xD;&#xA;2022-03-21 14:48:06 [Parachain] ✨ Imported #117411 (0x4f1e…9e09)&#xD;&#xA;2022-03-21 14:48:06 [Parachain] PoV size { header: 0.181640625kb, extrinsics: 3.525390625kb, storage_proof: 4.6123046875kb }&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Compressed PoV size: 7.3828125kb&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Produced proof-of-validity candidate. block_hash=0x4f1e697ca979e8f00015ba04f544cb87a31aaf22867a4dd0c36c4a2a69349e09&#xD;&#xA;2022-03-21 14:48:06 [Relaychain] ✨ Imported #11906560 (0x963c…1165)&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Starting collation. relay_parent=0x963c3603694a50f889bd32ed8ca5681359647468b533b03839f98ac0e2601165 at=0x1d3031df9370bc788e04dd83b6ae06539cc33729a5041501e7f5973064c6e380&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Starting consensus session on top of parent 0x1d3031df9370bc788e04dd83b6ae06539cc33729a5041501e7f5973064c6e380&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Prepared block for proposing at 117411 (1 ms) [hash: 0x2088d388da88bfbf7f00a8b06d4c4a9e56326fd37502a76a3fbf10789f174e57; parent_hash: 0x1d30…e380; extrinsics (2): [0x00ae…e5fd, 0x9a44…b9cd]]&#xD;&#xA;2022-03-21 14:48:06 [Parachain]  Pre-sealed block for proposal at 117411. Hash now 0x55662869e5f85b6e28906c30c8876ac79a08763cd9bf14c2798fba4d4334dab8, previously 0x2088d388da88bfbf7f00a8b06d4c4a9e56326fd37502a76a3fbf10789f174e57.&#xD;&#xA;2022-03-21 14:48:06 [Parachain] PoV size { header: 0.181640625kb, extrinsics: 3.525390625kb, storage_proof: 4.6123046875kb }&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Compressed PoV size: 7.3955078125kb&#xD;&#xA;2022-03-21 14:48:06 [Parachain] Produced proof-of-validity candidate. block_hash=0x55662869e5f85b6e28906c30c8876ac79a08763cd9bf14c2798fba4d4334dab8&#xD;&#xA;2022-03-21 14:48:06 [Parachain] ✨ Imported #117411 (0x5566…dab8)&#xD;&#xA;2022-03-21 14:48:08 [Relaychain]  Idle (47 peers), best: #11906560 (0xac51…57fc), finalized #11906556 (0x126d…c413), ⬇ 311.1kiB/s ⬆ 482.3kiB/s&#xD;&#xA;2022-03-21 14:48:10 [Parachain]  Idle (5 peers), best: #117410 (0x1d30…e380), finalized #117408 (0xd2b2…85a8), ⬇ 0.4kiB/s ⬆ 16.0kiB/s&#xD;&#xA;2022-03-21 14:48:12 [Relaychain] ✨ Imported #11906561 (0xa3e8…6e5d)&#xD;&#xA;2022-03-21 14:48:13 [Relaychain]  Idle (46 peers), best: #11906561 (0xa3e8…6e5d), finalized #11906557 (0x35bc…e52b), ⬇ 435.7kiB/s ⬆ 1.1MiB/s&#xD;&#xA;2022-03-21 14:48:15 [Parachain]  Idle (5 peers), best: #117410 (0x1d30…e380), finalized #117408 (0xd2b2…85a8), ⬇ 32 B/s ⬆ 0.1kiB/s&#xD;&#xA;2022-03-21 14:48:18 [Relaychain] ✨ Imported #11906562 (0xdaa6…9f28)&#xD;&#xA;2022-03-21 14:48:18 [Relaychain] ✨ Imported #11906562 (0x3638…c47e)&#xD;&#xA;2022-03-21 14:48:18 [Relaychain]  Idle (47 peers), best: #11906562 (0xdaa6…9f28), finalized #11906557 (0x35bc…e52b), ⬇ 316.9kiB/s ⬆ 981.9kiB/s&#xD;&#xA;2022-03-21 14:48:20 [Parachain]  Idle (5 peers), best: #117410 (0x1d30…e380), finalized #117409 (0xd230…1c6a), ⬇ 0.1kiB/s ⬆ 0.2kiB/s&#xD;&#xA;2022-03-21 14:48:23 [Relaychain]  Idle (48 peers), best: #11906562 (0xdaa6…9f28), finalized #11906559 (0xf481…863c), ⬇ 477.9kiB/s ⬆ 2.9MiB/s&#xD;&#xA;2022-03-21 14:48:24 [Relaychain] ✨ Imported #11906563 (0x13f9…b3b5)&#xD;&#xA;2022-03-21 14:48:24 [Parachain] Starting collation. relay_parent=0x13f9f26f921929e6c532795adabc763137ae71de26b72d02061a4fc764bcb3b5 at=0x4f1e697ca979e8f00015ba04f544cb87a31aaf22867a4dd0c36c4a2a69349e09&#xD;&#xA;2022-03-21 14:48:24 [Relaychain] ✨ Imported #11906563 (0x9b1a…9732)&#xD;&#xA;2022-03-21 14:48:24 [Parachain] Starting collation. relay_parent=0x9b1abde446f897d8600780120542fd5dc91a9efbf1e18df8423d45328dfa9732 at=0x4f1e697ca979e8f00015ba04f544cb87a31aaf22867a4dd0c36c4a2a69349e09&#xD;&#xA;2022-03-21 14:48:25 [Parachain]  Idle (5 peers), best: #117411 (0x4f1e…9e09), finalized #117410 (0x1d30…e380), ⬇ 90 B/s ⬆ 0.2kiB/s&#xD;&#xA;2022-03-21 14:48:27 [Parachain] ✨ Imported #117412 (0x6db7…430e)&#xD;&#xA;2022-03-21 14:48:27 [Parachain] ✨ Imported #117412 (0xc45f…ea14)&#xD;&#xA;2022-03-21 14:48:28 [Relaychain]  Idle (47 peers), best: #11906563 (0x13f9…b3b5), finalized #11906560 (0xac51…57fc), ⬇ 705.3kiB/s ⬆ 1.3MiB/s&#xD;&#xA;2022-03-21 14:48:30 [Relaychain] ✨ Imported #11906564 (0x3d5b…2895)&#xD;&#xA;2022-03-21 14:48:30 [Parachain]  Idle (5 peers), best: #117411 (0x4f1e…9e09), finalized #117410 (0x1d30…e380), ⬇ 2.5kiB/s ⬆ 0.8kiB/s&#xD;&#xA;2022-03-21 14:48:33 [Relaychain]  Idle (48 peers), best: #11906564 (0x3d5b…2895), finalized #11906561 (0xa3e8…6e5d), ⬇ 526.9kiB/s ⬆ 998.2kiB/s&#xD;&#xA;2022-03-21 14:48:35 [Parachain]  Idle (5 peers), best: #117411 (0x4f1e…9e09), finalized #117410 (0x1d30…e380), ⬇ 99 B/s ⬆ 99 B/s&#xD;&#xA;2022-03-21 14:48:36 [Relaychain] ✨ Imported #11906565 (0x31c4…6348)&#xD;&#xA;2022-03-21 14:48:36 [Relaychain] ✨ Imported #11906565 (0x91d7…0b0c)&#xD;&#xA;2022-03-21 14:48:38 [Relaychain]  Idle (50 peers), best: #11906565 (0x31c4…6348), finalized #11906561 (0xa3e8…6e5d), ⬇ 618.7kiB/s ⬆ 1.7MiB/s&#xD;&#xA;2022-03-21 14:48:40 [Parachain]  Idle (5 peers), best: #117411 (0x4f1e…9e09), finalized #117410 (0x1d30…e380), ⬇ 24 B/s ⬆ 24 B/s&#xD;&#xA;2022-03-21 14:48:42 [Relaychain] ✨ Imported #11906566 (0xb368…7b9d)&#xD;&#xA;2022-03-21 14:48:42 [Relaychain] ♻️  Reorg on #11906566,0xb368…7b9d to #11906566,0x5e83…4a28, common ancestor #11906565,0x31c4…6348&#xD;&#xA;2022-03-21 14:48:42 [Relaychain] ✨ Imported #11906566 (0x5e83…4a28)&#xD;&#xA;2022-03-21 14:48:42 [Parachain] Starting collation. relay_parent=0x5e8371280c4ed92ffaf3df2218d6ef111eebbf78ce4d41a751e9fffc107f4a28 at=0x6db76adc2fb91abf78bf4610fa8e65f7b93dde99271c013b32499c525617430e&#xD;&#xA;2022-03-21 14:48:42 [Parachain]  Starting consensus session on top of parent 0x6db76adc2fb91abf78bf4610fa8e65f7b93dde99271c013b32499c525617430e&#xD;&#xA;2022-03-21 14:48:42 [Parachain]  Prepared block for proposing at 117413 (1 ms) [hash: 0x30e63829d63f1962ad28aac14426b8e7d917ddbc0d411288ed72a15b7e5bfb5b; parent_hash: 0x6db7…430e; extrinsics (2): [0x9956…4ce5, 0xe068…cc45]]&#xD;&#xA;2022-03-21 14:48:42 [Parachain]  Pre-sealed block for proposal at 117413. Hash now 0x843ab65bbb5bd29c01a1411b29f39ffd975eb7f2fcb8e996532c7109b9ea2402, previously 0x30e63829d63f1962ad28aac14426b8e7d917ddbc0d411288ed72a15b7e5bfb5b.&#xD;&#xA;2022-03-21 14:48:42 [Parachain] ✨ Imported #117413 (0x843a…2402)&#xD;&#xA;2022-03-21 14:48:42 [Parachain] PoV size { header: 0.181640625kb, extrinsics: 3.525390625kb, storage_proof: 4.5537109375kb }&#xD;&#xA;2022-03-21 14:48:42 [Parachain] Compressed PoV size: 7.32421875kb&#xD;&#xA;2022-03-21 14:48:42 [Parachain] Produced proof-of-validity candidate. block_hash=0x843ab65bbb5bd29c01a1411b29f39ffd975eb7f2fcb8e996532c7109b9ea2402&#xD;&#xA;2022-03-21 14:48:43 [Relaychain]  Idle (50 peers), best: #11906566 (0x5e83…4a28), finalized #11906563 (0x13f9…b3b5), ⬇ 511.5kiB/s ⬆ 1022.4kiB/s&#xD;&#xA;2022-03-21 14:48:45 [Parachain]  Idle (5 peers), best: #117412 (0x6db7…430e), finalized #117411 (0x4f1e…9e09), ⬇ 51.0kiB/s ⬆ 18 B/s&#xD;&#xA;2022-03-21 14:48:48 [Relaychain] ✨ Imported #11906567 (0x797d…4dcd)&#xD;&#xA;2022-03-21 14:48:48 [Parachain] Starting collation. relay_parent=0x797de76cbc186beaf702321557fc6243f6ac751dd46cc5c247c15c530cb64dcd at=0x6db76adc2fb91abf78bf4610fa8e65f7b93dde99271c013b32499c525617430e&#xD;&#xA;2022-03-21 14:48:48 [Relaychain]  Idle (50 peers), best: #11906567 (0x797d…4dcd), finalized #11906563 (0x13f9…b3b5), ⬇ 423.2kiB/s ⬆ 706.8kiB/s&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17&#xD;&#xA;2022-03-21 14:48:50 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Error importing block 0xe3d7fea7538be50a0174e65ae6cf5be56821a3f1a6a09e8029c45c1736f099ba: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;2022-03-21 14:48:50 [Parachain]  Idle (0 peers), best: #117412 (0x6db7…430e), finalized #117411 (0x4f1e…9e09), ⬇ 111.7kiB/s ⬆ 5.6kiB/s&#xD;&#xA;2022-03-21 14:48:53 [Relaychain]  Idle (50 peers), best: #11906567 (0x797d…4dcd), finalized #11906564 (0x3d5b…2895), ⬇ 875.0kiB/s ⬆ 1.2MiB/s&#xD;&#xA;2022-03-21 14:48:54 [Relaychain] ✨ Imported #11906568 (0xa8f0…ba95)&#xD;&#xA;2022-03-21 14:48:55 [Parachain]  Idle (0 peers), best: #117412 (0x6db7…430e), finalized #117411 (0x4f1e…9e09), ⬇ 0.2kiB/s ⬆ 0.3kiB/s&#xD;&#xA;2022-03-21 14:48:58 [Relaychain]  Idle (49 peers), best: #11906568 (0xa8f0…ba95), finalized #11906565 (0x31c4…6348), ⬇ 672.7kiB/s ⬆ 745.4kiB/s&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36164" PostHistoryTypeId="5" PostId="1081" RevisionGUID="c97fe6a9-ac80-4cbe-b48b-a772a8d7f9cd" CreationDate="2023-07-04T09:57:27.287" UserId="3136" Comment="modify in body" Text="I try to start a `parachain` using [the tutorial][1] and don't want to use the [polkadot-launch][2] so I can fully understand the underlying structure.&#xD;&#xA;&#xD;&#xA;The `relay chain` works and I the `parachain`  &amp; relay chain works too, but the `parachain` don't produce blocks and shows the error: `Could not decode the head data. ...`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-03-23 15:39:44 Parachain Collator Template    &#xD;&#xA;2022-03-23 15:39:44 ✌️  version 3.0.0-c2e2134-x86_64-linux-gnu    &#xD;&#xA;2022-03-23 15:39:44 ❤️  by Anonymous, 2017-2022    &#xD;&#xA;2022-03-23 15:39:44  Chain specification: Local Testnet    &#xD;&#xA;2022-03-23 15:39:44  Node name: Renault-Collator    &#xD;&#xA;2022-03-23 15:39:44  Role: AUTHORITY    &#xD;&#xA;2022-03-23 15:39:44  Database: RocksDb at /tmp/SIM-multichain-with-polkadot-substrate/parachain/renault/collator/alice/chains/local_testnet/db    &#xD;&#xA;2022-03-23 15:39:44 ⛓  Native runtime: template-parachain-1 (template-parachain-0.tx1.au1)    &#xD;&#xA;2022-03-23 15:39:45 Parachain id: Id(2000)    &#xD;&#xA;2022-03-23 15:39:45 Parachain Account: 5Ec4AhPUwPeyTFyuhGuBbD224mY85LKLMSqSSo33JYWCazU4    &#xD;&#xA;2022-03-23 15:39:45 Parachain genesis state: 0x000000000000000000000000000000000000000000000000000000000000000000f0d31cb6618778f3049a66a0eb4a420220ffa2cec0cc3f086f835bea61420b8c03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400    &#xD;&#xA;2022-03-23 15:39:45 Is collating: yes    &#xD;&#xA;2022-03-23 15:39:45 [Parachain]  Initializing Genesis block/state (state: 0xf0d3…0b8c, header-hash: 0xef6a…20b9)    &#xD;&#xA;2022-03-23 15:39:45 [Parachain] ⏱  Loaded block-time = 12s from block 0xef6a546522b72881ca05fe59ef4b326fe025a402539b3ab3c3f4f4496e6c20b9    &#xD;&#xA;2022-03-23 15:39:45 [Relaychain]  Initializing Genesis block/state (state: 0xd628…09ce, header-hash: 0x59a3…d8a4)    &#xD;&#xA;2022-03-23 15:39:45 [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain] ⏱  Loaded block-time = 6s from block 0x59a303460528b1113ebc876aedd5158843a8e33bc4d3cd663d64f3d01f10d8a4    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain]  Creating empty BABE epoch changes on what appears to be first startup.    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain]  Local node identity is: 12D3KooWMvb7w5tbgk6HyFkxdJDjFvqvX8s9Sh2tHjiYKDRjgyEs    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain]  Highest known block at #0    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain] Listening for new connections on 127.0.0.1:9977.    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain] ️ Connecting all Handles to Overseer&#xD;&#xA;2022-03-23 15:39:46 [Parachain] Using default protocol ID &quot;sup&quot; because none is configured in the chain specs    &#xD;&#xA;2022-03-23 15:39:46 [Parachain]  Local node identity is: 12D3KooWDQoNQgsaxKhTNDZ6BJjqdK17d474q3YGjXP6iHQ8TUKH    &#xD;&#xA;2022-03-23 15:39:46 [Parachain]  Highest known block at #0    &#xD;&#xA;2022-03-23 15:39:46 [Parachain] 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;2022-03-23 15:39:46 [Parachain] Listening for new connections on 0.0.0.0:8844.    &#xD;&#xA;2022-03-23 15:39:46 [Relaychain]  Discovered new external address for our node: /ip4/134.59.230.93/tcp/30343/ws/p2p/12D3KooWMvb7w5tbgk6HyFkxdJDjFvqvX8s9Sh2tHjiYKDRjgyEs    &#xD;&#xA;2022-03-23 15:39:46 [Parachain]  Discovered new external address for our node: /ip4/127.0.0.1/tcp/40333/p2p/12D3KooWDQoNQgsaxKhTNDZ6BJjqdK17d474q3YGjXP6iHQ8TUKH    &#xD;&#xA;2022-03-23 15:39:46 [Parachain]  Discovered new external address for our node: /ip4/134.59.230.93/tcp/40333/p2p/12D3KooWDQoNQgsaxKhTNDZ6BJjqdK17d474q3YGjXP6iHQ8TUKH    &#xD;&#xA;2022-03-23 15:39:47 Accepted a new tcp connection from 127.0.0.1:41322.    &#xD;&#xA;2022-03-23 15:39:48 [Relaychain] ✨ Imported #206 (0xc195…efe2)    &#xD;&#xA;2022-03-23 15:39:48 [Parachain] Could not decode the head data. error=Error { cause: Some(Error { cause: None, desc: &quot;Not enough data to fill buffer&quot; }), desc: &quot;Could not decode `Header::parent_hash`&quot; }&#xD;&#xA;2022-03-23 15:39:48 [Relaychain] Advanced session window for approvals update=Advanced { prev_window_start: 0, prev_window_end: 0, new_window_start: 15, new_window_end: 20 }&#xD;&#xA;2022-03-23 15:39:51 [Relaychain]  Idle (4 peers), best: #206 (0xc195…efe2), finalized #204 (0x0fec…a97d), ⬇ 56.2kiB/s ⬆ 14.1kiB/s&#xD;&#xA;2022-03-23 15:39:51 [Parachain]  Idle (0 peers), best: #0 (0xef6a…20b9), finalized #0 (0xef6a…20b9), ⬇ 3.4kiB/s ⬆ 2.9kiB/s    &#xD;&#xA;2022-03-23 15:39:54 [Relaychain] ✨ Imported #207 (0xbe6e…4426)    &#xD;&#xA;2022-03-23 15:39:54 [Parachain] Could not decode the head data. error=Error { cause: Some(Error { cause: None, desc: &quot;Not enough data to fill buffer&quot; }), desc: &quot;Could not decode `Header::parent_hash`&quot; }&#xD;&#xA;2022-03-23 15:39:56 [Relaychain]  Idle (4 peers), best: #207 (0xbe6e…4426), finalized #204 (0x0fec…a97d), ⬇ 10.7kiB/s ⬆ 8.0kiB/s&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Does somebody have an idea what this error means ? And if it is actually related to the parachain not producing blocks ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/start-relay/&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-launch" ContentLicense="CC BY-SA 4.0" />
  <row Id="36165" PostHistoryTypeId="5" PostId="1079" RevisionGUID="0056b856-22b9-4080-b054-2c4fd70b72d5" CreationDate="2023-07-04T09:58:16.617" UserId="3136" Comment="correct the format of title and change in body" Text="My rust version is :-&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;when i was run `cargo build` in this dirextory: https://github.com/VegeBun-csj/Proof-Chain/tree/main/pallets/xclient&#xD;&#xA;&#xD;&#xA;i got an error: &#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/58IGQ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/CwpwX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36166" PostHistoryTypeId="5" PostId="1078" RevisionGUID="81fdc462-e19c-4308-a56a-ddf760f2fa90" CreationDate="2023-07-04T09:59:23.463" UserId="3136" Comment="modify in body" Text="I'm working with [pallet_evm](https://github.com/paritytech/frontier/blob/master/frame/evm/src/lib.rs#L518) of Frontier to support `EVM`, I want to `map` the Substrate account with the `EVM account`&#xD;&#xA;```&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Mapping&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, H160, AccountId32&gt;;&#xD;&#xA;```&#xD;&#xA; why did I change the AddressMapping of pallet_evm the EVM account balance dropped to 0 &#xD;&#xA;```&#xD;&#xA;impl&lt;T&gt; pallet_evm::AddressMapping&lt;AccountId32&gt; for MyAddressMapping&lt;T&gt;&#xD;&#xA;	where&#xD;&#xA;		T: Config,&#xD;&#xA;	{&#xD;&#xA;		fn into_account_id(address: H160) -&gt; AccountId32 {&#xD;&#xA;			if let Some(account_id) = Mapping::&lt;T&gt;::get(address) {&#xD;&#xA;				account_id&#xD;&#xA;			} else {&#xD;&#xA;				HashedAddressMapping::&lt;BlakeTwo256&gt;::into_account_id(address)&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and why the trait AddressMapping must have the value return rather than an option like this&#xD;&#xA;```&#xD;&#xA;pub trait AddressMapping&lt;A&gt; {&#xD;&#xA;	fn into_account_id(address: H160) -&gt;  Option&lt;A&gt;;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36167" PostHistoryTypeId="5" PostId="1075" RevisionGUID="505dc9e3-5090-482f-a135-010bef542a17" CreationDate="2023-07-04T10:00:58.190" UserId="3136" Comment="modify in body" Text="I am looking for best practices around this topic. &#xD;&#xA;&#xD;&#xA;I liked how `webrtc-star` was easy to use, however I have not found anything in the rust ecosystem that is similar.&#xD;&#xA;&#xD;&#xA;In my mind it would be great if there was a 'yellow pages' you could ask for the bootstrap nodes for chain X, something that could be run by all nodes to aid other networks getting user node 0+ booted." ContentLicense="CC BY-SA 4.0" />
  <row Id="36168" PostHistoryTypeId="5" PostId="1072" RevisionGUID="b68c0c49-95c4-46a9-b64c-04d555b8a7af" CreationDate="2023-07-04T10:01:39.040" UserId="3136" Comment="modify in body" Text="I have created a simple storage map as follows and I just want to check if it's empty or not. I am comparing it with rust `HashMaps`, it has the is_empty() method to check. I intend to use this in the same pallet.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn check_storage_map)]&#xD;&#xA;pub type SimpleStorageMap&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_256, u32, u32, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I checked the `storage map` rust doc but could not find any function associated with it.&#xD;&#xA;I am new to substrate any advice or help is appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="36169" PostHistoryTypeId="4" PostId="1072" RevisionGUID="b68c0c49-95c4-46a9-b64c-04d555b8a7af" CreationDate="2023-07-04T10:01:39.040" UserId="3136" Comment="modify in body" Text="How to check if StorageMap is empty?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36170" PostHistoryTypeId="2" PostId="9134" RevisionGUID="df7eeeab-b67e-45e7-8daf-cc15fa4a2347" CreationDate="2023-07-04T10:02:28.020" UserId="2348" Text="I  am using subxt library . I have downloaded metadata from chain using this url (&quot;wss://rpc.polkadot.io:443&quot;) . i have also implemented default example from [subxt][1] documentation of transfer balance . i want to know how can i transfer balance from account a to account b  present in  my wallet  using subxt library&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/subxt/latest/subxt/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36172" PostHistoryTypeId="1" PostId="9134" RevisionGUID="df7eeeab-b67e-45e7-8daf-cc15fa4a2347" CreationDate="2023-07-04T10:02:28.020" UserId="2348" Text="transfer balance subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="36173" PostHistoryTypeId="3" PostId="9134" RevisionGUID="df7eeeab-b67e-45e7-8daf-cc15fa4a2347" CreationDate="2023-07-04T10:02:28.020" UserId="2348" Text="|balances|subxt|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36174" PostHistoryTypeId="4" PostId="1071" RevisionGUID="2c3bfecc-28bc-40da-b771-ca6d3affdb86" CreationDate="2023-07-04T10:03:32.860" UserId="3136" Comment="correct the msg format" Text="Is there any way to mint new native tokens after deploying the substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36175" PostHistoryTypeId="5" PostId="9134" RevisionGUID="f6fd4d63-576d-405a-8b05-aeef55b08f9f" CreationDate="2023-07-04T10:04:27.610" UserId="2372" Comment="added 2 characters in body" Text="I  am using `subxt` library . I have downloaded metadata from chain using this url `wss://rpc.polkadot.io:443` . I have also implemented default example from [subxt][1] documentation of transfer balance . i want to know how can i transfer balance from account a to account b  present in  my wallet  using `subxt` library&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/subxt/latest/subxt/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36176" PostHistoryTypeId="5" PostId="1067" RevisionGUID="10e7a5f9-3af1-476a-a395-0c91aa81b9be" CreationDate="2023-07-04T10:04:30.333" UserId="3136" Comment="modify in body" Text="i'm trying to define a 1 to `N storage relation` in my pallet. I have a `Resource` (owned by an account ) which will be linked to N `Use` structs ( kind of a set )&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;- Account #1&#xD;&#xA;  --&gt; Resource #A&#xD;&#xA;         ---&gt; Use #1&#xD;&#xA;         ---&gt; Use #2&#xD;&#xA;         ---&gt; Use #N&#xD;&#xA;&#xD;&#xA;- Account #2&#xD;&#xA;  --&gt; Resource #B&#xD;&#xA;         ---&gt; Use #3&#xD;&#xA;         ---&gt; Use #4&#xD;&#xA;         ---&gt; Use #N'&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From the architectural perspective, what's the best way to define these kind of relationships in the storage?&#xD;&#xA;&#xD;&#xA;Of course the goal of this is to be able to query the three.&#xD;&#xA;&#xD;&#xA;Many Thanks.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36177" PostHistoryTypeId="5" PostId="1066" RevisionGUID="5a34cb3a-ba6d-4051-a98a-2fac483dadbd" CreationDate="2023-07-04T10:05:54.517" UserId="3136" Comment="modify in body" Text="If I have started running a Substrate node but the `ss58Format` value in the chain specification .json file that is generated from using the `build-spec` command is not `42`, how do I update the chain so its `SS58` Format is 42? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;20220329 add:&#xD;&#xA;&gt; i have updated system's SS58Prefix(set SS58Prefix=42),and upgrade wasm, but the ss58Format  from rpc's response is not 42&#xD;&#xA;&#xD;&#xA;how to update rpc's ss58Format?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const res = await api.rpc.system.properties()&#xD;&#xA;console.log(res)&#xD;&#xA;&#xD;&#xA;# ss58Format is not 42. &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36178" PostHistoryTypeId="5" PostId="1061" RevisionGUID="2ad41a71-0199-4020-9589-c3c8e0a1bdcc" CreationDate="2023-07-04T10:06:38.037" UserId="3136" Comment="modify in body" Text="I would like to upgrade my `parachain`.&#xD;&#xA;&#xD;&#xA;What is the proper way of executing a runtime upgrade on a `parachain`?&#xD;&#xA;&#xD;&#xA;Which `RPC method` to call?&#xD;&#xA;&#xD;&#xA;Should this be applied to `collators` or rpc-nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36179" PostHistoryTypeId="5" PostId="1060" RevisionGUID="b3aee0ac-9f79-4f0c-b058-0e9bc9e8d735" CreationDate="2023-07-04T10:08:17.310" UserId="3136" Comment="modify in body" Text="```rust&#xD;&#xA;construct_runtime! {&#xD;&#xA; Council:            pallet_collective::&lt;Instance1&gt;::{Pallet, Call, Storage, Origin&lt;T&gt;, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA; TechnicalCommittee: pallet_collective::&lt;Instance2&gt;::{Pallet, Call, Storage, Origin&lt;T&gt;, Event&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;There seems to be two instances of `pallet_collective` in the `substrate-node` and it has me wondering why? What is the purpose of a `council`, and what is the purpose of a `technical committee` and how are they different from each other?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36180" PostHistoryTypeId="5" PostId="1054" RevisionGUID="f39f5ac0-60cc-40f4-94ac-a5e478fb102c" CreationDate="2023-07-04T10:09:08.990" UserId="3136" Comment="modify in body" Text="While fetching blocks from kusama, I get the following message in the block range [1, 461692]:&#xD;&#xA;`Unable to map u16 to a lookup index&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;I suppose this has to do with the types being used in the old blocks. Is there a types bundle that I can use with the `polkadot-js` api for the earlier blocks in `Kusama network`" ContentLicense="CC BY-SA 4.0" />
  <row Id="36181" PostHistoryTypeId="5" PostId="1051" RevisionGUID="633ae328-3423-4080-b5fd-608a49ea7254" CreationDate="2023-07-04T10:12:40.450" UserId="3136" Comment="modify in body" Text="I'm trying to onboard several teams to the `Rococo-testnet` with the objective that they can then control the parachain. For that, I'm thinking of using the `SUDO` account and calling `registrar.forceRegister(who,deposit,id,genesisHead,validationCode)`, however I am not sure what `deposit` should be.&#xD;&#xA;&#xD;&#xA;If there's another way of going around this, happy to discuss it as well.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="36182" PostHistoryTypeId="5" PostId="1045" RevisionGUID="532ea575-6287-4eeb-9e6b-23b37b996646" CreationDate="2023-07-04T10:18:42.957" UserId="3136" Comment="modify in body" Text="I noticed that the `parity-scale-codec` versions 3.0.0, 3.1.0 and 3.1.1 have been yanked: https://crates.io/crates/parity-scale-codec/versions.&#xD;&#xA;&#xD;&#xA;[The changelog of the crate](https://github.com/paritytech/parity-scale-codec/blob/master/CHANGELOG.md) doesn't contain any information about this though. Is it no longer recommended to use those `versions`? " ContentLicense="CC BY-SA 4.0" />
  <row Id="36183" PostHistoryTypeId="5" PostId="1036" RevisionGUID="23dc9a96-0b62-4b17-8e49-878fff636ae2" CreationDate="2023-07-04T10:19:14.703" UserId="3136" Comment="correct the format of title and change in body" Text="I have created an anonymous proxy(Proxy pallet). Now I need to delete this `proxy`.&#xD;&#xA;I am using killAnonymous but it is giving me errors. &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lQsu1.jpg&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please suggest what i am doing incorrect here" ContentLicense="CC BY-SA 4.0" />
  <row Id="36184" PostHistoryTypeId="5" PostId="1034" RevisionGUID="03271398-74b1-4b89-90b1-08c34ce7cb94" CreationDate="2023-07-04T10:19:57.113" UserId="3136" Comment="modify in body" Text="I believe the default `era` period in `substrate-node-template` is 24 hours. Is there a way for me to change that period?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36185" PostHistoryTypeId="5" PostId="1031" RevisionGUID="33d8b71b-4e29-4be1-8715-6e4da682ebd0" CreationDate="2023-07-04T10:23:48.050" UserId="3136" Comment="modify in body" Text="Where can I acquire `subsocial tokens` so I can start using that platform. I see that there's a `faucet` but when I go to the faucet it says that's no longer available because of main net launch. But that leaves me still unable to create my profile because I can't find the token anywhere. Is there an `ETA` for availability?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36186" PostHistoryTypeId="2" PostId="9135" RevisionGUID="7caf7b81-a73e-443c-a301-6fa96ef849c6" CreationDate="2023-07-04T10:24:00.493" UserId="4068" Text="What's the deal with installing cargo-contract to make Ink! Rust smart contracts? Is it the contract compiler, or is it ructc? Why do we even need it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36188" PostHistoryTypeId="1" PostId="9135" RevisionGUID="7caf7b81-a73e-443c-a301-6fa96ef849c6" CreationDate="2023-07-04T10:24:00.493" UserId="4068" Text="What is the purpose of installing cargo-contract and using it to create Ink! Rust smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36189" PostHistoryTypeId="3" PostId="9135" RevisionGUID="7caf7b81-a73e-443c-a301-6fa96ef849c6" CreationDate="2023-07-04T10:24:00.493" UserId="4068" Text="|ink|substrate-contracts-node|openbrush|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36190" PostHistoryTypeId="2" PostId="9136" RevisionGUID="30fd543b-a222-40ce-8836-043a30c481be" CreationDate="2023-07-04T10:24:00.493" UserId="4068" Text="To understand the role of `cargo-contract` in developing Ink! smart contracts, let's break it down:&#xD;&#xA;&#xD;&#xA;1. Cargo: Cargo is the build system and package manager for Rust. It simplifies the process of managing dependencies, compiling code, and building Rust projects.&#xD;&#xA;&#xD;&#xA;2. `cargo-contract`: `cargo-contract` is a Cargo subcommand specifically designed for Ink! smart contracts. It extends Cargo's functionality to handle the compilation, deployment, and testing of smart contracts written using the Ink! framework.&#xD;&#xA;&#xD;&#xA;3. Ink!: Ink! is a Rust-based framework developed by Parity Technologies for writing smart contracts on the Polkadot and Substrate blockchains. It provides a set of macros and libraries that simplify the process of writing secure and efficient smart contracts. The `cargo-contract` tool is closely associated with Ink! because it enables seamless integration with the Ink! framework.&#xD;&#xA;&#xD;&#xA;So, `cargo-contract` is not the contract compiler itself, nor is it equivalent to `ructc`. Instead, it serves as a tool that streamlines the development workflow for Ink! smart contracts by automating certain tasks. Here's why you would typically use `cargo-contract`:&#xD;&#xA;&#xD;&#xA;1. Compilation: `cargo-contract` handles the compilation of your Ink! smart contracts. It recognizes the necessary metadata and dependencies required by the Ink! framework and invokes the appropriate compiler (`ructc`).&#xD;&#xA;&#xD;&#xA;2. Deployment: `cargo-contract` simplifies the process of deploying your smart contract to a local development chain or a live network. It manages the deployment configuration and interacts with the Substrate runtime.&#xD;&#xA;&#xD;&#xA;3. Testing: `cargo-contract` provides built-in testing capabilities. It enables you to write unit tests for your Ink! smart contracts and run them easily using Cargo.&#xD;&#xA;&#xD;&#xA;Overall, `cargo-contract` enhances the development experience for Ink! smart contracts by integrating with the Cargo ecosystem and abstracting away many of the complexities associated with Ink!'s compilation and deployment process. It allows you to focus on writing and testing your contracts more efficiently." ContentLicense="CC BY-SA 4.0" />
  <row Id="36192" PostHistoryTypeId="5" PostId="1027" RevisionGUID="42ccf590-b9f5-40c1-9f31-40dcff51d758" CreationDate="2023-07-04T10:25:16.267" UserId="3136" Comment="correct the format of title and change in body" Text="Assuming I was deployed a smart contract in a `Parachain` `EVM` wanting to cross out to IPFS to save or read data, what is the best way of achieving this in a decentralised way.&#xD;&#xA;For example, doing this via a simple React Dapp, is not realistic as the smart contract will have to be able to always connect to the client e.g. emit an event and the client picks it up and pushes it to IPFS&#xD;&#xA;Running a webserver will solve the above issue but becomes an attack vector, hence quickly evaporates the decentralisation of IPFS data storage and smart contract execution logic" ContentLicense="CC BY-SA 4.0" />
  <row Id="36193" PostHistoryTypeId="5" PostId="1026" RevisionGUID="0f0a265f-b42e-4b70-9f01-8a4530c5c45b" CreationDate="2023-07-04T10:25:47.717" UserId="3136" Comment="modify in body" Text="I have some expiry time in `block` number which I need to deem some storage values expired after that block number, however in the UX I want to present this value as an estimated datetime. &#xD;&#xA;So to be able to do this I believe I need to read the timestamp of the current block and then have an estimation of the time that it takes to generate a block (block_time) and then calculate a timespan as block_count*block_time.&#xD;&#xA;&#xD;&#xA;Is this the best way to estimate the timestamp of a future block?!&#xD;&#xA;&#xD;&#xA;If yes, what is the best way to get an estimation of the `block_time` (time that it takes to generate a block)?!" ContentLicense="CC BY-SA 4.0" />
  <row Id="36194" PostHistoryTypeId="5" PostId="1024" RevisionGUID="fabb0759-f398-42ed-b75d-c16e9abb1b31" CreationDate="2023-07-04T10:26:18.870" UserId="3136" Comment="modify in body" Text="I'm `off-chain` indexing some pallet events into my off-chain local storage using an `OCW`. Now, I want to be able to retrieve this data via RPC from an external service. &#xD;&#xA;Is this possible? Does it require the `OCW` to access the `local-storage` as part of the RPC query? &#xD;&#xA;&#xD;&#xA;Do `Custom RPC` work for the off-chain runtime?&#xD;&#xA;https://docs.substrate.io/v3/runtime/custom-rpcs/&#xD;&#xA;&#xD;&#xA;Any example will be appreciate it.&#xD;&#xA;TIA, Cheers!&#xD;&#xA;&#xD;&#xA;NB: I'm not after an Oracle, I need the opposite case." ContentLicense="CC BY-SA 4.0" />
  <row Id="36195" PostHistoryTypeId="5" PostId="1021" RevisionGUID="b1044250-1490-4883-b597-1b15653e0357" CreationDate="2023-07-04T10:27:20.270" UserId="3136" Comment="correct the format of title and change in body" Text="When declaring `storage` items inside the runtime, we can automatically generate getters to query that storage item, for example (https://docs.substrate.io/v3/runtime/storage/#declaring-`storage-items`)`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn some_primitive_value)]&#xD;&#xA;pub(super) type SomePrimitiveValue&lt;T&gt; = StorageValue&lt;_, u32, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there a simple way to generate a setter in the same way? While a simple setter is likely undesirable on all storage items, it would be handy to have a shorthand way to set storage values from root or signed accounts:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::root_setter(fn some_primitive_value)]&#xD;&#xA;#[pallet::signed_setter(fn some_primitive_value)]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36196" PostHistoryTypeId="5" PostId="9135" RevisionGUID="6a0f069d-1d51-4264-b24d-a439ab1f09ee" CreationDate="2023-07-04T10:29:20.930" UserId="3136" Comment="code modified in body" Text="What's the deal with installing `cargo-contract` to make Ink! Rust `smart contracts`? Is it the contract compiler, or is it ructc? Why do we even need it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36197" PostHistoryTypeId="2" PostId="9137" RevisionGUID="59b7fdbd-8f5e-46b1-9765-76506f75d1dc" CreationDate="2023-07-04T10:31:55.670" UserId="3109" Text="&#xD;&#xA;&#xD;&#xA;This is why these two fields are used in the openbrush smart contract library:&#xD;&#xA;&#xD;&#xA;* `pub struct AttributesKey`: This struct is used to reserve space in the contract's storage for the `attributes` mapping. The `attributes` mapping is used to store a list of attributes for each token. The `AttributesKey` struct is empty, but it ensures that the storage space for the mapping will be reserved, even if the mapping is not used initially. This is important because the storage space for the mapping cannot be resized after the contract is deployed.&#xD;&#xA;* `pub _reserved: Option&lt;()&gt;`: This field is a reserved field that can be used by the contract's developer for future purposes. The field is not used by the contract itself, but it can be used by the developer to store additional data in the contract's storage. For example, the developer could use this field to store a timestamp of when the contract was deployed.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36199" PostHistoryTypeId="2" PostId="9138" RevisionGUID="2e071ea5-1e24-4fbe-b238-7f07b64dc3c6" CreationDate="2023-07-04T10:35:21.020" UserId="2372" Text="To develop Ink! smart contracts using Rust, you need to install the cargo-contract tool. cargo-contract is a Cargo subcommand specifically designed for developing smart contracts on the Substrate framework using the Ink! language.&#xD;&#xA;&#xD;&#xA;Here's what cargo-contract provides:&#xD;&#xA;&#xD;&#xA;Smart Contract Compilation: It acts as a contract compiler, similar to rustc for Rust programs. It takes your Ink! smart contract code and compiles it into a format compatible with the Substrate runtime.&#xD;&#xA;&#xD;&#xA;Development Environment: It sets up a development environment specifically tailored for Ink! smart contracts. It handles the complexities of configuring the build process, interacting with the Substrate runtime, and managing contract-specific dependencies.&#xD;&#xA;&#xD;&#xA;Testing and Deployment: It provides commands to run tests for your smart contracts and deploy them to a Substrate-based blockchain network. It streamlines the process of testing and deploying your contracts, making it easier to iterate and deploy changes.&#xD;&#xA;&#xD;&#xA;By using cargo-contract, you can focus on writing your Ink! smart contract code while the tool takes care of the underlying compilation and deployment processes.&#xD;&#xA;&#xD;&#xA;To summarize, cargo-contract is an essential tool for Ink! smart contract development. It simplifies the development workflow, handles contract compilation, and provides commands for testing and deployment. It is specifically designed to work with the Ink! language and the Substrate framework, making it easier to develop and deploy smart contracts on Substrate-based blockchains." ContentLicense="CC BY-SA 4.0" />
  <row Id="36201" PostHistoryTypeId="2" PostId="9139" RevisionGUID="ab1bf322-b785-42cb-b103-58a99a89eeda" CreationDate="2023-07-04T10:47:04.177" UserId="251" Text="Base on that example.&#xD;&#xA;&#xD;&#xA;Replace the `dest` with:&#xD;&#xA;```rs&#xD;&#xA;array_bytes::hex2array::&lt;_, 32&gt;(your `b` account's public key here).unwrap().into()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And replace the `from` with:&#xD;&#xA;```rs&#xD;&#xA;use sp_core::{sr25519::Pair, Pair as _};&#xD;&#xA;use subxt::tx::PairSigner;&#xD;&#xA;&#xD;&#xA;PairSigner::new(Pair::from_seed(&amp;array_bytes::hex2array(your a account's secret seed here).unwrap()))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36203" PostHistoryTypeId="5" PostId="9138" RevisionGUID="9868984d-d557-442e-999c-f0d1961937a5" CreationDate="2023-07-04T10:54:12.953" UserId="4068" Comment="It is not a compiler but it helps rustc compiler to with metadata to compile contract in wasm. " Text="To develop Ink! smart contracts using Rust, you need to install the cargo-contract tool. cargo-contract is a Cargo subcommand specifically designed for developing smart contracts on the Substrate framework using the Ink! language.&#xD;&#xA;&#xD;&#xA;Here's what cargo-contract provides:&#xD;&#xA;&#xD;&#xA;Smart Contract Compilation: This tool understands the specific requirements of the Ink! framework and takes care of compiling your smart contracts for you. Cargo-contract recognizes the necessary information about your smart contract, like its metadata and the dependencies it relies on. It knows what needs to be done to properly compile your code. When you invoke cargo-contract, it uses the Rust compiler (ructc) that is suitable for working with the Ink! framework. It automatically calls the appropriate compiler behind the scenes to compile your smart contracts correctly.&#xD;&#xA;&#xD;&#xA;Development Environment: It sets up a development environment specifically tailored for Ink! smart contracts. It handles the complexities of configuring the build process, interacting with the Substrate runtime, and managing contract-specific dependencies.&#xD;&#xA;&#xD;&#xA;Testing and Deployment: It provides commands to run tests for your smart contracts and deploy them to a Substrate-based blockchain network. It streamlines the process of testing and deploying your contracts, making it easier to iterate and deploy changes.&#xD;&#xA;&#xD;&#xA;By using cargo-contract, you can focus on writing your Ink! smart contract code while the tool takes care of the underlying compilation and deployment processes.&#xD;&#xA;&#xD;&#xA;To summarize, cargo-contract is an essential tool for Ink! smart contract development. It simplifies the development workflow, handles contract compilation, and provides commands for testing and deployment. It is specifically designed to work with the Ink! language and the Substrate framework, making it easier to develop and deploy smart contracts on Substrate-based blockchains." ContentLicense="CC BY-SA 4.0" />
  <row Id="36204" PostHistoryTypeId="24" PostId="9138" RevisionGUID="9868984d-d557-442e-999c-f0d1961937a5" CreationDate="2023-07-04T10:54:12.953" Comment="Proposed by 4068 approved by 2372 edit id of 493" ContentLicense="CC BY-SA 4.0" />
  <row Id="36205" PostHistoryTypeId="5" PostId="1014" RevisionGUID="de6bf1e8-61b8-480f-91d2-f3072b83264f" CreationDate="2023-07-04T10:58:26.410" UserId="3136" Comment="modify in body" Text="What I found related to `specs/resource` requirements (memory, disk space,...) was :&#xD;&#xA;- These [requirements][1] for running a validator node and &#xD;&#xA;- In the `polkadot` wiki [page][2] the space required for an archive node.&#xD;&#xA;&#xD;&#xA;I was wondering : &#xD;&#xA;1) if these are the latest, up to date requirements&#xD;&#xA;2) if there is a page with some more detailed specs for running an archive node (if necessary) and &#xD;&#xA;3) if these requirements change over time, is there a page where these specs are being updated too ? Or maybe the way to go would be to post a question in the &quot;Polkadot/Kusama validator lounge&quot; matrix chats mentioned [here][3] (for a validator node) ? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#standard-hardware&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/maintain-sync#types-of-nodes&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/community#matrix-chats" ContentLicense="CC BY-SA 4.0" />
  <row Id="36206" PostHistoryTypeId="5" PostId="1001" RevisionGUID="9c24536b-b0b5-439b-afad-b94919d82dfe" CreationDate="2023-07-04T11:00:26.103" UserId="3136" Comment="modify in body" Text="I followed the steps in [this cumulus tutorial][1], all is running fine and smooth, but I can't find the `template-pallet` or any other pallet I try to add in the parachain.&#xD;&#xA;&#xD;&#xA; - Is it normal ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've [read that][2]:&#xD;&#xA;&#xD;&#xA;&gt; You cannot, at this time, connect a parachain with any previous state to a relay chain.&#xD;&#xA;&#xD;&#xA;  - So maybe I have to live-upgrade the parachain to include the new pallets ?&#xD;&#xA;&#xD;&#xA;  - What are the steps to include custom logic in a parachain ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/v3/cumulus/start-relay/&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/v3/cumulus/connect-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36207" PostHistoryTypeId="5" PostId="1000" RevisionGUID="bdd51de9-f1e1-426d-8d47-46a440adf1d2" CreationDate="2023-07-04T11:02:06.527" UserId="3136" Comment="modify in body" Text="sorry if this is not the right forum, but here goes:&#xD;&#xA;&#xD;&#xA;```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.10.0 --force --locked```&#xD;&#xA;&#xD;&#xA;This fails with the latest rustup toolchain:&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;    nightly-x86_64-apple-darwin (default)&#xD;&#xA;    rustc 1.61.0-nightly (3b348d932 2022-02-19)&#xD;&#xA;&#xD;&#xA;The reason is: &#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable&#xD;&#xA;   --&gt; /Users/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.9.8/src/atomic.rs:314:6&#xD;&#xA;    |&#xD;&#xA;314 | impl&lt;T: ?Sized + Pointable&gt; Atomic&lt;T&gt; {&#xD;&#xA;    |      ^&#xD;&#xA;...&#xD;&#xA;346 |     pub const fn null() -&gt; Atomic&lt;T&gt; {&#xD;&#xA;    |     -------------------------------- function declared as const here&#xD;&#xA;    |&#xD;&#xA;    = note: see issue #93706 &lt;https://github.com/rust-lang/rust/issues/93706&gt; for more information&#xD;&#xA;    = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable&#xD;&#xA;&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;How can I get past this? Seems an update is necessary&#xD;&#xA;Thx!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36208" PostHistoryTypeId="5" PostId="998" RevisionGUID="3d826734-9ec4-4dde-b530-2399c03e2439" CreationDate="2023-07-04T11:07:17.463" UserId="3136" Comment="correct the format of title and change in body" Text="I was following [this guide Configuring Genesis for Balances](https://docs.substrate.io/reference/how-to-guides/basics/configure-genesis-state/).&#xD;&#xA;&#xD;&#xA;In my parachain, I replaced `T::Balance` with `BalanceOf&lt;T&gt;`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;    	type Currency: ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;    		+ LockableCurrency&lt;Self::AccountId, Moment = Self::BlockNumber&gt;;&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;	#[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;	#[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		pub single_balance: BalanceOf&lt;T&gt;,&#xD;&#xA;		pub account_map: Vec&lt;(T::AccountId, BalanceOf&lt;T&gt;)&gt;,&#xD;&#xA;	}&#xD;&#xA;	#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	impl&lt;T: Config&gt; Default for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			Self { single_balance: Default::default(), account_map: Default::default() }&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// https://docs.substrate.io/v3/runtime/storage#declaring-storage-items&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_value)]&#xD;&#xA;	pub type SingleValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;; //&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_balance)]&#xD;&#xA;	pub type SingleBalance&lt;T: Config&gt; = StorageValue&lt;_, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	// A map that has enumerable entries.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn accounts)]&#xD;&#xA;	pub type AccountMap&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt;` is not satisfied.&#xD;&#xA;&#xD;&#xA;Here's the `genesis` configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;And the error I'm getting:&#xD;&#xA;&#xD;&#xA;`EncodeLike&lt;u32&gt;` is not implemented for `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;&#xD;&#xA;`122 |     pub fn put&lt;Arg: EncodeLike&lt;Value&gt;&gt;(val: Arg) {&#xD;&#xA;     |                ^^^^^^^^^^^^^^^^ required by this bound in frame_support::pallet_prelude::StorageValue::&lt;Prefix, Value, QueryKind, OnEmpty&gt;::put&#xD;&#xA;help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; &#xD;&#xA;    where &amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt; {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36209" PostHistoryTypeId="5" PostId="994" RevisionGUID="730f783a-2608-42f0-a3c7-78b4b77ed7b2" CreationDate="2023-07-04T11:08:06.983" UserId="3136" Comment="modify in body" Text="After I called a `contract`, this is the extrinsic I found in the block:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;What do these fields mean: `value`, `storageDepositLimit` ?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/XyLO7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36210" PostHistoryTypeId="5" PostId="993" RevisionGUID="afb2f6eb-ea3f-45c1-aca2-aa7fd7ad3e32" CreationDate="2023-07-04T11:09:19.983" UserId="3136" Comment="correct the format of title and change in body" Text="I'm trying to use BoundedVec from `frame_support` for one of my storage items like this, &#xD;&#xA;```rust&#xD;&#xA;pub(super) type Payloads&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::BlockNumber, Vec&lt;Payload&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;However I'm confused how to implement `BoundedVec` here instead of `Vec` as I tried something like this which failed &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub(super) type Payloads&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::BlockNumber, BoundedVec&lt;Payload, 100&gt;, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Giving me the error, &#xD;&#xA;`error[E0747]: constant provided when a type was expected`&#xD;&#xA;&#xD;&#xA;Can someone who has already worked on this, give me an example of how to use `BoundedVec`? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36211" PostHistoryTypeId="5" PostId="991" RevisionGUID="f16b0e84-5a49-4572-81d8-1d0d69f278f2" CreationDate="2023-07-04T11:10:30.667" UserId="3136" Comment="modify in body" Text="Using either a Rust or JavaScript client library I would like to get the amount of DOT that is currently being unbonded on the relay chain.&#xD;&#xA;&#xD;&#xA;Some staking information is available in the Polkadot JS interface:&#xD;&#xA;&#xD;&#xA;[![Staking information][1]][1]&#xD;&#xA;&#xD;&#xA;But it does not include any information about the amount of `DOT` that is being `unstaked` (i.e. DOT that is currently in the 28 day unbonding period).&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mS0IA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36212" PostHistoryTypeId="5" PostId="988" RevisionGUID="d583fdee-cd07-4c22-9a9e-6ad83c3894d2" CreationDate="2023-07-04T11:16:39.337" UserId="3136" Comment="modify in body" Text="I am very interested in any documentation with examples of how to send `NFTs` from one `parachain` to another with `XCM`." ContentLicense="CC BY-SA 4.0" />
  <row Id="36213" PostHistoryTypeId="5" PostId="9120" RevisionGUID="82f99af1-be31-41e4-a0c1-900d29fdf213" CreationDate="2023-07-04T11:30:05.460" UserId="2960" Comment="added 80 characters in body" Text="I am getting ump.InvalidFormat when I sending a XCM / UMP from local a local parachin setup to relay chain to. the message instruction is[1][withdraw, buydeposit, deposit] on the relaychain&#xD;&#xA;I am using the substrate-parahchain-template and polkadot.git as relay chain and zomebiet net to start a local chain in order to test sending anc XCM. I am following the example  [here][1] to create and send the xcm message. I have attached images of the zombienet config, xcm message and xcm events are the relaychain&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZBCMV.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/2jQgq.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/anrvH.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/21E1i.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36214" PostHistoryTypeId="2" PostId="9140" RevisionGUID="7a431b47-15be-4939-9b6c-c653a797e586" CreationDate="2023-07-04T11:43:11.580" UserId="19" Text="Since the early stages of Polkadot development, I've been intrigued by the promise of cross-chain smart contract communication. I've successfully built simple but a fully functioning decentralized exchange, but now I'm searching for interfaces or traits that would allow me to enable cross-chain calls. Unfortunately, I haven't been able to find the required information (in my imagination as it could work in practice).&#xD;&#xA;&#xD;&#xA;To elaborate, I want to deploy my smart contract on Astar and Shiden parachains and facilitate cross-chain swaps. I believe I need specific interfaces to implement this functionality, but my search has been fruitless so far. With that in mind, my question is: How can I achieve cross-chain calls in ink!?&#xD;&#xA;&#xD;&#xA;Please correct me if my thinking is flawed." ContentLicense="CC BY-SA 4.0" />
  <row Id="36216" PostHistoryTypeId="1" PostId="9140" RevisionGUID="7a431b47-15be-4939-9b6c-c653a797e586" CreationDate="2023-07-04T11:43:11.580" UserId="19" Text="Usage of XVM in ink! smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="36217" PostHistoryTypeId="3" PostId="9140" RevisionGUID="7a431b47-15be-4939-9b6c-c653a797e586" CreationDate="2023-07-04T11:43:11.580" UserId="19" Text="|ink|cross-contract-call|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36218" PostHistoryTypeId="2" PostId="9141" RevisionGUID="82077e71-6d21-4e05-977e-e5f42e4907c4" CreationDate="2023-07-04T11:43:45.737" UserId="3109" Text="Yes, it is possible to register custom metrics to be exported via Prometheus. Prometheus provides a mechanism for registering custom collectors, which can be used to collect metrics from any source.&#xD;&#xA;&#xD;&#xA;To register a custom collector, you need to create a new Rust struct that implements the `PrometheusCollector` trait. This trait defines a number of methods that are used to collect and export metrics.&#xD;&#xA;&#xD;&#xA;Once you have created your custom collector, you can register it with Prometheus by calling the `register_collector` function. This function takes a reference to your custom collector and a name for the collector.&#xD;&#xA;&#xD;&#xA;For example, the following code registers a custom collector that collects the TVL and average throughput of a runtime:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct TvlValueCollector;&#xD;&#xA;&#xD;&#xA;impl PrometheusCollector for TvlValueCollector {&#xD;&#xA;    fn collect(&amp;self) -&gt; Vec&lt;MetricFamily&gt; {&#xD;&#xA;        let mut metrics = Vec::new();&#xD;&#xA;&#xD;&#xA;        let tvl = runtime.tvl();&#xD;&#xA;        let throughput = runtime.average_throughput();&#xD;&#xA;&#xD;&#xA;        metrics.push(MetricFamily::build(&#xD;&#xA;            &quot;tvl&quot;,&#xD;&#xA;            &quot;Total value locked&quot;,&#xD;&#xA;            vec![Metric::build(&quot;value&quot;, tvl, &quot;microEth&quot;)],&#xD;&#xA;        ));&#xD;&#xA;        metrics.push(MetricFamily::build(&#xD;&#xA;            &quot;throughput&quot;,&#xD;&#xA;            &quot;Average throughput&quot;,&#xD;&#xA;            vec![Metric::build(&quot;value&quot;, throughput, &quot;microEth/second&quot;)],&#xD;&#xA;        ));&#xD;&#xA;&#xD;&#xA;        return metrics;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    let collector = TvlValueCollector;&#xD;&#xA;    Prometheus::register_collector(collector, &quot;tvl_collector&quot;);&#xD;&#xA;&#xD;&#xA;    Prometheus::start();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This code will register a custom collector called `tvl_collector`. This collector will collect the TVL and average throughput of the runtime, and export them as Prometheus metrics.&#xD;&#xA;&#xD;&#xA;For more information on registering custom collectors, please see the Prometheus documentation: https://prometheus.io/docs/instrumenting/writing_exporters/." ContentLicense="CC BY-SA 4.0" />
  <row Id="36221" PostHistoryTypeId="12" PostId="8973" RevisionGUID="e51a0d28-fdd4-42cb-94fa-0354d16b848e" CreationDate="2023-07-04T12:51:43.107" UserId="2372" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2372,&quot;DisplayName&quot;:&quot;Arunjot Singh&quot;}],&quot;DeleteType&quot;:1}" />
  <row Id="36222" PostHistoryTypeId="2" PostId="9142" RevisionGUID="74949f06-3ffc-498c-9312-c2c4a2abe7e5" CreationDate="2023-07-04T13:05:35.853" UserId="3460" Text="&#xD;&#xA;The error message &quot;Trait bounds not satisfied for Balance type&quot; typically occurs when you are trying to use a type Balance in your code but it does not fulfill the required trait bounds.&#xD;&#xA;&#xD;&#xA;In Substrate-based blockchains, the Balance type represents the balance or monetary value associated with an account. To use the Balance type, you need to ensure that it satisfies the necessary trait bounds.&#xD;&#xA;&#xD;&#xA;Commonly, the Balance type is an alias for a specific type that implements the currency::Amount trait. This trait provides methods for working with balances, such as addition, subtraction, and comparison operations. Therefore, to resolve the error, you need to ensure that the Balance type you are using satisfies the required trait bounds." ContentLicense="CC BY-SA 4.0" />
  <row Id="36224" PostHistoryTypeId="2" PostId="9143" RevisionGUID="532de8ed-b754-41ae-8eb0-52460f90f016" CreationDate="2023-07-04T13:38:30.790" UserId="1793" Text="We are currently experiencing an issue related to RPC methods. Let me provide a description of the problem:&#xD;&#xA;&#xD;&#xA;To generate metadata from our node, we use the following command:&#xD;&#xA;&#xD;&#xA;    echo '{&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_getMetadata&quot;,&quot;params&quot;:[]}' | websocat -n1 -B 99999999 wss://kusama-rpc.mangata.online &gt; metadata.json&#xD;&#xA;&#xD;&#xA;By using this metadata, we are able to generate types, as demonstrated in this repository  [repo][1] (branch rc/1.0.0)&#xD;&#xA;&#xD;&#xA;We have successfully generated all the required types, and everything is working smoothly. Additionally, we have added RPC methods when initializing the ApiPromise in JavaScript:&#xD;&#xA;&#xD;&#xA;    ApiPromise.create(&#xD;&#xA;      {&#xD;&#xA;        provider,&#xD;&#xA;        rpc: {&#xD;&#xA;          xyk: {&#xD;&#xA;            calculate_buy_price: {&#xD;&#xA;      description: &quot;Calculates and returns sold_token_amount while providing bought_token_amount and respective reserves&quot;,&#xD;&#xA;      params: [&#xD;&#xA;        {&#xD;&#xA;          name: &quot;input_reserve&quot;,&#xD;&#xA;          type: &quot;Balance&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          name: &quot;output_reserve&quot;,&#xD;&#xA;          type: &quot;Balance&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          name: &quot;sell_amount&quot;,&#xD;&#xA;          type: &quot;Balance&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      type: &quot;XYKRpcResult&lt;Balance&gt;&quot;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;Ideally, we would like to call this RPC method as follows:&#xD;&#xA;&#xD;&#xA;    api.rpc.xyk.calculate_buy_price() &#xD;&#xA;&#xD;&#xA;Unfortunately, this is currently not possible, and we have to use the following workaround:&#xD;&#xA;&#xD;&#xA;    (api.rpc as any).xyk.calculate_buy_price() &#xD;&#xA;&#xD;&#xA;This workaround is not optimal. According to the [docs][2] &#xD;&#xA;&#xD;&#xA;*you can define a firstModule_testMethod on the Rust node and if correctly defined it will be callable via api.rpc.firstModule.testMethod(...)*&#xD;&#xA;&#xD;&#xA;In our node, we have defined this method as **xyk_calculate_buy_price**, following this structure. We have noticed that when we generate the metadata, the module xyk is not present in the augment-api-rpc.ts file. We suspect that this is causing the issue. How can we include these RPC methods in the metadata? Alternatively, what steps should be taken to resolve this?&#xD;&#xA;&#xD;&#xA;Any assistance would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mangata-finance/types/blob/rc/1.0.0/package.json#L21&#xD;&#xA;  [2]: https://polkadot.js.org/docs/api/start/rpc.custom/#custom-definitions" ContentLicense="CC BY-SA 4.0" />
  <row Id="36226" PostHistoryTypeId="1" PostId="9143" RevisionGUID="532de8ed-b754-41ae-8eb0-52460f90f016" CreationDate="2023-07-04T13:38:30.790" UserId="1793" Text="Property X does not exist on type DecoratedRpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="36227" PostHistoryTypeId="3" PostId="9143" RevisionGUID="532de8ed-b754-41ae-8eb0-52460f90f016" CreationDate="2023-07-04T13:38:30.790" UserId="1793" Text="|javascript|custom-rpc|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36228" PostHistoryTypeId="2" PostId="9144" RevisionGUID="35f83ec2-fba8-4949-b8b3-73c282f67444" CreationDate="2023-07-04T14:20:46.950" UserId="567" Text="There is no way at the moment to do ink! cross-chain contract.&#xD;&#xA;Astar &amp; Parity are actively working on this.&#xD;&#xA;In the meantime this is Astar [roadmap][1] regarding ink! XCM:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://forum.astar.network/t/runtime-interface-contracts-goodbye-chain-extensions-welcome-call-runtime/4795/2" ContentLicense="CC BY-SA 4.0" />
  <row Id="36230" PostHistoryTypeId="5" PostId="9099" RevisionGUID="a0609ab1-b654-48cf-9a2f-014a51b0a33d" CreationDate="2023-07-04T14:23:17.207" UserId="4247" Comment="added 2 characters in body" Text="Are there any pallet examples for custom making `XCM` call. I know there is ping pallet provided by cumulus but I believe that is pretty old. &#xD;&#xA;&#xD;&#xA;Does ping pallet still works? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36231" PostHistoryTypeId="2" PostId="9145" RevisionGUID="34306f65-18fa-4ef2-849f-459d01a47445" CreationDate="2023-07-04T14:37:18.387" UserId="251" Text="It seems that you require this update from https://github.com/paritytech/substrate/pull/14481. Without it, the custom RPC metadata will not be included in the runtime metadata." ContentLicense="CC BY-SA 4.0" />
  <row Id="36239" PostHistoryTypeId="2" PostId="9148" RevisionGUID="2c71aa8b-3fa4-4e0c-8b19-08703311b66d" CreationDate="2023-07-04T18:15:16.667" UserId="4394" Text="I am trying to assemble a list of all voters on a referendum with their votes, etc. I need help on what storage pallet to call, I tried calling the functions on the convictionVoting pallet which is not working for me. " ContentLicense="CC BY-SA 4.0" />
  <row Id="36241" PostHistoryTypeId="1" PostId="9148" RevisionGUID="2c71aa8b-3fa4-4e0c-8b19-08703311b66d" CreationDate="2023-07-04T18:15:16.667" UserId="4394" Text="How to get a list of voters per referenda through Polkadot JS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36242" PostHistoryTypeId="3" PostId="9148" RevisionGUID="2c71aa8b-3fa4-4e0c-8b19-08703311b66d" CreationDate="2023-07-04T18:15:16.667" UserId="4394" Text="|polkadot-js|polkadot|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36243" PostHistoryTypeId="5" PostId="9148" RevisionGUID="7068cb95-423b-4173-bbf3-18251933e286" CreationDate="2023-07-04T18:28:34.453" UserId="354" Comment="added 4 characters in body" Text="I am trying to assemble a list of all voters on a `referendum` with their votes, etc. I need help on what storage pallet to call, I tried calling the functions on the `convictionVoting` pallet which is not working for me. " ContentLicense="CC BY-SA 4.0" />
  <row Id="36244" PostHistoryTypeId="52" PostId="9135" RevisionGUID="c1c34f65-9737-4482-bbcc-42e54bc6062d" CreationDate="2023-07-04T18:29:01.177" />
  <row Id="36245" PostHistoryTypeId="52" PostId="9135" RevisionGUID="186b3a98-0a15-4e3e-82f4-df93f726e744" CreationDate="2023-07-04T18:28:58.213" />
  <row Id="36246" PostHistoryTypeId="52" PostId="9135" RevisionGUID="2eb3d45a-694c-48d4-9843-81694d8366b4" CreationDate="2023-07-04T18:28:59.523" />
  <row Id="36247" PostHistoryTypeId="2" PostId="9149" RevisionGUID="71f28b41-ffde-4de5-bed5-62523c50898b" CreationDate="2023-07-04T19:12:13.337" UserId="386" Text="I'm planning to incorporate a light client of a substrate solochain into the runtime of my parachain. &#xD;&#xA;I've come across the pallet-bridge-grandpa located at this link: https://github.com/paritytech/parity-bridges-common/tree/master/modules/grandpa.&#xD;&#xA;&#xD;&#xA;Would this alone be sufficient for the task at hand?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36249" PostHistoryTypeId="1" PostId="9149" RevisionGUID="71f28b41-ffde-4de5-bed5-62523c50898b" CreationDate="2023-07-04T19:12:13.337" UserId="386" Text="solochain -&gt; parachain bridge" ContentLicense="CC BY-SA 4.0" />
  <row Id="36250" PostHistoryTypeId="3" PostId="9149" RevisionGUID="71f28b41-ffde-4de5-bed5-62523c50898b" CreationDate="2023-07-04T19:12:13.337" UserId="386" Text="|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36251" PostHistoryTypeId="5" PostId="8758" RevisionGUID="52d81d06-174b-44b7-a4bd-9f5519e9d94b" CreationDate="2023-07-04T22:24:48.840" UserId="3344" Comment="added 72 characters in body" Text="It appears using [SR21559](https://doc.deepernetwork.org/v3/advanced/cryptography/#sr25519) has the desired property:&#xD;&#xA;&#xD;&#xA;&gt; One sacrifice that is made when using Schnorr signatures over ECDSA is that both require 64 bytes, but only ECDSA signatures communicate their public key.&#xD;&#xA;&#xD;&#xA;Obviously, in other contexts, this is not a sacrifice but a benefit." ContentLicense="CC BY-SA 4.0" />
  <row Id="36252" PostHistoryTypeId="2" PostId="9150" RevisionGUID="e754909b-5b96-4e25-a6ae-b0f6dae48324" CreationDate="2023-07-04T23:50:56.817" UserId="4395" Text="Currently trying to create a way to attempt a new ApiPromise if a specific RPC is deemed to be down / unavailable&#xD;&#xA;&#xD;&#xA;Code basically looks like this&#xD;&#xA;```typescript&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;					provider: new WsProvider(endpoint),&#xD;&#xA;					rpc: polkadotApiRpc,&#xD;&#xA;					types: polkadotApiTypes,&#xD;&#xA;					noInitWarn: process.env.NODE_ENV === 'production',&#xD;&#xA;					throwOnConnect: true,&#xD;&#xA;				});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When the endpoint is unavailable it successfully throws,&#xD;&#xA;however the attempts to continue to connect to the websocket endpoint continues.&#xD;&#xA;&#xD;&#xA;Is there anyway to properly **cleanup** the ApiPromise so that it doesn't spam the console, as in if it throws, nothing is leftover.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="36254" PostHistoryTypeId="1" PostId="9150" RevisionGUID="e754909b-5b96-4e25-a6ae-b0f6dae48324" CreationDate="2023-07-04T23:50:56.817" UserId="4395" Text="How to cleanup a failed ApiPromise after initialising" ContentLicense="CC BY-SA 4.0" />
  <row Id="36255" PostHistoryTypeId="3" PostId="9150" RevisionGUID="e754909b-5b96-4e25-a6ae-b0f6dae48324" CreationDate="2023-07-04T23:50:56.817" UserId="4395" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36257" PostHistoryTypeId="34" PostId="8953" RevisionGUID="e95dc68f-0f09-488b-bf5c-41590fa7ee9c" CreationDate="2023-07-05T00:03:25.510" UserId="-1" Comment="25" />
  <row Id="36258" PostHistoryTypeId="13" PostId="8973" RevisionGUID="96672506-0538-4767-b616-e32d9f0a5021" CreationDate="2023-07-05T01:46:18.910" UserId="2372" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2372,&quot;DisplayName&quot;:&quot;Arunjot Singh&quot;}]}" />
  <row Id="36260" PostHistoryTypeId="5" PostId="9124" RevisionGUID="17f4cd77-f470-4672-8b55-2ad57ab643d9" CreationDate="2023-07-05T02:40:35.377" UserId="1959" Comment="added 358 characters in body" Text="Try to `WithdrawAsset(0, Here)` rather than `(1, Here)`. `(0,Here)` is the native token in Relaychain, and relaychain cannot handle other tokens.&#xD;&#xA;&#xD;&#xA;--- Update&#xD;&#xA;&#xD;&#xA;I noticed that the relay chain you are using is v0.9.38, the parachain is v0.9.37, **the update of v0.9.38 includes XCM v3, and the compatibility code is not included in v0.9.37**, so I suggest you use compatibility Relay chain and parachain version. For example, v0.9.37 relay and v0.9.37 parachain. Or v0.9.38 relay and v0.9.38 parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="36261" PostHistoryTypeId="2" PostId="9151" RevisionGUID="c9d067d1-cdce-4a2b-a071-9d55f265a396" CreationDate="2023-07-05T02:48:05.320" UserId="29" Text="You could use the `on` handler:&#xD;&#xA;```js&#xD;&#xA;const provider = new WsProvider(endpoint);&#xD;&#xA;provider.on(&quot;error&quot;, (error) =&gt; {&#xD;&#xA;    console.log(&quot;There was an error with the websocket connection&quot;)&#xD;&#xA;    // console.error(&quot;Connection error:&quot;, error);&#xD;&#xA;    process.exit(1);&#xD;&#xA;});&#xD;&#xA;const api = new ApiPromise({ provider });&#xD;&#xA;await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;const chain = await api.rpc.system.chain();&#xD;&#xA;const nodeName = await api.rpc.system.name();&#xD;&#xA;const nodeVersion = await api.rpc.system.version();&#xD;&#xA;&#xD;&#xA;console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`);&#xD;&#xA;process.exit()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Resources&#xD;&#xA;- https://polkadot.js.org/docs/api/start/create/#advanced-creation&#xD;&#xA;- https://polkadot.js.org/docs/api/start/create/#failures&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36263" PostHistoryTypeId="2" PostId="9152" RevisionGUID="c2202e9c-6bac-46c3-b4ce-255551dea0aa" CreationDate="2023-07-05T04:29:21.510" UserId="29" Text="Here are some snippets that may help you get started:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const votes = await api.query.convictionVoting.votingFor.entries();&#xD;&#xA;votes.forEach((vote) =&gt; {&#xD;&#xA;    if (vote[1].toHuman()['Casting']) {&#xD;&#xA;        if (vote[1].toHuman()['Casting']['votes'].length &gt; 0) {&#xD;&#xA;            console.log(vote[0].toHuman());&#xD;&#xA;            console.log(JSON.stringify(vote[1].toHuman(), null, 4));&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const referenda = await api.query.referenda.referendumInfoFor.entries();&#xD;&#xA;referenda.forEach(async (referendum) =&gt; {&#xD;&#xA;    if (referendum[1].toHuman()['Ongoing']) {&#xD;&#xA;        const referendumIndex = referendum[0].args[0].toNumber();&#xD;&#xA;        console.log(&quot;Referendum:&quot;, referendumIndex);&#xD;&#xA;        console.log(referendum[1].toJSON());&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36265" PostHistoryTypeId="5" PostId="9150" RevisionGUID="c868a80f-fd33-429a-b106-9b6b683c6811" CreationDate="2023-07-05T04:39:18.423" UserId="354" Comment="added 2 characters in body" Text="Currently trying to create a way to attempt a new `ApiPromise` if a specific RPC is deemed to be down / unavailable&#xD;&#xA;&#xD;&#xA;Code basically looks like this&#xD;&#xA;```typescript&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;					provider: new WsProvider(endpoint),&#xD;&#xA;					rpc: polkadotApiRpc,&#xD;&#xA;					types: polkadotApiTypes,&#xD;&#xA;					noInitWarn: process.env.NODE_ENV === 'production',&#xD;&#xA;					throwOnConnect: true,&#xD;&#xA;				});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When the endpoint is unavailable it successfully throws,&#xD;&#xA;however the attempts to continue to connect to the websocket endpoint continues.&#xD;&#xA;&#xD;&#xA;Is there anyway to properly **cleanup** the ApiPromise so that it doesn't spam the console, as in if it throws, nothing is leftover.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="36266" PostHistoryTypeId="5" PostId="9149" RevisionGUID="71232907-a1ac-4a11-a28b-744a35f45fc7" CreationDate="2023-07-05T04:40:56.943" UserId="354" Comment="added 7 characters in body; edited tags" Text="I am planning to incorporate a light client of a substrate `solochain` into the runtime of my `parachain`. &#xD;&#xA;I've come across the `pallet-bridge-grandpa` located at this link: https://github.com/paritytech/parity-bridges-common/tree/master/modules/grandpa.&#xD;&#xA;&#xD;&#xA;Would this alone be sufficient for the task at hand?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36267" PostHistoryTypeId="6" PostId="9149" RevisionGUID="71232907-a1ac-4a11-a28b-744a35f45fc7" CreationDate="2023-07-05T04:40:56.943" UserId="354" Comment="added 7 characters in body; edited tags" Text="|parity-bridges-common|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36268" PostHistoryTypeId="5" PostId="9152" RevisionGUID="b93e8a41-a637-4c98-b008-c9788f24672e" CreationDate="2023-07-05T04:41:08.613" UserId="29" Comment="added 121 characters in body" Text="Here are some snippets that may help you get started:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const votes = await api.query.convictionVoting.votingFor.entries();&#xD;&#xA;votes.forEach((vote) =&gt; {&#xD;&#xA;    if (vote[1].toHuman()['Casting']) {&#xD;&#xA;        if (vote[1].toHuman()['Casting']['votes'].length &gt; 0) {&#xD;&#xA;            console.log(vote[0].toHuman());&#xD;&#xA;            console.log(JSON.stringify(vote[1].toHuman(), null, 4));&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const referenda = await api.query.referenda.referendumInfoFor.entries();&#xD;&#xA;referenda.forEach(async (referendum) =&gt; {&#xD;&#xA;    if (referendum[1].toHuman()['Ongoing']) {&#xD;&#xA;        const referendumIndex = referendum[0].args[0].toNumber();&#xD;&#xA;        console.log(&quot;Referendum:&quot;, referendumIndex);&#xD;&#xA;        console.log(referendum[1].toJSON());&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Resources&#xD;&#xA;- https://polkadot.js.org/docs/kusama/storage#convictionvoting&#xD;&#xA;- https://polkadot.js.org/docs/kusama/storage#referenda" ContentLicense="CC BY-SA 4.0" />
  <row Id="36269" PostHistoryTypeId="2" PostId="9153" RevisionGUID="a2e51773-8d12-42b4-8484-f02967bf2b42" CreationDate="2023-07-05T04:43:47.893" UserId="2372" Text="I'm attempting to transfer the collection ID from one relay chain to a parachain. I'm currently accessing the collection ID from its storage, and I'm wondering if there's a way to access the storage of the NFT pallet on another chain in order to facilitate the transfer." ContentLicense="CC BY-SA 4.0" />
  <row Id="36271" PostHistoryTypeId="1" PostId="9153" RevisionGUID="a2e51773-8d12-42b4-8484-f02967bf2b42" CreationDate="2023-07-05T04:43:47.893" UserId="2372" Text="Is there any way to access the storage of another pallet in Substrate-based blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36272" PostHistoryTypeId="3" PostId="9153" RevisionGUID="a2e51773-8d12-42b4-8484-f02967bf2b42" CreationDate="2023-07-05T04:43:47.893" UserId="2372" Text="|polkadot|parachain|storage|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36273" PostHistoryTypeId="5" PostId="9151" RevisionGUID="895bee2f-5361-4b81-b981-791ef8b413cf" CreationDate="2023-07-05T04:43:54.737" UserId="29" Comment="added 2 characters in body" Text="You could use the `on` handler:&#xD;&#xA;```js&#xD;&#xA;const provider = new WsProvider(endpoint);&#xD;&#xA;provider.on(&quot;error&quot;, (error) =&gt; {&#xD;&#xA;    console.log(&quot;There was an error with the websocket connection&quot;)&#xD;&#xA;    // console.error(&quot;Connection error:&quot;, error);&#xD;&#xA;    process.exit(1);&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;const api = new ApiPromise({ provider });&#xD;&#xA;await api.isReadyOrError;&#xD;&#xA;&#xD;&#xA;const chain = await api.rpc.system.chain();&#xD;&#xA;const nodeName = await api.rpc.system.name();&#xD;&#xA;const nodeVersion = await api.rpc.system.version();&#xD;&#xA;&#xD;&#xA;console.log(`You are connected to chain ${chain} using ${nodeName} v${nodeVersion}`);&#xD;&#xA;process.exit()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Resources&#xD;&#xA;- https://polkadot.js.org/docs/api/start/create/#advanced-creation&#xD;&#xA;- https://polkadot.js.org/docs/api/start/create/#failures&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36274" PostHistoryTypeId="5" PostId="9153" RevisionGUID="8b2cf0f4-9300-49ba-919b-c1f26acb2445" CreationDate="2023-07-05T04:47:48.757" UserId="354" Comment="added 1 character in body" Text="I'm attempting to transfer the collection ID from relay chain to a parachain. I am currently accessing the `collectionId` from its storage, and I am wondering if there's a way to access the storage of the `pallet_nft` on another chain in order to facilitate the transfer." ContentLicense="CC BY-SA 4.0" />
  <row Id="36275" PostHistoryTypeId="2" PostId="9154" RevisionGUID="d61a12d7-5d6f-49c0-ade4-31a8d1862cdd" CreationDate="2023-07-05T04:53:24.347" UserId="2473" Text="I am trying to perform a runtime upgrade using [Acala's Chopsticks][1]. I used this command:&#xD;&#xA;```&#xD;&#xA; npx @acala-network/chopsticks@latest xcm -r ./configs/polkadot.yml -p ./configs/my_config.yml&#xD;&#xA;```&#xD;&#xA; &#xD;&#xA;I followed the [authorize &gt; enact an upgrade flow][2] for my parachain, and it works.  &#xD;&#xA;&#xD;&#xA;To produce blocks in local Polkadot, i connected through ws and executed the command:&#xD;&#xA;```&#xD;&#xA;{ &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: &quot;1&quot;, &quot;method&quot;: &quot;dev_newBlock&quot;, &quot;params&quot;: [ {&quot;count&quot;: 1000} ]}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However when I checked `paras` &gt; `futureCodeUpgrades`, I do not see my parachain.   &#xD;&#xA;Help.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AcalaNetwork/chopsticks/tree/master&#xD;&#xA;  [2]: https://docs.substrate.io/reference/how-to-guides/parachains/upgrade-a-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36277" PostHistoryTypeId="1" PostId="9154" RevisionGUID="d61a12d7-5d6f-49c0-ade4-31a8d1862cdd" CreationDate="2023-07-05T04:53:24.347" UserId="2473" Text="How to perform Parachain Runtime Upgrade via Democracy using Chopsticks" ContentLicense="CC BY-SA 4.0" />
  <row Id="36278" PostHistoryTypeId="3" PostId="9154" RevisionGUID="d61a12d7-5d6f-49c0-ade4-31a8d1862cdd" CreationDate="2023-07-05T04:53:24.347" UserId="2473" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36282" PostHistoryTypeId="2" PostId="9155" RevisionGUID="7c41c85a-2e5a-4f91-9b9a-550988c7ad49" CreationDate="2023-07-05T05:34:54.357" UserId="4392" Text="When we run a substrate client `cargo run -- --dev` we run a substrate node. The business logic is defined on the pallets composed by `construct_runtime!` inside the runtime. So which part of the [node](https://github.com/substrate-developer-hub/substrate-node-template/tree/main/node) is responsible for initiating and interacting with the runtime?          " ContentLicense="CC BY-SA 4.0" />
  <row Id="36284" PostHistoryTypeId="1" PostId="9155" RevisionGUID="7c41c85a-2e5a-4f91-9b9a-550988c7ad49" CreationDate="2023-07-05T05:34:54.357" UserId="4392" Text="How are node and runtime are connected?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36285" PostHistoryTypeId="3" PostId="9155" RevisionGUID="7c41c85a-2e5a-4f91-9b9a-550988c7ad49" CreationDate="2023-07-05T05:34:54.357" UserId="4392" Text="|substrate-node-template|rust|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36286" PostHistoryTypeId="5" PostId="8973" RevisionGUID="370ea8a3-e2b0-4ee5-9761-7497b3dba2e8" CreationDate="2023-07-05T05:47:37.597" UserId="2372" Comment="edited body" Text="When I'm starting my node in the M2, it is continuously showing this error&#xD;&#xA;&#xD;&#xA;.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CJgJm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36287" PostHistoryTypeId="2" PostId="9156" RevisionGUID="a7043bf9-dff2-423c-82a6-05355696e167" CreationDate="2023-07-05T06:10:03.383" UserId="2762" Text="Between two pallets in the same chain you need [coupling][1] between them to access the storage. An example about this in the Substrate FRAME repository is  between pallets [bounties][2] and [child-bounties][3] which are tightly coupled.&#xD;&#xA;&#xD;&#xA;See this specific example where in [pallet child-bounties access][4] the [storage of pallet bounties][5].&#xD;&#xA;```rs&#xD;&#xA;let parent_bounty = pallet_bounties::Pallet::&lt;T&gt;::bounties(bounty_id)&#xD;&#xA;			.ok_or(BountiesError::&lt;T&gt;::InvalidIndex)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To query another pallet storage from another chain you have to construct an XCM call using the instruction Transact. It has been proposed by the main XCM ideologues on a previous StackExchange question: [XCM Transact for interfaces][6] and in this Post on the Polkadot Forum: [XCM Storage Query][7].&#xD;&#xA;&#xD;&#xA;You can find a similar example about what you achieve in the [XCM docs Examples][8].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/pallet-coupling/&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/tree/master/frame/bounties&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/tree/master/frame/child-bounties&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/child-bounties/src/lib.rs#L820C3-L821C46&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/frame/bounties/src/lib.rs#L303&#xD;&#xA;  [6]: https://substrate.stackexchange.com/a/2160/2762&#xD;&#xA;  [7]: https://forum.polkadot.network/t/xcm-storage-query/633/2?u=alexd10s&#xD;&#xA;  [8]: https://github.com/paritytech/xcm-docs/blob/main/examples/src/3_transact/mod.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="36289" PostHistoryTypeId="2" PostId="9157" RevisionGUID="159245af-59d7-4650-be07-ac96e4ec299c" CreationDate="2023-07-05T07:27:18.660" UserId="382" Text="Yes, if your `solochain` is using `GRANDPA` for finality consensus, you can follow it from your `parachain` using [pallet-bridge-grandpa](https://github.com/paritytech/parity-bridges-common/tree/master/modules/grandpa) light-client.&#xD;&#xA;&#xD;&#xA;Besides deploying `pallet-bridge-grandpa`, you also need to deploy some offchain relayers to relay finality justifications across to the light-client.&#xD;&#xA;One such relayer implementation and documentation: https://github.com/paritytech/parity-bridges-common/blob/master/relays/finality/README.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="36291" PostHistoryTypeId="5" PostId="9155" RevisionGUID="3f5ef486-b6f3-4114-a134-8dc8636a855f" CreationDate="2023-07-05T07:51:17.040" UserId="354" Comment="added 2 characters in body" Text="When we run a substrate client `cargo run -- --dev` we run a `substrate-node`. The business logic is defined on the pallets composed by `construct_runtime!` inside the runtime. So which part of the [node](https://github.com/substrate-developer-hub/substrate-node-template/tree/main/node) is responsible for initiating and interacting with the runtime?          " ContentLicense="CC BY-SA 4.0" />
  <row Id="36292" PostHistoryTypeId="4" PostId="9155" RevisionGUID="ea2bd572-0604-4491-bb8f-3aa3a380db57" CreationDate="2023-07-05T07:57:33.500" UserId="354" Comment="edited title" Text="How node and runtime are connected?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36293" PostHistoryTypeId="2" PostId="9158" RevisionGUID="3b95850f-3f50-4c1f-aa3c-e2092cde4963" CreationDate="2023-07-05T08:04:22.957" UserId="4400" Text=" This error indicates that there was an issue during the initial connection handshake process.&#xD;&#xA;&#xD;&#xA;The handshake between the client and the server typically involves an exchange of information to establish a secure and valid connection. In" ContentLicense="CC BY-SA 4.0" />
  <row Id="36295" PostHistoryTypeId="2" PostId="9159" RevisionGUID="bbfc7e1a-fb61-4a98-98fd-b7f34b3a9216" CreationDate="2023-07-05T08:05:08.953" UserId="354" Text="Substrate provides a [FRAME][1] based blockchain system for adding custom pallets to make a application specific blockchain. To achieve this a custom runtime is also required which will interact with custom pallet.&#xD;&#xA;&#xD;&#xA;&gt; How node and runtime are connected?&#xD;&#xA;&#xD;&#xA;You can find connection between node and runtime by going through [node/src/service.rs][2] and [node/src/chain_spec.rs][3] file, `service.rs` file contains the logic for the spawn of the network and `chain_spec.rs` file contains the genesis configuration for the chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/quick-start/substrate-at-a-glance/#what-is-frame&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/service.rs&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="36297" PostHistoryTypeId="2" PostId="9160" RevisionGUID="9bd97192-8748-49ca-86e5-6eaa91baf132" CreationDate="2023-07-05T09:07:47.823" UserId="2372" Text="In a Substrate client, such as when running `cargo run -- --dev`, the responsibility for initiating and interacting with the runtime lies with the node itself. The node is the main component that handles the execution of the blockchain network and manages the runtime.&#xD;&#xA;&#xD;&#xA;When you run the Substrate client, it starts the node, which includes the consensus engine,networking, block production, and Transaction Processing.&#xD;&#xA;Runtime contains the core business logic of the blockchain. It consists of a set of pallets, which are reusable modules that define the state, storage, and behavior of the blockchain. The runtime is responsible for executing the transactions, maintaining the state of the blockchain, and processing the system events.&#xD;&#xA;&#xD;&#xA;So, the node is responsible for initiating the runtime and coordinating its interaction with other components. It ensures that the defined business logic in the pallets is executed correctly and maintains the integrity of the blockchain network." ContentLicense="CC BY-SA 4.0" />
  <row Id="36299" PostHistoryTypeId="5" PostId="9149" RevisionGUID="5e11295f-748a-4be1-a9dc-9709433887a5" CreationDate="2023-07-05T09:18:03.230" UserId="386" Comment="added 906 characters in body" Text="I'm currently embarking on a project to establish a trustless bridge between a Substrate `solochain` and a `parachain`. Both chains utilize Substrate technology, with the `solochain` achieving finality through the GRANDPA gadget. To achieve this, I plan to use the technology provided by [Parity Bridges Common](https://github.com/paritytech/parity-bridges-common).&#xD;&#xA;&#xD;&#xA;In my understanding, there are two main components in the bridge:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;1. **Light Client**: This is the core technology providing the state of the solochain in the parachain.&#xD;&#xA;2. **Message System**: An abstraction built on top of the light client to facilitate message passing from the solochain to the parachain.&#xD;&#xA;&#xD;&#xA;For the initial stage, my aim is to integrate the light client of the `solochain` into the `parachain`. To achieve this, is it sufficient to incorporate the [pallet-bridge-grandpa](https://github.com/paritytech/parity-bridges-common/tree/master/modules/grandpa) into the `parachain`'s runtime and then run the relay to submit the &quot;headers&quot; of the `solochain`?&#xD;&#xA;&#xD;&#xA;Any guidance or insights on this matter would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VlXwy.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36300" PostHistoryTypeId="2" PostId="9161" RevisionGUID="6aa9e95a-473c-46de-a2db-349dfb6b3d94" CreationDate="2023-07-05T09:25:55.237" UserId="3395" Text="Does anyone know why the template provided in [this][1] repo doesn't include any governance? I noticed that the Cumulus repo does include a [sudo][2].&#xD;&#xA;&#xD;&#xA;I run a parachain using this template and was unable to perform an upgrade due to the lack of governance. As a result, I had to instantiate a new parachain from scratch, this time including the sudo pallet. Actually, I still have an [unresolved][3] question about performing the upgrade from the relay chain as a workaround.&#xD;&#xA;&#xD;&#xA;What's the rationale behind excluding any form of governance from this template?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/blob/master/parachain-template/runtime/src/lib.rs#L489&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/8832/upgrade-parachain-without-sudo" ContentLicense="CC BY-SA 4.0" />
  <row Id="36302" PostHistoryTypeId="1" PostId="9161" RevisionGUID="6aa9e95a-473c-46de-a2db-349dfb6b3d94" CreationDate="2023-07-05T09:25:55.237" UserId="3395" Text="No governance within substrate-parachain-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="36303" PostHistoryTypeId="3" PostId="9161" RevisionGUID="6aa9e95a-473c-46de-a2db-349dfb6b3d94" CreationDate="2023-07-05T09:25:55.237" UserId="3395" Text="|runtime-upgrade|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36304" PostHistoryTypeId="2" PostId="9162" RevisionGUID="33b5950a-ab63-40db-8770-2f67e2e90a76" CreationDate="2023-07-05T09:38:31.097" UserId="251" Text="I added this 2 weeks ago on GitHub: https://github.com/paritytech/cumulus/pull/2748.&#xD;&#xA;&#xD;&#xA;However, the CI has not synchronized the changes between these repositories for 3 weeks. It would be advisable to request an update at that mirrored repository." ContentLicense="CC BY-SA 4.0" />
  <row Id="36306" PostHistoryTypeId="2" PostId="9163" RevisionGUID="d14b6ad5-7ad9-481b-b721-884b0991edcc" CreationDate="2023-07-05T11:45:32.497" UserId="2762" Text="Check this [extended-parachain-template][1] supported by Parity. A ready-for-hacking parachain template, pre-configured a governance system (Collective &amp; Motion pallets) among other pallets.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/extended-parachain-template/tree/main" ContentLicense="CC BY-SA 4.0" />
  <row Id="36308" PostHistoryTypeId="2" PostId="9164" RevisionGUID="b7c852c1-22f6-47f3-92e7-d93793ddef96" CreationDate="2023-07-05T13:21:02.657" UserId="2473" Text="Actually, what it needed was to produce blocks. Instead of manually performing transactions, I used a websocket command:&#xD;&#xA;`dev_newBlock` &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: &quot;1&quot;, &quot;method&quot;: &quot;dev_newBlock&quot;, &quot;params&quot;: [ {&quot;count&quot;: 50} ]}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36310" PostHistoryTypeId="52" PostId="9155" RevisionGUID="feb47398-f2b5-414e-bab5-0717e1efad13" CreationDate="2023-07-05T13:37:08.077" />
  <row Id="36311" PostHistoryTypeId="2" PostId="9165" RevisionGUID="3302f3e8-619d-45a3-a2ab-2a922aedd360" CreationDate="2023-07-05T14:00:45.707" UserId="2762" Text="The account you want to send the funds to (you need the address):&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    let account_B: AccountId32 = the_address.parse().unwrap();&#xD;&#xA;```&#xD;&#xA;The account you want to send the funds from (you need the seed):&#xD;&#xA;```rs&#xD;&#xA;let pair = sp_core::sr25519::Pair::from_string(&amp;mnemonic_phrase_A, None).unwrap();&#xD;&#xA;let account_A = PairSigner::new(pair);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then is the same code as the example&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let balance_transfer_tx = polkadot::tx().balances().transfer(account_B, 10_000);&#xD;&#xA;&#xD;&#xA;    let events = api&#xD;&#xA;        .tx()&#xD;&#xA;        .sign_and_submit_then_watch_default(&amp;balance_transfer_tx, &amp;account_A)&#xD;&#xA;        .await?&#xD;&#xA;        .wait_for_finalized_success()&#xD;&#xA;        .await?;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36313" PostHistoryTypeId="2" PostId="9166" RevisionGUID="ef1c1d32-d2dd-491d-9b51-c2061e84c22e" CreationDate="2023-07-05T14:26:42.117" UserId="4381" Text="i wanted use Database Snapshot Services, because making genesis to last blcock takes too much time.... so i used POLKACHU site, the code is.&#xD;&#xA;&#xD;&#xA;&quot; curl -o - -L https://snapshots.polkachu.com/snapshots/polkadot/polkadot_16262141.tar.lz4 | lz4 -c -d - | tar -x -C YOUR_DATABASE_LOCATION &quot;&#xD;&#xA;&#xD;&#xA;location changed like this&#xD;&#xA;-&gt;&#xD;&#xA;&quot;curl -o - -L https://snapshots.polkachu.com/snapshots/polkadot/polkadot_16262141.tar.lz4 | lz4 -c -d - | tar -x -C ~/.local/share/polkadot/chains/polkadot&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;all seems well downloaded, and i use the command&#xD;&#xA;&quot;polkadot  --database=RocksDb --pruning=1000&quot;&#xD;&#xA;but nothing changed, when i see telemetry, it start from zero.......&#xD;&#xA;&#xD;&#xA;what is the problem?? did i miss something??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36315" PostHistoryTypeId="1" PostId="9166" RevisionGUID="ef1c1d32-d2dd-491d-9b51-c2061e84c22e" CreationDate="2023-07-05T14:26:42.117" UserId="4381" Text="how i use Database Snapshot Services correct" ContentLicense="CC BY-SA 4.0" />
  <row Id="36316" PostHistoryTypeId="3" PostId="9166" RevisionGUID="ef1c1d32-d2dd-491d-9b51-c2061e84c22e" CreationDate="2023-07-05T14:26:42.117" UserId="4381" Text="|validator|nodes|networking|block|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36317" PostHistoryTypeId="2" PostId="9167" RevisionGUID="5ba8308d-d03d-4b21-b8d4-ef8bfc98528d" CreationDate="2023-07-05T15:13:16.853" UserId="4068" Text="I'm working on adding events to an OpenBrush PSP37 smart contract and deploying it using Substrate Contract UI. However, when I try to call the mint function, I encounter the following error:&#xD;&#xA;&#xD;&#xA;Contract Reverted!&#xD;&#xA;Dispatch error: TooManyTopics&#xD;&#xA;I have attached screenshots of the error message and relevant code snippets for reference.&#xD;&#xA;&#xD;&#xA;I'm not sure what could be causing this error or how to resolve it. Could someone please provide some guidance on what might be causing this error and how to fix it?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/v4T6i.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/eHwYs.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36319" PostHistoryTypeId="1" PostId="9167" RevisionGUID="5ba8308d-d03d-4b21-b8d4-ef8bfc98528d" CreationDate="2023-07-05T15:13:16.853" UserId="4068" Text="Getting &quot;Contract Reverted!&quot; error with &quot;TooManyTopics&quot; dispatch error when calling mint function in OpenBrush PSP37 smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="36320" PostHistoryTypeId="3" PostId="9167" RevisionGUID="5ba8308d-d03d-4b21-b8d4-ef8bfc98528d" CreationDate="2023-07-05T15:13:16.853" UserId="4068" Text="|ink|smart-contract|pallet-contracts|substrate-node|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36321" PostHistoryTypeId="2" PostId="9168" RevisionGUID="0f99c727-6a73-475c-ba23-c220f7a74490" CreationDate="2023-07-05T15:24:59.780" UserId="2445" Text="We have the weird case that extrinsics in general work, but there is a specific extrinsic that stalls the parachain. See https://github.com/integritee-network/parachain/issues/222. This extrinsic sends a UMP-message to the relay chain requesting a slot swap.&#xD;&#xA;&#xD;&#xA;Here are the logs with `-lparachain::collation-generation=trace -lparachain::approval-distribution=trace -lparachain::collator-protocol=trace`: https://gist.github.com/clangenb/7a9ef1c2833e534d9cc6bb0b7b38e4bc&#xD;&#xA;&#xD;&#xA;Even more interesting, from these logs we can see that the collation was successful, and that that the collators relay chain accepted it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; cumulus-collator: [Parachain] Starting collation. relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb at=0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.595  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.600  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 7823 (2 ms) [hash: 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca; parent_hash: 0x0266…1ef0; extrinsics (3): [0xcaec…3897, 0x470b…e13b, 0x1f79…cc15]]&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 7, ValidatorIndex(72)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an assignment to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae claimed_candidate_index=7 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.607  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 7823. Hash now 0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc, previously 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca.&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1796875kb, extrinsics: 5.7197265625kb, storage_proof: 9.3466796875kb }&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #7823 (0x78a4…7acc)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 9.5498046875kb&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb para_id=2267 traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=31556&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=2267 relay_parent=0xf0bf…9ddb candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 core=CoreIndex(41) current_validators=[Public(dea7cae27e5dfb239a7ca5fb0649568b57afc08ed2ec5e538d4a3abb786fbc3c (5H6eLEHx...)), Public(fcf408d2b46082efffea4ddd78d114e021439b47d4a5848e15f6d3e5eca44c2e (5HnNRAfr...)), Public(4c0e2bd29d0d14bf81da32c79492dbc2bd97a594f34c982047b8a2ee4d035865 (5DnRhudq...)), Public(3a56f3c36ae08f7cfdeea6d340aa45ebd6b379f47267ca78837749054dec7b03 (5DPCTuQm...)), Public(e6e40731962e2834867cc4f482308cc34e4579ee1a5e1667c3ec36d96b36a971 (5HHScHPf...))] traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.618 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing approvals from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked approval peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 9, ValidatorIndex(147)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an approval to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae candidate_index=9 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 10, ValidatorIndex(178)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The collator runs on `polkadot-v0.9.42`&#xD;&#xA;The runtime runs on `polkadot-v0.9.37`: https://github.com/integritee-network/parachain/tree/1.5.36/polkadot-parachains&#xD;&#xA;&#xD;&#xA;It happens with the live Kusama network." ContentLicense="CC BY-SA 4.0" />
  <row Id="36323" PostHistoryTypeId="1" PostId="9168" RevisionGUID="0f99c727-6a73-475c-ba23-c220f7a74490" CreationDate="2023-07-05T15:24:59.780" UserId="2445" Text="Specific extrinsic stalls the parachain even though the collation is successfully produced" ContentLicense="CC BY-SA 4.0" />
  <row Id="36324" PostHistoryTypeId="3" PostId="9168" RevisionGUID="0f99c727-6a73-475c-ba23-c220f7a74490" CreationDate="2023-07-05T15:24:59.780" UserId="2445" Text="|parachain|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36325" PostHistoryTypeId="2" PostId="9169" RevisionGUID="5f82cb0f-8cb9-4a84-a5bc-1ee353c64e01" CreationDate="2023-07-05T15:26:22.233" UserId="4068" Text="When encountering the &quot;Contract Reverted!&quot; error with the &quot;TooManyTopics&quot; dispatch error while calling the mint function in the OpenBrush PSP37 smart contract, it is likely due to exceeding the limit of event topics that can be written for an event.&#xD;&#xA;&#xD;&#xA;Upon searching the source code of the Substrate framework for the error code &quot;TooManyTopics,&quot; the following code snippet was found:&#xD;&#xA;&#xD;&#xA;    // If there are more than `event_topics`, then trap.&#xD;&#xA;if topics.len() &gt; ctx.ext.schedule().limits.event_topics as usize {&#xD;&#xA;    return Err(Error::&lt;E::T&gt;::TooManyTopics.into());&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;This code snippet indicates that if the number of topics exceeds the predefined limit of event topics, an error will be returned with the &quot;TooManyTopics&quot; variant. By default, the limit for event topics is set to 4 in the Limits implementation:&#xD;&#xA;&#xD;&#xA;    impl Default for Limits {&#xD;&#xA;    fn default() -&gt; Self {&#xD;&#xA;        Self {&#xD;&#xA;            event_topics: 4,&#xD;&#xA;            globals: 256,&#xD;&#xA;            locals: 1024,&#xD;&#xA;            parameters: 128,&#xD;&#xA;            memory_pages: 16,&#xD;&#xA;            // 4k function pointers (This is in count not bytes).&#xD;&#xA;            table_size: 4096,&#xD;&#xA;            br_table_size: 256,&#xD;&#xA;            subject_len: 32,&#xD;&#xA;            payload_len: 16 * 1024,&#xD;&#xA;            runtime_memory: 1024 * 1024 * 128,&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;The provided code snippet shows the default values for various limits in the Limits struct, with the event_topics limit set to 4.&#xD;&#xA;&#xD;&#xA;To resolve the &quot;TooManyTopics&quot; dispatch error, you need to ensure that the number of topics used in your mint function call does not exceed the limit of 4. Review your code and adjust the number of topics accordingly.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5HOo5.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/iNmWK.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/h4hnv.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36327" PostHistoryTypeId="5" PostId="9168" RevisionGUID="d8414d15-899a-4c4c-98b8-5fecac8fe86a" CreationDate="2023-07-05T15:30:11.783" UserId="2445" Comment="added 14 characters in body; edited tags" Text="We have the weird case that extrinsics in general work, but there is a specific extrinsic that stalls the parachain. See https://github.com/integritee-network/parachain/issues/222. This extrinsic sends a UMP-message to the relay chain requesting a slot swap.&#xD;&#xA;&#xD;&#xA;Here are the logs with `-lparachain::collation-generation=trace -lparachain::approval-distribution=trace -lparachain::collator-protocol=trace`: https://gist.github.com/clangenb/7a9ef1c2833e534d9cc6bb0b7b38e4bc&#xD;&#xA;&#xD;&#xA;Even more interesting, from these logs we can see that the collation was successful, and that that the collators relay chain accepted it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; cumulus-collator: [Parachain] Starting collation. relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb at=0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.595  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.600  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 7823 (2 ms) [hash: 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca; parent_hash: 0x0266…1ef0; extrinsics (3): [0xcaec…3897, 0x470b…e13b, 0x1f79…cc15]]&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 7, ValidatorIndex(72)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an assignment to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae claimed_candidate_index=7 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.607  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 7823. Hash now 0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc, previously 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca.&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1796875kb, extrinsics: 5.7197265625kb, storage_proof: 9.3466796875kb }&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #7823 (0x78a4…7acc)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 9.5498046875kb&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb para_id=2267 traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=31556&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=2267 relay_parent=0xf0bf…9ddb candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 core=CoreIndex(41) current_validators=[Public(dea7cae27e5dfb239a7ca5fb0649568b57afc08ed2ec5e538d4a3abb786fbc3c (5H6eLEHx...)), Public(fcf408d2b46082efffea4ddd78d114e021439b47d4a5848e15f6d3e5eca44c2e (5HnNRAfr...)), Public(4c0e2bd29d0d14bf81da32c79492dbc2bd97a594f34c982047b8a2ee4d035865 (5DnRhudq...)), Public(3a56f3c36ae08f7cfdeea6d340aa45ebd6b379f47267ca78837749054dec7b03 (5DPCTuQm...)), Public(e6e40731962e2834867cc4f482308cc34e4579ee1a5e1667c3ec36d96b36a971 (5HHScHPf...))] traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.618 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing approvals from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked approval peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 9, ValidatorIndex(147)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an approval to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae candidate_index=9 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 10, ValidatorIndex(178)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The collator runs on `polkadot-v0.9.42`&#xD;&#xA;The runtime runs on `polkadot-v0.9.37`: https://github.com/integritee-network/parachain/tree/1.5.35/polkadot-parachains/shell-runtime&#xD;&#xA;&#xD;&#xA;It happens with the live Kusama network." ContentLicense="CC BY-SA 4.0" />
  <row Id="36328" PostHistoryTypeId="6" PostId="9168" RevisionGUID="d8414d15-899a-4c4c-98b8-5fecac8fe86a" CreationDate="2023-07-05T15:30:11.783" UserId="2445" Comment="added 14 characters in body; edited tags" Text="|parachain|collator|stalled|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36329" PostHistoryTypeId="5" PostId="9168" RevisionGUID="6393193a-0eef-424e-954f-c860dc79a883" CreationDate="2023-07-05T15:47:27.740" UserId="2445" Comment="added 1 character in body" Text="We have the weird case that extrinsics in general work, but there is a specific extrinsic that stalls the parachain. See https://github.com/integritee-network/parachain/issues/222. This extrinsic sends a UMP-message to the relay chain requesting a slot swap.&#xD;&#xA;&#xD;&#xA;Here are the logs with `-lparachain::collation-generation=trace -lparachain::approval-distribution=trace -lparachain::collator-protocol=trace`: https://gist.github.com/clangenb/7a9ef1c2833e534d9cc6bb0b7b38e4bc&#xD;&#xA;&#xD;&#xA;Even more interesting, from these logs we can see that the collation was successful, and that that the collator's relay chain accepted it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; cumulus-collator: [Parachain] Starting collation. relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb at=0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.595  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.600  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 7823 (2 ms) [hash: 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca; parent_hash: 0x0266…1ef0; extrinsics (3): [0xcaec…3897, 0x470b…e13b, 0x1f79…cc15]]&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 7, ValidatorIndex(72)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an assignment to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae claimed_candidate_index=7 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.607  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 7823. Hash now 0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc, previously 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca.&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1796875kb, extrinsics: 5.7197265625kb, storage_proof: 9.3466796875kb }&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #7823 (0x78a4…7acc)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 9.5498046875kb&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb para_id=2267 traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=31556&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=2267 relay_parent=0xf0bf…9ddb candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 core=CoreIndex(41) current_validators=[Public(dea7cae27e5dfb239a7ca5fb0649568b57afc08ed2ec5e538d4a3abb786fbc3c (5H6eLEHx...)), Public(fcf408d2b46082efffea4ddd78d114e021439b47d4a5848e15f6d3e5eca44c2e (5HnNRAfr...)), Public(4c0e2bd29d0d14bf81da32c79492dbc2bd97a594f34c982047b8a2ee4d035865 (5DnRhudq...)), Public(3a56f3c36ae08f7cfdeea6d340aa45ebd6b379f47267ca78837749054dec7b03 (5DPCTuQm...)), Public(e6e40731962e2834867cc4f482308cc34e4579ee1a5e1667c3ec36d96b36a971 (5HHScHPf...))] traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.618 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing approvals from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked approval peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 9, ValidatorIndex(147)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an approval to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae candidate_index=9 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 10, ValidatorIndex(178)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The collator runs on `polkadot-v0.9.42`&#xD;&#xA;The runtime runs on `polkadot-v0.9.37`: https://github.com/integritee-network/parachain/tree/1.5.35/polkadot-parachains/shell-runtime&#xD;&#xA;&#xD;&#xA;It happens with the live Kusama network." ContentLicense="CC BY-SA 4.0" />
  <row Id="36330" PostHistoryTypeId="5" PostId="9120" RevisionGUID="bd9cbf95-e1ea-4ac5-af59-4fa901448c53" CreationDate="2023-07-05T15:54:28.163" UserId="2960" Comment="Updated zombienet config" Text="I am getting ump.InvalidFormat when I sending a XCM / UMP from local a local parachin setup to relay chain to. the message instruction is[1][withdraw, buydeposit, deposit] on the relaychain&#xD;&#xA;I am using the substrate-parahchain-template and polkadot.git as relay chain and zomebiet net to start a local chain in order to test sending anc XCM. I am following the example  [here][1] to create and send the xcm message. I have attached images of the zombienet config, xcm message and xcm events are the relaychain&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZBCMV.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/yUwzN.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/2jQgq.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/anrvH.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/21E1i.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36331" PostHistoryTypeId="2" PostId="9170" RevisionGUID="92e825ea-70b2-4666-8947-1367204abdb1" CreationDate="2023-07-05T19:48:30.963" UserId="251" Text="Please verify the location by following these steps:&#xD;&#xA;&#xD;&#xA;1. Delete the `~/.local/share/polkadot` directory.&#xD;&#xA;2. Execute the command `polkadot` directly.&#xD;&#xA;3. Press ctrl-c to stop the process.&#xD;&#xA;4. Examine the folder structure of `~/.local/share/polkadot`.&#xD;&#xA;5. Locate and copy the `db` folder from your downloaded files (named `db`).&#xD;&#xA;6. Replace polkadot's existing `db` folder with the downloaded one.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Additionally, consider using the latest version of Polkadot and include the flag `--sync warp`. This option allows for faster synchronization without needing to download all data initially." ContentLicense="CC BY-SA 4.0" />
  <row Id="36333" PostHistoryTypeId="2" PostId="9171" RevisionGUID="5aced091-0f4c-401d-8ca5-0aa09fb38e69" CreationDate="2023-07-05T20:04:19.920" UserId="711" Text="It most likely is that `xcmPallet.safeStorageVersion` is set to a higher number (ex. 3) than the xcm version you are sending (ex. 2).&#xD;&#xA;&#xD;&#xA;You could try adjusting this storage at genesis or call the extrinsic `xcmPallet.forceDefaultXcmVersion` on Relaychain using sudo" ContentLicense="CC BY-SA 4.0" />
  <row Id="36336" PostHistoryTypeId="5" PostId="9120" RevisionGUID="82987ba1-1839-45ac-94da-1ec7024faf95" CreationDate="2023-07-05T22:06:13.987" UserId="2960" Comment="added event emitted by parachain" Text="I am getting ump.InvalidFormat when I sending a XCM / UMP from local a local parachin setup to relay chain to. the message instruction is[1][withdraw, buydeposit, deposit] on the relaychain&#xD;&#xA;I am using the substrate-parahchain-template and polkadot.git as relay chain and zomebiet net to start a local chain in order to test sending anc XCM. I am following the example  [here][1] to create and send the xcm message. I have attached images of the zombienet config, xcm message and xcm events are the relaychain. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;UPDATE&#xD;&#xA;---&#xD;&#xA;I have set the safXcmVersion of both the relay chain and the parachain to v2 however I still get thesame error. Looking the the polkadotXcm.sent event emitted by the parachain (image attached), I can see that it sends the xcm message using v3 even though the safeXcmVersion on both chains is set to v2&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][6]][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZBCMV.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/yUwzN.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/2jQgq.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/anrvH.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/21E1i.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/pakfa.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36337" PostHistoryTypeId="52" PostId="9167" RevisionGUID="fd997e9b-7d76-421c-9ead-d5145812ffe2" CreationDate="2023-07-05T23:13:17.697" />
  <row Id="36338" PostHistoryTypeId="2" PostId="9172" RevisionGUID="4a29a01a-27cc-4ba0-8dd0-4830ba1c48f4" CreationDate="2023-07-06T04:30:03.000" UserId="386" Text="I've been exploring Substrate's development of `GRANDPA` and `BEEFY` light clients and I'm trying to understand their different uses and advantages. &#xD;&#xA;&#xD;&#xA;**What are the unique features and advantages of each?**&#xD;&#xA;&#xD;&#xA;In addition, I have a scenario I'm trying to understand better: &#xD;&#xA;&#xD;&#xA;**Suppose I have two `solochains` using both `GRANDPA` and `BEEFY` finality gadgets. Would the `GRANDPA` light client be the better choice? If so, why?**&#xD;&#xA;&#xD;&#xA;Any insights or resources would be greatly appreciated. Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="36340" PostHistoryTypeId="1" PostId="9172" RevisionGUID="4a29a01a-27cc-4ba0-8dd0-4830ba1c48f4" CreationDate="2023-07-06T04:30:03.000" UserId="386" Text="GRANDPA vs. BEEFY Light Clients" ContentLicense="CC BY-SA 4.0" />
  <row Id="36341" PostHistoryTypeId="3" PostId="9172" RevisionGUID="4a29a01a-27cc-4ba0-8dd0-4830ba1c48f4" CreationDate="2023-07-06T04:30:03.000" UserId="386" Text="|parity-bridges-common|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36342" PostHistoryTypeId="5" PostId="9166" RevisionGUID="aa596788-a264-409b-9706-3a231a64c5e7" CreationDate="2023-07-06T04:32:07.703" UserId="354" Comment="deleted 3 characters in body; edited title" Text="I want use Database Snapshot Services, because making genesis to last block takes too much time.... so I used POLKACHU site, the code is.&#xD;&#xA;&#xD;&#xA;&quot; curl -o - -L https://snapshots.polkachu.com/snapshots/polkadot/polkadot_16262141.tar.lz4 | lz4 -c -d - | tar -x -C YOUR_DATABASE_LOCATION &quot;&#xD;&#xA;&#xD;&#xA;location changed like this&#xD;&#xA;-&gt;&#xD;&#xA;&quot;curl -o - -L https://snapshots.polkachu.com/snapshots/polkadot/polkadot_16262141.tar.lz4 | lz4 -c -d - | tar -x -C ~/.local/share/polkadot/chains/polkadot&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All seems well downloaded, and I use the command&#xD;&#xA;&quot;polkadot  --database=RocksDb --pruning=1000&quot;&#xD;&#xA;but nothing changed, when i see telemetry, it start from zero.......&#xD;&#xA;&#xD;&#xA;@hat is the problem?? Did I miss something??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36343" PostHistoryTypeId="4" PostId="9166" RevisionGUID="aa596788-a264-409b-9706-3a231a64c5e7" CreationDate="2023-07-06T04:32:07.703" UserId="354" Comment="deleted 3 characters in body; edited title" Text="How I use Database Snapshot Services correct" ContentLicense="CC BY-SA 4.0" />
  <row Id="36344" PostHistoryTypeId="2" PostId="9173" RevisionGUID="e4f07728-f1f0-4ff5-8e9f-58052ce6b0a1" CreationDate="2023-07-06T04:48:58.920" UserId="354" Text="Generally `BEEFY` was designed to use for efficient bridging with non substrate based chains mainly `ethereum` and it cannot work alone it is meant to be running alongside `GRANDPA` finality gadget for `substrate`. You can find more details about it here [https://github.com/paritytech/grandpa-bridge-gadget/blob/master/docs/beefy.md][1].&#xD;&#xA;&#xD;&#xA;A more detailed explanation of how `GRANDPA` and `BEEFY` is explained by parity team, you can find it here [https://youtu.be/ZmIa_4hPRZ8][2].&#xD;&#xA;&#xD;&#xA;A briefly explained answer by a fellow stack exchange member can be found here [https://substrate.stackexchange.com/questions/3632/what-is-beefy-used-for][3] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/grandpa-bridge-gadget/blob/master/docs/beefy.md&#xD;&#xA;  [2]: https://youtu.be/ZmIa_4hPRZ8&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/3632/what-is-beefy-used-for" ContentLicense="CC BY-SA 4.0" />
  <row Id="36346" PostHistoryTypeId="2" PostId="9174" RevisionGUID="536b9591-7b1c-4b35-bd30-a3a78653c416" CreationDate="2023-07-06T04:49:17.017" UserId="2372" Text="GRANDPA and BEEFY are both finality gadgets used in Substrate-based blockchains to achieve consensus and provide finality guarantees. Here are the unique features and advantages of each:&#xD;&#xA;&#xD;&#xA;GRANDPA (GHOST-based Recursive Ancestor Deriving Prefix Agreement):&#xD;&#xA;&#xD;&#xA;Finality: GRANDPA offers fast finality, meaning that once a block is finalized, it is considered irrevocable and cannot be reverted.&#xD;&#xA;Finality Gadget: GRANDPA is a finality gadget that provides finality guarantees through the use of voting and a recursive process to determine the finalized blocks.&#xD;&#xA;Block Finalization: GRANDPA finalizes blocks based on votes from validators, ensuring Byzantine fault tolerance.&#xD;&#xA;Security: GRANDPA provides strong security guarantees against various attacks, including long-range attacks.&#xD;&#xA;BEEFY (Blind Assignment for Ethereum):&#xD;&#xA;&#xD;&#xA;Light Client: BEEFY is a light client protocol that allows for cross-chain communication and verification of block headers and proofs.&#xD;&#xA;Interoperability: BEEFY enables interoperability between Substrate-based chains and the Ethereum network, allowing for the transfer of assets and information between chains.&#xD;&#xA;Trust Minimization: BEEFY minimizes the trust required between chains by verifying the correctness of block headers and proofs.&#xD;&#xA;Simplified Security Model: BEEFY simplifies the security model by leveraging the security guarantees of the Ethereum network.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the scenario where you have two solochains using both GRANDPA and BEEFY finality gadgets, it would be beneficial to use the GRANDPA light client. This is because GRANDPA provides fast finality and ensures Byzantine fault tolerance within the solochains themselves. The GRANDPA light client can validate the finality of blocks and ensure their correctness without relying on external chains like Ethereum. Using the GRANDPA light client would provide a more self-contained and secure solution for the solochains." ContentLicense="CC BY-SA 4.0" />
  <row Id="36348" PostHistoryTypeId="5" PostId="9172" RevisionGUID="69d045c1-9cf5-4737-aeb1-03f82a468bc5" CreationDate="2023-07-06T04:50:58.520" UserId="354" Comment="edited body" Text="I've been exploring `Substrate` development of `GRANDPA` and `BEEFY` light clients and I'm trying to understand their different uses and advantages. &#xD;&#xA;&#xD;&#xA;**What are the unique features and advantages of each?**&#xD;&#xA;&#xD;&#xA;In addition, I have a scenario I'm trying to understand better: &#xD;&#xA;&#xD;&#xA;**Suppose I have two `solochains` using both `GRANDPA` and `BEEFY` finality gadgets. Would the `GRANDPA` light client be the better choice? If so, why?**&#xD;&#xA;&#xD;&#xA;Any insights or resources would be greatly appreciated. Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="36350" PostHistoryTypeId="2" PostId="9175" RevisionGUID="621ac3b9-7f7c-4400-81dc-d5865c72176c" CreationDate="2023-07-06T06:54:40.347" UserId="2372" Text="I am attempting to convert the NFT ID into the form of MultiAssets in order to utilize XCM instructions for transferring it to another chain. However, I am only able to access the origin location and not the collection information.&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    let collection: MultiAssets = T::CollectionIdConvert::convert(collection_id).into();&#xD;&#xA;    let value = (origin_location,collection );&#xD;&#xA;    ensure!(T::XcmTeleportFilter::contains(&amp;value), Error::&lt;T,I&gt;::Filtered);&#xD;&#xA;	let assets: MultiAssets = collection.into();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36352" PostHistoryTypeId="1" PostId="9175" RevisionGUID="621ac3b9-7f7c-4400-81dc-d5865c72176c" CreationDate="2023-07-06T06:54:40.347" UserId="2372" Text="Getting the Error of Empty for transferring NFT to another" ContentLicense="CC BY-SA 4.0" />
  <row Id="36353" PostHistoryTypeId="3" PostId="9175" RevisionGUID="621ac3b9-7f7c-4400-81dc-d5865c72176c" CreationDate="2023-07-06T06:54:40.347" UserId="2372" Text="|pallet|xcm|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36354" PostHistoryTypeId="5" PostId="9175" RevisionGUID="6daaf752-c6d1-4abc-a75d-a66778e32809" CreationDate="2023-07-06T06:58:29.017" UserId="354" Comment="added 6 characters in body; edited title" Text="I am attempting to convert the `NFT ID` into the form of `MultiAssets` in order to utilize `XCM` instructions for transferring it to another chain. However, I am only able to access the origin location and not the collection information.&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    let collection: MultiAssets = T::CollectionIdConvert::convert(collection_id).into();&#xD;&#xA;    let value = (origin_location,collection );&#xD;&#xA;    ensure!(T::XcmTeleportFilter::contains(&amp;value), Error::&lt;T,I&gt;::Filtered);&#xD;&#xA;	let assets: MultiAssets = collection.into();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36355" PostHistoryTypeId="4" PostId="9175" RevisionGUID="6daaf752-c6d1-4abc-a75d-a66778e32809" CreationDate="2023-07-06T06:58:29.017" UserId="354" Comment="added 6 characters in body; edited title" Text="Not able to transfer NFT from one chian to another using XCM" ContentLicense="CC BY-SA 4.0" />
  <row Id="36356" PostHistoryTypeId="5" PostId="9175" RevisionGUID="7dcb7504-3484-4cde-b4c6-efb39ac0bcb4" CreationDate="2023-07-06T07:09:42.530" UserId="2372" Comment="added 580 characters in body; edited title" Text="I am attempting to convert the NFT ID into the form of MultiAssets in order to utilize XCM instructions for transferring it to another chain. However, I am only able to access the origin location and not the collection information.&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    let collection: MultiAssets = T::CollectionIdConvert::convert(collection_id).into();&#xD;&#xA;    let value = (origin_location,collection );&#xD;&#xA;    ensure!(T::XcmTeleportFilter::contains(&amp;value), Error::&lt;T,I&gt;::Filtered);&#xD;&#xA;	let assets: MultiAssets = collection.into();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;By checking the log I'm able to check&#xD;&#xA;&#xD;&#xA;    MultiLocation {&#xD;&#xA;        parents: 0,&#xD;&#xA;        interior: X1(&#xD;&#xA;            AccountId32 {&#xD;&#xA;                network: Some(&#xD;&#xA;                    Rococo,&#xD;&#xA;                ),&#xD;&#xA;                id: [&#xD;&#xA;    28,189,45,67,83,10,68,112, 90, 208,136,175,49 62,24,248, 11,83,&#xD;&#xA;       239, 22, 179, 97, 119,205, 75, 119, 184,&#xD;&#xA;              70,&#xD;&#xA;                    242,&#xD;&#xA;                   &#xD;&#xA;                ],&#xD;&#xA;            },&#xD;&#xA;        ),&#xD;&#xA;    },&#xD;&#xA;    [],&#xD;&#xA;)  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BsslD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36357" PostHistoryTypeId="4" PostId="9175" RevisionGUID="7dcb7504-3484-4cde-b4c6-efb39ac0bcb4" CreationDate="2023-07-06T07:09:42.530" UserId="2372" Comment="added 580 characters in body; edited title" Text="Not able to transfer NFT from one chian to another using XCM" ContentLicense="CC BY-SA 4.0" />
  <row Id="36358" PostHistoryTypeId="5" PostId="9175" RevisionGUID="cde599c9-6b0c-4f1a-961e-db8876dd81a7" CreationDate="2023-07-06T07:15:45.603" UserId="2372" Comment="added 580 characters in body; edited title" Text="I am attempting to convert the NFT ID into the form of MultiAssets in order to utilize XCM instructions for transferring it to another chain. However, I am only able to access the origin location and not the collection information.&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    let collection: MultiAssets = T::CollectionIdConvert::convert(collection_id).into();&#xD;&#xA;    let value = (origin_location,collection );&#xD;&#xA;    ensure!(T::XcmTeleportFilter::contains(&amp;value), Error::&lt;T,I&gt;::Filtered);&#xD;&#xA;	let assets: MultiAssets = collection.into();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;By checking the log I'm able to check&#xD;&#xA;&#xD;&#xA;    MultiLocation {&#xD;&#xA;        parents: 0,&#xD;&#xA;        interior: X1(&#xD;&#xA;            AccountId32 {&#xD;&#xA;                network: Some(&#xD;&#xA;                    Rococo,&#xD;&#xA;                ),&#xD;&#xA;                id: [&#xD;&#xA;    28,189,45,67,83,10,68,112, 90, 208,136,175,49 62,24,248, 11,83,&#xD;&#xA;       239, 22, 179, 97, 119,205, 75, 119, 184, 70, 242,      &#xD;&#xA;                ] }, ), },&#xD;&#xA;    [],)  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And when i'm teleporting assets from one chain to another it is able to show the both the assets and multilocation. &#xD;&#xA;&#xD;&#xA;    MultiLocation {&#xD;&#xA;        parents: 0,&#xD;&#xA;        interior: X1(&#xD;&#xA;            AccountId32 {&#xD;&#xA;                network: Some(&#xD;&#xA;                    Rococo,&#xD;&#xA;                ),&#xD;&#xA;                id: [28, 189, 45,67,83,10,68, 112,90,208,136,175,&#xD;&#xA;                    49, 62, 24, 248,11, 83, 239, 22, 179, 97, 119,&#xD;&#xA;                    205,  75, 119, 184, 70, 242,165, 240, 124,&#xD;&#xA;                ],  }, ),},&#xD;&#xA;    [&#xD;&#xA;        MultiAsset {&#xD;&#xA;            id: Concrete(&#xD;&#xA;                MultiLocation {&#xD;&#xA;                    parents: 0,&#xD;&#xA;                    interior: Here,&#xD;&#xA;                },&#xD;&#xA;            ),&#xD;&#xA;            fun: Fungible(&#xD;&#xA;                1000000000000000,&#xD;&#xA;            ),&#xD;&#xA;        },&#xD;&#xA;    ],&#xD;&#xA;) &#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BsslD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36359" PostHistoryTypeId="5" PostId="9175" RevisionGUID="7a55a7cf-38e5-48ae-ac03-c31c7c65d94f" CreationDate="2023-07-06T07:25:11.260" UserId="2372" Comment="added 103 characters in body" Text="I am attempting to convert the NFT ID into the form of MultiAssets in order to utilize XCM instructions for transferring it to another chain. However, I am only able to access the origin location and not the collection information.&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    let collection: MultiAssets = T::CollectionIdConvert::convert(collection_id).into();&#xD;&#xA;    let value = (origin_location,collection );&#xD;&#xA;    ensure!(T::XcmTeleportFilter::contains(&amp;value), Error::&lt;T,I&gt;::Filtered);&#xD;&#xA;	let assets: MultiAssets = collection.into();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After examining the log, it is evident that the MultiAsset does not contain any collection ID.&#xD;&#xA;&#xD;&#xA;    MultiLocation {&#xD;&#xA;        parents: 0,&#xD;&#xA;        interior: X1(&#xD;&#xA;            AccountId32 {&#xD;&#xA;                network: Some(&#xD;&#xA;                    Rococo,&#xD;&#xA;                ),&#xD;&#xA;                id: [&#xD;&#xA;    28,189,45,67,83,10,68,112, 90, 208,136,175,49 62,24,248, 11,83,&#xD;&#xA;       239, 22, 179, 97, 119,205, 75, 119, 184, 70, 242,      &#xD;&#xA;                ] }, ), },&#xD;&#xA;    [],)  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And when i'm teleporting assets from one chain to another it is able to show the both the assets and multilocation. &#xD;&#xA;&#xD;&#xA;    MultiLocation {&#xD;&#xA;        parents: 0,&#xD;&#xA;        interior: X1(&#xD;&#xA;            AccountId32 {&#xD;&#xA;                network: Some(&#xD;&#xA;                    Rococo,&#xD;&#xA;                ),&#xD;&#xA;                id: [28, 189, 45,67,83,10,68, 112,90,208,136,175,&#xD;&#xA;                    49, 62, 24, 248,11, 83, 239, 22, 179, 97, 119,&#xD;&#xA;                    205,  75, 119, 184, 70, 242,165, 240, 124,&#xD;&#xA;                ],  }, ),},&#xD;&#xA;    [&#xD;&#xA;        MultiAsset {&#xD;&#xA;            id: Concrete(&#xD;&#xA;                MultiLocation {&#xD;&#xA;                    parents: 0,&#xD;&#xA;                    interior: Here,&#xD;&#xA;                },&#xD;&#xA;            ),&#xD;&#xA;            fun: Fungible(&#xD;&#xA;                1000000000000000,&#xD;&#xA;            ),&#xD;&#xA;        },&#xD;&#xA;    ],&#xD;&#xA;) &#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BsslD.png&#xD;&#xA;&#xD;&#xA;Can someone please guide me through this ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36360" PostHistoryTypeId="5" PostId="9175" RevisionGUID="602026d4-a6c3-447c-b0d9-43e87573a3d6" CreationDate="2023-07-06T07:32:07.073" UserId="2372" Comment="deleted 2 characters in body" Text="I am attempting to convert the NFT ID into the form of MultiAssets in order to utilize XCM instructions for transferring it to another chain. However, I am only able to access the origin location and not the collection information.&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    let collection: MultiAssets = T::CollectionIdConvert::convert(collection_id).into();&#xD;&#xA;    let value = (origin_location,collection );&#xD;&#xA;    ensure!(T::XcmTeleportFilter::contains(&amp;value), Error::&lt;T,I&gt;::Filtered);&#xD;&#xA;	let assets: MultiAssets = collection.into();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;After examining the log, it is evident that the MultiAsset does not contain any collection ID.&#xD;&#xA;&#xD;&#xA;    MultiLocation {&#xD;&#xA;        parents: 0,&#xD;&#xA;        interior: X1(&#xD;&#xA;            AccountId32 {&#xD;&#xA;                network: Some(&#xD;&#xA;                    Rococo,&#xD;&#xA;                ),&#xD;&#xA;                id: [ 28,189,45,67,83,10,68,112, 90, 208,136,175,49 &#xD;&#xA;                      62,24,248, 11,83,239, 22, 179, 97, 119,205, &#xD;&#xA;                      75, 119, 184, 70, 242,      &#xD;&#xA;                ] }, ), },&#xD;&#xA;    [],)  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And when i'm teleporting assets from one chain to another it is able to show the both the assets and multilocation. &#xD;&#xA;&#xD;&#xA;    MultiLocation {&#xD;&#xA;        parents: 0,&#xD;&#xA;        interior: X1(&#xD;&#xA;            AccountId32 {&#xD;&#xA;                network: Some(&#xD;&#xA;                    Rococo,&#xD;&#xA;                ),&#xD;&#xA;                id: [28, 189, 45,67,83,10,68, 112,90,208,136,175,&#xD;&#xA;                    49, 62, 24, 248,11, 83, 239, 22, 179, 97, 119,&#xD;&#xA;                    205,  75, 119, 184, 70, 242,165, 240, 124,&#xD;&#xA;                ],  }, ),},&#xD;&#xA;    [&#xD;&#xA;        MultiAsset {&#xD;&#xA;            id: Concrete(&#xD;&#xA;                MultiLocation {&#xD;&#xA;                    parents: 0,&#xD;&#xA;                    interior: Here,&#xD;&#xA;                },&#xD;&#xA;            ),&#xD;&#xA;            fun: Fungible(&#xD;&#xA;                1000000000000000,&#xD;&#xA;            ),&#xD;&#xA;        },&#xD;&#xA;    ],) &#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BsslD.png&#xD;&#xA;&#xD;&#xA;Can someone please guide me through this ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36361" PostHistoryTypeId="5" PostId="9175" RevisionGUID="290254dd-e524-4ef2-b2d2-554019465260" CreationDate="2023-07-06T07:46:51.340" UserId="2372" Comment="added 187 characters in body" Text="I am attempting to convert the NFT ID into the form of MultiAssets in order to utilize XCM instructions for transferring it to another chain. However, I am only able to access the origin location and not the collection information.&#xD;&#xA;	&#xD;&#xA;    let collection: MultiAssets T::CollectionIdConvert::convert(collection_id).into();&#xD;&#xA;&#xD;&#xA;    let value = (origin_location,collection );&#xD;&#xA;    ensure!(T::XcmTeleportFilter::contains(&amp;value), Error::&lt;T,I&gt;::Filtered);&#xD;&#xA;	let assets: MultiAssets = collection.into();&#xD;&#xA;&#xD;&#xA;I'm using this conversion because the collection id is not the type of MutliAssets.&#xD;&#xA;&#xD;&#xA;    type CollectionIdConvert: Convert&lt;Self::CollectionId, MultiAssets&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've added a log in the value&#xD;&#xA;&#xD;&#xA;After examining the log, it is evident that the MultiAsset does not contain any collection ID.&#xD;&#xA;&#xD;&#xA;    MultiLocation {&#xD;&#xA;        parents: 0,&#xD;&#xA;        interior: X1(&#xD;&#xA;            AccountId32 {&#xD;&#xA;                network: Some(&#xD;&#xA;                    Rococo,&#xD;&#xA;                ),&#xD;&#xA;                id: [ 28,189,45,67,83,10,68,112, 90, 208,136,175,49 &#xD;&#xA;                      62,24,248, 11,83,239, 22, 179, 97, 119,205, &#xD;&#xA;                      75, 119, 184, 70, 242,      &#xD;&#xA;                ] }, ), },&#xD;&#xA;    [],)  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And when i'm teleporting assets from one chain to another it is able to show the both the assets and multilocation. &#xD;&#xA;&#xD;&#xA;    MultiLocation {&#xD;&#xA;        parents: 0,&#xD;&#xA;        interior: X1(&#xD;&#xA;            AccountId32 {&#xD;&#xA;                network: Some(&#xD;&#xA;                    Rococo,&#xD;&#xA;                ),&#xD;&#xA;                id: [28, 189, 45,67,83,10,68, 112,90,208,136,175,&#xD;&#xA;                    49, 62, 24, 248,11, 83, 239, 22, 179, 97, 119,&#xD;&#xA;                    205,  75, 119, 184, 70, 242,165, 240, 124,&#xD;&#xA;                ],  }, ),},&#xD;&#xA;    [&#xD;&#xA;        MultiAsset {&#xD;&#xA;            id: Concrete(&#xD;&#xA;                MultiLocation {&#xD;&#xA;                    parents: 0,&#xD;&#xA;                    interior: Here,&#xD;&#xA;                },&#xD;&#xA;            ),&#xD;&#xA;            fun: Fungible(&#xD;&#xA;                1000000000000000,&#xD;&#xA;            ),&#xD;&#xA;        },&#xD;&#xA;    ],) &#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BsslD.png&#xD;&#xA;&#xD;&#xA;Can someone please guide me through this ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36362" PostHistoryTypeId="4" PostId="9175" RevisionGUID="290254dd-e524-4ef2-b2d2-554019465260" CreationDate="2023-07-06T07:46:51.340" UserId="2372" Comment="added 187 characters in body" Text="Not able to transfer NFT from one chain to another using XCM" ContentLicense="CC BY-SA 4.0" />
  <row Id="36363" PostHistoryTypeId="2" PostId="9176" RevisionGUID="f0cefc09-1d4f-4471-916c-6fc58c8f65aa" CreationDate="2023-07-06T09:28:04.660" UserId="2762" Text="I have my hex public key, how can I convert it to an SS58 Address?&#xD;&#xA;&#xD;&#xA;I have found the snippet to do it using PolkadotJS here: [How to convert Public key (hex) to SS58 Address in JavaScript / Polkadot-JS?][1] simply using `const { encodeAddress } = require(&quot;@polkadot/keyring&quot;);`&#xD;&#xA;&#xD;&#xA;Is there a similar way to do that in Rust?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/787/how-to-convert-public-key-hex-to-ss58-address-in-javascript-polkadot-js&#xD;&#xA;  [2]: https://stackoverflow.com/questions/60983883/how-to-encode-the-hex-string-representation-of-an-account-id-in-substrate-using" ContentLicense="CC BY-SA 4.0" />
  <row Id="36365" PostHistoryTypeId="1" PostId="9176" RevisionGUID="f0cefc09-1d4f-4471-916c-6fc58c8f65aa" CreationDate="2023-07-06T09:28:04.660" UserId="2762" Text="Get SS58 Address from public key" ContentLicense="CC BY-SA 4.0" />
  <row Id="36366" PostHistoryTypeId="3" PostId="9176" RevisionGUID="f0cefc09-1d4f-4471-916c-6fc58c8f65aa" CreationDate="2023-07-06T09:28:04.660" UserId="2762" Text="|rust|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36367" PostHistoryTypeId="2" PostId="9177" RevisionGUID="000c12ff-301f-4840-bcd9-d38301c1aec5" CreationDate="2023-07-06T09:32:26.723" UserId="3109" Text="Yes, there is a similar way to do that in Rust. You can use the `ss58` crate. Here is an example of how to convert a hex public key to an SS58 address in Rust:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use ss58::{encode, AddressFormat};&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    let hex_public_key = &quot;0x46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&quot;;&#xD;&#xA;    let ss58_address = encode(hex_public_key, AddressFormat::Polkadot);&#xD;&#xA;&#xD;&#xA;    println!(&quot;SS58 address: {}&quot;, ss58_address);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This code will first create a `String` containing the hex public key. Then, it will use the `encode` function from the `ss58` crate to convert the hex public key to an SS58 address. The `encode` function takes two arguments: the hex public key and the address format. In this case, we are using the `AddressFormat::Polkadot` address format.&#xD;&#xA;&#xD;&#xA;Finally, the code will print the SS58 address to the console.&#xD;&#xA;&#xD;&#xA;To run this code, you will need to install the `ss58` crate. You can do this by running the following command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo install ss58&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Once you have installed the `ss58` crate, you can run the code by running the following command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo run&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will print the SS58 address to the console." ContentLicense="CC BY-SA 4.0" />
  <row Id="36371" PostHistoryTypeId="5" PostId="9177" RevisionGUID="7fa6c505-7e86-47a9-8314-40b130952d90" CreationDate="2023-07-06T09:55:40.383" UserId="3109" Comment="Changes" Text="Yes, there is a similar way to do that in Rust. You can use the `sp_core` crate. Here is an example of how to convert a hex public key to an SS58 address in Rust:&#xD;&#xA;&#xD;&#xA;you can use the `sp_core` crate, which is part of the Substrate framework, to perform this conversion in Rust. Here's an example of how to achieve it:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;extern crate sp_core;&#xD;&#xA;&#xD;&#xA;use sp_core::crypto::Ss58Codec;&#xD;&#xA;&#xD;&#xA;fn main() {&#xD;&#xA;    let hex_public_key = &quot;46ebddef8cd9bb167dc30878d7113b7e168e6f0646beffd77d69d39bad76b47a&quot;;&#xD;&#xA;    let public_key = hex::decode(hex_public_key).expect(&quot;Failed to decode hex public key&quot;);&#xD;&#xA;    let ss58_address = sp_core::crypto::AccountId32::from(public_key.as_slice()).to_ss58check();&#xD;&#xA;&#xD;&#xA;    println!(&quot;SS58 address: {}&quot;, ss58_address);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Ensure you have the `sp-core` crate added as a dependency in your `Cargo.toml` file:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[dependencies]&#xD;&#xA;sp-core = &quot;2.0&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this example, we decode the hex public key using `hex::decode` assuming you have the `hex` crate as a dependency as well. Then, we create an `AccountId32` instance using `sp_core::crypto::AccountId32::from` by passing the decoded public key as a slice.&#xD;&#xA;&#xD;&#xA;Finally, we use the `to_ss58check` method on the `AccountId32` instance to obtain the SS58 address representation.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36373" PostHistoryTypeId="2" PostId="9179" RevisionGUID="2fab630f-ad3f-4cf8-845f-6311be3e8b86" CreationDate="2023-07-06T10:11:53.397" UserId="2281" Text="You can use this [tool][1] to get ss58 from your Public key(Hex) you may also check [this][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://snow-address-converter.netlify.app/&#xD;&#xA;  [2]: https://polkadot.subscan.io/tools/format_transform?input=0xa45dfaccf0fca1062703dda957076c26cf5c6feb11d8240b6d646916a8c05277&amp;type=All" ContentLicense="CC BY-SA 4.0" />
  <row Id="36375" PostHistoryTypeId="5" PostId="9159" RevisionGUID="147e8ea5-6450-423f-b452-2ba3e5cb296d" CreationDate="2023-07-06T10:30:26.810" UserId="354" Comment="added 1305 characters in body" Text="Substrate provides a [FRAME][1] based blockchain system for adding custom pallets to make a application specific blockchain. To achieve this a custom runtime is also required which will interact with custom pallet.&#xD;&#xA;&#xD;&#xA;&gt; How node and runtime are connected?&#xD;&#xA;&#xD;&#xA;You can find connection between node and runtime by going through [node/src/service.rs][2] and [node/src/chain_spec.rs][3] file, `service.rs` file contains the logic for the spawn of the network and `chain_spec.rs` file contains the genesis configuration for the chain.&#xD;&#xA;&#xD;&#xA;____________________________________________________________________&#xD;&#xA;&#xD;&#xA;[Here][4] you can see the type `FullClient` is taking `RuntimeApi` as one of its generic input as you can see in below code snippet. &#xD;&#xA;&#xD;&#xA;    pub(crate) type FullClient =&#xD;&#xA;    	sc_service::TFullClient&lt;Block, RuntimeApi, NativeElseWasmExecutor&lt;ExecutorDispatch&gt;&gt;;&#xD;&#xA;&#xD;&#xA;Than this is used by[spawn_tasks][5] `client` field, you can find `spawn_tasks` definition [here][6], there is a method [gen_rpc_module][7] in `spawn_tasks` which than is using the client to as its input and you can find its definition [here][8]. I hope this helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/quick-start/substrate-at-a-glance/#what-is-frame&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/service.rs&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/substrate-node-template/blob/87b1b4728e29f68c6b2bafde7f3d0f4c8af9b302/node/src/service.rs#L33-L34&#xD;&#xA;  [5]: https://github.com/substrate-developer-hub/substrate-node-template/blob/87b1b4728e29f68c6b2bafde7f3d0f4c8af9b302/node/src/service.rs#L208&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/c32f5ed2ae6746d6f791f08cecbfc22fa188f5f9/client/service/src/builder.rs#L404-L550&#xD;&#xA;  [7]: https://github.com/paritytech/substrate/blob/c32f5ed2ae6746d6f791f08cecbfc22fa188f5f9/client/service/src/builder.rs#L518C6-L530&#xD;&#xA;  [8]: https://github.com/paritytech/substrate/blob/c32f5ed2ae6746d6f791f08cecbfc22fa188f5f9/client/service/src/builder.rs#L618-L730" ContentLicense="CC BY-SA 4.0" />
  <row Id="36380" PostHistoryTypeId="2" PostId="9181" RevisionGUID="a7bd9d25-7651-4ba8-aa7a-bc9d910aca34" CreationDate="2023-07-06T10:47:43.953" UserId="3414" Text="I was working on `Xcm` functionality and using the function `limitedTeleportAsset` to transfer assets from one parachain to another parachain. I performed `runtime upgrade` in one parachain and suddenly that parachain stopped producing blocks. Is there any way to recover the parachain, so that i need not start it again." ContentLicense="CC BY-SA 4.0" />
  <row Id="36382" PostHistoryTypeId="1" PostId="9181" RevisionGUID="a7bd9d25-7651-4ba8-aa7a-bc9d910aca34" CreationDate="2023-07-06T10:47:43.953" UserId="3414" Text="How to recover a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36383" PostHistoryTypeId="3" PostId="9181" RevisionGUID="a7bd9d25-7651-4ba8-aa7a-bc9d910aca34" CreationDate="2023-07-06T10:47:43.953" UserId="3414" Text="|polkadot|parachain|xcm|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36384" PostHistoryTypeId="2" PostId="9182" RevisionGUID="100d3518-fd97-4151-afae-6b24ab95777d" CreationDate="2023-07-06T10:52:17.570" UserId="3136" Text="Please examine the logs in your terminal to investigate any potential issues related to receiving messages between chains. Specifically, ensure that there are no delays or obstacles impacting the message reception process. It appears that the event displayed on the screen indicates successful receipt of the message, but there may be an underlying problem preventing the execution of the corresponding instruction. &#xD;&#xA;&#xD;&#xA;Ensure that you carefully verify the weights you are utilizing to execute the function. It is crucial to confirm that the assigned weights are accurate and aligned with the intended execution of the function." ContentLicense="CC BY-SA 4.0" />
  <row Id="36386" PostHistoryTypeId="2" PostId="9183" RevisionGUID="80c1b461-46bf-46fa-a934-6287ef98bf54" CreationDate="2023-07-06T10:58:09.663" UserId="3414" Text="I connected two parachains with Relay chain. While working on `xcm` functionality, I discovered that block time of parachain changes. `Generally` block time of parachain in `parachain-node-template` is `12 sec`. Now I saw that sometimes the `block time` of parachain is `6 sec` and sometimes its `more than 12 sec`. All the transactions are executing successfully. Could anyone guide me why the block time in parachain keep on changing." ContentLicense="CC BY-SA 4.0" />
  <row Id="36388" PostHistoryTypeId="1" PostId="9183" RevisionGUID="80c1b461-46bf-46fa-a934-6287ef98bf54" CreationDate="2023-07-06T10:58:09.663" UserId="3414" Text="Unpredicatable Block time in parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36389" PostHistoryTypeId="3" PostId="9183" RevisionGUID="80c1b461-46bf-46fa-a934-6287ef98bf54" CreationDate="2023-07-06T10:58:09.663" UserId="3414" Text="|polkadot|parachain|xcm|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36390" PostHistoryTypeId="5" PostId="9181" RevisionGUID="8d369529-630f-4659-a0be-7dab9b825175" CreationDate="2023-07-06T10:58:59.810" UserId="3414" Comment="added 4 characters in body" Text="I was working on `Xcm` functionality and using the function `limitedTeleportAsset` to transfer assets from one parachain to another parachain. I performed `runtime upgrade` in one parachain and suddenly that parachain `stopped` producing blocks. Is there any way to `recover the parachain`, so that i need not start it again." ContentLicense="CC BY-SA 4.0" />
  <row Id="36391" PostHistoryTypeId="2" PostId="9184" RevisionGUID="f325a457-840c-43d4-a010-d897cf1767f6" CreationDate="2023-07-06T11:06:48.570" UserId="3136" Text="You need to enable the Teleportation [here][1]. in your code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/parity-bridges-common/blob/master/bin/millau/runtime/src/xcm_config.rs#L125&#xD;&#xA;  [2]: https://github.com/paritytech/parity-bridges-common/blob/master/bin/millau/runtime/src/xcm_config.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="36394" PostHistoryTypeId="2" PostId="9185" RevisionGUID="c31fc5cc-a001-4b23-a7be-ffb5e16bf3dd" CreationDate="2023-07-06T11:52:00.950" UserId="2424" Text="It has been fixed. The reason for the error is that the number of pallets in the runtime exceeds the limit. See [here](https://github.com/paritytech/substrate/blob/9762613a130235317467f66d6e6f46bfa30a5674/frame/support/src/lib.rs#L26).[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3zEdE.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36396" PostHistoryTypeId="5" PostId="8517" RevisionGUID="f6453265-8833-4dfc-a87d-d24e41e2e68c" CreationDate="2023-07-06T12:13:53.407" UserId="3414" Comment="deleted 3 characters in body" Text="I'm trying to integrate Fellowship in this [PR](https://github.com/bifrost-finance/bifrost/pull/972/files#diff-d95a0d9c89d0dbeca1ef180360379f0258ced158f3c72626ae5723a5f37d7ea3R1801) according to &lt;https://github.com/paritytech/polkadot/pull/5205&gt;,&#xD;&#xA;but when I run `make check-all` it gives the following error:&#xD;&#xA;```rs&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `(frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_indices::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, parachain_staking::Pallet&lt;Runtime&gt;, pallet_democracy::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_collective::Pallet&lt;Runtime, Instance2&gt;, pallet_elections_phragmen::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_conviction_voting::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime, Instance2&gt;, pallet_ranked_collective::Pallet&lt;Runtime, Instance1&gt;, governance::origins::custom_origins::Pallet&lt;Runtime&gt;, pallet_whitelist::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_proxy::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, bifrost_vesting::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_bounties::Pallet&lt;Runtime&gt;, pallet_tips::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, orml_tokens::Pallet&lt;Runtime&gt;, orml_currencies::Pallet&lt;Runtime&gt;, orml_unknown_tokens::Pallet&lt;Runtime&gt;, orml_xcm::Pallet&lt;Runtime&gt;, zenlink_protocol::Pallet&lt;Runtime&gt;, merkle_distributor::Pallet&lt;Runtime&gt;, zenlink_stable_amm::Pallet&lt;Runtime&gt;, zenlink_swap_router::Pallet&lt;Runtime&gt;, bifrost_flexible_fee::Pallet&lt;Runtime&gt;, bifrost_salp::Pallet&lt;Runtime&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance2&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance1&gt;, bifrost_token_issuer::Pallet&lt;Runtime&gt;, bifrost_lightening_redeem::Pallet&lt;Runtime&gt;, bifrost_salp_lite::Pallet&lt;Runtime&gt;, bifrost_call_switchgear::Pallet&lt;Runtime&gt;, bifrost_vsbond_auction::Pallet&lt;Runtime&gt;, bifrost_asset_registry::Pallet&lt;Runtime&gt;, bifrost_vtoken_minting::Pallet&lt;Runtime&gt;, bifrost_slp::Pallet&lt;Runtime&gt;, xcm_interface::Pallet&lt;Runtime&gt;, bifrost_vstoken_conversion::Pallet&lt;Runtime&gt;, bifrost_farming::Pallet&lt;Runtime&gt;, bifrost_system_staking::Pallet&lt;Runtime&gt;, bifrost_system_maker::Pallet&lt;Runtime&gt;, bifrost_fee_share::Pallet&lt;Runtime&gt;, bifrost_cross_in_out::Pallet&lt;Runtime&gt;): PalletsInfoAccess` is not satisfied    --&gt; runtime/bifrost-kusama/src/xcm_config.rs:596:29&#xD;&#xA;    | 596 |     type PalletInstancesInfo = AllPalletsWithSystem;&#xD;&#xA;    |                                ^^^^^^^^^^^^^^^^^^^^ the trait `PalletsInfoAccess` is not implemented for `(frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_indices::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, parachain_staking::Pallet&lt;Runtime&gt;, pallet_democracy::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_collective::Pallet&lt;Runtime, Instance2&gt;, pallet_elections_phragmen::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_conviction_voting::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime, Instance2&gt;, pallet_ranked_collective::Pallet&lt;Runtime, Instance1&gt;, governance::origins::custom_origins::Pallet&lt;Runtime&gt;, pallet_whitelist::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_proxy::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, bifrost_vesting::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_bounties::Pallet&lt;Runtime&gt;, pallet_tips::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, orml_tokens::Pallet&lt;Runtime&gt;, orml_currencies::Pallet&lt;Runtime&gt;, orml_unknown_tokens::Pallet&lt;Runtime&gt;, orml_xcm::Pallet&lt;Runtime&gt;, zenlink_protocol::Pallet&lt;Runtime&gt;, merkle_distributor::Pallet&lt;Runtime&gt;, zenlink_stable_amm::Pallet&lt;Runtime&gt;, zenlink_swap_router::Pallet&lt;Runtime&gt;, bifrost_flexible_fee::Pallet&lt;Runtime&gt;, bifrost_salp::Pallet&lt;Runtime&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance2&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance1&gt;, bifrost_token_issuer::Pallet&lt;Runtime&gt;, bifrost_lightening_redeem::Pallet&lt;Runtime&gt;, bifrost_salp_lite::Pallet&lt;Runtime&gt;, bifrost_call_switchgear::Pallet&lt;Runtime&gt;, bifrost_vsbond_auction::Pallet&lt;Runtime&gt;, bifrost_asset_registry::Pallet&lt;Runtime&gt;, bifrost_vtoken_minting::Pallet&lt;Runtime&gt;, bifrost_slp::Pallet&lt;Runtime&gt;, xcm_interface::Pallet&lt;Runtime&gt;, bifrost_vstoken_conversion::Pallet&lt;Runtime&gt;, bifrost_farming::Pallet&lt;Runtime&gt;, bifrost_system_staking::Pallet&lt;Runtime&gt;, bifrost_system_maker::Pallet&lt;Runtime&gt;, bifrost_fee_share::Pallet&lt;Runtime&gt;, bifrost_cross_in_out::Pallet&lt;Runtime&gt;)`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `PalletsInfoAccess`:&#xD;&#xA;              ()&#xD;&#xA;              (TupleElement0, TupleElement1)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)&#xD;&#xA;              (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)&#xD;&#xA;            and 57 others note: required by a bound in `xcm_executor::Config::PalletInstancesInfo`    --&gt; /home/yml/.cargo/git/checkouts/polkadot-4038f27d5e4ea2e8/097ffd2/xcm/xcm-executor/src/config.rs:80:28&#xD;&#xA;    | 80  |     type PalletInstancesInfo: PalletsInfoAccess;&#xD;&#xA;    |                               ^^^^^^^^^^^^^^^^^ required by this bound in `xcm_executor::Config::PalletInstancesInfo`&#xD;&#xA;&#xD;&#xA;    Checking polkadot-client v0.9.38 (https://github.com/paritytech/polkadot?branch=release-v0.9.38#097ffd24) error[E0277]: the trait bound `(frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_indices::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, parachain_staking::Pallet&lt;Runtime&gt;, pallet_democracy::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_collective::Pallet&lt;Runtime, Instance2&gt;, pallet_elections_phragmen::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_conviction_voting::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime&gt;, pallet_referenda::Pallet&lt;Runtime, Instance2&gt;, pallet_ranked_collective::Pallet&lt;Runtime, Instance1&gt;, governance::origins::custom_origins::Pallet&lt;Runtime&gt;, pallet_whitelist::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_proxy::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, bifrost_vesting::Pallet&lt;Runtime&gt;, pallet_treasury::Pallet&lt;Runtime&gt;, pallet_bounties::Pallet&lt;Runtime&gt;, pallet_tips::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, orml_tokens::Pallet&lt;Runtime&gt;, orml_currencies::Pallet&lt;Runtime&gt;, orml_unknown_tokens::Pallet&lt;Runtime&gt;, orml_xcm::Pallet&lt;Runtime&gt;, zenlink_protocol::Pallet&lt;Runtime&gt;, merkle_distributor::Pallet&lt;Runtime&gt;, zenlink_stable_amm::Pallet&lt;Runtime&gt;, zenlink_swap_router::Pallet&lt;Runtime&gt;, bifrost_flexible_fee::Pallet&lt;Runtime&gt;, bifrost_salp::Pallet&lt;Runtime&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance2&gt;, bifrost_liquidity_mining::Pallet&lt;Runtime, Instance1&gt;, bifrost_token_issuer::Pallet&lt;Runtime&gt;, bifrost_lightening_redeem::Pallet&lt;Runtime&gt;, bifrost_salp_lite::Pallet&lt;Runtime&gt;, bifrost_call_switchgear::Pallet&lt;Runtime&gt;, bifrost_vsbond_auction::Pallet&lt;Runtime&gt;, bifrost_asset_registry::Pallet&lt;Runtime&gt;, bifrost_vtoken_minting::Pallet&lt;Runtime&gt;, bifrost_slp::Pallet&lt;Runtime&gt;, xcm_interface::Pallet&lt;Runtime&gt;, bifrost_vstoken_conversion::Pallet&lt;Runtime&gt;, bifrost_farming::Pallet&lt;Runtime&gt;, bifrost_system_staking::Pallet&lt;Runtime&gt;, bifrost_system_maker::Pallet&lt;Runtime&gt;, bifrost_fee_share::Pallet&lt;Runtime&gt;, bifrost_cross_in_out::Pallet&lt;Runtime&gt;): OnGenesis` is not satisfied&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36397" PostHistoryTypeId="5" PostId="7730" RevisionGUID="1c672a8b-7403-40ce-876c-a32650abdf93" CreationDate="2023-07-06T12:14:58.250" UserId="3414" Comment="added 2 characters in body" Text="I'm working on the parity-bridges-common where i was not enable to send assets from one chain to another. &#xD;&#xA;&#xD;&#xA;I'm giving instruction of teleportation from one chain to another and it is showing me success[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;And the event came to source chain explorer&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But in the another chain it is showing this event. But it is not showing any xcm related messages neither it is transferring the tokens&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/PDdx5.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/j61is.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/4rb8o.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36398" PostHistoryTypeId="5" PostId="6441" RevisionGUID="d8e8ff74-01ac-452f-8154-25e1fca0489c" CreationDate="2023-07-06T12:16:06.573" UserId="3414" Comment="deleted 1 character in body" Text="We have successfully created the HRMP channel between two parachains and a relay chain.We want to transfer assets from one parachain(p1) to another parachain(P2), the channel is created from P1 to P2 (P1 ---&gt; P2). For now we have observed that the assets are been transferred from sovereign account of P1 to sovereign account of P2, but what I want is the assets transfer between two parachains rather than two sovereign accounts.&#xD;&#xA;&#xD;&#xA;The tutorial that I had followed [Tranfer Assets with XCM tranfers][1],&#xD;&#xA;so how to achieve the message transfer between two parachains?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/transfer-assets-with-xcm/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36399" PostHistoryTypeId="5" PostId="7555" RevisionGUID="94591402-4700-4337-9a39-e1fce05627dc" CreationDate="2023-07-06T12:17:24.197" UserId="3414" Comment="deleted 4 characters in body" Text="I was making parity-bridges-common compatible to the stable version of `polkadot-v0.9.32`. I'm getting the error:&#xD;&#xA;```error&#xD;&#xA;expected struct Weight , found integer.&#xD;&#xA;``` &#xD;&#xA;Because earlier the weight in the frame-support was u64 but now it`s struct Weight&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;struct Weight&#xD;&#xA; {&#xD;&#xA;	#[codec(compact)]&#xD;&#xA;	/// The weight of computational time used based on some reference hardware.&#xD;&#xA;	ref_time: u64,&#xD;&#xA;	#[codec(compact)]&#xD;&#xA;	/// The weight of storage space used by proof of validity.&#xD;&#xA;	proof_size: u64,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can someone please guide me through this.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/S9u3J.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36400" PostHistoryTypeId="5" PostId="7552" RevisionGUID="722ac0f1-e7ec-4a56-80a8-483c21d2edb9" CreationDate="2023-07-06T12:17:41.047" UserId="3414" Comment="deleted 4 characters in body" Text="I was working with parity-bridges-common from the parity but i'm facing issues during the transfer of native tokens and i'm not able to send a custom message to the relay chain from solo-chain. &#xD;&#xA;&#xD;&#xA;Can anyone please guide me through this ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36401" PostHistoryTypeId="5" PostId="7262" RevisionGUID="a1cd5e95-1baa-493e-a856-b01e26f095c9" CreationDate="2023-07-06T12:17:59.587" UserId="3414" Comment="deleted 4 characters in body" Text="I've been working on data migration from the existing solo chain to the Relay Chain. I've already fetched most of the data but i need to know about fetching the blocks. Is there any way to fetch the blocks too, and add them in the new chain. &#xD;&#xA;     " ContentLicense="CC BY-SA 4.0" />
  <row Id="36402" PostHistoryTypeId="5" PostId="8824" RevisionGUID="d6f2408f-c91e-43ac-8982-6fc33cc3ad9e" CreationDate="2023-07-06T12:18:59.117" UserId="3414" Comment="deleted 8 characters in body" Text="I want to generate a `customSpec.json` where i can manually add the accounts of the `initial_nominators`. I've seen the code [chain_spec.rs][1] where we in the [fn testnet_genesis][2] there is initial nominators. How can we add this in `customSpec.json`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L242" ContentLicense="CC BY-SA 4.0" />
  <row Id="36403" PostHistoryTypeId="5" PostId="8993" RevisionGUID="e0db5321-cbea-4cb8-af91-5c7e5dd93834" CreationDate="2023-07-06T12:19:54.073" UserId="3414" Comment="deleted 12 characters in body" Text="I want to transfer NFTs between a relay chain and a parachain. Does anyone have any knowledge or ideas about how to accomplish this&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36404" PostHistoryTypeId="5" PostId="7114" RevisionGUID="a152b2d5-d1b0-4408-8dfc-6e55eb0a8c0a" CreationDate="2023-07-06T12:21:28.130" UserId="3414" Comment="added 5 characters in body" Text="I'm trying to migrate data from one existing solo chain to relay chain. How should I achieve it?&#xD;&#xA;I`m taking ideas from Centrifuse chain which is migrating accounts and their balances, proxy,and vesting. But i need to migrate staking ledger,contracts DeletionQueue, and  Contracts ContractInfoOf . &#xD;&#xA;&#xD;&#xA;Please guide me through this migration " ContentLicense="CC BY-SA 4.0" />
  <row Id="36405" PostHistoryTypeId="5" PostId="8535" RevisionGUID="f6a2c566-1857-4a6f-88f2-d25278bab4b8" CreationDate="2023-07-06T12:22:00.030" UserId="3414" Comment="added 3 characters in body" Text="I've added  new amiquip dependency in the cargo.toml &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;sender&quot;&#xD;&#xA;    version = &quot;0.1.0&quot;&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    &#xD;&#xA;    [package.metadata.docs.rs]&#xD;&#xA;    targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.0.0&quot;, default-features = false, features = [&#xD;&#xA;    	&quot;derive&quot;,&#xD;&#xA;    ] }&#xD;&#xA;    amiquip = { version = &quot;0.4&quot;, default-features = false, optional = true }&#xD;&#xA;    scale-info = { version = &quot;2.1.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [dev-dependencies]&#xD;&#xA;    sp-core = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-io = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    sp-runtime = { version = &quot;6.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.32&quot; }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&quot;codec/std&quot;, &quot;frame-benchmarking?/std&quot;,&#xD;&#xA;    &quot;amiquip&quot;,&#xD;&#xA;     &quot;frame-support/std&quot;, &#xD;&#xA;     &quot;frame-system/std&quot;,&#xD;&#xA;      &quot;scale-info/std&quot;]&#xD;&#xA;    runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;    try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; But it still showing me this error use of &quot;undeclared crate or module&#xD;&#xA;&gt; `amiquip`&quot;. I've also tried extern crate amiquip. But it didn't work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Xv9hd.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36406" PostHistoryTypeId="5" PostId="8549" RevisionGUID="1cd323e7-48bb-4bb5-ac1e-eb5df6a5edec" CreationDate="2023-07-06T12:22:40.543" UserId="3414" Comment="deleted 6 characters in body" Text="I was running my substrate-blockchain on dev mode. And it gave me this error.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/K19d9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36407" PostHistoryTypeId="5" PostId="7600" RevisionGUID="d265c2e6-ca9b-4c9b-99c9-99ff78716bc0" CreationDate="2023-07-06T12:23:09.047" UserId="3414" Comment="deleted 3 characters in body" Text="Whenever i send one custom message provided by parity through this command &#xD;&#xA;&#xD;&#xA;./target/debug/substrate-relay send-message millau-to-rialto \&#xD;&#xA;	--source-host localhost \&#xD;&#xA;	--source-port $MILLAU_PORT \&#xD;&#xA;	--source-signer //Alice \&#xD;&#xA;	raw 020419ac&#xD;&#xA;&#xD;&#xA;It has been executing the three things&#xD;&#xA;1: Xcmpallet.Sent&#xD;&#xA;2: bridgeRialtoMessages.MessageAccepted&#xD;&#xA;3: xcmPallet.FeesPaid&#xD;&#xA;&#xD;&#xA;But how can i send a message through the XCM instruction from explorer only rather than from terminal . Can someone please guide me through this&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6sGDK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36408" PostHistoryTypeId="5" PostId="6535" RevisionGUID="d716d6c3-c522-46f8-9090-9d20220516e5" CreationDate="2023-07-06T12:23:30.337" UserId="3414" Comment="added 1 character in body" Text="When I'm sending assets from relay chain to a parachain by using Limited Teleport assets. I`m facing this issue [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/4sSUv.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36409" PostHistoryTypeId="5" PostId="8973" RevisionGUID="f85ce8ac-e3ca-48cc-ae7e-2bd3f8c24a4a" CreationDate="2023-07-06T12:23:55.360" UserId="3414" Comment="deleted 5 characters in body" Text="When I start my node in the M2, it is continuously showing this error&#xD;&#xA;&#xD;&#xA;.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CJgJm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36410" PostHistoryTypeId="5" PostId="9064" RevisionGUID="1d90956f-b197-4dbf-8469-ac17fe09124c" CreationDate="2023-07-06T12:24:45.733" UserId="3414" Comment="added 1 character in body" Text="I'm going through the xcm and stumbled on junciton `PalletInstance`, and was wondering how to use it.&#xD;&#xA;I have 2 questions here:&#xD;&#xA;&#xD;&#xA; 1. Will I be able to call extrinsics of other chain via XCM?&#xD;&#xA; 2. Will I be able to modify the storage of a pallet on other chain?&#xD;&#xA;&#xD;&#xA;If someone could clarify the same ,it would be very helpful, and point to the relevant resources to read about it." ContentLicense="CC BY-SA 4.0" />
  <row Id="36411" PostHistoryTypeId="5" PostId="8859" RevisionGUID="7f7cdd0f-dd15-4ddf-8a67-83cecf1e8834" CreationDate="2023-07-06T12:25:19.290" UserId="3414" Comment="deleted 4 characters in body" Text="[![Screenshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/tpuW4.png&#xD;&#xA;&#xD;&#xA;I've added `pallet-nft` and `pallet-uniques` in Relay Chain. All the things are working fine but when I'm signing the transaction in the `pallet-uniques` `fn create(collection,admin)`, it is showing me this error:&#xD;&#xA;&#xD;&#xA;&gt; 1002: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm unreachable instruction executed WASM backtrace: 0: 0x547257 - &lt;unknown&gt;!rust_begin_unwind 1: 0x54ee - &lt;unknown&gt;!core::panicking::panic_fmt::hca80ede79c2b9c5b 2: 0x29ff1c - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction : RuntimeApi, Execution failed: Execution aborted due to trap: wasm trap: wasm unreachable instruction executed\nWASM backtrace:\n\n 0: 0x547257 - &lt;unknown&gt;!rust_begin_unwind\n 1: 0x54ee " ContentLicense="CC BY-SA 4.0" />
  <row Id="36412" PostHistoryTypeId="52" PostId="9172" RevisionGUID="b70f8b5b-fb53-4d4b-9e82-42379613b10f" CreationDate="2023-07-06T12:30:13.293" />
  <row Id="36417" PostHistoryTypeId="5" PostId="9168" RevisionGUID="91662253-109d-43ac-8b3a-647af4196ae1" CreationDate="2023-07-06T14:01:33.987" UserId="2445" Comment="Updated the logs with a more verbose log additionally containing: basic-authorship and txpool." Text="We have the weird case that extrinsics in general work, but there is a specific extrinsic that stalls the parachain. See https://github.com/integritee-network/parachain/issues/222. This extrinsic sends a UMP-message to the relay chain requesting a slot swap.&#xD;&#xA;&#xD;&#xA;Here are the logs with &#xD;&#xA;* `-lparachain::collation-generation=trace`&#xD;&#xA;* `-lparachain::approval-distribution=trace`&#xD;&#xA;* `-lparachain::collator-protocol=trace`&#xD;&#xA;* `-lbasic-authorship=trace -ltxpool=trace`&#xD;&#xA;&#xD;&#xA;https://gist.github.com/clangenb/134b993a11e14f24f54893e08c86d959&#xD;&#xA;&#xD;&#xA;Even more interesting, from these logs we can see that the collation was successful, and that that the collator's relay chain accepted it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; cumulus-collator: [Parachain] Starting collation. relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb at=0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.595  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.600  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 7823 (2 ms) [hash: 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca; parent_hash: 0x0266…1ef0; extrinsics (3): [0xcaec…3897, 0x470b…e13b, 0x1f79…cc15]]&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 7, ValidatorIndex(72)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an assignment to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae claimed_candidate_index=7 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.607  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 7823. Hash now 0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc, previously 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca.&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1796875kb, extrinsics: 5.7197265625kb, storage_proof: 9.3466796875kb }&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #7823 (0x78a4…7acc)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 9.5498046875kb&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb para_id=2267 traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=31556&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=2267 relay_parent=0xf0bf…9ddb candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 core=CoreIndex(41) current_validators=[Public(dea7cae27e5dfb239a7ca5fb0649568b57afc08ed2ec5e538d4a3abb786fbc3c (5H6eLEHx...)), Public(fcf408d2b46082efffea4ddd78d114e021439b47d4a5848e15f6d3e5eca44c2e (5HnNRAfr...)), Public(4c0e2bd29d0d14bf81da32c79492dbc2bd97a594f34c982047b8a2ee4d035865 (5DnRhudq...)), Public(3a56f3c36ae08f7cfdeea6d340aa45ebd6b379f47267ca78837749054dec7b03 (5DPCTuQm...)), Public(e6e40731962e2834867cc4f482308cc34e4579ee1a5e1667c3ec36d96b36a971 (5HHScHPf...))] traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.618 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing approvals from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked approval peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 9, ValidatorIndex(147)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an approval to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae candidate_index=9 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 10, ValidatorIndex(178)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The collator runs on `polkadot-v0.9.42`&#xD;&#xA;The runtime runs on `polkadot-v0.9.37`: https://github.com/integritee-network/parachain/tree/1.5.35/polkadot-parachains/shell-runtime&#xD;&#xA;&#xD;&#xA;It happens with the live Kusama network.&#xD;&#xA;&#xD;&#xA;**Edit:** Updated the logs with a more verbose log additionally containing: basic-authorship and txpool." ContentLicense="CC BY-SA 4.0" />
  <row Id="36418" PostHistoryTypeId="5" PostId="9168" RevisionGUID="dc381a15-faff-458b-bdb0-54ee341c29ec" CreationDate="2023-07-06T14:12:01.380" UserId="2445" Comment="added 181 characters in body" Text="We have the weird case that extrinsics in general work, but there is a specific extrinsic that stalls the parachain. See https://github.com/integritee-network/parachain/issues/222. This extrinsic sends a UMP-message to the relay chain requesting a slot swap.&#xD;&#xA;&#xD;&#xA;Here are the logs with &#xD;&#xA;* `-lparachain::collation-generation=trace`&#xD;&#xA;* `-lparachain::approval-distribution=trace`&#xD;&#xA;* `-lparachain::collator-protocol=trace`&#xD;&#xA;* `-lbasic-authorship=trace -ltxpool=trace`&#xD;&#xA;&#xD;&#xA;https://gist.github.com/clangenb/134b993a11e14f24f54893e08c86d959&#xD;&#xA;&#xD;&#xA;Even more interesting, from these logs we can see that the collation was successful, and that that the collator's relay chain accepted it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; cumulus-collator: [Parachain] Starting collation. relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb at=0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.595  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.600  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 7823 (2 ms) [hash: 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca; parent_hash: 0x0266…1ef0; extrinsics (3): [0xcaec…3897, 0x470b…e13b, 0x1f79…cc15]]&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 7, ValidatorIndex(72)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an assignment to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae claimed_candidate_index=7 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.607  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 7823. Hash now 0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc, previously 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca.&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1796875kb, extrinsics: 5.7197265625kb, storage_proof: 9.3466796875kb }&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #7823 (0x78a4…7acc)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 9.5498046875kb&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb para_id=2267 traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=31556&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=2267 relay_parent=0xf0bf…9ddb candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 core=CoreIndex(41) current_validators=[Public(dea7cae27e5dfb239a7ca5fb0649568b57afc08ed2ec5e538d4a3abb786fbc3c (5H6eLEHx...)), Public(fcf408d2b46082efffea4ddd78d114e021439b47d4a5848e15f6d3e5eca44c2e (5HnNRAfr...)), Public(4c0e2bd29d0d14bf81da32c79492dbc2bd97a594f34c982047b8a2ee4d035865 (5DnRhudq...)), Public(3a56f3c36ae08f7cfdeea6d340aa45ebd6b379f47267ca78837749054dec7b03 (5DPCTuQm...)), Public(e6e40731962e2834867cc4f482308cc34e4579ee1a5e1667c3ec36d96b36a971 (5HHScHPf...))] traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.618 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing approvals from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked approval peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 9, ValidatorIndex(147)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an approval to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae candidate_index=9 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 10, ValidatorIndex(178)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The collator runs on `polkadot-v0.9.42`&#xD;&#xA;The runtime runs on `polkadot-v0.9.37`: https://github.com/integritee-network/parachain/tree/1.5.35/polkadot-parachains/shell-runtime&#xD;&#xA;&#xD;&#xA;It happens with the live Kusama network.&#xD;&#xA;&#xD;&#xA;It seems that the UMP part is indeed the problem. If the same dispatchable is executed with non-root origin, the block is successfully produced, and I get a `BadOrigin` error. So, can the executed xcm operations indeed prevent the relay chain from backing a block, or is it the parachain that fails to import the produced block if something in the xcm domain (config or operation) is wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit:** Updated the logs with a more verbose log additionally containing: basic-authorship and txpool." ContentLicense="CC BY-SA 4.0" />
  <row Id="36419" PostHistoryTypeId="5" PostId="9168" RevisionGUID="34328de6-4ca5-4a27-b369-2f76da61880a" CreationDate="2023-07-06T14:18:06.947" UserId="2445" Comment="deleted 126 characters in body" Text="We have the weird case that extrinsics in general work, but there is a specific extrinsic that stalls the parachain. See https://github.com/integritee-network/parachain/issues/222. This extrinsic sends a UMP-message to the relay chain requesting a slot swap.&#xD;&#xA;&#xD;&#xA;Here are the logs with &#xD;&#xA;* `-lparachain::collation-generation=trace`&#xD;&#xA;* `-lparachain::approval-distribution=trace`&#xD;&#xA;* `-lparachain::collator-protocol=trace`&#xD;&#xA;* `-lbasic-authorship=trace -ltxpool=trace`&#xD;&#xA;&#xD;&#xA;https://gist.github.com/clangenb/134b993a11e14f24f54893e08c86d959&#xD;&#xA;&#xD;&#xA;Even more interesting, from these logs we can see that the collation was successful, and that that the collator's relay chain accepted it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; cumulus-collator: [Parachain] Starting collation. relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb at=0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.595  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.600  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 7823 (2 ms) [hash: 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca; parent_hash: 0x0266…1ef0; extrinsics (3): [0xcaec…3897, 0x470b…e13b, 0x1f79…cc15]]&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 7, ValidatorIndex(72)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an assignment to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae claimed_candidate_index=7 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.607  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 7823. Hash now 0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc, previously 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca.&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1796875kb, extrinsics: 5.7197265625kb, storage_proof: 9.3466796875kb }&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #7823 (0x78a4…7acc)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 9.5498046875kb&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb para_id=2267 traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=31556&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=2267 relay_parent=0xf0bf…9ddb candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 core=CoreIndex(41) current_validators=[Public(dea7cae27e5dfb239a7ca5fb0649568b57afc08ed2ec5e538d4a3abb786fbc3c (5H6eLEHx...)), Public(fcf408d2b46082efffea4ddd78d114e021439b47d4a5848e15f6d3e5eca44c2e (5HnNRAfr...)), Public(4c0e2bd29d0d14bf81da32c79492dbc2bd97a594f34c982047b8a2ee4d035865 (5DnRhudq...)), Public(3a56f3c36ae08f7cfdeea6d340aa45ebd6b379f47267ca78837749054dec7b03 (5DPCTuQm...)), Public(e6e40731962e2834867cc4f482308cc34e4579ee1a5e1667c3ec36d96b36a971 (5HHScHPf...))] traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.618 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing approvals from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked approval peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 9, ValidatorIndex(147)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an approval to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae candidate_index=9 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 10, ValidatorIndex(178)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The collator runs on `polkadot-v0.9.42`&#xD;&#xA;The runtime runs on `polkadot-v0.9.37`: https://github.com/integritee-network/parachain/tree/1.5.35/polkadot-parachains/shell-runtime&#xD;&#xA;&#xD;&#xA;It happens with the live Kusama network.&#xD;&#xA;&#xD;&#xA;It seems that the UMP part is indeed the problem. If the same dispatchable is executed with non-root origin, the block is successfully produced, and I get a `BadOrigin` error. So, can the executed xcm operations indeed prevent the relay chain from backing a block?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit:** Updated the logs with a more verbose log additionally containing: basic-authorship and txpool." ContentLicense="CC BY-SA 4.0" />
  <row Id="36420" PostHistoryTypeId="2" PostId="9188" RevisionGUID="cf927df1-42ac-4d59-a6ff-58d3dfc40f02" CreationDate="2023-07-06T16:40:51.557" UserId="4068" Text="I am facing an issue with the OpenBrush PSP37 smart contract while calling the mint function. I receive a &quot;Contract Reverted!&quot; error with a &quot;TooManyTopics&quot; dispatch error. However, upon inspecting the substrate blockchain code, it specifies that up to 4 topics are allowed. In my case, I am only using 4 topics, as visible in the attached screenshot. Could someone please help me understand why I am encountering the &quot;TooManyTopics&quot; error? Surprisingly, when I reduce the number of topics to 3, the contract works fine.&#xD;&#xA;&#xD;&#xA;I have previously addressed this issue, and it was recommended that we adhere to a maximum limit of four topics. However, even when we precisely utilize four topics, we continue to encounter the same error. You can find our previous discussion at this Stack Overflow post :[enter link description here][1]&#xD;&#xA;&#xD;&#xA;Could anyone shed some light on this issue? Is there a possible explanation for receiving the &quot;TooManyTopics&quot; error even when using the maximum allowed number of topics?&#xD;&#xA;&#xD;&#xA;Thank you for your valuable insights and suggestions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[enter image description here][3]&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/9167/getting-contract-reverted-error-with-toomanytopics-dispatch-error-when-call/9169#9169&#xD;&#xA;  [2]: https://i.stack.imgur.com/oM1OG.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/c37WC.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/cHsDY.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36422" PostHistoryTypeId="1" PostId="9188" RevisionGUID="cf927df1-42ac-4d59-a6ff-58d3dfc40f02" CreationDate="2023-07-06T16:40:51.557" UserId="4068" Text="&quot;TooManyTopics&quot; Dispatch Error and Contract Revert when Minting in OpenBrush PSP37 Smart Contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="36423" PostHistoryTypeId="3" PostId="9188" RevisionGUID="cf927df1-42ac-4d59-a6ff-58d3dfc40f02" CreationDate="2023-07-06T16:40:51.557" UserId="4068" Text="|ink|smart-contract|pallet-contracts|substrate-node|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36428" PostHistoryTypeId="2" PostId="9190" RevisionGUID="a420ee14-d4f3-4d26-bf0a-9f187bd732d6" CreationDate="2023-07-06T18:27:58.247" UserId="4405" Text="I'm a newcomer to Rust and have been working with the Substrate-Parachain-Template. So far, I've managed to get everything to compile and run without issue, which is a good start.&#xD;&#xA;&#xD;&#xA;However, I've come across a part of the code that I'm struggling to understand, specifically the RuntimeEvent type resolution. Here's a snippet of the code in question:&#xD;&#xA;&#xD;&#xA;    impl pallet_nicks::Config for Runtime {&#xD;&#xA;        .....&#xD;&#xA;        // The ubiquitous event type.&#xD;&#xA;        type Event = RuntimeEvent;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm confused about the RuntimeEvent type because there isn't an explicit import statement for it, and yet it doesn't seem to be causing any issues. It feels like magic, but I know that's not how programming works.&#xD;&#xA;&#xD;&#xA;Could anyone kindly explain how Rust is resolving this type? I've checked the documentation but I couldn't find a clear explanation on this matter.&#xD;&#xA;&#xD;&#xA;Any insight would be greatly appreciated. Thank you in advance!&#xD;&#xA;&#xD;&#xA;Best Regards,&#xD;&#xA;AnonDao" ContentLicense="CC BY-SA 4.0" />
  <row Id="36430" PostHistoryTypeId="1" PostId="9190" RevisionGUID="a420ee14-d4f3-4d26-bf0a-9f187bd732d6" CreationDate="2023-07-06T18:27:58.247" UserId="4405" Text="New to Rust: Seeking Clarification on RuntimeEvent Type Resolution in Substrate-Parachain-Template" ContentLicense="CC BY-SA 4.0" />
  <row Id="36431" PostHistoryTypeId="3" PostId="9190" RevisionGUID="a420ee14-d4f3-4d26-bf0a-9f187bd732d6" CreationDate="2023-07-06T18:27:58.247" UserId="4405" Text="|rust|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36433" PostHistoryTypeId="2" PostId="9191" RevisionGUID="24bb52a0-10f6-4b7f-b2a1-131dc2965f01" CreationDate="2023-07-06T20:52:17.717" UserId="1793" Text="I would like to create a type called **XcmVersionedMultiLocation**. It can be imported using the following code:&#xD;&#xA;&#xD;&#xA;    import { XcmVersionedMultiLocation } from &quot;@polkadot/types/lookup&quot;;&#xD;&#xA;&#xD;&#xA;To create an instance of this type, you can use the following code:&#xD;&#xA;&#xD;&#xA;    const loc = api.createType(&quot;XcmVersionedMultiLocation&quot;, {&#xD;&#xA;      isV3: true,&#xD;&#xA;      type: &quot;V3&quot;,&#xD;&#xA;      asV3: {&#xD;&#xA;        parents: 1,&#xD;&#xA;        interior: {&#xD;&#xA;          isX2: true,&#xD;&#xA;          asX2: [&#xD;&#xA;            { isParachain: true, asParachain: 2100 },&#xD;&#xA;            {&#xD;&#xA;              isAccountId32: true,&#xD;&#xA;              asAccountId32: {&#xD;&#xA;                id: api.createType(&quot;AccountId32&quot;, address).toHex()&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          ]&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;However, the **loc** variable here still has the type &quot;Codec.&quot; I'm not sure why this is happening. Is there something else we need to do in order to get the correct type for XcmVersionedMultiLocation?&#xD;&#xA;&#xD;&#xA;Let's consider an example:&#xD;&#xA;&#xD;&#xA;    const account = api.createType(&quot;AccountId32&quot;, address)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This correctly assigns the type &quot;AccountId32&quot; to the account variable.&#xD;&#xA;&#xD;&#xA;Similarly, for the following code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    const loc = api.createType(&#xD;&#xA;    &quot;MultiLocation&quot;,&#xD;&#xA;    {&#xD;&#xA;        parents: &quot;0&quot;,&#xD;&#xA;        interior: {&#xD;&#xA;            x1: { generalKey: &quot;0x0001&quot; }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;The loc variable correctly has the type &quot;MultiLocation.&quot;&#xD;&#xA;&#xD;&#xA;I'm not sure why it's not working for XcmVersionedMultiLocation. &#xD;&#xA;&#xD;&#xA;Thanks for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="36435" PostHistoryTypeId="1" PostId="9191" RevisionGUID="24bb52a0-10f6-4b7f-b2a1-131dc2965f01" CreationDate="2023-07-06T20:52:17.717" UserId="1793" Text="api.createType does not work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36436" PostHistoryTypeId="3" PostId="9191" RevisionGUID="24bb52a0-10f6-4b7f-b2a1-131dc2965f01" CreationDate="2023-07-06T20:52:17.717" UserId="1793" Text="|polkadot-js|custom-types|typescript|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36439" PostHistoryTypeId="2" PostId="9192" RevisionGUID="42706f17-1d99-4412-a986-252883f37832" CreationDate="2023-07-07T04:37:10.850" UserId="2372" Text="By declaring `type Runtime = Runtime`, it means that the type Runtime is being used as a self-reference or a way to refer to the overall runtime configuration itself. It allows the code within the pallet to work with and refer to the runtime configuration without needing to specify the exact type.&#xD;&#xA;&#xD;&#xA;You can see read the docs [here][1] for understanding the runtime configurations&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/frame-macros/#:~:text=For%20example%2C%20the%20construct_runtime!,to%20represent%20the%20Substrate%20runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="36441" PostHistoryTypeId="5" PostId="9191" RevisionGUID="f75b96a8-9209-44ff-856e-3a033a1e5ee7" CreationDate="2023-07-07T04:38:26.583" UserId="354" Comment="added 5 characters in body" Text="I would like to create a type called **XcmVersionedMultiLocation**. It can be imported using the following code:&#xD;&#xA;&#xD;&#xA;    import { XcmVersionedMultiLocation } from &quot;@polkadot/types/lookup&quot;;&#xD;&#xA;&#xD;&#xA;To create an instance of this type, you can use the following code:&#xD;&#xA;&#xD;&#xA;    const loc = api.createType(&quot;XcmVersionedMultiLocation&quot;, {&#xD;&#xA;      isV3: true,&#xD;&#xA;      type: &quot;V3&quot;,&#xD;&#xA;      asV3: {&#xD;&#xA;        parents: 1,&#xD;&#xA;        interior: {&#xD;&#xA;          isX2: true,&#xD;&#xA;          asX2: [&#xD;&#xA;            { isParachain: true, asParachain: 2100 },&#xD;&#xA;            {&#xD;&#xA;              isAccountId32: true,&#xD;&#xA;              asAccountId32: {&#xD;&#xA;                id: api.createType(&quot;AccountId32&quot;, address).toHex()&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          ]&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;However, the **loc** variable here still has the type `Codec`. I am not sure why this is happening. Is there something else we need to do in order to get the correct type for `XcmVersionedMultiLocation`?&#xD;&#xA;&#xD;&#xA;Let's consider an example:&#xD;&#xA;&#xD;&#xA;    const account = api.createType(&quot;AccountId32&quot;, address)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This correctly assigns the type &quot;AccountId32&quot; to the account variable.&#xD;&#xA;&#xD;&#xA;Similarly, for the following code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    const loc = api.createType(&#xD;&#xA;    &quot;MultiLocation&quot;,&#xD;&#xA;    {&#xD;&#xA;        parents: &quot;0&quot;,&#xD;&#xA;        interior: {&#xD;&#xA;            x1: { generalKey: &quot;0x0001&quot; }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;The loc variable correctly has the type `MultiLocation`.&#xD;&#xA;&#xD;&#xA;I'm not sure why it's not working for `XcmVersionedMultiLocation`. &#xD;&#xA;&#xD;&#xA;Thanks for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="36442" PostHistoryTypeId="5" PostId="9192" RevisionGUID="77e2c790-2264-4379-a5c8-126388dddafe" CreationDate="2023-07-07T04:46:52.410" UserId="2372" Comment="added 162 characters in body" Text="By declaring `type Runtime = Runtime`, it means that the type Runtime is being used as a self-reference or a way to refer to the overall runtime configuration itself. It allows the code within the pallet to work with and refer to the runtime configuration without needing to specify the exact type.&#xD;&#xA;&#xD;&#xA;You can see read the docs [here][1] for understanding the runtime configurations and the you can check the impl of [construct_runtime][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/frame-macros/#:~:text=For%20example%2C%20the%20construct_runtime!,to%20represent%20the%20Substrate%20runtime.&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/runtime/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="36443" PostHistoryTypeId="5" PostId="8704" RevisionGUID="e028af87-6ef9-4d9e-93d9-c847758e4212" CreationDate="2023-07-07T04:48:13.380" UserId="3414" Comment="deleted 4 characters in body" Text="I'm sending  XCM message from one chain to another through Bridge. But i'm facing an issue for receiving the message.&#xD;&#xA;```json&#xD;&#xA;&#xD;&#xA;    023-05-31 10:40:30.010 TRACE tokio-runtime-worker runtime::bridge-messages: Cannot dispatch any more messages on lane [0, 0, 0, 0]. Weight: declared=Weight(ref_time: 4000000000, proof_size: 262144), left=Weight(ref_time: 0, proof_size: 0)    &#xD;&#xA;    2023-05-31 10:40:30.010 TRACE tokio-runtime-worker runtime::bridge-messages: Received messages: total=1, valid=0. Weight used: Weight(ref_time: 365960000, proof_size: 123455)/Weight(ref_time: 365960000, proof_size: 123455)    &#xD;&#xA;    2023-05-31 10:40:30.010 TRACE tokio-runtime-worker run\&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The function which execute in receiving is this&#xD;&#xA;```rs&#xD;&#xA;&#xD;&#xA;    pub fn receive_messages_proof(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			relayer_id_at_bridged_chain: T::InboundRelayer,&#xD;&#xA;    			proof: MessagesProofOf&lt;T, I&gt;,&#xD;&#xA;    			messages_count: u32,&#xD;&#xA;    			dispatch_weight: Weight,&#xD;&#xA;    		) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    			ensure_not_halted::&lt;T, I&gt;()?;&#xD;&#xA;    			let relayer_id_at_this_chain = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// reject transactions that are declaring too many messages&#xD;&#xA;    			ensure!(&#xD;&#xA;    				MessageNonce::from(messages_count) &lt;= T::MaxUnconfirmedMessagesAtInboundLane::get(),&#xD;&#xA;    				Error::&lt;T, I&gt;::TooManyMessagesInTheProof&#xD;&#xA;    			);&#xD;&#xA;    &#xD;&#xA;    		&#xD;&#xA;    			let declared_weight = T::WeightInfo::receive_messages_proof_weight(&#xD;&#xA;    				&amp;proof,&#xD;&#xA;    				messages_count,&#xD;&#xA;    				dispatch_weight,&#xD;&#xA;    			);&#xD;&#xA;    			let mut actual_weight = declared_weight;&#xD;&#xA;    &#xD;&#xA;    			// verify messages proof &amp;&amp; convert proof into messages&#xD;&#xA;    			let messages = verify_and_decode_messages_proof::&lt;&#xD;&#xA;    				T::SourceHeaderChain,&#xD;&#xA;    				T::InboundMessageFee,&#xD;&#xA;    				T::InboundPayload,&#xD;&#xA;    			&gt;(proof, messages_count)&#xD;&#xA;    			.map_err(|err| {&#xD;&#xA;    				log::trace!(&#xD;&#xA;    					target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    					&quot;Rejecting invalid messages proof: {:?}&quot;,&#xD;&#xA;    					err,&#xD;&#xA;    				);&#xD;&#xA;    &#xD;&#xA;    				Error::&lt;T, I&gt;::InvalidMessagesProof&#xD;&#xA;    			})?;&#xD;&#xA;    &#xD;&#xA;    			// dispatch messages and (optionally) update lane(s) state(s)&#xD;&#xA;    			let mut total_messages = 0;&#xD;&#xA;    			let mut valid_messages = 0;&#xD;&#xA;    			let mut dispatch_weight_left = dispatch_weight;&#xD;&#xA;    			for (lane_id, lane_data) in messages {&#xD;&#xA;    				let mut lane = inbound_lane::&lt;T, I&gt;(lane_id);&#xD;&#xA;    &#xD;&#xA;    				if let Some(lane_state) = lane_data.lane_state {&#xD;&#xA;    					let updated_latest_confirmed_nonce = lane.receive_state_update(lane_state);&#xD;&#xA;    					if let Some(updated_latest_confirmed_nonce) = updated_latest_confirmed_nonce {&#xD;&#xA;    						log::trace!(&#xD;&#xA;    							target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    							&quot;Received lane {:?} state update: latest_confirmed_nonce={}&quot;,&#xD;&#xA;    							lane_id,&#xD;&#xA;    							updated_latest_confirmed_nonce,&#xD;&#xA;    						);&#xD;&#xA;    					}&#xD;&#xA;    				}&#xD;&#xA;    &#xD;&#xA;    				for mut message in lane_data.messages {&#xD;&#xA;    					debug_assert_eq!(message.key.lane_id, lane_id);&#xD;&#xA;    					total_messages += 1;&#xD;&#xA;    &#xD;&#xA;    					// ensure that relayer has declared enough weight for dispatching next message&#xD;&#xA;    					// on this lane. We can't dispatch lane messages out-of-order, so if declared&#xD;&#xA;    					// weight is not enough, let's move to next lane&#xD;&#xA;    					let dispatch_weight = T::MessageDispatch::dispatch_weight(&amp;mut message);&#xD;&#xA;    					if dispatch_weight.any_gt(dispatch_weight_left ){&#xD;&#xA;    						log::trace!(&#xD;&#xA;    							target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    							&quot;Cannot dispatch any more messages on lane {:?}. Weight: declared={}, left={}&quot;,&#xD;&#xA;    							lane_id,&#xD;&#xA;    							dispatch_weight,&#xD;&#xA;    							dispatch_weight_left,&#xD;&#xA;    						);&#xD;&#xA;    						break&#xD;&#xA;    					}&#xD;&#xA;    					total_messages += 1;&#xD;&#xA;    &#xD;&#xA;    					let receival_result = lane.receive_message::&lt;T::MessageDispatch, T::AccountId&gt;(&#xD;&#xA;    						&amp;relayer_id_at_bridged_chain,&#xD;&#xA;    						&amp;relayer_id_at_this_chain,&#xD;&#xA;    						message.key.nonce,&#xD;&#xA;    						message.data,&#xD;&#xA;    					);&#xD;&#xA;    &#xD;&#xA;    				&#xD;&#xA;    					let (unspent_weight, refund_pay_dispatch_fee) = match receival_result {&#xD;&#xA;    						ReceivalResult::Dispatched(dispatch_result) =&gt; {&#xD;&#xA;    							valid_messages += 1;&#xD;&#xA;    							(&#xD;&#xA;    								dispatch_result.unspent_weight,&#xD;&#xA;    								!dispatch_result.dispatch_fee_paid_during_dispatch,&#xD;&#xA;    							)&#xD;&#xA;    						},&#xD;&#xA;    						ReceivalResult::InvalidNonce |&#xD;&#xA;    						ReceivalResult::TooManyUnrewardedRelayers |&#xD;&#xA;    						ReceivalResult::TooManyUnconfirmedMessages =&gt; (dispatch_weight, true),&#xD;&#xA;    					};&#xD;&#xA;    &#xD;&#xA;    					let unspent_weight = unspent_weight.min(dispatch_weight);&#xD;&#xA;    					dispatch_weight_left -= dispatch_weight - unspent_weight;&#xD;&#xA;    					actual_weight = actual_weight.saturating_sub(unspent_weight).saturating_sub(&#xD;&#xA;    					// 	// delivery call weight formula assumes that the fee is paid at&#xD;&#xA;    					// 	// this (target) chain. If the message is prepaid at the source&#xD;&#xA;    					// 	// chain, let's refund relayer with this extra cost.&#xD;&#xA;    					if refund_pay_dispatch_fee {&#xD;&#xA;    						T::WeightInfo::pay_inbound_dispatch_fee_overhead()&#xD;&#xA;    					} else {&#xD;&#xA;    						Weight::zero()&#xD;&#xA;    					},&#xD;&#xA;    				);&#xD;&#xA;    				}&#xD;&#xA;    			}&#xD;&#xA;    &#xD;&#xA;    			log::trace!(&#xD;&#xA;    				target: &quot;runtime::bridge-messages&quot;,&#xD;&#xA;    				&quot;Received messages: total={}, valid={}. Weight used: {}/{}&quot;,&#xD;&#xA;    				total_messages,&#xD;&#xA;    				valid_messages,&#xD;&#xA;    				actual_weight,&#xD;&#xA;    				declared_weight,&#xD;&#xA;    			);&#xD;&#xA;    &#xD;&#xA;    			Ok(PostDispatchInfo { actual_weight: Some(actual_weight), pays_fee: Pays::Yes })&#xD;&#xA;    		}&#xD;&#xA;```&#xD;&#xA;**On sending message i'm getting this log**&#xD;&#xA;```json&#xD;&#xA;    2023-05-31 10:40:12.011 TRACE tokio-runtime-worker runtime::bridge-messages: T::OnMessageAccepted callback has spent less weight than expected. Refunding: Weight(ref_time: 125000000, proof_size: 0) - Weight(ref_time: 0, proof_size: 0) = Weight(ref_time: 125000000, proof_size: 0)    &#xD;&#xA;    2023-05-31 10:40:12.011 TRACE tokio-runtime-worker runtime::bridge-messages: Accepted message 1 to lane [0, 0, 0, 0]. Message size: 87    &#xD;&#xA;    2023-05-31 10:40:12.011 DEBUG tokio-runtime-worker runtime::bridge: Sent XCM message [0, 0, 0, 0]/1 to [112, 101, 101, 114]: [167, 96, 230, 244, 244, 220, 186, 46, 0, 142, 206, 231, 18, 60, 1, 107, 131, 115, 253, 63, 45, 38, 187, 97, 175, 149, 137, 34, 34, 220, 141, 64]  &#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36444" PostHistoryTypeId="2" PostId="9193" RevisionGUID="aa3f70c8-543b-48f7-af6f-0840fd552367" CreationDate="2023-07-07T04:52:23.400" UserId="354" Text="`#[ink(topic)]` is use to index the events, you can find more info about it [here][1], now to answer your question that you are unable to use 4 `ink(topics)` at a time is that one of the `ink(topic)` is used by the signature of the event as mentioned in above link, if you want to use all the 4 topics for you event than use `#[ink(anonymous)]` it will not include the signature of event as an `ink(topic)` and you are good to go. You can use #[ink(anonymous)] as follows:&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    #[ink(anonymous)]&#xD;&#xA;    pub struct MyEvent {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        field_1: i32,&#xD;&#xA;        field_2: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/basics/events#event-definition" ContentLicense="CC BY-SA 4.0" />
  <row Id="36446" PostHistoryTypeId="5" PostId="9188" RevisionGUID="6028f3c8-9bc6-4948-8525-34d75a27cf06" CreationDate="2023-07-07T04:53:27.693" UserId="354" Comment="added 2 characters in body" Text="I am facing an issue with the `OpenBrush PSP37` smart contract while calling the mint function. I receive a `Contract Reverted!` error with a `TooManyTopics` dispatch error. However, upon inspecting the substrate blockchain code, it specifies that up to 4 topics are allowed. In my case, I am only using 4 topics, as visible in the attached screenshot. Could someone please help me understand why I am encountering the &quot;TooManyTopics&quot; error? Surprisingly, when I reduce the number of topics to 3, the contract works fine.&#xD;&#xA;&#xD;&#xA;I have previously addressed this issue, and it was recommended that we adhere to a maximum limit of four topics. However, even when we precisely utilize four topics, we continue to encounter the same error. You can find our previous discussion at this Stack Overflow post :[enter link description here][1]&#xD;&#xA;&#xD;&#xA;Could anyone shed some light on this issue? Is there a possible explanation for receiving the `TooManyTopics` error even when using the maximum allowed number of topics?&#xD;&#xA;&#xD;&#xA;Thank you for your valuable insights and suggestions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[enter image description here][3]&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/9167/getting-contract-reverted-error-with-toomanytopics-dispatch-error-when-call/9169#9169&#xD;&#xA;  [2]: https://i.stack.imgur.com/oM1OG.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/c37WC.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/cHsDY.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36447" PostHistoryTypeId="5" PostId="9192" RevisionGUID="ab0f2191-3a65-4adc-9849-c8257f7395a7" CreationDate="2023-07-07T04:54:05.260" UserId="2372" Comment="added 372 characters in body" Text="&#xD;&#xA;In Rust, the associated types are types that are associated with a trait and defined within the trait itself or its implementing type. They allow traits to specify additional types that are relevant to their functionality.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the context of the pallet_nicks::Config trait, the type Event is an associated type that represents the event type for that configuration. By declaring `type Runtime = Runtime`, it means that the type Runtime is being used as a self-reference or a way to refer to the overall runtime configuration itself. It allows the code within the pallet to work with and refer to the runtime configuration without needing to specify the exact type.&#xD;&#xA;&#xD;&#xA;You can see read the docs [here][1] for understanding the runtime configurations and the you can check the impl of [construct_runtime][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/frame-macros/#:~:text=For%20example%2C%20the%20construct_runtime!,to%20represent%20the%20Substrate%20runtime.&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/runtime/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="36449" PostHistoryTypeId="2" PostId="9194" RevisionGUID="476de257-d3e8-4691-80c3-99bdd52a721c" CreationDate="2023-07-07T06:17:38.473" UserId="4381" Text="when running a nodes, firewall is essential?&#xD;&#xA;&#xD;&#xA;i used this command &quot;sudo ufw allow 3033/tpc&quot; but it`s result is &quot;ERROR: Bad port&quot;&#xD;&#xA;&#xD;&#xA;what`s the problem? can i just done &quot;sudo ufw enable&quot; without allow 3033/tpc ?&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="36451" PostHistoryTypeId="1" PostId="9194" RevisionGUID="476de257-d3e8-4691-80c3-99bdd52a721c" CreationDate="2023-07-07T06:17:38.473" UserId="4381" Text="when running a validating nodes, firewall setting is essential?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36452" PostHistoryTypeId="3" PostId="9194" RevisionGUID="476de257-d3e8-4691-80c3-99bdd52a721c" CreationDate="2023-07-07T06:17:38.473" UserId="4381" Text="|error|api|nodes|networking|cli|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36453" PostHistoryTypeId="5" PostId="9190" RevisionGUID="5811787d-bbff-4e87-99d8-3e98e22f8c05" CreationDate="2023-07-07T06:25:08.150" UserId="2372" Comment="added 2 characters in body" Text="I'm a newcomer to Rust and have been working with the `Substrate-Parachain-Template`. So far, I've managed to get everything to compile and run without issue, which is a good start.&#xD;&#xA;&#xD;&#xA;However, I've come across a part of the code that I'm struggling to understand, specifically the RuntimeEvent type resolution. Here's a snippet of the code in question:&#xD;&#xA;&#xD;&#xA;    impl pallet_nicks::Config for Runtime {&#xD;&#xA;        .....&#xD;&#xA;        // The ubiquitous event type.&#xD;&#xA;        type Event = RuntimeEvent;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm confused about the RuntimeEvent type because there isn't an explicit import statement for it, and yet it doesn't seem to be causing any issues. It feels like magic, but I know that's not how programming works.&#xD;&#xA;&#xD;&#xA;Could anyone kindly explain how Rust is resolving this type? I've checked the documentation but I couldn't find a clear explanation on this matter.&#xD;&#xA;&#xD;&#xA;Any insight would be greatly appreciated. Thank you in advance!&#xD;&#xA;&#xD;&#xA;Best Regards,&#xD;&#xA;AnonDao" ContentLicense="CC BY-SA 4.0" />
  <row Id="36454" PostHistoryTypeId="5" PostId="9191" RevisionGUID="d5c70c65-0fc1-4ddb-a8b2-2aba141b337c" CreationDate="2023-07-07T06:25:29.777" UserId="2372" Comment="added 2 characters in body" Text="I would like to create a type called **`XcmVersionedMultiLocation`**. It can be imported using the following code:&#xD;&#xA;&#xD;&#xA;    import { XcmVersionedMultiLocation } from &quot;@polkadot/types/lookup&quot;;&#xD;&#xA;&#xD;&#xA;To create an instance of this type, you can use the following code:&#xD;&#xA;&#xD;&#xA;    const loc = api.createType(&quot;XcmVersionedMultiLocation&quot;, {&#xD;&#xA;      isV3: true,&#xD;&#xA;      type: &quot;V3&quot;,&#xD;&#xA;      asV3: {&#xD;&#xA;        parents: 1,&#xD;&#xA;        interior: {&#xD;&#xA;          isX2: true,&#xD;&#xA;          asX2: [&#xD;&#xA;            { isParachain: true, asParachain: 2100 },&#xD;&#xA;            {&#xD;&#xA;              isAccountId32: true,&#xD;&#xA;              asAccountId32: {&#xD;&#xA;                id: api.createType(&quot;AccountId32&quot;, address).toHex()&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          ]&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;However, the **loc** variable here still has the type `Codec`. I am not sure why this is happening. Is there something else we need to do in order to get the correct type for `XcmVersionedMultiLocation`?&#xD;&#xA;&#xD;&#xA;Let's consider an example:&#xD;&#xA;&#xD;&#xA;    const account = api.createType(&quot;AccountId32&quot;, address)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This correctly assigns the type &quot;AccountId32&quot; to the account variable.&#xD;&#xA;&#xD;&#xA;Similarly, for the following code:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    const loc = api.createType(&#xD;&#xA;    &quot;MultiLocation&quot;,&#xD;&#xA;    {&#xD;&#xA;        parents: &quot;0&quot;,&#xD;&#xA;        interior: {&#xD;&#xA;            x1: { generalKey: &quot;0x0001&quot; }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;The loc variable correctly has the type `MultiLocation`.&#xD;&#xA;&#xD;&#xA;I'm not sure why it's not working for `XcmVersionedMultiLocation`. &#xD;&#xA;&#xD;&#xA;Thanks for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="36455" PostHistoryTypeId="5" PostId="9188" RevisionGUID="9630baf9-8a5d-4972-a4bc-b4a57d4998c0" CreationDate="2023-07-07T06:26:00.107" UserId="2372" Comment="added 2 characters in body" Text="I am facing an issue with the `OpenBrush PSP37` smart contract while calling the `mint` function. I receive a `Contract Reverted!` error with a `TooManyTopics` dispatch error. However, upon inspecting the substrate blockchain code, it specifies that up to 4 topics are allowed. In my case, I am only using 4 topics, as visible in the attached screenshot. Could someone please help me understand why I am encountering the &quot;TooManyTopics&quot; error? Surprisingly, when I reduce the number of topics to 3, the contract works fine.&#xD;&#xA;&#xD;&#xA;I have previously addressed this issue, and it was recommended that we adhere to a maximum limit of four topics. However, even when we precisely utilize four topics, we continue to encounter the same error. You can find our previous discussion at this Stack Overflow post :[enter link description here][1]&#xD;&#xA;&#xD;&#xA;Could anyone shed some light on this issue? Is there a possible explanation for receiving the `TooManyTopics` error even when using the maximum allowed number of topics?&#xD;&#xA;&#xD;&#xA;Thank you for your valuable insights and suggestions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[enter image description here][3]&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/9167/getting-contract-reverted-error-with-toomanytopics-dispatch-error-when-call/9169#9169&#xD;&#xA;  [2]: https://i.stack.imgur.com/oM1OG.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/c37WC.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/cHsDY.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36456" PostHistoryTypeId="5" PostId="9183" RevisionGUID="0b81943e-75bb-459d-9a29-8707808a9556" CreationDate="2023-07-07T06:26:12.113" UserId="2372" Comment="added 2 characters in body" Text="I connected two `parachains` with Relay chain. While working on `xcm` functionality, I discovered that block time of parachain changes. `Generally` block time of parachain in `parachain-node-template` is `12 sec`. Now I saw that sometimes the `block time` of parachain is `6 sec` and sometimes its `more than 12 sec`. All the transactions are executing successfully. Could anyone guide me why the block time in parachain keep on changing." ContentLicense="CC BY-SA 4.0" />
  <row Id="36457" PostHistoryTypeId="2" PostId="9195" RevisionGUID="21b96ddd-3469-4c6c-b3f7-441835baa892" CreationDate="2023-07-07T06:26:14.737" UserId="2348" Text="I am using subxt library . I have downloaded metadata from chain using this url **wss://rpc.polkadot.io:443 ** . I want to know how can i add validator to the chain using subxt  &#xD;&#xA;library ." ContentLicense="CC BY-SA 4.0" />
  <row Id="36459" PostHistoryTypeId="1" PostId="9195" RevisionGUID="21b96ddd-3469-4c6c-b3f7-441835baa892" CreationDate="2023-07-07T06:26:14.737" UserId="2348" Text="how to add validator in network using subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="36460" PostHistoryTypeId="3" PostId="9195" RevisionGUID="21b96ddd-3469-4c6c-b3f7-441835baa892" CreationDate="2023-07-07T06:26:14.737" UserId="2348" Text="|polkadot|validator|subxt|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36461" PostHistoryTypeId="5" PostId="9168" RevisionGUID="8cf1c06b-b16e-4c9e-a0a5-2cfa97a757e3" CreationDate="2023-07-07T06:27:30.880" UserId="2372" Comment="added 2 characters in body" Text="We have the weird case that `extrinsics` in general work, but there is a specific extrinsic that stalls the parachain. See https://github.com/integritee-network/parachain/issues/222. This extrinsic sends a UMP-message to the relay chain requesting a slot swap.&#xD;&#xA;&#xD;&#xA;Here are the logs with &#xD;&#xA;* `-lparachain::collation-generation=trace`&#xD;&#xA;* `-lparachain::approval-distribution=trace`&#xD;&#xA;* `-lparachain::collator-protocol=trace`&#xD;&#xA;* `-lbasic-authorship=trace -ltxpool=trace`&#xD;&#xA;&#xD;&#xA;https://gist.github.com/clangenb/134b993a11e14f24f54893e08c86d959&#xD;&#xA;&#xD;&#xA;Even more interesting, from these logs we can see that the collation was successful, and that that the collator's relay chain accepted it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; cumulus-collator: [Parachain] Starting collation. relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb at=0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.595  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.600  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 7823 (2 ms) [hash: 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca; parent_hash: 0x0266…1ef0; extrinsics (3): [0xcaec…3897, 0x470b…e13b, 0x1f79…cc15]]&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 7, ValidatorIndex(72)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an assignment to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae claimed_candidate_index=7 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.607  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 7823. Hash now 0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc, previously 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca.&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1796875kb, extrinsics: 5.7197265625kb, storage_proof: 9.3466796875kb }&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #7823 (0x78a4…7acc)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 9.5498046875kb&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb para_id=2267 traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=31556&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=2267 relay_parent=0xf0bf…9ddb candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 core=CoreIndex(41) current_validators=[Public(dea7cae27e5dfb239a7ca5fb0649568b57afc08ed2ec5e538d4a3abb786fbc3c (5H6eLEHx...)), Public(fcf408d2b46082efffea4ddd78d114e021439b47d4a5848e15f6d3e5eca44c2e (5HnNRAfr...)), Public(4c0e2bd29d0d14bf81da32c79492dbc2bd97a594f34c982047b8a2ee4d035865 (5DnRhudq...)), Public(3a56f3c36ae08f7cfdeea6d340aa45ebd6b379f47267ca78837749054dec7b03 (5DPCTuQm...)), Public(e6e40731962e2834867cc4f482308cc34e4579ee1a5e1667c3ec36d96b36a971 (5HHScHPf...))] traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.618 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing approvals from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked approval peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 9, ValidatorIndex(147)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an approval to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae candidate_index=9 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 10, ValidatorIndex(178)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The collator runs on `polkadot-v0.9.42`&#xD;&#xA;The runtime runs on `polkadot-v0.9.37`: https://github.com/integritee-network/parachain/tree/1.5.35/polkadot-parachains/shell-runtime&#xD;&#xA;&#xD;&#xA;It happens with the live Kusama network.&#xD;&#xA;&#xD;&#xA;It seems that the UMP part is indeed the problem. If the same dispatchable is executed with non-root origin, the block is successfully produced, and I get a `BadOrigin` error. So, can the executed xcm operations indeed prevent the relay chain from backing a block?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Edit:** Updated the logs with a more verbose log additionally containing: basic-authorship and txpool." ContentLicense="CC BY-SA 4.0" />
  <row Id="36462" PostHistoryTypeId="5" PostId="9167" RevisionGUID="62037de0-adc1-43d9-ae2c-39175c17a1c9" CreationDate="2023-07-07T06:27:53.727" UserId="2372" Comment="added 2 characters in body" Text="I'm working on adding events to an OpenBrush PSP37 smart contract and deploying it using `Substrate Contract UI`. However, when I try to call the mint function, I encounter the following error:&#xD;&#xA;&#xD;&#xA;Contract Reverted!&#xD;&#xA;Dispatch error: TooManyTopics&#xD;&#xA;I have attached screenshots of the error message and relevant code snippets for reference.&#xD;&#xA;&#xD;&#xA;I'm not sure what could be causing this error or how to resolve it. Could someone please provide some guidance on what might be causing this error and how to fix it?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/v4T6i.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/eHwYs.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36463" PostHistoryTypeId="5" PostId="9166" RevisionGUID="ca69322f-440f-404f-b481-30884995448a" CreationDate="2023-07-07T06:28:14.687" UserId="2372" Comment="added 2 characters in body" Text="I want use Database Snapshot Services, because making genesis to last block takes too much time.... so I used `POLKACHU` site, the code is.&#xD;&#xA;&#xD;&#xA;&quot; curl -o - -L https://snapshots.polkachu.com/snapshots/polkadot/polkadot_16262141.tar.lz4 | lz4 -c -d - | tar -x -C YOUR_DATABASE_LOCATION &quot;&#xD;&#xA;&#xD;&#xA;location changed like this&#xD;&#xA;-&gt;&#xD;&#xA;&quot;curl -o - -L https://snapshots.polkachu.com/snapshots/polkadot/polkadot_16262141.tar.lz4 | lz4 -c -d - | tar -x -C ~/.local/share/polkadot/chains/polkadot&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All seems well downloaded, and I use the command&#xD;&#xA;&quot;polkadot  --database=RocksDb --pruning=1000&quot;&#xD;&#xA;but nothing changed, when i see telemetry, it start from zero.......&#xD;&#xA;&#xD;&#xA;@hat is the problem?? Did I miss something??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36464" PostHistoryTypeId="5" PostId="9155" RevisionGUID="83f8564c-7904-46c6-940a-55bcdefd390a" CreationDate="2023-07-07T06:28:25.833" UserId="2372" Comment="added 2 characters in body" Text="When we run a `substrate` client `cargo run -- --dev` we run a `substrate-node`. The business logic is defined on the pallets composed by `construct_runtime!` inside the runtime. So which part of the [node](https://github.com/substrate-developer-hub/substrate-node-template/tree/main/node) is responsible for initiating and interacting with the runtime?          " ContentLicense="CC BY-SA 4.0" />
  <row Id="36465" PostHistoryTypeId="5" PostId="9149" RevisionGUID="c3e3f934-f2df-4d04-a53b-2aede186aed0" CreationDate="2023-07-07T06:29:05.213" UserId="2372" Comment="added 2 characters in body" Text="I'm currently embarking on a project to establish a trustless bridge between a Substrate `solochain` and a `parachain`. Both chains utilize Substrate technology, with the `solochain` achieving finality through the `GRANDPA` gadget. To achieve this, I plan to use the technology provided by [Parity Bridges Common](https://github.com/paritytech/parity-bridges-common).&#xD;&#xA;&#xD;&#xA;In my understanding, there are two main components in the bridge:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;1. **Light Client**: This is the core technology providing the state of the solochain in the parachain.&#xD;&#xA;2. **Message System**: An abstraction built on top of the light client to facilitate message passing from the solochain to the parachain.&#xD;&#xA;&#xD;&#xA;For the initial stage, my aim is to integrate the light client of the `solochain` into the `parachain`. To achieve this, is it sufficient to incorporate the [pallet-bridge-grandpa](https://github.com/paritytech/parity-bridges-common/tree/master/modules/grandpa) into the `parachain`'s runtime and then run the relay to submit the &quot;headers&quot; of the `solochain`?&#xD;&#xA;&#xD;&#xA;Any guidance or insights on this matter would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VlXwy.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36466" PostHistoryTypeId="5" PostId="9123" RevisionGUID="cf0802d5-3a56-4db1-a6b1-b72ff928781e" CreationDate="2023-07-07T06:29:24.037" UserId="2372" Comment="added 2 characters in body" Text="In `polkadot.js` staking , when i put the session key, the result is  &quot;duplicated session key&quot;&#xD;&#xA;&#xD;&#xA;I use the command in SSH &quot;echo `'{&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_rotateKeys&quot;,&quot;params&quot;:[]}' | websocket -n1 -B 99999999 ws://127.0.0.1:9944&quot;`&#xD;&#xA;&#xD;&#xA;I run 2 nodes with different server, I already erase the node and start new node with different server, so I wanted change the session key but it does not work. duplicated session key again and again&#xD;&#xA;&#xD;&#xA;what is the problem??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36467" PostHistoryTypeId="5" PostId="9192" RevisionGUID="d6001b64-94da-483e-9876-e2d22b65095f" CreationDate="2023-07-07T06:29:28.540" UserId="2281" Comment="added 2 characters in body" Text="&#xD;&#xA;In Rust, the associated types are types that are associated with a trait and defined within the trait itself or its implementing type. They allow traits to specify additional types that are relevant to their functionality.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the context of the `pallet_nicks::Config` trait, the type Event is an associated type that represents the event type for that configuration. By declaring `type Runtime = Runtime`, it means that the type Runtime is being used as a self-reference or a way to refer to the overall runtime configuration itself. It allows the code within the pallet to work with and refer to the runtime configuration without needing to specify the exact type.&#xD;&#xA;&#xD;&#xA;You can see read the docs [here][1] for understanding the runtime configurations and the you can check the impl of [construct_runtime][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/frame-macros/#:~:text=For%20example%2C%20the%20construct_runtime!,to%20represent%20the%20Substrate%20runtime.&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/runtime/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="36468" PostHistoryTypeId="5" PostId="9154" RevisionGUID="bf2a64b9-28d0-4e20-be0b-7f014bb94fd8" CreationDate="2023-07-07T06:29:42.470" UserId="2372" Comment="added 2 characters in body" Text="I am trying to perform a `runtime upgrade` using [Acala's Chopsticks][1]. I used this command:&#xD;&#xA;```&#xD;&#xA; npx @acala-network/chopsticks@latest xcm -r ./configs/polkadot.yml -p ./configs/my_config.yml&#xD;&#xA;```&#xD;&#xA; &#xD;&#xA;I followed the [authorize &gt; enact an upgrade flow][2] for my parachain, and it works.  &#xD;&#xA;&#xD;&#xA;To produce blocks in local Polkadot, i connected through ws and executed the command:&#xD;&#xA;```&#xD;&#xA;{ &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;id&quot;: &quot;1&quot;, &quot;method&quot;: &quot;dev_newBlock&quot;, &quot;params&quot;: [ {&quot;count&quot;: 1000} ]}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However when I checked `paras` &gt; `futureCodeUpgrades`, I do not see my parachain.   &#xD;&#xA;Help.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AcalaNetwork/chopsticks/tree/master&#xD;&#xA;  [2]: https://docs.substrate.io/reference/how-to-guides/parachains/upgrade-a-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36469" PostHistoryTypeId="5" PostId="9143" RevisionGUID="b3c78256-fd11-4e00-85f8-2294433e04bf" CreationDate="2023-07-07T06:29:58.363" UserId="2372" Comment="added 2 characters in body" Text="We are currently experiencing an issue related to RPC methods. Let me provide a description of the problem:&#xD;&#xA;&#xD;&#xA;To generate `metadata` from our node, we use the following command:&#xD;&#xA;&#xD;&#xA;    echo '{&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_getMetadata&quot;,&quot;params&quot;:[]}' | websocat -n1 -B 99999999 wss://kusama-rpc.mangata.online &gt; metadata.json&#xD;&#xA;&#xD;&#xA;By using this metadata, we are able to generate types, as demonstrated in this repository  [repo][1] (branch rc/1.0.0)&#xD;&#xA;&#xD;&#xA;We have successfully generated all the required types, and everything is working smoothly. Additionally, we have added RPC methods when initializing the ApiPromise in JavaScript:&#xD;&#xA;&#xD;&#xA;    ApiPromise.create(&#xD;&#xA;      {&#xD;&#xA;        provider,&#xD;&#xA;        rpc: {&#xD;&#xA;          xyk: {&#xD;&#xA;            calculate_buy_price: {&#xD;&#xA;      description: &quot;Calculates and returns sold_token_amount while providing bought_token_amount and respective reserves&quot;,&#xD;&#xA;      params: [&#xD;&#xA;        {&#xD;&#xA;          name: &quot;input_reserve&quot;,&#xD;&#xA;          type: &quot;Balance&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          name: &quot;output_reserve&quot;,&#xD;&#xA;          type: &quot;Balance&quot;&#xD;&#xA;        },&#xD;&#xA;        {&#xD;&#xA;          name: &quot;sell_amount&quot;,&#xD;&#xA;          type: &quot;Balance&quot;&#xD;&#xA;        }&#xD;&#xA;      ],&#xD;&#xA;      type: &quot;XYKRpcResult&lt;Balance&gt;&quot;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    )&#xD;&#xA;&#xD;&#xA;Ideally, we would like to call this RPC method as follows:&#xD;&#xA;&#xD;&#xA;    api.rpc.xyk.calculate_buy_price() &#xD;&#xA;&#xD;&#xA;Unfortunately, this is currently not possible, and we have to use the following workaround:&#xD;&#xA;&#xD;&#xA;    (api.rpc as any).xyk.calculate_buy_price() &#xD;&#xA;&#xD;&#xA;This workaround is not optimal. According to the [docs][2] &#xD;&#xA;&#xD;&#xA;*you can define a firstModule_testMethod on the Rust node and if correctly defined it will be callable via api.rpc.firstModule.testMethod(...)*&#xD;&#xA;&#xD;&#xA;In our node, we have defined this method as **xyk_calculate_buy_price**, following this structure. We have noticed that when we generate the metadata, the module xyk is not present in the augment-api-rpc.ts file. We suspect that this is causing the issue. How can we include these RPC methods in the metadata? Alternatively, what steps should be taken to resolve this?&#xD;&#xA;&#xD;&#xA;Any assistance would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/mangata-finance/types/blob/rc/1.0.0/package.json#L21&#xD;&#xA;  [2]: https://polkadot.js.org/docs/api/start/rpc.custom/#custom-definitions" ContentLicense="CC BY-SA 4.0" />
  <row Id="36470" PostHistoryTypeId="5" PostId="9111" RevisionGUID="c6660a7b-032f-4807-84e6-5b880b6e6980" CreationDate="2023-07-07T06:30:13.027" UserId="2372" Comment="added 2 characters in body" Text="In the context of the `Substrate` framework, I'm trying to understand the differences between an `HTTP server`, an `RPC server`, and `WebSockets`. Specifically, how do these communication mechanisms relate to Substrate and what are their use cases within the framework? How does each of them facilitate interactions with the Substrate blockchain network? Are there any advantages or disadvantages of using one over the others? I'm looking for insights into the technical aspects and practical implications of choosing between an HTTP server, an RPC server, or WebSockets when developing applications on the Substrate framework.&#xD;&#xA;&#xD;&#xA;To assist you better, I would like to clarify that the calls made to Substrate can be categorized based on the protocols used: HTTP, RPC, and WS. It would be greatly appreciated if you could provide an explanation along with a separate list for each category. Additionally, it would be helpful to understand the rationale behind categorizing them separately.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36471" PostHistoryTypeId="5" PostId="9107" RevisionGUID="fb7f2f7c-005e-4297-8c70-ab1d759ae842" CreationDate="2023-07-07T06:30:22.840" UserId="2372" Comment="added 2 characters in body" Text="I'm adding `ping pallet` in the parachain and i'm facing this issue &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/OXxnd.png&#xD;&#xA;&#xD;&#xA;Can anyone guide me through this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36472" PostHistoryTypeId="5" PostId="9099" RevisionGUID="af2c1cb4-6a6b-44d8-bc4e-80980630635c" CreationDate="2023-07-07T06:30:32.183" UserId="2372" Comment="added 2 characters in body" Text="Are there any `pallet` examples for custom making `XCM` call. I know there is ping pallet provided by cumulus but I believe that is pretty old. &#xD;&#xA;&#xD;&#xA;Does ping pallet still works? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36473" PostHistoryTypeId="5" PostId="9095" RevisionGUID="1840859c-112e-44a4-8e83-4a1e62acea93" CreationDate="2023-07-07T06:30:45.697" UserId="2372" Comment="added 2 characters in body" Text="Error with `block` built on &#xD;&#xA;&#xD;&#xA;`0xxxx: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #xx&quot;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Block production and also finalization stopped, in txpool I found sudo call, and remove it via `author_removeExtrinsic`, but block production not fixed&#xD;&#xA;&#xD;&#xA;UPD:&#xD;&#xA;&#xD;&#xA;There were 2 validators in the network and I wanted to add a third one using `validatorSet.addValidator()`. However, I mistakenly executed `validatorSet.forceRotateSession()`.&#xD;&#xA;&#xD;&#xA;Prior to that, I also executed `grandpa.NoteStalled()` because finalization had stopped.&#xD;&#xA;&#xD;&#xA;After this, `validatorSet.forceRotateSession()` took a very long time and the transaction did not go through, getting stuck in the queue. Now everything has stopped, including block production and finalization.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;LOG:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    2023-07-02 16:24:58.689  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x7a4e64085afc435b04e366871435ad7c394c09f730a19caaf31d7da2645a6813&#xD;&#xA;    2023-07-02 16:24:58.715  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Prepared block for proposing at 9690000 [hash: 0xdbb7c1026537c7ded7a69b878ebec1570dd0d7d9a151673bf75ba76555fd957b; parent_hash: 0x7a4e…6813; extrinsics (3): [0x105c…49a3, 0x0e90…8485, 0xaf9f…8ed2]]&#xD;&#xA;    2023-07-02 16:24:58.716  INFO tokio-runtime-worker aura:  Pre-sealed block for proposal at 9690000. Hash now 0x5628567644e59458cba37accf115ffa14c7b2df8cff0f46da8f1f49afeb21379, previously 0xdbb7c1026537c7ded7a69b878ebec1570dd0d7d9a151673bf75ba76555fd957b.&#xD;&#xA;    2023-07-02 16:24:58.717  INFO tokio-runtime-worker afg: Not applying authority set change forced at block #9689995, due to pending standard change at block #9689962&#xD;&#xA;    2023-07-02 16:24:58.717  WARN tokio-runtime-worker aura: Error with block built on 0x7a4e64085afc435b04e366871435ad7c394c09f730a19caaf31d7da2645a6813: ClientImport(&quot;A pending forced authority set change could not be applied since it must be applied after the pending standard change at #9689962&quot;)&#xD;&#xA;    2023-07-02 16:25:03.149  INFO tokio-runtime-worker substrate:  Idle (1 peers), best: #9689999 (0x7a4e…6813), finalized #9689961 (0x4b87…a82f), ⬇ 83 B/s ⬆ 0.7kiB/s&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36474" PostHistoryTypeId="2" PostId="9196" RevisionGUID="24d31a66-3964-4840-a981-2192c3afba26" CreationDate="2023-07-07T06:31:26.090" UserId="2844" Text="We wan't to run multiple node on multiple devices. We use [`substrate-node-template`](https://github.com/substrate-developer-hub/substrate-node-template) to do that. We build the project using `cargo build --release` and follow this [Add trusted node](https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/#prepare-to-launch-the-private-network) tutorial. We were able to generate [`chainSpec.json`](https://drive.google.com/file/d/18BalzeEdhaSYjRD6PPhz-7jmOYPldGbV/view?usp=sharing) and converted to [`chainSpecRaw.json`](https://drive.google.com/file/d/1iCsSvkPTLpJWQJjrQOquO-fLtwSbbRmr/view?usp=sharing) after modify `aura` &amp; `grandpa` fields. We then add keys to the keystore and run first node:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;      --base-path /tmp/node01 \&#xD;&#xA;      --chain ./customSpecRaw.json \&#xD;&#xA;      --port 30333 \&#xD;&#xA;      --ws-port 9945 \&#xD;&#xA;      --rpc-port 9933 \&#xD;&#xA;      --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;      --validator \&#xD;&#xA;      --rpc-methods Unsafe \&#xD;&#xA;      --name MyNode01 \&#xD;&#xA;      --password-interactive&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;On second device send `chainSpecRaw.json` file then add keys to keystore of second node and run second node:&#xD;&#xA;`ip4` of device where first node running: `27.34.100.91`&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;      --base-path /tmp/node02 \&#xD;&#xA;      --chain ./customSpecRaw.json \&#xD;&#xA;      --port 30334 \&#xD;&#xA;      --ws-port 9946 \&#xD;&#xA;      --rpc-port 9934 \&#xD;&#xA;      --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;      --validator \&#xD;&#xA;      --rpc-methods Unsafe \&#xD;&#xA;      --name MyNode02 \&#xD;&#xA;      --bootnodes /ip4/27.34.100.91/tcp/30333/p2p/12D3KooWLk8ER6sbMAZa8uzf6YmyMo8FvpCiMgrFW4NfReez5um4 \&#xD;&#xA;      --password-interactive&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;No two node peers with each other. Can you please helps us why we are having this issue?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ebbBQ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/1YY63.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36476" PostHistoryTypeId="1" PostId="9196" RevisionGUID="24d31a66-3964-4840-a981-2192c3afba26" CreationDate="2023-07-07T06:31:26.090" UserId="2844" Text="Can't able to peer two different node on different computers" ContentLicense="CC BY-SA 4.0" />
  <row Id="36477" PostHistoryTypeId="3" PostId="9196" RevisionGUID="24d31a66-3964-4840-a981-2192c3afba26" CreationDate="2023-07-07T06:31:26.090" UserId="2844" Text="|substrate-node-template|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36478" PostHistoryTypeId="5" PostId="9195" RevisionGUID="23010f78-07fc-4472-9c7c-3665d88a5161" CreationDate="2023-07-07T06:31:36.083" UserId="2372" Comment="added 2 characters in body" Text="I am using `subxt` library . I have downloaded metadata from chain using this url **wss://rpc.polkadot.io:443 ** . I want to know how can i add validator to the chain using subxt  &#xD;&#xA;library ." ContentLicense="CC BY-SA 4.0" />
  <row Id="36479" PostHistoryTypeId="5" PostId="9194" RevisionGUID="5c853c77-48ce-4c90-8f9c-41268209bc4b" CreationDate="2023-07-07T06:31:54.567" UserId="2372" Comment="edited body" Text="when running a nodes, firewall is essential?&#xD;&#xA;&#xD;&#xA;i used this command `sudo ufw allow 3033/tpc` but it`s result is &quot;ERROR: Bad port&quot;&#xD;&#xA;&#xD;&#xA;what`s the problem? can i just done &quot;sudo ufw enable&quot; without allow 3033/tpc ?&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="36480" PostHistoryTypeId="5" PostId="9074" RevisionGUID="c31e1ccc-edee-454a-9ee3-66e4a310ea7d" CreationDate="2023-07-07T06:32:20.723" UserId="2372" Comment="added 2 characters in body" Text="I'm trying to arrange some unit tests for a local http server connectivity my node communicates with.&#xD;&#xA;&#xD;&#xA;While the `node` has no troubles while sending requests, I face difficulties trying to build basic unit tests for this functionality.&#xD;&#xA;&#xD;&#xA;My code looks as follows:&#xD;&#xA;```rust&#xD;&#xA;    let (mut offchain, _offchain_state) = TestOffchainExt::with_offchain_db(ext.offchain_db());&#xD;&#xA;	ext.register_extension(OffchainWorkerExt::new(offchain.clone()));&#xD;&#xA;    if let Ok(request) = offchain.http_request_start(&quot;GET&quot;, &quot;http://127.0.0.1:9800&quot;, &amp;[]) {&#xD;&#xA;        offchain.http_response_wait(&amp;[request], None);&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;which yields a panic in&#xD;&#xA;```primitives/core/src/offchain/testing.rs -&gt; fn http_response_wait(...)```&#xD;&#xA;&#xD;&#xA;I also tried to run a similar logic inside the externalities context like so: &#xD;&#xA;```rust&#xD;&#xA;	ext.register_extension(OffchainWorkerExt::new(offchain.clone()));&#xD;&#xA;	ext.execute_with(|| {&#xD;&#xA;        Request::get(&quot;http://127.0.0.1:9800&quot;).send().map(PendingRequest::wait);&#xD;&#xA;    // snip&#xD;&#xA;```&#xD;&#xA;with exactly the same result.&#xD;&#xA;&#xD;&#xA;And I can see that on the server side no request arrives.&#xD;&#xA;On the other hand when I run the node everything works fine, so I guess this is not a server problem and I must have missed something. " ContentLicense="CC BY-SA 4.0" />
  <row Id="36481" PostHistoryTypeId="5" PostId="9073" RevisionGUID="36b6f7d9-403f-41b2-a5db-833bc427e92d" CreationDate="2023-07-07T06:32:36.803" UserId="2372" Comment="added 2 characters in body" Text="What are the differences while using `XCM V2` or `V3`? For example if I want to send DOT from Polkadot to `Astar`. Do I have to pay less fee?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36482" PostHistoryTypeId="5" PostId="9072" RevisionGUID="cfc41bb9-fb29-479e-a364-7bf48c1e4ae5" CreationDate="2023-07-07T06:32:57.653" UserId="2372" Comment="added 2 characters in body" Text="After reading through the BLS related issues in the `substrate` repo, it isn't quite clear to me what type of support is planned for the BLS signature scheme. It seems like the primary goal is to integrate it into BEEFY. &#xD;&#xA;&#xD;&#xA;But could we also be seeing BLS supported in the `MultiSignature` enum? Will it be possible to use BLS public keys to control funds from the balances pallet? If we were to build a pallet today with future BLS support in mind, are there any recommendations on how to proceed?&#xD;&#xA;&#xD;&#xA;In particular, it seems that the BLS public keys are not 32 bytes and they cannot be recovered from the signature in the way that `ecdsa` signatures can be. Hence, we would not be able to use `AccountId32` for the `AccountId` associated type in the `frame_system::Config` trait and would instead need an enum type instead of `AccountId32`. That is at least one issue I see. Thus, I am guessing substrate may not directly support BLS in their `MultiSignature` type. So if we were to plan for eventual BLS support and develop a runtime with future compatibility, would it make sense to use an enum for the `AccountId` associated type and then eventually append a type that represents BLS public keys?&#xD;&#xA;&#xD;&#xA;For my use case, I'd like to implement a rollup pallet to batch extrinsics that would use a storage map with `u32` as the key and BLS public key type as the value. The payload for each subextrinsic would contain `u32` values instead of public keys which would point to stored BLS public keys which would control their own funds. Operations would then be performed on the accounts' behalf once the aggregated signature is verified." ContentLicense="CC BY-SA 4.0" />
  <row Id="36483" PostHistoryTypeId="5" PostId="8131" RevisionGUID="467277de-29fc-4d6b-b1f3-9e6a66df0896" CreationDate="2023-07-07T06:36:11.203" UserId="2372" Comment="added 2 characters in body" Text="I understand the entire path of a `parachain` block upto and including its candidateReciept being &quot;included&quot; on the relaychain, and its erasure coded PoVs being available with the relaychain validators - incase the parent block's collator fails to share the block.&#xD;&#xA;&#xD;&#xA;What I do not understand is how does the subsequent collator know which is the block (or rather the hash) that it should build on?&#xD;&#xA;&#xD;&#xA;Does the collator attempt to read the relaychain state to find the latest parchain block hash in the parachain relevant storage (the ones that are updated upon candidateReceipt inclusion) either explicitly or implicitly? Does it read the relaychain blocks for it? Does it somehow depend on the relaychain validators for this info? &#xD;&#xA;&#xD;&#xA;Also, at what point is this info apparent to the collator?&#xD;&#xA;&#xD;&#xA;Further, and very importantly, once a collator has recognized which parachain parent block to build on and then imported it, we can consider the parachain parent block to be &quot;finalized&quot;, right? Save for relaychain re-orgs that is.&#xD;&#xA;&#xD;&#xA;I would greatly appreciate if this were to be pointed out in code as well.&#xD;&#xA;&#xD;&#xA;Thank you very much!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="36484" PostHistoryTypeId="5" PostId="7936" RevisionGUID="b52250d2-f731-4b74-a7a7-607dbf6a1540" CreationDate="2023-07-07T06:36:49.743" UserId="2372" Comment="added 2 characters in body" Text="I have written a simple `block` import that wraps grandpa block import, it does tiny verification and calls grandpa block import after that, it looks like this:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub struct CustomBlockImport&lt;I&gt; {&#xD;&#xA;	grandpa_block_import: I,&#xD;&#xA;}&#xD;&#xA;#[async_trait::async_trait]&#xD;&#xA;impl&lt;I: sc_consensus::BlockImport&lt;Block&gt;&gt; sc_consensus::BlockImport&lt;Block&gt; for WitnessBlockImport&lt;I&gt;&#xD;&#xA;where&#xD;&#xA;	I: Send,&#xD;&#xA;{&#xD;&#xA;	type Error = ConsensusError;&#xD;&#xA;	type Transaction = I::Transaction;&#xD;&#xA;&#xD;&#xA;	async fn check_block(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		block: BlockCheckParams&lt;Block&gt;,&#xD;&#xA;	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;return self&#xD;&#xA;				.grandpa_block_import&#xD;&#xA;				.import_block(block, cache)&#xD;&#xA;				.await&#xD;&#xA;				.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	async fn import_block(&#xD;&#xA;		&amp;mut self,&#xD;&#xA;		block: BlockImportParams&lt;Block, Self::Transaction&gt;,&#xD;&#xA;		cache: HashMap&lt;well_known_cache_keys::Id, Vec&lt;u8&gt;&gt;,&#xD;&#xA;	) -&gt; Result&lt;ImportResult, Self::Error&gt; {&#xD;&#xA;// if block is already finalized no need for my custom verification, just run grandpa block import		&#xD;&#xA;if block.finalized {&#xD;&#xA;			log::info!(&quot;block already finalized&quot;);&#xD;&#xA;return self&#xD;&#xA;				.grandpa_block_import&#xD;&#xA;				.import_block(block, cache)&#xD;&#xA;				.await&#xD;&#xA;				.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;		}&#xD;&#xA;		// do some verification&#xD;&#xA;		return self&#xD;&#xA;			.grandpa_block_import&#xD;&#xA;			.import_block(block, cache)&#xD;&#xA;			.await&#xD;&#xA;			.map_err(|e| ConsensusError::ClientImport(format!(&quot;{}&quot;, e)))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried using `block.finalized` field to detect whether its already finalized or not however in my simple network, I start three authorities  (Alice, Bob, Charlie) and delay running the final authority (Dave) after quite some time (so that the first three get to finalize some blocks); when I start the Dave node, it does not log `block already finalized` as it should, instead it goes and do my custom verification logic.&#xD;&#xA;&#xD;&#xA;why is this happening and how to solve this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36485" PostHistoryTypeId="5" PostId="7886" RevisionGUID="44e06126-1c15-47a2-bbe4-13d56fcd82ad" CreationDate="2023-07-07T06:37:14.773" UserId="2372" Comment="added 2 characters in body" Text="I observe an issue for a long time that I can't explain.&#xD;&#xA;&#xD;&#xA;There is a value produced in `BlockImport::import_block` that must be included in inherents of `n+1`.&#xD;&#xA;Though sometimes it seems like value is not available yet.&#xD;&#xA;I have checked the code multiple times over last months and can't find any issue with it.&#xD;&#xA;&#xD;&#xA;This seems to be correlated with blocks produced locally by the `node`.&#xD;&#xA;I'm wondering if it is possible that block `n` is built locally and block building starts for `n+1` (creating inherents, etc) before `n` goes through `BlockImport::import_block` successfully (it doesn't do full execution there because `block.state_action == StateAction::ApplyChanges`)?&#xD;&#xA;&#xD;&#xA;Consensus is custom, but based on `sc-consensus-slots`." ContentLicense="CC BY-SA 4.0" />
  <row Id="36486" PostHistoryTypeId="5" PostId="4968" RevisionGUID="2c3af927-f344-4a13-9a0f-faecea183681" CreationDate="2023-07-07T06:37:31.447" UserId="2372" Comment="added 2 characters in body" Text="We recently upgraded our chain from substrate V3 to `polkadot-0.9.24`. When we try to sync a node from 0, the block import fails on the first block where the authorities were changes (some block creator was added at that point). We are using `aura` consensus.&#xD;&#xA;&#xD;&#xA;output of our node:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2022-09-23 13:26:18 ⚙️  Syncing 22.0 bps, target=#2446795 (5 peers), best: #112556 (0xca60…3cc9), finalized #112128 (0x1dcd…ad78), ⬇ 13.1kiB/s ⬆ 2.8kiB/s    &#xD;&#xA;2022-09-23 13:26:23 ⚙️  Syncing 21.2 bps, target=#2446795 (5 peers), best: #112662 (0x345f…5f0e), finalized #112640 (0x3c2b…c601), ⬇ 13.1kiB/s ⬆ 2.5kiB/s    &#xD;&#xA;2022-09-23 13:26:28 ⚙️  Syncing 22.6 bps, target=#2446796 (5 peers), best: #112775 (0x470d…c04a), finalized #112640 (0x3c2b…c601), ⬇ 12.8kiB/s ⬆ 1.2kiB/s    &#xD;&#xA;2022-09-23 13:26:33 ⚙️  Syncing 22.2 bps, target=#2446797 (5 peers), best: #112886 (0x5742…1446), finalized #112640 (0x3c2b…c601), ⬇ 25.1kiB/s ⬆ 7.0kiB/s    &#xD;&#xA;2022-09-23 13:26:38 ⚙️  Syncing 22.2 bps, target=#2446798 (5 peers), best: #112997 (0x169a…ab2a), finalized #112640 (0x3c2b…c601), ⬇ 14.1kiB/s ⬆ 2.0kiB/s    &#xD;&#xA;2022-09-23 13:26:43 ⚙️  Syncing 22.8 bps, target=#2446799 (5 peers), best: #113111 (0xb42d…1792), finalized #112640 (0x3c2b…c601), ⬇ 14.8kiB/s ⬆ 2.3kiB/s    &#xD;&#xA;2022-09-23 13:26:48 ⚙️  Syncing 22.6 bps, target=#2446800 (5 peers), best: #113224 (0x41a5…a8fc), finalized #113152 (0x5062…70ed), ⬇ 12.4kiB/s ⬆ 2.7kiB/s    &#xD;&#xA;2022-09-23 13:26:50  Verification failed for block 0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3 received from peer: 12D3KooWQ5zzNP458fPfY2eAEDaXsxPsLMNSd73D2ywJWMznHBDu, &quot;Bad signature on 0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3&quot;    &#xD;&#xA;2022-09-23 13:26:50  Error importing block 0x43907aee965aa2455ce149bb1565aeaa8370d0aa496472f0de55ffd7375f0338: block has an unknown parent    &#xD;&#xA;2022-09-23 13:26:50  Error importing block 0xe2ffa1d2f46c777828ee6b0bb4b37d0f250bffb3fc9bba3fc2801c528c3c95c6: block has an unknown parent    &#xD;&#xA;2022-09-23 13:26:50  Error importing block 0x322cd39b6d55fd9da9d9f603e1847c17c4c53d3e0b2d930584b2a9c9b3b0a246: block has an unknown parent  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;At block `0xa06d1231c7ad3403216a427883e18bccc95e461c902ff430f13543ce7c11f5d3` we went from 2 blockcreators to 3 blockcreators. We went digging in the aura consensus client and we believe the issue comes from:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/397da2753081b3cbe4cbb0893f17b4188f0d5997/client/consensus/aura/src/import_queue.rs#L83&#xD;&#xA;&#xD;&#xA;It tries to get the author for this block to verify the signature but this seems to be failing somehow. Either it does not fetch the right author or the verification of the signature has changed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36487" PostHistoryTypeId="5" PostId="1319" RevisionGUID="bd8fab14-4ebd-4355-882f-a6241bed9581" CreationDate="2023-07-07T06:37:58.940" UserId="2372" Comment="added 1 character in body" Text="I found it a bit confusing that part of the logic for block verification is in `sc_consensus::import_queue::Verifier::verify()` implementation and another part is in `sc_consensus::block_import::BlockImport::import_block()` implementation.&#xD;&#xA;&#xD;&#xA;`Vefifier` description says &quot;Verify a justification of a block&quot;, but after looking at https://stackoverflow.com/a/58059237/3806795 and source code of Aura and BABE, it doesn't seem that verifier there has anything to do with finality.&#xD;&#xA;&#xD;&#xA;`sc-consensus-pow` is much simpler, from it it seems that `Verify` is for things that can be verified right away without assuming that any other block was imported and `BlockImport` verifies the rest.&#xD;&#xA;&#xD;&#xA;Do I understand correctly that `Verify` needs to do quick isolated check and `BlockImport` everything that requires previous blocks to be imported and there should be no overlap in what they check (in other words it is guaranteed that `Verify::verify()` will called be first, so no need to do the same work again in `BlockImport::import_block()`)? &#xD;&#xA;&#xD;&#xA;For context: I'm working on a custom non-PoS consensus and want to make sure I'm doing it properly." ContentLicense="CC BY-SA 4.0" />
  <row Id="36488" PostHistoryTypeId="5" PostId="9150" RevisionGUID="d2438beb-ceb1-44f5-a4f0-632388e902ec" CreationDate="2023-07-07T06:45:14.757" UserId="2372" Comment="added 1 character in body" Text="Currently trying to create a way to attempt a new `ApiPromise` .If a specific RPC is deemed to be down / unavailable&#xD;&#xA;&#xD;&#xA;Code basically looks like this&#xD;&#xA;```typescript&#xD;&#xA;const api = await ApiPromise.create({&#xD;&#xA;					provider: new WsProvider(endpoint),&#xD;&#xA;					rpc: polkadotApiRpc,&#xD;&#xA;					types: polkadotApiTypes,&#xD;&#xA;					noInitWarn: process.env.NODE_ENV === 'production',&#xD;&#xA;					throwOnConnect: true,&#xD;&#xA;				});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When the endpoint is unavailable it successfully throws,&#xD;&#xA;however the attempts to continue to connect to the websocket endpoint continues.&#xD;&#xA;&#xD;&#xA;Is there anyway to properly **cleanup** the ApiPromise so that it doesn't spam the console, as in if it throws, nothing is leftover.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="36489" PostHistoryTypeId="5" PostId="9148" RevisionGUID="840d7043-ad51-4929-a315-5eb31ab10a53" CreationDate="2023-07-07T06:46:08.027" UserId="2372" Comment="added 2 characters in body" Text="I am trying to assemble a list of all voters on a `referendum` with their votes, etc. I need help on what `storage` pallet to call, I tried calling the functions on the `convictionVoting` pallet which is not working for me. " ContentLicense="CC BY-SA 4.0" />
  <row Id="36491" PostHistoryTypeId="5" PostId="8610" RevisionGUID="2f2c3734-bf76-452e-b88a-929f1f200e13" CreationDate="2023-07-07T07:04:10.373" UserId="2372" Comment="added 2 characters in body" Text="I have a `substrate node` of `Polkadot 0.9.28`.  It is customised to enable contracts, and I have enabled the contract and runtime pallets. The tutorial I worked on is no more available in substrate docs. I have updated my Ink version from `3 to 4`. Now while working with the nodejs to deploy the contract on the chain I am facing issues. I have updated my `@polkadot/api` and `@polkadot/api-contrat packages`. I don't know why the development does not work. Hence I would like to update Polakdot to a new version while retaining the features of **`contract-pallet`** and **`runtime-pallet`**. Is there a way to update it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36492" PostHistoryTypeId="5" PostId="9120" RevisionGUID="1b0ef8f0-0a5e-4c61-8ccb-a7f0bef008ca" CreationDate="2023-07-07T07:04:33.807" UserId="2372" Comment="added 1 character in body" Text="I am getting ump.InvalidFormat when I sending a XCM / UMP from local a local parachain setup to relay chain to. the message instruction is[1][withdraw, buydeposit, deposit] on the relaychain&#xD;&#xA;I am using the substrate-parahchain-template and polkadot.git as relay chain and zomebiet net to start a local chain in order to test sending anc XCM. I am following the example  [here][1] to create and send the xcm message. I have attached images of the zombienet config, xcm message and xcm events are the relaychain. &#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;UPDATE&#xD;&#xA;---&#xD;&#xA;I have set the safXcmVersion of both the relay chain and the parachain to v2 however I still get thesame error. Looking the the polkadotXcm.sent event emitted by the parachain (image attached), I can see that it sends the xcm message using v3 even though the safeXcmVersion on both chains is set to v2&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][6]][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZBCMV.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/yUwzN.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/2jQgq.jpg&#xD;&#xA;  [4]: https://i.stack.imgur.com/anrvH.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/21E1i.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/pakfa.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36493" PostHistoryTypeId="5" PostId="9161" RevisionGUID="b9177fe1-f87d-4ecc-9f85-5db94ef41e44" CreationDate="2023-07-07T07:04:51.463" UserId="2372" Comment="added 2 characters in body" Text="Does anyone know why the template provided in [this][1] repo doesn't include any governance? I noticed that the `Cumulus` repo does include a [sudo][2].&#xD;&#xA;&#xD;&#xA;I run a parachain using this template and was unable to perform an upgrade due to the lack of governance. As a result, I had to instantiate a new parachain from scratch, this time including the sudo pallet. Actually, I still have an [unresolved][3] question about performing the upgrade from the relay chain as a workaround.&#xD;&#xA;&#xD;&#xA;What's the rationale behind excluding any form of governance from this template?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [2]: https://github.com/paritytech/cumulus/blob/master/parachain-template/runtime/src/lib.rs#L489&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/8832/upgrade-parachain-without-sudo" ContentLicense="CC BY-SA 4.0" />
  <row Id="36494" PostHistoryTypeId="5" PostId="8540" RevisionGUID="f49f5595-4863-4958-847d-279d7c016441" CreationDate="2023-07-07T07:06:07.257" UserId="2372" Comment="added 2 characters in body" Text="We are on arch `linux` and have been compiling the substrate node template just fine. Then with a recent rolling update of the OS we cannot compile the substrate template node.&#xD;&#xA;Some warnings about wasm-opt-sys&#xD;&#xA;```&#xD;&#xA;The following warnings were emitted during compilation:&#xD;&#xA;&#xD;&#xA;warning: In file included from /home/...myuser/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-opt-sys-0.111.0/binaryen/src/wasm/wat-lexer.cpp:25:&#xD;&#xA;warning: /home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-opt-sys-0.111.0/binaryen/src/wat-lexer.h:62:3: error: ‘uint64_t’ does not name a type&#xD;&#xA;warning:    62 |   uint64_t n;&#xD;&#xA;warning:       |   ^~~~~~~~&#xD;&#xA;```&#xD;&#xA;after a lot of warnings then the error&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `wasm-opt-sys v0.111.0`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/.../code/target/release/build/wasm-opt-sys-100767d7e9b2317c/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; running: &quot;c++&quot; &quot;-O0&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;/home/.../code/target/release/build/wasm-opt-sys-9d165c4dcf677b01/out/cxxbridge/include&quot; &quot;-I&quot; &quot;/home/.../code/target/release/build/wasm-opt-sys-9d165c4dcf677b01/out/cxxbridge/crate&quot; &quot;-I&quot; &quot;/home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-opt-sys-0.111.0/binaryen/src&quot; &quot;-I&quot; &quot;/home/.../.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-opt-sys-0.111.0/binaryen/src/tools&quot; &quot;-I&quot; &quot;/home/.../code/target/release/build/wasm-opt-sys-9d165c4dcf677b01/out&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wno-unused-parameter&quot; &quot;-DTHROW_ON_FATAL&quot; &quot;-o&quot; &quot;/home/.../code/target/release/build/wasm-opt-sys-9d165c4dcf677b01/out/a309b73c06d115a2-lib.rs.o&quot; &quot;-c&quot; &quot;/home/.../code/target/release/build/wasm-opt-sys-9d165c4dcf677b01/out/cxxbridge/sources/wasm-opt-sys/src/lib.rs.cc&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;and it also fails on building rocksdb&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `librocksdb-sys v0.8.3+7.4.4`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36495" PostHistoryTypeId="5" PostId="998" RevisionGUID="f7f92de5-8cdd-457a-9fe4-4eff97042188" CreationDate="2023-07-07T07:07:12.443" UserId="2372" Comment="added 2 characters in body" Text="I was following [this guide Configuring Genesis for Balances](https://docs.substrate.io/reference/how-to-guides/basics/configure-genesis-state/).&#xD;&#xA;&#xD;&#xA;In my `parachain`, I replaced `T::Balance` with `BalanceOf&lt;T&gt;`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	type BalanceOf&lt;T&gt; =&#xD;&#xA;		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;    #[pallet::config]&#xD;&#xA;    pub trait Config: frame_system::Config {&#xD;&#xA;    	type Currency: ReservableCurrency&lt;Self::AccountId&gt;&#xD;&#xA;    		+ LockableCurrency&lt;Self::AccountId, Moment = Self::BlockNumber&gt;;&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;	#[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;	#[pallet::genesis_config]&#xD;&#xA;	pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;		pub single_balance: BalanceOf&lt;T&gt;,&#xD;&#xA;		pub account_map: Vec&lt;(T::AccountId, BalanceOf&lt;T&gt;)&gt;,&#xD;&#xA;	}&#xD;&#xA;	#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	impl&lt;T: Config&gt; Default for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn default() -&gt; Self {&#xD;&#xA;			Self { single_balance: Default::default(), account_map: Default::default() }&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	// https://docs.substrate.io/v3/runtime/storage#declaring-storage-items&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_value)]&#xD;&#xA;	pub type SingleValue&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;; //&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn single_balance)]&#xD;&#xA;	pub type SingleBalance&lt;T: Config&gt; = StorageValue&lt;_, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;	// A map that has enumerable entries.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn accounts)]&#xD;&#xA;	pub type AccountMap&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt;` is not satisfied.&#xD;&#xA;&#xD;&#xA;Here's the `genesis` configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[pallet::genesis_build]&#xD;&#xA;	impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;		fn build(&amp;self) {&#xD;&#xA;			&lt;SingleValue&lt;T&gt;&gt;::put(&amp;self.single_balance);&#xD;&#xA;			for (a, b) in &amp;self.account_map {&#xD;&#xA;				&lt;AccountMap&lt;T&gt;&gt;::insert(a, b);&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;And the error I'm getting:&#xD;&#xA;&#xD;&#xA;`EncodeLike&lt;u32&gt;` is not implemented for `&amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;&#xD;&#xA;`122 |     pub fn put&lt;Arg: EncodeLike&lt;Value&gt;&gt;(val: Arg) {&#xD;&#xA;     |                ^^^^^^^^^^^^^^^^ required by this bound in frame_support::pallet_prelude::StorageValue::&lt;Prefix, Value, QueryKind, OnEmpty&gt;::put&#xD;&#xA;help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; &#xD;&#xA;    where &amp;&lt;&lt;T as pallet::Config&gt;::Currency as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance: EncodeLike&lt;u32&gt; {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36496" PostHistoryTypeId="5" PostId="991" RevisionGUID="82f24425-e2dc-4695-a9c5-854003dfb289" CreationDate="2023-07-07T07:07:34.253" UserId="2372" Comment="added 2 characters in body" Text="Using either a Rust or JavaScript client library I would like to get the amount of DOT that is currently being unbonded on the relay chain.&#xD;&#xA;&#xD;&#xA;Some staking information is available in the `Polkadot` JS interface:&#xD;&#xA;&#xD;&#xA;[![Staking information][1]][1]&#xD;&#xA;&#xD;&#xA;But it does not include any information about the amount of `DOT` that is being `unstaked` (i.e. DOT that is currently in the 28 day unbonding period).&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mS0IA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36497" PostHistoryTypeId="5" PostId="8886" RevisionGUID="95a65a3d-cbf8-473f-889d-f9f0473ef1d6" CreationDate="2023-07-07T07:08:04.277" UserId="2372" Comment="added 2 characters in body" Text="Im getting the following error while trying to run `e2e` rust ink! smart contracts tests:&#xD;&#xA;```#![feature(min_specialization)]``` using the following command: ```cargo test --features e2e-tests```&#xD;&#xA;&#xD;&#xA;Im using the following example to run the e2e tests : https://github.com/swanky-dapps/manic-minter&#xD;&#xA;&#xD;&#xA;The smart contract itself compiles successfully with the following command: &#xD;&#xA;```cargo contract build```&#xD;&#xA;&#xD;&#xA;Here is how the e2e test looks like:&#xD;&#xA;```&#xD;&#xA;    #[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;    mod e2e_tests {&#xD;&#xA;        use super::*;&#xD;&#xA;        use crate::manicminter::ManicMinterRef;&#xD;&#xA;        use ink::primitives::AccountId;&#xD;&#xA;        use ink_e2e::build_message;&#xD;&#xA;        use openbrush::contracts::ownable::ownable_external::Ownable;&#xD;&#xA;        use openbrush::contracts::psp22::psp22_external::PSP22;&#xD;&#xA;        use oxygen::oxygen::OxygenRef;&#xD;&#xA;&#xD;&#xA;        type E2EResult&lt;T&gt; = std::result::Result&lt;T, Box&lt;dyn std::error::Error&gt;&gt;;&#xD;&#xA;&#xD;&#xA;        const AMOUNT: Balance = 100;&#xD;&#xA;        const PRICE: Balance = 10;&#xD;&#xA;&#xD;&#xA;        /// Helper to get Bob's account_id from `ink_e2e::bob()` PairSigner&#xD;&#xA;        fn get_bob_account_id() -&gt; AccountId {&#xD;&#xA;            let bob = ink_e2e::bob::&lt;ink_e2e::PolkadotConfig&gt;();&#xD;&#xA;            let bob_account_id_32 = bob.account_id();&#xD;&#xA;            let bob_account_id = AccountId::try_from(bob_account_id_32.as_ref()).unwrap();&#xD;&#xA;&#xD;&#xA;            bob_account_id&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is my Cargo.toml file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.0&quot;, default-features = false }&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;openbrush = { git = &quot;https://github.com/727-Ventures/openbrush-contracts&quot;, tag=&quot;3.0.0&quot;, default-features= false, features = [&quot;psp22&quot;] }&#xD;&#xA;my_psp22 = { path = &quot;../my_psp22&quot;,version=&quot;1.0.0&quot;,default-features = false, features = [&quot;ink-as-dependency&quot;] }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.0.1&quot; &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks in advance :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="36498" PostHistoryTypeId="5" PostId="8877" RevisionGUID="126f369b-80f8-4458-bab1-d58f16d0d2fe" CreationDate="2023-07-07T07:08:40.690" UserId="2372" Comment="added 2 characters in body" Text="i'm trying to create a blockchain runtime module using `Substrate`. I have defined a few data structures with the `#[derive(MaxEncodedLen)] `attribute, but I'm running into a problem when trying to compile the code. Specifically, the compiler is giving an error for structures containing `Vec&lt;u8&gt;`.&#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    #[scale_info(skip_type_params(AccountId, Data, Quantity))]&#xD;&#xA;    pub struct Collection&lt;AccountId, Data, Quantity&gt; {&#xD;&#xA;        /// Class metadata&#xD;&#xA;        pub metadata: Vec&lt;u8&gt;,&#xD;&#xA;        //...&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    #[scale_info(skip_type_params(AccountId))]&#xD;&#xA;    pub struct ShareProfitsInfo&lt;AccountId&gt; {&#xD;&#xA;        /// Token metadata&#xD;&#xA;        pub percentage: Vec&lt;u8&gt;,&#xD;&#xA;        //...&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    #[scale_info(skip_type_params(AccountId, Data))]&#xD;&#xA;    pub struct NFT&lt;AccountId, Data&gt; {&#xD;&#xA;        /// Token metadata&#xD;&#xA;        pub metadata: Vec&lt;u8&gt;,&#xD;&#xA;        //...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The compiler error message is:&#xD;&#xA;&#xD;&#xA;    no function or associated item named max_encoded_lenfound for structVec&lt;u8&gt;in the current scope function or associated item not found inVec&lt;u8&gt;`&#xD;&#xA;&#xD;&#xA;As I understand, the `MaxEncodedLen` trait isn't implemented for `Vec&lt;u8&gt;`, but I'm not sure how to go about solving this issue. How can I implement `MaxEncodedLen` for my structures containing `Vec&lt;u8&gt;`?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36499" PostHistoryTypeId="2" PostId="9197" RevisionGUID="64a283d1-2efc-4441-9a22-8a7c8cc5758d" CreationDate="2023-07-07T07:18:17.657" UserId="2762" Text="To decide the best solution it really depends of what cause the problem, any idea what was wrong with the upgrade? If is something wrong with the upgrade you might want to fix it and perform the runtime upgrade again, see [What is the proper way of executing a runtime upgrade on a parachain?][1]&#xD;&#xA;&#xD;&#xA;If you have a backup you will be able to launch your parachain with that backup, see how here: [Parachain recovery][2].&#xD;&#xA;&#xD;&#xA;If not you might need to use sudo privilegies to revert unfinalized blocks: [How to revert a bricked chain due to bad setCode][3]&#xD;&#xA;&#xD;&#xA;There are 2 previous answers on StackExchange about this topic, they are more theoretical but it might be interesting for you to read:&#xD;&#xA;&#xD;&#xA; - [How do I recover quickly if the number of healthy nodes for my parachain reaches zero?][4]&#xD;&#xA; - [How to unbrick a Substrate Chain? --revert?][5]&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;If not, in case you are running it locally you can `revert` the unfinalized blocks: [How to revert a bricked chain due to bad setCode][3]&#xD;&#xA;&#xD;&#xA;For parachains in production, there is a whole discussion around parachain recoveries in the Polkadot Forum: [How to Recover a Parachain][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1061/what-is-the-proper-way-of-executing-a-runtime-upgrade-on-a-parachain&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/5686/parachain-recovery&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/283/how-to-revert-a-bricked-chain-due-to-bad-setcode&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/3581/how-do-i-recover-quickly-if-the-number-of-healthy-nodes-for-my-parachain-reaches&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/168/how-to-unbrick-a-substrate-chain-revert&#xD;&#xA;  [6]: https://forum.polkadot.network/t/how-to-recover-a-parachain/673?page=2" ContentLicense="CC BY-SA 4.0" />
  <row Id="36501" PostHistoryTypeId="2" PostId="9198" RevisionGUID="0f337e3d-0bb8-470d-a83a-c51ded093540" CreationDate="2023-07-07T07:29:41.187" UserId="2762" Text="Not sure if there is an easy way to do it like it is with PolkadotJS, but I check the code of the `subkey tool` and can share how I am getting a SS58 Address from a hex public key.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use sp_core::{crypto::{Ss58AddressFormatRegistry, Ss58Codec}, sr25519::Pair};&#xD;&#xA;use sp_runtime::{MultiSigner};&#xD;&#xA;&#xD;&#xA;let ss58_address = hex_public_key_to_ss58_address::&lt;Pair&gt;(public_str)?;&#xD;&#xA;&#xD;&#xA;fn hex_public_key_to_ss58_address&lt;Pair&gt;(&#xD;&#xA;	public_str: String,&#xD;&#xA;) -&gt; Result&lt;String, Box&lt;dyn std::error::Error&gt;&gt;&#xD;&#xA;where&#xD;&#xA;	Pair: sp_core::Pair,&#xD;&#xA;	Pair::Public: Into&lt;MultiSigner&gt;,&#xD;&#xA;{&#xD;&#xA;    let public = array_bytes::hex2bytes(&amp;public_str).expect(&quot;Failed to convert hex to bytes&quot;);&#xD;&#xA;	let public_key = Pair::Public::try_from(&amp;public)&#xD;&#xA;        .map_err(|_| &quot;Failed to construct public key from given hex&quot;)?;&#xD;&#xA;    let ss58_address = public_key.to_ss58check_with_version(Ss58AddressFormatRegistry::SubstrateAccount.into()):&#xD;&#xA;&#xD;&#xA;    Ok(ss58_address)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36503" PostHistoryTypeId="2" PostId="9199" RevisionGUID="85eba59b-c64a-4766-82dc-4271cb4762f6" CreationDate="2023-07-07T07:31:07.167" UserId="4068" Text="According to  me there can be 2 possible scenarios due to which this can happen:&#xD;&#xA;&#xD;&#xA; - The most basic one is because of `firewall`, it is not allowing the connection from other system.&#xD;&#xA; - The other possible scenario is you didn't provide the right IP address and  the bootnode ID, you can check that also.&#xD;&#xA;&#xD;&#xA;Most probably it is the first case so you need to check the rules of your firewall is it accepting connections or not." ContentLicense="CC BY-SA 4.0" />
  <row Id="36505" PostHistoryTypeId="5" PostId="9194" RevisionGUID="2fd0f901-b5ae-420e-ae03-e64de9044a2d" CreationDate="2023-07-07T07:34:48.507" UserId="4381" Comment="added 120 characters in body" Text="when running a nodes, firewall is essential?&#xD;&#xA;&#xD;&#xA;i used this command `sudo ufw allow 3033/tpc` but it`s result is &quot;ERROR: Bad port&quot;&#xD;&#xA;&#xD;&#xA;what`s the problem? can i just done &quot;sudo ufw enable&quot; without allow 3033/tpc ?&#xD;&#xA;&#xD;&#xA;i can see my node still working in the telemetry while i just done &quot;sudo ufw enable&quot; only without allow 3033/tpc.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="36506" PostHistoryTypeId="2" PostId="9200" RevisionGUID="b1498bdd-dd4c-4b89-b785-8a94ec9ee6ac" CreationDate="2023-07-07T07:36:22.177" UserId="2762" Text="The answers above are brilliant, but just in case is useful for other devs I want to share a code snippet to calculate the Sovereign Account in Rust.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use scale::Encode;&#xD;&#xA;use sp_core::{crypto::{Ss58AddressFormatRegistry, Ss58Codec}, sr25519::Pair};&#xD;&#xA;use sp_runtime::{MultiSigner};&#xD;&#xA;&#xD;&#xA;let sovereign_account_str = calculate_sovereign_account::&lt;Pair&gt;(para_id)?;&#xD;&#xA;&#xD;&#xA;fn calculate_sovereign_account&lt;Pair&gt;(&#xD;&#xA;	para_id: u32,&#xD;&#xA;) -&gt; Result&lt;String, Box&lt;dyn std::error::Error&gt;&gt;&#xD;&#xA;where&#xD;&#xA;	Pair: sp_core::Pair,&#xD;&#xA;	Pair::Public: Into&lt;MultiSigner&gt;,&#xD;&#xA;{&#xD;&#xA;    // Scale encoded para_id&#xD;&#xA;    let id = RococoId(para_id);&#xD;&#xA;    let encoded_id = hex::encode(id.encode());&#xD;&#xA;&#xD;&#xA;    // Prefix para or sibl&#xD;&#xA;    let prefix = hex::encode(&quot;para&quot;); &#xD;&#xA;&#xD;&#xA;    // Join both strings and the 0x at the beginning&#xD;&#xA;    let encoded_key = &quot;0x&quot;.to_owned() + &amp;prefix + &amp;encoded_id;&#xD;&#xA;&#xD;&#xA;    // Fill the rest with 0s&#xD;&#xA;    let public_str = format!(&quot;{:0&lt;width$}&quot;, encoded_key, width = 64 + 2);&#xD;&#xA;&#xD;&#xA;    // Convert hex public key to ss58 address&#xD;&#xA;    let public = array_bytes::hex2bytes(&amp;public_str).expect(&quot;Failed to convert hex to bytes&quot;);&#xD;&#xA;	let public_key = Pair::Public::try_from(&amp;public)&#xD;&#xA;        .map_err(|_| &quot;Failed to construct public key from given hex&quot;)?;&#xD;&#xA;&#xD;&#xA;    Ok(public_key.to_ss58check_with_version(Ss58AddressFormatRegistry::SubstrateAccount.into()))&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36508" PostHistoryTypeId="5" PostId="9153" RevisionGUID="9e400fbd-3797-4215-87f5-d41c4c2d4642" CreationDate="2023-07-07T09:34:55.007" UserId="3414" Comment="deleted 4 characters in body" Text="I'm trying to transfer the collection ID from relay chain to a parachain. I am currently accessing the `collectionId` from its storage, and I am wondering if there's a way to access the storage of the `pallet_nft` on another chain in order to facilitate the transfer." ContentLicense="CC BY-SA 4.0" />
  <row Id="36509" PostHistoryTypeId="5" PostId="9109" RevisionGUID="44759826-6ee2-414b-aea2-cea9881a9847" CreationDate="2023-07-07T09:35:36.513" UserId="3414" Comment="added 1 character in body" Text="I want to pass the collection id in the from of MultiAssets to transfer it to the another chain. But i'm facing this issue &#xD;&#xA;&#xD;&#xA;    error[E0614]: type `&lt;T as pallet_nfts::Config&gt;::CollectionId` cannot be dereferenced&#xD;&#xA;       --&gt; xnft/src/lib.rs:201:30&#xD;&#xA;        |&#xD;&#xA;    201 |             let assets: MultiAssets = (*collection_id).try_into().map_err(|()| Error::&lt;T&gt;::BadVersion)?;&#xD;&#xA;        |                     &#xD;&#xA;&#xD;&#xA;                  ^^^^^^^^^^^^^^^^" ContentLicense="CC BY-SA 4.0" />
  <row Id="36511" PostHistoryTypeId="5" PostId="8761" RevisionGUID="2e0dfaa0-0477-49cd-83b6-3e174a803586" CreationDate="2023-07-07T09:36:39.720" UserId="3414" Comment="added 7 characters in body" Text="I'm adding EVM compatibility to relay chain whie doing so I faced  this error after running my blockchain. [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/KJtDK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36514" PostHistoryTypeId="2" PostId="9201" RevisionGUID="15edf799-47b0-4348-8ed9-524ce483ead8" CreationDate="2023-07-07T10:21:25.440" UserId="2281" Text="you need to change the command add  `--ws-external` `--rpc-external` `--rpc-cors all`  in your boot node command.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;  --base-path /tmp/node01 \&#xD;&#xA;  --chain ./customSpecRaw.json \&#xD;&#xA;  --ws-external\&#xD;&#xA;  --rpc-external\&#xD;&#xA;  --rpc-cors all&#xD;&#xA;  --port 30333 \&#xD;&#xA;  --ws-port 9945 \&#xD;&#xA;  --rpc-port 9933 \&#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;  --validator \&#xD;&#xA;  --rpc-methods Unsafe \&#xD;&#xA;  --name MyNode01 \&#xD;&#xA;  --password-interactive&#xD;&#xA;```&#xD;&#xA;**you can simple run this command for boot node**&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /data/node01 --chain ./customSpecRaw.json --port 30333 --ws-port 9944 --rpc-port 9933  --ws-external --rpc-external --rpc-cors all --no-telemetry --validator --rpc-methods Unsafe --name MyNode01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**for running the other nodes** &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;`**binary-path**` --base-path /data/node2 --chain ./customSpecRaw.json --port 30334 --ws-port 9945 --rpc-port 9934 --ws-external --rpc-external --rpc-cors all --no-telemetry --validator --rpc-methods Unsafe --name MyNode002 --bootnodes /ip4/`**ip-of first computer**`/tcp/30333/p2p/`**node-identity**`.&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36516" PostHistoryTypeId="5" PostId="9201" RevisionGUID="91771f76-30ac-4a2e-94a0-2f43cc47dcf5" CreationDate="2023-07-07T10:27:09.560" UserId="2281" Comment="added 410 characters in body" Text="you need to change the command add  `--ws-external` `--rpc-external` `--rpc-cors all`  in your boot node command.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;  --base-path /tmp/node01 \&#xD;&#xA;  --chain ./customSpecRaw.json \&#xD;&#xA;  --ws-external\&#xD;&#xA;  --rpc-external\&#xD;&#xA;  --rpc-cors all&#xD;&#xA;  --port 30333 \&#xD;&#xA;  --ws-port 9945 \&#xD;&#xA;  --rpc-port 9933 \&#xD;&#xA;  --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;  --validator \&#xD;&#xA;  --rpc-methods Unsafe \&#xD;&#xA;  --name MyNode01 \&#xD;&#xA;  --password-interactive&#xD;&#xA;```&#xD;&#xA;**you can simple run this command for boot node**&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /data/node01 --chain ./customSpecRaw.json --port 30333 --ws-port 9944 --rpc-port 9933  --ws-external --rpc-external --rpc-cors all --no-telemetry --validator --rpc-methods Unsafe --name MyNode01&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**for running the other nodes** &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;`**binary-path**` --base-path /data/node2 --chain ./customSpecRaw.json --port 30334 --ws-port 9945 --rpc-port 9934 --ws-external --rpc-external --rpc-cors all --no-telemetry --validator --rpc-methods Unsafe --name MyNode002 --bootnodes /ip4/`**ip-of first computer**`/tcp/30333/p2p/`**node-identity**`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;**in your case run this command after running your boot-node**&#xD;&#xA;```&#xD;&#xA; ./target/release/node-template --base-path /data/node2 --chain ./customSpecRaw.json --port 30334 --ws-port 9945 --rpc-port 9934 --ws-external --rpc-external --rpc-cors all --no-telemetry --validator --rpc-methods Unsafe --name MyNode002 --bootnodes /ip4/27.34.100.91/tcp/30333/p2p/12D3KooWLk8ER6sbMAZa8uzf6YmyMo8FvpCiMgrFW4NfReez5um4&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36517" PostHistoryTypeId="2" PostId="9202" RevisionGUID="3129c167-2bcd-415b-ae70-0e04b1d06577" CreationDate="2023-07-07T11:34:45.647" UserId="3387" Text="In theory we could use this command:&#xD;&#xA;&#xD;&#xA;cargo contract remove --execute --code-hash '******' --url 'wss://rococo-contracts-rpc.polkadot.io' --suri 'seeds'&#xD;&#xA;&#xD;&#xA;But in order to do that we have first to terminate the smart contract that was uploaded and instantiated.&#xD;&#xA;&#xD;&#xA;How to do this in a &quot;graceful way&quot; ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="36519" PostHistoryTypeId="1" PostId="9202" RevisionGUID="3129c167-2bcd-415b-ae70-0e04b1d06577" CreationDate="2023-07-07T11:34:45.647" UserId="3387" Text="How to remove a smart contract from the &quot;rococo-contracts-rpc.polkadot.io&quot; chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36520" PostHistoryTypeId="3" PostId="9202" RevisionGUID="3129c167-2bcd-415b-ae70-0e04b1d06577" CreationDate="2023-07-07T11:34:45.647" UserId="3387" Text="|ink|smart-contract|pallet-contracts|cargo|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36521" PostHistoryTypeId="5" PostId="9202" RevisionGUID="245be062-3a2b-4175-b89c-85a3d398b4a6" CreationDate="2023-07-07T15:39:01.860" UserId="3387" Comment="added 86 characters in body" Text="In theory we could use this command:&#xD;&#xA;&#xD;&#xA;cargo contract remove --execute --code-hash '******' --url 'wss://rococo-contracts-rpc.polkadot.io' --suri 'seeds'&#xD;&#xA;&#xD;&#xA;But in order to do that we have first to [terminate][1] the smart contract that was uploaded and instantiated.&#xD;&#xA;&#xD;&#xA;How to do this in a &quot;graceful way&quot; ? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/ink/ink_env/fn.terminate_contract.html#" ContentLicense="CC BY-SA 4.0" />
  <row Id="36522" PostHistoryTypeId="5" PostId="9202" RevisionGUID="57fbb1ff-9954-40fc-bb21-546dcb439956" CreationDate="2023-07-07T15:46:03.640" UserId="3387" Comment="added 86 characters in body" Text="In theory we could use this command:&#xD;&#xA;&#xD;&#xA;cargo contract remove --execute --code-hash '******' --url 'wss://rococo-contracts-rpc.polkadot.io' --suri 'seeds'&#xD;&#xA;&#xD;&#xA;But in order to do that we have first to [terminate][1] the smart contract that was uploaded and instantiated.&#xD;&#xA;&#xD;&#xA;How to do this in a &quot;graceful way&quot; ? &#xD;&#xA;&#xD;&#xA;Note:For instance in Ethereum there is a horrendous thing called &quot;[selfdestruct][2]&quot;.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/ink/ink_env/fn.terminate_contract.html#&#xD;&#xA;  [2]: https://ethereum-blockchain-developer.com/022-pausing-destroying-smart-contracts/04-destroy-smart-contracts/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36529" PostHistoryTypeId="50" PostId="8796" RevisionGUID="b7820f52-abd8-4842-bef5-6b3c30b35ee2" CreationDate="2023-07-08T00:04:35.557" UserId="-1" />
  <row Id="36530" PostHistoryTypeId="2" PostId="9204" RevisionGUID="c650ed7c-a117-42a6-8ec2-8e15291bd8b3" CreationDate="2023-07-08T00:21:43.897" UserId="3960" Text="As far as I could understand so far there is no a &quot;normal&quot; way to test extrinsics submitted by an Offchain Worker, rather a substitute transaction pool is involved.&#xD;&#xA;However it is possible to inspect a state of this fake tx pool that contains entities encoded to raw bytes.&#xD;&#xA;My question concerns submission of an unsigned extrinsic with a signed payload.&#xD;&#xA;In my case there is only one kind of extrinsic that the worker can submit.&#xD;&#xA;The following code verifies that the tx is submitted (the assertion of transaction collection length passes), however it fails to SCALE-decode the call.&#xD;&#xA;```rust&#xD;&#xA;	ext.execute_with(|| {&#xD;&#xA;        System::set_block_number(1);&#xD;&#xA;        MyPallet::on_initialize(1);&#xD;&#xA;        MyPallet::offchain_worker(1);&#xD;&#xA;	&#xD;&#xA;    	assert_eq!(pool_state.read().transactions.len(), 1);&#xD;&#xA;&#xD;&#xA;        let mut tx = &amp;pool_state.read().transactions[0];&#xD;&#xA;        let call = Call::&lt;Test&gt;::decode(&amp;mut &amp;tx[..]).unwrap();&#xD;&#xA;        // snip&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;My guess is that the transaction is padded with additional data before encoded.&#xD;&#xA;My question is how I could decode such an entity ?&#xD;&#xA;And if one more question is permitted, is there a canonical procedure of unit-testing things (like events, dispatch errors etc ) in Offchain Worker execution context ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="36532" PostHistoryTypeId="1" PostId="9204" RevisionGUID="c650ed7c-a117-42a6-8ec2-8e15291bd8b3" CreationDate="2023-07-08T00:21:43.897" UserId="3960" Text="Unit testing an extrinsic submitted by an Offchain Worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36533" PostHistoryTypeId="3" PostId="9204" RevisionGUID="c650ed7c-a117-42a6-8ec2-8e15291bd8b3" CreationDate="2023-07-08T00:21:43.897" UserId="3960" Text="|transactions|offchain-worker|unit-tests|transaction-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36536" PostHistoryTypeId="50" PostId="4961" RevisionGUID="4d72716d-829f-4b7a-b31c-99e1e0f38ae7" CreationDate="2023-07-08T02:08:10.987" UserId="-1" />
  <row Id="36537" PostHistoryTypeId="2" PostId="9205" RevisionGUID="e93a7d81-af4d-49fd-946e-44886698c3e7" CreationDate="2023-07-08T02:30:57.817" UserId="4062" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/o29pJ.png&#xD;&#xA;I am learning about the XCM format in Polkadot. I found this diagram on Paritech's Git Hub, but I don't understand its working flow yet. Explain it to me, please. thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="36539" PostHistoryTypeId="1" PostId="9205" RevisionGUID="e93a7d81-af4d-49fd-946e-44886698c3e7" CreationDate="2023-07-08T02:30:57.817" UserId="4062" Text="XCM_Interaction Diagram" ContentLicense="CC BY-SA 4.0" />
  <row Id="36540" PostHistoryTypeId="3" PostId="9205" RevisionGUID="e93a7d81-af4d-49fd-946e-44886698c3e7" CreationDate="2023-07-08T02:30:57.817" UserId="4062" Text="|polkadot|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36545" PostHistoryTypeId="50" PostId="7850" RevisionGUID="fe0244ff-8358-473c-9d7d-d3973f83c631" CreationDate="2023-07-08T03:04:55.530" UserId="-1" />
  <row Id="36546" PostHistoryTypeId="4" PostId="9202" RevisionGUID="7850bff4-c617-4d37-a855-278fb772633d" CreationDate="2023-07-08T03:48:27.423" UserId="3387" Comment="edited title" Text="How to &quot;graceful terminate&quot; a smart contract from the &quot;rococo-contracts-rpc.polkadot.io&quot; chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36547" PostHistoryTypeId="50" PostId="6498" RevisionGUID="e212800e-a8d5-4d57-b39f-b607898557a5" CreationDate="2023-07-08T04:10:56.250" UserId="-1" />
  <row Id="36548" PostHistoryTypeId="34" PostId="9031" RevisionGUID="1ae631e3-57ba-4e81-a7da-368e58975612" CreationDate="2023-07-08T04:18:02.453" UserId="3850" Comment="27" />
  <row Id="36549" PostHistoryTypeId="50" PostId="4990" RevisionGUID="1938e029-910a-46ad-9f79-b53b83fedb92" CreationDate="2023-07-08T06:03:55.463" UserId="-1" />
  <row Id="36550" PostHistoryTypeId="50" PostId="6448" RevisionGUID="40d16312-6715-4bb0-9a1e-1c448e4ab203" CreationDate="2023-07-08T07:04:40.533" UserId="-1" />
  <row Id="36551" PostHistoryTypeId="2" PostId="9206" RevisionGUID="7ecd15b5-eb5f-4387-bafa-851ec47c9e2f" CreationDate="2023-07-08T07:22:00.060" UserId="4395" Text="Found a fix based on Bruno's answer above&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const wsProvider = new WsProvider(endpoint);&#xD;&#xA;				try {&#xD;&#xA;					const api = await ApiPromise.create({&#xD;&#xA;						provider: wsProvider,&#xD;&#xA;						rpc: polkadotApiRpc,&#xD;&#xA;						types: polkadotApiTypes,&#xD;&#xA;						noInitWarn: process.env.NODE_ENV === 'production',&#xD;&#xA;						throwOnConnect: true,&#xD;&#xA;					});&#xD;&#xA;&#xD;&#xA;					console.log(networkType, 'api');&#xD;&#xA;					await api.isReadyOrError;&#xD;&#xA;					console.log(networkType, 'api, is ready or error');&#xD;&#xA;					return api;&#xD;&#xA;				} catch (ex) {&#xD;&#xA;					//  cleanup sockets on error&#xD;&#xA;					wsProvider.disconnect();&#xD;&#xA;					throw ex;&#xD;&#xA;				}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/users/29/bruno" ContentLicense="CC BY-SA 4.0" />
  <row Id="36553" PostHistoryTypeId="50" PostId="8199" RevisionGUID="fab35731-ea74-493f-834b-0a5a55266fff" CreationDate="2023-07-08T08:01:20.150" UserId="-1" />
  <row Id="36554" PostHistoryTypeId="2" PostId="9207" RevisionGUID="cae7751a-6a49-40b3-9d18-db2055df0da7" CreationDate="2023-07-08T08:58:10.080" UserId="3387" Text="&#xD;&#xA;this is the output of 'rustup show' in my ubuntu machine.&#xD;&#xA;(1.69.0-nigthtly is the maximum for the time being.)&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I would advise for you to use [rustup override][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/EDqUE.png&#xD;&#xA;  [2]: https://rust-lang.github.io/rustup/overrides.html#directory-overrides" ContentLicense="CC BY-SA 4.0" />
  <row Id="36556" PostHistoryTypeId="50" PostId="8331" RevisionGUID="79da97c9-52cf-455e-86f9-1d0d4674e874" CreationDate="2023-07-08T09:01:10.173" UserId="-1" />
  <row Id="36557" PostHistoryTypeId="50" PostId="8396" RevisionGUID="482b407c-5af8-44c1-ab3b-22aa6ef8df88" CreationDate="2023-07-08T10:03:15.367" UserId="-1" />
  <row Id="36558" PostHistoryTypeId="5" PostId="9168" RevisionGUID="0e7703f1-11de-409c-aede-6b021620154e" CreationDate="2023-07-08T10:42:49.680" UserId="2445" Comment="added 212 characters in body" Text="We have the weird case that `extrinsics` in general work, but there is a specific extrinsic that stalls the parachain. See https://github.com/integritee-network/parachain/issues/222. This extrinsic sends a UMP-message to the relay chain requesting a slot swap.&#xD;&#xA;&#xD;&#xA;Here are the logs with &#xD;&#xA;* `-lparachain::collation-generation=trace`&#xD;&#xA;* `-lparachain::approval-distribution=trace`&#xD;&#xA;* `-lparachain::collator-protocol=trace`&#xD;&#xA;* `-lbasic-authorship=trace -ltxpool=trace`&#xD;&#xA;&#xD;&#xA;https://gist.github.com/clangenb/134b993a11e14f24f54893e08c86d959&#xD;&#xA;&#xD;&#xA;Even more interesting, from these logs we can see that the collation was successful, and that that the collator's relay chain accepted it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; cumulus-collator: [Parachain] Starting collation. relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb at=0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.595  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.600  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 7823 (2 ms) [hash: 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca; parent_hash: 0x0266…1ef0; extrinsics (3): [0xcaec…3897, 0x470b…e13b, 0x1f79…cc15]]&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 7, ValidatorIndex(72)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an assignment to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae claimed_candidate_index=7 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.607  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 7823. Hash now 0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc, previously 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca.&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1796875kb, extrinsics: 5.7197265625kb, storage_proof: 9.3466796875kb }&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #7823 (0x78a4…7acc)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 9.5498046875kb&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb para_id=2267 traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=31556&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=2267 relay_parent=0xf0bf…9ddb candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 core=CoreIndex(41) current_validators=[Public(dea7cae27e5dfb239a7ca5fb0649568b57afc08ed2ec5e538d4a3abb786fbc3c (5H6eLEHx...)), Public(fcf408d2b46082efffea4ddd78d114e021439b47d4a5848e15f6d3e5eca44c2e (5HnNRAfr...)), Public(4c0e2bd29d0d14bf81da32c79492dbc2bd97a594f34c982047b8a2ee4d035865 (5DnRhudq...)), Public(3a56f3c36ae08f7cfdeea6d340aa45ebd6b379f47267ca78837749054dec7b03 (5DPCTuQm...)), Public(e6e40731962e2834867cc4f482308cc34e4579ee1a5e1667c3ec36d96b36a971 (5HHScHPf...))] traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.618 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing approvals from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked approval peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 9, ValidatorIndex(147)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an approval to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae candidate_index=9 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 10, ValidatorIndex(178)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The collator runs on `polkadot-v0.9.42`&#xD;&#xA;The runtime runs on `polkadot-v0.9.37`: https://github.com/integritee-network/parachain/tree/1.5.35/polkadot-parachains/shell-runtime&#xD;&#xA;&#xD;&#xA;It happens with the live Kusama network.&#xD;&#xA;&#xD;&#xA;It seems that the UMP part is indeed the problem. If the same dispatchable is executed with non-root origin, the block is successfully produced, and I get a `BadOrigin` error. So, can the executed xcm operations indeed prevent the relay chain from backing a block?&#xD;&#xA;&#xD;&#xA;**Edit:** After additional investigation, I can confirm that:&#xD;&#xA;* It works on a rococo-local-dev setup&#xD;&#xA;* XCM in general seems to work&#xD;&#xA;* I made sure that the parachain account on the relay chain has some funds.&#xD;&#xA;&#xD;&#xA;**Edit:** Updated the logs with a more verbose log additionally containing: basic-authorship and txpool." ContentLicense="CC BY-SA 4.0" />
  <row Id="36559" PostHistoryTypeId="50" PostId="8296" RevisionGUID="3fc8324b-6eef-416c-8e92-2d8f085fb23d" CreationDate="2023-07-08T11:04:45.493" UserId="-1" />
  <row Id="36560" PostHistoryTypeId="50" PostId="6451" RevisionGUID="dcb299d7-1743-488a-977e-a5b97254c588" CreationDate="2023-07-08T12:05:45.780" UserId="-1" />
  <row Id="36561" PostHistoryTypeId="50" PostId="5293" RevisionGUID="89a6e8da-2c98-43bb-9bc8-3cd4e05b023c" CreationDate="2023-07-08T13:09:21.110" UserId="-1" />
  <row Id="36562" PostHistoryTypeId="5" PostId="9168" RevisionGUID="517c6863-14d2-4363-b1c5-b72f43edc6e1" CreationDate="2023-07-08T13:28:25.683" UserId="2445" Comment="add some more debugging info" Text="We have the weird case that `extrinsics` in general work, but there is a specific extrinsic that stalls the parachain. See https://github.com/integritee-network/parachain/issues/222. This extrinsic sends a UMP-message to the relay chain requesting a [slot swap](https://github.com/integritee-network/pallets/blob/824c9a50dd8902697bd3e75ab6b5f7c3d663167f/xcm-transactor/src/lib.rs#L92).&#xD;&#xA;&#xD;&#xA;Here are the logs with &#xD;&#xA;* `-lparachain::collation-generation=trace`&#xD;&#xA;* `-lparachain::approval-distribution=trace`&#xD;&#xA;* `-lparachain::collator-protocol=trace`&#xD;&#xA;* `-lbasic-authorship=trace -ltxpool=trace`&#xD;&#xA;&#xD;&#xA;https://gist.github.com/clangenb/134b993a11e14f24f54893e08c86d959&#xD;&#xA;&#xD;&#xA;Even more interesting, from these logs we can see that the collation was successful, and that that the collator's relay chain accepted it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; cumulus-collator: [Parachain] Starting collation. relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb at=0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.595  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.600  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 7823 (2 ms) [hash: 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca; parent_hash: 0x0266…1ef0; extrinsics (3): [0xcaec…3897, 0x470b…e13b, 0x1f79…cc15]]&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 7, ValidatorIndex(72)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an assignment to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae claimed_candidate_index=7 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.607  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 7823. Hash now 0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc, previously 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca.&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1796875kb, extrinsics: 5.7197265625kb, storage_proof: 9.3466796875kb }&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #7823 (0x78a4…7acc)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 9.5498046875kb&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb para_id=2267 traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=31556&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=2267 relay_parent=0xf0bf…9ddb candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 core=CoreIndex(41) current_validators=[Public(dea7cae27e5dfb239a7ca5fb0649568b57afc08ed2ec5e538d4a3abb786fbc3c (5H6eLEHx...)), Public(fcf408d2b46082efffea4ddd78d114e021439b47d4a5848e15f6d3e5eca44c2e (5HnNRAfr...)), Public(4c0e2bd29d0d14bf81da32c79492dbc2bd97a594f34c982047b8a2ee4d035865 (5DnRhudq...)), Public(3a56f3c36ae08f7cfdeea6d340aa45ebd6b379f47267ca78837749054dec7b03 (5DPCTuQm...)), Public(e6e40731962e2834867cc4f482308cc34e4579ee1a5e1667c3ec36d96b36a971 (5HHScHPf...))] traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.618 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing approvals from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked approval peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 9, ValidatorIndex(147)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an approval to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae candidate_index=9 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 10, ValidatorIndex(178)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The collator runs on `polkadot-v0.9.42`&#xD;&#xA;The runtime runs on `polkadot-v0.9.37`: https://github.com/integritee-network/parachain/tree/1.5.35/polkadot-parachains/shell-runtime&#xD;&#xA;&#xD;&#xA;It happens with the live Kusama network.&#xD;&#xA;&#xD;&#xA;It seems that the UMP part is indeed the problem. If the same dispatchable is executed with non-root origin, the block is successfully produced, and I get a `BadOrigin` error. So, can the executed xcm operations indeed prevent the relay chain from backing a block?&#xD;&#xA;&#xD;&#xA;**Edit:** After additional investigation, I can confirm that:&#xD;&#xA;* It works on a rococo-local-dev [setup](https://github.com/integritee-network/parachain/issues/222#issuecomment-1625604991)&#xD;&#xA;* The collator's substrate version does make a [difference](https://github.com/integritee-network/parachain/issues/222#issue-1789714752)&#xD;&#xA;* XCM in general seems to work&#xD;&#xA;* I made sure that the parachain account on the relay chain has some funds.&#xD;&#xA;&#xD;&#xA;**Edit:** Updated the logs with a more verbose log additionally containing: basic-authorship and txpool." ContentLicense="CC BY-SA 4.0" />
  <row Id="36563" PostHistoryTypeId="5" PostId="9168" RevisionGUID="c2b3d3a5-d4be-42a9-b5eb-07d9e0c35853" CreationDate="2023-07-08T13:33:49.333" UserId="2445" Comment="add some more debugging info" Text="We have the weird case that `extrinsics` in general work, but there is a specific extrinsic that stalls the parachain. See https://github.com/integritee-network/parachain/issues/222. This extrinsic sends a UMP-message to the relay chain requesting a [slot swap](https://github.com/integritee-network/pallets/blob/824c9a50dd8902697bd3e75ab6b5f7c3d663167f/xcm-transactor/src/lib.rs#L92).&#xD;&#xA;&#xD;&#xA;Here are the logs with &#xD;&#xA;* `-lparachain::collation-generation=trace`&#xD;&#xA;* `-lparachain::approval-distribution=trace`&#xD;&#xA;* `-lparachain::collator-protocol=trace`&#xD;&#xA;* `-lbasic-authorship=trace -ltxpool=trace`&#xD;&#xA;&#xD;&#xA;https://gist.github.com/clangenb/134b993a11e14f24f54893e08c86d959&#xD;&#xA;&#xD;&#xA;Even more interesting, from these logs we can see that the collation was successful, and that that the collator's relay chain accepted it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; cumulus-collator: [Parachain] Starting collation. relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb at=0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.595  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x026671e6c343fdbb5ab71a1026aa702cfe43d3409434589fbe1ff075ed551ef0&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.600  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 7823 (2 ms) [hash: 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca; parent_hash: 0x0266…1ef0; extrinsics (3): [0xcaec…3897, 0x470b…e13b, 0x1f79…cc15]]&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 7, ValidatorIndex(72)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.606 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an assignment to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae claimed_candidate_index=7 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.607  INFO tokio-runtime-worker aura: [Parachain]  Pre-sealed block for proposal at 7823. Hash now 0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc, previously 0xd933f8be0f9c03a26540f6420db2c740076c6678d9425b4ec150ae495c6fc6ca.&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1796875kb, extrinsics: 5.7197265625kb, storage_proof: 9.3466796875kb }&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #7823 (0x78a4…7acc)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 9.5498046875kb&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.608  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x78a4a05bc8da537c1e3d26f21d1c4dae934a551c4d0e870051645b5116847acc&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collation-generation: [Relaychain] candidate is generated candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 relay_parent=0xf0bf2bf83f8216548ca4b5013a240a5786603949e259d9f837f88bba5aca9ddb para_id=2267 traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Received session info session_index=31556&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.611 DEBUG tokio-runtime-worker parachain::collator-protocol: [Relaychain] Accepted collation, connecting to validators. para_id=2267 relay_parent=0xf0bf…9ddb candidate_hash=0x936f64b18fbf2ba1ccd2979b75219731c5e7ecbb0e934e8a455c9319d60d322b pov_hash=0x84e1b30af67914e2133f9362055efa0eae2ce3afcf5aee095369099f58b8b2b1 core=CoreIndex(41) current_validators=[Public(dea7cae27e5dfb239a7ca5fb0649568b57afc08ed2ec5e538d4a3abb786fbc3c (5H6eLEHx...)), Public(fcf408d2b46082efffea4ddd78d114e021439b47d4a5848e15f6d3e5eca44c2e (5HnNRAfr...)), Public(4c0e2bd29d0d14bf81da32c79492dbc2bd97a594f34c982047b8a2ee4d035865 (5DnRhudq...)), Public(3a56f3c36ae08f7cfdeea6d340aa45ebd6b379f47267ca78837749054dec7b03 (5DPCTuQm...)), Public(e6e40731962e2834867cc4f482308cc34e4579ee1a5e1667c3ec36d96b36a971 (5HHScHPf...))] traceID=195974902640512596657898995620943861553&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.618 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing approvals from a peer peer_id=12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked approval peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 9, ValidatorIndex(147)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWLPKAJm3UECm9fVbgfw6WkrKUK64JayeruSMDcAHxXBXU&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.619 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Sending an approval to peers block_hash=0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae candidate_index=9 local=false num_peers=3&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Processing assignments from a peer peer_id=12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT num=1&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Checked assignment source=Peer(PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)) message_subject=MessageSubject(0xbd08cd884606f9765a9d92ee6c2d00a168ea655c0c33db00a17dca33a989a5ae, 10, ValidatorIndex(178)) result=Accepted&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] Reputation change for peer reputation=BenefitMinorFirst(&quot;Valid message with new information&quot;) peer_id=PeerId(&quot;12D3KooWQxG51uMhJVwSJqULapVorQRbqZ4BzkAJ2VosDQjVDifT&quot;)&#xD;&#xA;Jul 05 14:05:18 lease-swap-02 integritee-collator[72042]: 2023-07-05 14:05:18.639 TRACE tokio-runtime-worker parachain::approval-distribution: [Relaychain] &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The collator runs on `polkadot-v0.9.42`&#xD;&#xA;The runtime runs on `polkadot-v0.9.37`: https://github.com/integritee-network/parachain/tree/1.5.35/polkadot-parachains/shell-runtime&#xD;&#xA;&#xD;&#xA;It happens with the live Kusama network.&#xD;&#xA;&#xD;&#xA;It seems that the UMP part is indeed the problem. If the same dispatchable is executed with non-root origin, the block is successfully produced, and I get a `BadOrigin` error. So, can the executed xcm operations indeed prevent the relay chain from backing a block?&#xD;&#xA;&#xD;&#xA;**Edit:** After additional investigation, I can confirm that:&#xD;&#xA;* It works on a rococo-local-dev [setup](https://github.com/integritee-network/parachain/issues/222#issuecomment-1625604991), where the collator's host is running on polkadot-v0.9.37.&#xD;&#xA;* The collator's substrate version does make a [difference](https://github.com/integritee-network/parachain/issues/222#issue-1789714752). If the host runs on v0.9.42, I get a UMP error that, however, doesn't stall the chain.&#xD;&#xA;* XCM in general seems to work&#xD;&#xA;* I made sure that the parachain account on the relay chain has some funds.&#xD;&#xA;&#xD;&#xA;**Edit:** Updated the logs with a more verbose log additionally containing: basic-authorship and txpool." ContentLicense="CC BY-SA 4.0" />
  <row Id="36568" PostHistoryTypeId="50" PostId="8423" RevisionGUID="57b75ecf-c495-456b-9c45-585b129e50ea" CreationDate="2023-07-08T15:03:05.350" UserId="-1" />
  <row Id="36569" PostHistoryTypeId="50" PostId="8819" RevisionGUID="64d6aa89-224e-484d-abf2-9ca7269aedca" CreationDate="2023-07-08T16:01:05.113" UserId="-1" />
  <row Id="36570" PostHistoryTypeId="50" PostId="8822" RevisionGUID="41c03921-0321-4cd8-84bb-645a70e2edda" CreationDate="2023-07-08T17:07:25.880" UserId="-1" />
  <row Id="36571" PostHistoryTypeId="2" PostId="9209" RevisionGUID="8738926e-9478-46c1-9d41-71ed1b61489e" CreationDate="2023-07-09T02:31:01.870" UserId="4415" Text="error[E0422]: cannot find struct, variant or union type `LineColumn` in crate `proc_macro`&#xD;&#xA;   --&gt; /home/wangchao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/proc-macro2-1.0.56/src/wrapper.rs:476:33&#xD;&#xA;    |&#xD;&#xA;476 |                 let proc_macro::LineColumn { line, column } = s.start();&#xD;&#xA;    |                                 ^^^^^^^^^^ not found in `proc_macro`&#xD;&#xA;    |&#xD;&#xA;help: consider importing this struct through its public re-export&#xD;&#xA;    |&#xD;&#xA;1   + use crate::LineColumn;&#xD;&#xA;    |&#xD;&#xA;help: if you import `LineColumn`, refer to it directly&#xD;&#xA;    |&#xD;&#xA;476 -                 let proc_macro::LineColumn { line, column } = s.start();&#xD;&#xA;476 +                 let LineColumn { line, column } = s.start();&#xD;&#xA;    |&#xD;&#xA;&#xD;&#xA;error[E0422]: cannot find struct, variant or union type `LineColumn` in crate `proc_macro`&#xD;&#xA;   --&gt; /home/wangchao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/proc-macro2-1.0.56/src/wrapper.rs:490:33&#xD;&#xA;    |&#xD;&#xA;490 |                 let proc_macro::LineColumn { line, column } = s.end();&#xD;&#xA;    |                                 ^^^^^^^^^^ not found in `proc_macro`&#xD;&#xA;    |&#xD;&#xA;help: consider importing this struct through its public re-export&#xD;&#xA;    |&#xD;&#xA;1   + use crate::LineColumn;&#xD;&#xA;    |&#xD;&#xA;help: if you import `LineColumn`, refer to it directly&#xD;&#xA;    |&#xD;&#xA;490 -                 let proc_macro::LineColumn { line, column } = s.end();&#xD;&#xA;490 +                 let LineColumn { line, column } = s.end();&#xD;&#xA;    |" ContentLicense="CC BY-SA 4.0" />
  <row Id="36573" PostHistoryTypeId="1" PostId="9209" RevisionGUID="8738926e-9478-46c1-9d41-71ed1b61489e" CreationDate="2023-07-09T02:31:01.870" UserId="4415" Text="how to resolve? error[E0422]: cannot find struct, variant or union type `LineColumn` in crate `proc_macro`" ContentLicense="CC BY-SA 4.0" />
  <row Id="36574" PostHistoryTypeId="3" PostId="9209" RevisionGUID="8738926e-9478-46c1-9d41-71ed1b61489e" CreationDate="2023-07-09T02:31:01.870" UserId="4415" Text="|error|compile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36575" PostHistoryTypeId="5" PostId="9209" RevisionGUID="fed667ae-23ee-4fe9-a1c4-cb793105b039" CreationDate="2023-07-09T04:36:52.877" UserId="251" Comment="added 12 characters in body" Text="```rs&#xD;&#xA;error[E0422]: cannot find struct, variant or union type `LineColumn` in crate `proc_macro`&#xD;&#xA;   --&gt; /home/wangchao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/proc-macro2-1.0.56/src/wrapper.rs:476:33&#xD;&#xA;    |&#xD;&#xA;476 |                 let proc_macro::LineColumn { line, column } = s.start();&#xD;&#xA;    |                                 ^^^^^^^^^^ not found in `proc_macro`&#xD;&#xA;    |&#xD;&#xA;help: consider importing this struct through its public re-export&#xD;&#xA;    |&#xD;&#xA;1   + use crate::LineColumn;&#xD;&#xA;    |&#xD;&#xA;help: if you import `LineColumn`, refer to it directly&#xD;&#xA;    |&#xD;&#xA;476 -                 let proc_macro::LineColumn { line, column } = s.start();&#xD;&#xA;476 +                 let LineColumn { line, column } = s.start();&#xD;&#xA;    |&#xD;&#xA;&#xD;&#xA;error[E0422]: cannot find struct, variant or union type `LineColumn` in crate `proc_macro`&#xD;&#xA;   --&gt; /home/wangchao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/proc-macro2-1.0.56/src/wrapper.rs:490:33&#xD;&#xA;    |&#xD;&#xA;490 |                 let proc_macro::LineColumn { line, column } = s.end();&#xD;&#xA;    |                                 ^^^^^^^^^^ not found in `proc_macro`&#xD;&#xA;    |&#xD;&#xA;help: consider importing this struct through its public re-export&#xD;&#xA;    |&#xD;&#xA;1   + use crate::LineColumn;&#xD;&#xA;    |&#xD;&#xA;help: if you import `LineColumn`, refer to it directly&#xD;&#xA;    |&#xD;&#xA;490 -                 let proc_macro::LineColumn { line, column } = s.end();&#xD;&#xA;490 +                 let LineColumn { line, column } = s.end();&#xD;&#xA;    |&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36577" PostHistoryTypeId="50" PostId="7142" RevisionGUID="29a37023-ec05-4bf0-8505-a5e8c040e3f6" CreationDate="2023-07-09T10:05:00.603" UserId="-1" />
  <row Id="36578" PostHistoryTypeId="2" PostId="9210" RevisionGUID="42ee523c-d7f3-4b8a-bac1-3ebd77f9d030" CreationDate="2023-07-09T15:31:40.067" UserId="4413" Text="I am following a tutorial. What I am trying to connect two different nodes to each other who are Alice and Bob. Alice node works properly, but Bob node gets this following error:&#xD;&#xA;```&#xD;&#xA;2023-07-09 18:20:01   Local node identity is: 12D3KooWQom91ucC8REm1PNnyB1RLNjGuFXSRq52saUCKsZuZPzU&#xD;&#xA;2023-07-09 18:20:01 Can't listen on /ip6/::/tcp/30333/ws because: Other(Custom { kind: Other, error: Other(A(A(A(A(A(Transport(Transport(Os { code: 98, kind: AddrInUse, message: &quot;Address already in use&quot; })))))))) })&#xD;&#xA;2023-07-09 18:20:01 Can't listen on /ip4/0.0.0.0/tcp/30333/ws because: Other(Custom { kind: Other, error: Other(A(A(A(A(A(Transport(Transport(Os { code: 98, kind: AddrInUse, message: &quot;Address already in use&quot; })))))))) })&#xD;&#xA;2023-07-09 18:20:01  Operating system: linux&#xD;&#xA;2023-07-09 18:20:01  CPU architecture: x86_64&#xD;&#xA;2023-07-09 18:20:01  Target environment: gnu&#xD;&#xA;2023-07-09 18:20:01  CPU: AMD Ryzen 3 3200U with Radeon Vega Mobile Gfx&#xD;&#xA;2023-07-09 18:20:01  CPU cores: 2&#xD;&#xA;2023-07-09 18:20:01  Memory: 2850MB&#xD;&#xA;2023-07-09 18:20:01  Kernel: 5.15.90.1-microsoft-standard-WSL2&#xD;&#xA;2023-07-09 18:20:01  Linux distribution: Ubuntu 22.04.2 LTS&#xD;&#xA;2023-07-09 18:20:01  Virtual machine: yes&#xD;&#xA;2023-07-09 18:20:01  Highest known block at #0&#xD;&#xA;2023-07-09 18:20:01 Running JSON-RPC HTTP server: addr=127.0.0.1:43677, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]&#xD;&#xA;2023-07-09 18:20:01 Running JSON-RPC WS server: addr=127.0.0.1:36565, allowed origins=[&quot;http://localhost:*&quot;, &quot;http://127.0.0.1:*&quot;, &quot;https://localhost:*&quot;, &quot;https://127.0.0.1:*&quot;, &quot;https://polkadot.js.org&quot;]&#xD;&#xA;2023-07-09 18:20:01 discovered: 12D3KooWFqJMcHVLLmZrhzVSorDEUZGX8HPW1Jhx1zjvZ86N5ydP /ip4/172.20.154.189/tcp/30333/ws&#xD;&#xA;```&#xD;&#xA;The interesting thing is that even though it discovered Alice node, does not connect to it because  ```Idle (0 peers)``` writes in the the terminal. I would appreciate if the solution is found. Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="36580" PostHistoryTypeId="1" PostId="9210" RevisionGUID="42ee523c-d7f3-4b8a-bac1-3ebd77f9d030" CreationDate="2023-07-09T15:31:40.067" UserId="4413" Text="Address already in use" ContentLicense="CC BY-SA 4.0" />
  <row Id="36581" PostHistoryTypeId="3" PostId="9210" RevisionGUID="42ee523c-d7f3-4b8a-bac1-3ebd77f9d030" CreationDate="2023-07-09T15:31:40.067" UserId="4413" Text="|substrate-node-template|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36582" PostHistoryTypeId="2" PostId="9211" RevisionGUID="7d648f4e-5080-4406-8a2c-307ec29973eb" CreationDate="2023-07-09T15:38:19.990" UserId="29" Text="`&quot;Address already in use.&quot;`&#xD;&#xA;- Most likely you already have another node running.&#xD;&#xA;- Basically this means something is occupying that port.&#xD;&#xA;&#xD;&#xA;Check all your terminals, VS Code terminals, processes and kill the additional node.&#xD;&#xA;&#xD;&#xA;If all else, fails, restart your machine and try booting up Alice and Bob again." ContentLicense="CC BY-SA 4.0" />
  <row Id="36589" PostHistoryTypeId="2" PostId="9214" RevisionGUID="aac9dafd-c302-4056-bdb0-7b39328451b6" CreationDate="2023-07-09T18:43:37.280" UserId="2484" Text="Hey valuable Substrate masterminds,&#xD;&#xA;&#xD;&#xA;I wonder how to use this new XCMv3 remote lock feature on a parachain. Consider these references: &#xD;&#xA;&#xD;&#xA; - [remote locking tests](https://github.com/paritytech/polkadot/blob/02905341f7f7d1b3aa1944ccbe3a86072fbf4b06/xcm/xcm-builder/src/tests/locking.rs#L20-L238)&#xD;&#xA; - [Asset lock trait](https://github.com/paritytech/polkadot/blob/02905341f7f7d1b3aa1944ccbe3a86072fbf4b06/xcm/xcm-executor/src/traits/asset_lock.rs#L62-L123)&#xD;&#xA;- [Remote locking PR by Gavin Wood](https://github.com/paritytech/polkadot/pull/4945)&#xD;&#xA;&#xD;&#xA;Assume a Kusama account used remote locking on Kusama and those funds are able to get unlocked by my parachain. At this point `LockAsset` was used and `NoteUnlockable` is done.&#xD;&#xA;&#xD;&#xA;Now to my parachain: Where can I find on-chain the information that an account has locked KSM on Kusama for my chain? If I got the information of the first question, my second question is: If I want to use this for a voting mechanism on my parachain, but I have two different voting mechanisms that should not overlap with the funds: how can I keep track of which funds were already taken out of the remote lock?&#xD;&#xA;&#xD;&#xA;If my voting mechanism is allowed to have overlapping funds, then it seems quite easy to implement: I just have to query the information on-chain how many funds have been locked on behalf of my chain. So, the most important question would be the first one: How can I query this on-chain?&#xD;&#xA;&#xD;&#xA;What if there are multiple remote locks on Kusama on a specific account for my chain: Are those locks being internally combined, so that my parachain only sees the maximum amount?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36591" PostHistoryTypeId="1" PostId="9214" RevisionGUID="aac9dafd-c302-4056-bdb0-7b39328451b6" CreationDate="2023-07-09T18:43:37.280" UserId="2484" Text="How to use XCM remote locking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36592" PostHistoryTypeId="3" PostId="9214" RevisionGUID="aac9dafd-c302-4056-bdb0-7b39328451b6" CreationDate="2023-07-09T18:43:37.280" UserId="2484" Text="|xcm|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36593" PostHistoryTypeId="5" PostId="9214" RevisionGUID="3dfe0ad9-5c44-44ed-bec1-a2c3a0addf79" CreationDate="2023-07-09T18:57:25.777" UserId="2484" Comment="added 272 characters in body" Text="Hey valuable Substrate masterminds,&#xD;&#xA;&#xD;&#xA;I wonder how to use this new XCMv3 remote lock feature on a parachain. Consider these references: &#xD;&#xA;&#xD;&#xA; - [remote locking tests](https://github.com/paritytech/polkadot/blob/02905341f7f7d1b3aa1944ccbe3a86072fbf4b06/xcm/xcm-builder/src/tests/locking.rs#L20-L238)&#xD;&#xA; - [Asset lock trait](https://github.com/paritytech/polkadot/blob/02905341f7f7d1b3aa1944ccbe3a86072fbf4b06/xcm/xcm-executor/src/traits/asset_lock.rs#L62-L123)&#xD;&#xA;- [Remote locking PR by Gavin Wood](https://github.com/paritytech/polkadot/pull/4945)&#xD;&#xA;&#xD;&#xA;Assume a Kusama account used remote locking on Kusama and those funds are able to get unlocked by my parachain. At this point `LockAsset` was used and `NoteUnlockable` is done.&#xD;&#xA;&#xD;&#xA;Now to my parachain: Where can I find on-chain the information that an account has locked KSM on Kusama for my chain? If I got the information of the first question, my second question is: If I want to use this for a voting mechanism on my parachain, but I have two different voting mechanisms that should not overlap with the funds: how can I keep track of which funds were already taken out of the remote lock?&#xD;&#xA;&#xD;&#xA;If my voting mechanism is allowed to have overlapping funds, then it seems quite easy to implement: I just have to query the information on-chain how many funds have been locked on behalf of my chain. So, the most important question would be the first one: How can I query this on-chain?&#xD;&#xA;&#xD;&#xA;Are there any existing remote lock tests for parachains out there? If yes, please provide a reference. I know of XCM transfer tests, which use orml xtokens for an easy XCM interface, but I don't think orml has implemented a similar easy interface for remote locks yet.&#xD;&#xA;&#xD;&#xA;What if there are multiple remote locks on Kusama on a specific account for my chain: Are those locks being internally combined, so that my parachain only sees the maximum amount?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36594" PostHistoryTypeId="5" PostId="9214" RevisionGUID="f41e1fae-777f-4825-be87-d6a3391621ab" CreationDate="2023-07-09T19:06:29.500" UserId="2484" Comment="added 93 characters in body" Text="Hey valuable Substrate masterminds,&#xD;&#xA;&#xD;&#xA;I wonder how to use this new XCMv3 remote lock feature on a parachain. Consider these references: &#xD;&#xA;&#xD;&#xA; - [remote locking tests](https://github.com/paritytech/polkadot/blob/02905341f7f7d1b3aa1944ccbe3a86072fbf4b06/xcm/xcm-builder/src/tests/locking.rs#L20-L238)&#xD;&#xA; - [Asset lock trait](https://github.com/paritytech/polkadot/blob/02905341f7f7d1b3aa1944ccbe3a86072fbf4b06/xcm/xcm-executor/src/traits/asset_lock.rs#L62-L123)&#xD;&#xA;- [Remote locking PR by Gavin Wood](https://github.com/paritytech/polkadot/pull/4945)&#xD;&#xA;&#xD;&#xA;Assume a Kusama account used remote locking on Kusama and those funds are able to get unlocked by my parachain. At this point `LockAsset` was used and `NoteUnlockable` is done.&#xD;&#xA;&#xD;&#xA;Now to my parachain: Where can I find on-chain the information that an account has locked KSM on Kusama for my chain? If I got the information of the first question, my second question is: If I want to use this for a voting mechanism on my parachain, but I have two different voting mechanisms that should not overlap with the funds: how can I keep track of which funds were already taken out of the remote lock?&#xD;&#xA;&#xD;&#xA;If my voting mechanism is allowed to have overlapping funds, then it seems quite easy to implement: I just have to query the information on-chain how many funds have been locked on behalf of my chain. So, the most important question would be the first one: How can I query this on-chain?&#xD;&#xA;&#xD;&#xA;Are there any existing remote lock tests for parachains out there? If yes, please provide a reference. I know of XCM transfer tests, which use orml xtokens for an easy XCM interface, but I don't think orml has implemented a similar easy interface for remote locks yet.&#xD;&#xA;&#xD;&#xA;How to unlock the remote funds from an account on Kusama from my parachain in my runtime?&#xD;&#xA;&#xD;&#xA;What if there are multiple remote locks on Kusama on a specific account for my chain: Are those locks being internally combined, so that my parachain only sees the maximum amount?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36595" PostHistoryTypeId="2" PostId="9215" RevisionGUID="694b22cf-0116-4889-8e02-a0cca7586f94" CreationDate="2023-07-10T00:13:09.020" UserId="116" Text="What does this log message from a collator node mean? Is it bad, should it be fixed or ignored?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Service(Client(Backend(&quot;Invalid argument: Column families not opened: col12, col11, col10, col9, col8, col7, col6, col5, col4, col3, col2, col1, col0&quot;)))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36597" PostHistoryTypeId="1" PostId="9215" RevisionGUID="694b22cf-0116-4889-8e02-a0cca7586f94" CreationDate="2023-07-10T00:13:09.020" UserId="116" Text="What does this log message from a collator node mean?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36598" PostHistoryTypeId="3" PostId="9215" RevisionGUID="694b22cf-0116-4889-8e02-a0cca7586f94" CreationDate="2023-07-10T00:13:09.020" UserId="116" Text="|substrate-node|collator|log|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36599" PostHistoryTypeId="2" PostId="9216" RevisionGUID="f44184a3-0de9-4bd1-8e32-2e320ee8721c" CreationDate="2023-07-10T02:31:54.213" UserId="2984" Text="In order to help people who still have some doubts about this topic, I bring you some interesting information about the subject, especially for new Substrate Devs.&#xD;&#xA;&#xD;&#xA;Besides the mentioned change from ChainType::Dev or Local to ChainType::Live in terms of network type, there are many other things to consider, such as the use of development accounts with predefined balances when accessing the network. Depending on the configuration, it may require a certain number of nodes to produce blocks, whereas in dev mode it may be possible to create a network with a single node that produces and finalizes blocks. Additionally, the entire deployment process comes into play, including choosing the type of node that will be created (RPC node, Archive, Full, etc). There are many other flags that can be set, which will determine the behavior of a specific node. There is also the question of how the logging and telemetry data of that node will be handled. Another point of consideration is the use of Docker, whether to deploy the service within a Kubernetes cluster or in a VM.&#xD;&#xA;&#xD;&#xA;Many of these items mentioned here were added after I asked the question in the official Substrate documentation. Here is the link for more information on how to deploy and further differences between a dev network and a production network: https://docs.substrate.io/deploy/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36601" PostHistoryTypeId="2" PostId="9217" RevisionGUID="6ca9a249-f206-423d-b9bf-32a8d689f0b5" CreationDate="2023-07-10T03:54:28.970" UserId="181" Text="I don't see any support for connecting via the substract-connect library for a sovereign chain. E.g. the [`addChain` function][1] has a dependency on the relay chain.&#xD;&#xA;&#xD;&#xA;Is there some way to connect to a custom solo chain through this library that I am not seeing? If not, is there a plan to add support?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-connect/blob/4399987c5f025534b9867bc7a40b7e8869a11913/projects/extension/src/content/ClientWithExtension.ts#L104" ContentLicense="CC BY-SA 4.0" />
  <row Id="36603" PostHistoryTypeId="1" PostId="9217" RevisionGUID="6ca9a249-f206-423d-b9bf-32a8d689f0b5" CreationDate="2023-07-10T03:54:28.970" UserId="181" Text="Substrate-connect for solo-chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="36604" PostHistoryTypeId="3" PostId="9217" RevisionGUID="6ca9a249-f206-423d-b9bf-32a8d689f0b5" CreationDate="2023-07-10T03:54:28.970" UserId="181" Text="|polkadot-js|light-client|substrate-connect|smoldot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36605" PostHistoryTypeId="50" PostId="8810" RevisionGUID="93e4f21f-4180-4663-9887-c0f077bb699d" CreationDate="2023-07-10T07:02:30.313" UserId="-1" />
  <row Id="36606" PostHistoryTypeId="2" PostId="9218" RevisionGUID="e0d0c489-ea44-4347-a0eb-e70f28b2df19" CreationDate="2023-07-10T07:24:20.993" UserId="552" Text="We have a forked apps repo and did an upstream merge recently. It is working fine when running yarn start, but whenever we try to build the code and use that index.html file its failing to run. There is no error on build, but failing after it. https://github.com/availproject/avail-apps&#xD;&#xA;Error is attatched below. &#xD;&#xA;&#xD;&#xA;[![build error ][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8xO80.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36608" PostHistoryTypeId="1" PostId="9218" RevisionGUID="e0d0c489-ea44-4347-a0eb-e70f28b2df19" CreationDate="2023-07-10T07:24:20.993" UserId="552" Text="polkadot-apps build working, but failing to run" ContentLicense="CC BY-SA 4.0" />
  <row Id="36609" PostHistoryTypeId="3" PostId="9218" RevisionGUID="e0d0c489-ea44-4347-a0eb-e70f28b2df19" CreationDate="2023-07-10T07:24:20.993" UserId="552" Text="|polkadot-js|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36610" PostHistoryTypeId="2" PostId="9219" RevisionGUID="24e161cb-48b1-4d61-90dd-8b1395fe30d9" CreationDate="2023-07-10T08:06:05.623" UserId="4418" Text="I trying to make Signature using Polkadot.js without mnemonic in LedgerAddress.&#xD;&#xA;&#xD;&#xA;   ```&#xD;&#xA;import { hdLedger } from &quot;@polkadot/util-crypto&quot;;&#xD;&#xA;import { u8aToHex } from &quot;@polkadot/util&quot;;&#xD;&#xA;import Keyring from &quot;@polkadot/keyring&quot;;&#xD;&#xA;const keyring = new Keyring();&#xD;&#xA;keyring.setSS58Format(0);&#xD;&#xA;function getSuri(seed, derivePath, pairType) {&#xD;&#xA;  return pairType === &quot;ed25519-ledger&quot;&#xD;&#xA;    ? u8aToHex(hdLedger(seed, derivePath).secretKey.slice(0, 32))&#xD;&#xA;    : pairType === &quot;ethereum&quot;&#xD;&#xA;    ? `${seed}/${derivePath}`&#xD;&#xA;    : `${seed}${derivePath}`;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function addressFromSeed(seed, derivePath, pairType) {&#xD;&#xA;  return keyring.createFromUri(&#xD;&#xA;    getSuri(seed, derivePath, pairType),&#xD;&#xA;    {},&#xD;&#xA;    pairType === &quot;ed25519-ledger&quot; ? &quot;ed25519&quot; : pairType&#xD;&#xA;  ).address;&#xD;&#xA;}&#xD;&#xA;const Polkadot_Path = &quot;m/44'/354'/0'/0/0&quot;;&#xD;&#xA;const Phase =&#xD;&#xA;  &quot;tilt wise rent open chunk wheel tonight army meat virus rule catch hospital nurse verb pretty guide cook illegal spell honey obscure desk brick&quot;;&#xD;&#xA;console.log(&quot;Target: &quot;, addressFromSeed(Phase, Polkadot_Path, &quot;ed25519-ledger&quot;));&#xD;&#xA;function hexStrToByteArr(hexStr) {&#xD;&#xA;  hexStr = hexStr.replace(/ /g, &quot;&quot;);&#xD;&#xA;&#xD;&#xA;  if (hexStr.slice(0, 2).toLowerCase() === &quot;0x&quot;) hexStr = hexStr.slice(2, hexStr.length);&#xD;&#xA;  const bin = [];&#xD;&#xA;  let i;&#xD;&#xA;  let c;&#xD;&#xA;  let isEmpty = 1;&#xD;&#xA;  let buffer;&#xD;&#xA;  for (i = 0; i &lt; hexStr.length; i++) {&#xD;&#xA;    c = hexStr.charCodeAt(i);&#xD;&#xA;    if ((c &gt; 47 &amp;&amp; c &lt; 58) || (c &gt; 64 &amp;&amp; c &lt; 71) || (c &gt; 96 &amp;&amp; c &lt; 103)) {&#xD;&#xA;      buffer = (buffer &lt;&lt; 4) ^ ((c &gt; 64 ? c + 9 : c) &amp; 15);&#xD;&#xA;      if ((isEmpty ^= 1)) {&#xD;&#xA;        bin.push(buffer &amp; 0xff);&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;  return bin;&#xD;&#xA;}&#xD;&#xA;const masterKey = &quot;32fc49249c9d192d1c2aa94c629b4d6fb9deb80165e9a1844bfd3894724d5dee&quot;;&#xD;&#xA;const masterToUint8 = new Uint8Array(hexStrToByteArr(masterKey));&#xD;&#xA;&#xD;&#xA;const result = keyring.addFromSeed(masterToUint8);&#xD;&#xA;console.log(&quot;result: &quot;, result.address);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The master key was created using &quot;PBKDF2&quot; and &quot;bip32.fromSeed&quot;.&#xD;&#xA;&#xD;&#xA;The problem is that the target log and result log are different. I don't understand why this is happening and how to fix it." ContentLicense="CC BY-SA 4.0" />
  <row Id="36612" PostHistoryTypeId="1" PostId="9219" RevisionGUID="24e161cb-48b1-4d61-90dd-8b1395fe30d9" CreationDate="2023-07-10T08:06:05.623" UserId="4418" Text="How to Recover Address from MasterPrivateKey in JS" ContentLicense="CC BY-SA 4.0" />
  <row Id="36613" PostHistoryTypeId="3" PostId="9219" RevisionGUID="24e161cb-48b1-4d61-90dd-8b1395fe30d9" CreationDate="2023-07-10T08:06:05.623" UserId="4418" Text="|polkadot-js|signing|address|ledger|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36614" PostHistoryTypeId="50" PostId="5307" RevisionGUID="bb64a06d-3367-421b-b26c-95f9caa718a9" CreationDate="2023-07-10T10:01:50.213" UserId="-1" />
  <row Id="36615" PostHistoryTypeId="2" PostId="9220" RevisionGUID="f571f2dd-04b2-4302-842c-d8aa4098104b" CreationDate="2023-07-10T11:34:49.563" UserId="143" Text="so i am building a dapp with ink &#xD;&#xA;it has messages to get data and put data &#xD;&#xA;and on FE when i logged in with the polkadot-js extension wallet &#xD;&#xA;everytime i reload the page it asks me to sign the transaction beacuase it makes a call to the contract messages to get and display the data &#xD;&#xA; what will be the best solution for it, &#xD;&#xA;i thought about implementing a cache mechanism or redis database to store data which already has been fetched and if the data is there no need to make a call to the message again. &#xD;&#xA;but i don't know if there is any other way to getting rid of this may be from contract side ?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36617" PostHistoryTypeId="1" PostId="9220" RevisionGUID="f571f2dd-04b2-4302-842c-d8aa4098104b" CreationDate="2023-07-10T11:34:49.563" UserId="143" Text="ink dapp asking to sign transactions everytime i reload" ContentLicense="CC BY-SA 4.0" />
  <row Id="36618" PostHistoryTypeId="3" PostId="9220" RevisionGUID="f571f2dd-04b2-4302-842c-d8aa4098104b" CreationDate="2023-07-10T11:34:49.563" UserId="143" Text="|ink|transactions|blockchain|polkadot-js-extension|database|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36619" PostHistoryTypeId="2" PostId="9221" RevisionGUID="dbf6738e-ae6e-4b9d-94d1-9bedce260c9c" CreationDate="2023-07-10T11:36:01.210" UserId="3109" Text="The error message indicates that the `LineColumn` struct or variant cannot be found in the `proc_macro` crate. The suggested solution is to import the struct through its public re-export or refer to it directly.&#xD;&#xA;&#xD;&#xA;Here's an example of how you can resolve the error by importing the `LineColumn` struct directly:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use proc_macro::LineColumn;&#xD;&#xA;&#xD;&#xA;// Rest of your code&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Alternatively, you can use destructuring assignment to extract the `line` and `column` fields directly without mentioning the struct's name:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let LineColumn { line, column } = s.start();&#xD;&#xA;let LineColumn { line, column } = s.end();&#xD;&#xA;&#xD;&#xA;// Rest of your code&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;By using either of these approaches, the `LineColumn` struct should be accessible in your code, resolving the compilation error." ContentLicense="CC BY-SA 4.0" />
  <row Id="36624" PostHistoryTypeId="2" PostId="9223" RevisionGUID="7901fb26-283d-4ba5-827b-3cc0f7844c4b" CreationDate="2023-07-10T12:01:06.407" UserId="3109" Text="To compile the Substrate Node Template with Parity DB instead of RocksDB, you'll need to make the following changes:&#xD;&#xA;&#xD;&#xA;1. Update `Cargo.toml`: Open the `Cargo.toml` file in the Substrate Node Template project and modify the dependencies section. Remove the `rocksdb` dependency and add the `parity-db` dependency instead. Your `Cargo.toml` file should look something like this:&#xD;&#xA;&#xD;&#xA;   ```toml&#xD;&#xA;   [dependencies]&#xD;&#xA;   # Remove the rocksdb dependency&#xD;&#xA;   # rocksdb = { version = &quot;0.6&quot;, optional = true, features = [&quot;full&quot;] }&#xD;&#xA;   &#xD;&#xA;   # Add the parity-db dependency&#xD;&#xA;   parity-db = { version = &quot;2.1&quot;, optional = true }&#xD;&#xA;   ```&#xD;&#xA;&#xD;&#xA;2. Update `lib.rs`: Open the `lib.rs` file (or the main file of your substrate node) and update the storage configuration. Replace the `RocksDb` storage configuration with `ParityDb`. Here's an example:&#xD;&#xA;&#xD;&#xA;   ```rust&#xD;&#xA;   use substrate_node_template_runtime::{&#xD;&#xA;       // Replace `RocksDb` with `ParityDb`&#xD;&#xA;       ParityDb, Runtime,&#xD;&#xA;   };&#xD;&#xA;&#xD;&#xA;   const PARITY_DB_CONFIG: &amp;'static str = r#&quot;&#xD;&#xA;   {&#xD;&#xA;       &quot;path&quot;: &quot;./parity_db&quot;,&#xD;&#xA;       &quot;cache_size&quot;: 536870912,&#xD;&#xA;       &quot;write_buffer_size&quot;: 268435456,&#xD;&#xA;       &quot;max_open_files&quot;: 10000,&#xD;&#xA;       &quot;block_cache_size&quot;: 268435456,&#xD;&#xA;       &quot;disable_block_cache&quot;: false,&#xD;&#xA;       &quot;max_table_size&quot;: 268435456,&#xD;&#xA;       &quot;block_size&quot;: 4096,&#xD;&#xA;       &quot;paranoid_checks&quot;: false,&#xD;&#xA;       &quot;verify_checksums&quot;: true,&#xD;&#xA;       &quot;max_background_compactions&quot;: 10,&#xD;&#xA;       &quot;num_levels&quot;: 7,&#xD;&#xA;       &quot;level_compaction_dynamic_level_bytes&quot;: true,&#xD;&#xA;       &quot;level_compaction_trigger&quot;: 4,&#xD;&#xA;       &quot;level_compaction_files&quot;: 10,&#xD;&#xA;       &quot;disable_auto_compactions&quot;: false,&#xD;&#xA;       &quot;soft_pending_compaction_bytes_limit&quot;: 68719476736,&#xD;&#xA;       &quot;hard_pending_compaction_bytes_limit&quot;: 274877906944,&#xD;&#xA;       &quot;force_consistency_checks&quot;: false,&#xD;&#xA;       &quot;use_fsync&quot;: false,&#xD;&#xA;       &quot;db_log_path&quot;: &quot;&quot;,&#xD;&#xA;       &quot;read_amp_bytes_per_bit&quot;: 0&#xD;&#xA;   }&#xD;&#xA;   &quot;#;&#xD;&#xA;&#xD;&#xA;   #[tokio::main]&#xD;&#xA;   async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;       // Replace `RocksDb` with `ParityDb` in the storage configuration&#xD;&#xA;       let _ = SubstrateNodeTemplateRuntime::from_storage(&#xD;&#xA;           ParityDb::open(Path::new(&quot;./parity_db&quot;), PARITY_DB_CONFIG.parse().unwrap())?,&#xD;&#xA;       )?;&#xD;&#xA;   &#xD;&#xA;       // Rest of your code&#xD;&#xA;   }&#xD;&#xA;   ```&#xD;&#xA;&#xD;&#xA;   In this example, the `ParityDb` storage configuration is used instead of `RocksDb`. Adjust the path and other configuration options based on your requirements.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36626" PostHistoryTypeId="5" PostId="8834" RevisionGUID="4bc7c324-f510-422e-8563-1d02db5f2fb6" CreationDate="2023-07-10T14:11:57.323" UserId="3171" Comment="deleted 3 characters in body" Text="I want to decode bytes on solidity side that was decoded with scale codec.&#xD;&#xA;Is the any implementation of `scale codec`. (decode) on solidity side?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36627" PostHistoryTypeId="2" PostId="9224" RevisionGUID="ae2329d3-b805-4784-b108-cff943f22043" CreationDate="2023-07-10T14:26:11.387" UserId="73" Text="&gt; What is this used for? Is it possible that we don't use this in our chain?&#xD;&#xA;&#xD;&#xA;Yes, you probably. It was added was part of implementing support for storage chains: [7688](https://github.com/paritytech/substrate/pull/7868), [9171](https://github.com/paritytech/substrate/pull/9171) and others. Your chain is very likely not using this functionality. Best to read into these prs to get some understanding. AFAIK this code is currently not being used by someone actively.&#xD;&#xA;&#xD;&#xA;&gt; If we don't use it, is it safe to always ignore this field, i.e. never send it and discard if received?&#xD;&#xA;&#xD;&#xA;Yes&#xD;&#xA;&#xD;&#xA;&gt; Does this really never get validated during import? If so, isn't there a possibility of filling someone's DB with junk through this mechanism?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;indexed_body: if request.fields.contains(BlockAttributes::INDEXED_BODY) {&#xD;&#xA;	Some(block_data.indexed_body)&#xD;&#xA;} else {&#xD;&#xA;	None&#xD;&#xA;},&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can find this code [here](https://github.com/paritytech/substrate/blob/b9e97232900a285b64d13986177edd1328efc525/client/network/sync/src/lib.rs#L1289-L1293). It basically discards the data if the node didn't requested it. " ContentLicense="CC BY-SA 4.0" />
  <row Id="36629" PostHistoryTypeId="2" PostId="9225" RevisionGUID="d6f4116c-799b-4643-8ea3-c23348459645" CreationDate="2023-07-10T14:39:57.180" UserId="2099" Text="### Setup&#xD;&#xA;I'm currently integrating staking functionality into my pallet. Here is a snipped of the relevant part:&#xD;&#xA;```&#xD;&#xA;let who = ensure_signed(origin.clone())?;&#xD;&#xA;let required_stake = T::RequiredStake::get();&#xD;&#xA;let controller: &lt;&lt;T as frame_system::Config&gt;::Lookup as StaticLookup&gt;::Source =&#xD;&#xA;						T::Lookup::unlookup(who.clone());&#xD;&#xA;let payee = RewardDestination::Staked;&#xD;&#xA;&lt;pallet_staking::Pallet&lt;T&gt;&gt;::bond(origin, controller, required_stake, payee)?;&#xD;&#xA;```&#xD;&#xA;where `T::RequiredStake` is just some amount of balance,&#xD;&#xA;so this all compiles fine.&#xD;&#xA;&#xD;&#xA;### Problem&#xD;&#xA;When testing with a mock runtime I get the following error (abbreviated):&#xD;&#xA;```&#xD;&#xA;panicked at 'called `Result::unwrap()` on an `Err` value: Module(ModuleError { index: 4, error: [17, 0, 0, 0], message: Some(&quot;BadState&quot;) })'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To me this is not clear what the error is supposed to represent.&#xD;&#xA;I would have expected the staking pallet to throw some other error (e.g not enough free balance or similar), but not this.&#xD;&#xA;&#xD;&#xA;My mock runtime is configured in this way:&#xD;&#xA;```&#xD;&#xA;impl pallet_staking::Config for TestRuntime {&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type CurrencyBalance = Balance;&#xD;&#xA;	type UnixTime = Timestamp;&#xD;&#xA;	type CurrencyToVote = U128CurrencyToVote;&#xD;&#xA;	type GenesisElectionProvider = NoElection&lt;(AccountId, BlockNumber, Staking, ())&gt;;&#xD;&#xA;	type ElectionProvider = NoElection&lt;(AccountId, BlockNumber, Staking, ())&gt;;&#xD;&#xA;	type MaxNominations = MaxNominations;&#xD;&#xA;	type RewardRemainder = ();&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type Slash = ();&#xD;&#xA;	type Reward = ();&#xD;&#xA;	type SessionsPerEra = SessionsPerEra;&#xD;&#xA;	type BondingDuration = BondingDuration;&#xD;&#xA;	type SlashDeferDuration = SlashDeferDuration;&#xD;&#xA;	type SessionInterface = ();&#xD;&#xA;	type EraPayout = ();&#xD;&#xA;	type NextNewSession = ();&#xD;&#xA;	type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;&#xD;&#xA;	type OffendingValidatorsThreshold = OffendingValidatorsThreshold;&#xD;&#xA;	type TargetList = UseValidatorsMap&lt;Self&gt;;&#xD;&#xA;	type MaxUnlockingChunks = ConstU32&lt;32&gt;;&#xD;&#xA;	type HistoryDepth = frame_support::traits::ConstU32&lt;84&gt;;&#xD;&#xA;	type BenchmarkingConfig = StakingBenchmarkingConfig;&#xD;&#xA;	type WeightInfo = pallet_staking::weights::SubstrateWeight&lt;TestRuntime&gt;;&#xD;&#xA;	type VoterList = VoterList;&#xD;&#xA;	type OnStakerSlash = ();&#xD;&#xA;	type AdminOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there maybe some `GenesisConfig` I need to set for the staking pallet?&#xD;&#xA;&#xD;&#xA;Looking forward to hearing your thoughts.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36631" PostHistoryTypeId="1" PostId="9225" RevisionGUID="d6f4116c-799b-4643-8ea3-c23348459645" CreationDate="2023-07-10T14:39:57.180" UserId="2099" Text="ModuleError, BadState" ContentLicense="CC BY-SA 4.0" />
  <row Id="36632" PostHistoryTypeId="3" PostId="9225" RevisionGUID="d6f4116c-799b-4643-8ea3-c23348459645" CreationDate="2023-07-10T14:39:57.180" UserId="2099" Text="|pallet|runtime|staking|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36634" PostHistoryTypeId="2" PostId="9226" RevisionGUID="b68fa9a8-cff2-43ec-9444-3287a30aa187" CreationDate="2023-07-10T17:38:08.133" UserId="629" Text="You can connect with a light client to any Substrate-compatible blockchai by using the `addChain` function.&#xD;&#xA;&#xD;&#xA;To connect to that chain you need to initialize the light client and then call the `addChain` for your substrate chain (or the `addWellKnownChain` for any of the polkadot, kusama, westend and/or rococo) on this client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Connecting to a parachain is done the same way as connecting to a standalone chain, by init-ing a client and then calling `addChain`. The difference here is that if you call `addChain` with a parachain chain specification, you **must** have connected to its corresponding relay chain beforehand (using again the same function `addChain`. Failing to do so will lead to an error at the initialization of the parachain.&#xD;&#xA;&#xD;&#xA;For example the following would  work:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;// initializethe client&#xD;&#xA;const client = createScClient();&#xD;&#xA;// add the desired chain by providing the (stringified) chainspec&#xD;&#xA;await client.addChain(relayChain);&#xD;&#xA;&#xD;&#xA;// (optional) add the parachain (of the above added relay chain) by providing the (strinfied) chainspec of the parachain&#xD;&#xA;await client.addChain(parachain);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36636" PostHistoryTypeId="2" PostId="9227" RevisionGUID="52d33242-e06d-407a-ad7a-b3f729905709" CreationDate="2023-07-10T17:44:49.090" UserId="372" Text="I'm new to ink! smart contracts, and trying to figure out how to set up my storage. I have a basic DAO. The DAO has members, and each member has a score associated. So far a mapping sounds like the perfect thing.&#xD;&#xA;&#xD;&#xA;Occasionally we will need the members sorted by their scores. I'm curious if it is practical to keep the data sorted in storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="36638" PostHistoryTypeId="1" PostId="9227" RevisionGUID="52d33242-e06d-407a-ad7a-b3f729905709" CreationDate="2023-07-10T17:44:49.090" UserId="372" Text="Is there an `OrderedMapping` storage type available in ink!?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36639" PostHistoryTypeId="3" PostId="9227" RevisionGUID="52d33242-e06d-407a-ad7a-b3f729905709" CreationDate="2023-07-10T17:44:49.090" UserId="372" Text="|ink|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36640" PostHistoryTypeId="34" PostId="9078" RevisionGUID="4e86a4cf-d0f3-4f52-9a7b-40f97b426356" CreationDate="2023-07-10T19:01:35.253" UserId="-1" Comment="29" />
  <row Id="36647" PostHistoryTypeId="5" PostId="9225" RevisionGUID="418f0886-d6a7-4b41-abb6-7a48217c0b6c" CreationDate="2023-07-11T08:46:39.360" UserId="2099" Comment="added 382 characters in body" Text="### Setup&#xD;&#xA;I'm currently integrating staking functionality into my pallet. Here is a snipped of the relevant part:&#xD;&#xA;```&#xD;&#xA;let who = ensure_signed(origin.clone())?;&#xD;&#xA;let required_stake = T::RequiredStake::get();&#xD;&#xA;let controller: &lt;&lt;T as frame_system::Config&gt;::Lookup as StaticLookup&gt;::Source =&#xD;&#xA;						T::Lookup::unlookup(who.clone());&#xD;&#xA;let payee = RewardDestination::Staked;&#xD;&#xA;&lt;pallet_staking::Pallet&lt;T&gt;&gt;::bond(origin, controller, required_stake, payee)?;&#xD;&#xA;```&#xD;&#xA;where `T::RequiredStake` is just some amount of balance,&#xD;&#xA;so this all compiles fine.&#xD;&#xA;&#xD;&#xA;The abbreviated test runtime looks like this:&#xD;&#xA;```&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum TestRuntime where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;	{&#xD;&#xA;		System: frame_system,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;		VoterList: pallet_bags_list,&#xD;&#xA;		Staking: pallet_staking,&#xD;&#xA;		ShelfCommittees: crate,&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl pallet_staking::Config for TestRuntime {&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type CurrencyBalance = Balance;&#xD;&#xA;	type UnixTime = Timestamp;&#xD;&#xA;	type CurrencyToVote = U128CurrencyToVote;&#xD;&#xA;	type GenesisElectionProvider = NoElection&lt;(AccountId, BlockNumber, Staking, ())&gt;;&#xD;&#xA;	type ElectionProvider = NoElection&lt;(AccountId, BlockNumber, Staking, ())&gt;;&#xD;&#xA;	type MaxNominations = MaxNominations;&#xD;&#xA;	type RewardRemainder = ();&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type Slash = ();&#xD;&#xA;	type Reward = ();&#xD;&#xA;	type SessionsPerEra = SessionsPerEra;&#xD;&#xA;	type BondingDuration = BondingDuration;&#xD;&#xA;	type SlashDeferDuration = SlashDeferDuration;&#xD;&#xA;	type SessionInterface = ();&#xD;&#xA;	type EraPayout = ();&#xD;&#xA;	type NextNewSession = ();&#xD;&#xA;	type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;&#xD;&#xA;	type OffendingValidatorsThreshold = OffendingValidatorsThreshold;&#xD;&#xA;	type TargetList = UseValidatorsMap&lt;Self&gt;;&#xD;&#xA;	type MaxUnlockingChunks = ConstU32&lt;32&gt;;&#xD;&#xA;	type HistoryDepth = frame_support::traits::ConstU32&lt;84&gt;;&#xD;&#xA;	type BenchmarkingConfig = StakingBenchmarkingConfig;&#xD;&#xA;	type WeightInfo = pallet_staking::weights::SubstrateWeight&lt;TestRuntime&gt;;&#xD;&#xA;	type VoterList = VoterList;&#xD;&#xA;	type OnStakerSlash = ();&#xD;&#xA;	type AdminOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Problem&#xD;&#xA;When testing with a mock runtime I get the following error (abbreviated):&#xD;&#xA;```&#xD;&#xA;panicked at 'called `Result::unwrap()` on an `Err` value: Module(ModuleError { index: 4, error: [17, 0, 0, 0], message: Some(&quot;BadState&quot;) })'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To me this is not clear what the error is supposed to represent.&#xD;&#xA;I would have expected the staking pallet to throw some other error (e.g not enough free balance or similar), but not this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is there maybe some `GenesisConfig` I need to set for the staking pallet?&#xD;&#xA;&#xD;&#xA;Looking forward to hearing your thoughts.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36648" PostHistoryTypeId="5" PostId="9214" RevisionGUID="2191e3b6-f68f-4cbf-b3d0-12810e807c31" CreationDate="2023-07-11T08:56:28.017" UserId="2484" Comment="added 162 characters in body" Text="Hey valuable Substrate masterminds,&#xD;&#xA;&#xD;&#xA;I wonder how to use this new XCMv3 remote lock feature on a parachain. Consider these references: &#xD;&#xA;&#xD;&#xA; - [remote locking tests](https://github.com/paritytech/polkadot/blob/02905341f7f7d1b3aa1944ccbe3a86072fbf4b06/xcm/xcm-builder/src/tests/locking.rs#L20-L238)&#xD;&#xA; - [Asset lock trait](https://github.com/paritytech/polkadot/blob/02905341f7f7d1b3aa1944ccbe3a86072fbf4b06/xcm/xcm-executor/src/traits/asset_lock.rs#L62-L123)&#xD;&#xA;- [Remote locking PR by Gavin Wood](https://github.com/paritytech/polkadot/pull/4945)&#xD;&#xA;&#xD;&#xA;Assume a Kusama account used remote locking on Kusama and those funds are able to get unlocked by my parachain. At this point `LockAsset` was used and `NoteUnlockable` is done.&#xD;&#xA;&#xD;&#xA;A general question: If KSM is remote locked on the Kusama chain for my parachain, can the KSM be still staked or can it be used for voting in democracy still?&#xD;&#xA;&#xD;&#xA;Now to my parachain: Where can I find on-chain the information that an account has locked KSM on Kusama for my chain? If I got the information of the first question, my second question is: If I want to use this for a voting mechanism on my parachain, but I have two different voting mechanisms that should not overlap with the funds: how can I keep track of which funds were already taken out of the remote lock?&#xD;&#xA;&#xD;&#xA;If my voting mechanism is allowed to have overlapping funds, then it seems quite easy to implement: I just have to query the information on-chain how many funds have been locked on behalf of my chain. So, the most important question would be the first one: How can I query this on-chain?&#xD;&#xA;&#xD;&#xA;Are there any existing remote lock tests for parachains out there? If yes, please provide a reference. I know of XCM transfer tests, which use orml xtokens for an easy XCM interface, but I don't think orml has implemented a similar easy interface for remote locks yet.&#xD;&#xA;&#xD;&#xA;How to unlock the remote funds from an account on Kusama from my parachain in my runtime?&#xD;&#xA;&#xD;&#xA;What if there are multiple remote locks on Kusama on a specific account for my chain: Are those locks being internally combined, so that my parachain only sees the maximum amount?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36649" PostHistoryTypeId="4" PostId="9214" RevisionGUID="2191e3b6-f68f-4cbf-b3d0-12810e807c31" CreationDate="2023-07-11T08:56:28.017" UserId="2484" Comment="added 162 characters in body" Text="How does XCM remote locking work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36650" PostHistoryTypeId="5" PostId="9214" RevisionGUID="413f8732-c04c-4842-bc7e-076f6c511d6c" CreationDate="2023-07-11T09:02:32.720" UserId="2484" Comment="added 162 characters in body" Text="Hey valuable Substrate masterminds,&#xD;&#xA;&#xD;&#xA;I wonder how to use this new XCMv3 remote lock feature on a parachain. Consider these references: &#xD;&#xA;&#xD;&#xA; - [remote locking tests](https://github.com/paritytech/polkadot/blob/02905341f7f7d1b3aa1944ccbe3a86072fbf4b06/xcm/xcm-builder/src/tests/locking.rs#L20-L238)&#xD;&#xA; - [Asset lock trait](https://github.com/paritytech/polkadot/blob/02905341f7f7d1b3aa1944ccbe3a86072fbf4b06/xcm/xcm-executor/src/traits/asset_lock.rs#L62-L123)&#xD;&#xA;- [Remote locking PR by Gavin Wood](https://github.com/paritytech/polkadot/pull/4945)&#xD;&#xA;&#xD;&#xA;Assume a Kusama account used remote locking on Kusama and those funds are able to get unlocked by my parachain. At this point `LockAsset` was used and `NoteUnlockable` is done.&#xD;&#xA;&#xD;&#xA;Just a couple of general questions: &#xD;&#xA;&#xD;&#xA;If KSM is remote locked on the Kusama chain for my parachain, can the KSM be still staked or can it be used for voting in democracy still?&#xD;&#xA;&#xD;&#xA;The unlock can only be made by my parachain if it is remote locked on Kusama. But what if my parachain is evolves to be malicious and never unlocks the KSM of their users. Is the Kusama governance able to unlock the KSM too?&#xD;&#xA;&#xD;&#xA;Now to my parachain: Where can I find on-chain the information that an account has locked KSM on Kusama for my chain? If I got the information of the first question, my second question is: If I want to use this for a voting mechanism on my parachain, but I have two different voting mechanisms that should not overlap with the funds: how can I keep track of which funds were already taken out of the remote lock?&#xD;&#xA;&#xD;&#xA;If my voting mechanism is allowed to have overlapping funds, then it seems quite easy to implement: I just have to query the information on-chain how many funds have been locked on behalf of my chain. So, the most important question would be the first one: How can I query this on-chain?&#xD;&#xA;&#xD;&#xA;Are there any existing remote lock tests for parachains out there? If yes, please provide a reference. I know of XCM transfer tests, which use orml xtokens for an easy XCM interface, but I don't think orml has implemented a similar easy interface for remote locks yet.&#xD;&#xA;&#xD;&#xA;How to unlock the remote funds from an account on Kusama from my parachain in my runtime?&#xD;&#xA;&#xD;&#xA;What if there are multiple remote locks on Kusama on a specific account for my chain: Are those locks being internally combined, so that my parachain only sees the maximum amount?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36651" PostHistoryTypeId="2" PostId="9228" RevisionGUID="83a7d07f-0e51-41c5-89e0-4662ccb84471" CreationDate="2023-07-11T09:33:28.857" UserId="2099" Text="So it turns out that the `bond` extrinsic of `pallet-staking` is attempting to call `inc_consumers` of `frame-system`, which checks if the accounts `providers` is greater than 0. &#xD;&#xA;If this is not the case then `NoProviders` is returned, which the staking pallet maps to `BadState` which is a pretty bad error message IMO.&#xD;&#xA;&#xD;&#xA;So making sure that `providers` for the account is at least 1 does the trick.&#xD;&#xA;This can be done by calling `inc_providers`." ContentLicense="CC BY-SA 4.0" />
  <row Id="36653" PostHistoryTypeId="2" PostId="9229" RevisionGUID="b71bf423-bc81-4850-92fe-4b8a1163788b" CreationDate="2023-07-11T09:47:06.867" UserId="2372" Text="I want to make a storage for the pallet but I'm getting this error&#xD;&#xA;&#xD;&#xA;    	/// The target parachains to ping.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Targets&lt;T:Config&gt; = StorageValue&lt;&#xD;&#xA;		_,&#xD;&#xA;		BoundedVec&lt;(ParaId, BoundedVec&lt;u8, MaxPayloadSize&gt;), MaxParachains&gt;,&#xD;&#xA;		ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;And the Error &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;      error: Invalid generic declaration, trait is defined with instance but generic use none&#xD;&#xA;      --&gt; pallets/xnft/src/lib.rs:50:11&#xD;&#xA;       |&#xD;&#xA;    50 |     pub type Targets&lt;T:Config&gt; = StorageValue&lt;&#xD;&#xA;       |              ^^^^^^^" ContentLicense="CC BY-SA 4.0" />
  <row Id="36655" PostHistoryTypeId="1" PostId="9229" RevisionGUID="b71bf423-bc81-4850-92fe-4b8a1163788b" CreationDate="2023-07-11T09:47:06.867" UserId="2372" Text="error: Invalid generic declaration, trait is defined with instance but generic use none" ContentLicense="CC BY-SA 4.0" />
  <row Id="36656" PostHistoryTypeId="3" PostId="9229" RevisionGUID="b71bf423-bc81-4850-92fe-4b8a1163788b" CreationDate="2023-07-11T09:47:06.867" UserId="2372" Text="|pallet|rust|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36657" PostHistoryTypeId="5" PostId="9228" RevisionGUID="6fa1d0ba-2b4e-4b9e-9043-53417b64630c" CreationDate="2023-07-11T09:47:23.967" UserId="2099" Comment="added 32 characters in body" Text="So it turns out that the `bond` extrinsic of `pallet-staking` is attempting to call `inc_consumers` of `frame-system`, which checks if the accounts `providers` is greater than 0. &#xD;&#xA;If this is not the case then `NoProviders` is returned, which the staking pallet maps to `BadState` which is a pretty bad error message IMO.&#xD;&#xA;&#xD;&#xA;So making sure that `providers` for the account is at least 1 does the trick.&#xD;&#xA;This can be done by calling `&lt;frame_system::Pallet&lt;T&gt;&gt;::inc_providers(who)`." ContentLicense="CC BY-SA 4.0" />
  <row Id="36658" PostHistoryTypeId="2" PostId="9230" RevisionGUID="ebbafcf1-df9a-4600-8a75-9646bc0a467f" CreationDate="2023-07-11T10:07:46.733" UserId="18" Text="We faced this issue before, how we solved it was by using the correct rust version (including nightly) that the version of polkadot/substrate you are referencing in your Cargo.toml&#xD;&#xA;&#xD;&#xA;You can have a look at the release [notes][1] because it shows you what version a particular release was built with&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/releases/tag/v0.9.43" ContentLicense="CC BY-SA 4.0" />
  <row Id="36660" PostHistoryTypeId="50" PostId="4226" RevisionGUID="4435f651-5d6b-402d-8352-ecc4adccb582" CreationDate="2023-07-11T11:03:15.367" UserId="-1" />
  <row Id="36661" PostHistoryTypeId="2" PostId="9231" RevisionGUID="0d64beaf-c842-48f4-9a2e-bc6ad65f1035" CreationDate="2023-07-11T13:37:16.653" UserId="251" Text="It looks like your pallet supports multi-instances.&#xD;&#xA;&#xD;&#xA;You need to add `I` to your storage items as well.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// The target parachains to ping.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type Targets&lt;T: Config, I: 'static = ()&gt; = StorageValue&lt;&#xD;&#xA;    _,&#xD;&#xA;    BoundedVec&lt;(ParaId, BoundedVec&lt;u8, MaxPayloadSize&gt;), MaxParachains&gt;,&#xD;&#xA;    ValueQuery,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Real world example:&#xD;&#xA;&#xD;&#xA;&gt; https://github.com/paritytech/substrate/blob/4b6e735f0fab0c50f13e5b7f656512c101cacdeb/frame/balances/src/lib.rs#L372-L376.&#xD;&#xA;&gt; &#xD;&#xA;```rs&#xD;&#xA;/// The total units issued in the system.&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn total_issuance)]&#xD;&#xA;#[pallet::whitelist_storage]&#xD;&#xA;pub type TotalIssuance&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageValue&lt;_, T::Balance, ValueQuery&gt;;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36663" PostHistoryTypeId="2" PostId="9232" RevisionGUID="9c511ea0-ad98-4ffb-8c63-36b62ca859ef" CreationDate="2023-07-11T14:17:54.933" UserId="251" Text="If the DAO set is not too large, it would be best to use a `BTreeMap`. &#xD;&#xA;&#xD;&#xA;Currently there is no ordered mapping available in pallet, IIRC." ContentLicense="CC BY-SA 4.0" />
  <row Id="36665" PostHistoryTypeId="2" PostId="9233" RevisionGUID="279facb7-3e94-4b87-a4c8-a613a17cec9c" CreationDate="2023-07-11T14:52:25.433" UserId="386" Text="I've successfully integrated `Frontier` into my runtime and have accessed the funds from an account, Alice's, using its SS58 account. To achieve this, I truncated the public address to retrieve the H160 address.&#xD;&#xA;&#xD;&#xA;Currently, I am looking to transfer some of these funds to another Metamask account, for which I have the private key. The target account is in H160 format.&#xD;&#xA;&#xD;&#xA;My stumbling block is understanding the process of transferring funds from Alice's SS58 account to the H160 target account. Could anyone shed light on how this can be accomplished? Your guidance on this would be immensely valuable." ContentLicense="CC BY-SA 4.0" />
  <row Id="36667" PostHistoryTypeId="1" PostId="9233" RevisionGUID="279facb7-3e94-4b87-a4c8-a613a17cec9c" CreationDate="2023-07-11T14:52:25.433" UserId="386" Text="Transferring Funds from SS58 Account to H160 Account Using Frontier and Metamask" ContentLicense="CC BY-SA 4.0" />
  <row Id="36668" PostHistoryTypeId="3" PostId="9233" RevisionGUID="279facb7-3e94-4b87-a4c8-a613a17cec9c" CreationDate="2023-07-11T14:52:25.433" UserId="386" Text="|frontier|metamask|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36669" PostHistoryTypeId="5" PostId="9227" RevisionGUID="a69d7c4f-fcc9-4320-8279-78fecd2fb2ab" CreationDate="2023-07-11T16:05:39.063" UserId="372" Comment="explain that the score is a simple number" Text="I'm new to ink! smart contracts, and trying to figure out how to set up my storage. I have a basic DAO. The DAO has members, and each member has a score (a u128) associated. So far a mapping sounds like the perfect thing.&#xD;&#xA;&#xD;&#xA;Occasionally we will need the members sorted by their scores. I'm curious if it is practical to keep the data sorted in storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="36670" PostHistoryTypeId="4" PostId="9227" RevisionGUID="a69d7c4f-fcc9-4320-8279-78fecd2fb2ab" CreationDate="2023-07-11T16:05:39.063" UserId="372" Comment="explain that the score is a simple number" Text="Is there an `OrderedMapping` storage type available in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36671" PostHistoryTypeId="5" PostId="9232" RevisionGUID="1c72b21f-3118-476a-8e87-7db7139ef1a2" CreationDate="2023-07-11T16:10:21.850" UserId="251" Comment="added 9 characters in body" Text="If the DAO set is not too large, it would be best to use a `BTreeMap`. &#xD;&#xA;&#xD;&#xA;Currently there is no ordered mapping available even in the pallet, IIRC." ContentLicense="CC BY-SA 4.0" />
  <row Id="36672" PostHistoryTypeId="2" PostId="9234" RevisionGUID="062b8cc7-d186-4ee4-a6b2-c4fb767b81a3" CreationDate="2023-07-11T17:45:57.510" UserId="4114" Text="I see that the DB weights (Rocks or Parity) are directly imported as constants in the runtime code. This means that whenever the runtime is built, it will use those constants. Why was this approach taken, since the runtime does not &quot;know&quot; which database is actually used by the hosts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36674" PostHistoryTypeId="1" PostId="9234" RevisionGUID="062b8cc7-d186-4ee4-a6b2-c4fb767b81a3" CreationDate="2023-07-11T17:45:57.510" UserId="4114" Text="Db weights in Runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="36675" PostHistoryTypeId="3" PostId="9234" RevisionGUID="062b8cc7-d186-4ee4-a6b2-c4fb767b81a3" CreationDate="2023-07-11T17:45:57.510" UserId="4114" Text="|runtime|weight|rocks-db|parity-db|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36676" PostHistoryTypeId="5" PostId="9233" RevisionGUID="00330294-ccbb-4ae4-85b4-2d6613ddd160" CreationDate="2023-07-11T17:53:11.403" UserId="386" Comment="deleted 50 characters in body" Text="I've successfully integrated `Frontier` into my runtime and have accessed the funds from an account, Alice's, using its SS58 account. To achieve this, I truncated the public address to retrieve the H160 address.&#xD;&#xA;&#xD;&#xA;Currently, I am looking to transfer some of these funds to another Metamask account, for which I have the private key. The target account is in H160 format.&#xD;&#xA;&#xD;&#xA;My stumbling block is understanding the process of transferring funds from Alice's SS58 account to the H160 target account. Could anyone shed light on how this can be accomplished? " ContentLicense="CC BY-SA 4.0" />
  <row Id="36677" PostHistoryTypeId="2" PostId="9235" RevisionGUID="7904627d-0ad5-40d5-9e0a-cf0bf0e8f342" CreationDate="2023-07-11T18:20:17.903" UserId="14" Text="I'm assuming you are using the Frontier's `polkadot-v0.9.39`, so there is no `AccountId20` there yet, right?&#xD;&#xA;&#xD;&#xA;You can use PolkadotJS UI to send an `evm.call()` extrinsic, like:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Encoded call data:&#xD;&#xA;```&#xD;&#xA;0x0801d43593c715fdd31c61141abd04a99fd6822c855800000000000000000000000000000000000000000430000064a7b3b6e00d000000000000000000000000000000000000000000000000a08601000000000000ca9a3b00000000000000000000000000000000000000000000000000000000000000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Alice's SS58 account is allowed to &quot;impersonate&quot; that H160 account in the EVM context.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9dnTg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36679" PostHistoryTypeId="2" PostId="9236" RevisionGUID="b96d23c8-8d90-46c9-9fb5-689b722bf2a0" CreationDate="2023-07-11T20:13:22.093" UserId="2445" Text="It turns out that an update to polkadot-v0.9.42 of the runtime did solve the issue. It is not clear yet why this resolved the issue. However, this included the change to XCM v3." ContentLicense="CC BY-SA 4.0" />
  <row Id="36681" PostHistoryTypeId="2" PostId="9237" RevisionGUID="2dcec72a-7edc-4cd4-b444-e04f95845b6c" CreationDate="2023-07-11T20:41:07.940" UserId="28" Text="The database weights used by the runtime is defined in your FRAME System configuration.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/runtime/polkadot/src/lib.rs#L172&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;type DbWeight = RocksDbWeight;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So in this case, you tell the runtime which database your clients are using, and all the weights will be correct for that database." ContentLicense="CC BY-SA 4.0" />
  <row Id="36683" PostHistoryTypeId="2" PostId="9238" RevisionGUID="6007389f-c552-493d-ae6b-d7f1317a641c" CreationDate="2023-07-11T23:22:36.850" UserId="3070" Text="On our substrate node using a storage double map.  We are trying to subscribe to an entries query.&#xD;&#xA;something like&#xD;&#xA;```&#xD;&#xA;const unsub = await api.query.system.balances.entries(ADDR, (res) =&gt; {&#xD;&#xA;  console.log(res);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; It works and gets the entries on the first call but it is not updating / running the callback when the storageMap is updated. &#xD;&#xA;is it not possible to subscribe to the entries of a storage map?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36685" PostHistoryTypeId="1" PostId="9238" RevisionGUID="6007389f-c552-493d-ae6b-d7f1317a641c" CreationDate="2023-07-11T23:22:36.850" UserId="3070" Text="Subscribe to storage map Entries?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36686" PostHistoryTypeId="3" PostId="9238" RevisionGUID="6007389f-c552-493d-ae6b-d7f1317a641c" CreationDate="2023-07-11T23:22:36.850" UserId="3070" Text="|storage|substrate-node|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36687" PostHistoryTypeId="2" PostId="9239" RevisionGUID="f7f1a060-952a-4319-bb03-3a7c6a176938" CreationDate="2023-07-11T23:54:55.953" UserId="651" Text="I was having the same issue in my GitHub actions and not locally.&#xD;&#xA;&#xD;&#xA;Updating my crates using `cargo update` seemed to fix the dependency that was causing this issue.&#xD;&#xA;&#xD;&#xA;Perhaps give this a try!" ContentLicense="CC BY-SA 4.0" />
  <row Id="36689" PostHistoryTypeId="2" PostId="9240" RevisionGUID="97eb7aef-f0ce-470f-b52c-9a9580ae1577" CreationDate="2023-07-12T04:14:17.527" UserId="29" Text="The code you referenced does not work for me. I get the following error:&#xD;&#xA;```&#xD;&#xA;  await api.query.system.balances.entries(ADDR, (res) =&gt; {&#xD;&#xA;                                  ^&#xD;&#xA;TypeError: Cannot read properties of undefined (reading 'entries')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You have the correct format for entries. For example:&#xD;&#xA;```js&#xD;&#xA;const referenda = await api.query.referenda.referendumInfoFor.entries();&#xD;&#xA;referenda.forEach(async (referendum) =&gt; {&#xD;&#xA;    if (referendum[1].toHuman()['Ongoing']) {&#xD;&#xA;        const referendumIndex = referendum[0].args[0].toNumber();&#xD;&#xA;        console.log(&quot;Referendum:&quot;, referendumIndex);&#xD;&#xA;        console.log(referendum[1].toJSON());&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Perhaps this is what you are trying to achieve:&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const subscribeBalances = async () =&gt; {&#xD;&#xA;  const provider = new WsProvider(ENDPOINT);&#xD;&#xA;  const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;  api.query.system.account(ADDR, (balance) =&gt; {&#xD;&#xA;    console.log(`Balance for account ${account}: ${balance.data.free}`);&#xD;&#xA;  });&#xD;&#xA;};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36691" PostHistoryTypeId="5" PostId="9240" RevisionGUID="f38373a7-3ff8-431c-8fa2-131dd6acf480" CreationDate="2023-07-12T04:30:24.807" UserId="29" Comment="added 102 characters in body" Text="The code you referenced does not work for me. I get the following error:&#xD;&#xA;```&#xD;&#xA;  await api.query.system.balances.entries(ADDR, (res) =&gt; {&#xD;&#xA;                                  ^&#xD;&#xA;TypeError: Cannot read properties of undefined (reading 'entries')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You have the correct format for entries. For example:&#xD;&#xA;```js&#xD;&#xA;const referenda = await api.query.referenda.referendumInfoFor.entries();&#xD;&#xA;referenda.forEach(async (referendum) =&gt; {&#xD;&#xA;    if (referendum[1].toHuman()['Ongoing']) {&#xD;&#xA;        const referendumIndex = referendum[0].args[0].toNumber();&#xD;&#xA;        console.log(&quot;Referendum:&quot;, referendumIndex);&#xD;&#xA;        console.log(referendum[1].toJSON());&#xD;&#xA;    }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Depending on your chain, the balances of your accounts are actually stored in FRAME system pallet.&#xD;&#xA;&#xD;&#xA;Perhaps this is what you are trying to achieve:&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;;&#xD;&#xA;&#xD;&#xA;export const subscribeBalances = async () =&gt; {&#xD;&#xA;  const provider = new WsProvider(ENDPOINT);&#xD;&#xA;  const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;  api.query.system.account(ADDR, (balance) =&gt; {&#xD;&#xA;    console.log(`Balance for account ${account}: ${balance.data.free}`);&#xD;&#xA;  });&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;Or depending on what you're trying to achieve you can also listen for events from the balances pallet. For example:&#xD;&#xA;- https://polkadot.js.org/docs/substrate/events#transferaccountid32-accountid32-u128" ContentLicense="CC BY-SA 4.0" />
  <row Id="36698" PostHistoryTypeId="2" PostId="9241" RevisionGUID="57245791-db47-4ca9-ab1b-55452a4af2b0" CreationDate="2023-07-12T07:19:59.043" UserId="379" Text="When trying to propose a `system.setCode` motion the extrinsic fails with `WrongProposalWeight`. We are experiencing this issue only with the above extrinsic and on polkadot-0.9.42 version. &#xD;&#xA;&#xD;&#xA;On an earlier version of polkadot (0.9.36) it seems to work flawlessly! &#xD;&#xA;&#xD;&#xA;I think something changed between 0.9.36 and 0.9.42 which impacts weight calculation regarding system extrinsics? " ContentLicense="CC BY-SA 4.0" />
  <row Id="36700" PostHistoryTypeId="1" PostId="9241" RevisionGUID="57245791-db47-4ca9-ab1b-55452a4af2b0" CreationDate="2023-07-12T07:19:59.043" UserId="379" Text="Error WrongProposalWeight when proposing a runtime upgrade using the council" ContentLicense="CC BY-SA 4.0" />
  <row Id="36701" PostHistoryTypeId="3" PostId="9241" RevisionGUID="57245791-db47-4ca9-ab1b-55452a4af2b0" CreationDate="2023-07-12T07:19:59.043" UserId="379" Text="|runtime|runtime-upgrade|council|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36702" PostHistoryTypeId="2" PostId="9242" RevisionGUID="6f4db2f8-b4fe-496e-a488-6ee8901a0661" CreationDate="2023-07-12T07:20:22.003" UserId="4426" Text="Try running `yarn build` or `subql build` from your subquery project directory. This will create a build folder in your root which will be used as the data source as mentioned in your `project.yaml` file like this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/n1f4R.png&#xD;&#xA;&#xD;&#xA;Now try to run `yarn start:docker`" ContentLicense="CC BY-SA 4.0" />
  <row Id="36704" PostHistoryTypeId="5" PostId="9242" RevisionGUID="6951803b-99b6-4c6c-91b0-83d9047edf44" CreationDate="2023-07-12T07:26:32.040" UserId="4426" Comment="added 137 characters in body" Text="Make sure your `tsconfig.json` has this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Now try running `yarn build` or `subql build` from your subquery project directory. This will create a build folder in your root which will be used as the data source as mentioned in your `project.yaml` file like this:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Now try to run `yarn start:docker`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/m3aKH.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/n1f4R.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36705" PostHistoryTypeId="2" PostId="9243" RevisionGUID="516bb6b1-eb84-4fda-8a5d-ca97069d1963" CreationDate="2023-07-12T07:34:13.983" UserId="4427" Text="Too my knowledge there are no guides on how to write post requests to JSON-RPC api with http utilities available to the offchain worker. What I understand currently is that the body has to be a buffered stream or sorts (or so it seems). But say I have a JSON body &#xD;&#xA;&#xD;&#xA;``` Rust&#xD;&#xA;let body = r#&quot;{&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;method&quot;: &quot;someMethod&quot; ... }&quot;#&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have attempted to take the Request struct and construct a post request like so:&#xD;&#xA;&#xD;&#xA;``` Rust&#xD;&#xA;let body = ...snip...&#xD;&#xA;&#xD;&#xA;let my_request = sp_runtime::offchain::http::Request::post(&quot;http:://some-url/&quot;, body.as_bytes()); &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have played around with trying to use serde_json::json macro to construct a serde_json::Value then take `value.to_vec()`. ( a few other steps to this that I am omitting. All in all does anyone have a good example of how I can send a simple post req to a json-rpc endpoint, and how to properly add the request body." ContentLicense="CC BY-SA 4.0" />
  <row Id="36707" PostHistoryTypeId="1" PostId="9243" RevisionGUID="516bb6b1-eb84-4fda-8a5d-ca97069d1963" CreationDate="2023-07-12T07:34:13.983" UserId="4427" Text="using the offchian worker to create post requests with JSON body" ContentLicense="CC BY-SA 4.0" />
  <row Id="36708" PostHistoryTypeId="3" PostId="9243" RevisionGUID="516bb6b1-eb84-4fda-8a5d-ca97069d1963" CreationDate="2023-07-12T07:34:13.983" UserId="4427" Text="|offchain-worker|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36709" PostHistoryTypeId="5" PostId="9241" RevisionGUID="39d0faf1-9282-42e2-9477-ab9a17430b3f" CreationDate="2023-07-12T07:35:45.130" UserId="379" Comment="added 103 characters in body" Text="When trying to propose a `system.setCode` motion the extrinsic fails with `WrongProposalWeight`. We are experiencing this issue only with the above extrinsic and on polkadot-0.9.42 version. &#xD;&#xA;&#xD;&#xA;On an earlier version of polkadot (0.9.36) it seems to work flawlessly! &#xD;&#xA;&#xD;&#xA;I think something changed between 0.9.36 and 0.9.42 which impacts weight calculation regarding system extrinsics? &#xD;&#xA;&#xD;&#xA;Edit: I found https://github.com/paritytech/substrate/pull/13771 which is causing the issue I think" ContentLicense="CC BY-SA 4.0" />
  <row Id="36710" PostHistoryTypeId="50" PostId="8845" RevisionGUID="886bb51b-6745-4299-8b0e-972c58e3bce8" CreationDate="2023-07-12T08:01:00.190" UserId="-1" />
  <row Id="36715" PostHistoryTypeId="2" PostId="9245" RevisionGUID="29b9f8a1-5ba8-4b1a-9cfe-e40333b7d3a3" CreationDate="2023-07-12T10:37:47.517" UserId="251" Text="To inform the server that you are sending a JSON request, simply include the following header:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Content-Type: application/json&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36717" PostHistoryTypeId="2" PostId="9246" RevisionGUID="ab38c8eb-8607-4ade-a1e3-3ca0b24210ee" CreationDate="2023-07-12T13:16:23.253" UserId="3667" Text="What happens if the value of `#[weight]` I choose is higher than the real life weight usage? According to frame documentation, it says : &#xD;&#xA;&gt;Fees are then based on the worst case weight. If the actual call performs better than the worst case, the weight is adjusted and any excess fees can be returned.&#xD;&#xA;&#xD;&#xA;Is this step automatic or do I need to write code to make this happen? " ContentLicense="CC BY-SA 4.0" />
  <row Id="36719" PostHistoryTypeId="1" PostId="9246" RevisionGUID="ab38c8eb-8607-4ade-a1e3-3ca0b24210ee" CreationDate="2023-07-12T13:16:23.253" UserId="3667" Text="What are the consequences of overestimating weight?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36720" PostHistoryTypeId="3" PostId="9246" RevisionGUID="ab38c8eb-8607-4ade-a1e3-3ca0b24210ee" CreationDate="2023-07-12T13:16:23.253" UserId="3667" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36721" PostHistoryTypeId="2" PostId="9247" RevisionGUID="b5f1bb33-e95d-40a2-9eed-cc7dc021e5a0" CreationDate="2023-07-12T13:27:25.093" UserId="94" Text="The adjustment has to happen manually indeed.  &#xD;&#xA;The return value of a call is either `DispatchResult` or `DispatchResultWithPostInfo`. The first type cannot refund any weight and implies that the user always pays the worst-case fee.  &#xD;&#xA;When using `DispatchResultWithPostInfo`; you can adjust the actually used weight by returning it.  &#xD;&#xA;One example would be in the [Alliance](https://github.com/paritytech/substrate/blob/47a1a0382c4431e8f238214cde84745f4a337957/frame/alliance/src/lib.rs#L637) pallet, which gets in a worst-case `witness` and then adjusts to the actually used weight. Another one is in the [Ranked-Collective](https://github.com/paritytech/substrate/blob/b72c475803947121b3b475eb33ba5fc48f1fe5b6/frame/ranked-collective/src/lib.rs#L594), where the transaction will cost nothing in certain cases.&#xD;&#xA;&#xD;&#xA;There is an [issue](https://github.com/paritytech/substrate/issues/13501) open in Substrate that will address automatic refunds, but only for the PoV dimension of the Weight. The execution time will still need to be adjusted for manually.&#xD;&#xA;&#xD;&#xA;To answer the Q in the title:  &#xD;&#xA;The consequence is that the users pays more fees than are actually required for spam protection of the chain. Depending on the discrepancy between worst-case and actual-case weight, this can be no problem at all or a huge problem. All depending on how large that discrepancy is.  &#xD;&#xA;Therefore in Substrate we normally do the manual refunding when we assume the discrepancy to be large enough to justify the additional code, benchmarking and testing effort." ContentLicense="CC BY-SA 4.0" />
  <row Id="36723" PostHistoryTypeId="2" PostId="9248" RevisionGUID="b617d557-ce62-486d-a342-713dc111fa72" CreationDate="2023-07-12T13:46:23.877" UserId="94" Text="The weigh of `set_code` want not properly benchmarked until [this MR](https://github.com/paritytech/substrate/pull/13373), so it was probably assuming way too much weight. The proper way would be to integrate that into your runtime and then use the updated weights.  &#xD;&#xA;And additionally set your `MaxProposalWeight` to something sensible.&#xD;&#xA;&#xD;&#xA;Another (hackier) way is to wrap the `System::set_code` in a `Utility::with_weight` call if you want to ignore the weight check. Note that this introduces the possibility of creating an overweight block, if the `set_code` does use more than the block limit. But so far the results for `set_code` indicated about 60ms, which should have more than enough room to not produce an overweight block." ContentLicense="CC BY-SA 4.0" />
  <row Id="36725" PostHistoryTypeId="2" PostId="9249" RevisionGUID="09fb53d8-00ca-49bc-b9c5-9aff81463f9c" CreationDate="2023-07-12T13:47:33.203" UserId="2755" Text="### Background&#xD;&#xA;I am currently working on a gadget for substrate that runs another software embedded within the node itself. This is similar to the [beefy gadget](https://github.com/paritytech/substrate/tree/d6e9c579ca8608a002de31771962f080581fa098/client/consensus/beefy). However, the software I'm using was originally designed to run as a standalone binary, rather than as substrate-specific software. The gadget serves as a thin wrapper around it and communicates with substrate using subxt over RPC.&#xD;&#xA;&#xD;&#xA;### Question&#xD;&#xA;&#xD;&#xA;In order for this software to function properly and be able to sign/send transactions to the substrate node, it requires access to the SURI/Private Key. However, there doesn't seem to be a clear way to extract the raw private key seed from the keystore itself. The gadget has access to the `LocalKeystore`, which is passed to it as a parameter when starting it in the `service.rs` file.&#xD;&#xA;&#xD;&#xA;### Code I have tried&#xD;&#xA;&#xD;&#xA;I have attempted the following code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_application_crypto::{key_types, sr25519, ByteArray, CryptoTypePublicPair, Pair};&#xD;&#xA;&#xD;&#xA;fn get_sr25519_pair(local_keystore: Option&lt;Arc&lt;LocalKeystore&gt;&gt;) -&gt; Option&lt;sr25519::AppPair&gt; {&#xD;&#xA;    let local_key_store = local_keystore.expect(&quot;failed to get local keystore&quot;);&#xD;&#xA;    let sr25519_public = local_key_store&#xD;&#xA;        .keys(key_types::ACCOUNT)&#xD;&#xA;        .expect(&quot;failed to get keys&quot;)&#xD;&#xA;        .into_iter()&#xD;&#xA;        .find_map(|CryptoTypePublicPair(id, public_key)| {&#xD;&#xA;            if id == sr25519::CRYPTO_ID {&#xD;&#xA;                sr25519::AppPublic::from_slice(&amp;public_key).ok()&#xD;&#xA;            } else {&#xD;&#xA;                None&#xD;&#xA;            }&#xD;&#xA;        })&#xD;&#xA;        .expect(&quot;failed to get sr25519 public key&quot;);&#xD;&#xA;    let pair = local_key_store&#xD;&#xA;        .key_pair::&lt;sr25519::AppPair&gt;(&amp;sr25519_public)&#xD;&#xA;        .expect(&quot;failed to get sr25519 pair&quot;);&#xD;&#xA;    tracing::warn!(&quot;Pair Found {}&quot;, pair.is_some());&#xD;&#xA;    pair&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The output of this code is `Pair Found false`, which means I was able to obtain the public key, but it fails to find its corresponding key pair. It's worth noting that the [`LocalKeystore::key_pair`](https://github.com/paritytech/substrate/blob/d6e9c579ca8608a002de31771962f080581fa098/client/keystore/src/local.rs#L55-L64) method requires `P: AppPair`, so I cannot simply use `sr25519::Pair` here. This is inconvenient because the key is inserted into the keystore with `sr25519::Pair`, not `sr25519::AppPair`.&#xD;&#xA;&#xD;&#xA;**Could you please guide me on how to obtain the private key/seed of the main account (key type is `acco`) from the keystore?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="36727" PostHistoryTypeId="1" PostId="9249" RevisionGUID="09fb53d8-00ca-49bc-b9c5-9aff81463f9c" CreationDate="2023-07-12T13:47:33.203" UserId="2755" Text="How to properly get KeyPair from the LocalKeystore" ContentLicense="CC BY-SA 4.0" />
  <row Id="36728" PostHistoryTypeId="3" PostId="9249" RevisionGUID="09fb53d8-00ca-49bc-b9c5-9aff81463f9c" CreationDate="2023-07-12T13:47:33.203" UserId="2755" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36729" PostHistoryTypeId="5" PostId="9248" RevisionGUID="469b750a-0e62-48b6-b502-ff4272e78f78" CreationDate="2023-07-12T13:47:52.347" UserId="139" Comment="deleted 1 character in body" Text="The weigh of `set_code` was not properly benchmarked until [this MR](https://github.com/paritytech/substrate/pull/13373), so it was probably assuming way too much weight. The proper way would be to integrate that into your runtime and then use the updated weights.  &#xD;&#xA;And additionally set your `MaxProposalWeight` to something sensible.&#xD;&#xA;&#xD;&#xA;Another (hackier) way is to wrap the `System::set_code` in a `Utility::with_weight` call if you want to ignore the weight check. Note that this introduces the possibility of creating an overweight block, if the `set_code` does use more than the block limit. But so far the results for `set_code` indicated about 60ms, which should have more than enough room to not produce an overweight block." ContentLicense="CC BY-SA 4.0" />
  <row Id="36730" PostHistoryTypeId="50" PostId="8850" RevisionGUID="afadd736-0413-4223-acf1-c7ac85f3608a" CreationDate="2023-07-12T15:04:20.503" UserId="-1" />
  <row Id="36731" PostHistoryTypeId="2" PostId="9250" RevisionGUID="8265a0f1-e622-4288-a030-c44250337157" CreationDate="2023-07-12T15:41:10.463" UserId="698" Text="I am attempting to `note.preimage` the following call data hash:&#xD;&#xA;&#xD;&#xA;    [encoded data, 15584 characters]&#xD;&#xA;&#xD;&#xA;When I then visit the preimage section of Polkadot.JS I notice the following error:&#xD;&#xA;&#xD;&#xA;&gt; Unable to decode preimage bytes into a valid Call&#xD;&#xA;&#xD;&#xA;The preimage hash is available on Polkadot currently with preimage hash:&#xD;&#xA;&#xD;&#xA;`0xdd1ccce594d19c2a17f5810f1df4c2f6217a74b59fd67e58e438bdc1acce64fb`&#xD;&#xA;&#xD;&#xA;Regards,&#xD;&#xA;Will" ContentLicense="CC BY-SA 4.0" />
  <row Id="36733" PostHistoryTypeId="1" PostId="9250" RevisionGUID="8265a0f1-e622-4288-a030-c44250337157" CreationDate="2023-07-12T15:41:10.463" UserId="698" Text="Error with submitted preimage" ContentLicense="CC BY-SA 4.0" />
  <row Id="36734" PostHistoryTypeId="3" PostId="9250" RevisionGUID="8265a0f1-e622-4288-a030-c44250337157" CreationDate="2023-07-12T15:41:10.463" UserId="698" Text="|polkadot-js|extrinsic|preimage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36735" PostHistoryTypeId="2" PostId="9251" RevisionGUID="dbbe6a5b-d7cc-4b67-9af2-51aa40528671" CreationDate="2023-07-12T21:05:27.283" UserId="94" Text="There must be something wrong with how you encoded the call. This is double encoded.&#xD;&#xA;&#xD;&#xA;What tipped me off is that it still decodes in PJs when the first three bytes are removed; so just starting with `0x1a04c…`.  &#xD;&#xA;Now the first three bytes `0xb57904` are the compact SCALE encoding of an `u32` of value 7,789. This is exactly the length of your preimage minus three.&#xD;&#xA;&#xD;&#xA;The correct preimage should therefore be:  &#xD;&#xA;```pre&#xD;&#xA;[encoded data, 15578 characters]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For testing this in advance: you can use chopsticks and then use the local injected ALICE account to note the preimage and double check:  &#xD;&#xA;`npx @acala-network/chopsticks@latest -c polkadot`." ContentLicense="CC BY-SA 4.0" />
  <row Id="36738" PostHistoryTypeId="5" PostId="9243" RevisionGUID="4fd66895-88a1-45b0-83f8-7325d2942890" CreationDate="2023-07-13T02:57:49.080" UserId="83" Comment="syntax" Text="Too my knowledge there are no guides on how to write HTTP POST requests to a JSON-RPC API with http utilities that are available to Substrate offchain workers. What I understand currently is that the body has to be a buffered stream of sorts (or so it seems). But say I have a JSON body:&#xD;&#xA;&#xD;&#xA;``` Rust&#xD;&#xA;let body = r#&quot;{&quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;method&quot;: &quot;someMethod&quot; ... }&quot;#&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have attempted to take the Request struct and construct a POST request like so:&#xD;&#xA;&#xD;&#xA;``` Rust&#xD;&#xA;let body = ...snip...&#xD;&#xA;&#xD;&#xA;let my_request = sp_runtime::offchain::http::Request::post(&quot;http:://some-url/&quot;, body.as_bytes()); &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have played around with trying to use `serde_json::json` macro to construct a `serde_json::Value` then take `value.to_vec()` (a few other steps to this that I am omitting). &#xD;&#xA;&#xD;&#xA;All in all does anyone have a good example of how I can send a simple POST request to a JSON-RPC endpoint, and how to properly add the request body?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36739" PostHistoryTypeId="4" PostId="9243" RevisionGUID="4fd66895-88a1-45b0-83f8-7325d2942890" CreationDate="2023-07-13T02:57:49.080" UserId="83" Comment="syntax" Text="How to use Offchain Workers to create HTTP POST requests with JSON-RPC body?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36740" PostHistoryTypeId="5" PostId="8834" RevisionGUID="cb074e9e-040e-4143-8c80-66da86175094" CreationDate="2023-07-13T03:04:10.077" UserId="83" Comment="syntax" Text="I want to decode bytes on the Solidity side that was decoded with scale codec.&#xD;&#xA;Is the any implementation of `scale codec` (decode) on the Solidity side?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36741" PostHistoryTypeId="4" PostId="8834" RevisionGUID="cb074e9e-040e-4143-8c80-66da86175094" CreationDate="2023-07-13T03:04:10.077" UserId="83" Comment="syntax" Text="I want to use Parity SCALE codec in Solidity? Is there any implementation of scale codec to decode bytes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36742" PostHistoryTypeId="2" PostId="9252" RevisionGUID="655d1dcb-51ba-4278-b15e-41f2cf340fdd" CreationDate="2023-07-13T03:51:14.117" UserId="445" Text="For example:&#xD;&#xA;```{&#xD;&#xA;  nonce: 88&#xD;&#xA;  consumers: 3&#xD;&#xA;  providers: 1&#xD;&#xA;  sufficients: 0&#xD;&#xA;  data: {&#xD;&#xA;    free: 5,490,171,776,270,990,576,365,620&#xD;&#xA;    reserved: 0&#xD;&#xA;    miscFrozen: 366,590,800,018,553,095,998,081&#xD;&#xA;    feeFrozen: 366,590,800,018,553,095,998,081&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I comprehend the `nonce` field, the `free balance` field, `feeFrozeen` field. However, I find the remaining fields to be unclear or difficult to understand" ContentLicense="CC BY-SA 4.0" />
  <row Id="36744" PostHistoryTypeId="1" PostId="9252" RevisionGUID="655d1dcb-51ba-4278-b15e-41f2cf340fdd" CreationDate="2023-07-13T03:51:14.117" UserId="445" Text="What is the exact meaning of the data fields within FrameSystemAccountInfo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36745" PostHistoryTypeId="3" PostId="9252" RevisionGUID="655d1dcb-51ba-4278-b15e-41f2cf340fdd" CreationDate="2023-07-13T03:51:14.117" UserId="445" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36747" PostHistoryTypeId="2" PostId="9253" RevisionGUID="162df7d6-27d3-4bac-9207-6041c9765ac6" CreationDate="2023-07-13T04:57:29.937" UserId="1982" Text="I have been trying to implement `pallet-nft-fractionalization` with the `substrate-node-template`, Since `pallet-nft-fractionalization` was released in the last few months had to change the branch of all the pallets to `branch = &quot;polkadot-v0.9.43&quot;` despite doing all the changes, I'm still facing the issue that is :: &#xD;&#xA;```&#xD;&#xA;    error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /Users/XXXXXX/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.10/src/lib.rs:285:9&#xD;&#xA;      |&#xD;&#xA;  285 | /         compile_error!(&quot;the wasm*-unknown-unknown targets are not supported by \&#xD;&#xA;  286 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  287 | |                         For more information see: \&#xD;&#xA;  288 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /Users/XXXXXX/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.10/src/lib.rs:341:9&#xD;&#xA;      |&#xD;&#xA;  341 |         imp::getrandom_inner(dest)?;&#xD;&#xA;      |         ^^^ use of undeclared crate or module `imp`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0433`.&#xD;&#xA;  error: could not compile `getrandom` (lib) due to 2 previous errors&#xD;&#xA;```&#xD;&#xA;I have been trying to solve this issue for a while any help would be welcomed :) " ContentLicense="CC BY-SA 4.0" />
  <row Id="36749" PostHistoryTypeId="1" PostId="9253" RevisionGUID="162df7d6-27d3-4bac-9207-6041c9765ac6" CreationDate="2023-07-13T04:57:29.937" UserId="1982" Text="error: the wasm*-unknown-unknown targets are not supported by default" ContentLicense="CC BY-SA 4.0" />
  <row Id="36750" PostHistoryTypeId="3" PostId="9253" RevisionGUID="162df7d6-27d3-4bac-9207-6041c9765ac6" CreationDate="2023-07-13T04:57:29.937" UserId="1982" Text="|pallet|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36751" PostHistoryTypeId="2" PostId="9254" RevisionGUID="8ef5536a-d664-4a75-a026-5d611cc321ad" CreationDate="2023-07-13T07:31:30.883" UserId="251" Text="Regarding the account reference counters, you can find more information at this link: https://substrate.stackexchange.com/questions/263/what-is-the-meaning-of-the-account-provider-sufficients-and-consumer.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;&gt; https://paritytech.github.io/substrate/master/frame_support/traits/tokens/struct.WithdrawReasons.html&#xD;&#xA;&#xD;&#xA;In addition to the frozen types `misc_frozen` and `fee_frozen`, there is another type called `all`. The logic behind it is as follows: `if all &gt; x_frozen { x_frozen = all; }`. `all` applies to all types. It's worth noting that many sections of code use the designation `WithdrawReasons::all()`, which explains why they appear identical most of the time.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36753" PostHistoryTypeId="2" PostId="9255" RevisionGUID="ea88b888-0b1a-48d4-8225-0ba73b3b8e1c" CreationDate="2023-07-13T07:48:32.023" UserId="2348" Text="In Polkadot docs, Parachain is defined as: &quot;A parachain is an application-specific data structure that is globally coherent and can be validated by the validators of the Relay Chain&quot;. &#xD;&#xA;&#xD;&#xA;Why have they used the term data structure instead of chain?&#xD;&#xA;links to doc [1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="36755" PostHistoryTypeId="1" PostId="9255" RevisionGUID="ea88b888-0b1a-48d4-8225-0ba73b3b8e1c" CreationDate="2023-07-13T07:48:32.023" UserId="2348" Text="Is parachain a data structure?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36756" PostHistoryTypeId="3" PostId="9255" RevisionGUID="ea88b888-0b1a-48d4-8225-0ba73b3b8e1c" CreationDate="2023-07-13T07:48:32.023" UserId="2348" Text="|polkadot|parachain|blockchain|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36757" PostHistoryTypeId="2" PostId="9256" RevisionGUID="5971057f-d554-41f0-a715-430dd4ffc13b" CreationDate="2023-07-13T11:20:39.650" UserId="3667" Text="A blockchain is a datastructure essentially. It's a distributed linked-list that uses a consensus mechanism to append blocks and grow the list. A parachain is a blockchain, hence the term makes perfect sense in this case." ContentLicense="CC BY-SA 4.0" />
  <row Id="36761" PostHistoryTypeId="2" PostId="9258" RevisionGUID="c37bb9af-a938-4693-b317-d410ecb36800" CreationDate="2023-07-13T12:26:17.850" UserId="4341" Text="I have encountered the following error from time to time while compiling Substrate Template Node&#xD;&#xA;&#xD;&#xA;error: internal compiler error: encountered incremental compilation error with mir_built(76e5305fbe3bf3e0-1cbbbe6365e28f21)&#xD;&#xA;&#xD;&#xA;I have not been able to reproduce it at will and the compiler indicates to delete artifacts with cargo clean and rebuild which does fix the issue.&#xD;&#xA;&#xD;&#xA;Would like to ask if someone else has encountered this error and if you have a high level explanation on the reason behind it as it is not the already well known and documented Fingerprints issue.&#xD;&#xA;&#xD;&#xA;Compiling on an M2. thanks! " ContentLicense="CC BY-SA 4.0" />
  <row Id="36763" PostHistoryTypeId="1" PostId="9258" RevisionGUID="c37bb9af-a938-4693-b317-d410ecb36800" CreationDate="2023-07-13T12:26:17.850" UserId="4341" Text="Encountered incremental compilation error" ContentLicense="CC BY-SA 4.0" />
  <row Id="36764" PostHistoryTypeId="3" PostId="9258" RevisionGUID="c37bb9af-a938-4693-b317-d410ecb36800" CreationDate="2023-07-13T12:26:17.850" UserId="4341" Text="|rust|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36765" PostHistoryTypeId="5" PostId="9258" RevisionGUID="e0f4624c-83f9-4e49-85f5-caaca6ab7e2c" CreationDate="2023-07-13T14:34:55.293" UserId="354" Comment="improved formatting" Text="I have encountered following error from time to time while compiling `substrate-node-template`&#xD;&#xA;&#xD;&#xA;    error: internal compiler error: encountered incremental compilation error with mir_built(76e5305fbe3bf3e0-1cbbbe6365e28f21)&#xD;&#xA;&#xD;&#xA;I have not been able to reproduce it at will and the compiler indicates to delete artifacts with cargo clean and rebuild which does fix the issue.&#xD;&#xA;&#xD;&#xA;Would like to ask if someone else has encountered this error and if you have a high level explanation on the reason behind it as it is not the already well known and documented Fingerprints issue.&#xD;&#xA;&#xD;&#xA;Compiling on an M2. thanks! " ContentLicense="CC BY-SA 4.0" />
  <row Id="36766" PostHistoryTypeId="24" PostId="9258" RevisionGUID="e0f4624c-83f9-4e49-85f5-caaca6ab7e2c" CreationDate="2023-07-13T14:34:55.293" Comment="Proposed by 354 approved by 4341 edit id of 494" ContentLicense="CC BY-SA 4.0" />
  <row Id="36774" PostHistoryTypeId="52" PostId="9255" RevisionGUID="ef2bf749-fbb2-41f6-98cc-a00504f6d7d0" CreationDate="2023-07-13T15:49:24.817" />
  <row Id="36775" PostHistoryTypeId="2" PostId="9261" RevisionGUID="ef7cd705-5f31-447b-885b-2414356b6a73" CreationDate="2023-07-13T17:39:02.897" UserId="4429" Text="I have looked through other posts on the compile errors for &quot;Use macros in a custom pallet&quot;. None of them seemed to get me through the following error. I made sure to have a clean install of `substrate-node-template`. I also traced it to `/Users/****/substrate/substrate-node-template/runtime/src/lib.rs:273:2`. I couldn't find any references to &quot;weights&quot;. It appears to be referenceing something which doesn't exist; however, I'm not sure where to go from there as I'm very new at this. Information below:&#xD;&#xA;&#xD;&#xA;**Error**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;MacBook-Pro src %  cargo check -p node-template-runtime --release&#xD;&#xA;    Checking pallet-session v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)&#xD;&#xA;    Checking pallet-template v4.0.0-dev (/Users/****/substrate/substrate-node-template/pallets/template)&#xD;&#xA;    Checking pallet-transaction-payment-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)&#xD;&#xA;    Checking pallet-aura v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)&#xD;&#xA;   Compiling node-template-runtime v4.0.0-dev (/Users/****/substrate/substrate-node-template/runtime)&#xD;&#xA;warning: use of deprecated struct `pallet::_::Store`: &#xD;&#xA;                 Use of `#[pallet::generate_store(pub(super) trait Store)]` will be removed soon.&#xD;&#xA;                 Check https://github.com/paritytech/substrate/pull/13535 for more details.&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:12:4&#xD;&#xA;   |&#xD;&#xA;12 |   #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;   |&#xD;&#xA;   = note: `#[warn(deprecated)]` on by default&#xD;&#xA;&#xD;&#xA;warning: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`: &#xD;&#xA;                 It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                 Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;         &#xD;&#xA;                 For more info see:&#xD;&#xA;                     &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:51:22&#xD;&#xA;   |&#xD;&#xA;51 |     #[pallet::weight(0)]&#xD;&#xA;   |                      ^&#xD;&#xA;&#xD;&#xA;warning: use of deprecated constant `pallet::warnings::ConstantWeight_1::_w`: &#xD;&#xA;                 It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                 Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;         &#xD;&#xA;                 For more info see:&#xD;&#xA;                     &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:73:22&#xD;&#xA;   |&#xD;&#xA;73 |     #[pallet::weight(0)]&#xD;&#xA;   |                      ^&#xD;&#xA;&#xD;&#xA;warning: `pallet-template` (lib) generated 3 warnings&#xD;&#xA;    Checking pallet-grandpa v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/****/substrate/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/****/substrate/substrate-node-template/target/release/build/node-template-runtime-0abb0d4d70014bf7/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/****/.rustup/toolchains/stable-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/****/substrate/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.70.0 (90c541806 2023-05-31)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling pallet-template v4.0.0-dev (/Users/****/substrate/substrate-node-template/pallets/template)&#xD;&#xA;  warning: use of deprecated struct `pallet::_::Store`: &#xD;&#xA;                   Use of `#[pallet::generate_store(pub(super) trait Store)]` will be removed soon.&#xD;&#xA;                   Check https://github.com/paritytech/substrate/pull/13535 for more details.&#xD;&#xA;    --&gt; /Users/****/substrate/substrate-node-template/pallets/template/src/lib.rs:12:4&#xD;&#xA;     |&#xD;&#xA;  12 |   #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;     |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `#[warn(deprecated)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`: &#xD;&#xA;                   It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                   Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;    --&gt; /Users/****/substrate/substrate-node-template/pallets/template/src/lib.rs:51:22&#xD;&#xA;     |&#xD;&#xA;  51 |     #[pallet::weight(0)]&#xD;&#xA;     |                      ^&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ConstantWeight_1::_w`: &#xD;&#xA;                   It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                   Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;    --&gt; /Users/****/substrate/substrate-node-template/pallets/template/src/lib.rs:73:22&#xD;&#xA;     |&#xD;&#xA;  73 |     #[pallet::weight(0)]&#xD;&#xA;     |                      ^&#xD;&#xA;&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/Users/****/substrate/substrate-node-template/runtime)&#xD;&#xA;  warning: `pallet-template` (lib) generated 3 warnings&#xD;&#xA;  error[E0437]: type `WeightInfo` is not a member of trait `pallet_template::Config`&#xD;&#xA;     --&gt; /Users/****/substrate/substrate-node-template/runtime/src/lib.rs:273:2&#xD;&#xA;      |&#xD;&#xA;  273 |     type WeightInfo = pallet_template::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `pallet_template::Config`&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `weights` in `pallet_template`&#xD;&#xA;     --&gt; /Users/****/substrate/substrate-node-template/runtime/src/lib.rs:273:37&#xD;&#xA;      |&#xD;&#xA;  273 |     type WeightInfo = pallet_template::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;      |                                        ^^^^^^^ could not find `weights` in `pallet_template`&#xD;&#xA;&#xD;&#xA;  Some errors have detailed explanations: E0433, E0437.&#xD;&#xA;  For more information about an error, try `rustc --explain E0433`.&#xD;&#xA;  error: could not compile `node-template-runtime` (lib) due to 2 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**`/substrate-node-template/pallets/template/src/lib.rs`**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;// Re-export pallet items so that they can be accessed from the crate namespace.&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;  use frame_support::pallet_prelude::*;&#xD;&#xA;  use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;  #[pallet::pallet]&#xD;&#xA;  #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;  pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;  /// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;  #[pallet::config]&#xD;&#xA;  pub trait Config: frame_system::Config {&#xD;&#xA;    /// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  // Pallets use events to inform users when important changes are made.&#xD;&#xA;  // Event documentation should end with an array that provides descriptive names for parameters.&#xD;&#xA;  #[pallet::event]&#xD;&#xA;  #[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;  pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    /// Event emitted when a claim has been created.&#xD;&#xA;    ClaimCreated { who: T::AccountId, claim: T::Hash },&#xD;&#xA;    /// Event emitted when a claim is revoked by the owner.&#xD;&#xA;    ClaimRevoked { who: T::AccountId, claim: T::Hash },&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  #[pallet::error]&#xD;&#xA;  pub enum Error&lt;T&gt; {&#xD;&#xA;    /// The claim already exists.&#xD;&#xA;    AlreadyClaimed,&#xD;&#xA;    /// The claim does not exist, so it cannot be revoked.&#xD;&#xA;    NoSuchClaim,&#xD;&#xA;    /// The claim is owned by another account, so caller can't revoke it.&#xD;&#xA;    NotClaimOwner,&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  #[pallet::storage]&#xD;&#xA;  pub(super) type Claims&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::Hash, (T::AccountId, T::BlockNumber)&gt;;&#xD;&#xA;&#xD;&#xA;  // Dispatchable functions allow users to interact with the pallet and invoke state changes.&#xD;&#xA;  // These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;  // Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;  #[pallet::call]&#xD;&#xA;  impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    #[pallet::weight(0)]&#xD;&#xA;    #[pallet::call_index(1)]&#xD;&#xA;    pub fn create_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash) -&gt; DispatchResult {&#xD;&#xA;      // Check that the extrinsic was signed and get the signer.&#xD;&#xA;      // This function will return an error if the extrinsic is not signed.&#xD;&#xA;      let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;      // Verify that the specified claim has not already been stored.&#xD;&#xA;      ensure!(!Claims::&lt;T&gt;::contains_key(&amp;claim), Error::&lt;T&gt;::AlreadyClaimed);&#xD;&#xA;&#xD;&#xA;      // Get the block number from the FRAME System pallet.&#xD;&#xA;      let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;&#xD;&#xA;      // Store the claim with the sender and block number.&#xD;&#xA;      Claims::&lt;T&gt;::insert(&amp;claim, (&amp;sender, current_block));&#xD;&#xA;&#xD;&#xA;      // Emit an event that the claim was created.&#xD;&#xA;      Self::deposit_event(Event::ClaimCreated { who: sender, claim });&#xD;&#xA;&#xD;&#xA;      Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(0)]&#xD;&#xA;    #[pallet::call_index(2)]&#xD;&#xA;    pub fn revoke_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash) -&gt; DispatchResult {&#xD;&#xA;      // Check that the extrinsic was signed and get the signer.&#xD;&#xA;      // This function will return an error if the extrinsic is not signed.&#xD;&#xA;      let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;      // Get owner of the claim, if none return an error.&#xD;&#xA;      let (owner, _) = Claims::&lt;T&gt;::get(&amp;claim).ok_or(Error::&lt;T&gt;::NoSuchClaim)?;&#xD;&#xA;&#xD;&#xA;      // Verify that sender of the current call is the claim owner.&#xD;&#xA;      ensure!(sender == owner, Error::&lt;T&gt;::NotClaimOwner);&#xD;&#xA;&#xD;&#xA;      // Remove claim from storage.&#xD;&#xA;      Claims::&lt;T&gt;::remove(&amp;claim);&#xD;&#xA;&#xD;&#xA;      // Emit an event that the claim was erased.&#xD;&#xA;      Self::deposit_event(Event::ClaimRevoked { who: sender, claim });&#xD;&#xA;      Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Cargo.toml**&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-template&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;FRAME pallet template for defining custom runtime logic.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;MIT-0&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.2.2&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { version = &quot;7.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;sp-io = { version = &quot;7.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;sp-runtime = { version = &quot;7.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36777" PostHistoryTypeId="1" PostId="9261" RevisionGUID="ef7cd705-5f31-447b-885b-2414356b6a73" CreationDate="2023-07-13T17:39:02.897" UserId="4429" Text="Tutorial: Use macros in a custom pallet - Compile Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="36778" PostHistoryTypeId="3" PostId="9261" RevisionGUID="ef7cd705-5f31-447b-885b-2414356b6a73" CreationDate="2023-07-13T17:39:02.897" UserId="4429" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36779" PostHistoryTypeId="2" PostId="9262" RevisionGUID="4db83f77-52fc-4ddc-9b48-3cd48d966c28" CreationDate="2023-07-13T19:25:38.333" UserId="4431" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uRouM.png&#xD;&#xA;&#xD;&#xA;I tried to figure out the collection id from the api i got an hex value but when i tried to convert that hex to numbers i got an undefined value here is my code&#xD;&#xA;i think the hex value which is outside the json is the number value&#xD;&#xA;```const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;(async () =&gt; {&#xD;&#xA;// Construct&#xD;&#xA;const wsProvider = new WsProvider('wss://westmint-rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;// Do something&#xD;&#xA;  const ADDR = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFabHE';&#xD;&#xA;const AccountId32 = '5GCCJthVSwNXRpbeg44gysJUx9vzjdGdfWhioeM7gCg6VyXf';&#xD;&#xA;const u32 = '4';&#xD;&#xA;// Retrieve the last timestamp&#xD;&#xA;const collectionMetadataOf = await api.query.nfts.collectionMetadataOf.entries();&#xD;&#xA;const accounts = api.query.nfts.collectionMetadataOf.entries();&#xD;&#xA;console.log(`${collectionMetadataOf} `);&#xD;&#xA;const obj = JSON.parse(`${collectionMetadataOf} `);&#xD;&#xA;console.log(obj.data)&#xD;&#xA;var asciiVal = &quot;0x516d507955664b50776337475434577978554e414c506f50733563655068364736376974465270737a5753594d38&quot;.match(/.{1,2}/g).map(function(v){&#xD;&#xA;	return String.fromCharCode(parseInt(v, 16));&#xD;&#xA;  }).join('');&#xD;&#xA;console.log(asciiVal)&#xD;&#xA;  const url = &quot;https://cloudflare-ipfs.com/ipfs/&quot; + (asciiVal);&#xD;&#xA;  const response = await fetch(url);&#xD;&#xA;  const jsonData = await response.json();&#xD;&#xA;  console.log(jsonData);&#xD;&#xA;})()" ContentLicense="CC BY-SA 4.0" />
  <row Id="36781" PostHistoryTypeId="1" PostId="9262" RevisionGUID="4db83f77-52fc-4ddc-9b48-3cd48d966c28" CreationDate="2023-07-13T19:25:38.333" UserId="4431" Text="I'm using Polkadot js api to fetch the westmint nft pallet collection and their details but i got an error it dosen't show me the instance id" ContentLicense="CC BY-SA 4.0" />
  <row Id="36782" PostHistoryTypeId="3" PostId="9262" RevisionGUID="4db83f77-52fc-4ddc-9b48-3cd48d966c28" CreationDate="2023-07-13T19:25:38.333" UserId="4431" Text="|polkadot-js|polkadot|pallet|nft|statemint|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36783" PostHistoryTypeId="5" PostId="9262" RevisionGUID="691cce6b-e828-4211-b21a-efe81918ce0d" CreationDate="2023-07-13T19:31:40.837" UserId="4431" Comment="added 2075 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uRouM.png&#xD;&#xA;&#xD;&#xA;I tried to figure out the collection id from the api i got an hex value but when i tried to convert that hex to numbers i got an undefined value here is my code&#xD;&#xA;i think the hex value which is outside the json is the number value&#xD;&#xA;```const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;(async () =&gt; {&#xD;&#xA;// Construct&#xD;&#xA;const wsProvider = new WsProvider('wss://westmint-rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;// Do something&#xD;&#xA;  const ADDR = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFabHE';&#xD;&#xA;const AccountId32 = '5GCCJthVSwNXRpbeg44gysJUx9vzjdGdfWhioeM7gCg6VyXf';&#xD;&#xA;const u32 = '4';&#xD;&#xA;// Retrieve the last timestamp&#xD;&#xA;const collectionMetadataOf = await api.query.nfts.collectionMetadataOf.entries();&#xD;&#xA;const accounts = api.query.nfts.collectionMetadataOf.entries();&#xD;&#xA;console.log(`${collectionMetadataOf} `);&#xD;&#xA;const obj = JSON.parse(`${collectionMetadataOf} `);&#xD;&#xA;console.log(obj.data)&#xD;&#xA;var asciiVal = &quot;0x516d507955664b50776337475434577978554e414c506f50733563655068364736376974465270737a5753594d38&quot;.match(/.{1,2}/g).map(function(v){&#xD;&#xA;	return String.fromCharCode(parseInt(v, 16));&#xD;&#xA;  }).join('');&#xD;&#xA;console.log(asciiVal)&#xD;&#xA;  const url = &quot;https://cloudflare-ipfs.com/ipfs/&quot; + (asciiVal);&#xD;&#xA;  const response = await fetch(url);&#xD;&#xA;  const jsonData = await response.json();&#xD;&#xA;  console.log(jsonData);&#xD;&#xA;})()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Running this code in terminals using node js returns&#xD;&#xA;&gt; node inde.js&#xD;&#xA;&gt; return : &#xD;&#xA;2023-07-13 19:28:26        API/INIT: westmint/9435: Not decorating runtime apis without matching versions: FungiblesApi/2 (1 known)&#xD;&#xA;2023-07-13 19:28:26        API/INIT: westmint/9435: Not decorating unknown runtime apis: 0x8a8047a53a8277ec/1&#xD;&#xA;0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee295111d2df4e979aa105cf552e9544ebd2b500000000,{&quot;deposit&quot;:10087500000,&quot;data&quot;:&quot;0x516d584d6452365a75664770533247313248546b6b524b7355766977327238526f4c333472624752643675736742&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee29511c8a02f456942930c9730654ca687a3a04000000,{&quot;deposit&quot;:10087500000,&quot;data&quot;:&quot;0x516d507955664b50776337475434577978554e414c506f50733563655068364736376974465270737a5753594d38&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee29513436db8bf2d563cb5d2999a82809eded0b000000,{&quot;deposit&quot;:10064500000,&quot;data&quot;:&quot;0x&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951969e061847da7e84337ea78dc577cd1d05000000,{&quot;deposit&quot;:10072500000,&quot;data&quot;:&quot;0x48656c6c6f20436f6c6c656374696f6e&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee295199850724010e3222888eeb8478c9ffd307000000,{&quot;deposit&quot;:10070000000,&quot;data&quot;:&quot;0x68656c6c6f20616761696e&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951be1f3931028cc05c2e18a319e8f64f9e08000000,{&quot;deposit&quot;:10100000000,&quot;data&quot;:&quot;0x697066733a2f2f697066732f6261666b7265696236756632716e6833656d6468336634637a3262726778787432786f6c616e62336f796d68753769616a346a616f773734746b6d&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951de18007c0afadc771c45bf719bc7fe5103000000,{&quot;deposit&quot;:10087500000,&quot;data&quot;:&quot;0x516d6357686b664377586a484a434358596d484c4e4452776f6f744d5548384750465356444a6a554b5170513535&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951f71f22775221b1945fe6cfa3c6550c7c09000000,{&quot;deposit&quot;:10093500000,&quot;data&quot;:&quot;0x697066733a2f2f697066732f516d58625172696d4468583277726b76487676764e345852697852313366766d4b5856676b5a354b48325a6f616e&quot;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="36784" PostHistoryTypeId="5" PostId="9262" RevisionGUID="6f599c46-ddbb-4893-93d2-a36eb9ae87eb" CreationDate="2023-07-13T19:32:06.107" UserId="4431" Comment="added 1 character in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uRouM.png&#xD;&#xA;&#xD;&#xA;I tried to figure out the collection id from the api i got an hex value but when i tried to convert that hex to numbers i got an undefined value here is my code&#xD;&#xA;i think the hex value which is outside the json is the number value&#xD;&#xA;```const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;(async () =&gt; {&#xD;&#xA;// Construct&#xD;&#xA;const wsProvider = new WsProvider('wss://westmint-rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;// Do something&#xD;&#xA;  const ADDR = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFabHE';&#xD;&#xA;const AccountId32 = '5GCCJthVSwNXRpbeg44gysJUx9vzjdGdfWhioeM7gCg6VyXf';&#xD;&#xA;const u32 = '4';&#xD;&#xA;// Retrieve the last timestamp&#xD;&#xA;const collectionMetadataOf = await api.query.nfts.collectionMetadataOf.entries();&#xD;&#xA;const accounts = api.query.nfts.collectionMetadataOf.entries();&#xD;&#xA;console.log(`${collectionMetadataOf} `);&#xD;&#xA;const obj = JSON.parse(`${collectionMetadataOf} `);&#xD;&#xA;console.log(obj.data)&#xD;&#xA;var asciiVal = &quot;0x516d507955664b50776337475434577978554e414c506f50733563655068364736376974465270737a5753594d38&quot;.match(/.{1,2}/g).map(function(v){&#xD;&#xA;	return String.fromCharCode(parseInt(v, 16));&#xD;&#xA;  }).join('');&#xD;&#xA;console.log(asciiVal)&#xD;&#xA;  const url = &quot;https://cloudflare-ipfs.com/ipfs/&quot; + (asciiVal);&#xD;&#xA;  const response = await fetch(url);&#xD;&#xA;  const jsonData = await response.json();&#xD;&#xA;  console.log(jsonData);&#xD;&#xA;})()&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Running this code in terminals using node js returns&#xD;&#xA;&gt; node index.js&#xD;&#xA;&gt; return : &#xD;&#xA;2023-07-13 19:28:26        API/INIT: westmint/9435: Not decorating runtime apis without matching versions: FungiblesApi/2 (1 known)&#xD;&#xA;2023-07-13 19:28:26        API/INIT: westmint/9435: Not decorating unknown runtime apis: 0x8a8047a53a8277ec/1&#xD;&#xA;0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee295111d2df4e979aa105cf552e9544ebd2b500000000,{&quot;deposit&quot;:10087500000,&quot;data&quot;:&quot;0x516d584d6452365a75664770533247313248546b6b524b7355766977327238526f4c333472624752643675736742&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee29511c8a02f456942930c9730654ca687a3a04000000,{&quot;deposit&quot;:10087500000,&quot;data&quot;:&quot;0x516d507955664b50776337475434577978554e414c506f50733563655068364736376974465270737a5753594d38&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee29513436db8bf2d563cb5d2999a82809eded0b000000,{&quot;deposit&quot;:10064500000,&quot;data&quot;:&quot;0x&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951969e061847da7e84337ea78dc577cd1d05000000,{&quot;deposit&quot;:10072500000,&quot;data&quot;:&quot;0x48656c6c6f20436f6c6c656374696f6e&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee295199850724010e3222888eeb8478c9ffd307000000,{&quot;deposit&quot;:10070000000,&quot;data&quot;:&quot;0x68656c6c6f20616761696e&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951be1f3931028cc05c2e18a319e8f64f9e08000000,{&quot;deposit&quot;:10100000000,&quot;data&quot;:&quot;0x697066733a2f2f697066732f6261666b7265696236756632716e6833656d6468336634637a3262726778787432786f6c616e62336f796d68753769616a346a616f773734746b6d&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951de18007c0afadc771c45bf719bc7fe5103000000,{&quot;deposit&quot;:10087500000,&quot;data&quot;:&quot;0x516d6357686b664377586a484a434358596d484c4e4452776f6f744d5548384750465356444a6a554b5170513535&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951f71f22775221b1945fe6cfa3c6550c7c09000000,{&quot;deposit&quot;:10093500000,&quot;data&quot;:&quot;0x697066733a2f2f697066732f516d58625172696d4468583277726b76487676764e345852697852313366766d4b5856676b5a354b48325a6f616e&quot;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="36785" PostHistoryTypeId="5" PostId="9262" RevisionGUID="d7e1a9cc-dd8b-4598-8091-4dd554cdfe79" CreationDate="2023-07-13T19:34:18.747" UserId="4431" Comment="deleted 411 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uRouM.png&#xD;&#xA;&#xD;&#xA;I tried to figure out the collection id from the api i got an hex value but when i tried to convert that hex to numbers i got an undefined value here is my code&#xD;&#xA;i think the hex value which is outside the json is the number value&#xD;&#xA;```const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;(async () =&gt; {&#xD;&#xA;// Construct&#xD;&#xA;const wsProvider = new WsProvider('wss://westmint-rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;// Do something&#xD;&#xA;  const ADDR = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFabHE';&#xD;&#xA;const AccountId32 = '5GCCJthVSwNXRpbeg44gysJUx9vzjdGdfWhioeM7gCg6VyXf';&#xD;&#xA;const u32 = '4';&#xD;&#xA;// Retrieve the last timestamp&#xD;&#xA;const collectionMetadataOf = await api.query.nfts.collectionMetadataOf.entries();&#xD;&#xA;const accounts = api.query.nfts.collectionMetadataOf.entries();&#xD;&#xA;console.log(`${collectionMetadataOf} `);&#xD;&#xA;const obj = JSON.parse(`${collectionMetadataOf} `);&#xD;&#xA;console.log(obj.data)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Running this code in terminals using node js returns&#xD;&#xA;&gt; node index.js&#xD;&#xA;&gt; return : &#xD;&#xA;2023-07-13 19:28:26        API/INIT: westmint/9435: Not decorating runtime apis without matching versions: FungiblesApi/2 (1 known)&#xD;&#xA;2023-07-13 19:28:26        API/INIT: westmint/9435: Not decorating unknown runtime apis: 0x8a8047a53a8277ec/1&#xD;&#xA;0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee295111d2df4e979aa105cf552e9544ebd2b500000000,{&quot;deposit&quot;:10087500000,&quot;data&quot;:&quot;0x516d584d6452365a75664770533247313248546b6b524b7355766977327238526f4c333472624752643675736742&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee29511c8a02f456942930c9730654ca687a3a04000000,{&quot;deposit&quot;:10087500000,&quot;data&quot;:&quot;0x516d507955664b50776337475434577978554e414c506f50733563655068364736376974465270737a5753594d38&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee29513436db8bf2d563cb5d2999a82809eded0b000000,{&quot;deposit&quot;:10064500000,&quot;data&quot;:&quot;0x&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951969e061847da7e84337ea78dc577cd1d05000000,{&quot;deposit&quot;:10072500000,&quot;data&quot;:&quot;0x48656c6c6f20436f6c6c656374696f6e&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee295199850724010e3222888eeb8478c9ffd307000000,{&quot;deposit&quot;:10070000000,&quot;data&quot;:&quot;0x68656c6c6f20616761696e&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951be1f3931028cc05c2e18a319e8f64f9e08000000,{&quot;deposit&quot;:10100000000,&quot;data&quot;:&quot;0x697066733a2f2f697066732f6261666b7265696236756632716e6833656d6468336634637a3262726778787432786f6c616e62336f796d68753769616a346a616f773734746b6d&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951de18007c0afadc771c45bf719bc7fe5103000000,{&quot;deposit&quot;:10087500000,&quot;data&quot;:&quot;0x516d6357686b664377586a484a434358596d484c4e4452776f6f744d5548384750465356444a6a554b5170513535&quot;},0xe8d49389c2e23e152fdd6364daadd2cc7c447fa0f5e1581c6e2b96cd7bee2951f71f22775221b1945fe6cfa3c6550c7c09000000,{&quot;deposit&quot;:10093500000,&quot;data&quot;:&quot;0x697066733a2f2f697066732f516d58625172696d4468583277726b76487676764e345852697852313366766d4b5856676b5a354b48325a6f616e&quot;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="36786" PostHistoryTypeId="50" PostId="6958" RevisionGUID="96b269cc-e349-4302-b715-ce2a65b054d0" CreationDate="2023-07-14T00:00:50.123" UserId="-1" />
  <row Id="36787" PostHistoryTypeId="2" PostId="9263" RevisionGUID="2ed31cb9-2971-41a2-a713-32cf518d8377" CreationDate="2023-07-14T01:51:01.763" UserId="251" Text="The code is outdated.&#xD;&#xA;&#xD;&#xA;Check https://github.com/paritytech/substrate/blob/master/bin/node-template/pallets/template/src/lib.rs.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And I think you have ran the `cargo update` locally. Otherwise, the old code should also work." ContentLicense="CC BY-SA 4.0" />
  <row Id="36789" PostHistoryTypeId="2" PostId="9264" RevisionGUID="87ffce04-1ffe-48c7-b923-89460c5062fc" CreationDate="2023-07-14T03:15:36.447" UserId="251" Text="What is the definition of proof size?&#xD;&#xA;&#xD;&#xA;- What factors influence the size of a proof?&#xD;&#xA;- What are the steps involved in calculating the proof size? (the benchmark performs various tasks, but it also conceals many details)&#xD;&#xA;- How can we determine the maximum acceptable proof size for a runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36791" PostHistoryTypeId="1" PostId="9264" RevisionGUID="87ffce04-1ffe-48c7-b923-89460c5062fc" CreationDate="2023-07-14T03:15:36.447" UserId="251" Text="What is proof size?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36792" PostHistoryTypeId="3" PostId="9264" RevisionGUID="87ffce04-1ffe-48c7-b923-89460c5062fc" CreationDate="2023-07-14T03:15:36.447" UserId="251" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36793" PostHistoryTypeId="2" PostId="9265" RevisionGUID="dd1ee907-18a4-4d6d-959a-68868554f81b" CreationDate="2023-07-14T04:23:04.527" UserId="4342" Text="Please explain  why the following occurs &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When this method is called, the tokens are equally divided and distributed to the user. (as expected)&#xD;&#xA;&#xD;&#xA;All user balances get updated with the new amounts.&#xD;&#xA;&#xD;&#xA;    #[ink(message, payable)]&#xD;&#xA;    pub fn distribute_tokens(&amp;mut self, to: Vec&lt;AccountId&gt;) -&gt; Result&lt;(), PSP22Error&gt; {&#xD;&#xA;        let total_transfer_amount = self.env().transferred_balance();&#xD;&#xA;    &#xD;&#xA;        // Calculate the amount to be sent to each recipient.&#xD;&#xA;        let individual_amount = total_transfer_amount / to.len() as Balance;&#xD;&#xA;    &#xD;&#xA;        // Transfer tokens to each recipient.&#xD;&#xA;        for recipient in to {&#xD;&#xA;            // This will panic if the transfer fails.&#xD;&#xA;            self.env().transfer(recipient, individual_amount).unwrap_or_default();&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;When I try to do something like this where the user has the option to specify the amount for each recipient, The transaction also succeeds. The balance of the caller (the one distributing the tokens) gets updated with the amount sent as deducted. &#xD;&#xA;&#xD;&#xA;**The problem occurs here** :  The receivers balances remain unchanged. I'm assuming the amount sent from the distributor gets to the contract and stays there without it distributing any of the tokens.  Any insight would be appreciated!&#xD;&#xA;&#xD;&#xA;    #[ink(message, payable)]&#xD;&#xA;    pub fn distribute_tokens(&amp;mut self, recipients: StorageVec&lt;AccountId&gt;, amounts: StorageVec&lt;Balance&gt;) {&#xD;&#xA;        assert!(recipients.len() == amounts.len(), &quot;Recipients and amounts vectors must be of the same length.&quot;);&#xD;&#xA;    &#xD;&#xA;        let transferred_amount: Balance = self.env().transferred_value();&#xD;&#xA;    &#xD;&#xA;        // Ensure the transferred amount matches the total of the amounts vector.&#xD;&#xA;        let total_amounts: Balance = amounts.iter().sum();&#xD;&#xA;        assert!(transferred_amount &gt;= total_amounts, &quot;Transferred amount does not match total of amounts vector.&quot;);&#xD;&#xA;    &#xD;&#xA;        for (recipient, amount) in recipients.iter().zip(amounts.iter()) {&#xD;&#xA;        self.env().transfer(*recipient, *amount).unwrap_or_else(|err: InkEnvError| panic!(&quot;transfer failed: {:?}&quot;, err));&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The transfer fail exception **does not** get thrown.&#xD;&#xA;&#xD;&#xA;**Note: StorageVec is an alias for Vec**" ContentLicense="CC BY-SA 4.0" />
  <row Id="36795" PostHistoryTypeId="1" PostId="9265" RevisionGUID="dd1ee907-18a4-4d6d-959a-68868554f81b" CreationDate="2023-07-14T04:23:04.527" UserId="4342" Text="Sending native token in loop not running" ContentLicense="CC BY-SA 4.0" />
  <row Id="36796" PostHistoryTypeId="3" PostId="9265" RevisionGUID="dd1ee907-18a4-4d6d-959a-68868554f81b" CreationDate="2023-07-14T04:23:04.527" UserId="4342" Text="|ink|smart-contract|extrinsic|transactions|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36797" PostHistoryTypeId="5" PostId="9261" RevisionGUID="d58ccf12-4a9d-4dd2-9003-f18ebab5571d" CreationDate="2023-07-14T05:47:53.133" UserId="251" Comment="added 8 characters in body" Text="I have looked through other posts on the compile errors for &quot;Use macros in a custom pallet&quot;. None of them seemed to get me through the following error. I made sure to have a clean install of `substrate-node-template`. I also traced it to `/Users/****/substrate/substrate-node-template/runtime/src/lib.rs:273:2`. I couldn't find any references to &quot;weights&quot;. It appears to be referenceing something which doesn't exist; however, I'm not sure where to go from there as I'm very new at this. Information below:&#xD;&#xA;&#xD;&#xA;**Error**&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;MacBook-Pro src %  cargo check -p node-template-runtime --release&#xD;&#xA;    Checking pallet-session v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)&#xD;&#xA;    Checking pallet-template v4.0.0-dev (/Users/****/substrate/substrate-node-template/pallets/template)&#xD;&#xA;    Checking pallet-transaction-payment-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)&#xD;&#xA;    Checking pallet-aura v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)&#xD;&#xA;   Compiling node-template-runtime v4.0.0-dev (/Users/****/substrate/substrate-node-template/runtime)&#xD;&#xA;warning: use of deprecated struct `pallet::_::Store`: &#xD;&#xA;                 Use of `#[pallet::generate_store(pub(super) trait Store)]` will be removed soon.&#xD;&#xA;                 Check https://github.com/paritytech/substrate/pull/13535 for more details.&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:12:4&#xD;&#xA;   |&#xD;&#xA;12 |   #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;   |&#xD;&#xA;   = note: `#[warn(deprecated)]` on by default&#xD;&#xA;&#xD;&#xA;warning: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`: &#xD;&#xA;                 It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                 Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;         &#xD;&#xA;                 For more info see:&#xD;&#xA;                     &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:51:22&#xD;&#xA;   |&#xD;&#xA;51 |     #[pallet::weight(0)]&#xD;&#xA;   |                      ^&#xD;&#xA;&#xD;&#xA;warning: use of deprecated constant `pallet::warnings::ConstantWeight_1::_w`: &#xD;&#xA;                 It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                 Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;         &#xD;&#xA;                 For more info see:&#xD;&#xA;                     &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:73:22&#xD;&#xA;   |&#xD;&#xA;73 |     #[pallet::weight(0)]&#xD;&#xA;   |                      ^&#xD;&#xA;&#xD;&#xA;warning: `pallet-template` (lib) generated 3 warnings&#xD;&#xA;    Checking pallet-grandpa v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/****/substrate/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/****/substrate/substrate-node-template/target/release/build/node-template-runtime-0abb0d4d70014bf7/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/****/.rustup/toolchains/stable-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/****/substrate/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.70.0 (90c541806 2023-05-31)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling pallet-template v4.0.0-dev (/Users/****/substrate/substrate-node-template/pallets/template)&#xD;&#xA;  warning: use of deprecated struct `pallet::_::Store`: &#xD;&#xA;                   Use of `#[pallet::generate_store(pub(super) trait Store)]` will be removed soon.&#xD;&#xA;                   Check https://github.com/paritytech/substrate/pull/13535 for more details.&#xD;&#xA;    --&gt; /Users/****/substrate/substrate-node-template/pallets/template/src/lib.rs:12:4&#xD;&#xA;     |&#xD;&#xA;  12 |   #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;     |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `#[warn(deprecated)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`: &#xD;&#xA;                   It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                   Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;    --&gt; /Users/****/substrate/substrate-node-template/pallets/template/src/lib.rs:51:22&#xD;&#xA;     |&#xD;&#xA;  51 |     #[pallet::weight(0)]&#xD;&#xA;     |                      ^&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ConstantWeight_1::_w`: &#xD;&#xA;                   It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                   Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;    --&gt; /Users/****/substrate/substrate-node-template/pallets/template/src/lib.rs:73:22&#xD;&#xA;     |&#xD;&#xA;  73 |     #[pallet::weight(0)]&#xD;&#xA;     |                      ^&#xD;&#xA;&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/Users/****/substrate/substrate-node-template/runtime)&#xD;&#xA;  warning: `pallet-template` (lib) generated 3 warnings&#xD;&#xA;  error[E0437]: type `WeightInfo` is not a member of trait `pallet_template::Config`&#xD;&#xA;     --&gt; /Users/****/substrate/substrate-node-template/runtime/src/lib.rs:273:2&#xD;&#xA;      |&#xD;&#xA;  273 |     type WeightInfo = pallet_template::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `pallet_template::Config`&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: could not find `weights` in `pallet_template`&#xD;&#xA;     --&gt; /Users/****/substrate/substrate-node-template/runtime/src/lib.rs:273:37&#xD;&#xA;      |&#xD;&#xA;  273 |     type WeightInfo = pallet_template::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;      |                                        ^^^^^^^ could not find `weights` in `pallet_template`&#xD;&#xA;&#xD;&#xA;  Some errors have detailed explanations: E0433, E0437.&#xD;&#xA;  For more information about an error, try `rustc --explain E0433`.&#xD;&#xA;  error: could not compile `node-template-runtime` (lib) due to 2 previous errors&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**`/substrate-node-template/pallets/template/src/lib.rs`**&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;// Re-export pallet items so that they can be accessed from the crate namespace.&#xD;&#xA;pub use pallet::*;&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;  use frame_support::pallet_prelude::*;&#xD;&#xA;  use frame_system::pallet_prelude::*;&#xD;&#xA;&#xD;&#xA;  #[pallet::pallet]&#xD;&#xA;  #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;  pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;  /// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;  #[pallet::config]&#xD;&#xA;  pub trait Config: frame_system::Config {&#xD;&#xA;    /// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  // Pallets use events to inform users when important changes are made.&#xD;&#xA;  // Event documentation should end with an array that provides descriptive names for parameters.&#xD;&#xA;  #[pallet::event]&#xD;&#xA;  #[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;  pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    /// Event emitted when a claim has been created.&#xD;&#xA;    ClaimCreated { who: T::AccountId, claim: T::Hash },&#xD;&#xA;    /// Event emitted when a claim is revoked by the owner.&#xD;&#xA;    ClaimRevoked { who: T::AccountId, claim: T::Hash },&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  #[pallet::error]&#xD;&#xA;  pub enum Error&lt;T&gt; {&#xD;&#xA;    /// The claim already exists.&#xD;&#xA;    AlreadyClaimed,&#xD;&#xA;    /// The claim does not exist, so it cannot be revoked.&#xD;&#xA;    NoSuchClaim,&#xD;&#xA;    /// The claim is owned by another account, so caller can't revoke it.&#xD;&#xA;    NotClaimOwner,&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  #[pallet::storage]&#xD;&#xA;  pub(super) type Claims&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::Hash, (T::AccountId, T::BlockNumber)&gt;;&#xD;&#xA;&#xD;&#xA;  // Dispatchable functions allow users to interact with the pallet and invoke state changes.&#xD;&#xA;  // These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;  // Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;  #[pallet::call]&#xD;&#xA;  impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    #[pallet::weight(0)]&#xD;&#xA;    #[pallet::call_index(1)]&#xD;&#xA;    pub fn create_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash) -&gt; DispatchResult {&#xD;&#xA;      // Check that the extrinsic was signed and get the signer.&#xD;&#xA;      // This function will return an error if the extrinsic is not signed.&#xD;&#xA;      let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;      // Verify that the specified claim has not already been stored.&#xD;&#xA;      ensure!(!Claims::&lt;T&gt;::contains_key(&amp;claim), Error::&lt;T&gt;::AlreadyClaimed);&#xD;&#xA;&#xD;&#xA;      // Get the block number from the FRAME System pallet.&#xD;&#xA;      let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;&#xD;&#xA;      // Store the claim with the sender and block number.&#xD;&#xA;      Claims::&lt;T&gt;::insert(&amp;claim, (&amp;sender, current_block));&#xD;&#xA;&#xD;&#xA;      // Emit an event that the claim was created.&#xD;&#xA;      Self::deposit_event(Event::ClaimCreated { who: sender, claim });&#xD;&#xA;&#xD;&#xA;      Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[pallet::weight(0)]&#xD;&#xA;    #[pallet::call_index(2)]&#xD;&#xA;    pub fn revoke_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash) -&gt; DispatchResult {&#xD;&#xA;      // Check that the extrinsic was signed and get the signer.&#xD;&#xA;      // This function will return an error if the extrinsic is not signed.&#xD;&#xA;      let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;      // Get owner of the claim, if none return an error.&#xD;&#xA;      let (owner, _) = Claims::&lt;T&gt;::get(&amp;claim).ok_or(Error::&lt;T&gt;::NoSuchClaim)?;&#xD;&#xA;&#xD;&#xA;      // Verify that sender of the current call is the claim owner.&#xD;&#xA;      ensure!(sender == owner, Error::&lt;T&gt;::NotClaimOwner);&#xD;&#xA;&#xD;&#xA;      // Remove claim from storage.&#xD;&#xA;      Claims::&lt;T&gt;::remove(&amp;claim);&#xD;&#xA;&#xD;&#xA;      // Emit an event that the claim was erased.&#xD;&#xA;      Self::deposit_event(Event::ClaimRevoked { who: sender, claim });&#xD;&#xA;      Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Cargo.toml**&#xD;&#xA;```toml&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-template&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;FRAME pallet template for defining custom runtime logic.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;MIT-0&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.2.2&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { version = &quot;7.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;sp-io = { version = &quot;7.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;sp-runtime = { version = &quot;7.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36800" PostHistoryTypeId="5" PostId="9255" RevisionGUID="781eed2f-6f3a-4c23-9e87-f447889885d7" CreationDate="2023-07-14T06:06:01.257" UserId="354" Comment="improved formatting" Text="In Polkadot docs, Parachain is defined as: &#xD;&#xA;&#xD;&#xA;&gt; A parachain is an application-specific data structure that is globally&#xD;&#xA;&gt; coherent and can be validated by the validators of the Relay Chain.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Why have they used the term data structure instead of chain?&#xD;&#xA;links to [doc][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="36801" PostHistoryTypeId="24" PostId="9255" RevisionGUID="781eed2f-6f3a-4c23-9e87-f447889885d7" CreationDate="2023-07-14T06:06:01.257" Comment="Proposed by 354 approved by 2348 edit id of 496" ContentLicense="CC BY-SA 4.0" />
  <row Id="36802" PostHistoryTypeId="2" PostId="9266" RevisionGUID="a2d7abe8-39a9-431f-95c0-6799740f1923" CreationDate="2023-07-14T06:28:30.300" UserId="145" Text="Is it possible to trace XCM messages (origin para and account id, destination para and account id, instruction and parameters) just utilizing the relay chain storage? If not, what is the simplest way to do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36804" PostHistoryTypeId="1" PostId="9266" RevisionGUID="a2d7abe8-39a9-431f-95c0-6799740f1923" CreationDate="2023-07-14T06:28:30.300" UserId="145" Text="How to trace XCM messages for all parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="36805" PostHistoryTypeId="3" PostId="9266" RevisionGUID="a2d7abe8-39a9-431f-95c0-6799740f1923" CreationDate="2023-07-14T06:28:30.300" UserId="145" Text="|storage|xcm|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36806" PostHistoryTypeId="2" PostId="9267" RevisionGUID="819a8684-f996-4ff3-8751-fa257938aba6" CreationDate="2023-07-14T06:33:55.683" UserId="28" Text="&gt; What is the definition of proof size?&#xD;&#xA;&#xD;&#xA;Proof size is the size, in bytes, required to be able to successfully execute a block of a parachain during the parachains protocol. This is commonly referred to as the PoV Size (Proof of Validity).&#xD;&#xA;&#xD;&#xA;&gt; What factors influence the size of a proof?&#xD;&#xA;&#xD;&#xA;The data accessed during a block will affect the size of a proof. Since the Polkadot relay chain re-executes each parachain block, it also needs the subset of the parachains storage merkle trie which corresponds to the transactions in the block. For example, if a block only had one transaction, which was a transfer from Alice to Bob, you would a merkle proof which contains Alice's and Bob's account balances, but none of the other users. Similarly, if your block executed some smart contract, you would need to include the bytes of that smart contract into the proof.&#xD;&#xA;&#xD;&#xA;So the size of a proof is influenced by the logic of the block, and the storage that needs to be accessed by that block.&#xD;&#xA;&#xD;&#xA;&gt; What are the steps involved in calculating the proof size? (the benchmark performs various tasks, but it also conceals many details)&#xD;&#xA;&#xD;&#xA;As with all benchmarking, you must calculate the worst case scenario to prevent users from attacking your chain. In this case, all storage items in FRAME must have a `MaxEncodedLength`. That is, given any runtime storage object, there must be a maximum size of that storage. Because of this an unbounded `Vec` is not allowed, only `BoundedVec`, which has a maximum number of elements.&#xD;&#xA;&#xD;&#xA;Given that all objects have a statically computable maximum encoded length, benchmarking can simply keep track of which storage items are touched during a benchmark, and then calculate the worst case size of that storage, and keep a sum of the total number of bytes accessed throughout the execution of a worst case scenario transaction.&#xD;&#xA;&#xD;&#xA;Of course, this will normally be a huge overestimate, but will capture the worst case scenario, which is needed to see if a transaction could fit into the block in the worst case scenario. Fortunately, at the end of a transaction, we can see how large the proof size ACTUALLY is, and refund the unused proof size. In this case, we can deterministically figure out the size of the proof at any point, unlike traditional execution time weights.&#xD;&#xA;&#xD;&#xA;So for example, imagine I benchmark a transfer function. I will be touching two storage items: Alice's account and Bob's account. The Account object, lets say is the following struct:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct AccountObject {&#xD;&#xA;    nonce: u32,&#xD;&#xA;    balance: u128,&#xD;&#xA;    name: BoundedVec&lt;u8, 100&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this example, accounts may have a name which is a string of up to 100 bytes. So given this object, we know the `MaxEncodedLen` of the Account Object is 4 + 16 + 100 = 120 bytes. But the proof size isn't simply 120 x 2 = 240 bytes, it must be that plus the rest of the merkle proof, which includes all the nodes leading up to the merkle root.&#xD;&#xA;&#xD;&#xA;FRAME benchmarking takes advantage of a database that keeps track of the proof size throughout the execution of a transaction to spit out a final value in bytes.&#xD;&#xA;&#xD;&#xA;&gt; How can we determine the maximum acceptable proof size for a runtime?&#xD;&#xA;&#xD;&#xA;The maximum PoV size is determined by the relay chain. This is currently configured to 5 MB." ContentLicense="CC BY-SA 4.0" />
  <row Id="36808" PostHistoryTypeId="2" PostId="9268" RevisionGUID="50518482-5719-4d9b-8c07-d238d3824c5e" CreationDate="2023-07-14T07:01:15.260" UserId="3109" Text="Yes, it is possible to trace XCM messages using the relay chain storage. The XCM pallet stores all XCM messages in the relay chain, including the origin parachain and account ID, destination parachain and account ID, instruction, and parameters.&#xD;&#xA;&#xD;&#xA;To trace XCM messages using the relay chain storage, you can use the following steps:&#xD;&#xA;&#xD;&#xA;1. Find the block height of the XCM message you want to trace.&#xD;&#xA;2. Get the XCM message from the relay chain storage for that block height.&#xD;&#xA;3. Parse the XCM message to extract the origin parachain and account ID, destination parachain and account ID, instruction, and parameters.&#xD;&#xA;&#xD;&#xA;There are a few tools that can help you trace XCM messages using the relay chain storage. One tool is `polkaholic.io`, which provides a block indexer that allows you to monitor every XCM message sent and received from/in the relay chain. Another tool is `Subscan`, which provides a beautiful interface to keep track of every XCM message sent between parachain-parachain and parachain-relay chain.&#xD;&#xA;&#xD;&#xA;In addition to using the relay chain storage, you can also trace XCM messages using a bridge. A bridge is a third-party service that allows you to send messages between different blockchains. Bridges typically store a copy of the XCM messages that have been sent between the blockchains they connect. This means that you can use a bridge to trace XCM messages even if the relay chain storage does not contain them.&#xD;&#xA;&#xD;&#xA;The simplest way to trace XCM messages is to use a tool like Polkaholic.io or Subscan. These tools make it easy to find the block height of an XCM message and then get the XCM message from the relay chain storage. Once you have the XCM message, you can parse it to extract the origin parachain and account ID, destination parachain and account ID, instruction, and parameters.&#xD;&#xA;&#xD;&#xA;I hope this helps! " ContentLicense="CC BY-SA 4.0" />
  <row Id="36810" PostHistoryTypeId="2" PostId="9269" RevisionGUID="552fb465-33a4-4460-8c1f-f3a8d3776885" CreationDate="2023-07-14T07:03:30.163" UserId="3109" Text="The reason why the receivers' balances remain unchanged in the second function is because the `env().transfer()` function does not actually transfer the tokens. Instead, it simply checks if the transfer would be successful and returns an error if it would not be.&#xD;&#xA;&#xD;&#xA;In the second function, the `assert!` statement ensures that the transferred amount is at least as much as the total of the amounts vector. However, this does not guarantee that the transfer will actually be successful. For example, if one of the recipients' accounts is not yet initialized, the transfer will fail.&#xD;&#xA;&#xD;&#xA;The `unwrap_or_else` statement in the second function will only panic if the `env().transfer()` function returns an error. However, if the transfer fails because one of the recipients' accounts is not yet initialized, the `env().transfer()` function will not return an error. Instead, it will simply return `None`.&#xD;&#xA;&#xD;&#xA;To fix this, you need to check the return value of the `env().transfer()` function and panic if it is `None`. You can do this by using the following code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;for (recipient, amount) in recipients.iter().zip(amounts.iter()) {&#xD;&#xA;    let result = self.env().transfer(*recipient, *amount);&#xD;&#xA;    if result.is_none() {&#xD;&#xA;        panic!(&quot;Transfer to {} failed&quot;, recipient);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This code will panic if any of the transfers fail. This will ensure that the receivers' balances are always updated correctly.&#xD;&#xA;&#xD;&#xA;Here is a complete example of the second function with the fix:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(message, payable)]&#xD;&#xA;pub fn distribute_tokens(&amp;mut self, recipients: StorageVec&lt;AccountId&gt;, amounts: StorageVec&lt;Balance&gt;) {&#xD;&#xA;    assert!(recipients.len() == amounts.len(), &quot;Recipients and amounts vectors must be of the same length.&quot;);&#xD;&#xA;&#xD;&#xA;    let transferred_amount: Balance = self.env().transferred_value();&#xD;&#xA;&#xD;&#xA;    // Ensure the transferred amount matches the total of the amounts vector.&#xD;&#xA;    let total_amounts: Balance = amounts.iter().sum();&#xD;&#xA;    assert!(transferred_amount &gt;= total_amounts, &quot;Transferred amount does not match total of amounts vector.&quot;);&#xD;&#xA;&#xD;&#xA;    for (recipient, amount) in recipients.iter().zip(amounts.iter()) {&#xD;&#xA;        let result = self.env().transfer(*recipient, *amount);&#xD;&#xA;        if result.is_none() {&#xD;&#xA;            panic!(&quot;Transfer to {} failed&quot;, recipient);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I hope this helps!" ContentLicense="CC BY-SA 4.0" />
  <row Id="36812" PostHistoryTypeId="2" PostId="9270" RevisionGUID="3ba56c7a-338e-42c6-8965-66a2826ae276" CreationDate="2023-07-14T07:06:17.960" UserId="3109" Text="The error you are encountering is an Internal Compiler Error (ICE), which is a bug in the Rust compiler. The error message indicates that the compiler encountered an incremental compilation error with the MIR (Machine Independent Representation) for the function `mir_built`.&#xD;&#xA;&#xD;&#xA;The `mir_built` function is responsible for building the MIR for a function. The MIR is a representation of the function that is used by the compiler to optimize and generate machine code.&#xD;&#xA;&#xD;&#xA;The reason why you are encountering this error is because the compiler is unable to build the MIR for the function `mir_built` correctly. This can be caused by a number of things, including a bug in the compiler, a bug in your code, or a problem with the compiler's environment.&#xD;&#xA;&#xD;&#xA;The easiest way to fix this error is to delete the artifacts directory and rebuild the project. This will force the compiler to rebuild the MIR for all of the functions in your project, including the function `mir_built`.&#xD;&#xA;&#xD;&#xA;If you are still encountering this error after rebuilding the project, you can try the following:&#xD;&#xA;&#xD;&#xA;* Update your Rust compiler to the latest version.&#xD;&#xA;* Try compiling your project on a different machine.&#xD;&#xA;* File a bug report with the Rust compiler team.&#xD;&#xA;&#xD;&#xA;I hope this helps! " ContentLicense="CC BY-SA 4.0" />
  <row Id="36814" PostHistoryTypeId="2" PostId="9271" RevisionGUID="0671efe0-7f1a-409a-a732-5cc8c5a43ebe" CreationDate="2023-07-14T09:47:17.500" UserId="251" Text="There are `WasmExecutor` and `NativeElseWasmExecutor`.&#xD;&#xA;&#xD;&#xA;Cumulus's parachain uses https://github.com/paritytech/cumulus/blob/24855eeaacbe813d093784230de2d33f07ec1e79/polkadot-parachain/src/service.rs#L279.&#xD;&#xA;&#xD;&#xA;Cumulus's parachain template uses https://github.com/paritytech/cumulus/blob/24855eeaacbe813d093784230de2d33f07ec1e79/parachain-template/node/src/service.rs#L100C17-L100C34.&#xD;&#xA;&#xD;&#xA;If I try to use `WasmExecutor`, I'll get the following error:&#xD;&#xA;```&#xD;&#xA;Other error happened while constructing the runtime: runtime requires function imports which are not present on the host: ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to choice a right one to use?&#xD;&#xA;&#xD;&#xA;Can someone eleborate more about how they work in code level?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36816" PostHistoryTypeId="1" PostId="9271" RevisionGUID="0671efe0-7f1a-409a-a732-5cc8c5a43ebe" CreationDate="2023-07-14T09:47:17.500" UserId="251" Text="How does the executor work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36817" PostHistoryTypeId="3" PostId="9271" RevisionGUID="0671efe0-7f1a-409a-a732-5cc8c5a43ebe" CreationDate="2023-07-14T09:47:17.500" UserId="251" Text="|executor|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36818" PostHistoryTypeId="2" PostId="9272" RevisionGUID="1bfed604-18d3-4081-a9f8-06a76126cb0f" CreationDate="2023-07-14T09:48:50.187" UserId="4434" Text="Follow the This Tutorial(https://docs.substrate.io/tutorials/build-a-parachain/transfer-assets-with-xcm/)&#xD;&#xA;But Got Erorr, So can't not complete it.&#xD;&#xA;&#xD;&#xA;please anyone solve my problem.&#xD;&#xA;&#xD;&#xA;1. Parachain Does not have 'sudo extrinsic'? &#xD;&#xA;Using v0.9.37 version(Polkadot + Substrate-prachain) parachain does not have it in extrinsic&#xD;&#xA;how do i use sudo?&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xowra.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36820" PostHistoryTypeId="1" PostId="9272" RevisionGUID="1bfed604-18d3-4081-a9f8-06a76126cb0f" CreationDate="2023-07-14T09:48:50.187" UserId="4434" Text="ParaChain Transfer assets with XCM" ContentLicense="CC BY-SA 4.0" />
  <row Id="36821" PostHistoryTypeId="3" PostId="9272" RevisionGUID="1bfed604-18d3-4081-a9f8-06a76126cb0f" CreationDate="2023-07-14T09:48:50.187" UserId="4434" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36822" PostHistoryTypeId="52" PostId="9264" RevisionGUID="33b3766f-247d-4090-8a3b-71e363b08eaf" CreationDate="2023-07-14T11:17:51.930" />
  <row Id="36823" PostHistoryTypeId="5" PostId="8184" RevisionGUID="426a4cf6-6315-4ce3-a4db-b371f742a9c9" CreationDate="2023-07-14T13:01:20.613" UserId="548" Comment="deleted 410 characters in body" Text="In order to sign the `mintData` object, you would need to get its encoded version first. The easiest way to do this is to open the [mintPreSigned extrinsic's form][1] and fill it with the data:&#xD;&#xA;&#xD;&#xA;[![mintPreSigned form][2]][2]&#xD;&#xA;&#xD;&#xA;For the signature, select the `Sr25519` type and put a dummy signature as the value: `0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`&#xD;&#xA;&#xD;&#xA;Now, in the `encoded call data` field you should see smth like this:&#xD;&#xA;&#xD;&#xA;0x3425**7b000000c8010000040c6b65791476616c7565000000000000**01aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaad43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;&#xD;&#xA;\&#xD;&#xA;The next step would be to select and copy everything between `0x3425` and `01aaaaaaa....` (it's the encoded `mintData` object) and prefix that with `0x`.&#xD;&#xA;If we take the example above that would be `0x7b000000c8010000040c6b65791476616c7565000000000000`.&#xD;&#xA;&#xD;&#xA;\&#xD;&#xA;Now, you'll need to sign that string.\&#xD;&#xA;For that you could use a `subkey sign` command, or a simple JS script similar to this:&#xD;&#xA;```javascript&#xD;&#xA;import { Keyring } from '@polkadot/api';&#xD;&#xA;import { u8aToHex } from '@polkadot/util';&#xD;&#xA;&#xD;&#xA;const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;const pair = keyring.addFromUri('//Alice');&#xD;&#xA;const sig = pair.sign('0x7b000000c8010000040c6b65791476616c7565000000000000');&#xD;&#xA;console.log('sig hex', u8aToHex(sig));&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwestmint-rpc.polkadot.io#/extrinsics&#xD;&#xA;  [2]: https://i.stack.imgur.com/Cexlw.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="36824" PostHistoryTypeId="2" PostId="9273" RevisionGUID="66b9bb44-72bc-4f12-aad7-a32dd91229af" CreationDate="2023-07-14T13:02:24.360" UserId="4341" Text="Currently the `substrate-parachain-template` is set up for Polkadot `v0.9.43`, you can check this by jump into `Cargo.toml` file on the `runtime` folder found [here][1]. &#xD;&#xA;&#xD;&#xA;If you are strictly following up this [tutorial][2] you might have went for Polkadot `v0.9.37`, so I recommend you to verify and move to the latest release which is `v0.9.43` , please find it [here][3]. &#xD;&#xA;&#xD;&#xA;If you clone and build both this repos and use them as the binaries of your Zombienet, you would be fine to proceed with the tutorial. &#xD;&#xA;&#xD;&#xA;There are some Zombienet CLI commands that help with the binaries but since they don't run on every machine I would recommend the previous paths as the safest.&#xD;&#xA;&#xD;&#xA;Hope this helps  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/runtime/Cargo.toml&#xD;&#xA;  [2]: https://docs.substrate.io/test/simulate-parachains/&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="36826" PostHistoryTypeId="5" PostId="9273" RevisionGUID="fb3c24f2-de6b-42a4-8419-88dfac9f6664" CreationDate="2023-07-14T13:08:58.743" UserId="4341" Comment="added 3 characters in body" Text="Currently the `substrate-parachain-template` is set up for Polkadot `v0.9.43`, you can check this by jumping into `Cargo.toml` file on the `runtime` folder found [here][1]. &#xD;&#xA;&#xD;&#xA;If you are strictly following up this [tutorial][2] you might have went for Polkadot `v0.9.37`, so I recommend you to verify and move to the latest release which is `v0.9.43` , please find it [here][3]. &#xD;&#xA;&#xD;&#xA;If you clone and build both this repos and use them as the binaries of your Zombienet, you would be fine to proceed with the tutorial. &#xD;&#xA;&#xD;&#xA;There are some Zombienet CLI commands that help with the binaries but since they don't run on every machine I would recommend the previous paths as the safest.&#xD;&#xA;&#xD;&#xA;Hope this helps  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/runtime/Cargo.toml&#xD;&#xA;  [2]: https://docs.substrate.io/test/simulate-parachains/&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="36827" PostHistoryTypeId="5" PostId="9273" RevisionGUID="85fe903f-5a8b-4bae-bb0b-d742acd6ba7e" CreationDate="2023-07-14T13:22:36.117" UserId="4341" Comment="deleted 580 characters in body" Text="I have checked the `substrate-parachain-template` runtime and it does not configure the sudo pallet. Please jump into `lib.rs` on `runtime` folder and you might see that there is no `Config` trait for `sudo-pallet`, like this:&#xD;&#xA;&#xD;&#xA;`&#xD;&#xA;impl pallet_sudo::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;}&#xD;&#xA;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="36828" PostHistoryTypeId="5" PostId="9273" RevisionGUID="da8290b8-7c6d-4524-9608-46997de083a5" CreationDate="2023-07-14T13:29:08.867" UserId="4341" Comment="added 229 characters in body" Text="I have checked the `substrate-parachain-template` runtime and it does not configure the sudo pallet. Please jump into `lib.rs` on `runtime` folder and you might see that there is no `Config` trait for `sudo-pallet`, like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_sudo::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please have in mind that adding a pallet to the runtime implies other steps that you can check [here][1] as an example reference.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-application-logic/add-a-pallet/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36829" PostHistoryTypeId="2" PostId="9274" RevisionGUID="ae3056f3-68d8-4807-8e8f-34a7680a5e87" CreationDate="2023-07-14T13:48:18.923" UserId="4277" Text="Hi i have cloned the node template and also added the pallet-contract in it, now i want to know that how can i deploy a smart contract on my this chain i have also deployed it on EC2 instance but i want to know how can i deploy and write smart contract on my chain network. Can someone guide me on this." ContentLicense="CC BY-SA 4.0" />
  <row Id="36831" PostHistoryTypeId="1" PostId="9274" RevisionGUID="ae3056f3-68d8-4807-8e8f-34a7680a5e87" CreationDate="2023-07-14T13:48:18.923" UserId="4277" Text="How to deploy a contract on your chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="36832" PostHistoryTypeId="3" PostId="9274" RevisionGUID="ae3056f3-68d8-4807-8e8f-34a7680a5e87" CreationDate="2023-07-14T13:48:18.923" UserId="4277" Text="|smart-contract|substrate-contracts-node|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36833" PostHistoryTypeId="5" PostId="9273" RevisionGUID="76f1b32d-01b6-4188-ab21-09afd8d949b2" CreationDate="2023-07-14T13:48:47.150" UserId="4341" Comment="edited body" Text="I have checked the `substrate-parachain-template` runtime and it does not implement the sudo pallet. Please jump into `lib.rs` on `runtime` folder and you might see that there is no `Config` trait for `sudo-pallet`, like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_sudo::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please have in mind that adding a pallet to the runtime implies other steps that you can check [here][1] as an example reference.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-application-logic/add-a-pallet/" ContentLicense="CC BY-SA 4.0" />
  <row Id="36834" PostHistoryTypeId="50" PostId="8882" RevisionGUID="b771e23d-5769-4bef-8e66-d321df04ece0" CreationDate="2023-07-14T15:03:10.370" UserId="-1" />
  <row Id="36835" PostHistoryTypeId="50" PostId="7202" RevisionGUID="ee339d87-8920-4663-aa91-019e58cb3f34" CreationDate="2023-07-14T16:07:50.933" UserId="-1" />
  <row Id="36836" PostHistoryTypeId="50" PostId="7199" RevisionGUID="872c0f93-adc4-49a2-839d-7b5ad9952f35" CreationDate="2023-07-14T17:03:30.437" UserId="-1" />
  <row Id="36837" PostHistoryTypeId="2" PostId="9275" RevisionGUID="cdcad735-c39d-4cad-997b-811bb960c786" CreationDate="2023-07-14T18:52:53.717" UserId="3142" Text="The `entriesAt()` function has been deprecated so the correct way to do this is to get a separate instance of the api at the specified block hash.&#xD;&#xA;&#xD;&#xA;    const apiAtBlockHash = await this.api.at(blockHash);&#xD;&#xA;    let queryResult = await apiAtBlockHash.query.mypallet.mystorage.entries();&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36846" PostHistoryTypeId="50" PostId="7204" RevisionGUID="643d236d-e41d-42b8-bad5-3c400c0d71e2" CreationDate="2023-07-15T11:05:05.713" UserId="-1" />
  <row Id="36847" PostHistoryTypeId="50" PostId="7220" RevisionGUID="2eb34635-5387-4f2f-b769-68201caa58ae" CreationDate="2023-07-15T15:09:41.177" UserId="-1" />
  <row Id="36848" PostHistoryTypeId="2" PostId="9277" RevisionGUID="b99d7539-f7e2-45b6-ade5-5b144f3e7226" CreationDate="2023-07-16T07:31:34.680" UserId="4436" Text="I got the same issue today and `rustup update` doesn't work.&#xD;&#xA;And I came to an idea.&#xD;&#xA;```bash&#xD;&#xA;rm -fr target Cargo.toml&#xD;&#xA;cargo check&#xD;&#xA;```&#xD;&#xA;that's it.&#xD;&#xA;But anyone know what's the cause of it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36850" PostHistoryTypeId="2" PostId="9278" RevisionGUID="cea85381-2a29-44b4-9379-54678eb096cc" CreationDate="2023-07-16T07:56:57.083" UserId="213" Text="Updating to new version of substrate, of the branch = &quot;polkadot-v0.9.42&quot;, it giving error,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust &#xD;&#xA;impl&lt;C, Block, AccountId&gt; ProfileValidationApi&lt;&lt;Block as BlockT&gt;::Hash, AccountId&gt; for ProfileValidation&lt;C, Block&gt;&#xD;&#xA;where&#xD;&#xA;	Block: BlockT,&#xD;&#xA;	AccountId: Codec,&#xD;&#xA;	C: Send + Sync + 'static,&#xD;&#xA;	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;	C: HeaderBackend&lt;Block&gt;,&#xD;&#xA;	C::Api: ProfileValidationRuntimeApi&lt;Block, AccountId&gt;,&#xD;&#xA;{&#xD;&#xA;	fn get_challengers_evidence(&#xD;&#xA;		&amp;self,&#xD;&#xA;		profile_user_account: AccountId,&#xD;&#xA;		offset: u64,&#xD;&#xA;		limit: u16,&#xD;&#xA;		at: Option&lt;&lt;Block as BlockT&gt;::Hash&gt;,&#xD;&#xA;	) -&gt; Result&lt;Vec&lt;ChallengePostId&gt;&gt; {&#xD;&#xA;		let api = self.client.runtime_api();&#xD;&#xA;		let at = BlockId::hash(at.unwrap_or_else(||&#xD;&#xA;			// If the block hash is not supplied assume the best block.&#xD;&#xA;			self.client.info().best_hash));&#xD;&#xA;&#xD;&#xA;		let runtime_api_result =&#xD;&#xA;			api.get_challengers_evidence(&amp;at, profile_user_account, offset, limit);&#xD;&#xA;		runtime_api_result.map_err(|e| RpcError {&#xD;&#xA;			code: ErrorCode::ServerError(9876), // No real reason for this value&#xD;&#xA;			message: &quot;Something wrong&quot;.into(),&#xD;&#xA;			data: Some(format!(&quot;{:?}&quot;, e).into()),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;The error:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; pallets/profile-validation/profile-validation-rpc/src/lib.rs:90:33&#xD;&#xA;    |&#xD;&#xA;90  |             api.get_challengers_evidence(&amp;at, profile_user_account, offset, limit);&#xD;&#xA;    |                 ------------------------ ^^^ expected associated type, found `&amp;BlockId&lt;_&gt;`&#xD;&#xA;    |                 |&#xD;&#xA;    |                 arguments to this method are incorrect&#xD;&#xA;    |                 here the type of `api` is inferred to be `&lt;C as ProvideRuntimeApi&lt;Block&gt;&gt;::Api`&#xD;&#xA;    |&#xD;&#xA;    = note: expected associated type `&lt;Block as sp_api::BlockT&gt;::Hash`&#xD;&#xA;                     found reference `&amp;BlockId&lt;_&gt;`&#xD;&#xA;help: a method is available that returns `&lt;Block as sp_api::BlockT&gt;::Hash`&#xD;&#xA;   --&gt; /home/amiya/.cargo/git/checkouts/substrate-7e08433d4c370a21/ff24c60/primitives/runtime/src/traits.rs:951:2&#xD;&#xA;    |&#xD;&#xA;951 |     fn hash(&amp;self) -&gt; Self::Hash {&#xD;&#xA;    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider calling `sp_api::BlockT::hash`&#xD;&#xA;note: method defined here&#xD;&#xA;   --&gt; /home/amiya/Documents/workspace/shivarthu/working_directory/substrate-node-template/pallets/profile-validation/profile-validation-runtime-api/src/lib.rs:11:6&#xD;&#xA;    |&#xD;&#xA;11  |         fn get_challengers_evidence(profile_user_account: AccountId, offset: u64, limit: u16) -&gt; Vec&lt;ChallengePostId&gt;;&#xD;&#xA;    |            ^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36852" PostHistoryTypeId="1" PostId="9278" RevisionGUID="cea85381-2a29-44b4-9379-54678eb096cc" CreationDate="2023-07-16T07:56:57.083" UserId="213" Text="Error on custom rpc in new version" ContentLicense="CC BY-SA 4.0" />
  <row Id="36853" PostHistoryTypeId="3" PostId="9278" RevisionGUID="cea85381-2a29-44b4-9379-54678eb096cc" CreationDate="2023-07-16T07:56:57.083" UserId="213" Text="|custom-rpc|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36854" PostHistoryTypeId="50" PostId="8864" RevisionGUID="5a243daf-55be-4bd5-9aa0-7592633bc895" CreationDate="2023-07-16T15:06:50.760" UserId="-1" />
  <row Id="36855" PostHistoryTypeId="50" PostId="5410" RevisionGUID="c4391a66-e19c-470e-a3a8-3a32d5a55e41" CreationDate="2023-07-16T16:08:06.103" UserId="-1" />
  <row Id="36856" PostHistoryTypeId="50" PostId="8881" RevisionGUID="485b5d0f-4c07-476b-83bb-fd5dd2fc5eab" CreationDate="2023-07-16T18:00:55.103" UserId="-1" />
  <row Id="36859" PostHistoryTypeId="2" PostId="9280" RevisionGUID="60c3950e-5c59-4a8b-8dff-d6653039ed13" CreationDate="2023-07-16T20:33:07.670" UserId="4438" Text="I am running one polkadot node and have tried --state-pruning 256 and --pruning=1000 but I keep seing 5,000 sst files one month old that should have removed. &#xD;&#xA;&#xD;&#xA;256 or 1,000 blocks is less than one day so I should not see sst files from last month. Why is this?&#xD;&#xA;&#xD;&#xA;I also see many old log txt files.&#xD;&#xA;&#xD;&#xA;What is the correct way of setting the prunning in polkadot substrate node?&#xD;&#xA;&#xD;&#xA;Is it safe to manually remove the old sst files?&#xD;&#xA;Is it safe to manually remove the log txt files?&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="36861" PostHistoryTypeId="1" PostId="9280" RevisionGUID="60c3950e-5c59-4a8b-8dff-d6653039ed13" CreationDate="2023-07-16T20:33:07.670" UserId="4438" Text="Is pruning working in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36862" PostHistoryTypeId="3" PostId="9280" RevisionGUID="60c3950e-5c59-4a8b-8dff-d6653039ed13" CreationDate="2023-07-16T20:33:07.670" UserId="4438" Text="|pruning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36864" PostHistoryTypeId="2" PostId="9281" RevisionGUID="98ca6eab-92ef-4666-836c-f2ab29da42e6" CreationDate="2023-07-16T23:00:24.517" UserId="3960" Text="I develop a custom chain based on Substrate.&#xD;&#xA;The chain business logic involves stateful sessions where the state is managed through&#xD;&#xA;Http and unsigned transactions submitted via Offchain workers.&#xD;&#xA;&#xD;&#xA;Until recent time the system had 2 offchain workers and worked smoothly.&#xD;&#xA;&#xD;&#xA;After a third ow was introduced, the ```'Ran out of free Wasm instances'``` warning started to pop up and although ```--max-runtime-instance 256``` seemed to help reduce the warnings' frequency, still they appear.&#xD;&#xA;&#xD;&#xA;The ow in question sends an http request, waits for response and based on the result, submits 2 extrinsics, so it looks like no heavy code runs there.&#xD;&#xA;However when I comment the extrinsics submission out the system works normally.&#xD;&#xA;&#xD;&#xA;My concern about this story is that the resulting session state changes are not deterministic as for how long in terms of block numbers it takes for the session to switch its states.&#xD;&#xA;&#xD;&#xA;I run integration tests based on ```subxt``` that sometimes succeed and sometimes fail, because it's not always determined at which block the state changes.&#xD;&#xA;&#xD;&#xA;As far as I could understand from the relevant ```wasm_runtime.rs``` code snippets the phenomenon per se doesn't lead to fatal errors, but still I lack insight of what potential consequences this thing can bring.&#xD;&#xA;&#xD;&#xA;Is there anything I could do in order to get rid of this sort of trouble ?&#xD;&#xA;&#xD;&#xA;Is it advisable to pack all ow logic into a single ow function, rather than run a number of ow in parallel although it looks better from business logic structure perspective ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="36866" PostHistoryTypeId="1" PostId="9281" RevisionGUID="98ca6eab-92ef-4666-836c-f2ab29da42e6" CreationDate="2023-07-16T23:00:24.517" UserId="3960" Text="Is 'Ran out of free Wasm instances' a bad symptom?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36867" PostHistoryTypeId="3" PostId="9281" RevisionGUID="98ca6eab-92ef-4666-836c-f2ab29da42e6" CreationDate="2023-07-16T23:00:24.517" UserId="3960" Text="|runtime|wasm|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36868" PostHistoryTypeId="50" PostId="5453" RevisionGUID="76295ff6-5ef2-40ce-b810-19f4d1eaf02f" CreationDate="2023-07-17T04:04:35.570" UserId="-1" />
  <row Id="36869" PostHistoryTypeId="2" PostId="9282" RevisionGUID="8f652928-65c6-4aa4-829e-60437d651190" CreationDate="2023-07-17T05:11:51.943" UserId="213" Text="New example code is present in transaction-payment rpc that uses jsonrpsee&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/rpc/src/lib.rs&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;C, Block, AccountId&gt; ProfileValidationApiServer&lt;&lt;Block as BlockT&gt;::Hash, AccountId&gt; for ProfileValidation&lt;C, Block&gt;&#xD;&#xA;where&#xD;&#xA;	Block: BlockT,&#xD;&#xA;	AccountId: Codec,&#xD;&#xA;	C: Send + Sync + 'static,&#xD;&#xA;	C: ProvideRuntimeApi&lt;Block&gt;,&#xD;&#xA;	C: HeaderBackend&lt;Block&gt;,&#xD;&#xA;	C::Api: ProfileValidationRuntimeApi&lt;Block, AccountId&gt;,&#xD;&#xA;{&#xD;&#xA;	fn get_challengers_evidence(&#xD;&#xA;		&amp;self,&#xD;&#xA;		profile_user_account: AccountId,&#xD;&#xA;		offset: u64,&#xD;&#xA;		limit: u16,&#xD;&#xA;		at: Option&lt;Block::Hash&gt;,&#xD;&#xA;	) -&gt; RpcResult&lt;Vec&lt;ChallengePostId&gt;&gt; {&#xD;&#xA;		let api = self.client.runtime_api();&#xD;&#xA;		let at = at.unwrap_or_else(||&#xD;&#xA;			// If the block hash is not supplied assume the best block.&#xD;&#xA;			self.client.info().best_hash);&#xD;&#xA;&#xD;&#xA;		let runtime_api_result =&#xD;&#xA;			api.get_challengers_evidence(at, profile_user_account, offset, limit);&#xD;&#xA;			fn map_err(error: impl ToString, desc: &amp;'static str) -&gt; CallError {&#xD;&#xA;				CallError::Custom(ErrorObject::owned(&#xD;&#xA;					Error::RuntimeError.into(),&#xD;&#xA;					desc,&#xD;&#xA;					Some(error.to_string()),&#xD;&#xA;				))&#xD;&#xA;			}&#xD;&#xA;			let res = runtime_api_result.map_err(|e| map_err(e, &quot;Unable to query dispatch info.&quot;))?;&#xD;&#xA;			Ok(res)&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36871" PostHistoryTypeId="2" PostId="9283" RevisionGUID="ce671094-7433-4ccd-93b7-1b61b248df02" CreationDate="2023-07-17T07:32:38.543" UserId="49" Text="How can someone retrace what actually happened during the execution of the `Transact` message?&#xD;&#xA;&#xD;&#xA;Recently the Zeitgeist parachain (2,092) sent an [XCM](https://polkadot.subscan.io/xcm_message/polkadot-72ac4993e1c3e0151b8f7bf21ac37e44c811108c) to Polkadot that includes a `Transact` message that calls `hrmp.hrmpCancelOpenRequest`. This XCM apparently was completed, as seen [here](https://polkadot.subscan.io/extrinsic/16427469-1?event=16427469-42) and [here](https://polkadot.subscan.io/xcm_message/polkadot-72ac4993e1c3e0151b8f7bf21ac37e44c811108c). This XCM was previously successfully tested on Rococo using the adjusted parachain ids. However, on Polkadot the desired result (channel canceled) was not achieved and neither any events nor state traces indicate what internally happened." ContentLicense="CC BY-SA 4.0" />
  <row Id="36873" PostHistoryTypeId="1" PostId="9283" RevisionGUID="ce671094-7433-4ccd-93b7-1b61b248df02" CreationDate="2023-07-17T07:32:38.543" UserId="49" Text="How to trace the execution of complete XCM `Transact` calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36874" PostHistoryTypeId="3" PostId="9283" RevisionGUID="ce671094-7433-4ccd-93b7-1b61b248df02" CreationDate="2023-07-17T07:32:38.543" UserId="49" Text="|xcm|hrmp|debugging|transact|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36875" PostHistoryTypeId="4" PostId="9283" RevisionGUID="c5a0a8e3-aa4e-4eea-81de-44e290dc4fb6" CreationDate="2023-07-17T07:42:02.630" UserId="49" Comment="edited title" Text="How to retrace the execution of completed XCM Transact calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36876" PostHistoryTypeId="2" PostId="9284" RevisionGUID="0766d6e7-f1a3-4712-9df1-201339e936d3" CreationDate="2023-07-17T09:15:37.277" UserId="2762" Text="If you want to get the same values as you are getting with PolkadotJS UI try this snippet:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const collectionMetadataOf = await api.query.nfts.collectionMetadataOf.entries();&#xD;&#xA;        collectionMetadataOf.forEach(([{ args: [id] }, value]) =&gt; {&#xD;&#xA;        const metadata = JSON.parse(`${value}`);&#xD;&#xA;        console.log(id.toHuman());&#xD;&#xA;        console.log(metadata);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;You can see more information and examples of how to parse the information with `entries()` in the docs: [How do I use .entries()/.keys() on double maps?][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/cookbook/storage#how-do-i-use-entrieskeys-on-double-maps" ContentLicense="CC BY-SA 4.0" />
  <row Id="36878" PostHistoryTypeId="2" PostId="9285" RevisionGUID="c4c438d2-9e77-4cce-a382-60a1c89aedfb" CreationDate="2023-07-17T09:26:10.560" UserId="2762" Text="If you have your network with the pallet contracts in it running you can already deploy smart contracts.&#xD;&#xA;&#xD;&#xA;You have two options to deploy the Smart Contract, see the ink! docs [Deploy your Contract][1]. &#xD;&#xA; 1. Using the tool [cargo-contract][2], you can follow the Substrate Docs: [Deploy and test the smart contract][3]&#xD;&#xA; 2. Using the UI: https://contracts-ui.substrate.io/ you just need to change and use your local node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/getting-started/deploy-your-contract/&#xD;&#xA;  [2]: https://github.com/paritytech/cargo-contract&#xD;&#xA;  [3]: https://docs.substrate.io/tutorials/smart-contracts/develop-a-smart-contract/#deploy-and-test-the-smart-contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="36881" PostHistoryTypeId="2" PostId="9286" RevisionGUID="6543af02-57fa-4ac0-a469-0671561f6387" CreationDate="2023-07-17T09:47:32.313" UserId="2844" Text="Let me give scenario, let's say:&#xD;&#xA;There are 2 types of playable characters&#xD;&#xA;&#xD;&#xA;- Chickens (90% chance to mint)&#xD;&#xA;- Foxes (10% chance to mint)&#xD;&#xA;&#xD;&#xA;and total supply is 15,000 units :&#xD;&#xA;- 13,500 chickens&#xD;&#xA;- 1,500 foxes&#xD;&#xA;&#xD;&#xA;**How to determine whether a Chicken or a Fox is minted?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="36883" PostHistoryTypeId="1" PostId="9286" RevisionGUID="6543af02-57fa-4ac0-a469-0671561f6387" CreationDate="2023-07-17T09:47:32.313" UserId="2844" Text="How to mint multiple characters randomly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36884" PostHistoryTypeId="3" PostId="9286" RevisionGUID="6543af02-57fa-4ac0-a469-0671561f6387" CreationDate="2023-07-17T09:47:32.313" UserId="2844" Text="|ink|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36885" PostHistoryTypeId="2" PostId="9287" RevisionGUID="df0d4eff-e6d2-4326-9aea-85e30dd773c4" CreationDate="2023-07-17T10:28:59.910" UserId="560" Text="If your chain is running metadata version v14 or above you can use Libuptest:&#xD;&#xA;```rust&#xD;&#xA;use libuptest::decode_extrinsic::decode_extrinsic_hex_string;&#xD;&#xA;use libuptest::jsonrpseeclient::JsonrpseeClient;&#xD;&#xA;use libuptest::ws_mod::get_raw_metadata;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;let raw_extrinsic = &quot;input my hex string here&quot;;&#xD;&#xA;let metadata: Vec&lt;u8&gt; = get_raw_metadata(JsonrpseeClient::polkadot_default_url().unwrap())&#xD;&#xA;        .await?; &#xD;&#xA;let decoded_output = decode_extrinsic_hex_string(raw_extrinsic, &amp;metadata);&#xD;&#xA;println!(&quot;The decoded output is: {:?}&quot;, decoded_output);&#xD;&#xA;```&#xD;&#xA;https://github.com/uptest-sc/uptest/blob/main/examples/examples/decode_extrinsics.rs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36887" PostHistoryTypeId="50" PostId="5986" RevisionGUID="da75806d-464e-4aa8-9c6f-d9557e994aeb" CreationDate="2023-07-17T11:08:51.157" UserId="-1" />
  <row Id="36888" PostHistoryTypeId="2" PostId="9288" RevisionGUID="7f349e74-3bf1-4133-9ef7-9e6ac43a3f94" CreationDate="2023-07-17T12:31:38.263" UserId="2762" Text="I have a little snippet as an example of how to recover the account from a mnemonic and a seed using Alice testing account. You can check the menmonic and seed for this account in this previous StackExchange question:  [What are the predefined accounts (ALICE, BOB, etc)?][1]. &#xD;&#xA;&#xD;&#xA;See below the snippet that works, it might help you to see why is not working in your particular case:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;    await cryptoWaitReady();&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;&#xD;&#xA;    const PHRASE = &quot;bottom drive obey lake curtain smoke basket hold race lonely fit walk//Alice&quot;;&#xD;&#xA;    const pairWithMnemonic = keyring.addFromUri(PHRASE);&#xD;&#xA;    const pairWithSeeds = keyring.addFromUri('0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a');&#xD;&#xA;    &#xD;&#xA;    console.log(pairWithMnemonic.address);&#xD;&#xA;    console.log(pairWithSeeds.address); &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/47/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="36890" PostHistoryTypeId="2" PostId="9289" RevisionGUID="c73cdabe-2046-40c7-a3a5-4a721ab121ed" CreationDate="2023-07-17T12:39:15.020" UserId="4083" Text="I was wondering about block time and block size. Why are they defined the way they are? Is it possible to reduce the time between two blocks without changing the consensus mechanism? What would happen to the current consensus if we wanted to lower the time between two blocks?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36892" PostHistoryTypeId="1" PostId="9289" RevisionGUID="c73cdabe-2046-40c7-a3a5-4a721ab121ed" CreationDate="2023-07-17T12:39:15.020" UserId="4083" Text="Reduce block time" ContentLicense="CC BY-SA 4.0" />
  <row Id="36893" PostHistoryTypeId="3" PostId="9289" RevisionGUID="c73cdabe-2046-40c7-a3a5-4a721ab121ed" CreationDate="2023-07-17T12:39:15.020" UserId="4083" Text="|consensus|time|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36894" PostHistoryTypeId="2" PostId="9290" RevisionGUID="aa3c10c9-218e-4323-86b7-34de945985dd" CreationDate="2023-07-17T13:01:38.110" UserId="2762" Text="There is a brilliant explanation about why was the decision of the default Substrate block time in this previous StackExchange answer: [What is the possible minimum block time?][1].&#xD;&#xA;&#xD;&#xA;Substrate is highly customizable, so yes, is possible to reduce the time between two blocks.&#xD;&#xA;&#xD;&#xA;See these examples:&#xD;&#xA;&#xD;&#xA; - [How to configure polkadot + parachain locally to validate parachain block each 6 sec?][2]&#xD;&#xA;- [Why my solo chain block time is 12 seconds when set to 6?][3]&#xD;&#xA;&#xD;&#xA;And just as an example about how customizable is if you want to change the consensus mechanism: [How can I make my node generate blocks only when they receive transactions?][4]&#xD;&#xA;&#xD;&#xA;About your question what would happen to the current consensus if we wanted to lower the time between two blocks, I get this quote from the Shawn's answer I shared above. &#xD;&#xA;&#xD;&#xA;&gt; Testing and benchmarking of your Substrate network will be the only&#xD;&#xA;&gt; way to really determine how low you can safely get your block time.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3028/what-is-the-possible-minimum-block-time&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/8544/how-to-configure-polkadot-parachain-locally-to-validate-parachain-block-each-6&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/4558/why-my-solo-chain-block-time-is-12-seconds-when-set-to-6&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/5918/how-can-i-make-my-node-generate-blocks-only-when-they-receive-transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="36896" PostHistoryTypeId="2" PostId="9291" RevisionGUID="164a4b78-a438-478e-ac37-5961d9cb09ae" CreationDate="2023-07-17T13:40:14.790" UserId="4440" Text="I want to start my own blockchain. I try to start substrate node template and substrate frontend template remotely, but there is guide instructions only for local machine. I installed and compiled node and frontend on linux dedicated server. The question is: &#xD;&#xA;1. How to start node remotely and make it run even when I close the ssh panel.&#xD;&#xA;2. How to make frontend find the node? Becouse when I open the link _somesite.com_ - it tries to connect the node all the time? and all the time gets an erros with no connections" ContentLicense="CC BY-SA 4.0" />
  <row Id="36898" PostHistoryTypeId="1" PostId="9291" RevisionGUID="164a4b78-a438-478e-ac37-5961d9cb09ae" CreationDate="2023-07-17T13:40:14.790" UserId="4440" Text="How to start substrate node template and substrate frontend template remotely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36899" PostHistoryTypeId="3" PostId="9291" RevisionGUID="164a4b78-a438-478e-ac37-5961d9cb09ae" CreationDate="2023-07-17T13:40:14.790" UserId="4440" Text="|substrate-node-template|substrate-front-end|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36903" PostHistoryTypeId="2" PostId="9293" RevisionGUID="851592bc-69ab-4856-8e03-7f73f39eecf6" CreationDate="2023-07-17T14:23:01.510" UserId="560" Text="You can use the Libuptest crate for Rust to extract the block events from a block.&#xD;&#xA;For example:&#xD;&#xA;If you know the blocknr or blockhash you can use libuptest to extract all extrinsics from a block in a Vec, code example: https://uptest-sc.github.io/cli/event_sub.html#code-example&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36905" PostHistoryTypeId="2" PostId="9294" RevisionGUID="8d1251cf-43a3-418b-aa00-d32b46d6490b" CreationDate="2023-07-17T14:26:11.077" UserId="560" Text="You can use the libuptest crate to extract the extrinsic:&#xD;&#xA;code example: https://uptest-sc.github.io/cli/event_sub.html#code-example&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36908" PostHistoryTypeId="2" PostId="9295" RevisionGUID="d8597829-6b4e-48b4-87b7-b229c9a7b4d3" CreationDate="2023-07-17T14:33:16.550" UserId="560" Text="I use the uptest-cli:&#xD;&#xA;`$ uptest -w ws://127.0.0.1:9944 200`&#xD;&#xA;to subscribe to a chain and display the events that got triggered in each block. Nifty tool to have in one terminal and then you can see what events got triggered in the latest blocks.&#xD;&#xA;Public doc:&#xD;&#xA; https://uptest-sc.github.io/cli/event_sub.html&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="36910" PostHistoryTypeId="2" PostId="9296" RevisionGUID="6f0729b3-b1ce-4c61-8cf3-2e7f37a2de98" CreationDate="2023-07-17T20:44:55.097" UserId="94" Text="The specs in the CLI were updated to be in accordance with the Wiki recommendations in [substrate#13317](https://github.com/paritytech/substrate/pull/13317).  &#xD;&#xA;&#xD;&#xA;Judging by your posted pictures; The CPU stats look good and would all pass. The disk stats do not meet the recommendation though. You can find the table with the old and new stats in the MR linked above." ContentLicense="CC BY-SA 4.0" />
  <row Id="36912" PostHistoryTypeId="5" PostId="9219" RevisionGUID="7d0cddcb-8038-4ace-af93-0f1473978727" CreationDate="2023-07-17T20:46:37.107" UserId="116" Comment="Code block" Text="I trying to make Signature using Polkadot.js without mnemonic in LedgerAddress.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import { hdLedger } from &quot;@polkadot/util-crypto&quot;;&#xD;&#xA;import { u8aToHex } from &quot;@polkadot/util&quot;;&#xD;&#xA;import Keyring from &quot;@polkadot/keyring&quot;;&#xD;&#xA;const keyring = new Keyring();&#xD;&#xA;keyring.setSS58Format(0);&#xD;&#xA;function getSuri(seed, derivePath, pairType) {&#xD;&#xA;  return pairType === &quot;ed25519-ledger&quot;&#xD;&#xA;    ? u8aToHex(hdLedger(seed, derivePath).secretKey.slice(0, 32))&#xD;&#xA;    : pairType === &quot;ethereum&quot;&#xD;&#xA;    ? `${seed}/${derivePath}`&#xD;&#xA;    : `${seed}${derivePath}`;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;function addressFromSeed(seed, derivePath, pairType) {&#xD;&#xA;  return keyring.createFromUri(&#xD;&#xA;    getSuri(seed, derivePath, pairType),&#xD;&#xA;    {},&#xD;&#xA;    pairType === &quot;ed25519-ledger&quot; ? &quot;ed25519&quot; : pairType&#xD;&#xA;  ).address;&#xD;&#xA;}&#xD;&#xA;const Polkadot_Path = &quot;m/44'/354'/0'/0/0&quot;;&#xD;&#xA;const Phase =&#xD;&#xA;  &quot;tilt wise rent open chunk wheel tonight army meat virus rule catch hospital nurse verb pretty guide cook illegal spell honey obscure desk brick&quot;;&#xD;&#xA;console.log(&quot;Target: &quot;, addressFromSeed(Phase, Polkadot_Path, &quot;ed25519-ledger&quot;));&#xD;&#xA;function hexStrToByteArr(hexStr) {&#xD;&#xA;  hexStr = hexStr.replace(/ /g, &quot;&quot;);&#xD;&#xA;&#xD;&#xA;  if (hexStr.slice(0, 2).toLowerCase() === &quot;0x&quot;) hexStr = hexStr.slice(2, hexStr.length);&#xD;&#xA;  const bin = [];&#xD;&#xA;  let i;&#xD;&#xA;  let c;&#xD;&#xA;  let isEmpty = 1;&#xD;&#xA;  let buffer;&#xD;&#xA;  for (i = 0; i &lt; hexStr.length; i++) {&#xD;&#xA;    c = hexStr.charCodeAt(i);&#xD;&#xA;    if ((c &gt; 47 &amp;&amp; c &lt; 58) || (c &gt; 64 &amp;&amp; c &lt; 71) || (c &gt; 96 &amp;&amp; c &lt; 103)) {&#xD;&#xA;      buffer = (buffer &lt;&lt; 4) ^ ((c &gt; 64 ? c + 9 : c) &amp; 15);&#xD;&#xA;      if ((isEmpty ^= 1)) {&#xD;&#xA;        bin.push(buffer &amp; 0xff);&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;  return bin;&#xD;&#xA;}&#xD;&#xA;const masterKey = &quot;32fc49249c9d192d1c2aa94c629b4d6fb9deb80165e9a1844bfd3894724d5dee&quot;;&#xD;&#xA;const masterToUint8 = new Uint8Array(hexStrToByteArr(masterKey));&#xD;&#xA;&#xD;&#xA;const result = keyring.addFromSeed(masterToUint8);&#xD;&#xA;console.log(&quot;result: &quot;, result.address);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The master key was created using `PBKDF2` and `bip32.fromSeed`.&#xD;&#xA;&#xD;&#xA;The problem is that the target log and result log are different. I don't understand why this is happening and how to fix it." ContentLicense="CC BY-SA 4.0" />
  <row Id="36913" PostHistoryTypeId="24" PostId="9219" RevisionGUID="7d0cddcb-8038-4ace-af93-0f1473978727" CreationDate="2023-07-17T20:46:37.107" Comment="Proposed by 116 approved by 2762, 94 edit id of 495" ContentLicense="CC BY-SA 4.0" />
  <row Id="36914" PostHistoryTypeId="5" PostId="9274" RevisionGUID="f4a45e42-9b88-491a-93e0-8d1ed5653575" CreationDate="2023-07-17T20:46:53.240" UserId="3136" Comment="modify in body" Text="Hi i have cloned the `node-template` and also added the pallet-contract in it, now i want to know that how can i deploy a smart contract on my chain i have also deployed it on `EC2` instance but i want to know how can i deploy and write smart contract on my chain network. Can someone guide me on this." ContentLicense="CC BY-SA 4.0" />
  <row Id="36915" PostHistoryTypeId="24" PostId="9274" RevisionGUID="f4a45e42-9b88-491a-93e0-8d1ed5653575" CreationDate="2023-07-17T20:46:53.240" Comment="Proposed by 3136 approved by 3317, 94 edit id of 499" ContentLicense="CC BY-SA 4.0" />
  <row Id="36916" PostHistoryTypeId="5" PostId="5410" RevisionGUID="a54bbc33-1bd3-49d2-9dcf-42281290a905" CreationDate="2023-07-17T20:47:07.497" UserId="354" Comment="improved formatting" Text="How to check the rate limits of concrete RPC?&#xD;&#xA;It works until some time and then starts throwing an error. I suspect it's the rate limits&#xD;&#xA;&#xD;&#xA;I connect to the remote node. For example `wss://acala-rpc.dwellir.com`.&#xD;&#xA;&#xD;&#xA;It is interesting that when this RPC throws an error, all `wss://*-rpc.dwellir.com` throws the same error. So looks like it's some generic mechanism.  I assume it simply bans by IP.&#xD;&#xA;&#xD;&#xA;With other remote RPC endpoints situation is the same.&#xD;&#xA;&#xD;&#xA;These 2 logs are consecutive:&#xD;&#xA;&#xD;&#xA;    2022-10-09 19:27:04          API-WS: disconnected from ws://127.0.0.1:9944: 1006:: connection failed&#xD;&#xA;    2022-10-09 19:27:04          API-WS: disconnected from wss://acala-rpc.dwellir.com: 1006:: connection failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="36917" PostHistoryTypeId="24" PostId="5410" RevisionGUID="a54bbc33-1bd3-49d2-9dcf-42281290a905" CreationDate="2023-07-17T20:47:07.497" Comment="Proposed by 354 approved by 2762, 94 edit id of 498" ContentLicense="CC BY-SA 4.0" />
  <row Id="36918" PostHistoryTypeId="5" PostId="9280" RevisionGUID="8d7502ab-503c-4d58-a711-d4d2a87c83ce" CreationDate="2023-07-17T20:47:25.750" UserId="354" Comment="improved formatting" Text="I am running a `Polkadot-Node` and have tried `--state-pruning 256` and `--pruning=1000` but I keep seing 5,000 sst files one month old that should have removed. &#xD;&#xA;&#xD;&#xA;256 or 1,000 blocks is less than one day so I should not see sst files from last month. Why is this?&#xD;&#xA;&#xD;&#xA;I also see many old log txt files.&#xD;&#xA;&#xD;&#xA;What is the correct way of setting the prunning in polkadot substrate node?&#xD;&#xA;&#xD;&#xA;Is it safe to manually remove the old sst files?&#xD;&#xA;&#xD;&#xA;Is it safe to manually remove the log txt files?&#xD;&#xA;&#xD;&#xA;Thank you&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="36919" PostHistoryTypeId="24" PostId="9280" RevisionGUID="8d7502ab-503c-4d58-a711-d4d2a87c83ce" CreationDate="2023-07-17T20:47:25.750" Comment="Proposed by 354 approved by 2762, 94 edit id of 497" ContentLicense="CC BY-SA 4.0" />
  <row Id="36920" PostHistoryTypeId="2" PostId="9297" RevisionGUID="15f450b4-2b45-4c6e-8a27-5b738d7967ab" CreationDate="2023-07-17T22:29:20.927" UserId="83" Text="&gt; 1. How to start node remotely and make it run even when I close the ssh panel.&#xD;&#xA;&#xD;&#xA;To start the node remotely then assuming you've already built the substrate-node-template in the folder /opt/substrate-node-template and assuming your username and IP address is `linuxuser@x.x.x.x` and that you've setup public key authentication for ssh (passwordless login) as described in [here](https://www.linode.com/docs/guides/use-public-key-authentication-with-ssh/)&#xD;&#xA;then you could run the following, which uses the steps mentioned [here](https://www.linuxtechi.com/execute-linux-commands-remote-system-over-ssh/) or to remotely run a shell script with executable permissions.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;ssh linuxuser@x.x.x.x &quot;cd /opt/substrate-node-template &amp;&amp; ./target/release/node-template --dev&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To make substrate-node-template run even when you close the ssh panel, run it as a Systemd process like they mention [here](https://docs.substrate.io/deploy/deployment-options/) under the &quot;Linux servers&quot; heading. The following guides are provided reference:&#xD;&#xA;* Use a Systemd service to run a Polkadot validator node by following [this](https://wiki.polkadot.network/docs/maintain-guides-how-to-systemd) guide&#xD;&#xA;* Use a Systemd service to run a Moonbeam collator node by following [this](https://docs.moonbeam.network/node-operators/networks/run-a-node/systemd/) guide.&#xD;&#xA;&#xD;&#xA;If you do not want to use a Systemd process then you could use the [`tmux`](https://github.com/tmux/tmux/wiki) program or the [`screen`](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-screen-on-an-ubuntu-cloud-server) program to run and detach from multiple sessions so they keep running.&#xD;&#xA;&#xD;&#xA;&gt; How to make frontend find the node? Because when I open the link somesite.com - it tries to connect the node all the time? and all the time gets an errors with no connections&#xD;&#xA;&#xD;&#xA;* Check that the substrate-node-template is actually running and configure the CLI options to securely expose it using the default ports or explicitly configure the port numbers to use with CLI options `--port`, `--rpc-port`, and `--ws-port`. Also check that you are running other CLI options like the following in a development environment only to expose it `--unsafe-ws-external`, `--unsafe-rpc-external`, `--rpc-cors=all`, `--rpc-methods=Unsafe`.&#xD;&#xA;* Configure your linux dedicated server firewall to accept connections on those ports&#xD;&#xA;* Check that you have updated your browser to the latest version and that you have disabled any browser plugins like [this](https://substrate.stackexchange.com/questions/5966/connecting-to-a-chain-on-ws-localhost-with-polkadot-js-app-fails-when-running) that may interfere with the connection&#xD;&#xA;* Check that your substrate-front-end-template is configured to try to connect to the substrate-node-template using the default or custom ports that you are using it with&#xD;&#xA;* Take a screenshot or copy/paste the error shown in the web browser console and share it with us here " ContentLicense="CC BY-SA 4.0" />
  <row Id="36922" PostHistoryTypeId="5" PostId="9291" RevisionGUID="0d2694da-7db5-47d2-a2e1-55253f60f19e" CreationDate="2023-07-17T22:32:01.853" UserId="83" Comment="provide links to templates that they mentioned. update tags to mention systemd" Text="I want to start my own blockchain. I try to start [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template) and [substrate-front-end-template](https://github.com/substrate-developer-hub/substrate-front-end-template) remotely, but there is guide instructions only for local machine. I installed and compiled node and frontend on linux dedicated server. The question is: &#xD;&#xA;1. How to start node remotely and make it run even when I close the ssh panel.&#xD;&#xA;2. How to make frontend find the node? Because when I open the link _somesite.com_ - it tries to connect the node all the time? and all the time gets an errors with no connections" ContentLicense="CC BY-SA 4.0" />
  <row Id="36923" PostHistoryTypeId="4" PostId="9291" RevisionGUID="0d2694da-7db5-47d2-a2e1-55253f60f19e" CreationDate="2023-07-17T22:32:01.853" UserId="83" Comment="provide links to templates that they mentioned. update tags to mention systemd" Text="How to start substrate-node-template and substrate-front-end-template remotely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36924" PostHistoryTypeId="6" PostId="9291" RevisionGUID="0d2694da-7db5-47d2-a2e1-55253f60f19e" CreationDate="2023-07-17T22:32:01.853" UserId="83" Comment="provide links to templates that they mentioned. update tags to mention systemd" Text="|substrate-node-template|substrate-front-end|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36925" PostHistoryTypeId="2" PostId="9298" RevisionGUID="c8263b37-2f26-4902-9996-4f38700f0131" CreationDate="2023-07-17T22:54:50.467" UserId="83" Text="In Solidity, if we get the `block.number` it returns type `uint256` (alias `uint`), so I use type `uint256` to store the block number in a Solidity contract.&#xD;&#xA;&#xD;&#xA;However, in ink! the equivalent `u256` is not allowed (as mentioned [here](https://use.ink/ink-vs-solidity#uint256)), as only up to `u128` is supported, and they suggest alternatives like using a wrapper around `[u64; 4]`.&#xD;&#xA;&#xD;&#xA;Based on [this question](https://substrate.stackexchange.com/questions/9140/usage-of-xvm-in-ink-smart-contract) it appears that ink! **cross-chain** contract calls using XVM and XCM as it is not yet supported, however in [the answer to this question](https://substrate.stackexchange.com/questions/8721/how-to-interact-between-a-smart-contract-written-in-solidity-from-a-smart-contra/8723#8723) they highlight it is possible to do **cross-contract** calls into a Solidity contract from an ink! contract and vice versa from an ink! contract to a Solidity contract too on the same chain. &#xD;&#xA;&#xD;&#xA;So if we made a **cross-contract** call on the same chain from an ink! contract to a function in a Solidity contract that fetched and returned the latest block number of type `uint256` value, what type should we store that as in the ink! contract where it gets returned to?&#xD;&#xA;&#xD;&#xA;Note that when dealing with Substrate-based chains we use `u32` as shown [here](https://github.com/paritytech/substrate/blob/master/bin/node/primitives/src/lib.rs#L30)." ContentLicense="CC BY-SA 4.0" />
  <row Id="36927" PostHistoryTypeId="1" PostId="9298" RevisionGUID="c8263b37-2f26-4902-9996-4f38700f0131" CreationDate="2023-07-17T22:54:50.467" UserId="83" Text="What type should an ink! contract use to store a `uint256` block number retrieved from a Solidity contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36928" PostHistoryTypeId="3" PostId="9298" RevisionGUID="c8263b37-2f26-4902-9996-4f38700f0131" CreationDate="2023-07-17T22:54:50.467" UserId="83" Text="|ink|cross-contract-call|blocknumber|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36933" PostHistoryTypeId="5" PostId="9286" RevisionGUID="6e1de997-057b-45ea-92c1-160eee85eaa9" CreationDate="2023-07-18T05:40:27.803" UserId="2844" Comment="added 107 characters in body; edited tags" Text="Let me give scenario, let's say:&#xD;&#xA;There are 2 types of playable characters&#xD;&#xA;&#xD;&#xA;- Chickens (90% chance to mint)&#xD;&#xA;- Foxes (10% chance to mint)&#xD;&#xA;&#xD;&#xA;and total supply is 15,000 units :&#xD;&#xA;- 13,500 chickens&#xD;&#xA;- 1,500 foxes&#xD;&#xA;&#xD;&#xA;**How to determine whether a Chicken or a Fox is minted?**&#xD;&#xA;&#xD;&#xA;*I guess random number generator is good for this but random function is not supported anymore by ink!*" ContentLicense="CC BY-SA 4.0" />
  <row Id="36934" PostHistoryTypeId="6" PostId="9286" RevisionGUID="6e1de997-057b-45ea-92c1-160eee85eaa9" CreationDate="2023-07-18T05:40:27.803" UserId="2844" Comment="added 107 characters in body; edited tags" Text="|ink|smart-contract|pallet-contracts|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36935" PostHistoryTypeId="2" PostId="9300" RevisionGUID="531cc788-1a75-49ba-bf5b-bfaeddcd051f" CreationDate="2023-07-18T05:43:22.320" UserId="3667" Text="For example, when specifying a `Multilocation` we could need to look up a `PalletInstance` for a particular pallet. In that case, besides looking at the source code, is there an easier call I can make via `apps` to find out what it is ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36937" PostHistoryTypeId="1" PostId="9300" RevisionGUID="531cc788-1a75-49ba-bf5b-bfaeddcd051f" CreationDate="2023-07-18T05:43:22.320" UserId="3667" Text="Is there a way to query for PalletId from polkadot-js apps?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36938" PostHistoryTypeId="3" PostId="9300" RevisionGUID="531cc788-1a75-49ba-bf5b-bfaeddcd051f" CreationDate="2023-07-18T05:43:22.320" UserId="3667" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36939" PostHistoryTypeId="2" PostId="9301" RevisionGUID="bf53dafd-5bdb-44a9-921a-f1e4d172abd7" CreationDate="2023-07-18T05:56:41.383" UserId="3136" Text="First of all [read][1] this . Here it's written that the pallet is not included by default if you use the substrate-parachain-template to build your node. To add the Sudo pallet, you must update the runtime/src/lib.rs and node/src/chain_spec.rs files. For the runtime, you can implement the configuration trait and modify the construct_runtime macro, similar to how you would add any other pallet. &#xD;&#xA;&#xD;&#xA;[Here][2] is the dependency of sudo . You need to add [this][3] in your runtime/lib.rs and after that you need to add sudo in the construct_runtime like [this][4]. In the last, you need to add [this][5] in the chain_spec.rs&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/open-message-passing-channels/&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/master/runtime/rococo/Cargo.toml#L67&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs#L1355&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs#L1480&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot/blob/master/node/service/src/chain_spec.rs#L1107" ContentLicense="CC BY-SA 4.0" />
  <row Id="36947" PostHistoryTypeId="2" PostId="9304" RevisionGUID="50778485-c825-4e60-ad4a-8fe7d2607db9" CreationDate="2023-07-18T07:02:27.970" UserId="2762" Text="Yes, you can query the [Constants using PolkadotJS][1]. &#xD;&#xA;&#xD;&#xA;See below an example to query the palletId for the treasury pallet in Polkadot (and the [docs][2]):&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;const palletId = api.consts.treasury.palletId;&#xD;&#xA;console.log(`${palletId.toHuman()} `);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/kusama/constants/&#xD;&#xA;  [2]: https://polkadot.js.org/docs/polkadot/constants/#palletid-framesupportpalletid-2" ContentLicense="CC BY-SA 4.0" />
  <row Id="36952" PostHistoryTypeId="2" PostId="9305" RevisionGUID="1f857ada-8fe8-4a9e-8ca2-acf8c7a578b1" CreationDate="2023-07-18T08:26:40.140" UserId="4443" Text="[![I encountered the below error**while simulating a network i got error /tmp/alice/chains/local_testnet/db/full&quot; did not exist.&#xD;&#xA;**&#xD;&#xA;.][1**strong text**]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eenKM.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36954" PostHistoryTypeId="1" PostId="9305" RevisionGUID="1f857ada-8fe8-4a9e-8ca2-acf8c7a578b1" CreationDate="2023-07-18T08:26:40.140" UserId="4443" Text="I got this error while doing simulating a network when building a blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="36955" PostHistoryTypeId="3" PostId="9305" RevisionGUID="1f857ada-8fe8-4a9e-8ca2-acf8c7a578b1" CreationDate="2023-07-18T08:26:40.140" UserId="4443" Text="|substrate-node-template|polkadot|substrate-node|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36956" PostHistoryTypeId="5" PostId="9305" RevisionGUID="e2ba8167-e1bf-4995-a4d6-673e34f2058f" CreationDate="2023-07-18T08:32:21.787" UserId="4443" Comment="added 121 characters in body" Text="[![I encountered the following error**while simulating a network when running the command ./target/release/node-template purge-chain --base-path /tmp/alice --chain local i got error indicating  /tmp/alice/chains/local_testnet/db/full&quot; did not exist.&#xD;&#xA;**&#xD;&#xA;.][1**strong text**]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eenKM.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36957" PostHistoryTypeId="2" PostId="9306" RevisionGUID="587e713b-5115-4eaa-b902-848ad1c06a55" CreationDate="2023-07-18T08:42:19.933" UserId="2762" Text="The `purge-chain` command is trying to remove the folder `/tmp/alice/chains/local_testnet/db/full` by default, and you don't have anything there.&#xD;&#xA;You can explore where are you keeping this data `cd tmp &amp;&amp; ls`&#xD;&#xA;&#xD;&#xA;When you have it you can indicate the path in the flag `--base-path` or delete the folder manually `rm -r path`  " ContentLicense="CC BY-SA 4.0" />
  <row Id="36959" PostHistoryTypeId="2" PostId="9307" RevisionGUID="47c90630-ad97-4e88-9a3c-7f9aa1a1a8d3" CreationDate="2023-07-18T09:06:58.963" UserId="458" Text="We recently attempted a runtime upgrade on our parachain testnet (wss://moonbeam-integration-parachain.polkadex.trade) and made some modifications to the validate_unsigned code, specifically eliminating the following section: https://github.com/Polkadex-Substrate/parachain/blob/zk-upgrade/pallets/thea-message-handler/src/lib.rs#L253-L287.&#xD;&#xA;&#xD;&#xA;However, despite the changes, we encounter the error referenced in https://github.com/Polkadex-Substrate/parachain/blob/zk-upgrade/pallets/thea-message-handler/src/lib.rs#L258 when sending an unsigned error post-upgrade. Interestingly, this error should no longer exist as its associated code has been removed.&#xD;&#xA;&#xD;&#xA;It's worth noting that we have updated the spec version in runtime, confirming that the runtime update was executed successfully.&#xD;&#xA;&#xD;&#xA;Could you suggest what might be preventing the successful implementation of our code upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36961" PostHistoryTypeId="1" PostId="9307" RevisionGUID="47c90630-ad97-4e88-9a3c-7f9aa1a1a8d3" CreationDate="2023-07-18T09:06:58.963" UserId="458" Text="Troubleshooting Persistent Error Following Parachain Runtime Upgrade Despite Code Modification" ContentLicense="CC BY-SA 4.0" />
  <row Id="36962" PostHistoryTypeId="3" PostId="9307" RevisionGUID="47c90630-ad97-4e88-9a3c-7f9aa1a1a8d3" CreationDate="2023-07-18T09:06:58.963" UserId="458" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36963" PostHistoryTypeId="2" PostId="9308" RevisionGUID="63ca89e5-4df0-4632-a000-f5910e99e532" CreationDate="2023-07-18T09:09:46.397" UserId="2713" Text="As a Substrate builder, I don't see any reason of still implementing custom RPCs as runtime API seems superior to me. So I was wondering about **any arguments for still adding custom RPCs to the client**. &#xD;&#xA;&#xD;&#xA;Runtime APIs come with many upsides:&#xD;&#xA;* Versioning support &#xD;&#xA;* Soon™️ part of metadata&#xD;&#xA;* Part of the runtime per definition, does not require node upgrades&#xD;&#xA;* Does not require applying a plurality of `serde` attribute rewiring to all RPC associated types such as &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(serde::Serialize, serde::Deserialize))]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, serde(bound = &quot;&quot;))]&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, serde(rename_all = &quot;camelCase&quot;))]`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-js/api/issues/5529#issuecomment-1465271895 sums up my wariness about RPCs:&#xD;&#xA;&#xD;&#xA;&gt; TL:DR It seems you are missing the #[serde(rename_all = &quot;camelCase&quot;)] attribute in your type - sadly this is just a standard that needs to be followed, since encoding enums different would make the world break (aka it is applied everywhere in Substrate, so the base JS API encoding for any enums follows that de-facto standard)&#xD;&#xA;&#xD;&#xA;&gt; PS: You are actually better off not doing RPCs and doing all via `decl_runtime` - lots of reasons, but basically the former cannot be supported on light clients and the former will never appear in the metadata, so it will always be manual (for the latter, both are on the radar for Substrate) and they are actually versioned, unlike RPCs where changing params is a nightmare." ContentLicense="CC BY-SA 4.0" />
  <row Id="36965" PostHistoryTypeId="1" PostId="9308" RevisionGUID="63ca89e5-4df0-4632-a000-f5910e99e532" CreationDate="2023-07-18T09:09:46.397" UserId="2713" Text="Custom RPC vs. runtime API" ContentLicense="CC BY-SA 4.0" />
  <row Id="36966" PostHistoryTypeId="3" PostId="9308" RevisionGUID="63ca89e5-4df0-4632-a000-f5910e99e532" CreationDate="2023-07-18T09:09:46.397" UserId="2713" Text="|polkadot-js|rpc|custom-rpc|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36967" PostHistoryTypeId="5" PostId="9307" RevisionGUID="f37404cb-f2f6-4f7e-950c-8e0eb3f2c056" CreationDate="2023-07-18T09:24:53.847" UserId="458" Comment="added 21 characters in body" Text="We recently attempted a runtime upgrade on our parachain testnet (wss://moonbeam-integration-parachain.polkadex.trade) and made some modifications to the validate_unsigned code, specifically eliminating the following section: https://github.com/Polkadex-Substrate/parachain/blob/zk-upgrade/pallets/thea-message-handler/src/lib.rs#L253-L287.&#xD;&#xA;&#xD;&#xA;However, despite the changes, we encounter the error referenced in https://github.com/Polkadex-Substrate/parachain/blob/zk-upgrade/pallets/thea-message-handler/src/lib.rs#L258 when sending usigned transaction using subxt client post-upgrade. Interestingly, this error should no longer exist as its associated code has been removed.&#xD;&#xA;&#xD;&#xA;It's worth noting that we have updated the spec version in runtime, confirming that the runtime update was executed successfully.&#xD;&#xA;&#xD;&#xA;Could you suggest what might be preventing the successful implementation of our code upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36968" PostHistoryTypeId="5" PostId="9306" RevisionGUID="0420fec8-b6e9-47c5-ba09-d0789738a06d" CreationDate="2023-07-18T09:35:36.140" UserId="2762" Comment="added 546 characters in body" Text="The `purge-chain` command is trying to remove the folder `/tmp/alice/chains/local_testnet/db/full` by default, and you don't have anything there.&#xD;&#xA;You can explore where are you keeping this data `cd tmp &amp;&amp; ls`&#xD;&#xA;&#xD;&#xA;When you have it you can indicate the path in the flag `--base-path` or delete the folder manually `rm -r path`  &#xD;&#xA;&#xD;&#xA;In case you are running the node with the flag `--tmp` it uses temporary storage and deletes the folder when you stop the chain, which means when you manually go to purge the data, the data has been already deleted.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--tmp: Use temporary storage for chain data (the chain state is deleted on exit)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `--dev` flag also set the `--tmp` flag&#xD;&#xA;```&#xD;&#xA;--dev&#xD;&#xA;          Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="36969" PostHistoryTypeId="2" PostId="9309" RevisionGUID="0956b413-1485-43c8-ae09-2e22afa10c72" CreationDate="2023-07-18T12:32:42.057" UserId="3667" Text="Is `cumulus_pallet_xcmp_queue` just an implementation for `HRMP` (relayed messages b/w sibling parachain) or is it the actual implementation of `XCMP` (Direct p2p messages b/w sibling parachains) ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="36971" PostHistoryTypeId="1" PostId="9309" RevisionGUID="0956b413-1485-43c8-ae09-2e22afa10c72" CreationDate="2023-07-18T12:32:42.057" UserId="3667" Text="How does XCMP Queue work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36972" PostHistoryTypeId="3" PostId="9309" RevisionGUID="0956b413-1485-43c8-ae09-2e22afa10c72" CreationDate="2023-07-18T12:32:42.057" UserId="3667" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36973" PostHistoryTypeId="2" PostId="9310" RevisionGUID="09f71e18-e751-46e6-93cc-9f103fb5e982" CreationDate="2023-07-18T14:09:02.827" UserId="83" Text="Generate the random number between 1 and 15,000 based on a future block hash then if the random number is in the first 10% of values in that range then you could determine that a Chicken was minted, whereas if the random number is in the remaining 90% of that range then you could determine that a Fox was minted. " ContentLicense="CC BY-SA 4.0" />
  <row Id="36975" PostHistoryTypeId="5" PostId="9307" RevisionGUID="fdec02f2-9729-4151-aef1-20d32334098d" CreationDate="2023-07-18T14:32:42.507" UserId="354" Comment="improved formatting" Text="We recently attempted a runtime upgrade on our parachain testnet (`wss://moonbeam-integration-parachain.polkadex.trade`) and made some modifications to the `validate_unsigned` code, specifically eliminating the following section: https://github.com/Polkadex-Substrate/parachain/blob/zk-upgrade/pallets/thea-message-handler/src/lib.rs#L253-L287.&#xD;&#xA;&#xD;&#xA;However, despite the changes, we encounter the error referenced in https://github.com/Polkadex-Substrate/parachain/blob/zk-upgrade/pallets/thea-message-handler/src/lib.rs#L258 when sending usigned transaction using `subxt` client post-upgrade. Interestingly, this error should no longer exist as its associated code has been removed.&#xD;&#xA;&#xD;&#xA;It's worth noting that we have updated the spec version in runtime, confirming that the runtime update was executed successfully.&#xD;&#xA;&#xD;&#xA;Could you suggest what might be preventing the successful implementation of our code upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36976" PostHistoryTypeId="24" PostId="9307" RevisionGUID="fdec02f2-9729-4151-aef1-20d32334098d" CreationDate="2023-07-18T14:32:42.507" Comment="Proposed by 354 approved by 29 edit id of 503" ContentLicense="CC BY-SA 4.0" />
  <row Id="36977" PostHistoryTypeId="2" PostId="9311" RevisionGUID="6859687b-3f35-48d0-a412-8365255a9e3c" CreationDate="2023-07-18T16:26:33.573" UserId="4068" Text="Can someone please explain these concepts in a simplified manner and highlight their key distinctions? I would greatly appreciate any help in clarifying these concepts.&#xD;&#xA;&#xD;&#xA;I'm relatively new to Substrate and I'm finding it challenging to grasp the concepts of runtime calls, RPC calls, and extrinsics. I've been reading the Substrate documentation, but I still have some confusion regarding these terms and their differences.&#xD;&#xA;&#xD;&#xA;From what I understand, runtime calls are functions or methods defined within the runtime of a Substrate-based blockchain. They play a crucial role in executing the blockchain's functionalities and interacting with its state. However, I'm unsure about how they differ from RPC calls and extrinsics.&#xD;&#xA;&#xD;&#xA;Extrinsics, as far as I know, are transactions or actions submitted to the blockchain by users or external entities. They package runtime calls along with additional information such as the sender's account, signature, and other transaction-specific details. When included in a block, these extrinsics trigger the execution of their associated runtime calls, resulting in modifications to the blockchain's state.&#xD;&#xA;&#xD;&#xA;On the other hand, I've come across the term RPC calls, which appear to be a way for external entities (clients, services, etc.) to interact with a Substrate-based blockchain. From what I gather, RPC calls enable querying or invoking specific functionalities of the blockchain without necessarily submitting a full extrinsic. I believe they are primarily used for off-chain interactions and retrieving on-chain data.&#xD;&#xA;&#xD;&#xA;I would greatly appreciate it if someone could provide a simplified explanation of these concepts and help me understand their key differences. How do runtime calls, RPC calls, and extrinsics relate to each other? When should I use one over the other? Clearing up these concepts would greatly enhance my understanding of Substrate. Thank you in advance for any assistance you can provide!&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3BfkA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36979" PostHistoryTypeId="1" PostId="9311" RevisionGUID="6859687b-3f35-48d0-a412-8365255a9e3c" CreationDate="2023-07-18T16:26:33.573" UserId="4068" Text="I'm struggling to understand the concept of runtime calls, RPC calls, and extrinsics in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="36980" PostHistoryTypeId="3" PostId="9311" RevisionGUID="6859687b-3f35-48d0-a412-8365255a9e3c" CreationDate="2023-07-18T16:26:33.573" UserId="4068" Text="|extrinsic|substrateinterface|runtime-api|rpc-server|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36981" PostHistoryTypeId="2" PostId="9312" RevisionGUID="c282fe66-4a86-4e3b-a657-c9cebfe99931" CreationDate="2023-07-18T16:59:34.780" UserId="4445" Text="I got the same issue, `rustup default stable` solved it&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="36983" PostHistoryTypeId="2" PostId="9313" RevisionGUID="0b5928a6-7184-4981-8145-38670b11791d" CreationDate="2023-07-18T17:26:50.707" UserId="4068" Text="In the Substrate documentation, I came across a statement stating that at the beginning of a new block, the System pallet automatically removes all events that were stored from the previous block. However, I have observed that I can still fetch historical block events despite this automatic removal. I am seeking clarification on this concept.&#xD;&#xA;&#xD;&#xA;Here is the screenshot of the relevant section from the documentation: [![enter image description here][1]][1]&#xD;&#xA;I would like to understand how it is possible to retrieve historical block events even after the System pallet has supposedly cleared them. Is there something I am missing or misunderstanding?&#xD;&#xA;&#xD;&#xA;Can anyone provide an explanation of the mechanism behind this behavior? Are there any factors that affect the persistence of historical block events despite the automatic removal by the System pallet?&#xD;&#xA;&#xD;&#xA;I would greatly appreciate any insights, explanations, or examples that can help clarify this concept.&#xD;&#xA;&#xD;&#xA;Thank you for your assistance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/u8N94.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36985" PostHistoryTypeId="1" PostId="9313" RevisionGUID="0b5928a6-7184-4981-8145-38670b11791d" CreationDate="2023-07-18T17:26:50.707" UserId="4068" Text="Understanding the persistence of historical block events despite automatic removal by the System pallet in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="36986" PostHistoryTypeId="3" PostId="9313" RevisionGUID="0b5928a6-7184-4981-8145-38670b11791d" CreationDate="2023-07-18T17:26:50.707" UserId="4068" Text="|substrate-node|polkadot-js-extension|polkascan|blockchain-events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36987" PostHistoryTypeId="2" PostId="9314" RevisionGUID="285d61bd-b02e-4b4f-b45f-ace6024cee79" CreationDate="2023-07-18T17:50:16.030" UserId="2844" Text="   When using this one, I get `BadOrigin` as in screenshot,&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;    type ApproveOrigin = EitherOfDiverse&lt;&#xD;&#xA;        	EnsureRoot&lt;AccountId&gt;,&#xD;&#xA;        	pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 3, 5&gt;,&#xD;&#xA;        &gt;;&#xD;&#xA;&#xD;&#xA;vs&#xD;&#xA;&#xD;&#xA;and when using this one transaction successfully executed. &#xD;&#xA;&#xD;&#xA;    type ApproveOrigin = EnsureSigned&lt;AccountId&gt;;&#xD;&#xA;&#xD;&#xA;Can someone please tell me difference between using two of them inside pallet config?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GUQiq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36989" PostHistoryTypeId="1" PostId="9314" RevisionGUID="285d61bd-b02e-4b4f-b45f-ace6024cee79" CreationDate="2023-07-18T17:50:16.030" UserId="2844" Text="Difference between EitherOfDiverse vs EnsureSigned inside pallet config?" ContentLicense="CC BY-SA 4.0" />
  <row Id="36990" PostHistoryTypeId="3" PostId="9314" RevisionGUID="285d61bd-b02e-4b4f-b45f-ace6024cee79" CreationDate="2023-07-18T17:50:16.030" UserId="2844" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="36991" PostHistoryTypeId="2" PostId="9315" RevisionGUID="0d543c9d-0bef-4a2c-9663-4736e8b04778" CreationDate="2023-07-18T17:54:09.387" UserId="4446" Text="Yes, you can still fetch and access the events emitted in previous blocks, even though they are automatically removed from the storage of the System pallet at the beginning of a new block.&#xD;&#xA;&#xD;&#xA;In Substrate blockchains, events are typically stored in the transaction receipts of each block. Transaction receipts contain information about the execution of transactions, including any events emitted during the transaction's execution.&#xD;&#xA;&#xD;&#xA;The behaviour of automatically removing events from the storage of the System pallet at the beginning of a new block is designed to ensure efficiency, reduce storage bloat, and maintain a clear separation between different blocks' state data.&#xD;&#xA;&#xD;&#xA;While events are removed from the System pallet's storage, it's important to remember that they are still recorded in the blockchain's transaction receipts for each block. This means that even though they are not directly accessible through the System pallet's storage, they are still available in the blockchain's history and can be retrieved through other means." ContentLicense="CC BY-SA 4.0" />
  <row Id="36993" PostHistoryTypeId="2" PostId="9316" RevisionGUID="07068f2a-e981-4584-82c8-aeb2bd81d280" CreationDate="2023-07-18T18:25:42.383" UserId="474" Text="A blockchain is basically a database whose current state depends entirely on the data within the blocks. Each block contains a bunch of transactions*, and so the only way for a user to update the database state is by submitting a transaction.&#xD;&#xA;&#xD;&#xA;**So what is a transaction?** A transaction basically represents a function call which has some effect on the state of the database. If I submit a transaction which says &quot;transfer 10 tokens to Alice&quot; which is then included in a block, then the state of the database at that block will reflect the fact that Alice has 10 more tokens and I have 10 less.&#xD;&#xA;&#xD;&#xA;**But which function calls/transactions can you make?** Well, Substrate has this notion of &quot;pallets&quot;. Each pallet basically defines a set of transactions (function calls) that it can execute, as well as some storage that may be modified as a result of executing the transactions. Ultimately, a Substrate based blockchain is just a node that runs some set of pallets which provide functions like &quot;balances.transfer(to, amount)&quot; and storage like &quot;user Alice has balance 10,000&quot;. You can submit transactions, and query storage (among other things).&#xD;&#xA;&#xD;&#xA;**Ok, so how do you query storage or submit a transaction?** Well, much like most Web2 services, Substrate based nodes (or light clients) expose a web API to allow users to interact with them. This API is exposed via HTTP and WebSockets, and uses a protocol called JSON-RPC (basically, you can submit JSON requests to the node which contain a method name and some parameters). Sometimes we just call this the **RPC API**. There exists an RPC method to allow people to submit transactions to a node, and another which allows people to query for the current state of some storage entries in a node, among other things.&#xD;&#xA;&#xD;&#xA;**But what about runtime calls?** Well, pallets provide some flexibility in defining which transactions/storage a node can understand/provide. These pallets are all compiled to a WASM runtime which the node will execute, and the really cool thing about this is that the WASM which the node will execute can be upgraded (by submitting a transaction!) to alter/extend the behaviour of the chain without requiring node operators to update their binaries. Well, runtime calls are also compiled into this WASM runtime, and provide an API for you to call into this runtime to ask various things. When the runtime is updated, the runtime API's might also change.&#xD;&#xA;&#xD;&#xA;**Runtime calls vs RPC calls??** So, the JSON-RPC API provides a way to submit transactions, ask for storage values, call into runtime APIs and a bunch of other stuff. It is baked into the node binary, and is the same regardless of which pallets/runtime a node is running. Runtime API calls are upgradable, depend on the specific WASM runtime that the node is currently running, and can be queried via an RPC call. &#xD;&#xA;&#xD;&#xA;\* actually &quot;extrinsics&quot;, which are either &quot;transactions&quot; (things submitted by users) or &quot;inherents&quot; (things added by the node itself)." ContentLicense="CC BY-SA 4.0" />
  <row Id="36996" PostHistoryTypeId="2" PostId="9317" RevisionGUID="c75b8528-4870-4708-9784-aa22af25428e" CreationDate="2023-07-18T19:43:59.107" UserId="4081" Text="Both are different in which origin can call a specific function, in this case for the pallet_treasury is who can approve. [Here's an example in the pallet_treasury][1]&#xD;&#xA;&#xD;&#xA;[EnsureSigned][2] only checks that the origin that is calling this function signed the message, so in this case if `ApproveOrigin = EnsureSigned&lt;AccountId&gt;` then anyone that sends a signed extrinsic could call this function. &#xD;&#xA;&#xD;&#xA;Now [EitherOfDiverse&lt;L,R&gt;][3] works basically like an OR gate, meaning that this function can be called by either L or R, in the example you gave it would be either a root account (`EnsureRoot&lt;AccountId&gt;`) or by the council collective with a proportion equal or higher than 3/5 (`pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 3, 5&gt;`). This means that not anyone can call this function only the origin that meets either of those 2 requirements.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/src/pallet_treasury/lib.rs.html#386&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/frame_system/struct.EnsureSigned.html&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/frame_support/traits/struct.EitherOfDiverse.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="36998" PostHistoryTypeId="5" PostId="9305" RevisionGUID="5eb2e94e-8a5f-4052-bbf9-01844544a583" CreationDate="2023-07-18T19:48:29.510" UserId="28" Comment="added 30 characters in body" Text="I encountered the following error while simulating a network when running the command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template purge-chain --base-path /tmp/alice --chain local&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;i got error indicating `/tmp/alice/chains/local_testnet/db/full` did not exist.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;![https://i.stack.imgur.com/eenKM.png][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eenKM.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="36999" PostHistoryTypeId="2" PostId="9318" RevisionGUID="264e4e6b-1b46-4647-9120-41f7ab5e3f54" CreationDate="2023-07-18T20:43:21.773" UserId="4448" Text="I am deploying a ink! smart contract to local network, but when I tried to call any function from it i have this error:&#xD;&#xA;&#xD;&#xA;{ Err: { Module: { index: '8', error: '0x02000000' } } }&#xD;&#xA;&#xD;&#xA;any idea what is the error and why ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37001" PostHistoryTypeId="1" PostId="9318" RevisionGUID="264e4e6b-1b46-4647-9120-41f7ab5e3f54" CreationDate="2023-07-18T20:43:21.773" UserId="4448" Text="Ink Smart Contract call Error" ContentLicense="CC BY-SA 4.0" />
  <row Id="37002" PostHistoryTypeId="3" PostId="9318" RevisionGUID="264e4e6b-1b46-4647-9120-41f7ab5e3f54" CreationDate="2023-07-18T20:43:21.773" UserId="4448" Text="|smart-contract|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37003" PostHistoryTypeId="2" PostId="9319" RevisionGUID="a877b967-6a8b-404b-ada7-702b64a3ee73" CreationDate="2023-07-19T02:16:02.653" UserId="4342" Text="any guidance on how to call my psp22 approve function from the front end ? This is currently how I'm doing it but it doesn't seem to give increased allowance (although its successful) : &#xD;&#xA;&#xD;&#xA;     const formattedAmount = new BN(amount).mul(new BN(10).pow(new BN(12)));&#xD;&#xA;     let Contract = new ContractPromise(api, abi_psp22, tokenAddress);&#xD;&#xA;     Contract.tx['psp22::approve'](tokensAddress, SpenderContractAddress, formattedAmount)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but the allowance remains at 0 when I check afterwards." ContentLicense="CC BY-SA 4.0" />
  <row Id="37005" PostHistoryTypeId="1" PostId="9319" RevisionGUID="a877b967-6a8b-404b-ada7-702b64a3ee73" CreationDate="2023-07-19T02:16:02.653" UserId="4342" Text="How to call PSP22::approve function from Frontend" ContentLicense="CC BY-SA 4.0" />
  <row Id="37006" PostHistoryTypeId="3" PostId="9319" RevisionGUID="a877b967-6a8b-404b-ada7-702b64a3ee73" CreationDate="2023-07-19T02:16:02.653" UserId="4342" Text="|polkadot-js|ink|rust|token|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37007" PostHistoryTypeId="2" PostId="9320" RevisionGUID="df561205-fe7b-4b15-84d1-1b3373642b52" CreationDate="2023-07-19T04:31:58.710" UserId="139" Text="The reason you're getting the `BadOrigin` error when sigining it as `Alice` is because you're not dispatching this call via `sudo` under the `Developer` tab. This is needed by polkadot-js to correctly craft a wrapped extrinsic. &#xD;&#xA;&#xD;&#xA;The sudo call wraps a extrinsic and the sudo call itself must be signed by the superuser in order to pass the check for `ensure_root(origin)` in the pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="37009" PostHistoryTypeId="5" PostId="9307" RevisionGUID="60412814-d37b-42e6-a78b-c87bb66a4291" CreationDate="2023-07-19T04:46:25.720" UserId="458" Comment="added 100 characters in body" Text="We recently attempted a runtime upgrade on our parachain testnet (`wss://moonbeam-integration-parachain.polkadex.trade`) and made some modifications to the `validate_unsigned` code, specifically eliminating the following section: https://github.com/Polkadex-Substrate/parachain/blob/zk-upgrade/pallets/thea-message-handler/src/lib.rs#L253-L287.&#xD;&#xA;&#xD;&#xA;However, despite the changes, we encounter the error referenced in https://github.com/Polkadex-Substrate/parachain/blob/zk-upgrade/pallets/thea-message-handler/src/lib.rs#L265 when sending usigned transaction using `subxt` client post-upgrade. Interestingly, this error should no longer exist as its associated code has been removed.&#xD;&#xA;&#xD;&#xA;It's worth noting that we have updated the spec version in runtime, confirming that the runtime update was executed successfully.&#xD;&#xA;&#xD;&#xA;Could you suggest what might be preventing the successful implementation of our code upgrade?&#xD;&#xA;&#xD;&#xA;Error:-&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CFXrX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37010" PostHistoryTypeId="5" PostId="9319" RevisionGUID="c58f7c95-f740-4c67-8f17-c53ebe1e1756" CreationDate="2023-07-19T04:59:05.010" UserId="4342" Comment="added 63 characters in body" Text="Any guidance on how to call my psp22 approve function from the front end ? This is currently how I'm doing it but it doesn't seem to give increased allowance (although its successful) : &#xD;&#xA;&#xD;&#xA;     const formattedAmount = new BN(amount).mul(new BN(10).pow(new BN(12)));&#xD;&#xA;     let Contract = new ContractPromise(api, abi_psp22, tokenAddress);&#xD;&#xA;     Contract.tx['psp22::approve'](tokensAddress, SpenderContractAddress, formattedAmount)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but the allowance remains at 0 when I check afterwards.&#xD;&#xA;&#xD;&#xA;**PS : Iam using polkadot.js package for the interactions**" ContentLicense="CC BY-SA 4.0" />
  <row Id="37011" PostHistoryTypeId="2" PostId="9321" RevisionGUID="007045d8-6cb4-4355-9edd-f441c7de9478" CreationDate="2023-07-19T06:55:07.437" UserId="4113" Text="I am trying to implement EIP-2612 permit functionality in my psp22 contract.&#xD;&#xA;https://github.com/ethereum/EIPs/blob/8a34d644aacf0f9f8f00815307fd7dd5da07655f/EIPS/eip-2612.md&#xD;&#xA;&#xD;&#xA;But not sure how to do it.&#xD;&#xA;Is there anybody have tried this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37013" PostHistoryTypeId="1" PostId="9321" RevisionGUID="007045d8-6cb4-4355-9edd-f441c7de9478" CreationDate="2023-07-19T06:55:07.437" UserId="4113" Text="How to implement EIP-2612 permit in rust !ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="37014" PostHistoryTypeId="3" PostId="9321" RevisionGUID="007045d8-6cb4-4355-9edd-f441c7de9478" CreationDate="2023-07-19T06:55:07.437" UserId="4113" Text="|ink|smart-contract|features|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37015" PostHistoryTypeId="2" PostId="9322" RevisionGUID="75663fa7-d018-4bf8-86aa-0b05a642bdb2" CreationDate="2023-07-19T07:30:45.823" UserId="4449" Text="Basically yes, we are this is one of the [upcoming features of Openbrush][1]&#xD;&#xA;But, it's currently WIP, and we are waiting for merging [this PR][2], also is you want to use ecdsa approach you can check the following link [click][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Brushfam/openbrush-contracts/pull/109&#xD;&#xA;  [2]: https://github.com/paritytech/ink/pull/1840&#xD;&#xA;  [3]: https://github.com/swanky-dapps/meta-transaction/blob/009a6784e77dee19bad2aeb2d34e632ad40abd5f/contracts/forwarder/lib.rs#L117" ContentLicense="CC BY-SA 4.0" />
  <row Id="37017" PostHistoryTypeId="2" PostId="9323" RevisionGUID="ce6566c4-f9a3-4fd9-b7d3-97013f7daa85" CreationDate="2023-07-19T07:35:07.373" UserId="4449" Text="it looks like you're not using `await`, you can also check how we've implemented it in the [typechain-polkadot][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Brushfam/typechain-polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="37019" PostHistoryTypeId="2" PostId="9324" RevisionGUID="0b52894a-9d90-4a07-98af-a6e422d28823" CreationDate="2023-07-19T07:38:12.387" UserId="4449" Text="You can dry-run the transaction and receive more human-friendly errors, as far as I remember using https://contracts-ui.substrate.io/ you will always see dry-run result before submitting the tx" ContentLicense="CC BY-SA 4.0" />
  <row Id="37021" PostHistoryTypeId="50" PostId="8736" RevisionGUID="c8040af2-4b13-40d9-b6dc-81ba8c1c3671" CreationDate="2023-07-19T08:04:40.733" UserId="-1" />
  <row Id="37022" PostHistoryTypeId="2" PostId="9325" RevisionGUID="1026bee6-8c6a-475f-a0b7-b627959b6f2a" CreationDate="2023-07-19T08:33:51.193" UserId="567" Text="In ink! you can use `self.env().block_number()` or `Self::env().block_number()` in the constructor.&#xD;&#xA;&#xD;&#xA;If you want to use XVM (only available in Shibuya) and query an solidity contract, you can deploy a solidity contract that returns the block number and call it like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                // get selector of the function from metadata&#xD;&#xA;                const SELECTOR: [u8; 4] = hex![&quot;18160ddd&quot;];&#xD;&#xA;    &#xD;&#xA;                let mut encoded = SELECTOR.to_vec();&#xD;&#xA;                let input = [];&#xD;&#xA;                encoded.extend(&amp;ethabi::encode(&amp;input));&#xD;&#xA;    &#xD;&#xA;                let result = self.env().extension().xvm_call(&#xD;&#xA;                    super::EVM_ID,&#xD;&#xA;                    Vec::from(self.evm_address.as_ref()),&#xD;&#xA;                    encoded,&#xD;&#xA;                );&#xD;&#xA;    &#xD;&#xA;                ink::env::debug_println!(&quot;xvm_call result: {:?}&quot;, result);&#xD;&#xA;    &#xD;&#xA;                if let Ok([Token::Uint(int)]) = ethabi::decode(&#xD;&#xA;                    &amp;[ethabi::ParamType::Uint(256)],&#xD;&#xA;                    &amp;result.expect(&quot;xvm_call failed&quot;),&#xD;&#xA;                )&#xD;&#xA;                .as_deref()&#xD;&#xA;                {&#xD;&#xA;                    int.as_u128()&#xD;&#xA;                } else {&#xD;&#xA;                    panic!(&quot;failed to decode xvm_call result&quot;)&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;Source:&#xD;&#xA;https://github.com/AstarNetwork/ink-xvm-sdk/blob/18944607edb83a61e9a016eb588c5ee0804f2c70/contracts/erc20/lib.rs#L53&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37024" PostHistoryTypeId="2" PostId="9326" RevisionGUID="0041ac56-b2af-4f0d-9c3a-e4b77eef7e9f" CreationDate="2023-07-19T09:19:13.073" UserId="632" Text="Hello we are using frontier, and we would like to remove gas fees for all evm transactons, I tried many things, but didn't achieve..&#xD;&#xA;I still need to pass gas when I sign and send a transaction : &#xD;&#xA;&#xD;&#xA;    await web3.eth.accounts.signTransaction({&#xD;&#xA;                data: ERC20_BYTECODES,&#xD;&#xA;                gasPrice: 1,&#xD;&#xA;                gas: 118196,&#xD;&#xA;                value: 0,&#xD;&#xA;            }, newAccountPrivateKey)&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37026" PostHistoryTypeId="1" PostId="9326" RevisionGUID="0041ac56-b2af-4f0d-9c3a-e4b77eef7e9f" CreationDate="2023-07-19T09:19:13.073" UserId="632" Text="Frontier &amp; Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="37027" PostHistoryTypeId="3" PostId="9326" RevisionGUID="0041ac56-b2af-4f0d-9c3a-e4b77eef7e9f" CreationDate="2023-07-19T09:19:13.073" UserId="632" Text="|evm|frontier|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37028" PostHistoryTypeId="5" PostId="9291" RevisionGUID="ea5c425a-270f-4662-9517-7e3f64240171" CreationDate="2023-07-19T09:20:33.620" UserId="4440" Comment="added 121 characters in body" Text="I want to start my own blockchain. I try to start [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template) and [substrate-front-end-template](https://github.com/substrate-developer-hub/substrate-front-end-template) remotely, but there is guide instructions only for local machine. I installed and compiled node and frontend on linux dedicated server. The question is: &#xD;&#xA;1. How to start node remotely and make it run even when I close the ssh panel.&#xD;&#xA;2. How to make frontend find the node? Because when I open the link _somesite.com_ - it tries to connect the node all the time? and all the time gets an errors with no connections.&lt;br&gt;&#xD;&#xA;Frontend error: &lt;br&gt;&#xD;&#xA;&amp;nbsp;&amp;nbsp;&amp;nbsp; **Error Connecting to Substrate&lt;br&gt;&#xD;&#xA;&amp;nbsp;&amp;nbsp;&amp;nbsp; Connection to websocket 'wss://127.0.0.1:9944/' failed.**" ContentLicense="CC BY-SA 4.0" />
  <row Id="37029" PostHistoryTypeId="5" PostId="9316" RevisionGUID="8011518d-c373-4999-93a7-838e6d9551a9" CreationDate="2023-07-19T09:27:25.823" UserId="474" Comment="added 73 characters in body" Text="A blockchain is basically a database whose current state depends entirely on the data within the blocks. Each block contains a bunch of transactions*, and so the only way for a user to update the database state is by submitting a transaction.&#xD;&#xA;&#xD;&#xA;**So what is a transaction?** A transaction basically represents a function call which has some effect on the state of the database. If I submit a transaction which says &quot;transfer 10 tokens to Alice&quot; which is then included in a block, then the state of the database at that block will reflect the fact that Alice has 10 more tokens and I have 10 less.&#xD;&#xA;&#xD;&#xA;**But which function calls/transactions can you make?** Well, Substrate has this notion of &quot;pallets&quot;. Each pallet basically defines a set of transactions (function calls) that it can execute, as well as some storage that may be modified as a result of executing the transactions. Ultimately, a Substrate based blockchain is just made from nodes that run some set of pallets which provide functions like &quot;balances.transfer(to, amount)&quot; and storage like &quot;user Alice has balance 10,000&quot;. You can submit transactions, and query storage (among other things).&#xD;&#xA;&#xD;&#xA;**Ok, so how do you query storage or submit a transaction?** Well, much like most Web2 services, Substrate based nodes (or light clients) expose a web API to allow users to interact with them. This API is exposed via HTTP and WebSockets, and uses a protocol called [JSON-RPC](https://www.jsonrpc.org/specification) (basically, you can submit JSON requests to the node which contain a method name and some parameters, and get back responses). Sometimes we just call this the **RPC API**. There exists an RPC method to allow people to submit transactions to a node, and another which allows people to query for the current state of some storage entries in a node, among other things.&#xD;&#xA;&#xD;&#xA;**But what about runtime calls?** Well, pallets provide some flexibility in defining which transactions/storage a node can understand/provide. These pallets are all compiled to a WASM runtime which the node will execute, and the really cool thing about this is that the WASM which the node will execute can be upgraded (by submitting a transaction!) to alter/extend the behaviour of the chain without requiring node operators to update their binaries. Well, runtime calls are also compiled into this WASM runtime, and provide an API for you to call into this runtime to ask various things. When the runtime is updated, the runtime API's might also change.&#xD;&#xA;&#xD;&#xA;**Runtime calls vs RPC calls??** So, the JSON-RPC API provides a way to submit transactions, ask for storage values, call into runtime APIs and a bunch of other stuff. It is baked into the node binary, and is the same regardless of which pallets/runtime a node is running. Runtime API calls are upgradable, depend on the specific WASM runtime that the node is currently running, and can be queried via an RPC call. &#xD;&#xA;&#xD;&#xA;\* actually &quot;extrinsics&quot;, which are either &quot;transactions&quot; (things submitted by users) or &quot;inherents&quot; (things added by the node itself)." ContentLicense="CC BY-SA 4.0" />
  <row Id="37030" PostHistoryTypeId="2" PostId="9327" RevisionGUID="ff60f6fd-149e-4f6f-a8d2-97d50dcd6a71" CreationDate="2023-07-19T09:59:07.290" UserId="2844" Text="I am using pallet_treasury. I have created proposal and verified it. I have set [`SpendPeriod`](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/a9ef41ac23a18df9bad800f9a5d4929daf082323/runtime/src/lib.rs#L711) in min. Even after 1 min proposal doesn't get funded. What I am missing here? Why it's not working? Someone please give some advice.&#xD;&#xA;&#xD;&#xA;[spend_period_video_link][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://drive.google.com/file/d/1dQjn2W0cKJ8pz4EHPTvaQLgnENWCH2sW/view?usp=sharing&#xD;&#xA;  [2]: https://i.stack.imgur.com/fU5lh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37032" PostHistoryTypeId="1" PostId="9327" RevisionGUID="ff60f6fd-149e-4f6f-a8d2-97d50dcd6a71" CreationDate="2023-07-19T09:59:07.290" UserId="2844" Text="proposal not funded in pallet_treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="37033" PostHistoryTypeId="3" PostId="9327" RevisionGUID="ff60f6fd-149e-4f6f-a8d2-97d50dcd6a71" CreationDate="2023-07-19T09:59:07.290" UserId="2844" Text="|substrate-node-template|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37034" PostHistoryTypeId="2" PostId="9328" RevisionGUID="8403068e-fb01-4469-af13-d41cccb98257" CreationDate="2023-07-19T10:03:56.833" UserId="94" Text="The XCMP queue pallet in cumulus gets its message passed in from the relay chain via the para-inherents [validation data](https://github.com/paritytech/cumulus/blob/2ec939221c4afb287a37373be04bd29b8f5a1d60/pallets/parachain-system/src/lib.rs#L446). It is not doing direct para-to-para messaging but always uses the Relay chain in between (often referred to as [&quot;XCMP-lite&quot;](https://wiki.polkadot.network/docs/learn-xcm-transport)).&#xD;&#xA;&#xD;&#xA;The outbound messages from the queue are copied to the collation info by the parachain-system pallet at the end of every block. The Relay can then extract the messages when enacting a candidate [here](https://github.com/paritytech/polkadot/blob/c5d7b2fd0d7ec492c12c5e2942aab16d7f62be36/runtime/parachains/src/inclusion/mod.rs#L910) and route them accordingly.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37036" PostHistoryTypeId="5" PostId="9291" RevisionGUID="1cea2e03-7887-467f-91f7-621da751ee99" CreationDate="2023-07-19T11:37:54.507" UserId="4440" Comment="added 544 characters in body" Text="I want to start my own blockchain. I try to start [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template) and [substrate-front-end-template](https://github.com/substrate-developer-hub/substrate-front-end-template) remotely, but there is guide instructions only for local machine. I installed and compiled node and frontend on linux dedicated server. The question is: &#xD;&#xA;1. How to start node remotely and make it run even when I close the ssh panel.&#xD;&#xA;2. How to make frontend find the node? Because when I open the link _somesite.com_ - it tries to connect the node all the time? and all the time gets an errors with no connections.&lt;br&gt;&#xD;&#xA;Frontend error: &lt;br&gt;&#xD;&#xA;&amp;nbsp;&amp;nbsp;&amp;nbsp; **Error Connecting to Substrate&lt;br&gt;&#xD;&#xA;&amp;nbsp;&amp;nbsp;&amp;nbsp; Connection to websocket 'wss://127.0.0.1:9944/' failed.**&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Log from my node-template:&lt;br&gt;&#xD;&#xA;**2023-07-19 13:38:51 Accepting new connection 1/100&lt;br&gt;&#xD;&#xA;2023-07-19 13:38:51 HTTP serve connection failed hyper::Error(Parse(Method))&lt;br&gt;&#xD;&#xA;2023-07-19 13:38:54 ✨ Imported #140 (0xfca2…389f)**&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;Commands I use:&lt;br&gt;&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9945 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--unsafe-ws-external \&#xD;&#xA;--unsafe-rpc-external \&#xD;&#xA;--rpc-cors=all \&#xD;&#xA;--rpc-methods=Unsafe" ContentLicense="CC BY-SA 4.0" />
  <row Id="37037" PostHistoryTypeId="2" PostId="9329" RevisionGUID="e3ad3c69-99ee-4929-837b-2649cee45d8b" CreationDate="2023-07-19T11:58:05.360" UserId="14" Text="Try setting these in your runtime's `lib.rs`:&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;  pub DefaultBaseFeePerGas: U256 = U256::zero();&#xD;&#xA;  pub DefaultElasticity: Permill = Permill::zero();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub struct BaseFeeThreshold;&#xD;&#xA;&#xD;&#xA;impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold {&#xD;&#xA;  fn lower() -&gt; Permill { Permill::zero() }&#xD;&#xA;  fn ideal() -&gt; Permill { Permill::zero() }&#xD;&#xA;  fn upper() -&gt; Permill { Permill::zero() }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Be aware that this can lead your chain to DoS attack." ContentLicense="CC BY-SA 4.0" />
  <row Id="37039" PostHistoryTypeId="5" PostId="9319" RevisionGUID="95425312-7cb0-4608-b6e1-5b3e463dddac" CreationDate="2023-07-19T12:15:47.510" UserId="4342" Comment="deleted 1 character in body" Text="Any guidance on how to call my psp22 approve function from the front end ? This is currently how I'm doing it but it doesn't seem to give increased allowance (although its successful) : &#xD;&#xA;&#xD;&#xA;     const formattedAmount = new BN(amount).mul(new BN(10).pow(new BN(12)));&#xD;&#xA;     let Contract = new ContractPromise(api, abi_psp22, tokenAddress);&#xD;&#xA;     Contract.tx['psp22::approve'](tokenAddress, SpenderContractAddress, formattedAmount)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but the allowance remains at 0 when I check afterwards.&#xD;&#xA;&#xD;&#xA;**PS : Iam using polkadot.js package for the interactions**" ContentLicense="CC BY-SA 4.0" />
  <row Id="37040" PostHistoryTypeId="5" PostId="9319" RevisionGUID="a265e5d6-56f4-4da2-baf3-5e294b169427" CreationDate="2023-07-19T13:18:10.187" UserId="4342" Comment="Added full code context, indicating that its a batch Transaction" Text="Any guidance on how to call my psp22 approve function from the front end ? This is currently how I'm doing it but it doesn't seem to give increased allowance (although its successful) : &#xD;&#xA; &#xD;&#xA;    import { ContractPromise } from '@polkadot/api-contract';&#xD;&#xA;    import { web3Accounts, web3Enable, web3FromSource, isWeb3Injected } from '@polkadot/extension-dapp';&#xD;&#xA;    import abi from './alephcontract.json';&#xD;&#xA;    import abi_psp22 from './psp22.json';&#xD;&#xA;    const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;    const { BN } = require('@polkadot/util');&#xD;&#xA;    &#xD;&#xA;    const batchApprove = async (tokens, recipients, amounts) =&gt; {&#xD;&#xA;        try {&#xD;&#xA;    &#xD;&#xA;          if (recipients.length === 0 || amounts.length === 0 || tokens.length === 0) {&#xD;&#xA;            throw new Error('recipients and amounts must be non-empty');&#xD;&#xA;          }&#xD;&#xA;    &#xD;&#xA;          if (recipients.length !== amounts.length || recipients.length !== tokens.length) {&#xD;&#xA;            throw new Error('recipients and amounts must be the same length');&#xD;&#xA;          }&#xD;&#xA;    &#xD;&#xA;          const wsProvider = new WsProvider('wss://ws.test.azero.dev');&#xD;&#xA;          const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;          const injector = await web3FromSource('polkadot-js');&#xD;&#xA;          const allAccounts = await web3Accounts();&#xD;&#xA;          api.setSigner(injector.signer);&#xD;&#xA;    &#xD;&#xA;          let txs = [];&#xD;&#xA;          const AlephcontractAddress = '5cJdgjhx1234567890...';&#xD;&#xA;    &#xD;&#xA;          const formattedAmounts = amounts.map((amount, index) =&gt; {&#xD;&#xA;            const formatted = new BN(amount).mul(new BN(10).pow(new BN(12)));&#xD;&#xA;            console.log(formatted.toString())&#xD;&#xA;            return formatted.toString();&#xD;&#xA;          });&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;          amounts.map(async (amount, index) =&gt; {&#xD;&#xA;    &#xD;&#xA;            const Contract = new ContractPromise(api, abi_psp22, tokens[index]);&#xD;&#xA;    &#xD;&#xA;            txs.push(await Contract.tx['psp22::approve'](tokens[index], AlephcontractAddress, amount))&#xD;&#xA;    &#xD;&#xA;          })&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;          // construct the batch and send the transactions&#xD;&#xA;          await api.tx.utility&#xD;&#xA;            .batch(txs)&#xD;&#xA;            .signAndSend(allAccounts[0].address, async ({ status }) =&gt; {&#xD;&#xA;              if (status.isInBlock) {&#xD;&#xA;                &#xD;&#xA;                    console.log(`included in ${status}`);&#xD;&#xA;                     //perform a transfer&#xD;&#xA;    &#xD;&#xA;              }&#xD;&#xA;            });&#xD;&#xA;    &#xD;&#xA;        } catch (error) {&#xD;&#xA;          console.log(error)&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But the allowance remains at 0 when I check afterwards.&#xD;&#xA;&#xD;&#xA;**PS : I am using polkadot.js package for the interactions**" ContentLicense="CC BY-SA 4.0" />
  <row Id="37041" PostHistoryTypeId="2" PostId="9330" RevisionGUID="db071d55-c8e2-49d1-8e87-da655a9b9f25" CreationDate="2023-07-19T14:25:25.630" UserId="139" Text="Let's imagine a scenario where a team is running a private network and have all their chainstate that they want to move to a parachain after acquiring a slot. My question is, when the team moves all their runtime logic into a cumulus template and starts the process for becoming a parachain, is it possible to bring this solo chainstate from the old chain to the parachain? In other words, is it possible to start a parachain with block N &gt;&gt; 0 ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37043" PostHistoryTypeId="1" PostId="9330" RevisionGUID="db071d55-c8e2-49d1-8e87-da655a9b9f25" CreationDate="2023-07-19T14:25:25.630" UserId="139" Text="Is it possible to bootstrap a parachain node from pre-existing solo chainstate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37044" PostHistoryTypeId="3" PostId="9330" RevisionGUID="db071d55-c8e2-49d1-8e87-da655a9b9f25" CreationDate="2023-07-19T14:25:25.630" UserId="139" Text="|parachain|storage|migration|database|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37045" PostHistoryTypeId="5" PostId="9330" RevisionGUID="7c0f4a13-12a2-47fe-86ef-1f591fe67495" CreationDate="2023-07-19T14:35:26.637" UserId="139" Comment="added 10 characters in body" Text="Let's imagine a scenario where a team is running a substrate private network and have all their chainstate that they want to move to a parachain after acquiring a slot. My question is, when the team moves all their runtime logic into a cumulus template and starts the process for becoming a parachain, is it possible to bring this solo chainstate from the old chain to the parachain? In other words, is it possible to start a parachain with block N &gt;&gt; 0 ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37046" PostHistoryTypeId="5" PostId="9317" RevisionGUID="6ec158e5-baf8-47cb-850c-67d5c25c1059" CreationDate="2023-07-19T14:47:48.047" UserId="4081" Comment="added 272 characters in body" Text="Both are different in which origin can call a specific function, in this case for the pallet_treasury is who can approve. [Here's an example in the pallet_treasury][1]&#xD;&#xA;&#xD;&#xA;[EnsureSigned][2] only checks that the origin that is calling this function signed the message, so in this case if `ApproveOrigin = EnsureSigned&lt;AccountId&gt;` then anyone that sends a signed extrinsic could call this function. &#xD;&#xA;&#xD;&#xA;Now [EitherOfDiverse&lt;L,R&gt;][3] works basically like an OR gate, meaning that this function can be called by either L or R, in the example you gave it would be either a root account (`EnsureRoot&lt;AccountId&gt;`) or by the council collective with a proportion equal or higher than 3/5 (`pallet_collective::EnsureProportionAtLeast&lt;AccountId, CouncilCollective, 3, 5&gt;`). This means that not anyone can call this function only the origin that meets either of those 2 requirements.&#xD;&#xA;&#xD;&#xA;Edit: Even if an account is sudo account it will not work if you don't execute the extrinsic using the sudo pallet. This will send the request with a sudo origin. Here's an example.&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/src/pallet_treasury/lib.rs.html#386&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/frame_system/struct.EnsureSigned.html&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/frame_support/traits/struct.EitherOfDiverse.html&#xD;&#xA;  [4]: https://i.stack.imgur.com/3gEoY.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37047" PostHistoryTypeId="2" PostId="9331" RevisionGUID="ffe21604-0ae5-4bf0-bd76-287ba3f86093" CreationDate="2023-07-19T14:54:37.667" UserId="3002" Text="Anyone knows if the following log may be indicative of some bug in a parachain?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;DEBUG parachain::collator-protocol: [Relaychain] received an unexpected `CollationSeconded`: unknown statement candidate_hash=0x8236ef339b1c10b9de08e99eb091a6d0e67b168f6f5158294c14837277ce82c1 origin=PeerId(&quot;12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby&quot;) traceID=173084875066935610577916474665854936784&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I was able to find the location of the `debug` log here: https://github.com/paritytech/polkadot/blob/e628e486717a82527601f248e102fcaff9f27ef8/node/network/collator-protocol/src/collator_side/mod.rs#L760&#xD;&#xA;&#xD;&#xA;I suspect that this is caused by how zombienet overrides the chain spec. Will try to confirm that." ContentLicense="CC BY-SA 4.0" />
  <row Id="37049" PostHistoryTypeId="1" PostId="9331" RevisionGUID="ffe21604-0ae5-4bf0-bd76-287ba3f86093" CreationDate="2023-07-19T14:54:37.667" UserId="3002" Text="(Relaychain) received an unexpected `CollationSeconded`: unknown statement" ContentLicense="CC BY-SA 4.0" />
  <row Id="37050" PostHistoryTypeId="3" PostId="9331" RevisionGUID="ffe21604-0ae5-4bf0-bd76-287ba3f86093" CreationDate="2023-07-19T14:54:37.667" UserId="3002" Text="|untagged|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37051" PostHistoryTypeId="2" PostId="9332" RevisionGUID="3619d08b-5df2-4db0-bea9-737ca2734c5b" CreationDate="2023-07-19T15:08:08.163" UserId="3002" Text="Yes, it is possible.&#xD;&#xA;&#xD;&#xA;Have a look at this previous question: https://substrate.stackexchange.com/questions/7658/how-we-can-migrate-the-solochain-data-to-the-parachain&#xD;&#xA;&#xD;&#xA;Also, have a look at this video: [Sub0 Online: Storage Migration - Standalone chain to Parachain][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.youtube.com/watch?v=sIgvyRFs-N4" ContentLicense="CC BY-SA 4.0" />
  <row Id="37053" PostHistoryTypeId="2" PostId="9333" RevisionGUID="072d038c-edf1-40d2-8d1f-ff83ff46d02a" CreationDate="2023-07-19T15:23:56.413" UserId="139" Text="For `pallet-evm` there's a config item, actually two config items that I would put under the same category and that is : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pallet_evm::Config {&#xD;&#xA;		/// Allow the origin to call on behalf of given address.&#xD;&#xA;		type CallOrigin: EnsureAddressOrigin&lt;Self::RuntimeOrigin&gt;;&#xD;&#xA;		/// Allow the origin to withdraw on behalf of given address.&#xD;&#xA;		type WithdrawOrigin: EnsureAddressOrigin&lt;Self::RuntimeOrigin, Success = Self::AccountId&gt;;&#xD;&#xA;        /// Currency type for withdraw and balance storage.&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt; + Inspect&lt;Self::AccountId&gt;;&#xD;&#xA;        // --snip--&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I understand that `CallOrigin` is a barrier that must be passed in order to interact with the `evm` via `pallet-evm` extrinsics. However I can not say the same about `WithdrawOrigin` for the following reasons. Going by the description, it seems to configure what origin can withdraw the associated `type Currency` but the question that follows it is withdraw *where*?&#xD;&#xA;&#xD;&#xA;Secondly, let's take an example implementation, if I use `EnsureAddressTruncated` and my chain is using `AccountId32` the `EnsureAddressOrigin&lt;O&gt;` checking code is something like this : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Ensure that the address is truncated hash of the origin. Only works if the account id is&#xD;&#xA;/// `AccountId32`.&#xD;&#xA;pub struct EnsureAddressTruncated;&#xD;&#xA;&#xD;&#xA;impl&lt;OuterOrigin&gt; EnsureAddressOrigin&lt;OuterOrigin&gt; for EnsureAddressTruncated&#xD;&#xA;where&#xD;&#xA;	OuterOrigin: Into&lt;Result&lt;RawOrigin&lt;AccountId32&gt;, OuterOrigin&gt;&gt; + From&lt;RawOrigin&lt;AccountId32&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	type Success = AccountId32;&#xD;&#xA;&#xD;&#xA;	fn try_address_origin(address: &amp;H160, origin: OuterOrigin) -&gt; Result&lt;AccountId32, OuterOrigin&gt; {&#xD;&#xA;		origin.into().and_then(|o| match o {&#xD;&#xA;			RawOrigin::Signed(who) if AsRef::&lt;[u8; 32]&gt;::as_ref(&amp;who)[0..20] == address[0..20] =&gt; {&#xD;&#xA;				Ok(who)&#xD;&#xA;			}&#xD;&#xA;			r =&gt; Err(OuterOrigin::from(r)),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I don't understand quite a few things here, firstly, how is the address parameter an `H160` when my dispatching origin is a `AccountId32`? Clearly this function must be called after the truncation and hashing of the account `[u8;32]` has been performed. And even if that happens, this check should necessarily pass. &#xD;&#xA;&#xD;&#xA;So my doubts can be boiled to two main questions :  &#xD;&#xA;1. What's the point of having a `WithdrawOrigin` origin check here, i.e. why do we need it?&#xD;&#xA;2. What does `pallet_evm::withdraw` extrinsic do? " ContentLicense="CC BY-SA 4.0" />
  <row Id="37055" PostHistoryTypeId="1" PostId="9333" RevisionGUID="072d038c-edf1-40d2-8d1f-ff83ff46d02a" CreationDate="2023-07-19T15:23:56.413" UserId="139" Text="In pallet-evm why do we need `WithdrawOrigin`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37056" PostHistoryTypeId="3" PostId="9333" RevisionGUID="072d038c-edf1-40d2-8d1f-ff83ff46d02a" CreationDate="2023-07-19T15:23:56.413" UserId="139" Text="|evm|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37057" PostHistoryTypeId="5" PostId="9331" RevisionGUID="ceb6a00a-10e7-4c8c-9c38-012a62af88bb" CreationDate="2023-07-19T15:27:21.723" UserId="3002" Comment="added 7 characters in body" Text="Anyone knows if the following log may be indicative of some bug in a parachain?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;DEBUG parachain::collator-protocol: [Relaychain] received an unexpected `CollationSeconded`: unknown statement candidate_hash=0x8236ef339b1c10b9de08e99eb091a6d0e67b168f6f5158294c14837277ce82c1 origin=PeerId(&quot;12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby&quot;) traceID=173084875066935610577916474665854936784&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I was able to find the location of the `debug` log here: https://github.com/paritytech/polkadot/blob/e628e486717a82527601f248e102fcaff9f27ef8/node/network/collator-protocol/src/collator_side/mod.rs#L760&#xD;&#xA;&#xD;&#xA;&lt;s&gt;I suspect that this is caused by how zombienet overrides the chain spec. Will try to confirm that.&lt;/s&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37058" PostHistoryTypeId="2" PostId="9334" RevisionGUID="fb016db5-fdfe-4d54-b7b0-2fdfa861c15e" CreationDate="2023-07-19T15:39:57.357" UserId="474" Text="I would always prefer to add a Runtime API over a custom RPC call.&#xD;&#xA;&#xD;&#xA;Runtime API call information is included in the metadata from V15 (which was recently stabilised), which means that tools (like [subxt](https://docs.rs/subxt)) will be able to automatically provide a nice interface for interacting with them. They can also be versioned and updated via runtime updates without requiring updated binaries to be distributed.&#xD;&#xA;&#xD;&#xA;Finally, we will eventually move towards a new set of RPC APIs in Substrate (see https://github.com/paritytech/json-rpc-interface-spec/) which, unlike the current RPC methods, will have zero calls that are just wrappers around Runtime API methods (eg `State_getMetadata`). So, working with Runtime APIs over custom RPC calls is very much the direction we're heading in :)&#xD;&#xA;&#xD;&#xA;Your light client point is also very much a good one; Runtime calls will be available from alternate node implementations by default, too, which is a big win! " ContentLicense="CC BY-SA 4.0" />
  <row Id="37060" PostHistoryTypeId="2" PostId="9335" RevisionGUID="cc7cdadc-22b6-4aba-8799-9f1a1e85a5c1" CreationDate="2023-07-19T15:54:36.353" UserId="474" Text="Just to build on Alex's answer a little:&#xD;&#xA;&#xD;&#xA;The call hash for a transaction is not unique, because accounts can be reaped (if they fall below the existential deposit amount) and then re-created when new funds are transferred to them. When they are recreated, the account nonce (number that increments each time the account does a tx) is reset to 0. But...&#xD;&#xA;&#xD;&#xA;### If you own the account&#xD;&#xA;&#xD;&#xA;If you construct and make a transaction from an account that you own, and save its hash, then the only person who can cause the exact same hash to occur again on chain is yourself (you'd need to get the account reaped and then put funds back into it to reset the nonce and be able to make the same tx with same hash again). So in this case, it's perfectly fine to search for blocks (starting with the latest known block that didn't contain it) for the call hash, and know that it's the call that you submitted if you find it.&#xD;&#xA;&#xD;&#xA;### If you don't own the account&#xD;&#xA;&#xD;&#xA;Even if you don't own the account, if the goal is to check whether a transaction matching the one that you submitted is on chain somewhere, then searching (starting with the latest known block that didn't contain it) for the hash and finding it is proof that the exact tx that you submitted was successful, even if it was not actually submitted by you (eg yours went wrong for some reason, and somebody else submitted the same thing successfully). So perhaps this is good enough; the event you wanted to happen, happened.&#xD;&#xA;&#xD;&#xA;### A note on mortality&#xD;&#xA;&#xD;&#xA;One way to have more control over this is to set a mortality on the transactions you submit. This way, you know exactly how many blocks the transaction will live for, and thus can scan a precise range of blocks in order to locate the transaction before being certain that it will definitely not be included in the future." ContentLicense="CC BY-SA 4.0" />
  <row Id="37062" PostHistoryTypeId="2" PostId="9336" RevisionGUID="1f6a7ed6-3e7f-4f12-aa21-c82fbc67bc67" CreationDate="2023-07-19T16:18:58.687" UserId="2960" Text="I have a local relaychain setup with 2 parachains Parachain A and Parachain B  .&#xD;&#xA;I will like to execute an xcm message from parachain A to execute an extrinsic on parachain b using the Transact instruction, how do I achieve this programmatically without using polkadot.js webapp. do i need to add pallet-xcm as a dependency , then write code in parachain A to create the instruction and then call send which is on pallet-xcm? &#xD;&#xA;Is there any sample code that does this or detailed instruction on this or programmatically executing xcm?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37064" PostHistoryTypeId="1" PostId="9336" RevisionGUID="1f6a7ed6-3e7f-4f12-aa21-c82fbc67bc67" CreationDate="2023-07-19T16:18:58.687" UserId="2960" Text="How to programmatically execute xcm message from Patachain A to execute an extrinsic on Parachain B" ContentLicense="CC BY-SA 4.0" />
  <row Id="37065" PostHistoryTypeId="3" PostId="9336" RevisionGUID="1f6a7ed6-3e7f-4f12-aa21-c82fbc67bc67" CreationDate="2023-07-19T16:18:58.687" UserId="2960" Text="|polkadot-js|xcm|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37066" PostHistoryTypeId="6" PostId="9327" RevisionGUID="1c37376f-c650-4fc7-be2a-a21b24b67ff6" CreationDate="2023-07-19T16:39:07.890" UserId="2844" Comment="edited tags" Text="|substrate-node-template|substrate-node|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37067" PostHistoryTypeId="2" PostId="9337" RevisionGUID="55a3e84b-f0f0-45ec-8ca9-1c21f83f42e2" CreationDate="2023-07-19T20:13:01.017" UserId="251" Text="It appears that your Treasury does not have any funds.&#xD;&#xA;&#xD;&#xA;Try `Balances::force_set` the Treasury account." ContentLicense="CC BY-SA 4.0" />
  <row Id="37069" PostHistoryTypeId="2" PostId="9338" RevisionGUID="f6756942-cd6a-417f-afee-53f654e25711" CreationDate="2023-07-19T20:21:57.873" UserId="4341" Text="I am having the same issue however on spawn it was getting stuck on `Error    fetching metrics from: http://127.0.0.1:58485/metrics` until it timed out and got the network down, during this time `polkadot` relay validators and `cumulus` parachain collators were producing blocks however my parachain wasn't. &#xD;&#xA;&#xD;&#xA;The fix was to build it on `nightly` channel which made the error to be logged but spawn not getting stuck there, it moved forward until successfully network launch confirmation and blocks are successfully being generated by my parachain. &#xD;&#xA;&#xD;&#xA;Run on Apple M2.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;nightly-2023-01-01&quot;&#xD;&#xA;components = [ &quot;rustfmt&quot; ]&#xD;&#xA;targets = [ &quot;wasm32-unknown-unknown&quot; ]&#xD;&#xA;profile = &quot;minimal&quot;&#xD;&#xA;``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="37075" PostHistoryTypeId="5" PostId="9318" RevisionGUID="399fb3fc-5fc1-4bc7-9f92-caa5be9afb9b" CreationDate="2023-07-20T01:43:07.107" UserId="354" Comment="improved formatting" Text="I am deploying a `ink! smart contract` to local network, but when I tried to call any function from it i have this error:&#xD;&#xA;&#xD;&#xA;&gt; { Err: { Module: { index: '8', error: '0x02000000' } } }&#xD;&#xA;&#xD;&#xA;Any idea what is the error and why ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37076" PostHistoryTypeId="24" PostId="9318" RevisionGUID="399fb3fc-5fc1-4bc7-9f92-caa5be9afb9b" CreationDate="2023-07-20T01:43:07.107" Comment="Proposed by 354 approved by -1 edit id of 504" ContentLicense="CC BY-SA 4.0" />
  <row Id="37077" PostHistoryTypeId="5" PostId="9318" RevisionGUID="25185c17-947c-469c-ba33-2afb1fafc113" CreationDate="2023-07-20T01:43:07.107" UserId="83" Comment="Update tag, formatting" Text="I am deploying an ink! smart contract to a local network, but when I tried to call any function from it i have this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&gt; { Err: { Module: { index: '8', error: '0x02000000' } } }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does anyone have any idea what is causing the error and why?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37078" PostHistoryTypeId="6" PostId="9318" RevisionGUID="25185c17-947c-469c-ba33-2afb1fafc113" CreationDate="2023-07-20T01:43:07.107" UserId="83" Comment="Update tag, formatting" Text="|ink|smart-contract|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37079" PostHistoryTypeId="2" PostId="9339" RevisionGUID="aa1d70e8-f0a9-46a1-afed-228b244f8297" CreationDate="2023-07-20T05:02:32.273" UserId="354" Text="There are no detailed instructions explaining how to use transact, but there is an [demo article][1] by OAK network that explains the working of `XCMP` and in that they have used [cumulus_ping][2] that is using `transact instruction` [here][3]. It helped me a lot in understanding the working of `transact instruction` I hope it helps you too.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://medium.com/oak-blockchain/tutorial-polkadot-cross-chain-message-passing-xcmp-demo-with-ping-pallet-f53397158ab4&#xD;&#xA;  [2]: https://github.com/imstar15/cumulus/tree/master/polkadot-parachains/pallets/ping&#xD;&#xA;  [3]: https://github.com/imstar15/cumulus/blob/master/polkadot-parachains/pallets/ping/src/lib.rs#L105C11-L105C11" ContentLicense="CC BY-SA 4.0" />
  <row Id="37081" PostHistoryTypeId="5" PostId="9333" RevisionGUID="ee59695d-278d-4299-82ae-e56a9ca46a64" CreationDate="2023-07-20T05:12:44.973" UserId="139" Comment="added 34 characters in body" Text="For `pallet-evm` there's a config item, actually two config items that I would put under the same category and that is `CallOrigin` and `WithdrawOrigin` : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pallet_evm::Config {&#xD;&#xA;		/// Allow the origin to call on behalf of given address.&#xD;&#xA;		type CallOrigin: EnsureAddressOrigin&lt;Self::RuntimeOrigin&gt;;&#xD;&#xA;		/// Allow the origin to withdraw on behalf of given address.&#xD;&#xA;		type WithdrawOrigin: EnsureAddressOrigin&lt;Self::RuntimeOrigin, Success = Self::AccountId&gt;;&#xD;&#xA;        /// Currency type for withdraw and balance storage.&#xD;&#xA;		type Currency: Currency&lt;Self::AccountId&gt; + Inspect&lt;Self::AccountId&gt;;&#xD;&#xA;        // --snip--&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I understand that `CallOrigin` is a barrier that must be passed in order to interact with the `evm` via `pallet-evm` extrinsics. However I can not say the same about `WithdrawOrigin` for the following reasons. Going by the description, it seems to configure what origin can withdraw the associated `type Currency` but the question that follows it is withdraw *where*?&#xD;&#xA;&#xD;&#xA;Secondly, let's take an example implementation, if I use `EnsureAddressTruncated` and my chain is using `AccountId32` the `EnsureAddressOrigin&lt;O&gt;` checking code is something like this : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Ensure that the address is truncated hash of the origin. Only works if the account id is&#xD;&#xA;/// `AccountId32`.&#xD;&#xA;pub struct EnsureAddressTruncated;&#xD;&#xA;&#xD;&#xA;impl&lt;OuterOrigin&gt; EnsureAddressOrigin&lt;OuterOrigin&gt; for EnsureAddressTruncated&#xD;&#xA;where&#xD;&#xA;	OuterOrigin: Into&lt;Result&lt;RawOrigin&lt;AccountId32&gt;, OuterOrigin&gt;&gt; + From&lt;RawOrigin&lt;AccountId32&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	type Success = AccountId32;&#xD;&#xA;&#xD;&#xA;	fn try_address_origin(address: &amp;H160, origin: OuterOrigin) -&gt; Result&lt;AccountId32, OuterOrigin&gt; {&#xD;&#xA;		origin.into().and_then(|o| match o {&#xD;&#xA;			RawOrigin::Signed(who) if AsRef::&lt;[u8; 32]&gt;::as_ref(&amp;who)[0..20] == address[0..20] =&gt; {&#xD;&#xA;				Ok(who)&#xD;&#xA;			}&#xD;&#xA;			r =&gt; Err(OuterOrigin::from(r)),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I don't understand quite a few things here, firstly, how is the address parameter an `H160` when my dispatching origin is a `AccountId32`? Clearly this function must be called after the truncation and hashing of the account `[u8;32]` has been performed. And even if that happens, this check should necessarily pass. &#xD;&#xA;&#xD;&#xA;So my doubts can be boiled to two main questions :  &#xD;&#xA;1. What's the point of having a `WithdrawOrigin` origin check here, i.e. why do we need it?&#xD;&#xA;2. What does `pallet_evm::withdraw` extrinsic do? " ContentLicense="CC BY-SA 4.0" />
  <row Id="37082" PostHistoryTypeId="5" PostId="9132" RevisionGUID="7b4cc06c-f7df-42b4-b8b4-2a01e768789b" CreationDate="2023-07-20T05:36:33.497" UserId="354" Comment="added 4 characters in body" Text="I am using [subalfred][1] to fork my chain and was able to achieve  it, I got the latest state of the `old-chain` to the `forked-chain` but the `forked-chain` is starting from the genesis block or we can say starting a new chain with the state of the `old-chain`.&#xD;&#xA;&#xD;&#xA;But what I want is to get all the blocks from `old-chain` to `forked-chain` like what `Ethereum` did in their **London Hard Fork**.&#xD;&#xA;&#xD;&#xA;Is there a way to that in substrate means retaining all the blocks even after doing a `hard-fork`, if yes please point to the resources for the same.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://subalfred.hack.ink/user/cli/state.html#command-state-fork-off" ContentLicense="CC BY-SA 4.0" />
  <row Id="37083" PostHistoryTypeId="2" PostId="9340" RevisionGUID="ad106ed0-4690-47c5-9adf-d23714dcff29" CreationDate="2023-07-20T05:38:55.710" UserId="3414" Text="I was trying to `transfer nft` from `relay chain` to `parachain` through `transact` instruction of `Xcm`.&#xD;&#xA;Here is snippet of code I am using&#xD;&#xA;&#xD;&#xA;    Xcm(vec![Transact {&#xD;&#xA;    					origin_kind:OriginKind::Xcm,&#xD;&#xA;    					require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;    					call: pallet_nfts::Call::&lt;T, I&gt;::create {&#xD;&#xA;    						admin,&#xD;&#xA;    						config&#xD;&#xA;    					}&#xD;&#xA;    					.encode()&#xD;&#xA;    					.into(),&#xD;&#xA;    				}]), 			)&#xD;&#xA;    			 { 	&#xD;&#xA;    				Ok((hash, cost)) =&gt; &#xD;&#xA;    					 Self::deposit_event(Event::NftSent( hash, cost)),&#xD;&#xA;    					&#xD;&#xA;    				Err(e) =&gt; &#xD;&#xA;    				 Self::deposit_event(Event::NFTSendingError(e, )), 			} 			Ok(())&#xD;&#xA;&#xD;&#xA;Through this I was trying to call the `create` function of `pallet-nfts` on `parachain`.From the relay chain the code executed successfully and received event `NFtsent` on relay chain. The problem I faced is that on parachain when `dmp Message executed` come, It shows `incomplete` and an `ERROR` `Failed to Decode` . &#xD;&#xA;&#xD;&#xA;Here is the function create of pallet-nfts&#xD;&#xA;&#xD;&#xA;    pub fn create(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			admin: AccountIdLookupOf&lt;T&gt;,&#xD;&#xA;    			config: CollectionConfigFor&lt;T, I&gt;,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			let collection =&#xD;&#xA;    				NextCollectionId::&lt;T, I&gt;::get().unwrap_or(T::CollectionId::initial_value());&#xD;&#xA;    				frame_support::log::warn!(&quot;kuch bi &quot;);&#xD;&#xA;    			let owner = T::CreateOrigin::ensure_origin(origin, &amp;collection)?;&#xD;&#xA;    			frame_support::log::warn!(&quot;ye owner hai bhai {:?}&quot;,owner);&#xD;&#xA;    			let admin = T::Lookup::lookup(admin)?;&#xD;&#xA;&#xD;&#xA;In this function we are passing three parameters, `Origin`, `admin`, `config`.My question here is how I can pass the origin parameter in my transact instruction `call parameter` &#xD;&#xA;&#xD;&#xA;    call: pallet_nfts::Call::&lt;T, I&gt;::create {&#xD;&#xA;                            admin,&#xD;&#xA;                            config&#xD;&#xA;&#xD;&#xA;so that it could be decoded correctly on parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="37085" PostHistoryTypeId="1" PostId="9340" RevisionGUID="ad106ed0-4690-47c5-9adf-d23714dcff29" CreationDate="2023-07-20T05:38:55.710" UserId="3414" Text="Failed to Decode Error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37086" PostHistoryTypeId="3" PostId="9340" RevisionGUID="ad106ed0-4690-47c5-9adf-d23714dcff29" CreationDate="2023-07-20T05:38:55.710" UserId="3414" Text="|polkadot|xcm|substrate-parachain-template|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37087" PostHistoryTypeId="6" PostId="9340" RevisionGUID="bead31c7-e949-4afc-956a-0eb913c3d81a" CreationDate="2023-07-20T05:42:02.527" UserId="2372" Comment="Added nft tag" Text="|polkadot|xcm|substrate-parachain-template|relay-chain|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37088" PostHistoryTypeId="24" PostId="9340" RevisionGUID="bead31c7-e949-4afc-956a-0eb913c3d81a" CreationDate="2023-07-20T05:42:02.527" Comment="Proposed by 2372 approved by 3414 edit id of 506" ContentLicense="CC BY-SA 4.0" />
  <row Id="37089" PostHistoryTypeId="5" PostId="9307" RevisionGUID="2d43aa72-3195-4de0-b5c1-2110bf8f8010" CreationDate="2023-07-20T05:52:19.403" UserId="458" Comment="added 139 characters in body" Text="We recently attempted a runtime upgrade on our parachain testnet (`wss://moonbeam-integration-parachain.polkadex.trade`) and made some modifications to the `validate_unsigned` code, specifically eliminating the following section: https://github.com/Polkadex-Substrate/parachain/blob/zk-upgrade/pallets/thea-message-handler/src/lib.rs#L253-L287.&#xD;&#xA;&#xD;&#xA;However, despite the changes, we encounter the error referenced in https://github.com/Polkadex-Substrate/parachain/blob/zk-upgrade/pallets/thea-message-handler/src/lib.rs#L265 when sending usigned transaction using `subxt` client post-upgrade. Interestingly, this error should no longer exist as its associated code has been removed.&#xD;&#xA;&#xD;&#xA;It's worth noting that we have updated the spec version in runtime, confirming that the runtime update was executed successfully.&#xD;&#xA;&#xD;&#xA;Could you suggest what might be preventing the successful implementation of our code upgrade?&#xD;&#xA;&#xD;&#xA;Error:-&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CFXrX.png&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;* When we tried to send an unsigned transaction using Polkadot.js - it worked. It looks like it's happening because of subxt. " ContentLicense="CC BY-SA 4.0" />
  <row Id="37090" PostHistoryTypeId="5" PostId="9340" RevisionGUID="2043eff5-808c-4413-94be-55bb3d9f9f48" CreationDate="2023-07-20T05:57:24.427" UserId="354" Comment="corrected spelling, fixed grammar and improved formatting" Text="I was trying to `transfer nft` from `relay chain` to `parachain` through `transact` instruction of `Xcm`.&#xD;&#xA;Here is snippet of code I am using&#xD;&#xA;```js&#xD;&#xA;Xcm(vec![Transact {&#xD;&#xA;					origin_kind:OriginKind::Xcm,&#xD;&#xA;					require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;					call: pallet_nfts::Call::&lt;T, I&gt;::create {&#xD;&#xA;						admin,&#xD;&#xA;						config&#xD;&#xA;					}&#xD;&#xA;					.encode()&#xD;&#xA;					.into(),&#xD;&#xA;				}]), 			)&#xD;&#xA;			 { 	&#xD;&#xA;				Ok((hash, cost)) =&gt; &#xD;&#xA;					 Self::deposit_event(Event::NftSent( hash, cost)),&#xD;&#xA;					&#xD;&#xA;				Err(e) =&gt; &#xD;&#xA;				 Self::deposit_event(Event::NFTSendingError(e, )), 			&#xD;&#xA;} &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Through this I was trying to call `create` function of `pallet-nfts` on `parachain`from relay chain, the code executed successfully and received event `NFTSent` on relay chain. The problem I faced on parachain is `Failed to Decode` .&#xD;&#xA;&#xD;&#xA;Here is the function create of pallet-nfts&#xD;&#xA;```js&#xD;&#xA;pub fn create(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			admin: AccountIdLookupOf&lt;T&gt;,&#xD;&#xA;			config: CollectionConfigFor&lt;T, I&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let collection =&#xD;&#xA;				NextCollectionId::&lt;T, I&gt;::get().unwrap_or(T::CollectionId::initial_value());&#xD;&#xA;				frame_support::log::warn!(&quot;kuch bi &quot;);&#xD;&#xA;			let owner = T::CreateOrigin::ensure_origin(origin, &amp;collection)?;&#xD;&#xA;			frame_support::log::warn!(&quot;ye owner hai bhai {:?}&quot;,owner);&#xD;&#xA;			let admin = T::Lookup::lookup(admin)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In this function we are passing three parameters, `Origin`, `admin`, `config`.My question here is how should I call this `transact instruction` so that it pass successfully it will be very helpful any one can guide me on this. Below is the code snippet of the transaction instruction that I am using. &#xD;&#xA;```js&#xD;&#xA;call: pallet_nfts::Call::&lt;T, I&gt;::create {&#xD;&#xA;                        admin,&#xD;&#xA;                        config&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37091" PostHistoryTypeId="6" PostId="9340" RevisionGUID="2043eff5-808c-4413-94be-55bb3d9f9f48" CreationDate="2023-07-20T05:57:24.427" UserId="354" Comment="corrected spelling, fixed grammar and improved formatting" Text="|polkadot|xcm|substrate-parachain-template|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37092" PostHistoryTypeId="24" PostId="9340" RevisionGUID="2043eff5-808c-4413-94be-55bb3d9f9f48" CreationDate="2023-07-20T05:57:24.427" Comment="Proposed by 354 approved by 3414 edit id of 507" ContentLicense="CC BY-SA 4.0" />
  <row Id="37093" PostHistoryTypeId="6" PostId="9307" RevisionGUID="0c4acc1c-cbcd-4ced-9afd-48f774c15fa7" CreationDate="2023-07-20T06:51:03.443" UserId="2762" Comment="edited tags" Text="|parachain|runtime-upgrade|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37094" PostHistoryTypeId="2" PostId="9341" RevisionGUID="782058f1-5ecd-44de-a559-dc737275ac24" CreationDate="2023-07-20T07:46:13.517" UserId="3344" Text="Is there any documentation on how to gracefully and securely wind up a relay, parallel or on-demand chain?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37096" PostHistoryTypeId="1" PostId="9341" RevisionGUID="782058f1-5ecd-44de-a559-dc737275ac24" CreationDate="2023-07-20T07:46:13.517" UserId="3344" Text="How do you EOL/wind up/shutdown a relay chain and parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37097" PostHistoryTypeId="3" PostId="9341" RevisionGUID="782058f1-5ecd-44de-a559-dc737275ac24" CreationDate="2023-07-20T07:46:13.517" UserId="3344" Text="|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37098" PostHistoryTypeId="2" PostId="9342" RevisionGUID="45d1b379-b584-4386-b103-48c3b28aae47" CreationDate="2023-07-20T08:05:01.913" UserId="354" Text="I have also asked a similar question [https://substrate.stackexchange.com/questions/9132/how-to-get-all-the-blocks-when-forking-the-chain][1], where `block N &gt;&gt; 0` still waiting for an answer. In the meantime I can share my findings, there are different ways to persist the current state of the chain while converting solochain to a parachain but all of them start from `block 0`, one way is already mentioned by Rodrigo that is storage migration and other are as follows:&#xD;&#xA;&#xD;&#xA; - You can use [fork-off-substrate][2] to persist the current state of your chain but I am not sure if it can convert solochain to parachain.&#xD;&#xA; - Other is [subalfred][3], this I have tried and was able to convert solochian to relay-chain and vice versa with its old state being persist and I hope it will work for solochain to parachain also but it will start from `block 0`. To convert the chain you need to use `override` command of subalfred.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/9132/how-to-get-all-the-blocks-when-forking-the-chain&#xD;&#xA;  [2]: https://github.com/maxsam4/fork-off-substrate&#xD;&#xA;  [3]: https://subalfred.hack.ink/user/cli/state.html#command-state-fork-off" ContentLicense="CC BY-SA 4.0" />
  <row Id="37100" PostHistoryTypeId="2" PostId="9343" RevisionGUID="ebad0f74-bee3-41c2-aa23-f8052279ccbc" CreationDate="2023-07-20T08:06:02.173" UserId="529" Text="The way I approach such error is in 2 steps.&#xD;&#xA;1. Make sure contract works.&#xD;&#xA;&#xD;&#xA;Use [Contracts-UI][1], deploy the contract and check that approve/allowance work as you expected.&#xD;&#xA;&#xD;&#xA; 2. Dry-run Tx&#xD;&#xA;&#xD;&#xA;Before sending Tx, first send `query` for the same ink! message. That will dry-run your `approve` message and you can capture (console.log) the error if there is any&#xD;&#xA;```&#xD;&#xA;const result = await Contract.query['psp22::approve'](tokens[index], AlephcontractAddress, amount))&#xD;&#xA;console.log(result);&#xD;&#xA;````&#xD;&#xA;BTW, with the `approve` it is most likely that you use wrong signing address to give the approval&#xD;&#xA;&#xD;&#xA;  [1]: https://contracts-ui.substrate.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="37102" PostHistoryTypeId="2" PostId="9344" RevisionGUID="bde1649b-83b6-4783-9c61-5b81343ee27c" CreationDate="2023-07-20T08:42:53.123" UserId="3417" Text="Estimated fees for some extrinsics look significantly higher (4-10x) that the final used ones.&#xD;&#xA;This example of a `delegate` call highlight this: https://polkadot.subscan.io/extrinsic/16420739-2 (see `estimated` fee vs `used`)&#xD;&#xA;&#xD;&#xA;Is there a way to improve the estimation? Or is this something specific to this extrinsic that could be improved somehow?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37104" PostHistoryTypeId="1" PostId="9344" RevisionGUID="bde1649b-83b6-4783-9c61-5b81343ee27c" CreationDate="2023-07-20T08:42:53.123" UserId="3417" Text="Estimated fees too high" ContentLicense="CC BY-SA 4.0" />
  <row Id="37105" PostHistoryTypeId="3" PostId="9344" RevisionGUID="bde1649b-83b6-4783-9c61-5b81343ee27c" CreationDate="2023-07-20T08:42:53.123" UserId="3417" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37106" PostHistoryTypeId="2" PostId="9345" RevisionGUID="105428a4-ebf5-4bab-b370-e759dcacaf87" CreationDate="2023-07-20T09:44:45.730" UserId="169" Text="When using the Python script:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;timestamp = ScaleDecoder.get_decoder_class('Timestamp', ScaleBytes(timestamp_hex_array)).decode()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it seems that the decoder expects the size of the hex array to be exactly equal to the object to be decoded. This is equivalent to the behavior of the `DecodeAll` trait in rust, where the remaining bytes after decoding must be zero.&#xD;&#xA;&#xD;&#xA;How can I, in Python, do whatever is equivalent to `Decode` trait in rust, where the number of remaining bytes, after decoding, can be &gt; 0, so that I can decode a stream?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37108" PostHistoryTypeId="1" PostId="9345" RevisionGUID="105428a4-ebf5-4bab-b370-e759dcacaf87" CreationDate="2023-07-20T09:44:45.730" UserId="169" Text="Scalecodec: How can I get the equivalent of Decode in Python, instead of DecodeAll?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37109" PostHistoryTypeId="3" PostId="9345" RevisionGUID="105428a4-ebf5-4bab-b370-e759dcacaf87" CreationDate="2023-07-20T09:44:45.730" UserId="169" Text="|rust|rpc|scale-codec|python|scale|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37110" PostHistoryTypeId="2" PostId="9346" RevisionGUID="55f1c10f-3c9e-4c7c-8815-baac7b2ff0c1" CreationDate="2023-07-20T10:34:39.403" UserId="2844" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Someone please point me how to add funds in `Treasury`?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/gIcLb.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37112" PostHistoryTypeId="1" PostId="9346" RevisionGUID="55f1c10f-3c9e-4c7c-8815-baac7b2ff0c1" CreationDate="2023-07-20T10:34:39.403" UserId="2844" Text="How to add funds to Treasury?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37113" PostHistoryTypeId="3" PostId="9346" RevisionGUID="55f1c10f-3c9e-4c7c-8815-baac7b2ff0c1" CreationDate="2023-07-20T10:34:39.403" UserId="2844" Text="|substrate-node-template|substrate-node|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37114" PostHistoryTypeId="5" PostId="9345" RevisionGUID="53b8578f-d5ad-47bb-92e1-596feb05f663" CreationDate="2023-07-20T10:55:02.803" UserId="169" Comment="deleted 2 characters in body" Text="When using the Python script:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;timestamp = ScaleDecoder.get_decoder_class('Timestamp', ScaleBytes(timestamp_bytes_array)).decode()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it seems that the decoder expects the size of the array to be exactly equal to the object to be decoded. This is equivalent to the behavior of the `DecodeAll` trait in rust, where the remaining bytes after decoding must be zero.&#xD;&#xA;&#xD;&#xA;How can I, in Python, do whatever is equivalent to `Decode` trait in rust, where the number of remaining bytes, after decoding, can be &gt; 0, so that I can decode a stream?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37115" PostHistoryTypeId="50" PostId="3359" RevisionGUID="7ff8dd34-eefd-4d92-9e00-cf7273216068" CreationDate="2023-07-20T12:00:40.097" UserId="-1" />
  <row Id="37116" PostHistoryTypeId="5" PostId="9291" RevisionGUID="c11c2c3c-8060-496f-b6cf-bff4becf2031" CreationDate="2023-07-20T12:03:07.453" UserId="4440" Comment="edited body" Text="I want to start my own blockchain. I try to start [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template) and [substrate-front-end-template](https://github.com/substrate-developer-hub/substrate-front-end-template) remotely, but there is guide instructions only for local machine. I installed and compiled node and frontend on linux dedicated server. The question is: &#xD;&#xA;1. How to start node remotely and make it run even when I close the ssh panel.&#xD;&#xA;2. How to make frontend find the node? Because when I open the link _somesite.com_ - it tries to connect the node all the time? and all the time gets an errors with no connections.&lt;br&gt;&#xD;&#xA;Frontend error: &lt;br&gt;&#xD;&#xA;&amp;nbsp;&amp;nbsp;&amp;nbsp; **Error Connecting to Substrate&lt;br&gt;&#xD;&#xA;&amp;nbsp;&amp;nbsp;&amp;nbsp; Connection to websocket 'wss://127.0.0.1:9944/' failed.**&#xD;&#xA;&lt;br&gt;&#xD;&#xA;Log from my node-template:&lt;br&gt;&#xD;&#xA;**2023-07-19 13:38:51 Accepting new connection 1/100&lt;br&gt;&#xD;&#xA;2023-07-19 13:38:51 HTTP serve connection failed hyper::Error(Parse(Method))&lt;br&gt;&#xD;&#xA;2023-07-19 13:38:54 ✨ Imported #140 (0xfca2…389f)**&#xD;&#xA;&lt;br&gt;&lt;br&gt;&#xD;&#xA;Commands I use:&lt;br&gt;&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--ws-port 9944 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;--unsafe-ws-external \&#xD;&#xA;--unsafe-rpc-external \&#xD;&#xA;--rpc-cors=all \&#xD;&#xA;--rpc-methods=Unsafe" ContentLicense="CC BY-SA 4.0" />
  <row Id="37118" PostHistoryTypeId="2" PostId="9347" RevisionGUID="d44eae24-ff78-42e9-95b2-3188e547e6af" CreationDate="2023-07-20T12:24:13.923" UserId="3317" Text="If you look at the extrinsic [`delegate`][1] you can see the pre_dispatch weight is determined based on the [`MaxVotes`][2] configurable. Unfortunately the **actual** amount of votes are only known after execution. If therefore there is only one vote, the difference between the `estimated` fee and `used` fee can be quite significant. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/ced1659017c823e8a73183e051976bfd756f8605/frame/conviction-voting/src/lib.rs#L240C7-L243&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/ced1659017c823e8a73183e051976bfd756f8605/frame/conviction-voting/src/lib.rs#L121-L122" ContentLicense="CC BY-SA 4.0" />
  <row Id="37120" PostHistoryTypeId="2" PostId="9348" RevisionGUID="915e75bb-283b-4b64-8900-deeb364c0f57" CreationDate="2023-07-20T12:33:05.490" UserId="3317" Text="What about doing a simple balance transfer to the account id of the treasury :)&#xD;&#xA;&#xD;&#xA;E.g. [Polkadot][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/e0ed7e862c8c8b6c75eda1731c449543642176ef/runtime/polkadot/src/lib.rs#L648" ContentLicense="CC BY-SA 4.0" />
  <row Id="37122" PostHistoryTypeId="50" PostId="2129" RevisionGUID="311d213a-1a76-4351-bdfe-4ab080d85b82" CreationDate="2023-07-20T13:09:56.207" UserId="-1" />
  <row Id="37123" PostHistoryTypeId="2" PostId="9349" RevisionGUID="d591d287-acd7-45f2-a073-8a1313b1ad43" CreationDate="2023-07-20T13:15:35.397" UserId="139" Text="Basically I am asking if we can slot in an existing parachain that has been running for sometime, so has a few hundred blocks into a relay chain like kusama/polkadot. I know the relay chain requires the genesis hash and the wasm runtime as per-requisites before on-boarding a parachain, so in my mind, it doesn't matter if the block number starts from &gt;&gt; 0 ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37125" PostHistoryTypeId="1" PostId="9349" RevisionGUID="d591d287-acd7-45f2-a073-8a1313b1ad43" CreationDate="2023-07-20T13:15:35.397" UserId="139" Text="Is it possible to start a parachain from block number greater than 1?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37126" PostHistoryTypeId="3" PostId="9349" RevisionGUID="d591d287-acd7-45f2-a073-8a1313b1ad43" CreationDate="2023-07-20T13:15:35.397" UserId="139" Text="|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37127" PostHistoryTypeId="2" PostId="9350" RevisionGUID="39b53629-c88d-4d17-98c9-02a3930b822a" CreationDate="2023-07-20T13:43:58.657" UserId="354" Text="I am trying to connect a new peer with `archive-node` instead of `validator-node` but I am unable to enter the network it shows `peers(0)`, but as soon as I give `--validator` tag the new peer start syncing. So my question here is does system consider validator as `bootnode` and not the `archive-node`, as I don't want to run expose my validator node to others.&#xD;&#xA;&#xD;&#xA;Can anyone share any resources where I can understand this more accurately or am I thinking wrong." ContentLicense="CC BY-SA 4.0" />
  <row Id="37129" PostHistoryTypeId="1" PostId="9350" RevisionGUID="39b53629-c88d-4d17-98c9-02a3930b822a" CreationDate="2023-07-20T13:43:58.657" UserId="354" Text="Not able to connect via archive node to my network" ContentLicense="CC BY-SA 4.0" />
  <row Id="37130" PostHistoryTypeId="3" PostId="9350" RevisionGUID="39b53629-c88d-4d17-98c9-02a3930b822a" CreationDate="2023-07-20T13:43:58.657" UserId="354" Text="|substrate-node|bootnode|private-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37131" PostHistoryTypeId="2" PostId="9351" RevisionGUID="84cb24c9-a719-4326-8c10-21fc2f0be489" CreationDate="2023-07-20T14:01:05.837" UserId="427" Text="In Polkadot-based networks, including Substrate-based chains, the initial synchronization process can be influenced by the nodes' roles and configurations. Let's break down the concepts to understand how it works:&#xD;&#xA;&#xD;&#xA;Bootnode: A bootnode is a well-known node that acts as a starting point for new nodes to join the network. When a new node starts up, it connects to one or more bootnodes to discover other peers on the network.&#xD;&#xA;&#xD;&#xA;Archive Node: An archive node is a type of node that keeps a complete history of all data on the blockchain, including historical states and transactions. It is useful for performing historical data analysis but can be more resource-intensive compared to a full node.&#xD;&#xA;&#xD;&#xA;Validator Node: A validator node is responsible for participating in the consensus process and producing new blocks. Validator nodes are crucial for the security and finality of the blockchain.&#xD;&#xA;&#xD;&#xA;Now, when you run a node with the --validator flag, it is indicating that this node is a validator node, and it actively participates in block production and consensus. As a result, it will connect to other nodes, including bootnodes, to sync and contribute to the network's consensus.&#xD;&#xA;&#xD;&#xA;On the other hand, when you run a node without the --validator flag, it becomes a non-validator or &quot;passive&quot; node, which only synchronizes the blockchain data but does not actively participate in block production. Such nodes may not require peer connections in the same way as validator nodes.&#xD;&#xA;&#xD;&#xA;Regarding your specific question about the archive node not syncing when you run it without the --validator flag, it is possible that the network configuration or peer discovery mechanism is expecting validator nodes to connect to bootnodes for initial synchronization. This behavior might be specific to the particular network or node implementation you are using.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37133" PostHistoryTypeId="2" PostId="9352" RevisionGUID="25061a44-4d40-4cec-9556-833fe67eb8fd" CreationDate="2023-07-20T14:05:11.477" UserId="3002" Text="Is there a way to access the call origin when using `BaseCallFilter` from &#xD;&#xA; `frame_system::Config`?&#xD;&#xA;&#xD;&#xA;Something like:&#xD;&#xA;```rust&#xD;&#xA;// Disallow any call to a given pallet&#xD;&#xA;pub struct CallFilter;&#xD;&#xA;impl frame_support::traits::Contains&lt;RuntimeCall&gt; for CallFilter {&#xD;&#xA;	fn contains(c: &amp;RuntimeCall) -&gt; bool {&#xD;&#xA;		match c {&#xD;&#xA;			RuntimeCall::Balances(..) =&gt; /* validate origin */,&#xD;&#xA;			_ =&gt; true,&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl frame_system::Config for Runtime {&#xD;&#xA;    type BaseCallFilter = CallFilter;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I suspect it is not possible, and I will probably have to wrap `RuntimeOrigin`. But would appreciate if there is a better way to achieve what I described above." ContentLicense="CC BY-SA 4.0" />
  <row Id="37135" PostHistoryTypeId="1" PostId="9352" RevisionGUID="25061a44-4d40-4cec-9556-833fe67eb8fd" CreationDate="2023-07-20T14:05:11.477" UserId="3002" Text="filter pallet call" ContentLicense="CC BY-SA 4.0" />
  <row Id="37136" PostHistoryTypeId="3" PostId="9352" RevisionGUID="25061a44-4d40-4cec-9556-833fe67eb8fd" CreationDate="2023-07-20T14:05:11.477" UserId="3002" Text="|runtime|call|origin|filter|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37137" PostHistoryTypeId="4" PostId="9352" RevisionGUID="3076faf4-96c5-4963-ad4c-91b63aa5a8ee" CreationDate="2023-07-20T14:34:54.710" UserId="3002" Comment="edited title" Text="Filter pallet call by origin" ContentLicense="CC BY-SA 4.0" />
  <row Id="37138" PostHistoryTypeId="2" PostId="9353" RevisionGUID="b80e59b7-e1b3-432f-a8bf-954f4c0164c9" CreationDate="2023-07-20T15:14:28.123" UserId="427" Text="Usually this is the treasury account ID - 5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z which is generated using the pallet-id of treasury so it is deterministic across all substrate based chains until the pallet-id is modified. &#xD;&#xA;&#xD;&#xA;So a normal transfer to this account should answer your question." ContentLicense="CC BY-SA 4.0" />
  <row Id="37140" PostHistoryTypeId="2" PostId="9354" RevisionGUID="bb7c87ab-1674-4e69-bc48-e6b921120e54" CreationDate="2023-07-20T15:15:07.827" UserId="2960" Text="When sending Transact XCM Instruction from parachain A, how do I specify (or how does the xcm-executor know) the pallet on the target Parachain B which contains the extrinsic to be executed, or is it not required?&#xD;&#xA;&#xD;&#xA;for example.&#xD;&#xA;The following Transact Xcm message is sent from parachain A to execute an extrinsic called ping defined in the cumulus-ping pallet on Parachain B.&#xD;&#xA;In the xcm message below, I do not see the cumulus-ping pallet or the index of the cumulus-ping pallets specified in the XCM instruction. so how does XCM determine the pallet / module where the  ping extrinsic on Parachain B is located?&#xD;&#xA;The code I attached below is from the cumulus repo [here][1]&#xD;&#xA;&#xD;&#xA;// This is Parachain A, which sends the xcm message&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;    					(Parent, Junction::Parachain(para.into())).into(),&#xD;&#xA;    					Xcm(vec![Transact {&#xD;&#xA;    						origin_kind: OriginKind::Native,&#xD;&#xA;    						require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;    						call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::ping {&#xD;&#xA;    							seq,&#xD;&#xA;    							payload: payload.clone().to_vec(),&#xD;&#xA;    						})&#xD;&#xA;    						.encode()&#xD;&#xA;    						.into(),&#xD;&#xA;    					}]),&#xD;&#xA;    				) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// This is the runtime of patachain B which contains cumulus-ping pallet which has the ping extrinsic&#xD;&#xA;&#xD;&#xA;    construct_runtime! {&#xD;&#xA;    	pub enum Runtime where&#xD;&#xA;    		Block = Block,&#xD;&#xA;    		NodeBlock = generic::Block&lt;Header, sp_runtime::OpaqueExtrinsic&gt;,&#xD;&#xA;    		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;    	{&#xD;&#xA;    		System: frame_system::{Pallet, Call, Storage, Config, Event&lt;T&gt;},&#xD;&#xA;    		...&#xD;&#xA;    		Spambot: cumulus_ping::{Pallet, Call, Storage, Event&lt;T&gt;} = 99,&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/a05c09c6d525d7ab62e95643666154b8b0abb546/parachains/pallets/ping/src/lib.rs#L206" ContentLicense="CC BY-SA 4.0" />
  <row Id="37142" PostHistoryTypeId="1" PostId="9354" RevisionGUID="bb7c87ab-1674-4e69-bc48-e6b921120e54" CreationDate="2023-07-20T15:15:07.827" UserId="2960" Text="When sending Transact XCM Instruction, how to specify the pallet which contains the extrinsic to execute on target parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37143" PostHistoryTypeId="3" PostId="9354" RevisionGUID="bb7c87ab-1674-4e69-bc48-e6b921120e54" CreationDate="2023-07-20T15:15:07.827" UserId="2960" Text="|polkadot-js|xcm|substrate-parachain-template|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37144" PostHistoryTypeId="5" PostId="9354" RevisionGUID="4b1abd89-931d-4481-848f-5f22b94a0bef" CreationDate="2023-07-20T15:21:13.687" UserId="2960" Comment="added 12 characters in body" Text="When sending Transact XCM Instruction from parachain A, how do I specify (or how does the xcm-executor know) the pallet / pallet id  on the target Parachain B which contains the extrinsic to be executed, or is it not required?&#xD;&#xA;&#xD;&#xA;for example.&#xD;&#xA;The following Transact Xcm message is sent from parachain A to execute an extrinsic called ping defined in the cumulus-ping pallet on Parachain B.&#xD;&#xA;In the xcm message below, I do not see the cumulus-ping pallet or the index of the cumulus-ping pallet specified in the XCM instruction. so how does XCM determine the pallet / module where the  ping extrinsic on Parachain B is located?&#xD;&#xA;The code I attached below is from the cumulus repo [here][1]&#xD;&#xA;&#xD;&#xA;// This is Parachain A, which sends the xcm message&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;    					(Parent, Junction::Parachain(para.into())).into(),&#xD;&#xA;    					Xcm(vec![Transact {&#xD;&#xA;    						origin_kind: OriginKind::Native,&#xD;&#xA;    						require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;    						call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::ping {&#xD;&#xA;    							seq,&#xD;&#xA;    							payload: payload.clone().to_vec(),&#xD;&#xA;    						})&#xD;&#xA;    						.encode()&#xD;&#xA;    						.into(),&#xD;&#xA;    					}]),&#xD;&#xA;    				) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// This is the runtime of patachain B which contains cumulus-ping pallet which has the ping extrinsic&#xD;&#xA;&#xD;&#xA;    construct_runtime! {&#xD;&#xA;    	pub enum Runtime where&#xD;&#xA;    		Block = Block,&#xD;&#xA;    		NodeBlock = generic::Block&lt;Header, sp_runtime::OpaqueExtrinsic&gt;,&#xD;&#xA;    		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;    	{&#xD;&#xA;    		System: frame_system::{Pallet, Call, Storage, Config, Event&lt;T&gt;},&#xD;&#xA;    		...&#xD;&#xA;    		Spambot: cumulus_ping::{Pallet, Call, Storage, Event&lt;T&gt;} = 99,&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/a05c09c6d525d7ab62e95643666154b8b0abb546/parachains/pallets/ping/src/lib.rs#L206" ContentLicense="CC BY-SA 4.0" />
  <row Id="37145" PostHistoryTypeId="5" PostId="9336" RevisionGUID="f9f02542-53d9-4334-ba40-2fa115b64f61" CreationDate="2023-07-20T15:48:16.087" UserId="354" Comment="improved formatting" Text="I have a local relaychain setup with 2 parachains `Parachain A` and `Parachain B`  .&#xD;&#xA;I will like to execute an XCM message from `Parachain A` to execute an extrinsic on `Parachain B` using the `Transact instruction`.How do I achieve this programmatically without using `polkadot.js` webapp. Do I need to add `pallet-xcm` as a dependency , then write code in `Parachain A` to create the instruction and then call send which is on `pallet-xcm`? &#xD;&#xA;Is there any sample code that does this or detailed instruction on this or programmatically executing xcm?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37146" PostHistoryTypeId="24" PostId="9336" RevisionGUID="f9f02542-53d9-4334-ba40-2fa115b64f61" CreationDate="2023-07-20T15:48:16.087" Comment="Proposed by 354 approved by 2960 edit id of 505" ContentLicense="CC BY-SA 4.0" />
  <row Id="37147" PostHistoryTypeId="5" PostId="9336" RevisionGUID="adda1b4b-380c-4ec6-9f4f-070631d57b5a" CreationDate="2023-07-20T15:48:46.963" UserId="2960" Comment="added 1835 characters in body" Text="I have a local relaychain setup with 2 parachains `Parachain A` and `Parachain B`  .&#xD;&#xA;I will like to execute an XCM message from `Parachain A` to execute an extrinsic on `Parachain B` using the `Transact instruction`.How do I achieve this programmatically without using `polkadot.js` webapp. Do I need to add `pallet-xcm` as a dependency , then write code in `Parachain A` to create the instruction and then call send which is on `pallet-xcm`? &#xD;&#xA;Is there any sample code that does this or detailed instruction on this or programmatically executing xcm?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// UPDATE&#xD;&#xA;&#xD;&#xA;When sending Transact XCM Instruction from parachain A, how do I specify (or how does the xcm-executor know) the pallet / pallet id  on the target Parachain B which contains the extrinsic to be executed, or is it not required?&#xD;&#xA;&#xD;&#xA;for example.&#xD;&#xA;The following Transact Xcm message is sent from parachain A to execute an extrinsic called ping defined in the cumulus-ping pallet on Parachain B.&#xD;&#xA;In the xcm message below, I do not see the cumulus-ping pallet or the index of the cumulus-ping pallet specified in the XCM instruction. so how does XCM determine the pallet / module where the  ping extrinsic on Parachain B is located?&#xD;&#xA;The code I attached below is from the cumulus repo [here][1]&#xD;&#xA;&#xD;&#xA;// This is Parachain A, which sends the xcm message&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;    send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;    					(Parent, Junction::Parachain(para.into())).into(),&#xD;&#xA;    					Xcm(vec![Transact {&#xD;&#xA;    						origin_kind: OriginKind::Native,&#xD;&#xA;    						require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;    						call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::ping {&#xD;&#xA;    							seq,&#xD;&#xA;    							payload: payload.clone().to_vec(),&#xD;&#xA;    						})&#xD;&#xA;    						.encode()&#xD;&#xA;    						.into(),&#xD;&#xA;    					}]),&#xD;&#xA;    				) &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// This is the runtime of patachain B which contains cumulus-ping pallet which has the ping extrinsic&#xD;&#xA;&#xD;&#xA;    construct_runtime! {&#xD;&#xA;    	pub enum Runtime where&#xD;&#xA;    		Block = Block,&#xD;&#xA;    		NodeBlock = generic::Block&lt;Header, sp_runtime::OpaqueExtrinsic&gt;,&#xD;&#xA;    		UncheckedExtrinsic = UncheckedExtrinsic,&#xD;&#xA;    	{&#xD;&#xA;    		System: frame_system::{Pallet, Call, Storage, Config, Event&lt;T&gt;},&#xD;&#xA;    		...&#xD;&#xA;    		Spambot: cumulus_ping::{Pallet, Call, Storage, Event&lt;T&gt;} = 99,&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/a05c09c6d525d7ab62e95643666154b8b0abb546/parachains/pallets/ping/src/lib.rs#L206" ContentLicense="CC BY-SA 4.0" />
  <row Id="37148" PostHistoryTypeId="50" PostId="8947" RevisionGUID="a43ebb00-b142-4d55-9489-e0a77caa3db3" CreationDate="2023-07-20T18:07:20.833" UserId="-1" />
  <row Id="37149" PostHistoryTypeId="2" PostId="9355" RevisionGUID="28782b05-affa-4f9b-bcfc-5911a8e3221e" CreationDate="2023-07-20T18:38:50.363" UserId="427" Text="Let's address your questions one by one:&#xD;&#xA;&#xD;&#xA;**WithdrawOrigin Origin Check:**&#xD;&#xA;The purpose of the WithdrawOrigin origin check in the pallet_evm::Config is to control which origin is allowed to withdraw funds from the EVM contract. In the context of the EVM pallet, &quot;withdraw&quot; refers to transferring funds from the EVM contract's balance (Ethereum-like account) to the native currency account in your runtime. This is needed because, in Substrate-based blockchains, there might be multiple pallets or modules that handle different types of accounts, and the WithdrawOrigin specifies the origin that can execute a withdrawal from the EVM contract.&#xD;&#xA;&#xD;&#xA;For example, if your runtime uses multiple account systems like AccountId32 and AccountId, the WithdrawOrigin provides a way to specify which origin (e.g., AccountId32 or AccountId) is allowed to trigger a withdrawal from the EVM contract back to the native currency's account.&#xD;&#xA;&#xD;&#xA;**Address Truncation and Hashing:**&#xD;&#xA;The confusion you have about H160 and AccountId32 is because of the nature of Ethereum addresses and how they are represented in Substrate runtimes. Ethereum addresses are 20 bytes long (160 bits), and they are typically represented using H160 in the context of the EVM pallet.&#xD;&#xA;&#xD;&#xA;However, in Substrate runtimes, the native accounts can have varying lengths, depending on the runtime configuration. AccountId32 represents an account identifier that is 32 bytes long (256 bits).&#xD;&#xA;&#xD;&#xA;The EnsureAddressOrigin implementation you provided (EnsureAddressTruncated) is used to ensure that the origin provided to the EVM pallet contains a truncated hash of the account identifier (AccountId32). It checks whether the first 20 bytes of the provided account ID match the first 20 bytes of the Ethereum address (H160).&#xD;&#xA;&#xD;&#xA;The implementation is using AccountId32 as the origin because that's the type used in your runtime's configuration. When the origin is passed to the EVM pallet, it first checks if the origin is from RawOrigin::Signed (indicating a signed extrinsic), and if so, it extracts the account ID (AccountId32), truncates it to the first 20 bytes (H160 size), and then compares it with the provided Ethereum address (H160). If they match, the check is successful, and the provided AccountId32 is considered valid as the origin.&#xD;&#xA;&#xD;&#xA;**pallet_evm::withdraw Extrinsic:**&#xD;&#xA;The pallet_evm::withdraw extrinsic is an extrinsic provided by the EVM pallet that allows users to withdraw funds from the EVM contract back to their native currency account. When you interact with the EVM contract, it will accumulate funds in the contract's balance. The pallet_evm::withdraw extrinsic provides a way for users to transfer these funds from the EVM contract back to their designated account (specified by the WithdrawOrigin).&#xD;&#xA;&#xD;&#xA;In summary, the WithdrawOrigin allows you to control which origin can trigger withdrawals from the EVM contract, and the pallet_evm::withdraw extrinsic enables users to withdraw funds from the EVM contract to their designated account in the native currency of the runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37151" PostHistoryTypeId="2" PostId="9356" RevisionGUID="6e9a61de-27f8-465d-ae2c-d2dfb957ab0c" CreationDate="2023-07-20T20:29:05.043" UserId="4342" Text="I fixed it by simply **specifying the `gasLimit`**. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    const result = Contract.tx['psp22::approve']({&#xD;&#xA;      gasLimit: api.createType('WeightV2', {&#xD;&#xA;        refTime: 99999999999,&#xD;&#xA;        proofSize: 99999999999,&#xD;&#xA;      })&#xD;&#xA;    }&#xD;&#xA;      , AlephcontractAddress, api.createType(&quot;Balance&quot;, 100));" ContentLicense="CC BY-SA 4.0" />
  <row Id="37153" PostHistoryTypeId="5" PostId="1082" RevisionGUID="242becbc-b1e7-4fe1-a0bf-0cd5a7e76bdd" CreationDate="2023-07-20T22:18:04.630" UserId="29" Comment="more!" Text="This is a hard question to answer but I will try to give my 2 **..**'s on what was helpful for me when I started on the Substrate path as a Polkadot Support Engineer at Parity. Maybe some others can share their perspective as well.&#xD;&#xA;&#xD;&#xA;If you have a bit of a programming background and your goal is that you want to learn blockchain to become familiar with Substrate I would recommend the following:&#xD;&#xA;&#xD;&#xA;Learn blockchain fundamentals with Bill Laboon:&#xD;&#xA;- [Blockchain Fundamentals](https://youtube.com/playlist?list=PLxVihxZC42nF_MCN9PTvZMIifRjx9cZ2J)&#xD;&#xA;&#xD;&#xA;Become familiar with [Substrate Docs](https://substrate.io):&#xD;&#xA;- https://docs.substrate.io/v3/getting-started/overview&#xD;&#xA;&#xD;&#xA;Do **all** the Substrate tutorials:&#xD;&#xA;- https://docs.substrate.io/tutorials/v3&#xD;&#xA;&#xD;&#xA;Subscribe &amp; watch videos&#xD;&#xA;- [Parity Tech YouTube](https://www.youtube.com/c/ParityTech)&#xD;&#xA;&#xD;&#xA;Learn about the [different pallets](https://paritytech.github.io/substrate/master/sc_service/index.html?search=pallet) available to you. Read them.&#xD;&#xA;- Use the full Substrate [node runtime](https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs) as a reference as to how to configure some of these pallets&#xD;&#xA;- Pick a pallet and try to implement it yourself using the [Substrate Node Template](https://github.com/substrate-developer-hub/substrate-node-template)&#xD;&#xA;&#xD;&#xA;Build stuff&#xD;&#xA;- Don't be afraid to get your &quot;hands dirty&quot;&#xD;&#xA;- Pick something that you don't know and try to learn it&#xD;&#xA;- Become comfortable configuring and running nodes &#xD;&#xA;- Build a pallet from scratch&#xD;&#xA;&#xD;&#xA;Adopt a growth-mindset&#xD;&#xA;- Learn a little everyday; this adds up&#xD;&#xA;&#xD;&#xA;Keep up-to-date on what is happening in the [Polkadot community](https://wiki.polkadot.network/docs/community) especially the Element chats and Github.&#xD;&#xA;&#xD;&#xA;Go deeper into Substrate:&#xD;&#xA;- [Substrate How-To Guides](https://docs.substrate.io/how-to-guides/v3)&#xD;&#xA;&#xD;&#xA;Read the docs!&#xD;&#xA;- [Substrate Rust Docs](https://paritytech.github.io/substrate/master/sc_service/index.html)&#xD;&#xA;- Specifically, you can start with the Substrate crate:&#xD;&#xA;  - https://paritytech.github.io/substrate/master/substrate&#xD;&#xA;- This is the Substrate Developer's bible&#xD;&#xA;&#xD;&#xA;Read the code!&#xD;&#xA;- https://github.com/paritytech/substrate&#xD;&#xA;- This is the Substrate Developer's home&#xD;&#xA;- You should be regularly poking around in the Substrate codebase to understand how things work; don't be satisfied with concepts, you should understand how it works in the code as well.&#xD;&#xA;&#xD;&#xA;Stay up-to-date on Stack Exchange:&#xD;&#xA;- [Substrate Stack Exchange](https://substrate.stackexchange.com)&#xD;&#xA;- Replicate the issues, solve them&#xD;&#xA;&#xD;&#xA;Learn Rust as you learn Substrate:&#xD;&#xA;- [Rust Book](https://doc.rust-lang.org/book)&#xD;&#xA;- Several other resources available&#xD;&#xA;&#xD;&#xA;Find a mentor &#xD;&#xA;- Blockchain &amp; the Polkadot ecosystem can be complex; however, the community is thriving, there are Polkadot events online and all over the world - great place to meet others who are a little further on the Substrate path&#xD;&#xA;&#xD;&#xA;From here, you could specialize e.g. Substrate Runtime Engineer, Substrate Parachain Engineer, etc. depending on the path you want to take there are a number of additional resources available to you.&#xD;&#xA;&#xD;&#xA;**And last but not least:**&#xD;&#xA;- Participate in a Substrate-related hackathon!&#xD;&#xA;&#xD;&#xA;**AND** participate in the **Polkadot Blockchain Academy**:&#xD;&#xA;- https://polkadot.network/development/academy&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kkK1a.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37154" PostHistoryTypeId="50" PostId="6919" RevisionGUID="1e0e8340-7eda-456b-99ce-02b392d0da63" CreationDate="2023-07-20T23:07:30.930" UserId="-1" />
  <row Id="37155" PostHistoryTypeId="5" PostId="9341" RevisionGUID="1740f3d6-c70a-49c3-9294-010357a4c7b6" CreationDate="2023-07-20T23:12:52.100" UserId="3344" Comment="Add links as requested" Text="Is there any documentation on how to gracefully and securely wind up a [relay](https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/), [parallel](https://docs.substrate.io/reference/how-to-guides/parachains/) or [on-demand](https://wiki.polkadot.network/docs/learn-parathreads) (aka [parathreads](https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/)) chain?&#xD;&#xA;&#xD;&#xA;Here the chain(s) are in the wild/live/production.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37156" PostHistoryTypeId="5" PostId="9341" RevisionGUID="d19ebc3a-91c2-45cb-a66e-b40e641262b1" CreationDate="2023-07-20T23:18:51.297" UserId="3344" Comment="Add links as requested" Text="Is there any documentation on how to gracefully and **securely** wind up a [relay](https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/), [parallel](https://docs.substrate.io/reference/how-to-guides/parachains/) or [on-demand](https://wiki.polkadot.network/docs/learn-parathreads) (aka [parathreads](https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/)) chain?&#xD;&#xA;&#xD;&#xA;Here the chain(s) are in the wild/live/production.&#xD;&#xA;&#xD;&#xA;Securely, means protecting the integrity of long-lived data - data whose value/sensitivity outlives the blockchain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37157" PostHistoryTypeId="5" PostId="4740" RevisionGUID="f98b4f28-a9a7-40be-9f93-4432efd2b6d0" CreationDate="2023-07-21T04:58:46.927" UserId="1789" Comment="ERC20-Permit" Text="Option 1: Make precompiles for all the EVM functions that need to be gasless. &#xD;&#xA;When Ethereum users call those precompile functions, they will see 0 ETH gas cost on their MetaMask. &#xD;&#xA;&#xD;&#xA;Also, Moombean has a lot of precompiles written already like ERC20, staking, etc...&#xD;&#xA;&#xD;&#xA;Option 2: Checkout ERC20-Permit developed by OpenZeppelin and Solmate for gasless token transfer" ContentLicense="CC BY-SA 4.0" />
  <row Id="37158" PostHistoryTypeId="2" PostId="9357" RevisionGUID="b964cd48-8338-4a85-bba0-446a0396adcb" CreationDate="2023-07-21T05:43:52.027" UserId="251" Text="Frontier will begin creating the database starting from block 0 and proceed sequentially. &#xD;&#xA;&#xD;&#xA;Similar logic patterns can be observed in GRANDPA or BABE, particularly in the consensus aspect. This will also have an impact on the implementation of light clients.&#xD;&#xA;&#xD;&#xA;It is important to mention that many DApps commonly assume that the genesis block is set to 0, which they integrate into their business logic." ContentLicense="CC BY-SA 4.0" />
  <row Id="37160" PostHistoryTypeId="5" PostId="9357" RevisionGUID="694f83b1-57b0-45a3-ae50-e26ba40cac9f" CreationDate="2023-07-21T05:58:57.690" UserId="251" Comment="added 61 characters in body" Text="For instance, Frontier will initiate database creation beginning with the most recent block number, processing them in a sequence from back to forward until 0.&#xD;&#xA;&#xD;&#xA;Similar logic patterns can be observed in GRANDPA or BABE, particularly in the consensus aspect. This will also have an impact on the implementation of light clients.&#xD;&#xA;&#xD;&#xA;It is important to mention that many DApps commonly assume that the genesis block is set to 0, which they integrate into their business logic." ContentLicense="CC BY-SA 4.0" />
  <row Id="37161" PostHistoryTypeId="2" PostId="9358" RevisionGUID="8b6f6375-0b26-44a0-8ece-2c303c3f8fcd" CreationDate="2023-07-21T07:39:53.153" UserId="4277" Text="**Error:**&#xD;&#xA;&#xD;&#xA;    const CONTRACTS_EVENTS: pallet_contracts::CollectEvents =&#xD;&#xA;                                                 ^^^^^^^^^^^^^ not found in `pallet_contracts&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`Cargo.toml` File &#xD;&#xA;&#xD;&#xA;    pallet-contracts = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;    pallet-contracts-primitives = { version = &quot;7.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v0.9.42&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`runtime -&gt; src -&gt; lib.rs` file &#xD;&#xA;&#xD;&#xA;    const CONTRACTS_EVENTS: pallet_contracts::CollectEvents =&#xD;&#xA;    pallet_contracts::CollectEvents::UnsafeCollect;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37163" PostHistoryTypeId="1" PostId="9358" RevisionGUID="8b6f6375-0b26-44a0-8ece-2c303c3f8fcd" CreationDate="2023-07-21T07:39:53.153" UserId="4277" Text="Could not find `CollectiveEvents` in `pallet_contracts`" ContentLicense="CC BY-SA 4.0" />
  <row Id="37164" PostHistoryTypeId="3" PostId="9358" RevisionGUID="8b6f6375-0b26-44a0-8ece-2c303c3f8fcd" CreationDate="2023-07-21T07:39:53.153" UserId="4277" Text="|substrate-contracts-node|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37165" PostHistoryTypeId="50" PostId="8945" RevisionGUID="3bd3d3a5-5bc1-44ff-8f56-529770e12a94" CreationDate="2023-07-21T08:00:40.150" UserId="-1" />
  <row Id="37166" PostHistoryTypeId="50" PostId="5506" RevisionGUID="7d7ed667-cf38-4789-a2f7-f4ec54105b85" CreationDate="2023-07-21T11:02:05.247" UserId="-1" />
  <row Id="37167" PostHistoryTypeId="2" PostId="9359" RevisionGUID="a15bd45d-4fb0-4955-a9a9-3f435d86cfd0" CreationDate="2023-07-21T11:20:09.307" UserId="3" Text="If I'm reading the code of pallet-scheduler correctly, if the preimage of an agenda is not available, then the agenda remains in storage, but `IncompleteSince` is not updated, which means that the agenda will remain in storage without any chance of executing the scheduled call later, even if the preimage is supplied. According to this test, this is expected behavior: https://github.com/paritytech/substrate/blob/713e34ae960d122519093c9015f64c4afd74aa53/frame/scheduler/src/tests.rs#L1135-L1199&#xD;&#xA;&#xD;&#xA;But why isn't the agenda just removed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37169" PostHistoryTypeId="1" PostId="9359" RevisionGUID="a15bd45d-4fb0-4955-a9a9-3f435d86cfd0" CreationDate="2023-07-21T11:20:09.307" UserId="3" Text="Why does pallet-scheduler retain agends with unavailable preimages" ContentLicense="CC BY-SA 4.0" />
  <row Id="37170" PostHistoryTypeId="3" PostId="9359" RevisionGUID="a15bd45d-4fb0-4955-a9a9-3f435d86cfd0" CreationDate="2023-07-21T11:20:09.307" UserId="3" Text="|pallet-scheduler|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37171" PostHistoryTypeId="2" PostId="9360" RevisionGUID="b0ed56f5-df92-4984-89b6-f51d85b6772d" CreationDate="2023-07-21T12:02:17.127" UserId="251" Text="After upgrading the Substrate to `polkadot-v0.9.43`.&#xD;&#xA;&#xD;&#xA;I got the following error while running the runtime benchmarks.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;2023-07-21 19:55:56 Starting benchmark: frame_system::set_code    &#xD;&#xA;Error: Input(&quot;Benchmark frame_system::set_code failed: ValidationDataNotAvailable&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Before this upgrade, everything works well." ContentLicense="CC BY-SA 4.0" />
  <row Id="37173" PostHistoryTypeId="1" PostId="9360" RevisionGUID="b0ed56f5-df92-4984-89b6-f51d85b6772d" CreationDate="2023-07-21T12:02:17.127" UserId="251" Text="How to benchmark frame-system on parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37174" PostHistoryTypeId="3" PostId="9360" RevisionGUID="b0ed56f5-df92-4984-89b6-f51d85b6772d" CreationDate="2023-07-21T12:02:17.127" UserId="251" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37175" PostHistoryTypeId="2" PostId="9361" RevisionGUID="9d4916ea-dd5e-4d8b-a975-e4e3982599a4" CreationDate="2023-07-21T12:06:35.580" UserId="251" Text="I found that I missed an update on Cumulus/Substrate side.&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;- impl frame_system_benchmarking::Config for Runtime {}&#xD;&#xA;+ impl frame_system_benchmarking::Config for Runtime {&#xD;&#xA;+ 	fn setup_set_code_requirements(code: &amp;sp_std::vec::Vec&lt;u8&gt;) -&gt; Result&lt;(), BenchmarkError&gt; {&#xD;&#xA;+ 		ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32);&#xD;&#xA;+ 		Ok(())&#xD;&#xA;+ 	}&#xD;&#xA;+ &#xD;&#xA;+ 	fn verify_set_code() {&#xD;&#xA;+ 		System::assert_last_event(cumulus_pallet_parachain_system::Event::&lt;Runtime&gt;::ValidationFunctionStored.into());&#xD;&#xA;+ 	}&#xD;&#xA;+ }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For more detail check, https://github.com/paritytech/cumulus/pull/2766." ContentLicense="CC BY-SA 4.0" />
  <row Id="37177" PostHistoryTypeId="2" PostId="9362" RevisionGUID="b11e041b-90ca-4b33-a5d8-85ac08334015" CreationDate="2023-07-21T12:09:23.487" UserId="2844" Text="I am writing ink! contract to generate random number between min and max value. I found [this](https://docs.astar.network/docs/build/builder-guides/xvm_wasm/pseudo_random/) article. Here we can generate random number between 0 to 99. Then I modified to generate random number between 0 to 14999. But I am testing for long time I never get value more than 252. Is there something wrong with this code? Someone please check this code. It is possible to generate random number between 0 to 14999 using this code or not?&#xD;&#xA;&#xD;&#xA;Here is my code repo [github](https://github.com/ganesh1233456/random-ink)" ContentLicense="CC BY-SA 4.0" />
  <row Id="37179" PostHistoryTypeId="1" PostId="9362" RevisionGUID="b11e041b-90ca-4b33-a5d8-85ac08334015" CreationDate="2023-07-21T12:09:23.487" UserId="2844" Text="Generate random number ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="37180" PostHistoryTypeId="3" PostId="9362" RevisionGUID="b11e041b-90ca-4b33-a5d8-85ac08334015" CreationDate="2023-07-21T12:09:23.487" UserId="2844" Text="|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37181" PostHistoryTypeId="12" PostId="9361" RevisionGUID="4e165fbc-3ea7-478e-b107-0fb1de9be5d2" CreationDate="2023-07-21T12:11:31.500" UserId="251" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;}],&quot;DeleteType&quot;:1}" />
  <row Id="37182" PostHistoryTypeId="13" PostId="9361" RevisionGUID="c5a38070-56e9-4094-a3cf-69aa69dd4f24" CreationDate="2023-07-21T12:14:33.130" UserId="251" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;}]}" />
  <row Id="37183" PostHistoryTypeId="5" PostId="9361" RevisionGUID="4531109d-eb24-4ef2-81af-5406b64cdc38" CreationDate="2023-07-21T12:17:50.443" UserId="251" Comment="added 163 characters in body" Text="I found that I missed an update on Cumulus/Substrate side.&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;- impl frame_system_benchmarking::Config for Runtime {}&#xD;&#xA;+ impl frame_system_benchmarking::Config for Runtime {&#xD;&#xA;+ 	fn setup_set_code_requirements(code: &amp;sp_std::vec::Vec&lt;u8&gt;) -&gt; Result&lt;(), BenchmarkError&gt; {&#xD;&#xA;+ 		ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32);&#xD;&#xA;+ 		Ok(())&#xD;&#xA;+ 	}&#xD;&#xA;+ &#xD;&#xA;+ 	fn verify_set_code() {&#xD;&#xA;+ 		System::assert_last_event(cumulus_pallet_parachain_system::Event::&lt;Runtime&gt;::ValidationFunctionStored.into());&#xD;&#xA;+ 	}&#xD;&#xA;+ }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For more detail check, https://github.com/paritytech/cumulus/pull/2766.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The interesting thing is this PR is not included in `polkadot-v0.9.43`. And I found that cumulus didn't benchmark `frame-system` for `polkadot-v0.9.43`." ContentLicense="CC BY-SA 4.0" />
  <row Id="37184" PostHistoryTypeId="6" PostId="9362" RevisionGUID="e9ec73ac-e02b-4dce-8ba7-d8820edb0d1e" CreationDate="2023-07-21T12:18:41.053" UserId="2844" Comment="edited tags" Text="|ink|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37185" PostHistoryTypeId="5" PostId="9361" RevisionGUID="c1a71fcd-97b3-48bc-9df6-7aad85f90fdc" CreationDate="2023-07-21T12:25:59.613" UserId="251" Comment="added 6 characters in body" Text="I found that I missed an update on Cumulus/Substrate side.&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;- impl frame_system_benchmarking::Config for Runtime {}&#xD;&#xA;+ impl frame_system_benchmarking::Config for Runtime {&#xD;&#xA;+ 	fn setup_set_code_requirements(code: &amp;sp_std::vec::Vec&lt;u8&gt;) -&gt; Result&lt;(), BenchmarkError&gt; {&#xD;&#xA;+ 		ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32);&#xD;&#xA;+ 		Ok(())&#xD;&#xA;+ 	}&#xD;&#xA;+ &#xD;&#xA;+ 	fn verify_set_code() {&#xD;&#xA;+ 		System::assert_last_event(cumulus_pallet_parachain_system::Event::&lt;Runtime&gt;::ValidationFunctionStored.into());&#xD;&#xA;+ 	}&#xD;&#xA;+ }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For more detail check, https://github.com/paritytech/cumulus/pull/2766.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The interesting thing is that this PR was not included in `polkadot-v0.9.43`. And I found that cumulus didn't benchmark `frame-system` for `polkadot-v0.9.43`." ContentLicense="CC BY-SA 4.0" />
  <row Id="37186" PostHistoryTypeId="2" PostId="9363" RevisionGUID="0e14fe99-76a9-4c14-bdde-c2acb47137f3" CreationDate="2023-07-21T13:19:24.597" UserId="427" Text="Getting the current active validators could be done. Also getting the past Active validators also can be queried using EraStakers in staking pallet. How to query waiting validators by Era Index?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37188" PostHistoryTypeId="1" PostId="9363" RevisionGUID="0e14fe99-76a9-4c14-bdde-c2acb47137f3" CreationDate="2023-07-21T13:19:24.597" UserId="427" Text="How to query the waiting validators in past eras?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37189" PostHistoryTypeId="3" PostId="9363" RevisionGUID="0e14fe99-76a9-4c14-bdde-c2acb47137f3" CreationDate="2023-07-21T13:19:24.597" UserId="427" Text="|validator|session|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37190" PostHistoryTypeId="2" PostId="9364" RevisionGUID="e41f5e5b-f7b7-408f-a9de-b369b163d06f" CreationDate="2023-07-21T13:25:11.237" UserId="139" Text="I am trying to spin a zombinet with a relay chain and multiple parachains, and everything runs fine until adding the following code for opening up HRMP channels :&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[[hrmp_channels]]&#xD;&#xA;sender = 1000&#xD;&#xA;recipient = 2058&#xD;&#xA;maxCapacity = 8&#xD;&#xA;maxMessageSize = 8000&#xD;&#xA;&#xD;&#xA;[[hrmp_channels]]&#xD;&#xA;sender = 2058&#xD;&#xA;recipient = 1000&#xD;&#xA;maxCapacity = 8&#xD;&#xA;maxMessageSize = 8000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```shell&#xD;&#xA;Error:  	 Error: Command failed with exit code 1: bash -c bin/polkadot build-spec --chain /tmp/zombie-453fa9da8398b3e0ea8a5193e4f5b29e_-40192-gUu4dLvbM9Al/rococo-local-plain.json --disable-default-bootnode  --raw &gt; /tmp/zombie-453fa9da8398b3e0ea8a5193e4f5b29e_-40192-gUu4dLvbM9Al/rococo-local-raw.json&#xD;&#xA;Error: &#xD;&#xA;   0: Other: Error parsing spec file: invalid type: null, expected u32 at line 275 column 18&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;I am not sure how to proceed.. I am using the latest zombienet release (1.3.63)." ContentLicense="CC BY-SA 4.0" />
  <row Id="37192" PostHistoryTypeId="1" PostId="9364" RevisionGUID="e41f5e5b-f7b7-408f-a9de-b369b163d06f" CreationDate="2023-07-21T13:25:11.237" UserId="139" Text="Debugging zombienet config after using hrmp channels" ContentLicense="CC BY-SA 4.0" />
  <row Id="37193" PostHistoryTypeId="3" PostId="9364" RevisionGUID="e41f5e5b-f7b7-408f-a9de-b369b163d06f" CreationDate="2023-07-21T13:25:11.237" UserId="139" Text="|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37194" PostHistoryTypeId="5" PostId="9361" RevisionGUID="de2741ea-e611-4f0d-b9bb-2a499582398a" CreationDate="2023-07-21T13:33:30.847" UserId="251" Comment="added 5 characters in body" Text="I found that I missed an update on Cumulus/Substrate side.&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;- impl frame_system_benchmarking::Config for Runtime {}&#xD;&#xA;+ impl frame_system_benchmarking::Config for Runtime {&#xD;&#xA;+ 	fn setup_set_code_requirements(code: &amp;sp_std::vec::Vec&lt;u8&gt;) -&gt; Result&lt;(), BenchmarkError&gt; {&#xD;&#xA;+ 		ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32);&#xD;&#xA;+ 		Ok(())&#xD;&#xA;+ 	}&#xD;&#xA;+ &#xD;&#xA;+ 	fn verify_set_code() {&#xD;&#xA;+ 		System::assert_last_event(cumulus_pallet_parachain_system::Event::&lt;Runtime&gt;::ValidationFunctionStored.into());&#xD;&#xA;+ 	}&#xD;&#xA;+ }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For more detail check, https://github.com/paritytech/cumulus/pull/2766.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;The interesting thing is that this PR was not included in `polkadot-v0.9.43`. And I also found that cumulus didn't benchmark `frame-system` for `polkadot-v0.9.43`." ContentLicense="CC BY-SA 4.0" />
  <row Id="37195" PostHistoryTypeId="4" PostId="9359" RevisionGUID="34ff6d6a-549e-4d44-850d-887d56c9c6b5" CreationDate="2023-07-21T13:53:19.173" UserId="3" Comment="edited title" Text="Why does pallet-scheduler retain agendas with unavailable preimages" ContentLicense="CC BY-SA 4.0" />
  <row Id="37196" PostHistoryTypeId="2" PostId="9365" RevisionGUID="ff998b7c-9f38-4b98-9360-1a686a8747b8" CreationDate="2023-07-21T14:06:48.943" UserId="3317" Text="I'm struggling to benchmark my extrinsics that are called by the [`pallet_collective::RawOrigin`][1]. I found [this][2] answer that got me close:&#xD;&#xA;```&#xD;&#xA;let origin: &lt;T as frame_system::Config&gt;::RuntimeOrigin = pallet_collective::RawOrigin::Members(condoned, total).into();&#xD;&#xA;#[extrinsic_call]&#xD;&#xA;_(origin, Box::new(call));&#xD;&#xA;```&#xD;&#xA;However, I get the error message:&#xD;&#xA;![enter image description here][3]&#xD;&#xA;&#xD;&#xA;I found [this post][4] which looks very similar however I included pallet_collective in the mock runtime (`Instance1`).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/713e34ae960d122519093c9015f64c4afd74aa53/frame/collective/src/lib.rs#L139&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/5442/how-to-make-calls-with-council-origin&#xD;&#xA;  [3]: https://i.stack.imgur.com/uzg5C.png&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/7784/substrate-poa-and-validator-set-and-pallet-collection-configuration-error-the-tr" ContentLicense="CC BY-SA 4.0" />
  <row Id="37198" PostHistoryTypeId="1" PostId="9365" RevisionGUID="ff998b7c-9f38-4b98-9360-1a686a8747b8" CreationDate="2023-07-21T14:06:48.943" UserId="3317" Text="How to call with `pallet_collective::RawOrigin` within another pallet's benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="37199" PostHistoryTypeId="3" PostId="9365" RevisionGUID="ff998b7c-9f38-4b98-9360-1a686a8747b8" CreationDate="2023-07-21T14:06:48.943" UserId="3317" Text="|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37200" PostHistoryTypeId="2" PostId="9366" RevisionGUID="2f9383ce-09e4-44ec-b19b-44dc770e0b2d" CreationDate="2023-07-21T15:18:45.800" UserId="279" Text="thanks for using `zombienet` and open this questions. The keys to set an `hrmp` channel are `max_capacity` and `max_message_size` (you can check the [docs](https://paritytech.github.io/zombienet/network-definition-spec.html#hrmp_channels-array-of-objects). With this change the network should spin as expected.&#xD;&#xA;&#xD;&#xA;As reference, this should works&#xD;&#xA;```&#xD;&#xA;[[hrmp_channels]]&#xD;&#xA;sender = 1000&#xD;&#xA;recipient = 2058&#xD;&#xA;max_capacity = 8&#xD;&#xA;max_message_size = 8000&#xD;&#xA;&#xD;&#xA;[[hrmp_channels]]&#xD;&#xA;sender = 2058&#xD;&#xA;recipient = 1000&#xD;&#xA;max_capacity = 8&#xD;&#xA;max_message_size = 8000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;p.s: Can you open an issue in the [repo](https://github.com/paritytech/zombienet) to improve this config error reporting? " ContentLicense="CC BY-SA 4.0" />
  <row Id="37202" PostHistoryTypeId="2" PostId="9367" RevisionGUID="3f7bbc2b-6aa1-4159-899a-b196c24872d8" CreationDate="2023-07-21T16:31:58.673" UserId="529" Text="The Keccak256 hash algorithm produces a 256-bit (32-byte) hash, and its associated type `Type` is `[u8; 32]`.&#xD;&#xA;&#xD;&#xA;In your code you always take just output[0] which is u8 type and your result is always less than u8::MAX.&#xD;&#xA;to use more bits from generated hash you can change your code to something like&#xD;&#xA;```&#xD;&#xA;let number_bytes = [output[0], output[1]];&#xD;&#xA;let z = u16::from_be_bytes(number_bytes);&#xD;&#xA;let number = z as u128 % (self.max_value + 1);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="37204" PostHistoryTypeId="2" PostId="9368" RevisionGUID="d9ee50f8-b845-4809-9367-e187ce67fe61" CreationDate="2023-07-21T16:40:28.040" UserId="94" Text="The return value of the origin is never used, so in order to construct the call you just need *any* instance that will pass the `ensure_origin` filter.  &#xD;&#xA;&#xD;&#xA;This can be achieved by using the `try_successful_origin` of the origin type itself to provide a valid instance. You can create such an origin like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let origin =&#xD;&#xA;    &lt;T as Config&gt;::SimpleMajorityOrigin::try_successful_origin()&#xD;&#xA;    .map_err(|_| BenchmarkError::Weightless)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This in total will not work *quite* yet, but there is a custom syntax in the V2 that can be used to coerce the type such that the call becomes:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[extrinsic_call]&#xD;&#xA;_(origin as T::RuntimeOrigin, Box::new(call));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that the `pallet_collective` is not needed at all in this case, since it would be an implementation detail of the runtime developer of how to provide a concrete `SimpleMajorityOrigin` type." ContentLicense="CC BY-SA 4.0" />
  <row Id="37206" PostHistoryTypeId="2" PostId="9369" RevisionGUID="05ca9a61-e61c-498d-a7c9-bd89d25ba0e8" CreationDate="2023-07-21T22:29:03.090" UserId="83" Text="I want to make an XVM call from an ink! contract that is deployed to the Shibuya Wasm environment  to a Solidity EVM contract that is deployed to the Shibuya EVM environment.&#xD;&#xA;&#xD;&#xA;To deploy the Solidity EVM contract I want to use Truffle, so I followed the official Astar instructions here https://docs.astar.network/docs/build/builder-guides/astar_features/truffle/ where it says to use  `from: &quot;0x(your Shibuya account address)&quot;` in my Truffle configuration file truffle-config.js, but none of the Shibuya account addresses that I have generated work when I try to migrate the EVM smart contract by running `truffle migrate --reset --compile-all --network shibuya`. The Truffle documentation [here][1] says that the `from` field is for _&quot;From address used during migrations. Defaults to the first available account provided by your Ethereum client.&quot;_&#xD;&#xA;&#xD;&#xA;The steps I took to try to resolve it so far include the following. All the code that I've mentioned is published here [https://github.com/ltfschoen/XCMTemplate/pull/25][2] and I was using endpoint `wss://shibuya.public.blastapi.io`:&#xD;&#xA;&#xD;&#xA; 1. Created a Shibuya address using [Subkey][3] using Docker by running `docker run -it --pull=always docker.io/parity/subkey:latest generate --network astar`, which output the following, except I haven't shown the mnemonic phrase and private key below, then I used a faucet to give that address a 10 SBY account balance, which I verified here [https://shibuya.subscan.io/account/XXyzohKoEwDWXvpo7CS8unT7rjU6KoiaRm8iE1eWSXMpf3i][4]:&#xD;&#xA;```&#xD;&#xA;  Account ID:        0x46b03bc771e0799dcbc20302e3054b7f34d17e442189bd4acabc822f318afc6d&#xD;&#xA;  Public key (SS58): XXyzohKoEwDWXvpo7CS8unT7rjU6KoiaRm8iE1eWSXMpf3i&#xD;&#xA;```&#xD;&#xA; 2. Updated Truffle configuration file truffle-config.js to use that `Account ID`,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;from: &quot;0x46b03bc771e0799dcbc20302e3054b7f34d17e442189bd4acabc822f318afc6d&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 3. Ran `truffle migrate --reset --compile-all --network shibuya` to migrate the Solidity EVM contract to Shibuya network using Truffle, but it gave the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&gt; Compiled successfully using:&#xD;&#xA;   - solc: 0.8.21+commit.d9974bed.Emscripten.clang&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Starting migrations...&#xD;&#xA;======================&#xD;&#xA;&gt; Network name:    'shibuya'&#xD;&#xA;&gt; Network id:      81&#xD;&#xA;&gt; Block gas limit: 15000000 (0xe4e1c0)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1_initial_migration.js&#xD;&#xA;======================&#xD;&#xA;&#xD;&#xA;   Deploying 'Migrations'&#xD;&#xA;   ----------------------&#xD;&#xA; *** Deployment Failed ***&#xD;&#xA;&#xD;&#xA;&quot;Migrations&quot; -- Provided address 0x46b03bc771e0799dcbc20302e3054b7f34d17e442189bd4acabc822f318afc6d is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which can't be converted..&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Exiting: Review successful transactions manually by checking the transaction hashes above on Etherscan.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Error:  *** Deployment Failed ***&#xD;&#xA;&#xD;&#xA;&quot;Migrations&quot; -- Provided address 0x46b03bc771e0799dcbc20302e3054b7f34d17e442189bd4acabc822f318afc6d is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which can't be converted..&#xD;&#xA;&#xD;&#xA;    at /Users/luke/.nvm/versions/node/v16.18.1/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:330:1&#xD;&#xA;    at processTicksAndRejections (node:internal/process/task_queues:96:5)&#xD;&#xA;Truffle v5.11.0 (core: 5.11.0)&#xD;&#xA;Node v16.18.1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 4. Went to [https://shibuya.subscan.io/tools/format_transform?input=XXyzohKoEwDWXvpo7CS8unT7rjU6KoiaRm8iE1eWSXMpf3i&amp;type=All][5] to see what other addresses the `Public key (SS58)` value of `XXyzohKoEwDWXvpo7CS8unT7rjU6KoiaRm8iE1eWSXMpf3i` that was generated by Subkey would transform into, and it displayed:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Public Key&#xD;&#xA;0x46b03bc771e0799dcbc20302e3054b7f34d17e442189bd4acabc822f318afc6d&#xD;&#xA;&#xD;&#xA;H160&#xD;&#xA;0x46b03Bc771e0799dcBc20302e3054b7f34d17E44&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 5. I used the `H160` address that was shown for the value of the `from` field instead: &#xD;&#xA;```&#xD;&#xA;from: &quot;0x46b03Bc771e0799dcBc20302e3054b7f34d17E44&quot;&#xD;&#xA;```&#xD;&#xA;But when I ran `truffle migrate --reset --compile-all --network shibuya` it gave error: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;Migrations&quot; -- Unknown address - unable to sign transaction for this address: &quot;0x46b03bc771e0799dcbc20302e3054b7f34d17e44&quot;.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 6. Then I tried doing the following in truffle-config.js, but it appears to output a seemlingly **unrelated** address `0xe234aaD61a482eBB5f737ffFd4b868d829eAc455` for the privateKeyShibuya that I provided that was generated by Subkey, and it said it had no funds (since I only used the faucet to get SBY tokens for the account that was actually generated by Subkey). &#xD;&#xA;```js&#xD;&#xA;const { Web3 } = require('web3');&#xD;&#xA;let providerInstance = new Web3.providers.WebsocketProvider(&#xD;&#xA;   process.env.SHIBUYA_ENDPOINT, {}, { delay: 500, autoReconnect: true, maxAttempts: 100 });&#xD;&#xA;let web3 = new Web3(providerInstance);&#xD;&#xA;const accounts = web3.eth.accounts.privateKeyToAccount(privateKeyShibuya);&#xD;&#xA;console.log('accounts:', accounts);&#xD;&#xA;```&#xD;&#xA;outputs&#xD;&#xA;```&#xD;&#xA;accounts: {&#xD;&#xA;  address: '0xe234aaD61a482eBB5f737ffFd4b868d829eAc455',&#xD;&#xA;  privateKey: '...',&#xD;&#xA;  ....&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 7. Then I tried the suggestion here [https://stackoverflow.com/questions/68823402/provided-address-is-invalid-the-capitalization-checksum-test-failed][6] by adding the following to truffle-config.js. I made the assumption that I needed to use the `H160` address `0x46b03Bc771e0799dcBc20302e3054b7f34d17E44`: &#xD;&#xA;```js&#xD;&#xA;...&#xD;&#xA;const accountAddress = &quot;0x46b03Bc771e0799dcBc20302e3054b7f34d17E44&quot;;&#xD;&#xA;&#xD;&#xA;async function checksumShibuyaAccountAddress(_shibuyaAccountAddress) {&#xD;&#xA;   let providerInstance = await new Web3.providers.WebsocketProvider(&#xD;&#xA;      process.env.SHIBUYA_ENDPOINT, {}, { delay: 500, autoReconnect: true, maxAttempts: 100 });&#xD;&#xA;   let web3 = await new Web3(providerInstance);&#xD;&#xA;   console.log('web3.currentProvider: ', web3.currentProvider);&#xD;&#xA;   let checksumShibuyaAccountAddress = web3.utils.toChecksumAddress(_shibuyaAccountAddress);&#xD;&#xA;   return checksumShibuyaAccountAddress;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;module.exports = {&#xD;&#xA;...&#xD;&#xA;   networks: {&#xD;&#xA;      shibuya: {&#xD;&#xA;         provider: () =&gt; {&#xD;&#xA;         from: async () =&gt; {&#xD;&#xA;            let from = await checksumShibuyaAccountAddress(accountAddress);&#xD;&#xA;            console.log('checksumShibuyaAccountAddress from: ', from)&#xD;&#xA;            return from;&#xD;&#xA;         },&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, that outputs the same error as I got earlier:&#xD;&#xA;```&#xD;&#xA;... is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which can't be converted..&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://trufflesuite.com/docs/truffle/reference/configuration/&#xD;&#xA;  [2]: https://github.com/ltfschoen/XCMTemplate/pull/25&#xD;&#xA;  [3]: https://docs.substrate.io/reference/command-line-tools/subkey/&#xD;&#xA;  [4]: https://shibuya.subscan.io/account/XXyzohKoEwDWXvpo7CS8unT7rjU6KoiaRm8iE1eWSXMpf3i&#xD;&#xA;  [5]: https://shibuya.subscan.io/tools/format_transform?input=XXyzohKoEwDWXvpo7CS8unT7rjU6KoiaRm8iE1eWSXMpf3i&amp;type=All&#xD;&#xA;  [6]: https://stackoverflow.com/questions/68823402/provided-address-is-invalid-the-capitalization-checksum-test-failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="37208" PostHistoryTypeId="1" PostId="9369" RevisionGUID="05ca9a61-e61c-498d-a7c9-bd89d25ba0e8" CreationDate="2023-07-21T22:29:03.090" UserId="83" Text="Unable to recognise Shibuya account address to deploy an EVM contract on Shibuya network using Truffle" ContentLicense="CC BY-SA 4.0" />
  <row Id="37209" PostHistoryTypeId="3" PostId="9369" RevisionGUID="05ca9a61-e61c-498d-a7c9-bd89d25ba0e8" CreationDate="2023-07-21T22:29:03.090" UserId="83" Text="|evm|astar|shibuya|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37210" PostHistoryTypeId="5" PostId="9367" RevisionGUID="294ecb98-faf6-4c97-bef8-56df09257355" CreationDate="2023-07-21T22:43:25.067" UserId="83" Comment="formatting" Text="The Keccak256 hash algorithm produces a 256-bit (32-byte) hash, and its associated type `Type` is `[u8; 32]`.&#xD;&#xA;&#xD;&#xA;In your code you always take just `output[0]` of type `u8` and your result is always less than `u8::MAX`, which is `255u8` as mentioned [here][1].&#xD;&#xA;To use more bits from the generated hash you can change your code to something like:&#xD;&#xA;```rust&#xD;&#xA;let number_bytes = [output[0], output[1]];&#xD;&#xA;let z = u16::from_be_bytes(number_bytes);&#xD;&#xA;let number = z as u128 % (self.max_value + 1);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/std/u8/constant.MAX.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="37213" PostHistoryTypeId="50" PostId="8448" RevisionGUID="7ead924b-8329-44d3-af9c-e9d3af8db58e" CreationDate="2023-07-22T10:06:15.677" UserId="-1" />
  <row Id="37214" PostHistoryTypeId="5" PostId="9341" RevisionGUID="f9455d01-ce47-4449-b889-e3fa366de28a" CreationDate="2023-07-22T10:07:01.873" UserId="3344" Comment="added 294 characters in body" Text="Is there any documentation on how to gracefully and **securely** wind up a [relay](https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/), [parallel](https://docs.substrate.io/reference/how-to-guides/parachains/) or [on-demand](https://wiki.polkadot.network/docs/learn-parathreads) (aka [parathreads](https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/)) chain?&#xD;&#xA;&#xD;&#xA;Here the chain(s) are in the wild/live/production.  They could be either permissionless or permissioned.&#xD;&#xA;&#xD;&#xA;Securely, means protecting the integrity of long-lived data - data whose value/sensitivity outlives the blockchain.&#xD;&#xA;&#xD;&#xA;Some of the topics are:&#xD;&#xA;- Who... is required to participate...&#xD;&#xA;- What... has to be done...&#xD;&#xA;- When... are the above required to be done...&#xD;&#xA;- How... are the above to be done...&#xD;&#xA; &#xD;&#xA;... in order to shut down a blockchain (parallel or relay).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37217" PostHistoryTypeId="50" PostId="5044" RevisionGUID="f6506c83-59e6-4f05-a51a-8b410f4885e1" CreationDate="2023-07-22T11:04:45.550" UserId="-1" />
  <row Id="37218" PostHistoryTypeId="50" PostId="3187" RevisionGUID="b1234665-cf0d-4221-a6b3-159012cc845b" CreationDate="2023-07-22T15:04:45.553" UserId="-1" />
  <row Id="37220" PostHistoryTypeId="2" PostId="9371" RevisionGUID="9db16342-bc59-4cc0-8cfb-91d5eb8321ae" CreationDate="2023-07-23T02:35:07.987" UserId="28" Text="It looks like you are asking how to stop a parachain from running.&#xD;&#xA;&#xD;&#xA;If you have a permissioned parachain, then you as the controller of the parachain collators, just need to stop letting collators submit blocks, or stop submitting them yourself.&#xD;&#xA;&#xD;&#xA;If you have a permissionless blockchain with its own governance and collator selection, then there is really nothing you can do since the community is in control of continuing the blockchain.&#xD;&#xA;&#xD;&#xA;If you want to ritualistically halt your blockchain, you can consider having you or your community vote to upgrade the chain to a runtime upgrade which will brick your chain. A lot of chains have done this by accident, but you can of course do this easily on purpose.&#xD;&#xA;&#xD;&#xA;Assuming your blockchain has halted, the only pieces of data left over from your chain (on the relay chain) is the latest Wasm runtime and the blockchain state root.&#xD;&#xA;&#xD;&#xA;Polkadot does NOT hold all of your parachain data, only the state root. It is up to the collators, block indexers, and other full nodes to have the underlying data for your chain.&#xD;&#xA;&#xD;&#xA;If you want to keep sensitive historical information about your chain around, someone will need to keep that data. It should not really matter if that data is centralized as you can always prove the data is correct by matching it to the state roots on Polkadot.&#xD;&#xA;&#xD;&#xA;Assuming every copy of that data is deleted, there really is no easy way to recover that data or the history of your blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="37222" PostHistoryTypeId="2" PostId="9372" RevisionGUID="980e22c6-8e66-46fe-b3c3-57fefe0f3ef1" CreationDate="2023-07-23T14:04:35.160" UserId="4443" Text="[![ encountered the following error while simulating a network when running the command:&#xD;&#xA;&#xD;&#xA;./target/release/node-template purge-chain --base-path /tmp/alice --chain local][i got error indicating /tmp/alice/chains/local_testnet/db/full did not exist.]][can we proceed with next step in the  substrate documentation without purging the old chain data ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NeRkL.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37224" PostHistoryTypeId="1" PostId="9372" RevisionGUID="980e22c6-8e66-46fe-b3c3-57fefe0f3ef1" CreationDate="2023-07-23T14:04:35.160" UserId="4443" Text="I got this error while building a blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="37225" PostHistoryTypeId="3" PostId="9372" RevisionGUID="980e22c6-8e66-46fe-b3c3-57fefe0f3ef1" CreationDate="2023-07-23T14:04:35.160" UserId="4443" Text="|substrate-node-template|substrate-node|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37226" PostHistoryTypeId="5" PostId="9372" RevisionGUID="6ae836f7-1d3a-4c21-8302-617ad6f845c1" CreationDate="2023-07-23T14:05:52.500" UserId="4443" Comment="added 43 characters in body" Text="[![ encountered the following error while simulating a network when running the command:&#xD;&#xA;&#xD;&#xA;./target/release/node-template purge-chain --base-path /tmp/alice --chain local][i got error indicating /tmp/alice/chains/local_testnet/db/full did not exist.]][can we proceed with next step in the  substrate documentation without purging the old chain data ]&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1zsmx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37227" PostHistoryTypeId="2" PostId="9373" RevisionGUID="c94db866-10e0-4cf9-b644-dbd3cfc9ef78" CreationDate="2023-07-23T14:18:23.820" UserId="29" Text="Adding a rust toolchain override file can also work.&#xD;&#xA;&#xD;&#xA;Such as this:&#xD;&#xA;```toml&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;nightly-2023-01-01&quot;&#xD;&#xA;components = [ &quot;rustfmt&quot; ]&#xD;&#xA;targets = [ &quot;wasm32-unknown-unknown&quot; ]&#xD;&#xA;profile = &quot;minimal&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="37229" PostHistoryTypeId="2" PostId="9374" RevisionGUID="1ad05165-2c32-45fc-90c8-92bf51fd6479" CreationDate="2023-07-23T14:26:27.977" UserId="29" Text="That is not an error, more of an indication.&#xD;&#xA;&#xD;&#xA;If you really want to check you can manually look in those folders:&#xD;&#xA;```&#xD;&#xA;ls /tmpl/alice/chains/local_testnet/db&#xD;&#xA;ls /tmpl/alice/chains/local_testnet&#xD;&#xA;ls /tmpl/alice/chains&#xD;&#xA;ls /tmp/alice&#xD;&#xA;ls /tmp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You probably do not see anything there because you ran your Substrate blockchain using `--dev` or `--tmp` which wipes the db after you shutdown the running blockchain.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--tmp&#xD;&#xA;Run a temporary node. A temporary directory will be created to store the configuration and will be deleted at the end of the process. Note: the directory is random per process execution. &#xD;&#xA;This directory is used as base path which includes: database, node key and keystore. &#xD;&#xA;When `--dev` is given and no explicit `--base-path`, this option is implied&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="37231" PostHistoryTypeId="5" PostId="9372" RevisionGUID="e394dde1-89af-44e8-b218-0dd7088a5486" CreationDate="2023-07-23T14:55:33.383" UserId="354" Comment="improved formatting" Text="Encountered the following error while simulating a network when running the command:&#xD;&#xA;&#xD;&#xA;&gt; ./target/release/node-template purge-chain --base-path /tmp/alice&#xD;&#xA;&gt; --chain local&#xD;&#xA;&#xD;&#xA;I got error indicating &#xD;&#xA;&#xD;&#xA;&gt; /tmp/alice/chains/local_testnet/db/full did not&#xD;&#xA;&gt; exist.&#xD;&#xA;&#xD;&#xA;Can we proceed with next step in the  substrate documentation without purging the old chain data.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1zsmx.png&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37232" PostHistoryTypeId="24" PostId="9372" RevisionGUID="e394dde1-89af-44e8-b218-0dd7088a5486" CreationDate="2023-07-23T14:55:33.383" Comment="Proposed by 354 approved by 4443 edit id of 508" ContentLicense="CC BY-SA 4.0" />
  <row Id="37233" PostHistoryTypeId="2" PostId="9375" RevisionGUID="e577e5a0-39c3-48bc-b184-8990416efdff" CreationDate="2023-07-23T20:45:52.850" UserId="4342" Text="Facing an issue while **trying to query for a value in my contract**. The value keeps getting retuned as null with an error. However, it works fine on substrate Contracts UI&#xD;&#xA;&#xD;&#xA;**Front end Dapp :**&#xD;&#xA;&#xD;&#xA;      const gasLimit = 3000n * 1000000n;&#xD;&#xA;      // a limit to how much Balance to be used to pay for the storage created by the contract call&#xD;&#xA;      // if null is passed, unlimited balance can be used&#xD;&#xA;      const storageDepositLimit = null&#xD;&#xA;    &#xD;&#xA;      // Load the contract instance&#xD;&#xA;      const Contract = new ContractPromise(api, abi, AlephsendContractAddress);&#xD;&#xA;     &#xD;&#xA;        // Perform a read of the contract's `get` message&#xD;&#xA;      const callValue = await Contract.query.isPause(&quot;5HGn5UF5qdz8ShagwxRFSm387Hhd4wccAuVHZ17KtyyeUone&quot;,{&#xD;&#xA;        gasLimit,&#xD;&#xA;        storageDepositLimit,&#xD;&#xA;      });&#xD;&#xA;      console.log(callValue.output.toHuman());&#xD;&#xA;&#xD;&#xA;**Contract function :** &#xD;&#xA;&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn is_pause(&amp;self) -&gt; bool {&#xD;&#xA;       &#xD;&#xA;       return self.paused;&#xD;&#xA;       &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;**This is how my storage is defined :** &#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std, no_main)]&#xD;&#xA;    &#xD;&#xA;    #[ink::contract]&#xD;&#xA;    &#xD;&#xA;    mod aleph_send {&#xD;&#xA;    &#xD;&#xA;    use openbrush::contracts::traits::psp22::{PSP22Ref,PSP22Error};&#xD;&#xA;    use openbrush::contracts::ownable::*;&#xD;&#xA;    use scale::alloc::vec::Vec;&#xD;&#xA;    use openbrush::traits::Storage;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(Default, Storage)]&#xD;&#xA;    pub struct Aleph {&#xD;&#xA;        #[storage_field]&#xD;&#xA;            ownable: ownable::Data,&#xD;&#xA;            pub fee    : Balance,&#xD;&#xA;            pub paused : bool&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    impl Aleph {...contract code}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Any help would be much appreciated!**" ContentLicense="CC BY-SA 4.0" />
  <row Id="37235" PostHistoryTypeId="1" PostId="9375" RevisionGUID="e577e5a0-39c3-48bc-b184-8990416efdff" CreationDate="2023-07-23T20:45:52.850" UserId="4342" Text="Reading contract value returns null" ContentLicense="CC BY-SA 4.0" />
  <row Id="37236" PostHistoryTypeId="3" PostId="9375" RevisionGUID="e577e5a0-39c3-48bc-b184-8990416efdff" CreationDate="2023-07-23T20:45:52.850" UserId="4342" Text="|ink|rust|smart-contract|substrate-front-end|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37237" PostHistoryTypeId="2" PostId="9376" RevisionGUID="fbbc7ff7-8e90-40f1-a030-4d4bdbd8f7b8" CreationDate="2023-07-23T20:48:20.980" UserId="4342" Text="Resolved the issue by specifying larger amounts to send. I was not factoring in the 12 decimals of the token. So technically everything was working fine. **The issue was that I was sending amounts so small that it would not even reflect in the recievers balance.**" ContentLicense="CC BY-SA 4.0" />
  <row Id="37239" PostHistoryTypeId="2" PostId="9377" RevisionGUID="73896935-7d2e-42b9-8dc6-6eeacc65baa2" CreationDate="2023-07-23T20:53:02.500" UserId="4342" Text="Resolved by using this as my **`Cargo.toml`** : &#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;alephcontract&quot;&#xD;&#xA;    version = &quot;1.0.0&quot;&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    authors = [&quot;0xD1x0n&quot;]&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    ink = { version = &quot;4.2.1&quot;, default-features = false }&#xD;&#xA;    scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    &#xD;&#xA;    openbrush = { git = &quot;https://github.com/727-Ventures/openbrush-contracts&quot;, tag = &quot;3.1.0&quot;, default-features = false, features = [&quot;psp22&quot;,&quot;ownable&quot;,]}&#xD;&#xA;    &#xD;&#xA;    [lib]&#xD;&#xA;    name = &quot;alephcontract&quot;&#xD;&#xA;    path = &quot;lib.rs&quot;&#xD;&#xA;    crate-type = [&#xD;&#xA;        # Used for normal contract Wasm blobs.&#xD;&#xA;        &quot;cdylib&quot;,&#xD;&#xA;        &quot;rlib&quot;,&#xD;&#xA;    ]&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;        &quot;ink/std&quot;,&#xD;&#xA;        &quot;scale/std&quot;,&#xD;&#xA;        &quot;scale-info/std&quot;,&#xD;&#xA;        &quot;openbrush/std&quot;,&#xD;&#xA;    ]&#xD;&#xA;    &#xD;&#xA;    psp22 = [&quot;openbrush/psp22&quot;]&#xD;&#xA;    ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;I compiled the contract using **toolchain `+nightly-2023-01-01`** by executing the following command : &#xD;&#xA;&#xD;&#xA;    cargo +nightly-2023-01-01 contract build --release" ContentLicense="CC BY-SA 4.0" />
  <row Id="37241" PostHistoryTypeId="2" PostId="9378" RevisionGUID="d3b72ea1-27e6-4483-a951-af0fddf678b9" CreationDate="2023-07-24T02:26:27.237" UserId="2565" Text="1. The pallet-contract version is 0.9.29&#xD;&#xA;2. Error uploading new contract using Polkadot.JS&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kbJZf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37243" PostHistoryTypeId="1" PostId="9378" RevisionGUID="d3b72ea1-27e6-4483-a951-af0fddf678b9" CreationDate="2023-07-24T02:26:27.237" UserId="2565" Text="Error upload smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="37244" PostHistoryTypeId="3" PostId="9378" RevisionGUID="d3b72ea1-27e6-4483-a951-af0fddf678b9" CreationDate="2023-07-24T02:26:27.237" UserId="2565" Text="|parachain|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37245" PostHistoryTypeId="2" PostId="9379" RevisionGUID="27a18470-4908-4206-8b67-a627b00b02f0" CreationDate="2023-07-24T04:54:37.673" UserId="354" Text="This is the issue with `polkadotjs-ui`, try deploying your contract with [https://contracts-ui.substrate.io/][1], as mentioned in ink documentation [https://use.ink/getting-started/deploy-your-contract/#using-the-contracts-ui][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://contracts-ui.substrate.io/&#xD;&#xA;  [2]: https://use.ink/getting-started/deploy-your-contract/#using-the-contracts-ui" ContentLicense="CC BY-SA 4.0" />
  <row Id="37247" PostHistoryTypeId="2" PostId="9380" RevisionGUID="e8241717-6670-4433-922f-3d61b851472e" CreationDate="2023-07-24T05:49:30.837" UserId="2762" Text="Different key derivation functions affect the ability to use the same mnemonic in multiple wallets as different wallets may use different functions to derive the secret from the mnemonic. See more information in the docs: [Portability][1].&#xD;&#xA;&#xD;&#xA;PolkadotJS uses BIP32, but I can't find what key derivation Trust wallet uses but probably a different one. In that case the only thing you can try is export/import the private key directly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-account-advanced#portability" ContentLicense="CC BY-SA 4.0" />
  <row Id="37249" PostHistoryTypeId="2" PostId="9381" RevisionGUID="711b6cbd-dd9a-4544-8762-442758cadd76" CreationDate="2023-07-24T06:19:35.103" UserId="251" Text="There is no native API available for this purpose.&#xD;&#xA;&#xD;&#xA;The set of waiting validators can be obtained by subtracting the active validators from the `Staking::Validators` set.&#xD;&#xA;&#xD;&#xA;It's important to note that an era consists of multiple blocks. Some validators may choose to `chill` at any block within the era. Therefore, you need to specify which block you want to use. If you have a specific block hash in mind, simply pass it as a parameter to the `query_at` field of `Staking::Validators`.&#xD;&#xA;&#xD;&#xA;Once you have both sets - validators and active validators - you can subtract them." ContentLicense="CC BY-SA 4.0" />
  <row Id="37251" PostHistoryTypeId="2" PostId="9382" RevisionGUID="2d8ed6a0-8e5f-46a6-851d-0c487ae4e895" CreationDate="2023-07-24T07:45:35.540" UserId="3136" Text="If pallet_contracts is a configuration, add the following code snippet to your lib.rs:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Pallet_Contracts::&lt;T,I&gt;::CollectiveEvent&#xD;&#xA;If pallet_contracts is a function, add the following code snippet to your lib.rs:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    function = pallet_contracts::Call::COllectiveEvent&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37253" PostHistoryTypeId="2" PostId="9383" RevisionGUID="939b4a63-4282-4075-99a8-85568dc30fb7" CreationDate="2023-07-24T08:16:35.940" UserId="357" Text="I would like to simulate how our parachain reacts to events like, &#xD;&#xA;&#xD;&#xA; 1. A collator produces a block that is not accepted by other collators in that parachain. Aka a malicious collator.&#xD;&#xA; 2. The relay chain rejects A block produced in the parachain.&#xD;&#xA;&#xD;&#xA;Do you have any way to reach those stages? First ( on my limited knowledge ) I think it can be done by a collator that differs somehow on the runtime with others, but second, I don't know how to do it. &#xD;&#xA;&#xD;&#xA;Any tips here? &#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37255" PostHistoryTypeId="1" PostId="9383" RevisionGUID="939b4a63-4282-4075-99a8-85568dc30fb7" CreationDate="2023-07-24T08:16:35.940" UserId="357" Text="Simulate block finalization error" ContentLicense="CC BY-SA 4.0" />
  <row Id="37256" PostHistoryTypeId="3" PostId="9383" RevisionGUID="939b4a63-4282-4075-99a8-85568dc30fb7" CreationDate="2023-07-24T08:16:35.940" UserId="357" Text="|testing|parachain-collator|test-network|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37257" PostHistoryTypeId="2" PostId="9384" RevisionGUID="4d7a80f5-0f90-4edd-98af-620bd3fc7c77" CreationDate="2023-07-24T08:42:46.360" UserId="2025" Text="Adding to @AurevoirXavier answer, [API Sidecar](https://github.com/paritytech/substrate-api-sidecar) exposes the endpoint `pallets/staking/Validators` which returns a list of all validators addresses and their corresponding status which can be either active or waiting. It will also return a list of active validators that will not be part of the next era for staking. If you are running API Sidecar against an archive node, you can do this query at any past height." ContentLicense="CC BY-SA 4.0" />
  <row Id="37259" PostHistoryTypeId="2" PostId="9385" RevisionGUID="988e0748-18e6-4489-93ed-5d393a11ec8a" CreationDate="2023-07-24T08:51:29.263" UserId="3387" Text="One of possible solutions would be to have per default as &quot;best practices&quot; in every smart-contract created a function called &quot;destructor&quot; together with a &quot;beneficiary account&quot;.&#xD;&#xA;&#xD;&#xA;&gt;         #[ink(message, payable)]&#xD;&#xA;&gt;         pub fn destructor(&amp;self)  -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;&gt;             let caller = self.env().caller();&#xD;&#xA;&gt;             if caller == self.beneficiary_account_id {&#xD;&#xA;&gt;                 self.env().terminate_contract(self.beneficiary_account_id);&#xD;&#xA;&gt;             } else {&#xD;&#xA;&gt;                 return Err(Error::InvalidCaller);&#xD;&#xA;&gt;             }&#xD;&#xA;&gt;         }&#xD;&#xA;&#xD;&#xA;Would be nice to hear other points of view of this approach.&#xD;&#xA;&#xD;&#xA;Cheers," ContentLicense="CC BY-SA 4.0" />
  <row Id="37261" PostHistoryTypeId="2" PostId="9386" RevisionGUID="1d47f4c6-0dbf-4ecc-b916-b32c48c43d39" CreationDate="2023-07-24T09:04:40.053" UserId="2762" Text="I can't see what is wrong with your call, but let's try to fix it.&#xD;&#xA;&#xD;&#xA;First be sure you have the proper metadata, see this previous StackExchange issue: [How can you query a smart contract using the polkadot.js api?][1]&#xD;&#xA;&#xD;&#xA;You can try too if the result of the query has been ok like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const { result, output } = await Contract.query.isPause(&quot;5HGn5UF5qdz8ShagwxRFSm387Hhd4wccAuVHZ17KtyyeUone&quot;,{&#xD;&#xA;    gasLimit,&#xD;&#xA;    storageDepositLimit,&#xD;&#xA;});&#xD;&#xA;// check if the call was successful&#xD;&#xA;if (result.isOk) {&#xD;&#xA;  // output the return value&#xD;&#xA;  console.log('Success', output.toHuman());&#xD;&#xA;} else {&#xD;&#xA;  console.error('Error', result.asErr);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You have an example here: [Reading contract values][2] where it queries the [incrementer smart contract][3]. &#xD;&#xA;&#xD;&#xA;And similar in this previous StackExchange Issue: [How to get output when calling a contract method and signing it?][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4161/how-can-you-query-a-smart-contract-using-the-polkadot-js-api&#xD;&#xA;  [2]: https://polkadot.js.org/docs/api-contract/start/contract.read/#reading-contract-values&#xD;&#xA;  [3]: https://github.com/paritytech/ink-examples/blob/main/incrementer/lib.rs&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/4247/how-to-get-output-when-calling-a-contract-method-and-signing-it" ContentLicense="CC BY-SA 4.0" />
  <row Id="37263" PostHistoryTypeId="2" PostId="9387" RevisionGUID="cbcbd76c-9117-4258-81be-51845cd3114e" CreationDate="2023-07-24T09:44:26.937" UserId="2463" Text="I solved this by manually constructing the payload in JS and creating a signed extrinsic to then pass back to subxt. There seems to be an issue between the partial extrinsic format and what polkadot.js expects.&#xD;&#xA;&#xD;&#xA;For reference, here's an example where most of the work is still done in subxt:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/subxt/blob/tadeo-hepperle-browser-extension-signing-example/examples/wasm-example/src/services.rs#L130" ContentLicense="CC BY-SA 4.0" />
  <row Id="37265" PostHistoryTypeId="2" PostId="9388" RevisionGUID="c7c1705c-43ec-4c42-be94-9ddc451a46ff" CreationDate="2023-07-24T09:47:32.307" UserId="3752" Text="I'm getting the error &#xD;&#xA;    `session.NoAssociatedValidatorId`&#xD;&#xA; while inserting session keys, Although my Explorer is connect to same explorer and Keys are generated by using **RPC-&gt;RotateKeys()**. &#xD;&#xA;    Any sort of help will be much appreciable.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Hw2fw.png&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37267" PostHistoryTypeId="1" PostId="9388" RevisionGUID="c7c1705c-43ec-4c42-be94-9ddc451a46ff" CreationDate="2023-07-24T09:47:32.307" UserId="3752" Text="Getting Error when i push session keys session.NoAssociatedValidatorId" ContentLicense="CC BY-SA 4.0" />
  <row Id="37268" PostHistoryTypeId="3" PostId="9388" RevisionGUID="c7c1705c-43ec-4c42-be94-9ddc451a46ff" CreationDate="2023-07-24T09:47:32.307" UserId="3752" Text="|session|poa|keyring|node-key|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37269" PostHistoryTypeId="2" PostId="9389" RevisionGUID="fd004a35-f672-4f16-a6bb-37af29703545" CreationDate="2023-07-24T10:39:49.550" UserId="2762" Text="The faucet won't work because is for a specific chain, in this case for Rococo.&#xD;&#xA;&#xD;&#xA;In your cumulus network you have to modify the pre-populate balance for the accounts before run your chain. &#xD;&#xA;&#xD;&#xA;You can find an example of how to do this step-by-step here: [How to overwrite endowed account balance (Build a local blockchain)][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/6059/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="37274" PostHistoryTypeId="5" PostId="9355" RevisionGUID="60b47105-b462-4c66-acd2-03d197f47c1f" CreationDate="2023-07-24T13:09:16.977" UserId="427" Comment="added 1821 characters in body" Text="Let's address your questions one by one:&#xD;&#xA;&#xD;&#xA;**WithdrawOrigin Origin Check:**&#xD;&#xA;The purpose of the WithdrawOrigin origin check in the pallet_evm::Config is to control which origin is allowed to withdraw funds from the EVM contract. In the context of the EVM pallet, &quot;withdraw&quot; refers to transferring funds from the EVM contract's balance (Ethereum-like account) to the native currency account in your runtime. This is needed because, in Substrate-based blockchains, there might be multiple pallets or modules that handle different types of accounts, and the WithdrawOrigin specifies the origin that can execute a withdrawal from the EVM contract.&#xD;&#xA;&#xD;&#xA;For example, if your runtime uses multiple account systems like AccountId32 and AccountId, the WithdrawOrigin provides a way to specify which origin (e.g., AccountId32 or AccountId) is allowed to trigger a withdrawal from the EVM contract back to the native currency's account.&#xD;&#xA;&#xD;&#xA;**Address Truncation and Hashing:**&#xD;&#xA;The confusion you have about H160 and AccountId32 is because of the nature of Ethereum addresses and how they are represented in Substrate runtimes. Ethereum addresses are 20 bytes long (160 bits), and they are typically represented using H160 in the context of the EVM pallet.&#xD;&#xA;&#xD;&#xA;However, in Substrate runtimes, the native accounts can have varying lengths, depending on the runtime configuration. AccountId32 represents an account identifier that is 32 bytes long (256 bits).&#xD;&#xA;&#xD;&#xA;The EnsureAddressOrigin implementation you provided (EnsureAddressTruncated) is used to ensure that the origin provided to the EVM pallet contains a truncated hash of the account identifier (AccountId32). It checks whether the first 20 bytes of the provided account ID match the first 20 bytes of the Ethereum address (H160).&#xD;&#xA;&#xD;&#xA;The implementation is using AccountId32 as the origin because that's the type used in your runtime's configuration. When the origin is passed to the EVM pallet, it first checks if the origin is from RawOrigin::Signed (indicating a signed extrinsic), and if so, it extracts the account ID (AccountId32), truncates it to the first 20 bytes (H160 size), and then compares it with the provided Ethereum address (H160). If they match, the check is successful, and the provided AccountId32 is considered valid as the origin.&#xD;&#xA;&#xD;&#xA;**pallet_evm::withdraw Extrinsic:**&#xD;&#xA;The pallet_evm::withdraw extrinsic is an extrinsic provided by the EVM pallet that allows users to withdraw funds from the EVM contract back to their native currency account. When you interact with the EVM contract, it will accumulate funds in the contract's balance. The pallet_evm::withdraw extrinsic provides a way for users to transfer these funds from the EVM contract back to their designated account (specified by the WithdrawOrigin).&#xD;&#xA;&#xD;&#xA;In summary, the WithdrawOrigin allows you to control which origin can trigger withdrawals from the EVM contract, and the pallet_evm::withdraw extrinsic enables users to withdraw funds from the EVM contract to their designated account in the native currency of the runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Yes, your understanding is correct. The EVM pallet in Substrate-based blockchains handles its own internal currency that is distinct from the native currency of the Substrate runtime.&#xD;&#xA;&#xD;&#xA;To elaborate further:&#xD;&#xA;&#xD;&#xA;Internal Currency of EVM Pallet:&#xD;&#xA;The EVM pallet introduces its own internal currency to represent the value and balances within the EVM itself. This internal currency is used to track the value held by Ethereum-like accounts and smart contracts within the EVM. When EVM contracts are executed and perform operations such as transfers, the changes in balances are reflected in this internal currency.&#xD;&#xA;&#xD;&#xA;Reserving Tokens during Mint:&#xD;&#xA;When you execute an EVM contract and it performs operations that lead to the creation of new tokens (e.g., minting new tokens or increasing the balance of an existing account), the EVM pallet will internally update the balances of the relevant accounts in its internal currency. This update effectively &quot;reserves&quot; the tokens within the EVM's internal system.&#xD;&#xA;&#xD;&#xA;Releasing Tokens during Withdraw:&#xD;&#xA;When users trigger a withdrawal from the EVM contract (via the pallet_evm::withdraw extrinsic), the EVM pallet will release the reserved tokens from its internal currency and transfer them back to the designated account in the native currency of the Substrate runtime. This operation effectively converts the internal EVM currency back into the native currency of the runtime.&#xD;&#xA;&#xD;&#xA;From the perspective of the Substrate runtime, it doesn't directly interact with the EVM's internal currency. Instead, the EVM pallet abstracts the internal currency and exposes an interface (extrinsics and storage) that allows users to interact with the EVM, deposit funds, execute contracts, and withdraw funds. These interactions are carried out in the context of the EVM's internal currency.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37277" PostHistoryTypeId="2" PostId="9392" RevisionGUID="f2c9844b-2f88-4e00-907a-668922fa7c95" CreationDate="2023-07-24T13:12:43.033" UserId="4463" Text="I'm learning how to upgrade ink! contract，and have some question：&#xD;&#xA;&#xD;&#xA;Eg：old `contractA`, storage define is&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink(storage)&#xD;&#xA;pub struct MyContract {&#xD;&#xA;    a: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;new `contractB`，storage define is&#xD;&#xA;```&#xD;&#xA;#[ink(storage)&#xD;&#xA;pub struct MyContract {&#xD;&#xA;    a: u32,&#xD;&#xA;    b: String,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Suppose now `contractA` rootKey(contract) value is `0x01`，use `set_code_hash` to upgrade `contractA` to `contractB`&#xD;&#xA;&#xD;&#xA;Then call `contractA`，when message call，will first invoke `get_contract_storage` to get rootKey(contract) value(is `0x01`)，use this value to decode new contract storage struct(`contractB` storage), maybe get error  &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error { cause: None, desc: &quot;Not enough data to fill buffer&quot; }), desc: &quot;Could not decode `MyContract::b`&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`MessageDecoder` define as&#xD;&#xA;```&#xD;&#xA;impl ::ink::reflect::ExecuteDispatchable for __ink_MessageDecoder {&#xD;&#xA;        #[allow(clippy::nonminimal_bool, clippy::let_unit_value)]&#xD;&#xA;        fn execute_dispatchable(&#xD;&#xA;            self,&#xD;&#xA;        ) -&gt; ::core::result::Result&lt;(), ::ink::reflect::DispatchError&gt; {&#xD;&#xA;            let key = &lt;Flipper as ::ink::storage::traits::StorageKey&gt;::KEY;&#xD;&#xA;            let mut contract: ::core::mem::ManuallyDrop&lt;Flipper&gt; = ::core::mem::ManuallyDrop::new(&#xD;&#xA;                match ::ink::env::get_contract_storage(&amp;key) { // get contract value and decode&#xD;&#xA;                    ::core::result::Result::Ok(&#xD;&#xA;                        ::core::option::Option::Some(value),&#xD;&#xA;                    ) =&gt; value,&#xD;&#xA;                    ::core::result::Result::Ok(::core::option::Option::None) =&gt; {&#xD;&#xA;                        ::core::panicking::panic_fmt(&#xD;&#xA;                            format_args!(&quot;storage entry was empty&quot;),&#xD;&#xA;                        );&#xD;&#xA;                    }&#xD;&#xA;                    ::core::result::Result::Err(_) =&gt; {&#xD;&#xA;                        ::core::panicking::panic_fmt(&#xD;&#xA;                            format_args!(&quot;could not properly decode storage entry&quot;),&#xD;&#xA;                        );&#xD;&#xA;                    }&#xD;&#xA;                },&#xD;&#xA;            );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So why there wont has *scale::Decode* error，how `set_code_hash` works to achieve **Storage Compatibility**，is there some step I've missed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37279" PostHistoryTypeId="1" PostId="9392" RevisionGUID="f2c9844b-2f88-4e00-907a-668922fa7c95" CreationDate="2023-07-24T13:12:43.033" UserId="4463" Text="After using set_code_hash to upgrade contract, when decode on the new Storage，why there wont has error of &quot;Not enough data to fill buffer&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37280" PostHistoryTypeId="3" PostId="9392" RevisionGUID="f2c9844b-2f88-4e00-907a-668922fa7c95" CreationDate="2023-07-24T13:12:43.033" UserId="4463" Text="|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37281" PostHistoryTypeId="2" PostId="9393" RevisionGUID="a9aa5388-e249-43f8-98a2-d95f12b7809a" CreationDate="2023-07-24T14:13:46.690" UserId="3140" Text="You can use the library [useink][1] and the helper function `decodeError`. [Here is the implementation][2].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.npmjs.com/package/useink&#xD;&#xA;  [2]: https://github.com/paritytech/useink/blob/main/packages/useink/src/core/contracts/decodeError.ts" ContentLicense="CC BY-SA 4.0" />
  <row Id="37283" PostHistoryTypeId="2" PostId="9394" RevisionGUID="8f19c946-b1ae-4a5e-aea1-a749ac87e46a" CreationDate="2023-07-24T14:18:45.833" UserId="3140" Text="You can use [useink][1] and the hook [useEvents][2], which will subscribe to a contract's events. [Here is an example][3] using it and decoding the events that are emitted.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.npmjs.com/package/useink&#xD;&#xA;  [2]: https://github.com/paritytech/useink/blob/main/packages/useink/src/react/hooks/contracts/useEvents.ts&#xD;&#xA;  [3]: https://github.com/paritytech/useink/blob/f93af9a52ced6583729b594ff7af58865deb2ab7/playground/src/components/pg-deploy/DeployPage.tsx#L303" ContentLicense="CC BY-SA 4.0" />
  <row Id="37285" PostHistoryTypeId="2" PostId="9395" RevisionGUID="00a797ac-420d-4d78-aa6e-f17ccab48e69" CreationDate="2023-07-24T14:25:37.777" UserId="3140" Text="This has to do with how the balances pallet handles taking funds for gas vs taking funds THEN giving them to another account - your contract in this case. &#xD;&#xA;&#xD;&#xA;When you deploy a contract you will see even more events related to balances where an account is created, funded with the storage deposit, etc, etc." ContentLicense="CC BY-SA 4.0" />
  <row Id="37290" PostHistoryTypeId="2" PostId="9396" RevisionGUID="1125e155-9d07-46c6-b109-2181e777080a" CreationDate="2023-07-25T02:20:01.470" UserId="4469" Text="Trying to form a batchAll command that carries out 2 activities:&#xD;&#xA; 1. Deposit 1 GLMR from wallet1 to wallet2&#xD;&#xA; 2. Cancel tokens' delegation revoke&#xD;&#xA;&#xD;&#xA;When I try to sign the batch with wallet1 (**batchAllExtrinsic.sign**) I get:&#xD;&#xA;&#xD;&#xA;```TypeError: Cannot read properties of undefined (reading 'specVersion')```&#xD;&#xA;&#xD;&#xA;My async main function looks as follows:&#xD;&#xA;```&#xD;&#xA;const wsProvider = new WsProvider(&quot;wss://wss.api.moonbeam.network&quot;);&#xD;&#xA;const api = await ApiPromise.create({ &#xD;&#xA;      provider: wsProvider,&#xD;&#xA;      types: {&#xD;&#xA;        // Add any custom types here&#xD;&#xA;        AccountId: &quot;EthereumAccountId&quot;,&#xD;&#xA;        Address: &quot;AccountId&quot;,&#xD;&#xA;        Balance: &quot;u128&quot;,&#xD;&#xA;        RefCount: &quot;u8&quot;,&#xD;&#xA;        LookupSource: &quot;AccountId&quot;&#xD;&#xA;      } &#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;// Wait for the api to be ready&#xD;&#xA;await api.isReady;&#xD;&#xA;&#xD;&#xA;const keyringECDSA = new Keyring({ type: &quot;ethereum&quot; });&#xD;&#xA;const feesWallet = keyringECDSA.addFromUri(PRIVATE_KEY_FEE_WALLET);&#xD;&#xA;const stakedWallet = keyringECDSA.addFromUri(PRIVATE_KEY_STAKED_WALLET);&#xD;&#xA;&#xD;&#xA;const amount = 1_000_000_000_000_000;&#xD;&#xA;&#xD;&#xA;// Create the batchAll extrinsic with the staking actions&#xD;&#xA;const batchAllExtrinsic = api.tx.utility.batchAll([&#xD;&#xA;   api.tx.balances.transfer(feesWalletH160, amount),&#xD;&#xA;   api.tx.parachainStaking.cancelDelegationRequest(addressCollator3)&#xD;&#xA;]);&#xD;&#xA;&#xD;&#xA;// Get the latest block hash&#xD;&#xA;const latestBlockHash = await api.rpc.chain.getFinalizedHead();&#xD;&#xA;    &#xD;&#xA;// Get the block hash and nonce for signing&#xD;&#xA;const blockHash = await api.rpc.chain.getBlock(latestBlockHash);&#xD;&#xA;const { nonce } = await api.query.system.account(feesWallet.address);&#xD;&#xA;const genesisHash = api.genesisHash;&#xD;&#xA;const specVersion = api.runtimeVersion.specVersion;&#xD;&#xA;const transactionVersion = api.runtimeVersion.transactionVersion;&#xD;&#xA;&#xD;&#xA;// Sign the batch call using both wallets&#xD;&#xA;batchAllExtrinsic.sign(feesWallet, { blockHash, nonce, genesisHash, specVersion,transactionVersion});&#xD;&#xA;batchAllExtrinsic.addSignature(stakedWallet.address, stakedWallet.sign(batchAllExtrinsic));&#xD;&#xA;&#xD;&#xA;// Send the batch call&#xD;&#xA;    batchAllExtrinsic.send(({ status }) =&gt; {&#xD;&#xA;        if (status.isInBlock) {&#xD;&#xA;            console.log(`Transaction included in block ${status.asInBlock}`);&#xD;&#xA;        } else if (status.isFinalized) {&#xD;&#xA;            console.log(`Transaction finalized in block ${status.asFinalized}`);&#xD;&#xA;        process.exit(0);&#xD;&#xA;        }    &#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Tried various workarounds (setting api setRuntimeVersion, changing batchAll to batch, replacing the txs with different methods) but nothing seems to solve this error.&#xD;&#xA;Your help will be strongly appreciated&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37292" PostHistoryTypeId="1" PostId="9396" RevisionGUID="1125e155-9d07-46c6-b109-2181e777080a" CreationDate="2023-07-25T02:20:01.470" UserId="4469" Text="batchall.sign throws TypeError: Cannot read properties of undefined (reading 'specVersion')" ContentLicense="CC BY-SA 4.0" />
  <row Id="37293" PostHistoryTypeId="3" PostId="9396" RevisionGUID="1125e155-9d07-46c6-b109-2181e777080a" CreationDate="2023-07-25T02:20:01.470" UserId="4469" Text="|parachain|transactions|error|batch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37296" PostHistoryTypeId="2" PostId="9397" RevisionGUID="71a5c715-39d0-4045-ae8f-1ed109f13672" CreationDate="2023-07-25T03:07:09.407" UserId="408" Text="There are `api.query.session.nextKeys` and `api.query.session.queuedKeys` for obtaining the next session keys for a validator ([doc][1]).&#xD;&#xA;&#xD;&#xA;But how do I query the current the session keys used by an active validator?&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage/#nextkeysaccountid32-optionkitchensinkruntimesessionkeys" ContentLicense="CC BY-SA 4.0" />
  <row Id="37298" PostHistoryTypeId="1" PostId="9397" RevisionGUID="71a5c715-39d0-4045-ae8f-1ed109f13672" CreationDate="2023-07-25T03:07:09.407" UserId="408" Text="How to get the current session keys used by an active validator?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37299" PostHistoryTypeId="3" PostId="9397" RevisionGUID="71a5c715-39d0-4045-ae8f-1ed109f13672" CreationDate="2023-07-25T03:07:09.407" UserId="408" Text="|polkadot-js|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37300" PostHistoryTypeId="2" PostId="9398" RevisionGUID="5ae6806c-7eb5-4ebb-8315-27078469f7a6" CreationDate="2023-07-25T03:38:51.917" UserId="4470" Text="my westend account is 5G7NsFf3MqwEKSbuo52d2Y9RaaiMQ3akXzSWpSvgUYq3ZEsm.&#xD;&#xA;it shows I have 0.02 WND, and I try to use Balances.transfer or transfer_allow_death  0.0035 WND to another account.&#xD;&#xA;&#xD;&#xA;So I send 3500000000 out,  but I got error Invalid Transaction: Inability to pay some fees , e.g. account balance too low.&#xD;&#xA;&#xD;&#xA;I remains 0.0165 WND to pay fee. why I got this error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37302" PostHistoryTypeId="1" PostId="9398" RevisionGUID="5ae6806c-7eb5-4ebb-8315-27078469f7a6" CreationDate="2023-07-25T03:38:51.917" UserId="4470" Text="westend network try to send transfer transaction but fail" ContentLicense="CC BY-SA 4.0" />
  <row Id="37303" PostHistoryTypeId="3" PostId="9398" RevisionGUID="5ae6806c-7eb5-4ebb-8315-27078469f7a6" CreationDate="2023-07-25T03:38:51.917" UserId="4470" Text="|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37304" PostHistoryTypeId="2" PostId="9399" RevisionGUID="e2274ab5-7a24-40d1-a9fa-0397cd36cebd" CreationDate="2023-07-25T05:19:27.467" UserId="2348" Text="I have been  integrating EVM(43 version) in 43  version of substrate. while  adding files to runtime module i am getting sys error while building it .I want to know  how to  solve &#xD;&#xA;this error[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SbTbs.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37306" PostHistoryTypeId="1" PostId="9399" RevisionGUID="e2274ab5-7a24-40d1-a9fa-0397cd36cebd" CreationDate="2023-07-25T05:19:27.467" UserId="2348" Text="how to solve the sys error in substrate 43 version" ContentLicense="CC BY-SA 4.0" />
  <row Id="37307" PostHistoryTypeId="3" PostId="9399" RevisionGUID="e2274ab5-7a24-40d1-a9fa-0397cd36cebd" CreationDate="2023-07-25T05:19:27.467" UserId="2348" Text="|evm|substrate-node|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37308" PostHistoryTypeId="2" PostId="9400" RevisionGUID="6d252074-1f4f-488d-94ca-83428c483de6" CreationDate="2023-07-25T05:29:04.900" UserId="251" Text="The error is clearly stated as `Inability to pay some fees`, indicating that the remaining balance is insufficient to cover the fee.&#xD;&#xA;&#xD;&#xA;1. It is just not enough for the fee&#xD;&#xA;2. Sometimes there might be some balance locks on your account" ContentLicense="CC BY-SA 4.0" />
  <row Id="37310" PostHistoryTypeId="4" PostId="9399" RevisionGUID="08a68fec-e3d7-4679-94fb-8275cf7b945e" CreationDate="2023-07-25T05:45:48.820" UserId="2348" Comment="edited title" Text="how to solve the sys error in substrate polkadot branch (polkadot-v0.9.43)" ContentLicense="CC BY-SA 4.0" />
  <row Id="37311" PostHistoryTypeId="50" PostId="9024" RevisionGUID="ca2bac0d-0b60-4d04-a6ce-a3208489990f" CreationDate="2023-07-25T08:04:10.650" UserId="-1" />
  <row Id="37312" PostHistoryTypeId="5" PostId="8437" RevisionGUID="7064dd01-2454-4fc7-ab33-4d0b439c9a4f" CreationDate="2023-07-25T08:50:05.497" UserId="529" Comment="added 187 characters in body" Text="EDIT: this is not completely correct answer anymore. Openbrush is using String type from ink! prelude since version 3.0.0&#xD;&#xA;```&#xD;&#xA;pub type String = ink::prelude::string::String;&#xD;&#xA;```&#xD;&#xA;___&#xD;&#xA;When you look at the definition of `openbrush::traits::String` you can see that OB String is actually a vector `Vec&lt;u8&gt;`&#xD;&#xA;```rust&#xD;&#xA;pub struct String {&#xD;&#xA;    vec: Vec&lt;u8&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;One way to have both types of strings used is to use aliases:&#xD;&#xA;```rust&#xD;&#xA;use ink::prelude::string::{String as PreludeString};&#xD;&#xA;use openbrush::traits::String;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Depending on your needs you can use either of them or both. I find using `from` to be more convenient  than `to_string()`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// ink::prelude's String&#xD;&#xA;let s = PreludeString::from(res_str)&#xD;&#xA;&#xD;&#xA;// OB version &#xD;&#xA;let s = String::from(res_str)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37313" PostHistoryTypeId="5" PostId="642" RevisionGUID="58f831c1-5fa0-4d0d-b7e7-8fef526428a1" CreationDate="2023-07-25T09:25:17.077" UserId="408" Comment="I believe you mean aura but you said babe" Text="&gt; I've seen in some guides suggesting to set Session Keys for validating. My concepts of session keys are that they are an amalgation of 4 keys, that will be used instead of the stash or controller keys on a validator node. &#xD;&#xA;&#xD;&#xA;In the Polkadot wiki **session key** is defined [here][1] as __&quot;Hot keys that are used for performing network operations by validators&quot;__.&#xD;&#xA;&#xD;&#xA;In the Substrate repository [here][2] it shows that these &quot;hot&quot; keys for each authority/validator from a chain specification may be included as session keys in its genesis configuration, and they only include the grandpa, babe, imonline, and authority discovery keys, but not its &quot;cold&quot; stash key or the &quot;hot&quot; controller key. Grandpa are of ed25519 keypair type, whilst the others are sr25519.&#xD;&#xA;&#xD;&#xA;If that chain was using aura instead of babe (for example when running a parachain), then the aura key would be included instead.&#xD;&#xA;&#xD;&#xA;The stash and controller keys need to be [endowed][3] with a balance above the existential deposit, as the controller needs it to pay transaction fees such as bonding the stash to the controller and setting a reward destination, setting the session keys and validator settings with the controller, and loading the session keys into the keystore of the validator node.&#xD;&#xA;&#xD;&#xA;&gt; However my confusion begins when I query the rotateKeys() rpc from author ( I don't know what author is or where this function is defined, please include an explanation for this in your answer as well ), &#xD;&#xA;&#xD;&#xA;&quot;author&quot; represents the the [Substrate **Authoring** RPC API][4].&#xD;&#xA;&#xD;&#xA;In addition to JSON RPC requests using cURL using method `author_rotateKeys`, `rotateKeys` may also be used with the Polkadot.js javascript API implementation [here][9], which may be used to encode an JSON RPC request with method `author_rotateKeys` and to decode an JSON RPC response. The `rotateKeys` part of the Polkadot.js javascript API documentation is [here][8].&#xD;&#xA;&#xD;&#xA;The Polkadot.js javascript API allows you to configure either a HTTP or WebSockets (WS) provider for sending JSON RPC requests using HTTP to a HTTP RPC server TCP port exposed by the endpoint of a node, or to a WebSockets port that is exposed by a node if you also want support for subscriptions (for example to listen to events such as when the session keys change).&#xD;&#xA;&#xD;&#xA;The node itself listens for these requests. If the JSON RPC request uses the method `author_rotateKeys` then it would be interpreted using the [Substrate **Authoring** RPC API][4].&#xD;&#xA;* `rotate_keys` Substrate rust API interface [here][5]&#xD;&#xA;* `rotate_keys` Substrate rust API implementation [here][6]&#xD;&#xA;* `rotate_keys` Substrate rust API documentation [here][7]&#xD;&#xA;&#xD;&#xA;&gt; I get a long key like this: 0x87d0bce7ee8e3279674e9a91c4255379592ab5b24ab2bcf9438719d0b08013f0de6b77179766746c767e9fe547d6a57936bbd0846a20b21acd6f75f5fe779f5a6861fae2c2ec3aa460d4559c755d12b4c9186133b8eee66162369348aa7f180afcc75d5a6f0e17f69e8e4c9232ae24b980a230bbe06b1d4ff87ed35985cec04c, which is different on every call. Can someone explain what is going on? Where are these keys coming from? Are they random concats of a ed25519 and 3 sr25519, if my sessionKeys struct has 4 keys just like polkadot?&#xD;&#xA;&#xD;&#xA;In the `rotate_keys` Substrate rust implementation [here][6] it shows that when make that RPC call it calls the `generate_session_keys` function [here][10] and provides the **best block hash** as an argument. &#xD;&#xA;&#xD;&#xA;The `generate_session_keys` function is included in the Substrate documentation [here][11], where it says that this optional argument (the **best block hash**) is used as the seed that it generates a set of session keys from, and those keys are stored within the keystore, and that function returns the **concatenated SCALE encoded public keys** of that set of session keys.&#xD;&#xA;&#xD;&#xA;The response from every rotateKeys() RPC call would be different if the current **best block hash** was different each time it processed that RPC call.&#xD;&#xA;&#xD;&#xA;In the Substrate implementation [here][12] it shows that it generates each of the key pairs using the seed with `generate_pair(seed.clone())` and concatenates them together (i.e. an ed25519 key pair for grandpa, and three sr25519 key pairs for babe or aura, imonline, and authority discovery), and then encodes the concatenated key pairs using the [Parity SCALE Codec][13].&#xD;&#xA;&#xD;&#xA; The concatenated key pairs may be decoded into raw public keys again using [`decode_into_raw_public_keys`][14].&#xD;&#xA;&#xD;&#xA;&gt; Am I signing a random key with my controller account and then letting my node use that key for validation (grandpa, Imonline heartbeats, babe authorship, etc?)&#xD;&#xA;&#xD;&#xA;In the Polkadot wiki **session certificate** is defined [here][15] as __&quot;A message containing a signature on the concatenation of all the Session keys. Signed by the Controller.&quot;__ &#xD;&#xA;&#xD;&#xA;The [Substrate **Authoring** RPC API][4] stores the generated or provided session keys that are used for validating in the keystore [`CryptoStore`][16], which manages the keys of a node. &#xD;&#xA;&#xD;&#xA;It uses the public key of these stored session keys for signing messages using the controller account.&#xD;&#xA;&#xD;&#xA;A randomly generated key may be provided at genesis or with the `insert_key` RPC call, however the session keys generated with the `rotate_keys` RPC call are based on the **best block hash**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/glossary#session-key&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L311&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs#L301&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_rpc/author/trait.AuthorApi.html&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/blob/master/client/rpc-api/src/author/mod.rs#L48&#xD;&#xA;  [6]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L102&#xD;&#xA;  [7]: https://paritytech.github.io/substrate/master/sc_rpc/author/trait.AuthorApi.html#tymethod.rotate_keys&#xD;&#xA;  [8]: https://polkadot.js.org/docs/substrate/rpc/#insertkeykeytype-text-suri-text-publickey-bytes-bytes&#xD;&#xA;  [9]: https://github.com/polkadot-js/api/blob/master/packages/rpc-augment/src/augment/jsonrpc.ts#L54&#xD;&#xA;  [10]: https://github.com/paritytech/substrate/blob/master/client/rpc/src/author/mod.rs#L108&#xD;&#xA;  [11]: https://paritytech.github.io/substrate/master/sp_session/trait.SessionKeys.html#method.generate_session_keys&#xD;&#xA;  [12]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1360&#xD;&#xA;  [13]: https://github.com/paritytech/parity-scale-codec&#xD;&#xA;  [14]: https://github.com/paritytech/substrate/blob/master/primitives/runtime/src/traits.rs#L1396&#xD;&#xA;  [15]: https://wiki.polkadot.network/docs/glossary#session-certificate&#xD;&#xA;  [16]: https://paritytech.github.io/substrate/master/sp_keystore/trait.SyncCryptoStore.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="37314" PostHistoryTypeId="24" PostId="642" RevisionGUID="58f831c1-5fa0-4d0d-b7e7-8fef526428a1" CreationDate="2023-07-25T09:25:17.077" Comment="Proposed by 408 approved by 83 edit id of 509" ContentLicense="CC BY-SA 4.0" />
  <row Id="37316" PostHistoryTypeId="2" PostId="9401" RevisionGUID="361a7034-71c1-4b15-b6b8-d605bad58e6b" CreationDate="2023-07-25T10:39:14.467" UserId="2844" Text="I am using [nft-pallet](https://github.com/paritytech/substrate/tree/b9b1bbb7cc0fc184ea8881ddaa7e92b91baa1925/frame/nfts) for nft creation. I have implemented in substrate node. Now I wan't to write my own code not `polkadotjs` to create with nft using `nft pallet` using react frontend. Someone please suggest some resources." ContentLicense="CC BY-SA 4.0" />
  <row Id="37318" PostHistoryTypeId="1" PostId="9401" RevisionGUID="361a7034-71c1-4b15-b6b8-d605bad58e6b" CreationDate="2023-07-25T10:39:14.467" UserId="2844" Text="Someone suggest me some resources of NFT Pallet frontend react implementation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37319" PostHistoryTypeId="3" PostId="9401" RevisionGUID="361a7034-71c1-4b15-b6b8-d605bad58e6b" CreationDate="2023-07-25T10:39:14.467" UserId="2844" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37320" PostHistoryTypeId="6" PostId="9401" RevisionGUID="d6902906-df39-45dd-a660-fe7c1685de7a" CreationDate="2023-07-25T10:50:49.593" UserId="2844" Comment="edited tags" Text="|polkadot-js|substrate-node-template|polkadot|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37321" PostHistoryTypeId="2" PostId="9402" RevisionGUID="85b63dc0-3f74-4ab1-81ee-50770a0b2a59" CreationDate="2023-07-25T12:43:28.630" UserId="2166" Text="`gasLimit` should be of type `WeighV2`, not `Weight`. Try something like&#xD;&#xA;```&#xD;&#xA;const gasLimit = api.registry.createType(&#xD;&#xA;  'WeightV2',&#xD;&#xA;  api.consts.system.b ockWeights['maxBlock']&#xD;&#xA;) as WeightV2;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For querying a node this should be sufficient. If you want to execute transactions than you need tor query a method to get gas limits." ContentLicense="CC BY-SA 4.0" />
  <row Id="37323" PostHistoryTypeId="5" PostId="9402" RevisionGUID="3ca43168-fd52-4ca0-bac5-e4a245d8f415" CreationDate="2023-07-25T12:53:31.667" UserId="2166" Comment="added 5 characters in body" Text="`gasLimit` should be of type `WeighV2`, not `Weight`. Try something like&#xD;&#xA;```&#xD;&#xA;const gasLimit = api.registry.createType(&#xD;&#xA;  'WeightV2',&#xD;&#xA;  api.consts.system.blockWeights['maxBlock']&#xD;&#xA;) as WeightV2;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For querying a node this should be sufficient. If you want to execute transactions than you need to query a method first to get gas limits." ContentLicense="CC BY-SA 4.0" />
  <row Id="37324" PostHistoryTypeId="2" PostId="9403" RevisionGUID="129c9d3a-05f9-4511-858f-68c60de08ca7" CreationDate="2023-07-25T13:09:41.697" UserId="4440" Text="I just ran substrate-node-template on dedicated server and connected with substrate-frontend-template. Everything work fine with http(ws), but when I try to connect via https(wss) its not working? becouse --wss-port in substrate-node doesnt supported. How can I fix it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37326" PostHistoryTypeId="1" PostId="9403" RevisionGUID="129c9d3a-05f9-4511-858f-68c60de08ca7" CreationDate="2023-07-25T13:09:41.697" UserId="4440" Text="How to make substrate-node-template accessible via wss connection?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37327" PostHistoryTypeId="3" PostId="9403" RevisionGUID="129c9d3a-05f9-4511-858f-68c60de08ca7" CreationDate="2023-07-25T13:09:41.697" UserId="4440" Text="|substrate-node-template|polkadot|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37328" PostHistoryTypeId="2" PostId="9404" RevisionGUID="ea8eb97f-ecf8-444e-94b1-17732d125c36" CreationDate="2023-07-25T15:41:11.553" UserId="3098" Text="You can use this workflow as an example: https://github.com/paritytech/ink/blob/master/.github/workflows/examples.yml to setup the environment.&#xD;&#xA;&#xD;&#xA;If you want to use your own node, you can supply a path to the executable using `CONTRACTS_NODE` env var.&#xD;&#xA;&#xD;&#xA;e.g.&#xD;&#xA;```&#xD;&#xA;CONTRACTS_NODE=my_node cargo test -F e2e-tests&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="37330" PostHistoryTypeId="50" PostId="4419" RevisionGUID="3d880dc1-a7e9-4fc5-9473-e4020bf25305" CreationDate="2023-07-25T16:04:50.627" UserId="-1" />
  <row Id="37331" PostHistoryTypeId="2" PostId="9405" RevisionGUID="fde3cc21-385b-4e8f-90c2-7dc2781872b3" CreationDate="2023-07-25T16:39:17.167" UserId="427" Text="Over the past few days, we have encountered an issue with block finalization on the Ternoa testnet. It appears that the finalization process stopped, possibly due to one of the validators being offline. Subsequently, we noticed a significant reduction in block production time, which seems to align with the design outlined in the substrate code ([https://github.com/paritytech/substrate/blob/027fc0666fa2f981a693a394f76dc9f4b87209a4/client/consensus/slots/src/lib.rs#L728][1]).&#xD;&#xA;&#xD;&#xA;Initially, the problem arose when there were two validators in the network. In an attempt to address the issue, we made a change to have only one validator active. While this seemed to have some impact, we believe there might be a more comprehensive approach to resolve this issue.&#xD;&#xA;&#xD;&#xA;After careful analysis, we came across the `grandpa.noteStalled` extrinsic, which appears to be a potential solution for recovering from this situation. However, we also want to ensure that implementing this extrinsic does not carry any significant risks or implications for the network's stability.&#xD;&#xA;&#xD;&#xA;Therefore, we would like to seek your insights and expertise on the following points:&#xD;&#xA;&#xD;&#xA;Is the `grandpa.noteStalled` extrinsic the recommended approach to recover from the block finalization issue?&#xD;&#xA;Are there any potential risks or downsides associated with calling the grandpa.noteStalled extrinsic?&#xD;&#xA;What measures can we take to prevent similar issues from occurring in the future?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Explorer link - [https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Falphanet.ternoa.com#/explorer][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/027fc0666fa2f981a693a394f76dc9f4b87209a4/client/consensus/slots/src/lib.rs#L728&#xD;&#xA;  [2]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Falphanet.ternoa.com#/explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="37333" PostHistoryTypeId="1" PostId="9405" RevisionGUID="fde3cc21-385b-4e8f-90c2-7dc2781872b3" CreationDate="2023-07-25T16:39:17.167" UserId="427" Text="Block Finalization Issue and Recovery on Ternoa's Testnet" ContentLicense="CC BY-SA 4.0" />
  <row Id="37334" PostHistoryTypeId="3" PostId="9405" RevisionGUID="fde3cc21-385b-4e8f-90c2-7dc2781872b3" CreationDate="2023-07-25T16:39:17.167" UserId="427" Text="|block-production|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37335" PostHistoryTypeId="2" PostId="9406" RevisionGUID="d11ce2ac-417a-4f78-b75b-16ecaf1d7b0e" CreationDate="2023-07-25T17:31:50.597" UserId="2844" Text="As we can see in polkadotjs, when we add pallet then we can see interaction interface as shown in image below. But how this code is generated? Where can I find the code?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vmDLi.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37337" PostHistoryTypeId="1" PostId="9406" RevisionGUID="d11ce2ac-417a-4f78-b75b-16ecaf1d7b0e" CreationDate="2023-07-25T17:31:50.597" UserId="2844" Text="Where can I find the js code of polkadot pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37338" PostHistoryTypeId="3" PostId="9406" RevisionGUID="d11ce2ac-417a-4f78-b75b-16ecaf1d7b0e" CreationDate="2023-07-25T17:31:50.597" UserId="2844" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37339" PostHistoryTypeId="2" PostId="9407" RevisionGUID="6ae5d4d0-f85d-4be1-911e-6f11e78c71f3" CreationDate="2023-07-25T19:18:04.127" UserId="74" Text="The code for the pallet specifically is not in JavaScript, it is written in Rust. The code for this UI is located in [this repo][1]. The pallets emit type metadata that components in the apps repo utilize to construct the UIs you are using.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="37341" PostHistoryTypeId="50" PostId="4119" RevisionGUID="48a8498c-f1a6-4005-8514-f6892a9b171a" CreationDate="2023-07-25T20:05:50.683" UserId="-1" />
  <row Id="37342" PostHistoryTypeId="50" PostId="5473" RevisionGUID="a15ff5c4-8dda-4806-8630-b06fa68bca9c" CreationDate="2023-07-26T00:06:20.763" UserId="-1" />
  <row Id="37343" PostHistoryTypeId="50" PostId="5113" RevisionGUID="5a3b1e01-f948-487d-8755-1cc5ab3e1423" CreationDate="2023-07-26T03:08:46.000" UserId="-1" />
  <row Id="37344" PostHistoryTypeId="50" PostId="4617" RevisionGUID="89eab634-2392-482f-9d8c-52489cd1c208" CreationDate="2023-07-26T04:03:05.307" UserId="-1" />
  <row Id="37345" PostHistoryTypeId="50" PostId="3931" RevisionGUID="70fdcb41-f91f-453b-bca5-0895a84cd61b" CreationDate="2023-07-26T05:05:05.777" UserId="-1" />
  <row Id="37346" PostHistoryTypeId="50" PostId="4816" RevisionGUID="40d2ff32-9a51-4a72-8d8c-827169131686" CreationDate="2023-07-26T06:02:05.283" UserId="-1" />
  <row Id="37347" PostHistoryTypeId="50" PostId="4908" RevisionGUID="b6e904aa-a815-45e4-bdba-4bd6ea101ef8" CreationDate="2023-07-26T07:08:56.110" UserId="-1" />
  <row Id="37349" PostHistoryTypeId="2" PostId="9408" RevisionGUID="02ebd0b4-2ce2-4170-8a53-305894fa4e86" CreationDate="2023-07-26T10:47:57.880" UserId="2762" Text="You can use an RPC call to [Dry run][1] an extrinsic at a given block. You can construct this with PolkadotJS very easily with `tx.dryRun`, see an example here: https://substrate.stackexchange.com/a/2913/2762&#xD;&#xA;&#xD;&#xA;However this is an [unsafe RPC call][2] and not all the nodes has it activated, if you are running your own node you can activate it with a flag: [Unsafe RPC calls?][3] &#xD;&#xA;&#xD;&#xA;You can use [Sidecar][4] too that exposes an endpoint to dry run a extrinsic.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/rpc/#dryrunextrinsic-bytes-at-blockhash-applyextrinsicresult&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/issues/6298&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/3575/unsafe-rpc-calls&#xD;&#xA;  [4]: https://substrate.stackexchange.com/a/2912/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="37351" PostHistoryTypeId="2" PostId="9409" RevisionGUID="078f2817-cb7f-4236-b190-fd40eba1449d" CreationDate="2023-07-26T12:02:23.643" UserId="2844" Text="Can someone please help me figure our this issue?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `ink::storage::Mapping&lt;(ink::ink_primitives::AccountId, u64), u64, RequestUnstakingTimeKey&gt;: StorableHint&lt;ManualKey&lt;1648493478&gt;&gt;` is not satisfied&#xD;&#xA;      --&gt; /Users/ganesholi/Developer/Build3rs/foxies/impls/staking/types.rs:33:33&#xD;&#xA;       |&#xD;&#xA;    33 |     pub request_unstaking_time: Mapping&lt;(AccountId, u64), u64, RequestUnstakingTimeKey&gt;,&#xD;&#xA;       |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `StorableHint&lt;ManualKey&lt;1648493478&gt;&gt;` is not implemented for `ink::storage::Mapping&lt;(ink::ink_primitives::AccountId, u64), u64, RequestUnstakingTimeKey&gt;`&#xD;&#xA;       |&#xD;&#xA;       = help: the trait `StorableHint&lt;Key&gt;` is implemented for `ink::storage::Mapping&lt;K, V, InnerKey&gt;`&#xD;&#xA;       = note: required for `ink::storage::Mapping&lt;(ink::ink_primitives::AccountId, u64), u64, RequestUnstakingTimeKey&gt;` to implement `AutoStorableHint&lt;ManualKey&lt;1713486492, ManualKey&lt;1648493478&gt;&gt;&gt;`&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `ink::storage::Mapping&lt;(ink::ink_primitives::AccountId, u64), u64, RequestUnstakingTimeKey&gt;: StorableHint&lt;ResolverKey&lt;_, ManualKey&lt;1713486492, ManualKey&lt;1648493478&gt;&gt;&gt;&gt;` is not satisfied&#xD;&#xA;      --&gt; /Users/ganesholi/Developer/Build3rs/foxies/impls/staking/types.rs:33:33&#xD;&#xA;       |&#xD;&#xA;    33 |     pub request_unstaking_time: Mapping&lt;(AccountId, u64), u64, RequestUnstakingTimeKey&gt;,&#xD;&#xA;       |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `StorableHint&lt;ResolverKey&lt;_, ManualKey&lt;1713486492, ManualKey&lt;1648493478&gt;&gt;&gt;&gt;` is not implemented for `ink::storage::Mapping&lt;(ink::ink_primitives::AccountId, u64), u64, RequestUnstakingTimeKey&gt;`&#xD;&#xA;       |&#xD;&#xA;       = help: the trait `StorableHint&lt;Key&gt;` is implemented for `ink::storage::Mapping&lt;K, V, InnerKey&gt;`&#xD;&#xA;       = note: required for `ink::storage::Mapping&lt;(ink::ink_primitives::AccountId, u64), u64, RequestUnstakingTimeKey&gt;` to implement `AutoStorableHint&lt;ManualKey&lt;1713486492, ManualKey&lt;1648493478&gt;&gt;&gt;`&#xD;&#xA;    &#xD;&#xA;    Some errors have detailed explanations: E0277, E0407, E0425.&#xD;&#xA;    For more information about an error, try `rustc --explain E0277`.&#xD;&#xA;    warning: `foxies` (lib) generated 6 warnings&#xD;&#xA;    error: could not compile `foxies` due to 4 previous errors; 6 warniERROR: command [&quot;/Users/ganesholi/.rustup/toolchains/nightly-2023-02-07-aarch64-apple-darwin/bin/cargo&quot;, &quot;build&quot;, &quot;--color=always&quot;, &quot;--target=wasm32-unknown-unknown&quot;, &quot;-Zbuild-std=core,alloc&quot;, &quot;--no-default-features&quot;, &quot;--release&quot;, &quot;--target-dir=/Users/ganesholi/Developer/Build3rs/foxies/contracts/nft_contract/target/ink&quot;, &quot;--features&quot;, &quot;ink/ink-debug&quot;] exited with code 101&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air nft_contract % &#xD;&#xA;&#xD;&#xA;This is my code link [github](https://github.com/Build3rs-Labs/foxies/blob/9b24d8308dc6e9157ee57614d6512fe7417c3d83/impls/staking/types.rs#L33)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/GUFPE.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37353" PostHistoryTypeId="1" PostId="9409" RevisionGUID="078f2817-cb7f-4236-b190-fd40eba1449d" CreationDate="2023-07-26T12:02:23.643" UserId="2844" Text="the trait `StorableHint&lt;ManualKey&lt;1648493478&gt;&gt;` is not implemented" ContentLicense="CC BY-SA 4.0" />
  <row Id="37354" PostHistoryTypeId="3" PostId="9409" RevisionGUID="078f2817-cb7f-4236-b190-fd40eba1449d" CreationDate="2023-07-26T12:02:23.643" UserId="2844" Text="|polkadot|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37355" PostHistoryTypeId="5" PostId="3023" RevisionGUID="4fed9f43-6a8f-4e4c-8cb8-a75a097b00d0" CreationDate="2023-07-26T12:44:11.690" UserId="2762" Comment="improved formatting" Text="&#xD;&#xA;I had setup the relay chain and parachain (`collator-1`) in a local testnet environment on different servers and blocks was finalising for both.&#xD;&#xA;But after 1 month I tried adding another collator(`collator-2`) on same relaychain but its not finalising blocks and also the previous collator(`collator-1`) stopped finalising the blocks and showing an error `&quot;Collation wasn't advertised to any validator&quot;`&#xD;&#xA;&#xD;&#xA;collator-1 error logs-&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;     2022-06-01 17:18:36 [Parachain] PoV size { header: 0.220703125kb, extrinsics: 2.5576171875kb, storage_proof: 9.318359375kb }&#xD;&#xA;     2022-06-01 17:18:36 [Parachain] Compressed PoV size: 11.1484375kb&#xD;&#xA;     2022-06-01 17:18:36 [Parachain] Produced proof-of-validity candidate. block_hash=0x11aec83abc1246d85d64a05733f478fa26999beb971a2b6675a57c414c8945fe&#xD;&#xA;     2022-06-01 17:18:36 [Relaychain]  Idle (4 peers), best: #580555 (0x4903…0aa0), finalized #580552 (0x6b19…196d), ⬇ 2.2kiB/s ⬆ 2.2kiB/s&#xD;&#xA;     2022-06-01 17:18:36 [Parachain]  Idle (0 peers), best: #274796 (0x494f…61e7), finalized #274794 (0xd062…e40c), ⬇ 65 B/s ⬆ 86 B/s&#xD;&#xA;     2022-06-01 17:18:37 Accepted a new tcp connection from 127.0.0.1:45496.&#xD;&#xA;     2022-06-01 17:18:37 Accepted a new tcp connection from 127.0.0.1:45506.&#xD;&#xA;     2022-06-01 17:18:41 Accepted a new tcp connection from 127.0.0.1:47060.&#xD;&#xA;     2022-06-01 17:18:41 [Relaychain]  Idle (4 peers), best: #580555 (0x4903…0aa0), finalized #580553 (0xac92…2a37), ⬇ 1.4kiB/s ⬆ 1.3kiB/s&#xD;&#xA;     2022-06-01 17:18:41 [Parachain]  Idle (0 peers), best: #274796 (0x494f…61e7), finalized #274795 (0x2544…788e), ⬇ 0 ⬆ 0&#xD;&#xA;     2022-06-01 17:18:42 [Relaychain] ✨ Imported #580556 (0xb739…d8ff)&#xD;&#xA;     2022-06-01 17:18:42 [Parachain] Starting collation. relay_parent=0xb739e12c0e91e6516b90a73929c765f2c66e67aed239c420cfdffe7013b8d8ff at=0x494f4f6b232e8221e3aa56a0f44592eba04a5249ff058f5ae85872010b8861e7&#xD;&#xA;     2022-06-01 17:18:42 [Relaychain] ♻️  Reorg on #580556,0xb739…d8ff to #580556,0x8fba…d379, common ancestor #580555,0x4903…0aa0&#xD;&#xA;     2022-06-01 17:18:42 [Relaychain] ✨ Imported #580556 (0x8fba…d379)&#xD;&#xA;     2022-06-01 17:18:42 [Parachain] Starting collation. relay_parent=0x8fbae1f1bb8694d22492b9fa2b14c9d2b698800152d1aa556dc2e63ef499d379 at=0x494f4f6b232e8221e3aa56a0f44592eba04a5249ff058f5ae85872010b8861e7&#xD;&#xA;     2022-06-01 17:18:46 [Relaychain]  Idle (4 peers), best: #580556 (0x8fba…d379), finalized #580554 (0xe7ed…2446), ⬇ 2.7kiB/s ⬆ 2.6kiB/s&#xD;&#xA;     2022-06-01 17:18:46 [Parachain]  Idle (0 peers), best: #274796 (0x494f…61e7), finalized #274795 (0x2544…788e), ⬇ 0 ⬆ 0&#xD;&#xA;     2022-06-01 17:18:48 [Relaychain] ✨ Imported #580557 (0x28a7…4722)&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] Starting collation. relay_parent=0x28a75a8ec01b2d1c0c3c5217565490a476ff9b4f890e5f62c163cb153e3a4722 at=0x494f4f6b232e8221e3aa56a0f44592eba04a5249ff058f5ae85872010b8861e7&#xD;&#xA;     2022-06-01 17:18:48 [Parachain]  Starting consensus session on top of parent 0x494f4f6b232e8221e3aa56a0f44592eba04a5249ff058f5ae85872010b8861e7&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] on_timestamp_set called&#xD;&#xA;     2022-06-01 17:18:48 [Parachain]  Prepared block for proposing at 274797 (1 ms) [hash: 0x0947a20046b254b258429c165b7d216d0b33bb0294e3b7f52634384a25c681a9; parent_hash: 0x494f…61e7; extrinsics (2): [0x2636…0777, 0x430c…2fc5]]&#xD;&#xA;     2022-06-01 17:18:48 [Parachain]  Pre-sealed block for proposal at 274797. Hash now 0xc41c88a611b28e289b5b816e32040c5324a3e8072a4537d8b173674655aa57cc, previously 0x0947a20046b254b258429c165b7d216d0b33bb0294e3b7f52634384a25c681a9.&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] ✨ Imported #274797 (0xc41c…57cc)&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] PoV size { header: 0.220703125kb, extrinsics: 2.5576171875kb, storage_proof: 9.318359375kb }&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] Compressed PoV size: 11.1484375kb&#xD;&#xA;     2022-06-01 17:18:48 [Parachain] Produced proof-of-validity candidate. block_hash=0xc41c88a611b28e289b5b816e32040c5324a3e8072a4537d8b173674655aa57cc&#xD;&#xA;     2022-06-01 17:18:51 [Relaychain]  Idle (4 peers), best: #580557 (0x28a7…4722), finalized #580554 (0xe7ed…2446), ⬇ 1.3kiB/s ⬆ 1.5kiB/s&#xD;&#xA;     2022-06-01 17:18:51 [Parachain]  Idle (0 peers), best: #274796 (0x494f…61e7), finalized #274795 (0x2544…788e), ⬇ 0 ⬆ 0&#xD;&#xA;     2022-06-01 17:18:52 [Relaychain]  Applying authority set change scheduled at block #580555&#xD;&#xA;     2022-06-01 17:18:52 [Relaychain]  Applying GRANDPA set change to new set [(Public(88dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee (5FA9nQDV...)), 1), (Public(d17c2d7823ebf260fd138f2d7e27d114c0145d968b5ff5006125f2414fadae69 (5GoNkf6W...)), 1)]&#xD;&#xA;     2022-06-01 17:18:54 [Relaychain] ✨ Imported #580558 (0xd49f…8314)&#xD;&#xA;     2022-06-01 17:18:54 [Relaychain] Collation wasn't advertised to any validator. candidate_hash=0x5edc61513bdcfb7b82d2e891252362bd16b54d6ee55e5e88c7404da0000a736c pov_hash=0xa0e6b151f64d8ef00997c806c5bffedb0773ef5be0e576bd0601193ebfca6425&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;Steps I had done to add both the collators-&#xD;&#xA;&#xD;&#xA;**Collator-1 Steps-**&#xD;&#xA;&#xD;&#xA;1.Generated plain spec and updated `ParaID`&#xD;&#xA;&#xD;&#xA;    ./node build-spec --disable-default-bootnode --chain test &gt; test-parachain-plain.json&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;2.Generated raw chain spec&#xD;&#xA;&#xD;&#xA;    ./node build-spec --chain test-parachain-plain.json --raw --disable-default-bootnode &gt; test-parachain-2000-raw.json&#xD;&#xA;&#xD;&#xA;3.Obtained Wasm runtime &#xD;&#xA;&#xD;&#xA;    ./node export-genesis-wasm --chain test-parachain-2000-raw.json &gt; para-2000-wasm&#xD;&#xA;&#xD;&#xA;4.Generated genesis state&#xD;&#xA;&#xD;&#xA;    ./node export-genesis-state --chain test-parachain-2000-raw.json &gt; para-2000-genesis&#xD;&#xA;&#xD;&#xA;5.Added keys to the keystore&#xD;&#xA;&#xD;&#xA;    ./node key insert --base-path /data/parachain/test --chain test-parachain-2000-raw.json --scheme Sr25519 --suri &lt;1st-account-secret-seed-key&gt; --key-type aura&#xD;&#xA;&#xD;&#xA;6.Started the collator node&#xD;&#xA;&#xD;&#xA;    ./node --collator --force-authoring --chain test-parachain-2000-raw.json --base-path /data/parachain/test --name &quot;Test-Collator-1&quot; --pruning archive --port 40343  --ws-external --ws-port 9955 --rpc-external --rpc-port 9943 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --rpc-methods=unsafe --rpc-cors all -- --execution wasm --chain rococo-local.json --port 30343 --ws-port 9977 --bootnodes /ip4/&lt;relaychain-IP&gt;/tcp/30333/p2p/&lt;local-node-identity&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Collator-2 Steps-**&#xD;&#xA;&#xD;&#xA;1.Copied raw spec file from collator-1 node to collator-2 node&#xD;&#xA;&#xD;&#xA;2.Added keys to the keystore&#xD;&#xA;&#xD;&#xA;    ./node key insert --base-path /data/parachain/test --chain test-parachain-2000-raw.json --scheme Sr25519 --suri &lt;2nd-account-secret-seed-key&gt; --key-type aura&#xD;&#xA;&#xD;&#xA;3.Started the collator node&#xD;&#xA;&#xD;&#xA;    ./node --collator --force-authoring --chain test-parachain-2000-raw.json --base-path /data/parachain/test --name &quot;Test-Collator-2&quot; --pruning archive --port 40344  --ws-external --ws-port 9956 --rpc-external --rpc-port 9944 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --rpc-methods=unsafe --rpc-cors all -- --execution wasm --chain rococo-local.json --port 30344 --ws-port 9978 --bootnodes /ip4/&lt;relaychain-IP&gt;/tcp/30333/p2p/&lt;local-node-identity&gt;&#xD;&#xA;&#xD;&#xA;Does somebody have any idea how to resolve this issue?&#xD;&#xA;Is collator-1 will start finalising blocks from where it stopped? If yes how can I restore back please&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37356" PostHistoryTypeId="2" PostId="9410" RevisionGUID="9321bc55-ed97-4dcf-a27b-cf4f094602f0" CreationDate="2023-07-26T12:47:54.373" UserId="2762" Text="You have to set the session keys using the RPC call `author.insertKey` so the collator can start producing blocks, see this step-by-step explanation: [How to properly set session keys for Relay and Parachain with custom keys][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/5747/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="37358" PostHistoryTypeId="6" PostId="9392" RevisionGUID="c5b37831-1fa9-4d26-93e6-6ebbc0bb673c" CreationDate="2023-07-27T01:11:17.583" UserId="4463" Comment="edited tags" Text="|ink|scale-codec|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37359" PostHistoryTypeId="50" PostId="7354" RevisionGUID="85012c9b-6535-4a31-b466-0e7e232537dc" CreationDate="2023-07-27T04:09:56.280" UserId="-1" />
  <row Id="37360" PostHistoryTypeId="2" PostId="9411" RevisionGUID="e791a952-2c8d-4eab-ad02-490a9601b849" CreationDate="2023-07-27T06:53:09.587" UserId="2762" Text="Can you share your runtime file? To understand what the error: `{ Err: { Module: { index: '8', error: '0x02000000' } } }` means we have to check the runtime code in your Substrate node.&#xD;&#xA;&#xD;&#xA;The `index number` is the index of the pallet in the runtime from which the error originated. The `error` is the index of that pallet's errors (in hex) which is the exact one we're looking for. Both of these indices start counting from 0.&#xD;&#xA;&#xD;&#xA;For example if you are running the [substrate-contracts-node][1] we can see that the index 8 refers to pallet Contracts ([see code here][2]). If we go now to the [pallet Contracts code][3] we can see that the error in the position `0x02000000` (2 in hex) is OutOfGas ([see the code here][4]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/src/lib.rs#L398&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/master/frame/contracts/&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/lib.rs#L901" ContentLicense="CC BY-SA 4.0" />
  <row Id="37362" PostHistoryTypeId="2" PostId="9412" RevisionGUID="a2dd2229-adee-4f2b-a1ac-b37737185a8c" CreationDate="2023-07-27T07:18:36.017" UserId="3317" Text="From looking at your configuration; the [`ValidatorId`][1] is configured to an `AccountId` and `ValidatorIdOf` is configured to `()`. `ValidatorIdOf` makes the conversion from an `AccountId` to a `ValidatorId` (can be used for controller accounts). What I think is happening in your case is because `ValidatorIdOf` is set to `()` it can't convert the `AccountId`, that is used to sign the `set_keys` transaction, to a (unique) `ValidatorId`. &#xD;&#xA;&#xD;&#xA;So you need to configure the `ValidatorIdOf` to something that can convert an `AccountId` to an `AccountId` (because you configured `ValidatorId` to `AccountId`. &#xD;&#xA;&#xD;&#xA;If you have a look at [Rococo's configuration][2],  you can see that the conversion is just returning the `AccountId` that is taken as input (you then don't have the ability for controller accounts).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/cb450b626ac8e8848db76933e114e57e7cce3e8d/frame/session/src/lib.rs#L39C2-L41&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot/blob/09b61286da11921a3dda0a8e4015ceb9ef9cffca/runtime/rococo/src/lib.rs#L336-L342" ContentLicense="CC BY-SA 4.0" />
  <row Id="37364" PostHistoryTypeId="2" PostId="9413" RevisionGUID="221cfbc6-2989-45e9-808b-70468ee036e3" CreationDate="2023-07-27T08:30:10.767" UserId="2762" Text="I think first of all you have to understand the difference between collators and validators. Here is the [Collator][1] and [Validators][2] definitions on the Polkadot Wiki.&#xD;&#xA;&#xD;&#xA;In a few words, the nodes which are configured to produce blocks in the relay chain are **validators**, and for parachains these are **collators**. &#xD;&#xA;Collators are similar to validators on any other blockchain but they do not need to provide security guarantees because Polkadot provides those. If a parachain block is invalid, it will get rejected by validators.&#xD;&#xA;&#xD;&#xA;For more information read this interesting StackExchange question that explores it more in depth: [What node types run in the relay chain vs. parachain?][3]&#xD;&#xA;&#xD;&#xA;Regards to the spec, every Substrate-based chain requires a chain specification. The chain specification for the relay chain network provides the same types of configuration settings that the chain specification does for other networks. In the tutorial you mention you can see [How to prepare a local relay chain spec][4] and [How to prepare the spec for a parachain][5].&#xD;&#xA;&#xD;&#xA;About your error of how to add a new Collator after running your environment take a look into [How to add new collators on a running parachain?][6]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-collator&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-validator&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/5896/what-node-types-run-in-the-relay-chain-vs-parachain&#xD;&#xA;  [4]: https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/#relay-chain-specification&#xD;&#xA;  [5]: https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/#modify-the-default-chain-specification&#xD;&#xA;  [6]: https://substrate.stackexchange.com/questions/5645/how-to-add-new-collators-on-a-running-parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="37366" PostHistoryTypeId="5" PostId="9402" RevisionGUID="72cc2248-5083-45b9-b2ec-f69117b7fa30" CreationDate="2023-07-27T08:46:59.953" UserId="2166" Comment="added 1 character in body" Text="`gasLimit` should be of type `WeighV2`, not `Weight`. Try something like&#xD;&#xA;```&#xD;&#xA;const gasLimit = api.registry.createType(&#xD;&#xA;  'WeightV2',&#xD;&#xA;  api.consts.system.blockWeights['maxBlock']&#xD;&#xA;) as WeightV2;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For querying a method this should be sufficient. If you want to execute transactions than you need to query a method first to get gas limits." ContentLicense="CC BY-SA 4.0" />
  <row Id="37367" PostHistoryTypeId="50" PostId="9039" RevisionGUID="22be5014-3853-484c-81e5-ed540097a8e0" CreationDate="2023-07-27T10:02:30.267" UserId="-1" />
  <row Id="37368" PostHistoryTypeId="50" PostId="7352" RevisionGUID="f3da3256-3d7a-4ae6-94d0-51c24b814c84" CreationDate="2023-07-27T11:01:10.083" UserId="-1" />
  <row Id="37369" PostHistoryTypeId="33" PostId="8653" RevisionGUID="648bf289-898c-4179-b1f5-7866a0c516a0" CreationDate="2023-07-27T15:08:20.130" UserId="139" Comment="30" />
  <row Id="37370" PostHistoryTypeId="2" PostId="9414" RevisionGUID="feeb5529-fbcd-4766-9715-379d70d42285" CreationDate="2023-07-27T15:12:17.503" UserId="2647" Text="In the `new_partial()` method when initializing Aura [import queue](https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105) it doesn't actually use grandpa's block import, it uses kind of grandpa-augmented block import. Block imports implement a chain of responsibility pattern. &#xD;&#xA;&#xD;&#xA;The very last guy is always the [client](https://github.com/paritytech/substrate/blob/14e0a0b628f9154c5a2c870062c3aac7df8983ed/client/service/src/client/client.rs#L1751). If you need to add some extra logic to that chain you create a new block import and the previous becomes [nested](https://github.com/paritytech/substrate/blob/14e0a0b628f9154c5a2c870062c3aac7df8983ed/client/consensus/grandpa/src/import.rs#L61). Now you can do additional checks, throw errors and [fallback](https://github.com/paritytech/substrate/blob/14e0a0b628f9154c5a2c870062c3aac7df8983ed/client/consensus/grandpa/src/import.rs#L540) to the nested block import if needed.&#xD;&#xA;&#xD;&#xA;So what happens in the `node-template`&#xD;&#xA; 1. client (default block import) is created (**client**)&#xD;&#xA; 2. grandpa wraps it with its own block import, applying his specific logic. (**grandpa -&gt; client**) &#xD;&#xA;&#xD;&#xA;That is why you have to use `grandpa_block_import` otherwise grandpa's logic is not executed.&#xD;&#xA;&#xD;&#xA;Since Aura is a very simple consensus it doesn't apply any specific logic of its own. Take a look [here](https://github.com/paritytech/substrate/blob/14e0a0b628f9154c5a2c870062c3aac7df8983ed/bin/node/cli/src/service.rs#L207) instead. It uses both babe and grandpa. So the chain is **babe -&gt; grandpa -&gt; client** and obviously you have to use the last `block_import` to execute the whole chain. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37372" PostHistoryTypeId="2" PostId="9415" RevisionGUID="3ae8a43c-a720-49b5-ba74-c7cc5811bf91" CreationDate="2023-07-27T15:38:18.587" UserId="386" Text="I have been experimenting with the [substrate-relay](https://github.com/freeverseio/parity-bridges-common) application and successfully bridged `Millau` to `Rialto` following the standard example. Now, I am trying to bridge the [substrate-template-node](https://github.com/substrate-developer-hub/substrate-node-template) to `Rialto`.&#xD;&#xA;&#xD;&#xA;My approach has been to **substitute the Millau node with a substrate-template-node**. Unfortunately, this has resulted in an issue.&#xD;&#xA;&#xD;&#xA;When I try to establish this bridge, the relay fails to connect to the substrate-template-node and provides the following error message:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ERROR bridge Failed to connect to Millau node: RpcError(ParseError(Error(&quot;invalid length 64, expected a (both 0x-prefixed or not) hex string or byte array containing 64 bytes&quot;, line: 0, column: 0))).&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am wondering if it is necessary to implement additional code to enable the relay to connect to the chain I am aiming for? Any advice or insight on how to troubleshoot this issue would be much appreciated.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37374" PostHistoryTypeId="1" PostId="9415" RevisionGUID="3ae8a43c-a720-49b5-ba74-c7cc5811bf91" CreationDate="2023-07-27T15:38:18.587" UserId="386" Text="Unable to Bridge Substrate-Template-Node to Rialto" ContentLicense="CC BY-SA 4.0" />
  <row Id="37375" PostHistoryTypeId="3" PostId="9415" RevisionGUID="3ae8a43c-a720-49b5-ba74-c7cc5811bf91" CreationDate="2023-07-27T15:38:18.587" UserId="386" Text="|parity-bridges-common|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37376" PostHistoryTypeId="2" PostId="9416" RevisionGUID="b17e5e35-4b81-424e-8077-7a182b882ae8" CreationDate="2023-07-27T16:18:19.137" UserId="29" Text="You could use zombienet tests. For example, take a look at this test:&#xD;&#xA;- https://github.com/paritytech/zombienet/blob/main/tests/dispute-valid-block.test.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="37378" PostHistoryTypeId="2" PostId="9417" RevisionGUID="7e9921bf-faa8-4721-bafb-e5755b8a467e" CreationDate="2023-07-27T16:23:24.733" UserId="4485" Text="In my contract, I have a requirement to call messages from external contracts without knowing their specific identities beforehand. To achieve this, I utilize the call builder, enabling the execution of transactions at a low level. Since these transactions may encounter failures, I adopt the try_invoke method, which facilitates error handling. The try_invoke method can return two types of errors:&#xD;&#xA;&#xD;&#xA;1) Errors arising from the underlying execution environment (ink::env::Error).&#xD;&#xA;1) Errors stemming from the programming language itself (ink::LangErrors).&#xD;&#xA;&#xD;&#xA;Below is the section of code where I implement this functionality:&#xD;&#xA;```         &#xD;&#xA;            ...&#xD;&#xA;            // Fetch the transaction&#xD;&#xA;            let tx = self.get_tx(tx_id).expect(&quot;This should never fail because we are checking the tx_id before calling this function&quot;);&#xD;&#xA;&#xD;&#xA;            let tx_result = build_call::&lt;&lt;Self as ::ink::env::ContractEnv&gt;::Env&gt;()&#xD;&#xA;                .call(tx.address)&#xD;&#xA;                .gas_limit(tx.gas_limit)&#xD;&#xA;                .transferred_value(tx.transferred_value)&#xD;&#xA;                .call_flags(CallFlags::default().set_allow_reentry(tx.allow_reentry))&#xD;&#xA;                .exec_input(ExecutionInput::new(tx.selector.into()).push_arg(InputArgs(&amp;tx.input)))&#xD;&#xA;                .returns::&lt;Vec&lt;u8&gt;&gt;()&#xD;&#xA;                .try_invoke();&#xD;&#xA;&#xD;&#xA;            // Instead of just returning a custom Error we could return the error from the call&#xD;&#xA;            let result = match tx_result {&#xD;&#xA;                Ok(Ok(bytes)) =&gt; TxResult::Success(bytes),&#xD;&#xA;                Ok(Err(e)) =&gt; TxResult::Failed(Error::LangExecutionFailed(e)),&#xD;&#xA;                Err(e) =&gt; TxResult::Failed(Error::EnvExecutionFailed(e)), // Here is where i need to wrap the error in order to provide useful information about the tx failure&#xD;&#xA;            };&#xD;&#xA;            ...&#xD;&#xA;```&#xD;&#xA;I defined two custom errors that serve as wrappers for the errors thrown by the try_invoke method.&#xD;&#xA;```&#xD;&#xA;#[derive(scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Env error encountered when executing the transaction&#xD;&#xA;        EnvExecutionFailed(ink::env::Error),&#xD;&#xA;        /// Transaction executed but Lang error encountered&#xD;&#xA;        LangExecutionFailed(ink::LangError),&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;However, during compilation, I encountered the following errors:&#xD;&#xA;&#xD;&#xA;The trait WrapperTypeEncode is not implemented for ink::ink_env::Error.&#xD;&#xA;The trait WrapperTypeDecode is not implemented for ink::ink_env::Error.&#xD;&#xA;&#xD;&#xA;I've come to understand that the error is being thrown because ink::env::Error does not implement scale::Encode and scale::Decode traits. I'm wondering if there's a way to manually implement these traits , or if there is another solution." ContentLicense="CC BY-SA 4.0" />
  <row Id="37380" PostHistoryTypeId="1" PostId="9417" RevisionGUID="7e9921bf-faa8-4721-bafb-e5755b8a467e" CreationDate="2023-07-27T16:23:24.733" UserId="4485" Text="How to wrap an ink::env::Error in a Custom Error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37381" PostHistoryTypeId="3" PostId="9417" RevisionGUID="7e9921bf-faa8-4721-bafb-e5755b8a467e" CreationDate="2023-07-27T16:23:24.733" UserId="4485" Text="|polkadot|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37382" PostHistoryTypeId="2" PostId="9418" RevisionGUID="6514d5be-2bc6-4368-930a-6d26222e6d33" CreationDate="2023-07-27T16:54:14.180" UserId="377" Text="I have a storage in pallet&#xD;&#xA;&#xD;&#xA;    pub type Users&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, User&gt;;&#xD;&#xA;&#xD;&#xA;I need to iterate over all the storage map to check a field data inside the User structure.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37384" PostHistoryTypeId="1" PostId="9418" RevisionGUID="6514d5be-2bc6-4368-930a-6d26222e6d33" CreationDate="2023-07-27T16:54:14.180" UserId="377" Text="How we can iterate over all items in a storage map?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37385" PostHistoryTypeId="3" PostId="9418" RevisionGUID="6514d5be-2bc6-4368-930a-6d26222e6d33" CreationDate="2023-07-27T16:54:14.180" UserId="377" Text="|storage|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37386" PostHistoryTypeId="2" PostId="9419" RevisionGUID="ecbfed5d-7414-47f6-9381-10eb4ac84920" CreationDate="2023-07-27T17:36:17.430" UserId="427" Text="StorageMap contains a function called iter() which returns a Iterator. So you can do something like this :&#xD;&#xA;&#xD;&#xA;    for (user_account_id, user_data) in Users::&lt;T&gt;::iter() {&#xD;&#xA;        // Access the `User` structure using the user_account_id&#xD;&#xA;        let user = user_data.ok_or(&quot;Error: User data not found&quot;)?;&#xD;&#xA;&#xD;&#xA;        // Now you can check the field data inside the `User` structure&#xD;&#xA;        if user.some_field == SomeValue {&#xD;&#xA;            // Do something with the user's data&#xD;&#xA;        }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="37388" PostHistoryTypeId="5" PostId="8023" RevisionGUID="616009cc-d9e9-4aca-a9ba-d91186b02fe1" CreationDate="2023-07-27T18:45:38.217" UserId="2762" Comment="added 99 characters in body" Text="To add a new collator key to your Polkadot parachain in a development setup, you can follow these steps:&#xD;&#xA;&#xD;&#xA;Generate a new key pair for the collator using a tool such as subkey or polkadot-js.&#xD;&#xA;&#xD;&#xA;Add the new key to your local node's keystore by running the following command:&#xD;&#xA;```sh&#xD;&#xA;polkadot-js keyring add &lt;key-name&gt; --type sr25519 --suri &lt;path-to-my-key&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Replace `&lt;key-name&gt;` with the name you want to give to your new key and `&lt;path-to-my-key&gt;` with the path to the file containing your key.&#xD;&#xA;&#xD;&#xA;Update your node's configuration file to include the new collator key. The configuration file is usually located in the `./config` directory and is named chain_spec.rs. You will need to update the genesis section and add the new key to the validators array:&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;&quot;genesis&quot;: {&#xD;&#xA;    ...&#xD;&#xA;    &quot;validatorIds&quot;: [&#xD;&#xA;        &quot;&lt;existing-validator-1&gt;&quot;,&#xD;&#xA;        &quot;&lt;existing-validator-2&gt;&quot;,&#xD;&#xA;        &quot;&lt;new-collator-key&gt;&quot;&#xD;&#xA;    ]&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Replace `&lt;existing-validator-1&gt;` and `&lt;existing-validator-2&gt;`&#xD;&#xA;&#xD;&#xA;with the existing validator keys that you want to retain, and replace `&lt;new-collator-key&gt;` with the new key you just generated.&#xD;&#xA;&#xD;&#xA;Restart your node to apply the changes.&#xD;&#xA;&#xD;&#xA;Once you have completed these steps, your node should be able to function as a collator using the new key you added.&#xD;&#xA;&#xD;&#xA;edit1: Have you gone through these steps?&#xD;&#xA;&#xD;&#xA;Generate a new keypair for the collator node using the subkey command-line tool.&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;subkey generate --scheme sr25519&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Add the generated key to the aura section of the collator's chain specification file.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;&quot;aura&quot;: {&#xD;&#xA;  &quot;authorities&quot;: [&quot;your_generated_key&quot;],&#xD;&#xA;  &quot;params&quot;: {&#xD;&#xA;    &quot;stepDuration&quot;: 6,&#xD;&#xA;    &quot;validators&quot;: 1&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Launch the collator node with the new key using the `--validator` and `--key` flags.&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;./collator_binary --validator --key &quot;your_generated_key_seed&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Update the relay chain's chain specification file to include the parachain with the collator's node endpoint and ID.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;&quot;parachains&quot;: {&#xD;&#xA;  &quot;2001&quot;: {&#xD;&#xA;    &quot;bin&quot;: &quot;path/to/parachain/binary&quot;,&#xD;&#xA;    &quot;id&quot;: 2001,&#xD;&#xA;    &quot;paraGenesis&quot;: &quot;path/to/para/genesis&quot;,&#xD;&#xA;    &quot;collatorEndpoint&quot;: &quot;/ip4/&lt;collator_node_ip&gt;/tcp/&lt;collator_node_port&gt;&quot;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Finally, start the relay chain and connect it with the parachain by referencing its ID.&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;./relaychain_binary --parachain-id 2001&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I hope this helps. " ContentLicense="CC BY-SA 4.0" />
  <row Id="37389" PostHistoryTypeId="50" PostId="7383" RevisionGUID="39c4087f-8f67-452c-81c2-1d17e2fd643d" CreationDate="2023-07-27T19:03:45.410" UserId="-1" />
  <row Id="37392" PostHistoryTypeId="50" PostId="5572" RevisionGUID="a92b12e0-c3f4-4b94-a30b-2001b12b2072" CreationDate="2023-07-27T21:00:50.120" UserId="-1" />
  <row Id="37393" PostHistoryTypeId="5" PostId="9414" RevisionGUID="a39c85d4-a908-46dd-84ef-703228a3b45f" CreationDate="2023-07-28T03:12:15.283" UserId="2647" Comment="added 11 characters in body" Text="In the `new_partial()` method when initializing Aura [import queue](https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105) it doesn't actually use grandpa's block import, it uses a grandpa's decorated block import. Block imports implement a chain of responsibility pattern (well kind of). &#xD;&#xA;&#xD;&#xA;The very last guy is always the [client](https://github.com/paritytech/substrate/blob/14e0a0b628f9154c5a2c870062c3aac7df8983ed/client/service/src/client/client.rs#L1751). If you need to add some extra logic to that chain you create a new block import and the previous becomes [nested](https://github.com/paritytech/substrate/blob/14e0a0b628f9154c5a2c870062c3aac7df8983ed/client/consensus/grandpa/src/import.rs#L61). Now you can do additional checks, throw errors and [fallback](https://github.com/paritytech/substrate/blob/14e0a0b628f9154c5a2c870062c3aac7df8983ed/client/consensus/grandpa/src/import.rs#L540) to the nested block import if needed.&#xD;&#xA;&#xD;&#xA;So what happens in the `node-template`&#xD;&#xA; 1. client (default block import) is created (**client**)&#xD;&#xA; 2. grandpa wraps it with its own block import, applying his specific logic. (**grandpa -&gt; client**) &#xD;&#xA;&#xD;&#xA;That is why you have to use `grandpa_block_import` otherwise grandpa's logic is not executed.&#xD;&#xA;&#xD;&#xA;Since Aura is a very simple consensus it doesn't apply any specific logic of its own. Take a look [here](https://github.com/paritytech/substrate/blob/14e0a0b628f9154c5a2c870062c3aac7df8983ed/bin/node/cli/src/service.rs#L207) instead. It uses both babe and grandpa. So the chain is **babe -&gt; grandpa -&gt; client** and obviously you have to use the last `block_import` to execute the whole chain. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37396" PostHistoryTypeId="2" PostId="9422" RevisionGUID="ab96112a-251c-469a-be5f-510e32aab0db" CreationDate="2023-07-28T05:38:40.873" UserId="2473" Text="I was testing with subxt and used the latest version. But I encountered this error:&#xD;&#xA;```rust&#xD;&#xA;error[E0658]: use of unstable library feature 'once_cell'&#xD;&#xA;   --&gt; .cargo/registry/src/github.com-1ecc6299db9ec823/subxt-signer-0.30.1/src/utils.rs:37:21&#xD;&#xA;    |&#xD;&#xA;37  |                   VAR.get_or_init(|| { $expr }).clone()&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I explicitly ran the [tx_basic.rs][1] in the subxt project itself, it failed: &#xD;&#xA;```rust&#xD;&#xA;error[E0658]: use of unstable library feature 'once_cell'&#xD;&#xA;   --&gt; signer/src/utils.rs:22:29&#xD;&#xA;    |&#xD;&#xA;22  |                   static VAR: std::sync::OnceLock&lt;$ty&gt; = std::sync::OnceLock::new();&#xD;&#xA;    |                               ^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;   ::: signer/src/crypto/secret_uri.rs:125:1&#xD;&#xA;    |&#xD;&#xA;125 | / once_static! {&#xD;&#xA;126 | |     /// Interpret a phrase like:&#xD;&#xA;127 | |     ///&#xD;&#xA;128 | |     /// ```text&#xD;&#xA;...   |&#xD;&#xA;151 | |     }&#xD;&#xA;152 | | }&#xD;&#xA;    | |_- in this macro invocation&#xD;&#xA;    |&#xD;&#xA;    = note: see issue #7&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm using `rustc 1.68.0-nightly (bdb07a8ec 2022-12-11)`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt/blob/master/subxt/examples/tx_basic.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="37398" PostHistoryTypeId="1" PostId="9422" RevisionGUID="ab96112a-251c-469a-be5f-510e32aab0db" CreationDate="2023-07-28T05:38:40.873" UserId="2473" Text="compile error for `subxt-signer` version 0.30: use of unstable library feature 'once_cell'" ContentLicense="CC BY-SA 4.0" />
  <row Id="37399" PostHistoryTypeId="3" PostId="9422" RevisionGUID="ab96112a-251c-469a-be5f-510e32aab0db" CreationDate="2023-07-28T05:38:40.873" UserId="2473" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37401" PostHistoryTypeId="2" PostId="9423" RevisionGUID="57dee8e6-81cc-4846-9354-53a0ea3f235f" CreationDate="2023-07-28T06:11:34.833" UserId="3317" Text="It should be able to run with the latest, so do `rustup update`" ContentLicense="CC BY-SA 4.0" />
  <row Id="37403" PostHistoryTypeId="2" PostId="9424" RevisionGUID="15cd6716-f61a-4fcd-bec3-c0a5f136d7dc" CreationDate="2023-07-28T08:49:47.830" UserId="2762" Text="You are seeing this error because you have not registered your new node as a validator candidate. See this guide with the steps to fix that: [How to add new collators on a running parachain?][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/5709/2762" ContentLicense="CC BY-SA 4.0" />
  <row Id="37405" PostHistoryTypeId="2" PostId="9425" RevisionGUID="df62c75d-6cbc-4caa-a9cf-e96957fc987e" CreationDate="2023-07-28T08:54:00.933" UserId="2844" Text="When using `block_timestamp` to return value, why it's return `1,690,534,220,344` value? Someone please explain me what is the meaning of this value?&#xD;&#xA;&#xD;&#xA;     #[ink(message)]&#xD;&#xA;     pub fn abc(&amp;self) -&gt; u64 {&#xD;&#xA;         self.env().block_timestamp()&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/a21HX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37407" PostHistoryTypeId="1" PostId="9425" RevisionGUID="df62c75d-6cbc-4caa-a9cf-e96957fc987e" CreationDate="2023-07-28T08:54:00.933" UserId="2844" Text="block time_stamp return value" ContentLicense="CC BY-SA 4.0" />
  <row Id="37408" PostHistoryTypeId="3" PostId="9425" RevisionGUID="df62c75d-6cbc-4caa-a9cf-e96957fc987e" CreationDate="2023-07-28T08:54:00.933" UserId="2844" Text="|ink|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37409" PostHistoryTypeId="2" PostId="9426" RevisionGUID="0cb5e3dc-5e2d-40d5-a827-396830c2c8a2" CreationDate="2023-07-28T09:41:24.443" UserId="427" Text="The value **1,690,534,220,344** is a Unix timestamp when the block is produced. &#xD;&#xA;&#xD;&#xA;If you are unaware of unix timestamp below is the definition. &#xD;&#xA;&#xD;&#xA;The number of seconds that have elapsed since January 1, 1970, at 00:00:00 Coordinated Universal Time (UTC). Unix timestamps are commonly used to represent time in computer systems and blockchain platforms, providing a standardized way to express time-based events." ContentLicense="CC BY-SA 4.0" />
  <row Id="37411" PostHistoryTypeId="2" PostId="9427" RevisionGUID="36865b59-8c3c-40a3-9ff6-bb58152d9dd6" CreationDate="2023-07-28T09:59:53.893" UserId="386" Text="I am in the process of working with a precompiled contract I created in my Frontier EVM. &#xD;&#xA;&#xD;&#xA;I encounter issues when attempting to call this precompiled contract from another contract. While direct calls to the precompiled contract function as expected, any attempt to interact via a separate contract results in failure.&#xD;&#xA;&#xD;&#xA;I received advice suggesting that the solution to this issue is to deploy some bytecode at the address where the precompiled contract is located. The actual content of this bytecode is apparently inconsequential, as it will never be executed. Its main function is to convince the EVM that it's interacting with a valid contract.&#xD;&#xA;&#xD;&#xA;I found a potential solution in the Moonbeam GitHub repository: [moonbeam/node/service/src/chain_spec/moonbase.rs](https://github.com/moonbeam-foundation/moonbeam/blob/61647d84124c8e6d099176ce5ba357f821204864/node/service/src/chain_spec/moonbase.rs#L245-L285)&#xD;&#xA;&#xD;&#xA;However, I am still unsure about the specifics of this process. My main questions are:&#xD;&#xA;&#xD;&#xA;1. How can I inject the code of an already created precompiled contract? I presume this would involve directly writing to the storage of the pallet, correct?&#xD;&#xA;2. How can I inject the code during a runtime upgrade that contains a new precompiled contract?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37413" PostHistoryTypeId="1" PostId="9427" RevisionGUID="36865b59-8c3c-40a3-9ff6-bb58152d9dd6" CreationDate="2023-07-28T09:59:53.893" UserId="386" Text="Calling Precompiled Contracts from Other Contracts in EVM fails" ContentLicense="CC BY-SA 4.0" />
  <row Id="37414" PostHistoryTypeId="3" PostId="9427" RevisionGUID="36865b59-8c3c-40a3-9ff6-bb58152d9dd6" CreationDate="2023-07-28T09:59:53.893" UserId="386" Text="|evm|frontier|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37415" PostHistoryTypeId="2" PostId="9428" RevisionGUID="ee7187b9-db07-476a-9b8a-c0bdeec9ef0e" CreationDate="2023-07-28T10:59:51.037" UserId="2473" Text="Can somebody explain what this means?&#xD;&#xA;```&#xD;&#xA; Rpc(ClientError(Call(Custom(ErrorObject { code: ServerError(1002), message: &quot;Verification Error: Runtime error: Execution failed: Runtime panicked: Bad input data provided to validate_transaction: Could not decode `RuntimeCall::System.0`:\n\tCould not decode `Call`, variant doesn't exist\n&quot;, data: Some(RawValue(&quot;RuntimeApi(\&quot;Execution failed: Runtime panicked: Bad input data provided to validate_transaction: Could not decode `RuntimeCall::System.0`:\\n\\tCould not decode `Call`, variant doesn't exist\\n\&quot;)&quot;)) }))))', &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have `pallet-balance` in my runtime, and I'm using subxt to perform a transfer:&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;../artifacts/my_metadata.scale&quot;)]&#xD;&#xA;pub mod metadata{}&#xD;&#xA;&#xD;&#xA;#[derive(Encode, Decode, Debug, Clone, Eq, PartialEq)]&#xD;&#xA;pub struct ChargeAssetTxPayment {&#xD;&#xA;    pub tip: u128,&#xD;&#xA;    pub asset_id:Option&lt;u8&gt;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() {&#xD;&#xA;    let api = subxt::OnlineClient::&lt;MyConfig&gt;::new().await.expect(&quot;should work&quot;);&#xD;&#xA;&#xD;&#xA;    let dest = subxt::ext::sp_runtime::MultiAddress::Id(sp_keyring::AccountKeyring::Bob.into());&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;    let balance_transfer_tx = metadata::tx().balances().transfer(&#xD;&#xA;        dest,&#xD;&#xA;        10_000,&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    let alice_pair = SR25519Pair::from_string(&quot;//Alice&quot;, None).unwrap();&#xD;&#xA;    &#xD;&#xA;    let charge = ChargeAssetTxPayment { tip: 10, asset_id: Some(0) };&#xD;&#xA;    let extra_params = (&#xD;&#xA;        api.genesis_hash(),&#xD;&#xA;        Era::Immortal,&#xD;&#xA;        charge&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;   let events = api.tx()&#xD;&#xA;        .sign_and_submit_then_watch(&amp;balance_transfer_tx, &amp;alice_pair, extra_params)&#xD;&#xA;        .await.expect(&quot;should work!&quot;)&#xD;&#xA;        .wait_for_finalized_success()&#xD;&#xA;        .await.expect(&quot;should work!!!&quot;);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error happens at `sign_and_submit_then_watch()`&#xD;&#xA;I do not quite understand the issue of `RuntimeCall::System.0`. &#xD;&#xA;I printed the `validation_details()` of `balance_transfer_tx` and it returned fine. &#xD;&#xA;Where am I doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also, [see this comment][1], because it's the same error.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/scs/substrate-api-client/issues/626#issuecomment-1647834800" ContentLicense="CC BY-SA 4.0" />
  <row Id="37417" PostHistoryTypeId="1" PostId="9428" RevisionGUID="ee7187b9-db07-476a-9b8a-c0bdeec9ef0e" CreationDate="2023-07-28T10:59:51.037" UserId="2473" Text="Could not decode `RuntimeCall::System.0`" ContentLicense="CC BY-SA 4.0" />
  <row Id="37418" PostHistoryTypeId="3" PostId="9428" RevisionGUID="ee7187b9-db07-476a-9b8a-c0bdeec9ef0e" CreationDate="2023-07-28T10:59:51.037" UserId="2473" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37419" PostHistoryTypeId="2" PostId="9429" RevisionGUID="0c551958-0d42-4011-bbe3-0efab0fc8439" CreationDate="2023-07-28T11:51:53.060" UserId="494" Text="I need to migrate the state of an EVM solochain (not substrate) into a Frontier-based parachain.&#xD;&#xA;&#xD;&#xA;The original chain has been running for a while with high activity, so the state is fairly big.&#xD;&#xA;&#xD;&#xA;I am considering doing this over Genesis, but I need to know the potential blockers.&#xD;&#xA;&#xD;&#xA;- Will the chainspec file become prohibitively big?&#xD;&#xA;- Will the genesis block become prohibitively big?&#xD;&#xA;&#xD;&#xA;Also, am I missing any other blockers for this approach?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37421" PostHistoryTypeId="1" PostId="9429" RevisionGUID="0c551958-0d42-4011-bbe3-0efab0fc8439" CreationDate="2023-07-28T11:51:53.060" UserId="494" Text="EVM solo to para migration on Genesis" ContentLicense="CC BY-SA 4.0" />
  <row Id="37422" PostHistoryTypeId="3" PostId="9429" RevisionGUID="0c551958-0d42-4011-bbe3-0efab0fc8439" CreationDate="2023-07-28T11:51:53.060" UserId="494" Text="|evm|migration|genesis|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37423" PostHistoryTypeId="5" PostId="9429" RevisionGUID="e10ea0d7-4a17-4f99-aef4-cb80260f1d88" CreationDate="2023-07-28T12:03:27.650" UserId="494" Comment="added 4 characters in body" Text="I need to migrate the state of an EVM solochain (not substrate) into a Frontier-based parachain.&#xD;&#xA;&#xD;&#xA;The original chain has been running for a while with high activity, so the state is fairly big.&#xD;&#xA;&#xD;&#xA;I am considering doing this over Genesis, but I need to know the potential blockers.&#xD;&#xA;&#xD;&#xA;- Would the chainspec file become prohibitively large?&#xD;&#xA;- Would the genesis block become prohibitively large?&#xD;&#xA;&#xD;&#xA;Also, am I missing any other blockers for this approach?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37424" PostHistoryTypeId="50" PostId="6623" RevisionGUID="d46d3525-7054-4302-a376-82b7fbcb15e3" CreationDate="2023-07-28T12:06:35.800" UserId="-1" />
  <row Id="37425" PostHistoryTypeId="2" PostId="9430" RevisionGUID="87b34697-f4a4-4b72-a84a-d8a5d2167b14" CreationDate="2023-07-28T13:00:55.193" UserId="372" Text="You don't need to deploy the 'correct' code in any sense. You just need to deploy _any dummy bytecode_. The bytecode will never actually be executed. Instead your precompile Rust code will be executed. You just need _some_ bytecode there because there is a check that code exists at the address before calling it (I'm not sure if this check is part of evm semantics, or just how solidity compiles, but it is in there, and you can probably find docs if you dig).&#xD;&#xA;&#xD;&#xA;Regarding how to get the bytecode in place. One options is from genesis. But you mention doing a runtime upgrade to add a precomiple. In this case, you will need to deploy the dummy bytecode in your migrations by writing the pallet_evm's storage directly." ContentLicense="CC BY-SA 4.0" />
  <row Id="37427" PostHistoryTypeId="50" PostId="8984" RevisionGUID="ff385349-b11b-448a-9ae5-85ccae8d58df" CreationDate="2023-07-28T13:06:55.733" UserId="-1" />
  <row Id="37428" PostHistoryTypeId="2" PostId="9431" RevisionGUID="97190f4f-c78c-4965-8d81-c53a1cc036e4" CreationDate="2023-07-28T13:16:35.447" UserId="251" Text="1. The chain specification file will definitely be large.&#xD;&#xA;2. For information on the maximum size of a block, you can refer to this link: https://substrate.stackexchange.com/questions/6999/what-is-the-maximum-size-of-a-block.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You can also utilize a worker to feed new chain with the old data once it is booted." ContentLicense="CC BY-SA 4.0" />
  <row Id="37430" PostHistoryTypeId="2" PostId="9432" RevisionGUID="6db9a43c-797a-4a7b-a711-2eef54fd4bf1" CreationDate="2023-07-28T13:34:33.890" UserId="426" Text="We upgraded our testnet Shibuya yesterday, for which we have our own validator network, and block production _stalled_ for almost a whole day. The block on which it was stuck was the one where the upgrade was applied (`ValidationFunctionApplied`). Collators were constantly proposing the same block, but it was never validated. &#xD;&#xA;&#xD;&#xA;The block was finally produced after we deployed an additional **validator**. The idea was to have both a **collator** &amp; **validator** on the single machine to help eliminate network issues. Funny enough, this helped but another collator's proposed block was actually included and backed, not the one on the same machine.&#xD;&#xA;&#xD;&#xA;We'd like to understand why exactly this happened, and how can we better understand when block production is stalled due to network issues. I've dug into the code but couldn't find what trace would notify us about network issue?&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;We got this on the validator side, which might be indicative of the error but isn't verbose:&#xD;&#xA;```&#xD;&#xA;fetch_pov_job err=FetchPoV(NetworkError(Network(Timeout))) para_id=Id(1000) pov_hash=0x2f13ff0d6cc8eb806b95f19b80c915e4d2342c731b424a61bece5d00356fdf4f authority_id=Public(aaf593ee1fc807bcb6f6c3b87f043ae538c17426c2c99ab98951ea6bff561d21 (14sA6MN1...))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;On the collator side, I never saw this trace:&#xD;&#xA;```&#xD;&#xA;debug!(target: logging_target, &quot;Starting authorship at slot: {slot}&quot;);&#xD;&#xA;```&#xD;&#xA;but saw traces preceding that one.&#xD;&#xA;Not sure if that helps.&#xD;&#xA;&#xD;&#xA;Few more pieces of info about the upgrade:&#xD;&#xA;* the upgrade block was heavy, but even when we reduced tx pool limit to **0** for our collators, the problem persisted, so it could be just `PoV` size related&#xD;&#xA;* the same runtime blob was applied to our parachain on **Rococo** and upgrade went just fine&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37432" PostHistoryTypeId="1" PostId="9432" RevisionGUID="6db9a43c-797a-4a7b-a711-2eef54fd4bf1" CreationDate="2023-07-28T13:34:33.890" UserId="426" Text="No block produced/validated on parachain for almost a day" ContentLicense="CC BY-SA 4.0" />
  <row Id="37433" PostHistoryTypeId="3" PostId="9432" RevisionGUID="6db9a43c-797a-4a7b-a711-2eef54fd4bf1" CreationDate="2023-07-28T13:34:33.890" UserId="426" Text="|parachain|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37434" PostHistoryTypeId="50" PostId="3974" RevisionGUID="22a6a0d9-9d4d-47b9-8b34-ed99e17399f9" CreationDate="2023-07-28T14:06:35.777" UserId="-1" />
  <row Id="37435" PostHistoryTypeId="50" PostId="8523" RevisionGUID="b9b2e33d-28ac-42b8-9ef8-1504a4a8d68b" CreationDate="2023-07-28T15:08:15.953" UserId="-1" />
  <row Id="37436" PostHistoryTypeId="2" PostId="9433" RevisionGUID="bbf54cc0-6e16-4d43-bc39-5a28653209df" CreationDate="2023-07-28T15:33:21.730" UserId="4490" Text="Millau uses a non-standard [64-bytes hash](https://github.com/paritytech/parity-bridges-common/blob/master/primitives/chain-millau/src/millau_hash.rs) to demonstrate that the bridge (runtime and offchain relayer) can support chains that are using non-standard primitives. So if you're providing your (`substrate-template-node` based chain) chain endpoint where relayer expects to find Millau, you'll get this error.&#xD;&#xA;&#xD;&#xA;We don't (yet) have a generic relayer that may connect to the chain, read its metadata and start relaying headers/messages. That's something we've planned for the future (and obviously this &quot;generic&quot; mechanism will never work with Millau-like chains, because metadata would never contain a **code** to compute some hash). Right now to add a relayer support for a new chain, you should:&#xD;&#xA;- define its basic (runtime-level) primitives (hash, block number, header, ...). Example: [bp-rialto](https://github.com/paritytech/parity-bridges-common/tree/master/primitives/chain-rialto);&#xD;&#xA;- define its relayer-level primitives, used to sign transactions. Example: [relay-rialto-client](https://github.com/paritytech/parity-bridges-common/tree/master/relays/client-rialto);&#xD;&#xA;- manually add support for your new chain to the relayer itself. Relayer has many subcommands, so you should decide what's to support. Example: [init-bridge subcommand](https://github.com/paritytech/parity-bridges-common/blob/1593860e7b637a277455f0c37f5ab834d25981d1/relays/bin-substrate/src/cli/init_bridge.rs#L66).&#xD;&#xA;&#xD;&#xA;A more detailed example, which adds support for bridge between Kusama Bridge Hub and Polkadot Bridge Hub: https://github.com/paritytech/parity-bridges-common/pull/1982" ContentLicense="CC BY-SA 4.0" />
  <row Id="37438" PostHistoryTypeId="50" PostId="8487" RevisionGUID="c8acc03d-e50c-46a0-be24-8814d8f18721" CreationDate="2023-07-28T16:04:05.447" UserId="-1" />
  <row Id="37441" PostHistoryTypeId="50" PostId="8843" RevisionGUID="197d14f3-8a84-44f2-83a6-9be5cb04df84" CreationDate="2023-07-28T17:02:50.267" UserId="-1" />
  <row Id="37442" PostHistoryTypeId="50" PostId="8669" RevisionGUID="27ae4b53-16e8-460b-96e7-0fa50b143d9c" CreationDate="2023-07-28T18:07:55.993" UserId="-1" />
  <row Id="37443" PostHistoryTypeId="50" PostId="8175" RevisionGUID="04683f66-39dc-44c8-9e91-aed033b6e3a0" CreationDate="2023-07-28T19:04:25.523" UserId="-1" />
  <row Id="37444" PostHistoryTypeId="50" PostId="8616" RevisionGUID="aa24c003-b667-4b3d-a91b-c4b43f18cf7d" CreationDate="2023-07-28T20:02:15.240" UserId="-1" />
  <row Id="37445" PostHistoryTypeId="50" PostId="8735" RevisionGUID="bcda6c1f-9364-471e-bbd4-6c09737902e2" CreationDate="2023-07-28T21:00:25.037" UserId="-1" />
  <row Id="37446" PostHistoryTypeId="50" PostId="9054" RevisionGUID="3c081231-0245-418e-8f2d-ac78688e6430" CreationDate="2023-07-28T22:07:10.833" UserId="-1" />
  <row Id="37447" PostHistoryTypeId="2" PostId="9434" RevisionGUID="3e619e87-8500-4f3c-8aad-814116ef1e4b" CreationDate="2023-07-28T23:45:09.297" UserId="4491" Text="What solved my problem related with build of frontier, but I believe that is related with librocksdb-sys too, was when I ran these commands which update system packages and add g++ that is a open source version of c++:&#xD;&#xA;&#xD;&#xA;    sudo apt-get update&#xD;&#xA;    sudo apt-get install g++&#xD;&#xA;&#xD;&#xA;Full solution   &#xD;&#xA;https://stackoverflow.com/questions/66583720/some-error-failed-to-run-custom-build-command-for-librocksdb-sys-v6-11-4/76791499#76791499" ContentLicense="CC BY-SA 4.0" />
  <row Id="37450" PostHistoryTypeId="50" PostId="7408" RevisionGUID="24fba7a4-fa21-402d-b231-b9cd6c8d6af0" CreationDate="2023-07-29T05:06:20.727" UserId="-1" />
  <row Id="37451" PostHistoryTypeId="50" PostId="9035" RevisionGUID="a9b046ad-6aeb-40c7-96ff-b0ac7d4b2b83" CreationDate="2023-07-29T06:03:15.457" UserId="-1" />
  <row Id="37452" PostHistoryTypeId="50" PostId="8868" RevisionGUID="fd109b6f-61fa-4be7-8b04-c9f77dd60eb0" CreationDate="2023-07-29T07:06:50.777" UserId="-1" />
  <row Id="37453" PostHistoryTypeId="50" PostId="5951" RevisionGUID="e6a69793-236b-42a3-ac12-edcdd9c79bcd" CreationDate="2023-07-29T10:04:50.813" UserId="-1" />
  <row Id="37454" PostHistoryTypeId="50" PostId="7020" RevisionGUID="b146bbb2-7e37-4a1d-9605-eb338b6d7c53" CreationDate="2023-07-29T11:00:55.110" UserId="-1" />
  <row Id="37455" PostHistoryTypeId="2" PostId="9435" RevisionGUID="da6d715c-abd4-4c5b-8974-88fe4f1dd9a7" CreationDate="2023-07-29T11:57:34.057" UserId="2844" Text="I wan't to calculate days based on time when it started and today days.&#xD;&#xA;How to calculate days based on initial `time_stamp` and current `time_stamp`" ContentLicense="CC BY-SA 4.0" />
  <row Id="37457" PostHistoryTypeId="1" PostId="9435" RevisionGUID="da6d715c-abd4-4c5b-8974-88fe4f1dd9a7" CreationDate="2023-07-29T11:57:34.057" UserId="2844" Text="Calculate how many days" ContentLicense="CC BY-SA 4.0" />
  <row Id="37458" PostHistoryTypeId="3" PostId="9435" RevisionGUID="da6d715c-abd4-4c5b-8974-88fe4f1dd9a7" CreationDate="2023-07-29T11:57:34.057" UserId="2844" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37459" PostHistoryTypeId="5" PostId="9435" RevisionGUID="cda57b3d-682e-4f5d-8481-49aec4bd66b9" CreationDate="2023-07-29T12:24:02.787" UserId="2844" Comment="added 112 characters in body" Text="I wan't to get how long user has staked nft token in days. I recorded `staking` time_stamp while staking and  `un_staking` time_stamp while un_staking. Now I wan't to calculate how many days user has staked for reward distribution based on days. How to do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37460" PostHistoryTypeId="2" PostId="9436" RevisionGUID="4255c5c7-c303-4a97-a3d7-ce16b8b32c50" CreationDate="2023-07-29T15:07:30.533" UserId="139" Text="On benchmarks one can often see `whitelisted_caller()` being used to test extrinsics and I wonder, how do they bypass the need for fee, and even pay for extrinsics like `transfer_keep_alive` for benchmarks. &#xD;&#xA;&#xD;&#xA;Here's some code : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// Give some multiple of the existential deposit&#xD;&#xA;let balance = existential_deposit.saturating_mul(ED_MULTIPLIER.into());&#xD;&#xA;let _ = &lt;Balances&lt;T, I&gt; as Currency&lt;_&gt;&gt;::make_free_balance_be(&amp;caller, balance);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see, `caller` which is the whitelisted account, is being given some balance, but he's also the caller of the function, which means, either he's paying no fee, or, has some coin from genesis. Or is it something entirely unrelated like the mock runtime not having the `TransactionPayment` pallet installed? I doubt it's the latter. &#xD;&#xA;&#xD;&#xA;This also brings me to a general question about writing benchmarks, how should we go about benchmarking functions which requires the caller to lock or spend a substantial sum? Do we first mint coin into their wallet using the above technique `make_free_balance_be` or is there a better way?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37462" PostHistoryTypeId="1" PostId="9436" RevisionGUID="4255c5c7-c303-4a97-a3d7-ce16b8b32c50" CreationDate="2023-07-29T15:07:30.533" UserId="139" Text="Who are whitelisted_callers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37463" PostHistoryTypeId="3" PostId="9436" RevisionGUID="4255c5c7-c303-4a97-a3d7-ce16b8b32c50" CreationDate="2023-07-29T15:07:30.533" UserId="139" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37464" PostHistoryTypeId="2" PostId="9437" RevisionGUID="1e0aaf10-e5ad-4211-b79b-0bcd6c0af782" CreationDate="2023-07-29T17:14:26.170" UserId="427" Text="Below is the general calculation for finding the days.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        // Calculate the time difference between unstaking and staking timestamps.&#xD;&#xA;        let time_difference = unstaking_timestamp&#xD;&#xA;        .checked_sub(staking_timestamp)&#xD;&#xA;        .ok_or(DispatchError::from(&quot;Timestamp overflow&quot;))?; // Modify error accordingly&#xD;&#xA;&#xD;&#xA;        // Convert the time difference to the number of days.&#xD;&#xA;        let days_staked: u64 = time_difference&#xD;&#xA;            .as_secs()&#xD;&#xA;            .checked_div(86400) // T::SECONDS_PER_DAY = 86400&#xD;&#xA;            .unwrap_or(0);&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37466" PostHistoryTypeId="2" PostId="9438" RevisionGUID="af020409-bd76-4b2d-89fd-b97a10e0da05" CreationDate="2023-07-29T17:57:42.260" UserId="427" Text="Your assumption was nearly correct as you can see here. [https://github.com/paritytech/substrate/blob/c4b83faeda9d8ee96d93a528f1bceded42b91945/frame/benchmarking/src/v1.rs#L1053][1]&#xD;&#xA;&#xD;&#xA;For benchmarking functions which requires the caller to lock or spend a substantial sum don't use whitelisted_caller() function. Instead use something like below where we create ALICE/BOB account and call make_free_balance_be. And then in create_nft benchmark function we are using one of these accounts instead of whitelisted_caller(). Then in verify you can check the necessary state checks you want to.&#xD;&#xA;&#xD;&#xA;    pub fn prepare_benchmarks&lt;T: Config&gt;() -&gt; BenchmarkData {&#xD;&#xA;	let alice: T::AccountId = get_account::&lt;T&gt;(&quot;ALICE&quot;);&#xD;&#xA;	let bob: T::AccountId = get_account::&lt;T&gt;(&quot;BOB&quot;);&#xD;&#xA;&#xD;&#xA;	// Give them enough caps.&#xD;&#xA;	T::Currency::make_free_balance_be(&amp;alice, BalanceOf::&lt;T&gt;::max_value());&#xD;&#xA;	T::Currency::make_free_balance_be(&amp;bob, BalanceOf::&lt;T&gt;::max_value());&#xD;&#xA;&#xD;&#xA;	let nft_offchain_data =&#xD;&#xA;		BoundedVec::try_from(vec![1; T::NFTOffchainDataLimit::get() as usize]).unwrap();&#xD;&#xA;	let collection_offchain_data =&#xD;&#xA;		BoundedVec::try_from(vec![1; T::CollectionOffchainDataLimit::get() as usize]).unwrap();&#xD;&#xA;&#xD;&#xA;	// Create default NFT and collection.&#xD;&#xA;	assert_ok!(NFT::&lt;T&gt;::create_nft(&#xD;&#xA;		origin::&lt;T&gt;(&quot;ALICE&quot;).into(),&#xD;&#xA;		nft_offchain_data,&#xD;&#xA;		PERCENT_100,&#xD;&#xA;		None,&#xD;&#xA;		false,&#xD;&#xA;	));&#xD;&#xA;	assert_ok!(NFT::&lt;T&gt;::create_collection(&#xD;&#xA;		origin::&lt;T&gt;(&quot;ALICE&quot;).into(),&#xD;&#xA;		collection_offchain_data,&#xD;&#xA;		None,&#xD;&#xA;	));&#xD;&#xA;&#xD;&#xA;	BenchmarkData {&#xD;&#xA;		nft_id: NFT::&lt;T&gt;::next_nft_id() - 1,&#xD;&#xA;		collection_id: NFT::&lt;T&gt;::next_collection_id() - 1,&#xD;&#xA;	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    benchmarks! {&#xD;&#xA;    	create_nft {&#xD;&#xA;    		let s in 0 .. T::CollectionSizeLimit::get() - 1;&#xD;&#xA;    		let benchmark_data = prepare_benchmarks::&lt;T&gt;();&#xD;&#xA;    		let alice: T::AccountId = get_account::&lt;T&gt;(&quot;ALICE&quot;);&#xD;&#xA;    		let nft_offchain_data: BoundedVec&lt;u8, T::NFTOffchainDataLimit&gt; = BoundedVec::try_from(vec![1; T::NFTOffchainDataLimit::get() as usize]).unwrap();&#xD;&#xA;    		// Fill the collection.&#xD;&#xA;    		NFT::&lt;T&gt;::create_filled_collection(alice.clone(), benchmark_data.collection_id, 0, s).unwrap();&#xD;&#xA;    	}: _(origin::&lt;T&gt;(&quot;ALICE&quot;), nft_offchain_data, PERCENT_100, Some(benchmark_data.collection_id), false)&#xD;&#xA;    	verify {&#xD;&#xA;    		// Get The NFT id.&#xD;&#xA;    		let nft_id = NFT::&lt;T&gt;::next_nft_id() - 1;&#xD;&#xA;    		// Get The NFT.&#xD;&#xA;    		let nft = NFT::&lt;T&gt;::nfts(nft_id).unwrap();&#xD;&#xA;    		assert_eq!(nft.owner, alice);&#xD;&#xA;    		assert_eq!(NFT::&lt;T&gt;::collections(benchmark_data.collection_id).unwrap().nfts.contains(&amp;nft_id), true);&#xD;&#xA;    		assert_eq!(nft.collection_id, Some(benchmark_data.collection_id));&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/c4b83faeda9d8ee96d93a528f1bceded42b91945/frame/benchmarking/src/v1.rs#L1053" ContentLicense="CC BY-SA 4.0" />
  <row Id="37470" PostHistoryTypeId="50" PostId="5652" RevisionGUID="9eb141d1-1b0f-4b63-8f63-c7414d2dca51" CreationDate="2023-07-30T11:01:40.187" UserId="-1" />
  <row Id="37471" PostHistoryTypeId="2" PostId="9440" RevisionGUID="467698bf-85ab-4f87-8a7f-4286732ca97e" CreationDate="2023-07-30T11:02:26.283" UserId="2844" Text="I have added `pallet-contract` in [our chain](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate). Build contract works fine and run chain in dev mode also works fine. But when I try to deploy contract it doesn't work and doesn't throw any error. Can someone please help me.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Qzvib.png&#xD;&#xA;&#xD;&#xA;This is [github repo](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate)" ContentLicense="CC BY-SA 4.0" />
  <row Id="37473" PostHistoryTypeId="1" PostId="9440" RevisionGUID="467698bf-85ab-4f87-8a7f-4286732ca97e" CreationDate="2023-07-30T11:02:26.283" UserId="2844" Text="Not able to upload contract in substrate node template" ContentLicense="CC BY-SA 4.0" />
  <row Id="37474" PostHistoryTypeId="3" PostId="9440" RevisionGUID="467698bf-85ab-4f87-8a7f-4286732ca97e" CreationDate="2023-07-30T11:02:26.283" UserId="2844" Text="|substrate-node-template|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37475" PostHistoryTypeId="50" PostId="5657" RevisionGUID="0964f08e-288c-4e29-93be-f26e6d10f056" CreationDate="2023-07-30T12:01:55.227" UserId="-1" />
  <row Id="37477" PostHistoryTypeId="6" PostId="9440" RevisionGUID="179c53eb-3d2a-4173-80a2-f367fd03261a" CreationDate="2023-07-31T08:53:50.120" UserId="2844" Comment="edited tags" Text="|substrate-node-template|smart-contract|substrate-contracts-node|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37478" PostHistoryTypeId="2" PostId="9441" RevisionGUID="1c4e63a8-dbc1-4ccf-ac2b-69215f28326e" CreationDate="2023-07-31T09:14:31.433" UserId="386" Text="I was in search of a function to increment a value of type `T`, and I stumbled upon the trait `Saturating` in the Rust documentation.&#xD;&#xA;&#xD;&#xA;Upon examining the [`saturating_inc()`](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.Saturating.html#method.saturating_inc) function, I found the signature quite intriguing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn saturating_inc(&amp;mut self)&#xD;&#xA;    where Self: One { ... }&#xD;&#xA;```&#xD;&#xA;This method increments the value of self, but if it's already at its maximum, it remains at that maximum value. This behavior is clear, but what surprises me is that it does so **without any notification or error**. In my specific use case, I would prefer to raise an error (such as a type overflow) if the value is at its maximum.&#xD;&#xA;&#xD;&#xA;Could someone please help me understand why the saturating_inc() function is designed this way? What are the typical use cases for this behavior, and is there a way to detect when the saturation occurs if needed? Any insights or examples would be greatly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="37480" PostHistoryTypeId="1" PostId="9441" RevisionGUID="1c4e63a8-dbc1-4ccf-ac2b-69215f28326e" CreationDate="2023-07-31T09:14:31.433" UserId="386" Text="Understanding the Use Case of `saturating_inc()`" ContentLicense="CC BY-SA 4.0" />
  <row Id="37481" PostHistoryTypeId="3" PostId="9441" RevisionGUID="1c4e63a8-dbc1-4ccf-ac2b-69215f28326e" CreationDate="2023-07-31T09:14:31.433" UserId="386" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37482" PostHistoryTypeId="2" PostId="9442" RevisionGUID="8159191d-d5a8-4fa5-aaa2-8d1b12b14745" CreationDate="2023-07-31T09:30:28.040" UserId="379" Text="[![Example transfer][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/q2c7j.png&#xD;&#xA;&#xD;&#xA;In the example above, we try to transfer 1 TFT from Eve to Dave. This extrinsic fails with Underflow error. When I looked at the error description I found: https://github.com/paritytech/substrate/blob/115af33fc4aa62052eb52a757bce80db0a13bcad/frame/support/src/traits/tokens/misc.rs#L91-L93&#xD;&#xA;&#xD;&#xA;&quot;There has been an underflow in the system. This is indicative of a corrupt state and likely unrecoverable.&quot;&#xD;&#xA;&#xD;&#xA;This error only showed up when upgraded our network to use polkadot-0.9.42. Is this related to https://github.com/paritytech/substrate/pull/12951 ? Because when I upgrade both accounts, the issue still resides. &#xD;&#xA;&#xD;&#xA;This is on our development network where we accidently ran this migration twice: https://github.com/threefoldtech/tfchain/blob/864ea673258360e22b79dc3acf9e3ece48e5ef27/substrate-node/runtime/src/migrations.rs#L33." ContentLicense="CC BY-SA 4.0" />
  <row Id="37484" PostHistoryTypeId="1" PostId="9442" RevisionGUID="8159191d-d5a8-4fa5-aaa2-8d1b12b14745" CreationDate="2023-07-31T09:30:28.040" UserId="379" Text="Error transfering &quot;Arithmetic: Underflow&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37485" PostHistoryTypeId="3" PostId="9442" RevisionGUID="8159191d-d5a8-4fa5-aaa2-8d1b12b14745" CreationDate="2023-07-31T09:30:28.040" UserId="379" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37486" PostHistoryTypeId="5" PostId="9441" RevisionGUID="8f8e444c-bfe4-497d-be78-00164f62a978" CreationDate="2023-07-31T09:31:26.637" UserId="386" Comment="added 5 characters in body" Text="I was in search of a function to increment a value of type `T`, and I stumbled upon the trait `Saturating` in the Substrate documentation.&#xD;&#xA;&#xD;&#xA;Upon examining the [`saturating_inc()`](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.Saturating.html#method.saturating_inc) function, I found the signature quite intriguing:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn saturating_inc(&amp;mut self)&#xD;&#xA;    where Self: One { ... }&#xD;&#xA;```&#xD;&#xA;This method increments the value of self, but if it's already at its maximum, it remains at that maximum value. This behavior is clear, but what surprises me is that it does so **without any notification or error**. In my specific use case, I would prefer to raise an error (such as a type overflow) if the value is at its maximum.&#xD;&#xA;&#xD;&#xA;Could someone please help me understand why the saturating_inc() function is designed this way? What are the typical use cases for this behavior, and is there a way to detect when the saturation occurs if needed? Any insights or examples would be greatly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="37487" PostHistoryTypeId="2" PostId="9443" RevisionGUID="9ec3db8e-9355-4051-9925-495ee4fb6e29" CreationDate="2023-07-31T09:33:07.437" UserId="1959" Text="We want to register USDT on our parachain to receive USDT transfered from Statemint, but we need to set a limit to avoid receive too much USDT. Is there a way to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37489" PostHistoryTypeId="1" PostId="9443" RevisionGUID="9ec3db8e-9355-4051-9925-495ee4fb6e29" CreationDate="2023-07-31T09:33:07.437" UserId="1959" Text="Is there a way to set a maximum balance for the assets registered in pallet-assets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37490" PostHistoryTypeId="3" PostId="9443" RevisionGUID="9ec3db8e-9355-4051-9925-495ee4fb6e29" CreationDate="2023-07-31T09:33:07.437" UserId="1959" Text="|parachain|xcm|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37491" PostHistoryTypeId="2" PostId="9444" RevisionGUID="b8d82077-0769-4e58-898f-5ea4a7ea051c" CreationDate="2023-07-31T09:49:48.073" UserId="474" Text="The likely culprit is that your `MyConfig` type is configured incorrectly (most likely that the `ExtrinsicParams` you are using do not line up with the chain in question). The docs were recently extended to provide much more info on how to construct the config, so perhaps this is helpful:&#xD;&#xA;&#xD;&#xA;https://docs.rs/subxt/0.30.1/subxt/book/setup/config/index.html&#xD;&#xA;&#xD;&#xA;Otherwise, note that we are going to improve this config (most notably the ExtrinsicParams) to make the much more robust and simpler to set up (follow this issue to keep up with this: https://github.com/paritytech/subxt/issues/1062)" ContentLicense="CC BY-SA 4.0" />
  <row Id="37493" PostHistoryTypeId="2" PostId="9445" RevisionGUID="f5c4b48f-5ac3-4bb1-8968-5302f88c69d5" CreationDate="2023-07-31T10:26:45.343" UserId="139" Text="For benchmarking I can see a need to use random number generators for maybe verification of a random storage or such. Do we have utilities provided by the `frame_benchmarking` framework itself or is it possible to bring in `std` dependencies for benchmarking? " ContentLicense="CC BY-SA 4.0" />
  <row Id="37495" PostHistoryTypeId="1" PostId="9445" RevisionGUID="f5c4b48f-5ac3-4bb1-8968-5302f88c69d5" CreationDate="2023-07-31T10:26:45.343" UserId="139" Text="Can we use std crates in benchmarking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37496" PostHistoryTypeId="3" PostId="9445" RevisionGUID="f5c4b48f-5ac3-4bb1-8968-5302f88c69d5" CreationDate="2023-07-31T10:26:45.343" UserId="139" Text="|benchmarking|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37497" PostHistoryTypeId="50" PostId="5680" RevisionGUID="691489ce-8af4-46fc-aac0-3b7022aa9088" CreationDate="2023-07-31T12:11:41.693" UserId="-1" />
  <row Id="37498" PostHistoryTypeId="50" PostId="5673" RevisionGUID="21d5772b-8b5c-4425-beb2-681194b16383" CreationDate="2023-07-31T14:06:10.763" UserId="-1" />
  <row Id="37499" PostHistoryTypeId="50" PostId="6585" RevisionGUID="83c4197e-5785-473f-b6e8-77ff049829a8" CreationDate="2023-07-31T16:02:15.397" UserId="-1" />
  <row Id="37500" PostHistoryTypeId="2" PostId="9446" RevisionGUID="f8c91a93-33d3-4679-b413-0694e7f91e5b" CreationDate="2023-07-31T16:58:24.483" UserId="560" Text="You can decode extrinsic's and parse blocks with Libuptest:&#xD;&#xA;https://uptest-sc.github.io/code/decode.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="37502" PostHistoryTypeId="6" PostId="3549" RevisionGUID="e8103428-ad5f-4c22-b088-c0098304f083" CreationDate="2023-07-31T20:10:16.887" UserId="29" Comment="[Edit removed during grace period]" Text="|polkadot-js|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37503" PostHistoryTypeId="2" PostId="9447" RevisionGUID="f2f0d06c-82e8-41c7-b81d-0f0015442d4e" CreationDate="2023-07-31T20:32:51.463" UserId="29" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="37505" PostHistoryTypeId="1" PostId="9447" RevisionGUID="f2f0d06c-82e8-41c7-b81d-0f0015442d4e" CreationDate="2023-07-31T20:32:51.463" UserId="29" ContentLicense="CC BY-SA 4.0" />
  <row Id="37506" PostHistoryTypeId="2" PostId="9448" RevisionGUID="02297c30-72fa-4d6a-9f3b-b9524a7a55c1" CreationDate="2023-07-31T20:32:51.463" UserId="29" Text="Questions related to migrating from the 3 repositories (substrate, cumulus, and polkadot) to 1 repository" ContentLicense="CC BY-SA 4.0" />
  <row Id="37508" PostHistoryTypeId="1" PostId="9448" RevisionGUID="02297c30-72fa-4d6a-9f3b-b9524a7a55c1" CreationDate="2023-07-31T20:32:51.463" UserId="29" ContentLicense="CC BY-SA 4.0" />
  <row Id="37509" PostHistoryTypeId="2" PostId="9449" RevisionGUID="36c95fb5-160b-411f-9113-f56f7c8b53d4" CreationDate="2023-07-31T20:56:20.843" UserId="4485" Text="Based on this example: https://docs.rs/ink/latest/ink/struct.EnvAccess.html#method.instantiate_contract&#xD;&#xA;&#xD;&#xA;Im doing something similar:&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn new_multisig(&amp;mut self, threshold: u8, owners_list: Vec&lt;AccountId&gt;, salt: Vec&lt;u8&gt;) {&#xD;&#xA;            let multisig = build_create::&lt;MultiSigRef&gt;()&#xD;&#xA;                .code_hash(self.multisig_codehash)&#xD;&#xA;                .gas_limit(0)&#xD;&#xA;                .endowment(0)&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;new&quot;)))&#xD;&#xA;                        .push_arg(threshold)&#xD;&#xA;                        .push_arg(owners_list),&#xD;&#xA;                )&#xD;&#xA;                .salt_bytes(salt)&#xD;&#xA;                .returns::&lt;MultiSigRef&gt;()&#xD;&#xA;                .instantiate();&#xD;&#xA;&#xD;&#xA;            self.env().emit_event(NewMultisig {&#xD;&#xA;                multisig_address: multisig, //Here i need to get the address of the new contract&#xD;&#xA;                threshold: threshold,&#xD;&#xA;                owners_list: owners_list,&#xD;&#xA;            });&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA; But i need to obtain the address of the instantiated contract. How can i do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37511" PostHistoryTypeId="1" PostId="9449" RevisionGUID="36c95fb5-160b-411f-9113-f56f7c8b53d4" CreationDate="2023-07-31T20:56:20.843" UserId="4485" Text="Get contract address from instantiated ContractRef" ContentLicense="CC BY-SA 4.0" />
  <row Id="37512" PostHistoryTypeId="3" PostId="9449" RevisionGUID="36c95fb5-160b-411f-9113-f56f7c8b53d4" CreationDate="2023-07-31T20:56:20.843" UserId="4485" Text="|polkadot|ink|smart-contract|pallet-contracts|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37513" PostHistoryTypeId="2" PostId="9450" RevisionGUID="04165232-0d90-4865-9598-be322b5af266" CreationDate="2023-07-31T21:16:22.267" UserId="2163" Text="I cloned the trappist repo, and I successfully run `cargo build --release`.&#xD;&#xA;&#xD;&#xA;After running `./target/release/trappist-node --dev` I tried to create an asset by using the `create` extrinsic placed inside the `assets` pallet.&#xD;&#xA;&#xD;&#xA;This resulted in the following error: `trappist 1010: invalid transaction: transaction call is not expected`&#xD;&#xA;&#xD;&#xA;I tried executing other extrinsics(e.g. `system.remark`) and that was successful.&#xD;&#xA;I am not sure I understand why this is failing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37515" PostHistoryTypeId="1" PostId="9450" RevisionGUID="04165232-0d90-4865-9598-be322b5af266" CreationDate="2023-07-31T21:16:22.267" UserId="2163" Text="Failing to create an asset on Trappist parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="37516" PostHistoryTypeId="3" PostId="9450" RevisionGUID="04165232-0d90-4865-9598-be322b5af266" CreationDate="2023-07-31T21:16:22.267" UserId="2163" Text="|test-network|local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37517" PostHistoryTypeId="2" PostId="9451" RevisionGUID="15f88397-83be-4d3f-9ab2-f0ad2476e753" CreationDate="2023-07-31T21:26:29.900" UserId="3407" Text="The code you are looking for to increment `x` is most likely &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let incremented = x.checked_add(1.into()).ok_or(MyError)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The primary reason that `Saturating` and `Checked{Add/Div/Mul}` traits are used in Substrate is that overflowing/underflowing in runtime code is _really bad_. Rust panics on overflow/underflow in debug mode, but will silently wrap arithmetic in release mode, as specified by [RFC 560](https://github.com/rust-lang/rfcs/blob/26197104b7bb9a5a35db243d639aee6e46d35d75/text/0560-integer-overflow.md).&#xD;&#xA;&#xD;&#xA;For saturating arithmetic, you are correct that there are not too many typical use cases for this behavior, and most of the time you do want the erroring variant (which is the `CheckedAdd` mentioned above). Although saturating instead of wrapping is typically less damaging, they both violate the consistency of your state, and preventing saturation and wrapping is much better. The `Checked{x}` traits provide signatures that return `None` on over/underflow, at which point you can error. Most of the time, this is what you want.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// From CheckedAdd&#xD;&#xA;fn checked_add(&amp;self, v: &amp;Self) -&gt; Option&lt;Self&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Saturating arithmetic should only be used when you would otherwise need to include a check for overflow/underflow, and set it to the corresponding extreme value. The use cases below should make this clear.&#xD;&#xA;&#xD;&#xA;### `Saturating` Use Cases&#xD;&#xA;&#xD;&#xA;This is copied from a good post on the [rust forums](https://users.rust-lang.org/t/saturating-what-does-it-really-do-and-when-is-it-useful/52720/6):&#xD;&#xA;&#xD;&#xA;Make the player lose 10 coins when they die, avoiding overflow:&#xD;&#xA;```rust&#xD;&#xA;player.coins = player.coins.saturating_sub(10);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Align some text to the middle, but if it is too large align it to the left edge:&#xD;&#xA;```rust&#xD;&#xA;let position = (total_width/2).saturating_sub(text_width/2);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Parse a digit into a number n, capping off too large numbers such that &quot;8354&quot; will be cut off at 255:&#xD;&#xA;```rust&#xD;&#xA;n = n.saturating_mul(10_u8).saturating_add(digit);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Move the cursor to the left unless it is at the left edge:&#xD;&#xA;```rust&#xD;&#xA;cursor.position.x = cursor.position.x.saturating_sub(1);&#xD;&#xA;``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="37519" PostHistoryTypeId="2" PostId="9452" RevisionGUID="b94aa71d-daa7-45f3-9bfe-6fc1b7696afc" CreationDate="2023-07-31T21:42:21.077" UserId="560" Text="I'm writing a script with subxt. How can I wrap a set_code tx in a sudo_unchecked_weight tx?&#xD;&#xA;&#xD;&#xA;Current code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    let sudo_set_code: Payload&lt;SetCode&gt;  = nodetemplate::tx().system().set_code(code);&#xD;&#xA;    let weight = Weight {&#xD;&#xA;        ref_time: 0,&#xD;&#xA;        proof_size: 0,&#xD;&#xA;    };&#xD;&#xA;    let sudo_tx = nodetemplate::tx().sudo().sudo_unchecked_weight(sudo_set_code, weight);&#xD;&#xA;```&#xD;&#xA;Traceback:&#xD;&#xA;```rust&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;  --&gt; src/main.rs:29:67&#xD;&#xA;   |&#xD;&#xA;29 |     let sudo_tx = nodetemplate::tx().sudo().sudo_unchecked_weight(sudo_set_code, weight);&#xD;&#xA;   |                                             --------------------- ^^^^^^^^^^^^^ expected `RuntimeCall`, found `Payload&lt;SetCode&gt;`&#xD;&#xA;   |                                             |&#xD;&#xA;   |                                             arguments to this method are incorrect&#xD;&#xA;   |&#xD;&#xA;   = note: expected enum `RuntimeCall`&#xD;&#xA;            found struct `subxt::tx::Payload&lt;SetCode&gt;`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0308`.&#xD;&#xA;error: could not compile `test_sudo_subxt` (bin &quot;test_sudo_subxt&quot;) due to previous error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37521" PostHistoryTypeId="1" PostId="9452" RevisionGUID="b94aa71d-daa7-45f3-9bfe-6fc1b7696afc" CreationDate="2023-07-31T21:42:21.077" UserId="560" Text="Sudo tx with subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="37522" PostHistoryTypeId="3" PostId="9452" RevisionGUID="b94aa71d-daa7-45f3-9bfe-6fc1b7696afc" CreationDate="2023-07-31T21:42:21.077" UserId="560" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37523" PostHistoryTypeId="2" PostId="9453" RevisionGUID="4835a058-ee3f-4d8a-9cd1-1fa2185cd7f5" CreationDate="2023-07-31T21:47:52.833" UserId="560" Text="Limiting the max amount could be tricky, but only the issuer/the account that created the asset could mint it. Therefor limiting how much the issuer print. Hard limits for minting is not enabled by the default asset pallet.&#xD;&#xA;See:&#xD;&#xA;https://docs.rs/pallet-assets/latest/pallet_assets/pallet/struct.Pallet.html#method.mint" ContentLicense="CC BY-SA 4.0" />
  <row Id="37525" PostHistoryTypeId="6" PostId="9450" RevisionGUID="ba2602c5-8f09-4e6e-b82e-6a9028c32aeb" CreationDate="2023-07-31T21:50:55.530" UserId="29" Comment="edited tags" Text="|test-network|local|trappist|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37526" PostHistoryTypeId="50" PostId="7391" RevisionGUID="03017781-2578-4573-a11f-23fc2bd66957" CreationDate="2023-08-01T01:06:50.753" UserId="-1" />
  <row Id="37527" PostHistoryTypeId="2" PostId="9454" RevisionGUID="02801359-7b60-4b70-8970-0ae18756929e" CreationDate="2023-08-01T04:02:31.577" UserId="2844" Text="I am trying to use latest substrate node template. I have added `pallet-contract`. The code compile but when accessing contracts from polkadotjs Developer menu, I got this issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Uncaught error. Something went wrong with the query and rendering of this component. Please supply all the details below when logging an issue, it may help in tracing the cause.&#xD;&#xA;    &#xD;&#xA;    Cannot read properties of undefined (reading 'keys')&#xD;&#xA;    &#xD;&#xA;    TypeError: Cannot read properties of undefined (reading 'keys')&#xD;&#xA;    at https://polkadot.js.org/apps/page.5bd3c0a06b4aee4f.js:718:5728&#xD;&#xA;    at os (https://polkadot.js.org/apps/modu.8896a823ddffd6ef.js:2:106274)&#xD;&#xA;    at Bu (https://polkadot.js.org/apps/modu.8896a823ddffd6ef.js:2:126396)&#xD;&#xA;    at https://polkadot.js.org/apps/modu.8896a823ddffd6ef.js:2:123000&#xD;&#xA;    at _ (https://polkadot.js.org/apps/modu.5d78a093107b232f.js:2:63097)&#xD;&#xA;    at MessagePort.I (https://polkadot.js.org/apps/modu.5d78a093107b232f.js:2:63629)&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This is my code [github repo](https://github.com/ganesh1233456/substrate-node-template)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VozeK.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37529" PostHistoryTypeId="1" PostId="9454" RevisionGUID="02801359-7b60-4b70-8970-0ae18756929e" CreationDate="2023-08-01T04:02:31.577" UserId="2844" Text="Uncaught error substrate-node-template pallet-contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="37530" PostHistoryTypeId="3" PostId="9454" RevisionGUID="02801359-7b60-4b70-8970-0ae18756929e" CreationDate="2023-08-01T04:02:31.577" UserId="2844" Text="|substrate-node-template|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37531" PostHistoryTypeId="5" PostId="9440" RevisionGUID="e191e87c-9cbf-4219-8524-d1d2d8602c69" CreationDate="2023-08-01T04:44:59.730" UserId="2844" Comment="added 114 characters in body" Text="I have added `pallet-contract` in [our chain](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate). Build contract works fine and run chain in dev mode also works fine. But when I try to deploy contract it doesn't work and doesn't throw any error. Can someone please help me.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This issue on inspect&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is [github repo](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Qzvib.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/BMX1w.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="37532" PostHistoryTypeId="2" PostId="9455" RevisionGUID="9d52aace-d482-4c3e-bc9d-0b64f0db81a1" CreationDate="2023-08-01T06:37:08.760" UserId="4498" Text="I have two ink! contracts, one being a simple staking contract, and the other being an ERC20. Now, I can write unit tests for ERC20 simply in the contract file itself but to write unit tests for my staking contract I need to make it interact with my erc20 so that general requirements of transfer of the token are met. How can I do that, can I possibly put both contracts in one file and then write their unit tests? or can I import both contracts into another one and then write the test cases? Guide me." ContentLicense="CC BY-SA 4.0" />
  <row Id="37534" PostHistoryTypeId="1" PostId="9455" RevisionGUID="9d52aace-d482-4c3e-bc9d-0b64f0db81a1" CreationDate="2023-08-01T06:37:08.760" UserId="4498" Text="Writing Unit Tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="37535" PostHistoryTypeId="3" PostId="9455" RevisionGUID="9d52aace-d482-4c3e-bc9d-0b64f0db81a1" CreationDate="2023-08-01T06:37:08.760" UserId="4498" Text="|ink|smart-contract|unit-tests|toml|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37536" PostHistoryTypeId="2" PostId="9456" RevisionGUID="23a82705-64ed-42a6-b18a-8478bde4d70f" CreationDate="2023-08-01T06:55:38.210" UserId="2166" Text="You can use `to_account_id` method to obtain address of instantiated smart contract.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let contract_address = multisig.to_account_id();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="37538" PostHistoryTypeId="2" PostId="9457" RevisionGUID="e103a491-373e-4d44-8ac0-d2c2df127710" CreationDate="2023-08-01T07:00:42.403" UserId="2166" Text="The scenario you are described can not be covered by an unit test. Unit tests are intended for testing one piece (unit, class) of code, e.g. single smart contract. If you want to test interaction between two smart contracts contracts you need to write end to end test.&#xD;&#xA;&#xD;&#xA;Check ink! [documentation](https://use.ink/basics/contract-testing) for details." ContentLicense="CC BY-SA 4.0" />
  <row Id="37540" PostHistoryTypeId="5" PostId="9457" RevisionGUID="8738e587-d5e4-4226-842b-42c9aeef4acd" CreationDate="2023-08-01T07:08:58.110" UserId="2166" Comment="added 116 characters in body" Text="The scenario you are described can not be covered by an unit test. Unit tests are intended for testing one piece (unit, class) of code, e.g. single smart contract. If you want to test interaction between two smart contracts contracts you need to write end to end test.&#xD;&#xA;&#xD;&#xA;Check ink! [documentation](https://use.ink/basics/contract-testing) for details.&#xD;&#xA;&#xD;&#xA;e2e tests samples you can find [here](https://github.com/swankyhub/rmrk-lazy-mint/blob/main/rmrk_proxy/proxy.rs)" ContentLicense="CC BY-SA 4.0" />
  <row Id="37541" PostHistoryTypeId="2" PostId="9458" RevisionGUID="761566ef-0d6f-4f8f-8ac9-19a3d6b92400" CreationDate="2023-08-01T07:35:29.260" UserId="3317" Text="Correct this could result from a transfer which is `&gt;=` than the [`total_issuance`][1] or [`total_supply`][2] of the native currency or an asset, respectively (conversion to `Arithmetic` [here][3]). &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/6d19bc2d15f96fe513671568ec66e8b21aaed031/frame/balances/src/impl_fungible.rs#L110&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/6d19bc2d15f96fe513671568ec66e8b21aaed031/frame/assets/src/functions.rs#L173&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/6d19bc2d15f96fe513671568ec66e8b21aaed031/frame/support/src/traits/tokens/misc.rs#L115" ContentLicense="CC BY-SA 4.0" />
  <row Id="37543" PostHistoryTypeId="2" PostId="9459" RevisionGUID="a0acd005-d190-473e-85dc-66121aba6218" CreationDate="2023-08-01T09:28:38.743" UserId="2025" Text="In the [XCM Transact instruction](https://github.com/paritytech/xcm-format#transact), the `call` operand is the SCALE-encoded transaction call to be applied. This implies that the first 2 bytes will encode the following info:&#xD;&#xA; - 1st byte is the pallet index the transaction is calling into. &#xD;&#xA; - 2nd byte is the function in the pallet the transaction is calling.&#xD;&#xA;&#xD;&#xA;This way, the destination chain, once processing the received XCM message with the Transact instruction, can unequivocally identify the specific pallet and call to be executed." ContentLicense="CC BY-SA 4.0" />
  <row Id="37545" PostHistoryTypeId="2" PostId="9460" RevisionGUID="480db5b8-c84f-4cf0-a640-9d6fdd6ab042" CreationDate="2023-08-01T10:05:41.820" UserId="194" Text="For the Trappist we have implemented a custom lockdown mode pallet to pause al the transactions in case is needed. Soon, this pallet will be replaced by the pallets being worked here: https://github.com/paritytech/substrate/pull/12092&#xD;&#xA;&#xD;&#xA;For being able to commit transactions to Trappist just disable the lockdown mode by calling the extrinsic `lockdownMode.deactivateLockdownMode()` from the sudo tab this requires a privileged origin to be executed).&#xD;&#xA;&#xD;&#xA;Anyway i will update the Trappist documentation to let the users to know how to disable this lockdown mode or maybe changing the GenesisConfig for the local setup so it starts wit h## Heading ##" ContentLicense="CC BY-SA 4.0" />
  <row Id="37547" PostHistoryTypeId="5" PostId="9277" RevisionGUID="178223f1-326d-4159-9f0b-66fea5e69f87" CreationDate="2023-08-01T10:06:16.743" UserId="4445" Comment="you don't want to delete Cargo.toml" Text="I got the same issue today and `rustup update` doesn't work.&#xD;&#xA;And I came to an idea.&#xD;&#xA;```bash&#xD;&#xA;rm -fr target Cargo.lock&#xD;&#xA;cargo check&#xD;&#xA;```&#xD;&#xA;that's it.&#xD;&#xA;But anyone know what's the cause of it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37548" PostHistoryTypeId="24" PostId="9277" RevisionGUID="178223f1-326d-4159-9f0b-66fea5e69f87" CreationDate="2023-08-01T10:06:16.743" Comment="Proposed by 4445 approved by 2762, 2673 edit id of 512" ContentLicense="CC BY-SA 4.0" />
  <row Id="37549" PostHistoryTypeId="5" PostId="9272" RevisionGUID="41f7bafd-22bb-4678-9bd6-516ce8a49d10" CreationDate="2023-08-01T10:08:02.703" UserId="3136" Comment="correct the format of title and change in body" Text="Follow This Tutorial(https://docs.substrate.io/tutorials/build-a-parachain/transfer-assets-with-xcm/)&#xD;&#xA;But Got Erorr, So can't complete it.&#xD;&#xA;&#xD;&#xA;please anyone solve my problem.&#xD;&#xA;&#xD;&#xA;1. Parachain Does not have `sudo extrinsic`. &#xD;&#xA;Using `v0.9.37` version(Polkadot + Substrate-prachain) parachain does not have it in extrinsic&#xD;&#xA;how do i use sudo?&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xowra.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37550" PostHistoryTypeId="24" PostId="9272" RevisionGUID="41f7bafd-22bb-4678-9bd6-516ce8a49d10" CreationDate="2023-08-01T10:08:02.703" Comment="Proposed by 3136 approved by -1 edit id of 500" ContentLicense="CC BY-SA 4.0" />
  <row Id="37551" PostHistoryTypeId="5" PostId="9272" RevisionGUID="5593572d-bf52-4b9c-858d-cd32aec84d02" CreationDate="2023-08-01T10:08:02.703" UserId="2673" Comment="correct the format of title and change in body" Text="I followed this tutorial (https://docs.substrate.io/tutorials/build-a-parachain/transfer-assets-with-xcm/), but got an erorr, so can't complete it.&#xD;&#xA;&#xD;&#xA;Could anyone please solve my problem?&#xD;&#xA;&#xD;&#xA;1. Parachain Does not have `sudo extrinsic`. &#xD;&#xA;Using `v0.9.37` version(Polkadot + Substrate-prachain) parachain does not have it in extrinsic&#xD;&#xA;how do i use sudo?&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xowra.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37552" PostHistoryTypeId="5" PostId="9403" RevisionGUID="72675b57-68f6-4421-b313-aea28639fd80" CreationDate="2023-08-01T10:08:57.853" UserId="3136" Comment="code modified in body" Text="I just ran `substrate-node-template` on dedicated server and connected with `substrate-frontend-template`. Everything work fine with http(ws), but when I try to connect via https(wss) its not working? because --wss-port in substrate-node doesn't supported. How can I fix it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37553" PostHistoryTypeId="24" PostId="9403" RevisionGUID="72675b57-68f6-4421-b313-aea28639fd80" CreationDate="2023-08-01T10:08:57.853" Comment="Proposed by 3136 approved by 2762, -1 edit id of 511" ContentLicense="CC BY-SA 4.0" />
  <row Id="37554" PostHistoryTypeId="5" PostId="9403" RevisionGUID="d0bce397-751f-4a19-8d95-c21329fab1cd" CreationDate="2023-08-01T10:08:57.853" UserId="2673" Comment="code modified in body" Text="I just ran `substrate-node-template` on dedicated server and connected with `substrate-frontend-template`. Everything works fine with http(ws), but when I try to connect via https(wss) it's not working(?) because `--wss-port` in substrate-node isn't supported. How can I fix it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37555" PostHistoryTypeId="5" PostId="9417" RevisionGUID="08da28b4-2a1f-4b15-8eda-556488bd08f0" CreationDate="2023-08-01T10:13:34.923" UserId="2673" Comment="improved formatting" Text="In my contract, I have a requirement to call messages from external contracts without knowing their specific identities beforehand. To achieve this, I utilize the call builder, enabling the execution of transactions at a low level. Since these transactions may encounter failures, I adopt the `try_invoke` method, which facilitates error handling. The `try_invoke` method can return two types of errors:&#xD;&#xA;&#xD;&#xA;1) Errors arising from the underlying execution environment (`ink::env::Error`).&#xD;&#xA;1) Errors stemming from the programming language itself (`ink::LangError`).&#xD;&#xA;&#xD;&#xA;Below is the section of code where I implement this functionality:&#xD;&#xA;```rust         &#xD;&#xA;            ...&#xD;&#xA;            // Fetch the transaction&#xD;&#xA;            let tx = self.get_tx(tx_id).expect(&quot;This should never fail because we are checking the tx_id before calling this function&quot;);&#xD;&#xA;&#xD;&#xA;            let tx_result = build_call::&lt;&lt;Self as ::ink::env::ContractEnv&gt;::Env&gt;()&#xD;&#xA;                .call(tx.address)&#xD;&#xA;                .gas_limit(tx.gas_limit)&#xD;&#xA;                .transferred_value(tx.transferred_value)&#xD;&#xA;                .call_flags(CallFlags::default().set_allow_reentry(tx.allow_reentry))&#xD;&#xA;                .exec_input(ExecutionInput::new(tx.selector.into()).push_arg(InputArgs(&amp;tx.input)))&#xD;&#xA;                .returns::&lt;Vec&lt;u8&gt;&gt;()&#xD;&#xA;                .try_invoke();&#xD;&#xA;&#xD;&#xA;            // Instead of just returning a custom Error we could return the error from the call&#xD;&#xA;            let result = match tx_result {&#xD;&#xA;                Ok(Ok(bytes)) =&gt; TxResult::Success(bytes),&#xD;&#xA;                Ok(Err(e)) =&gt; TxResult::Failed(Error::LangExecutionFailed(e)),&#xD;&#xA;                Err(e) =&gt; TxResult::Failed(Error::EnvExecutionFailed(e)), // Here is where i need to wrap the error in order to provide useful information about the tx failure&#xD;&#xA;            };&#xD;&#xA;            ...&#xD;&#xA;```&#xD;&#xA;I defined two custom errors that serve as wrappers for the errors thrown by the `try_invoke` method.&#xD;&#xA;```rust&#xD;&#xA;#[derive(scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Env error encountered when executing the transaction&#xD;&#xA;        EnvExecutionFailed(ink::env::Error),&#xD;&#xA;        /// Transaction executed but Lang error encountered&#xD;&#xA;        LangExecutionFailed(ink::LangError),&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;However, during compilation, I encountered the following errors:&#xD;&#xA;```&#xD;&#xA;The trait WrapperTypeEncode is not implemented for ink::ink_env::Error.&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;The trait WrapperTypeDecode is not implemented for ink::ink_env::Error.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've come to understand that the error is being thrown because `ink::env::Error` does not implement `scale::Encode` and `scale::Decode` traits. I'm wondering if there's a way to manually implement these traits, or if there is another solution." ContentLicense="CC BY-SA 4.0" />
  <row Id="37556" PostHistoryTypeId="2" PostId="9461" RevisionGUID="e072bb25-9ad4-4fc6-a269-cacc145df9d6" CreationDate="2023-08-01T10:19:53.590" UserId="94" Text="The `saturating_` versions are used in cases where an overflow is not expected but would otherwise panic the runtime.  &#xD;&#xA;&#xD;&#xA;Nowadays you can use the `defensive_` variants like `defensive_saturating_inc` which will log an error message and fail in tests but otherwise behave as usual." ContentLicense="CC BY-SA 4.0" />
  <row Id="37558" PostHistoryTypeId="2" PostId="9462" RevisionGUID="32acf408-2eda-44fd-8bec-a2c2da6c91c5" CreationDate="2023-08-01T10:24:31.513" UserId="94" Text="Benchmarks compile to WASM and can thereby not access `std`.  &#xD;&#xA;&#xD;&#xA;Now in most cases it is enough to use a deterministic pseudorandom source like the output of a cryptographic hash. You can easily do this by defining a seed and recursively calling `Blake2` on it to generate as much &quot;random&quot; data as needed.  &#xD;&#xA;This has the advantage of being deterministic - benchmarks should always be deterministic for reproducibility.  &#xD;&#xA;But in general; `std` crates and hardware random number generators are not accessible.&#xD;&#xA;&#xD;&#xA;(There *could* be a way to speparate the benchmarking setup from the actual execution, and thereby allow `std` in the setup phase, but it is just an idea - not anything that will be implemented any time soon.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="37560" PostHistoryTypeId="2" PostId="9463" RevisionGUID="b43cd133-0cee-4168-8ac1-8448ca13fedb" CreationDate="2023-08-01T12:04:27.953" UserId="4435" Text="I am trying to sign and send some transactions using the `batch` function.&#xD;&#xA;Here are some code snippets for reproduction.&#xD;&#xA;```&#xD;&#xA;const nftMinting = async (item) =&gt; {&#xD;&#xA;    try {&#xD;&#xA;      let collection = 1&#xD;&#xA;      &#xD;&#xA;      const fromAcct = await getFromAcct()&#xD;&#xA;      let txs = []&#xD;&#xA;      txs.push(api.tx.uniques.create(collection, polkadotAccount))&#xD;&#xA;&#xD;&#xA;      const nftAmount = 100&#xD;&#xA;      const price = nftAmount &gt; 0? Math.round(Number(item?.price) / nftAmount) : 0&#xD;&#xA;&#xD;&#xA;      if (price &gt; 0) {&#xD;&#xA;        for (let index = 0; index &lt; 100; index++) {&#xD;&#xA;          txs.push(api.tx.uniques.mint(collection, index + 1, polkadotAccount))&#xD;&#xA;          txs.push(api.tx.uniques.setPrice(collection, index + 1, price, polkadotAccount))&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;&#xD;&#xA;      await api.tx.utility.batch(txs).signAndSend(...fromAcct, ({ events = [], status, txHash }) =&gt;{&#xD;&#xA;        status.isFinalized&#xD;&#xA;          ? toast.success(` Finalized. Block hash: ${status.asFinalized.toString()}`)&#xD;&#xA;          : toast.info(`Current transaction status: ${status.type}`)&#xD;&#xA;    &#xD;&#xA;          // Loop through Vec&lt;EventRecord&gt; to display all events&#xD;&#xA;          events.forEach(async ({ _, event: { data, method, section } }) =&gt; {&#xD;&#xA;            if ((section + &quot;:&quot; + method) === 'system:ExtrinsicFailed' ) {&#xD;&#xA;              // extract the data for this event&#xD;&#xA;              const [dispatchError, dispatchInfo] = data&#xD;&#xA;              console.log(`dispatchinfo: ${dispatchInfo}`)&#xD;&#xA;              let errorInfo&#xD;&#xA;              &#xD;&#xA;              // decode the error&#xD;&#xA;              if (dispatchError.isModule) {&#xD;&#xA;                // for module errors, we have the section indexed, lookup&#xD;&#xA;                // (For specific known errors, we can also do a check against the&#xD;&#xA;                // api.errors.&lt;module&gt;.&lt;ErrorName&gt;.is(dispatchError.asModule) guard)&#xD;&#xA;                const mod = dispatchError.asModule&#xD;&#xA;                const error = api.registry.findMetaError(&#xD;&#xA;                    new Uint8Array([mod.index.toNumber(), bnFromHex(mod.error.toHex().slice(0, 4)).toNumber()])&#xD;&#xA;                )&#xD;&#xA;                let message = `${error.section}.${error.name}${&#xD;&#xA;                    Array.isArray(error.docs) ? `(${error.docs.join('')})` : error.docs || ''&#xD;&#xA;                }`&#xD;&#xA;                &#xD;&#xA;                errorInfo = `${message}`&#xD;&#xA;                console.log(`Error-info::${JSON.stringify(error)}`)&#xD;&#xA;              } else {&#xD;&#xA;                // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;                errorInfo = dispatchError.toString()&#xD;&#xA;              }&#xD;&#xA;              toast.warn(` Transaction Failed! ${section}.${method}::${errorInfo}`)&#xD;&#xA;            } else if (section + &quot;:&quot; + method === 'system:ExtrinsicSuccess' ) {&#xD;&#xA;              toast.success(`❤️️ Transaction successful! tx hash: ${txHash}, Block hash: ${status.asFinalized.toString()}`)&#xD;&#xA;            }&#xD;&#xA;          })&#xD;&#xA;      })      &#xD;&#xA;    } catch (error) {&#xD;&#xA;      console.log('error :: ', error)&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I got this error, unfortunately.&#xD;&#xA;&#xD;&#xA;`Uncaught (in promise) Error: Cannot convert 'InBlock' via asFinalized`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Any kind of help would be appreciated.&#xD;&#xA;Thank you in advance.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sUocR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37562" PostHistoryTypeId="1" PostId="9463" RevisionGUID="b43cd133-0cee-4168-8ac1-8448ca13fedb" CreationDate="2023-08-01T12:04:27.953" UserId="4435" Text="Uncaught (in promise) Error: Cannot convert 'InBlock' via asFinalized" ContentLicense="CC BY-SA 4.0" />
  <row Id="37563" PostHistoryTypeId="3" PostId="9463" RevisionGUID="b43cd133-0cee-4168-8ac1-8448ca13fedb" CreationDate="2023-08-01T12:04:27.953" UserId="4435" Text="|polkadot-js|pallet|batch|uniques|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37564" PostHistoryTypeId="5" PostId="9456" RevisionGUID="1a63ead6-9ec4-4650-ba40-e43dff7f1e2c" CreationDate="2023-08-01T12:47:07.750" UserId="2166" Comment="added 158 characters in body" Text="You can use `to_account_id` method to obtain address of instantiated smart contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let contract_address = multisig.to_account_id();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Taking into account Luca's comment, the workable sample would be &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use ink::ToAccountId;&#xD;&#xA;&#xD;&#xA;let contract_address = multisig.to_account_id();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="37565" PostHistoryTypeId="2" PostId="9464" RevisionGUID="4893809e-dd42-492a-b610-3aa4d8d7c5c4" CreationDate="2023-08-01T14:12:29.063" UserId="351" Text="Different origin serve different purpose and certain privileges, care to list the privileges per OriginKind.&#xD;&#xA;&#xD;&#xA;And yes the documentation is not clear enough " ContentLicense="CC BY-SA 4.0" />
  <row Id="37567" PostHistoryTypeId="1" PostId="9464" RevisionGUID="4893809e-dd42-492a-b610-3aa4d8d7c5c4" CreationDate="2023-08-01T14:12:29.063" UserId="351" Text="XCM's Origin Kinds, what privilege does XCM origin does not have?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37568" PostHistoryTypeId="3" PostId="9464" RevisionGUID="4893809e-dd42-492a-b610-3aa4d8d7c5c4" CreationDate="2023-08-01T14:12:29.063" UserId="351" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37569" PostHistoryTypeId="52" PostId="9455" RevisionGUID="ed842d23-e3e2-4f70-9ea4-ee6872375e47" CreationDate="2023-08-01T14:39:54.863" />
  <row Id="37570" PostHistoryTypeId="2" PostId="9465" RevisionGUID="017d9008-d6a6-4db6-bee4-f283e829a176" CreationDate="2023-08-01T15:32:59.347" UserId="379" Text="We experienced an issue where we had a motion open before upgrading our runtime, after this upgrade this motion became &quot;uncloseable&quot;. When inspecting the chainstate for the council, specifically the `proposalOf` of the open motion we get:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;council.proposalOf: Option&lt;Call&gt;&#xD;&#xA;&lt;unknown&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This motion became unclosable via the polkadot js UI. All subsequent proposals do as well.&#xD;&#xA;This motion is not expired and has enough votes to be closed but yet when we try to close it manually we get: `proposalMissing`. The error is returned from the frame code here: https://github.com/paritytech/substrate/blob/ba6649b262b5d0f937ddd9fb30be1ffd9548278b/frame/collective/src/lib.rs#L889&#xD;&#xA;&#xD;&#xA;I think proposals should be closable when they are either expired or not AND they have enough votes even though the attached call is missing. In this case, the proposal should be closed and not executed and removed from storage." ContentLicense="CC BY-SA 4.0" />
  <row Id="37572" PostHistoryTypeId="1" PostId="9465" RevisionGUID="017d9008-d6a6-4db6-bee4-f283e829a176" CreationDate="2023-08-01T15:32:59.347" UserId="379" Text="After runtime upgrade council proposals calls becomes &lt;unknown&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37573" PostHistoryTypeId="3" PostId="9465" RevisionGUID="017d9008-d6a6-4db6-bee4-f283e829a176" CreationDate="2023-08-01T15:32:59.347" UserId="379" Text="|runtime|council|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37574" PostHistoryTypeId="5" PostId="9416" RevisionGUID="2847fed4-250f-46e5-8491-2ce064b0bec2" CreationDate="2023-08-01T16:07:49.913" UserId="29" Comment="more context" Text="You could use zombienet tests. For example, take a look at this test:&#xD;&#xA;- https://github.com/paritytech/zombienet/blob/main/tests/dispute-valid-block.test.js&#xD;&#xA;&#xD;&#xA;You would want to have a zombienet test to generate a &quot;bad&quot; collation and trigger a dispute." ContentLicense="CC BY-SA 4.0" />
  <row Id="37575" PostHistoryTypeId="2" PostId="9466" RevisionGUID="0f211ba2-098d-485d-bfea-cd83a8eb6cfa" CreationDate="2023-08-01T16:50:34.053" UserId="300" Text="There are likely reasons for this, but I'm not sure what they are yet.&#xD;&#xA;&#xD;&#xA;In a parachain using pallet_session, is there a way for sudo/root/governance to force a session to rotate faster/cut a session short?&#xD;&#xA;&#xD;&#xA;Reason for wanting to rotate (as there might be a better way to solve the issue):&#xD;&#xA;When using invulnerable collators, it can take a full session to remove collators that are failing. If there are several failing, then it can take even longer in real time as the block formation is slow." ContentLicense="CC BY-SA 4.0" />
  <row Id="37577" PostHistoryTypeId="1" PostId="9466" RevisionGUID="0f211ba2-098d-485d-bfea-cd83a8eb6cfa" CreationDate="2023-08-01T16:50:34.053" UserId="300" Text="Way to force a new Session when using pallet_session?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37578" PostHistoryTypeId="3" PostId="9466" RevisionGUID="0f211ba2-098d-485d-bfea-cd83a8eb6cfa" CreationDate="2023-08-01T16:50:34.053" UserId="300" Text="|parachain|parachain-collator|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37579" PostHistoryTypeId="50" PostId="9078" RevisionGUID="076e52d8-d4d0-4449-848f-df4f05769603" CreationDate="2023-08-01T18:04:25.557" UserId="-1" />
  <row Id="37580" PostHistoryTypeId="2" PostId="9467" RevisionGUID="3fdf2a96-3b76-46ee-8efd-511f4a942122" CreationDate="2023-08-01T19:49:03.273" UserId="4500" Text="I'm working on an an ink! contract and trying to establish a factory contract to enable indexing for each deployment using a subquery subgraph. For this purpose, we emit an event whenever a successful instantiation takes place. However, during compilation, I encounter the following error within the emit_event function:&#xD;&#xA;```&#xD;&#xA;type annotations needed&#xD;&#xA;cannot satisfy `&lt;_ as ink::reflect::ContractEventBase&gt;::Type == _`&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;Type annotations needed&#xD;&#xA;and another `impl` found in the `multisig` crate: `impl&lt;'a&gt; ink::codegen::EmitEvent&lt;multisig::multisig::MultiSig&gt; for ink::EnvAccess&lt;'a, &lt;multisig::multisig::MultiSig as ink::ink_env::ContractEnv&gt;::Env&gt;;`&#xD;&#xA;```&#xD;&#xA;Here is the entire contract&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std, no_main)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod multisig_factory {&#xD;&#xA;&#xD;&#xA;    use ink::prelude::vec::Vec;&#xD;&#xA;    use ink::ToAccountId;&#xD;&#xA;    use multisig::MultiSigRef;&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct NewMultisig {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        multisig_address: AccountId,&#xD;&#xA;        threshold: u8,&#xD;&#xA;        owners_list: Vec&lt;AccountId&gt;,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// The contract instantiation failed.&#xD;&#xA;        InstantiationFailed,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    #[derive(Default)]&#xD;&#xA;    pub struct MultiSigFactory {&#xD;&#xA;        multisig_codehash: Hash,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl MultiSigFactory {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(codehash: Hash) -&gt; Result&lt;Self, Error&gt; {&#xD;&#xA;            Ok(Self {&#xD;&#xA;                multisig_codehash: codehash,&#xD;&#xA;            })&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn new_multisig(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            threshold: u8,&#xD;&#xA;            owners_list: Vec&lt;AccountId&gt;,&#xD;&#xA;            salt: Vec&lt;u8&gt;,&#xD;&#xA;        ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;            let multisig_ins = MultiSigRef::new(threshold, owners_list)&#xD;&#xA;                .code_hash(self.multisig_codehash)&#xD;&#xA;                .endowment(0)&#xD;&#xA;                .salt_bytes(salt)&#xD;&#xA;                .instantiate();&#xD;&#xA;&#xD;&#xA;            match multisig_ins {&#xD;&#xA;                Ok(multisig) =&gt; {&#xD;&#xA;                    let multisig_address = multisig.to_account_id();&#xD;&#xA;                    self.env().emit_event(NewMultisig { // HERE I HAVE THE ERROR&#xD;&#xA;                        multisig_address,&#xD;&#xA;                        threshold,&#xD;&#xA;                        owners_list,&#xD;&#xA;                    });&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                Err(_) =&gt; Err(Error::InstantiationFailed),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Any clue how I can proceed?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37582" PostHistoryTypeId="1" PostId="9467" RevisionGUID="3fdf2a96-3b76-46ee-8efd-511f4a942122" CreationDate="2023-08-01T19:49:03.273" UserId="4500" Text="Event on factory can't be emitted" ContentLicense="CC BY-SA 4.0" />
  <row Id="37583" PostHistoryTypeId="3" PostId="9467" RevisionGUID="3fdf2a96-3b76-46ee-8efd-511f4a942122" CreationDate="2023-08-01T19:49:03.273" UserId="4500" Text="|polkadot|ink|smart-contract|pallet-contracts|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37584" PostHistoryTypeId="2" PostId="9468" RevisionGUID="f7a8fc35-effb-48f4-8a87-def119ec7ca2" CreationDate="2023-08-01T23:03:05.297" UserId="29" Text="I believe this [doc](https://paritytech.github.io/polkadot/doc/xcm/v2/enum.OriginKind.html) is straightforward:&#xD;&#xA;&#xD;&#xA;**Native**&#xD;&#xA;&#xD;&#xA;Origin should just be the native dispatch origin representation for the sender in the local runtime framework. **For Cumulus/Frame chains this is the Parachain or Relay origin if coming from a chain**, though there may be others if the MultiLocation XCM origin has a primary/native dispatch origin form.&#xD;&#xA;&#xD;&#xA;**SovereignAccount**&#xD;&#xA;&#xD;&#xA;Origin should just be the standard account-based origin with the sovereign account of the sender. **For Cumulus/Frame chains, this is the Signed origin**.&#xD;&#xA;&#xD;&#xA;**Superuser**&#xD;&#xA;&#xD;&#xA;Origin should be the super-user. **For Cumulus/Frame chains, this is the Root origin**. This will not usually be an available option.&#xD;&#xA;&#xD;&#xA;**Xcm**&#xD;&#xA;&#xD;&#xA;Origin should be interpreted as an XCM native origin and the MultiLocation should be encoded directly in the dispatch origin unchanged. **For Cumulus/Frame chains, this will be the pallet_xcm::Origin::Xcm type**.&#xD;&#xA;&#xD;&#xA;If you have a more specific question, please ask.&#xD;&#xA;&#xD;&#xA;**Resources**&#xD;&#xA;- https://paritytech.github.io/polkadot/doc/xcm/v2/enum.OriginKind.html&#xD;&#xA;- https://paritytech.github.io/xcm-docs/executor_config/index.html#originconverter" ContentLicense="CC BY-SA 4.0" />
  <row Id="37586" PostHistoryTypeId="2" PostId="9469" RevisionGUID="c018ee53-1af6-4eae-923c-878fd084419a" CreationDate="2023-08-02T03:56:37.167" UserId="4502" Text="I am preparing to create a smart contract on Astar using ink! programming language. The contract's main logic involves modifying the cross-chain asset USDT on the statemint chain. After going through all the libraries provided by ink!, I haven't found any relevant interface to modify cross-chain assets, specifically the USDT asset with ID 4294969280 on Astar. How can I modify the USDT asset within the ink! contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37588" PostHistoryTypeId="1" PostId="9469" RevisionGUID="c018ee53-1af6-4eae-923c-878fd084419a" CreationDate="2023-08-02T03:56:37.167" UserId="4502" Text="how to get and modify cross-chain asset in contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37589" PostHistoryTypeId="3" PostId="9469" RevisionGUID="c018ee53-1af6-4eae-923c-878fd084419a" CreationDate="2023-08-02T03:56:37.167" UserId="4502" Text="|ink|rust|assets|contracts|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37590" PostHistoryTypeId="2" PostId="9470" RevisionGUID="404c75ec-3451-4766-ae23-d7b5314f45c4" CreationDate="2023-08-02T04:31:08.137" UserId="4117" Text="Those are two different things,&#xD;&#xA;&#xD;&#xA;### 1. Interacting with Local USDT Asset (4294969280) on Astar&#xD;&#xA;If you want to interact with pallet-assets assets like USDT, you can use ink! [Chain Extension][1]. We have the chain extension for pallet-assets and *it's only available on Shibuya Testnet*.&#xD;&#xA;&#xD;&#xA; - Docs - https://use.ink/macros-attributes/chain-extension&#xD;&#xA; - Example ink! contract - https://github.com/swankyhub/chain-extension-contracts/blob/main/examples/assets/lib.rs&#xD;&#xA;&#xD;&#xA;**Note:-**&#xD;&#xA;There is a high probability that Chain Extensions might be deprecated and replace with something else, that has same functionality in future, just keep that in mind.&#xD;&#xA;&#xD;&#xA;### 2. Interacting with Remote USDT Asset on Statemint (via XCM)&#xD;&#xA;This will require sending XCM from ink! contracts to Statemint and currently under-development and will be available soon.&#xD;&#xA;Once we have the capability to send XCM messages from ink! contracts, you can not only send/swap assets across parachains but also complex remote transact operations (executing tx on other parachains) &#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/macros-attributes/chain-extension" ContentLicense="CC BY-SA 4.0" />
  <row Id="37592" PostHistoryTypeId="2" PostId="9471" RevisionGUID="44c844a6-4f32-4e6e-9709-6443091fb247" CreationDate="2023-08-02T05:42:13.007" UserId="139" Text="I have this code that will not compile : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::error]&#xD;&#xA;pub enum Error&lt;T&gt; {&#xD;&#xA; SomeErr{ account : T::AccountId }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will not compile with the error :&#xD;&#xA;&gt;``AccountId`` associated type not found.&#xD;&#xA;&#xD;&#xA;Alright, can I help the situation by restricting `T` to `T: Config` ? No, that will not compile either. So does that imply we can't use `T` and it's ATs on Errors? " ContentLicense="CC BY-SA 4.0" />
  <row Id="37594" PostHistoryTypeId="1" PostId="9471" RevisionGUID="44c844a6-4f32-4e6e-9709-6443091fb247" CreationDate="2023-08-02T05:42:13.007" UserId="139" Text="Why can't I use `T::AccountId` on my error type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37595" PostHistoryTypeId="3" PostId="9471" RevisionGUID="44c844a6-4f32-4e6e-9709-6443091fb247" CreationDate="2023-08-02T05:42:13.007" UserId="139" Text="|pallet|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37596" PostHistoryTypeId="5" PostId="9471" RevisionGUID="e4104219-d820-4963-afb8-c75138b7bcaa" CreationDate="2023-08-02T05:59:51.267" UserId="139" Comment="added 359 characters in body; edited title" Text="I have this code that will not compile : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::error]&#xD;&#xA;pub enum Error&lt;T&gt; {&#xD;&#xA; SomeErr{ account : T::AccountId }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This will not compile with the error :&#xD;&#xA;&gt;``AccountId`` associated type not found.&#xD;&#xA;&#xD;&#xA;Alright, can I help the situation by restricting `T` to `T: Config` ? No, that will not compile either. So does that imply we can't use `T` and it's ATs on Errors? &#xD;&#xA;&#xD;&#xA;Or is it a general limitation on the Error type to not be able to nest other types? Which also brings me to the question, when using `map_err` a common pattern to wrap perhaps a failure from some other module and emit it as our custom pallet error, do we lose the ability to nest error types? &#xD;&#xA;&#xD;&#xA;Effectively making the `e` in `map_err(|e| ... )` useless?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37597" PostHistoryTypeId="4" PostId="9471" RevisionGUID="e4104219-d820-4963-afb8-c75138b7bcaa" CreationDate="2023-08-02T05:59:51.267" UserId="139" Comment="added 359 characters in body; edited title" Text="Why can't I use structs with data on my pallet error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37598" PostHistoryTypeId="2" PostId="9472" RevisionGUID="fced9adf-c806-4f6b-a0a8-1b87e020e952" CreationDate="2023-08-02T07:12:23.910" UserId="2844" Text="I have chain built using `substrate-node-template`. Now what are the steps to connect my chain to Rococo test network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37600" PostHistoryTypeId="1" PostId="9472" RevisionGUID="fced9adf-c806-4f6b-a0a8-1b87e020e952" CreationDate="2023-08-02T07:12:23.910" UserId="2844" Text="Steps to connect chain to rococo test" ContentLicense="CC BY-SA 4.0" />
  <row Id="37601" PostHistoryTypeId="3" PostId="9472" RevisionGUID="fced9adf-c806-4f6b-a0a8-1b87e020e952" CreationDate="2023-08-02T07:12:23.910" UserId="2844" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37602" PostHistoryTypeId="2" PostId="9473" RevisionGUID="0f99d3d3-daff-4ca5-a320-f94a64570ce1" CreationDate="2023-08-02T07:15:48.577" UserId="458" Text="Crate used:- https://github.com/paritytech/trie&#xD;&#xA;```&#xD;&#xA;#[test]&#xD;&#xA;fn test_two_assets_memory_db() {&#xD;&#xA;	let mut memdb = MemoryDB::&lt;BlakeTwo256&gt;::new(&amp;[0u8]);&#xD;&#xA;	let mut root = H256::zero();&#xD;&#xA;&#xD;&#xA;	let mut state = TrieDBMutBuilderV1::new(&amp;mut memdb, &amp;mut root).build();&#xD;&#xA;&#xD;&#xA;	let key1 = [1u8;3];&#xD;&#xA;	let data1 = [1u8;2];&#xD;&#xA;	state.insert(key1.as_ref(), &amp;data1).unwrap();&#xD;&#xA;        assert_eq!(state.get(key1.as_ref()).unwrap().unwrap(),data1); //PASSING&#xD;&#xA;	let key2 = [2u8;3];&#xD;&#xA;	let data2 = [2u8;2];&#xD;&#xA;	state.insert(key2.as_ref(), &amp;data2).unwrap();&#xD;&#xA;	assert_eq!(state.get(key1.as_ref()).unwrap().unwrap(),data1); //ERROR:- 'tests::test_two_assets_memory_db' panicked at 'called `Option::unwrap()` on a `None` value.&#xD;&#xA;	state.commit();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The test case test_two_assets_memory_db fails at the line `assert_eq!(state.get(key1.as_ref()).unwrap().unwrap(),data1); `when trying to fetch and assert the data associated with key1 after the second insertion operation. It appears that after the insertion of data associated with key2, the data tied to key1 is either removed or not accessible, leading to the `Option::unwrap()` call on a `None` value, which is causing the test to panic. The state database should ideally support multiple insertions and retrievals; however, in this instance, it fails to retrieve the value associated with key1 after a new key-value pair (key2, data2) has been inserted, could you please help me with this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37604" PostHistoryTypeId="1" PostId="9473" RevisionGUID="0f99d3d3-daff-4ca5-a320-f94a64570ce1" CreationDate="2023-08-02T07:15:48.577" UserId="458" Text="Not able to retrieve value for given key when new key-value pair inserted" ContentLicense="CC BY-SA 4.0" />
  <row Id="37605" PostHistoryTypeId="3" PostId="9473" RevisionGUID="0f99d3d3-daff-4ca5-a320-f94a64570ce1" CreationDate="2023-08-02T07:15:48.577" UserId="458" Text="|substrate-node|trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37606" PostHistoryTypeId="2" PostId="9474" RevisionGUID="df03a7ae-8803-437f-9581-7d63a81bd796" CreationDate="2023-08-02T07:17:32.710" UserId="2762" Text="There is a tutorial in the Substrate Docs that demonstrates how you can deploy a parachain on the Rococo test network: [Acquire a testnet slot][1].&#xD;&#xA;&#xD;&#xA;To update some things, you can get ROC tokens using the new [Polkadot Faucet][2] instead of the element channel.&#xD;&#xA;&#xD;&#xA;And when you have everything ready open a request [here][3] to get your slot on the Rococo chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/&#xD;&#xA;  [2]: https://paritytech.github.io/polkadot-testnet-faucet/&#xD;&#xA;  [3]: https://github.com/paritytech/subport/issues/new?assignees=&amp;labels=Rococo&amp;template=rococo.yaml" ContentLicense="CC BY-SA 4.0" />
  <row Id="37608" PostHistoryTypeId="6" PostId="9472" RevisionGUID="4b65827b-60b4-4763-bc92-b9460b6152d0" CreationDate="2023-08-02T07:17:46.173" UserId="2762" Comment="edited tags" Text="|substrate-node-template|rococo|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37609" PostHistoryTypeId="2" PostId="9475" RevisionGUID="da291c15-211b-4b8f-9548-2b29a8c2bd86" CreationDate="2023-08-02T07:40:20.757" UserId="3317" Text="Every block the `on_initialize` hook is called which checks `ShouldEndSession::should_end_session()`. The `ShouldEndSession` is a configurable and can be implemented to your own needs.&#xD;&#xA;&#xD;&#xA;I found a parachain team which implemented their own pallet to be able to change the session duration: https://github.com/AcalaNetwork/Acala/blob/27a6d5ac1f7481bb4e16b1ea697db7b8e2210c8c/runtime/acala/src/lib.rs#L297-L299&#xD;&#xA;&#xD;&#xA;You could implement something your own where you make it possible to abort a session. In other words, have the session rotate before the end of the duration." ContentLicense="CC BY-SA 4.0" />
  <row Id="37611" PostHistoryTypeId="5" PostId="9460" RevisionGUID="83d53205-6870-468f-b87d-b9483e14d0ad" CreationDate="2023-08-02T07:40:47.910" UserId="194" Comment="added 17 characters in body" Text="For the Trappist we have implemented a custom lockdown mode pallet to pause al the transactions in case is needed. Soon, this pallet will be replaced by the pallets being worked here: https://github.com/paritytech/substrate/pull/12092&#xD;&#xA;&#xD;&#xA;For being able to commit transactions to Trappist just disable the lockdown mode by calling the extrinsic `lockdownMode.deactivateLockdownMode()` from the sudo tab this requires a privileged origin to be executed).&#xD;&#xA;&#xD;&#xA;Anyway i will update the Trappist documentation to let the users to know how to disable this lockdown mode or maybe changing the GenesisConfig for the local setup so it starts with the lockdown mode deactivated." ContentLicense="CC BY-SA 4.0" />
  <row Id="37612" PostHistoryTypeId="5" PostId="9474" RevisionGUID="e3facf7a-b813-4c06-9514-11127da1f6dd" CreationDate="2023-08-02T07:43:35.300" UserId="2762" Comment="added 1472 characters in body" Text="If you have build a chain using the `substrate-node-template` you have a solo chain, you have to integrate [Cumulus][1] to convert your Substrate FRAME runtime into a Parachain runtime.&#xD;&#xA;&#xD;&#xA;There is a tutorial on the Substrate docs about it: [Convert a solo chain][2], personally is not my favourite tutorial there, is worth reading to understand the theory but not very practical.&#xD;&#xA;&#xD;&#xA;If you are in a early stage I suggest you to start with the [Substrate Cumulus Parachain Template][3]. &#xD;&#xA;&#xD;&#xA;&gt; This project is originally a fork of the Substrate Node Template&#xD;&#xA;&gt; modified to include dependencies required for registering this node as&#xD;&#xA;&gt; a parathread or parachain to a relay chain.&#xD;&#xA;&#xD;&#xA;Or you can use it as a reference to check what you need to add into your chain, another good resource is the [Cumulus Overview][4]. &#xD;&#xA;&#xD;&#xA;The community shared more resources before in this StackExchange question: [What is the best tutorial to convert a substrate-based standalone chain to a parachain?][5]&#xD;&#xA;&#xD;&#xA;**Deploy on Rococo**&#xD;&#xA;&#xD;&#xA;Once you have your parachain, there is a tutorial in the Substrate Docs that demonstrates how you can deploy a parachain on the Rococo test network: [Acquire a testnet slot][6].&#xD;&#xA;&#xD;&#xA;To update some things, you can get ROC tokens using the new [Polkadot Faucet][7] instead of the element channel.&#xD;&#xA;&#xD;&#xA;And when you have everything ready open a request [here][8] to get your slot on the Rococo chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus&#xD;&#xA;  [2]: https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [4]: https://github.com/paritytech/cumulus/blob/master/docs/overview.md&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/3/what-is-the-best-tutorial-to-convert-a-substrate-based-standalone-chain-to-a-par&#xD;&#xA;  [6]: https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/&#xD;&#xA;  [7]: https://paritytech.github.io/polkadot-testnet-faucet/&#xD;&#xA;  [8]: https://github.com/paritytech/subport/issues/new?assignees=&amp;labels=Rococo&amp;template=rococo.yaml" ContentLicense="CC BY-SA 4.0" />
  <row Id="37613" PostHistoryTypeId="5" PostId="9475" RevisionGUID="538e27f1-abde-49d1-b1bd-1bc15938cf17" CreationDate="2023-08-02T07:48:00.677" UserId="3317" Comment="added 98 characters in body" Text="The `on_initialize` hook of pallet-session checks `ShouldEndSession::should_end_session()` ([ref][1]). The `ShouldEndSession` is a configurable and can be implemented to your own needs.&#xD;&#xA;&#xD;&#xA;A parachain created a pallet to be able to change the session duration: https://github.com/AcalaNetwork/Acala/blob/27a6d5ac1f7481bb4e16b1ea697db7b8e2210c8c/runtime/acala/src/lib.rs#L297-L299&#xD;&#xA;&#xD;&#xA;You could implement something your own where you make it possible to abort a session. In other words, have the session rotate before the end of the duration.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/b05a9d35a386a2f6c4694d75a3806947fcd06671/frame/session/src/lib.rs#L564" ContentLicense="CC BY-SA 4.0" />
  <row Id="37614" PostHistoryTypeId="5" PostId="9460" RevisionGUID="cbe38867-90c7-4841-8e2c-462a395c50ef" CreationDate="2023-08-02T07:51:35.663" UserId="194" Comment="deleted 4 characters in body" Text="For Trappist we have implemented a custom lockdown mode pallet to pause al the transactions in case is needed. Soon, this pallet will be replaced by the pallets being worked here: https://github.com/paritytech/substrate/pull/12092&#xD;&#xA;&#xD;&#xA;For being able to commit transactions to Trappist just disable the lockdown mode by calling the extrinsic `lockdownMode.deactivateLockdownMode()` from the sudo tab this requires a privileged origin to be executed).&#xD;&#xA;&#xD;&#xA;Anyway i will update the Trappist documentation to let the users to know how to disable this lockdown mode or maybe changing the GenesisConfig for the local setup so it starts with the lockdown mode deactivated." ContentLicense="CC BY-SA 4.0" />
  <row Id="37615" PostHistoryTypeId="2" PostId="9476" RevisionGUID="dff94892-1338-4ae0-9d0b-d0513e04abc0" CreationDate="2023-08-02T08:22:19.663" UserId="4435" Text="I added `status?.type !== 'InBlock'` like this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;} else if (section + &quot;:&quot; + method === 'system:ExtrinsicSuccess' &amp;&amp; status?.type !== 'InBlock' ) {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I fixed it." ContentLicense="CC BY-SA 4.0" />
  <row Id="37617" PostHistoryTypeId="2" PostId="9477" RevisionGUID="bd77b597-4015-446e-90ad-c838edca4bd0" CreationDate="2023-08-02T10:27:18.273" UserId="4440" Text="I opened browser with http://somedomen.com (not https:// like earlier) and now it works fine with -**ws**-port. Too bad that substrate doesn't support --**wss**-port, becouse I still dont know how to make it work with ssl" ContentLicense="CC BY-SA 4.0" />
  <row Id="37619" PostHistoryTypeId="2" PostId="9478" RevisionGUID="b6dec3b5-a569-495d-bef0-9e9ad202e29e" CreationDate="2023-08-02T12:47:16.193" UserId="560" Text="Solved it:&#xD;&#xA;```rust&#xD;&#xA;  let call = nodetemplate::runtime_types::node_template_runtime::RuntimeCall::System(&#xD;&#xA;        SystemCall::set_code {&#xD;&#xA;            code: wasm_binary.expect(&quot;could not decode wasm binary&quot;).into(),&#xD;&#xA;        },&#xD;&#xA; let sudo_tx = nodetemplate::tx()&#xD;&#xA;        .sudo()&#xD;&#xA;        .sudo_unchecked_weight(call, weight);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Full code can be found here:   &#xD;&#xA;https://github.com/uptest-sc/submit-runtime-upgrade/blob/main/src/main.rs  " ContentLicense="CC BY-SA 4.0" />
  <row Id="37621" PostHistoryTypeId="2" PostId="9479" RevisionGUID="90abba18-4f09-4316-8df5-a3ff2e9347dd" CreationDate="2023-08-02T14:31:37.050" UserId="4503" Text="ran into the same issue using v3.0 cargo contract ,&#xD;&#xA;updating cargo contract to v4 solved it. Use&#xD;&#xA;&#xD;&#xA;```cargo install --git https://github.com/paritytech/cargo-contract cargo-contract --force```&#xD;&#xA;&#xD;&#xA;to update" ContentLicense="CC BY-SA 4.0" />
  <row Id="37623" PostHistoryTypeId="52" PostId="9472" RevisionGUID="d12949b8-a112-4b24-967d-ee7e313cf5bd" CreationDate="2023-08-02T15:15:06.453" />
  <row Id="37624" PostHistoryTypeId="2" PostId="9480" RevisionGUID="23a7d9a7-b76d-4454-bdcc-973336356068" CreationDate="2023-08-02T16:49:06.393" UserId="2844" Text="I want to get collection data using collectionId 1&#xD;&#xA;the collection was created on the on the node already with the id 1. How can I do this is substrate? Any CLI tools?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37626" PostHistoryTypeId="1" PostId="9480" RevisionGUID="23a7d9a7-b76d-4454-bdcc-973336356068" CreationDate="2023-08-02T16:49:06.393" UserId="2844" Text="how to query in the substrate node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37627" PostHistoryTypeId="3" PostId="9480" RevisionGUID="23a7d9a7-b76d-4454-bdcc-973336356068" CreationDate="2023-08-02T16:49:06.393" UserId="2844" Text="|substrate-node-template|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37628" PostHistoryTypeId="2" PostId="9481" RevisionGUID="39fd7829-c519-4263-89f7-5a38e8924abf" CreationDate="2023-08-02T16:52:59.710" UserId="29" Text="You can use:&#xD;&#xA;- [subxt](https://github.com/paritytech/subxt) (Rust)&#xD;&#xA;- [polkadotJs API](https://polkadot.js.org/docs/api) (JavaScript)&#xD;&#xA;&#xD;&#xA;If you do **not** want to query programmatically, you can use:&#xD;&#xA;- https://polkadot.js.org/apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="37630" PostHistoryTypeId="2" PostId="9482" RevisionGUID="10dbf0da-3654-4020-908b-86c14ff7fb71" CreationDate="2023-08-02T16:58:37.537" UserId="2844" Text="I am using [`substrate parachain template`](https://github.com/substrate-developer-hub/substrate-parachain-template). I run node using `./target/release/parachain-template-node --dev` command. No block are producing. Should I need to add `pallet-grandpa` as well?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8NoiI.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="37632" PostHistoryTypeId="1" PostId="9482" RevisionGUID="10dbf0da-3654-4020-908b-86c14ff7fb71" CreationDate="2023-08-02T16:58:37.537" UserId="2844" Text="No block are producing in substrate parachain template" ContentLicense="CC BY-SA 4.0" />
  <row Id="37633" PostHistoryTypeId="3" PostId="9482" RevisionGUID="10dbf0da-3654-4020-908b-86c14ff7fb71" CreationDate="2023-08-02T16:58:37.537" UserId="2844" Text="|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37635" PostHistoryTypeId="2" PostId="9483" RevisionGUID="d05519d9-cf72-4d99-bddb-0e965afc51d7" CreationDate="2023-08-02T17:45:48.647" UserId="29" Text="Running the parachain-template is different than running the substrate-node-template.&#xD;&#xA;&#xD;&#xA;In order to run the parachain-template, you need to follow this tutorial:&#xD;&#xA;- https://docs.substrate.io/tutorials/build-a-parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="37637" PostHistoryTypeId="2" PostId="9484" RevisionGUID="2115d57d-b659-4485-bfa9-3f77a604af84" CreationDate="2023-08-02T17:46:08.370" UserId="3142" Text="I have looked at the substrate node template and it shows how to enable Warp sync for Grandpa but I couldn't find an example with Aura.  What do I need to add/modify if it's at all possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37639" PostHistoryTypeId="1" PostId="9484" RevisionGUID="2115d57d-b659-4485-bfa9-3f77a604af84" CreationDate="2023-08-02T17:46:08.370" UserId="3142" Text="How to enable warp sync with Aura consensus?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37640" PostHistoryTypeId="3" PostId="9484" RevisionGUID="2115d57d-b659-4485-bfa9-3f77a604af84" CreationDate="2023-08-02T17:46:08.370" UserId="3142" Text="|aura|sync|warp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37641" PostHistoryTypeId="50" PostId="7419" RevisionGUID="87d2f045-6de4-4f2c-8cfc-ccbae3296d48" CreationDate="2023-08-02T18:01:20.160" UserId="-1" />
  <row Id="37642" PostHistoryTypeId="50" PostId="9088" RevisionGUID="71a2773b-3b4d-4f62-ad71-71037f04dfe5" CreationDate="2023-08-02T19:07:00.847" UserId="-1" />
  <row Id="37643" PostHistoryTypeId="2" PostId="9485" RevisionGUID="6dada396-367c-42eb-a3b1-e6f5b2a774d9" CreationDate="2023-08-03T01:09:36.677" UserId="251" Text="I think the current limitation lies in the size.&#xD;&#xA;&#xD;&#xA;If I understand correctly, the previous discussion suggested making the encoded error 2 bytes in size and adding support for nested types.&#xD;&#xA;&#xD;&#xA;You can nest specific errors, but not the generic one.&#xD;&#xA;&#xD;&#xA;If you introduce generics here, what will be the impact on size...?&#xD;&#xA;&#xD;&#xA;For more details, please refer to https://github.com/paritytech/substrate/issues/8081.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37645" PostHistoryTypeId="2" PostId="9486" RevisionGUID="ac7ffd9b-4053-4d5f-b385-7836678b3047" CreationDate="2023-08-03T03:14:22.583" UserId="29" Text="While the PolkadotJs issue is being resolved (see comments), you can use cargo contract cli to build and deploy:&#xD;&#xA;- https://use.ink/cargo-contract-cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="37647" PostHistoryTypeId="5" PostId="9486" RevisionGUID="d9078fe6-beee-45e2-b92b-fd8824e7b4f7" CreationDate="2023-08-03T03:21:12.807" UserId="29" Comment="added 20 characters in body" Text="While the PolkadotJs issue is being resolved (see comments), you can use cargo contract cli to build, upload, instantiate, and call:&#xD;&#xA;- https://use.ink/cargo-contract-cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="37648" PostHistoryTypeId="2" PostId="9487" RevisionGUID="3dc57a40-9a46-4d1b-a9fd-aa8401bca7b5" CreationDate="2023-08-03T03:44:04.200" UserId="2844" Text="I am trying `Simulate Parachain` tutorial, in [configure the test network settings](https://docs.substrate.io/test/simulate-parachains/#configure-the-test-network-settings), there is step to create a configuration file `config.toml`. Can we create that file in any directory or should we need to include inside polkadot or parachain-template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37650" PostHistoryTypeId="1" PostId="9487" RevisionGUID="3dc57a40-9a46-4d1b-a9fd-aa8401bca7b5" CreationDate="2023-08-03T03:44:04.200" UserId="2844" Text="Configure test network file" ContentLicense="CC BY-SA 4.0" />
  <row Id="37651" PostHistoryTypeId="3" PostId="9487" RevisionGUID="3dc57a40-9a46-4d1b-a9fd-aa8401bca7b5" CreationDate="2023-08-03T03:44:04.200" UserId="2844" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37652" PostHistoryTypeId="2" PostId="9488" RevisionGUID="14074a60-2318-4d72-92df-5fcdab9066aa" CreationDate="2023-08-03T06:38:09.257" UserId="309" Text="I am using React+Typescript and trying to retrieve data from a struc using a query subscription. I first tried the following in order to check that I'm retrieving the right data:&#xD;&#xA;&#xD;&#xA;    api.query.rolesModule.requestedRoles(address, (data: Codec) =&gt; {&#xD;&#xA;          let data0 = data.toString();&#xD;&#xA;          console.log('In session:' + data0);&#xD;&#xA;        }&#xD;&#xA;the string returned is the following:&#xD;&#xA;&#xD;&#xA;    In session:{&quot;accountId&quot;:&quot;5D1nJ8*************uc5e3AuB&quot;,&quot;role&quot;:&quot;SELLER&quot;,&quot;block&quot;:2600,&quot;proposalHash&quot;:&quot;0xf0e4d3819cad58b9b7a521968202192601654106b063ed550d45e949cd0f9eec&quot;,&quot;proposalIndex&quot;:0,&quot;sessionClosed&quot;:false,&quot;approved&quot;:false}&#xD;&#xA;&#xD;&#xA;Now what I really want are the `role` and `block` fields.&#xD;&#xA;I tried the following:&#xD;&#xA;&#xD;&#xA;     api.query.rolesModule.requestedRoles(&#xD;&#xA;          add,&#xD;&#xA;          ({ block, role }: { block: number; role: string }) =&gt; {&#xD;&#xA;            let data0 = block;&#xD;&#xA;            let data1 = role;&#xD;&#xA;            console.log('In session:' + data0 + ' &amp; ' + data1);&#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;but both results are undefined (which is not actually the case).&#xD;&#xA;I did my best to emulate the example in the polkadot.js API doc, and had success in the following case to recover the free balance:&#xD;&#xA;&#xD;&#xA;     api.query.system.account(address, ({ data: free }: { data: { free: BN } }) =&gt; {&#xD;&#xA;          let { free: balance1 } = free;&#xD;&#xA;&#xD;&#xA;What am I missing?&#xD;&#xA;thanks in advance&#xD;&#xA;Kazu&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37654" PostHistoryTypeId="1" PostId="9488" RevisionGUID="14074a60-2318-4d72-92df-5fcdab9066aa" CreationDate="2023-08-03T06:38:09.257" UserId="309" Text="subscriptions with parameters in polkadot.js api" ContentLicense="CC BY-SA 4.0" />
  <row Id="37655" PostHistoryTypeId="3" PostId="9488" RevisionGUID="14074a60-2318-4d72-92df-5fcdab9066aa" CreationDate="2023-08-03T06:38:09.257" UserId="309" Text="|polkadot-js|api|typescript|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37656" PostHistoryTypeId="5" PostId="9488" RevisionGUID="4a1a1a1f-dbd8-4d39-a270-2cfbda17dcd4" CreationDate="2023-08-03T06:51:55.630" UserId="309" Comment="added 4 characters in body" Text="I am using React+Typescript and trying to retrieve data from a struc using a query subscription. I first tried the following in order to check that I'm retrieving the right data:&#xD;&#xA;&#xD;&#xA;    api.query.rolesModule.requestedRoles(address, (data: Codec) =&gt; {&#xD;&#xA;          let data0 = data.toString();&#xD;&#xA;          console.log('In session:' + data0);&#xD;&#xA;        }&#xD;&#xA;the string returned is the following:&#xD;&#xA;&#xD;&#xA;    In session:{&quot;accountId&quot;:&quot;5D1nJ8*************uc5e3AuB&quot;,&quot;role&quot;:&quot;SELLER&quot;,&quot;block&quot;:2600,&quot;proposalHash&quot;:&quot;0xf0e4d3819cad58b9b7a521968202192601654106b063ed550d45e949cd0f9eec&quot;,&quot;proposalIndex&quot;:0,&quot;sessionClosed&quot;:false,&quot;approved&quot;:false}&#xD;&#xA;&#xD;&#xA;Now what I really want are the `role` and `block` fields.&#xD;&#xA;I tried the following:&#xD;&#xA;&#xD;&#xA;     api.query.rolesModule.requestedRoles(&#xD;&#xA;          address,&#xD;&#xA;          ({ block, role }: { block: number; role: string }) =&gt; {&#xD;&#xA;            let data0 = block;&#xD;&#xA;            let data1 = role;&#xD;&#xA;            console.log('In session:' + data0 + ' &amp; ' + data1);&#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;but both results are undefined (which is not actually the case).&#xD;&#xA;I did my best to emulate the example in the polkadot.js API doc, and had success in the following case to recover the free balance:&#xD;&#xA;&#xD;&#xA;     api.query.system.account(address, ({ data: free }: { data: { free: BN } }) =&gt; {&#xD;&#xA;          let { free: balance1 } = free;&#xD;&#xA;&#xD;&#xA;What am I missing?&#xD;&#xA;thanks in advance&#xD;&#xA;Kazu&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37657" PostHistoryTypeId="5" PostId="9488" RevisionGUID="78e3acce-21c9-4fb6-a506-f9b533ce3690" CreationDate="2023-08-03T07:11:46.760" UserId="309" Comment="added 560 characters in body" Text="I am using React+Typescript and trying to retrieve data from a struc using a query subscription. I first tried the following in order to check that I'm retrieving the right data:&#xD;&#xA;&#xD;&#xA;    api.query.rolesModule.requestedRoles(address, (data: Codec) =&gt; {&#xD;&#xA;          let data0 = data.toString();&#xD;&#xA;          console.log('In session:' + data0);&#xD;&#xA;        }&#xD;&#xA;the string returned is the following:&#xD;&#xA;&#xD;&#xA;    In session:{&quot;accountId&quot;:&quot;5D1nJ8*************uc5e3AuB&quot;,&quot;role&quot;:&quot;SELLER&quot;,&quot;block&quot;:2600,&quot;proposalHash&quot;:&quot;0xf0e4d3819cad58b9b7a521968202192601654106b063ed550d45e949cd0f9eec&quot;,&quot;proposalIndex&quot;:0,&quot;sessionClosed&quot;:false,&quot;approved&quot;:false}&#xD;&#xA;&#xD;&#xA;Now what I really want are the `role` and `block` fields.&#xD;&#xA;I tried the following:&#xD;&#xA;&#xD;&#xA;     api.query.rolesModule.requestedRoles(&#xD;&#xA;          address,&#xD;&#xA;          ({ block, role }: { block: number; role: string }) =&gt; {&#xD;&#xA;            let data0 = block;&#xD;&#xA;            let data1 = role;&#xD;&#xA;            console.log('In session:' + data0 + ' &amp; ' + data1);&#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;but both results are undefined (which is not actually the case).&#xD;&#xA;I did my best to emulate the example in the polkadot.js API doc, and had success in the following case to recover the free balance:&#xD;&#xA;&#xD;&#xA;     api.query.system.account(address, ({ data: free }: { data: { free: BN } }) =&gt; {&#xD;&#xA;          let { free: balance1 } = free;&#xD;&#xA;&#xD;&#xA;What am I missing?&#xD;&#xA;&#xD;&#xA;**Edit1:**&#xD;&#xA;This is the storage I am trying to get data from:&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn get_requested_role)]&#xD;&#xA;    	pub type RequestedRoles&lt;T: Config&gt; =&#xD;&#xA;    		StorageMap&lt;_, Twox64Concat, AccountIdOf&lt;T&gt;, Proposal&lt;T&gt;, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;with proposal being:&#xD;&#xA;&#xD;&#xA;    pub struct Proposal&lt;T: Config&gt;{&#xD;&#xA;    	pub account_id: T::AccountId,&#xD;&#xA;    	pub role: Option&lt;Accounts&gt;,&#xD;&#xA;    	pub block: BlockNumberOf&lt;T&gt;,&#xD;&#xA;    	pub proposal_hash: T::Hash,&#xD;&#xA;    	pub proposal_index: u32,&#xD;&#xA;    	pub session_closed: bool, &#xD;&#xA;    	pub approved: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;thanks in advance&#xD;&#xA;Kazu&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37658" PostHistoryTypeId="50" PostId="9127" RevisionGUID="29ceae96-a415-461d-92b3-1b3b386ea748" CreationDate="2023-08-03T08:04:15.560" UserId="-1" />
  <row Id="37659" PostHistoryTypeId="2" PostId="9489" RevisionGUID="71788069-ca4b-4ad8-9538-662320a165a5" CreationDate="2023-08-03T08:33:23.017" UserId="2762" Text="You can call `toHuman()` it returns Human-parsable JSON structure with values formatted as per the settings. &#xD;&#xA;&#xD;&#xA;This example will return you the values you are trying to get.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;api.query.templateModule.requestedRoles(address, (data: any) =&gt; {&#xD;&#xA;        let data0 = data.toHuman();&#xD;&#xA;        console.log(data0.role);&#xD;&#xA;        console.log(data0.block);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`toHuman()` returns an any, if you want to have it all typed I suggest you create a parse function that get this any input an returns your custom type `Proposal`" ContentLicense="CC BY-SA 4.0" />
  <row Id="37661" PostHistoryTypeId="2" PostId="9490" RevisionGUID="f739ed1c-5378-447b-8fcd-b446079c6baa" CreationDate="2023-08-03T08:37:35.653" UserId="2762" Text="You can store this configuration file wherever you want, then when you run the zombienet program you can specify the route, for example: &#xD;&#xA;&#xD;&#xA;    ./zombienet-linux -p native spawn ./your-dir/config.toml&#xD;&#xA;&#xD;&#xA;As an example check this repository: [Trappist][1] where is has a folder zombientet with all the .toml configurations files, separate from the runtime files.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/trappist" ContentLicense="CC BY-SA 4.0" />
  <row Id="37663" PostHistoryTypeId="2" PostId="9491" RevisionGUID="ce98769d-e6ad-45e8-873e-32a95bb8c869" CreationDate="2023-08-03T09:48:33.037" UserId="2473" Text="I found the `pallet-asset-tx-payment` pretty cool and am planning to add this in my runtime. But my concern is the `SignedExtension`. Adding the `ChargeAssetTxPayment` in the `SignedExtra` portion will make it different.&#xD;&#xA;&#xD;&#xA;Will this affect the 3rd party apps who are already interacting with my chain?  &#xD;&#xA;What will 3rd party applications need, to be able to create valid transactions?  &#xD;&#xA;Would they need to configure the `SignedExtensions` when instantiating the polkadot.js API instance? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I do not know if this is the best place to ask, but I'm coming from an [answer of another question][1].&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/8051/2473" ContentLicense="CC BY-SA 4.0" />
  <row Id="37665" PostHistoryTypeId="1" PostId="9491" RevisionGUID="ce98769d-e6ad-45e8-873e-32a95bb8c869" CreationDate="2023-08-03T09:48:33.037" UserId="2473" Text="How do third party apps handle paying transaction fees for chains using `pallet-asset-tx-payment`" ContentLicense="CC BY-SA 4.0" />
  <row Id="37666" PostHistoryTypeId="3" PostId="9491" RevisionGUID="ce98769d-e6ad-45e8-873e-32a95bb8c869" CreationDate="2023-08-03T09:48:33.037" UserId="2473" Text="|api|signed-extensions|pallet-asset-tx-payment|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37667" PostHistoryTypeId="2" PostId="9492" RevisionGUID="8936eb15-e784-471d-aa6a-3789a51c9ecb" CreationDate="2023-08-03T11:12:49.513" UserId="2844" Text="I am trying to Configure the test network settings. I am following this [tutorial](https://docs.substrate.io/test/simulate-parachains/). &#xD;&#xA;&#xD;&#xA;This is my `config.toml` file&#xD;&#xA;&#xD;&#xA;    [relaychain]&#xD;&#xA;    &#xD;&#xA;    default_command = &quot;./binaries/polkadot/polkadot&quot;&#xD;&#xA;    default_args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;    &#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;alice&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;bob&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;charlie&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;dave&quot;&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1000&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;    [parachains.collator]&#xD;&#xA;    name = &quot;parachain-A-1000-collator01&quot;&#xD;&#xA;    command = &quot;./binaries/parachain-template/parachain-template-node&quot;&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1001&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;    [parachains.collator]&#xD;&#xA;    name = &quot;parachain-B-1001-collator01&quot;&#xD;&#xA;    command = &quot;./binaries/parachain-template/parachain-template-node&quot;&#xD;&#xA;&#xD;&#xA;When I start test network using `./zombienet-macos spawn config.toml -p native` command, I get this error,&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;    ┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;    │ Pod                │ alice                                                                                              │&#xD;&#xA;    ├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;    │ Status             │ Error                                                                                              │&#xD;&#xA;    ├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;    │ Message            │ Process: 85006, for node: alice dies.                                                              │&#xD;&#xA;    ├────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤&#xD;&#xA;    │ Output             │ error: unexpected argument '--unsafe-ws-external' found                                            │&#xD;&#xA;    │                    │                                                                                                    │&#xD;&#xA;    │                    │   tip: a similar argument ex                                                                       │&#xD;&#xA;    │                    │ ists: '--unsafe-rpc-external'                                                                      │&#xD;&#xA;    │                    │                                                                                                    │&#xD;&#xA;    │                    │ Usage: polkadot --name &lt;NAME&gt; --rpc-cors &lt;ORIGINS&gt; --unsafe                                        │&#xD;&#xA;    │                    │ -rpc-external --rpc-methods &lt;METHOD SET&gt; &lt;--chain &lt;CHAIN_SPEC&gt;|--dev|--base-path &lt;PATH&gt;|--         │&#xD;&#xA;    │                    │ log &lt;LOG_PATTERN&gt;...|--detailed-log-output|--disable-log-color|--enable-log-reloading|--tr         │&#xD;&#xA;    │                    │ acing-targets &lt;TARGETS&gt;|--tracing-receiver &lt;RECEIVER&gt;&gt;                                             │&#xD;&#xA;    │                    │                                                                                                    │&#xD;&#xA;    │                    │ For more information, try '--help'                                                                 │&#xD;&#xA;    │                    │ .                                                                                                  │&#xD;&#xA;    │                    │                                                                                                    │&#xD;&#xA;    └────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;    &#xD;&#xA;     Error:  	 Error&#xD;&#xA;    &#xD;&#xA;    ┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;    │ Node'              │ /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-63376fee33fc64fdc81d7d3b1cdd31b5_-82182-4… │&#xD;&#xA;    │ s logs:            │                                                                                                    │&#xD;&#xA;    │ m                  │                                                                                                    │&#xD;&#xA;    └────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;    &#xD;&#xA;    UnhandledRejection:  	 Error: Command failed with exit code 1: bash -c kill -9 85006&#xD;&#xA;    bash: line 0: kill: (85006) - No such process&#xD;&#xA;    &#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air ~ % ./zombienet-macos spawn config.toml -p native&#xD;&#xA;&#xD;&#xA;Someone help me what is this error?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/x6ABK.jpg&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37669" PostHistoryTypeId="1" PostId="9492" RevisionGUID="8936eb15-e784-471d-aa6a-3789a51c9ecb" CreationDate="2023-08-03T11:12:49.513" UserId="2844" Text="Can't configure the test network settings" ContentLicense="CC BY-SA 4.0" />
  <row Id="37670" PostHistoryTypeId="3" PostId="9492" RevisionGUID="8936eb15-e784-471d-aa6a-3789a51c9ecb" CreationDate="2023-08-03T11:12:49.513" UserId="2844" Text="|substrate-node-template|substrate-parachain-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37671" PostHistoryTypeId="6" PostId="9492" RevisionGUID="d24aa7a8-8fa5-498d-b74d-83912c372d39" CreationDate="2023-08-03T11:20:14.283" UserId="279" Comment="add zombienet tag" Text="|substrate-node-template|substrate-parachain-template|substrate-node|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37672" PostHistoryTypeId="24" PostId="9492" RevisionGUID="d24aa7a8-8fa5-498d-b74d-83912c372d39" CreationDate="2023-08-03T11:20:14.283" Comment="Proposed by 279 approved by 2844 edit id of 515" ContentLicense="CC BY-SA 4.0" />
  <row Id="37673" PostHistoryTypeId="5" PostId="9492" RevisionGUID="dc0ed5f5-1d9a-43fd-878a-3890911f4c29" CreationDate="2023-08-03T11:50:13.603" UserId="2844" Comment="deleted 3162 characters in body" Text="I am trying to Configure the test network settings. I am following this [tutorial](https://docs.substrate.io/test/simulate-parachains/). &#xD;&#xA;&#xD;&#xA;This is my `config.toml` file&#xD;&#xA;&#xD;&#xA;    [relaychain]&#xD;&#xA;    &#xD;&#xA;    default_command = &quot;./binaries/polkadot/polkadot&quot;&#xD;&#xA;    default_args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;    &#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;alice&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;bob&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;charlie&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;dave&quot;&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1000&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;    [parachains.collator]&#xD;&#xA;    name = &quot;parachain-A-1000-collator01&quot;&#xD;&#xA;    command = &quot;./binaries/parachain-template/parachain-template-node&quot;&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1001&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;    [parachains.collator]&#xD;&#xA;    name = &quot;parachain-B-1001-collator01&quot;&#xD;&#xA;    command = &quot;./binaries/parachain-template/parachain-template-node&quot;&#xD;&#xA;&#xD;&#xA;When I start test network using `./zombienet-macos spawn config.toml -p native` command, network is started but I get this warning,&#xD;&#xA;&#xD;&#xA;    (node:28868) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time&#xD;&#xA;    (Use `zombienet-macos --trace-warnings ...` to show where the warning was created)&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:50697/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:50705/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:50701/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:50709/metrics&#xD;&#xA;&#xD;&#xA;Why I am getting this warning? How to fix this or should I ignore?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37674" PostHistoryTypeId="5" PostId="9492" RevisionGUID="cfa9467b-26c4-4484-8aab-a531d4bc4e1a" CreationDate="2023-08-03T11:59:28.680" UserId="2844" Comment="added 1674 characters in body" Text="I am trying to Configure the test network settings. I am following this [tutorial](https://docs.substrate.io/test/simulate-parachains/). &#xD;&#xA;&#xD;&#xA;This is my `config.toml` file&#xD;&#xA;&#xD;&#xA;    [relaychain]&#xD;&#xA;    &#xD;&#xA;    default_command = &quot;./binaries/polkadot/polkadot&quot;&#xD;&#xA;    default_args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;    &#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;alice&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;bob&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;charlie&quot;&#xD;&#xA;    &#xD;&#xA;    [[relaychain.nodes]]&#xD;&#xA;    name = &quot;dave&quot;&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1000&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;    [parachains.collator]&#xD;&#xA;    name = &quot;parachain-A-1000-collator01&quot;&#xD;&#xA;    command = &quot;./binaries/parachain-template/parachain-template-node&quot;&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1001&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;    [parachains.collator]&#xD;&#xA;    name = &quot;parachain-B-1001-collator01&quot;&#xD;&#xA;    command = &quot;./binaries/parachain-template/parachain-template-node&quot;&#xD;&#xA;&#xD;&#xA;When I start test network using `./zombienet-macos spawn config.toml -p native` command, network is started but I get this warning,&#xD;&#xA;&#xD;&#xA;    (node:28868) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time&#xD;&#xA;    (Use `zombienet-macos --trace-warnings ...` to show where the warning was created)&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:50697/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:50705/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:50701/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:50709/metrics&#xD;&#xA;&#xD;&#xA;Why I am getting this warning? How to fix this or should I ignore?&#xD;&#xA;&#xD;&#xA;and after some time it terminate automatically with this error,&#xD;&#xA;&#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:52347/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:52343/metrics&#xD;&#xA;    &#xD;&#xA;    	 Error:  &#xD;&#xA;    		 Timeout(300), &quot;getting desired metric value 1 within 300 secs&quot;.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	 Error:  &#xD;&#xA;    		 Timeout(300), &quot;getting desired metric value 1 within 300 secs&quot;.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	 Error:  &#xD;&#xA;    		 Timeout(300), &quot;getting desired metric value 1 within 300 secs&quot;.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	 Error:  &#xD;&#xA;    		 Timeout(300), &quot;getting desired metric value 1 within 300 secs&quot;.&#xD;&#xA;    &#xD;&#xA;    Error:  	 Error: At least one of the nodes fails to start&#xD;&#xA;    &#xD;&#xA;    undefined&#xD;&#xA;    ┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;    │ Node'              │ /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-d3059dd228663607be58ce72a2009ae4_-34898-V… │&#xD;&#xA;    │ s logs:            │                                                                                                    │&#xD;&#xA;    │ m                  │                                                                                                    │&#xD;&#xA;    └────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:52335/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:52339/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:52347/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:52343/metrics&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air ~ % &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37675" PostHistoryTypeId="2" PostId="9493" RevisionGUID="954d1a69-4722-4d86-9a8d-2a18b4d158bb" CreationDate="2023-08-03T12:40:02.990" UserId="3317" Text="[Warp sync protocol][1] works thanks to the Grandpa protocol. Without Grandpa it is not possible.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://spec.polkadot.network/chap-sync#sect-sync-warp" ContentLicense="CC BY-SA 4.0" />
  <row Id="37677" PostHistoryTypeId="5" PostId="9485" RevisionGUID="e25c49e6-0c36-45c6-bdbd-6f5ca76d8608" CreationDate="2023-08-03T12:41:51.040" UserId="251" Comment="deleted 2 characters in body" Text="I think the current limitation lies in the size.&#xD;&#xA;&#xD;&#xA;If I remember correctly, the previous discussion suggested making the encoded error 2 bytes in size and adding support for nested types.&#xD;&#xA;&#xD;&#xA;You can nest specific errors, but not the generic one.&#xD;&#xA;&#xD;&#xA;If you introduce generics here, what will be the impact on size...?&#xD;&#xA;&#xD;&#xA;For more details, please refer to https://github.com/paritytech/substrate/issues/8081.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37678" PostHistoryTypeId="2" PostId="9494" RevisionGUID="d049b452-42cd-4377-b251-82f3c3e75f79" CreationDate="2023-08-03T12:57:51.057" UserId="3317" Text="By looking at [Transaction Construction and Signing][1] you'll see that nothing changes for 3rd party apps. The logic that will include the signer to pay for the transaction with an asset all happens on chain.&#xD;&#xA;&#xD;&#xA;The point that is made in the section [&quot;Polkadot-js/apps sidenote&quot;][2] is that Polkadot JS can't read this `SignedExtension` by itself (i.e. by looking at the metadata of the runtime).&#xD;&#xA;&#xD;&#xA;&gt;Therfore you need to manually add it to the polkadot-js/api type registry&#xD;&#xA;&#xD;&#xA;-so that 3rd party apps/users, using Polkadot JS, can read e.g. events properly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/build-transaction-construction&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/3752/how-to-pay-transaction-fees-using-the-custom-token-created-by-using-pallet-asset/8051#8051" ContentLicense="CC BY-SA 4.0" />
  <row Id="37680" PostHistoryTypeId="2" PostId="9495" RevisionGUID="c5e4c694-0562-4dab-bf0d-5da127810071" CreationDate="2023-08-03T13:19:29.993" UserId="2844" Text="I am preparing local relay chain from [this tutorial](https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/#start-the-relay-chain-node). Configure polkadot and added `raw-local-chainspec.json` file but while running first validator, it gives this error.&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air polkadot % ./target/release/polkadot \&#xD;&#xA;    --alice \&#xD;&#xA;    --validator \&#xD;&#xA;    --base-path /tmp/relay/alice \&#xD;&#xA;    --chain /tmp/raw-local-chainspec.json \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9944&#xD;&#xA;    error: unexpected argument '--ws-port' found&#xD;&#xA;    &#xD;&#xA;      tip: a similar argument exists: '--workers-path'&#xD;&#xA;    &#xD;&#xA;    Usage: polkadot --alice --validator --port &lt;PORT&gt; --workers-path &lt;PATH&gt; &lt;--chain &lt;CHAIN_SPEC&gt;|--dev|--base-path &lt;PATH&gt;|--log &lt;LOG_PATTERN&gt;...|--detailed-log-output|--disable-log-color|--enable-log-reloading|--tracing-targets &lt;TARGETS&gt;|--tracing-receiver &lt;RECEIVER&gt;&gt;&#xD;&#xA;    &#xD;&#xA;    For more information, try '--help'.&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air polkadot % " ContentLicense="CC BY-SA 4.0" />
  <row Id="37682" PostHistoryTypeId="1" PostId="9495" RevisionGUID="c5e4c694-0562-4dab-bf0d-5da127810071" CreationDate="2023-08-03T13:19:29.993" UserId="2844" Text="unexpected argument '--ws-port' found" ContentLicense="CC BY-SA 4.0" />
  <row Id="37683" PostHistoryTypeId="3" PostId="9495" RevisionGUID="c5e4c694-0562-4dab-bf0d-5da127810071" CreationDate="2023-08-03T13:19:29.993" UserId="2844" Text="|substrate-node-template|relay-chain|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37684" PostHistoryTypeId="2" PostId="9496" RevisionGUID="a66cc23b-89cc-4d34-b0d3-4c0d35c2bd8d" CreationDate="2023-08-03T13:48:37.267" UserId="427" Text="--ws-port is replaced by --rpc-port. You can confirm this from [here][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/13384" ContentLicense="CC BY-SA 4.0" />
  <row Id="37686" PostHistoryTypeId="2" PostId="9497" RevisionGUID="e996a456-e2d8-4ded-acf4-6f4ba93de527" CreationDate="2023-08-03T13:48:52.587" UserId="251" Text="A suggestion, always checking the release detail before using/upgrading to it: https://github.com/paritytech/polkadot/releases/tag/v0.9.43&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;CLI changes&#xD;&#xA;This release removes the following CLI parameters:&#xD;&#xA;&#xD;&#xA;--rpc-max-payload (replaced by --rpc-max-request-size and --rpc-max-response-size)&#xD;&#xA;--ws-max-out-buffer-capacity&#xD;&#xA;--ws-external (replaced by --rpc-external)&#xD;&#xA;--unsafe-ws-external (replaced by --unsafe-rpc-external)&#xD;&#xA;--ipc--path&#xD;&#xA;--ws-port (replaced by --rpc-port)&#xD;&#xA;--ws-max--connections (replaced by --rpc-max-connections)&#xD;&#xA;--rpc-http (replaced by --rpc-addr)&#xD;&#xA;--rpc-ws (replaced by --rpc-addr)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="37688" PostHistoryTypeId="2" PostId="9498" RevisionGUID="589b8622-e2fb-4b5f-9e4d-85ac2f3a3300" CreationDate="2023-08-03T14:32:20.920" UserId="300" Text="Context:&#xD;&#xA;&#xD;&#xA;A parachain in Rococo is missing more block slots than I would expect it to at fairly random times.&#xD;&#xA;&#xD;&#xA;Version: Polkadot v0.9.42&#xD;&#xA;Number of Collators: 3&#xD;&#xA;&#xD;&#xA;Logging:&#xD;&#xA;(Perhaps I am missing the correct trace log to see the issue?) &#xD;&#xA;```&#xD;&#xA;-lcumulus-collator=trace \&#xD;&#xA;-laura=trace \&#xD;&#xA;-laura::cumulus=trace \&#xD;&#xA;-lcumulus-consensus-relay-chain=trace \&#xD;&#xA;-lsc_basic_authorship::basic_authorship=trace \&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Perhaps most useful part of the log:&#xD;&#xA;```&#xD;&#xA;cumulus-collator: [Parachain] Producing candidate relay_parent=0x04baa2159d77d3557a3d6ac6088f37874b714b2a2c3df609dbbe9b36c1b437d6&#xD;&#xA;cumulus-collator: [Parachain] Starting collation. relay_parent=0x04baa2159d77d3557a3d6ac6088f37874b714b2a2c3df609dbbe9b36c1b437d6 at=0x1e9acf648cfd7d37aecd93b7bca2a09e6ad56e9f28a1d762c223b2228897650a&#xD;&#xA;aura: [Parachain] Checking log DigestItem::PreRuntime(...)&#xD;&#xA;aura: [Parachain] Checking log DigestItem::Seal(...)&#xD;&#xA;aura: [Parachain] Ignoring digest not meant for us&#xD;&#xA;aura: [Parachain] No block for 2 slots. Applying exponential lenience, total proposing duration: 750ms&#xD;&#xA;aura: [Parachain] Starting authorship at slot: 140922534&#xD;&#xA;sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0x1e9acf648cfd7d37aecd93b7bca2a09e6ad56e9f28a1d762c223b2228897650a&#xD;&#xA;sc_basic_authorship::basic_authorship: [Parachain] Attempting to push transactions from the pool.&#xD;&#xA;sc_basic_authorship::basic_authorship: [Parachain] Pool status: PoolStatus { ready: 0, ready_bytes: 0, future: 0, future_bytes: 0 }&#xD;&#xA;sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1680005 (0 ms) [hash: 0x53252500318ec20bc6d8ad20269819d623c83b804063bcdde94d5e3ce0cd5967; parent_hash: 0x1e9a…650a; extrinsics (2): [0xb875…d7bb, 0xc288…4d21]]&#xD;&#xA;aura: [Parachain]  Pre-sealed block for proposal at 1680005. Hash now 0x88fb38e98a275c9b78a04902c48d6d59fea3949731c43855406f62fccb5809cb, previously 0x53252500318ec20bc6d8ad20269819d623c83b804063bcdde94d5e3ce0cd5967.&#xD;&#xA;substrate: [Parachain] ✨ Imported #1680005 (0x88fb…09cb)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Full Log in Gist: https://gist.github.com/wilwade/f4ec02bc60a6863c0a1fed66957f8aae&#xD;&#xA;&#xD;&#xA;Appearance: Looks like the collators are forming the candidate blocks, but the candidate blocks are not getting included in the relay chain.&#xD;&#xA;&#xD;&#xA;Things I don't think it is:&#xD;&#xA;1. Appears that the collator is forming the blocks at the right time and on top of the correct relay parent (Not a relay chain sync issue)&#xD;&#xA;2. No failing transactions on the Relay chain blocks (that I can see)&#xD;&#xA;3. Not a sync issue between the collators&#xD;&#xA;4. No invalid transactions as these are &quot;empty&quot; blocks&#xD;&#xA;5. Rococo Relay appears to be happy&#xD;&#xA;6. Lots of debug logs that would indicate specific errors are not showing up. Too many to list.&#xD;&#xA;7. Not a block finalization issue&#xD;&#xA;&#xD;&#xA;So actual questions:&#xD;&#xA;&#xD;&#xA; 1. `aura: [Parachain] No block for n slots` This appears to just be telling me what I already know, that no blocks were formed when we expected them to be. Is that a correct interpretation of the log? (Log is inside of https://paritytech.github.io/substrate/master/sc_consensus_slots/fn.proposing_remaining_duration.html)&#xD;&#xA; 2. There are some Relay chain Reorgs, but I don't think those are causing the issue.&#xD;&#xA; 3. Other ideas of things to log?&#xD;&#xA; 4. Other ideas?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37690" PostHistoryTypeId="1" PostId="9498" RevisionGUID="589b8622-e2fb-4b5f-9e4d-85ac2f3a3300" CreationDate="2023-08-03T14:32:20.920" UserId="300" Text="Proposals not getting processed, Consensus Issues on Rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="37691" PostHistoryTypeId="3" PostId="9498" RevisionGUID="589b8622-e2fb-4b5f-9e4d-85ac2f3a3300" CreationDate="2023-08-03T14:32:20.920" UserId="300" Text="|parachain|block-production|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37692" PostHistoryTypeId="52" PostId="9488" RevisionGUID="bf6d0d3c-0c38-455e-8d6f-754029d54d1e" CreationDate="2023-08-03T14:38:43.417" />
  <row Id="37693" PostHistoryTypeId="2" PostId="9499" RevisionGUID="651b5799-b527-45b2-a5d5-e05cb41d36f7" CreationDate="2023-08-03T14:45:22.640" UserId="3122" Text="I'm integrating [srtool](https://github.com/paritytech/srtool) into my CI build. As a result of the build, I aim to obtain the client and the runtime. I can compile the runtime with `srtool` [action](https://github.com/chevdor/srtool-actions#basic) and run `cargo build` to get the client. But with this approach, CI has to build the runtime twice which is time-consuming. &#xD;&#xA;&#xD;&#xA;The questions:&#xD;&#xA; 1. Is it possible to avoid duplicating the runtime build work while obtaining both the client and the runtime as build results?&#xD;&#xA; 2. If it's not possible or hard to avoid double work, is it fine for the node client to be compiled with a different build from the runtime?&#xD;&#xA;&#xD;&#xA;Side notes:&#xD;&#xA; 1. I didn't find any signs in `srtool` documentation that it is possible to compile node client with it.&#xD;&#xA; 2. It's not possible to compile the node client separately from the runtime as the client depends on the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="37695" PostHistoryTypeId="1" PostId="9499" RevisionGUID="651b5799-b527-45b2-a5d5-e05cb41d36f7" CreationDate="2023-08-03T14:45:22.640" UserId="3122" Text="How to avoid double work when building with srtool" ContentLicense="CC BY-SA 4.0" />
  <row Id="37696" PostHistoryTypeId="3" PostId="9499" RevisionGUID="651b5799-b527-45b2-a5d5-e05cb41d36f7" CreationDate="2023-08-03T14:45:22.640" UserId="3122" Text="|runtime|build|client|srtool|cicd|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37697" PostHistoryTypeId="2" PostId="9500" RevisionGUID="c4debf5f-1331-47e3-ac8e-c9453766fe5e" CreationDate="2023-08-03T16:22:17.533" UserId="251" Text="If you want to skip the WebAssembly build process for your client, you can use the `SKIP_WASM_BUILD` option and assemble it with the srtool artifacts later. &#xD;&#xA;&#xD;&#xA;However, I believe this may not be a wise decision.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Since GitHub actions have the capability to run simultaneously, why not start these two jobs together?&#xD;&#xA;&#xD;&#xA;I don't think `CI has to build the runtime twice which is time-consuming`." ContentLicense="CC BY-SA 4.0" />
  <row Id="37699" PostHistoryTypeId="5" PostId="9499" RevisionGUID="316ab8cb-e1ec-47d8-9ac6-7c736394a1e8" CreationDate="2023-08-03T16:40:08.357" UserId="3122" Comment="deleted 27 characters in body" Text="I'm integrating [srtool](https://github.com/paritytech/srtool) into my CI build. As a result of the build, I aim to obtain the client and the runtime. I can compile the runtime with `srtool` [action](https://github.com/chevdor/srtool-actions#basic) and run `cargo build` to get the client. But with this approach, CI has to build the runtime twice which is time-consuming. &#xD;&#xA;&#xD;&#xA;The questions:&#xD;&#xA; 1. Is it possible to avoid duplicating work while obtaining both the client and the runtime as build results?&#xD;&#xA; 2. If it's challenging to avoid double work, is it acceptable for the node client to be compiled with a different build from the runtime?&#xD;&#xA;&#xD;&#xA;Side notes:&#xD;&#xA; 1. I didn't find any signs in `srtool` documentation that it is possible to compile node client with it.&#xD;&#xA; 2. It's not possible to compile the node client separately from the runtime as the client depends on the runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="37700" PostHistoryTypeId="2" PostId="9501" RevisionGUID="7569b2fd-9a0d-4b18-8c76-a4553be1a6d3" CreationDate="2023-08-03T20:52:48.080" UserId="3996" Text="What's the difference between the balances reported by the `balances.account` and `system.account` storage queries?&#xD;&#xA;&#xD;&#xA;I would expect a balance query on a development chain for 'Alice' to show me a funded balance, but `balances.account` gives me:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  free: 0&#xD;&#xA;  reserved: 0&#xD;&#xA;  frozen: 0&#xD;&#xA;  flags: 170,141,183,460,469,231,731,687,303,715,884,105,728&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;while `system.account` gives me:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  nonce: 8&#xD;&#xA;  consumers: 1&#xD;&#xA;  providers: 1&#xD;&#xA;  sufficients: 0&#xD;&#xA;  data: {&#xD;&#xA;    free: 1,152,921,504,575,215,358&#xD;&#xA;    reserved: 0&#xD;&#xA;    frozen: 0&#xD;&#xA;    flags: 170,141,183,460,469,231,731,687,303,715,884,105,728&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="37702" PostHistoryTypeId="1" PostId="9501" RevisionGUID="7569b2fd-9a0d-4b18-8c76-a4553be1a6d3" CreationDate="2023-08-03T20:52:48.080" UserId="3996" Text="What's the difference between balances.account and system.account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37703" PostHistoryTypeId="3" PostId="9501" RevisionGUID="7569b2fd-9a0d-4b18-8c76-a4553be1a6d3" CreationDate="2023-08-03T20:52:48.080" UserId="3996" Text="|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37704" PostHistoryTypeId="50" PostId="7458" RevisionGUID="b508e23a-2901-4636-8f83-3b4de1047fd5" CreationDate="2023-08-03T21:04:10.483" UserId="-1" />
  <row Id="37705" PostHistoryTypeId="50" PostId="8757" RevisionGUID="a6374c2e-ba19-46b9-91ab-c5dcc3d29657" CreationDate="2023-08-03T23:00:40.077" UserId="-1" />
  <row Id="37706" PostHistoryTypeId="2" PostId="9502" RevisionGUID="37a8f886-9e76-4805-9dde-6df004d18848" CreationDate="2023-08-04T02:03:55.507" UserId="2065" Text="Hi I am currently upgrading our runtime to Polkadot 1.0 but when I try to build it get the following errors&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `MintingRateInfo: Deserialize&lt;'_&gt;` is not satisfied&#xD;&#xA;         --&gt; /home/aibrayanov/Blockchain/metaverse_network/dev/pallets/estate/src/lib.rs:249:3&#xD;&#xA;          |&#xD;&#xA;      249 |         pub minting_rate_config: MintingRateInfo,&#xD;&#xA;          |         ^^^ the trait `Deserialize&lt;'_&gt;` is not implemented for `MintingRateInfo`&#xD;&#xA;    &#xD;&#xA;      error[E0277]: the trait bound `MintingRateInfo: Serialize` is not satisfied&#xD;&#xA;          --&gt; /home/aibrayanov/Blockchain/metaverse_network/dev/pallets/estate/src/lib.rs:61:1&#xD;&#xA;           |&#xD;&#xA;      61   | #[frame_support::pallet]&#xD;&#xA;           | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Serialize` is not implemented for `MintingRateInfo`&#xD;&#xA;&#xD;&#xA;This error occurs despite that both Serialize and Deserialize are enabled for MintingRateInfo type. The code can be found [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/chexware/Bit-Country-Blockchain/tree/runtime-upgrade/polkadot-v1.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="37708" PostHistoryTypeId="1" PostId="9502" RevisionGUID="37a8f886-9e76-4805-9dde-6df004d18848" CreationDate="2023-08-04T02:03:55.507" UserId="2065" Text="error[E0277]: the trait bound is not satisfied for Deserialize&lt;'_&gt;` and Serialize&lt;'_&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="37709" PostHistoryTypeId="3" PostId="9502" RevisionGUID="37a8f886-9e76-4805-9dde-6df004d18848" CreationDate="2023-08-04T02:03:55.507" UserId="2065" Text="|error|build|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37710" PostHistoryTypeId="2" PostId="9503" RevisionGUID="8cb216fa-948e-4ac2-8f8e-9273e57b4635" CreationDate="2023-08-04T04:37:52.670" UserId="2844" Text="I am using `release-v1.0.0` of polkadot. I am going through this [tutorial](https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/) and running two relay chain node but got this error,&#xD;&#xA;&#xD;&#xA;`Error with block built on 0x05dd517785cae6c35027166fa2d96ae4298de4016d4684b00ec034000a339355: Import failed: Unexpected epoch change`&#xD;&#xA;&#xD;&#xA;I try to delete db from this directory `~/Library/Application Support/&lt;chain name&gt;` but still same issue.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;blocks are producing but after 2-3 block it throws this error and also I am not able to create paraId,&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qHyKH.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/Wk4Ys.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37712" PostHistoryTypeId="1" PostId="9503" RevisionGUID="8cb216fa-948e-4ac2-8f8e-9273e57b4635" CreationDate="2023-08-04T04:37:52.670" UserId="2844" Text="Error with block built on Import failed: Unexpected epoch change" ContentLicense="CC BY-SA 4.0" />
  <row Id="37713" PostHistoryTypeId="3" PostId="9503" RevisionGUID="8cb216fa-948e-4ac2-8f8e-9273e57b4635" CreationDate="2023-08-04T04:37:52.670" UserId="2844" Text="|polkadot|substrate-parachain-template|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37714" PostHistoryTypeId="2" PostId="9504" RevisionGUID="b08ea79b-2da6-45f2-a083-8713587f8bee" CreationDate="2023-08-04T06:34:35.833" UserId="251" Text="Typically, we store the system account and native balances together. However, in some cases, your chain may have multiple instances of native tokens (pallet-balances). In such situations, you might need to store additional token data in different locations. At this moment, `balances.account` could be a good choice for storing this data." ContentLicense="CC BY-SA 4.0" />
  <row Id="37716" PostHistoryTypeId="2" PostId="9505" RevisionGUID="447e1b7a-895d-454d-9d21-dfe45abbcd3b" CreationDate="2023-08-04T06:40:55.357" UserId="2246" Text="We recently sent XCM messages from Phala to Polkadot to send HRMP open requests to PolkaDex parachain. We constructed the message as usual, but the message failed to execute on Polkadot. I haven't figured the issue out after rechecking the message we send.&#xD;&#xA;You can find the record [here][1], and I do find something strange that the proofSize is somehow 0, which normally will cause failure, but don't know why it happened since I didn't give 0 on our message.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/xcm_message/polkadot-63f33ddf532c5fbc288811861c20ab0aa596c9e3&#xD;&#xA;  [2]: https://i.stack.imgur.com/bqXKj.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37718" PostHistoryTypeId="1" PostId="9505" RevisionGUID="447e1b7a-895d-454d-9d21-dfe45abbcd3b" CreationDate="2023-08-04T06:40:55.357" UserId="2246" Text="Failed to execute hrmp open request on polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="37719" PostHistoryTypeId="3" PostId="9505" RevisionGUID="447e1b7a-895d-454d-9d21-dfe45abbcd3b" CreationDate="2023-08-04T06:40:55.357" UserId="2246" Text="|parachain|xcm|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37720" PostHistoryTypeId="2" PostId="9506" RevisionGUID="0a966567-3604-49d7-b7d3-aa492576624d" CreationDate="2023-08-04T07:34:34.627" UserId="2762" Text="The consensus algorithm BABE assumes that at least one block will be produced per epoch, so probably you stopped your nodes and whenever there is a period of inactivity (no blocks being produced) for more than one epoch BABE is broken.&#xD;&#xA;&#xD;&#xA;Because you are in development the best solution for that is to clean the database as you have tried. However I think you are trying to delete the wrong folder, if you are running the same commands as the tutorial you are using the following flag:&#xD;&#xA;&#xD;&#xA;    --base-path /tmp/relay/alice &#xD;&#xA;&#xD;&#xA;Which is specifying that the chain database stored locally at `/tmp/relay/alice` try to delete this folder and the same for the other Node Bob.&#xD;&#xA;&#xD;&#xA;Another option when you are in development mode is to use the flag `--dev` because each time you start/restart a node, this will create an delete a temporal folder for the DB.&#xD;&#xA;&#xD;&#xA;You are not able to create a `paraId` because of this issue, when fixed if you follow the step-by-step guide: [Connect a local parachain][1] it will work.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/" ContentLicense="CC BY-SA 4.0" />
  <row Id="37722" PostHistoryTypeId="50" PostId="6738" RevisionGUID="e835d276-4884-4c57-9fbc-7bcc675fd51b" CreationDate="2023-08-04T08:07:20.823" UserId="-1" />
  <row Id="37723" PostHistoryTypeId="2" PostId="9507" RevisionGUID="4f5b0e49-f553-41f7-9d98-95e3679e6fab" CreationDate="2023-08-04T08:38:28.047" UserId="4510" Text="I read a release note for version 0.9.42, which was published on May 4, and noticed that the `transfer` method has been changed to `transfer_allow_deathmethod`, and `transfer` will now serve as an alias for the new method `transfer_allow_death`. The pull request's description stated that the `transfer` method will still remain but its naming is now DEPRECATED, and ecosystem tools should transition to using `transfer_allow_death` within 3 months, after which the `transfer` alias will be removed. I understood that the transfer method will be deprecated three months from the publication date of the release note, but I am uncertain about the starting point for counting those three months until depreciation. Could someone please provide me with the exact date when the `transfer` method will be deprecated　on WESTEND and Polkadot Mainnet?&#xD;&#xA;&#xD;&#xA;Release Note: https://github.com/paritytech/polkadot/releases/tag/v0.9.42&#xD;&#xA;&#xD;&#xA;Pull Request: https://github.com/paritytech/substrate/pull/12951&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37725" PostHistoryTypeId="1" PostId="9507" RevisionGUID="4f5b0e49-f553-41f7-9d98-95e3679e6fab" CreationDate="2023-08-04T08:38:28.047" UserId="4510" Text="I want to know the exact date when transfer method as an alias will be depreciated on WESTEND and Polkadot mainnet after 0.9.42 release" ContentLicense="CC BY-SA 4.0" />
  <row Id="37726" PostHistoryTypeId="3" PostId="9507" RevisionGUID="4f5b0e49-f553-41f7-9d98-95e3679e6fab" CreationDate="2023-08-04T08:38:28.047" UserId="4510" Text="|westend|releases|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37727" PostHistoryTypeId="4" PostId="9507" RevisionGUID="6bfac38c-946b-402f-835c-c0d0e985fece" CreationDate="2023-08-04T08:38:55.363" UserId="4510" Comment="edited title" Text="I want to know the exact date when transfer method as an alias will be deprecated on WESTEND and Polkadot mainnet after 0.9.42 release" ContentLicense="CC BY-SA 4.0" />
  <row Id="37728" PostHistoryTypeId="50" PostId="7485" RevisionGUID="a0b4f781-88d3-4c58-89e3-e67d4d877b08" CreationDate="2023-08-04T10:06:10.837" UserId="-1" />
  <row Id="37729" PostHistoryTypeId="2" PostId="9508" RevisionGUID="b1b0aaef-1081-4fe7-9019-cd03cfe71329" CreationDate="2023-08-04T10:53:54.467" UserId="2844" Text="Now I am acquiring testnet slots in rococo, In [modify-the-chain-specification-file](https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/#modify-the-chain-specification-file) steps 5, it says `Add the public key for your account to the session keys section`. I added like this,&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;but while converting into raw file I got this error,&#xD;&#xA;&#xD;&#xA;`Thread 'main' panicked at 'Validator in session 1 missing keys!',`&#xD;&#xA;&#xD;&#xA;I didn't find much information, can you please help me how to fix this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SvMUh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37731" PostHistoryTypeId="1" PostId="9508" RevisionGUID="b1b0aaef-1081-4fe7-9019-cd03cfe71329" CreationDate="2023-08-04T10:53:54.467" UserId="2844" Text="Thread 'main' panicked at 'Validator in session 1 missing keys!'" ContentLicense="CC BY-SA 4.0" />
  <row Id="37732" PostHistoryTypeId="3" PostId="9508" RevisionGUID="b1b0aaef-1081-4fe7-9019-cd03cfe71329" CreationDate="2023-08-04T10:53:54.467" UserId="2844" Text="|parachain|substrate-parachain-template|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37733" PostHistoryTypeId="2" PostId="9509" RevisionGUID="11208d72-0512-44af-93d7-44a8080d68fc" CreationDate="2023-08-04T11:50:32.087" UserId="3317" Text="Switch to `release-v1.0.0` branch and recompile. This is due to the fact that on master since github.com/paritytech/polkadot/pull/7337, polkadot will have two other binaries (workers) that you need to compile." ContentLicense="CC BY-SA 4.0" />
  <row Id="37735" PostHistoryTypeId="5" PostId="9509" RevisionGUID="7b59319c-f517-4010-a8d2-d5177d13f91d" CreationDate="2023-08-04T12:27:34.220" UserId="3317" Comment="added 28 characters in body" Text="Switch to `release-v1.0.0` branch and recompile. This is due to the fact that on master, since [this PR][1], polkadot has two other binaries (workers) that you need to compile.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/pull/7337" ContentLicense="CC BY-SA 4.0" />
  <row Id="37736" PostHistoryTypeId="2" PostId="9510" RevisionGUID="3d8be1fd-4369-4a5a-8862-507ef3ff1e42" CreationDate="2023-08-04T13:53:43.973" UserId="267" Text="I have governance platform written in ink!, where I can create poll with pollId, number of options, and with `poll_start_time` and `poll_end_time`. And this is fine.&#xD;&#xA;&#xD;&#xA;So when poll is started I can't call vote function, and revert an error `PollIsNotStarted`.&#xD;&#xA;&#xD;&#xA;Create poll function:&#xD;&#xA;&#xD;&#xA;    #[ink(message)]&#xD;&#xA;            pub fn create_poll(&#xD;&#xA;                &amp;mut self,&#xD;&#xA;                poll_id: String,&#xD;&#xA;                number_of_options: u32,&#xD;&#xA;                poll_start_timestamp: Timestamp,&#xD;&#xA;                poll_end_timestamp: Timestamp,&#xD;&#xA;            ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;    &#xD;&#xA;                let current_timestamp = self.env().block_timestamp();&#xD;&#xA;                let poll_info = self.poll_data.get(&amp;poll_id).unwrap_or_default();&#xD;&#xA;    &#xD;&#xA;                if poll_info.number_of_options != 0 {&#xD;&#xA;                    return Err(Error::PollIdAlreadyExists);&#xD;&#xA;                }&#xD;&#xA;                &#xD;&#xA;                if number_of_options &lt; 2 {&#xD;&#xA;                    return Err(Error::InvalidNumberOfOption)&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                if poll_start_timestamp &lt; current_timestamp {&#xD;&#xA;                    return Err(Error::InvalidStartTimestamp)&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                if poll_end_timestamp &lt;= poll_start_timestamp {&#xD;&#xA;                    return Err(Error::InvalidEndTimestamp)&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                let poll_info = PollInfo {&#xD;&#xA;                    number_of_options,&#xD;&#xA;                    poll_start_timestamp,&#xD;&#xA;                    poll_end_timestamp,&#xD;&#xA;                };&#xD;&#xA;    &#xD;&#xA;                self.poll_data.insert(&amp;poll_id, &amp;poll_info);&#xD;&#xA;    &#xD;&#xA;                self.env().emit_event(PollCreated {&#xD;&#xA;                    poll_id: poll_id.clone(),&#xD;&#xA;                    number_of_options,&#xD;&#xA;                    poll_start_timestamp,&#xD;&#xA;                    poll_end_timestamp,&#xD;&#xA;                });&#xD;&#xA;    &#xD;&#xA;                Ok(())&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;Vote function:&#xD;&#xA;&#xD;&#xA;    #[ink(message)]&#xD;&#xA;            pub fn vote(&#xD;&#xA;                &amp;mut self,&#xD;&#xA;                poll_id: String,&#xD;&#xA;                voting_option: u32,&#xD;&#xA;                number_of_votes: Balance,&#xD;&#xA;            ) -&gt; Result&lt;(), Error&gt;{&#xD;&#xA;                let caller = self.env().caller();&#xD;&#xA;    &#xD;&#xA;                if number_of_votes &lt;= 0 {&#xD;&#xA;                    return Err(Error::InvalidNumberOfVotes)&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                let poll_info = self.poll_data.get(&amp;poll_id).unwrap_or_default();&#xD;&#xA;                let current_timestamp = self.env().block_timestamp();       &#xD;&#xA;    &#xD;&#xA;                if current_timestamp &lt; poll_info.poll_start_timestamp {&#xD;&#xA;                    return Err(Error::PollIsNotStarted)&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                if current_timestamp &gt; poll_info.poll_end_timestamp {&#xD;&#xA;                    return Err(Error::PollIsFinished);&#xD;&#xA;                }&#xD;&#xA;        &#xD;&#xA;                if voting_option &gt; poll_info.number_of_options{&#xD;&#xA;                    return Err(Error::InvalidNumberOfOption)&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                let mut voting_info = self.voting.get(&amp;(poll_id.clone(), caller)).unwrap_or_default();&#xD;&#xA;    &#xD;&#xA;                if voting_info.voting_option == 0 {&#xD;&#xA;                    voting_info.voting_option = voting_option;                &#xD;&#xA;                } else {&#xD;&#xA;                    if voting_info.voting_option != voting_option {&#xD;&#xA;                        return Err(Error::VoteDenied)&#xD;&#xA;                    }&#xD;&#xA;                }&#xD;&#xA;    &#xD;&#xA;                voting_info.number_of_votes += number_of_votes;    &#xD;&#xA;                    &#xD;&#xA;                self.voting.insert(&amp;(poll_id.clone(), caller), &amp;voting_info); &#xD;&#xA;    &#xD;&#xA;                self.env().emit_event(Voted {&#xD;&#xA;                    poll_id: poll_id.clone(),&#xD;&#xA;                    voter: caller,&#xD;&#xA;                    voting_option,&#xD;&#xA;                    number_of_votes,&#xD;&#xA;                });           &#xD;&#xA;    &#xD;&#xA;                Ok(().into())&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;I think this is about Timestamps, I am not sure. When I erase timestamps in vote function, it works fine. Where I am wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37738" PostHistoryTypeId="1" PostId="9510" RevisionGUID="3d8be1fd-4369-4a5a-8862-507ef3ff1e42" CreationDate="2023-08-04T13:53:43.973" UserId="267" Text="Problem with timestamps in governance platform" ContentLicense="CC BY-SA 4.0" />
  <row Id="37739" PostHistoryTypeId="3" PostId="9510" RevisionGUID="3d8be1fd-4369-4a5a-8862-507ef3ff1e42" CreationDate="2023-08-04T13:53:43.973" UserId="267" Text="|ink|rust|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37740" PostHistoryTypeId="2" PostId="9511" RevisionGUID="9b10eb24-dfcb-4e4b-9cef-7a755ca013eb" CreationDate="2023-08-04T13:59:43.903" UserId="3317" Text="You should add them in [`node/src/chainspec.rs`][1] so that they are included in genesis state [for pallet-session][2]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/extended-parachain-template/blob/4fe21a5a1c7dd915bb17b0a607ca4f9f60a27af4/node/src/chain_spec.rs#L426-L437&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/2e7932fac159aa8855feeed7578319ae0e6d8296/frame/session/src/lib.rs#L420" ContentLicense="CC BY-SA 4.0" />
  <row Id="37742" PostHistoryTypeId="34" PostId="8653" RevisionGUID="7d536b60-f842-4222-91c8-6ab85249f4ce" CreationDate="2023-08-04T18:02:55.470" UserId="-1" Comment="30" />
  <row Id="37743" PostHistoryTypeId="2" PostId="9512" RevisionGUID="aed0d8c4-d450-4d12-9462-9525b21fdd4b" CreationDate="2023-08-04T18:29:22.527" UserId="3387" Text="I am doing a basic E2E test using the [flipper example][1].&#xD;&#xA;&#xD;&#xA;This is my contract version&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I have install the [substrate-contracts-node][3]&#xD;&#xA;&#xD;&#xA;I am running with the &quot;nightly-2023-02-09&quot; (cargo +nightly-2023-02-09 test --features e2e-tests)&#xD;&#xA;&#xD;&#xA;Does any knows why this happens ?.&#xD;&#xA;&#xD;&#xA;---- flipper::e2e_tests::it_works stdout ----&#xD;&#xA;thread 'flipper::e2e_tests::it_works' panicked at 'We should find a port before the reader ends', /home/silveira/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_e2e-4.2.1/src/node_proc.rs:192:10&#xD;&#xA;note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/blob/main/flipper/lib.rs&#xD;&#xA;  [2]: https://i.stack.imgur.com/GCY0I.png&#xD;&#xA;  [3]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [4]: https://i.stack.imgur.com/Et2AQ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37745" PostHistoryTypeId="1" PostId="9512" RevisionGUID="aed0d8c4-d450-4d12-9462-9525b21fdd4b" CreationDate="2023-08-04T18:29:22.527" UserId="3387" Text="e2e-tests &quot;We should find a port before the reader ends&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37746" PostHistoryTypeId="3" PostId="9512" RevisionGUID="aed0d8c4-d450-4d12-9462-9525b21fdd4b" CreationDate="2023-08-04T18:29:22.527" UserId="3387" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37747" PostHistoryTypeId="6" PostId="9512" RevisionGUID="5dd8b9ed-8070-45f2-bce7-4bf9dfe893d3" CreationDate="2023-08-04T18:44:31.403" UserId="3387" Comment="edited tags" Text="|ink|smart-contract|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37748" PostHistoryTypeId="5" PostId="9512" RevisionGUID="501c57be-c96e-4fec-9958-9e38788475be" CreationDate="2023-08-04T19:05:59.310" UserId="3387" Comment="added 676 characters in body" Text="I am doing a basic E2E test using the [flipper example][1].&#xD;&#xA;&#xD;&#xA;This is my contract version&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I have install the [substrate-contracts-node][3]&#xD;&#xA;&#xD;&#xA;I am running with the &quot;nightly-2023-02-09&quot; (cargo +nightly-2023-02-09 test --features e2e-tests)&#xD;&#xA;&#xD;&#xA;**Does anyone knows why this happens ?**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;---- flipper::e2e_tests::it_works stdout ----&#xD;&#xA;thread 'flipper::e2e_tests::it_works' panicked at 'We should find a port before the reader ends', /home/silveira/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_e2e-4.2.1/src/node_proc.rs:192:10&#xD;&#xA;note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;Cargo.toml&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;flipper&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Parity Technologies &lt;admin@parity.io&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;publish = false&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.2.1&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = { version = &quot;4.2.1&quot; }&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;src/lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/blob/main/flipper/lib.rs&#xD;&#xA;  [2]: https://i.stack.imgur.com/GCY0I.png&#xD;&#xA;  [3]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [4]: https://i.stack.imgur.com/Et2AQ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37749" PostHistoryTypeId="2" PostId="9513" RevisionGUID="f5f97938-69de-4270-a23c-0fbfcf67f53e" CreationDate="2023-08-04T19:34:56.687" UserId="4435" Text="Now I am trying to implement NFT purchasing functionality based on a substrate node.&#xD;&#xA;&#xD;&#xA;I got this function from the polkadot js documentation.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;buyItem(collection: u32, item: u32, bid_price: u128)&#xD;&#xA;&#xD;&#xA;    interface: api.tx.uniques.buyItem&#xD;&#xA;    summary: See [Pallet::buy_item]. &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but when I try this function. I got this (the image)&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Of course, the function caller is a buyer.&#xD;&#xA;&#xD;&#xA;I hope to get any advice to get this works.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Clctf.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37751" PostHistoryTypeId="1" PostId="9513" RevisionGUID="f5f97938-69de-4270-a23c-0fbfcf67f53e" CreationDate="2023-08-04T19:34:56.687" UserId="4435" Text="I want to implement NFT purchasing function in the marketplace based on a substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="37752" PostHistoryTypeId="3" PostId="9513" RevisionGUID="f5f97938-69de-4270-a23c-0fbfcf67f53e" CreationDate="2023-08-04T19:34:56.687" UserId="4435" Text="|substrate-node|uniques|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37753" PostHistoryTypeId="2" PostId="9514" RevisionGUID="e9cfcdcf-4576-408a-a861-4d375e664050" CreationDate="2023-08-04T20:04:37.897" UserId="29" Text="Great question! As you probably know, one of the properties of XCM is that it is asymmetric - so you fire away and there is no guarantee of results.&#xD;&#xA;&#xD;&#xA;That being said, you can use the following instructions:&#xD;&#xA;- `ReportHolding`&#xD;&#xA;- `QueryPallet`&#xD;&#xA;- `ReportError`&#xD;&#xA;- `ReportTransactStatus`&#xD;&#xA;&#xD;&#xA;Each of these instructions include a `QueryResponseInfo` struct:&#xD;&#xA;```rust&#xD;&#xA;pub struct QueryResponseInfo {&#xD;&#xA;    pub destination: MultiLocation,&#xD;&#xA;    #[codec(compact)]&#xD;&#xA;    pub query_id: QueryId,&#xD;&#xA;    pub max_weight: Weight,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The consensus system that receives this instruction would execute the instruction that includes the `QueryResponseInfo` and send a corresponding `QueryResponse`:&#xD;&#xA;```rust&#xD;&#xA;QueryResponse {&#xD;&#xA;    #[codec(compact)]&#xD;&#xA;    query_id: QueryId,&#xD;&#xA;    response: Response,&#xD;&#xA;    max_weight: Weight,&#xD;&#xA;    querier: Option&lt;MultiLocation&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Reponse Struct&#xD;&#xA;pub enum Response {&#xD;&#xA;    /// No response. Serves as a neutral default.&#xD;&#xA;    Null,&#xD;&#xA;    /// Some assets.&#xD;&#xA;    Assets(MultiAssets),&#xD;&#xA;    /// The outcome of an XCM instruction.&#xD;&#xA;    ExecutionResult(Option&lt;(u32, Error)&gt;),&#xD;&#xA;    /// An XCM version.&#xD;&#xA;    Version(super::Version),&#xD;&#xA;    /// The index, instance name, pallet name and version of some pallets.&#xD;&#xA;    PalletsInfo(BoundedVec&lt;PalletInfo, MaxPalletsInfo&gt;),&#xD;&#xA;    /// The status of a dispatch attempt using `Transact`.&#xD;&#xA;    DispatchResult(MaybeErrorCode),&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A lot more on this subject is written here:&#xD;&#xA;- https://paritytech.github.io/xcm-docs/journey/queries.html&#xD;&#xA;&#xD;&#xA;with some concrete examples here:&#xD;&#xA;- https://github.com/paritytech/xcm-docs/blob/main/examples/src/8_queries/mod.rs&#xD;&#xA;&#xD;&#xA;You may also be interested in the `Expect` instructions:&#xD;&#xA;- https://paritytech.github.io/xcm-docs/journey/expects.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="37755" PostHistoryTypeId="50" PostId="7495" RevisionGUID="fd963082-703f-4077-b590-4938b2ddcee8" CreationDate="2023-08-04T20:05:10.693" UserId="-1" />
  <row Id="37756" PostHistoryTypeId="2" PostId="9515" RevisionGUID="de1b7a60-6c2a-469f-9ef6-42a770968de1" CreationDate="2023-08-04T20:14:52.167" UserId="29" Text="Looks like there are two checks in `buy_item` that result in `NoPermission`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;ensure!(details.owner != buyer, Error::&lt;T, I&gt;::NoPermission);&#xD;&#xA;```&#xD;&#xA;The owner is not allowed to buy the NFT.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;if let Some(only_buyer) = price_info.1 {&#xD;&#xA;	ensure!(only_buyer == buyer, Error::&lt;T, I&gt;::NoPermission);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;There is a `whitelisted_buyer` and only they are allowed to buy the NFT." ContentLicense="CC BY-SA 4.0" />
  <row Id="37758" PostHistoryTypeId="50" PostId="7513" RevisionGUID="82106906-dbc6-4e51-8446-33060466941e" CreationDate="2023-08-04T21:02:55.403" UserId="-1" />
  <row Id="37760" PostHistoryTypeId="2" PostId="9516" RevisionGUID="b96e8b55-ea6c-44f2-8064-bec922cfbd2b" CreationDate="2023-08-05T09:43:57.287" UserId="3387" Text="Looks like cargo-contract 3.1.0 has been [yanked][1].&#xD;&#xA;&#xD;&#xA;cargo-contract compatibility with different rust toolchains:&#xD;&#xA;&#xD;&#xA; - Rust &lt;= 1.69 + pallet-contracts &lt; polkadot-1.0.0 = cargo-contract&#xD;&#xA;   3.0.1&#xD;&#xA; - Rust &gt; = 1.70 + pallet-contracts &gt;= polkadot-1.0.0 = cargo-contract 4.0.0-alpha&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/1239#issuecomment-1653683340" ContentLicense="CC BY-SA 4.0" />
  <row Id="37762" PostHistoryTypeId="2" PostId="9517" RevisionGUID="dd2b0cbd-1a60-4b86-b6e0-0bfb39ecf81b" CreationDate="2023-08-05T09:50:43.310" UserId="3138" Text="Also check your version of Rust matches the `rustc` version listed for the corresponding release on the Polkadot releases page. `rustup override` may be helpful." ContentLicense="CC BY-SA 4.0" />
  <row Id="37764" PostHistoryTypeId="50" PostId="7730" RevisionGUID="5f692bcb-d96b-4ce4-8033-4e0342c4011e" CreationDate="2023-08-05T13:06:35.790" UserId="-1" />
  <row Id="37765" PostHistoryTypeId="50" PostId="9064" RevisionGUID="d10a0c3b-5fb6-47e6-ab47-4bb7b8f81b66" CreationDate="2023-08-05T14:05:10.617" UserId="-1" />
  <row Id="37766" PostHistoryTypeId="5" PostId="9516" RevisionGUID="135c25ce-bc99-436f-9182-895a104a0dc7" CreationDate="2023-08-05T17:07:20.903" UserId="3387" Comment="added 845 characters in body" Text="Looks like cargo-contract 3.1.0 has been [yanked][1].&#xD;&#xA;&#xD;&#xA;cargo-contract compatibility with different rust toolchains:&#xD;&#xA;&#xD;&#xA; - Rust &lt;= 1.69 + pallet-contracts &lt; polkadot-1.0.0 = cargo-contract&#xD;&#xA;   3.0.1&#xD;&#xA; - Rust &gt; = 1.70 + pallet-contracts &gt;= polkadot-1.0.0 = cargo-contract 4.0.0-alpha&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo add cargo-contract@4.0.0-alpha&#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Cargo.toml&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;flipper&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Parity Technologies &lt;admin@parity.io&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;publish = false&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;cargo-contract = &quot;4.0.0-alpha&quot;&#xD;&#xA;ink = { version = &quot;4.2.1&quot;, default-features = false }&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;src/lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Would be nice for the parity guys and ladies to update the ink_e2e, also.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/1239#issuecomment-1653683340&#xD;&#xA;  [2]: https://i.stack.imgur.com/kpYJI.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37767" PostHistoryTypeId="5" PostId="9516" RevisionGUID="69668284-4010-44f6-8d1d-b5b961ee0beb" CreationDate="2023-08-05T17:15:54.630" UserId="3387" Comment="edited body" Text="Looks like cargo-contract 3.1.0 has been [yanked][1].&#xD;&#xA;&#xD;&#xA;cargo-contract compatibility with different rust toolchains:&#xD;&#xA;&#xD;&#xA; - Rust &lt;= 1.69 + pallet-contracts &lt; polkadot-1.0.0 = cargo-contract&#xD;&#xA;   3.0.1&#xD;&#xA; - Rust &gt; = 1.70 + pallet-contracts &gt;= polkadot-1.0.0 = cargo-contract 4.0.0-alpha&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo add cargo-contract@4.0.0-alpha&#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Cargo.toml&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;flipper&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Parity Technologies &lt;admin@parity.io&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;publish = false&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;cargo-contract = &quot;4.0.0-alpha&quot;&#xD;&#xA;ink = { version = &quot;4.2.1&quot;, default-features = false }&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;src/lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Would be nice for the Parity guys and ladies to update the ink_e2e, also.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/1239#issuecomment-1653683340&#xD;&#xA;  [2]: https://i.stack.imgur.com/kpYJI.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37768" PostHistoryTypeId="2" PostId="9518" RevisionGUID="adcad02f-a711-4f1b-9884-419176ac6a7c" CreationDate="2023-08-05T19:25:49.137" UserId="28" Text="Governance in the relay chain can do this, yes.&#xD;&#xA;&#xD;&#xA;There are `Root` level functions in both the Crowdloan pallet and the Parachain Slots pallet which would enable both the crowdloan to dissolve earlier than intended, and for a parachain to lose it slot.&#xD;&#xA;&#xD;&#xA;These actions would need to be agreed upon by majority of token holders." ContentLicense="CC BY-SA 4.0" />
  <row Id="37770" PostHistoryTypeId="2" PostId="9519" RevisionGUID="ab9f8067-6493-4fb1-939d-1e95ca28ec03" CreationDate="2023-08-05T19:52:04.913" UserId="4431" Text="Is there some way i can use to create  a collection on statemint nft pallet without reserving 10 DOT i tried force create but it is currently disabled and i also tried utility batch all but it didn't worked there is one way i found but i don't understand how does it works [https://statemine.statescan.io/#/extrinsics/323750-0][1] in this transaction 3 nft were create on statemine uniques pallet by polkadot decoded team if you understand this or you have an idea please share with me&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://statemine.statescan.io/#/extrinsics/323750-0" ContentLicense="CC BY-SA 4.0" />
  <row Id="37772" PostHistoryTypeId="1" PostId="9519" RevisionGUID="ab9f8067-6493-4fb1-939d-1e95ca28ec03" CreationDate="2023-08-05T19:52:04.913" UserId="4431" Text="How can i create a collection on statemint nft pallet without reserving 10 DOT" ContentLicense="CC BY-SA 4.0" />
  <row Id="37773" PostHistoryTypeId="3" PostId="9519" RevisionGUID="ab9f8067-6493-4fb1-939d-1e95ca28ec03" CreationDate="2023-08-05T19:52:04.913" UserId="4431" Text="|polkadot|nft|statemint|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37774" PostHistoryTypeId="2" PostId="9520" RevisionGUID="be1a7700-f0bd-4c8b-b2d6-2bc0c446179c" CreationDate="2023-08-06T03:40:39.467" UserId="2844" Text="While starting node, what is the difference between `--port` and `--rpc-port`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37776" PostHistoryTypeId="1" PostId="9520" RevisionGUID="be1a7700-f0bd-4c8b-b2d6-2bc0c446179c" CreationDate="2023-08-06T03:40:39.467" UserId="2844" Text="What is the difference between port vs rpc-port?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37777" PostHistoryTypeId="3" PostId="9520" RevisionGUID="be1a7700-f0bd-4c8b-b2d6-2bc0c446179c" CreationDate="2023-08-06T03:40:39.467" UserId="2844" Text="|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37778" PostHistoryTypeId="2" PostId="9521" RevisionGUID="ede1c054-df98-451a-9858-20e3f6a3fc1c" CreationDate="2023-08-06T03:52:59.677" UserId="2844" Text="When requesting Rococo slots [here](https://github.com/paritytech/subport/issues/new?assignees=&amp;labels=Rococo&amp;template=rococo.yaml), there are two options:&#xD;&#xA;&#xD;&#xA; - Upload your Genesis Head (genesis state) - Do not submit a compressed&#xD;&#xA;   file. &#xD;&#xA;- Upload your Validation Code (genesis runtime Wasm) - Do not&#xD;&#xA;   submit a compressed file.&#xD;&#xA;&#xD;&#xA;I am confused what exactly should I need to upload there?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37780" PostHistoryTypeId="1" PostId="9521" RevisionGUID="ede1c054-df98-451a-9858-20e3f6a3fc1c" CreationDate="2023-08-06T03:52:59.677" UserId="2844" Text="Rococo Slot Request problem on adding file" ContentLicense="CC BY-SA 4.0" />
  <row Id="37781" PostHistoryTypeId="3" PostId="9521" RevisionGUID="ede1c054-df98-451a-9858-20e3f6a3fc1c" CreationDate="2023-08-06T03:52:59.677" UserId="2844" Text="|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37782" PostHistoryTypeId="50" PostId="8704" RevisionGUID="3928a94f-f7a2-49aa-920b-6ecac55d1a25" CreationDate="2023-08-06T05:04:00.497" UserId="-1" />
  <row Id="37783" PostHistoryTypeId="50" PostId="9123" RevisionGUID="2e9cf460-90bd-42bf-87ab-d5a07db54545" CreationDate="2023-08-06T07:01:00.100" UserId="-1" />
  <row Id="37784" PostHistoryTypeId="50" PostId="9148" RevisionGUID="4efe3f8d-1f81-4daa-a62a-a78aae4b07fe" CreationDate="2023-08-06T08:04:25.540" UserId="-1" />
  <row Id="37785" PostHistoryTypeId="50" PostId="8610" RevisionGUID="3d1edcdc-39d8-470d-86ca-61502b076d88" CreationDate="2023-08-06T09:02:25.280" UserId="-1" />
  <row Id="37788" PostHistoryTypeId="50" PostId="9099" RevisionGUID="321269f4-0f31-4001-8e9b-bd20ec10932e" CreationDate="2023-08-06T10:04:30.580" UserId="-1" />
  <row Id="37789" PostHistoryTypeId="50" PostId="9166" RevisionGUID="b435146e-fc74-473d-9f2c-51b6bda98b58" CreationDate="2023-08-06T11:01:40.183" UserId="-1" />
  <row Id="37790" PostHistoryTypeId="50" PostId="9196" RevisionGUID="5a7f8b3c-0659-49cd-94d3-2dbf3e3ec1d4" CreationDate="2023-08-06T12:03:45.630" UserId="-1" />
  <row Id="37791" PostHistoryTypeId="50" PostId="8761" RevisionGUID="b657250c-ad4d-417f-8ffb-1548ee47e8a6" CreationDate="2023-08-06T13:01:35.233" UserId="-1" />
  <row Id="37792" PostHistoryTypeId="5" PostId="9097" RevisionGUID="9556ba1d-c25f-44af-809f-c2f547a09f1a" CreationDate="2023-08-06T14:04:17.087" UserId="3171" Comment="deleted 9 characters in body" Text="dependency for pallet or any code that compiled to wasm&#xD;&#xA;    [dependencies]&#xD;&#xA;    bech32 = { package = &quot;bech32&quot;, version = &quot;0.9.1&quot;, default-features = false, features = [&#xD;&#xA;  &quot;strict&quot;,&#xD;&#xA;] }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37793" PostHistoryTypeId="2" PostId="9523" RevisionGUID="dd8deb02-7b0f-4474-9de0-fcd88ba17b43" CreationDate="2023-08-06T17:00:59.090" UserId="139" Text="In `pallet_balances` I found this syntax for annotating weight and it confused me a bit : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call(weight(&lt;T as Config&lt;I&gt;&gt;::WeightInfo))]&#xD;&#xA;impl&lt;T: Config&lt;I&gt;, I: 'static&gt; Pallet&lt;T, I&gt; {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How does it work? Does it automatically annotate the correct functions with that from `T::WeightInfo`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37795" PostHistoryTypeId="1" PostId="9523" RevisionGUID="dd8deb02-7b0f-4474-9de0-fcd88ba17b43" CreationDate="2023-08-06T17:00:59.090" UserId="139" Text="Weight syntax on pallet_balances" ContentLicense="CC BY-SA 4.0" />
  <row Id="37796" PostHistoryTypeId="3" PostId="9523" RevisionGUID="dd8deb02-7b0f-4474-9de0-fcd88ba17b43" CreationDate="2023-08-06T17:00:59.090" UserId="139" Text="|pallet|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37801" PostHistoryTypeId="2" PostId="9525" RevisionGUID="8edd7adb-052b-47b5-9e24-338a5dbbb379" CreationDate="2023-08-06T23:51:48.510" UserId="2163" Text="I am locally running the `zombienet/trappist_rococo.toml` network.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I create assets on both chains using the `assets.create` extrinsic. On asset hub I mint tokens to Alice.&#xD;&#xA;&#xD;&#xA;After that, I call the `limitedReserveTransfer` extrinsic like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;However I get the following error when making the call:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: FailedToTransactAsset&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don't really understand why is this failing so I would appreciate it if someone could explain the reason, or show an example of a successful reserve transfer.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SSsjp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/tqCz2.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/dZWJy.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37803" PostHistoryTypeId="1" PostId="9525" RevisionGUID="8edd7adb-052b-47b5-9e24-338a5dbbb379" CreationDate="2023-08-06T23:51:48.510" UserId="2163" Text="XCM Reserve transfer between trappist and asset hub" ContentLicense="CC BY-SA 4.0" />
  <row Id="37804" PostHistoryTypeId="3" PostId="9525" RevisionGUID="8edd7adb-052b-47b5-9e24-338a5dbbb379" CreationDate="2023-08-06T23:51:48.510" UserId="2163" Text="|xcm|trappist|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37805" PostHistoryTypeId="50" PostId="6058" RevisionGUID="6d1b5e24-ea57-4070-89cb-49ff01b73b19" CreationDate="2023-08-07T01:02:25.227" UserId="-1" />
  <row Id="37806" PostHistoryTypeId="2" PostId="9526" RevisionGUID="0597e6de-fe5b-463b-82ef-983b6e427cf9" CreationDate="2023-08-07T02:00:36.567" UserId="1959" Text="Please check if your registered asset is sufficient. In polkadot.js, Developer &gt; ChainState &gt; assets &gt; asset(). If `isSufficient` is false, you can update it through Extrinsics &gt; assets &gt; forceAssetStatus. Otherwise, you need to ensure that the account receiving the asset has enough(ED) native assets&#xD;&#xA;&#xD;&#xA;&gt; There are two types of assets on Asset Hub: sufficient and non-sufficient. &#xD;&#xA;To hold a non-sufficient asset in an account, the account needs to exist on-chain, which means it needs to have a balance in the native asset at least as much as the Existential Deposit (ED). This means 0.1 DOT on Polkadot Asset Hub and 0.000003333 KSM on Kusama Asset Hub. These existential deposits are ten times smaller than those on the Relay Chains.&#xD;&#xA;So, to send a non-sufficient asset, you need to ensure that the recipient account has at least the ED. A sufficient asset doesn't require the account to have any balance in the native token to be received. " ContentLicense="CC BY-SA 4.0" />
  <row Id="37808" PostHistoryTypeId="2" PostId="9527" RevisionGUID="9bad20a4-25d7-4acc-80e3-6f3a596039f4" CreationDate="2023-08-07T02:23:57.827" UserId="251" Text="This update simplifies weight annotation by eliminating the need to manually annotate the weight for every call. However, you still have the option to specify it manually, which will overwrite the default value.&#xD;&#xA;&#xD;&#xA;For more detailed information, please refer to the PR description at https://github.com/paritytech/substrate/pull/13932." ContentLicense="CC BY-SA 4.0" />
  <row Id="37810" PostHistoryTypeId="6" PostId="9521" RevisionGUID="a44bb333-cc34-4b59-807d-35c605cd0fce" CreationDate="2023-08-07T03:15:03.777" UserId="2844" Comment="edited tags" Text="|substrate-node-template|substrate-parachain-template|relay-chain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37811" PostHistoryTypeId="2" PostId="9528" RevisionGUID="65ff97c2-3f6c-4044-b015-a22f8c6e5472" CreationDate="2023-08-07T04:48:26.153" UserId="139" Text="Let's say our pallet dispatchable returns `DispatchResultWithPostInfo`, where we are trying to manually calculate the weight, albeit with helpers obtained from benchmarking, but that's not relevant to the question. How do we account for the weight consumed by `ensure_signed` or `ensure_root` calls? Must they be benchmarked as well? " ContentLicense="CC BY-SA 4.0" />
  <row Id="37813" PostHistoryTypeId="1" PostId="9528" RevisionGUID="65ff97c2-3f6c-4044-b015-a22f8c6e5472" CreationDate="2023-08-07T04:48:26.153" UserId="139" Text="How to account for ensure_signed calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37814" PostHistoryTypeId="3" PostId="9528" RevisionGUID="65ff97c2-3f6c-4044-b015-a22f8c6e5472" CreationDate="2023-08-07T04:48:26.153" UserId="139" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37815" PostHistoryTypeId="2" PostId="9529" RevisionGUID="0da9d513-5ddd-438e-af31-8bfdfb37a164" CreationDate="2023-08-07T05:42:03.870" UserId="2844" Text="I have changed properties of token [here github repo](https://github.com/ganesh1233456/xcav-praachain/blob/4c2b177325037c00cd28dac10e79c02fe6a03431/node/src/chain_spec.rs#L76), but symbol of token doesn't change while running node in dev mode `./target/release/parachain-template-node --dev`. Is this because of parachain?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TdYBY.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37817" PostHistoryTypeId="1" PostId="9529" RevisionGUID="0da9d513-5ddd-438e-af31-8bfdfb37a164" CreationDate="2023-08-07T05:42:03.870" UserId="2844" Text="Token Symbol doesn't change in extend-parachain-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="37818" PostHistoryTypeId="3" PostId="9529" RevisionGUID="0da9d513-5ddd-438e-af31-8bfdfb37a164" CreationDate="2023-08-07T05:42:03.870" UserId="2844" Text="|substrate-parachain-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37819" PostHistoryTypeId="2" PostId="9530" RevisionGUID="9d2ce295-eaad-4e84-bd8e-97bbf9254b1a" CreationDate="2023-08-07T05:52:57.057" UserId="3538" Text="I'm working on an idea where I would want my substrate-based blockchain (let's name it Blockchain A) to read events from another substrate-based blockchain (let's call it Blockchain B) and perform some actions on the basis of those events. For example, let's suppose I would want to read the TX events from Blockchain B so that when there's a TX of more than 100 tokens, I would want my Blockchain A to trigger an action in response to that event. &#xD;&#xA;&#xD;&#xA;Is it possible to build something like this in Substrate? I've seen that there's this [substrate_rpc_client](https://paritytech.github.io/substrate/master/substrate_rpc_client/index.html) pallet that has some helpful methods to do this, but I'm not sure where I would configure it in the outer node of my blockchain. &#xD;&#xA;&#xD;&#xA;Any help in this regard is quite appreciated. " ContentLicense="CC BY-SA 4.0" />
  <row Id="37821" PostHistoryTypeId="1" PostId="9530" RevisionGUID="9d2ce295-eaad-4e84-bd8e-97bbf9254b1a" CreationDate="2023-08-07T05:52:57.057" UserId="3538" Text="A blockchain to read events from another blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="37822" PostHistoryTypeId="3" PostId="9530" RevisionGUID="9d2ce295-eaad-4e84-bd8e-97bbf9254b1a" CreationDate="2023-08-07T05:52:57.057" UserId="3538" Text="|pallet|rpc|substrate-node|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37823" PostHistoryTypeId="2" PostId="9531" RevisionGUID="0eb5ff68-50a0-4d7d-a7e1-d1553326d2e9" CreationDate="2023-08-07T05:57:20.680" UserId="3538" Text="You missed adding those properties [here](https://github.com/ganesh1233456/xcav-praachain/blob/4c2b177325037c00cd28dac10e79c02fe6a03431/node/src/chain_spec.rs#L122) like you did it [here](https://github.com/ganesh1233456/xcav-praachain/blob/4c2b177325037c00cd28dac10e79c02fe6a03431/node/src/chain_spec.rs#L183)" ContentLicense="CC BY-SA 4.0" />
  <row Id="37825" PostHistoryTypeId="2" PostId="9532" RevisionGUID="8430c939-0873-47b7-8808-f56b3ea895bf" CreationDate="2023-08-07T06:26:42.650" UserId="2762" Text="If you follow the Substrate tutorial: [Connect a local parachain][1] there is a section where it shows you how to export information about its runtime and genesis state: [Prepare the parachain collator][2].&#xD;&#xA;&#xD;&#xA;1- Export the WebAssembly runtime for the parachain.&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node export-genesis-wasm --chain your-chainspec.json name-of-your-wasm&#xD;&#xA;&#xD;&#xA;2- And Generate a parachain genesis state.&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node export-genesis-state --chain your-chainspec.json name-of-your-genesis-state&#xD;&#xA;&#xD;&#xA;What you have to upload in the issue for requesting Rococo slots are this 2 files you have just generated: `name-of-your-wasm` and `name-of-your-genesis-state`. Drag and drop the files exactly like that or you can copy the content of this files and paste there.&#xD;&#xA;What means with the Do not submit a compressed file is basically to upload only the file and do not compressed it to avoid issues when retrieving the data.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/#prepare-the-parachain-collator" ContentLicense="CC BY-SA 4.0" />
  <row Id="37827" PostHistoryTypeId="2" PostId="9533" RevisionGUID="63ca60a8-8790-44c2-92c5-9b46a0e6fdf5" CreationDate="2023-08-07T06:41:12.877" UserId="2762" Text="Running your node with `--help` will show you all the flags with a quick definition: `./target/release/node-template --help`&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;--rpc-port &lt;PORT&gt;.  //Specify JSON-RPC server TCP port&#xD;&#xA;&#xD;&#xA;--port &lt;PORT&gt; //Specify p2p protocol TCP port&#xD;&#xA;```&#xD;&#xA;In this case `--port` specifies the port to listen on for peer-to-peer (p2p) traffic (for the nodes to connect) and `--rpc-port` specifies the port to listen on for incoming RPC traffic (for frontend to connect with the node).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37829" PostHistoryTypeId="2" PostId="9534" RevisionGUID="1e723c73-0933-425e-b5a3-ac3a4c4bfbbd" CreationDate="2023-08-07T07:23:16.560" UserId="4519" Text="We have observed that we need a minimum of 3 peers to start the warp sync process, and we realized it is due to this constant defined in https://github.com/paritytech/substrate/blob/d38d176b844aab1338ce79eb71cd6df86c97d4a0/client/network/sync/src/lib.rs#L141-L142.&#xD;&#xA;&#xD;&#xA;Is there a reason to set this to 3? Could this be configurable to less or more? AFAIK the warp sync process already verifies the state against the relay-chain storage-values, so this should not be malleable even if we set this value to 1 right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37831" PostHistoryTypeId="1" PostId="9534" RevisionGUID="1e723c73-0933-425e-b5a3-ac3a4c4bfbbd" CreationDate="2023-08-07T07:23:16.560" UserId="4519" Text="Is MIN_PEERS_TO_START_WARP_SYNC=3 for a security reason?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37832" PostHistoryTypeId="3" PostId="9534" RevisionGUID="1e723c73-0933-425e-b5a3-ac3a4c4bfbbd" CreationDate="2023-08-07T07:23:16.560" UserId="4519" Text="|warp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37833" PostHistoryTypeId="2" PostId="9535" RevisionGUID="e6b32c6e-d94f-4f10-9438-c6bbd5bc21e4" CreationDate="2023-08-07T08:42:22.117" UserId="3387" Text="Does anyone know when the rococo-contracts-rpc.polkadot.io is going to upgrade their nodes to the latest available version ?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zLrEa.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/JjqmX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37835" PostHistoryTypeId="1" PostId="9535" RevisionGUID="e6b32c6e-d94f-4f10-9438-c6bbd5bc21e4" CreationDate="2023-08-07T08:42:22.117" UserId="3387" Text="rococo-contracts-rpc.polkadot.io, upgrade their nodes to the latest avaliable version" ContentLicense="CC BY-SA 4.0" />
  <row Id="37836" PostHistoryTypeId="3" PostId="9535" RevisionGUID="e6b32c6e-d94f-4f10-9438-c6bbd5bc21e4" CreationDate="2023-08-07T08:42:22.117" UserId="3387" Text="|ink|smart-contract|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37837" PostHistoryTypeId="6" PostId="9508" RevisionGUID="db741884-f36d-44f6-b634-5869958ae957" CreationDate="2023-08-07T08:49:22.717" UserId="2844" Comment="edited tags" Text="|parachain|substrate-parachain-template|relay-chain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37838" PostHistoryTypeId="5" PostId="9508" RevisionGUID="db741884-f36d-44f6-b634-5869958ae957" CreationDate="2023-08-07T08:49:22.717" UserId="2844" Comment="edited tags" Text="Now I am acquiring testnet slots in rococo, In [modify-the-chain-specification-file](https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/#modify-the-chain-specification-file) steps 5, it says `Add the public key for your account to the session keys section`. I added like this,&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;but while converting into raw file I got this error,&#xD;&#xA;&#xD;&#xA;`Thread 'main' panicked at 'Validator in session 1 missing keys!',`&#xD;&#xA;&#xD;&#xA;I didn't find much information, can you please help me how to fix this? Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SvMUh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37839" PostHistoryTypeId="50" PostId="8199" RevisionGUID="74d5c861-9cc7-47b0-8d0e-a550007dfea7" CreationDate="2023-08-07T09:03:00.377" UserId="-1" />
  <row Id="37840" PostHistoryTypeId="5" PostId="9508" RevisionGUID="feb96d51-6dec-4109-8f4e-e6306af99fcf" CreationDate="2023-08-07T09:48:33.797" UserId="2844" Comment="deleted 8 characters in body" Text="Now I am acquiring testnet slots in rococo, In [modify-the-chain-specification-file](https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/#modify-the-chain-specification-file) steps 5, it says `Add the public key for your account to the session keys section`. I added like this,&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;but while converting into raw file I got this error,&#xD;&#xA;&#xD;&#xA;`Thread 'main' panicked at 'Validator in session 1 missing keys!',`&#xD;&#xA;&#xD;&#xA;I didn't find much information, can you please help me how to fix this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/SvMUh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37841" PostHistoryTypeId="5" PostId="9535" RevisionGUID="4d5903ec-7987-45a7-b3a3-4c83bfa77981" CreationDate="2023-08-07T10:02:03.653" UserId="354" Comment="improved formatting" Text="Does anyone know when the `rococo-contracts-rpc.polkadot.io` is going to upgrade their nodes to the latest available version ?&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Ink version:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zLrEa.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/JjqmX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37842" PostHistoryTypeId="24" PostId="9535" RevisionGUID="4d5903ec-7987-45a7-b3a3-4c83bfa77981" CreationDate="2023-08-07T10:02:03.653" Comment="Proposed by 354 approved by 3387 edit id of 516" ContentLicense="CC BY-SA 4.0" />
  <row Id="37843" PostHistoryTypeId="2" PostId="9536" RevisionGUID="822d873e-9f0e-401f-9d17-caef5f98feae" CreationDate="2023-08-07T10:50:34.293" UserId="4522" Text="following this example I can preview if an extrinsic will succeed https://substrate.stackexchange.com/questions/4799/how-to-preflight-preview-a-transaction&#xD;&#xA;&#xD;&#xA;But how can I preview all events emitted by this extrinsic? " ContentLicense="CC BY-SA 4.0" />
  <row Id="37845" PostHistoryTypeId="1" PostId="9536" RevisionGUID="822d873e-9f0e-401f-9d17-caef5f98feae" CreationDate="2023-08-07T10:50:34.293" UserId="4522" Text="How to preview events by dry running an extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37846" PostHistoryTypeId="3" PostId="9536" RevisionGUID="822d873e-9f0e-401f-9d17-caef5f98feae" CreationDate="2023-08-07T10:50:34.293" UserId="4522" Text="|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37847" PostHistoryTypeId="2" PostId="9537" RevisionGUID="a27d744c-10c9-4d5b-97be-dd111fa29355" CreationDate="2023-08-07T11:04:14.980" UserId="4440" Text="Is there any ready open blockchain to start? I need the one with staking and with opportunity to make new tokens. To send tokens with other users in this blockchain. Or maybe someting close to this. &#xD;&#xA;I tried to make it from substrate-node-template, but I dont understand how to add new pallets like pallet_staking or others. Or maybe you can recommend any clear tutorial except the official substrate one. Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="37849" PostHistoryTypeId="1" PostId="9537" RevisionGUID="a27d744c-10c9-4d5b-97be-dd111fa29355" CreationDate="2023-08-07T11:04:14.980" UserId="4440" Text="Do you know any ready-to-start substrate based blockchain that I can take as fundament for my blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37850" PostHistoryTypeId="3" PostId="9537" RevisionGUID="a27d744c-10c9-4d5b-97be-dd111fa29355" CreationDate="2023-08-07T11:04:14.980" UserId="4440" Text="|substrate-node|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37851" PostHistoryTypeId="2" PostId="9538" RevisionGUID="8c28f494-8d23-439f-913d-ba5e40b111d4" CreationDate="2023-08-07T12:04:45.873" UserId="3136" Text="**Here i am trying to show you easy way to add pallet into substrate node template**&#xD;&#xA;&#xD;&#xA;First you need to add dependency of your pallet which you want to add into substrate-node-template in the `runtime/Cargo.toml` then add the pallet into the`runtime/src/lib.rs` then Implement the configuration trait for the  pallet into `runtime/src/lib.rs`at the last add the pallet to the `construct_runtime.`&#xD;&#xA;Then build it by using ****cargo build --release**** &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37853" PostHistoryTypeId="2" PostId="9539" RevisionGUID="2cba5eaa-efd8-45ff-91f5-1b37896f09fb" CreationDate="2023-08-07T12:27:30.420" UserId="3136" Text="**With the help of XCM you can do this.**&#xD;&#xA;&#xD;&#xA;Implementing `cross-chain` communication, such as through the `XCM protocol`, can be challenging due to the lack of comprehensive documentation. However, you can draw inspiration from successful implementations of the `cumulus git hub` [you can get a idea from pink-pong pallet][1] By leveraging your ingenuity, you can devise a strategy to integrate XCM-like functionality into your blockchain. This will involve understanding the underlying principles of cross-chain messaging, designing a compatible architecture, and ensuring robust security measures.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus" ContentLicense="CC BY-SA 4.0" />
  <row Id="37855" PostHistoryTypeId="2" PostId="9540" RevisionGUID="f1c6e4d0-a65a-4907-bbda-4dd0d97b3234" CreationDate="2023-08-07T13:49:15.073" UserId="4523" Text="I'm trying to use the Polkadot CLI to create an unsigned extrinsic, which I subsequently generate a signature for sign out of band using my custody provider. The Polkadot CLI has a useful tool for doing this available and documented [here](https://github.com/polkadot-js/tools/tree/master/packages/signer-cli).&#xD;&#xA;&#xD;&#xA;I'm using the following input:&#xD;&#xA;&#xD;&#xA;```yarn run:signer sendOffline --ws wss://rpc.polkadot.io --account 1ab..2yz convictionVoting.delegate 0000 1cd...3Ag locked3x 1```&#xD;&#xA;&#xD;&#xA;The tool seems to generate an unsigned extrinsic with no problems and then prompts me for a signature as documented. Upon pasting in the signature and continuing, I get the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: createType(ExtrinsicSignature):: Unable to create Enum via index 108, in Ed25519, Sr25519, Ecdsa&#xD;&#xA;    at createTypeUnsafe (file:///Users/***/github/tools/node_modules/@polkadot/types-create/create/type.js:51:22)&#xD;&#xA;    at TypeRegistry.createTypeUnsafe (file:///Users/***/github/tools/node_modules/@polkadot/types/create/registry.js:267:16)&#xD;&#xA;    at Type.addSignature (file:///Users/***/github/tools/node_modules/@polkadot/types/extrinsic/v4/ExtrinsicSignature.js:104:86)&#xD;&#xA;    at Type.addSignature (file:///Users/***/github/tools/node_modules/@polkadot/types/extrinsic/v4/Extrinsic.js:64:24)&#xD;&#xA;    at Submittable.addSignature (file:///Users/***/github/tools/node_modules/@polkadot/types/extrinsic/Extrinsic.js:196:20)&#xD;&#xA;    at Submittable.__internal__signViaSigner (file:///Users/***/github/tools/node_modules/@polkadot/api/submittable/createClass.js:121:23)&#xD;&#xA;    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)&#xD;&#xA;    at async file:///Users/***/github/tools/node_modules/@polkadot/api/submittable/createClass.js:62:36&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, it looks as though to me like the tool has an issue with the format of the signature I'm providing. As I understand, Polkadot supports Ed25519 and Sr25519 and Ecdsa, and the custody provider I'm using supports `ECDSA_SECP256K1` and `EDDSA_ED25519`, so assuming using either of those curves works fine, and so in theory there should be no problems with format of the signature. However, since I'm getting the error posted above, I'm wondering if I'm doing something wrong/silly or overlooked something. For instance, could the unsigned extrinsic contain some invalid data causing the aforementioned error? Any insight would be much appreciated. &#xD;&#xA;&#xD;&#xA;Many thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="37857" PostHistoryTypeId="1" PostId="9540" RevisionGUID="f1c6e4d0-a65a-4907-bbda-4dd0d97b3234" CreationDate="2023-08-07T13:49:15.073" UserId="4523" Text="Error: createType(ExtrinsicSignature):: Unable to create Enum via index 108, in Ed25519, Sr25519, Ecdsa" ContentLicense="CC BY-SA 4.0" />
  <row Id="37858" PostHistoryTypeId="3" PostId="9540" RevisionGUID="f1c6e4d0-a65a-4907-bbda-4dd0d97b3234" CreationDate="2023-08-07T13:49:15.073" UserId="4523" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37859" PostHistoryTypeId="50" PostId="7564" RevisionGUID="078b1eab-57b4-4f3b-9c1c-cae7e511de66" CreationDate="2023-08-07T15:04:30.530" UserId="-1" />
  <row Id="37860" PostHistoryTypeId="2" PostId="9541" RevisionGUID="7ba4d5e2-d68a-4233-938f-90f0da6b654c" CreationDate="2023-08-07T16:50:18.503" UserId="2844" Text="We now assigned slots [here](https://github.com/paritytech/subport/issues/582#issuecomment-1667816235).&#xD;&#xA;&#xD;&#xA;and I can see my paraId in `Network-&gt;Parachains-&gt;Overview` section.&#xD;&#xA;I also started the collator node but not blocks are producing.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;What I am supposed to do now?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NQe2z.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37862" PostHistoryTypeId="1" PostId="9541" RevisionGUID="7ba4d5e2-d68a-4233-938f-90f0da6b654c" CreationDate="2023-08-07T16:50:18.503" UserId="2844" Text="What after slot assigned?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37863" PostHistoryTypeId="3" PostId="9541" RevisionGUID="7ba4d5e2-d68a-4233-938f-90f0da6b654c" CreationDate="2023-08-07T16:50:18.503" UserId="2844" Text="|substrate-parachain-template|rococo|slot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37864" PostHistoryTypeId="2" PostId="9542" RevisionGUID="09ea6e95-a89d-4443-ba95-dafb06b2f344" CreationDate="2023-08-07T21:49:47.817" UserId="522" Text="The grandpa.proveFinality rpc provides the justification for the last block by a GRANDPA authorities set (of some set_id) and ancestry headers to prove the finality of a block within the same set_id. But it does not seem to include any indication in the provided finality_proof that the GRANDPA authorities have changed.&#xD;&#xA;&#xD;&#xA;So an adversary that has corrupted a(n old) GRANDPA authorities set can forever fool an external observer that the GRANDPA authorities have not changed and the finality proofs being provided by the adversary is infact valid, if the external observer does not have access to the chain's storage (and continuously checks it)?&#xD;&#xA;&#xD;&#xA;The only way I can think of solving this is that we can check every single header for `ConsensusLog::ScheduledChange` or `ConsensusLog::ForcedChange` digest logs. `ConsensusLog::ScheduledChange` seems to apply the new set immediately in the same block the digest is emitted, and in the case of `ConsensusLog::ForcedChange` it applies the new set after `delay` number of blocks *after* the block in which the digest is emitted.&#xD;&#xA;Is this a reliable way to approach this? Is this how it is intended?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37866" PostHistoryTypeId="1" PostId="9542" RevisionGUID="09ea6e95-a89d-4443-ba95-dafb06b2f344" CreationDate="2023-08-07T21:49:47.817" UserId="522" Text="How is an external observer supposed to reliably know when the GRANDPA authorities have changed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37867" PostHistoryTypeId="3" PostId="9542" RevisionGUID="09ea6e95-a89d-4443-ba95-dafb06b2f344" CreationDate="2023-08-07T21:49:47.817" UserId="522" Text="|grandpa|finality|digest|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37868" PostHistoryTypeId="2" PostId="9543" RevisionGUID="f91b08b5-f73b-4e4e-9da9-c901476f3283" CreationDate="2023-08-08T00:27:58.503" UserId="181" Text="Are you still running into this issue?&#xD;&#xA;&#xD;&#xA;I believe you can do something like this:&#xD;&#xA;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;		fn offchain_worker(now: T::BlockNumber) {&#xD;&#xA;			YourStorageMapHere::&lt;T&gt;::iter().for_each(|v| {&#xD;&#xA;				// Do things with the iterated values `v` in here&#xD;&#xA;			});&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Bear in mind the usual considerations when developing around offchain workers, for example, not trusting the offchain worker." ContentLicense="CC BY-SA 4.0" />
  <row Id="37870" PostHistoryTypeId="6" PostId="9541" RevisionGUID="992fd628-6201-4bf4-be5f-8945acff6719" CreationDate="2023-08-08T03:27:21.563" UserId="2844" Comment="edited tags" Text="|parachain|substrate-parachain-template|rococo|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37871" PostHistoryTypeId="5" PostId="9541" RevisionGUID="770e5efd-c459-4ea5-8c35-9803a005f75c" CreationDate="2023-08-08T04:36:04.450" UserId="2844" Comment="added 39 characters in body" Text="We now assigned slots [here](https://github.com/paritytech/subport/issues/582#issuecomment-1667816235).&#xD;&#xA;&#xD;&#xA;and I can see my paraId in `Network-&gt;Parachains-&gt;Overview` section.&#xD;&#xA;I also started the collator node but not blocks are producing.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;What I am supposed to do now? Can you please suggest some resources?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NQe2z.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37872" PostHistoryTypeId="2" PostId="9544" RevisionGUID="d0366a6c-0f2d-4e6f-bb6f-5dc80c42dacd" CreationDate="2023-08-08T05:51:48.943" UserId="139" Text="I am trying to understand if quadratic complexity is bad (gives inaccurate results) when used for benchmarking: &#xD;&#xA;&#xD;&#xA;I have a pallet whose weight would ideally depend on `x * y`  where x and y are lengths of two vectors. Just for context this is how the vector looks like `Vec&lt;_, Vec&lt;_&gt;&gt;`. During benchmarking, the first thought that comes to mind is to make the benchmark a nested for loop :&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;fn benchmark(x: Linear&lt;1, 5000&gt; , y : Linear&lt;1, 5000&gt;) {&#xD;&#xA; for i in 0 .. x {&#xD;&#xA;  for j in 0 .. y {&#xD;&#xA;    // setup input parameter&#xD;&#xA;  }&#xD;&#xA; }&#xD;&#xA;#[extrinsic_call]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Given that this input parameter is now depends on two variables that are kind of nested implying a complexity of `O(i * j)`, is it okay for getting an accurate benchmark?&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="37874" PostHistoryTypeId="1" PostId="9544" RevisionGUID="d0366a6c-0f2d-4e6f-bb6f-5dc80c42dacd" CreationDate="2023-08-08T05:51:48.943" UserId="139" Text="Quadratic complexity in Benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="37875" PostHistoryTypeId="3" PostId="9544" RevisionGUID="d0366a6c-0f2d-4e6f-bb6f-5dc80c42dacd" CreationDate="2023-08-08T05:51:48.943" UserId="139" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37876" PostHistoryTypeId="2" PostId="9545" RevisionGUID="aa8ece61-d751-4e24-9a77-db710f42650d" CreationDate="2023-08-08T06:29:46.753" UserId="1982" Text="It was a bit tricky to find a solution, thanks to the parity team member who helped with this problem.&#xD;&#xA;&#xD;&#xA;When working with `pallet-nft-fractionalization` which is available only after `v0.9.43`.we would have to upgrade the runtime of the node to version `v0.9.43`. Along with that, we would have to make minor runtime changes, which can be found in this PR: https://github.com/sacha-l/substrate-nfts-node/pull/4/files if you would like to get a basic template for NFT + fractionalization, you can use https://github.com/sacha-l/substrate-nfts-node/ repo to get started." ContentLicense="CC BY-SA 4.0" />
  <row Id="37878" PostHistoryTypeId="2" PostId="9546" RevisionGUID="68ed08bb-c107-4fcd-bdac-e02e419b9e70" CreationDate="2023-08-08T06:37:12.310" UserId="272" Text="It could be possible to design an application with an event subscriber with the help of &lt;a href=&quot;https://polkadot.js.org/docs/substrate/events/&quot;&gt;polkadot-js&lt;/a&gt; and then use it also to submit events to your blockchain B. However the process can be quite involved depending on what you want to do. I suggest going through the documentation on submitting extrinsics and reading events." ContentLicense="CC BY-SA 4.0" />
  <row Id="37880" PostHistoryTypeId="6" PostId="9544" RevisionGUID="6059b0ba-4f8b-42d8-b202-28f37ab9c562" CreationDate="2023-08-08T07:10:55.117" UserId="139" Comment="edited tags" Text="|benchmarking|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37881" PostHistoryTypeId="2" PostId="9547" RevisionGUID="4852aa2f-4f1e-4fab-9e6a-3ffb91d01a1c" CreationDate="2023-08-08T08:20:54.583" UserId="3524" Text="I am migrating from AWS to Azure Cloud. I have two parachain collators running. One on AWS (yet to migrate) and another on Azure Cloud (migrated). &#xD;&#xA;Whenever I restart the service on AWS, it hardly takes a couple of minutes to sync and start producing blocks. However, when I restart the service on Azure Cloud VM, the service takes more than 10 hours to start. No logs in debug mode. It just stops at ```Is collating: yes``` and nothing after that for a very long time. &#xD;&#xA;&#xD;&#xA;Both the servers have 2-core CPUs and 8 GB of RAM. " ContentLicense="CC BY-SA 4.0" />
  <row Id="37883" PostHistoryTypeId="1" PostId="9547" RevisionGUID="4852aa2f-4f1e-4fab-9e6a-3ffb91d01a1c" CreationDate="2023-08-08T08:20:54.583" UserId="3524" Text="Collator starts after more than 10 hours on Azure cloud" ContentLicense="CC BY-SA 4.0" />
  <row Id="37884" PostHistoryTypeId="3" PostId="9547" RevisionGUID="4852aa2f-4f1e-4fab-9e6a-3ffb91d01a1c" CreationDate="2023-08-08T08:20:54.583" UserId="3524" Text="|parachain-collator|block-production|blockchain|collator|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37885" PostHistoryTypeId="5" PostId="9541" RevisionGUID="cb831523-6b1f-4aed-819f-c454955ed996" CreationDate="2023-08-08T09:27:04.020" UserId="2844" Comment="added 128 characters in body" Text="We now assigned slots [here](https://github.com/paritytech/subport/issues/582#issuecomment-1667816235).&#xD;&#xA;&#xD;&#xA;and I can see my paraId in `Network-&gt;Parachains-&gt;Overview` section.&#xD;&#xA;I also started the collator node but not blocks are producing. this is log after running collator node,&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;What I am supposed to do now? Can you please suggest some resources?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Dy64t.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/NQe2z.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37886" PostHistoryTypeId="2" PostId="9548" RevisionGUID="8e02ff08-4e3e-41d9-9e86-ff168a67e1f2" CreationDate="2023-08-08T09:40:57.413" UserId="2844" Text="My assigned slots Id in rococo, it was listed in `parachain-overview` section but now it is in `Parathread` section with leases `456 - 460`. What is the meaning of this? Someone please explain.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/mbV5a.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37888" PostHistoryTypeId="1" PostId="9548" RevisionGUID="8e02ff08-4e3e-41d9-9e86-ff168a67e1f2" CreationDate="2023-08-08T09:40:57.413" UserId="2844" Text="why assigned rococo parachain slots in parathread?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37889" PostHistoryTypeId="3" PostId="9548" RevisionGUID="8e02ff08-4e3e-41d9-9e86-ff168a67e1f2" CreationDate="2023-08-08T09:40:57.413" UserId="2844" Text="|substrate-parachain-template|rococo|slot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37890" PostHistoryTypeId="2" PostId="9549" RevisionGUID="ea2425cc-b08e-43db-81ed-178f5add8937" CreationDate="2023-08-08T09:52:03.110" UserId="3736" Text="I see that staking controller accounts cannot be created anymore, and instead Staking Proxy accounts are introduced.&#xD;&#xA;&#xD;&#xA;Should a Staking Proxy, when staking on behalf a Stash account, post the staking call as a stash call packed within a proxying call, as other proxies do?&#xD;&#xA;&#xD;&#xA;If the proxying chain is longer (eg. the Staking Proxy has nominated in its turn another Staking or Non-Transfer proxy, etc), should the last proxy account in the chain pack the corresponding number of proxying calls, from every proxy on behalf of its nominator, one within another?&#xD;&#xA;&#xD;&#xA;Thank you in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="37892" PostHistoryTypeId="1" PostId="9549" RevisionGUID="ea2425cc-b08e-43db-81ed-178f5add8937" CreationDate="2023-08-08T09:52:03.110" UserId="3736" Text="Staking Proxy and proxying it in turn" ContentLicense="CC BY-SA 4.0" />
  <row Id="37893" PostHistoryTypeId="3" PostId="9549" RevisionGUID="ea2425cc-b08e-43db-81ed-178f5add8937" CreationDate="2023-08-08T09:52:03.110" UserId="3736" Text="|staking|proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37894" PostHistoryTypeId="2" PostId="9550" RevisionGUID="724ed417-7fdf-4da4-b1db-daaf830e346d" CreationDate="2023-08-08T12:48:11.017" UserId="427" Text="Let's say I have a pallet_x. In this pallet i have an extrinsic where I get the active_era using the below code :&#xD;&#xA;&#xD;&#xA;                Staking::&lt;T&gt;::active_era()&#xD;&#xA;				              .map(|e| e.index)&#xD;&#xA;				              .ok_or(Error::&lt;T&gt;::FailedToGetActiveEra)?&#xD;&#xA;&#xD;&#xA;So when I write benchmark for this extrinsic it fails with this error **FailedToGetActiveEra**&#xD;&#xA;&#xD;&#xA;My question now is how to insert value to ActiveEra storage in pallet_staking from pallet_x ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37896" PostHistoryTypeId="1" PostId="9550" RevisionGUID="724ed417-7fdf-4da4-b1db-daaf830e346d" CreationDate="2023-08-08T12:48:11.017" UserId="427" Text="Benchmarking in a cusom pallet requires a storage put operation in Staking pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="37897" PostHistoryTypeId="3" PostId="9550" RevisionGUID="724ed417-7fdf-4da4-b1db-daaf830e346d" CreationDate="2023-08-08T12:48:11.017" UserId="427" Text="|pallet|benchmarking|benchmark|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37898" PostHistoryTypeId="5" PostId="9544" RevisionGUID="b7d1cd54-00c5-43e9-a464-a16a46adfde3" CreationDate="2023-08-08T13:18:21.257" UserId="139" Comment="added 95 characters in body" Text="I am trying to understand if quadratic complexity is bad (gives inaccurate results) when used for benchmarking: &#xD;&#xA;&#xD;&#xA;I have a pallet whose weight would ideally depend on `x * y`  where x and y are lengths of two vectors. Just for context this is how the vector looks like `Vec&lt;_, Vec&lt;_&gt;&gt;`. To replicate this, during benchmarking, the first thought that comes to mind is to make the benchmark a nested for loop :&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;fn benchmark(x: Linear&lt;1, 5000&gt; , y : Linear&lt;1, 5000&gt;) {&#xD;&#xA; for i in 0 .. x {&#xD;&#xA;  for j in 0 .. y {&#xD;&#xA;    // setup input parameter&#xD;&#xA;  }&#xD;&#xA; }&#xD;&#xA;#[extrinsic_call]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Given that this input parameter is now depends on two variables that are kind of nested implying a complexity of `O(i * j)`, is it okay for getting an accurate benchmark? Additional question: is this how you would set up a non-linear benchmark ? &#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="37899" PostHistoryTypeId="2" PostId="9551" RevisionGUID="f3c5df74-12d6-4180-b50e-3d508c0d3328" CreationDate="2023-08-08T13:35:48.617" UserId="3122" Text="You probably need to specify custom `types.json` in `polkadot.js.org`. These links might be helpful: &#xD;&#xA;1. https://polkadot.js.org/docs/api/start/types.extend/&#xD;&#xA;2. https://stackoverflow.com/questions/68487857/how-to-generate-types-json-in-substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="37901" PostHistoryTypeId="2" PostId="9552" RevisionGUID="4e076389-b4b0-428c-9693-85d17ef7f911" CreationDate="2023-08-08T14:01:30.037" UserId="94" Text="Currently the benchmarking backend logic only supports linear components, which is why the type is called `Linear`. The assumption is that the output weight relates linearly to the input parameters.  &#xD;&#xA;&#xD;&#xA;Now this is not given in your case. If you are sure that it is linear to `x * y` then you can instead use another component `z` which is just defined as `x * y`. Then you can make your benchmark linear again.   &#xD;&#xA;Otherwise a work-around can be done where two benchmarks are written. One which fixes `x` to 5000 and one where `y` is fixed to 5000 and then take the `.min` of both in your call weight.  &#xD;&#xA;It is not ideal since it will still over-estimate one of them, but at least not both.&#xD;&#xA;&#xD;&#xA;&gt;Additional question: is this how you would set up a non-linear benchmark ?&#xD;&#xA;&#xD;&#xA;You can do anything in the setup phase. Only the complexity of the `extrinsic_call` (or `block`) is important. Looks fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="37903" PostHistoryTypeId="2" PostId="9553" RevisionGUID="4a8814a6-bf18-47a9-bfa4-271374d6f8b6" CreationDate="2023-08-08T14:08:12.970" UserId="94" Text="You can do it the same way as in tests, by inserting storage items like @Purple_Turtle posted in the comment;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pallet_staking::ActiveEra::&lt;T&gt;::put(…)&#xD;&#xA;```&#xD;&#xA;One example would be from the [nomination-pools](https://github.com/paritytech/substrate/blob/32ab5cbeb29f68a1977e4803fe8c0731fe5c99be/frame/nomination-pools/benchmarking/src/lib.rs#L395) benchmark where it fudges the staking stoarge.&#xD;&#xA;&#xD;&#xA;Normally it is better to have pallets communicate with each other via traits, since otherwise storage invariants can get invalidated when `pallet_x` just modifies the storage of `pallet_y` without its knowledge. But if you only do it in testing/benchmarks, then its fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="37905" PostHistoryTypeId="52" PostId="9544" RevisionGUID="c3751acf-3fc5-47a4-ad77-de615499a6a1" CreationDate="2023-08-08T14:46:48.870" />
  <row Id="37909" PostHistoryTypeId="50" PostId="7548" RevisionGUID="385c18e4-2703-422d-824d-48838729ea8c" CreationDate="2023-08-08T16:00:20.080" UserId="-1" />
  <row Id="37910" PostHistoryTypeId="50" PostId="9210" RevisionGUID="54d63cb8-5f17-44bb-95c0-836ce7b0a912" CreationDate="2023-08-08T17:07:31.053" UserId="-1" />
  <row Id="37911" PostHistoryTypeId="5" PostId="9541" RevisionGUID="e3ae0f00-9e2e-44f7-8e26-2ec2cc3f45c9" CreationDate="2023-08-08T17:43:33.717" UserId="2844" Comment="deleted 39 characters in body" Text="We now assigned slots [here](https://github.com/paritytech/subport/issues/582#issuecomment-1667816235).&#xD;&#xA;&#xD;&#xA;and I can see my paraId in `Network-&gt;Parachains-&gt;Overview` section.&#xD;&#xA;I also started the collator node but not blocks are producing. this is log after running collator node,&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;What I am supposed to do now?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Dy64t.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/NQe2z.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37912" PostHistoryTypeId="2" PostId="9555" RevisionGUID="eb4b2a09-51de-42f5-90da-e370a94151bc" CreationDate="2023-08-08T18:04:51.500" UserId="4527" Text="has anyone come across the fact that prometheus metrics from the collator and embedded relay chain return the official name - rococo_local_testnet, although the collator name in chainspec is local_testnet. Also, metrics that should return block numbers (substrate_block_height) return them only for the relay chain&#xD;&#xA;What could be the problem?&#xD;&#xA;I can also provide metrics files or screenshots if that makes sense" ContentLicense="CC BY-SA 4.0" />
  <row Id="37914" PostHistoryTypeId="1" PostId="9555" RevisionGUID="eb4b2a09-51de-42f5-90da-e370a94151bc" CreationDate="2023-08-08T18:04:51.500" UserId="4527" Text="Incorrect output of prometheus metrics" ContentLicense="CC BY-SA 4.0" />
  <row Id="37915" PostHistoryTypeId="3" PostId="9555" RevisionGUID="eb4b2a09-51de-42f5-90da-e370a94151bc" CreationDate="2023-08-08T18:04:51.500" UserId="4527" Text="|parachain|parachain-collator|prometheus|metrics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37918" PostHistoryTypeId="2" PostId="9557" RevisionGUID="3e39ef72-c4b5-4ca6-aa2f-6a57354b66c4" CreationDate="2023-08-08T18:42:09.613" UserId="3711" Text="In the [cargo contract v3](https://github.com/paritytech/cargo-contract/releases/tag/v3.0.0) release, breaking changes were made for how contracts are built (`cdylib` -&gt; `bin`) and specifying `no_main`.&#xD;&#xA;&#xD;&#xA;I've found that cargo contract v2 produces contracts compatible with `substrate-contracts-node` version 0.24 and below but incompatible with version 0.25 and above.&#xD;&#xA;&#xD;&#xA;Conversely I've found that cargo contract v3 produces contracts that are not compatible with `substrate-contracts-node` version 0.24 and below but compatible with v0.25 upwards.&#xD;&#xA;&#xD;&#xA;So my question is this: how do chains deal with this breaking change? If my chain is currently running version 0.24 of `substrate-contracts-node` and all contracts are built using cargo contract version 2, the new contracts from `cargo-contract` v3 are incompatible and are rejected on code upload (we're experiencing this with rococo contracts node at the moment!).&#xD;&#xA;&#xD;&#xA;I assume the chain has to upgrade, but what happens to the existing contracts which are in the old format (`cargo-contract` v2 format)? Do they get purged? Do they run in some legacy mode? are they rebuilt in the correct (v3) format?&#xD;&#xA;&#xD;&#xA;Context: I don't run my own chain, I build smart contracts and am curious :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="37920" PostHistoryTypeId="1" PostId="9557" RevisionGUID="3e39ef72-c4b5-4ca6-aa2f-6a57354b66c4" CreationDate="2023-08-08T18:42:09.613" UserId="3711" Text="What happens to legacy contracts given breaking changes to cargo-contract v3?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37921" PostHistoryTypeId="3" PostId="9557" RevisionGUID="3e39ef72-c4b5-4ca6-aa2f-6a57354b66c4" CreationDate="2023-08-08T18:42:09.613" UserId="3711" Text="|ink|smart-contract|substrate-contracts-node|substrate-node|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37922" PostHistoryTypeId="5" PostId="9553" RevisionGUID="91bb6620-cac0-4df8-aec3-6b128563cb8f" CreationDate="2023-08-08T19:14:25.833" UserId="94" Comment="added 521 characters in body" Text="You can do it the same way as in tests, by inserting storage items like @Purple_Turtle posted in the comment;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pallet_staking::ActiveEra::&lt;T&gt;::put(…)&#xD;&#xA;```&#xD;&#xA;One example would be from the [nomination-pools](https://github.com/paritytech/substrate/blob/32ab5cbeb29f68a1977e4803fe8c0731fe5c99be/frame/nomination-pools/benchmarking/src/lib.rs#L395) benchmark where it fudges the staking stoarge.&#xD;&#xA;&#xD;&#xA;Normally it is better to have pallets communicate with each other via traits, since otherwise storage invariants can get invalidated when `pallet_x` just modifies the storage of `pallet_y` without its knowledge. But if you only do it in testing/benchmarks, then its fine.&#xD;&#xA;&#xD;&#xA;Since that type has private fields, you can hack around it by decoding it from its struct elements. It's not ideal, but better than having to go through an upstream change:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn hack() {&#xD;&#xA;	use codec::{Encode, Decode};&#xD;&#xA;	&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		let raw = (4 as sp_staking::EraIndex, Some(10u64)).encode();&#xD;&#xA;		let info = pallet_staking::ActiveEraInfo::decode(&amp;mut &amp;raw[..]).unwrap();&#xD;&#xA;		// Now you can put it into stoarge.&#xD;&#xA;		pallet_staking::ActiveEra::&lt;Test&gt;::put(&amp;info);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="37923" PostHistoryTypeId="2" PostId="9558" RevisionGUID="e2e8f816-016f-448d-becf-ca6567f7fa8c" CreationDate="2023-08-08T20:01:57.163" UserId="4528" Text="I use Subxt for parsing blocks but am only interested in finalized blocks.&#xD;&#xA;I know that Subxt provides a WebSocket-based subscription for finalized blocks, but WebSockets are unavailable to me.&#xD;&#xA;&#xD;&#xA;Is there any API call, storage query, or data in a block header providing this information?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37925" PostHistoryTypeId="1" PostId="9558" RevisionGUID="e2e8f816-016f-448d-becf-ca6567f7fa8c" CreationDate="2023-08-08T20:01:57.163" UserId="4528" Text="How to know if a block is finalized" ContentLicense="CC BY-SA 4.0" />
  <row Id="37926" PostHistoryTypeId="3" PostId="9558" RevisionGUID="e2e8f816-016f-448d-becf-ca6567f7fa8c" CreationDate="2023-08-08T20:01:57.163" UserId="4528" Text="|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37927" PostHistoryTypeId="2" PostId="9559" RevisionGUID="0b725210-b3a2-4c14-876c-9b5e0e51a499" CreationDate="2023-08-08T22:07:09.433" UserId="3407" Text="I have an extrinsic in one of my pallets that looks validates a signature over a message, which is separate from the actual extrinsic being submitted.&#xD;&#xA;&#xD;&#xA;The code can be simplified to look like the below&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;pub fn do_something(&#xD;&#xA;  origin: OriginFor&lt;T&gt;,&#xD;&#xA;  msg: SignableMessage,&#xD;&#xA;  user_signer: T::AccountId,&#xD;&#xA;  user_sig: MultiSignature&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;  /* -- snip -- */&#xD;&#xA;  let signer_bytes = Self::account_to_bytes(&amp;user_signer)?;&#xD;&#xA;  let valid = msg.using_encoded(|encoded| {&#xD;&#xA;    let msg = [DOMAIN_SEP_TAG, encoded].concat();&#xD;&#xA;    user_sig.verify(msg.as_ref(), &amp;signer_bytes.into())&#xD;&#xA;  });&#xD;&#xA;  ensure!(valid, &lt;Error&lt;T&gt;&gt;::InvalidSignature);&#xD;&#xA;  /* -- snip -- */&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The code works fine, but benchmarking it is challenging, because benchmarking setup runs in WASM and as such cannot create the signature. The only way I can think of to get around this is basically to create a signature for all messages I benchmark ahead of time, and write their bytes into a static map, then read that out when doing benchmarks.&#xD;&#xA;&#xD;&#xA;Is there a better way to do this? Has anyone else run into the same problem?&#xD;&#xA;&#xD;&#xA;For this particular usecase, it does not make sense to use the built-in proxy pallets, or something on-chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="37929" PostHistoryTypeId="1" PostId="9559" RevisionGUID="0b725210-b3a2-4c14-876c-9b5e0e51a499" CreationDate="2023-08-08T22:07:09.433" UserId="3407" Text="Benchmarking an extrinsic that validates a signature" ContentLicense="CC BY-SA 4.0" />
  <row Id="37930" PostHistoryTypeId="3" PostId="9559" RevisionGUID="0b725210-b3a2-4c14-876c-9b5e0e51a499" CreationDate="2023-08-08T22:07:09.433" UserId="3407" Text="|benchmarking|substrate-node|signing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37931" PostHistoryTypeId="2" PostId="9560" RevisionGUID="fefc80a8-36e5-4e73-b7ba-04cc4d7a2fd6" CreationDate="2023-08-08T22:28:49.740" UserId="2960" Text="I am getting the below error when I run substrate-parachain-template version v1.0.0 .&#xD;&#xA;I am using zomebinet to run the relaychain and parachain nodes. I was using branch polkadot-v0.8.43 and everything worked fine, but I tried with the latest branch which is polkadot-v1.0.0 but I get the error below. I have also attached my zombienet config after the error.&#xD;&#xA;This error only happens with branch v1.0.0 of substrate-parachain-template&#xD;&#xA;&#xD;&#xA;    Error:  	 Error: Command failed with exit code 1: bash -c binaries/parachain-template-node-v1.0.0 export-genesis-state --chain zn-db/template-rococo-1000-rococo-local.json &gt; zn-db/cfg/genesis-state-1000 &amp;&amp; binaries/parachain-template-node-v1.0.0 export-genesis-wasm --chain zn-db/template-rococo-1000-rococo-local.json &gt; zn-db/cfg/genesis-wasm-1000&#xD;&#xA;    Error: Service(Client(Backend(&quot;IO error: While lock file: /Users/me/Library/Application Support/parachain-template-node-v1.0.0/chains/local_testnet/db/full/LOCK: Resource temporarily unavailable&quot;)))&#xD;&#xA;&#xD;&#xA;I ran zombenet with this command &#xD;&#xA;&#xD;&#xA;    zn -p native -d zn-db spawn ./zombienet-config.toml&#xD;&#xA;&#xD;&#xA;zomebiene config &#xD;&#xA;&#xD;&#xA;    [settings]&#xD;&#xA;    timeout = 1000&#xD;&#xA;    &#xD;&#xA;    [relaychain]&#xD;&#xA;    default_command = &quot;binaries/polkadot-v1.0.0&quot;&#xD;&#xA;    default_args = [ &quot;-lparachain=debug&quot; ] &#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;alice&quot;&#xD;&#xA;        validator = true&#xD;&#xA;        ws_port = 9900&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;bob&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;charlie&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;dave&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1000&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    add_to_genesis = true&#xD;&#xA;    chain = &quot;template-rococo&quot;&#xD;&#xA;    &#xD;&#xA;        [parachains.collator]&#xD;&#xA;        command = &quot;binaries/parachain-template-node-v1.0.0&quot;&#xD;&#xA;        name = &quot;parachain-A-1000-collator01&quot;&#xD;&#xA;        ws_port = 9910&#xD;&#xA;        args = [&quot;--log=xcm=trace,pallet-assets=trace&quot;]&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1001&#xD;&#xA;    add_to_genesis = true&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;        [parachains.collator]&#xD;&#xA;        command = &quot;binaries/parachain-template-node-v1.0.0&quot;&#xD;&#xA;        name = &quot;parachain-B-1001-collator01&quot;&#xD;&#xA;        ws_port = 9920&#xD;&#xA;        args = [&quot;--log=xcm=trace,pallet-assets=trace&quot;]&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [types.Header]&#xD;&#xA;    number = &quot;u64&quot;&#xD;&#xA;    parent_hash = &quot;Hash&quot;&#xD;&#xA;    post_state = &quot;Hash&quot;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [[hrmp_channels]]&#xD;&#xA;    sender = 1000&#xD;&#xA;    recipient = 1001 &#xD;&#xA;    max_capacity = 8&#xD;&#xA;    max_message_size = 512&#xD;&#xA;    &#xD;&#xA;    [[hrmp_channels]]&#xD;&#xA;    sender = 1001&#xD;&#xA;    recipient = 1000&#xD;&#xA;    max_capacity = 8&#xD;&#xA;    max_message_size = 512&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37933" PostHistoryTypeId="1" PostId="9560" RevisionGUID="fefc80a8-36e5-4e73-b7ba-04cc4d7a2fd6" CreationDate="2023-08-08T22:28:49.740" UserId="2960" Text="Getting Command failed with exit code when running substrate-parachain-template version polkadot-v1.0.0 with zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="37934" PostHistoryTypeId="3" PostId="9560" RevisionGUID="fefc80a8-36e5-4e73-b7ba-04cc4d7a2fd6" CreationDate="2023-08-08T22:28:49.740" UserId="2960" Text="|polkadot|substrate-parachain-template|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37935" PostHistoryTypeId="2" PostId="9561" RevisionGUID="7d07c331-1b78-432c-9407-23083f210e06" CreationDate="2023-08-08T22:32:43.773" UserId="3960" Text="is it possible to send an unsigned tx from ```subxt``` similar to ```TxClient::sign_and_submit(...)``` ?&#xD;&#xA;&#xD;&#xA;I have a bizarre use case where the transaction authenticity is to be verified on a foreign chain via an RPC and the signer is unknown to the Substrate-based chain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="37937" PostHistoryTypeId="1" PostId="9561" RevisionGUID="7d07c331-1b78-432c-9407-23083f210e06" CreationDate="2023-08-08T22:32:43.773" UserId="3960" Text="Is it possible to submit an unsigned transaction using subxt?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37938" PostHistoryTypeId="3" PostId="9561" RevisionGUID="7d07c331-1b78-432c-9407-23083f210e06" CreationDate="2023-08-08T22:32:43.773" UserId="3960" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37939" PostHistoryTypeId="5" PostId="9560" RevisionGUID="06f432a4-68c6-49e9-b2e4-4180a14c4197" CreationDate="2023-08-08T22:38:31.973" UserId="2960" Comment="added 134 characters in body" Text="I am getting the below error when I build and run substrate-parachain-template using zombienet. I am using the latest release (which uses the latest substrate branch polkadot-v1.0.0).&#xD;&#xA;I was able to run a relay chain and parachain networok successfully using the older branch polkadot-v0.9.43 successfully. but I when I cloned the latest (master branch , which uses substrate branch polkadot-v1.0.0) I get the error below. I have also attached my zombienet config after the error.&#xD;&#xA;This error only happens with branch v1.0.0 of substrate-parachain-template&#xD;&#xA;&#xD;&#xA;    Error:  	 Error: Command failed with exit code 1: bash -c binaries/parachain-template-node-v1.0.0 export-genesis-state --chain zn-db/template-rococo-1000-rococo-local.json &gt; zn-db/cfg/genesis-state-1000 &amp;&amp; binaries/parachain-template-node-v1.0.0 export-genesis-wasm --chain zn-db/template-rococo-1000-rococo-local.json &gt; zn-db/cfg/genesis-wasm-1000&#xD;&#xA;    Error: Service(Client(Backend(&quot;IO error: While lock file: /Users/me/Library/Application Support/parachain-template-node-v1.0.0/chains/local_testnet/db/full/LOCK: Resource temporarily unavailable&quot;)))&#xD;&#xA;&#xD;&#xA;I ran zombenet with this command &#xD;&#xA;&#xD;&#xA;    zn -p native -d zn-db spawn ./zombienet-config.toml&#xD;&#xA;&#xD;&#xA;zomebiene config &#xD;&#xA;&#xD;&#xA;    [settings]&#xD;&#xA;    timeout = 1000&#xD;&#xA;    &#xD;&#xA;    [relaychain]&#xD;&#xA;    default_command = &quot;binaries/polkadot-v1.0.0&quot;&#xD;&#xA;    default_args = [ &quot;-lparachain=debug&quot; ] &#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;alice&quot;&#xD;&#xA;        validator = true&#xD;&#xA;        ws_port = 9900&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;bob&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;charlie&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;dave&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1000&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    add_to_genesis = true&#xD;&#xA;    chain = &quot;template-rococo&quot;&#xD;&#xA;    &#xD;&#xA;        [parachains.collator]&#xD;&#xA;        command = &quot;binaries/parachain-template-node-v1.0.0&quot;&#xD;&#xA;        name = &quot;parachain-A-1000-collator01&quot;&#xD;&#xA;        ws_port = 9910&#xD;&#xA;        args = [&quot;--log=xcm=trace,pallet-assets=trace&quot;]&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1001&#xD;&#xA;    add_to_genesis = true&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;        [parachains.collator]&#xD;&#xA;        command = &quot;binaries/parachain-template-node-v1.0.0&quot;&#xD;&#xA;        name = &quot;parachain-B-1001-collator01&quot;&#xD;&#xA;        ws_port = 9920&#xD;&#xA;        args = [&quot;--log=xcm=trace,pallet-assets=trace&quot;]&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [types.Header]&#xD;&#xA;    number = &quot;u64&quot;&#xD;&#xA;    parent_hash = &quot;Hash&quot;&#xD;&#xA;    post_state = &quot;Hash&quot;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [[hrmp_channels]]&#xD;&#xA;    sender = 1000&#xD;&#xA;    recipient = 1001 &#xD;&#xA;    max_capacity = 8&#xD;&#xA;    max_message_size = 512&#xD;&#xA;    &#xD;&#xA;    [[hrmp_channels]]&#xD;&#xA;    sender = 1001&#xD;&#xA;    recipient = 1000&#xD;&#xA;    max_capacity = 8&#xD;&#xA;    max_message_size = 512&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37940" PostHistoryTypeId="5" PostId="9560" RevisionGUID="4d0aedbb-4ed3-41c5-863f-acc11c39c13c" CreationDate="2023-08-08T23:10:20.703" UserId="2960" Comment="added 13 characters in body" Text="I am getting the below error when I build and run substrate-parachain-template using zombienet. I am using the latest release (which uses the latest substrate branch polkadot-v1.0.0).&#xD;&#xA;I was able to run a relay chain and parachain networok successfully using the older branch polkadot-v0.9.43 successfully. but I when I cloned the latest (master branch , which uses substrate branch polkadot-v1.0.0) I get the error below. I have also attached my zombienet config after the error.&#xD;&#xA;This error only happens with branch v1.0.0 of substrate-parachain-template&#xD;&#xA;&#xD;&#xA;    Error:  	 Error: Command failed with exit code 1: bash -c binaries/parachain-template-node-v1.0.0 export-genesis-state --chain zn-db/template-rococo-1000-rococo-local.json &gt; zn-db/cfg/genesis-state-1000 &amp;&amp; binaries/parachain-template-node-v1.0.0 export-genesis-wasm --chain zn-db/template-rococo-1000-rococo-local.json &gt; zn-db/cfg/genesis-wasm-1000&#xD;&#xA;    Error: Service(Client(Backend(&quot;IO error: While lock file: /Users/me/Library/Application Support/parachain-template-node-v1.0.0/chains/local_testnet/db/full/LOCK: Resource temporarily unavailable&quot;)))&#xD;&#xA;&#xD;&#xA;I ran zombenet with this command &#xD;&#xA;&#xD;&#xA;    zombienet-macos -p native -d zn-db spawn ./zombienet-config.toml&#xD;&#xA;&#xD;&#xA;zomebiene config &#xD;&#xA;&#xD;&#xA;    [settings]&#xD;&#xA;    timeout = 1000&#xD;&#xA;    &#xD;&#xA;    [relaychain]&#xD;&#xA;    default_command = &quot;binaries/polkadot-v1.0.0&quot;&#xD;&#xA;    default_args = [ &quot;-lparachain=debug&quot; ] &#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;alice&quot;&#xD;&#xA;        validator = true&#xD;&#xA;        ws_port = 9900&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;bob&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;charlie&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;dave&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1000&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    add_to_genesis = true&#xD;&#xA;    chain = &quot;template-rococo&quot;&#xD;&#xA;    &#xD;&#xA;        [parachains.collator]&#xD;&#xA;        command = &quot;binaries/parachain-template-node-v1.0.0&quot;&#xD;&#xA;        name = &quot;parachain-A-1000-collator01&quot;&#xD;&#xA;        ws_port = 9910&#xD;&#xA;        args = [&quot;--log=xcm=trace,pallet-assets=trace&quot;]&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1001&#xD;&#xA;    add_to_genesis = true&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;        [parachains.collator]&#xD;&#xA;        command = &quot;binaries/parachain-template-node-v1.0.0&quot;&#xD;&#xA;        name = &quot;parachain-B-1001-collator01&quot;&#xD;&#xA;        ws_port = 9920&#xD;&#xA;        args = [&quot;--log=xcm=trace,pallet-assets=trace&quot;]&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [types.Header]&#xD;&#xA;    number = &quot;u64&quot;&#xD;&#xA;    parent_hash = &quot;Hash&quot;&#xD;&#xA;    post_state = &quot;Hash&quot;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [[hrmp_channels]]&#xD;&#xA;    sender = 1000&#xD;&#xA;    recipient = 1001 &#xD;&#xA;    max_capacity = 8&#xD;&#xA;    max_message_size = 512&#xD;&#xA;    &#xD;&#xA;    [[hrmp_channels]]&#xD;&#xA;    sender = 1001&#xD;&#xA;    recipient = 1000&#xD;&#xA;    max_capacity = 8&#xD;&#xA;    max_message_size = 512&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37941" PostHistoryTypeId="5" PostId="9560" RevisionGUID="db54c8dd-ef76-4591-868f-62eba97878e2" CreationDate="2023-08-08T23:31:45.923" UserId="2960" Comment="added 45 characters in body" Text="I am getting the below error when I build and run substrate-parachain-template using zombienet. I am using the latest release (master branch of substate-parachain-template) which uses the latest substrate branch polkadot-v1.0.0.&#xD;&#xA;I was able to run a relay chain and parachain network successfully using the older branch polkadot-v0.9.43. but  when I cloned the latest (master branch, which uses substrate branch polkadot-v1.0.0) I get the error below. I have also attached my Zombienet config after the error.&#xD;&#xA;This error only happens with branch v1.0.0 of substrate-parachain-template&#xD;&#xA;&#xD;&#xA;    Error:  	 Error: Command failed with exit code 1: bash -c binaries/parachain-template-node-v1.0.0 export-genesis-state --chain zn-db/template-rococo-1000-rococo-local.json &gt; zn-db/cfg/genesis-state-1000 &amp;&amp; binaries/parachain-template-node-v1.0.0 export-genesis-wasm --chain zn-db/template-rococo-1000-rococo-local.json &gt; zn-db/cfg/genesis-wasm-1000&#xD;&#xA;    Error: Service(Client(Backend(&quot;IO error: While lock file: /Users/me/Library/Application Support/parachain-template-node-v1.0.0/chains/local_testnet/db/full/LOCK: Resource temporarily unavailable&quot;)))&#xD;&#xA;&#xD;&#xA;I ran zombenet with this command &#xD;&#xA;&#xD;&#xA;    zombienet-macos -p native -d zn-db spawn ./zombienet-config.toml&#xD;&#xA;&#xD;&#xA;zomebiene config &#xD;&#xA;&#xD;&#xA;    [settings]&#xD;&#xA;    timeout = 1000&#xD;&#xA;    &#xD;&#xA;    [relaychain]&#xD;&#xA;    default_command = &quot;binaries/polkadot-v1.0.0&quot;&#xD;&#xA;    default_args = [ &quot;-lparachain=debug&quot; ] &#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;alice&quot;&#xD;&#xA;        validator = true&#xD;&#xA;        ws_port = 9900&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;bob&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;charlie&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;dave&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1000&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    add_to_genesis = true&#xD;&#xA;    chain = &quot;template-rococo&quot;&#xD;&#xA;    &#xD;&#xA;        [parachains.collator]&#xD;&#xA;        command = &quot;binaries/parachain-template-node-v1.0.0&quot;&#xD;&#xA;        name = &quot;parachain-A-1000-collator01&quot;&#xD;&#xA;        ws_port = 9910&#xD;&#xA;        args = [&quot;--log=xcm=trace,pallet-assets=trace&quot;]&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1001&#xD;&#xA;    add_to_genesis = true&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;        [parachains.collator]&#xD;&#xA;        command = &quot;binaries/parachain-template-node-v1.0.0&quot;&#xD;&#xA;        name = &quot;parachain-B-1001-collator01&quot;&#xD;&#xA;        ws_port = 9920&#xD;&#xA;        args = [&quot;--log=xcm=trace,pallet-assets=trace&quot;]&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [types.Header]&#xD;&#xA;    number = &quot;u64&quot;&#xD;&#xA;    parent_hash = &quot;Hash&quot;&#xD;&#xA;    post_state = &quot;Hash&quot;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [[hrmp_channels]]&#xD;&#xA;    sender = 1000&#xD;&#xA;    recipient = 1001 &#xD;&#xA;    max_capacity = 8&#xD;&#xA;    max_message_size = 512&#xD;&#xA;    &#xD;&#xA;    [[hrmp_channels]]&#xD;&#xA;    sender = 1001&#xD;&#xA;    recipient = 1000&#xD;&#xA;    max_capacity = 8&#xD;&#xA;    max_message_size = 512&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37944" PostHistoryTypeId="2" PostId="9562" RevisionGUID="c96c5e77-5d84-48bd-b81e-37db9e7b1763" CreationDate="2023-08-09T05:08:27.257" UserId="354" Text="I guess what you are trying to achieve is a `Layer2 solution`, as this done in `Layer2 solutions` where the authenticity of transactions are verified on `Layer1`.&#xD;&#xA;&#xD;&#xA;&gt; Is it possible to send an unsigned tx from subxt similar to&#xD;&#xA;&gt; TxClient::sign_and_submit(...)?&#xD;&#xA;&#xD;&#xA;To answer your question blockchain doesn't trust any unverified source to change its current state unless it is done via its client, which is already part of the chain. One such example is the proof of election is submitted via off chain workers for this you can refer [https://github.com/paritytech/substrate/blob/HEAD/frame/election-provider-multi-phase/src/unsigned.rs#L407][1]&#xD;&#xA;&#xD;&#xA;I hope this helps with your query.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/HEAD/frame/election-provider-multi-phase/src/unsigned.rs#L407" ContentLicense="CC BY-SA 4.0" />
  <row Id="37947" PostHistoryTypeId="5" PostId="9560" RevisionGUID="c8c4fb85-26d7-47dc-89e6-0a77ced12b75" CreationDate="2023-08-09T08:27:13.073" UserId="354" Comment="improved formatting" Text="I am getting the below error when I build and run `substrate-parachain-template` using zombienet. I am using the latest release (master branch of `substate-parachain-template`) which uses the latest substrate branch `polkadot-v1.0.0`.&#xD;&#xA;I was able to run a relay chain and parachain network successfully using the older branch `polkadot-v0.9.43`. But  when I cloned the latest (master branch, which uses substrate branch `polkadot-v1.0.0`) I get the error below. I have also attached my Zombienet config after the error.&#xD;&#xA;This error only happens with branch `v1.0.0` of `substrate-parachain-template`&#xD;&#xA;&#xD;&#xA;    Error:  	 Error: Command failed with exit code 1: bash -c binaries/parachain-template-node-v1.0.0 export-genesis-state --chain zn-db/template-rococo-1000-rococo-local.json &gt; zn-db/cfg/genesis-state-1000 &amp;&amp; binaries/parachain-template-node-v1.0.0 export-genesis-wasm --chain zn-db/template-rococo-1000-rococo-local.json &gt; zn-db/cfg/genesis-wasm-1000&#xD;&#xA;    Error: Service(Client(Backend(&quot;IO error: While lock file: /Users/me/Library/Application Support/parachain-template-node-v1.0.0/chains/local_testnet/db/full/LOCK: Resource temporarily unavailable&quot;)))&#xD;&#xA;&#xD;&#xA;I ran zombenet with this command &#xD;&#xA;&#xD;&#xA;    zombienet-macos -p native -d zn-db spawn ./zombienet-config.toml&#xD;&#xA;&#xD;&#xA;Zomebienet config &#xD;&#xA;&#xD;&#xA;    [settings]&#xD;&#xA;    timeout = 1000&#xD;&#xA;    &#xD;&#xA;    [relaychain]&#xD;&#xA;    default_command = &quot;binaries/polkadot-v1.0.0&quot;&#xD;&#xA;    default_args = [ &quot;-lparachain=debug&quot; ] &#xD;&#xA;    chain = &quot;rococo-local&quot;&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;alice&quot;&#xD;&#xA;        validator = true&#xD;&#xA;        ws_port = 9900&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;bob&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;charlie&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;        [[relaychain.nodes]]&#xD;&#xA;        name = &quot;dave&quot;&#xD;&#xA;        validator = true&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1000&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    add_to_genesis = true&#xD;&#xA;    chain = &quot;template-rococo&quot;&#xD;&#xA;    &#xD;&#xA;        [parachains.collator]&#xD;&#xA;        command = &quot;binaries/parachain-template-node-v1.0.0&quot;&#xD;&#xA;        name = &quot;parachain-A-1000-collator01&quot;&#xD;&#xA;        ws_port = 9910&#xD;&#xA;        args = [&quot;--log=xcm=trace,pallet-assets=trace&quot;]&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 1001&#xD;&#xA;    add_to_genesis = true&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    &#xD;&#xA;        [parachains.collator]&#xD;&#xA;        command = &quot;binaries/parachain-template-node-v1.0.0&quot;&#xD;&#xA;        name = &quot;parachain-B-1001-collator01&quot;&#xD;&#xA;        ws_port = 9920&#xD;&#xA;        args = [&quot;--log=xcm=trace,pallet-assets=trace&quot;]&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [types.Header]&#xD;&#xA;    number = &quot;u64&quot;&#xD;&#xA;    parent_hash = &quot;Hash&quot;&#xD;&#xA;    post_state = &quot;Hash&quot;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    [[hrmp_channels]]&#xD;&#xA;    sender = 1000&#xD;&#xA;    recipient = 1001 &#xD;&#xA;    max_capacity = 8&#xD;&#xA;    max_message_size = 512&#xD;&#xA;    &#xD;&#xA;    [[hrmp_channels]]&#xD;&#xA;    sender = 1001&#xD;&#xA;    recipient = 1000&#xD;&#xA;    max_capacity = 8&#xD;&#xA;    max_message_size = 512&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37948" PostHistoryTypeId="24" PostId="9560" RevisionGUID="c8c4fb85-26d7-47dc-89e6-0a77ced12b75" CreationDate="2023-08-09T08:27:13.073" Comment="Proposed by 354 approved by 2960 edit id of 518" ContentLicense="CC BY-SA 4.0" />
  <row Id="37949" PostHistoryTypeId="2" PostId="9563" RevisionGUID="307c905b-b362-4888-bda8-e6eda38641e6" CreationDate="2023-08-09T08:48:23.150" UserId="4527" Text="The point was that I had a relay chain and a parachain on the same server, and such as the default prometheus port - 9615 on the relay chain and I set ports 9615 and 9616 on the parachain, the relay chain metrics simply overlapped the metrics of the parachain itself, as a result, I changed prometheus relay chain port to 9715 and it worked" ContentLicense="CC BY-SA 4.0" />
  <row Id="37951" PostHistoryTypeId="2" PostId="9564" RevisionGUID="7beb6151-561b-46d5-88ed-6faaebbe0d01" CreationDate="2023-08-09T09:48:54.227" UserId="637" Text="We're currently working on [Grill. chat] (https://grill.chat)and uses the WsProvider to establish a WebSocket connection with [xSubsocial node](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fxsocial.subsocial.network). However, we are encountering an issue where the WebSocket connection gets intermittently disconnected, particularly when the browser tab remains open for an extended period. This situation significantly hampers the user experience, as it necessitates manually reloading tabs to restore the connection. Furthermore, the problem persists on Mobile Safari and Progressive Web Apps (PWAs) on iOS, without any resolution.&#xD;&#xA;&#xD;&#xA;We are using the code:&#xD;&#xA;https://github.com/dappforce/grillchat/blob/ca60e5882e83e3b740baa06fd5ed2061128f8e1d/src/subsocial-query/subsocial/connection.ts#L35" ContentLicense="CC BY-SA 4.0" />
  <row Id="37953" PostHistoryTypeId="1" PostId="9564" RevisionGUID="7beb6151-561b-46d5-88ed-6faaebbe0d01" CreationDate="2023-08-09T09:48:54.227" UserId="637" Text="How to Handle Disconnections with WsProvider for Persistent Browser Tabs and Safari on IOS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37954" PostHistoryTypeId="3" PostId="9564" RevisionGUID="7beb6151-561b-46d5-88ed-6faaebbe0d01" CreationDate="2023-08-09T09:48:54.227" UserId="637" Text="|polkadot-js|frontend|wss|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37955" PostHistoryTypeId="2" PostId="9565" RevisionGUID="c5129a9a-03b8-44e5-b12b-7705da7e211b" CreationDate="2023-08-09T11:57:50.260" UserId="18" Text="Your best bet is to set xcm logs to trace &#xD;&#xA;&#xD;&#xA;-lxcm=trace &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also please try setting the xcm version of the location. Your logs might indicate that the location (0, parachain(paraID) is unknown &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="37957" PostHistoryTypeId="2" PostId="9566" RevisionGUID="836fbeaf-67d8-4b4f-a368-721442e00a09" CreationDate="2023-08-09T14:58:25.333" UserId="1853" Text="I am using a BoundedVec as the id for a storage map, and intend to transform a u32 value into a compatible format. Is there a streamlined way to accomplish this, or should I split the u32 into smaller bits and insert them into the BoundedVec? If the latter is true, how should I go about this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37959" PostHistoryTypeId="1" PostId="9566" RevisionGUID="836fbeaf-67d8-4b4f-a368-721442e00a09" CreationDate="2023-08-09T14:58:25.333" UserId="1853" Text="How to convert a u32 into a BoundedVec compatible format?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37960" PostHistoryTypeId="3" PostId="9566" RevisionGUID="836fbeaf-67d8-4b4f-a368-721442e00a09" CreationDate="2023-08-09T14:58:25.333" UserId="1853" Text="|boundedvec|parse|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37961" PostHistoryTypeId="2" PostId="9567" RevisionGUID="63779520-c736-4d55-b556-4a426bd8b168" CreationDate="2023-08-09T16:44:32.123" UserId="3881" Text="Is it possible to schedule a call using timestamp from timestamp pallet instead of blocknumber?&#xD;&#xA;&#xD;&#xA;The docs of scheduler pallet states the following: &#xD;&#xA;&#xD;&#xA;&quot;This Pallet exposes capabilities for scheduling dispatches to occur at a specified block number or at a specified period.&quot;&#xD;&#xA;&#xD;&#xA;And timestamp pallet states:&#xD;&#xA;&#xD;&#xA;&quot;NOTE: The Timestamp pallet is the recommended way to query the on-chain time instead of using an approach based on block numbers. The block number based time measurement can cause issues because of cumulative calculation errors and hence should be avoided.&quot;&#xD;&#xA;&#xD;&#xA;So, it sounds like there should be compatible, but scheduler struct has the following form with only blocknumber as type of time: &#xD;&#xA;&#xD;&#xA;pub enum Call&lt;T: Config&gt; {&#xD;&#xA;    schedule {&#xD;&#xA;        when: T::BlockNumber,&#xD;&#xA;        maybe_periodic: Option&lt;Period&lt;T::BlockNumber&gt;&gt;,&#xD;&#xA;        priority: Priority,&#xD;&#xA;        call: Box&lt;&lt;T as Config&gt;::RuntimeCall&gt;,&#xD;&#xA;    }," ContentLicense="CC BY-SA 4.0" />
  <row Id="37963" PostHistoryTypeId="1" PostId="9567" RevisionGUID="63779520-c736-4d55-b556-4a426bd8b168" CreationDate="2023-08-09T16:44:32.123" UserId="3881" Text="pallet scheduler with timestamp instead of blocknumber?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37964" PostHistoryTypeId="3" PostId="9567" RevisionGUID="63779520-c736-4d55-b556-4a426bd8b168" CreationDate="2023-08-09T16:44:32.123" UserId="3881" Text="|pallet|timestamp|pallet-scheduler|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37965" PostHistoryTypeId="2" PostId="9568" RevisionGUID="62211903-dafc-4c80-9990-918067d50dda" CreationDate="2023-08-09T16:57:43.090" UserId="94" Text="You can use the SCALE codec to encode types into `Vec`. Then the `Vec` can be converted into a `BoundedVec`.&#xD;&#xA;&#xD;&#xA;For example a `u32` (but it works the same for any other encodable type):&#xD;&#xA;```rust&#xD;&#xA;use codec::Encode;&#xD;&#xA;use sp_core::ConstU32;&#xD;&#xA;use sp_runtime::BoundedVec;&#xD;&#xA;&#xD;&#xA;let value: u32 = 123;&#xD;&#xA;let encoded: Vec&lt;u8&gt; = value.encode();&#xD;&#xA;let bounded: BoundedVec&lt;u8, ConstU32&lt;4&gt;&gt; = encoded.try_into()?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that the conversion from `Vec` to `BoundedVec` is fallible, in case that it does not fit into the bounded vec. There are also infallible functions like `BoundedVec::truncate_from`, but personally I would rather use the fallible version and return in an error case.  &#xD;&#xA;&#xD;&#xA;It is possible to use the [`MaxEncodedLen`](https://crates.parity.io/frame_support/pallet_prelude/trait.MaxEncodedLen.html) for testing to ensure that the `BoundedVec` is always long enough to hold the encoded values." ContentLicense="CC BY-SA 4.0" />
  <row Id="37967" PostHistoryTypeId="2" PostId="9569" RevisionGUID="33cb8854-24bb-4f1b-a05d-41a4b123a84c" CreationDate="2023-08-09T18:19:43.310" UserId="3371" Text="The issue is in the outdated Rococo Local Relay Chain chain-spec that is used to run the validator nodes.&#xD;&#xA;&#xD;&#xA;You should either download the latest spec from [here][1] and launch the relay chain from scratch or upgrade the runtime up to version `9400` at least to make sure it supports XCM V3 messaging.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/assets/tutorials/relay-chain-specs/raw-local-chainspec.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="37969" PostHistoryTypeId="2" PostId="9570" RevisionGUID="114e0bd4-fa1a-4ca1-9084-a5cdf2e01a44" CreationDate="2023-08-09T20:08:14.153" UserId="94" Text="The scheduler pallet only knows block numbers. It is not at all aware of the concept of &quot;Time&quot;. So it is not possible to simply switch it over to timestamps. The block-number is basically the &quot;Time&quot; of the blockchain. &#xD;&#xA;&#xD;&#xA;It may be a less precise approach when seen from the off-chain world, but when seen on-chain, this is the most precise approach. So far it has still provided reasonable precision even from the off-chain view, since its mostly used for non time-critical governance tasks.&#xD;&#xA;&#xD;&#xA;This is used in most pallets that need to set deadlines or measure progress since a past point. The advantage of the block-number is that it increases each block by exactly one. This gives nice guarantees and simplifies the code a lot, as compared to when chrono libraries would have to be used to calculate time differences (Not to mention all the special cases about leap seconds/years and other oddities).  &#xD;&#xA;&#xD;&#xA;I guess it would still be possible to change the scheduler to poll the timestamp once before dispatching a task, just to ensure that it wont fire too early - but i dont think its worth the hazzle. For best precision i would rather use an OCW that submits the extrinsic at an exact time." ContentLicense="CC BY-SA 4.0" />
  <row Id="37971" PostHistoryTypeId="5" PostId="9570" RevisionGUID="83f0cfc5-5f8a-4c10-ade7-09db6ecb7154" CreationDate="2023-08-09T20:25:09.583" UserId="94" Comment="added 112 characters in body" Text="The scheduler pallet only knows block numbers. It is not at all aware of the concept of &quot;Time&quot;. So it is not possible to simply switch it over to timestamps. The block-number is basically the &quot;Time&quot; of the blockchain. I think this is reasonable limitation for current blockchains.&#xD;&#xA;&#xD;&#xA;It may be a less precise approach when seen from the off-chain world, but when seen on-chain, this is the most precise approach. So far it has still provided reasonable precision even from the off-chain view, since its mostly used for non time-critical governance tasks.&#xD;&#xA;&#xD;&#xA;This is used in most pallets that need to set deadlines or measure progress since a past point. The advantage of the block-number is that it increases each block by exactly one. This gives nice guarantees and simplifies the code a lot, as compared to when chrono libraries would have to be used to calculate time differences (Not to mention all the special cases about leap seconds/years and other oddities).  &#xD;&#xA;&#xD;&#xA;I guess it would still be possible to change the scheduler to poll the timestamp once before dispatching a task, just to ensure that it wont fire too early - but i dont think its worth the hazzle. For best precision i would rather use an OCW that submits the extrinsic at an exact time. But not even that would give any real guarantees." ContentLicense="CC BY-SA 4.0" />
  <row Id="37972" PostHistoryTypeId="2" PostId="9571" RevisionGUID="35cd9ef1-5b8a-4e55-9222-688178980483" CreationDate="2023-08-09T21:59:37.247" UserId="181" Text="I think there are a number of options which may allow something like what you've described.&#xD;&#xA;&#xD;&#xA;1. Include a function feature-flagged for benchmarks which can generate the signatures. Something like this is done here: https://github.com/paritytech/polkadot/blob/2fe827411438afb323bc8c4334a1d5ec60abfec4/runtime/common/src/crowdloan/mod.rs#L847C9-L855&#xD;&#xA;2. Include a test function which can generate signatures, which you'll then include in your benchmarks plainly. There's something like this here: https://github.com/paritytech/substrate/blob/5cdb054049980eecb449c36a7ccfe4990329c494/frame/babe/src/benchmarking.rs#L80&#xD;&#xA;&#xD;&#xA;If I had to guess, option #1 is fewer steps, but I haven't tested an approach like that. " ContentLicense="CC BY-SA 4.0" />
  <row Id="37974" PostHistoryTypeId="52" PostId="9566" RevisionGUID="39fbe368-6005-44a6-8079-55248429ff1e" CreationDate="2023-08-09T22:59:11.280" />
  <row Id="37975" PostHistoryTypeId="50" PostId="7540" RevisionGUID="56a1458d-9a79-472e-9d1a-4f113ce605b0" CreationDate="2023-08-10T01:06:10.660" UserId="-1" />
  <row Id="37976" PostHistoryTypeId="5" PostId="9516" RevisionGUID="a10e7039-48b0-4f6b-b8c3-56ed4d2f9d08" CreationDate="2023-08-10T04:49:44.217" UserId="3387" Comment="deleted 678 characters in body" Text="Looks like cargo-contract 3.1.0 has been [yanked][1].&#xD;&#xA;&#xD;&#xA;cargo-contract compatibility with different rust toolchains:&#xD;&#xA;&#xD;&#xA; - Rust &lt;= 1.69 + pallet-contracts &lt; polkadot-1.0.0 = cargo-contract&#xD;&#xA;   3.0.1&#xD;&#xA; - Rust &gt; = 1.70 + pallet-contracts &gt;= polkadot-1.0.0 = cargo-contract 4.0.0-alpha&#xD;&#xA;&#xD;&#xA;The e2e test does not work after the 3.1.0 has been yanked for either versions of it. &#xD;&#xA;&#xD;&#xA;Would be nice for the Parity guys and ladies to update the ink_e2e, also.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/1239#issuecomment-1653683340" ContentLicense="CC BY-SA 4.0" />
  <row Id="37978" PostHistoryTypeId="33" PostId="9498" RevisionGUID="bc826f44-08c3-4392-81d0-1a07645e4ad7" CreationDate="2023-08-10T06:44:57.367" UserId="2762" Comment="31" />
  <row Id="37979" PostHistoryTypeId="2" PostId="9572" RevisionGUID="1b1aeb23-f390-4316-8ef1-d5727472c3d3" CreationDate="2023-08-10T08:50:30.587" UserId="3319" Text="you can create it via subxt using [this][1], than maybe try [this][2] &#xD;&#xA;&#xD;&#xA;just keep in mind to implement [validate_unsigned][3] to include it onchain&#xD;&#xA;&#xD;&#xA;we did a similar [work][4] to what you are describing, we take a a set of hashes(ids in your usecase) via grpc server, verify that 2/3 of validators witnesses the the same hashes and if so include the hashes onchain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/subxt/latest/subxt/tx/struct.TxClient.html#method.create_unsigned&#xD;&#xA;  [2]: https://docs.rs/subxt/latest/subxt/tx/struct.SubmittableExtrinsic.html#method.submit&#xD;&#xA;  [3]: https://paritytech.github.io/substrate/master/sp_runtime/traits/trait.ValidateUnsigned.html#tymethod.validate_unsigned&#xD;&#xA;  [4]: https://github.com/comrade-coop/validated-streams" ContentLicense="CC BY-SA 4.0" />
  <row Id="37981" PostHistoryTypeId="2" PostId="9573" RevisionGUID="bbfa1490-49e0-4dd6-9409-c3c0fd864081" CreationDate="2023-08-10T09:05:20.783" UserId="4532" Text="I'm trying to integrate stablecoin into parachain.&#xD;&#xA;First of all, I tried to repeat the steps shown in the video (https://www.youtube.com/watch?v=UfxU3hUprKo&amp;t=1182s) with standard settings:&#xD;&#xA;&#xD;&#xA;Running with zombienet:&#xD;&#xA;&#xD;&#xA;Relay chain - Westend&#xD;&#xA;&#xD;&#xA;Para1 - Westmint&#xD;&#xA;&#xD;&#xA;Para2 - Westmint&#xD;&#xA;&#xD;&#xA;Firstly, create assets for each parachain and make xUSD sufficient:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I do similar steps, but at the `limitedReservedTransferAssets` stage I get an error on the side of the receiving parachain - Para2. Error `XcmError::TooExpensive`, although everything is similar with the example and in `xcm_config.rs` everything is also standard. This is a fairly standard transaction that cannot exceed the allowed weight.&#xD;&#xA;The first question is how can this be fixed?&#xD;&#xA;&#xD;&#xA;The second question is this.&#xD;&#xA;I do similar steps on this video, I just connected a custom parachain and at the same stage the transaction falls with the `XcmError::UntrustedReserveLocation` error, which is also not very clear. Where to look in this case?&#xD;&#xA;&#xD;&#xA;My steps to produce error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;After submitting the transaction:&#xD;&#xA;&#xD;&#xA;Got this on Para1:&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;And this on Para 2:&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you all in advance&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Hy4fp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ajqbM.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/46L9X.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/mgEbn.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/fhBhz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37983" PostHistoryTypeId="1" PostId="9573" RevisionGUID="bbfa1490-49e0-4dd6-9409-c3c0fd864081" CreationDate="2023-08-10T09:05:20.783" UserId="4532" Text="XcmError &quot;UntrustedReservedLocation&quot; &amp; &quot;TooExpensive&quot; while transfer assets between two parachains (limitedReservedTransferAssets)" ContentLicense="CC BY-SA 4.0" />
  <row Id="37984" PostHistoryTypeId="3" PostId="9573" RevisionGUID="bbfa1490-49e0-4dd6-9409-c3c0fd864081" CreationDate="2023-08-10T09:05:20.783" UserId="4532" Text="|parachain|xcm|assets|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37985" PostHistoryTypeId="2" PostId="9574" RevisionGUID="458c334c-ef44-4b00-90da-1b98c5c87e47" CreationDate="2023-08-10T09:19:37.820" UserId="3136" Text="The issue of UntrustedReserveLocation happened because parachain don't trust each other. [Here][1] is the solutions for the UntrustedTrustedLocation which is similar to UntrustedReserveLocation. You can teleport the assets from one chain to another. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/8990/3136" ContentLicense="CC BY-SA 4.0" />
  <row Id="37987" PostHistoryTypeId="50" PostId="7585" RevisionGUID="3527def4-fa0d-4065-b16f-783a1b3e91e9" CreationDate="2023-08-10T10:05:30.667" UserId="-1" />
  <row Id="37988" PostHistoryTypeId="5" PostId="9561" RevisionGUID="7ce1896b-b34e-47cc-9963-5cb9243e0a82" CreationDate="2023-08-10T10:29:23.547" UserId="354" Comment="improved formatting" Text="Is it possible to send an `unsigned tx` from `subxt` similar to `TxClient::sign_and_submit(...)`?&#xD;&#xA;&#xD;&#xA;I have a bizarre use case where the transaction authenticity is to be verified on a foreign chain via an RPC and the signer is unknown to the Substrate-based chain. " ContentLicense="CC BY-SA 4.0" />
  <row Id="37989" PostHistoryTypeId="24" PostId="9561" RevisionGUID="7ce1896b-b34e-47cc-9963-5cb9243e0a82" CreationDate="2023-08-10T10:29:23.547" Comment="Proposed by 354 approved by 94, 2673 edit id of 517" ContentLicense="CC BY-SA 4.0" />
  <row Id="37990" PostHistoryTypeId="5" PostId="9512" RevisionGUID="10176afa-287d-415e-83ea-62cc30b8e804" CreationDate="2023-08-10T10:59:22.967" UserId="2281" Comment="formatting and structure changes done" Text="I am doing a basic `E2E test using` the [flipper example][1].&#xD;&#xA;&#xD;&#xA;This is my contract version&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I have install the [substrate-contracts-node][3]&#xD;&#xA;&#xD;&#xA;I am running with the &quot;nightly-2023-02-09&quot; (cargo +nightly-2023-02-09 test --features e2e-tests)&#xD;&#xA;&#xD;&#xA;**Does anyone knows why this happens ?**&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;---- flipper::e2e_tests::it_works stdout ----&#xD;&#xA;thread 'flipper::e2e_tests::it_works' panicked at 'We should find a port before the reader ends', /home/silveira/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_e2e-4.2.1/src/node_proc.rs:192:10&#xD;&#xA;note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;Cargo.toml&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;[package]&#xD;&#xA;name = &quot;flipper&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Parity Technologies &lt;admin@parity.io&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;publish = false&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.2.1&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = { version = &quot;4.2.1&quot; }&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;src/lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/blob/main/flipper/lib.rs&#xD;&#xA;  [2]: https://i.stack.imgur.com/GCY0I.png&#xD;&#xA;  [3]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [4]: https://i.stack.imgur.com/Et2AQ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="37991" PostHistoryTypeId="24" PostId="9512" RevisionGUID="10176afa-287d-415e-83ea-62cc30b8e804" CreationDate="2023-08-10T10:59:22.967" Comment="Proposed by 2281 approved by 3387 edit id of 520" ContentLicense="CC BY-SA 4.0" />
  <row Id="37992" PostHistoryTypeId="5" PostId="9516" RevisionGUID="9408456a-1e06-45bf-bd93-7b24dfdf4c51" CreationDate="2023-08-10T11:01:29.633" UserId="3387" Comment="added 4 characters in body" Text="Looks like cargo-contract 3.1.0 has been [yanked][1].&#xD;&#xA;&#xD;&#xA;cargo-contract compatibility with different rust toolchains:&#xD;&#xA;&#xD;&#xA; - Rust &lt;= 1.69 + pallet-contracts &lt; polkadot-1.0.0 = cargo-contract&#xD;&#xA;   3.0.1&#xD;&#xA; - Rust &gt; = 1.70 + pallet-contracts &gt;= polkadot-1.0.0 = cargo-contract 4.0.0-alpha&#xD;&#xA;&#xD;&#xA;**The e2e test does not work after the 3.1.0 has been yanked for either versions of it.** &#xD;&#xA;&#xD;&#xA;Would be nice for the Parity guys and ladies to update the ink_e2e, also.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/1239#issuecomment-1653683340" ContentLicense="CC BY-SA 4.0" />
  <row Id="37993" PostHistoryTypeId="2" PostId="9575" RevisionGUID="3097c3ef-770a-4627-8a14-0396617e20d3" CreationDate="2023-08-10T11:28:03.220" UserId="4533" Text="I am new to substrate and ink, while following [ink documentation][1] I got to the [testing part][2] and want to write integration tests. Can someone help me with it or point to the documentation or resources for the same.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/&#xD;&#xA;  [2]: https://use.ink/basics/contract-testing" ContentLicense="CC BY-SA 4.0" />
  <row Id="37995" PostHistoryTypeId="1" PostId="9575" RevisionGUID="3097c3ef-770a-4627-8a14-0396617e20d3" CreationDate="2023-08-10T11:28:03.220" UserId="4533" Text="How to write integration test cases for ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="37996" PostHistoryTypeId="3" PostId="9575" RevisionGUID="3097c3ef-770a-4627-8a14-0396617e20d3" CreationDate="2023-08-10T11:28:03.220" UserId="4533" Text="|ink|smart-contract|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="37997" PostHistoryTypeId="2" PostId="9576" RevisionGUID="3366f0cc-cf0f-4a70-baf5-f0bc8af64c18" CreationDate="2023-08-10T13:01:43.090" UserId="529" Text="The most common way to do the integration test of ink! project is to use [Typechain][1].&#xD;&#xA;&#xD;&#xA;There are numerous typechain examples in the [SwankyHub][2] .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Brushfam/typechain-polkadot&#xD;&#xA;  [2]: https://github.com/swankyhub" ContentLicense="CC BY-SA 4.0" />
  <row Id="37999" PostHistoryTypeId="2" PostId="9577" RevisionGUID="430ebc8d-c98f-4697-8e4f-e898538df810" CreationDate="2023-08-10T13:12:01.033" UserId="4530" Text="I'm trying to get the raw value of the transaction without using the websocket.&#xD;&#xA;For now I'm using a WebSocket for my application and I am in the process of removing it, I could find everything I wanted on substrate expect the original value in &quot;extrinsics&quot;. Is there a way to get it ? My current work is to to try to rebuilt it with the data from the block that I received from substrate but not sure of how this can be done. But even if this can be done, every type of transaction has a different content and that is opening the door for lot of mistakes.&#xD;&#xA;&#xD;&#xA;   ```&#xD;&#xA;{&#xD;&#xA;  &quot;block&quot;: {&#xD;&#xA;    &quot;header&quot;: {&#xD;&#xA;      &quot;parentHash&quot;: &quot;0x723d60ec7870e881477ee638aae8b9226e37d0b1c1d0a8b8fbea08d5594e412d&quot;,&#xD;&#xA;      &quot;number&quot;: &quot;0x1b&quot;,&#xD;&#xA;      &quot;stateRoot&quot;: &quot;0x7ffe18a6a48979ccf0f41b5ae31bcf14076ba60cf3e006a33856cd0411df9465&quot;,&#xD;&#xA;      &quot;extrinsicsRoot&quot;: &quot;0x80f5180564d5f5dc1b98e18abbd383dc35f0bc0ec996c517bc07316c431da1a9&quot;,&#xD;&#xA;      &quot;digest&quot;: {&#xD;&#xA;        &quot;logs&quot;: [&#xD;&#xA;          &quot;0x0642414245b5010300000000e7e2cd1000000000f0ce7e95377374a4a1d157034f14d949547bb25acebcc2533a1ef94690203409f596f4167f577ec5971f2718da3005d80258de8008f42833a8bed8b812b45e082d1d9f452808a6df2529e5a8d8a7cb36e581460063576d9f77ced3a91a5e2a06&quot;,&#xD;&#xA;          &quot;0x054241424501013e06daff0861a460e3e4433e06d9ea3e1a03c72d4725fa2d8d4cfc995a9b3b3e07e64b9f63200c05b895a69746c63d21ebf319ca525604356a70dede74522881&quot;&#xD;&#xA;        ]&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    &quot;extrinsics&quot;: [&#xD;&#xA;      &quot;0x280403000b100676d98901&quot;,&#xD;&#xA;      &quot;0xa105043600040000000000cc7593f343f0e7386bbf1ac7a3891f6cd8285260aab616ebbb6dc13a3334654466212cccbc2f2381610a7b094cdac6c6878a49c2af9a3c127d15c769ff7f93870000e41cee5fe6ab936f465874a8c6bac34fc0c0cdea153c01c3aeedb276dd30c6b16841043b15dce2a5c9d8c800c6999815bcc68efc7ed0401186dada1e935c415b4a7ab3d76daa16850f1bb470666f2d9a27849d8fec56fac55931f8062cfc17281f080642414245b5010100000000e6e2cd10000000008a356eca73e2f18c3c301a59d96b3e21f4f9b939a697e596135c657f9b18243cb1a2d946ade5a0b2eb743d26fa539051d39775946231a0b595f18a7e86c98100238d68623624e1ebebc7a519ca429cb7892425ade17e0789963f8fccebfd360505424142450101a6423a420b9a524e2e2df92777a134ddc4da865f82f6ed94b9273972d6adfd0975a926e70a6332e055edceb3e6e36a57973f8b6c1cd05a8bac57e87bf2c8cc8c&quot;,&#xD;&#xA;      &quot;0x41028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01b8b84d2b12deb6519799e4a14c0b1c4138bb25f9d60a50ec320967982675eb69f1ea2fa65419ab354d7780c082fad3d41d45b4db43061cc7a73b2d432987b6848501040005070056f14a2288b6ab1668ea4281a830666821431ba62cfbdf6fb432f468ba56116d07005cb2ec22&quot;&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;justifications&quot;: null&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA; I would like this value &#xD;&#xA;&gt;0x41028400d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d01b8b84d2b12deb6519799e4a14c0b1c4138bb25f9d60a50ec320967982675eb69f1ea2fa65419ab354d7780c082fad3d41d45b4db43061cc7a73b2d432987b6848501040005070056f14a2288b6ab1668ea4281a830666821431ba62cfbdf6fb432f468ba56116d07005cb2ec22&#xD;&#xA;&#xD;&#xA;The best way would be directly from substrate and if not possible build from what substrate gives me. Is this possible without websocket ?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38001" PostHistoryTypeId="1" PostId="9577" RevisionGUID="430ebc8d-c98f-4697-8e4f-e898538df810" CreationDate="2023-08-10T13:12:01.033" UserId="4530" Text="Get the raw hex from substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="38002" PostHistoryTypeId="3" PostId="9577" RevisionGUID="430ebc8d-c98f-4697-8e4f-e898538df810" CreationDate="2023-08-10T13:12:01.033" UserId="4530" Text="|extrinsic|transactions|substrate-node|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38003" PostHistoryTypeId="50" PostId="9227" RevisionGUID="42d70d54-c507-4e20-9822-602f57a2d931" CreationDate="2023-08-10T17:03:20.370" UserId="-1" />
  <row Id="38004" PostHistoryTypeId="2" PostId="9578" RevisionGUID="bc185f5b-129e-4988-9a38-60b022cc93a0" CreationDate="2023-08-10T17:14:24.423" UserId="2844" Text="I have acquired parachain in rococo test chain with parachain `4,285`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;After that I try to start the collator node using following command as shown in [`Acquire a testnet slots tutorial`](https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/#start-the-collator-node),&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node --collator \&#xD;&#xA;      --chain raw-parachain-chainspec.json \&#xD;&#xA;      --base-path ./tmp/parachain/pubs-demo \&#xD;&#xA;      --port 50333 \&#xD;&#xA;      --rpc-port 8855 \&#xD;&#xA;      -- \&#xD;&#xA;      --execution wasm \&#xD;&#xA;      --chain rococo \&#xD;&#xA;      --port 50343 \&#xD;&#xA;      --rpc-port 9988&#xD;&#xA;&#xD;&#xA;When I run the collator node in my terminal, then I get this logs,&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;But here parachain node doesn't peer with Rococo validator nodes to produce blocks. When I try to access custom endpoint of parachain using `ws://127.0.0.1:8855`, not able to access.&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Someone guide me how to Test parachain after slot acquired?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Jpa2f.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/B71KF.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/9i6Kw.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38006" PostHistoryTypeId="1" PostId="9578" RevisionGUID="bc185f5b-129e-4988-9a38-60b022cc93a0" CreationDate="2023-08-10T17:14:24.423" UserId="2844" Text="How to test parachain after slots acquired?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38007" PostHistoryTypeId="3" PostId="9578" RevisionGUID="bc185f5b-129e-4988-9a38-60b022cc93a0" CreationDate="2023-08-10T17:14:24.423" UserId="2844" Text="|substrate-parachain-template|rococo|parachain-collator|parachain-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38008" PostHistoryTypeId="2" PostId="9579" RevisionGUID="bfa4c45c-d537-4bb6-a160-5d4a0c2ac778" CreationDate="2023-08-10T18:05:29.617" UserId="181" Text="Are reads from offchain workers less expensive than reads from extrinsics? I am determining how to do some large, asynchronous processing of data and determining whether the reads in this process see any gain from happening in offchain worker." ContentLicense="CC BY-SA 4.0" />
  <row Id="38010" PostHistoryTypeId="1" PostId="9579" RevisionGUID="bfa4c45c-d537-4bb6-a160-5d4a0c2ac778" CreationDate="2023-08-10T18:05:29.617" UserId="181" Text="Are onchain storage reads cheaper from offchain worker versus from extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38011" PostHistoryTypeId="3" PostId="9579" RevisionGUID="bfa4c45c-d537-4bb6-a160-5d4a0c2ac778" CreationDate="2023-08-10T18:05:29.617" UserId="181" Text="|storage|weight|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38012" PostHistoryTypeId="2" PostId="9580" RevisionGUID="463f9ef6-17af-4078-ab7f-c091139a3386" CreationDate="2023-08-10T18:08:41.060" UserId="3371" Text="I'm facing the `FailedToTransactAsset` error while trying to send assets from Statemint to another parachain.&#xD;&#xA;&#xD;&#xA;So basically I have the following configuration:&#xD;&#xA;&#xD;&#xA;**Relay chain**&#xD;&#xA;&#xD;&#xA;Polkadot relay chain running with the runtime version `10000` and the latest chainspec with 2 validators: alice/bob&#xD;&#xA;&#xD;&#xA;**Parachains**&#xD;&#xA;&#xD;&#xA;Statemint(para id: 1000) - a local `AssetHub` parachain &#xD;&#xA;&#xD;&#xA;Custom Parachain(para id: 2000) - a custom parachain that has asset registry and other stuff required for transferring incoming assets&#xD;&#xA;&#xD;&#xA;Both parachains are connected between each other with the HRMP channel so I'm able to interact with the sovereign accounts on the relay chain(transferring assets as described [here][1]) for both parachains:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;      [&#xD;&#xA;        [&#xD;&#xA;          {&#xD;&#xA;            sender: 1,000&#xD;&#xA;            recipient: 2,000&#xD;&#xA;          }&#xD;&#xA;        ]&#xD;&#xA;        {&#xD;&#xA;          maxCapacity: 8&#xD;&#xA;          maxTotalSize: 8,192&#xD;&#xA;          maxMessageSize: 1,048,576&#xD;&#xA;          msgCount: 0&#xD;&#xA;          totalSize: 0&#xD;&#xA;          mqcHead: null&#xD;&#xA;          senderDeposit: 0&#xD;&#xA;          recipientDeposit: 0&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;      [&#xD;&#xA;        [&#xD;&#xA;          {&#xD;&#xA;            sender: 2,000&#xD;&#xA;            recipient: 1,000&#xD;&#xA;          }&#xD;&#xA;        ]&#xD;&#xA;        {&#xD;&#xA;          maxCapacity: 8&#xD;&#xA;          maxTotalSize: 8,192&#xD;&#xA;          maxMessageSize: 1,048,576&#xD;&#xA;          msgCount: 0&#xD;&#xA;          totalSize: 0&#xD;&#xA;          mqcHead: null&#xD;&#xA;          senderDeposit: 0&#xD;&#xA;          recipientDeposit: 0&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;I've created a `sufficient` asset on the `AssetHub` chain and minted some tokens to `Alice` account:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I've also created an asset registry mapping for the asset above on `custom parachain`:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;        [&#xD;&#xA;          2,983&#xD;&#xA;        ]&#xD;&#xA;        {&#xD;&#xA;          V3: {&#xD;&#xA;            parents: 1&#xD;&#xA;            interior: {&#xD;&#xA;              X3: [&#xD;&#xA;                {&#xD;&#xA;                  Parachain: 1,000&#xD;&#xA;                }&#xD;&#xA;                {&#xD;&#xA;                  PalletInstance: 50&#xD;&#xA;                }&#xD;&#xA;                {&#xD;&#xA;                  GeneralIndex: 1,983&#xD;&#xA;                }&#xD;&#xA;              ]&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;&#xD;&#xA; Now I want to transfer some amount of assets to `custom parachain` using `polkadotXcm`  `limitedReserveTransferAssets` function similar to the extrinsic used [here][3] to transfer assets from `Polkadot` `AssetHub` to `Astar` parachain:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        name: &quot;dest&quot;,&#xD;&#xA;        type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;        type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          V3: {&#xD;&#xA;            interior: {&#xD;&#xA;              X1: {&#xD;&#xA;                Parachain: 2006&#xD;&#xA;              }&#xD;&#xA;            },&#xD;&#xA;            parents: 1&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;beneficiary&quot;,&#xD;&#xA;        type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;        type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          V3: {&#xD;&#xA;            interior: {&#xD;&#xA;              X1: {&#xD;&#xA;                AccountId32: {&#xD;&#xA;                  id: &quot;0x0e26695a00e4a7c696ff136e636f70b3450acfed92f345822ae89b606fcd645d&quot;,&#xD;&#xA;                  network: null&#xD;&#xA;                }&#xD;&#xA;              }&#xD;&#xA;            },&#xD;&#xA;            parents: 0&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;assets&quot;,&#xD;&#xA;        type: &quot;xcm:VersionedMultiAssets&quot;,&#xD;&#xA;        type_name: &quot;Box&lt;VersionedMultiAssets&gt;&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          V3: [&#xD;&#xA;            {&#xD;&#xA;              fun: {&#xD;&#xA;                Fungible: &quot;2200000&quot;&#xD;&#xA;              },&#xD;&#xA;              id: {&#xD;&#xA;                Concrete: {&#xD;&#xA;                  interior: {&#xD;&#xA;                    X2: {&#xD;&#xA;                      col0: {&#xD;&#xA;                        PalletInstance: 50&#xD;&#xA;                      },&#xD;&#xA;                      col1: {&#xD;&#xA;                        GeneralIndex: &quot;1984&quot;&#xD;&#xA;                      }&#xD;&#xA;                    }&#xD;&#xA;                  },&#xD;&#xA;                  parents: 0&#xD;&#xA;                }&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          ]&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;fee_asset_item&quot;,&#xD;&#xA;        type: &quot;U32&quot;,&#xD;&#xA;        type_name: &quot;u32&quot;,&#xD;&#xA;        value: 0&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;weight_limit&quot;,&#xD;&#xA;        type: &quot;xcm:v3:WeightLimit&quot;,&#xD;&#xA;        type_name: &quot;WeightLimit&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          Unlimited: &quot;&quot;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;After submitting transaction I'm getting the following error with no clue like what exactly has happened:&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA; &#xD;&#xA;There are no details for the `FailedToTransactAsset` error. As far as I understand this is due to a conversion issue as per the source code. However there are 4 types of `conversion errors` that can happen and I'm not sure which one is in my particular case:&#xD;&#xA;&#xD;&#xA;    impl From&lt;Error&gt; for XcmError {&#xD;&#xA;    	fn from(e: Error) -&gt; Self {&#xD;&#xA;    		use XcmError::FailedToTransactAsset;&#xD;&#xA;    		match e {&#xD;&#xA;    			Error::AssetNotHandled =&gt; XcmError::AssetNotFound,&#xD;&#xA;    			Error::AccountIdConversionFailed =&gt; FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;),&#xD;&#xA;    			Error::AmountToBalanceConversionFailed =&gt;&#xD;&#xA;    				FailedToTransactAsset(&quot;AmountToBalanceConversionFailed&quot;),&#xD;&#xA;    			Error::AssetIdConversionFailed =&gt; FailedToTransactAsset(&quot;AssetIdConversionFailed&quot;),&#xD;&#xA;    			Error::InstanceConversionFailed =&gt; FailedToTransactAsset(&quot;InstanceConversionFailed&quot;),&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;Any help appreciated!&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/transfer-assets-with-xcm/&#xD;&#xA;  [2]: https://i.stack.imgur.com/bcDQk.png&#xD;&#xA;  [3]: https://assethub-polkadot.subscan.io/extrinsic/0x553cca772e2b4e73c355dad12954c15929ae5dcd5436e724d5796d00093eeebb?tab=xcm_transfer&#xD;&#xA;  [4]: https://i.stack.imgur.com/r9WND.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38014" PostHistoryTypeId="1" PostId="9580" RevisionGUID="463f9ef6-17af-4078-ab7f-c091139a3386" CreationDate="2023-08-10T18:08:41.060" UserId="3371" Text="FailedToTransactAsset error while sending assets from local Statemint(AssetHub) to other Parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="38015" PostHistoryTypeId="3" PostId="9580" RevisionGUID="463f9ef6-17af-4078-ab7f-c091139a3386" CreationDate="2023-08-10T18:08:41.060" UserId="3371" Text="|polkadot|parachain|xcm|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38016" PostHistoryTypeId="50" PostId="9234" RevisionGUID="2b521596-24fa-46b9-be25-2838a853b5cc" CreationDate="2023-08-10T21:06:45.767" UserId="-1" />
  <row Id="38017" PostHistoryTypeId="2" PostId="9581" RevisionGUID="77c37ec9-8b67-4b0d-8b32-8acf8c110a9b" CreationDate="2023-08-10T21:32:38.087" UserId="427" Text="We have resolved this issue using the noteStalled extrinsic as mentioned here. https://substrate.stackexchange.com/questions/661/how-to-use-notestalled-to-recover-from-a-finality-lagging-chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="38020" PostHistoryTypeId="6" PostId="9578" RevisionGUID="697206e6-203b-44ff-842b-3cf4ba012cb2" CreationDate="2023-08-11T02:25:10.417" UserId="2844" Comment="edited tags" Text="|substrate-parachain-template|rococo|substrate-node|parachain-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38025" PostHistoryTypeId="2" PostId="9583" RevisionGUID="fbe6bec3-0e6c-42d0-a6c3-8804568ead00" CreationDate="2023-08-11T04:50:16.053" UserId="139" Text="As a chain grows the DB operations should get costlier. Is there a standard procedure that outlines how to generate these weights? Or should we continue using the default substrate weights for this which may look like :&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {&#xD;&#xA;			read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,&#xD;&#xA;			write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS,&#xD;&#xA;		};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38027" PostHistoryTypeId="1" PostId="9583" RevisionGUID="fbe6bec3-0e6c-42d0-a6c3-8804568ead00" CreationDate="2023-08-11T04:50:16.053" UserId="139" Text="How to generate database weights?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38028" PostHistoryTypeId="3" PostId="9583" RevisionGUID="fbe6bec3-0e6c-42d0-a6c3-8804568ead00" CreationDate="2023-08-11T04:50:16.053" UserId="139" Text="|benchmarking|weight|database|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38029" PostHistoryTypeId="50" PostId="9238" RevisionGUID="75d2c149-c3db-4c85-84e5-056de310e677" CreationDate="2023-08-11T06:02:45.270" UserId="-1" />
  <row Id="38030" PostHistoryTypeId="2" PostId="9584" RevisionGUID="718e34a8-a9d2-417f-96e0-24caa8096175" CreationDate="2023-08-11T06:03:53.953" UserId="2844" Text="We have created `nft-marketplace` in substrate, 1 collection has `100 NFT`. We only need to send all the amount of nft only after all nft are sold and until we wan't to hold the amount somewhere. How to implement this scenario?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38032" PostHistoryTypeId="1" PostId="9584" RevisionGUID="718e34a8-a9d2-417f-96e0-24caa8096175" CreationDate="2023-08-11T06:03:53.953" UserId="2844" Text="How to hold nft price until all nft are sold?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38033" PostHistoryTypeId="3" PostId="9584" RevisionGUID="718e34a8-a9d2-417f-96e0-24caa8096175" CreationDate="2023-08-11T06:03:53.953" UserId="2844" Text="|pallet|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38034" PostHistoryTypeId="2" PostId="9585" RevisionGUID="70782619-13f4-4920-85a5-51596b83ea3e" CreationDate="2023-08-11T06:53:14.400" UserId="567" Text="If you are running in local I suppose you are using zombie-net. can you add xcm logs to your config. It will displays which `FailedToTransactAsset` it is:&#xD;&#xA;&#xD;&#xA;      args = [ &quot;-l=xcm=trace&quot; ]&#xD;&#xA;&#xD;&#xA;On AssetHub id = 1000 you should register asset location (with the same interior as you have done in 2000). In parachain 2000 you should register location (as you have already done) and also set assets units per second.&#xD;&#xA;&#xD;&#xA;This is a plokadotjs script I did to register an asset id = 1 on two `Astar` parachains (and use XCM to transfer between chains). It will help understanding of the set-up:&#xD;&#xA;&#xD;&#xA;    const batchA = apiA.tx.utility.batchAll([&#xD;&#xA;        apiA.tx.sudo.sudo(apiA.tx.assets.forceCreate(1, {Id: alice.address}, true, 1)),&#xD;&#xA;        apiA.tx.sudo.sudo(apiA.tx.assets.forceSetMetadata(1, &quot;TST&quot;, &quot;Test Token&quot;, 0, false)),&#xD;&#xA;        apiA.tx.assets.mint(1, {Id: alice.address}, 1000000n * DECIMALS),&#xD;&#xA;        apiA.tx.sudo.sudo(apiA.tx.xcAssetConfig.registerAssetLocation(&#xD;&#xA;            {&#xD;&#xA;                V3: {&#xD;&#xA;                    parents: 0,&#xD;&#xA;                    interior: {&#xD;&#xA;                        X1:&#xD;&#xA;                            {GeneralIndex: 1},&#xD;&#xA;                    },&#xD;&#xA;                },&#xD;&#xA;            },&#xD;&#xA;            1&#xD;&#xA;        )),&#xD;&#xA;    ]);&#xD;&#xA;    await sendTransaction(batchA, alice);&#xD;&#xA;    &#xD;&#xA;    const batchB = apiB.tx.utility.batchAll([&#xD;&#xA;        // Parcahin A soverign account&#xD;&#xA;        apiB.tx.balances.transferKeepAlive(&quot;5Ec4AhPUwPeyTFyuhGuBbD224mY85LKLMSqSSo33JYWCazU4&quot;, 1000n * DECIMALS),&#xD;&#xA;        // Let Parcahin A soverign account to create token. At least should have mint rights&#xD;&#xA;        apiB.tx.sudo.sudo(apiB.tx.assets.forceCreate(1, &quot;5Ec4AhPUwPeyTFyuhGuBbD224mY85LKLMSqSSo33JYWCazU4&quot;, true, 1)),&#xD;&#xA;        apiB.tx.sudo.sudo(apiB.tx.assets.forceSetMetadata(1, &quot;TST&quot;, &quot;Test Token&quot;, 0, false)),&#xD;&#xA;        apiB.tx.sudo.sudo(apiB.tx.xcAssetConfig.registerAssetLocation(&#xD;&#xA;            {&#xD;&#xA;                V3: {&#xD;&#xA;                    parents: 1,&#xD;&#xA;                    interior: {&#xD;&#xA;                        X2: [&#xD;&#xA;                            {Parachain: 2000},&#xD;&#xA;                            {GeneralIndex: 1},&#xD;&#xA;                        ],&#xD;&#xA;                    },&#xD;&#xA;                },&#xD;&#xA;            },&#xD;&#xA;            1&#xD;&#xA;        )),&#xD;&#xA;        apiB.tx.sudo.sudo(apiB.tx.xcAssetConfig.setAssetUnitsPerSecond(&#xD;&#xA;            {&#xD;&#xA;                V3: {&#xD;&#xA;                    parents: 1,&#xD;&#xA;                    interior: {&#xD;&#xA;                        X2: [&#xD;&#xA;                            {Parachain: 2000},&#xD;&#xA;                            {GeneralIndex: 1},&#xD;&#xA;                        ],&#xD;&#xA;                    },&#xD;&#xA;                },&#xD;&#xA;            },&#xD;&#xA;            1&#xD;&#xA;        )),&#xD;&#xA;    ]);&#xD;&#xA;    &#xD;&#xA;    await sendTransaction(batchB, alice);&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38036" PostHistoryTypeId="50" PostId="3480" RevisionGUID="2c3bf744-ad37-499c-9d1c-acce5339221d" CreationDate="2023-08-11T08:00:40.107" UserId="-1" />
  <row Id="38037" PostHistoryTypeId="2" PostId="9586" RevisionGUID="04155093-d5b3-4107-8cdd-b8e29d5b5f7e" CreationDate="2023-08-11T08:01:27.457" UserId="4537" Text="I am working on implementing a new feature to limit the storage growth for a Substrate-based chain. As part of this feature, I need to compute the storage growth after executing arbitrary code. What is the most efficient way to measure the changes in storage consumption within the Substrate framework?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38039" PostHistoryTypeId="1" PostId="9586" RevisionGUID="04155093-d5b3-4107-8cdd-b8e29d5b5f7e" CreationDate="2023-08-11T08:01:27.457" UserId="4537" Text="How to compute storage growth after some arbitrary code execution?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38040" PostHistoryTypeId="3" PostId="9586" RevisionGUID="04155093-d5b3-4107-8cdd-b8e29d5b5f7e" CreationDate="2023-08-11T08:01:27.457" UserId="4537" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38041" PostHistoryTypeId="2" PostId="9587" RevisionGUID="cceed31e-91e4-4d91-8f7b-ad1c11aa991b" CreationDate="2023-08-11T08:46:20.737" UserId="2762" Text="In the logs I can see the message it says is syncing. &#xD;&#xA;See this old StackExchange question: [Collator nodes are not working][1].&#xD;&#xA;&#xD;&#xA;The Parachain will not start producing blocks until you have reached the tip of the relay chain. You will need to wait for your collator to have finished syncing the relay chain to start producing blocks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4301/collator-nodes-are-not-working" ContentLicense="CC BY-SA 4.0" />
  <row Id="38043" PostHistoryTypeId="2" PostId="9588" RevisionGUID="a4c8c57d-64ee-4f9d-b6d5-d6977401f1d7" CreationDate="2023-08-11T08:48:07.420" UserId="2762" Text="When a parachain lease ends, it becomes a parathread, and its existing state root and Wasm stays on the relay chain. There was probably something wrong with your onboarding. &#xD;&#xA;&#xD;&#xA;After re-onboard it, looks it appears as a parachain: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="38045" PostHistoryTypeId="5" PostId="9585" RevisionGUID="1c02b602-14ad-4046-a2b0-2a262dbadc5f" CreationDate="2023-08-11T09:03:35.300" UserId="567" Comment="added 2 characters in body" Text="If you are running in local I suppose you are using zombie-net. can you add xcm logs to your config. It will displays which `FailedToTransactAsset` it is:&#xD;&#xA;&#xD;&#xA;      args = [ &quot;-l=xcm=trace&quot; ]&#xD;&#xA;&#xD;&#xA;On AssetHub id = 1000 you should register asset location (with the same interior as you have done in 2000). In parachain 2000 you should register location (as you have already done) and also set assets units per second.&#xD;&#xA;&#xD;&#xA;This is a plokadotjs script I did to register an asset id = 1 on two `Astar` parachains (and use XCM to transfer between chains). It will help understanding of the set-up:&#xD;&#xA;&#xD;&#xA;    const batchA = apiA.tx.utility.batchAll([&#xD;&#xA;        apiA.tx.sudo.sudo(apiA.tx.assets.forceCreate(1, {Id: alice.address}, true, 1)),&#xD;&#xA;        apiA.tx.sudo.sudo(apiA.tx.assets.forceSetMetadata(1, &quot;TST&quot;, &quot;Test Token&quot;, 0, false)),&#xD;&#xA;        apiA.tx.assets.mint(1, {Id: alice.address}, 1000000n * DECIMALS),&#xD;&#xA;        apiA.tx.sudo.sudo(apiA.tx.xcAssetConfig.registerAssetLocation(&#xD;&#xA;            {&#xD;&#xA;                V3: {&#xD;&#xA;                    parents: 0,&#xD;&#xA;                    interior: {&#xD;&#xA;                        X1:&#xD;&#xA;                            {GeneralIndex: 1},&#xD;&#xA;                    },&#xD;&#xA;                },&#xD;&#xA;            },&#xD;&#xA;            1&#xD;&#xA;        )),&#xD;&#xA;    ]);&#xD;&#xA;    await sendTransaction(batchA, alice);&#xD;&#xA;    &#xD;&#xA;    const batchB = apiB.tx.utility.batchAll([&#xD;&#xA;        // Parcahin A soverign account&#xD;&#xA;        apiB.tx.balances.transferKeepAlive(&quot;5Ec4AhPUwPeyTFyuhGuBbD224mY85LKLMSqSSo33JYWCazU4&quot;, 1000n * DECIMALS),&#xD;&#xA;        // Fund Parcahin A sovereign account to create token. At least should have mint rights&#xD;&#xA;        apiB.tx.sudo.sudo(apiB.tx.assets.forceCreate(1, &quot;5Ec4AhPUwPeyTFyuhGuBbD224mY85LKLMSqSSo33JYWCazU4&quot;, true, 1)),&#xD;&#xA;        apiB.tx.sudo.sudo(apiB.tx.assets.forceSetMetadata(1, &quot;TST&quot;, &quot;Test Token&quot;, 0, false)),&#xD;&#xA;        apiB.tx.sudo.sudo(apiB.tx.xcAssetConfig.registerAssetLocation(&#xD;&#xA;            {&#xD;&#xA;                V3: {&#xD;&#xA;                    parents: 1,&#xD;&#xA;                    interior: {&#xD;&#xA;                        X2: [&#xD;&#xA;                            {Parachain: 2000},&#xD;&#xA;                            {GeneralIndex: 1},&#xD;&#xA;                        ],&#xD;&#xA;                    },&#xD;&#xA;                },&#xD;&#xA;            },&#xD;&#xA;            1&#xD;&#xA;        )),&#xD;&#xA;        apiB.tx.sudo.sudo(apiB.tx.xcAssetConfig.setAssetUnitsPerSecond(&#xD;&#xA;            {&#xD;&#xA;                V3: {&#xD;&#xA;                    parents: 1,&#xD;&#xA;                    interior: {&#xD;&#xA;                        X2: [&#xD;&#xA;                            {Parachain: 2000},&#xD;&#xA;                            {GeneralIndex: 1},&#xD;&#xA;                        ],&#xD;&#xA;                    },&#xD;&#xA;                },&#xD;&#xA;            },&#xD;&#xA;            1&#xD;&#xA;        )),&#xD;&#xA;    ]);&#xD;&#xA;    &#xD;&#xA;    await sendTransaction(batchB, alice);&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38046" PostHistoryTypeId="5" PostId="9580" RevisionGUID="a0b93f9a-e5b8-45c2-b735-c96290e15ebe" CreationDate="2023-08-11T09:15:59.697" UserId="3371" Comment="added 903 characters in body" Text="I'm facing the `FailedToTransactAsset` error while trying to send assets from Statemint to another parachain.&#xD;&#xA;&#xD;&#xA;So basically I have the following configuration:&#xD;&#xA;&#xD;&#xA;**Relay chain**&#xD;&#xA;&#xD;&#xA;Polkadot relay chain running with the runtime version `10000` and the latest chainspec with 2 validators: alice/bob&#xD;&#xA;&#xD;&#xA;**Parachains**&#xD;&#xA;&#xD;&#xA;Statemint(para id: 1000) - a local `AssetHub` parachain &#xD;&#xA;&#xD;&#xA;Custom Parachain(para id: 2000) - a custom parachain that has asset registry and other stuff required for transferring incoming assets&#xD;&#xA;&#xD;&#xA;Both parachains are connected between each other with the HRMP channel so I'm able to interact with the sovereign accounts on the relay chain(transferring assets as described [here][1]) for both parachains:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;      [&#xD;&#xA;        [&#xD;&#xA;          {&#xD;&#xA;            sender: 1,000&#xD;&#xA;            recipient: 2,000&#xD;&#xA;          }&#xD;&#xA;        ]&#xD;&#xA;        {&#xD;&#xA;          maxCapacity: 8&#xD;&#xA;          maxTotalSize: 8,192&#xD;&#xA;          maxMessageSize: 1,048,576&#xD;&#xA;          msgCount: 0&#xD;&#xA;          totalSize: 0&#xD;&#xA;          mqcHead: null&#xD;&#xA;          senderDeposit: 0&#xD;&#xA;          recipientDeposit: 0&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;      [&#xD;&#xA;        [&#xD;&#xA;          {&#xD;&#xA;            sender: 2,000&#xD;&#xA;            recipient: 1,000&#xD;&#xA;          }&#xD;&#xA;        ]&#xD;&#xA;        {&#xD;&#xA;          maxCapacity: 8&#xD;&#xA;          maxTotalSize: 8,192&#xD;&#xA;          maxMessageSize: 1,048,576&#xD;&#xA;          msgCount: 0&#xD;&#xA;          totalSize: 0&#xD;&#xA;          mqcHead: null&#xD;&#xA;          senderDeposit: 0&#xD;&#xA;          recipientDeposit: 0&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;I've created a `sufficient` asset on the `AssetHub` chain and minted some tokens to `Alice` account:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I've also created an asset registry mapping for the asset above on `custom parachain`:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;        [&#xD;&#xA;          2,983&#xD;&#xA;        ]&#xD;&#xA;        {&#xD;&#xA;          V3: {&#xD;&#xA;            parents: 1&#xD;&#xA;            interior: {&#xD;&#xA;              X3: [&#xD;&#xA;                {&#xD;&#xA;                  Parachain: 1,000&#xD;&#xA;                }&#xD;&#xA;                {&#xD;&#xA;                  PalletInstance: 50&#xD;&#xA;                }&#xD;&#xA;                {&#xD;&#xA;                  GeneralIndex: 1,983&#xD;&#xA;                }&#xD;&#xA;              ]&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;&#xD;&#xA; Now I want to transfer some amount of assets to `custom parachain` using `polkadotXcm`  `limitedReserveTransferAssets` function similar to the extrinsic used [here][3] to transfer assets from `Polkadot` `AssetHub` to `Astar` parachain:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        name: &quot;dest&quot;,&#xD;&#xA;        type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;        type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          V3: {&#xD;&#xA;            interior: {&#xD;&#xA;              X1: {&#xD;&#xA;                Parachain: 2006&#xD;&#xA;              }&#xD;&#xA;            },&#xD;&#xA;            parents: 1&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;beneficiary&quot;,&#xD;&#xA;        type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;        type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          V3: {&#xD;&#xA;            interior: {&#xD;&#xA;              X1: {&#xD;&#xA;                AccountId32: {&#xD;&#xA;                  id: &quot;0x0e26695a00e4a7c696ff136e636f70b3450acfed92f345822ae89b606fcd645d&quot;,&#xD;&#xA;                  network: null&#xD;&#xA;                }&#xD;&#xA;              }&#xD;&#xA;            },&#xD;&#xA;            parents: 0&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;assets&quot;,&#xD;&#xA;        type: &quot;xcm:VersionedMultiAssets&quot;,&#xD;&#xA;        type_name: &quot;Box&lt;VersionedMultiAssets&gt;&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          V3: [&#xD;&#xA;            {&#xD;&#xA;              fun: {&#xD;&#xA;                Fungible: &quot;2200000&quot;&#xD;&#xA;              },&#xD;&#xA;              id: {&#xD;&#xA;                Concrete: {&#xD;&#xA;                  interior: {&#xD;&#xA;                    X2: {&#xD;&#xA;                      col0: {&#xD;&#xA;                        PalletInstance: 50&#xD;&#xA;                      },&#xD;&#xA;                      col1: {&#xD;&#xA;                        GeneralIndex: &quot;1984&quot;&#xD;&#xA;                      }&#xD;&#xA;                    }&#xD;&#xA;                  },&#xD;&#xA;                  parents: 0&#xD;&#xA;                }&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          ]&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;fee_asset_item&quot;,&#xD;&#xA;        type: &quot;U32&quot;,&#xD;&#xA;        type_name: &quot;u32&quot;,&#xD;&#xA;        value: 0&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;weight_limit&quot;,&#xD;&#xA;        type: &quot;xcm:v3:WeightLimit&quot;,&#xD;&#xA;        type_name: &quot;WeightLimit&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          Unlimited: &quot;&quot;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;After submitting transaction I'm getting the following error with no clue like what exactly has happened:&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA; &#xD;&#xA;There are no details for the `FailedToTransactAsset` error. As far as I understand this is due to a conversion issue as per the source code. However there are 4 types of `conversion errors` that can happen and I'm not sure which one is in my particular case:&#xD;&#xA;&#xD;&#xA;    impl From&lt;Error&gt; for XcmError {&#xD;&#xA;    	fn from(e: Error) -&gt; Self {&#xD;&#xA;    		use XcmError::FailedToTransactAsset;&#xD;&#xA;    		match e {&#xD;&#xA;    			Error::AssetNotHandled =&gt; XcmError::AssetNotFound,&#xD;&#xA;    			Error::AccountIdConversionFailed =&gt; FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;),&#xD;&#xA;    			Error::AmountToBalanceConversionFailed =&gt;&#xD;&#xA;    				FailedToTransactAsset(&quot;AmountToBalanceConversionFailed&quot;),&#xD;&#xA;    			Error::AssetIdConversionFailed =&gt; FailedToTransactAsset(&quot;AssetIdConversionFailed&quot;),&#xD;&#xA;    			Error::InstanceConversionFailed =&gt; FailedToTransactAsset(&quot;InstanceConversionFailed&quot;),&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;Any help appreciated!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;## UPDATE ##&#xD;&#xA;&#xD;&#xA;Here is the error from the logs while using `-lxcm=trace` arg:&#xD;&#xA;&#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::execute: [Parachain] !!! ERROR: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;)    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 0, xcm_error: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;), weight: &lt;wasm:stripped&gt; })    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] Execution errored at 0: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;) (original_origin: MultiLocation { parents: 0, interior: Here })&#xD;&#xA;&#xD;&#xA;As I understand the problem can be either in the `from` or `to` accounts used in the transfer call. So how should I form the request to transfer-reserve tokens from AssetHub to my parachain?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/transfer-assets-with-xcm/&#xD;&#xA;  [2]: https://i.stack.imgur.com/bcDQk.png&#xD;&#xA;  [3]: https://assethub-polkadot.subscan.io/extrinsic/0x553cca772e2b4e73c355dad12954c15929ae5dcd5436e724d5796d00093eeebb?tab=xcm_transfer&#xD;&#xA;  [4]: https://i.stack.imgur.com/r9WND.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38047" PostHistoryTypeId="5" PostId="9580" RevisionGUID="ddf2808e-b258-4899-9a6a-21aadb029d71" CreationDate="2023-08-11T09:29:27.747" UserId="3371" Comment="added 7191 characters in body" Text="I'm facing the `FailedToTransactAsset` error while trying to send assets from Statemint to another parachain.&#xD;&#xA;&#xD;&#xA;So basically I have the following configuration:&#xD;&#xA;&#xD;&#xA;**Relay chain**&#xD;&#xA;&#xD;&#xA;Polkadot relay chain running with the runtime version `10000` and the latest chainspec with 2 validators: alice/bob&#xD;&#xA;&#xD;&#xA;**Parachains**&#xD;&#xA;&#xD;&#xA;Statemint(para id: 1000) - a local `AssetHub` parachain &#xD;&#xA;&#xD;&#xA;Custom Parachain(para id: 2000) - a custom parachain that has asset registry and other stuff required for transferring incoming assets&#xD;&#xA;&#xD;&#xA;Both parachains are connected between each other with the HRMP channel so I'm able to interact with the sovereign accounts on the relay chain(transferring assets as described [here][1]) for both parachains:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;      [&#xD;&#xA;        [&#xD;&#xA;          {&#xD;&#xA;            sender: 1,000&#xD;&#xA;            recipient: 2,000&#xD;&#xA;          }&#xD;&#xA;        ]&#xD;&#xA;        {&#xD;&#xA;          maxCapacity: 8&#xD;&#xA;          maxTotalSize: 8,192&#xD;&#xA;          maxMessageSize: 1,048,576&#xD;&#xA;          msgCount: 0&#xD;&#xA;          totalSize: 0&#xD;&#xA;          mqcHead: null&#xD;&#xA;          senderDeposit: 0&#xD;&#xA;          recipientDeposit: 0&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;      [&#xD;&#xA;        [&#xD;&#xA;          {&#xD;&#xA;            sender: 2,000&#xD;&#xA;            recipient: 1,000&#xD;&#xA;          }&#xD;&#xA;        ]&#xD;&#xA;        {&#xD;&#xA;          maxCapacity: 8&#xD;&#xA;          maxTotalSize: 8,192&#xD;&#xA;          maxMessageSize: 1,048,576&#xD;&#xA;          msgCount: 0&#xD;&#xA;          totalSize: 0&#xD;&#xA;          mqcHead: null&#xD;&#xA;          senderDeposit: 0&#xD;&#xA;          recipientDeposit: 0&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;I've created a `sufficient` asset on the `AssetHub` chain and minted some tokens to `Alice` account:&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I've also created an asset registry mapping for the asset above on `custom parachain`:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;        [&#xD;&#xA;          2,983&#xD;&#xA;        ]&#xD;&#xA;        {&#xD;&#xA;          V3: {&#xD;&#xA;            parents: 1&#xD;&#xA;            interior: {&#xD;&#xA;              X3: [&#xD;&#xA;                {&#xD;&#xA;                  Parachain: 1,000&#xD;&#xA;                }&#xD;&#xA;                {&#xD;&#xA;                  PalletInstance: 50&#xD;&#xA;                }&#xD;&#xA;                {&#xD;&#xA;                  GeneralIndex: 1,983&#xD;&#xA;                }&#xD;&#xA;              ]&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;&#xD;&#xA; Now I want to transfer some amount of assets to `custom parachain` using `polkadotXcm`  `limitedReserveTransferAssets` function similar to the extrinsic used [here][3] to transfer assets from `Polkadot` `AssetHub` to `Astar` parachain:&#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        name: &quot;dest&quot;,&#xD;&#xA;        type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;        type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          V3: {&#xD;&#xA;            interior: {&#xD;&#xA;              X1: {&#xD;&#xA;                Parachain: 2006&#xD;&#xA;              }&#xD;&#xA;            },&#xD;&#xA;            parents: 1&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;beneficiary&quot;,&#xD;&#xA;        type: &quot;xcm:VersionedMultiLocation&quot;,&#xD;&#xA;        type_name: &quot;Box&lt;VersionedMultiLocation&gt;&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          V3: {&#xD;&#xA;            interior: {&#xD;&#xA;              X1: {&#xD;&#xA;                AccountId32: {&#xD;&#xA;                  id: &quot;0x0e26695a00e4a7c696ff136e636f70b3450acfed92f345822ae89b606fcd645d&quot;,&#xD;&#xA;                  network: null&#xD;&#xA;                }&#xD;&#xA;              }&#xD;&#xA;            },&#xD;&#xA;            parents: 0&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;assets&quot;,&#xD;&#xA;        type: &quot;xcm:VersionedMultiAssets&quot;,&#xD;&#xA;        type_name: &quot;Box&lt;VersionedMultiAssets&gt;&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          V3: [&#xD;&#xA;            {&#xD;&#xA;              fun: {&#xD;&#xA;                Fungible: &quot;2200000&quot;&#xD;&#xA;              },&#xD;&#xA;              id: {&#xD;&#xA;                Concrete: {&#xD;&#xA;                  interior: {&#xD;&#xA;                    X2: {&#xD;&#xA;                      col0: {&#xD;&#xA;                        PalletInstance: 50&#xD;&#xA;                      },&#xD;&#xA;                      col1: {&#xD;&#xA;                        GeneralIndex: &quot;1984&quot;&#xD;&#xA;                      }&#xD;&#xA;                    }&#xD;&#xA;                  },&#xD;&#xA;                  parents: 0&#xD;&#xA;                }&#xD;&#xA;              }&#xD;&#xA;            }&#xD;&#xA;          ]&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;fee_asset_item&quot;,&#xD;&#xA;        type: &quot;U32&quot;,&#xD;&#xA;        type_name: &quot;u32&quot;,&#xD;&#xA;        value: 0&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        name: &quot;weight_limit&quot;,&#xD;&#xA;        type: &quot;xcm:v3:WeightLimit&quot;,&#xD;&#xA;        type_name: &quot;WeightLimit&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          Unlimited: &quot;&quot;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;After submitting transaction I'm getting the following error with no clue like what exactly has happened:&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA; &#xD;&#xA;There are no details for the `FailedToTransactAsset` error. As far as I understand this is due to a conversion issue as per the source code. However there are 4 types of `conversion errors` that can happen and I'm not sure which one is in my particular case:&#xD;&#xA;&#xD;&#xA;    impl From&lt;Error&gt; for XcmError {&#xD;&#xA;    	fn from(e: Error) -&gt; Self {&#xD;&#xA;    		use XcmError::FailedToTransactAsset;&#xD;&#xA;    		match e {&#xD;&#xA;    			Error::AssetNotHandled =&gt; XcmError::AssetNotFound,&#xD;&#xA;    			Error::AccountIdConversionFailed =&gt; FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;),&#xD;&#xA;    			Error::AmountToBalanceConversionFailed =&gt;&#xD;&#xA;    				FailedToTransactAsset(&quot;AmountToBalanceConversionFailed&quot;),&#xD;&#xA;    			Error::AssetIdConversionFailed =&gt; FailedToTransactAsset(&quot;AssetIdConversionFailed&quot;),&#xD;&#xA;    			Error::InstanceConversionFailed =&gt; FailedToTransactAsset(&quot;InstanceConversionFailed&quot;),&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    } &#xD;&#xA;&#xD;&#xA;Any help appreciated!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;## UPDATE ##&#xD;&#xA;&#xD;&#xA;Here is the error from the logs while using `-lxcm=trace` arg:&#xD;&#xA;&#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::execute: [Parachain] !!! ERROR: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;)    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 0, xcm_error: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;), weight: &lt;wasm:stripped&gt; })    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] Execution errored at 0: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;) (original_origin: MultiLocation { parents: 0, interior: Here })&#xD;&#xA;&#xD;&#xA;**Full Logs of the XCM:**&#xD;&#xA;&#xD;&#xA;    2023-08-11 11:47:42.037 TRACE tokio-runtime-worker xcm::weight: [Parachain] WeightInfoBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, xcm: Xcm([]) }])    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::weight: [Parachain] WeightInfoBounds message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [112, 97, 114, 97, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) } }])    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::weight: [Parachain] WeightInfoBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [112, 97, 114, 97, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) } }]) }])    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::weight: [Parachain] WeightInfoBounds message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [112, 97, 114, 97, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) } }]) }])    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] origin: MultiLocation { parents: 0, interior: Here }, message: Xcm([TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [112, 97, 114, 97, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) } }]) }]), weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::barriers: [Parachain] TakeWeightCredit origin: MultiLocation { parents: 0, interior: Here }, instructions: [TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [112, 97, 114, 97, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) } }]) }], max_weight: &lt;wasm:stripped&gt;, weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::process: [Parachain] origin: Some(MultiLocation { parents: 0, interior: Here }), total_surplus/refunded: &lt;wasm:stripped&gt;/&lt;wasm:stripped&gt;, error_handler_weight: &lt;wasm:stripped&gt;    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [112, 97, 114, 97, 208, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) } }]) }    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::currency_adapter: [Parachain] internal_transfer_asset asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }, from: MultiLocation { parents: 0, interior: Here }, to: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::fungibles_adapter: [Parachain] internal_transfer_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X2(PalletInstance(50), GeneralIndex(1984)) }), fun: Fungible(2200000) }, from: MultiLocation { parents: 0, interior: Here }, to: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::execute: [Parachain] !!! ERROR: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;)    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 0, xcm_error: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;), weight: &lt;wasm:stripped&gt; })    &#xD;&#xA;    2023-08-11 11:47:42.038 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] Execution errored at 0: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;) (original_origin: MultiLocation { parents: 0, interior: Here })    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As I understand the problem can be either in the `from` or `to` accounts used in the transfer call. So how should I form the request to transfer-reserve tokens from AssetHub to my parachain?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/transfer-assets-with-xcm/&#xD;&#xA;  [2]: https://i.stack.imgur.com/bcDQk.png&#xD;&#xA;  [3]: https://assethub-polkadot.subscan.io/extrinsic/0x553cca772e2b4e73c355dad12954c15929ae5dcd5436e724d5796d00093eeebb?tab=xcm_transfer&#xD;&#xA;  [4]: https://i.stack.imgur.com/r9WND.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38048" PostHistoryTypeId="2" PostId="9589" RevisionGUID="9f49d819-d4cc-4e41-bf53-e12c908dbe2a" CreationDate="2023-08-11T09:44:00.450" UserId="94" Text="It is indeed advised to regularly update the database weights. You can see the result of this for example in the [Polkadot runtime](https://github.com/paritytech/polkadot/blob/c2efce0d60d656cb13f5ade52bf3d866e17085fa/runtime/polkadot/constants/src/weights/paritydb_weights.rs#L60). The procedure is outlined in this [README](https://github.com/paritytech/substrate/blob/master/utils/frame/benchmarking-cli/src/storage/README.md). Please open an issue in Subustrate if the documentation is insufficient to produce usable results." ContentLicense="CC BY-SA 4.0" />
  <row Id="38050" PostHistoryTypeId="2" PostId="9590" RevisionGUID="d7cacc76-7735-434d-b451-592f4fb81495" CreationDate="2023-08-11T10:02:53.307" UserId="3136" Text="It's evident that you're utilizing an endpoint labeled as `8845` within your search engine for your explorer, while concurrently employing a websocket (ws) port set at `9945` in your terminal. To ensure smooth access to your port, consider modifying the endpoint configuration within your search engine accordingly`(change to 8845 to 9945 in your search engine)`. This adjustment will allow you to seamlessly open the specified port and establish the desired connections.&#xD;&#xA;Let me know if  it works." ContentLicense="CC BY-SA 4.0" />
  <row Id="38052" PostHistoryTypeId="5" PostId="9590" RevisionGUID="72c57659-7824-4a8f-8102-afc26a50fe5a" CreationDate="2023-08-11T10:10:17.467" UserId="3136" Comment="edited body" Text="It's evident that you're utilizing an endpoint labeled as `8855` within your search engine for your explorer, while concurrently employing a websocket (ws) port set at `9944` in your terminal. To ensure smooth access to your port, consider modifying the endpoint configuration within your search engine accordingly`(change to 8845 to 9944 in your search engine)`. This adjustment will allow you to seamlessly open the specified port and establish the desired connections.&#xD;&#xA;Let me know if  it works." ContentLicense="CC BY-SA 4.0" />
  <row Id="38053" PostHistoryTypeId="5" PostId="9590" RevisionGUID="a7010a7e-3ef8-49b4-a2db-61717c460507" CreationDate="2023-08-11T10:18:41.407" UserId="3136" Comment="edited body" Text="It's evident that you're utilizing an endpoint labeled as `8855` within your search engine for your explorer, while concurrently employing a websocket (ws) port set at `9944` in your terminal. To ensure smooth access to your port, consider modifying the endpoint configuration within your search engine accordingly`(change to 8845 to 9944 in your search engine)`. This adjustment will allow you to seamlessly open the specified port and establish the desired connections.&#xD;&#xA;Let me know if  it works.&#xD;&#xA;or you can try this command and edit it as your relaychain port and path of your parachain and relay chain.&#xD;&#xA;&gt; ./target/release/parachain-template-node --alice --collator --force-authoring --chain raw-parachain-chainspec.json --base-path / --port 8855 --ws-port 9944 -- --execution wasm --chain ../peer-relay-chain/customSpecRaw.json --port 9988 --ws-port 9945 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/enter your relaychain local identity" ContentLicense="CC BY-SA 4.0" />
  <row Id="38056" PostHistoryTypeId="2" PostId="9592" RevisionGUID="4d0816c0-76c4-4fcf-9c20-3ca670a65d0c" CreationDate="2023-08-11T15:28:12.070" UserId="2163" Text="I am running a local network containing an AssetHub and the Trappist parachain.&#xD;&#xA;&#xD;&#xA;I create assets on both chains, and I make the one on AssetHub a sufficient asset.&#xD;&#xA;&#xD;&#xA;I register the asset on the Trappist chain using `assetRegistry.registerReserveAsset`:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;When I initiate a reserve transfer from AssetHub to Trappist the execution on AssetHub succeeds, but I get the `TooExpensive` error on the receiver side.&#xD;&#xA;&#xD;&#xA;NOTE: the reserve transfer instruction looks like the one [here](https://substrate.stackexchange.com/questions/9525/xcm-reserve-transfer-between-trappist-and-asset-hub), the only two differences being the `assetId` is zero and I transfer a much greater amount (10000000000000)&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CvQcr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38058" PostHistoryTypeId="1" PostId="9592" RevisionGUID="4d0816c0-76c4-4fcf-9c20-3ca670a65d0c" CreationDate="2023-08-11T15:28:12.070" UserId="2163" Text="XCM TooExpensive when reserve transferring" ContentLicense="CC BY-SA 4.0" />
  <row Id="38059" PostHistoryTypeId="3" PostId="9592" RevisionGUID="4d0816c0-76c4-4fcf-9c20-3ca670a65d0c" CreationDate="2023-08-11T15:28:12.070" UserId="2163" Text="|xcm|hrmp|trappist|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38060" PostHistoryTypeId="2" PostId="9593" RevisionGUID="e0f759e5-0b71-4ece-975a-b0065f676266" CreationDate="2023-08-11T17:57:53.693" UserId="372" Text="This question is about the Substrate host functions and storage implementation and is not specific to FRAME (although relevant FRAME-related information is welcome).&#xD;&#xA;&#xD;&#xA;Imagine that the runtime knows it will need to read a bunch of keys. Perhaps those keys are even located nearby in the storage trie under a common prefix. **Is there any way the runtime can request a bulk read of many keys** and get a performance benefit as opposed to reading them one-by-one?&#xD;&#xA;&#xD;&#xA;If I read them one-by-one, each read would individually have a cache miss and db access." ContentLicense="CC BY-SA 4.0" />
  <row Id="38062" PostHistoryTypeId="1" PostId="9593" RevisionGUID="e0f759e5-0b71-4ece-975a-b0065f676266" CreationDate="2023-08-11T17:57:53.693" UserId="372" Text="Can a Substrate Runtime bulk-read many storage keys at once?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38063" PostHistoryTypeId="3" PostId="9593" RevisionGUID="e0f759e5-0b71-4ece-975a-b0065f676266" CreationDate="2023-08-11T17:57:53.693" UserId="372" Text="|runtime|storage|batch|host-functions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38064" PostHistoryTypeId="50" PostId="2868" RevisionGUID="2d7f9bfa-76a9-4110-902c-c319c6aab1c2" CreationDate="2023-08-11T22:05:15.667" UserId="-1" />
  <row Id="38065" PostHistoryTypeId="2" PostId="9594" RevisionGUID="bf2c0bd4-088a-4aba-8615-adbb69e197f7" CreationDate="2023-08-12T00:16:33.670" UserId="351" Text="Getting this message in the log &#xD;&#xA;&#xD;&#xA;    2023-08-12 02:58:12 [Parachain] Could not find the header of the genesis block in the database! block_hash=0x68d4f093429e67003e9b212826f3b2a0aeba6b6a84755aa006c1bd67bcef8758&#xD;&#xA;&#xD;&#xA;The relay chain produces blocks but when registering the parachain and including genesis-wasm &amp; state, the parachain registers but the logs give out that error.&#xD;&#xA;&#xD;&#xA;Tinkering with I dont know if thats the issue in wasm file or genesis-state file, but all files are fresh." ContentLicense="CC BY-SA 4.0" />
  <row Id="38067" PostHistoryTypeId="1" PostId="9594" RevisionGUID="bf2c0bd4-088a-4aba-8615-adbb69e197f7" CreationDate="2023-08-12T00:16:33.670" UserId="351" Text="Error registering parachain using zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="38068" PostHistoryTypeId="3" PostId="9594" RevisionGUID="bf2c0bd4-088a-4aba-8615-adbb69e197f7" CreationDate="2023-08-12T00:16:33.670" UserId="351" Text="|parachain|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38069" PostHistoryTypeId="50" PostId="9243" RevisionGUID="c8aee9db-6810-40ab-b8b5-a713a573116a" CreationDate="2023-08-12T04:06:20.760" UserId="-1" />
  <row Id="38070" PostHistoryTypeId="50" PostId="5725" RevisionGUID="bffdc787-2d70-4894-8c44-65c241ebd99c" CreationDate="2023-08-12T07:08:51.103" UserId="-1" />
  <row Id="38071" PostHistoryTypeId="50" PostId="9252" RevisionGUID="03ac39d4-380e-4248-b08e-0fac5ed2de06" CreationDate="2023-08-12T08:07:35.940" UserId="-1" />
  <row Id="38076" PostHistoryTypeId="50" PostId="9261" RevisionGUID="977b2e5c-0299-4f2c-b3d7-3bef61928d66" CreationDate="2023-08-13T06:01:20.167" UserId="-1" />
  <row Id="38077" PostHistoryTypeId="50" PostId="9258" RevisionGUID="d0bbf8fd-2f62-4b0e-9112-0fb6abd65740" CreationDate="2023-08-13T07:06:35.733" UserId="-1" />
  <row Id="38079" PostHistoryTypeId="2" PostId="9596" RevisionGUID="70a887b0-43a5-4830-9f67-0b11d5035f5a" CreationDate="2023-08-13T12:41:17.033" UserId="4123" Text="I have tokens from faucet in Shibuya. I &quot;cargo contract build&quot; my flipper contract.&#xD;&#xA;&#xD;&#xA;When I want to deploy contract using &quot;Upload &amp; deploy code&quot;, I have &quot;contracts.instantiateWithCode broadcast&quot; but the contract is never deployed. It stays loading ! I can transfer, but not upload and deploy.&#xD;&#xA;&#xD;&#xA;Does anyone can help me ? Thanks !" ContentLicense="CC BY-SA 4.0" />
  <row Id="38081" PostHistoryTypeId="1" PostId="9596" RevisionGUID="70a887b0-43a5-4830-9f67-0b11d5035f5a" CreationDate="2023-08-13T12:41:17.033" UserId="4123" Text="Problem shibuya deploy contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="38082" PostHistoryTypeId="3" PostId="9596" RevisionGUID="70a887b0-43a5-4830-9f67-0b11d5035f5a" CreationDate="2023-08-13T12:41:17.033" UserId="4123" Text="|ink|astar|shibuya|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38083" PostHistoryTypeId="2" PostId="9597" RevisionGUID="c7b4f458-e4a0-4423-8820-505f5bf7e5dc" CreationDate="2023-08-13T14:22:28.430" UserId="4543" Text="I think this error is sent if chain is not synced yet making it freaking confusing. I have now created container with polkadot service 3 times ad each time tehre is already duplicate of the key when I first tiem rotate it... there also is no way to search where this duiplicate exists.." ContentLicense="CC BY-SA 4.0" />
  <row Id="38085" PostHistoryTypeId="2" PostId="9598" RevisionGUID="6981e85f-1687-4547-acb8-d3424a245f43" CreationDate="2023-08-13T18:34:40.343" UserId="620" Text="You can't, the deposit is there for a reason." ContentLicense="CC BY-SA 4.0" />
  <row Id="38087" PostHistoryTypeId="50" PostId="3807" RevisionGUID="f979a932-2a70-43d2-9cba-dc175aec02bc" CreationDate="2023-08-13T23:01:00.113" UserId="-1" />
  <row Id="38088" PostHistoryTypeId="2" PostId="9599" RevisionGUID="3a9874b8-de66-45c8-a763-a86121927f36" CreationDate="2023-08-14T02:57:46.540" UserId="25" Text="Justifications are external to the signed part of the Substrate block, meaning they change after block is produced initially.&#xD;&#xA;&#xD;&#xA;However, I'm wondering if there is any assumption in Substrate (or otherwise, let's say in specific consensus engine) that they are canonical after block is finalized or can they still change even after that?&#xD;&#xA;&#xD;&#xA;[This test case](https://github.com/paritytech/substrate/blob/48d4313151873e3ce8be877efb9e485649264f5e/client/api/src/in_mem.rs#L860-L872) seems to imply it is not the case, but maybe it is just a test case." ContentLicense="CC BY-SA 4.0" />
  <row Id="38090" PostHistoryTypeId="1" PostId="9599" RevisionGUID="3a9874b8-de66-45c8-a763-a86121927f36" CreationDate="2023-08-14T02:57:46.540" UserId="25" Text="Are justifications of finalized block canonical?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38091" PostHistoryTypeId="3" PostId="9599" RevisionGUID="3a9874b8-de66-45c8-a763-a86121927f36" CreationDate="2023-08-14T02:57:46.540" UserId="25" Text="|consensus|finality|justification|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38092" PostHistoryTypeId="2" PostId="9600" RevisionGUID="bbb4d27a-9da1-4414-b1f6-6bde0bb61dee" CreationDate="2023-08-14T05:07:03.387" UserId="354" Text="There is some issue with polkado-js UI, so what you need is to use the [contracts-ui][1] to deploy your contract and you can also refer to question https://substrate.stackexchange.com/questions/7366/while-executing-contracts-functions-getting-out-of-gas-error/7368#7368. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://contracts-ui.substrate.io" ContentLicense="CC BY-SA 4.0" />
  <row Id="38094" PostHistoryTypeId="2" PostId="9601" RevisionGUID="4c389a8e-81e1-4880-bdb2-4ca61844b3dc" CreationDate="2023-08-14T06:23:38.453" UserId="3955" Text="What is idiomatic way to submit signed extrinsic in outer node?&#xD;&#xA;&#xD;&#xA;Is it using `BasicPool` and [`submit_local`][1]? Would Rust example at the bottom be be good approach? If it is how to:&#xD;&#xA;&#xD;&#xA; - properly choose `period` and `current` args for `Era::mortal`?&#xD;&#xA; - obtain `nonce` for `frame_system::CheckNonce`?&#xD;&#xA;&#xD;&#xA;Also it seems using [`subxt`][2] requires way less boilerplate than example below.&#xD;&#xA;&#xD;&#xA;Is there better interface, with less boilerplate than in example below, I could use when submitting signed extrinsics in outer node?&#xD;&#xA;&#xD;&#xA;There's always possibility of using `subxt` but that doesn't seem right since I've got access to runtime, transaction pool and needed types within outer node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn submit_signed_extrinsic_example(&#xD;&#xA;	transaction_pool: &amp;dyn sc_transaction_pool_api::LocalTransactionPool&lt;&#xD;&#xA;		Block = Block,&#xD;&#xA;		Hash = Hash,&#xD;&#xA;		Error = sc_transaction_pool::error::Error,&#xD;&#xA;	&gt;,&#xD;&#xA;	keystore: &amp;sc_keystore::LocalKeystore,&#xD;&#xA;	genesis_hash: sp_core::H256,&#xD;&#xA;	block_hash: sp_core::H256,&#xD;&#xA;) -&gt; Result&lt;()&gt; {&#xD;&#xA;	let call = my_pallet::Call::my_call {};&#xD;&#xA;&#xD;&#xA;	let keys = keystore.sr25519_public_keys(key_types::ACCOUNT);&#xD;&#xA;&#xD;&#xA;	let public = keys.first().ok_or(Error::NoNodeAccountKey)?.clone();&#xD;&#xA;&#xD;&#xA;	let extra: runtime::SignedExtra = (&#xD;&#xA;		frame_system::CheckNonZeroSender::&lt;runtime::Runtime&gt;::new(),&#xD;&#xA;		frame_system::CheckSpecVersion::&lt;runtime::Runtime&gt;::new(),&#xD;&#xA;		frame_system::CheckTxVersion::&lt;runtime::Runtime&gt;::new(),&#xD;&#xA;		frame_system::CheckGenesis::&lt;runtime::Runtime&gt;::new(),&#xD;&#xA;		frame_system::CheckMortality::&lt;runtime::Runtime&gt;::from(sp_runtime::generic::Era::mortal(&#xD;&#xA;			0, 0,&#xD;&#xA;		)),&#xD;&#xA;		frame_system::CheckNonce::&lt;runtime::Runtime&gt;::from(0),&#xD;&#xA;		frame_system::CheckWeight::&lt;runtime::Runtime&gt;::new(),&#xD;&#xA;		pallet_transaction_payment::ChargeTransactionPayment::&lt;runtime::Runtime&gt;::from(0),&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	let payload = runtime::SignedPayload::from_raw(&#xD;&#xA;		call.clone().into(),&#xD;&#xA;		extra.clone(),&#xD;&#xA;		(&#xD;&#xA;			(),&#xD;&#xA;			runtime::VERSION.spec_version,&#xD;&#xA;			runtime::VERSION.transaction_version,&#xD;&#xA;			genesis_hash,&#xD;&#xA;			genesis_hash,&#xD;&#xA;			(),&#xD;&#xA;			(),&#xD;&#xA;			(),&#xD;&#xA;		),&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	let signature = sp_runtime::MultiSignature::Sr25519(payload.using_encoded(|payload| {&#xD;&#xA;		keystore&#xD;&#xA;			.sr25519_sign(key_types::ACCOUNT, &amp;public, payload)?&#xD;&#xA;			.ok_or(Error::NoNodeAccountKey)&#xD;&#xA;	})?);&#xD;&#xA;&#xD;&#xA;	let extrinsic = runtime::UncheckedExtrinsic::new_signed(&#xD;&#xA;		call.clone().into(),&#xD;&#xA;		sp_runtime::AccountId32::from(public).into(),&#xD;&#xA;		signature,&#xD;&#xA;		extra,&#xD;&#xA;	);&#xD;&#xA;	let block_id = sp_runtime::generic::BlockId::Hash(block_hash);&#xD;&#xA;&#xD;&#xA;	transaction_pool.submit_local(&amp;block_id, extrinsic.into())?;&#xD;&#xA;&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sc-transaction-pool-api/21.0.0/sc_transaction_pool_api/trait.LocalTransactionPool.html#tymethod.submit_local&#xD;&#xA;  [2]: https://github.com/paritytech/subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="38096" PostHistoryTypeId="1" PostId="9601" RevisionGUID="4c389a8e-81e1-4880-bdb2-4ca61844b3dc" CreationDate="2023-08-14T06:23:38.453" UserId="3955" Text="How to create signed extrinsic in outer node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38097" PostHistoryTypeId="3" PostId="9601" RevisionGUID="4c389a8e-81e1-4880-bdb2-4ca61844b3dc" CreationDate="2023-08-14T06:23:38.453" UserId="3955" Text="|extrinsic|substrate-node|subxt|transaction-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38098" PostHistoryTypeId="2" PostId="9602" RevisionGUID="0d78dc0e-9530-4e4c-a6d9-3c10a7f15f84" CreationDate="2023-08-14T06:44:09.487" UserId="377" Text="I am running solochain so randomly my chain stop producing blocks and giving this error.&#xD;&#xA;&#xD;&#xA;Every time when chain giving this error i need to stop and re-run the node.&#xD;&#xA;&#xD;&#xA;Can you please help why i am getting this error?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xyZc3.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="38100" PostHistoryTypeId="1" PostId="9602" RevisionGUID="0d78dc0e-9530-4e4c-a6d9-3c10a7f15f84" CreationDate="2023-08-14T06:44:09.487" UserId="377" Text="how to solve Networking or low-level protocol error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38101" PostHistoryTypeId="3" PostId="9602" RevisionGUID="0d78dc0e-9530-4e4c-a6d9-3c10a7f15f84" CreationDate="2023-08-14T06:44:09.487" UserId="377" Text="|block-production|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38102" PostHistoryTypeId="5" PostId="9602" RevisionGUID="21be7665-6082-4540-ab10-252d2313d7fe" CreationDate="2023-08-14T06:54:02.757" UserId="377" Comment="added 35 characters in body" Text="I am running solochain so randomly my chain stop producing blocks and giving this error.&#xD;&#xA;&#xD;&#xA;Every time when chain giving this error i need to stop and re-run the node.&#xD;&#xA;&#xD;&#xA;substrate version using: v1.0.0&#xD;&#xA;&#xD;&#xA;Can you please help why i am getting this error?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xyZc3.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="38103" PostHistoryTypeId="2" PostId="9603" RevisionGUID="c3545fc2-a04b-42fe-9e34-99d30a5b0cad" CreationDate="2023-08-14T06:59:02.960" UserId="1959" Text="Trappist does not support using the Asset you are using to pay for execution fees. Currently it supports USDT, Realy token, native token. You can change the trader to support more tokens.&#xD;&#xA;https://github.com/paritytech/trappist/blob/v0.9.42/runtime/trappist/src/xcm_config.rs#L258&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38105" PostHistoryTypeId="2" PostId="9604" RevisionGUID="4788112e-7d46-4a87-865c-6579466370c8" CreationDate="2023-08-14T10:04:26.763" UserId="2844" Text="I am running [`call_runtime`](https://github.com/paritytech/ink/tree/master/integration-tests/call-runtime) from ink. It builds successfully, but when trying to upload contract, It gives `system.ExtrinsicFailed contracts.CodeRejected` error. Someone please advice what I am doing wrong?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wsTSp.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/VhPTB.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/3BohX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38107" PostHistoryTypeId="1" PostId="9604" RevisionGUID="4788112e-7d46-4a87-865c-6579466370c8" CreationDate="2023-08-14T10:04:26.763" UserId="2844" Text="Error in deploying call_runtime contract from ink!" ContentLicense="CC BY-SA 4.0" />
  <row Id="38108" PostHistoryTypeId="3" PostId="9604" RevisionGUID="4788112e-7d46-4a87-865c-6579466370c8" CreationDate="2023-08-14T10:04:26.763" UserId="2844" Text="|ink|smart-contract|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38109" PostHistoryTypeId="2" PostId="9605" RevisionGUID="47bf1303-ae21-4cfc-82b3-1fe13ae07605" CreationDate="2023-08-14T11:58:08.843" UserId="3371" Text="In my particular case it was a problem with calling the `polkadotXcm` extrinsic via `sudo` call.&#xD;&#xA;&#xD;&#xA;Switching to calling the `polkadotXcm --&gt; limitedReserveTransferAssets(dest, beneficiary, assets, feeAssetItem, weightLimit)` extrinsic directly via `Alice` account did the trick.&#xD;&#xA;&#xD;&#xA;However, in general, the `AccountIdConversionFailed` is a bit confusing." ContentLicense="CC BY-SA 4.0" />
  <row Id="38111" PostHistoryTypeId="2" PostId="9606" RevisionGUID="2d41ab39-7942-401f-84a4-af0c990e6404" CreationDate="2023-08-14T14:52:47.887" UserId="4545" Text="How can I match on runtime Calls from my outer node? I essentially want to &quot;trigger&quot; the node once a type of extrinsic is submitted. It seems like I don't have an option to emit any kind of observable from WASM, so I'm attempting to watch the `import_notification_stream` from the transaction pool. This works, but now I'm struggling to unwrap the underlying call in the transaction.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let mut commands_stream = Box::pin(cloned_pool.import_notification_stream());&#xD;&#xA;		while let Some(tx_hash) = commands_stream.next().await {&#xD;&#xA;			log::info!(&quot;got hash for tx: {:?}&quot;, tx_hash);&#xD;&#xA;			if let Some(tx) = cloned_pool.ready_transaction(&amp;tx_hash) {&#xD;&#xA;				let uxt: Block::Extrinsic = tx.data().clone();&#xD;&#xA;                ... how to now convert to call and match&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38113" PostHistoryTypeId="1" PostId="9606" RevisionGUID="2d41ab39-7942-401f-84a4-af0c990e6404" CreationDate="2023-08-14T14:52:47.887" UserId="4545" Text="Convert transaction pool entry into Call" ContentLicense="CC BY-SA 4.0" />
  <row Id="38114" PostHistoryTypeId="3" PostId="9606" RevisionGUID="2d41ab39-7942-401f-84a4-af0c990e6404" CreationDate="2023-08-14T14:52:47.887" UserId="4545" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38115" PostHistoryTypeId="2" PostId="9607" RevisionGUID="931fad90-e0a5-40e5-919a-e67cb7991120" CreationDate="2023-08-14T15:14:33.413" UserId="4546" Text="https://github.com/paritytech/subxt/blob/master/subxt/examples/tx_basic.rs&#xD;&#xA;&#xD;&#xA;I want to call a function in my substrate pallet. I am using the &#xD;&#xA;&#xD;&#xA; - **substrate-node-template**&#xD;&#xA; - **subxt**&#xD;&#xA; - **subxt_signer**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use subxt::{OnlineClient, PolkadotConfig};&#xD;&#xA;use subxt_signer::sr25519::dev;&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;./src/artifacts/metadata.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;{&#xD;&#xA;   // ...&#xD;&#xA;&#xD;&#xA;   let account = dev::alice();&#xD;&#xA;   let call = polkadot::tx().template_module().do_something(32);&#xD;&#xA;   api.tx()&#xD;&#xA;      .sign_and_submit_then_watch_default(&amp;call, &amp;account)&#xD;&#xA;      .await&#xD;&#xA;      .unwrap();&#xD;&#xA;      &#xD;&#xA;  // ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but sign_and_submit_then_watch_default is giving error for &amp;account. This is the error that I get&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;the trait bound `subxt_signer::sr25519::Keypair: subxt::tx::Signer&lt;PolkadotConfig&gt;` is not satisfied&#xD;&#xA;the trait `subxt::tx::Signer&lt;PolkadotConfig&gt;` is not implemented for `subxt_signer::sr25519::Keypair`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have tried using sp_core and changing versions but nothing seems to work.&#xD;&#xA;&#xD;&#xA;My current versions are:&#xD;&#xA;```&#xD;&#xA;subxt = &quot;0.31.0&quot;&#xD;&#xA;subxt-signer = &quot;0.31.0&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38117" PostHistoryTypeId="1" PostId="9607" RevisionGUID="931fad90-e0a5-40e5-919a-e67cb7991120" CreationDate="2023-08-14T15:14:33.413" UserId="4546" Text="Incompatibility between subxt_signer and subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="38118" PostHistoryTypeId="3" PostId="9607" RevisionGUID="931fad90-e0a5-40e5-919a-e67cb7991120" CreationDate="2023-08-14T15:14:33.413" UserId="4546" Text="|substrate-node-template|pallet|rust|pallet-contracts|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38119" PostHistoryTypeId="2" PostId="9608" RevisionGUID="4bcb1fb5-9a2b-4d55-baf6-b90e04576547" CreationDate="2023-08-14T15:31:15.640" UserId="3846" Text="I am currently using Ledger Nano S to stake Dot but I am unable to receive rewards. I checked Polkadot's official website which says the minimum amount to receive rewards is 120Dot (My current bonded Dots are already higher than that) but I also checked PolkaGate Wallet's Solo Staking tab which says the minimum amount to stake is 405.1869 DOT. Which one is correct? Is it the reason I am unable to receive the rewards?&#xD;&#xA;&#xD;&#xA;[![][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WhN4b.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38121" PostHistoryTypeId="1" PostId="9608" RevisionGUID="4bcb1fb5-9a2b-4d55-baf6-b90e04576547" CreationDate="2023-08-14T15:31:15.640" UserId="3846" Text="Why is it required to have 405.1869 DOT in solo staking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38122" PostHistoryTypeId="3" PostId="9608" RevisionGUID="4bcb1fb5-9a2b-4d55-baf6-b90e04576547" CreationDate="2023-08-14T15:31:15.640" UserId="3846" Text="|staking|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38123" PostHistoryTypeId="5" PostId="9594" RevisionGUID="254b6166-762a-49cc-81c5-3025c12f7150" CreationDate="2023-08-14T17:37:20.730" UserId="351" Comment="added 773 characters in body" Text="Getting this message in the log &#xD;&#xA;&#xD;&#xA;    2023-08-12 02:58:12 [Parachain] Could not find the header of the genesis block in the database! block_hash=0x68d4f093429e67003e9b212826f3b2a0aeba6b6a84755aa006c1bd67bcef8758&#xD;&#xA;&#xD;&#xA;The relay chain produces blocks but when registering the parachain and including genesis-wasm &amp; state, the parachain registers but the logs give out that error.&#xD;&#xA;&#xD;&#xA;Tinkering with I dont know if thats the issue in wasm file or genesis-state file, but all files are fresh.&#xD;&#xA;&#xD;&#xA;.toml file:&#xD;&#xA;&#xD;&#xA;        [settings]&#xD;&#xA;    bootnode = false&#xD;&#xA;    &#xD;&#xA;    [relaychain]&#xD;&#xA;    chain = &quot;polkadot&quot;&#xD;&#xA;    default_command = &quot;../bin/polkadot&quot;&#xD;&#xA;    chain_spec_path = &quot;../../polkadot/tmp01/rococo-local.json&quot;&#xD;&#xA;    bootnode = false&#xD;&#xA;    &#xD;&#xA;      [[relaychain.nodes]]&#xD;&#xA;      name = &quot;alice&quot;&#xD;&#xA;      validator = true&#xD;&#xA;    &#xD;&#xA;      [[relaychain.nodes]]&#xD;&#xA;      name = &quot;bob&quot;&#xD;&#xA;      validator = true&#xD;&#xA;    &#xD;&#xA;    [[parachains]]&#xD;&#xA;    id = 2000&#xD;&#xA;    addToGenesis = true&#xD;&#xA;    cumulus_based = true&#xD;&#xA;    chain_spec_path = &quot;tmp1/vane.json&quot;&#xD;&#xA;    bootnode = false&#xD;&#xA;    &#xD;&#xA;      [parachains.collator]&#xD;&#xA;      name = &quot;vane-collator1&quot;&#xD;&#xA;      command = &quot;./target/release/vane-node&quot;&#xD;&#xA;      genesis_wasm_path = &quot;tmp1/vane-wasm&quot;&#xD;&#xA;      genesis_state_path = &quot;tmp1/vane-state&quot;&#xD;&#xA;      &#xD;&#xA;Version: latest" ContentLicense="CC BY-SA 4.0" />
  <row Id="38124" PostHistoryTypeId="2" PostId="9609" RevisionGUID="f896b393-2ac1-488a-8dbd-9504bb5b2361" CreationDate="2023-08-14T19:57:17.867" UserId="351" Text="**3.1 Programme**&#xD;&#xA;&#xD;&#xA;Of type Vec&lt;Instruction&gt;, initialized to the value of the Original Programme.&#xD;&#xA;&#xD;&#xA;Expresses the currently executing programme of instructions for the XCVM. This gets potentially changed after either the final instruction is executed or an error occurs.&#xD;&#xA;&#xD;&#xA;**3.5 Appendix**&#xD;&#xA;&#xD;&#xA;Of type Vec&lt;Instruction&gt;, initialized to the empty list.&#xD;&#xA;&#xD;&#xA;Expresses any code which should run following the current programme. When a programme reaches the end successfully, or after an error where the Error Handler is empty, this register is cleared and its contents used to replace the Programme Register.&#xD;&#xA;&#xD;&#xA;*For example in a simulation of xcm instruction executions. Lets say there are 4 instructions, The programme register holds all 4 instructions and appendix only holds the executed instruction or?*" ContentLicense="CC BY-SA 4.0" />
  <row Id="38126" PostHistoryTypeId="1" PostId="9609" RevisionGUID="f896b393-2ac1-488a-8dbd-9504bb5b2361" CreationDate="2023-08-14T19:57:17.867" UserId="351" Text="The differences between Appendix register and programme register in XCVM registers" ContentLicense="CC BY-SA 4.0" />
  <row Id="38127" PostHistoryTypeId="3" PostId="9609" RevisionGUID="f896b393-2ac1-488a-8dbd-9504bb5b2361" CreationDate="2023-08-14T19:57:17.867" UserId="351" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38128" PostHistoryTypeId="2" PostId="9610" RevisionGUID="6b5fb5cb-304d-44e3-b725-23159a7d4850" CreationDate="2023-08-14T20:53:58.327" UserId="29" Text="The definitions you reference are pretty good.&#xD;&#xA;&#xD;&#xA;The Programme Register holds the currently executing programme of instructions for the XCVM.&#xD;&#xA;&#xD;&#xA;The Appendix Register holds the code you want to execute after the Programme Register has executed all the instructions in the Programme Register or after the error handler has completed.&#xD;&#xA;&#xD;&#xA;&gt; This gets potentially changed after either the final instruction is executed or an error occurs.&#xD;&#xA;&#xD;&#xA;This is because what is in the Appendix (or in the Error Handler), replaces what is in the Programme Register once the Programme Register executed all instructions or hits an error and there is an Error Handler.&#xD;&#xA;&#xD;&#xA;You can use the `SetAppendix(Xcm&lt;call&gt;)` instruction to set the Appendix Register.&#xD;&#xA;&#xD;&#xA;So in your example, if the Programme Register holds 4 instructions. Each instruction will be executed and when complete, if there is an instruction inside the Appendix Register, then that will be executed. Or if while executing one of the instructions in the Programme Register, if there is an error and there is an Error Handler, that will be executed. Then whatever instruction is in the Appendix will be executed.&#xD;&#xA;&#xD;&#xA;✌️" ContentLicense="CC BY-SA 4.0" />
  <row Id="38130" PostHistoryTypeId="2" PostId="9611" RevisionGUID="5ab25956-5496-461d-ba8b-edce7561223e" CreationDate="2023-08-14T21:20:11.123" UserId="29" Text="Fair point, where I can guide you to the Polkadot Wiki specifically the Staking section:&#xD;&#xA;- https://wiki.polkadot.network/docs/learn-staking&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/QqjTl.png)&#xD;&#xA;&#xD;&#xA;You will see it says 405.187 as of time of writing this.&#xD;&#xA;&#xD;&#xA;I'd much rather guide you to the onchain canonical source where the min active stake is stored (staking &gt; `minimumActiveStake`):&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/ovEie.png)&#xD;&#xA;&#xD;&#xA;You can also find this number in the Polkadot Staking Dashboard:&#xD;&#xA;- https://staking.polkadot.network/#/nominate&#xD;&#xA;&#xD;&#xA;Also, for some this number is bar to entry and the suggestion there is to use a nomination pool.&#xD;&#xA;&#xD;&#xA;Hope that helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="38132" PostHistoryTypeId="2" PostId="9612" RevisionGUID="1a5a835c-9f43-4bf0-80ba-e775bdd7f7b9" CreationDate="2023-08-15T02:55:40.333" UserId="309" Text="Once in a while, doing a rustup update will break the substrate node template, the challenge then becomes to identify the rustup release compatible with the latest node-template and downgrade.&#xD;&#xA;is this documented? or do we have to downgrade_rustup-test_compile_node_template-repeat every time?&#xD;&#xA;I am using the master branch of the substrate-node-template VS the latest rustup version, and I get the following error when doing a `cargo check`:&#xD;&#xA;&#xD;&#xA;     Compiling substrate-wasm-builder v5.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;    error: internal compiler error: no errors encountered even though `delay_span_bug` issued&#xD;&#xA;    &#xD;&#xA;    error: internal compiler error: unresolved inference variable in outlives: ?8t&#xD;&#xA;        --&gt; /home/kazu/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1603:2&#xD;&#xA;         |&#xD;&#xA;    1603 | /     fn validate(&#xD;&#xA;    1604 | |         &amp;self,&#xD;&#xA;    1605 | |         who: &amp;Self::AccountId,&#xD;&#xA;    1606 | |         call: &amp;Self::Call,&#xD;&#xA;    1607 | |         info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;    1608 | |         len: usize,&#xD;&#xA;    1609 | |     ) -&gt; TransactionValidity {&#xD;&#xA;         | |____________________________^&#xD;&#xA;         |&#xD;&#xA;&#xD;&#xA;This keeps happening even after downgrading and I don't know How far I have to downgrade to get it  to work again (I stayed a while without doing any `rustup update...` ). If you know the rigtht rustup version, of better: a definitive way to solve this problem, please help.&#xD;&#xA;cordially,&#xD;&#xA;Kazunobu.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38134" PostHistoryTypeId="1" PostId="9612" RevisionGUID="1a5a835c-9f43-4bf0-80ba-e775bdd7f7b9" CreationDate="2023-08-15T02:55:40.333" UserId="309" Text="Substrate node template build errors and rustup version" ContentLicense="CC BY-SA 4.0" />
  <row Id="38135" PostHistoryTypeId="3" PostId="9612" RevisionGUID="1a5a835c-9f43-4bf0-80ba-e775bdd7f7b9" CreationDate="2023-08-15T02:55:40.333" UserId="309" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38136" PostHistoryTypeId="5" PostId="9612" RevisionGUID="a6ba4965-42b0-4d10-8091-39ebbadc4b94" CreationDate="2023-08-15T03:16:39.203" UserId="309" Comment="added 174 characters in body" Text="Once in a while, doing a rustup update will break the substrate node template, the challenge then becomes to identify the rustup release compatible with the latest node-template and downgrade.&#xD;&#xA;is this documented? or do we have to downgrade_rustup-test_compile_node_template-repeat every time?&#xD;&#xA;I am using the master branch of the substrate-node-template VS the latest rustup version, and I get the following error when doing a `cargo check`:&#xD;&#xA;&#xD;&#xA;     Compiling substrate-wasm-builder v5.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;    error: internal compiler error: no errors encountered even though `delay_span_bug` issued&#xD;&#xA;    &#xD;&#xA;    error: internal compiler error: unresolved inference variable in outlives: ?8t&#xD;&#xA;        --&gt; /home/kazu/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1603:2&#xD;&#xA;         |&#xD;&#xA;    1603 | /     fn validate(&#xD;&#xA;    1604 | |         &amp;self,&#xD;&#xA;    1605 | |         who: &amp;Self::AccountId,&#xD;&#xA;    1606 | |         call: &amp;Self::Call,&#xD;&#xA;    1607 | |         info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;    1608 | |         len: usize,&#xD;&#xA;    1609 | |     ) -&gt; TransactionValidity {&#xD;&#xA;         | |____________________________^&#xD;&#xA;         |&#xD;&#xA;&#xD;&#xA;This keeps happening even after downgrading and I don't know How far I have to downgrade to get it  to work again (I stayed a while without doing any `rustup update...` ). If you know the rigtht rustup version, of better: a definitive way to solve this problem, please help.&#xD;&#xA;cordially,&#xD;&#xA;Kazunobu.&#xD;&#xA;&#xD;&#xA;**Edit 1:**&#xD;&#xA;I just wanted to mention that the error first popped-up on github during the PR check process, which lead to think that I had to update rustup: Huge mistake!!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="38137" PostHistoryTypeId="2" PostId="9613" RevisionGUID="d49be32c-a12f-4654-bf89-31a88f2e8386" CreationDate="2023-08-15T03:50:25.383" UserId="309" Text="This is what I did to solve the problem locally. It still however remains an issue on github PRs:&#xD;&#xA;1) completely remove rustup:&#xD;&#xA;&#xD;&#xA;`rustup self uninstall`&#xD;&#xA;&#xD;&#xA;`sudo apt update`&#xD;&#xA;&#xD;&#xA;2) re-install (but no `rustup update`!!):&#xD;&#xA;&#xD;&#xA;`curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`&#xD;&#xA;&#xD;&#xA;3) install rustup nightly:&#xD;&#xA;&#xD;&#xA;`rustup toolchain install nightly`&#xD;&#xA;&#xD;&#xA;`rustup run nightly rustc --version`&#xD;&#xA;&#xD;&#xA;`rustup default stable`&#xD;&#xA;&#xD;&#xA;4)Add wasm:&#xD;&#xA;&#xD;&#xA;`rustup target add wasm32-unknown-unknown --toolchain nightly`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And done!!&#xD;&#xA;At least I can keep working locally, even if my PR appears faulty on github..." ContentLicense="CC BY-SA 4.0" />
  <row Id="38139" PostHistoryTypeId="5" PostId="9612" RevisionGUID="db7c5d8c-ee91-4845-b8a5-e0ac3f2792dc" CreationDate="2023-08-15T04:34:32.487" UserId="309" Comment="added 3 characters in body" Text="Once in a while, doing a rustup update will break the substrate node template, the challenge then becomes to identify the rustup release compatible with the latest node-template and downgrade.&#xD;&#xA;is this documented? or do we have to downgrade_rustup-test_compile_node_template-repeat every time?&#xD;&#xA;I am using the master branch of the substrate-node-template VS the latest rustup version, and I get the following error when doing a `cargo check`:&#xD;&#xA;&#xD;&#xA;     Compiling substrate-wasm-builder v5.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;    error: internal compiler error: no errors encountered even though `delay_span_bug` issued&#xD;&#xA;    &#xD;&#xA;    error: internal compiler error: unresolved inference variable in outlives: ?8t&#xD;&#xA;        --&gt; /home/kazu/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1603:2&#xD;&#xA;         |&#xD;&#xA;    1603 | /     fn validate(&#xD;&#xA;    1604 | |         &amp;self,&#xD;&#xA;    1605 | |         who: &amp;Self::AccountId,&#xD;&#xA;    1606 | |         call: &amp;Self::Call,&#xD;&#xA;    1607 | |         info: &amp;DispatchInfoOf&lt;Self::Call&gt;,&#xD;&#xA;    1608 | |         len: usize,&#xD;&#xA;    1609 | |     ) -&gt; TransactionValidity {&#xD;&#xA;         | |____________________________^&#xD;&#xA;         |&#xD;&#xA;&#xD;&#xA;This keeps happening even after downgrading and I don't know How far I have to downgrade to get it  to work again (I stayed a while without doing any `rustup update...` ). If you know the rigtht rustup version, of better: a definitive way to solve this problem, please help.&#xD;&#xA;cordially,&#xD;&#xA;Kazunobu.&#xD;&#xA;&#xD;&#xA;**Edit 1:**&#xD;&#xA;I just wanted to mention that the error first popped-up on github during the PR check process, which lead me to think that I had to update rustup: Huge mistake!!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="38140" PostHistoryTypeId="2" PostId="9614" RevisionGUID="6e494c51-3c58-4c7c-a60e-495f371ddb16" CreationDate="2023-08-15T04:48:35.693" UserId="3846" Text="OK, it seems the minimum staking amount has been increased and thanks to [this][1] answer now I know what was the reason.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/9611/3846" ContentLicense="CC BY-SA 4.0" />
  <row Id="38142" PostHistoryTypeId="2" PostId="9615" RevisionGUID="21ff586d-72ef-4299-a523-6761b18a11da" CreationDate="2023-08-15T07:51:31.470" UserId="351" Text="Although I can read the code and try to bring the pieces together but If I can find the documentation or specification implementation doc on XCM channels, &#xD;&#xA;&#xD;&#xA;how they are implemented, how it ensures the message passed is actually delivered, understanding the message queue and how are the messages included in parachain PVFs." ContentLicense="CC BY-SA 4.0" />
  <row Id="38144" PostHistoryTypeId="1" PostId="9615" RevisionGUID="21ff586d-72ef-4299-a523-6761b18a11da" CreationDate="2023-08-15T07:51:31.470" UserId="351" Text="Where can I find documentation on XCM channels ( HRMP, VMPs). How they actually work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38145" PostHistoryTypeId="3" PostId="9615" RevisionGUID="21ff586d-72ef-4299-a523-6761b18a11da" CreationDate="2023-08-15T07:51:31.470" UserId="351" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38146" PostHistoryTypeId="2" PostId="9616" RevisionGUID="4cc16aa8-1a51-4162-a47a-b67de0a2d7d5" CreationDate="2023-08-15T08:16:47.017" UserId="4550" Text="It may be helpful for you. &#xD;&#xA;https://docs.astar.network/docs/learn/xcm/integration/hrmp/&#xD;&#xA;https://wiki.polkadot.network/docs/build-hrmp-channels&#xD;&#xA;&#xD;&#xA;or tru to check Polkadot Forum for such a discussion." ContentLicense="CC BY-SA 4.0" />
  <row Id="38148" PostHistoryTypeId="2" PostId="9617" RevisionGUID="b9fbd384-457e-4cba-a7d7-91380148a469" CreationDate="2023-08-15T08:29:02.330" UserId="3319" Text="There are two ways to do this, the first one is by having a Runtime api that automtically do all the deserailisation for you than match the call like this, for example if i want to check whether an extrinsic is of a specific type i would have something like this: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	fn verify_extrinsic(extrinsic: &lt;Block as BlockT&gt;::Extrinsic)-&gt; bool&#xD;&#xA;		{&#xD;&#xA;				if let Call::MyPallet(pallet_my_pallet::Call::&lt;Runtime&gt;::test_call{param1:_,param2:_}) = &amp;extrinsic.function&#xD;&#xA;				{&#xD;&#xA;                    // or do some other stuff&#xD;&#xA;					false&#xD;&#xA;				}else&#xD;&#xA;				{&#xD;&#xA;					true&#xD;&#xA;				}&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;now we update your code:&#xD;&#xA;```&#xD;&#xA; let uxt: Block::Extrinsic = tx.data().clone();&#xD;&#xA;let result = client.runtime_api().verify_extrinsic(&amp;best_block_id, uxt.clone())&#xD;&#xA;// do something with the result&#xD;&#xA; &#xD;&#xA;```&#xD;&#xA;the other way is to do manual scale decoding of the extrinsic which i think is a hustle.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38150" PostHistoryTypeId="2" PostId="9618" RevisionGUID="75df7da5-a558-4c94-a3fa-1f55258f1542" CreationDate="2023-08-15T08:30:56.843" UserId="4535" Text="first I installed the substrate node from this command ```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git``` from [paritytech GitHub][1]&#xD;&#xA;&#xD;&#xA;I got too many errors while installing and errors were related to ```use std::sync:OnceLock``` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then installed the substrate node from [ink docs][1] &#xD;&#xA;```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked```.&#xD;&#xA;&#xD;&#xA;I got warnings while installing ```warning: Could not find `Cargo.lock` for `/Users/xyz/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/cargo-installMIxejX/release/build/contracts-node-runtime-cad7bb71042b6508/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.```&#xD;&#xA;&#xD;&#xA;```warning: Could not find `Cargo.lock` for `/Users/xyz/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/cargo-installMIxejX/release/build/contracts-node-runtime-cad7bb71042b6508/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.```&#xD;&#xA;&#xD;&#xA;```warning: Could not find `Cargo.lock` for `/Users/xyz/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/cargo-installMIxejX/release/build/contracts-node-runtime-cad7bb71042b6508/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.```&#xD;&#xA;&#xD;&#xA;```    Finished release [optimized] target(s) in 6m 16s&#xD;&#xA;   Replacing /Users/samyakt/.cargo/bin/substrate-contracts-node&#xD;&#xA;    Replaced package `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` with `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` (executable `substrate-contracts-node`)```&#xD;&#xA;&#xD;&#xA;then I ran ```substrate-contracts-node``` on my terminal, getting ```Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))```&#xD;&#xA;&#xD;&#xA;INFO main sc_cli::runner: Substrate Contracts Node    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ✌️  version 0.23.0-87a3d76c880    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2021-2023    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Chain specification: Development    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:   Node name: extra-small-art-3879    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Database: ParityDb at /var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/substrate1tebHT/chains/dev/paritydb/full    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ⛓  Native runtime: substrate-contracts-node-100 (substrate-contracts-node-1.tx1.au1)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-08-15 13:49:37.610  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/getting-started/setup#2-build-it-yourself" ContentLicense="CC BY-SA 4.0" />
  <row Id="38152" PostHistoryTypeId="1" PostId="9618" RevisionGUID="75df7da5-a558-4c94-a3fa-1f55258f1542" CreationDate="2023-08-15T08:30:56.843" UserId="4535" Text="Getting error for running the substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="38153" PostHistoryTypeId="3" PostId="9618" RevisionGUID="75df7da5-a558-4c94-a3fa-1f55258f1542" CreationDate="2023-08-15T08:30:56.843" UserId="4535" Text="|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38154" PostHistoryTypeId="5" PostId="9618" RevisionGUID="883c94f0-0395-47cd-b86b-b9b2e0c61adc" CreationDate="2023-08-15T08:32:18.087" UserId="4535" Comment="deleted 836 characters in body" Text="first I installed the substrate node from this command ```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git``` from [paritytech GitHub][1]&#xD;&#xA;&#xD;&#xA;I got too many errors while installing and errors were related to ```use std::sync:OnceLock``` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then installed the substrate node from [ink docs][1] &#xD;&#xA;```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked```.&#xD;&#xA;&#xD;&#xA;I got warnings while installing ```warning: Could not find `Cargo.lock` for `/Users/xyz/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/cargo-installMIxejX/release/build/contracts-node-runtime-cad7bb71042b6508/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```    Finished release [optimized] target(s) in 6m 16s&#xD;&#xA;   Replacing /Users/samyakt/.cargo/bin/substrate-contracts-node&#xD;&#xA;    Replaced package `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` with `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` (executable `substrate-contracts-node`)```&#xD;&#xA;&#xD;&#xA;then I ran ```substrate-contracts-node``` on my terminal, getting ```Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))```&#xD;&#xA;&#xD;&#xA;INFO main sc_cli::runner: Substrate Contracts Node    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ✌️  version 0.23.0-87a3d76c880    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2021-2023    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Chain specification: Development    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:   Node name: extra-small-art-3879    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Database: ParityDb at /var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/substrate1tebHT/chains/dev/paritydb/full    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ⛓  Native runtime: substrate-contracts-node-100 (substrate-contracts-node-1.tx1.au1)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-08-15 13:49:37.610  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/getting-started/setup#2-build-it-yourself" ContentLicense="CC BY-SA 4.0" />
  <row Id="38155" PostHistoryTypeId="5" PostId="9618" RevisionGUID="4d9a108e-dabb-4bd9-abe3-19f2e1dbf6d4" CreationDate="2023-08-15T08:33:57.557" UserId="4535" Comment="deleted 2 characters in body" Text="first I installed the substrate node from this command ```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git``` from [paritytech GitHub][1]&#xD;&#xA;&#xD;&#xA;I got too many errors while installing and errors were related to ```use std::sync:OnceLock``` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then installed the substrate node from [ink docs][1] &#xD;&#xA;```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked```.&#xD;&#xA;&#xD;&#xA;I got warnings while installing ```warning: Could not find `Cargo.lock` for `/Users/xyz/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/cargo-installMIxejX/release/build/contracts-node-runtime-cad7bb71042b6508/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```    Finished release [optimized] target(s) in 6m 16s&#xD;&#xA;   Replacing /Users/samyakt/.cargo/bin/substrate-contracts-node&#xD;&#xA;    Replaced package `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` with `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` (executable `substrate-contracts-node`) &#xD;&#xA;&#xD;&#xA;then I ran ```substrate-contracts-node``` on my terminal, getting ```Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))```&#xD;&#xA;&#xD;&#xA;INFO main sc_cli::runner: Substrate Contracts Node    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ✌️  version 0.23.0-87a3d76c880    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2021-2023    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Chain specification: Development    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:   Node name: extra-small-art-3879    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Database: ParityDb at /var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/substrate1tebHT/chains/dev/paritydb/full    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ⛓  Native runtime: substrate-contracts-node-100 (substrate-contracts-node-1.tx1.au1)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-08-15 13:49:37.610  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/getting-started/setup#2-build-it-yourself" ContentLicense="CC BY-SA 4.0" />
  <row Id="38156" PostHistoryTypeId="5" PostId="9618" RevisionGUID="6f289e8a-3168-4764-ae42-b4384688dd03" CreationDate="2023-08-15T08:35:20.443" UserId="4535" Comment="added 131 characters in body" Text="first I installed the substrate node from this command ```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git``` from [paritytech GitHub][1]&#xD;&#xA;&#xD;&#xA;I got too many errors while installing and errors were related to ```use std::sync:OnceLock``` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then installed the substrate node from [ink docs][2] &#xD;&#xA;```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked```.&#xD;&#xA;&#xD;&#xA;I got warnings while installing ```warning: Could not find `Cargo.lock` for `/Users/xyz/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/cargo-installMIxejX/release/build/contracts-node-runtime-cad7bb71042b6508/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```    Finished release [optimized] target(s) in 6m 16s&#xD;&#xA;   Replacing /Users/samyakt/.cargo/bin/substrate-contracts-node&#xD;&#xA;    Replaced package `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` with `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` (executable `substrate-contracts-node`) &#xD;&#xA;&#xD;&#xA;then I ran ```substrate-contracts-node``` on my terminal, getting ```Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))```&#xD;&#xA;&#xD;&#xA;INFO main sc_cli::runner: Substrate Contracts Node    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ✌️  version 0.23.0-87a3d76c880    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2021-2023    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Chain specification: Development    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:   Node name: extra-small-art-3879    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Database: ParityDb at /var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/substrate1tebHT/chains/dev/paritydb/full    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ⛓  Native runtime: substrate-contracts-node-100 (substrate-contracts-node-1.tx1.au1)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-08-15 13:49:37.610  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node/blob/72e68577688cd1764da6730521c6f06f7e530a5e/README.md?plain=1#L54&#xD;&#xA;  [2]: https://use.ink/getting-started/setup#2-build-it-yourself" ContentLicense="CC BY-SA 4.0" />
  <row Id="38157" PostHistoryTypeId="2" PostId="9619" RevisionGUID="99630ca4-9b3b-4dfb-814e-3a390be2c4d7" CreationDate="2023-08-15T08:39:11.647" UserId="4551" Text="error[E0583]: file not found for module sys&#xD;&#xA;&#xD;&#xA;cargo 1.73.0-nightly (7e9de3f4e 2023-08-13)&#xD;&#xA;rustc 1.73.0-nightly (180dffb 2023-08-14)&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/gnjpx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38159" PostHistoryTypeId="1" PostId="9619" RevisionGUID="99630ca4-9b3b-4dfb-814e-3a390be2c4d7" CreationDate="2023-08-15T08:39:11.647" UserId="4551" Text="error[E0583]: file not found for module sys" ContentLicense="CC BY-SA 4.0" />
  <row Id="38160" PostHistoryTypeId="3" PostId="9619" RevisionGUID="99630ca4-9b3b-4dfb-814e-3a390be2c4d7" CreationDate="2023-08-15T08:39:11.647" UserId="4551" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38161" PostHistoryTypeId="5" PostId="9618" RevisionGUID="b1814dfa-90af-4b79-b913-7cefc572e8a1" CreationDate="2023-08-15T08:47:28.940" UserId="4535" Comment="added 9 characters in body" Text="first I installed the substrate contract node from this command ```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git``` from [paritytech GitHub][1]&#xD;&#xA;&#xD;&#xA;I got too many errors while installing and errors were related to ```use std::sync:OnceLock``` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then installed the substrate node from [ink docs][2] &#xD;&#xA;```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked```.&#xD;&#xA;&#xD;&#xA;I got warnings while installing ```warning: Could not find `Cargo.lock` for `/Users/xyz/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/cargo-installMIxejX/release/build/contracts-node-runtime-cad7bb71042b6508/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```    Finished release [optimized] target(s) in 6m 16s&#xD;&#xA;   Replacing /Users/samyakt/.cargo/bin/substrate-contracts-node&#xD;&#xA;    Replaced package `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` with `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` (executable `substrate-contracts-node`) &#xD;&#xA;&#xD;&#xA;then I ran ```substrate-contracts-node``` on my terminal, getting ```Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))```&#xD;&#xA;&#xD;&#xA;INFO main sc_cli::runner: Substrate Contracts Node    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ✌️  version 0.23.0-87a3d76c880    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2021-2023    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Chain specification: Development    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:   Node name: extra-small-art-3879    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Database: ParityDb at /var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/substrate1tebHT/chains/dev/paritydb/full    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ⛓  Native runtime: substrate-contracts-node-100 (substrate-contracts-node-1.tx1.au1)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-08-15 13:49:37.610  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node/blob/72e68577688cd1764da6730521c6f06f7e530a5e/README.md?plain=1#L54&#xD;&#xA;  [2]: https://use.ink/getting-started/setup#2-build-it-yourself" ContentLicense="CC BY-SA 4.0" />
  <row Id="38162" PostHistoryTypeId="5" PostId="9618" RevisionGUID="46865660-fa01-4b4f-ae85-08ab6cc30099" CreationDate="2023-08-15T08:48:26.253" UserId="4535" Comment="added 9 characters in body" Text="first I installed the substrate contract node from this command ```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git``` from [paritytech GitHub][1]&#xD;&#xA;&#xD;&#xA;I got too many errors while installing and errors were related to ```use std::sync:OnceLock``` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then installed the substrate contract node from [ink docs][2] &#xD;&#xA;```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked```.&#xD;&#xA;&#xD;&#xA;I got warnings while installing ```warning: Could not find `Cargo.lock` for `/Users/xyz/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/cargo-installMIxejX/release/build/contracts-node-runtime-cad7bb71042b6508/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```    Finished release [optimized] target(s) in 6m 16s&#xD;&#xA;   Replacing /Users/samyakt/.cargo/bin/substrate-contracts-node&#xD;&#xA;    Replaced package `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` with `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` (executable `substrate-contracts-node`) &#xD;&#xA;&#xD;&#xA;then I ran ```substrate-contracts-node``` on my terminal, getting ```Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))```&#xD;&#xA;&#xD;&#xA;INFO main sc_cli::runner: Substrate Contracts Node    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ✌️  version 0.23.0-87a3d76c880    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2021-2023    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Chain specification: Development    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:   Node name: extra-small-art-3879    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Database: ParityDb at /var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/substrate1tebHT/chains/dev/paritydb/full    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ⛓  Native runtime: substrate-contracts-node-100 (substrate-contracts-node-1.tx1.au1)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-08-15 13:49:37.610  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node/blob/72e68577688cd1764da6730521c6f06f7e530a5e/README.md?plain=1#L54&#xD;&#xA;  [2]: https://use.ink/getting-started/setup#2-build-it-yourself" ContentLicense="CC BY-SA 4.0" />
  <row Id="38163" PostHistoryTypeId="5" PostId="9618" RevisionGUID="f5aca5c9-5373-42a6-a863-52a05ee6a6ac" CreationDate="2023-08-15T08:48:55.853" UserId="4535" Comment="deleted 4 characters in body" Text="first I installed the substrate contract node from this command ```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git``` from [paritytech GitHub][1]&#xD;&#xA;&#xD;&#xA;I got too many errors while installing and errors were related to ```use std::sync:OnceLock``` &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;then installed the substrate contract node from [ink docs][2] &#xD;&#xA;```cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked```.&#xD;&#xA;&#xD;&#xA;I got warnings while installing ```warning: Could not find `Cargo.lock` for `/Users/xyz/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/cargo-installMIxejX/release/build/contracts-node-runtime-cad7bb71042b6508/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```    Finished release [optimized] target(s) in 6m 16s&#xD;&#xA;   Replacing /Users/xyz/.cargo/bin/substrate-contracts-node&#xD;&#xA;    Replaced package `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` with `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` (executable `substrate-contracts-node`) &#xD;&#xA;&#xD;&#xA;then I ran ```substrate-contracts-node``` on my terminal, getting ```Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))```&#xD;&#xA;&#xD;&#xA;INFO main sc_cli::runner: Substrate Contracts Node    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ✌️  version 0.23.0-87a3d76c880    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2021-2023    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Chain specification: Development    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:   Node name: extra-small-art-3879    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner:  Database: ParityDb at /var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/substrate1tebHT/chains/dev/paritydb/full    &#xD;&#xA;2023-08-15 13:49:37.552  INFO main sc_cli::runner: ⛓  Native runtime: substrate-contracts-node-100 (substrate-contracts-node-1.tx1.au1)    &#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)))&#xD;&#xA;2023-08-15 13:49:37.610  WARN main wasm-runtime: Cannot create a runtime error=Other(&quot;cannot deserialize module: UnknownOpcode(192)&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node/blob/72e68577688cd1764da6730521c6f06f7e530a5e/README.md?plain=1#L54&#xD;&#xA;  [2]: https://use.ink/getting-started/setup#2-build-it-yourself" ContentLicense="CC BY-SA 4.0" />
  <row Id="38164" PostHistoryTypeId="2" PostId="9620" RevisionGUID="6b531cb3-6212-4da8-9818-208e1297d4fb" CreationDate="2023-08-15T09:19:46.327" UserId="3721" Text="Regarding `cannot deserialize module: UnknownOpcode(192)`. This kind of error is related to the toolchain usually, check https://substrate.stackexchange.com/questions/7992/substrate-node-template-does-not-start-after-cloning-and-renaming-the-template-u." ContentLicense="CC BY-SA 4.0" />
  <row Id="38166" PostHistoryTypeId="2" PostId="9621" RevisionGUID="8d5a686f-d02c-461e-bcf5-f33b24a7f4e2" CreationDate="2023-08-15T09:31:47.373" UserId="3265" Text="I was developing things yesterday and during that development I had briefly a file named &quot;asset_extension.rs&quot;, that I renamed later. I finished that development, tests passed and everyone was happy. This involved chain extensions, to quite some ink! interaction.&#xD;&#xA;&#xD;&#xA;Today whenever I do `cargo contract` related stuff i receive&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; --- stderr&#xD;&#xA;  cxxbridge: Failed to read file `src/assets_extension`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`cargo contract new whatever &amp;&amp; cd whatever &amp;&amp; cargo test` yields this. Lastly i removed `cargo-contract` to install it again and now I can't even install it with the same error.&#xD;&#xA;&#xD;&#xA;Tried cargo clean / update / remove all the things, nothing helped :-(" ContentLicense="CC BY-SA 4.0" />
  <row Id="38168" PostHistoryTypeId="1" PostId="9621" RevisionGUID="8d5a686f-d02c-461e-bcf5-f33b24a7f4e2" CreationDate="2023-08-15T09:31:47.373" UserId="3265" Text="cxxbridge error on cargo contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="38169" PostHistoryTypeId="3" PostId="9621" RevisionGUID="8d5a686f-d02c-461e-bcf5-f33b24a7f4e2" CreationDate="2023-08-15T09:31:47.373" UserId="3265" Text="|ink|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38170" PostHistoryTypeId="5" PostId="9620" RevisionGUID="0c7155df-55ba-45e1-b6c9-aab8b1230c32" CreationDate="2023-08-15T09:34:09.443" UserId="3721" Comment="added 862 characters in body" Text="Regarding `cannot deserialize module: UnknownOpcode(192)`. This kind of error is related to the toolchain usually, check https://substrate.stackexchange.com/questions/7992/substrate-node-template-does-not-start-after-cloning-and-renaming-the-template-u.&#xD;&#xA;&#xD;&#xA;Regarding `errors were related to use std::sync:OnceLock`. In case it's something like that.&#xD;&#xA;&#xD;&#xA;```console&#xD;&#xA;error[E0658]: use of unstable library feature 'once_cell'&#xD;&#xA;   --&gt; /home/user/.cargo/git/checkouts/substrate/client/executor/wasmtime/src/util.rs:147:6&#xD;&#xA;    |&#xD;&#xA;147 |     use std::sync::OnceLock;&#xD;&#xA;    |         ^^^^^^^^^^^^^^^^^^^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;That means it wants you to build it with unstable features support which are enabled for nightly toolchain releases. Make sure you went through `https://docs.substrate.io/install/` to setup the right Rust toolchain. You may also to force cargo to use a nightly toolchain passing `+nightly` to cargo like that.&#xD;&#xA;&#xD;&#xA;```console&#xD;&#xA;cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;More about unstable features: https://doc.rust-lang.org/cargo/reference/unstable.html." ContentLicense="CC BY-SA 4.0" />
  <row Id="38171" PostHistoryTypeId="2" PostId="9622" RevisionGUID="a024c7d0-0d06-4761-a8f6-e06033cc2f30" CreationDate="2023-08-15T09:44:56.910" UserId="3265" Text="`grep -rnw . -e &quot;assets_extension&quot;` in .cargo and raw deleting everything that occured solved this.                              &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38173" PostHistoryTypeId="2" PostId="9623" RevisionGUID="c383c68b-6692-4ce2-873c-05f566a74b1d" CreationDate="2023-08-15T10:02:21.413" UserId="351" Text="I found this official documentation and a good material.&#xD;&#xA;https://paritytech.github.io/xcm-docs/" ContentLicense="CC BY-SA 4.0" />
  <row Id="38177" PostHistoryTypeId="2" PostId="9625" RevisionGUID="4fffcf5f-b18e-47cb-9b79-04f0ff7dedec" CreationDate="2023-08-15T12:25:19.237" UserId="309" Text="after adding the kiltprotocol/sdk-js to my front-end, I get the following two errors when importing the kilt module.&#xD;&#xA;&#xD;&#xA;**Error 1:**&#xD;&#xA;&#xD;&#xA;    Type 'Codec | Codec[]' is not assignable to type 'InjectedAccountWithMeta[]'.&#xD;&#xA;              Type 'Codec' is missing the following properties from type 'InjectedAccountWithMeta[]': length, pop, push, concat, and 29 more.&#xD;&#xA;        42 |     });&#xD;&#xA;        43 |&#xD;&#xA;      &gt; 44 |     api.query.council.members((who: InjectedAccountWithMeta[]) =&gt; {&#xD;&#xA;           |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;        45 |       dispatch1({ type: 'SET_COUNCIL_MEMBERS', payload: who });&#xD;&#xA;        46 |     });&#xD;&#xA;        47 |     api.query.backgroundCouncil.proposals((hash: string[]) =&gt; {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Error2:**&#xD;&#xA;&#xD;&#xA;    Type 'Codec | Codec[]' is not assignable to type 'number'.&#xD;&#xA;              Type 'Codec' is not assignable to type 'number'.&#xD;&#xA;        52 |     if (!api || !selectedAccount) return;&#xD;&#xA;        53 |&#xD;&#xA;      &gt; 54 |     api.query.system.number((block: number) =&gt; {&#xD;&#xA;           |                             ^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;        55 |       dispatch({ type: 'SET_BLOCKS', payload: block.toString() });&#xD;&#xA;        56 |     });&#xD;&#xA;        57 |   }, [api, selectedAccount, dispatch]);&#xD;&#xA;&#xD;&#xA;Without the import of this module, everything works fine. any idea why the types stop being valid, and how to fix it?&#xD;&#xA;&#xD;&#xA;Kazunobu" ContentLicense="CC BY-SA 4.0" />
  <row Id="38179" PostHistoryTypeId="1" PostId="9625" RevisionGUID="4fffcf5f-b18e-47cb-9b79-04f0ff7dedec" CreationDate="2023-08-15T12:25:19.237" UserId="309" Text="Kilt SDK import breaks types" ContentLicense="CC BY-SA 4.0" />
  <row Id="38180" PostHistoryTypeId="3" PostId="9625" RevisionGUID="4fffcf5f-b18e-47cb-9b79-04f0ff7dedec" CreationDate="2023-08-15T12:25:19.237" UserId="309" Text="|polkadot-js|substrate-node|kilt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38181" PostHistoryTypeId="5" PostId="5494" RevisionGUID="c8fbed06-e516-4528-83c7-9bbbd02d4a49" CreationDate="2023-08-15T14:50:50.003" UserId="165" Comment="added 3 characters in body" Text="[minimum nominator bond](https://github.com/paritytech/substrate/blob/1802a115e8480fd7a4654d45c85b58c2189c508a/frame/staking/src/pallet/mod.rs#L288-L290) is the balance needs at least to be able to start nominating. This one being configured at runtime level.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Whereas minimum active bond refers to, based on the actual state of the whole nominations, how much stake you will need to nominate to start seeing rewards.&#xD;&#xA;As per that page description:&#xD;&#xA;&#xD;&#xA;&gt; The minimum active bond statistic is the minimum DOT being bonded by a nominator for the current era.&#xD;&#xA;&#xD;&#xA;Nomination pools address this to offer an &quot;easier&quot; experience.&#xD;&#xA;&#xD;&#xA;Some more concrete details from [proposal#1224](https://polkadot.polkassembly.io/post/1224)&#xD;&#xA;&#xD;&#xA;&gt; First, let’s recap on the current status quo: Currently, nominators&#xD;&#xA;&gt; can freely set their intention to nominate in Polkadot, as long as&#xD;&#xA;&gt; they meet two limits: a minimum of 10 DOTs is staked, and a maximum of&#xD;&#xA;&gt; 50_000 nominators is not filled. This creates a nomination market,&#xD;&#xA;&gt; where in every era, the top 22_500 nominators from this open market&#xD;&#xA;&gt; are chosen to participate in the election process, and possibly&#xD;&#xA;&gt; receive staking rewards (if other conditions like over-subscription&#xD;&#xA;&gt; are not met).&#xD;&#xA;&gt; &#xD;&#xA;&gt;     This is a complicated and involved process. Nomination pools are exactly here to combat this and provide a simpler experience for&#xD;&#xA;&gt; DOT-holders to participate in staking.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Based on this, let’s cluster Polkadot nominators into two groups:&#xD;&#xA;&gt; active (in the top 22500), and waiting. The main concern at this point&#xD;&#xA;&gt; is to&#xD;&#xA;&gt; &#xD;&#xA;&gt; 1. Encourage all existing waiting nominators to join pools. This is mainly a task for the Wallet/UI development ecosystem, and is beyond&#xD;&#xA;&gt; the scope of this discussion.&#xD;&#xA;&gt; 2. Prevent too many waiting nominators to be created. The reason being that I speculate that most of these nominators have erroneously&#xD;&#xA;&gt; in the waiting queue, and prefer joining pools instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="38182" PostHistoryTypeId="52" PostId="9615" RevisionGUID="ce8d96c3-d620-40d3-8e2a-1b60099c860e" CreationDate="2023-08-15T15:54:36.380" />
  <row Id="38183" PostHistoryTypeId="2" PostId="9626" RevisionGUID="adc589ca-65b2-42ed-ad7c-87ef9b412495" CreationDate="2023-08-15T16:11:31.190" UserId="4081" Text="I need to execute some list of signed extrinsics in order, but because of the randomness that can exist in the transaction pool I have no way to actually ensure that they will execute in the proper order, another option would be to wait until one is included in a block and then send the next one, but this takes way to much time.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Is there a way to create a pallet extrinsic that has a batch of already signed extrinsics for a different pallet. And then have this batched extrinsic dispatch the list of signed extrinsics to the proper pallet all inside the execution of the batched extrinsic?&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;This would ensure the order of execution of this signed transactions. What would be the best approach for this??&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fY55w.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/09YiR.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/q6aKd.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38185" PostHistoryTypeId="1" PostId="9626" RevisionGUID="adc589ca-65b2-42ed-ad7c-87ef9b412495" CreationDate="2023-08-15T16:11:31.190" UserId="4081" Text="Batch signed transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="38186" PostHistoryTypeId="3" PostId="9626" RevisionGUID="adc589ca-65b2-42ed-ad7c-87ef9b412495" CreationDate="2023-08-15T16:11:31.190" UserId="4081" Text="|extrinsic|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38187" PostHistoryTypeId="5" PostId="9486" RevisionGUID="615c49ef-c665-4529-a915-b18a4c8b7c69" CreationDate="2023-08-15T17:05:22.230" UserId="29" Comment="added 110 characters in body" Text="While the PolkadotJs issue is being resolved (see comments), you can use cargo contract cli to build, upload, instantiate, and call:&#xD;&#xA;- https://use.ink/cargo-contract-cli&#xD;&#xA;&#xD;&#xA;Another option that I see is to directly use the Runtime Call:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/btvp3.png)" ContentLicense="CC BY-SA 4.0" />
  <row Id="38188" PostHistoryTypeId="2" PostId="9627" RevisionGUID="00775c7c-7ad2-4e34-b664-102a81516333" CreationDate="2023-08-16T02:17:01.503" UserId="2844" Text="When user stake his NFT, then he earns certain amount of `$EGGS` token which is in-game currency. He can to sell those token to third party tools. How to implement selling token to any third party tools using ink! smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38190" PostHistoryTypeId="1" PostId="9627" RevisionGUID="00775c7c-7ad2-4e34-b664-102a81516333" CreationDate="2023-08-16T02:17:01.503" UserId="2844" Text="Selling token to any third party tools" ContentLicense="CC BY-SA 4.0" />
  <row Id="38191" PostHistoryTypeId="3" PostId="9627" RevisionGUID="00775c7c-7ad2-4e34-b664-102a81516333" CreationDate="2023-08-16T02:17:01.503" UserId="2844" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38192" PostHistoryTypeId="6" PostId="9608" RevisionGUID="366e7e32-6ddd-4ce2-a323-0d448e738adb" CreationDate="2023-08-16T07:03:04.443" UserId="3846" Comment="edited tags" Text="|polkadot|staking|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38193" PostHistoryTypeId="2" PostId="9628" RevisionGUID="5acee61f-4fba-4b68-8a13-021a9a31d5a2" CreationDate="2023-08-16T09:30:07.213" UserId="4546" Text="I found the solution to the problem. In my case, I needed to make changes to Cargo.toml.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;subxt-signer = { version = &quot;0.31.0&quot;, features = [&quot;subxt&quot;]}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I had to add **features = [&quot;subxt&quot;]** to make it work." ContentLicense="CC BY-SA 4.0" />
  <row Id="38195" PostHistoryTypeId="50" PostId="7708" RevisionGUID="f3f37edd-5655-4250-92af-b765892416a7" CreationDate="2023-08-16T10:00:45.103" UserId="-1" />
  <row Id="38196" PostHistoryTypeId="2" PostId="9629" RevisionGUID="ad9281ba-ea7d-4478-9b18-f769d4e9eeae" CreationDate="2023-08-16T11:05:40.053" UserId="279" Text="quick workaround for this issue (as described here https://github.com/paritytech/zombienet/issues/1237#issuecomment-1675507189), is to run zombienet with concurrency set to 1.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;zombienet-macos -p native -c 1-d zn-db spawn ./zombienet-config.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This should work as expected, until we review the locking issue.&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="38198" PostHistoryTypeId="5" PostId="9440" RevisionGUID="58e77e9b-9eb2-43b0-aa08-fb7e86bcc74c" CreationDate="2023-08-16T11:53:14.927" UserId="2844" Comment="added 158 characters in body" Text="I have added `pallet-contract` in [our chain](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate). Build contract works fine and run chain in dev mode also works fine. But when I try to deploy contract it doesn't work and doesn't throw any error. Can someone please help me.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This issue on inspect&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I try to directly use the Runtime Call and still it doesn't work?&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is [github repo](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Qzvib.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/BMX1w.jpg&#xD;&#xA;  [3]: https://i.stack.imgur.com/UEKdz.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38199" PostHistoryTypeId="50" PostId="9289" RevisionGUID="d8e5e255-766d-437b-af0a-64749530b459" CreationDate="2023-08-16T13:05:51.200" UserId="-1" />
  <row Id="38200" PostHistoryTypeId="50" PostId="9274" RevisionGUID="c4b180bd-d160-46c6-8b5c-3f5462bbe1d8" CreationDate="2023-08-16T21:05:40.697" UserId="-1" />
  <row Id="38201" PostHistoryTypeId="50" PostId="9219" RevisionGUID="d71d947d-7d65-461e-8258-9a15f2222361" CreationDate="2023-08-16T22:01:35.190" UserId="-1" />
  <row Id="38202" PostHistoryTypeId="50" PostId="7074" RevisionGUID="226a60f5-f1c2-4d73-9b7e-d0e37229cbc0" CreationDate="2023-08-16T23:02:40.373" UserId="-1" />
  <row Id="38203" PostHistoryTypeId="50" PostId="5410" RevisionGUID="f13fae81-0b0d-475a-a4b0-334a542b26d7" CreationDate="2023-08-17T00:04:15.503" UserId="-1" />
  <row Id="38204" PostHistoryTypeId="2" PostId="9630" RevisionGUID="13b3378a-3a16-4afe-9723-e3016fb2c293" CreationDate="2023-08-17T06:00:32.450" UserId="2844" Text="I found the exact same issue [here](https://substrate.stackexchange.com/questions/9107/error-c-as-triecacheproviderhcache-does-not-live-long-enough) and I checked I don't have any duplicate dependencies. I also try `cargo clean &amp; cargo update` command, nothing changes.&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate % cargo build --release    &#xD;&#xA;       Compiling sp-state-machine v0.28.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;       Compiling wasm-opt-cxx-sys v0.112.0&#xD;&#xA;       Compiling kvdb-rocksdb v0.19.0&#xD;&#xA;       Compiling node-template v4.0.0-dev (/Users/ganesholi/xcav/MarketplaceMVP_Substrate/node)&#xD;&#xA;       Compiling wasm-opt v0.112.0&#xD;&#xA;       Compiling substrate-wasm-builder v5.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;       Compiling node-template-runtime v4.0.0-dev (/Users/ganesholi/xcav/MarketplaceMVP_Substrate/runtime)&#xD;&#xA;    error: `&lt;C as TrieCacheProvider&lt;H&gt;&gt;::Cache&lt;'_&gt;` does not live long enough&#xD;&#xA;       --&gt; /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/state-machine/src/trie_backend_essence.rs:305:38&#xD;&#xA;        |&#xD;&#xA;    305 |         let cache = cache.as_mut().map(|c| c as _);&#xD;&#xA;        |                                            ^&#xD;&#xA;    &#xD;&#xA;    error: could not compile `sp-state-machine` due to previous error&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate % &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is my [github](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/my-lending-branch)&#xD;&#xA;Someone please suggest me why I am getting this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38206" PostHistoryTypeId="1" PostId="9630" RevisionGUID="13b3378a-3a16-4afe-9723-e3016fb2c293" CreationDate="2023-08-17T06:00:32.450" UserId="2844" Text="&lt;C as TrieCacheProvider&lt;H&gt;&gt;::Cache&lt;'_&gt;` does not live long enough" ContentLicense="CC BY-SA 4.0" />
  <row Id="38207" PostHistoryTypeId="3" PostId="9630" RevisionGUID="13b3378a-3a16-4afe-9723-e3016fb2c293" CreationDate="2023-08-17T06:00:32.450" UserId="2844" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38208" PostHistoryTypeId="5" PostId="9630" RevisionGUID="5da21fa5-49f7-4725-be4e-a120f41a2b3a" CreationDate="2023-08-17T06:05:39.133" UserId="2844" Comment="added 2275 characters in body" Text="I found the exact same first issue [here](https://substrate.stackexchange.com/questions/9107/error-c-as-triecacheproviderhcache-does-not-live-long-enough) and I checked I don't have any duplicate dependencies. I also try `cargo clean &amp; cargo update` command, nothing changes.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate % cargo build --release&#xD;&#xA;       Compiling sp-state-machine v0.28.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;       Compiling node-template-runtime v4.0.0-dev (/Users/ganesholi/Developer/MarketplaceMVP_Substrate/runtime)&#xD;&#xA;    error: `&lt;C as TrieCacheProvider&lt;H&gt;&gt;::Cache&lt;'_&gt;` does not live long enough&#xD;&#xA;       --&gt; /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/state-machine/src/trie_backend_essence.rs:305:38&#xD;&#xA;        |&#xD;&#xA;    305 |         let cache = cache.as_mut().map(|c| c as _);&#xD;&#xA;        |                                            ^&#xD;&#xA;    &#xD;&#xA;    error: could not compile `sp-state-machine` due to previous error&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/ganesholi/Developer/MarketplaceMVP_Substrate/runtime)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/Users/ganesholi/Developer/MarketplaceMVP_Substrate/target/release/build/node-template-runtime-52c2d654e2027d65/build-script-build` (exit status: 1)&#xD;&#xA;      --- stdout&#xD;&#xA;      Information that should be included in a bug report.&#xD;&#xA;      Executing build command: RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/ganesholi/.rustup/toolchains/nightly-2023-01-01-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/ganesholi/Developer/MarketplaceMVP_Substrate/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;      Using rustc version: rustc 1.68.0-nightly (574b64a97 2022-12-31)&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;         Compiling getrandom v0.2.10&#xD;&#xA;         Compiling syn v2.0.29&#xD;&#xA;         Compiling syn v1.0.109&#xD;&#xA;         Compiling memchr v2.5.0&#xD;&#xA;         Compiling generic-array v0.14.7&#xD;&#xA;         Compiling ahash v0.7.6&#xD;&#xA;         Compiling const-oid v0.9.5&#xD;&#xA;         Compiling ppv-lite86 v0.2.17&#xD;&#xA;      error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;         --&gt; /Users/ganesholi/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.10/src/lib.rs:285:9&#xD;&#xA;          |&#xD;&#xA;      285 | /         compile_error!(&quot;the wasm*-unknown-unknown targets are not supported by \&#xD;&#xA;      286 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;      287 | |                         For more information see: \&#xD;&#xA;      288 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;          | |________________________________________________________________________^&#xD;&#xA;    &#xD;&#xA;      error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;         --&gt; /Users/ganesholi/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.10/src/lib.rs:341:9&#xD;&#xA;          |&#xD;&#xA;      341 |         imp::getrandom_inner(dest)?;&#xD;&#xA;          |         ^^^ use of undeclared crate or module `imp`&#xD;&#xA;    &#xD;&#xA;      For more information about this error, try `rustc --explain E0433`.&#xD;&#xA;      error: could not compile `getrandom` due to 2 previous errors&#xD;&#xA;      warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate % &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is my [github](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/my-lending-branch)&#xD;&#xA;Someone please suggest me why I am getting this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38209" PostHistoryTypeId="2" PostId="9631" RevisionGUID="2814ee51-32ca-4c65-9f38-f173a2fb1019" CreationDate="2023-08-17T07:45:47.113" UserId="357" Text="I'm experiencing something that I consider some weird behavior :) &#xD;&#xA;&#xD;&#xA;I set up two parachains and somehow I can transfer native tokens between them without opening a channel :O &#xD;&#xA;&#xD;&#xA;Here you can find the details of the xcm transfer, https://github.com/mangata-finance/mangata-e2e/blob/4aac538e4dc8ee579aa92d5964931962137e6a10/testPad/xTokens.testpad.test.ts#L76&#xD;&#xA;&#xD;&#xA;I'm running both &quot;same&quot; chains with parachain-launch on `rococo-local` chain,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;relaychain:&#xD;&#xA;  image: parity/polkadot:v0.9.42&#xD;&#xA;  chain: rococo-local&#xD;&#xA;  runtimeGenesisConfig:&#xD;&#xA;    configuration:&#xD;&#xA;      config:&#xD;&#xA;        validation_upgrade_cooldown: 10&#xD;&#xA;        validation_upgrade_delay: 10&#xD;&#xA;  env:&#xD;&#xA;    RUST_LOG: parachain::candidate-backing=trace,parachain::candidate-selection=trace,parachain::pvf=trace,parachain::collator-protocol=trace,parachain::provisioner=trace&#xD;&#xA;  flags:&#xD;&#xA;    - --rpc-methods=unsafe&#xD;&#xA;    - --wasm-execution=compiled&#xD;&#xA;    - --execution=wasm&#xD;&#xA;  nodes:&#xD;&#xA;    - name: alice&#xD;&#xA;    - name: bob&#xD;&#xA;&#xD;&#xA;parachains:&#xD;&#xA;- image: mangatasolutions/mangata-node:develop&#xD;&#xA;  chain:&#xD;&#xA;    base: rococo-local&#xD;&#xA;    collators:&#xD;&#xA;      - alice&#xD;&#xA;      - bob&#xD;&#xA;    sudo: alice&#xD;&#xA;    skipCollatorSelection: true&#xD;&#xA;    skipBalances: true&#xD;&#xA;  id: 2110&#xD;&#xA;  parachain: true&#xD;&#xA;  flags:&#xD;&#xA;    - --rpc-methods=unsafe&#xD;&#xA;    - --force-authoring&#xD;&#xA;    - --wasm-execution=compiled&#xD;&#xA;    - --execution=wasm&#xD;&#xA;  relaychainFlags:&#xD;&#xA;    - --wasm-execution=compiled&#xD;&#xA;    - --execution=wasm&#xD;&#xA;  env:&#xD;&#xA;    # RUST_LOG: info,block_builder=trace,block_shuffler=trace,runtime::ver=trace,txpool=trace,rpc::nonce=trace&#xD;&#xA;    RUST_LOG: info,block_builder=trace&#xD;&#xA;  volumePath: /mangata/data&#xD;&#xA;  nodes:&#xD;&#xA;  - flags:&#xD;&#xA;    - --alice&#xD;&#xA;  - flags:&#xD;&#xA;    - --bob&#xD;&#xA;- image: mangatasolutions/mangata-node:develop&#xD;&#xA;  chain:&#xD;&#xA;    base: rococo-local&#xD;&#xA;    collators:&#xD;&#xA;      - alice&#xD;&#xA;      - bob&#xD;&#xA;    sudo: alice&#xD;&#xA;    skipCollatorSelection: true&#xD;&#xA;    skipBalances: true&#xD;&#xA;  id: 2001&#xD;&#xA;  parachain: true&#xD;&#xA;  flags:&#xD;&#xA;    - --rpc-methods=unsafe&#xD;&#xA;    - --force-authoring&#xD;&#xA;    - --wasm-execution=compiled&#xD;&#xA;    - --execution=wasm&#xD;&#xA;  relaychainFlags:&#xD;&#xA;    - --wasm-execution=compiled&#xD;&#xA;    - --execution=wasm&#xD;&#xA;  env:&#xD;&#xA;    # RUST_LOG: info,block_builder=trace,block_shuffler=trace,runtime::ver=trace,txpool=trace,rpc::nonce=trace&#xD;&#xA;    RUST_LOG: info,block_builder=trace&#xD;&#xA;  volumePath: /mangata/data&#xD;&#xA;  nodes:&#xD;&#xA;  - flags:&#xD;&#xA;    - --alice&#xD;&#xA;  - flags:&#xD;&#xA;    - --bob&#xD;&#xA;```&#xD;&#xA;[![Pic about relay handling][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/w8vHH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38211" PostHistoryTypeId="1" PostId="9631" RevisionGUID="2814ee51-32ca-4c65-9f38-f173a2fb1019" CreationDate="2023-08-17T07:45:47.113" UserId="357" Text="Is it possible to do xcm transfers between parachains without a channel opened?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38212" PostHistoryTypeId="3" PostId="9631" RevisionGUID="2814ee51-32ca-4c65-9f38-f173a2fb1019" CreationDate="2023-08-17T07:45:47.113" UserId="357" Text="|parachain|xcm|parachain-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38213" PostHistoryTypeId="2" PostId="9632" RevisionGUID="83a355a7-ff2a-47ac-8a41-2557a1a136b2" CreationDate="2023-08-17T08:06:13.753" UserId="4556" Text="I'm trying to use my node's identity pallet via polkadot js. Generally that works well, but I do run into an issue when providing judgements.&#xD;&#xA;&#xD;&#xA;This function requires an `identity: H256 (Hash)` value. This is the hash value of the identity info. The question is where I can find this on polkadot js? &#xD;&#xA;&#xD;&#xA;I tried the extrinsic hash from the block produced after `set_identity`, but that's clearly not the right value, since it results in a `JudgementForDifferentIdentity` error." ContentLicense="CC BY-SA 4.0" />
  <row Id="38215" PostHistoryTypeId="1" PostId="9632" RevisionGUID="83a355a7-ff2a-47ac-8a41-2557a1a136b2" CreationDate="2023-08-17T08:06:13.753" UserId="4556" Text="Provide judgement on polkadot js" ContentLicense="CC BY-SA 4.0" />
  <row Id="38216" PostHistoryTypeId="3" PostId="9632" RevisionGUID="83a355a7-ff2a-47ac-8a41-2557a1a136b2" CreationDate="2023-08-17T08:06:13.753" UserId="4556" Text="|polkadot-js|pallet-identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38217" PostHistoryTypeId="2" PostId="9633" RevisionGUID="6288c8ea-8642-4e17-aa4d-98ec9e2919f6" CreationDate="2023-08-17T08:56:37.910" UserId="386" Text="I'm currently working on a custom Substrate pallet and am trying to understand the best practices surrounding the `Config` trait. I've come across a design decision and would appreciate some guidance.&#xD;&#xA;&#xD;&#xA;In my pallet, I have the following:&#xD;&#xA;```rust&#xD;&#xA;/// Base URI limit&#xD;&#xA;const BASE_URI_LIMIT_U32: u32 = u8::MAX as u32;&#xD;&#xA;/// Base URI limit type&#xD;&#xA;type BaseURILimit = ConstU32&lt;BASE_URI_LIMIT_U32&gt;;&#xD;&#xA;/// Base URI type&#xD;&#xA;pub type BaseURI = BoundedVec&lt;u8, BaseURILimit&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Given that `BaseURILimit` is supposed to be **non-configurable** and constant across different runtimes using this pallet, is there any reason or advantage to moving it into the pallet's `Config` trait? &#xD;&#xA;&#xD;&#xA;I'm trying to adhere to best practices and ensure maintainability. Any insights or recommendations would be invaluable.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38219" PostHistoryTypeId="1" PostId="9633" RevisionGUID="6288c8ea-8642-4e17-aa4d-98ec9e2919f6" CreationDate="2023-08-17T08:56:37.910" UserId="386" Text="Best Practices: Setting Non-configurable Types in a Substrate Pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="38220" PostHistoryTypeId="3" PostId="9633" RevisionGUID="6288c8ea-8642-4e17-aa4d-98ec9e2919f6" CreationDate="2023-08-17T08:56:37.910" UserId="386" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38221" PostHistoryTypeId="2" PostId="9634" RevisionGUID="ece8c76b-ed39-4dea-9b9b-80bc04dc1700" CreationDate="2023-08-17T09:17:40.530" UserId="523" Text="Usually it's not best practice store unlimited size of BoundedVec into runtime, and better to add the upper limit const into runtime rather than pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="38223" PostHistoryTypeId="2" PostId="9635" RevisionGUID="cafe685c-289b-4500-8331-ba845a2474d7" CreationDate="2023-08-17T09:27:46.853" UserId="427" Text="As Ron suggested, we should store it as a constant in runtime like [here][1]&#xD;&#xA;and then use it in the pallet config like [here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/ec6be6ed664f09098795a44cbe91c2d465662e9e/bin/node/runtime/src/lib.rs#L603C1-L603C1&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/ec6be6ed664f09098795a44cbe91c2d465662e9e/frame/staking/src/pallet/mod.rs#L261C5-L261C5" ContentLicense="CC BY-SA 4.0" />
  <row Id="38225" PostHistoryTypeId="2" PostId="9636" RevisionGUID="209c4059-0a6f-4693-af69-d5e27cb9a4cc" CreationDate="2023-08-17T09:32:36.843" UserId="523" Text="Definitely not the transaction hash, just pre calculate the hash as following.&#xD;&#xA;https://github.com/paritytech/substrate/blob/ec6be6ed664f09098795a44cbe91c2d465662e9e/frame/identity/src/lib.rs#L763-L765&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38227" PostHistoryTypeId="2" PostId="9637" RevisionGUID="52c5d135-8c4a-453b-bdec-5badc715aeb3" CreationDate="2023-08-17T09:41:52.053" UserId="523" Text="Impossible. Actually what you attach is some `ump` message in relaychain not the `hrmp` between parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="38229" PostHistoryTypeId="2" PostId="9638" RevisionGUID="7f29789d-aef1-4f94-9c07-5e6428adf622" CreationDate="2023-08-17T10:07:34.320" UserId="523" Text="There are multiple conflicted `pallet-treasury` in your `Cargo.lock`(seems one from substrate and the other your customize), usually `pallet-treasury` is a low level pallet which is required by other modules like `pallet-bounties`." ContentLicense="CC BY-SA 4.0" />
  <row Id="38231" PostHistoryTypeId="5" PostId="9638" RevisionGUID="e6f92e71-bab6-45c2-84eb-677ba8bff5b6" CreationDate="2023-08-17T10:21:01.617" UserId="523" Comment="added 49 characters in body" Text="There are multiple conflicted `pallet-treasury` in your `Cargo.lock`(seems one from substrate and the other your customize), usually `pallet-treasury` is a low level pallet which is required by other modules like `pallet-bounties`, so you can't just simply replace with same name." ContentLicense="CC BY-SA 4.0" />
  <row Id="38232" PostHistoryTypeId="2" PostId="9639" RevisionGUID="e04c6793-d5f7-4910-ad64-f075f369e2ae" CreationDate="2023-08-17T11:17:30.327" UserId="94" Text="Substrate is not yet properly released to crates.io. Doing a `cargo update` could lead to incompatible versions. The versions need to be pinned to a known-good tag for example one of the [monthly ones](https://github.com/paritytech/substrate/tags)." ContentLicense="CC BY-SA 4.0" />
  <row Id="38234" PostHistoryTypeId="5" PostId="9630" RevisionGUID="6bd3c015-fbf1-4f45-a52d-7f0bb47d6c92" CreationDate="2023-08-17T11:18:22.257" UserId="3387" Comment="Same issue for the crontract-node" Text="I found the exact same first issue [here](https://substrate.stackexchange.com/questions/9107/error-c-as-triecacheproviderhcache-does-not-live-long-enough) and I checked I don't have any duplicate dependencies. I also try `cargo clean &amp; cargo update` command, nothing changes.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate % cargo build --release&#xD;&#xA;       Compiling sp-state-machine v0.28.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;       Compiling node-template-runtime v4.0.0-dev (/Users/ganesholi/Developer/MarketplaceMVP_Substrate/runtime)&#xD;&#xA;    error: `&lt;C as TrieCacheProvider&lt;H&gt;&gt;::Cache&lt;'_&gt;` does not live long enough&#xD;&#xA;       --&gt; /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/state-machine/src/trie_backend_essence.rs:305:38&#xD;&#xA;        |&#xD;&#xA;    305 |         let cache = cache.as_mut().map(|c| c as _);&#xD;&#xA;        |                                            ^&#xD;&#xA;    &#xD;&#xA;    error: could not compile `sp-state-machine` due to previous error&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/ganesholi/Developer/MarketplaceMVP_Substrate/runtime)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/Users/ganesholi/Developer/MarketplaceMVP_Substrate/target/release/build/node-template-runtime-52c2d654e2027d65/build-script-build` (exit status: 1)&#xD;&#xA;      --- stdout&#xD;&#xA;      Information that should be included in a bug report.&#xD;&#xA;      Executing build command: RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/ganesholi/.rustup/toolchains/nightly-2023-01-01-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/ganesholi/Developer/MarketplaceMVP_Substrate/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;      Using rustc version: rustc 1.68.0-nightly (574b64a97 2022-12-31)&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;         Compiling getrandom v0.2.10&#xD;&#xA;         Compiling syn v2.0.29&#xD;&#xA;         Compiling syn v1.0.109&#xD;&#xA;         Compiling memchr v2.5.0&#xD;&#xA;         Compiling generic-array v0.14.7&#xD;&#xA;         Compiling ahash v0.7.6&#xD;&#xA;         Compiling const-oid v0.9.5&#xD;&#xA;         Compiling ppv-lite86 v0.2.17&#xD;&#xA;      error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;         --&gt; /Users/ganesholi/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.10/src/lib.rs:285:9&#xD;&#xA;          |&#xD;&#xA;      285 | /         compile_error!(&quot;the wasm*-unknown-unknown targets are not supported by \&#xD;&#xA;      286 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;      287 | |                         For more information see: \&#xD;&#xA;      288 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;          | |________________________________________________________________________^&#xD;&#xA;    &#xD;&#xA;      error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;         --&gt; /Users/ganesholi/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.10/src/lib.rs:341:9&#xD;&#xA;          |&#xD;&#xA;      341 |         imp::getrandom_inner(dest)?;&#xD;&#xA;          |         ^^^ use of undeclared crate or module `imp`&#xD;&#xA;    &#xD;&#xA;      For more information about this error, try `rustc --explain E0433`.&#xD;&#xA;      error: could not compile `getrandom` due to 2 previous errors&#xD;&#xA;      warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate % &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is my [github](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/tree/my-lending-branch)&#xD;&#xA;Someone please suggest me why I am getting this issue?&#xD;&#xA;&#xD;&#xA;I had the same issue when updating my substrate-contracts-node &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Cheers,&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aQ0JC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38235" PostHistoryTypeId="24" PostId="9630" RevisionGUID="6bd3c015-fbf1-4f45-a52d-7f0bb47d6c92" CreationDate="2023-08-17T11:18:22.257" Comment="Proposed by 3387 approved by 2844 edit id of 522" ContentLicense="CC BY-SA 4.0" />
  <row Id="38236" PostHistoryTypeId="2" PostId="9640" RevisionGUID="3f47102e-09ba-4e09-b65e-508cbbbc2008" CreationDate="2023-08-17T11:22:25.913" UserId="94" Text="If you are sure that it should never change, then that approach is fine.&#xD;&#xA;&#xD;&#xA;&gt;Given that BaseURILimit is supposed to be non-configurable and constant across different runtimes using this pallet, is there any reason or advantage to moving it into the pallet's Config trait?&#xD;&#xA;&#xD;&#xA;Its fine to have some things non-configurable if there is a good reason to. Personally i would make `BASE_URI_LIMIT_U32` and the other type public as well to make downstream usage a bit easier." ContentLicense="CC BY-SA 4.0" />
  <row Id="38239" PostHistoryTypeId="2" PostId="9641" RevisionGUID="663fce7b-eae2-4dde-8026-16060627ec3e" CreationDate="2023-08-17T12:58:05.100" UserId="4381" Text="I'm running a Kusama node with a actual network speed ranging from over 100MB/s to 500MB/s on both sides. &#xD;&#xA;However, I'm facing issues with slow block propagation time and low upload/download bandwidth speeds(**under 100kB/s**) on my node, even though I have a gigabyte network. What could be causing this problem, and how can I optimize my node's performance to improve these issues?&#xD;&#xA;  " ContentLicense="CC BY-SA 4.0" />
  <row Id="38241" PostHistoryTypeId="1" PostId="9641" RevisionGUID="663fce7b-eae2-4dde-8026-16060627ec3e" CreationDate="2023-08-17T12:58:05.100" UserId="4381" Text="kusama upload/download bandwidth speed so low" ContentLicense="CC BY-SA 4.0" />
  <row Id="38242" PostHistoryTypeId="3" PostId="9641" RevisionGUID="663fce7b-eae2-4dde-8026-16060627ec3e" CreationDate="2023-08-17T12:58:05.100" UserId="4381" Text="|kusama|substrate-node|validator|api|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38243" PostHistoryTypeId="2" PostId="9642" RevisionGUID="39ff57e9-7244-400b-8c8c-c2aea85d4a3f" CreationDate="2023-08-17T14:09:01.313" UserId="4068" Text="I'm working with the ink_e2e testing framework in ink smart contract, and I've encountered an error message that's a bit confusing. The error says: &quot;mismatched types - expected String, found Vec&lt;u8&gt;&quot;. However, I'm certain that I'm passing a String and not a Vec&lt;u8&gt;. To provide more context, I've added a screenshot of the relevant code snippet where the error occurs within the ink_e2e framework. Can someone help me understand why I'm getting this error when I'm actually passing the expected type? Are there any nuances in the ink_e2e framework that might be causing this discrepancy?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZjfRP.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38245" PostHistoryTypeId="1" PostId="9642" RevisionGUID="39ff57e9-7244-400b-8c8c-c2aea85d4a3f" CreationDate="2023-08-17T14:09:01.313" UserId="4068" Text="How to resolve &quot;mismatched types&quot; error while ink_e2e test : expected String, found Vec&lt;u8&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38246" PostHistoryTypeId="3" PostId="9642" RevisionGUID="39ff57e9-7244-400b-8c8c-c2aea85d4a3f" CreationDate="2023-08-17T14:09:01.313" UserId="4068" Text="|ink|smart-contract|testing|e2e|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38247" PostHistoryTypeId="2" PostId="9643" RevisionGUID="19605368-fbf6-44eb-a423-0ef2bca388f0" CreationDate="2023-08-17T14:32:45.653" UserId="2166" Text="The error above is most likely because `contracts` pallet on Aleph Zero is not configured to support `call_runtime`.&#xD;&#xA;&#xD;&#xA;Aleph Zero configuration&#xD;&#xA;```&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;    type Time = Timestamp;&#xD;&#xA;    type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;    type Currency = Balances;&#xD;&#xA;    type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    type RuntimeCall = RuntimeCall;&#xD;&#xA;    // The safest default is to allow no calls at all. This is unsafe experimental feature with no support in ink!&#xD;&#xA;    type CallFilter = Nothing;&#xD;&#xA;    type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;    type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;    type ChainExtension = ();&#xD;&#xA;    type Schedule = Schedule;&#xD;&#xA;    type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 16];&#xD;&#xA;    type DepositPerByte = DepositPerByte;&#xD;&#xA;    type DefaultDepositLimit = ConstU128&lt;{ u128::MAX }&gt;;&#xD;&#xA;    type DepositPerItem = DepositPerItem;&#xD;&#xA;    type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;    type MaxCodeLen = ConstU32&lt;{ 128 * 1024 }&gt;;&#xD;&#xA;    type MaxStorageKeyLen = ConstU32&lt;128&gt;;&#xD;&#xA;    type UnsafeUnstableInterface = ConstBool&lt;false&gt;;&#xD;&#xA;    type MaxDebugBufferLen = ConstU32&lt;{ 2 * 1024 * 1024 }&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To be able to use `call_runtime`, `CallFilter` and `UnsafeUnstableInterface` should be configured as below:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// In your node's runtime configuration file (runtime.rs)&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;  …&#xD;&#xA;  // `Everything` or anything that will allow for the `Balances::transfer` extrinsic.&#xD;&#xA;  type CallFilter = frame_support::traits::Everything; &#xD;&#xA;  type UnsafeUnstableInterface = ConstBool&lt;true&gt;;&#xD;&#xA;  …&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38249" PostHistoryTypeId="2" PostId="9644" RevisionGUID="c8dda101-84c6-4ef3-ac51-a6a6cb08daaa" CreationDate="2023-08-17T14:47:28.800" UserId="3711" Text="When developing `ink` smart contracts, I've often seen a `Storage Deposit` charge. What is this, and how does it relate to contract storage?&#xD;&#xA;&#xD;&#xA;My guess is it's a charge related to the size of the contract's storage, so the larger the data store for a contract the higher the gas fee per tx for that contract. Is that correct? If so, how is the fee decided?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38251" PostHistoryTypeId="1" PostId="9644" RevisionGUID="c8dda101-84c6-4ef3-ac51-a6a6cb08daaa" CreationDate="2023-08-17T14:47:28.800" UserId="3711" Text="What is a Storage Deposit?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38252" PostHistoryTypeId="3" PostId="9644" RevisionGUID="c8dda101-84c6-4ef3-ac51-a6a6cb08daaa" CreationDate="2023-08-17T14:47:28.800" UserId="3711" Text="|ink|smart-contract|storage|contracts|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38253" PostHistoryTypeId="2" PostId="9645" RevisionGUID="3e86a745-8484-4e6a-8408-501642c335e6" CreationDate="2023-08-17T15:05:05.097" UserId="29" Text="The storage deposit is the payment for the contract storage.&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0cdf7029017b70b7c83c21a4dc0aa1020e7914f6/frame/contracts/primitives/src/lib.rs#L57-L63&#xD;&#xA;&#xD;&#xA;It is used to pay for onchain storage for a contract and protect against spamming or a DOS attack.&#xD;&#xA;&#xD;&#xA;There is also a storage deposit limit which is the maximum storage deposit that can be charged from the caller for the storage consumed.&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0cdf7029017b70b7c83c21a4dc0aa1020e7914f6/frame/contracts/src/lib.rs#L692" ContentLicense="CC BY-SA 4.0" />
  <row Id="38255" PostHistoryTypeId="50" PostId="7702" RevisionGUID="d285caab-946e-4228-9225-503fd3cc2f2e" CreationDate="2023-08-17T15:08:26.087" UserId="-1" />
  <row Id="38256" PostHistoryTypeId="5" PostId="9645" RevisionGUID="a3b0cd73-1cd2-4a42-9b21-de713b522dcd" CreationDate="2023-08-17T15:41:35.020" UserId="29" Comment="added 23 characters in body" Text="The storage deposit is the payment for the contract storage.&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0cdf7029017b70b7c83c21a4dc0aa1020e7914f6/frame/contracts/primitives/src/lib.rs#L57-L63&#xD;&#xA;&#xD;&#xA;It is used to pay for onchain storage for a contract, reduce storage bloat, and protect against spamming or a DOS attack.&#xD;&#xA;&#xD;&#xA;There is also a storage deposit limit which is the maximum storage deposit that can be charged from the caller for the storage consumed.&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0cdf7029017b70b7c83c21a4dc0aa1020e7914f6/frame/contracts/src/lib.rs#L692" ContentLicense="CC BY-SA 4.0" />
  <row Id="38257" PostHistoryTypeId="2" PostId="9646" RevisionGUID="340acc96-dc01-4512-ac63-c12f85b59910" CreationDate="2023-08-17T16:21:55.057" UserId="3387" Text="If our cargo-contract is version 3.0.1 it would work as like a charm.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;If our cargo-contract is version 3.1.0 (which was [yanked][2]) or above  it would not work.&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bE0xb.png&#xD;&#xA;  [2]: https://github.com/paritytech/cargo-contract/issues/1239#issuecomment-1653580989&#xD;&#xA;  [3]: https://i.stack.imgur.com/pb8Sr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38259" PostHistoryTypeId="2" PostId="9647" RevisionGUID="7cde5e88-b7a3-44ad-9b03-02f5a0a25ea8" CreationDate="2023-08-17T16:34:35.737" UserId="172" Text="A common mistake that causes this issues is to forget to send ROCs to the Contracts chain. If you don't specify the parachain ID when you request ROCs from the faucet, it will just send you ROCs on the relay chain and you will get a `StorageDepositLimitExhausted` error because you don't have funds to call the contract. The easiest way to avoid this is:&#xD;&#xA;* If you use the Matrix faucet (#rococo-faucet:matrix.org), specify the contracts chain paraID in this format: `!drip &lt;address:paraID&gt;`. For e.g.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;!drip 5CCdh5AN2yrpvqWavkmUjnNvKhHthXVqMEBzbjc7JCHC1fsb:1002&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;* If you're using the [faucet UI](https://paritytech.github.io/polkadot-testnet-faucet/), make sure you select the Contracts network when you're requesting ROCs.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xUdUmm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38261" PostHistoryTypeId="5" PostId="7702" RevisionGUID="2b343289-faf3-4679-a791-a4378beaedd9" CreationDate="2023-08-17T16:37:59.213" UserId="172" Comment="Rephrased the question" Text=" I got this error when I was trying to deploy my ink! smart contract on Rococo:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;**StorageDepositLimitExhausted&#xD;&#xA;More storage was created than allowed by the storage deposit limit.**&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What might be the problem?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38262" PostHistoryTypeId="4" PostId="7702" RevisionGUID="2b343289-faf3-4679-a791-a4378beaedd9" CreationDate="2023-08-17T16:37:59.213" UserId="172" Comment="Rephrased the question" Text="StorageDepositLimitExhausted error when trying to deploy contract on Rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="38263" PostHistoryTypeId="6" PostId="7702" RevisionGUID="2b343289-faf3-4679-a791-a4378beaedd9" CreationDate="2023-08-17T16:37:59.213" UserId="172" Comment="Rephrased the question" Text="|substrate-node-template|parachain|smart-contract|rococo|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38264" PostHistoryTypeId="5" PostId="9646" RevisionGUID="11ff04ac-17bb-4a4c-98e6-bada51b14a4b" CreationDate="2023-08-17T16:45:19.713" UserId="3387" Comment="deleted 3 characters in body" Text="If our cargo-contract is version 3.0.1 it would work like a charm.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;If our cargo-contract is version 3.1.0 (which was [yanked][2]) or above  it would not work.&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bE0xb.png&#xD;&#xA;  [2]: https://github.com/paritytech/cargo-contract/issues/1239#issuecomment-1653580989&#xD;&#xA;  [3]: https://i.stack.imgur.com/pb8Sr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38265" PostHistoryTypeId="5" PostId="9625" RevisionGUID="73448fc8-6ad9-4119-9ac2-b592d59f8bcc" CreationDate="2023-08-18T01:20:12.750" UserId="309" Comment="added 2034 characters in body" Text="after adding the kiltprotocol/sdk-js to my front-end, I get the following two errors when importing the kilt module.&#xD;&#xA;&#xD;&#xA;**Error 1:**&#xD;&#xA;&#xD;&#xA;    Type 'Codec | Codec[]' is not assignable to type 'InjectedAccountWithMeta[]'.&#xD;&#xA;              Type 'Codec' is missing the following properties from type 'InjectedAccountWithMeta[]': length, pop, push, concat, and 29 more.&#xD;&#xA;        42 |     });&#xD;&#xA;        43 |&#xD;&#xA;      &gt; 44 |     api.query.council.members((who: InjectedAccountWithMeta[]) =&gt; {&#xD;&#xA;           |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;        45 |       dispatch1({ type: 'SET_COUNCIL_MEMBERS', payload: who });&#xD;&#xA;        46 |     });&#xD;&#xA;        47 |     api.query.backgroundCouncil.proposals((hash: string[]) =&gt; {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Error2:**&#xD;&#xA;&#xD;&#xA;    Type 'Codec | Codec[]' is not assignable to type 'number'.&#xD;&#xA;              Type 'Codec' is not assignable to type 'number'.&#xD;&#xA;        52 |     if (!api || !selectedAccount) return;&#xD;&#xA;        53 |&#xD;&#xA;      &gt; 54 |     api.query.system.number((block: number) =&gt; {&#xD;&#xA;           |                             ^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;        55 |       dispatch({ type: 'SET_BLOCKS', payload: block.toString() });&#xD;&#xA;        56 |     });&#xD;&#xA;        57 |   }, [api, selectedAccount, dispatch]);&#xD;&#xA;&#xD;&#xA;Without the import of this module, everything works fine. any idea why the types stop being valid, and how to fix it?&#xD;&#xA;&#xD;&#xA;**Edit1:**&#xD;&#xA;&#xD;&#xA;I omitted some lines in the error message to make it easier to read, but they actually might be necessary for understanding the source of the problem I will only show Error1, as Error2 is similar:&#xD;&#xA;&#xD;&#xA;*Error_1_complete:*&#xD;&#xA;&#xD;&#xA;    TS2769: No overload matches this call.&#xD;&#xA;      Overload 1 of 4, '(args_0: (result: Vec&lt;AccountId32&gt;) =&gt; void | Promise&lt;void&gt;): UnsubscribePromise', gave the following error.&#xD;&#xA;        Argument of type '(who: InjectedAccountWithMeta[]) =&gt; void' is not assignable to parameter of type '(result: Vec&lt;AccountId32&gt;) =&gt; void | Promise&lt;void&gt;'.&#xD;&#xA;          Types of parameters 'who' and 'result' are incompatible.&#xD;&#xA;            Type 'Vec&lt;AccountId32&gt;' is not assignable to type 'InjectedAccountWithMeta[]'.&#xD;&#xA;              The types returned by 'pop()' are incompatible between these types.&#xD;&#xA;                Type 'AccountId32 | undefined' is not assignable to type 'InjectedAccountWithMeta | undefined'.&#xD;&#xA;                  Type 'GenericAccountId' is missing the following properties from type 'InjectedAccountWithMeta': address, meta&#xD;&#xA;      Overload 2 of 4, '(args_0: (result: Codec | Codec[]) =&gt; void | Promise&lt;void&gt;): UnsubscribePromise', gave the following error.&#xD;&#xA;        Argument of type '(who: InjectedAccountWithMeta[]) =&gt; void' is not assignable to parameter of type '(result: Codec | Codec[]) =&gt; void | Promise&lt;void&gt;'.&#xD;&#xA;          Types of parameters 'who' and 'result' are incompatible.&#xD;&#xA;            Type 'Codec | Codec[]' is not assignable to type 'InjectedAccountWithMeta[]'.&#xD;&#xA;              Type 'Codec' is missing the following properties from type 'InjectedAccountWithMeta[]': length, pop, push, concat, and 29 more.&#xD;&#xA;        43 |     });&#xD;&#xA;        44 |&#xD;&#xA;      &gt; 45 |     api.query.council.members((who: InjectedAccountWithMeta[]) =&gt; {&#xD;&#xA;           |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;        46 |       dispatch1({ type: 'SET_COUNCIL_MEMBERS', payload: who });&#xD;&#xA;        47 |     });&#xD;&#xA;        48 |     api.query.backgroundCouncil.proposals((hash: string[]) =&gt; {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Kazunobu" ContentLicense="CC BY-SA 4.0" />
  <row Id="38266" PostHistoryTypeId="5" PostId="9353" RevisionGUID="b651107a-dd3a-4327-8afc-83e29f27feed" CreationDate="2023-08-18T06:25:04.773" UserId="427" Comment="Added how to retrieve an account id using subalfred tool" Text="Usually this is the treasury account ID - 5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z which is generated using the pallet-id of treasury so it is deterministic across all substrate based chains until the pallet-id is modified. &#xD;&#xA;&#xD;&#xA;So a normal transfer to this account should answer your question.&#xD;&#xA;&#xD;&#xA;To get account id for a pallet-id use the below command using subalfred tool. &#xD;&#xA;&#xD;&#xA;    subalfred key --type pallet --show-prefix 'py/trsry'&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38267" PostHistoryTypeId="34" PostId="9498" RevisionGUID="c40319ea-2809-4dee-b937-b0c8bdd0c66b" CreationDate="2023-08-18T08:02:45.303" UserId="-1" Comment="31" />
  <row Id="38268" PostHistoryTypeId="2" PostId="9648" RevisionGUID="0696839b-d1b6-4d57-a016-9732b1369db1" CreationDate="2023-08-18T10:34:07.837" UserId="3387" Text="&#xD;&#xA;I have replicate this error using the [MultiContractCaller][1] from the [ink-examples][2]&#xD;&#xA;&#xD;&#xA;In the [multi_contract_caller][3] we have a FakeEvent.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink(event)]&#xD;&#xA;pub struct FakeEvent {&#xD;&#xA;    account_id: AccountId,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which is being emitted in the multi_contract_caller [change][4]&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn change(&amp;mut self, by: i32) {&#xD;&#xA;     let caller = self.env().caller();&#xD;&#xA;     self.env().emit_event(FakeEvent { account_id: caller });&#xD;&#xA;     match self.which {&#xD;&#xA;           Which::Adder =&gt; self.adder.inc(by),&#xD;&#xA;           Which::Subber =&gt; self.subber.dec(by),&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;-------------------------------------------------------------------------------------------&#xD;&#xA;-------------------------------------------------------------------------------------------&#xD;&#xA;-------------------------------------------------------------------------------------------&#xD;&#xA;In the [accumulator][5] we have another FakeEvent.&#xD;&#xA;```&#xD;&#xA;#[ink(event)]&#xD;&#xA;pub struct FakeEvent {&#xD;&#xA;    account_id: AccountId,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Which is being emitted in the accumulator [inc][6]&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn inc(&amp;mut self, by: i32) {&#xD;&#xA;       let caller = self.env().caller();&#xD;&#xA;       self.env().emit_event(FakeEvent { account_id: caller });&#xD;&#xA;       self.value += by;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In theory this should have been solved by the &quot;[Events 2.0][7]&quot;&#xD;&#xA;&#xD;&#xA;**But the result is this below.** Nevertheless, anyone knows why or what magic trick should I do to make this work?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0284]: type annotations needed&#xD;&#xA;   --&gt; /home/projects/crap/ink-examples-main/multi_contract_caller/lib.rs:101:24&#xD;&#xA;    |&#xD;&#xA;101 |             self.env().emit_event(FakeEvent { account_id: caller });&#xD;&#xA;    |                        ^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = note: cannot satisfy `&lt;_ as ContractEventBase&gt;::Type == _`&#xD;&#xA;help: try using a fully qualified path to specify the expected types&#xD;&#xA;    |&#xD;&#xA;101 |             &lt;EnvAccess&lt;'_, DefaultEnvironment&gt; as EmitEvent&lt;C&gt;&gt;::emit_event::&lt;FakeEvent&gt;(self.env(), FakeEvent { account_id: caller });&#xD;&#xA;    |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          ~&#xD;&#xA;&#xD;&#xA;error[E0283]: type annotations needed&#xD;&#xA;   --&gt; /home/projects/crap/ink-examples-main/multi_contract_caller/lib.rs:101:24&#xD;&#xA;    |&#xD;&#xA;101 |             self.env().emit_event(FakeEvent { account_id: caller });&#xD;&#xA;    |                        ^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;note: multiple `impl`s satisfying `EnvAccess&lt;'_, DefaultEnvironment&gt;: EmitEvent&lt;_&gt;` found&#xD;&#xA;   --&gt; /home/projects/crap/ink-examples-main/multi_contract_caller/lib.rs:3:1&#xD;&#xA;    |&#xD;&#xA;3   | #[ink::contract]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^&#xD;&#xA;    = note: and another `impl` found in the `accumulator` crate: `impl&lt;'a&gt; EmitEvent&lt;Accumulator&gt; for EnvAccess&lt;'a, &lt;Accumulator as ContractEnv&gt;::Env&gt;;`&#xD;&#xA;    = note: this error originates in the attribute macro `ink::contract` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: try using a fully qualified path to specify the expected types&#xD;&#xA;    |&#xD;&#xA;101 |             &lt;EnvAccess&lt;'_, DefaultEnvironment&gt; as EmitEvent&lt;C&gt;&gt;::emit_event::&lt;FakeEvent&gt;(self.env(), FakeEvent { account_id: caller });&#xD;&#xA;    |             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          ~&#xD;&#xA;&#xD;&#xA;Some errors have detailed explanations: E0283, E0284.&#xD;&#xA;For more information about an error, try `rustc --explain E0283`.&#xD;&#xA;error: could not compile `multi_contract_caller` (bin &quot;multi_contract_caller&quot;) due to 2 prevERROR: command [&quot;/home/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot;, &quot;build&quot;, &quot;--color=always&quot;, &quot;--target=wasm32-unknown-unknown&quot;, &quot;-Zbuild-std=core,alloc&quot;, &quot;--no-default-features&quot;, &quot;--release&quot;, &quot;--target-dir=/home/projects/crap/ink-examples-main/multi_contract_caller/target/ink&quot;, &quot;-Zbuild-std-features=panic_immediate_abort&quot;] exited with code 101&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Whit this bug there are at least two other posts:&#xD;&#xA;&#xD;&#xA;[Post I][8] &#xD;&#xA;&#xD;&#xA;[Post II][9]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/gcp-development/bug&#xD;&#xA;  [2]: https://github.com/paritytech/ink-examples/tree/main/multi_contract_caller&#xD;&#xA;  [3]: https://github.com/gcp-development/bug/blob/main/lib.rs#L9&#xD;&#xA;  [4]: https://github.com/gcp-development/bug/blob/main/lib.rs#L99C16-L99C22&#xD;&#xA;  [5]: https://github.com/gcp-development/bug/blob/main/accumulator/lib.rs#L11&#xD;&#xA;  [6]: https://github.com/gcp-development/bug/blob/main/accumulator/lib.rs#L30&#xD;&#xA;  [7]: https://github.com/paritytech/ink/pull/1842&#xD;&#xA;  [8]: https://substrate.stackexchange.com/questions/9032/cross-contract-e2e-test-type-annotation-needed-for-events&#xD;&#xA;  [9]: https://substrate.stackexchange.com/questions/3385/emiting-events-does-not-work-with-cross-contract-calling" ContentLicense="CC BY-SA 4.0" />
  <row Id="38270" PostHistoryTypeId="1" PostId="9648" RevisionGUID="0696839b-d1b6-4d57-a016-9732b1369db1" CreationDate="2023-08-18T10:34:07.837" UserId="3387" Text="Cross-Contract Calls and Events don't work (ink 4.2.1)" ContentLicense="CC BY-SA 4.0" />
  <row Id="38271" PostHistoryTypeId="3" PostId="9648" RevisionGUID="0696839b-d1b6-4d57-a016-9732b1369db1" CreationDate="2023-08-18T10:34:07.837" UserId="3387" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38272" PostHistoryTypeId="2" PostId="9649" RevisionGUID="50aa82f6-dd68-48d3-a301-4f41b33f337b" CreationDate="2023-08-18T10:51:27.530" UserId="2372" Text="I'm working on one pallet in which i have to initiate hrmp channel within the code of both &quot;mock.rs&quot; and in the &quot;test.rs.&quot;. Can someone please guide me through this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38274" PostHistoryTypeId="1" PostId="9649" RevisionGUID="50aa82f6-dd68-48d3-a301-4f41b33f337b" CreationDate="2023-08-18T10:51:27.530" UserId="2372" Text="How to make a HRMP channel between two parachains in mock.rs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38275" PostHistoryTypeId="3" PostId="9649" RevisionGUID="50aa82f6-dd68-48d3-a301-4f41b33f337b" CreationDate="2023-08-18T10:51:27.530" UserId="2372" Text="|parachain|hrmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38276" PostHistoryTypeId="50" PostId="6000" RevisionGUID="82545c59-553d-4e71-ba05-e5faa78f6d29" CreationDate="2023-08-18T11:08:56.053" UserId="-1" />
  <row Id="38277" PostHistoryTypeId="5" PostId="9647" RevisionGUID="813ce7b2-b663-4381-80bc-1873f2175ce7" CreationDate="2023-08-18T12:33:00.870" UserId="172" Comment="deleted 1 character in body" Text="A common mistake that causes this issue is to forget to send ROCs to the Contracts chain. If you don't specify the parachain ID when you request ROCs from the faucet, it will just send you ROCs on the relay chain and you will get a `StorageDepositLimitExhausted` error because you don't have funds to call the contract. The easiest way to avoid this is:&#xD;&#xA;* If you use the Matrix faucet (#rococo-faucet:matrix.org), specify the contracts chain paraID in this format: `!drip &lt;address:paraID&gt;`. For e.g.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;!drip 5CCdh5AN2yrpvqWavkmUjnNvKhHthXVqMEBzbjc7JCHC1fsb:1002&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;* If you're using the [faucet UI](https://paritytech.github.io/polkadot-testnet-faucet/), make sure you select the Contracts network when you're requesting ROCs.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Then you'll be sure to have ROCs available to use on the Contracts chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xUdUmm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38278" PostHistoryTypeId="2" PostId="9650" RevisionGUID="12528c67-089c-448b-90e8-fdccc23e0c86" CreationDate="2023-08-18T12:50:53.343" UserId="2166" Text="Why don't you do exactly what error message states? Replace&#xD;&#xA;```&#xD;&#xA;self.env().emit_event(FakeEvent { account_id: caller });&#xD;&#xA;```&#xD;&#xA;with&#xD;&#xA;```&#xD;&#xA;use ink::{&#xD;&#xA;  codegen::EmitEvent,&#xD;&#xA;  env::DefaultEnvironment,&#xD;&#xA;  EnvAccess,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;&lt;EnvAccess&lt;'_, DefaultEnvironment&gt; as EmitEvent&lt;MultiContractCaller&gt;&gt;::emit_event::&lt;FakeEvent&gt;(&#xD;&#xA;  self.env(),&#xD;&#xA;  FakeEvent { account_id: caller },&#xD;&#xA;);&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;I am not sure why error happened but following error message instructions helped me to solve the same error in [contract](https://github.com/swankyhub/marketplace/blob/385a3901d645a467f638dee4c1119c62bea00bca/contracts/marketplace/lib.rs#L92) I wrote some time ago." ContentLicense="CC BY-SA 4.0" />
  <row Id="38280" PostHistoryTypeId="2" PostId="9651" RevisionGUID="b9fa614f-ae02-4c63-ad90-8268c66ff6df" CreationDate="2023-08-18T13:02:52.757" UserId="2166" Text="See answer in [this](https://substrate.stackexchange.com/questions/9648/cross-contract-calls-and-events-dont-work-ink-4-2-1) post. It should help.&#xD;&#xA;&#xD;&#xA;Use&#xD;&#xA;```&#xD;&#xA;&lt;EnvAccess&lt;'_, DefaultEnvironment&gt; as EmitEvent&lt;C&gt;&gt;::emit_event::&lt;address_book::AddressBookCreated&gt;(self.env(), AddressBookCreated { owner: caller });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;instead of&#xD;&#xA;```&#xD;&#xA;self.env().emit_event(AddressBookCreated { owner: caller });&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38282" PostHistoryTypeId="2" PostId="9652" RevisionGUID="edf4ec32-a38c-418b-8bd9-a78d6ff6c9fe" CreationDate="2023-08-18T15:31:46.123" UserId="3327" Text="There is a limitation of polkadot, such that a total of 100 slots for parachains. I have following questions:&#xD;&#xA;&#xD;&#xA;1. How many slots are auctioned till date?&#xD;&#xA;2. How a parachain will connect to polkadot relaychain once this limit is reached? Is there any option other than para threads?&#xD;&#xA;3. Is this not a very serious limitation of polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38284" PostHistoryTypeId="1" PostId="9652" RevisionGUID="edf4ec32-a38c-418b-8bd9-a78d6ff6c9fe" CreationDate="2023-08-18T15:31:46.123" UserId="3327" Text="How a parachain will connect to polkadot relaychain when the hundred parachain limit is reached?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38285" PostHistoryTypeId="3" PostId="9652" RevisionGUID="edf4ec32-a38c-418b-8bd9-a78d6ff6c9fe" CreationDate="2023-08-18T15:31:46.123" UserId="3327" Text="|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38286" PostHistoryTypeId="2" PostId="9653" RevisionGUID="a70c8857-0906-439c-849c-a4b7bab3a502" CreationDate="2023-08-18T22:30:51.607" UserId="4561" Text="If a parachain has executed a lease swap, is the DOT in the original crowdloan still returned at the conclusion of the parachain's original lease, or does it continue to be locked for the duration of the new lease? &#xD;&#xA;&#xD;&#xA;I can see there's a function in the ```crowdloan``` pallet that handles swaps, but I'm not sure how this affects retirement:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot/blob/master/runtime/common/src/crowdloan/mod.rs#L840&#xD;&#xA;&#xD;&#xA;Pertinent example: Acala's original lease expires in October 2023, but they have successfully executed a lease swap iirc." ContentLicense="CC BY-SA 4.0" />
  <row Id="38288" PostHistoryTypeId="1" PostId="9653" RevisionGUID="a70c8857-0906-439c-849c-a4b7bab3a502" CreationDate="2023-08-18T22:30:51.607" UserId="4561" Text="If a parachain has executed a lease swap, is the DOT in the original crowdloan still returned at the conclusion of the parachain's original lease?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38289" PostHistoryTypeId="3" PostId="9653" RevisionGUID="a70c8857-0906-439c-849c-a4b7bab3a502" CreationDate="2023-08-18T22:30:51.607" UserId="4561" Text="|parachain|crowdloan|lease|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38290" PostHistoryTypeId="2" PostId="9654" RevisionGUID="55dc72d6-b8f5-4eaa-b0f5-767baf2a255b" CreationDate="2023-08-18T22:36:46.620" UserId="359" Text="Lease swap (or anything else) will not impact the crowdloan end date.&#xD;&#xA;&#xD;&#xA;Acala have already executed a lease swap, between 2000 (Acala) and 3336.&#xD;&#xA;&#xD;&#xA;You can see [here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/parachains/crowdloan) the crowdloan is moved to 3336, and will be released with original date (end of lease 13 / Oct 2023).&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LpQ2d.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38294" PostHistoryTypeId="50" PostId="9330" RevisionGUID="6701a6d4-c745-440d-8ee2-5f01392c3ce2" CreationDate="2023-08-19T09:04:25.543" UserId="-1" />
  <row Id="38295" PostHistoryTypeId="2" PostId="9655" RevisionGUID="5f134fa3-21c8-4509-aa93-68a6e4f52ebf" CreationDate="2023-08-19T13:47:18.553" UserId="4562" Text="There is a few different answers to this. First, with asynchronous backing coming out it could theoretically be 1000 blockchains. With 2.0 it could be many many more. But the big thing to remember is when you say &quot;projects&quot; you are saying parachains. A parachain is an L1 Blockchain. If you look at the top 100 projects on coin market cap there isn't  even 100 blockchains in that list. To have 100 blockchains where each Blockchain has its own projects being built on it is a lot of Blockchains. Imagine an ecosystem that has 100 different ethereums. I think a lot of people keep confusing the fact that these are blockchains and not just projects on a blockchain. So each parchain could have thousands of projects built on it. That's already a ton of potential room for a ton of projects." ContentLicense="CC BY-SA 4.0" />
  <row Id="38297" PostHistoryTypeId="50" PostId="9350" RevisionGUID="eea47aa9-08ac-4897-9f9c-76de3a501ed8" CreationDate="2023-08-19T14:05:50.857" UserId="-1" />
  <row Id="38298" PostHistoryTypeId="2" PostId="9656" RevisionGUID="9235184c-c8bd-4125-a097-0afe7e2522a8" CreationDate="2023-08-19T14:25:51.240" UserId="3387" Text="What would be the best rust crate or c++ libraries to call ink! smart contracts from hardware devices that use embedded rust? " ContentLicense="CC BY-SA 4.0" />
  <row Id="38300" PostHistoryTypeId="1" PostId="9656" RevisionGUID="9235184c-c8bd-4125-a097-0afe7e2522a8" CreationDate="2023-08-19T14:25:51.240" UserId="3387" Text="Call ink! smart contracts from hardware devices that use embedded rust" ContentLicense="CC BY-SA 4.0" />
  <row Id="38301" PostHistoryTypeId="3" PostId="9656" RevisionGUID="9235184c-c8bd-4125-a097-0afe7e2522a8" CreationDate="2023-08-19T14:25:51.240" UserId="3387" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38302" PostHistoryTypeId="2" PostId="9657" RevisionGUID="7f086121-f52f-49cd-aa21-e4f7fe20419c" CreationDate="2023-08-19T17:00:44.150" UserId="2844" Text="instead of using polkadotjs what I am doing right now is testing contract until [this issue fixed](https://github.com/polkadot-js/api/issues/5698) is using [polkadotjs-app](https://polkadotjs-apps.web.app/#/accounts)" ContentLicense="CC BY-SA 4.0" />
  <row Id="38304" PostHistoryTypeId="2" PostId="9658" RevisionGUID="327e5cd2-eeff-41e6-8b15-5260686f5b54" CreationDate="2023-08-19T20:07:14.117" UserId="1810" Text="There is no hundred parachain limit in polkadot.  We do not know the limits right now because our code still needs many optimizations.&#xD;&#xA;&#xD;&#xA;We've testnets which ran the equivalent of 100 parachains (50% gluttons) on 200 validators, so one parachain per two validators.  I'd expect 500 parachains on kusama's 1000 validators, once we optimize the approval system messages, but real networking conditions could still pose problems of course.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;All distributed systems have a limited validator set size, due to gossip being quadratic.  We've shown kusama works with enough validators to scale by multiple relay chains, ala [OmniLedger by BryanFord, et al][1].  It demands stronger honesty assumptions, which makes the whole decentralization by capitalism business dubious, but it'd gives basically unlimited scalability in theory.  &#xD;&#xA;&#xD;&#xA;As a comparison, cosmos chain have never run with enough validators for OmniLedger style scaling.  ETH runs more than enough validators, but largely duplicates, which breaks the model, and their networking likely breaks assumptions too.&#xD;&#xA;&#xD;&#xA;  [1]: https://eprint.iacr.org/2017/406" ContentLicense="CC BY-SA 4.0" />
  <row Id="38306" PostHistoryTypeId="2" PostId="9659" RevisionGUID="75581b7e-04b8-4275-a25c-3648bfa33c08" CreationDate="2023-08-20T00:40:38.503" UserId="4566" Text="Would it be possible to clear a pallet storage with a call on a live chain ?&#xD;&#xA;&#xD;&#xA;Precisely I would like to remove all contracts and code hash existing on my chain (as sudo)." ContentLicense="CC BY-SA 4.0" />
  <row Id="38308" PostHistoryTypeId="1" PostId="9659" RevisionGUID="75581b7e-04b8-4275-a25c-3648bfa33c08" CreationDate="2023-08-20T00:40:38.503" UserId="4566" Text="How to entirely clear a pallet storage on a living chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38309" PostHistoryTypeId="3" PostId="9659" RevisionGUID="75581b7e-04b8-4275-a25c-3648bfa33c08" CreationDate="2023-08-20T00:40:38.503" UserId="4566" Text="|pallet|runtime|storage|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38310" PostHistoryTypeId="2" PostId="9660" RevisionGUID="909c691e-a2eb-4616-8241-47a87a042da5" CreationDate="2023-08-20T06:44:32.920" UserId="251" Text="It may be challenging to achieve that with a call.&#xD;&#xA;&#xD;&#xA;You will need to send numerous extrinsics to accomplish it.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I suggest performing a runtime upgrade. &#xD;&#xA;&#xD;&#xA;Refer to this link for more information: https://paritytech.github.io/substrate/master/frame_support/storage/migration/fn.clear_storage_prefix.html&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use frame_support::migration;&#xD;&#xA;&#xD;&#xA;migration::clear_storage_prefix(b&quot;module name&quot;, &amp;[], &amp;[], None, None);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If your pallet storage is extensive, it is advisable to review the documentation mentioned above and adjust the values of `None` according to your specific situation." ContentLicense="CC BY-SA 4.0" />
  <row Id="38312" PostHistoryTypeId="2" PostId="9661" RevisionGUID="9676de7b-7730-4b39-b0f1-e15551165aa4" CreationDate="2023-08-20T09:31:41.780" UserId="3" Text="If an extrinsic performs the same storage read twice (e.g. same storage map read with same key), under which conditions is the duplicate DB read optimized away by substrate's storage layer? Where are such guarantees documented?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38314" PostHistoryTypeId="1" PostId="9661" RevisionGUID="9676de7b-7730-4b39-b0f1-e15551165aa4" CreationDate="2023-08-20T09:31:41.780" UserId="3" Text="Preventing Duplicate DB Reads" ContentLicense="CC BY-SA 4.0" />
  <row Id="38315" PostHistoryTypeId="3" PostId="9661" RevisionGUID="9676de7b-7730-4b39-b0f1-e15551165aa4" CreationDate="2023-08-20T09:31:41.780" UserId="3" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38316" PostHistoryTypeId="2" PostId="9662" RevisionGUID="b2e3779f-c866-47f3-bb2f-b0be4fbd4954" CreationDate="2023-08-20T10:02:53.327" UserId="644" Text="I'm launching an author_submitAndWatchExtrinsic and would like to get the Tx Hash as well:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:9,&quot;method&quot;:&quot;author_submitAndWatchExtrinsic&quot;,&quot;params&quot;:[&quot;0x21038400D43593C715FDD31C61141ABD04A99FD6822C8558854CCDE39A5684E7A56DA27D017C79B5352D63C74387DB33D7FBFAEC6B5BB66551A190E890664B779C72AAE307058319F6A24CAC69BB3811BCE04466E692626DCFA40B0DC61A86C92AF8AD0383E5002D1100460600C21E50C0CCF079AC73C784CC5136F3424B562897AFFDBCC102A36CA094DDE3120003003881EB02B007000107009CA6920CAC1BA63D86363617270650000000000000000000000000000000000000000000000000000014616161616100&quot;]}&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;esTxSZq5YkhTEBOD&quot;,&quot;id&quot;:9}&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_extrinsicUpdate&quot;,&quot;params&quot;:{&quot;subscription&quot;:&quot;esTxSZq5YkhTEBOD&quot;,&quot;result&quot;:&quot;ready&quot;}}&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_extrinsicUpdate&quot;,&quot;params&quot;:{&quot;subscription&quot;:&quot;esTxSZq5YkhTEBOD&quot;,&quot;result&quot;:{&quot;broadcast&quot;:[&quot;12D3KooWSP9NzUUABoSZnv4uqXmFyPXbMmsnRRYWgYdhwxtBZ6jd&quot;,&quot;12D3KooWMRAZckcmcTUrVzppAzKaeeyyr2xvqJ7L1Tx5UMDGj5df&quot;,&quot;12D3KooWDo5QVqvXqWcSWDbiAJXNEGvp5kXmGvMikv75raBFxsdp&quot;,&quot;12D3KooWDDjUyuMTYGavby1o5uPUdSJfvdDtzjV6CB8pHYy7BBSZ&quot;,&quot;12D3KooWS3kTgy984oowUbUgJFaQT92Vb9FUuDTJgX2Rmz7Wexut&quot;,&quot;12D3KooWK6sFZNqpK352n94jnXkoG5d9kgEaEMhBTjm8F79FmqpY&quot;,&quot;12D3KooWHZDfziaseXEJ6UrCi45bz1veLNBbB7avtEsUhGkn5MZ3&quot;,&quot;12D3KooWRVMXSpnY4yAXbLhd99wsgvHKosmcFY1HvpsD2AxBDbnh&quot;,&quot;12D3KooWNfADqVKZFtiTDvR4CYF6pro5KVXeBEKYBHh5ohLAHrqk&quot;,&quot;12D3KooWJXFqXJbnwfdSqe83epVHHPx8LRs3ZNMkuq6Cnj7kDfpV&quot;,&quot;12D3KooWQ1RYXWLstTLeNi6iU4ThS8WYo9hhDQyMiDsCci8zREwj&quot;]}}}&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_extrinsicUpdate&quot;,&quot;params&quot;:{&quot;subscription&quot;:&quot;esTxSZq5YkhTEBOD&quot;,&quot;result&quot;:{&quot;inBlock&quot;:&quot;0xa7ddecc6399afee1dd175b273f70f161513e524b50d292c50823e35506591ecc&quot;}}}&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_extrinsicUpdate&quot;,&quot;params&quot;:{&quot;subscription&quot;:&quot;esTxSZq5YkhTEBOD&quot;,&quot;result&quot;:{&quot;finalized&quot;:&quot;0xa7ddecc6399afee1dd175b273f70f161513e524b50d292c50823e35506591ecc&quot;}}}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But from the websocket I can only get this information.  &#xD;&#xA;&#xD;&#xA;I would like to understand how to identify my Tx in the block, because I have to understand if it was executed successfully or not, it's not enough for me to know if it was included in a finalized block.  &#xD;&#xA;  &#xD;&#xA;Is there no way to recover at least the Tx Hash?  " ContentLicense="CC BY-SA 4.0" />
  <row Id="38318" PostHistoryTypeId="1" PostId="9662" RevisionGUID="b2e3779f-c866-47f3-bb2f-b0be4fbd4954" CreationDate="2023-08-20T10:02:53.327" UserId="644" Text="Get Extrinsic Hash from author_submitAndWatchExtrinsic" ContentLicense="CC BY-SA 4.0" />
  <row Id="38319" PostHistoryTypeId="3" PostId="9662" RevisionGUID="b2e3779f-c866-47f3-bb2f-b0be4fbd4954" CreationDate="2023-08-20T10:02:53.327" UserId="644" Text="|extrinsic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38320" PostHistoryTypeId="2" PostId="9663" RevisionGUID="9caf3841-d0fb-436b-b9b9-1eaf5f60df4a" CreationDate="2023-08-20T10:22:21.600" UserId="251" Text="There is a storage overlay in place to improve efficiency. The majority of the service will utilize `System::Number`. Querying the database every time would be inefficient.&#xD;&#xA;&#xD;&#xA;For more information, please refer to the following resources:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/questions/2574/clarity-on-storage-read-write-caching&#xD;&#xA;- https://docs.substrate.io/build/runtime-storage/&#xD;&#xA;- https://www.shawntabrizi.com/assets/presentations/substrate-storage-deep-dive.pdf&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38322" PostHistoryTypeId="5" PostId="9662" RevisionGUID="659913d4-fcf7-4015-8553-ac3280177408" CreationDate="2023-08-20T11:23:35.967" UserId="644" Comment="added 657 characters in body" Text="I'm launching an author_submitAndWatchExtrinsic and would like to get the Tx Hash as well:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:9,&quot;method&quot;:&quot;author_submitAndWatchExtrinsic&quot;,&quot;params&quot;:[&quot;0x21038400D43593C715FDD31C61141ABD04A99FD6822C8558854CCDE39A5684E7A56DA27D017C79B5352D63C74387DB33D7FBFAEC6B5BB66551A190E890664B779C72AAE307058319F6A24CAC69BB3811BCE04466E692626DCFA40B0DC61A86C92AF8AD0383E5002D1100460600C21E50C0CCF079AC73C784CC5136F3424B562897AFFDBCC102A36CA094DDE3120003003881EB02B007000107009CA6920CAC1BA63D86363617270650000000000000000000000000000000000000000000000000000014616161616100&quot;]}&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;esTxSZq5YkhTEBOD&quot;,&quot;id&quot;:9}&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_extrinsicUpdate&quot;,&quot;params&quot;:{&quot;subscription&quot;:&quot;esTxSZq5YkhTEBOD&quot;,&quot;result&quot;:&quot;ready&quot;}}&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_extrinsicUpdate&quot;,&quot;params&quot;:{&quot;subscription&quot;:&quot;esTxSZq5YkhTEBOD&quot;,&quot;result&quot;:{&quot;broadcast&quot;:[&quot;12D3KooWSP9NzUUABoSZnv4uqXmFyPXbMmsnRRYWgYdhwxtBZ6jd&quot;,&quot;12D3KooWMRAZckcmcTUrVzppAzKaeeyyr2xvqJ7L1Tx5UMDGj5df&quot;,&quot;12D3KooWDo5QVqvXqWcSWDbiAJXNEGvp5kXmGvMikv75raBFxsdp&quot;,&quot;12D3KooWDDjUyuMTYGavby1o5uPUdSJfvdDtzjV6CB8pHYy7BBSZ&quot;,&quot;12D3KooWS3kTgy984oowUbUgJFaQT92Vb9FUuDTJgX2Rmz7Wexut&quot;,&quot;12D3KooWK6sFZNqpK352n94jnXkoG5d9kgEaEMhBTjm8F79FmqpY&quot;,&quot;12D3KooWHZDfziaseXEJ6UrCi45bz1veLNBbB7avtEsUhGkn5MZ3&quot;,&quot;12D3KooWRVMXSpnY4yAXbLhd99wsgvHKosmcFY1HvpsD2AxBDbnh&quot;,&quot;12D3KooWNfADqVKZFtiTDvR4CYF6pro5KVXeBEKYBHh5ohLAHrqk&quot;,&quot;12D3KooWJXFqXJbnwfdSqe83epVHHPx8LRs3ZNMkuq6Cnj7kDfpV&quot;,&quot;12D3KooWQ1RYXWLstTLeNi6iU4ThS8WYo9hhDQyMiDsCci8zREwj&quot;]}}}&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_extrinsicUpdate&quot;,&quot;params&quot;:{&quot;subscription&quot;:&quot;esTxSZq5YkhTEBOD&quot;,&quot;result&quot;:{&quot;inBlock&quot;:&quot;0xa7ddecc6399afee1dd175b273f70f161513e524b50d292c50823e35506591ecc&quot;}}}&#xD;&#xA;&#xD;&#xA;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;author_extrinsicUpdate&quot;,&quot;params&quot;:{&quot;subscription&quot;:&quot;esTxSZq5YkhTEBOD&quot;,&quot;result&quot;:{&quot;finalized&quot;:&quot;0xa7ddecc6399afee1dd175b273f70f161513e524b50d292c50823e35506591ecc&quot;}}}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But from the websocket I can only get this information.  &#xD;&#xA;&#xD;&#xA;I would like to understand how to identify my Tx in the block, because I have to understand if it was executed successfully or not, it's not enough for me to know if it was included in a finalized block.  &#xD;&#xA;  &#xD;&#xA;Is there no way to recover at least the Tx Hash?  &#xD;&#xA;&#xD;&#xA;According to documentation https://wiki.polkadot.network/docs/build-protocol-info#unique-identifiers-for-extrinsics&#xD;&#xA;&#xD;&#xA;&gt;The correct way to uniquely identify an extrinsic on a Substrate-based chain is to use the block ID (height or hash) and the extrinsic's index. Substrate defines a block as a header and an array of extrinsics; therefore, an index in the array at a canonical height will always uniquely identify a transaction. This methodology is reflected in the Substrate codebase itself, for example to reference a previous transaction from the Multisig pallet.&#xD;&#xA;&#xD;&#xA;But in this case how to identify the Index of my extrinsic the in finalized block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38323" PostHistoryTypeId="50" PostId="9364" RevisionGUID="75e70f5c-ce37-4885-ae73-d02aaaeae7a4" CreationDate="2023-08-20T16:03:40.417" UserId="-1" />
  <row Id="38324" PostHistoryTypeId="5" PostId="82" RevisionGUID="406a707f-d58d-40b4-8ca6-0767543a4632" CreationDate="2023-08-20T16:16:06.207" UserId="83" Comment="typo" Text="The Rust binary you have was compiled for an amd64 (x86_64) architecture and needs the linked library. The image you are running on the Mac M1 ARM is likely the arm64v8 image and so doesn't have libraries for amd64. Since Docker for Mac sets up qemu emulation, you can likely use the amd64 image by adding the --platform flag on docker pull and docker run.&#xD;&#xA;&#xD;&#xA;That said, emulation over amd64 will be very slow and less than ideal. You are best using an arm64 image. I have personally used an ubuntu [image][1] successfully&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://hub.docker.com/r/arm64v8/ubuntu/" ContentLicense="CC BY-SA 4.0" />
  <row Id="38325" PostHistoryTypeId="2" PostId="9664" RevisionGUID="598b262b-a388-4b51-b85a-64027413453c" CreationDate="2023-08-20T16:33:55.040" UserId="3414" Text="I am having a setup of relay chain and two parachains are connected to it, I was running some test cases and during that i encounter an error&#xD;&#xA;&#xD;&#xA;    thread 'test::collection_transfer_fails_for_nonexistent_collection' panicked at 'assertion failed: `(left == right)`&#xD;&#xA;      left: `Err(Module(ModuleError { index: 7, error: [2, 0, 0, 0], message: Some(&quot;NoSuchCollectionId&quot;) }))`,&#xD;&#xA;     right: `Err(Module(ModuleError { index: 6, error: [2, 0, 0, 0], message: Some(&quot;NoSuchCollectionId&quot;) }))`',&#xD;&#xA;&#xD;&#xA;Here message is same on left and right side but the test fails due to difference in index.Could anyone help me in solving this issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="38327" PostHistoryTypeId="1" PostId="9664" RevisionGUID="598b262b-a388-4b51-b85a-64027413453c" CreationDate="2023-08-20T16:33:55.040" UserId="3414" Text="panicked at 'assertion failed: `(left == right)`" ContentLicense="CC BY-SA 4.0" />
  <row Id="38328" PostHistoryTypeId="3" PostId="9664" RevisionGUID="598b262b-a388-4b51-b85a-64027413453c" CreationDate="2023-08-20T16:33:55.040" UserId="3414" Text="|polkadot|rust|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38329" PostHistoryTypeId="52" PostId="9661" RevisionGUID="f7a468f4-e1c7-4604-a80f-059686dac6ea" CreationDate="2023-08-20T17:35:29.713" />
  <row Id="38330" PostHistoryTypeId="50" PostId="5543" RevisionGUID="b99e4896-6a93-4b81-830b-bae211a4a91a" CreationDate="2023-08-21T00:07:35.853" UserId="-1" />
  <row Id="38331" PostHistoryTypeId="2" PostId="9665" RevisionGUID="abae6377-3721-4b1b-8781-b700f28e1a8d" CreationDate="2023-08-21T00:25:45.650" UserId="83" Text="I am using a new Apple M2 laptop for Substrate development but I cannot install Substrate on it. If I follow the instructions at https://docs.substrate.io/install/macos/ it says I can install Rust and set up a Substrate development environment on Apple macOS computers with either Intel or an Apple M1 processor.&#xD;&#xA;&#xD;&#xA;I have otherwise verified that the laptop meets the basic requirements. It is running:&#xD;&#xA;* `sysctl -n machdep.cpu.brand_string` outputs `Apple M2 Max`&#xD;&#xA;* `/usr/bin/arch` outputs `arm64`&#xD;&#xA;* macOS 13.4 &#xD;&#xA;* 12 CPU cores, 30 GPU cores (CPU usage &lt;10%)&#xD;&#xA;* 64 GB RAM (at least 20 GB RAM is free)&#xD;&#xA;* 1.8 TB available space&#xD;&#xA;&#xD;&#xA;I run the following:&#xD;&#xA;&#xD;&#xA;* `brew update &amp;&amp; brew --version` it outputs `Homebrew 4.1.5`&#xD;&#xA;* `brew install protobuf openssl make`&#xD;&#xA;&#xD;&#xA;Then I checked if Rosetta 2 was running by checking if running the command `pgrep oahd` output a process id, which it did.&#xD;&#xA;&#xD;&#xA;But I ran the command `softwareupdate --install-rosetta --agree-to-license` to install Rosetta 2 again anyway, and it output:&#xD;&#xA;```bash&#xD;&#xA;023-08-21 00:21:21.246 softwareupdate[52504:6762410] Package Authoring Error: 032-84877: Package reference com.apple.pkg.RosettaUpdateAuto is missing installKBytes attribute&#xD;&#xA;Install of Rosetta 2 finished successfully&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I followed the instructions [here][1] to install Substrate using Docker with the latest Docker Desktop version 4.22.0 (117440) installed and running. I clone the Substrate repository as follows, and ran the script to install Substrate within a Docker container, where the latest Substrate commit was 94be94be6d26becd2395b58ae09ca31f596afe7d&#xD;&#xA;```bash&#xD;&#xA;git clone https://github.com/paritytech/substrate&#xD;&#xA;cd substrate&#xD;&#xA;./docker/build.sh&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it outputs the following error:&#xD;&#xA;```bash&#xD;&#xA;Building parity/substrate:latest docker image, hang on!&#xD;&#xA;[+] Building 2602.6s (14/15)                                                                                                              docker:desktop-linux&#xD;&#xA; =&gt; [internal] load build definition from substrate_builder.Dockerfile                                                                                    0.0s&#xD;&#xA; =&gt; =&gt; transferring dockerfile: 1.88kB                                                                                                                    0.0s&#xD;&#xA; =&gt; [internal] load .dockerignore                                                                                                                         0.0s&#xD;&#xA; =&gt; =&gt; transferring context: 136B                                                                                                                         0.0s&#xD;&#xA; =&gt; [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                           5.0s&#xD;&#xA; =&gt; [internal] load metadata for docker.io/paritytech/ci-linux:production                                                                                 3.1s&#xD;&#xA; =&gt; [builder 1/4] FROM docker.io/paritytech/ci-linux:production@sha256:dc9abf9e877c5bad94828245406dac8a186530e1ad6a1b5f2072e5e19e1f64b4                   0.0s&#xD;&#xA; =&gt; CACHED [stage-1 1/6] FROM docker.io/library/ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba                      0.0s&#xD;&#xA; =&gt; [internal] load build context                                                                                                                         0.6s&#xD;&#xA; =&gt; =&gt; transferring context: 46.95MB                                                                                                                      0.6s&#xD;&#xA; =&gt; CACHED [builder 2/4] WORKDIR /substrate                                                                                                               0.0s&#xD;&#xA; =&gt; CACHED [builder 3/4] COPY . /substrate                                                                                                                0.0s&#xD;&#xA; =&gt; CACHED [builder 4/4] RUN cargo build --locked --release                                                                                               0.0s&#xD;&#xA; =&gt; CACHED [stage-1 2/6] COPY --from=builder /substrate/target/release/substrate /usr/local/bin                                                           0.0s&#xD;&#xA; =&gt; ERROR [stage-1 3/6] COPY --from=builder /substrate/target/release/subkey /usr/local/bin                                                               0.0s&#xD;&#xA; =&gt; ERROR [stage-1 4/6] COPY --from=builder /substrate/target/release/node-template /usr/local/bin                                                        0.0s&#xD;&#xA; =&gt; ERROR [stage-1 5/6] COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin                                                   0.0s&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 3/6] COPY --from=builder /substrate/target/release/subkey /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 4/6] COPY --from=builder /substrate/target/release/node-template /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 5/6] COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;substrate_builder.Dockerfile:21&#xD;&#xA;--------------------&#xD;&#xA;  19 |     COPY --from=builder /substrate/target/release/subkey /usr/local/bin&#xD;&#xA;  20 |     COPY --from=builder /substrate/target/release/node-template /usr/local/bin&#xD;&#xA;  21 | &gt;&gt;&gt; COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin&#xD;&#xA;  22 |&#xD;&#xA;  23 |     RUN useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate &amp;&amp; \&#xD;&#xA;--------------------&#xD;&#xA;ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 4b02f120-ba24-4d54-b2be-a38dc6dce883::kor4q7o2o99zc2mscfob9bp7v: &quot;/substrate/target/release/chain-spec-builder&quot;: not found&#xD;&#xA;&#xD;&#xA;real	43m22.870s&#xD;&#xA;user	0m4.775s&#xD;&#xA;sys	0m4.250s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So I then decided to run iTerm2 using Rosetta 2, by following the steps suggested [here][2], as listed below:&#xD;&#xA;* Finder &gt; Applications and found iTerm.app (alternative to Terminal app)&#xD;&#xA;* Right-clicked iTerm.app and selected &quot;Duplicate&quot;&#xD;&#xA;* Rename the duplicate to &quot;iTerm x86_64&quot;&#xD;&#xA;* Right-clicked &quot;iTerm x86_64.app&quot; &gt; Get Info &gt; Enabled checkbox called &quot;Open using Rosetta&quot;.&#xD;&#xA;* Double-clicked &quot;iTerm x86_64.app&quot; to open the Rosetta terminal instead of the native `arm64` terminal, typed `arch` and it output `i386` (i was expecting it to output `x86_64` instead)&#xD;&#xA;* Right-clicked &quot;iTerm x86_64.app&quot; in the Dock and clicked &quot;Keep in Dock&quot;&#xD;&#xA;* Changed to the same directory where Substrate had been cloned and ran:&#xD;&#xA;```bash&#xD;&#xA;./docker/build.sh&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It was outputting:&#xD;&#xA;```bash&#xD;&#xA;...&#xD;&#xA;=&gt; =&gt; # &lt;jemalloc&gt;: MADV_DONTNEED does not work (memset will be used instead)&#xD;&#xA;=&gt; =&gt; # &lt;jemalloc&gt;: (This is the expected behaviour if you are running under QEMU)&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And it output the following error:&#xD;&#xA;```bash&#xD;&#xA;Building parity/substrate:latest docker image, hang on!&#xD;&#xA;[+] Building 4493.6s (14/15)                                                                                        docker:desktop-linux&#xD;&#xA; =&gt; [internal] load .dockerignore                                                                                                   0.0s&#xD;&#xA; =&gt; =&gt; transferring context: 136B                                                                                                   0.0s&#xD;&#xA; =&gt; [internal] load build definition from substrate_builder.Dockerfile                                                              0.0s&#xD;&#xA; =&gt; =&gt; transferring dockerfile: 1.88kB                                                                                              0.0s&#xD;&#xA; =&gt; [internal] load metadata for docker.io/library/ubuntu:20.04                                                                     4.5s&#xD;&#xA; =&gt; [internal] load metadata for docker.io/paritytech/ci-linux:production                                                           2.5s&#xD;&#xA; =&gt; [builder 1/4] FROM docker.io/paritytech/ci-linux:production@sha256:dc9abf9e877c5bad94828245406dac8a186530e1ad6a1b5f2072e5e19e1  0.0s&#xD;&#xA; =&gt; [internal] load build context                                                                                                   0.1s&#xD;&#xA; =&gt; =&gt; transferring context: 322.12kB                                                                                               0.1s&#xD;&#xA; =&gt; CACHED [stage-1 1/6] FROM docker.io/library/ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2fa  0.0s&#xD;&#xA; =&gt; CACHED [builder 2/4] WORKDIR /substrate                                                                                         0.0s&#xD;&#xA; =&gt; CACHED [builder 3/4] COPY . /substrate                                                                                          0.0s&#xD;&#xA; =&gt; [builder 4/4] RUN cargo build --locked --release                                                                             4488.6s&#xD;&#xA; =&gt; CACHED [stage-1 2/6] COPY --from=builder /substrate/target/release/substrate /usr/local/bin                                     0.0s&#xD;&#xA; =&gt; ERROR [stage-1 3/6] COPY --from=builder /substrate/target/release/subkey /usr/local/bin                                         0.0s&#xD;&#xA; =&gt; ERROR [stage-1 4/6] COPY --from=builder /substrate/target/release/node-template /usr/local/bin                                  0.0s&#xD;&#xA; =&gt; ERROR [stage-1 5/6] COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin                             0.0s&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 3/6] COPY --from=builder /substrate/target/release/subkey /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 4/6] COPY --from=builder /substrate/target/release/node-template /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 5/6] COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;substrate_builder.Dockerfile:21&#xD;&#xA;--------------------&#xD;&#xA;  19 |     COPY --from=builder /substrate/target/release/subkey /usr/local/bin&#xD;&#xA;  20 |     COPY --from=builder /substrate/target/release/node-template /usr/local/bin&#xD;&#xA;  21 | &gt;&gt;&gt; COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin&#xD;&#xA;  22 |&#xD;&#xA;  23 |     RUN useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate &amp;&amp; \&#xD;&#xA;--------------------&#xD;&#xA;ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 4b02f120-ba24-4d54-b2be-a38dc6dce883::kor4q7o2o99zc2mscfob9bp7v: &quot;/substrate/target/release/chain-spec-builder&quot;: not found&#xD;&#xA;&#xD;&#xA;real	74m53.824s&#xD;&#xA;user	0m10.714s&#xD;&#xA;sys	0m9.167s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate#getting-started&#xD;&#xA;  [2]: https://apple.stackexchange.com/a/428769/163511" ContentLicense="CC BY-SA 4.0" />
  <row Id="38333" PostHistoryTypeId="1" PostId="9665" RevisionGUID="abae6377-3721-4b1b-8781-b700f28e1a8d" CreationDate="2023-08-21T00:25:45.650" UserId="83" Text="How to install Substrate using Docker on an Apple M2 chip?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38334" PostHistoryTypeId="3" PostId="9665" RevisionGUID="abae6377-3721-4b1b-8781-b700f28e1a8d" CreationDate="2023-08-21T00:25:45.650" UserId="83" Text="|substrate-node-template|macbook|m2|apple|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38335" PostHistoryTypeId="5" PostId="9665" RevisionGUID="1e69fe07-8aaf-4939-9b5c-a4c46293a972" CreationDate="2023-08-21T05:58:09.443" UserId="83" Comment="updates" Text="I am using a new Apple M2 laptop for Substrate development but I cannot install Substrate on it. If I follow the instructions at https://docs.substrate.io/install/macos/ it says I can install Rust and set up a Substrate development environment on Apple macOS computers with either Intel or an Apple M1 processor.&#xD;&#xA;&#xD;&#xA;I have otherwise verified that the laptop meets the basic requirements. It is running:&#xD;&#xA;* `sysctl -n machdep.cpu.brand_string` outputs `Apple M2 Max`&#xD;&#xA;* `/usr/bin/arch` outputs `arm64`&#xD;&#xA;* macOS 13.4 &#xD;&#xA;* 12 CPU cores, 30 GPU cores (CPU usage &lt;10%)&#xD;&#xA;* 64 GB RAM (at least 20 GB RAM is free)&#xD;&#xA;* 1.8 TB available space&#xD;&#xA;&#xD;&#xA;I run the following:&#xD;&#xA;&#xD;&#xA;* `brew update &amp;&amp; brew --version` it outputs `Homebrew 4.1.5`&#xD;&#xA;* `brew install protobuf openssl make`&#xD;&#xA;&#xD;&#xA;Then I checked if Rosetta 2 was running by checking if running the command `pgrep oahd` output a process id, which it did.&#xD;&#xA;&#xD;&#xA;But I ran the command `softwareupdate --install-rosetta --agree-to-license` to install Rosetta 2 again anyway, and it output:&#xD;&#xA;```bash&#xD;&#xA;023-08-21 00:21:21.246 softwareupdate[52504:6762410] Package Authoring Error: 032-84877: Package reference com.apple.pkg.RosettaUpdateAuto is missing installKBytes attribute&#xD;&#xA;Install of Rosetta 2 finished successfully&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then I followed the instructions [here][1] to install Substrate using Docker with the latest Docker Desktop version 4.22.0 (117440) installed and running. I clone the Substrate repository as follows, and ran the script to install Substrate within a Docker container, where the latest Substrate commit was 94be94be6d26becd2395b58ae09ca31f596afe7d&#xD;&#xA;```bash&#xD;&#xA;git clone https://github.com/paritytech/substrate&#xD;&#xA;cd substrate&#xD;&#xA;./docker/build.sh&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it outputs the following error:&#xD;&#xA;```bash&#xD;&#xA;Building parity/substrate:latest docker image, hang on!&#xD;&#xA;[+] Building 2602.6s (14/15)                                                                                                              docker:desktop-linux&#xD;&#xA; =&gt; [internal] load build definition from substrate_builder.Dockerfile                                                                                    0.0s&#xD;&#xA; =&gt; =&gt; transferring dockerfile: 1.88kB                                                                                                                    0.0s&#xD;&#xA; =&gt; [internal] load .dockerignore                                                                                                                         0.0s&#xD;&#xA; =&gt; =&gt; transferring context: 136B                                                                                                                         0.0s&#xD;&#xA; =&gt; [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                           5.0s&#xD;&#xA; =&gt; [internal] load metadata for docker.io/paritytech/ci-linux:production                                                                                 3.1s&#xD;&#xA; =&gt; [builder 1/4] FROM docker.io/paritytech/ci-linux:production@sha256:dc9abf9e877c5bad94828245406dac8a186530e1ad6a1b5f2072e5e19e1f64b4                   0.0s&#xD;&#xA; =&gt; CACHED [stage-1 1/6] FROM docker.io/library/ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba                      0.0s&#xD;&#xA; =&gt; [internal] load build context                                                                                                                         0.6s&#xD;&#xA; =&gt; =&gt; transferring context: 46.95MB                                                                                                                      0.6s&#xD;&#xA; =&gt; CACHED [builder 2/4] WORKDIR /substrate                                                                                                               0.0s&#xD;&#xA; =&gt; CACHED [builder 3/4] COPY . /substrate                                                                                                                0.0s&#xD;&#xA; =&gt; CACHED [builder 4/4] RUN cargo build --locked --release                                                                                               0.0s&#xD;&#xA; =&gt; CACHED [stage-1 2/6] COPY --from=builder /substrate/target/release/substrate /usr/local/bin                                                           0.0s&#xD;&#xA; =&gt; ERROR [stage-1 3/6] COPY --from=builder /substrate/target/release/subkey /usr/local/bin                                                               0.0s&#xD;&#xA; =&gt; ERROR [stage-1 4/6] COPY --from=builder /substrate/target/release/node-template /usr/local/bin                                                        0.0s&#xD;&#xA; =&gt; ERROR [stage-1 5/6] COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin                                                   0.0s&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 3/6] COPY --from=builder /substrate/target/release/subkey /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 4/6] COPY --from=builder /substrate/target/release/node-template /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 5/6] COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;substrate_builder.Dockerfile:21&#xD;&#xA;--------------------&#xD;&#xA;  19 |     COPY --from=builder /substrate/target/release/subkey /usr/local/bin&#xD;&#xA;  20 |     COPY --from=builder /substrate/target/release/node-template /usr/local/bin&#xD;&#xA;  21 | &gt;&gt;&gt; COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin&#xD;&#xA;  22 |&#xD;&#xA;  23 |     RUN useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate &amp;&amp; \&#xD;&#xA;--------------------&#xD;&#xA;ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 4b02f120-ba24-4d54-b2be-a38dc6dce883::kor4q7o2o99zc2mscfob9bp7v: &quot;/substrate/target/release/chain-spec-builder&quot;: not found&#xD;&#xA;&#xD;&#xA;real	43m22.870s&#xD;&#xA;user	0m4.775s&#xD;&#xA;sys	0m4.250s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So I then decided to run iTerm2 using Rosetta 2, by following the steps suggested [here][2], as listed below:&#xD;&#xA;* Finder &gt; Applications and found iTerm.app (alternative to Terminal app)&#xD;&#xA;* Right-clicked iTerm.app and selected &quot;Duplicate&quot;&#xD;&#xA;* Rename the duplicate to &quot;iTerm x86_64&quot;&#xD;&#xA;* Right-clicked &quot;iTerm x86_64.app&quot; &gt; Get Info &gt; Enabled checkbox called &quot;Open using Rosetta&quot;.&#xD;&#xA;* Double-clicked &quot;iTerm x86_64.app&quot; to open the Rosetta terminal instead of the native `arm64` terminal, typed `arch` and it output `i386` (i was expecting it to output `x86_64` instead)&#xD;&#xA;* Right-clicked &quot;iTerm x86_64.app&quot; in the Dock and clicked &quot;Keep in Dock&quot;&#xD;&#xA;* Changed to the same directory where Substrate had been cloned and ran:&#xD;&#xA;```bash&#xD;&#xA;./docker/build.sh&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It was outputting:&#xD;&#xA;```bash&#xD;&#xA;...&#xD;&#xA;=&gt; =&gt; # &lt;jemalloc&gt;: MADV_DONTNEED does not work (memset will be used instead)&#xD;&#xA;=&gt; =&gt; # &lt;jemalloc&gt;: (This is the expected behaviour if you are running under QEMU)&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And it output the following error:&#xD;&#xA;```bash&#xD;&#xA;Building parity/substrate:latest docker image, hang on!&#xD;&#xA;[+] Building 4493.6s (14/15)                                                                                        docker:desktop-linux&#xD;&#xA; =&gt; [internal] load .dockerignore                                                                                                   0.0s&#xD;&#xA; =&gt; =&gt; transferring context: 136B                                                                                                   0.0s&#xD;&#xA; =&gt; [internal] load build definition from substrate_builder.Dockerfile                                                              0.0s&#xD;&#xA; =&gt; =&gt; transferring dockerfile: 1.88kB                                                                                              0.0s&#xD;&#xA; =&gt; [internal] load metadata for docker.io/library/ubuntu:20.04                                                                     4.5s&#xD;&#xA; =&gt; [internal] load metadata for docker.io/paritytech/ci-linux:production                                                           2.5s&#xD;&#xA; =&gt; [builder 1/4] FROM docker.io/paritytech/ci-linux:production@sha256:dc9abf9e877c5bad94828245406dac8a186530e1ad6a1b5f2072e5e19e1  0.0s&#xD;&#xA; =&gt; [internal] load build context                                                                                                   0.1s&#xD;&#xA; =&gt; =&gt; transferring context: 322.12kB                                                                                               0.1s&#xD;&#xA; =&gt; CACHED [stage-1 1/6] FROM docker.io/library/ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2fa  0.0s&#xD;&#xA; =&gt; CACHED [builder 2/4] WORKDIR /substrate                                                                                         0.0s&#xD;&#xA; =&gt; CACHED [builder 3/4] COPY . /substrate                                                                                          0.0s&#xD;&#xA; =&gt; [builder 4/4] RUN cargo build --locked --release                                                                             4488.6s&#xD;&#xA; =&gt; CACHED [stage-1 2/6] COPY --from=builder /substrate/target/release/substrate /usr/local/bin                                     0.0s&#xD;&#xA; =&gt; ERROR [stage-1 3/6] COPY --from=builder /substrate/target/release/subkey /usr/local/bin                                         0.0s&#xD;&#xA; =&gt; ERROR [stage-1 4/6] COPY --from=builder /substrate/target/release/node-template /usr/local/bin                                  0.0s&#xD;&#xA; =&gt; ERROR [stage-1 5/6] COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin                             0.0s&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 3/6] COPY --from=builder /substrate/target/release/subkey /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 4/6] COPY --from=builder /substrate/target/release/node-template /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;------&#xD;&#xA; &gt; [stage-1 5/6] COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin:&#xD;&#xA;------&#xD;&#xA;substrate_builder.Dockerfile:21&#xD;&#xA;--------------------&#xD;&#xA;  19 |     COPY --from=builder /substrate/target/release/subkey /usr/local/bin&#xD;&#xA;  20 |     COPY --from=builder /substrate/target/release/node-template /usr/local/bin&#xD;&#xA;  21 | &gt;&gt;&gt; COPY --from=builder /substrate/target/release/chain-spec-builder /usr/local/bin&#xD;&#xA;  22 |&#xD;&#xA;  23 |     RUN useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate &amp;&amp; \&#xD;&#xA;--------------------&#xD;&#xA;ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 4b02f120-ba24-4d54-b2be-a38dc6dce883::kor4q7o2o99zc2mscfob9bp7v: &quot;/substrate/target/release/chain-spec-builder&quot;: not found&#xD;&#xA;&#xD;&#xA;real	74m53.824s&#xD;&#xA;user	0m10.714s&#xD;&#xA;sys	0m9.167s&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;* I tried following the suggestion mentioned [here][3] of adding the option `--platform linux/arm64` [here][4] when running `docker build` and `docker run` but i got the same error.&#xD;&#xA;* I also tried a custom Docker build [here][5] where I pull from [arm64v8/ubuntu][6] instead of ubuntu:23.04, but I got the same error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate#getting-started&#xD;&#xA;  [2]: https://apple.stackexchange.com/a/428769/163511&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/82/83&#xD;&#xA;  [4]: https://github.com/paritytech/substrate/blob/master/docker/build.sh#L16&#xD;&#xA;  [5]: https://github.com/ltfschoen/substrate/pull/3&#xD;&#xA;  [6]: https://hub.docker.com/r/arm64v8/ubuntu/" ContentLicense="CC BY-SA 4.0" />
  <row Id="38336" PostHistoryTypeId="2" PostId="9666" RevisionGUID="09afdebb-6bd0-497f-961a-a83953c3340e" CreationDate="2023-08-21T07:48:42.980" UserId="2762" Text="The index number is the index of the pallet in the runtime from which the error originated. So it looks like you are expecting the error `NoSuchCollectionId` from the pallet with index 7 and you are getting the `NoSuchCollectionId` from the pallet with index 6.&#xD;&#xA;&#xD;&#xA;If you go to your Runtime file you can see which pallets have this index, for example in the substrate-pallet-template the pallet_balances has the index 10 and  the pallet sudo the 15, [see the code][1].&#xD;&#xA;&#xD;&#xA;In your test you can check if you are receiving an error from another pallet, an example is in the Bounty pallet [See the code][2]:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;type TreasuryError = pallet_treasury::Error&lt;Test&gt;;&#xD;&#xA;&#xD;&#xA;assert_noop!(&#xD;&#xA;			{&#xD;&#xA;				#[allow(deprecated)]&#xD;&#xA;				Treasury::propose_spend(RuntimeOrigin::signed(2), 100, 3)&#xD;&#xA;			},&#xD;&#xA;			TreasuryError::InsufficientProposersBalance,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/runtime/src/lib.rs#L467&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/bounties/src/tests.rs#L260" ContentLicense="CC BY-SA 4.0" />
  <row Id="38338" PostHistoryTypeId="2" PostId="9667" RevisionGUID="86e7b78a-b83a-46af-9c3c-6c93d807d5a8" CreationDate="2023-08-21T08:11:34.560" UserId="567" Text="Have a look at `subxt` (submit extrinsics to a substrate node via RPC using only Rust) There is some extended test that you can reuse to call contracts:&#xD;&#xA;Have a look [HERE](https://github.com/paritytech/subxt/blob/9d0041b49dc3dd1810cb2b55c8b14c87435e2d5d/testing/integration-tests/src/full_client/frame/contracts.rs#L36)" ContentLicense="CC BY-SA 4.0" />
  <row Id="38343" PostHistoryTypeId="2" PostId="9669" RevisionGUID="53140ab8-3793-4227-ae81-ab951d4e76f8" CreationDate="2023-08-21T08:40:20.907" UserId="2762" Text="In Substrate-based chains like Polkadot, a transaction's hash only serves as a fingerprint of the information within a transaction, **is not unique**, and there are times when two transactions with the same hash are both valid. See an example here: [Why could we find the same transaction hash in 3 different blocks?][1].&#xD;&#xA;&#xD;&#xA;With the `author_submitAndWatchExtrinsic` you get the hash of the block when is finalised and with that you can query the block and comparing it with your extrinsic hash you can construct your extrinsic ID: block ID (height or hash) and the extrinsic's index.&#xD;&#xA;&#xD;&#xA;You can see a code snippet of how to do it in Polkadot JS and a bit more detailed explanation about extrinsic IDs here: [Best practices for generating and monitoring transactions][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2536/why-could-we-find-the-same-transaction-hash-in-3-different-blocks/2538#2538&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/6869/best-practices-for-generating-and-monitoring-transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="38345" PostHistoryTypeId="2" PostId="9670" RevisionGUID="ee11ad37-a7ea-4f41-adc1-cba5c051b58e" CreationDate="2023-08-21T08:52:20.943" UserId="4570" Text="Is there some way to change the logging library or at least the logging format? I need a way of having the logs output in JSON format.&#xD;&#xA;&#xD;&#xA;What I tried:&#xD;&#xA;Installed the `tracing-subscriber` pallet with json feature and inside `node/src/main.rs` added the initialization, but it clashes with the built-in logger.&#xD;&#xA;Then I tried disabling it on `sp-api` with feature `disable-logging` but it stills crashes on node start.&#xD;&#xA;&#xD;&#xA;Any helpful idea or insight?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38347" PostHistoryTypeId="1" PostId="9670" RevisionGUID="ee11ad37-a7ea-4f41-adc1-cba5c051b58e" CreationDate="2023-08-21T08:52:20.943" UserId="4570" Text="Substrate - Change logging library" ContentLicense="CC BY-SA 4.0" />
  <row Id="38348" PostHistoryTypeId="3" PostId="9670" RevisionGUID="ee11ad37-a7ea-4f41-adc1-cba5c051b58e" CreationDate="2023-08-21T08:52:20.943" UserId="4570" Text="|substrate-node-template|substrate-node|logging|json|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38349" PostHistoryTypeId="2" PostId="9671" RevisionGUID="cf4e7850-6374-4313-bb5b-fa09d413c10f" CreationDate="2023-08-21T09:04:25.623" UserId="2762" Text="If you only want to mock this communications to test your instructions take a look at the [XCM docs examples][1].&#xD;&#xA;It has an example of how to mock a [Relay Chain runtime][2] and a [parachain Runtime][3], and it uses the [XCM Simulator][4] to setup the environment for testing.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain};&#xD;&#xA;&#xD;&#xA;decl_test_parachain! {&#xD;&#xA;	pub struct ParaA {&#xD;&#xA;		Runtime = parachain::Runtime,&#xD;&#xA;		XcmpMessageHandler = parachain::MsgQueue,&#xD;&#xA;		DmpMessageHandler = parachain::MsgQueue,&#xD;&#xA;		new_ext = para_ext(1),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;decl_test_parachain! {&#xD;&#xA;	pub struct ParaB {&#xD;&#xA;		Runtime = parachain::Runtime,&#xD;&#xA;		XcmpMessageHandler = parachain::MsgQueue,&#xD;&#xA;		DmpMessageHandler = parachain::MsgQueue,&#xD;&#xA;		new_ext = para_ext(2),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;decl_test_parachain! {&#xD;&#xA;	pub struct ParaC {&#xD;&#xA;		Runtime = parachain::Runtime,&#xD;&#xA;		XcmpMessageHandler = parachain::MsgQueue,&#xD;&#xA;		DmpMessageHandler = parachain::MsgQueue,&#xD;&#xA;		new_ext = para_ext(2),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;decl_test_relay_chain! {&#xD;&#xA;	pub struct Relay {&#xD;&#xA;		Runtime = relay_chain::Runtime,&#xD;&#xA;		XcmConfig = relay_chain::XcmConfig,&#xD;&#xA;		new_ext = relay_ext(),&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;decl_test_network! {&#xD;&#xA;	pub struct MockNet {&#xD;&#xA;		relay_chain = Relay,&#xD;&#xA;		parachains = vec![&#xD;&#xA;			(1, ParaA),&#xD;&#xA;			(2, ParaB),&#xD;&#xA;			(3, ParaC),&#xD;&#xA;		],&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/xcm-docs/tree/main/examples&#xD;&#xA;  [2]: https://github.com/paritytech/xcm-docs/blob/main/examples/src/simple_test_net/relay_chain.rs&#xD;&#xA;  [3]: https://github.com/paritytech/xcm-docs/blob/main/examples/src/simple_test_net/parachain.rs&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/tree/master/xcm/xcm-simulator" ContentLicense="CC BY-SA 4.0" />
  <row Id="38351" PostHistoryTypeId="2" PostId="9672" RevisionGUID="3dc862d9-efd0-432c-88a2-eae8a4a1e30b" CreationDate="2023-08-21T09:35:24.877" UserId="3395" Text="I'm working with a StorageMap and want to return a dynamic default value based on the queried key when the key isn't found. Here's my attempt:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn asset)]&#xD;&#xA;pub(super) type Asset&lt;T: Config&gt; =&#xD;&#xA;    StorageMap&lt;_, Blake2_128Concat, U256, T::AccountId, ValueQuery, GetDefault&lt;T::AccountId&gt;&gt;;&#xD;&#xA;&#xD;&#xA;pub struct GetDefault&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;AccountId&gt; Get&lt;AccountId&gt; for GetDefault&lt;AccountId&gt; {&#xD;&#xA;    fn get() -&gt; AccountId {&#xD;&#xA;        // logic to derive dynamic default value based on asset_id&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Is there a way to achieve this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38353" PostHistoryTypeId="1" PostId="9672" RevisionGUID="3dc862d9-efd0-432c-88a2-eae8a4a1e30b" CreationDate="2023-08-21T09:35:24.877" UserId="3395" Text="Returning dynamic default values from StorageMap" ContentLicense="CC BY-SA 4.0" />
  <row Id="38354" PostHistoryTypeId="3" PostId="9672" RevisionGUID="3dc862d9-efd0-432c-88a2-eae8a4a1e30b" CreationDate="2023-08-21T09:35:24.877" UserId="3395" Text="|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38355" PostHistoryTypeId="2" PostId="9673" RevisionGUID="ab35ae55-2611-48de-9826-87ca896203a7" CreationDate="2023-08-21T09:35:44.147" UserId="94" Text="This is using the `decl_*` macro syntax. It is out-dated and got recently removed from the Substrate code base after 6 months grace period.&#xD;&#xA;&#xD;&#xA;We added a bunch of example pallets that show of the new syntax [here](https://github.com/paritytech/substrate/blob/ec3bedd5c8cd0caa77a312b53a3cf3306149276c/frame/examples/basic/src/lib.rs#L355) and can help you get started with it." ContentLicense="CC BY-SA 4.0" />
  <row Id="38357" PostHistoryTypeId="2" PostId="9674" RevisionGUID="4726bf3b-b220-477f-9d1b-cc1f178e9283" CreationDate="2023-08-21T09:38:26.610" UserId="94" Text="`fork-off-substrate` does not work for large chain state indeed.  &#xD;&#xA;&#xD;&#xA;The try-runtime CLI got moved into its own repo [try-runtime-cli](https://github.com/paritytech/try-runtime-cli) with documentation linked [here](https://paritytech.github.io/try-runtime-cli/try_runtime/).  &#xD;&#xA;We use this regularly in CI and it works well for Polkadot and Kusama. For very large states &gt;10GB it will need some adaptions, so it depends on how large your state currently is." ContentLicense="CC BY-SA 4.0" />
  <row Id="38359" PostHistoryTypeId="2" PostId="9675" RevisionGUID="c891a9c0-8011-4265-9b9a-5305a9ae16cc" CreationDate="2023-08-21T09:50:24.927" UserId="94" Text="The FRAME syntax does not allow for this directly since the key is not passed to the `Get` default impl.  &#xD;&#xA;&#xD;&#xA;One way to achieve this would be to use an `OptionQuery` and create a custom getter function like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type Asset&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Blake2_128Concat, U256, T::AccountId, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;fn asset&lt;T: Config&gt;(key: U256) -&gt; &lt;T as frame_system::Config&gt;::AccountId {&#xD;&#xA;	Asset::&lt;T&gt;::get(key).unwrap_or_else(|| {&#xD;&#xA;		todo!(&quot;Custom default logic goes here&quot;)&#xD;&#xA;	})&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This replaces the auto-generated `asset` getter that you formerly created with  &#xD;&#xA;`#[pallet::getter(fn asset)]` and offers a custom default per key." ContentLicense="CC BY-SA 4.0" />
  <row Id="38361" PostHistoryTypeId="2" PostId="9676" RevisionGUID="0a70d262-dbcb-4a08-9e77-2edd3203eedb" CreationDate="2023-08-21T10:05:42.610" UserId="3861" Text="my implementation wont let me batch more than 4 transfers. Whats wrong with it?&#xD;&#xA;&#xD;&#xA;I know it is a bit complex but i has to be in this way. I am suprised that it wont work for more than 4 transfers. Its a bit odd to me tbh. &#xD;&#xA;&#xD;&#xA;Can someone please help me asap? Thanks.&#xD;&#xA;&#xD;&#xA;Error i am getting : ```1010: Invalid Transaction: Transaction has a bad signature```&#xD;&#xA;&#xD;&#xA;Note: If i use transfer and batchAll it gives ```-32603: Internal error```, &#xD;&#xA;      if i use transfer and batch it gives the same invalid Signature error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    const specVersion = getSpecVersion();&#xD;&#xA;    const transactionVersion = getTransactionVersion();&#xD;&#xA;    const specName: any = getSpecName();&#xD;&#xA;    const chainName = getChainName();&#xD;&#xA;&#xD;&#xA;    [block, metadataRpc] = await Promise.all([&#xD;&#xA;      rawBlock = await getBlock(blockHash),&#xD;&#xA;      metadataRpc = getMetaDataRpc(),&#xD;&#xA;     ]);&#xD;&#xA;&#xD;&#xA;    const registry = this.getRegistry({&#xD;&#xA;      chainName,&#xD;&#xA;      specName,&#xD;&#xA;      specVersion,&#xD;&#xA;      metadataRpc,&#xD;&#xA;      asCallsOnlyArg: true,&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;    const account = getAccount(publicKey);&#xD;&#xA;&#xD;&#xA;    const transferArgs = []&#xD;&#xA;    // logic that converts transfers to {dest, value} and pushes them to transferArgs&#xD;&#xA;&#xD;&#xA;  const batchTransferMethods = transferArgs.map((args) =&gt; {&#xD;&#xA;    const txInfo = methods.balances.transferKeepAlive(&#xD;&#xA;      args,&#xD;&#xA;      {&#xD;&#xA;        address: account.address,&#xD;&#xA;        blockHash,&#xD;&#xA;        blockNumber,&#xD;&#xA;        eraPeriod,&#xD;&#xA;        genesisHash,&#xD;&#xA;        metadataRpc,&#xD;&#xA;        nonce,&#xD;&#xA;        specVersion,&#xD;&#xA;        tip,&#xD;&#xA;        transactionVersion,&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry,&#xD;&#xA;      },&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    return txInfo.method;&#xD;&#xA;  });&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  const unsigned = methods.utility.batchAll(&#xD;&#xA;    {&#xD;&#xA;      calls: batchTransferMethods,&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      address: account.address,&#xD;&#xA;      blockHash,&#xD;&#xA;      blockNumber,&#xD;&#xA;      eraPeriod,&#xD;&#xA;      genesisHash,&#xD;&#xA;      metadataRpc,&#xD;&#xA;      nonce,&#xD;&#xA;      tip,&#xD;&#xA;      transactionVersion,&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      metadataRpc,&#xD;&#xA;      registry,&#xD;&#xA;    },&#xD;&#xA;  );&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;  const extrinsicPayload = registry.createType('ExtrinsicPayload', unsigned, {&#xD;&#xA;    version: unsigned.version,&#xD;&#xA;  });&#xD;&#xA;&#xD;&#xA;  const extrinsicPayloadU8a = extrinsicPayload.toU8a({ method: true });&#xD;&#xA;&#xD;&#xA;  const dataToSign = Buffer.from(registry.hash(extrinsicPayloadU8a)).toString(&#xD;&#xA;    'hex',&#xD;&#xA;  );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  // signing operation and logic&#xD;&#xA;&#xD;&#xA;  const signedTransaction = construct.signedTx(&#xD;&#xA;      unsigned,&#xD;&#xA;      signatureWithPrefix,&#xD;&#xA;      {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry,&#xD;&#xA;      },&#xD;&#xA;   );&#xD;&#xA;&#xD;&#xA;  const signedTransaction = transaction({ transactionToSubmit });&#xD;&#xA;&#xD;&#xA;    let response: {&#xD;&#xA;      events: EventRecord[];&#xD;&#xA;      status: ExtrinsicStatus;&#xD;&#xA;      txHash: Hash;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;  let blockNumber: string, signedBlock: SignedBlock;&#xD;&#xA;  try {&#xD;&#xA;      response = await new Promise((resolve, reject) =&gt; {&#xD;&#xA;        signedTransaction&#xD;&#xA;          .send(({ events = [], status, txHash }) =&gt; {&#xD;&#xA;            if (status.isFinalized) {&#xD;&#xA;              resolve({ events, status, txHash });&#xD;&#xA;            }&#xD;&#xA;          })&#xD;&#xA;          .catch((err) =&gt; {&#xD;&#xA;            reject(err);&#xD;&#xA;          });&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;      signedBlock = await getBlock(response.status.asFinalized.toHex());&#xD;&#xA;      blockNumber = signedBlock.block.header.number.toString();&#xD;&#xA;&#xD;&#xA;      response.events.forEach(({ event }) =&gt; {&#xD;&#xA;        if (this.api.events.system.ExtrinsicFailed.is(event)) {&#xD;&#xA;          // extract the data for this event&#xD;&#xA;          const [dispatchError] = event.data;&#xD;&#xA;          let errorInfo: string;&#xD;&#xA;&#xD;&#xA;          // decode the error&#xD;&#xA;          if (dispatchError.isModule) {&#xD;&#xA;            const decoded = this.api.registry.findMetaError(&#xD;&#xA;              dispatchError.asModule,&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            errorInfo = `${decoded.section}.${decoded.name}`;&#xD;&#xA;          } else {&#xD;&#xA;            // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;            errorInfo = dispatchError.toString();&#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;          throw new BadRequestException(&#xD;&#xA;            `Transaction has been reverted. transactionHash: ${blockNumber}-${&#xD;&#xA;              (response.events[0].phase.toJSON() as any).applyExtrinsic&#xD;&#xA;            } , ExtrinsicFailed:: ${errorInfo} `,&#xD;&#xA;          );&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;    } catch (error) {&#xD;&#xA;      throw new BroadcastFailedError(error.message);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38363" PostHistoryTypeId="1" PostId="9676" RevisionGUID="0a70d262-dbcb-4a08-9e77-2edd3203eedb" CreationDate="2023-08-21T10:05:42.610" UserId="3861" Text="My implementation wont let me batch more than 4 transfer calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="38364" PostHistoryTypeId="3" PostId="9676" RevisionGUID="0a70d262-dbcb-4a08-9e77-2edd3203eedb" CreationDate="2023-08-21T10:05:42.610" UserId="3861" Text="|polkadot-js|polkadot|kusama|acala|txwrapper|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38365" PostHistoryTypeId="2" PostId="9677" RevisionGUID="d87dee93-ac52-4a31-8449-cda615699128" CreationDate="2023-08-21T10:13:42.923" UserId="2348" Text="I am trying to do runtime upgrade of substrate blockchain which is running on 0.9.36 version to substrate version v1.0.0 . While doing runtime upgrade chain stops working and getting this error in logs.  ERROR {&quot; Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&quot;} .Can anyone please tell how to avoid this error without effecting blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="38367" PostHistoryTypeId="1" PostId="9677" RevisionGUID="d87dee93-ac52-4a31-8449-cda615699128" CreationDate="2023-08-21T10:13:42.923" UserId="2348" Text="Getting error after doing runtime upgrade to substrate v1.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="38368" PostHistoryTypeId="3" PostId="9677" RevisionGUID="d87dee93-ac52-4a31-8449-cda615699128" CreationDate="2023-08-21T10:13:42.923" UserId="2348" Text="|runtime-upgrade|substrate-node|blockchain|l|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38369" PostHistoryTypeId="5" PostId="9676" RevisionGUID="12dcf9fa-31fe-475f-817e-2a12af93a45e" CreationDate="2023-08-21T10:13:43.570" UserId="3861" Comment="added 44 characters in body" Text="my implementation wont let me batch more than 4 transfers. Whats wrong with it?&#xD;&#xA;&#xD;&#xA;I know the code is a bit complex because its normally not in one func  but i has to be in this way. I am suprised that it wont work for more than 4 transfers. Its a bit odd to me tbh. &#xD;&#xA;&#xD;&#xA;Can someone please help me asap? Thanks.&#xD;&#xA;&#xD;&#xA;Error i am getting : ```1010: Invalid Transaction: Transaction has a bad signature```&#xD;&#xA;&#xD;&#xA;Note: If i use transfer and batchAll it gives ```-32603: Internal error```, &#xD;&#xA;      if i use transfer and batch it gives the same invalid Signature error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    const specVersion = getSpecVersion();&#xD;&#xA;    const transactionVersion = getTransactionVersion();&#xD;&#xA;    const specName: any = getSpecName();&#xD;&#xA;    const chainName = getChainName();&#xD;&#xA;&#xD;&#xA;    [block, metadataRpc] = await Promise.all([&#xD;&#xA;      rawBlock = await getBlock(blockHash),&#xD;&#xA;      metadataRpc = getMetaDataRpc(),&#xD;&#xA;     ]);&#xD;&#xA;&#xD;&#xA;    const registry = this.getRegistry({&#xD;&#xA;      chainName,&#xD;&#xA;      specName,&#xD;&#xA;      specVersion,&#xD;&#xA;      metadataRpc,&#xD;&#xA;      asCallsOnlyArg: true,&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;    const account = getAccount(publicKey);&#xD;&#xA;&#xD;&#xA;    const transferArgs = []&#xD;&#xA;    // logic that converts transfers to {dest, value} and pushes them to transferArgs&#xD;&#xA;&#xD;&#xA;  const batchTransferMethods = transferArgs.map((args) =&gt; {&#xD;&#xA;    const txInfo = methods.balances.transferKeepAlive(&#xD;&#xA;      args,&#xD;&#xA;      {&#xD;&#xA;        address: account.address,&#xD;&#xA;        blockHash,&#xD;&#xA;        blockNumber,&#xD;&#xA;        eraPeriod,&#xD;&#xA;        genesisHash,&#xD;&#xA;        metadataRpc,&#xD;&#xA;        nonce,&#xD;&#xA;        specVersion,&#xD;&#xA;        tip,&#xD;&#xA;        transactionVersion,&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry,&#xD;&#xA;      },&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    return txInfo.method;&#xD;&#xA;  });&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  const unsigned = methods.utility.batchAll(&#xD;&#xA;    {&#xD;&#xA;      calls: batchTransferMethods,&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      address: account.address,&#xD;&#xA;      blockHash,&#xD;&#xA;      blockNumber,&#xD;&#xA;      eraPeriod,&#xD;&#xA;      genesisHash,&#xD;&#xA;      metadataRpc,&#xD;&#xA;      nonce,&#xD;&#xA;      tip,&#xD;&#xA;      transactionVersion,&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      metadataRpc,&#xD;&#xA;      registry,&#xD;&#xA;    },&#xD;&#xA;  );&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;  const extrinsicPayload = registry.createType('ExtrinsicPayload', unsigned, {&#xD;&#xA;    version: unsigned.version,&#xD;&#xA;  });&#xD;&#xA;&#xD;&#xA;  const extrinsicPayloadU8a = extrinsicPayload.toU8a({ method: true });&#xD;&#xA;&#xD;&#xA;  const dataToSign = Buffer.from(registry.hash(extrinsicPayloadU8a)).toString(&#xD;&#xA;    'hex',&#xD;&#xA;  );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  // signing operation and logic&#xD;&#xA;&#xD;&#xA;  const signedTransaction = construct.signedTx(&#xD;&#xA;      unsigned,&#xD;&#xA;      signatureWithPrefix,&#xD;&#xA;      {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry,&#xD;&#xA;      },&#xD;&#xA;   );&#xD;&#xA;&#xD;&#xA;  const signedTransaction = transaction({ transactionToSubmit });&#xD;&#xA;&#xD;&#xA;    let response: {&#xD;&#xA;      events: EventRecord[];&#xD;&#xA;      status: ExtrinsicStatus;&#xD;&#xA;      txHash: Hash;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;  let blockNumber: string, signedBlock: SignedBlock;&#xD;&#xA;  try {&#xD;&#xA;      response = await new Promise((resolve, reject) =&gt; {&#xD;&#xA;        signedTransaction&#xD;&#xA;          .send(({ events = [], status, txHash }) =&gt; {&#xD;&#xA;            if (status.isFinalized) {&#xD;&#xA;              resolve({ events, status, txHash });&#xD;&#xA;            }&#xD;&#xA;          })&#xD;&#xA;          .catch((err) =&gt; {&#xD;&#xA;            reject(err);&#xD;&#xA;          });&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;      signedBlock = await getBlock(response.status.asFinalized.toHex());&#xD;&#xA;      blockNumber = signedBlock.block.header.number.toString();&#xD;&#xA;&#xD;&#xA;      response.events.forEach(({ event }) =&gt; {&#xD;&#xA;        if (this.api.events.system.ExtrinsicFailed.is(event)) {&#xD;&#xA;          // extract the data for this event&#xD;&#xA;          const [dispatchError] = event.data;&#xD;&#xA;          let errorInfo: string;&#xD;&#xA;&#xD;&#xA;          // decode the error&#xD;&#xA;          if (dispatchError.isModule) {&#xD;&#xA;            const decoded = this.api.registry.findMetaError(&#xD;&#xA;              dispatchError.asModule,&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            errorInfo = `${decoded.section}.${decoded.name}`;&#xD;&#xA;          } else {&#xD;&#xA;            // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;            errorInfo = dispatchError.toString();&#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;          throw new BadRequestException(&#xD;&#xA;            `Transaction has been reverted. transactionHash: ${blockNumber}-${&#xD;&#xA;              (response.events[0].phase.toJSON() as any).applyExtrinsic&#xD;&#xA;            } , ExtrinsicFailed:: ${errorInfo} `,&#xD;&#xA;          );&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;    } catch (error) {&#xD;&#xA;      throw new BroadcastFailedError(error.message);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38370" PostHistoryTypeId="2" PostId="9678" RevisionGUID="89900962-9af4-4021-a8ff-87da89a0f36c" CreationDate="2023-08-21T10:49:39.867" UserId="4571" Text="Antonio got close to the source of the issue by suggesting adding the api type augmentation, but this actually already happens when you require kiltprotocol/sdk-js. What this does is type polkadot api types more narrowly, including state calls like `api.query.council.members` (whose return value was typed as a generic `Codec` type until now).&#xD;&#xA;&#xD;&#xA;This reveals that the typings in the callbacks you provided are in fact incorrect. As the first overload suggests, the return type of `api.query.council.members` actually is a `Vec&lt;AccountId32&gt;`. The return type of `api.query.system.number` also definitely is not a JS number type, but a polkadot-js Codec subtype (looked it up, it's a `U64`).&#xD;&#xA;&#xD;&#xA;Changing the typings on your callbacks to align with these types should resolve your issue! Note that you could also change the parameter type to the generic `Codec` to satisfy TypeScript, but that would not give you access to type-specific methods like `map` on a `Vec`." ContentLicense="CC BY-SA 4.0" />
  <row Id="38372" PostHistoryTypeId="2" PostId="9679" RevisionGUID="44a94c41-f784-4dd7-98a2-6028396cebd4" CreationDate="2023-08-21T11:08:53.563" UserId="3317" Text="You could derive a unique account from the NFT collection which receives the funds. When the last NFT of this collection is sold you transfer the funds from the derived account to the NFT collection creator (and remove the derived account)." ContentLicense="CC BY-SA 4.0" />
  <row Id="38374" PostHistoryTypeId="2" PostId="9680" RevisionGUID="d385863b-7592-4c65-9d19-ac8a3582baaf" CreationDate="2023-08-21T11:13:58.730" UserId="3983" Text="Make sure to use `1.69` or lower with the current cargo contract v3. Will be addressed in v4 as far as I know&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;rustup default 1.69.0&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38376" PostHistoryTypeId="2" PostId="9681" RevisionGUID="9deb6b4d-6664-4c55-88a0-905cafd8c285" CreationDate="2023-08-21T11:35:09.403" UserId="382" Text="Yes, RPC nodes can lie about an arbitrary number of things. I guess RPC interfaces can be designed to also provide proofs; in this case one could add a new RPC method that provides a proof similar to [WarpSyncProof](https://github.com/paritytech/substrate/blob/0cbea5805e0f4edcf8a3a70135b4d8eabc2db06f/client/consensus/grandpa/src/warp_proof.rs#L72) that proves the current authorities.&#xD;&#xA;&#xD;&#xA;BUT, ultimately I think such an approach is a losing battle, and the correct trustless solution is to use light-clients instead of RPCs.&#xD;&#xA;&#xD;&#xA;&gt; The only way I can think of solving this is that we can check every single header for ConsensusLog::ScheduledChange or ConsensusLog::ForcedChange digest logs. ConsensusLog::ScheduledChange seems to apply the new set immediately in the same block the digest is emitted, and in the case of ConsensusLog::ForcedChange it applies the new set after delay number of blocks after the block in which the digest is emitted. Is this a reliable way to approach this? Is this how it is intended?&#xD;&#xA;&#xD;&#xA;Indeed, a light-client would do exactly that. It will warp sync to current head then it only follows/imports headers and trusts it has the current authority set by following GRANDPA proofs for new headers, and by following the inner header digests that signal authority changes." ContentLicense="CC BY-SA 4.0" />
  <row Id="38378" PostHistoryTypeId="5" PostId="9676" RevisionGUID="0f7c8bfb-47b8-432b-8c27-ca08e58ac42e" CreationDate="2023-08-21T12:44:00.180" UserId="354" Comment="fixed grammar and improved formatting" Text="My implementation wont let me batch more than 4 transfers. Am I doing something wrong?&#xD;&#xA;&#xD;&#xA;I know the code is a bit complex because its normally not in one func  but i has to be in this way. I am suprised that it wont work for more than 4 transfers. Its a bit odd to me tbh. &#xD;&#xA;&#xD;&#xA;Can someone please help me asap? Thanks.&#xD;&#xA;&#xD;&#xA;Error i am getting : ```1010: Invalid Transaction: Transaction has a bad signature```&#xD;&#xA;&#xD;&#xA;Note: If i use transfer and batchAll it gives ```-32603: Internal error```, &#xD;&#xA;      if i use transfer and batch it gives the same invalid Signature error&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    const specVersion = getSpecVersion();&#xD;&#xA;    const transactionVersion = getTransactionVersion();&#xD;&#xA;    const specName: any = getSpecName();&#xD;&#xA;    const chainName = getChainName();&#xD;&#xA;&#xD;&#xA;    [block, metadataRpc] = await Promise.all([&#xD;&#xA;      rawBlock = await getBlock(blockHash),&#xD;&#xA;      metadataRpc = getMetaDataRpc(),&#xD;&#xA;     ]);&#xD;&#xA;&#xD;&#xA;    const registry = this.getRegistry({&#xD;&#xA;      chainName,&#xD;&#xA;      specName,&#xD;&#xA;      specVersion,&#xD;&#xA;      metadataRpc,&#xD;&#xA;      asCallsOnlyArg: true,&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;    const account = getAccount(publicKey);&#xD;&#xA;&#xD;&#xA;    const transferArgs = []&#xD;&#xA;    // logic that converts transfers to {dest, value} and pushes them to transferArgs&#xD;&#xA;&#xD;&#xA;  const batchTransferMethods = transferArgs.map((args) =&gt; {&#xD;&#xA;    const txInfo = methods.balances.transferKeepAlive(&#xD;&#xA;      args,&#xD;&#xA;      {&#xD;&#xA;        address: account.address,&#xD;&#xA;        blockHash,&#xD;&#xA;        blockNumber,&#xD;&#xA;        eraPeriod,&#xD;&#xA;        genesisHash,&#xD;&#xA;        metadataRpc,&#xD;&#xA;        nonce,&#xD;&#xA;        specVersion,&#xD;&#xA;        tip,&#xD;&#xA;        transactionVersion,&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry,&#xD;&#xA;      },&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    return txInfo.method;&#xD;&#xA;  });&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  const unsigned = methods.utility.batchAll(&#xD;&#xA;    {&#xD;&#xA;      calls: batchTransferMethods,&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      address: account.address,&#xD;&#xA;      blockHash,&#xD;&#xA;      blockNumber,&#xD;&#xA;      eraPeriod,&#xD;&#xA;      genesisHash,&#xD;&#xA;      metadataRpc,&#xD;&#xA;      nonce,&#xD;&#xA;      tip,&#xD;&#xA;      transactionVersion,&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      metadataRpc,&#xD;&#xA;      registry,&#xD;&#xA;    },&#xD;&#xA;  );&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;  const extrinsicPayload = registry.createType('ExtrinsicPayload', unsigned, {&#xD;&#xA;    version: unsigned.version,&#xD;&#xA;  });&#xD;&#xA;&#xD;&#xA;  const extrinsicPayloadU8a = extrinsicPayload.toU8a({ method: true });&#xD;&#xA;&#xD;&#xA;  const dataToSign = Buffer.from(registry.hash(extrinsicPayloadU8a)).toString(&#xD;&#xA;    'hex',&#xD;&#xA;  );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  // signing operation and logic&#xD;&#xA;&#xD;&#xA;  const signedTransaction = construct.signedTx(&#xD;&#xA;      unsigned,&#xD;&#xA;      signatureWithPrefix,&#xD;&#xA;      {&#xD;&#xA;        metadataRpc,&#xD;&#xA;        registry,&#xD;&#xA;      },&#xD;&#xA;   );&#xD;&#xA;&#xD;&#xA;  const signedTransaction = transaction({ transactionToSubmit });&#xD;&#xA;&#xD;&#xA;    let response: {&#xD;&#xA;      events: EventRecord[];&#xD;&#xA;      status: ExtrinsicStatus;&#xD;&#xA;      txHash: Hash;&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;  let blockNumber: string, signedBlock: SignedBlock;&#xD;&#xA;  try {&#xD;&#xA;      response = await new Promise((resolve, reject) =&gt; {&#xD;&#xA;        signedTransaction&#xD;&#xA;          .send(({ events = [], status, txHash }) =&gt; {&#xD;&#xA;            if (status.isFinalized) {&#xD;&#xA;              resolve({ events, status, txHash });&#xD;&#xA;            }&#xD;&#xA;          })&#xD;&#xA;          .catch((err) =&gt; {&#xD;&#xA;            reject(err);&#xD;&#xA;          });&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;      signedBlock = await getBlock(response.status.asFinalized.toHex());&#xD;&#xA;      blockNumber = signedBlock.block.header.number.toString();&#xD;&#xA;&#xD;&#xA;      response.events.forEach(({ event }) =&gt; {&#xD;&#xA;        if (this.api.events.system.ExtrinsicFailed.is(event)) {&#xD;&#xA;          // extract the data for this event&#xD;&#xA;          const [dispatchError] = event.data;&#xD;&#xA;          let errorInfo: string;&#xD;&#xA;&#xD;&#xA;          // decode the error&#xD;&#xA;          if (dispatchError.isModule) {&#xD;&#xA;            const decoded = this.api.registry.findMetaError(&#xD;&#xA;              dispatchError.asModule,&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            errorInfo = `${decoded.section}.${decoded.name}`;&#xD;&#xA;          } else {&#xD;&#xA;            // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;            errorInfo = dispatchError.toString();&#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;          throw new BadRequestException(&#xD;&#xA;            `Transaction has been reverted. transactionHash: ${blockNumber}-${&#xD;&#xA;              (response.events[0].phase.toJSON() as any).applyExtrinsic&#xD;&#xA;            } , ExtrinsicFailed:: ${errorInfo} `,&#xD;&#xA;          );&#xD;&#xA;        }&#xD;&#xA;      });&#xD;&#xA;    } catch (error) {&#xD;&#xA;      throw new BroadcastFailedError(error.message);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38379" PostHistoryTypeId="24" PostId="9676" RevisionGUID="0f7c8bfb-47b8-432b-8c27-ca08e58ac42e" CreationDate="2023-08-21T12:44:00.180" Comment="Proposed by 354 approved by 3317, 3861 edit id of 525" ContentLicense="CC BY-SA 4.0" />
  <row Id="38380" PostHistoryTypeId="5" PostId="9677" RevisionGUID="5142dd4f-3847-4499-bbab-d55f859541b6" CreationDate="2023-08-21T13:14:47.040" UserId="2762" Comment="formatting, tags" Text="I am trying to do runtime upgrade of substrate blockchain which is running on 0.9.36 version to substrate version v1.0.0 . While doing runtime upgrade chain stops working and getting this error in logs. &#xD;&#xA;```sh&#xD;&#xA;ERROR {&quot; Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm unreachable instruction executed&quot;} &#xD;&#xA;```&#xD;&#xA;Can anyone please tell how to avoid this error without affecting blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="38381" PostHistoryTypeId="6" PostId="9677" RevisionGUID="5142dd4f-3847-4499-bbab-d55f859541b6" CreationDate="2023-08-21T13:14:47.040" UserId="2762" Comment="formatting, tags" Text="|runtime-upgrade|substrate-node|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38382" PostHistoryTypeId="2" PostId="9682" RevisionGUID="86c11b89-1529-43ea-9d97-f6d920b7217f" CreationDate="2023-08-21T15:42:51.217" UserId="552" Text="I'm trying to create a poc to separate out the signing of transactions from the libraries such as subxt or polkadot-js. I was trying subxt and schnorrkel libs to create partial signed transaction and sign it using noble/curve lib of js or I don't know if I can use any other libs from any other languages. Basically trying to sign a transaction using any crypto libs so that signing becomes language agnostic. I'm trying to extract out this specific [line][1](never mind the code). I tried to sign it using schnorr from noble/curve or even sign it using signer.sign() from polkadot-js and both created a bad signature when I try to submit the transaction. I guess maybe the metadata or the type might not be correct as expected. &#xD;&#xA;&#xD;&#xA;    const sig = schnorr.sign(msg, priv);&#xD;&#xA;or &#xD;&#xA;&#xD;&#xA;    y = alice.sign(x)&#xD;&#xA;&#xD;&#xA;Is is possible to do this? Am I missing something to in creation of the signature? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kroos47/signing-poc/blob/96c143f242dc0abbaa94bb56f739884296899299/src/main.rs#L202" ContentLicense="CC BY-SA 4.0" />
  <row Id="38384" PostHistoryTypeId="1" PostId="9682" RevisionGUID="86c11b89-1529-43ea-9d97-f6d920b7217f" CreationDate="2023-08-21T15:42:51.217" UserId="552" Text="If a transaction is created using subxt/polkadot-js and how to sign it using any crypto libraries and send it again using subxt/polkadot-js" ContentLicense="CC BY-SA 4.0" />
  <row Id="38385" PostHistoryTypeId="3" PostId="9682" RevisionGUID="86c11b89-1529-43ea-9d97-f6d920b7217f" CreationDate="2023-08-21T15:42:51.217" UserId="552" Text="|polkadot-js|extrinsic|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38386" PostHistoryTypeId="2" PostId="9683" RevisionGUID="64a8eeba-693e-4587-95e8-172f03b0911a" CreationDate="2023-08-21T16:13:32.003" UserId="83" Text="The reason for the error wasn't because I was using an Apple M2 chip, it was simply because for some reason if you build Substrate with Docker using substrate_builder.Dockerfile by following the instructions it now only generates the `substrate` binary in `/substrate/target/release/substrate`, but it no longer also generates the `subkey`, `node-template`, or `chain-spec-builder` binaries too like it used to.&#xD;&#xA;&#xD;&#xA;So I think a pull request to the Substrate repository may be required to either change line 6 of [substrate_builder.Dockerfile](https://github.com/paritytech/substrate/blob/master/docker/substrate_builder.Dockerfile#L6) to instead run the following to generate all the binaries in the /substrate/target/release directory, so it doesn't generate an error when they are used later on lines 19-21:&#xD;&#xA;```bash&#xD;&#xA;RUN cargo build --locked --release &amp;&amp; \&#xD;&#xA;    cargo build -p subkey --release --locked &amp;&amp; \&#xD;&#xA;    cargo build -p node-template --release --locked &amp;&amp; \&#xD;&#xA;    cargo build -p chain-spec-builder --release --locked&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So to overcome the error I simply removed lines of code 8-33 in the file [substrate_builder.Dockerfile](https://github.com/paritytech/substrate/blob/master/docker/substrate_builder.Dockerfile), and then entered the Docker container with the command `docker run -it parity/substrate` where I could then run the `substrate` binary with `./target/release/substrate --help` and manually generate the other binaries by running:&#xD;&#xA;```bash&#xD;&#xA;cargo build -p subkey --release --locked &amp;&amp; \&#xD;&#xA;cargo build -p node-template --release --locked &amp;&amp; \&#xD;&#xA;cargo build -p chain-spec-builder --release --locked&#xD;&#xA;```&#xD;&#xA;Then I was able to use those binaries too with:&#xD;&#xA;```bash&#xD;&#xA;./target/release/subkey --help&#xD;&#xA;./target/release/node-template --help&#xD;&#xA;./target/release/chain-spec-builder --help&#xD;&#xA;```&#xD;&#xA;Note that another approach to obtaining the latest `subkey` binary is by running:&#xD;&#xA;```bash&#xD;&#xA;curl https://getsubstrate.io -sSf | bash -s -- --fast&#xD;&#xA;cargo install --force subkey --git https://github.com/paritytech/substrate&#xD;&#xA;subkey --help&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38388" PostHistoryTypeId="5" PostId="9683" RevisionGUID="31347e67-ca83-4a75-9586-3f07aad701b8" CreationDate="2023-08-21T16:27:40.080" UserId="83" Comment="highlight the difference between chain-spec-builder and build-spec" Text="The reason for the error wasn't because I was using an Apple M2 chip, it was simply because for some reason if you build Substrate with Docker using substrate_builder.Dockerfile by following the instructions it now only generates the `substrate` binary in `/substrate/target/release/substrate`, but it no longer also generates the `subkey`, `node-template`, or `chain-spec-builder` binaries too like it used to.&#xD;&#xA;&#xD;&#xA;So I think a pull request to the Substrate repository may be required to either change line 6 of [substrate_builder.Dockerfile](https://github.com/paritytech/substrate/blob/master/docker/substrate_builder.Dockerfile#L6) to instead run the following to generate all the binaries in the /substrate/target/release directory, so it doesn't generate an error when they are used later on lines 19-21:&#xD;&#xA;```bash&#xD;&#xA;RUN cargo build --locked --release &amp;&amp; \&#xD;&#xA;    cargo build -p subkey --release --locked &amp;&amp; \&#xD;&#xA;    cargo build -p node-template --release --locked &amp;&amp; \&#xD;&#xA;    cargo build -p chain-spec-builder --release --locked&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So to overcome the error I simply removed lines of code 8-33 in the file [substrate_builder.Dockerfile](https://github.com/paritytech/substrate/blob/master/docker/substrate_builder.Dockerfile), and then entered the Docker container with the command `docker run -it parity/substrate` where I could then run the `substrate` binary with `./target/release/substrate --help` and manually generate the other binaries by running:&#xD;&#xA;```bash&#xD;&#xA;cargo build -p subkey --release --locked &amp;&amp; \&#xD;&#xA;cargo build -p node-template --release --locked &amp;&amp; \&#xD;&#xA;cargo build -p chain-spec-builder --release --locked&#xD;&#xA;```&#xD;&#xA;Then I was able to use those binaries too with:&#xD;&#xA;```bash&#xD;&#xA;./target/release/subkey --help&#xD;&#xA;./target/release/node-template --help&#xD;&#xA;./target/release/chain-spec-builder --help&#xD;&#xA;```&#xD;&#xA;Note that another approach to obtaining the latest `subkey` binary is by running:&#xD;&#xA;```bash&#xD;&#xA;curl https://getsubstrate.io -sSf | bash -s -- --fast&#xD;&#xA;cargo install --force subkey --git https://github.com/paritytech/substrate&#xD;&#xA;subkey --help&#xD;&#xA;```&#xD;&#xA;Note that the `chain-spec-builder` binary is a _&quot;utility to easily create a testnet chain spec definition with a given set of authorities and endowed accounts and/or generate random accounts&quot;_, and differs from the Substrate binary command `build-spec` that you may run with `./target/release/substrate build-spec --help` is used to _&quot;serialize the chain specification into a JSON file&quot;_.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38389" PostHistoryTypeId="2" PostId="9684" RevisionGUID="54ec8503-a271-4b91-8f16-b6741ad5b547" CreationDate="2023-08-21T16:35:53.573" UserId="474" Text="In the case of Subxt, you have a couple of options:&#xD;&#xA;&#xD;&#xA;### 1. Get the signer payload, sign it and hand back to Subxt&#xD;&#xA;&#xD;&#xA;At the end of the day, the bytes that needs signing is a signer payload which contains the transaction bytes plus some additional/extra details (or possibly a hashed version of this).&#xD;&#xA;&#xD;&#xA;In Subxt, you can do something like this to get the bytes needed to sign some transaction and then hand back a signature and submit it:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// 1. Create a &quot;partial&quot; transaction:&#xD;&#xA;let partial_tx = client.tx().create_partial_signed(&#xD;&#xA;    &amp;payload,&#xD;&#xA;    Default::default()&#xD;&#xA;).await?;&#xD;&#xA;&#xD;&#xA;// 2. Fetch the bytes that need to be signed:&#xD;&#xA;let signer_payload = partial_tx.signer_payload();&#xD;&#xA;&#xD;&#xA;// 3. go off and sign them&#xD;&#xA;let signature: &amp;[u8] = {/* ... */} &#xD;&#xA;&#xD;&#xA;// 4. Hand signature back to Subxt and submit the tx.&#xD;&#xA;//    At this point you need to provide the &quot;from&quot; address&#xD;&#xA;//    that corresponds to the key used to sign it.&#xD;&#xA;let tx = partial_tx.sign_with_address_and_signature(&#xD;&#xA;    &amp;address,&#xD;&#xA;    &amp;signature&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;// 5. Now you can `tx.submit_and_watch()` or whatever to &#xD;&#xA;//    submit the signed tx.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;See https://docs.rs/subxt/latest/subxt/book/usage/transactions/index.html for more information on signing transactions.&#xD;&#xA;&#xD;&#xA;If you end up with a bad signature here, it can be hard to tell why. The address and signature need to match (ie the address is derived from the public key of the signer you used), and the signature algorithm needs to be suitable for the given chain (ie for Polkadot we'd expect an sr25519 signature).&#xD;&#xA;&#xD;&#xA;### 2. Gather details needed for wallets like Talisman and have it sign.&#xD;&#xA;&#xD;&#xA;Wallets like Talisman can't be simply given the signer payload bytes to be signed, and instead must be given a JSON object containing various details.&#xD;&#xA;&#xD;&#xA;This payload has the shape:&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;export interface SignerPayloadSON {&#xD;&#xA;  /* The ss-58 encoded address */&#xD;&#xA;  address: string;&#xD;&#xA;  /* The checkpoint hash of the block, in hex */&#xD;&#xA;  blockHash: string;&#xD;&#xA;  /* The checkpoint block number, in hex */&#xD;&#xA;  blockNumber: string;&#xD;&#xA;  /* The era for this transaction, in hex */&#xD;&#xA;  era: string;&#xD;&#xA;  /* The genesis hash of the chain, in hex */&#xD;&#xA;  genesisHash: string;&#xD;&#xA;  /* The encoded method (with arguments) in hex */&#xD;&#xA;  method: string;&#xD;&#xA;  /* The nonce for this transaction, in hex */&#xD;&#xA;  nonce: string;&#xD;&#xA;  /* The current spec version for the runtime */&#xD;&#xA;  specVersion: string;&#xD;&#xA;  /* The tip for this transaction, in hex */&#xD;&#xA;  tip: string;&#xD;&#xA;  /* The current transaction version for the runtime */&#xD;&#xA;  transactionVersion: string;&#xD;&#xA;  /* The applicable signed extensions for this runtime */&#xD;&#xA;  signedExtensions: string[];&#xD;&#xA;  /* The version of the extrinsic we are dealing with */&#xD;&#xA;  version: number;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(see https://github.com/polkadot-js/api/blob/52e36534cfde94d4f032e88fee9ba0d24ccb4fb1/packages/types/src/types/extrinsic.ts#L32)&#xD;&#xA;&#xD;&#xA;The wallet itself then takes these details and constructs a signer payload and then signs it using the selected account, handing back the signature.&#xD;&#xA;&#xD;&#xA;We have an example in Subxt wherein we build this type in a Subxt WASM app and submit it to a browser wallet for signing; see https://github.com/paritytech/subxt/blob/ab84228af45a7d5ba5e2494172554e000da05898/examples/wasm-example/src/services.rs#L125, and more generally check out the example to learn more.&#xD;&#xA;&#xD;&#xA;In the case of using polkadot.js itself, I think it accepts a JSON object similar to the above to sign transactions, but I'm not sure offhand!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38391" PostHistoryTypeId="52" PostId="9672" RevisionGUID="a8e379e3-469d-4c15-b4d4-e590b5366012" CreationDate="2023-08-21T17:37:09.980" />
  <row Id="38392" PostHistoryTypeId="52" PostId="9672" RevisionGUID="ecce0157-0089-44a4-8471-1e616d91171a" CreationDate="2023-08-21T17:37:09.980" />
  <row Id="38393" PostHistoryTypeId="52" PostId="9672" RevisionGUID="d868a5a6-df83-4942-9d06-376832a63e80" CreationDate="2023-08-21T17:37:09.980" />
  <row Id="38394" PostHistoryTypeId="52" PostId="9672" RevisionGUID="d3fddc35-a78a-48e5-9406-3a01d511a5b0" CreationDate="2023-08-21T17:37:05.793" />
  <row Id="38395" PostHistoryTypeId="52" PostId="9672" RevisionGUID="ff76f41f-d4f1-4f76-9126-ae34f5b531e5" CreationDate="2023-08-21T17:37:09.990" />
  <row Id="38401" PostHistoryTypeId="2" PostId="9685" RevisionGUID="7e901420-effe-4f82-a04c-e0cb34554458" CreationDate="2023-08-22T01:50:39.843" UserId="4573" Text="Is there a function in polkadot.js to figure out the signatories addresses from a specific multisig address? " ContentLicense="CC BY-SA 4.0" />
  <row Id="38403" PostHistoryTypeId="1" PostId="9685" RevisionGUID="7e901420-effe-4f82-a04c-e0cb34554458" CreationDate="2023-08-22T01:50:39.843" UserId="4573" Text="How do I figure out the signatories addresses from a multisig address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38404" PostHistoryTypeId="3" PostId="9685" RevisionGUID="7e901420-effe-4f82-a04c-e0cb34554458" CreationDate="2023-08-22T01:50:39.843" UserId="4573" Text="|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38405" PostHistoryTypeId="2" PostId="9686" RevisionGUID="b0fa95be-90e4-42a1-98f0-1d25a753b6f8" CreationDate="2023-08-22T02:29:01.350" UserId="2844" Text="Is there any way to call ink! smart contract function in substrate custom pallet? Someone please recommend some resources." ContentLicense="CC BY-SA 4.0" />
  <row Id="38407" PostHistoryTypeId="1" PostId="9686" RevisionGUID="b0fa95be-90e4-42a1-98f0-1d25a753b6f8" CreationDate="2023-08-22T02:29:01.350" UserId="2844" Text="how to call smart contract function in custom pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38408" PostHistoryTypeId="3" PostId="9686" RevisionGUID="b0fa95be-90e4-42a1-98f0-1d25a753b6f8" CreationDate="2023-08-22T02:29:01.350" UserId="2844" Text="|pallet|smart-contract|substrate-node|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38409" PostHistoryTypeId="2" PostId="9687" RevisionGUID="37e596f3-b846-4b16-89fc-e3ef252e9dd0" CreationDate="2023-08-22T03:39:46.137" UserId="251" Text="Nope, it's a one way hash. &#xD;&#xA;&#xD;&#xA;You can't get the signatories from just a multisig address.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;And in PolkadotApps you need to add signatories to the address book and pass the threshold to recover the multisig account, then you can use the multisig features." ContentLicense="CC BY-SA 4.0" />
  <row Id="38411" PostHistoryTypeId="2" PostId="9688" RevisionGUID="643157bd-c0ce-4fb1-99c6-efcbc7d988a4" CreationDate="2023-08-22T05:29:00.237" UserId="555" Text="&#xD;&#xA;I'm working on a project that involves setting up a shared pot account. Anyone can fund this account, and the owner has the ability to withdraw money from it. However, I'm encountering an ```error: system.ExtrinsicFailed Token.NotExpendable.```[![enter image description here][1]][1] &#xD;&#xA;&#xD;&#xA;This error occurs when I set the pot account to users like Charlie or Dave who have no initial funds. Strangely, if I set the pot account as Alice, Bob, or AliceStash, I can successfully withdraw the money. Could someone please help me understand why this is happening? Your assistance would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VXbNu.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38413" PostHistoryTypeId="1" PostId="9688" RevisionGUID="643157bd-c0ce-4fb1-99c6-efcbc7d988a4" CreationDate="2023-08-22T05:29:00.237" UserId="555" Text="system.ExtrinsicFailed Token.NotExpendable" ContentLicense="CC BY-SA 4.0" />
  <row Id="38414" PostHistoryTypeId="3" PostId="9688" RevisionGUID="643157bd-c0ce-4fb1-99c6-efcbc7d988a4" CreationDate="2023-08-22T05:29:00.237" UserId="555" Text="|polkadot-js|substrate-node-template|polkadot|account|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38415" PostHistoryTypeId="2" PostId="9689" RevisionGUID="4d75d56f-126e-4e47-a576-27b191bfc6e8" CreationDate="2023-08-22T05:54:53.130" UserId="4504" Text="I have the same problem and error message as described here: https://substrate.stackexchange.com/questions/9512/e2e-tests-we-should-find-a-port-before-the-reader-ends for rust = 1.69 and cargo-contract-contract 3.0.1-unknown-x86_64-apple-darwin. I tried everything that came to mind with downgrading, upgrading, etc. Problem persists. Solutions from the provided link don't work.&#xD;&#xA;&#xD;&#xA;    ink_e2e = 4.2.1&#xD;&#xA;    substrate-contracts-node = 0.29 or 0.30 both checked &#xD;&#xA;&#xD;&#xA;It happens when I try to run e2e with ``cargo test --features e2e-tests ``&#xD;&#xA;with output:&#xD;&#xA;&#xD;&#xA;        e2e_tests::e2e_minting_works stdout ----&#xD;&#xA;    thread 'magink::e2e_tests::e2e_minting_works' panicked at 'We should find a port before the reader ends', /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_e2e-4.2.1/src/node_proc.rs:192:10&#xD;&#xA;    stack backtrace:&#xD;&#xA;       0: rust_begin_unwind&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5&#xD;&#xA;       1: core::panicking::panic_fmt&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14&#xD;&#xA;       2: core::panicking::panic_display&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:147:5&#xD;&#xA;       3: core::panicking::panic_str&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:131:5&#xD;&#xA;       4: core::option::expect_failed&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/option.rs:2045:5&#xD;&#xA;       5: core::option::Option&lt;T&gt;::expect&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/option.rs:905:21&#xD;&#xA;       6: ink_e2e::node_proc::find_substrate_port_from_output&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_e2e-4.2.1/src/node_proc.rs:166:5&#xD;&#xA;       7: ink_e2e::node_proc::TestNodeProcessBuilder&lt;R&gt;::spawn::{{closure}}&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/ink_e2e-4.2.1/src/node_proc.rs:138:23&#xD;&#xA;       8: magink::magink::e2e_tests::e2e_minting_works::{{closure}}&#xD;&#xA;                 at ./lib.rs:281:9&#xD;&#xA;       9: &lt;core::pin::Pin&lt;P&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/future/future.rs:125:9&#xD;&#xA;      10: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:665:57&#xD;&#xA;      11: tokio::runtime::coop::with_budget&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/coop.rs:107:5&#xD;&#xA;      12: tokio::runtime::coop::budget&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/coop.rs:73:5&#xD;&#xA;      13: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:665:25&#xD;&#xA;      14: tokio::runtime::scheduler::current_thread::Context::enter&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:410:19&#xD;&#xA;      15: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:664:36&#xD;&#xA;      16: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:743:68&#xD;&#xA;      17: tokio::runtime::context::scoped::Scoped&lt;T&gt;::set&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/context/scoped.rs:40:9&#xD;&#xA;      18: tokio::runtime::context::set_scheduler::{{closure}}&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/context.rs:176:26&#xD;&#xA;      19: std::thread::local::LocalKey&lt;T&gt;::try_with&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/thread/local.rs:446:16&#xD;&#xA;      20: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/thread/local.rs:422:9&#xD;&#xA;      21: tokio::runtime::context::set_scheduler&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/context.rs:176:9&#xD;&#xA;      22: tokio::runtime::scheduler::current_thread::CoreGuard::enter&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:743:27&#xD;&#xA;      23: tokio::runtime::scheduler::current_thread::CoreGuard::block_on&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:652:19&#xD;&#xA;      24: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:175:28&#xD;&#xA;      25: tokio::runtime::context::runtime::enter_runtime&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/context/runtime.rs:65:16&#xD;&#xA;      26: tokio::runtime::scheduler::current_thread::CurrentThread::block_on&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:167:9&#xD;&#xA;      27: tokio::runtime::runtime::Runtime::block_on&#xD;&#xA;                 at /Users/{userName}/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.31.0/src/runtime/runtime.rs:347:47&#xD;&#xA;      28: magink::magink::e2e_tests::e2e_minting_works&#xD;&#xA;                 at ./lib.rs:281:9&#xD;&#xA;      29: magink::magink::e2e_tests::e2e_minting_works::{{closure}}&#xD;&#xA;                 at ./lib.rs:282:74&#xD;&#xA;      30: core::ops::function::FnOnce::call_once&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:250:5&#xD;&#xA;      31: core::ops::function::FnOnce::call_once&#xD;&#xA;                 at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:250:5&#xD;&#xA;    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    failures:&#xD;&#xA;        magink::e2e_tests::e2e_minting_works&#xD;&#xA;    &#xD;&#xA;    test result: FAILED. 3 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s&#xD;&#xA;&#xD;&#xA;Can someone advise?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38417" PostHistoryTypeId="1" PostId="9689" RevisionGUID="4d75d56f-126e-4e47-a576-27b191bfc6e8" CreationDate="2023-08-22T05:54:53.130" UserId="4504" Text="e2e-tests We should find port before reader ends - ink! 4.2.1, rust 1.69, cargo contracts 3.0.1" ContentLicense="CC BY-SA 4.0" />
  <row Id="38418" PostHistoryTypeId="3" PostId="9689" RevisionGUID="4d75d56f-126e-4e47-a576-27b191bfc6e8" CreationDate="2023-08-22T05:54:53.130" UserId="4504" Text="|ink|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38419" PostHistoryTypeId="5" PostId="9688" RevisionGUID="a3000ee3-a7fd-458f-99bf-eeb36b52bfaf" CreationDate="2023-08-22T05:56:04.380" UserId="555" Comment="deleted 1 character in body" Text="&#xD;&#xA;I'm working on a project that involves setting up a shared pot account. Anyone can fund this account, and the owner has the ability to withdraw money from it. However, I'm encountering an ```error: system.ExtrinsicFailed Token.NotExpendable.```[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This error occurs when I set the pot account to users like Charlie or Dave who have no initial funds. Strangely, if I set the pot account as Alice, Bob, or AliceStash, I can successfully withdraw the money. Could someone please help me understand why this is happening? Your assistance would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/uYafn.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38420" PostHistoryTypeId="2" PostId="9690" RevisionGUID="7859e4d7-51e2-4f1f-a31b-9c47dc8d4db3" CreationDate="2023-08-22T07:13:23.483" UserId="4574" Text="I started off wanting to set and identity for a multisig I created on Polkadot, but cannot execute any transactions from the multisig.&#xD;&#xA;&#xD;&#xA;[![Accounts][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have an account, currently with ~6 DOT and a newly created multisig, funded with 60 DOT.  Attempting to set the identity from the multisig fails, as does any attempt to create a transaction, or transfer funds (even 1 DOT fails).&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Checking the TX hash revels that it fails due to `Failed&#xD;&#xA;（SignatoriesOutOfOrder）` (The multisig was just created, so I fail to see how the signatories are out of order.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    name: &quot;threshold&quot;,&#xD;&#xA;    type: &quot;U16&quot;,&#xD;&#xA;    type_name: &quot;u16&quot;,&#xD;&#xA;    value: 2&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;other_signatories&quot;,&#xD;&#xA;    type: &quot;Vec&lt;[U8; 32]&gt;&quot;,&#xD;&#xA;    type_name: &quot;Vec&lt;AccountId&gt;&quot;,&#xD;&#xA;    value: [&#xD;&#xA;      &quot;0xbe5039c1ea1010712c27c0c771960de253a540e859124213d9e12d9444fdc93b&quot;,&#xD;&#xA;      &quot;0x18930b3ba985e076d3b466e08e1caf1a1b1358733c7ec74c7cea066e5a16ff64&quot;&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;maybe_timepoint&quot;,&#xD;&#xA;    type: &quot;option&lt;pallet_multisig:Timepoint&gt;&quot;,&#xD;&#xA;    type_name: &quot;Option&lt;Timepoint&lt;BlockNumber&gt;&gt;&quot;,&#xD;&#xA;    value: null&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;call&quot;,&#xD;&#xA;    type: &quot;Call&quot;,&#xD;&#xA;    type_name: &quot;Box&lt;&lt;T as Config&gt;::RuntimeCall&gt;&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      call_index: &quot;1c01&quot;,&#xD;&#xA;      call_module: &quot;Identity&quot;,&#xD;&#xA;      call_name: &quot;set_identity&quot;,&#xD;&#xA;      params: [&#xD;&#xA;        {&#xD;&#xA;          name: &quot;info&quot;,&#xD;&#xA;          type: &quot;pallet_identity:types:IdentityInfo&quot;,&#xD;&#xA;          value: {&#xD;&#xA;            additional: null,&#xD;&#xA;            display: {&#xD;&#xA;              Raw13: &quot;Exiled Racers&quot;&#xD;&#xA;            },&#xD;&#xA;            email: {&#xD;&#xA;              Raw21: &quot;info@exiledracers.com&quot;&#xD;&#xA;            },&#xD;&#xA;            image: {&#xD;&#xA;              None: &quot;NULL&quot;&#xD;&#xA;            },&#xD;&#xA;            legal: {&#xD;&#xA;              None: &quot;NULL&quot;&#xD;&#xA;            },&#xD;&#xA;            pgp_fingerprint: null,&#xD;&#xA;            riot: {&#xD;&#xA;              None: &quot;NULL&quot;&#xD;&#xA;            },&#xD;&#xA;            twitter: {&#xD;&#xA;              Raw13: &quot;@exiledracers&quot;&#xD;&#xA;            },&#xD;&#xA;            web: {&#xD;&#xA;              Raw24: &quot;https://exiledracers.com&quot;&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    name: &quot;max_weight&quot;,&#xD;&#xA;    type: &quot;sp_weights:weight_v2:Weight&quot;,&#xD;&#xA;    type_name: &quot;Weight&quot;,&#xD;&#xA;    value: {&#xD;&#xA;      proof_size: 0,&#xD;&#xA;      ref_time: 0&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or it fails with `Failed&#xD;&#xA;（InsufficientBalance）` (attempting to transfer 1 DOT).&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;I have no idea why this is failing, or how to debug it.&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iatkf.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/5duh7.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/hCgXa.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38422" PostHistoryTypeId="1" PostId="9690" RevisionGUID="7859e4d7-51e2-4f1f-a31b-9c47dc8d4db3" CreationDate="2023-08-22T07:13:23.483" UserId="4574" Text="Unable to execute any multisig transaction on Polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="38423" PostHistoryTypeId="3" PostId="9690" RevisionGUID="7859e4d7-51e2-4f1f-a31b-9c47dc8d4db3" CreationDate="2023-08-22T07:13:23.483" UserId="4574" Text="|polkadot|multisig|identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38424" PostHistoryTypeId="2" PostId="9691" RevisionGUID="135f8c9e-4391-4242-b7e5-028b2de7af1d" CreationDate="2023-08-22T08:37:20.803" UserId="2762" Text="There is something wrong with your imports, check your `Cargo.toml`.&#xD;&#xA;&#xD;&#xA;As an example if you check this previous StackExchange issue: [file not found for module `sys`][1].&#xD;&#xA;&#xD;&#xA;It worked using the `default-features = false` in `pallet_session` instead of `features = [&quot;historical&quot;]`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/8681/file-not-found-for-module-sys" ContentLicense="CC BY-SA 4.0" />
  <row Id="38426" PostHistoryTypeId="2" PostId="9692" RevisionGUID="4cb6962c-84b3-4bcc-8c7f-eca045f5e6d7" CreationDate="2023-08-22T09:05:21.327" UserId="3075" Text="I believe this is due to the ordering of the signatories in the extrinsic you are creating. If you are manually generating the extrinsic, you need to ensure that you put the signatories in ascending order of all the other signatories beside yourself (Polkadot-JS app does this for you &quot;behind the scenes&quot; if you use its multisig UI).&#xD;&#xA;&#xD;&#xA;From https://wiki.polkadot.network/docs/learn-account-multisig#multisig-accounts-with-the-polkadot-js-ui -&#xD;&#xA;&#xD;&#xA;ADDRESSES THAT ARE PROVIDED TO THE MULTISIG WALLET ARE SORTED&#xD;&#xA;&#xD;&#xA;Public keys of signers' wallets are compared byte-for-byte and sorted ascending before being used to generate the multisig address. For example, consider the scenario with three addresses, A, B, and C, starting with 5FUGT, 5HMfS, and 5GhKJ. If we build the ABC multisig with the accounts in that specific order (i.e. first A, then B, and C), the real order of the accounts in the multisig will be ACB. If, in the Extrinsic tab, we initiate a multisig call with C, the order of the other signatories will be first A, then B. If we put first B, then A, the transaction will fail." ContentLicense="CC BY-SA 4.0" />
  <row Id="38428" PostHistoryTypeId="2" PostId="9693" RevisionGUID="7975c35c-4faf-4873-b784-e235b15e825c" CreationDate="2023-08-22T09:39:50.230" UserId="234" Text="One question I have is if you are executing the multisig transaction from polkadot-js apps or from your own script/code ? &#xD;&#xA;&#xD;&#xA;Without knowing the answer to the above question, here are some thoughts/concerns based on the info you shared :&#xD;&#xA;&#xD;&#xA;- Regarding the `Failed（SignatoriesOutOfOrder）` error as Bill mentioned, you need to sort the signatories and every time exclude the sender. This is also shown in the [multisig example in txwrapper-core][4] : &#xD;&#xA;&#xD;&#xA;  - When we call [approveAsMulti][5] and the sender is Alice, we need to exclude Alice from the signatories and sort the array (we do that in this [function][6]). So then the array that we pass as an argument is the [otherSignatoriesSortedExAlice][7].&#xD;&#xA;  - Then when we call the [asMulti][8] and the sender is Bob, we need to  exclude Bob from the signatories and sort the array. So then what we pass as an argument is the [otherSignatoriesSortedExBob][9].&#xD;&#xA;&#xD;&#xA;- The `Failed InsufficientBalance）` error that you get is interesting but maybe it is related to the fact that from the signatories that you shared :&#xD;&#xA;  - the account [13ijWGM4g7oyk4H8bKz15cZM4MNuPxV5FLzoJ9fzUfUwRKWV][10] has sufficient balance&#xD;&#xA;  - same for the account [15JXvwngPdVPdxDxK6Bo68cf5JV6Z7s9tzYty7qVffKggrSb][11] &#xD;&#xA;  - but then I could not find the 3rd signatory [1ZDqARs7FJxnj2ntDRH2ouo3UEYGJpqUCd2zcnNc8wP5ciF][12] &#xD;&#xA;&#xD;&#xA;Maybe this is related?&#xD;&#xA;&#xD;&#xA;Last, in the [README][13] of the multisig example, we also added some [Key things][13] to pay attention when preparing a multisig transaction that you might find useful in your debugging process.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/extrinsic/16952833-2&#xD;&#xA;  [2]: https://polkadot.subscan.io/extrinsic/16952356-2&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/e526f80a91f75a3811059d4ee19b0f190005c5a2/frame/multisig/src/lib.rs#L401&#xD;&#xA;  [4]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts&#xD;&#xA;  [5]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts#L333&#xD;&#xA;  [6]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts#L105L120&#xD;&#xA;  [7]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts#L336&#xD;&#xA;  [8]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts#L498&#xD;&#xA;  [9]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts#L501&#xD;&#xA;  [10]: https://polkadot.subscan.io/account/13ijWGM4g7oyk4H8bKz15cZM4MNuPxV5FLzoJ9fzUfUwRKWV&#xD;&#xA;  [11]: https://polkadot.subscan.io/account/15JXvwngPdVPdxDxK6Bo68cf5JV6Z7s9tzYty7qVffKggrSb?tab=extrinsic&#xD;&#xA;  [12]: https://polkadot.subscan.io/account/1ZDqARs7FJxnj2ntDRH2ouo3UEYGJpqUCd2zcnNc8wP5ciF&#xD;&#xA;  [13]: https://github.com/paritytech/txwrapper-core/tree/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig#key-takeways" ContentLicense="CC BY-SA 4.0" />
  <row Id="38433" PostHistoryTypeId="5" PostId="9693" RevisionGUID="59879ebd-1037-41f9-ae64-95de33c69de5" CreationDate="2023-08-22T10:00:01.820" UserId="234" Comment="added 481 characters in body" Text="One question I have is if you are executing the multisig transaction from polkadot-js apps or from your own script/code ? &#xD;&#xA;&#xD;&#xA;Without knowing the answer to the above question, here are some thoughts/concerns based on the info you shared :&#xD;&#xA;&#xD;&#xA;- Regarding the `Failed（SignatoriesOutOfOrder）` error as Bill mentioned, you need to exclude the sender and sort the signatories. This is also shown in the [multisig example in txwrapper-core][1] : &#xD;&#xA;&#xD;&#xA;  - When we call [approveAsMulti][2] and the sender is Alice, we need to exclude Alice from the signatories and sort the array (we do that in this [function][3]). So then the array that we pass as an argument is the [otherSignatoriesSortedExAlice][4].&#xD;&#xA;  - Then when we call the [asMulti][5] and the sender is Bob, we need to  exclude Bob from the signatories and sort the array. So then what we pass as an argument is the [otherSignatoriesSortedExBob][6].&#xD;&#xA;&#xD;&#xA;- The `Failed InsufficientBalance）` error that you get is interesting but maybe it is related to the fact that from the signatories that you shared :&#xD;&#xA;  - the account [13ijWGM4g7oyk4H8bKz15cZM4MNuPxV5FLzoJ9fzUfUwRKWV][7] has sufficient balance&#xD;&#xA;  - same for the account [15JXvwngPdVPdxDxK6Bo68cf5JV6Z7s9tzYty7qVffKggrSb][8] &#xD;&#xA;  - but then I could not find the 3rd signatory [1ZDqARs7FJxnj2ntDRH2ouo3UEYGJpqUCd2zcnNc8wP5ciF][9] &#xD;&#xA;&#xD;&#xA;   Maybe this is related?&#xD;&#xA;&#xD;&#xA;- Regarding the failed `asMulti` calls ([16952833-2][10] and [16952356-2][11]) just to mention that :&#xD;&#xA;   - It is recommended to use [asMulti][12] when it is the final approval (so there is one or more successful `approveAsMulti` that have preceded it -depending on the threshold you set-) and &#xD;&#xA;   - Use [approveAsMulti][13] for the rest of the approvals.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Last, in the [README][14] of the multisig example, we also added some [key parts/concepts][14] to pay attention when preparing a multisig transaction that you might find useful in your debugging process.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts&#xD;&#xA;  [2]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts#L333&#xD;&#xA;  [3]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts#L105L120&#xD;&#xA;  [4]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts#L336&#xD;&#xA;  [5]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts#L498&#xD;&#xA;  [6]: https://github.com/paritytech/txwrapper-core/blob/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig/src/multisig.ts#L501&#xD;&#xA;  [7]: https://polkadot.subscan.io/account/13ijWGM4g7oyk4H8bKz15cZM4MNuPxV5FLzoJ9fzUfUwRKWV&#xD;&#xA;  [8]: https://polkadot.subscan.io/account/15JXvwngPdVPdxDxK6Bo68cf5JV6Z7s9tzYty7qVffKggrSb?tab=extrinsic&#xD;&#xA;  [9]: https://polkadot.subscan.io/account/1ZDqARs7FJxnj2ntDRH2ouo3UEYGJpqUCd2zcnNc8wP5ciF&#xD;&#xA;  [10]: https://polkadot.subscan.io/extrinsic/16952833-2&#xD;&#xA;  [11]: https://polkadot.subscan.io/extrinsic/16952356-2&#xD;&#xA;  [12]: https://github.com/paritytech/substrate/blob/e526f80a91f75a3811059d4ee19b0f190005c5a2/frame/multisig/src/lib.rs#L401&#xD;&#xA;  [13]: https://github.com/paritytech/substrate/blob/e526f80a91f75a3811059d4ee19b0f190005c5a2/frame/multisig/src/lib.rs#L335L336&#xD;&#xA;  [14]: https://github.com/paritytech/txwrapper-core/tree/62faea5bb276b9a8aa4e9155b24c29b5d4d46392/packages/txwrapper-examples/multisig#key-takeways" ContentLicense="CC BY-SA 4.0" />
  <row Id="38434" PostHistoryTypeId="2" PostId="9695" RevisionGUID="70bc940b-bf01-49d7-b4c3-b987f767b31c" CreationDate="2023-08-22T10:23:02.317" UserId="4577" Text="We want to create a pool and we need to provide asset1 and asset2 values to the function, we are not sure what those asset1 and 2 are exactly (we are not sure what it represents or where to find it).&#xD;&#xA;&#xD;&#xA;We concluded based on assumption(no documentation for this) that we need to provide id's of two assets that we created, the problem is that the assets id's are of type u32(when creating an asset in asset hub) but the createPool expects an asset of type -&gt; XcmV3MultiLocation (MultiAssetId).&#xD;&#xA;&#xD;&#xA;if that is true we are not sure how to convert the asset from u32 to MultiAssetId.&#xD;&#xA;&#xD;&#xA;Question: how do we represent an asset created in asset hub for which we have a u32 id as a type XcmV3MultiLocation (MultiAssetId) - so we can use it to create the pool.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Link to the pallet code: https://github.com/paritytech/substrate/blob/master/frame/asset-conversion/README.md&#xD;&#xA;&#xD;&#xA;polkadot.js westend asset hub / westmint rpc - assetConversion pallet:&#xD;&#xA;[![polkadot.js westend asset hub / westmint rpc - assetConversion pallet][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7KywV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38436" PostHistoryTypeId="1" PostId="9695" RevisionGUID="70bc940b-bf01-49d7-b4c3-b987f767b31c" CreationDate="2023-08-22T10:23:02.317" UserId="4577" Text="Polkadot - westend/westmint: how to create a pool using the asset conversion pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38437" PostHistoryTypeId="3" PostId="9695" RevisionGUID="70bc940b-bf01-49d7-b4c3-b987f767b31c" CreationDate="2023-08-22T10:23:02.317" UserId="4577" Text="|polkadot-js|polkadot|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38438" PostHistoryTypeId="52" PostId="9685" RevisionGUID="daef11c5-1c53-4944-8460-5958a5846839" CreationDate="2023-08-22T11:20:30.890" />
  <row Id="38439" PostHistoryTypeId="2" PostId="9696" RevisionGUID="1343bba7-4ffd-404d-a73c-1837ba262399" CreationDate="2023-08-22T12:30:21.823" UserId="106" Text="I would like to create a site for kids in which only the kids can see the information. The site should be accessible only to users under the age of 12.&#xD;&#xA;&#xD;&#xA;I'm not interested in tracking users and would like to guarantee as much anonymity as possible. &#xD;&#xA;&#xD;&#xA;Can I create an SIOPv2 login process in which the server can not correlate a repeat login?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38441" PostHistoryTypeId="1" PostId="9696" RevisionGUID="1343bba7-4ffd-404d-a73c-1837ba262399" CreationDate="2023-08-22T12:30:21.823" UserId="106" Text="obfuscate public key in presentation" ContentLicense="CC BY-SA 4.0" />
  <row Id="38442" PostHistoryTypeId="3" PostId="9696" RevisionGUID="1343bba7-4ffd-404d-a73c-1837ba262399" CreationDate="2023-08-22T12:30:21.823" UserId="106" Text="|kilt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38443" PostHistoryTypeId="2" PostId="9697" RevisionGUID="c324b4e3-efe4-448c-af0c-0eb44cd0845e" CreationDate="2023-08-22T14:18:40.390" UserId="3743" Text="As you mentioned above, the `createPool` call expects MultiLocation parameters of either `Native` or non-native AssetIds. For example: from the perspective of `AssetHub`, an AssetHub asset with an AssetId of `13` has a MultiLocation of &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;   parents: 0, &#xD;&#xA;   interior: { &#xD;&#xA;     X2: [{PalletInstance: 50}, {GeneralIndex: 13}]&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `PalletInstance` of `50` represents the `Assets` pallet on AssetHub and the `GeneralIndex` is the `u32` AssetId of the asset.&#xD;&#xA;&#xD;&#xA;So in this case you can substitute `13` with the `u32` AssetIds of the two assets you've created in order to get their represented MultiLocations to pass to `createPool`." ContentLicense="CC BY-SA 4.0" />
  <row Id="38445" PostHistoryTypeId="2" PostId="9698" RevisionGUID="45c0c2dc-bdbd-4007-a9a9-c3ddd1f666a9" CreationDate="2023-08-22T14:28:14.417" UserId="2762" Text="Check this guide on the Polkadot Support Page: [How to Create and Use a Multisig Account][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account" ContentLicense="CC BY-SA 4.0" />
  <row Id="38447" PostHistoryTypeId="5" PostId="9697" RevisionGUID="899f5fdd-ed8c-4eb9-8cdf-d0c42cd3e6ea" CreationDate="2023-08-22T14:32:09.450" UserId="3743" Comment="added 172 characters in body" Text="SAs you mentioned above, the `createPool` call expects MultiLocation parameters of either `Native` or non-native AssetIds. For example: from the perspective of `AssetHub`, an AssetHub asset with an AssetId of `13` has a MultiLocation of &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;   parents: 0, &#xD;&#xA;   interior: { &#xD;&#xA;     X2: [{PalletInstance: 50}, {GeneralIndex: 13}]&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `PalletInstance` of `50` represents the `Assets` pallet on AssetHub and the `GeneralIndex` is the `u32` AssetId of the asset.&#xD;&#xA;&#xD;&#xA;So in this case you can substitute `13` with the `u32` AssetIds of the two assets you've created in order to get their represented MultiLocations to pass to `createPool`.&#xD;&#xA;&#xD;&#xA;**Note**: One of the parameters must be of the `Native` asset which has a MultiLocation that can be represented as&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ parents: 1, interior: { 'Here': ''}}, &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So a complete representation of the `createPool` params would be 1 `custom` asset and the `Native` asset in any order such as &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ parents: 1, interior: { 'Here': ''}}, &#xD;&#xA;{ parents: 0, interior: { X2: [{'PalletInstance': 50}, {'GeneralIndex': 13}]}}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38448" PostHistoryTypeId="5" PostId="9697" RevisionGUID="85864afc-f790-4025-bae0-c3931ff36620" CreationDate="2023-08-22T14:37:45.587" UserId="3743" Comment="deleted 1 character in body" Text="As you mentioned above, the `createPool` call expects MultiLocation parameters of either `Native` or non-native AssetIds. For example: from the perspective of `AssetHub`, an AssetHub asset with an AssetId of `13` has a MultiLocation of &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;   parents: 0, &#xD;&#xA;   interior: { &#xD;&#xA;     X2: [{PalletInstance: 50}, {GeneralIndex: 13}]&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `PalletInstance` of `50` represents the `Assets` pallet on AssetHub and the `GeneralIndex` is the `u32` AssetId of the asset.&#xD;&#xA;&#xD;&#xA;So in this case you can substitute `13` with the `u32` AssetId of either of the two assets you've created in order to get their represented MultiLocations to pass to `createPool`.&#xD;&#xA;&#xD;&#xA;**Note**: One of the parameters must be of the `Native` asset which has a MultiLocation that can be represented as&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ parents: 1, interior: { 'Here': ''}}, &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With that in mind, a complete representation of the `createPool` params would be 1 `custom` asset and the `Native` asset in any order such as &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ parents: 1, interior: { 'Here': ''}}, &#xD;&#xA;{ parents: 0, interior: { X2: [{'PalletInstance': 50}, {'GeneralIndex': 13}]}}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38449" PostHistoryTypeId="5" PostId="9697" RevisionGUID="eba8570a-40dc-4256-8eae-70eb3b496e88" CreationDate="2023-08-22T14:44:24.020" UserId="3743" Comment="added 22 characters in body" Text="As you mentioned above, the `createPool` call expects MultiLocation parameters of either `Native` or non-native AssetIds. For example: from the perspective of `AssetHub`, an AssetHub asset with an AssetId of `13` has a MultiLocation of &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;   parents: 0, &#xD;&#xA;   interior: { &#xD;&#xA;     X2: [{PalletInstance: 50}, {GeneralIndex: 13}]&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `PalletInstance` of `50` represents the `Assets` pallet on AssetHub and the `GeneralIndex` is the `u32` AssetId of the asset.&#xD;&#xA;&#xD;&#xA;So in this case you can substitute `13` with the `u32` AssetId of either of the two assets you've created in order to get their represented MultiLocations to pass to `createPool`.&#xD;&#xA;&#xD;&#xA;**Note**: For AssetHub Westend, one of the parameters must be of the `Native` asset which has a MultiLocation that can be represented as&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ parents: 1, interior: { 'Here': ''}}, &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With that in mind, a complete representation of the `createPool` params would be 1 `custom` asset and the `Native` asset in any order such as &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ parents: 1, interior: { 'Here': ''}}, &#xD;&#xA;{ parents: 0, interior: { X2: [{'PalletInstance': 50}, {'GeneralIndex': 13}]}}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38450" PostHistoryTypeId="52" PostId="9690" RevisionGUID="2357fba7-ef0c-46bf-8a71-990efb835c61" CreationDate="2023-08-22T15:13:49.153" />
  <row Id="38451" PostHistoryTypeId="5" PostId="9697" RevisionGUID="f9ca976d-e874-4a4f-8cf5-366503243dc7" CreationDate="2023-08-22T15:22:03.313" UserId="3743" Comment="edited body" Text="As you mentioned above, the `createPool` call expects MultiLocation parameters of either `Native` or non-native AssetIds. For example: from the perspective of `AssetHub`, an AssetHub asset with an AssetId of `13` has a MultiLocation of &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;   parents: 0, &#xD;&#xA;   interior: { &#xD;&#xA;     X2: [{PalletInstance: 50}, {GeneralIndex: 13}]&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `PalletInstance` of `50` represents the `Assets` pallet on AssetHub and the `GeneralIndex` is the `u32` AssetId of the asset.&#xD;&#xA;&#xD;&#xA;So in this case you can substitute `13` with the `u32` AssetId of either of the two assets you've created in order to get their represented MultiLocations to pass to `createPool`.&#xD;&#xA;&#xD;&#xA;**Note**: For AssetHub Westend, one of the parameters must be of the `Native` asset which has a MultiLocation that can be represented as&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ parents: 0, interior: { 'Here': ''}}, &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With that in mind, a complete representation of the `createPool` params would be 1 `custom` asset and the `Native` asset in any order such as &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ parents: 0, interior: { 'Here': ''}}, &#xD;&#xA;{ parents: 0, interior: { X2: [{'PalletInstance': 50}, {'GeneralIndex': 13}]}}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38452" PostHistoryTypeId="2" PostId="9699" RevisionGUID="8c2ba5b1-6b7e-4bc2-a3d4-6d1bfefa49c5" CreationDate="2023-08-22T16:04:12.413" UserId="4580" Text="I'm currently working on understanding the process for establishing an HRMP channel between a parachain and the Asset Hub in Rococo (Rockmine). The link to the Rococo Asset Hub can be found here: [https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-asset-hub-rpc.polkadot.io#/explorer](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-asset-hub-rpc.polkadot.io#/explorer). &#xD;&#xA;&#xD;&#xA;I'm wondering whether a motion to the governance is required, similar to what would be done for Polkadot/Kusama, in order to initiate the HRMP channel. This would involve signing the `polkadotXcm.send` extrinsic containing the encoded call of `hrmp.hrmpAcceptOpenChannel` for incoming handshakes and `hrmp.initOpenChannel` for outgoing handshakes with root origin. Alternatively, is it necessary for someone with root access to perform this action on my behalf? I came across [https://github.com/paritytech/subport](https://github.com/paritytech/subport) for similar queries, but I'm uncertain if it's the appropriate resource to submit such an issue.&#xD;&#xA;&#xD;&#xA;I attempted to find information about this question in the Polkadot Wiki, Substrate Wiki, and here, but unfortunately, I haven't come across anything relevant. In the event that there isn't existing documentation, I plan to open an issue in the Substrate docs repository, with the intention of eventually incorporating the provided guidance into the official documentation." ContentLicense="CC BY-SA 4.0" />
  <row Id="38454" PostHistoryTypeId="1" PostId="9699" RevisionGUID="8c2ba5b1-6b7e-4bc2-a3d4-6d1bfefa49c5" CreationDate="2023-08-22T16:04:12.413" UserId="4580" Text="Inquiry Regarding Establishing HRMP Channel Between Parachain and Asset Hub in Rococo (Rockmine)" ContentLicense="CC BY-SA 4.0" />
  <row Id="38455" PostHistoryTypeId="3" PostId="9699" RevisionGUID="8c2ba5b1-6b7e-4bc2-a3d4-6d1bfefa49c5" CreationDate="2023-08-22T16:04:12.413" UserId="4580" Text="|rococo|hrmp|statemine|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38458" PostHistoryTypeId="5" PostId="9645" RevisionGUID="4fa0eb41-f3d9-47c1-b722-c4e00a5ce331" CreationDate="2023-08-22T18:10:42.630" UserId="3711" Comment="investigated how storage charges are made" Text="The storage deposit is the payment for the contract storage.&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0cdf7029017b70b7c83c21a4dc0aa1020e7914f6/frame/contracts/primitives/src/lib.rs#L57-L63&#xD;&#xA;&#xD;&#xA;It is used to pay for onchain storage for a contract, reduce storage bloat, and protect against spamming or a DOS attack.&#xD;&#xA;&#xD;&#xA;There is also a storage deposit limit which is the maximum storage deposit that can be charged from the caller for the storage consumed.&#xD;&#xA;- https://github.com/paritytech/substrate/blob/0cdf7029017b70b7c83c21a4dc0aa1020e7914f6/frame/contracts/src/lib.rs#L692&#xD;&#xA;&#xD;&#xA;Edit by @goastler on 19/08/2023:&#xD;&#xA;I've gone through the code linked above trying to work out how the storage deposit is charged. [Here's](https://github.com/paritytech/substrate/blob/94be94be6d26becd2395b58ae09ca31f596afe7d/frame/contracts/src/storage.rs#L50) the struct representing the contract. Whenever a contract's storage is changed, the difference in the size from before and after is charged to the caller (I believe this can be a refund if the contract storage has shrunk in total) - see [here](https://github.com/paritytech/substrate/blob/94be94be6d26becd2395b58ae09ca31f596afe7d/frame/contracts/src/storage.rs#L192C20-L192C20) and [here](https://github.com/paritytech/substrate/blob/94be94be6d26becd2395b58ae09ca31f596afe7d/frame/contracts/src/storage/meter.rs#L215C14-L215C14). This is taken out of the gas for the transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="38459" PostHistoryTypeId="24" PostId="9645" RevisionGUID="4fa0eb41-f3d9-47c1-b722-c4e00a5ce331" CreationDate="2023-08-22T18:10:42.630" Comment="Proposed by 3711 approved by 2673, 29 edit id of 524" ContentLicense="CC BY-SA 4.0" />
  <row Id="38460" PostHistoryTypeId="5" PostId="8507" RevisionGUID="0321a81e-a840-46ac-aa86-170d7b706d47" CreationDate="2023-08-22T18:11:08.057" UserId="4345" Comment="Added a link to a repo that offer a solution to the question" Text="I looked into this a little bit. It looks like there is nothing built in at the moment.&#xD;&#xA;&#xD;&#xA;In frame there is one signed extension [CheckedWeight][1]&#xD;&#xA;that make sure that the weight for a specific [DispatchClass][2] (Operational, Mandatory, Normal) does not exceed the configured limit. However this can't be done at the Pallet level.&#xD;&#xA;&#xD;&#xA;One solution would be to create a similar signed extension that gives a maximum authorized weights for pallet-contracts extrinsics.&#xD;&#xA;&#xD;&#xA;Edit: Looks like this repo offers a pallet that let you do exactly what we want: https://github.com/kalaninja/substrate-differential&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/frame_system/struct.CheckWeight.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/frame_support/dispatch/enum.DispatchClass.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="38461" PostHistoryTypeId="24" PostId="8507" RevisionGUID="0321a81e-a840-46ac-aa86-170d7b706d47" CreationDate="2023-08-22T18:11:08.057" Comment="Proposed by 4345 approved by 2673, 29 edit id of 513" ContentLicense="CC BY-SA 4.0" />
  <row Id="38462" PostHistoryTypeId="5" PostId="9596" RevisionGUID="72a39d50-d605-4acc-894f-05044fd81b4f" CreationDate="2023-08-22T18:11:14.570" UserId="354" Comment="fixed grammar and improved formatting" Text="I have tokens from faucet in Shibuya. I ran the command `cargo contract build` for `flipper contract`.&#xD;&#xA;&#xD;&#xA;When I want to deploy contract using `Upload &amp; deploy code`, I have `contracts.instantiateWithCode` broadcast but the contract is never deployed. It stays loading ! I can transfer, but not upload and deploy.&#xD;&#xA;&#xD;&#xA;Can anyone can help me ? Thanks !" ContentLicense="CC BY-SA 4.0" />
  <row Id="38463" PostHistoryTypeId="24" PostId="9596" RevisionGUID="72a39d50-d605-4acc-894f-05044fd81b4f" CreationDate="2023-08-22T18:11:14.570" Comment="Proposed by 354 approved by 2673, 29 edit id of 521" ContentLicense="CC BY-SA 4.0" />
  <row Id="38464" PostHistoryTypeId="5" PostId="7585" RevisionGUID="16548f73-c118-4bbc-8975-f42ebdea8b51" CreationDate="2023-08-22T18:11:23.133" UserId="2281" Comment="Formating change" Text="I'm trying to `rebuild` part of my `database` thanks to `events and extrinsics,` i managed to get it partly all , but i'm stuck with this one :&#xD;&#xA;&#xD;&#xA;    How to know on which validator a nominator was ?&#xD;&#xA;&#xD;&#xA;I tried to look to events but, apart the rewards amount, nothing point to which validator he was on, i tried  to look in extrinsics, i found the payoutStakers but it doesn't give me the information too.&#xD;&#xA;&#xD;&#xA;My guess was, to be able to look for a transaction to the nominator from the validator stash address from where he was rewarded...&#xD;&#xA;&#xD;&#xA;Does it seems logic ? Or anyone would have another idea ?&#xD;&#xA;&#xD;&#xA;Thanks a lot and have a good day !&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38465" PostHistoryTypeId="24" PostId="7585" RevisionGUID="16548f73-c118-4bbc-8975-f42ebdea8b51" CreationDate="2023-08-22T18:11:23.133" Comment="Proposed by 2281 approved by 29 edit id of 519" ContentLicense="CC BY-SA 4.0" />
  <row Id="38466" PostHistoryTypeId="5" PostId="9469" RevisionGUID="8cca5926-a260-44a6-b830-fe60574452aa" CreationDate="2023-08-22T18:11:28.343" UserId="3136" Comment="modify in body" Text="I am preparing to create a `smart-contract` on Astar using ink! programming language. The contract's main logic involves modifying the `cross-chain` asset USDT on the statemint chain. After going through all the libraries provided by ink!, I haven't found any relevant interface to modify `cross-chain` assets, specifically the USDT asset with ID 4294969280 on Astar. How can I modify the USDT asset within the ink! contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38467" PostHistoryTypeId="4" PostId="9469" RevisionGUID="8cca5926-a260-44a6-b830-fe60574452aa" CreationDate="2023-08-22T18:11:28.343" UserId="3136" Comment="modify in body" Text="How to get and modify cross-chain asset in contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38468" PostHistoryTypeId="24" PostId="9469" RevisionGUID="8cca5926-a260-44a6-b830-fe60574452aa" CreationDate="2023-08-22T18:11:28.343" Comment="Proposed by 3136 approved by 94, 29 edit id of 514" ContentLicense="CC BY-SA 4.0" />
  <row Id="38469" PostHistoryTypeId="5" PostId="9642" RevisionGUID="2c7bcf53-82aa-41a8-bdc9-016e27bb027a" CreationDate="2023-08-22T18:11:33.880" UserId="354" Comment="fixed grammar and improved formatting" Text="I am working with `ink_e2e` testing framework in ink smart contract, and I have encountered an error message that's a bit confusing. The error says: `mismatched types - expected String, found Vec&lt;u8&gt;`. However, I am certain that I am passing a `String` and not a `Vec&lt;u8&gt;`. To provide more context, I have added a screenshot of the relevant code snippet where the error occurs within the `ink_e2e` framework. Can someone help me understand why I'm getting this error when I am actually passing the expected type? Are there any nuances in the `ink_e2e` framework that might be causing this discrepancy?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZjfRP.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38470" PostHistoryTypeId="24" PostId="9642" RevisionGUID="2c7bcf53-82aa-41a8-bdc9-016e27bb027a" CreationDate="2023-08-22T18:11:33.880" Comment="Proposed by 354 approved by 2673, 29 edit id of 523" ContentLicense="CC BY-SA 4.0" />
  <row Id="38471" PostHistoryTypeId="52" PostId="9695" RevisionGUID="a05b2f1b-dd8d-481f-afea-9e953c6e1954" CreationDate="2023-08-22T18:29:01.640" />
  <row Id="38472" PostHistoryTypeId="2" PostId="9700" RevisionGUID="1e90d55b-a228-46c2-864e-71922f8af88f" CreationDate="2023-08-22T20:43:00.320" UserId="4545" Text="I'm having trouble understanding the verification process for storage changes that are applied during the on_initialize hooks of a pallet. From what I understand, imported blocks do not re-run any process that occurs in the hooks, so how do &quot;importers&quot; confirm that they accept the changes that are made outside of an extrinsic? &#xD;&#xA;&#xD;&#xA;For instance, in Kulupu, the rewards are delegated through the on_finalize process:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn on_finalize(now: T::BlockNumber) {&#xD;&#xA;	if let Some(author) = &lt;Self as Store&gt;::Author::get() {&#xD;&#xA;		let reward = Reward::&lt;T&gt;::get();&#xD;&#xA;		Self::do_reward(&amp;author, reward, now);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	let mints = Mints::&lt;T&gt;::get();&#xD;&#xA;	Self::do_mints(&amp;mints);&#xD;&#xA;&#xD;&#xA;	&lt;Self as Store&gt;::Author::kill();&#xD;&#xA;}&#xD;&#xA;    &#xD;&#xA;fn do_mints(mints: &amp;BTreeMap&lt;T::AccountId, BalanceOf&lt;T&gt;&gt;) {&#xD;&#xA;	for (destination, mint) in mints {&#xD;&#xA;		drop(T::Currency::deposit_creating(&amp;destination, *mint));&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don't see anywhere in that codebase that's checking what rewards a given node gave to an author. " ContentLicense="CC BY-SA 4.0" />
  <row Id="38474" PostHistoryTypeId="1" PostId="9700" RevisionGUID="1e90d55b-a228-46c2-864e-71922f8af88f" CreationDate="2023-08-22T20:43:00.320" UserId="4545" Text="Verifying storage changes made during block hooks" ContentLicense="CC BY-SA 4.0" />
  <row Id="38475" PostHistoryTypeId="3" PostId="9700" RevisionGUID="1e90d55b-a228-46c2-864e-71922f8af88f" CreationDate="2023-08-22T20:43:00.320" UserId="4545" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38476" PostHistoryTypeId="2" PostId="9701" RevisionGUID="67f07556-d352-4ae0-a7c7-0ea3b238ef18" CreationDate="2023-08-22T23:29:40.790" UserId="4574" Text="The solution was the fact that the account submitting the multisig transaction , ie the `approveAsMulti`, did not have a balance of at least `20.135` DOT, which apparently is required. Credit to Polkasafe for actually surfacing a human-readable error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/krcOc.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="38478" PostHistoryTypeId="5" PostId="9686" RevisionGUID="253b8eee-91a7-4f94-be20-35a1a1ca51e9" CreationDate="2023-08-23T02:53:20.423" UserId="2844" Comment="deleted 1 character in body" Text="Is there any way to call ink! smart contract function in substrate custom pallet? Someone please recommend some resources" ContentLicense="CC BY-SA 4.0" />
  <row Id="38479" PostHistoryTypeId="2" PostId="9702" RevisionGUID="ef13d2bf-2998-4890-91ba-f4914c0d1407" CreationDate="2023-08-23T03:20:45.097" UserId="2844" Text="How to write Dockerfile to spin up substrate node template, unit tests and/or integration tests, e2e tests, etc? Someone please suggest some resources." ContentLicense="CC BY-SA 4.0" />
  <row Id="38481" PostHistoryTypeId="1" PostId="9702" RevisionGUID="ef13d2bf-2998-4890-91ba-f4914c0d1407" CreationDate="2023-08-23T03:20:45.097" UserId="2844" Text="How to write Dockerfile to spin up substrate node template" ContentLicense="CC BY-SA 4.0" />
  <row Id="38482" PostHistoryTypeId="3" PostId="9702" RevisionGUID="ef13d2bf-2998-4890-91ba-f4914c0d1407" CreationDate="2023-08-23T03:20:45.097" UserId="2844" Text="|substrate-node-template|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38483" PostHistoryTypeId="2" PostId="9703" RevisionGUID="37b7e46c-ed7a-4976-9b08-620e337a2fec" CreationDate="2023-08-23T03:24:05.587" UserId="251" Text="https://github.com/hack-ink/slothunter/blob/main/test/guide.md&#xD;&#xA;&#xD;&#xA;Here is my test setup:&#xD;&#xA;```&#xD;&#xA;FROM archlinux:latest&#xD;&#xA;&#xD;&#xA;COPY\&#xD;&#xA;  data/polkadot\&#xD;&#xA;  data/rococo.json.fork-off\&#xD;&#xA;  ./&#xD;&#xA;&#xD;&#xA;RUN chmod u+x polkadot&#xD;&#xA;&#xD;&#xA;ENTRYPOINT ./polkadot --unsafe-rpc-external --rpc-cors all --rpc-methods unsafe --tmp --chain rococo.json.fork-off --alice&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;services:&#xD;&#xA;  db:&#xD;&#xA;    image: postgres:12&#xD;&#xA;    restart: always&#xD;&#xA;    volumes:&#xD;&#xA;      - ./data/db/postgres:/db/postgres&#xD;&#xA;    environment:&#xD;&#xA;      POSTGRES_USER: postgres&#xD;&#xA;      POSTGRES_PASSWORD: postgres&#xD;&#xA;      POSTGRES_DB: squid-archive&#xD;&#xA;&#xD;&#xA;  node:&#xD;&#xA;    build: .&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;9944:9944&quot;&#xD;&#xA;    volumes:&#xD;&#xA;      - ./data/db/node:/db/node&#xD;&#xA;&#xD;&#xA;  ingest:&#xD;&#xA;    depends_on:&#xD;&#xA;      - db&#xD;&#xA;      - node&#xD;&#xA;    restart: on-failure&#xD;&#xA;    image: subsquid/substrate-ingest:firesquid&#xD;&#xA;    extra_hosts:&#xD;&#xA;    - &quot;host.docker.internal:host-gateway&quot;&#xD;&#xA;    command:&#xD;&#xA;      [&#xD;&#xA;        &quot;-e&quot;,&#xD;&#xA;        &quot;ws://host.docker.internal:9944&quot;,&#xD;&#xA;        &quot;--out&quot;,&#xD;&#xA;        &quot;postgres://postgres:postgres@db:5432/squid-archive&quot;&#xD;&#xA;      ]&#xD;&#xA;&#xD;&#xA;  gateway:&#xD;&#xA;    depends_on:&#xD;&#xA;      - db&#xD;&#xA;    image: subsquid/substrate-gateway:firesquid&#xD;&#xA;    environment:&#xD;&#xA;      RUST_LOG: &quot;substrate_gateway=info,actix_server=info&quot;&#xD;&#xA;    command:&#xD;&#xA;      [&#xD;&#xA;        &quot;--database-url&quot;,&#xD;&#xA;        &quot;postgres://postgres:postgres@db:5432/squid-archive&quot;,&#xD;&#xA;        &quot;--database-max-connections&quot;,&#xD;&#xA;        &quot;3&quot;&#xD;&#xA;      ]&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;8000:8000&quot;&#xD;&#xA;&#xD;&#xA;  explorer:&#xD;&#xA;    image: subsquid/substrate-explorer:firesquid&#xD;&#xA;    environment:&#xD;&#xA;      DB_TYPE: postgres&#xD;&#xA;      DB_HOST: db&#xD;&#xA;      DB_PORT: &quot;5432&quot;&#xD;&#xA;      DB_NAME: &quot;squid-archive&quot;&#xD;&#xA;      DB_USER: &quot;postgres&quot;&#xD;&#xA;      DB_PASS: &quot;postgres&quot;&#xD;&#xA;    ports:&#xD;&#xA;      - &quot;3000:3000&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38485" PostHistoryTypeId="2" PostId="9704" RevisionGUID="3b481330-0252-4fe8-a7b0-3098efc21f70" CreationDate="2023-08-23T05:33:27.977" UserId="4425" Text="`#[ink(message)]&#xD;&#xA;        pub fn create_new_better_payment(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            _value: Balance,&#xD;&#xA;            _arbiter_provider: AccountId,&#xD;&#xA;            _deadline: u64,&#xD;&#xA;            //this deadline is deadline that will be added to current time once the audit is assigned to an auditor.&#xD;&#xA;        ) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let _now = self.env().block_timestamp();&#xD;&#xA;            let x = PaymentInfo {&#xD;&#xA;                value: _value,&#xD;&#xA;                starttime: _now,&#xD;&#xA;                auditor: self.env().caller(),&#xD;&#xA;                arbiterprovider: _arbiter_provider,&#xD;&#xA;                patron: self.env().caller(),&#xD;&#xA;                deadline: _deadline,&#xD;&#xA;                currentstatus: AuditStatus::AuditCreated,&#xD;&#xA;            };&#xD;&#xA;            assert_ne!(_value, 0);&#xD;&#xA;            let xyz = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                .call(self.stablecoin_address)&#xD;&#xA;                .gas_limit(0)&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(&#xD;&#xA;                        ink::selector_bytes!(&quot;transfer_from&quot;),&#xD;&#xA;                    ))&#xD;&#xA;                    .push_arg(self.env().caller())&#xD;&#xA;                    .push_arg(self.env().account_id())&#xD;&#xA;                    .push_arg(_value),&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;bool&gt;()&#xD;&#xA;                .invoke();&#xD;&#xA;            if xyz {&#xD;&#xA;                self.env().emit_event(TokenIncoming {&#xD;&#xA;                    id: self.current_audit_id,&#xD;&#xA;                });&#xD;&#xA;                self.audit_id_to_payment_info&#xD;&#xA;                    .insert(&amp;self.current_audit_id, &amp;x);&#xD;&#xA;                self.env().emit_event(AuditInfoUpdated {&#xD;&#xA;                    id: Some(self.current_audit_id),&#xD;&#xA;                    payment_info: Some(x),&#xD;&#xA;                    updated_by: Some(self.env().caller()),&#xD;&#xA;                });&#xD;&#xA;                self.current_audit_id = self.current_audit_id + 1;&#xD;&#xA;                return Ok(());&#xD;&#xA;            } else {&#xD;&#xA;                return Err(Error::InsufficientBalance);&#xD;&#xA;            }&#xD;&#xA;        }`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;why is this function misbehaving?&#xD;&#xA;I'm trying to send the caller's erc20 tokens to this contract in this function, The rest of everything is working, but not the cross-contract calling.&#xD;&#xA;what am I doing wrong here?&#xD;&#xA;This function will update the state of its contract but won't transfer the ERC20 tokens of other contract." ContentLicense="CC BY-SA 4.0" />
  <row Id="38487" PostHistoryTypeId="1" PostId="9704" RevisionGUID="3b481330-0252-4fe8-a7b0-3098efc21f70" CreationDate="2023-08-23T05:33:27.977" UserId="4425" Text="Why is this cross-contract call misbehaving" ContentLicense="CC BY-SA 4.0" />
  <row Id="38488" PostHistoryTypeId="3" PostId="9704" RevisionGUID="3b481330-0252-4fe8-a7b0-3098efc21f70" CreationDate="2023-08-23T05:33:27.977" UserId="4425" Text="|error|astar|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38489" PostHistoryTypeId="5" PostId="9704" RevisionGUID="e080fb16-d912-49b6-adaa-7e2ab400b7cb" CreationDate="2023-08-23T05:53:41.110" UserId="4425" Comment="added 3 characters in body" Text="````#[ink(message)]&#xD;&#xA;        pub fn create_new_better_payment(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            _value: Balance,&#xD;&#xA;            _arbiter_provider: AccountId,&#xD;&#xA;            _deadline: u64,&#xD;&#xA;            //this deadline is deadline that will be added to current time once the audit is assigned to an auditor.&#xD;&#xA;        ) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let _now = self.env().block_timestamp();&#xD;&#xA;            let x = PaymentInfo {&#xD;&#xA;                value: _value,&#xD;&#xA;                starttime: _now,&#xD;&#xA;                auditor: self.env().caller(),&#xD;&#xA;                arbiterprovider: _arbiter_provider,&#xD;&#xA;                patron: self.env().caller(),&#xD;&#xA;                deadline: _deadline,&#xD;&#xA;                currentstatus: AuditStatus::AuditCreated,&#xD;&#xA;            };&#xD;&#xA;            assert_ne!(_value, 0);&#xD;&#xA;            let xyz = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                .call(self.stablecoin_address)&#xD;&#xA;                .gas_limit(0)&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(&#xD;&#xA;                        ink::selector_bytes!(&quot;transfer_from&quot;),&#xD;&#xA;                    ))&#xD;&#xA;                    .push_arg(self.env().caller())&#xD;&#xA;                    .push_arg(self.env().account_id())&#xD;&#xA;                    .push_arg(_value),&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;bool&gt;()&#xD;&#xA;                .invoke();&#xD;&#xA;            if xyz {&#xD;&#xA;                self.env().emit_event(TokenIncoming {&#xD;&#xA;                    id: self.current_audit_id,&#xD;&#xA;                });&#xD;&#xA;                self.audit_id_to_payment_info&#xD;&#xA;                    .insert(&amp;self.current_audit_id, &amp;x);&#xD;&#xA;                self.env().emit_event(AuditInfoUpdated {&#xD;&#xA;                    id: Some(self.current_audit_id),&#xD;&#xA;                    payment_info: Some(x),&#xD;&#xA;                    updated_by: Some(self.env().caller()),&#xD;&#xA;                });&#xD;&#xA;                self.current_audit_id = self.current_audit_id + 1;&#xD;&#xA;                return Ok(());&#xD;&#xA;            } else {&#xD;&#xA;                return Err(Error::InsufficientBalance);&#xD;&#xA;            }&#xD;&#xA;        }`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;why is this function misbehaving?&#xD;&#xA;I'm trying to send the caller's erc20 tokens to this contract in this function, The rest of everything is working, but not the cross-contract calling.&#xD;&#xA;what am I doing wrong here?&#xD;&#xA;This function will update the state of its contract but won't transfer the ERC20 tokens of other contract." ContentLicense="CC BY-SA 4.0" />
  <row Id="38490" PostHistoryTypeId="50" PostId="6312" RevisionGUID="fa7e660c-5a65-435a-8a2d-bf88a49d723c" CreationDate="2023-08-23T06:06:31.170" UserId="-1" />
  <row Id="38491" PostHistoryTypeId="2" PostId="9705" RevisionGUID="74f20004-79d7-423e-8ab8-c25e258901bf" CreationDate="2023-08-23T06:24:42.990" UserId="1795" Text="Unfortunately what you are trying to do is authorization, while SIOPv2 deals with authentication. Hence, revealing the `sub` identifier is a required step in the SIOPv2 flow. You could look at OAuth as a way to perform user authorization, without revealing the subject of the user (but simply via bearer tokens).&#xD;&#xA;&#xD;&#xA;Mind that the Identity Provider still has access to the user identity, but the website (called relying party) does not need to have access to that information." ContentLicense="CC BY-SA 4.0" />
  <row Id="38493" PostHistoryTypeId="2" PostId="9706" RevisionGUID="e76fc26e-56d0-458f-994c-9e5e48eaaefa" CreationDate="2023-08-23T06:33:58.693" UserId="251" Text="https://github.com/paritytech/substrate/blob/e48e8368969d708abe7f200d345d8149ea3950ca/primitives/runtime/src/lib.rs#L685&#xD;&#xA;&#xD;&#xA;This means your accounts(Charlie or Dave) doesn't have enough balance to use. Therefore, your withdrawal request has failed." ContentLicense="CC BY-SA 4.0" />
  <row Id="38495" PostHistoryTypeId="5" PostId="9704" RevisionGUID="62dc2d60-7465-4fd3-ae99-04d76c0cc4d9" CreationDate="2023-08-23T07:22:54.330" UserId="354" Comment="corrected spelling, fixed grammar and improved formatting" Text="``` rust&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn create_new_better_payment(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            _value: Balance,&#xD;&#xA;            _arbiter_provider: AccountId,&#xD;&#xA;            _deadline: u64,&#xD;&#xA;            //this deadline is deadline that will be added to current time once the audit is assigned to an auditor.&#xD;&#xA;        ) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let _now = self.env().block_timestamp();&#xD;&#xA;            let x = PaymentInfo {&#xD;&#xA;                value: _value,&#xD;&#xA;                starttime: _now,&#xD;&#xA;                auditor: self.env().caller(),&#xD;&#xA;                arbiterprovider: _arbiter_provider,&#xD;&#xA;                patron: self.env().caller(),&#xD;&#xA;                deadline: _deadline,&#xD;&#xA;                currentstatus: AuditStatus::AuditCreated,&#xD;&#xA;            };&#xD;&#xA;            assert_ne!(_value, 0);&#xD;&#xA;            let xyz = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                .call(self.stablecoin_address)&#xD;&#xA;                .gas_limit(0)&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(&#xD;&#xA;                        ink::selector_bytes!(&quot;transfer_from&quot;),&#xD;&#xA;                    ))&#xD;&#xA;                    .push_arg(self.env().caller())&#xD;&#xA;                    .push_arg(self.env().account_id())&#xD;&#xA;                    .push_arg(_value),&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;bool&gt;()&#xD;&#xA;                .invoke();&#xD;&#xA;            if xyz {&#xD;&#xA;                self.env().emit_event(TokenIncoming {&#xD;&#xA;                    id: self.current_audit_id,&#xD;&#xA;                });&#xD;&#xA;                self.audit_id_to_payment_info&#xD;&#xA;                    .insert(&amp;self.current_audit_id, &amp;x);&#xD;&#xA;                self.env().emit_event(AuditInfoUpdated {&#xD;&#xA;                    id: Some(self.current_audit_id),&#xD;&#xA;                    payment_info: Some(x),&#xD;&#xA;                    updated_by: Some(self.env().caller()),&#xD;&#xA;                });&#xD;&#xA;                self.current_audit_id = self.current_audit_id + 1;&#xD;&#xA;                return Ok(());&#xD;&#xA;            } else {&#xD;&#xA;                return Err(Error::InsufficientBalance);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Why is this function misbehaving?&#xD;&#xA;&#xD;&#xA;I am trying to send the caller's `ERC20` tokens to this contract in the above function, The rest of everything is working, but not the cross-contract calling.&#xD;&#xA;&#xD;&#xA;What am I doing wrong here?&#xD;&#xA;This function will update the state of its contract but won't transfer the `ERC20` tokens of other contract." ContentLicense="CC BY-SA 4.0" />
  <row Id="38496" PostHistoryTypeId="24" PostId="9704" RevisionGUID="62dc2d60-7465-4fd3-ae99-04d76c0cc4d9" CreationDate="2023-08-23T07:22:54.330" Comment="Proposed by 354 approved by 4425 edit id of 527" ContentLicense="CC BY-SA 4.0" />
  <row Id="38497" PostHistoryTypeId="2" PostId="9707" RevisionGUID="e1255715-7319-4cf7-8010-aed526d17633" CreationDate="2023-08-23T07:35:12.243" UserId="2166" Text="You need to call `approve` before `transfer_from`. Most likely ERC20 contract returned an error. You need to handle errors from the cross contract call.&#xD;&#xA;&#xD;&#xA;See more about error handling [here](https://github.com/swankyhub/rmrk-lazy-mint/blob/507552ced20d948b6acb34eb75855f84f30357fa/rmrk_proxy/proxy.rs#L126)&#xD;&#xA;and [here](https://substrate.stackexchange.com/questions/7634/how-to-properly-handle-cross-contract-call-errors/7843#7843)" ContentLicense="CC BY-SA 4.0" />
  <row Id="38499" PostHistoryTypeId="50" PostId="9358" RevisionGUID="29b073df-3c60-420f-b37a-86e9ececb0c0" CreationDate="2023-08-23T08:02:10.277" UserId="-1" />
  <row Id="38500" PostHistoryTypeId="2" PostId="9708" RevisionGUID="c59ae6e1-19db-4eac-9751-432c14ee3293" CreationDate="2023-08-23T08:45:10.200" UserId="427" Text="In a custom pallet, I have been using set_lock() for a staking purpose. But once the lock is done I thought the free_balance() will reduce in the account's balance but it stays the same and only the below got updated. &#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      nonce: 2&#xD;&#xA;      consumers: 1&#xD;&#xA;      providers: 1&#xD;&#xA;      sufficients: 0&#xD;&#xA;      data: {&#xD;&#xA;        free: 999,999,973,799,998,827,689,554 // This was same before and after set_lock as well&#xD;&#xA;        reserved: 0&#xD;&#xA;        miscFrozen: 250,000,000,000,000,000,000,000&#xD;&#xA;        feeFrozen: 250,000,000,000,000,000,000,000&#xD;&#xA;      }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="38502" PostHistoryTypeId="1" PostId="9708" RevisionGUID="c59ae6e1-19db-4eac-9751-432c14ee3293" CreationDate="2023-08-23T08:45:10.200" UserId="427" Text="After using set_lock() should we manually subtract free_balance()?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38503" PostHistoryTypeId="3" PostId="9708" RevisionGUID="c59ae6e1-19db-4eac-9751-432c14ee3293" CreationDate="2023-08-23T08:45:10.200" UserId="427" Text="|balances|lockable-currency|locked-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38504" PostHistoryTypeId="2" PostId="9709" RevisionGUID="cf7afb54-b784-484b-aac1-724d9b841b3d" CreationDate="2023-08-23T08:57:34.537" UserId="151" Text="It might not be the best place to ask this question, but I'm not sure there are other place, especially since others could be interested in the answer.&#xD;&#xA;&#xD;&#xA;Why do the 3 repositories (Cumulus, Substrate and Polkadot) are going to be merged into a single repo (Polkadot SDK) ?&#xD;&#xA;&#xD;&#xA;I get that it is somehow &quot;easier&quot; to have all linked code in a single repo, but at the same time, some users/developers could want to just work with one of the project and not the other two." ContentLicense="CC BY-SA 4.0" />
  <row Id="38506" PostHistoryTypeId="1" PostId="9709" RevisionGUID="cf7afb54-b784-484b-aac1-724d9b841b3d" CreationDate="2023-08-23T08:57:34.537" UserId="151" Text="Why Substrate, Cumulus and Polkadot repositories are going to be merged into a mono-repo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38507" PostHistoryTypeId="3" PostId="9709" RevisionGUID="cf7afb54-b784-484b-aac1-724d9b841b3d" CreationDate="2023-08-23T08:57:34.537" UserId="151" Text="|polkadot|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38508" PostHistoryTypeId="2" PostId="9710" RevisionGUID="f7063033-0497-4480-8ab8-d1cc3a9ca36f" CreationDate="2023-08-23T09:06:46.247" UserId="3317" Text="There is a discussion about it on the [Polkadot Forum][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://forum.polkadot.network/t/psa-parity-is-currently-working-on-merging-the-polkadot-stack-repositories-into-one-single-repository/2883/14" ContentLicense="CC BY-SA 4.0" />
  <row Id="38510" PostHistoryTypeId="2" PostId="9711" RevisionGUID="6bc65b59-6481-4d52-a3c1-f05e249e268f" CreationDate="2023-08-23T09:20:17.007" UserId="251" Text="These two parts overlap: `available = free - lock`.&#xD;&#xA;&#xD;&#xA;The variable `lock` is simply a number and does not represent the amount of a token. It is possible to set a lock of 100 units on an account that only has 1 unit.&#xD;&#xA;&#xD;&#xA;Consider using the function `ensure_can_withdraw`.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;By the way, it is recommended to switch to using `freeze` instead of `lock` after implementing this change: https://github.com/paritytech/substrate/pull/12951." ContentLicense="CC BY-SA 4.0" />
  <row Id="38512" PostHistoryTypeId="5" PostId="9700" RevisionGUID="3f939d63-2f93-41c0-9351-fb2a4657ae08" CreationDate="2023-08-23T09:32:17.927" UserId="354" Comment="fixed grammar and improved formatting" Text="I am having trouble understanding the verification process for storage changes that are applied during the `on_initialize` hooks of a pallet. From what I understand, imported blocks do not re-run any process that occurs in the hooks, so how do &quot;importers&quot; confirm that they accept the changes that are made outside of an extrinsic? &#xD;&#xA;&#xD;&#xA;For instance, in Kulupu, the rewards are delegated through the `on_finalize` process:&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;fn on_finalize(now: T::BlockNumber) {&#xD;&#xA;	if let Some(author) = &lt;Self as Store&gt;::Author::get() {&#xD;&#xA;		let reward = Reward::&lt;T&gt;::get();&#xD;&#xA;		Self::do_reward(&amp;author, reward, now);&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	let mints = Mints::&lt;T&gt;::get();&#xD;&#xA;	Self::do_mints(&amp;mints);&#xD;&#xA;&#xD;&#xA;	&lt;Self as Store&gt;::Author::kill();&#xD;&#xA;}&#xD;&#xA;    &#xD;&#xA;fn do_mints(mints: &amp;BTreeMap&lt;T::AccountId, BalanceOf&lt;T&gt;&gt;) {&#xD;&#xA;	for (destination, mint) in mints {&#xD;&#xA;		drop(T::Currency::deposit_creating(&amp;destination, *mint));&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don't see anywhere in that codebase that's checking what rewards a given node gave to an author. " ContentLicense="CC BY-SA 4.0" />
  <row Id="38513" PostHistoryTypeId="6" PostId="9700" RevisionGUID="3f939d63-2f93-41c0-9351-fb2a4657ae08" CreationDate="2023-08-23T09:32:17.927" UserId="354" Comment="fixed grammar and improved formatting" Text="|pallet|substrate-node|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38514" PostHistoryTypeId="24" PostId="9700" RevisionGUID="3f939d63-2f93-41c0-9351-fb2a4657ae08" CreationDate="2023-08-23T09:32:17.927" Comment="Proposed by 354 approved by 3317, 251 edit id of 526" ContentLicense="CC BY-SA 4.0" />
  <row Id="38515" PostHistoryTypeId="2" PostId="9712" RevisionGUID="60df5413-f7fa-4e53-a8fa-9e880a2ddc2a" CreationDate="2023-08-23T09:38:37.113" UserId="351" Text="I have 2 scenerio&#xD;&#xA;&#xD;&#xA;1. Para A sends instruction to relay chain for sending tokens from Alice in Relay Chain to Bob inside relay chain using native relay chain tokens ( Remote transfer )&#xD;&#xA;&#xD;&#xA;But the instruction initiates from Para A whereby Alice signs the txn.&#xD;&#xA;&#xD;&#xA;    let message = Xcm::&lt;()&gt;(vec![&#xD;&#xA;    &#xD;&#xA;    				WithdrawAsset((Here, amount).into()),&#xD;&#xA;    &#xD;&#xA;    			 	buy_execution((Here, amount)),&#xD;&#xA;    &#xD;&#xA;    				DepositAsset { assets: All.into(), beneficiary: AccountId32 { network: None, id: BOB.into() }.into() },&#xD;&#xA;    			]);&#xD;&#xA;    &#xD;&#xA;    			&#xD;&#xA;    &#xD;&#xA;    			assert_ok!(&#xD;&#xA;    				VanePalletXcm::send_xcm(AccountId32 { network: None, id: ALICE.into() }, Parent, message)&#xD;&#xA;    			);&#xD;&#xA;&#xD;&#xA;But it doesnt work.&#xD;&#xA;&#xD;&#xA;But if I change the origin in the send_xcm call to be Here indicating using Para A soverign Account, then it works fine, but that will be sending the tokens from Para A to Bob and not Alice to Bob inside the Relay Chain&#xD;&#xA;&#xD;&#xA;    assert_ok!(&#xD;&#xA;    				VanePalletXcm::send_xcm(Here, Parent, message)&#xD;&#xA;    			);&#xD;&#xA;&#xD;&#xA;Does XCM not allowing signed sovereign accounts while sending xcm instructions to be processed remotely?&#xD;&#xA;&#xD;&#xA;And the error message is not verbose enough it just indicates the execution's success is false.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38517" PostHistoryTypeId="1" PostId="9712" RevisionGUID="60df5413-f7fa-4e53-a8fa-9e880a2ddc2a" CreationDate="2023-08-23T09:38:37.113" UserId="351" Text="XCM remote transactions call" ContentLicense="CC BY-SA 4.0" />
  <row Id="38518" PostHistoryTypeId="3" PostId="9712" RevisionGUID="60df5413-f7fa-4e53-a8fa-9e880a2ddc2a" CreationDate="2023-08-23T09:38:37.113" UserId="351" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38519" PostHistoryTypeId="2" PostId="9713" RevisionGUID="07b9ad1e-ce40-4f99-924f-66578fc85c2b" CreationDate="2023-08-23T09:46:47.263" UserId="3317" Text="Basically it comes down to the fact that the state root will differ if a node decides to give different rewards.&#xD;&#xA;&#xD;&#xA;In addition, how is a node able to give different rewards? This means they have a different runtime code which also means the state root is different, because the runtime code belongs to the state." ContentLicense="CC BY-SA 4.0" />
  <row Id="38521" PostHistoryTypeId="2" PostId="9714" RevisionGUID="114f7e6f-a4e2-451f-a2ed-aefb32a90e68" CreationDate="2023-08-23T09:47:31.000" UserId="151" Text="From https://polkadot-public.notion.site/Polkadot-SDK-FAQ-fbc4cecc2c46443fb37b9eeec2f0d85f&#xD;&#xA;&#xD;&#xA;**Why are we merging the three interdependent repositories into one?**&#xD;&#xA;    &#xD;&#xA;Merging the interdependent repositories into a single repository will simplify the development process, eliminate the need for “companion” PRs across multiple repositories, and improve collaboration among team members. A single repository will also make it easier to manage issues, pull requests, and documentation." ContentLicense="CC BY-SA 4.0" />
  <row Id="38523" PostHistoryTypeId="2" PostId="9715" RevisionGUID="c071a6a0-ea78-4f0f-bd68-2db826ce3a24" CreationDate="2023-08-23T10:15:25.413" UserId="4579" Text="I'm trying to use asset_conversion pallet to call quote prices, and get reserved rpc endpoints (defined [here][1]) &#xD;&#xA;&#xD;&#xA;In pallets official docs there is small [section][2] about calling that endpoint, but it doesn't specify how to encode input parameters. So I wanted to check if anyone know how to encode them (preferably in js/ts)&#xD;&#xA;&#xD;&#xA;Note: There is also this [file][3], explaining get reserves call, but still nothing about encoding&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L2377&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/pallet_asset_conversion/index.html&#xD;&#xA;  [3]: https://hackmd.io/@sn8Hc8CXRsmGb7q0kYzxHw/r190_X_m2" ContentLicense="CC BY-SA 4.0" />
  <row Id="38525" PostHistoryTypeId="1" PostId="9715" RevisionGUID="c071a6a0-ea78-4f0f-bd68-2db826ce3a24" CreationDate="2023-08-23T10:15:25.413" UserId="4579" Text="AssetConversionApi (asset_conversion_pallet) - How to encode function input parameters in price and reserves RPC calls?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38526" PostHistoryTypeId="3" PostId="9715" RevisionGUID="c071a6a0-ea78-4f0f-bd68-2db826ce3a24" CreationDate="2023-08-23T10:15:25.413" UserId="4579" Text="|pallet|rpc|assets|json-rpc|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38527" PostHistoryTypeId="2" PostId="9716" RevisionGUID="acfa4428-231d-4d42-9999-85c553166287" CreationDate="2023-08-23T10:39:45.170" UserId="3437" Text="I want to generate random number of a specific length. I can't use `insecure-randomness-collective-flip` because it's not recommended for production.&#xD;&#xA;&#xD;&#xA;I also can't use `rand` package because it doesn't support `no_std`.&#xD;&#xA;&#xD;&#xA;Is there any way or library which I can use to generate random number of a specific length?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="38529" PostHistoryTypeId="1" PostId="9716" RevisionGUID="acfa4428-231d-4d42-9999-85c553166287" CreationDate="2023-08-23T10:39:45.170" UserId="3437" Text="How to generate random number of a specific length in Substrate pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="38530" PostHistoryTypeId="3" PostId="9716" RevisionGUID="acfa4428-231d-4d42-9999-85c553166287" CreationDate="2023-08-23T10:39:45.170" UserId="3437" Text="|substrate-node-template|polkadot|random|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38531" PostHistoryTypeId="2" PostId="9717" RevisionGUID="58ca24a6-2110-4bb0-8a56-aadb665b856e" CreationDate="2023-08-23T10:59:14.127" UserId="4584" Text="I'm trying to run zombienet tests with 2 polkadot relay chain nodes and 1 parachain collator running the moonbeam binary. The test config is as follows:&#xD;&#xA;test.toml&#xD;&#xA;```&#xD;&#xA;[settings]&#xD;&#xA;timeout = 1000&#xD;&#xA;&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;[relaychain.default_resources]&#xD;&#xA;limits = { memory = &quot;4G&quot;, cpu = &quot;2&quot; }&#xD;&#xA;requests = { memory = &quot;2G&quot;, cpu = &quot;1&quot; }&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  args = [ &quot;--alice&quot;, &quot;-lparachain=debug,runtime=debug&quot; ]&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  args = [ &quot;--bob&quot;, &quot;-lparachain=debug,runtime=debug&quot;]&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1282&#xD;&#xA;genesis_wasm_path=&quot;./wasm/orig.wasm.hex&quot;&#xD;&#xA;chain = &quot;moonbase-local&quot;&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  command = &quot;moonbeam&quot;&#xD;&#xA;  prometheus_prefix = &quot;moonbeam_substrate&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;the test.zndsl is:&#xD;&#xA;```&#xD;&#xA;Description: PVF code size&#xD;&#xA;Network: ./0001-parachains-pvf-code-size-good.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# Check authority status.&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;&#xD;&#xA;# Ensure parachains are registered.&#xD;&#xA;alice: parachain 1282 is registered within 60 seconds&#xD;&#xA;&#xD;&#xA;# Ensure parachains made progress.&#xD;&#xA;# We have a different hard limit for the candidate max code size in different host implementations&#xD;&#xA;# so we can't check for a specific value here. we only ensure that block production continued&#xD;&#xA;&#xD;&#xA;alice: parachain 1282 block height is at least 10 within 200 seconds&#xD;&#xA;&#xD;&#xA;# Check code size.&#xD;&#xA;# We have a different hard limit for the candidate max code size in different host implementations&#xD;&#xA;# however if the code size is acceptable we should have it put in some metric bucket&#xD;&#xA;&#xD;&#xA;# check if we have at least 1 sample, but we should have many more.&#xD;&#xA;alice: reports histogram polkadot_parachain_candidate_validation_code_size has at least 1 samples in buckets [&quot;16384&quot;, &quot;32768&quot;, &quot;65536&quot;, &quot;131072&quot;, &quot;262144&quot;, &quot;524288&quot;, &quot;1048576&quot;, &quot;2097152&quot;, &quot;4194304&quot;, &quot;8388608&quot;, &quot;+Inf&quot;] within 30 seconds&#xD;&#xA;```&#xD;&#xA;The WASM is generated using moonbeam export-genesis-wasm &gt; fetched.wasm and then I'm using [wasm-injector][2] to convert it to ./wasm/orig.wasm.hex (to hexify and potentially uncompress the wasm). The problem is that the unmodified basic example fails with wasm panic code &quot;unreachable&quot;.&#xD;&#xA;The test is run using:&#xD;&#xA;&gt; zombienet -p native test test.zndsl&#xD;&#xA;&#xD;&#xA;Versions&#xD;&#xA;zombienet 1.3.65&#xD;&#xA;&#xD;&#xA;polkadot 0.9.43-ba42b9ce51d&#xD;&#xA;&#xD;&#xA;moonbeam 0.32.1-6ed87ceeb65&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6HlUn.png&#xD;&#xA;  [2]: https://github.com/LimeChain/wasm-injector" ContentLicense="CC BY-SA 4.0" />
  <row Id="38533" PostHistoryTypeId="1" PostId="9717" RevisionGUID="58ca24a6-2110-4bb0-8a56-aadb665b856e" CreationDate="2023-08-23T10:59:14.127" UserId="4584" Text="Moonbase parachain collator not producing blocks using zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="38534" PostHistoryTypeId="3" PostId="9717" RevisionGUID="58ca24a6-2110-4bb0-8a56-aadb665b856e" CreationDate="2023-08-23T10:59:14.127" UserId="4584" Text="|wasm|parachain-collator|zombienet|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38535" PostHistoryTypeId="50" PostId="9040" RevisionGUID="001aff62-392b-4ef8-b16d-3648f97debca" CreationDate="2023-08-23T12:07:00.787" UserId="-1" />
  <row Id="38536" PostHistoryTypeId="5" PostId="9713" RevisionGUID="dc8a904b-5067-4dc5-8b0e-cf2ee45e4698" CreationDate="2023-08-23T14:32:17.097" UserId="3317" Comment="added 365 characters in body" Text="&gt; From what I understand, imported blocks do not re-run any process that occurs in the hooks&#xD;&#xA;&#xD;&#xA;I'm not sure if I follow you here but every validator will run the runtime `hooks` logic when they validate/apply a block ([ref][1]). &#xD;&#xA;&#xD;&#xA;As for your example, it comes down to the fact that the state root will differ if a node decides to give different rewards.&#xD;&#xA;&#xD;&#xA;In addition, how is a node able to give different rewards? This means they have a different runtime code which again means the state root is different (runtime code belongs to the state).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/b7c18f1f5c9dc5c4ffa683e230303f084efe82cb/frame/executive/src/lib.rs#L451" ContentLicense="CC BY-SA 4.0" />
  <row Id="38537" PostHistoryTypeId="50" PostId="8353" RevisionGUID="064f2230-2411-450e-aa4a-d62a3845cf07" CreationDate="2023-08-23T15:01:50.187" UserId="-1" />
  <row Id="38538" PostHistoryTypeId="5" PostId="9713" RevisionGUID="0331da9c-fada-4a2b-bf88-b8ad9885ee63" CreationDate="2023-08-23T15:09:19.157" UserId="3317" Comment="added 756 characters in body" Text="&gt; From what I understand, imported blocks do not re-run any process that occurs in the hooks&#xD;&#xA;&#xD;&#xA;I'm not sure if I follow you here but every validator will run the runtime `hooks` logic when they validate/apply a block ([ref][1]).&#xD;&#xA;&#xD;&#xA;&gt; how do &quot;importers&quot; confirm that they accept the changes that are made outside of an extrinsic?&#xD;&#xA;&#xD;&#xA;Do they confirm the changes coming from applying extrinsics? They simply apply the block if everything is valid; valid extrinsics, valid blockbuilder, etc. If they don't apply them and more than 2/3 of the network does, it either has to leave the network or comply with the state of the blockchain and continue.&#xD;&#xA;&#xD;&#xA;&gt; I don't see anywhere in that codebase that's checking what rewards a given node gave to an author.&#xD;&#xA;&#xD;&#xA;How is this checked within an extrinsic? All the validators just run the state transition function (runtime code) which the `hooks` are a part of.&#xD;&#xA;&#xD;&#xA;The only way to give different rewards in the `hooks` (referring to your example) is to have a different state transition function (this also counts for extrinsics). And because the state transition function is part of the state, the state (root) will always be different for this malicious validator. As a result, this validator will therefore never be able to build a valid block or validate a block.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/b7c18f1f5c9dc5c4ffa683e230303f084efe82cb/frame/executive/src/lib.rs#L451" ContentLicense="CC BY-SA 4.0" />
  <row Id="38539" PostHistoryTypeId="5" PostId="9713" RevisionGUID="c25e03a4-e5fc-4511-bd19-253dc9595a68" CreationDate="2023-08-23T15:17:46.600" UserId="3317" Comment="added 756 characters in body" Text="&gt; From what I understand, imported blocks do not re-run any process that occurs in the hooks&#xD;&#xA;&#xD;&#xA;I'm not sure if I follow you here but every validator will run the runtime `hooks` logic when they validate/apply a block ([ref][1]).&#xD;&#xA;&#xD;&#xA;&gt; how do &quot;importers&quot; confirm that they accept the changes that are made outside of an extrinsic?&#xD;&#xA;&#xD;&#xA;Do they confirm the changes coming from applying extrinsics? They simply apply the block if everything is valid; valid extrinsics, valid blockbuilder, etc. If they don't apply them and more than 2/3 of the network does, it either has to leave the network or comply with the state of the blockchain and continue.&#xD;&#xA;&#xD;&#xA;&gt; I don't see anywhere in that codebase that's checking what rewards a given node gave to an author.&#xD;&#xA;&#xD;&#xA;How is this checked within an extrinsic? All the validators just run the state transition function (runtime code) which the `hooks` are a part of.&#xD;&#xA;&#xD;&#xA;The only way to give different rewards in the `hooks` (referring to your example) is to have a different state transition function (this also counts for extrinsics). And because the state transition function is part of the state, the state (root) will always be different for this malicious validator. As a result, this validator will never be able to build a valid block or validate a block. &#xD;&#xA;&#xD;&#xA;Last, all information you request can be verified. Pieces of data provided by (rpc) nodes are supported with a merkle proof. The 'caller' can simply verify the response with the valid state and block header it has, either by running a full node or light client.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/b7c18f1f5c9dc5c4ffa683e230303f084efe82cb/frame/executive/src/lib.rs#L451" ContentLicense="CC BY-SA 4.0" />
  <row Id="38540" PostHistoryTypeId="2" PostId="9718" RevisionGUID="f10032fb-06c9-4d87-88e4-1d125d2c0cc6" CreationDate="2023-08-23T15:32:36.773" UserId="3963" Text="This is a good question. In most situations, chains do not allow sovereign accounts to control funds for a local account with the same ID. So if Alice has ID `0x00...` on Para A then she cannot control account ID `0x00...` on the relay chain. As far as I understand, we do not allow this for two reasons:&#xD;&#xA;1) The relay chain does not trust Para A. Para A could sent a message to the relay chain with Alice (0x00) as origin while the message was never signed by Alice. &#xD;&#xA;2) If the relay chain does trust Para A and the messages are sent by the correct origin, it is still possible that Para A uses a different signature scheme then the Relay chain. So address `0x00...` on Para A could be controlled by a different private key then the private key controlling address `0x00...` on the relay chain.&#xD;&#xA;&#xD;&#xA;There are different approaches to solve this problem:&#xD;&#xA;1) Alice directly transfers the funds on the Relay chain. She can do this using conventional extrinsics or by executing an XCM locally on the relay chain using the [pallet_xcm execute extrinsic](https://github.com/paritytech/polkadot/blob/master/xcm/pallet-xcm/src/lib.rs#L900). Note that not all chains allow local execution of XCM using this extrinsic. &#xD;&#xA;2) The chain receiving this message maps the AccountId32 origin to some hashed accountId. For example AssetHubKusama and AssetHubPolkadot take this [approach](https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs#L82) by using the [HashedDescripion](https://paritytech.github.io/polkadot/doc/xcm_builder/struct.HashedDescription.html) type. Lets say in your example instead of sending the message to the relay chain you sent it to AssetHub. The origin of the message would be:&#xD;&#xA;```rust&#xD;&#xA;MultiLocation {&#xD;&#xA;    parent:1, &#xD;&#xA;    interior: X2(Parachain(*PARA A ID*), AccountId32 { network: None, id: ALICE.into() })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;AssetHub would convert this origin to some unique address by hashing the AccountId32 id with some extra description describing the location the message originated from. It can be something like: `hash(&quot;SiblingChain&quot; + *PARA A ID* + &quot;AccountId32&quot; + id)`&#xD;&#xA;&#xD;&#xA;3) In situations where there is a trust relationship between two chains and the signature schemes are the same, we can take another approach. For example, a system parachain like AssetHub could trust the relay chain. In this case AssetHub could configure it's xcm config to allow a sovereign AccountId32 from the relay chain to alias as local AccountId32 using the `AliasOrigin` [instruction](https://paritytech.github.io/xcm-docs/journey/origins.html#aliasorigin). &#xD;&#xA;This instruction would allow the sovereign user to replace the XCM origin from:&#xD;&#xA;```rust&#xD;&#xA;MultiLocation {&#xD;&#xA;    parent:0, &#xD;&#xA;    interior: X2(Parachain(*PARA A ID*), AccountId32 { network: None, id: ALICE.into() })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;into:&#xD;&#xA;```rust&#xD;&#xA;MultiLocation {&#xD;&#xA;    parent:0, &#xD;&#xA;    interior: X1(AccountId32 { network: None, id: ALICE.into()})&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This instruction would be used before the WithdrawAsset instruction. However, as I mentioned, this would only be used in special circumstances where chains trust each other like system chains. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I hope this answers your question!" ContentLicense="CC BY-SA 4.0" />
  <row Id="38542" PostHistoryTypeId="52" PostId="9709" RevisionGUID="eb53eca5-b223-4b91-ae52-94a14d1f9417" CreationDate="2023-08-23T18:45:05.357" />
  <row Id="38543" PostHistoryTypeId="2" PostId="9719" RevisionGUID="db9c572c-8190-437c-9494-b87fa60a4665" CreationDate="2023-08-23T22:11:44.253" UserId="3070" Text="We have been testing out the WS Provider in POlkadotJS and its working good with our custom pallets. &#xD;&#xA;However we just got substrate Connect working with our custom substrate based node. The assets pallet and the Nicks pallet are working with Connect, however when we are trying to query anything in our custom pallets we are getting no data returned when there is data returning from the saem query with the PolkadotJS WS Connect Provider&#xD;&#xA;&#xD;&#xA;our query is like this&#xD;&#xA;```&#xD;&#xA;let res = await api.query.messages.messageHeaders.entries(address)&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;do those commands work on Connect?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38545" PostHistoryTypeId="1" PostId="9719" RevisionGUID="db9c572c-8190-437c-9494-b87fa60a4665" CreationDate="2023-08-23T22:11:44.253" UserId="3070" Text="Using Substrate Connect to Query custom chain pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="38546" PostHistoryTypeId="3" PostId="9719" RevisionGUID="db9c572c-8190-437c-9494-b87fa60a4665" CreationDate="2023-08-23T22:11:44.253" UserId="3070" Text="|substrate-node|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38547" PostHistoryTypeId="5" PostId="9686" RevisionGUID="836cdadf-e708-4884-a9f9-60a673be8fe5" CreationDate="2023-08-24T02:35:07.673" UserId="2844" Comment="added 977 characters in body" Text="Is there any way to call ink! smart contract function in substrate custom pallet?&#xD;&#xA;&#xD;&#xA;We've found this [answer](https://substrate.stackexchange.com/a/3949/2844) where `bare_call` function is based on older version of `contract_pallet`. &#xD;&#xA;&#xD;&#xA;    // This ends up calling our contract!&#xD;&#xA;    pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;        who,&#xD;&#xA;        dest.clone(),&#xD;&#xA;        value,&#xD;&#xA;        gas_limit,&#xD;&#xA;        data,&#xD;&#xA;        debug,&#xD;&#xA;    )&#xD;&#xA;    .result?;&#xD;&#xA;&#xD;&#xA;Now in updated version `bare_call` function is like [this](https://github.com/paritytech/substrate/blob/b7c18f1f5c9dc5c4ffa683e230303f084efe82cb/frame/contracts/src/lib.rs#L1421C1-L1431C59),&#xD;&#xA;&#xD;&#xA;	pub fn bare_call(&#xD;&#xA;		origin: T::AccountId,&#xD;&#xA;		dest: T::AccountId,&#xD;&#xA;		value: BalanceOf&lt;T&gt;,&#xD;&#xA;		gas_limit: Weight,&#xD;&#xA;		storage_deposit_limit: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;		data: Vec&lt;u8&gt;,&#xD;&#xA;		debug: DebugInfo,&#xD;&#xA;		collect_events: CollectEvents,&#xD;&#xA;		determinism: Determinism,&#xD;&#xA;	) -&gt; ContractExecResult&lt;BalanceOf&lt;T&gt;, EventRecordOf&lt;T&gt;&gt; {}&#xD;&#xA;&#xD;&#xA;So, how to add `collect_events` and `determinism` parameters while calling `pallet_contracts::Pallet::&lt;T&gt;::bare_call()`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38548" PostHistoryTypeId="5" PostId="9686" RevisionGUID="63e9f852-452c-47c2-b38e-b47f0e821c15" CreationDate="2023-08-24T02:55:57.887" UserId="2844" Comment="added 190 characters in body" Text="Is there any way to call ink! smart contract function in substrate custom pallet?&#xD;&#xA;&#xD;&#xA;We've found this [answer](https://substrate.stackexchange.com/a/3949/2844) where `bare_call` function is based on older version of `contract_pallet`. &#xD;&#xA;&#xD;&#xA;    // This ends up calling our contract!&#xD;&#xA;    pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;        who,&#xD;&#xA;        dest.clone(),&#xD;&#xA;        value,&#xD;&#xA;        gas_limit,&#xD;&#xA;        data,&#xD;&#xA;        debug,&#xD;&#xA;    )&#xD;&#xA;    .result?;&#xD;&#xA;&#xD;&#xA;Now in updated version `bare_call` function is like [this](https://github.com/paritytech/substrate/blob/b7c18f1f5c9dc5c4ffa683e230303f084efe82cb/frame/contracts/src/lib.rs#L1421C1-L1431C59),&#xD;&#xA;&#xD;&#xA;	pub fn bare_call(&#xD;&#xA;		origin: T::AccountId,&#xD;&#xA;		dest: T::AccountId,&#xD;&#xA;		value: BalanceOf&lt;T&gt;,&#xD;&#xA;		gas_limit: Weight,&#xD;&#xA;		storage_deposit_limit: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;		data: Vec&lt;u8&gt;,&#xD;&#xA;		debug: DebugInfo,&#xD;&#xA;		collect_events: CollectEvents,&#xD;&#xA;		determinism: Determinism,&#xD;&#xA;	) -&gt; ContractExecResult&lt;BalanceOf&lt;T&gt;, EventRecordOf&lt;T&gt;&gt; {}&#xD;&#xA;&#xD;&#xA;This is our [github repo](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/dd2c6bd65bb36ce460416831782a785173805d63/pallets/community-loan-pool/src/lib.rs#L263) and right now we are getting this error,&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ZFwHh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38549" PostHistoryTypeId="2" PostId="9720" RevisionGUID="c16f22f6-24df-46ee-bb4d-1aaa62256644" CreationDate="2023-08-24T07:24:42.963" UserId="251" Text="Replacing the logger with the current code seems to be challenging. However, there is a `create_runner_with_logger_hook` available. Perhaps configuring the log profile could help achieve this.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/b7c18f1f5c9dc5c4ffa683e230303f084efe82cb/client/cli/src/lib.rs#L234&#xD;&#xA;https://github.com/paritytech/polkadot/blob/7f0eb5f06e4a403b10be1f7893859dde79f4d813/cli/src/command.rs#L239" ContentLicense="CC BY-SA 4.0" />
  <row Id="38551" PostHistoryTypeId="5" PostId="124" RevisionGUID="3d9cc11e-162c-42bf-a8ad-5ed130f14173" CreationDate="2023-08-24T08:15:22.697" UserId="3317" Comment="Fix links" Text="Not a full answer but some context that might help:&#xD;&#xA;&#xD;&#xA;Babe pallet provides 3 implementation of randomness:&#xD;&#xA;&#xD;&#xA; * [CurrentBlockRandomness][1]&#xD;&#xA; * [RandomnessFromOneEpochAgo][2]&#xD;&#xA; * [RandomnessFromTwoEpochAgo][3]&#xD;&#xA;&#xD;&#xA;In the documentation you can see the constraints and adversaries for each implementation.&#xD;&#xA;&#xD;&#xA;&gt; Would random number generation using Randomness be feasible in a production system?&#xD;&#xA;&#xD;&#xA;AFAIK it is already used to determine parachain auctions ending times in Kusama.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/6b07b97358abb4ae4e132c11579c3ed52cdd648c/frame/babe/src/randomness.rs#L131&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/6b07b97358abb4ae4e132c11579c3ed52cdd648c/frame/babe/src/randomness.rs#L82&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/6b07b97358abb4ae4e132c11579c3ed52cdd648c/frame/babe/src/randomness.rs#L54" ContentLicense="CC BY-SA 4.0" />
  <row Id="38552" PostHistoryTypeId="2" PostId="9721" RevisionGUID="1b1d1495-ca36-4661-ab27-b65b5a74d29f" CreationDate="2023-08-24T08:29:53.980" UserId="629" Text="Can you please provide more information around the custom pallet? The Substrate Connect, just fires up a light client and returns a wrapped PolkadotJS api, being the idea of seem-less integration of light clients on existing PJS apps; &#xD;&#xA;&#xD;&#xA;Can you please provide the code that you use for connecting the ScProvider and some more logs around what is happening when connected with Substrate connect? You can do that by adding the following configuration when connecting the `ScProvider`&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;provider.connect({ embeddedNodeConfig: { maxLogLevel: 4 }})&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It will be very helpful in order to identify the issue;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38554" PostHistoryTypeId="2" PostId="9722" RevisionGUID="0e2621e0-5480-4809-81d0-d2a4d3d0ee3f" CreationDate="2023-08-24T09:05:49.677" UserId="267" Text="I want to call function on every block in ink smart contract?&#xD;&#xA;&#xD;&#xA;So when new block is initialized, function is called automatically. Is that possible in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38556" PostHistoryTypeId="1" PostId="9722" RevisionGUID="0e2621e0-5480-4809-81d0-d2a4d3d0ee3f" CreationDate="2023-08-24T09:05:49.677" UserId="267" Text="Call function when block is initialized" ContentLicense="CC BY-SA 4.0" />
  <row Id="38557" PostHistoryTypeId="3" PostId="9722" RevisionGUID="0e2621e0-5480-4809-81d0-d2a4d3d0ee3f" CreationDate="2023-08-24T09:05:49.677" UserId="267" Text="|ink|blocknumber|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38558" PostHistoryTypeId="2" PostId="9723" RevisionGUID="e3166710-6813-4db6-b2e4-18bc29cb0143" CreationDate="2023-08-24T09:19:24.380" UserId="2762" Text="The instructions are probably correct, but there is probably something wrong with your Configuration of the XCM executor. &#xD;&#xA;Like other components in Substrate and FRAME-based chains, the XCM executor is modular and configurable, and has to be properlty configured in order to make the XCM instructions between chains work.&#xD;&#xA;&#xD;&#xA;If you want to go more in deep in the configuration I suggest you watch this video: [XCM Config &amp; Pallet-XCM | Polkadot Deep Dives][1].&#xD;&#xA;&#xD;&#xA;The `XcmError::TooExpensive` is triggered with the `BuyExecution` instruction, when the fees declared to purchase weight are insufficient. So you probably need to have funds on the asset you are paying fees or modify the Config to accept other assets. &#xD;&#xA;&#xD;&#xA;And the `XcmError::UntrustedReserveLocation` means that the origin register doesn't contain a valid value for a reserve transfer notification. So probably here you can take a look in the previous StackExchange question suggested by @wakar-seraj-khan [I want to enable Teleport Asset functionality in XCM between two parachains. How should I do it? Also, how do I teleport asset from Para1 to Para2?][2].&#xD;&#xA;&#xD;&#xA;In case you want to test with the same setup of the video you are watching, you need the same binaries he is using (notice the version is an old one, as the video):&#xD;&#xA;&#xD;&#xA;Clone &amp; build Polkadot&#xD;&#xA;&#xD;&#xA;    git clone -b release-v0.9.30 --depth 1 https://github.com/paritytech/polkadot&#xD;&#xA;    cd polkadot &amp;&amp; cargo build –-release&#xD;&#xA;&#xD;&#xA;Clone &amp; build Cumulus&#xD;&#xA;&#xD;&#xA;    git clone -b polkadot-v0.9.30 --depth 1 https://github.com/paritytech/cumulus&#xD;&#xA;    cd cumulus &amp;&amp; cargo build –-release&#xD;&#xA;&#xD;&#xA;Clone &amp; build [Trappist][3]&#xD;&#xA;&#xD;&#xA;    git clone --depth 1 https://github.com/paritytech/trappist&#xD;&#xA;    cd trappist &amp;&amp; cargo build --release&#xD;&#xA;&#xD;&#xA;You can take a look in the XCM configuration Trappist has implemented [here][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.youtube.com/watch?v=bFMvWmU1pYI&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/6776/i-want-to-enable-teleport-asset-functionality-in-xcm-between-two-parachains-how/8990#8990&#xD;&#xA;  [3]: https://github.com/paritytech/trappist&#xD;&#xA;  [4]: https://github.com/paritytech/trappist/blob/main/runtime/trappist/src/xcm_config.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="38560" PostHistoryTypeId="2" PostId="9724" RevisionGUID="4a740fdd-6f84-41ff-b53b-5c35b2118c98" CreationDate="2023-08-24T09:22:26.770" UserId="386" Text="I am working on a Substrate node that needs to **sync with specific live networks**. My goal is to ensure that the node is able to initiate and maintain synchronization with these networks, and I would like to **integrate this testing into my continuous integration (CI) pipeline**.&#xD;&#xA;&#xD;&#xA;I'm looking for a convenient and **scalable strategy** that can be extended with other test cases in the future. Here's what I have in mind so far:&#xD;&#xA;&#xD;&#xA;1. **Environment Setup**: Should I connect directly to the live network, or is it better to replicate the conditions in a controlled environment?&#xD;&#xA;2. **Node Launch and Configuration**: How can I automate the launch of the node with the correct parameters for each network?&#xD;&#xA;3. **Monitoring and Verification**: What tools or scripts are recommended to monitor the synchronization process and verify success? Is there any existing solution that could simplify this task?&#xD;&#xA;4. **Integration with CI**: What are the best practices for integrating this testing into a CI pipeline to ensure consistent verification?&#xD;&#xA;5. **Extensibility**: How can I structure these tests so that they can be easily extended with additional cases or adapted to other networks in the future?&#xD;&#xA;&#xD;&#xA;I appreciate any insights, examples, or references that can guide me in developing an efficient and robust testing strategy. Thank you!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38562" PostHistoryTypeId="1" PostId="9724" RevisionGUID="4a740fdd-6f84-41ff-b53b-5c35b2118c98" CreationDate="2023-08-24T09:22:26.770" UserId="386" Text="Automating Sync Tests for a Substrate Node: Best Approaches?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38563" PostHistoryTypeId="3" PostId="9724" RevisionGUID="4a740fdd-6f84-41ff-b53b-5c35b2118c98" CreationDate="2023-08-24T09:22:26.770" UserId="386" Text="|testing|cicd|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38564" PostHistoryTypeId="2" PostId="9725" RevisionGUID="feef0a09-8d64-4418-8650-21e62684c515" CreationDate="2023-08-24T09:26:25.590" UserId="2762" Text="Take a look into the [xcm-examples repository][1] and use the [setup up][2] it has for testing, mocking the runtime and some of the features you need to mock for  testing XCM calls.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/xcm-docs/tree/main/examples&#xD;&#xA;  [2]: https://github.com/paritytech/xcm-docs/blob/main/examples/src/simple_test_net/mod.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="38566" PostHistoryTypeId="5" PostId="9686" RevisionGUID="472ab917-e1bd-4219-a586-e765c0332467" CreationDate="2023-08-24T09:30:04.540" UserId="2844" Comment="deleted 1 character in body" Text="Is there any way to call ink! smart contract function in substrate custom pallet?&#xD;&#xA;&#xD;&#xA;We've found this [answer](https://substrate.stackexchange.com/a/3949/2844) where `bare_call` function is based on older version of `contract_pallet`. &#xD;&#xA;&#xD;&#xA;    // This ends up calling our contract!&#xD;&#xA;    pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;        who,&#xD;&#xA;        dest.clone(),&#xD;&#xA;        value,&#xD;&#xA;        gas_limit,&#xD;&#xA;        data,&#xD;&#xA;        debug,&#xD;&#xA;    )&#xD;&#xA;    .result?;&#xD;&#xA;&#xD;&#xA;Now in updated version `bare_call` function is like [this](https://github.com/paritytech/substrate/blob/b7c18f1f5c9dc5c4ffa683e230303f084efe82cb/frame/contracts/src/lib.rs#L1421C1-L1431C59),&#xD;&#xA;&#xD;&#xA;	pub fn bare_call(&#xD;&#xA;		origin: T::AccountId,&#xD;&#xA;		dest: T::AccountId,&#xD;&#xA;		value: BalanceOf&lt;T&gt;,&#xD;&#xA;		gas_limit: Weight,&#xD;&#xA;		storage_deposit_limit: Option&lt;BalanceOf&lt;T&gt;&gt;,&#xD;&#xA;		data: Vec&lt;u8&gt;,&#xD;&#xA;		debug: DebugInfo,&#xD;&#xA;		collect_events: CollectEvents,&#xD;&#xA;		determinism: Determinism,&#xD;&#xA;	) -&gt; ContractExecResult&lt;BalanceOf&lt;T&gt;, EventRecordOf&lt;T&gt;&gt; {}&#xD;&#xA;&#xD;&#xA;This is our [github repo](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/e57c8b14e50a7a06de53b1efa929c92974e1a3e4/pallets/community-loan-pool/src/lib.rs#L82) and right now we are getting this error,&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate % cargo build --release&#xD;&#xA;       Compiling node-template-runtime v4.0.0-dev (/Users/ganesholi/xcav/MarketplaceMVP_Substrate/runtime)&#xD;&#xA;       Compiling pallet-community-loan-pool v4.0.0-dev (/Users/ganesholi/xcav/MarketplaceMVP_Substrate/pallets/community-loan-pool)&#xD;&#xA;    warning: unused import: `frame_support::traits::tokens::Balance`&#xD;&#xA;      --&gt; pallets/community-loan-pool/src/lib.rs:58:6&#xD;&#xA;       |&#xD;&#xA;    58 |     use frame_support::traits::tokens::Balance;&#xD;&#xA;       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;       |&#xD;&#xA;       = note: `#[warn(unused_imports)]` on by default&#xD;&#xA;    &#xD;&#xA;    error[E0308]: arguments to this function are incorrect&#xD;&#xA;        --&gt; pallets/community-loan-pool/src/lib.rs:264:4&#xD;&#xA;         |&#xD;&#xA;    264  |             pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;         |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    ...&#xD;&#xA;    268  |                 gas_limit,&#xD;&#xA;         |                 --------- expected struct `Weight`, found integer&#xD;&#xA;         |&#xD;&#xA;    note: expected pallet_contracts::Config::Currency, found pallet::Config::Currency&#xD;&#xA;        --&gt; pallets/community-loan-pool/src/lib.rs:267:5&#xD;&#xA;         |&#xD;&#xA;    267  |                 value,&#xD;&#xA;         |                 ^^^^^&#xD;&#xA;         = note: expected associated type `&lt;&lt;T as pallet_contracts::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as SysConfig&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;                    found associated type `&lt;&lt;T as pallet::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as SysConfig&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;    note: expected pallet_contracts::Config::Currency, found pallet::Config::Currency&#xD;&#xA;        --&gt; pallets/community-loan-pool/src/lib.rs:269:5&#xD;&#xA;         |&#xD;&#xA;    269  |                 storage_deposit_limit,&#xD;&#xA;         |                 ^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;         = note: expected enum `std::option::Option&lt;&lt;&lt;T as pallet_contracts::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as SysConfig&gt;::AccountId&gt;&gt;::Balance&gt;`&#xD;&#xA;                    found enum `std::option::Option&lt;&lt;&lt;T as pallet::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as SysConfig&gt;::AccountId&gt;&gt;::Balance&gt;`&#xD;&#xA;    note: associated function defined here&#xD;&#xA;        --&gt; /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/98f2e34/frame/contracts/src/lib.rs:1160:9&#xD;&#xA;         |&#xD;&#xA;    1160 |     pub fn bare_call(&#xD;&#xA;         |            ^^^^^^^^^&#xD;&#xA;    help: call `Into::into` on this expression to convert `{integer}` into `Weight`&#xD;&#xA;         |&#xD;&#xA;    268  |                 gas_limit.into(),&#xD;&#xA;         |                          +++++++&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0308`.&#xD;&#xA;    warning: `pallet-community-loan-pool` (lib) generated 1 warning&#xD;&#xA;    error: could not compile `pallet-community-loan-pool` due to previous error; 1 warning emitted&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/ganesholi/xcav/MarketplaceMVP_Substrate/runtime)`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      process didn't exit successfully: `/Users/ganesholi/xcav/MarketplaceMVP_Substrate/target/release/build/node-template-runtime-666e594096483e01/build-script-build` (exit status: 1)&#xD;&#xA;      --- stdout&#xD;&#xA;      Information that should be included in a bug report.&#xD;&#xA;      Executing build command: RUSTFLAGS=&quot;-C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/ganesholi/.rustup/toolchains/nightly-2023-01-01-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/ganesholi/xcav/MarketplaceMVP_Substrate/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;      Using rustc version: rustc 1.68.0-nightly (574b64a97 2022-12-31)&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;      --- stderr&#xD;&#xA;         Compiling pallet-community-loan-pool v4.0.0-dev (/Users/ganesholi/xcav/MarketplaceMVP_Substrate/pallets/community-loan-pool)&#xD;&#xA;      warning: unused import: `frame_support::traits::tokens::Balance`&#xD;&#xA;        --&gt; /Users/ganesholi/xcav/MarketplaceMVP_Substrate/pallets/community-loan-pool/src/lib.rs:58:6&#xD;&#xA;         |&#xD;&#xA;      58 |     use frame_support::traits::tokens::Balance;&#xD;&#xA;         |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;         |&#xD;&#xA;         = note: `#[warn(unused_imports)]` on by default&#xD;&#xA;    &#xD;&#xA;      error[E0308]: arguments to this function are incorrect&#xD;&#xA;          --&gt; /Users/ganesholi/xcav/MarketplaceMVP_Substrate/pallets/community-loan-pool/src/lib.rs:264:4&#xD;&#xA;           |&#xD;&#xA;      264  |             pallet_contracts::Pallet::&lt;T&gt;::bare_call(&#xD;&#xA;           |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;      ...&#xD;&#xA;      268  |                 gas_limit,&#xD;&#xA;           |                 --------- expected struct `Weight`, found integer&#xD;&#xA;           |&#xD;&#xA;      note: expected pallet_contracts::Config::Currency, found pallet::Config::Currency&#xD;&#xA;          --&gt; /Users/ganesholi/xcav/MarketplaceMVP_Substrate/pallets/community-loan-pool/src/lib.rs:267:5&#xD;&#xA;           |&#xD;&#xA;      267  |                 value,&#xD;&#xA;           |                 ^^^^^&#xD;&#xA;           = note: expected associated type `&lt;&lt;T as pallet_contracts::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as SysConfig&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;                      found associated type `&lt;&lt;T as pallet::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as SysConfig&gt;::AccountId&gt;&gt;::Balance`&#xD;&#xA;      note: expected pallet_contracts::Config::Currency, found pallet::Config::Currency&#xD;&#xA;          --&gt; /Users/ganesholi/xcav/MarketplaceMVP_Substrate/pallets/community-loan-pool/src/lib.rs:269:5&#xD;&#xA;           |&#xD;&#xA;      269  |                 storage_deposit_limit,&#xD;&#xA;           |                 ^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;           = note: expected enum `Option&lt;&lt;&lt;T as pallet_contracts::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as SysConfig&gt;::AccountId&gt;&gt;::Balance&gt;`&#xD;&#xA;                      found enum `Option&lt;&lt;&lt;T as pallet::Config&gt;::Currency as frame_support::traits::Currency&lt;&lt;T as SysConfig&gt;::AccountId&gt;&gt;::Balance&gt;`&#xD;&#xA;      note: associated function defined here&#xD;&#xA;          --&gt; /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/98f2e34/frame/contracts/src/lib.rs:1160:9&#xD;&#xA;           |&#xD;&#xA;      1160 |     pub fn bare_call(&#xD;&#xA;           |            ^^^^^^^^^&#xD;&#xA;    &#xD;&#xA;      For more information about this error, try `rustc --explain E0308`.&#xD;&#xA;      warning: `pallet-community-loan-pool` (lib) generated 1 warning&#xD;&#xA;      error: could not compile `pallet-community-loan-pool` due to previous error; 1 warning emitted&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air MarketplaceMVP_Substrate %&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="38567" PostHistoryTypeId="2" PostId="9726" RevisionGUID="56de8205-371b-4114-a9ef-879aee5219c3" CreationDate="2023-08-24T09:35:45.970" UserId="2762" Text="The link you shared was broken, is it clear how to perform the DepositAsset instruction in this link: [DepositAsset instruction][1]?&#xD;&#xA;&#xD;&#xA;Another example I suggest you to take a look is this [transfer example][2], is a code example where ALICE transfers relay native tokens from parachain A to parachain B.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/transfer-assets-with-xcm/#depositasset-instruction&#xD;&#xA;  [2]: https://github.com/paritytech/xcm-docs/blob/main/examples/src/1_transfers/reserve.rs#L11" ContentLicense="CC BY-SA 4.0" />
  <row Id="38569" PostHistoryTypeId="2" PostId="9727" RevisionGUID="2be57955-28b0-4f64-a6fa-692e71be19ac" CreationDate="2023-08-24T09:41:05.257" UserId="2762" Text="[Here][1] you can see an example that works for me.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let create_collection = relay_chain::RuntimeCall::Uniques(pallet_uniques::Call::&lt;&#xD;&#xA;			relay_chain::Runtime,&#xD;&#xA;		&gt;::create {&#xD;&#xA;			collection: 1u32,&#xD;&#xA;			admin: parachain_sovereign_account_id(1),&#xD;&#xA;});&#xD;&#xA;let mint = relay_chain::RuntimeCall::Uniques(pallet_uniques::Call::&lt;relay_chain::Runtime&gt;::mint {&#xD;&#xA;				collection: 1u32,&#xD;&#xA;				item: 1u32,&#xD;&#xA;				owner: ALICE,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;let create_collection_weight_estimation = Weight::from_parts(1_000_000_000, 10_000);&#xD;&#xA;let mint_nft_weight_estimation = Weight::from_parts(1_000_000_000, 10_000);&#xD;&#xA;let message = Xcm(vec![&#xD;&#xA;			WithdrawAsset((Here, fees).into()),&#xD;&#xA;			BuyExecution { fees: (Here, fees).into(), weight_limit: WeightLimit::Unlimited },&#xD;&#xA;			Transact {&#xD;&#xA;				origin_kind: OriginKind::SovereignAccount,&#xD;&#xA;				require_weight_at_most: create_collection_weight_estimation,&#xD;&#xA;				call: create_collection.encode().into(),&#xD;&#xA;			},&#xD;&#xA;			Transact {&#xD;&#xA;				origin_kind: OriginKind::SovereignAccount,&#xD;&#xA;				require_weight_at_most: mint_nft_weight_estimation,&#xD;&#xA;				call: mint.encode().into(),&#xD;&#xA;			},&#xD;&#xA;		]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In your case you can skip the create_collection, if is already exist in the relay chain&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AlexD10S/xcm-playground/blob/master/src/mint_nft/mod.rs#L14" ContentLicense="CC BY-SA 4.0" />
  <row Id="38571" PostHistoryTypeId="2" PostId="9728" RevisionGUID="584d0ed2-6b07-4647-ad26-ebb422052fb2" CreationDate="2023-08-24T09:49:24.253" UserId="2762" Text="The link you shared is broken, and I can't see the instructions you have use, but you are probably missing the second part of a Reserve-backed transfers, where the destination receives the instruction and processes it, minting the correct amount of derivative assets.&#xD;&#xA;&#xD;&#xA;Take a look in the documentation here: [Reserve-backed transfers][1] and a bunch of code examples here: https://github.com/paritytech/xcm-docs/blob/main/examples/src/1_transfers/reserve.rs&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/xcm-docs/journey/transfers/reserve.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="38573" PostHistoryTypeId="2" PostId="9729" RevisionGUID="9a89179f-3216-4954-81f1-024fa78e4ed1" CreationDate="2023-08-24T10:16:51.313" UserId="2762" Text="Check this tutorial about [how to open HRMP with AssetHub][1], where it explains in detail how to opening the channel from AssetHub to your parachain and how to open the channel from your parachain to AssetHub.&#xD;&#xA;&#xD;&#xA;If you still don't have slots in Rococo for your parachain, you can use as you indicate the url https://github.com/paritytech/subport to ask for it, and in the section `Anything else we should know?`, ask there to open a channel with Rockmine, [see the example][2] of a previous query.&#xD;&#xA;&#xD;&#xA;It might be a good idea to open the issue in the [Substrate Docs repository][3], is open for suggestions to improve the content.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://hackmd.io/ECywP_7_SLeTvWCTfQPkqw?view&#xD;&#xA;  [2]: https://github.com/paritytech/subport/issues/529&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-docs" ContentLicense="CC BY-SA 4.0" />
  <row Id="38575" PostHistoryTypeId="2" PostId="9730" RevisionGUID="75d25516-480d-40f1-893f-aaa27b18416f" CreationDate="2023-08-24T10:53:13.073" UserId="1732" Text="I had some trouble recently syncing Rococo from scratch (forcing OOM on servers) so I wanted to use warp sync as a workaround.&#xD;&#xA;But on different servers and on local machine, finality proofs download stays stuck at 15.98 Mib and never gets to download more.&#xD;&#xA;&#xD;&#xA;    2023-08-24 10:14:43 ⏩ Warping, Downloading finality proofs, 15.98 Mib (10 peers), best: #0 (0x6408…063e), finalized #0 (0x6408…063e), ⬇ 3.4MiB/s ⬆ 86.5kiB/s&#xD;&#xA;    2023-08-24 10:14:54 ⏩ Warping, Downloading finality proofs, 15.98 Mib (9 peers), best: #0 (0x6408…063e), finalized #0 (0x6408…063e), ⬇ 3.1MiB/s ⬆ 39.6kiB/s&#xD;&#xA;    ...&#xD;&#xA;    2023-08-24 10:49:31 ⏩ Warping, Downloading finality proofs, 15.98 Mib (1 peers), best: #0 (0x6408…063e), finalized #0 (0x6408…063e), ⬇ 278.5kiB/s ⬆ 17.7kiB/s&#xD;&#xA;    2023-08-24 10:50:21 ⏩ Warping, Downloading finality proofs, 15.98 Mib (1 peers), best: #0 (0x6408…063e), finalized #0 (0x6408…063e), ⬇ 1.2MiB/s ⬆ 2.3kiB/s&#xD;&#xA;&#xD;&#xA;Anyone experienced the same or having a workaround for this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38577" PostHistoryTypeId="1" PostId="9730" RevisionGUID="75d25516-480d-40f1-893f-aaa27b18416f" CreationDate="2023-08-24T10:53:13.073" UserId="1732" Text="Rococo can't warp sync - stuck at 16Mb finality proof download" ContentLicense="CC BY-SA 4.0" />
  <row Id="38578" PostHistoryTypeId="3" PostId="9730" RevisionGUID="75d25516-480d-40f1-893f-aaa27b18416f" CreationDate="2023-08-24T10:53:13.073" UserId="1732" Text="|rococo|sync|warp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38579" PostHistoryTypeId="2" PostId="9731" RevisionGUID="e5779e91-a658-4739-9c51-d534c67d0283" CreationDate="2023-08-24T11:06:32.930" UserId="94" Text="Rococo and Westend can both not be warp synced. This is due to a consensus problem that happened and was resolved by sending a root transaction to un-stall the networks. That makes both un-warp able.  &#xD;&#xA;There could be improvements to the warp sync to work with checkpoints, but with the current logic its not possible.&#xD;&#xA;&#xD;&#xA;Note: We should probably emit an error in the node instead of attempting to warp." ContentLicense="CC BY-SA 4.0" />
  <row Id="38581" PostHistoryTypeId="2" PostId="9732" RevisionGUID="3a441ca0-be90-4798-8490-ef959e354e9b" CreationDate="2023-08-24T11:44:22.380" UserId="167" Text="No, and this is one of the main differences between a &quot;**Runtime**&quot; execution model, and a &quot;**Smart Contract**&quot; execution model. &#xD;&#xA;&#xD;&#xA;A Runtime is the core engine of the blockchain, and yields a lot of power to its developer. While risky in nature, one can write an [`on_initialize`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_initialize) hook and do what you have described. &#xD;&#xA;&#xD;&#xA;A Smart Contract, on the other hand, is a shared execution environment that does nothing unless if someone interacts with the contract, and importantly pays all the gas fee. Therefore, such an API should also not be reasonably exposed in any smart contract language. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am not an expert in ink! per se, but I believe my answer holds about all smart contract execution environments and therefore languages. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38584" PostHistoryTypeId="2" PostId="9733" RevisionGUID="e00223e5-e782-401d-ad07-6585b6c4d442" CreationDate="2023-08-24T11:53:27.997" UserId="3317" Text="As the error messages clearly state:&#xD;&#xA;&gt;arguments to the function are incorrect&#xD;&#xA;&#xD;&#xA;This has nothing to do with the change to the `bare_call` function; two additional arguments (which are not the cause of your problem).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, it already provides one solution: `gas_limit.into()`, which converts the integer you give to the `Weight` struct. &#xD;&#xA;&#xD;&#xA;The other two are solved with using a correct `BalanceOf&lt;T&gt;` type, e.g.:&#xD;&#xA;```&#xD;&#xA;type BalanceOf&lt;T&gt; = &lt;&lt;T as pallet_contracts::Config&gt;::Currency as Currency&lt;&#xD;&#xA;	&lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I suggest you study [the post][1] provided in the comments because it provides all the info you need. The problems you are facing right now are related to providing the correct arguments ([working example][2]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3748/how-can-i-call-my-contract-methods-inside-a-pallet/3949#3949&#xD;&#xA;  [2]: https://github.com/justinFrevert/Runtime-Contract-Interactions/blob/6cb243499015134c489df1de1ffdce3be28a27f9/pallets/template/src/lib.rs#L88-L118" ContentLicense="CC BY-SA 4.0" />
  <row Id="38587" PostHistoryTypeId="5" PostId="9697" RevisionGUID="af404f1f-3e97-4f45-bafc-00e65741c28b" CreationDate="2023-08-24T13:55:02.203" UserId="3743" Comment="edited body" Text="As you mentioned above, the `createPool` call expects MultiLocation parameters of either `Native` or non-native AssetIds. For example: from the perspective of `AssetHub`, an AssetHub asset with an AssetId of `13` has a MultiLocation of &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;   parents: 0, &#xD;&#xA;   interior: { &#xD;&#xA;     X2: [{PalletInstance: 50}, {GeneralIndex: 13}]&#xD;&#xA;   }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `PalletInstance` of `50` represents the `Assets` pallet on AssetHub and the `GeneralIndex` is the `u32` AssetId of the asset.&#xD;&#xA;&#xD;&#xA;So in this case you can substitute `13` with the `u32` AssetId of either of the two assets you've created in order to get their represented MultiLocations to pass to `createPool`.&#xD;&#xA;&#xD;&#xA;**Note**: For AssetHub Westend, one of the parameters must be of the `Native` asset which has a MultiLocation that can be represented as&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ parents: 1, interior: { 'Here': ''}}, &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With that in mind, a complete representation of the `createPool` params would be 1 `custom` asset and the `Native` asset in any order such as &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{ parents: 1, interior: { 'Here': ''}}, &#xD;&#xA;{ parents: 0, interior: { X2: [{'PalletInstance': 50}, {'GeneralIndex': 13}]}}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38588" PostHistoryTypeId="2" PostId="9734" RevisionGUID="a03e9ed8-a0c4-408b-a0df-7c81ea0d88b9" CreationDate="2023-08-24T14:31:46.510" UserId="4585" Text="* Do you use Paritydb? Do you sync an archive node (state history)?&#xD;&#xA;* Do you use a nvme SSD disk?&#xD;&#xA;* Did you check the metrics of your disk during sync (avg read/write speed)?&#xD;&#xA;* What is your CPU?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38590" PostHistoryTypeId="5" PostId="9732" RevisionGUID="a5ed6767-f562-47f7-8393-cf4482276f1f" CreationDate="2023-08-24T15:26:31.667" UserId="167" Comment="deleted 24 characters in body" Text="No, and this is one of the main differences between a &quot;**Runtime**&quot; execution model, and a &quot;**Smart Contract**&quot; execution model. &#xD;&#xA;&#xD;&#xA;A Runtime is the core engine of the blockchain, and yields a lot of power to its developer. While risky in nature, one can write an [`on_initialize`](https://paritytech.github.io/substrate/master/frame_support/traits/trait.Hooks.html#method.on_initialize) hook and do what you have described. &#xD;&#xA;&#xD;&#xA;A Smart Contract, on the other hand, is a shared execution environment that does nothing unless if someone interacts with the contract, and importantly pays all the gas fee. Therefore, such an API should also **NOT** be exposed in *any* smart contract language.&#xD;&#xA;&#xD;&#xA;The equivalent of this would be to have an offchain bot of some sort that would trigger the contract on every block.&#xD;&#xA;&#xD;&#xA;(I am not an expert in ink! per se, but I believe my answer holds about all smart contract execution environments.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="38591" PostHistoryTypeId="2" PostId="9735" RevisionGUID="46d2feb0-a791-4025-9743-1215a2e77f2b" CreationDate="2023-08-24T15:36:54.290" UserId="267" Text="Let's say that I deploy `erc20` contract in ink and transfer to Bob 100 tokens, now I want in my contract to see did Bob having any amount of tokens, just to be sure that he can use  my contract? How to do that? &#xD;&#xA;&#xD;&#xA;In substrate pallets there is `free_balance()`, and how to do it in ink smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38593" PostHistoryTypeId="1" PostId="9735" RevisionGUID="46d2feb0-a791-4025-9743-1215a2e77f2b" CreationDate="2023-08-24T15:36:54.290" UserId="267" Text="How can I check the balance of the account in ink smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="38594" PostHistoryTypeId="3" PostId="9735" RevisionGUID="46d2feb0-a791-4025-9743-1215a2e77f2b" CreationDate="2023-08-24T15:36:54.290" UserId="267" Text="|ink|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38595" PostHistoryTypeId="2" PostId="9736" RevisionGUID="e8e656ba-3f85-41e1-8189-c5a9baa68e8f" CreationDate="2023-08-24T18:25:03.553" UserId="3170" Text="I need to get the balance of all erc20 tokens in an account from the polkadot js api. I can't find any call that allows me to do this.&#xD;&#xA;&#xD;&#xA;Does anyone know which one it is?&#xD;&#xA;&#xD;&#xA;Thank you very much" ContentLicense="CC BY-SA 4.0" />
  <row Id="38597" PostHistoryTypeId="1" PostId="9736" RevisionGUID="e8e656ba-3f85-41e1-8189-c5a9baa68e8f" CreationDate="2023-08-24T18:25:03.553" UserId="3170" Text="Obtain the balance of erc20 tokens with Polkadot JS" ContentLicense="CC BY-SA 4.0" />
  <row Id="38598" PostHistoryTypeId="3" PostId="9736" RevisionGUID="e8e656ba-3f85-41e1-8189-c5a9baa68e8f" CreationDate="2023-08-24T18:25:03.553" UserId="3170" Text="|polkadot-js|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38600" PostHistoryTypeId="5" PostId="3775" RevisionGUID="b2bb5a5e-fb53-420f-abc3-c77c32aba817" CreationDate="2023-08-25T05:16:31.517" UserId="234" Comment="ink examples are moved in a separate repo" Text="[Chain Extensions](https://ink.substrate.io/macros-attributes/chain-extension/) are the main way to have contracts interact with the runtime (not the other way around).&#xD;&#xA;&#xD;&#xA;However, for an interaction with the native token, [`ink_env::transfer`](https://paritytech.github.io/ink/ink_env/fn.transfer.html) might be sufficient.&#xD;&#xA;&#xD;&#xA;Also, check `give_me` function in the [contract-transfer](https://github.com/paritytech/ink-examples/blob/main/contract-transfer/lib.rs) example." ContentLicense="CC BY-SA 4.0" />
  <row Id="38601" PostHistoryTypeId="5" PostId="1480" RevisionGUID="250b29f8-1f06-4a6e-b81b-610b82fccd72" CreationDate="2023-08-25T05:34:03.597" UserId="234" Comment="ink examples are moved in a separate repo" Text="If I understand your question correctly, you want to invoke a function in your smart contract that transfers your native chain token to another account.&#xD;&#xA;&#xD;&#xA;In ink! there is the function [`ink_env::transfer`](https://paritytech.github.io/ink/ink_env/fn.transfer.html) to do this.&#xD;&#xA;&#xD;&#xA;You can take a look at the `give_me` function in our [`contract-transfer`](https://github.com/paritytech/ink-examples/blob/main/contract-transfer/lib.rs) example, it does exactly this plus some error handling around it." ContentLicense="CC BY-SA 4.0" />
  <row Id="38602" PostHistoryTypeId="2" PostId="9737" RevisionGUID="1d2660c8-e42c-4873-9bdd-70def082c097" CreationDate="2023-08-25T05:34:40.163" UserId="4586" Text="Why in substrate based blcokchains such as substrate_node-template , nodes are continuously created if when there are no active transactions are happening i.e when the system is idle. Ideally new block should be created only when any transaction are active or created.&#xD;&#xA;&#xD;&#xA;continuously creating the blocks will result in indefinite block creation and may leads to memory crunch. " ContentLicense="CC BY-SA 4.0" />
  <row Id="38604" PostHistoryTypeId="1" PostId="9737" RevisionGUID="1d2660c8-e42c-4873-9bdd-70def082c097" CreationDate="2023-08-25T05:34:40.163" UserId="4586" Text="Why substrate nodes are keep creating even when there are no active transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="38605" PostHistoryTypeId="3" PostId="9737" RevisionGUID="1d2660c8-e42c-4873-9bdd-70def082c097" CreationDate="2023-08-25T05:34:40.163" UserId="4586" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38606" PostHistoryTypeId="2" PostId="9738" RevisionGUID="0686fd06-ddf4-4b1d-9374-dc089c21aca9" CreationDate="2023-08-25T06:28:08.370" UserId="2372" Text="I'm attempting to utilize the XCM error within the context of my pallet's error handling, but I'm facing this problem.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;The error which i'm using&#xD;&#xA;&#xD;&#xA;    #[pallet::error]&#xD;&#xA;	pub enum Error&lt;T, I = ()&gt; {&#xD;&#xA;	&#xD;&#xA;		SendingError(SendError),&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/TNpyG.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38608" PostHistoryTypeId="1" PostId="9738" RevisionGUID="0686fd06-ddf4-4b1d-9374-dc089c21aca9" CreationDate="2023-08-25T06:28:08.370" UserId="2372" Text="error[E0277]: the trait bound `xcm::v3::SendError: PalletError` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="38609" PostHistoryTypeId="3" PostId="9738" RevisionGUID="0686fd06-ddf4-4b1d-9374-dc089c21aca9" CreationDate="2023-08-25T06:28:08.370" UserId="2372" Text="|substrate-node-template|xcm|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38610" PostHistoryTypeId="2" PostId="9739" RevisionGUID="f9b32d00-792d-44e9-b5cd-9a2444bb56f9" CreationDate="2023-08-25T06:50:58.137" UserId="234" Text="Some previous answers that might be useful for you : &#xD;&#xA;- [How can I determine the native Balance of an Account/Address in Ink!][1]&#xD;&#xA;- [How can I call my pallets and it functions in a smart contract?][2]&#xD;&#xA;- [How to call runtime functions from a contract][3]&#xD;&#xA;&#xD;&#xA;You can check the [ink examples][4] repository as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/3001/how-can-i-determine-the-native-balance-of-an-account-address-in-ink&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/6029/how-can-i-call-my-pallets-and-it-functions-in-a-smart-contract&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/1951/how-to-call-runtime-functions-from-a-contract&#xD;&#xA;  [4]: https://github.com/paritytech/ink-examples/tree/main" ContentLicense="CC BY-SA 4.0" />
  <row Id="38612" PostHistoryTypeId="2" PostId="9740" RevisionGUID="c14f44b1-c3d4-4b66-977b-cbd0f8063f5b" CreationDate="2023-08-25T07:16:11.330" UserId="2762" Text="The substrate-node-template uses **[Aura][1]** for block authoring. In Aura time is divided up into &quot;slots&quot; of a fixed length. During each slot one block is produced, and the authorities take turns producing blocks in order forever.&#xD;&#xA;&#xD;&#xA;In Aura, forks only happen when it takes longer than the slot duration for a block to traverse the network. Thus forks are uncommon in good network conditions.&#xD;&#xA;&#xD;&#xA;Because Substrate provides a modular framework for building blockchains it is possible to build a custom consensus model.&#xD;&#xA;&#xD;&#xA;And example of what you want to implement is [Substrate contracts node][2], that  uses **Instant seal**. &#xD;&#xA;&#xD;&#xA;With **Instant Seal**, the node will automatically authorise the block the second it gets a transaction. It will not create the empty blocks on the chain. &#xD;&#xA;&#xD;&#xA;As an example of how to migrate from Aura &amp; Grandpa (What node-template uses) to use instant-seal you can take a look in this PR on the Substrate Contracts Node: [Changed consensus to manual-seal][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;You can read more about Consensus System in [Substrate Docs][4] and specifically the node-template in this StackExchange question: [What are current and finalized blocks in the substrate blockchain node template?][5].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/glossary/#authority-round-aura&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;  [3]: https://github.com/paritytech/substrate-contracts-node/pull/42&#xD;&#xA;  [4]: https://docs.substrate.io/learn/consensus/&#xD;&#xA;  [5]: https://stackoverflow.com/questions/68923103/what-are-current-and-finalized-blocks-in-the-substrate-blockchain-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="38614" PostHistoryTypeId="2" PostId="9741" RevisionGUID="db531ae6-9a85-407b-afab-acb35076bb4a" CreationDate="2023-08-25T07:27:30.873" UserId="3319" Text="Substrate-based blockchains like the substrate_node-template consistently generate blocks, even during periods of inactivity, due to their utilization of slot-based consensus mechanisms such as Aura or Babe. In these systems, time is divided into distinct slots, each designated for a validator responsible for producing a block. Regardless of whether the block contains transactions, it is imperative for the validator to create a block within the slot. Failure to do so could result in a wasted slot and potential forks, driven by other nodes suspecting malicious actions like intentional network delays.&#xD;&#xA;&#xD;&#xA;The continuous block production also serves to uphold network liveness, assuring observers that the network remains operational and dynamic. This analogy can be likened to a conventional server that remains active to field incoming requests, even in the absence of ongoing demands. Comparable to serverless setups that can scale down to zero but still maintain an accessible API for requests, the unceasing block generation guarantees the network's liveliness, availability, and effectively showcases the network's correctness." ContentLicense="CC BY-SA 4.0" />
  <row Id="38616" PostHistoryTypeId="2" PostId="9742" RevisionGUID="ef461dfc-3418-4598-bfcf-7a68c4a89766" CreationDate="2023-08-25T07:45:13.980" UserId="2762" Text="See the PolkadotJS documentation about how to query Smart Contracts: [Contract][1].&#xD;&#xA;&#xD;&#xA;First you have to initialize the contract.&#xD;&#xA;```js&#xD;&#xA;import { ContractPromise } from '@polkadot/api-contract';&#xD;&#xA;&#xD;&#xA;// The address is the actual on-chain address as ss58 or AccountId object.&#xD;&#xA;const contract = new ContractPromise(api, metadata, address);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then call the specific function you want, in your case [balance_of][2]&#xD;&#xA;```js&#xD;&#xA;const callValue = await contract.query.balanceOf(from, { gasLimit}, addressToQuery);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api-contract/start/contract.read/#reading-contract-values&#xD;&#xA;  [2]: https://github.com/paritytech/ink-examples/blob/main/erc20/lib.rs#L83" ContentLicense="CC BY-SA 4.0" />
  <row Id="38618" PostHistoryTypeId="2" PostId="9743" RevisionGUID="bbf1ed22-8c81-4ce3-80bf-658ea18d1def" CreationDate="2023-08-25T08:17:37.393" UserId="2762" Text="This has been fixed here: [how to solve the sys error in substrate polkadot branch (polkadot-v0.9.43)][1], just add in your `Cargo.toml` `default-features = false` when importing the pallet_session&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/9399/how-to-solve-the-sys-error-in-substrate-polkadot-branch-polkadot-v0-9-43/9691#9691" ContentLicense="CC BY-SA 4.0" />
  <row Id="38620" PostHistoryTypeId="5" PostId="9718" RevisionGUID="f2af7fee-57b9-4fc3-9fc5-d1da78aa8a27" CreationDate="2023-08-25T12:46:15.037" UserId="3963" Comment="added 542 characters in body" Text="This is a good question. In most situations, chains do not allow sovereign accounts to control funds for a local account with the same ID. So if Alice has ID `0x00...` on Para A then she cannot control account ID `0x00...` on the relay chain. As far as I understand, we do not allow this for two reasons:&#xD;&#xA;1) The relay chain does not trust Para A. Para A could sent a message to the relay chain with Alice (0x00) as origin while the message was never signed by Alice. &#xD;&#xA;2) If the relay chain does trust Para A and the messages are sent by the correct origin, it is still possible that Para A uses a different signature scheme then the Relay chain. So address `0x00...` on Para A could be controlled by a different private key then the private key controlling address `0x00...` on the relay chain.&#xD;&#xA;&#xD;&#xA;There are different approaches to solve this problem:&#xD;&#xA;1) Alice directly transfers the funds on the Relay chain. She can do this using conventional extrinsics or by executing an XCM locally on the relay chain using the [pallet_xcm execute extrinsic](https://github.com/paritytech/polkadot/blob/master/xcm/pallet-xcm/src/lib.rs#L900). Note that not all chains allow local execution of XCM using this extrinsic. &#xD;&#xA;2) The chain receiving this message maps the AccountId32 origin to some hashed accountId. For example AssetHubKusama and AssetHubPolkadot take this [approach](https://github.com/paritytech/cumulus/blob/master/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs#L82) by using the [HashedDescripion](https://paritytech.github.io/polkadot/doc/xcm_builder/struct.HashedDescription.html) type. Lets say in your example instead of sending the message to the relay chain you sent it to AssetHub. The origin of the message would be:&#xD;&#xA;```rust&#xD;&#xA;MultiLocation {&#xD;&#xA;    parent:1, &#xD;&#xA;    interior: X2(Parachain(*PARA A ID*), AccountId32 { network: None, id: ALICE.into() })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;AssetHub would convert this origin to some unique address by hashing the AccountId32 id with some extra description describing the location the message originated from. It can be something like: `hash(&quot;SiblingChain&quot; + *PARA A ID* + &quot;AccountId32&quot; + id)`&#xD;&#xA;&#xD;&#xA;3) In situations where there is a trust relationship between two chains and the signature schemes are the same, we can take another approach. For example, a system parachain like AssetHub could trust the relay chain. In this case AssetHub could configure it's xcm config to allow a sovereign AccountId32 from the relay chain to alias as local AccountId32 using the `AliasOrigin` [instruction](https://paritytech.github.io/xcm-docs/journey/origins.html#aliasorigin). &#xD;&#xA;This instruction would allow the sovereign user to replace the XCM origin from:&#xD;&#xA;```rust&#xD;&#xA;MultiLocation {&#xD;&#xA;    parent:0, &#xD;&#xA;    interior: X2(Parachain(*PARA A ID*), AccountId32 { network: None, id: ALICE.into() })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;into:&#xD;&#xA;```rust&#xD;&#xA;MultiLocation {&#xD;&#xA;    parent:0, &#xD;&#xA;    interior: X1(AccountId32 { network: None, id: ALICE.into()})&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This instruction would be used before the WithdrawAsset instruction. However, as I mentioned, this would only be used in special circumstances where chains trust each other like system chains. &#xD;&#xA;&#xD;&#xA;For the third implementation the [Aliasers](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-executor/src/config.rs#L50) config item has to be configured to check if the `origin` of the `AliasOrigin` instruction is allowed to alias as the target in the instruction. &#xD;&#xA;&#xD;&#xA;When the origin has Aliased as a local AccountId32 (like the example above), it is converted to an AccountId using the [AccountId32Aliases](https://paritytech.github.io/polkadot/doc/xcm_builder/struct.AccountId32Aliases.html) location converter.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I hope this answers your question!" ContentLicense="CC BY-SA 4.0" />
  <row Id="38621" PostHistoryTypeId="52" PostId="9737" RevisionGUID="43dfe026-1fbc-4157-9245-8ece6366f2b0" CreationDate="2023-08-25T13:39:30.053" />
  <row Id="38622" PostHistoryTypeId="2" PostId="9744" RevisionGUID="a34a5fd0-0160-4a74-a545-6e77176516cb" CreationDate="2023-08-25T14:13:48.053" UserId="3395" Text="In my runtime I'm using `pub type AccountId = &lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;`. Within my pallet I also need this type to implement `From&lt;SomeType&gt;`. I attempted to add `type CustomAccountId: From&lt;SomeType&gt;;` to my pallet's config, but encountered numerous errors. I'm not even sure if I'm on the right track. What is the proper way to achieve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38624" PostHistoryTypeId="1" PostId="9744" RevisionGUID="a34a5fd0-0160-4a74-a545-6e77176516cb" CreationDate="2023-08-25T14:13:48.053" UserId="3395" Text="Customizing AccountId" ContentLicense="CC BY-SA 4.0" />
  <row Id="38625" PostHistoryTypeId="3" PostId="9744" RevisionGUID="a34a5fd0-0160-4a74-a545-6e77176516cb" CreationDate="2023-08-25T14:13:48.053" UserId="3395" Text="|accountid|config|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38626" PostHistoryTypeId="2" PostId="9745" RevisionGUID="a4e67392-77d8-49f9-a76a-4cdca7609119" CreationDate="2023-08-25T14:17:49.623" UserId="4577" Text="Install polkadot/api and use api.createType and u8aToHex to encode the parameters&#xD;&#xA;Code Example:&#xD;&#xA;### Installation:&#xD;&#xA;`yarn add @polkadot/api`&#xD;&#xA;### Usage&#xD;&#xA;``` &#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;import { u8aToHex } from '@polkadot/util';&#xD;&#xA;&#xD;&#xA;const main = async () =&gt; {&#xD;&#xA;    const wsProvider = new WsProvider('wss://westend-asset-hub-rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    await api.isReady; &#xD;&#xA;&#xD;&#xA;    // get input parameters as encoded SCALE Uint8Array&#xD;&#xA;    // asset in asset hub with id 1&#xD;&#xA;    const multiLocation = api.createType('MultiLocation', {&#xD;&#xA;        parent: 0,&#xD;&#xA;        interior: {&#xD;&#xA;          X2: [&#xD;&#xA;            { PalletInstance: 50 },&#xD;&#xA;            { GeneralIndex: 4200 }&#xD;&#xA;          ]&#xD;&#xA;        }&#xD;&#xA;    }).toU8a();&#xD;&#xA;    const multiLocation2 = api.createType('MultiLocation', {&#xD;&#xA;      parent: 0,&#xD;&#xA;      interior: {&#xD;&#xA;        here: null&#xD;&#xA;      }&#xD;&#xA;    }).toU8a();&#xD;&#xA;    const amount = api.createType('u128', 2).toU8a();&#xD;&#xA;    const bool = api.createType('bool', false).toU8a();&#xD;&#xA;   &#xD;&#xA;    // concatenate  Uint8Arrays of input parameters &#xD;&#xA;    const encodedInput = new Uint8Array(multiLocation.length + multiLocation2.length);&#xD;&#xA;    encodedInput.set(multiLocation, 0); // Set array1 starting from index 0&#xD;&#xA;    encodedInput.set(multiLocation2, multiLocation.length); // Set array2 starting from the end of array1&#xD;&#xA;    encodedInput.set(amount, multiLocation.length + multiLocation2.length); // Set array3 starting from the end of array1 + array2&#xD;&#xA;    encodedInput.set(bool, multiLocation.length + multiLocation2.length + amount.length); // Set array3 starting from the end of array1 + array2&#xD;&#xA;    &#xD;&#xA;    // create Hex from concatenated u8a&#xD;&#xA;    const encodedInputHex = u8aToHex(encodedInput);&#xD;&#xA;    &#xD;&#xA;    // call rpc state call where first parameter is method to be called and second one is Hex representation of encoded input parameters&#xD;&#xA;    const response = await api.rpc.state.call('AssetConversionApi_quote_price_exact_tokens_for_tokens', encodedInputHex)    &#xD;&#xA;&#xD;&#xA;    // decode response&#xD;&#xA;    const decodedprice = api.createType('Option&lt;u128&gt;', response);&#xD;&#xA;    console.log(decodedprice.toHuman());&#xD;&#xA;};&#xD;&#xA;main();" ContentLicense="CC BY-SA 4.0" />
  <row Id="38628" PostHistoryTypeId="2" PostId="9746" RevisionGUID="4ad9826b-c58a-4c25-b2ae-9bd8041dd3f3" CreationDate="2023-08-25T15:15:07.983" UserId="4587" Text="I am unable to verify my WASM smart contract using Astar's Subscan. I've tried many times using different options but it doesnt seem to verify. There is no error log, it will be on timer forever, and the only way to check if it has failed verification is by refreshing. &#xD;&#xA;&#xD;&#xA;Note:&#xD;&#xA;[![enter image description here](https://i.stack.imgur.com/L62Y8.png)](https://i.stack.imgur.com/L62Y8.png)&#xD;&#xA;There has only been 3 verified smart contracts ever on subscan, and because theres no error messages - its hard to tell if this issue is on my end or subscans. Any help would be appreciated.&#xD;&#xA;&#xD;&#xA;Thanks :)&#xD;&#xA;&#xD;&#xA;Verifying on subscan using the different option combinations." ContentLicense="CC BY-SA 4.0" />
  <row Id="38630" PostHistoryTypeId="1" PostId="9746" RevisionGUID="4ad9826b-c58a-4c25-b2ae-9bd8041dd3f3" CreationDate="2023-08-25T15:15:07.983" UserId="4587" Text="Unable to verify WASM contract in Substrate Astar" ContentLicense="CC BY-SA 4.0" />
  <row Id="38631" PostHistoryTypeId="3" PostId="9746" RevisionGUID="4ad9826b-c58a-4c25-b2ae-9bd8041dd3f3" CreationDate="2023-08-25T15:15:07.983" UserId="4587" Text="|smart-contract|wasm|astar|blockchain|subscan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38632" PostHistoryTypeId="2" PostId="9747" RevisionGUID="8899845d-0736-4e46-9a44-8cb65c5eda80" CreationDate="2023-08-25T18:31:32.630" UserId="251" Text="The status still shows as &quot;requested&quot; even though the preimage has been executed by the governance. How can this be unnoted?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zYzE8.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38634" PostHistoryTypeId="1" PostId="9747" RevisionGUID="8899845d-0736-4e46-9a44-8cb65c5eda80" CreationDate="2023-08-25T18:31:32.630" UserId="251" Text="What's the meaning of `Requested`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38635" PostHistoryTypeId="3" PostId="9747" RevisionGUID="8899845d-0736-4e46-9a44-8cb65c5eda80" CreationDate="2023-08-25T18:31:32.630" UserId="251" Text="|preimage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38636" PostHistoryTypeId="5" PostId="9685" RevisionGUID="c0977e54-283b-46d4-9a68-82f0088a4ec1" CreationDate="2023-08-25T21:14:33.187" UserId="3136" Comment="modify in body" Text="Does `polkadot.js` provide a method to determine the addresses of signatories associated with a particular multisig address? " ContentLicense="CC BY-SA 4.0" />
  <row Id="38637" PostHistoryTypeId="24" PostId="9685" RevisionGUID="c0977e54-283b-46d4-9a68-82f0088a4ec1" CreationDate="2023-08-25T21:14:33.187" Comment="Proposed by 3136 approved by 85, 18 edit id of 529" ContentLicense="CC BY-SA 4.0" />
  <row Id="38640" PostHistoryTypeId="2" PostId="9748" RevisionGUID="6ba268ed-bde6-4bb9-a330-d6e34cc90aa6" CreationDate="2023-08-26T06:10:35.600" UserId="3667" Text="I am trying to understand the `runtime-benchmarks` gated code on the `runtime/src/lib.rs` and I realize that we need to &quot;list&quot; and &quot;add&quot; benchmarks that we want to perform : https://paritytech.github.io/substrate/master/frame_benchmarking/v1/macro.add_benchmark.html&#xD;&#xA;&#xD;&#xA;However I just want to make sure my understanding is correct:&#xD;&#xA;&#xD;&#xA;1. Unless we add it like so in this code : &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;add_benchmarks!(params, batches);&#xD;&#xA;add_benchmark!(params, batches, frame_system, SystemBench::&lt;Runtime&gt;);&#xD;&#xA;```&#xD;&#xA;it's benchmark won't be found or run when trying to run using `benchmark` subcommand right? &#xD;&#xA;&#xD;&#xA;2. Why is `add_benchmarks!(params, batches);` needed? It seems to me the odd one out as all other `add_benchmarks!` usually list a pallet and it's alias beside it." ContentLicense="CC BY-SA 4.0" />
  <row Id="38642" PostHistoryTypeId="1" PostId="9748" RevisionGUID="6ba268ed-bde6-4bb9-a330-d6e34cc90aa6" CreationDate="2023-08-26T06:10:35.600" UserId="3667" Text="How does the benchmarking code add_benchmarks! work on the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38643" PostHistoryTypeId="3" PostId="9748" RevisionGUID="6ba268ed-bde6-4bb9-a330-d6e34cc90aa6" CreationDate="2023-08-26T06:10:35.600" UserId="3667" Text="|benchmarking|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38644" PostHistoryTypeId="2" PostId="9749" RevisionGUID="b5caa5c6-9740-4a5d-ab90-cbf3748b5200" CreationDate="2023-08-26T14:06:19.763" UserId="351" Text="This is an extension question on [Remote XCM calls execution via individual signed Account][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/9712/xcm-remote-transactions-call/9718#9718&#xD;&#xA;&#xD;&#xA;As most of derivitive Accounts are either from Relay Chain to parachain and getting the derived Account you just hash&#xD;&#xA;&#xD;&#xA; `let acc = hash(&quot;ParentChain&quot;,ParaId,AccountId32,Address)`&#xD;&#xA;&#xD;&#xA;But what if the messsage is coming from the ParaA and Alice wants to have a derivitive Account in RelayChain by including the DescendOrigin instruction.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;       let msg = Xcm(vec![&#xD;&#xA;              Descendorigin(..),&#xD;&#xA;              ...other instructions&#xD;&#xA;       ])&#xD;&#xA;&#xD;&#xA;       paraAXcm::send_xcm(Here,Parent,msg);&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38646" PostHistoryTypeId="1" PostId="9749" RevisionGUID="b5caa5c6-9740-4a5d-ab90-cbf3748b5200" CreationDate="2023-08-26T14:06:19.763" UserId="351" Text="Can a user in parachain construct an XCM msg with a DescendOrigin instr and the dest to be the Relay Chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="38647" PostHistoryTypeId="3" PostId="9749" RevisionGUID="b5caa5c6-9740-4a5d-ab90-cbf3748b5200" CreationDate="2023-08-26T14:06:19.763" UserId="351" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38648" PostHistoryTypeId="2" PostId="9750" RevisionGUID="966559c0-699f-486f-8737-2f9a30a210bc" CreationDate="2023-08-26T16:55:23.800" UserId="377" Text="I want to integrate the frontier with my existing substrate chain. do we have any guide/resource to help in that?&#xD;&#xA;&#xD;&#xA;substrate version i am using polkadot-v1.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="38650" PostHistoryTypeId="1" PostId="9750" RevisionGUID="966559c0-699f-486f-8737-2f9a30a210bc" CreationDate="2023-08-26T16:55:23.800" UserId="377" Text="do we have any updated guide to integrate the frontier to the substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38651" PostHistoryTypeId="3" PostId="9750" RevisionGUID="966559c0-699f-486f-8737-2f9a30a210bc" CreationDate="2023-08-26T16:55:23.800" UserId="377" Text="|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38652" PostHistoryTypeId="5" PostId="9750" RevisionGUID="e780880e-0cf4-4adc-9da3-8df8afff723e" CreationDate="2023-08-26T17:20:11.360" UserId="377" Comment="added 5 characters in body" Text="I want to integrate the frontier with my existing substrate solo-chain. do we have any guide/resource to help in that?&#xD;&#xA;&#xD;&#xA;substrate version i am using polkadot-v1.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="38653" PostHistoryTypeId="6" PostId="9750" RevisionGUID="e780880e-0cf4-4adc-9da3-8df8afff723e" CreationDate="2023-08-26T17:20:11.360" UserId="377" Comment="added 5 characters in body" Text="|frontier|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38654" PostHistoryTypeId="4" PostId="9750" RevisionGUID="e780880e-0cf4-4adc-9da3-8df8afff723e" CreationDate="2023-08-26T17:20:11.360" UserId="377" Comment="added 5 characters in body" Text="do we have any updated guide to integrate the frontier to the substrate solo-chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38655" PostHistoryTypeId="2" PostId="9751" RevisionGUID="f3fa8ecc-fc89-4808-8057-70d000e18244" CreationDate="2023-08-26T19:16:39.043" UserId="4105" Text="Let's say there is an extrinsic, which is an unsigned transaction with following body:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(1)]&#xD;&#xA;#[pallet::weight(42)]&#xD;&#xA;#[frame_support::transactional]&#xD;&#xA;pub fn extrinsic(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;    ..&#xD;&#xA;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    let _ = ensure_none(origin)?;&#xD;&#xA;&#xD;&#xA;    let prevalidate_data = Self::prevalidate_something(..)?;&#xD;&#xA;&#xD;&#xA;    Self::do_something(..);&#xD;&#xA;&#xD;&#xA;    // Adjust weight to performed computations&#xD;&#xA;    let weight = Self::calc_weight(&amp;prevalidate_data);&#xD;&#xA;&#xD;&#xA;    Ok(PostDispatchInfo {&#xD;&#xA;        actual_weight: Some(weight),&#xD;&#xA;        pays_fee: Pays::No,&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Extrinsic basically calls `prevalidate_something` function to perform all operations that may potentially fail (it emits events and modifies storage as well and during execution it may fail). If `prevalidate_something` succedes, then `do_something` is called, which performs operations that do not fail and in the end weight is calculated based on `prevalidate_data`.&#xD;&#xA;&#xD;&#xA;As long as it is unsigned transaction, it is validated in `ValidateUnsigned::validate_unsigned` trait. According to documentation, this function can be called multiple times, the same thing applies to `ValidateUnsigned::pre_dispatch`. But if `validate_unsigned` will be called just before right dispatch (with TransactionSource::InBlock as argument), all operations performed by `prevalidate_something` will be persisted, even if it will fail:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	/// Validate the call right before dispatch.&#xD;&#xA;	///&#xD;&#xA;	/// This method should be used to prevent transactions already in the pool&#xD;&#xA;	/// (i.e. passing [`validate_unsigned`](Self::validate_unsigned)) from being included in blocks&#xD;&#xA;	/// in case they became invalid since being added to the pool.&#xD;&#xA;	///&#xD;&#xA;	/// By default it's a good idea to call [`validate_unsigned`](Self::validate_unsigned) from&#xD;&#xA;	/// within this function again to make sure we never include an invalid transaction. Otherwise&#xD;&#xA;	/// the implementation of the call or this method will need to provide proper validation to&#xD;&#xA;	/// ensure that the transaction is valid.&#xD;&#xA;	///&#xD;&#xA;	/// Changes made to storage *WILL* be persisted if the call returns `Ok`.&#xD;&#xA;	fn pre_dispatch(call: &amp;Self::Call) -&gt; Result&lt;(), TransactionValidityError&gt; {&#xD;&#xA;		Self::validate_unsigned(TransactionSource::InBlock, call)&#xD;&#xA;			.map(|_| ())&#xD;&#xA;			.map_err(Into::into)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In theory, we can protect it by moving call of `prevalidate_something` to `validate_unsigned` and wrap it in additional transactional layer, so all operations will be reverted once it will fail:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let prevalidate_data = frame_support::storage::with_storage_layer(|| {&#xD;&#xA;    Pallet::&lt;T&gt;::prevalidate_something(&#xD;&#xA;        ..&#xD;&#xA;    )&#xD;&#xA;}).map_err(|err| InvalidTransaction::Custom(err.into()))?;&#xD;&#xA;&#xD;&#xA;// We can use prevalidate_data to define priority as well&#xD;&#xA;&#xD;&#xA;ValidTransaction::with_tag_prefix(&quot;Prefix&quot;)&#xD;&#xA;    .priority(42)&#xD;&#xA;    .propagate(!matches!(source, TransactionSource::InBlock))&#xD;&#xA;    .build();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But how to get `prevalidate_data` for weight calculation, in case that it will be not called inside extrinsic, but in `validate_unsigned`?&#xD;&#xA;&#xD;&#xA;In theory, we can call `prevalidate_something` in `validate_unsigned` wrapped in [with_transaction][1] and always return `TransactionOutcome::Rollback` and call `prevalidate_something` in extrinsic as usuall, but it causes that this computations are performed twice for `InBlock` case.&#xD;&#xA;&#xD;&#xA;Maybe adding StorageValue like below will solve the issue, so in `validate_unsigned` weight will be calculated based on `prevalidate_data` and later read in the dispatch of extrinsic?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Last weight of the transaction&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type LastWeight&lt;T: Config&gt; = StorageValue&lt;_, Weight, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let prevalidate_data = frame_support::storage::with_storage_layer(|| {&#xD;&#xA;    Pallet::&lt;T&gt;::prevalidate_something(&#xD;&#xA;        ..&#xD;&#xA;    )&#xD;&#xA;}).map_err(|err| InvalidTransaction::Custom(err.into()))?;&#xD;&#xA;&#xD;&#xA;let weight = Pallet::&lt;T&gt;::calc_weight(&amp;prevalidate_data);&#xD;&#xA;&#xD;&#xA;LastWeight::&lt;T&gt;::mutate(|last_weight| {&#xD;&#xA;    *last_weight = weight;&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;// We can use prevalidate_data to define priority as well&#xD;&#xA;&#xD;&#xA;ValidTransaction::with_tag_prefix(&quot;Prefix&quot;)&#xD;&#xA;    .priority(42)&#xD;&#xA;    .propagate(!matches!(source, TransactionSource::InBlock))&#xD;&#xA;    .build();&#xD;&#xA;```&#xD;&#xA;* Is there some possible race condition within this approach?&#xD;&#xA;* Can we assume, that right after `InBlock` dispatch, no other extrinsic will be set between?&#xD;&#xA;* Do you have some suggestions, how to handle an extrinsic, which has a prevalidate function that emits events and modifies storage?&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/frame_support/storage/fn.with_transaction.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="38657" PostHistoryTypeId="1" PostId="9751" RevisionGUID="f3fa8ecc-fc89-4808-8057-70d000e18244" CreationDate="2023-08-26T19:16:39.043" UserId="4105" Text="Dispatch of extrinsic that has prevalidate function which emits events and modifies storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="38658" PostHistoryTypeId="3" PostId="9751" RevisionGUID="f3fa8ecc-fc89-4808-8057-70d000e18244" CreationDate="2023-08-26T19:16:39.043" UserId="4105" Text="|storage|weight|transactional|unsigned|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38659" PostHistoryTypeId="2" PostId="9752" RevisionGUID="b6176316-781f-48eb-b8ae-f209285e228b" CreationDate="2023-08-27T05:28:28.610" UserId="3178" Text="Getting `zsh: no matches found: --pallet=*` while running substrate chain benchmarks.&#xD;&#xA;&#xD;&#xA;My command- &#xD;&#xA;&#xD;&#xA;    ./target/production/node-template benchmark pallet --chain dev --execution=wasm --wasm-execution=compiled --pallet=* --extrinsic=* --steps 50 --repeat 20 --output pallets/all-weight.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="38661" PostHistoryTypeId="1" PostId="9752" RevisionGUID="b6176316-781f-48eb-b8ae-f209285e228b" CreationDate="2023-08-27T05:28:28.610" UserId="3178" Text="zsh: no matches found: --pallet=*" ContentLicense="CC BY-SA 4.0" />
  <row Id="38662" PostHistoryTypeId="3" PostId="9752" RevisionGUID="b6176316-781f-48eb-b8ae-f209285e228b" CreationDate="2023-08-27T05:28:28.610" UserId="3178" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38663" PostHistoryTypeId="2" PostId="9753" RevisionGUID="4ea94b5a-b374-4d6e-a51e-7627d7f4285e" CreationDate="2023-08-27T05:28:28.610" UserId="3178" Text="We need to escape `*` with `\`. So the above command looks like this -&#xD;&#xA;&#xD;&#xA;    ./target/production/node-template benchmark pallet --chain dev --execution=wasm --wasm-execution=compiled --pallet=\* --extrinsic=\* --steps 50 --repeat 20 --output pallets/all-weight.rs&#xD;&#xA;&#xD;&#xA;More info about this issue [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://%20%20%20%20./target/production/node-template%20benchmark%20pallet%20--chain%20dev%20--execution=wasm%20--wasm-execution=compiled%20--pallet=*%20--extrinsic=*%20--steps%2050%20--repeat%2020%20--output%20pallets/all-weight.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="38665" PostHistoryTypeId="50" PostId="3290" RevisionGUID="9e1eb4dd-e10a-41ff-b25b-e09e6b510da5" CreationDate="2023-08-27T09:07:35.897" UserId="-1" />
  <row Id="38666" PostHistoryTypeId="2" PostId="9754" RevisionGUID="63ae090c-7cba-424a-81ed-826b0ab834e9" CreationDate="2023-08-27T11:55:18.010" UserId="484" Text="We used `ed25519_verify`,`ed25519_batch_verify`, `secp256k1_ecdsa_recover` in runtime from `sp_io::crypto` mod.&#xD;&#xA;&#xD;&#xA;`sp_io::Crypto and Verify` traits require `self`, but I cannot find implementation. &#xD;&#xA;&#xD;&#xA;In substrate primitives core I see verify  calling &#xD;&#xA;```&#xD;&#xA;	fn verify&lt;M: AsRef&lt;[u8]&gt;&gt;(sig: &amp;Signature, message: M, public: &amp;Public) -&gt; bool {&#xD;&#xA;		let Ok(public) = VerificationKey::try_from(public.as_slice()) else { return false };&#xD;&#xA;		let Ok(signature) = ed25519_zebra::Signature::try_from(sig.as_ref()) else { return false };&#xD;&#xA;		public.verify(&amp;signature, message.as_ref()).is_ok()&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but does it call host functions for perfromance?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38668" PostHistoryTypeId="1" PostId="9754" RevisionGUID="63ae090c-7cba-424a-81ed-826b0ab834e9" CreationDate="2023-08-27T11:55:18.010" UserId="484" Text="`sp_io::crypto` was removed amid Polkadot 0.9.39 and 0.9.43. What is replacement?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38669" PostHistoryTypeId="3" PostId="9754" RevisionGUID="63ae090c-7cba-424a-81ed-826b0ab834e9" CreationDate="2023-08-27T11:55:18.010" UserId="484" Text="|runtime|cryptography|host-functions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38671" PostHistoryTypeId="5" PostId="9754" RevisionGUID="7a34379a-d934-4055-966e-a70f9b74dbfc" CreationDate="2023-08-27T12:58:05.533" UserId="484" Comment="added 285 characters in body; edited title" Text="We used `ed25519_verify`,`ed25519_batch_verify`, `secp256k1_ecdsa_recover` in runtime from `sp_io::crypto` mod.&#xD;&#xA;&#xD;&#xA;`sp_io::Crypto and Verify` traits require `self`, but I cannot find implementation. &#xD;&#xA;&#xD;&#xA;In substrate primitives core I see verify  calling &#xD;&#xA;```&#xD;&#xA;	fn verify&lt;M: AsRef&lt;[u8]&gt;&gt;(sig: &amp;Signature, message: M, public: &amp;Public) -&gt; bool {&#xD;&#xA;		let Ok(public) = VerificationKey::try_from(public.as_slice()) else { return false };&#xD;&#xA;		let Ok(signature) = ed25519_zebra::Signature::try_from(sig.as_ref()) else { return false };&#xD;&#xA;		public.verify(&amp;signature, message.as_ref()).is_ok()&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but does it call host functions for perfromance?&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;```&#xD;&#xA;# This feature enables all crypto primitives for `no_std` builds like microcontrollers&#xD;&#xA;# or Intel SGX.&#xD;&#xA;# For the regular wasm runtime builds this should not be used.&#xD;&#xA;full_crypto = [&#xD;&#xA;	...&#xD;&#xA;	&quot;ed25519-zebra&quot;,&#xD;&#xA;    ...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So that code not to be used in Runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38672" PostHistoryTypeId="4" PostId="9754" RevisionGUID="7a34379a-d934-4055-966e-a70f9b74dbfc" CreationDate="2023-08-27T12:58:05.533" UserId="484" Comment="added 285 characters in body; edited title" Text="`sp_io::crypto` was removed amid Polkadot 0.9.39 and 0.9.43. What is replacement in Runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38674" PostHistoryTypeId="5" PostId="9754" RevisionGUID="0a031d00-700a-4a58-bb37-855a7dbc9f51" CreationDate="2023-08-27T13:11:29.203" UserId="484" Comment="deleted 45 characters in body; edited title" Text="We used`ed25519_batch_verify` in runtime from `sp_io::crypto` mod.&#xD;&#xA;&#xD;&#xA;`sp_io::Crypto and Verify` traits require `self`, but I cannot find implementation. &#xD;&#xA;&#xD;&#xA;In substrate primitives core I see verify  calling &#xD;&#xA;```&#xD;&#xA;	fn verify&lt;M: AsRef&lt;[u8]&gt;&gt;(sig: &amp;Signature, message: M, public: &amp;Public) -&gt; bool {&#xD;&#xA;		let Ok(public) = VerificationKey::try_from(public.as_slice()) else { return false };&#xD;&#xA;		let Ok(signature) = ed25519_zebra::Signature::try_from(sig.as_ref()) else { return false };&#xD;&#xA;		public.verify(&amp;signature, message.as_ref()).is_ok()&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but does it call host functions for perfromance?&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;```&#xD;&#xA;# This feature enables all crypto primitives for `no_std` builds like microcontrollers&#xD;&#xA;# or Intel SGX.&#xD;&#xA;# For the regular wasm runtime builds this should not be used.&#xD;&#xA;full_crypto = [&#xD;&#xA;	...&#xD;&#xA;	&quot;ed25519-zebra&quot;,&#xD;&#xA;    ...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So that code not to be used in Runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38675" PostHistoryTypeId="4" PostId="9754" RevisionGUID="0a031d00-700a-4a58-bb37-855a7dbc9f51" CreationDate="2023-08-27T13:11:29.203" UserId="484" Comment="deleted 45 characters in body; edited title" Text="`sp_io::crypto::ed25519_batch_verify` was removed amid Polkadot 0.9.39 and 0.9.43. What is replacement in Runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38676" PostHistoryTypeId="2" PostId="9755" RevisionGUID="27687fd8-b107-4e4a-8306-1991437c4c89" CreationDate="2023-08-27T19:48:29.563" UserId="644" Text="I would try to replicate the Extrinsics that is thrown when using this&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This is the ABI of my smart contract&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;{&#xD;&#xA;        &quot;args&quot;: [&#xD;&#xA;          {&#xD;&#xA;            &quot;label&quot;: &quot;code&quot;,&#xD;&#xA;            &quot;type&quot;: {&#xD;&#xA;              &quot;displayName&quot;: [],&#xD;&#xA;              &quot;type&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        &quot;default&quot;: false,&#xD;&#xA;        &quot;docs&quot;: [],&#xD;&#xA;        &quot;label&quot;: &quot;get_track&quot;,&#xD;&#xA;        &quot;mutates&quot;: false,&#xD;&#xA;        &quot;payable&quot;: false,&#xD;&#xA;        &quot;returnType&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&#xD;&#xA;            &quot;ink&quot;,&#xD;&#xA;            &quot;MessageResult&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;type&quot;: 12&#xD;&#xA;        },&#xD;&#xA;        &quot;selector&quot;: &quot;0x43f80da1&quot;&#xD;&#xA;      }&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;This is the call I'm trying to make&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.shibuya.astar.network#/extrinsics/decode/0x46060053edb57f71f35eb471296511e015b306cbe36295341b59883b4844536d265ef9000002093d00009043f80da1542d53484952542d353234333133000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;  [2]: https://i.stack.imgur.com/IkSqJ.png&#xD;&#xA;  [1]: https://i.stack.imgur.com/PLHxv.png&#xD;&#xA;&#xD;&#xA;1011: Unknown Transaction Validity: UnknownTransaction::NoUnsignedValidat" ContentLicense="CC BY-SA 4.0" />
  <row Id="38678" PostHistoryTypeId="1" PostId="9755" RevisionGUID="27687fd8-b107-4e4a-8306-1991437c4c89" CreationDate="2023-08-27T19:48:29.563" UserId="644" Text="Extrinsic Read Smartcontract Data" ContentLicense="CC BY-SA 4.0" />
  <row Id="38679" PostHistoryTypeId="3" PostId="9755" RevisionGUID="27687fd8-b107-4e4a-8306-1991437c4c89" CreationDate="2023-08-27T19:48:29.563" UserId="644" Text="|pallet-contracts|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38680" PostHistoryTypeId="2" PostId="9756" RevisionGUID="7b199e5d-27a3-4d15-8f58-aa254bc05cf6" CreationDate="2023-08-27T21:17:12.227" UserId="341" Text="Multix has been created exactly to avoid these kind of issues. https://multix.chainsafe.io. Multix will order the signatories the way they should. It will also tell you if the signer doesn't have the required funds ahead of submitting a transaction. Indeed, any transaction requires a deposit of 20 DOTs that will be returned once the transaction is approved/rejected.&#xD;&#xA;&#xD;&#xA;Finally, if you want to do complex extrinsics, you can always craft the extrinsic in pjs/apps, without having to care about the multisig, and then paste the call data into Multix. You will get the multisig extrinsic built for you, and you can submit it." ContentLicense="CC BY-SA 4.0" />
  <row Id="38682" PostHistoryTypeId="2" PostId="9757" RevisionGUID="a830011f-27c2-4174-9470-ed931d5bc2cd" CreationDate="2023-08-27T23:12:27.703" UserId="4591" Text="the next available para-id = 4290&#xD;&#xA;&#xD;&#xA;para-id 4290 is showing in Overview but lighter shade (lost in space?) &#xD;&#xA;&#xD;&#xA;this is not a new issue (have seen it reported in Jun 2022. &#xD;&#xA;&#xD;&#xA;how do we proceed? thank you&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38684" PostHistoryTypeId="1" PostId="9757" RevisionGUID="a830011f-27c2-4174-9470-ed931d5bc2cd" CreationDate="2023-08-27T23:12:27.703" UserId="4591" Text="ROCOCO next Para-ID is registered and seem to be &quot;lost in space&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38685" PostHistoryTypeId="3" PostId="9757" RevisionGUID="a830011f-27c2-4174-9470-ed931d5bc2cd" CreationDate="2023-08-27T23:12:27.703" UserId="4591" Text="|rococo|paraid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38686" PostHistoryTypeId="50" PostId="7426" RevisionGUID="7f89ac75-0431-4657-b634-2cb6c3e19104" CreationDate="2023-08-28T01:04:10.513" UserId="-1" />
  <row Id="38688" PostHistoryTypeId="2" PostId="9758" RevisionGUID="71c6234b-61fc-4ff6-a73f-dd22ad52203e" CreationDate="2023-08-28T05:09:13.260" UserId="2844" Text="How to make stable coin in substrate based chain? Regarding this I have found [this question](https://substrate.stackexchange.com/a/4283/2844), it says to go with implementation of Acala. Beside this is there any other way to crate stable coin?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38690" PostHistoryTypeId="1" PostId="9758" RevisionGUID="71c6234b-61fc-4ff6-a73f-dd22ad52203e" CreationDate="2023-08-28T05:09:13.260" UserId="2844" Text="stable coin in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="38691" PostHistoryTypeId="3" PostId="9758" RevisionGUID="71c6234b-61fc-4ff6-a73f-dd22ad52203e" CreationDate="2023-08-28T05:09:13.260" UserId="2844" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38692" PostHistoryTypeId="2" PostId="9759" RevisionGUID="24eee823-a42c-447f-9248-8cc0a46652ed" CreationDate="2023-08-28T05:25:29.027" UserId="1756" Text="Polkadot JS API now supports runtime calls. Ankan pointed out that an issue was opened to add such support, and the subsequent PRs are now merged.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;await api.call.&lt;endpoint&gt;.&lt;call&gt;(args)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or a concrete example:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const pendingRewards = await api.call.nominationPoolsApi.pendingRewards(member);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38694" PostHistoryTypeId="5" PostId="9758" RevisionGUID="3d86f86b-c8ad-4e38-8ee3-3049e41704ec" CreationDate="2023-08-28T06:02:02.543" UserId="3136" Comment="correct the format of title and change in body" Text="How can a stablecoin be developed on a Substrate-based blockchain? I came across[this question](https://substrate.stackexchange.com/a/4283/2844),which suggests following the implementation approach of Acala. However, are there alternative methods to create a stablecoin apart from this route?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38695" PostHistoryTypeId="4" PostId="9758" RevisionGUID="3d86f86b-c8ad-4e38-8ee3-3049e41704ec" CreationDate="2023-08-28T06:02:02.543" UserId="3136" Comment="correct the format of title and change in body" Text="sSable coin in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="38696" PostHistoryTypeId="24" PostId="9758" RevisionGUID="3d86f86b-c8ad-4e38-8ee3-3049e41704ec" CreationDate="2023-08-28T06:02:02.543" Comment="Proposed by 3136 approved by 2844 edit id of 533" ContentLicense="CC BY-SA 4.0" />
  <row Id="38697" PostHistoryTypeId="5" PostId="9516" RevisionGUID="5b50df01-2551-4ad7-aef4-316866eec60c" CreationDate="2023-08-28T06:05:35.337" UserId="3387" Comment="added 152 characters in body" Text="Looks like cargo-contract 3.1.0 has been [yanked][1].&#xD;&#xA;&#xD;&#xA;cargo-contract compatibility with different rust toolchains:&#xD;&#xA;&#xD;&#xA; - Rust &lt;= 1.69 + pallet-contracts &lt; polkadot-1.0.0 = cargo-contract&#xD;&#xA;   3.0.1&#xD;&#xA; - Rust &gt; = 1.70 + pallet-contracts &gt;= polkadot-1.0.0 = cargo-contract 4.0.0-alpha&#xD;&#xA;&#xD;&#xA;**The e2e test does not work after the 3.1.0 has been yanked for either versions of it.** &#xD;&#xA;&#xD;&#xA;A new version cargo-contract 3.2.0 was release but the error remains([Issue][2]).&#xD;&#xA;&#xD;&#xA;Would be nice for the Parity guys and ladies to update the ink_e2e, also.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/1239#issuecomment-1653683340&#xD;&#xA;  [2]: https://github.com/paritytech/cargo-contract/issues/1259" ContentLicense="CC BY-SA 4.0" />
  <row Id="38698" PostHistoryTypeId="5" PostId="9758" RevisionGUID="bc9d3807-aa60-48bb-bb4e-918177c55f4e" CreationDate="2023-08-28T06:09:18.847" UserId="2844" Comment="added 1 character in body" Text="How can a stablecoin be developed on a Substrate-based blockchain? I came across [this question](https://substrate.stackexchange.com/a/4283/2844), which suggests following the implementation approach of Acala. However, are there alternative methods to create a stablecoin apart from this route?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38699" PostHistoryTypeId="4" PostId="9758" RevisionGUID="25c55a65-e0c6-4d33-a129-2281539bbba2" CreationDate="2023-08-28T06:11:48.170" UserId="3136" Comment="modify in title" Text="Stable coin in substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="38700" PostHistoryTypeId="24" PostId="9758" RevisionGUID="25c55a65-e0c6-4d33-a129-2281539bbba2" CreationDate="2023-08-28T06:11:48.170" Comment="Proposed by 3136 approved by 2844 edit id of 534" ContentLicense="CC BY-SA 4.0" />
  <row Id="38701" PostHistoryTypeId="2" PostId="9760" RevisionGUID="a56fff7a-35e4-4d54-a25d-d2f9dfd5ab99" CreationDate="2023-08-28T06:31:27.250" UserId="2762" Text="Take a look into this repository: [Frontier Parachain Template][1] is a ready-to-use EVM-based parachain.&#xD;&#xA;&#xD;&#xA;You can use specifically [this commit][2] to see the changes needed to add the Frontier integration.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/frontier-parachain-template&#xD;&#xA;  [2]: https://github.com/paritytech/frontier-parachain-template/commit/60142f5b95139b00400e47d4a414c87405be9a5f" ContentLicense="CC BY-SA 4.0" />
  <row Id="38705" PostHistoryTypeId="5" PostId="9755" RevisionGUID="90d92e23-81ad-40a3-9824-012f1e9d7dd0" CreationDate="2023-08-28T07:13:35.000" UserId="354" Comment="improved formatting" Text="I would try to replicate the Extrinsics that is thrown when using this&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This is the ABI of my smart contract&#xD;&#xA;&#xD;&#xA;``` json&#xD;&#xA;{&#xD;&#xA;        &quot;args&quot;: [&#xD;&#xA;          {&#xD;&#xA;            &quot;label&quot;: &quot;code&quot;,&#xD;&#xA;            &quot;type&quot;: {&#xD;&#xA;              &quot;displayName&quot;: [],&#xD;&#xA;              &quot;type&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        &quot;default&quot;: false,&#xD;&#xA;        &quot;docs&quot;: [],&#xD;&#xA;        &quot;label&quot;: &quot;get_track&quot;,&#xD;&#xA;        &quot;mutates&quot;: false,&#xD;&#xA;        &quot;payable&quot;: false,&#xD;&#xA;        &quot;returnType&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&#xD;&#xA;            &quot;ink&quot;,&#xD;&#xA;            &quot;MessageResult&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;type&quot;: 12&#xD;&#xA;        },&#xD;&#xA;        &quot;selector&quot;: &quot;0x43f80da1&quot;&#xD;&#xA;      }&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;This is the call I'm trying to make&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.shibuya.astar.network#/extrinsics/decode/0x46060053edb57f71f35eb471296511e015b306cbe36295341b59883b4844536d265ef9000002093d00009043f80da1542d53484952542d353234333133000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;  [2]: https://i.stack.imgur.com/IkSqJ.png&#xD;&#xA;  [1]: https://i.stack.imgur.com/PLHxv.png&#xD;&#xA;&#xD;&#xA;    1011: Unknown Transaction Validity: UnknownTransaction::NoUnsignedValidate" ContentLicense="CC BY-SA 4.0" />
  <row Id="38706" PostHistoryTypeId="24" PostId="9755" RevisionGUID="90d92e23-81ad-40a3-9824-012f1e9d7dd0" CreationDate="2023-08-28T07:13:35.000" Comment="Proposed by 354 approved by 644 edit id of 535" ContentLicense="CC BY-SA 4.0" />
  <row Id="38711" PostHistoryTypeId="2" PostId="9763" RevisionGUID="3c928c34-465f-47f0-bc7d-72a03aaec60d" CreationDate="2023-08-28T08:48:11.080" UserId="4593" Text="I haven't done this before but look at this document seem works&#xD;&#xA;https://github.com/maxsam4/fork-off-substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="38718" PostHistoryTypeId="2" PostId="9765" RevisionGUID="50c471fd-894e-43d9-89e7-37ad1902ee12" CreationDate="2023-08-28T09:37:20.440" UserId="165" Text="The reason for that has to be some forced sudo operation, otherwise that is not a possible state.&#xD;&#xA;&#xD;&#xA;Thanks for flagging this, it has now been addressed.&#xD;&#xA;&#xD;&#xA;In respect to &#xD;&#xA;&#xD;&#xA;&gt; para-id 4290 is showing in Overview but lighter shade (lost in space?)&#xD;&#xA;&#xD;&#xA;My understanding is that polkadot-js/apps greys out parachains that are not producing blocks or their nodes are not reachable." ContentLicense="CC BY-SA 4.0" />
  <row Id="38720" PostHistoryTypeId="52" PostId="9757" RevisionGUID="142f3699-9593-44b9-973e-fd317eb90762" CreationDate="2023-08-28T09:45:34.827" />
  <row Id="38721" PostHistoryTypeId="2" PostId="9766" RevisionGUID="c6df1af2-2898-44dc-a228-4de44cc7bf24" CreationDate="2023-08-28T10:12:41.893" UserId="2762" Text="That's the Hash of the [identity info][1], which is an struct with the information of the account:&#xD;&#xA;```rs&#xD;&#xA;pub struct IdentityInfo&lt;FieldLimit: Get&lt;u32&gt;&gt; {&#xD;&#xA;	pub additional: BoundedVec&lt;(Data, Data), FieldLimit&gt;,&#xD;&#xA;	pub display: Data,&#xD;&#xA;	pub legal: Data,&#xD;&#xA;	pub web: Data,&#xD;&#xA;	pub riot: Data,&#xD;&#xA;	pub email: Data,&#xD;&#xA;	pub pgp_fingerprint: Option&lt;[u8; 20]&gt;,&#xD;&#xA;	pub image: Data,&#xD;&#xA;	pub twitter: Data,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;However keep in mind that to call the extrinsic `provide_judgement` you have to be a [Registrars][2]. &#xD;&#xA;If you want to be a Registar check this: [Becoming a Registrar][3] and if you just want to request a judgment for your identity: [How to Request and Cancel Identity Judgement][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/identity/src/types.rs#L290C12-L290C24&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-identity#requesting-a-judgement&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/learn-guides-identity#becoming-a-registrar&#xD;&#xA;  [4]: https://support.polkadot.network/support/solutions/articles/65000181990-how-to-request-and-cancel-identity-judgement" ContentLicense="CC BY-SA 4.0" />
  <row Id="38723" PostHistoryTypeId="2" PostId="9767" RevisionGUID="9f2e527b-d8f5-4cf3-aaea-67d3ecd8fc64" CreationDate="2023-08-28T10:23:48.337" UserId="2762" Text="The `Transact` instruction allows for the execution of calls (from a RuntimeCall in a FRAME-based system, to a smart contract function call in an EVM-based system) in a consensus system. With this you can modify storage of another chain with a XCM transaction.&#xD;&#xA;&#xD;&#xA;The perfect example you can look at is this: [transact_mint_nft][1] from the XCM Docs, that shows you how the parachain A creates a NFT Collection and mint an NFT on the relay chain.&#xD;&#xA;&#xD;&#xA;To understand transfers read this [How can I transfer assets using XCM?][2].&#xD;&#xA;&#xD;&#xA;And for examples of NFT transfers you can take a look in the examples of the **XCM simulator**: [teleport_nft][3] and [reserve_asset_transfer_nft][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/xcm-docs/blob/main/examples/src/3_transact/mod.rs#L54&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/blob/release-v0.9.42/xcm/xcm-simulator/example/src/lib.rs#L338C5-L338C17&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot/blob/release-v0.9.42/xcm/xcm-simulator/example/src/lib.rs#L404" ContentLicense="CC BY-SA 4.0" />
  <row Id="38725" PostHistoryTypeId="2" PostId="9768" RevisionGUID="41638231-fe4d-4f8c-a439-7e692087e96e" CreationDate="2023-08-28T11:41:08.420" UserId="4443" Text="[![I got this error while authorizing specific nodes in building a blockchain.&#xD;&#xA;It gives me error like this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;error: failed to select a version for `bounded-collections`.&#xD;&#xA;    ... required by package `sp-core v21.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)`&#xD;&#xA;    ... which satisfies git dependency `sp-core` of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking` of package `frame-system-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)`&#xD;&#xA;    ... which satisfies git dependency `frame-system-benchmarking` of package `node-template-runtime v4.0.0-dev (/home/ubuntu/substrate-node-template/runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/ubuntu/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `^0.1.8` are: 0.1.8&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `bounded-collections v0.1.6`&#xD;&#xA;    ... which satisfies dependency `bounded-collections = &quot;^0.1.4&quot;` (locked to 0.1.6) of package `sp-core v7.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)`&#xD;&#xA;    ... which satisfies git dependency `sp-core` (locked to 7.0.0) of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking` (locked to 4.0.0-dev) of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/ubuntu/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `bounded-collections` which could resolve this conflict&#xD;&#xA;][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/IRJD9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38727" PostHistoryTypeId="1" PostId="9768" RevisionGUID="41638231-fe4d-4f8c-a439-7e692087e96e" CreationDate="2023-08-28T11:41:08.420" UserId="4443" Text="While authorizing specific nodes in building a blockchain i got the following error" ContentLicense="CC BY-SA 4.0" />
  <row Id="38728" PostHistoryTypeId="3" PostId="9768" RevisionGUID="41638231-fe4d-4f8c-a439-7e692087e96e" CreationDate="2023-08-28T11:41:08.420" UserId="4443" Text="|substrate-node-template|substrate-node|nodes|substrate-front-end|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38729" PostHistoryTypeId="2" PostId="9769" RevisionGUID="298b8f7b-756d-4167-8721-25d5624376a9" CreationDate="2023-08-28T11:53:19.257" UserId="4435" Text="Now I am building a new docker image for my substrate node&#xD;&#xA;&#xD;&#xA;`Docker version 24.0.5, build ced0996`&#xD;&#xA;&#xD;&#xA;`Node version v18.16.1`&#xD;&#xA;&#xD;&#xA;I am using this `Dockerfile.dev` to build the docker image.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;FROM paritytech/ci-linux:production as build&#xD;&#xA;&#xD;&#xA;WORKDIR /code&#xD;&#xA;COPY . .&#xD;&#xA;RUN cargo build --release&#xD;&#xA;&#xD;&#xA;FROM ubuntu:22.04&#xD;&#xA;WORKDIR /node&#xD;&#xA;&#xD;&#xA;# Copy the node binary.&#xD;&#xA;COPY --from=build /code/target/release/node-template .&#xD;&#xA;&#xD;&#xA;# Install root certs, see: https://github.com/paritytech/substrate/issues/9984&#xD;&#xA;# RUN apt update &amp;&amp; \&#xD;&#xA;#     apt install -y ca-certificates &amp;&amp; \&#xD;&#xA;#     update-ca-certificates &amp;&amp; \&#xD;&#xA;#     apt remove ca-certificates -y &amp;&amp; \&#xD;&#xA;#     rm -rf /var/lib/apt/lists/*&#xD;&#xA;&#xD;&#xA;EXPOSE 9944&#xD;&#xA;CMD [ &quot;./node-template&quot;, &quot;--dev&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;By the way, I got this error and couldn't figure it out.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;254.9 info: installing component 'rustfmt'&#xD;&#xA;261.8     Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;648.1 error: failed to get `frame-benchmarking` as a dependency of package `node-template v4.0.0-dev (/code/node)`&#xD;&#xA;648.1&#xD;&#xA;648.1 Caused by:&#xD;&#xA;648.1   failed to load source for dependency `frame-benchmarking`&#xD;&#xA;648.1&#xD;&#xA;648.1 Caused by:&#xD;&#xA;648.1   Unable to update https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#98f2e345&#xD;&#xA;648.1&#xD;&#xA;648.1 Caused by:&#xD;&#xA;648.1   object not found - no match for id (98f2e3451c9143278ec53c6718940aeabcd3b68a); class=Odb (9); code=NotFound (-3)&#xD;&#xA;------&#xD;&#xA;Dockerfile.dev:5&#xD;&#xA;--------------------&#xD;&#xA;   3 |     WORKDIR /code&#xD;&#xA;   4 |     COPY . .&#xD;&#xA;   5 | &gt;&gt;&gt; RUN cargo build --release&#xD;&#xA;   6 |&#xD;&#xA;   7 |     FROM ubuntu:22.04&#xD;&#xA;--------------------&#xD;&#xA;ERROR: failed to solve: process &quot;/bin/sh -c cargo build --release&quot; did not complete successfully: exit code: 101&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any kind of answers would be appreciated.&#xD;&#xA;&#xD;&#xA;Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="38731" PostHistoryTypeId="1" PostId="9769" RevisionGUID="298b8f7b-756d-4167-8721-25d5624376a9" CreationDate="2023-08-28T11:53:19.257" UserId="4435" Text="I want to build a docker image for my substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="38732" PostHistoryTypeId="3" PostId="9769" RevisionGUID="298b8f7b-756d-4167-8721-25d5624376a9" CreationDate="2023-08-28T11:53:19.257" UserId="4435" Text="|substrate-node|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38733" PostHistoryTypeId="2" PostId="9770" RevisionGUID="0e0c522e-f376-4760-8647-7ca8e587d8f1" CreationDate="2023-08-28T14:14:02.540" UserId="380" Text="Seems like this commit (`#98f2e345`) might [no longer exist](https://stackoverflow.com/a/69516957).&#xD;&#xA;&#xD;&#xA;I couldn't find it in the repository.&#xD;&#xA;&#xD;&#xA;You can try deleting the cargo.lock or [clearing the registry](https://stackoverflow.com/a/59881524)." ContentLicense="CC BY-SA 4.0" />
  <row Id="38735" PostHistoryTypeId="2" PostId="9771" RevisionGUID="809fdd5b-010b-4673-b976-5a751f673d23" CreationDate="2023-08-28T14:24:48.863" UserId="4594" Text="I was trying to use my parity signer to approve a transaction after not using it for a year or more. In the beginning the signer was giving me an error after scanning the QR from the transaction. I proceeded to update the app, as I assumed that the issue was the app been not updated. After updating the app I have recovered the parity signer with the n-monic phrase, but when I am trying to sign the transaction the following message appears : &quot;Transaction author public key not found&quot;. Can someone provide any guidance on how to fix this issue? Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="38737" PostHistoryTypeId="1" PostId="9771" RevisionGUID="809fdd5b-010b-4673-b976-5a751f673d23" CreationDate="2023-08-28T14:24:48.863" UserId="4594" Text="Issues approving transactions after updating parity signer" ContentLicense="CC BY-SA 4.0" />
  <row Id="38738" PostHistoryTypeId="3" PostId="9771" RevisionGUID="809fdd5b-010b-4673-b976-5a751f673d23" CreationDate="2023-08-28T14:24:48.863" UserId="4594" Text="|polkadot-js|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38739" PostHistoryTypeId="5" PostId="9736" RevisionGUID="25ad9b8b-5728-49e1-a86b-466bda96015c" CreationDate="2023-08-28T15:07:39.707" UserId="3136" Comment="correct the format of title and change in body" Text="I'm seeking a method to retrieve the balances of all ERC20 tokens associated with an account using the Polkadot JS API. I've been unable to locate a specific API call that enables this functionality. If anyone is aware of the relevant API call, I would greatly appreciate the information. Thank you for your assistance." ContentLicense="CC BY-SA 4.0" />
  <row Id="38740" PostHistoryTypeId="24" PostId="9736" RevisionGUID="25ad9b8b-5728-49e1-a86b-466bda96015c" CreationDate="2023-08-28T15:07:39.707" Comment="Proposed by 3136 approved by 2762, 3170 edit id of 539" ContentLicense="CC BY-SA 4.0" />
  <row Id="38741" PostHistoryTypeId="2" PostId="9772" RevisionGUID="2cdf1fa8-e502-45c9-9790-3a565435e83d" CreationDate="2023-08-28T15:28:42.043" UserId="3317" Text="First, `SignedExtension`'s validation don't include the full logic of an extrinsic (see first answer [extrinsic validation lifecycle][1]) and its weight is handled through [ExtrinsicBaseWeight][2]. &#xD;&#xA;&#xD;&#xA;To your example, `prevalidate_something` will only be executed when the extrinsic is applied from a block.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5647/difference-between-signedextension-default-behavior-vs-actual-behavior-expand/5939#5939&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/2923/signed-extensions-and-weights" ContentLicense="CC BY-SA 4.0" />
  <row Id="38743" PostHistoryTypeId="2" PostId="9773" RevisionGUID="b3830636-094f-4840-9302-77acec065518" CreationDate="2023-08-28T16:15:05.827" UserId="452" Text="The problem you are describing is called weak subjectivity and it's inherent to Proof-of-Stake systems (some useful links on the subject: https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/weak-subjectivity/ https://blog.ethereum.org/2014/11/25/proof-stake-learned-love-weak-subjectivity). Your proposed solution doesn't really address the problem since if you control an old authority set you could still make authority set changes to other keys you control, and successfully build an alternative history.&#xD;&#xA;&#xD;&#xA;Regarding `ForcedChanges` these are effectively a coordinated hard fork of the GRANDPA authority set, so the chain of trust is broken, hence why they're not part of warp sync proofs. These are only meant to be used to recover from a disaster scenario (e.g. more than 1/3 of the validators go offline and permanently lose access to their session keys)." ContentLicense="CC BY-SA 4.0" />
  <row Id="38745" PostHistoryTypeId="5" PostId="9773" RevisionGUID="8ac44787-f32c-47c1-866e-8e0de3a29c53" CreationDate="2023-08-28T16:25:09.963" UserId="452" Comment="added 459 characters in body" Text="The problem you are describing is called weak subjectivity and it's inherent to Proof-of-Stake systems (some useful links on the subject: https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/weak-subjectivity/ https://blog.ethereum.org/2014/11/25/proof-stake-learned-love-weak-subjectivity). Your proposed solution doesn't really address the problem since if you control an old authority set you could still make authority set changes to other keys you control, and successfully build an alternative history. Smoldot (a light client for polkadot-based chains), implements the checkpointing approach described in the links above to work around this issue (https://raw.githubusercontent.com/smol-dot/smoldot/main/demo-chain-specs/polkadot.json see `lightSyncState` section). Polkadot full-nodes provide an RPC endpoint that can be used to generate this checkpoint (https://github.com/paritytech/polkadot-sdk/blob/master/substrate/client/sync-state-rpc/src/lib.rs#L131).&#xD;&#xA;&#xD;&#xA;Regarding `ForcedChanges` these are effectively a coordinated hard fork of the GRANDPA authority set, so the chain of trust is broken, hence why they're not part of warp sync proofs. These are only meant to be used to recover from a disaster scenario (e.g. more than 1/3 of the validators go offline and permanently lose access to their session keys)." ContentLicense="CC BY-SA 4.0" />
  <row Id="38746" PostHistoryTypeId="2" PostId="9774" RevisionGUID="215da8c1-d675-431d-8e21-5fc202451e72" CreationDate="2023-08-28T19:18:46.000" UserId="4591" Text="thank you but i don't think it has been resolved. i am trying to request for a para-id and 4290 is showing up but when i tried to register it, it says it has been registered and it doesn't go through. " ContentLicense="CC BY-SA 4.0" />
  <row Id="38748" PostHistoryTypeId="5" PostId="9774" RevisionGUID="4f069375-3e1d-46fd-af2b-05c6a028e7ea" CreationDate="2023-08-28T19:44:03.570" UserId="4591" Comment="added 170 characters in body" Text="thank you but i don't think it has been resolved. i am trying to request for a para-id and 4290 is showing up but when i tried to register it, it says it has been registered and it doesn't go through. &#xD;&#xA;&#xD;&#xA;same problem as below :  &quot;registrar.AlreadyRegistered &quot; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/1418/provided-next-available-para-id-is-already-registered" ContentLicense="CC BY-SA 4.0" />
  <row Id="38749" PostHistoryTypeId="52" PostId="9769" RevisionGUID="e5fc5cdc-db37-40c2-a6d1-03ca3bedd00f" CreationDate="2023-08-28T19:55:34.503" />
  <row Id="38750" PostHistoryTypeId="2" PostId="9775" RevisionGUID="b892ae91-f477-4954-a461-ab430d8aa34e" CreationDate="2023-08-28T21:36:10.597" UserId="234" Text="The `XcmVersionedMultiLocation` type-example you shared can be created as follows :&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;```typescript&#xD;&#xA; const loc =  api.createType(&quot;XcmVersionedMultiLocation&quot;, {&#xD;&#xA;    			V3: {&#xD;&#xA;    				parents: &quot;1&quot;,&#xD;&#xA;    				interior: {&#xD;&#xA;    					X2: [&#xD;&#xA;    					 { parachain: &quot;2100&quot;},&#xD;&#xA;    					 { AccountId32: { id: address } }&#xD;&#xA;    					],&#xD;&#xA;    				},&#xD;&#xA;    			},&#xD;&#xA;            });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A complete example/code snippet would be something like the following (using a random account) :&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const { ApiPromise, WsProvider } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;    const wsProvider = new WsProvider('wss://rpc.polkadot.io');&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;    const xcmVersionedMultiLocation = {&#xD;&#xA;        V3: {&#xD;&#xA;          parents: &quot;1&quot;,&#xD;&#xA;          interior: {&#xD;&#xA;            X2: [ &#xD;&#xA;                { parachain: &quot;2100&quot;},&#xD;&#xA;                { AccountId32: &#xD;&#xA;                    {&#xD;&#xA;                      id: &quot;0x0987654309876543098765430987654309876543098765430987654309876543&quot;        &#xD;&#xA;                    }&#xD;&#xA;                 } &#xD;&#xA;                ]&#xD;&#xA;          },&#xD;&#xA;        },&#xD;&#xA;      };&#xD;&#xA;    &#xD;&#xA;    const loc = api.createType(&#xD;&#xA;    &quot;XcmVersionedMultiLocation&quot;,&#xD;&#xA;    xcmVersionedMultiLocation&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    console.log(loc.toHex());  &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For the `id` make sure to use the public key. If you have the address in another format you can use the [subscan tool][1] or [sidecar's convert endpoint][2] to change it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Regarding your question on why the `loc` variable might still have the type `Codec`, there is a similar question [here][3] and a possible explanation can be found here : [Since upgrading to the 7.x series, TypeScript augmentation is missing][4]. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/tools/format_transform&#xD;&#xA;  [2]: https://paritytech.github.io/substrate-api-sidecar/dist/&#xD;&#xA;  [3]: https://github.com/polkadot-js/api/issues/4826&#xD;&#xA;  [4]: https://polkadot.js.org/docs/api/FAQ/#since-upgrading-to-the-7x-series-typescript-augmentation-is-missing" ContentLicense="CC BY-SA 4.0" />
  <row Id="38752" PostHistoryTypeId="2" PostId="9776" RevisionGUID="88b1945b-4a4b-458d-b131-fdc43131d378" CreationDate="2023-08-29T04:39:07.913" UserId="354" Text="You can use [https://subalfred.hack.ink/user/cli/state.html#command-state-fork-off][1] it is more easy to use than `fork-off-substrate`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://subalfred.hack.ink/user/cli/state.html#command-state-fork-off" ContentLicense="CC BY-SA 4.0" />
  <row Id="38754" PostHistoryTypeId="5" PostId="9774" RevisionGUID="8fe9dd53-abcc-4f61-878f-d3e9726eb52d" CreationDate="2023-08-29T04:39:17.953" UserId="4591" Comment="added 180 characters in body" Text="thank you but i don't think it has been resolved. i am trying to request for a para-id and 4290 is showing up but when i tried to register it, it says it has been registered and it doesn't go through. &#xD;&#xA;&#xD;&#xA;same problem as below :  &quot;registrar.AlreadyRegistered &quot; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/1418/provided-next-available-para-id-is-already-registered&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Xe4Bc.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/JyxgP.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38755" PostHistoryTypeId="33" PostId="9744" RevisionGUID="46b7397d-0f37-42d8-b3f4-50e0a497ae99" CreationDate="2023-08-29T06:09:43.350" UserId="3395" Comment="32" />
  <row Id="38758" PostHistoryTypeId="5" PostId="9746" RevisionGUID="3f914b2e-e777-476d-82d9-53a688fc6c01" CreationDate="2023-08-29T09:25:01.133" UserId="3136" Comment="correct the msg format" Text="I'm encountering difficulties while attempting to verify my WASM smart contract through Astar's Subscan tool. Despite multiple attempts using various options, the verification process remains inconclusive. Instead of generating an error log, the verification process appears to be perpetually stuck, requiring manual refreshes to determine if verification has failed. &#xD;&#xA;&#xD;&#xA;Note:&#xD;&#xA;[![enter image description here](https://i.stack.imgur.com/L62Y8.png)](https://i.stack.imgur.com/L62Y8.png)&#xD;&#xA;There has only been 3 verified smart contracts ever on subscan, and because theres no error messages - its hard to tell if this issue is on my end or subscans. Any help would be appreciated.&#xD;&#xA;&#xD;&#xA;Thanks :)&#xD;&#xA;&#xD;&#xA;Verifying on subscan using the different option combinations." ContentLicense="CC BY-SA 4.0" />
  <row Id="38759" PostHistoryTypeId="24" PostId="9746" RevisionGUID="3f914b2e-e777-476d-82d9-53a688fc6c01" CreationDate="2023-08-29T09:25:01.133" Comment="Proposed by 3136 approved by 4587 edit id of 536" ContentLicense="CC BY-SA 4.0" />
  <row Id="38760" PostHistoryTypeId="5" PostId="9773" RevisionGUID="2178c1ad-d4c7-4bbd-9dbb-02088cd50f47" CreationDate="2023-08-29T09:37:01.267" UserId="452" Comment="deleted 2 characters in body" Text="The issue you are describing is called weak subjectivity and it's inherent to Proof-of-Stake systems (some useful links on the subject: https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/weak-subjectivity/ https://blog.ethereum.org/2014/11/25/proof-stake-learned-love-weak-subjectivity). Your proposed solution doesn't really address the problem since if you control an old authority set you could still make authority set changes to other keys you control, and successfully build an alternative history. Smoldot (a light client for polkadot-based chains), implements the checkpointing approach described in the links above to work around this issue (https://raw.githubusercontent.com/smol-dot/smoldot/main/demo-chain-specs/polkadot.json see `lightSyncState` section). Polkadot full-nodes provide an RPC endpoint that can be used to generate this checkpoint (https://github.com/paritytech/polkadot-sdk/blob/master/substrate/client/sync-state-rpc/src/lib.rs#L131).&#xD;&#xA;&#xD;&#xA;Regarding `ForcedChanges` these are effectively a coordinated hard fork of the GRANDPA authority set, so the chain of trust is broken, hence why they're not part of warp sync proofs. These are only meant to be used to recover from a disaster scenario (e.g. more than 1/3 of the validators go offline and permanently lose access to their session keys)." ContentLicense="CC BY-SA 4.0" />
  <row Id="38761" PostHistoryTypeId="5" PostId="9770" RevisionGUID="aba7a8f4-4845-49af-8bef-7fdb04aa0200" CreationDate="2023-08-29T09:49:38.860" UserId="380" Comment="added 75 characters in body" Text="Seems like this commit (`#98f2e345`) might [no longer exist](https://stackoverflow.com/a/69516957) or you have a corrupt git registry.&#xD;&#xA;&#xD;&#xA;After cloning the repo and checking, the commit does exist in the repository.&#xD;&#xA;&#xD;&#xA;You can try deleting the cargo.lock or [clearing the registry](https://stackoverflow.com/a/59881524)." ContentLicense="CC BY-SA 4.0" />
  <row Id="38766" PostHistoryTypeId="5" PostId="9507" RevisionGUID="63aefd68-ea18-4544-9cd6-e002efe5faff" CreationDate="2023-08-29T10:51:28.000" UserId="234" Comment="Corrected name of method &amp; some typos" Text="I read the release notes for version 0.9.42, which was published on May 4, and noticed that the `transfer` method has been changed to `transfer_allow_death` method, and `transfer` will now serve as an alias for the new method `transfer_allow_death`. The pull request's description stated that the `transfer` method will still remain but its naming is now DEPRECATED, and ecosystem tools should transition to using `transfer_allow_death` within 3 months, after which the `transfer` alias will be removed. I understood that the transfer method will be deprecated three months from the publication date of the release note, but I am uncertain about the starting point for counting those three months until deprecation. Could someone please provide me with the exact date when the `transfer` method will be deprecated　on Westend and Polkadot Mainnet?&#xD;&#xA;&#xD;&#xA;Release Note: https://github.com/paritytech/polkadot/releases/tag/v0.9.42&#xD;&#xA;&#xD;&#xA;Pull Request: https://github.com/paritytech/substrate/pull/12951&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38767" PostHistoryTypeId="4" PostId="9507" RevisionGUID="63aefd68-ea18-4544-9cd6-e002efe5faff" CreationDate="2023-08-29T10:51:28.000" UserId="234" Comment="Corrected name of method &amp; some typos" Text="What is the exact date that `transfer` method as an alias will be deprecated on Westend and Polkadot mainnet" ContentLicense="CC BY-SA 4.0" />
  <row Id="38768" PostHistoryTypeId="2" PostId="9778" RevisionGUID="2bde4b6b-0454-4849-b8de-d9e8560f177e" CreationDate="2023-08-29T10:55:05.663" UserId="234" Text="It is hard to give an exact date of when the `transfer` method will be completely removed and hence become unavailable. &#xD;&#xA;What you mentioned in your question is all correct and you can try to calculate 3 months after the date of the v0.9.42 release but it will all be approximations and many things can happen that can change those dates. &#xD;&#xA;&#xD;&#xA;I would recommend to follow the below approach to check when `transfer` will be removed completely : &#xD;&#xA;- Follow up regularly with the progress of this issue  [\[Deprecation\] Remove deprecated `Balances::transfer` #148][1]&#xD;&#xA;	- There are corresponding tasks in the description of the issue so you can check the progress&#xD;&#xA;	- There is this also a linked open [PR][2] where you can also check part of the progress&#xD;&#xA;- After all the PRs related to this issue are completed/merged, you should check in which release they are included.&#xD;&#xA;- Double check the complete deprecation is mentioned in the release notes of the corresponding release (this is also one of the tasks in the above issue).&#xD;&#xA;- Then for this change to happen/take effect in Polkadot mainnet there is also the step of a referenda that needs to be submitted/voted/passed and enacted for the corresponding runtime upgrade. In the proposal you can usually check the enactment date so there you will have the exact date of when it will removed from Polkadot.&#xD;&#xA;- In Westend this last step is not included so as soon as the release is published you can expect to see the change in Westend some time soon.&#xD;&#xA;&#xD;&#xA;Having mentioned all of the above, one last thought regarding this : &#xD;&#xA;- Instead of trying to calculate and estimate the exact date of the `transfer` method deprecation, why not replace already all the instances of `transfer` method in your code/product with the new `transfer_allow_death` ? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/issues/148&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/pull/1226" ContentLicense="CC BY-SA 4.0" />
  <row Id="38770" PostHistoryTypeId="50" PostId="1933" RevisionGUID="130e6d4b-f285-4071-83a8-81e2ce727d83" CreationDate="2023-08-29T11:00:35.083" UserId="-1" />
  <row Id="38771" PostHistoryTypeId="5" PostId="9737" RevisionGUID="3c74c96a-1862-4357-8e95-69ca595d8fa0" CreationDate="2023-08-29T11:05:04.573" UserId="3136" Comment="correct the format of title and change in body" Text="In Substrate-based blockchains like substrate_node-template, nodes are generated in a continuous manner, even during periods of inactivity when no active transactions are taking place. Ideally, new blocks should only be generated when transactions are actively initiated or created.&#xD;&#xA;&#xD;&#xA;The ongoing creation of blocks, regardless of transaction activity, raises concerns about perpetual block generation and the potential for memory limitations to arise." ContentLicense="CC BY-SA 4.0" />
  <row Id="38772" PostHistoryTypeId="4" PostId="9737" RevisionGUID="3c74c96a-1862-4357-8e95-69ca595d8fa0" CreationDate="2023-08-29T11:05:04.573" UserId="3136" Comment="correct the format of title and change in body" Text="Why substrate nodes are keep creating even when there are no active transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38773" PostHistoryTypeId="24" PostId="9737" RevisionGUID="3c74c96a-1862-4357-8e95-69ca595d8fa0" CreationDate="2023-08-29T11:05:04.573" Comment="Proposed by 3136 approved by 4586 edit id of 537" ContentLicense="CC BY-SA 4.0" />
  <row Id="38774" PostHistoryTypeId="2" PostId="9779" RevisionGUID="0cebfa59-2cd4-4d94-a215-b54a064b1c2b" CreationDate="2023-08-29T11:48:35.123" UserId="2844" Text="There is Containerfile inside [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/Containerfile). What command should I use to run this file. Is the file is similar like DockerFile?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38776" PostHistoryTypeId="1" PostId="9779" RevisionGUID="0cebfa59-2cd4-4d94-a215-b54a064b1c2b" CreationDate="2023-08-29T11:48:35.123" UserId="2844" Text="How to run Containerfile inside node-template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38777" PostHistoryTypeId="3" PostId="9779" RevisionGUID="0cebfa59-2cd4-4d94-a215-b54a064b1c2b" CreationDate="2023-08-29T11:48:35.123" UserId="2844" Text="|substrate-node-template|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38778" PostHistoryTypeId="2" PostId="9780" RevisionGUID="f18bd464-8418-4b5f-b69a-b91c3bc36418" CreationDate="2023-08-29T12:43:18.350" UserId="279" Text="yes is similar to a Dockerfile and you can build/run as expected.&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;docker build -f Containerfile -t node-template:latest .&#xD;&#xA;docker run --rm -it node-template:latest&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;_Note_: Notice that the Containerfile copy the binary from the current path." ContentLicense="CC BY-SA 4.0" />
  <row Id="38780" PostHistoryTypeId="5" PostId="9779" RevisionGUID="bafcfd21-d963-4993-acb9-08e0297b7409" CreationDate="2023-08-29T12:52:48.300" UserId="2844" Comment="added 3070 characters in body" Text="There is Containerfile inside [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/Containerfile). What command should I use to run this file. Is the file is similar like DockerFile?&#xD;&#xA;&#xD;&#xA;I try to run using `docker build -f Containerfile -t node-template:latest .` command but I got this error.&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air substrate-node-template % docker build -f Containerfile -t node-template:latest .&#xD;&#xA;    [+] Building 3.9s (8/9)                                                                                                                     docker:desktop-linux&#xD;&#xA;     =&gt; [internal] load .dockerignore                                                                                                                           0.0s&#xD;&#xA;     =&gt; =&gt; transferring context: 2B                                                                                                                             0.0s&#xD;&#xA;     =&gt; [internal] load build definition from Containerfile                                                                                                     0.0s&#xD;&#xA;     =&gt; =&gt; transferring dockerfile: 947B                                                                                                                        0.0s&#xD;&#xA;     =&gt; [internal] load metadata for docker.io/library/ubuntu:22.04                                                                                             3.4s&#xD;&#xA;     =&gt; [auth] library/ubuntu:pull token for registry-1.docker.io                                                                                               0.0s&#xD;&#xA;     =&gt; CACHED [1/4] FROM docker.io/library/ubuntu:22.04@sha256:ec050c32e4a6085b423d36ecd025c0d3ff00c38ab93a3d71a460ff1c44fa6d77                                0.0s&#xD;&#xA;     =&gt; [internal] load build context                                                                                                                           0.0s&#xD;&#xA;     =&gt; =&gt; transferring context: 2B                                                                                                                             0.0s&#xD;&#xA;     =&gt; CANCELED [2/4] RUN apt-get update &amp;&amp;  DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends   ca-certificates &amp;&amp;  apt-get autoremo  0.4s&#xD;&#xA;     =&gt; ERROR [3/4] COPY --chown=polkadot:polkadot --chmod=774 node-template /usr/bin/node-template                                                             0.0s&#xD;&#xA;    ------                                                                                                                                                           &#xD;&#xA;     &gt; [3/4] COPY --chown=polkadot:polkadot --chmod=774 node-template /usr/bin/node-template:&#xD;&#xA;    ------&#xD;&#xA;    Containerfile:23&#xD;&#xA;    --------------------&#xD;&#xA;      21 |     &#xD;&#xA;      22 |     # copy the compiled binary to the container&#xD;&#xA;      23 | &gt;&gt;&gt; COPY --chown=polkadot:polkadot --chmod=774 node-template /usr/bin/node-template&#xD;&#xA;      24 |     &#xD;&#xA;      25 |     # check if executable works in this container&#xD;&#xA;    --------------------&#xD;&#xA;    ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 57260b33-13ab-451b-9dbb-8cd096257614::rk2qq1n6p0a2l360xp3hgkrc0: &quot;/node-template&quot;: not found&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air substrate-node-template % " ContentLicense="CC BY-SA 4.0" />
  <row Id="38781" PostHistoryTypeId="5" PostId="9778" RevisionGUID="17dfdbc6-4e1a-413a-acda-e22f6b8602c6" CreationDate="2023-08-29T13:00:47.633" UserId="234" Comment="Changed the part about Westend" Text="It is hard to give an exact date of when the `transfer` method will be completely removed and hence become unavailable. &#xD;&#xA;What you mentioned in your question is all correct and you can try to calculate 3 months after the date of the v0.9.42 release but it will all be approximations and many things can happen that can change those dates. &#xD;&#xA;&#xD;&#xA;I would recommend to follow the below approach to check when `transfer` will be removed completely : &#xD;&#xA;- Follow up regularly with the progress of this issue  [\[Deprecation\] Remove deprecated `Balances::transfer` #148][1]&#xD;&#xA;	- There are corresponding tasks in the description of the issue so you can check the progress&#xD;&#xA;	- There is this also a linked open [PR][2] where you can also check part of the progress&#xD;&#xA;- After all the PRs related to this issue are completed/merged, you should check in which release they are included.&#xD;&#xA;- Double check the complete deprecation is mentioned in the release notes of the corresponding release (this is also one of the tasks in the above issue).&#xD;&#xA;- Then for this change to happen/take effect in Polkadot mainnet there is also the step of a referenda that needs to be submitted/voted/passed and enacted for the corresponding runtime upgrade. In the proposal you can usually check the enactment date so there you will have the exact date of when it will be removed from Polkadot.&#xD;&#xA;- In Westend this last step is not included so as soon as the release (which includes the change) is published then you should expect to see also the change in Westend some time soon. Since Westend is a testnet the upgrade happens earlier there so that the community/teams have time to test and check the changes.&#xD;&#xA;&#xD;&#xA;Having mentioned all of the above, one last thought regarding this : &#xD;&#xA;- Instead of trying to calculate and estimate the exact date of the `transfer` method deprecation, why not replace already all the instances of `transfer` method in your code/product with the new `transfer_allow_death` ? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/issues/148&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/pull/1226" ContentLicense="CC BY-SA 4.0" />
  <row Id="38782" PostHistoryTypeId="5" PostId="9677" RevisionGUID="abca7c92-0708-454d-a1f5-b8a68079ea81" CreationDate="2023-08-29T13:17:16.367" UserId="2348" Comment="added 366 characters in body" Text="I am trying to do runtime upgrade of substrate blockchain which is running on 0.9.36 version to substrate version v1.0.0 . While doing runtime upgrade chain stops working and getting this error in logs. &#xD;&#xA;```sh&#xD;&#xA;ERROR {&quot; Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm unreachable instruction executed&quot;} &#xD;&#xA;```&#xD;&#xA;Can anyone please tell how to avoid this error without affecting blockchain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---------------------------------------------------------------------&#xD;&#xA;I have  done this till now.&#xD;&#xA;I have upgraded  versions from 0.9.36 -&gt;0.9.37 -&gt;...-&gt; 0.9.43. everything is going  fine there,But when i tried to  runtime upgrade from 0.9.43 -&gt; 1.0.0 the blockchain  stopped working and i have started receiving errors(same as above) in logs. can you please tell me what is going wrong from 0.9.43 to 1.0.0 and  provide me with some solution .   " ContentLicense="CC BY-SA 4.0" />
  <row Id="38784" PostHistoryTypeId="6" PostId="9601" RevisionGUID="335814bf-840e-4abc-8fe9-ec25cd7e2048" CreationDate="2023-08-29T13:56:32.707" UserId="474" Comment="edited tags" Text="|extrinsic|substrate-node|transaction-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38785" PostHistoryTypeId="6" PostId="9195" RevisionGUID="41943949-7b8d-43bc-9768-2f9186f063d8" CreationDate="2023-08-29T14:00:25.567" UserId="474" Comment="edited tags" Text="|polkadot|substrate-node|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38786" PostHistoryTypeId="2" PostId="9781" RevisionGUID="3679aea5-a4c6-47b9-9cbf-9668ff153068" CreationDate="2023-08-29T14:05:56.393" UserId="4435" Text="I try to build a docker image for the https://github.com/substrate-developer-hub/substrate-node-template.&#xD;&#xA;&#xD;&#xA;I used this file to do it. `Dockerfile.dev`.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;FROM paritytech/ci-linux:production as build&#xD;&#xA;&#xD;&#xA;WORKDIR /code&#xD;&#xA;COPY . .&#xD;&#xA;RUN cargo build --release&#xD;&#xA;&#xD;&#xA;FROM ubuntu:22.04&#xD;&#xA;WORKDIR /node&#xD;&#xA;&#xD;&#xA;# Copy the node binary.&#xD;&#xA;COPY --from=build /code/target/release/node-template .&#xD;&#xA;&#xD;&#xA;# Install root certs, see: https://github.com/paritytech/substrate/issues/9984&#xD;&#xA;# RUN apt update &amp;&amp; \&#xD;&#xA;#     apt install -y ca-certificates &amp;&amp; \&#xD;&#xA;#     update-ca-certificates &amp;&amp; \&#xD;&#xA;#     apt remove ca-certificates -y &amp;&amp; \&#xD;&#xA;#     rm -rf /var/lib/apt/lists/*&#xD;&#xA;&#xD;&#xA;EXPOSE 9944&#xD;&#xA;CMD [ &quot;./node-template&quot;, &quot;--dev&quot; ]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I run `docker build -f Dockerfile.dev -t wolfmorgan/xcavate-substrate-node .`, I got this.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;9.664 info: downloading component 'rust-analyzer'&#xD;&#xA;11.02 info: downloading component 'rust-src'&#xD;&#xA;11.43 info: downloading component 'rust-std' for 'wasm32-unknown-unknown'&#xD;&#xA;15.25 info: downloading component 'rust-std'&#xD;&#xA;21.11 info: downloading component 'rustc'&#xD;&#xA;35.06 info: downloading component 'rustc-dev'&#xD;&#xA;54.36 info: downloading component 'rustfmt'&#xD;&#xA;54.95 info: removing previous version of component 'rust-std' for 'wasm32-unknown-unknown'&#xD;&#xA;59.43 info: rolling back changes&#xD;&#xA;59.44 error: could not rename component file from '/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib' to '/usr/local/rustup/tmp/pz7l5tq2toy2zfqw_dir/bk'&#xD;&#xA;59.45&#xD;&#xA;59.45 Caused by:&#xD;&#xA;59.45     Invalid cross-device link (os error 18)&#xD;&#xA;------&#xD;&#xA;Dockerfile.dev:5&#xD;&#xA;--------------------&#xD;&#xA;   3 |     WORKDIR /code&#xD;&#xA;   4 |     COPY . .&#xD;&#xA;   5 | &gt;&gt;&gt; RUN cargo build --release&#xD;&#xA;   6 |&#xD;&#xA;   7 |     FROM ubuntu:22.04&#xD;&#xA;--------------------&#xD;&#xA;ERROR: failed to solve: process &quot;/bin/sh -c cargo build --release&quot; did not complete successfully: exit code: 1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please help me to fix this issue.&#xD;&#xA;Thank you in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="38788" PostHistoryTypeId="1" PostId="9781" RevisionGUID="3679aea5-a4c6-47b9-9cbf-9668ff153068" CreationDate="2023-08-29T14:05:56.393" UserId="4435" Text="How to fix the problem to build docker image for the substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="38789" PostHistoryTypeId="3" PostId="9781" RevisionGUID="3679aea5-a4c6-47b9-9cbf-9668ff153068" CreationDate="2023-08-29T14:05:56.393" UserId="4435" Text="|substrate-node-template|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38790" PostHistoryTypeId="2" PostId="9782" RevisionGUID="6fea99f1-97d4-4426-b1e8-4e117f7d076f" CreationDate="2023-08-29T14:16:15.243" UserId="3631" Text="`Transaction author public key not found` error indicates that Vault does not have the corresponding key to sign the transaction.&#xD;&#xA;&#xD;&#xA;&gt; I have recovered the parity signer with the n-monic phrase&#xD;&#xA;&#xD;&#xA;You also need to recover keys that you used for signing. &#xD;&#xA;&#xD;&#xA;In case you used custom derivations to create keys on the previous Signer, you need to re-create those keys with the same derivation paths.&#xD;&#xA;&#xD;&#xA;But I would assume you didn't create any custom keys. There is an issue: different Signer version have different rules for creating default keys (unfortunately).&#xD;&#xA;So depending on the Signer version you used before, default keys might be either:&#xD;&#xA;&#xD;&#xA;- `//&lt;network&gt;` - i.e. `//polkadot` for polkadot&#xD;&#xA;- ` ` - empty derivation path&#xD;&#xA;&#xD;&#xA;Try to create those keys and see if that helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; the signer was giving me an error after scanning the QR from the transaction&#xD;&#xA;&#xD;&#xA;Was there an error message? I can only assume it was about outdated metadata. In this case, you need to update it from https://metadata.parity.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="38793" PostHistoryTypeId="2" PostId="9783" RevisionGUID="2c52b182-206d-4613-8339-d5531949c7e0" CreationDate="2023-08-29T18:10:34.103" UserId="4081" Text="I am learning to use polkadotjs api, I am trying to send a system.remarkWithEvent and then get the event that this created and decode de output to verify that the remark is there.&#xD;&#xA;&#xD;&#xA;The sending of the extrinsic is pretty straight forward:&#xD;&#xA;```&#xD;&#xA;let remark = new TextEncoder().encode('this is a test to encode something#5');&#xD;&#xA;api.tx.system.remarkWithEvent(remark).signAndSend(account, { nonce: nextSudoNonce });&#xD;&#xA;```&#xD;&#xA;but then when I try to get the event data for this remark object the data is the following:&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  sender: '0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac',&#xD;&#xA;  hash_: '0x2652d1ebf54bb7143af7548273e4f51c960fb743d2f99e945eb00b6ef141abbb'&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Where `hash_` is the remark, how can I decode this data to get the original string?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38795" PostHistoryTypeId="1" PostId="9783" RevisionGUID="2c52b182-206d-4613-8339-d5531949c7e0" CreationDate="2023-08-29T18:10:34.103" UserId="4081" Text="Decode event data" ContentLicense="CC BY-SA 4.0" />
  <row Id="38796" PostHistoryTypeId="3" PostId="9783" RevisionGUID="2c52b182-206d-4613-8339-d5531949c7e0" CreationDate="2023-08-29T18:10:34.103" UserId="4081" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38797" PostHistoryTypeId="2" PostId="9784" RevisionGUID="b4e8f1d4-1e8c-41b4-802c-0f1e19f2273d" CreationDate="2023-08-30T02:13:05.767" UserId="251" Text="For now, I suggest trying a different source.&#xD;&#xA;&#xD;&#xA;I believe the issue lies in this specific line:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/scripts/blob/6217dcbb88110fca3546a51d19b730fe737e81f9/dockerfiles/ci-linux/Dockerfile#L31-L32&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;https://unix.stackexchange.com/questions/79132/invalid-cross-device-link-while-hardlinking-in-the-same-file-system&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38799" PostHistoryTypeId="5" PostId="9784" RevisionGUID="787b1db0-a488-41e7-8533-ff5ffe5c8f69" CreationDate="2023-08-30T02:33:42.253" UserId="251" Comment="added 6 characters in body" Text="For now, I suggest trying a different image source.&#xD;&#xA;&#xD;&#xA;I believe the issue lies in this specific line:&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/scripts/blob/6217dcbb88110fca3546a51d19b730fe737e81f9/dockerfiles/ci-linux/Dockerfile#L31-L32&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;https://unix.stackexchange.com/questions/79132/invalid-cross-device-link-while-hardlinking-in-the-same-file-system&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38800" PostHistoryTypeId="5" PostId="1529" RevisionGUID="e1612a15-1868-4dbf-bbde-929938c49556" CreationDate="2023-08-30T06:22:20.657" UserId="554" Comment="edited body" Text="This error normally comes in windows. As Native development of substrate is not very well supported in windows so you will face errors now and then. But there is a permanent solution for the same.&#xD;&#xA;As we all know Substrate development is easiest on Unix-based operating systems like macOS or Linux.&#xD;&#xA;So we will convert our windows into Linux without installing any new software just by Enabling some inbuilt windows feature. &#xD;&#xA;&#xD;&#xA;First of all, prepare your windows system for the substrate. This can be done using **windows subsystem Linux(wsl)**. To use it go into the control panel &gt; programs &gt; programs and Features &gt; Turn windows Feature On or OFF, &#xD;&#xA;And in it tick mark on **Hyper-V** and **windows subsystem for Linux** as shown in the images below.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;After that Enable the virtualization by going into the bios advance section on your laptop. To access bios on different laptops there is a different process. So look on youtube for how to Enable virtualization on your system.&#xD;&#xA;&#xD;&#xA;If you have a home edition of windows, Hyper-V might not be there so first install that. To install hyper-v follow the below instruction:&#xD;&#xA;1. Open Notepad and paste the below-given code as shown below:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;pushd &quot;%~dp0&quot;&#xD;&#xA;dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum &gt;hv.txt&#xD;&#xA;for /f %%i in ('findstr /i . hv.txt 2^&gt;nul') do dism /online /norestart /add-package:&quot;%SystemRoot%\servicing\Packages\%%i&quot;&#xD;&#xA;del hv.txt&#xD;&#xA;Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL&#xD;&#xA;pause&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. After that in the notepad where you have pasted the code select 'Save as' and then name the file as hyper-v.bat and below that in 'save as type' select All Files and save it on the desktop or wherever you can easily find it. &#xD;&#xA;3. Then run that file as administrator&#xD;&#xA;&#xD;&#xA;It will ask you to restart your system and Hyper-v will be installed on your system.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;After all the above is done go into the windows app store and search wsl. You will se multiple options. There select Ubuntu 20.04.4 LTS (or whatever you like) and download it as it's famous and normally used.&#xD;&#xA;And in ubuntu set username and password. Username should follow [a-z,0-9] only.&#xD;&#xA;&#xD;&#xA;After that follow the instructions on this doc: https://docs.substrate.io/v3/getting-started/installation/#ubuntudebian&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/sYoh2.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/6uaIu.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38801" PostHistoryTypeId="5" PostId="9744" RevisionGUID="625c219a-fe6e-4537-90d5-7a45f32d56f4" CreationDate="2023-08-30T07:20:44.067" UserId="3395" Comment="added 1105 characters in body" Text="In my runtime I'm using `pub type AccountId = &lt;&lt;Signature as Verify&gt;::Signer as IdentifyAccount&gt;::AccountId;`. Within my pallet I also need this type to implement `From&lt;SomeType&gt;`. I attempted to add `type CustomAccountId: From&lt;SomeType&gt;;` to my pallet's config, but encountered numerous errors. I'm not even sure if I'm on the right track. What is the proper way to achieve this?&#xD;&#xA;&#xD;&#xA;**Edit**: To be more specific, I have the following type definition in my pallet, which is also used in a StorageMap&#xD;&#xA;```rust&#xD;&#xA;type AccountId: IsType&lt;&lt;Self as frame_system::Config&gt;::AccountId&gt; + From&lt;H160&gt;;&#xD;&#xA;&#xD;&#xA;// some code...&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub(super) type AssetOwner&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, U256, &lt;T as pallet::Config&gt;::AccountId, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;Some errors I got:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0599]: the function or associated item `get` exists for struct `StorageMap&lt;_GeneratedPrefixForStorageAssetOwner&lt;T&gt;, Blake2_128Concat, U256, &lt;T as Config&gt;::AccountId&gt;`, but its trait bounds were not satisfied&#xD;&#xA;...&#xD;&#xA;error[E0277]: the trait bound `&lt;T as pallet::Config&gt;::AccountId: std::clone::Clone` is not satisfied&#xD;&#xA;...&#xD;&#xA;the trait bound `&lt;T as pallet::Config&gt;::AccountId: WrapperTypeEncode` is not satisfied&#xD;&#xA;...&#xD;&#xA;error[E0369]: binary operation `==` cannot be applied to type `&amp;&lt;T as pallet::Config&gt;::AccountId`&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;These errors make me suspect that I'm not extending the AccountId type from the runtime config correctly. What is the proper way to achieve this functionality?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38803" PostHistoryTypeId="2" PostId="9785" RevisionGUID="c5d4ddd6-517e-486d-ae69-46977fc4364c" CreationDate="2023-08-30T07:39:27.033" UserId="251" Text="The error message is still unclear. It appears that the error originated from the runtime instead of the pallet. When passing `AccountId = YourImplementation`, `YourImplementation` must meet all trait bounds.&#xD;&#xA;&#xD;&#xA;You can check how other projects implement their account id here: [link](https://github.com/paritytech/frontier/blob/8b0ff04104d4d5c2354c8eef4f7de0dffc27dff6/primitives/account/src/lib.rs#L32).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For example, this line `#[derive(Clone)]` at [line 30](https://github.com/paritytech/frontier/blob/8b0ff04104d4d5c2354c8eef4f7de0dffc27dff6/primitives/account/src/lib.rs#L30) will satisfy the following error:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `&lt;T as pallet::Config&gt;::AccountId: std::clone::Clone` is not satisfied&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I believe so." ContentLicense="CC BY-SA 4.0" />
  <row Id="38805" PostHistoryTypeId="2" PostId="9786" RevisionGUID="8096956a-ca45-4a94-83cd-ae00a0990e74" CreationDate="2023-08-30T08:23:30.847" UserId="1905" Text="From the [documentation][1], we have 2 ways of instantiating a contract from a code_hash, but both require a `ContractRef`.&#xD;&#xA;&#xD;&#xA;In order to obtain `ContractRef` we have to import the contract crate as a dependency into the current project, which might not be ideal in case we only have code_hash of the contract.&#xD;&#xA;&#xD;&#xA;So is there a way to instantiate a contract from code_hash without ContractRef?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/basics/cross-contract-calling" ContentLicense="CC BY-SA 4.0" />
  <row Id="38807" PostHistoryTypeId="1" PostId="9786" RevisionGUID="8096956a-ca45-4a94-83cd-ae00a0990e74" CreationDate="2023-08-30T08:23:30.847" UserId="1905" Text="Is there a way to instantiate a contract from code_hash without ContractRef" ContentLicense="CC BY-SA 4.0" />
  <row Id="38808" PostHistoryTypeId="3" PostId="9786" RevisionGUID="8096956a-ca45-4a94-83cd-ae00a0990e74" CreationDate="2023-08-30T08:23:30.847" UserId="1905" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38809" PostHistoryTypeId="2" PostId="9787" RevisionGUID="271f59b9-5554-44b5-8c74-5207e54b4d1a" CreationDate="2023-08-30T08:32:28.667" UserId="2762" Text="The extrinsic `remarkWithEvent` ([remark_with_event][1]) does a Hash of the data that you send as a parameter and it sends you this hash in the event.&#xD;&#xA;```rs&#xD;&#xA;let hash = T::Hashing::hash(&amp;remark[..]);&#xD;&#xA;Self::deposit_event(Event::Remarked { sender: who, hash });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It depends of the Configuration of the network you are which hashing algorithm is using, but the process of hashing is normally one-way. &#xD;&#xA;&#xD;&#xA;You can see for example that [the default is BlakeTwo256][2]:&#xD;&#xA;```rs&#xD;&#xA;type Hashing = sp_runtime::traits::BlakeTwo256;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So I don't think you can get the original value, what you can do in with PolkadotJS is hash it locally with the same method is using onchain and compare that the values are the same.&#xD;&#xA;&#xD;&#xA;See the documentation and some examples of the hashing algorithms exposed in the `util-crypto` package: [HashData][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L514&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/system/src/lib.rs#L222C20-L222C50&#xD;&#xA;  [3]: https://polkadot.js.org/docs/util-crypto/examples/hash-data" ContentLicense="CC BY-SA 4.0" />
  <row Id="38811" PostHistoryTypeId="6" PostId="9783" RevisionGUID="358d97e4-bf14-4615-a1c2-454b3bbd04d6" CreationDate="2023-08-30T08:32:45.187" UserId="2762" Comment="edited tags" Text="|polkadot-js|typescript|hash|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38812" PostHistoryTypeId="2" PostId="9788" RevisionGUID="bdbd11f7-3f0b-454e-ba54-fe99731a3e91" CreationDate="2023-08-30T09:07:35.040" UserId="2844" Text="We have our own chain where we've added `pallet_contracts` pallet for writing and deploying smart contract. We just want to give permission to upload smart contract for authorized users only. Someone please gives some advice how can we implement this features?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38814" PostHistoryTypeId="1" PostId="9788" RevisionGUID="bdbd11f7-3f0b-454e-ba54-fe99731a3e91" CreationDate="2023-08-30T09:07:35.040" UserId="2844" Text="How to customize pallet_contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38815" PostHistoryTypeId="3" PostId="9788" RevisionGUID="bdbd11f7-3f0b-454e-ba54-fe99731a3e91" CreationDate="2023-08-30T09:07:35.040" UserId="2844" Text="|substrate-node-template|substrate-node|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38816" PostHistoryTypeId="5" PostId="9788" RevisionGUID="fed85bb5-c0e0-4158-b972-d1fca8da173d" CreationDate="2023-08-30T09:45:52.053" UserId="2844" Comment="deleted 7 characters in body" Text="We have our own chain where we've added `pallet_contracts` pallet for writing and deploying smart contract. We just want to give permission to upload smart contract for few users only. Someone please gives some advice how can we implement this features?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38817" PostHistoryTypeId="2" PostId="9789" RevisionGUID="93e067a5-5d50-44c7-9d13-e3af01ddf452" CreationDate="2023-08-30T10:17:49.780" UserId="2762" Text="That's is a very interesting feature, I would like to see cool approaches and ideas in the responses of this question.&#xD;&#xA;&#xD;&#xA;I don't think you can get this functionality with the current `pallet_contracts` (But I might be wrong). Anyone (or any program) that has tokens of the chain can upload a smart contract without requiring permission using this pallet. &#xD;&#xA;&#xD;&#xA;I can think of two options here:&#xD;&#xA;&#xD;&#xA; 1. The first one and the less recommended is to copy the code of the pallet into a new pallet `custom_pallet_contracts` and modify the code to let only authorised users upload the contract. For that you only need to create a new storage where you keep a list of all the users with permissions to upload contracts, and modify the [upload_contract][1] extrinsic in order to check that the origin is in that list.&#xD;&#xA;&#xD;&#xA;2. The second option is a bit more complex but definitely is the one I recommend to go. Create a new pallet that acts a &quot;wrapper pallet&quot; for the `pallet_contract` where you can add additional logic like check if the origin can upload the contract.  &#xD;&#xA;&#xD;&#xA;    The idea is not mine, is from Sergei and Shawn, and they created a tutorial about it 4 years ago: [Extending Substrate Runtime Modules][2].&#xD;&#xA;You can see the code of this &quot;wrapper pallet&quot; here: [Sudo Contract][3] .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   The tutorial is amazing but is outdated so you won't probably be able to use the same code, but you will get the concept and understand the logic and the steps needed:&#xD;&#xA;&#xD;&#xA;    - In your new pallet expose the same extrinsic calls as the `pallet_contracts` (in your case at least the `upload_contract`) and forwards those calls to the real `pallet_contracts`.&#xD;&#xA;    - Before forwards those calls to the real `pallet_contracts`, add your  authorization checks logic.&#xD;&#xA;    - In your node make the `pallet_contracts` pallet &quot;Un-Callable&quot; so the `upload_contract` extrinsic has to be called within your &quot;wrapper pallet&quot;&#xD;&#xA;&#xD;&#xA;Another example of this concept of extending functionality of a current pallet is the [NFTs Royalty Pallet][4], which is a &quot;wrapped pallet&quot; that manages a royalties for the `nft_pallet`, locking the transfer in the `nft_pallet` and forcing users to make the NFT transfers within the `nft_royalties_pallet` that has some extra logic on top of it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/lib.rs#L609C10-L609C21&#xD;&#xA;  [2]: https://www.shawntabrizi.com/substrate/extending-substrate-runtime-modules/&#xD;&#xA;  [3]: https://github.com/shawntabrizi/sudo-contract&#xD;&#xA;  [4]: https://forum.polkadot.network/t/nfts-royalty-pallet/3766" ContentLicense="CC BY-SA 4.0" />
  <row Id="38819" PostHistoryTypeId="2" PostId="9790" RevisionGUID="4d88ec91-7910-4c45-8b3c-71010d964fc6" CreationDate="2023-08-30T10:57:42.693" UserId="94" Text="`ensure_signed` and `ensure_root` are just a singular match statement.  &#xD;&#xA;They dont do any signature verification - that was already done prior and is included in the transaction base weight.&#xD;&#xA;&#xD;&#xA;You can check their implementations; for example `ensure_signed`:&#xD;&#xA;```rust&#xD;&#xA;pub fn ensure_signed&lt;OuterOrigin, AccountId&gt;(o: OuterOrigin) -&gt; Result&lt;AccountId, BadOrigin&gt;&#xD;&#xA;where&#xD;&#xA;	OuterOrigin: Into&lt;Result&lt;RawOrigin&lt;AccountId&gt;, OuterOrigin&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	match o.into() {&#xD;&#xA;		Ok(RawOrigin::Signed(t)) =&gt; Ok(t),&#xD;&#xA;		_ =&gt; Err(BadOrigin),&#xD;&#xA;	}&#xD;&#xA;}" ContentLicense="CC BY-SA 4.0" />
  <row Id="38821" PostHistoryTypeId="5" PostId="9790" RevisionGUID="94d9203a-405f-4c3a-a582-320d9a8db2bd" CreationDate="2023-08-30T11:11:22.110" UserId="94" Comment="added 199 characters in body" Text="`ensure_signed` and `ensure_root` are just a singular match statement.  &#xD;&#xA;They dont do any signature verification - that was already done prior and is included in the transaction base weight.  &#xD;&#xA;Otherwise if you want to be really pedantic, you can obviously add an `ensure_signed` call to your benchmark code or benchmark it independently and add the weight, but I dont think its necessary.&#xD;&#xA;&#xD;&#xA;You can check their implementations; for example `ensure_signed`:&#xD;&#xA;```rust&#xD;&#xA;pub fn ensure_signed&lt;OuterOrigin, AccountId&gt;(o: OuterOrigin) -&gt; Result&lt;AccountId, BadOrigin&gt;&#xD;&#xA;where&#xD;&#xA;	OuterOrigin: Into&lt;Result&lt;RawOrigin&lt;AccountId&gt;, OuterOrigin&gt;&gt;,&#xD;&#xA;{&#xD;&#xA;	match o.into() {&#xD;&#xA;		Ok(RawOrigin::Signed(t)) =&gt; Ok(t),&#xD;&#xA;		_ =&gt; Err(BadOrigin),&#xD;&#xA;	}&#xD;&#xA;}" ContentLicense="CC BY-SA 4.0" />
  <row Id="38822" PostHistoryTypeId="5" PostId="9785" RevisionGUID="6026aac0-c7f7-4e2f-aa2e-32fdb76ba003" CreationDate="2023-08-30T11:22:26.537" UserId="251" Comment="added 680 characters in body" Text="The error message is still unclear. It appears that the error originated from the runtime instead of the pallet. When passing `AccountId = YourImplementation`, `YourImplementation` must meet all trait bounds.&#xD;&#xA;&#xD;&#xA;You can check how other projects implement their account id here: [link](https://github.com/paritytech/frontier/blob/8b0ff04104d4d5c2354c8eef4f7de0dffc27dff6/primitives/account/src/lib.rs#L32).&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;For example, this line `#[derive(Clone)]` at [line 30](https://github.com/paritytech/frontier/blob/8b0ff04104d4d5c2354c8eef4f7de0dffc27dff6/primitives/account/src/lib.rs#L30) will satisfy the following error:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `&lt;T as pallet::Config&gt;::AccountId: std::clone::Clone` is not satisfied&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I believe so.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After reviewing your source code, it appears that the `IsType` function removes the trait bound of `frame_system::Config::AccountId`. It seems there is no straightforward way to extend the associated type for this. &#xD;&#xA;&#xD;&#xA;If you really want to do this that way, try:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;type AccountId: IsType&lt;&lt;Self as frame_system::Config&gt;::AccountId&gt; + From&lt;H160&gt; + Parameter + Member + MaxEncodedLen;&#xD;&#xA;```&#xD;&#xA;I believe this would break something.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;It would be advisable to utilize the `frame_system::Config::AccountId` directly and provide a converter for it. For example:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;trait Config: frame_system::Config {&#xD;&#xA;    type H160ToAccountId: Convert&lt;Self::AccountId, H160&gt;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;trait Convert&lt;A, B&gt; {&#xD;&#xA;    fn convert(a: A) -&gt; B;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;enum H160ToAccountIdConverter {}&#xD;&#xA;impl Convert&lt;AccountId, H160&gt; for H160ToAccountIdConverter {&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl your_pallet::Config for Runtime {&#xD;&#xA;    type H160ToAccountId = H160ToAccountIdConverter;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38823" PostHistoryTypeId="5" PostId="9785" RevisionGUID="cc67b2ac-713a-4c9c-b07a-4fbac491bcaf" CreationDate="2023-08-30T11:29:35.287" UserId="251" Comment="added 71 characters in body" Text="&gt; Outdated&#xD;&#xA;&gt;&#xD;&#xA;&gt; The error message is still unclear. It appears that the error&#xD;&#xA;&gt; originated from the runtime instead of the pallet. When passing&#xD;&#xA;&gt; `AccountId = YourImplementation`, `YourImplementation` must meet all&#xD;&#xA;&gt; trait bounds.&#xD;&#xA;&gt; &#xD;&#xA;&gt; You can check how other projects implement their account id here:&#xD;&#xA;&gt; [link](https://github.com/paritytech/frontier/blob/8b0ff04104d4d5c2354c8eef4f7de0dffc27dff6/primitives/account/src/lib.rs#L32).&#xD;&#xA;&gt; &#xD;&#xA;&gt; ---&#xD;&#xA;&gt; &#xD;&#xA;&gt; For example, this line `#[derive(Clone)]` at [line&#xD;&#xA;&gt; 30](https://github.com/paritytech/frontier/blob/8b0ff04104d4d5c2354c8eef4f7de0dffc27dff6/primitives/account/src/lib.rs#L30)&#xD;&#xA;&gt; will satisfy the following error: ``` error[E0277]: the trait bound&#xD;&#xA;&gt; `&lt;T as pallet::Config&gt;::AccountId: std::clone::Clone` is not satisfied&#xD;&#xA;&gt; ```&#xD;&#xA;&gt; &#xD;&#xA;&gt; I believe so.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;After reviewing your source code, it appears that the `IsType` function removes the trait bound of `frame_system::Config::AccountId`. It seems there is no straightforward way to extend the associated type for this. &#xD;&#xA;&#xD;&#xA;If you really want to do this that way, try:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;type AccountId: IsType&lt;&lt;Self as frame_system::Config&gt;::AccountId&gt; + From&lt;H160&gt; + Parameter + Member + MaxEncodedLen;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This almost re-define a new `AccountId`.&#xD;&#xA;&#xD;&#xA;Check: https://github.com/freeverseio/laos-ownership-node/pull/143.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;There is another way, use the `frame_system::Config::AccountId` directly and provide a converter for it. For example:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;trait Config: frame_system::Config {&#xD;&#xA;    type H160ToAccountId: Convert&lt;Self::AccountId, H160&gt;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;trait Convert&lt;A, B&gt; {&#xD;&#xA;    fn convert(a: A) -&gt; B;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;enum H160ToAccountIdConverter {}&#xD;&#xA;impl Convert&lt;AccountId, H160&gt; for H160ToAccountIdConverter {&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl your_pallet::Config for Runtime {&#xD;&#xA;    type H160ToAccountId = H160ToAccountIdConverter;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38825" PostHistoryTypeId="2" PostId="9791" RevisionGUID="e68a5b4e-8ace-49ee-9749-818362eaa967" CreationDate="2023-08-30T11:53:15.473" UserId="3711" Text="In Polkadot JS Apps, when signing a payload the payload is wrapped in a `&lt;Bytes&gt;` tag. E.g.&#xD;&#xA;&#xD;&#xA;[![screenshot of polkadot js apps][1]][1]&#xD;&#xA;&#xD;&#xA;I put a few console log's in the polkadot JS apps code to figure out what's going on. As you can see, the payload data is `hello` and this gets wrapped before signing. The wrapper is the ASCII chars, e.g.&#xD;&#xA;```&#xD;&#xA;[60, 66, 121, 116, 101, 115, 62, 104, 101, 108, 108, 111, 60, 47, 66, 121, 116, 101, 115, 62]&#xD;&#xA;```&#xD;&#xA;maps to&#xD;&#xA;```&#xD;&#xA;&lt;Bytes&gt;hello&lt;/Bytes&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This process of wrapping the `Bytes` tag is done ahead of signing a message / payload.&#xD;&#xA;&#xD;&#xA;Is this some kind of convention? Why is this done and what does it achieve?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/s4DSW.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38827" PostHistoryTypeId="1" PostId="9791" RevisionGUID="e68a5b4e-8ace-49ee-9749-818362eaa967" CreationDate="2023-08-30T11:53:15.473" UserId="3711" Text="Why are payloads wrapped in a &lt;Bytes&gt; tag?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38828" PostHistoryTypeId="3" PostId="9791" RevisionGUID="e68a5b4e-8ace-49ee-9749-818362eaa967" CreationDate="2023-08-30T11:53:15.473" UserId="3711" Text="|polkadot-js|polkadot-js-extension|signing|apps|signatures|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38829" PostHistoryTypeId="2" PostId="9792" RevisionGUID="f2839852-1c61-4e31-8b36-a50c2a135896" CreationDate="2023-08-30T12:24:24.333" UserId="3327" Text="I am following this tutorial to add trusted nodes to a network:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/&#xD;&#xA;&#xD;&#xA;My question is, in the tutorial, we need to add aura and grandpa keys to the keystore on local machine. Why this step is needed? What is the purpose of adding keys to the key store?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38831" PostHistoryTypeId="1" PostId="9792" RevisionGUID="f2839852-1c61-4e31-8b36-a50c2a135896" CreationDate="2023-08-30T12:24:24.333" UserId="3327" Text="Why we add keys to the the key store?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38832" PostHistoryTypeId="3" PostId="9792" RevisionGUID="f2839852-1c61-4e31-8b36-a50c2a135896" CreationDate="2023-08-30T12:24:24.333" UserId="3327" Text="|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38833" PostHistoryTypeId="34" PostId="9744" RevisionGUID="f2fe18ec-a481-4a60-b50f-51e20756be27" CreationDate="2023-08-30T12:31:50.313" UserId="3395" Comment="32" />
  <row Id="38834" PostHistoryTypeId="2" PostId="9793" RevisionGUID="867b3179-8bbe-444a-915e-14acced6cc4a" CreationDate="2023-08-30T12:34:12.437" UserId="3317" Text="Your node needs the private keys to sign e.g. blocks or grandpa commits&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38836" PostHistoryTypeId="10" PostId="9791" RevisionGUID="33007a3d-6870-408c-b7db-e9a779e69ac7" CreationDate="2023-08-30T12:38:22.290" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[8975],&quot;Voters&quot;:[{&quot;Id&quot;:380,&quot;DisplayName&quot;:&quot;forgetso&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="38837" PostHistoryTypeId="2" PostId="9794" RevisionGUID="8ba2272a-c7c9-49aa-aaf9-66d202864ae6" CreationDate="2023-08-30T12:41:59.063" UserId="4019" Text="I tried to add Chain bridge and example to our existing substrate relay-chain, but I got an error during this import (use sp_io::hashing::blake2_128;). Please let me know how to add this import . I have also attached a screenshot to this post. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks in advance.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kp6Dm.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="38839" PostHistoryTypeId="1" PostId="9794" RevisionGUID="8ba2272a-c7c9-49aa-aaf9-66d202864ae6" CreationDate="2023-08-30T12:41:59.063" UserId="4019" Text="chainbridge-added in substrate-relaychain" ContentLicense="CC BY-SA 4.0" />
  <row Id="38840" PostHistoryTypeId="3" PostId="9794" RevisionGUID="8ba2272a-c7c9-49aa-aaf9-66d202864ae6" CreationDate="2023-08-30T12:41:59.063" UserId="4019" Text="|substrate-node-template|chainbridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38841" PostHistoryTypeId="2" PostId="9795" RevisionGUID="9b449f52-3411-4e60-b421-400312bc4fd3" CreationDate="2023-08-30T13:27:53.617" UserId="3319" Text="Keys are incorporated into a keystore due to their requirement by consensus algorithms for signing consensus messages. The keystore serves as a secure repository for these keys, offering an organized and safeguarded means of storing them. Essentially, the keystore is an ideal container for holding the keys, ensuring their protection while fulfilling the needs of consensus algorithms." ContentLicense="CC BY-SA 4.0" />
  <row Id="38843" PostHistoryTypeId="52" PostId="9788" RevisionGUID="f2076c65-5018-4dff-bac3-3f4364a5f18a" CreationDate="2023-08-30T17:11:02.850" />
  <row Id="38844" PostHistoryTypeId="50" PostId="4798" RevisionGUID="a77fb4ac-010c-442a-bc08-b747e97e8c3a" CreationDate="2023-08-30T22:06:40.833" UserId="-1" />
  <row Id="38845" PostHistoryTypeId="2" PostId="9796" RevisionGUID="30943850-bc96-4af5-ae67-f706c2762e02" CreationDate="2023-08-31T04:54:43.207" UserId="2372" Text="It appears that there might be a duplicate dependency in your cargo.toml file, or you might have overlooked adding a dependency to your std. Could you kindly provide the link to your code so that we can investigate the cargo toml?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38847" PostHistoryTypeId="2" PostId="9797" RevisionGUID="70b89936-806b-415f-a1e3-c83bc1fd4b2c" CreationDate="2023-08-31T06:03:36.713" UserId="4019" Text="Hi Thanks for your response ,&#xD;&#xA;&#xD;&#xA;**The below file is my cargo.toml code inside the runtime folder please check and let me know here.I want to add this line in inside the lib.rs file (use sp_io::hashing::blake2_128;)**&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;MIT-0&quot;&#xD;&#xA;publish = false&#xD;&#xA;syn = &quot;1.0.94&quot;&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-std = { version = &quot;8.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-version = { version = &quot;22.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-io = {version = &quot;2.0.0&quot;,default-features = false }&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;&#xD;&#xA;[dependencies.chainbridge]&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/ChainSafe/chainbridge-substrate'&#xD;&#xA;package = 'chainbridge'&#xD;&#xA;tag = 'v1.3.0'&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;sp-io/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-consensus-grandpa/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;	&quot;substrate-wasm-builder&quot;,	&#xD;&#xA;	&quot;chainbridge/std&quot;,&#xD;&#xA;	&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-sudo/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-template/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;][![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lxzwF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38849" PostHistoryTypeId="2" PostId="9798" RevisionGUID="53c1b4f8-7666-41b7-9c79-56b7dab0b949" CreationDate="2023-08-31T07:07:48.340" UserId="2844" Text="I am getting this error while adding `pallet_contracts` in my chain. This is my [github-code](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/89c3592fde4c6577962dff6497a0961e0adbd216/runtime/src/lib.rs#L730). Can you please describe me why I am getting this issue? &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WL7rZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38851" PostHistoryTypeId="1" PostId="9798" RevisionGUID="53c1b4f8-7666-41b7-9c79-56b7dab0b949" CreationDate="2023-08-31T07:07:48.340" UserId="2844" Text="Uncaught error. Something went wrong with the query and rendering of this component" ContentLicense="CC BY-SA 4.0" />
  <row Id="38852" PostHistoryTypeId="3" PostId="9798" RevisionGUID="53c1b4f8-7666-41b7-9c79-56b7dab0b949" CreationDate="2023-08-31T07:07:48.340" UserId="2844" Text="|substrate-node-template|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38853" PostHistoryTypeId="2" PostId="9799" RevisionGUID="99e5a198-b2ae-42b8-bb34-abaf47fefa88" CreationDate="2023-08-31T07:22:56.980" UserId="377" Text="I want to send the tokens to bulk/multiple accounts. &#xD;&#xA;&#xD;&#xA;Do we have any way to do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38855" PostHistoryTypeId="1" PostId="9799" RevisionGUID="99e5a198-b2ae-42b8-bb34-abaf47fefa88" CreationDate="2023-08-31T07:22:56.980" UserId="377" Text="can we do batch/multiple transfer in once?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38856" PostHistoryTypeId="3" PostId="9799" RevisionGUID="99e5a198-b2ae-42b8-bb34-abaf47fefa88" CreationDate="2023-08-31T07:22:56.980" UserId="377" Text="|balances|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38857" PostHistoryTypeId="2" PostId="9800" RevisionGUID="415d6783-7414-4e39-8865-6c6a98eebc23" CreationDate="2023-08-31T08:46:21.507" UserId="3317" Text="Have a look at [pallet-utility][1]'s extrinsics!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/utility/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="38859" PostHistoryTypeId="2" PostId="9801" RevisionGUID="642a2301-b958-40f9-9831-07277f755252" CreationDate="2023-08-31T10:18:34.600" UserId="3963" Text="Take a look at how [pallet-xcm](https://github.com/paritytech/polkadot-sdk/blob/aabed6757e26e21ce06dd59946a17b72f349185e/polkadot/xcm/pallet-xcm/src/lib.rs#L449-L457) handles the conversion of the SendError to pallet errors. This might help you with your problem." ContentLicense="CC BY-SA 4.0" />
  <row Id="38861" PostHistoryTypeId="5" PostId="9768" RevisionGUID="fa251a04-d9fe-4d7f-a4a7-0baa82ec1504" CreationDate="2023-08-31T10:28:33.750" UserId="2762" Comment="improved formatting" Text="I got this error while authorizing specific nodes in building a blockchain.&#xD;&#xA;It gives me error like this.&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;error: failed to select a version for `bounded-collections`.&#xD;&#xA;    ... required by package `sp-core v21.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)`&#xD;&#xA;    ... which satisfies git dependency `sp-core` of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking` of package `frame-system-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)`&#xD;&#xA;    ... which satisfies git dependency `frame-system-benchmarking` of package `node-template-runtime v4.0.0-dev (/home/ubuntu/substrate-node-template/runtime)`&#xD;&#xA;    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/ubuntu/substrate-node-template/node)`&#xD;&#xA;versions that meet the requirements `^0.1.8` are: 0.1.8&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `bounded-collections v0.1.6`&#xD;&#xA;    ... which satisfies dependency `bounded-collections = &quot;^0.1.4&quot;` (locked to 0.1.6) of package `sp-core v7.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)`&#xD;&#xA;    ... which satisfies git dependency `sp-core` (locked to 7.0.0) of package `frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking` (locked to 4.0.0-dev) of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.42#bca8a29d)`&#xD;&#xA;    ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/ubuntu/substrate-node-template/node)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `bounded-collections` which could resolve this conflict&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;[More logs here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/IRJD9.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38862" PostHistoryTypeId="50" PostId="9272" RevisionGUID="a1cbb88d-5996-41d4-bd15-68d3de5f9782" CreationDate="2023-08-31T11:07:00.873" UserId="-1" />
  <row Id="38863" PostHistoryTypeId="2" PostId="9802" RevisionGUID="b03714be-f3d5-4e5a-b9a2-a638a9c655d0" CreationDate="2023-08-31T11:15:17.067" UserId="3317" Text="There is something wrong with your dependencies versioning, more specifically `sp-core` (I see v0.9.42 &amp; v1.0.0). Check your Cargo.toml files for your node, runtime and pallet(s)." ContentLicense="CC BY-SA 4.0" />
  <row Id="38865" PostHistoryTypeId="2" PostId="9803" RevisionGUID="3707eea1-415e-4424-a6b9-3b3e675900d4" CreationDate="2023-08-31T12:09:35.440" UserId="4019" Text="We have tried to connect my relay chain with Chainbridge, but I got errors (SUB to ETH and ETH to SUB). I could not replace the existing relay chain with my relay chain. Please let me know the solution or suggestions.&#xD;&#xA;&#xD;&#xA;Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="38867" PostHistoryTypeId="1" PostId="9803" RevisionGUID="3707eea1-415e-4424-a6b9-3b3e675900d4" CreationDate="2023-08-31T12:09:35.440" UserId="4019" Text="RelaychainwithChainbridge" ContentLicense="CC BY-SA 4.0" />
  <row Id="38868" PostHistoryTypeId="3" PostId="9803" RevisionGUID="3707eea1-415e-4424-a6b9-3b3e675900d4" CreationDate="2023-08-31T12:09:35.440" UserId="4019" Text="|substrate-node-template|relay-chain|substrate-contracts-node|substrate-node|chainbridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38869" PostHistoryTypeId="2" PostId="9804" RevisionGUID="b9065905-fff3-41bc-86ec-c55bcd6938f6" CreationDate="2023-08-31T12:44:08.157" UserId="4607" Text="The sending via Ledger for DOTs to Acala was validated and I cannot validate to withdraw or stake. Updated Polkadot and Ledger version. Acala is installed on Ledger. Thanks!&#xD;&#xA;This error appears:&#xD;&#xA;&#xD;&#xA;from	https://apps.acala.network/ldot&#xD;&#xA;chain	Acala&#xD;&#xA;version	2180&#xD;&#xA;nonce	0&#xD;&#xA;method	&#xD;&#xA;xTokens.transfer(currencyId, amount, dest, destWeightLimit)&#xD;&#xA;info	&#xD;&#xA;lifetime	mortal, valid from 4,353,611 to 4,353,643&#xD;&#xA;Txn version not supported" ContentLicense="CC BY-SA 4.0" />
  <row Id="38871" PostHistoryTypeId="1" PostId="9804" RevisionGUID="b9065905-fff3-41bc-86ec-c55bcd6938f6" CreationDate="2023-08-31T12:44:08.157" UserId="4607" Text="Txn version not supported Polkadot/Acala bridge!" ContentLicense="CC BY-SA 4.0" />
  <row Id="38872" PostHistoryTypeId="3" PostId="9804" RevisionGUID="b9065905-fff3-41bc-86ec-c55bcd6938f6" CreationDate="2023-08-31T12:44:08.157" UserId="4607" Text="|acala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38873" PostHistoryTypeId="2" PostId="9805" RevisionGUID="5cbb8f66-3741-4062-8f54-39933480d672" CreationDate="2023-08-31T14:50:54.853" UserId="494" Text="if we ignore PoV, is there anything preventing an extrinsic from consuming ~100% of the available (execution time) weights in a block?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38875" PostHistoryTypeId="1" PostId="9805" RevisionGUID="5cbb8f66-3741-4062-8f54-39933480d672" CreationDate="2023-08-31T14:50:54.853" UserId="494" Text="extrinsic consuming ~100% of the available weights in a block" ContentLicense="CC BY-SA 4.0" />
  <row Id="38876" PostHistoryTypeId="3" PostId="9805" RevisionGUID="5cbb8f66-3741-4062-8f54-39933480d672" CreationDate="2023-08-31T14:50:54.853" UserId="494" Text="|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38877" PostHistoryTypeId="5" PostId="9755" RevisionGUID="3e7e0d5d-cfc1-42bf-ad41-6b253a9517cb" CreationDate="2023-08-31T16:02:23.983" UserId="644" Comment="added 841 characters in body" Text="I would try to replicate the Extrinsics that is thrown when using this&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This is the ABI of my smart contract&#xD;&#xA;&#xD;&#xA;``` json&#xD;&#xA;{&#xD;&#xA;        &quot;args&quot;: [&#xD;&#xA;          {&#xD;&#xA;            &quot;label&quot;: &quot;code&quot;,&#xD;&#xA;            &quot;type&quot;: {&#xD;&#xA;              &quot;displayName&quot;: [],&#xD;&#xA;              &quot;type&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        &quot;default&quot;: false,&#xD;&#xA;        &quot;docs&quot;: [],&#xD;&#xA;        &quot;label&quot;: &quot;get_track&quot;,&#xD;&#xA;        &quot;mutates&quot;: false,&#xD;&#xA;        &quot;payable&quot;: false,&#xD;&#xA;        &quot;returnType&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&#xD;&#xA;            &quot;ink&quot;,&#xD;&#xA;            &quot;MessageResult&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;type&quot;: 12&#xD;&#xA;        },&#xD;&#xA;        &quot;selector&quot;: &quot;0x43f80da1&quot;&#xD;&#xA;      }&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;This is the call I'm trying to make&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.shibuya.astar.network#/extrinsics/decode/0x46060053edb57f71f35eb471296511e015b306cbe36295341b59883b4844536d265ef9000002093d00009043f80da1542d53484952542d353234333133000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;  [2]: https://i.stack.imgur.com/IkSqJ.png&#xD;&#xA;  [1]: https://i.stack.imgur.com/PLHxv.png&#xD;&#xA;&#xD;&#xA;    1011: Unknown Transaction Validity: UnknownTransaction::NoUnsignedValidate&#xD;&#xA;&#xD;&#xA;EDIT:  Some progress (with ContractsApi_call)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&quot;id&quot;:22,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_call&quot;,&quot;params&quot;:[&quot;ContractsApi_call&quot;,&quot;0x9a0a3d999ba84d10f3257dc5616a0679cb60f56d4ae24f7b2357d25bfa7a450f8836bb46beaf9bb701f4aea16a7b9f448166bee6629d572d24a397c53739c5260000000000000000000000000000000000009043f80da1542d53484952542d353234333133000000000000000000000000000000000000&quot;]}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;0x&#xD;&#xA;Origin (Addr Caller): 9a0a3d999ba84d10f3257dc5616a0679cb60f56d4ae24f7b2357d25bfa7a450f&#xD;&#xA;Destination (SmartContract): 8836bb46beaf9bb701f4aea16a7b9f448166bee6629d572d24a397c53739c526&#xD;&#xA;????? = 00000000000000000000000000000000000090&#xD;&#xA;Selector (method from abi) = 43f80da1&#xD;&#xA;Code (parms smartcontract) = 542d53484952542d353234333133000000000000000000000000000000000000&#xD;&#xA;```&#xD;&#xA;Now i messing only to understand  the 00000000000000000000000000000000000090 value" ContentLicense="CC BY-SA 4.0" />
  <row Id="38878" PostHistoryTypeId="5" PostId="9805" RevisionGUID="034795d6-9215-413f-ab66-d82098fea87b" CreationDate="2023-08-31T16:04:59.577" UserId="494" Comment="added 6 characters in body" Text="if we ignore PoV, is there anything preventing a single extrinsic from consuming ~100% of the available (execution time) weights in a block?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38879" PostHistoryTypeId="5" PostId="9755" RevisionGUID="1f8959e0-1954-46a0-b581-5422c1b9157d" CreationDate="2023-08-31T16:11:40.843" UserId="644" Comment="added 4 characters in body" Text="I would try to replicate the Extrinsics that is thrown when using this&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;This is the ABI of my smart contract&#xD;&#xA;&#xD;&#xA;``` json&#xD;&#xA;{&#xD;&#xA;        &quot;args&quot;: [&#xD;&#xA;          {&#xD;&#xA;            &quot;label&quot;: &quot;code&quot;,&#xD;&#xA;            &quot;type&quot;: {&#xD;&#xA;              &quot;displayName&quot;: [],&#xD;&#xA;              &quot;type&quot;: 2&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        &quot;default&quot;: false,&#xD;&#xA;        &quot;docs&quot;: [],&#xD;&#xA;        &quot;label&quot;: &quot;get_track&quot;,&#xD;&#xA;        &quot;mutates&quot;: false,&#xD;&#xA;        &quot;payable&quot;: false,&#xD;&#xA;        &quot;returnType&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&#xD;&#xA;            &quot;ink&quot;,&#xD;&#xA;            &quot;MessageResult&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;type&quot;: 12&#xD;&#xA;        },&#xD;&#xA;        &quot;selector&quot;: &quot;0x43f80da1&quot;&#xD;&#xA;      }&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;This is the call I'm trying to make&#xD;&#xA;&#xD;&#xA;https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.shibuya.astar.network#/extrinsics/decode/0x46060053edb57f71f35eb471296511e015b306cbe36295341b59883b4844536d265ef9000002093d00009043f80da1542d53484952542d353234333133000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;  [2]: https://i.stack.imgur.com/IkSqJ.png&#xD;&#xA;  [1]: https://i.stack.imgur.com/PLHxv.png&#xD;&#xA;&#xD;&#xA;    1011: Unknown Transaction Validity: UnknownTransaction::NoUnsignedValidate&#xD;&#xA;&#xD;&#xA;**EDIT:  Some progress (with ContractsApi_call)**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&quot;id&quot;:22,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;state_call&quot;,&quot;params&quot;:[&quot;ContractsApi_call&quot;,&quot;0x9a0a3d999ba84d10f3257dc5616a0679cb60f56d4ae24f7b2357d25bfa7a450f8836bb46beaf9bb701f4aea16a7b9f448166bee6629d572d24a397c53739c5260000000000000000000000000000000000009043f80da1542d53484952542d353234333133000000000000000000000000000000000000&quot;]}&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;0x&#xD;&#xA;Origin (Addr Caller): 9a0a3d999ba84d10f3257dc5616a0679cb60f56d4ae24f7b2357d25bfa7a450f&#xD;&#xA;Destination (SmartContract): 8836bb46beaf9bb701f4aea16a7b9f448166bee6629d572d24a397c53739c526&#xD;&#xA;????? = 00000000000000000000000000000000000090&#xD;&#xA;Selector (method from abi) = 43f80da1&#xD;&#xA;Code (parms smartcontract) = 542d53484952542d353234333133000000000000000000000000000000000000&#xD;&#xA;```&#xD;&#xA;Now i messing only to understand  the 00000000000000000000000000000000000090 value" ContentLicense="CC BY-SA 4.0" />
  <row Id="38880" PostHistoryTypeId="2" PostId="9806" RevisionGUID="d2c25c80-cfe9-4df4-ba52-c06d1e501425" CreationDate="2023-08-31T16:21:14.750" UserId="2762" Text="I want to link the Open Gov referendum that requests funding from the Treasury with the Treasury proposal. &#xD;&#xA;&#xD;&#xA;I see that this is done in Polkassembly. An example is this: The [Referenda][1] which has an id 62 and the [Treasury Proposal][2] which has an id 355. &#xD;&#xA;&#xD;&#xA;If you see in the top they are linked, but checking the On-chain information I can't see how is actually linked&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.polkassembly.io/referenda/62&#xD;&#xA;  [2]: https://polkadot.polkassembly.io/treasury/355" ContentLicense="CC BY-SA 4.0" />
  <row Id="38882" PostHistoryTypeId="1" PostId="9806" RevisionGUID="d2c25c80-cfe9-4df4-ba52-c06d1e501425" CreationDate="2023-08-31T16:21:14.750" UserId="2762" Text="How to link a Referendum with a Treasury Proposal" ContentLicense="CC BY-SA 4.0" />
  <row Id="38883" PostHistoryTypeId="3" PostId="9806" RevisionGUID="d2c25c80-cfe9-4df4-ba52-c06d1e501425" CreationDate="2023-08-31T16:21:14.750" UserId="2762" Text="|treasury|opengov|referendum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38884" PostHistoryTypeId="2" PostId="9807" RevisionGUID="75486137-1997-4f09-ac6f-453498da89da" CreationDate="2023-08-31T17:23:59.127" UserId="427" Text="We have a live testnet chain where we planned a RU. Before performing RU in the live chain we performed fork-off of that chain to get all the states same as it is and started a local chain with that and performed the runtime upgrade there in which the RU and the storage migration was successful. But when we tried it on the live testnet RU is successful but the storage migration didn't happen correctly. The storage which we targeted to migrate got completely erased. What could be the possible reasons?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38886" PostHistoryTypeId="1" PostId="9807" RevisionGUID="75486137-1997-4f09-ac6f-453498da89da" CreationDate="2023-08-31T17:23:59.127" UserId="427" Text="Storage Migration failed even after we tested with fork-off" ContentLicense="CC BY-SA 4.0" />
  <row Id="38887" PostHistoryTypeId="3" PostId="9807" RevisionGUID="75486137-1997-4f09-ac6f-453498da89da" CreationDate="2023-08-31T17:23:59.127" UserId="427" Text="|runtime-upgrade|fork|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38890" PostHistoryTypeId="5" PostId="9516" RevisionGUID="001eee7a-1050-4db5-9d30-b07493dd53b1" CreationDate="2023-08-31T19:15:27.270" UserId="3387" Comment="added 787 characters in body" Text="Looks like cargo-contract 3.1.0 has been [yanked][1].&#xD;&#xA;&#xD;&#xA;cargo-contract compatibility with different rust toolchains:&#xD;&#xA;&#xD;&#xA; - Rust &lt;= 1.69 + pallet-contracts &lt; polkadot-1.0.0 = cargo-contract&#xD;&#xA;   3.0.1&#xD;&#xA; - Rust &gt; = 1.70 + pallet-contracts &gt;= polkadot-1.0.0 = cargo-contract 4.0.0-alpha&#xD;&#xA;&#xD;&#xA;The e2e test does not work after the 3.1.0 has been yanked for either versions of it.&#xD;&#xA;&#xD;&#xA;A new version cargo-contract 3.2.0 was release but the error remains([Issue][2]).&#xD;&#xA;&#xD;&#xA;-------------------------------------------------------&#xD;&#xA;Update Update Update Update Update Update Update Update&#xD;&#xA;-------------------------------------------------------&#xD;&#xA;&#xD;&#xA;**This was sorted with the ink version 4.3.**&#xD;&#xA;&#xD;&#xA;cargo.toml&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;flipper&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Parity Technologies &lt;admin@parity.io&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;publish = false&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.3.0&quot;, default-features = false }&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = { version = &quot;4.3.0&quot; }&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;src/lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&quot;ink/std&quot;, &quot;scale/std&quot;, &quot;scale-info/std&quot;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cargo-contract/issues/1239#issuecomment-1653683340&#xD;&#xA;  [2]: https://github.com/paritytech/cargo-contract/issues/1259" ContentLicense="CC BY-SA 4.0" />
  <row Id="38891" PostHistoryTypeId="50" PostId="6196" RevisionGUID="08bc9706-8977-4c5c-8026-628a8e375b7d" CreationDate="2023-09-01T00:08:41.060" UserId="-1" />
  <row Id="38892" PostHistoryTypeId="2" PostId="9808" RevisionGUID="0d280ae0-1d10-4999-9a7d-ccb63c93891f" CreationDate="2023-09-01T02:52:23.597" UserId="251" Text="Navigate to the timeline page and open the executed link.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;After the referenda were executed, there is an event indicating that the treasury proposal is 355.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/I2cLi.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ivuGG.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38894" PostHistoryTypeId="5" PostId="9807" RevisionGUID="e84647e2-4925-49a5-97e5-2b379749db9e" CreationDate="2023-09-01T03:22:41.653" UserId="427" Comment="added 335 characters in body" Text="We have a live testnet chain where we planned a RU. Before performing RU in the live chain we performed fork-off of that chain to get all the states same as it is and started a local chain with that and performed the runtime upgrade there in which the RU and the storage migration was successful. But when we tried it on the live testnet RU is successful but the storage migration didn't happen correctly. The storage which we targeted to migrate got completely erased. What could be the possible reasons?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT 1 : We found the root cause. In the live chain the pallet storage version is 0 but while we start the fork-off with the same state pallet storage version seems to start from 1 for every pallet that we use. That's the reason the migration has been skipped in the live testnet. Why the storage version is different in forkoff?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38895" PostHistoryTypeId="5" PostId="9798" RevisionGUID="91cf9f59-b21f-4318-821d-b1de431a7848" CreationDate="2023-09-01T03:32:52.067" UserId="2844" Comment="added 216 characters in body" Text="I am getting this error while adding `pallet_contracts` in my chain. This is my [github-code](https://github.com/XcavateBlockchain/MarketplaceMVP_Substrate/blob/89c3592fde4c6577962dff6497a0961e0adbd216/runtime/src/lib.rs#L730). Can you please describe me why I am getting this issue? &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;As @forgetso suggested in comment, I change polkadotjs apps branch to `v0.132.1`, even after this I get same issue.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/WL7rZ.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/kR7F2.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="38896" PostHistoryTypeId="2" PostId="9809" RevisionGUID="96ada518-04c1-455e-a670-d72dd2b094f0" CreationDate="2023-09-01T05:46:41.240" UserId="2348" Text="I am doing runtime upgrade of substrate blockchain from 0.9.36 --&gt; 0.9.37 ---&gt;0.9.43 . And i have some contracts deployed on the running blockchain which is running on 36 version  . after doing runtime upgrade from 0.9.36 ---&gt; 0.9.39 version .i tried to check contracts on my chain. When i tried to call them through substrate contracts ui   (on my chain which is now runtime upgraded to 39 version from 36 version)   it  is showing   contracts not found  and i am unable to call my deployed contracts .      The same is also happening on my other chain which i  runtime upgraded from 43 version to 1.0.0 version can you please tell me how to solve this issue&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![error i am getting in ui after upgrading ][1]][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/omCCh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38898" PostHistoryTypeId="1" PostId="9809" RevisionGUID="96ada518-04c1-455e-a670-d72dd2b094f0" CreationDate="2023-09-01T05:46:41.240" UserId="2348" Text="After doing runtime upgrade getting contract not found in substrate contracts ui" ContentLicense="CC BY-SA 4.0" />
  <row Id="38899" PostHistoryTypeId="3" PostId="9809" RevisionGUID="96ada518-04c1-455e-a670-d72dd2b094f0" CreationDate="2023-09-01T05:46:41.240" UserId="2348" Text="|runtime-upgrade|substrate-node|blockchain|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38900" PostHistoryTypeId="2" PostId="9810" RevisionGUID="721e9c0c-beb0-4db9-856c-af3948706440" CreationDate="2023-09-01T05:51:45.977" UserId="2722" Text="I'm working on a blockchain project using Substrate and I'm planning to implement a solo chain (standalone chain). My use-case involves having the chain operate independently, but I'm also interested in leveraging Cross-Consensus Messaging (XCM) for inter-chain communication.&#xD;&#xA;&#xD;&#xA;Here are my specific questions:&#xD;&#xA;&#xD;&#xA;- Is it technically possible to implement XCM in a Substrate-based solo chain?&#xD;&#xA;- What would be the challenges and considerations if I decide to go this route?&#xD;&#xA;- Are there any security implications I should be aware of?&#xD;&#xA;&#xD;&#xA;I'm looking for detailed insights into the feasibility and challenges involved. Any guidance or references would be greatly appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="38902" PostHistoryTypeId="1" PostId="9810" RevisionGUID="721e9c0c-beb0-4db9-856c-af3948706440" CreationDate="2023-09-01T05:51:45.977" UserId="2722" Text="Is it Possible to Use XCM with a Substrate Solo Chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38903" PostHistoryTypeId="3" PostId="9810" RevisionGUID="721e9c0c-beb0-4db9-856c-af3948706440" CreationDate="2023-09-01T05:51:45.977" UserId="2722" Text="|substrate-node-template|xcm|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38904" PostHistoryTypeId="2" PostId="9811" RevisionGUID="4d6ef1a9-16a0-4ace-8d47-fdccd9bf2842" CreationDate="2023-09-01T07:27:56.967" UserId="2854" Text="```&#xD;&#xA;# copy the compiled binary to the container&#xD;&#xA;COPY --chown=polkadot:polkadot --chmod=774 node-template /usr/bin/node-template&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In fact, this line tries to copy `./node-template` to the container. Since you are in the root dir, you should change your directory first.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cd ./target/release&#xD;&#xA;docker build -f ../../Containerfile -t node-template:latest .&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38906" PostHistoryTypeId="2" PostId="9812" RevisionGUID="68966fb2-c753-4e5e-a0d7-1708b03e2038" CreationDate="2023-09-01T08:21:14.377" UserId="3317" Text=" 1. 100%, that is the power of substrate&#xD;&#xA; 2. Being a solo chain means you are running your own consensus. In other words, you are not leveraging the shared security of Polkadot. Therefore, you will need a bridge Polkadot &lt;&gt; Solochain in order to communicate with Polkadot/'s parachains.&#xD;&#xA; 3. The security implications depend on how secure your consensus algorithm is and how secure your bridge is.&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="38908" PostHistoryTypeId="2" PostId="9813" RevisionGUID="f1f290a8-e152-4840-89fa-2394cf1a2e9f" CreationDate="2023-09-01T08:23:57.897" UserId="251" Text="XCM is a message format, not a protocol. It can be used in various contexts.&#xD;&#xA;&#xD;&#xA;1. To communicate with other chains, you will need to find your own method.&#xD;&#xA;2. Both sides should have an XCM interpreter (xcm-executor), and you can even implement one on the Ethereum side if needed. With this, the chain can read/understand a part of the meaning of the message.&#xD;&#xA;&#xD;&#xA;That's all there is to it.&#xD;&#xA;&#xD;&#xA;Currently, the easiest option to use is probably parity-bridges-common. It enables communication between Substrate &lt;&gt; Substrate chains and has native support for XCM." ContentLicense="CC BY-SA 4.0" />
  <row Id="38910" PostHistoryTypeId="6" PostId="9810" RevisionGUID="38c27741-7b02-4d20-b24a-bfe9b5d3b225" CreationDate="2023-09-01T08:26:35.040" UserId="165" Comment="edited tags" Text="|xcm|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38911" PostHistoryTypeId="5" PostId="9812" RevisionGUID="101d757e-e556-4273-bad9-9997c29fa14f" CreationDate="2023-09-01T08:29:31.587" UserId="3317" Comment="deleted 1 character in body" Text=" 1. 100%, that is the power of substrate&#xD;&#xA; 2. Being a solo chain means you are running your own consensus. In other words, you are not leveraging the shared security of Polkadot, therefore you will need a bridge Polkadot &lt;&gt; Solochain in order to communicate with Polkadot/'s parachains.&#xD;&#xA; 3. The security implications depend on how secure your consensus algorithm is and how secure your bridge is.&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="38916" PostHistoryTypeId="5" PostId="9809" RevisionGUID="3d43c49f-039f-4bd1-b86b-a46f3226de48" CreationDate="2023-09-01T09:38:22.107" UserId="354" Comment="improved formatting" Text="I am doing runtime upgrade of substrate blockchain from `0.9.36 --&gt; 0.9.37 ---&gt;0.9.43` . And i have some contracts deployed on the running blockchain which is running on 36 version  . After doing runtime upgrade from `0.9.36 ---&gt; 0.9.39` version . I tried to check contracts on my chain. When I tried to call them through `substrate contracts-ui`   (on my chain which is now runtime upgraded to 39 version from 36 version)   it  is showing contracts not found  and I am unable to call my deployed contracts . The same is also happening on my other chain which I  runtime upgraded from `43 version` to `1.0.0 version` can someone please tell me how to solve this issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![error i am getting in ui after upgrading ][1]][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/omCCh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="38917" PostHistoryTypeId="24" PostId="9809" RevisionGUID="3d43c49f-039f-4bd1-b86b-a46f3226de48" CreationDate="2023-09-01T09:38:22.107" Comment="Proposed by 354 approved by 2348 edit id of 544" ContentLicense="CC BY-SA 4.0" />
  <row Id="38918" PostHistoryTypeId="2" PostId="9815" RevisionGUID="5c22ff55-a761-45dd-860c-2a224e915369" CreationDate="2023-09-01T10:32:08.113" UserId="1810" Text="Afaik, there is never a good reason to use public key recovery in any signature scheme.  It'd break batching in Schnorr.  Also recovery makes soft derivation insecure in Schnorr.  ECDSA should never be used in the first place.&#xD;&#xA;&#xD;&#xA;BLS already makes soft derivation insecure, and recovery impossible.  In cases, BLS makes sense for consensus, but BLS rarely if ever makes sense for accounts.  If you want off-chain multisigs, then use two-round Schnorr ones we &amp; others proved secure.&#xD;&#xA;&#xD;&#xA;That said..&#xD;&#xA;&#xD;&#xA;We'd envision folks doing BLS via https://github.com/paritytech/ark-substrate once we finalize the hostcalls added in https://github.com/paritytech/substrate/pull/13031 because this gives parachains maximum flexibility.&#xD;&#xA;&#xD;&#xA;I've written https://github.com/w3f/ring-vrf/tree/master/nugget_bls to improve gossiping of BLS signatures, and https://github.com/w3f/apk-proofs/ can help in bridges using them." ContentLicense="CC BY-SA 4.0" />
  <row Id="38920" PostHistoryTypeId="50" PostId="9291" RevisionGUID="2a6b06a7-21d0-4483-b74c-e248d3dec354" CreationDate="2023-09-01T11:01:15.133" UserId="-1" />
  <row Id="38921" PostHistoryTypeId="5" PostId="9807" RevisionGUID="58ca35dd-ce1c-4d60-beb9-31be1e1c30d2" CreationDate="2023-09-01T11:11:42.913" UserId="354" Comment="improved formatting" Text="We have a live testnet chain where we planned a `runtime upgrade` (RU). Before performing RU in the live chain we performed `fork-off` of that chain to get all the states same as it is and started a local chain with that and performed the runtime upgrade there in which the RU and the storage migration was successful. But when we tried it on the live testnet RU is successful but the storage migration didn't happen correctly. The storage which we targeted to migrate got completely erased. What could be the possible reasons?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EDIT 1 : We found the root cause. In the live chain the `pallet storage version` is `0` but while we start the `fork-off` with the same state `pallet storage version` seems to start from `1` for every pallet that we use. That's the reason the migration has been skipped in the live testnet. Why the storage version is different in forkoff?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38922" PostHistoryTypeId="24" PostId="9807" RevisionGUID="58ca35dd-ce1c-4d60-beb9-31be1e1c30d2" CreationDate="2023-09-01T11:11:42.913" Comment="Proposed by 354 approved by 251, 427 edit id of 543" ContentLicense="CC BY-SA 4.0" />
  <row Id="38923" PostHistoryTypeId="2" PostId="9816" RevisionGUID="8d398d2a-d8ad-4742-b460-7b0e9433e3db" CreationDate="2023-09-01T12:57:21.827" UserId="4610" Text="I try to implement the hybrid consensus from the substrate recipes book but it keeps failing. I tried to use the sha3 algorithm for PoW but I keep getting this error:&#xD;&#xA;&#xD;&#xA;&gt; &quot;the trait `PowAlgorithm&lt;_&gt;` is not implemented for `MinimalSha3Algorithm&quot;&#xD;&#xA;&#xD;&#xA;This is my code in rust:&#xD;&#xA;&#xD;&#xA;       &#xD;&#xA;    &#xD;&#xA;     #[derive(Clone)]&#xD;&#xA;        pub struct MinimalSha3Algorithm;&#xD;&#xA;        &#xD;&#xA;        // Here we implement the general PowAlgorithm trait for our concrete Sha3Algorithm&#xD;&#xA;        impl&lt;B: BlockT&lt;Hash = H256&gt;&gt; PowAlgorithm&lt;B&gt; for MinimalSha3Algorithm {&#xD;&#xA;        	type Difficulty = U256;&#xD;&#xA;        &#xD;&#xA;        	fn difficulty(&amp;self, _parent: B::Hash) -&gt; Result&lt;Self::Difficulty, Error&lt;B&gt;&gt; {&#xD;&#xA;        		// Fixed difficulty hardcoded here&#xD;&#xA;        		Ok(U256::from(1_000_000))&#xD;&#xA;        	}&#xD;&#xA;        &#xD;&#xA;        	fn verify(&#xD;&#xA;        		&amp;self,&#xD;&#xA;        		_parent: &amp;BlockId&lt;B&gt;,&#xD;&#xA;        		pre_hash: &amp;H256,&#xD;&#xA;        		_pre_digest: Option&lt;&amp;[u8]&gt;,&#xD;&#xA;        		seal: &amp;RawSeal,&#xD;&#xA;        		difficulty: Self::Difficulty,&#xD;&#xA;        	) -&gt; Result&lt;bool, Error&lt;B&gt;&gt; {&#xD;&#xA;        		// Try to construct a seal object by decoding the raw seal given&#xD;&#xA;        		let seal = match Seal::decode(&amp;mut &amp;seal[..]) {&#xD;&#xA;        			Ok(seal) =&gt; seal,&#xD;&#xA;        			Err(_) =&gt; return Ok(false),&#xD;&#xA;        		};&#xD;&#xA;        &#xD;&#xA;        		// See whether the hash meets the difficulty requirement. If not, fail fast.&#xD;&#xA;        		if !hash_meets_difficulty(&amp;seal.work, difficulty) {&#xD;&#xA;        			return Ok(false);&#xD;&#xA;        		}&#xD;&#xA;        &#xD;&#xA;        		// Make sure the provided work actually comes from the correct pre_hash&#xD;&#xA;        		let compute = Compute {&#xD;&#xA;        			difficulty,&#xD;&#xA;        			pre_hash: *pre_hash,&#xD;&#xA;        			nonce: seal.nonce,&#xD;&#xA;        		};&#xD;&#xA;        &#xD;&#xA;        		if compute.compute() != seal {&#xD;&#xA;        			return Ok(false);&#xD;&#xA;        		}&#xD;&#xA;        &#xD;&#xA;        		Ok(true)&#xD;&#xA;        	} &#xD;&#xA;        	&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I'd appreciate any help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="38925" PostHistoryTypeId="1" PostId="9816" RevisionGUID="8d398d2a-d8ad-4742-b460-7b0e9433e3db" CreationDate="2023-09-01T12:57:21.827" UserId="4610" Text="hybrid consensus" ContentLicense="CC BY-SA 4.0" />
  <row Id="38926" PostHistoryTypeId="3" PostId="9816" RevisionGUID="8d398d2a-d8ad-4742-b460-7b0e9433e3db" CreationDate="2023-09-01T12:57:21.827" UserId="4610" Text="|consensus|substrate-recipes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38927" PostHistoryTypeId="52" PostId="9810" RevisionGUID="cefc8f21-76fe-4dc2-a299-3ff0453fc588" CreationDate="2023-09-01T13:54:14.517" />
  <row Id="38928" PostHistoryTypeId="2" PostId="9817" RevisionGUID="1c41c5e6-be50-451f-a904-27075bf1f528" CreationDate="2023-09-01T15:03:58.243" UserId="2446" Text="I solved it by going to contracts-UI. The pretending to call the function with the parameters. Automatically the real values (max and to-be-used) are computed by the UI. You can just copy it into your code." ContentLicense="CC BY-SA 4.0" />
  <row Id="38930" PostHistoryTypeId="2" PostId="9818" RevisionGUID="31930456-2575-4fcc-86e1-8a71fa44f840" CreationDate="2023-09-01T15:32:49.857" UserId="3142" Text="How to retrieve number of decimals for custom token (not DOT)?&#xD;&#xA;&#xD;&#xA;`api.registry.chainDecimals` is for DOT.  I need to retrieve it for a custom token." ContentLicense="CC BY-SA 4.0" />
  <row Id="38932" PostHistoryTypeId="1" PostId="9818" RevisionGUID="31930456-2575-4fcc-86e1-8a71fa44f840" CreationDate="2023-09-01T15:32:49.857" UserId="3142" Text="How to retrieve number of decimals for custom token (not DOT)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38933" PostHistoryTypeId="3" PostId="9818" RevisionGUID="31930456-2575-4fcc-86e1-8a71fa44f840" CreationDate="2023-09-01T15:32:49.857" UserId="3142" Text="|polkadot-js|chainspec|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38934" PostHistoryTypeId="2" PostId="9819" RevisionGUID="87e50da4-bcf6-4bf4-8460-1c7af8613a20" CreationDate="2023-09-01T15:52:40.200" UserId="94" Text="You can query the asset metadata like this:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let asset = await api.query.assets.metadata(0 /* Asset Id */);&#xD;&#xA;console.log(&quot;Asset has&quot;, asset.decimals, &quot;decimals&quot;);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="38938" PostHistoryTypeId="2" PostId="9820" RevisionGUID="9478a811-33d8-43c2-a400-b91de82b867d" CreationDate="2023-09-01T20:03:16.710" UserId="4611" Text="The tracking issue on the rust github is this: https://github.com/rust-lang/rust/issues/113152&#xD;&#xA;&#xD;&#xA;In short, removing `Cargo.lock` and recompiling should fix this." ContentLicense="CC BY-SA 4.0" />
  <row Id="38940" PostHistoryTypeId="5" PostId="9817" RevisionGUID="f6eb29ce-78c2-4d73-ac69-4f5af9e240c2" CreationDate="2023-09-01T20:28:04.127" UserId="2446" Comment="added 9 characters in body" Text="I solved it by going to contracts-UI. Then pretending to want to call the function with the parameters. Automatically the real values (max and to-be-used) are computed by the UI. You can just copy it into your code." ContentLicense="CC BY-SA 4.0" />
  <row Id="38943" PostHistoryTypeId="2" PostId="9821" RevisionGUID="264b2de8-0e1a-4476-8e8c-ac9d420f70cf" CreationDate="2023-09-02T08:28:14.267" UserId="2163" Text="I am trying to run e2e tests but getting the following error. Example of running the e2e tests of the flipper contract:&#xD;&#xA;```&#xD;&#xA;running 4 tests&#xD;&#xA;test flipper::tests::it_works ... ok&#xD;&#xA;test flipper::tests::default_works ... ok&#xD;&#xA;test flipper::e2e_tests::it_works ... FAILED&#xD;&#xA;test flipper::e2e_tests::default_works ... FAILED&#xD;&#xA;&#xD;&#xA;failures:&#xD;&#xA;&#xD;&#xA;---- flipper::e2e_tests::it_works stdout ----&#xD;&#xA;thread 'flipper::e2e_tests::it_works' panicked at /Users/sergejsakac/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ink_e2e-4.3.0/src/xts.rs:294:13:&#xD;&#xA;decoding ContractInstantiateResult failed: Could not decode `ContractResult::events`:&#xD;&#xA;	Could not decode variant byte for `Option`:&#xD;&#xA;		Not enough data to fill buffer&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---- flipper::e2e_tests::default_works stdout ----&#xD;&#xA;thread 'flipper::e2e_tests::default_works' panicked at /Users/sergejsakac/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ink_e2e-4.3.0/src/xts.rs:294:13:&#xD;&#xA;decoding ContractInstantiateResult failed: Could not decode `ContractResult::events`:&#xD;&#xA;	Could not decode variant byte for `Option`:&#xD;&#xA;		Not enough data to fill buffer&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Rust version: `rustc 1.74.0-nightly`&#xD;&#xA;&#xD;&#xA;Cargo contract version: `cargo-contract-contract 3.2.0-unknown-aarch64-apple-darwin&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;The weird thing is that on my other Macbook, I have the same version of both rust and cargo contract, and the tests run successfully." ContentLicense="CC BY-SA 4.0" />
  <row Id="38945" PostHistoryTypeId="1" PostId="9821" RevisionGUID="264b2de8-0e1a-4476-8e8c-ac9d420f70cf" CreationDate="2023-09-02T08:28:14.267" UserId="2163" Text="Failing to run ink! e2e tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="38946" PostHistoryTypeId="3" PostId="9821" RevisionGUID="264b2de8-0e1a-4476-8e8c-ac9d420f70cf" CreationDate="2023-09-02T08:28:14.267" UserId="2163" Text="|ink|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38947" PostHistoryTypeId="2" PostId="9822" RevisionGUID="148fd0be-acd3-4d8a-aba9-f347dadb5033" CreationDate="2023-09-02T08:33:35.067" UserId="554" Text="I am currently in the process of integrating the frontier with the solo chain. Following the integration, when I attempted to deploy the contract using Remix, it appears to be stuck, with no observable activity on the chain. Could you provide assistance in pinpointing the root cause of this problem?&#xD;&#xA;&#xD;&#xA;```Substrate version: v1.0.0```&#xD;&#xA;&#xD;&#xA;Have attached the screenshot for the same.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/eZF9i.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="38949" PostHistoryTypeId="1" PostId="9822" RevisionGUID="148fd0be-acd3-4d8a-aba9-f347dadb5033" CreationDate="2023-09-02T08:33:35.067" UserId="554" Text="How to debug/solve this frontier integration issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38950" PostHistoryTypeId="3" PostId="9822" RevisionGUID="148fd0be-acd3-4d8a-aba9-f347dadb5033" CreationDate="2023-09-02T08:33:35.067" UserId="554" Text="|frontier|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38951" PostHistoryTypeId="50" PostId="7937" RevisionGUID="bef029e2-ab52-4cba-94d6-4b9d447c71b7" CreationDate="2023-09-02T09:01:30.193" UserId="-1" />
  <row Id="38952" PostHistoryTypeId="2" PostId="9823" RevisionGUID="15646a07-2f6c-460a-b71b-7934fd895354" CreationDate="2023-09-02T10:08:04.117" UserId="2844" Text="I want to prefund treasury pallet in chain_spec `GenesisConfig`. Is this possible? Someone please give some advice. [Github](https://github.com/XcavateBlockchain/MVP_Lending_Pool/blob/58f45173c81878a9e56ec9d0ab899c2d19ce1e26/node/src/chain_spec.rs#L250)" ContentLicense="CC BY-SA 4.0" />
  <row Id="38954" PostHistoryTypeId="1" PostId="9823" RevisionGUID="15646a07-2f6c-460a-b71b-7934fd895354" CreationDate="2023-09-02T10:08:04.117" UserId="2844" Text="How to prefund treasury pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38955" PostHistoryTypeId="3" PostId="9823" RevisionGUID="15646a07-2f6c-460a-b71b-7934fd895354" CreationDate="2023-09-02T10:08:04.117" UserId="2844" Text="|substrate-node-template|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38956" PostHistoryTypeId="2" PostId="9824" RevisionGUID="3d987da9-d105-4761-9b18-854458010c19" CreationDate="2023-09-02T10:43:19.037" UserId="3" Text="The following test can be used in the test suite of pallet-balances:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn reap_fails_but_account_gets_dusted() {&#xD;&#xA;	ExtBuilder::default()&#xD;&#xA;		.existential_deposit(2)&#xD;&#xA;		.monied(true)&#xD;&#xA;		.build()&#xD;&#xA;		.execute_with(|| {&#xD;&#xA;			assert_eq!(System::inc_providers(&amp;1), frame_system::IncRefStatus::Existed);&#xD;&#xA;			assert_eq!(System::providers(&amp;1), 2);&#xD;&#xA;			assert_eq!(Balances::free_balance(1), 20);&#xD;&#xA;			assert_ok!(&lt;Balances as Currency&lt;_&gt;&gt;::transfer(&amp;1, &amp;2, 19, AllowDeath));&#xD;&#xA;			assert!(System::account_exists(&amp;1));&#xD;&#xA;			assert_eq!(Balances::free_balance(1), 0);&#xD;&#xA;			assert_eq!(System::providers(&amp;1), 1);&#xD;&#xA;		});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What we see here is that the account is not reaped in the sense that it still exists, but it does get dusted. This seems to contradict info I got on GitHub, but maybe I'm just reading this wrong (https://github.com/paritytech/polkadot-sdk/issues/227). The [docs][1] also say that reference counters prevent the account from being reaped. So I'm starting to get the impression that reaping and dusting are two completely separate processes.&#xD;&#xA;&#xD;&#xA;The questions are:&#xD;&#xA;&#xD;&#xA;1. Is the behavior above expected or is this a bug?&#xD;&#xA;2. Are reaping and dusting separate processes?&#xD;&#xA;3. How can I whitelist an account in pallet-balances to prevent it from getting dusted?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/account-data-structures/#:~:text=The%20providers%20reference%20counter%20prevents,pallets%20(%20consumers%20%3D%3D%200)." ContentLicense="CC BY-SA 4.0" />
  <row Id="38958" PostHistoryTypeId="1" PostId="9824" RevisionGUID="3d987da9-d105-4761-9b18-854458010c19" CreationDate="2023-09-02T10:43:19.037" UserId="3" Text="Reaping vs. dusting and how to whitelist an account" ContentLicense="CC BY-SA 4.0" />
  <row Id="38959" PostHistoryTypeId="3" PostId="9824" RevisionGUID="3d987da9-d105-4761-9b18-854458010c19" CreationDate="2023-09-02T10:43:19.037" UserId="3" Text="|frame-system|existential-deposit|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38960" PostHistoryTypeId="5" PostId="4643" RevisionGUID="e35c6e45-6548-49f5-98aa-97e285b90074" CreationDate="2023-09-02T10:52:29.950" UserId="2844" Comment="added 4974 characters in body" Text="I am using substrate-node-template and recently I added a new pallet.&#xD;&#xA;Now I need to build a docker file because I would like to send it for testing.&#xD;&#xA;&#xD;&#xA;Any information?&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;I am using this command `docker build -f Dockerfile -t node-template:latest .` and got this error.&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air substrate-node-template %  docker build -f Dockerfile -t node-template:latest .&#xD;&#xA;    [+] Building 36.4s (13/15)                                                                                                                   docker:desktop-linux&#xD;&#xA;     =&gt; [internal] load build definition from Dockerfile                                                                                                         0.0s&#xD;&#xA;     =&gt; =&gt; transferring dockerfile: 707B                                                                                                                         0.0s&#xD;&#xA;     =&gt; [internal] load .dockerignore                                                                                                                            0.0s&#xD;&#xA;     =&gt; =&gt; transferring context: 2B                                                                                                                              0.0s&#xD;&#xA;     =&gt; [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                              3.6s&#xD;&#xA;     =&gt; [internal] load metadata for docker.io/paritytech/ci-linux:production                                                                                    2.9s&#xD;&#xA;     =&gt; [auth] paritytech/ci-linux:pull token for registry-1.docker.io                                                                                           0.0s&#xD;&#xA;     =&gt; [auth] library/ubuntu:pull token for registry-1.docker.io                                                                                                0.0s&#xD;&#xA;     =&gt; [build 1/4] FROM docker.io/paritytech/ci-linux:production@sha256:dc9abf9e877c5bad94828245406dac8a186530e1ad6a1b5f2072e5e19e1f64b4                        0.0s&#xD;&#xA;     =&gt; [stage-1 1/4] FROM docker.io/library/ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba                                0.0s&#xD;&#xA;     =&gt; [internal] load build context                                                                                                                            1.1s&#xD;&#xA;     =&gt; =&gt; transferring context: 1.56MB                                                                                                                          1.0s&#xD;&#xA;     =&gt; CACHED [stage-1 2/4] WORKDIR /node                                                                                                                       0.0s&#xD;&#xA;     =&gt; CACHED [build 2/4] WORKDIR /code                                                                                                                         0.0s&#xD;&#xA;     =&gt; CACHED [build 3/4] COPY . .                                                                                                                              0.0s&#xD;&#xA;     =&gt; ERROR [build 4/4] RUN cargo build --release                                                                                                             31.6s&#xD;&#xA;    ------                                                                                                                                                            &#xD;&#xA;     &gt; [build 4/4] RUN cargo build --release:&#xD;&#xA;    1.403 info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'&#xD;&#xA;    31.55 error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-nightly.toml.sha256' to '/usr/local/rustup/tmp/3afdhw3qfq_ndh3m_file'&#xD;&#xA;    31.55 &#xD;&#xA;    31.55 Caused by:&#xD;&#xA;    31.55     0: failed to make network request&#xD;&#xA;    31.56     1: error sending request for url (https://static.rust-lang.org/dist/channel-rust-nightly.toml.sha256): operation timed out&#xD;&#xA;    31.56     2: operation timed out&#xD;&#xA;    ------&#xD;&#xA;    Dockerfile:5&#xD;&#xA;    --------------------&#xD;&#xA;       3 |     WORKDIR /code&#xD;&#xA;       4 |     COPY . .&#xD;&#xA;       5 | &gt;&gt;&gt; RUN cargo build --release&#xD;&#xA;       6 |     &#xD;&#xA;       7 |     FROM ubuntu:20.04&#xD;&#xA;    --------------------&#xD;&#xA;    ERROR: failed to solve: process &quot;/bin/sh -c cargo build --release&quot; did not complete successfully: exit code: 1&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air substrate-node-template %&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;This is my docker file&#xD;&#xA;&#xD;&#xA;    FROM paritytech/ci-linux:production as build&#xD;&#xA;    &#xD;&#xA;    WORKDIR /code&#xD;&#xA;    COPY . .&#xD;&#xA;    RUN cargo build --release&#xD;&#xA;    &#xD;&#xA;    FROM ubuntu:20.04&#xD;&#xA;    WORKDIR /node&#xD;&#xA;    &#xD;&#xA;    # Copy the node binary.&#xD;&#xA;    COPY --from=build /code/target/release/node-template .&#xD;&#xA;    &#xD;&#xA;    # Install root certs, see: https://github.com/paritytech/substrate/issues/9984&#xD;&#xA;    RUN apt update &amp;&amp; \&#xD;&#xA;        apt install -y ca-certificates &amp;&amp; \&#xD;&#xA;        update-ca-certificates &amp;&amp; \&#xD;&#xA;        apt remove ca-certificates -y &amp;&amp; \&#xD;&#xA;        rm -rf /var/lib/apt/lists/*&#xD;&#xA;    &#xD;&#xA;    EXPOSE 9944&#xD;&#xA;    # Exposing unsafe RPC methods is needed for testing but should not be done in&#xD;&#xA;    # production.&#xD;&#xA;    CMD [ &quot;./node-template&quot;, &quot;--dev&quot;, &quot;--ws-external&quot;, &quot;--rpc-methods=Unsafe&quot; ]" ContentLicense="CC BY-SA 4.0" />
  <row Id="38961" PostHistoryTypeId="5" PostId="9824" RevisionGUID="f8f1d913-aba6-40c3-9668-4ffecc52f4eb" CreationDate="2023-09-02T10:53:48.587" UserId="3" Comment="added 157 characters in body" Text="The following test can be used in the test suite of pallet-balances:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn reap_fails_but_account_gets_dusted() {&#xD;&#xA;	ExtBuilder::default()&#xD;&#xA;		.existential_deposit(2)&#xD;&#xA;		.monied(true)&#xD;&#xA;		.build()&#xD;&#xA;		.execute_with(|| {&#xD;&#xA;			assert_eq!(System::inc_providers(&amp;1), frame_system::IncRefStatus::Existed);&#xD;&#xA;			assert_eq!(System::providers(&amp;1), 2);&#xD;&#xA;			assert_eq!(Balances::free_balance(1), 20);&#xD;&#xA;			assert_ok!(&lt;Balances as Currency&lt;_&gt;&gt;::transfer(&amp;1, &amp;2, 19, AllowDeath));&#xD;&#xA;			assert!(System::account_exists(&amp;1));&#xD;&#xA;			assert_eq!(Balances::free_balance(1), 0);&#xD;&#xA;			assert_eq!(System::providers(&amp;1), 1);&#xD;&#xA;		});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What we see here is that the account is not reaped in the sense that it still exists, but it does get dusted. This seems to contradict info I got on GitHub, but maybe I'm just reading this wrong (https://github.com/paritytech/polkadot-sdk/issues/227). The [docs][1] also say that reference counters prevent the account from being reaped. So I'm starting to get the impression that reaping and dusting are two completely separate processes.&#xD;&#xA;&#xD;&#xA;The questions are:&#xD;&#xA;&#xD;&#xA;1. Is the behavior above expected or is this a bug?&#xD;&#xA;2. Are reaping and dusting separate processes?&#xD;&#xA;3. How can I whitelist an account in pallet-balances to prevent it from getting dusted?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/account-data-structures/#:~:text=The%20providers%20reference%20counter%20prevents,pallets%20(%20consumers%20%3D%3D%200).&#xD;&#xA;&#xD;&#xA;**Edit.** I may have misread some of the docs. So apparently we can use consumers to make the transfer error. Doesn't answer any of the questions though." ContentLicense="CC BY-SA 4.0" />
  <row Id="38962" PostHistoryTypeId="2" PostId="9825" RevisionGUID="c5b6fbf1-afe8-4280-bfa4-9a81ecd78ced" CreationDate="2023-09-02T11:49:30.353" UserId="251" Text="Use Subalfred https://github.com/hack-ink/subalfred/tree/main calculate your treasury account and find it here https://github.com/XcavateBlockchain/MVP_Lending_Pool/blob/58f45173c81878a9e56ec9d0ab899c2d19ce1e26/node/src/chain_spec.rs#L212." ContentLicense="CC BY-SA 4.0" />
  <row Id="38964" PostHistoryTypeId="50" PostId="9471" RevisionGUID="5278aa7b-d3b3-4bce-ab60-c71f76dadb9f" CreationDate="2023-09-02T13:03:55.560" UserId="-1" />
  <row Id="38965" PostHistoryTypeId="5" PostId="9717" RevisionGUID="1df24a74-870a-4a8b-b86a-05f1716759cb" CreationDate="2023-09-02T14:46:00.490" UserId="354" Comment="improved formatting" Text="I am trying to run `zombienet` tests with 2 polkadot relay chain nodes and 1 parachain collator running the moonbeam binary. The test config is as follows: `test.toml`&#xD;&#xA;``` rust&#xD;&#xA;[settings]&#xD;&#xA;timeout = 1000&#xD;&#xA;&#xD;&#xA;[relaychain]&#xD;&#xA;default_command = &quot;polkadot&quot;&#xD;&#xA;default_args = [ &quot;-lparachain=debug&quot; ]&#xD;&#xA;&#xD;&#xA;[relaychain.default_resources]&#xD;&#xA;limits = { memory = &quot;4G&quot;, cpu = &quot;2&quot; }&#xD;&#xA;requests = { memory = &quot;2G&quot;, cpu = &quot;1&quot; }&#xD;&#xA;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  args = [ &quot;--alice&quot;, &quot;-lparachain=debug,runtime=debug&quot; ]&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  args = [ &quot;--bob&quot;, &quot;-lparachain=debug,runtime=debug&quot;]&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 1282&#xD;&#xA;genesis_wasm_path=&quot;./wasm/orig.wasm.hex&quot;&#xD;&#xA;chain = &quot;moonbase-local&quot;&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  command = &quot;moonbeam&quot;&#xD;&#xA;  prometheus_prefix = &quot;moonbeam_substrate&quot;&#xD;&#xA;  args = [&quot;-lparachain=debug&quot;]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;the `test.zndsl` is:&#xD;&#xA;``` js&#xD;&#xA;Description: PVF code size&#xD;&#xA;Network: ./0001-parachains-pvf-code-size-good.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;# Check authority status.&#xD;&#xA;alice: reports node_roles is 4&#xD;&#xA;&#xD;&#xA;# Ensure parachains are registered.&#xD;&#xA;alice: parachain 1282 is registered within 60 seconds&#xD;&#xA;&#xD;&#xA;# Ensure parachains made progress.&#xD;&#xA;# We have a different hard limit for the candidate max code size in different host implementations&#xD;&#xA;# so we can't check for a specific value here. we only ensure that block production continued&#xD;&#xA;&#xD;&#xA;alice: parachain 1282 block height is at least 10 within 200 seconds&#xD;&#xA;&#xD;&#xA;# Check code size.&#xD;&#xA;# We have a different hard limit for the candidate max code size in different host implementations&#xD;&#xA;# however if the code size is acceptable we should have it put in some metric bucket&#xD;&#xA;&#xD;&#xA;# check if we have at least 1 sample, but we should have many more.&#xD;&#xA;alice: reports histogram polkadot_parachain_candidate_validation_code_size has at least 1 samples in buckets [&quot;16384&quot;, &quot;32768&quot;, &quot;65536&quot;, &quot;131072&quot;, &quot;262144&quot;, &quot;524288&quot;, &quot;1048576&quot;, &quot;2097152&quot;, &quot;4194304&quot;, &quot;8388608&quot;, &quot;+Inf&quot;] within 30 seconds&#xD;&#xA;```&#xD;&#xA;The WASM is generated using moonbeam `export-genesis-wasm &gt; fetched.wasm` and then I am using [wasm-injector][2] to convert it to `./wasm/orig.wasm.hex` (to hexify and potentially uncompress the wasm). The problem is that the unmodified basic example fails with wasm panic code &quot;unreachable&quot;.&#xD;&#xA;The test is run using:&#xD;&#xA;&gt; zombienet -p native test test.zndsl&#xD;&#xA;&#xD;&#xA;Versions&#xD;&#xA;zombienet 1.3.65&#xD;&#xA;&#xD;&#xA;polkadot 0.9.43-ba42b9ce51d&#xD;&#xA;&#xD;&#xA;moonbeam 0.32.1-6ed87ceeb65&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6HlUn.png&#xD;&#xA;  [2]: https://github.com/LimeChain/wasm-injector" ContentLicense="CC BY-SA 4.0" />
  <row Id="38966" PostHistoryTypeId="24" PostId="9717" RevisionGUID="1df24a74-870a-4a8b-b86a-05f1716759cb" CreationDate="2023-09-02T14:46:00.490" Comment="Proposed by 354 approved by 85, 94 edit id of 530" ContentLicense="CC BY-SA 4.0" />
  <row Id="38971" PostHistoryTypeId="5" PostId="4643" RevisionGUID="c31c902d-a145-4266-9272-f3181badbe34" CreationDate="2023-09-03T01:57:40.530" UserId="2844" Comment="deleted 4972 characters in body" Text="I am using substrate-node-template and recently I added a new pallet.&#xD;&#xA;Now I need to build a docker file because I would like to send it for testing.&#xD;&#xA;&#xD;&#xA;Any information?&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="38972" PostHistoryTypeId="5" PostId="9737" RevisionGUID="3a8042cd-c768-47a7-bb53-42708d728972" CreationDate="2023-09-03T05:40:38.350" UserId="234" Comment="Replaced the word &quot;nodes&quot; with &quot;blocks&quot;" Text="In Substrate-based blockchains like substrate_node-template, blocks are being produced in a continuous manner, even during periods of inactivity when no active transactions are taking place. Ideally, new blocks should only be generated when transactions are actively initiated or created.&#xD;&#xA;&#xD;&#xA;The ongoing creation of blocks, regardless of transaction activity, raises concerns about perpetual block generation and the potential for memory limitations to arise." ContentLicense="CC BY-SA 4.0" />
  <row Id="38973" PostHistoryTypeId="4" PostId="9737" RevisionGUID="3a8042cd-c768-47a7-bb53-42708d728972" CreationDate="2023-09-03T05:40:38.350" UserId="234" Comment="Replaced the word &quot;nodes&quot; with &quot;blocks&quot;" Text="Why blocks are being created even when there are no active transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38974" PostHistoryTypeId="5" PostId="9825" RevisionGUID="3ce75bef-d541-4ffa-8cad-d8eb7978a5bd" CreationDate="2023-09-03T16:22:09.593" UserId="251" Comment="edited body" Text="Use Subalfred https://github.com/hack-ink/subalfred/tree/main calculate your treasury account and fund it here https://github.com/XcavateBlockchain/MVP_Lending_Pool/blob/58f45173c81878a9e56ec9d0ab899c2d19ce1e26/node/src/chain_spec.rs#L212." ContentLicense="CC BY-SA 4.0" />
  <row Id="38976" PostHistoryTypeId="50" PostId="8640" RevisionGUID="1134a19c-6f8e-4638-85d4-63477a4653f8" CreationDate="2023-09-03T20:07:50.910" UserId="-1" />
  <row Id="38977" PostHistoryTypeId="2" PostId="9827" RevisionGUID="c5384055-aac4-4b7a-bbca-0e164eb694e2" CreationDate="2023-09-04T05:38:22.467" UserId="2722" Text="I'm developing a chat application using Substrate and facing a specific issue regarding user notifications. My application needs to notify users when they have a new message in a chat channel. Initially, I considered using Substrate's event system for this purpose. However, the issue is that when an event is emitted, other users can also access that event and potentially read the message content( in explorer ) . &#xD;&#xA;&#xD;&#xA;**My Questions:**&#xD;&#xA;- What strategies can I employ to securely notify users about new messages in a Substrate-based chat application without compromising message privacy?&#xD;&#xA;&#xD;&#xA;- Is there a way to make events private or restricted to certain users in Substrate?&#xD;&#xA;&#xD;&#xA;- Are there any existing Substrate modules or cryptographic techniques that could help me maintain user privacy while also notifying them of new messages?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38979" PostHistoryTypeId="1" PostId="9827" RevisionGUID="c5384055-aac4-4b7a-bbca-0e164eb694e2" CreationDate="2023-09-04T05:38:22.467" UserId="2722" Text="How to Securely Notify Users of New Messages in a Substrate-based Chat Application?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38980" PostHistoryTypeId="3" PostId="9827" RevisionGUID="c5384055-aac4-4b7a-bbca-0e164eb694e2" CreationDate="2023-09-04T05:38:22.467" UserId="2722" Text="|substrate-node-template|polkadot|events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38989" PostHistoryTypeId="5" PostId="9812" RevisionGUID="0d19a174-4038-4267-9467-1c8215e156bd" CreationDate="2023-09-04T07:35:44.780" UserId="-1" Comment="it's the power of XCM, not substrate" Text=" 1. 100%, that is the power of XCM&#xD;&#xA; 2. Being a solo chain means you are running your own consensus. In other words, you are not leveraging the shared security of Polkadot, therefore you will need a bridge Polkadot &lt;&gt; Solochain in order to communicate with Polkadot/'s parachains.&#xD;&#xA; 3. The security implications depend on how secure your consensus algorithm is and how secure your bridge is.&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="38990" PostHistoryTypeId="24" PostId="9812" RevisionGUID="0d19a174-4038-4267-9467-1c8215e156bd" CreationDate="2023-09-04T07:35:44.780" Comment="Proposed by anonymous approved by 3317 edit id of 545" ContentLicense="CC BY-SA 4.0" />
  <row Id="38992" PostHistoryTypeId="2" PostId="9829" RevisionGUID="7107fa01-f9e2-47e2-8fa8-44d4c3d7245e" CreationDate="2023-09-04T11:50:33.120" UserId="2135" Text="The question can seem weird but here is the geist of it : &#xD;&#xA;&#xD;&#xA;In a custom chain with 20 sec block time, we have a different format of header that includes more information. At the end of the block, we extended the `system::finalize()` to generate a &quot;commitment&quot;. This process takes roughly between 2 and 8 seconds depending on the size of the block. &#xD;&#xA;&#xD;&#xA;Now the issue is that when multiple blocks are full, all blocks take 28 seconds instead of 20 seconds. It's kinda working correctly, the timestamp are ok (since generated before) but I would like to know if there was a way to make this process happen in the 20 seconds.&#xD;&#xA;&#xD;&#xA;Of course at the moment this process start, no more transactions can be included in the said block.&#xD;&#xA;&#xD;&#xA;How it works currently it theoritically what we want but we would like more consistency.&#xD;&#xA;&#xD;&#xA;Tl;dr: How could we allocate ≃25% of our block time to do custom process (just after processing extrinsic but before `on_idle` or `on_finalize`) ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38994" PostHistoryTypeId="1" PostId="9829" RevisionGUID="7107fa01-f9e2-47e2-8fa8-44d4c3d7245e" CreationDate="2023-09-04T11:50:33.120" UserId="2135" Text="How to add custom process without exceeding the block time?" ContentLicense="CC BY-SA 4.0" />
  <row Id="38995" PostHistoryTypeId="3" PostId="9829" RevisionGUID="7107fa01-f9e2-47e2-8fa8-44d4c3d7245e" CreationDate="2023-09-04T11:50:33.120" UserId="2135" Text="|block-production|block|timestamp|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="38996" PostHistoryTypeId="5" PostId="9751" RevisionGUID="e2514b68-daee-43c1-b179-c3cb99b5b14c" CreationDate="2023-09-04T12:08:53.433" UserId="4105" Comment="added 267 characters in body" Text="TLDR: *How to implement a substrate unsigned call, which performs storage modifications and emits events during it's validation? If transaction fails, it seems like it leaves garbage in runtime, due events/storage modifications are not reverted (see docs below).*&#xD;&#xA;&#xD;&#xA;Let's say there is an extrinsic, which is an unsigned transaction with following body:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(1)]&#xD;&#xA;#[pallet::weight(42)]&#xD;&#xA;#[frame_support::transactional]&#xD;&#xA;pub fn extrinsic(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;    ..&#xD;&#xA;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    let _ = ensure_none(origin)?;&#xD;&#xA;&#xD;&#xA;    let prevalidate_data = Self::prevalidate_something(..)?;&#xD;&#xA;&#xD;&#xA;    Self::do_something(..);&#xD;&#xA;&#xD;&#xA;    // Adjust weight to performed computations&#xD;&#xA;    let weight = Self::calc_weight(&amp;prevalidate_data);&#xD;&#xA;&#xD;&#xA;    Ok(PostDispatchInfo {&#xD;&#xA;        actual_weight: Some(weight),&#xD;&#xA;        pays_fee: Pays::No,&#xD;&#xA;    })&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Extrinsic basically calls `prevalidate_something` function to perform all operations that may potentially fail (it emits events and modifies storage as well and during execution it may fail). If `prevalidate_something` succedes, then `do_something` is called, which performs operations that do not fail and in the end weight is calculated based on `prevalidate_data`.&#xD;&#xA;&#xD;&#xA;As long as it is unsigned transaction, it is validated in `ValidateUnsigned::validate_unsigned` trait. According to documentation, this function can be called multiple times, the same thing applies to `ValidateUnsigned::pre_dispatch`. But if `validate_unsigned` will be called just before right dispatch (with TransactionSource::InBlock as argument), all operations performed by `prevalidate_something` will be persisted, even if it will fail:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	/// Validate the call right before dispatch.&#xD;&#xA;	///&#xD;&#xA;	/// This method should be used to prevent transactions already in the pool&#xD;&#xA;	/// (i.e. passing [`validate_unsigned`](Self::validate_unsigned)) from being included in blocks&#xD;&#xA;	/// in case they became invalid since being added to the pool.&#xD;&#xA;	///&#xD;&#xA;	/// By default it's a good idea to call [`validate_unsigned`](Self::validate_unsigned) from&#xD;&#xA;	/// within this function again to make sure we never include an invalid transaction. Otherwise&#xD;&#xA;	/// the implementation of the call or this method will need to provide proper validation to&#xD;&#xA;	/// ensure that the transaction is valid.&#xD;&#xA;	///&#xD;&#xA;	/// Changes made to storage *WILL* be persisted if the call returns `Ok`.&#xD;&#xA;	fn pre_dispatch(call: &amp;Self::Call) -&gt; Result&lt;(), TransactionValidityError&gt; {&#xD;&#xA;		Self::validate_unsigned(TransactionSource::InBlock, call)&#xD;&#xA;			.map(|_| ())&#xD;&#xA;			.map_err(Into::into)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In theory, we can protect it by moving call of `prevalidate_something` to `validate_unsigned` and wrap it in additional transactional layer, so all operations will be reverted once it will fail:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let prevalidate_data = frame_support::storage::with_storage_layer(|| {&#xD;&#xA;    Pallet::&lt;T&gt;::prevalidate_something(&#xD;&#xA;        ..&#xD;&#xA;    )&#xD;&#xA;}).map_err(|err| InvalidTransaction::Custom(err.into()))?;&#xD;&#xA;&#xD;&#xA;// We can use prevalidate_data to define priority as well&#xD;&#xA;&#xD;&#xA;ValidTransaction::with_tag_prefix(&quot;Prefix&quot;)&#xD;&#xA;    .priority(42)&#xD;&#xA;    .propagate(!matches!(source, TransactionSource::InBlock))&#xD;&#xA;    .build();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But how to get `prevalidate_data` for weight calculation, in case that it will be not called inside extrinsic, but in `validate_unsigned`?&#xD;&#xA;&#xD;&#xA;In theory, we can call `prevalidate_something` in `validate_unsigned` wrapped in [with_transaction][1] and always return `TransactionOutcome::Rollback` and call `prevalidate_something` in extrinsic as usuall, but it causes that this computations are performed twice for `InBlock` case.&#xD;&#xA;&#xD;&#xA;Maybe adding StorageValue like below will solve the issue, so in `validate_unsigned` weight will be calculated based on `prevalidate_data` and later read in the dispatch of extrinsic?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Last weight of the transaction&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type LastWeight&lt;T: Config&gt; = StorageValue&lt;_, Weight, ValueQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let prevalidate_data = frame_support::storage::with_storage_layer(|| {&#xD;&#xA;    Pallet::&lt;T&gt;::prevalidate_something(&#xD;&#xA;        ..&#xD;&#xA;    )&#xD;&#xA;}).map_err(|err| InvalidTransaction::Custom(err.into()))?;&#xD;&#xA;&#xD;&#xA;let weight = Pallet::&lt;T&gt;::calc_weight(&amp;prevalidate_data);&#xD;&#xA;&#xD;&#xA;LastWeight::&lt;T&gt;::mutate(|last_weight| {&#xD;&#xA;    *last_weight = weight;&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;// We can use prevalidate_data to define priority as well&#xD;&#xA;&#xD;&#xA;ValidTransaction::with_tag_prefix(&quot;Prefix&quot;)&#xD;&#xA;    .priority(42)&#xD;&#xA;    .propagate(!matches!(source, TransactionSource::InBlock))&#xD;&#xA;    .build();&#xD;&#xA;```&#xD;&#xA;* Is there some possible race condition within this approach?&#xD;&#xA;* Can we assume, that right after `InBlock` dispatch, no other extrinsic will be set between?&#xD;&#xA;* Do you have some suggestions, how to handle an extrinsic, which has a prevalidate function that emits events and modifies storage?&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/frame_support/storage/fn.with_transaction.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="38997" PostHistoryTypeId="33" PostId="9824" RevisionGUID="7d0704d4-fa62-4dc5-9670-fc87b5111ae5" CreationDate="2023-09-04T12:52:31.190" UserId="3" Comment="33" />
  <row Id="38998" PostHistoryTypeId="2" PostId="9830" RevisionGUID="7eb2d24b-c28a-4b9b-a78c-e5e18d6fe8a9" CreationDate="2023-09-04T13:11:00.407" UserId="3030" Text="Say i have enum:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::error]&#xD;&#xA;pub enum Error&lt;T&gt; {&#xD;&#xA;    Error1,&#xD;&#xA;    Error2,&#xD;&#xA;    Error3,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;However i realise that Error2 is in fact not in use and i can remove it.&#xD;&#xA;Will i have any consequence in doing so?&#xD;&#xA;&#xD;&#xA;Since errors return as an index Error3 has gone from index 2 to 1, i worry that if errors are saved historically then you will have to use the runtime at the point of error to correctly decode the error.&#xD;&#xA;&#xD;&#xA;Thanks in advance.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39000" PostHistoryTypeId="1" PostId="9830" RevisionGUID="7eb2d24b-c28a-4b9b-a78c-e5e18d6fe8a9" CreationDate="2023-09-04T13:11:00.407" UserId="3030" Text="Removing an error member with #[pallet::error]" ContentLicense="CC BY-SA 4.0" />
  <row Id="39001" PostHistoryTypeId="3" PostId="9830" RevisionGUID="7eb2d24b-c28a-4b9b-a78c-e5e18d6fe8a9" CreationDate="2023-09-04T13:11:00.407" UserId="3030" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39002" PostHistoryTypeId="2" PostId="9831" RevisionGUID="d33f1902-e1fd-48fb-8375-1921c1664e71" CreationDate="2023-09-04T13:30:19.693" UserId="139" Text="Let's say we get rid of a pallet after a runtime upgrade. My question is do the storage keys related to the now removed pallet just get pruned away automatically or is there some kind of manual intervention required? " ContentLicense="CC BY-SA 4.0" />
  <row Id="39004" PostHistoryTypeId="1" PostId="9831" RevisionGUID="d33f1902-e1fd-48fb-8375-1921c1664e71" CreationDate="2023-09-04T13:30:19.693" UserId="139" Text="How to get rid unused storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39005" PostHistoryTypeId="3" PostId="9831" RevisionGUID="d33f1902-e1fd-48fb-8375-1921c1664e71" CreationDate="2023-09-04T13:30:19.693" UserId="139" Text="|storage|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39006" PostHistoryTypeId="2" PostId="9832" RevisionGUID="faa3088e-a586-48da-a774-5302e30366b2" CreationDate="2023-09-04T13:43:03.483" UserId="94" Text="The runtime does not detect unused storage. It needs to be removed manually. &#xD;&#xA;There is a `RemovePallet` migration that can be used, but it needs careful consideration on a parachain to not overflow the weight.&#xD;&#xA;&#xD;&#xA;A more general way it to write a multi-block migration, for example in an `on_idle` hook and cleanup the elements one by one." ContentLicense="CC BY-SA 4.0" />
  <row Id="39008" PostHistoryTypeId="2" PostId="9833" RevisionGUID="19fee8a0-5340-4b19-91e8-6ba1f14d346e" CreationDate="2023-09-04T13:46:32.230" UserId="94" Text="You can just change the error enum and then bump the `spec_version`. It will indeed not be backwards compatible. This is not a problem since the Metadata of signing devices can be manually updated (ie via a QR code).&#xD;&#xA;&#xD;&#xA;&gt;i worry that if errors are saved historically then you will have to use the runtime at the point of error to correctly decode the error.&#xD;&#xA;&#xD;&#xA;You always have to use the Metadata at that point in time to parse errors. But this applies not just to errors but also Transactions and so on." ContentLicense="CC BY-SA 4.0" />
  <row Id="39010" PostHistoryTypeId="2" PostId="9834" RevisionGUID="1004aae4-b067-4050-ba2f-0000e0eefcce" CreationDate="2023-09-04T16:24:41.313" UserId="427" Text="During a storage migration I want to add few SS58 Address in one storage. How to hardcode it in migration script?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39012" PostHistoryTypeId="1" PostId="9834" RevisionGUID="1004aae4-b067-4050-ba2f-0000e0eefcce" CreationDate="2023-09-04T16:24:41.313" UserId="427" Text="How to hardcode few AccountIds to a storage in migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39013" PostHistoryTypeId="3" PostId="9834" RevisionGUID="1004aae4-b067-4050-ba2f-0000e0eefcce" CreationDate="2023-09-04T16:24:41.313" UserId="427" Text="|runtime-upgrade|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39014" PostHistoryTypeId="2" PostId="9835" RevisionGUID="b709e3eb-5ce2-4e6e-a5a0-3e7712bc45e7" CreationDate="2023-09-04T17:37:54.557" UserId="4062" Text="I rewrote some examples of transfer assets from rococo to some parachains like mangata, rockmine, dali.... on the blockcoder repository at &lt;https://github.com/blockcodes/xcm-sdk&gt;&#xD;&#xA;I don't know how to get addresses like: rockmine, rococo, mangata account addresses to check for my purpose transfer?&#xD;&#xA;```&#xD;&#xA;const beneficiaryValue = &quot;&lt;rockmine account address&gt;&quot; ???? // account address&#xD;&#xA;export const rococoExampleUtils = {&#xD;&#xA;    rococoRpc: 'wss://rococo-rpc.polkadot.io',&#xD;&#xA;    rockMineRpc: 'wss://rococo-rockmine-rpc.polkadot.io',&#xD;&#xA;    rockMineParachainId: 1000,&#xD;&#xA;    mangataParachainId: 2110,&#xD;&#xA;    daliParachainId: 2087,&#xD;&#xA;    senderMnemonic: '???', &#xD;&#xA;    rockmineDestinationAccount: '???',&#xD;&#xA;    daliDestinationAccount: '???',&#xD;&#xA;    rococoDestinationAccount: '???',&#xD;&#xA;    mangataDestinationAccount: '???',&#xD;&#xA;    rocAmount: 500000000000, // 0.5 ROC&#xD;&#xA;  }&#xD;&#xA;  ```&#xD;&#xA;Thank you for your help. " ContentLicense="CC BY-SA 4.0" />
  <row Id="39016" PostHistoryTypeId="1" PostId="9835" RevisionGUID="b709e3eb-5ce2-4e6e-a5a0-3e7712bc45e7" CreationDate="2023-09-04T17:37:54.557" UserId="4062" Text="XCM Transfer | How to get account addresses of rococo, mangata...?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39017" PostHistoryTypeId="3" PostId="9835" RevisionGUID="b709e3eb-5ce2-4e6e-a5a0-3e7712bc45e7" CreationDate="2023-09-04T17:37:54.557" UserId="4062" Text="|xcm|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39020" PostHistoryTypeId="50" PostId="7495" RevisionGUID="edbbab42-3267-4175-99a0-00b74623b5dc" CreationDate="2023-09-04T20:06:00.667" UserId="-1" />
  <row Id="39022" PostHistoryTypeId="50" PostId="4706" RevisionGUID="4ddc4202-246f-43c1-8ecc-d9244a0a9afa" CreationDate="2023-09-04T23:02:15.400" UserId="-1" />
  <row Id="39026" PostHistoryTypeId="2" PostId="9837" RevisionGUID="91885d0f-0262-4fe3-8130-6b831eae9bcc" CreationDate="2023-09-05T06:58:00.260" UserId="2762" Text="See this tutorial on Substrate for the basics about migrations [Basic storage migration][1], in this tutorial there is an example where it modifies the storage of a pallet (Nicks pallet) to include both a first name and an optional last name. The [script has to transform the values][2] to the new storage.&#xD;&#xA;&#xD;&#xA;Your case is easier because if I understand correctly you just want to add some accounts into an storage. &#xD;&#xA;To see how to hardcore the an address, see this SE previous question: [How to hardcode an address in the substrate runtime?][3]. &#xD;&#xA;&#xD;&#xA;A simple version of your code will look something like:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;fn on_runtime_upgrade() -&gt; frame_support::weights::Weight {&#xD;&#xA;			let onchain_version = Pallet::&lt;T&gt;::on_chain_storage_version();&#xD;&#xA;			if onchain_version &lt; your_version {&#xD;&#xA;				let account_hardcoded = AccountId::from_ss58check(&quot;account_hardcoded&quot;).unwrap();&#xD;&#xA;                &lt;YourStorage&lt;T&gt;&gt;::put(account_hardcoded);&#xD;&#xA;				// Return the weight consumed by the migration.&#xD;&#xA;				T::DbWeight::get().reads_writes(1, 1)&#xD;&#xA;			} else {&#xD;&#xA;				log::info!(target: LOG_TARGET, &quot;MigrateToV1 should be removed&quot;);&#xD;&#xA;				T::DbWeight::get().reads(1)&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/storage-migrations/basic-storage-migration/&#xD;&#xA;  [2]: https://docs.substrate.io/reference/how-to-guides/storage-migrations/basic-storage-migration/#write-migrate_to_v2&#xD;&#xA;  [3]: https://stackoverflow.com/questions/66056225/how-to-hardcode-an-address-in-the-substrate-runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="39028" PostHistoryTypeId="2" PostId="9838" RevisionGUID="76a1f197-fbee-4e84-a643-5405bcd51a9e" CreationDate="2023-09-05T07:14:59.993" UserId="2762" Text="The `destination account` is the account in the destination parachain you want to send the transfer to.&#xD;&#xA;&#xD;&#xA;If you go to `examples/rococo` in that folder you can see where this values are used. Let's take Rockmine as a example ([rococo-to-rockmine.ts][1]):&#xD;&#xA;```rs&#xD;&#xA;await provider.limitedTeleportAssets({&#xD;&#xA;    'Parachain',&#xD;&#xA;    rockMineParachainId,&#xD;&#xA;    'AccountId32',&#xD;&#xA;    rockmineDestinationAccount,&#xD;&#xA;    amount,&#xD;&#xA;  })&#xD;&#xA;```&#xD;&#xA;The first parameter is the destination to transfer the asset. In this case we are transferring an asset from relaychain to a parachain so we set 'Parachain'.&#xD;&#xA;&#xD;&#xA;The second parameter is the destination value which in this case is the Para_id of the parachain we are transfering the value: Rockmine.&#xD;&#xA;&#xD;&#xA;The third one is the beneficiary traget, in this case an AccountId32 and the fourth is what you were asking for, is the beneficiary value, the account address to send the asset&#xD;&#xA;&#xD;&#xA;You can see your accounts in Rockmine in the accounts tab in Polkadot JS: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-asset-hub-rpc.polkadot.io#/accounts&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/blockcoders/xcm-sdk/blob/main/src/examples/rococo/rococo-to-rockmine.ts" ContentLicense="CC BY-SA 4.0" />
  <row Id="39030" PostHistoryTypeId="2" PostId="9839" RevisionGUID="3476a874-894b-43c2-9b11-cbbbc76d518b" CreationDate="2023-09-05T07:36:10.293" UserId="2844" Text="I am using `polkadot` from [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) github repo and from [this article](https://docs.substrate.io/test/simulate-parachains/#prepare-a-working-folder-with-the-binaries) to Simulate parachains in a test network, it says to checkout latest release of polkadot which might be `git checkout release-v1.0.0` but I can't do that from `polkadot-sdk`,&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air polkadot-sdk % git checkout release-v1.0.0&#xD;&#xA;    error: pathspec 'release-v1.0.0' did not match any file(s) known to git&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air polkadot-sdk % cd polkadot &#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air polkadot % git checkout release-v1.0.0&#xD;&#xA;    error: pathspec 'release-v1.0.0' did not match any file(s) known to git&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air polkadot % &#xD;&#xA;&#xD;&#xA;also using latest `zombienet-macos v1.3.66`&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;and I think because of not using `latest release of polkadot` I am getting this error,&#xD;&#xA;&#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:53031/metrics&#xD;&#xA;    &#xD;&#xA;    Error 	 fetching metrics from: http://127.0.0.1:53027/metrics&#xD;&#xA;    &#xD;&#xA;    	 Error:  &#xD;&#xA;    		 Timeout(300), &quot;getting desired metric value 1 within 300 secs&quot;.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	 Error:  &#xD;&#xA;    		 Timeout(300), &quot;getting desired metric value 1 within 300 secs&quot;.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	 Error:  &#xD;&#xA;    		 Timeout(300), &quot;getting desired metric value 1 within 300 secs&quot;.&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	 Error:  &#xD;&#xA;    		 Timeout(300), &quot;getting desired metric value 1 within 300 secs&quot;.&#xD;&#xA;    &#xD;&#xA;    Error:  	 Error: At least one of the nodes fails to start&#xD;&#xA;    &#xD;&#xA;    undefined&#xD;&#xA;    ┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;    │ Node'              │ /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-373ef077d6dbe13b0887f26f9ec9fa2f_-18674-P… │&#xD;&#xA;    │ s logs:            │                                                                                                    │&#xD;&#xA;    │ m                  │                                                                                                    │&#xD;&#xA;    └────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav %&#xD;&#xA;&#xD;&#xA;Someone please tell me how to figure our this issue?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/yHbT5.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39032" PostHistoryTypeId="1" PostId="9839" RevisionGUID="3476a874-894b-43c2-9b11-cbbbc76d518b" CreationDate="2023-09-05T07:36:10.293" UserId="2844" Text="can't start test network using zombienet-macos" ContentLicense="CC BY-SA 4.0" />
  <row Id="39033" PostHistoryTypeId="3" PostId="9839" RevisionGUID="3476a874-894b-43c2-9b11-cbbbc76d518b" CreationDate="2023-09-05T07:36:10.293" UserId="2844" Text="|substrate-parachain-template|relay-chain|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39034" PostHistoryTypeId="2" PostId="9840" RevisionGUID="0362e816-33dc-4da3-90b2-0a880b7f8fb6" CreationDate="2023-09-05T07:36:42.003" UserId="125" Text="It's possible to get the metadata information using the `state_getMetadata` RPC method.  Then I want to reconstruct the corresponding rust types described in the metadata json type registry and decode the runtime state content based on the parsed type. Since the type registry has implemented JsonSchema, I tried to reconstruct using [quicktype](https://github.com/quicktype/quicktype), but no luck. Any other ideas?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39036" PostHistoryTypeId="1" PostId="9840" RevisionGUID="0362e816-33dc-4da3-90b2-0a880b7f8fb6" CreationDate="2023-09-05T07:36:42.003" UserId="125" Text="Is there a way to reconstruct the rust types from the runtime metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39037" PostHistoryTypeId="3" PostId="9840" RevisionGUID="0362e816-33dc-4da3-90b2-0a880b7f8fb6" CreationDate="2023-09-05T07:36:42.003" UserId="125" Text="|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39038" PostHistoryTypeId="2" PostId="9841" RevisionGUID="23e89280-b1ed-4258-a6ca-0e94f87f8db0" CreationDate="2023-09-05T07:47:21.723" UserId="2762" Text="You are right, the docs has to be updated with the new repository. &#xD;&#xA;&#xD;&#xA;In the new repo go to the [polkadot folder][1] and follow the instructions there to generate the polkadot binary.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/tree/master/polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="39040" PostHistoryTypeId="2" PostId="9842" RevisionGUID="cf0584e8-3bf0-4d08-9615-30c64464573d" CreationDate="2023-09-05T08:00:12.330" UserId="354" Text="I am trying to do runtime upgrade of my (layer 0)  blockchain  i.e relay chain running on 0.9.36 version  through democracy . while following this process. &#xD;&#xA;&#xD;&#xA;1. create pre-image.     &#xD;&#xA;2. submit pre-image through democracy .   &#xD;&#xA;3. endorse   &#xD;&#xA;4.  voting . &#xD;&#xA;&#xD;&#xA; After doing all this i am getting event of schedular overweight . how i can solve this error.And how i can runtime upgrade thorough democracy" ContentLicense="CC BY-SA 4.0" />
  <row Id="39042" PostHistoryTypeId="1" PostId="9842" RevisionGUID="cf0584e8-3bf0-4d08-9615-30c64464573d" CreationDate="2023-09-05T08:00:12.330" UserId="354" Text="getting schedular overweight error while doing runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="39043" PostHistoryTypeId="3" PostId="9842" RevisionGUID="cf0584e8-3bf0-4d08-9615-30c64464573d" CreationDate="2023-09-05T08:00:12.330" UserId="354" Text="|runtime-upgrade|substrate-node|blockchain|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39044" PostHistoryTypeId="5" PostId="9842" RevisionGUID="55dd6f5d-9c5f-4ee3-b389-4a20cc67575a" CreationDate="2023-09-05T08:08:58.230" UserId="354" Comment="added 86 characters in body; edited title" Text="I am trying to do a runtime upgrade through democracy referenda and the steps I performed are as follows:&#xD;&#xA;&#xD;&#xA;1. create pre-image.     &#xD;&#xA;2. submit pre-image through democracy .   &#xD;&#xA;3. endorse   &#xD;&#xA;4.  voting . &#xD;&#xA;&#xD;&#xA; After this I am getting event of schedular overweight. I have done runtime upgrade through democracy before also but this is the first time I got this error can someone help me with this.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/oHlCp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39045" PostHistoryTypeId="4" PostId="9842" RevisionGUID="55dd6f5d-9c5f-4ee3-b389-4a20cc67575a" CreationDate="2023-09-05T08:08:58.230" UserId="354" Comment="added 86 characters in body; edited title" Text="Getting schedular overweight error while doing runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="39047" PostHistoryTypeId="2" PostId="9843" RevisionGUID="a79459dc-c139-4411-9133-a718eb5e13f2" CreationDate="2023-09-05T09:34:51.740" UserId="251" Text="In Rust, it is not possible to create a struct at runtime due to the absence of a reflection system.&#xD;&#xA;&#xD;&#xA;Currently, the most convenient approach is employed in `subxt`. It involves fetching the metadata first and constructing those types statically before embedding them into the compiling code.&#xD;&#xA;&#xD;&#xA;For further reading on this topic, you may refer to:&#xD;&#xA;- https://stackoverflow.com/questions/47159418/is-it-possible-to-define-structs-at-runtime-or-otherwise-achieve-a-similar-effec&#xD;&#xA;- https://www.reddit.com/r/rust/comments/9wr5wi/crazy_idea_is_possible_to_build_structs/&#xD;&#xA;- https://github.com/paritytech/subxt?tab=readme-ov-file#downloading-metadata-from-a-substrate-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="39049" PostHistoryTypeId="2" PostId="9844" RevisionGUID="f2be08c8-bf08-4f80-b6f7-da8cb2261fbf" CreationDate="2023-09-05T10:12:30.903" UserId="3317" Text="&gt;Are reaping and dusting separate processes?&#xD;&#xA;&#xD;&#xA;Yes, [this made it clear to me][1]:&#xD;&#xA; - dusting: removing remaining balance (e.g. after a transfer) if it is lower than the ED.&#xD;&#xA; - reaping: removing an `account` from storage.&#xD;&#xA;&gt;How can I whitelist an account in pallet-balances to prevent it from getting dusted?&#xD;&#xA;&#xD;&#xA;I don't think that is currently possible. There is no way to prevent this other than setting no ED or having `free_balance + reserved_balance &gt; ED`([ref][2]). However, if you call `transfer` with `Preservation::Preserve` in stead of `Preservation::Expendable`, it will fail ([ref][3]).&#xD;&#xA;&gt;Is the behavior above expected or is this a bug?&#xD;&#xA;&#xD;&#xA;From reading the [README][4]:&#xD;&#xA;&gt;No account should ever have a total balance that is strictly between 0 and the existential deposit (exclusive). If this ever happens, it indicates either a bug in this module or an erroneous raw mutation of storage.&#xD;&#xA;&#xD;&#xA;Which in the test case you did, you increased the `providers`. So I think it is the expected behaviour.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/12194445b222ec4a31ef247d1bced9ba127d7d52/substrate/frame/support/src/traits/tokens/misc.rs#L45-L55&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/12194445b222ec4a31ef247d1bced9ba127d7d52/substrate/frame/balances/src/lib.rs#L1002&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/12194445b222ec4a31ef247d1bced9ba127d7d52/substrate/frame/support/src/traits/tokens/misc.rs#L118-L119&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/balances/README.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="39051" PostHistoryTypeId="2" PostId="9845" RevisionGUID="39c52ee9-27b0-414f-b8bd-7c8eb278eece" CreationDate="2023-09-05T10:55:15.610" UserId="139" Text="Can someone help me understand the difference b/w using a `Vec` (BoundedVec) instead of a `StorageMap` for storing ordered items? Basically inside a vector, the index would be an indicator of order whereas one may equivalently represent the same data as a `StorageMap&lt;Identity, u32, Data&gt;` where `u32` acts as the ordering. The reason for choosing `Identity` hasher for the key is simple, I just care about the keys acting as indices. I am planning on iterating through this data structure so as far as I can tell, the difference is just in syntax:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// Vec&#xD;&#xA;vec.iter()&#xD;&#xA;```&#xD;&#xA;vs &#xD;&#xA;```rs&#xD;&#xA;// StorageMap&#xD;&#xA;for i in 1..n {&#xD;&#xA; Storage::get(i)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39053" PostHistoryTypeId="1" PostId="9845" RevisionGUID="39c52ee9-27b0-414f-b8bd-7c8eb278eece" CreationDate="2023-09-05T10:55:15.610" UserId="139" Text="Data structure to choose for ordered items?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39054" PostHistoryTypeId="3" PostId="9845" RevisionGUID="39c52ee9-27b0-414f-b8bd-7c8eb278eece" CreationDate="2023-09-05T10:55:15.610" UserId="139" Text="|boundedvec|storagemap|vec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39055" PostHistoryTypeId="2" PostId="9846" RevisionGUID="167e6065-a55f-4c0c-a3f9-8b2acd4a79ca" CreationDate="2023-09-05T11:49:28.287" UserId="94" Text="In the relay chain case you can overwrite the weight of the runtime upgrade by wrapping the `system::set_code` extrinsic into a `utility::with_weight` and overwrite the weight to something small.  &#xD;&#xA;We use this approach in Polkadot/Kusama to ensure that the upgrades do not hang with such an error." ContentLicense="CC BY-SA 4.0" />
  <row Id="39057" PostHistoryTypeId="2" PostId="9847" RevisionGUID="fc6d14a2-6408-471e-9f92-e78b22855d9a" CreationDate="2023-09-05T12:18:52.433" UserId="4533" Text="I need help with that code. Can anyone pls help me out ??&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;mod p{&#xD;&#xA;        #[ink(storage)]&#xD;&#xA;        pub struct Foobar {&#xD;&#xA;            /// Stores a single `bool` value on the storage.&#xD;&#xA;            value: bool,&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        impl Foobar {&#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn default() -&gt; Self {&#xD;&#xA;                Self::new(Default::default())&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        #[ink_e2e::test]&#xD;&#xA;        async fn default_works(mut client: ink_e2e::Client&lt;C, E&gt;) -&gt; E2EResult&lt;()&gt; {&#xD;&#xA;            // Given&#xD;&#xA;            let constructor = FoobarRef::default();&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;what this line actually means. I have not created anything with the name FoobarRef but we are using it.&#xD;&#xA;and if FoobarRef is the same as Foobbar what is stored in a variable named constructor and how can I print it?&#xD;&#xA;```let constructor = FoobarRef::default();```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39059" PostHistoryTypeId="1" PostId="9847" RevisionGUID="fc6d14a2-6408-471e-9f92-e78b22855d9a" CreationDate="2023-09-05T12:18:52.433" UserId="4533" Text="Need help in Ink e2e tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="39060" PostHistoryTypeId="3" PostId="9847" RevisionGUID="fc6d14a2-6408-471e-9f92-e78b22855d9a" CreationDate="2023-09-05T12:18:52.433" UserId="4533" Text="|ink|rust|e2e|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39061" PostHistoryTypeId="5" PostId="9772" RevisionGUID="6ca14a81-d5e3-46ef-b60d-8637ee42fbad" CreationDate="2023-09-05T13:25:06.567" UserId="3317" Comment="added 664 characters in body" Text="&gt;if transaction fails, it seems like it leaves garbage in runtime, due events/storage modifications are not reverted.&#xD;&#xA;&#xD;&#xA;This is incorrect. Like any extrinsic the default is that state changes will only persist if it doesn't return an error.&#xD;&#xA;&#xD;&#xA;The `SignedExtension`'s validation don't include the full logic of an extrinsic (see first answer [extrinsic validation lifecycle][1]). More specifically, for your 'unsigned' case, only the `check_weight` has a `validate_unsigned` implementation and the rest return the default (`Ok`). &#xD;&#xA;&#xD;&#xA;`SignedExtensions` are called from the transaction pool to initially validate a transaction and when applying the transactions from a block (`pre_dispatch` is called which default implementation is that it calls `validate`/`validate_unsigned`). The weight for `SignedExtensions` is handled through [ExtrinsicBaseWeight][2]. &#xD;&#xA;&#xD;&#xA;So to your example, `prevalidate_something` will only be executed when the extrinsic is applied from a block.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5647/difference-between-signedextension-default-behavior-vs-actual-behavior-expand/5939#5939&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/2923/signed-extensions-and-weights" ContentLicense="CC BY-SA 4.0" />
  <row Id="39063" PostHistoryTypeId="2" PostId="9848" RevisionGUID="14d39fbb-ede1-417d-b824-79124e99c8f7" CreationDate="2023-09-05T15:27:08.413" UserId="3327" Text="I am following following tutorial to write a custom pallet.&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/build-application-logic/use-macros-in-a-custom-pallet/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I compile the node, I get following error:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;error[E0220]: associated type `BlockNumber` not found for `T`&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:46:62&#xD;&#xA;   |&#xD;&#xA;46 |         StorageMap&lt;_, Blake2_128Concat, T::Hash, (T::AccountId, T::BlockNumber)&gt;;&#xD;&#xA;   |                                                                    ^^^^^^^^^^^ there is a similarly named associated type `BlockNumber` in the trait `BlockNumberProvider`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0220`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are the contents of my pallet lib.rs file that I trying to compile:&#xD;&#xA;&#xD;&#xA;'''&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    // Re-export pallet items so that they can be accessed from the crate namespace.&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    	&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Pallets use events to inform users when important changes are made.&#xD;&#xA;    	// Event documentation should end with an array that provides descriptive names for parameters.&#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// Event emitted when a claim has been created.&#xD;&#xA;    		ClaimCreated { who: T::AccountId, claim: T::Hash },&#xD;&#xA;    		/// Event emitted when a claim is revoked by the owner.&#xD;&#xA;    		ClaimRevoked { who: T::AccountId, claim: T::Hash },&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// The claim already exists.&#xD;&#xA;    		AlreadyClaimed,&#xD;&#xA;    		/// The claim does not exist, so it cannot be revoked.&#xD;&#xA;    		NoSuchClaim,&#xD;&#xA;    		/// The claim is owned by another account, so caller can't revoke it.&#xD;&#xA;    		NotClaimOwner,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	pub(super) type Claims&lt;T: Config&gt; =&#xD;&#xA;    		StorageMap&lt;_, Blake2_128Concat, T::Hash, (T::AccountId, T::BlockNumber)&gt;;&#xD;&#xA;    &#xD;&#xA;    	// Dispatchable functions allow users to interact with the pallet and invoke state changes.&#xD;&#xA;    	// These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;    	// Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		#[pallet::weight(0)]&#xD;&#xA;    		pub fn create_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash) -&gt; DispatchResult {&#xD;&#xA;    			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;    			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;    			let sender = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Verify that the specified claim has not already been stored.&#xD;&#xA;    			ensure!(!Claims::&lt;T&gt;::contains_key(&amp;claim), Error::&lt;T&gt;::AlreadyClaimed);&#xD;&#xA;    &#xD;&#xA;    			// Get the block number from the FRAME System pallet.&#xD;&#xA;    			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;    &#xD;&#xA;    			// Store the claim with the sender and block number.&#xD;&#xA;    			Claims::&lt;T&gt;::insert(&amp;claim, (&amp;sender, current_block));&#xD;&#xA;    &#xD;&#xA;    			// Emit an event that the claim was created.&#xD;&#xA;    			Self::deposit_event(Event::ClaimCreated { who: sender, claim });&#xD;&#xA;    &#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		#[pallet::weight(0)]&#xD;&#xA;    		pub fn revoke_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash) -&gt; DispatchResult {&#xD;&#xA;    			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;    			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;    			let sender = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Get owner of the claim, if none return an error.&#xD;&#xA;    			let (owner, _) = Claims::&lt;T&gt;::get(&amp;claim).ok_or(Error::&lt;T&gt;::NoSuchClaim)?;&#xD;&#xA;    &#xD;&#xA;    			// Verify that sender of the current call is the claim owner.&#xD;&#xA;    			ensure!(sender == owner, Error::&lt;T&gt;::NotClaimOwner);&#xD;&#xA;    &#xD;&#xA;    			// Remove claim from storage.&#xD;&#xA;    			Claims::&lt;T&gt;::remove(&amp;claim);&#xD;&#xA;    &#xD;&#xA;    			// Emit an event that the claim was erased.&#xD;&#xA;    			Self::deposit_event(Event::ClaimRevoked { who: sender, claim });&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;'''&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39065" PostHistoryTypeId="1" PostId="9848" RevisionGUID="14d39fbb-ede1-417d-b824-79124e99c8f7" CreationDate="2023-09-05T15:27:08.413" UserId="3327" Text="associated type `BlockNumber` not found for `T`" ContentLicense="CC BY-SA 4.0" />
  <row Id="39066" PostHistoryTypeId="3" PostId="9848" RevisionGUID="14d39fbb-ede1-417d-b824-79124e99c8f7" CreationDate="2023-09-05T15:27:08.413" UserId="3327" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39067" PostHistoryTypeId="52" PostId="9839" RevisionGUID="099425c4-6f74-420d-bf3c-62faf934d32b" CreationDate="2023-09-05T15:36:17.643" />
  <row Id="39068" PostHistoryTypeId="2" PostId="9849" RevisionGUID="249cfe52-b54b-4820-91d0-0d26836b20c4" CreationDate="2023-09-05T17:35:49.477" UserId="2706" Text="It should work on rust v1.72 and substrate-contracts-node v0.31 with cargo-contract-contract 3.2" ContentLicense="CC BY-SA 4.0" />
  <row Id="39070" PostHistoryTypeId="5" PostId="9848" RevisionGUID="e9aa3c12-c0d2-4e42-95fe-b4bd6bbd6220" CreationDate="2023-09-06T02:37:03.770" UserId="251" Comment="added 8 characters in body" Text="I am following following tutorial to write a custom pallet.&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/build-application-logic/use-macros-in-a-custom-pallet/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I compile the node, I get following error:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0220]: associated type `BlockNumber` not found for `T`&#xD;&#xA;  --&gt; pallets/template/src/lib.rs:46:62&#xD;&#xA;   |&#xD;&#xA;46 |         StorageMap&lt;_, Blake2_128Concat, T::Hash, (T::AccountId, T::BlockNumber)&gt;;&#xD;&#xA;   |                                                                    ^^^^^^^^^^^ there is a similarly named associated type `BlockNumber` in the trait `BlockNumberProvider`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0220`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here are the contents of my pallet lib.rs file that I trying to compile:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    // Re-export pallet items so that they can be accessed from the crate namespace.&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    	&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Pallets use events to inform users when important changes are made.&#xD;&#xA;    	// Event documentation should end with an array that provides descriptive names for parameters.&#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// Event emitted when a claim has been created.&#xD;&#xA;    		ClaimCreated { who: T::AccountId, claim: T::Hash },&#xD;&#xA;    		/// Event emitted when a claim is revoked by the owner.&#xD;&#xA;    		ClaimRevoked { who: T::AccountId, claim: T::Hash },&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// The claim already exists.&#xD;&#xA;    		AlreadyClaimed,&#xD;&#xA;    		/// The claim does not exist, so it cannot be revoked.&#xD;&#xA;    		NoSuchClaim,&#xD;&#xA;    		/// The claim is owned by another account, so caller can't revoke it.&#xD;&#xA;    		NotClaimOwner,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	pub(super) type Claims&lt;T: Config&gt; =&#xD;&#xA;    		StorageMap&lt;_, Blake2_128Concat, T::Hash, (T::AccountId, T::BlockNumber)&gt;;&#xD;&#xA;    &#xD;&#xA;    	// Dispatchable functions allow users to interact with the pallet and invoke state changes.&#xD;&#xA;    	// These functions materialize as &quot;extrinsics&quot;, which are often compared to transactions.&#xD;&#xA;    	// Dispatchable functions must be annotated with a weight and must return a DispatchResult.&#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		#[pallet::weight(0)]&#xD;&#xA;    		pub fn create_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash) -&gt; DispatchResult {&#xD;&#xA;    			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;    			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;    			let sender = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Verify that the specified claim has not already been stored.&#xD;&#xA;    			ensure!(!Claims::&lt;T&gt;::contains_key(&amp;claim), Error::&lt;T&gt;::AlreadyClaimed);&#xD;&#xA;    &#xD;&#xA;    			// Get the block number from the FRAME System pallet.&#xD;&#xA;    			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;    &#xD;&#xA;    			// Store the claim with the sender and block number.&#xD;&#xA;    			Claims::&lt;T&gt;::insert(&amp;claim, (&amp;sender, current_block));&#xD;&#xA;    &#xD;&#xA;    			// Emit an event that the claim was created.&#xD;&#xA;    			Self::deposit_event(Event::ClaimCreated { who: sender, claim });&#xD;&#xA;    &#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		#[pallet::weight(0)]&#xD;&#xA;    		pub fn revoke_claim(origin: OriginFor&lt;T&gt;, claim: T::Hash) -&gt; DispatchResult {&#xD;&#xA;    			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;    			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;    			let sender = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Get owner of the claim, if none return an error.&#xD;&#xA;    			let (owner, _) = Claims::&lt;T&gt;::get(&amp;claim).ok_or(Error::&lt;T&gt;::NoSuchClaim)?;&#xD;&#xA;    &#xD;&#xA;    			// Verify that sender of the current call is the claim owner.&#xD;&#xA;    			ensure!(sender == owner, Error::&lt;T&gt;::NotClaimOwner);&#xD;&#xA;    &#xD;&#xA;    			// Remove claim from storage.&#xD;&#xA;    			Claims::&lt;T&gt;::remove(&amp;claim);&#xD;&#xA;    &#xD;&#xA;    			// Emit an event that the claim was erased.&#xD;&#xA;    			Self::deposit_event(Event::ClaimRevoked { who: sender, claim });&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39071" PostHistoryTypeId="2" PostId="9850" RevisionGUID="f18a8758-cff5-4cc9-a928-46595c95539d" CreationDate="2023-09-06T02:42:37.263" UserId="251" Text="Check https://github.com/paritytech/polkadot-sdk/commit/5e7b27e98c0b9dacd4b6f0724fd6335106d94101.&#xD;&#xA;&#xD;&#xA;Now, you should use `BlockNumberFor&lt;T&gt;` directly. Because you have already imported it `use frame_system::pallet_prelude::*;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="39077" PostHistoryTypeId="2" PostId="9852" RevisionGUID="e3d81040-7647-4836-b146-b41b97fa986e" CreationDate="2023-09-06T07:17:06.317" UserId="2762" Text="That FoobarRef is generated by ink! is a reference of the contract, it gives you the information about available methods (args, return types) of the contract you want to call. &#xD;&#xA;&#xD;&#xA;With that line you can create an instance of your contract and interact with it in your test:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let contract_acc_id = client&#xD;&#xA;                .instantiate(&quot;your_contract&quot;, &amp;ink_e2e::alice(), **constructor**, 0, None)&#xD;&#xA;                .await&#xD;&#xA;                .expect(&quot;instantiate failed&quot;)&#xD;&#xA;                .account_id;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;See [this example in the ink/examples repository][1] and the [Flipper example][2] from the ink! Documentation&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/blob/main/e2e-call-runtime/lib.rs&#xD;&#xA;  [2]: https://use.ink/basics/contract-testing#example-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="39079" PostHistoryTypeId="5" PostId="9784" RevisionGUID="0c128919-8167-4bbb-a9df-b4857ea4e287" CreationDate="2023-09-06T08:11:55.193" UserId="251" Comment="added 1426 characters in body" Text="After some researching:&#xD;&#xA;- https://github.com/rust-lang/rustup/issues/1239&#xD;&#xA;- https://github.com/paritytech/metadata-portal/issues/535&#xD;&#xA;&#xD;&#xA;The issue arises from an incorrect built-in toolchain version. To resolve this, we should prioritize reading the project's `rusttoolchain.toml` file and updating the toolchain accordingly. However, this update may result in an &quot;Invalid cross-device link (os error 18)&quot; error. The solution is to remove the existing built-in toolchain and manually install it ourselves.&#xD;&#xA;&#xD;&#xA;Solution:&#xD;&#xA;```dockerfile&#xD;&#xA;# This is an example build stage for the node template. Here we create the binary in a temporary image.&#xD;&#xA;&#xD;&#xA;# This is a base image to build substrate nodes&#xD;&#xA;FROM docker.io/paritytech/ci-linux:production as builder&#xD;&#xA;&#xD;&#xA;WORKDIR /node-template&#xD;&#xA;COPY . .&#xD;&#xA;RUN rm -rf /usr/local/rustup /usr/local/cargo &amp;&amp; \&#xD;&#xA;    curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none &amp;&amp; \&#xD;&#xA;    rustup show &amp;&amp; \&#xD;&#xA;    cargo build --release&#xD;&#xA;&#xD;&#xA;# This is the 2nd stage: a very small image where we copy the binary.&quot;&#xD;&#xA;FROM docker.io/library/ubuntu:22.04&#xD;&#xA;LABEL description=&quot;Multistage Docker image for Substrate Node Template&quot; \&#xD;&#xA;  image.type=&quot;builder&quot; \&#xD;&#xA;  image.authors=&quot;alan.ma.dapps@gmail.com&quot; \&#xD;&#xA;  image.vendor=&quot;Substrate Developer Hub&quot; \&#xD;&#xA;  image.description=&quot;Multistage Docker image for Substrate Node Template&quot; \&#xD;&#xA;  image.source=&quot;https://github.com/substrate-developer-hub/substrate-node-template&quot; \&#xD;&#xA;  image.documentation=&quot;https://github.com/substrate-developer-hub/substrate-node-template&quot;&#xD;&#xA;&#xD;&#xA;# Copy the node binary.&#xD;&#xA;COPY --from=builder /node-template/target/release/node-template /usr/local/bin&#xD;&#xA;&#xD;&#xA;RUN useradd -m -u 1000 -U -s /bin/sh -d /node-dev node-dev &amp;&amp; \&#xD;&#xA;  mkdir -p /chain-data /node-dev/.local/share &amp;&amp; \&#xD;&#xA;  chown -R node-dev:node-dev /chain-data &amp;&amp; \&#xD;&#xA;  ln -s /chain-data /node-dev/.local/share/node-template &amp;&amp; \&#xD;&#xA;  # unclutter and minimize the attack surface&#xD;&#xA;  rm -rf /usr/bin /usr/sbin &amp;&amp; \&#xD;&#xA;  # check if executable works in this container&#xD;&#xA;  /usr/local/bin/node-template --version&#xD;&#xA;&#xD;&#xA;USER node-dev&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944 9615&#xD;&#xA;VOLUME [&quot;/chain-data&quot;]&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/node-template&quot;]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39080" PostHistoryTypeId="2" PostId="9853" RevisionGUID="b6eaaeca-48f6-4ec5-8fed-4d6f94f3255c" CreationDate="2023-09-06T08:17:31.600" UserId="18" Text="Hi All I am currently embarking on trying to send funds from the treasury via XCM&#xD;&#xA;&#xD;&#xA;I am fairly certain this isn't possible right now because the treasury origin does not have [send rights][1]. I am currently working on a [pr][2] to make this possible&#xD;&#xA;&#xD;&#xA;What I am trying to do is a reserve asset transfer, but that requires a signed origin and hence I am not sure it can be done via governance &#xD;&#xA;&#xD;&#xA;As an alternative, I am trying to split it in 2 parts&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;batch { &#xD;&#xA;spend(ParachainSovereignAccount), &#xD;&#xA;// Notify destination of funds sent&#xD;&#xA;send(dest: para, xcm: [ReserveAssetDeposited, ..]) &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, unless I am mistaken, `ReserveAssetDeposited` must be executed and not sent. &#xD;&#xA;If I use `DepositAssets` instead the message gets sent but there are no assets in holding so `AssetTransactor` does not deposit the asset. See [here][3] &#xD;&#xA;&#xD;&#xA;So tldr; can I send `ReserveAssetDeposited` via governance? I am currently getting `xcm::execute: !!! ERROR: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;)` which I think is because again this is not a signed transaction&#xD;&#xA;&#xD;&#xA;I do wonder if `DescendOrigin` can help but unfortunately I cannot find documentation around that &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-fellows/runtimes/blob/main/relay/kusama/src/xcm_config.rs#L392&#xD;&#xA;  [2]: https://github.com/polkadot-fellows/runtimes/pull/19&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-executor/src/lib.rs#L620" ContentLicense="CC BY-SA 4.0" />
  <row Id="39082" PostHistoryTypeId="1" PostId="9853" RevisionGUID="b6eaaeca-48f6-4ec5-8fed-4d6f94f3255c" CreationDate="2023-09-06T08:17:31.600" UserId="18" Text="XCM via governance" ContentLicense="CC BY-SA 4.0" />
  <row Id="39083" PostHistoryTypeId="3" PostId="9853" RevisionGUID="b6eaaeca-48f6-4ec5-8fed-4d6f94f3255c" CreationDate="2023-09-06T08:17:31.600" UserId="18" Text="|xcm|transfer|xcmv3|treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39084" PostHistoryTypeId="5" PostId="9853" RevisionGUID="4e4ee4df-a1d6-47a4-ae4a-cff7b505822b" CreationDate="2023-09-06T08:49:09.977" UserId="18" Comment="added 6035 characters in body" Text="Hi All I am currently embarking on trying to send funds from the treasury via XCM&#xD;&#xA;&#xD;&#xA;I am fairly certain this isn't possible right now because the treasury origin does not have [send rights][1]. I am currently working on a [pr][2] to make this possible&#xD;&#xA;&#xD;&#xA;What I am trying to do is a reserve asset transfer, but that requires a signed origin and hence I am not sure it can be done via governance &#xD;&#xA;&#xD;&#xA;As an alternative, I am trying to split it in 2 parts&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;batch { &#xD;&#xA;spend(ParachainSovereignAccount), &#xD;&#xA;// Notify destination of funds sent&#xD;&#xA;send(dest: para, xcm: [ReserveAssetDeposited, ..]) &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, unless I am mistaken, `ReserveAssetDeposited` must be executed and not sent. &#xD;&#xA;If I use `DepositAssets` instead the message gets sent but there are no assets in holding so `AssetTransactor` does not deposit the asset. See [here][3] &#xD;&#xA;&#xD;&#xA;Even a simple message below fails&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    let assets = MultiAssets::from(vec![MultiAsset {&#xD;&#xA;        id: Concrete(MultiLocation {&#xD;&#xA;            parents: 0,&#xD;&#xA;            interior: Here,&#xD;&#xA;        }),&#xD;&#xA;        fun: Fungible(transfer_amount),&#xD;&#xA;    }]);&#xD;&#xA;&#xD;&#xA;    let msg = VersionedXcm::from(Xcm(vec![&#xD;&#xA;        UnpaidExecution {&#xD;&#xA;            weight_limit: WeightLimit::Unlimited,&#xD;&#xA;            check_origin: None,&#xD;&#xA;        },&#xD;&#xA;        ReserveAssetDeposited(assets.clone().into()),&#xD;&#xA;    ]));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the below error from the logs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Sep 06 09:38:38.920 DEBUG xcm::send_xcm: dest: MultiLocation { parents: 0, interior: X1(Parachain(2121)) }, message: Xcm([DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))])    &#xD;&#xA;Sep 06 09:38:38.922 DEBUG xcm::execute_xcm: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))]), weight_limit: Weight { ref_time: 18446744073709551615, proof_size: 18446744073709551615 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::weight: FixedWeightBounds message: Xcm([DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))])    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::execute_xcm_in_credit: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))]), weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922  WARN xcm::barrier: Unexpected ReserveAssetDeposited from the Relay Chain    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::barriers: TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, instructions: [DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))], max_weight: Weight { ref_time: 3000000, proof_size: 3072 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::barriers: AllowKnownQueryResponses origin: MultiLocation { parents: 1, interior: Here }, instructions: [DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))], max_weight: Weight { ref_time: 3000000, proof_size: 3072 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::barriers: WithComputedOrigin origin: MultiLocation { parents: 1, interior: Here }, instructions: [DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))], max_weight: Weight { ref_time: 3000000, proof_size: 3072 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::barriers: AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: X1(Plurality { id: Treasury, part: Voice }) }, instructions: [UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))], max_weight: Weight { ref_time: 3000000, proof_size: 3072 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::barriers: AllowExplicitUnpaidExecutionFrom origin: MultiLocation { parents: 1, interior: X1(Plurality { id: Treasury, part: Voice }) }, instructions: [UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))], max_weight: Weight { ref_time: 3000000, proof_size: 3072 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::process: origin: Some(MultiLocation { parents: 1, interior: Here }), total_surplus/refunded: Weight { ref_time: 0, proof_size: 0 }/Weight { ref_time: 0, proof_size: 0 }, error_handler_weight: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.923 TRACE xcm::process_instruction: === DescendOrigin(X1(Plurality { id: Treasury, part: Voice }))    &#xD;&#xA;Sep 06 09:40:32.773 TRACE xcm::process_instruction: === UnpaidExecution { weight_limit: Unlimited, check_origin: None }    &#xD;&#xA;Sep 06 09:40:33.027 TRACE xcm::process_instruction: === ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))    &#xD;&#xA;Sep 06 09:40:33.241 TRACE xcm::execute: !!! ERROR: UntrustedReserveLocation    &#xD;&#xA;Sep 06 09:40:33.241 TRACE xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 2, xcm_error: UntrustedReserveLocation, weight: Weight { ref_time: 0, proof_size: 0 } })    &#xD;&#xA;Sep 06 09:40:33.241 TRACE xcm::execute_xcm_in_credit: Execution errored at 2: UntrustedReserveLocation (original_origin: MultiLocation { parents: 1, interior: Here })    &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So tldr; can I send `ReserveAssetDeposited` via governance? I am currently getting `xcm::execute: !!! ERROR: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;)` which I think is because again this is not a signed transaction&#xD;&#xA;&#xD;&#xA;I do wonder if `DescendOrigin` can help but unfortunately I cannot find documentation around that &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-fellows/runtimes/blob/main/relay/kusama/src/xcm_config.rs#L392&#xD;&#xA;  [2]: https://github.com/polkadot-fellows/runtimes/pull/19&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-executor/src/lib.rs#L620" ContentLicense="CC BY-SA 4.0" />
  <row Id="39085" PostHistoryTypeId="5" PostId="9853" RevisionGUID="a7240397-4d97-43ae-a22a-d95133d91d20" CreationDate="2023-09-06T09:44:08.017" UserId="18" Comment="added 60 characters in body" Text="Hi All I am currently embarking on trying to send funds from the treasury via XCM&#xD;&#xA;&#xD;&#xA;I am fairly certain this isn't possible right now because the treasury origin does not have [send rights][1]. I am currently working on a [pr][2] to make this possible&#xD;&#xA;&#xD;&#xA;What I am trying to do is a reserve asset transfer, but that requires a signed origin and hence I am not sure it can be done via governance &#xD;&#xA;&#xD;&#xA;As an alternative, I am trying to split it in 2 parts&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;batch { &#xD;&#xA;spend(ParachainSovereignAccount), &#xD;&#xA;// Notify destination of funds sent&#xD;&#xA;send(dest: para, xcm: [ReserveAssetDeposited, ..]) &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, unless I am mistaken, `ReserveAssetDeposited` must be executed and not sent. &#xD;&#xA;If I use `DepositAssets` instead the message gets sent but there are no assets in holding so `AssetTransactor` does not deposit the asset. See [here][3] &#xD;&#xA;&#xD;&#xA;Even a simple message below fails&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    let assets = MultiAssets::from(vec![MultiAsset {&#xD;&#xA;        id: Concrete(MultiLocation {&#xD;&#xA;            parents: 0,&#xD;&#xA;            interior: Here,&#xD;&#xA;        }),&#xD;&#xA;        fun: Fungible(transfer_amount),&#xD;&#xA;    }]);&#xD;&#xA;&#xD;&#xA;    let msg = VersionedXcm::from(Xcm(vec![&#xD;&#xA;        UnpaidExecution {&#xD;&#xA;            weight_limit: WeightLimit::Unlimited,&#xD;&#xA;            check_origin: None,&#xD;&#xA;        },&#xD;&#xA;        ReserveAssetDeposited(assets.clone().into()),&#xD;&#xA;    ]));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the below error from the logs&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Sep 06 09:38:38.920 DEBUG xcm::send_xcm: dest: MultiLocation { parents: 0, interior: X1(Parachain(2121)) }, message: Xcm([DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))])    &#xD;&#xA;Sep 06 09:38:38.922 DEBUG xcm::execute_xcm: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))]), weight_limit: Weight { ref_time: 18446744073709551615, proof_size: 18446744073709551615 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::weight: FixedWeightBounds message: Xcm([DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))])    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::execute_xcm_in_credit: origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))]), weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922  WARN xcm::barrier: Unexpected ReserveAssetDeposited from the Relay Chain    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::barriers: TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, instructions: [DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))], max_weight: Weight { ref_time: 3000000, proof_size: 3072 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::barriers: AllowKnownQueryResponses origin: MultiLocation { parents: 1, interior: Here }, instructions: [DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))], max_weight: Weight { ref_time: 3000000, proof_size: 3072 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::barriers: WithComputedOrigin origin: MultiLocation { parents: 1, interior: Here }, instructions: [DescendOrigin(X1(Plurality { id: Treasury, part: Voice })), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))], max_weight: Weight { ref_time: 3000000, proof_size: 3072 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::barriers: AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: X1(Plurality { id: Treasury, part: Voice }) }, instructions: [UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))], max_weight: Weight { ref_time: 3000000, proof_size: 3072 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::barriers: AllowExplicitUnpaidExecutionFrom origin: MultiLocation { parents: 1, interior: X1(Plurality { id: Treasury, part: Voice }) }, instructions: [UnpaidExecution { weight_limit: Unlimited, check_origin: None }, ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))], max_weight: Weight { ref_time: 3000000, proof_size: 3072 }, weight_credit: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.922 TRACE xcm::process: origin: Some(MultiLocation { parents: 1, interior: Here }), total_surplus/refunded: Weight { ref_time: 0, proof_size: 0 }/Weight { ref_time: 0, proof_size: 0 }, error_handler_weight: Weight { ref_time: 0, proof_size: 0 }    &#xD;&#xA;Sep 06 09:38:38.923 TRACE xcm::process_instruction: === DescendOrigin(X1(Plurality { id: Treasury, part: Voice }))    &#xD;&#xA;Sep 06 09:40:32.773 TRACE xcm::process_instruction: === UnpaidExecution { weight_limit: Unlimited, check_origin: None }    &#xD;&#xA;Sep 06 09:40:33.027 TRACE xcm::process_instruction: === ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000) }]))    &#xD;&#xA;Sep 06 09:40:33.241 TRACE xcm::execute: !!! ERROR: UntrustedReserveLocation    &#xD;&#xA;Sep 06 09:40:33.241 TRACE xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 2, xcm_error: UntrustedReserveLocation, weight: Weight { ref_time: 0, proof_size: 0 } })    &#xD;&#xA;Sep 06 09:40:33.241 TRACE xcm::execute_xcm_in_credit: Execution errored at 2: UntrustedReserveLocation (original_origin: MultiLocation { parents: 1, interior: Here })    &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;So tldr; can I send `Sep 06 10:43:08.280 TRACE xcm::execute_xcm_in_credit: Execution errored at 2: UntrustedReserveLocation (original_origin: MultiLocation { parents: 1, interior: Here })` which I think is because again this is not coming from the chain but rather through a gov body&#xD;&#xA;&#xD;&#xA;I do wonder if `DescendOrigin` can help but unfortunately, I cannot find documentation around that &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-fellows/runtimes/blob/main/relay/kusama/src/xcm_config.rs#L392&#xD;&#xA;  [2]: https://github.com/polkadot-fellows/runtimes/pull/19&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-executor/src/lib.rs#L620" ContentLicense="CC BY-SA 4.0" />
  <row Id="39086" PostHistoryTypeId="2" PostId="9854" RevisionGUID="2568e97a-6799-4eeb-b616-e9d32cf17bad" CreationDate="2023-09-06T10:38:10.170" UserId="3667" Text="A similar question exists here : https://substrate.stackexchange.com/questions/3455/emit-events-from-hooks-like-on-initialize&#xD;&#xA;&#xD;&#xA;If we are performing fallible operations on pallet hooks like `on_initialize` and let's say we want to notify the frontend (e.g. polkadot-js), is there a way to _emit_ errors in the same fashion as `Self::deposit_event`? " ContentLicense="CC BY-SA 4.0" />
  <row Id="39088" PostHistoryTypeId="1" PostId="9854" RevisionGUID="2568e97a-6799-4eeb-b616-e9d32cf17bad" CreationDate="2023-09-06T10:38:10.170" UserId="3667" Text="Emitting errors from hooks like on_initialize()" ContentLicense="CC BY-SA 4.0" />
  <row Id="39089" PostHistoryTypeId="3" PostId="9854" RevisionGUID="2568e97a-6799-4eeb-b616-e9d32cf17bad" CreationDate="2023-09-06T10:38:10.170" UserId="3667" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39090" PostHistoryTypeId="2" PostId="9855" RevisionGUID="aebc91c1-ae9a-4318-8bab-526c5e20a3d5" CreationDate="2023-09-06T10:40:46.293" UserId="251" Text="I believe that is not the correct approach to design.&#xD;&#xA;&#xD;&#xA;However, you are able to deposit an event called `XXXError(error_info)` in the `on_initialize` function." ContentLicense="CC BY-SA 4.0" />
  <row Id="39092" PostHistoryTypeId="2" PostId="9856" RevisionGUID="f8b36365-f7c9-475e-8778-2c6e346b5e38" CreationDate="2023-09-06T11:45:00.243" UserId="94" Text="`on_initialize` must be infallible by definition.  &#xD;&#xA;Yes you can use Events to emit progress of failure from inside there. I dont think its hacky; the Scheduler does this when its unable to find a preimage. The MessageQueue pallet also does this while processing messages.  &#xD;&#xA;There is no other way to emit information here though." ContentLicense="CC BY-SA 4.0" />
  <row Id="39094" PostHistoryTypeId="34" PostId="9824" RevisionGUID="5b2e2fa5-f2e9-492c-8bf3-3ef4a3a83dec" CreationDate="2023-09-06T12:13:59.573" UserId="3" Comment="33" />
  <row Id="39095" PostHistoryTypeId="5" PostId="9794" RevisionGUID="8dd9e530-91ca-41fe-b7ef-108e47afd19f" CreationDate="2023-09-06T12:17:34.327" UserId="3136" Comment="correct the format of title and change in body" Text="I tried to add Chain bridge and example to our existing substrate `relay-chain`, but I got an error during this import &#xD;&#xA;&#xD;&#xA;&gt; (use sp_io::hashing::blake2_128;)&#xD;&#xA;&#xD;&#xA;Please let me know how to add this import . I have also attached a screenshot to this post. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks in advance.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/kp6Dm.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="39096" PostHistoryTypeId="4" PostId="9794" RevisionGUID="8dd9e530-91ca-41fe-b7ef-108e47afd19f" CreationDate="2023-09-06T12:17:34.327" UserId="3136" Comment="correct the format of title and change in body" Text="Chainbridge-added in substrate-relaychain" ContentLicense="CC BY-SA 4.0" />
  <row Id="39097" PostHistoryTypeId="24" PostId="9794" RevisionGUID="8dd9e530-91ca-41fe-b7ef-108e47afd19f" CreationDate="2023-09-06T12:17:34.327" Comment="Proposed by 3136 approved by 94, 18 edit id of 542" ContentLicense="CC BY-SA 4.0" />
  <row Id="39098" PostHistoryTypeId="2" PostId="9857" RevisionGUID="5f2a0f3d-068b-417f-bcd2-e9815d3fc401" CreationDate="2023-09-06T12:50:22.110" UserId="251" Text="The performance is the most important aspect here.&#xD;&#xA;&#xD;&#xA;`Storage::get(i)` reads/decodes only the `i`th item from DB.&#xD;&#xA;&#xD;&#xA;`Stgorage::get().iter().nth(i)` reads/decodes the entire storage item from DB and then indexes to `i`.&#xD;&#xA;&#xD;&#xA;And the same theory applies to writing/encoding." ContentLicense="CC BY-SA 4.0" />
  <row Id="39100" PostHistoryTypeId="2" PostId="9858" RevisionGUID="f318ba54-e17f-4e68-81bf-3932046cc44a" CreationDate="2023-09-06T12:51:25.213" UserId="3955" Text="Note that `AppCrypto` trait has [const ID: KeyTypeId][1] which determines which keys will be filtered when using [LocalKeystore::key_pair][2]. Since you're using `sp_application_crypto::sr25519::AppPair`, [which doesn't use key_types::ACCOUNT][3], `LocalKeystore::key_pair` can't find your key - assuming your key is inserted to keystore with `key_types::ACCOUNT` key type.&#xD;&#xA;&#xD;&#xA;One solution is to construct appropriate `AppPair` using `app_crypto!` like so:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub mod my_mod {&#xD;&#xA;	use sp_application_crypto::{app_crypto, key_types::ACCOUNT};&#xD;&#xA;	use sp_core::sr25519;&#xD;&#xA;&#xD;&#xA;	app_crypto!(sr25519, ACCOUNT);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then use it to get your private-public pair:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let pair = local_key_store.key_pair::&lt;my_mod::Pair&gt;(&amp;sr25519_public);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sp-application-crypto/24.0.0/sp_application_crypto/trait.AppCrypto.html&#xD;&#xA;  [2]: https://docs.rs/sc-keystore/latest/sc_keystore/struct.LocalKeystore.html#method.key_pair&#xD;&#xA;  [3]: https://docs.rs/sp-application-crypto/latest/sp_application_crypto/sr25519/struct.AppPair.html#associatedconstant.ID" ContentLicense="CC BY-SA 4.0" />
  <row Id="39102" PostHistoryTypeId="5" PostId="9850" RevisionGUID="2400f746-3dba-4149-b84d-6c8e06eac9cc" CreationDate="2023-09-06T12:53:00.277" UserId="251" Comment="added 5 characters in body" Text="Check https://github.com/paritytech/polkadot-sdk/commit/5e7b27e98c0b9dacd4b6f0724fd6335106d94101.&#xD;&#xA;&#xD;&#xA;Now, you should use `BlockNumberFor&lt;T&gt;` directly. Because you have already imported it with `use frame_system::pallet_prelude::*;`." ContentLicense="CC BY-SA 4.0" />
  <row Id="39103" PostHistoryTypeId="5" PostId="9855" RevisionGUID="3277826b-674c-44a6-93f7-c1f7acff9fcf" CreationDate="2023-09-06T14:21:52.780" UserId="251" Comment="added 86 characters in body" Text="I believe that is not the correct approach to design. Consider whether it's really necessary to include it in the `on_initialize` function.&#xD;&#xA;&#xD;&#xA;However, you are able to deposit an event called `XXXError(error_info)` in the `on_initialize` function." ContentLicense="CC BY-SA 4.0" />
  <row Id="39104" PostHistoryTypeId="2" PostId="9859" RevisionGUID="fbf44204-1635-4c66-8e66-a854e37f2689" CreationDate="2023-09-06T15:46:28.527" UserId="4081" Text="I have to send thousands of transactions to a custom substrate chain, it will probably take a few days to process all of them. Of course I can't just send all the transactions at once because they probably won't fit in the transaction pool and also if I am overwhelming the tx-pool there's a chance that some of the transactions are dropped from the pool which (considering the high volume of transactions to process) would not be easy to handle.&#xD;&#xA;&#xD;&#xA;The extrinsic that I will be executing this many timesis pretty simple, in only stores data and emits an event&#xD;&#xA;&#xD;&#xA;What would be a good approach to managing the amount of transactions to send to the transaction pool at a certain point and what considerations should I take into account? " ContentLicense="CC BY-SA 4.0" />
  <row Id="39106" PostHistoryTypeId="1" PostId="9859" RevisionGUID="fbf44204-1635-4c66-8e66-a854e37f2689" CreationDate="2023-09-06T15:46:28.527" UserId="4081" Text="Transaction pool management" ContentLicense="CC BY-SA 4.0" />
  <row Id="39107" PostHistoryTypeId="3" PostId="9859" RevisionGUID="fbf44204-1635-4c66-8e66-a854e37f2689" CreationDate="2023-09-06T15:46:28.527" UserId="4081" Text="|polkadot-js|weight|transaction-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39108" PostHistoryTypeId="5" PostId="9859" RevisionGUID="1aead80d-8d88-46f6-b5d1-ac3d1d2d4cff" CreationDate="2023-09-06T15:51:34.640" UserId="4081" Comment="added 1 character in body" Text="I have to send thousands of transactions to a custom substrate chain, it will probably take a few days to process all of them. Of course I can't just send all the transactions at once because they probably won't fit in the transaction pool and also if I am overwhelming the tx-pool there's a chance that some of the transactions are dropped from the pool which (considering the high volume of transactions to process) would not be easy to handle.&#xD;&#xA;&#xD;&#xA;The extrinsic that I will be executing this many times is pretty simple, in only stores data and emits an event&#xD;&#xA;&#xD;&#xA;What would be a good approach to managing the amount of transactions to send to the transaction pool at a certain point and what considerations should I take into account? " ContentLicense="CC BY-SA 4.0" />
  <row Id="39109" PostHistoryTypeId="2" PostId="9860" RevisionGUID="71d5e5ea-6db4-484c-98c3-b8884a263492" CreationDate="2023-09-06T16:15:15.587" UserId="14" Text="You can set `--pool-kbytes` and `--pool-limit` in your node, to allow it to not drop some extrinsics.&#xD;&#xA;&#xD;&#xA;But better than that I'd recommend you to keep track of the txpool size by calling the RPC method `author_pendingExtrinsics`.&#xD;&#xA;&#xD;&#xA;That way you will be able to stop sending more extinsics when the txpool is full (or near to that), waiting for some time and then start sending them again.&#xD;&#xA;&#xD;&#xA;PS: [evm-tps][1] has a `yarn substrate` part where we use that approach.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/evm-tps" ContentLicense="CC BY-SA 4.0" />
  <row Id="39111" PostHistoryTypeId="2" PostId="9861" RevisionGUID="fe0bf774-a060-48c1-ac55-c9d81ce22838" CreationDate="2023-09-06T23:56:10.447" UserId="3407" Text="I regularly see `serde` implemented for various structs across the substrate ecosystem, usually in the single-liner form below. Why is that gated behind the std feature? In serde's [documentation](https://serde.rs/no-std.html), it's clear that there is full support for a `no-std` environment, including derivations. What's the reason for gating it behind the `std` feature? Is it only for binary size / WASM blob size reasons?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(Serialize, Deserialize))]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39113" PostHistoryTypeId="1" PostId="9861" RevisionGUID="fe0bf774-a060-48c1-ac55-c9d81ce22838" CreationDate="2023-09-06T23:56:10.447" UserId="3407" Text="Why is serde always std-gated in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39114" PostHistoryTypeId="3" PostId="9861" RevisionGUID="fe0bf774-a060-48c1-ac55-c9d81ce22838" CreationDate="2023-09-06T23:56:10.447" UserId="3407" Text="|wasm|no-std|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39115" PostHistoryTypeId="2" PostId="9862" RevisionGUID="a2a307de-663b-408f-bc9f-12eb67f2ccf8" CreationDate="2023-09-07T00:52:47.160" UserId="28" Text="First, we need to acknowledge the `std` feature flag in Substrate is very imperfect. It represents both a separation of `std` from `no_std`, but it also USUALLY implies `wasm`. It has been noted before that with hindsight, we would have explicitly made a `wasm` or `runtime` feature flag, rather than jumping on top of `no_std`. That being said, wherever `no_std` shows up, we must pretty much assume it is Wasm.&#xD;&#xA;&#xD;&#xA;Going back to the question, AFAIK it is very much about both the Wasm size, and the fact that `serde` itself should never really leak into the runtime.&#xD;&#xA;&#xD;&#xA;The runtime should only need to speak in SCALE.&#xD;&#xA;&#xD;&#xA;`serde` is only used in specific situations on the client side, for example to parse JSON for the `genesis_config` / `chain_spec`. This can leak into the runtime, where some runtime struct is getting exposed to the client and through some non-SCALE interface, and therefore a struct would need to implement `serde::{Serialize, Deserialize}`, feature gated by `std`.&#xD;&#xA;&#xD;&#xA;That being said, you could bring in `serde` with `no_std` into your runtime / pallet if you wanted. For example, if you explicitly wanted to parse a JSON file through an extrinsic, this should all be doable, however this is probably not even the best option. There are libraries like [`lite-json`](https://github.com/xlc/lite-json) written by our community to be extremely lightweight in the runtime, or even better use SCALE in the first place.&#xD;&#xA;&#xD;&#xA;So in summary, yes Wasm blob size is one reason, but perhaps even more concretely, there shouldn't be need for `serde` in the runtime, as you have `SCALE`, therefore, we always feature gate it." ContentLicense="CC BY-SA 4.0" />
  <row Id="39117" PostHistoryTypeId="50" PostId="7319" RevisionGUID="1a446f98-e015-439c-8ab6-8a1a2ff6887a" CreationDate="2023-09-07T01:05:10.617" UserId="-1" />
  <row Id="39118" PostHistoryTypeId="2" PostId="9863" RevisionGUID="4c175aef-fd0a-4bd3-bfc4-74ab02db5c45" CreationDate="2023-09-07T01:14:39.837" UserId="4032" Text="Is it possible to determine all of the IP addresses of validators on the network? I imagine it is necessary to be able to, but is there a direct call that can be made to a running validator node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39120" PostHistoryTypeId="1" PostId="9863" RevisionGUID="4c175aef-fd0a-4bd3-bfc4-74ab02db5c45" CreationDate="2023-09-07T01:14:39.837" UserId="4032" Text="Extrapolate IP addresses of all validators" ContentLicense="CC BY-SA 4.0" />
  <row Id="39121" PostHistoryTypeId="3" PostId="9863" RevisionGUID="4c175aef-fd0a-4bd3-bfc4-74ab02db5c45" CreationDate="2023-09-07T01:14:39.837" UserId="4032" Text="|polkadot|kusama|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39122" PostHistoryTypeId="2" PostId="9864" RevisionGUID="2f559740-09e2-48f7-9978-5a6296dbc259" CreationDate="2023-09-07T03:52:49.240" UserId="427" Text="In a pallet I have used set_lock() with a own LockIdentifier for that pallet. Now I need to check the locked balance of an account with that LockIdentifier and not the global locked amount. how to do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39124" PostHistoryTypeId="1" PostId="9864" RevisionGUID="2f559740-09e2-48f7-9978-5a6296dbc259" CreationDate="2023-09-07T03:52:49.240" UserId="427" Text="How to get Locked Balance of a particular account with a particular LockIdentifier in a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39125" PostHistoryTypeId="3" PostId="9864" RevisionGUID="2f559740-09e2-48f7-9978-5a6296dbc259" CreationDate="2023-09-07T03:52:49.240" UserId="427" Text="|balances|lockable-currency|locked-balance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39126" PostHistoryTypeId="5" PostId="9864" RevisionGUID="cd8bd618-3d4c-4906-b65b-52a0d2c15fc0" CreationDate="2023-09-07T04:50:57.583" UserId="354" Comment="improved formatting" Text="In a pallet I have used `set_lock()` with a own `LockIdentifier` for that pallet. Now I need to check the locked balance of an account with that `LockIdentifier` and not the global locked amount. how to do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39127" PostHistoryTypeId="24" PostId="9864" RevisionGUID="cd8bd618-3d4c-4906-b65b-52a0d2c15fc0" CreationDate="2023-09-07T04:50:57.583" Comment="Proposed by 354 approved by 427 edit id of 548" ContentLicense="CC BY-SA 4.0" />
  <row Id="39129" PostHistoryTypeId="5" PostId="9835" RevisionGUID="651a88f7-e4ec-45e8-9709-dcc36ee8b6e7" CreationDate="2023-09-07T05:33:40.463" UserId="3136" Comment="correct the format of title and change in body" Text="I rewrote some examples of transfer assets from `rococo` to some `parachains` like `mangata`, `rockmine`, `dali`.... on the blockcoder repository at &lt;https://github.com/blockcodes/xcm-sdk&gt;&#xD;&#xA;I don't know how to get addresses like: `rockmine, rococo, mangata` account addresses to check for my purpose transfer?&#xD;&#xA;```&#xD;&#xA;const beneficiaryValue = &quot;&lt;rockmine account address&gt;&quot; ???? // account address&#xD;&#xA;export const rococoExampleUtils = {&#xD;&#xA;    rococoRpc: 'wss://rococo-rpc.polkadot.io',&#xD;&#xA;    rockMineRpc: 'wss://rococo-rockmine-rpc.polkadot.io',&#xD;&#xA;    rockMineParachainId: 1000,&#xD;&#xA;    mangataParachainId: 2110,&#xD;&#xA;    daliParachainId: 2087,&#xD;&#xA;    senderMnemonic: '???', &#xD;&#xA;    rockmineDestinationAccount: '???',&#xD;&#xA;    daliDestinationAccount: '???',&#xD;&#xA;    rococoDestinationAccount: '???',&#xD;&#xA;    mangataDestinationAccount: '???',&#xD;&#xA;    rocAmount: 500000000000, // 0.5 ROC&#xD;&#xA;  }&#xD;&#xA;  ```&#xD;&#xA;Thank you for your help. " ContentLicense="CC BY-SA 4.0" />
  <row Id="39130" PostHistoryTypeId="4" PostId="9835" RevisionGUID="651a88f7-e4ec-45e8-9709-dcc36ee8b6e7" CreationDate="2023-09-07T05:33:40.463" UserId="3136" Comment="correct the format of title and change in body" Text="XCM Transfer | How to get account addresses of rococo, mangata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39131" PostHistoryTypeId="24" PostId="9835" RevisionGUID="651a88f7-e4ec-45e8-9709-dcc36ee8b6e7" CreationDate="2023-09-07T05:33:40.463" Comment="Proposed by 3136 approved by 4062 edit id of 546" ContentLicense="CC BY-SA 4.0" />
  <row Id="39132" PostHistoryTypeId="2" PostId="9865" RevisionGUID="024107de-5581-471b-be56-a7bea483ab5f" CreationDate="2023-09-07T06:52:04.250" UserId="2762" Text="You have to query the [lock balance][1] in the pallet_balances. On there you can see the identifier of the lock.&#xD;&#xA;&#xD;&#xA;Query this storage ([see code][2]):&#xD;&#xA;```rs&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn locks)]&#xD;&#xA;	pub type Locks&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		WeakBoundedVec&lt;BalanceLock&lt;T::Balance&gt;, T::MaxLocks&gt;,&#xD;&#xA;		ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;```&#xD;&#xA;And there you can filter using the `LockIdentifier` that you want with the field id.&#xD;&#xA;```rs&#xD;&#xA;/// A single lock on a balance. There can be many of these on an account and they &quot;overlap&quot;, so the&#xD;&#xA;/// same balance is frozen by multiple locks.&#xD;&#xA;#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct BalanceLock&lt;Balance&gt; {&#xD;&#xA;	/// An identifier for this lock. Only one lock may be in existence for each identifier.&#xD;&#xA;	pub id: LockIdentifier,&#xD;&#xA;	/// The amount which the free balance may not drop below when this lock is in effect.&#xD;&#xA;	pub amount: Balance,&#xD;&#xA;	/// If true, then the lock remains in effect even for payment of transaction fees.&#xD;&#xA;	pub reasons: Reasons,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage/#locksaccountid32-vecpalletbalancesbalancelock&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/balances/src/lib.rs#L449" ContentLicense="CC BY-SA 4.0" />
  <row Id="39136" PostHistoryTypeId="2" PostId="9867" RevisionGUID="6582c14f-898a-433e-be78-48f735d6f8a9" CreationDate="2023-09-07T07:48:02.340" UserId="2586" Text="I am using subxt to get the block details, including the block number, hash, parent hash, timestamp, events and the extrinsics.&#xD;&#xA;&#xD;&#xA;I am able to find most details, except the timestamp. Is there a way to get the block inclusion time? &#xD;&#xA;&#xD;&#xA;Following is how I get the block details.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Is it possible to get the block timestamp using the subxt?&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0xmgH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39138" PostHistoryTypeId="1" PostId="9867" RevisionGUID="6582c14f-898a-433e-be78-48f735d6f8a9" CreationDate="2023-09-07T07:48:02.340" UserId="2586" Text="Get the block timestamp using subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="39139" PostHistoryTypeId="3" PostId="9867" RevisionGUID="6582c14f-898a-433e-be78-48f735d6f8a9" CreationDate="2023-09-07T07:48:02.340" UserId="2586" Text="|rust|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39140" PostHistoryTypeId="52" PostId="9861" RevisionGUID="f9832a24-4913-4099-9e3c-988764e793f4" CreationDate="2023-09-07T07:56:20.920" />
  <row Id="39141" PostHistoryTypeId="2" PostId="9868" RevisionGUID="04d92430-9b28-41d7-ada3-380f5c249205" CreationDate="2023-09-07T08:06:59.497" UserId="3546" Text="You can use [`authority-discovery`][1] to get the current and next set of authorities but I'm not aware of any direct calls that you can make to fetch the IP addresses of validators.&#xD;&#xA;&#xD;&#xA;The look-up yields a `Vec&lt;Multiaddr&gt;` which contains the addresses the authority can be reached at.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/authority-discovery" ContentLicense="CC BY-SA 4.0" />
  <row Id="39143" PostHistoryTypeId="2" PostId="9869" RevisionGUID="5d4d84a9-bf16-4058-a120-9d05122a3933" CreationDate="2023-09-07T08:11:15.330" UserId="251" Text="Timestamp is an item stored in storage.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/91deee7a1dba52e5e73d1a97d9fd5b8ad1e916a4/substrate/frame/timestamp/src/lib.rs#L156-L159C13&#xD;&#xA;&#xD;&#xA;Simply retrieve it from storage.&#xD;&#xA;&#xD;&#xA;Follow this [example](https://github.com/paritytech/subxt/blob/master/subxt/examples/storage_fetch.rs) and replace `system().account()` with `timestamp().now()`." ContentLicense="CC BY-SA 4.0" />
  <row Id="39145" PostHistoryTypeId="50" PostId="7990" RevisionGUID="05373444-ee11-49a1-a067-3627be46c4ea" CreationDate="2023-09-07T09:06:40.810" UserId="-1" />
  <row Id="39146" PostHistoryTypeId="2" PostId="9870" RevisionGUID="fb88584b-18fd-4b6d-8bbe-bfca74647a0b" CreationDate="2023-09-07T09:57:27.807" UserId="2844" Text="When building my parachain, I run into the error:&#xD;&#xA;&#xD;&#xA;    error[E0277]: the trait bound `parity_scale_codec::Compact&lt;sp_runtime::Perbill&gt;: parity_scale_codec::MaxEncodedLen` is not satisfied&#xD;&#xA;       --&gt; /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/frame/staking/src/lib.rs:412:18&#xD;&#xA;        |&#xD;&#xA;    412 |     pub commission: Perbill,&#xD;&#xA;        |                     ^^^^^^^ the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `parity_scale_codec::Compact&lt;sp_runtime::Perbill&gt;`&#xD;&#xA;        |&#xD;&#xA;        = help: the following other types implement trait `parity_scale_codec::MaxEncodedLen`:&#xD;&#xA;                  parity_scale_codec::Compact&lt;u8&gt;&#xD;&#xA;                  parity_scale_codec::Compact&lt;u16&gt;&#xD;&#xA;                  parity_scale_codec::Compact&lt;u32&gt;&#xD;&#xA;                  parity_scale_codec::Compact&lt;u64&gt;&#xD;&#xA;                  parity_scale_codec::Compact&lt;u128&gt;&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `parity_scale_codec::Compact&lt;Balance&gt;: parity_scale_codec::MaxEncodedLen` is not satisfied&#xD;&#xA;       --&gt; /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/frame/staking/src/lib.rs:424:9&#xD;&#xA;        |&#xD;&#xA;    424 |     value: Balance,&#xD;&#xA;        |            ^^^^^^^ the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `parity_scale_codec::Compact&lt;Balance&gt;`&#xD;&#xA;        |&#xD;&#xA;    help: consider extending the `where` clause, but there might be an alternative better way to express this requirement&#xD;&#xA;        |&#xD;&#xA;    420 | #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen, parity_scale_codec::Compact&lt;Balance&gt;: parity_scale_codec::MaxEncodedLen)]&#xD;&#xA;        |                                                                                     +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `parity_scale_codec::Compact&lt;&lt;T as pallet::pallet::Config&gt;::CurrencyBalance&gt;: parity_scale_codec::MaxEncodedLen` is not satisfied&#xD;&#xA;       --&gt; /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/frame/staking/src/lib.rs:448:13&#xD;&#xA;        |&#xD;&#xA;    448 |     pub total: BalanceOf&lt;T&gt;,&#xD;&#xA;        |                ^^^^^^^^^ the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `parity_scale_codec::Compact&lt;&lt;T as pallet::pallet::Config&gt;::CurrencyBalance&gt;`&#xD;&#xA;        |&#xD;&#xA;    help: consider extending the `where` clause, but there might be an alternative better way to express this requirement&#xD;&#xA;        |&#xD;&#xA;    439 |     MaxEncodedLen, parity_scale_codec::Compact&lt;&lt;T as pallet::pallet::Config&gt;::CurrencyBalance&gt;: parity_scale_codec::MaxEncodedLen,&#xD;&#xA;        |                  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xD;&#xA;    &#xD;&#xA;    error[E0277]: the trait bound `parity_scale_codec::Compact&lt;&lt;T as pallet::pallet::Config&gt;::CurrencyBalance&gt;: parity_scale_codec::MaxEncodedLen` is not satisfied&#xD;&#xA;       --&gt; /Users/ganesholi/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/frame/staking/src/lib.rs:452:14&#xD;&#xA;        |&#xD;&#xA;    452 |     pub active: BalanceOf&lt;T&gt;,&#xD;&#xA;        |                 ^^^^^^^^^ the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `parity_scale_codec::Compact&lt;&lt;T as pallet::pallet::Config&gt;::CurrencyBalance&gt;`&#xD;&#xA;        |&#xD;&#xA;    help: consider extending the `where` clause, but there might be an alternative better way to express this requirement&#xD;&#xA;        |&#xD;&#xA;    439 |     MaxEncodedLen, parity_scale_codec::Compact&lt;&lt;T as pallet::pallet::Config&gt;::CurrencyBalance&gt;: parity_scale_codec::MaxEncodedLen,&#xD;&#xA;        |                  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;    error: could not compile `pallet-staking` (lib) due to 4 previous errors&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % &#xD;&#xA;&#xD;&#xA;How do I resolve this issue?&#xD;&#xA;This is [github](https://github.com/ganesh1233456/xcav-parachain/tree/fixing-staking-pallet-issue) code repo." ContentLicense="CC BY-SA 4.0" />
  <row Id="39148" PostHistoryTypeId="1" PostId="9870" RevisionGUID="fb88584b-18fd-4b6d-8bbe-bfca74647a0b" CreationDate="2023-09-07T09:57:27.807" UserId="2844" Text="How to fix the trait `parity_scale_codec::MaxEncodedLen` is not implemented for `parity_scale_codec::Compact&lt;sp_runtime::Perbill&gt;`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39149" PostHistoryTypeId="3" PostId="9870" RevisionGUID="fb88584b-18fd-4b6d-8bbe-bfca74647a0b" CreationDate="2023-09-07T09:57:27.807" UserId="2844" Text="|substrate-parachain-template|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39150" PostHistoryTypeId="2" PostId="9871" RevisionGUID="df94c223-b7f5-4f5f-9eca-fc230d77aa5c" CreationDate="2023-09-07T11:24:48.077" UserId="4062" Text="I'm looking for a way to charge for xcm message. (I know this topic has been discussed a lot, but I still haven't found my own answer, and haven't written a script to test, so I want to open this discussion further ^.^).&#xD;&#xA;As far as I know, charging for xcm messages has two steps.&#xD;&#xA;Step 1: Calculate the total weight for all instructions that xcm uses. Here is the formula I found:&#xD;&#xA;```&#xD;&#xA;weight = base_weight + (num_assets * weight_per_asset) + (asset_id.len() * weight_per_byte)&#xD;&#xA;```&#xD;&#xA;Step 2: Calculate fee from the weight given in step 1.&#xD;&#xA;  I found the following code:&#xD;&#xA;```&#xD;&#xA;pub fn estimate_fee_for_weight(weight: Weight) -&gt; u128 {&#xD;&#xA;let (_, units_per_second, units_per_mb) = TokensPerSecondPerMegabyte::get();&#xD;&#xA;&#xD;&#xA;units_per_second * (weight.ref_time() as u128) / (WEIGHT_REF_TIME_PER_SECOND as u128)&#xD;&#xA;units_per_mb * (weight.proof_size() as u128) / (WEIGHT_PROOF_SIZE_PER_MB as u128)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;So let me ask:&#xD;&#xA; 1. How is the value of unit_per_second and units_per_mb calculated?&#xD;&#xA; 2. It seems that Weight is the common unit of all tokens (Dot, Kusama, Moonbeam, ...) so with different tokens, how to convert weight to a token like it? That is, how will weight to dot differ from weight to KSM? how to calculate?&#xD;&#xA; 3. How to determine the weight limit in xcm?&#xD;&#xA; 4. How can I find the base_weight of all instructions?&#xD;&#xA;&#xD;&#xA;Thank you for your help.&#xD;&#xA;Some reference I found: &lt;https://github.com/paritytech/xcm-docs.git&gt;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39152" PostHistoryTypeId="1" PostId="9871" RevisionGUID="df94c223-b7f5-4f5f-9eca-fc230d77aa5c" CreationDate="2023-09-07T11:24:48.077" UserId="4062" Text="How to calculate fee xcm message at source chain and destination chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39153" PostHistoryTypeId="3" PostId="9871" RevisionGUID="df94c223-b7f5-4f5f-9eca-fc230d77aa5c" CreationDate="2023-09-07T11:24:48.077" UserId="4062" Text="|xcm|xcmp|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39154" PostHistoryTypeId="2" PostId="9872" RevisionGUID="30c56c84-acfd-42d6-9ecf-c780a406bd26" CreationDate="2023-09-07T12:08:00.520" UserId="4627" Text="I have a substrate blockchain that was working fine for several months with 4 validator nodes.&#xD;&#xA;Then, it was down for 1 month, and when I restarted it, everything seemed to work fine, blocks being produce again, etc.&#xD;&#xA;&#xD;&#xA;BUT the blocks where not finalized. I know this is a problem in the long term. I have tried to restart the nodes, to remove and add again some validator nodes. But the blocks are still not finalized.&#xD;&#xA;&#xD;&#xA;Here is a link to one of the nodes: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-teranyina.centreeasy.com#/explorer&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39156" PostHistoryTypeId="1" PostId="9872" RevisionGUID="30c56c84-acfd-42d6-9ecf-c780a406bd26" CreationDate="2023-09-07T12:08:00.520" UserId="4627" Text="Blocks have stopped finalizing" ContentLicense="CC BY-SA 4.0" />
  <row Id="39157" PostHistoryTypeId="3" PostId="9872" RevisionGUID="30c56c84-acfd-42d6-9ecf-c780a406bd26" CreationDate="2023-09-07T12:08:00.520" UserId="4627" Text="|substrate-node-template|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39158" PostHistoryTypeId="2" PostId="9873" RevisionGUID="dcfa4de6-507e-418e-86ee-3a0ab18394ed" CreationDate="2023-09-07T12:08:57.810" UserId="94" Text="There has be a but in the recently released SCALE version `3.6.6` and it has been yanked since.  &#xD;&#xA;Please fix the version to one earlier like this: `=3.6.5`. Just using `3.0.0` could have pulled in the faulty version." ContentLicense="CC BY-SA 4.0" />
  <row Id="39160" PostHistoryTypeId="2" PostId="9874" RevisionGUID="656eb255-4720-45d5-98e1-86a738f55bdc" CreationDate="2023-09-07T12:13:29.793" UserId="4625" Text="We setup polkadot parachain node for asset and node frequently halted for and again start syncing.&#xD;&#xA;&#xD;&#xA;Dockr image - parity/polkadot-parachain:latest (docker hub)&#xD;&#xA;here is the docker compose file&#xD;&#xA;&#xD;&#xA;version: “3.7”&#xD;&#xA;services:&#xD;&#xA;node:&#xD;&#xA;image: parity/polkadot-parachain:latest&#xD;&#xA;restart: on-failure&#xD;&#xA;ports:&#xD;&#xA;- “9944:9944”&#xD;&#xA;- “30333:30333”&#xD;&#xA;- “2332:9933”&#xD;&#xA;volumes:&#xD;&#xA;- /localdir/parity:/parity&#xD;&#xA;container_name: polkadot-parachain&#xD;&#xA;mem_limit: 2g&#xD;&#xA;command:&#xD;&#xA;–prometheus-external&#xD;&#xA;–chain=‘statemint’&#xD;&#xA;–rpc-port 9933&#xD;&#xA;–rpc-cors all&#xD;&#xA;–rpc-external&#xD;&#xA;–pruning&#xD;&#xA;archive&#xD;&#xA;&#xD;&#xA;Node logs&#xD;&#xA;&#xD;&#xA;2023-09-06 18:05:46 Polkadot parachain ,&#xD;&#xA;2023-09-06 18:05:46 :v: version 1.0.0-2306bfb7565 ,&#xD;&#xA;2023-09-06 18:05:46 :heart: by Parity Technologies admin@parity.io, 2017-2023 ,&#xD;&#xA;2023-09-06 18:05:46 :clipboard: Chain specification: Polkadot Asset Hub ,&#xD;&#xA;2023-09-06 18:05:46 :label: Node name: bored-children-6550 ,&#xD;&#xA;2023-09-06 18:05:46 :bust_in_silhouette: Role: FULL ,&#xD;&#xA;2023-09-06 18:05:46 :floppy_disk: Database: RocksDb at /parity/.local/share/polkadot-parachain/chains/asset-hub-polkadot/db/full ,&#xD;&#xA;2023-09-06 18:05:49 Parachain id: Id(1000) ,&#xD;&#xA;2023-09-06 18:05:49 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ ,&#xD;&#xA;2023-09-06 18:05:49 Is collating: no ,&#xD;&#xA;&#xD;&#xA;Thnaks&#xD;&#xA;Umang Awasthy" ContentLicense="CC BY-SA 4.0" />
  <row Id="39162" PostHistoryTypeId="1" PostId="9874" RevisionGUID="656eb255-4720-45d5-98e1-86a738f55bdc" CreationDate="2023-09-07T12:13:29.793" UserId="4625" Text="Parachain node frequently halted for and again start syncing" ContentLicense="CC BY-SA 4.0" />
  <row Id="39163" PostHistoryTypeId="3" PostId="9874" RevisionGUID="656eb255-4720-45d5-98e1-86a738f55bdc" CreationDate="2023-09-07T12:13:29.793" UserId="4625" Text="|polkadot|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39164" PostHistoryTypeId="2" PostId="9875" RevisionGUID="f261aa0a-6092-42a2-b1d5-92648298618c" CreationDate="2023-09-07T12:58:53.297" UserId="3002" Text="**Workaround**: Patching the dependency in the root `Cargo.toml` should solve the issue for now:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[patch.crates-io]&#xD;&#xA;parity-scale-codec = { git = &quot;https://github.com/paritytech/parity-scale-codec.git&quot;, tag = &quot;v3.6.5&quot;, features = [&quot;derive&quot;], default-features = false }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39166" PostHistoryTypeId="5" PostId="9873" RevisionGUID="f2a4dc8e-fb3b-4a30-a3d2-e01968aa0fb1" CreationDate="2023-09-07T13:06:12.713" UserId="94" Comment="edited body" Text="There has be a bug in the recently released SCALE version `3.6.6` and it has been yanked since.  &#xD;&#xA;Please fix the version to one earlier like this: `=3.6.5`. Just using `3.0.0` could have pulled in the faulty version." ContentLicense="CC BY-SA 4.0" />
  <row Id="39167" PostHistoryTypeId="5" PostId="9875" RevisionGUID="c252d0aa-f358-4647-88ac-2625df249e26" CreationDate="2023-09-07T13:08:17.287" UserId="3002" Comment="deleted 49 characters in body" Text="**Workaround**: Patching the dependency in the root `Cargo.toml` should solve the issue for now:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[patch.crates-io]&#xD;&#xA;parity-scale-codec = { git = &quot;https://github.com/paritytech/parity-scale-codec.git&quot;, tag = &quot;v3.6.5&quot; }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39168" PostHistoryTypeId="2" PostId="9876" RevisionGUID="1f4baac7-77c9-467a-a1d3-20e8c5d024f1" CreationDate="2023-09-07T13:47:35.180" UserId="4435" Text="I am trying to build a docker image for our substrate node.&#xD;&#xA;I used this one to do it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# This is an example build stage for the node template. Here we create the binary in a temporary image.&#xD;&#xA;&#xD;&#xA;# This is a base image to build substrate nodes&#xD;&#xA;FROM docker.io/paritytech/ci-linux:production as builder&#xD;&#xA;&#xD;&#xA;WORKDIR /node-template&#xD;&#xA;COPY . .&#xD;&#xA;RUN rm -rf /usr/local/rustup /usr/local/cargo &amp;&amp; \&#xD;&#xA;    curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none &amp;&amp; \&#xD;&#xA;    rustup show &amp;&amp; \&#xD;&#xA;    cargo build --release&#xD;&#xA;&#xD;&#xA;# This is the 2nd stage: a very small image where we copy the binary.&quot;&#xD;&#xA;FROM docker.io/library/ubuntu:22.04&#xD;&#xA;LABEL description=&quot;Multistage Docker image for Substrate Node Template&quot; \&#xD;&#xA;  image.type=&quot;builder&quot; \&#xD;&#xA;  image.authors=&quot;alan.ma.dapps@gmail.com&quot; \&#xD;&#xA;  image.vendor=&quot;Substrate Developer Hub&quot; \&#xD;&#xA;  image.description=&quot;Multistage Docker image for Substrate Node Template&quot; \&#xD;&#xA;  image.source=&quot;https://github.com/substrate-developer-hub/substrate-node-template&quot; \&#xD;&#xA;  image.documentation=&quot;https://github.com/substrate-developer-hub/substrate-node-template&quot;&#xD;&#xA;&#xD;&#xA;# Copy the node binary.&#xD;&#xA;COPY --from=builder /node-template/target/release/node-template /usr/local/bin&#xD;&#xA;&#xD;&#xA;RUN useradd -m -u 1000 -U -s /bin/sh -d /node-dev node-dev &amp;&amp; \&#xD;&#xA;  mkdir -p /chain-data /node-dev/.local/share &amp;&amp; \&#xD;&#xA;  chown -R node-dev:node-dev /chain-data &amp;&amp; \&#xD;&#xA;  ln -s /chain-data /node-dev/.local/share/node-template &amp;&amp; \&#xD;&#xA;  # unclutter and minimize the attack surface&#xD;&#xA;  rm -rf /usr/bin /usr/sbin &amp;&amp; \&#xD;&#xA;  # check if executable works in this container&#xD;&#xA;  /usr/local/bin/node-template --version&#xD;&#xA;&#xD;&#xA;USER node-dev&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944 9615&#xD;&#xA;VOLUME [&quot;/chain-data&quot;]&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/node-template&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I got the image successfully.&#xD;&#xA;So I run it using this command.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;docker run -it -p 9944:9944 wolfmorgan/substrate-node&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now I got `Running JSON-RPC server: addr=0.0.0.0:9944`, but I want to get `Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=[&quot;*&quot;]`&#xD;&#xA;&#xD;&#xA;How can I build a docker image to get this?&#xD;&#xA;Any advice would be appreciated.&#xD;&#xA;&#xD;&#xA;Thank you in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="39170" PostHistoryTypeId="1" PostId="9876" RevisionGUID="1f4baac7-77c9-467a-a1d3-20e8c5d024f1" CreationDate="2023-09-07T13:47:35.180" UserId="4435" Text="I want to get ws rpc url with the docker image for our substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="39171" PostHistoryTypeId="3" PostId="9876" RevisionGUID="1f4baac7-77c9-467a-a1d3-20e8c5d024f1" CreationDate="2023-09-07T13:47:35.180" UserId="4435" Text="|substrate-node-template|docker|wss|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39172" PostHistoryTypeId="4" PostId="9863" RevisionGUID="6d936c99-eac4-4ae1-8657-379129878b5f" CreationDate="2023-09-07T13:48:54.083" UserId="116" Comment="I think list is the word for what you are asking about here" Text="List IP addresses of all validators" ContentLicense="CC BY-SA 4.0" />
  <row Id="39173" PostHistoryTypeId="24" PostId="9863" RevisionGUID="6d936c99-eac4-4ae1-8657-379129878b5f" CreationDate="2023-09-07T13:48:54.083" Comment="Proposed by 116 approved by 251, 234 edit id of 547" ContentLicense="CC BY-SA 4.0" />
  <row Id="39174" PostHistoryTypeId="50" PostId="8859" RevisionGUID="d9400cf8-bee7-4b37-86f6-6656dc698fe4" CreationDate="2023-09-07T14:08:31.043" UserId="-1" />
  <row Id="39175" PostHistoryTypeId="5" PostId="9874" RevisionGUID="6cfbb868-dbe6-4b93-bf99-83d536c8363b" CreationDate="2023-09-07T15:25:33.773" UserId="2762" Comment="improve formatting" Text="We setup polkadot parachain node for asset and node frequently halted for and again start syncing.&#xD;&#xA;&#xD;&#xA;Dockr image - `parity/polkadot-parachain:latest` (docker hub)&#xD;&#xA;here is the docker compose file&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;version: “3.7”&#xD;&#xA;services:&#xD;&#xA;node:&#xD;&#xA;image: parity/polkadot-parachain:latest&#xD;&#xA;restart: on-failure&#xD;&#xA;ports:&#xD;&#xA;- “9944:9944”&#xD;&#xA;- “30333:30333”&#xD;&#xA;- “2332:9933”&#xD;&#xA;volumes:&#xD;&#xA;- /localdir/parity:/parity&#xD;&#xA;container_name: polkadot-parachain&#xD;&#xA;mem_limit: 2g&#xD;&#xA;command:&#xD;&#xA;–prometheus-external&#xD;&#xA;–chain=‘statemint’&#xD;&#xA;–rpc-port 9933&#xD;&#xA;–rpc-cors all&#xD;&#xA;–rpc-external&#xD;&#xA;–pruning&#xD;&#xA;archive&#xD;&#xA;```&#xD;&#xA;Node logs&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;2023-09-06 18:05:46 Polkadot parachain ,&#xD;&#xA;2023-09-06 18:05:46 :v: version 1.0.0-2306bfb7565 ,&#xD;&#xA;2023-09-06 18:05:46 :heart: by Parity Technologies admin@parity.io, 2017-2023 ,&#xD;&#xA;2023-09-06 18:05:46 :clipboard: Chain specification: Polkadot Asset Hub ,&#xD;&#xA;2023-09-06 18:05:46 :label: Node name: bored-children-6550 ,&#xD;&#xA;2023-09-06 18:05:46 :bust_in_silhouette: Role: FULL ,&#xD;&#xA;2023-09-06 18:05:46 :floppy_disk: Database: RocksDb at /parity/.local/share/polkadot-parachain/chains/asset-hub-polkadot/db/full ,&#xD;&#xA;2023-09-06 18:05:49 Parachain id: Id(1000) ,&#xD;&#xA;2023-09-06 18:05:49 Parachain Account: 5Ec4AhPZk8STuex8Wsi9TwDtJQxKqzPJRCH7348Xtcs9vZLJ ,&#xD;&#xA;2023-09-06 18:05:49 Is collating: no ,&#xD;&#xA;```&#xD;&#xA;Thnaks&#xD;&#xA;Umang Awasthy" ContentLicense="CC BY-SA 4.0" />
  <row Id="39176" PostHistoryTypeId="2" PostId="9877" RevisionGUID="19966ae0-dbaa-466d-a5c3-858004b94dcf" CreationDate="2023-09-07T16:44:44.320" UserId="3955" Text="Answering my own question:&#xD;&#xA;&#xD;&#xA;If you look at [substrate RPC interface][1], calls `author_submitExtrinsic` and `author_submitAndWatchExtrinsic` correspond to `submit_one` and `submit_and_watch` of [TransactionPool trait][2].&#xD;&#xA;&#xD;&#xA;So easiest way to submit extrinsics in outer node is to grab `TransactionPool` and utilize it for extrinsic submission.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/sc-rpc-api/latest/sc_rpc_api/author/trait.AuthorApiServer.html&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_transaction_pool_api/trait.TransactionPool.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="39178" PostHistoryTypeId="52" PostId="9870" RevisionGUID="e9f320be-a77d-4c73-b834-a328f32e6052" CreationDate="2023-09-07T18:00:13.503" />
  <row Id="39179" PostHistoryTypeId="2" PostId="9878" RevisionGUID="d24bffec-6c84-42b0-9445-cd225a8bdcf8" CreationDate="2023-09-07T20:06:44.947" UserId="2477" Text="Is it possible to create a ContractReference to perform a cross-contract call from ink::traid_definition?&#xD;&#xA;&#xD;&#xA;If it is how can I do so?&#xD;&#xA;&#xD;&#xA;If it is not, why it is not possible? It seems strange that we can only create a reference to the whole contract and not the a single trait the contract is implementing." ContentLicense="CC BY-SA 4.0" />
  <row Id="39181" PostHistoryTypeId="1" PostId="9878" RevisionGUID="d24bffec-6c84-42b0-9445-cd225a8bdcf8" CreationDate="2023-09-07T20:06:44.947" UserId="2477" Text="Deriving ContractReference from Ink::trait_definition" ContentLicense="CC BY-SA 4.0" />
  <row Id="39182" PostHistoryTypeId="3" PostId="9878" RevisionGUID="d24bffec-6c84-42b0-9445-cd225a8bdcf8" CreationDate="2023-09-07T20:06:44.947" UserId="2477" Text="|ink|rust|contracts|cross-contract-call|trait|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39183" PostHistoryTypeId="2" PostId="9879" RevisionGUID="e463048a-82f7-4183-beb2-b7d2b2630d41" CreationDate="2023-09-07T20:10:56.937" UserId="19" Text="I want to deliver some test where in part of the task is to create accounts and deposit them. I do it in the code below:&#xD;&#xA;&#xD;&#xA;	let account_id_bytes: [u8; 32] = [0u8; 32];&#xD;&#xA;	let account_id_1: AccountId32 = AccountId32::new(account_id_bytes);&#xD;&#xA;&#xD;&#xA;Now I want to fund `account_id_1` like:&#xD;&#xA;&#xD;&#xA;`Balances::force_set_balance(RuntimeOrigin::root(), account_id_1, 100).unwrap();`&#xD;&#xA;&#xD;&#xA;Function `force_set_balance` expects `u64`, but I have `AccountId32` type. How to fund the account right? My guess is that conversion `AccountId32` to `u64` is not the best approach. Appreciate any tips." ContentLicense="CC BY-SA 4.0" />
  <row Id="39185" PostHistoryTypeId="1" PostId="9879" RevisionGUID="e463048a-82f7-4183-beb2-b7d2b2630d41" CreationDate="2023-09-07T20:10:56.937" UserId="19" Text="How to fund AccountId32?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39186" PostHistoryTypeId="3" PostId="9879" RevisionGUID="e463048a-82f7-4183-beb2-b7d2b2630d41" CreationDate="2023-09-07T20:10:56.937" UserId="19" Text="|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39187" PostHistoryTypeId="2" PostId="9880" RevisionGUID="50075acd-d342-4625-9f73-afa92a98f806" CreationDate="2023-09-07T22:32:55.540" UserId="28" Text="You have to remember that the Substrate runtime is generic over many types, including the `AccountId`.&#xD;&#xA;&#xD;&#xA;&gt; Function force_set_balance expects `u64`&#xD;&#xA;&#xD;&#xA;If this is the case, then the context in which you are calling `force_set_balance` has been configured for `AccountId = u64`. This is usually the default configuration in tests, which is my guess where this is happening.&#xD;&#xA;&#xD;&#xA;You can adjust your configuration to make `AccountId = AccountId32` instead, and that will fix this problem.&#xD;&#xA;&#xD;&#xA;You can find an example of that in the Polkadot integration tests: https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/runtime/common/src/integration_tests.rs&#xD;&#xA;&#xD;&#xA;Here you can see:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_runtime::AccountId32;&#xD;&#xA;&#xD;&#xA;type AccountId = AccountId32;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This being used in the configuration for `frame_system`:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl frame_system::Config for Test {&#xD;&#xA;	type AccountId = AccountId;&#xD;&#xA;    // ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And some helpers to make generating unique `AccountId32` more easy:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn account_id(i: u32) -&gt; AccountId32 {&#xD;&#xA;	let b4 = i.encode();&#xD;&#xA;	let b32 = [&amp;b4[..], &amp;b4[..], &amp;b4[..], &amp;b4[..], &amp;b4[..], &amp;b4[..], &amp;b4[..], &amp;b4[..]].concat();&#xD;&#xA;	let array: [u8; 32] = b32.try_into().unwrap();&#xD;&#xA;	array.into()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn signed(i: u32) -&gt; RuntimeOrigin {&#xD;&#xA;	let account_id = account_id(i);&#xD;&#xA;	RuntimeOrigin::signed(account_id)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So ultimately, go and check your `frame_system` configuration and make sure your `AccountId` type is what you want and expect." ContentLicense="CC BY-SA 4.0" />
  <row Id="39189" PostHistoryTypeId="2" PostId="9881" RevisionGUID="45f6d99c-8433-4030-b480-bc33f73103bd" CreationDate="2023-09-08T01:30:42.817" UserId="251" Text="1. Which old pallets will be removed from the runtime?&#xD;&#xA;2. What migration will be carried out?&#xD;&#xA;3. Which new pallets need to be added to the runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39191" PostHistoryTypeId="1" PostId="9881" RevisionGUID="45f6d99c-8433-4030-b480-bc33f73103bd" CreationDate="2023-09-08T01:30:42.817" UserId="251" Text="What is the process for upgrading governance from v1 to v2?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39192" PostHistoryTypeId="3" PostId="9881" RevisionGUID="45f6d99c-8433-4030-b480-bc33f73103bd" CreationDate="2023-09-08T01:30:42.817" UserId="251" Text="|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39193" PostHistoryTypeId="5" PostId="9881" RevisionGUID="fab3f97d-1091-4719-ab69-f82906d71345" CreationDate="2023-09-08T02:29:59.493" UserId="251" Comment="added 64 characters in body" Text="1. Which old pallets will be removed from the runtime?&#xD;&#xA;2. What migration will be carried out?&#xD;&#xA;3. Which new pallets need to be added to the runtime?&#xD;&#xA;4. What other important things do we need? A fellowship group?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39194" PostHistoryTypeId="2" PostId="9882" RevisionGUID="ee718d42-f7e5-4123-a2d8-6aaf563b9a0c" CreationDate="2023-09-08T02:42:23.483" UserId="4628" Text="I have been running a testing network recently and they have encountered a very strange situation:&#xD;&#xA;1. the finalized has stopped at # 107379 and cannot be further confirmed.&#xD;&#xA;2. The logs of each consensus node are being printed:&#xD;&#xA;&#xD;&#xA;`Error importing block 0xb33e262e387c536589214e5c36f3aae1b69ad883ab79ec6408b428414249488f: block has an unknown parent` &#xD;&#xA;&#xD;&#xA;`Error importing block 0xaa6dedf30fb9a23b46cc0c470ae002d29b2e378bd07c2c2270b1f1958c7fb3c6: block has an unknown parent`&#xD;&#xA;&#xD;&#xA;But the block hash is different&#xD;&#xA;&#xD;&#xA;3. And printing this error:&#xD;&#xA;&#xD;&#xA;`Verification failed for block 0xf53adc0a702940fae69ea237c9946be1e6549f66ceded06be0b8651464e82444 received from peer: 12D3KooWMV4EUiWq74RNaWk3rLhbWZTf9sDGk3htgZmVSdKgTLaD, &quot;UnknownBlock: State already discarded for 0x80663f0ffcafa935fa605fe420385df0f7518de6b110b9cb164f26327aa8250b&quot;`&#xD;&#xA;&#xD;&#xA;Here are the logs of my three consensus nodes, They seem to have been unable to synchronize blocks before, and each one is out of blocks, and the best is also different:&#xD;&#xA;&#xD;&#xA;Consensus 1:&#xD;&#xA;&gt; 2023-09-08 10:08:15  Idle (40 peers), best: #107591 (0xbba3…3bc2), finalized #107379 &#xD;&#xA;&gt; (0x8121…4c3b),  901.7kiB/s  2.4MiB/s  &#xD;&#xA;&gt; 2023-09-08 10:08:20  Idle (40 peers), best: #107591 (0xbba3…3bc2), finalized #107379 &#xD;&#xA;&gt; (0x8121…4c3b),  937.7kiB/s  2.7MiB/s  &#xD;&#xA;&gt; 2023-09-08 10:08:24 Backing off claiming new slot for block authorship: finality is lagging.  &#xD;&#xA;&#xD;&#xA;Consensus 2:&#xD;&#xA;&gt; 2023-09-08 10:08:06  Pre-sealed block for proposal at 107592. Hash now 0x258807ab842841ff712860059fe2713b6d41880d38a8b9ea6d345dd3b176ce12, previously 0x005b096eb79e283b94d796a684aebce3354082bb7a5208308ebd053c6a97596e.    &#xD;&#xA;&gt; 2023-09-08 10:08:06  Imported #107592 (0x2588…ce12)    &#xD;&#xA;&gt; 2023-09-08 10:08:06 build valid transaction    &#xD;&#xA;&gt; 2023-09-08 10:08:09  Idle (40 peers), best: #107592 (0x2588…ce12), finalized #107379 (0x8121…4c3b),  1.3MiB/s  2.5MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:14  Idle (40 peers), best: #107592 (0x2588…ce12), finalized #107379 (0x8121…4c3b),  1.4MiB/s  2.3MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:18 Backing off claiming new slot for block authorship: finality is lagging.    &#xD;&#xA;&gt; 2023-09-08 10:08:19  Idle (40 peers), best: #107592 (0x2588…ce12), finalized #107379 (0x8121…4c3b),  1.0MiB/s  2.6MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:24  Idle (40 peers), best: #107592 (0x2588…ce12), finalized #107379 (0x8121…4c3b),  991.6kiB/s  2.5MiB/s  &#xD;&#xA;&#xD;&#xA;Consensus 3:&#xD;&#xA;&gt; 2023-09-08 10:08:15  Idle (40 peers), best: #107593 (0x1f79…b058), finalized #107379 (0x8121…4c3b),  1.8MiB/s  2.4MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:20  Idle (36 peers), best: #107593 (0x1f79…b058), finalized #107379 (0x8121…4c3b),  2.2MiB/s  2.2MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:23  Error importing block 0xb33e262e387c536589214e5c36f3aae1b69ad883ab79ec6408b428414249488f: block has an unknown parent    &#xD;&#xA;&gt; 2023-09-08 10:08:25  Idle (22 peers), best: #107593 (0x1f79…b058), finalized #107379 (0x8121…4c3b),  2.4MiB/s  2.0MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:30  Idle (31 peers), best: #107593 (0x1f79…b058), finalized #107379 (0x8121…4c3b),  996.0kiB/s  1.9MiB/s   &#xD;&#xA;&#xD;&#xA;How did this happen? Can I recover?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39196" PostHistoryTypeId="1" PostId="9882" RevisionGUID="ee718d42-f7e5-4123-a2d8-6aaf563b9a0c" CreationDate="2023-09-08T02:42:23.483" UserId="4628" Text="Consensus node block exception" ContentLicense="CC BY-SA 4.0" />
  <row Id="39197" PostHistoryTypeId="3" PostId="9882" RevisionGUID="ee718d42-f7e5-4123-a2d8-6aaf563b9a0c" CreationDate="2023-09-08T02:42:23.483" UserId="4628" Text="|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39202" PostHistoryTypeId="2" PostId="9884" RevisionGUID="29f9ea78-b6f3-4d22-9fd7-1558f8db91a1" CreationDate="2023-09-08T04:54:10.590" UserId="354" Text="&gt; How did this happen?&#xD;&#xA;&#xD;&#xA;From what I know there are two ways by which this kind of situation occurs:&#xD;&#xA;&#xD;&#xA; - When more than 1/3rd of the nodes are down due to which the system cannot come to any consensus and hence results in the stalling block finalization. In your case where there are only 3 nodes if any one node goes down it can lead to this problem.&#xD;&#xA; - Other situation which I know is when there are multiple validators from a single node can also cause this problem as to not to give more power to a single node.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;  Can I recover?&#xD;&#xA;&#xD;&#xA;Yes you can recover from this.&#xD;&#xA;&#xD;&#xA; - In first case you need just need to start the node that is down and you are good to go.&#xD;&#xA; - In second case first you need to remove the faulty validators from the system, and go to `extrinsics -&gt; grandpa` and in grandpa run `note_stalled` and the block finalization should start.&#xD;&#xA;&#xD;&#xA;NOTE: In second case if the block production time has increased that of `epoch_time`, than you need to restart your chain from scratch. In case you don't know how to use `note_stalled` refer to https://substrate.stackexchange.com/questions/661/how-to-use-notestalled-to-recover-from-a-finality-lagging-chain&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39205" PostHistoryTypeId="2" PostId="9885" RevisionGUID="bb86045c-7248-433e-9440-c9f20e2e9d30" CreationDate="2023-09-08T08:35:55.090" UserId="3438" Text="I'm trying to fetch asset balances in accounts for various assets using py-substrate-interface. I know I can query the `Tokens.Accounts` storage function but I'm not sure which params I need to pass to the query_map function to get the balances.&#xD;&#xA;&#xD;&#xA;For example I want to get balances of `{&quot;ForeignAsset&quot;:&quot;5&quot;}` on acala, how would the query_map function look like." ContentLicense="CC BY-SA 4.0" />
  <row Id="39207" PostHistoryTypeId="1" PostId="9885" RevisionGUID="bb86045c-7248-433e-9440-c9f20e2e9d30" CreationDate="2023-09-08T08:35:55.090" UserId="3438" Text="Query Tokens.Accounts storage function using py-substrate-interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="39208" PostHistoryTypeId="3" PostId="9885" RevisionGUID="bb86045c-7248-433e-9440-c9f20e2e9d30" CreationDate="2023-09-08T08:35:55.090" UserId="3438" Text="|storage|python|py-substrate-interface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39209" PostHistoryTypeId="2" PostId="9886" RevisionGUID="151027f3-bebb-49f3-9bef-a1183f3e4595" CreationDate="2023-09-08T08:51:00.623" UserId="3881" Text="Trying to implement boundedVecs for an struct, but the compiler is telling me that I can´t Clone the struct because the StringLimit Constant doesn´t comply with the Clone Trait. &#xD;&#xA;&#xD;&#xA;This is the definition of the constant under Config:&#xD;&#xA;&#xD;&#xA;    #[pallet::constant]&#xD;&#xA;    type StringLimit: Get&lt;u32&gt;;&#xD;&#xA;&#xD;&#xA;And the following is the definition of the struct:&#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo)]&#xD;&#xA;    #[scale_info(skip_type_params(StringLimit))]&#xD;&#xA;    pub struct Details&lt;Balance, AccountId, AssetId, BlockNumber, PollIndex, StringLimit: Get&lt;u32&gt;&gt; {&#xD;&#xA;    	/// Poll id.&#xD;&#xA;    	pub poll_id: PollIndex,&#xD;&#xA;    	/// Account who created this poll.&#xD;&#xA;    	pub created_by: AccountId,&#xD;&#xA;    	/// Question for the poll.&#xD;&#xA;    	pub poll_question: BoundedVec&lt;u8, StringLimit&gt;,&#xD;&#xA;    	/// Option for the poll.&#xD;&#xA;    	pub poll_option_1: BoundedVec&lt;u8, StringLimit&gt;,&#xD;&#xA;    	/// Option for the poll.&#xD;&#xA;    	pub poll_option_2: BoundedVec&lt;u8, StringLimit&gt;,&#xD;&#xA;    	/// Option for the poll.&#xD;&#xA;    	pub poll_option_3: Option&lt;BoundedVec&lt;u8, StringLimit&gt;&gt;,&#xD;&#xA;    	/// Option for the poll.&#xD;&#xA;    	pub poll_option_4: Option&lt;BoundedVec&lt;u8, StringLimit&gt;&gt;,&#xD;&#xA;    	/// The number of poll options.&#xD;&#xA;    	pub options_count: u8,&#xD;&#xA;    	/// Info regrading stake on poll options.&#xD;&#xA;    	pub votes: Votes,&#xD;&#xA;    	/// Number of vote received.&#xD;&#xA;    	pub votes_count: u128,&#xD;&#xA;    	/// Currency of the poll.&#xD;&#xA;    	pub currency: AssetId,&#xD;&#xA;    	/// Status of the poll.&#xD;&#xA;    	pub status: PollStatus&lt;BlockNumber&gt;,&#xD;&#xA;    	/// Min balance to be able to vote on a poll.&#xD;&#xA;    	pub min_balance: Balance,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;To make the code compile I needed to add Clone to the definition: type StringLimit: Get&lt;u32&gt; + Clone;&#xD;&#xA;&#xD;&#xA;And to derive the trait at runtime level for the constant. I know that is not the correct solution. Do you know what the problem is?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39211" PostHistoryTypeId="1" PostId="9886" RevisionGUID="151027f3-bebb-49f3-9bef-a1183f3e4595" CreationDate="2023-09-08T08:51:00.623" UserId="3881" Text="Trait bond Clone not satisfied by pallet constant" ContentLicense="CC BY-SA 4.0" />
  <row Id="39212" PostHistoryTypeId="3" PostId="9886" RevisionGUID="151027f3-bebb-49f3-9bef-a1183f3e4595" CreationDate="2023-09-08T08:51:00.623" UserId="3881" Text="|pallet|trait|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39213" PostHistoryTypeId="5" PostId="9878" RevisionGUID="6af3d410-8166-4923-89e5-ff92b117430c" CreationDate="2023-09-08T09:11:11.157" UserId="2477" Comment="edited body" Text="Is it possible to create a ContractReference to perform a cross-contract call from ink::trait_definition?&#xD;&#xA;&#xD;&#xA;If it is, how can I do so?&#xD;&#xA;&#xD;&#xA;If it is not, why it is not possible? It seems strange that we can only create a reference to the whole contract and not to a single trait the contract is implementing." ContentLicense="CC BY-SA 4.0" />
  <row Id="39214" PostHistoryTypeId="2" PostId="9887" RevisionGUID="6cb23b7a-a1a0-4401-9943-4f92bad20d8e" CreationDate="2023-09-08T09:32:11.357" UserId="94" Text="You can use the [`CloneNoBound`](https://paritytech.github.io/substrate/master/frame_support/derive.CloneNoBound.html) that will not impose the `Clone` bound on the generic types. One example is here in [Cumulus](https://github.com/paritytech/polkadot-sdk/blob/e046aba4ea8cee29a357d6aafa5904c093a9a261/cumulus/bridges/bin/runtime-common/src/refund_relayer_extension.rs#L240).  &#xD;&#xA;There are a few more of these kind such as `DefaultNoBound`, `EqNoBound`, `PartialEqNoBound` and `RuntimeDebugNoBound`." ContentLicense="CC BY-SA 4.0" />
  <row Id="39216" PostHistoryTypeId="2" PostId="9888" RevisionGUID="f8772a68-5390-4c9b-a913-b0b250390a37" CreationDate="2023-09-08T12:21:47.713" UserId="477" Text="There is a macro that based on ink trait creates an associated type for safe cross-contract calls:&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/ink/ink/macro.contract_ref.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="39218" PostHistoryTypeId="5" PostId="9871" RevisionGUID="e0ae950e-9b4f-4b14-b6ae-e8db3bfdf329" CreationDate="2023-09-08T20:45:08.273" UserId="354" Comment="improved formatting" Text="I am looking for a way to charge for xcm message. &#xD;&#xA;&#xD;&#xA;(I know this topic has been discussed a lot, but I still haven't found my own answer, and haven't written a script to test, so I want to open this discussion further ^.^).&#xD;&#xA;As far as I know, charging for xcm messages has two steps.&#xD;&#xA;&#xD;&#xA;Step 1: Calculate the total weight for all instructions that xcm uses. Here is the formula I found:&#xD;&#xA;```rust&#xD;&#xA;weight = base_weight + (num_assets * weight_per_asset) + (asset_id.len() * weight_per_byte)&#xD;&#xA;```&#xD;&#xA;Step 2: Calculate fee from the weight given in step 1.&#xD;&#xA;  I found the following code:&#xD;&#xA;```rust&#xD;&#xA;pub fn estimate_fee_for_weight(weight: Weight) -&gt; u128 {&#xD;&#xA;let (_, units_per_second, units_per_mb) = TokensPerSecondPerMegabyte::get();&#xD;&#xA;&#xD;&#xA;units_per_second * (weight.ref_time() as u128) / (WEIGHT_REF_TIME_PER_SECOND as u128)&#xD;&#xA;units_per_mb * (weight.proof_size() as u128) / (WEIGHT_PROOF_SIZE_PER_MB as u128)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;So let me ask:&#xD;&#xA; 1. How is the value of `unit_per_second` and `units_per_mb` calculated?&#xD;&#xA; 2. It seems that Weight is the common unit of all tokens (Dot, Kusama, Moonbeam, ...) so with different tokens, how to convert weight to a token like it? That is, how will `weight to dot` differ from `weight to KSM`? How to calculate?&#xD;&#xA; 3. How to determine the weight limit in xcm?&#xD;&#xA; 4. How can I find the base_weight of all instructions?&#xD;&#xA;&#xD;&#xA;Thank you for your help.&#xD;&#xA;Some reference I found: &lt;https://github.com/paritytech/xcm-docs.git&gt;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39219" PostHistoryTypeId="24" PostId="9871" RevisionGUID="e0ae950e-9b4f-4b14-b6ae-e8db3bfdf329" CreationDate="2023-09-08T20:45:08.273" Comment="Proposed by 354 approved by 4062 edit id of 551" ContentLicense="CC BY-SA 4.0" />
  <row Id="39221" PostHistoryTypeId="2" PostId="9889" RevisionGUID="c8176fef-242c-4082-9796-42e0fcf2bc3a" CreationDate="2023-09-09T01:53:43.220" UserId="1950" Text="I have defined an extrinsic function as follows&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::create_record())]&#xD;&#xA;		pub fn create_record(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			issuer_account: T::AccountId,&#xD;&#xA;			input: Data&lt;T::PublicKeySize, T::SignatureSize&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let _who = ensure_signed(origin)?;&#xD;&#xA;			 &#xD;&#xA;			let generated_public_key_from_bytes = Public::from_slice(&amp;input.public_key)&#xD;&#xA;				.map_err(|_| Error::&lt;T&gt;::InvalidPublicKey)?;&#xD;&#xA;&#xD;&#xA;			let generated_signature_from_bytes = Signature::from_slice(&amp;input.signature).ok_or(Error::&lt;T&gt;::InvalidSignature)?;&#xD;&#xA;&#xD;&#xA;		 &#xD;&#xA;&#xD;&#xA;			let is_signature_valid = generated_public_key_from_bytes&#xD;&#xA;				.verify(&amp;input.public_key, &amp;generated_signature_from_bytes)&#xD;&#xA;				.is_ok();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				// more code here&#xD;&#xA;&#xD;&#xA;				Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I try to call `verify` function it says its not found. Im using polkadot version `0.9.42` This public key is an ED25519 Key , &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The errors which Im getting &#xD;&#xA;&#xD;&#xA;error[E0599]: no method named `verify` found for struct `sp_core::ecdsa::Public` in the current scope&#xD;&#xA;&#xD;&#xA;and gives this suggestion &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;help: the following trait is implemented but not in scope; perhaps add a `use` for it:&#xD;&#xA;    |&#xD;&#xA;32  +     use frame_support::sp_runtime::sp_application_crypto::RuntimePublic;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But its none existing path&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Im getting the same error if I use `use sp_core::ed25519`&#xD;&#xA;&#xD;&#xA;I have referred to this https://substrate.stackexchange.com/questions/305/how-to-verify-a-signature-in-a-pallet but it was not helpful in this scenario&#xD;&#xA;&#xD;&#xA;How to call verify function to check the signature?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39223" PostHistoryTypeId="1" PostId="9889" RevisionGUID="c8176fef-242c-4082-9796-42e0fcf2bc3a" CreationDate="2023-09-09T01:53:43.220" UserId="1950" Text="How to verify a signature of a playload in Substrate when the provided Public Key bytes are not associated with an Account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39224" PostHistoryTypeId="3" PostId="9889" RevisionGUID="c8176fef-242c-4082-9796-42e0fcf2bc3a" CreationDate="2023-09-09T01:53:43.220" UserId="1950" Text="|ed25519|signatures|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39225" PostHistoryTypeId="4" PostId="9882" RevisionGUID="b4259fb5-9a7c-4a0a-a917-fbd9df6a7dd7" CreationDate="2023-09-09T01:58:06.257" UserId="354" Comment="improved formatting" Text="Block finalization stalled" ContentLicense="CC BY-SA 4.0" />
  <row Id="39226" PostHistoryTypeId="6" PostId="9882" RevisionGUID="b4259fb5-9a7c-4a0a-a917-fbd9df6a7dd7" CreationDate="2023-09-09T01:58:06.257" UserId="354" Comment="improved formatting" Text="|substrate-node|consensus|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39227" PostHistoryTypeId="24" PostId="9882" RevisionGUID="b4259fb5-9a7c-4a0a-a917-fbd9df6a7dd7" CreationDate="2023-09-09T01:58:06.257" Comment="Proposed by 354 approved by 3317, 4628 edit id of 549" ContentLicense="CC BY-SA 4.0" />
  <row Id="39228" PostHistoryTypeId="5" PostId="9882" RevisionGUID="c0f35385-1c12-4d1f-8931-34a12b786bd8" CreationDate="2023-09-09T01:59:50.617" UserId="4628" Comment="added 10190 characters in body" Text="I have been running a testing network recently and they have encountered a very strange situation:&#xD;&#xA;1. the finalized has stopped at # 107379 and cannot be further confirmed.&#xD;&#xA;2. The logs of each consensus node are being printed:&#xD;&#xA;&#xD;&#xA;`Error importing block 0xb33e262e387c536589214e5c36f3aae1b69ad883ab79ec6408b428414249488f: block has an unknown parent` &#xD;&#xA;&#xD;&#xA;`Error importing block 0xaa6dedf30fb9a23b46cc0c470ae002d29b2e378bd07c2c2270b1f1958c7fb3c6: block has an unknown parent`&#xD;&#xA;&#xD;&#xA;But the block hash is different&#xD;&#xA;&#xD;&#xA;3. And printing this error:&#xD;&#xA;&#xD;&#xA;`Verification failed for block 0xf53adc0a702940fae69ea237c9946be1e6549f66ceded06be0b8651464e82444 received from peer: 12D3KooWMV4EUiWq74RNaWk3rLhbWZTf9sDGk3htgZmVSdKgTLaD, &quot;UnknownBlock: State already discarded for 0x80663f0ffcafa935fa605fe420385df0f7518de6b110b9cb164f26327aa8250b&quot;`&#xD;&#xA;&#xD;&#xA;Here are the logs of my three consensus nodes, They seem to have been unable to synchronize blocks before, and each one is out of blocks, and the best is also different:&#xD;&#xA;&#xD;&#xA;Consensus 1:&#xD;&#xA;&gt; 2023-09-08 10:08:15  Idle (40 peers), best: #107591 (0xbba3…3bc2), finalized #107379 &#xD;&#xA;&gt; (0x8121…4c3b),  901.7kiB/s  2.4MiB/s  &#xD;&#xA;&gt; 2023-09-08 10:08:20  Idle (40 peers), best: #107591 (0xbba3…3bc2), finalized #107379 &#xD;&#xA;&gt; (0x8121…4c3b),  937.7kiB/s  2.7MiB/s  &#xD;&#xA;&gt; 2023-09-08 10:08:24 Backing off claiming new slot for block authorship: finality is lagging.  &#xD;&#xA;&#xD;&#xA;Consensus 2:&#xD;&#xA;&gt; 2023-09-08 10:08:06  Pre-sealed block for proposal at 107592. Hash now 0x258807ab842841ff712860059fe2713b6d41880d38a8b9ea6d345dd3b176ce12, previously 0x005b096eb79e283b94d796a684aebce3354082bb7a5208308ebd053c6a97596e.    &#xD;&#xA;&gt; 2023-09-08 10:08:06  Imported #107592 (0x2588…ce12)    &#xD;&#xA;&gt; 2023-09-08 10:08:06 build valid transaction    &#xD;&#xA;&gt; 2023-09-08 10:08:09  Idle (40 peers), best: #107592 (0x2588…ce12), finalized #107379 (0x8121…4c3b),  1.3MiB/s  2.5MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:14  Idle (40 peers), best: #107592 (0x2588…ce12), finalized #107379 (0x8121…4c3b),  1.4MiB/s  2.3MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:18 Backing off claiming new slot for block authorship: finality is lagging.    &#xD;&#xA;&gt; 2023-09-08 10:08:19  Idle (40 peers), best: #107592 (0x2588…ce12), finalized #107379 (0x8121…4c3b),  1.0MiB/s  2.6MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:24  Idle (40 peers), best: #107592 (0x2588…ce12), finalized #107379 (0x8121…4c3b),  991.6kiB/s  2.5MiB/s  &#xD;&#xA;&#xD;&#xA;Consensus 3:&#xD;&#xA;&gt; 2023-09-08 10:08:15  Idle (40 peers), best: #107593 (0x1f79…b058), finalized #107379 (0x8121…4c3b),  1.8MiB/s  2.4MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:20  Idle (36 peers), best: #107593 (0x1f79…b058), finalized #107379 (0x8121…4c3b),  2.2MiB/s  2.2MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:23  Error importing block 0xb33e262e387c536589214e5c36f3aae1b69ad883ab79ec6408b428414249488f: block has an unknown parent    &#xD;&#xA;&gt; 2023-09-08 10:08:25  Idle (22 peers), best: #107593 (0x1f79…b058), finalized #107379 (0x8121…4c3b),  2.4MiB/s  2.0MiB/s    &#xD;&#xA;&gt; 2023-09-08 10:08:30  Idle (31 peers), best: #107593 (0x1f79…b058), finalized #107379 (0x8121…4c3b),  996.0kiB/s  1.9MiB/s   &#xD;&#xA;&#xD;&#xA;How did this happen? Can I recover?&#xD;&#xA;&#xD;&#xA;This is the relevant log before and after # 107379:&#xD;&#xA;&#xD;&#xA;&gt; 2023-09-07 14:07:00  Prepared block for proposing at 107379 (198 ms) [hash: 0x27a3f1d99dbd10b741ac4d5794cf19e57a7f8c64537ae7172006968ec2802682; parent_hash: 0xb1db…fc77; extrinsics (19): [0xbf9e…c467, 0xe112…348c, 0x5e6f…c211, 0x85ce…966e, 0x2e92…574f, 0xffc6…f73f, 0xb740…f336, 0x2731…0553, 0xc4d5…1ee7, 0x5d58…53a2, 0x4d23…70af, 0x7eba…84fb, 0x9b78…c59b, 0xab14…a512, 0x2446…a436, 0x08fa…8b36, 0x79a3…ffb2, 0x46d4…8f56, 0x1d5f…bebc]]    &#xD;&#xA;2023-09-07 14:07:00  Pre-sealed block for proposal at 107379. Hash now 0x81216220258db8abb927bd2949ec743f0b7b80158fbed167d94e734c7bee4c3b, previously 0x27a3f1d99dbd10b741ac4d5794cf19e57a7f8c64537ae7172006968ec2802682.    &#xD;&#xA;2023-09-07 14:07:00 ✨ Imported #107379 (0x8121…4c3b)    &#xD;&#xA;2023-09-07 14:07:00 build valid transaction    &#xD;&#xA;2023-09-07 14:07:00 build valid transaction    &#xD;&#xA;2023-09-07 14:07:00 build valid transaction    &#xD;&#xA;2023-09-07 14:07:00 build valid transaction    &#xD;&#xA;2023-09-07 14:07:00 build valid transaction    &#xD;&#xA;2023-09-07 14:07:00 build valid transaction    &#xD;&#xA;2023-09-07 14:07:00 build valid transaction    &#xD;&#xA;2023-09-07 14:07:03  Idle (61 peers), best: #107379 (0x8121…4c3b), finalized #107376 (0xd4ea…535d), ⬇ 7.9MiB/s ⬆ 21.8MiB/s    &#xD;&#xA;2023-09-07 14:07:06  Starting consensus session on top of parent 0x81216220258db8abb927bd2949ec743f0b7b80158fbed167d94e734c7bee4c3b    &#xD;&#xA;2023-09-07 14:07:06 build valid transaction    &#xD;&#xA;2023-09-07 14:07:06  Prepared block for proposing at 107380 (228 ms) [hash: 0x7af37f2e97c45ab3c9aa1f36512439e0913552c2df35e662162c31f9b76ec324; parent_hash: 0x8121…4c3b; extrinsics (16): [0x3a1d…32f4, 0xe9c7…4127, 0x7a22…c106, 0x5f63…a009, 0x7d4a…1409, 0x9dee…0750, 0xc40b…ed1e, 0x4fc6…ed4b, 0xeed0…273a, 0x6047…2dc3, 0x9548…76d2, 0x4429…e54a, 0xe6ee…66f3, 0x5ba0…5679, 0x9795…bb18, 0x11b5…b76d]]    &#xD;&#xA;2023-09-07 14:07:06  Pre-sealed block for proposal at 107380. Hash now 0x129ce5d5b7c84c2477e9ba2ed838a7082748f5742e6a623dc24b2244d56d30f9, previously 0x7af37f2e97c45ab3c9aa1f36512439e0913552c2df35e662162c31f9b76ec324.    &#xD;&#xA;2023-09-07 14:07:06 ✨ Imported #107380 (0x129c…30f9)    &#xD;&#xA;2023-09-07 14:07:06 build valid transaction    &#xD;&#xA;2023-09-07 14:07:06 build valid transaction    &#xD;&#xA;2023-09-07 14:07:06 build valid transaction    &#xD;&#xA;2023-09-07 14:07:06 build valid transaction    &#xD;&#xA;2023-09-07 14:07:06 build valid transaction    &#xD;&#xA;2023-09-07 14:07:06 build valid transaction    &#xD;&#xA;2023-09-07 14:07:07 build valid transaction    &#xD;&#xA;2023-09-07 14:07:07 ♻️  Reorg on #107380,0x129c…30f9 to #107378,0xdaed…f1e7, common ancestor #107377,0x517f…e155    &#xD;&#xA;2023-09-07 14:07:07 ✨ Imported #107378 (0xdaed…f1e7)    &#xD;&#xA;2023-09-07 14:07:07 build valid transaction    &#xD;&#xA;2023-09-07 14:07:07 build valid transaction    &#xD;&#xA;2023-09-07 14:07:07 build valid transaction    &#xD;&#xA;2023-09-07 14:07:07 build valid transaction    &#xD;&#xA;2023-09-07 14:07:08 build valid transaction    &#xD;&#xA;2023-09-07 14:07:08 build valid transaction    &#xD;&#xA;2023-09-07 14:07:08 build valid transaction    &#xD;&#xA;2023-09-07 14:07:08 build valid transaction    &#xD;&#xA;2023-09-07 14:07:08 build valid transaction    &#xD;&#xA;2023-09-07 14:07:08 build valid transaction    &#xD;&#xA;2023-09-07 14:07:08 build valid transaction    &#xD;&#xA;2023-09-07 14:07:08 build valid transaction    &#xD;&#xA;2023-09-07 14:07:08  Idle (96 peers), best: #107378 (0xdaed…f1e7), finalized #107376 (0xd4ea…535d), ⬇ 10.8MiB/s ⬆ 24.3MiB/s    &#xD;&#xA;2023-09-07 14:07:12  Starting consensus session on top of parent 0xdaed352d7995e08e805aeaa9ddb7a98a19389a9a01f8ac4bb59e0c317924f1e7    &#xD;&#xA;2023-09-07 14:07:12 build valid transaction    &#xD;&#xA;2023-09-07 14:07:12  Prepared block for proposing at 107379 (110 ms) [hash: 0x1f2e488df8571486f8118e257f2bfe22d34736bed8e1c4ac20ca455c1cc111f6; parent_hash: 0xdaed…f1e7; extrinsics (6): [0xe9f9…728b, 0x6536…1594, 0xe112…348c, 0xcf1b…949e, 0xf0fb…96e9, 0x00e7…f2e1]]    &#xD;&#xA;2023-09-07 14:07:12  Pre-sealed block for proposal at 107379. Hash now 0xe84b2646b228dcec25ac46de1394ec32087452c1a8bd7e594b4b11321d604ee5, previously 0x1f2e488df8571486f8118e257f2bfe22d34736bed8e1c4ac20ca455c1cc111f6.    &#xD;&#xA;2023-09-07 14:07:12 ✨ Imported #107379 (0xe84b…4ee5)    &#xD;&#xA;2023-09-07 14:07:12 build valid transaction    &#xD;&#xA;2023-09-07 14:07:12 build valid transaction    &#xD;&#xA;2023-09-07 14:07:12 build valid transaction    &#xD;&#xA;2023-09-07 14:07:12 build valid transaction    &#xD;&#xA;2023-09-07 14:07:12 build valid transaction    &#xD;&#xA;2023-09-07 14:07:12 build valid transaction    &#xD;&#xA;2023-09-07 14:07:12 build valid transaction    &#xD;&#xA;2023-09-07 14:07:13  Idle (143 peers), best: #107379 (0xe84b…4ee5), finalized #107377 (0x517f…e155), ⬇ 8.4MiB/s ⬆ 26.6MiB/s    &#xD;&#xA;2023-09-07 14:07:18  Idle (150 peers), best: #107379 (0xe84b…4ee5), finalized #107377 (0x517f…e155), ⬇ 6.7MiB/s ⬆ 22.1MiB/s    &#xD;&#xA;2023-09-07 14:07:19 build valid transaction    &#xD;&#xA;2023-09-07 14:07:19 build valid transaction    &#xD;&#xA;2023-09-07 14:07:19 build valid transaction    &#xD;&#xA;2023-09-07 14:07:19 build valid transaction    &#xD;&#xA;2023-09-07 14:07:19 build valid transaction    &#xD;&#xA;2023-09-07 14:07:19 build valid transaction    &#xD;&#xA;2023-09-07 14:07:19 build valid transaction    &#xD;&#xA;2023-09-07 14:07:19 build valid transaction    &#xD;&#xA;2023-09-07 14:07:19 build valid transaction    &#xD;&#xA;2023-09-07 14:07:19 build valid transaction    &#xD;&#xA;2023-09-07 14:07:21 build valid transaction    &#xD;&#xA;2023-09-07 14:07:22 Potential safety failure: reverting finalized block (107378, 0xb1db73150718792c9319ed02084e768af6698aa46c54c69865f338c15d3ffc77)    &#xD;&#xA;2023-09-07 14:07:22 Block import error: Potential long-range attack: block not in finalized chain.    &#xD;&#xA;2023-09-07 14:07:22  Error importing block 0x57038d95c1e0ee34c7029fc9f2a0cf215d73a775860888b3d7f535e386176cd6: consensus error: Import failed: Import failed: Potential long-range attack: block not in finalized chain.    &#xD;&#xA;2023-09-07 14:07:23  Idle (150 peers), best: #107378 (0xb1db…fc77), finalized #107378 (0xb1db…fc77), ⬇ 8.2MiB/s ⬆ 26.1MiB/s    &#xD;&#xA;2023-09-07 14:07:25 build valid transaction    &#xD;&#xA;2023-09-07 14:07:25 Potential safety failure: reverting finalized block (107378, 0xb1db73150718792c9319ed02084e768af6698aa46c54c69865f338c15d3ffc77)    &#xD;&#xA;2023-09-07 14:07:25 Block import error: Potential long-range attack: block not in finalized chain.    &#xD;&#xA;2023-09-07 14:07:25  Error importing block 0x57038d95c1e0ee34c7029fc9f2a0cf215d73a775860888b3d7f535e386176cd6: consensus error: Import failed: Import failed: Potential long-range attack: block not in finalized chain.    &#xD;&#xA;2023-09-07 14:07:28  Idle (150 peers), best: #107378 (0xb1db…fc77), finalized #107378 (0xb1db…fc77), ⬇ 7.6MiB/s ⬆ 17.2MiB/s    &#xD;&#xA;2023-09-07 14:07:33  Idle (150 peers), best: #107378 (0xb1db…fc77), finalized #107378 (0xb1db…fc77), ⬇ 5.0MiB/s ⬆ 14.1MiB/s    &#xD;&#xA;2023-09-07 14:07:36  Starting consensus session on top of parent 0x129ce5d5b7c84c2477e9ba2ed838a7082748f5742e6a623dc24b2244d56d30f9    &#xD;&#xA;2023-09-07 14:07:37 Timeout fired waiting for transaction pool at block #107380. Proceeding with production.    &#xD;&#xA;2023-09-07 14:07:37 build valid transaction    &#xD;&#xA;2023-09-07 14:07:37  Prepared block for proposing at 107381 (1543 ms) [hash: 0x9b1a83678ecc37dcf2bd71e33f99dd143d520160379a78a74254d3c3d4f83e7f; parent_hash: 0x129c…30f9; extrinsics (29): [0x6791…6414, 0xb1d3…2353, 0xe112…348c, 0xcf1b…949e, 0x27b9…d8ee, 0x96f7…dbc2, 0xd7c5…e841, 0x776d…1dca, 0x7cd0…1da3, 0xa044…4cba, 0x4689…023f, 0xab25…1ebc, 0xf0fb…96e9, 0xc56f…754a, 0xc705…c70d, 0x522e…0fce, 0x938d…4378, 0xbf0d…c4c3, 0xba24…fad7, 0x35c5…bc48, 0x4c21…b98a, 0x96d1…c4d2, 0x00e7…f2e1, 0x5df1…e352, 0x3f30…df0a, 0xc562…826d, 0xc9b9…cd40, 0x0ba1…f07a, 0xdcc7…9d82]]    &#xD;&#xA;2023-09-07 14:07:37  Pre-sealed block for proposal at 107381. Hash now 0x983216a66895ac6743cdbb794532260e9ff69a914da4164cafc69586d5c81eaf, previously 0x9b1a83678ecc37dcf2bd71e33f99dd143d520160379a78a74254d3c3d4f83e7f.    &#xD;&#xA;2023-09-07 14:07:37 ♻️  Reorg on #107379,0xe84b…4ee5 to #107381,0x9832…1eaf, common ancestor #107377,0x517f…e155    &#xD;&#xA;2023-09-07 14:07:37 ✨ Imported #107381 (0x9832…1eaf)    &#xD;&#xA;2023-09-07 14:07:37 build valid transaction    &#xD;&#xA;2023-09-07 14:07:37 build valid transaction    &#xD;&#xA;2023-09-07 14:07:37 build valid transaction    &#xD;&#xA;2023-09-07 14:07:37 build valid transaction    &#xD;&#xA;2023-09-07 14:07:37 build valid transaction    &#xD;&#xA;2023-09-07 14:07:37 build valid transaction    &#xD;&#xA;2023-09-07 14:07:38  Idle (49 peers), best: #107381 (0x9832…1eaf), finalized #107378 (0xb1db…fc77), ⬇ 10.1MiB/s ⬆ 15.7MiB/s    &#xD;&#xA;2023-09-07 14:07:38 build valid transaction    &#xD;&#xA;2023-09-07 14:07:39 ✨ Imported #107381 (0x3e97…cb8e)    &#xD;&#xA;2023-09-07 14:07:43  Idle (69 peers), best: #107381 (0x9832…1eaf), finalized #107378 (0xb1db…fc77), ⬇ 10.7MiB/s ⬆ 22.2MiB/s    &#xD;&#xA;2023-09-07 14:07:48  Idle (77 peers), best: #107381 (0x9832…1eaf), finalized #107379 (0x8121…4c3b), ⬇ 5.6MiB/s ⬆ 21.1MiB/s    &#xD;&#xA;2023-09-07 14:07:51 build valid transaction    &#xD;&#xA;2023-09-07 14:07:51 ✨ Imported #107381 (0x3561…f012)    &#xD;&#xA;2023-09-07 14:07:53  Idle (82 peers), best: #107381 (0x9832…1eaf), finalized #107379 (0x8121…4c3b), ⬇ 3.9MiB/s ⬆ 18.6MiB/s    &#xD;&#xA;2023-09-07 14:07:54  Starting consensus session on top of parent 0x983216a66895ac6743cdbb794532260e9ff69a914da4164cafc69586d5c81eaf    &#xD;&#xA;2023-09-07 14:07:54 build valid transaction    &#xD;&#xA;2023-09-07 14:07:54  Prepared block for proposing at 107382 (309 ms) [hash: 0x91b0246bca2e4f99d1f985ddb9a3254ae2765b6f9f7f6301e60f66dcde95ff03; parent_hash: 0x9832…1eaf; extrinsics (35): [0xd190…fe9e, 0x06f6…c607, 0x9235…b121, 0x698c…38d9, 0xf5c0…d13e, 0x8895…3051, 0x655b…5c57, 0x41d5…ad7c, 0x68a3…9f80, 0x4d9a…376e, 0xb551…a9c9, 0x67bc…9b03, 0x359b…54e1, 0xbf73…637e, 0xd72c…1c57, 0xacca…bdb5, 0x023f…5ce9, 0x3d35…d2b8, 0x9a68…e8e4, 0x8309…fc26, 0x2ed0…d02a, 0xce62…0dfa, 0x447c…93e8, 0x0ee5…bc9b, 0xa15c…e37d, 0x80a5…55f8, 0x4fbd…10d8, 0xfffc…62e6, 0xb5a8…8775, 0xb69e…3bf1, 0x4d21…b1b4, 0x6495…a8a2, 0xf40e…bd38, 0xc29a…3d0d, 0x7ee5…6b4b]]    &#xD;&#xA;2023-09-07 14:07:54  Pre-sealed block for proposal at 107382. Hash now 0x61a4bfa18ed9534ccd8811a0282be2724f16a792bec14eb4a240cc1723c4c2c8, previously 0x91b0246bca2e4f99d1f985ddb9a3254ae2765b6f9f7f6301e60f66dcde95ff03.    &#xD;&#xA;2023-09-07 14:07:54 ✨ Imported #107382 (0x61a4…c2c8)    &#xD;&#xA;2023-09-07 14:07:54 build valid transaction    &#xD;&#xA;2023-09-07 14:07:54 build valid transaction    " ContentLicense="CC BY-SA 4.0" />
  <row Id="39229" PostHistoryTypeId="2" PostId="9890" RevisionGUID="38bd4d81-9801-4ddd-a933-251e86500d84" CreationDate="2023-09-09T07:38:46.797" UserId="3319" Text="try importing `sp_runtime::RuntimeAppPublic` it has the [verify][1] method&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/substrate/master/sp_runtime/trait.RuntimeAppPublic.html#tymethod.verify" ContentLicense="CC BY-SA 4.0" />
  <row Id="39235" PostHistoryTypeId="2" PostId="9892" RevisionGUID="4bc42620-5e7b-4d99-b435-aebb29f02aa0" CreationDate="2023-09-09T11:10:00.723" UserId="4620" Text="I have been searching for a very beginner friendly introduction to XCM. Here is what I ended up with:&#xD;&#xA;&#xD;&#xA;XCM, or Cross-Consensus Messaging, is a messaging format designed for communication between different chains, smart contracts, pallets, and even bridges and sharded enclaves in the Polkadot network. It goes beyond traditional cross-chain communication by enabling the exchange of ideas and information not only between different chains but also within the Polkadot ecosystem.&#xD;&#xA;&#xD;&#xA;The main goal of XCM is to facilitate various cross-chain tasks by providing a standardized way of communication. It allows different components of the Polkadot network to interact with each other, making it easier to achieve interoperability and share resources.&#xD;&#xA;&#xD;&#xA;https://www.polkadot.network/blog/xcm-the-cross-consensus-message-format&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39237" PostHistoryTypeId="2" PostId="9893" RevisionGUID="e5dacebf-eb78-4324-b675-7060626575c4" CreationDate="2023-09-09T13:18:58.450" UserId="408" Text="Using `@polkadot-js/api`, one can encode a string `aabbcc` into `0x18616162626363`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&gt; u8aToHex(api.createType('String', &quot;aabbcc&quot;).toU8a())&#xD;&#xA;&quot;0x18616162626363&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I know that SCALE encoding adds the length info at the beginning of the encoded result, so in total the output is 7 bytes instead of 6.&#xD;&#xA;&#xD;&#xA;However, when I try decode the output back to a string, the leading byte is treated as part of the string instead of being stripped out.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&gt; api.createType('String', &quot;0x18616162626363&quot;).toString()&#xD;&#xA;&quot;\x18aabbcc&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The expected result should be `aabbcc` without the initial `\x18` byte.&#xD;&#xA;&#xD;&#xA;So, how to get rid of the leading byte when decoding a SCALE-encoded string?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39239" PostHistoryTypeId="1" PostId="9893" RevisionGUID="e5dacebf-eb78-4324-b675-7060626575c4" CreationDate="2023-09-09T13:18:58.450" UserId="408" Text="How to properly decode a SCALE-encoded string using polkadot-js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39240" PostHistoryTypeId="3" PostId="9893" RevisionGUID="e5dacebf-eb78-4324-b675-7060626575c4" CreationDate="2023-09-09T13:18:58.450" UserId="408" Text="|polkadot-js|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39241" PostHistoryTypeId="2" PostId="9894" RevisionGUID="d811e119-d5d0-4e1d-b385-d32a1cdae166" CreationDate="2023-09-09T15:29:56.863" UserId="4636" Text="I'm using polkadot JS for Acala network and facing the issue below.&#xD;&#xA;I cannot unstake or bridge token from Acala network to another one. The message that i got is as below. Could someone help me to resolve this issue?&#xD;&#xA;&#xD;&#xA;Notes: I tried transfer some token INT from Interlay to Acala and that works normally&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BQZuV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39243" PostHistoryTypeId="1" PostId="9894" RevisionGUID="d811e119-d5d0-4e1d-b385-d32a1cdae166" CreationDate="2023-09-09T15:29:56.863" UserId="4636" Text="&quot;Cannot convert undefined or null to object&quot; using polkadot.js with Acala network" ContentLicense="CC BY-SA 4.0" />
  <row Id="39244" PostHistoryTypeId="3" PostId="9894" RevisionGUID="d811e119-d5d0-4e1d-b385-d32a1cdae166" CreationDate="2023-09-09T15:29:56.863" UserId="4636" Text="|acala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39245" PostHistoryTypeId="2" PostId="9895" RevisionGUID="930c5d19-469b-4d9f-ab46-e16b8c39df54" CreationDate="2023-09-09T15:32:28.247" UserId="139" Text="I am trying to understand this code comment here from `pallet_multisig`&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;    /// Derive a multi-account ID from the sorted list of accounts and the threshold that are&#xD;&#xA;	/// required.&#xD;&#xA;	///&#xD;&#xA;	/// NOTE: `who` must be sorted. If it is not, then you'll get the wrong answer.&#xD;&#xA;	pub fn multi_account_id(who: &amp;[T::AccountId], threshold: u16) -&gt; T::AccountId {&#xD;&#xA;		let entropy = (b&quot;modlpy/utilisuba&quot;, who, threshold).using_encoded(blake2_256);&#xD;&#xA;		Decode::decode(&amp;mut TrailingZeroInput::new(entropy.as_ref()))&#xD;&#xA;			.expect(&quot;infinite length input; no invalid inputs for type; qed&quot;)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Sorted by what? " ContentLicense="CC BY-SA 4.0" />
  <row Id="39247" PostHistoryTypeId="1" PostId="9895" RevisionGUID="930c5d19-469b-4d9f-ab46-e16b8c39df54" CreationDate="2023-09-09T15:32:28.247" UserId="139" Text="What does it mean in pallet_multisig for accounts to be sorted?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39248" PostHistoryTypeId="3" PostId="9895" RevisionGUID="930c5d19-469b-4d9f-ab46-e16b8c39df54" CreationDate="2023-09-09T15:32:28.247" UserId="139" Text="|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39251" PostHistoryTypeId="2" PostId="9897" RevisionGUID="378e165e-edf8-4123-b3e6-de82ae63ed49" CreationDate="2023-09-09T19:46:50.583" UserId="28" Text="`AccountIds`, like all types, are represented with bytes.&#xD;&#xA;&#xD;&#xA;We require that the user submit the list of other accounts in the multisig in an sorted list by the byte representation of each account.&#xD;&#xA;&#xD;&#xA;This ensures that each unique set of users creates only a single multisig account. For example, a multisig with users `(B, A, C)` would not be accepted as the accounts are not sorted. But `(A, B, C)` would be, and it is the only order set of these users which would be accepted.&#xD;&#xA;&#xD;&#xA;The logic which handles checking the sorting is [here](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/multisig/src/lib.rs#L647C1-L669C1):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Check that signatories is sorted and doesn't contain sender, then insert sender.&#xD;&#xA;fn ensure_sorted_and_insert(&#xD;&#xA;	other_signatories: Vec&lt;T::AccountId&gt;,&#xD;&#xA;	who: T::AccountId,&#xD;&#xA;) -&gt; Result&lt;Vec&lt;T::AccountId&gt;, DispatchError&gt; {&#xD;&#xA;	let mut signatories = other_signatories;&#xD;&#xA;	let mut maybe_last = None;&#xD;&#xA;	let mut index = 0;&#xD;&#xA;	for item in signatories.iter() {&#xD;&#xA;		if let Some(last) = maybe_last {&#xD;&#xA;			ensure!(last &lt; item, Error::&lt;T&gt;::SignatoriesOutOfOrder);&#xD;&#xA;		}&#xD;&#xA;		if item &lt;= &amp;who {&#xD;&#xA;			ensure!(item != &amp;who, Error::&lt;T&gt;::SenderInSignatories);&#xD;&#xA;			index += 1;&#xD;&#xA;		}&#xD;&#xA;		maybe_last = Some(item);&#xD;&#xA;	}&#xD;&#xA;	signatories.insert(index, who);&#xD;&#xA;	Ok(signatories)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39253" PostHistoryTypeId="2" PostId="9898" RevisionGUID="d1d552db-02ca-48fc-855b-123464cb6e6f" CreationDate="2023-09-09T19:59:35.957" UserId="28" Text="You want to follow the same steps you took to generate the hex to get back.&#xD;&#xA;&#xD;&#xA;In your example generating the hex you do:&#xD;&#xA;&#xD;&#xA;1. String: `&quot;aabbcc&quot;`&#xD;&#xA;2. `toU8a`: `Uint8Array(7) [ 24, 97, 97, 98, 98, 99, 99 ]`&#xD;&#xA;3. `toHex`: `0x18616162626363`&#xD;&#xA;&#xD;&#xA;On the way back, just do the same:&#xD;&#xA;&#xD;&#xA;1. Hex string: `&quot;0x18616162626363&quot;`&#xD;&#xA;2. `toU8a`: `hexToU8a(&quot;0x18616162626363&quot;)`&#xD;&#xA;3. `createType`&#xD;&#xA;&#xD;&#xA;So:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.createType(&quot;String&quot;, hexToU8a(&quot;0x18616162626363&quot;)).toString()&#xD;&#xA;&gt; &quot;aabbcc&quot;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39259" PostHistoryTypeId="50" PostId="6320" RevisionGUID="967add68-ab47-4f71-8520-f90a9186e4df" CreationDate="2023-09-09T21:06:50.843" UserId="-1" />
  <row Id="39260" PostHistoryTypeId="5" PostId="9889" RevisionGUID="744b37fc-7c14-4e6c-8f2f-307a968c1721" CreationDate="2023-09-10T07:34:22.253" UserId="1950" Comment="added 158 characters in body" Text="I have defined an extrinsic function as follows&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::create_record())]&#xD;&#xA;		pub fn create_record(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			issuer_account: T::AccountId,&#xD;&#xA;			input: Data&lt;T::PublicKeySize, T::SignatureSize&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let _who = ensure_signed(origin)?;&#xD;&#xA;			 &#xD;&#xA;			let generated_public_key_from_bytes = Public::from_slice(&amp;input.public_key)&#xD;&#xA;				.map_err(|_| Error::&lt;T&gt;::InvalidPublicKey)?;&#xD;&#xA;&#xD;&#xA;			let generated_signature_from_bytes = Signature::from_slice(&amp;input.signature).ok_or(Error::&lt;T&gt;::InvalidSignature)?;&#xD;&#xA;&#xD;&#xA;		 &#xD;&#xA;&#xD;&#xA;			let is_signature_valid = generated_public_key_from_bytes&#xD;&#xA;				.verify(&amp;input.public_key, &amp;generated_signature_from_bytes)&#xD;&#xA;				.is_ok();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				// more code here&#xD;&#xA;&#xD;&#xA;				Ok(())&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I try to call `verify` function it says its not found. Im using polkadot version `0.9.42` This public key is an ED25519 Key , &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The errors which Im getting &#xD;&#xA;&#xD;&#xA;error[E0599]: no method named `verify` found for struct `sp_core::ecdsa::Public` in the current scope&#xD;&#xA;&#xD;&#xA;and gives this suggestion &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;help: the following trait is implemented but not in scope; perhaps add a `use` for it:&#xD;&#xA;    |&#xD;&#xA;32  +     use frame_support::sp_runtime::sp_application_crypto::RuntimePublic;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But its none existing path&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Tried importing &#xD;&#xA;```&#xD;&#xA; use sp_runtime::traits::Verify;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	use sp_runtime::RuntimeAppPublic;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;separately, but there is no luck&#xD;&#xA;&#xD;&#xA;Im getting the same error if I use `use sp_core::ed25519`&#xD;&#xA;&#xD;&#xA;I have referred to this https://substrate.stackexchange.com/questions/305/how-to-verify-a-signature-in-a-pallet but it was not helpful in this scenario&#xD;&#xA;&#xD;&#xA;How to call verify function to check the signature?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39261" PostHistoryTypeId="50" PostId="9578" RevisionGUID="03c995f5-6b61-446f-9d80-794e4d530aa3" CreationDate="2023-09-10T11:04:20.493" UserId="-1" />
  <row Id="39262" PostHistoryTypeId="2" PostId="9899" RevisionGUID="74be9c6e-080a-4760-b2fc-ce4d3f52a983" CreationDate="2023-09-10T11:28:04.873" UserId="139" Text="We used to have `E0-runtime-migration` labels to track storage migrations of FRAME pallets but I can't see anything on the new repo. Has one not been created yet? " ContentLicense="CC BY-SA 4.0" />
  <row Id="39264" PostHistoryTypeId="1" PostId="9899" RevisionGUID="74be9c6e-080a-4760-b2fc-ce4d3f52a983" CreationDate="2023-09-10T11:28:04.873" UserId="139" Text="What is the new label in polkadot-sdk to track runtime migrations?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39265" PostHistoryTypeId="3" PostId="9899" RevisionGUID="74be9c6e-080a-4760-b2fc-ce4d3f52a983" CreationDate="2023-09-10T11:28:04.873" UserId="139" Text="|storage-migration|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39266" PostHistoryTypeId="50" PostId="6298" RevisionGUID="ba59fa9d-2cfe-4226-8937-7010c40f6413" CreationDate="2023-09-10T12:03:10.830" UserId="-1" />
  <row Id="39267" PostHistoryTypeId="2" PostId="9900" RevisionGUID="e8d5e0a4-3377-4f1a-ab00-09bed3a9102d" CreationDate="2023-09-10T12:50:15.497" UserId="2722" Text="i wanna to build the parchain for run it localy . &#xD;&#xA;&#xD;&#xA;the rust version is : `rustc 1.72.0 (5680fa18f 2023-08-23)`&#xD;&#xA;&#xD;&#xA;but when  i run this command : `cargo build --release` it show me this error : &#xD;&#xA;&#xD;&#xA;    rror[E0061]: this function takes 3 arguments but 2 arguments were supplied&#xD;&#xA;      --&gt; /home/kianoush/.cargo/git/checkouts/ring-vrf-fa8519651343a7ee/c86ebd4/bandersnatch_vrfs/src/ring.rs:34:5&#xD;&#xA;       |&#xD;&#xA;    34 |     PiopParams::setup(domain, &amp;mut rng)&#xD;&#xA;       |     ^^^^^^^^^^^^^^^^^------------------ an argument of type `ark_ec::short_weierstrass::Affine&lt;BandersnatchConfig&gt;` is missing&#xD;&#xA;       |&#xD;&#xA;    note: expected `Affine&lt;BandersnatchConfig&gt;`, found `&amp;mut ChaCha20Rng`&#xD;&#xA;      --&gt; /home/kianoush/.cargo/git/checkouts/ring-vrf-fa8519651343a7ee/c86ebd4/bandersnatch_vrfs/src/ring.rs:34:31&#xD;&#xA;       |&#xD;&#xA;    34 |     PiopParams::setup(domain, &amp;mut rng)&#xD;&#xA;       |                               ^^^^^^^^&#xD;&#xA;       = note:         expected struct `ark_ec::short_weierstrass::Affine&lt;BandersnatchConfig&gt;`&#xD;&#xA;               found mutable reference `&amp;mut ChaCha20Rng`&#xD;&#xA;    note: associated function defined here&#xD;&#xA;      --&gt; /home/kianoush/.cargo/git/checkouts/ring-proof-e9e49c3c86c409a2/8657210/ring/src/piop/params.rs:31:12&#xD;&#xA;       |&#xD;&#xA;    31 |     pub fn setup(domain: Domain&lt;F&gt;, h: Affine&lt;Curve&gt;, seed: Affine&lt;Curve&gt;) -&gt; Self {&#xD;&#xA;       |            ^^^^^&#xD;&#xA;    help: provide the argument&#xD;&#xA;       |&#xD;&#xA;    34 |     PiopParams::setup(domain, /* ark_ec::short_weierstrass::Affine&lt;BandersnatchConfig&gt; */, /* ark_ec::short_weierstrass::Affine&lt;BandersnatchConfig&gt; */)&#xD;&#xA;       |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0061`.&#xD;&#xA;    error: could not compile `bandersnatch_vrfs` (lib) due to previous error&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**how can i sovle this problem ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="39269" PostHistoryTypeId="1" PostId="9900" RevisionGUID="e8d5e0a4-3377-4f1a-ab00-09bed3a9102d" CreationDate="2023-09-10T12:50:15.497" UserId="2722" Text="an argument of type `ark_ec::short_weierstrass::Affine&lt;BandersnatchConfig&gt;` is missing" ContentLicense="CC BY-SA 4.0" />
  <row Id="39270" PostHistoryTypeId="3" PostId="9900" RevisionGUID="e8d5e0a4-3377-4f1a-ab00-09bed3a9102d" CreationDate="2023-09-10T12:50:15.497" UserId="2722" Text="|substrate-node-template|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39271" PostHistoryTypeId="2" PostId="9901" RevisionGUID="c941f428-3316-42f6-b136-8c82777de827" CreationDate="2023-09-10T14:54:35.723" UserId="408" Text="In the Polkadot-JS UI, one can query account data under [Developer &gt; Chain state &gt; system &gt; account][1].&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;According to [Polkadot Wiki][3], we know&#xD;&#xA;&#xD;&#xA;&gt; `data`, the additional data that belongs to this account. Used to store the balance(s) in a lot of chains.&#xD;&#xA;&#xD;&#xA;and &#xD;&#xA;&gt; The `flags` describe extra information about the account.&#xD;&#xA;&#xD;&#xA;But what exactly is the extra information? why is it ever needed? and why only some accounts have it?&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/#/chainstate&#xD;&#xA;  [2]: https://i.stack.imgur.com/mJiTF.png&#xD;&#xA;  [3]: https://wiki.polkadot.network/docs/learn-accounts#query-account-data-in-polkadot-js" ContentLicense="CC BY-SA 4.0" />
  <row Id="39273" PostHistoryTypeId="1" PostId="9901" RevisionGUID="c941f428-3316-42f6-b136-8c82777de827" CreationDate="2023-09-10T14:54:35.723" UserId="408" Text="What is the flags field in system account info?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39274" PostHistoryTypeId="3" PostId="9901" RevisionGUID="c941f428-3316-42f6-b136-8c82777de827" CreationDate="2023-09-10T14:54:35.723" UserId="408" Text="|accountdata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39275" PostHistoryTypeId="50" PostId="8068" RevisionGUID="20a5e254-4d6a-4be4-9110-29402aa3bf3b" CreationDate="2023-09-10T16:04:15.470" UserId="-1" />
  <row Id="39276" PostHistoryTypeId="2" PostId="9902" RevisionGUID="32fef317-ae83-4af9-8db0-6173177403ad" CreationDate="2023-09-10T19:46:47.027" UserId="3346" Text="**I am getting a Contract Trapped error on one specific message in my ink contract.**  I tried putting `overflow-checks = false `into the Cargo.toml. That made no difference. This is the first time I have ever seen that error pop up. This is also the first time I have made a message function that both takes in coin and pays out coin. This contract does not call any other contract. It is completely stand alone.&#xD;&#xA;&#xD;&#xA;**Any ideas on why I am getting a Contract Trapped on this one message?  .... Here's the code...**&#xD;&#xA;&#xD;&#xA;            #[ink(message, payable)]&#xD;&#xA;        #[openbrush::modifiers(non_reentrant)]&#xD;&#xA;        pub fn send_message_to_paid_list (&amp;mut self, &#xD;&#xA;            to_list_id: Hash,&#xD;&#xA;            new_message: Vec&lt;u8&gt;,&#xD;&#xA;            file_url: Vec&lt;u8&gt;,&#xD;&#xA;        ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;&#xD;&#xA;            // COLLECT PAYMENT FROM THE CALLER&#xD;&#xA;            // the 'payable' tag on this message allows the user to send any amount&#xD;&#xA;            let staked: Balance = self.env().transferred_value();&#xD;&#xA;            &#xD;&#xA;            // Does this list exist? and do you own it? If so, proceed&#xD;&#xA;            let caller = Self::env().caller();&#xD;&#xA;            let owned_lists = self.account_owned_paid_lists.get(&amp;caller).unwrap_or_default().hashvector;&#xD;&#xA;            if owned_lists.contains(&amp;to_list_id) {&#xD;&#xA;                &#xD;&#xA;                // total the fees required to send to this list              &#xD;&#xA;                // get the list_accounts from paid_list_details: Mapping&lt;Hash, PaidListDetails&gt;&#xD;&#xA;                let listaccounts = self.paid_list_details.get(&amp;to_list_id).unwrap_or_default().list_accounts;&#xD;&#xA;                let mut total_fee: Balance = 0;&#xD;&#xA;                // for each acccount on the paid list...&#xD;&#xA;                for inbox in &amp;listaccounts {&#xD;&#xA;                    // get their inbox fee from account_settings: Mapping&lt;AccountID, Settings&gt;&#xD;&#xA;                    let fee: Balance = self.account_settings.get(&amp;inbox).unwrap_or_default().inbox_fee;&#xD;&#xA;                    // add it to the total_fee&#xD;&#xA;                    total_fee += fee;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                // if staked is more than total_fee, proceed&#xD;&#xA;                if staked &gt; total_fee {&#xD;&#xA;&#xD;&#xA;                    // set up clones&#xD;&#xA;                    let new_message_clone = new_message.clone();&#xD;&#xA;                    // set up the data that will go into the new_message_id hash&#xD;&#xA;                    let new_timestamp = self.env().block_timestamp();&#xD;&#xA;                    // create the new_message_id by hashing the above data&#xD;&#xA;                    let encodable = (caller, to_list_id, new_message, new_timestamp); // Implements `scale::Encode`&#xD;&#xA;                    let mut new_message_id_u8 = &lt;Sha2x256 as HashOutput&gt;::Type::default(); // 256-bit buffer&#xD;&#xA;                    ink::env::hash_encoded::&lt;Sha2x256, _&gt;(&amp;encodable, &amp;mut new_message_id_u8);&#xD;&#xA;                    let new_message_id: Hash = Hash::from(new_message_id_u8);&#xD;&#xA;&#xD;&#xA;                    // SET UP THE MESSAGE DETAILS FOR THE NEW MESSAGE&#xD;&#xA;                    let fromusername = self.account_settings.get(&amp;caller).unwrap_or_default().username;&#xD;&#xA;                    let listname = self.paid_list_details.get(&amp;to_list_id).unwrap_or_default().list_name;&#xD;&#xA;                    let new_details = ListMessageDetails {&#xD;&#xA;                        message_id: new_message_id,&#xD;&#xA;                        from_acct: Self::env().caller(),&#xD;&#xA;                        username: fromusername,&#xD;&#xA;                        to_list_id: to_list_id,&#xD;&#xA;                        to_list_name: listname,&#xD;&#xA;                        message: new_message_clone,  &#xD;&#xA;                        file_url: file_url,&#xD;&#xA;                        timestamp: self.env().block_timestamp(),&#xD;&#xA;                    };&#xD;&#xA;&#xD;&#xA;                    // add the message to paid_list_message_details: Mapping&lt;Hash, ListMessageDetails&gt;&#xD;&#xA;                    self.paid_list_message_details.insert(&amp;new_message_id, &amp;new_details);&#xD;&#xA;&#xD;&#xA;                    // add the message ID to sent_messages_to_paid_list: Mapping&lt;Hash, HashVector&gt;&#xD;&#xA;                    // get the messages vector for this list&#xD;&#xA;                    let mut current_messages = self.sent_messages_to_paid_list.get(&amp;to_list_id).unwrap_or_default();&#xD;&#xA;                    // add this message to the messages vector for this list&#xD;&#xA;                    current_messages.hashvector.push(new_message_id);&#xD;&#xA;                    // update the sent_messages_to_paid_list map&#xD;&#xA;                    self.sent_messages_to_paid_list.insert(&amp;to_list_id, &amp;current_messages);&#xD;&#xA;&#xD;&#xA;                    // PAY EACH ACCOUNT ON THE PAID LIST &#xD;&#xA;                    for inbox in &amp;listaccounts {&#xD;&#xA;                        // get their inbox fee from account_settings: Mapping&lt;AccountID, Settings&gt;&#xD;&#xA;                        let fee: Balance = self.account_settings.get(&amp;inbox).unwrap_or_default().inbox_fee;&#xD;&#xA;                        // send them their inbox_fee&#xD;&#xA;                        self.env().transfer(*inbox, fee).expect(&quot;payout failed&quot;);&#xD;&#xA;                        if self.env().transfer(*inbox, fee).is_err() {&#xD;&#xA;                            return Err(Error::PayoutFailed);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                    // then pay the caller what is left from their stake after paying the list&#xD;&#xA;                    let leftovers: Balance = staked - total_fee;&#xD;&#xA;                    if leftovers &gt; 0 {&#xD;&#xA;                        self.env().transfer(caller, leftovers).expect(&quot;payout failed&quot;);&#xD;&#xA;                        if self.env().transfer(caller, leftovers).is_err() {&#xD;&#xA;                            return Err(Error::PayoutFailed);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                // if staked is less than or = to the total fee, send an error&#xD;&#xA;                else {&#xD;&#xA;                    return Err(Error::InsufficientStake);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            // if the list does not exist, or you do not own it, send an error&#xD;&#xA;            else {&#xD;&#xA;                return Err(Error::NonexistentList);&#xD;&#xA;            }&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="39278" PostHistoryTypeId="1" PostId="9902" RevisionGUID="32fef317-ae83-4af9-8db0-6173177403ad" CreationDate="2023-09-10T19:46:47.027" UserId="3346" Text="Contract Trapped on Single Message" ContentLicense="CC BY-SA 4.0" />
  <row Id="39279" PostHistoryTypeId="3" PostId="9902" RevisionGUID="32fef317-ae83-4af9-8db0-6173177403ad" CreationDate="2023-09-10T19:46:47.027" UserId="3346" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39287" PostHistoryTypeId="50" PostId="4309" RevisionGUID="0d746a54-b817-40af-924f-616fc128d073" CreationDate="2023-09-11T06:09:11.203" UserId="-1" />
  <row Id="39291" PostHistoryTypeId="2" PostId="9905" RevisionGUID="a0e77241-3882-43c8-8e17-045fd302ffbd" CreationDate="2023-09-11T07:04:03.763" UserId="2348" Text="I am  trying to  do runtime upgrade of my blockchain which is `layer 0` chain  running  on version `0.9.36` . i also have `(ethereum virtual machine` integrated to it ). when i do runtime upgrade of blockchain through `page sudo` everthing is working fine . But when i try to do runtime upgrade from extrinsics call  using sudo pallet the polkadot explorer gets stucked and i have to reopen explorer to continue using it,  And same is also happening while using utility pallet from extrinsics calls.The other pallets are working fine in extrinsics , it is happening for only these two pallets. Can anyone please tell me what is going wrong here and how i can solve this.&#xD;&#xA;&#xD;&#xA;---------------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;[![explorer stucked here][1]][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/FOOtF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39293" PostHistoryTypeId="1" PostId="9905" RevisionGUID="a0e77241-3882-43c8-8e17-045fd302ffbd" CreationDate="2023-09-11T07:04:03.763" UserId="2348" Text="polkadot explorer getting stuck while using utility and sudo pallet from extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="39294" PostHistoryTypeId="3" PostId="9905" RevisionGUID="a0e77241-3882-43c8-8e17-045fd302ffbd" CreationDate="2023-09-11T07:04:03.763" UserId="2348" Text="|polkadot|extrinsic|runtime-upgrade|blockchain|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39295" PostHistoryTypeId="2" PostId="9906" RevisionGUID="af72679c-1923-463a-9cf1-363605d699d9" CreationDate="2023-09-11T07:13:30.743" UserId="251" Text="This is a performance issue. I've encountered it before as well. What I did was open a new browser and try using different wallets. It appears that signing a WASM significantly affects performance." ContentLicense="CC BY-SA 4.0" />
  <row Id="39297" PostHistoryTypeId="2" PostId="9907" RevisionGUID="a551c2a6-d25e-4a9a-80f3-6356c189c0c7" CreationDate="2023-09-11T07:14:05.903" UserId="2762" Text="It is a simple mechanism to indicate whether the new ref-counting logic is in place for this account. &#xD;&#xA;See [the code][1] below:&#xD;&#xA;```rs&#xD;&#xA;const IS_NEW_LOGIC: u128 = 0x80000000_00000000_00000000_00000000u128;&#xD;&#xA;&#xD;&#xA;#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, MaxEncodedLen, TypeInfo)]&#xD;&#xA;pub struct ExtraFlags(u128);&#xD;&#xA;impl Default for ExtraFlags {&#xD;&#xA;	fn default() -&gt; Self {&#xD;&#xA;		Self(IS_NEW_LOGIC)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;impl ExtraFlags {&#xD;&#xA;	pub fn old_logic() -&gt; Self {&#xD;&#xA;		Self(0)&#xD;&#xA;	}&#xD;&#xA;	pub fn set_new_logic(&amp;mut self) {&#xD;&#xA;		self.0 = self.0 | IS_NEW_LOGIC&#xD;&#xA;	}&#xD;&#xA;	pub fn is_new_logic(&amp;self) -&gt; bool {&#xD;&#xA;		(self.0 &amp; IS_NEW_LOGIC) == IS_NEW_LOGIC&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To understand it better you can check this test too [dispatchable_tests.rs][2] where it tests upgrading an account and checking this value:&#xD;&#xA;```rs&#xD;&#xA;assert!(!Balances::account(&amp;7).flags.is_new_logic());&#xD;&#xA;&#xD;&#xA;assert_ok!(Balances::upgrade_accounts(Some(1).into(), vec![7]));&#xD;&#xA;&#xD;&#xA;assert!(Balances::account(&amp;7).flags.is_new_logic());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blame/master/frame/balances/src/types.rs#L111&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/master/frame/balances/src/tests/dispatchable_tests.rs#L192" ContentLicense="CC BY-SA 4.0" />
  <row Id="39299" PostHistoryTypeId="5" PostId="9905" RevisionGUID="19514d53-f5c5-4e6a-827e-e8ae9062a0ae" CreationDate="2023-09-11T07:20:20.653" UserId="354" Comment="corrected spelling, fixed grammar and improved formatting" Text="I am  trying to do a runtime upgrade of my blockchain that is `layer 0` chain  running  on version `polkado-v0.9.36` . I also have `(ethereum virtual machine` integrated to it ). &#xD;&#xA;&#xD;&#xA;When I do runtime upgrade of blockchain through `page-sudo` everthing works fine but when I try to do runtime upgrade from `extrinsics` call  using `pallet_sudo` the polkadot explorer gets stucked and I have to reopen explorer to continue using it, and same is also happening while using `pallet_utility` from `extrinsics` calls.&#xD;&#xA;&#xD;&#xA;The other pallets are working fine in `extrinsics` , it is happening for only these two pallets. Can anyone please tell me what is going wrong here and how I can solve this.&#xD;&#xA;&#xD;&#xA;I am attaching a screenshot below of my page getting stuck and asking me to exit it.&#xD;&#xA;&#xD;&#xA;---------------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;[![explorer stucked here][1]][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/FOOtF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39300" PostHistoryTypeId="24" PostId="9905" RevisionGUID="19514d53-f5c5-4e6a-827e-e8ae9062a0ae" CreationDate="2023-09-11T07:20:20.653" Comment="Proposed by 354 approved by 251, 2348 edit id of 554" ContentLicense="CC BY-SA 4.0" />
  <row Id="39301" PostHistoryTypeId="2" PostId="9908" RevisionGUID="9c09d9ef-ef26-4071-b42e-323fc1e409cd" CreationDate="2023-09-11T07:22:55.150" UserId="4640" Text="An error occurred: 'Expected 2 arguments for the contract message 'vote', but only 1 was provided.First argument was of number type, and the second one an Enum . This error arises when attempting to pass two values, one being a number and the other a string, which are not accepted by the Astar chain.&#xD;&#xA;&#xD;&#xA;i have used this&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  const { gasRequired, result } = await contract?.query?.vote(&#xD;&#xA;    {&#xD;&#xA;      gasLimit: gasLimit,&#xD;&#xA;    },&#xD;&#xA;    12892,&#xD;&#xA;    &quot;noDiscrepancies&quot;&#xD;&#xA;  );&#xD;&#xA;  console.log(&quot;gasRequired&quot;, gasRequired, result);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the ABI :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;label&quot;: &quot;vote&quot;,&#xD;&#xA;        &quot;mutates&quot;: true,&#xD;&#xA;        &quot;payable&quot;: false,&#xD;&#xA;        &quot;returnType&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&#xD;&#xA;            &quot;ink&quot;,&#xD;&#xA;            &quot;MessageResult&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;type&quot;: 17&#xD;&#xA;        },&#xD;&#xA;        &quot;selector&quot;: &quot;0x083be260&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;args&quot;: [&#xD;&#xA;          {&#xD;&#xA;            &quot;label&quot;: &quot;_vote_id&quot;,&#xD;&#xA;            &quot;type&quot;: {&#xD;&#xA;              &quot;displayName&quot;: [&#xD;&#xA;                &quot;u32&quot;&#xD;&#xA;              ],&#xD;&#xA;              &quot;type&quot;: 0&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        &quot;default&quot;: false, &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39303" PostHistoryTypeId="1" PostId="9908" RevisionGUID="9c09d9ef-ef26-4071-b42e-323fc1e409cd" CreationDate="2023-09-11T07:22:55.150" UserId="4640" Text="How to pass value as a argument in send transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39304" PostHistoryTypeId="3" PostId="9908" RevisionGUID="9c09d9ef-ef26-4071-b42e-323fc1e409cd" CreationDate="2023-09-11T07:22:55.150" UserId="4640" Text="|astar|substrate-front-end|javascript|basic-contract-caller|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39305" PostHistoryTypeId="2" PostId="9909" RevisionGUID="90ee3df5-1a7c-4f25-93f9-7d7a69243169" CreationDate="2023-09-11T07:43:44.887" UserId="3414" Text="I am developing a cross-chain NFT transfer pallet that involves transferring both item metadata and collection metadata. To accomplish this, I need to access the `data` field within the `ItemMetadata` struct provided by the FRAME NFT pallet. The challenge lies in the fact that the `data` field is marked as private within the NFT pallet's codebase. Here is the relevant portion of the NFT pallet's code:&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    #[scale_info(skip_type_params(StringLimit))]&#xD;&#xA;    pub struct ItemMetadata&lt;Deposit, StringLimit: Get&lt;u32&gt;&gt; {&#xD;&#xA;    	/// The balance deposited for this metadata.&#xD;&#xA;    	///&#xD;&#xA;    	/// This pays for the data stored in this struct.&#xD;&#xA;    	pub(super) deposit: Deposit,&#xD;&#xA;    	/// General information concerning this item. Limited in length by `StringLimit`. This will&#xD;&#xA;    	/// generally be either a JSON dump or the hash of some JSON which can be found on a&#xD;&#xA;    	/// hash-addressable global publication system such as IPFS.&#xD;&#xA;    	pub(super) data: BoundedVec&lt;u8, StringLimit&gt;,&#xD;&#xA;    }&#xD;&#xA;I'm seeking a solution to access and utilize the data field in my cross-chain transfer functionality while respecting the privacy constraints set in the NFT pallet's design.&#xD;&#xA;Could anyone help me with this." ContentLicense="CC BY-SA 4.0" />
  <row Id="39307" PostHistoryTypeId="1" PostId="9909" RevisionGUID="90ee3df5-1a7c-4f25-93f9-7d7a69243169" CreationDate="2023-09-11T07:43:44.887" UserId="3414" Text="Is it permissible to retrieve the value of a private field within a struct from one pallet while working with another pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39308" PostHistoryTypeId="3" PostId="9909" RevisionGUID="90ee3df5-1a7c-4f25-93f9-7d7a69243169" CreationDate="2023-09-11T07:43:44.887" UserId="3414" Text="|substrate-node-template|polkadot|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39309" PostHistoryTypeId="2" PostId="9910" RevisionGUID="6948a03a-72f1-410d-a540-d38ebdac8a72" CreationDate="2023-09-11T07:51:26.650" UserId="251" Text="There is no way to access private fields in Rust. It is a limitation of the language.&#xD;&#xA;&#xD;&#xA;1. You can fork the NFT pallet and make those fields public.&#xD;&#xA;2. If your context involves encoded bytes, you can copy and redefine this struct in your code and make those fields public. Decode the struct from the bytes and you can access those fields now." ContentLicense="CC BY-SA 4.0" />
  <row Id="39311" PostHistoryTypeId="2" PostId="9911" RevisionGUID="30e34a5e-2238-4623-a3e9-64588e8d16de" CreationDate="2023-09-11T08:27:11.410" UserId="2166" Text="I doesn't seem that the error is a chain related. It will behave the same on any other parachain.&#xD;&#xA;&#xD;&#xA;You need to provide origin (caller address) to the call. &#xD;&#xA;```&#xD;&#xA;const { gasRequired, result } = await contract?.query?.vote(&#xD;&#xA;    callerAddress,&#xD;&#xA;    {&#xD;&#xA;      gasLimit: gasLimit,&#xD;&#xA;    },&#xD;&#xA;    12892,&#xD;&#xA;    &quot;noDiscrepancies&quot;&#xD;&#xA;  );&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39313" PostHistoryTypeId="2" PostId="9912" RevisionGUID="8b1c9919-0565-4e07-a3e7-357ec4935751" CreationDate="2023-09-11T10:55:33.980" UserId="170" Text="Just from a quick look at the code, I think the problem might be you are calling self.env().transfer() two times, and contract is trapped because it fails on `expect` instead of returning a specific error.&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;// calling transfer first time, if it fails we panic - very first call should pass&#xD;&#xA;self.env().transfer(caller, leftovers).expect(&quot;payout failed&quot;);&#xD;&#xA;// if this transfer fails an error is returned, however this can pass and then&#xD;&#xA;// the call can panic on the previous transfer since it is in a loop&#xD;&#xA;if self.env().transfer(caller, leftovers).is_err() {&#xD;&#xA;  return Err(Error::PayoutFailed);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;If you meant to return a specific error if the transfer fails, then you only need &#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;if self.env().transfer(caller, leftovers).is_err() {&#xD;&#xA;  return Err(Error::PayoutFailed);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also a small note - if you want to transfer native tokens to multiple users like this, you should not expect it to pass, one transfer may fail leading to the call panicking and the message not being able to pass anymore (since the accounts are pulled from the storage - will you be able to modify storage in such case? etc.)&#xD;&#xA;&#xD;&#xA;**Example:** If the list contains user A, B and C and transfer to B fails for whatever reason, calling the same message will also try to transfer to the same users." ContentLicense="CC BY-SA 4.0" />
  <row Id="39316" PostHistoryTypeId="2" PostId="9913" RevisionGUID="d7f9a8da-f76c-44f5-9511-1a35712f85bf" CreationDate="2023-09-11T12:24:03.797" UserId="47" Text="all dependencies labels (`E*`) were deprecated since they've been used for releases only and we're aiming for a better release process with proper change logs" ContentLicense="CC BY-SA 4.0" />
  <row Id="39318" PostHistoryTypeId="52" PostId="9908" RevisionGUID="68497702-9b70-4034-8760-524cd0eaf4c9" CreationDate="2023-09-11T15:23:26.513" />
  <row Id="39319" PostHistoryTypeId="52" PostId="9909" RevisionGUID="ccdc1550-88e6-4947-88a3-6ee9a30bb8c2" CreationDate="2023-09-11T15:45:27.167" />
  <row Id="39320" PostHistoryTypeId="5" PostId="9902" RevisionGUID="af88a073-e520-4e20-b692-725fa05deb3a" CreationDate="2023-09-11T17:35:41.360" UserId="354" Comment="improved formatting" Text="**I am getting a Contract Trapped error on one specific message in my ink contract.**  I tried putting `overflow-checks = false `into the Cargo.toml. That made no difference. This is the first time I have ever seen that error pop up. This is also the first time I have made a message function that both takes in coin and pays out coin. This contract does not call any other contract. It is completely stand alone.&#xD;&#xA;&#xD;&#xA;**Any ideas on why I am getting a Contract Trapped on this one message?  .... Here's the code...**&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        #[ink(message, payable)]&#xD;&#xA;        #[openbrush::modifiers(non_reentrant)]&#xD;&#xA;        pub fn send_message_to_paid_list (&amp;mut self, &#xD;&#xA;            to_list_id: Hash,&#xD;&#xA;            new_message: Vec&lt;u8&gt;,&#xD;&#xA;            file_url: Vec&lt;u8&gt;,&#xD;&#xA;        ) -&gt; Result&lt;(), Error&gt; {&#xD;&#xA;&#xD;&#xA;            // COLLECT PAYMENT FROM THE CALLER&#xD;&#xA;            // the 'payable' tag on this message allows the user to send any amount&#xD;&#xA;            let staked: Balance = self.env().transferred_value();&#xD;&#xA;            &#xD;&#xA;            // Does this list exist? and do you own it? If so, proceed&#xD;&#xA;            let caller = Self::env().caller();&#xD;&#xA;            let owned_lists = self.account_owned_paid_lists.get(&amp;caller).unwrap_or_default().hashvector;&#xD;&#xA;            if owned_lists.contains(&amp;to_list_id) {&#xD;&#xA;                &#xD;&#xA;                // total the fees required to send to this list              &#xD;&#xA;                // get the list_accounts from paid_list_details: Mapping&lt;Hash, PaidListDetails&gt;&#xD;&#xA;                let listaccounts = self.paid_list_details.get(&amp;to_list_id).unwrap_or_default().list_accounts;&#xD;&#xA;                let mut total_fee: Balance = 0;&#xD;&#xA;                // for each acccount on the paid list...&#xD;&#xA;                for inbox in &amp;listaccounts {&#xD;&#xA;                    // get their inbox fee from account_settings: Mapping&lt;AccountID, Settings&gt;&#xD;&#xA;                    let fee: Balance = self.account_settings.get(&amp;inbox).unwrap_or_default().inbox_fee;&#xD;&#xA;                    // add it to the total_fee&#xD;&#xA;                    total_fee += fee;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                // if staked is more than total_fee, proceed&#xD;&#xA;                if staked &gt; total_fee {&#xD;&#xA;&#xD;&#xA;                    // set up clones&#xD;&#xA;                    let new_message_clone = new_message.clone();&#xD;&#xA;                    // set up the data that will go into the new_message_id hash&#xD;&#xA;                    let new_timestamp = self.env().block_timestamp();&#xD;&#xA;                    // create the new_message_id by hashing the above data&#xD;&#xA;                    let encodable = (caller, to_list_id, new_message, new_timestamp); // Implements `scale::Encode`&#xD;&#xA;                    let mut new_message_id_u8 = &lt;Sha2x256 as HashOutput&gt;::Type::default(); // 256-bit buffer&#xD;&#xA;                    ink::env::hash_encoded::&lt;Sha2x256, _&gt;(&amp;encodable, &amp;mut new_message_id_u8);&#xD;&#xA;                    let new_message_id: Hash = Hash::from(new_message_id_u8);&#xD;&#xA;&#xD;&#xA;                    // SET UP THE MESSAGE DETAILS FOR THE NEW MESSAGE&#xD;&#xA;                    let fromusername = self.account_settings.get(&amp;caller).unwrap_or_default().username;&#xD;&#xA;                    let listname = self.paid_list_details.get(&amp;to_list_id).unwrap_or_default().list_name;&#xD;&#xA;                    let new_details = ListMessageDetails {&#xD;&#xA;                        message_id: new_message_id,&#xD;&#xA;                        from_acct: Self::env().caller(),&#xD;&#xA;                        username: fromusername,&#xD;&#xA;                        to_list_id: to_list_id,&#xD;&#xA;                        to_list_name: listname,&#xD;&#xA;                        message: new_message_clone,  &#xD;&#xA;                        file_url: file_url,&#xD;&#xA;                        timestamp: self.env().block_timestamp(),&#xD;&#xA;                    };&#xD;&#xA;&#xD;&#xA;                    // add the message to paid_list_message_details: Mapping&lt;Hash, ListMessageDetails&gt;&#xD;&#xA;                    self.paid_list_message_details.insert(&amp;new_message_id, &amp;new_details);&#xD;&#xA;&#xD;&#xA;                    // add the message ID to sent_messages_to_paid_list: Mapping&lt;Hash, HashVector&gt;&#xD;&#xA;                    // get the messages vector for this list&#xD;&#xA;                    let mut current_messages = self.sent_messages_to_paid_list.get(&amp;to_list_id).unwrap_or_default();&#xD;&#xA;                    // add this message to the messages vector for this list&#xD;&#xA;                    current_messages.hashvector.push(new_message_id);&#xD;&#xA;                    // update the sent_messages_to_paid_list map&#xD;&#xA;                    self.sent_messages_to_paid_list.insert(&amp;to_list_id, &amp;current_messages);&#xD;&#xA;&#xD;&#xA;                    // PAY EACH ACCOUNT ON THE PAID LIST &#xD;&#xA;                    for inbox in &amp;listaccounts {&#xD;&#xA;                        // get their inbox fee from account_settings: Mapping&lt;AccountID, Settings&gt;&#xD;&#xA;                        let fee: Balance = self.account_settings.get(&amp;inbox).unwrap_or_default().inbox_fee;&#xD;&#xA;                        // send them their inbox_fee&#xD;&#xA;                        self.env().transfer(*inbox, fee).expect(&quot;payout failed&quot;);&#xD;&#xA;                        if self.env().transfer(*inbox, fee).is_err() {&#xD;&#xA;                            return Err(Error::PayoutFailed);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                    // then pay the caller what is left from their stake after paying the list&#xD;&#xA;                    let leftovers: Balance = staked - total_fee;&#xD;&#xA;                    if leftovers &gt; 0 {&#xD;&#xA;                        self.env().transfer(caller, leftovers).expect(&quot;payout failed&quot;);&#xD;&#xA;                        if self.env().transfer(caller, leftovers).is_err() {&#xD;&#xA;                            return Err(Error::PayoutFailed);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                // if staked is less than or = to the total fee, send an error&#xD;&#xA;                else {&#xD;&#xA;                    return Err(Error::InsufficientStake);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            // if the list does not exist, or you do not own it, send an error&#xD;&#xA;            else {&#xD;&#xA;                return Err(Error::NonexistentList);&#xD;&#xA;            }&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="39321" PostHistoryTypeId="24" PostId="9902" RevisionGUID="af88a073-e520-4e20-b692-725fa05deb3a" CreationDate="2023-09-11T17:35:41.360" Comment="Proposed by 354 approved by 3346 edit id of 553" ContentLicense="CC BY-SA 4.0" />
  <row Id="39323" PostHistoryTypeId="2" PostId="9914" RevisionGUID="d2cd558a-d79d-4229-abdf-bac767ee6118" CreationDate="2023-09-11T20:19:22.800" UserId="4643" Text="Its a glitch with the metadata, i was getting the same error but tried again today and updated the metadata and its working now!" ContentLicense="CC BY-SA 4.0" />
  <row Id="39325" PostHistoryTypeId="5" PostId="9863" RevisionGUID="a1001be7-4495-4a0c-8c33-a51659e545e4" CreationDate="2023-09-11T22:32:11.723" UserId="4032" Comment="added 734 characters in body" Text="Is it possible to determine all of the IP addresses of validators on the network? I imagine it is necessary to be able to, but is there a direct call that can be made to a running validator node?&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;I've tried calling `authority-discovery` a few ways, but it seems there are issues accessing it due to private fields. I haven't found any examples of it being called directly except for tests, which have their own pseudo instantiations (not sure the proper Rust terminology). The supposed &quot;polkadot-sdk&quot; is starting to feel a little &quot;black box&quot;.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let (worker, service) = sc_authority_discovery::new_worker_and_service(&#xD;&#xA;    client.clone(),&#xD;&#xA;    network.clone(),&#xD;&#xA;    Box::pin(dht_event_stream),&#xD;&#xA;    authority_discovery_role,&#xD;&#xA;    prometheus_registry.clone(),&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;This is from a test, but I haven't seen a clean example of the `client` and `network` objects being created in the docs or any other project." ContentLicense="CC BY-SA 4.0" />
  <row Id="39326" PostHistoryTypeId="2" PostId="9915" RevisionGUID="00e44faf-449e-4b70-acde-5154901056b7" CreationDate="2023-09-12T04:49:58.337" UserId="309" Text="My pallet is using the following frame pallets: Democracy,Utility,&amp; Collective.&#xD;&#xA;the trait Config is as follows:&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39328" PostHistoryTypeId="1" PostId="9915" RevisionGUID="00e44faf-449e-4b70-acde-5154901056b7" CreationDate="2023-09-12T04:49:58.337" UserId="309" Text="Cycle detected when computing layout of `RuntimeCall`" ContentLicense="CC BY-SA 4.0" />
  <row Id="39329" PostHistoryTypeId="3" PostId="9915" RevisionGUID="00e44faf-449e-4b70-acde-5154901056b7" CreationDate="2023-09-12T04:49:58.337" UserId="309" Text="|runtime|pallet-collective|pallet-democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39330" PostHistoryTypeId="5" PostId="9915" RevisionGUID="58ed9db3-27c7-4644-88db-f73fc0fe6557" CreationDate="2023-09-12T05:13:59.407" UserId="309" Comment="added 632 characters in body" Text="My pallet is using the following frame pallets: Democracy,Utility,&amp; Collective (I have two instances of collective, but I'm using only &lt;Instance1&gt; in this pallet).&#xD;&#xA;the trait Config is as follows:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   type RuntimeCall: Parameter&#xD;&#xA;    		+ Dispatchable&lt;RuntimeOrigin = &lt;Self as frame_system::Config&gt;::RuntimeOrigin, PostInfo = PostDispatchInfo&gt;&#xD;&#xA;    		+ GetDispatchInfo&#xD;&#xA;    		+ From&lt;frame_system::Call&lt;Self&gt;&gt;&#xD;&#xA;    		+ UnfilteredDispatchable&lt;RuntimeOrigin = &lt;Self as frame_system::Config&gt;::RuntimeOrigin&gt;&#xD;&#xA;    		+ IsSubType&lt;Call&lt;Self&gt;&gt;&#xD;&#xA;    		+ IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeCall&gt;;&#xD;&#xA;    		&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I really can't figure out the problem with RuntimeCall definition. Any idea on how I can solve this error...PLEASE?&#xD;&#xA;&#xD;&#xA;Kazunobu&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39331" PostHistoryTypeId="5" PostId="9915" RevisionGUID="08b49023-3062-4726-9aa5-9b649f0b076b" CreationDate="2023-09-12T05:35:02.820" UserId="309" Comment="added 632 characters in body" Text="My pallet is using the following frame pallets: Democracy,Utility,&amp; Collective (I have two instances of collective, but I'm using only `&lt;Instance1&gt;` in this pallet).&#xD;&#xA;the trait Config is as follows:&#xD;&#xA;```rust&#xD;&#xA;    type RuntimeCall: Parameter  &#xD;&#xA;    + Dispatchable&lt;RuntimeOrigin = &lt;Self as frame_system::Config&gt;::RuntimeOrigin, PostInfo = PostDispatchInfo&gt;  &#xD;&#xA;    + GetDispatchInfo  + From&lt;frame_system::Call&lt;Self&gt;&gt;  &#xD;&#xA;    + UnfilteredDispatchable&lt;RuntimeOrigin = &lt;Self as frame_system::Config&gt;::RuntimeOrigin&gt;  &#xD;&#xA;    + IsSubType&lt;Call&lt;Self&gt;&gt;  &#xD;&#xA;    + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeCall&gt;;  &#xD;&#xA;```	&#xD;&#xA;&#xD;&#xA;I really can't figure out the problem with RuntimeCall definition. Any idea on how I can solve this error...PLEASE?&#xD;&#xA;&#xD;&#xA;Kazunobu&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39332" PostHistoryTypeId="5" PostId="9915" RevisionGUID="0385b56f-a001-4654-a0b2-d4cc22ec767c" CreationDate="2023-09-12T05:38:36.567" UserId="354" Comment="fixed grammar and improved formatting" Text="My pallet is using the following frame pallets: Democracy, Utility &amp; Collective &#xD;&#xA;&#xD;&#xA;I have two instances of collective, but I'm using only &lt;Instance1&gt; in this pallet.&#xD;&#xA;The trait Config is as follows:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;```rust&#xD;&#xA;    type RuntimeCall: Parameter&#xD;&#xA;        		+ Dispatchable&lt;RuntimeOrigin = &lt;Self as frame_system::Config&gt;::RuntimeOrigin, PostInfo = PostDispatchInfo&gt;&#xD;&#xA;        		+ GetDispatchInfo&#xD;&#xA;        		+ From&lt;frame_system::Call&lt;Self&gt;&gt;&#xD;&#xA;        		+ UnfilteredDispatchable&lt;RuntimeOrigin = &lt;Self as frame_system::Config&gt;::RuntimeOrigin&gt;&#xD;&#xA;        		+ IsSubType&lt;Call&lt;Self&gt;&gt;&#xD;&#xA;        		+ IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeCall&gt;;&#xD;&#xA;```&#xD;&#xA;    		&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I really can't figure out the problem with RuntimeCall definition. Any idea on how I can solve this error...PLEASE?&#xD;&#xA;&#xD;&#xA;Kazunobu&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39333" PostHistoryTypeId="24" PostId="9915" RevisionGUID="0385b56f-a001-4654-a0b2-d4cc22ec767c" CreationDate="2023-09-12T05:38:36.567" Comment="Proposed by 354 approved by 309 edit id of 555" ContentLicense="CC BY-SA 4.0" />
  <row Id="39334" PostHistoryTypeId="5" PostId="9915" RevisionGUID="32544b41-038b-4001-866a-bc8d189ae532" CreationDate="2023-09-12T05:57:03.113" UserId="309" Comment="added 420 characters in body" Text="My pallet is using the following frame pallets: Democracy, Utility &amp; Collective. &#xD;&#xA;The error I get is:&#xD;&#xA;cycle used when elaborating drops for `&lt;impl at /home/kazu/Polkadot/fair-squares/runtime/src/lib.rs:634:1: 652:10&gt;::clone`  &#xD;&#xA;    --&gt; /home/kazu/Polkadot/fair-squares/runtime/src/lib.rs:634:1 &#xD;&#xA;&#xD;&#xA;    635 | ||     pub struct Runtime  &#xD;&#xA;    ...   ||  &#xD;&#xA;    651 | ||         Utility: pallet_utility,  &#xD;&#xA;    634 | // construct_runtime!(  &#xD;&#xA;    652 | ||         Council: pallet_collective::&lt;Instance1&gt;, &#xD;&#xA;&#xD;&#xA;I have two instances of collective, but I'm using only Instance1 in this pallet.&#xD;&#xA;The trait Config is as follows:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;```rust&#xD;&#xA;    type RuntimeCall: Parameter&#xD;&#xA;        		+ Dispatchable&lt;RuntimeOrigin = &lt;Self as frame_system::Config&gt;::RuntimeOrigin, PostInfo = PostDispatchInfo&gt;&#xD;&#xA;        		+ GetDispatchInfo&#xD;&#xA;        		+ From&lt;frame_system::Call&lt;Self&gt;&gt;&#xD;&#xA;        		+ UnfilteredDispatchable&lt;RuntimeOrigin = &lt;Self as frame_system::Config&gt;::RuntimeOrigin&gt;&#xD;&#xA;        		+ IsSubType&lt;Call&lt;Self&gt;&gt;&#xD;&#xA;        		+ IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeCall&gt;;&#xD;&#xA;```&#xD;&#xA;    		&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I really can't figure out the problem with RuntimeCall definition. Any idea on how I can solve this error...PLEASE?&#xD;&#xA;&#xD;&#xA;Kazunobu&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39335" PostHistoryTypeId="5" PostId="9915" RevisionGUID="56798c7a-63ee-4089-8cd0-3666f48e78cd" CreationDate="2023-09-12T06:16:54.903" UserId="309" Comment="added 34 characters in body" Text="My pallet is using the following frame pallets: Democracy, Utility &amp; Collective. &#xD;&#xA;The error I get is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;cycle used when elaborating drops for `&lt;impl at /home/kazu/Polkadot/fair-squares/runtime/src/lib.rs:634:1: 652:10&gt;::clone`  &#xD;&#xA;    --&gt; /home/kazu/Polkadot/fair-squares/runtime/src/lib.rs:634:1 &#xD;&#xA;    635 | ||     pub struct Runtime  &#xD;&#xA;    ...   ||  &#xD;&#xA;    651 | ||         Utility: pallet_utility,  &#xD;&#xA;    634 | // construct_runtime!(  &#xD;&#xA;    652 | ||         Council: pallet_collective::&lt;Instance1&gt;,  &#xD;&#xA;        | ||_________^  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have two instances of collective, but I'm using only Instance1 in this pallet.&#xD;&#xA;The trait Config is as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    type RuntimeCall: Parameter&#xD;&#xA;        		+ Dispatchable&lt;RuntimeOrigin = &lt;Self as frame_system::Config&gt;::RuntimeOrigin, PostInfo = PostDispatchInfo&gt;  &#xD;&#xA;        		+ GetDispatchInfo  &#xD;&#xA;        		+ From&lt;frame_system::Call&lt;Self&gt;&gt;  &#xD;&#xA;        		+ UnfilteredDispatchable&lt;RuntimeOrigin = &lt;Self as frame_system::Config&gt;::RuntimeOrigin&gt;  &#xD;&#xA;        		+ IsSubType&lt;Call&lt;Self&gt;&gt;  &#xD;&#xA;        		+ IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeCall&gt;;  &#xD;&#xA;```&#xD;&#xA;I really can't figure out the problem with RuntimeCall definition. Any idea on how I can solve this error...PLEASE?&#xD;&#xA;&#xD;&#xA;Kazunobu&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39336" PostHistoryTypeId="2" PostId="9916" RevisionGUID="c2c22412-cc6c-4e76-898a-b85cb12d6053" CreationDate="2023-09-12T07:26:31.120" UserId="2722" Text="I am working on a Rust project where I have multiple modules. I'm facing an issue with unresolved imports when I try to compile my code. Here's the relevant code structure:&#xD;&#xA;&#xD;&#xA;`types.rs`&#xD;&#xA;&#xD;&#xA;    pub mod Types {&#xD;&#xA;    &#xD;&#xA;    	pub use crate::pallet::Config;&#xD;&#xA;    	use crate::structs::NFTStructs::{Collection, ShareProfitsInfo, NFT};&#xD;&#xA;    	use frame_support::traits::Currency;&#xD;&#xA;    	use frame_system::Config as SystemConfig;&#xD;&#xA;    &#xD;&#xA;    	pub type BalanceOf&lt;T&gt; =&#xD;&#xA;    		&lt;&lt;T as Config&gt;::NFTCurrency as Currency&lt;&lt;T as SystemConfig&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;    &#xD;&#xA;    	pub type HashId&lt;T&gt; = &lt;T as frame_system::Config&gt;::Hash;&#xD;&#xA;    &#xD;&#xA;    	pub type CollectionDetailsOf&lt;T&gt; = Collection&lt;&lt;T as SystemConfig&gt;::AccountId, HashId&lt;T&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    	pub type SahreProfitDetailsOf&lt;T&gt; = ShareProfitsInfo&lt;&lt;T as SystemConfig&gt;::AccountId&gt;;&#xD;&#xA;    &#xD;&#xA;    	pub type NFTDetailsOf&lt;T&gt; = NFT&lt;&lt;T as SystemConfig&gt;::AccountId, BalanceOf&lt;T&gt;&gt;;&#xD;&#xA;    &#xD;&#xA;    	pub type AccountOf&lt;T&gt; = &lt;T as SystemConfig&gt;::AccountId;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`lib.rs`&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    use codec::{alloc::vec, Decode, Encode, HasCompact, MaxEncodedLen};&#xD;&#xA;    use frame_support::sp_runtime::{&#xD;&#xA;    	traits::{AtLeast32BitUnsigned, CheckedAdd, Hash, Member, One},&#xD;&#xA;    	DispatchError, SaturatedConversion,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    use frame_support::{&#xD;&#xA;    	inherent::Vec,&#xD;&#xA;    	pallet_prelude::{ValueQuery, *},&#xD;&#xA;    	traits::{Currency, ExistenceRequirement, Get, ReservableCurrency},&#xD;&#xA;    	transactional, Twox64Concat,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    &#xD;&#xA;    pub mod structs;&#xD;&#xA;    pub use structs::NFTStructs::{Collection, Owners, NFT};&#xD;&#xA;    &#xD;&#xA;    pub mod types;&#xD;&#xA;    pub use types::Types::{&#xD;&#xA;    	AccountOf, BalanceOf, CollectionDetailsOf, HashId, NFTDetailsOf, SahreProfitDetailsOf,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod mock;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests;&#xD;&#xA;    &#xD;&#xA;    pub mod weights;&#xD;&#xA;    pub use weights::*;&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    &#xD;&#xA;    	use super::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;    		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    		/// Type representing the weight of this pallet&#xD;&#xA;    		type NFTPalletWeightInfo: WeightInfo;&#xD;&#xA;    		/// The currency mechanism, used for paying for reserves.&#xD;&#xA;    		type NFTCurrency: ReservableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;    &#xD;&#xA;    		type NFTGallery: MarketPalceHelper&lt;&#xD;&#xA;    			MarketHash = Self::Hash,&#xD;&#xA;    			UserAccountId = Self::AccountId,&#xD;&#xA;    			Balance = BalanceOf&lt;Self&gt;,&#xD;&#xA;    		&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;but when i excute command `cargo check` it show me these errors :&#xD;&#xA;&#xD;&#xA;&gt;error[E0432]: unresolved imports `crate::pallet`, `crate::types::Types::Config`, `crate::AccountOf`&#xD;&#xA; --&gt; frame/new-nft/src/types.rs:2:17&#xD;&#xA;  |&#xD;&#xA;2 |     pub use crate::pallet::Config; // Import `Config` from the pallet module&#xD;&#xA;  |                    ^^^^^^&#xD;&#xA;  |                    |&#xD;&#xA;  |                    unresolved import&#xD;&#xA;  |                    help: a similar path exists: `frame_system::pallet`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;error[E0432]: unresolved import `pallet`&#xD;&#xA;  --&gt; frame/new-nft/src/lib.rs:17:9&#xD;&#xA;   |&#xD;&#xA;17 | pub use pallet::*;&#xD;&#xA;   |         ^^^^^^ help: a similar path exists: `utility::pallet`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;`Utiles :`&#xD;&#xA;&#xD;&#xA;    pub mod Utility {&#xD;&#xA;    	use crate::{&#xD;&#xA;    		types::Types::{BalanceOf, Config, SahreProfitDetailsOf},&#xD;&#xA;    		AccountOf,&#xD;&#xA;    	};&#xD;&#xA;    	use frame_support::{&#xD;&#xA;    		dispatch::DispatchError,&#xD;&#xA;    		inherent::Vec,&#xD;&#xA;    		sp_runtime::traits::SaturatedConversion,&#xD;&#xA;    		traits::{Currency, ExistenceRequirement},&#xD;&#xA;    	};&#xD;&#xA;    	use sp_runtime::traits::UniqueSaturatedFrom;&#xD;&#xA;&#xD;&#xA;`structs :`&#xD;&#xA;&#xD;&#xA;    use codec::{Decode, Encode, MaxEncodedLen};&#xD;&#xA;    use frame_support::{traits::ConstU32, BoundedVec};&#xD;&#xA;    use scale_info::TypeInfo;&#xD;&#xA;    use sp_runtime::RuntimeDebug;&#xD;&#xA;    use frame_support::inherent::Vec;&#xD;&#xA;    &#xD;&#xA;    pub mod NFTStructs {&#xD;&#xA;    	use super::*;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Whats the Problem ? how can i solve the problem ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="39338" PostHistoryTypeId="1" PostId="9916" RevisionGUID="c2c22412-cc6c-4e76-898a-b85cb12d6053" CreationDate="2023-09-12T07:26:31.120" UserId="2722" Text="Rust Compile Error: Unresolved imports crate::pallet, crate::types::Types::Config" ContentLicense="CC BY-SA 4.0" />
  <row Id="39339" PostHistoryTypeId="3" PostId="9916" RevisionGUID="c2c22412-cc6c-4e76-898a-b85cb12d6053" CreationDate="2023-09-12T07:26:31.120" UserId="2722" Text="|substrate-node-template|polkadot|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39340" PostHistoryTypeId="2" PostId="9917" RevisionGUID="b2640c0e-b8ea-44f0-96c0-47ec75d3a74a" CreationDate="2023-09-12T07:28:05.203" UserId="280" Text="What contents of a non-raw chain spec can be added or altered without mutating the derived genesis hash? More specifically, does changing a pallet's genesis configuration in the spec lead to a different genesis hash?&#xD;&#xA;&#xD;&#xA;**Context**: Say a test-network halts and requires `codeSubstitutes` addition in the chain spec. However, upon restarting with the altered spec, the client throws with&#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;\&quot;Error parsing embedded file: unknown field `interestAccrual`, expected one of `system`, `parachainSystem`, `parachainInfo`, `balances`, `collatorSelection`, `session`, `aura`, `auraExt`, `council`, `elections`, `democracy`, `vesting`, `treasury`, `fees`, `collatorAllowlist`, `blockRewardsBase`, `blockRewards`, `liquidityRewardsBase`, `polkadotXcm`, `ormlTokens`, `ormlAssetRegistry`, `evm`, `evmChainId`, `baseFee`, `ethereum` at line 193 column 24\&quot;&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;because some pallets' genesis configurations have changed in between the testnet's genesis and now. This problem can be solved by updating/removing the erroneous pallets' configurations in the spec. However, that does not appear to be the correct approach." ContentLicense="CC BY-SA 4.0" />
  <row Id="39342" PostHistoryTypeId="1" PostId="9917" RevisionGUID="b2640c0e-b8ea-44f0-96c0-47ec75d3a74a" CreationDate="2023-09-12T07:28:05.203" UserId="280" Text="Alter existing chain spec without mutating genesis hash" ContentLicense="CC BY-SA 4.0" />
  <row Id="39343" PostHistoryTypeId="3" PostId="9917" RevisionGUID="b2640c0e-b8ea-44f0-96c0-47ec75d3a74a" CreationDate="2023-09-12T07:28:05.203" UserId="280" Text="|chainspec|genesis|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39344" PostHistoryTypeId="2" PostId="9918" RevisionGUID="07cd4af7-f5ee-4a4e-8f75-694a533e7ead" CreationDate="2023-09-12T07:32:07.373" UserId="2722" Text="you can run `cargo update` for find and remove old packages and update that to new version . i faced this problem and it fixed by this command . " ContentLicense="CC BY-SA 4.0" />
  <row Id="39346" PostHistoryTypeId="5" PostId="9917" RevisionGUID="b373aae1-022d-4f75-a5e5-44e32f2ae0cc" CreationDate="2023-09-12T07:35:23.513" UserId="280" Comment="added 229 characters in body" Text="What contents of a non-raw chain spec can be added or altered without mutating the derived genesis hash? More specifically, does changing a pallet's genesis configuration in the spec lead to a different genesis hash?&#xD;&#xA;&#xD;&#xA;**Context**: Say a test-network halts and requires `codeSubstitutes` addition in the chain spec. However, upon restarting with the altered spec, the client throws with&#xD;&#xA;```&#xD;&#xA;Error: Input(&quot;\&quot;Error parsing embedded file: unknown field `interestAccrual`, expected one of `system`, `parachainSystem`, `parachainInfo`, `balances`, `collatorSelection`, `session`, `aura`, `auraExt`, `council`, `elections`, `democracy`, `vesting`, `treasury`, `fees`, `collatorAllowlist`, `blockRewardsBase`, `blockRewards`, `liquidityRewardsBase`, `polkadotXcm`, `ormlTokens`, `ormlAssetRegistry`, `evm`, `evmChainId`, `baseFee`, `ethereum` at line 193 column 24\&quot;&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;because some pallets' genesis configurations have changed in between the testnet's genesis and now such that the `GenesisBuild` storage behaves differently. This problem can be solved by updating/removing the erroneous pallets' configurations/storages in the spec. However, that does not appear to be the correct approach as I fear it will lead to a different genesis hash.&#xD;&#xA;&#xD;&#xA;Shouldn't the `genesis.runtime.system.code` be used automatically to not run into the stated compiler error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39347" PostHistoryTypeId="2" PostId="9919" RevisionGUID="52366a17-9693-4e62-afb2-f8f268253563" CreationDate="2023-09-12T07:46:54.640" UserId="3317" Text="The genesis hash is the hash of the genesis storage. So changing a pallet's genesis configuration (genesis storage) will indeed result in a different genesis hash.&#xD;&#xA;&#xD;&#xA;When launching a node to your network with `codeSubstitutes` it needs the same genesis state as how the network was initially launched." ContentLicense="CC BY-SA 4.0" />
  <row Id="39349" PostHistoryTypeId="5" PostId="9919" RevisionGUID="2fe9e7dd-93bf-4f49-a6e7-dc96ee808e20" CreationDate="2023-09-12T08:39:31.107" UserId="3317" Comment="added 114 characters in body" Text="The genesis hash is the hash of the genesis storage. So changing a pallet's genesis configuration (genesis storage) will indeed result in a different genesis hash.&#xD;&#xA;&#xD;&#xA;When launching a node to your network with `codeSubstitutes` it needs the same genesis state as how the network was initially launched. In other words, don't modify the chainspec aside from including a new validation function in `codeSubstitutes`.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39350" PostHistoryTypeId="5" PostId="9551" RevisionGUID="3bc89620-4f8b-4829-b8b8-3d125f51a07b" CreationDate="2023-09-12T08:47:54.760" UserId="3122" Comment="added 44 characters in body" Text="You probably need to specify custom `types.json` in `polkadot.js.org`. These links might be helpful: &#xD;&#xA; 1. https://polkadot.js.org/docs/api/start/types.extend/&#xD;&#xA; 2. https://stackoverflow.com/questions/68487857/how-to-generate-types-json-in-substrate&#xD;&#xA;&#xD;&#xA;Also, try to clear the browser cache. " ContentLicense="CC BY-SA 4.0" />
  <row Id="39351" PostHistoryTypeId="2" PostId="9920" RevisionGUID="309221fe-4515-409f-981b-6c9450d6cfbe" CreationDate="2023-09-12T10:01:16.517" UserId="2762" Text="I am doing a transfer in AssetHub and I want to use another asset to pay fees. I have seen an example in JavaScript where it needs to specify the `assetId` in the `signAndSend` function:&#xD;&#xA;```js&#xD;&#xA;await api.tx.balances&#xD;&#xA;    .transfer(address, 100)&#xD;&#xA;    .signAndSend(signer, { assetId: tokenId });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How I can do that in Subxt? I checked the example in the Subxt repository on how to send a tx with params([see code][1]): &#xD;&#xA;```rs&#xD;&#xA;    // Configure the transaction parameters; we give a small tip and set the&#xD;&#xA;    // transaction to live for 32 blocks from the `latest_block` above.&#xD;&#xA;    let tx_params = Params::new()&#xD;&#xA;        .tip(1_000)&#xD;&#xA;        .mortal(latest_block.header(), 32)&#xD;&#xA;        .build();&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;But is only to add a tip, how can I specify the asset_id I want to use to pay fees?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/subxt/blob/master/subxt/examples/tx_with_params.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="39353" PostHistoryTypeId="1" PostId="9920" RevisionGUID="309221fe-4515-409f-981b-6c9450d6cfbe" CreationDate="2023-09-12T10:01:16.517" UserId="2762" Text="Specify asset to pay fees in a transfer - Subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="39354" PostHistoryTypeId="3" PostId="9920" RevisionGUID="309221fe-4515-409f-981b-6c9450d6cfbe" CreationDate="2023-09-12T10:01:16.517" UserId="2762" Text="|subxt|assets|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39355" PostHistoryTypeId="2" PostId="9921" RevisionGUID="0bee5735-d146-4af1-ae23-5615604a5990" CreationDate="2023-09-12T10:45:25.290" UserId="2762" Text="Check this previous StackExchange question [Backing off claiming new slot for block authorship: finality is lagging][1], it has a great explanation of what might can happen.&#xD;&#xA;&#xD;&#xA;Do you change something with the keys of a node? it might be something related to some node don't have the necessary keys to vote.&#xD;&#xA;&#xD;&#xA;For investigate that query the [grandpa_roundState][2] RPC it returns the state of the current best round state as well as the ongoing background rounds, this should allow identifying who are the validators that have not voted yet. If something with the keys you might be able to recover it very easy. &#xD;&#xA;&#xD;&#xA;Read this brilliant StackExchange answer from Andre for more detailled information: [Recovering from stalled finality (babe/grandpa)][3].&#xD;&#xA;&#xD;&#xA;The last step to recover is to use as Alejandro suggested in the comments the extrinsic [note_stalled][4], This will trigger a forced authority set change at the beginning of the next session, to be enacted `delay` blocks after that. &#xD;&#xA;&#xD;&#xA;Be sure you pick the proper parameters for the extrinsic, take a look in this previous SE answer: [How to use noteStalled to recover from a finality lagging chain?][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/675/backing-off-claiming-new-slot-for-block-authorship-finality-is-lagging&#xD;&#xA;  [2]: https://polkadot.js.org/docs/substrate/rpc/#roundstate-reportedroundstates&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/380/2762&#xD;&#xA;  [4]: https://polkadot.js.org/docs/kusama/extrinsics#notestalleddelay-u32-best_finalized_block_number-u32&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/661/how-to-use-notestalled-to-recover-from-a-finality-lagging-chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="39357" PostHistoryTypeId="2" PostId="9922" RevisionGUID="bc07b915-e445-4247-afeb-1d8934261e9b" CreationDate="2023-09-12T10:46:15.443" UserId="474" Text="For setting an asset ID to use in the current release of Subxt (0.31.0), you'd construct extrinsic params like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use subxt::config::substrate::AssetTip;&#xD;&#xA;&#xD;&#xA;let tx_params = Params::new()&#xD;&#xA;    .tip(AssetTip::new(1_000).of_asset(123)) // 123 is the asset ID to tip&#xD;&#xA;    .era(Era::Immortal, api.genesis_hash());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then pass these params to one of the functions responsible for submitting a transaction, for instance:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;api.tx().sign_and_submit_then_watch(&amp;some_tx, &amp;from, tx_params).await?&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The signed extension responsible for requiring fees that can be paid using a different asset ID is `ChargeAssetTxPayment` (chains like Polkadot which have only one token that can be used will instead use the `ChargeTransactionPayment` signed extension, which only asks for a tip amount and not an optional asset ID). This looks like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Require payment for transaction inclusion and optionally include a tip to gain additional&#xD;&#xA;/// priority in the queue. Allows paying via both `Currency` as well as `fungibles::Balanced`.&#xD;&#xA;///&#xD;&#xA;/// Wraps the transaction logic in [`pallet_transaction_payment`] and extends it with assets.&#xD;&#xA;/// An asset ID of `None` falls back to the underlying transaction payment logic via the native&#xD;&#xA;/// currency.&#xD;&#xA;#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)]&#xD;&#xA;#[scale_info(skip_type_params(T))]&#xD;&#xA;pub struct ChargeAssetTxPayment&lt;T: Config&gt; {&#xD;&#xA;	#[codec(compact)]&#xD;&#xA;	tip: BalanceOf&lt;T&gt;,&#xD;&#xA;	asset_id: Option&lt;ChargeAssetIdOf&lt;T&gt;&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The comment (and code that I skimmed over) suggests that if we provide an `asset_id` that is not `None` here, then that asset ID will be used to pay both transaction fees and any tip that's given. If the `asset_id` is `None`, then we fall back to using the native chain token to pay the fees and tip." ContentLicense="CC BY-SA 4.0" />
  <row Id="39359" PostHistoryTypeId="2" PostId="9923" RevisionGUID="bebff1e4-3d11-4df9-a08e-aff5953c610e" CreationDate="2023-09-12T11:00:24.447" UserId="275" Text="I'm really, sorry. The reason was chain-spec raw.json file had some wrong data. After recreating spec json, it started to produce blocks." ContentLicense="CC BY-SA 4.0" />
  <row Id="39361" PostHistoryTypeId="5" PostId="9878" RevisionGUID="e2ab830e-df4e-44e3-bf60-d32a145c650b" CreationDate="2023-09-12T11:20:12.460" UserId="354" Comment="improved formatting" Text="Is it possible to create a `ContractReference` to perform a `cross-contract` call from `ink::trait_definition`?&#xD;&#xA;&#xD;&#xA;If it is, how can I do so?&#xD;&#xA;&#xD;&#xA;If it is not, why it is not possible? It seems strange that we can only create a reference to the whole contract and not to a single trait the contract is implementing." ContentLicense="CC BY-SA 4.0" />
  <row Id="39362" PostHistoryTypeId="24" PostId="9878" RevisionGUID="e2ab830e-df4e-44e3-bf60-d32a145c650b" CreationDate="2023-09-12T11:20:12.460" Comment="Proposed by 354 approved by -1 edit id of 550" ContentLicense="CC BY-SA 4.0" />
  <row Id="39363" PostHistoryTypeId="5" PostId="9878" RevisionGUID="20368c4e-d75c-4944-9624-a9b5c7ac3d26" CreationDate="2023-09-12T11:20:12.460" UserId="234" Comment="improved formatting" Text="Is it possible to create a [Contract Reference][1] to perform a Cross-Contract call from `ink::trait_definition`?&#xD;&#xA;&#xD;&#xA;If it is, how can I do so?&#xD;&#xA;&#xD;&#xA;If it is not, why it is not possible? It seems strange that we can only create a reference to the whole contract and not to a single trait the contract is implementing.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/basics/cross-contract-calling/#contract-references" ContentLicense="CC BY-SA 4.0" />
  <row Id="39364" PostHistoryTypeId="4" PostId="9878" RevisionGUID="20368c4e-d75c-4944-9624-a9b5c7ac3d26" CreationDate="2023-09-12T11:20:12.460" UserId="234" Comment="improved formatting" Text="Deriving Contract Reference from `ink::trait_definition`" ContentLicense="CC BY-SA 4.0" />
  <row Id="39365" PostHistoryTypeId="5" PostId="9809" RevisionGUID="2101c0e4-c8f1-4a38-84c6-0e79cfdb6719" CreationDate="2023-09-12T12:57:40.793" UserId="2348" Comment="added 2 characters in body" Text="I am doing runtime upgrade of substrate blockchain from `0.9.36 --&gt; 0.9.37 ---&gt;0.9.43` . And i have some contracts deployed on the running blockchain which is running on 36 version  . After doing runtime upgrade from `0.9.36 ---&gt; 0.9.39` version . I tried to check contracts on my chain. When I tried to call them through `substrate contracts-ui`   (on my chain which is now runtime upgraded to 39 version from 36 version)   it  is showing contracts not found  and I am unable to call my deployed contracts . The same is also happening on my other chain which I  runtime upgraded from `43 version` to `1.0.0 version` can someone please tell me how to solve this &#xD;&#xA;issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![error i am getting in ui after upgrading ][1]][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/omCCh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39366" PostHistoryTypeId="50" PostId="9123" RevisionGUID="9b7fbc4c-69d8-4849-9737-203c4fad46fd" CreationDate="2023-09-12T15:08:41.030" UserId="-1" />
  <row Id="39367" PostHistoryTypeId="52" PostId="9920" RevisionGUID="bf500ce4-3d6b-4fea-9f75-6f240f32e8a2" CreationDate="2023-09-12T18:03:02.350" />
  <row Id="39368" PostHistoryTypeId="5" PostId="9699" RevisionGUID="2f027e03-b129-4fa9-93f9-8816fd97bd5d" CreationDate="2023-09-13T07:42:21.397" UserId="3136" Comment="modify in body and title" Text="I'm currently working on understanding the process for establishing an `HRMP channel` between a `parachain` and the Asset Hub in `Rococo` (Rockmine). The link to the `Rococo-Asset-Hub` can be found here: [https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-asset-hub-rpc.polkadot.io#/explorer](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-asset-hub-rpc.polkadot.io#/explorer). &#xD;&#xA;&#xD;&#xA;I'm wondering whether a motion to the governance is required, similar to what would be done for Polkadot/Kusama, in order to initiate the HRMP channel. This would involve signing the `polkadotXcm.send` extrinsic containing the encoded call of `hrmp.hrmpAcceptOpenChannel` for incoming handshakes and `hrmp.initOpenChannel` for outgoing handshakes with root origin. Alternatively, is it necessary for someone with root access to perform this action on my behalf? I came across [https://github.com/paritytech/subport](https://github.com/paritytech/subport) for similar queries, but I'm uncertain if it's the appropriate resource to submit such an issue.&#xD;&#xA;&#xD;&#xA;I attempted to find information about this question in the Polkadot Wiki, Substrate Wiki, and here, but unfortunately, I haven't come across anything relevant. In the event that there isn't existing documentation, I plan to open an issue in the Substrate docs repository, with the intention of eventually incorporating the provided guidance into the official documentation." ContentLicense="CC BY-SA 4.0" />
  <row Id="39369" PostHistoryTypeId="4" PostId="9699" RevisionGUID="2f027e03-b129-4fa9-93f9-8816fd97bd5d" CreationDate="2023-09-13T07:42:21.397" UserId="3136" Comment="modify in body and title" Text="Query Regarding Setting Up HRMP Channel Between Parachain and Asset Hub in Rococo (Rockmine)" ContentLicense="CC BY-SA 4.0" />
  <row Id="39370" PostHistoryTypeId="24" PostId="9699" RevisionGUID="2f027e03-b129-4fa9-93f9-8816fd97bd5d" CreationDate="2023-09-13T07:42:21.397" Comment="Proposed by 3136 approved by -1 edit id of 528" ContentLicense="CC BY-SA 4.0" />
  <row Id="39371" PostHistoryTypeId="5" PostId="9699" RevisionGUID="94118f5b-7cde-4153-8455-a256fa2da9ac" CreationDate="2023-09-13T07:42:21.397" UserId="234" Comment="modify in body and title" Text="I'm currently working on understanding the process for establishing an HRMP channel between a parachain and the [Rococo Asset Hub][1] (Rockmine).&#xD;&#xA;&#xD;&#xA;I'm wondering whether a motion to the governance is required, similar to what would be done for Polkadot/Kusama, in order to initiate the HRMP channel. This would involve signing the `polkadotXcm.send` extrinsic containing the encoded call of `hrmp.hrmpAcceptOpenChannel` for incoming handshakes and `hrmp.initOpenChannel` for outgoing handshakes with root origin. Alternatively, is it necessary for someone with root access to perform this action on my behalf? I came across [https://github.com/paritytech/subport](https://github.com/paritytech/subport) for similar queries, but I'm uncertain if it's the appropriate resource to submit such an issue.&#xD;&#xA;&#xD;&#xA;I attempted to find information about this question in the Polkadot Wiki, Substrate Wiki, and here, but unfortunately, I haven't come across anything relevant. In the event that there isn't existing documentation, I plan to open an issue in the Substrate docs repository, with the intention of eventually incorporating the provided guidance into the official documentation.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-asset-hub-rpc.polkadot.io#/explorer](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-asset-hub-rpc.polkadot.io#/explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="39372" PostHistoryTypeId="4" PostId="9699" RevisionGUID="94118f5b-7cde-4153-8455-a256fa2da9ac" CreationDate="2023-09-13T07:42:21.397" UserId="234" Comment="modify in body and title" Text="Setting up an HRMP Channel between a Parachain and Rococo Asset Hub (Rockmine)" ContentLicense="CC BY-SA 4.0" />
  <row Id="39373" PostHistoryTypeId="4" PostId="9704" RevisionGUID="baa34ca2-d730-4c39-adde-81423970887b" CreationDate="2023-09-13T07:42:41.520" UserId="3136" Comment="modify in title" Text="Why is this cross-contract call misbehaving?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39374" PostHistoryTypeId="24" PostId="9704" RevisionGUID="baa34ca2-d730-4c39-adde-81423970887b" CreationDate="2023-09-13T07:42:41.520" Comment="Proposed by 3136 approved by 94, 234 edit id of 541" ContentLicense="CC BY-SA 4.0" />
  <row Id="39375" PostHistoryTypeId="2" PostId="9924" RevisionGUID="456c6992-efef-4da4-9d97-48f5ba624631" CreationDate="2023-09-13T14:31:24.773" UserId="4651" Text="For example, I have a chain running for some time and at some point I update the offchain worker code. What's the proper way to update the chain? Swap the binaries or runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39377" PostHistoryTypeId="1" PostId="9924" RevisionGUID="456c6992-efef-4da4-9d97-48f5ba624631" CreationDate="2023-09-13T14:31:24.773" UserId="4651" Text="Is runtime upgrade needed when changing offchain worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39378" PostHistoryTypeId="3" PostId="9924" RevisionGUID="456c6992-efef-4da4-9d97-48f5ba624631" CreationDate="2023-09-13T14:31:24.773" UserId="4651" Text="|runtime-upgrade|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39379" PostHistoryTypeId="2" PostId="9925" RevisionGUID="f9235696-35b8-480f-9401-07f5a827c213" CreationDate="2023-09-13T16:12:11.837" UserId="427" Text="Usually, whenever you do changes in the node code directly its required to replace the binary and starting the chain again. In case of runtime and pallet changes runtime upgrade is sufficient. Since OCWs are part of pallet code RU is enough for that matter." ContentLicense="CC BY-SA 4.0" />
  <row Id="39381" PostHistoryTypeId="2" PostId="9926" RevisionGUID="38904706-c3fc-4412-961e-0dc931fa19d6" CreationDate="2023-09-13T17:55:07.250" UserId="3331" Text="I'm trying to build a parachain using polkadot-v0.9.28 with the sc-cli lib in my project. I'm trying this to hardcode a CORS origin in the run_cmd module. &#xD;&#xA;&#xD;&#xA;I'm doing all this because defining origins using the CORS flag simply doesn't work for any origin besides all or default.&#xD;&#xA;&#xD;&#xA;But I'm getting build errors and can't see how to try fixing it.&#xD;&#xA;[![enter image description here][1]][1] [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Can I try hardcoding the CORS origin another way? Any help is appreciated :)&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CcIau.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/MYmeA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39383" PostHistoryTypeId="1" PostId="9926" RevisionGUID="38904706-c3fc-4412-961e-0dc931fa19d6" CreationDate="2023-09-13T17:55:07.250" UserId="3331" Text="Trying to use sc-cli directly from path in polkadot-v0.9.28" ContentLicense="CC BY-SA 4.0" />
  <row Id="39384" PostHistoryTypeId="3" PostId="9926" RevisionGUID="38904706-c3fc-4412-961e-0dc931fa19d6" CreationDate="2023-09-13T17:55:07.250" UserId="3331" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39385" PostHistoryTypeId="2" PostId="9927" RevisionGUID="333cc74e-79be-4581-a8e7-04eb40643941" CreationDate="2023-09-13T19:04:37.427" UserId="4653" Text="I am trying to initiate a balance transfer call using a proxy with the 'Any' type. I'm using the Python API, which allows me to create and submit the transaction successfully. However, it fails (https://westend.subscan.io/extrinsic/17455468-2). I am able to create the transaction using a wallet for the wallets.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    # Compose the transfer call using the balances module&#xD;&#xA;        transfer_call = substrate.compose_call(&#xD;&#xA;            call_module='Balances',&#xD;&#xA;            call_function='transfer',&#xD;&#xA;            call_params={&#xD;&#xA;                'dest': recipient_address,&#xD;&#xA;                'value': transfer_amount,&#xD;&#xA;            },&#xD;&#xA;        )&#xD;&#xA;&#xD;&#xA;        # Compose the proxy call to execute the transfer via the proxy&#xD;&#xA;        proxy_call = substrate.compose_call(&#xD;&#xA;            call_module='Proxy',&#xD;&#xA;            call_function='proxy',&#xD;&#xA;            call_params={&#xD;&#xA;                'real': proxy_account,&#xD;&#xA;                'call': transfer_call,&#xD;&#xA;            },&#xD;&#xA;        )&#xD;&#xA;&#xD;&#xA;        nonce = substrate.get_account_nonce(keypair.ss58_address)&#xD;&#xA;        signature_payload = substrate.generate_signature_payload(call=call, nonce=nonce)&#xD;&#xA;&#xD;&#xA;        signature = keypair.sign(signature_payload)&#xD;&#xA;&#xD;&#xA;        extrinsic = substrate.create_signed_extrinsic(&#xD;&#xA;            call=call, keypair=keypair, signature=signature&#xD;&#xA;        )&#xD;&#xA;&#xD;&#xA;        print(extrinsic)&#xD;&#xA;&#xD;&#xA;        result = substrate.submit_extrinsic(extrinsic=extrinsic, wait_for_finalization=False)&#xD;&#xA;&#xD;&#xA;Also, the transaction is listed under the 'Extrinsics' tab in the explorer, rather than the 'Transfers' tab. Any advice on this would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="39387" PostHistoryTypeId="1" PostId="9927" RevisionGUID="333cc74e-79be-4581-a8e7-04eb40643941" CreationDate="2023-09-13T19:04:37.427" UserId="4653" Text="Create Balance Transfer using a Proxy" ContentLicense="CC BY-SA 4.0" />
  <row Id="39388" PostHistoryTypeId="3" PostId="9927" RevisionGUID="333cc74e-79be-4581-a8e7-04eb40643941" CreationDate="2023-09-13T19:04:37.427" UserId="4653" Text="|polkadot|python|proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39389" PostHistoryTypeId="2" PostId="9928" RevisionGUID="333810d2-d600-42db-98fa-351f8483d2dd" CreationDate="2023-09-13T19:13:03.023" UserId="2984" Text="I'm attempting to use the --rpc-cors flag to specify certain domains that are allowed to send requests to my chain (localhost - substrate-node-template). However, regardless of how I use this flag, I am still able to access my blockchain on https://polkadot.js.org/. Is this the correct flag for blocking external access? Am I using this flag correctly, or should I combine it with another one?&#xD;&#xA;[![Example using &quot;./target/release/node-template --force-authoring --alice --tmp --rpc-cors=https://mywebsite.com,https://myothersite.com&quot;][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LH7Cd.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39391" PostHistoryTypeId="1" PostId="9928" RevisionGUID="333810d2-d600-42db-98fa-351f8483d2dd" CreationDate="2023-09-13T19:13:03.023" UserId="2984" Text="How can I use the --rpc-cors flag properly?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39392" PostHistoryTypeId="3" PostId="9928" RevisionGUID="333810d2-d600-42db-98fa-351f8483d2dd" CreationDate="2023-09-13T19:13:03.023" UserId="2984" Text="|substrate-node-template|json-rpc|cors|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39393" PostHistoryTypeId="5" PostId="9912" RevisionGUID="73967212-d0d5-41e5-9e49-18203a4914f4" CreationDate="2023-09-13T20:59:57.437" UserId="170" Comment="code style" Text="Just from a quick look at the code, I think the problem might be you are calling self.env().transfer() two times, and contract is trapped because it fails on `expect` instead of returning a specific error.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// calling transfer first time, if it fails we panic - very first call should pass&#xD;&#xA;self.env().transfer(caller, leftovers).expect(&quot;payout failed&quot;);&#xD;&#xA;// if this transfer fails an error is returned, however this can pass and then&#xD;&#xA;// the call can panic on the previous transfer since it is in a loop&#xD;&#xA;if self.env().transfer(caller, leftovers).is_err() {&#xD;&#xA;  return Err(Error::PayoutFailed);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;If you meant to return a specific error if the transfer fails, then you only need &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;if self.env().transfer(caller, leftovers).is_err() {&#xD;&#xA;  return Err(Error::PayoutFailed);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also a small note - if you want to transfer native tokens to multiple users like this, you should not expect it to pass, one transfer may fail leading to the call panicking and the message not being able to pass anymore (since the accounts are pulled from the storage - will you be able to modify storage in such case? etc.)&#xD;&#xA;&#xD;&#xA;**Example:** If the list contains user A, B and C and transfer to B fails for whatever reason, calling the same message will also try to transfer to the same users." ContentLicense="CC BY-SA 4.0" />
  <row Id="39394" PostHistoryTypeId="2" PostId="9929" RevisionGUID="f71713e6-f8c0-43bb-aa64-b4eeb0da661b" CreationDate="2023-09-13T22:27:20.587" UserId="3310" Text="I think ink_env, no longer provides support for random: https://docs.rs/ink_env/4.3.0/ink_env/#functions&#xD;&#xA;&#xD;&#xA;What should be used for the moment?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39397" PostHistoryTypeId="2" PostId="9930" RevisionGUID="0876ea73-e5f4-4abb-99f5-0a4b95ce3e02" CreationDate="2023-09-14T02:47:21.353" UserId="251" Text="The error is clearly visible here.&#xD;&#xA;&#xD;&#xA;If this succeeds, it means you can transfer someone's money without their permission.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;You must set up the proxy first. Use `proxy.add_proxy`.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/VaOkh.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39399" PostHistoryTypeId="2" PostId="9931" RevisionGUID="46229c4a-aa4d-431e-b491-f7f188d099df" CreationDate="2023-09-14T06:16:57.763" UserId="2722" Text="I'm working on a Substrate-based blockchain network. I need to verify if a user with a specific address (e.g., 5XDDFFDF...) has added a node to the network. Depending on the verification, I want to either allow or reject certain actions.&#xD;&#xA;&#xD;&#xA;How can I programmatically check if an address has added a node to the network in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39401" PostHistoryTypeId="1" PostId="9931" RevisionGUID="46229c4a-aa4d-431e-b491-f7f188d099df" CreationDate="2023-09-14T06:16:57.763" UserId="2722" Text="How to Check if an Address is a Node in a Substrate Blockchain Network?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39402" PostHistoryTypeId="3" PostId="9931" RevisionGUID="46229c4a-aa4d-431e-b491-f7f188d099df" CreationDate="2023-09-14T06:16:57.763" UserId="2722" Text="|substrate-node-template|polkadot|proof-of-stake|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39403" PostHistoryTypeId="2" PostId="9932" RevisionGUID="4d4fd56b-2665-4532-8adb-809e8c45ec14" CreationDate="2023-09-14T06:49:25.270" UserId="251" Text="The account and node are not bound.&#xD;&#xA;&#xD;&#xA;To achieve this, you need to develop a pallet that can store this relationship.&#xD;&#xA;&#xD;&#xA;When verification is needed, simply read the storage and check if the account exists in it.&#xD;&#xA;&#xD;&#xA;By the way, I think you can use the existing pallet at https://github.com/paritytech/polkadot-sdk/blob/cc39edd5a84ce14f5a5bfbf3cb949086d18e2c87/substrate/frame/node-authorization/src/lib.rs#L100-L103. However, it provides more features. If you want something simple, it would be better to implement one yourself." ContentLicense="CC BY-SA 4.0" />
  <row Id="39405" PostHistoryTypeId="5" PostId="3710" RevisionGUID="323919fe-d002-4042-91c0-4d897917f690" CreationDate="2023-09-14T06:56:58.847" UserId="234" Comment="Replaced link that pointed to a 404 page with the updated docs page" Text="This is not the way to perform runtime upgrade on parachain. &#xD;&#xA;&#xD;&#xA;Runtime upgrade process is different in solochain and parachain. Please refer this https://docs.substrate.io/reference/how-to-guides/parachains/upgrade-a-parachain/ " ContentLicense="CC BY-SA 4.0" />
  <row Id="39408" PostHistoryTypeId="2" PostId="9934" RevisionGUID="3080da0f-ddee-4147-91be-69927753d919" CreationDate="2023-09-14T08:13:53.313" UserId="280" Text="Our testnet parachain is stuck exactly at the block in which the runtime upgrade is authored. It was authorized and enacted via `parachainSystem` as recommended. The upgrade neither includes any migrations nor larger code changes, the previous upgrade was just as large (~3.6mb) and included many migrations without any issue.&#xD;&#xA;&#xD;&#xA;Since we have full control over the relay chain, we tried unstucking it by forcing new parachain code on the relay via `sudo.paras.forceSetCurrentCode`. Unfortunately, that did not have any effect. &#xD;&#xA;&#xD;&#xA;**I would really appreciate any insights about this issue as I was under the impression that a relaychain can ALWAYS unblock a parachain**. So there needs to be a solution, I could not find it though unfortunately. Maybe we can manually force discarding the block for collators?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Of course, we have checked [this answer][1] regarding a stuck parachain block production:&#xD;&#xA; * *Possible issue #1 (trouble sending the block)*: The PoV size is quite large with ~3.6mb. However, validators and collators are physically close and the network connection between these should not be an issue AFAICT.&#xD;&#xA; * *Possible issue #2 (trouble verifying the block in time)*: This should not be an issue as block proposal preparation is 10 to 20ms&#xD;&#xA; * *Possible issue #3 (Invalid parachain code in the relay)*: Since both above ones should not apply, we tried forcing parachain code via relay. As stated above, this did not yield any effects. &#xD;&#xA;&#xD;&#xA;**The two log lines which stand out** &#xD;&#xA;```&#xD;&#xA;WARN tokio-runtime-worker parachain::collator-protocol: [Relaychain] distribute collation message parent is outside of our view relay_parent=0x5edb8867f6ac41d67e3e545926379b8db05d9d388f9c08ce4c52e341b645d7a3&#xD;&#xA;INFO tokio-runtime-worker aura: [Parachain] ⌛️ Discarding proposal for slot 141223015; block production took too long&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Based [on this response][2] about the *&quot;block production took too long&quot;*, we stopped all parachain nodes and then brought back a single collator hoping the transaction would leave the tx pool due to hitting mortality limit. That did not happen unfortunately. First we kept the nodes offline for ~10 minutes, then ~30 minutes, then hours. The issue persists after 12 hours.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Testnet setup**&#xD;&#xA;&#xD;&#xA;* 2 Relay nodes with full control&#xD;&#xA;* Relay spec based on `rococo-local`&#xD;&#xA;* 3 Collators with full control&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/876/280&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/6732/280" ContentLicense="CC BY-SA 4.0" />
  <row Id="39410" PostHistoryTypeId="1" PostId="9934" RevisionGUID="3080da0f-ddee-4147-91be-69927753d919" CreationDate="2023-09-14T08:13:53.313" UserId="280" Text="Parachain stuck at authoring runtime upgrade block" ContentLicense="CC BY-SA 4.0" />
  <row Id="39411" PostHistoryTypeId="3" PostId="9934" RevisionGUID="3080da0f-ddee-4147-91be-69927753d919" CreationDate="2023-09-14T08:13:53.313" UserId="280" Text="|parachain|runtime-upgrade|error|parachain-collator|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39412" PostHistoryTypeId="5" PostId="9876" RevisionGUID="a2b6cd7c-eb70-42cd-af73-75dcc8f34225" CreationDate="2023-09-14T10:06:15.753" UserId="3136" Comment="correct the format of title and change in body" Text="I'm in the process of creating a Docker image for our `Substrate-node`, and I used that following method to accomplish it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# This is an example build stage for the node template. Here we create the binary in a temporary image.&#xD;&#xA;&#xD;&#xA;# This is a base image to build substrate nodes&#xD;&#xA;FROM docker.io/paritytech/ci-linux:production as builder&#xD;&#xA;&#xD;&#xA;WORKDIR /node-template&#xD;&#xA;COPY . .&#xD;&#xA;RUN rm -rf /usr/local/rustup /usr/local/cargo &amp;&amp; \&#xD;&#xA;    curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none &amp;&amp; \&#xD;&#xA;    rustup show &amp;&amp; \&#xD;&#xA;    cargo build --release&#xD;&#xA;&#xD;&#xA;# This is the 2nd stage: a very small image where we copy the binary.&quot;&#xD;&#xA;FROM docker.io/library/ubuntu:22.04&#xD;&#xA;LABEL description=&quot;Multistage Docker image for Substrate Node Template&quot; \&#xD;&#xA;  image.type=&quot;builder&quot; \&#xD;&#xA;  image.authors=&quot;alan.ma.dapps@gmail.com&quot; \&#xD;&#xA;  image.vendor=&quot;Substrate Developer Hub&quot; \&#xD;&#xA;  image.description=&quot;Multistage Docker image for Substrate Node Template&quot; \&#xD;&#xA;  image.source=&quot;https://github.com/substrate-developer-hub/substrate-node-template&quot; \&#xD;&#xA;  image.documentation=&quot;https://github.com/substrate-developer-hub/substrate-node-template&quot;&#xD;&#xA;&#xD;&#xA;# Copy the node binary.&#xD;&#xA;COPY --from=builder /node-template/target/release/node-template /usr/local/bin&#xD;&#xA;&#xD;&#xA;RUN useradd -m -u 1000 -U -s /bin/sh -d /node-dev node-dev &amp;&amp; \&#xD;&#xA;  mkdir -p /chain-data /node-dev/.local/share &amp;&amp; \&#xD;&#xA;  chown -R node-dev:node-dev /chain-data &amp;&amp; \&#xD;&#xA;  ln -s /chain-data /node-dev/.local/share/node-template &amp;&amp; \&#xD;&#xA;  # unclutter and minimize the attack surface&#xD;&#xA;  rm -rf /usr/bin /usr/sbin &amp;&amp; \&#xD;&#xA;  # check if executable works in this container&#xD;&#xA;  /usr/local/bin/node-template --version&#xD;&#xA;&#xD;&#xA;USER node-dev&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944 9615&#xD;&#xA;VOLUME [&quot;/chain-data&quot;]&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/node-template&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I got the image successfully.&#xD;&#xA;So I run it using this command.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;docker run -it -p 9944:9944 wolfmorgan/substrate-node&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now I got `Running JSON-RPC server: addr=0.0.0.0:9944`, but I want to get `Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=[&quot;*&quot;]`&#xD;&#xA;&#xD;&#xA;How can I build a docker image to get this?&#xD;&#xA;Any advice would be appreciated.&#xD;&#xA;&#xD;&#xA;Thank you in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="39413" PostHistoryTypeId="24" PostId="9876" RevisionGUID="a2b6cd7c-eb70-42cd-af73-75dcc8f34225" CreationDate="2023-09-14T10:06:15.753" Comment="Proposed by 3136 approved by 4435 edit id of 565" ContentLicense="CC BY-SA 4.0" />
  <row Id="39414" PostHistoryTypeId="5" PostId="9924" RevisionGUID="18501a7a-3c63-4f52-a387-ba79422ffeda" CreationDate="2023-09-14T11:05:01.827" UserId="3136" Comment="correct the msg format" Text="Suppose I have a blockchain that has been running for some time, and at a certain point, I need to update the offchain worker code. What is the recommended approach for updating the blockchain: swapping the binaries or performing a runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39415" PostHistoryTypeId="24" PostId="9924" RevisionGUID="18501a7a-3c63-4f52-a387-ba79422ffeda" CreationDate="2023-09-14T11:05:01.827" Comment="Proposed by 3136 approved by 4651 edit id of 564" ContentLicense="CC BY-SA 4.0" />
  <row Id="39416" PostHistoryTypeId="2" PostId="9935" RevisionGUID="915e31f0-c209-4e16-956b-80cd45ea04ee" CreationDate="2023-09-14T14:47:55.053" UserId="2065" Text="I am testing transferring ROC between AssetHub and a Parachain. The HRMP channels are already open but when I submit try the following XCM Message:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I get this error: &#xD;&#xA;&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        type: &quot;docs&quot;,&#xD;&#xA;        value: &quot;Execution of an XCM message was attempted.&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        type: &quot;xcm:v3:traits:Outcome&quot;,&#xD;&#xA;        type_name: &quot;xcm::latest::Outcome&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          Incomplete: {&#xD;&#xA;            col0: {&#xD;&#xA;              proof_size: 6196,&#xD;&#xA;              ref_time: 683414000&#xD;&#xA;            },&#xD;&#xA;            col1: {&#xD;&#xA;              Unroutable: &quot;NULL&quot;&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        name: &quot;outcome&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;The current XCM configuration for the runtime is: (link to code: [here][2])&#xD;&#xA;&#xD;&#xA;        // Means for transacting assets on this chain.&#xD;&#xA;    pub type LocalAssetTransactor = CurrencyAdapter&lt;&#xD;&#xA;        // Use this currency:&#xD;&#xA;        Balances,&#xD;&#xA;        // Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;        IsConcrete&lt;SelfLocation&gt;,&#xD;&#xA;        // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID:&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        // Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;        AccountId,&#xD;&#xA;        // We don't track any teleports.&#xD;&#xA;        (),&#xD;&#xA;    &gt;;&#xD;&#xA;    &#xD;&#xA;    pub type TrustBackedAssetsConvertedConcreteId =&#xD;&#xA;        assets_common::TrustBackedAssetsConvertedConcreteId&lt;AssetsPalletLocation, Balance&gt;;&#xD;&#xA;    &#xD;&#xA;    /// Means for transacting assets besides the native currency on this chain.&#xD;&#xA;    pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;        // Use this fungibles implementation:&#xD;&#xA;        Assets,&#xD;&#xA;        // Use the asset registry for lookups&#xD;&#xA;        TrustBackedAssetsConvertedConcreteId,&#xD;&#xA;        //ConvertedConcreteAssetId&lt;AssetIdForTrustBackedAssets, Balance, AssetRegistry, JustTry&gt;,&#xD;&#xA;        // Convert an XCM MultiLocation into a local account id:&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        // Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;        AccountId,&#xD;&#xA;        // We only want to allow teleports of known assets. We use non-zero issuance as an indication&#xD;&#xA;        // that this asset is known.&#xD;&#xA;        LocalMint&lt;parachains_common::impls::NonZeroIssuance&lt;AccountId, Assets&gt;&gt;,&#xD;&#xA;        // The account to use for tracking teleports.&#xD;&#xA;        CheckingAccount,&#xD;&#xA;    &gt;;&#xD;&#xA;    pub type AssetTransactors = (LocalAssetTransactor, FungiblesTransactor);&#xD;&#xA;&#xD;&#xA;    pub type Barrier = (&#xD;&#xA;       TakeWeightCredit,&#xD;&#xA;       AllowKnownQueryResponses&lt;PolkadotXcm&gt;,&#xD;&#xA;       AllowTopLevelPaidExecutionFrom&lt;Everything&gt;,&#xD;&#xA;       AllowUnpaidExecutionFrom&lt;ParentOrParentsExecutivePlurality&gt;,&#xD;&#xA;       AllowSubscriptionsFrom&lt;ParentOrSiblings&gt;,&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    impl xcm_executor::Config for XcmConfig {&#xD;&#xA;        type Aliasers = Nothing;&#xD;&#xA;        type AssetClaims = PolkadotXcm;&#xD;&#xA;        type AssetExchanger = ();&#xD;&#xA;        type AssetLocker = ();&#xD;&#xA;        type AssetTransactor = AssetTransactors;&#xD;&#xA;        type AssetTrap = PolkadotXcm;&#xD;&#xA;        type Barrier = Barrier;&#xD;&#xA;        type CallDispatcher = RuntimeCall;&#xD;&#xA;        type FeeManager = ();&#xD;&#xA;        type IsReserve = NativeAsset;&#xD;&#xA;        type IsTeleporter = (&#xD;&#xA;            NativeAsset,&#xD;&#xA;            // IsForeignConcreteAsset&lt;FromSiblingParachain&lt;parachain_info::Pallet&lt;Runtime&gt;&gt;&gt;,&#xD;&#xA;        );&#xD;&#xA;        type MaxAssetsIntoHolding = MaxAssetsIntoHolding;&#xD;&#xA;        type MessageExporter = ();&#xD;&#xA;        type OriginConverter = XcmOriginToTransactDispatchOrigin;&#xD;&#xA;        type PalletInstancesInfo = AllPalletsWithSystem;&#xD;&#xA;        type ResponseHandler = PolkadotXcm;&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type SafeCallFilter = Everything;&#xD;&#xA;        type SubscriptionService = PolkadotXcm;&#xD;&#xA;        type Trader = UsingComponents&lt;WeightToFee, RelayLocation, AccountId, Balances, ()&gt;;&#xD;&#xA;        type UniversalAliases = Nothing;&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        type XcmSender = XcmRouter;&#xD;&#xA;     }&#xD;&#xA;    &#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        parameter_types! {&#xD;&#xA;        pub ReachableDest: Option&lt;MultiLocation&gt; = Some(Parent.into());&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_xcm::Config for Runtime {&#xD;&#xA;        type AdminOrigin = EnsureRoot&lt;crate::AccountId&gt;;&#xD;&#xA;        // type AdminOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;&#xD;&#xA;        type Currency = Balances;&#xD;&#xA;        type CurrencyMatcher = ();&#xD;&#xA;        // We support local origins dispatching XCM executions in principle...&#xD;&#xA;        type ExecuteXcmOrigin = EnsureXcmOrigin&lt;RuntimeOrigin, LocalOriginToLocation&gt;;&#xD;&#xA;        type MaxLockers = ConstU32&lt;8&gt;;&#xD;&#xA;        type MaxRemoteLockConsumers = frame_support::traits::ConstU32&lt;0&gt;;&#xD;&#xA;        // type MaxRemoteLockConsumers = ConstU32&lt;0&gt;;&#xD;&#xA;        #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        type ReachableDest = ReachableDest;&#xD;&#xA;        type RemoteLockConsumerIdentifier = ();&#xD;&#xA;        // type RemoteLockConsumerIdentifier = ();&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type RuntimeEvent = RuntimeEvent;&#xD;&#xA;        type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;        // We want to disallow users sending (arbitrary) XCMs from this chain.&#xD;&#xA;        type SendXcmOrigin = EnsureXcmOrigin&lt;RuntimeOrigin, ()&gt;;&#xD;&#xA;        type SovereignAccountOf = LocationToAccountId;&#xD;&#xA;        type TrustedLockers = ();&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        // FIXME: Replace with benchmarked weight info&#xD;&#xA;        type WeightInfo = pallet_xcm::TestWeightInfo;&#xD;&#xA;        // ... but disallow generic XCM execution. As a result only teleports and reserve transfers are allowed.&#xD;&#xA;        type XcmExecuteFilter = Nothing;&#xD;&#xA;        type XcmExecutor = XcmExecutor&lt;XcmConfig&gt;;&#xD;&#xA;        type XcmReserveTransferFilter = Everything;&#xD;&#xA;        type XcmRouter = XcmRouter;&#xD;&#xA;        type XcmTeleportFilter = Everything;&#xD;&#xA;    &#xD;&#xA;        const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Any guidance on what causes the error and how I can make it work?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/a3Gem.png&#xD;&#xA;  [2]: https://github.com/t3rn/t3rn" ContentLicense="CC BY-SA 4.0" />
  <row Id="39418" PostHistoryTypeId="1" PostId="9935" RevisionGUID="915e31f0-c209-4e16-956b-80cd45ea04ee" CreationDate="2023-09-14T14:47:55.053" UserId="2065" Text="XCM Reserve Transfer Between AssetHub (Rococo) is Unroutable" ContentLicense="CC BY-SA 4.0" />
  <row Id="39419" PostHistoryTypeId="3" PostId="9935" RevisionGUID="915e31f0-c209-4e16-956b-80cd45ea04ee" CreationDate="2023-09-14T14:47:55.053" UserId="2065" Text="|xcm|error|rococo|transfer|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39420" PostHistoryTypeId="2" PostId="9936" RevisionGUID="79976da4-fd94-405c-8531-e362bc41f759" CreationDate="2023-09-14T15:19:48.790" UserId="2065" Text="I am testing transferring ROC between Rococo and a Parachain. The HRMP channels are already open but when I submit try the following XCM Message: &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;The transfer returns no errors but the funds do not appear on the account on the parachain but goes to the SovereignAccount.&#xD;&#xA;&#xD;&#xA;The current XCM configuration for the runtime is: (link to code: [here][2])&#xD;&#xA;&#xD;&#xA;        // Means for transacting assets on this chain.&#xD;&#xA;    pub type LocalAssetTransactor = CurrencyAdapter&lt;&#xD;&#xA;        // Use this currency:&#xD;&#xA;        Balances,&#xD;&#xA;        // Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;        IsConcrete&lt;SelfLocation&gt;,&#xD;&#xA;        // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID:&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        // Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;        AccountId,&#xD;&#xA;        // We don't track any teleports.&#xD;&#xA;        (),&#xD;&#xA;    &gt;;&#xD;&#xA;    &#xD;&#xA;    pub type TrustBackedAssetsConvertedConcreteId =&#xD;&#xA;        assets_common::TrustBackedAssetsConvertedConcreteId&lt;AssetsPalletLocation, Balance&gt;;&#xD;&#xA;    &#xD;&#xA;    /// Means for transacting assets besides the native currency on this chain.&#xD;&#xA;    pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;        // Use this fungibles implementation:&#xD;&#xA;        Assets,&#xD;&#xA;        // Use the asset registry for lookups&#xD;&#xA;        TrustBackedAssetsConvertedConcreteId,&#xD;&#xA;        //ConvertedConcreteAssetId&lt;AssetIdForTrustBackedAssets, Balance, AssetRegistry, JustTry&gt;,&#xD;&#xA;        // Convert an XCM MultiLocation into a local account id:&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        // Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;        AccountId,&#xD;&#xA;        // We only want to allow teleports of known assets. We use non-zero issuance as an indication&#xD;&#xA;        // that this asset is known.&#xD;&#xA;        LocalMint&lt;parachains_common::impls::NonZeroIssuance&lt;AccountId, Assets&gt;&gt;,&#xD;&#xA;        // The account to use for tracking teleports.&#xD;&#xA;        CheckingAccount,&#xD;&#xA;    &gt;;&#xD;&#xA;    pub type AssetTransactors = (LocalAssetTransactor, FungiblesTransactor);&#xD;&#xA;    &#xD;&#xA;    pub type Barrier = (&#xD;&#xA;       TakeWeightCredit,&#xD;&#xA;       AllowKnownQueryResponses&lt;PolkadotXcm&gt;,&#xD;&#xA;       AllowTopLevelPaidExecutionFrom&lt;Everything&gt;,&#xD;&#xA;       AllowUnpaidExecutionFrom&lt;ParentOrParentsExecutivePlurality&gt;,&#xD;&#xA;       AllowSubscriptionsFrom&lt;ParentOrSiblings&gt;,&#xD;&#xA;    );&#xD;&#xA;    &#xD;&#xA;    impl xcm_executor::Config for XcmConfig {&#xD;&#xA;        type Aliasers = Nothing;&#xD;&#xA;        type AssetClaims = PolkadotXcm;&#xD;&#xA;        type AssetExchanger = ();&#xD;&#xA;        type AssetLocker = ();&#xD;&#xA;        type AssetTransactor = AssetTransactors;&#xD;&#xA;        type AssetTrap = PolkadotXcm;&#xD;&#xA;        type Barrier = Barrier;&#xD;&#xA;        type CallDispatcher = RuntimeCall;&#xD;&#xA;        type FeeManager = ();&#xD;&#xA;        type IsReserve = NativeAsset;&#xD;&#xA;        type IsTeleporter = (&#xD;&#xA;            NativeAsset,&#xD;&#xA;            // IsForeignConcreteAsset&lt;FromSiblingParachain&lt;parachain_info::Pallet&lt;Runtime&gt;&gt;&gt;,&#xD;&#xA;        );&#xD;&#xA;        type MaxAssetsIntoHolding = MaxAssetsIntoHolding;&#xD;&#xA;        type MessageExporter = ();&#xD;&#xA;        type OriginConverter = XcmOriginToTransactDispatchOrigin;&#xD;&#xA;        type PalletInstancesInfo = AllPalletsWithSystem;&#xD;&#xA;        type ResponseHandler = PolkadotXcm;&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type SafeCallFilter = Everything;&#xD;&#xA;        type SubscriptionService = PolkadotXcm;&#xD;&#xA;        type Trader = UsingComponents&lt;WeightToFee, RelayLocation, AccountId, Balances, ()&gt;;&#xD;&#xA;        type UniversalAliases = Nothing;&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        type XcmSender = XcmRouter;&#xD;&#xA;     }&#xD;&#xA;    &#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        parameter_types! {&#xD;&#xA;        pub ReachableDest: Option&lt;MultiLocation&gt; = Some(Parent.into());&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_xcm::Config for Runtime {&#xD;&#xA;        type AdminOrigin = EnsureRoot&lt;crate::AccountId&gt;;&#xD;&#xA;        // type AdminOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;&#xD;&#xA;        type Currency = Balances;&#xD;&#xA;        type CurrencyMatcher = ();&#xD;&#xA;        // We support local origins dispatching XCM executions in principle...&#xD;&#xA;        type ExecuteXcmOrigin = EnsureXcmOrigin&lt;RuntimeOrigin, LocalOriginToLocation&gt;;&#xD;&#xA;        type MaxLockers = ConstU32&lt;8&gt;;&#xD;&#xA;        type MaxRemoteLockConsumers = frame_support::traits::ConstU32&lt;0&gt;;&#xD;&#xA;        // type MaxRemoteLockConsumers = ConstU32&lt;0&gt;;&#xD;&#xA;        #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        type ReachableDest = ReachableDest;&#xD;&#xA;        type RemoteLockConsumerIdentifier = ();&#xD;&#xA;        // type RemoteLockConsumerIdentifier = ();&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type RuntimeEvent = RuntimeEvent;&#xD;&#xA;        type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;        // We want to disallow users sending (arbitrary) XCMs from this chain.&#xD;&#xA;        type SendXcmOrigin = EnsureXcmOrigin&lt;RuntimeOrigin, ()&gt;;&#xD;&#xA;        type SovereignAccountOf = LocationToAccountId;&#xD;&#xA;        type TrustedLockers = ();&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        // FIXME: Replace with benchmarked weight info&#xD;&#xA;        type WeightInfo = pallet_xcm::TestWeightInfo;&#xD;&#xA;        // ... but disallow generic XCM execution. As a result only teleports and reserve transfers are allowed.&#xD;&#xA;        type XcmExecuteFilter = Nothing;&#xD;&#xA;        type XcmExecutor = XcmExecutor&lt;XcmConfig&gt;;&#xD;&#xA;        type XcmReserveTransferFilter = Everything;&#xD;&#xA;        type XcmRouter = XcmRouter;&#xD;&#xA;        type XcmTeleportFilter = Everything;&#xD;&#xA;    &#xD;&#xA;        const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Any guidance on how to resolve that?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cqRzH.png&#xD;&#xA;  [2]: https://github.com/t3rn/t3rn" ContentLicense="CC BY-SA 4.0" />
  <row Id="39422" PostHistoryTypeId="1" PostId="9936" RevisionGUID="79976da4-fd94-405c-8531-e362bc41f759" CreationDate="2023-09-14T15:19:48.790" UserId="2065" Text="XCM Reserve Asset Transfer from Rococo succeed but do not appear on Parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="39423" PostHistoryTypeId="3" PostId="9936" RevisionGUID="79976da4-fd94-405c-8531-e362bc41f759" CreationDate="2023-09-14T15:19:48.790" UserId="2065" Text="|xcm|transfer|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39424" PostHistoryTypeId="2" PostId="9937" RevisionGUID="0f8478f1-9ebc-46aa-9968-24db4338080b" CreationDate="2023-09-14T15:32:25.923" UserId="2396" Text="Ethereum rollups (e.g. Optimism) use ETH as their base asset for paying gas fees.&#xD;&#xA;&#xD;&#xA;Is it possible to use DOT for paying gas fees on a parachain? Or does the parachain creator need to create their custom coin?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39426" PostHistoryTypeId="1" PostId="9937" RevisionGUID="0f8478f1-9ebc-46aa-9968-24db4338080b" CreationDate="2023-09-14T15:32:25.923" UserId="2396" Text="Is it necessary to create a new coin when building a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39427" PostHistoryTypeId="3" PostId="9937" RevisionGUID="0f8478f1-9ebc-46aa-9968-24db4338080b" CreationDate="2023-09-14T15:32:25.923" UserId="2396" Text="|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39428" PostHistoryTypeId="2" PostId="9938" RevisionGUID="56620446-b057-4653-97a1-9ace412a5f12" CreationDate="2023-09-14T15:52:50.600" UserId="408" Text="You need to add `--rpc-cors=all` to achieve `allowed origins=[&quot;*&quot;]`.&#xD;&#xA;&#xD;&#xA;Here is the explanation for the flag:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;$ substrate --help&#xD;&#xA;...&#xD;&#xA;      --rpc-cors &lt;ORIGINS&gt;&#xD;&#xA;          Specify browser Origins allowed to access the HTTP &amp; WS RPC servers.&#xD;&#xA;&#xD;&#xA;          A comma-separated list of origins (protocol://domain or special `null` value). &#xD;&#xA;          Value of `all` will disable origin validation. &#xD;&#xA;          Default is to allow localhost and &lt;https://polkadot.js.org&gt; origins. &#xD;&#xA;          When running in --dev mode the default is to allow all origins.&#xD;&#xA;...&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39430" PostHistoryTypeId="2" PostId="9939" RevisionGUID="6284aa2c-525d-4c5e-a377-f3bbf242fba6" CreationDate="2023-09-14T16:29:51.153" UserId="2762" Text="[Substrate][1] is a highly customizable SDK to build your own Blockchain, and one of the things you can customize for your parachain is how to pay fees.&#xD;&#xA;&#xD;&#xA;An example of a Polkadot parachain that uses DOT to pay fees is [Asset Hub], AssetHub is one [System Parachains][2] and it uses DOT, the native token of Polkadot, as its own currency.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/learn/welcome-to-substrate/&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-system-chains&#xD;&#xA;  [3]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-asset-hub-rpc.polkadot.io#/explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="39432" PostHistoryTypeId="2" PostId="9940" RevisionGUID="5ad2ac92-32c8-49ca-b427-a71fc05c8cc5" CreationDate="2023-09-14T16:48:07.377" UserId="3846" Text="It happened to me when I wanted to hold only 1DOT in my wallet and delegate the rest. I changed to 5DOT and the error was gone" ContentLicense="CC BY-SA 4.0" />
  <row Id="39434" PostHistoryTypeId="2" PostId="9941" RevisionGUID="a3a38e4b-9525-4203-bb6e-3f34b54ef323" CreationDate="2023-09-14T16:58:33.913" UserId="642" Text="Is it possible to transfer the entire balance of an account using XCM, similar to the 'transferAll' function, considering the required deposit for XCM in each transaction?&#xD;&#xA;&#xD;&#xA;Another question is, what is the best practice for calculating the required deposit before sending a message/transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39436" PostHistoryTypeId="1" PostId="9941" RevisionGUID="a3a38e4b-9525-4203-bb6e-3f34b54ef323" CreationDate="2023-09-14T16:58:33.913" UserId="642" Text="Transferring Entire Account Balance with XCM and Calculating Required Deposits: Best Practices" ContentLicense="CC BY-SA 4.0" />
  <row Id="39437" PostHistoryTypeId="3" PostId="9941" RevisionGUID="a3a38e4b-9525-4203-bb6e-3f34b54ef323" CreationDate="2023-09-14T16:58:33.913" UserId="642" Text="|xcm|teleport|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39440" PostHistoryTypeId="2" PostId="9942" RevisionGUID="282a3a7a-4e5c-4b64-9b7c-8b6d0f3ee14d" CreationDate="2023-09-14T18:16:53.603" UserId="234" Text="It looks like there is an issue with the storage migration.&#xD;&#xA;- Are you including the storage migrations contained in `pallet-contracts` in your runtime ? (check also this [substrate issue][1] and this [SE answer][2])&#xD;&#xA;- In general you need to include the migrations into the `Executive` type of your runtime (check also this [SE answer][3])&#xD;&#xA;&#xD;&#xA;More information on storage migrations you can find in this [page][4] of the Substrate docs. Also, worth checking the [try-runtime-cli][5] and this [SE answer][6] on testing a migration.&#xD;&#xA;&#xD;&#xA;Another good practice is to do the runtime upgrades &quot;one by one&quot; and not &quot;jump up&quot; multiple versions during one upgrade. If you still choose to skip versions during a runtime upgrade, you have to check that there are no storage migrations between versions.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/12794#issuecomment-1330862591&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/4679/ink-smart-contract-dies-after-the-node-runtime-update/5114#5114&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/6135/234&#xD;&#xA;  [4]: https://docs.substrate.io/maintain/runtime-upgrades/#storage-migration&#xD;&#xA;  [5]: https://github.com/paritytech/try-runtime-cli&#xD;&#xA;  [6]: https://substrate.stackexchange.com/a/6193/234" ContentLicense="CC BY-SA 4.0" />
  <row Id="39442" PostHistoryTypeId="5" PostId="9719" RevisionGUID="e34cc71d-c39c-4ac3-b078-2ea8dbe4c37d" CreationDate="2023-09-14T20:44:19.960" UserId="3070" Comment="added 360 characters in body" Text="We have been testing out the WS Provider in POlkadotJS and its working good with our custom pallets. &#xD;&#xA;However we just got substrate Connect working with our custom substrate based node. The assets pallet and the Nicks pallet are working with Connect, however when we are trying to query anything in our custom pallets we are getting no data returned when there is data returning from the saem query with the PolkadotJS WS Connect Provider&#xD;&#xA;&#xD;&#xA;our query is like this&#xD;&#xA;```&#xD;&#xA;let res = await api.query.messages.messageHeaders.entries(address)&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;do those commands work on Connect?&#xD;&#xA;&#xD;&#xA;Here is the code for connecting to SC&#xD;&#xA;```&#xD;&#xA;const customSpec = JSON.stringify(jsonCustomSpec);&#xD;&#xA;const provider = new ScProvider(Sc, customSpec);&#xD;&#xA;await provider.connect();&#xD;&#xA;const api = await ApiPromise.create({provider});&#xD;&#xA;```&#xD;&#xA;this part works. and we can query the standard frame pallets just fine. Getting the account balance or assets works with Connect. " ContentLicense="CC BY-SA 4.0" />
  <row Id="39443" PostHistoryTypeId="50" PostId="8130" RevisionGUID="58b60205-9da5-4731-9e76-26f577a7dda5" CreationDate="2023-09-14T22:01:10.130" UserId="-1" />
  <row Id="39444" PostHistoryTypeId="5" PostId="9936" RevisionGUID="0019994c-e3dc-4532-aa47-a76230a0778c" CreationDate="2023-09-14T22:10:39.123" UserId="2065" Comment="added 58 characters in body" Text="I am testing transferring ROC between Rococo and a Parachain. The HRMP channels are already open but when I submit try the following XCM Message: &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;The transfer returns no errors but the funds do not appear on the account on the parachain but goes to the SovereignAccount.&#xD;&#xA;&#xD;&#xA;The current XCM configuration for the runtime is: (link to code: [here][2])&#xD;&#xA;&#xD;&#xA;        // Means for transacting assets on this chain.&#xD;&#xA;    pub type LocalAssetTransactor = CurrencyAdapter&lt;&#xD;&#xA;        // Use this currency:&#xD;&#xA;        Balances,&#xD;&#xA;        // Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;        IsConcrete&lt;SelfLocation&gt;,&#xD;&#xA;        // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID:&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        // Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;        AccountId,&#xD;&#xA;        // We don't track any teleports.&#xD;&#xA;        (),&#xD;&#xA;    &gt;;&#xD;&#xA;    &#xD;&#xA;    pub type TrustBackedAssetsConvertedConcreteId =&#xD;&#xA;        assets_common::TrustBackedAssetsConvertedConcreteId&lt;AssetsPalletLocation, Balance&gt;;&#xD;&#xA;    &#xD;&#xA;    /// Means for transacting assets besides the native currency on this chain.&#xD;&#xA;    pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;        // Use this fungibles implementation:&#xD;&#xA;        Assets,&#xD;&#xA;        // Use the asset registry for lookups&#xD;&#xA;        TrustBackedAssetsConvertedConcreteId,&#xD;&#xA;        //ConvertedConcreteAssetId&lt;AssetIdForTrustBackedAssets, Balance, AssetRegistry, JustTry&gt;,&#xD;&#xA;        // Convert an XCM MultiLocation into a local account id:&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        // Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;        AccountId,&#xD;&#xA;        // We only want to allow teleports of known assets. We use non-zero issuance as an indication&#xD;&#xA;        // that this asset is known.&#xD;&#xA;        LocalMint&lt;parachains_common::impls::NonZeroIssuance&lt;AccountId, Assets&gt;&gt;,&#xD;&#xA;        // The account to use for tracking teleports.&#xD;&#xA;        CheckingAccount,&#xD;&#xA;    &gt;;&#xD;&#xA;    pub type AssetTransactors = (LocalAssetTransactor, FungiblesTransactor);&#xD;&#xA;    &#xD;&#xA;    pub type Barrier = (&#xD;&#xA;       TakeWeightCredit,&#xD;&#xA;       AllowKnownQueryResponses&lt;PolkadotXcm&gt;,&#xD;&#xA;       AllowTopLevelPaidExecutionFrom&lt;Everything&gt;,&#xD;&#xA;       AllowUnpaidExecutionFrom&lt;ParentOrParentsExecutivePlurality&gt;,&#xD;&#xA;       AllowSubscriptionsFrom&lt;ParentOrSiblings&gt;,&#xD;&#xA;    );&#xD;&#xA;    &#xD;&#xA;    impl xcm_executor::Config for XcmConfig {&#xD;&#xA;        type Aliasers = Nothing;&#xD;&#xA;        type AssetClaims = PolkadotXcm;&#xD;&#xA;        type AssetExchanger = ();&#xD;&#xA;        type AssetLocker = ();&#xD;&#xA;        type AssetTransactor = AssetTransactors;&#xD;&#xA;        type AssetTrap = PolkadotXcm;&#xD;&#xA;        type Barrier = Barrier;&#xD;&#xA;        type CallDispatcher = RuntimeCall;&#xD;&#xA;        type FeeManager = ();&#xD;&#xA;        type IsReserve = NativeAsset;&#xD;&#xA;        type IsTeleporter = (&#xD;&#xA;            NativeAsset,&#xD;&#xA;            // IsForeignConcreteAsset&lt;FromSiblingParachain&lt;parachain_info::Pallet&lt;Runtime&gt;&gt;&gt;,&#xD;&#xA;        );&#xD;&#xA;        type MaxAssetsIntoHolding = MaxAssetsIntoHolding;&#xD;&#xA;        type MessageExporter = ();&#xD;&#xA;        type OriginConverter = XcmOriginToTransactDispatchOrigin;&#xD;&#xA;        type PalletInstancesInfo = AllPalletsWithSystem;&#xD;&#xA;        type ResponseHandler = PolkadotXcm;&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type SafeCallFilter = Everything;&#xD;&#xA;        type SubscriptionService = PolkadotXcm;&#xD;&#xA;        type Trader = UsingComponents&lt;WeightToFee, RelayLocation, AccountId, Balances, ()&gt;;&#xD;&#xA;        type UniversalAliases = Nothing;&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        type XcmSender = XcmRouter;&#xD;&#xA;     }&#xD;&#xA;    &#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        parameter_types! {&#xD;&#xA;        pub ReachableDest: Option&lt;MultiLocation&gt; = Some(Parent.into());&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_xcm::Config for Runtime {&#xD;&#xA;        type AdminOrigin = EnsureRoot&lt;crate::AccountId&gt;;&#xD;&#xA;        // type AdminOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;&#xD;&#xA;        type Currency = Balances;&#xD;&#xA;        type CurrencyMatcher = ();&#xD;&#xA;        // We support local origins dispatching XCM executions in principle...&#xD;&#xA;        type ExecuteXcmOrigin = EnsureXcmOrigin&lt;RuntimeOrigin, LocalOriginToLocation&gt;;&#xD;&#xA;        type MaxLockers = ConstU32&lt;8&gt;;&#xD;&#xA;        type MaxRemoteLockConsumers = frame_support::traits::ConstU32&lt;0&gt;;&#xD;&#xA;        // type MaxRemoteLockConsumers = ConstU32&lt;0&gt;;&#xD;&#xA;        #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        type ReachableDest = ReachableDest;&#xD;&#xA;        type RemoteLockConsumerIdentifier = ();&#xD;&#xA;        // type RemoteLockConsumerIdentifier = ();&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type RuntimeEvent = RuntimeEvent;&#xD;&#xA;        type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;        // We want to disallow users sending (arbitrary) XCMs from this chain.&#xD;&#xA;        type SendXcmOrigin = EnsureXcmOrigin&lt;RuntimeOrigin, ()&gt;;&#xD;&#xA;        type SovereignAccountOf = LocationToAccountId;&#xD;&#xA;        type TrustedLockers = ();&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        // FIXME: Replace with benchmarked weight info&#xD;&#xA;        type WeightInfo = pallet_xcm::TestWeightInfo;&#xD;&#xA;        // ... but disallow generic XCM execution. As a result only teleports and reserve transfers are allowed.&#xD;&#xA;        type XcmExecuteFilter = Nothing;&#xD;&#xA;        type XcmExecutor = XcmExecutor&lt;XcmConfig&gt;;&#xD;&#xA;        type XcmReserveTransferFilter = Everything;&#xD;&#xA;        type XcmRouter = XcmRouter;&#xD;&#xA;        type XcmTeleportFilter = Everything;&#xD;&#xA;    &#xD;&#xA;        const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Any guidance on how to resolve that?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cqRzH.png&#xD;&#xA;  [2]: https://github.com/t3rn/t3rn/blob/development/runtime/t0rn-parachain/src/xbi_config.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="39445" PostHistoryTypeId="2" PostId="9943" RevisionGUID="709a2c59-d249-44dd-8d12-5114f125e758" CreationDate="2023-09-15T01:24:00.173" UserId="4032" Text="I've seen some websites display the estimated time remaining for the current session/epoch. Is there a Rust call for this? Is there a sample of that code?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39447" PostHistoryTypeId="1" PostId="9943" RevisionGUID="709a2c59-d249-44dd-8d12-5114f125e758" CreationDate="2023-09-15T01:24:00.173" UserId="4032" Text="Calculate Session/Epoch time remaining" ContentLicense="CC BY-SA 4.0" />
  <row Id="39448" PostHistoryTypeId="3" PostId="9943" RevisionGUID="709a2c59-d249-44dd-8d12-5114f125e758" CreationDate="2023-09-15T01:24:00.173" UserId="4032" Text="|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39449" PostHistoryTypeId="2" PostId="9944" RevisionGUID="fbf4cbf7-7815-4b09-bf66-519814859703" CreationDate="2023-09-15T02:03:21.303" UserId="1959" Text="In your reserveTransfer, beneficiary &gt; AccountId32 &gt; Network should be Rococo, same as your XCM config. https://github.com/t3rn/t3rn/blob/development/runtime/t0rn-parachain/src/xbi_config.rs#L97" ContentLicense="CC BY-SA 4.0" />
  <row Id="39451" PostHistoryTypeId="5" PostId="9757" RevisionGUID="9cc09cde-6e3b-48e4-85b2-319661dd72b2" CreationDate="2023-09-15T06:27:18.340" UserId="2372" Comment="improved Formatting" Text="The next available `para-id` = 4290&#xD;&#xA;&#xD;&#xA;`para-id` 4290 is showing in Overview but lighter shade (lost in space?) &#xD;&#xA;&#xD;&#xA;this is not a new issue (have seen it reported in Jun 2022. &#xD;&#xA;&#xD;&#xA;how do we proceed? thank you&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39452" PostHistoryTypeId="24" PostId="9757" RevisionGUID="9cc09cde-6e3b-48e4-85b2-319661dd72b2" CreationDate="2023-09-15T06:27:18.340" Comment="Proposed by 2372 approved by 94, 234 edit id of 532" ContentLicense="CC BY-SA 4.0" />
  <row Id="39453" PostHistoryTypeId="2" PostId="9945" RevisionGUID="c7bdb99a-dd81-4fdb-97ae-b26b927822de" CreationDate="2023-09-15T07:14:19.557" UserId="1811" Text="Lets assume we have an ink! smart contract&#xD;&#xA;&#xD;&#xA;On a vanilla Mapping&#xD;&#xA;alpha: Mapping&lt;[u8;32], Astruct&gt;&#xD;&#xA;we can use self.alpha.remove(&amp;somehash)&#xD;&#xA;&#xD;&#xA;My question is this:&#xD;&#xA;if we have the following mapping that takes a tuple&#xD;&#xA;&#xD;&#xA;beta: Mapping&lt;(String, [u8;20]) , Bstruct&gt;&#xD;&#xA;&#xD;&#xA;then we want to &#xD;&#xA;self.beta.remove((&amp;somestring, _))&#xD;&#xA;&#xD;&#xA;Obviously the above does not and is not expected to work&#xD;&#xA;&#xD;&#xA;Question: There are cases where for a given string in this case somestring as seen above for any value of the 2nd element of the tuple, we want to remove storage.&#xD;&#xA;We understand that we can store in a Vec the 2nd tuple element values and then loop using&#xD;&#xA;self.beta.remove((&amp;somestring, &amp;a1)) &#xD;&#xA;...&#xD;&#xA;self.beta.remove((&amp;somestring, &amp;a1000000)) &#xD;&#xA;&#xD;&#xA;but we have been wondering if there is a better method to maybe reset the above beta Mapping to the default removing all storage for a specific 1st tupple element value.&#xD;&#xA;&#xD;&#xA;For example self.beta = Mapping::default(); would not be acceptable business logic&#xD;&#xA;&#xD;&#xA;The concept of self.beta.remove((&amp;somestring, _)) makes business logic sense but is not acceptable&#xD;&#xA;&#xD;&#xA;Any suggestions please?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39455" PostHistoryTypeId="1" PostId="9945" RevisionGUID="c7bdb99a-dd81-4fdb-97ae-b26b927822de" CreationDate="2023-09-15T07:14:19.557" UserId="1811" Text="how to remove Mapping storage when tuple is used as input" ContentLicense="CC BY-SA 4.0" />
  <row Id="39456" PostHistoryTypeId="3" PostId="9945" RevisionGUID="c7bdb99a-dd81-4fdb-97ae-b26b927822de" CreationDate="2023-09-15T07:14:19.557" UserId="1811" Text="|ink|rust|storage|remove-all|mapping|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39458" PostHistoryTypeId="5" PostId="9935" RevisionGUID="159f1d83-4bd7-4379-8584-e64c96c1e59f" CreationDate="2023-09-15T11:18:11.153" UserId="354" Comment="improved formatting" Text="I am testing transferring ROC between AssetHub and a Parachain. The HRMP channels are already open but when I submit try the following XCM Message:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I get this error: &#xD;&#xA;```json&#xD;&#xA;    [&#xD;&#xA;      {&#xD;&#xA;        type: &quot;docs&quot;,&#xD;&#xA;        value: &quot;Execution of an XCM message was attempted.&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        type: &quot;xcm:v3:traits:Outcome&quot;,&#xD;&#xA;        type_name: &quot;xcm::latest::Outcome&quot;,&#xD;&#xA;        value: {&#xD;&#xA;          Incomplete: {&#xD;&#xA;            col0: {&#xD;&#xA;              proof_size: 6196,&#xD;&#xA;              ref_time: 683414000&#xD;&#xA;            },&#xD;&#xA;            col1: {&#xD;&#xA;              Unroutable: &quot;NULL&quot;&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        name: &quot;outcome&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;```&#xD;&#xA;The current XCM configuration for the runtime is: (link to code: [here][2])&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        // Means for transacting assets on this chain.&#xD;&#xA;    pub type LocalAssetTransactor = CurrencyAdapter&lt;&#xD;&#xA;        // Use this currency:&#xD;&#xA;        Balances,&#xD;&#xA;        // Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;        IsConcrete&lt;SelfLocation&gt;,&#xD;&#xA;        // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID:&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        // Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;        AccountId,&#xD;&#xA;        // We don't track any teleports.&#xD;&#xA;        (),&#xD;&#xA;    &gt;;&#xD;&#xA;    &#xD;&#xA;    pub type TrustBackedAssetsConvertedConcreteId =&#xD;&#xA;        assets_common::TrustBackedAssetsConvertedConcreteId&lt;AssetsPalletLocation, Balance&gt;;&#xD;&#xA;    &#xD;&#xA;    /// Means for transacting assets besides the native currency on this chain.&#xD;&#xA;    pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;        // Use this fungibles implementation:&#xD;&#xA;        Assets,&#xD;&#xA;        // Use the asset registry for lookups&#xD;&#xA;        TrustBackedAssetsConvertedConcreteId,&#xD;&#xA;        //ConvertedConcreteAssetId&lt;AssetIdForTrustBackedAssets, Balance, AssetRegistry, JustTry&gt;,&#xD;&#xA;        // Convert an XCM MultiLocation into a local account id:&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        // Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;        AccountId,&#xD;&#xA;        // We only want to allow teleports of known assets. We use non-zero issuance as an indication&#xD;&#xA;        // that this asset is known.&#xD;&#xA;        LocalMint&lt;parachains_common::impls::NonZeroIssuance&lt;AccountId, Assets&gt;&gt;,&#xD;&#xA;        // The account to use for tracking teleports.&#xD;&#xA;        CheckingAccount,&#xD;&#xA;    &gt;;&#xD;&#xA;    pub type AssetTransactors = (LocalAssetTransactor, FungiblesTransactor);&#xD;&#xA;&#xD;&#xA;    pub type Barrier = (&#xD;&#xA;       TakeWeightCredit,&#xD;&#xA;       AllowKnownQueryResponses&lt;PolkadotXcm&gt;,&#xD;&#xA;       AllowTopLevelPaidExecutionFrom&lt;Everything&gt;,&#xD;&#xA;       AllowUnpaidExecutionFrom&lt;ParentOrParentsExecutivePlurality&gt;,&#xD;&#xA;       AllowSubscriptionsFrom&lt;ParentOrSiblings&gt;,&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    impl xcm_executor::Config for XcmConfig {&#xD;&#xA;        type Aliasers = Nothing;&#xD;&#xA;        type AssetClaims = PolkadotXcm;&#xD;&#xA;        type AssetExchanger = ();&#xD;&#xA;        type AssetLocker = ();&#xD;&#xA;        type AssetTransactor = AssetTransactors;&#xD;&#xA;        type AssetTrap = PolkadotXcm;&#xD;&#xA;        type Barrier = Barrier;&#xD;&#xA;        type CallDispatcher = RuntimeCall;&#xD;&#xA;        type FeeManager = ();&#xD;&#xA;        type IsReserve = NativeAsset;&#xD;&#xA;        type IsTeleporter = (&#xD;&#xA;            NativeAsset,&#xD;&#xA;            // IsForeignConcreteAsset&lt;FromSiblingParachain&lt;parachain_info::Pallet&lt;Runtime&gt;&gt;&gt;,&#xD;&#xA;        );&#xD;&#xA;        type MaxAssetsIntoHolding = MaxAssetsIntoHolding;&#xD;&#xA;        type MessageExporter = ();&#xD;&#xA;        type OriginConverter = XcmOriginToTransactDispatchOrigin;&#xD;&#xA;        type PalletInstancesInfo = AllPalletsWithSystem;&#xD;&#xA;        type ResponseHandler = PolkadotXcm;&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type SafeCallFilter = Everything;&#xD;&#xA;        type SubscriptionService = PolkadotXcm;&#xD;&#xA;        type Trader = UsingComponents&lt;WeightToFee, RelayLocation, AccountId, Balances, ()&gt;;&#xD;&#xA;        type UniversalAliases = Nothing;&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        type XcmSender = XcmRouter;&#xD;&#xA;     }&#xD;&#xA;    &#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        parameter_types! {&#xD;&#xA;        pub ReachableDest: Option&lt;MultiLocation&gt; = Some(Parent.into());&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_xcm::Config for Runtime {&#xD;&#xA;        type AdminOrigin = EnsureRoot&lt;crate::AccountId&gt;;&#xD;&#xA;        // type AdminOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;&#xD;&#xA;        type Currency = Balances;&#xD;&#xA;        type CurrencyMatcher = ();&#xD;&#xA;        // We support local origins dispatching XCM executions in principle...&#xD;&#xA;        type ExecuteXcmOrigin = EnsureXcmOrigin&lt;RuntimeOrigin, LocalOriginToLocation&gt;;&#xD;&#xA;        type MaxLockers = ConstU32&lt;8&gt;;&#xD;&#xA;        type MaxRemoteLockConsumers = frame_support::traits::ConstU32&lt;0&gt;;&#xD;&#xA;        // type MaxRemoteLockConsumers = ConstU32&lt;0&gt;;&#xD;&#xA;        #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        type ReachableDest = ReachableDest;&#xD;&#xA;        type RemoteLockConsumerIdentifier = ();&#xD;&#xA;        // type RemoteLockConsumerIdentifier = ();&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type RuntimeEvent = RuntimeEvent;&#xD;&#xA;        type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;        // We want to disallow users sending (arbitrary) XCMs from this chain.&#xD;&#xA;        type SendXcmOrigin = EnsureXcmOrigin&lt;RuntimeOrigin, ()&gt;;&#xD;&#xA;        type SovereignAccountOf = LocationToAccountId;&#xD;&#xA;        type TrustedLockers = ();&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        // FIXME: Replace with benchmarked weight info&#xD;&#xA;        type WeightInfo = pallet_xcm::TestWeightInfo;&#xD;&#xA;        // ... but disallow generic XCM execution. As a result only teleports and reserve transfers are allowed.&#xD;&#xA;        type XcmExecuteFilter = Nothing;&#xD;&#xA;        type XcmExecutor = XcmExecutor&lt;XcmConfig&gt;;&#xD;&#xA;        type XcmReserveTransferFilter = Everything;&#xD;&#xA;        type XcmRouter = XcmRouter;&#xD;&#xA;        type XcmTeleportFilter = Everything;&#xD;&#xA;    &#xD;&#xA;        const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any guidance on what causes the error and how I can make it work?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/a3Gem.png&#xD;&#xA;  [2]: https://github.com/t3rn/t3rn" ContentLicense="CC BY-SA 4.0" />
  <row Id="39459" PostHistoryTypeId="24" PostId="9935" RevisionGUID="159f1d83-4bd7-4379-8584-e64c96c1e59f" CreationDate="2023-09-15T11:18:11.153" Comment="Proposed by 354 approved by 2065 edit id of 568" ContentLicense="CC BY-SA 4.0" />
  <row Id="39460" PostHistoryTypeId="5" PostId="9945" RevisionGUID="2f05be9d-7d8e-4405-8e6d-88dfebbd5063" CreationDate="2023-09-15T12:09:20.757" UserId="354" Comment="improved formatting" Text="Lets assume we have an ink! smart contract&#xD;&#xA;&#xD;&#xA;On a vanilla Mapping&#xD;&#xA;&#xD;&#xA;    alpha: Mapping&lt;[u8;32], Astruct&gt;&#xD;&#xA;&#xD;&#xA;we can use &#xD;&#xA;&#xD;&#xA;    self.alpha.remove(&amp;somehash)&#xD;&#xA;&#xD;&#xA;My question is this:&#xD;&#xA;if we have the following mapping that takes a tuple&#xD;&#xA;&#xD;&#xA;    beta: Mapping&lt;(String, [u8;20]) , Bstruct&gt;&#xD;&#xA;&#xD;&#xA;then we want to &#xD;&#xA;&#xD;&#xA;    self.beta.remove((&amp;somestring, _))&#xD;&#xA;&#xD;&#xA;Obviously the above does not and is not expected to work&#xD;&#xA;&#xD;&#xA;Question: There are cases where for a given string in this case `somestring` as seen above for any value of the 2nd element of the tuple, we want to remove storage.&#xD;&#xA;We understand that we can store in a Vec the 2nd tuple element values and then loop using&#xD;&#xA;&#xD;&#xA;    self.beta.remove((&amp;somestring, &amp;a1)) &#xD;&#xA;    ...&#xD;&#xA;    self.beta.remove((&amp;somestring, &amp;a1000000)) &#xD;&#xA;&#xD;&#xA;but we have been wondering if there is a better method to maybe reset the above beta Mapping to the default removing all storage for a specific 1st tupple element value.&#xD;&#xA;&#xD;&#xA;For example `self.beta = Mapping::default();` would not be acceptable business logic&#xD;&#xA;&#xD;&#xA;The concept of `self.beta.remove((&amp;somestring, _))` makes business logic sense but is not acceptable&#xD;&#xA;&#xD;&#xA;Any suggestions please?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39461" PostHistoryTypeId="24" PostId="9945" RevisionGUID="2f05be9d-7d8e-4405-8e6d-88dfebbd5063" CreationDate="2023-09-15T12:09:20.757" Comment="Proposed by 354 approved by 1811 edit id of 566" ContentLicense="CC BY-SA 4.0" />
  <row Id="39462" PostHistoryTypeId="2" PostId="9946" RevisionGUID="b45390ca-9c33-4b74-ab1e-6174c1ed9ec1" CreationDate="2023-09-15T15:08:18.473" UserId="167" Text="This entirely depends on the configuration of `pallet_session`.&#xD;&#xA;&#xD;&#xA;First, this pallet itself does not enforce when sessions change. This is configured via [`ShoulEndSession`](https://paritytech.github.io/polkadot-sdk/master/pallet_session/pallet/trait.Config.html#associatedtype.ShouldEndSession). &#xD;&#xA;&#xD;&#xA;Second, there is also [`EstimateNextSessionRotation`](https://paritytech.github.io/polkadot-sdk/master/pallet_session/pallet/trait.Config.html#associatedtype.NextSessionRotation) which you can always call to estimate [when the next session would rotate](https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/trait.EstimateNextSessionRotation.html#tymethod.estimate_next_session_rotation). This might be accurate or an estimate based on the former configuration.&#xD;&#xA;&#xD;&#xA;For each trait, look at the list of implementors to see what options you have. &#xD;&#xA;&#xD;&#xA;For example, if [`pallet-babe`](https://paritytech.github.io/polkadot-sdk/master/pallet_babe/pallet/struct.Pallet.html#impl-EstimateNextSessionRotation%3C%3C%3C%3CT+as+Config%3E::Block+as+HeaderProvider%3E::HeaderT+as+Header%3E::Number%3E-for-Pallet%3CT%3E) is used as the former, then latter becomes an estimate, because `babe` uses a time-based session length, and if blocks are missed, then the session is essentially shortened in therms of block numbers. &#xD;&#xA;&#xD;&#xA;Contrary, if [`PeriodicSession`](https://paritytech.github.io/polkadot-sdk/master/pallet_session/struct.PeriodicSessions.html) is used, the session length is fixed in terms of block numbers and the estimate you get is also constant. " ContentLicense="CC BY-SA 4.0" />
  <row Id="39464" PostHistoryTypeId="5" PostId="7065" RevisionGUID="acaad9fd-0825-4771-8b38-1cd859ce2e6a" CreationDate="2023-09-15T15:10:59.583" UserId="167" Comment="format code." Text="If what you want is the %, then you need to get the `sessionProgress` and the `sessionLength`:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const progress = await api.derive.session.progress();&#xD;&#xA;const total = progress.sessionLength;&#xD;&#xA;const value = progress.sessionProgress;&#xD;&#xA;console.log((value/total)*100);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39465" PostHistoryTypeId="2" PostId="9947" RevisionGUID="c36ff122-97d9-44d0-b43f-73829d5e2e37" CreationDate="2023-09-15T15:11:38.720" UserId="167" Text="[This](https://substrate.stackexchange.com/questions/9943/calculate-session-epoch-time-remaining/9946#9946) is a more generalized answer to this, specifically in Rust code and from within the Runtime. " ContentLicense="CC BY-SA 4.0" />
  <row Id="39467" PostHistoryTypeId="2" PostId="9948" RevisionGUID="edf0ef97-c907-4c7f-a6ad-c7b56d1b83a3" CreationDate="2023-09-15T15:46:21.927" UserId="244" Text="Suppose I start with a Frontier-based template node and want it to sync with a Geth full node, as if it was an Ethereum execution client.&#xD;&#xA;&#xD;&#xA;What are the minimal set of changes necessary to make this happen? " ContentLicense="CC BY-SA 4.0" />
  <row Id="39469" PostHistoryTypeId="1" PostId="9948" RevisionGUID="edf0ef97-c907-4c7f-a6ad-c7b56d1b83a3" CreationDate="2023-09-15T15:46:21.927" UserId="244" Text="What kind of changes are necessary to turn a Frontier node into an Ethereum client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39470" PostHistoryTypeId="3" PostId="9948" RevisionGUID="edf0ef97-c907-4c7f-a6ad-c7b56d1b83a3" CreationDate="2023-09-15T15:46:21.927" UserId="244" Text="|frontier|ethereum|sync|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39471" PostHistoryTypeId="4" PostId="9948" RevisionGUID="6f397cb9-e10a-4d81-b102-c569078c9a1e" CreationDate="2023-09-15T23:15:53.943" UserId="244" Comment="edited title" Text="Is it possible to turn a Frontier node into an Ethereum client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39475" PostHistoryTypeId="2" PostId="9949" RevisionGUID="814aaf12-9340-4489-9c4b-0ba4b06439a4" CreationDate="2023-09-16T01:38:42.630" UserId="74" Text="We've been running a testnet and have executed a number of runtime upgrades. We've also upgraded the node across a variety of changes. New validators are trying to join the network and yet they cannot now run our genesis chainspec.&#xD;&#xA;&#xD;&#xA;The network was probably launched around `polkadot-v0.9.39` changes.&#xD;&#xA;&#xD;&#xA;### Error&#xD;&#xA;`Error: Service(Other(&quot;Error parsing spec file: unknown field `phantom`, there are no fields at line 175 column 17&quot;))`&#xD;&#xA;&#xD;&#xA;What's the proper way to debug this and how can we onboard new nodes to our network? It seems we're stuck." ContentLicense="CC BY-SA 4.0" />
  <row Id="39477" PostHistoryTypeId="1" PostId="9949" RevisionGUID="814aaf12-9340-4489-9c4b-0ba4b06439a4" CreationDate="2023-09-16T01:38:42.630" UserId="74" Text="Newer nodes unable to execute genesis chainspec, &quot;unknown field `phantom`&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39478" PostHistoryTypeId="3" PostId="9949" RevisionGUID="814aaf12-9340-4489-9c4b-0ba4b06439a4" CreationDate="2023-09-16T01:38:42.630" UserId="74" Text="|substrate-node|validator|chainspec|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39479" PostHistoryTypeId="2" PostId="9950" RevisionGUID="d9d5e025-119d-43b9-aebc-6b0fdac31291" CreationDate="2023-09-16T16:48:49.683" UserId="3395" Text="I'm attempting a migration that requires querying events emitted from the pallet. The goal is to store certain data from these events into the updated storage. However, I'm encountering an error.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn migrate_to_v2&lt;T: Config&gt;() -&gt; Weight {&#xD;&#xA;	let onchain_version = Pallet::&lt;T&gt;::on_chain_storage_version();&#xD;&#xA;	if onchain_version &lt; 2 {&#xD;&#xA;		Pallet::&lt;T&gt;::events().iter().for_each(|event| {&#xD;&#xA;			info!(&quot; &gt;&gt;&gt; Event: {:?}&quot;, event);&#xD;&#xA;		});&#xD;&#xA;		Weight::zero()&#xD;&#xA;	} else {&#xD;&#xA;		info!(&quot; &gt;&gt;&gt; Unused migration!&quot;);&#xD;&#xA;		Weight::zero()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CO29P.png&#xD;&#xA;&#xD;&#xA;Am I doing anything wrong?&#xD;&#xA;&#xD;&#xA;Additionally, I need to query events from a specific block. Is this feasible from a storage migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39481" PostHistoryTypeId="1" PostId="9950" RevisionGUID="d9d5e025-119d-43b9-aebc-6b0fdac31291" CreationDate="2023-09-16T16:48:49.683" UserId="3395" Text="Querying events from storage migration" ContentLicense="CC BY-SA 4.0" />
  <row Id="39482" PostHistoryTypeId="3" PostId="9950" RevisionGUID="d9d5e025-119d-43b9-aebc-6b0fdac31291" CreationDate="2023-09-16T16:48:49.683" UserId="3395" Text="|events|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39483" PostHistoryTypeId="2" PostId="9951" RevisionGUID="4553add3-8a15-4578-b2c2-51317b83bae0" CreationDate="2023-09-16T17:07:54.620" UserId="28" Text="Not a comprehensive answer, but I do not think this is trivial.&#xD;&#xA;&#xD;&#xA;The first and most obvious issue to me would be networking support, as ETH uses [devp2p](https://github.com/ethereum/devp2p) and Substrate / Frontier uses [libp2p](https://github.com/libp2p)." ContentLicense="CC BY-SA 4.0" />
  <row Id="39485" PostHistoryTypeId="4" PostId="1128" RevisionGUID="78ed7ae2-2861-4a33-ab50-5effbe80037e" CreationDate="2023-09-16T17:36:22.603" UserId="2" Comment="tags edited" Text="As a Substrate dev, what are the most exciting podcasts you're listening to right now?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39486" PostHistoryTypeId="6" PostId="1128" RevisionGUID="78ed7ae2-2861-4a33-ab50-5effbe80037e" CreationDate="2023-09-16T17:36:22.603" UserId="2" Comment="tags edited" Text="|community|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39487" PostHistoryTypeId="24" PostId="1128" RevisionGUID="78ed7ae2-2861-4a33-ab50-5effbe80037e" CreationDate="2023-09-16T17:36:22.603" Comment="Proposed by 2 approved by 85 edit id of 561" ContentLicense="CC BY-SA 4.0" />
  <row Id="39488" PostHistoryTypeId="6" PostId="4507" RevisionGUID="53bc6c1f-1f93-4b4b-b7ca-134031d717a4" CreationDate="2023-09-16T17:37:56.050" UserId="2" Comment="tags edited" Text="|community|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39489" PostHistoryTypeId="24" PostId="4507" RevisionGUID="53bc6c1f-1f93-4b4b-b7ca-134031d717a4" CreationDate="2023-09-16T17:37:56.050" Comment="Proposed by 2 approved by 85 edit id of 558" ContentLicense="CC BY-SA 4.0" />
  <row Id="39490" PostHistoryTypeId="5" PostId="2549" RevisionGUID="5020b1af-9d2e-4352-bef8-cc4e1291c9e0" CreationDate="2023-09-16T17:39:31.460" UserId="2" Comment="tags edited" Text="If I want to work with Substrate and this awesome community for a living, which websites are good places to look for substrate based roles?&#xD;&#xA;&#xD;&#xA;(The corollary of this, if I want to hire someone, where should I be putting my job posting?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="39491" PostHistoryTypeId="4" PostId="2549" RevisionGUID="5020b1af-9d2e-4352-bef8-cc4e1291c9e0" CreationDate="2023-09-16T17:39:31.460" UserId="2" Comment="tags edited" Text="What are the best websites to use to look for a job in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39492" PostHistoryTypeId="6" PostId="2549" RevisionGUID="5020b1af-9d2e-4352-bef8-cc4e1291c9e0" CreationDate="2023-09-16T17:39:31.460" UserId="2" Comment="tags edited" Text="|community|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39493" PostHistoryTypeId="24" PostId="2549" RevisionGUID="5020b1af-9d2e-4352-bef8-cc4e1291c9e0" CreationDate="2023-09-16T17:39:31.460" Comment="Proposed by 2 approved by 234, 85 edit id of 559" ContentLicense="CC BY-SA 4.0" />
  <row Id="39494" PostHistoryTypeId="5" PostId="9771" RevisionGUID="3d1c7635-736f-40b0-849a-297abde83bd6" CreationDate="2023-09-16T17:39:54.507" UserId="3136" Comment="correct the format of title and change in body" Text="After a year of not using my Parity Signer, I attempted to approve a transaction using it. Initially, the signer displayed an error upon scanning the transaction QR code. In response, I updated the app assuming it needed the update. After updating, I successfully restored the Parity Signer using the mnemonic phrase.&#xD;&#xA;&#xD;&#xA;However, I'm encountering a new problem: when I try to sign a transaction, I'm faced with the message &quot;Transaction author public key not found.&quot; I'm seeking guidance on how to resolve this issue. I appreciate any assistance or advice. Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="39495" PostHistoryTypeId="24" PostId="9771" RevisionGUID="3d1c7635-736f-40b0-849a-297abde83bd6" CreationDate="2023-09-16T17:39:54.507" Comment="Proposed by 3136 approved by 234, 85 edit id of 540" ContentLicense="CC BY-SA 4.0" />
  <row Id="39496" PostHistoryTypeId="5" PostId="9928" RevisionGUID="f5d36520-7e56-4420-8a02-0fd395cf7b1a" CreationDate="2023-09-16T17:40:43.900" UserId="3136" Comment="correct the msg format" Text="I m attempting to use the `--rpc-cors flag` to specify certain domains that are allowed to send requests to my chain (localhost - substrate-node-template). However, regardless of how I use this flag, I am still able to access my blockchain on https://polkadot.js.org/. Is this the correct `flag` for blocking external access? Am I using this `flag` correctly, or should I combine it with another one?&#xD;&#xA;[![Example using &quot;./target/release/node-template --force-authoring --alice --tmp --rpc-cors=https://mywebsite.com,https://myothersite.com&quot;][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LH7Cd.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39497" PostHistoryTypeId="24" PostId="9928" RevisionGUID="f5d36520-7e56-4420-8a02-0fd395cf7b1a" CreationDate="2023-09-16T17:40:43.900" Comment="Proposed by 3136 approved by 251, 85 edit id of 562" ContentLicense="CC BY-SA 4.0" />
  <row Id="39498" PostHistoryTypeId="2" PostId="9952" RevisionGUID="27a041b6-464f-4e2a-bef2-1d1abfccac06" CreationDate="2023-09-17T06:57:43.467" UserId="74" Text="Fixed by generating raw chainspec using original node the JSON was created with. Generating raw spec with a newer node doesn't work (and is obviously not guaranteed to work)." ContentLicense="CC BY-SA 4.0" />
  <row Id="39500" PostHistoryTypeId="2" PostId="9953" RevisionGUID="01e1482e-9740-4b66-8260-bc58923ca400" CreationDate="2023-09-17T13:53:23.453" UserId="94" Text="You cannot query events from within the runtime. Events are meant to be pieces of information that the runtime *emits* outwards for the off-chain world to get easy introspection for what is happening with the runtime.  &#xD;&#xA;They are not meant to be used from within the runtime itself.&#xD;&#xA;&#xD;&#xA;(As you did not include further information or source code, its not possible to help you further with this. Please consider opening another question and include all the needed info if you want more feedback on how to go about this.)" ContentLicense="CC BY-SA 4.0" />
  <row Id="39502" PostHistoryTypeId="5" PostId="9950" RevisionGUID="97646501-3362-46f7-b063-b93d4175dcd8" CreationDate="2023-09-17T15:03:09.510" UserId="3395" Comment="added 293 characters in body" Text="I'm attempting a migration that requires querying events emitted from the pallet. The goal is to store certain data from these events into the updated storage. However, I'm encountering an error.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn migrate_to_v2&lt;T: Config&gt;() -&gt; Weight {&#xD;&#xA;	let onchain_version = Pallet::&lt;T&gt;::on_chain_storage_version();&#xD;&#xA;	if onchain_version &lt; 2 {&#xD;&#xA;		Pallet::&lt;T&gt;::events().iter().for_each(|event| {&#xD;&#xA;			info!(&quot; &gt;&gt;&gt; Event: {:?}&quot;, event);&#xD;&#xA;		});&#xD;&#xA;		Weight::zero()&#xD;&#xA;	} else {&#xD;&#xA;		info!(&quot; &gt;&gt;&gt; Unused migration!&quot;);&#xD;&#xA;		Weight::zero()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CO29P.png&#xD;&#xA;&#xD;&#xA;Am I doing anything wrong?&#xD;&#xA;&#xD;&#xA;Additionally, I need to query events from a specific block. Is this feasible from a storage migration?&#xD;&#xA;&#xD;&#xA;**Edit**: I'm modifying an item in my storage, switching from `StorageMap` to `DoubleStorageMap`, which necessitates a migration. The new key value used in the double map is derived from events emitted in the past. If querying past events is not possible, is there another way to achieve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39503" PostHistoryTypeId="2" PostId="9954" RevisionGUID="ae3a0824-d3b2-4193-97bd-f84ebe048cd4" CreationDate="2023-09-17T17:47:55.820" UserId="139" Text="I am writing some benchmarking code and I came across a situation where I had to benchmark a few `let` bindings. &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let sig = ...;&#xD;&#xA;let data : Vec&lt;u8&gt; = vec![...];&#xD;&#xA;// data is actually variable. Ranges from 0 bytes to 200k bytes&#xD;&#xA;let tx = Transaction { ..., data };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;If I put this code in a `#[block]` and benchmark it I get a constant number: `222_000`.&#xD;&#xA;However. If I benchmark it using `Linear&lt;1, 200_000&gt;` I will get a linear dependence on length `400_000 + 10.saturating_mul(x)`.&#xD;&#xA;&#xD;&#xA;I took care to not put the `vec![]` allocation inside the benchmark `#[block]`. Basically what you see in the code-snip above is also inside `#[block]`. &#xD;&#xA;&#xD;&#xA;What surprises me now is that if the vec allocation is happening outside, why should the vector length matter when creating a `let` binding? &#xD;&#xA;&#xD;&#xA;Doing the math on both, including the linear component gives me a 3x increase in estimated weight which I consider significant enough to warrant a question. Would love if someone can explain me the apparent discrepancy that I see here." ContentLicense="CC BY-SA 4.0" />
  <row Id="39505" PostHistoryTypeId="1" PostId="9954" RevisionGUID="ae3a0824-d3b2-4193-97bd-f84ebe048cd4" CreationDate="2023-09-17T17:47:55.820" UserId="139" Text="Do struct allocations' weight consumption depend linearly on input data length?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39506" PostHistoryTypeId="3" PostId="9954" RevisionGUID="ae3a0824-d3b2-4193-97bd-f84ebe048cd4" CreationDate="2023-09-17T17:47:55.820" UserId="139" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39507" PostHistoryTypeId="5" PostId="9954" RevisionGUID="92a40a49-82fb-4bc4-b605-eb3a18b21de7" CreationDate="2023-09-17T18:05:36.013" UserId="139" Comment="added 2 characters in body" Text="I am writing some benchmarking code and I came across a situation where I had to benchmark a few `let` bindings. &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let sig = ...;&#xD;&#xA;let data : Vec&lt;u8&gt; = vec![...];&#xD;&#xA;// data is actually variable. Ranges from 0 bytes to 200k bytes&#xD;&#xA;let tx = Transaction { ..., data };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;If I put this code in a `#[block]` and benchmark it I get a constant number: `222_000`.&#xD;&#xA;However. If I benchmark it using `Linear&lt;1, 200_000&gt;` I will get a linear dependence on length `400_000 + 10.saturating_mul(x)`.&#xD;&#xA;&#xD;&#xA;I took care to not put the `vec![]` allocation inside the benchmark `#[block]`. Basically what you see in the code-snip above is also inside `#[block]`. &#xD;&#xA;&#xD;&#xA;What surprises me now is that if the vec allocation is happening outside, why should the vector length matter when creating a `let` binding? &#xD;&#xA;&#xD;&#xA;Doing the math on both, including the linear component gives me a 3-5x increase in estimated weight which I consider significant enough to warrant a question. Would love if someone can explain me the apparent discrepancy that I see here." ContentLicense="CC BY-SA 4.0" />
  <row Id="39510" PostHistoryTypeId="2" PostId="9956" RevisionGUID="e32be950-6d28-4258-afc9-7dbf06171420" CreationDate="2023-09-18T04:52:14.097" UserId="25" Text="The fundamental reason I asked the question was due to an edge-case I was hitting where justifications didn't have expected contents even though the process of creating data for justifications relied on blocks being imported sequentially.&#xD;&#xA;&#xD;&#xA;Turned out `SimpleSlotWorker` imports blocks directly, so it is possible that something relatively long-running before block import exit can eventually return AFTER new block is imported on top of it.&#xD;&#xA;&#xD;&#xA;Here is a more detailed description of what was happening: https://github.com/subspace/subspace/issues/871#issuecomment-1722745138&#xD;&#xA;&#xD;&#xA;So the answer to original question is both Yes and No. No, technically block is indeed imported *before* next block is created, so it is not possible create an ancestor before tht. But also yes, it is certainly possible to create a block before corresponding outer `BlockImport::import_block` has actually returned, which is typically not an issue, but I was hitting exactly that case." ContentLicense="CC BY-SA 4.0" />
  <row Id="39512" PostHistoryTypeId="2" PostId="9957" RevisionGUID="5c6e6c26-c7e2-474f-b44b-eb20451e6f65" CreationDate="2023-09-18T06:16:28.640" UserId="2372" Text="When i'm doing runtime-upgrade from polkadot-v0.9.38 to polkadot-v0.9.39 .I'm getting one issue of smart contract in my terminal&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;      2023-09-18 11:36:25 Corrupted state at `[67, 66, 25, 62, 73, 111, 171, 126, 197, 157, 97, 94, 208, 220, 85, 48, 6, 14, 153, 229, 55, 142, 86, 37, 55, 207, 59, 201, 131, 225, 123, 145, 7, 190, 185, 213, 63, 100, 190, 13, 84, 242, 53, 215, 14, 189, 128, 119, 55, 150, 202, 102, 150, 1, 58, 100, 98, 150, 229, 140, 171, 200, 50, 44, 7, 79, 42, 165, 176, 190, 50, 220]: Error { cause: Some(Error { cause: None, desc: &quot;Not enough data to fill buffer&quot; }), desc: &quot;Could not decode `ContractInfo::storage_item_deposit`&quot; }`    &#xD;&#xA;    2023-09-18 11:36:27  Starting consensus session on top of parent 0xd49263641146674ccb5c71c679&#xD;&#xA;&#xD;&#xA;And i have some contracts deployed on the running blockchain which is running on 36 version . After doing runtime upgrade from 0.9.388---&gt; 0.9.39 version . I tried to check contracts on my chain. When I tried to call them through substrate contracts-ui (on my chain which is now runtime upgraded to 39 version from 36 version) it is showing contracts not found and I am unable to call my deployed contracts . " ContentLicense="CC BY-SA 4.0" />
  <row Id="39514" PostHistoryTypeId="1" PostId="9957" RevisionGUID="5c6e6c26-c7e2-474f-b44b-eb20451e6f65" CreationDate="2023-09-18T06:16:28.640" UserId="2372" Text="Could not decode `ContractInfo::storage_item_deposit" ContentLicense="CC BY-SA 4.0" />
  <row Id="39515" PostHistoryTypeId="3" PostId="9957" RevisionGUID="5c6e6c26-c7e2-474f-b44b-eb20451e6f65" CreationDate="2023-09-18T06:16:28.640" UserId="2372" Text="|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39516" PostHistoryTypeId="2" PostId="9958" RevisionGUID="bf6baf39-4330-40e3-804f-2e5b72631b9e" CreationDate="2023-09-18T06:37:14.587" UserId="3667" Text="If we return `Weight::zero()` for an extrinsic that returns `DispatchResultWithPostInfo`, does that mean that we discard extrinsic base weight which is included for every transaction? " ContentLicense="CC BY-SA 4.0" />
  <row Id="39518" PostHistoryTypeId="1" PostId="9958" RevisionGUID="bf6baf39-4330-40e3-804f-2e5b72631b9e" CreationDate="2023-09-18T06:37:14.587" UserId="3667" Text="Does ExtrinsicBaseWeight apply even when we return 0 weight from extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39519" PostHistoryTypeId="3" PostId="9958" RevisionGUID="bf6baf39-4330-40e3-804f-2e5b72631b9e" CreationDate="2023-09-18T06:37:14.587" UserId="3667" Text="|extrinsic|weight|fee|feeless|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39520" PostHistoryTypeId="5" PostId="9957" RevisionGUID="3d8cc7bb-f476-4c22-9bb8-e481d7c22ecf" CreationDate="2023-09-18T07:08:36.460" UserId="354" Comment="improved formatting" Text="When I am doing runtime-upgrade from `polkadot-v0.9.38` to `polkadot-v0.9.39` .I am getting one issue of smart contract in my terminal&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;      2023-09-18 11:36:25 Corrupted state at `[67, 66, 25, 62, 73, 111, 171, 126, 197, 157, 97, 94, 208, 220, 85, 48, 6, 14, 153, 229, 55, 142, 86, 37, 55, 207, 59, 201, 131, 225, 123, 145, 7, 190, 185, 213, 63, 100, 190, 13, 84, 242, 53, 215, 14, 189, 128, 119, 55, 150, 202, 102, 150, 1, 58, 100, 98, 150, 229, 140, 171, 200, 50, 44, 7, 79, 42, 165, 176, 190, 50, 220]: Error { cause: Some(Error { cause: None, desc: &quot;Not enough data to fill buffer&quot; }), desc: &quot;Could not decode `ContractInfo::storage_item_deposit`&quot; }`    &#xD;&#xA;    2023-09-18 11:36:27  Starting consensus session on top of parent 0xd49263641146674ccb5c71c679&#xD;&#xA;&#xD;&#xA;And I have some contracts deployed on the running blockchain which is running on 36 version . After doing runtime upgrade from `0.9.38---&gt; 0.9.39` version . I tried to check contracts on my chain. When I tried to call them through substrate contracts-ui (on my chain which is now runtime upgraded to 39 version from 36 version) it is showing contracts not found and I am unable to call my deployed contracts . " ContentLicense="CC BY-SA 4.0" />
  <row Id="39521" PostHistoryTypeId="24" PostId="9957" RevisionGUID="3d8cc7bb-f476-4c22-9bb8-e481d7c22ecf" CreationDate="2023-09-18T07:08:36.460" Comment="Proposed by 354 approved by 2372 edit id of 571" ContentLicense="CC BY-SA 4.0" />
  <row Id="39522" PostHistoryTypeId="2" PostId="9959" RevisionGUID="0fb2dbc2-55f9-4817-b4dd-abd8e2ffbe02" CreationDate="2023-09-18T07:20:27.943" UserId="3196" Text="I tried running `cargo run -- --dev` after building. However i get this error `0: Invalid input: Error opening spec file `dev`: No such file or directory (os error 2)`. &#xD;&#xA;&#xD;&#xA;I don't know rust and substrate however after slight debugging i found it to breaking at line https://github.com/paritytech/polkadot-sdk/blob/e38998801e433ecc569ff6d58d1d0aa80eaff771/polkadot/cli/src/command.rs#L149.&#xD;&#xA;&#xD;&#xA;Variable named `path` is coming as `dev`.&#xD;&#xA;If i directly pass spec json path (`polkadot/node/service/chain-specs/polkadot.json`) in the above line then it is able to fetch the spec but gives error unable to find binary in paths `/users/name/polkadot-sdk/target/debug` and `/usr/lib/polkadot`.&#xD;&#xA; &#xD;&#xA;```Error 0: Worker binaries could not be found, make sure polkadot was built/installed correctly. If you ran with `cargo run`, please run `cargo build` first. Searched given workers path (None), polkadot binary path (&quot;/Users/$NAME/blockchain/polkadot-sdk/target/debug&quot;), and lib path (/usr/lib/polkadot), workers names: None```.&#xD;&#xA;&#xD;&#xA; However the binary is present in the first path atleast. I cannot directly run a binary after downloading as i need to make some code changes and plug it to polkadot js apps." ContentLicense="CC BY-SA 4.0" />
  <row Id="39524" PostHistoryTypeId="1" PostId="9959" RevisionGUID="0fb2dbc2-55f9-4817-b4dd-abd8e2ffbe02" CreationDate="2023-09-18T07:20:27.943" UserId="3196" Text="Unable to run development node after repo migration" ContentLicense="CC BY-SA 4.0" />
  <row Id="39525" PostHistoryTypeId="3" PostId="9959" RevisionGUID="0fb2dbc2-55f9-4817-b4dd-abd8e2ffbe02" CreationDate="2023-09-18T07:20:27.943" UserId="3196" Text="|polkadot|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39526" PostHistoryTypeId="5" PostId="9959" RevisionGUID="2c08f3ef-dbe0-4fef-a1c9-a6f771b6f32a" CreationDate="2023-09-18T07:22:21.740" UserId="3196" Comment="added 12 characters in body" Text="I tried running `cargo run -- --dev` after building. However i get this error `0: Invalid input: Error opening spec file `dev`: No such file or directory (os error 2)`. &#xD;&#xA;&#xD;&#xA;I don't know rust and substrate however after slight debugging i found it to breaking at line https://github.com/paritytech/polkadot-sdk/blob/e38998801e433ecc569ff6d58d1d0aa80eaff771/polkadot/cli/src/command.rs#L149.&#xD;&#xA;&#xD;&#xA;Variable named `path` is coming as `dev`.&#xD;&#xA;If i directly pass spec json path (`polkadot/node/service/chain-specs/polkadot.json`) in the above line then it is able to fetch the spec but gives error unable to find binary in paths `/users/$NAME/blockchain/polkadot-sdk/target/debug` and `/usr/lib/polkadot`.&#xD;&#xA; &#xD;&#xA;```Error 0: Worker binaries could not be found, make sure polkadot was built/installed correctly. If you ran with `cargo run`, please run `cargo build` first. Searched given workers path (None), polkadot binary path (&quot;/Users/$NAME/blockchain/polkadot-sdk/target/debug&quot;), and lib path (/usr/lib/polkadot), workers names: None```.&#xD;&#xA;&#xD;&#xA; However the binary is present in the first path atleast. I cannot directly run a binary after downloading as i need to make some code changes and plug it to polkadot js apps." ContentLicense="CC BY-SA 4.0" />
  <row Id="39527" PostHistoryTypeId="2" PostId="9960" RevisionGUID="fcdb8e01-7a44-4227-afaa-c941aa1e60e7" CreationDate="2023-09-18T07:23:56.463" UserId="4556" Text="I'm integrating my own pallet with Substrate's NFTs pallet. In my logic I try to create a collection with specific settings as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let nft_collection_id = &lt;T as Config&lt;I&gt;&gt;::Nfts::create_collection(&#xD;&#xA;				&amp;who, &#xD;&#xA;				&amp;who, &#xD;&#xA;				&amp;CollectionConfig {&#xD;&#xA;					settings: CollectionSettings::from_disabled(&#xD;&#xA;						CollectionSetting::TransferableItems | CollectionSetting::DepositRequired&#xD;&#xA;					),&#xD;&#xA;					max_supply: None,&#xD;&#xA;					mint_settings: MintSettings::default(),&#xD;&#xA;				},&#xD;&#xA;			)?;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This results in the error `WrongSetting`. I can say that the error is caused by `DepositRequired`, since everything works if I remove this setting. So I'm having a hard time trying to understand why I'm getting this error.&#xD;&#xA;&#xD;&#xA;In the a test of the Nfts pallet itself a very similar thing is done:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let collection_id = 1;&#xD;&#xA;		assert_ok!(Nfts::force_create(&#xD;&#xA;			RuntimeOrigin::root(),&#xD;&#xA;			account(1),&#xD;&#xA;			collection_config_from_disabled_settings(&#xD;&#xA;				CollectionSetting::TransferableItems | CollectionSetting::DepositRequired&#xD;&#xA;			)&#xD;&#xA;		));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The only difference is that I'm using `create_collection` instead of `force_create`. Is that the reason why I'm getting this error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39529" PostHistoryTypeId="1" PostId="9960" RevisionGUID="fcdb8e01-7a44-4227-afaa-c941aa1e60e7" CreationDate="2023-09-18T07:23:56.463" UserId="4556" Text="Using CollectionSetting::DepositRequired in create_collection causes a WrongSetting error" ContentLicense="CC BY-SA 4.0" />
  <row Id="39530" PostHistoryTypeId="3" PostId="9960" RevisionGUID="fcdb8e01-7a44-4227-afaa-c941aa1e60e7" CreationDate="2023-09-18T07:23:56.463" UserId="4556" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39532" PostHistoryTypeId="2" PostId="9961" RevisionGUID="36336125-7e59-4a06-ac31-64f71cd4c1d7" CreationDate="2023-09-18T08:32:31.550" UserId="2762" Text="In Substrate is a recomended security practice to take a deposit from the user for any storage items they place on chain.&#xD;&#xA;&#xD;&#xA;The `create_collection` function you are calling uses a deposit to create a collection, so if you try to disable it throws an error. The `force_create` works because is a special extrinsic that can be called only with special privilegies(See the [code][1])&#xD;&#xA;```rs&#xD;&#xA;        // DepositRequired can be disabled by calling the force_create() only&#xD;&#xA;		ensure!(&#xD;&#xA;			!config.has_disabled_setting(CollectionSetting::DepositRequired),&#xD;&#xA;			Error::&lt;T, I&gt;::WrongSetting&#xD;&#xA;		);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The deposit you have to reserve to create a collection is specified in the Config file of the NFT pallet:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// The basic amount of funds that must be reserved for collection.&#xD;&#xA;#[pallet::constant]&#xD;&#xA;type CollectionDeposit: Get&lt;DepositBalanceOf&lt;Self, I&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/nfts/src/impl_nonfungibles.rs#L159C3-L164C1" ContentLicense="CC BY-SA 4.0" />
  <row Id="39534" PostHistoryTypeId="2" PostId="9962" RevisionGUID="00173a34-c481-4fe7-9323-f75b905ed819" CreationDate="2023-09-18T08:44:11.717" UserId="4105" Text="I am struggling with following error, any thoughts what can cause it? I am compiling WASM blob with following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;cargo build --release --features try-runtime --package frontier-template-runtime    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is execution of the `try-runtime` binary:&#xD;&#xA;```sh&#xD;&#xA;     Running `target/release/frontier-template-node try-runtime --runtime target/release/wbuild/frontier-template-runtime/frontier_template_runtime.compact.compressed.wasm on-runtime-upgrade live --uri 'ws://localhost:9944'`&#xD;&#xA;2023-09-18 10:40:08 since no at is provided, setting it to latest finalized head, 0x692d7800220955d1c4d12465b1089a3e047e249ba6233f62979969856f37bc79    &#xD;&#xA;2023-09-18 10:40:08 since no prefix is filtered, the data for all pallets will be downloaded    &#xD;&#xA;2023-09-18 10:40:08 scraping key-pairs from remote at block height 0x692d7800220955d1c4d12465b1089a3e047e249ba6233f62979969856f37bc79    &#xD;&#xA;2023-09-18 10:40:08 Querying a total of 587 keys from prefix , splitting among 10 threads, 59 keys per thread    &#xD;&#xA;2023-09-18 10:40:08 adding data for hashed prefix: , took 0s    &#xD;&#xA;2023-09-18 10:40:08 adding data for hashed key: 3a636f6465    &#xD;&#xA;2023-09-18 10:40:08 adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    &#xD;&#xA;2023-09-18 10:40:08 adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    &#xD;&#xA;2023-09-18 10:40:08 initialized state externalities with storage root 0xfb8262147a2cd552fc2df2b136c085bc81068a62569ea365eb9542a0788bd57c and state_version V1    &#xD;&#xA;2023-09-18 10:40:08 original spec: RuntimeString::Owned(&quot;Frontier Node&quot;)-2, code hash: a3b1ff254b152844bbda18d12b3d4507d8530a59d9a1127e10d2bc59af2d3f40    &#xD;&#xA;2023-09-18 10:40:08 new spec: RuntimeString::Owned(&quot;Frontier Node&quot;)-2, code hash: 6552cf3323ecf6230ec62fd93f8db67aea59172ea7c92bf976ac58b157e50111    &#xD;&#xA;Error: Input(&quot;given runtime is NOT compiled with try-runtime feature!&quot;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39536" PostHistoryTypeId="1" PostId="9962" RevisionGUID="00173a34-c481-4fe7-9323-f75b905ed819" CreationDate="2023-09-18T08:44:11.717" UserId="4105" Text="Try-runtime error, runtime is NOT compiled with try-runtime feature" ContentLicense="CC BY-SA 4.0" />
  <row Id="39537" PostHistoryTypeId="3" PostId="9962" RevisionGUID="00173a34-c481-4fe7-9323-f75b905ed819" CreationDate="2023-09-18T08:44:11.717" UserId="4105" Text="|runtime-upgrade|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39538" PostHistoryTypeId="2" PostId="9963" RevisionGUID="134a5752-e346-41cf-840a-84366d90083a" CreationDate="2023-09-18T09:30:38.677" UserId="4105" Text="Ok, I guess I found a solution. Implementation of `frame_try_runtime::TryRuntime&lt;Block&gt;` was outside of `impl_runtime_apis!` section, so it was not detected, now it is moved:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl_runtime_apis! {&#xD;&#xA;	#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;	impl frame_try_runtime::TryRuntime&lt;Block&gt; for Runtime {&#xD;&#xA;		fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -&gt; (Weight, Weight) {&#xD;&#xA;			let weight = Executive::try_runtime_upgrade(checks).unwrap();&#xD;&#xA;			(weight, BlockWeights::get().max_block)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn execute_block(&#xD;&#xA;			block: Block,&#xD;&#xA;			state_root_check: bool,&#xD;&#xA;			checks: bool,&#xD;&#xA;			select: frame_try_runtime::TryStateSelect,&#xD;&#xA;		) -&gt; Weight {&#xD;&#xA;			Executive::try_execute_block(block, state_root_check, checks, select).unwrap()&#xD;&#xA;		}&#xD;&#xA;	 }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39540" PostHistoryTypeId="2" PostId="9964" RevisionGUID="df90bfd7-45a8-4392-9045-116021fb772b" CreationDate="2023-09-18T09:51:56.233" UserId="4533" Text="I am writing a smart contract in Rust using the Openbrush library. I am using version 3.0.0.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;```&#xD;&#xA;pub const STORAGE_KEY: u32 = openbrush::storage_unique_key!(metaData);&#xD;&#xA;#[openbrush::upgradeable_storage(STORAGE_KEY)]&#xD;&#xA;#[derive(Default, Debug)]&#xD;&#xA;pub struct metaData {&#xD;&#xA;		&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```#[ink(storage)]&#xD;&#xA;#[derive(Default, Storage)]&#xD;&#xA;pub struct PeerNftcontract {&#xD;&#xA;    #[storage_field]&#xD;&#xA;    data: metaData&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;I am using this code for changing the storage in upgradable smart contracts.&#xD;&#xA;and whatever field I have to change I am writing in the metaData struct.&#xD;&#xA;but it was not working.&#xD;&#xA;can anyone help me out here ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39542" PostHistoryTypeId="1" PostId="9964" RevisionGUID="df90bfd7-45a8-4392-9045-116021fb772b" CreationDate="2023-09-18T09:51:56.233" UserId="4533" Text="How to write upgradable smart contracts in rust (changing the storage)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39543" PostHistoryTypeId="3" PostId="9964" RevisionGUID="df90bfd7-45a8-4392-9045-116021fb772b" CreationDate="2023-09-18T09:51:56.233" UserId="4533" Text="|ink|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39544" PostHistoryTypeId="2" PostId="9965" RevisionGUID="e2807206-cc32-45ac-8229-60236bfb6425" CreationDate="2023-09-18T12:21:10.497" UserId="4648" Text="How can one design and implement a fee rule on a substrate-based blockchain that is contingent on the transaction payment value?&#xD;&#xA;I hope you are doing well!&#xD;&#xA;I would like to create this fee rule based on the transaction value, where can I implement it?&#xD;&#xA;Where can I use it,&#xD;&#xA;Thank you for your help.&#xD;&#xA;&#xD;&#xA;    fn calculate_fee(value: Balance) -&gt; Balance {&#xD;&#xA;    match value {&#xD;&#xA;        0..=9 =&gt; 10000,&#xD;&#xA;        10..=99 =&gt; 100000,&#xD;&#xA;        100..=999 =&gt; 1000000,&#xD;&#xA;        1000..=9999 =&gt; 10000000,&#xD;&#xA;        10000..=99999 =&gt; 100000000,&#xD;&#xA;        100000..=999999 =&gt; 1000000000,&#xD;&#xA;        _ =&gt; 10000,&#xD;&#xA;    }&#xD;&#xA;}" ContentLicense="CC BY-SA 4.0" />
  <row Id="39546" PostHistoryTypeId="1" PostId="9965" RevisionGUID="e2807206-cc32-45ac-8229-60236bfb6425" CreationDate="2023-09-18T12:21:10.497" UserId="4648" Text="How can one design and implement a fee rule?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39547" PostHistoryTypeId="3" PostId="9965" RevisionGUID="e2807206-cc32-45ac-8229-60236bfb6425" CreationDate="2023-09-18T12:21:10.497" UserId="4648" Text="|transactions|substrate-node|fee|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39548" PostHistoryTypeId="5" PostId="9965" RevisionGUID="f56a7b56-9d36-44b3-9ee6-cd608657243c" CreationDate="2023-09-18T12:28:03.223" UserId="4648" Comment="added 3 characters in body" Text="I hope you are doing well!&#xD;&#xA;&#xD;&#xA;How can one design and implement a fee rule on a substrate-based blockchain that is contingent on the transaction payment value?&#xD;&#xA;&#xD;&#xA;I would like to create this fee rule based on the transaction value, where can I implement it?&#xD;&#xA;Where can I use it,&#xD;&#xA;Thank you for your help.&#xD;&#xA;&#xD;&#xA;    fn calculate_fee(value: Balance) -&gt; Balance {&#xD;&#xA;    match value {&#xD;&#xA;        0..=9 =&gt; 10000,&#xD;&#xA;        10..=99 =&gt; 100000,&#xD;&#xA;        100..=999 =&gt; 1000000,&#xD;&#xA;        1000..=9999 =&gt; 10000000,&#xD;&#xA;        10000..=99999 =&gt; 100000000,&#xD;&#xA;        100000..=999999 =&gt; 1000000000,&#xD;&#xA;        _ =&gt; 10000,&#xD;&#xA;    }&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39549" PostHistoryTypeId="5" PostId="9950" RevisionGUID="373c0f2c-9c55-4cdf-9cc5-b8ef0c1ed8e7" CreationDate="2023-09-18T13:03:55.063" UserId="3136" Comment="correct the msg format" Text="I'm currently attempting to perform a migration process that involves querying events emitted from a specific pallet. The objective of this migration is to extract relevant data from these events and store it within the updated storage system. However, I've run into an error during this process.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn migrate_to_v2&lt;T: Config&gt;() -&gt; Weight {&#xD;&#xA;	let onchain_version = Pallet::&lt;T&gt;::on_chain_storage_version();&#xD;&#xA;	if onchain_version &lt; 2 {&#xD;&#xA;		Pallet::&lt;T&gt;::events().iter().for_each(|event| {&#xD;&#xA;			info!(&quot; &gt;&gt;&gt; Event: {:?}&quot;, event);&#xD;&#xA;		});&#xD;&#xA;		Weight::zero()&#xD;&#xA;	} else {&#xD;&#xA;		info!(&quot; &gt;&gt;&gt; Unused migration!&quot;);&#xD;&#xA;		Weight::zero()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CO29P.png&#xD;&#xA;&#xD;&#xA;Am I doing anything wrong?&#xD;&#xA;&#xD;&#xA;Additionally, I need to query events from a specific block. Is this feasible from a storage migration?&#xD;&#xA;&#xD;&#xA;**Edit**: I'm modifying an item in my storage, switching from `StorageMap` to `DoubleStorageMap`, which necessitates a migration. The new key value used in the double map is derived from events emitted in the past. If querying past events is not possible, is there another way to achieve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39550" PostHistoryTypeId="24" PostId="9950" RevisionGUID="373c0f2c-9c55-4cdf-9cc5-b8ef0c1ed8e7" CreationDate="2023-09-18T13:03:55.063" Comment="Proposed by 3136 approved by 3395 edit id of 569" ContentLicense="CC BY-SA 4.0" />
  <row Id="39551" PostHistoryTypeId="2" PostId="9966" RevisionGUID="771ed4fe-3e23-4077-a5b8-6efafcfab7e5" CreationDate="2023-09-18T13:16:05.193" UserId="3317" Text="Yes.&#xD;&#xA;&#xD;&#xA;Lets start with where we execute a block from the `executive` pallet, more specifically [`execute_extrinsics_with_bookkeeping`][1]. Then, we are going to `apply_extrinsic` where we [`get_dispatch_info`][2] which is used by the `pallet::weight` attribute ([ref][3]) (run `cargo expand` on your pallet to find the implementation) to obtain the **dispatch info**. Followed in the next line we will `apply` the extrinsic which (assuming it is a signed tx) [calls the `pre_dispatch`][4] implementation of the `SignedExtensions` of your runtime (you can find them configured [here][5]). As for the `check_weight` `SignedExtension` implementation it will call `do_pre_dispatch` which calls [`check_block_weight`][6] -&gt; [`calculate_consumed_weight`][7]. Here you will see that the [`base_extrinsic` weight is added to the dispatch info][8] mentioned above.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/5d346643ca0d1b6d9ddcfb2d01e490858ce4cb0e/substrate/frame/executive/src/lib.rs#L509&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/5d346643ca0d1b6d9ddcfb2d01e490858ce4cb0e/substrate/frame/executive/src/lib.rs#L587&#xD;&#xA;  [3]: https://paritytech.github.io/polkadot-sdk/master/frame_support/dispatch/trait.GetDispatchInfo.html#tymethod.get_dispatch_info&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/blob/372929fa256f5839047bb5d569ad523cb4b15094/substrate/primitives/runtime/src/generic/checked_extrinsic.rs#L75&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot-sdk/blob/372929fa256f5839047bb5d569ad523cb4b15094/substrate/bin/node-template/runtime/src/lib.rs#L303-L312&#xD;&#xA;  [6]: https://github.com/paritytech/polkadot-sdk/blob/372929fa256f5839047bb5d569ad523cb4b15094/substrate/frame/system/src/extensions/check_weight.rs#L101C1-L101C1&#xD;&#xA;  [7]: https://github.com/paritytech/polkadot-sdk/blob/372929fa256f5839047bb5d569ad523cb4b15094/substrate/frame/system/src/extensions/check_weight.rs#L67&#xD;&#xA;  [8]: https://github.com/paritytech/polkadot-sdk/blob/372929fa256f5839047bb5d569ad523cb4b15094/substrate/frame/system/src/extensions/check_weight.rs#L133" ContentLicense="CC BY-SA 4.0" />
  <row Id="39553" PostHistoryTypeId="5" PostId="9966" RevisionGUID="06612a0b-17b4-455d-aba2-9d72877ccc94" CreationDate="2023-09-18T13:25:33.577" UserId="3317" Comment="added 97 characters in body" Text="Yes.&#xD;&#xA;&#xD;&#xA;Lets start with where we execute a block from the `executive` pallet, more specifically [`execute_extrinsics_with_bookkeeping`][1]. Then, we are going to `apply_extrinsic` where we [`get the dispatch info`][2] of a particular extrinsic [(ref)][3] (run `cargo expand` on your pallet to find the implementation).&#xD;&#xA;&#xD;&#xA;Followed in the next line we will [`apply`][4] the extrinsic which (assuming it is a signed tx) [calls the `pre_dispatch`][5] implementation of the `SignedExtensions` of your runtime (you can find them configured [here][6]). As for the `check_weight` `SignedExtension` implementation it will call `do_pre_dispatch` which calls [`check_block_weight`][7] -&gt; [`calculate_consumed_weight`][8]. Here you will see that the [`base_extrinsic` weight is added to the dispatch info][9] mentioned above.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/5d346643ca0d1b6d9ddcfb2d01e490858ce4cb0e/substrate/frame/executive/src/lib.rs#L509&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/5d346643ca0d1b6d9ddcfb2d01e490858ce4cb0e/substrate/frame/executive/src/lib.rs#L587&#xD;&#xA;  [3]: https://paritytech.github.io/polkadot-sdk/master/frame_support/dispatch/trait.GetDispatchInfo.html#tymethod.get_dispatch_info&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/blob/5d346643ca0d1b6d9ddcfb2d01e490858ce4cb0e/substrate/frame/executive/src/lib.rs#L588&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot-sdk/blob/372929fa256f5839047bb5d569ad523cb4b15094/substrate/primitives/runtime/src/generic/checked_extrinsic.rs#L75&#xD;&#xA;  [6]: https://github.com/paritytech/polkadot-sdk/blob/372929fa256f5839047bb5d569ad523cb4b15094/substrate/bin/node-template/runtime/src/lib.rs#L303-L312&#xD;&#xA;  [7]: https://github.com/paritytech/polkadot-sdk/blob/372929fa256f5839047bb5d569ad523cb4b15094/substrate/frame/system/src/extensions/check_weight.rs#L101C1-L101C1&#xD;&#xA;  [8]: https://github.com/paritytech/polkadot-sdk/blob/372929fa256f5839047bb5d569ad523cb4b15094/substrate/frame/system/src/extensions/check_weight.rs#L67&#xD;&#xA;  [9]: https://github.com/paritytech/polkadot-sdk/blob/372929fa256f5839047bb5d569ad523cb4b15094/substrate/frame/system/src/extensions/check_weight.rs#L133" ContentLicense="CC BY-SA 4.0" />
  <row Id="39554" PostHistoryTypeId="2" PostId="9967" RevisionGUID="7e86371b-38e0-4a20-a489-b960b4a7b5e2" CreationDate="2023-09-18T14:30:01.707" UserId="445" Text="For example,&#xD;&#xA;&#xD;&#xA;+ pallet&#xD;&#xA;&#xD;&#xA;They use pallet-dapps-staking to call ink! smart contract&#xD;&#xA;&#xD;&#xA;https://github.com/AstarNetwork/Astar/tree/master/pallets/dapps-staking&#xD;&#xA;&#xD;&#xA;+ Runtime&#xD;&#xA;&#xD;&#xA;https://github.com/AstarNetwork/Astar/blob/master/runtime/shibuya/src/lib.rs#L688&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39556" PostHistoryTypeId="1" PostId="9967" RevisionGUID="7e86371b-38e0-4a20-a489-b960b4a7b5e2" CreationDate="2023-09-18T14:30:01.707" UserId="445" Text="In what scenarios should we use a pallet to call an ink! smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39557" PostHistoryTypeId="3" PostId="9967" RevisionGUID="7e86371b-38e0-4a20-a489-b960b4a7b5e2" CreationDate="2023-09-18T14:30:01.707" UserId="445" Text="|ink|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39558" PostHistoryTypeId="2" PostId="9968" RevisionGUID="2334a85a-0f30-4929-ad81-1479e298502d" CreationDate="2023-09-18T16:48:59.353" UserId="3358" Text="I use this:&#xD;&#xA;```typescript&#xD;&#xA;if (result.status.isInBlock) {&#xD;&#xA;&#xD;&#xA;  result.events.forEach(({event, phase, topics}) =&gt; {&#xD;&#xA;&#xD;&#xA;    if (api.events.contracts.ContractEmitted.is(event)) {&#xD;&#xA;&#xD;&#xA;      const [account_id, contract_event] = event.data&#xD;&#xA;&#xD;&#xA;      let decoded = new Abi(metadata).decodeEvent(contract_event)&#xD;&#xA;      decoded = JSON.parse(JSON.stringify(decoded));&#xD;&#xA;&#xD;&#xA;      console.log(decoded)&#xD;&#xA;	}&#xD;&#xA;  });&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39566" PostHistoryTypeId="2" PostId="9970" RevisionGUID="220e0b58-adac-4da2-84b0-13f6442633fa" CreationDate="2023-09-19T02:57:05.073" UserId="4663" Text="Is there a query where we can get historical balance of an polkadot account?&#xD;&#xA;&#xD;&#xA;Right now i am trying to query every block(using 1000blocks as a test case) to grab all the transactions in order to build a historical balance model but 1000 blocks takes 10minutes and querying 17million blocks would take 152 days?&#xD;&#xA;&#xD;&#xA;I want to get historical balance of many accounts at the start of genesis(0th block to the current block(17million blocks)).&#xD;&#xA;&#xD;&#xA;This would need a lot data collections, are there any good historical nodes or index providers out there for Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39568" PostHistoryTypeId="1" PostId="9970" RevisionGUID="220e0b58-adac-4da2-84b0-13f6442633fa" CreationDate="2023-09-19T02:57:05.073" UserId="4663" Text="Historical Balance of Polkadot Accounts (python substrate)" ContentLicense="CC BY-SA 4.0" />
  <row Id="39569" PostHistoryTypeId="3" PostId="9970" RevisionGUID="220e0b58-adac-4da2-84b0-13f6442633fa" CreationDate="2023-09-19T02:57:05.073" UserId="4663" Text="|polkadot|python|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39570" PostHistoryTypeId="2" PostId="9971" RevisionGUID="fa2ae404-544d-4acb-9c1c-a1c2226c834c" CreationDate="2023-09-19T03:44:02.210" UserId="445" Text="I have the same issue when using Go api &#xD;&#xA;&#xD;&#xA;https://github.com/centrifuge/go-substrate-rpc-client&#xD;&#xA;&#xD;&#xA;I am currently using on the latest version `4.1.0`&#xD;&#xA;&#xD;&#xA;My node version: `polkadot-v0.9.43`&#xD;&#xA;&#xD;&#xA;Issue:&#xD;&#xA;&#xD;&#xA;&gt; Verification Error: Runtime error: Execution failed: Execution aborted&#xD;&#xA;&gt; due to trap: wasm trap: wasm `unreachable` instruction executed WASM&#xD;&#xA;&gt; backtrace: error while executing at wasm backtrace:&#xD;&#xA;&gt;     0: 0x579efd - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;&gt;     1: 0xe402 - &lt;unknown&gt;!core::panicking::panic_fmt::he4489d678d6570d5&#xD;&#xA;&gt;     2: 0x13b4c1 - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;My example code:&#xD;&#xA;&#xD;&#xA;```go&#xD;&#xA;package main&#xD;&#xA;&#xD;&#xA;import (&#xD;&#xA;	&quot;fmt&quot;&#xD;&#xA;	&quot;github.com/centrifuge/go-substrate-rpc-client/v4/signature&quot;&#xD;&#xA;	&quot;github.com/centrifuge/go-substrate-rpc-client/v4/types&quot;&#xD;&#xA;	//&quot;github.com/centrifuge/go-substrate-rpc-client/v4/rpc/author&quot;&#xD;&#xA;	gsrpc &quot;github.com/centrifuge/go-substrate-rpc-client/v4&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;func main(){&#xD;&#xA;	//Alice account &#xD;&#xA;	nemo := &quot;0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a&quot;;&#xD;&#xA;&#xD;&#xA;	api, err:= gsrpc.NewSubstrateAPI(&quot;wss://shibuya-rpc.dwellir.com&quot;)&#xD;&#xA;	if err != nil {&#xD;&#xA;		fmt.Println(&quot;Can not connect blockchain&quot;)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fmt.Println(&quot;Connected&quot;)&#xD;&#xA;	keypair, err := signature.KeyringPairFromSecret(nemo, 5)&#xD;&#xA;	fmt.Println(&quot;keypair&quot;, keypair.Address, keypair.PublicKey, keypair.URI)&#xD;&#xA;	if err != nil {&#xD;&#xA;		fmt.Println(&quot;keypair&quot;, err)&#xD;&#xA;	}&#xD;&#xA;	meta, err := api.RPC.State.GetMetadataLatest()&#xD;&#xA;	if err != nil {&#xD;&#xA;		fmt.Println(&quot;MEta&quot;, err)&#xD;&#xA;	}&#xD;&#xA;	// fmt.Println(&quot;Meta:&quot;,meta)&#xD;&#xA;	c, err := types.NewCall(meta, &quot;Balances.transfer&quot;,&quot;5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y&quot;, types.NewUCompactFromUInt(10000))&#xD;&#xA;&#xD;&#xA;	if err != nil {&#xD;&#xA;		fmt.Println(&quot;New call&quot;, err)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	ext := types.NewExtrinsic(c)&#xD;&#xA;&#xD;&#xA;	era := types.ExtrinsicEra{IsImmortalEra: false}&#xD;&#xA;&#xD;&#xA;	genesisHash ,err := api.RPC.Chain.GetBlockHash(0)&#xD;&#xA;&#xD;&#xA;	if err != nil {&#xD;&#xA;		fmt.Println(&quot;Genesis hash&quot;, err)&#xD;&#xA;	}&#xD;&#xA;	rv, err := api.RPC.State.GetRuntimeVersionLatest()&#xD;&#xA;	if err != nil {&#xD;&#xA;		fmt.Println(&quot;Runtime version&quot;, err)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	key, err := types.CreateStorageKey(meta, &quot;System&quot;, &quot;Account&quot;, keypair.PublicKey)&#xD;&#xA;	if err != nil {&#xD;&#xA;		fmt.Println(&quot;Storage Key&quot;, err)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	var accountInfo types.AccountInfo&#xD;&#xA;	ok, err := api.RPC.State.GetStorageLatest(key, &amp;accountInfo)&#xD;&#xA;	fmt.Println(&quot;OK&quot;, ok)&#xD;&#xA;	nonce := uint32(accountInfo.Nonce)&#xD;&#xA;	o := types.SignatureOptions{&#xD;&#xA;		// BlockHash:   blockHash,&#xD;&#xA;		BlockHash:          genesisHash, // BlockHash needs to == GenesisHash if era is immortal. // TODO: add an error?&#xD;&#xA;		Era:                era,&#xD;&#xA;		GenesisHash:        genesisHash,&#xD;&#xA;		Nonce:              types.NewUCompactFromUInt(uint64(nonce)),&#xD;&#xA;		SpecVersion:        rv.SpecVersion,&#xD;&#xA;		Tip:                types.NewUCompactFromUInt(0),&#xD;&#xA;		TransactionVersion: rv.TransactionVersion,&#xD;&#xA;	}&#xD;&#xA;	err = ext.Sign(keypair, o)&#xD;&#xA;	if err != nil {&#xD;&#xA;		fmt.Println(&quot;Sign&quot;, err)&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	txnHash, err := api.RPC.Author.SubmitAndWatchExtrinsic(ext)&#xD;&#xA;	if err != nil {&#xD;&#xA;		fmt.Println(&quot;submit&quot;, err)&#xD;&#xA;		&#xD;&#xA;	}	&#xD;&#xA;&#xD;&#xA;	fmt.Println(&quot;after submission txnHash&quot;, txnHash)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39572" PostHistoryTypeId="2" PostId="9972" RevisionGUID="438230cf-6ffe-498e-a629-ed8e7cb5486c" CreationDate="2023-09-19T04:11:21.660" UserId="494" Text="I'm sending multiple extrinsics from the same account. The nonce is increased before a new extrinsic is sent, and all extrinsics are sent as immortal.&#xD;&#xA;&#xD;&#xA;My goal is to fill the blocks as much as possible, but on average there's only one extrinsic being included per block (while their weight consumption is quite small). &#xD;&#xA;&#xD;&#xA;Meanwhile, there's plenty extrinsics sitting in the pool. All extrinsics in the pool are from this same account, so there's no competing extrinsics.&#xD;&#xA;&#xD;&#xA;Why is that?&#xD;&#xA;&#xD;&#xA;Does the fact that all extrinsics are coming from the same account make the collator de-prioritize them?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39574" PostHistoryTypeId="1" PostId="9972" RevisionGUID="438230cf-6ffe-498e-a629-ed8e7cb5486c" CreationDate="2023-09-19T04:11:21.660" UserId="494" Text="extrinsics from same account result in underutilized blockspace" ContentLicense="CC BY-SA 4.0" />
  <row Id="39575" PostHistoryTypeId="3" PostId="9972" RevisionGUID="438230cf-6ffe-498e-a629-ed8e7cb5486c" CreationDate="2023-09-19T04:11:21.660" UserId="494" Text="|extrinsic|transaction-pool|mempool|tx-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39576" PostHistoryTypeId="2" PostId="9973" RevisionGUID="7bf86035-491a-4916-81d5-38d8d7af480f" CreationDate="2023-09-19T05:15:51.867" UserId="354" Text="You can also run the binary directly from the path if you have built the code using `--release` then the binary would be in `/target/release/&quot;bianry_name&quot;` and you can run it via the command `./target/release/&quot;bianry_name&quot; --dev` .&#xD;&#xA;&#xD;&#xA;And if you didn't built the code in `--release` than you binary will be in `/target/debug/&quot;bianry_name&quot;` and you can run it through command `./target/debug/&quot;bianry_name&quot; --dev`" ContentLicense="CC BY-SA 4.0" />
  <row Id="39578" PostHistoryTypeId="5" PostId="9959" RevisionGUID="b67d48a4-b614-4535-9e5d-fa41604c5278" CreationDate="2023-09-19T05:22:21.953" UserId="3196" Comment="added 85 characters in body" Text="I tried running `cargo run -- --dev` after building. However i get this error `0: Invalid input: Error opening spec file `dev`: No such file or directory (os error 2)`. &#xD;&#xA;&#xD;&#xA;I don't know rust and substrate however after slight debugging i found it to breaking at line https://github.com/paritytech/polkadot-sdk/blob/e38998801e433ecc569ff6d58d1d0aa80eaff771/polkadot/cli/src/command.rs#L149.&#xD;&#xA;&#xD;&#xA;Variable named `path` is coming as `dev`.&#xD;&#xA;If i directly pass spec json path (`polkadot/node/service/chain-specs/polkadot.json`) in the above line then it is able to fetch the spec but gives error unable to find binary in paths `/users/$NAME/blockchain/polkadot-sdk/target/debug` and `/usr/lib/polkadot`.&#xD;&#xA; &#xD;&#xA;```Error 0: Worker binaries could not be found, make sure polkadot was built/installed correctly. If you ran with `cargo run`, please run `cargo build` first. Searched given workers path (None), polkadot binary path (&quot;/Users/$NAME/blockchain/polkadot-sdk/target/debug&quot;), and lib path (/usr/lib/polkadot), workers names: None```.&#xD;&#xA;&#xD;&#xA; However the binary is present in the first path atleast. I cannot directly run a binary after downloading as i need to make some code changes and plug it to polkadot js apps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3EHCg.png&#xD;&#xA;[![target folder screenshot][1]][1]" ContentLicense="CC BY-SA 4.0" />
  <row Id="39579" PostHistoryTypeId="5" PostId="9944" RevisionGUID="7d98c208-5420-4446-b04c-082487f3949f" CreationDate="2023-09-19T05:35:34.570" UserId="1959" Comment="Update " Text="In your reserveTransfer, beneficiary &gt; AccountId32 &gt; Network should be Rococo, same as your XCM config. https://github.com/t3rn/t3rn/blob/development/runtime/t0rn-parachain/src/xbi_config.rs#L97&#xD;&#xA;&#xD;&#xA;### --- Update&#xD;&#xA;&gt; The transfer returns no errors but the funds do not appear on the account on the parachain but goes to the SovereignAccount.&#xD;&#xA;&#xD;&#xA;It's right. Reserve transfer works like this.&#xD;&#xA;&#xD;&#xA;1. On Rococo: Transfer ROC to your parachain SovereignAccount.&#xD;&#xA;2. On Rococo: Send `ReserveAssetDeposited(ROC)` to your parachain.&#xD;&#xA;3. On your parachain: Execute `ReserveAssetDeposited` then add ROC to holding register.&#xD;&#xA;4. On your parachain: Deposit ROC (in holding) to Beneficiary account through `Config::AssetTransactor::deposit_asset`&#xD;&#xA;&#xD;&#xA;Please Note that in step 4. the assetId of ROC is Multilocation(parents:1, Here). **And you need to get your Config::AssetTransactor know the mapping from Multiocation(parents:1, Here) to the ID you registered in your parachain**. Otherwise it will lead to `MatchError::AssetNotHandled`&#xD;&#xA;&#xD;&#xA;So I think the Matcher in your [`FungiblesTransactor`](https://github.com/t3rn/t3rn/blob/development/runtime/t0rn-parachain/src/xbi_config.rs#L138) is wrong. Maybe it should be related to your `AssetRegistry`.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39580" PostHistoryTypeId="5" PostId="9944" RevisionGUID="209744f1-b3bc-47ad-abcc-49d5dc43af95" CreationDate="2023-09-19T05:52:09.673" UserId="1959" Comment="deleted 214 characters in body" Text="&gt; The transfer returns no errors but the funds do not appear on the account on the parachain but goes to the SovereignAccount.&#xD;&#xA;&#xD;&#xA;It's right. Reserve transfer works like this.&#xD;&#xA;&#xD;&#xA;1. On Rococo: Transfer ROC to your parachain SovereignAccount.&#xD;&#xA;2. On Rococo: Send `ReserveAssetDeposited(ROC)` to your parachain.&#xD;&#xA;3. On your parachain: Execute `ReserveAssetDeposited` then add ROC to holding register.&#xD;&#xA;4. On your parachain: Deposit ROC (in holding) to Beneficiary account through `Config::AssetTransactor::deposit_asset`&#xD;&#xA;&#xD;&#xA;Please Note that in step 4. the assetId of ROC is Multilocation(parents:1, Here). **And you need to get your Config::AssetTransactor know the mapping from Multiocation(parents:1, Here) to the ID you registered in your parachain**. Otherwise it will lead to `MatchError::AssetNotHandled`&#xD;&#xA;&#xD;&#xA;So I think the Matcher in your [`FungiblesTransactor`](https://github.com/t3rn/t3rn/blob/development/runtime/t0rn-parachain/src/xbi_config.rs#L138) is wrong. Maybe it should be related to your `AssetRegistry`.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39581" PostHistoryTypeId="2" PostId="9974" RevisionGUID="cca9e784-9d2b-4463-95bb-c752efa77686" CreationDate="2023-09-19T06:22:36.460" UserId="4556" Text="I have a custom pallet that makes calls to the Nfts pallet to create collections and mint NFTs. The problem is that I can't find a way to set the metadata of a token. I do see something like `set_typed_attribute` being available in the Mutate trait, but is this really the same? The Rust documentation doesn't make me much wiser.&#xD;&#xA;&#xD;&#xA;What I expected to find is something similar to `fungibles::metadata::Mutate`, which provides `set` to set metadata on fungible assets.&#xD;&#xA;&#xD;&#xA;Therefore I'm very confused about how I can set metadata on items of the Nfts pallet. I'd highly appreciate if someone could put me on the right track." ContentLicense="CC BY-SA 4.0" />
  <row Id="39583" PostHistoryTypeId="1" PostId="9974" RevisionGUID="cca9e784-9d2b-4463-95bb-c752efa77686" CreationDate="2023-09-19T06:22:36.460" UserId="4556" Text="Setting metadata of an item of the Nfts pallet in a custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="39584" PostHistoryTypeId="3" PostId="9974" RevisionGUID="cca9e784-9d2b-4463-95bb-c752efa77686" CreationDate="2023-09-19T06:22:36.460" UserId="4556" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39585" PostHistoryTypeId="2" PostId="9975" RevisionGUID="da9dbae6-194c-48aa-a2dc-6457fe824d62" CreationDate="2023-09-19T06:58:58.490" UserId="4665" Text="my goal is to list all balance changes for an account on a substrate chain e.g. Acala&#xD;&#xA;&#xD;&#xA;I assumed that on substrate chains that all incoming and outgoing values from an account would be shown in transfers. However, when I list all the transactions for an account and try to calculate the incoming vs outgoing it doesn't equal the final balance. For example with this transaction: https://polkaholic.io/tx/0xad1c3b7704c249937333c746430923facf240d5b859f494b41435e3e4f84b291)&#xD;&#xA;&#xD;&#xA;It shows the ACA fund movement, but doesn't show the 38.0228718674 LDOT transferred to `25zCsRMG5kBokWCFaDPuMSYz8nsQX1ZiwHVvfY7bVoJndmhW`. &#xD;&#xA;&#xD;&#xA;I initially thought some events don't show up in transfers - in this case the &quot;Endowed&quot; event, however in the same transaction you can see an ACA Endowed event is reflected in the transfers.&#xD;&#xA;&#xD;&#xA;Is there a way to determine if a tx type will be included in the transfers? Is there a better way to get the balance changes to an account or some API that provides this data more easily? So far I've only come across Polkaholic and Subscan." ContentLicense="CC BY-SA 4.0" />
  <row Id="39587" PostHistoryTypeId="1" PostId="9975" RevisionGUID="da9dbae6-194c-48aa-a2dc-6457fe824d62" CreationDate="2023-09-19T06:58:58.490" UserId="4665" Text="List all transactions on Substrate chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="39588" PostHistoryTypeId="3" PostId="9975" RevisionGUID="da9dbae6-194c-48aa-a2dc-6457fe824d62" CreationDate="2023-09-19T06:58:58.490" UserId="4665" Text="|extrinsic|transactions|events|transfer|acala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39590" PostHistoryTypeId="2" PostId="9976" RevisionGUID="ee34c354-ddfb-4086-80b7-da56f1290f4d" CreationDate="2023-09-19T09:21:19.250" UserId="3196" Text="This was an ongoing issue raised in polkadot-sdk repo. Answered there, linking here&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/issues/1372#issuecomment-1725114216" ContentLicense="CC BY-SA 4.0" />
  <row Id="39592" PostHistoryTypeId="6" PostId="9974" RevisionGUID="21db5775-7ad9-45c7-b7fd-32cfd3771897" CreationDate="2023-09-19T09:25:08.560" UserId="548" Comment="added 'nft' tag" Text="|substrate-node-template|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39593" PostHistoryTypeId="24" PostId="9974" RevisionGUID="21db5775-7ad9-45c7-b7fd-32cfd3771897" CreationDate="2023-09-19T09:25:08.560" Comment="Proposed by 548 approved by 4556 edit id of 577" ContentLicense="CC BY-SA 4.0" />
  <row Id="39598" PostHistoryTypeId="2" PostId="9978" RevisionGUID="acb07bb3-0a92-4e55-9990-865b95f84b3f" CreationDate="2023-09-19T10:51:40.750" UserId="267" Text="Obviously, problem is that when running a localnode, the node does only produce new blocks when transactions come in. So when you deploy contract and there is no transaction, timestamps gets not updated.&#xD;&#xA;&#xD;&#xA;I deployed contract on Rococo test network, and work just fine." ContentLicense="CC BY-SA 4.0" />
  <row Id="39600" PostHistoryTypeId="2" PostId="9979" RevisionGUID="b12fa43a-5d4f-48be-8bfe-230be2fa773d" CreationDate="2023-09-19T15:16:40.830" UserId="3327" Text="I am following following tutorial to write collectibles pallet:&#xD;&#xA;https://docs.substrate.io/tutorials/collectibles-workshop/. &#xD;&#xA;&#xD;&#xA;My source code is available here:&#xD;&#xA;https://github.com/sayyedkamran/substrate-node-template&#xD;&#xA;&#xD;&#xA;The collectible pallet compiled successfully. When I try to add it to the runtime it is giving some very strange errors: &#xD;&#xA;&#xD;&#xA;syedkamran@192 substrate-node-template % cargo build --release&#xD;&#xA;warning: some crates are on edition 2021 which defaults to `resolver = &quot;2&quot;`, but virtual workspaces default to `resolver = &quot;1&quot;`&#xD;&#xA;note: to keep the current resolver, specify `workspace.resolver = &quot;1&quot;` in the workspace root's manifest&#xD;&#xA;note: to use the edition 2021 resolver, specify `workspace.resolver = &quot;2&quot;` in the workspace root's manifest&#xD;&#xA;    Blocking waiting for file lock on package cache&#xD;&#xA;   Compiling node-template-runtime v4.0.0-dev (/Users/syedkamran/polkadot/kamran/substrate-node-template/runtime)&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/syedkamran/polkadot/kamran/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/syedkamran/polkadot/kamran/substrate-node-template/target/release/build/node-template-runtime-dbf9bf989bdc97d4/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/syedkamran/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/syedkamran/polkadot/kamran/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.74.0-nightly (8550f15e1 2023-08-27)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/Users/syedkamran/polkadot/kamran/substrate-node-template/runtime)&#xD;&#xA;  error[E0433]: failed to resolve: could not find `__private` in `frame_support`&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:289:1&#xD;&#xA;      |&#xD;&#xA;  289 | / construct_runtime!(&#xD;&#xA;  290 | |     pub struct Runtime {&#xD;&#xA;  291 | |         System: frame_system,&#xD;&#xA;  292 | |         Timestamp: pallet_timestamp,&#xD;&#xA;  ...   |&#xD;&#xA;  301 | |     }&#xD;&#xA;  302 | | );&#xD;&#xA;      | |_^ could not find `__private` in `frame_support`&#xD;&#xA;      |&#xD;&#xA;      = note: this error originates in the macro `collectibles::tt_default_parts` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Aura` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:92:14&#xD;&#xA;     |&#xD;&#xA;  92 |             pub aura: Aura,&#xD;&#xA;     |                       ^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Grandpa` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:93:17&#xD;&#xA;     |&#xD;&#xA;  93 |             pub grandpa: Grandpa,&#xD;&#xA;     |                          ^^^^^^^ help: a type alias with a similar name exists: `GrandpaId`&#xD;&#xA;     |&#xD;&#xA;    ::: /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/consensus/grandpa/src/lib.rs:57:1&#xD;&#xA;     |&#xD;&#xA;  57 | pub type AuthorityId = app::Public;&#xD;&#xA;     | -------------------- similarly named type alias `GrandpaId` defined here&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Aura` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:92:14&#xD;&#xA;     |&#xD;&#xA;  92 |             pub aura: Aura,&#xD;&#xA;     |                       ^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;    --&gt; /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1997:19&#xD;&#xA;     |&#xD;&#xA;  199|         pub struct $name&lt;Aura&gt; {&#xD;&#xA;     |                         ++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Grandpa` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:93:17&#xD;&#xA;     |&#xD;&#xA;  93 |             pub grandpa: Grandpa,&#xD;&#xA;     |                          ^^^^^^^&#xD;&#xA;     |&#xD;&#xA;    ::: /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/consensus/grandpa/src/lib.rs:57:1&#xD;&#xA;     |&#xD;&#xA;  57 | pub type AuthorityId = app::Public;&#xD;&#xA;     | -------------------- similarly named type alias `GrandpaId` defined here&#xD;&#xA;     |&#xD;&#xA;  help: a type alias with a similar name exists&#xD;&#xA;     |&#xD;&#xA;  93 |             pub grandpa: GrandpaId,&#xD;&#xA;     |                          ~~~~~~~~~&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;    --&gt; /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1997:19&#xD;&#xA;     |&#xD;&#xA;  199|         pub struct $name&lt;Grandpa&gt; {&#xD;&#xA;     |                         +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Aura` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:92:14&#xD;&#xA;     |&#xD;&#xA;  92 |             pub aura: Aura,&#xD;&#xA;     |                       ^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;    --&gt; /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1994:32&#xD;&#xA;     |&#xD;&#xA;  199|             $crate::scale_info::TypeInfo&lt;Aura&gt;,&#xD;&#xA;     |                                         ++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Grandpa` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:93:17&#xD;&#xA;     |&#xD;&#xA;  93 |             pub grandpa: Grandpa,&#xD;&#xA;     |                          ^^^^^^^&#xD;&#xA;     |&#xD;&#xA;    ::: /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/consensus/grandpa/src/lib.rs:57:1&#xD;&#xA;     |&#xD;&#xA;  57 | pub type AuthorityId = app::Public;&#xD;&#xA;     | -------------------- similarly named type alias `GrandpaId` defined here&#xD;&#xA;     |&#xD;&#xA;  help: a type alias with a similar name exists&#xD;&#xA;     |&#xD;&#xA;  93 |             pub grandpa: GrandpaId,&#xD;&#xA;     |                          ~~~~~~~~~&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;    --&gt; /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1994:32&#xD;&#xA;     |&#xD;&#xA;  199|             $crate::scale_info::TypeInfo&lt;Grandpa&gt;,&#xD;&#xA;     |                                         +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:158:31&#xD;&#xA;      |&#xD;&#xA;  158 | impl frame_system::Config for Runtime {&#xD;&#xA;      |                               ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:170:21&#xD;&#xA;      |&#xD;&#xA;  170 |     type RuntimeCall = RuntimeCall;&#xD;&#xA;      |                        ^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeCall`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:180:22&#xD;&#xA;      |&#xD;&#xA;  180 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeOrigin` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:182:23&#xD;&#xA;      |&#xD;&#xA;  182 |     type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;      |                          ^^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeOrigin`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `PalletInfo` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:192:20&#xD;&#xA;      |&#xD;&#xA;  192 |     type PalletInfo = PalletInfo;&#xD;&#xA;      |                       ^^^^^^^^^^&#xD;&#xA;      |&#xD;&#xA;  help: you might have meant to use the associated type&#xD;&#xA;      |&#xD;&#xA;  192 |     type PalletInfo = Self::PalletInfo;&#xD;&#xA;      |                       ~~~~~~~~~~~~~~~~&#xD;&#xA;  help: consider importing this trait&#xD;&#xA;      |&#xD;&#xA;  9   + use frame_support::traits::PalletInfo;&#xD;&#xA;      |&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:208:30&#xD;&#xA;      |&#xD;&#xA;  208 | impl pallet_aura::Config for Runtime {&#xD;&#xA;      |                              ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:215:33&#xD;&#xA;      |&#xD;&#xA;  215 | impl pallet_grandpa::Config for Runtime {&#xD;&#xA;      |                                 ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:216:22&#xD;&#xA;      |&#xD;&#xA;  216 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:226:35&#xD;&#xA;      |&#xD;&#xA;  226 | impl pallet_timestamp::Config for Runtime {&#xD;&#xA;      |                                   ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Aura` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:229:24&#xD;&#xA;      |&#xD;&#xA;  229 |     type OnTimestampSet = Aura;&#xD;&#xA;      |                           ^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:237:34&#xD;&#xA;      |&#xD;&#xA;  237 | impl pallet_balances::Config for Runtime {&#xD;&#xA;      |                                  ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:244:22&#xD;&#xA;      |&#xD;&#xA;  244 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `System` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:247:22&#xD;&#xA;      |&#xD;&#xA;  247 |     type AccountStore = System;&#xD;&#xA;      |                         ^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:248:62&#xD;&#xA;      |&#xD;&#xA;  248 |     type WeightInfo = pallet_balances::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;      |                                                                 ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  237 | impl&lt;Runtime&gt; pallet_balances::Config for Runtime {&#xD;&#xA;      |     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:259:45&#xD;&#xA;      |&#xD;&#xA;  259 | impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;      |                                             ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:260:22&#xD;&#xA;      |&#xD;&#xA;  260 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Balances` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:261:45&#xD;&#xA;      |&#xD;&#xA;  66  | pub type Balance = u128;&#xD;&#xA;      | ------------------------ similarly named type alias `Balance` defined here&#xD;&#xA;  ...&#xD;&#xA;  261 |     type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;      |                                                ^^^^^^^^&#xD;&#xA;      |&#xD;&#xA;  help: a type alias with a similar name exists&#xD;&#xA;      |&#xD;&#xA;  261 |     type OnChargeTransaction = CurrencyAdapter&lt;Balance, ()&gt;;&#xD;&#xA;      |                                                ~~~~~~~&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  259 | impl&lt;Balances&gt; pallet_transaction_payment::Config for Runtime {&#xD;&#xA;      |     ++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:268:30&#xD;&#xA;      |&#xD;&#xA;  268 | impl pallet_sudo::Config for Runtime {&#xD;&#xA;      |                              ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:269:22&#xD;&#xA;      |&#xD;&#xA;  269 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:270:21&#xD;&#xA;      |&#xD;&#xA;  270 |     type RuntimeCall = RuntimeCall;&#xD;&#xA;      |                        ^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeCall`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:271:58&#xD;&#xA;      |&#xD;&#xA;  271 |     type WeightInfo = pallet_sudo::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;      |                                                             ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  268 | impl&lt;Runtime&gt; pallet_sudo::Config for Runtime {&#xD;&#xA;      |     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:275:34&#xD;&#xA;      |&#xD;&#xA;  275 | impl pallet_template::Config for Runtime {&#xD;&#xA;      |                                  ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:276:22&#xD;&#xA;      |&#xD;&#xA;  276 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:277:62&#xD;&#xA;      |&#xD;&#xA;  277 |     type WeightInfo = pallet_template::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;      |                                                                 ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  275 | impl&lt;Runtime&gt; pallet_template::Config for Runtime {&#xD;&#xA;      |     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:281:31&#xD;&#xA;      |&#xD;&#xA;  281 | impl collectibles::Config for Runtime {&#xD;&#xA;      |                               ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:282:25&#xD;&#xA;      |&#xD;&#xA;  282 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Balances` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:283:21&#xD;&#xA;      |&#xD;&#xA;  66  | pub type Balance = u128;&#xD;&#xA;      | ------------------------ similarly named type alias `Balance` defined here&#xD;&#xA;  ...&#xD;&#xA;  283 |     type Currency = Balances;&#xD;&#xA;      |                     ^^^^^^^^ help: a type alias with a similar name exists: `Balance`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RandomnessCollectiveFlip` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:284:33&#xD;&#xA;      |&#xD;&#xA;  284 |     type CollectionRandomness = RandomnessCollectiveFlip;&#xD;&#xA;      |                                 ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:312:35&#xD;&#xA;      |&#xD;&#xA;  312 |     frame_system::CheckNonZeroSender&lt;Runtime&gt;,&#xD;&#xA;      |                                      ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:313:33&#xD;&#xA;      |&#xD;&#xA;  313 |     frame_system::CheckSpecVersion&lt;Runtime&gt;,&#xD;&#xA;      |                                    ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:314:31&#xD;&#xA;      |&#xD;&#xA;  314 |     frame_system::CheckTxVersion&lt;Runtime&gt;,&#xD;&#xA;      |                                  ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:315:29&#xD;&#xA;      |&#xD;&#xA;  315 |     frame_system::CheckGenesis&lt;Runtime&gt;,&#xD;&#xA;      |                                ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:316:25&#xD;&#xA;      |&#xD;&#xA;  316 |     frame_system::CheckEra&lt;Runtime&gt;,&#xD;&#xA;      |                            ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:317:27&#xD;&#xA;      |&#xD;&#xA;  317 |     frame_system::CheckNonce&lt;Runtime&gt;,&#xD;&#xA;      |                              ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:318:28&#xD;&#xA;      |&#xD;&#xA;  318 |     frame_system::CheckWeight&lt;Runtime&gt;,&#xD;&#xA;      |                               ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:319:55&#xD;&#xA;      |&#xD;&#xA;  319 |     pallet_transaction_payment::ChargeTransactionPayment&lt;Runtime&gt;,&#xD;&#xA;      |                                                          ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:324:39&#xD;&#xA;      |&#xD;&#xA;  324 |     generic::UncheckedExtrinsic&lt;Address, RuntimeCall, Signature, SignedExtra&gt;;&#xD;&#xA;      |                                          ^^^^^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  323 | pub type UncheckedExtrinsic&lt;RuntimeCall&gt; =&#xD;&#xA;      |                            +++++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:326:49&#xD;&#xA;      |&#xD;&#xA;  326 | pub type SignedPayload = generic::SignedPayload&lt;RuntimeCall, SignedExtra&gt;;&#xD;&#xA;      |                                                 ^^^^^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  326 | pub type SignedPayload&lt;RuntimeCall&gt; = generic::SignedPayload&lt;RuntimeCall, SignedExtra&gt;;&#xD;&#xA;      |                       +++++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:329:2&#xD;&#xA;      |&#xD;&#xA;  329 |     Runtime,&#xD;&#xA;      |     ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  328 | pub type Executive&lt;Runtime&gt; = frame_executive::Executive&lt;&#xD;&#xA;      |                   +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:331:29&#xD;&#xA;      |&#xD;&#xA;  331 |     frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;      |                                ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  328 | pub type Executive&lt;Runtime&gt; = frame_executive::Executive&lt;&#xD;&#xA;      |                   +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:332:2&#xD;&#xA;      |&#xD;&#xA;  332 |     Runtime,&#xD;&#xA;      |     ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  328 | pub type Executive&lt;Runtime&gt; = frame_executive::Executive&lt;&#xD;&#xA;      |                   +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `AllPalletsWithSystem` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:333:2&#xD;&#xA;      |&#xD;&#xA;  333 |     AllPalletsWithSystem,&#xD;&#xA;      |     ^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  328 | pub type Executive&lt;AllPalletsWithSystem&gt; = frame_executive::Executive&lt;&#xD;&#xA;      |                   ++++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:353:31&#xD;&#xA;      |&#xD;&#xA;  353 |     impl sp_api::Core&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                  ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:367:35&#xD;&#xA;      |&#xD;&#xA;  367 |     impl sp_api::Metadata&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                      ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:381:49&#xD;&#xA;      |&#xD;&#xA;  381 |     impl sp_block_builder::BlockBuilder&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                                    ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:402:75&#xD;&#xA;      |&#xD;&#xA;  402 |     impl sp_transaction_pool::runtime_api::TaggedTransactionQueue&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                                                              ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:412:49&#xD;&#xA;      |&#xD;&#xA;  412 |     impl sp_offchain::OffchainWorkerApi&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                                    ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:418:53&#xD;&#xA;      |&#xD;&#xA;  418 |     impl sp_consensus_aura::AuraApi&lt;Block, AuraId&gt; for Runtime {&#xD;&#xA;      |                                                        ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:428:42&#xD;&#xA;      |&#xD;&#xA;  428 |     impl sp_session::SessionKeys&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                             ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:440:51&#xD;&#xA;      |&#xD;&#xA;  440 |     impl sp_consensus_grandpa::GrandpaApi&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                                      ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:470:82&#xD;&#xA;      |&#xD;&#xA;  470 |     impl frame_system_rpc_runtime_api::AccountNonceApi&lt;Block, AccountId, Nonce&gt; for Runtime {&#xD;&#xA;      |                                                                                     ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:476:93&#xD;&#xA;      |&#xD;&#xA;  476 |     impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi&lt;Block, Balance&gt; for Runtime {&#xD;&#xA;      |                                                                                                ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:497:93&#xD;&#xA;      |&#xD;&#xA;  497 |     impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi&lt;Block, Balance, RuntimeCall&gt;&#xD;&#xA;      |                                                                                                ^^^^^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  497 |     impl&lt;RuntimeCall&gt; pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi&lt;Block, Balance, RuntimeCall&gt;&#xD;&#xA;      |         +++++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:498:7&#xD;&#xA;      |&#xD;&#xA;  498 |         for Runtime&#xD;&#xA;      |             ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:501:10&#xD;&#xA;      |&#xD;&#xA;  501 |             call: RuntimeCall,&#xD;&#xA;      |                   ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:507:10&#xD;&#xA;      |&#xD;&#xA;  507 |             call: RuntimeCall,&#xD;&#xA;      |                   ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:497:93&#xD;&#xA;      |&#xD;&#xA;  497 |     impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi&lt;Block, Balance, RuntimeCall&gt;&#xD;&#xA;      |                                                                                                ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0152]: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/syedkamran/polkadot/kamran/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-3d99c77e35d60298.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /Users/syedkamran/polkadot/kamran/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-2276528edc6133c9.rmeta&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared type `Runtime`&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:369:24&#xD;&#xA;      |&#xD;&#xA;  369 |             OpaqueMetadata::new(Runtime::metadata().into())&#xD;&#xA;      |                                 ^^^^^^^ use of undeclared type `Runtime`&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared type `Runtime`&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39602" PostHistoryTypeId="1" PostId="9979" RevisionGUID="b12fa43a-5d4f-48be-8bfe-230be2fa773d" CreationDate="2023-09-19T15:16:40.830" UserId="3327" Text="how to resolve could not find `__private` in `frame_support?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39603" PostHistoryTypeId="3" PostId="9979" RevisionGUID="b12fa43a-5d4f-48be-8bfe-230be2fa773d" CreationDate="2023-09-19T15:16:40.830" UserId="3327" Text="|substrate-node-template|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39604" PostHistoryTypeId="5" PostId="9979" RevisionGUID="105c1713-4f66-4cff-81d2-77dca2bc0516" CreationDate="2023-09-19T15:49:18.007" UserId="2762" Comment="improved formatting" Text="I am following following tutorial to write collectibles pallet:&#xD;&#xA;https://docs.substrate.io/tutorials/collectibles-workshop/. &#xD;&#xA;&#xD;&#xA;My source code is available here:&#xD;&#xA;https://github.com/sayyedkamran/substrate-node-template&#xD;&#xA;&#xD;&#xA;The collectible pallet compiled successfully. When I try to add it to the runtime it is giving some very strange errors: &#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;syedkamran@192 substrate-node-template % cargo build --release&#xD;&#xA;warning: some crates are on edition 2021 which defaults to `resolver = &quot;2&quot;`, but virtual workspaces default to `resolver = &quot;1&quot;`&#xD;&#xA;note: to keep the current resolver, specify `workspace.resolver = &quot;1&quot;` in the workspace root's manifest&#xD;&#xA;note: to use the edition 2021 resolver, specify `workspace.resolver = &quot;2&quot;` in the workspace root's manifest&#xD;&#xA;    Blocking waiting for file lock on package cache&#xD;&#xA;   Compiling node-template-runtime v4.0.0-dev (/Users/syedkamran/polkadot/kamran/substrate-node-template/runtime)&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/syedkamran/polkadot/kamran/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/syedkamran/polkadot/kamran/substrate-node-template/target/release/build/node-template-runtime-dbf9bf989bdc97d4/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/syedkamran/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/syedkamran/polkadot/kamran/substrate-node-template/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.74.0-nightly (8550f15e1 2023-08-27)&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling node-template-runtime v4.0.0-dev (/Users/syedkamran/polkadot/kamran/substrate-node-template/runtime)&#xD;&#xA;  error[E0433]: failed to resolve: could not find `__private` in `frame_support`&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:289:1&#xD;&#xA;      |&#xD;&#xA;  289 | / construct_runtime!(&#xD;&#xA;  290 | |     pub struct Runtime {&#xD;&#xA;  291 | |         System: frame_system,&#xD;&#xA;  292 | |         Timestamp: pallet_timestamp,&#xD;&#xA;  ...   |&#xD;&#xA;  301 | |     }&#xD;&#xA;  302 | | );&#xD;&#xA;      | |_^ could not find `__private` in `frame_support`&#xD;&#xA;      |&#xD;&#xA;      = note: this error originates in the macro `collectibles::tt_default_parts` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Aura` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:92:14&#xD;&#xA;     |&#xD;&#xA;  92 |             pub aura: Aura,&#xD;&#xA;     |                       ^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Grandpa` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:93:17&#xD;&#xA;     |&#xD;&#xA;  93 |             pub grandpa: Grandpa,&#xD;&#xA;     |                          ^^^^^^^ help: a type alias with a similar name exists: `GrandpaId`&#xD;&#xA;     |&#xD;&#xA;    ::: /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/consensus/grandpa/src/lib.rs:57:1&#xD;&#xA;     |&#xD;&#xA;  57 | pub type AuthorityId = app::Public;&#xD;&#xA;     | -------------------- similarly named type alias `GrandpaId` defined here&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Aura` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:92:14&#xD;&#xA;     |&#xD;&#xA;  92 |             pub aura: Aura,&#xD;&#xA;     |                       ^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;    --&gt; /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1997:19&#xD;&#xA;     |&#xD;&#xA;  199|         pub struct $name&lt;Aura&gt; {&#xD;&#xA;     |                         ++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Grandpa` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:93:17&#xD;&#xA;     |&#xD;&#xA;  93 |             pub grandpa: Grandpa,&#xD;&#xA;     |                          ^^^^^^^&#xD;&#xA;     |&#xD;&#xA;    ::: /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/consensus/grandpa/src/lib.rs:57:1&#xD;&#xA;     |&#xD;&#xA;  57 | pub type AuthorityId = app::Public;&#xD;&#xA;     | -------------------- similarly named type alias `GrandpaId` defined here&#xD;&#xA;     |&#xD;&#xA;  help: a type alias with a similar name exists&#xD;&#xA;     |&#xD;&#xA;  93 |             pub grandpa: GrandpaId,&#xD;&#xA;     |                          ~~~~~~~~~&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;    --&gt; /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1997:19&#xD;&#xA;     |&#xD;&#xA;  199|         pub struct $name&lt;Grandpa&gt; {&#xD;&#xA;     |                         +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Aura` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:92:14&#xD;&#xA;     |&#xD;&#xA;  92 |             pub aura: Aura,&#xD;&#xA;     |                       ^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;    --&gt; /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1994:32&#xD;&#xA;     |&#xD;&#xA;  199|             $crate::scale_info::TypeInfo&lt;Aura&gt;,&#xD;&#xA;     |                                         ++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Grandpa` in this scope&#xD;&#xA;    --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:93:17&#xD;&#xA;     |&#xD;&#xA;  93 |             pub grandpa: Grandpa,&#xD;&#xA;     |                          ^^^^^^^&#xD;&#xA;     |&#xD;&#xA;    ::: /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/consensus/grandpa/src/lib.rs:57:1&#xD;&#xA;     |&#xD;&#xA;  57 | pub type AuthorityId = app::Public;&#xD;&#xA;     | -------------------- similarly named type alias `GrandpaId` defined here&#xD;&#xA;     |&#xD;&#xA;  help: a type alias with a similar name exists&#xD;&#xA;     |&#xD;&#xA;  93 |             pub grandpa: GrandpaId,&#xD;&#xA;     |                          ~~~~~~~~~&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;    --&gt; /Users/syedkamran/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:1994:32&#xD;&#xA;     |&#xD;&#xA;  199|             $crate::scale_info::TypeInfo&lt;Grandpa&gt;,&#xD;&#xA;     |                                         +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:158:31&#xD;&#xA;      |&#xD;&#xA;  158 | impl frame_system::Config for Runtime {&#xD;&#xA;      |                               ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:170:21&#xD;&#xA;      |&#xD;&#xA;  170 |     type RuntimeCall = RuntimeCall;&#xD;&#xA;      |                        ^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeCall`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:180:22&#xD;&#xA;      |&#xD;&#xA;  180 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeOrigin` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:182:23&#xD;&#xA;      |&#xD;&#xA;  182 |     type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;      |                          ^^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeOrigin`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `PalletInfo` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:192:20&#xD;&#xA;      |&#xD;&#xA;  192 |     type PalletInfo = PalletInfo;&#xD;&#xA;      |                       ^^^^^^^^^^&#xD;&#xA;      |&#xD;&#xA;  help: you might have meant to use the associated type&#xD;&#xA;      |&#xD;&#xA;  192 |     type PalletInfo = Self::PalletInfo;&#xD;&#xA;      |                       ~~~~~~~~~~~~~~~~&#xD;&#xA;  help: consider importing this trait&#xD;&#xA;      |&#xD;&#xA;  9   + use frame_support::traits::PalletInfo;&#xD;&#xA;      |&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:208:30&#xD;&#xA;      |&#xD;&#xA;  208 | impl pallet_aura::Config for Runtime {&#xD;&#xA;      |                              ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:215:33&#xD;&#xA;      |&#xD;&#xA;  215 | impl pallet_grandpa::Config for Runtime {&#xD;&#xA;      |                                 ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:216:22&#xD;&#xA;      |&#xD;&#xA;  216 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:226:35&#xD;&#xA;      |&#xD;&#xA;  226 | impl pallet_timestamp::Config for Runtime {&#xD;&#xA;      |                                   ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Aura` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:229:24&#xD;&#xA;      |&#xD;&#xA;  229 |     type OnTimestampSet = Aura;&#xD;&#xA;      |                           ^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:237:34&#xD;&#xA;      |&#xD;&#xA;  237 | impl pallet_balances::Config for Runtime {&#xD;&#xA;      |                                  ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:244:22&#xD;&#xA;      |&#xD;&#xA;  244 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `System` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:247:22&#xD;&#xA;      |&#xD;&#xA;  247 |     type AccountStore = System;&#xD;&#xA;      |                         ^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:248:62&#xD;&#xA;      |&#xD;&#xA;  248 |     type WeightInfo = pallet_balances::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;      |                                                                 ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  237 | impl&lt;Runtime&gt; pallet_balances::Config for Runtime {&#xD;&#xA;      |     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:259:45&#xD;&#xA;      |&#xD;&#xA;  259 | impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;      |                                             ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:260:22&#xD;&#xA;      |&#xD;&#xA;  260 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Balances` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:261:45&#xD;&#xA;      |&#xD;&#xA;  66  | pub type Balance = u128;&#xD;&#xA;      | ------------------------ similarly named type alias `Balance` defined here&#xD;&#xA;  ...&#xD;&#xA;  261 |     type OnChargeTransaction = CurrencyAdapter&lt;Balances, ()&gt;;&#xD;&#xA;      |                                                ^^^^^^^^&#xD;&#xA;      |&#xD;&#xA;  help: a type alias with a similar name exists&#xD;&#xA;      |&#xD;&#xA;  261 |     type OnChargeTransaction = CurrencyAdapter&lt;Balance, ()&gt;;&#xD;&#xA;      |                                                ~~~~~~~&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  259 | impl&lt;Balances&gt; pallet_transaction_payment::Config for Runtime {&#xD;&#xA;      |     ++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:268:30&#xD;&#xA;      |&#xD;&#xA;  268 | impl pallet_sudo::Config for Runtime {&#xD;&#xA;      |                              ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:269:22&#xD;&#xA;      |&#xD;&#xA;  269 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:270:21&#xD;&#xA;      |&#xD;&#xA;  270 |     type RuntimeCall = RuntimeCall;&#xD;&#xA;      |                        ^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeCall`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:271:58&#xD;&#xA;      |&#xD;&#xA;  271 |     type WeightInfo = pallet_sudo::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;      |                                                             ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  268 | impl&lt;Runtime&gt; pallet_sudo::Config for Runtime {&#xD;&#xA;      |     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:275:34&#xD;&#xA;      |&#xD;&#xA;  275 | impl pallet_template::Config for Runtime {&#xD;&#xA;      |                                  ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:276:22&#xD;&#xA;      |&#xD;&#xA;  276 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:277:62&#xD;&#xA;      |&#xD;&#xA;  277 |     type WeightInfo = pallet_template::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;      |                                                                 ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  275 | impl&lt;Runtime&gt; pallet_template::Config for Runtime {&#xD;&#xA;      |     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:281:31&#xD;&#xA;      |&#xD;&#xA;  281 | impl collectibles::Config for Runtime {&#xD;&#xA;      |                               ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeEvent` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:282:25&#xD;&#xA;      |&#xD;&#xA;  282 |     type RuntimeEvent = RuntimeEvent;&#xD;&#xA;      |                         ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Balances` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:283:21&#xD;&#xA;      |&#xD;&#xA;  66  | pub type Balance = u128;&#xD;&#xA;      | ------------------------ similarly named type alias `Balance` defined here&#xD;&#xA;  ...&#xD;&#xA;  283 |     type Currency = Balances;&#xD;&#xA;      |                     ^^^^^^^^ help: a type alias with a similar name exists: `Balance`&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RandomnessCollectiveFlip` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:284:33&#xD;&#xA;      |&#xD;&#xA;  284 |     type CollectionRandomness = RandomnessCollectiveFlip;&#xD;&#xA;      |                                 ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:312:35&#xD;&#xA;      |&#xD;&#xA;  312 |     frame_system::CheckNonZeroSender&lt;Runtime&gt;,&#xD;&#xA;      |                                      ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:313:33&#xD;&#xA;      |&#xD;&#xA;  313 |     frame_system::CheckSpecVersion&lt;Runtime&gt;,&#xD;&#xA;      |                                    ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:314:31&#xD;&#xA;      |&#xD;&#xA;  314 |     frame_system::CheckTxVersion&lt;Runtime&gt;,&#xD;&#xA;      |                                  ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:315:29&#xD;&#xA;      |&#xD;&#xA;  315 |     frame_system::CheckGenesis&lt;Runtime&gt;,&#xD;&#xA;      |                                ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:316:25&#xD;&#xA;      |&#xD;&#xA;  316 |     frame_system::CheckEra&lt;Runtime&gt;,&#xD;&#xA;      |                            ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:317:27&#xD;&#xA;      |&#xD;&#xA;  317 |     frame_system::CheckNonce&lt;Runtime&gt;,&#xD;&#xA;      |                              ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:318:28&#xD;&#xA;      |&#xD;&#xA;  318 |     frame_system::CheckWeight&lt;Runtime&gt;,&#xD;&#xA;      |                               ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:319:55&#xD;&#xA;      |&#xD;&#xA;  319 |     pallet_transaction_payment::ChargeTransactionPayment&lt;Runtime&gt;,&#xD;&#xA;      |                                                          ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  311 | pub type SignedExtra&lt;Runtime&gt; = (&#xD;&#xA;      |                     +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:324:39&#xD;&#xA;      |&#xD;&#xA;  324 |     generic::UncheckedExtrinsic&lt;Address, RuntimeCall, Signature, SignedExtra&gt;;&#xD;&#xA;      |                                          ^^^^^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  323 | pub type UncheckedExtrinsic&lt;RuntimeCall&gt; =&#xD;&#xA;      |                            +++++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:326:49&#xD;&#xA;      |&#xD;&#xA;  326 | pub type SignedPayload = generic::SignedPayload&lt;RuntimeCall, SignedExtra&gt;;&#xD;&#xA;      |                                                 ^^^^^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  326 | pub type SignedPayload&lt;RuntimeCall&gt; = generic::SignedPayload&lt;RuntimeCall, SignedExtra&gt;;&#xD;&#xA;      |                       +++++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:329:2&#xD;&#xA;      |&#xD;&#xA;  329 |     Runtime,&#xD;&#xA;      |     ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  328 | pub type Executive&lt;Runtime&gt; = frame_executive::Executive&lt;&#xD;&#xA;      |                   +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:331:29&#xD;&#xA;      |&#xD;&#xA;  331 |     frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;      |                                ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  328 | pub type Executive&lt;Runtime&gt; = frame_executive::Executive&lt;&#xD;&#xA;      |                   +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:332:2&#xD;&#xA;      |&#xD;&#xA;  332 |     Runtime,&#xD;&#xA;      |     ^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  328 | pub type Executive&lt;Runtime&gt; = frame_executive::Executive&lt;&#xD;&#xA;      |                   +++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `AllPalletsWithSystem` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:333:2&#xD;&#xA;      |&#xD;&#xA;  333 |     AllPalletsWithSystem,&#xD;&#xA;      |     ^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  328 | pub type Executive&lt;AllPalletsWithSystem&gt; = frame_executive::Executive&lt;&#xD;&#xA;      |                   ++++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:353:31&#xD;&#xA;      |&#xD;&#xA;  353 |     impl sp_api::Core&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                  ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:367:35&#xD;&#xA;      |&#xD;&#xA;  367 |     impl sp_api::Metadata&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                      ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:381:49&#xD;&#xA;      |&#xD;&#xA;  381 |     impl sp_block_builder::BlockBuilder&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                                    ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:402:75&#xD;&#xA;      |&#xD;&#xA;  402 |     impl sp_transaction_pool::runtime_api::TaggedTransactionQueue&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                                                              ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:412:49&#xD;&#xA;      |&#xD;&#xA;  412 |     impl sp_offchain::OffchainWorkerApi&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                                    ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:418:53&#xD;&#xA;      |&#xD;&#xA;  418 |     impl sp_consensus_aura::AuraApi&lt;Block, AuraId&gt; for Runtime {&#xD;&#xA;      |                                                        ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:428:42&#xD;&#xA;      |&#xD;&#xA;  428 |     impl sp_session::SessionKeys&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                             ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:440:51&#xD;&#xA;      |&#xD;&#xA;  440 |     impl sp_consensus_grandpa::GrandpaApi&lt;Block&gt; for Runtime {&#xD;&#xA;      |                                                      ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:470:82&#xD;&#xA;      |&#xD;&#xA;  470 |     impl frame_system_rpc_runtime_api::AccountNonceApi&lt;Block, AccountId, Nonce&gt; for Runtime {&#xD;&#xA;      |                                                                                     ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:476:93&#xD;&#xA;      |&#xD;&#xA;  476 |     impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi&lt;Block, Balance&gt; for Runtime {&#xD;&#xA;      |                                                                                                ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:497:93&#xD;&#xA;      |&#xD;&#xA;  497 |     impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi&lt;Block, Balance, RuntimeCall&gt;&#xD;&#xA;      |                                                                                                ^^^^^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: you might be missing a type parameter&#xD;&#xA;      |&#xD;&#xA;  497 |     impl&lt;RuntimeCall&gt; pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi&lt;Block, Balance, RuntimeCall&gt;&#xD;&#xA;      |         +++++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `Runtime` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:498:7&#xD;&#xA;      |&#xD;&#xA;  498 |         for Runtime&#xD;&#xA;      |             ^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:501:10&#xD;&#xA;      |&#xD;&#xA;  501 |             call: RuntimeCall,&#xD;&#xA;      |                   ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:507:10&#xD;&#xA;      |&#xD;&#xA;  507 |             call: RuntimeCall,&#xD;&#xA;      |                   ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0412]: cannot find type `RuntimeCall` in this scope&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:497:93&#xD;&#xA;      |&#xD;&#xA;  497 |     impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi&lt;Block, Balance, RuntimeCall&gt;&#xD;&#xA;      |                                                                                                ^^^^^^^^^^^ not found in this scope&#xD;&#xA;&#xD;&#xA;  error[E0152]: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/syedkamran/polkadot/kamran/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-3d99c77e35d60298.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /Users/syedkamran/polkadot/kamran/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-2276528edc6133c9.rmeta&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared type `Runtime`&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-template/runtime/src/lib.rs:369:24&#xD;&#xA;      |&#xD;&#xA;  369 |             OpaqueMetadata::new(Runtime::metadata().into())&#xD;&#xA;      |                                 ^^^^^^^ use of undeclared type `Runtime`&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared type `Runtime`&#xD;&#xA;     --&gt; /Users/syedkamran/polkadot/kamran/substrate-node-&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39605" PostHistoryTypeId="2" PostId="9980" RevisionGUID="e0638052-95a0-462f-81be-9475099f8965" CreationDate="2023-09-19T16:07:54.447" UserId="494" Text="Frontier is a Substrate client that just happens to have an EVM inside the Runtime.&#xD;&#xA;&#xD;&#xA;`pallet-evm` and `pallet-ethereum` will give you compatibility on an execution and RPC level, but that's it.&#xD;&#xA;&#xD;&#xA;All consensus, networking, and storage abstractions are completely different from traditional Ethereum clients. &#xD;&#xA;&#xD;&#xA;You're better off simply migrating the state from your Frontie-based EVM to whatever new client you choose, rather than trying to create this kind of compatibility (which would likely be a daunting engineering effort)." ContentLicense="CC BY-SA 4.0" />
  <row Id="39607" PostHistoryTypeId="5" PostId="9980" RevisionGUID="cf7d6826-73ee-4b37-9525-f5009a8e8ce5" CreationDate="2023-09-19T16:13:52.987" UserId="494" Comment="added 1 character in body" Text="Frontier is a Substrate client that just happens to have an EVM inside the Runtime.&#xD;&#xA;&#xD;&#xA;`pallet-evm` and `pallet-ethereum` will give you compatibility on an execution and RPC level, but that's it.&#xD;&#xA;&#xD;&#xA;All consensus, networking, and storage primitives are completely different from traditional Ethereum clients. &#xD;&#xA;&#xD;&#xA;Enabling this kind of compatibility would likely be a daunting engineering effort.&#xD;&#xA;&#xD;&#xA;You're better off simply migrating the state and/or history from your Frontier-based EVM to whatever new client you choose." ContentLicense="CC BY-SA 4.0" />
  <row Id="39608" PostHistoryTypeId="2" PostId="9981" RevisionGUID="c3bc080f-343f-442d-a8b0-02b67121aff6" CreationDate="2023-09-19T17:42:12.947" UserId="3327" Text="I am following this tutorial:&#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/&#xD;&#xA;&#xD;&#xA;While downloading the source code for relaychain I encountered the error: &#xD;&#xA;&#xD;&#xA;&quot;fatal: Remote branch release-v1.0.0 not found in upstream origin&quot;&#xD;&#xA;&#xD;&#xA;When I checked at: &#xD;&#xA;https://github.com/paritytech/polkadot-sdk/releases&#xD;&#xA; &#xD;&#xA;It has a new release that is &quot;Polkadot v1.1.0&quot; and it says that the three repositories Substratte, Polkadot and Cumulus are not merged.&#xD;&#xA;&#xD;&#xA;I am really confused, since I wanted to connect substrate parachain with the polladot relaychian. So, what version of polkadot relaychain and susbtrate-parachain-tempalte I should use for this purpose?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39610" PostHistoryTypeId="1" PostId="9981" RevisionGUID="c3bc080f-343f-442d-a8b0-02b67121aff6" CreationDate="2023-09-19T17:42:12.947" UserId="3327" Text="What version of polkadot relaychain and substrate-parachain-template can be used?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39611" PostHistoryTypeId="3" PostId="9981" RevisionGUID="c3bc080f-343f-442d-a8b0-02b67121aff6" CreationDate="2023-09-19T17:42:12.947" UserId="3327" Text="|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39618" PostHistoryTypeId="2" PostId="9983" RevisionGUID="8774fc6f-2c50-48bc-ab6a-380a843326dd" CreationDate="2023-09-20T04:00:21.540" UserId="251" Text="I don't think this is the main error. The macro is unable to generate code correctly, resulting in multiple errors.&#xD;&#xA;&#xD;&#xA;Based on my observation:&#xD;&#xA;```rs&#xD;&#xA;error[E0152]: duplicate lang item in crate `sp_io` (which `frame_support` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/syedkamran/polkadot/kamran/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-3d99c77e35d60298.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /Users/syedkamran/polkadot/kamran/substrate-node-template/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-2276528edc6133c9.rmeta&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I believe you may have missed some `&quot;xxx/std&quot;` entries in your `Cargo.toml`, or you are using different versions of dependencies. Please check your `Cargo.lock`; generally, there should only be one Substrate version." ContentLicense="CC BY-SA 4.0" />
  <row Id="39620" PostHistoryTypeId="2" PostId="9984" RevisionGUID="d4b9f8c5-0027-4935-86a3-13a426bf5fe7" CreationDate="2023-09-20T06:51:11.113" UserId="4676" Text="When Operate &#xD;&#xA;&#xD;&#xA;[enter image description here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1ow3g.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/d2ALI.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39622" PostHistoryTypeId="1" PostId="9984" RevisionGUID="d4b9f8c5-0027-4935-86a3-13a426bf5fe7" CreationDate="2023-09-20T06:51:11.113" UserId="4676" Text="BestWay The Restart Substratae Node" ContentLicense="CC BY-SA 4.0" />
  <row Id="39623" PostHistoryTypeId="3" PostId="9984" RevisionGUID="d4b9f8c5-0027-4935-86a3-13a426bf5fe7" CreationDate="2023-09-20T06:51:11.113" UserId="4676" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39624" PostHistoryTypeId="2" PostId="9985" RevisionGUID="35c0052b-3d16-4ef4-9bcd-bb822029987b" CreationDate="2023-09-20T06:56:50.583" UserId="139" Text="So as I was expecting, `let` bindings shouldn't have a significant effect on benchmarking depending on the the vector size as in this particular case, the vector allocation was being done elsewhere (not being benchmarked). Just to be sure that this was the case and to find out the cause of getting a small linear correlation on data length, I ran the benchmarks with `json_file`, and noted that there was no dependence, but only minor outliers that were causing the benchmarking framework to falsely think that there was a linear upwards correlation. The `extrinsic` time and `storage_root_time` remained unchanged with the datum size." ContentLicense="CC BY-SA 4.0" />
  <row Id="39626" PostHistoryTypeId="5" PostId="9984" RevisionGUID="b127b70d-59ff-41d8-b6d6-b50ec9fc7777" CreationDate="2023-09-20T06:58:27.857" UserId="4676" Comment="added 384 characters in body" Text="1. After Add the Validator Node, can't create Block's and can't strat Next Era&#xD;&#xA;in this case, there a way to restart the network in this situation?&#xD;&#xA;keeping Block's &amp; State &amp; History(Does not want purge-chain)&#xD;&#xA;&#xD;&#xA;2. Operate the Substartae Node as archive-mode, but polkadot.js can't load past information, there are way to get past information??&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/h8Nw3.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/vqBgU.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/2QzRg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39627" PostHistoryTypeId="5" PostId="9984" RevisionGUID="7360dc17-ad4e-47e4-b6de-5690f45072ca" CreationDate="2023-09-20T06:59:38.520" UserId="4676" Comment="added 39 characters in body" Text="1. After Add the Validator Node, can't create Block's and can't strat Next Era&#xD;&#xA;in this case, there a way to restart the network in this situation?&#xD;&#xA;keeping Block's &amp; State &amp; History(Does not want purge-chain)&#xD;&#xA;&#xD;&#xA;2. Operate the Substartae Node as archive-mode, but polkadot.js can't load past information, there are way to get past information??&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/78d87.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/vqBgU.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/2QzRg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39628" PostHistoryTypeId="5" PostId="9984" RevisionGUID="4520206f-895c-4849-a613-59f6446b978b" CreationDate="2023-09-20T07:13:43.040" UserId="4676" Comment="deleted 19 characters in body" Text="1. After Add the Validator Node, can't create Block's and can't strat Next Era.&#xD;&#xA;&#xD;&#xA;in this case, there a way to restart the network?&#xD;&#xA;keep the Blocks&amp;State&amp;History(Does not want purge-chain)&#xD;&#xA;&#xD;&#xA;2. Operate the Substartae Node as archive-mode, but polkadot.js can't load past information, there are way to get past information??&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/78d87.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/vqBgU.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/2QzRg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39629" PostHistoryTypeId="2" PostId="9986" RevisionGUID="059ed4a9-a021-464c-9f18-83dc2b2fa037" CreationDate="2023-09-20T07:19:46.647" UserId="2762" Text="There is an error in that tutorial, I have seen it before in this previous StackExchange question: [can't start test network using zombienet-macos][1].&#xD;&#xA;&#xD;&#xA;I have open an issue in the Docs repository: [Fix wrong branch of new repository][2] so hopefully it will be fixed soon.&#xD;&#xA;&#xD;&#xA;But for now I suggest you don't do the `git checkout release-v1.0.0` because the branch doesn't exist and just build the binaries (`cargo build --release`) on the Master branch, so you can follow the rest of the tutorial propertly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/9839/cant-start-test-network-using-zombienet-macos&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-docs/pull/2064" ContentLicense="CC BY-SA 4.0" />
  <row Id="39631" PostHistoryTypeId="2" PostId="9987" RevisionGUID="50dbabce-16a4-4ae8-a3c4-261fc48fb76a" CreationDate="2023-09-20T08:32:33.273" UserId="377" Text="I want to understand if we want to integrate the proof of stake consensus for our chain. So which consensus we should go for NPOS(Nominated proof of stake) or DPOS (Delegated proof of stake)?&#xD;&#xA;&#xD;&#xA;How we should choose one from them?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39633" PostHistoryTypeId="1" PostId="9987" RevisionGUID="50dbabce-16a4-4ae8-a3c4-261fc48fb76a" CreationDate="2023-09-20T08:32:33.273" UserId="377" Text="Why we should choose DPOS over NPOS or NPOS over DPOS?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39634" PostHistoryTypeId="3" PostId="9987" RevisionGUID="50dbabce-16a4-4ae8-a3c4-261fc48fb76a" CreationDate="2023-09-20T08:32:33.273" UserId="377" Text="|consensus|npos|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39636" PostHistoryTypeId="2" PostId="9988" RevisionGUID="e207af78-340c-4fa5-bc72-608199bb4968" CreationDate="2023-09-20T09:18:45.250" UserId="1959" Text="It's because the missing xcm version in Rococo AssetHub.&#xD;&#xA;&#xD;&#xA;Please check this issue: https://github.com/paritytech/polkadot-sdk/issues/1640&#xD;&#xA;&#xD;&#xA;You can ask Rococo for help." ContentLicense="CC BY-SA 4.0" />
  <row Id="39638" PostHistoryTypeId="50" PostId="2504" RevisionGUID="b8425a50-4e05-4068-bb57-bcb4a02b382f" CreationDate="2023-09-20T10:09:36.207" UserId="-1" />
  <row Id="39639" PostHistoryTypeId="2" PostId="9989" RevisionGUID="3710af02-c724-4820-9869-2bb95e2a3085" CreationDate="2023-09-20T11:24:46.697" UserId="3285" Text="As explained in a [recent talk at Polkadot Decoded][1], NPoS performs better in terms of economic security (how much stake is behind the active validator set), capital efficiency (the ratio between overall locked stake by validators and nominations and what is actually used to back the active validator set) and a few other metrics (e.g. lower stake variance in the active validator set). In general, NPoS is better at allocating the locked funds into being active and backing the validators who build and verify blocks, thus the economic security of the network is better under NPoS.&#xD;&#xA;&#xD;&#xA;The reason for this is how the nominated stake distribution is performed when electing the active validator set. In NPoS, the stake distribution is performed by the election algorithm itself, whereas in DPoS, the stake distribution is performed explicitly by the nominators.&#xD;&#xA;&#xD;&#xA;The drawback of NPoS is the need to run a NP-complex problem in a verifiable way. The easy way is to run the election on-chain, but (at least in the context of Polkadot), running such election on-chain is infeasible due to resource constraints. In Polkadot, the election runs off-chain and the results are verified on-chain. So the major drawback that follows from this is the engineering complexity involved in using NPoS. This may depend on the blockchain environment, of course. Note, however, that this complexity is transparent to the users and it only affects the development and dev maintenance of the staking system.&#xD;&#xA;&#xD;&#xA;So to answer your question directly, it really depends on what you are looking for. I'd say you should consider using NPoS and weigh in the pros and cons described. These are highly dependent on the blockchain env you are considering.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Besides the [Decoded talk][1] that I already mentioned, we've recently published a [blog post][2] that goes into more details and will help answering your question. There is another blog post that will focus on the technical details more, it also shows the experiment results of NPoS vs DPoS and *why* those results make sense.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.youtube.com/watch?v=Sl_775xBKFc&#xD;&#xA;  [2]: https://www.polkadot.network/blog/polkadot-consensus-part-1-enhanced-economic-security-via-npos" ContentLicense="CC BY-SA 4.0" />
  <row Id="39641" PostHistoryTypeId="5" PostId="9809" RevisionGUID="356027d4-6e70-4f6c-9a05-2913f455fbe4" CreationDate="2023-09-20T11:51:00.647" UserId="2348" Comment="added 518 characters in body" Text="I am doing runtime upgrade of substrate blockchain from `0.9.36 --&gt; 0.9.37 ---&gt;0.9.43` . And i have some contracts deployed on the running blockchain which is running on 36 version  . After doing runtime upgrade from `0.9.36 ---&gt; 0.9.39` version . I tried to check contracts on my chain. When I tried to call them through `substrate contracts-ui`   (on my chain which is now runtime upgraded to 39 version from 36 version)   it  is showing contracts not found  and I am unable to call my deployed contracts . The same is also happening on my other chain which I  runtime upgraded from `43 version` to `1.0.0 version` can someone please tell me how to solve this &#xD;&#xA;issue.        &#xD;&#xA;&#xD;&#xA;[![error i am getting in ui after upgrading ][1]][1]  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/omCCh.png&#xD;&#xA;                           &#xD;&#xA;      update  &#xD;&#xA;i have tried these steps &#xD;&#xA;&#xD;&#xA;1 i have added. 36 version substrate contract pallet in 39 version substrate and then ,i did  runtime upgrade of substrate blockchain which is running at 36 version substrate with contracts deployed on it  with the 39 version substrate which has 36 version contract pallet in it. and everything worked fine in this case.    &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i want to know where is the issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;                                                                      &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39642" PostHistoryTypeId="50" PostId="8199" RevisionGUID="74631500-6da7-45ea-a942-87b9ff16349e" CreationDate="2023-09-20T12:04:45.580" UserId="-1" />
  <row Id="39643" PostHistoryTypeId="5" PostId="9900" RevisionGUID="e475445f-cab7-46fe-af01-115f18551578" CreationDate="2023-09-20T12:06:35.497" UserId="354" Comment="improved formatting" Text="I wanna to build a parachain to run it localy . &#xD;&#xA;&#xD;&#xA;The rust version I am using is : `rustc 1.72.0 (5680fa18f 2023-08-23)`&#xD;&#xA;&#xD;&#xA;But when  I run the command : `cargo build --release` it show me this error : &#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;    Error[E0061]: this function takes 3 arguments but 2 arguments were supplied&#xD;&#xA;      --&gt; /home/kianoush/.cargo/git/checkouts/ring-vrf-fa8519651343a7ee/c86ebd4/bandersnatch_vrfs/src/ring.rs:34:5&#xD;&#xA;       |&#xD;&#xA;    34 |     PiopParams::setup(domain, &amp;mut rng)&#xD;&#xA;       |     ^^^^^^^^^^^^^^^^^------------------ an argument of type `ark_ec::short_weierstrass::Affine&lt;BandersnatchConfig&gt;` is missing&#xD;&#xA;       |&#xD;&#xA;    note: expected `Affine&lt;BandersnatchConfig&gt;`, found `&amp;mut ChaCha20Rng`&#xD;&#xA;      --&gt; /home/kianoush/.cargo/git/checkouts/ring-vrf-fa8519651343a7ee/c86ebd4/bandersnatch_vrfs/src/ring.rs:34:31&#xD;&#xA;       |&#xD;&#xA;    34 |     PiopParams::setup(domain, &amp;mut rng)&#xD;&#xA;       |                               ^^^^^^^^&#xD;&#xA;       = note:         expected struct `ark_ec::short_weierstrass::Affine&lt;BandersnatchConfig&gt;`&#xD;&#xA;               found mutable reference `&amp;mut ChaCha20Rng`&#xD;&#xA;    note: associated function defined here&#xD;&#xA;      --&gt; /home/kianoush/.cargo/git/checkouts/ring-proof-e9e49c3c86c409a2/8657210/ring/src/piop/params.rs:31:12&#xD;&#xA;       |&#xD;&#xA;    31 |     pub fn setup(domain: Domain&lt;F&gt;, h: Affine&lt;Curve&gt;, seed: Affine&lt;Curve&gt;) -&gt; Self {&#xD;&#xA;       |            ^^^^^&#xD;&#xA;    help: provide the argument&#xD;&#xA;       |&#xD;&#xA;    34 |     PiopParams::setup(domain, /* ark_ec::short_weierstrass::Affine&lt;BandersnatchConfig&gt; */, /* ark_ec::short_weierstrass::Affine&lt;BandersnatchConfig&gt; */)&#xD;&#xA;       |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&#xD;&#xA;    &#xD;&#xA;    For more information about this error, try `rustc --explain E0061`.&#xD;&#xA;    error: could not compile `bandersnatch_vrfs` (lib) due to previous error&#xD;&#xA;    warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**how can i sovle this problem ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="39644" PostHistoryTypeId="4" PostId="9900" RevisionGUID="e475445f-cab7-46fe-af01-115f18551578" CreationDate="2023-09-20T12:06:35.497" UserId="354" Comment="improved formatting" Text="An argument of type `ark_ec::short_weierstrass::Affine&lt;BandersnatchConfig&gt;` is missing" ContentLicense="CC BY-SA 4.0" />
  <row Id="39645" PostHistoryTypeId="24" PostId="9900" RevisionGUID="e475445f-cab7-46fe-af01-115f18551578" CreationDate="2023-09-20T12:06:35.497" Comment="Proposed by 354 approved by 85, 2722 edit id of 552" ContentLicense="CC BY-SA 4.0" />
  <row Id="39646" PostHistoryTypeId="5" PostId="9989" RevisionGUID="e82daa33-b713-455e-b2ee-f5fbf87a7f82" CreationDate="2023-09-20T12:14:28.263" UserId="3285" Comment="added 23 characters in body" Text="As explained in a [recent talk at Polkadot Decoded][1], NPoS performs better in terms of economic security (how much stake is behind the active validator set), capital efficiency (the ratio between overall locked stake by validators and nominations and what is actually used to back the active validator set) and a few other metrics (e.g. lower stake variance in the active validator set). In general, NPoS is better at allocating the locked funds into being active and backing the validators who build and verify blocks, thus the economic security of the network is better under NPoS.&#xD;&#xA;&#xD;&#xA;The reason for this is how the nominated stake distribution is performed when electing the active validator set. In NPoS, the stake distribution is performed by the election algorithm itself, whereas in DPoS, the stake distribution is performed explicitly by the nominators.&#xD;&#xA;&#xD;&#xA;The drawback of NPoS is the need to run a NP-complex problem in a verifiable way. The easy way is to run the election on-chain, but (at least in the context of Polkadot), running such election on-chain is infeasible due to resource constraints. In Polkadot, the election runs off-chain and the results are verified on-chain. So the major drawback that follows from this is the engineering complexity involved in using NPoS. This may depend on the blockchain environment, of course. Note, however, that this complexity is transparent to the users and it only affects the development and dev maintenance of the staking system.&#xD;&#xA;&#xD;&#xA;So to answer your question directly, it really depends on what you are looking for. I'd say you should consider using NPoS and weigh in the pros and cons described. These are highly dependent on the blockchain env you are considering.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Besides the [Decoded talk][1] that I already mentioned, we've recently published a [blog post][2] that goes into more details and will help answering your question. There is another blog post (to be published soon) that will focus on the technical details more, it also shows the experiment results of NPoS vs DPoS and *why* those results make sense.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.youtube.com/watch?v=Sl_775xBKFc&#xD;&#xA;  [2]: https://www.polkadot.network/blog/polkadot-consensus-part-1-enhanced-economic-security-via-npos" ContentLicense="CC BY-SA 4.0" />
  <row Id="39647" PostHistoryTypeId="2" PostId="9990" RevisionGUID="ecac72ed-3a61-4bae-bd3f-d9b9dca6106d" CreationDate="2023-09-20T12:18:53.587" UserId="3114" Text="This source code works.&#xD;&#xA;&#xD;&#xA;## command&#xD;&#xA;```&#xD;&#xA;% python3 test.py&#xD;&#xA;/Users/shin.takahashi/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020&#xD;&#xA;  warnings.warn(&#xD;&#xA;5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY&#xD;&#xA;{'account_id': '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d', 'signature': {'Sr25519': '0x183aada62201ad0a84b1c08212f64dfb266cc678d41d5f60f68cafaeb052ae3e52c57e8c590b1049e56047bfbf5d594784e27604f7b76b77fe8ec196844a2488'}, 'call_function': 'transfer', 'call_module': 'Balances', 'call_args': {'dest': 'ZfQqz2FPet1fD9yqokjiPy2Uzk3EakwQdKyBVFdfTrgVe8E', 'value': 10000000000000000}, 'nonce': 3, 'era': '00', 'tip': 0, 'asset_id': {'tip': 0, 'asset_id': None}, 'signature_version': 1, 'address': '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d', 'call': {'call_function': 'transfer', 'call_module': 'Balances', 'call_args': {'dest': 'ZfQqz2FPet1fD9yqokjiPy2Uzk3EakwQdKyBVFdfTrgVe8E', 'value': 10000000000000000}}}&#xD;&#xA;Extrinsic '0x00a6386e01e3915fa5c89f913163ef6eac360521bcb3f35568b44d55fb485215' sent and included in block '0x9ab42000c6fdcfe2512ef3fd21f227e277fe51df33684f5592d5a43cb742373e'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## source code&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;% cat test.py &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# Imports&#xD;&#xA;from substrateinterface import SubstrateInterface, Keypair, KeypairType&#xD;&#xA;from substrateinterface.exceptions import SubstrateRequestException&#xD;&#xA;&#xD;&#xA;# Construct the API provider&#xD;&#xA;substrate = SubstrateInterface(&#xD;&#xA;    url=&quot;ws://127.0.0.1:9944&quot;,&#xD;&#xA;#    ss58_format=42,&#xD;&#xA;#    type_registry_preset='substrate-node-template',&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;#keypair = Keypair.create_from_mnemonic(&#xD;&#xA;#    &quot;*******&quot;,&#xD;&#xA;#    ss58_format = 42,&#xD;&#xA;#)&#xD;&#xA;keypair = Keypair.create_from_uri('//Alice')&#xD;&#xA;&#xD;&#xA;print(keypair.ss58_address)&#xD;&#xA;&#xD;&#xA;# Form a transaction call&#xD;&#xA;call = substrate.compose_call(&#xD;&#xA;    call_module='Balances',&#xD;&#xA;    call_function=&quot;transfer&quot;,&#xD;&#xA;    call_params={&#xD;&#xA;        &quot;dest&quot;: &quot;ZfQqz2FPet1fD9yqokjiPy2Uzk3EakwQdKyBVFdfTrgVe8E&quot;,&#xD;&#xA;        'value': 1 * 10**16,&#xD;&#xA;#        &quot;gas_limit&quot;: 21000000000,&#xD;&#xA;     }&#xD;&#xA;)&#xD;&#xA;&#xD;&#xA;# Form a signed extrinsic&#xD;&#xA;extrinsic = substrate.create_signed_extrinsic(&#xD;&#xA;    call = call,&#xD;&#xA;    keypair = keypair,&#xD;&#xA;#    nonce = substrate.get_account_nonce(keypair.ss58_address),&#xD;&#xA;)&#xD;&#xA;print(extrinsic)&#xD;&#xA;&#xD;&#xA;# Submit the extrinsic&#xD;&#xA;try:&#xD;&#xA;    receipt = substrate.submit_extrinsic(&#xD;&#xA;        extrinsic,&#xD;&#xA;        wait_for_inclusion = True,&#xD;&#xA;    )&#xD;&#xA;    print(&quot;Extrinsic '{}' sent and included in block '{}'&quot;.format(receipt.extrinsic_hash, receipt.block_hash))&#xD;&#xA;except SubstrateRequestException as e:&#xD;&#xA;    print(&quot;Failed to send: {}&quot;.format(e))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39649" PostHistoryTypeId="5" PostId="9989" RevisionGUID="b4a71423-8569-44fe-94ce-af1a8fb4990e" CreationDate="2023-09-20T12:35:20.280" UserId="3285" Comment="added 49 characters in body" Text="As explained in a [recent talk at Polkadot Decoded][1], NPoS performs better in terms of economic security (how much stake is behind the active validator set), capital efficiency (the ratio between overall locked stake by validators and nominations and what is actually used to back the active validator set) and a few other metrics (e.g. lower stake variance in the active validator set). In general, NPoS is better at allocating the locked funds into being active and backing the validators who build and verify blocks, thus the economic security of the network is better under NPoS.&#xD;&#xA;&#xD;&#xA;The reason for this is how the nominated stake distribution is performed when electing the active validator set. In NPoS, the stake distribution is performed by the election algorithm itself, whereas in DPoS, the stake distribution is performed explicitly by the nominators.&#xD;&#xA;&#xD;&#xA;The drawback of NPoS is that the one of the steps of the election consists of optimising a NP-complex problem in a verifiable way. The easy way is to run the election on-chain, but (at least in the context of Polkadot), running such election on-chain is infeasible due to resource constraints. In Polkadot, the election runs off-chain and the results are verified on-chain. So the major drawback that follows from this is the engineering complexity involved in using NPoS. This may depend on the blockchain environment, of course. Note, however, that this complexity is transparent to the users and it only affects the development and dev maintenance of the staking system.&#xD;&#xA;&#xD;&#xA;So to answer your question directly, it really depends on what you are looking for. I'd say you should consider using NPoS and weigh in the pros and cons described. These are highly dependent on the blockchain env you are considering.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Besides the [Decoded talk][1] that I already mentioned, we've recently published a [blog post][2] that goes into more details and will help answering your question. There is another blog post (to be published soon) that will focus on the technical details more, it also shows the experiment results of NPoS vs DPoS and *why* those results make sense.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.youtube.com/watch?v=Sl_775xBKFc&#xD;&#xA;  [2]: https://www.polkadot.network/blog/polkadot-consensus-part-1-enhanced-economic-security-via-npos" ContentLicense="CC BY-SA 4.0" />
  <row Id="39650" PostHistoryTypeId="50" PostId="7369" RevisionGUID="75218d86-58ec-46b5-b2fb-37efc3c3d41c" CreationDate="2023-09-20T13:03:40.393" UserId="-1" />
  <row Id="39651" PostHistoryTypeId="52" PostId="9987" RevisionGUID="3ba73a19-d7bc-4c20-8b04-dbf3358ea0be" CreationDate="2023-09-20T16:34:22.177" />
  <row Id="39652" PostHistoryTypeId="2" PostId="9991" RevisionGUID="828e5aa3-0b34-461b-84f3-c5254e424028" CreationDate="2023-09-20T18:39:47.053" UserId="4678" Text="After spending a bit of time on it, I ended up finding the source of the problem: the offending crate `bandersnatch_vrfs` pulls `ring-proof` from a github repo, and for some reason it pulls a wrong version sometimes.&#xD;&#xA;&#xD;&#xA;I checked the version in `Cargo.toml` from the archived polkadot repo (in my case, I build on top of the archived v1, before the migration to the monorepo), and copy/pasted the correct hash for `ring-proof` in my `Cargo.toml` where needed:&#xD;&#xA;&#xD;&#xA;    source = &quot;git+https://github.com/w3f/ring-proof#0e948f3c28cbacecdd3020403c4841c0eb339213&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39654" PostHistoryTypeId="5" PostId="9991" RevisionGUID="6bccf94c-4837-49c6-84b6-8c07b3f787b1" CreationDate="2023-09-20T18:53:34.180" UserId="4678" Comment="edited body" Text="After spending a bit of time on it, I ended up finding the source of the problem: the offending crate `bandersnatch_vrfs` pulls `ring-proof` from a github repo, and for some reason it pulls a wrong version sometimes.&#xD;&#xA;&#xD;&#xA;I checked the version in `Cargo.lock` from the archived polkadot repo (in my case, I build on top of the archived v1, before the migration to the monorepo), and copy/pasted the correct hash for `ring-proof` in my `Cargo.lock` where needed:&#xD;&#xA;&#xD;&#xA;    source = &quot;git+https://github.com/w3f/ring-proof#0e948f3c28cbacecdd3020403c4841c0eb339213&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39655" PostHistoryTypeId="5" PostId="9984" RevisionGUID="ab2dfe21-fee8-47ea-9ca0-014793923fb8" CreationDate="2023-09-21T01:48:00.367" UserId="2348" Comment="change the format" Text="1. After Adding the Validator Node, can't create Block's and can't start Next Era.&#xD;&#xA;&#xD;&#xA;in this case,is there a way to restart the network?&#xD;&#xA;keep the Blocks&amp;State&amp;History(Does not want purge-chain)&#xD;&#xA;&#xD;&#xA;2. Operate the Substrate Node as archive-mode, but polkadot.js can't load past information, there are way to get past information??&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/78d87.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/vqBgU.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/2QzRg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39656" PostHistoryTypeId="4" PostId="9984" RevisionGUID="ab2dfe21-fee8-47ea-9ca0-014793923fb8" CreationDate="2023-09-21T01:48:00.367" UserId="2348" Comment="change the format" Text="BestWay The Restart Substrate Node" ContentLicense="CC BY-SA 4.0" />
  <row Id="39657" PostHistoryTypeId="24" PostId="9984" RevisionGUID="ab2dfe21-fee8-47ea-9ca0-014793923fb8" CreationDate="2023-09-21T01:48:00.367" Comment="Proposed by 2348 approved by 4676 edit id of 578" ContentLicense="CC BY-SA 4.0" />
  <row Id="39658" PostHistoryTypeId="2" PostId="9992" RevisionGUID="dad01b45-bbf2-45d2-ace2-900604ba2069" CreationDate="2023-09-21T04:48:26.580" UserId="3317" Text="There are more ways for balance in-/outflow to an account than balance being transferred (e.g. minted balance, burned balance). In addition, it can also be named differently (e.g. withdraw + deposit). What I'm trying to say is that due to different pallets there can be many ways in which balance changes can occur. In your example, the account did not have an account yet, which resulted into the event [`Endowed`][1], and the `LDOT` was perhaps minted (I'm not sure) and therefore resulted into the event [`Deposited`][2] (in stead of `LDOT` being transferred).&#xD;&#xA;&#xD;&#xA;If are you interested in the complete history of (asset) balance changes to a given account, I should study the pallets in the runtime and look for all the events that come from some kind of balance in-/outflow (perhaps watch out for duplicate events).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/open-web3-stack/open-runtime-module-library/blob/56803039140d968f41a10431d5d6a66133dd200a/tokens/src/lib.rs#L265C10-L265C10&#xD;&#xA;  [2]: https://github.com/open-web3-stack/open-runtime-module-library/blob/56803039140d968f41a10431d5d6a66133dd200a/tokens/src/lib.rs#L331" ContentLicense="CC BY-SA 4.0" />
  <row Id="39660" PostHistoryTypeId="2" PostId="9993" RevisionGUID="35b1ab39-2a02-4ddb-a26f-8de3f59219c3" CreationDate="2023-09-21T05:03:23.487" UserId="3317" Text="First, in any case you need a pallet to call a smart contract (SC). `Pallet-contracts` and `pallet-evm` provide the functionality to call a WASM SC or Solidity SC respectively.&#xD;&#xA;&#xD;&#xA;There can be many reasons to have other pallets in your runtime interact with SCs or the other way around. This post on the Polkadot Forum can maybe help you get a grasp of it: https://forum.polkadot.network/t/urban-planning-in-the-paraverse-with-ink/2617" ContentLicense="CC BY-SA 4.0" />
  <row Id="39662" PostHistoryTypeId="2" PostId="9994" RevisionGUID="c9340f88-4a4d-4dc7-a680-1f1a6cb98902" CreationDate="2023-09-21T05:43:23.430" UserId="427" Text="Let's say we have a 2 node network with PoA as consensus. In that case how to calculate TPS of this chain specifically?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39664" PostHistoryTypeId="1" PostId="9994" RevisionGUID="c9340f88-4a4d-4dc7-a680-1f1a6cb98902" CreationDate="2023-09-21T05:43:23.430" UserId="427" Text="How to calculate TPS for a substrate based chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39665" PostHistoryTypeId="3" PostId="9994" RevisionGUID="c9340f88-4a4d-4dc7-a680-1f1a6cb98902" CreationDate="2023-09-21T05:43:23.430" UserId="427" Text="|transactions|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39666" PostHistoryTypeId="2" PostId="9995" RevisionGUID="ae1a4852-dc89-414b-a089-f4bd8e6ab82a" CreationDate="2023-09-21T07:26:50.483" UserId="354" Text="TPS is transaction per second, lets consider a scenario where:&#xD;&#xA;&#xD;&#xA;The `block time` of chain is `3 sec` and there are `900 transactions` in a block so by this information you can calculate the TPS using following formula:&#xD;&#xA;&#xD;&#xA;    TPB(Transaction Per Block) = 900&#xD;&#xA;    &#xD;&#xA;    TPS = TPB/block_time&#xD;&#xA;    &#xD;&#xA;        = 900/3&#xD;&#xA;    &#xD;&#xA;        = 300&#xD;&#xA;&#xD;&#xA;So the TPS of above chain is 300" ContentLicense="CC BY-SA 4.0" />
  <row Id="39672" PostHistoryTypeId="2" PostId="9997" RevisionGUID="15f97d2b-615c-4e4a-9be3-708379eff51a" CreationDate="2023-09-21T07:58:36.803" UserId="4682" Text="Instead of getting all the events and adding up balances, you can directly query system.account(AccountId32) for the balance of the account/accounts at a specific block number. You are still required to loop through different block heights to get the balances over time, but it will be **much** faster and lighter on the data intake than reading events. &#xD;&#xA;&#xD;&#xA;You'll end up with a result like 'data' below.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Indexers&#xD;&#xA;&#xD;&#xA;subsquid: https://docs.subsquid.io/&#xD;&#xA;&#xD;&#xA;subquery: https://academy.subquery.network/&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Apis&#xD;&#xA;&#xD;&#xA;colorfulnotion: https://github.com/colorfulnotion/polkaholic&#xD;&#xA;&#xD;&#xA;subscan: https://support.subscan.io/#introduction&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/RqMky.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39676" PostHistoryTypeId="2" PostId="9998" RevisionGUID="656cf8a0-6376-4550-b738-4dea215a0001" CreationDate="2023-09-21T11:09:39.483" UserId="2773" Text="I agree with ehpeeeye, a very good approach would be to use the system.account storage function or leverage the features an indexer provides. The Substrate-ETL dataset would provide granular information for balances in BigQuery.&#xD;&#xA;&#xD;&#xA;Here's some code to get you started for your specific question, in Python:&#xD;&#xA;&#xD;&#xA;    from substrateinterface import SubstrateInterface&#xD;&#xA;    import time &#xD;&#xA;    &#xD;&#xA;    substrate = SubstrateInterface(url=&quot;wss://rpc.polkadot.io&quot;)&#xD;&#xA;    &#xD;&#xA;    def format_balance(amount: int):&#xD;&#xA;        amount = format(amount / 10**substrate.properties.get('tokenDecimals', 0), &quot;.15g&quot;)&#xD;&#xA;        return f&quot;{amount} {substrate.properties.get('tokenSymbol', 'UNIT')}&quot;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    for block_number in range(17370000, 17379181, 1000):&#xD;&#xA;    &#xD;&#xA;        block_hash = substrate.get_block_hash(block_number)&#xD;&#xA;    &#xD;&#xA;        result = substrate.query(&#xD;&#xA;            &quot;System&quot;, &quot;Account&quot;, [&quot;14uufggn6CkHWpDUeyNEDjZMkYLb7waWtcrLC57sUfEwVPQa&quot;], block_hash=block_hash&#xD;&#xA;        )&#xD;&#xA;    &#xD;&#xA;        balance = (result.value[&quot;data&quot;][&quot;free&quot;] + result.value[&quot;data&quot;][&quot;reserved&quot;])&#xD;&#xA;    &#xD;&#xA;        print(f&quot;Balance @ {block_number}: {format_balance(balance)}&quot;)&#xD;&#xA;    &#xD;&#xA;        # Being nice&#xD;&#xA;        time.sleep(1)&#xD;&#xA;&#xD;&#xA;It's also listed as example in [PySubstrateInterface here][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;There are possible optimizations instead of looping through all the blocks if you're willing to sacrifice precision to gain speed. Another optimization could be as simple as connecting to multiple RPC's at the same time and query them in parallel. &#xD;&#xA;&#xD;&#xA;Either way, I hope this helps.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkascan/py-substrate-interface/blob/master/examples/historic_balance.py" ContentLicense="CC BY-SA 4.0" />
  <row Id="39678" PostHistoryTypeId="2" PostId="9999" RevisionGUID="16d3ed52-f012-4d16-a8a9-85c2e5efd12c" CreationDate="2023-09-21T13:03:37.170" UserId="2348" Text="i have been working on payout in my `lo` `relay chain`  blockchain .While making payout i have observed  transaction fee calculation  . when i made payout transaction , some extra fee  get deducted from my account and then it  comes back to my account with deduction of actual fee .i want to know why extra fee get deducted from my account and then comes back to it.     &#xD;&#xA;&#xD;&#xA;eg.  lets suppose i have made  payout transaction from  `A`  account.  &#xD;&#xA;&#xD;&#xA;1. 0.2 units fee gets deducted &#xD;&#xA;&#xD;&#xA;2. 0.18units   gets credited  to my account. &#xD;&#xA;&#xD;&#xA;3. 0.02units fee gets deducted this way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39680" PostHistoryTypeId="1" PostId="9999" RevisionGUID="16d3ed52-f012-4d16-a8a9-85c2e5efd12c" CreationDate="2023-09-21T13:03:37.170" UserId="2348" Text="Payout event transaction fee calculation in layer0 blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39681" PostHistoryTypeId="3" PostId="9999" RevisionGUID="16d3ed52-f012-4d16-a8a9-85c2e5efd12c" CreationDate="2023-09-21T13:03:37.170" UserId="2348" Text="|polkadot|relay-chain|blockchain|rewards|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39682" PostHistoryTypeId="5" PostId="9999" RevisionGUID="8eb6a427-84d2-4768-babf-c5f4d2f8abca" CreationDate="2023-09-21T13:28:32.213" UserId="2348" Comment="added 144 characters in body" Text="i have been working on payout in my `lo` `relay chain`  blockchain .While making payout i have observed  transaction fee calculation  . when i made payout transaction , some extra fee  get deducted from my account and then it  comes back to my account with deduction of actual fee .i want to know why extra fee get deducted from my account and then comes back to it.     &#xD;&#xA;&#xD;&#xA;eg.  lets suppose i have made  payout transaction from  `A`  account.  &#xD;&#xA;&#xD;&#xA;1. 0.2 units fee gets deducted &#xD;&#xA;&#xD;&#xA;2. 0.18units   gets credited  to my account. &#xD;&#xA;&#xD;&#xA;3. 0.02units fee gets deducted this way.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![image1][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[2]: https://i.stack.imgur.com/J0sCG.png&#xD;&#xA;  [1]: https://i.stack.imgur.com/6y1ej.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39683" PostHistoryTypeId="52" PostId="9994" RevisionGUID="56cd239f-c754-4037-b41e-87d16c02038a" CreationDate="2023-09-21T13:44:32.553" />
  <row Id="39684" PostHistoryTypeId="2" PostId="10000" RevisionGUID="7f9a3fcb-35f6-47a6-9214-c66aecb3b966" CreationDate="2023-09-21T13:59:44.370" UserId="377" Text="I perform a runtime upgrade on the chain. Due to migration failure the chain stoped producing the blocks. logs just showing that the migration failed.&#xD;&#xA;&#xD;&#xA;When i am trying to restart the validators its not starting producing blocks. Its just showing the block data with migration error.&#xD;&#xA;&#xD;&#xA;how can i fix that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39686" PostHistoryTypeId="1" PostId="10000" RevisionGUID="7f9a3fcb-35f6-47a6-9214-c66aecb3b966" CreationDate="2023-09-21T13:59:44.370" UserId="377" Text="how we can restart the chain is it stuck during migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39687" PostHistoryTypeId="3" PostId="10000" RevisionGUID="7f9a3fcb-35f6-47a6-9214-c66aecb3b966" CreationDate="2023-09-21T13:59:44.370" UserId="377" Text="|migration|block-production|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39688" PostHistoryTypeId="4" PostId="10000" RevisionGUID="17063524-e435-4e79-b97e-fe56e538d265" CreationDate="2023-09-21T14:53:37.150" UserId="377" Comment="edited title" Text="how we can restart the chain is it stuck during data migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39689" PostHistoryTypeId="5" PostId="10000" RevisionGUID="6266e8fc-3bc3-407b-b064-adb88ab07368" CreationDate="2023-09-21T14:59:31.950" UserId="377" Comment="added 30 characters in body" Text="I performed a runtime upgrade on the chain, but due to a migration failure, the chain stopped producing blocks. The logs only show that the migration failed.&#xD;&#xA;&#xD;&#xA;When I attempt to restart the validators, they do not start producing blocks. Instead, they continue to display block data with the migration error.&#xD;&#xA;&#xD;&#xA;How can I fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39690" PostHistoryTypeId="4" PostId="10000" RevisionGUID="6266e8fc-3bc3-407b-b064-adb88ab07368" CreationDate="2023-09-21T14:59:31.950" UserId="377" Comment="added 30 characters in body" Text="How can we restart the chain if it becomes stuck during data migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39691" PostHistoryTypeId="6" PostId="10000" RevisionGUID="9c2b6fa5-8310-4e82-8e98-a6b8a04a6f98" CreationDate="2023-09-21T16:31:27.570" UserId="555" Comment="edited tags" Text="|validator|migration|block-production|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39693" PostHistoryTypeId="50" PostId="7585" RevisionGUID="31ab4be1-e3c2-4d14-aefe-c20183622c58" CreationDate="2023-09-21T19:01:05.120" UserId="-1" />
  <row Id="39694" PostHistoryTypeId="2" PostId="10001" RevisionGUID="960a55ca-fdec-4706-9514-4351a13d6ddd" CreationDate="2023-09-21T23:50:21.187" UserId="251" Text="I believe you should label that block as a bad block in the chain spec file, you can check Kusama's chain spec file for an example.&#xD;&#xA;Clear the validators' database and resynchronize to the previous block.&#xD;&#xA;This is a &quot;hard fork&quot; I think." ContentLicense="CC BY-SA 4.0" />
  <row Id="39696" PostHistoryTypeId="5" PostId="9984" RevisionGUID="548eb487-0c4c-45b3-96c6-6a13c9913fa8" CreationDate="2023-09-22T00:05:55.767" UserId="3136" Comment="correct the msg format" Text="1. After adding the validator node, it may encounter issues preventing it from creating blocks and initiating the next era in the blockchain.&#xD;&#xA;&#xD;&#xA;in this case,is there a way to restart the network?&#xD;&#xA;keep the Blocks&amp;State&amp;History(Does not want purge-chain)&#xD;&#xA;&#xD;&#xA;2. Operate the Substrate Node as archive-mode, but polkadot.js can't load past information, there are way to get past information??&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/78d87.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/vqBgU.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/2QzRg.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39697" PostHistoryTypeId="24" PostId="9984" RevisionGUID="548eb487-0c4c-45b3-96c6-6a13c9913fa8" CreationDate="2023-09-22T00:05:55.767" Comment="Proposed by 3136 approved by 4676 edit id of 579" ContentLicense="CC BY-SA 4.0" />
  <row Id="39698" PostHistoryTypeId="2" PostId="10002" RevisionGUID="eac39ebb-277c-4bfc-8c83-c214ccea8219" CreationDate="2023-09-22T04:47:59.263" UserId="4606" Text="If you have registered the HostFunctions in your host code, you should just include the `sp_your_runtime_interface` in your pallet to call the host function. Including you std-required crate in pallet will cause importing std." ContentLicense="CC BY-SA 4.0" />
  <row Id="39700" PostHistoryTypeId="2" PostId="10003" RevisionGUID="6ae23da7-d144-4199-83b6-9b86d6dbf8be" CreationDate="2023-09-22T06:13:21.787" UserId="2372" Text="I would like to prevent the fees mechanism within the chain from imposing any transaction fees on validators and nominations. Could someone kindly provide guidance on achieving this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39702" PostHistoryTypeId="1" PostId="10003" RevisionGUID="6ae23da7-d144-4199-83b6-9b86d6dbf8be" CreationDate="2023-09-22T06:13:21.787" UserId="2372" Text="How can I ensure that the validator and nominator do not incur transaction fees?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39703" PostHistoryTypeId="3" PostId="10003" RevisionGUID="6ae23da7-d144-4199-83b6-9b86d6dbf8be" CreationDate="2023-09-22T06:13:21.787" UserId="2372" Text="|substrate-node-template|validator|transaction-fees|nominator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39704" PostHistoryTypeId="5" PostId="9999" RevisionGUID="1b0e5c2c-4c25-4dcc-958c-8c37ba8805ca" CreationDate="2023-09-22T06:35:37.653" UserId="354" Comment="corrected spelling, fixed grammar and improved formatting" Text="I have been working on payout in my `L0` `relay chain`  blockchain .While making payout I have observed the transaction fee that is deducted from my account and the actual fee that is been deducted are different, what I see from events the extra deducted fee is deposited back to my account. I want to know why extra fee get deducted from my account and then deposited back again.     &#xD;&#xA;&#xD;&#xA;eg.  lets suppose i have made  payout transaction from  `A`  account.  &#xD;&#xA;&#xD;&#xA;1. 0.2 units fee gets deducted &#xD;&#xA;&#xD;&#xA;2. 0.18units   gets credited  to my account. &#xD;&#xA;&#xD;&#xA;3. 0.02units fee gets deducted this way.&#xD;&#xA;&#xD;&#xA;I am sharing the screenshot for the same.&#xD;&#xA;&#xD;&#xA;[![image1][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;[2]: https://i.stack.imgur.com/J0sCG.png&#xD;&#xA;  [1]: https://i.stack.imgur.com/6y1ej.png&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39705" PostHistoryTypeId="4" PostId="9999" RevisionGUID="1b0e5c2c-4c25-4dcc-958c-8c37ba8805ca" CreationDate="2023-09-22T06:35:37.653" UserId="354" Comment="corrected spelling, fixed grammar and improved formatting" Text="Incorrect transaction fee estimation when payout" ContentLicense="CC BY-SA 4.0" />
  <row Id="39706" PostHistoryTypeId="24" PostId="9999" RevisionGUID="1b0e5c2c-4c25-4dcc-958c-8c37ba8805ca" CreationDate="2023-09-22T06:35:37.653" Comment="Proposed by 354 approved by 2348 edit id of 582" ContentLicense="CC BY-SA 4.0" />
  <row Id="39707" PostHistoryTypeId="2" PostId="10004" RevisionGUID="6a46df77-aa84-4eb4-8c91-2ffc463d5ecd" CreationDate="2023-09-22T08:17:20.037" UserId="309" Text="After several experimentations, It seems that adding both `pallet_democracy::Config` &amp; `pallet_collective::Config` to the Config of one pallet is the source of the problem. This is probably related to the change of types implemented in the Democracy pallet (It was not a problem up to polkadot-v0.9.40~...)&#xD;&#xA;I think the solution is then to create two separate pallets:&#xD;&#xA;- One to Create the whole Democracy governance process and output the necessary call&#xD;&#xA;- One more to receive the `democracy_call` (as the call enacted at the end of collective), format it, and start the collective process.&#xD;&#xA;&#xD;&#xA;I haven't seen many projects (actually I haven't seen any...) using both pallets the way we do, so I get that it was not an issue until now.&#xD;&#xA;Any additionnal information is welcome.&#xD;&#xA;&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="39709" PostHistoryTypeId="5" PostId="10004" RevisionGUID="266888a4-c4ae-4e5a-89da-a003151d6d2e" CreationDate="2023-09-22T08:22:32.923" UserId="309" Comment="added 24 characters in body" Text="After several experimentations, It seems that adding both `pallet_democracy::Config` &amp; `pallet_collective::Config` to the Config of one pallet (Tight pallet coupling) is the source of the problem. This is probably related to the change of types implemented in the Democracy pallet (It was not a problem up to polkadot-v0.9.40~...)&#xD;&#xA;I think the solution is then to create two separate pallets:&#xD;&#xA;- One to Create the whole Democracy governance process and output the necessary call&#xD;&#xA;- One more to receive the `democracy_call` (as the call enacted at the end of collective), format it, and start the collective process.&#xD;&#xA;&#xD;&#xA;I haven't seen many projects (actually I haven't seen any...) using both pallets the way we do, so I get that it was not an issue until now.&#xD;&#xA;Any additionnal information is welcome.&#xD;&#xA;&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="39710" PostHistoryTypeId="2" PostId="10005" RevisionGUID="5e5154ef-1e55-4ac8-8063-b78d9ec5b2bf" CreationDate="2023-09-22T08:43:46.623" UserId="2586" Text="I am trying to obtain the author address as a string. I have obtained the MultiAdress, as the following code:-&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let validator_address = if let Some(author_multi_address) = multi_address {&#xD;&#xA;   if let subxt::utils::MultiAddress::Address32(address) = author_multi_address {&#xD;&#xA;     // address: [u8; 32] To string&#xD;&#xA;     // Should return address string&#xD;&#xA;     // cXjmuHdBk4J3Zyt2oGodwGegNFaTFPcfC48PZ9NMmcUFzF6cc&#xD;&#xA;   } else {&#xD;&#xA;     &quot;&quot;.to_string()&#xD;&#xA;   }&#xD;&#xA;} else {&#xD;&#xA;  &quot;&quot;.to_string()&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have tried similar to this&#xD;&#xA;https://substrate.stackexchange.com/questions/9176/get-ss58-address-from-public-key&#xD;&#xA;and this https://substrate.stackexchange.com/questions/8846/how-to-get-block-author-with-subxt&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="39712" PostHistoryTypeId="1" PostId="10005" RevisionGUID="5e5154ef-1e55-4ac8-8063-b78d9ec5b2bf" CreationDate="2023-09-22T08:43:46.623" UserId="2586" Text="MultiAddress to Address String" ContentLicense="CC BY-SA 4.0" />
  <row Id="39713" PostHistoryTypeId="3" PostId="10005" RevisionGUID="5e5154ef-1e55-4ac8-8063-b78d9ec5b2bf" CreationDate="2023-09-22T08:43:46.623" UserId="2586" Text="|rust|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39714" PostHistoryTypeId="2" PostId="10006" RevisionGUID="e62dcbc3-1fba-48b5-b8aa-b6a60fa5ea97" CreationDate="2023-09-22T09:00:36.813" UserId="2586" Text="I have similar requirement and I followed the suggestion in the previous answer given by @jsdw. &#xD;&#xA;&#xD;&#xA;Following is my code, I am able to receive the author AccountId32 from the block.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn extract_author(digest_logs: &amp;Vec&lt;DigestItem&gt;, validators: Vec&lt;AccountId32&gt; ) -&gt; Result&lt;Option&lt;AccountId32&gt;&gt;{&#xD;&#xA;    let pre_runtime = digest_logs.iter().find(|item| matches!(item, DigestItem::PreRuntime(..)));&#xD;&#xA;    if let Some(DigestItem::PreRuntime(engine, data)) = pre_runtime {&#xD;&#xA;        if is_babe(engine.clone()) {&#xD;&#xA;            let mut data: &amp;[u8] = &amp;data;&#xD;&#xA;            let pre_digest = PreDigest::decode(&amp;mut data)?;&#xD;&#xA;            let authority_index = match pre_digest {&#xD;&#xA;                PreDigest::Primary(primary) =&gt; primary.authority_index,&#xD;&#xA;                PreDigest::SecondaryPlain(secondary) =&gt; secondary.authority_index,&#xD;&#xA;                PreDigest::SecondaryVRF(secondary) =&gt; secondary.authority_index,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            return Ok(Some(validators[authority_index as usize].clone()));&#xD;&#xA;        }else {&#xD;&#xA;            return Ok(None);&#xD;&#xA;        }&#xD;&#xA;    } else {&#xD;&#xA;        return Ok(None);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;calling code:-&#xD;&#xA;```&#xD;&#xA;let validators = block.storage().fetch(&amp;polkadot::storage().session().validators()).await?.unwrap();&#xD;&#xA;let digest_logs = &amp;block.header().digest.logs;&#xD;&#xA;let has_author = extract_author(digest_logs, validators)?;&#xD;&#xA;&#xD;&#xA;let validator_public_key = if let Some(validator) = has_author {&#xD;&#xA;	validator.to_string()&#xD;&#xA;} else { &quot;&quot;.to_string() };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Next step is to get MultiAddress using AccountId32 and get the address  string." ContentLicense="CC BY-SA 4.0" />
  <row Id="39716" PostHistoryTypeId="2" PostId="10007" RevisionGUID="1a9e6d92-30b3-4053-a1e5-a1869edb5266" CreationDate="2023-09-22T11:19:44.957" UserId="474" Text="Subxt has very basic support for turning 32-byte account IDs (aka public keys) into SS58 addresses. This is how:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use subxt::utils::AccountId32;&#xD;&#xA;&#xD;&#xA;let account_id_bytes: [u8; 32] = // ...&#xD;&#xA;&#xD;&#xA;let ss58_address = AccountId32::from(account_id_bytes).to_string();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;SS58 addresses have the format `&lt;address-type&gt; + &lt;account-id&gt; + &lt;checksum&gt;`, and Subxt always sets the address type to 42 (meaning &quot;This is a generic substrate address and is valid on any chain&quot;), and only supports SS58 encoding 32 byte account IDs.&#xD;&#xA;&#xD;&#xA;If you'd like more control over how you build SS58 addresses (eg you want to set the address type to that for a specific chain), then you can also look at the `sp-core` crate and (for 32 byte IDs) this function: https://docs.rs/sp-core/23.0.0/sp_core/crypto/struct.AccountId32.html#method.to_ss58check_with_version. With that you'd end up with code like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use sp_core::crypto::{AccountId32,Ss58Codec,Ss58AddressFormat};&#xD;&#xA;&#xD;&#xA;let account_id_bytes: [u8; 32] = // ...&#xD;&#xA;let address_type: u16 = // ...&#xD;&#xA;&#xD;&#xA;let ss58_address = AccountId32::from(account_id_bytes)&#xD;&#xA;    .to_ss58check_with_version(Ss58AddressFormat::custom(address_type));&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where `address_type` is an ID for a particular chain. Some valid values for this can be found by looking at this enum: https://docs.rs/sp-core/23.0.0/sp_core/crypto/enum.Ss58AddressFormatRegistry.html, so eg for an address specific to an Astar account you could use:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let address_type = Ss58AddressFormatRegistry::AstarAccount as u16;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39718" PostHistoryTypeId="2" PostId="10008" RevisionGUID="367c4191-37ae-425b-a737-5549985f38cd" CreationDate="2023-09-22T16:46:10.933" UserId="377" Text="I got this issue in my prod chain &#xD;&#xA;https://substrate.stackexchange.com/questions/10000/how-can-we-restart-the-chain-if-it-becomes-stuck-during-data-migration&#xD;&#xA;&#xD;&#xA;I am not able to start the chain. Is there any way to start the chain with existing database." ContentLicense="CC BY-SA 4.0" />
  <row Id="39720" PostHistoryTypeId="1" PostId="10008" RevisionGUID="367c4191-37ae-425b-a737-5549985f38cd" CreationDate="2023-09-22T16:46:10.933" UserId="377" Text="How can we start the the chain with existing chain data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39721" PostHistoryTypeId="3" PostId="10008" RevisionGUID="367c4191-37ae-425b-a737-5549985f38cd" CreationDate="2023-09-22T16:46:10.933" UserId="377" Text="|solo-chain|fork|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39722" PostHistoryTypeId="2" PostId="10009" RevisionGUID="d83b1bd5-6280-4e52-8cfd-b0c26d4c29c4" CreationDate="2023-09-22T18:37:22.553" UserId="4443" Text="[![when i run node template with --ws external its giving me error like this as shown in image below.][1]][1]&#xD;&#xA;when i run node template without --ws external its producing blocks but when i run with --ws external its giving me error please help me fix this im new to substrate.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5XAkN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39724" PostHistoryTypeId="1" PostId="10009" RevisionGUID="d83b1bd5-6280-4e52-8cfd-b0c26d4c29c4" CreationDate="2023-09-22T18:37:22.553" UserId="4443" Text="I got this error while building a blockchain (building a local blockchain)" ContentLicense="CC BY-SA 4.0" />
  <row Id="39725" PostHistoryTypeId="3" PostId="10009" RevisionGUID="d83b1bd5-6280-4e52-8cfd-b0c26d4c29c4" CreationDate="2023-09-22T18:37:22.553" UserId="4443" Text="|substrate-node-template|substrate-node|substrate-front-end|blockchain|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39726" PostHistoryTypeId="2" PostId="10010" RevisionGUID="6e81081c-fe73-48ce-90de-c849346bc077" CreationDate="2023-09-22T19:23:32.587" UserId="94" Text="I assume what you did was calling `Staking::payout_stakers`. This call first deduces the worst-case fee and then refunds all amount that was not used.  &#xD;&#xA;This is a standard pattern in Substrate when only the worst-case effort is known in advance.  &#xD;&#xA;The refund happens [here](https://github.com/paritytech/polkadot-sdk/blob/ffe5db0f7662f80dcf4805d093c6736880c0fb4d/substrate/frame/staking/src/pallet/impls.rs#L278) where a `DispatchResultWithPostInfo` is returned that corrects the consumed weight downwards. Note that it is only possible to reduce it downwards - not upwards, since the provided pre-dispatch weight must always be the worst-case." ContentLicense="CC BY-SA 4.0" />
  <row Id="39728" PostHistoryTypeId="2" PostId="10011" RevisionGUID="5894ed0a-1f2b-4218-9201-b551b76831b4" CreationDate="2023-09-22T19:25:34.637" UserId="94" Text="The `--ws-external` got renamed to `--rpc-external`. Anyway, for a local node you probably will not need it.  &#xD;&#xA;The flag is only needed when you want to run a node and make it accessible externally over a network." ContentLicense="CC BY-SA 4.0" />
  <row Id="39730" PostHistoryTypeId="2" PostId="10012" RevisionGUID="cfd336fa-4b25-48b2-ac49-b2c7095f5374" CreationDate="2023-09-22T22:00:26.410" UserId="4690" Text="In this rfc: [CoreJam](https://github.com/polkadot-fellows/RFCs/blob/gav-corejam/text/corejam.md) Gav mentions workloads being done on-chain vs in-core. I was wondering what the security differences are between work done in these two spheres. Is there a difference? Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="39732" PostHistoryTypeId="1" PostId="10012" RevisionGUID="cfd336fa-4b25-48b2-ac49-b2c7095f5374" CreationDate="2023-09-22T22:00:26.410" UserId="4690" Text="In Core vs On Chain Security" ContentLicense="CC BY-SA 4.0" />
  <row Id="39733" PostHistoryTypeId="3" PostId="10012" RevisionGUID="cfd336fa-4b25-48b2-ac49-b2c7095f5374" CreationDate="2023-09-22T22:00:26.410" UserId="4690" Text="|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39734" PostHistoryTypeId="50" PostId="9670" RevisionGUID="206c018f-2619-4274-9a31-bc3e18493608" CreationDate="2023-09-23T08:06:05.770" UserId="-1" />
  <row Id="39735" PostHistoryTypeId="50" PostId="6441" RevisionGUID="bb4f6ec2-8ebc-47e3-88d1-eabd1e6b1bde" CreationDate="2023-09-23T10:05:00.630" UserId="-1" />
  <row Id="39736" PostHistoryTypeId="50" PostId="6278" RevisionGUID="2a542ab8-6a49-45a5-b1f3-ba2596c61afa" CreationDate="2023-09-23T11:04:15.550" UserId="-1" />
  <row Id="39737" PostHistoryTypeId="2" PostId="10013" RevisionGUID="55388ab7-5bea-4e81-b594-ae25a29bb711" CreationDate="2023-09-23T11:52:22.867" UserId="698" Text="I'm porting a script from TypeScript using the Polkadot.JS/api to Rust using Subxt. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    let query = polkadot::storage().referenda().referendum_info_for_root();&#xD;&#xA;&#xD;&#xA;    let mut results = api.storage().at_latest().await?.iter(query,10).await?;&#xD;&#xA;&#xD;&#xA;    while let Some((key, value)) = results.next().await? {&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;With reference to the above, I'm having trouble getting the `referendum id` from the `key`.  Within my TypeScript code I would use something like `key.toHuman()[0]`. &#xD;&#xA;&#xD;&#xA;Regards," ContentLicense="CC BY-SA 4.0" />
  <row Id="39739" PostHistoryTypeId="1" PostId="10013" RevisionGUID="55388ab7-5bea-4e81-b594-ae25a29bb711" CreationDate="2023-09-23T11:52:22.867" UserId="698" Text="Attaining an Integer from StorageKey" ContentLicense="CC BY-SA 4.0" />
  <row Id="39740" PostHistoryTypeId="3" PostId="10013" RevisionGUID="55388ab7-5bea-4e81-b594-ae25a29bb711" CreationDate="2023-09-23T11:52:22.867" UserId="698" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39741" PostHistoryTypeId="50" PostId="9573" RevisionGUID="fecbdfbc-f400-4766-9237-3ca3bb5c2b52" CreationDate="2023-09-23T12:01:05.127" UserId="-1" />
  <row Id="39742" PostHistoryTypeId="50" PostId="6105" RevisionGUID="ea0b983f-08a6-429d-87d1-5dbadc49caf8" CreationDate="2023-09-23T13:00:50.127" UserId="-1" />
  <row Id="39743" PostHistoryTypeId="50" PostId="9340" RevisionGUID="4ff59b14-da68-4b0b-b750-54939ff2a7b9" CreationDate="2023-09-23T14:07:35.923" UserId="-1" />
  <row Id="39744" PostHistoryTypeId="2" PostId="10014" RevisionGUID="a526353e-ab52-4a16-950e-b039ecc73ce2" CreationDate="2023-09-23T14:30:14.610" UserId="377" Text="i am getting this issue after performing the solution of this issue&#xD;&#xA;https://substrate.stackexchange.com/questions/10000/how-can-we-restart-the-chain-if-it-becomes-stuck-during-data-migration&#xD;&#xA;&#xD;&#xA;tried to run the existing chain with new chain spec and new binary with few validators then it started producing block also doing the finality.&#xD;&#xA;&#xD;&#xA;then in similar way i started the archive node after starting the archive node. The finality stopped with bolow error in log.&#xD;&#xA;&#xD;&#xA;    Detected prevote equivocation in the finality worker: Equivocation { round_number: 6425345, " ContentLicense="CC BY-SA 4.0" />
  <row Id="39746" PostHistoryTypeId="1" PostId="10014" RevisionGUID="a526353e-ab52-4a16-950e-b039ecc73ce2" CreationDate="2023-09-23T14:30:14.610" UserId="377" Text="how to solve Detected prevote equivocation in the finality worker issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39747" PostHistoryTypeId="3" PostId="10014" RevisionGUID="a526353e-ab52-4a16-950e-b039ecc73ce2" CreationDate="2023-09-23T14:30:14.610" UserId="377" Text="|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39748" PostHistoryTypeId="5" PostId="10014" RevisionGUID="edc0816e-d0ee-4f5f-b7e0-3fc3a6b05134" CreationDate="2023-09-23T14:48:48.137" UserId="377" Comment="added 10 characters in body" Text="I am getting this issue after performing the solution of this issue&#xD;&#xA;https://substrate.stackexchange.com/questions/10000/how-can-we-restart-the-chain-if-it-becomes-stuck-during-data-migration&#xD;&#xA;&#xD;&#xA;Tried to run the existing chain with new chain spec and new binary with few validators then it started producing block also doing the block finalization.&#xD;&#xA;&#xD;&#xA;then in similar way i started the archive node after starting the archive node. The finality stopped with below error in log.&#xD;&#xA;&#xD;&#xA;    Detected prevote equivocation in the finality worker: Equivocation { round_number: 6425345, " ContentLicense="CC BY-SA 4.0" />
  <row Id="39749" PostHistoryTypeId="5" PostId="10014" RevisionGUID="1c7b9103-33f4-45a1-b5a6-8a5196a7128f" CreationDate="2023-09-23T14:58:55.417" UserId="555" Comment="deleted 3 characters in body" Text="I am getting this issue after performing the solution of this issue&#xD;&#xA;https://substrate.stackexchange.com/questions/10000/how-can-we-restart-the-chain-if-it-becomes-stuck-during-data-migration&#xD;&#xA;&#xD;&#xA;Tried to run the existing chain with new chain spec and new binary with few validators then it started producing block also doing the block finalization.&#xD;&#xA;&#xD;&#xA;In similar way, I started the archive node. After starting the archive node, the finality stopped with below error in log.&#xD;&#xA;&#xD;&#xA;    Detected prevote equivocation in the finality worker: Equivocation { round_number: 6425345, " ContentLicense="CC BY-SA 4.0" />
  <row Id="39750" PostHistoryTypeId="50" PostId="9641" RevisionGUID="e40480a0-dddb-4a55-a4f6-0de5c481145d" CreationDate="2023-09-23T16:00:40.067" UserId="-1" />
  <row Id="39751" PostHistoryTypeId="2" PostId="10015" RevisionGUID="08364c8b-829b-4cca-818a-3b2db3fa007c" CreationDate="2023-09-23T19:50:52.250" UserId="18" Text="GM everyone, has anyone noticed storage migrations stopped running on rococo? &#xD;&#xA;&#xD;&#xA;We are on 0.9.43 and can not get migrations to run, both through the pallets or the runtime &#xD;&#xA;&#xD;&#xA;running trace logs doesn't indicate any issue so I was wondering if anyone faced something similar&#xD;&#xA;&#xD;&#xA;The same migrations ran fine on Kusama though so I do wonder if its a rococo specific issue or we are doing something wrong&#xD;&#xA;&#xD;&#xA;We are in the process of wiring up `try-runtime` to try and get to the bottom of it and once we have logs ill post them here" ContentLicense="CC BY-SA 4.0" />
  <row Id="39753" PostHistoryTypeId="1" PostId="10015" RevisionGUID="08364c8b-829b-4cca-818a-3b2db3fa007c" CreationDate="2023-09-23T19:50:52.250" UserId="18" Text="Storage Migrations on Rococo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39754" PostHistoryTypeId="3" PostId="10015" RevisionGUID="08364c8b-829b-4cca-818a-3b2db3fa007c" CreationDate="2023-09-23T19:50:52.250" UserId="18" Text="|storage|rococo|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39755" PostHistoryTypeId="2" PostId="10016" RevisionGUID="cdd5925e-5b1b-4bd1-9238-e2dc5559237d" CreationDate="2023-09-24T02:22:00.560" UserId="3344" Text="From this blog post:&#xD;&#xA;&#xD;&#xA;https://www.polkadot.network/blog/polkadot-consensus-part-1-enhanced-economic-security-via-npos&#xD;&#xA;&#xD;&#xA;&gt; The Polkadot ecosystem thrives within this environment, thanks to its novel design elements, including its patented NPoS (Nominated Proof of Stake) system.&#xD;&#xA;&#xD;&#xA;Does anyone know where this patent is discussed in the Polkadot docs?&#xD;&#xA;&#xD;&#xA;Does anyone know the patent details, numbers, etc.?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39757" PostHistoryTypeId="1" PostId="10016" RevisionGUID="cdd5925e-5b1b-4bd1-9238-e2dc5559237d" CreationDate="2023-09-24T02:22:00.560" UserId="3344" Text="Patent for NPoS (Nominated Proof of Stake)" ContentLicense="CC BY-SA 4.0" />
  <row Id="39758" PostHistoryTypeId="3" PostId="10016" RevisionGUID="cdd5925e-5b1b-4bd1-9238-e2dc5559237d" CreationDate="2023-09-24T02:22:00.560" UserId="3344" Text="|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39759" PostHistoryTypeId="5" PostId="10016" RevisionGUID="dc313795-92ef-4018-a950-9677de66835a" CreationDate="2023-09-24T02:30:42.733" UserId="3344" Comment="Focus the question" Text="&#xD;&#xA;Does anyone know where this patent is discussed in the Polkadot docs?&#xD;&#xA;&#xD;&#xA;Does anyone know the patent details, numbers, etc.?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39760" PostHistoryTypeId="2" PostId="10017" RevisionGUID="eeed868f-ebb5-4002-8a22-8924ee7bb804" CreationDate="2023-09-24T02:32:21.877" UserId="3344" Text="Working on these... So far:&#xD;&#xA;&#xD;&#xA;&gt; Does anyone know where this patent is discussed in the Polkadot docs?&#xD;&#xA;&#xD;&#xA;- https://www.polkadot.network/blog/polkadot-consensus-part-1-enhanced-economic-security-via-npos&#xD;&#xA;&#xD;&#xA;&gt; Does anyone know the patent details, numbers, etc.?&#xD;&#xA;&#xD;&#xA;- https://patents.google.com/patent/US20190058581A1/en&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39762" PostHistoryTypeId="5" PostId="10017" RevisionGUID="c2658030-d8f2-4440-abb3-5beb938f63cb" CreationDate="2023-09-24T02:58:23.700" UserId="3344" Comment="added 284 characters in body" Text="Working on these... So far:&#xD;&#xA;&#xD;&#xA;&gt; Does anyone know where this patent is discussed in the Polkadot docs?&#xD;&#xA;&#xD;&#xA;- Empty search for `patent` on https://wiki.polkadot.network/&#xD;&#xA;- Empty search for `patent` on https://spec.polkadot.network/&#xD;&#xA;- 1 result search for `patent` on https://docs.substrate.io&#xD;&#xA;  - Related to Schnorr algorithm: https://docs.substrate.io/deploy/keys-and-network-operations/&#xD;&#xA;- https://www.polkadot.network/blog/polkadot-consensus-part-1-enhanced-economic-security-via-npos&#xD;&#xA;&#xD;&#xA;&gt; Does anyone know the patent details, numbers, etc.?&#xD;&#xA;&#xD;&#xA;- https://patents.google.com/patent/US20190058581A1/en&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39763" PostHistoryTypeId="5" PostId="10016" RevisionGUID="0b86012f-207b-4c72-a255-083162e92028" CreationDate="2023-09-24T02:59:06.717" UserId="3344" Comment="added 15 characters in body" Text="&#xD;&#xA;Does anyone know where this patent is discussed in the Polkadot or &#xD;&#xA;Substrate docs?&#xD;&#xA;&#xD;&#xA;Does anyone know the patent details, numbers, etc.?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39764" PostHistoryTypeId="2" PostId="10018" RevisionGUID="db97c6bc-de51-4d85-8b04-246a526eebe5" CreationDate="2023-09-24T03:24:21.937" UserId="3881" Text="I have an extrinsic for a poll that will end in the future. I used scheduller pallet to make the end of the poll execute. The end of the poll is then made by a root call.&#xD;&#xA;&#xD;&#xA;Should I add the weight of both extrinsics, create and enactment, to the creation of the call so to charge the user?&#xD;&#xA;&#xD;&#xA;Is this correct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39766" PostHistoryTypeId="1" PostId="10018" RevisionGUID="db97c6bc-de51-4d85-8b04-246a526eebe5" CreationDate="2023-09-24T03:24:21.937" UserId="3881" Text="Weight for an extrinsic that schedule another call in the future?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39767" PostHistoryTypeId="3" PostId="10018" RevisionGUID="db97c6bc-de51-4d85-8b04-246a526eebe5" CreationDate="2023-09-24T03:24:21.937" UserId="3881" Text="|benchmarking|weight|pallet-scheduler|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39768" PostHistoryTypeId="50" PostId="9619" RevisionGUID="0f2bfd3f-3f2e-476e-aab9-11f2a860270d" CreationDate="2023-09-24T09:04:05.527" UserId="-1" />
  <row Id="39769" PostHistoryTypeId="2" PostId="10019" RevisionGUID="bc10f03d-5988-4b64-871d-ec7e6ded6e50" CreationDate="2023-09-24T13:27:50.617" UserId="18" Text="it was spec version, we have `94301` saved on rococo and then upgraded to 09432 a few weeks ago. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;but all our further upgrades are still less than 94301. so we had to kill the `lastRuntimeUpgrade` under the `system` pallet first then do the upgrade again and that kicked off the migrations" ContentLicense="CC BY-SA 4.0" />
  <row Id="39771" PostHistoryTypeId="5" PostId="10005" RevisionGUID="c54174fd-e197-4c6e-a99b-c4c79b1bba0e" CreationDate="2023-09-25T00:58:59.867" UserId="3136" Comment="correct the msg format" Text="I'm trying to retrieve the author's address as a string, and I've successfully obtained the MultiAddress using the following code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let validator_address = if let Some(author_multi_address) = multi_address {&#xD;&#xA;   if let subxt::utils::MultiAddress::Address32(address) = author_multi_address {&#xD;&#xA;     // address: [u8; 32] To string&#xD;&#xA;     // Should return address string&#xD;&#xA;     // cXjmuHdBk4J3Zyt2oGodwGegNFaTFPcfC48PZ9NMmcUFzF6cc&#xD;&#xA;   } else {&#xD;&#xA;     &quot;&quot;.to_string()&#xD;&#xA;   }&#xD;&#xA;} else {&#xD;&#xA;  &quot;&quot;.to_string()&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have tried similar to this&#xD;&#xA;https://substrate.stackexchange.com/questions/9176/get-ss58-address-from-public-key&#xD;&#xA;and this https://substrate.stackexchange.com/questions/8846/how-to-get-block-author-with-subxt&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="39772" PostHistoryTypeId="24" PostId="10005" RevisionGUID="c54174fd-e197-4c6e-a99b-c4c79b1bba0e" CreationDate="2023-09-25T00:58:59.867" Comment="Proposed by 3136 approved by 2586 edit id of 583" ContentLicense="CC BY-SA 4.0" />
  <row Id="39773" PostHistoryTypeId="5" PostId="10006" RevisionGUID="1caf94e0-a065-40e6-a109-1abcdc18d061" CreationDate="2023-09-25T01:53:27.160" UserId="2586" Comment="added 154 characters in body" Text="I have similar requirement and I followed the suggestion in the previous answer given by @jsdw. &#xD;&#xA;&#xD;&#xA;Following is my code, I am able to receive the author AccountId32 from the block.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;fn extract_author(digest_logs: &amp;Vec&lt;DigestItem&gt;, validators: Vec&lt;AccountId32&gt; ) -&gt; Result&lt;Option&lt;AccountId32&gt;&gt;{&#xD;&#xA;    let pre_runtime = digest_logs.iter().find(|item| matches!(item, DigestItem::PreRuntime(..)));&#xD;&#xA;    if let Some(DigestItem::PreRuntime(engine, data)) = pre_runtime {&#xD;&#xA;        if is_babe(engine.clone()) {&#xD;&#xA;            let mut data: &amp;[u8] = &amp;data;&#xD;&#xA;            let pre_digest = PreDigest::decode(&amp;mut data)?;&#xD;&#xA;            let authority_index = match pre_digest {&#xD;&#xA;                PreDigest::Primary(primary) =&gt; primary.authority_index,&#xD;&#xA;                PreDigest::SecondaryPlain(secondary) =&gt; secondary.authority_index,&#xD;&#xA;                PreDigest::SecondaryVRF(secondary) =&gt; secondary.authority_index,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            return Ok(Some(validators[authority_index as usize].clone()));&#xD;&#xA;        }else {&#xD;&#xA;            return Ok(None);&#xD;&#xA;        }&#xD;&#xA;    } else {&#xD;&#xA;        return Ok(None);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;calling code:-&#xD;&#xA;```&#xD;&#xA;let validators = block.storage().fetch(&amp;polkadot::storage().session().validators()).await?.unwrap();&#xD;&#xA;let digest_logs = &amp;block.header().digest.logs;&#xD;&#xA;let has_author = extract_author(digest_logs, validators)?;&#xD;&#xA;&#xD;&#xA;let validator_public_key = if let Some(validator) = has_author {&#xD;&#xA;	validator.to_string()&#xD;&#xA;} else { &quot;&quot;.to_string() };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Next step is to get MultiAddress using AccountId32 and get the address  string.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Edit: To find the address string follow the answer at https://substrate.stackexchange.com/questions/10005/multiaddress-to-address-string/10007#10007" ContentLicense="CC BY-SA 4.0" />
  <row Id="39775" PostHistoryTypeId="2" PostId="10020" RevisionGUID="85c6710a-5e31-4bed-aff0-81f52a454694" CreationDate="2023-09-25T03:12:00.313" UserId="4695" Text="I want to write a low memory usage algorithm to calculate MHT" ContentLicense="CC BY-SA 4.0" />
  <row Id="39777" PostHistoryTypeId="1" PostId="10020" RevisionGUID="85c6710a-5e31-4bed-aff0-81f52a454694" CreationDate="2023-09-25T03:12:00.313" UserId="4695" Text="Is there a simple MHT (Merkel Hash Tree) in-place algorithm?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39778" PostHistoryTypeId="3" PostId="10020" RevisionGUID="85c6710a-5e31-4bed-aff0-81f52a454694" CreationDate="2023-09-25T03:12:00.313" UserId="4695" Text="|rust|golang|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39779" PostHistoryTypeId="5" PostId="10002" RevisionGUID="b56d65ef-94e7-4fe2-8386-bdcd132c691b" CreationDate="2023-09-25T03:23:08.550" UserId="4606" Comment="added 1 character in body" Text="If you have registered the HostFunctions in your host code, you should just include the `sp_your_runtime_interface` in your pallet to call the host function. Including your std-required crate in pallet will cause importing std." ContentLicense="CC BY-SA 4.0" />
  <row Id="39780" PostHistoryTypeId="2" PostId="10021" RevisionGUID="c126fbcc-746c-442c-98ca-8ecf7f7f98be" CreationDate="2023-09-25T07:34:11.550" UserId="3881" Text="Im writing benchmarks for a pallet using benchmarking version 2. And it seems I cant call ```Pallet::&lt;Test&gt;::test_benchmarks_&quot;extrinsic_name&quot;``` inside of a test anymore.&#xD;&#xA;&#xD;&#xA;Is it no longer needed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39782" PostHistoryTypeId="1" PostId="10021" RevisionGUID="c126fbcc-746c-442c-98ca-8ecf7f7f98be" CreationDate="2023-09-25T07:34:11.550" UserId="3881" Text="Testing benchmarks with V2" ContentLicense="CC BY-SA 4.0" />
  <row Id="39783" PostHistoryTypeId="3" PostId="10021" RevisionGUID="c126fbcc-746c-442c-98ca-8ecf7f7f98be" CreationDate="2023-09-25T07:34:11.550" UserId="3881" Text="|benchmarking|testing|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39784" PostHistoryTypeId="2" PostId="10022" RevisionGUID="2e6c0485-969d-4be6-b200-bfb74b01cc1b" CreationDate="2023-09-25T09:52:33.230" UserId="452" Text="There aren't enough details in this question to be able to solve your problem. If when you started the archive node you stated seeing GRANDPA equivocations it means that this node is actually voting. Regardless, if finality is not progressing it also means that not enough validators are voting (you need &gt;2/3 of the validators online to be able to finalize). It's also possible that some validators are voting on blocks that the others can't import, I am not sure if you added badBlocks to the chain spec, but if you did, you need to do this for all validators and not just a few. Have a look at these questions which can help you debug your issue:&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/a/380/452&#xD;&#xA;https://substrate.stackexchange.com/a/668/452" ContentLicense="CC BY-SA 4.0" />
  <row Id="39786" PostHistoryTypeId="2" PostId="10023" RevisionGUID="57cb43ae-eba5-42df-a6d6-c9a54b601509" CreationDate="2023-09-25T10:05:57.440" UserId="2348" Text="I am using substrate blockchain which is on 36 version substrate  . I have made  purposal through council which is of balance.forcetransfer, and did majority voting in yes  .After completion , when i close the  purposal motion  it is giving  bad origin error . Can  you please tell why is it happening like this  ." ContentLicense="CC BY-SA 4.0" />
  <row Id="39788" PostHistoryTypeId="1" PostId="10023" RevisionGUID="57cb43ae-eba5-42df-a6d6-c9a54b601509" CreationDate="2023-09-25T10:05:57.440" UserId="2348" Text="coucil execution giving bad origin error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39789" PostHistoryTypeId="3" PostId="10023" RevisionGUID="57cb43ae-eba5-42df-a6d6-c9a54b601509" CreationDate="2023-09-25T10:05:57.440" UserId="2348" Text="|blockchain|council|motion|badorigin|substarte|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39790" PostHistoryTypeId="5" PostId="10022" RevisionGUID="6da46b6b-2a84-4da9-b32f-f9ee46d7a932" CreationDate="2023-09-25T10:07:18.233" UserId="452" Comment="added 6 characters in body" Text="There aren't enough details in this question to be able to solve your problem. If when you started the archive node you stated seeing GRANDPA equivocations it means that this node is actually voting. Regardless, if finality is not progressing it also means that not enough validators are voting (you need &gt;2/3 of the validators online to be able to finalize). It's also possible that some validators are voting on blocks that the others can't import, I am not sure if you added `badBlocks` to the chain spec, but if you did, you need to do this for all validators and not just a few. Have a look at these questions which can help you debug your issue:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/a/380/452&#xD;&#xA;- https://substrate.stackexchange.com/a/668/452" ContentLicense="CC BY-SA 4.0" />
  <row Id="39791" PostHistoryTypeId="50" PostId="6087" RevisionGUID="25098682-dbb7-4529-af09-150b8f7a1e7d" CreationDate="2023-09-25T10:08:21.000" UserId="-1" />
  <row Id="39792" PostHistoryTypeId="5" PostId="10014" RevisionGUID="efca23f6-3ed1-4f5f-a1ad-3006c2969070" CreationDate="2023-09-25T10:26:37.783" UserId="377" Comment="added 1335 characters in body" Text="I am getting this issue after performing the solution of this issue&#xD;&#xA;https://substrate.stackexchange.com/questions/10000/how-can-we-restart-the-chain-if-it-becomes-stuck-during-data-migration&#xD;&#xA;&#xD;&#xA;Tried to run the existing chain with new chain spec and new binary with few validators then it started producing block also doing the block finalization.&#xD;&#xA;&#xD;&#xA;In similar way, I started the archive node. After starting the archive node, the finality stopped with below error in log.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Sep 23 12:33:51 jur-node[3498514]: 2023-09-23 12:33:51 Detected prevote equivocation in the finality worker: Equivocation { round_number: 6425345, identity: Public(f87122bdc0f31343bba1c1b8f11e1584e5ed42234ce479df89608aecde43260d (5HgTLj1r...)), first: (Prevote { target_hash: 0x842a42a7556d5f338411f1dafc08a87daf855a7f4284a8ea3032fd5d1c6e0a43, target_number: 1440577 }, Signature(55b96a8677651787154021323d3853cccdb1ee98b33dda98afaaf75e0bd9f61a22d0af8567561898e2b5dd4519325b220ee55cc908d007b9032a06d3188c5706)), second: (Prevote { target_hash: 0xac2fbb087b3b2f89ce6e4e23f4587ce9038c26ef7f673750ef60496f6346f7da, target_number: 1440676 }, Signature(f75ca444dfab57bc72f340413c813941daf5b0e5c7e129e29b0ff6f9a9e943e102f94b97d115d0e95ade1436ebea7568a15ced586c660d6b7615cdb57dc0d50e)) }" ContentLicense="CC BY-SA 4.0" />
  <row Id="39793" PostHistoryTypeId="5" PostId="10014" RevisionGUID="e7719a56-c8b4-4329-81f7-83aac82f65a1" CreationDate="2023-09-25T10:32:28.767" UserId="377" Comment="deleted 4 characters in body" Text="I am getting this issue after performing the solution of this issue&#xD;&#xA;https://substrate.stackexchange.com/questions/10000/how-can-we-restart-the-chain-if-it-becomes-stuck-during-data-migration&#xD;&#xA;&#xD;&#xA;Tried to run the existing chain with new chain spec and new binary with few validators then it started producing block also doing the block finalization.&#xD;&#xA;&#xD;&#xA;In similar way, I started the archive node. After starting the archive node, the finality stopped with below error in log.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Sep 23 12:33:51 node[3498514]: 2023-09-23 12:33:51 Detected prevote equivocation in the finality worker: Equivocation { round_number: 6425345, identity: Public(f87122bdc0f31343bba1c1b8f11e1584e5ed42234ce479df89608aecde43260d (5HgTLj1r...)), first: (Prevote { target_hash: 0x842a42a7556d5f338411f1dafc08a87daf855a7f4284a8ea3032fd5d1c6e0a43, target_number: 1440577 }, Signature(55b96a8677651787154021323d3853cccdb1ee98b33dda98afaaf75e0bd9f61a22d0af8567561898e2b5dd4519325b220ee55cc908d007b9032a06d3188c5706)), second: (Prevote { target_hash: 0xac2fbb087b3b2f89ce6e4e23f4587ce9038c26ef7f673750ef60496f6346f7da, target_number: 1440676 }, Signature(f75ca444dfab57bc72f340413c813941daf5b0e5c7e129e29b0ff6f9a9e943e102f94b97d115d0e95ade1436ebea7568a15ced586c660d6b7615cdb57dc0d50e)) }" ContentLicense="CC BY-SA 4.0" />
  <row Id="39794" PostHistoryTypeId="5" PostId="10014" RevisionGUID="6f470c40-a867-486e-9ba6-2d3e2607a198" CreationDate="2023-09-25T10:50:31.820" UserId="377" Comment="added 16 characters in body" Text="I am getting this issue after performing the solution of this issue&#xD;&#xA;https://substrate.stackexchange.com/questions/10000/how-can-we-restart-the-chain-if-it-becomes-stuck-during-data-migration&#xD;&#xA;&#xD;&#xA;Tried to run the existing chain with new chain spec with bad blocks and new binary with few validators then it started producing block also doing the block finalization.&#xD;&#xA;&#xD;&#xA;In similar way, I started the archive node. After starting the archive node, the finality stopped with below error in log.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Sep 23 12:33:51 node[3498514]: 2023-09-23 12:33:51 Detected prevote equivocation in the finality worker: Equivocation { round_number: 6425345, identity: Public(f87122bdc0f31343bba1c1b8f11e1584e5ed42234ce479df89608aecde43260d (5HgTLj1r...)), first: (Prevote { target_hash: 0x842a42a7556d5f338411f1dafc08a87daf855a7f4284a8ea3032fd5d1c6e0a43, target_number: 1440577 }, Signature(55b96a8677651787154021323d3853cccdb1ee98b33dda98afaaf75e0bd9f61a22d0af8567561898e2b5dd4519325b220ee55cc908d007b9032a06d3188c5706)), second: (Prevote { target_hash: 0xac2fbb087b3b2f89ce6e4e23f4587ce9038c26ef7f673750ef60496f6346f7da, target_number: 1440676 }, Signature(f75ca444dfab57bc72f340413c813941daf5b0e5c7e129e29b0ff6f9a9e943e102f94b97d115d0e95ade1436ebea7568a15ced586c660d6b7615cdb57dc0d50e)) }" ContentLicense="CC BY-SA 4.0" />
  <row Id="39795" PostHistoryTypeId="5" PostId="10014" RevisionGUID="fd08afca-d66d-4b1d-9a9a-c1c4f0a608ac" CreationDate="2023-09-25T11:10:10.613" UserId="377" Comment="added 208 characters in body" Text="I am getting this issue after performing the solution of this issue&#xD;&#xA;https://substrate.stackexchange.com/questions/10000/how-can-we-restart-the-chain-if-it-becomes-stuck-during-data-migration&#xD;&#xA;&#xD;&#xA;Tried to run the existing chain with new chain spec with bad blocks and new binary with few validators then it started producing block also doing the block finalization.&#xD;&#xA;&#xD;&#xA;We basically started with 2 validators then chain started producing blocks then we added two more validators then it started finalizing blocks also. After that chain produced about 130 blocks and finalizing also. Then with same new chainspec and binary we started archieve node then chain finality stopped with below error in log.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Sep 23 12:33:51 node[3498514]: 2023-09-23 12:33:51 Detected prevote equivocation in the finality worker: Equivocation { round_number: 6425345, identity: Public(f87122bdc0f31343bba1c1b8f11e1584e5ed42234ce479df89608aecde43260d (5HgTLj1r...)), first: (Prevote { target_hash: 0x842a42a7556d5f338411f1dafc08a87daf855a7f4284a8ea3032fd5d1c6e0a43, target_number: 1440577 }, Signature(55b96a8677651787154021323d3853cccdb1ee98b33dda98afaaf75e0bd9f61a22d0af8567561898e2b5dd4519325b220ee55cc908d007b9032a06d3188c5706)), second: (Prevote { target_hash: 0xac2fbb087b3b2f89ce6e4e23f4587ce9038c26ef7f673750ef60496f6346f7da, target_number: 1440676 }, Signature(f75ca444dfab57bc72f340413c813941daf5b0e5c7e129e29b0ff6f9a9e943e102f94b97d115d0e95ade1436ebea7568a15ced586c660d6b7615cdb57dc0d50e)) }" ContentLicense="CC BY-SA 4.0" />
  <row Id="39796" PostHistoryTypeId="5" PostId="10014" RevisionGUID="84498d25-5757-4613-847a-52b323972f81" CreationDate="2023-09-25T11:15:28.200" UserId="377" Comment="added 208 characters in body" Text="I am getting this issue after performing the solution of this issue&#xD;&#xA;https://substrate.stackexchange.com/questions/10000/how-can-we-restart-the-chain-if-it-becomes-stuck-during-data-migration&#xD;&#xA;&#xD;&#xA;Tried to run the existing chain with new chain spec with bad blocks and new binary with all validators then it started producing block also doing the block finalization.&#xD;&#xA;&#xD;&#xA;We basically started with 2 validators then chain started producing blocks then we added all validators then it started finalizing blocks also. After that chain produced about 130 blocks and finalizing also. Then with same new chainspec and binary we started archieve node then chain finality stopped with below error in log.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Sep 23 12:33:51 node[3498514]: 2023-09-23 12:33:51 Detected prevote equivocation in the finality worker: Equivocation { round_number: 6425345, identity: Public(f87122bdc0f31343bba1c1b8f11e1584e5ed42234ce479df89608aecde43260d (5HgTLj1r...)), first: (Prevote { target_hash: 0x842a42a7556d5f338411f1dafc08a87daf855a7f4284a8ea3032fd5d1c6e0a43, target_number: 1440577 }, Signature(55b96a8677651787154021323d3853cccdb1ee98b33dda98afaaf75e0bd9f61a22d0af8567561898e2b5dd4519325b220ee55cc908d007b9032a06d3188c5706)), second: (Prevote { target_hash: 0xac2fbb087b3b2f89ce6e4e23f4587ce9038c26ef7f673750ef60496f6346f7da, target_number: 1440676 }, Signature(f75ca444dfab57bc72f340413c813941daf5b0e5c7e129e29b0ff6f9a9e943e102f94b97d115d0e95ade1436ebea7568a15ced586c660d6b7615cdb57dc0d50e)) }" ContentLicense="CC BY-SA 4.0" />
  <row Id="39797" PostHistoryTypeId="2" PostId="10024" RevisionGUID="d0f19c0d-65d6-4d0f-81c2-152e5ba64c98" CreationDate="2023-09-25T11:19:22.553" UserId="74" Text="# Overview&#xD;&#xA;We are building out a precompile for `pallet-staking` and have run into the tricky challenge of converting `H256` types into generic `AccountId`s so that we can implement functions like `nominate` specifically.&#xD;&#xA;&#xD;&#xA;However, it seems there's no straightforward way to convert the `H256` into this type. Though, perhaps someone on this forum knows a way around it.&#xD;&#xA;&#xD;&#xA;## Motivation&#xD;&#xA;When you `nominate` you select a `Vec` of targets which are Substrate accounts for the validators. The generic type in the runtime is below:&#xD;&#xA;- `type AccountIdLookupOf&lt;T&gt; = &lt;&lt;T as frame_system::Config&gt;::Lookup as StaticLookup&gt;::Source;`&#xD;&#xA;&#xD;&#xA;This type is quite general. We'd like to go from a Substrate account provided in the EVM (32 bytes account so `H256`) into this source. We have tried a variety of methods shown below, but none work so far.&#xD;&#xA;&#xD;&#xA;## Attempt #1 - Use `AccountIdLookup::unlookup`&#xD;&#xA;```&#xD;&#xA;#[precompile::public(&quot;nominate(address[])&quot;)]&#xD;&#xA;	fn nominate(handle: &amp;mut impl PrecompileHandle, targets: Vec&lt;H256&gt;) -&gt; EvmResult {&#xD;&#xA;		handle.record_log_costs_manual(2, 32 * targets.len());&#xD;&#xA;		let origin = Runtime::AddressMapping::into_account_id(handle.context().caller);&#xD;&#xA;		let converted_targets = targets&#xD;&#xA;			.into_iter()&#xD;&#xA;			.map(|target| {&#xD;&#xA;				AccountIdLookup::&lt;MultiAddress&lt;Runtime::AccountId, AccountIndex&gt;, AccountIndex&gt;::unlookup(MultiAddress::Address32(target.0))&#xD;&#xA;			})&#xD;&#xA;			.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;		let call = pallet_staking::Call::&lt;Runtime&gt;::nominate { targets: converted_targets };&#xD;&#xA;&#xD;&#xA;		// Dispatch call (if enough gas).&#xD;&#xA;		RuntimeHelper::&lt;Runtime&gt;::try_dispatch(handle, Some(origin).into(), call)?;&#xD;&#xA;&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;This yields the following error&#xD;&#xA;```&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; precompiles/staking/src/lib.rs:200:67&#xD;&#xA;    |&#xD;&#xA;200 |         let call = pallet_staking::Call::&lt;Runtime&gt;::nominate { targets: converted_targets };&#xD;&#xA;    |                                                                         ^^^^^^^^^^^^^^^^^ expected `Vec&lt;&lt;... as StaticLookup&gt;::Source&gt;`, found `Vec&lt;MultiAddress&lt;MultiAddress&lt;..., ...&gt;, ...&gt;&gt;`&#xD;&#xA;    |&#xD;&#xA;    = note: expected struct `Vec&lt;&lt;&lt;Runtime as frame_system::Config&gt;::Lookup as StaticLookup&gt;::Source&gt;`&#xD;&#xA;               found struct `Vec&lt;MultiAddress&lt;MultiAddress&lt;&lt;Runtime as frame_system::Config&gt;::AccountId, u32&gt;, u32&gt;&gt;`&#xD;&#xA;help: a method is available that returns `&lt;&lt;Runtime as frame_system::Config&gt;::Lookup as StaticLookup&gt;::Source`&#xD;&#xA;   --&gt; /Users/drew/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/runtime/src/traits.rs:225:2&#xD;&#xA;    |&#xD;&#xA;225 |     fn unlookup(t: Self::Target) -&gt; Self::Source;&#xD;&#xA;    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider calling `unlookup`&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0308`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Attempt #2 - Use `Runtime::unlookup` generically&#xD;&#xA;```&#xD;&#xA;let mut converted_targets: Vec&lt;&lt;Runtime::Lookup as StaticLookup&gt;::Source&gt; = vec![];&#xD;&#xA;		for i in 0..targets.len() {&#xD;&#xA;			let target = targets[i];&#xD;&#xA;			let converted_target = &lt;Runtime::Lookup as StaticLookup&gt;::unlookup(target.0.into());&#xD;&#xA;			converted_targets.push(converted_target);&#xD;&#xA;		}&#xD;&#xA;		let call = pallet_staking::Call::&lt;Runtime&gt;::nominate { targets: converted_targets };&#xD;&#xA;```&#xD;&#xA;Yields the following error&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `&lt;Runtime as frame_system::Config&gt;::AccountId: From&lt;[u8; 32]&gt;` is not satisfied&#xD;&#xA;   --&gt; precompiles/staking/src/lib.rs:197:80&#xD;&#xA;    |&#xD;&#xA;197 |             let converted_target = &lt;Runtime::Lookup as StaticLookup&gt;::unlookup(target.0.into());&#xD;&#xA;    |                                                                                         ^^^^ the trait `From&lt;[u8; 32]&gt;` is not implemented for `&lt;Runtime as frame_system::Config&gt;::AccountId`&#xD;&#xA;    |&#xD;&#xA;    = note: required for `[u8; 32]` to implement `Into&lt;&lt;Runtime as frame_system::Config&gt;::AccountId&gt;`&#xD;&#xA;help: consider further restricting the associated type&#xD;&#xA;    |&#xD;&#xA;191 |     fn nominate(handle: &amp;mut impl PrecompileHandle, targets: Vec&lt;H256&gt;) -&gt; EvmResult where &lt;Runtime as frame_system::Config&gt;::AccountId: From&lt;[u8; 32]&gt; {&#xD;&#xA;    |                                                                                      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;# Questions&#xD;&#xA;1. Are there any traits that come to mind similar to converting addresses into generic types in the EVM but for Substrate addresses / `[u8; 32]`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39799" PostHistoryTypeId="1" PostId="10024" RevisionGUID="d0f19c0d-65d6-4d0f-81c2-152e5ba64c98" CreationDate="2023-09-25T11:19:22.553" UserId="74" Text="Converting a H256/bytes32 into a generic AccountId for EVM precompiles" ContentLicense="CC BY-SA 4.0" />
  <row Id="39800" PostHistoryTypeId="3" PostId="10024" RevisionGUID="d0f19c0d-65d6-4d0f-81c2-152e5ba64c98" CreationDate="2023-09-25T11:19:22.553" UserId="74" Text="|pallet|evm|account|precompile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39801" PostHistoryTypeId="5" PostId="10014" RevisionGUID="12971a1e-d186-4f0c-9597-2fb0feeaeafb" CreationDate="2023-09-25T11:20:58.543" UserId="377" Comment="deleted 6 characters in body" Text="I am getting this issue after performing the solution of this issue&#xD;&#xA;https://substrate.stackexchange.com/questions/10000/how-can-we-restart-the-chain-if-it-becomes-stuck-during-data-migration&#xD;&#xA;&#xD;&#xA;Tried to run the existing chain with new chain spec with bad blocks and new binary with all validators then it started producing block also doing the block finalization.&#xD;&#xA;&#xD;&#xA;We basically started with 2 validators then chain started producing blocks then we added all validators then it started finalizing blocks also. After that chain produced about 130 blocks and finalizing also. Then with old chainspec and binary we started achieve node then chain finality stopped with below error in log.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    Sep 23 12:33:51 node[3498514]: 2023-09-23 12:33:51 Detected prevote equivocation in the finality worker: Equivocation { round_number: 6425345, identity: Public(f87122bdc0f31343bba1c1b8f11e1584e5ed42234ce479df89608aecde43260d (5HgTLj1r...)), first: (Prevote { target_hash: 0x842a42a7556d5f338411f1dafc08a87daf855a7f4284a8ea3032fd5d1c6e0a43, target_number: 1440577 }, Signature(55b96a8677651787154021323d3853cccdb1ee98b33dda98afaaf75e0bd9f61a22d0af8567561898e2b5dd4519325b220ee55cc908d007b9032a06d3188c5706)), second: (Prevote { target_hash: 0xac2fbb087b3b2f89ce6e4e23f4587ce9038c26ef7f673750ef60496f6346f7da, target_number: 1440676 }, Signature(f75ca444dfab57bc72f340413c813941daf5b0e5c7e129e29b0ff6f9a9e943e102f94b97d115d0e95ade1436ebea7568a15ced586c660d6b7615cdb57dc0d50e)) }" ContentLicense="CC BY-SA 4.0" />
  <row Id="39804" PostHistoryTypeId="5" PostId="10023" RevisionGUID="b30eb3ed-c90a-49e5-9379-d29faacfa858" CreationDate="2023-09-25T12:37:24.853" UserId="2348" Comment="added 70 characters in body" Text="I am using substrate blockchain which is on 36 version substrate  . I have made  purposal through council which is of balance.forcetransfer, and did majority voting in yes  .After completion , when i close the  purposal motion  it is giving  bad origin error . Can  you please tell why is it happening like this  .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![error][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/QsKdF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39805" PostHistoryTypeId="6" PostId="10023" RevisionGUID="b30eb3ed-c90a-49e5-9379-d29faacfa858" CreationDate="2023-09-25T12:37:24.853" UserId="2348" Comment="added 70 characters in body" Text="|substrate-node|blockchain|council|motion|badorigin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39806" PostHistoryTypeId="4" PostId="10008" RevisionGUID="d843dbe0-d7e4-429a-9cc4-c9217df52158" CreationDate="2023-09-25T13:04:01.897" UserId="377" Comment="edited title" Text="How can we start the solo chain with existing chain data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39812" PostHistoryTypeId="5" PostId="10022" RevisionGUID="f449482d-17a5-4138-ad5b-41df723e2a53" CreationDate="2023-09-25T14:21:36.820" UserId="452" Comment="added 565 characters in body" Text="There aren't enough details in this question to be able to solve your problem. If when you started the archive node you stated seeing GRANDPA equivocations it means that this node is actually voting. Regardless, if finality is not progressing it also means that not enough validators are voting (you need &gt;2/3 of the validators online to be able to finalize). It's also possible that some validators are voting on blocks that the others can't import, I am not sure if you added `badBlocks` to the chain spec, but if you did, you need to do this for all validators and not just a few. Have a look at these questions which can help you debug your issue:&#xD;&#xA;&#xD;&#xA;- https://substrate.stackexchange.com/a/380/452&#xD;&#xA;- https://substrate.stackexchange.com/a/668/452&#xD;&#xA;&#xD;&#xA;Edit: is the archive node running as a validator? Also please check the answers above, in particular the usage of the `grandpa_roundState` RPC endpoint to figure out what is the current state of the round (i.e. who is not voting). You can also run your nodes with `-lgrandpa=debug` and check for a log message like `Waiting to import block {hash} before {N} round messages can be imported`. This should indicate that someone is voting on a chain that descends from `badBlocks`, probably because you didn't update all the validators to the new chainspec at once. Since the nodes with the new chainspec will refuse to import those blocks, this means that the round doesn't make progress (since they can't process those votes)." ContentLicense="CC BY-SA 4.0" />
  <row Id="39813" PostHistoryTypeId="2" PostId="10027" RevisionGUID="76fe5331-c39a-463c-9090-ce3b3949da10" CreationDate="2023-09-25T14:46:45.113" UserId="2985" Text="I would like to know what are the ways and how we can retrieve the all items stored in a custom pallet&#xD;&#xA;&#xD;&#xA;I was having data structured in this way&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(&#xD;&#xA;		Clone, Encode, Decode, Eq, PartialEq, Default, RuntimeDebug, MaxEncodedLen, TypeInfo,&#xD;&#xA;	)]&#xD;&#xA;	pub struct ProvidedConsent&lt;BoundedString&gt; {&#xD;&#xA;		pub _id: BoundedString,&#xD;&#xA;		pub user_id: BoundedString,&#xD;&#xA;		pub business_id: BoundedString,&#xD;&#xA;		pub consent: BoundedVec&lt;Consent&lt;BoundedString&gt;, ConstU32&lt;50&gt;&gt;,&#xD;&#xA;		pub last_updated: u64,&#xD;&#xA;		pub is_active: bool,&#xD;&#xA;		pub is_deleted: bool,&#xD;&#xA;		pub added_on: u64,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn consents)]&#xD;&#xA;	pub(super) type UserConsent&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Twox64Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		Twox64Concat,&#xD;&#xA;		BoundedVec&lt;u8, T::StringLimit&gt;,&#xD;&#xA;		ProvidedConsent&lt;BoundedVec&lt;u8, T::StringLimit&gt;&gt;,&#xD;&#xA;		OptionQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	#[derive(&#xD;&#xA;		Encode, Decode, Clone, PartialEq, Default, Eq, MaxEncodedLen, RuntimeDebug, TypeInfo,&#xD;&#xA;	)]&#xD;&#xA;	pub struct Consent&lt;BoundedString&gt; {&#xD;&#xA;		pub key: BoundedString,&#xD;&#xA;		pub is_accepted: bool,&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I also got to know with polkadot.js we have a way , but for custom pallet how does it work &lt;https://polkadot.js.org/docs/api/start/api.query.other/#map-keys--entries&gt;&#xD;&#xA;&#xD;&#xA;Also, we have &lt;https://substrate.stackexchange.com/questions/1736/runtime-api-to-collect-values-in-storagemap&gt;, we can use it in runtime&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But, please can anyone explain how we can implement a retrieve list feature using polkadot.js and using runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="39815" PostHistoryTypeId="1" PostId="10027" RevisionGUID="76fe5331-c39a-463c-9090-ce3b3949da10" CreationDate="2023-09-25T14:46:45.113" UserId="2985" Text="how many ways are there to get all items stored in custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="39816" PostHistoryTypeId="3" PostId="10027" RevisionGUID="76fe5331-c39a-463c-9090-ce3b3949da10" CreationDate="2023-09-25T14:46:45.113" UserId="2985" Text="|polkadot-js|storage|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39817" PostHistoryTypeId="2" PostId="10028" RevisionGUID="a6c4dc06-874d-49ba-b7cd-d5788a5d4bd1" CreationDate="2023-09-25T15:26:00.283" UserId="3171" Text="Zombienet + polkadot v43&#xD;&#xA;&#xD;&#xA;got this error when submit tx:&#xD;&#xA;&#xD;&#xA;called `Result::unwrap()` on an `Err` value: Subxt error: Transaction(BlockNotFound)&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Transaction error: The block containing the transaction can no longer be found (perhaps it was on a non-finalized fork?)&#xD;&#xA;    1: The block containing the transaction can no longer be found (perhaps it was on a non-finalized fork?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="39819" PostHistoryTypeId="1" PostId="10028" RevisionGUID="a6c4dc06-874d-49ba-b7cd-d5788a5d4bd1" CreationDate="2023-09-25T15:26:00.283" UserId="3171" Text="Polkadot v43 got the strange issue with tx pool" ContentLicense="CC BY-SA 4.0" />
  <row Id="39820" PostHistoryTypeId="3" PostId="10028" RevisionGUID="a6c4dc06-874d-49ba-b7cd-d5788a5d4bd1" CreationDate="2023-09-25T15:26:00.283" UserId="3171" Text="|polkadot|substrate-parachain-template|substrate-node|transaction-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39821" PostHistoryTypeId="5" PostId="10028" RevisionGUID="92be3afe-4dcc-4abc-86e9-f0332fca28df" CreationDate="2023-09-25T15:37:47.477" UserId="3171" Comment="added 185 characters in body; edited title" Text="Zombienet + polkadot v43&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;two errors:&#xD;&#xA;&#xD;&#xA;DEBUG tokio-runtime-worker txpool: [0xd7165975185efe4f63425ab930021c89f166fda20d0e4f564f61c9ebd491640e] Error importing: **TooLowPriority** { old: 13700, new: 513 }    &#xD;&#xA;&#xD;&#xA;got this error when submit tx:&#xD;&#xA;&#xD;&#xA;called `Result::unwrap()` on an `Err` value: Subxt error: **Transaction(BlockNotFound)**&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Transaction error: The block containing the transaction can no longer be found (perhaps it was on a non-finalized fork?)&#xD;&#xA;    1: The block containing the transaction can no longer be found (perhaps it was on a non-finalized fork?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The same codebase works on polkadot version 39." ContentLicense="CC BY-SA 4.0" />
  <row Id="39822" PostHistoryTypeId="4" PostId="10028" RevisionGUID="92be3afe-4dcc-4abc-86e9-f0332fca28df" CreationDate="2023-09-25T15:37:47.477" UserId="3171" Comment="added 185 characters in body; edited title" Text="Polkadot v43 failed to send issue with tx pool" ContentLicense="CC BY-SA 4.0" />
  <row Id="39823" PostHistoryTypeId="5" PostId="10028" RevisionGUID="d6d87b00-7b11-48a7-ab93-7d12ab2aea52" CreationDate="2023-09-25T15:50:05.023" UserId="3171" Comment="added 2712 characters in body" Text="Zombienet + polkadot v43&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;two errors:&#xD;&#xA;&#xD;&#xA;DEBUG tokio-runtime-worker txpool: [0xd7165975185efe4f63425ab930021c89f166fda20d0e4f564f61c9ebd491640e] Error importing: **TooLowPriority** { old: 13700, new: 513 }    &#xD;&#xA;&#xD;&#xA;got this error when submit tx:&#xD;&#xA;&#xD;&#xA;called `Result::unwrap()` on an `Err` value: Subxt error: **Transaction(BlockNotFound)**&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Transaction error: The block containing the transaction can no longer be found (perhaps it was on a non-finalized fork?)&#xD;&#xA;    1: The block containing the transaction can no longer be found (perhaps it was on a non-finalized fork?)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**The same codebase works on polkadot version 39.**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;more logs with txpool&#xD;&#xA;&#xD;&#xA;DEBUG tokio-runtime-worker txpool: [Relaychain] resolve hash:0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1 finalized:false tree_route:TreeRoute { route: [HashAndNumber { number: 95, hash: 0x430087b004ca09e6dc28a11d3e61e7196b3d8c757d96b931894191ff6319f42b }, HashAndNumber { number: 96, hash: 0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1 }], pivot: 0 } best_block:0x430087b004ca09e6dc28a11d3e61e7196b3d8c757d96b931894191ff6319f42b finalized_block:0x2e32bc5184dade259838b055dc7ebc960d1431168c902fb1fdf6bdcc9ff544c5    &#xD;&#xA;2023-09-25 15:58:06.029 TRACE tokio-runtime-worker txpool: [Relaychain] handle_enactment tree_route: TreeRoute { route: [HashAndNumber { number: 95, hash: 0x430087b004ca09e6dc28a11d3e61e7196b3d8c757d96b931894191ff6319f42b }, HashAndNumber { number: 96, hash: 0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1 }], pivot: 0 }    &#xD;&#xA;2023-09-25 15:58:06.029 TRACE tokio-runtime-worker txpool: [Relaychain] Pruning transactions: [0x3755cdcafff7d039c9ef3285c6e6fd5f71e53f12de9eef34231c4e0a034ad5c9, 0x54ac3158e5797fbcc5f1471ff68efe1c5bc1088066b6271020ece2916048d3fc]    &#xD;&#xA;2023-09-25 15:58:06.029 DEBUG tokio-runtime-worker txpool: [Relaychain] Starting pruning of block BlockId::Hash(0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1) (extrinsics: 2)    &#xD;&#xA;2023-09-25 15:58:06.029 TRACE tokio-runtime-worker txpool: [Relaychain] txpool is empty, skipping validation for block BlockId::Hash(0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1)    &#xD;&#xA;2023-09-25 15:58:06.029 TRACE tokio-runtime-worker txpool: [Relaychain] txpool is empty, skipping validation for block BlockId::Hash(0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1)    &#xD;&#xA;2023-09-25 15:58:06.029 DEBUG tokio-runtime-worker txpool: [Relaychain] Pruning at BlockId::Hash(0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1)    &#xD;&#xA;2023-09-25 15:58:06.029  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #96 (0x9878…59d1)    &#xD;&#xA;2023-09-25 15:58:06.029 TRACE tokio-runtime-worker txpool: [Relaychain] Pruning at BlockId::Hash(0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1). Resubmitting transactions.    &#xD;&#xA;2023-09-25 15:58:06.029 DEBUG tokio-runtime-worker txpool: [Relaychain] [0x3755cdcafff7d039c9ef3285c6e6fd5f71e53f12de9eef34231c4e0a034ad5c9] Pruned at 0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1    &#xD;&#xA;2023-09-25 15:58:06.029 DEBUG tokio-runtime-worker txpool: [Relaychain] [0x54ac3158e5797fbcc5f1471ff68efe1c5bc1088066b6271020ece2916048d3fc] Pruned at 0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1    " ContentLicense="CC BY-SA 4.0" />
  <row Id="39829" PostHistoryTypeId="4" PostId="10023" RevisionGUID="6da9e8f3-ba07-4120-ac6a-0d1316504879" CreationDate="2023-09-26T05:23:57.287" UserId="2348" Comment="edited title" Text="council execution giving bad origin error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39830" PostHistoryTypeId="2" PostId="10030" RevisionGUID="f60d8e20-136c-4fa2-9eed-350cdb7e3305" CreationDate="2023-09-26T06:00:14.367" UserId="354" Text="You can refer to [https://polkadot.js.org/docs/substrate/storage][1] on how to  access storage from any pallet either it is custom or existing. Substrate already provides APIs for the same and can be called via `api.query.&lt;module&gt;.&lt;method&gt;`.&#xD;&#xA;&#xD;&#xA;And if you want to access the storage from polkadot js explorer than you can go to `Developer &gt; Chain State &gt; &quot;pallet&quot;` [https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-rpc.dwellir.com#/chainstate][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/substrate/storage&#xD;&#xA;  [2]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-rpc.dwellir.com#/chainstate" ContentLicense="CC BY-SA 4.0" />
  <row Id="39832" PostHistoryTypeId="50" PostId="9752" RevisionGUID="a2bfce4a-cad2-4098-ac21-e173ef01b145" CreationDate="2023-09-26T06:08:50.973" UserId="-1" />
  <row Id="39833" PostHistoryTypeId="5" PostId="10023" RevisionGUID="f1bcac3a-7a64-44fb-a276-a16f769134a4" CreationDate="2023-09-26T06:17:50.260" UserId="354" Comment="improved formatting" Text="I am using substrate blockchain which is on `polkadot-v0.9.36`  . I have made  proposal through council which is of `balance.forcetransfer`, and did majority voting in `aye`.After completion , when I close the  proposal motion  it is giving  `bad origin error`. Can  you please tell why is it happening like this .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![error][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/QsKdF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39834" PostHistoryTypeId="24" PostId="10023" RevisionGUID="f1bcac3a-7a64-44fb-a276-a16f769134a4" CreationDate="2023-09-26T06:17:50.260" Comment="Proposed by 354 approved by 2348 edit id of 586" ContentLicense="CC BY-SA 4.0" />
  <row Id="39835" PostHistoryTypeId="2" PostId="10031" RevisionGUID="bbe6958f-05aa-424f-8998-8d5a0d741c92" CreationDate="2023-09-26T07:19:41.257" UserId="2762" Text="As Daan said in the comments is hard for us to discover what is wrong with the logs you provided.&#xD;&#xA;&#xD;&#xA;It looks that the polkadot-parachain starts correctly, but how are you running the  relay chain? &#xD;&#xA;Here you can see how to use your docker images with Zombienet to run all your testing environment (Relay-chain + parachain): [Zombienet: Substrate-Parachain-Template ... How to write the Dockerfile?][1]&#xD;&#xA;&#xD;&#xA;I also recommend to check the basic tutorials in the Substrate docs: [Prepare a local relay chain][2] or how to use Zombienet to set up all your testing environment: [Set up a parachain test network][3]. And finally you can check some examples of docker scripts in the [cumulus (parachain) repository][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2856/zombienet-substrate-parachain-template-how-to-write-the-dockerfile?rq=1&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/&#xD;&#xA;  [3]: https://docs.substrate.io/test/set-up-a-test-network/&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/docker/scripts" ContentLicense="CC BY-SA 4.0" />
  <row Id="39837" PostHistoryTypeId="2" PostId="10032" RevisionGUID="ec861c64-adcf-421f-b0c2-22e436c61519" CreationDate="2023-09-26T07:31:53.503" UserId="2762" Text="In your case with PolkadotJS it will look like this:&#xD;&#xA;```js&#xD;&#xA;const consents = await api.query.yourpallet.userConsent.entries();&#xD;&#xA;consents.forEach(([key, consent]) =&gt; {&#xD;&#xA;  console.log(consent.toHuman());&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;And in the Runtime:&#xD;&#xA;```rs&#xD;&#xA;yourpallet::UserConsent::&lt;Runtime&gt;::iter_values().map(|v| v.encode()).collect::&lt;Vec&lt;Vec&lt;_&gt;&gt;&gt;();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39839" PostHistoryTypeId="2" PostId="10033" RevisionGUID="a3e94f49-5bed-4f3a-b324-2c5dba37c707" CreationDate="2023-09-26T07:46:11.817" UserId="2762" Text="I see there is an implementation in Rust: [merkletree][1].&#xD;&#xA;Also in the substrate repository there are some custom implementations you can take a look for inspirations: [Merkle Mountain Ranges][2] and a custom [Binary Merkle Tree][3], that implements a simple binary Merkle Tree utilities required for inter-op with Ethereum bridge &amp; Solidity contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/merkletree/latest/merkletree/&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/merkle-mountain-range&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/tree/master/substrate/utils/binary-merkle-tree" ContentLicense="CC BY-SA 4.0" />
  <row Id="39841" PostHistoryTypeId="2" PostId="10034" RevisionGUID="51edd177-39bf-4eb7-b4f0-94595d0a0a31" CreationDate="2023-09-26T07:55:10.767" UserId="3317" Text="The `force_transfer` extrinsic requires to be called by the `Root` origin ([ref][1]). The `Collective` pallet doesn't have this authority ([democracy pallet has][2]). The `Collective` pallet can be used to configure a pallet to only allow members of some collective to issue calls.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/bc5005217a8c2e7c95b9011c96d7e619879b1200/substrate/frame/balances/src/lib.rs#L575&#xD;&#xA;  [2]: https://github.com/RGafiyatullin/substrate/blob/4d45aca38d7799bab2c85d45aee1ab1dd22d7b1d/frame/democracy/src/lib.rs#L1682-L1686" ContentLicense="CC BY-SA 4.0" />
  <row Id="39843" PostHistoryTypeId="2" PostId="10035" RevisionGUID="7703203e-fa65-43cf-bc3b-aa33afb262dc" CreationDate="2023-09-26T08:16:09.367" UserId="2762" Text="Very interesting question to have documented here:&#xD;&#xA;&#xD;&#xA;1. Which old pallets will be removed from the runtime?&#xD;&#xA;```&#xD;&#xA;phragmen_election&#xD;&#xA;democracy&#xD;&#xA;council&#xD;&#xA;technical_committee&#xD;&#xA;technical_membership&#xD;&#xA;pallet_tips&#xD;&#xA;```&#xD;&#xA;2. What migration will be carried out?&#xD;&#xA;&#xD;&#xA;You might want to clean all the storage from v1, so first you have to carry some miragtions to unlock/reserve balances, see the example in [Kusama][1]:&#xD;&#xA;```rs&#xD;&#xA;// Unlock/unreserve balances from Gov v1 pallets that hold them&#xD;&#xA;// https://github.com/paritytech/polkadot/issues/6749&#xD;&#xA;pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds&lt;UnlockConfig&gt;,&#xD;&#xA;pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds&lt;UnlockConfig&gt;,&#xD;&#xA;pallet_tips::migrations::unreserve_deposits::UnreserveDeposits&lt;UnlockConfig, ()&gt;,&#xD;&#xA;&#xD;&#xA;// Delete storage key/values from all Gov v1 pallets&#xD;&#xA;frame_support::migrations::RemovePallet&lt;DemocracyPalletName, &lt;Runtime as frame_system::Config&gt;::DbWeight&gt;,&#xD;&#xA;frame_support::migrations::RemovePallet&lt;CouncilPalletName, &lt;Runtime as frame_system::Config&gt;::DbWeight&gt;,&#xD;&#xA;frame_support::migrations::RemovePallet&lt;TechnicalCommitteePalletName, &lt;Runtime as frame_system::Config&gt;::DbWeight&gt;,&#xD;&#xA;frame_support::migrations::RemovePallet&lt;PhragmenElectionPalletName, &lt;Runtime as frame_system::Config&gt;::DbWeight&gt;,&#xD;&#xA;frame_support::migrations::RemovePallet&lt;TechnicalMembershipPalletName, &lt;Runtime as frame_system::Config&gt;::DbWeight&gt;,&#xD;&#xA;frame_support::migrations::RemovePallet&lt;TipsPalletName, &lt;Runtime as frame_system::Config&gt;::DbWeight&gt;&#xD;&#xA;```&#xD;&#xA;Follow this PRs for more details:&#xD;&#xA;- [\[FRAME\] Remove Gov V1 from Polkadot and Kusama &amp; unlock/unreserve funds][2]&#xD;&#xA;- [migration: unlock/unreserve Gov v1 balances, remove Gov V1 pallets from polkadot runtime, and remove Gov V1 pallet key/values from storage][3]&#xD;&#xA;&#xD;&#xA;3. Which new pallets need to be added to the runtime?&#xD;&#xA;```&#xD;&#xA;pallet_conviction_voting&#xD;&#xA;pallet_referenda&#xD;&#xA;pallet_whitelist&#xD;&#xA;```&#xD;&#xA;For the fellowship:&#xD;&#xA;```&#xD;&#xA;pallet_ranked_collective&#xD;&#xA;```&#xD;&#xA;And the custom origins for governance interventions.&#xD;&#xA;```&#xD;&#xA;pallet_custom_origins&#xD;&#xA;```&#xD;&#xA;4. What other important things do we need? &#xD;&#xA;&#xD;&#xA;The PR that removes OpenGov1 in Kusama and introduce it into Polakdot: [Introduce OpenGov into Polkadot][4].&#xD;&#xA;&#xD;&#xA;Other PRs might be useful: [Logic for the (Core) Fellowship][5].&#xD;&#xA;&#xD;&#xA;This process has been implemented a few weeks ago in Westend and Rococo too:&#xD;&#xA;[OpenGov in Westend and Rococo][4] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/runtime/kusama/src/lib.rs#L1739&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/issues/485&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/pull/7314&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/pull/1177&#xD;&#xA;  [5]: https://github.com/paritytech/substrate/pull/13503" ContentLicense="CC BY-SA 4.0" />
  <row Id="39845" PostHistoryTypeId="2" PostId="10036" RevisionGUID="6f0e28ce-93a1-4f6f-a982-c5b4cda85564" CreationDate="2023-09-26T08:17:44.093" UserId="4704" Text="You can refer here: Polkadot transfer transaction build and sign&#xD;&#xA;https://gist.github.com/islishude/24c2ea503050bd3b0d17d68676ea297c" ContentLicense="CC BY-SA 4.0" />
  <row Id="39847" PostHistoryTypeId="2" PostId="10037" RevisionGUID="11b98ff0-5f42-49c9-b11f-e252b6a8057e" CreationDate="2023-09-26T08:20:49.997" UserId="3317" Text="You can simply use the [`impl_benchmark_test_suite`][1] macro which generates those tests for your benchmarks ([detailed explanation][2]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/bc5005217a8c2e7c95b9011c96d7e619879b1200/substrate/frame/benchmarking/src/v1.rs#L1444&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/6034/how-to-test-my-bench-marking-functions" ContentLicense="CC BY-SA 4.0" />
  <row Id="39850" PostHistoryTypeId="2" PostId="10038" RevisionGUID="eabfe548-022e-49b3-8ce3-7bed47c3029e" CreationDate="2023-09-26T10:37:58.893" UserId="4556" Text="I'm using pallet-nfts in my custom pallet. From the moment that I integrated pallet-nfts into my pallet it's not longer possible to build the node.&#xD;&#xA;&#xD;&#xA;The custom pallet's Cargo.toml looks like this:&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;pallet-projects&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;FRAME pallet for projects&quot;&#xD;&#xA;authors = [&quot;Sonemas LLC &lt;hello@incentiverse.io&gt;&quot;]&#xD;&#xA;homepage = &quot;https://incentiverse.io&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;MIT&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://gitlab.com/incentiverse/node&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.1&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-nfts = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-std = { version = &quot;8.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;log = &quot;0.4.20&quot;&#xD;&#xA;getrandom = { version = &quot;0.2&quot;, features = [&quot;js&quot;] }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-io = { version = &quot;23.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-nfts/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&quot;frame-benchmarking/runtime-benchmarks&quot;]&#xD;&#xA;try-runtime = [&quot;frame-support/try-runtime&quot;]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I added the line with `getrandom`as a solution to the following error that occurred:&#xD;&#xA;```&#xD;&#xA;  285 | /         compile_error!(&quot;the wasm*-unknown-unknown targets are not supported by \&#xD;&#xA;  286 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  287 | |                         For more information see: \&#xD;&#xA;  288 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However I'm still left with the following build error:&#xD;&#xA;```&#xD;&#xA;Compiling node-template-runtime v4.0.0-dev (/Users/arjanvaneersel/Development/rust/node/runtime)&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/arjanvaneersel/Development/rust/node/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/arjanvaneersel/Development/rust/node/target/release/build/node-template-runtime-17bb0d6993cb0094/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/arjanvaneersel/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/arjanvaneersel/Development/rust/node/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.74.0-nightly (b3aa8e716 2023-09-21)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling wasm-bindgen-backend v0.2.87&#xD;&#xA;     Compiling thiserror v1.0.44&#xD;&#xA;     Compiling toml v0.5.11&#xD;&#xA;     Compiling impl-trait-for-tuples v0.2.2&#xD;&#xA;     Compiling indexmap v1.9.3&#xD;&#xA;     Compiling crypto-common v0.1.6&#xD;&#xA;     Compiling block-buffer v0.10.4&#xD;&#xA;     Compiling digest v0.9.0&#xD;&#xA;     Compiling digest v0.10.7&#xD;&#xA;     Compiling derive_more v0.99.17&#xD;&#xA;     Compiling cranelift-entity v0.95.1&#xD;&#xA;     Compiling errno v0.3.1&#xD;&#xA;  error[E0583]: file not found for module `sys`&#xD;&#xA;    --&gt; /Users/arjanvaneersel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/errno-0.3.1/src/lib.rs:26:1&#xD;&#xA;     |&#xD;&#xA;  26 | mod sys;&#xD;&#xA;     | ^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = help: to create the module `sys`, create file &quot;/Users/arjanvaneersel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/errno-0.3.1/src/sys.rs&quot; or &quot;/Users/arjanvaneersel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/errno-0.3.1/src/sys/mod.rs&quot;&#xD;&#xA;&#xD;&#xA;  error[E0425]: cannot find function `with_description` in module `sys`&#xD;&#xA;    --&gt; /Users/arjanvaneersel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/errno-0.3.1/src/lib.rs:47:14&#xD;&#xA;     |&#xD;&#xA;  47 |         sys::with_description(*self, |desc| {&#xD;&#xA;     |              ^^^^^^^^^^^^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;  error[E0425]: cannot find function `with_description` in module `sys`&#xD;&#xA;    --&gt; /Users/arjanvaneersel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/errno-0.3.1/src/lib.rs:58:14&#xD;&#xA;     |&#xD;&#xA;  58 |         sys::with_description(*self, |desc| match desc {&#xD;&#xA;     |              ^^^^^^^^^^^^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;  error[E0425]: cannot find value `STRERROR_NAME` in module `sys`&#xD;&#xA;    --&gt; /Users/arjanvaneersel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/errno-0.3.1/src/lib.rs:64:22&#xD;&#xA;     |&#xD;&#xA;  64 |                 sys::STRERROR_NAME,&#xD;&#xA;     |                      ^^^^^^^^^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;  error[E0425]: cannot find function `errno` in module `sys`&#xD;&#xA;    --&gt; /Users/arjanvaneersel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/errno-0.3.1/src/lib.rs:95:10&#xD;&#xA;     |&#xD;&#xA;  95 |     sys::errno()&#xD;&#xA;     |          ^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;  error[E0425]: cannot find function `set_errno` in module `sys`&#xD;&#xA;     --&gt; /Users/arjanvaneersel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/errno-0.3.1/src/lib.rs:100:10&#xD;&#xA;      |&#xD;&#xA;  100 |     sys::set_errno(err)&#xD;&#xA;      |          ^^^^^^^^^ not found in `sys`&#xD;&#xA;&#xD;&#xA;  Some errors have detailed explanations: E0425, E0583.&#xD;&#xA;  For more information about an error, try `rustc --explain E0425`.&#xD;&#xA;  error: could not compile `errno` (lib) due to 6 previous errors&#xD;&#xA;  warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found some article suggesting that I should add the line `syn = { version = &quot;=2.0.37&quot; }` to Cargo.toml. I added this line first in the Cargo.toml of my custom pallet, then also in runtime, but the aforementioned error keeps coming back.&#xD;&#xA;&#xD;&#xA;The command I'm using to build is `cargo build --release`. &#xD;&#xA;&#xD;&#xA;What am I doing wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39852" PostHistoryTypeId="1" PostId="10038" RevisionGUID="eabfe548-022e-49b3-8ce3-7bed47c3029e" CreationDate="2023-09-26T10:37:58.893" UserId="4556" Text="Can't build node when using pallet-nfts in custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="39853" PostHistoryTypeId="3" PostId="10038" RevisionGUID="eabfe548-022e-49b3-8ce3-7bed47c3029e" CreationDate="2023-09-26T10:37:58.893" UserId="4556" Text="|substrate-node-template|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39854" PostHistoryTypeId="2" PostId="10039" RevisionGUID="1e7897ef-7c20-4380-9ef8-4a20205a0ca2" CreationDate="2023-09-26T13:10:58.233" UserId="3035" Text="there are cases when we want to `Box` an argument of a dispatchable. One such case is when the type is large, for instance, `xcm::MultiLocation` and we do not want to blow the size of `Call` type.&#xD;&#xA;&#xD;&#xA;these types might be exposed as generic types via the pallet's config. in this situation, we technically have two ways to box that type:&#xD;&#xA;&#xD;&#xA;1. on a pallet level: `fn do_something(..., asset: Box&lt;Config::AssetKind&gt;)`&#xD;&#xA;2. on a client level: `impl Config { AssetKind = Box&lt;MultiLocation&gt;}`&#xD;&#xA;&#xD;&#xA;the second option seems incorrect to me, at least because a library/pallet might not anticipate it, and we're somewhat misrepresenting what `AssetKind` truly is in this context.&#xD;&#xA;&#xD;&#xA;do you see any concrete reasons to avoid `option 2`? or perhaps reasons why it might be fine? &#xD;&#xA;&#xD;&#xA;let's consider a case when `AssetKind` is referenced in one of the events like `Created {asset: Config::AssetKind}` and stored in a storage item. How does this affect metadata?&#xD;&#xA;&#xD;&#xA;from rust perspective, it appears that most cases would be handled since a boxed type would eventually be dereferenced." ContentLicense="CC BY-SA 4.0" />
  <row Id="39856" PostHistoryTypeId="1" PostId="10039" RevisionGUID="1e7897ef-7c20-4380-9ef8-4a20205a0ca2" CreationDate="2023-09-26T13:10:58.233" UserId="3035" Text="boxed argument of a dispatchable" ContentLicense="CC BY-SA 4.0" />
  <row Id="39857" PostHistoryTypeId="3" PostId="10039" RevisionGUID="1e7897ef-7c20-4380-9ef8-4a20205a0ca2" CreationDate="2023-09-26T13:10:58.233" UserId="3035" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39858" PostHistoryTypeId="5" PostId="10039" RevisionGUID="34719456-945d-41b2-962e-afdc8237cc65" CreationDate="2023-09-26T14:37:42.267" UserId="3035" Comment="added 10 characters in body" Text="there are cases when we want to `Box` an argument of a dispatchable. One such case is when the type is large, for instance, `xcm::MultiLocation` and we do not want to blow the size of `Call` type.&#xD;&#xA;&#xD;&#xA;these types might be exposed as generic types via the pallet's config. in this situation, we technically have two ways to box that type:&#xD;&#xA;&#xD;&#xA;1. on a pallet level: `fn do_something(..., asset: Box&lt;Config::AssetKind&gt;)`&#xD;&#xA;2. on a client level: `impl Config { AssetKind = Box&lt;MultiLocation&gt;}`&#xD;&#xA;&#xD;&#xA;the second option seems incorrect to me, at least because a library/pallet might not anticipate it, and we're somewhat misrepresenting what `AssetKind` truly is in this context.&#xD;&#xA;&#xD;&#xA;do you see any concrete reasons to avoid `option 2`? or perhaps reasons why it might be fine? &#xD;&#xA;&#xD;&#xA;let's consider a case when `AssetKind` is referenced in one of the events like `Created {asset: Config::AssetKind}` and stored in a storage item. also let's thing about a chain metadata.&#xD;&#xA;&#xD;&#xA;from rust perspective, it appears that most cases would be handled since a boxed type would eventually be dereferenced." ContentLicense="CC BY-SA 4.0" />
  <row Id="39859" PostHistoryTypeId="2" PostId="10040" RevisionGUID="22c45938-c261-4151-bcb2-5ab827bf274a" CreationDate="2023-09-26T15:31:50.100" UserId="2762" Text="1. How is the value of unit_per_second and units_per_mb calculated?&#xD;&#xA;&#xD;&#xA;The functions you are using are a implementation for the XCM Docs example, in this case the `unit_per_second` and `units_per_mb` 1_000_000_000_000 and 1024 * 1024, and they are are specified in the code (see [link][1]):&#xD;&#xA;```rs&#xD;&#xA;pub TokensPerSecondPerMegabyte: (AssetId, u128, u128) =&#xD;&#xA;		(Concrete(TokenLocation::get()), 1_000_000_000_000, 1024 * 1024);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. It seems that Weight is the common unit of all tokens (Dot, Kusama, Moonbeam, ...) so with different tokens, how to convert weight to a token like it? That is, how will weight to dot differ from weight to KSM? How to calculate?&#xD;&#xA;&#xD;&#xA;A configuration item in the Executor Config: `Trader`, is the responsible to convert the required weight units into fees&#xD;&#xA;&#xD;&#xA;3. How to determine the weight limit in xcm?&#xD;&#xA;&#xD;&#xA;By using `WeightLimit::Limited()`, you guarantee the message will error if it tries to use more weight than you expect, if you don't mind this, you can use `WeightLimit::Unlimited`.&#xD;&#xA;&#xD;&#xA;4. How can I find the base_weight of all instructions?&#xD;&#xA;&#xD;&#xA;For example Polkadot currently uses a fixed amount of weight for all XCM instructions, which is 1,000,000,000 weight units per instruction. Is defined in the config (See link to the [code][2]).&#xD;&#xA;In the XCM docs example you are looking this is a bit less, 1,000(See [code][3]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/xcm-docs/blob/main/examples/src/simple_test_net/relay_chain.rs#L169C2-L170C68&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/runtime/polkadot/src/xcm_config.rs#L111&#xD;&#xA;  [3]: https://github.com/paritytech/xcm-docs/blob/main/examples/src/simple_test_net/relay_chain.rs#L168" ContentLicense="CC BY-SA 4.0" />
  <row Id="39861" PostHistoryTypeId="2" PostId="10041" RevisionGUID="190bf40c-24a5-42fc-83a3-6bd1c45ce607" CreationDate="2023-09-26T15:36:23.067" UserId="3327" Text="In the polkadot account there is a private key and a public key. &#xD;&#xA;&#xD;&#xA;What does the predefined account &quot;Alice&quot; means? I mean in the pre defined account is &quot;Alice&quot; is the title of the account? &#xD;&#xA;&#xD;&#xA;I am asking this question because in the substrate-parachian-template in the chain_sepc.rs, there is a lie of code:&#xD;&#xA;&#xD;&#xA;get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;). &#xD;&#xA;&#xD;&#xA;I wanted to replace this pre defined alice account with my own account so should I use my public key here like:&#xD;&#xA;&#xD;&#xA;get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;5FRBorJ8HL3PpWrN2vpQLHEZobdyvwirUcGmtB2WMhxJtToy&quot;) &#xD;&#xA;&#xD;&#xA;Or I will use the title of my account like:&#xD;&#xA;get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;SYED KAMRAN&quot;) &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39863" PostHistoryTypeId="1" PostId="10041" RevisionGUID="190bf40c-24a5-42fc-83a3-6bd1c45ce607" CreationDate="2023-09-26T15:36:23.067" UserId="3327" Text="What does Alice polkadot account mean?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39864" PostHistoryTypeId="3" PostId="10041" RevisionGUID="190bf40c-24a5-42fc-83a3-6bd1c45ce607" CreationDate="2023-09-26T15:36:23.067" UserId="3327" Text="|substrate-parachain-template|rococo|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39865" PostHistoryTypeId="2" PostId="10042" RevisionGUID="5755068f-e942-4eeb-b4cb-a2bed6fba94d" CreationDate="2023-09-26T15:54:19.450" UserId="3171" Text="Found the issue. the version subxt 0.30.0 introduced the bug. &#xD;&#xA;&#xD;&#xA;DEBUG tokio-runtime-worker txpool: [0xd7165975185efe4f63425ab930021c89f166fda20d0e4f564f61c9ebd491640e] Error importing: TooLowPriority { old: 13700, new: 513 } &#xD;&#xA;&#xD;&#xA;i am going to create issue in subxt repo &#xD;&#xA;&#xD;&#xA;method next_nonce_account was removed and a new method nonce_account wokrs absolutely different way and because of it the error with nonce failed to submit tx time from time." ContentLicense="CC BY-SA 4.0" />
  <row Id="39868" PostHistoryTypeId="2" PostId="10043" RevisionGUID="a3249d06-e6ec-490c-876b-0fd43f279747" CreationDate="2023-09-26T16:41:02.913" UserId="29" Text="This should be helpful:&#xD;&#xA;- https://substrate.stackexchange.com/questions/41/what-are-the-predefined-accounts-alice-bob-etc&#xD;&#xA;&#xD;&#xA;You would do something like this:&#xD;&#xA;```rust&#xD;&#xA;hex![&quot;c02563505b8fc10f0acb3e97982d663424d4617baced9bcf51c847bd879ff827&quot;].into()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can use `subkey` to get the address from SS58.&#xD;&#xA;- https://substrate.stackexchange.com/a/8777/29" ContentLicense="CC BY-SA 4.0" />
  <row Id="39870" PostHistoryTypeId="2" PostId="10044" RevisionGUID="491ecafd-b57f-4104-8d5c-5a4f72bb3494" CreationDate="2023-09-26T19:54:13.633" UserId="543" Text="It looks like you're missing `default-features=false` on the pallet-nfts import. Try changing it to:&#xD;&#xA;&#xD;&#xA;pallet-nfts = { version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot;, **default-features = false** }" ContentLicense="CC BY-SA 4.0" />
  <row Id="39873" PostHistoryTypeId="2" PostId="10045" RevisionGUID="e7e8a5ff-27f1-417f-a790-9a9a5e097066" CreationDate="2023-09-27T05:10:41.593" UserId="554" Text="I recently upgraded the chain from version 0.9.36 to 1.0.0. Following this update, when attempting to perform a runtime upgrade on the blockchain, I encountered an error that resulted in the chain no longer producing blocks. The error message is as follows:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-09-27 09:37:13 Proposing failed: Import failed: Error at calling runtime api: Failed to get runtime version: runtime requires function imports which are not present on the host: 'env:ext_statement_store_submit_statement_version_1 &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Hae1Y.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="39875" PostHistoryTypeId="1" PostId="10045" RevisionGUID="e7e8a5ff-27f1-417f-a790-9a9a5e097066" CreationDate="2023-09-27T05:10:41.593" UserId="554" Text="How to solve Failed to get runtime version issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39876" PostHistoryTypeId="3" PostId="10045" RevisionGUID="e7e8a5ff-27f1-417f-a790-9a9a5e097066" CreationDate="2023-09-27T05:10:41.593" UserId="554" Text="|parachain|migration|block-production|storage-migration|on-runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39877" PostHistoryTypeId="2" PostId="10046" RevisionGUID="2120ba86-d310-4b13-9dad-a85b3b96f2ba" CreationDate="2023-09-27T09:04:06.493" UserId="2722" Text="I am trying to run a Substrate node with a custom configuration using the following command:&#xD;&#xA;&#xD;&#xA;      ./target/release/node-template \&#xD;&#xA;      --base-path /tmp/pikamo \&#xD;&#xA;      --chain ./customSpecRaw.json \&#xD;&#xA;      --port 30333 \&#xD;&#xA;      --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;      --validator \&#xD;&#xA;      --rpc-methods Unsafe \&#xD;&#xA;      --name PikamoTestNet \&#xD;&#xA;      --ws-external \&#xD;&#xA;      --rpc-external \&#xD;&#xA;      --unsafe-ws-external \&#xD;&#xA;      --unsafe-rpc-external \&#xD;&#xA;      --password-interactive&#xD;&#xA;&#xD;&#xA;When I try to access the node externally, I encounter the following error:&#xD;&#xA;&#xD;&#xA;&gt;Denied request: HTTP header: `host` value: `65.109.4.218:9944` verification failed&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39879" PostHistoryTypeId="1" PostId="10046" RevisionGUID="2120ba86-d310-4b13-9dad-a85b3b96f2ba" CreationDate="2023-09-27T09:04:06.493" UserId="2722" Text="Substrate Node Error: Denied request: HTTP header: host value verification failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="39880" PostHistoryTypeId="3" PostId="10046" RevisionGUID="2120ba86-d310-4b13-9dad-a85b3b96f2ba" CreationDate="2023-09-27T09:04:06.493" UserId="2722" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39881" PostHistoryTypeId="2" PostId="10047" RevisionGUID="496f99cb-da8a-4dfd-8dae-685d39fd5364" CreationDate="2023-09-27T10:11:01.500" UserId="276" Text="Because it can be quitte cumbersome to compose complex params of certain storage functions, I generated composition examples for well-known runtimes (also for calls): https://polkascan.github.io/py-substrate-metadata-docs&#xD;&#xA;&#xD;&#xA;In this specific case you can have a look at: https://polkascan.github.io/py-substrate-metadata-docs/acala/tokens/#accounts&#xD;&#xA;&#xD;&#xA;Because you want to query a mapped storage function, you can omit params from right to left to get all results:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;result = substrate.query_map('Tokens', 'Accounts', ['24YtbsBQ2CG9e6MeF71aownnpHaU3y4VugVj7HzEmSacbofK'], max_results=10)&#xD;&#xA;&#xD;&#xA;for token, account_info in result:&#xD;&#xA;    print(f'{token.value}: {account_info.value}')&#xD;&#xA;    # {'LiquidCrowdloan': 13}: {'free': 120800000000, 'reserved': 0, 'frozen': 0}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It is also possible to query multiple dimensions:&#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;result = substrate.query_map('Tokens', 'Accounts', max_results=10)&#xD;&#xA;&#xD;&#xA;for (account, token), account_info in result:&#xD;&#xA;    print(f'{account.value}: {token.value}: {account_info.value}')&#xD;&#xA;    # 24YtbsBQ2CG9e6MeF71aownnpHaU3y4VugVj7HzEmSacbofK: {'LiquidCrowdloan': 13}: {'free': 120800000000, 'reserved': 0, 'frozen': 0}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note the `max_results`, as this can result in many records.&#xD;&#xA;&#xD;&#xA;**Edit**: However, because of the way the storage key is composed in Substrate, it is only possible to omit certain params in a strict order. So it is not possible to query a certain token without specifying the account first. " ContentLicense="CC BY-SA 4.0" />
  <row Id="39883" PostHistoryTypeId="2" PostId="10048" RevisionGUID="21435eb0-047e-4325-81b4-d6cf25cb4c23" CreationDate="2023-09-27T10:30:40.553" UserId="276" Text="There is kwarg you can pass to the `decode()` function, so it won't check the remaining bytes: `decode(check_remaining=False)`.&#xD;&#xA;&#xD;&#xA;I don't have much context of your use-case, but I assume you have added a custom type definition `Timestamp` to the type registry? Because by default there is no type with that name. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39887" PostHistoryTypeId="2" PostId="10050" RevisionGUID="2f625d10-3a66-4428-bf92-6bf5637ec975" CreationDate="2023-09-27T11:26:26.810" UserId="3317" Text="If I understand correctly: `create` creates a poll that will end at block X, presenting a poll whether or not to enact a call. `Enactment` will execute the call included in the poll (if it is accepted) at block X.&#xD;&#xA;&#xD;&#xA;Weight for a call needs to be included when the call is actually executed. As for a scheduled call this is done at [`on_initialize`][1].&#xD;&#xA;&#xD;&#xA;Like Oliver said, the caller of a scheduled call doesn't have to pay in advance for the execution. However the weight **is** measured when the call is executed (otherwise this opens up possible attacks).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/7cbe0c76ef8fd2aabf9f07de0156941ce3ed44b0/substrate/frame/scheduler/src/lib.rs#L320-L324" ContentLicense="CC BY-SA 4.0" />
  <row Id="39889" PostHistoryTypeId="2" PostId="10051" RevisionGUID="27f7d785-7c59-44f9-8837-c6bbe418046b" CreationDate="2023-09-27T15:14:10.473" UserId="698" Text="I got some help from @Turboflakes the developer behind CrunchBot.  He referred me to an article and supported with some code to help 'decode' the Storage key.&#xD;&#xA;&#xD;&#xA;https://www.shawntabrizi.com/substrate/transparent-keys-in-substrate/&#xD;&#xA;&#xD;&#xA;Within the while loop I use:&#xD;&#xA;&#xD;&#xA;`get_ref_id_from_storage_key(key.0.to_vec())`&#xD;&#xA;&#xD;&#xA;The function's details are:&#xD;&#xA;```&#xD;&#xA;pub fn get_ref_id_from_storage_key(key: Vec&lt;u8&gt;) -&gt; u32 {&#xD;&#xA;    let s = &amp;key[key.len() - 4..];&#xD;&#xA;    let v: [u8; 4] = s.try_into().expect(&quot;slice with incorrect length&quot;);&#xD;&#xA;    u32::from_le_bytes(v)&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39891" PostHistoryTypeId="2" PostId="10052" RevisionGUID="1e1d7b5f-3371-48c9-8af3-50df12d8209c" CreationDate="2023-09-27T15:28:57.660" UserId="3070" Text="No types for blockchain query responses are available in our IDE.&#xD;&#xA;Doing any query like this&#xD;&#xA;```&#xD;&#xA;await blockchain.api.query.assets.asset(id, (res) =&gt; {&#xD;&#xA;    const info = res.toJSON()&#xD;&#xA;    console.log(&quot;asset info&quot;, info)&#xD;&#xA;})&#xD;&#xA;```&#xD;&#xA;the res variable is undefined. &#xD;&#xA;&#xD;&#xA;i have my types available and can see api.query.assets and all the available functions like .asset but there are no return types. &#xD;&#xA;We have to manually type them like&#xD;&#xA;```&#xD;&#xA;const info:PalletAssetsAssetDetails = res.toJSON()&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39893" PostHistoryTypeId="1" PostId="10052" RevisionGUID="1e1d7b5f-3371-48c9-8af3-50df12d8209c" CreationDate="2023-09-27T15:28:57.660" UserId="3070" Text="Polkadot JS query response types are missing" ContentLicense="CC BY-SA 4.0" />
  <row Id="39894" PostHistoryTypeId="3" PostId="10052" RevisionGUID="1e1d7b5f-3371-48c9-8af3-50df12d8209c" CreationDate="2023-09-27T15:28:57.660" UserId="3070" Text="|polkadot-js|substrate-node-template|substrate-node|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39900" PostHistoryTypeId="2" PostId="10054" RevisionGUID="d0783565-11e0-4caf-aa76-4607a1757c57" CreationDate="2023-09-27T16:42:32.350" UserId="2762" Text="Use `toHuman()` instead of to toJSON():&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import type { AssetDetails } from '@polkadot/types/interfaces';&#xD;&#xA;&#xD;&#xA;api.query.assets.asset(id, (res: any) =&gt; {&#xD;&#xA;     const asset: AssetDetails = res.toHuman();&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="39902" PostHistoryTypeId="50" PostId="9736" RevisionGUID="f065eaa7-feed-4530-8243-ca4929ca1278" CreationDate="2023-09-27T17:03:45.467" UserId="-1" />
  <row Id="39904" PostHistoryTypeId="2" PostId="10055" RevisionGUID="1a5af337-4623-4ef9-b834-548a29480a54" CreationDate="2023-09-27T17:23:52.253" UserId="1811" Text="Following this example for ink! smart contracts &#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/ink-examples/blob/main/trait-dyn-cross-contract-calls/lib.rs&#xD;&#xA;&#xD;&#xA;we have &#xD;&#xA;&#xD;&#xA;    incrementer: ink::contract_ref!(Increment),&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;and by entering the relevant AccountId that the contract is deployed at here&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(incrementer: AccountId) -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                incrementer: incrementer.into(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;we get a reference to the contract&#xD;&#xA;&#xD;&#xA;Question: How can we retrieve the AccountId having the incrementer contract reference&#xD;&#xA;&#xD;&#xA;Note: I understand that I can create another storage variable of type AccountId and store this in the constructor like &#xD;&#xA; &#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(incrementer: AccountId) -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                incrementer: incrementer.into(),&#xD;&#xA;                incrementer_address: incrementer,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;but I am wondering if I can avoid the extra storage of such variable incrementer_address and instead derive the AccountId of the incrementer: ink::contract_ref!(Increment) inside a function&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="39906" PostHistoryTypeId="1" PostId="10055" RevisionGUID="1a5af337-4623-4ef9-b834-548a29480a54" CreationDate="2023-09-27T17:23:52.253" UserId="1811" Text="Retrieving AccountId from contract_ref" ContentLicense="CC BY-SA 4.0" />
  <row Id="39907" PostHistoryTypeId="3" PostId="10055" RevisionGUID="1a5af337-4623-4ef9-b834-548a29480a54" CreationDate="2023-09-27T17:23:52.253" UserId="1811" Text="|ink|contract-references-approach|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39908" PostHistoryTypeId="2" PostId="10056" RevisionGUID="a8e9ad26-d8d6-4a63-8e18-430b0c400c02" CreationDate="2023-09-27T18:03:20.723" UserId="244" Text="After a heavy load test with thousands of transactions from a fixed set of accounts (maybe relevant due to [this question][1]), the ready pool of some nodes never empties, and for this reason many transactions get lost.&#xD;&#xA;&#xD;&#xA;It's a Frontier based PoA chain currently with 1 validator for Aura/Grandpa and the others are full nodes.&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;The test sends thousands of ERC-20 transfers via WebSocket and listens to their events in one of the nodes&#xD;&#xA;&#xD;&#xA;In the logs of one of the nodes I can see that the ready queue ahs the 2812 txs:&#xD;&#xA;```&#xD;&#xA;2023-09-27 17:53:35.070 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 132 ms. Status: PoolStatus { ready: 2812, ready_bytes: 940124, future: 818, future_bytes: 295298 }&#xD;&#xA;```&#xD;&#xA;The only way to clear the queue seems to be restarting the nodes.&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2316/high-transaction-throughput-single-acccount/2341&#xD;&#xA;  [2]: https://i.stack.imgur.com/LSqdr.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39910" PostHistoryTypeId="1" PostId="10056" RevisionGUID="a8e9ad26-d8d6-4a63-8e18-430b0c400c02" CreationDate="2023-09-27T18:03:20.723" UserId="244" Text="Ready transaction queue never empties after heavy load" ContentLicense="CC BY-SA 4.0" />
  <row Id="39911" PostHistoryTypeId="3" PostId="10056" RevisionGUID="a8e9ad26-d8d6-4a63-8e18-430b0c400c02" CreationDate="2023-09-27T18:03:20.723" UserId="244" Text="|transaction-pool|mempool|tx-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39912" PostHistoryTypeId="5" PostId="10056" RevisionGUID="e1c92086-c46c-4f4d-8f5e-5d2925e31d91" CreationDate="2023-09-27T18:20:20.960" UserId="244" Comment="added 99 characters in body" Text="After a heavy load test with thousands of transactions from a fixed set of accounts (maybe relevant due to [this question][1]), the ready pool of some nodes never empties, and for this reason many transactions get lost.&#xD;&#xA;&#xD;&#xA;It's a Frontier based PoA chain currently with 1 validator for Aura/Grandpa and the others are full nodes.&#xD;&#xA;- Block slot: 1s&#xD;&#xA;- BlockWeights: ~500ms&#xD;&#xA;- BlockGasLimit: 10M&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;The test sends thousands of ERC-20 transfers via WebSocket and listens to their events in one of the nodes&#xD;&#xA;&#xD;&#xA;In the logs of one of the nodes I can see that the ready queue ahs the 2812 txs:&#xD;&#xA;```&#xD;&#xA;2023-09-27 17:53:35.070 DEBUG tokio-runtime-worker txpool: Resubmitted. Took 132 ms. Status: PoolStatus { ready: 2812, ready_bytes: 940124, future: 818, future_bytes: 295298 }&#xD;&#xA;```&#xD;&#xA;The only way to clear the queue seems to be restarting the nodes.&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/2316/high-transaction-throughput-single-acccount/2341&#xD;&#xA;  [2]: https://i.stack.imgur.com/LSqdr.png&#xD;&#xA;&#xD;&#xA;edit: more info about the chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="39913" PostHistoryTypeId="2" PostId="10057" RevisionGUID="37019863-bab3-472a-aee3-7c085b6d3c4c" CreationDate="2023-09-28T02:19:07.117" UserId="251" Text="I think this is cause by the `rpc-cors` rule.&#xD;&#xA;&#xD;&#xA;Try `--rpc-cors all`." ContentLicense="CC BY-SA 4.0" />
  <row Id="39915" PostHistoryTypeId="2" PostId="10058" RevisionGUID="337e754b-ad24-4836-ab66-1389acdacb03" CreationDate="2023-09-28T04:22:01.480" UserId="251" Text="This is a common issue in Unix CLI I think.&#xD;&#xA;&#xD;&#xA;Use `\*` or `'*'`." ContentLicense="CC BY-SA 4.0" />
  <row Id="39917" PostHistoryTypeId="50" PostId="4851" RevisionGUID="8401fd45-f51a-4fa8-9901-484e83249aa5" CreationDate="2023-09-28T05:03:00.390" UserId="-1" />
  <row Id="39918" PostHistoryTypeId="2" PostId="10059" RevisionGUID="3c68ddb5-079e-41f9-aad3-6d6d48647bcf" CreationDate="2023-09-28T05:53:07.150" UserId="139" Text="https://github.com/paritytech/polkadot-sdk/blob/769bdd3ff33a291cbc70a800a3830638467e42a2/cumulus/pallets/parachain-system/src/consensus_hook.rs#L61&#xD;&#xA;&gt;The definition of a [`ConsensusHook`] trait for consensus logic to manage the backlog&#xD;&#xA; of parachain blocks ready to submit to the relay chain, as well as some basic implementations.&#xD;&#xA;&#xD;&#xA;We see this new trait appear on `cumulus-pallet-parachain-system` under feature `&quot;parameterized-consensus-hook&quot;` and I am looking for an ELI5 explanation. More specifically, an explainer of `segments` that's quoted in the code comments.&#xD;&#xA;&#xD;&#xA;How do I determine to add this new code (`ConsensusHook`) to my parachain `cumulus-pallet-parachain-system::Config`? " ContentLicense="CC BY-SA 4.0" />
  <row Id="39920" PostHistoryTypeId="1" PostId="10059" RevisionGUID="3c68ddb5-079e-41f9-aad3-6d6d48647bcf" CreationDate="2023-09-28T05:53:07.150" UserId="139" Text="What is a ConsensusHook?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39921" PostHistoryTypeId="3" PostId="10059" RevisionGUID="3c68ddb5-079e-41f9-aad3-6d6d48647bcf" CreationDate="2023-09-28T05:53:07.150" UserId="139" Text="|parachain|parachain-system|async-backing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39922" PostHistoryTypeId="2" PostId="10060" RevisionGUID="b30acbd6-55c1-4ff6-942d-f7c8a9c1d7e1" CreationDate="2023-09-28T07:57:42.627" UserId="172" Text="I am aware of this [`sc_consensus_pow`](https://paritytech.github.io/polkadot-sdk/master/sc_consensus_pow/index.html#) crate but I am wondering if anyone can point to some up to date implementations of it." ContentLicense="CC BY-SA 4.0" />
  <row Id="39924" PostHistoryTypeId="1" PostId="10060" RevisionGUID="b30acbd6-55c1-4ff6-942d-f7c8a9c1d7e1" CreationDate="2023-09-28T07:57:42.627" UserId="172" Text="Is there an example of a Proof of Work Substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39925" PostHistoryTypeId="3" PostId="10060" RevisionGUID="b30acbd6-55c1-4ff6-942d-f7c8a9c1d7e1" CreationDate="2023-09-28T07:57:42.627" UserId="172" Text="|consensus|proof-of-work|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39926" PostHistoryTypeId="2" PostId="10061" RevisionGUID="c7cf754c-9736-4201-8f4e-7de38d824a01" CreationDate="2023-09-28T08:13:46.317" UserId="85" Text="Today I learned there is a `force-debug` feature on crate `sp-debug-derive`, so if you add a dependency to that and enable that feature then you might well be able to see what you want to see.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/769bdd3ff33a291cbc70a800a3830638467e42a2/substrate/primitives/debug-derive/Cargo.toml#L31" ContentLicense="CC BY-SA 4.0" />
  <row Id="39928" PostHistoryTypeId="2" PostId="10062" RevisionGUID="53f4fdcb-55d9-405e-b03d-3ce97cc7facb" CreationDate="2023-09-28T09:08:58.337" UserId="251" Text="Kulupu is a Proof-of-Work blockchain based on the Substrate framework.&#xD;&#xA;&#xD;&#xA;You can find more information about Kulupu at: https://github.com/kulupu/kulupu" ContentLicense="CC BY-SA 4.0" />
  <row Id="39930" PostHistoryTypeId="2" PostId="10063" RevisionGUID="f960e820-53be-4bdd-8895-ddca10c51904" CreationDate="2023-09-28T12:43:00.180" UserId="4068" Text="I am working on an Ink! smart contract in Rust, and I've encountered an error that I'm having trouble resolving. I followed a solution from a source [provide link here if applicable], but the problem persists.&#xD;&#xA;&#xD;&#xA;Here's a simplified version of my code:&#xD;&#xA;&#xD;&#xA;#[ink(path = &quot;event.rs&quot;)]&#xD;&#xA;mod event;&#xD;&#xA;&#xD;&#xA;When I compile this code, I receive the following error message:&#xD;&#xA;&#xD;&#xA;    error: encountered unknown ink! attribute argument: path&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I've tried searching for information and solutions online, but I haven't been able to find a clear answer. Can someone please help me understand what this error means and how I can resolve it?&#xD;&#xA;&#xD;&#xA;I'm using Rust version 1.72 and Ink! version 4.0 , and any guidance or insights would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;I was using example code from this link - [Support multi-file ink! projects][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/issues/259" ContentLicense="CC BY-SA 4.0" />
  <row Id="39932" PostHistoryTypeId="1" PostId="10063" RevisionGUID="f960e820-53be-4bdd-8895-ddca10c51904" CreationDate="2023-09-28T12:43:00.180" UserId="4068" Text="Encountering Error &quot;Encountered Unknown Ink! attribute argument: path&quot; in Ink! Smart Contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="39933" PostHistoryTypeId="3" PostId="10063" RevisionGUID="f960e820-53be-4bdd-8895-ddca10c51904" CreationDate="2023-09-28T12:43:00.180" UserId="4068" Text="|ink|smart-contract|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39934" PostHistoryTypeId="2" PostId="10064" RevisionGUID="80817f36-1228-47f4-b661-70a3ecac99e2" CreationDate="2023-09-28T13:11:10.970" UserId="543" Text="You can get the account id of the contract ref by calling `to_account_id()` on the contract ref: https://docs.rs/ink/latest/ink/trait.ToAccountId.html&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    let contract_ref =&#xD;&#xA;        MyContractRef::new(&lt;params&gt;)&#xD;&#xA;            .endowment(0)&#xD;&#xA;            .code_hash(...)&#xD;&#xA;            .salt_bytes(...)&#xD;&#xA;            .instantiate();&#xD;&#xA;    let account_id = contract_ref.to_account_id();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Later on you can recover the ContractRef with&#xD;&#xA;&#xD;&#xA;    let contract_ref: MyContractRef =&#xD;&#xA;        ink::env::call::FromAccountId::from_account_id(my_contract_acct_id.clone());" ContentLicense="CC BY-SA 4.0" />
  <row Id="39936" PostHistoryTypeId="2" PostId="10065" RevisionGUID="15545df0-505b-404c-94dd-b39d749c7705" CreationDate="2023-09-28T13:11:51.017" UserId="3317" Text="The cause for the error could also be because you are funding the wrong sovereign account of the sending parachain. I used [this][1] tool to convert the `ParaId to Address`, yet I forgot to switch the `child` toggle to `sibling`. &#xD;&#xA;&#xD;&#xA;I didn't know but the sovereign account (address) of a parachain is different on the relay chain (`child`) then on a parachain (`sibling`).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate-js-utilities/" ContentLicense="CC BY-SA 4.0" />
  <row Id="39938" PostHistoryTypeId="5" PostId="10054" RevisionGUID="1752baa1-1e3b-421d-b4bb-6925ddadf414" CreationDate="2023-09-28T13:13:42.133" UserId="2762" Comment="Improve solution" Text="What you are missing is to apply augmentation, for that you have to import '@polkadot/api-augment' into your codebase entry point before any imports from the API itself:&#xD;&#xA;```js&#xD;&#xA;import &quot;@polkadot/api-augment&quot;; &#xD;&#xA;```&#xD;&#xA;See the docs from PolkadotJS: [Since upgrading to the 7.x series, TypeScript augmentation is missing][1].&#xD;&#xA;&#xD;&#xA;Now you will see that res has a type: `Option&lt;PalletAssetsAssetDetails&gt;` (An Option&lt;Type&gt; attempts to mimic the Rust approach of having None and Some available), you can get your values like that:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;&#xD;&#xA;api.query.assets.asset(id, (res: any) =&gt; {&#xD;&#xA;      const asset = res.unwrap();&#xD;&#xA;      console.log(asset.owner.toString());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/FAQ/#since-upgrading-to-the-7x-series-typescript-augmentation-is-missing" ContentLicense="CC BY-SA 4.0" />
  <row Id="39939" PostHistoryTypeId="5" PostId="10065" RevisionGUID="2d79eb36-8143-4959-a212-df563a64a030" CreationDate="2023-09-28T15:08:14.250" UserId="3317" Comment="deleted 4 characters in body" Text="The cause for the error could also be because you are funding the wrong sovereign account of the sending parachain. I used [this][1] tool to convert the `ParaId to Address`, yet I forgot to switch the `child` toggle to `sibling`. &#xD;&#xA;&#xD;&#xA;I didn't know the sovereign account (address) of a parachain is different on the relay chain (`child`) then on a parachain (`sibling`).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate-js-utilities/" ContentLicense="CC BY-SA 4.0" />
  <row Id="39944" PostHistoryTypeId="2" PostId="10067" RevisionGUID="38cc5360-564c-46b7-a07d-064a41e04f69" CreationDate="2023-09-28T17:34:56.773" UserId="4709" Text="&#xD;&#xA;&#xD;&#xA;I've successfully added custom accounts following this stack  https://substrate.stackexchange.com/questions/8775/adding-an-account/8777#8777  but I need to set custom initial authorities for these accounts. I want certain users to have specific access rights right from the beginning.&#xD;&#xA;&#xD;&#xA;Could someone please provide guidance on how I can achieve this in the Substarte node template Whether it involves tweaking configuration files, writing code, or using a specific library, any help or code examples would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="39946" PostHistoryTypeId="1" PostId="10067" RevisionGUID="38cc5360-564c-46b7-a07d-064a41e04f69" CreationDate="2023-09-28T17:34:56.773" UserId="4709" Text="How to Add custom initial authorities" ContentLicense="CC BY-SA 4.0" />
  <row Id="39947" PostHistoryTypeId="3" PostId="10067" RevisionGUID="38cc5360-564c-46b7-a07d-064a41e04f69" CreationDate="2023-09-28T17:34:56.773" UserId="4709" Text="|substrate-node-template|polkadot|substrate-parachain-template|substrate-node|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39948" PostHistoryTypeId="2" PostId="10068" RevisionGUID="c45a893e-0d24-4771-b860-46095cb91191" CreationDate="2023-09-28T17:47:49.853" UserId="2844" Text="I am trying to Simulate parachains in a test network and following this [tutorial](https://docs.substrate.io/test/simulate-parachains/) but I am getting this error. Someone please advice what I am doing wrong?&#xD;&#xA;&#xD;&#xA;    Error:  	 Error: Command failed with exit code 1: bash -c ./binaries/parachain-template-node-v1.0.0 export-genesis-state --chain /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-bcd6ef486af74db41e50399bd8c2ffb9_-81107-rmK1Gdgr2D7g/1001-rococo-local.json &gt; /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-bcd6ef486af74db41e50399bd8c2ffb9_-81107-rmK1Gdgr2D7g/cfg/genesis-state-1001 &amp;&amp; ./binaries/parachain-template-node-v1.0.0 export-genesis-wasm --chain /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-bcd6ef486af74db41e50399bd8c2ffb9_-81107-rmK1Gdgr2D7g/1001-rococo-local.json &gt; /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-bcd6ef486af74db41e50399bd8c2ffb9_-81107-rmK1Gdgr2D7g/cfg/genesis-wasm-1001&#xD;&#xA;    Error: Service(Client(Backend(&quot;IO error: While lock file: /Users/ganesholi/Library/Application Support/parachain-template-node-v1.0.0/chains/dev_local_testnet/db/full/LOCK: Resource temporarily unavailable&quot;)))&#xD;&#xA;    &#xD;&#xA;    undefined&#xD;&#xA;    ┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;    │ Node'              │ /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-bcd6ef486af74db41e50399bd8c2ffb9_-81107-r… │&#xD;&#xA;    │ s logs:            │                                                                                                    │&#xD;&#xA;    │ m                  │                                                                                                    │&#xD;&#xA;    └────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;    &#xD;&#xA;     Error:  	 Error: Command failed with exit code 1: bash -c kill -9 &#xD;&#xA;    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]&#xD;&#xA;    &#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav % &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I am using &#xD;&#xA;&#xD;&#xA;    zombienet-macos version&#xD;&#xA;    1.3.68&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air polkadot-sdk % git branch&#xD;&#xA;      master&#xD;&#xA;    * release-polkadot-v1.1.0&#xD;&#xA;&#xD;&#xA;    [parachain-template](https://github.com/XcavateBlockchain/xcav-parachain)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/s0htl.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39950" PostHistoryTypeId="1" PostId="10068" RevisionGUID="c45a893e-0d24-4771-b860-46095cb91191" CreationDate="2023-09-28T17:47:49.853" UserId="2844" Text="Error on Simulate parachains in a test network" ContentLicense="CC BY-SA 4.0" />
  <row Id="39951" PostHistoryTypeId="3" PostId="10068" RevisionGUID="c45a893e-0d24-4771-b860-46095cb91191" CreationDate="2023-09-28T17:47:49.853" UserId="2844" Text="|substrate-parachain-template|rococo-local|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39954" PostHistoryTypeId="2" PostId="10070" RevisionGUID="656b8cb0-7ab7-4a36-9eb3-1206a51d38f3" CreationDate="2023-09-28T23:37:12.027" UserId="181" Text="In the Substrate repo, it was common to update to polkadot release-branches to version the Substrate crates. Will this still be the case for chains based on the monorepo version of Substrate? Will there be an option for following versions of Substrate crates themselves?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39956" PostHistoryTypeId="1" PostId="10070" RevisionGUID="656b8cb0-7ab7-4a36-9eb3-1206a51d38f3" CreationDate="2023-09-28T23:37:12.027" UserId="181" Text="What is the new process to follow Substrate releases for the polkadot-sdk monrepo" ContentLicense="CC BY-SA 4.0" />
  <row Id="39957" PostHistoryTypeId="3" PostId="10070" RevisionGUID="656b8cb0-7ab7-4a36-9eb3-1206a51d38f3" CreationDate="2023-09-28T23:37:12.027" UserId="181" Text="|upgrade|versioning|releases|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39958" PostHistoryTypeId="5" PostId="10068" RevisionGUID="e823958d-70d0-4e3f-80c8-4ab4f16d5414" CreationDate="2023-09-29T02:13:05.927" UserId="2844" Comment="added 29 characters in body" Text="I am trying to Simulate parachains in a test network and following this [tutorial](https://docs.substrate.io/test/simulate-parachains/) but I am getting this error. Someone please advice what I am doing wrong?&#xD;&#xA;&#xD;&#xA;    Error:  	 Error: Command failed with exit code 1: bash -c ./binaries/parachain-template-node-v1.0.0 export-genesis-state --chain /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-bcd6ef486af74db41e50399bd8c2ffb9_-81107-rmK1Gdgr2D7g/1001-rococo-local.json &gt; /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-bcd6ef486af74db41e50399bd8c2ffb9_-81107-rmK1Gdgr2D7g/cfg/genesis-state-1001 &amp;&amp; ./binaries/parachain-template-node-v1.0.0 export-genesis-wasm --chain /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-bcd6ef486af74db41e50399bd8c2ffb9_-81107-rmK1Gdgr2D7g/1001-rococo-local.json &gt; /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-bcd6ef486af74db41e50399bd8c2ffb9_-81107-rmK1Gdgr2D7g/cfg/genesis-wasm-1001&#xD;&#xA;    Error: Service(Client(Backend(&quot;IO error: While lock file: /Users/ganesholi/Library/Application Support/parachain-template-node-v1.0.0/chains/dev_local_testnet/db/full/LOCK: Resource temporarily unavailable&quot;)))&#xD;&#xA;    &#xD;&#xA;    undefined&#xD;&#xA;    ┌────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐&#xD;&#xA;    │ Node'              │ /var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/zombie-bcd6ef486af74db41e50399bd8c2ffb9_-81107-r… │&#xD;&#xA;    │ s logs:            │                                                                                                    │&#xD;&#xA;    │ m                  │                                                                                                    │&#xD;&#xA;    └────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘&#xD;&#xA;    &#xD;&#xA;     Error:  	 Error: Command failed with exit code 1: bash -c kill -9 &#xD;&#xA;    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]&#xD;&#xA;    &#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav % &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I am using &#xD;&#xA;&#xD;&#xA;    zombienet-macos version&#xD;&#xA;    1.3.68&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air polkadot-sdk % git branch&#xD;&#xA;      master&#xD;&#xA;    * release-polkadot-v1.1.0&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[github link of parachain template][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/s0htl.png&#xD;&#xA;  [2]: https://github.com/XcavateBlockchain/xcav-parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="39959" PostHistoryTypeId="5" PostId="10067" RevisionGUID="805f342e-b974-4137-a1d7-498c9be35763" CreationDate="2023-09-29T05:16:32.273" UserId="2985" Comment="Corrected sentences" Text="&#xD;&#xA;&#xD;&#xA;I've successfully added custom accounts in the Sudo account and pre-funded accounts following this stack  https://substrate.stackexchange.com/questions/8775/adding-an-account/8777#8777  but I also wanted to set custom accounts as initial PoA authorities.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Thank you in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CeKJN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39960" PostHistoryTypeId="4" PostId="10067" RevisionGUID="805f342e-b974-4137-a1d7-498c9be35763" CreationDate="2023-09-29T05:16:32.273" UserId="2985" Comment="Corrected sentences" Text="How to add custom account as initial authorities in chain_spec.rs file" ContentLicense="CC BY-SA 4.0" />
  <row Id="39961" PostHistoryTypeId="6" PostId="10067" RevisionGUID="805f342e-b974-4137-a1d7-498c9be35763" CreationDate="2023-09-29T05:16:32.273" UserId="2985" Comment="Corrected sentences" Text="|substrate-node-template|polkadot|substrate-node|account|polkadot-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39962" PostHistoryTypeId="24" PostId="10067" RevisionGUID="805f342e-b974-4137-a1d7-498c9be35763" CreationDate="2023-09-29T05:16:32.273" Comment="Proposed by 2985 approved by 4709 edit id of 588" ContentLicense="CC BY-SA 4.0" />
  <row Id="39963" PostHistoryTypeId="2" PostId="10071" RevisionGUID="c6a36d15-9820-41eb-8deb-9c820e5fcf5c" CreationDate="2023-09-29T05:30:53.540" UserId="354" Text="You can follow this tutorial [https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/][1] to set initial authorities in the system.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/" ContentLicense="CC BY-SA 4.0" />
  <row Id="39965" PostHistoryTypeId="2" PostId="10072" RevisionGUID="189f3a5f-1a55-4151-8474-2f3d38280bb9" CreationDate="2023-09-29T07:35:27.340" UserId="2762" Text="This is a known issue you can follow here: [Error: Race when use multiple parachains in native (default concurrency)][1].&#xD;&#xA;&#xD;&#xA;Until is fixed you can use the [workaround][2] suggested by Javier: &#xD;&#xA;&#xD;&#xA;Add the flag `-c 1` when running zombienet:&#xD;&#xA;&#xD;&#xA;    ./zombienet-macos spawn config.toml -p native -c 1&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;The flag  `-c, --spawn-concurrency &lt;concurrency&gt;`, set the number of concurrent spawning process to launch.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/zombienet/issues/1237&#xD;&#xA;  [2]: https://github.com/paritytech/zombienet/issues/1237#issuecomment-1675507189" ContentLicense="CC BY-SA 4.0" />
  <row Id="39967" PostHistoryTypeId="5" PostId="10065" RevisionGUID="519493bf-0f6c-4591-9aa7-17e91ccba12a" CreationDate="2023-09-29T08:13:14.983" UserId="3317" Comment="added 163 characters in body" Text="The cause for the error could also be because you are funding the wrong sovereign account of the sending parachain. I used [this][1] tool to convert the `ParaId to Address`, yet I forgot to switch the `child` toggle to `sibling`. &#xD;&#xA;&#xD;&#xA;I didn't know the sovereign account (address) of a parachain is different on the relay chain (`child`) then on a parachain (`sibling`).&#xD;&#xA;&#xD;&#xA;For more information check out [this answer][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate-js-utilities/&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1200/how-to-calculate-sovereignaccount-for-parachain/1210" ContentLicense="CC BY-SA 4.0" />
  <row Id="39968" PostHistoryTypeId="2" PostId="10073" RevisionGUID="af0b0fb8-c4a3-4f1c-bb20-d79d032e0093" CreationDate="2023-09-29T08:39:17.390" UserId="3317" Text="What is the sovereign account of a relay chain on a parachain? This can be useful for  e.g. funding the account for xcm execution fee payment." ContentLicense="CC BY-SA 4.0" />
  <row Id="39970" PostHistoryTypeId="1" PostId="10073" RevisionGUID="af0b0fb8-c4a3-4f1c-bb20-d79d032e0093" CreationDate="2023-09-29T08:39:17.390" UserId="3317" Text="What is the sovereign account of the relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39971" PostHistoryTypeId="3" PostId="10073" RevisionGUID="af0b0fb8-c4a3-4f1c-bb20-d79d032e0093" CreationDate="2023-09-29T08:39:17.390" UserId="3317" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39972" PostHistoryTypeId="2" PostId="10074" RevisionGUID="3876881d-e7ad-48de-9eb0-207d5be96632" CreationDate="2023-09-29T08:39:17.390" UserId="3317" Text="Referring to Asset Hub's configuration to convert the multi location of the relay chain (`parent: 1, interior: Here`) to a native account id, [`ParentIsPreset`][1] is provided by the `xcm-builder`, the encoding is done via [(ref)][2]: &#xD;&#xA;```&#xD;&#xA;Some(&#xD;&#xA;	b&quot;Parent&quot;&#xD;&#xA;		.using_encoded(|b| AccountId::decode(&amp;mut TrailingZeroInput::new(b)))&#xD;&#xA;		.expect(&quot;infinite length input; no invalid inputs for type; qed&quot;),&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;This is commonly used by parachains as far as I know, but otherwise look for the [`LocationToAccountId`][3] =&gt; something that converts the `MultiLocation` of the relay chain to an `AccountId`.&#xD;&#xA;&#xD;&#xA;Resulting into the AccountId: **5Dt6dpkWPwLaH4BBCKJwjiWrFVAGyYk3tLUabvyn4v7KtESG**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/bf90cb0b73a2d2e0b3e79b2956256831ae79c9f7/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs#L65&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/bf90cb0b73a2d2e0b3e79b2956256831ae79c9f7/polkadot/xcm/xcm-builder/src/location_conversion.rs#L273-L286&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/bf90cb0b73a2d2e0b3e79b2956256831ae79c9f7/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs#L63-L65" ContentLicense="CC BY-SA 4.0" />
  <row Id="39975" PostHistoryTypeId="2" PostId="10075" RevisionGUID="3b33f5ea-45a8-4de3-aab9-12322543a9ee" CreationDate="2023-09-29T11:47:37.463" UserId="4577" Text="When making a transaction we are supposed to see the transaction details under the method section but we only see method data&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Wrong:&#xD;&#xA;[![when making a transaction we are supposed to see the transaction details under the method section][1]][1]&#xD;&#xA;&#xD;&#xA;Correct(you can see the method -&gt; assetConversion..):&#xD;&#xA;[![correct method][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9OptW.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/rzJtn.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="39977" PostHistoryTypeId="1" PostId="10075" RevisionGUID="3b33f5ea-45a8-4de3-aab9-12322543a9ee" CreationDate="2023-09-29T11:47:37.463" UserId="4577" Text="Polkadot.js wallet dosen't show methot section(transaction details) when making a transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="39978" PostHistoryTypeId="3" PostId="10075" RevisionGUID="3b33f5ea-45a8-4de3-aab9-12322543a9ee" CreationDate="2023-09-29T11:47:37.463" UserId="4577" Text="|polkadot-js|polkadot|polkadot-js-extension|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39979" PostHistoryTypeId="2" PostId="10076" RevisionGUID="49d42981-001b-466b-8164-88e753998acf" CreationDate="2023-09-29T13:40:05.737" UserId="4056" Text="For anyone that stumbles upon this now, it has been implemented in `subtx` since posting the question in https://github.com/paritytech/subxt/pull/929.&#xD;&#xA;&#xD;&#xA;Example code:&#xD;&#xA;```rust&#xD;&#xA;use subxt::OnlineClient;&#xD;&#xA;use subxt::PolkadotConfig;&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() {&#xD;&#xA;    let rpc_url = &quot;wss://kusama-rpc.polkadot.io:443/&quot;;&#xD;&#xA;&#xD;&#xA;    let api = OnlineClient::&lt;PolkadotConfig&gt;::from_url(rpc_url)&#xD;&#xA;        .await.unwrap();&#xD;&#xA;    let block = api.blocks().at_latest().await.unwrap();&#xD;&#xA;&#xD;&#xA;    for extrinsic in block.body().await.unwrap().extrinsics().iter() {&#xD;&#xA;        let extrinsic = extrinsic.expect(&quot;error getting extrinsic&quot;);&#xD;&#xA;        println!(&quot;Extrinsic {}::{}&quot;, extrinsic.pallet_name().unwrap(), extrinsic.variant_name().unwrap());&#xD;&#xA;        // Do whatever you want with the extrinsic...&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Tested with `subxt` version `^0.31`." ContentLicense="CC BY-SA 4.0" />
  <row Id="39981" PostHistoryTypeId="2" PostId="10077" RevisionGUID="e315a50f-6238-4639-8743-e4e33d955e8a" CreationDate="2023-09-29T14:51:00.477" UserId="2736" Text="you might be also interested in https://github.com/Polkadot-Blockchain-Academy/Academy-PoW/" ContentLicense="CC BY-SA 4.0" />
  <row Id="39983" PostHistoryTypeId="2" PostId="10078" RevisionGUID="abb75c75-1dd0-4817-a1d8-5d23d0acafc0" CreationDate="2023-09-29T14:57:41.667" UserId="19" Text="I see that most of the pallets are annotated as `#[frame_support::pallet]`, but some of them are `#[frame_support::pallet(dev_mode)]` and my question is what exactly means `dev-mode` in the context of the annotation/pallet? Does it (in any way) help for delivering source code of a pallet?&#xD;&#xA;&#xD;&#xA;To answer that question, I was looking at [the documentation](https://docs.substrate.io/) and was looking at Substrate code per se, but did not found exact answer. Of course, I have some guesses, but only empty guesses." ContentLicense="CC BY-SA 4.0" />
  <row Id="39985" PostHistoryTypeId="1" PostId="10078" RevisionGUID="abb75c75-1dd0-4817-a1d8-5d23d0acafc0" CreationDate="2023-09-29T14:57:41.667" UserId="19" Text="#[frame_support::pallet(dev_mode)] versus #[frame_support::pallet]" ContentLicense="CC BY-SA 4.0" />
  <row Id="39986" PostHistoryTypeId="3" PostId="10078" RevisionGUID="abb75c75-1dd0-4817-a1d8-5d23d0acafc0" CreationDate="2023-09-29T14:57:41.667" UserId="19" Text="|pallet|dev|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39987" PostHistoryTypeId="2" PostId="10079" RevisionGUID="d46468b2-df0b-48cc-8ba6-3dc3b83fafab" CreationDate="2023-09-29T15:04:03.023" UserId="19" Text="Here is the answer to dev mode: https://paritytech.github.io/polkadot-sdk/master/frame_support/attr.pallet.html#dev-mode-palletdev_mode" ContentLicense="CC BY-SA 4.0" />
  <row Id="39989" PostHistoryTypeId="2" PostId="10080" RevisionGUID="408feebc-5f01-4df7-ab52-39a26e8eab22" CreationDate="2023-09-29T15:15:27.307" UserId="2762" Text="Specifying pallet(dev_mode) allows you to place the pallet in *development mode*, you should only see it in pallets that are under development.&#xD;&#xA;&#xD;&#xA;It relaxes a number of constraints, provides defaults for a number of things that are not super relevant when a pallet is under construction (including weights), and disables accidental production compilation of the pallet.&#xD;&#xA;&#xD;&#xA;Bruno made a great explanation in this previous Stackexchange answer: [What is Dev Mode? And how can I use it?][1].&#xD;&#xA;&#xD;&#xA;And here you can see PR where it was introduce: [Add pallet dev mode][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/8010/2762&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/pull/12536" ContentLicense="CC BY-SA 4.0" />
  <row Id="39991" PostHistoryTypeId="2" PostId="10081" RevisionGUID="ede75c80-2f56-431c-80d4-90662a31a2f1" CreationDate="2023-09-29T15:22:14.313" UserId="2762" Text="I don't think the polkadot extension has this feature, you can open an Issue [in the repository][1] to decode the method and display the information in a more user friendly way.&#xD;&#xA;&#xD;&#xA;In the meantime you can decode that value and see what method you are signing using the polkadotJS UI, going to the tab Extrinsic -&gt; Decode and pasting that value ([here][2]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/extension/issues&#xD;&#xA;  [2]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/extrinsics/decode" ContentLicense="CC BY-SA 4.0" />
  <row Id="39993" PostHistoryTypeId="2" PostId="10082" RevisionGUID="91f69f23-f62c-4524-a67e-e996b95b3c87" CreationDate="2023-09-29T15:56:58.900" UserId="637" Text="Okay, I found a way to accomplish this; I need to use a **shared secret key**. &#xD;&#xA;&#xD;&#xA;The **@polkadot/wasm-crypto** library has a method for it. I had to conduct research on encryption to find the appropriate code because &quot;sr25519Agree&quot; didn't mean anything to me as a developer. :)&#xD;&#xA;&#xD;&#xA;    import { waitReady, sr25519Agree } from '@polkadot/wasm-crypto'&#xD;&#xA;    import { sr25519PairFromSeed, naclEncrypt, naclDecrypt, encodeAddress } from '@polkadot/util-crypto'&#xD;&#xA;    import { stringToU8a, u8aToString } from '@polkadot/util'&#xD;&#xA;    &#xD;&#xA;    const SEED_1 = '0x8ed48adf968bfb0d712d1530442187b7a9c5ce528ae079d60c072127d5b0b924'&#xD;&#xA;    const SEED_2 = '0x6152353dac161f116233b73b655ee6246da278df692c5599ce108b5fef5b3a09'&#xD;&#xA;    &#xD;&#xA;    (async () =&gt; {&#xD;&#xA;      await waitReady()&#xD;&#xA;    &#xD;&#xA;      const pair_1 = sr25519PairFromSeed(SEED_1)&#xD;&#xA;      console.log('pair_1', encodeAddress(pair_1.publicKey))&#xD;&#xA;    &#xD;&#xA;      const pair_2 = sr25519PairFromSeed(SEED_2)&#xD;&#xA;      console.log('pair_2', encodeAddress(pair_2.publicKey))&#xD;&#xA;    &#xD;&#xA;      const shared_1 = sr25519Agree(pair_1.publicKey, pair_2.secretKey)&#xD;&#xA;      const shared_2 = sr25519Agree(pair_2.publicKey, pair_1.secretKey)&#xD;&#xA;    &#xD;&#xA;      console.log(&#xD;&#xA;        'shared_1 === shared_2',&#xD;&#xA;        u8aToString(shared_1) === u8aToString(shared_2)&#xD;&#xA;      )&#xD;&#xA;    &#xD;&#xA;      const message = stringToU8a('hello world')&#xD;&#xA;    &#xD;&#xA;      const {encrypted, nonce} = naclEncrypt(message, shared_1)&#xD;&#xA;      const decryptedMessage = naclDecrypt(encrypted, nonce, shared_2)&#xD;&#xA;    &#xD;&#xA;      console.log('decryptedMessage', u8aToString(decryptedMessage))&#xD;&#xA;    })()" ContentLicense="CC BY-SA 4.0" />
  <row Id="39995" PostHistoryTypeId="2" PostId="10083" RevisionGUID="c35bec60-c2d6-41f0-be8f-20213cccc133" CreationDate="2023-09-29T16:45:42.693" UserId="2477" Text="Can a smart contract create and control a proxy account?&#xD;&#xA;If yes, how can I create a proxy account for a contract and how can I send transactions from my contract on behalf of my contract's proxy account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39997" PostHistoryTypeId="1" PostId="10083" RevisionGUID="c35bec60-c2d6-41f0-be8f-20213cccc133" CreationDate="2023-09-29T16:45:42.693" UserId="2477" Text="Can contract create and control a proxy accopunt?" ContentLicense="CC BY-SA 4.0" />
  <row Id="39998" PostHistoryTypeId="3" PostId="10083" RevisionGUID="c35bec60-c2d6-41f0-be8f-20213cccc133" CreationDate="2023-09-29T16:45:42.693" UserId="2477" Text="|ink|smart-contract|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="39999" PostHistoryTypeId="2" PostId="10084" RevisionGUID="5a621cf7-5e5d-4bdf-a463-cd7c88468d2f" CreationDate="2023-09-29T17:39:50.337" UserId="543" Text="I'm running a smoldot node, synced with a hosted bootnode, in a react-based application and attempting to interact with an ink! contract deployed to the network. When attempting to use polkadotjs to query a contract, I receive an error `-32000: Error in call proof: UnusedProofEntry` which is coming from [smoldot, here](https://github.com/ideal-lab5/smoldot/blob/7bb3d7ed199b5eb71e3efdc613847122f85a05a1/lib/src/trie/proof_decode.rs#L320). When using a locally running full node instead of smoldot in my react app, contract queries execute as expected. The query is also successful via the polkadotjs UI through the full node. When I use smoldot, there are unvisited_proof_entries (**only** when querying the contract, transactions work as expected). Any idea why this could be or how to resolve it?&#xD;&#xA;&#xD;&#xA;My setup is like so:&#xD;&#xA;&#xD;&#xA;    let spec = JSON.stringify(chainSpec)&#xD;&#xA;    provider = new ScProvider(Sc, spec)&#xD;&#xA;    await provider.connect()&#xD;&#xA;    // the deployed contract&#xD;&#xA;    const contract = new ContractPromise(api, contractMetadata, CONTRACT_ADDRESS);&#xD;&#xA;&#xD;&#xA;The smoldot node is able to successfully sign and send transactions that call the contract (e.g. `contract.tx.myFunction(...).signAndSend(...)` works as expected, where myFunction's signature contains `&amp;mut self, [params]`), but when I try to query a contract function like:&#xD;&#xA;&#xD;&#xA;     #[ink(message)]&#xD;&#xA;     pub fn get_details(&amp;self, id: u32)-&gt; Option&lt;Details&gt; {&#xD;&#xA;         ...&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;Using:&#xD;&#xA;&#xD;&#xA;    const { gasRequired, storageDeposit, result, output } = await contract.query.getDetails(&#xD;&#xA;          alice.address,&#xD;&#xA;          {&#xD;&#xA;            gasLimit: api?.registry.createType('WeightV2', {&#xD;&#xA;              refTime: MAX_CALL_WEIGHT,&#xD;&#xA;              proofSize: PROOFSIZE,&#xD;&#xA;            }),&#xD;&#xA;            storageDepositLimit,&#xD;&#xA;          },&#xD;&#xA;          id,&#xD;&#xA;        );&#xD;&#xA;&#xD;&#xA;Then I receive the error above." ContentLicense="CC BY-SA 4.0" />
  <row Id="40001" PostHistoryTypeId="1" PostId="10084" RevisionGUID="5a621cf7-5e5d-4bdf-a463-cd7c88468d2f" CreationDate="2023-09-29T17:39:50.337" UserId="543" Text="Smoldot + polkadotjs: UnusedProofEntry when attempting to query a contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="40002" PostHistoryTypeId="3" PostId="10084" RevisionGUID="5a621cf7-5e5d-4bdf-a463-cd7c88468d2f" CreationDate="2023-09-29T17:39:50.337" UserId="543" Text="|polkadot-js|ink|substrate-connect|smoldot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40003" PostHistoryTypeId="2" PostId="10085" RevisionGUID="e8f7bec0-f58f-48fc-850c-f55f22589665" CreationDate="2023-09-29T17:57:44.977" UserId="543" Text="No, smart contracts don't have keys and can't sign messages. They have an account id, but they're not able to act as a signed origin. AFAIK the only easy way you can do that is through a pallet, such as the [proxy pallet](https://docs.rs/pallet-proxy/latest/pallet_proxy/)." ContentLicense="CC BY-SA 4.0" />
  <row Id="40005" PostHistoryTypeId="2" PostId="10086" RevisionGUID="541d1c09-ee46-4add-8870-2ef3bd480c7f" CreationDate="2023-09-29T19:19:20.930" UserId="4277" Text="Hi I am building a solo chain by using the substrate node template but i am stuck here that i wanna change the gas fee to 0 of every transaction that is happening on the chain this chain will be a private chain so there is no issue of security. Can some one tell me that how can i change the gas fee of the chain to zero gas less transactions. I have tried adding the custom fee into weight files but it did not work so can someone help me out to tell me how can i achieve this on a node template of substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="40007" PostHistoryTypeId="1" PostId="10086" RevisionGUID="541d1c09-ee46-4add-8870-2ef3bd480c7f" CreationDate="2023-09-29T19:19:20.930" UserId="4277" Text="Gas less Transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="40008" PostHistoryTypeId="3" PostId="10086" RevisionGUID="541d1c09-ee46-4add-8870-2ef3bd480c7f" CreationDate="2023-09-29T19:19:20.930" UserId="4277" Text="|substrate-node-template|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40009" PostHistoryTypeId="2" PostId="10087" RevisionGUID="67608fa7-d5cf-4e04-ab2f-297f52a3ba8d" CreationDate="2023-09-29T19:39:15.427" UserId="555" Text="I have substrate node template and i want to integrate `orml-currencies`.&#xD;&#xA;&#xD;&#xA;I'm using this in cargo.toml:&#xD;&#xA;&#xD;&#xA;&gt; orml-currencies = { default-features = false, git = &quot;https://github.com/open-web3-stack/open-runtime-module-library.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;Then I'm getting this error: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--&gt; /Users/deepak/.cargo/git/checkouts/open-runtime-module-library-d3634ee624a28945/6819d3f/tokens/src/lib.rs:433:18&#xD;&#xA;      |&#xD;&#xA;  433 |     impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;      |                     ^^^^^^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: consider importing this trait&#xD;&#xA;      |&#xD;&#xA;  179 +     use frame_support::traits::GenesisBuild;&#xD;&#xA;      |&#xD;&#xA;&#xD;&#xA;  error[E0220]: associated type `BlockNumber` not found for `T`&#xD;&#xA;      --&gt; /Users/deepak/.cargo/git/checkouts/open-runtime-module-library-d3634ee624a28945/6819d3f/tokens/src/lib.rs:1277:19&#xD;&#xA;       |&#xD;&#xA;  1277 |     type Moment = T::BlockNumber;&#xD;&#xA;       |                      ^^^^^^^^^^^ there is a similarly named associated type `BlockNumber` in the trait `BlockNumberProvider`&#xD;&#xA;&#xD;&#xA;  error[E0220]: associated type `BlockNumber` not found for `T`&#xD;&#xA;      --&gt; /Users/deepak/.cargo/git/checkouts/open-runtime-module-library-d3634ee624a28945/6819d3f/tokens/src/lib.rs:2403:19&#xD;&#xA;       |&#xD;&#xA;  2403 |     type Moment = T::BlockNumber;&#xD;&#xA;       |                      ^^^^^^^^^^^ there is a similarly named associated type `BlockNumber` in the trait `BlockNumberProvider`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to solve this issue?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40011" PostHistoryTypeId="1" PostId="10087" RevisionGUID="67608fa7-d5cf-4e04-ab2f-297f52a3ba8d" CreationDate="2023-09-29T19:39:15.427" UserId="555" Text="How to solve this error: associated type `BlockNumber` not found for `T`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40012" PostHistoryTypeId="3" PostId="10087" RevisionGUID="67608fa7-d5cf-4e04-ab2f-297f52a3ba8d" CreationDate="2023-09-29T19:39:15.427" UserId="555" Text="|substrate-node-template|error|blocknumber|orml-xtokens|generics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40013" PostHistoryTypeId="5" PostId="10087" RevisionGUID="b5e31844-b6a4-4929-a1f6-4ea264fc678f" CreationDate="2023-09-29T19:45:36.983" UserId="555" Comment="added 10 characters in body; edited tags" Text="I have substrate node template with babe and i want to integrate `orml-currencies`.&#xD;&#xA;&#xD;&#xA;I'm using this in cargo.toml:&#xD;&#xA;&#xD;&#xA;&gt; orml-currencies = { default-features = false, git = &quot;https://github.com/open-web3-stack/open-runtime-module-library.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;Then I'm getting this error: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;--&gt; /Users/deepak/.cargo/git/checkouts/open-runtime-module-library-d3634ee624a28945/6819d3f/tokens/src/lib.rs:433:18&#xD;&#xA;      |&#xD;&#xA;  433 |     impl&lt;T: Config&gt; GenesisBuild&lt;T&gt; for GenesisConfig&lt;T&gt; {&#xD;&#xA;      |                     ^^^^^^^^^^^^ not found in this scope&#xD;&#xA;      |&#xD;&#xA;  help: consider importing this trait&#xD;&#xA;      |&#xD;&#xA;  179 +     use frame_support::traits::GenesisBuild;&#xD;&#xA;      |&#xD;&#xA;&#xD;&#xA;  error[E0220]: associated type `BlockNumber` not found for `T`&#xD;&#xA;      --&gt; /Users/deepak/.cargo/git/checkouts/open-runtime-module-library-d3634ee624a28945/6819d3f/tokens/src/lib.rs:1277:19&#xD;&#xA;       |&#xD;&#xA;  1277 |     type Moment = T::BlockNumber;&#xD;&#xA;       |                      ^^^^^^^^^^^ there is a similarly named associated type `BlockNumber` in the trait `BlockNumberProvider`&#xD;&#xA;&#xD;&#xA;  error[E0220]: associated type `BlockNumber` not found for `T`&#xD;&#xA;      --&gt; /Users/deepak/.cargo/git/checkouts/open-runtime-module-library-d3634ee624a28945/6819d3f/tokens/src/lib.rs:2403:19&#xD;&#xA;       |&#xD;&#xA;  2403 |     type Moment = T::BlockNumber;&#xD;&#xA;       |                      ^^^^^^^^^^^ there is a similarly named associated type `BlockNumber` in the trait `BlockNumberProvider`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to solve this issue?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40014" PostHistoryTypeId="6" PostId="10087" RevisionGUID="b5e31844-b6a4-4929-a1f6-4ea264fc678f" CreationDate="2023-09-29T19:45:36.983" UserId="555" Comment="added 10 characters in body; edited tags" Text="|substrate-node-template|pallet|error|babe|orml-xtokens|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40015" PostHistoryTypeId="52" PostId="10078" RevisionGUID="4dcbd270-d141-4068-922e-54dcbed07642" CreationDate="2023-09-29T22:57:42.670" />
  <row Id="40016" PostHistoryTypeId="2" PostId="10088" RevisionGUID="9de93f9e-5c33-4b69-bcf3-b6d3af2fc501" CreationDate="2023-09-30T00:48:53.730" UserId="29" Text="According to the [Polkadot Release Analysis `v1.0.0`](https://forum.polkadot.network/t/polkadot-release-analysis-v1-0-0/3585/4#genesisbuildti-deprecated-buildgenesisconfig-added-2), `GenesisBuild` has been has been deprecated in favor of `BuildGenesisConfig`. Here is an example of how to use:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;#[derive(frame_support::DefaultNoBound)]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;     _config: sp_std::marker::PhantomData&lt;(T,I)&gt;,&#xD;&#xA;    _myfield: u32,&#xD;&#xA;}&#xD;&#xA;    &#xD;&#xA;#[pallet::genesis_build]&#xD;&#xA;impl&lt;T: Config&lt;I&gt;, I: 'static&gt; BuildGenesisConfig for GenesisConfig&lt;T, I&gt; {&#xD;&#xA;    fn build(&amp;self) {}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I believe there was a change with `BlockNumber` as well:&#xD;&#xA; - https://forum.polkadot.network/t/polkadot-release-analysis-v1-0-0/3585/3#moves-block-to-frame_system-instead-of-construct_runtime-and-removes-header-and-blocknumber-1&#xD;&#xA;&#xD;&#xA;I believe you can use `BlockNumberFor&lt;T&gt;` instead of `BlockNumber`.&#xD;&#xA;&#xD;&#xA;You can reference the Cumulus PR for examples:&#xD;&#xA;- https://github.com/paritytech/cumulus/pull/2790/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="40018" PostHistoryTypeId="52" PostId="10087" RevisionGUID="18169625-695d-4fd1-89de-d5a75eb8cbd9" CreationDate="2023-09-30T03:39:18.490" />
  <row Id="40019" PostHistoryTypeId="2" PostId="10089" RevisionGUID="49017918-81f5-45df-a34c-35d9eb8c7849" CreationDate="2023-09-30T08:33:11.500" UserId="427" Text="Substrate has a `substrate-node-template` with Aura consensus which is well maintained and updated time to time. Do we have a same kind of template for NPoS consensus which is well maintained and updated?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40021" PostHistoryTypeId="1" PostId="10089" RevisionGUID="49017918-81f5-45df-a34c-35d9eb8c7849" CreationDate="2023-09-30T08:33:11.500" UserId="427" Text="Maintained Substrate-NPoS-template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40022" PostHistoryTypeId="3" PostId="10089" RevisionGUID="49017918-81f5-45df-a34c-35d9eb8c7849" CreationDate="2023-09-30T08:33:11.500" UserId="427" Text="|substrate-node-template|substrate-node|npos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40023" PostHistoryTypeId="50" PostId="9738" RevisionGUID="f7f70308-99e7-460c-8dcc-1426e8ad3ca4" CreationDate="2023-09-30T11:09:31.257" UserId="-1" />
  <row Id="40024" PostHistoryTypeId="50" PostId="9768" RevisionGUID="9b9cce2e-a46c-4469-af67-b91579bc5f87" CreationDate="2023-09-30T13:07:55.957" UserId="-1" />
  <row Id="40026" PostHistoryTypeId="5" PostId="9956" RevisionGUID="bb0dbdad-1796-42f2-8da5-096a68b9efda" CreationDate="2023-10-01T02:36:52.020" UserId="25" Comment="deleted 10 characters in body" Text="The fundamental reason I asked the question was due to an edge-case I was hitting where inherents didn't have expected contents even though the process of creating data for inherents relied on blocks being imported sequentially.&#xD;&#xA;&#xD;&#xA;Turned out `SimpleSlotWorker` imports blocks directly, so it is possible that something relatively long-running before block import exit can eventually return AFTER new block is imported on top of it.&#xD;&#xA;&#xD;&#xA;Here is a more detailed description of what was happening: https://github.com/subspace/subspace/issues/871#issuecomment-1722745138&#xD;&#xA;&#xD;&#xA;So the answer to original question is both Yes and No. No, technically block is indeed imported *before* next block is created, so it is not possible create an ancestor before tht. But also yes, it is certainly possible to create a block before corresponding outer `BlockImport::import_block` has actually returned, which is typically not an issue, but I was hitting exactly that case." ContentLicense="CC BY-SA 4.0" />
  <row Id="40028" PostHistoryTypeId="2" PostId="10090" RevisionGUID="828612d1-4486-4889-93ad-56b876f4c286" CreationDate="2023-10-01T13:38:59.437" UserId="94" Text="Weight and Fees are two independant concepts in Substrate. It is entirely possible to use one without the other.&#xD;&#xA;&#xD;&#xA;Transaction payments in Substrate are done through a *Signed Extension*; [`ChargeTransactionPayment`](https://crates.parity.io/pallet_transaction_payment/struct.ChargeTransactionPayment.html).  &#xD;&#xA;Here is an example of how it is configured in the Polkadot runtime [here](https://github.com/paritytech/polkadot-sdk/blob/17122815648c65db338a66b9449089f027f85353/polkadot/runtime/kusama/src/lib.rs#L1652):  &#xD;&#xA;```rust&#xD;&#xA;pub type SignedExtra = (&#xD;&#xA;	...&#xD;&#xA;	pallet_transaction_payment::ChargeTransactionPayment&lt;Runtime&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you want to omit transaction fees, the only thing necessary is to remove the signed extension from the runtime. This entails also un-deploying `pallet-transaction-payment`, since its logic is no longer used.&#xD;&#xA;&#xD;&#xA;Note that omitting fee payments will also remove the possibility of prioritizing transactions through a tip." ContentLicense="CC BY-SA 4.0" />
  <row Id="40030" PostHistoryTypeId="2" PostId="10091" RevisionGUID="92a96ce5-64a4-4f33-80d0-cde6b090a956" CreationDate="2023-10-01T16:35:04.080" UserId="4728" Text="You know the controller account is deprecating, and the proxy account function is introduced. I set up a proxy with my validator, but I can't nominate(or other staking functions) if I only have the proxy account auth. Can I use the CLI to solve it? &#xD;&#xA;For example:&#xD;&#xA;I suppose use the ``` polkadot-js-api tx.staking.unbond 1 ``` with a proxy seed. I tried, but failed, can anyone help me?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40032" PostHistoryTypeId="1" PostId="10091" RevisionGUID="92a96ce5-64a4-4f33-80d0-cde6b090a956" CreationDate="2023-10-01T16:35:04.080" UserId="4728" Text="How to use staking proxy signing the proxied stash's unbond action?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40033" PostHistoryTypeId="3" PostId="10091" RevisionGUID="92a96ce5-64a4-4f33-80d0-cde6b090a956" CreationDate="2023-10-01T16:35:04.080" UserId="4728" Text="|polkadot-js|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40034" PostHistoryTypeId="2" PostId="10092" RevisionGUID="2fd21f3e-0009-48f1-8cb9-7a4da29daddd" CreationDate="2023-10-01T19:34:35.463" UserId="417" Text="Getting the error:&#xD;&#xA;&#xD;&#xA;the trait `MaxEncodedLen` is not implemented for `SomeStruct`&#xD;&#xA;&#xD;&#xA;If I add MaxEncodedLen to the #[derive()] list it changes to this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;error[E0599]: no function or associated item named `max_encoded_len` found for struct `frame_support::dispatch::Vec&lt;u8&gt;` in the current scope&#xD;&#xA;    --&gt; /home/aely/substrate-node-template/pallets/template/src/lib.rs:42:9&#xD;&#xA;&#xD;&#xA;How do I store a struct that has a Vec&lt;u8&gt; or is a string in js?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40036" PostHistoryTypeId="1" PostId="10092" RevisionGUID="2fd21f3e-0009-48f1-8cb9-7a4da29daddd" CreationDate="2023-10-01T19:34:35.463" UserId="417" Text="Trying to store StorageMap&lt;_, Twox64Concat, u128, (SomeStruct1, SomeStruct2&lt;SomeType&gt;), ValueQuery&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40037" PostHistoryTypeId="3" PostId="10092" RevisionGUID="2fd21f3e-0009-48f1-8cb9-7a4da29daddd" CreationDate="2023-10-01T19:34:35.463" UserId="417" Text="|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40038" PostHistoryTypeId="2" PostId="10093" RevisionGUID="ef1a2ef5-28dc-4b72-bb18-42403091939f" CreationDate="2023-10-02T00:31:57.957" UserId="3881" Text="i´m writing benchmarks for a pallet that manages sending tokens from assets pallet from one account to other.&#xD;&#xA;&#xD;&#xA;I have written the benchmarks and run it with no problem using the command:&#xD;&#xA;&#xD;&#xA;cargo test -p pallet-name --features untime-benchmarks&#xD;&#xA;&#xD;&#xA;Getting all ok.&#xD;&#xA;&#xD;&#xA;Then I compiled the node and tried to run the benchmarks to generate the weighs file. I´m using substrate V0.9.39.&#xD;&#xA;&#xD;&#xA;I got a DontHavePermission that is defined inside my pallet. that comes from the following line:&#xD;&#xA;&#xD;&#xA;let asset_owner = T::Fungibles::get_owner(token)?;&#xD;&#xA;&#xD;&#xA;ensure!(asset_owner == who, Error::&lt;T&gt;::DontHavePermission);&#xD;&#xA;&#xD;&#xA;It means the account that is trying to do the assets transfer is not the owner.&#xD;&#xA;&#xD;&#xA;But why my tests are leaving this error pass and not the benchmarks when run? How can I fix it?&#xD;&#xA;&#xD;&#xA;The following is my benchmark function:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;transfer_token_from_bank_to_user {&#xD;&#xA;&#xD;&#xA;		let caller: T::AccountId = account(&quot;account&quot;, 0, 0);&#xD;&#xA;&#xD;&#xA;		let _ = T::BenchmarkHelper::create_user(&#xD;&#xA;			caller.clone(),&#xD;&#xA;		);&#xD;&#xA;&#xD;&#xA;		let _ = T::Fungibles::create(ASSET_ID, caller.clone(), true, AssetBalanceOf::&lt;T&gt;::from(1u32).into());&#xD;&#xA;		let _ = T::Fungibles::mint_into(ASSET_ID, &amp;caller, AssetBalanceOf::&lt;T&gt;::from(1000_0_000_000_000u128).into());&#xD;&#xA;		let _ = T::Fungibles::increase_supply(ASSET_ID, AssetBalanceOf::&lt;T&gt;::from(1000_0_000_000_000u128).into());&#xD;&#xA;&#xD;&#xA;		// Transfer from user to bank&#xD;&#xA;		Bank::&lt;T&gt;::transfer_token_from_user_to_bank(&#xD;&#xA;			RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;			ASSET_ID,&#xD;&#xA;			ASSET_ID,&#xD;&#xA;			AssetBalanceOf::&lt;T&gt;::from(100_0_000_000_000u128).into()&#xD;&#xA;		)?;&#xD;&#xA;&#xD;&#xA;	}: _(RawOrigin::Signed(caller.clone()), // origin&#xD;&#xA;		caller.clone(), // destination&#xD;&#xA;		ASSET_ID, // token_bank_id&#xD;&#xA;		ASSET_ID, // token_id&#xD;&#xA;		AssetBalanceOf::&lt;T&gt;::from(10_000u32) // token_amount&#xD;&#xA;	)&#xD;&#xA;&#xD;&#xA;	verify {&#xD;&#xA;		assert_last_event::&lt;T&gt;(Event::TransferFromBankToUser { &#xD;&#xA;			who: caller.clone(),&#xD;&#xA;			destination: caller.clone(),&#xD;&#xA;			token_bank_id: ASSET_ID,&#xD;&#xA;			token_id: ASSET_ID,&#xD;&#xA;			token_amount: AssetBalanceOf::&lt;T&gt;::from(10_000u32).into(), &#xD;&#xA;		}.into());&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40040" PostHistoryTypeId="1" PostId="10093" RevisionGUID="ef1a2ef5-28dc-4b72-bb18-42403091939f" CreationDate="2023-10-02T00:31:57.957" UserId="3881" Text="DontHavePermission Error when trying to run benchmarks on runtime but no in test benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="40041" PostHistoryTypeId="3" PostId="10093" RevisionGUID="ef1a2ef5-28dc-4b72-bb18-42403091939f" CreationDate="2023-10-02T00:31:57.957" UserId="3881" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40042" PostHistoryTypeId="2" PostId="10094" RevisionGUID="6e7a3258-b2e7-464c-84e1-1463c9c80bdf" CreationDate="2023-10-02T06:57:01.043" UserId="4731" Text="In my custom blockchain, i want to offer a feature where i will provide some proposals to my users. The users can vote on to the proposal they find considerate. To accept the proposal, there will be a threshold. If the number of votes for a specific proposal crosses the threshold the proposal will be accepted.   &#xD;&#xA;&#xD;&#xA;Is there any pallet you can suggest me to implement this feature. " ContentLicense="CC BY-SA 4.0" />
  <row Id="40044" PostHistoryTypeId="1" PostId="10094" RevisionGUID="6e7a3258-b2e7-464c-84e1-1463c9c80bdf" CreationDate="2023-10-02T06:57:01.043" UserId="4731" Text="Appropriate Substrate Pallets for voting proposal" ContentLicense="CC BY-SA 4.0" />
  <row Id="40045" PostHistoryTypeId="3" PostId="10094" RevisionGUID="6e7a3258-b2e7-464c-84e1-1463c9c80bdf" CreationDate="2023-10-02T06:57:01.043" UserId="4731" Text="|pallet|pallet-contracts|governance|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40046" PostHistoryTypeId="2" PostId="10095" RevisionGUID="195b537a-9f5a-4251-a84d-ca09e7564814" CreationDate="2023-10-02T07:05:07.697" UserId="4322" Text="For what period of time it's safe for a GRANDPA light-client to trust a specific header without the need for full validation? Is it the same as the unbonding one?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40048" PostHistoryTypeId="1" PostId="10095" RevisionGUID="195b537a-9f5a-4251-a84d-ca09e7564814" CreationDate="2023-10-02T07:05:07.697" UserId="4322" Text="What's the trusting/trusted period of GRANDPA client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40049" PostHistoryTypeId="3" PostId="10095" RevisionGUID="195b537a-9f5a-4251-a84d-ca09e7564814" CreationDate="2023-10-02T07:05:07.697" UserId="4322" Text="|consensus|grandpa|light-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40050" PostHistoryTypeId="2" PostId="10096" RevisionGUID="61e4458c-5b35-4712-9253-dfb1c0b03666" CreationDate="2023-10-02T07:09:46.477" UserId="2722" Text="I am trying to run a Substrate node with a custom chain specification. I used the following command to run the node:&#xD;&#xA;&#xD;&#xA;      ./target/release/substrate \&#xD;&#xA;      --base-path /tmp/pikamo \&#xD;&#xA;      --chain ./customSpecRaw.json \&#xD;&#xA;      --port 30333 \&#xD;&#xA;      --ws-port 9933 \&#xD;&#xA;      --rpc-port 9944 \&#xD;&#xA;      --validator \                                    &#xD;&#xA;      --rpc-methods Unsafe \&#xD;&#xA;      --name Pikamo \&#xD;&#xA;      --password-interactive&#xD;&#xA;&#xD;&#xA;However, I get the following error:&#xD;&#xA;&#xD;&#xA;&gt;Error: Service(Client(VersionInvalid(&quot;Unsupported or invalid BabeApi version&quot;)))&#xD;&#xA;&#xD;&#xA;Here is a snippet of my customSpec.json for the chain:&#xD;&#xA;&#xD;&#xA;       &quot;aura&quot;: {&#xD;&#xA;            &quot;authorities&quot;: [&#xD;&#xA;              &quot;5DZYfSErHB9pPMY5dJB7D3pHDCtE6FBWNg5Au2qZj6KQWncs&quot;,&#xD;&#xA;              &quot;5HiaE728v5216ADKBq9DWiBEDJiCnzQRwCLkzswMcTXHpDKq&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          &quot;grandpa&quot;: {&#xD;&#xA;            &quot;authorities&quot;: [&#xD;&#xA;              [&#xD;&#xA;                &quot;5CQdpn9DbythqGsLqPf1DLsweowLxok9wM83RF8YDHtRMf1j&quot;,&#xD;&#xA;                1&#xD;&#xA;              ],&#xD;&#xA;              [&#xD;&#xA;                &quot;5HmPZgDuuBNyPemJ4hA56Ny75KgXMnVcMpZH5wp7fbapH9Uy&quot;,&#xD;&#xA;                1&#xD;&#xA;              ]&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;&#xD;&#xA;`chain_spec.rs` : &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Copyright (C) 2018-2022 Parity Technologies (UK) Ltd.&#xD;&#xA;    // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0&#xD;&#xA;    &#xD;&#xA;    // This program is free software: you can redistribute it and/or modify&#xD;&#xA;    // it under the terms of the GNU General Public License as published by&#xD;&#xA;    // the Free Software Foundation, either version 3 of the License, or&#xD;&#xA;    // (at your option) any later version.&#xD;&#xA;    &#xD;&#xA;    // This program is distributed in the hope that it will be useful,&#xD;&#xA;    // but WITHOUT ANY WARRANTY; without even the implied warranty of&#xD;&#xA;    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&#xD;&#xA;    // GNU General Public License for more details.&#xD;&#xA;    &#xD;&#xA;    // You should have received a copy of the GNU General Public License&#xD;&#xA;    // along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.&#xD;&#xA;    &#xD;&#xA;    //! Substrate chain configurations.&#xD;&#xA;    &#xD;&#xA;    use grandpa_primitives::AuthorityId as GrandpaId;&#xD;&#xA;    use kitchensink_runtime::{&#xD;&#xA;    	constants::currency::*, wasm_binary_unwrap, AuthorityDiscoveryConfig, BabeConfig,&#xD;&#xA;    	BalancesConfig, Block, CouncilConfig, DemocracyConfig, ElectionsConfig, GrandpaConfig,&#xD;&#xA;    	ImOnlineConfig, IndicesConfig, MaxNominations, NominationPoolsConfig, SessionConfig,&#xD;&#xA;    	SessionKeys, SocietyConfig, StakerStatus, StakingConfig, SudoConfig, SystemConfig,&#xD;&#xA;    	TechnicalCommitteeConfig,&#xD;&#xA;    };&#xD;&#xA;    use sp_core::OpaquePeerId; &#xD;&#xA;    use kitchensink_runtime::NodeAuthorizationConfig;&#xD;&#xA;    use pallet_im_online::sr25519::AuthorityId as ImOnlineId;&#xD;&#xA;    use sc_chain_spec::{ChainSpecExtension, Properties};&#xD;&#xA;    use sc_service::ChainType;&#xD;&#xA;    use sc_telemetry::TelemetryEndpoints;&#xD;&#xA;    use serde::{Deserialize, Serialize};&#xD;&#xA;    use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;&#xD;&#xA;    use sp_consensus_babe::AuthorityId as BabeId;&#xD;&#xA;    use sp_core::{crypto::UncheckedInto, sr25519, Pair, Public};&#xD;&#xA;    use sp_runtime::{&#xD;&#xA;    	traits::{IdentifyAccount, Verify},&#xD;&#xA;    	Perbill,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    pub use kitchensink_runtime::GenesisConfig;&#xD;&#xA;    pub use node_primitives::{AccountId, Balance, Signature};&#xD;&#xA;    &#xD;&#xA;    type AccountPublic = &lt;Signature as Verify&gt;::Signer;&#xD;&#xA;    &#xD;&#xA;    const STAGING_TELEMETRY_URL: &amp;str = &quot;wss://telemetry.polkadot.io/submit/&quot;;&#xD;&#xA;    &#xD;&#xA;    /// Node `ChainSpec` extensions.&#xD;&#xA;    ///&#xD;&#xA;    /// Additional parameters for some Substrate core modules,&#xD;&#xA;    /// customizable from the chain spec.&#xD;&#xA;    #[derive(Default, Clone, Serialize, Deserialize, ChainSpecExtension)]&#xD;&#xA;    #[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;    pub struct Extensions {&#xD;&#xA;    	/// Block numbers with known hashes.&#xD;&#xA;    	pub fork_blocks: sc_client_api::ForkBlocks&lt;Block&gt;,&#xD;&#xA;    	/// Known bad block hashes.&#xD;&#xA;    	pub bad_blocks: sc_client_api::BadBlocks&lt;Block&gt;,&#xD;&#xA;    	/// The light sync state extension used by the sync-state rpc.&#xD;&#xA;    	pub light_sync_state: sc_sync_state_rpc::LightSyncStateExtension,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Specialized `ChainSpec`.&#xD;&#xA;    pub type ChainSpec = sc_service::GenericChainSpec&lt;GenesisConfig, Extensions&gt;;&#xD;&#xA;    /// Flaming Fir testnet generator&#xD;&#xA;    pub fn flaming_fir_config() -&gt; Result&lt;ChainSpec, String&gt; {&#xD;&#xA;    	ChainSpec::from_json_bytes(&amp;include_bytes!(&quot;../res/flaming-fir.json&quot;)[..])&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fn session_keys(&#xD;&#xA;    	grandpa: GrandpaId,&#xD;&#xA;    	babe: BabeId,&#xD;&#xA;    	im_online: ImOnlineId,&#xD;&#xA;    	authority_discovery: AuthorityDiscoveryId,&#xD;&#xA;    ) -&gt; SessionKeys {&#xD;&#xA;    	SessionKeys { grandpa, babe, im_online, authority_discovery }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fn staging_testnet_config_genesis() -&gt; GenesisConfig {&#xD;&#xA;    	#[rustfmt::skip]&#xD;&#xA;    	// stash, controller, session-key&#xD;&#xA;    	// generated with secret:&#xD;&#xA;    	// for i in 1 2 3 4 ; do for j in stash controller; do subkey inspect &quot;$secret&quot;/fir/$j/$i; done; done&#xD;&#xA;    	//&#xD;&#xA;    	// and&#xD;&#xA;    	//&#xD;&#xA;    	// for i in 1 2 3 4 ; do for j in session; do subkey --ed25519 inspect &quot;$secret&quot;//fir//$j//$i; done; done&#xD;&#xA;    &#xD;&#xA;    	let initial_authorities: Vec&lt;(&#xD;&#xA;    		AccountId,&#xD;&#xA;    		AccountId,&#xD;&#xA;    		GrandpaId,&#xD;&#xA;    		BabeId,&#xD;&#xA;    		ImOnlineId,&#xD;&#xA;    		AuthorityDiscoveryId,&#xD;&#xA;    	)&gt; = vec![&#xD;&#xA;    		(&#xD;&#xA;    			// 5Fbsd6WXDGiLTxunqeK5BATNiocfCqu9bS1yArVjCgeBLkVy&#xD;&#xA;    			array_bytes::hex_n_into_unchecked(&quot;9c7a2ee14e565db0c69f78c7b4cd839fbf52b607d867e9e9c5a79042898a0d12&quot;),&#xD;&#xA;    			// 5EnCiV7wSHeNhjW3FSUwiJNkcc2SBkPLn5Nj93FmbLtBjQUq&#xD;&#xA;    			array_bytes::hex_n_into_unchecked(&quot;781ead1e2fa9ccb74b44c19d29cb2a7a4b5be3972927ae98cd3877523976a276&quot;),&#xD;&#xA;    			// 5Fb9ayurnxnaXj56CjmyQLBiadfRCqUbL2VWNbbe1nZU6wiC&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;9becad03e6dcac03cee07edebca5475314861492cdfc96a2144a67bbe9699332&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5EZaeQ8djPcq9pheJUhgerXQZt9YaHnMJpiHMRhwQeinqUW8&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;6e7e4eb42cbd2e0ab4cae8708ce5509580b8c04d11f6758dbf686d50fe9f9106&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5EZaeQ8djPcq9pheJUhgerXQZt9YaHnMJpiHMRhwQeinqUW8&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;6e7e4eb42cbd2e0ab4cae8708ce5509580b8c04d11f6758dbf686d50fe9f9106&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5EZaeQ8djPcq9pheJUhgerXQZt9YaHnMJpiHMRhwQeinqUW8&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;6e7e4eb42cbd2e0ab4cae8708ce5509580b8c04d11f6758dbf686d50fe9f9106&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    		),&#xD;&#xA;    		(&#xD;&#xA;    			// 5ERawXCzCWkjVq3xz1W5KGNtVx2VdefvZ62Bw1FEuZW4Vny2&#xD;&#xA;    			array_bytes::hex_n_into_unchecked(&quot;68655684472b743e456907b398d3a44c113f189e56d1bbfd55e889e295dfde78&quot;),&#xD;&#xA;    			// 5Gc4vr42hH1uDZc93Nayk5G7i687bAQdHHc9unLuyeawHipF&#xD;&#xA;    			array_bytes::hex_n_into_unchecked(&quot;c8dc79e36b29395413399edaec3e20fcca7205fb19776ed8ddb25d6f427ec40e&quot;),&#xD;&#xA;    			// 5EockCXN6YkiNCDjpqqnbcqd4ad35nU4RmA1ikM4YeRN4WcE&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;7932cff431e748892fa48e10c63c17d30f80ca42e4de3921e641249cd7fa3c2f&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5DhLtiaQd1L1LU9jaNeeu9HJkP6eyg3BwXA7iNMzKm7qqruQ&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;482dbd7297a39fa145c570552249c2ca9dd47e281f0c500c971b59c9dcdcd82e&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5DhLtiaQd1L1LU9jaNeeu9HJkP6eyg3BwXA7iNMzKm7qqruQ&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;482dbd7297a39fa145c570552249c2ca9dd47e281f0c500c971b59c9dcdcd82e&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5DhLtiaQd1L1LU9jaNeeu9HJkP6eyg3BwXA7iNMzKm7qqruQ&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;482dbd7297a39fa145c570552249c2ca9dd47e281f0c500c971b59c9dcdcd82e&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    		),&#xD;&#xA;    		(&#xD;&#xA;    			// 5DyVtKWPidondEu8iHZgi6Ffv9yrJJ1NDNLom3X9cTDi98qp&#xD;&#xA;    			array_bytes::hex_n_into_unchecked(&quot;547ff0ab649283a7ae01dbc2eb73932eba2fb09075e9485ff369082a2ff38d65&quot;),&#xD;&#xA;    			// 5FeD54vGVNpFX3PndHPXJ2MDakc462vBCD5mgtWRnWYCpZU9&#xD;&#xA;    			array_bytes::hex_n_into_unchecked(&quot;9e42241d7cd91d001773b0b616d523dd80e13c6c2cab860b1234ef1b9ffc1526&quot;),&#xD;&#xA;    			// 5E1jLYfLdUQKrFrtqoKgFrRvxM3oQPMbf6DfcsrugZZ5Bn8d&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;5633b70b80a6c8bb16270f82cca6d56b27ed7b76c8fd5af2986a25a4788ce440&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5DhKqkHRkndJu8vq7pi2Q5S3DfftWJHGxbEUNH43b46qNspH&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;482a3389a6cf42d8ed83888cfd920fec738ea30f97e44699ada7323f08c3380a&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5DhKqkHRkndJu8vq7pi2Q5S3DfftWJHGxbEUNH43b46qNspH&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;482a3389a6cf42d8ed83888cfd920fec738ea30f97e44699ada7323f08c3380a&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5DhKqkHRkndJu8vq7pi2Q5S3DfftWJHGxbEUNH43b46qNspH&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;482a3389a6cf42d8ed83888cfd920fec738ea30f97e44699ada7323f08c3380a&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    		),&#xD;&#xA;    		(&#xD;&#xA;    			// 5HYZnKWe5FVZQ33ZRJK1rG3WaLMztxWrrNDb1JRwaHHVWyP9&#xD;&#xA;    			array_bytes::hex_n_into_unchecked(&quot;f26cdb14b5aec7b2789fd5ca80f979cef3761897ae1f37ffb3e154cbcc1c2663&quot;),&#xD;&#xA;    			// 5EPQdAQ39WQNLCRjWsCk5jErsCitHiY5ZmjfWzzbXDoAoYbn&#xD;&#xA;    			array_bytes::hex_n_into_unchecked(&quot;66bc1e5d275da50b72b15de072a2468a5ad414919ca9054d2695767cf650012f&quot;),&#xD;&#xA;    			// 5DMa31Hd5u1dwoRKgC4uvqyrdK45RHv3CpwvpUC1EzuwDit4&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;3919132b851ef0fd2dae42a7e734fe547af5a6b809006100f48944d7fae8e8ef&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5C4vDQxA8LTck2xJEy4Yg1hM9qjDt4LvTQaMo4Y8ne43aU6x&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;00299981a2b92f878baaf5dbeba5c18d4e70f2a1fcd9c61b32ea18daf38f4378&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5C4vDQxA8LTck2xJEy4Yg1hM9qjDt4LvTQaMo4Y8ne43aU6x&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;00299981a2b92f878baaf5dbeba5c18d4e70f2a1fcd9c61b32ea18daf38f4378&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    			// 5C4vDQxA8LTck2xJEy4Yg1hM9qjDt4LvTQaMo4Y8ne43aU6x&#xD;&#xA;    			array_bytes::hex2array_unchecked(&quot;00299981a2b92f878baaf5dbeba5c18d4e70f2a1fcd9c61b32ea18daf38f4378&quot;)&#xD;&#xA;    				.unchecked_into(),&#xD;&#xA;    		),&#xD;&#xA;    	];&#xD;&#xA;    &#xD;&#xA;    	// generated with secret: subkey inspect &quot;$secret&quot;/fir&#xD;&#xA;    	let root_key: AccountId = array_bytes::hex_n_into_unchecked(&#xD;&#xA;    		// 5Ff3iXP75ruzroPWRP2FYBHWnmGGBSb63857BgnzCoXNxfPo&#xD;&#xA;    		&quot;9ee5e5bdc0ec239eb164f865ecc345ce4c88e76ee002e0f7e318097347471809&quot;,&#xD;&#xA;    	);&#xD;&#xA;    &#xD;&#xA;    	let endowed_accounts: Vec&lt;AccountId&gt; = vec![root_key.clone()];&#xD;&#xA;    &#xD;&#xA;    	testnet_genesis(initial_authorities, vec![], root_key, Some(endowed_accounts))&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Staging testnet config.&#xD;&#xA;    pub fn staging_testnet_config() -&gt; ChainSpec {&#xD;&#xA;    	let boot_nodes = vec![];&#xD;&#xA;    	ChainSpec::from_genesis(&#xD;&#xA;    		&quot;Staging Testnet&quot;,&#xD;&#xA;    		&quot;staging_testnet&quot;,&#xD;&#xA;    		ChainType::Live,&#xD;&#xA;    		staging_testnet_config_genesis,&#xD;&#xA;    		boot_nodes,&#xD;&#xA;    		Some(&#xD;&#xA;    			TelemetryEndpoints::new(vec![(STAGING_TELEMETRY_URL.to_string(), 0)])&#xD;&#xA;    				.expect(&quot;Staging telemetry url is valid; qed&quot;),&#xD;&#xA;    		),&#xD;&#xA;    		None,&#xD;&#xA;    		None,&#xD;&#xA;    		None,&#xD;&#xA;    		Default::default(),&#xD;&#xA;    	)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Helper function to generate a crypto pair from seed&#xD;&#xA;    pub fn get_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; &lt;TPublic::Pair as Pair&gt;::Public {&#xD;&#xA;    	TPublic::Pair::from_string(&amp;format!(&quot;//{}&quot;, seed), None)&#xD;&#xA;    		.expect(&quot;static values are valid; qed&quot;)&#xD;&#xA;    		.public()&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Helper function to generate an account ID from seed&#xD;&#xA;    pub fn get_account_id_from_seed&lt;TPublic: Public&gt;(seed: &amp;str) -&gt; AccountId&#xD;&#xA;    where&#xD;&#xA;    	AccountPublic: From&lt;&lt;TPublic::Pair as Pair&gt;::Public&gt;,&#xD;&#xA;    {&#xD;&#xA;    	AccountPublic::from(get_from_seed::&lt;TPublic&gt;(seed)).into_account()&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Helper function to generate stash, controller and session key from seed&#xD;&#xA;    pub fn authority_keys_from_seed(&#xD;&#xA;    	seed: &amp;str,&#xD;&#xA;    ) -&gt; (AccountId, AccountId, GrandpaId, BabeId, ImOnlineId, AuthorityDiscoveryId) {&#xD;&#xA;    	(&#xD;&#xA;    		get_account_id_from_seed::&lt;sr25519::Public&gt;(&amp;format!(&quot;{}//stash&quot;, seed)),&#xD;&#xA;    		get_account_id_from_seed::&lt;sr25519::Public&gt;(seed),&#xD;&#xA;    		get_from_seed::&lt;GrandpaId&gt;(seed),&#xD;&#xA;    		get_from_seed::&lt;BabeId&gt;(seed),&#xD;&#xA;    		get_from_seed::&lt;ImOnlineId&gt;(seed),&#xD;&#xA;    		get_from_seed::&lt;AuthorityDiscoveryId&gt;(seed),&#xD;&#xA;    	)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Helper function to create GenesisConfig for testing&#xD;&#xA;    pub fn testnet_genesis(&#xD;&#xA;    	initial_authorities: Vec&lt;(&#xD;&#xA;    		AccountId,&#xD;&#xA;    		AccountId,&#xD;&#xA;    		GrandpaId,&#xD;&#xA;    		BabeId,&#xD;&#xA;    		ImOnlineId,&#xD;&#xA;    		AuthorityDiscoveryId,&#xD;&#xA;    	)&gt;,&#xD;&#xA;    	initial_nominators: Vec&lt;AccountId&gt;,&#xD;&#xA;    	root_key: AccountId,&#xD;&#xA;    	endowed_accounts: Option&lt;Vec&lt;AccountId&gt;&gt;,&#xD;&#xA;    ) -&gt; GenesisConfig {&#xD;&#xA;    	let mut endowed_accounts: Vec&lt;AccountId&gt; = endowed_accounts.unwrap_or_else(|| {&#xD;&#xA;    		vec![&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice//stash&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Bob//stash&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Charlie//stash&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Dave//stash&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Eve//stash&quot;),&#xD;&#xA;    			get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Ferdie//stash&quot;),&#xD;&#xA;    		]&#xD;&#xA;    	});&#xD;&#xA;    	// endow all authorities and nominators.&#xD;&#xA;    	initial_authorities&#xD;&#xA;    		.iter()&#xD;&#xA;    		.map(|x| &amp;x.0)&#xD;&#xA;    		.chain(initial_nominators.iter())&#xD;&#xA;    		.for_each(|x| {&#xD;&#xA;    			if !endowed_accounts.contains(x) {&#xD;&#xA;    				endowed_accounts.push(x.clone())&#xD;&#xA;    			}&#xD;&#xA;    		});&#xD;&#xA;    &#xD;&#xA;    	// stakers: all validators and nominators.&#xD;&#xA;    	let mut rng = rand::thread_rng();&#xD;&#xA;    	let stakers = initial_authorities&#xD;&#xA;    		.iter()&#xD;&#xA;    		.map(|x| (x.0.clone(), x.1.clone(), STASH, StakerStatus::Validator))&#xD;&#xA;    		.chain(initial_nominators.iter().map(|x| {&#xD;&#xA;    			use rand::{seq::SliceRandom, Rng};&#xD;&#xA;    			let limit = (MaxNominations::get() as usize).min(initial_authorities.len());&#xD;&#xA;    			let count = rng.gen::&lt;usize&gt;() % limit;&#xD;&#xA;    			let nominations = initial_authorities&#xD;&#xA;    				.as_slice()&#xD;&#xA;    				.choose_multiple(&amp;mut rng, count)&#xD;&#xA;    				.into_iter()&#xD;&#xA;    				.map(|choice| choice.0.clone())&#xD;&#xA;    				.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;    			(x.clone(), x.clone(), STASH, StakerStatus::Nominator(nominations))&#xD;&#xA;    		}))&#xD;&#xA;    		.collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;    &#xD;&#xA;    	let num_endowed_accounts = endowed_accounts.len();&#xD;&#xA;    &#xD;&#xA;    	const ENDOWMENT: Balance = 10_000_000 * DOLLARS;&#xD;&#xA;    	const STASH: Balance = ENDOWMENT / 1000;&#xD;&#xA;    &#xD;&#xA;    	GenesisConfig {&#xD;&#xA;    		system: SystemConfig { code: wasm_binary_unwrap().to_vec() },&#xD;&#xA;    		balances: BalancesConfig {&#xD;&#xA;    			balances: endowed_accounts.iter().cloned().map(|x| (x, ENDOWMENT)).collect(),&#xD;&#xA;    		},&#xD;&#xA;    		indices: IndicesConfig { indices: vec![] },&#xD;&#xA;    		session: SessionConfig {&#xD;&#xA;    			keys: initial_authorities&#xD;&#xA;    				.iter()&#xD;&#xA;    				.map(|x| {&#xD;&#xA;    					(&#xD;&#xA;    						x.0.clone(),&#xD;&#xA;    						x.0.clone(),&#xD;&#xA;    						session_keys(x.2.clone(), x.3.clone(), x.4.clone(), x.5.clone()),&#xD;&#xA;    					)&#xD;&#xA;    				})&#xD;&#xA;    				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;    		},&#xD;&#xA;    		staking: StakingConfig {&#xD;&#xA;    			validator_count: initial_authorities.len() as u32,&#xD;&#xA;    			minimum_validator_count: initial_authorities.len() as u32,&#xD;&#xA;    			invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),&#xD;&#xA;    			slash_reward_fraction: Perbill::from_percent(10),&#xD;&#xA;    			stakers,&#xD;&#xA;    			..Default::default()&#xD;&#xA;    		},&#xD;&#xA;    		node_authorization: NodeAuthorizationConfig {&#xD;&#xA;    			nodes: vec![&#xD;&#xA;    			  (&#xD;&#xA;    				OpaquePeerId(bs58::decode(&quot;12D3KooWBmAwcd4PJNJvfV89HwE48nwkRmAgo8Vy3uQEyNNHBox2&quot;).into_vec().unwrap()),&#xD;&#xA;    				endowed_accounts[0].clone()&#xD;&#xA;    			  ),&#xD;&#xA;    			  (&#xD;&#xA;    				OpaquePeerId(bs58::decode(&quot;12D3KooWQYV9dGMFoRzNStwpXztXaBUjtPqi6aU76ZgUriHhKust&quot;).into_vec().unwrap()),&#xD;&#xA;    				endowed_accounts[1].clone()&#xD;&#xA;    			  ),&#xD;&#xA;    			],&#xD;&#xA;    		  },&#xD;&#xA;    		democracy: DemocracyConfig::default(),&#xD;&#xA;    		elections: ElectionsConfig {&#xD;&#xA;    			members: endowed_accounts&#xD;&#xA;    				.iter()&#xD;&#xA;    				.take((num_endowed_accounts + 1) / 2)&#xD;&#xA;    				.cloned()&#xD;&#xA;    				.map(|member| (member, STASH))&#xD;&#xA;    				.collect(),&#xD;&#xA;    		},&#xD;&#xA;    		council: CouncilConfig::default(),&#xD;&#xA;    		technical_committee: TechnicalCommitteeConfig {&#xD;&#xA;    			members: endowed_accounts&#xD;&#xA;    				.iter()&#xD;&#xA;    				.take((num_endowed_accounts + 1) / 2)&#xD;&#xA;    				.cloned()&#xD;&#xA;    				.collect(),&#xD;&#xA;    			phantom: Default::default(),&#xD;&#xA;    		},&#xD;&#xA;    		sudo: SudoConfig { key: Some(root_key) },&#xD;&#xA;    		babe: BabeConfig {&#xD;&#xA;    			authorities: vec![],&#xD;&#xA;    			epoch_config: Some(kitchensink_runtime::BABE_GENESIS_EPOCH_CONFIG),&#xD;&#xA;    		},&#xD;&#xA;    		im_online: ImOnlineConfig { keys: vec![] },&#xD;&#xA;    		authority_discovery: AuthorityDiscoveryConfig { keys: vec![] },&#xD;&#xA;    		grandpa: GrandpaConfig { authorities: vec![] },&#xD;&#xA;    		technical_membership: Default::default(),&#xD;&#xA;    		treasury: Default::default(),&#xD;&#xA;    		society: SocietyConfig {&#xD;&#xA;    			members: endowed_accounts&#xD;&#xA;    				.iter()&#xD;&#xA;    				.take((num_endowed_accounts + 1) / 2)&#xD;&#xA;    				.cloned()&#xD;&#xA;    				.collect(),&#xD;&#xA;    			pot: 0,&#xD;&#xA;    			max_members: 999,&#xD;&#xA;    		},&#xD;&#xA;    		vesting: Default::default(),&#xD;&#xA;    		assets: pallet_assets::GenesisConfig {&#xD;&#xA;    			// This asset is used by the NIS pallet as counterpart currency.&#xD;&#xA;    			assets: vec![(9, get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;), true, 1)],&#xD;&#xA;    			..Default::default()&#xD;&#xA;    		},&#xD;&#xA;    		transaction_storage: Default::default(),&#xD;&#xA;    		transaction_payment: Default::default(),&#xD;&#xA;    		alliance: Default::default(),&#xD;&#xA;    		alliance_motion: Default::default(),&#xD;&#xA;    		nomination_pools: NominationPoolsConfig {&#xD;&#xA;    			min_create_bond: 10 * DOLLARS,&#xD;&#xA;    			min_join_bond: 1 * DOLLARS,&#xD;&#xA;    			..Default::default()&#xD;&#xA;    		},&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fn development_config_genesis() -&gt; GenesisConfig {&#xD;&#xA;    	testnet_genesis(&#xD;&#xA;    		vec![authority_keys_from_seed(&quot;Alice&quot;)],&#xD;&#xA;    		vec![],&#xD;&#xA;    		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;    		None,&#xD;&#xA;    	)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Development config (single validator Alice)&#xD;&#xA;    pub fn development_config() -&gt; ChainSpec {&#xD;&#xA;    &#xD;&#xA;    	let mut props = Properties::new();&#xD;&#xA;    	props.insert(&quot;tokenSymbol&quot;.into(), &quot;MCC&quot;.into()); &#xD;&#xA;    	&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;    	ChainSpec::from_genesis(&#xD;&#xA;    		&quot;Development&quot;,&#xD;&#xA;    		&quot;dev&quot;,&#xD;&#xA;    		ChainType::Development,&#xD;&#xA;    		development_config_genesis,&#xD;&#xA;    		vec![],&#xD;&#xA;    		None,&#xD;&#xA;    		None,&#xD;&#xA;    		None,&#xD;&#xA;    		Some(props),&#xD;&#xA;    		Default::default(),&#xD;&#xA;    	)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    fn local_testnet_genesis() -&gt; GenesisConfig {&#xD;&#xA;    	testnet_genesis(&#xD;&#xA;    		vec![authority_keys_from_seed(&quot;Alice&quot;), authority_keys_from_seed(&quot;Bob&quot;)],&#xD;&#xA;    		vec![],&#xD;&#xA;    		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;    		None,&#xD;&#xA;    	)&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    /// Local testnet config (multivalidator Alice + Bob)&#xD;&#xA;    pub fn local_testnet_config() -&gt; ChainSpec {&#xD;&#xA;    	ChainSpec::from_genesis(&#xD;&#xA;    		&quot;Local Testnet&quot;,&#xD;&#xA;    		&quot;local_testnet&quot;,&#xD;&#xA;    		ChainType::Local,&#xD;&#xA;    		local_testnet_genesis,&#xD;&#xA;    		vec![],&#xD;&#xA;    		None,&#xD;&#xA;    		None,&#xD;&#xA;    		None,&#xD;&#xA;    		None,&#xD;&#xA;    		Default::default(),&#xD;&#xA;    	)&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="40052" PostHistoryTypeId="1" PostId="10096" RevisionGUID="61e4458c-5b35-4712-9253-dfb1c0b03666" CreationDate="2023-10-02T07:09:46.477" UserId="2722" Text="Error Running Substrate Node: Unsupported or invalid BabeApi version" ContentLicense="CC BY-SA 4.0" />
  <row Id="40053" PostHistoryTypeId="3" PostId="10096" RevisionGUID="61e4458c-5b35-4712-9253-dfb1c0b03666" CreationDate="2023-10-02T07:09:46.477" UserId="2722" Text="|substrate-node-template|babe|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40054" PostHistoryTypeId="4" PostId="10093" RevisionGUID="11626767-ba41-4b2d-84fe-b06175811431" CreationDate="2023-10-02T07:49:02.793" UserId="3881" Comment="edited title" Text="Error when trying to run benchmarks on runtime but no in test benchmarks" ContentLicense="CC BY-SA 4.0" />
  <row Id="40055" PostHistoryTypeId="5" PostId="10093" RevisionGUID="2e8ccae6-f3b5-44f4-8f23-b05eddfe1589" CreationDate="2023-10-02T07:56:48.210" UserId="3317" Comment="added 14 characters in body" Text="i´m writing benchmarks for a pallet that manages sending tokens from assets pallet from one account to other.&#xD;&#xA;&#xD;&#xA;I have written the benchmarks and run it with no problem using the command:&#xD;&#xA;&#xD;&#xA;`cargo test -p pallet-name --features untime-benchmarks`&#xD;&#xA;&#xD;&#xA;Getting all ok.&#xD;&#xA;&#xD;&#xA;Then I compiled the node and tried to run the benchmarks to generate the weighs file. I´m using substrate V0.9.39.&#xD;&#xA;&#xD;&#xA;I got a `DontHavePermission` that is defined inside my pallet. that comes from the following line:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let asset_owner = T::Fungibles::get_owner(token)?;&#xD;&#xA;&#xD;&#xA;ensure!(asset_owner == who, Error::&lt;T&gt;::DontHavePermission);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It means the account that is trying to do the assets transfer is not the owner.&#xD;&#xA;&#xD;&#xA;But why my tests are leaving this error pass and not the benchmarks when run? How can I fix it?&#xD;&#xA;&#xD;&#xA;The following is my benchmark function:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;transfer_token_from_bank_to_user {&#xD;&#xA;&#xD;&#xA;		let caller: T::AccountId = account(&quot;account&quot;, 0, 0);&#xD;&#xA;&#xD;&#xA;		let _ = T::BenchmarkHelper::create_user(&#xD;&#xA;			caller.clone(),&#xD;&#xA;		);&#xD;&#xA;&#xD;&#xA;		let _ = T::Fungibles::create(ASSET_ID, caller.clone(), true, AssetBalanceOf::&lt;T&gt;::from(1u32).into());&#xD;&#xA;		let _ = T::Fungibles::mint_into(ASSET_ID, &amp;caller, AssetBalanceOf::&lt;T&gt;::from(1000_0_000_000_000u128).into());&#xD;&#xA;		let _ = T::Fungibles::increase_supply(ASSET_ID, AssetBalanceOf::&lt;T&gt;::from(1000_0_000_000_000u128).into());&#xD;&#xA;&#xD;&#xA;		// Transfer from user to bank&#xD;&#xA;		Bank::&lt;T&gt;::transfer_token_from_user_to_bank(&#xD;&#xA;			RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;			ASSET_ID,&#xD;&#xA;			ASSET_ID,&#xD;&#xA;			AssetBalanceOf::&lt;T&gt;::from(100_0_000_000_000u128).into()&#xD;&#xA;		)?;&#xD;&#xA;&#xD;&#xA;	}: _(RawOrigin::Signed(caller.clone()), // origin&#xD;&#xA;		caller.clone(), // destination&#xD;&#xA;		ASSET_ID, // token_bank_id&#xD;&#xA;		ASSET_ID, // token_id&#xD;&#xA;		AssetBalanceOf::&lt;T&gt;::from(10_000u32) // token_amount&#xD;&#xA;	)&#xD;&#xA;&#xD;&#xA;	verify {&#xD;&#xA;		assert_last_event::&lt;T&gt;(Event::TransferFromBankToUser { &#xD;&#xA;			who: caller.clone(),&#xD;&#xA;			destination: caller.clone(),&#xD;&#xA;			token_bank_id: ASSET_ID,&#xD;&#xA;			token_id: ASSET_ID,&#xD;&#xA;			token_amount: AssetBalanceOf::&lt;T&gt;::from(10_000u32).into(), &#xD;&#xA;		}.into());&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40056" PostHistoryTypeId="2" PostId="10097" RevisionGUID="d1125708-bdd1-4c80-ab71-9733742e46e2" CreationDate="2023-10-02T08:14:42.563" UserId="554" Text="Here is the node template with Babe: &#xD;&#xA;```https://github.com/paritytech/substrate/blob/6a946fc36d68b89599d7ca1ab03803d10c78468c/bin/node/runtime/src/lib.rs#L1583```&#xD;&#xA;&#xD;&#xA;The above template is functioning smoothly under POS consensus. However, I think it incorporates several extra pallets. Could anyone please identify the redundant pallets integrated into the template that can be removed without disrupting its functionality?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40058" PostHistoryTypeId="1" PostId="10097" RevisionGUID="d1125708-bdd1-4c80-ab71-9733742e46e2" CreationDate="2023-10-02T08:14:42.563" UserId="554" Text="Node template with POS Babe consensus: Removal of Unnecessary Extra Pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="40059" PostHistoryTypeId="3" PostId="10097" RevisionGUID="d1125708-bdd1-4c80-ab71-9733742e46e2" CreationDate="2023-10-02T08:14:42.563" UserId="554" Text="|substrate-node-template|pallet|babe|pallet-staking|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40060" PostHistoryTypeId="2" PostId="10098" RevisionGUID="6d0e4793-a45d-4556-9234-0fc2aa7e0ecb" CreationDate="2023-10-02T08:20:27.827" UserId="3317" Text="I see `aura` in your generated chainspec while seeing `babe` in your `chainspec.rs` file. You can't use both in your runtime. &#xD;&#xA;&#xD;&#xA;For some reason you are generating an incorrect chainspec. It is odd because I don't see any `aura` genesis parameters specified in your `chainspec.rs`. So I'm not sure how it ends up in your generated chainspec." ContentLicense="CC BY-SA 4.0" />
  <row Id="40062" PostHistoryTypeId="2" PostId="10099" RevisionGUID="29d3a351-d6b1-46ed-8f40-574a68889e22" CreationDate="2023-10-02T08:23:15.523" UserId="3721" Text="What is the best way to disable ink! smart contracts code upgradability for a class of contracts? Below I describe what I need it for, just in case. Thank you!&#xD;&#xA;&#xD;&#xA;For my use case, I need my pallet to accept a user-defined algorithm for getting a value used in an extrinsic call handler. As I see, the best way for that case is ink! smart contract. The user provides the contract address and a getter selector to my pallet and then my extrinsic handler can get the value invoking some user-defined code. It may look like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(T::WeightInfo::my_extrinsic())]&#xD;&#xA;  pub fn my_extrinsic(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;    ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;    let user_defined = pallet_contracts::Pallet::&lt;T&gt;::bare_call(&lt;contract address and a value getter selector provided by user earlier&gt;).result?;&#xD;&#xA;&#xD;&#xA;    if Self::check(user_defined) {&#xD;&#xA;      Self::do_foo();&#xD;&#xA;    } else {&#xD;&#xA;      Self::do_bar();&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The problem here is that by default the user may replace the value getter using the [set_code_hash](https://use.ink/basics/upgradeable-contracts#replacing-contract-code-with-set_code_hash), but I want the getter to be non-upgradable and the algorithm never changes.&#xD;&#xA;&#xD;&#xA;I can create a fork of the `pallet-contracts` to remove `set_code_hash` from it but is there a better approach?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40064" PostHistoryTypeId="1" PostId="10099" RevisionGUID="29d3a351-d6b1-46ed-8f40-574a68889e22" CreationDate="2023-10-02T08:23:15.523" UserId="3721" Text="How to restrict ink! contracts code upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40065" PostHistoryTypeId="3" PostId="10099" RevisionGUID="29d3a351-d6b1-46ed-8f40-574a68889e22" CreationDate="2023-10-02T08:23:15.523" UserId="3721" Text="|ink|smart-contract|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40066" PostHistoryTypeId="2" PostId="10100" RevisionGUID="d5199c2b-a22e-4227-9dec-b0ce70ff047d" CreationDate="2023-10-02T08:42:17.070" UserId="3317" Text="This is the `kitchensink` runtime and is configured with many pallets on purpose (to mimic a chain that is closer to how a real chain would be configured). If you want to use a chain with PoS (`babe`) without all the extra features you could use the `node-template` and change the consensus from PoA (`aura`) to PoS ([have a look at this SE post][1]).&#xD;&#xA;&#xD;&#xA;If you want to remove pallets from the `kitchensink-runtime`, I would say the pallets you'd need for a bare metal `PoS node-template` are:&#xD;&#xA; - `System`&#xD;&#xA; - `Babe`&#xD;&#xA;    - `Staking` (required for `babe`)&#xD;&#xA;    - `Session` (&quot;&quot;)&#xD;&#xA; - `Grandpa` (for solo chain)&#xD;&#xA; - `Timestamp`&#xD;&#xA; - `Balances` (if you want a native token)&#xD;&#xA; - `TransactionPayment` (if you want users pay fees for transactions)&#xD;&#xA; - `Sudo` (if you want a `Root` user, good for during development)&#xD;&#xA;&#xD;&#xA;So remove all the others you can find in the runtime. &#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/questions/368/how-to-change-consensus-engine-from-poa-to-pos" ContentLicense="CC BY-SA 4.0" />
  <row Id="40068" PostHistoryTypeId="2" PostId="10101" RevisionGUID="c82ad7af-46ca-4a6a-a9be-617414297509" CreationDate="2023-10-02T08:50:25.913" UserId="4731" Text="In my Blockchain app, I want to add my own native currency. For extended Features of my application Users will be rewarded and they will receive coin for that. The users will receive the reward in real time upon their action in the application. &#xD;&#xA;Is there any existing pallet that will help me to implement this function on my app. " ContentLicense="CC BY-SA 4.0" />
  <row Id="40070" PostHistoryTypeId="1" PostId="10101" RevisionGUID="c82ad7af-46ca-4a6a-a9be-617414297509" CreationDate="2023-10-02T08:50:25.913" UserId="4731" Text="Pallate for Native Blockchain Currency" ContentLicense="CC BY-SA 4.0" />
  <row Id="40071" PostHistoryTypeId="3" PostId="10101" RevisionGUID="c82ad7af-46ca-4a6a-a9be-617414297509" CreationDate="2023-10-02T08:50:25.913" UserId="4731" Text="|pallet|assets|tcurrency|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40072" PostHistoryTypeId="2" PostId="10102" RevisionGUID="5315239c-201b-4e28-b76d-85534d6a0eda" CreationDate="2023-10-02T08:53:35.723" UserId="3317" Text="Native currency =&gt; `pallet-balances`&#xD;&#xA;&#xD;&#xA;Rewards =&gt; `pallet-tips` (tightly coupled to `pallet-treasury`)" ContentLicense="CC BY-SA 4.0" />
  <row Id="40074" PostHistoryTypeId="2" PostId="10103" RevisionGUID="9b18bc5f-60e7-41be-9b9b-cb6b92919313" CreationDate="2023-10-02T09:07:19.397" UserId="3035" Text="one reason I see not to use `option 2` relates to what I've already mentioned in the questions. In this case, we misrepresent what `AssetKind` is, which leads to some problems. &#xD;&#xA;&#xD;&#xA;let's examine the example:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;``` lang-rust &#xD;&#xA;mod pallet_dream {&#xD;&#xA;  ..&#xD;&#xA;  pub trait Config {&#xD;&#xA;    ..&#xD;&#xA;    AssetKind: ..,&#xD;&#xA;    Assets: fungibles::Inspect&lt;.., AssetId = Self::AssetKind&gt;, // (1)&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  impl&lt;AssetKind = Config::AssetKind&gt; &#xD;&#xA;   frame_support::Pay&lt;AssetKind&gt; for Pallet { // (2)&#xD;&#xA;    ...&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;mod wizard {&#xD;&#xA;  trait Magic {&#xD;&#xA;    fn leviosa();&#xD;&#xA;  }&#xD;&#xA;  ...&#xD;&#xA;  impl&lt;&#xD;&#xA;    AssetKind, &#xD;&#xA;    From: frame_support::Pay&lt;AssetKind&gt;, // (3)&#xD;&#xA;    To: Oven&lt;AssetId = Self::AssetKind&gt;&gt; &#xD;&#xA;     Magic for Burn {&#xD;&#xA;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;in case if `AssetKind = Box&lt;...&gt;`,&#xD;&#xA;&#xD;&#xA;(1) any bounds within the pallet that reference that `AssetKind` will expect implementation over a Boxed type. this will make the usage of any common implementations impossible since they implemented over an actual type, not a box of it.&#xD;&#xA;&#xD;&#xA;(2) any implementation the pallet provides for some low level contract (aka trait) which references the `AssetKind` will result an implementation over `Box` of `AssetKind`.&#xD;&#xA;&#xD;&#xA;(3) if a general implementation like `Burn` is supplied with `Pay` implemented over `Box`, then an implementation of `Oven` also has to be defined over `Box`." ContentLicense="CC BY-SA 4.0" />
  <row Id="40076" PostHistoryTypeId="5" PostId="10103" RevisionGUID="ea574a53-532e-4163-ab74-8f5a27c1e4f7" CreationDate="2023-10-02T10:16:31.400" UserId="3035" Comment="added 15 characters in body" Text="one reason I see not to use `option 2` relates to what I've already mentioned in the questions. In this case, we misrepresent what `AssetKind` is, which leads to some problems. &#xD;&#xA;&#xD;&#xA;let's examine the example:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;``` lang-rust &#xD;&#xA;mod pallet_dream {&#xD;&#xA;  ..&#xD;&#xA;  pub trait Config {&#xD;&#xA;    ..&#xD;&#xA;    AssetKind: ..,&#xD;&#xA;    Assets: fungibles::Inspect&lt;.., AssetId = Self::AssetKind&gt;, // (1)&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  impl&lt;AssetKind = Config::AssetKind&gt; &#xD;&#xA;   frame_support::Pay&lt;AssetKind&gt; for Pallet { // (2)&#xD;&#xA;    ...&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;mod wizard {&#xD;&#xA;  trait Magic {&#xD;&#xA;    fn leviosa();&#xD;&#xA;  }&#xD;&#xA;  ...&#xD;&#xA;  impl&lt;&#xD;&#xA;    AssetKind, &#xD;&#xA;    From: frame_support::Pay&lt;AssetKind&gt;, // (3)&#xD;&#xA;    To: frame_support::Oven&lt;AssetId = Self::AssetKind&gt;&gt; &#xD;&#xA;     Magic for Burn {&#xD;&#xA;&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;in case if `AssetKind = Box&lt;...&gt;`,&#xD;&#xA;&#xD;&#xA;(1) any bounds within the pallet that reference that `AssetKind` will expect implementation over a Boxed type. this will make the usage of any common implementations impossible since they implemented over an actual type, not a box of it.&#xD;&#xA;&#xD;&#xA;(2) any implementation the pallet provides for some low level contract (aka trait) which references the `AssetKind` will result an implementation over `Box` of `AssetKind`.&#xD;&#xA;&#xD;&#xA;(3) if a general implementation like `Burn` is supplied with `Pay` implemented over `Box`, then an implementation of `Oven` also has to be defined over `Box`." ContentLicense="CC BY-SA 4.0" />
  <row Id="40077" PostHistoryTypeId="5" PostId="10093" RevisionGUID="0c7d4817-f69c-4900-b445-3c6efbc744db" CreationDate="2023-10-02T10:22:37.573" UserId="85" Comment="fix typo" Text="i´m writing benchmarks for a pallet that manages sending tokens from assets pallet from one account to other.&#xD;&#xA;&#xD;&#xA;I have written the benchmarks and run it with no problem using the command:&#xD;&#xA;&#xD;&#xA;`cargo test -p pallet-name --features runtime-benchmarks`&#xD;&#xA;&#xD;&#xA;Getting all ok.&#xD;&#xA;&#xD;&#xA;Then I compiled the node and tried to run the benchmarks to generate the weighs file. I´m using substrate V0.9.39.&#xD;&#xA;&#xD;&#xA;I got a `DontHavePermission` that is defined inside my pallet. that comes from the following line:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let asset_owner = T::Fungibles::get_owner(token)?;&#xD;&#xA;&#xD;&#xA;ensure!(asset_owner == who, Error::&lt;T&gt;::DontHavePermission);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It means the account that is trying to do the assets transfer is not the owner.&#xD;&#xA;&#xD;&#xA;But why my tests are leaving this error pass and not the benchmarks when run? How can I fix it?&#xD;&#xA;&#xD;&#xA;The following is my benchmark function:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;transfer_token_from_bank_to_user {&#xD;&#xA;&#xD;&#xA;		let caller: T::AccountId = account(&quot;account&quot;, 0, 0);&#xD;&#xA;&#xD;&#xA;		let _ = T::BenchmarkHelper::create_user(&#xD;&#xA;			caller.clone(),&#xD;&#xA;		);&#xD;&#xA;&#xD;&#xA;		let _ = T::Fungibles::create(ASSET_ID, caller.clone(), true, AssetBalanceOf::&lt;T&gt;::from(1u32).into());&#xD;&#xA;		let _ = T::Fungibles::mint_into(ASSET_ID, &amp;caller, AssetBalanceOf::&lt;T&gt;::from(1000_0_000_000_000u128).into());&#xD;&#xA;		let _ = T::Fungibles::increase_supply(ASSET_ID, AssetBalanceOf::&lt;T&gt;::from(1000_0_000_000_000u128).into());&#xD;&#xA;&#xD;&#xA;		// Transfer from user to bank&#xD;&#xA;		Bank::&lt;T&gt;::transfer_token_from_user_to_bank(&#xD;&#xA;			RawOrigin::Signed(caller.clone()).into(),&#xD;&#xA;			ASSET_ID,&#xD;&#xA;			ASSET_ID,&#xD;&#xA;			AssetBalanceOf::&lt;T&gt;::from(100_0_000_000_000u128).into()&#xD;&#xA;		)?;&#xD;&#xA;&#xD;&#xA;	}: _(RawOrigin::Signed(caller.clone()), // origin&#xD;&#xA;		caller.clone(), // destination&#xD;&#xA;		ASSET_ID, // token_bank_id&#xD;&#xA;		ASSET_ID, // token_id&#xD;&#xA;		AssetBalanceOf::&lt;T&gt;::from(10_000u32) // token_amount&#xD;&#xA;	)&#xD;&#xA;&#xD;&#xA;	verify {&#xD;&#xA;		assert_last_event::&lt;T&gt;(Event::TransferFromBankToUser { &#xD;&#xA;			who: caller.clone(),&#xD;&#xA;			destination: caller.clone(),&#xD;&#xA;			token_bank_id: ASSET_ID,&#xD;&#xA;			token_id: ASSET_ID,&#xD;&#xA;			token_amount: AssetBalanceOf::&lt;T&gt;::from(10_000u32).into(), &#xD;&#xA;		}.into());&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40078" PostHistoryTypeId="2" PostId="10104" RevisionGUID="aecc74a8-9314-4b10-bcf3-ef119d2bd0ca" CreationDate="2023-10-02T11:08:32.167" UserId="2884" Text="Every new token a user holds in `pallet_assets` increases the consumer count for that user +1. And most chains set the `MaxConsumers` of `frame_system` to 16.&#xD;&#xA;&#xD;&#xA;Both `mint_into` and `transfer` call at some point on `can_increase`, which calls `can_accrue_consumers`. And if the asset is not set as sufficient, then it expects to be able to increase the consumers&#xD;&#xA;&#xD;&#xA;&gt;substrate &gt; frame &gt; assets &gt; src &gt; functions.rs &gt; impl Pallet &gt; can_increase()&#xD;&#xA;```rust&#xD;&#xA;pub(super) fn can_increase(&#xD;&#xA;    id: T::AssetId,&#xD;&#xA;    who: &amp;T::AccountId,&#xD;&#xA;    amount: T::Balance,&#xD;&#xA;    increase_supply: bool,&#xD;&#xA;) -&gt; DepositConsequence {&#xD;&#xA;    let details = match Asset::&lt;T, I&gt;::get(&amp;id) {&#xD;&#xA;        Some(details) =&gt; details,&#xD;&#xA;        None =&gt; return DepositConsequence::UnknownAsset,&#xD;&#xA;    };&#xD;&#xA;    if increase_supply &amp;&amp; details.supply.checked_add(&amp;amount).is_none() {&#xD;&#xA;        return DepositConsequence::Overflow&#xD;&#xA;    }&#xD;&#xA;    if let Some(account) = Account::&lt;T, I&gt;::get(id, who) {&#xD;&#xA;        if account.status.is_blocked() {&#xD;&#xA;            return DepositConsequence::Blocked&#xD;&#xA;        }&#xD;&#xA;        if account.balance.checked_add(&amp;amount).is_none() {&#xD;&#xA;            return DepositConsequence::Overflow&#xD;&#xA;        }&#xD;&#xA;    } else {&#xD;&#xA;        if amount &lt; details.min_balance {&#xD;&#xA;            return DepositConsequence::BelowMinimum&#xD;&#xA;        }&#xD;&#xA;        if !details.is_sufficient &amp;&amp; !frame_system::Pallet::&lt;T&gt;::can_accrue_consumers(who,{&#xD;&#xA;            return DepositConsequence::CannotCreate&#xD;&#xA;        }&#xD;&#xA;        if details.is_sufficient &amp;&amp; details.sufficients.checked_add(1).is_none() {&#xD;&#xA;            return DepositConsequence::Overflow&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    DepositConsequence::Success&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; substrate &gt; frame &gt; system &gt; src &gt; lib.rs &gt; impl Palet &gt; can_accrue_consumers()&#xD;&#xA;```rust&#xD;&#xA;pub fn can_accrue_consumers(who: &amp;T::AccountId, amount: u32) -&gt; bool {&#xD;&#xA;    let a = Account::&lt;T&gt;::get(who);&#xD;&#xA;    match a.consumers.checked_add(amount) {&#xD;&#xA;        Some(c) =&gt; a.providers &gt; 0 &amp;&amp; c &lt;= T::MaxConsumers::max_consumers(),&#xD;&#xA;        None =&gt; false,&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After the checks, `increase_balance` is called, which when that account-asset_id storage item does not exist, it increments the consumers by one:&#xD;&#xA;&#xD;&#xA;&gt; substrate &gt; frame &gt; assets &gt; src &gt; functions.rs &gt; impl Pallet &gt; increase_balance()&#xD;&#xA;```rust&#xD;&#xA;	pub(super) fn increase_balance(&#xD;&#xA;		id: T::AssetId,&#xD;&#xA;		beneficiary: &amp;T::AccountId,&#xD;&#xA;		amount: T::Balance,&#xD;&#xA;		check: impl FnOnce(&#xD;&#xA;			&amp;mut AssetDetails&lt;T::Balance, T::AccountId, DepositBalanceOf&lt;T, I&gt;&gt;,&#xD;&#xA;		) -&gt; DispatchResult,&#xD;&#xA;	) -&gt; DispatchResult {&#xD;&#xA;		if amount.is_zero() {&#xD;&#xA;			return Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		Self::can_increase(id.clone(), beneficiary, amount, true).into_result()?;&#xD;&#xA;		Asset::&lt;T, I&gt;::try_mutate(&amp;id, |maybe_details| -&gt; DispatchResult {&#xD;&#xA;			let details = maybe_details.as_mut().ok_or(Error::&lt;T, I&gt;::Unknown)?;&#xD;&#xA;			ensure!(details.status == AssetStatus::Live, Error::&lt;T, I&gt;::AssetNotLive);&#xD;&#xA;			check(details)?;&#xD;&#xA;&#xD;&#xA;			Account::&lt;T, I&gt;::try_mutate(&amp;id, beneficiary, |maybe_account| -&gt; DispatchResult {&#xD;&#xA;				match maybe_account {&#xD;&#xA;					Some(ref mut account) =&gt; {&#xD;&#xA;						account.balance.saturating_accrue(amount);&#xD;&#xA;					},&#xD;&#xA;					maybe_account @ None =&gt; {&#xD;&#xA;						// Note this should never fail as it's already checked by&#xD;&#xA;						// `can_increase`.&#xD;&#xA;						ensure!(amount &gt;= details.min_balance, TokenError::BelowMinimum);&#xD;&#xA;						*maybe_account = Some(AssetAccountOf::&lt;T, I&gt; {&#xD;&#xA;							balance: amount,&#xD;&#xA;							reason: Self::new_account(beneficiary, details, None)?,&#xD;&#xA;							status: AccountStatus::Liquid,&#xD;&#xA;							extra: T::Extra::default(),&#xD;&#xA;						});&#xD;&#xA;					},&#xD;&#xA;				}&#xD;&#xA;				Ok(())&#xD;&#xA;			})?;&#xD;&#xA;			Ok(())&#xD;&#xA;		})?;&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; substrate &gt; frame &gt; assets &gt; src &gt; functions.rs &gt; impl Pallet &gt; new_account()&#xD;&#xA;```rust&#xD;&#xA;	pub(super) fn new_account(&#xD;&#xA;		who: &amp;T::AccountId,&#xD;&#xA;		d: &amp;mut AssetDetails&lt;T::Balance, T::AccountId, DepositBalanceOf&lt;T, I&gt;&gt;,&#xD;&#xA;		maybe_deposit: Option&lt;(&amp;T::AccountId, DepositBalanceOf&lt;T, I&gt;)&gt;,&#xD;&#xA;	) -&gt; Result&lt;ExistenceReasonOf&lt;T, I&gt;, DispatchError&gt; {&#xD;&#xA;		let accounts = d.accounts.checked_add(1).ok_or(ArithmeticError::Overflow)?;&#xD;&#xA;		let reason = if let Some((depositor, deposit)) = maybe_deposit {&#xD;&#xA;			if depositor == who {&#xD;&#xA;				ExistenceReason::DepositHeld(deposit)&#xD;&#xA;			} else {&#xD;&#xA;				ExistenceReason::DepositFrom(depositor.clone(), deposit)&#xD;&#xA;			}&#xD;&#xA;		} else if d.is_sufficient {&#xD;&#xA;			frame_system::Pallet::&lt;T&gt;::inc_sufficients(who);&#xD;&#xA;			d.sufficients += 1;&#xD;&#xA;			ExistenceReason::Sufficient&#xD;&#xA;		} else {&#xD;&#xA;			frame_system::Pallet::&lt;T&gt;::inc_consumers(who)&#xD;&#xA;				.map_err(|_| Error::&lt;T, I&gt;::UnavailableConsumer)?;&#xD;&#xA;			// We ensure that we can still increment consumers once more because we could otherwise&#xD;&#xA;			// allow accidental usage of all consumer references which could cause grief.&#xD;&#xA;			if !frame_system::Pallet::&lt;T&gt;::can_inc_consumer(who) {&#xD;&#xA;				frame_system::Pallet::&lt;T&gt;::dec_consumers(who);&#xD;&#xA;				return Err(Error::&lt;T, I&gt;::UnavailableConsumer.into())&#xD;&#xA;			}&#xD;&#xA;			ExistenceReason::Consumer&#xD;&#xA;		};&#xD;&#xA;		d.accounts = accounts;&#xD;&#xA;		Ok(reason)&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;As you can see, `new_account` calls `inc_consumers` when the asset is new for that account.&#xD;&#xA;&#xD;&#xA;Since the AssetHub parachain also has `MaxConsumers` set to 16, does that mean no one can hold more than 16 distinct assets in there?&#xD;&#xA;&#xD;&#xA;For reference, here is the code I ran to test this:&#xD;&#xA;```rust&#xD;&#xA;mod sandbox {&#xD;&#xA;	use super::*;&#xD;&#xA;	use frame_support::traits::fungibles::Mutate as MutateFungibles;&#xD;&#xA;	use frame_support::traits::fungible::Mutate as MutateFungible;&#xD;&#xA;	use frame_support::traits::tokens::Preservation;&#xD;&#xA;&#xD;&#xA;	#[test]&#xD;&#xA;	fn transferring_more_than_max_consumers_tokens_to_one_user_fails() {&#xD;&#xA;		new_test_ext().execute_with(|| {&#xD;&#xA;			let receiver = 420u64;&#xD;&#xA;			mock::Balances::mint_into(&amp;receiver, PLMC * 1000);&#xD;&#xA;&#xD;&#xA;			for admin in 0..20u64 {&#xD;&#xA;				mock::Balances::mint_into(&amp;admin, PLMC * 1000);&#xD;&#xA;				mock::StatemintAssets::create(mock::RuntimeOrigin::signed(admin), (admin as u32).into(), admin, 1u128).unwrap();&#xD;&#xA;				mock::StatemintAssets::mint_into((admin as u32).into(), &amp;admin, 100_0_000_000_000).unwrap();&#xD;&#xA;&#xD;&#xA;				&lt;mock::StatemintAssets as MutateFungibles&lt;AccountId&gt;&gt;::transfer((admin as u32).into(), &amp;admin, &amp;receiver, 50_0_000_000_000, Preservation::Preserve).unwrap();&#xD;&#xA;			}&#xD;&#xA;		});&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[test]&#xD;&#xA;	fn minting_more_than_max_consumers_tokens_to_one_user_fails() {&#xD;&#xA;		new_test_ext().execute_with(|| {&#xD;&#xA;			let receiver = 420u64;&#xD;&#xA;			mock::Balances::mint_into(&amp;receiver, 10_000_000_000_u128 * 1000);&#xD;&#xA;&#xD;&#xA;			for admin in 0..20u64 {&#xD;&#xA;				mock::Balances::mint_into(&amp;admin, 10_000_000_000_u128 * 1000);&#xD;&#xA;				mock::StatemintAssets::create(mock::RuntimeOrigin::signed(admin), (admin as u32).into(), admin, 1u128).unwrap();&#xD;&#xA;				mock::StatemintAssets::mint_into((admin as u32).into(), &amp;receiver, 100_0_000_000_000).unwrap();&#xD;&#xA;&#xD;&#xA;			}&#xD;&#xA;		});&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40080" PostHistoryTypeId="1" PostId="10104" RevisionGUID="aecc74a8-9314-4b10-bcf3-ef119d2bd0ca" CreationDate="2023-10-02T11:08:32.167" UserId="2884" Text="Are users only allowed to own 16 assets with pallet-assets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40081" PostHistoryTypeId="3" PostId="10104" RevisionGUID="aecc74a8-9314-4b10-bcf3-ef119d2bd0ca" CreationDate="2023-10-02T11:08:32.167" UserId="2884" Text="|pallet|assets|statemint|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40082" PostHistoryTypeId="2" PostId="10105" RevisionGUID="e80afde8-3724-46c2-ae4c-df38204477be" CreationDate="2023-10-02T13:56:09.980" UserId="372" Text="All the Substrate-based chains that I know of have **no transactions in the genesis block**.&#xD;&#xA;The genesis block is the same data structure as all other  blocks and therefore does have a body and a `Vec&lt;Extrinsic&gt;` that could have some extrinsics in it.&#xD;&#xA;&#xD;&#xA;I'm curious: **was Substrate intentionally designed this way**, or it just kind of turned out this way. And if it was not an intentional design decision, where might I look to make a genesis block that does have transactions in it?&#xD;&#xA;&#xD;&#xA;## Semantics of Genesis Transactions&#xD;&#xA;&#xD;&#xA;I can think of two reasonable ways the semantics of such transactions might work.&#xD;&#xA;&#xD;&#xA;1. They are not executed and are basically just grafitti. They are a way to summarize the chain's pre-history at launch time.&#xD;&#xA;&#xD;&#xA;2. They are executed on top of the genesis state just like every other block. If this approach is taken, it would mean that any state set up in eg a chain spec file would be genesis _pre_-state.&#xD;&#xA;&#xD;&#xA;## Usecases for Genesis Transactions&#xD;&#xA;&#xD;&#xA;I can think of a few usecases for having transactions in the genesis block.&#xD;&#xA;&#xD;&#xA;1. Setting a timestamp inherent in the genesis block.&#xD;&#xA;&#xD;&#xA;2. Remark: Chancellor on brink of Second bailout for Banks. (See also [this question](https://substrate.stackexchange.com/questions/2216/is-it-possible-to-add-some-text-in-genesis-block).)&#xD;&#xA;&#xD;&#xA;3. A more elegant way to express genesis state. This usecase relies on semantics #2. Many chains could start with a truly empty genesis pre-state, and then execute the genesis transactions to get the desired genesis state. As a classic example, consider a cryptocurrency that has no coins existing in the genesis pre-state and then has some mint extrinsics in the genesis block to create the initial distribution. This has the advantage that the genesis state can be constructed from the genesis block itself instead of distributed separately." ContentLicense="CC BY-SA 4.0" />
  <row Id="40084" PostHistoryTypeId="1" PostId="10105" RevisionGUID="e80afde8-3724-46c2-ae4c-df38204477be" CreationDate="2023-10-02T13:56:09.980" UserId="372" Text="Extrinsics In Genesis Block" ContentLicense="CC BY-SA 4.0" />
  <row Id="40085" PostHistoryTypeId="3" PostId="10105" RevisionGUID="e80afde8-3724-46c2-ae4c-df38204477be" CreationDate="2023-10-02T13:56:09.980" UserId="372" Text="|extrinsic|blockchain|genesis|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40086" PostHistoryTypeId="5" PostId="10084" RevisionGUID="c5897a9c-7893-4229-a14e-266e1cf8aa80" CreationDate="2023-10-02T14:57:41.697" UserId="543" Comment="deleted 23 characters in body" Text="I'm running a custom smoldot node, synced with a hosted bootnode, in a react-based application and attempting to interact with an ink! contract deployed to the network. My fork of smoldot accounts for an new field in block headers and nothing else. &#xD;&#xA;&#xD;&#xA;When attempting to use polkadotjs to query a contract, I receive an error `-32000: Error in call proof: UnusedProofEntry` which is coming from [smoldot, here](https://github.com/ideal-lab5/smoldot/blob/7bb3d7ed199b5eb71e3efdc613847122f85a05a1/lib/src/trie/proof_decode.rs#L320). When using a locally running full node instead of smoldot in my react app, contract queries execute as expected. The query is also successful via the polkadotjs UI through the full node. When I use smoldot, there are unvisited_proof_entries (**only** when querying the contract, transactions work as expected). Any idea why this could be or how to resolve it?&#xD;&#xA;&#xD;&#xA;For example, using the default Flipper contract and attempting to query the contract's `get()` function results in the error: &#xD;&#xA;&#xD;&#xA;``` javascript&#xD;&#xA;let spec = JSON.stringify(chainSpec);&#xD;&#xA;let provider = new ScProvider(Sc, spec);&#xD;&#xA;await provider.connect();&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;await api.isReady;&#xD;&#xA;&#xD;&#xA;const keyring = new Keyring();&#xD;&#xA;const alice = keyring.addFromUri('//Alice', { name: 'Alice' }, 'sr25519')&#xD;&#xA;&#xD;&#xA;// load the flipper contract      &#xD;&#xA;const contract = new ContractPromise(api, contractMetadata, FLIPPER_CONTRACT_ADDR);      &#xD;&#xA;const storageDepositLimit = null&#xD;&#xA;const { gasRequired, storageDeposit, result, output } = &#xD;&#xA;        await contract.query.get(&#xD;&#xA;        alice.address,&#xD;&#xA;        {&#xD;&#xA;          gasLimit: api?.registry.createType('WeightV2', {&#xD;&#xA;            refTime: MAX_CALL_WEIGHT,&#xD;&#xA;            proofSize: PROOFSIZE,&#xD;&#xA;          }),&#xD;&#xA;          storageDepositLimit,&#xD;&#xA;        },&#xD;&#xA;      );&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40087" PostHistoryTypeId="5" PostId="10105" RevisionGUID="e3ffa59d-4310-4004-b890-e4cafde26ea4" CreationDate="2023-10-02T15:03:50.813" UserId="372" Comment="Point out that semantics are identical in empty-genesis edge case" Text="All the Substrate-based chains that I know of have **no transactions in the genesis block**.&#xD;&#xA;The genesis block is the same data structure as all other  blocks and therefore does have a body and a `Vec&lt;Extrinsic&gt;` that could have some extrinsics in it.&#xD;&#xA;&#xD;&#xA;I'm curious: **was Substrate intentionally designed this way**, or it just kind of turned out this way. And if it was not an intentional design decision, where might I look to make a genesis block that does have transactions in it?&#xD;&#xA;&#xD;&#xA;## Semantics of Genesis Transactions&#xD;&#xA;&#xD;&#xA;I can think of two reasonable ways the semantics of such transactions might work.&#xD;&#xA;&#xD;&#xA;1. They are not executed and are basically just grafitti. They are a way to summarize the chain's pre-history at launch time.&#xD;&#xA;&#xD;&#xA;2. They are executed on top of some pre-state just like every other block. If this approach is taken, it would mean that any state set up in eg a chain spec file would be genesis _pre_-state.&#xD;&#xA;&#xD;&#xA;Note that these two semantics are identical in the edge case where there are no transactions in the genesis block. So picking either one of them would be safe and not &quot;break&quot; old chains in any way.&#xD;&#xA;&#xD;&#xA;## Usecases for Genesis Transactions&#xD;&#xA;&#xD;&#xA;I can think of a few usecases for having transactions in the genesis block.&#xD;&#xA;&#xD;&#xA;1. Setting a timestamp inherent in the genesis block.&#xD;&#xA;&#xD;&#xA;2. Remark: Chancellor on brink of Second bailout for Banks. (See also [this question](https://substrate.stackexchange.com/questions/2216/is-it-possible-to-add-some-text-in-genesis-block).)&#xD;&#xA;&#xD;&#xA;3. A more elegant way to express genesis state. This usecase relies on semantics #2. Many chains could start with a truly empty genesis pre-state, and then execute the genesis transactions to get the desired genesis state. As a classic example, consider a cryptocurrency that has no coins existing in the genesis pre-state and then has some mint extrinsics in the genesis block to create the initial distribution. This has the advantage that the genesis state can be constructed from the genesis block itself instead of distributed separately." ContentLicense="CC BY-SA 4.0" />
  <row Id="40088" PostHistoryTypeId="5" PostId="10084" RevisionGUID="29f86485-61c5-4d06-8f34-18954a5ae511" CreationDate="2023-10-02T16:10:18.773" UserId="543" Comment="added 199 characters in body" Text="I'm running a custom smoldot node, synced with a hosted bootnode, in a react-based application and attempting to interact with an ink! contract deployed to the network. My fork of smoldot accounts for an new field in block headers and nothing else. I've attempted to test this with the substrate-contracts-node and with the smoldot main branch, however, there seems to be some issue beteween it and polkadotjs (On the contracts panel:&#xD;&#xA;`t.query.contracts.codeStorage is undefined`)&#xD;&#xA;&#xD;&#xA;When attempting to use polkadotjs to query a contract, I receive an error `-32000: Error in call proof: UnusedProofEntry` which is coming from [smoldot, here](https://github.com/ideal-lab5/smoldot/blob/7bb3d7ed199b5eb71e3efdc613847122f85a05a1/lib/src/trie/proof_decode.rs#L320). When using a locally running full node instead of smoldot in my react app, contract queries execute as expected. The query is also successful via the polkadotjs UI through the full node. When I use smoldot, there are unvisited_proof_entries (**only** when querying the contract, transactions work as expected). Any idea why this could be or how to resolve it?&#xD;&#xA;&#xD;&#xA;For example, using the default Flipper contract and attempting to query the contract's `get()` function results in the error: &#xD;&#xA;&#xD;&#xA;``` javascript&#xD;&#xA;let spec = JSON.stringify(chainSpec);&#xD;&#xA;let provider = new ScProvider(Sc, spec);&#xD;&#xA;await provider.connect();&#xD;&#xA;const api = await ApiPromise.create({ provider });&#xD;&#xA;await api.isReady;&#xD;&#xA;&#xD;&#xA;const keyring = new Keyring();&#xD;&#xA;const alice = keyring.addFromUri('//Alice', { name: 'Alice' }, 'sr25519')&#xD;&#xA;&#xD;&#xA;// load the flipper contract      &#xD;&#xA;const contract = new ContractPromise(api, contractMetadata, FLIPPER_CONTRACT_ADDR);      &#xD;&#xA;const storageDepositLimit = null&#xD;&#xA;const { gasRequired, storageDeposit, result, output } = &#xD;&#xA;        await contract.query.get(&#xD;&#xA;        alice.address,&#xD;&#xA;        {&#xD;&#xA;          gasLimit: api?.registry.createType('WeightV2', {&#xD;&#xA;            refTime: MAX_CALL_WEIGHT,&#xD;&#xA;            proofSize: PROOFSIZE,&#xD;&#xA;          }),&#xD;&#xA;          storageDepositLimit,&#xD;&#xA;        },&#xD;&#xA;      );&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40089" PostHistoryTypeId="2" PostId="10106" RevisionGUID="2842067c-25a2-4639-aaa4-252954a351f9" CreationDate="2023-10-02T19:06:43.520" UserId="4545" Text="There's code in Grandpa to have different &quot;Authority Weights&quot; assigned to each validator. It doesn't appear to be accessible beyond in a genesis block. Does someone know the intended purpose of that code? Why would you want to give certain authorities more weight in the finalization process?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40091" PostHistoryTypeId="1" PostId="10106" RevisionGUID="2842067c-25a2-4639-aaa4-252954a351f9" CreationDate="2023-10-02T19:06:43.520" UserId="4545" Text="Grandpa AuthorityWeights" ContentLicense="CC BY-SA 4.0" />
  <row Id="40092" PostHistoryTypeId="3" PostId="10106" RevisionGUID="2842067c-25a2-4639-aaa4-252954a351f9" CreationDate="2023-10-02T19:06:43.520" UserId="4545" Text="|pallet|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40093" PostHistoryTypeId="2" PostId="10107" RevisionGUID="81a0df15-3cc7-448e-af68-272c1207365e" CreationDate="2023-10-03T06:47:29.097" UserId="522" Text="\&#xD;&#xA;I would like to subscribe to the beefy justification stream on Rococo. The rpc for getFinalizedHead works fine, but I also require the justifications themselves.&#xD;&#xA;&#xD;&#xA;When I try to subscribe to the justifications using (in the polkadot-apps-ui/Developer/Javascript section):&#xD;&#xA;&#xD;&#xA;    const unsub = await api.rpc.beefy.subscribeJustifications((header) =&gt; {&#xD;&#xA;         console.log(`The last block has a timestamp of ${header}`);&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;I get the following error (when a new header is finalized):&#xD;&#xA;&#xD;&#xA;    h@https://polkadot.js.org/apps/modu.151b50df8afdab63.js:50:76373&#xD;&#xA;    createTypeUnsafe@https://polkadot.js.org/apps/modu.151b50df8afdab63.js:50:163502&#xD;&#xA;    _formatOutput@https://polkadot.js.org/apps/modu.151b50df8afdab63.js:50:5692&#xD;&#xA;    _formatResult@https://polkadot.js.org/apps/modu.151b50df8afdab63.js:50:3182&#xD;&#xA;    d@https://polkadot.js.org/apps/modu.151b50df8afdab63.js:50:4503&#xD;&#xA;    21899/y/this.__internal__onSocketMessageSubscribe@https://polkadot.js.org/apps/modu.151b50df8afdab63.js:50:24109&#xD;&#xA;    21899/y/this.__internal__onSocketMessage@https://polkadot.js.org/apps/modu.151b50df8afdab63.js:50:23088&#xD;&#xA;&#xD;&#xA;How can I get this to work?&#xD;&#xA;&#xD;&#xA;Any help is much appreciated\&#xD;&#xA;Please and thank you&#xD;&#xA;    " ContentLicense="CC BY-SA 4.0" />
  <row Id="40095" PostHistoryTypeId="1" PostId="10107" RevisionGUID="81a0df15-3cc7-448e-af68-272c1207365e" CreationDate="2023-10-03T06:47:29.097" UserId="522" Text="Beefy justification subscription is not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="40096" PostHistoryTypeId="3" PostId="10107" RevisionGUID="81a0df15-3cc7-448e-af68-272c1207365e" CreationDate="2023-10-03T06:47:29.097" UserId="522" Text="|rpc|finality|beefy|justification|subscription|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40098" PostHistoryTypeId="2" PostId="10108" RevisionGUID="6aa917fa-11b3-4ec6-a607-366ef7f2f7ef" CreationDate="2023-10-03T07:11:06.787" UserId="2762" Text="I believe the recommended approach in your case because you only want to disable a call is to customize the BaseCalleFilter (In [pallet_contract Config][1]) to filter out the calls you want to execute.&#xD;&#xA;&#xD;&#xA;More on this here: [How to set up `BaseCallFilter` to only allow a limited set of calls of one pallet to be executed?][2], with an interesting  [example][3] in the responses and here [Whitelist a call subset of a pallet][4].&#xD;&#xA;&#xD;&#xA;If you wanted to add logic on top of the pallet instead of just disable a call, you approach is could work, fork `pallet_contract` and make changes directly to the code but that means that any future updates and improvement to the `pallet_contract` you would have to manually fix it in your pallet. &#xD;&#xA;&#xD;&#xA;However in that scenario the recommended approach is to create a new pallet that acts as a &quot;wrapper pallet&quot; for the `pallet_contract` where you can add additional logic on top, in this case you would have to disable all calls from `pallet_contracts` and in your pallet have all calls forwarding to `pallet_contracts` except one. I wrote more about this approach here: [How to customize pallet_contracts?][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/contracts/src/lib.rs#L282&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1119/how-to-set-up-basecallfilter-to-only-allow-a-limited-set-of-calls-of-one-palle&#xD;&#xA;  [3]: https://github.com/paritytech/cumulus/blob/2fe7a2edba05155c6a5f0f3527e1001aad7aee2e/polkadot-parachains/statemint/src/lib.rs#L126&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/6362/whitelist-a-call-subset-of-a-pallet&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/9788/how-to-customize-pallet-contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="40100" PostHistoryTypeId="2" PostId="10109" RevisionGUID="2bf60bda-19d4-4546-b75d-12aa0c85e6ed" CreationDate="2023-10-03T07:34:38.463" UserId="4443" Text="I'm following substrate documentation in that build a blockchain tutorial while following the monitoring node metrics tutorial. &#xD;&#xA;&#xD;&#xA;I got stuck while installing prometheus on my ec2 instance is there any correct method to install prometheus. " ContentLicense="CC BY-SA 4.0" />
  <row Id="40102" PostHistoryTypeId="1" PostId="10109" RevisionGUID="2bf60bda-19d4-4546-b75d-12aa0c85e6ed" CreationDate="2023-10-03T07:34:38.463" UserId="4443" Text="Build a blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="40103" PostHistoryTypeId="3" PostId="10109" RevisionGUID="2bf60bda-19d4-4546-b75d-12aa0c85e6ed" CreationDate="2023-10-03T07:34:38.463" UserId="4443" Text="|substrate-node-template|substrate-node|blockchain|substrate-front-end|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40104" PostHistoryTypeId="2" PostId="10110" RevisionGUID="312aac64-ce3a-4cf3-9721-cf1640d0c776" CreationDate="2023-10-03T07:41:15.010" UserId="4425" Text="        #![cfg_attr(not(feature = &quot;std&quot;), no_std, no_main)]&#xD;&#xA;    &#xD;&#xA;    #[ink::contract]&#xD;&#xA;    mod arm {&#xD;&#xA;        use ink::prelude::vec::Vec;&#xD;&#xA;    &#xD;&#xA;        #[derive(scale::Decode, scale::Encode)]&#xD;&#xA;        #[cfg_attr(&#xD;&#xA;            feature = &quot;std&quot;,&#xD;&#xA;            derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;        )]&#xD;&#xA;        pub struct Arbiter {&#xD;&#xA;            voter_address: AccountId,&#xD;&#xA;            has_voted: bool,&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        #[derive(scale::Decode, scale::Encode)]&#xD;&#xA;        #[cfg_attr(&#xD;&#xA;            feature = &quot;std&quot;,&#xD;&#xA;            derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;        )]&#xD;&#xA;        pub struct X {&#xD;&#xA;            pub audit_id: u32,&#xD;&#xA;            pub arbiters: Vec&lt;Arbiter&gt;,&#xD;&#xA;            pub is_active: bool,&#xD;&#xA;            pub available_votes: u8,&#xD;&#xA;            pub decided_deadline: Timestamp,&#xD;&#xA;            pub decided_haircut: Balance,&#xD;&#xA;            pub admin_hit_time: Timestamp,&#xD;&#xA;        }&#xD;&#xA;        // use ink::primitives::AccountId;&#xD;&#xA;    &#xD;&#xA;        /// Defines the storage of your contract.&#xD;&#xA;        /// Add new fields to the below struct in order&#xD;&#xA;        /// to add new static storage fields to your contract.&#xD;&#xA;        #[ink(storage)]&#xD;&#xA;        pub struct Arm {&#xD;&#xA;            /// Stores a single `bool` value on the storage.&#xD;&#xA;            value: AccountId,&#xD;&#xA;        }&#xD;&#xA;    &#xD;&#xA;        impl Arm {&#xD;&#xA;            /// Constructor that initializes the `bool` value to the given `init_value`.&#xD;&#xA;            #[ink(constructor)]&#xD;&#xA;            pub fn new(init_value: AccountId) -&gt; Self {&#xD;&#xA;                Self { value: init_value }&#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;            /// Constructor that initializes the `bool` value to `false`.&#xD;&#xA;            /// A message that can be called on instantiated contracts.&#xD;&#xA;            /// This one flips the value of the stored `bool` from `true`&#xD;&#xA;            /// to `false` and vice versa.&#xD;&#xA;    &#xD;&#xA;            /// Simply returns the current value of our `bool`.&#xD;&#xA;            #[ink(message)]&#xD;&#xA;            pub fn get_owner(&amp;self) -&gt; AccountId {&#xD;&#xA;                let actual_provider = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                    .call(self.value)&#xD;&#xA;                    .gas_limit(0)&#xD;&#xA;                    .transferred_value(0)&#xD;&#xA;                    .exec_input(ink::env::call::ExecutionInput::new(&#xD;&#xA;                        ink::env::call::Selector::new(ink::selector_bytes!(&quot;know_your_admin&quot;)),&#xD;&#xA;                    ))&#xD;&#xA;                    .returns::&lt;AccountId&gt;()&#xD;&#xA;                    .invoke();&#xD;&#xA;                return actual_provider;&#xD;&#xA;            }&#xD;&#xA;            #[ink(message)]&#xD;&#xA;            pub fn get_struct_details(&amp;self) -&gt; u8 {&#xD;&#xA;                let vote_info: X = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                    .call(self.value)&#xD;&#xA;                    .gas_limit(0)&#xD;&#xA;                    .transferred_value(0)&#xD;&#xA;                    .exec_input(&#xD;&#xA;                        ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(&#xD;&#xA;                            ink::selector_bytes!(&quot;get_poll_info&quot;),&#xD;&#xA;                        ))&#xD;&#xA;                        .push_arg(0),&#xD;&#xA;            &#xD;&#xA;    &#xD;&#xA;                )&#xD;&#xA;                        .returns::&lt;X&gt;()&#xD;&#xA;                        .invoke();&#xD;&#xA;                    return vote_info.available_votes;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;This is just a trial contract to check the viability of performing this task in this manner, i.e, defining the struct in caller's contract as well and then trying to use it. &#xD;&#xA;It is not working. &#xD;&#xA;What am I doing wrong?&#xD;&#xA;Is there another way I could do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40106" PostHistoryTypeId="1" PostId="10110" RevisionGUID="312aac64-ce3a-4cf3-9721-cf1640d0c776" CreationDate="2023-10-03T07:41:15.010" UserId="4425" Text="I'm trying to access another contract's struct X in my contract. It is throwing error: panicked at 'Cross-contract call failed with Decode(Error)'" ContentLicense="CC BY-SA 4.0" />
  <row Id="40107" PostHistoryTypeId="3" PostId="10110" RevisionGUID="312aac64-ce3a-4cf3-9721-cf1640d0c776" CreationDate="2023-10-03T07:41:15.010" UserId="4425" Text="|ink|smart-contract|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40108" PostHistoryTypeId="2" PostId="10111" RevisionGUID="9354b850-3add-4d8a-aa21-1ab85b281dcf" CreationDate="2023-10-03T09:48:05.907" UserId="3317" Text="From looking at a piece of code of mine:&#xD;&#xA;```&#xD;&#xA;            let result = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                .call(self.governance_token)&#xD;&#xA;                .gas_limit(0)&#xD;&#xA;                .transferred_value(0)&#xD;&#xA;                .call_flags(CallFlags::default())&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;balance_of&quot;)))&#xD;&#xA;                        .push_arg(caller),&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;Balance&gt;()&#xD;&#xA;                .try_invoke();&#xD;&#xA;            match result {&#xD;&#xA;                EnvResult::Ok(MessageResult::Ok(result)) =&gt; result,&#xD;&#xA;                _ =&gt; unimplemented!(),&#xD;&#xA;            }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You might need to check what type `vote_info` is (maybe you still need to `unwrap` it)." ContentLicense="CC BY-SA 4.0" />
  <row Id="40110" PostHistoryTypeId="2" PostId="10112" RevisionGUID="49f84dae-a6a6-4bf4-8977-1d1e440048f8" CreationDate="2023-10-03T10:00:02.400" UserId="165" Text="You can find all crates released to creates.io under the [`parity-crate-owner`](https://crates.io/users/parity-crate-owner?sort=recent-updates) user.&#xD;&#xA;With each release of the Parity Polkadot node these crates are being released to crates.io too.&#xD;&#xA;&#xD;&#xA;You can see that the runtimes maintained by the Polkadot Technical Fellowship are already pointing their deps to these crates. Change made in PR [#28](https://github.com/polkadot-fellows/runtimes/pull/28)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For more context: https://forum.polkadot.network/t/publish-substrate-to-crates-io/949/28?u=alejandro" ContentLicense="CC BY-SA 4.0" />
  <row Id="40112" PostHistoryTypeId="5" PostId="6278" RevisionGUID="35561543-82c9-4458-8c39-dec296c7157b" CreationDate="2023-10-03T10:13:09.680" UserId="298" Comment="deleted 8 characters in body" Text="I am trying to send funds from parachain B (1001) to parachain A, but the [substrate docs][1] do not show completely how to transfer to parachain A (1000) (or it could at least be clearer).&#xD;&#xA;&#xD;&#xA;In my case parachain b is (2113) and parachain A is (2000).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;However, at `DepositAsset instruction` section 5. it says:&#xD;&#xA;&#xD;&#xA;_Specify the beneficiary to receive the deposited assets._&#xD;&#xA;&#xD;&#xA;_You can deposit the assets remaining into the sovereign account for parachain A or into a specific account. For this tutorial, the assets are deposited using a specified account address for the previously unfunded account KRIS-PUBS._&#xD;&#xA;&#xD;&#xA;It doesn't explicitly show how to send to Parachain A, either sovereign account or a target account within Parachain A.&#xD;&#xA;&#xD;&#xA;1) How do you send to a sovereign account in Parachain A?&#xD;&#xA;2) How do you send to specific account in Parachain A?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For easy replication here is the encoded call data from the docs: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0xc1028400da8255623a48e0cff4c515aa835ad22f0f4f4390945e7308f830d09e7ad79e74012a384fe857f14f13bf557a09ed42e4d05b2dad593239b430ae0b0c43a04e5374b5416baf52d182b43dfddd71428d0efd078ba8c3f760194e839b8436ce661781f400500004001f00010100020c000400000000070010a5d4e813000000000700e8764817000d01000400010100c0997c4f2b3a83eb07ef74a867cf672a25a2a30cc61abc936dcc994df77ba84a&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please also provide the encoded call data in the docs (or responses) if you can, so the call can be replicated quickly. &#xD;&#xA;&#xD;&#xA;Thanks for your support. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/connect-relay-and-parachains/transfer-assets-with-xcm/" ContentLicense="CC BY-SA 4.0" />
  <row Id="40113" PostHistoryTypeId="2" PostId="10113" RevisionGUID="c9faf306-3685-40c5-b27a-e534b8f2dbc0" CreationDate="2023-10-03T10:41:05.343" UserId="3711" Text="Contracts are upgraded between releases of the contracts pallet, see [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/contracts/src/migration/v15.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="40115" PostHistoryTypeId="5" PostId="10106" RevisionGUID="6a8bc3c9-3d8f-40ec-b29a-ef50f2af59f8" CreationDate="2023-10-03T12:52:48.897" UserId="4545" Comment="added 549 characters in body" Text="There's code in Grandpa to have different &quot;Authority Weights&quot; assigned to each validator. It doesn't appear to be accessible beyond in a genesis block. Does someone know the intended purpose of that code? Why would you want to give certain authorities more weight in the finalization process?&#xD;&#xA;&#xD;&#xA;____ Edit to include links ____&#xD;&#xA;&#xD;&#xA;AuthorityWeight here: https://github.com/paritytech/polkadot-sdk/blob/db3fd687262c68b115ab6724dfaa6a71d4a48a59/substrate/primitives/consensus/grandpa/src/lib.rs#L82&#xD;&#xA;&#xD;&#xA;Genesis allows supplying weight: https://github.com/paritytech/polkadot-sdk/blob/db3fd687262c68b115ab6724dfaa6a71d4a48a59/substrate/frame/grandpa/src/lib.rs#L348&#xD;&#xA;&#xD;&#xA;Weights are hardcoded to &quot;1&quot; after genesis:&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/db3fd687262c68b115ab6724dfaa6a71d4a48a59/substrate/frame/grandpa/src/lib.rs#L582&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40116" PostHistoryTypeId="2" PostId="10114" RevisionGUID="f7779900-8613-460d-81d5-f9e4b7338bea" CreationDate="2023-10-03T13:36:17.323" UserId="3711" Text="I'm trying to use `curl` to query an ink contract's storage using the RPC of substrate. I've looked at the below question&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/2508/how-do-i-call-the-rpc-method-contractinfoof-using-curl&#xD;&#xA;&#xD;&#xA;but it does not specify how exactly to do this. I've got as far as&#xD;&#xA;```&#xD;&#xA;curl -H 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;state_getKeys&quot;, &quot;id&quot;:2 }' localhost:9944&#xD;&#xA;```&#xD;&#xA;but this yields `{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:-32602,&quot;message&quot;:&quot;No more params&quot;},&quot;id&quot;:2}`. I know I need to supply further parameters to specify the contract address, but it is unclear how to do that.&#xD;&#xA;&#xD;&#xA;Here's the contract storage in ink&#xD;&#xA;```&#xD;&#xA;    #[derive(Default)]&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct MyContract&lt;KEY: StorageKey = ManualKey&lt;0xABCDEF01&gt;&gt; {&#xD;&#xA;        a: u8,&#xD;&#xA;        b: u8,&#xD;&#xA;        c: u8,&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've tried giving the contract storage a set key using `curl -H 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;state_getKeys&quot;, &quot;id&quot;:2, &quot;key&quot;:&quot;0xABCDEF01&quot; }' localhost:9944` with no avail, same error message.&#xD;&#xA;&#xD;&#xA;The contract's address is `5F4N6ctYoDk1yqD4bSRh6eFottkfPWrxSPAcpq2m78sMoarJ` in my substrate-contracts-node instance, I assume I need that somewhere in the command to specify the contract.&#xD;&#xA;&#xD;&#xA;Any ideas?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40118" PostHistoryTypeId="1" PostId="10114" RevisionGUID="f7779900-8613-460d-81d5-f9e4b7338bea" CreationDate="2023-10-03T13:36:17.323" UserId="3711" Text="How to curl `ink!` contract storage?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40119" PostHistoryTypeId="3" PostId="10114" RevisionGUID="f7779900-8613-460d-81d5-f9e4b7338bea" CreationDate="2023-10-03T13:36:17.323" UserId="3711" Text="|ink|smart-contract|rpc|substrate-node|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40120" PostHistoryTypeId="2" PostId="10115" RevisionGUID="78b8deb1-520b-44d0-a044-a2a71523d1e6" CreationDate="2023-10-03T15:14:08.530" UserId="3070" Text="We are using the typegen to create types for our custom chain.&#xD;&#xA;Following the [docs][1] &#xD;&#xA;&#xD;&#xA;The code that is generated is kinda strange. In the augment-api.ts file it tries to import all the other generated ts files, but it tries to import them as .js files which causes an error and our app wont build until we manually remove the &quot;.js&quot;  from each line every time we generate.&#xD;&#xA;```&#xD;&#xA;// Auto-generated via `yarn polkadot-types-from-chain`, do not edit&#xD;&#xA;/* eslint-disable */&#xD;&#xA;&#xD;&#xA;import './augment-api-consts.js';&#xD;&#xA;import './augment-api-errors.js';&#xD;&#xA;import './augment-api-events.js';&#xD;&#xA;import './augment-api-query.js';&#xD;&#xA;import './augment-api-tx.js';&#xD;&#xA;import './augment-api-rpc.js';&#xD;&#xA;import './augment-api-runtime.js';&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The other strange thing is that most all of the types used in the generated files are not found. For example in augment-api-query.ts in the &#xD;&#xA;```&#xD;&#xA; assets: {&#xD;&#xA;    ...   &#xD;&#xA;      asset: AugmentedQuery&lt;ApiType, (arg: u32 | AnyNumber | Uint8Array) =&gt; Observable&lt;Option&lt;PalletAssetsAssetDetails&gt;&gt;, [u32]&gt;;&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The PalletAssetsAssetDetails is not found. Many other types in all the generated files are also not found...&#xD;&#xA;&#xD;&#xA;using @polkadot/typegen 10.9.1&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/typegen/" ContentLicense="CC BY-SA 4.0" />
  <row Id="40122" PostHistoryTypeId="1" PostId="10115" RevisionGUID="78b8deb1-520b-44d0-a044-a2a71523d1e6" CreationDate="2023-10-03T15:14:08.530" UserId="3070" Text="Polkadot Typegen importing JS extension instead of TS" ContentLicense="CC BY-SA 4.0" />
  <row Id="40123" PostHistoryTypeId="3" PostId="10115" RevisionGUID="78b8deb1-520b-44d0-a044-a2a71523d1e6" CreationDate="2023-10-03T15:14:08.530" UserId="3070" Text="|polkadot-js|substrate-node-template|typescript|typegen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40125" PostHistoryTypeId="2" PostId="10116" RevisionGUID="cd05d72b-b312-41f8-83cf-314428d9157c" CreationDate="2023-10-03T15:27:42.130" UserId="3395" Text="I need to reset a pallet. To achieve this, I created a migration to remove all storage under the `MyPallet` key and subsequently changed the name of the pallet. I would like to know if this is the correct approach. I also have some conceptual questions:&#xD;&#xA;- Can I keep the pallet's name while also maintaining its previous index?&#xD;&#xA;- On the topic of migration: I'm using [clear_prefix][1]. How can I calculate the &quot;limit&quot; value to ensure my migration doesn't exceed the maximum weight?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/unhashed/fn.clear_prefix.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="40127" PostHistoryTypeId="1" PostId="10116" RevisionGUID="cd05d72b-b312-41f8-83cf-314428d9157c" CreationDate="2023-10-03T15:27:42.130" UserId="3395" Text="How to reset a pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="40128" PostHistoryTypeId="3" PostId="10116" RevisionGUID="cd05d72b-b312-41f8-83cf-314428d9157c" CreationDate="2023-10-03T15:27:42.130" UserId="3395" Text="|pallet|migration|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40129" PostHistoryTypeId="2" PostId="10117" RevisionGUID="ac93d53b-c20f-476e-8e2f-239b5d9e75b7" CreationDate="2023-10-03T15:49:42.893" UserId="4277" Text="I am using a DEX Pallet and it has multiple extrinsic functions, But I am thinking of developing a smart contract in Ink that will be calling the extrinsic functions of the pallet and the people who want to interact with DEX pallet extrinsic they will be dealing with the smart contract not directly with extrinsic. Is it possible? if yes how can I do that " ContentLicense="CC BY-SA 4.0" />
  <row Id="40131" PostHistoryTypeId="1" PostId="10117" RevisionGUID="ac93d53b-c20f-476e-8e2f-239b5d9e75b7" CreationDate="2023-10-03T15:49:42.893" UserId="4277" Text="Call the extrensic of a pallet from the ink smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="40132" PostHistoryTypeId="3" PostId="10117" RevisionGUID="ac93d53b-c20f-476e-8e2f-239b5d9e75b7" CreationDate="2023-10-03T15:49:42.893" UserId="4277" Text="|substrate-node-template|ink|pallet|pallet-dex|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40133" PostHistoryTypeId="2" PostId="10118" RevisionGUID="02ed9cf9-e2fa-422b-97b4-2a6100b293a9" CreationDate="2023-10-03T16:59:10.477" UserId="2985" Text="I was using substrate-node-template, I was creating some benchmarking functions&#xD;&#xA;&#xD;&#xA;I was able to use bounded_vec macro in tests.rs but, can't able to use it in the benchmarking.rs file&#xD;&#xA;&#xD;&#xA;my code&#xD;&#xA;```&#xD;&#xA;#![cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;use super::*;&#xD;&#xA;&#xD;&#xA;#[allow(unused)]&#xD;&#xA;use crate::Pallet as Template;&#xD;&#xA;use frame_benchmarking::v2::*;&#xD;&#xA;use frame_support::bounded_vec;&#xD;&#xA;use frame_system::RawOrigin;&#xD;&#xA;&#xD;&#xA;#[benchmarks]&#xD;&#xA;mod benchmarks {&#xD;&#xA;	use super::*;&#xD;&#xA;&#xD;&#xA;	#[benchmark]&#xD;&#xA;	fn store() {&#xD;&#xA;		let caller: T::AccountId = whitelisted_caller();&#xD;&#xA;		#[extrinsic_call]&#xD;&#xA;		store(&#xD;&#xA;			RawOrigin::Signed(caller),&#xD;&#xA;			b&quot;1&quot;.to_vec().try_into().unwrap(),&#xD;&#xA;			b&quot;1&quot;.to_vec().try_into().unwrap(),&#xD;&#xA;			b&quot;1&quot;.to_vec().try_into().unwrap(),&#xD;&#xA;			bounded_vec![Types{ key: b&quot;1&quot;.to_vec().try_into().unwrap(), is_accepted: false }],&#xD;&#xA;		);&#xD;&#xA;	}&#xD;&#xA;    impl_benchmark_test_suite!(Template, crate::mock::new_test_ext(), crate::mock::Test);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;i was working fine when trying to compile ```cargo t -p pallet-template -F runtime-benchmarks```&#xD;&#xA;&#xD;&#xA;but, it was throwing errors while trying to compile with &#xD;&#xA;```cargo t -p node-template-runtime -F runtime-benchmarks```&#xD;&#xA;&#xD;&#xA;error&#xD;&#xA; ```&#xD;&#xA; error: cannot determine resolution for the macro `bounded_vec`&#xD;&#xA;    --&gt; /mnt/c/Users/pavan/PROJECTS/substrate-node-template/pallets/template/src/benchmarking.rs:24:4&#xD;&#xA;     |&#xD;&#xA;  24 |             bounded_vec![Types{ key: b&quot;1&quot;.to_vec().try_into().unwrap(), is_accepted: false }],&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40135" PostHistoryTypeId="1" PostId="10118" RevisionGUID="02ed9cf9-e2fa-422b-97b4-2a6100b293a9" CreationDate="2023-10-03T16:59:10.477" UserId="2985" Text="how to use bounded_vec macro in benchmarking.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="40136" PostHistoryTypeId="3" PostId="10118" RevisionGUID="02ed9cf9-e2fa-422b-97b4-2a6100b293a9" CreationDate="2023-10-03T16:59:10.477" UserId="2985" Text="|substrate-node-template|pallet|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40137" PostHistoryTypeId="2" PostId="10119" RevisionGUID="5e5f43b8-197a-47a8-89ec-73ac2dc1f2ca" CreationDate="2023-10-03T20:00:28.550" UserId="543" Text="You can do this by writing a custom chain extension and configuring it in your contract. &#xD;&#xA;The guide shows you how to configure it in your contract https://use.ink/macros-attributes/chain-extension/ and this example https://github.com/paritytech/ink-examples/tree/main/rand-extension shows how to implement a rudimentary chain extension in your runtime. &#xD;&#xA;&#xD;&#xA;As an aside, if the functionality of the contract is so reliant on the DEX pallet's extrinsics, why not implement it as a pallet instead? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40140" PostHistoryTypeId="5" PostId="10116" RevisionGUID="d7417ebf-d39a-4036-9f7c-c07ea18e29aa" CreationDate="2023-10-04T07:27:11.787" UserId="3136" Comment="modify in body and title" Text="&quot;I'm planning to reset a pallet. To do this, I've developed a migration process aimed at clearing all storage associated with the MyPallet key. Additionally, I've followed up by renaming the pallet. I'm seeking guidance to confirm whether this approach is the recommended method. Furthermore, I have some conceptual inquiries I'd like to address.&quot;&#xD;&#xA;- Can I keep the pallet's name while also maintaining its previous index?&#xD;&#xA;- On the topic of migration: I'm using [clear_prefix][1]. How can I calculate the &quot;limit&quot; value to ensure my migration doesn't exceed the maximum weight?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/unhashed/fn.clear_prefix.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="40141" PostHistoryTypeId="24" PostId="10116" RevisionGUID="d7417ebf-d39a-4036-9f7c-c07ea18e29aa" CreationDate="2023-10-04T07:27:11.787" Comment="Proposed by 3136 approved by 3395 edit id of 590" ContentLicense="CC BY-SA 4.0" />
  <row Id="40142" PostHistoryTypeId="5" PostId="10116" RevisionGUID="d3b63d9c-e5e6-4e68-a252-a6427be102e5" CreationDate="2023-10-04T07:27:36.900" UserId="3395" Comment="deleted 2 characters in body" Text="I'm planning to reset a pallet. To do this, I've developed a migration process aimed at clearing all storage associated with the MyPallet key. Additionally, I've followed up by renaming the pallet. I'm seeking guidance to confirm whether this approach is the recommended method. Furthermore, I have some conceptual inquiries I'd like to address.&#xD;&#xA;- Can I keep the pallet's name while also maintaining its previous index?&#xD;&#xA;- On the topic of migration: I'm using [clear_prefix][1]. How can I calculate the &quot;limit&quot; value to ensure my migration doesn't exceed the maximum weight?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/unhashed/fn.clear_prefix.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="40143" PostHistoryTypeId="2" PostId="10120" RevisionGUID="35546119-220a-43cc-8744-36a012c18437" CreationDate="2023-10-04T07:37:20.790" UserId="2762" Text="Check `RemovePallet`, is a utility struct used to remove all storage items associated with a specific pallet. See the code and an example of how to use it here: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/support/src/migrations.rs#L296&#xD;&#xA;&#xD;&#xA;But important check the warning on the comments:&#xD;&#xA;```rs&#xD;&#xA;/// WARNING: `RemovePallet` has no guard rails preventing it from bricking the chain if the&#xD;&#xA;/// operation of removing storage for the given pallet would exceed the block weight limit.&#xD;&#xA;///&#xD;&#xA;/// If your pallet has too many keys to be removed in a single block, it is advised to wait for&#xD;&#xA;/// a multi-block scheduler currently under development which will allow for removal of storage&#xD;&#xA;/// items (and performing other heavy migrations) over multiple blocks&#xD;&#xA;/// (see &lt;https://github.com/paritytech/substrate/issues/13690&gt;).&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is what was used to remove the governance v1 pallets when it was migrated to OpenGov2, see the PR: [migration: unlock/unreserve Gov v1 balances, remove Gov V1 pallets from polkadot runtime, and remove Gov V1 pallet key/values from storage][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/pull/7314" ContentLicense="CC BY-SA 4.0" />
  <row Id="40145" PostHistoryTypeId="2" PostId="10121" RevisionGUID="17c89f77-8889-4518-a6ae-67ea9dcbead7" CreationDate="2023-10-04T08:24:16.293" UserId="2762" Text="I have been looking into the [hrmp pallets][1] where some of the extrinsics needs to have a witness data variable provided as a parameter.&#xD;&#xA;&#xD;&#xA;Example: &#xD;&#xA;```rs&#xD;&#xA;/// Total number of opening channels must be provided as witness data.&#xD;&#xA;#[pallet::weight(&lt;T as Config&gt;::WeightInfo::force_process_hrmp_open(*_channels))]&#xD;&#xA;pub fn force_process_hrmp_open(origin: OriginFor&lt;T&gt;, _channels: u32)` &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I found on this [previous StackExchange answer][2] that using a length witness as argument is a solution to calculate the weights of a extrinsic where the complexity is dictated by the number of items held in storage. And another example of another pallet with this approach ([Alliance][3]).&#xD;&#xA;&#xD;&#xA;My question here is if this is only for benchmarking? and is there an alternative for this approach?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/runtime/parachains/src/hrmp.rs&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/8053/reading-from-storage-in-weight-annotation/8056#8056&#xD;&#xA;  [3]: https://github.com/paritytech/substrate/blob/7bbfe737a180e548ace7e819099dcb62cf48fa11/frame/alliance/src/lib.rs#L606C3-L609C36" ContentLicense="CC BY-SA 4.0" />
  <row Id="40147" PostHistoryTypeId="1" PostId="10121" RevisionGUID="17c89f77-8889-4518-a6ae-67ea9dcbead7" CreationDate="2023-10-04T08:24:16.293" UserId="2762" Text="Witness data for Benchmarking" ContentLicense="CC BY-SA 4.0" />
  <row Id="40148" PostHistoryTypeId="3" PostId="10121" RevisionGUID="17c89f77-8889-4518-a6ae-67ea9dcbead7" CreationDate="2023-10-04T08:24:16.293" UserId="2762" Text="|benchmarking|weight|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40149" PostHistoryTypeId="2" PostId="10122" RevisionGUID="781e32a8-f74c-42c7-8cda-dd0aa5ef54eb" CreationDate="2023-10-04T08:26:43.560" UserId="445" Text="is there anyone experienced in configuring Subsquid indexer who can assist me with resolving Aleph Zero Processor Configuration? &#xD;&#xA;&#xD;&#xA;I haven't been able to locate any templates related to Aleph Zero Subsquid. &#xD;&#xA;&#xD;&#xA;I've also raised this issue on GitHub.&#xD;&#xA;https://github.com/subsquid/squid-sdk/issues/204" ContentLicense="CC BY-SA 4.0" />
  <row Id="40151" PostHistoryTypeId="1" PostId="10122" RevisionGUID="781e32a8-f74c-42c7-8cda-dd0aa5ef54eb" CreationDate="2023-10-04T08:26:43.560" UserId="445" Text="Cannot run Aleph Zero's processor in Subsquid" ContentLicense="CC BY-SA 4.0" />
  <row Id="40152" PostHistoryTypeId="3" PostId="10122" RevisionGUID="781e32a8-f74c-42c7-8cda-dd0aa5ef54eb" CreationDate="2023-10-04T08:26:43.560" UserId="445" Text="|subsquid|indexer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40153" PostHistoryTypeId="2" PostId="10123" RevisionGUID="8c2aafcb-20a8-4137-8cc1-e8b662828d1f" CreationDate="2023-10-04T10:19:38.170" UserId="3123" Text="In pallet config, it would be convenient to require the `AccountData` type to implement a given trait, like:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config:&#xD;&#xA;    frame_system::Config&lt;AccountData: SomeCustomTrait&gt;&#xD;&#xA;    + // other requirements&#xD;&#xA;{&#xD;&#xA;    // [...]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But this raises the error&#xD;&#xA;&#xD;&#xA;&gt; associated type bounds are unstable&#xD;&#xA;&#xD;&#xA;(https://github.com/rust-lang/rust/issues/52662)&#xD;&#xA;&#xD;&#xA;What would be a workaround to allow this kind of behaviour until this is a stable Rust feature?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40155" PostHistoryTypeId="1" PostId="10123" RevisionGUID="8c2aafcb-20a8-4137-8cc1-e8b662828d1f" CreationDate="2023-10-04T10:19:38.170" UserId="3123" Text="How to provide an AccountData type implementing some trait?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40156" PostHistoryTypeId="3" PostId="10123" RevisionGUID="8c2aafcb-20a8-4137-8cc1-e8b662828d1f" CreationDate="2023-10-04T10:19:38.170" UserId="3123" Text="|accountdata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40157" PostHistoryTypeId="2" PostId="10124" RevisionGUID="acd0a89e-444e-4303-8e95-1dae4720839b" CreationDate="2023-10-04T10:35:00.273" UserId="2722" Text="i wanna to create pallet in substrate . i faced this error . how can i solve this problem ? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    /// Edit this file to define custom logic or remove it if it is not needed.&#xD;&#xA;    /// Learn more about FRAME and the core library of Substrate FRAME pallets:&#xD;&#xA;    /// &lt;https://docs.substrate.io/reference/frame-pallets/&gt;&#xD;&#xA;    use codec::alloc::vec;&#xD;&#xA;    use frame_support::{&#xD;&#xA;    	inherent::Vec,&#xD;&#xA;    	pallet_prelude::{ValueQuery, *},&#xD;&#xA;    	sp_runtime::{&#xD;&#xA;    		traits::{AccountIdConversion, AtLeast32BitUnsigned, CheckedAdd, Hash, Member, One},&#xD;&#xA;    		DispatchError, SaturatedConversion,&#xD;&#xA;    	},&#xD;&#xA;    	traits::{ExistenceRequirement, Get, ReservableCurrency},&#xD;&#xA;    	transactional, PalletId, Twox64Concat,&#xD;&#xA;    };&#xD;&#xA;    use frame_system::Config as SystemConfig;&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    use sp_runtime::traits::UniqueSaturatedFrom;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod mock;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests;&#xD;&#xA;    &#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    mod benchmarking;&#xD;&#xA;    &#xD;&#xA;    mod functions;&#xD;&#xA;    mod structs;&#xD;&#xA;    mod types;&#xD;&#xA;    &#xD;&#xA;    use structs::labels::Labels::RegisterInputLabelInfo;&#xD;&#xA;    use types::types::Types::{&#xD;&#xA;    	AccountOf, ArtistInfo, ArtistInfoDetail, BalanceOf, HashId, LabelsDetail,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    &#xD;&#xA;    	use super::*;&#xD;&#xA;    &#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    		type Currency: ReservableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;    &#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type StackLimit: Get&lt;u32&gt;;&#xD;&#xA;    &#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type PalletId: Get&lt;PalletId&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn something)]&#xD;&#xA;    	pub type Something&lt;T&gt; = StorageValue&lt;_, u32&gt;;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn labels)]&#xD;&#xA;    	pub(super) type Labels&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;    		_,&#xD;&#xA;    		Twox64Concat,&#xD;&#xA;    		AccountOf&lt;T&gt;,&#xD;&#xA;    		Twox64Concat,&#xD;&#xA;    		HashId&lt;T&gt;,&#xD;&#xA;    		LabelsDetail&lt;T&gt;,&#xD;&#xA;    		OptionQuery,&#xD;&#xA;    	&gt;;&#xD;&#xA;    &#xD;&#xA;    	// Pallets use events to inform users when important changes are made.&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/events-errors/&#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// Event documentation should end with an array that provides descriptive names for event&#xD;&#xA;    		/// parameters. [something, who]&#xD;&#xA;    		SomethingStored { something: u32, who: T::AccountId },&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Errors inform users that something went wrong.&#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// Error names should be descriptive.&#xD;&#xA;    		NoneValue,&#xD;&#xA;    		/// Errors should have helpful documentation associated with them.&#xD;&#xA;    		StorageOverflow,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		#[pallet::call_index(0)]&#xD;&#xA;    		#[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;    		pub fn register_labels(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			info: RegisterInputLabelInfo,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			let owner = ensure_signed(origin)?;&#xD;&#xA;    			let label_id: HashId&lt;T&gt; = T::Hashing::hash_of(&amp;info.label_name);&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		#[pallet::call_index(1)]&#xD;&#xA;    		#[pallet::weight(10_000 + T::DbWeight::get().reads_writes(1,1).ref_time())]&#xD;&#xA;    		pub fn cause_error(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;    			let _who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Read a value from storage.&#xD;&#xA;    			match &lt;Something&lt;T&gt;&gt;::get() {&#xD;&#xA;    				// Return an error if the value has not been set.&#xD;&#xA;    				None =&gt; return Err(Error::&lt;T&gt;::NoneValue.into()),&#xD;&#xA;    				Some(old) =&gt; {&#xD;&#xA;    					let new = old.checked_add(1).ok_or(Error::&lt;T&gt;::StorageOverflow)?;&#xD;&#xA;    					&lt;Something&lt;T&gt;&gt;::put(new);&#xD;&#xA;    					Ok(())&#xD;&#xA;    				},&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`Types.rs :`&#xD;&#xA;    &#xD;&#xA;    use super::*;&#xD;&#xA;    &#xD;&#xA;    pub mod Types {&#xD;&#xA;    &#xD;&#xA;    	pub use crate::{&#xD;&#xA;    		pallet::Config,&#xD;&#xA;    		structs::{&#xD;&#xA;    			artist::Artist::ArtistInfo,&#xD;&#xA;    			labels::Labels::{LabelInfo, OperationalContact},&#xD;&#xA;    		},&#xD;&#xA;    	};&#xD;&#xA;    	use frame_support::traits::Currency;&#xD;&#xA;    	use frame_system::Config as SystemConfig;&#xD;&#xA;    &#xD;&#xA;    	pub type BalanceOf&lt;T&gt; =&#xD;&#xA;    		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as SystemConfig&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;    &#xD;&#xA;    	pub type HashId&lt;T&gt; = &lt;T as frame_system::Config&gt;::Hash;&#xD;&#xA;    &#xD;&#xA;    	pub type AccountOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;    &#xD;&#xA;    	pub type LabelsDetail&lt;T&gt; = LabelInfo&lt;T&gt;;&#xD;&#xA;    &#xD;&#xA;    	pub type ArtistInfoDetail&lt;T&gt; = ArtistInfo&lt;AccountOf&lt;T&gt;&gt;;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;`Labels.rs:`&#xD;&#xA;&#xD;&#xA;    use codec::{Decode, Encode, MaxEncodedLen};&#xD;&#xA;    use frame_support::{inherent::Vec, traits::ConstU32, BoundedVec};&#xD;&#xA;    use scale_info::TypeInfo;&#xD;&#xA;    use sp_runtime::RuntimeDebug;&#xD;&#xA;    &#xD;&#xA;    pub mod Labels {&#xD;&#xA;    	use super::*;&#xD;&#xA;    &#xD;&#xA;    	#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    	pub struct LabelInfo&lt;T: crate::Config&gt; {&#xD;&#xA;    		pub owner: T::AccountId,&#xD;&#xA;    		pub label_id: T::Hashing,&#xD;&#xA;    		pub label_name: BoundedVec&lt;u8, ConstU32&lt;128&gt;&gt;,&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i faced this error and i dont know how can i sovle this problem . &#xD;&#xA;&#xD;&#xA;&gt;error[E0277]: the trait bound `LabelInfo&lt;T&gt;: parity_scale_codec::Decode` is not satisfied&#xD;&#xA;     --&gt; /root/Pikamo_Chain/frame/copy-right/src/lib.rs:72:15&#xD;&#xA;      |&#xD;&#xA;  72  |     #[pallet::storage]    &#xD;&#xA;      |               ^^^^^^^ the trait `parity_scale_codec::Decode` is not implemented for `LabelInfo&lt;T&gt;`&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40159" PostHistoryTypeId="1" PostId="10124" RevisionGUID="acd0a89e-444e-4303-8e95-1dae4720839b" CreationDate="2023-10-04T10:35:00.273" UserId="2722" Text="error[E0277]: the trait bound `LabelInfo&lt;T&gt;: parity_scale_codec::Decode` is not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="40160" PostHistoryTypeId="3" PostId="10124" RevisionGUID="acd0a89e-444e-4303-8e95-1dae4720839b" CreationDate="2023-10-04T10:35:00.273" UserId="2722" Text="|substrate-node-template|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40161" PostHistoryTypeId="5" PostId="10124" RevisionGUID="4b6b8bd4-1d81-4037-8bf0-0c041413abfd" CreationDate="2023-10-04T10:42:00.960" UserId="2722" Comment="added 134 characters in body" Text="i wanna to create pallet in substrate . i faced this error . how can i solve this problem ? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;    &#xD;&#xA;    /// Edit this file to define custom logic or remove it if it is not needed.&#xD;&#xA;    /// Learn more about FRAME and the core library of Substrate FRAME pallets:&#xD;&#xA;    /// &lt;https://docs.substrate.io/reference/frame-pallets/&gt;&#xD;&#xA;    use codec::alloc::vec;&#xD;&#xA;    use frame_support::{&#xD;&#xA;    	inherent::Vec,&#xD;&#xA;    	pallet_prelude::{ValueQuery, *},&#xD;&#xA;    	sp_runtime::{&#xD;&#xA;    		traits::{AccountIdConversion, AtLeast32BitUnsigned, CheckedAdd, Hash, Member, One},&#xD;&#xA;    		DispatchError, SaturatedConversion,&#xD;&#xA;    	},&#xD;&#xA;    	traits::{ExistenceRequirement, Get, ReservableCurrency},&#xD;&#xA;    	transactional, PalletId, Twox64Concat,&#xD;&#xA;    };&#xD;&#xA;    use frame_system::Config as SystemConfig;&#xD;&#xA;    pub use pallet::*;&#xD;&#xA;    use sp_runtime::traits::UniqueSaturatedFrom;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod mock;&#xD;&#xA;    &#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests;&#xD;&#xA;    &#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;    mod benchmarking;&#xD;&#xA;    &#xD;&#xA;    mod functions;&#xD;&#xA;    mod structs;&#xD;&#xA;    mod types;&#xD;&#xA;    &#xD;&#xA;    use structs::labels::Labels::RegisterInputLabelInfo;&#xD;&#xA;    use types::types::Types::{&#xD;&#xA;    	AccountOf, ArtistInfo, ArtistInfoDetail, BalanceOf, HashId, LabelsDetail,&#xD;&#xA;    };&#xD;&#xA;    &#xD;&#xA;    #[frame_support::pallet]&#xD;&#xA;    pub mod pallet {&#xD;&#xA;    &#xD;&#xA;    	use super::*;&#xD;&#xA;    &#xD;&#xA;    	use frame_support::pallet_prelude::*;&#xD;&#xA;    	use frame_system::pallet_prelude::*;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::pallet]&#xD;&#xA;    	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;    	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;    &#xD;&#xA;    	/// Configure the pallet by specifying the parameters and types on which it depends.&#xD;&#xA;    	#[pallet::config]&#xD;&#xA;    	pub trait Config: frame_system::Config {&#xD;&#xA;    		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;    		type Currency: ReservableCurrency&lt;Self::AccountId&gt;;&#xD;&#xA;    &#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type StackLimit: Get&lt;u32&gt;;&#xD;&#xA;    &#xD;&#xA;    		#[pallet::constant]&#xD;&#xA;    		type PalletId: Get&lt;PalletId&gt;;&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	&#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn something)]&#xD;&#xA;    	pub type Something&lt;T&gt; = StorageValue&lt;_, u32&gt;;&#xD;&#xA;    &#xD;&#xA;    	#[pallet::storage]&#xD;&#xA;    	#[pallet::getter(fn labels)]&#xD;&#xA;    	pub(super) type Labels&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;    		_,&#xD;&#xA;    		Twox64Concat,&#xD;&#xA;    		AccountOf&lt;T&gt;,&#xD;&#xA;    		Twox64Concat,&#xD;&#xA;    		HashId&lt;T&gt;,&#xD;&#xA;    		LabelsDetail&lt;T&gt;,&#xD;&#xA;    		OptionQuery,&#xD;&#xA;    	&gt;;&#xD;&#xA;    &#xD;&#xA;    	// Pallets use events to inform users when important changes are made.&#xD;&#xA;    	// https://docs.substrate.io/main-docs/build/events-errors/&#xD;&#xA;    	#[pallet::event]&#xD;&#xA;    	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;    	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;    		/// Event documentation should end with an array that provides descriptive names for event&#xD;&#xA;    		/// parameters. [something, who]&#xD;&#xA;    		SomethingStored { something: u32, who: T::AccountId },&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	// Errors inform users that something went wrong.&#xD;&#xA;    	#[pallet::error]&#xD;&#xA;    	pub enum Error&lt;T&gt; {&#xD;&#xA;    		/// Error names should be descriptive.&#xD;&#xA;    		NoneValue,&#xD;&#xA;    		/// Errors should have helpful documentation associated with them.&#xD;&#xA;    		StorageOverflow,&#xD;&#xA;    	}&#xD;&#xA;    &#xD;&#xA;    	#[pallet::call]&#xD;&#xA;    	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;    		#[pallet::call_index(0)]&#xD;&#xA;    		#[pallet::weight(10_000 + T::DbWeight::get().writes(1).ref_time())]&#xD;&#xA;    		pub fn register_labels(&#xD;&#xA;    			origin: OriginFor&lt;T&gt;,&#xD;&#xA;    			info: RegisterInputLabelInfo,&#xD;&#xA;    		) -&gt; DispatchResult {&#xD;&#xA;    			let owner = ensure_signed(origin)?;&#xD;&#xA;    			let label_id: HashId&lt;T&gt; = T::Hashing::hash_of(&amp;info.label_name);&#xD;&#xA;    			Ok(())&#xD;&#xA;    		}&#xD;&#xA;    &#xD;&#xA;    		#[pallet::call_index(1)]&#xD;&#xA;    		#[pallet::weight(10_000 + T::DbWeight::get().reads_writes(1,1).ref_time())]&#xD;&#xA;    		pub fn cause_error(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;    			let _who = ensure_signed(origin)?;&#xD;&#xA;    &#xD;&#xA;    			// Read a value from storage.&#xD;&#xA;    			match &lt;Something&lt;T&gt;&gt;::get() {&#xD;&#xA;    				// Return an error if the value has not been set.&#xD;&#xA;    				None =&gt; return Err(Error::&lt;T&gt;::NoneValue.into()),&#xD;&#xA;    				Some(old) =&gt; {&#xD;&#xA;    					let new = old.checked_add(1).ok_or(Error::&lt;T&gt;::StorageOverflow)?;&#xD;&#xA;    					&lt;Something&lt;T&gt;&gt;::put(new);&#xD;&#xA;    					Ok(())&#xD;&#xA;    				},&#xD;&#xA;    			}&#xD;&#xA;    		}&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;`Types.rs :`&#xD;&#xA;    &#xD;&#xA;    use super::*;&#xD;&#xA;    &#xD;&#xA;    pub mod Types {&#xD;&#xA;    &#xD;&#xA;    	pub use crate::{&#xD;&#xA;    		pallet::Config,&#xD;&#xA;    		structs::{&#xD;&#xA;    			artist::Artist::ArtistInfo,&#xD;&#xA;    			labels::Labels::{LabelInfo, OperationalContact},&#xD;&#xA;    		},&#xD;&#xA;    	};&#xD;&#xA;    	use frame_support::traits::Currency;&#xD;&#xA;    	use frame_system::Config as SystemConfig;&#xD;&#xA;    &#xD;&#xA;    	pub type BalanceOf&lt;T&gt; =&#xD;&#xA;    		&lt;&lt;T as Config&gt;::Currency as Currency&lt;&lt;T as SystemConfig&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;    &#xD;&#xA;    	pub type HashId&lt;T&gt; = &lt;T as frame_system::Config&gt;::Hash;&#xD;&#xA;    &#xD;&#xA;    	pub type AccountOf&lt;T&gt; = &lt;T as frame_system::Config&gt;::AccountId;&#xD;&#xA;    &#xD;&#xA;    	pub type LabelsDetail&lt;T&gt; = LabelInfo&lt;T&gt;;&#xD;&#xA;    &#xD;&#xA;    	pub type ArtistInfoDetail&lt;T&gt; = ArtistInfo&lt;AccountOf&lt;T&gt;&gt;;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;`Labels.rs:`&#xD;&#xA;&#xD;&#xA;    use codec::{Decode, Encode, MaxEncodedLen};&#xD;&#xA;    use frame_support::{inherent::Vec, traits::ConstU32, BoundedVec};&#xD;&#xA;    use scale_info::TypeInfo;&#xD;&#xA;    use sp_runtime::RuntimeDebug;&#xD;&#xA;    &#xD;&#xA;    pub mod Labels {&#xD;&#xA;    	use super::*;&#xD;&#xA;    &#xD;&#xA;    	#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    	pub struct LabelInfo&lt;T: crate::Config&gt; {&#xD;&#xA;    		pub owner: T::AccountId,&#xD;&#xA;    		pub label_id: T::Hashing,&#xD;&#xA;    		pub label_name: BoundedVec&lt;u8, ConstU32&lt;128&gt;&gt;,&#xD;&#xA;    	}&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;i faced this error and i dont know how can i sovle this problem . &#xD;&#xA;&#xD;&#xA;&gt;error[E0277]: the trait bound `LabelInfo&lt;T&gt;: parity_scale_codec::Decode` is not satisfied&#xD;&#xA;     --&gt; /root/Pikamo_Chain/frame/lib.rs:72:15&#xD;&#xA;      |&#xD;&#xA;  72  |     #[pallet::storage]    &#xD;&#xA;      |               ^^^^^^^ the trait `parity_scale_codec::Decode` is not implemented for `LabelInfo&lt;T&gt;`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; #[pallet::storage]    &#xD;&#xA;      |               ^^^^^^^ the trait `parity_scale_codec::Decode` is not implemented for `LabelInfo&lt;T&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="40162" PostHistoryTypeId="2" PostId="10125" RevisionGUID="83403755-b588-46c4-9837-0362b686913b" CreationDate="2023-10-04T13:09:16.580" UserId="3317" Text="In stead of providing a generic `T: Config` you can also provide generics for your field types:&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct LabelInfo&lt;AccountId, Hashing&gt; {&#xD;&#xA;    pub owner: AccountId,&#xD;&#xA;    pub label_id: Hashing,&#xD;&#xA;    pub label_name: BoundedVec&lt;u8, ConstU32&lt;128&gt;&gt;,&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40164" PostHistoryTypeId="5" PostId="10125" RevisionGUID="3fe07258-70e7-4e77-9c78-49953478091e" CreationDate="2023-10-04T13:21:15.033" UserId="3317" Comment="added 392 characters in body" Text="In stead of providing a generic `T: Config` to your struct you can also provide generics for your fields:&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct LabelInfo&lt;AccountId, Hashing&gt; {&#xD;&#xA;    pub owner: AccountId,&#xD;&#xA;    pub label_id: Hashing,&#xD;&#xA;    pub label_name: BoundedVec&lt;u8, ConstU32&lt;128&gt;&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My reasoning: when bounding your generic argument to your pallet's `Config` trait, rust macros want this `Config` to have all those traits implemented. &#xD;&#xA;&#xD;&#xA;Now you are not using the pallet's `Config` in any way and declaring the fields of the struct as generic. In your pallet's code you will define those fields with `Config::AccountId` which implements those necessary traits." ContentLicense="CC BY-SA 4.0" />
  <row Id="40165" PostHistoryTypeId="2" PostId="10126" RevisionGUID="62566bde-002f-4e2f-ae7f-27bed23a0652" CreationDate="2023-10-04T13:45:39.000" UserId="3538" Text="I have a chain similar to mentioned in [this](https://substrate.stackexchange.com/questions/7837/is-it-possible-to-use-ink-with-ethereum-style-accounts) question, where I'm trying to deploy `ink!` smart contracts. I'm setting my `Environment` like this:&#xD;&#xA;```lang-rust&#xD;&#xA;use ink::env::{Environment, DefaultEnvironment};&#xD;&#xA;use fp_account::AccountId20;&#xD;&#xA;&#xD;&#xA;pub struct EthereumEnvironment;&#xD;&#xA;&#xD;&#xA;impl Environment for EthereumEnvironment {&#xD;&#xA;    const MAX_EVENT_TOPICS: usize = &lt;DefaultEnvironment as Environment&gt;::MAX_EVENT_TOPICS;&#xD;&#xA;    type AccountId = AccountId20;&#xD;&#xA;    type Balance = &lt;DefaultEnvironment as Environment&gt;::Balance;&#xD;&#xA;    type Hash = &lt;DefaultEnvironment as Environment&gt;::Hash;&#xD;&#xA;    type Timestamp = &lt;DefaultEnvironment as Environment&gt;::Timestamp;&#xD;&#xA;    type BlockNumber = &lt;DefaultEnvironment as Environment&gt;::BlockNumber;&#xD;&#xA;    type ChainExtension = ink::env::NoChainExtension;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;However, I'm getting some compile-time errors similar to this:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `AccountId20: AsMut&lt;[u8]&gt;` is not satisfied&#xD;&#xA;   --&gt; lib.rs:14:22&#xD;&#xA;    |&#xD;&#xA;14  |     type AccountId = AccountId20;&#xD;&#xA;    |                      ^^^^^^^^^^^ the trait `AsMut&lt;[u8]&gt;` is not implemented for `AccountId20`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `ink::ink_env::Environment::AccountId`&#xD;&#xA;   --&gt; /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ink_env-4.3.0/src/types.rs:136:11&#xD;&#xA;    |&#xD;&#xA;128 |     type AccountId: 'static&#xD;&#xA;    |          --------- required by a bound in this associated type&#xD;&#xA;...&#xD;&#xA;136 |         + AsMut&lt;[u8]&gt;;&#xD;&#xA;    |           ^^^^^^^^^^^ required by this bound in `Environment::AccountId`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `AccountId20: scale_encode::EncodeAsType` is not satisfied&#xD;&#xA;   --&gt; lib.rs:14:22&#xD;&#xA;    |&#xD;&#xA;14  |     type AccountId = AccountId20;&#xD;&#xA;    |                      ^^^^^^^^^^^ the trait `scale_encode::EncodeAsType` is not implemented for `AccountId20`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `scale_encode::EncodeAsType`:&#xD;&#xA;              &amp;'a T&#xD;&#xA;              ()&#xD;&#xA;              (A, B)&#xD;&#xA;              (A, B, C)&#xD;&#xA;              (A, B, C, D)&#xD;&#xA;              (A, B, C, D, E)&#xD;&#xA;              (A, B, C, D, E, F)&#xD;&#xA;              (A, B, C, D, E, F, G)&#xD;&#xA;            and 69 others&#xD;&#xA;    = note: required for `&lt;EthereumEnvironment as ink::ink_env::Environment&gt;::AccountId` to implement `ink::ink_env::types::CodecAsType`&#xD;&#xA;note: required by a bound in `ink::ink_env::Environment::AccountId`&#xD;&#xA;   --&gt; /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ink_env-4.3.0/src/types.rs:130:11&#xD;&#xA;    |&#xD;&#xA;128 |     type AccountId: 'static&#xD;&#xA;    |          --------- required by a bound in this associated type&#xD;&#xA;129 |         + scale::Codec&#xD;&#xA;130 |         + CodecAsType&#xD;&#xA;    |           ^^^^^^^^^^^ required by this bound in `Environment::AccountId`&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `AccountId20: StorageLayout` is not satisfied&#xD;&#xA;  &#xD;&#xA;   |&#xD;&#xA;19 | #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout))]&#xD;&#xA;   |                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `StorageLayout` is not implemented for `AccountId20`&#xD;&#xA;   |&#xD;&#xA;   = help: the following other types implement trait `StorageLayout`:&#xD;&#xA;             ()&#xD;&#xA;             (A, B)&#xD;&#xA;             (A, B, C)&#xD;&#xA;             (A, B, C, D)&#xD;&#xA;             (A, B, C, D, E)&#xD;&#xA;             (A, B, C, D, E, F)&#xD;&#xA;             (A, B, C, D, E, F, G)&#xD;&#xA;             (A, B, C, D, E, F, G, H)&#xD;&#xA;           and 65 others&#xD;&#xA;   = note: this error originates in the derive macro `ink::storage::traits::StorageLayout` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;```&#xD;&#xA;Any help in this regard will be highly appreciated.&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="40167" PostHistoryTypeId="1" PostId="10126" RevisionGUID="62566bde-002f-4e2f-ae7f-27bed23a0652" CreationDate="2023-10-04T13:45:39.000" UserId="3538" Text="Deploy ink! contracts with unified accounts" ContentLicense="CC BY-SA 4.0" />
  <row Id="40168" PostHistoryTypeId="3" PostId="10126" RevisionGUID="62566bde-002f-4e2f-ae7f-27bed23a0652" CreationDate="2023-10-04T13:45:39.000" UserId="3538" Text="|ink|substrate-contracts-node|evm|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40169" PostHistoryTypeId="2" PostId="10127" RevisionGUID="0c5a1c74-3d54-4352-a1b4-53560967c629" CreationDate="2023-10-04T18:11:50.967" UserId="4743" Text="I think this is a result of making Substrate unopinionated. By including weights in core authority structures by default you allow individual chains to set weights in the way best suiting them. &#xD;&#xA;&#xD;&#xA;A simple reason you might want adjustable weights is to allow validators with more &#xD;&#xA;&#xD;&#xA;In practice this flexibility isn't used at all by most chains right now, including Polkadot." ContentLicense="CC BY-SA 4.0" />
  <row Id="40171" PostHistoryTypeId="5" PostId="10127" RevisionGUID="9f89ed49-379d-4d55-b04f-9162f8ee9b29" CreationDate="2023-10-04T18:12:31.673" UserId="4743" Comment="added 47 characters in body" Text="I think this is a result of making Substrate unopinionated. By including weights in core authority structures by default you allow individual chains to set weights in the way best suiting them. &#xD;&#xA;&#xD;&#xA;A simple reason you might want adjustable weights is to allow validators with more stake to have proportionally more voting power.&#xD;&#xA;&#xD;&#xA;In practice this flexibility isn't used at all by most chains right now, including Polkadot." ContentLicense="CC BY-SA 4.0" />
  <row Id="40172" PostHistoryTypeId="2" PostId="10128" RevisionGUID="a6e876f8-dfac-4ef9-9d14-0f3721aca6a5" CreationDate="2023-10-04T19:46:15.493" UserId="73" Text="You can just add transaction to the genesis block. You are right that this isn't done by Polkadot or any of the Parachains. However, you can write your own [`BuildGenesisBlock`](https://github.com/paritytech/polkadot-sdk/blob/59f68865e3f06ff56d57b5bdc95ed74c7867cccb/substrate/client/chain-spec/src/genesis.rs#L85-L93) implementation that can add whatever you want to the genesis block. &#xD;&#xA;&#xD;&#xA;You have there control over what is added to the genesis state and control over the content of the genesis block aka the transactions." ContentLicense="CC BY-SA 4.0" />
  <row Id="40174" PostHistoryTypeId="2" PostId="10129" RevisionGUID="2c01a147-b5cc-43f8-a306-f2f5a3644baf" CreationDate="2023-10-04T20:47:45.383" UserId="555" Text="I'm integrating the POS in freshly node template. I'm facing this error: [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is the code repository: https://github.com/Aideepakchaudhary/POA-to-POS&#xD;&#xA;&#xD;&#xA;Can anyone please help me to solve this issue?&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6M00V.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40176" PostHistoryTypeId="1" PostId="10129" RevisionGUID="2c01a147-b5cc-43f8-a306-f2f5a3644baf" CreationDate="2023-10-04T20:47:45.383" UserId="555" Text="Facing Issue in integration of POS" ContentLicense="CC BY-SA 4.0" />
  <row Id="40177" PostHistoryTypeId="3" PostId="10129" RevisionGUID="2c01a147-b5cc-43f8-a306-f2f5a3644baf" CreationDate="2023-10-04T20:47:45.383" UserId="555" Text="|substrate-node-template|pallet|consensus|babe|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40178" PostHistoryTypeId="5" PostId="10112" RevisionGUID="9bc3bcc9-9fb6-4b56-9f0c-5f63bca5f77f" CreationDate="2023-10-05T07:11:13.213" UserId="83" Comment="typo" Text="You can find all crates released to crates.io under the [`parity-crate-owner`](https://crates.io/users/parity-crate-owner?sort=recent-updates) user.&#xD;&#xA;With each release of the Parity Polkadot node these crates are being released to crates.io too.&#xD;&#xA;&#xD;&#xA;You can see that the runtimes maintained by the Polkadot Technical Fellowship are already pointing their deps to these crates. Change made in PR [#28](https://github.com/polkadot-fellows/runtimes/pull/28)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For more context: https://forum.polkadot.network/t/publish-substrate-to-crates-io/949/28?u=alejandro" ContentLicense="CC BY-SA 4.0" />
  <row Id="40179" PostHistoryTypeId="2" PostId="10130" RevisionGUID="e53ea0b2-ce39-4fad-907c-00b392874aaf" CreationDate="2023-10-05T08:29:40.603" UserId="2762" Text="Not sure why the bounded_vec import is not working, see an [example in the Substrate repo][1].&#xD;&#xA;&#xD;&#xA;However I am not sure you are doing the conversion to bounded_vec propertly anyway as you can't just do a cast from a Vec into a BoundedVec. &#xD;&#xA;&#xD;&#xA;See this way of doing it: [How to create a bounded vec from a normal vec?][2]. In your case it will look something like that: &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use frame_support::BoundedVec;&#xD;&#xA;&#xD;&#xA;let your_bounded_vec = BoundedVec::&lt;u8, ConstU32&lt;5&gt;&gt;::try_from(your_unbounded_vec);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;See another example in this previous StackExchange answer: [frame_benchmarking convert Vec to BoundedVec][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/democracy/src/migrations/v1.rs#L162&#xD;&#xA;  [2]: https://How%20to%20create%20a%20bounded%20vec%20from%20a%20normal%20vec?&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/7320/frame-benchmarking-convert-vec-to-boundedvec" ContentLicense="CC BY-SA 4.0" />
  <row Id="40181" PostHistoryTypeId="2" PostId="10131" RevisionGUID="e3202a20-cad4-4f9e-8619-51a7807d89dc" CreationDate="2023-10-05T08:37:05.993" UserId="458" Text="While reviewing the substrate runtime code, I noticed that the pallet_asset_conversion Pallet references two distinct instances for the Assets Pallet within its Runtime Config:&#xD;&#xA;&#xD;&#xA;    impl pallet_asset_conversion::Config for Runtime {&#xD;&#xA;    	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    	type Currency = Balances;&#xD;&#xA;    	type AssetBalance = &lt;Self as pallet_balances::Config&gt;::Balance;&#xD;&#xA;    	type HigherPrecisionBalance = sp_core::U256;&#xD;&#xA;    	**type Assets = Assets;**&#xD;&#xA;    	type Balance = u128;&#xD;&#xA;    	**type PoolAssets = PoolAssets;**&#xD;&#xA;Could you clarify the purpose of having two separate instances for the same pallet?&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="40183" PostHistoryTypeId="1" PostId="10131" RevisionGUID="e3202a20-cad4-4f9e-8619-51a7807d89dc" CreationDate="2023-10-05T08:37:05.993" UserId="458" Text="Two different Assets Pallet instance for pallet_asset_conversion Pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="40184" PostHistoryTypeId="3" PostId="10131" RevisionGUID="e3202a20-cad4-4f9e-8619-51a7807d89dc" CreationDate="2023-10-05T08:37:05.993" UserId="458" Text="|runtime|assets|pallet-asset-tx-payment|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40185" PostHistoryTypeId="2" PostId="10132" RevisionGUID="092527f9-3b8c-4125-97ed-d2ebbd899ea5" CreationDate="2023-10-05T09:34:12.057" UserId="2722" Text="I am building a Substrate pallet where I have a storage item defined as a `StorageDoubleMap:`&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::unbounded]&#xD;&#xA;    #[pallet::getter(fn labels)]&#xD;&#xA;    pub(super) type Labels&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;        _,&#xD;&#xA;        Twox64Concat,&#xD;&#xA;        HashId&lt;T&gt;,&#xD;&#xA;        Twox64Concat,&#xD;&#xA;        AccountOf&lt;T&gt;,&#xD;&#xA;        LabelsDetail&lt;T&gt;,&#xD;&#xA;        OptionQuery,&#xD;&#xA;    &gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I need to retrieve data from this storage map by using only the first key `(label_id)`, and then perform some operations like inserting it into another storage item and emitting an event.&#xD;&#xA;&#xD;&#xA;I've tried using the iter_prefix method, but I'm having trouble handling the nested Option types it returns. Here's my function:&#xD;&#xA;&#xD;&#xA;      pub fn verify_labels(label_id: &amp;HashId&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;        let label_info = Labels::&lt;T&gt;::iter_prefix(&amp;label_id).next().ok_or(&quot;Label not found&quot;)?;&#xD;&#xA;        match label_info {&#xD;&#xA;            Some(value) =&gt; {&#xD;&#xA;                VerifiedLabels::&lt;T&gt;::insert(&amp;label_id, &amp;value.owner, &amp;value);&#xD;&#xA;            },&#xD;&#xA;            None =&gt; {},&#xD;&#xA;        };&#xD;&#xA;        Self::deposit_event(Event::LabelsVeryfied {&#xD;&#xA;            label_id: label_info.label_id,&#xD;&#xA;            owner: label_info.owner.clone(),&#xD;&#xA;        });&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I'm getting a type mismatch error:&#xD;&#xA;&#xD;&#xA;&gt;mismatched types&#xD;&#xA;expected tuple (&lt;T as frame_system::Config&gt;::AccountId, LabelInfo&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::Hash&gt;)&#xD;&#xA;found enum std::option::Option&lt;_&gt;&#xD;&#xA;&#xD;&#xA;**How can I correctly handle the nested Option types to fix this error?**&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40187" PostHistoryTypeId="1" PostId="10132" RevisionGUID="092527f9-3b8c-4125-97ed-d2ebbd899ea5" CreationDate="2023-10-05T09:34:12.057" UserId="2722" Text="Handling Nested Option Types in StorageDoubleMap::iter_prefix Method" ContentLicense="CC BY-SA 4.0" />
  <row Id="40188" PostHistoryTypeId="3" PostId="10132" RevisionGUID="092527f9-3b8c-4125-97ed-d2ebbd899ea5" CreationDate="2023-10-05T09:34:12.057" UserId="2722" Text="|substrate-node-template|polkadot|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40189" PostHistoryTypeId="2" PostId="10133" RevisionGUID="d3c84ed8-6da9-4138-87a2-bc5f0a927de2" CreationDate="2023-10-05T10:04:59.997" UserId="94" Text="Yes this is done solely for benchmarking purposes. And AFAIK there is no alternative.  &#xD;&#xA;The reason is that we cannot just read the number of elements in the storage without opening up a DoS vector.  &#xD;&#xA;Imagine the weight function would read the number of channels from the storage; now that storage element would need to be loaded from disk and accessed - for free!  &#xD;&#xA;Instead; we use witness data and have a benchmark in case that it is wrong to still deduce the worst-case weight.&#xD;&#xA;&#xD;&#xA;Thank you for pointing out this example; I think it is a bug that the number of channels is not verified. Witness data *always* needs to be verified." ContentLicense="CC BY-SA 4.0" />
  <row Id="40191" PostHistoryTypeId="2" PostId="10134" RevisionGUID="573646d1-3c94-4c84-9bd5-071aad419ef8" CreationDate="2023-10-05T10:55:24.947" UserId="702" Text="The XCM builder crate provides various converters for generating sovereign account ids from MultiLocations.&#xD;&#xA;&#xD;&#xA;Many parachains, including system parachains, use the following converter:&#xD;&#xA;&#xD;&#xA;A:&#xD;&#xA;```rust&#xD;&#xA;pub type LocationToAccountId = (&#xD;&#xA;        // The parent (Relay-chain) origin converts to the parent `AccountId`.&#xD;&#xA;        ParentIsPreset&lt;AccountId&gt;,&#xD;&#xA;        // Sibling parachain origins convert to AccountId via the `ParaId::into`.&#xD;&#xA;        SiblingParachainConvertsVia&lt;Sibling, AccountId&gt;,&#xD;&#xA;        // Straight up local `AccountId32` origins just alias directly to `AccountId`.&#xD;&#xA;        AccountId32Aliases&lt;RelayNetwork, AccountId&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, more recently a new converter was introduced, which seems to be more comprehensive, as supports converting nested consensus systems within sibling parachains:&#xD;&#xA;&#xD;&#xA;B:&#xD;&#xA;```rust&#xD;&#xA;HashedDescription&lt;AccountId, DescribeFamily&lt;DescribeAllTerminal&gt;&gt;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Converter B doesn't support converting local AccountId32's though, so there isn't a total overlap.&#xD;&#xA;&#xD;&#xA;Therefore it seems we should use this aggregate converter going forward, to remain compatible with existing sovereign accounts:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;C:&#xD;&#xA;```&#xD;&#xA;pub type LocationToAccountId = (&#xD;&#xA;        // The parent (Relay-chain) origin converts to the parent `AccountId`.&#xD;&#xA;        ParentIsPreset&lt;AccountId&gt;,&#xD;&#xA;        // Sibling parachain origins convert to AccountId via the `ParaId::into`.&#xD;&#xA;        SiblingParachainConvertsVia&lt;Sibling, AccountId&gt;,&#xD;&#xA;        // Straight up local `AccountId32` origins just alias directly to `AccountId`.&#xD;&#xA;        AccountId32Aliases&lt;RelayNetwork, AccountId&gt;,&#xD;&#xA;        // Convert nested locations within sibling parachains.&#xD;&#xA;        HashedDescription&lt;AccountId, DescribeFamily&lt;DescribeAllTerminal&gt;&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40193" PostHistoryTypeId="1" PostId="10134" RevisionGUID="573646d1-3c94-4c84-9bd5-071aad419ef8" CreationDate="2023-10-05T10:55:24.947" UserId="702" Text="Best practices for generating sovereign account ids from XCM locations" ContentLicense="CC BY-SA 4.0" />
  <row Id="40194" PostHistoryTypeId="3" PostId="10134" RevisionGUID="573646d1-3c94-4c84-9bd5-071aad419ef8" CreationDate="2023-10-05T10:55:24.947" UserId="702" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40195" PostHistoryTypeId="2" PostId="10135" RevisionGUID="bc22ba37-a3ca-4425-ae2b-c68c40e0b61b" CreationDate="2023-10-05T11:01:32.257" UserId="3317" Text="The purpose is very simple; using the same pallet multiple times in your runtime, but with a different configuration. Asset Hub is a good example. It uses two instances of `pallet-assets`:&#xD;&#xA; - [instance1][1] is for the native assets (`AssetId: u32`) and e.g. the `CreateOrigin` is `EnsureSigned`. Meaning that everyone can send a native transaction (not XCM) and create an asset.&#xD;&#xA; - [instance2][2] is for foreign assets (`AssetId: MultiLocation`) and e.g. the `CreateOrigin` needs to be a `MultiLocation` of a parachain or its relay chain.&#xD;&#xA;&#xD;&#xA;Have a look yourself and you'll find that the configurations are very different. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-fellows/runtimes/blob/c86afcc9ef185465df30878e4415cf6d8212fcd6/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs#L274&#xD;&#xA;  [2]: https://github.com/polkadot-fellows/runtimes/blob/c86afcc9ef185465df30878e4415cf6d8212fcd6/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs#L312" ContentLicense="CC BY-SA 4.0" />
  <row Id="40197" PostHistoryTypeId="2" PostId="10136" RevisionGUID="2f25ccbb-3876-42ce-a0cc-83ca995cf632" CreationDate="2023-10-05T11:26:04.550" UserId="3317" Text="You have already unwrapped `label_info` with [`.ok_or()`][1]:&#xD;&#xA;&#xD;&#xA;&gt; Transforms the Option&lt;T&gt; into a Result&lt;T, E&gt;. &#xD;&#xA;&#xD;&#xA;Then followed by `?` ([docs][2]), which unwraps `Ok()` or errors when finding `Err()`. So now you have your tuple which is stated in the error message:&#xD;&#xA;&gt; expected tuple (::AccountId, LabelInfo&lt;::AccountId, ::Hash&gt;)&#xD;&#xA;&#xD;&#xA;Try:&#xD;&#xA;```&#xD;&#xA;let label_info = Labels::&lt;T&gt;::iter_prefix(&amp;label_id).next().ok_or(&quot;Label not found&quot;)?;&#xD;&#xA;VerifiedLabels::&lt;T&gt;::insert(&amp;label_id, &amp;label_info.owner, &amp;label_info);&#xD;&#xA;Self::deposit_event(Event::LabelsVeryfied {&#xD;&#xA;    label_id: label_info.label_id,&#xD;&#xA;    owner: label_info.owner.clone(),&#xD;&#xA;});&#xD;&#xA;Ok(())&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://doc.rust-lang.org/std/option/enum.Option.html#method.ok_or&#xD;&#xA;  [2]: https://doc.rust-lang.org/rust-by-example/std/result/question_mark.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="40199" PostHistoryTypeId="5" PostId="10134" RevisionGUID="f13321ee-3489-4a3a-84e5-7ddb6d4fb93b" CreationDate="2023-10-05T11:32:39.370" UserId="702" Comment="added 169 characters in body" Text="The XCM builder crate provides various converters for generating sovereign account ids from MultiLocations.&#xD;&#xA;&#xD;&#xA;Many parachains, including system parachains, use the following converter:&#xD;&#xA;&#xD;&#xA;A:&#xD;&#xA;```rust&#xD;&#xA;pub type LocationToAccountId = (&#xD;&#xA;        // The parent (Relay-chain) origin converts to the parent `AccountId`.&#xD;&#xA;        ParentIsPreset&lt;AccountId&gt;,&#xD;&#xA;        // Sibling parachain origins convert to AccountId via the `ParaId::into`.&#xD;&#xA;        SiblingParachainConvertsVia&lt;Sibling, AccountId&gt;,&#xD;&#xA;        // Straight up local `AccountId32` origins just alias directly to `AccountId`.&#xD;&#xA;        AccountId32Aliases&lt;RelayNetwork, AccountId&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, more recently a new converter was introduced, which seems to be more comprehensive, as supports converting nested consensus systems within sibling parachains:&#xD;&#xA;&#xD;&#xA;B:&#xD;&#xA;```rust&#xD;&#xA;HashedDescription&lt;AccountId, DescribeFamily&lt;DescribeAllTerminal&gt;&gt;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Converter B doesn't support converting local AccountId32's though, so there isn't a total overlap.&#xD;&#xA;&#xD;&#xA;Therefore it seems we should use this aggregate converter going forward, to remain compatible with existing sovereign accounts:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;C:&#xD;&#xA;```&#xD;&#xA;pub type LocationToAccountId = (&#xD;&#xA;        // The parent (Relay-chain) origin converts to the parent `AccountId`.&#xD;&#xA;        ParentIsPreset&lt;AccountId&gt;,&#xD;&#xA;        // Sibling parachain origins convert to AccountId via the `ParaId::into`.&#xD;&#xA;        SiblingParachainConvertsVia&lt;Sibling, AccountId&gt;,&#xD;&#xA;        // Straight up local `AccountId32` origins just alias directly to `AccountId`.&#xD;&#xA;        AccountId32Aliases&lt;RelayNetwork, AccountId&gt;,&#xD;&#xA;        // Convert nested locations within sibling parachains.&#xD;&#xA;        HashedDescription&lt;AccountId, DescribeFamily&lt;DescribeAllTerminal&gt;&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is option (C) the best way going forward? I'm also wondering if perhaps the implementation of `HashDescription` could be extended to also handle  `AccountId32Aliases`?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40204" PostHistoryTypeId="2" PostId="10138" RevisionGUID="630ffd40-9bb7-4ea8-9eb9-9d724b9985c4" CreationDate="2023-10-05T13:05:53.643" UserId="4753" Text="We had a big problem after upgrading weight -&gt; weight v2.&#xD;&#xA;&#xD;&#xA;I understood that weight v2 uses refTime and proofSize.&#xD;&#xA;However, I wonder if there is a way to properly look up these two values.&#xD;&#xA;&#xD;&#xA;We are using sidecar(send Tx) and tx-wrapper-core(sign Tx).&#xD;&#xA;&#xD;&#xA;And I saw this [post][1]. Is this code also available in multisig, not contract?&#xD;&#xA;&#xD;&#xA;give thanks in advance&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/6401/smart-contract-function-call-error/6402#6402" ContentLicense="CC BY-SA 4.0" />
  <row Id="40206" PostHistoryTypeId="1" PostId="10138" RevisionGUID="630ffd40-9bb7-4ea8-9eb9-9d724b9985c4" CreationDate="2023-10-05T13:05:53.643" UserId="4753" Text="How do set the appropriate refTime and proofSize when create asMulti?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40207" PostHistoryTypeId="3" PostId="10138" RevisionGUID="630ffd40-9bb7-4ea8-9eb9-9d724b9985c4" CreationDate="2023-10-05T13:05:53.643" UserId="4753" Text="|ink|weight|multisig|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40208" PostHistoryTypeId="50" PostId="9751" RevisionGUID="bb2c1a5b-38b0-41a6-b01b-89d9240c36f4" CreationDate="2023-10-05T14:01:35.150" UserId="-1" />
  <row Id="40209" PostHistoryTypeId="2" PostId="10139" RevisionGUID="286d0664-937f-4afc-b416-5179136ecb3b" CreationDate="2023-10-05T15:02:21.677" UserId="2135" Text="the main point is in the question itself.&#xD;&#xA;&#xD;&#xA;Let's assume the `inflation rate` varies `between 1% and 10%`. However, in the end, the inflation will always be 10%. In this [link](https://wiki.polkadot.network/docs/learn-treasury#funding-the-treasury), you can find reasons for why it has been designed this way.&#xD;&#xA;&#xD;&#xA;I'm curious about the most efficient method to modify this behavior so that what comes from the staking pallet is burned, with as few changes as possible. I assume we need to modify this in the staking pallet:&#xD;&#xA;`type RewardRemainder = Treasury;`&#xD;&#xA;&#xD;&#xA;But I'm unsure about the replacement. Should it be `()`? Or should we create a struct with a custom `OnUnbalanced` implementation? Or perhaps there's another solution available?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40211" PostHistoryTypeId="1" PostId="10139" RevisionGUID="286d0664-937f-4afc-b416-5179136ecb3b" CreationDate="2023-10-05T15:02:21.677" UserId="2135" Text="How to burn the tokens treasury gets from staking inefficiency?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40212" PostHistoryTypeId="3" PostId="10139" RevisionGUID="286d0664-937f-4afc-b416-5179136ecb3b" CreationDate="2023-10-05T15:02:21.677" UserId="2135" Text="|pallet-treasury|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40214" PostHistoryTypeId="50" PostId="9821" RevisionGUID="1abee36d-5289-4f18-ad8a-1a3eb177bbe9" CreationDate="2023-10-05T18:04:00.507" UserId="-1" />
  <row Id="40215" PostHistoryTypeId="2" PostId="10140" RevisionGUID="e9c4a985-f9ab-4275-9aae-d346cf0ab192" CreationDate="2023-10-05T19:03:08.310" UserId="4755" Text="When executing node as a validator, the documentation states here that there is differents execution strategy available, however as this is optionnal switches, what is default if nothing is set ?&#xD;&#xA;https://docs.substrate.io/reference/command-line-tools/node-template/#build-spec&#xD;&#xA;&#xD;&#xA;And what execution mode would be recommended as a validator ?&#xD;&#xA;&#xD;&#xA;Thanks !&#xD;&#xA;Regards " ContentLicense="CC BY-SA 4.0" />
  <row Id="40217" PostHistoryTypeId="1" PostId="10140" RevisionGUID="e9c4a985-f9ab-4275-9aae-d346cf0ab192" CreationDate="2023-10-05T19:03:08.310" UserId="4755" Text="What is default --execution &lt;strategy&gt; and recommended value for node/validator operator?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40218" PostHistoryTypeId="3" PostId="10140" RevisionGUID="e9c4a985-f9ab-4275-9aae-d346cf0ab192" CreationDate="2023-10-05T19:03:08.310" UserId="4755" Text="|substrate-node|wasm|validator|executor|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40219" PostHistoryTypeId="2" PostId="10141" RevisionGUID="d61f6b9c-7d9c-4e87-8200-b7db1f610c07" CreationDate="2023-10-05T20:33:10.190" UserId="94" Text="It is advised to use the `wasm` executor. The `native` executor will be removed in future releases." ContentLicense="CC BY-SA 4.0" />
  <row Id="40222" PostHistoryTypeId="2" PostId="10142" RevisionGUID="1aeebbff-f56c-4d65-897d-f9a6b0ac2040" CreationDate="2023-10-05T22:38:41.570" UserId="417" Text="This is what ended up working.&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/6197/how-to-store-a-string-in-substrate-storage&#xD;&#xA;&#xD;&#xA;Instead of using &#xD;&#xA;&#xD;&#xA;    Struct {&#xD;&#xA;        string_field: Vec&lt;u8&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Using:&#xD;&#xA;&#xD;&#xA;    Struct {&#xD;&#xA;       string_field: [u8; some_limit]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;I also had to import MaxEncodedLength and add it to the #[derive()] list as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="40224" PostHistoryTypeId="52" PostId="10140" RevisionGUID="e61f0eb2-06a2-4832-95de-1277bb15f252" CreationDate="2023-10-06T03:08:29.683" />
  <row Id="40225" PostHistoryTypeId="50" PostId="9847" RevisionGUID="1ac80597-2523-48a9-8e00-903ccc5aeb07" CreationDate="2023-10-06T08:05:55.393" UserId="-1" />
  <row Id="40226" PostHistoryTypeId="2" PostId="10143" RevisionGUID="d36c1c5c-6687-401a-949e-417add706762" CreationDate="2023-10-06T08:15:29.687" UserId="4756" Text="We are building a substrate blockchain backed by polkadot js. While working on a task I have a requirement of public/private key encryption and decryption. for ex:&#xD;&#xA;&#xD;&#xA;**Sender's Actions:**&#xD;&#xA;&#xD;&#xA;The sender obtains the recipient's public key, which is publicly available. The sender uses the recipient's public key to encrypt the message. The sender then sends the encrypted message to the recipient.&#xD;&#xA;&#xD;&#xA;**Recipient's Actions:**&#xD;&#xA;&#xD;&#xA;The recipient, who possesses the corresponding private key, uses it to decrypt the message. After decryption, the recipient can read the original message.&#xD;&#xA;&#xD;&#xA;I cannot find any method to encrypt and decrypt using public/private keys in the Polkadot-js library. We are eager to explore how this can be achieved and would greatly appreciate your valuable feedback and guidance on implementing asymmetric encryption in our chat application." ContentLicense="CC BY-SA 4.0" />
  <row Id="40228" PostHistoryTypeId="1" PostId="10143" RevisionGUID="d36c1c5c-6687-401a-949e-417add706762" CreationDate="2023-10-06T08:15:29.687" UserId="4756" Text="Asymmetric Encryption" ContentLicense="CC BY-SA 4.0" />
  <row Id="40229" PostHistoryTypeId="3" PostId="10143" RevisionGUID="d36c1c5c-6687-401a-949e-417add706762" CreationDate="2023-10-06T08:15:29.687" UserId="4756" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40230" PostHistoryTypeId="2" PostId="10144" RevisionGUID="3b884873-a0a7-4d41-8546-ac9e12bb36ab" CreationDate="2023-10-06T09:27:03.373" UserId="2844" Text="We need to find a way to restrict the minting in the nft pallet so only certain accounts can mint a nft or can create a collection. How can this be done?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40232" PostHistoryTypeId="1" PostId="10144" RevisionGUID="3b884873-a0a7-4d41-8546-ac9e12bb36ab" CreationDate="2023-10-06T09:27:03.373" UserId="2844" Text="How to restrict the minting in pallet-nft?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40233" PostHistoryTypeId="3" PostId="10144" RevisionGUID="3b884873-a0a7-4d41-8546-ac9e12bb36ab" CreationDate="2023-10-06T09:27:03.373" UserId="2844" Text="|substrate-node-template|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40234" PostHistoryTypeId="2" PostId="10145" RevisionGUID="64349a4c-c798-4c79-b945-8aafb87e4d20" CreationDate="2023-10-06T12:01:17.223" UserId="3317" Text="Referring to `pallet-nfts`, for creating a collection you have the [`CreateOrigin`][1] ([see here][2]). For minting nfts it depends on the config of your collection, more specifically the [`MintType`][3].&#xD;&#xA;&#xD;&#xA;You can find this yourself when you look at the source code of a pallet in `polkadot-sdk/substrate/frame/&lt;pallet&gt;`, in your case the extrinsics `fn create` and `fn mint` in [`pallet-nfts`][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/1835c091c42456e8df3ecbf0a94b7b88c395f623/substrate/frame/nfts/src/lib.rs#L129-L135&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/1835c091c42456e8df3ecbf0a94b7b88c395f623/substrate/frame/nfts/src/lib.rs#L685&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/1835c091c42456e8df3ecbf0a94b7b88c395f623/substrate/frame/nfts/src/types.rs#L291-L302&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/nfts/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="40236" PostHistoryTypeId="2" PostId="10146" RevisionGUID="acb9a94b-a503-4aa0-bf68-3c0a196302c8" CreationDate="2023-10-06T12:24:01.893" UserId="3317" Text="Yes you are correct ([ref][1]):&#xD;&#xA;&#xD;&#xA;&gt; The remaining reward is send to the configurable end-point T::RewardRemainder.&#xD;&#xA;&#xD;&#xA;You can set it to `()` ([implementation][2]) which will result in its&#xD;&#xA;[&quot;default&quot; implementation][3] =&gt; burning everything. You can also create a struct with a&#xD;&#xA;custom implementation ([example][4]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/tree/1835c091c42456e8df3ecbf0a94b7b88c395f623/substrate/frame/staking#era-payout&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/1835c091c42456e8df3ecbf0a94b7b88c395f623/substrate/frame/support/src/traits/tokens/imbalance/on_unbalanced.rs#L55&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/1835c091c42456e8df3ecbf0a94b7b88c395f623/substrate/frame/support/src/traits/tokens/imbalance/on_unbalanced.rs#L32-L53&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/blob/1835c091c42456e8df3ecbf0a94b7b88c395f623/substrate/frame/staking/src/mock.rs#L218-L227" ContentLicense="CC BY-SA 4.0" />
  <row Id="40238" PostHistoryTypeId="2" PostId="10147" RevisionGUID="23e40f93-46be-40be-b72f-7ba5f36ca476" CreationDate="2023-10-06T15:30:46.817" UserId="4758" Text="I'm trying to connect to rococo testnet as a parachain using own customized parachain ! &#xD;&#xA;&#xD;&#xA;**It works locally and produces blocks when connected to local Relay chain**&#xD;&#xA;&#xD;&#xA;But when connected to Rococo it doesn't produce blocks. It was first registered as parathread but now it is connect temporarily as a parachain using issue request for rococo parachain slot ! &#xD;&#xA;&#xD;&#xA;Below it the process that I followed &#xD;&#xA;&#xD;&#xA;=&gt; I'm using custom accounts for validotors (collators) generated through subkey ! (same for local relaychain)&#xD;&#xA;&#xD;&#xA;=&gt; Following commands I used &#xD;&#xA;&#xD;&#xA;`./target/release/Honey-protocol \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain raw-parachain-chainspec.json \&#xD;&#xA;--base-path /tmp/parachain/Node1 \&#xD;&#xA;--port 40333 \&#xD;&#xA;--rpc-port 8844 \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain ../polkadot-sdk/raw-local-chainspec.json \&#xD;&#xA;--port 30343 \&#xD;&#xA;--rpc-port 9977`&#xD;&#xA;&#xD;&#xA;**Adding Custom Keys**&#xD;&#xA;&#xD;&#xA;`curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;aura&quot;, &quot;0xd6e89b6e99dcec6d5134dd6a1a16aae1b79f7c70f48ef6406b97982aae62fe28&quot;, &quot;0x962f3b79ee06d4ef463588f239de314b42c88e8966369bd388d5e28c9c3d6111&quot;],&quot;id&quot;:1 }' http://127.0.0.1:9022&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;`curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;gran&quot;, &quot;0xd6e89b6e99dcec6d5134dd6a1a16aae1b79f7c70f48ef6406b97982aee62fe28&quot;, &quot;0xcb85350e64d79c592fdbcea9adf63f694be0a8f7dd66c7572df8fc47ba18c2fc&quot;],&quot;id&quot;:1 }' http://127.0.0.1:9022&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;**Second Collator**&#xD;&#xA;&#xD;&#xA;`./target/release/Honey-protocol \&#xD;&#xA;--collator \&#xD;&#xA;--force-authoring \&#xD;&#xA;--chain raw-parachain-chainspec.json \&#xD;&#xA;--base-path /tmp/parachain/Node2 \&#xD;&#xA;--port 40334 \&#xD;&#xA;--rpc-port 9023 \&#xD;&#xA;--bootnodes /ip4/127.0.0.1/tcp/40333/p2p/12D3KooWKRCTF4tWQ6xmA5YWMqs6Mb9eYkApBBxM7fS31UsVJ41F  \&#xD;&#xA;-- \&#xD;&#xA;--execution wasm \&#xD;&#xA;--chain rococo \&#xD;&#xA;--port 30344 \&#xD;&#xA;--rpc-port 9978`&#xD;&#xA;&#xD;&#xA;**Adding Custom Keys**&#xD;&#xA;&#xD;&#xA;`curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;aura&quot;, &quot;0x560763e9ae1ea8bb9d38f8a2c6b8788548fc95028f6ede890c44ffed3315e062&quot;, &quot;0x96e144d9c66bed23c35651646778d7ab31783347e4c213d45727854adfe82905&quot;],&quot;id&quot;:1 }' http://127.0.0.1:9023&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;`curl -vH 'Content-Type: application/json' --data '{ &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;author_insertKey&quot;, &quot;params&quot;:[&quot;gran&quot;, &quot;0x560763e9ae1ea8bb9d38f8a2c6b8788548ff95028e6ede890c44ffed3315e062&quot;, &quot;0x3556b1a562eb3837f520147879abfc26461f8cf06c83bec895bd1a8e26dcb712&quot;],&quot;id&quot;:1 }' http://127.0.0.1:9023&#xD;&#xA;`&#xD;&#xA;**Both Nodes Running **&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Registered as a Parachain On Rococo Testnet as 4302**&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Attached is Plain Chain Specs used**&#xD;&#xA;[plainChainSpec.json][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5w0tz.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/0KddQ.png&#xD;&#xA;  [3]: https://drive.google.com/file/d/17-kG5oDeg20vDBi3rO25BJurqO47GVAz/view?usp=sharing" ContentLicense="CC BY-SA 4.0" />
  <row Id="40240" PostHistoryTypeId="1" PostId="10147" RevisionGUID="23e40f93-46be-40be-b72f-7ba5f36ca476" CreationDate="2023-10-06T15:30:46.817" UserId="4758" Text="Rococo testnet Parachain is not Producing Blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40241" PostHistoryTypeId="3" PostId="10147" RevisionGUID="23e40f93-46be-40be-b72f-7ba5f36ca476" CreationDate="2023-10-06T15:30:46.817" UserId="4758" Text="|parachain|substrate-parachain-template|rococo|block-production|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40242" PostHistoryTypeId="2" PostId="10148" RevisionGUID="9b4ba992-9524-4ece-9f92-317d2c2cd79c" CreationDate="2023-10-06T16:17:38.217" UserId="555" Text="There was a dependency problem of sp-consensus. &#xD;&#xA;Solved now!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40244" PostHistoryTypeId="2" PostId="10149" RevisionGUID="402ec1a2-2fb7-4d3a-97a5-bf6dd865a63f" CreationDate="2023-10-06T17:45:16.163" UserId="555" Text="I have integrated the POS in fresh node-template on **polkadot-v1.0.0**&#xD;&#xA;&#xD;&#xA;Here you can find the POS(proof-of-stake) node-template with babe: https://github.com/Aideepakchaudhary/POA-to-POS&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40246" PostHistoryTypeId="2" PostId="10150" RevisionGUID="c81e8c44-f9dd-4ab7-a069-69b1874e3d53" CreationDate="2023-10-06T17:51:12.757" UserId="555" Text="I have integrated the POS in fresh node-template on **polkadot-v1.0.0**&#xD;&#xA;&#xD;&#xA;Here you can find the POS(proof-of-stake) node-template with babe: https://github.com/Aideepakchaudhary/POA-to-POS&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40248" PostHistoryTypeId="2" PostId="10151" RevisionGUID="b3e0cac0-f124-40e4-8a12-6257f8dc84f3" CreationDate="2023-10-06T17:52:09.667" UserId="555" Text="I have integrated the POS in fresh node-template on polkadot-v1.0.0&#xD;&#xA;&#xD;&#xA;Here you can find the POS(proof-of-stake) node-template with babe: https://github.com/Aideepakchaudhary/POA-to-POS&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40250" PostHistoryTypeId="2" PostId="10152" RevisionGUID="3fa2b1ab-d160-4dd6-9c62-0e44a5f28d98" CreationDate="2023-10-06T17:55:35.557" UserId="555" Text="How to change the the consensus of node-template from POA to POS with babe?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40252" PostHistoryTypeId="1" PostId="10152" RevisionGUID="3fa2b1ab-d160-4dd6-9c62-0e44a5f28d98" CreationDate="2023-10-06T17:55:35.557" UserId="555" Text="How to change POA to POS with babe?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40253" PostHistoryTypeId="3" PostId="10152" RevisionGUID="3fa2b1ab-d160-4dd6-9c62-0e44a5f28d98" CreationDate="2023-10-06T17:55:35.557" UserId="555" Text="|substrate-node-template|consensus|babe|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40254" PostHistoryTypeId="2" PostId="10153" RevisionGUID="a5908f11-be60-448a-a6fa-31e3d1d85778" CreationDate="2023-10-06T17:56:16.910" UserId="555" Text="I have integrated the POS in fresh node-template on polkadot-v1.0.0&#xD;&#xA;&#xD;&#xA;Here you can find the POS(proof-of-stake) node-template with babe: https://github.com/Aideepakchaudhary/POA-to-POS&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40256" PostHistoryTypeId="2" PostId="10154" RevisionGUID="9cb48545-d1f0-4235-847d-06c86bb8b9b9" CreationDate="2023-10-06T21:20:02.203" UserId="4759" Text="The example here https://github.com/paritytech/subxt/blob/master/subxt/examples/storage_iterating.rs&#xD;&#xA;```&#xD;&#xA;use subxt::{OnlineClient, PolkadotConfig};&#xD;&#xA;&#xD;&#xA;#[subxt::subxt(runtime_metadata_path = &quot;../artifacts/polkadot_metadata_full.scale&quot;)]&#xD;&#xA;pub mod polkadot {}&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;    // Create a new API client, configured to talk to Polkadot nodes.&#xD;&#xA;    let api = OnlineClient::&lt;PolkadotConfig&gt;::new().await?;&#xD;&#xA;&#xD;&#xA;    // Build a storage query to iterate over account information.&#xD;&#xA;    let storage_query = polkadot::storage().system().account_iter();&#xD;&#xA;&#xD;&#xA;    // Get back an iterator of results (here, we are fetching 10 items at&#xD;&#xA;    // a time from the node, but we always iterate over one at a time).&#xD;&#xA;    let mut results = api.storage().at_latest().await?.iter(storage_query).await?;&#xD;&#xA;&#xD;&#xA;    while let Some(Ok((key, value))) = results.next().await {&#xD;&#xA;        println!(&quot;Key: 0x{}&quot;, hex::encode(&amp;key));&#xD;&#xA;        println!(&quot;Value: {:?}&quot;, value);&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Shows how to iterate over a storage map and get typed results. However, only the values are typed in this case and I didn't find a way to get a typed `key` value as well. Instead I have to decode into `AccountId` using a code like:&#xD;&#xA;```&#xD;&#xA;let account_bytes = key[40..].to_vec();&#xD;&#xA;let array_u8: [u8; 32] = account_bytes.as_slice().try_into().unwrap();&#xD;&#xA;let account = AccountId32::from(array_u8);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there a better way?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40258" PostHistoryTypeId="1" PostId="10154" RevisionGUID="9cb48545-d1f0-4235-847d-06c86bb8b9b9" CreationDate="2023-10-06T21:20:02.203" UserId="4759" Text="How to get typed keys when querying a storage map via subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="40259" PostHistoryTypeId="3" PostId="10154" RevisionGUID="9cb48545-d1f0-4235-847d-06c86bb8b9b9" CreationDate="2023-10-06T21:20:02.203" UserId="4759" Text="|rust|storage|subxt|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40262" PostHistoryTypeId="2" PostId="10155" RevisionGUID="c2b7fc51-49e0-4930-b296-0dcd5af1ea5e" CreationDate="2023-10-07T02:43:58.690" UserId="251" Text="No, I don't think this is the perfect way to do it.&#xD;&#xA;&#xD;&#xA;You need to manually cut the bytes based on the `xxx_concat` algorithm used by the storage.&#xD;&#xA;&#xD;&#xA;As for the remaining part, if you don't want to specify a type every time, using scale value type might be another option.&#xD;&#xA;&#xD;&#xA;For more information, please refer to: https://docs.rs/scale-value/latest/scale_value/struct.Value.html." ContentLicense="CC BY-SA 4.0" />
  <row Id="40264" PostHistoryTypeId="2" PostId="10156" RevisionGUID="7fd09a0e-4450-4d95-8d99-5e08b44725e5" CreationDate="2023-10-07T07:32:29.030" UserId="213" Text="If we make an Android dapp, can't we use Android [intents][1] to sign a transaction in another Android wallet app that supports receiving data through intents? We can pass message and public key in the intent (e.g. using [subxt][2]) , and wallet makes transaction. Will there be any security issues? Though we can't connect the wallet to get the public key, we can just copy the public key from the wallet and paste it on the dapp, to get the dapp UI for the public key. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://developer.android.com/guide/components/intents-filters&#xD;&#xA;  [2]: https://github.com/paritytech/subxt/blob/d7124b56f7e7ed4cba1f05cdb38a8fe48eebf898/examples/wasm-example/src/routes/signing.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="40266" PostHistoryTypeId="1" PostId="10156" RevisionGUID="7fd09a0e-4450-4d95-8d99-5e08b44725e5" CreationDate="2023-10-07T07:32:29.030" UserId="213" Text="Can Android intents be used for signing transactions using another Android app wallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40267" PostHistoryTypeId="3" PostId="10156" RevisionGUID="7fd09a0e-4450-4d95-8d99-5e08b44725e5" CreationDate="2023-10-07T07:32:29.030" UserId="213" Text="|subxt|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40268" PostHistoryTypeId="5" PostId="10156" RevisionGUID="a0e21077-8515-43d0-b327-272267912285" CreationDate="2023-10-07T08:06:56.453" UserId="213" Comment="deleted 1 character in body" Text="If we make an Android dapp, can't we use Android [intents][1] to sign a transaction in another Android wallet app that supports receiving data through intents? We can pass message and public key in the intent (e.g. using [subxt][2]) , and wallet makes transaction. Will there be any security issues? Though we can't connect the wallet to get the public key, we can just copy the public key from the wallet and paste it on the dapp, to get the dapp UI for the public key. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://developer.android.com/training/basics/intents/sending&#xD;&#xA;  [2]: https://github.com/paritytech/subxt/blob/d7124b56f7e7ed4cba1f05cdb38a8fe48eebf898/examples/wasm-example/src/routes/signing.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="40269" PostHistoryTypeId="2" PostId="10157" RevisionGUID="c951e12b-79d8-460a-a390-691c60f338c8" CreationDate="2023-10-07T09:27:22.810" UserId="555" Text="You should have these lines in services.rs:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	let FrontierPartialComponents {&#xD;&#xA;		filter_pool,&#xD;&#xA;		fee_history_cache,&#xD;&#xA;		fee_history_cache_limit,&#xD;&#xA;	} = new_frontier_partial(&amp;eth_config)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have integrate the the frontier in the fresh node template with babe. &#xD;&#xA;You can refer here: https://github.com/Aideepakchaudhary/Substrate-node-template-with-babe-and-frontier&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40271" PostHistoryTypeId="5" PostId="10156" RevisionGUID="a47ec5e1-c063-482f-81d7-3fedb2b4ee93" CreationDate="2023-10-07T10:08:07.987" UserId="213" Comment="added 542 characters in body; edited title" Text="If we make an Android dapp, can't we use Android [intents][1] to sign a transaction in another Android wallet app that supports receiving data through intents? We can pass message and public key in the intent (e.g. using [subxt][2]) , and wallet makes transaction. Will there be any security issues? Though we can't connect the wallet to get the public key, we can just copy the public key from the wallet and paste it on the dapp, to get the dapp UI for the public key. &#xD;&#xA;&#xD;&#xA;Another approach could involve creating a trusted [server apps][3] responsible for handling transactions and securely storing private keys or seeds. Authentication mechanisms can be implemented to ensure that only trusted applications on the computer can access the server API. This approach effectively separates the authentication logic from the dapp itself, similar to browser extensions wallet, and can also be utilized on desktop systems where &quot;intents&quot; are not available.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://developer.android.com/training/basics/intents/sending&#xD;&#xA;  [2]: https://github.com/paritytech/subxt/blob/d7124b56f7e7ed4cba1f05cdb38a8fe48eebf898/examples/wasm-example/src/routes/signing.rs&#xD;&#xA;  [3]: https://github.com/tauri-apps/tauri/discussions/2751" ContentLicense="CC BY-SA 4.0" />
  <row Id="40272" PostHistoryTypeId="4" PostId="10156" RevisionGUID="a47ec5e1-c063-482f-81d7-3fedb2b4ee93" CreationDate="2023-10-07T10:08:07.987" UserId="213" Comment="added 542 characters in body; edited title" Text="Signing transactions with another secure app" ContentLicense="CC BY-SA 4.0" />
  <row Id="40273" PostHistoryTypeId="5" PostId="10156" RevisionGUID="c138cdda-1809-4f75-ac8d-02448cabe67c" CreationDate="2023-10-07T10:24:53.800" UserId="213" Comment="added 311 characters in body" Text="If we make an Android dapp, can't we use Android [intents][1] to sign a transaction in another Android wallet app that supports receiving data through intents? We can pass message and public key in the intent (e.g. using [subxt][2]) , and wallet makes transaction. Will there be any security issues? Though we can't connect the wallet to get the public key, we can just copy the public key from the wallet and paste it on the dapp, to get the dapp UI for the public key. &#xD;&#xA;&#xD;&#xA;Another approach could involve creating a trusted [server apps][3] responsible for handling transactions and securely storing private keys or seeds. Authentication mechanisms can be implemented to ensure that only trusted applications on the computer can access the server API. This approach effectively separates the authentication logic from the dapp itself, similar to browser extensions wallet, and can also be utilized on desktop systems where &quot;intents&quot; are not available.&#xD;&#xA;&#xD;&#xA;Here, two passwords can be utilized: one for communication between the Dapp and the server, which the Dapp can interact with, and another password for signing transactions, similar to how MetaMask or the Polkadot.js extension wallet operates, where only the server application can interact with this password.&#xD;&#xA;&#xD;&#xA;  [1]: https://developer.android.com/training/basics/intents/sending&#xD;&#xA;  [2]: https://github.com/paritytech/subxt/blob/d7124b56f7e7ed4cba1f05cdb38a8fe48eebf898/examples/wasm-example/src/routes/signing.rs&#xD;&#xA;  [3]: https://github.com/tauri-apps/tauri/discussions/2751" ContentLicense="CC BY-SA 4.0" />
  <row Id="40274" PostHistoryTypeId="2" PostId="10158" RevisionGUID="5de12932-7b50-445d-9065-4c6fa7a11fdd" CreationDate="2023-10-07T12:45:59.243" UserId="1811" Text="It seems that with the current existing technology, the above way of looping through the 2nd tuple element, is the acceptable solution.&#xD;&#xA;Credits and many thanks to the Phala team for their support.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40276" PostHistoryTypeId="2" PostId="10159" RevisionGUID="65561c09-2fc8-45d9-88fb-501675ea7bc0" CreationDate="2023-10-07T13:09:26.430" UserId="79" Text="#[ink(message)]&#xD;&#xA;    pub fn get_flip2_buill_call(&amp;mut self, token_contract_address: AccountId, account_id: AccountId )-&gt; i32{&#xD;&#xA;&#xD;&#xA;        let my_return_value = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;        .call(token_contract_address)&#xD;&#xA;        .gas_limit(0)&#xD;&#xA;        .transferred_value(0)&#xD;&#xA;        &#xD;&#xA;        .exec_input(&#xD;&#xA;            ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;flip&quot;)))&#xD;&#xA;                .push_arg(1i32)&#xD;&#xA;                &#xD;&#xA;        )&#xD;&#xA;        .returns::&lt;i32&gt;()&#xD;&#xA;        .invoke();&#xD;&#xA;        [![enter image description here][1]][1]&#xD;&#xA;       my_return_value&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/4GPhL.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40278" PostHistoryTypeId="1" PostId="10159" RevisionGUID="65561c09-2fc8-45d9-88fb-501675ea7bc0" CreationDate="2023-10-07T13:09:26.430" UserId="79" Text="error build_call" ContentLicense="CC BY-SA 4.0" />
  <row Id="40279" PostHistoryTypeId="3" PostId="10159" RevisionGUID="65561c09-2fc8-45d9-88fb-501675ea7bc0" CreationDate="2023-10-07T13:09:26.430" UserId="79" Text="|polkadot|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40283" PostHistoryTypeId="2" PostId="10161" RevisionGUID="0caf34c8-7788-42d9-9b95-d62bf5982418" CreationDate="2023-10-08T03:09:50.723" UserId="4731" Text="I've tried to add pallet democracy to my substrate run time. In runtime/cargo.toml of my sustrate node template I've added pallet-democracy = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }.&#xD;&#xA;I added &quot;pallet-democracy/std&quot; to the list of features. But I can't figure out what to do next or how to set the configuration for runtime. &#xD;&#xA;&#xD;&#xA;I've followed the official substrate documentation, &quot;Add a pallet to the runtime,&quot; to follow the process. &#xD;&#xA;&#xD;&#xA;Has anyone done this before and can help with the correct procedure?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40285" PostHistoryTypeId="1" PostId="10161" RevisionGUID="0caf34c8-7788-42d9-9b95-d62bf5982418" CreationDate="2023-10-08T03:09:50.723" UserId="4731" Text="How to Add and configure Democracy Pallet to Substrate Runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="40286" PostHistoryTypeId="3" PostId="10161" RevisionGUID="0caf34c8-7788-42d9-9b95-d62bf5982418" CreationDate="2023-10-08T03:09:50.723" UserId="4731" Text="|substrate-node-template|pallet|runtime|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40287" PostHistoryTypeId="2" PostId="10162" RevisionGUID="2a64529c-748d-480d-bbb9-870e14bbc4bf" CreationDate="2023-10-08T05:28:45.890" UserId="251" Text="You should focus on &quot;Review the configuration for Balances&quot; and &quot;Implement the configuration for Nicks&quot; parts. That's what you should do next.&#xD;&#xA;&#xD;&#xA;Additionally, there is a kitchensink runtime available that includes all pallets. You can take it as an example.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/cb944dc54882222453071fc99f2e5014c51823ef/substrate/bin/node/runtime/src/lib.rs#L1026-L1076" ContentLicense="CC BY-SA 4.0" />
  <row Id="40289" PostHistoryTypeId="50" PostId="9886" RevisionGUID="6bb275fc-083d-45e8-9513-ed17d8298339" CreationDate="2023-10-08T10:05:05.567" UserId="-1" />
  <row Id="40290" PostHistoryTypeId="5" PostId="10159" RevisionGUID="bf5ff128-6de1-45f1-8276-08f73feed618" CreationDate="2023-10-08T10:41:41.767" UserId="251" Comment="deleted 60 characters in body" Text="```rs&#xD;&#xA;#[ink(message)]&#xD;&#xA;pub fn get_flip2_buill_call(&amp;mut self, token_contract_address: AccountId, account_id: AccountId )-&gt; i32 {&#xD;&#xA;    let my_return_value = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;        .call(token_contract_address)&#xD;&#xA;        .gas_limit(0)&#xD;&#xA;        .transferred_value(0)&#xD;&#xA;        .exec_input(&#xD;&#xA;            ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;flip&quot;))).push_arg(1i32)&#xD;&#xA;        )&#xD;&#xA;        .returns::&lt;i32&gt;()&#xD;&#xA;        .invoke();&#xD;&#xA;&#xD;&#xA;   my_return_value&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/4GPhL.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40291" PostHistoryTypeId="2" PostId="10163" RevisionGUID="66c1a72d-52e3-447c-afb6-35ecb6337957" CreationDate="2023-10-08T11:42:14.657" UserId="251" Text="See https://paritytech.github.io/polkadot-sdk/master/sp_runtime/traits/trait.Morph.html.&#xD;&#xA;&#xD;&#xA;What's the purpose of having this type?&#xD;&#xA;Any example?&#xD;&#xA;&#xD;&#xA;And I found that it was always being used with `MapSuccess`." ContentLicense="CC BY-SA 4.0" />
  <row Id="40293" PostHistoryTypeId="1" PostId="10163" RevisionGUID="66c1a72d-52e3-447c-afb6-35ecb6337957" CreationDate="2023-10-08T11:42:14.657" UserId="251" Text="What's `Morph`? Why do we need this type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40294" PostHistoryTypeId="3" PostId="10163" RevisionGUID="66c1a72d-52e3-447c-afb6-35ecb6337957" CreationDate="2023-10-08T11:42:14.657" UserId="251" Text="|origin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40295" PostHistoryTypeId="2" PostId="10164" RevisionGUID="0567c994-05ce-4a47-85ce-bf059bb14e5f" CreationDate="2023-10-08T12:51:30.817" UserId="4769" Text="I would like to build a blockchain with Substrate where people can trade with products. They can log in in web, where they can see only their balances and products.I created private/public keypairs to some users. Adding these keys to keystore, modified customSpec.json with adding keys to aura and grandpa. I modified the chain_spec as well. &#xD;&#xA;I still see the predefined accounts. &#xD;&#xA;Besides that I have some doubt. Every user who want to use my blockchain has to start a new node? As for log in, how can I solve users can log in to the app and see only their balances? &#xD;&#xA;&#xD;&#xA;I checked all tutorial which is accessable on substrate.io. I red a lot of posts, blogs, but these question are a dark spot for me. Please help me. " ContentLicense="CC BY-SA 4.0" />
  <row Id="40297" PostHistoryTypeId="1" PostId="10164" RevisionGUID="0567c994-05ce-4a47-85ce-bf059bb14e5f" CreationDate="2023-10-08T12:51:30.817" UserId="4769" Text="How to create different accounts in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40298" PostHistoryTypeId="3" PostId="10164" RevisionGUID="0567c994-05ce-4a47-85ce-bf059bb14e5f" CreationDate="2023-10-08T12:51:30.817" UserId="4769" Text="|account|nodes|client|frontend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40299" PostHistoryTypeId="5" PostId="10028" RevisionGUID="53152d22-8735-40f8-aa0e-40a2a6912097" CreationDate="2023-10-08T15:42:42.303" UserId="354" Comment="improved formatting" Text="Zombienet + polkadot v43&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;two errors:&#xD;&#xA;&#xD;&#xA;    DEBUG tokio-runtime-worker txpool: [0xd7165975185efe4f63425ab930021c89f166fda20d0e4f564f61c9ebd491640e] Error importing: TooLowPriority { old: 13700, new: 513 }&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;&#xD;&#xA;got this error when submit tx:&#xD;&#xA;```&#xD;&#xA;called `Result::unwrap()` on an `Err` value: Subxt error:Transaction(BlockNotFound)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;&#xD;&#xA;    0: Transaction error: The block containing the transaction can no longer be found (perhaps it was on a non-finalized fork?)&#xD;&#xA;    1: The block containing the transaction can no longer be found (perhaps it was on a non-finalized fork?)&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;**The same codebase works on polkadot version 39.**&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;more logs with txpool&#xD;&#xA;    &#xD;&#xA;    DEBUG tokio-runtime-worker txpool: [Relaychain] resolve hash:0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1 finalized:false tree_route:TreeRoute { route: [HashAndNumber { number: 95, hash: 0x430087b004ca09e6dc28a11d3e61e7196b3d8c757d96b931894191ff6319f42b }, HashAndNumber { number: 96, hash: 0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1 }], pivot: 0 } best_block:0x430087b004ca09e6dc28a11d3e61e7196b3d8c757d96b931894191ff6319f42b finalized_block:0x2e32bc5184dade259838b055dc7ebc960d1431168c902fb1fdf6bdcc9ff544c5    &#xD;&#xA;    2023-09-25 15:58:06.029 TRACE tokio-runtime-worker txpool: [Relaychain] handle_enactment tree_route: TreeRoute { route: [HashAndNumber { number: 95, hash: 0x430087b004ca09e6dc28a11d3e61e7196b3d8c757d96b931894191ff6319f42b }, HashAndNumber { number: 96, hash: 0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1 }], pivot: 0 }    &#xD;&#xA;    2023-09-25 15:58:06.029 TRACE tokio-runtime-worker txpool: [Relaychain] Pruning transactions: [0x3755cdcafff7d039c9ef3285c6e6fd5f71e53f12de9eef34231c4e0a034ad5c9, 0x54ac3158e5797fbcc5f1471ff68efe1c5bc1088066b6271020ece2916048d3fc]    &#xD;&#xA;    2023-09-25 15:58:06.029 DEBUG tokio-runtime-worker txpool: [Relaychain] Starting pruning of block BlockId::Hash(0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1) (extrinsics: 2)    &#xD;&#xA;    2023-09-25 15:58:06.029 TRACE tokio-runtime-worker txpool: [Relaychain] txpool is empty, skipping validation for block BlockId::Hash(0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1)    &#xD;&#xA;    2023-09-25 15:58:06.029 TRACE tokio-runtime-worker txpool: [Relaychain] txpool is empty, skipping validation for block BlockId::Hash(0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1)    &#xD;&#xA;    2023-09-25 15:58:06.029 DEBUG tokio-runtime-worker txpool: [Relaychain] Pruning at BlockId::Hash(0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1)    &#xD;&#xA;    2023-09-25 15:58:06.029  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #96 (0x9878…59d1)    &#xD;&#xA;    2023-09-25 15:58:06.029 TRACE tokio-runtime-worker txpool: [Relaychain] Pruning at BlockId::Hash(0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1). Resubmitting transactions.    &#xD;&#xA;    2023-09-25 15:58:06.029 DEBUG tokio-runtime-worker txpool: [Relaychain] [0x3755cdcafff7d039c9ef3285c6e6fd5f71e53f12de9eef34231c4e0a034ad5c9] Pruned at 0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1    &#xD;&#xA;    2023-09-25 15:58:06.029 DEBUG tokio-runtime-worker txpool: [Relaychain] [0x54ac3158e5797fbcc5f1471ff68efe1c5bc1088066b6271020ece2916048d3fc] Pruned at 0x9878696aaa0eed154a7f6687e4afaff3c11cac26ca71a5bfa96870eb63d859d1    " ContentLicense="CC BY-SA 4.0" />
  <row Id="40300" PostHistoryTypeId="24" PostId="10028" RevisionGUID="53152d22-8735-40f8-aa0e-40a2a6912097" CreationDate="2023-10-08T15:42:42.303" Comment="Proposed by 354 approved by 2762, 85 edit id of 585" ContentLicense="CC BY-SA 4.0" />
  <row Id="40301" PostHistoryTypeId="2" PostId="10165" RevisionGUID="814ed81b-347b-4bcf-87b3-1332f6474b06" CreationDate="2023-10-09T03:41:17.677" UserId="251" Text="How do I configure these curves?&#xD;&#xA;&#xD;&#xA;In general, when should I use `LinearDecreasing`, `SteppedDecreasing`, and `Reciprocal`?&#xD;&#xA;&#xD;&#xA;What values should I choose for these arguments?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub const fn make_linear(&#xD;&#xA;    length: u128,&#xD;&#xA;    period: u128,&#xD;&#xA;    floor: FixedI64,&#xD;&#xA;    ceil: FixedI64&#xD;&#xA;) -&gt; Curve&#xD;&#xA;&#xD;&#xA;pub const fn make_reciprocal(&#xD;&#xA;    delay: u128,&#xD;&#xA;    period: u128,&#xD;&#xA;    level: FixedI64,&#xD;&#xA;    floor: FixedI64,&#xD;&#xA;    ceil: FixedI64&#xD;&#xA;) -&gt; Curve&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example, I have seen `min_support: pallet_referenda::Curve::make_linear(14, 14, permill(5), percent(25))`.&#xD;&#xA;&#xD;&#xA;Why not just write `pallet_referenda::Curve::make_linear(1, 1, permill(5), percent(25))`? What is the basis for using `14 / 14`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40303" PostHistoryTypeId="1" PostId="10165" RevisionGUID="814ed81b-347b-4bcf-87b3-1332f6474b06" CreationDate="2023-10-09T03:41:17.677" UserId="251" Text="Best practice for `pallet_referenda::Curve`" ContentLicense="CC BY-SA 4.0" />
  <row Id="40304" PostHistoryTypeId="3" PostId="10165" RevisionGUID="814ed81b-347b-4bcf-87b3-1332f6474b06" CreationDate="2023-10-09T03:41:17.677" UserId="251" Text="|governance|referenda|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40305" PostHistoryTypeId="50" PostId="4677" RevisionGUID="7bc8a167-eab4-45f8-964c-a7e00aa589d8" CreationDate="2023-10-09T04:03:35.423" UserId="-1" />
  <row Id="40306" PostHistoryTypeId="5" PostId="10163" RevisionGUID="0bffb499-e4f3-42ae-b499-b0205dbc7242" CreationDate="2023-10-09T11:21:13.593" UserId="251" Comment="deleted 64 characters in body" Text="See https://paritytech.github.io/polkadot-sdk/master/sp_runtime/traits/trait.Morph.html.&#xD;&#xA;&#xD;&#xA;What's the purpose of having this type?&#xD;&#xA;Any example?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40307" PostHistoryTypeId="5" PostId="10165" RevisionGUID="6ce2b63d-352a-4821-a4be-5a1fa7f23d9e" CreationDate="2023-10-09T11:32:12.570" UserId="251" Comment="added 182 characters in body" Text="How do I configure these curves?&#xD;&#xA;&#xD;&#xA;In general, when should I use `LinearDecreasing`, `SteppedDecreasing`, and `Reciprocal`?&#xD;&#xA;&#xD;&#xA;What values should I choose for these arguments?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub const fn make_linear(&#xD;&#xA;    length: u128,&#xD;&#xA;    period: u128,&#xD;&#xA;    floor: FixedI64,&#xD;&#xA;    ceil: FixedI64&#xD;&#xA;) -&gt; Curve&#xD;&#xA;&#xD;&#xA;pub const fn make_reciprocal(&#xD;&#xA;    delay: u128,&#xD;&#xA;    period: u128,&#xD;&#xA;    level: FixedI64,&#xD;&#xA;    floor: FixedI64,&#xD;&#xA;    ceil: FixedI64&#xD;&#xA;) -&gt; Curve&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;For example, I have seen `min_support: pallet_referenda::Curve::make_linear(14, 14, permill(5), percent(25))`.&#xD;&#xA;&#xD;&#xA;Why not just write `pallet_referenda::Curve::make_linear(1, 1, permill(5), percent(25))`? What is the basis for using `14 / 14`?&#xD;&#xA;&#xD;&#xA;And could you explain this real world example?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;min_approval: pallet_referenda::Curve::make_reciprocal(&#xD;&#xA;	1,&#xD;&#xA;	14,&#xD;&#xA;	percent(96),&#xD;&#xA;	percent(50),&#xD;&#xA;	percent(100),&#xD;&#xA;),&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40308" PostHistoryTypeId="2" PostId="10166" RevisionGUID="4efd78fc-36af-40b2-9b36-0989a24a7090" CreationDate="2023-10-09T12:26:01.210" UserId="2722" Text="I'm working on a Substrate-based blockchain project and I've run into an issue related to type information and encoding. Specifically, I'm trying to use an f64 field within a struct that also uses Substrate's TypeInfo trait, but I'm getting a compilation error.&#xD;&#xA;&#xD;&#xA;Here's a simplified version of my struct:&#xD;&#xA;&#xD;&#xA;    #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]&#xD;&#xA;    #[scale_info(skip_type_params(T))]&#xD;&#xA;    pub struct LabelInfo&lt;AccountId, Hashing, Balance&gt; {&#xD;&#xA;        pub owner: AccountId,&#xD;&#xA;        pub public_key: BoundedVec&lt;u8, ConstU32&lt;128&gt;&gt;,&#xD;&#xA;        pub reputation: f64,&#xD;&#xA;        pub stake: Balance,&#xD;&#xA;        pub staking_address: BoundedVec&lt;u8, ConstU32&lt;128&gt;&gt;,&#xD;&#xA;        pub status: RegisterStatus,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;The error message I'm getting is:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt;the trait bound `f64: scale_info::TypeInfo` is not satisfied&#xD;&#xA;&#xD;&#xA;The compiler also suggests that several other types do implement `TypeInf`o, such as `i128`, `i64`, `u128`, and `u64`.&#xD;&#xA;&#xD;&#xA;How can I resolve this issue? Can `f64` be made to satisfy `TypeInfo`, or is there an alternative approach to achieve a similar outcome?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40310" PostHistoryTypeId="1" PostId="10166" RevisionGUID="4efd78fc-36af-40b2-9b36-0989a24a7090" CreationDate="2023-10-09T12:26:01.210" UserId="2722" Text="Trait Bound f64: scale_info::TypeInfo Is Not Satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="40311" PostHistoryTypeId="3" PostId="10166" RevisionGUID="4efd78fc-36af-40b2-9b36-0989a24a7090" CreationDate="2023-10-09T12:26:01.210" UserId="2722" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40312" PostHistoryTypeId="2" PostId="10167" RevisionGUID="0fad77e9-fb78-46ab-9d44-d4ba02be05cd" CreationDate="2023-10-09T13:43:05.697" UserId="94" Text="We normally never use floats in the runtime because of their possible interdeminism.  &#xD;&#xA;This is why `TypeInfo` is not default implemented for floats.  &#xD;&#xA;You can use [`PerBill`](https://docs.rs/sp-runtime/latest/sp_runtime/struct.Perbill.html) or any of the other [`PerThing`](https://docs.rs/sp-runtime/latest/sp_runtime/trait.PerThing.html) implementations to deterministically represent fractions within the range `[0, 1]`.  &#xD;&#xA;For normal fractions there is [`FixedI128`](https://docs.rs/sp-runtime/latest/sp_runtime/struct.FixedI128.html) and alike: [`FixedPointNumber`](https://docs.rs/sp-runtime/latest/sp_runtime/trait.FixedPointNumber.html)." ContentLicense="CC BY-SA 4.0" />
  <row Id="40314" PostHistoryTypeId="2" PostId="10168" RevisionGUID="fa8b38b7-9378-4e6e-8407-e82df844ddbe" CreationDate="2023-10-09T13:48:48.187" UserId="4773" Text="everyone! I am new to Substrate and Polkadot-JS. I am attempting to convert this enum with values to TypeScript, but I haven't been successful so far.&#xD;&#xA;&#xD;&#xA;I really appreciate any help you can provide.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub enum Permission {&#xD;&#xA;    TrustedBy(AccountId),&#xD;&#xA;    SetExchangeRate,&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40316" PostHistoryTypeId="1" PostId="10168" RevisionGUID="fa8b38b7-9378-4e6e-8407-e82df844ddbe" CreationDate="2023-10-09T13:48:48.187" UserId="4773" Text="Substrate enum to typescript(polkadot-js)" ContentLicense="CC BY-SA 4.0" />
  <row Id="40317" PostHistoryTypeId="3" PostId="10168" RevisionGUID="fa8b38b7-9378-4e6e-8407-e82df844ddbe" CreationDate="2023-10-09T13:48:48.187" UserId="4773" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40318" PostHistoryTypeId="2" PostId="10169" RevisionGUID="d66b0a1d-69ee-42a0-a9e1-9b2e04c053fb" CreationDate="2023-10-09T13:57:11.887" UserId="4213" Text="I can't find a way to change the cost of gas in Ink's e2e tests.&#xD;&#xA;&#xD;&#xA;I need to change the gas cost for some tests in my Ink contract. But I can't find the way to do it, it always returns zero when calling the weight_to_fee function." ContentLicense="CC BY-SA 4.0" />
  <row Id="40320" PostHistoryTypeId="1" PostId="10169" RevisionGUID="d66b0a1d-69ee-42a0-a9e1-9b2e04c053fb" CreationDate="2023-10-09T13:57:11.887" UserId="4213" Text="I can't find a way to change the cost of gas in Ink's e2e tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="40321" PostHistoryTypeId="3" PostId="10169" RevisionGUID="d66b0a1d-69ee-42a0-a9e1-9b2e04c053fb" CreationDate="2023-10-09T13:57:11.887" UserId="4213" Text="|polkadot|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40322" PostHistoryTypeId="5" PostId="10168" RevisionGUID="f3ee7658-3e47-43a8-bde9-b7700b2e68d9" CreationDate="2023-10-09T14:19:08.160" UserId="4773" Comment="deleted 10 characters in body" Text="I am new to Substrate and Polkadot-JS. I am attempting to convert this enum with values to TypeScript, but I haven't been successful so far.&#xD;&#xA;&#xD;&#xA;I really appreciate any help you can provide.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub enum Permission {&#xD;&#xA;    TrustedBy(AccountId),&#xD;&#xA;    SetExchangeRate,&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40327" PostHistoryTypeId="33" PostId="10008" RevisionGUID="aa2fb89c-e703-4954-b247-6eba9354ed6c" CreationDate="2023-10-09T17:16:04.410" UserId="377" Comment="34" />
  <row Id="40328" PostHistoryTypeId="2" PostId="10171" RevisionGUID="014b995b-7361-45a6-9538-d6c2ade77e2d" CreationDate="2023-10-09T19:44:53.127" UserId="264" Text="Moonbeam implemented unified accounts to use H160 address type across all network is quit old, is there any codebase available to implement same with newly generated frontier node template or is it already implemented into the frontier codebase? because there's no documentation available for that and the docs for frontier not being updated for quit long. Any guide that I can follow without swimming through all the commit history of moonbeam to figure out the implementation will be a great help. Thanks! " ContentLicense="CC BY-SA 4.0" />
  <row Id="40330" PostHistoryTypeId="1" PostId="10171" RevisionGUID="014b995b-7361-45a6-9538-d6c2ade77e2d" CreationDate="2023-10-09T19:44:53.127" UserId="264" Text="Moonbeam Unified Accounts Implementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="40331" PostHistoryTypeId="3" PostId="10171" RevisionGUID="014b995b-7361-45a6-9538-d6c2ade77e2d" CreationDate="2023-10-09T19:44:53.127" UserId="264" Text="|frontier|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40332" PostHistoryTypeId="52" PostId="10166" RevisionGUID="e5b51e58-f420-4e7b-b887-fff5fbe56ad6" CreationDate="2023-10-09T20:29:33.667" />
  <row Id="40333" PostHistoryTypeId="5" PostId="1933" RevisionGUID="68017e63-643a-4a6e-8ea9-e435daa6fdac" CreationDate="2023-10-09T21:05:36.287" UserId="2118" Comment="added 882 characters in body" Text="My goal is to get a list of the stash account addresses of all validators using the golang substrate client. &#xD;&#xA;&#xD;&#xA;**Context**&#xD;&#xA;My approach so far is to take inspiration from the polkadotjs application and other apps that use it. With the polkadotjs client fetching all stash accounts can be achieved with the derive api by calling `api.derive.staking.stashes()`. Under the hood this calls `api.query.staking.validators.keys()`, from what I gather this retrieves all the keys with the prefix &quot;Staking&quot; and function &quot;Validators&quot;. With the golang client, I am able to get a list of StorageKeys that are under &quot;Staking&quot; - &quot;Validators&quot;, however, I can not make sense of them in the same way the polkadotjs client can, which seems to automatically decode the arguments from a storage key. &#xD;&#xA;&#xD;&#xA;**Question** How do I decode/retrieve the argument from a types.StorageKey to an account ID in the golang substrate client? Or, alternatively, how do I query all stash addresses with the golang client?&#xD;&#xA;&#xD;&#xA;**EDIT: Answer**&#xD;&#xA;&#xD;&#xA;Resolved the issue:&#xD;&#xA;```&#xD;&#xA;// get stash accounts&#xD;&#xA;func (sh *SubstrateHarvester) getStashAccounts() ([]string, error) {&#xD;&#xA;    var stashStorageKeys []string&#xD;&#xA;&#xD;&#xA;    // Create a key for Staking_Validators (gsrpc does not allow w/o argument, hence override func)&#xD;&#xA;    key, err := sh.CreateStorageKeyUnsafe(&quot;Staking&quot;, &quot;Validators&quot;)&#xD;&#xA;    if err != nil {&#xD;&#xA;        return stashStorageKeys, err&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // This func takes ~4-5 seconds to execute&#xD;&#xA;    stashKeys, err := sh.GetKeysLatest(key)&#xD;&#xA;    if err != nil {&#xD;&#xA;        return stashStorageKeys, err&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    for _, key := range stashKeys {&#xD;&#xA;        validatorAddress, err := sh.decodeStashKey(key)&#xD;&#xA;        if err != nil {&#xD;&#xA;            continue // FIXME improve error handling&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        stashStorageKeys = append(stashStorageKeys, validatorAddress)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    return stashStorageKeys, nil&#xD;&#xA;}```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40335" PostHistoryTypeId="2" PostId="10172" RevisionGUID="0ccb275d-0767-44ef-a7ab-1857adff994c" CreationDate="2023-10-10T01:16:03.450" UserId="2485" Text="I am running a parachain on Ubuntu 22.04 jammy. where i am using polkadot 9.43. I see that in release notes it is said that nightly-2023-05-22 was tested for this substrate version https://github.com/paritytech/polkadot/releases/tag/v0.9.43. I also see that substrate is using rust 1.70 https://github.com/paritytech/substrate/commit/68fe1efa5c033240e394d7a1e7e85f86ef371fe8. However if i try to use any rust nightly version past 2023-03-09, when i am running a node for my runtime i get error:&#xD;&#xA;(Parachain) cannot create a runtime error=Other(&quot;cannot deserialize module: unknown Opcode(192)&quot;)&#xD;&#xA;&#xD;&#xA;solutions i find online [here][1] and [here][2] suggest to downgrade to rust 1.68. Could you please tell me if there is another option to fix this issue?  will this issue be fixed for later versions of rust to be able to build wasm files for later substrate versions?&#xD;&#xA;&#xD;&#xA;Thank you very much for your help!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40337" PostHistoryTypeId="1" PostId="10172" RevisionGUID="0ccb275d-0767-44ef-a7ab-1857adff994c" CreationDate="2023-10-10T01:16:03.450" UserId="2485" Text="wasm compilation for later rust versions" ContentLicense="CC BY-SA 4.0" />
  <row Id="40338" PostHistoryTypeId="3" PostId="10172" RevisionGUID="0ccb275d-0767-44ef-a7ab-1857adff994c" CreationDate="2023-10-10T01:16:03.450" UserId="2485" Text="|runtime|wasm|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40339" PostHistoryTypeId="5" PostId="10172" RevisionGUID="bd5806b2-5866-4193-9fcd-27552c61fc4b" CreationDate="2023-10-10T01:56:42.820" UserId="2485" Comment="added 217 characters in body" Text="I am running a parachain on Ubuntu 22.04 jammy. where i am using polkadot 9.43. I see that in release notes it is said that nightly-2023-05-22 was tested for this substrate version https://github.com/paritytech/polkadot/releases/tag/v0.9.43. I also see that substrate is using rust 1.70 https://github.com/paritytech/substrate/commit/68fe1efa5c033240e394d7a1e7e85f86ef371fe8. However if i try to use any rust nightly version past 2023-03-09, when i am running a node for my runtime i get error:&#xD;&#xA;(Parachain) cannot create a runtime error=Other(&quot;cannot deserialize module: unknown Opcode(192)&quot;)&#xD;&#xA;&#xD;&#xA;solutions i find online [here][1] and [here][2] suggest to downgrade to rust 1.68. Could you please tell me if there is another option to fix this issue?  will this issue be fixed for later versions of rust to be able to build wasm files for later substrate versions?&#xD;&#xA;&#xD;&#xA;Thank you very much for your help!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/7714/cannot-run-substrate-on-a-fresh-macbook-m2&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/8500/parachain-cannot-create-a-runtime-error-othercannot-deserialize-module-unkn" ContentLicense="CC BY-SA 4.0" />
  <row Id="40340" PostHistoryTypeId="50" PostId="6706" RevisionGUID="4232c4dd-f7ec-4bd3-b5ae-f7e12afa8226" CreationDate="2023-10-10T07:05:50.733" UserId="-1" />
  <row Id="40341" PostHistoryTypeId="2" PostId="10173" RevisionGUID="53399a8b-7261-4615-98e8-cebeee125c28" CreationDate="2023-10-10T07:33:46.497" UserId="2722" Text="I'm developing a `Substrate-based` blockchain and using `StorageDoubleMap` to store label details. The StorageDoubleMap is defined as follows:&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::unbounded]&#xD;&#xA;    #[pallet::getter(fn labels)]&#xD;&#xA;    pub(super) type Labels&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;        _,&#xD;&#xA;        Twox64Concat,&#xD;&#xA;        HashId&lt;T&gt;,&#xD;&#xA;        Twox64Concat,&#xD;&#xA;        AccountOf&lt;T&gt;,&#xD;&#xA;        LabelsDetail&lt;T&gt;,&#xD;&#xA;        OptionQuery,&#xD;&#xA;    &gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I need to retrieve LabelsDetail using just the `label_id (of type HashId&lt;T&gt;)`, without knowing the `AccountOf&lt;T&gt;`.&#xD;&#xA;&#xD;&#xA;What are the best practices for this scenario? Is it possible to find the `LabelsDetail` using only `label_id`, or do I need to change my storage structure or use additional indexing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40343" PostHistoryTypeId="1" PostId="10173" RevisionGUID="53399a8b-7261-4615-98e8-cebeee125c28" CreationDate="2023-10-10T07:33:46.497" UserId="2722" Text="How to Retrieve Value by Single Key from StorageDoubleMap in Substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40344" PostHistoryTypeId="3" PostId="10173" RevisionGUID="53399a8b-7261-4615-98e8-cebeee125c28" CreationDate="2023-10-10T07:33:46.497" UserId="2722" Text="|substrate-node-template|rust|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40345" PostHistoryTypeId="2" PostId="10174" RevisionGUID="afd8a11d-1d35-452a-98e1-1eefd9e3d9eb" CreationDate="2023-10-10T07:38:58.363" UserId="2722" Text="use can use `BoundedVec&lt;u8, ConstU32&lt;128&gt;&gt;` instead using the `Vec&lt;8&gt;` in the struct . &#xD;&#xA;if you need to use struct into the storage you have to use this macro with the storage : &#xD;&#xA;&#xD;&#xA;`#[pallet::unbounded]`&#xD;&#xA;&#xD;&#xA;**Exmaple :**&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    #[pallet::unbounded]&#xD;&#xA;    #[pallet::getter(fn storage)]&#xD;&#xA;    pub(super) type storage&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;    	_,&#xD;&#xA;    	Twox64Concat,&#xD;&#xA;    	HashId&lt;T&gt;,&#xD;&#xA;    	Twox64Concat,&#xD;&#xA;    	AccountOf&lt;T&gt;,&#xD;&#xA;    	/*struct*/,&#xD;&#xA;    	OptionQuery,&#xD;&#xA;    &gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The BoundedVec&lt;u8, ConstU32&lt;128&gt;&gt; type signifies a vector of u8 elements with a bounded length, in this case, a maximum length of 128 elements. This construct is typical in Substrate-based blockchains to put an upper limit on the size of dynamic collections to ensure that they do not grow indefinitely, which could lead to performance issues or exploits." ContentLicense="CC BY-SA 4.0" />
  <row Id="40347" PostHistoryTypeId="16" PostId="10174" RevisionGUID="79b3bd2f-0052-4032-acc2-b6891d078e3f" CreationDate="2023-10-10T07:38:58.363" UserId="2722" />
  <row Id="40348" PostHistoryTypeId="2" PostId="10175" RevisionGUID="3f2042bf-544e-47de-91e2-543f8f4a30c2" CreationDate="2023-10-10T07:42:44.953" UserId="464" Text="As frontier now integrate natively the AccountId20 type, I wonder if it is compatible with all other pallets like BABE, Staking, ... Is there a place where we can check it or do we know some compatibility issue ? &#xD;&#xA;This will help solving the UX between substrate and EVM.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40350" PostHistoryTypeId="1" PostId="10175" RevisionGUID="3f2042bf-544e-47de-91e2-543f8f4a30c2" CreationDate="2023-10-10T07:42:44.953" UserId="464" Text="Can we use AccountId20 with babe and other pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40351" PostHistoryTypeId="3" PostId="10175" RevisionGUID="3f2042bf-544e-47de-91e2-543f8f4a30c2" CreationDate="2023-10-10T07:42:44.953" UserId="464" Text="|staking|frontier|grandpa|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40352" PostHistoryTypeId="2" PostId="10176" RevisionGUID="f04a52b5-73cd-4a62-b078-3a3580bc0e50" CreationDate="2023-10-10T07:58:56.833" UserId="251" Text="Yes, you can use it with most pallets we already did this. &#xD;&#xA;&#xD;&#xA;And I suggest you ask for some more specific question.&#xD;&#xA;&#xD;&#xA;A note here, BABE, GRANDPA and ImOnline use keystore on node side the session keys are still the session keys which doesn't affect your system account." ContentLicense="CC BY-SA 4.0" />
  <row Id="40355" PostHistoryTypeId="50" PostId="9889" RevisionGUID="021f7228-46d4-46c6-ad2c-a268bef4da41" CreationDate="2023-10-10T08:08:41.047" UserId="-1" />
  <row Id="40356" PostHistoryTypeId="2" PostId="10177" RevisionGUID="15ce9bfc-87ab-42e4-b08f-65b18dd99aa5" CreationDate="2023-10-10T09:00:08.050" UserId="2722" Text="the feature you are describing can be implemented using the Substrate framework's built-in pallets. The Substrate ecosystem offers a few pallets that can be useful for creating a voting or governance system. Here are some pallets you might consider using or modifying for your specific needs:&#xD;&#xA;&#xD;&#xA;**Democracy Pallet**&#xD;&#xA;&#xD;&#xA;The Democracy pallet is a built-in Substrate pallet that allows for on-chain governance through proposals and referenda. Users can propose motions, vote on them, and once a proposal crosses a certain threshold of approval, it can be enacted. The Democracy pallet handles time-locking of tokens, voting periods, and other aspects of democratic governance.&#xD;&#xA;&#xD;&#xA;**Collective Pallet**&#xD;&#xA;&#xD;&#xA;The Collective pallet is designed for multi-signature governance, but it could be adapted for your needs. It allows a group of accounts to make decisions through voting. While it's more often used for council governance, you could use it as a basis for a more general voting system.&#xD;&#xA;&#xD;&#xA;**Treasury Pallet**&#xD;&#xA;&#xD;&#xA;Though not directly a voting system, the Treasury pallet is often used in combination with the Democracy or Collective pallets to propose spending of communal funds. Proposals can be put up for a vote, and if they pass the threshold, the funds are allocated accordingly.&#xD;&#xA;&#xD;&#xA;**Custom Pallet**&#xD;&#xA;&#xD;&#xA;If none of the existing pallets meet your specific requirements, you can also create a custom pallet. Since you're already a blockchain developer working on Substrate, you'll find it quite straightforward to develop a pallet tailored to your needs. You can take inspiration from the existing pallets and add your custom logic.&#xD;&#xA;&#xD;&#xA;**Steps to Implement:**&#xD;&#xA;&#xD;&#xA;Choose or Customize Pallet: Decide whether to use an existing pallet like Democracy or Collective, or create a new one.&#xD;&#xA;&#xD;&#xA;**Add to Runtime:** Once you have the pallet, include it in your runtime by modifying your `runtime/src/lib.rs` or equivalent.&#xD;&#xA;&#xD;&#xA;**Configuration:** Configure the pallet's parameters such as voting period, enactment period, and thresholds.&#xD;&#xA;&#xD;&#xA;**Testing:** Use Substrate's testing framework to ensure that the pallet works as expected.&#xD;&#xA;&#xD;&#xA;**Front-end:** Build the user interface for proposal creation and voting using Polkadot.js or your own custom front-end.&#xD;&#xA;&#xD;&#xA;**Deployment:** Finally, include your new pallet in a runtime upgrade and deploy it.&#xD;&#xA;&#xD;&#xA;By carefully selecting and configuring these pallets, you can build a robust voting system tailored to the needs of your custom blockchain." ContentLicense="CC BY-SA 4.0" />
  <row Id="40358" PostHistoryTypeId="2" PostId="10178" RevisionGUID="071bd665-588f-4545-9f9a-0f46912ccd74" CreationDate="2023-10-10T09:36:13.223" UserId="4731" Text="I have downloaded the [substrate node template][1] and started working on a new project. For my project, I want to implement a native token. I've decided to use pallet balances to implement this native token, but I'm confused about the token minting process in this pallet. Also, is there any initial token mint available in this pallet? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="40360" PostHistoryTypeId="1" PostId="10178" RevisionGUID="071bd665-588f-4545-9f9a-0f46912ccd74" CreationDate="2023-10-10T09:36:13.223" UserId="4731" Text="Initial Token mint in Substrate Blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="40361" PostHistoryTypeId="3" PostId="10178" RevisionGUID="071bd665-588f-4545-9f9a-0f46912ccd74" CreationDate="2023-10-10T09:36:13.223" UserId="4731" Text="|pallet|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40362" PostHistoryTypeId="2" PostId="10179" RevisionGUID="7f0a2493-21c5-4c7c-994b-9a3189b648e0" CreationDate="2023-10-10T09:38:00.440" UserId="427" Text="You can use `iter_prefix()` from the StorageDoubleMap to iterate over values that share the first key. You can find one such example [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/033d4e86cc7eff0066cd376b9375f815761d653c/frame/nfts/src/features/roles.rs#L133" ContentLicense="CC BY-SA 4.0" />
  <row Id="40366" PostHistoryTypeId="2" PostId="10181" RevisionGUID="1af97f04-9292-44f0-b683-0bb4a5d80871" CreationDate="2023-10-10T10:38:27.103" UserId="94" Text="An initial mint map can be setup in the [`GenesisConfig`](https://github.com/paritytech/polkadot-sdk/blob/2b4b33d01f22b1f4037a404597357f398e21224f/substrate/frame/balances/src/lib.rs#L495). You can configure the initial balances of any number of accounts in there.&#xD;&#xA;&#xD;&#xA;Minting can be done only by `root` via [`force_set_balance`](https://github.com/paritytech/substrate/blob/033d4e86cc7eff0066cd376b9375f815761d653c/frame/balances/src/lib.rs#L699); this call forces the balance of an account to a specific amount." ContentLicense="CC BY-SA 4.0" />
  <row Id="40368" PostHistoryTypeId="2" PostId="10182" RevisionGUID="3708fad8-a380-4940-81e6-2d94ed018c80" CreationDate="2023-10-10T10:42:40.433" UserId="94" Text="Does the on-chain logic really need to find this value itself or is verifying a valid position enough?  &#xD;&#xA;&#xD;&#xA;The problem is that this could incur an unbound storage iteration and slow down the chain. If this runs on a parachain there would be the chance that it halts when there are lots of entries in the map.  &#xD;&#xA;Maybe it is possible to find the entry off-chain and provide the index as *witness* argument to the extrinsic.&#xD;&#xA;&#xD;&#xA;If this is not a problem for you, then the `iter_prefix` mentioned above is indeed possible." ContentLicense="CC BY-SA 4.0" />
  <row Id="40370" PostHistoryTypeId="2" PostId="10183" RevisionGUID="432730d5-2c30-45f6-8646-945d07960e12" CreationDate="2023-10-10T13:19:59.350" UserId="377" Text="For that first we need to export the state of the chain on any given blocknumber.&#xD;&#xA;&#xD;&#xA;    ./target/release/chain-node export-state --chain=currentChainSpecRaw.json --base-path /Users/pcs/documents/node01 1000 &gt; chain-exported-100.json&#xD;&#xA;&#xD;&#xA;Then you need to start the the chain with the exported chainspec." ContentLicense="CC BY-SA 4.0" />
  <row Id="40373" PostHistoryTypeId="52" PostId="10173" RevisionGUID="41b0c941-e197-4be5-92a5-f78b84a1a3a3" CreationDate="2023-10-10T15:34:08.540" />
  <row Id="40374" PostHistoryTypeId="2" PostId="10184" RevisionGUID="8e619596-d124-4c48-99e7-ba632dbffffd" CreationDate="2023-10-10T16:43:15.963" UserId="560" Text="Is there a simple way to query polkadot in order to get which block will be the last block of the lease period?&#xD;&#xA;&#xD;&#xA;I want to be able to query polkadot in order to see how long a certain parachain has left of its lease time, is there a simple way of doing this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="40376" PostHistoryTypeId="1" PostId="10184" RevisionGUID="8e619596-d124-4c48-99e7-ba632dbffffd" CreationDate="2023-10-10T16:43:15.963" UserId="560" Text="Query for a polkadot connect parachain's lease time" ContentLicense="CC BY-SA 4.0" />
  <row Id="40377" PostHistoryTypeId="3" PostId="10184" RevisionGUID="8e619596-d124-4c48-99e7-ba632dbffffd" CreationDate="2023-10-10T16:43:15.963" UserId="560" Text="|polkadot|parachain|lease|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40380" PostHistoryTypeId="50" PostId="4853" RevisionGUID="e6b2d48a-ce6f-4256-8eda-e4510e598625" CreationDate="2023-10-11T05:02:30.430" UserId="-1" />
  <row Id="40381" PostHistoryTypeId="2" PostId="10185" RevisionGUID="4c870499-1e24-4eeb-bd53-41d19395f9a7" CreationDate="2023-10-11T09:18:43.453" UserId="2420" Text="Did anyone use light client (smoldot) with substrate-connect js library for connecting to multiple chains? Or have any experience with it?&#xD;&#xA;Let me describe the problem. In the Nova Spektr application we're using substrate-connect for the light client support. However the desktop application may keep only 3 light client instances running at the same time and the laptop starts consume the RAM (more than 4GB).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40383" PostHistoryTypeId="1" PostId="10185" RevisionGUID="4c870499-1e24-4eeb-bd53-41d19395f9a7" CreationDate="2023-10-11T09:18:43.453" UserId="2420" Text="Running smoldot light client with substrate-connect" ContentLicense="CC BY-SA 4.0" />
  <row Id="40384" PostHistoryTypeId="3" PostId="10185" RevisionGUID="4c870499-1e24-4eeb-bd53-41d19395f9a7" CreationDate="2023-10-11T09:18:43.453" UserId="2420" Text="|light-client|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40385" PostHistoryTypeId="2" PostId="10186" RevisionGUID="f9a7fd50-6390-453b-9c0a-0b5ad8ec5402" CreationDate="2023-10-11T09:44:29.220" UserId="377" Text="I am using vec&lt;u8&gt; to storing the string data on the chain.&#xD;&#xA;&#xD;&#xA;So when any user passing few special character it just convert it into the binary data and storing that binary data on the chain. Which we cannot decode later.&#xD;&#xA;&#xD;&#xA;List of character on which this issue happening:&#xD;&#xA;&#xD;&#xA; - Latin charcters - ñ&#xD;&#xA; - Single apostrophe (unclosed) - ‘&#xD;&#xA; - Emojis&#xD;&#xA; - %0A - This represents a line feed or newline character.&#xD;&#xA; - %20 - This represents a space character when URL-encoded.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is there any way to handle these data to store on the chain? or do we have any other type to store string data on chain?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/H2Opb.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40387" PostHistoryTypeId="1" PostId="10186" RevisionGUID="f9a7fd50-6390-453b-9c0a-0b5ad8ec5402" CreationDate="2023-10-11T09:44:29.220" UserId="377" Text="How to handle all the characters in Vec&lt;u8&gt;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40388" PostHistoryTypeId="3" PostId="10186" RevisionGUID="f9a7fd50-6390-453b-9c0a-0b5ad8ec5402" CreationDate="2023-10-11T09:44:29.220" UserId="377" Text="|vec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40389" PostHistoryTypeId="2" PostId="10187" RevisionGUID="3b62b0d6-1a5a-4dea-88f1-a96c6fea2e00" CreationDate="2023-10-11T10:06:39.357" UserId="2844" Text="I am going through this [article](https://stellaswap.medium.com/first-trustless-bitcoin-ibtc-launches-on-polkadot-moonbeam-c3638055a24a), where it talk about bringing bitcoin in substrate chain using `iBTC`. I am struggling to find resources about iBTC integrate in substrate chain. Someone please provide some resources. Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40391" PostHistoryTypeId="1" PostId="10187" RevisionGUID="3b62b0d6-1a5a-4dea-88f1-a96c6fea2e00" CreationDate="2023-10-11T10:06:39.357" UserId="2844" Text="how to bring bitcoin in polkadot substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40392" PostHistoryTypeId="3" PostId="10187" RevisionGUID="3b62b0d6-1a5a-4dea-88f1-a96c6fea2e00" CreationDate="2023-10-11T10:06:39.357" UserId="2844" Text="|polkadot|bridge|interbtc|bitcoin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40393" PostHistoryTypeId="5" PostId="10187" RevisionGUID="0b202293-0173-4731-99a0-67db8cfab691" CreationDate="2023-10-11T10:12:02.753" UserId="2844" Comment="added 55 characters in body" Text="I am going through this [article](https://stellaswap.medium.com/first-trustless-bitcoin-ibtc-launches-on-polkadot-moonbeam-c3638055a24a), where it talk about bringing bitcoin in substrate chain using `iBTC`. I am struggling to find resources about iBTC integrate in substrate chain. Someone please provide some resources. Thanks!&#xD;&#xA;&#xD;&#xA;[iBTC github](https://github.com/interlay/interbtc)" ContentLicense="CC BY-SA 4.0" />
  <row Id="40394" PostHistoryTypeId="2" PostId="10188" RevisionGUID="bfcc33b9-9810-4465-bb26-b3f13de68a47" CreationDate="2023-10-11T10:15:48.210" UserId="251" Text="In low-level `String` is `Vec`, `Vec` is `String`.&#xD;&#xA;&#xD;&#xA;https://doc.rust-lang.org/src/alloc/string.rs.html#365-367&#xD;&#xA;&#xD;&#xA;You must instruct your library or dApp on how to handle this data when it reads these from storages." ContentLicense="CC BY-SA 4.0" />
  <row Id="40396" PostHistoryTypeId="6" PostId="10186" RevisionGUID="40c75c5e-9257-46f2-906c-017756e5fa2d" CreationDate="2023-10-11T10:18:56.023" UserId="251" Comment="edited tags" Text="|rust|vec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40397" PostHistoryTypeId="2" PostId="10189" RevisionGUID="8a3c36c4-96aa-4ccc-ac45-0d99ddca2d93" CreationDate="2023-10-11T14:45:07.487" UserId="2985" Text="I was using substrate version of ```4.0.0-dev-41ad4a6c9d7``` and following the [Add Trusted Nodes](https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/) for making a custom account as a Authorites account&#xD;&#xA;&#xD;&#xA;here, I can't able to produce new blocks, I don't know what is the root cause,&#xD;&#xA;&#xD;&#xA;I was running the nodes with only one local system, just using different terminals to run nodes&#xD;&#xA;&#xD;&#xA;I have gone through a lot of stack exchange questions&#xD;&#xA;&#xD;&#xA;&lt;https://substrate.stackexchange.com/questions/9196/cant-able-to-peer-two-different-node-on-different-computers&gt;&#xD;&#xA;&#xD;&#xA;&lt;https://substrate.stackexchange.com/questions/3414/cannot-produce-and-finalize-blocks-with-2-node-peer&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/node01 \&#xD;&#xA;--chain ./devChainRaw.json \&#xD;&#xA;--port 30333 \&#xD;&#xA;--rpc-port 9933 \&#xD;&#xA;--validator \&#xD;&#xA;--rpc-cors all \&#xD;&#xA;--rpc-external \&#xD;&#xA;--rpc-methods Unsafe \&#xD;&#xA;--name MyNode01&#xD;&#xA;&#xD;&#xA;./target/release/node-template key insert --base-path /tmp/node01 \&#xD;&#xA;  --chain ./devChainRaw.json \&#xD;&#xA;  --scheme Sr25519 \&#xD;&#xA;  --suri &quot;risk charge consider cinnamon initial demise second mistake barely burger desert educate&quot; \&#xD;&#xA;  --key-type aura&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;./target/release/node-template key insert \&#xD;&#xA;  --base-path /tmp/node01 \&#xD;&#xA;  --chain ./devChainRaw.json \&#xD;&#xA;  --scheme Ed25519 \&#xD;&#xA;  --suri &quot;risk charge consider cinnamon initial demise second mistake barely burger desert educate&quot; \&#xD;&#xA;  --key-type gran&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;./target/release/node-template \&#xD;&#xA;  --base-path /tmp/node02 \&#xD;&#xA;  --chain ./devChainRaw.json \&#xD;&#xA;  --port 30334 \&#xD;&#xA;  --rpc-port 9946 \&#xD;&#xA;  --validator \&#xD;&#xA;  --rpc-cors all \&#xD;&#xA;  --rpc-external \&#xD;&#xA;  --rpc-methods Unsafe \&#xD;&#xA;  --name MyNode02 \&#xD;&#xA;  --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWBtsQ9sMwNAUYZv2iouoH5SnRmBLtf9SdpLL94LeHzDNM&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;./target/release/node-template key insert --base-path /tmp/node02 \&#xD;&#xA;  --chain ./devChainRaw.json \&#xD;&#xA;  --scheme Sr25519 \&#xD;&#xA;  --suri &quot;chef wise bunker slim shell drastic glory spike damp mystery tag butter&quot; \&#xD;&#xA;  --key-type aura&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; ./target/release/node-template key insert --base-path /tmp/node02 \&#xD;&#xA;  --chain ./devChainRaw.json \&#xD;&#xA;  --scheme Ed25519 \&#xD;&#xA;  --suri &quot;chef wise bunker slim shell drastic glory spike damp mystery tag butter&quot; \&#xD;&#xA;  --key-type gran&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;plain chain specs file &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;Development&quot;,&#xD;&#xA;  &quot;id&quot;: &quot;dev&quot;,&#xD;&#xA;  &quot;chainType&quot;: &quot;Development&quot;,&#xD;&#xA;  &quot;bootNodes&quot;: [],&#xD;&#xA;  &quot;telemetryEndpoints&quot;: null,&#xD;&#xA;  &quot;protocolId&quot;: null,&#xD;&#xA;  &quot;properties&quot;: null,&#xD;&#xA;  &quot;codeSubstitutes&quot;: {},&#xD;&#xA;  &quot;genesis&quot;: {&#xD;&#xA;    &quot;runtime&quot;: {&#xD;&#xA;      &quot;system&quot;: ''&#xD;&#xA;    },&#xD;&#xA;      &quot;aura&quot;: {&#xD;&#xA;        &quot;authorities&quot;: [&#xD;&#xA;          &quot;5DcAu1NnYPqecdPYcuF9Q6seVzqn22iSdGZisyC5apE27CRu&quot;,&#xD;&#xA;          &quot;5FCK3YZoWddN3Q3DMC6KgXVsRNtVFkhbrX4NLcKWDnx2yG1s&quot;&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;grandpa&quot;: {&#xD;&#xA;        &quot;authorities&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5Cbh7iDuUoSqwiJmr3ya9PF2GAXaKSTuoFrX3EytVMkNMPrN&quot;,&#xD;&#xA;            1&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5Dh4mZNHTmavtjhc2dfMoU5oe4HEPVZiZWEF3bPg6gBjrmnA&quot;,&#xD;&#xA;            1&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;balances&quot;: {&#xD;&#xA;        &quot;balances&quot;: [&#xD;&#xA;          [&#xD;&#xA;            &quot;5DcAu1NnYPqecdPYcuF9Q6seVzqn22iSdGZisyC5apE27CRu&quot;,&#xD;&#xA;            1152921504606846976&#xD;&#xA;          ],&#xD;&#xA;          [&#xD;&#xA;            &quot;5FCK3YZoWddN3Q3DMC6KgXVsRNtVFkhbrX4NLcKWDnx2yG1s&quot;,&#xD;&#xA;            1152921504606846976&#xD;&#xA;          ]&#xD;&#xA;        ]&#xD;&#xA;      },&#xD;&#xA;      &quot;transactionPayment&quot;: {&#xD;&#xA;        &quot;multiplier&quot;: &quot;1000000000000000000&quot;&#xD;&#xA;      },&#xD;&#xA;      &quot;sudo&quot;: {&#xD;&#xA;        &quot;key&quot;: &quot;5DcAu1NnYPqecdPYcuF9Q6seVzqn22iSdGZisyC5apE27CRu&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I would like to why nodes haven't started producing blocks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/esDEH.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40399" PostHistoryTypeId="1" PostId="10189" RevisionGUID="8a3c36c4-96aa-4ccc-ac45-0d99ddca2d93" CreationDate="2023-10-11T14:45:07.487" UserId="2985" Text="Cant produce new blocks with custom ChainSpec file" ContentLicense="CC BY-SA 4.0" />
  <row Id="40400" PostHistoryTypeId="3" PostId="10189" RevisionGUID="8a3c36c4-96aa-4ccc-ac45-0d99ddca2d93" CreationDate="2023-10-11T14:45:07.487" UserId="2985" Text="|substrate-node-template|account|chainspec|finality|tutorials|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40401" PostHistoryTypeId="2" PostId="10190" RevisionGUID="48137ff0-ff99-4e83-9614-91aff5a587a6" CreationDate="2023-10-11T17:27:28.387" UserId="4623" Text="After building a chain from [Substrate node template][1] there are some initial native token balances in the predefined accounts. Can I mint the native token on a smart contract level using the `root` account possibly using ink! smart contract framework?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="40403" PostHistoryTypeId="1" PostId="10190" RevisionGUID="48137ff0-ff99-4e83-9614-91aff5a587a6" CreationDate="2023-10-11T17:27:28.387" UserId="4623" Text="Can we mint native token from root account on Smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40404" PostHistoryTypeId="3" PostId="10190" RevisionGUID="48137ff0-ff99-4e83-9614-91aff5a587a6" CreationDate="2023-10-11T17:27:28.387" UserId="4623" Text="|ink|smart-contract|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40405" PostHistoryTypeId="2" PostId="10191" RevisionGUID="20591a02-0add-4fc7-9f8f-f5f241e8126e" CreationDate="2023-10-11T19:23:58.327" UserId="4425" Text="[The force_vote function](https://github.com/ATV3320/astar/blob/main/delete_stub/voting/lib.rs) in voting contract places a call to a different contract easily, but when I want to get some data from the other contract as well, it fails. Similarly in the function where [the funds get distributed](https://github.com/ATV3320/astar/blob/144d20a9346d30d4e49e47bb2c8d82369e7701d2/delete_stub/voting/lib.rs#L601) it is throwing &quot;ContractTrapped&quot; error. &#xD;&#xA;If I try hardcoding the values, it works fine, but not in this case. &#xD;&#xA;Am I doing something wrong here?&#xD;&#xA;```#[ink(message)]&#xD;&#xA;        pub fn force_vote(&amp;mut self, _vote_id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            if self.env().caller() != self.admin {&#xD;&#xA;                return Err(Error::UnAuthorisedCall);&#xD;&#xA;            }&#xD;&#xA;            if self.vote_id_to_info.get(_vote_id).unwrap().admin_hit_time&#xD;&#xA;                &gt; self.env().block_timestamp()&#xD;&#xA;            {&#xD;&#xA;                return Err(Error::RightsNotActivatedYet);&#xD;&#xA;            }&#xD;&#xA;            let mut x = self.vote_id_to_info.get(_vote_id).unwrap();&#xD;&#xA;&#xD;&#xA;            if !x.is_active {&#xD;&#xA;                return Err(Error::ResultAlreadyPublished);&#xD;&#xA;            }&#xD;&#xA;            if x.decided_deadline &gt; 0 {&#xD;&#xA;                let result_call = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                    .call(self.escrow_address)&#xD;&#xA;                    .gas_limit(0)&#xD;&#xA;                    .transferred_value(0)&#xD;&#xA;                    .exec_input(&#xD;&#xA;                        ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(&#xD;&#xA;                            ink::selector_bytes!(&quot;arbiters_extend_deadline&quot;),&#xD;&#xA;                        ))&#xD;&#xA;                        .push_arg(&amp;x.audit_id)&#xD;&#xA;                        .push_arg(&amp;x.decided_deadline + self.env().block_timestamp())&#xD;&#xA;                        .push_arg(&amp;x.decided_haircut)&#xD;&#xA;                        .push_arg(self.arbiters_share),&#xD;&#xA;                    )&#xD;&#xA;                    .returns::&lt;Result&lt;()&gt;&gt;()&#xD;&#xA;                    .try_invoke();&#xD;&#xA;                if matches!(result_call.unwrap().unwrap(), Result::Ok(())) {&#xD;&#xA;                    //middleout changes&#xD;&#xA;                    // let payment_info = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                    //     .call(self.escrow_address)&#xD;&#xA;                    //     .gas_limit(0)&#xD;&#xA;                    //     .transferred_value(0)&#xD;&#xA;                    //     .exec_input(&#xD;&#xA;                    //         ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(&#xD;&#xA;                    //             ink::selector_bytes!(&quot;get_paymentinfo&quot;),&#xD;&#xA;                    //         ))&#xD;&#xA;                    //         .push_arg(x.audit_id),&#xD;&#xA;                    //     )&#xD;&#xA;                    //     .returns::&lt;Option&lt;PaymentInfo&gt;&gt;()&#xD;&#xA;                    //     .invoke()&#xD;&#xA;                    //     .unwrap();&#xD;&#xA;                    // let push_value =&#xD;&#xA;                    //     payment_info.value * 5 / 100 + self.get_treasury_info(_vote_id).unwrap();&#xD;&#xA;                    // // let push_value = self.internal_value_calculator(_vote_id, 5, x.audit_id);&#xD;&#xA;                    // self.vote_id_to_treasury.insert(_vote_id, &amp;push_value);&#xD;&#xA;                    let bal: Balance = 1000;&#xD;&#xA;                    self.vote_id_to_treasury.insert(_vote_id, &amp;bal);&#xD;&#xA;&#xD;&#xA;                    x.is_active = false;&#xD;&#xA;                    x.decided_deadline = (x.decided_deadline) / (x.available_votes as Timestamp);&#xD;&#xA;                    x.decided_haircut = (x.decided_haircut) / (x.available_votes as Balance);&#xD;&#xA;                    self.vote_id_to_info.insert(_vote_id, &amp;x);&#xD;&#xA;                    self.env().emit_event(FinalVotePushed {&#xD;&#xA;                        id: _vote_id,&#xD;&#xA;                        pusher: self.env().caller(),&#xD;&#xA;                    });&#xD;&#xA;                    return Ok(());&#xD;&#xA;                } else {&#xD;&#xA;                    return Err(Error::AssessmentFailed);&#xD;&#xA;                }&#xD;&#xA;            } else if x.decided_deadline == 0 {&#xD;&#xA;                let result_call = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                    .call(self.escrow_address)&#xD;&#xA;                    .gas_limit(0)&#xD;&#xA;                    .transferred_value(0)&#xD;&#xA;                    .exec_input(&#xD;&#xA;                        ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(&#xD;&#xA;                            ink::selector_bytes!(&quot;assess_audit&quot;),&#xD;&#xA;                        ))&#xD;&#xA;                        .push_arg(&amp;x.audit_id)&#xD;&#xA;                        .push_arg(true),&#xD;&#xA;                    )&#xD;&#xA;                    .returns::&lt;Result&lt;()&gt;&gt;()&#xD;&#xA;                    .try_invoke();&#xD;&#xA;                if matches!(result_call.unwrap().unwrap(), Result::Ok(())) {&#xD;&#xA;                    // let payment_info = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                    //     .call(self.escrow_address)&#xD;&#xA;                    //     .gas_limit(0)&#xD;&#xA;                    //     .transferred_value(0)&#xD;&#xA;                    //     .exec_input(&#xD;&#xA;                    //         ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(&#xD;&#xA;                    //             ink::selector_bytes!(&quot;get_paymentinfo&quot;),&#xD;&#xA;                    //         ))&#xD;&#xA;                    //         .push_arg(x.audit_id),&#xD;&#xA;                    //     )&#xD;&#xA;                    //     .returns::&lt;Option&lt;PaymentInfo&gt;&gt;()&#xD;&#xA;                    //     .invoke()&#xD;&#xA;                    //     .unwrap();&#xD;&#xA;                    // let push_value =&#xD;&#xA;                    //     payment_info.value * 5 / 100 + self.get_treasury_info(_vote_id).unwrap();&#xD;&#xA;                    // let push_value = self.internal_value_calculator(_vote_id, 5, x.audit_id);&#xD;&#xA;                    // self.vote_id_to_treasury.insert(_vote_id, &amp;push_value);&#xD;&#xA;                    let bal: Balance = 1000;&#xD;&#xA;                    self.vote_id_to_treasury.insert(_vote_id, &amp;bal);&#xD;&#xA;                    x.is_active = false;&#xD;&#xA;                    self.vote_id_to_info.insert(_vote_id, &amp;x);&#xD;&#xA;                    return Ok(());&#xD;&#xA;                } else {&#xD;&#xA;                    return Err(Error::AssessmentFailed);&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;            return Err(Error::UnAuthorisedCall);&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="40407" PostHistoryTypeId="1" PostId="10191" RevisionGUID="20591a02-0add-4fc7-9f8f-f5f241e8126e" CreationDate="2023-10-11T19:23:58.327" UserId="4425" Text="What could be the reason for my contract throwing &quot;ContractTrapped&quot;? Other cross contract calls are successful, but not in this code" ContentLicense="CC BY-SA 4.0" />
  <row Id="40408" PostHistoryTypeId="3" PostId="10191" RevisionGUID="20591a02-0add-4fc7-9f8f-f5f241e8126e" CreationDate="2023-10-11T19:23:58.327" UserId="4425" Text="|ink|smart-contract|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40409" PostHistoryTypeId="50" PostId="9894" RevisionGUID="0425c1aa-b588-49be-bc4d-77d274166de9" CreationDate="2023-10-11T21:02:20.280" UserId="-1" />
  <row Id="40410" PostHistoryTypeId="2" PostId="10192" RevisionGUID="742c2890-a316-4ce9-a6bf-435a6a00e903" CreationDate="2023-10-11T23:06:42.090" UserId="590" Text="How is the len parameter of the Signed Extension validation function computed?&#xD;&#xA;&#xD;&#xA;I tried computing the length with PolkadotJS by getting the length of the encoded call but that does not seem to be the same as the length that is being passed into the validate parameter.&#xD;&#xA;&#xD;&#xA;I am guessing the length is not the length of the Call function since an additional parameter is passed instead of getting it from the Call function.&#xD;&#xA;&#xD;&#xA;[SigneExtension](https://github.com/paritytech/substrate/blob/a200cdb93c6af5763b9c7bf313fa708764ac88ca/primitives/runtime/src/traits.rs#L725C3-L725C3)" ContentLicense="CC BY-SA 4.0" />
  <row Id="40412" PostHistoryTypeId="1" PostId="10192" RevisionGUID="742c2890-a316-4ce9-a6bf-435a6a00e903" CreationDate="2023-10-11T23:06:42.090" UserId="590" Text="Signed Extension validate len parameter" ContentLicense="CC BY-SA 4.0" />
  <row Id="40413" PostHistoryTypeId="3" PostId="10192" RevisionGUID="742c2890-a316-4ce9-a6bf-435a6a00e903" CreationDate="2023-10-11T23:06:42.090" UserId="590" Text="|polkadot-js|signed-extensions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40414" PostHistoryTypeId="2" PostId="10193" RevisionGUID="92b9fe05-d7ff-4c42-b2c9-4799cbf496c6" CreationDate="2023-10-12T03:14:16.173" UserId="4784" Text="To update c++ command line in Ubuntu 18.04&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo apt-get install build-essential clang curl git make git clang curl libssl-dev llvm libudev-dev make protobuf-compiler make clang -y&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;$ c++ --version &#xD;&#xA;&#xD;&#xA;c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0&#xD;&#xA;Copyright (C) 2017 Free Software Foundation, Inc.&#xD;&#xA;This is free software; see the source for copying conditions.  There is NO&#xD;&#xA;warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40416" PostHistoryTypeId="2" PostId="10194" RevisionGUID="31fc2de4-13e5-4f30-858d-e84b6d231a1f" CreationDate="2023-10-12T07:54:49.690" UserId="4785" Text="``` let result_call = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                    .call(self.escrow_address)&#xD;&#xA;                    .gas_limit(0)&#xD;&#xA;                    .transferred_value(0)&#xD;&#xA;                    .exec_input(&#xD;&#xA;                        ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(&#xD;&#xA;                            ink::selector_bytes!(&quot;arbiters_extend_deadline&quot;),&#xD;&#xA;                        ))&#xD;&#xA;                        .push_arg(&amp;x.audit_id)&#xD;&#xA;                        .push_arg(&amp;x.decided_deadline + self.env().block_timestamp())&#xD;&#xA;                        .push_arg(&amp;x.decided_haircut)&#xD;&#xA;                        .push_arg(self.arbiters_share),&#xD;&#xA;                    )&#xD;&#xA;                    .returns::&lt;Balance&gt;()&#xD;&#xA;                    .try_invoke().unwrap().unwrap();&#xD;&#xA;                if result_call &gt; 0 {&#xD;&#xA;                    let push_value =&#xD;&#xA;                        result_call + self.get_treasury_info(_vote_id).unwrap();&#xD;&#xA;                    self.vote_id_to_treasury.insert(_vote_id, &amp;push_value);```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In this function force_vote, &#xD;&#xA;due to line:&#xD;&#xA;let push_value =&#xD;&#xA;                        result_call + self.get_treasury_info(_vote_id).unwrap();&#xD;&#xA;I'm getting &quot;ContractTrapped&quot; error. the other contract is returning Balance properly, if in push_value I add a static value instead of the result_call even then it is working fine, but not with result_call what could be the reason for this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40418" PostHistoryTypeId="1" PostId="10194" RevisionGUID="31fc2de4-13e5-4f30-858d-e84b6d231a1f" CreationDate="2023-10-12T07:54:49.690" UserId="4785" Text="&quot;ContractTrapped&quot; Error even with successful cross-contract call" ContentLicense="CC BY-SA 4.0" />
  <row Id="40419" PostHistoryTypeId="3" PostId="10194" RevisionGUID="31fc2de4-13e5-4f30-858d-e84b6d231a1f" CreationDate="2023-10-12T07:54:49.690" UserId="4785" Text="|smart-contract|rust|error|astar|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40420" PostHistoryTypeId="5" PostId="10194" RevisionGUID="f601e464-6757-441f-b7a9-87f79bf573da" CreationDate="2023-10-12T07:57:49.173" UserId="4785" Comment="deleted 7 characters in body" Text="```` &#xD;&#xA;let result_call = ink::env::call::build_call::&lt;Environment&gt;()&#xD;&#xA;                    .call(self.escrow_address)&#xD;&#xA;                    .gas_limit(0)&#xD;&#xA;                    .transferred_value(0)&#xD;&#xA;                    .exec_input(&#xD;&#xA;                        ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(&#xD;&#xA;                            ink::selector_bytes!(&quot;arbiters_extend_deadline&quot;),&#xD;&#xA;                        ))&#xD;&#xA;                        .push_arg(&amp;x.audit_id)&#xD;&#xA;                        .push_arg(&amp;x.decided_deadline + self.env().block_timestamp())&#xD;&#xA;                        .push_arg(&amp;x.decided_haircut)&#xD;&#xA;                        .push_arg(self.arbiters_share),&#xD;&#xA;                    )&#xD;&#xA;                    .returns::&lt;Balance&gt;()&#xD;&#xA;                    .try_invoke().unwrap().unwrap();&#xD;&#xA;                if result_call &gt; 0 {&#xD;&#xA;                    let push_value =&#xD;&#xA;                        result_call + self.get_treasury_info(_vote_id).unwrap();&#xD;&#xA;                    self.vote_id_to_treasury.insert(_vote_id, &amp;push_value);&#xD;&#xA;````&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In this function force_vote,  due to line: ````let push_value =&#xD;&#xA;  result_call + self.get_treasury_info(_vote_id).unwrap();````&#xD;&#xA; I'm getting &quot;ContractTrapped&quot; error. the other contract is returning Balance properly, if in push_value I add a static value instead of the result_call even then it is working fine, but not with result_call what could be the reason for this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40421" PostHistoryTypeId="50" PostId="9794" RevisionGUID="847fc6ca-5e35-4781-89ac-0f3ce8e60409" CreationDate="2023-10-12T08:01:05.123" UserId="-1" />
  <row Id="40422" PostHistoryTypeId="50" PostId="8859" RevisionGUID="2d5d0281-6945-4b27-9dab-ba7f7c784f7f" CreationDate="2023-10-12T09:03:40.403" UserId="-1" />
  <row Id="40423" PostHistoryTypeId="4" PostId="10083" RevisionGUID="ec7ce46e-32ca-415b-bfa7-2627b81ee5f8" CreationDate="2023-10-12T12:25:23.193" UserId="2477" Comment="edited title" Text="Can contract create and control a proxy account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40428" PostHistoryTypeId="2" PostId="10196" RevisionGUID="2a4ccc13-9322-4925-af34-85d557386172" CreationDate="2023-10-12T13:14:18.203" UserId="560" Text="Both interlay and hashed network are working on btc bridges(I think). &#xD;&#xA;iBTC is wrapped btc, i would advice you to check out atomic swaps and:&#xD;&#xA;https://wiki.polkadot.network/docs/learn-bridges  " ContentLicense="CC BY-SA 4.0" />
  <row Id="40434" PostHistoryTypeId="2" PostId="10198" RevisionGUID="7ed8eb89-2217-4e38-bfab-4ef4d6beca5a" CreationDate="2023-10-12T23:03:04.020" UserId="4786" Text="Node is working correct but there is a moment that shows the following error messages and reboots:&#xD;&#xA;&#xD;&#xA;~~~&#xD;&#xA;2023-10-12 19:39:26 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:26 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:27 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:27 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:27 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:27 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:27 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:27 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:27 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:27 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:28 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:28 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:28 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:28 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:28 Accepting new connection 170/10000&#xD;&#xA;2023-10-12 19:39:28 Accepting new connection 171/10000&#xD;&#xA;2023-10-12 19:39:28 Accepting new connection 171/10000&#xD;&#xA;023-10-12 19:39:28 [Relaychain] subsystem exited with error subsystem=&quot;candidate-validation-subsystem&quot; err=FromOrigin { origin: &quot;candidate-validation&quot;, source: Generated(Context(&quot;Signal cha&#xD;&#xA;nnel is terminated and empty.&quot;)) }&#xD;&#xA;2023-10-12 19:39:28 [Relaychain] subsystem exited with error subsystem=&quot;availability-distribution-subsystem&quot; err=FromOrigin { origin: &quot;availability-distribution&quot;, source: IncomingMessageChan&#xD;&#xA;nel(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-10-12 19:39:28 [Relaychain] subsystem exited with error subsystem=&quot;availability-recovery-subsystem&quot; err=FromOrigin { origin: &quot;availability-recovery&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-10-12 19:39:28 [Relaychain] error receiving message from subsystem context: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;2023-10-12 19:39:28 [Relaychain] subsystem exited with error subsystem=&quot;chain-api-subsystem&quot; err=FromOrigin { origin: &quot;chain-api&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-10-12 19:39:28 [Relaychain] subsystem exited with error subsystem=&quot;bitfield-signing-subsystem&quot; err=FromOrigin { origin: &quot;bitfield-signing&quot;, source: Generated(Context(&quot;Signal channel is terminated and empty.&quot;)) }&#xD;&#xA;2023-10-12 19:39:28 [Relaychain] Overseer exited with error err=Generated(SubsystemStalled(&quot;approval-voting-subsystem&quot;))&#xD;&#xA;2023-10-12 19:39:28 [Relaychain] Essential task `overseer` failed. Shutting down service.    &#xD;&#xA;2023-10-12 19:39:28 [Relaychain] subsystem exited with error subsystem=&quot;runtime-api-subsystem&quot; err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;2023-10-12 19:39:28 [Relaychain] subsystem exited with error subsystem=&quot;statement-distribution-subsystem&quot; err=FromOrigin { origin: &quot;statement-distribution&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-10-12 19:39:28 [Relaychain] subsystem exited with error subsystem=&quot;dispute-distribution-subsystem&quot; err=FromOrigin { origin: &quot;dispute-distribution&quot;, source: SubsystemReceive(Generated(Context(&quot;Signal channel is terminated and empty.&quot;))) }&#xD;&#xA;2023-10-12 19:39:28 [Relaychain] Failed to receive a message from Overseer, exiting err=Generated(Context(&quot;Signal channel is terminated and empty.&quot;))&#xD;&#xA;Error: &#xD;&#xA;   0: ESC[91mOther: Essential task failed.ESC[0m&#xD;&#xA;&#xD;&#xA;Backtrace omitted.&#xD;&#xA;Run with RUST_BACKTRACE=1 environment variable to display it.&#xD;&#xA;Run with RUST_BACKTRACE=full to include source snippets.&#xD;&#xA;2023-10-12 19:40:35 Composable    &#xD;&#xA;2023-10-12 19:40:35 ✌️  version 9.10039.1-77660b43b564c969444f0544df90fdb7cf58b865    &#xD;&#xA;2023-10-12 19:40:35 ❤️  by Composable Developers, 2020-2023    &#xD;&#xA;2023-10-12 19:40:35  Chain specification: Composable Finance    &#xD;&#xA;2023-10-12 19:40:35   Node name: composable-network-rpc-01    &#xD;&#xA;2023-10-12 19:40:35  Role: FULL    &#xD;&#xA;~~~&#xD;&#xA;&#xD;&#xA;What can be the cause of this?&#xD;&#xA;&#xD;&#xA;Regards" ContentLicense="CC BY-SA 4.0" />
  <row Id="40436" PostHistoryTypeId="1" PostId="10198" RevisionGUID="7ed8eb89-2217-4e38-bfab-4ef4d6beca5a" CreationDate="2023-10-12T23:03:04.020" UserId="4786" Text="RPC node is rebooting itself from time to time" ContentLicense="CC BY-SA 4.0" />
  <row Id="40437" PostHistoryTypeId="3" PostId="10198" RevisionGUID="7ed8eb89-2217-4e38-bfab-4ef4d6beca5a" CreationDate="2023-10-12T23:03:04.020" UserId="4786" Text="|rpc|substrate-node|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40439" PostHistoryTypeId="2" PostId="10199" RevisionGUID="62c96d7d-499e-4604-ade9-807f17241e61" CreationDate="2023-10-13T06:40:11.813" UserId="464" Text="When I transfer ERC in EVM with the classic method of deployed contract it set the gas limit correctly, however when I want to transfer using the precompile ( moonbeam one ) asset-erc20 ( from metamask too ) I have an OutOfGas log in substrate and the transfer fail. It seems to use the same gas limit than &quot;classic erc20&quot;, if I increase manually the gas limit it works. How can I make it dynamic so it adjust the gas limit correctly ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40441" PostHistoryTypeId="1" PostId="10199" RevisionGUID="62c96d7d-499e-4604-ade9-807f17241e61" CreationDate="2023-10-13T06:40:11.813" UserId="464" Text="How to fix the gas limit using asset-erc20 precompile" ContentLicense="CC BY-SA 4.0" />
  <row Id="40442" PostHistoryTypeId="3" PostId="10199" RevisionGUID="62c96d7d-499e-4604-ade9-807f17241e61" CreationDate="2023-10-13T06:40:11.813" UserId="464" Text="|evm|frontier|pallet-asset|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40443" PostHistoryTypeId="2" PostId="10200" RevisionGUID="0a742f79-606c-4fd0-9f03-6ed629cde510" CreationDate="2023-10-13T10:04:55.040" UserId="4790" Text="everyone. I come from ChainIDE, and I have some confusion regarding the generation mechanism of code hash. I tried to compile Flipper and [PSP22](https://github.com/Brushfam/openbrush-contracts/tree/4.0.0-beta.1) in different folders, but I obtained different code hashes.&#xD;&#xA;&#xD;&#xA; 1. cargo contract 3.0.1 + rustc 1.69 + cargo contract build [flipper &amp; PSP22 (Openbrush 4.0.0 beta)] codehash is different.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;rust-toolchain&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;source&quot;: {&#xD;&#xA;    &quot;hash&quot;: &quot;0x72342d8f061221f13b1dfbaca24fabd929824c3cb9676f7537d1fb93fd7b5039&quot;,&#xD;&#xA;    &quot;language&quot;: &quot;ink! 4.3.0&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;rustc 1.69.0&quot;,&#xD;&#xA;    &quot;build_info&quot;: {&#xD;&#xA;      &quot;build_mode&quot;: &quot;Debug&quot;,&#xD;&#xA;      &quot;cargo_contract_version&quot;: &quot;3.0.1&quot;,&#xD;&#xA;      &quot;rust_toolchain&quot;: &quot;stable-x86_64-unknown-linux-gnu&quot;,&#xD;&#xA;      &quot;wasm_opt_settings&quot;: {&#xD;&#xA;        &quot;keep_debug_symbols&quot;: false,&#xD;&#xA;        &quot;optimization_passes&quot;: &quot;Z&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 2. cargo contract 4.0.0 + rustc 1.71 + cargo contract build —verifiable [flipper] codehash is same but [Openbrush 4.0.0 beta-1)] is different. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;rust-toolchain&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;source&quot;: {&#xD;&#xA;    &quot;hash&quot;: &quot;0x68c1390a1e178c35ea4bd04e42d12f9d4b30113c3615fd469382302c71840933&quot;,&#xD;&#xA;    &quot;language&quot;: &quot;ink! 4.3.0&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;rustc 1.69.0&quot;,&#xD;&#xA;    &quot;build_info&quot;: {&#xD;&#xA;      &quot;build_mode&quot;: &quot;Debug&quot;,&#xD;&#xA;      &quot;cargo_contract_version&quot;: &quot;3.0.1&quot;,&#xD;&#xA;      &quot;rust_toolchain&quot;: &quot;stable-x86_64-unknown-linux-gnu&quot;,&#xD;&#xA;      &quot;wasm_opt_settings&quot;: {&#xD;&#xA;        &quot;keep_debug_symbols&quot;: false,&#xD;&#xA;        &quot;optimization_passes&quot;: &quot;Z&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think the codehash generation might be related to the file path if the openbrush package is introduced, which is similar to eth. Is that correct? And I want to know the generation mechanism of code hash." ContentLicense="CC BY-SA 4.0" />
  <row Id="40445" PostHistoryTypeId="1" PostId="10200" RevisionGUID="0a742f79-606c-4fd0-9f03-6ed629cde510" CreationDate="2023-10-13T10:04:55.040" UserId="4790" Text="What is the principle of Code Hash generation in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40446" PostHistoryTypeId="3" PostId="10200" RevisionGUID="0a742f79-606c-4fd0-9f03-6ed629cde510" CreationDate="2023-10-13T10:04:55.040" UserId="4790" Text="|ink|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40447" PostHistoryTypeId="5" PostId="10200" RevisionGUID="7ccaab66-d6d4-4474-ac5b-bca81123e44f" CreationDate="2023-10-13T10:05:32.013" UserId="4790" Comment="deleted 10 characters in body" Text="I come from ChainIDE, and I have some confusion regarding the generation mechanism of code hash. I tried to compile Flipper and [PSP22](https://github.com/Brushfam/openbrush-contracts/tree/4.0.0-beta.1) in different folders, but I obtained different code hashes.&#xD;&#xA;&#xD;&#xA; 1. cargo contract 3.0.1 + rustc 1.69 + cargo contract build [flipper &amp; PSP22 (Openbrush 4.0.0 beta)] codehash is different.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;rust-toolchain&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;source&quot;: {&#xD;&#xA;    &quot;hash&quot;: &quot;0x72342d8f061221f13b1dfbaca24fabd929824c3cb9676f7537d1fb93fd7b5039&quot;,&#xD;&#xA;    &quot;language&quot;: &quot;ink! 4.3.0&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;rustc 1.69.0&quot;,&#xD;&#xA;    &quot;build_info&quot;: {&#xD;&#xA;      &quot;build_mode&quot;: &quot;Debug&quot;,&#xD;&#xA;      &quot;cargo_contract_version&quot;: &quot;3.0.1&quot;,&#xD;&#xA;      &quot;rust_toolchain&quot;: &quot;stable-x86_64-unknown-linux-gnu&quot;,&#xD;&#xA;      &quot;wasm_opt_settings&quot;: {&#xD;&#xA;        &quot;keep_debug_symbols&quot;: false,&#xD;&#xA;        &quot;optimization_passes&quot;: &quot;Z&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 2. cargo contract 4.0.0 + rustc 1.71 + cargo contract build —verifiable [flipper] codehash is same but [Openbrush 4.0.0 beta-1)] is different. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;rust-toolchain&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  &quot;source&quot;: {&#xD;&#xA;    &quot;hash&quot;: &quot;0x68c1390a1e178c35ea4bd04e42d12f9d4b30113c3615fd469382302c71840933&quot;,&#xD;&#xA;    &quot;language&quot;: &quot;ink! 4.3.0&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;rustc 1.69.0&quot;,&#xD;&#xA;    &quot;build_info&quot;: {&#xD;&#xA;      &quot;build_mode&quot;: &quot;Debug&quot;,&#xD;&#xA;      &quot;cargo_contract_version&quot;: &quot;3.0.1&quot;,&#xD;&#xA;      &quot;rust_toolchain&quot;: &quot;stable-x86_64-unknown-linux-gnu&quot;,&#xD;&#xA;      &quot;wasm_opt_settings&quot;: {&#xD;&#xA;        &quot;keep_debug_symbols&quot;: false,&#xD;&#xA;        &quot;optimization_passes&quot;: &quot;Z&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think the codehash generation might be related to the file path if the openbrush package is introduced, which is similar to eth. Is that correct? And I want to know the generation mechanism of code hash." ContentLicense="CC BY-SA 4.0" />
  <row Id="40451" PostHistoryTypeId="50" PostId="9876" RevisionGUID="23a6c142-33ab-402e-bcaf-70ff76d13bb3" CreationDate="2023-10-14T16:01:10.197" UserId="-1" />
  <row Id="40452" PostHistoryTypeId="50" PostId="9719" RevisionGUID="f43004e3-592c-47a0-a86a-e2b4d1c1de6e" CreationDate="2023-10-14T21:04:40.547" UserId="-1" />
  <row Id="40453" PostHistoryTypeId="2" PostId="10201" RevisionGUID="89910b70-059c-4d10-988c-1d3f14c36709" CreationDate="2023-10-15T05:52:55.290" UserId="4623" Text="I am trying to import pallet-collective on runtime. Can't seem to figure out a way." ContentLicense="CC BY-SA 4.0" />
  <row Id="40455" PostHistoryTypeId="1" PostId="10201" RevisionGUID="89910b70-059c-4d10-988c-1d3f14c36709" CreationDate="2023-10-15T05:52:55.290" UserId="4623" Text="How to add pallet collective on runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40456" PostHistoryTypeId="3" PostId="10201" RevisionGUID="89910b70-059c-4d10-988c-1d3f14c36709" CreationDate="2023-10-15T05:52:55.290" UserId="4623" Text="|pallet|crates|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40457" PostHistoryTypeId="2" PostId="10202" RevisionGUID="2cbedb91-87f3-4852-8f3c-44e0a06a125f" CreationDate="2023-10-15T08:40:52.670" UserId="522" Text="I am attempting to run a Rococo node from scratch. The command I am using is `./target/release/polkadot --chain=rococo --base-path /hdd/work/fat-db/rococo-actual --enable-offchain-indexing true --sync fast-unsafe --blocks-pruning 300`.&#xD;&#xA;The node syncs upto the lastest block just fine, but then it starts to log several messages such as ` Marking block 7480842 as BEEFY Mandatory.`. When it comes down to block `5920792` the node crashes with the following error&#xD;&#xA;```&#xD;&#xA;2023-10-15 13:59:14  Marking block 5920792 as BEEFY Mandatory.    &#xD;&#xA;2023-10-15 13:59:14 Error: Backend(&quot;Could not find initial validator set&quot;). Terminating.    &#xD;&#xA;2023-10-15 13:59:14 Essential task `beefy-gadget` failed. Shutting down service.    &#xD;&#xA;Error: &#xD;&#xA;   0: Other: Essential task failed.&#xD;&#xA;&#xD;&#xA;Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.&#xD;&#xA;Run with RUST_BACKTRACE=full to include source snippets.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to just run a Rococo node with beefy running so that I can log out the beefy justifications that are currently unavailable in the rpc  https://substrate.stackexchange.com/questions/10107/beefy-justification-subscription-is-not-working&#xD;&#xA;&#xD;&#xA;Any help is much appreciated.\&#xD;&#xA;Please and Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="40459" PostHistoryTypeId="1" PostId="10202" RevisionGUID="2cbedb91-87f3-4852-8f3c-44e0a06a125f" CreationDate="2023-10-15T08:40:52.670" UserId="522" Text="Rococo node crashing due to beefy gadget" ContentLicense="CC BY-SA 4.0" />
  <row Id="40460" PostHistoryTypeId="3" PostId="10202" RevisionGUID="2cbedb91-87f3-4852-8f3c-44e0a06a125f" CreationDate="2023-10-15T08:40:52.670" UserId="522" Text="|rococo|finality|sync|beefy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40461" PostHistoryTypeId="2" PostId="10203" RevisionGUID="3834fbea-f23f-483d-b009-5b669e956fd2" CreationDate="2023-10-15T10:35:11.083" UserId="377" Text="You can use this file to integrate the pallet-collective into your chain.&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/substrate/bin/node/runtime/src/lib.rs&#xD;&#xA;&#xD;&#xA;Specifically you can use this line of code with some other changes&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/substrate/bin/node/runtime/src/lib.rs#L1079-L1097&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/substrate/bin/node/runtime/src/lib.rs#L1140-L1163" ContentLicense="CC BY-SA 4.0" />
  <row Id="40463" PostHistoryTypeId="2" PostId="10204" RevisionGUID="d848c7c3-41da-434c-bc57-1d39ae51cffe" CreationDate="2023-10-15T10:40:04.247" UserId="377" Text="To deploy the smart contract on substrate chain you need to integrate contract pallet and then with the help of contract you will be able to deploy the Ink smart contract on substrate chain.&#xD;&#xA;https://substrate-developer-hub.github.io/substrate-how-to-guides/docs/pallet-design/add-contracts-pallet/" ContentLicense="CC BY-SA 4.0" />
  <row Id="40465" PostHistoryTypeId="2" PostId="10205" RevisionGUID="038b2037-649a-41f9-bc35-5bcea30bbda7" CreationDate="2023-10-15T10:47:16.120" UserId="377" Text="I think this PR can help you to figure out the changes you need to implement the moonbeam unified account H160.&#xD;&#xA;https://github.com/moonbeam-foundation/moonbeam/pull/78&#xD;&#xA;&#xD;&#xA;Doc reference: https://docs.moonbeam.network/learn/features/unified-accounts/&#xD;&#xA;&#xD;&#xA;for more information maybe you can join the moonbeam discord server can discuss with developers." ContentLicense="CC BY-SA 4.0" />
  <row Id="40467" PostHistoryTypeId="2" PostId="10206" RevisionGUID="65446555-24d1-423d-9078-1d39acae4285" CreationDate="2023-10-15T10:54:50.500" UserId="377" Text="You need to update the newly generated keys to node chainspec.rs file in your desired environment spec. Then you need to create the chainspec.json from that after that you will be able to use that.&#xD;&#xA;&#xD;&#xA;Reference link: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs#L39-L125" ContentLicense="CC BY-SA 4.0" />
  <row Id="40469" PostHistoryTypeId="2" PostId="10207" RevisionGUID="4c0c4630-22b1-4635-b1f4-1ee76a4bf326" CreationDate="2023-10-15T12:16:32.963" UserId="4753" Text="- Our's Environment&#xD;&#xA;  - Use sidecar (v17.0.0)&#xD;&#xA;  - Use Tx-wrapper-core (v7.0.1) https://github.com/paritytech/txwrapper-core&#xD;&#xA;  - Polkadot node v1.0.0&#xD;&#xA;  - Use Westend(testnet) and Polkadot(mainnet)&#xD;&#xA;&#xD;&#xA;Since being updated from weightV1 to weightV2, &#xD;&#xA;&#xD;&#xA;we are looking for proper values of 'refTime' and 'proofTime' for AsMulti transaction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Recently, a few simple tests have confirmed that the values below are operating normally. (on the Testnet!)&#xD;&#xA;- refTime:  640000000&#xD;&#xA;- proofTime : 13622&#xD;&#xA;&#xD;&#xA;1. Can I keep the above values fixed and continue to use them?&#xD;&#xA;2. Do you have an appropriate value to recommend?&#xD;&#xA;&#xD;&#xA;Our goal is to send transactions without problems even in the worst-case scenario.&#xD;&#xA;&#xD;&#xA;Thank you in advance.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40471" PostHistoryTypeId="1" PostId="10207" RevisionGUID="4c0c4630-22b1-4635-b1f4-1ee76a4bf326" CreationDate="2023-10-15T12:16:32.963" UserId="4753" Text="What are the best refTime and proofTime for making AsMultiTx?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40472" PostHistoryTypeId="3" PostId="10207" RevisionGUID="4c0c4630-22b1-4635-b1f4-1ee76a4bf326" CreationDate="2023-10-15T12:16:32.963" UserId="4753" Text="|weight|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40473" PostHistoryTypeId="2" PostId="10208" RevisionGUID="45a2bd2f-1fe5-46ad-b583-dc7c4348ed8c" CreationDate="2023-10-16T03:12:35.103" UserId="4623" Text="I am building a solo chain from [Substrate node template][1]. I am trying to add `pallet-bounties` on top of the runtime. I can't seem to figure out a way.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="40475" PostHistoryTypeId="1" PostId="10208" RevisionGUID="45a2bd2f-1fe5-46ad-b583-dc7c4348ed8c" CreationDate="2023-10-16T03:12:35.103" UserId="4623" Text="How to add pallet bounties on runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40476" PostHistoryTypeId="3" PostId="10208" RevisionGUID="45a2bd2f-1fe5-46ad-b583-dc7c4348ed8c" CreationDate="2023-10-16T03:12:35.103" UserId="4623" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40477" PostHistoryTypeId="2" PostId="10209" RevisionGUID="b2f7ebb4-7df8-4bb9-9d62-e0d23ae8f02f" CreationDate="2023-10-16T04:57:03.320" UserId="4793" Text="I created a 2/3 multisig wallet and staked 500 DOT with it, but I received this error message.&#xD;&#xA;&#xD;&#xA;&gt; This could mean your nomination has not been applied to any validator in the active set by the election algorithm or it has been applied against a validator who is either oversubscribed or chilled.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I checked [Nominate](https://staking.polkadot.network/#/nominate) page and found that the minimum to earn rewards is 450.17 DOT, but I staked 500 DOT. I tried to stake twice, the first time I chose 10 nominators, and the second time I chose 2 nominators, but both attempts failed. I waited for a couple of days, but it kept waiting for nominations. I confirmed these nominators were available and healthy.&#xD;&#xA;&#xD;&#xA;How can I solve this issue? Doesn’t the multisig wallet support staking?&#xD;&#xA;&#xD;&#xA;Thanks for your help.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/RPVz2.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40479" PostHistoryTypeId="1" PostId="10209" RevisionGUID="b2f7ebb4-7df8-4bb9-9d62-e0d23ae8f02f" CreationDate="2023-10-16T04:57:03.320" UserId="4793" Text="Multisig wallet staking via Polkadot-JS UI failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="40480" PostHistoryTypeId="3" PostId="10209" RevisionGUID="b2f7ebb4-7df8-4bb9-9d62-e0d23ae8f02f" CreationDate="2023-10-16T04:57:03.320" UserId="4793" Text="|polkadot|staking|polkadot-js-extension|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40481" PostHistoryTypeId="2" PostId="10210" RevisionGUID="7bcba5d7-d588-4880-87ae-3678cff4a97a" CreationDate="2023-10-16T06:35:30.017" UserId="4623" Text="In the [Substrate node template][1] there are two folder `node` and `runtime`. When I am building the chain I guess `runtime` folder is utilized. I am wondering what is the purpose of the two folders?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="40483" PostHistoryTypeId="1" PostId="10210" RevisionGUID="7bcba5d7-d588-4880-87ae-3678cff4a97a" CreationDate="2023-10-16T06:35:30.017" UserId="4623" Text="What is the difference between the node folder and runtime folder in substrate node template?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40484" PostHistoryTypeId="3" PostId="10210" RevisionGUID="7bcba5d7-d588-4880-87ae-3678cff4a97a" CreationDate="2023-10-16T06:35:30.017" UserId="4623" Text="|substrate-node-template|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40485" PostHistoryTypeId="50" PostId="8558" RevisionGUID="46d7b1c2-c8b0-4652-a717-3f37b678e2ab" CreationDate="2023-10-16T07:09:01.150" UserId="-1" />
  <row Id="40486" PostHistoryTypeId="2" PostId="10211" RevisionGUID="b45381b5-0588-45c9-b936-bd7c794ebb9d" CreationDate="2023-10-16T08:07:50.207" UserId="4794" Text="I meet this error when create a new note. On stackoverflow, and in the suggested tip, it is replaced to --rpc-port, but in the argument there was  an existing --rpc-port argument with a different value. what to do in this case?&#xD;&#xA;&#xD;&#xA;&gt;./target/release/node-template \&#xD;&#xA;&gt; --base-path /tmp/node01 \&#xD;&#xA;&gt; --chain ./customSpecRaw.json \&#xD;&#xA;&gt; --port 30333 \&#xD;&#xA;&gt; --ws-port 9945 \&#xD;&#xA;&gt; --rpc-port 9933 \&#xD;&#xA;&gt; --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;&gt; --validator \&#xD;&#xA;&gt; --rpc-methods Unsafe \&#xD;&#xA;&gt; --name MyNode01 \&#xD;&#xA;&gt; --password-interactive &#xD;&#xA;&#xD;&#xA;error: unexpected argument '--ws-port' found&#xD;&#xA;&#xD;&#xA;tip: a similar argument exists: '--rpc-port'&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40488" PostHistoryTypeId="1" PostId="10211" RevisionGUID="b45381b5-0588-45c9-b936-bd7c794ebb9d" CreationDate="2023-10-16T08:07:50.207" UserId="4794" Text="error: unexpected argument '--ws-port' found" ContentLicense="CC BY-SA 4.0" />
  <row Id="40489" PostHistoryTypeId="3" PostId="10211" RevisionGUID="b45381b5-0588-45c9-b936-bd7c794ebb9d" CreationDate="2023-10-16T08:07:50.207" UserId="4794" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40490" PostHistoryTypeId="2" PostId="10212" RevisionGUID="b28e884b-abbd-4e88-972f-1941729ab9b8" CreationDate="2023-10-16T08:31:31.313" UserId="382" Text="The issue you're having comes from doing the initial sync using `fast-unsafe` combined with `--blocks-pruning 300`.&#xD;&#xA;What happens is:&#xD;&#xA;- you start with empty DB -&gt; no BEEFY state/info whatsoever,&#xD;&#xA;- fast syncing takes you straight to latest state (so no old state), AND `--blocks-pruning 300` means when reaching HEAD you only have last 300 headers,&#xD;&#xA;- BEEFY cannot initialize because your node doesn't have any info on block `5920792` (which is BEEFY genesis on Rococo).&#xD;&#xA;&#xD;&#xA;## Solution&#xD;&#xA;&#xD;&#xA;1. Run your **initial sync** without `--blocks-pruning` (defaults to `archive-canonical`).&#xD;&#xA;2. Once node is synced to HEAD of chain and BEEFY is initialized (you can see BEEFY finalized blocks happening in logs or RPC), BEEFY state will be saved to DB and can be reused for subsequent runs&#xD;&#xA;3. At this point you can stop the node, and restart it with `--blocks-pruning 300` or whatever." ContentLicense="CC BY-SA 4.0" />
  <row Id="40492" PostHistoryTypeId="2" PostId="10213" RevisionGUID="ebb485e5-0d21-482e-a3b5-0f38a43b73b9" CreationDate="2023-10-16T09:07:05.707" UserId="29" Text="The `node` folder is where you configure the node also known as the client that is running your blockchain. If you look inside the folder: [node/src](https://github.com/substrate-developer-hub/substrate-node-template/tree/main/node/src), you will see that there are such things as configuring your chain specification, your node's cli commands and subcommands, your node's RPC and services. Where as the runtime folder pertains to all things runtime-related such as building your runtime logic." ContentLicense="CC BY-SA 4.0" />
  <row Id="40494" PostHistoryTypeId="2" PostId="10214" RevisionGUID="218bae5e-9e69-4a4b-9465-b0f38ac9b9af" CreationDate="2023-10-16T09:11:42.637" UserId="29" Text="I would start by going over the tutorials especially this one:&#xD;&#xA;- https://docs.substrate.io/tutorials/build-application-logic/add-a-pallet&#xD;&#xA;&#xD;&#xA;One trick that I always use is to see how it is configured in the &quot;kitchensink&quot; node where you will see many pallet configured.&#xD;&#xA;&#xD;&#xA;Check this out:&#xD;&#xA;- https://github.com/paritytech/polkadot-sdk/blob/86fde367c0b10303b71a5f52857e254a2ee1e953/substrate/bin/node/runtime/src/lib.rs#L1238-L1262&#xD;&#xA;&#xD;&#xA;If you get stuck, perhaps start by practicing integrating more basic pallet into your runtime. The process of integrating pallets in your runtime are all pretty much the same once you get the hang of configuring one or two pallets then you will know how to do most of them." ContentLicense="CC BY-SA 4.0" />
  <row Id="40496" PostHistoryTypeId="2" PostId="10215" RevisionGUID="a1b1742b-5667-4dba-b7e7-86e67736ba36" CreationDate="2023-10-16T09:35:16.777" UserId="3846" Text="As far as I know, on the Polkadot 2.0 update, a new feature called Coretime will be implemented on the Relaychain. It is something like the AWS lambda function execution where users have to pay for the deligated computation using Dot. Is it true? what sort of computations will be done in the future? How is the process of that computation, is it process distributed to some nodes or, does only one node process all the computation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40498" PostHistoryTypeId="1" PostId="10215" RevisionGUID="a1b1742b-5667-4dba-b7e7-86e67736ba36" CreationDate="2023-10-16T09:35:16.777" UserId="3846" Text="What sort of computations Coretime is goin to do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40499" PostHistoryTypeId="3" PostId="10215" RevisionGUID="a1b1742b-5667-4dba-b7e7-86e67736ba36" CreationDate="2023-10-16T09:35:16.777" UserId="3846" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40500" PostHistoryTypeId="2" PostId="10216" RevisionGUID="6cfac1f9-a3c8-4b9a-94b8-3a7bc9165df7" CreationDate="2023-10-16T09:51:09.827" UserId="29" Text="The details are still being hashed out but I would encourage you to read the RCF for agile coretime:&#xD;&#xA; - https://github.com/polkadot-fellows/RFCs/blob/main/text/0001-agile-coretime.md&#xD;&#xA;&#xD;&#xA;&gt; It is something like the AWS lambda function execution where users have to pay for the deligated computation using Dot. Is it true?&#xD;&#xA;&#xD;&#xA;With instantaneous coretime yes. You can think of as on-demand parachains, where as with bulk coretime, you can think of similar to what we have where a parachain commits to an extended lease.&#xD;&#xA;&#xD;&#xA;&gt; what sort of computations will be done in the future? How is the process of that computation, is it process distributed to some nodes or, does only one node process all the computation?&#xD;&#xA;&#xD;&#xA;Other than the current parachain model, where you build a parachain and purchase coretimem, there is also discussion of building a more adhoc model of computation similar to what you're familiar with (lamdba functions on AWS). It is called Corejam. The details of it are still being worked on. You can start by reading here:&#xD;&#xA;- https://github.com/polkadot-fellows/RFCs/pull/31" ContentLicense="CC BY-SA 4.0" />
  <row Id="40502" PostHistoryTypeId="5" PostId="8067" RevisionGUID="34a3d278-5259-4ad9-a70f-21b138f3eb67" CreationDate="2023-10-16T10:16:28.247" UserId="474" Comment="Updated for subxt 0.32" Text="### Edit Oct 16 2023:&#xD;&#xA;&#xD;&#xA;As of Subxt 0.32, there is now a `SignedExtension` trait in Subxt, and an `signed_extensions::AnyOf` type which can be given some `Config` and ` tuple of `SignedExtension` impls, and itself implements `ExtrinsicParams`. This `AnyOf` type is also smart, and will only apply the necessary signed extensions and in the correct order based on the chain metadata.&#xD;&#xA;&#xD;&#xA;So, nowadays one can implement new `SignedExtension`s as needed, add them to the list of signed extensions provided in `AnyOf` (see the `SubstrateConfig` for the default list), and then write some function or interface if you want to make configuing the user parameters easier for people.&#xD;&#xA;&#xD;&#xA;See an example of this here: https://github.com/paritytech/subxt/blob/cd5060a5a08c9bd73477477cd2cadc16015e77bf/subxt/examples/setup_config_signed_extension.rs&#xD;&#xA;&#xD;&#xA;You can, however, still do as before and implement `ExtrinsicParams` yourself if preferred, which is explained below.&#xD;&#xA;&#xD;&#xA;### Original answer:&#xD;&#xA;&#xD;&#xA;So, when you create a client in Subxt (eg an `OnlineClient`) you pass it some Config (eg `SubstrateConfig` or `PolkadotConfig`). One of the things that this config does it describe how to encode the signed extensions for an extrinsic.&#xD;&#xA;&#xD;&#xA;To implement your own encoding of custom signed extensions, implement the `ExtrinsicParams` trait (https://docs.rs/subxt/0.28.0/subxt/config/extrinsic_params/trait.ExtrinsicParams.html). This interface lets you define some &quot;builder&quot; type that users construct to pass params in to the relevant functions, and then how to encode the additional and extra params when asked to.&#xD;&#xA;&#xD;&#xA;By default, we implement this trait for a `BaseExtrinsicParams` type which covers default Substrate/Polkadot params like so: https://docs.rs/subxt/0.28.0/src/subxt/config/extrinsic_params.rs.html#59. Hopefully this implementation can serve as inspiration :) &#xD;&#xA;&#xD;&#xA;&gt; **Side Note**: How do you know which extra and additional things the node you're talking to expects? Well, if you look in the metadata downloaded from a node you want to connect to, it will contain an `extrinsic` property which then [contains a list of—in order—each extra and additional type that it's expecting](https://github.com/paritytech/frame-metadata/blob/438a5b098bb9d5b5a09bdc5b68275b2c5e63a010/frame-metadata/src/v14.rs#L117). You can make sure to encode the same types in your implementation of `ExtrinsicParams`.&#xD;&#xA;&#xD;&#xA;Once you have implemented this trait on your custom type, create some config like `MyConfig` which uses it:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum MyConfig {}&#xD;&#xA;impl Config for MyConfig {&#xD;&#xA;    type Index = &lt;SubstrateConfig as Config&gt;::Index;&#xD;&#xA;    type Hash = &lt;SubstrateConfig as Config&gt;::Hash;&#xD;&#xA;    type Hasher = &lt;SubstrateConfig as Config&gt;::Hasher;&#xD;&#xA;    type Header = &lt;SubstrateConfig as Config&gt;::Header;&#xD;&#xA;    type AccountId = &lt;SubstrateConfig as Config&gt;::AccountId;&#xD;&#xA;    type Address = &lt;SubstrateConfig as Config&gt;::Address;&#xD;&#xA;    type Signature = &lt;SubstrateConfig as Config&gt;::Signature;&#xD;&#xA;    // ExtrinsicParams are different; use the custom type:&#xD;&#xA;    type ExtrinsicParams = MyCustomExtrinsicParams;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(in this case, we are just using the same params as the `SubstrateConfig` and only changing how the extra/additional params are encoded; you may have other things you need to change though)&#xD;&#xA;&#xD;&#xA;Finally, use this config:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let client = OnlineClient::&lt;MyConfig&gt;::new().await?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And now when you create extrinsics, the correct additional/extra params will be encoded by default, or can be provided by the user as an argument to calls like `api.tx().sign_and_submit_then_watch(...)`." ContentLicense="CC BY-SA 4.0" />
  <row Id="40503" PostHistoryTypeId="2" PostId="10217" RevisionGUID="f17521cb-f81f-490b-86a5-16f79ff781d1" CreationDate="2023-10-16T14:11:14.137" UserId="4363" Text="Aura (as well as Grandpa and Babe, but I'm currently only interested in Aura) includes the whole authority set in the header digest when it changes, as well as additional information about authorities being disabled. As far as I know, light clients are the main targets of this information, as they can use it to verify quite long chains of headers without needing to download entire blocks, but are there any other known uses?&#xD;&#xA;&#xD;&#xA;Some additional context: we would like headers to have fixed size, independent of the size of the committee. To this end we want to replace these digests with hashes of the committees and eventually write our own implementations of light clients which will download the committee contents out-of-band and only verify them using the hashes in headers. Before we fully commit to that we would like to know whether/which other tools might be broken by such a change." ContentLicense="CC BY-SA 4.0" />
  <row Id="40505" PostHistoryTypeId="1" PostId="10217" RevisionGUID="f17521cb-f81f-490b-86a5-16f79ff781d1" CreationDate="2023-10-16T14:11:14.137" UserId="4363" Text="What are the Aura committee digests in headers used for?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40506" PostHistoryTypeId="3" PostId="10217" RevisionGUID="f17521cb-f81f-490b-86a5-16f79ff781d1" CreationDate="2023-10-16T14:11:14.137" UserId="4363" Text="|aura|light-client|digest|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40507" PostHistoryTypeId="2" PostId="10218" RevisionGUID="872e120f-448e-41b8-beec-7790e8776858" CreationDate="2023-10-16T14:15:48.207" UserId="251" Text="Use `--rpc-port` instead.&#xD;&#xA;&#xD;&#xA;For more detail, see https://github.com/paritytech/polkadot/releases/tag/v0.9.43." ContentLicense="CC BY-SA 4.0" />
  <row Id="40509" PostHistoryTypeId="2" PostId="10219" RevisionGUID="8de658da-d4dc-4dd7-aa88-811a6a68dab9" CreationDate="2023-10-16T16:40:07.587" UserId="427" Text="At [Ternoa][1] we are trying to do a long jump from polkadot-v0.9.30 to polkadot-v0.9.30 or the latest. We would like to get some suggestions here if someone or some projects already experienced this much of a upgrade at once.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.ternoa.network#/contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="40511" PostHistoryTypeId="1" PostId="10219" RevisionGUID="8de658da-d4dc-4dd7-aa88-811a6a68dab9" CreationDate="2023-10-16T16:40:07.587" UserId="427" Text="Steps for migration from polkadot-v0.9.30 to polkadot-v0.9.43/v1.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="40512" PostHistoryTypeId="3" PostId="10219" RevisionGUID="8de658da-d4dc-4dd7-aa88-811a6a68dab9" CreationDate="2023-10-16T16:40:07.587" UserId="427" Text="|substrate-node|runtime-upgrade|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40513" PostHistoryTypeId="2" PostId="10220" RevisionGUID="26b1904b-93db-4dc7-b371-b0c72498a136" CreationDate="2023-10-16T18:03:32.840" UserId="4780" Text="the nomination pool you trying to nominate to is oversubscribed or chilled. You can choose another pool" ContentLicense="CC BY-SA 4.0" />
  <row Id="40515" PostHistoryTypeId="2" PostId="10221" RevisionGUID="61a5c5c2-c471-4749-8325-18cd4f6dc341" CreationDate="2023-10-16T21:22:53.120" UserId="1721" Text="I am using polkadotjs/ui-keyring in which i am trying to use different accounts stores based on user preferences. And i am calling the loadAll to get all the accounts to the keyring, as shown in the example here.&#xD;&#xA;&#xD;&#xA;``` js&#xD;&#xA;   keyring.loadAll({ss58Format: 88, store: myStore})&#xD;&#xA;   keyring.accounts.subject.subscribe((accounts) =&gt; {&#xD;&#xA;            console.log(&quot;accounts&quot;, accounts)&#xD;&#xA;    })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Suppose i want to change the accountStore at some time later to `myStore2` if i call the same code above with the `loadAll` function, I am getting an error &#xD;&#xA;```&#xD;&#xA;uncaught (in promise) Error: Unable to initialize options more than once&#xD;&#xA;    at KeyringOption.init (index.js:34:19)&#xD;&#xA;```&#xD;&#xA;Is it not possible to revert the loadAll and reinitalize the ui-keyring?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40517" PostHistoryTypeId="1" PostId="10221" RevisionGUID="61a5c5c2-c471-4749-8325-18cd4f6dc341" CreationDate="2023-10-16T21:22:53.120" UserId="1721" Text="Error: Unable to initialise options more than once" ContentLicense="CC BY-SA 4.0" />
  <row Id="40518" PostHistoryTypeId="3" PostId="10221" RevisionGUID="61a5c5c2-c471-4749-8325-18cd4f6dc341" CreationDate="2023-10-16T21:22:53.120" UserId="1721" Text="|polkadot-js|api|cryptography|keyring|ui|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40519" PostHistoryTypeId="50" PostId="4939" RevisionGUID="9618840f-d554-44a4-8dd6-9bb7d7868199" CreationDate="2023-10-17T01:08:46.103" UserId="-1" />
  <row Id="40520" PostHistoryTypeId="2" PostId="10222" RevisionGUID="aed675d3-5733-460c-9c49-bac68672f57f" CreationDate="2023-10-17T03:55:09.353" UserId="2844" Text="I have two contract `nft_contract` and `staking_contract`. I want to write test for `staking_contract` but while staking I need to mint nft and approve, then only I can use it to stake. How can this be done? Someone please give some idea?&#xD;&#xA;&#xD;&#xA;This is [github_code](https://github.com/Build3rs-Labs/foxies/tree/main/contracts)" ContentLicense="CC BY-SA 4.0" />
  <row Id="40522" PostHistoryTypeId="1" PostId="10222" RevisionGUID="aed675d3-5733-460c-9c49-bac68672f57f" CreationDate="2023-10-17T03:55:09.353" UserId="2844" Text="Writing Test in ink! smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="40523" PostHistoryTypeId="3" PostId="10222" RevisionGUID="aed675d3-5733-460c-9c49-bac68672f57f" CreationDate="2023-10-17T03:55:09.353" UserId="2844" Text="|ink|unit-tests|e2e|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40524" PostHistoryTypeId="2" PostId="10223" RevisionGUID="cffc18f2-d09e-4372-842d-d036211afa39" CreationDate="2023-10-17T06:43:10.013" UserId="2166" Text="For your case, you need to write e2e tests. I did something similar some time ago. Check [this](https://github.com/swankyhub/rmrk-lazy-mint/blob/507552ced20d948b6acb34eb75855f84f30357fa/rmrk_proxy/proxy.rs#L365) for inspiration " ContentLicense="CC BY-SA 4.0" />
  <row Id="40526" PostHistoryTypeId="2" PostId="10224" RevisionGUID="001da3ef-9cd4-430f-86f3-43eb33fbf602" CreationDate="2023-10-17T07:24:37.043" UserId="4068" Text="&quot;I'm trying to understand the mechanics of parachain block authorization in blockchain networks like Polkadot and similar multi-chain systems. Specifically, I'd like to know:&#xD;&#xA;&#xD;&#xA;1. How many collators are typically selected at a time to authorize a parachain block?&#xD;&#xA;2. Is there a selection process for these collators?&#xD;&#xA;&#xD;&#xA;I'm interested in the selection process for collators and how many of them are typically involved in producing a parachain block. Any insights, references, or resources on this topic would be greatly appreciated.&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40528" PostHistoryTypeId="1" PostId="10224" RevisionGUID="001da3ef-9cd4-430f-86f3-43eb33fbf602" CreationDate="2023-10-17T07:24:37.043" UserId="4068" Text="How many collators are selected at a time to authorise a parachain block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40529" PostHistoryTypeId="3" PostId="10224" RevisionGUID="001da3ef-9cd4-430f-86f3-43eb33fbf602" CreationDate="2023-10-17T07:24:37.043" UserId="4068" Text="|polkadot|parachain|parachain-collator|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40530" PostHistoryTypeId="2" PostId="10225" RevisionGUID="f88577d9-9d77-4ef9-9983-cac0d440f916" CreationDate="2023-10-17T07:40:13.803" UserId="408" Text="In the old polkadot repo [release page][1] prior to the polkadot-sdk repository merge, polkadot had only one binary called `polkadot` (there is also `staking-miner` but it has been moved to its own repo: [paritytech/staking-miner-v2][2]).&#xD;&#xA;&#xD;&#xA;In recent [releases][3] of paritytech/polkadot-sdk v1.1.0 and v1.2.0, we have four of them:&#xD;&#xA;&#xD;&#xA;- `polkadot`&#xD;&#xA;- `polkadot-parachain`&#xD;&#xA;- `polkadot-execute-worker`&#xD;&#xA;- `polkadot-prepare-worker`&#xD;&#xA;&#xD;&#xA;What are the respective usages of all these binaries? If I want to launch a polkadot parachain validator, which binary should I use?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/releases&#xD;&#xA;  [2]: https://github.com/paritytech/staking-miner-v2&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/releases" ContentLicense="CC BY-SA 4.0" />
  <row Id="40532" PostHistoryTypeId="1" PostId="10225" RevisionGUID="f88577d9-9d77-4ef9-9983-cac0d440f916" CreationDate="2023-10-17T07:40:13.803" UserId="408" Text="What are the differences between these polkadot binaries: polkadot, polkadot-parachain, polkadot-prepare-worker, polkadot-execute-worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40533" PostHistoryTypeId="3" PostId="10225" RevisionGUID="f88577d9-9d77-4ef9-9983-cac0d440f916" CreationDate="2023-10-17T07:40:13.803" UserId="408" Text="|polkadot|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40534" PostHistoryTypeId="5" PostId="10225" RevisionGUID="72815ff6-3c55-46b6-a4b0-e44ca3a32a31" CreationDate="2023-10-17T07:45:41.750" UserId="408" Comment="deleted 10 characters in body" Text="In the old polkadot repo [release page][1] prior to the polkadot-sdk repository merge, polkadot had only one binary called `polkadot` (there is also `staking-miner` but it has been moved to its own repo: [paritytech/staking-miner-v2][2]).&#xD;&#xA;&#xD;&#xA;In recent [releases][3] of paritytech/polkadot-sdk v1.1.0 and v1.2.0, we have four of them:&#xD;&#xA;&#xD;&#xA;- `polkadot`&#xD;&#xA;- `polkadot-parachain`&#xD;&#xA;- `polkadot-execute-worker`&#xD;&#xA;- `polkadot-prepare-worker`&#xD;&#xA;&#xD;&#xA;What are the respective usages of all these binaries? If I want to launch a polkadot validator, which binary should I use?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/releases&#xD;&#xA;  [2]: https://github.com/paritytech/staking-miner-v2&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/releases" ContentLicense="CC BY-SA 4.0" />
  <row Id="40535" PostHistoryTypeId="2" PostId="10226" RevisionGUID="0b332321-61c5-4af8-a820-d76192cac3f4" CreationDate="2023-10-17T08:01:14.970" UserId="2762" Text="All three binaries are needed to properly run a validator node.&#xD;&#xA;&#xD;&#xA;The main `polkadot` binary is started by a user to run the node, as it always has been. After this PR ([98.6% OF DEVELOPERS CANNOT REVIEW THIS PR! \[read more...\]][1]) you need two auxiliary binaries, `polkadot-prepare-worker` and `polkadot-execute-worker` which are not intended for any user interaction and are only run by the node software itself. The auxiliary binaries are actually only required if the node runs as a validator, but in the current design, the node will fail to run without them even if it's not a validator.&#xD;&#xA;&#xD;&#xA;See also the wiki on how to [Installing the Polkadot binaries][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/pull/7337&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#installing-the-polkadot-binaries" ContentLicense="CC BY-SA 4.0" />
  <row Id="40537" PostHistoryTypeId="5" PostId="10224" RevisionGUID="6f70d362-44a0-4270-87f3-21faaa35e8be" CreationDate="2023-10-17T08:06:04.333" UserId="4068" Comment="added 62 characters in body; edited title" Text="&quot;I'm trying to understand the mechanics of parachain block authorization in blockchain networks like Polkadot and similar multi-chain systems. Specifically, I'd like to know:&#xD;&#xA;&#xD;&#xA;1. How many collators are typically selected at a time to authorize a parachain block?&#xD;&#xA;2. Is there a selection process for these collators?&#xD;&#xA;3. How many collators can collate at the same block height ?&#xD;&#xA;&#xD;&#xA;I'm interested in the selection process for collators and how many of them are typically involved in producing a parachain block. Any insights, references, or resources on this topic would be greatly appreciated.&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40538" PostHistoryTypeId="4" PostId="10224" RevisionGUID="6f70d362-44a0-4270-87f3-21faaa35e8be" CreationDate="2023-10-17T08:06:04.333" UserId="4068" Comment="added 62 characters in body; edited title" Text="How many collators are selected at a time or we can say same block height to authorise a parachain block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40539" PostHistoryTypeId="2" PostId="10227" RevisionGUID="46f24ed6-e283-4909-9477-9f66bebaff81" CreationDate="2023-10-17T08:30:50.573" UserId="251" Text="Because BABE does not function effectively for parachains, I presume that you are utilizing AURA.&#xD;&#xA;&#xD;&#xA;AURA generates blocks sequentially, with each collator being assigned a slot one after another. If Collator A is absent (offline or otherwise), Collator B will assume A's slot.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;A -&gt; B -&gt; C -&gt; D -&gt; A -&gt; ..&#xD;&#xA;&#xD;&#xA;# in case of B being offline&#xD;&#xA;&#xD;&#xA;A -&gt; C -&gt; D -&gt; A -&gt; ..&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you are interested in block production, I recommend reading the AURA/BABE documentation first." ContentLicense="CC BY-SA 4.0" />
  <row Id="40544" PostHistoryTypeId="2" PostId="10229" RevisionGUID="033f0b2b-4dc5-4d24-a5c2-4edbec9b08c4" CreationDate="2023-10-17T11:11:57.053" UserId="474" Text="Public keys (account IDs) are public; they can be shared and handed around however you like. The corresponding private keys are best kept in a wallet and never exposed. So, sharing a public key with a wallet seems sensible to me!&#xD;&#xA;&#xD;&#xA;The usual web approach is something like:&#xD;&#xA;1. Obtain a list of account IDs (public keys) available from the wallet to show in the dApp, and then give the wallet the transaction information + account Id to sign with and the wallet does the signing, hands back signed bytes and the dApp can submit them or whatever&#xD;&#xA;2. Or, ignore account IDs (public keys) in the dApp entirely, and just hand transaction information to a wallet to be signed, and then the user picks the account ID in the wallet that they wish to use to sign the thing.&#xD;&#xA;&#xD;&#xA;I hope that helps (I'm not familiar with the specifics of the android ecosystem/apps)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40546" PostHistoryTypeId="2" PostId="10230" RevisionGUID="db8b695d-ad44-40b7-88af-e8978daa0ddf" CreationDate="2023-10-17T11:57:04.033" UserId="3414" Text="As I was going through the mechanism of working of `parachains` , I came across a scenario that currently the time taken from collator producing a block on a parachain, to that block becoming finalised, is prohibitive to some `applications` deployed on the parachain, so there is a need to develop a `module` so that users can see `quasi-finalized blocks` on parachains without affecting the actual working of relay chain and parachains.It would be great if someone would share ideas related to the same." ContentLicense="CC BY-SA 4.0" />
  <row Id="40548" PostHistoryTypeId="1" PostId="10230" RevisionGUID="db8b695d-ad44-40b7-88af-e8978daa0ddf" CreationDate="2023-10-17T11:57:04.033" UserId="3414" Text="Designing a Mechanism to Improve the Efficiency of Applications Deployed on Parachains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40549" PostHistoryTypeId="3" PostId="10230" RevisionGUID="db8b695d-ad44-40b7-88af-e8978daa0ddf" CreationDate="2023-10-17T11:57:04.033" UserId="3414" Text="|substrate-node-template|polkadot|parachain|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40550" PostHistoryTypeId="2" PostId="10231" RevisionGUID="833232cf-63d0-4a62-9d16-800ab093632d" CreationDate="2023-10-17T12:21:13.803" UserId="480" Text="You can download the metadata of a running node by calling the `state_getMetadata` RPC. But if I'm compiling a node, is the metadata built anywhere?&#xD;&#xA;Ideally I'd rather not have to start the node to get the metadata.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="40552" PostHistoryTypeId="1" PostId="10231" RevisionGUID="833232cf-63d0-4a62-9d16-800ab093632d" CreationDate="2023-10-17T12:21:13.803" UserId="480" Text="Is there a build artefact for the runtime metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40553" PostHistoryTypeId="3" PostId="10231" RevisionGUID="833232cf-63d0-4a62-9d16-800ab093632d" CreationDate="2023-10-17T12:21:13.803" UserId="480" Text="|build|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40554" PostHistoryTypeId="2" PostId="10232" RevisionGUID="0d43d03a-57f3-4b7a-bc1c-ee3ff6af4ad5" CreationDate="2023-10-17T13:24:07.633" UserId="2834" Text="In trying to use a migration implementation for substrate which can be used to rename `BagsList` to `VoterList`, using `move_pallet` a post migration check is failing when testing the migration with `try-runtime`.&#xD;&#xA;&#xD;&#xA;The failing [post upgrade check](https://github.com/paritytech/substrate/blob/polkadot-v0.9.30/frame/staking/src/migrations.rs#L156) is ensuring that storage at the old prefix is removed with &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;sp_io::storage::next_key(&amp;old_pallet_prefix).is_none()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Another similar migration for the collectives pallet, does a check [differently](https://github.com/paritytech/substrate/pull/9115/files#diff-1dee027b2fa4c245bc171233ac07ec714f3fdc9a83a0f428adf67a2966049717R125)&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	// Assert that nothing remains at the old prefix.&#xD;&#xA;	let old_pallet_prefix = twox_128(old_pallet_name.as_bytes());&#xD;&#xA;	let old_pallet_prefix_iter = frame_support::storage::KeyPrefixIterator::new(&#xD;&#xA;		old_pallet_prefix.to_vec(),&#xD;&#xA;		old_pallet_prefix.to_vec(),&#xD;&#xA;		|_| Ok(()),&#xD;&#xA;	);&#xD;&#xA;	assert_eq!(old_pallet_prefix_iter.count(), 0);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In the documentation for `move_pallet` there is [comment](https://github.com/paritytech/substrate/blob/a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d/frame/support/src/storage/migration.rs#L351):&#xD;&#xA;&#xD;&#xA; &quot;NOTE: The value at the key `twox_128(old_pallet_name)` is not moved.&quot;&#xD;&#xA;&#xD;&#xA;Interestingly the polkadot chain performed a migration in runtime upgrade to spec_version [9230](https://github.com/paritytech/polkadot/blob/release-v0.9.23/runtime/polkadot/src/lib.rs#L1529) renaming `BagsList` to `VoterList` with `move_pallet` but no post upgrade try-runtime checks for old prefix removal were added.&#xD;&#xA;&#xD;&#xA;Questions:&#xD;&#xA;&#xD;&#xA;1. What would cause the check `sp_io::storage::next_key(&amp;old_pallet_prefix).is_none()` to fail? Is it the noted behavior of move_pallet suggesting that the author did not perform the correct check and this was never tested in production?&#xD;&#xA;&#xD;&#xA;2. Is the approach of constructing a `KeyPrefixIterator` for the old prefix and testing `iterator.count() == 0` correct?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40556" PostHistoryTypeId="1" PostId="10232" RevisionGUID="0d43d03a-57f3-4b7a-bc1c-ee3ff6af4ad5" CreationDate="2023-10-17T13:24:07.633" UserId="2834" Text="move_pallet: What is correct way to verify old pallet storage is deleted" ContentLicense="CC BY-SA 4.0" />
  <row Id="40557" PostHistoryTypeId="3" PostId="10232" RevisionGUID="0d43d03a-57f3-4b7a-bc1c-ee3ff6af4ad5" CreationDate="2023-10-17T13:24:07.633" UserId="2834" Text="|storage|runtime-upgrade|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40558" PostHistoryTypeId="2" PostId="10233" RevisionGUID="720a3d4a-221c-44b2-84cb-517dac970132" CreationDate="2023-10-17T18:34:09.823" UserId="2065" Text="The problem seems to be fixed after updating the configuration of the following:&#xD;&#xA;&#xD;&#xA;**FungiblesTransactor**&#xD;&#xA;&#xD;&#xA;    pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;    Assets,&#xD;&#xA;    ConvertedRegisteredAssetId&lt;&#xD;&#xA;        AssetIdForTrustBackedAssets,&#xD;&#xA;        Balance,&#xD;&#xA;        AsAssetMultiLocation&lt;AssetIdForTrustBackedAssets, AssetRegistry&gt;,&#xD;&#xA;        JustTry,&#xD;&#xA;    &gt;,&#xD;&#xA;    LocationToAccountId,&#xD;&#xA;    AccountId,&#xD;&#xA;    PlaceholderAccount,&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Barrier**&#xD;&#xA;&#xD;&#xA;     pub type Barrier = TrailingSetTopicAsId&lt;(&#xD;&#xA;        TakeWeightCredit,&#xD;&#xA;        AllowKnownQueryResponses&lt;PolkadotXcm&gt;,&#xD;&#xA;        WithComputedOrigin&lt;&#xD;&#xA;            (&#xD;&#xA;                AllowTopLevelPaidExecutionFrom&lt;Everything&gt;,&#xD;&#xA;                AllowUnpaidExecutionFrom&lt;ParentOrParentsExecutivePlurality&gt;,&#xD;&#xA;                AllowSubscriptionsFrom&lt;ParentOrSiblings&gt;,&#xD;&#xA;            ),&#xD;&#xA;            UniversalLocation,&#xD;&#xA;            ConstU32&lt;8&gt;,&#xD;&#xA;        &gt;,&#xD;&#xA;    )&gt;&#xD;&#xA;&#xD;&#xA;**IsReserve**&#xD;&#xA;&#xD;&#xA;    pub type Reserves = (NativeAsset, ReserveAssetsFrom&lt;AssetHubLocation&gt;);&#xD;&#xA;&#xD;&#xA;ROC will appear on the parachain if the asset `MultiLocation` is registered with an asset&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40560" PostHistoryTypeId="34" PostId="10008" RevisionGUID="44b02d3a-198d-425a-88f8-bb9db7bf3258" CreationDate="2023-10-17T19:03:15.403" UserId="-1" Comment="34" />
  <row Id="40561" PostHistoryTypeId="50" PostId="6819" RevisionGUID="bde028ee-423d-4a43-bb21-a84eaa86808f" CreationDate="2023-10-17T21:06:35.800" UserId="-1" />
  <row Id="40562" PostHistoryTypeId="5" PostId="10219" RevisionGUID="88dcdd34-3560-48c0-8b81-fed4fe578029" CreationDate="2023-10-18T02:15:12.373" UserId="139" Comment="Aligned question body with question title." Text="At [Ternoa][1] we are trying to do a long jump from polkadot-v0.9.30 to polkadot-v0.9.43 or the latest. We would like to get some suggestions here if someone or some projects already experienced this much of a upgrade at once.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.ternoa.network#/contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="40563" PostHistoryTypeId="50" PostId="4376" RevisionGUID="b390102f-36fa-4fc5-969f-7c979ea8fd94" CreationDate="2023-10-18T03:07:40.973" UserId="-1" />
  <row Id="40564" PostHistoryTypeId="2" PostId="10234" RevisionGUID="a9d152ae-8dae-47d2-a059-65906dfa4aa3" CreationDate="2023-10-18T06:17:42.730" UserId="4068" Text="I'm currently working to gain a deeper understanding of blockchain technologies, specifically in the context of parachains and relay chains, as well as solo chains. I'm having some confusion regarding the concept of a &quot;best block&quot; and how it operates in these different chains. I'd greatly appreciate a detailed explanation.&#xD;&#xA;&#xD;&#xA;1. Parachains and Relay Chains: Could someone please explain what the term &quot;best block&quot; means in the context of parachains and relay chains? How does this concept operate in practice? What is its significance for the network's operation and security?&#xD;&#xA;&#xD;&#xA;2. Relay Chain's Role: I understand that the relay chain plays a central role in maintaining consensus across parachains. How does the &quot;best block&quot; on the relay chain impact the state of all connected parachains? How often does this &quot;best block&quot; change?&#xD;&#xA;&#xD;&#xA;3. Solo Chains: I've also heard about &quot;solo chains,&quot; but I'm unsure of their relevance and how the concept of a &quot;best block&quot; applies to them. Could someone provide some insight into what solo chains are and how &quot;best blocks&quot; work in this context?&#xD;&#xA;&#xD;&#xA;4. Use Cases: If possible, please provide some real-world examples or use cases where understanding the &quot;best block&quot; in these different types of chains is important.&#xD;&#xA;&#xD;&#xA;I'd be grateful for any detailed explanations, references to official documentation, or examples that can help clarify these concepts. Thank you for your assistance in unraveling these intricacies." ContentLicense="CC BY-SA 4.0" />
  <row Id="40566" PostHistoryTypeId="1" PostId="10234" RevisionGUID="a9d152ae-8dae-47d2-a059-65906dfa4aa3" CreationDate="2023-10-18T06:17:42.730" UserId="4068" Text="Understanding the Concept of &quot;Best Block&quot; in Parachains, Relay Chains, and Solo Chains" ContentLicense="CC BY-SA 4.0" />
  <row Id="40567" PostHistoryTypeId="3" PostId="10234" RevisionGUID="a9d152ae-8dae-47d2-a059-65906dfa4aa3" CreationDate="2023-10-18T06:17:42.730" UserId="4068" Text="|polkadot|parachain-collator|babe|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40568" PostHistoryTypeId="2" PostId="10235" RevisionGUID="5504bbb2-80cb-44e4-84e0-6c17f7951299" CreationDate="2023-10-18T06:56:45.313" UserId="4623" Text="How can I send native tokens from a contract address to a user/externally owned account using [Ink][1] smart contract?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/" ContentLicense="CC BY-SA 4.0" />
  <row Id="40570" PostHistoryTypeId="1" PostId="10235" RevisionGUID="5504bbb2-80cb-44e4-84e0-6c17f7951299" CreationDate="2023-10-18T06:56:45.313" UserId="4623" Text="How to send native token from contract to externally owned account in ink smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40571" PostHistoryTypeId="3" PostId="10235" RevisionGUID="5504bbb2-80cb-44e4-84e0-6c17f7951299" CreationDate="2023-10-18T06:56:45.313" UserId="4623" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40572" PostHistoryTypeId="2" PostId="10236" RevisionGUID="5f0e7606-a300-4fc8-bd42-33ee26007b9e" CreationDate="2023-10-18T06:59:26.010" UserId="3752" Text="we are running a stand alone Blockchain network by using POA consensus mechanism. The chain was working fine and after producing 8 Lac Blocks the nodes we down and now i have tried to re-execute same command, i'm getting this error. &#xD;&#xA;&#xD;&#xA;**What Could be Reasons of this ? and what can be the solution.** &#xD;&#xA;&#xD;&#xA;2023-10-18 06:45:57  The bootnode you want to connect to at `/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWBFHeTFUUVQTVWxx7WaFueHMpzEzYjjSkLy5NhV6sQFNE` provided a different peer ID `12D3KooWSPRkv3Ji89TDjcWCcxqkhJTEWyp9FHCjnShRo3jcGvwR` than the one you expect `12D3KooWBFHeTFUUVQTVWxx7WaFueHMpzEzYjjSkLy5NhV6sQFNE`.    &#xD;&#xA;2023-10-18 06:45:57  The bootnode you want to connect to at `/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWBFHeTFUUVQTVWxx7WaFueHMpzEzYjjSkLy5NhV6sQFNE` provided a different peer ID `12D3KooWSPRkv3Ji89TDjcWCcxqkhJTEWyp9FHCjnShRo3jcGvwR` than the one you expect `12D3KooWBFHeTFUUVQTVWxx7WaFueHMpzEzYjjSkLy5NhV6sQFNE`.    &#xD;&#xA;2023-10-18 06:45:59 Detected prevote equivocation in the finality worker: Equivocation { round_number: 8, identity: Public(d17c2d7823ebf260fd138f2d7e27d114c0145d968b5ff5006125f2414fadae69 (5GoNkf6W...)), first: (Prevote { target_hash: 0xaedeecc53bc2152cb5382d14e9931258a8490bfd9b18da1f69c7537f84259f94, target_number: 830370 }, Signature(38ebcd6981c20436628e4e068e20f9f6e2cc6fb9726615fb9cda66cc691f1603fa7483aa5d9ea7395b4f117f6422edb0d50e6adc2b7e244d2d2a46d097bc7504)), second: (Prevote { target_hash: 0x23ae4b3367cf78c298b59814fe4f6016a76a330c479dca0509a8289cc10aeb71, target_number: 830361 }, Signature(25392566364fb2264076e1c473c7b772c5fc0e3d8bb1f7649ee1af0acc0bd9f41282593d677197c13df93e124cd419158ad43c33ae85c083f8f8f1f9779d7405)) }    &#xD;&#xA;2023-10-18 06:45:59 Error reporting prevote equivocation: safety invariant has been violated: Refraining from sending equivocation report for our own equivocation.    &#xD;&#xA;&#xD;&#xA;    **thread 'tokio-runtime-worker' has overflowed its stack&#xD;&#xA;    fatal runtime error: stack overflow&#xD;&#xA;    Aborted (core dumped)**&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40574" PostHistoryTypeId="1" PostId="10236" RevisionGUID="5f0e7606-a300-4fc8-bd42-33ee26007b9e" CreationDate="2023-10-18T06:59:26.010" UserId="3752" Text="thread 'tokio-runtime-worker' has overflowed its stack fatal runtime error: stack overflow Aborted (core dumped)" ContentLicense="CC BY-SA 4.0" />
  <row Id="40575" PostHistoryTypeId="3" PostId="10236" RevisionGUID="5f0e7606-a300-4fc8-bd42-33ee26007b9e" CreationDate="2023-10-18T06:59:26.010" UserId="3752" Text="|runtime|evm|grandpa|poa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40576" PostHistoryTypeId="2" PostId="10237" RevisionGUID="2bb2cdd8-c7b8-4138-8fc1-9061775c06d7" CreationDate="2023-10-18T07:11:38.247" UserId="567" Text="By using [transfer][1]. See example [here][2]&#xD;&#xA;&#xD;&#xA;            self.env()&#xD;&#xA;                .transfer(recipient, amount)&#xD;&#xA;                .map_err(|_| Error::TrasnferError)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ink_env/latest/ink_env/fn.transfer.html&#xD;&#xA;  [2]: https://github.com/paritytech/ink-examples/blob/b5a5a554f85e9bd07d288ab319d14f15e6e509af/payment-channel/lib.rs#L213" ContentLicense="CC BY-SA 4.0" />
  <row Id="40578" PostHistoryTypeId="2" PostId="10238" RevisionGUID="4b9bda3d-65c5-4f64-8030-7ea12b6d7516" CreationDate="2023-10-18T08:29:29.710" UserId="85" Text="`cargo expand` is a very useful tool to see the expanded macros that a runtime generates, but if the runtime doesn't compile then it does not output anything.&#xD;&#xA;&#xD;&#xA;Any tips?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40580" PostHistoryTypeId="1" PostId="10238" RevisionGUID="4b9bda3d-65c5-4f64-8030-7ea12b6d7516" CreationDate="2023-10-18T08:29:29.710" UserId="85" Text="How do I cargo expand a non-compiling runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40581" PostHistoryTypeId="3" PostId="10238" RevisionGUID="4b9bda3d-65c5-4f64-8030-7ea12b6d7516" CreationDate="2023-10-18T08:29:29.710" UserId="85" Text="|runtime|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40582" PostHistoryTypeId="2" PostId="10239" RevisionGUID="4143d620-7608-43b0-8ffa-e1849539fb79" CreationDate="2023-10-18T08:29:29.710" UserId="85" Text="Quite often I have found that if you run `SKIP_WASM_BUILD=1 cargo expand` then it will expand the code even if there's some compile errors." ContentLicense="CC BY-SA 4.0" />
  <row Id="40584" PostHistoryTypeId="2" PostId="10240" RevisionGUID="1612c566-1f9c-423f-bc1d-a6e0355b3004" CreationDate="2023-10-18T09:06:56.647" UserId="4623" Text="Is it possible to transmit the native token to the contract immediately after deployment by invoking the constructor on the [Ink][1] smart contract?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/" ContentLicense="CC BY-SA 4.0" />
  <row Id="40586" PostHistoryTypeId="1" PostId="10240" RevisionGUID="1612c566-1f9c-423f-bc1d-a6e0355b3004" CreationDate="2023-10-18T09:06:56.647" UserId="4623" Text="Can I send native token in the contract just after deployment by calling the constructor on Ink smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40587" PostHistoryTypeId="3" PostId="10240" RevisionGUID="1612c566-1f9c-423f-bc1d-a6e0355b3004" CreationDate="2023-10-18T09:06:56.647" UserId="4623" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40588" PostHistoryTypeId="2" PostId="10241" RevisionGUID="7824cec6-6a5d-4bc2-a726-7d4b808c7a7b" CreationDate="2023-10-18T09:10:07.130" UserId="4623" Text="Can we call one of the pallet functions somehow, from [Ink][1] smart contract?&#xD;&#xA;  [1]: https://use.ink/" ContentLicense="CC BY-SA 4.0" />
  <row Id="40590" PostHistoryTypeId="1" PostId="10241" RevisionGUID="7824cec6-6a5d-4bc2-a726-7d4b808c7a7b" CreationDate="2023-10-18T09:10:07.130" UserId="4623" Text="Can we call pallet function somehow from Ink smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40591" PostHistoryTypeId="3" PostId="10241" RevisionGUID="7824cec6-6a5d-4bc2-a726-7d4b808c7a7b" CreationDate="2023-10-18T09:10:07.130" UserId="4623" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40592" PostHistoryTypeId="2" PostId="10242" RevisionGUID="96b248d3-00c9-4a5e-af7f-7b156b6a4651" CreationDate="2023-10-18T09:10:47.073" UserId="4804" Text="I just started in learning substrate and I want to run the example. I take the tutorial on the site https://docs.substrate.io/install/macos/.&#xD;&#xA;I have already done all steps. I tried run test blockchain by command ```./target/release/node-template --dev```&#xD;&#xA;&#xD;&#xA;Unfortunately, I got the problem ```zsh: segmentation fault  ./target/release/node-template --dev```. &#xD;&#xA;&#xD;&#xA;I was searching the problem in the Internet, but it was without result. But if I enter the command without argument &quot;--dev&quot;, it works without errors, but finalized blocks not generated (always get this output from terminal: ```2023-10-18 10:12:00  Idle (0 peers), best: #0 (0x6629…5b92), finalized #0 (0x6629…5b92), ⬇ 0 ⬆ 0 ```).&#xD;&#xA;&#xD;&#xA;I tried to solve the problem: 1) by increasing space in node js; 2) by downgrading nigthly&#xD;&#xA;It was unsuccessfull :(&#xD;&#xA;&#xD;&#xA;If I run code with command ```RUST_BACKTRACE=1 ./target/release/node-template -ldebug --dev``` I get this output: ```main wasm_overrides: Neither WASM override nor substitute available for block 0x9d35…79e5, using onchain code```&#xD;&#xA;&#xD;&#xA;I'm using macOS Sonoma 14.0. &#xD;&#xA;&#xD;&#xA;I will be grateful for the answers you provide!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40594" PostHistoryTypeId="1" PostId="10242" RevisionGUID="96b248d3-00c9-4a5e-af7f-7b156b6a4651" CreationDate="2023-10-18T09:10:47.073" UserId="4804" Text="segmentation fault ERROR" ContentLicense="CC BY-SA 4.0" />
  <row Id="40595" PostHistoryTypeId="3" PostId="10242" RevisionGUID="96b248d3-00c9-4a5e-af7f-7b156b6a4651" CreationDate="2023-10-18T09:10:47.073" UserId="4804" Text="|substrate-node-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40596" PostHistoryTypeId="2" PostId="10243" RevisionGUID="a581a0ea-d4b1-4f21-a5e9-0d941d65aea9" CreationDate="2023-10-18T09:56:39.653" UserId="3317" Text="In order to determine whether the new block is our new best:&#xD;&#xA;- Find the common ancestor between the current best and the new block's parent.&#xD;&#xA;- Count the number of Babe primary slot claims between the common ancestor and the current best.&#xD;&#xA;- Count the number of Babe primary slot claims between the common ancestor and the new block's parent. Add one if the new block has a Babe primary slot claim.&#xD;&#xA;- If the number for the new block is strictly superior, then the new block is our new best.&#xD;&#xA;&#xD;&#xA;For algorithms other than Babe, all blocks simply count as one, such that the longest chain is the preferred one.&#xD;&#xA;Therefore, it is not meaningful to compare the score of an Aura chain and the score of a Babe chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="40598" PostHistoryTypeId="2" PostId="10244" RevisionGUID="64ad44ea-331d-46d4-8667-ed50cfa8e2f0" CreationDate="2023-10-18T11:13:42.530" UserId="4805" Text="I was curious to know why the submission deposit for an OpenGov proposal is non-refundable if the proposal times out.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/referenda/src/types.rs#L261-L270&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn take_submission_deposit(&amp;mut self) -&gt; Result&lt;Option&lt;Deposit&lt;AccountId, Balance&gt;&gt;, ()&gt; {&#xD;&#xA;    use ReferendumInfo::*;&#xD;&#xA;    match self {&#xD;&#xA;        // Deposit can only be refunded if the proposal is approved or canceled.&#xD;&#xA;        Approved(_, s, _) | Cancelled(_, s, _) =&gt; Ok(s.take()),&#xD;&#xA;        // Deposit cannot be refunded if the proposal is ongoing as this would break assumptions.&#xD;&#xA;        Ongoing(..) | Rejected(..) | TimedOut(..) | Killed(..) =&gt; Err(()),&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I understand the need to deter spam proposals from going on-chain. Therefore, it makes sense to throw an error on `Rejected` or `Killed` proposals. However, I'm uncertain about `TimedOut` in this context.&#xD;&#xA;&#xD;&#xA;For example, consider a scenario where a proposal is wrongly constructed without any intention to spam the chain. In this case, the proposal could be marked as `Rejected` because people vote against it in favor of another one. Unfortunately, I understand that the submission deposit is not refunded in this case.&#xD;&#xA;&#xD;&#xA;But if the proposer genuinely puts forth a new proposal without the wrong one progressing to a vote, it will likely end up `TimedOut`. Wouldn't locking the deposit for 14 days serve as a sufficient penalty to deter such spam?&#xD;&#xA;&#xD;&#xA;What do you think?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40600" PostHistoryTypeId="1" PostId="10244" RevisionGUID="64ad44ea-331d-46d4-8667-ed50cfa8e2f0" CreationDate="2023-10-18T11:13:42.530" UserId="4805" Text="OpenGov submission deposit refund on TimedOut" ContentLicense="CC BY-SA 4.0" />
  <row Id="40601" PostHistoryTypeId="3" PostId="10244" RevisionGUID="64ad44ea-331d-46d4-8667-ed50cfa8e2f0" CreationDate="2023-10-18T11:13:42.530" UserId="4805" Text="|opengov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40602" PostHistoryTypeId="2" PostId="10245" RevisionGUID="f327cb26-7e48-45a8-80e6-4c23cce428b9" CreationDate="2023-10-18T12:20:47.153" UserId="4806" Text="Would you please advise if there is an alternative to Faucet to get WND - does Polkadot API help with it?&#xD;&#xA;&#xD;&#xA;I went through API documentation and did not find any info, I'm glad to be wrong :)&#xD;&#xA;&#xD;&#xA;Thank you for any information!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40604" PostHistoryTypeId="1" PostId="10245" RevisionGUID="f327cb26-7e48-45a8-80e6-4c23cce428b9" CreationDate="2023-10-18T12:20:47.153" UserId="4806" Text="Westend token getting via polkadot/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="40605" PostHistoryTypeId="3" PostId="10245" RevisionGUID="f327cb26-7e48-45a8-80e6-4c23cce428b9" CreationDate="2023-10-18T12:20:47.153" UserId="4806" Text="|polkadot-js|token|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40606" PostHistoryTypeId="2" PostId="10246" RevisionGUID="3ebf4fe2-19a3-4c0c-af92-01d994cf526e" CreationDate="2023-10-18T12:30:31.070" UserId="4805" Text="I was wondering is there any specific reason why  Polkadot still does not support XCM execution from Computed Origins `LocalOriginConverter` - Apologies as I'm not a Substrate developer but I looked into the `xcm_config.rs` file in Polkadot's Runtime and I don't see `SovereignAccountOf` of `LocalOriginConverter` supported this.&#xD;&#xA;&#xD;&#xA;https://github.com/polkadot-fellows/runtimes/blob/main/relay/polkadot/src/xcm_config.rs#L95-L107&#xD;&#xA;&#xD;&#xA;I ask the question because LIDO was original using Moonbeam's Sovereign account and a  `utility.asDerivative` to remotely transact on Polkadot via an index that was registered on Moonbeam via Governance. But if we allow Computed Origins on Polkadot, then this would open the possibility to everyone.&#xD;&#xA;&#xD;&#xA;Is this something that is being looked at in the Polkadot Roadmap?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40608" PostHistoryTypeId="1" PostId="10246" RevisionGUID="3ebf4fe2-19a3-4c0c-af92-01d994cf526e" CreationDate="2023-10-18T12:30:31.070" UserId="4805" Text="XCM - Add remote origins execution to Polkadot/Kusama" ContentLicense="CC BY-SA 4.0" />
  <row Id="40609" PostHistoryTypeId="3" PostId="10246" RevisionGUID="3ebf4fe2-19a3-4c0c-af92-01d994cf526e" CreationDate="2023-10-18T12:30:31.070" UserId="4805" Text="|polkadot|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40610" PostHistoryTypeId="2" PostId="10247" RevisionGUID="2c1f0ebb-8dfa-45ad-9646-a332fcd9f7f7" CreationDate="2023-10-18T12:51:44.767" UserId="2762" Text="You can use now `set_item_metadata` and `set_collection_metadata` to set the metadata of a token or a collection.&#xD;&#xA;&#xD;&#xA;This trait has been added recently in this PR: [Trading trait and deal with metadata in Mutate trait for nonfungibles_v2][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/pull/1561" ContentLicense="CC BY-SA 4.0" />
  <row Id="40612" PostHistoryTypeId="2" PostId="10248" RevisionGUID="39f4dabf-75a0-475d-bc2e-3dfe3c9e46e8" CreationDate="2023-10-18T13:07:07.807" UserId="4758" Text="&#xD;&#xA;polkadot-js got updated to a newer version, you can follow the links provided to find the new syntax, do look into what version you're on. there's a slight difference&#xD;&#xA;&#xD;&#xA;[Newer Version Syntax][1]&#xD;&#xA;&#xD;&#xA;Please note that for SUDO you have to apply a different filtering process:&#xD;&#xA;&#xD;&#xA;[Newer Version Syntax on sudo][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event&#xD;&#xA;  [2]: https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-result-of-a-sudo-event" ContentLicense="CC BY-SA 4.0" />
  <row Id="40614" PostHistoryTypeId="2" PostId="10249" RevisionGUID="df0cd314-04b8-4d79-8fbd-a389863c45f6" CreationDate="2023-10-18T13:54:51.890" UserId="32" Text="&gt;  does Polkadot API help with it?&#xD;&#xA;&#xD;&#xA;**No.** &#xD;&#xA;&#xD;&#xA;If the faucet functionality was implemented on Westend network, then this would be possible. But right now, there is no such functionality built into the chain.&#xD;&#xA;&#xD;&#xA;You can request for WND tokens here https://paritytech.github.io/polkadot-testnet-faucet/westend or via https://matrix.to/#/#westend_faucet:matrix.org" ContentLicense="CC BY-SA 4.0" />
  <row Id="40616" PostHistoryTypeId="2" PostId="10250" RevisionGUID="0b855330-b560-4eb2-a261-9df4ce42fef3" CreationDate="2023-10-18T14:15:50.680" UserId="2884" Text="I want to have some automatic handling for channel opening requests.&#xD;&#xA;I can do this by executing some logic when the relay sends an `HrmpNewChannelOpenRequest` instruction, but the default xcm-executor has an &quot;Unimplemented&quot; error returning.&#xD;&#xA;&#xD;&#xA;Should I just fork the executor and put my custom logic there, or is it planned at some point soon to have some new generic types where we can decide what to do when that instruction is received?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40618" PostHistoryTypeId="1" PostId="10250" RevisionGUID="0b855330-b560-4eb2-a261-9df4ce42fef3" CreationDate="2023-10-18T14:15:50.680" UserId="2884" Text="When will the xcm-executor implement something on the instr `HrmpNewChannelOpenRequest`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40619" PostHistoryTypeId="3" PostId="10250" RevisionGUID="0b855330-b560-4eb2-a261-9df4ce42fef3" CreationDate="2023-10-18T14:15:50.680" UserId="2884" Text="|xcm|xcmp|hrmp|executor|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40620" PostHistoryTypeId="2" PostId="10251" RevisionGUID="fa85f123-4151-4a51-aa0b-96b1d0a4b549" CreationDate="2023-10-18T14:32:20.740" UserId="567" Text="Just make the constructor [payable][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink-examples/blob/b5a5a554f85e9bd07d288ab319d14f15e6e509af/contract-transfer/lib.rs#L16" ContentLicense="CC BY-SA 4.0" />
  <row Id="40622" PostHistoryTypeId="52" PostId="10235" RevisionGUID="d485e4dd-e908-4ee1-bb37-aa92467d3e6f" CreationDate="2023-10-18T14:59:55.450" />
  <row Id="40623" PostHistoryTypeId="2" PostId="10252" RevisionGUID="ad3dc217-6734-491e-a0b4-8be5e0e7f861" CreationDate="2023-10-18T16:25:07.037" UserId="3850" Text="How do you tranfer wrapped DOT (AssetId: `340,282,366,920,938,463,463,374,607,431,768,211,455`) on Astar/Shiden to Polkadot/Kusama using XCM?&#xD;&#xA;&#xD;&#xA;Following this [guide][1] from Astar XCM documentation, this demonstrates how to transfer DOT from Kusama to Shiden (mapped to wrapped DOT) using the XCM instruction `limited_reserve_transfer_asset`. &#xD;&#xA;&#xD;&#xA;What is the equivalent XCM instruction to perform the transfer in the other direction?&#xD;&#xA;&#xD;&#xA;I have attempted to execute the following XCM instruction using [chopsticks][2], but failed with &quot;Failed to transfer Asset&quot;. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let message = Xcm(vec![&#xD;&#xA;  DescendOrigin,&#xD;&#xA;  TransferWithdrawAsset {&#xD;&#xA;    assets: (Here, amount).into(),&#xD;&#xA;    dest: MultiLocation::parent(),&#xD;&#xA;    xcm: Xcm(vec![&#xD;&#xA;        DepositAsset {&#xD;&#xA;          assets: All.into(),&#xD;&#xA;          beneficiary: AccountId32 { &#xD;&#xA;              id: contract_pub_key&#xD;&#xA;              network: None &#xD;&#xA;          }.into(),&#xD;&#xA;        },&#xD;&#xA;      ]),&#xD;&#xA;  },&#xD;&#xA;]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.astar.network/docs/learn/interoperability/xcm/building-with-xcm/native-transactions/#in-practise&#xD;&#xA;  [2]: https://github.com/AcalaNetwork/chopsticks" ContentLicense="CC BY-SA 4.0" />
  <row Id="40625" PostHistoryTypeId="1" PostId="10252" RevisionGUID="ad3dc217-6734-491e-a0b4-8be5e0e7f861" CreationDate="2023-10-18T16:25:07.037" UserId="3850" Text="How to transfer wrapped DOT from Astar to Polkadot using XCM" ContentLicense="CC BY-SA 4.0" />
  <row Id="40626" PostHistoryTypeId="3" PostId="10252" RevisionGUID="ad3dc217-6734-491e-a0b4-8be5e0e7f861" CreationDate="2023-10-18T16:25:07.037" UserId="3850" Text="|xcm|assets|astar|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40627" PostHistoryTypeId="2" PostId="10253" RevisionGUID="9be4d824-99bc-407b-ac1b-04d26466d369" CreationDate="2023-10-19T00:41:12.580" UserId="4808" Text="Yes its possible in both way, pallet can contracts and contracts can runtime extension having pallets logic here is code for [Runtime][1] and contract&#xD;&#xA;[Contract][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.dev/paritytech/ink-examples/blob/main/psp22-extension/runtime/psp22-extension-example.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="40629" PostHistoryTypeId="2" PostId="10254" RevisionGUID="2fe16643-8b6b-4476-983c-5e2b517fea7b" CreationDate="2023-10-19T00:51:11.217" UserId="4809" Text="I run cargo install &quot; contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked &quot; and then a version of the proc-macro2 library is incompatible with the proc_macro module I see that it is or does not meet a specific configuration or version requirement regarding proc_macro2. What would be the reason? " ContentLicense="CC BY-SA 4.0" />
  <row Id="40631" PostHistoryTypeId="1" PostId="10254" RevisionGUID="2fe16643-8b6b-4476-983c-5e2b517fea7b" CreationDate="2023-10-19T00:51:11.217" UserId="4809" Text="could not compile `proc-macro2` (lib) due to 3 previous errors" ContentLicense="CC BY-SA 4.0" />
  <row Id="40632" PostHistoryTypeId="3" PostId="10254" RevisionGUID="2fe16643-8b6b-4476-983c-5e2b517fea7b" CreationDate="2023-10-19T00:51:11.217" UserId="4809" Text="|ink|error|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40633" PostHistoryTypeId="2" PostId="10255" RevisionGUID="af17a0bc-00d6-44c9-bfd3-a017e2b964d2" CreationDate="2023-10-19T03:05:44.693" UserId="4810" Text="To transfer DOT back to Polkadot, you can use `orml-xtokens` pallet in Astar:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9Kx2o.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40635" PostHistoryTypeId="50" PostId="6245" RevisionGUID="ee862f62-1563-4c7f-b71a-77bf75e7e41b" CreationDate="2023-10-19T05:01:10.227" UserId="-1" />
  <row Id="40636" PostHistoryTypeId="2" PostId="10256" RevisionGUID="78078ed3-7dca-4b65-8c38-8ae8d99fac81" CreationDate="2023-10-19T06:19:21.540" UserId="4422" Text="This is within my smart contract's module:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        // THIS IS BEING USED: use ink::prelude::vec::Vec;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn test_encoding(&amp;mut self) -&gt; Result&lt;u32, ZeitDAOError&gt; {&#xD;&#xA;            let mut x: Vec&lt;u8&gt; = scale::Encode::encode(&amp;RuntimeCall::TestCall);&#xD;&#xA;&#xD;&#xA;            // There is an error here&#xD;&#xA;            match &lt;u32 as scale::Decode&gt;::decode(&amp;mut x) {&#xD;&#xA;                Ok(value) =&gt; Ok(value),&#xD;&#xA;                Err(_) =&gt; Err(ZeitDAOError::ErrorDecodingProposalData)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;There is a compiler error when passing in `&amp;mut x` to the decode function:&#xD;&#xA;```&#xD;&#xA;the trait bound `Vec&lt;u8&gt;: Input` is not satisfied&#xD;&#xA;the following other types implement trait `Input`:&#xD;&#xA;  IoReader&lt;R&gt;&#xD;&#xA;  AppendZerosInput&lt;'a, T&gt;&#xD;&#xA;  TrailingZeroInput&lt;'a&gt;&#xD;&#xA;  &amp;'a [u8]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I assume this is because the ink Vec is not the typical library's Vec? I'm unsure how otherwise to use the decoding method, or if there is a method at all. Or do I misunderstand how `Decode::decode` works?&#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40638" PostHistoryTypeId="1" PostId="10256" RevisionGUID="78078ed3-7dca-4b65-8c38-8ae8d99fac81" CreationDate="2023-10-19T06:19:21.540" UserId="4422" Text="How do I scale decode a Vec&lt;u8&gt; within an ink smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40639" PostHistoryTypeId="3" PostId="10256" RevisionGUID="78078ed3-7dca-4b65-8c38-8ae8d99fac81" CreationDate="2023-10-19T06:19:21.540" UserId="4422" Text="|ink|decode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40640" PostHistoryTypeId="2" PostId="10257" RevisionGUID="449a62d5-5eb0-4d6c-b7b3-0a899a43f66c" CreationDate="2023-10-19T06:57:09.553" UserId="4811" Text="Thank you for reporting this !&#xD;&#xA;&#xD;&#xA;Looks like the definition of `beefy::subscribeJustifications()` from `polkadot-js/api` is outdated. Published a PR that should fix it: https://github.com/polkadot-js/api/pull/5740 . The change will take effect after `polkadot-js/apps` is redeployed. Not sure exactly when this will happen, but will keep an eye on it." ContentLicense="CC BY-SA 4.0" />
  <row Id="40642" PostHistoryTypeId="50" PostId="8568" RevisionGUID="8b464b1e-025b-42b9-8187-c2a8b2ea4144" CreationDate="2023-10-19T09:05:10.740" UserId="-1" />
  <row Id="40643" PostHistoryTypeId="2" PostId="10258" RevisionGUID="d5e7dab3-71ff-4c59-95de-a7b5a5f700cc" CreationDate="2023-10-19T09:49:54.563" UserId="4731" Text="I'm working on a smart contract where I need to send a balance from a user account to the contract address. The amount to be sent is fixed and hardcoded in the contract. I have tried to figure out some ways, but the only thing I have found is self.env().transferred_value(). But I don't see any option to fix the amount with this method." ContentLicense="CC BY-SA 4.0" />
  <row Id="40645" PostHistoryTypeId="1" PostId="10258" RevisionGUID="d5e7dab3-71ff-4c59-95de-a7b5a5f700cc" CreationDate="2023-10-19T09:49:54.563" UserId="4731" Text="How to send fix amount of balance to contract address" ContentLicense="CC BY-SA 4.0" />
  <row Id="40646" PostHistoryTypeId="3" PostId="10258" RevisionGUID="d5e7dab3-71ff-4c59-95de-a7b5a5f700cc" CreationDate="2023-10-19T09:49:54.563" UserId="4731" Text="|ink|smart-contract|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40647" PostHistoryTypeId="50" PostId="8114" RevisionGUID="8aac4045-62d0-4ab7-a8f4-67bc305d9262" CreationDate="2023-10-19T10:02:00.247" UserId="-1" />
  <row Id="40648" PostHistoryTypeId="2" PostId="10259" RevisionGUID="d408d9f1-2181-40f8-82b0-fc921f2c043d" CreationDate="2023-10-19T10:17:17.440" UserId="697" Text="I want to use Substrate Runtime in my application without consensus layer (outer node). I only want to create extrinsics in memory and pass them to runtime (or FRAME) of my custom pallets to proceed. How can I create instance of Runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40650" PostHistoryTypeId="1" PostId="10259" RevisionGUID="d408d9f1-2181-40f8-82b0-fc921f2c043d" CreationDate="2023-10-19T10:17:17.440" UserId="697" Text="Standalone Runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="40651" PostHistoryTypeId="3" PostId="10259" RevisionGUID="d408d9f1-2181-40f8-82b0-fc921f2c043d" CreationDate="2023-10-19T10:17:17.440" UserId="697" Text="|runtime|frame|runtime-api|backend|standalone|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40652" PostHistoryTypeId="50" PostId="8569" RevisionGUID="2316b3a3-b485-458b-80a9-09f272d2c3f8" CreationDate="2023-10-19T11:02:15.263" UserId="-1" />
  <row Id="40653" PostHistoryTypeId="2" PostId="10260" RevisionGUID="ec30918a-1f21-412f-a447-bd39f9a18304" CreationDate="2023-10-19T12:53:04.150" UserId="4314" Text="We can see [here](https://github.com/polkadot-js/ui/blob/0837376d008d6b90e548a41a91acf426703ebd34/packages/ui-keyring/src/types.ts#L29C1-L36C2) the `KeyringOptions` which contain the `KeyringStore`. Those options are what's called by [`loadAll()`](https://github.com/polkadot-js/ui/blob/0837376d008d6b90e548a41a91acf426703ebd34/packages/ui-keyring/src/Keyring.ts#L295) in line 326: `this.KeyringOptions.init(this)`. If we then go to see what that [`init`](https://github.com/polkadot-js/ui/blob/0837376d008d6b90e548a41a91acf426703ebd34/packages/ui-keyring/src/options/index.ts#L50) does, we can see that sets `hasCalledInitOptions` to `true`, that is why it throws that error.&#xD;&#xA;&#xD;&#xA;So the issue is that you can't use `loadAll()` twice, because between the things that it does it initializes the Keyring, and you can't initialize the keyring twice.&#xD;&#xA;&#xD;&#xA;There's currently no way to reset the `KeyStore` and replace it with another one, I guess in order to prevent a running process to go look for a key that's no longer there. There's also no way to replace the current store once it's set, what you can do is add or remove keys to it, but not in the scope of the store itself. &#xD;&#xA;&#xD;&#xA;The way to proceed is to teardown the UI and restart it with the new keystore or run a `forEach()` to empty the store and another one to add the new keys.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40655" PostHistoryTypeId="2" PostId="10261" RevisionGUID="c6ec196e-7325-4b0c-b437-89c7673276da" CreationDate="2023-10-19T14:35:57.753" UserId="554" Text="Is it possible to integrate the parachain-staking pallet into my solochain? I want to transition my chain's consensus mechanism from POA to proof of stake using a parachain-staking pallet in my solochain. Can I use that?&#xD;&#xA;&#xD;&#xA;For your reference, here is the code for the pallet:&#xD;&#xA;[https://github.com/moonbeam-foundation/moonbeam/tree/master/pallets/parachain-staking][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://%20https://github.com/moonbeam-foundation/moonbeam/tree/master/pallets/parachain-staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="40657" PostHistoryTypeId="1" PostId="10261" RevisionGUID="c6ec196e-7325-4b0c-b437-89c7673276da" CreationDate="2023-10-19T14:35:57.753" UserId="554" Text="Integrating Parachain-Staking Pallet in Solochain: Transitioning from POA to Proof of Stake" ContentLicense="CC BY-SA 4.0" />
  <row Id="40658" PostHistoryTypeId="3" PostId="10261" RevisionGUID="c6ec196e-7325-4b0c-b437-89c7673276da" CreationDate="2023-10-19T14:35:57.753" UserId="554" Text="|parachain|staking|solo-chain|poa|proof-of-stake|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40659" PostHistoryTypeId="2" PostId="10262" RevisionGUID="fb0acfad-badc-4ba3-9e92-db99254f82b3" CreationDate="2023-10-19T14:44:27.940" UserId="4021" Text="So i am running this command ``` npx @727-ventures/typechain-compiler --config typechain.config.json``` to get to compile so i can write my test file for my contracts and use the typechain gotten. This is the error &#xD;&#xA;```error[E0554]: `#![feature]` may not be used on the stable release channel&#xD;&#xA; --&gt; /Users/ayomide/Desktop/Work Space/Me Protocol/rusty-protocol-v0.1/contracts/global.rs:2:1&#xD;&#xA;  |&#xD;&#xA;2 | #![feature(min_specialization)]&#xD;&#xA;  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^```&#xD;&#xA;&#xD;&#xA;I understand that this is because i added  ```#![feature(min_specialization)]```, but i am using the rust nightly channel , so if i cargo cotract build, it build and complies well. But when i run this ``` npx @727-ventures/typechain-compiler --config typechain.config.json```&#xD;&#xA;I get the problem. Even though i am still using nightly channel. &#xD;&#xA;&#xD;&#xA;Any help please" ContentLicense="CC BY-SA 4.0" />
  <row Id="40661" PostHistoryTypeId="1" PostId="10262" RevisionGUID="fb0acfad-badc-4ba3-9e92-db99254f82b3" CreationDate="2023-10-19T14:44:27.940" UserId="4021" Text="How do i run ```npx @727-ventures/typechain-compiler --config typechain.config.json``` for a nightly version" ContentLicense="CC BY-SA 4.0" />
  <row Id="40662" PostHistoryTypeId="3" PostId="10262" RevisionGUID="fb0acfad-badc-4ba3-9e92-db99254f82b3" CreationDate="2023-10-19T14:44:27.940" UserId="4021" Text="|ink|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40663" PostHistoryTypeId="2" PostId="10263" RevisionGUID="be154de8-fa47-489f-bd33-bca58aaf425c" CreationDate="2023-10-19T14:57:26.070" UserId="3317" Text="I'm unable to spawn a zombienetwork with binaries &gt; `polkadot v1.0.0`." ContentLicense="CC BY-SA 4.0" />
  <row Id="40665" PostHistoryTypeId="1" PostId="10263" RevisionGUID="be154de8-fa47-489f-bd33-bca58aaf425c" CreationDate="2023-10-19T14:57:26.070" UserId="3317" Text="Running zombienet with release &gt; polkadot v1.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="40666" PostHistoryTypeId="3" PostId="10263" RevisionGUID="be154de8-fa47-489f-bd33-bca58aaf425c" CreationDate="2023-10-19T14:57:26.070" UserId="3317" Text="|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40667" PostHistoryTypeId="2" PostId="10264" RevisionGUID="14d7cdf5-292f-4f6a-9869-78f53d0ec995" CreationDate="2023-10-19T14:57:26.070" UserId="3317" Text="Since `polkadot v1.0.0` you not only need the `polkadot` binary but also the `polkadot-execute-worker` and `polkadot-prepare-worker` binaries. If you put them in the same folder as the `polkadot` binary it should work!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40669" PostHistoryTypeId="2" PostId="10265" RevisionGUID="5a213404-fb34-4dc9-a988-67b4e5218a89" CreationDate="2023-10-19T15:01:14.873" UserId="4813" Text="Loïs from [Allfeat][1].&#xD;&#xA;&#xD;&#xA;I advise you to do the updates step by step. Upgrading directly from polkadot-v0.9.30 to the latest versions will be a mess to do regarding all the major changes between these two versions.&#xD;&#xA;If you do step by step (e.g polkadot-v0.9.30 to polkadot-v0.9.34), it will be more easier to follow the process and it enable you some checkpoints with git in case something went wrong during the update process.&#xD;&#xA;&#xD;&#xA;Usually this is how I proceed: &#xD;&#xA; - Update all the dependencies in Cargo.toml to the desired branch of the desired version (first ur pallets, then the runtimes and the node)&#xD;&#xA; - fix errors with the help of the substrate-node-template to see what need to be changed&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Allfeat" ContentLicense="CC BY-SA 4.0" />
  <row Id="40671" PostHistoryTypeId="2" PostId="10266" RevisionGUID="ca4d3d17-956b-4141-91f5-0c1ce1a23659" CreationDate="2023-10-19T16:32:48.443" UserId="3123" Text="*If more context is needed, it is available in commit [b392cfa3, file `mock.rs`](https://git.duniter.org/nodes/rust/duniter-v2s/-/blob/b392cfa34945c5d74f0840e04c431dfec60e1418/pallets/quotas/src/mock.rs)*.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I'm trying to add a mock for my pallet `pallet_quotas` in order to implement unit tests.&#xD;&#xA;My pallet depends on a certain configuration of `frame_system` which is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl system::Config for Test {&#xD;&#xA;    // [...]&#xD;&#xA;    type AccountData = pallet_duniter_account::AccountData&lt;Balance, IdtyId&lt;Test&gt;&gt;`&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thus, my mock depends on pallet `pallet_duniter_account` which is strongly coupled to my pallet `pallet_quotas` (&#xD;&#xA;`pub trait Config: /* [...] */ + pallet_quotas::Config`). No problem, I'm also providing a `Config` implementation for this pallet in my mock:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl Config for Test {&#xD;&#xA;    type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    type ReloadRate = ReloadRate;&#xD;&#xA;    type MaxQuotas = MaxQuotas;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I `cargo check --tests -p pallet-quotas`, I get the following:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;error[E0277]: the trait bound `Test: pallet_quotas::pallet::Config` is not satisfied&#xD;&#xA;   --&gt; pallets/quotas/src/mock.rs:122:41&#xD;&#xA;    |&#xD;&#xA;122 | impl pallet_duniter_account::Config for Test {&#xD;&#xA;    |                                         ^^^^ the trait `pallet_quotas::pallet::Config` is not implemented for `Test`&#xD;&#xA;    |&#xD;&#xA;note: required by a bound in `pallet_duniter_account::Config`&#xD;&#xA;   --&gt; /home/hugo/dev/duniter-v2s/pallets/duniter-account/src/lib.rs:67:11&#xD;&#xA;    |&#xD;&#xA;61  |     pub trait Config:&#xD;&#xA;    |               ------ required by a bound in this trait&#xD;&#xA;...&#xD;&#xA;67  |         + pallet_quotas::Config&#xD;&#xA;    |           ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Config`&#xD;&#xA;    = note: `Config` is a &quot;sealed trait&quot;, because to implement it you also need to implement `pallet_quotas::pallet::Config`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which is annoying because I *did* provide an implementation of this trait.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I would like to clarify that I already have a valid runtime (`gdev`) which can run as well as integration tests for this runtime. But I really would like to have mocks and unit tests to be able to test more easily values for `ReloadRate` and `MaxQuotas` different than the one from `gdev` runtime.&#xD;&#xA;&#xD;&#xA;This might be a pure Rust question, but the context of substrate makes me unsure about what the problem really is. As the compiler note states, `Config` would be a &quot;sealed trait&quot; even defined as `pub`." ContentLicense="CC BY-SA 4.0" />
  <row Id="40673" PostHistoryTypeId="1" PostId="10266" RevisionGUID="ca4d3d17-956b-4141-91f5-0c1ce1a23659" CreationDate="2023-10-19T16:32:48.443" UserId="3123" Text="trait bound pallet::Config not satisfied even it is implemented" ContentLicense="CC BY-SA 4.0" />
  <row Id="40674" PostHistoryTypeId="3" PostId="10266" RevisionGUID="ca4d3d17-956b-4141-91f5-0c1ce1a23659" CreationDate="2023-10-19T16:32:48.443" UserId="3123" Text="|mock|config|tight-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40675" PostHistoryTypeId="2" PostId="10267" RevisionGUID="7472a5ec-1617-4f44-977d-c16e59ee197c" CreationDate="2023-10-19T18:35:47.163" UserId="139" Text="In my experience this is completely possible but not an easy task. You are looking at upgrading your node client and including storage migrations.&#xD;&#xA;&#xD;&#xA;I would suggest making a list of FRAME migrations that occurred between `0.9.30` and `0.9.43` and making a jump in steps, most preferably `30` -&gt; `37` -&gt; `42` -&gt; `43`. These will keep your code changes from becoming too overwhelming. Now for the production part, since you'll be making one big jump, you need to consider the effect of your storage migrations as being the cumulative sum of all storage migrations that may have happened interim.&#xD;&#xA;&#xD;&#xA;Once you're done with that, moving on to `polkadot-v1.0` should be relatively straightforward. " ContentLicense="CC BY-SA 4.0" />
  <row Id="40677" PostHistoryTypeId="50" PostId="9979" RevisionGUID="ef0793bd-ef37-4011-a716-2b4f1c747451" CreationDate="2023-10-20T04:07:10.983" UserId="-1" />
  <row Id="40678" PostHistoryTypeId="2" PostId="10268" RevisionGUID="78530bd6-f0e9-4aad-a044-5e1388acbfd4" CreationDate="2023-10-20T06:42:38.150" UserId="4443" Text="[![I got this error when i run this command cargo check -p node-template-runtime --release][1]][in build an application logic im facing this error im new to substrate please help me fix this.]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/AuRxt.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40680" PostHistoryTypeId="1" PostId="10268" RevisionGUID="78530bd6-f0e9-4aad-a044-5e1388acbfd4" CreationDate="2023-10-20T06:42:38.150" UserId="4443" Text="while building an application logic (use macros in a custom pallet)" ContentLicense="CC BY-SA 4.0" />
  <row Id="40681" PostHistoryTypeId="3" PostId="10268" RevisionGUID="78530bd6-f0e9-4aad-a044-5e1388acbfd4" CreationDate="2023-10-20T06:42:38.150" UserId="4443" Text="|substrate-node-template|pallet|substrate-node|blockchain|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40682" PostHistoryTypeId="2" PostId="10269" RevisionGUID="21109228-5706-458a-bceb-3df213ab8c7f" CreationDate="2023-10-20T09:58:37.877" UserId="4068" Text="This issue has been resolved in https://github.com/paritytech/ink/pull/1869" ContentLicense="CC BY-SA 4.0" />
  <row Id="40684" PostHistoryTypeId="2" PostId="10270" RevisionGUID="dc2b03ff-9a0f-494b-8e01-b30d2f9ccf45" CreationDate="2023-10-20T10:13:20.943" UserId="4068" Text="I'm facing an 'OutputBufferTooSmall' error in my [Language/Framework] code when working with larger vectors. I suspect this is related to the maximum allowed input/output sizes. I need guidance on how to increase these limits to handle larger data. I also noticed that this issue has been addressed and resolved by the Ink team in this [GitHub PR][1] . Can someone help me understand how to implement these changes in my smart contract, or do I need to add an .env file to my contract folder?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/ink/pull/1869" ContentLicense="CC BY-SA 4.0" />
  <row Id="40686" PostHistoryTypeId="1" PostId="10270" RevisionGUID="dc2b03ff-9a0f-494b-8e01-b30d2f9ccf45" CreationDate="2023-10-20T10:13:20.943" UserId="4068" Text="How to Modify static buffer size for my ink smart contract to Resolving 'OutputBufferTooSmall' Error for Larger Vectors in ink smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="40687" PostHistoryTypeId="3" PostId="10270" RevisionGUID="dc2b03ff-9a0f-494b-8e01-b30d2f9ccf45" CreationDate="2023-10-20T10:13:20.943" UserId="4068" Text="|ink|smart-contract|rust|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40688" PostHistoryTypeId="2" PostId="10271" RevisionGUID="31ca77db-48fd-45d0-8700-13d2e86fa3b6" CreationDate="2023-10-20T13:44:27.743" UserId="234" Text="- You can create your `asMulti` call with some default values for `reftime` and `proofsize`.&#xD;&#xA;- An example would be to set at your new weight the same `RefTime` as found in your old weight and for `proofsize` a default value like `0`.&#xD;&#xA;- Then use the corresponding runtime call to get a more accurate estimation of these parameters.&#xD;&#xA;- An example can be found in the [multisig][1] example of txwrapper-core.&#xD;&#xA;- There, the `maxweight` in the `asMulti` is set to [these values][2].&#xD;&#xA;- We can then copy the serialized signed tx (in the txwrapper example is called `txAsMulti`) that is printed and use the runtime call `queryInfo` from `TransactionPaymentApi` to get more accurate estimation for `reftime` and `proofsize`.&#xD;&#xA;    - we can call this either from [pjs-apps link][3]&#xD;&#xA;    - or sidecar's `/transaction/fee-estimate` endpoint which uses the same [call][4]&#xD;&#xA;&#xD;&#xA;For the `asMulti` call of this txwrapper example, I use the below curl command&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;curl -X 'POST' \&#xD;&#xA;  'http://127.0.0.1:8080/transaction/fee-estimate' \&#xD;&#xA;  -H 'accept: application/json' \&#xD;&#xA;  -H 'Content-Type: application/json' \&#xD;&#xA;  -d '{&#xD;&#xA;  &quot;tx&quot;: &quot;0x950384008eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a480160cf28a7cdac2e4a10883a22bf40cf764417418591fc2bd72800340c6f7edd774d7f1eb158ab004f0e920db9dabbe041c081585c18610f39d4cc274b371df187150000001e0102000890b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d010200000003000000050300e659a7a1628cdd93febc04a4e0646ea20e9f5f0ce097d9a05290d4a9e054df4e0f00c029f73d54050280969800&quot;&#xD;&#xA;}'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and the result I will receive (while connected to Polkadot)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&quot;weight&quot;:{&quot;refTime&quot;:&quot;886228054&quot;,&quot;proofSize&quot;:&quot;6811&quot;},&quot;class&quot;:&quot;Normal&quot;,&quot;partialFee&quot;:&quot;249232647&quot;}%&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;which is the same result that I get from pjs apps.&#xD;&#xA;&#xD;&#xA;Last, a great resource to get more information on weights is the [Deep Dive in Weights][5] which I absolutely recommend.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/multisig/src/multisig.ts&#xD;&#xA;  [2]: https://github.com/paritytech/txwrapper-core/blob/ff771e39c9966a87ad460ef0c67ed67f10601726/packages/txwrapper-examples/multisig/src/multisig.ts#L507&#xD;&#xA;  [3]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fdot-rpc.stakeworld.io#/runtime&#xD;&#xA;  [4]: https://github.com/paritytech/substrate-api-sidecar/blob/f486aa94bd86b21d460aaf2285dda1c535cfb969/src/services/transaction/TransactionFeeEstimateService.ts#L42&#xD;&#xA;  [5]: https://youtu.be/iM-M74kM1cU?si=gcvvSEUj9Vk1h7dE" ContentLicense="CC BY-SA 4.0" />
  <row Id="40690" PostHistoryTypeId="5" PostId="10207" RevisionGUID="5130e7d2-d8ae-4c10-a89e-1e7d21f46dbe" CreationDate="2023-10-20T13:52:50.150" UserId="234" Comment="There is no `proofTime`, its called `proofSize`" Text="- Our's Environment&#xD;&#xA;  - Use sidecar (v17.0.0)&#xD;&#xA;  - Use Tx-wrapper-core (v7.0.1) https://github.com/paritytech/txwrapper-core&#xD;&#xA;  - Polkadot node v1.0.0&#xD;&#xA;  - Use Westend(testnet) and Polkadot(mainnet)&#xD;&#xA;&#xD;&#xA;Since being updated from weightV1 to weightV2, &#xD;&#xA;&#xD;&#xA;we are looking for proper values of 'refTime' and 'proofSize' for AsMulti transaction.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Recently, a few simple tests have confirmed that the values below are operating normally. (on the Testnet!)&#xD;&#xA;- refTime:  640000000&#xD;&#xA;- proofSize : 13622&#xD;&#xA;&#xD;&#xA;1. Can I keep the above values fixed and continue to use them?&#xD;&#xA;2. Do you have an appropriate value to recommend?&#xD;&#xA;&#xD;&#xA;Our goal is to send transactions without problems even in the worst-case scenario.&#xD;&#xA;&#xD;&#xA;Thank you in advance.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40691" PostHistoryTypeId="4" PostId="10207" RevisionGUID="5130e7d2-d8ae-4c10-a89e-1e7d21f46dbe" CreationDate="2023-10-20T13:52:50.150" UserId="234" Comment="There is no `proofTime`, its called `proofSize`" Text="What are the best refTime and proofSize for making AsMultiTx?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40692" PostHistoryTypeId="2" PostId="10272" RevisionGUID="f36021a6-3183-4bbc-b2e0-f33fd8e19de8" CreationDate="2023-10-20T14:48:20.013" UserId="4314" Text="first of all, sorry for the lack of docs, even though that's not our area I know how frustrating is to turn to the docs for help and not finding anything.&#xD;&#xA;&#xD;&#xA;Now onto your questions:&#xD;&#xA;1. You can use those values as long as the call remains the same, remember that the actual weight varies a little between calls, so be sure to give it a little slack to account for those variations.&#xD;&#xA;2. We don't really recommend anything about the weights, it really depends on the specifics of the call, sorry.&#xD;&#xA; &#xD;&#xA;The best approach is to make some dry runs to estimate an upper bound of the weight of your specific calls and use that, keeping in mind that unused allocated weight would be refunded but at the same time that the weight you state is used to determine block allocation, so if your allocated weight is too little the call fails, but if its too large it could take a lot of time to find a block that will incorporate your call.&#xD;&#xA;&#xD;&#xA;You can refer to this [SE](https://substrate.stackexchange.com/a/10271/4314) answer for more in depth info." ContentLicense="CC BY-SA 4.0" />
  <row Id="40694" PostHistoryTypeId="2" PostId="10273" RevisionGUID="956bd7b2-140e-4fbc-a420-a9d5f0c0d15b" CreationDate="2023-10-20T16:11:25.553" UserId="4081" Text="I'm currently working on upgrading a parachain to use Asynchronous Backing which requires a change in the pallet_timestamp making the MinimumPeriod = 0&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_timestamp::Config for Runtime {&#xD;&#xA;	....&#xD;&#xA;	type MinimumPeriod = ConstU64&lt;0&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This is needed because multiple parachain  blocks can be built on the same relay chain block therefore they will have the same timestamp.&#xD;&#xA;&#xD;&#xA;After applying this change every extrinsic starts failing with a message `Assertion Failed`. Here's an example trying to make a simple transfer&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;This also happens with every other extrinsic.&#xD;&#xA;&#xD;&#xA;Changing `MinimumPeriod` to a value other than 0 fixes the problem but is not a solution since it must be set to that value for async-backing to work properly. &#xD;&#xA;&#xD;&#xA;We also observed that this bug was also present when trying to submit an extrinsic using polkadotJs Api.&#xD;&#xA;&#xD;&#xA;[Linked Github Issue][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1IUgG.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/IcuCc.png&#xD;&#xA;  [3]: https://github.com/polkadot-js/apps/issues/9970" ContentLicense="CC BY-SA 4.0" />
  <row Id="40696" PostHistoryTypeId="1" PostId="10273" RevisionGUID="956bd7b2-140e-4fbc-a420-a9d5f0c0d15b" CreationDate="2023-10-20T16:11:25.553" UserId="4081" Text="`Assertion Failed` error when minimumPeriod is set to 0" ContentLicense="CC BY-SA 4.0" />
  <row Id="40697" PostHistoryTypeId="3" PostId="10273" RevisionGUID="956bd7b2-140e-4fbc-a420-a9d5f0c0d15b" CreationDate="2023-10-20T16:11:25.553" UserId="4081" Text="|polkadot-js|timestamp|async-backing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40698" PostHistoryTypeId="2" PostId="10274" RevisionGUID="dc3f5112-5380-4120-9d34-86a990301bc6" CreationDate="2023-10-20T17:02:30.137" UserId="372" Text="When I build polkadot with `cargo build --release` it builds all the runtimes including Polkadot, Kusama, Rococo, Westend. This is a lot to compile and most of it is not needed.&#xD;&#xA;&#xD;&#xA;In my case, I'm testing a parachain locally, so I only need the rococo runtime. I remember there is a way to compile only that runtime, and I even see the `rococo-native` feature in `sc-cli` but I can't remember how to build the node with only that runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="40700" PostHistoryTypeId="1" PostId="10274" RevisionGUID="dc3f5112-5380-4120-9d34-86a990301bc6" CreationDate="2023-10-20T17:02:30.137" UserId="372" Text="How to compile polkadot node with only rococo runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="40701" PostHistoryTypeId="3" PostId="10274" RevisionGUID="dc3f5112-5380-4120-9d34-86a990301bc6" CreationDate="2023-10-20T17:02:30.137" UserId="372" Text="|polkadot|rococo-local|features|compile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40702" PostHistoryTypeId="2" PostId="10275" RevisionGUID="aa6b2ef9-7efd-4c15-8dab-23f1a2210995" CreationDate="2023-10-20T19:28:08.273" UserId="2055" Text="While working on types between Runtime and Host functions, types going from Runtime to host function requires a PassBy trait bound while types going from Host function to Runtime does not need that trait bound. My guess is that they are directly referencing the WASM memory rather than copying while other way round requires a copying of the type into WASM memory. If so, why not use the Codec's Encode and Decode directly, then?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40704" PostHistoryTypeId="1" PostId="10275" RevisionGUID="aa6b2ef9-7efd-4c15-8dab-23f1a2210995" CreationDate="2023-10-20T19:28:08.273" UserId="2055" Text="What is the usecase of `PassBy` trait bound" ContentLicense="CC BY-SA 4.0" />
  <row Id="40705" PostHistoryTypeId="3" PostId="10275" RevisionGUID="aa6b2ef9-7efd-4c15-8dab-23f1a2210995" CreationDate="2023-10-20T19:28:08.273" UserId="2055" Text="|runtime|wasm|scale-codec|host-functions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40706" PostHistoryTypeId="2" PostId="10276" RevisionGUID="5e010eb0-86cc-448c-bad4-730f87948dd8" CreationDate="2023-10-20T19:37:04.400" UserId="251" Text="I don't think you can do that with the latest code.&#xD;&#xA;&#xD;&#xA;It's a feautre of its dependency.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/76994356fcaeda77a5c21958ef4e2597e1c74b05/polkadot/Cargo.toml#L29&#xD;&#xA;&#xD;&#xA;You can modify the code to remove the `westend-native` then `cargo build --release -p polkadot`." ContentLicense="CC BY-SA 4.0" />
  <row Id="40709" PostHistoryTypeId="2" PostId="10277" RevisionGUID="e895d392-a218-4f1d-9e1a-3179ca388563" CreationDate="2023-10-21T04:29:37.377" UserId="213" Text="In the referenda pallet, type Tracks uses two trait, Get and TracksInfo&#xD;&#xA;&#xD;&#xA;[substrate/frame/referenda/src/lib.rs][1]&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Information concerning the different referendum tracks.&#xD;&#xA;		#[pallet::constant]&#xD;&#xA;		type Tracks: Get&lt;&#xD;&#xA;				Vec&lt;(&#xD;&#xA;					&lt;Self::Tracks as TracksInfo&lt;BalanceOf&lt;Self, I&gt;, BlockNumberFor&lt;Self&gt;&gt;&gt;::Id,&#xD;&#xA;					TrackInfo&lt;BalanceOf&lt;Self, I&gt;, BlockNumberFor&lt;Self&gt;&gt;,&#xD;&#xA;				)&gt;, // Vec contains Id and TrackInfo&#xD;&#xA;			&gt; + TracksInfo&lt;&#xD;&#xA;				BalanceOf&lt;Self, I&gt;,&#xD;&#xA;				BlockNumberFor&lt;Self&gt;,&#xD;&#xA;				RuntimeOrigin = &lt;Self::RuntimeOrigin as OriginTrait&gt;::PalletsOrigin,&#xD;&#xA;			&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;TracksInfo trait functions is accessed as:&#xD;&#xA;```rust&#xD;&#xA;let track = T::Tracks::track_for(&amp;proposal_origin).map_err(|_| Error::&lt;T, I&gt;::NoTrack)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Information on the voting tracks.&#xD;&#xA;pub trait TracksInfo&lt;Balance, Moment&gt; {&#xD;&#xA;	/// The identifier for a track.&#xD;&#xA;	type Id: Copy + Parameter + Ord + PartialOrd + Send + Sync + 'static + MaxEncodedLen;&#xD;&#xA;&#xD;&#xA;	/// The origin type from which a track is implied.&#xD;&#xA;	type RuntimeOrigin;&#xD;&#xA;&#xD;&#xA;	/// Return the array of known tracks and their information.&#xD;&#xA;	fn tracks() -&gt; &amp;'static [(Self::Id, TrackInfo&lt;Balance, Moment&gt;)];&#xD;&#xA;&#xD;&#xA;	///  Determine the voting track for the given `origin`.&#xD;&#xA;	fn track_for(origin: &amp;Self::RuntimeOrigin) -&gt; Result&lt;Self::Id, ()&gt;;&#xD;&#xA;&#xD;&#xA;	/// Return the track info for track `id`, by default this just looks it up in `Self::tracks()`.&#xD;&#xA;	fn info(id: Self::Id) -&gt; Option&lt;&amp;'static TrackInfo&lt;Balance, Moment&gt;&gt; {&#xD;&#xA;		Self::tracks().iter().find(|x| x.0 == id).map(|x| &amp;x.1)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What's the use of Get trait? How its used?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/referenda/src/lib.rs#L226" ContentLicense="CC BY-SA 4.0" />
  <row Id="40711" PostHistoryTypeId="1" PostId="10277" RevisionGUID="e895d392-a218-4f1d-9e1a-3179ca388563" CreationDate="2023-10-21T04:29:37.377" UserId="213" Text="What is the use of Get trait here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40712" PostHistoryTypeId="3" PostId="10277" RevisionGUID="e895d392-a218-4f1d-9e1a-3179ca388563" CreationDate="2023-10-21T04:29:37.377" UserId="213" Text="|pallet|rust|referenda|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40713" PostHistoryTypeId="2" PostId="10278" RevisionGUID="58bd4f1c-aef4-4cbc-9f9c-d78593ac8a5c" CreationDate="2023-10-21T04:51:56.293" UserId="4817" Text="I want to send native enjin token on the enjin relay chain from my wallet to another wallet using a js script. I am using @polkadot/api package.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;import { ApiPromise, WsProvider, Keyring } from '@polkadot/api';&#xD;&#xA;import &quot;dotenv/config&quot;;&#xD;&#xA;&#xD;&#xA;async function main() {&#xD;&#xA;&#xD;&#xA;  const wsProvider = new WsProvider('wss://rpc.relay.blockchain.enjin.io');&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;  const keyring = new Keyring({ type: 'sr25519' })&#xD;&#xA;&#xD;&#xA;  const PHRASE = process.env.PRIVATE_KEY_RELAYCHAIN;&#xD;&#xA;  const newPair = keyring.addFromUri(PHRASE);&#xD;&#xA;&#xD;&#xA;  const unsub = await api.tx.balances&#xD;&#xA;    .transfer('enCxhF3S8ANdQ7dh75yar3ZrXKd9PMDLCHJmvNPSKgm38E5nh', 1)&#xD;&#xA;    .signAndSend(newPair, (result) =&gt; {&#xD;&#xA;      console.log(`Current status is ${result.status}`);&#xD;&#xA;&#xD;&#xA;      if (result.status.isInBlock) {&#xD;&#xA;        console.log(`Transaction included at blockHash ${result.status.asInBlock}`);&#xD;&#xA;      } else if (result.status.isFinalized) {&#xD;&#xA;        console.log(`Transaction finalized at blockHash ${result.status.asFinalized}`);&#xD;&#xA;        unsub();&#xD;&#xA;      }&#xD;&#xA;    });&#xD;&#xA;}&#xD;&#xA;main().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the code snippet coppied mostly from https://polkadot.js.org/docs/api/start/api.tx.subs  &#xD;&#xA;Can someone explain what i am doing wrong and how to go about it." ContentLicense="CC BY-SA 4.0" />
  <row Id="40715" PostHistoryTypeId="1" PostId="10278" RevisionGUID="58bd4f1c-aef4-4cbc-9f9c-d78593ac8a5c" CreationDate="2023-10-21T04:51:56.293" UserId="4817" Text="How to send native tokens from one wallet to another using javascript" ContentLicense="CC BY-SA 4.0" />
  <row Id="40716" PostHistoryTypeId="3" PostId="10278" RevisionGUID="58bd4f1c-aef4-4cbc-9f9c-d78593ac8a5c" CreationDate="2023-10-21T04:51:56.293" UserId="4817" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40717" PostHistoryTypeId="50" PostId="9975" RevisionGUID="77454d10-7704-4a9d-b097-f618c1ae7a17" CreationDate="2023-10-21T05:01:30.173" UserId="-1" />
  <row Id="40718" PostHistoryTypeId="50" PostId="4460" RevisionGUID="469fa8ba-3350-495f-845f-0784434769ac" CreationDate="2023-10-21T06:03:55.493" UserId="-1" />
  <row Id="40719" PostHistoryTypeId="5" PostId="9975" RevisionGUID="a0c716cb-4ac1-4ad6-bf93-8c43315c5781" CreationDate="2023-10-21T06:25:11.047" UserId="234" Comment="Changed title to make it more explicit and some small nits in the body of the question" Text="My goal is to list all balance changes for an account on a Substrate-based chain like Acala.&#xD;&#xA;&#xD;&#xA;I assumed that on Substrate-based chains all incoming and outgoing values to and from an account would be shown in transfers. However, when I list all the transactions for an account and try to calculate the incoming vs outgoing, it doesn't equal the final balance. For example, with this transaction: https://polkaholic.io/tx/0xad1c3b7704c249937333c746430923facf240d5b859f494b41435e3e4f84b291)&#xD;&#xA;&#xD;&#xA;It shows the ACA fund movement, but doesn't show the 38.0228718674 LDOT transferred to `25zCsRMG5kBokWCFaDPuMSYz8nsQX1ZiwHVvfY7bVoJndmhW`. &#xD;&#xA;&#xD;&#xA;I initially thought some events don't show up in transfers - in this case the &quot;Endowed&quot; event. However, in the same transaction you can see an ACA Endowed event is reflected in the transfers.&#xD;&#xA;&#xD;&#xA;Is there a way to determine if a tx type will be included in the transfers? Is there a better way to get the balance changes to an account or some API that provides this data more easily? So far I've only come across Polkaholic and Subscan." ContentLicense="CC BY-SA 4.0" />
  <row Id="40720" PostHistoryTypeId="4" PostId="9975" RevisionGUID="a0c716cb-4ac1-4ad6-bf93-8c43315c5781" CreationDate="2023-10-21T06:25:11.047" UserId="234" Comment="Changed title to make it more explicit and some small nits in the body of the question" Text="List all balance changes of an account on a Substrate-based chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="40724" PostHistoryTypeId="2" PostId="10280" RevisionGUID="1efd7203-8704-43e6-81ac-244f08b807b6" CreationDate="2023-10-21T10:08:26.633" UserId="29" Text="What is exactly the issue? What's the error? My recommendation, try running a local testnet using this zombienet:&#xD;&#xA;- https://docs.substrate.io/test/simulate-parachains&#xD;&#xA;&#xD;&#xA;Then try sending a token from one account to another account. Once you get that to work with the Polkadot/Rococo Relay chain then move to trying it on the Enjin Relay chain.&#xD;&#xA;&#xD;&#xA;Make sure you have sufficient balance.&#xD;&#xA;&#xD;&#xA;Here are some sample snippets that I have used:&#xD;&#xA;```js&#xD;&#xA;// Import the API, Keyring and some utility functions&#xD;&#xA;import { ApiPromise, WsProvider } from &quot;@polkadot/api&quot;&#xD;&#xA;const wsProvider = new WsProvider(&quot;ws://127.0.0.1:9944&quot;);&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;import { Keyring } from '@polkadot/keyring';&#xD;&#xA;&#xD;&#xA;export const simpleTransfer = async () =&gt; {&#xD;&#xA;    const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';&#xD;&#xA;&#xD;&#xA;    // Construct the keyring after the API (crypto has an async init)&#xD;&#xA;    const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;&#xD;&#xA;    // Add Alice to our keyring with a hard-derivation path (empty phrase, so uses dev)&#xD;&#xA;    const alice = keyring.addFromUri('//Alice');&#xD;&#xA;&#xD;&#xA;    // Create a extrinsic, transferring 12345 units to Bob&#xD;&#xA;    const transfer = api.tx.balances.transfer(BOB, 12345);&#xD;&#xA;&#xD;&#xA;    // Sign and send the transaction using our account&#xD;&#xA;    const hash = await transfer.signAndSend(alice);&#xD;&#xA;&#xD;&#xA;    console.log('Transfer sent with hash', hash.toHex());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const wsProvider = new WsProvider(&quot;wss://rococo-statemint-rpc.polkadot.io&quot;);&#xD;&#xA;const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;const mnemonic = &quot;magnet foil stay blue brown core unveil require exotic electric quick judge&quot;&#xD;&#xA;const pair = keyring.addFromUri(mnemonic, { name: 'TEST002' }, 'sr25519');&#xD;&#xA;console.log(keyring.pairs.length, 'pairs available');&#xD;&#xA;console.log(pair.meta.name, 'has address', pair.address);&#xD;&#xA;const receiver = 'GvFpQe1ACuSsMk1jn7RsRLzhYwYt92LLieDnUr1azbFsj9Z'&#xD;&#xA;&#xD;&#xA;export const sendAll = async () =&gt; {&#xD;&#xA;    const transferExtrinsic = api.tx.balances.transfer('5C5555yEXUcmEJ5kkcCMvdZjUo7NGJiQJMS7vZXEeoMhj3VQ', 123456)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Hope that is a start for you to start troubleshooting." ContentLicense="CC BY-SA 4.0" />
  <row Id="40726" PostHistoryTypeId="50" PostId="4970" RevisionGUID="e7e00a61-8111-4ab6-b613-6c72703ef39c" CreationDate="2023-10-21T10:09:11.130" UserId="-1" />
  <row Id="40727" PostHistoryTypeId="2" PostId="10281" RevisionGUID="27749b1c-35b8-4216-a044-7138f5937b48" CreationDate="2023-10-21T16:39:10.190" UserId="4769" Text="Is it possible to add different role to the accounts? I mean some accounts can do more things on the chain than other. How it is possible to do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40729" PostHistoryTypeId="1" PostId="10281" RevisionGUID="27749b1c-35b8-4216-a044-7138f5937b48" CreationDate="2023-10-21T16:39:10.190" UserId="4769" Text="Add roles to accounts" ContentLicense="CC BY-SA 4.0" />
  <row Id="40730" PostHistoryTypeId="3" PostId="10281" RevisionGUID="27749b1c-35b8-4216-a044-7138f5937b48" CreationDate="2023-10-21T16:39:10.190" UserId="4769" Text="|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40731" PostHistoryTypeId="2" PostId="10282" RevisionGUID="b9bd0fe2-b66e-4dfa-97c8-7951813cee1b" CreationDate="2023-10-21T19:18:31.203" UserId="29" Text="If you describe what you're trying to build it may help for me to give you a more concise answer.&#xD;&#xA;&#xD;&#xA;Generally speaking, if you're building a pallet you could have a [`StorageMap`](https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/types/struct.StorageMap.html) in that pallet that holds `role` -&gt; `account`. Just keep in mind that iteration is expensive on blockchains and it is preferred that you abstract the role to a layer higher than the blockchain (if you can).&#xD;&#xA;&#xD;&#xA;Another common pattern in Substrate is to define an `Origin` in your pallet config that have designated permissions e.g. `AdminOrigin` and when you configure your pallet in the runtime, you set the `AdminOrigin`. Example [here](https://github.com/paritytech/polkadot-sdk/blob/a46183c706e300b1993f28278a273153010d2b0c/substrate/bin/node/runtime/src/lib.rs#L447).&#xD;&#xA;&#xD;&#xA;You can also [create custom origins](https://substrate.stackexchange.com/a/1390/29) and do [origin checks](https://www.youtube.com/watch?v=5eg5uUeUdyI&amp;t=1738s).&#xD;&#xA;&#xD;&#xA;Nice video [here](https://www.youtube.com/watch?v=QJ9yuOqwy4s) covering custom origins on [Pallet Collective](https://github.com/paritytech/polkadot-sdk/blob/a46183c706e300b1993f28278a273153010d2b0c/substrate/frame/collective/src/lib.rs#L137-L148).&#xD;&#xA;&#xD;&#xA;Depending on what you're trying to achieve a [`SignedExtension`](https://paritytech.github.io/polkadot-sdk/master/sp_runtime/traits/trait.SignedExtension.html) may be the way to do it." ContentLicense="CC BY-SA 4.0" />
  <row Id="40733" PostHistoryTypeId="2" PostId="10283" RevisionGUID="9f495895-2ed8-4249-9b46-1fa8a6336661" CreationDate="2023-10-21T19:37:57.883" UserId="29" Text="So if you're building a pallet, you could have it update the frame system `data` field in the `AccountInfo`:&#xD;&#xA;```rust&#xD;&#xA;/// Information of an account.&#xD;&#xA;#[derive(Clone, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct AccountInfo&lt;Nonce, AccountData&gt; {&#xD;&#xA;	/// The number of transactions this account has sent.&#xD;&#xA;	pub nonce: Nonce,&#xD;&#xA;	/// The number of other modules that currently depend on this account's existence. The account&#xD;&#xA;	/// cannot be reaped until this is zero.&#xD;&#xA;	pub consumers: RefCount,&#xD;&#xA;	/// The number of other modules that allow this account to exist. The account may not be reaped&#xD;&#xA;	/// until this and `sufficients` are both zero.&#xD;&#xA;	pub providers: RefCount,&#xD;&#xA;	/// The number of modules that allow this account to exist for their own purposes only. The&#xD;&#xA;	/// account may not be reaped until this and `providers` are both zero.&#xD;&#xA;	pub sufficients: RefCount,&#xD;&#xA;	/// The additional data that belongs to this account. Used to store the balance(s) in a lot of&#xD;&#xA;	/// chains.&#xD;&#xA;	pub data: AccountData,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot-sdk/blob/a46183c706e300b1993f28278a273153010d2b0c/substrate/frame/system/src/lib.rs#L751-L768&#xD;&#xA;&#xD;&#xA;An example of a pallet that does this is pallet balances:&#xD;&#xA;```rust&#xD;&#xA;type AccountStore: StoredMap&lt;Self::AccountId, AccountData&lt;Self::Balance&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot-sdk/blob/a46183c706e300b1993f28278a273153010d2b0c/substrate/frame/balances/src/lib.rs#L295&#xD;&#xA;&#xD;&#xA;That is why when you look up an account on PolkadotJs Apps you will see the account balance information there as well.&#xD;&#xA;&#xD;&#xA;If you're looking to add roles take a look at this post:&#xD;&#xA;- https://substrate.stackexchange.com/questions/10281/add-roles-to-accounts" ContentLicense="CC BY-SA 4.0" />
  <row Id="40735" PostHistoryTypeId="2" PostId="10284" RevisionGUID="4c2384d9-7365-4172-a3db-4d13885a8b61" CreationDate="2023-10-21T19:42:00.873" UserId="251" Text="There are many ways to achieve this. Burno has mentioned one.&#xD;&#xA;&#xD;&#xA;You can even do this without defining an origin.&#xD;&#xA;&#xD;&#xA;For example, the pallet-staking: after calling `bond()`, you become a staker. If you call `validate()` afterwards, you become a validator. And if you call `nominate()` after that, you become a nominator.&#xD;&#xA;&#xD;&#xA;Furthermore, you can check the pallet-identity's code. Once you become a identity registration merchant, you have the ability to authorize other accounts.&#xD;&#xA;&#xD;&#xA;Basically, all you need to do is define a storage for storing those special accounts. Once a user makes a certain call, you can check if they are in the storage. If yes, then perform the desired action; if no, return an error indicating insufficient privileges.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40737" PostHistoryTypeId="5" PostId="10282" RevisionGUID="a38a2ba4-0681-4279-bcad-ec3bd6201a45" CreationDate="2023-10-21T22:40:42.300" UserId="29" Comment="added 20 characters in body" Text="If you describe what you're trying to build it may help for me to give you a more concise answer.&#xD;&#xA;&#xD;&#xA;Generally speaking, if you're building a pallet you could have a [`StorageMap`](https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/types/struct.StorageMap.html) in that pallet that holds `role` -&gt; `account`. Just keep in mind that storage and storage iteration is expensive on blockchains and it is preferred that you abstract the role to a layer higher than the blockchain (if you can).&#xD;&#xA;&#xD;&#xA;Another common pattern in Substrate is to define an `Origin` in your pallet config that have designated permissions e.g. `AdminOrigin` and when you configure your pallet in the runtime, you set the `AdminOrigin`. Example [here](https://github.com/paritytech/polkadot-sdk/blob/a46183c706e300b1993f28278a273153010d2b0c/substrate/bin/node/runtime/src/lib.rs#L447).&#xD;&#xA;&#xD;&#xA;You can also [create custom origins](https://substrate.stackexchange.com/a/1390/29) and do [origin checks](https://www.youtube.com/watch?v=5eg5uUeUdyI&amp;t=1738s).&#xD;&#xA;&#xD;&#xA;Nice video [here](https://www.youtube.com/watch?v=QJ9yuOqwy4s) covering custom origins on [Pallet Collective](https://github.com/paritytech/polkadot-sdk/blob/a46183c706e300b1993f28278a273153010d2b0c/substrate/frame/collective/src/lib.rs#L137-L148).&#xD;&#xA;&#xD;&#xA;Depending on what you're trying to achieve a [`SignedExtension`](https://paritytech.github.io/polkadot-sdk/master/sp_runtime/traits/trait.SignedExtension.html) may be the way to do it." ContentLicense="CC BY-SA 4.0" />
  <row Id="40745" PostHistoryTypeId="2" PostId="10287" RevisionGUID="9c155760-6054-44d0-8519-8cbd79e1d778" CreationDate="2023-10-22T07:35:56.210" UserId="445" Text="Import:&#xD;&#xA;&#xD;&#xA;`use frame_system::pallet_prelude::BlockNumberFor;`&#xD;&#xA;&#xD;&#xA;How to fix:&#xD;&#xA;&#xD;&#xA;Change `T::BlockNumber` to `BlockNumberFor&lt;T&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="40747" PostHistoryTypeId="52" PostId="10281" RevisionGUID="fe63cb06-5f78-4c70-87bd-9452c5aec03a" CreationDate="2023-10-22T07:38:26.550" />
  <row Id="40748" PostHistoryTypeId="52" PostId="10281" RevisionGUID="e81c89e9-798e-468c-a469-c4265a592868" CreationDate="2023-10-22T07:38:26.550" />
  <row Id="40749" PostHistoryTypeId="52" PostId="10281" RevisionGUID="a668e149-eac9-4705-9cda-d1c56b61adc4" CreationDate="2023-10-22T07:38:29.897" />
  <row Id="40750" PostHistoryTypeId="52" PostId="10281" RevisionGUID="044543cb-0c5e-4651-9ef2-7fc4b5c7f48a" CreationDate="2023-10-22T07:38:28.220" />
  <row Id="40751" PostHistoryTypeId="52" PostId="10281" RevisionGUID="3244ec35-b3f8-4b14-a393-345934556746" CreationDate="2023-10-22T07:38:26.550" />
  <row Id="40752" PostHistoryTypeId="50" PostId="9915" RevisionGUID="d6c5b4c7-9e55-44a1-a4b4-05ecdd0624d0" CreationDate="2023-10-22T09:08:51.057" UserId="-1" />
  <row Id="40753" PostHistoryTypeId="50" PostId="10009" RevisionGUID="acf034f2-6196-444c-9f19-41a4855abad7" CreationDate="2023-10-22T20:00:50.093" UserId="-1" />
  <row Id="40754" PostHistoryTypeId="2" PostId="10288" RevisionGUID="ae41adab-1412-4801-84c6-914f937e7e83" CreationDate="2023-10-23T02:41:35.960" UserId="251" Text="I currently find it useless. `TracksInfo` could offer more detailed data. `TracksInfo::tracks` could replace the `Get::get` here.&#xD;&#xA;&#xD;&#xA;Moreover, I searched several repositories but found no instances where `Get` was used for any special cases.&#xD;&#xA;&#xD;&#xA;I believe this could be a &quot;mistake&quot; made during the development process." ContentLicense="CC BY-SA 4.0" />
  <row Id="40756" PostHistoryTypeId="2" PostId="10289" RevisionGUID="b30d2ae6-f6eb-4d88-b81a-6bfc3cca0820" CreationDate="2023-10-23T03:17:25.853" UserId="372" Text="I would like to investigate and debug the way my parachain runtime's `validate_block` function is executing. As a first attempt I've [placed some log lines](https://github.com/Off-Narrative-Labs/Tuxedo/blob/10d075192c0faeb017873be2ed99c70936dc5d55/tuxedo-core/src/validate_block/implementation.rs#L86) in my `validate_block` implementation.&#xD;&#xA;&#xD;&#xA;The `validate_block` function is part of the parachain protocol and not the normal Substrate block execution flow. It is only run by the relay chain validators, not the collators. So I would only expect to see my logs appearing on the validator nodes. But **the validators do not print the logs in the parachain runtime**.&#xD;&#xA;&#xD;&#xA;It occurs to me that in production a validator would not want to see logs from any random parachain runtime, so I wouldn't be surprised if this is suppressed. **Is there any way to make the validator node print the parachain runtime's log messages?**&#xD;&#xA;&#xD;&#xA;I'm looking for solutions at any level of complexity from adding cli flags (which would be ideal) to hacking Polkadot to expose the necessary host functions." ContentLicense="CC BY-SA 4.0" />
  <row Id="40758" PostHistoryTypeId="1" PostId="10289" RevisionGUID="b30d2ae6-f6eb-4d88-b81a-6bfc3cca0820" CreationDate="2023-10-23T03:17:25.853" UserId="372" Text="How to log from parachain's validate_block function" ContentLicense="CC BY-SA 4.0" />
  <row Id="40759" PostHistoryTypeId="3" PostId="10289" RevisionGUID="b30d2ae6-f6eb-4d88-b81a-6bfc3cca0820" CreationDate="2023-10-23T03:17:25.853" UserId="372" Text="|parachain|debugging|logging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40760" PostHistoryTypeId="2" PostId="10290" RevisionGUID="7ca9c3a8-e81d-4d67-93b4-765c106af9c3" CreationDate="2023-10-23T03:52:47.130" UserId="372" Text="I'm running a local network based on rococo-local with two relay chain validators and a single collator on parachain 2000. I've set up the network according to the tutorial [Part 1 relay chain](https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/) and [Part 2 parachain](https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/).&#xD;&#xA;&#xD;&#xA;Almost everything is normal. The relay chain is live, the registration succeeds, and the collator starts authoring at the correct time. However, the collator just authors sibling blocks at height 1 repeatedly. It never gets a new best and there is no evidence that the relay chain validators have seen the parachain blocks.&#xD;&#xA;&#xD;&#xA;**How can I diagnose whether the validators have seen the block at all?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="40762" PostHistoryTypeId="1" PostId="10290" RevisionGUID="7ca9c3a8-e81d-4d67-93b4-765c106af9c3" CreationDate="2023-10-23T03:52:47.130" UserId="372" Text="Did validators reject my parachain candidate or not recieve it at all?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40763" PostHistoryTypeId="3" PostId="10290" RevisionGUID="7ca9c3a8-e81d-4d67-93b4-765c106af9c3" CreationDate="2023-10-23T03:52:47.130" UserId="372" Text="|parachain-collator|rococo-local|inclusion|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40764" PostHistoryTypeId="2" PostId="10291" RevisionGUID="a21a3d49-56bf-4d54-bdae-bf42fbb2c451" CreationDate="2023-10-23T06:31:20.427" UserId="4823" Text="I wanted to know the complete process of joining polkadot builders as infrastructure provider but could not get a proper guide explaining that. Can someone please tell the process and what happens in each step of the process. &#xD;&#xA;I have read the substrate web page of SBP but it does not tell the process in detail and just gives a overview of it. &#xD;&#xA;Requesting other teams that have successfully joined or graduated substrate builders program to help me out.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="40766" PostHistoryTypeId="1" PostId="10291" RevisionGUID="a21a3d49-56bf-4d54-bdae-bf42fbb2c451" CreationDate="2023-10-23T06:31:20.427" UserId="4823" Text="How to join substrate as infrastructure provider" ContentLicense="CC BY-SA 4.0" />
  <row Id="40767" PostHistoryTypeId="3" PostId="10291" RevisionGUID="a21a3d49-56bf-4d54-bdae-bf42fbb2c451" CreationDate="2023-10-23T06:31:20.427" UserId="4823" Text="|substrate-node-template|parachain|nodes|rpc-server|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40768" PostHistoryTypeId="2" PostId="10292" RevisionGUID="1cffa082-7bef-4ca9-90d5-c153c5a12186" CreationDate="2023-10-23T06:43:41.430" UserId="4824" Text="If my contracts which are deployed on moonbeam wants to interact with contracts deployed on acala (or) astar (or) any other parachain under polkadot hub, Is it possible to acheive it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40770" PostHistoryTypeId="1" PostId="10292" RevisionGUID="1cffa082-7bef-4ca9-90d5-c153c5a12186" CreationDate="2023-10-23T06:43:41.430" UserId="4824" Text="Can we access XCMp functions by writing moonbeam smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40771" PostHistoryTypeId="3" PostId="10292" RevisionGUID="1cffa082-7bef-4ca9-90d5-c153c5a12186" CreationDate="2023-10-23T06:43:41.430" UserId="4824" Text="|moonbeam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40772" PostHistoryTypeId="2" PostId="10293" RevisionGUID="bba913cb-36ea-435b-a12e-d402b5384ba8" CreationDate="2023-10-23T06:52:49.187" UserId="4623" Text="How to add pallet contract for polkadot-v1.0.0? Do I only need to change the `node/runtime` folder or the `runtime` folder at root or both? " ContentLicense="CC BY-SA 4.0" />
  <row Id="40774" PostHistoryTypeId="1" PostId="10293" RevisionGUID="bba913cb-36ea-435b-a12e-d402b5384ba8" CreationDate="2023-10-23T06:52:49.187" UserId="4623" Text="How to add pallet contract for polkadot-v1.0.0?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40775" PostHistoryTypeId="3" PostId="10293" RevisionGUID="bba913cb-36ea-435b-a12e-d402b5384ba8" CreationDate="2023-10-23T06:52:49.187" UserId="4623" Text="|pallet|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40776" PostHistoryTypeId="2" PostId="10294" RevisionGUID="c40b7fa0-b9b2-4145-b56e-903bda006b03" CreationDate="2023-10-23T07:01:42.457" UserId="3285" Text="I believe you can use Moonbeam's parachain-staking pallet for DPOS just by reading the pallet's README. You could also consider FRAME's [Staking pallet][1], which is generic over the underlying election algorithm. You'd need to implement your own [election provider](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/staking/src/pallet/mod.rs#L120) to return an election result that is calculated using DPOS.&#xD;&#xA;&#xD;&#xA;FRAME's Staking pallet is non trivial though, so keep that in mind.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="40778" PostHistoryTypeId="2" PostId="10295" RevisionGUID="4171b3a6-5cb8-4a59-b684-b62279b7edb9" CreationDate="2023-10-23T08:50:31.020" UserId="3933" Text="A computed origin might be a lot of things, such as accounts on sibling parachains or even multisigs or other entities.&#xD;&#xA;Each of these computed origins needs to have a way to derive a sovereign account for use in a foreign chain.&#xD;&#xA;As we come up with more use cases where it's beneficial a particular entity (for example a collective voice or majority) can have a sovereign account then we can add more derivations with [`HashedDescription`](https://github.com/paritytech/polkadot-sdk/blob/e2b21d00c7856961ab3b692b2e2798747af1e819/polkadot/xcm/xcm-builder/src/location_conversion.rs#L146C2-L146C2).&#xD;&#xA;&#xD;&#xA;Right now, accounts on other chains do not have sovereign accounts on the relays or system parachains.&#xD;&#xA;There is a [PR](https://github.com/polkadot-fellows/runtimes/pull/67) however that adds `HashedDescription&lt;AccountId, DescribeFamily&lt;DescribeAllTerminal&gt;&gt;` to the runtimes.&#xD;&#xA;This would allow almost many computed origins to have sovereign accounts, like accounts, pallets, treasuries on sibling chains, for example.&#xD;&#xA;It's still an open question whether that will go in the relay, since the goal is to move all the functionality to system parachains. The answer depends on how fast we can make the move and how necessary this ability is." ContentLicense="CC BY-SA 4.0" />
  <row Id="40780" PostHistoryTypeId="2" PostId="10296" RevisionGUID="1416477d-8ade-4129-b57f-fe871ecdd969" CreationDate="2023-10-23T09:07:23.673" UserId="29" Text="My advice, start with a fully functioning Substrate node that is at `1.0.0`.&#xD;&#xA;&#xD;&#xA;Once you have a fully functioning `1.0.0` node then add pallet contracts.&#xD;&#xA;&#xD;&#xA;You can use the kitchensink node as a reference:&#xD;&#xA;- https://github.com/paritytech/polkadot-sdk/blob/e2b21d00c7856961ab3b692b2e2798747af1e819/substrate/bin/node/runtime/src/lib.rs#L1307-L1350&#xD;&#xA;&#xD;&#xA;If you run into issues there then open a Stack Exchange question with the specific problem and how to replicate it so the community can help you." ContentLicense="CC BY-SA 4.0" />
  <row Id="40782" PostHistoryTypeId="2" PostId="10297" RevisionGUID="dadd439b-9948-48de-b21d-7b798f4de11d" CreationDate="2023-10-23T09:07:52.617" UserId="427" Text="Use [this][1] for reference. It is a substrate-contracts-node template which is being updated regularly with the polkadot-versions. &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="40784" PostHistoryTypeId="2" PostId="10298" RevisionGUID="1baabd10-bc2b-4600-8509-3009c6a98e8a" CreationDate="2023-10-23T09:10:26.487" UserId="707" Text="Currently not sure if I missed something here, but I'm expecting `TxIndex` in the `inblock` and `finalized` updates of the extrinsic, but it seems to be missing.&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;&quot;&#xD;&#xA;    &quot;method&quot;: &quot;author_extrinsicUpdate&quot;&quot;&#xD;&#xA;    &quot;params&quot;: {&#xD;&#xA;      &quot;subscription&quot;: &quot;BThmgFpwWuKESjPy&quot;,&#xD;&#xA;      &quot;result&quot;: {&#xD;&#xA;        &quot;finalized&quot;: &quot;0xa5276e980b57003a924c52adaf8ee6f3711228d085a63d1212c93648e5ae5dc5&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;In substrate, it has the value `TxIndex`, so I'm currently unsure, why it is not in, or if I gets lost in an underlying layer.&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]&#xD;&#xA;    #[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;    pub enum TransactionStatus&lt;Hash, BlockHash&gt; {&#xD;&#xA;    	...&#xD;&#xA;    	/// Transaction has been finalized by a finality-gadget, e.g GRANDPA.&#xD;&#xA;    	#[serde(with = &quot;v1_compatible&quot;)]&#xD;&#xA;    	Finalized((BlockHash, TxIndex)),&#xD;&#xA;        ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Is it supposed to be in the **author_extrinsicUpdate**? If, not what would be the fastest way to get the information of the TxIndex? &#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="40786" PostHistoryTypeId="1" PostId="10298" RevisionGUID="1baabd10-bc2b-4600-8509-3009c6a98e8a" CreationDate="2023-10-23T09:10:26.487" UserId="707" Text="RPC author_extrinsicUpdate, missing TxIndex" ContentLicense="CC BY-SA 4.0" />
  <row Id="40787" PostHistoryTypeId="3" PostId="10298" RevisionGUID="1baabd10-bc2b-4600-8509-3009c6a98e8a" CreationDate="2023-10-23T09:10:26.487" UserId="707" Text="|json-rpc|extrinsicstatus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40788" PostHistoryTypeId="2" PostId="10299" RevisionGUID="e47e90b0-ba98-4d97-903b-17f70b2c1e49" CreationDate="2023-10-23T09:24:23.607" UserId="4623" Text="I am building a solo chain from [Substrate node template][1], I have made some changes to switch from PoA to PoS just like [this repo][2]. Now, I am trying to add `pallet-contracts` on the runtime. I added the following in the `Cargo.toml` file:&#xD;&#xA;```&#xD;&#xA;pallet-contracts = { version = &quot;23.0.0&quot;, package = &quot;pallet-contracts&quot;, default-features = false }&#xD;&#xA;pallet-contracts-primitives = { version = &quot;27.0.0&quot;, package = &quot;pallet-contracts-primitives&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    ...,&#xD;&#xA;    &quot;pallet-contracts/std&quot;,&#xD;&#xA;	&quot;pallet-contracts-primitives/std&quot;,&#xD;&#xA;&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Now when I try to implement the Config trait for the Contracts pallet I add the following code:&#xD;&#xA;```&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	/// The safest default is to allow no calls at all.&#xD;&#xA;	///&#xD;&#xA;	/// Runtimes should whitelist dispatchables that are allowed to be called from contracts&#xD;&#xA;	/// and make sure they are stable. Dispatchables exposed to contracts are not allowed to&#xD;&#xA;	/// change because that would break already deployed contracts. The `Call` structure itself&#xD;&#xA;	/// is not allowed to change the indices of existing pallets, too.&#xD;&#xA;	type CallFilter = Nothing;&#xD;&#xA;	type DepositPerItem = DepositPerItem;&#xD;&#xA;	type DepositPerByte = DepositPerByte;&#xD;&#xA;	type DefaultDepositLimit = DefaultDepositLimit;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 5];&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 123 * 1024 }&gt;;&#xD;&#xA;	type MaxStorageKeyLen = ConstU32&lt;128&gt;;&#xD;&#xA;	type UnsafeUnstableInterface = ConstBool&lt;false&gt;;&#xD;&#xA;	type MaxDebugBufferLen = ConstU32&lt;{ 2 * 1024 * 1024 }&gt;;&#xD;&#xA;	type RuntimeHoldReason = RuntimeHoldReason;&#xD;&#xA;	#[cfg(not(feature = &quot;runtime-benchmarks&quot;))]&#xD;&#xA;	type Migrations = ();&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	type Migrations = pallet_contracts::migration::codegen::BenchMigrations;&#xD;&#xA;	type MaxDelegateDependencies = ConstU32&lt;32&gt;;&#xD;&#xA;	type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent;&#xD;&#xA;	type Debug = ();&#xD;&#xA;	type Environment = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;But adding this code gave me this error (among others), which I am not sure why it happens:&#xD;&#xA;```&#xD;&#xA; error[E0152]: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `node_template_runtime` depends on)&#xD;&#xA;    = note: first definition in `sp_io` loaded from /Users/macbookpro/Desktop/MainGitReposBlockchain/Devolved_AI_Blockchain/NodeMainTemplate/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-2d4b947295faf0f7.rmeta&#xD;&#xA;    = note: second definition in `sp_io` loaded from /Users/macbookpro/Desktop/MainGitReposBlockchain/Devolved_AI_Blockchain/NodeMainTemplate/target/release/wbuild/node-template-runtime/target/wasm32-unknown-unknown/release/deps/libsp_io-6ce5327a26e230a7.rmeta&#xD;&#xA;```&#xD;&#xA;How do I resolve this error?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [2]: https://github.com/Aideepakchaudhary/POA-to-POS" ContentLicense="CC BY-SA 4.0" />
  <row Id="40790" PostHistoryTypeId="1" PostId="10299" RevisionGUID="e47e90b0-ba98-4d97-903b-17f70b2c1e49" CreationDate="2023-10-23T09:24:23.607" UserId="4623" Text="Error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `panic_impl`" ContentLicense="CC BY-SA 4.0" />
  <row Id="40791" PostHistoryTypeId="3" PostId="10299" RevisionGUID="e47e90b0-ba98-4d97-903b-17f70b2c1e49" CreationDate="2023-10-23T09:24:23.607" UserId="4623" Text="|pallet|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40792" PostHistoryTypeId="4" PostId="10273" RevisionGUID="55cd616d-5a24-4fd0-980b-2e8610aba8b2" CreationDate="2023-10-23T12:08:19.217" UserId="4081" Comment="edited title" Text="Assertion Failed error when minimumPeriod is set to 0" ContentLicense="CC BY-SA 4.0" />
  <row Id="40793" PostHistoryTypeId="2" PostId="10300" RevisionGUID="5dea67cd-4f60-4366-b9a6-889854f2516e" CreationDate="2023-10-23T13:03:37.813" UserId="2909" Text="it's great you are interested in the Substrate Builders program. How the program works is that you submit your interest and expect to be connected with a member of the program team to understand more about your project and the level of development completed so far. Traditionally, the program focuses on strong teams that are far along the journey with a prototype and is looking to productionize their prototype.&#xD;&#xA;&#xD;&#xA;That being said, the programs are reconfiguring as we speak, we are rapidly changing the programs available to make it more community-led and self-service. So best to stay tuned to the updates." ContentLicense="CC BY-SA 4.0" />
  <row Id="40795" PostHistoryTypeId="5" PostId="10300" RevisionGUID="1d7cc0be-5942-4a12-982b-76decd47eadc" CreationDate="2023-10-23T14:22:14.620" UserId="2909" Comment="edited body" Text="It's great you are interested in the Substrate Builders program. How the program works is that you submit your interest and expect to be connected with a member of the program team to understand more about your project and the level of development completed so far. Traditionally, the program focuses on strong teams that are far along the journey with a prototype and is looking to productionize their prototype.&#xD;&#xA;&#xD;&#xA;That being said, the programs are reconfiguring as we speak, we are rapidly changing the programs available to make it more community-led and self-service. So best to stay tuned to the updates." ContentLicense="CC BY-SA 4.0" />
  <row Id="40796" PostHistoryTypeId="2" PostId="10301" RevisionGUID="43cd272b-6c42-44ca-8282-6bc61c2fd53e" CreationDate="2023-10-23T14:31:06.387" UserId="2762" Text="&#xD;&#xA;I believe what you are trying to achieve has to be done in the application layer. `self.env().transferred_value()` only returns the transferred value the user has set.&#xD;&#xA;&#xD;&#xA;In the Smart Contract what you can do is check that the amount the user is transferring is equal to the hardcoded value you have and throw an error if is less:&#xD;&#xA;```rs&#xD;&#xA;let transfered_value = Self::env().transferred_value();&#xD;&#xA;assert!(transfered_value &lt; your_hardcoded_value, &quot;insufficient amount!&quot;);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40798" PostHistoryTypeId="2" PostId="10302" RevisionGUID="26ce09e4-5be0-4156-b184-d828021b6e68" CreationDate="2023-10-23T14:53:37.013" UserId="2762" Text="The metadata schema is encoded using the SCALE codec library and this encoding is done automatically for you when you compile a node (by using the scale-info crate). So you have to compile the node.&#xD;&#xA;&#xD;&#xA;See all the detail information on how to retrieve the metadata in the Substrate Documentation: [Application development][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/application-development/" ContentLicense="CC BY-SA 4.0" />
  <row Id="40800" PostHistoryTypeId="2" PostId="10303" RevisionGUID="3fd2d211-30cd-49a8-8c25-c760bce409f9" CreationDate="2023-10-23T15:28:07.240" UserId="445" Text="How to auto-execute smart contract based on certain conditions ? &#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;&#xD;&#xA;The contract period has exceeded the deadline -&gt; auto-execute `pay` without interfering from user " ContentLicense="CC BY-SA 4.0" />
  <row Id="40802" PostHistoryTypeId="1" PostId="10303" RevisionGUID="3fd2d211-30cd-49a8-8c25-c760bce409f9" CreationDate="2023-10-23T15:28:07.240" UserId="445" Text="is there any ways to automatically trigger ink smart contract based on certain conditions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40803" PostHistoryTypeId="3" PostId="10303" RevisionGUID="3fd2d211-30cd-49a8-8c25-c760bce409f9" CreationDate="2023-10-23T15:28:07.240" UserId="445" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40804" PostHistoryTypeId="2" PostId="10304" RevisionGUID="c1387311-1387-4dbd-a3a6-e4bfbd8863e8" CreationDate="2023-10-23T15:32:00.300" UserId="445" Text="Import pallet-contract in `runtime/Cargo.toml` ( should be the same branch) &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-contracts = {git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot;, default-features = false }&#xD;&#xA;pallet-contracts-primitives = { git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot;, default-features = false }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Remember that you should add `std` features:&#xD;&#xA;&#xD;&#xA;https://github.com/Aideepakchaudhary/proof-of-stake-node-template/blob/main/runtime/Cargo.toml#L76&#xD;&#xA;&#xD;&#xA;`pallet-contracts/std`&#xD;&#xA;&#xD;&#xA;`pallet-contracts-primitives/std`&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40806" PostHistoryTypeId="5" PostId="10304" RevisionGUID="6fef770a-d99e-4aac-944a-f9504db3a2c3" CreationDate="2023-10-23T15:42:47.833" UserId="445" Comment="added 102 characters in body" Text="Import pallet-contract in `runtime/Cargo.toml` ( should be the same branch) &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-contracts = {git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot;, default-features = false }&#xD;&#xA;pallet-contracts-primitives = { git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot;, default-features = false }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Remember that you should add `std` features:&#xD;&#xA;&#xD;&#xA;https://github.com/Aideepakchaudhary/proof-of-stake-node-template/blob/main/runtime/Cargo.toml#L76&#xD;&#xA;&#xD;&#xA;`pallet-contracts/std`&#xD;&#xA;&#xD;&#xA;`pallet-contracts-primitives/std`&#xD;&#xA;&#xD;&#xA;You can check this reference:&#xD;&#xA;&#xD;&#xA;https://github.com/truongngoctan91/add_pallet_contracts/tree/main&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40807" PostHistoryTypeId="52" PostId="10293" RevisionGUID="66c80f54-3a07-410a-ac3d-be091a53aee3" CreationDate="2023-10-23T17:08:50.953" />
  <row Id="40808" PostHistoryTypeId="2" PostId="10305" RevisionGUID="83b5ad51-6214-46ba-b19c-a46010ac72e2" CreationDate="2023-10-23T17:18:03.780" UserId="554" Text="In our solochain currently our chain using POA. Now we want to update the consensus to Delegated Proof of Stake(with AURA).&#xD;&#xA;Do we have any reference or suggestion for that implementation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40810" PostHistoryTypeId="1" PostId="10305" RevisionGUID="83b5ad51-6214-46ba-b19c-a46010ac72e2" CreationDate="2023-10-23T17:18:03.780" UserId="554" Text="Do we have any reference of solochain using DPOS consensus?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40811" PostHistoryTypeId="3" PostId="10305" RevisionGUID="83b5ad51-6214-46ba-b19c-a46010ac72e2" CreationDate="2023-10-23T17:18:03.780" UserId="554" Text="|consensus|aura|proof-of-stake|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40812" PostHistoryTypeId="2" PostId="10306" RevisionGUID="324e4429-b0b4-480a-84f4-61f4a86528ae" CreationDate="2023-10-24T04:17:00.007" UserId="29" Text="There are a few chains in our ecosystem using DPoS. You can start here:&#xD;&#xA;- https://medium.com/kilt-protocol/the-continuing-evolution-of-kilt-protocol-limited-delegated-proof-of-stake-640403427c48&#xD;&#xA;- https://github.com/KILTprotocol/kilt-node/blob/8fe2c4de746bfee57154e0b970b39f860c75b769/runtimes/spiritnet/src/lib.rs#L909-L911&#xD;&#xA;- https://github.com/KILTprotocol/kilt-node/tree/develop/pallets/parachain-staking&#xD;&#xA;- https://github.com/moonbeam-foundation/moonbeam/tree/master/pallets/parachain-staking&#xD;&#xA;- https://github.com/NodleCode/chain/pull/585/files" ContentLicense="CC BY-SA 4.0" />
  <row Id="40814" PostHistoryTypeId="5" PostId="10306" RevisionGUID="b1906b61-5132-4914-bf62-0526ad137dc4" CreationDate="2023-10-24T04:35:37.050" UserId="29" Comment="added 89 characters in body" Text="There are a few chains in our ecosystem using DPoS. You can start here:&#xD;&#xA; - https://medium.com/kilt-protocol/the-continuing-evolution-of-kilt-protocol-limited-delegated-proof-of-stake-640403427c48&#xD;&#xA; - https://github.com/KILTprotocol/kilt-node/blob/8fe2c4de746bfee57154e0b970b39f860c75b769/runtimes/spiritnet/src/lib.rs#L909-L911&#xD;&#xA; - https://github.com/KILTprotocol/kilt-node/tree/develop/pallets/parachain-staking&#xD;&#xA; - https://github.com/moonbeam-foundation/moonbeam/tree/master/pallets/parachain-staking&#xD;&#xA; - https://github.com/NodleCode/chain/pull/585/files&#xD;&#xA;&#xD;&#xA;Granted, these are not &quot;solo&quot; chains but may be a good start for you to explore." ContentLicense="CC BY-SA 4.0" />
  <row Id="40815" PostHistoryTypeId="2" PostId="10307" RevisionGUID="54d8828e-652b-4508-b114-9526dbe84967" CreationDate="2023-10-24T06:24:33.630" UserId="707" Text="Okay, I currently switched to use the new JSON-RPC which delivered the information [NEW JSON-RPC Specification][1], it doesn't exactly answer the question, but it removes the need to know it.&#xD;&#xA;&#xD;&#xA;Here is the answer for the block, of `TransactionEvent` in this case involving the `TxIndex`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/json-rpc-interface-spec/api/transaction_unstable_submitAndWatch.html&#xD;&#xA;  [2]: https://i.stack.imgur.com/x9zwP.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40817" PostHistoryTypeId="2" PostId="10308" RevisionGUID="d6d96496-8e20-4bad-a3d5-382e4a1a9adb" CreationDate="2023-10-24T07:14:01.950" UserId="2762" Text="You can query the storage `slots -&gt; leases (your_para_id)`, you will get a list. The first item in the list is the amount locked for the current `Lease Period`, the following items are for the subsequent lease periods.&#xD;&#xA;&#xD;&#xA;So you can take then take the size of that list, and increment from the current leasePeriodIndex to get the leases.&#xD;&#xA;To translate this information in the number of blocks you have to retrieve the storage constants `slots -&gt; leasePeriod`, which is the number of blocks over which a single period lasts. And `slots -&gt; leaseOffset`, which is the number of blocks to offset each lease period by.&#xD;&#xA;See more information about that in [How to compute the starting and ending of a lease period?][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/74/how-to-compute-the-starting-and-ending-of-a-lease-period" ContentLicense="CC BY-SA 4.0" />
  <row Id="40819" PostHistoryTypeId="2" PostId="10309" RevisionGUID="3f71de18-3694-46b0-b7ea-2133378aa6ef" CreationDate="2023-10-24T11:25:44.243" UserId="3123" Text="I am trying to use core crypto types instead of runtime types (because I know they are the same):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(&#xD;&#xA;	runtime_metadata_path = &quot;metadata.scale&quot;,&#xD;&#xA;	derive_for_all_types = &quot;Debug&quot;&#xD;&#xA;)]&#xD;&#xA;pub mod runtime {&#xD;&#xA;	#[subxt(substitute_type = &quot;spcore::sr25519::Signature&quot;)]&#xD;&#xA;	use crate::runtime::runtime_types::sp_core::sr25519::Signature;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but the compiler complains: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;expected `runtime_types::sp_core::sr25519::Signature`, found `sp_core::sr25519::Signature`&#xD;&#xA;note: `sp_core::sr25519::Signature` and `runtime_types::sp_core::sr25519::Signature` have similar names, but are actually distinct types&#xD;&#xA;`sp_core::sr25519::Signature` is defined in crate `sp_core`&#xD;&#xA;`runtime_types::sp_core::sr25519::Signature` is defined in the current crate&#xD;&#xA;/ #[subxt::subxt( /* ... */ )]&#xD;&#xA;|____________________________^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How should the type substitution work? Or do I have to implement type conversion?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40821" PostHistoryTypeId="1" PostId="10309" RevisionGUID="3f71de18-3694-46b0-b7ea-2133378aa6ef" CreationDate="2023-10-24T11:25:44.243" UserId="3123" Text="How to use core crypto types instead of runtime types?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40822" PostHistoryTypeId="3" PostId="10309" RevisionGUID="3f71de18-3694-46b0-b7ea-2133378aa6ef" CreationDate="2023-10-24T11:25:44.243" UserId="3123" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40823" PostHistoryTypeId="5" PostId="10309" RevisionGUID="f9068223-db20-4a27-99a1-41550443fb3b" CreationDate="2023-10-24T11:32:57.790" UserId="3123" Comment="typo" Text="I am trying to use core crypto types instead of runtime types (because I know they are the same):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(&#xD;&#xA;	runtime_metadata_path = &quot;metadata.scale&quot;,&#xD;&#xA;	derive_for_all_types = &quot;Debug&quot;&#xD;&#xA;)]&#xD;&#xA;pub mod runtime {&#xD;&#xA;	#[subxt(substitute_type = &quot;sp_core::sr25519::Signature&quot;)]&#xD;&#xA;	use crate::runtime::runtime_types::sp_core::sr25519::Signature;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but the compiler complains: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;expected `runtime_types::sp_core::sr25519::Signature`, found `sp_core::sr25519::Signature`&#xD;&#xA;note: `sp_core::sr25519::Signature` and `runtime_types::sp_core::sr25519::Signature` have similar names, but are actually distinct types&#xD;&#xA;`sp_core::sr25519::Signature` is defined in crate `sp_core`&#xD;&#xA;`runtime_types::sp_core::sr25519::Signature` is defined in the current crate&#xD;&#xA;/ #[subxt::subxt( /* ... */ )]&#xD;&#xA;|____________________________^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How should the type substitution work? Or do I have to implement type conversion?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40824" PostHistoryTypeId="5" PostId="10309" RevisionGUID="c0dd2950-7270-4b0f-bfce-975d1bd4cf2a" CreationDate="2023-10-24T11:47:02.890" UserId="3123" Comment="add detail on what type conversion looks like" Text="I am trying to use core crypto types instead of runtime types (because I know they are the same):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(&#xD;&#xA;	runtime_metadata_path = &quot;metadata.scale&quot;,&#xD;&#xA;	derive_for_all_types = &quot;Debug&quot;&#xD;&#xA;)]&#xD;&#xA;pub mod runtime {&#xD;&#xA;	#[subxt(substitute_type = &quot;sp_core::sr25519::Signature&quot;)]&#xD;&#xA;	use crate::runtime::runtime_types::sp_core::sr25519::Signature;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but the compiler complains: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;expected `runtime_types::sp_core::sr25519::Signature`, found `sp_core::sr25519::Signature`&#xD;&#xA;note: `sp_core::sr25519::Signature` and `runtime_types::sp_core::sr25519::Signature` have similar names, but are actually distinct types&#xD;&#xA;`sp_core::sr25519::Signature` is defined in crate `sp_core`&#xD;&#xA;`runtime_types::sp_core::sr25519::Signature` is defined in the current crate&#xD;&#xA;/ #[subxt::subxt( /* ... */ )]&#xD;&#xA;|____________________________^&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How should the type substitution work? Or do I have to implement type conversion like `Signature(signature.0)`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40825" PostHistoryTypeId="2" PostId="10310" RevisionGUID="f3e02696-28f0-4ee7-a129-d328fffec216" CreationDate="2023-10-24T21:17:57.753" UserId="3070" Text="We have implemented custom template pallet rpc methods and they are visible when doing a call to the node on ```rpc.methods```&#xD;&#xA;we get&#xD;&#xA;```&#xD;&#xA;template_sum5&#xD;&#xA;template_sumAndStore&#xD;&#xA;```&#xD;&#xA;however typegen is not adding them...&#xD;&#xA;&#xD;&#xA;is it possible to get the polkadotJs typegen to add these to its augement api rpc file or some other way to use the types from rust?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40827" PostHistoryTypeId="1" PostId="10310" RevisionGUID="f3e02696-28f0-4ee7-a129-d328fffec216" CreationDate="2023-10-24T21:17:57.753" UserId="3070" Text="How to get Typegen to use the Custom RPC Runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="40828" PostHistoryTypeId="3" PostId="10310" RevisionGUID="f3e02696-28f0-4ee7-a129-d328fffec216" CreationDate="2023-10-24T21:17:57.753" UserId="3070" Text="|substrate-node|substrate-front-end|typegen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40829" PostHistoryTypeId="2" PostId="10311" RevisionGUID="1c9cdf58-ce62-4e4a-891e-1d5ad19bb8fe" CreationDate="2023-10-24T21:56:04.843" UserId="3850" Text="Local setup: Zombienet running Shiden and Relay Chain.&#xD;&#xA;&#xD;&#xA;What are the exact steps needed to create an asset which represents DOT on Shiden (wrapped DOT). More specifically, I am trying to create the same asset that is present on Shiden and Astar: `340,282,366,920,938,463,463,374,607,431,768,211,455`.&#xD;&#xA;&#xD;&#xA;A small detail to mention is that when attempting to create the asset using the same ID, I can't input more then 10 numbers. (not sure how the asset id on Shiden and Astar is so long)&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Also I attempted to create the asset with an arbitrirary id and then register the asset location from the `xcAssetConfig` pallet which points to the Relay Chain.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;After which I attempted to execute the `reserveTransferAsset` call to transfer DOT from Relay Chain to Shiden. This failed with the error `!!! ERROR: TooExpensive` on the Parachain.&#xD;&#xA;&#xD;&#xA;To my knowledge this has to do with not being able to pay for fees.&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Here are the logs which include the error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-10-24 17:48:31.504 TRACE tokio-runtime-worker xcm::weight: [Relaychain] FixedWeightBounds message: Xcm([SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2000)) }, xcm: Xcm([]) }])    &#xD;&#xA;2023-10-24 17:48:34.893  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (5 peers), best: #113 (0x4b34…004c), finalized #111 (0xc059…fd3e), ⬇ 6.8kiB/s ⬆ 12.8kiB/s    &#xD;&#xA;2023-10-24 17:48:34.893  INFO tokio-runtime-worker substrate: [Parachain]  Idle (1 peers), best: #43 (0x38e1…1971), finalized #42 (0x6fd9…c069), ⬇ 73 B/s ⬆ 0.9kiB/s    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::weight: [Relaychain] FixedWeightBounds message: Xcm([SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2000)) }, xcm: Xcm([]) }])    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::weight: [Relaychain] FixedWeightBounds message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }])    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::weight: [Relaychain] FixedWeightBounds message: Xcm([SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }]) }])    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::weight: [Relaychain] WeightInfoBounds message: Xcm([SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }]) }])    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Relaychain] origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Kusama), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, message: Xcm([SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }]) }]), weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::barriers: [Relaychain] TakeWeightCredit origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Kusama), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, instructions: [SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }]) }], max_weight: &lt;wasm:stripped&gt;, weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::process: [Relaychain] origin: Some(MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Kusama), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), total_surplus/refunded: &lt;wasm:stripped&gt;/&lt;wasm:stripped&gt;, error_handler_weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::process_instruction: [Relaychain] === SetFeesMode { jit_withdraw: true }    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::process_instruction: [Relaychain] === TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000000) }]), dest: MultiLocation { parents: 0, interior: X1(Parachain(2000)) }, xcm: Xcm([BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }]) }    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::currency_adapter: [Relaychain] internal_transfer_asset asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(1000000000000000) }, from: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Kusama), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, to: MultiLocation { parents: 0, interior: X1(Parachain(2000)) }    &#xD;&#xA;2023-10-24 17:48:36.022 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Relaychain] result: Ok(())    &#xD;&#xA;2023-10-24 17:48:36.024  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #114 (0xc2b2…76b1)    &#xD;&#xA;2023-10-24 17:48:39.897  INFO tokio-runtime-worker substrate: [Parachain]  Idle (1 peers), best: #43 (0x38e1…1971), finalized #42 (0x6fd9…c069), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-10-24 17:48:39.897  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (5 peers), best: #114 (0xc2b2…76b1), finalized #111 (0xc059…fd3e), ⬇ 2.1kiB/s ⬆ 1.7kiB/s    &#xD;&#xA;2023-10-24 17:48:42.027  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #115 (0x066c…ce33)    &#xD;&#xA;2023-10-24 17:48:42.032  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #115 (0x6e15…70ef)    &#xD;&#xA;2023-10-24 17:48:42.038  INFO tokio-runtime-worker cumulus-collator: [Parachain] Starting collation. relay_parent=0x066c52a364962c1215956dd6fdd51cad835d383a609a887f880647eb070ece33 at=0x38781c21a6375eb1b1a70f44837d5ac047cc6d68f614f8b5977b774f44740d34&#xD;&#xA;2023-10-24 17:48:42.045  INFO tokio-runtime-worker cumulus-collator: [Parachain] Starting collation. relay_parent=0x6e15de40b8bbd48b82244d39dce7beec0816a138e26728e085da44b16a9070ef at=0x38781c21a6375eb1b1a70f44837d5ac047cc6d68f614f8b5977b774f44740d34&#xD;&#xA;2023-10-24 17:48:42.132 DEBUG tokio-runtime-worker xcm::execute_xcm: [Parachain] origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }]), weight_limit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedWeightBounds message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }])    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }]), weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::barriers: [Parachain] TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }], max_weight: &lt;wasm:stripped&gt;, weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::barriers: [Parachain] AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }], max_weight: &lt;wasm:stripped&gt;, weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::process: [Parachain] origin: Some(MultiLocation { parents: 1, interior: Here }), total_surplus/refunded: &lt;wasm:stripped&gt;/&lt;wasm:stripped&gt;, error_handler_weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }]))    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === ClearOrigin    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::weight: [Parachain] UsingComponents::buy_weight weight: &lt;wasm:stripped&gt;, payment: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfForeignAsset::buy_weight weight: &lt;wasm:stripped&gt;, payment: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::buy_weight: [Parachain] last_error: Some(TooExpensive), too_expensive_error_found: true    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::execute: [Parachain] !!! ERROR: TooExpensive    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 2, xcm_error: TooExpensive, weight: &lt;wasm:stripped&gt; })    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::weight: [Parachain] UsingComponents::refund_weight weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfForeignAsset::refund_weight weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.132 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] Execution errored at 2: TooExpensive (original_origin: MultiLocation { parents: 1, interior: Here })    &#xD;&#xA;2023-10-24 17:48:42.133  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #45 (0xa336…1291)    &#xD;&#xA;2023-10-24 17:48:42.156 DEBUG tokio-runtime-worker xcm::execute_xcm: [Parachain] origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }]), weight_limit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedWeightBounds message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }])    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] origin: MultiLocation { parents: 1, interior: Here }, message: Xcm([ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }]), weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::barriers: [Parachain] TakeWeightCredit origin: MultiLocation { parents: 1, interior: Here }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }], max_weight: &lt;wasm:stripped&gt;, weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::barriers: [Parachain] AllowTopLevelPaidExecutionFrom origin: MultiLocation { parents: 1, interior: Here }, instructions: [ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }])), ClearOrigin, BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }, DepositAsset { assets: Wild(AllCounted(1)), beneficiary: MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [198, 12, 27, 199, 44, 231, 102, 68, 94, 238, 238, 100, 220, 113, 6, 27, 77, 255, 98, 111, 132, 246, 75, 41, 58, 31, 125, 42, 57, 14, 214, 96] }) } }], max_weight: &lt;wasm:stripped&gt;, weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::process: [Parachain] origin: Some(MultiLocation { parents: 1, interior: Here }), total_surplus/refunded: &lt;wasm:stripped&gt;/&lt;wasm:stripped&gt;, error_handler_weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === ReserveAssetDeposited(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }]))    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === ClearOrigin    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000000) }, weight_limit: Limited(&lt;wasm:stripped&gt;) }    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::weight: [Parachain] UsingComponents::buy_weight weight: &lt;wasm:stripped&gt;, payment: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfForeignAsset::buy_weight weight: &lt;wasm:stripped&gt;, payment: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::buy_weight: [Parachain] last_error: Some(TooExpensive), too_expensive_error_found: true    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::execute: [Parachain] !!! ERROR: TooExpensive    &#xD;&#xA;2023-10-24 17:48:42.156 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 2, xcm_error: TooExpensive, weight: &lt;wasm:stripped&gt; }) &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/jZIh5.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/GWAsK.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/w5TFx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40831" PostHistoryTypeId="1" PostId="10311" RevisionGUID="1c9cdf58-ce62-4e4a-891e-1d5ad19bb8fe" CreationDate="2023-10-24T21:56:04.843" UserId="3850" Text="How to create wrapped DOT asset on local setup" ContentLicense="CC BY-SA 4.0" />
  <row Id="40832" PostHistoryTypeId="3" PostId="10311" RevisionGUID="1c9cdf58-ce62-4e4a-891e-1d5ad19bb8fe" CreationDate="2023-10-24T21:56:04.843" UserId="3850" Text="|xcm|assets|astar|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40833" PostHistoryTypeId="2" PostId="10312" RevisionGUID="ec7f89c8-35df-44b5-ae93-33aaa57dfc83" CreationDate="2023-10-25T01:25:09.977" UserId="318" Text="We are observing the following panic for a parachain node that is warp synced fully on both sides when we try to restart the node:&#xD;&#xA;&#xD;&#xA;       Thread 'main' panicked at 'route from finalized to leaf should be available; qed: UnknownBlock(&quot;Header was not found in the database: 0x1e70664aec1b2dcbec1ac26210ddb6d7388700e33604edbfa3a55141b22c3837&quot;)', /root/.cargo/git/checkouts/cumulus-59522f43471fa161/f603a61/client/consensus/common/src/level_monitor.rs:123&#xD;&#xA;&#xD;&#xA;This is pointing to [this line in the cumulus project][1]. My own reading from the code is that a recent header is missing simply because it wasn't yet flushed to the permanent db. But that to me is an expected situation rather than a panic. For two reasons:&#xD;&#xA;&#xD;&#xA; 1. It happened at least two times consistently after we restarted a node which is sort of not accidental.&#xD;&#xA; 2. I don't know of a safe way to restart a node but we do need nodes to be resilient to restarts and so on.&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA; 1. Is it expected?&#xD;&#xA; 2. Is it related to warp sync flag?&#xD;&#xA; 3. How we can avoid it?&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/v0.9.430/client/consensus/common/src/level_monitor.rs#L123" ContentLicense="CC BY-SA 4.0" />
  <row Id="40835" PostHistoryTypeId="1" PostId="10312" RevisionGUID="ec7f89c8-35df-44b5-ae93-33aaa57dfc83" CreationDate="2023-10-25T01:25:09.977" UserId="318" Text="Node panics on restart after warp synced with both relay and parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="40836" PostHistoryTypeId="3" PostId="10312" RevisionGUID="ec7f89c8-35df-44b5-ae93-33aaa57dfc83" CreationDate="2023-10-25T01:25:09.977" UserId="318" Text="|consensus|cumulus|sync|panic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40837" PostHistoryTypeId="5" PostId="10312" RevisionGUID="f0f8f21b-c66c-4bc0-9878-f5955fd10a54" CreationDate="2023-10-25T01:30:30.030" UserId="318" Comment="edited body" Text="We are observing the following panic for a parachain node that is warp synced fully on both sides when we try to restart the node:&#xD;&#xA;&#xD;&#xA;       Thread 'main' panicked at 'route from finalized to leaf should be available; qed: UnknownBlock(&quot;Header was not found in the database: 0x1e70664aec1b2dcbec1ac26210ddb6d7388700e33604edbfa3a55141b22c3837&quot;)', /root/.cargo/git/checkouts/cumulus-59522f43471fa161/f603a61/client/consensus/common/src/level_monitor.rs:123&#xD;&#xA;&#xD;&#xA;This is pointing to [this line in the cumulus project][1]. My own reading from the code is that a recent header is missing simply because it wasn't yet flushed to the permanent db. But that to me is an expected situation rather than a panic. For two reasons:&#xD;&#xA;&#xD;&#xA; 1. It happened at least two times consistently after we restarted a node which is sort of not accidental.&#xD;&#xA; 2. I don't know of a safe way to restart a node but we do need nodes to be resilient to restarts and so on.&#xD;&#xA;&#xD;&#xA;My questions are:&#xD;&#xA; 1. Is it expected?&#xD;&#xA; 2. Is it related to warp sync flag?&#xD;&#xA; 3. How can we avoid it?&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/blob/v0.9.430/client/consensus/common/src/level_monitor.rs#L123" ContentLicense="CC BY-SA 4.0" />
  <row Id="40838" PostHistoryTypeId="2" PostId="10313" RevisionGUID="ca1c0c24-427a-4645-8da9-709b6c36cafb" CreationDate="2023-10-25T02:04:13.007" UserId="4831" Text="I am a dApp developer in Astar.&#xD;&#xA;I want to convert EVM(h160) address to Substrate(ss58) address to implement the UI like the subscan page.&#xD;&#xA;https://astar.subscan.io/account/0xCF9C880D696AF9622b22bC0e5f9e0f8b3CA1a3F2&#xD;&#xA;⇅&#xD;&#xA;https://astar.subscan.io/account/Z8QyRcUaVzozkL8FDFAeAM6c7FzqN2Y1PpbaPG2nK4vcsps&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="40840" PostHistoryTypeId="1" PostId="10313" RevisionGUID="ca1c0c24-427a-4645-8da9-709b6c36cafb" CreationDate="2023-10-25T02:04:13.007" UserId="4831" Text="How to convert h160 address to ss58 address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40841" PostHistoryTypeId="3" PostId="10313" RevisionGUID="ca1c0c24-427a-4645-8da9-709b6c36cafb" CreationDate="2023-10-25T02:04:13.007" UserId="4831" Text="|substrate-node-template|evm|wallet|ss58|subscan|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40842" PostHistoryTypeId="5" PostId="10313" RevisionGUID="da55dc05-cfe2-4591-b5ba-96444cdf8a67" CreationDate="2023-10-25T02:04:35.900" UserId="4831" Comment="added 10 characters in body" Text="I am a dApp developer in Astar.&lt;br&gt;&#xD;&#xA;I want to convert EVM(h160) address to Substrate(ss58) address to implement the UI like the subscan page.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://astar.subscan.io/account/0xCF9C880D696AF9622b22bC0e5f9e0f8b3CA1a3F2&#xD;&#xA;⇅&#xD;&#xA;https://astar.subscan.io/account/Z8QyRcUaVzozkL8FDFAeAM6c7FzqN2Y1PpbaPG2nK4vcsps&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="40843" PostHistoryTypeId="5" PostId="10313" RevisionGUID="a2bc2e48-8305-4f98-b7ca-17cdc4f30d51" CreationDate="2023-10-25T02:04:49.950" UserId="4831" Comment="added 8 characters in body" Text="I am a dApp developer in Astar.&lt;br&gt;&#xD;&#xA;I want to convert EVM(h160) address to Substrate(ss58) address to implement the UI like the subscan page.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://astar.subscan.io/account/0xCF9C880D696AF9622b22bC0e5f9e0f8b3CA1a3F2&lt;br&gt;&#xD;&#xA;⇅&lt;br&gt;&#xD;&#xA;https://astar.subscan.io/account/Z8QyRcUaVzozkL8FDFAeAM6c7FzqN2Y1PpbaPG2nK4vcsps&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="40844" PostHistoryTypeId="2" PostId="10314" RevisionGUID="5fb6aece-d255-4571-8ce2-5f760171cd6f" CreationDate="2023-10-25T02:07:45.803" UserId="4810" Text="&gt; To my knowledge this has to do with not being able to pay for fees.&#xD;&#xA;&#xD;&#xA;Yes. To configure any customized asset to pay XCM fees, you must set the fee payment *unit per second* with `xcAssetConfig.setAssetUnitsPerSecond`.&#xD;&#xA;&#xD;&#xA;It depends on what you need for local setup, but in general, I would recommend using Chopsticks." ContentLicense="CC BY-SA 4.0" />
  <row Id="40846" PostHistoryTypeId="2" PostId="10315" RevisionGUID="08bd983a-2c70-46d7-9522-d9851943b863" CreationDate="2023-10-25T03:09:40.217" UserId="251" Text="There is no way to convert `H160` to `SS58` directly.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;As you can see, `H160` is not the native account format of Astar. They have only established connections between their Substrate account and Ethereum account.&#xD;&#xA;&#xD;&#xA;I suggest asking about how Astar created this relationship.&#xD;&#xA;&#xD;&#xA;Here is the algorithm that Astar used.&#xD;&#xA;&#xD;&#xA;- https://github.com/AstarNetwork/Astar/blob/ebbc59d20a90cba74013efaf0066e22dcc89c797/runtime/astar/src/lib.rs#L786C39-L786C59&#xD;&#xA;- https://docs.rs/pallet-evm/latest/pallet_evm/struct.HashedAddressMapping.html&#xD;&#xA;&#xD;&#xA;Follow this to get the mapping `H256` of `H160` then convert the `H256` to SS58`&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1ccVx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40848" PostHistoryTypeId="6" PostId="10313" RevisionGUID="c15fe3b4-cbff-4d2a-9776-c9a8ca563d26" CreationDate="2023-10-25T03:14:14.093" UserId="251" Comment="edited tags" Text="|evm|wallet|address|ss58|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40849" PostHistoryTypeId="5" PostId="10315" RevisionGUID="11934b7a-ae54-48be-afcb-59eaeee5797c" CreationDate="2023-10-25T03:14:49.927" UserId="251" Comment="added 1 character in body" Text="There is no way to convert `H160` to `SS58` directly.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;As you can see, `H160` is not the native account format of Astar. They have only established connections between their Substrate account and Ethereum account.&#xD;&#xA;&#xD;&#xA;I suggest asking about how Astar created this relationship.&#xD;&#xA;&#xD;&#xA;Here is the algorithm that Astar used.&#xD;&#xA;&#xD;&#xA;- https://github.com/AstarNetwork/Astar/blob/ebbc59d20a90cba74013efaf0066e22dcc89c797/runtime/astar/src/lib.rs#L786C39-L786C59&#xD;&#xA;- https://docs.rs/pallet-evm/latest/pallet_evm/struct.HashedAddressMapping.html&#xD;&#xA;&#xD;&#xA;Follow this to get the mapping `H256` of `H160` then convert the `H256` to `SS58`&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1ccVx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40850" PostHistoryTypeId="2" PostId="10316" RevisionGUID="22573538-310a-4fef-9e7c-d0cb07d90eae" CreationDate="2023-10-25T05:47:48.583" UserId="4623" Text="Is there a tool offered by the substrate ecosystem that I can use, that can help me create a bridge between a solochain created with substrate and Ethereum blockchain? Specifically, I want to transfer between native tokens in the solo chain and wrapped tokens in the Ethereum blockchain. If there is no native tool, what is the best way to achieve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40852" PostHistoryTypeId="1" PostId="10316" RevisionGUID="22573538-310a-4fef-9e7c-d0cb07d90eae" CreationDate="2023-10-25T05:47:48.583" UserId="4623" Text="How can I create a bridge between a solo chain created with substrate and Ethereum blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40853" PostHistoryTypeId="3" PostId="10316" RevisionGUID="22573538-310a-4fef-9e7c-d0cb07d90eae" CreationDate="2023-10-25T05:47:48.583" UserId="4623" Text="|ethereum|token|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40854" PostHistoryTypeId="2" PostId="10317" RevisionGUID="01f48234-ca7c-4a46-81aa-bb74df469472" CreationDate="2023-10-25T06:04:05.410" UserId="2348" Text="I have been  integrating paritytech frontier(0.9.43) version with the substrate 0.9.43 version .   while integrating when i added frontier changes in rpc.rs and service.rs file i am facing this error. can  you  tell how to solve these.[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/Dj3L2.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40856" PostHistoryTypeId="1" PostId="10317" RevisionGUID="01f48234-ca7c-4a46-81aa-bb74df469472" CreationDate="2023-10-25T06:04:05.410" UserId="2348" Text="how to solve mismatched type error in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40857" PostHistoryTypeId="3" PostId="10317" RevisionGUID="01f48234-ca7c-4a46-81aa-bb74df469472" CreationDate="2023-10-25T06:04:05.410" UserId="2348" Text="|rpc|substrate-node|evm|blockchain|service|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40858" PostHistoryTypeId="5" PostId="10268" RevisionGUID="2440202a-a84a-4b0b-9d89-56ed1c6a97f7" CreationDate="2023-10-25T06:47:21.493" UserId="4443" Comment="added 122 characters in body" Text="[![After making below changes i got these errors how can i fix this.][1]][1][![I got this error when i run this command cargo check -p node-template-runtime --release][2]][in build an application logic im facing this error im new to substrate please help me fix this.]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/43OXz.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/AuRxt.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40859" PostHistoryTypeId="2" PostId="10318" RevisionGUID="3fda052f-35c6-42d0-9a14-378c4c881065" CreationDate="2023-10-25T08:20:03.060" UserId="3112" Text="I'm having issues initiating my swanky phala project. I keep getting this error below. [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qgZDw.png&#xD;&#xA;&#xD;&#xA;Is there anything i'm missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40861" PostHistoryTypeId="1" PostId="10318" RevisionGUID="3fda052f-35c6-42d0-9a14-378c4c881065" CreationDate="2023-10-25T08:20:03.060" UserId="3112" Text="Error installing deps on swanky phala" ContentLicense="CC BY-SA 4.0" />
  <row Id="40862" PostHistoryTypeId="3" PostId="10318" RevisionGUID="3fda052f-35c6-42d0-9a14-378c4c881065" CreationDate="2023-10-25T08:20:03.060" UserId="3112" Text="|ink|phala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40863" PostHistoryTypeId="2" PostId="10319" RevisionGUID="e4eb9358-f079-4827-94b0-38f6245d48cf" CreationDate="2023-10-25T08:35:18.413" UserId="4623" Text="How to create a mapping of a vector of struct, also how to assign value and get the value in this data structure. I didn't find the documentation on the official doc. Is there any downside to using such a data structure in the context of smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40865" PostHistoryTypeId="1" PostId="10319" RevisionGUID="e4eb9358-f079-4827-94b0-38f6245d48cf" CreationDate="2023-10-25T08:35:18.413" UserId="4623" Text="How do you add mapping of struct array in ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40866" PostHistoryTypeId="3" PostId="10319" RevisionGUID="e4eb9358-f079-4827-94b0-38f6245d48cf" CreationDate="2023-10-25T08:35:18.413" UserId="4623" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40867" PostHistoryTypeId="2" PostId="10320" RevisionGUID="9780ee67-d8ce-481b-acc3-e86a8c79ca4c" CreationDate="2023-10-25T08:43:56.630" UserId="1876" Text="It seems everything went through except for NodeJs dependencies.&#xD;&#xA;If you `cd` into your `test-swanky-phala` directory and run `yarn` or `npm install` manually, it should show the reason for failing.&#xD;&#xA;Without more info, it's probably NodeJs version or something similar." ContentLicense="CC BY-SA 4.0" />
  <row Id="40869" PostHistoryTypeId="2" PostId="10321" RevisionGUID="9f19d435-2f6f-4a1c-b9b6-178a60b6dc12" CreationDate="2023-10-25T08:44:18.977" UserId="4731" Text="Instead of an array of structs, you can use a vector of structs to add on mapping. Here is an example:&#xD;&#xA;&#xD;&#xA;list_of_proposal: Mapping&lt;AccountId, Vec&lt;Proposal&gt;&gt;&#xD;&#xA;&#xD;&#xA;pub struct Proposal{&#xD;&#xA;....&#xD;&#xA;...&#xD;&#xA;}" ContentLicense="CC BY-SA 4.0" />
  <row Id="40871" PostHistoryTypeId="2" PostId="10322" RevisionGUID="e0a31a30-bb48-419f-8446-7b54f14c6073" CreationDate="2023-10-25T08:50:32.680" UserId="4834" Text="The previous answer does not work any more (at least for me).&#xD;&#xA;You can use this one instead:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;git clone https://github.com/paritytech/substrate.git&#xD;&#xA;cd substrate&#xD;&#xA;git checkout monthly-2021-07&#xD;&#xA;cargo install subkey --path bin/utils/subkey&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40873" PostHistoryTypeId="2" PostId="10323" RevisionGUID="f2db571b-50fb-40ea-a222-cbb34ac7dc6f" CreationDate="2023-10-25T08:50:50.203" UserId="380" Text="There is no way to automate smart contract functions solely from within a smart contract.&#xD;&#xA;&#xD;&#xA;The smart contract requires a transaction that supplies it with gas (CPU Time / Storage fees), which allows it to perform operations. Without the gas, the smart contract is just a set of instructions on-chain.&#xD;&#xA;&#xD;&#xA;You need to create an external service that calls your contract at set periods. The call should execute `pay` if the deadline is passed.&#xD;&#xA;&#xD;&#xA;There may be [Oracle services](https://ethereum.stackexchange.com/questions/43740/how-to-automatically-schedule-the-execution-of-a-function-in-the-future) that do this for you but I don't know of any." ContentLicense="CC BY-SA 4.0" />
  <row Id="40875" PostHistoryTypeId="5" PostId="10321" RevisionGUID="b39e8c62-2d43-4584-a65c-c9fdaf29014c" CreationDate="2023-10-25T08:54:55.060" UserId="4731" Comment="added 480 characters in body" Text="Instead of an array of structs, you can use a vector of structs to add on mapping. Here is an example:&#xD;&#xA;&#xD;&#xA;    list_of_proposal: Mapping&lt;AccountId, Vec&lt;Proposal&gt;&gt;&#xD;&#xA;    &#xD;&#xA;    pub struct Proposal{&#xD;&#xA;    ....&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;// Get list_of_proposal (vector of structs)&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    pub fn get_proposal(&amp;self) -&gt; Vec&lt;Proposal&gt; &#xD;&#xA;    {  &#xD;&#xA;    let proposal =&#xD;&#xA;    self.list_of_proposals(&amp;self.env.caller());  &#xD;&#xA;    proposal &#xD;&#xA;    .... &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;//For add a new proposal &#xD;&#xA;&#xD;&#xA;    pub fn set_proposal(&amp;self)&#xD;&#xA;    {&#xD;&#xA;    let vec = Vec::new();&#xD;&#xA;    let new_proposal = Proposal&#xD;&#xA;    {&#xD;&#xA;    ...&#xD;&#xA;    ...&#xD;&#xA;    }&#xD;&#xA;    vec.push(new_proposal);&#xD;&#xA;    self.list_of_proposal.insert(&amp;vec);&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="40876" PostHistoryTypeId="5" PostId="10318" RevisionGUID="687b2b8d-0edb-41c2-98ae-8dce917a8a48" CreationDate="2023-10-25T09:58:05.023" UserId="3112" Comment="added 176 characters in body" Text="I'm having issues initiating my swanky phala project. I keep getting this error below. [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is there anything i'm missing?&#xD;&#xA;&#xD;&#xA;update: I went to the tests directory to run `npm install` and I got these errors. &#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qgZDw.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/5vDQU.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;how do i fix these deps conflict?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40877" PostHistoryTypeId="2" PostId="10324" RevisionGUID="30924e3e-cd0f-4ee0-9d3f-34dd5463f398" CreationDate="2023-10-25T11:17:57.257" UserId="3112" Text="I'm trying to init a smart contract using swanky and i get this error below. I even tried changing my node version to 18.10.0.  It doesn't fix it. Am I missing anything?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/nGaOb.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40879" PostHistoryTypeId="1" PostId="10324" RevisionGUID="30924e3e-cd0f-4ee0-9d3f-34dd5463f398" CreationDate="2023-10-25T11:17:57.257" UserId="3112" Text="Swanky throws error on inititating smart contract:- error install deps &quot;ERROR: [Errno 2] No such file or directory: 'install' &quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40880" PostHistoryTypeId="3" PostId="10324" RevisionGUID="30924e3e-cd0f-4ee0-9d3f-34dd5463f398" CreationDate="2023-10-25T11:17:57.257" UserId="3112" Text="|ink|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40881" PostHistoryTypeId="2" PostId="10325" RevisionGUID="88245315-192c-4f69-8114-a544744308e7" CreationDate="2023-10-25T11:53:20.867" UserId="4835" Text="Some API queries accept optional parameters Option&lt;param&gt; that can be omitted.&#xD;&#xA;&#xD;&#xA;How are those queries written with the javascript API?&#xD;&#xA;&#xD;&#xA;For example: &#xD;&#xA;&#xD;&#xA;`api.query.preimage.preimageFor()` takes an `Option&lt;(H256,u32)&gt;` and returns the preimage of given hash and legth.&#xD;&#xA;&#xD;&#xA;However this option can be set to None (in the Dev console for example) then it returns a list of preimages, how is that query written in javascript?&#xD;&#xA;&#xD;&#xA;`pi = await api.query.preimage.preimageFor(None)`, what is `None`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40883" PostHistoryTypeId="1" PostId="10325" RevisionGUID="88245315-192c-4f69-8114-a544744308e7" CreationDate="2023-10-25T11:53:20.867" UserId="4835" Text="polkadot query api and None parameter" ContentLicense="CC BY-SA 4.0" />
  <row Id="40884" PostHistoryTypeId="3" PostId="10325" RevisionGUID="88245315-192c-4f69-8114-a544744308e7" CreationDate="2023-10-25T11:53:20.867" UserId="4835" Text="|polkadot-js|api|javascript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40885" PostHistoryTypeId="2" PostId="10326" RevisionGUID="5fe359ee-aedd-4b67-af20-fecf7b021518" CreationDate="2023-10-25T12:31:15.907" UserId="279" Text="you can use `.entries()` to retrieve all the info, check the docs https://polkadot.js.org/docs/api/cookbook/storage/#how-do-i-use-entrieskeys-on-double-maps&#xD;&#xA;&#xD;&#xA;In your case you can use something like could work&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const allEntries = await api.query.preimage.preimageFor.entries();&#xD;&#xA;allEntries.forEach(([{ args: [[hash,len]] }, value]) =&gt; {&#xD;&#xA;  console.log(`hash: ${hash}, len: ${len}, value: ${value.toHuman()}`);&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thx!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40887" PostHistoryTypeId="5" PostId="10261" RevisionGUID="0104e18d-2487-45e1-9b88-c39be1736198" CreationDate="2023-10-25T13:14:02.763" UserId="3285" Comment="fixing URL" Text="Is it possible to integrate the parachain-staking pallet into my solochain? I want to transition my chain's consensus mechanism from POA to proof of stake using a parachain-staking pallet in my solochain. Can I use that?&#xD;&#xA;&#xD;&#xA;For your reference, here is the code for the pallet:&#xD;&#xA;[https://github.com/moonbeam-foundation/moonbeam/tree/master/pallets/parachain-staking][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/moonbeam-foundation/moonbeam/tree/master/pallets/parachain-staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="40888" PostHistoryTypeId="24" PostId="10261" RevisionGUID="0104e18d-2487-45e1-9b88-c39be1736198" CreationDate="2023-10-25T13:14:02.763" Comment="Proposed by 3285 approved by -1 edit id of 597" ContentLicense="CC BY-SA 4.0" />
  <row Id="40889" PostHistoryTypeId="5" PostId="10261" RevisionGUID="424b3c8e-2a2e-444c-a99f-61855c6de934" CreationDate="2023-10-25T13:14:02.763" UserId="555" Comment="fixing URL" Text="Is it possible to integrate the parachain-staking pallet into my solochain? I want to transition my chain's consensus mechanism from POA to proof of stake using a parachain-staking pallet in my solochain. Can I use that?&#xD;&#xA;&#xD;&#xA;For your reference, here is the code of parachain-staking pallet:&#xD;&#xA;[https://github.com/moonbeam-foundation/moonbeam/tree/master/pallets/parachain-staking][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/moonbeam-foundation/moonbeam/tree/master/pallets/parachain-staking" ContentLicense="CC BY-SA 4.0" />
  <row Id="40890" PostHistoryTypeId="2" PostId="10327" RevisionGUID="d0c4514e-45d0-46f3-8553-5eec980f3867" CreationDate="2023-10-25T14:03:50.303" UserId="4024" Text="I know that the best practices suggest designing transactions (pallet calls) in a way that executes the operation atomically and doesn't keep any intermediate states. This guarantees, that in case a block where the atomic operation has been applied, is reverted by the Block Finalization Consensus mechanism (i.e. [GRANDPA](https://docs.substrate.io/learn/consensus/) or any other), the operation will not hang in an intermediate state, it will be fully rolled back due to its atomicity, and the transaction sender can retry it later.&#xD;&#xA;&#xD;&#xA;However, in a system that I'm currently working on, there is a requirement to process a single operation in several transactions/blocks. That means I need to keep some intermediate state (in the pallet's storage) between several transactions/blocks before stating the operation as completed.&#xD;&#xA;&#xD;&#xA;My concern here is that because I keep an intermidiate state of a single operation during several transactions/blocks, some of those transactions/blocks may be reverted due to the Block Finalization Consensus mechanism. In this case, I won't be able to state the operation as completed in the last transaction/call for that operation, as I'm missing some important changes from all intermidiate calls/transactions for that operation that were reverted.&#xD;&#xA;&#xD;&#xA;It seems to me, that the most obvious way to address this issue is to send every new transaction/call for the operation only after the block where the previous transaction/call for the same operation has been applied is finalized by the Finalization Consensus mechanism. &#xD;&#xA;And of course, if there is some block that is reverted during the whole operation, implement some kind of retry strategy.&#xD;&#xA;&#xD;&#xA;To implement that, I plan to rely on the Substrate subscription API described in the [Transaction inclusion section in polkadot.js docs](https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-inclusion).&#xD;&#xA;&#xD;&#xA;Can someone confirm my thoughts regarding the above and suggest any better approach if there are any?&#xD;&#xA;Is there something I need to be aware of, in case I rely on the `result.status.isFinalized` field from the [polkadot.js docs](https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-inclusion) when I send a number of subsequent transactions/calls for the same operation?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40892" PostHistoryTypeId="1" PostId="10327" RevisionGUID="d0c4514e-45d0-46f3-8553-5eec980f3867" CreationDate="2023-10-25T14:03:50.303" UserId="4024" Text="Is there any good way to keep an intermediate state for an operation between several transactions/blocks in a BABE/GRANDPA-based chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40893" PostHistoryTypeId="3" PostId="10327" RevisionGUID="d0c4514e-45d0-46f3-8553-5eec980f3867" CreationDate="2023-10-25T14:03:50.303" UserId="4024" Text="|extrinsic|transactions|substrate-node|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40894" PostHistoryTypeId="52" PostId="10319" RevisionGUID="4bb7e9a9-de98-4d24-b999-cd2bce8d03ff" CreationDate="2023-10-25T16:35:38.397" />
  <row Id="40895" PostHistoryTypeId="5" PostId="10327" RevisionGUID="c84d22de-75ae-4eb4-b3ab-b76099764918" CreationDate="2023-10-25T20:19:42.393" UserId="4024" Comment="added 803 characters in body" Text="I know that the best practices suggest designing transactions (pallet calls) in a way that executes the operation atomically and doesn't keep any intermediate states. This guarantees, that in case a block where the atomic operation has been applied, is reverted by the Block Finalization Consensus mechanism (i.e. [GRANDPA](https://docs.substrate.io/learn/consensus/) or any other), the operation will not hang in an intermediate state. It will be fully rolled back due to its atomicity, and the transaction sender can retry it later.&#xD;&#xA;&#xD;&#xA;However, in a system that I'm currently working on, there is a requirement to process a single operation in several transactions/blocks. That means I need to keep some intermediate state (in the pallet's storage) between several transactions/blocks before stating the operation as completed.&#xD;&#xA;&#xD;&#xA;My concern here is that because I keep an intermediate state of a single operation during several transactions/blocks, some of those transactions/blocks may be reverted due to the Block Finalization Consensus mechanism. In this case, I won't be able to state the operation as completed in the last transaction/call for that operation, as I'm missing some important changes from all intermediate calls/transactions for that operation that were reverted.&#xD;&#xA;&#xD;&#xA;It seems to me, that the most obvious way to address this issue is to send every new transaction/call for the operation only after the block where the previous transaction/call for the same operation has been applied is finalized by the Finalization Consensus mechanism. &#xD;&#xA;And of course, if there is some block that is reverted during the whole operation, implement some kind of retry strategy.&#xD;&#xA;&#xD;&#xA;To implement that, I plan to rely on the Substrate subscription API described in the [Transaction inclusion section in polkadot.js docs](https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-inclusion).&#xD;&#xA;&#xD;&#xA;Can someone confirm my thoughts regarding the above and suggest any better approach if there are any?&#xD;&#xA;Is there something I need to be aware of, in case I rely on the `result.status.isFinalized` field from the [polkadot.js docs](https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-inclusion) when I send several subsequent transactions/calls (that are parts of the same domain operation), and wait for every transaction/call to be finalized (i.e. updates the intermediate state of domain operation), before sending the next transaction/call?&#xD;&#xA;&#xD;&#xA;**TL;DR: Is there any good way to implement sending a stream of data via an extrinsic `stream_data`, that should be called several times while transferring the stream (every call transfers a part of the stream),  and each time it updates some intermediate state of `buffer` in the storage? &#xD;&#xA;To complete the data streaming and do something with the accumulated `buffer`, there will be another extrinsic `end_stream`. &#xD;&#xA;How to implement this properly, considering the fact that the intermediate state of the `buffer` can be inconsistent in case the GRANPDA reverts some blocks with previously executed `stream_data` extrinsics?**&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40896" PostHistoryTypeId="5" PostId="10327" RevisionGUID="8aace990-c15c-4611-8f76-01603be43105" CreationDate="2023-10-25T20:26:39.280" UserId="4024" Comment="edited body" Text="I know that the best practices suggest designing transactions (pallet calls) in a way that executes the operation atomically and doesn't keep any intermediate states. This guarantees, that in case a block where the atomic operation has been applied, is reverted by the Block Finalization Consensus mechanism (i.e. [GRANDPA](https://docs.substrate.io/learn/consensus/) or any other), the operation will not hang in an intermediate state. It will be fully rolled back due to its atomicity, and the transaction sender can retry it later.&#xD;&#xA;&#xD;&#xA;However, in a system that I'm currently working on, there is a requirement to process a single operation in several transactions/blocks. That means I need to keep some intermediate state (in the pallet's storage) between several transactions/blocks before stating the operation as completed.&#xD;&#xA;&#xD;&#xA;My concern here is that because I keep an intermediate state of a single operation during several transactions/blocks, some of those transactions/blocks may be reverted due to the Block Finalization Consensus mechanism. In this case, I won't be able to state the operation as completed in the last transaction/call for that operation, as I'm missing some important changes from all intermediate calls/transactions for that operation that were reverted.&#xD;&#xA;&#xD;&#xA;It seems to me, that the most obvious way to address this issue is to send every new transaction/call for the operation only after the block where the previous transaction/call for that operation has been applied is finalized by the Finalization Consensus mechanism. &#xD;&#xA;And of course, if there is some block that is reverted during the whole operation, implement some kind of retry strategy.&#xD;&#xA;&#xD;&#xA;To implement that, I plan to rely on the Substrate subscription API described in the [Transaction inclusion section in polkadot.js docs](https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-inclusion).&#xD;&#xA;&#xD;&#xA;Can someone confirm my thoughts regarding the above and suggest any better approach if there are any?&#xD;&#xA;Is there something I need to be aware of, in case I rely on the `result.status.isFinalized` field from the [polkadot.js docs](https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-inclusion) when I send several subsequent transactions/calls (that are parts of the same domain operation), and wait for every transaction/call to be finalized (i.e. updates the intermediate state of domain operation), before sending the next transaction/call?&#xD;&#xA;&#xD;&#xA;**TL;DR: Is there any good way to implement sending a stream of data via an extrinsic `stream_data`, that should be called several times while transferring the stream (every call transfers a part of the stream),  and each time it updates some intermediate state of `buffer` in the storage? &#xD;&#xA;To complete the data streaming and do something with the accumulated `buffer`, there will be another extrinsic `end_stream`. &#xD;&#xA;How to implement this properly, considering the fact that the intermediate state of the `buffer` can be inconsistent in case the GRANPDA reverts some blocks with previously executed `stream_data` extrinsics?**&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40897" PostHistoryTypeId="5" PostId="10327" RevisionGUID="a98e7ddd-48f4-407f-926a-71a39b813a0c" CreationDate="2023-10-25T20:35:35.590" UserId="4024" Comment="edited body" Text="I know that the best practices suggest designing transactions (pallet calls) in a way that executes the operation atomically and doesn't keep any intermediate states. This guarantees, that in case a block where the atomic operation has been applied, is reverted by the Block Finalization Consensus mechanism (i.e. [GRANDPA](https://docs.substrate.io/learn/consensus/) or any other), the operation will not hang in an intermediate state. It will be fully rolled back due to its atomicity, and the transaction sender can retry it later.&#xD;&#xA;&#xD;&#xA;However, in a system that I'm currently working on, there is a requirement to process a single operation in several transactions/blocks. That means I need to keep some intermediate state (in the pallet's storage) between several transactions/blocks before stating the operation as completed.&#xD;&#xA;&#xD;&#xA;My concern here is that because I keep an intermediate state of a single operation during several transactions/blocks, some of those transactions/blocks may be reverted due to the Block Finalization Consensus mechanism. In this case, I won't be able to state the operation as completed in the last transaction/call for that operation, as I'm missing some important changes from all intermediate calls/transactions for that operation that were reverted.&#xD;&#xA;&#xD;&#xA;It seems to me, that the most obvious way to address this issue is to send every new transaction/call for the operation only after the block where the previous transaction/call for that operation occurred is finalized by the Finalization Consensus (GRANDPA). &#xD;&#xA;And if there is some block that is reverted during the whole operation, implement some kind of retry strategy.&#xD;&#xA;&#xD;&#xA;To implement that, I plan to rely on the Substrate subscription API described in the [Transaction inclusion section in polkadot.js docs](https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-inclusion).&#xD;&#xA;&#xD;&#xA;Can someone confirm my thoughts regarding the above and suggest any better approach if there are any?&#xD;&#xA;Is there something I need to be aware of, in case I rely on the `result.status.isFinalized` field from the [polkadot.js docs](https://polkadot.js.org/docs/api/start/api.tx.subs/#transaction-inclusion) when I send several subsequent transactions/calls (that are parts of the same domain operation), and wait for every transaction/call to be finalized (i.e. updates the intermediate state of domain operation), before sending the next transaction/call?&#xD;&#xA;&#xD;&#xA;**TL;DR: Is there any good way to implement sending a stream of data via an extrinsic `stream_data`, that should be called several times while transferring the stream (every call transfers a part of the stream), and each time it updates some intermediate state of `buffer` in the storage? &#xD;&#xA;To complete the data streaming and do something with the accumulated `buffer`, there will be another extrinsic `end_stream`. &#xD;&#xA;How to implement this properly, considering the fact that the intermediate state of the `buffer` can be inconsistent in case the GRANPDA reverts some blocks with previously executed `stream_data` extrinsics?**&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40898" PostHistoryTypeId="50" PostId="6939" RevisionGUID="41427677-c161-4a6a-8ba7-20f59f6d3ef2" CreationDate="2023-10-25T23:03:50.447" UserId="-1" />
  <row Id="40899" PostHistoryTypeId="2" PostId="10328" RevisionGUID="77579b96-b6cd-48cd-ade0-d90596b7af81" CreationDate="2023-10-26T04:09:35.410" UserId="4623" Text="How can I mint a new native token (not a custom token) from the ink smart contract calling one of the functions from pallet-balances pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40901" PostHistoryTypeId="1" PostId="10328" RevisionGUID="77579b96-b6cd-48cd-ade0-d90596b7af81" CreationDate="2023-10-26T04:09:35.410" UserId="4623" Text="How can I mint new token from ink smart contract calling pallet-balances function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40902" PostHistoryTypeId="3" PostId="10328" RevisionGUID="77579b96-b6cd-48cd-ade0-d90596b7af81" CreationDate="2023-10-26T04:09:35.410" UserId="4623" Text="|pallet|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40903" PostHistoryTypeId="2" PostId="10329" RevisionGUID="96737149-c03d-4800-88b5-369ccd9ef644" CreationDate="2023-10-26T05:15:28.053" UserId="554" Text="I am working on a solochain I want to pass the account of the block author in a pallet config in runtime of the chain. How can i get the the account is of the current block author?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40905" PostHistoryTypeId="1" PostId="10329" RevisionGUID="96737149-c03d-4800-88b5-369ccd9ef644" CreationDate="2023-10-26T05:15:28.053" UserId="554" Text="How we can get the current block author account id in POA solochain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40906" PostHistoryTypeId="3" PostId="10329" RevisionGUID="96737149-c03d-4800-88b5-369ccd9ef644" CreationDate="2023-10-26T05:15:28.053" UserId="554" Text="|pallet|solo-chain|poa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40908" PostHistoryTypeId="50" PostId="9874" RevisionGUID="bf44c854-c508-4449-ab41-bd7d8b2195fe" CreationDate="2023-10-26T08:02:50.320" UserId="-1" />
  <row Id="40909" PostHistoryTypeId="50" PostId="8852" RevisionGUID="a18b3996-ee00-4b6c-bd6f-6149b13f9ed5" CreationDate="2023-10-26T09:05:00.580" UserId="-1" />
  <row Id="40910" PostHistoryTypeId="2" PostId="10330" RevisionGUID="fc294ba7-de76-43e0-bb18-1981274c28e1" CreationDate="2023-10-26T10:45:24.643" UserId="629" Text="First things first, I am not sure what you mean by &quot;light client instances&quot; in your message. Do you instantiate multiple light client or you mean Multiple chains added to one instance of a smoldot light client?&#xD;&#xA;&#xD;&#xA;It seems to me that something is tricky on your case since in the browser (using Substrate-connect demo) the maximum RAM usage is approx 80 MB):&#xD;&#xA;&#xD;&#xA;[![Substrate Connect Demo - 3 chains integration][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bYNrv.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The correct approach (and one that substrate connect) is using, is instantiate one client and add/remove chains on that 1 instance; &#xD;&#xA;&#xD;&#xA;Substrate Connect could be more &quot;heavy&quot; than Smoldot since PolkadotJS API is used, which does not fully (and probably will never) use the new JSON RPSEE API, but it provides access to PolkadotJS API while smoldot-js does not.&#xD;&#xA;&#xD;&#xA;In any case 4GB usage of RAM, make me assume that there is something wrong with the way that Substrate Connect is used, and gives a suspision of leaky code;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40912" PostHistoryTypeId="2" PostId="10331" RevisionGUID="c62d1643-f64a-41f1-852f-97ca6692f7c1" CreationDate="2023-10-26T13:47:25.527" UserId="427" Text="Trying to do a try-runtime in a test node using the command - &#xD;&#xA;&#xD;&#xA;`try-runtime --runtime ./target/release/wbuild/alphanet-runtime/alphanet_runtime.wasm on-runtime-upgrade live --uri ws://IP:PORT` &#xD;&#xA;&#xD;&#xA;and getting the below error. &#xD;&#xA;&#xD;&#xA;         panicked at 'Bad input data provided to on_runtime_upgrade: Codec error', /Users/immanueljohn/runtime/alphanet/src/lib.rs:201:1&#xD;&#xA;    thread 'main' panicked at cli/main.rs:334:6:&#xD;&#xA;    called `Result::unwrap()` on an `Err` value: Input(&quot;failed to execute TryRuntime_on_runtime_upgrade: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x3a744e - &lt;unknown&gt;!rust_begin_unwind\n    1: 0x36eba8 - &lt;unknown&gt;!core::panicking::panic_fmt::he56f452e7c6bafaf\n    2: 0x2ca56c - &lt;unknown&gt;!TryRuntime_on_runtime_upgrade&quot;)&#xD;&#xA;    stack backtrace:&#xD;&#xA;       0: rust_begin_unwind&#xD;&#xA;                 at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5&#xD;&#xA;       1: core::panicking::panic_fmt&#xD;&#xA;                 at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14&#xD;&#xA;       2: core::result::unwrap_failed&#xD;&#xA;                 at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/result.rs:1652:5&#xD;&#xA;       3: tokio::runtime::park::CachedParkThread::block_on&#xD;&#xA;       4: try_runtime::main&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40914" PostHistoryTypeId="1" PostId="10331" RevisionGUID="c62d1643-f64a-41f1-852f-97ca6692f7c1" CreationDate="2023-10-26T13:47:25.527" UserId="427" Text="How to fix try-runtime execution aborted issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40915" PostHistoryTypeId="3" PostId="10331" RevisionGUID="c62d1643-f64a-41f1-852f-97ca6692f7c1" CreationDate="2023-10-26T13:47:25.527" UserId="427" Text="|try-runtime|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40916" PostHistoryTypeId="50" PostId="9871" RevisionGUID="8542c4ea-fc48-4689-9455-2a8f55a3dd8b" CreationDate="2023-10-26T16:01:35.227" UserId="-1" />
  <row Id="40917" PostHistoryTypeId="50" PostId="10041" RevisionGUID="86a7eec4-8177-450c-b597-968515b360ec" CreationDate="2023-10-26T17:05:10.593" UserId="-1" />
  <row Id="40918" PostHistoryTypeId="2" PostId="10332" RevisionGUID="4aabc213-6314-412a-b395-cc4d34e0b96f" CreationDate="2023-10-26T21:32:18.630" UserId="3070" Text="We are adding a custom rpc and following along with &#xD;&#xA;https://github.com/AlexD10S/susbtrate-node-template/blob/rpc-custom-methods/pallets/template/rpc/runtime-api/src/lib.rs&#xD;&#xA;&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;https://github.com/valentinfernandez1/RPC-DeepDives&#xD;&#xA;&#xD;&#xA;and it runs great building local. &#xD;&#xA;however when i try to build wasm we get an error in the file runtime-api/src/lib.r&#xD;&#xA;&#xD;&#xA;```use of undeclared crate or module `std```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallets/template/rpc/runtime-api/src/lib.rs:5:1&#xD;&#xA;   |&#xD;&#xA;5  | / sp_api::decl_runtime_apis! {&#xD;&#xA;6  | |     pub trait TemplateApi {&#xD;&#xA;7  | |         fn sum_5() -&gt; u32;&#xD;&#xA;8  | |         fn sum_and_store(value: u32) -&gt; u32;&#xD;&#xA;9  | |     }&#xD;&#xA;10 | | }&#xD;&#xA;   | |_^ use of undeclared crate or module `std`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;any ideas?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40920" PostHistoryTypeId="1" PostId="10332" RevisionGUID="4aabc213-6314-412a-b395-cc4d34e0b96f" CreationDate="2023-10-26T21:32:18.630" UserId="3070" Text="Custom RPC Error on sp_api::decl_runtime_apis!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40921" PostHistoryTypeId="3" PostId="10332" RevisionGUID="4aabc213-6314-412a-b395-cc4d34e0b96f" CreationDate="2023-10-26T21:32:18.630" UserId="3070" Text="|substrate-node|wasm|compilation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40922" PostHistoryTypeId="50" PostId="5103" RevisionGUID="334a856f-0e94-42ca-a447-ab6a110cd46c" CreationDate="2023-10-26T23:07:15.850" UserId="-1" />
  <row Id="40923" PostHistoryTypeId="50" PostId="8690" RevisionGUID="7853faad-1784-45af-a671-94ba8de69954" CreationDate="2023-10-27T07:01:15.163" UserId="-1" />
  <row Id="40924" PostHistoryTypeId="2" PostId="10333" RevisionGUID="5ecbad84-aeec-4df9-bc0b-22b2aafe11dd" CreationDate="2023-10-27T07:18:12.907" UserId="73" Text="No this wasn't expected. This was/is a bug. &#xD;&#xA;&#xD;&#xA;The problem here is that when a node is warp syncing, it imports a header around the tip of the chain. However, in the case of the parachain this header is not imported as finalized block. The level monitor will then see this header as a leaf and will try to go back down to the last finalized block (genesis block). However, the node hasn't yet synced all the blocks between genesis and the leaf and thus, it will fail to fetch this block from the db.&#xD;&#xA;&#xD;&#xA;[Here is a fix.](https://github.com/paritytech/polkadot-sdk/pull/2053)" ContentLicense="CC BY-SA 4.0" />
  <row Id="40926" PostHistoryTypeId="2" PostId="10334" RevisionGUID="57377d6a-a17c-4003-822f-87af02f6fdd5" CreationDate="2023-10-27T08:34:00.830" UserId="555" Text="I'm trying to add parachain-staking pallet in the solochain which is based on POA with Aura. For that I need to integrate pallet session but in the integrating of pallet-session in chain spec I'm getting this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; node/src/chain_spec.rs:372:10&#xD;&#xA;    |&#xD;&#xA;372 |               keys: initial_authorities&#xD;&#xA;    |  ___________________^&#xD;&#xA;373 | |                 .iter()&#xD;&#xA;374 | |                 .cloned()&#xD;&#xA;375 | |                 .map(|(aura, grandpa)| {&#xD;&#xA;...   |&#xD;&#xA;381 | |                 })&#xD;&#xA;382 | |                 .collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;    | |____________________________________^ expected `Vec&lt;(AccountId32, AccountId32, ...)&gt;`, found `Vec&lt;(Public, Public, SessionKeys)&gt;`&#xD;&#xA;    |&#xD;&#xA;    = note: expected struct `Vec&lt;(AccountId32, AccountId32, SessionKeys)&gt;`&#xD;&#xA;               found struct `Vec&lt;(sp_consensus_aura::sr25519::app_sr25519::Public, sp_consensus_grandpa::app::Public, SessionKeys)&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is my code: &#xD;&#xA;```rust&#xD;&#xA;session: node_runtime::SessionConfig {&#xD;&#xA;			keys: initial_authorities&#xD;&#xA;				.iter()&#xD;&#xA;				.cloned()&#xD;&#xA;				.map(|(aura, grandpa)| {&#xD;&#xA;					(&#xD;&#xA;						aura.clone(),                 // account id&#xD;&#xA;						grandpa.clone(),                         // validator id&#xD;&#xA;						template_session_keys(aura,grandpa), // session keys&#xD;&#xA;					)&#xD;&#xA;				})&#xD;&#xA;				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;		},&#xD;&#xA;```&#xD;&#xA;Template_session_key implementation:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub fn template_session_keys(Akeys: AuraId, GKeys: GrandpaId) -&gt; node_runtime::SessionKeys {&#xD;&#xA;	node_runtime::SessionKeys { aura: Akeys, grandpa: GKeys }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;SessionKey implemenation:&#xD;&#xA;```&#xD;&#xA;impl_opaque_keys! {&#xD;&#xA;	pub struct SessionKeys {&#xD;&#xA;		pub aura: Aura,&#xD;&#xA;		pub grandpa: Grandpa,&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to solve this issue?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="40928" PostHistoryTypeId="1" PostId="10334" RevisionGUID="57377d6a-a17c-4003-822f-87af02f6fdd5" CreationDate="2023-10-27T08:34:00.830" UserId="555" Text="Error in integration of pallet-session in chain-spec" ContentLicense="CC BY-SA 4.0" />
  <row Id="40929" PostHistoryTypeId="3" PostId="10334" RevisionGUID="57377d6a-a17c-4003-822f-87af02f6fdd5" CreationDate="2023-10-27T08:34:00.830" UserId="555" Text="|parachain|staking|aura|session|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40930" PostHistoryTypeId="2" PostId="10335" RevisionGUID="eeece0d8-690f-4d59-83b4-e1772feef5fc" CreationDate="2023-10-27T10:37:36.880" UserId="3994" Text="An account can own more than 16 assets. If someone places a deposit (in DOT), `inc_consumers` won't be called.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        let reason = if let Some((depositor, deposit)) = maybe_deposit {&#xD;&#xA;            if depositor == who {&#xD;&#xA;                ExistenceReason::DepositHeld(deposit)&#xD;&#xA;            } else {&#xD;&#xA;                ExistenceReason::DepositFrom(depositor.clone(), deposit)&#xD;&#xA;            }&#xD;&#xA;        } else if d.is_sufficient {&#xD;&#xA;            frame_system::Pallet::&lt;T&gt;::inc_sufficients(who);&#xD;&#xA;            d.sufficients += 1;&#xD;&#xA;            ExistenceReason::Sufficient&#xD;&#xA;        } else {&#xD;&#xA;            frame_system::Pallet::&lt;T&gt;::inc_consumers(who)&#xD;&#xA;                // ...        &#xD;&#xA;        }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40933" PostHistoryTypeId="50" PostId="9885" RevisionGUID="ba08f581-a3a5-441b-bb26-54495d94ce77" CreationDate="2023-10-27T11:07:05.870" UserId="-1" />
  <row Id="40934" PostHistoryTypeId="50" PostId="10018" RevisionGUID="a68141d0-be52-4130-91ec-46cd5b15ac58" CreationDate="2023-10-27T12:01:45.317" UserId="-1" />
  <row Id="40935" PostHistoryTypeId="2" PostId="10336" RevisionGUID="556bb4c4-61dc-4014-a888-0c439170ba0c" CreationDate="2023-10-27T15:56:59.337" UserId="3317" Text="The RPC call `sync_state` =&gt; [`genSyncSpec`][1]. Unfortunately atm only available for the relay chains it seems ([ref][2]).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/9643a3adf8c2d2bf2a8e496e06702013d547cd55/substrate/client/sync-state-rpc/src/lib.rs#L131&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/9643a3adf8c2d2bf2a8e496e06702013d547cd55/substrate/client/sync-state-rpc/src/lib.rs#L21" ContentLicense="CC BY-SA 4.0" />
  <row Id="40937" PostHistoryTypeId="2" PostId="10337" RevisionGUID="9fa38dfe-d65e-4749-b8cf-2262d31b9dce" CreationDate="2023-10-27T16:20:04.583" UserId="2149" Text="I'm trying to add a custom component to a fork of polkadot apps:&#xD;&#xA;https://github.com/polkadot-js/apps&#xD;&#xA;&#xD;&#xA;The component looks like:&#xD;&#xA;```&#xD;&#xA;import type { KeyringPair } from '@polkadot/keyring/types';&#xD;&#xA;import { keyring } from '@polkadot/ui-keyring';&#xD;&#xA;import React, { useState } from 'react';&#xD;&#xA;&#xD;&#xA;function GetSLON(): React.ReactElement {&#xD;&#xA;  const [currentPair, setCurrentPair] = useState&lt;KeyringPair | null&gt;(() =&gt; keyring.getPairs()[0] || null);&#xD;&#xA; &#xD;&#xA;  return (&#xD;&#xA;    &lt;&gt;&#xD;&#xA;    &lt;/&gt;&#xD;&#xA;  );&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;export default GetSLON;&#xD;&#xA;```&#xD;&#xA;I'm getting an error:&#xD;&#xA;```&#xD;&#xA;Uncaught Error: Keyring should be initialised via 'loadAll' before use&#xD;&#xA;    at get keyring [as keyring] (bundle.js_+_11_modules:352:15)&#xD;&#xA;    at Keyring.getPairs (bundle.js_+_11_modules:366:21)&#xD;&#xA;    at eval (index.tsx_+_72_modules:2566:83)&#xD;&#xA;    at mountState (react-dom.development.js:16986:20)&#xD;&#xA;    at Object.useState (react-dom.development.js:17699:16)&#xD;&#xA;    at useState (react.development.js:1623:21)&#xD;&#xA;    at GetSLON (index.tsx_+_72_modules:2566:61)&#xD;&#xA;    at renderWithHooks (react-dom.development.js:16305:18)&#xD;&#xA;    at mountIndeterminateComponent (react-dom.development.js:20069:13)&#xD;&#xA;    at beginWork (react-dom.development.js:21582:16)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please help." ContentLicense="CC BY-SA 4.0" />
  <row Id="40939" PostHistoryTypeId="1" PostId="10337" RevisionGUID="9fa38dfe-d65e-4749-b8cf-2262d31b9dce" CreationDate="2023-10-27T16:20:04.583" UserId="2149" Text="Use Keyring at a custom component" ContentLicense="CC BY-SA 4.0" />
  <row Id="40940" PostHistoryTypeId="3" PostId="10337" RevisionGUID="9fa38dfe-d65e-4749-b8cf-2262d31b9dce" CreationDate="2023-10-27T16:20:04.583" UserId="2149" Text="|polkadot-js|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40944" PostHistoryTypeId="2" PostId="10338" RevisionGUID="c14b2077-a947-490e-b02c-c27ac920e02c" CreationDate="2023-10-28T01:35:32.137" UserId="2844" Text="locally we are not getting this issue but in tanssi getting this issue `RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1010: Invalid Transaction: Transaction would exhaust the block limits,` what could be the problem?&#xD;&#xA;&#xD;&#xA;I found [this solutions](https://substrate.stackexchange.com/questions/1639/upgrade-rococo-fork-error-would-exhaust-block-limits-no-pallet-scheduler/1640#1640) but I don't understand. It says to use `sudo.sudoUncheckedWeight instead of sudo.sudo`, where to use this and when?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/L0Q6T.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="40946" PostHistoryTypeId="1" PostId="10338" RevisionGUID="c14b2077-a947-490e-b02c-c27ac920e02c" CreationDate="2023-10-28T01:35:32.137" UserId="2844" Text="Why Transaction would exhaust the block limits" ContentLicense="CC BY-SA 4.0" />
  <row Id="40947" PostHistoryTypeId="3" PostId="10338" RevisionGUID="c14b2077-a947-490e-b02c-c27ac920e02c" CreationDate="2023-10-28T01:35:32.137" UserId="2844" Text="|substrate-parachain-template|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40948" PostHistoryTypeId="6" PostId="10338" RevisionGUID="4c7b5ad3-eb57-4da4-8e2d-8fac07223af3" CreationDate="2023-10-28T05:26:15.393" UserId="2844" Comment="edited tags" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40949" PostHistoryTypeId="50" PostId="9752" RevisionGUID="abd5a1a5-6471-4254-94fd-3f00bb94611e" CreationDate="2023-10-28T06:02:40.323" UserId="-1" />
  <row Id="40950" PostHistoryTypeId="2" PostId="10339" RevisionGUID="bc9cadc5-c9ea-4a13-913c-8e8345da6b23" CreationDate="2023-10-28T09:11:02.767" UserId="4769" Text="How to imagine a real Substrate application?&#xD;&#xA;&#xD;&#xA;I am trying to make an application, where you can trade your own product. You can advertise product, buy, list, see your earlier purchases, etc...&#xD;&#xA;&#xD;&#xA;If I start a substrate node on local, I am able to connect to it with my own front-end and place products on chain. But it is local... What about a real world application? Every users have to start their own substrate node, and after that they have to join to it with my front-end? I think it is a little complicated processing.&#xD;&#xA;&#xD;&#xA;Please, somebody clear it to me." ContentLicense="CC BY-SA 4.0" />
  <row Id="40952" PostHistoryTypeId="1" PostId="10339" RevisionGUID="bc9cadc5-c9ea-4a13-913c-8e8345da6b23" CreationDate="2023-10-28T09:11:02.767" UserId="4769" Text="How to imagine a real Substrate app?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40953" PostHistoryTypeId="3" PostId="10339" RevisionGUID="bc9cadc5-c9ea-4a13-913c-8e8345da6b23" CreationDate="2023-10-28T09:11:02.767" UserId="4769" Text="|substrate-node|substrate-front-end|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40954" PostHistoryTypeId="2" PostId="10340" RevisionGUID="e1e5a5c1-61f2-46f3-8775-6b777aa5f834" CreationDate="2023-10-28T09:18:52.833" UserId="29" Text="I am receiving the following error when I run try-runtime:&#xD;&#xA;```&#xD;&#xA;[2023-10-28T09:07:02Z ERROR remote-ext] Error = Call(Custom(ErrorObject { code: ServerError(-32702), message: &quot;Response is too big&quot;, data: Some(RawValue(&quot;Exceeded max limit of 15728640&quot;)) }))&#xD;&#xA;thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Input(&quot;rpc get_storage failed.&quot;)', cli/main.rs:334:6&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here are the full logs:&#xD;&#xA;```&#xD;&#xA;try-runtime --runtime target/debug/wbuild/kitchensink-runtime/kitchensink_runtime.wasm on-runtime-upgrade live --uri ws://localhost:9944&#xD;&#xA;[2023-10-28T09:07:01Z INFO  remote-ext] replacing ws:// in uri with http://: &quot;http://localhost:9944&quot; (ws is currently unstable for fetching remote storage, for more see https://github.com/paritytech/jsonrpsee/issues/1086)&#xD;&#xA;[2023-10-28T09:07:01Z INFO  remote-ext] since no at is provided, setting it to latest finalized head, 0x5778d49a8c226ae6df4cc6b78376b0b7de6495aa0246498a3deec67078151b97&#xD;&#xA;[2023-10-28T09:07:01Z INFO  remote-ext] since no prefix is filtered, the data for all pallets will be downloaded&#xD;&#xA;[2023-10-28T09:07:01Z INFO  remote-ext] scraping key-pairs from remote at block height 0x5778d49a8c226ae6df4cc6b78376b0b7de6495aa0246498a3deec67078151b97&#xD;&#xA;✅ Found 380 keys (0.01s) [00:00:00] &#xD;&#xA;✅ Downloaded key values 1,193.3986/s [=====================================================] 380/380 (0s) [2023-10-28T09:07:02Z WARN  remote-ext] key StorageKey([58, 99, 111, 100, 101]) had none corresponding value.&#xD;&#xA;✅ Inserted keys into DB (0.00s)&#xD;&#xA;[2023-10-28T09:07:02Z INFO  remote-ext] adding data for hashed prefix: , took 0.48s&#xD;&#xA;[2023-10-28T09:07:02Z INFO  remote-ext] adding data for hashed key: 3a636f6465&#xD;&#xA;[2023-10-28T09:07:02Z ERROR remote-ext] Error = Call(Custom(ErrorObject { code: ServerError(-32702), message: &quot;Response is too big&quot;, data: Some(RawValue(&quot;Exceeded max limit of 15728640&quot;)) }))&#xD;&#xA;thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Input(&quot;rpc get_storage failed.&quot;)', cli/main.rs:334:6&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;#### Step to reproduce&#xD;&#xA;&#xD;&#xA;Install try-runtime-cli&#xD;&#xA;```&#xD;&#xA;cargo install --git https://github.com/paritytech/try-runtime-cli --locked&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Clone polkadot-sdk and compile:&#xD;&#xA;```&#xD;&#xA;cargo build --features try-runtime&#xD;&#xA;```&#xD;&#xA;Run the node:&#xD;&#xA;```&#xD;&#xA;./target/debug/substrate-node --dev&#xD;&#xA;```&#xD;&#xA;Run try-runtime:&#xD;&#xA;```&#xD;&#xA;try-runtime --runtime target/debug/wbuild/kitchensink-runtime/kitchensink_runtime.wasm on-runtime-upgrade live --uri ws://127.0.0.1:9944&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40956" PostHistoryTypeId="1" PostId="10340" RevisionGUID="e1e5a5c1-61f2-46f3-8775-6b777aa5f834" CreationDate="2023-10-28T09:18:52.833" UserId="29" Text="try-runtime error exceeded max limit of 15728640" ContentLicense="CC BY-SA 4.0" />
  <row Id="40957" PostHistoryTypeId="3" PostId="10340" RevisionGUID="e1e5a5c1-61f2-46f3-8775-6b777aa5f834" CreationDate="2023-10-28T09:18:52.833" UserId="29" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40958" PostHistoryTypeId="2" PostId="10341" RevisionGUID="4f3a3661-670e-4192-af20-2a44dcffa502" CreationDate="2023-10-28T09:40:53.720" UserId="29" Text="You can think of it as the backend of your application. In web2 you do not ask your users to run your backend and similar here, we do not expect our users to run our blockchain. Where it differs is that you could run your blockchain yourself by running servers (probably in the cloud) that run your Substrate blockchain, or you could build a decentralized community that is incentivized to run your blockchain.&#xD;&#xA;&#xD;&#xA;The best place to start, for you, may be with smart contracts. Take a look at [Moonbeam](https://moonbeam.network) which runs Substrate and allows for smart contracts. So you would build your frontend app on top of a Moonbeam smart contract that you write that you deploy on the Moonbeam parachain (which is a Substrate blockchain running on Polkadot).&#xD;&#xA;&#xD;&#xA;OR even better, start here:&#xD;&#xA;- https://fleek.xyz&#xD;&#xA;- https://apillon.io" ContentLicense="CC BY-SA 4.0" />
  <row Id="40960" PostHistoryTypeId="5" PostId="10341" RevisionGUID="126383d2-fed7-4b1d-afb7-143388287917" CreationDate="2023-10-28T09:50:38.193" UserId="29" Comment="added 162 characters in body" Text="You can think of it as the backend of your application. In web2 you do not ask your users to run your backend and similar here, we do not expect our users to run our blockchain. Where it differs is that you could run your blockchain yourself by running servers (probably in the cloud) that run your Substrate blockchain, or you could build a decentralized community that is incentivized to run your blockchain.&#xD;&#xA;&#xD;&#xA;The best place to start, for you, may be with smart contracts. Take a look at [Moonbeam](https://moonbeam.network) which runs Substrate and allows for smart contracts. So you would build your frontend app on top of a Moonbeam smart contract that you write that you deploy on the Moonbeam parachain (which is a Substrate blockchain running on Polkadot).&#xD;&#xA;&#xD;&#xA;OR even better, start here:&#xD;&#xA;- https://fleek.xyz&#xD;&#xA;- https://apillon.io&#xD;&#xA;&#xD;&#xA;If you do want to build your own custom Substrate blockchain then you can start here:&#xD;&#xA;- https://paritytech.github.io/polkadot-sdk/master/substrate/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="40961" PostHistoryTypeId="2" PostId="10342" RevisionGUID="34cb4fa3-7530-481f-92e6-3bee929ecde7" CreationDate="2023-10-28T12:39:15.113" UserId="4854" Text="```api.tx.balances.transfer``` was working perfectly some time ago. I tried to re-run my testcase today and I'm getting this error.&#xD;&#xA;```&#xD;&#xA;const rawTX = api.tx.balances.transfer(alice.address, 30)&#xD;&#xA;                              ^&#xD;&#xA;TypeError: api.tx.balances.transfer is not a function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I didn't change anything here. I'm connecting to the local substrate node but have also tested with Rococo RPC wss://rococo-contracts-rpc.polkadot.io&#xD;&#xA;&#xD;&#xA;what is the issue here, I didn't even upgrade the polkadot version. My current version is&#xD;&#xA; ```&#xD;&#xA;&quot;@polkadot/api&quot;: &quot;10.9.1&quot;&#xD;&#xA;```&#xD;&#xA;I'm out of ideas any help is appreciated.&#xD;&#xA;&#xD;&#xA;here's the code snippet&#xD;&#xA;```&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    await api.isReady&#xD;&#xA;    const keyring = new Keyring({type: 'sr25519'})&#xD;&#xA;    const alice = keyring.createFromUri('//Alice')&#xD;&#xA;    const rawTX = api.tx.balances.transfer(alice.address, 30)&#xD;&#xA;    console.log(rawTX)&#xD;&#xA;   ```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40963" PostHistoryTypeId="1" PostId="10342" RevisionGUID="34cb4fa3-7530-481f-92e6-3bee929ecde7" CreationDate="2023-10-28T12:39:15.113" UserId="4854" Text="TypeError: api.tx.balances.transfer is not a function polkadot js" ContentLicense="CC BY-SA 4.0" />
  <row Id="40964" PostHistoryTypeId="3" PostId="10342" RevisionGUID="34cb4fa3-7530-481f-92e6-3bee929ecde7" CreationDate="2023-10-28T12:39:15.113" UserId="4854" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40965" PostHistoryTypeId="5" PostId="10342" RevisionGUID="5dc20844-e359-4fb2-a479-41e26a2874b0" CreationDate="2023-10-28T14:22:36.700" UserId="4854" Comment="added 398 characters in body; edited tags" Text="```api.tx.balances.transfer``` was working perfectly some time ago. I tried to re-run my testcase today and I'm getting this error.&#xD;&#xA;```&#xD;&#xA;const rawTX = api.tx.balances.transfer(alice.address, 30)&#xD;&#xA;                              ^&#xD;&#xA;TypeError: api.tx.balances.transfer is not a function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I didn't change anything here. I'm connecting to the local substrate node but have also tested with Rococo RPC wss://rococo-contracts-rpc.polkadot.io&#xD;&#xA;&#xD;&#xA;what is the issue here, I didn't even upgrade the polkadot version. My current version is&#xD;&#xA; ```&#xD;&#xA;&quot;@polkadot/api&quot;: &quot;10.9.1&quot;&#xD;&#xA;```&#xD;&#xA;I'm out of ideas any help is appreciated.&#xD;&#xA;&#xD;&#xA;here's the code snippet&#xD;&#xA;```&#xD;&#xA;    const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;    await api.isReady&#xD;&#xA;    const keyring = new Keyring({type: 'sr25519'})&#xD;&#xA;    const alice = keyring.createFromUri('//Alice')&#xD;&#xA;    const rawTX = api.tx.balances.transfer(alice.address, 30)&#xD;&#xA;    console.log(rawTX)&#xD;&#xA;   ```&#xD;&#xA;UPDATE: I tracked the issue, I had rebuilt the docker image that is using the [substrate node][1], I checked my code with old image and its working fine but with the new image the issue still persists. I still don't know why is this happening and I cannot use my old image as it doesn't have healthcheck. Any help is appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="40966" PostHistoryTypeId="6" PostId="10342" RevisionGUID="5dc20844-e359-4fb2-a479-41e26a2874b0" CreationDate="2023-10-28T14:22:36.700" UserId="4854" Comment="added 398 characters in body; edited tags" Text="|polkadot-js|substrate-node-template|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40967" PostHistoryTypeId="4" PostId="10342" RevisionGUID="724b126e-baf5-49a6-9c8f-7d9f1e6f4f08" CreationDate="2023-10-28T14:23:10.137" UserId="4854" Comment="edited title" Text="TypeError: api.tx.balances.transfer is not a function substrate contracts node" ContentLicense="CC BY-SA 4.0" />
  <row Id="40968" PostHistoryTypeId="2" PostId="10343" RevisionGUID="d5f1d6ab-f7c3-410a-894f-ae3a542fe870" CreationDate="2023-10-28T15:05:33.840" UserId="3470" Text="since Polkadot v0.9.42 `Balances::transfer` has been renamed to `Balances::transfer_allow_death ` ([PR][1]). This means you now have to either use `api.tx.balances.transferAllowDeath` or `api.tx.balances.transferKeepAlive`! :)&#xD;&#xA;&#xD;&#xA;**For reference, see the [transfer-helpers][2] in our [useInkathon library][3]. **&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/12951&#xD;&#xA;  [2]: https://github.com/scio-labs/use-inkathon/blob/main/src/helpers/transferBalance.ts&#xD;&#xA;  [3]: https://github.com/scio-labs/use-inkathon" ContentLicense="CC BY-SA 4.0" />
  <row Id="40970" PostHistoryTypeId="2" PostId="10344" RevisionGUID="5bfdb6bd-4137-41f7-bcc8-a33dbb757a84" CreationDate="2023-10-29T00:06:31.103" UserId="445" Text="`test_benchmarks` fail&#xD;&#xA;&#xD;&#xA;Repo: `https://github.com/paritytech/frontier`&#xD;&#xA;&#xD;&#xA;Command: `cargo t -p pallet-evm --features runtime-benchmarks`&#xD;&#xA;&#xD;&#xA;Issue:&#xD;&#xA;```&#xD;&#xA;failures:&#xD;&#xA;&#xD;&#xA;---- benchmarking::benchmark_tests::test_benchmarks stdout ----&#xD;&#xA;failing benchmark tests:&#xD;&#xA;thread 'benchmarking::benchmark_tests::test_benchmarks' panicked at 'create() failed', frame/evm/src/benchmarking.rs:96:9&#xD;&#xA;note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;runner_execute: Any { .. }&#xD;&#xA;thread 'benchmarking::benchmark_tests::test_benchmarks' panicked at 'assertion failed: !anything_failed', frame/evm/src/benchmarking.rs:149:1&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40972" PostHistoryTypeId="1" PostId="10344" RevisionGUID="5bfdb6bd-4137-41f7-bcc8-a33dbb757a84" CreationDate="2023-10-29T00:06:31.103" UserId="445" Text="Run benchmark fail test in pallet-evm" ContentLicense="CC BY-SA 4.0" />
  <row Id="40973" PostHistoryTypeId="3" PostId="10344" RevisionGUID="5bfdb6bd-4137-41f7-bcc8-a33dbb757a84" CreationDate="2023-10-29T00:06:31.103" UserId="445" Text="|pallet|benchmarking|frontier|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40974" PostHistoryTypeId="50" PostId="6900" RevisionGUID="9e270152-1149-4120-8ba6-78ece1d3248f" CreationDate="2023-10-29T05:06:11.167" UserId="-1" />
  <row Id="40975" PostHistoryTypeId="50" PostId="10067" RevisionGUID="5fd4cd6d-7e58-432c-a1ba-e40d0d1c2e16" CreationDate="2023-10-29T06:01:55.227" UserId="-1" />
  <row Id="40976" PostHistoryTypeId="2" PostId="10345" RevisionGUID="2c4bb0fc-251b-4b0e-a6f7-c8c33781f317" CreationDate="2023-10-29T10:06:43.003" UserId="4623" Text="I initialized a vector in ink smart contract like this:&#xD;&#xA;&#xD;&#xA;    bidders: Vec&lt;AccountId&gt;&#xD;&#xA;&#xD;&#xA;What is the best way to iterate over the vector?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40978" PostHistoryTypeId="1" PostId="10345" RevisionGUID="2c4bb0fc-251b-4b0e-a6f7-c8c33781f317" CreationDate="2023-10-29T10:06:43.003" UserId="4623" Text="How to iterate over a vector in ink smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="40979" PostHistoryTypeId="3" PostId="10345" RevisionGUID="2c4bb0fc-251b-4b0e-a6f7-c8c33781f317" CreationDate="2023-10-29T10:06:43.003" UserId="4623" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40980" PostHistoryTypeId="50" PostId="10075" RevisionGUID="2cc9f676-fda4-4a39-b8d3-bc5a180ebe28" CreationDate="2023-10-29T16:03:05.360" UserId="-1" />
  <row Id="40981" PostHistoryTypeId="2" PostId="10346" RevisionGUID="6672e7ad-a18d-4b33-9f1a-ee618194631d" CreationDate="2023-10-29T20:06:54.673" UserId="4862" Text="I was referring the substrate documentation on [preparing a local relay chain ][1]. The documentation has provided a sample plain chain spec with two validators alice and bob. I need to hardcode an additional validator. I think i need to add something like below in the keys array in the chain spec but i am not exactly sure what would the values for beefy, granpa etc would be.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;                [&#xD;&#xA;              &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;              &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5GoNkf6WdbxCFnPdAnYYQyCjAKPJgLNxXwPjwTh6DGg6gN3E&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/&#xD;&#xA;  [2]: https://docs.substrate.io/assets/tutorials/relay-chain-specs/plain-local-chainspec.json/" ContentLicense="CC BY-SA 4.0" />
  <row Id="40983" PostHistoryTypeId="1" PostId="10346" RevisionGUID="6672e7ad-a18d-4b33-9f1a-ee618194631d" CreationDate="2023-10-29T20:06:54.673" UserId="4862" Text="Hardcode additonal validator in chainspec" ContentLicense="CC BY-SA 4.0" />
  <row Id="40984" PostHistoryTypeId="3" PostId="10346" RevisionGUID="6672e7ad-a18d-4b33-9f1a-ee618194631d" CreationDate="2023-10-29T20:06:54.673" UserId="4862" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40985" PostHistoryTypeId="2" PostId="10347" RevisionGUID="8bc5f2b7-10cb-4077-b2f9-ed2fcc80738d" CreationDate="2023-10-29T20:33:47.087" UserId="165" Text="Within your [`chain_spec.rs`](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/bin/node-template/node/src/chain_spec.rs#L130) file you can find the types for those keys.&#xD;&#xA;&#xD;&#xA;In the linked example we have &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;initial_authorities: Vec&lt;(AuraId, GrandpaId)&gt;,&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In you case you will just need to declare the type for each key that you are using.&#xD;&#xA;&#xD;&#xA;Another example with more keys defined can be found [here](https://github.com/paritytech/polkadot-sdk/blob/7035034710ecb9c6a786284e5f771364c520598d/substrate/bin/node/cli/src/chain_spec.rs#L248)&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Helper function to create RuntimeGenesisConfig for testing.&#xD;&#xA;pub fn testnet_genesis(&#xD;&#xA;	initial_authorities: Vec&lt;(&#xD;&#xA;		AccountId,&#xD;&#xA;		AccountId,&#xD;&#xA;		GrandpaId,&#xD;&#xA;		BabeId,&#xD;&#xA;		ImOnlineId,&#xD;&#xA;		AuthorityDiscoveryId,&#xD;&#xA;		MixnetId,&#xD;&#xA;	)&gt;,&#xD;&#xA;	initial_nominators: Vec&lt;AccountId&gt;,&#xD;&#xA;	root_key: AccountId,&#xD;&#xA;	endowed_accounts: Option&lt;Vec&lt;AccountId&gt;&gt;,&#xD;&#xA;) -&gt; RuntimeGenesisConfig {&#xD;&#xA;// snip&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40987" PostHistoryTypeId="2" PostId="10348" RevisionGUID="c222c9d6-0060-4d0d-8090-d5b1d690ab37" CreationDate="2023-10-29T20:46:24.757" UserId="165" Text="Any parachain in Polkadot could benefit from BridgeHub systemchain, though in your case being a solo-chain I think you will want to look for solutions like https://github.com/ChainSafe/chainbridge-core for instance.&#xD;&#xA;Depending on the features your solo-chain has you could be looking to deploy other flavors of bridges." ContentLicense="CC BY-SA 4.0" />
  <row Id="40989" PostHistoryTypeId="2" PostId="10349" RevisionGUID="4c9d7aa3-1912-4a1f-92f4-c6fe04529f82" CreationDate="2023-10-29T20:59:53.190" UserId="165" Text="Have a look at [`pallet-authorsip`](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/authorship) and its configuration in different live runtimes if you need examples.&#xD;&#xA;&#xD;&#xA;This pallet provides what you are looking for.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="40991" PostHistoryTypeId="2" PostId="10350" RevisionGUID="856f4d7c-34c7-4cb9-a93e-6feb13a9d611" CreationDate="2023-10-30T00:26:46.173" UserId="116" Text="I'm trying to attach the lldb debugger (from VS Code) to the new try-runtime client. However the breakpoints I setup inside the chain code on `on_upgrade` are never reached (Obliviously because they are running from wasm code)&#xD;&#xA;&#xD;&#xA;launch.json:&#xD;&#xA;&#xD;&#xA;        {&#xD;&#xA;            &quot;type&quot;: &quot;lldb&quot;,&#xD;&#xA;            &quot;request&quot;: &quot;launch&quot;,&#xD;&#xA;            &quot;name&quot;: &quot;Debug try runtime&quot;,&#xD;&#xA;            &quot;cargo&quot;: {&#xD;&#xA;                &quot;args&quot;: [&#xD;&#xA;                    &quot;build&quot;,&#xD;&#xA;                    &quot;--features&quot;,&#xD;&#xA;                    &quot;try-runtime&quot;&#xD;&#xA;                ],&#xD;&#xA;            }, &#xD;&#xA;            &quot;program&quot;: &quot;/home/user/.cargo/bin/try-runtime&quot;,&#xD;&#xA;            &quot;args&quot;: [&quot;--runtime&quot;,&#xD;&#xA;                     &quot;./target/debug/wbuild/runtime-icecream/runtime_icecream.wasm&quot;,&#xD;&#xA;                     &quot;on-runtime-upgrade&quot;,&#xD;&#xA;                     &quot;snap&quot;,&#xD;&#xA;                     &quot;-p&quot;,&#xD;&#xA;                     &quot;snapshots/icecream&quot;&#xD;&#xA;&#xD;&#xA;        ],&#xD;&#xA;            &quot;cwd&quot;: &quot;${workspaceFolder}&quot;&#xD;&#xA;        },&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is there any way I could setup the debugger to try-runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40993" PostHistoryTypeId="1" PostId="10350" RevisionGUID="856f4d7c-34c7-4cb9-a93e-6feb13a9d611" CreationDate="2023-10-30T00:26:46.173" UserId="116" Text="How to debug try-runtime with the new try-runtime client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="40994" PostHistoryTypeId="3" PostId="10350" RevisionGUID="856f4d7c-34c7-4cb9-a93e-6feb13a9d611" CreationDate="2023-10-30T00:26:46.173" UserId="116" Text="|try-runtime|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40995" PostHistoryTypeId="2" PostId="10351" RevisionGUID="357e5194-f208-4b67-8f8c-8e766a5c79ca" CreationDate="2023-10-30T01:07:57.353" UserId="116" Text="In a recent upgrade of substrate try-runtime begun to return errors and fault which could previously be ignored started to catch my attention.&#xD;&#xA;&#xD;&#xA;What could be possible sources of this problem:&#xD;&#xA;&#xD;&#xA;&gt;[2023-10-30T00:48:19Z ERROR try-runtime::cli] failed to generate compact proof: TrieError(InvalidStateRoot(0xf5a724024e2b3ff6914d9d191f1d2794bd76413a5f298aa5e8ebbe7fbaaec820))&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[2023-10-30T00:48:16Z INFO  remote-ext] Loading snapshot from &quot;snapshots/eden&quot;&#xD;&#xA;✅ Loaded snapshot (0.70s)&#xD;&#xA;[2023-10-30T00:48:17Z INFO  remote-ext] initialized state externalities with storage root 0x953ab4b56c3cbb2d920e4d8fbf4d0c8303159c267cd05c6b9149ae579a055737 and state_version V0&#xD;&#xA;[2023-10-30T00:48:17Z INFO  try-runtime::cli] Original runtime [Name: RuntimeString::Owned(&quot;nodle-para&quot;)] [Version: 23] [Code hash: 0xae58...e0f9]&#xD;&#xA;[2023-10-30T00:48:17Z INFO  try-runtime::cli] New runtime      [Name: RuntimeString::Owned(&quot;nodle-para&quot;)] [Version: 25] [Code hash: 0x782b...0990]&#xD;&#xA;[2023-10-30T00:48:17Z INFO  try_runtime_core::commands::on_runtime_upgrade]  Running TryRuntime_on_runtime_upgrade with checks: PreAndPost&#xD;&#xA;[2023-10-30T00:48:19Z INFO  runtime::frame-support] ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`&#xD;&#xA;[2023-10-30T00:48:19Z INFO  try_runtime_core::commands::on_runtime_upgrade]  TryRuntime_on_runtime_upgrade succeeded! Running it again without checks for weight measurements.&#xD;&#xA;[2023-10-30T00:48:19Z INFO  runtime::frame-support] ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`&#xD;&#xA;[2023-10-30T00:48:19Z ERROR try-runtime::cli] failed to generate compact proof: TrieError(InvalidStateRoot(0xf5a724024e2b3ff6914d9d191f1d2794bd76413a5f298aa5e8ebbe7fbaaec820))&#xD;&#xA;[2023-10-30T00:48:19Z INFO  try-runtime::cli] PoV size (zstd-compressed compact proof): 10 B. For parachains, it's your responsibility to verify that a PoV of this size fits within any relaychain constraints.&#xD;&#xA;[2023-10-30T00:48:19Z INFO  try-runtime::cli] Consumed ref_time: 0s (0.00% of max 0.5s)&#xD;&#xA;[2023-10-30T00:48:19Z INFO  try-runtime::cli] ✅ TryRuntime_on_runtime_upgrade executed without errors or weight safety warnings. Please note this does not guarantee a successful runtime upgrade. Always test your runtime upgrade with recent state, and ensure that the weight usage of your migrations will not drastically differ between testing and actual on-chain execution.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The project is a parachain and the above error is generated with *Substrate's programmatic testing framework.* like this:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo build --release --features try-runtime&#xD;&#xA;~/.cargo/bin/try-runtime --runtime ./target/release/wbuild/runtime-eden/runtime_eden.wasm   on-runtime-upgrade snap -p snapshots/eden&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="40997" PostHistoryTypeId="1" PostId="10351" RevisionGUID="357e5194-f208-4b67-8f8c-8e766a5c79ca" CreationDate="2023-10-30T01:07:57.353" UserId="116" Text="Try runtime failed to generate compact proof: TrieError(InvalidStateRoot" ContentLicense="CC BY-SA 4.0" />
  <row Id="40998" PostHistoryTypeId="3" PostId="10351" RevisionGUID="357e5194-f208-4b67-8f8c-8e766a5c79ca" CreationDate="2023-10-30T01:07:57.353" UserId="116" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="40999" PostHistoryTypeId="2" PostId="10352" RevisionGUID="71077816-bd86-470b-8d2e-2b0fc35bdf53" CreationDate="2023-10-30T03:18:31.097" UserId="318" Text="`try-runtime on-runtime-upgrade --help` suggests: &quot;Performing any checks will potentially invalidate the measured PoV/Weight.&quot; Suggest running it separately with `--checks=none` to check the POV/Weight." ContentLicense="CC BY-SA 4.0" />
  <row Id="41001" PostHistoryTypeId="2" PostId="10353" RevisionGUID="db187902-ca4a-4e0f-9461-52a1e57e2dff" CreationDate="2023-10-30T03:25:12.257" UserId="318" Text="Not without significant change to `try-runtime-cli`. Suggest using logging for your debug." ContentLicense="CC BY-SA 4.0" />
  <row Id="41003" PostHistoryTypeId="52" PostId="10346" RevisionGUID="695fd6b0-2569-4c9d-868f-d88699b2a6fc" CreationDate="2023-10-30T04:08:50.513" />
  <row Id="41004" PostHistoryTypeId="2" PostId="10354" RevisionGUID="e34d63c1-aac5-4a0b-a3a0-f07ccff2732c" CreationDate="2023-10-30T05:02:26.950" UserId="4863" Text="StaFi chain has been running stably for a long time using version v2.0.0 of substrate, and the current version is v0.6.2. But the finalized block suddenly got stuck. Can check details here:&#xD;&#xA;https://telemetry.polkadot.io/#list/0x290a4149f09ea0e402c74c1c7e96ae4239588577fe78932f94f5404c68243d80.&#xD;&#xA;&#xD;&#xA;More information:&#xD;&#xA;&#xD;&#xA;Code: https://github.com/stafiprotocol/stafi-node/tree/v0.6.2&#xD;&#xA;&#xD;&#xA;Subscan: https://stafi.subscan.io/&#xD;&#xA;&#xD;&#xA;Apps: https://apps.stafi.io/&#xD;&#xA;&#xD;&#xA;We didn't find any error or useful logs for this. And we also tried to use the grandpa.noteStalled function to try to restore((https://stafi.subscan.io/extrinsic/0xe4431deafd133d9cdfcd952a610b58cad0a53ce026d33c83e7c90b91a6efbb2a).), actually we even tried multiple times using higher height, but all didn't work.&#xD;&#xA;&#xD;&#xA;About the GRANDPA round state,&#xD;&#xA;&#xD;&#xA;    curl https://stafi-rpc.stafi.io \&#xD;&#xA;     -X POST \&#xD;&#xA;     -H &quot;Content-Type: application/json&quot; \&#xD;&#xA;     --data '{&quot;method&quot;:&quot;grandpa_roundState&quot;,&quot;params&quot;:[],&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;}'&#xD;&#xA;&#xD;&#xA;The result is:&#xD;&#xA;&#xD;&#xA;    {&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:{&quot;background&quot;:[],&quot;best&quot;:{&quot;precommits&quot;:{&quot;currentWeight&quot;:0,&quot;missing&quot;:[&quot;5C6aCJLKMX26VrgWUyCGBWu8mv6nxuXwMm6Fc9znDXBiyS4r&quot;,&quot;5C6iPsqiYwdFaKHydnYjVz7e95oY3tWCCD999H5e4NopCEiq&quot;,&quot;5C77whr2H4GEqrv7QFXCXnSa3FAWEUGSTTdYKCbaNN5KRKXC&quot;,&quot;5CEgrkayB6z7V547jv3VdzP4Kts7299xB3Yu3koJ4ztCPKb8&quot;,&quot;5CGptCyfLjvC42My8cPKfRadSyGcZNMtQUsS4KmmLiMevAYJ&quot;,&quot;5CH9PxoqR1CdL5gXnhEqiHhx5ykre4ZaEY58NtCKPjCRYecR&quot;,&quot;5CHDkm33a6wawMagg7M4CGpeYXtYWgbsWRPzrs4iFGTU4S6j&quot;,&quot;5CKjcnHcCspYD974BDJ8JWXcL3Xt1DxuPbhQkE1RvcnuUTBK&quot;,&quot;5CLJTem1DvDwmbRiWwX43KXHyYY5SWZ2f2KpJwFiX2zy9u9W&quot;,&quot;5CMDtbm4XM9W617XnRUC5YvDHTpUYHHqXuSwU6omfGEgfxAY&quot;,&quot;5CMf5pWBYBnaag7qVHhfXAeJKsx28Dufo6Z1ekMd8fDqCzpY&quot;,&quot;5CQbFzpuv45gFRE4QKtEmPGskk7FCeU6trdSyTJFukYUZQcA&quot;,&quot;5CU7UvWgaqbhbH2FxgPh8bn4YXjmkpsiSKLzXh425fKeCeMQ&quot;,&quot;5CYFfX66GcHfdTRMw1XgS226GJvdvaq8SmsnqFQerRPKJZr5&quot;,&quot;5CYUkvh2jmQkgm4AT6YvwLDaE7CJK3zmkg7ZtUvavmGsFSQF&quot;,&quot;5CaBuc5t3hUHWfeR5hzLSn7DKhyZkEDZPZamkTwAyGewkMVp&quot;,&quot;5CbTsqZ4mivxxC6mP4Lok99FcLxTi2aKNAMUFEEiR8d966CU&quot;,&quot;5Cbbzng1xa9gaKuGv5uvRyHDcEUfJyyGpPhfYf6szAykUzGP&quot;,&quot;5CdHYrqsTYmWDoQTE378Y43deqgBccTPRR6Da7tttESSP3GP&quot;,&quot;5CeCBEcBEVAijVq8UfDwb1pE7ecu5hBZbw2EL6BgGxgco4pb&quot;,&quot;5CfLQDTeEF6T3XaMnUbqtDavp6CZ52Hmk5Hz2Fk6mpoHrH5g&quot;,&quot;5CfaUE5tfk8U9wJeD7MEKBsQHyuF9QVSetNiBzDhZYpPcPh5&quot;,&quot;5CgWrhMkTMnoocdN14832aS1MSbkzX5x8BWeHheeESjUNkXQ&quot;,&quot;5CgypggyXgs6DAF7GS3qrNFE23QG1WkqJNf8VWKgNvVDxHep&quot;,&quot;5CigHitVJtDu3GAPw3d6xGGf3kTnhDwHQcmYMcbXWxzb1qau&quot;,&quot;5CkUvBBYtLKCxetHZ9V8MTnKSjoHGuBQaaTzCSz7Y5eWGwWD&quot;,&quot;5CoRZZLMnwD2GXUHkAyFeQrHVkUHDPWQCmySpnsf2b86Ybpp&quot;,&quot;5CrTcCRMBQ5RPwGJ7ew5C89PB9MpPg6q1jHUGMDqDRS71ZFs&quot;,&quot;5Cu7KaNzkhKMjuz3KdGuRXyCxUSbt3oLRFWFKvXZLQPTSQph&quot;,&quot;5CwezFdooNCR5jcFi1q6ruLXBYynZczw1KLnkYvjoncYwe4X&quot;,&quot;5D3MSZ89shhZtr8SFbqf6w54cRSQPRvQY4SbEMq2H25yA6tg&quot;,&quot;5D43eVvZeQgKWKPUDEBt2PYYDVWtdFPrNT9cuomQvNrAkpcr&quot;,&quot;5D5hiWsdwL1227pK7PNvkHpnw3hRQLKXQEqy1sXvL3HFyDEy&quot;,&quot;5D5mFWCfZjcZ6qq558in79fz1r6v6K54TwhUn8FTukzrymuQ&quot;,&quot;5D6GqWTm2Ry97aU6AtHXZLwbZNVCB49kK4kpLfxAGmn5QCDz&quot;,&quot;5D77y3kk2F4WeVGPFGNKHj9KqFDkL3Be78sBN1jLwQ2MNRJm&quot;,&quot;5DCAzhXx1xH6dcbcLCmpNv9HU4kwriEzSKJmLunGJDT4rcZj&quot;,&quot;5DFyPTcYq2UeQyfD7wW1qxWghjDbfkg1jCZDDNXpqz9Dqmdn&quot;,&quot;5DHG85ALQLBZEv5VcJS4PHf3JuURoVYSZ8Vky43s2ez9kNnc&quot;,&quot;5DKV3RdcGuC8YszRNhdF1h6NsfpYSUpxLjMUTGuLKFoWXntq&quot;,&quot;5DLDwu8BA1nF3243Htp8BprXrbwY47WFBP5uDMWKKjTMdBjb&quot;,&quot;5DM9HDFujkCJyHCno68C8qeLX43KbafRdLBzyi1hwzrYdfn1&quot;,&quot;5DNrhBQiYfCK4gKSPKQhym5W3JWnuWDYkLVhCNWW2PdeTZYJ&quot;,&quot;5DQDJamT5h7vTjKbhQvEzhHnp1Qm6r3ThxbtdTrK82sT5kQ4&quot;,&quot;5DU4ykjP5YtuPrCsMmZd7FRkMSVJzv8GoQ6oRsREhUPtf2wx&quot;,&quot;5DUeSNipPoh4JV7uVpN6AjxYNa8jPyMYA5KutQuPe5F26Bsm&quot;,&quot;5DYYLvzZ7KyNGmaiSCsxTgnhoAdYD916bBktJQ6bLRYpon29&quot;,&quot;5DZ16AhB2C56oNGhK4SsVUbMQ4w4fXGFR9i94BjryS6gGewH&quot;,&quot;5DZXPZG7jENTGEietsJv3GNoZjhJkUXVW7wcVkfADfxhuEdE&quot;,&quot;5DcJ48Tw5WsYULGjU6AGFWRq7T7f2ShNPEbp2Snp9VAd3Wj5&quot;,&quot;5DeBfxVzRXZPchtU1JwuKFwb4ybzh7PaABTWDPuoNhynmUVi&quot;,&quot;5DfwGhCQUDTEyZQBXJMm9gVF6K8KZNYRcTLJtCNoLaTn3X7o&quot;,&quot;5DgwgFj1NXC9dm3HZArna6rW9T3aAKZC5ZfvZM5kwtBirDN9&quot;,&quot;5DhHepwhWomV6ysktT12KJ818F3X6StwmBNwMYdPZecf2cmx&quot;,&quot;5DjqAz7EyjHttZDP972zP4RT3Fmn4hsexg5LoD7qhpsdGi65&quot;,&quot;5DqLoPQNxSBqhKxStFmsX9LHyq6TqS1Qbhg9mKBk1ZZM4iX7&quot;,&quot;5DrVCAcuRrbt6JFXGijxXupvBbcH9YQPcS7FCk6zZRtPxDts&quot;,&quot;5DsMNJNQas581gjpkSx5ZZiDSavKwhnksogwrU1Haz26DQ5f&quot;,&quot;5DxRcRUuGqrGxG1uMG45FKVSVsc39UWUfSqzWiK79wvF8Sb1&quot;,&quot;5DxxJYA3J6nUjShY4ZWZYsm4b7KbKFLiPpqLmNT5rmq1ozSK&quot;,&quot;5E5ZUXUwvS5zsV86vgYRfsdD77qta3uKnTvYMohg6ZkakC1u&quot;,&quot;5E8RRWQp1EUbhoWYwbKc36dCAvWchCtsMTPxkQffj7awBQkz&quot;,&quot;5E9Sru6GEbiDjq4CiZuf2r77JViHEdVbjbdGaBhwGfXfFw9e&quot;,&quot;5ECjdwFTgwZ59973WFa2Epui6vmm6mj867H2oX6nG6MPC5gL&quot;,&quot;5EEdXcAxmDWLEZxzQZSZYBGxNoj1RAy8hAVw9FRqqBpSpmaZ&quot;,&quot;5EHWX4FAVTEzzCxFqcvhj4sdtcqkMdVhgNggk1Sf9ZXnUQYA&quot;,&quot;5ELTnqE1MMxnYCq54hLwQ4vUSXWLyUqDpHxBLpkkCfs7WyeD&quot;,&quot;5ENNUCoTrovy5QC7kMA3Tc7mRMVaBVpBYuwtxiHZ71v2jGZa&quot;,&quot;5ESnrMXJnp4Hjkv7gmbvUmXYbA1Udfher13fAiNWgaTKwtp9&quot;,&quot;5EWNkZYTrA65pfjwbSScMUk7cWM6WKTbUsdrr2Rz4sBF8XWL&quot;,&quot;5EZ4ERq36gwnLLJzNvtYVmLLU7XEcGUBJcfDe5jypVPd1i1i&quot;,&quot;5EbLYciVfxXHoh5QZadWPH9nmAEA6hAnW2dArKMTx4fjYoZH&quot;,&quot;5Eci1K8B1m6eEWaiqsr4xvb6cg6tajW9GTcnz6GrpYqUYfBK&quot;,&quot;5EkdkAeBynRZNn7AiE3f6zKnZjco5tuyVN1NFAxmLoePX5DP&quot;,&quot;5EkguJE7pbwi88YHjDh8GkDbgtFJf65qnGyzHJTSFfxT3JPt&quot;,&quot;5Eo8nBRNuLaerm5TrFDWrbBGLGu65WY8iKsjdYLTrTHkz2zr&quot;,&quot;5EoXzBrWfTRAePhGeznVKjvY4rWAzyfk33871Bb3cWQgHVc5&quot;,&quot;5EroE5BJV7n93Z4D9dmpaARa817iHQJ1UyauoYmJFZppKDUB&quot;,&quot;5Erq9uUZt5jyhBVDZ4d3pHYperB6KXo8pH2rDnnQPN4VwPSu&quot;,&quot;5EtZ1a2Fq51MzTgU8fJuY3yADytSfRq2N9svjVv1xTMpnkY1&quot;,&quot;5EvtGF6W1Xws4ouGdPofgJNFCT6nHR3o3h9oUCkjyUEBsDTk&quot;,&quot;5F3uDi2ghwFEXEoPMNGiwZmPz6C7DpYdYBejSPjeTwnvrUAK&quot;,&quot;5F4HbX6C7NRkmuiDZULMoehGTkywNKwMsx9qbCv36QnTEUSb&quot;,&quot;5F914LRb584dKbz3rakrcB3Uhnk9DyZYfxPL8J8meUX3sLeH&quot;,&quot;5FA8sjGw8keLJnc1e1fCPgs653QaX7iTPfUPst9PFnSeGxbt&quot;,&quot;5FBrPeS4tdK4GyaqVXDN2FKMP5KzYPdf9z844gAkDJtPvevH&quot;,&quot;5FGQCahYL2jBTPsAw7x9trSWGkDETTNiz51sr25QMW2hgh7A&quot;,&quot;5FJr162Efkw1VQXZHzKpNptrpCnr4fhAyn724pvpyAmGKXb6&quot;,&quot;5FMfXdTNyDRuL2C8dhTWBbZfYXf3TBjNXpA2tvadggGRtAhh&quot;,&quot;5FPmy3YjGdWZm3roYNUrFVAeZa1GjbubWs4SccxW4xk1BHV6&quot;,&quot;5FPsTKk3uhfrSEtJ3YHo7NnTRoktcUybd1AceKhMniLvjSGn&quot;,&quot;5FQ93DD4nAfR6LmPK4oHE8Sg5MhHSjt31kJTzhg7L3hzfmEd&quot;,&quot;5FSCwHAdwuJyn1bJ6QA7QaF2YERdMHZLCkkC5p7iXqHpkapp&quot;,&quot;5Fa6DVLQfvHe5K5ZKZNsCBnNF7aQaWLP7YNLLc6VJBocZBWC&quot;,&quot;5FbqdfDvdEMU1c24hsyBGjdNt4FT9A6QkiSVpfz5mGm4qHVj&quot;,&quot;5FcY1F9o9kx5ZwcvYdHuRQ1cgVHA47A435N5SgpeThLgYfkY&quot;,&quot;5FcjA9UriUwjKxiNHKN4ksPFqaATRPW9vAUxytfK1V34ektM&quot;,&quot;5FdeKnHxCFDmhAMHwWZKUv4hMseXTxNVDS613YMdRsZcV9ca&quot;,&quot;5FeaGCh2iwy7pU2nUHFQ8yLGYdujURCU9kyadhW8x95TekA3&quot;,&quot;5FgCjHUF45dEqw5wAAyuciCUFEs4y53WHQysfSK1Kq2EEFrx&quot;,&quot;5FiqJD5egss5dKquDJXbGobyzThiQqQcPTSAJwavy1R26c5P&quot;,&quot;5FjbApWu1dMdYTdRCxoS8ni3woS2UbhftgYXWWR2edtqQ1Dt&quot;,&quot;5Fm4DozqYZaUkYUekj9sDCYpuG3TXtVqci4jrU79yC3acTyq&quot;,&quot;5FmBzzPq1cLKirE7tCv3JoM3UVy3a62rJFish8tFLnipVJa9&quot;,&quot;5FmLtqymKPK2dDBYfq2qe7iomCZLq9eyyaSGmBmsYaZv9pv1&quot;,&quot;5FoiAwAFd6EybrzRMZffGPqLr1ccWsZA92ZNKvp4q5ZQcCeW&quot;,&quot;5FoidQ5KHELQCfj7YsHRBLXW7YMDRiirkLYhTybGQmHhYrev&quot;,&quot;5FqQxvjui7uuAcVq7RcJFVBL1sphH44YTRN7Mdn8aqBCv6dD&quot;,&quot;5Fr5PH4198YgsudLPgfGvmGcYVYx6DwPfNXDncPMCWqW4kAi&quot;,&quot;5FtVb6D6zuLQMEt2S83VsjNra1BFRoYgrGsm6yqRHDBeK447&quot;,&quot;5Fu5J9E1TuNcwu8LDk5sdZihx9subju329ChDMXyKAPCPjL4&quot;,&quot;5FxepAXJtyxNxkJvVvwnpssQHiBQcunRoN7BSqmFa2hQ8Qbv&quot;,&quot;5FzyvzWqL73NM1QviAyrCAHKx4V8mEzbTSr7CnvyzhUyAy8e&quot;,&quot;5G4DN9gaKh48LraEQNNhKKGBiWHq3hXr9haPaHpRLEcsQXpk&quot;,&quot;5G8yJv4XemYeNFc253HCy4kZbDR8DPSoqrMM9kP9GWnn226s&quot;,&quot;5GBVSftmUYbpHQdxDMxH4aVJs1s4Z3g3bHTYhP9X4kMnyg21&quot;,&quot;5GC9BJfGXihQ2nUSarfFZ4zdM6KiTeZZLLScUVHHr4voAPVm&quot;,&quot;5GCJTafeJRyAMp7cAEjQwVTFNmBVh9vUX8Jq8MAyXCwwkJLm&quot;,&quot;5GDKAHHBprcmVgPqDJQzy2sPaShVS96No5JqTwiPcRDWnNUz&quot;,&quot;5GGE5mdUM2dncReKfLLbLizqYPSokNz4Tj4Z2n8Kr7DLPrqE&quot;,&quot;5GGscd7C9EJdb9KJ2Cv9VfwQsERSPiNCdzybWsvJ8WnLB9jW&quot;,&quot;5GJTkvpQgU8RJwBAiAFnYP4inov6n6Zir2QTPNuwn1C1V4MH&quot;,&quot;5GMvuYcVXDZ7s17aCu2eLSc9vS2YaGoLoHB5Di4DTAPYnpx2&quot;,&quot;5GNpMeddxEyxj5bqqJHemEuz11LiAzb6PvAiY976X4WvNMfW&quot;,&quot;5GP7prKCRVuSVkq48VRU98dMP9urPFqF4zq5TAG6rbQUNwv7&quot;,&quot;5GSE35fHbBY8zdWNjG32auZ7sEBmCwyg3ejaCRSC6WdgdZxB&quot;,&quot;5GVsAxku9Ps7XoXFaVgEKdRHtgPzKVeuVsWUuDJ4z8ko3Bwt&quot;,&quot;5GYAJ8wjQiLsiofoHWdGFjJMnPvuayKLXUfxA745XakPKQNA&quot;,&quot;5GaMMwVnvDD3GnPLw1TVxzQG79m5U6EJGfiQYJd7CEG9ATXh&quot;,&quot;5GbtyseKmhUmQGa9k3z2UVpPx15A3yE2cAr6T7SKLDyBgS5Y&quot;,&quot;5Gk5JCbDs3JJtJEoNPQPj2rXBCE73UaYso2EfHZJ8uZKxcbz&quot;,&quot;5GkvH2KtWZGmkjzcTyHUr5GQcwhUJBKdXb8CCYV4i6am36xq&quot;,&quot;5GqcxpuwsoGqfMdkcmrS6Q13qDUcwkajeFGYTpQ5eUk3gjkp&quot;,&quot;5GrBDB6zjmQUSQgyGALr7CVUC44MFaArzo7TxxiqWbo8iL2E&quot;,&quot;5GunHjFHvFtBtKyiJszJkRBjQJ1JcZDupChbyGj5i5WxrwLU&quot;,&quot;5GwmAdQjEEr4iK7QT5FwTo9FrQvYSRiXmdCshkwYTCkGAin3&quot;,&quot;5H6PBYLnyj2XCLyJSxxtQ8GeSs6GHixw3qApLHovdV2gsNcc&quot;,&quot;5H72kw7M8KBQtmrpLh1Sx5rFSzKbn6ZbCMmfnKFjYBD7Umsd&quot;,&quot;5H8wCzaF4zSb2i1yj9Vdsbm4S612JBpq83ZWZXnwUukzxogQ&quot;,&quot;5H9WEykwSHmnCWUgCUwnqa9EorVt317DXHH49LCFkg8pvYEk&quot;,&quot;5HBoJbp4hTrGHhuxxwyYHaYMzeVnocbUcmE9joL2UNb4jLKU&quot;,&quot;5HBvshYQ1bHBEjTSNk7LhyM9Nb4wEiqMYVjH1pAutBrJecon&quot;,&quot;5HDgkH427uXtA8q1RcU6dNDsYdPFjYMhMEhrMb2R15dbLW8f&quot;,&quot;5HErtXo2LRVovBgMD6YF5CPUKgK6ZXRBKx8vj1kw2advTraH&quot;,&quot;5HGm8NwjzYmnHPSea5duXTzycvhWYwqjANGk4pmNZhv9EQ4h&quot;,&quot;5HGrncYcXzwr9FJet1S2xn4WgbSrKj3WZV3rfnyBqKsufC2f&quot;,&quot;5HLwyatqk2SGGUX4NVVq5zuT6woCFdrm4DsiAL98YJLSbsbv&quot;,&quot;5HSdfeX1uYLi6NrmTifJwZajS2zE2ZTd7jakHLPgzaqaZF2V&quot;,&quot;5HSjaKhotDaemQXuQhrfPHmKgHvkgF4W8C9uZh9yD6wVZUMw&quot;,&quot;5HTnsJvULhTyyKHtb1ZCHqij6S5S1Va1mVG3JGED8FDRY3HC&quot;,&quot;5HW5gNSyv2xRXdpsQKXDvM6AJfNYxLi1V3vVacEk3tzFEMHz&quot;,&quot;5HZ6XfWFX6STZFcaV67kST5GXkywG2k6FV8PfTiqCGEioQ1c&quot;,&quot;5HZBqryUGJuNJUG7e5oY6M1p4zp9HtEP9cAVMmnynJewUqD7&quot;,&quot;5HZn9cXLhLJXBGsdZJPt2YT2HbpQ1TFWP3uRYHHjnzWRo1eu&quot;,&quot;5Hcgj3Qa7LmMpwcGSCGg8N77uvkro7fZvbnj9hqi9poqMCDR&quot;,&quot;5HjivUtH2soVtHUpeRFaN9YB7cP3iWT2Rr1Nvaaf3j9yET22&quot;,&quot;5Hm8JHGGSt91tKnkELfGqZpW2guZoWsDnbuG7cDJJ3my8Nu2&quot;,&quot;5HoLuWtGTmsV1e9EfKEuuf82x4cf7nyYJLBz7fvrxhVh5nqg&quot;,&quot;5Hp8Ckt5kjxhGkaRJapBXQ7fduR1U4XeJkfB51jezfL5DsnS&quot;,&quot;5HpasZqGuvQwL1UFLx9YABK8nhwnerkBsQ12p3VBHKVNRNsH&quot;]},&quot;prevotes&quot;:{&quot;currentWeight&quot;:101,&quot;missing&quot;:[&quot;5CHDkm33a6wawMagg7M4CGpeYXtYWgbsWRPzrs4iFGTU4S6j&quot;,&quot;5CKjcnHcCspYD974BDJ8JWXcL3Xt1DxuPbhQkE1RvcnuUTBK&quot;,&quot;5CLJTem1DvDwmbRiWwX43KXHyYY5SWZ2f2KpJwFiX2zy9u9W&quot;,&quot;5CMDtbm4XM9W617XnRUC5YvDHTpUYHHqXuSwU6omfGEgfxAY&quot;,&quot;5CMf5pWBYBnaag7qVHhfXAeJKsx28Dufo6Z1ekMd8fDqCzpY&quot;,&quot;5CQbFzpuv45gFRE4QKtEmPGskk7FCeU6trdSyTJFukYUZQcA&quot;,&quot;5CU7UvWgaqbhbH2FxgPh8bn4YXjmkpsiSKLzXh425fKeCeMQ&quot;,&quot;5CYFfX66GcHfdTRMw1XgS226GJvdvaq8SmsnqFQerRPKJZr5&quot;,&quot;5CYUkvh2jmQkgm4AT6YvwLDaE7CJK3zmkg7ZtUvavmGsFSQF&quot;,&quot;5CaBuc5t3hUHWfeR5hzLSn7DKhyZkEDZPZamkTwAyGewkMVp&quot;,&quot;5CdHYrqsTYmWDoQTE378Y43deqgBccTPRR6Da7tttESSP3GP&quot;,&quot;5CeCBEcBEVAijVq8UfDwb1pE7ecu5hBZbw2EL6BgGxgco4pb&quot;,&quot;5D77y3kk2F4WeVGPFGNKHj9KqFDkL3Be78sBN1jLwQ2MNRJm&quot;,&quot;5DFyPTcYq2UeQyfD7wW1qxWghjDbfkg1jCZDDNXpqz9Dqmdn&quot;,&quot;5DHG85ALQLBZEv5VcJS4PHf3JuURoVYSZ8Vky43s2ez9kNnc&quot;,&quot;5DLDwu8BA1nF3243Htp8BprXrbwY47WFBP5uDMWKKjTMdBjb&quot;,&quot;5DM9HDFujkCJyHCno68C8qeLX43KbafRdLBzyi1hwzrYdfn1&quot;,&quot;5DU4ykjP5YtuPrCsMmZd7FRkMSVJzv8GoQ6oRsREhUPtf2wx&quot;,&quot;5DUeSNipPoh4JV7uVpN6AjxYNa8jPyMYA5KutQuPe5F26Bsm&quot;,&quot;5DcJ48Tw5WsYULGjU6AGFWRq7T7f2ShNPEbp2Snp9VAd3Wj5&quot;,&quot;5DgwgFj1NXC9dm3HZArna6rW9T3aAKZC5ZfvZM5kwtBirDN9&quot;,&quot;5DhHepwhWomV6ysktT12KJ818F3X6StwmBNwMYdPZecf2cmx&quot;,&quot;5DjqAz7EyjHttZDP972zP4RT3Fmn4hsexg5LoD7qhpsdGi65&quot;,&quot;5DxRcRUuGqrGxG1uMG45FKVSVsc39UWUfSqzWiK79wvF8Sb1&quot;,&quot;5E9Sru6GEbiDjq4CiZuf2r77JViHEdVbjbdGaBhwGfXfFw9e&quot;,&quot;5ESnrMXJnp4Hjkv7gmbvUmXYbA1Udfher13fAiNWgaTKwtp9&quot;,&quot;5Eci1K8B1m6eEWaiqsr4xvb6cg6tajW9GTcnz6GrpYqUYfBK&quot;,&quot;5EkguJE7pbwi88YHjDh8GkDbgtFJf65qnGyzHJTSFfxT3JPt&quot;,&quot;5EroE5BJV7n93Z4D9dmpaARa817iHQJ1UyauoYmJFZppKDUB&quot;,&quot;5EvtGF6W1Xws4ouGdPofgJNFCT6nHR3o3h9oUCkjyUEBsDTk&quot;,&quot;5F3uDi2ghwFEXEoPMNGiwZmPz6C7DpYdYBejSPjeTwnvrUAK&quot;,&quot;5F4HbX6C7NRkmuiDZULMoehGTkywNKwMsx9qbCv36QnTEUSb&quot;,&quot;5F914LRb584dKbz3rakrcB3Uhnk9DyZYfxPL8J8meUX3sLeH&quot;,&quot;5FBrPeS4tdK4GyaqVXDN2FKMP5KzYPdf9z844gAkDJtPvevH&quot;,&quot;5FJr162Efkw1VQXZHzKpNptrpCnr4fhAyn724pvpyAmGKXb6&quot;,&quot;5FcjA9UriUwjKxiNHKN4ksPFqaATRPW9vAUxytfK1V34ektM&quot;,&quot;5FeaGCh2iwy7pU2nUHFQ8yLGYdujURCU9kyadhW8x95TekA3&quot;,&quot;5FgCjHUF45dEqw5wAAyuciCUFEs4y53WHQysfSK1Kq2EEFrx&quot;,&quot;5FiqJD5egss5dKquDJXbGobyzThiQqQcPTSAJwavy1R26c5P&quot;,&quot;5FoiAwAFd6EybrzRMZffGPqLr1ccWsZA92ZNKvp4q5ZQcCeW&quot;,&quot;5Fr5PH4198YgsudLPgfGvmGcYVYx6DwPfNXDncPMCWqW4kAi&quot;,&quot;5FzyvzWqL73NM1QviAyrCAHKx4V8mEzbTSr7CnvyzhUyAy8e&quot;,&quot;5G4DN9gaKh48LraEQNNhKKGBiWHq3hXr9haPaHpRLEcsQXpk&quot;,&quot;5GC9BJfGXihQ2nUSarfFZ4zdM6KiTeZZLLScUVHHr4voAPVm&quot;,&quot;5GGE5mdUM2dncReKfLLbLizqYPSokNz4Tj4Z2n8Kr7DLPrqE&quot;,&quot;5GGscd7C9EJdb9KJ2Cv9VfwQsERSPiNCdzybWsvJ8WnLB9jW&quot;,&quot;5GMvuYcVXDZ7s17aCu2eLSc9vS2YaGoLoHB5Di4DTAPYnpx2&quot;,&quot;5GP7prKCRVuSVkq48VRU98dMP9urPFqF4zq5TAG6rbQUNwv7&quot;,&quot;5GYAJ8wjQiLsiofoHWdGFjJMnPvuayKLXUfxA745XakPKQNA&quot;,&quot;5Gk5JCbDs3JJtJEoNPQPj2rXBCE73UaYso2EfHZJ8uZKxcbz&quot;,&quot;5GkvH2KtWZGmkjzcTyHUr5GQcwhUJBKdXb8CCYV4i6am36xq&quot;,&quot;5H8wCzaF4zSb2i1yj9Vdsbm4S612JBpq83ZWZXnwUukzxogQ&quot;,&quot;5HBoJbp4hTrGHhuxxwyYHaYMzeVnocbUcmE9joL2UNb4jLKU&quot;,&quot;5HGm8NwjzYmnHPSea5duXTzycvhWYwqjANGk4pmNZhv9EQ4h&quot;,&quot;5HSdfeX1uYLi6NrmTifJwZajS2zE2ZTd7jakHLPgzaqaZF2V&quot;,&quot;5HW5gNSyv2xRXdpsQKXDvM6AJfNYxLi1V3vVacEk3tzFEMHz&quot;,&quot;5Hcgj3Qa7LmMpwcGSCGg8N77uvkro7fZvbnj9hqi9poqMCDR&quot;,&quot;5HjivUtH2soVtHUpeRFaN9YB7cP3iWT2Rr1Nvaaf3j9yET22&quot;,&quot;5HpasZqGuvQwL1UFLx9YABK8nhwnerkBsQ12p3VBHKVNRNsH&quot;]},&quot;round&quot;:1,&quot;thresholdWeight&quot;:107,&quot;totalWeight&quot;:160},&quot;setId&quot;:4821},&quot;id&quot;:1}&#xD;&#xA;&#xD;&#xA;There are indeed many missing prevotes(When we first requested this RPC yesterday, the setId was 4819, currentWeight of prevotes was 100. And now the returned setId is 4821, currentWeight of prevotes is 101. When will it be changed? The currentSetId of Grandpa is 4829 now).&#xD;&#xA;&#xD;&#xA;After we tried grandpa.noteStalled function, we found NewAuthorities event in the next session, so the validator set should be re-selected, right? And we also checked validators in Grandpa Authority set, seems that they are all running normally and can produce blocks normally. Don't know why the Grandpa doesn't work.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41006" PostHistoryTypeId="1" PostId="10354" RevisionGUID="e34d63c1-aac5-4a0b-a3a0-f07ccff2732c" CreationDate="2023-10-30T05:02:26.950" UserId="4863" Text="Finalized block got stuck" ContentLicense="CC BY-SA 4.0" />
  <row Id="41007" PostHistoryTypeId="3" PostId="10354" RevisionGUID="e34d63c1-aac5-4a0b-a3a0-f07ccff2732c" CreationDate="2023-10-30T05:02:26.950" UserId="4863" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41008" PostHistoryTypeId="2" PostId="10355" RevisionGUID="0562f159-6672-499c-9c9d-662b33685157" CreationDate="2023-10-30T08:09:15.077" UserId="4866" Text="is there a submission procedure for contributing a pallet I've written to Polkadot, for the relay chain? &#xD;&#xA;I would appreciate any help with this." ContentLicense="CC BY-SA 4.0" />
  <row Id="41010" PostHistoryTypeId="1" PostId="10355" RevisionGUID="0562f159-6672-499c-9c9d-662b33685157" CreationDate="2023-10-30T08:09:15.077" UserId="4866" Text="Contribute a pallet I've written to Polkadot Relay Chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="41011" PostHistoryTypeId="3" PostId="10355" RevisionGUID="0562f159-6672-499c-9c9d-662b33685157" CreationDate="2023-10-30T08:09:15.077" UserId="4866" Text="|polkadot|pallet|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41012" PostHistoryTypeId="2" PostId="10356" RevisionGUID="dc35d7f7-6453-4577-a069-29c72bb5513d" CreationDate="2023-10-30T08:10:31.137" UserId="2762" Text="You can see examples in the docs: [ink_prelude::vec::Vec][1] &#xD;&#xA;```rs&#xD;&#xA;for bidder in &amp;bidders {&#xD;&#xA;    // do whatever with the AccountId&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Vec support indexing Vectors also support [indexing][2] if you know where is the element you want to get:  `println!(&quot;{}&quot;, bidders[1]);`&#xD;&#xA;&#xD;&#xA;And iterator (See [docs][3]):&#xD;&#xA;```rs&#xD;&#xA;let mut iterator = bidders.iter();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you want to bound the length of a Vec in ink!, you can check this previous StackExchange response: [BoundedVec on ink!][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.rs/ink_prelude/latest/ink_prelude/vec/struct.Vec.html&#xD;&#xA;  [2]: https://docs.rs/ink_prelude/latest/ink_prelude/vec/struct.Vec.html#indexing&#xD;&#xA;  [3]: https://docs.rs/ink_prelude/latest/ink_prelude/vec/struct.Vec.html#method.iter&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/7562/boundedvec-on-ink" ContentLicense="CC BY-SA 4.0" />
  <row Id="41014" PostHistoryTypeId="2" PostId="10357" RevisionGUID="5cd7ce34-3960-499a-88fb-b9bd3485e46b" CreationDate="2023-10-30T08:22:01.750" UserId="2762" Text="That's the [Polkadot repository][1] where you can see the replay chain code. The code is open source and anyone can contribute, read carefully the [Contribution guide][2].&#xD;&#xA;For change to the technical implementation of the Polkadot network the process is first open Requests for Comment (RFC) in the [RFC repository][3], read carefully the README there and specially how the [Process][4] to submit a RFC works.&#xD;&#xA;&#xD;&#xA;I suggest you to share your pallet with the community as it can be implemented in other chains, to do that check this previous StackExchange question: [Substrate Playground - Share workspace][5] where I explained how to share your pallet in the [Substrate Marketplace][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md&#xD;&#xA;  [3]: https://github.com/polkadot-fellows/RFCs&#xD;&#xA;  [4]: https://github.com/polkadot-fellows/RFCs#process&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5517/substrate-playground-share-workspace/5519#5519&#xD;&#xA;  [6]: https://marketplace.substrate.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="41016" PostHistoryTypeId="52" PostId="10350" RevisionGUID="fe2d4513-4a5b-414a-a98d-5c4c8e78f7bf" CreationDate="2023-10-30T08:28:18.517" />
  <row Id="41017" PostHistoryTypeId="2" PostId="10358" RevisionGUID="f0b77b40-712c-42f0-b541-41a1dd83b8e0" CreationDate="2023-10-30T08:58:02.693" UserId="2762" Text="Bruno explained very well the options you have for a real Substrate application. &#xD;&#xA;&#xD;&#xA;To answer your question about users: no! users don't have to start their own substrate node, they should only have to interact with your frontend application.&#xD;&#xA;&#xD;&#xA;In the [Front-end-template][1] you can see an example on how to interact with a node and with [ink!athon Boilerplate][2] you will find a starter kit for full-stack dApp development with ink! smart contracts&#xD;&#xA;&#xD;&#xA;Follow this discussion in the Polkadot Forum: [Frontend Development Experience][3] where you will find different resources the develop your frontend application.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;  [2]: https://github.com/scio-labs/inkathon#inkathon-boilerplate&#xD;&#xA;  [3]: https://forum.polkadot.network/t/frontend-development-experience/4393" ContentLicense="CC BY-SA 4.0" />
  <row Id="41019" PostHistoryTypeId="52" PostId="10351" RevisionGUID="d0c362af-fe2c-4e46-97b1-d31b15bd8023" CreationDate="2023-10-30T09:09:17.487" />
  <row Id="41020" PostHistoryTypeId="50" PostId="8660" RevisionGUID="45021e5f-92fa-4f8a-bd2f-15881575ca55" CreationDate="2023-10-30T10:06:25.803" UserId="-1" />
  <row Id="41021" PostHistoryTypeId="2" PostId="10359" RevisionGUID="94e6f9aa-d882-4789-a6ac-33d9d0473c19" CreationDate="2023-10-30T10:54:40.413" UserId="234" Text="You can also use the endpoint `/blocks/:blockId/extrinsics-raw` of [Sidecar][1] which returns a block along with its extrinsics as hex strings. This endpoint was added on [v17.3.0][2] and the response it returns is very similar to what you need : &#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      &quot;parentHash&quot;: &quot;0x3061979d20ef53c040c7dd2db6001625e832b228ef0087efd1268792eb552ba0&quot;,&#xD;&#xA;      &quot;number&quot;: &quot;0x000c0c7b&quot;,&#xD;&#xA;      &quot;stateRoot&quot;: &quot;0xa98bff8f651f3c3a5608280c7d47c871ce39aaf5c1a70d4ca9a824654c32462b&quot;,&#xD;&#xA;      &quot;extrinsicRoot&quot;: &quot;0x57f288d314b4eb1b4250a7eddd67e4a26860ee727c1f464dbd5b2f9e935442de&quot;,&#xD;&#xA;      &quot;digest&quot;: {&#xD;&#xA;        &quot;logs&quot;: [&#xD;&#xA;    	    {&#xD;&#xA;    		    &quot;type&quot;: &quot;PreRuntime&quot;,&#xD;&#xA;    		    &quot;index&quot;: &quot;6&quot;,&#xD;&#xA;    		    &quot;value&quot;: [&#xD;&#xA;    			    &quot;0x42414245&quot;,&#xD;&#xA;    			    &quot;0x0116000000f3f4d80f00000000de8d0c6203f1fe7d5149c291a404552284d4ccd7126311d773a6af12576ef648a3b4ce3ac23c3bea72bf5dca08f95967ffc14eef351134203cd013cad605e20d895a6dcd17812be38bb12e40ec93eea84ac1b4e88b0976383adc75a5eadf8f0f&quot;&#xD;&#xA;    		    ]&#xD;&#xA;    	  },&#xD;&#xA;    	  {&#xD;&#xA;    		  &quot;type&quot;: &quot;Seal&quot;,&#xD;&#xA;    		  &quot;index&quot;: &quot;5&quot;,&#xD;&#xA;    		  &quot;value&quot;: [&#xD;&#xA;    			  &quot;0x42414245&quot;,&#xD;&#xA;    			  &quot;0xd60c17642672fb9f859eede2e4f1c86fe41598d22b3781b7d91f9c10712195667eba6e9621b3275b43db7684c6c034970bf8fc31579709cf2caa894c2dc8428b&quot;&#xD;&#xA;    		  ]&#xD;&#xA;    	  }&#xD;&#xA;         ]&#xD;&#xA;      },&#xD;&#xA;      &quot;extrinsics&quot;: [&#xD;&#xA;      &quot;0x280403000b50ffec6c7301&quot;,&#xD;&#xA;      &quot;0x1c040a00e6313000&quot;,&#xD;&#xA;      &quot;0x1004140000&quot;&#xD;&#xA;      ]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;More details about the endpoint can be found in the [PR][3] that implemented it and the [docs][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-api-sidecar&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-api-sidecar/releases/tag/v17.3.0&#xD;&#xA;  [3]: https://github.com/paritytech/substrate-api-sidecar/pull/1334&#xD;&#xA;  [4]: https://paritytech.github.io/substrate-api-sidecar/dist/" ContentLicense="CC BY-SA 4.0" />
  <row Id="41023" PostHistoryTypeId="5" PostId="10359" RevisionGUID="20590f4f-f8d5-4ecc-876e-c8c70cb15912" CreationDate="2023-10-30T11:03:15.900" UserId="234" Comment="Edited the example (sample response)" Text="You can also use the endpoint `/blocks/:blockId/extrinsics-raw` of [Sidecar][1] which returns a block along with its extrinsics as hex strings. This endpoint was added on [v17.3.0][2] and the response it returns is very similar to what you need : &#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;      &quot;parentHash&quot;: &quot;0x949c61fe1ad22f823efa036d1fc7c7bc6e20462d595ad63e29edbb8ddb88e2ff&quot;,&#xD;&#xA;      &quot;number&quot;: &quot;0x0111da7e&quot;,&#xD;&#xA;      &quot;stateRoot&quot;: &quot;0x8aaf3eebc40116ce71a883454623df3a608da3c5cd940800d8ca0c10910959bf&quot;,&#xD;&#xA;      &quot;extrinsicRoot&quot;: &quot;0xe34596913819f563d0880e2b33ea8f8016d0c8dd62abd0d0383d0f7a938825d8&quot;,&#xD;&#xA;      &quot;digest&quot;: {&#xD;&#xA;        &quot;logs&quot;: [&#xD;&#xA;          {&#xD;&#xA;            &quot;type&quot;: &quot;PreRuntime&quot;,&#xD;&#xA;            &quot;index&quot;: &quot;6&quot;,&#xD;&#xA;            &quot;value&quot;: [&#xD;&#xA;              &quot;0x42414245&quot;,&#xD;&#xA;              &quot;0x035400000031ecdf100000000018e190a2cf7e332a60fe86950752e2b9b9f446bd71628832a2646603f7ee244e65002b815a440e2e625cbb629ad4165c6aa78e76a0dec009eea0b8e0e1f50f0f6d59bc98b2f6f31d7003255cabf900cc811bfb67d9484fb08ee8d2b0d5709b0f&quot;&#xD;&#xA;            ]&#xD;&#xA;          },&#xD;&#xA;          {&#xD;&#xA;            &quot;type&quot;: &quot;Seal&quot;,&#xD;&#xA;            &quot;index&quot;: &quot;5&quot;,&#xD;&#xA;            &quot;value&quot;: [&#xD;&#xA;              &quot;0x42414245&quot;,&#xD;&#xA;              &quot;0x2cc27242fbc6904860eb252e32b3fa2feb9f26c6e27a52308b7a11b44230f42e23d84ed628a8cd570e2cba8860ebcbf687af25e564013ff707e2ac6f278b498e&quot;&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        ]&#xD;&#xA;       },&#xD;&#xA;       &quot;extrinsics&quot;: [&#xD;&#xA;       &quot;0x280403000b70bc2f808b01&quot;,&#xD;&#xA;          &quot;0x86680200043600a104ec3f2410c680ad000000000000cefcd9bf686783c725c83d0ec8164bd1a3d3330deefe2bc4f67e1a74514970429d6f9019be7ce7a33a0c1c2808946fa9a5463febb7b6b701e7d6885d98e62b89ec3f2410c680ad000001000000a8d......&quot;,&#xD;&#xA;          &quot;0xad0184009a2960ba755f4f91f2ecbd9ba881baead34353d33eac421d289d925c96738e320148b27c6f9f0dcbab22a035da3a97c4d0f273e0316e1b027a0bb2d6c45a8761688ed14840ba28082a2d1ce7b4520e5895513971791ad1a8137f8f9a072679908a8503290100270101&quot;&#xD;&#xA;          ]&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;More details about the endpoint can be found in the [PR][3] that implemented it and the [docs][4].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-api-sidecar&#xD;&#xA;  [2]: https://github.com/paritytech/substrate-api-sidecar/releases/tag/v17.3.0&#xD;&#xA;  [3]: https://github.com/paritytech/substrate-api-sidecar/pull/1334&#xD;&#xA;  [4]: https://paritytech.github.io/substrate-api-sidecar/dist/" ContentLicense="CC BY-SA 4.0" />
  <row Id="41024" PostHistoryTypeId="5" PostId="10357" RevisionGUID="77819839-1ded-4066-a44b-445e8e2a08c4" CreationDate="2023-10-30T11:11:29.130" UserId="234" Comment="Fixed minor typo" Text="That's the [Polkadot repository][1] where you can see the relay chain code. The code is open source and anyone can contribute, read carefully the [Contribution guide][2].&#xD;&#xA;For change to the technical implementation of the Polkadot network the process is first open Requests for Comment (RFC) in the [RFC repository][3], read carefully the README there and specially how the [Process][4] to submit a RFC works.&#xD;&#xA;&#xD;&#xA;I suggest you to share your pallet with the community as it can be implemented in other chains, to do that check this previous StackExchange question: [Substrate Playground - Share workspace][5] where I explained how to share your pallet in the [Substrate Marketplace][6].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md&#xD;&#xA;  [3]: https://github.com/polkadot-fellows/RFCs&#xD;&#xA;  [4]: https://github.com/polkadot-fellows/RFCs#process&#xD;&#xA;  [5]: https://substrate.stackexchange.com/questions/5517/substrate-playground-share-workspace/5519#5519&#xD;&#xA;  [6]: https://marketplace.substrate.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="41025" PostHistoryTypeId="2" PostId="10360" RevisionGUID="03750ac2-517d-409f-9881-93c02b51f106" CreationDate="2023-10-30T11:14:35.953" UserId="474" Text="First off, it looks like you're using quite an old version of Subxt (that syntax for substituting types went away quite a while ago), so I'd recommend updating.&#xD;&#xA;&#xD;&#xA;If you're just looking to do some type substitution, then the new syntax is more powerful, and the docs for that can he [found here](https://docs.rs/subxt/latest/subxt/attr.subxt.html#substitute_typepath---with--). One way to do it would be like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(&#xD;&#xA;    runtime_metadata_path = &quot;metadata.scale&quot;,&#xD;&#xA;    substitute_type(&#xD;&#xA;        // the type that's generated:&#xD;&#xA;        path = &quot;sp_core::sr25519::Signature&quot;,&#xD;&#xA;        // This is the type we swap it for:&#xD;&#xA;        with = &quot;::subxt::utils::Static&lt;::sp_core::sr25519::Signature&gt;&quot;&#xD;&#xA;    )&#xD;&#xA;)]&#xD;&#xA;mod polkadot {}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The type we are swapping it for is wrapped in this `Static` wrapper. This is because generated types need to impl `DecodeAsType` and `EncodeAsType` nowadays, which the substrate primitives do not, and the `Static` type impls them and just falls back to using `Decode`/`Encode` impls instead (which they do implement).&#xD;&#xA;&#xD;&#xA;That all said, implementing `From` conversions are generally more reliable (since you don't need to swap any types and then assume they the swapped types are actually still valid in place of the old ones). So I'd actually recommend starting with an approach like this, if it works for your use case:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(&#xD;&#xA;    runtime_metadata_path = &quot;metadata.scale&quot;,&#xD;&#xA;    derive_for_all_types = &quot;Debug&quot;&#xD;&#xA;)]&#xD;&#xA;mod runtime {}&#xD;&#xA;&#xD;&#xA;impl From&lt;runtime::sp_core::sr25519::Signature&gt; for sp_core::sr25519::Signature {&#xD;&#xA;    fn from(value: runtime::sp_core::sr25519::Signature) -&gt; Self {&#xD;&#xA;        sp_core::sr25519::Signature(value.0)&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This generalises well to other types too, and lets you leave the generated code alone." ContentLicense="CC BY-SA 4.0" />
  <row Id="41027" PostHistoryTypeId="2" PostId="10361" RevisionGUID="88b66167-1127-48d0-9111-51f70e5c7640" CreationDate="2023-10-30T12:30:39.957" UserId="3112" Text="I have been able to fix the issue. The problem came from the nvm installed. apparently, when you have nvm installed you can only install yarn using npm or else the node versions won't be installed on the same path and there won't be consistency. Since the default node version is controlled by nvm, installing yarn using curl or other ways except npm will cause errors, hence the error &quot;no such file or directory: install&quot;. &#xD;&#xA;&#xD;&#xA;To fix this issue: remove yarn by doing the following&#xD;&#xA; 1. `which yarn` which should output `\usr\bin\yarn` or the location yarn is installed. &#xD;&#xA; 2. remove yarn by running `rm -rf \usr\bin\yarn`. make sure to replace to the actual location on your pc. &#xD;&#xA; 3. now install yarn using npm. `npm install -g yarn`. &#xD;&#xA;&#xD;&#xA;N.b this works for linux PCs&#xD;&#xA;&#xD;&#xA;I hope this helps someone out there." ContentLicense="CC BY-SA 4.0" />
  <row Id="41029" PostHistoryTypeId="2" PostId="10362" RevisionGUID="94f4d48b-9efc-454e-b8c5-a6cec451918e" CreationDate="2023-10-30T15:37:05.190" UserId="445" Text="I am unable to build `try-runtime` features. &#xD;&#xA;&#xD;&#xA;My command: `cargo build --features try-runtime --release`&#xD;&#xA;&#xD;&#xA;My issue:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; impl&lt;T: Config&gt; SortedListProvider&lt;T::AccountId&gt; for UseValidatorsMap&lt;T&gt; {&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `score_update_worst_case` in implementation&#xD;&#xA;     |&#xD;&#xA;     = help: implement the missing item: `fn score_update_worst_case(_: &amp;&lt;T as frame_system::Config&gt;::AccountId, _: bool) -&gt; &lt;Self as frame_election_provider_support::SortedListProvider&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Score { todo!() }`&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; SortedListProvider&lt;T::AccountId&gt; for UseNominatorsAndValidatorsMap&lt;T&gt; {&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `score_update_worst_case` in implementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="41031" PostHistoryTypeId="1" PostId="10362" RevisionGUID="94f4d48b-9efc-454e-b8c5-a6cec451918e" CreationDate="2023-10-30T15:37:05.190" UserId="445" Text="not all trait items implemented, missing: `score_update_worst_case`" ContentLicense="CC BY-SA 4.0" />
  <row Id="41032" PostHistoryTypeId="3" PostId="10362" RevisionGUID="94f4d48b-9efc-454e-b8c5-a6cec451918e" CreationDate="2023-10-30T15:37:05.190" UserId="445" Text="|runtime-upgrade|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41033" PostHistoryTypeId="52" PostId="10355" RevisionGUID="2f7c187f-f987-4d4e-ac0a-e0c5b7d0c128" CreationDate="2023-10-30T16:09:42.087" />
  <row Id="41034" PostHistoryTypeId="2" PostId="10363" RevisionGUID="7af719c5-e0d4-462c-a31e-531b4d7df061" CreationDate="2023-10-30T16:54:55.093" UserId="234" Text="Based on feedback from the Subscan team, status `Retired` means that :&#xD;&#xA;&#xD;&#xA;&gt; *The nominator is no longer voting for or has no valid voting for&#xD;&#xA;&gt; active validators.*" ContentLicense="CC BY-SA 4.0" />
  <row Id="41036" PostHistoryTypeId="50" PostId="5108" RevisionGUID="89bf16a1-60bd-471d-950e-2fe109850406" CreationDate="2023-10-30T23:01:25.170" UserId="-1" />
  <row Id="41037" PostHistoryTypeId="2" PostId="10364" RevisionGUID="094159f5-8dc2-4ba6-ac34-a210f85ac526" CreationDate="2023-10-31T05:27:20.910" UserId="3991" Text="Try running your node with flags `--rpc-max-request-size 1000` and `--rpc-max-response-size 1000`" ContentLicense="CC BY-SA 4.0" />
  <row Id="41039" PostHistoryTypeId="5" PostId="10362" RevisionGUID="0a3b652d-320d-43fc-ab8e-1e7fb55b1245" CreationDate="2023-10-31T08:22:31.453" UserId="445" Comment="added 245 characters in body" Text="I am unable to build `try-runtime` features. &#xD;&#xA;&#xD;&#xA;My command: `cargo build --features try-runtime --release`&#xD;&#xA;&#xD;&#xA;My issue:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; impl&lt;T: Config&gt; SortedListProvider&lt;T::AccountId&gt; for UseValidatorsMap&lt;T&gt; {&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `score_update_worst_case` in implementation&#xD;&#xA;     |&#xD;&#xA;     = help: implement the missing item: `fn score_update_worst_case(_: &amp;&lt;T as frame_system::Config&gt;::AccountId, _: bool) -&gt; &lt;Self as frame_election_provider_support::SortedListProvider&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Score { todo!() }`&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; SortedListProvider&lt;T::AccountId&gt; for UseNominatorsAndValidatorsMap&lt;T&gt; {&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `score_update_worst_case` in implementation&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;`runtime/Cargo.toml`&#xD;&#xA;&#xD;&#xA;`pallet-staking = { workspace = true }`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;runtime-benchmarks =[&#xD;&#xA;&#xD;&#xA;  ...&#xD;&#xA;  pallet-staking/runtime-benchmarks&#xD;&#xA;  ...&#xD;&#xA;&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;try-runtime = [&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;pallet-staking/try-runtime&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41040" PostHistoryTypeId="5" PostId="10346" RevisionGUID="a5eb5499-b349-4ead-9420-c9d9413bef4d" CreationDate="2023-10-31T09:37:26.187" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I was referring the substrate documentation on [preparing a local relay chain ][1]. The documentation has provided a sample plain chain spec with two validators Alice and Bob. I need to hardcode an additional validator. I think I need to add something like below in the keys array in the chain spec but I'm not exactly sure what would the values for beefy, granpa etc would be.&#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;                [&#xD;&#xA;              &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;              &quot;5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc&quot;,&#xD;&#xA;              {&#xD;&#xA;                &quot;grandpa&quot;: &quot;5GoNkf6WdbxCFnPdAnYYQyCjAKPJgLNxXwPjwTh6DGg6gN3E&quot;,&#xD;&#xA;                &quot;babe&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;                &quot;im_online&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;                &quot;para_validator&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;                &quot;para_assignment&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;,&#xD;&#xA;                &quot;authority_discovery&quot;: &quot;5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/&#xD;&#xA;  [2]: https://docs.substrate.io/assets/tutorials/relay-chain-specs/plain-local-chainspec.json/" ContentLicense="CC BY-SA 4.0" />
  <row Id="41041" PostHistoryTypeId="24" PostId="10346" RevisionGUID="a5eb5499-b349-4ead-9420-c9d9413bef4d" CreationDate="2023-10-31T09:37:26.187" Comment="Proposed by 116 approved by 4862 edit id of 598" ContentLicense="CC BY-SA 4.0" />
  <row Id="41042" PostHistoryTypeId="2" PostId="10365" RevisionGUID="1f389e30-b6e2-443b-8f9b-67341f35c394" CreationDate="2023-10-31T19:37:57.533" UserId="1786" Text="Currently given the following [comment](https://github.com/polkadot-js/api/issues/5741) regarding a recent issue in polkadot-js, can it be safe to assume we should not use `createType` at all within our development while using polkadot-js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41044" PostHistoryTypeId="1" PostId="10365" RevisionGUID="1f389e30-b6e2-443b-8f9b-67341f35c394" CreationDate="2023-10-31T19:37:57.533" UserId="1786" Text="Is `createType` safe to use in polkadot-js/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="41045" PostHistoryTypeId="3" PostId="10365" RevisionGUID="1f389e30-b6e2-443b-8f9b-67341f35c394" CreationDate="2023-10-31T19:37:57.533" UserId="1786" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41046" PostHistoryTypeId="2" PostId="10366" RevisionGUID="582d88c2-cbbf-4fe2-8e66-11b2e32bc55d" CreationDate="2023-10-31T19:37:57.533" UserId="1786" Text="## Summary&#xD;&#xA;&#xD;&#xA;As a fore-warning I am not the maintainer of polkadot-js but a super user instead. The below is just my opinion, and does not sit as the &quot;Be all end all&quot; solution for `createType` under the `ApiPromise` class.&#xD;&#xA;&#xD;&#xA;It is important to notice that using `createType` for types that are generated from the metadata is unsafe and may cause bugs, and refactoring headaches in the future since those types may change in the metadata. It is best to let polkadot-js handle resolving those types for when you call `api.tx.something.somewhere`. This can be done by just passing the args in as their expected structure using javascript types. That being said there might be a type you want to build that is not within the metadata provided by the chain but intrinsic to polkadot-js. That IMO is still perfectly acceptable. Below I will cover some examples of when using `createType` might be okay such as, Testing, Calls, ExtrinsicPayloads.&#xD;&#xA;&#xD;&#xA;## Testing&#xD;&#xA;&#xD;&#xA;As mentioned in my [comment](https://github.com/polkadot-js/api/issues/5741#issuecomment-1781338863) on the issue, `createType` is still very useful for mocking any call you may invoke on the `ApiPromise`. This allows for fluid mock testing, and mirrored responses. Here is the example I mention in the issue with some more explanations:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;// Create a ApiPromise that will not connect to a provider but instead will give all the mechanics&#xD;&#xA;// necessary to create the calls and types you may need.&#xD;&#xA;export function createApiWithAugmentations(metadataHex: `0x${string}`): ApiPromise {&#xD;&#xA;	const registry = new TypeRegistry();&#xD;&#xA;	const metadata = new Metadata(registry, metadataHex);&#xD;&#xA;&#xD;&#xA;	registry.setMetadata(metadata);&#xD;&#xA;&#xD;&#xA;	const api = new ApiPromise({&#xD;&#xA;		provider: new WsProvider('ws://', false),&#xD;&#xA;		registry,&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;	api.injectMetadata(metadata, true, registry);&#xD;&#xA;&#xD;&#xA;	return api;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const mockApi = createApiWithAugmentations(&lt;some_metadata&gt;);&#xD;&#xA;&#xD;&#xA;// This is a mock call, that will return what the node would return if you were to call -&#xD;&#xA;// `api.query.polkadotXcm.safeXcmVersion`&#xD;&#xA;const getSafeXcmVersion = () =&gt;&#xD;&#xA;    Promise.resolve().then(() =&gt; {&#xD;&#xA;        return mockApi.registry.createType('Option&lt;u32&gt;', 2);&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;// This is the mock Api that create locally. This could be expanded even further with more &#xD;&#xA;// keys that exist on the ApiPromise type.&#xD;&#xA;const adjustedMockApi = {&#xD;&#xA;    registry: mockApi.registry&#xD;&#xA;    query: {&#xD;&#xA;        polkadotXcm: {&#xD;&#xA;            safeXcmVersion: getSafeXcmVersion&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Creating `Call`s&#xD;&#xA;&#xD;&#xA;Let's say for example you want to build a call. This call is going to be used to send a sudo instruction to chain. It can be done like the following:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;	const xcmMsg = api.tx.xcmPallet.send(&lt;some_multilocation&gt;, &lt;some_xcm_msg&gt;);&#xD;&#xA;	const xcmCall = api.createType('Call', {&#xD;&#xA;		callIndex: xcmMsg.callIndex,&#xD;&#xA;		args: xcmMsg.args,&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Sudo accepts the following arg types:&#xD;&#xA;    // (call: string | Uint8Array | IMethod&lt;AnyTuple, any&gt; | Call)&#xD;&#xA;    await api.tx.sudo.sudo(xcmCall).signAndSend(alice);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This can be useful for multiple usecases where the call needs to be constructed, and used somewhere else.&#xD;&#xA;&#xD;&#xA;Another usecase is if you wanted to decode a given call, you can create the type and key into the appropriate args you want to decode.&#xD;&#xA;&#xD;&#xA;## Creating `ExtrinsicPayload`s&#xD;&#xA;&#xD;&#xA;Similar to call above you can also decode encoded transactions with the `ExtrinsicPayload` type. &#xD;&#xA;&#xD;&#xA;For example lets assume you have an encoded transaction and you want the method to be abstracted and decoded from the following:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const encodedTx = 'some_encoded_tx';&#xD;&#xA;&#xD;&#xA;const extrinsicPayload = api.registry.createType('ExtrinsicPayload', encodedTx, {&#xD;&#xA;    version: EXTRINSIC_VERSION,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;const call = api.registry.createType('Call', extrinsicPayload.method);&#xD;&#xA;const decodedMethodInfo = JSON.stringify(call.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Overall&#xD;&#xA;&#xD;&#xA;All in all I think it's important to consider the use case where you are using `createType`, and whether the type you are building is directly from the metadata, or the type is a utility based reason provided from polkadot-js." ContentLicense="CC BY-SA 4.0" />
  <row Id="41048" PostHistoryTypeId="2" PostId="10367" RevisionGUID="c87e6a14-410a-4aa0-8f77-074ffe444694" CreationDate="2023-10-31T21:54:06.777" UserId="116" Text="*I solved this problem by chaining the point of view.* It is possible to attach a debugger to the [try-runtime][1] project and treat the chain code as a black box. Observing the input and the output gave me the relevant clues I needed.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;git clone https://github.com/paritytech/try-runtime-cli.git&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Link to the chain project from `launch.json` configuration file and debug with F5 as usual.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    // Use IntelliSense to learn about possible attributes.&#xD;&#xA;    // Hover to view descriptions of existing attributes.&#xD;&#xA;    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387&#xD;&#xA;    &quot;version&quot;: &quot;0.2.0&quot;,&#xD;&#xA;    &quot;configurations&quot;: [&#xD;&#xA;        {&#xD;&#xA;            &quot;type&quot;: &quot;lldb&quot;,&#xD;&#xA;            &quot;request&quot;: &quot;launch&quot;,&#xD;&#xA;            &quot;name&quot;: &quot;Debug executable 'try-runtime on-runtime-upgrade'&quot;,&#xD;&#xA;            &quot;cargo&quot;: {&#xD;&#xA;                &quot;args&quot;: [&#xD;&#xA;                    &quot;build&quot;,&#xD;&#xA;                    &quot;--bin=try-runtime&quot;,&#xD;&#xA;                    &quot;--package=try-runtime-cli&quot;,&#xD;&#xA;                ],&#xD;&#xA;                &quot;filter&quot;: {&#xD;&#xA;                    &quot;name&quot;: &quot;try-runtime&quot;,&#xD;&#xA;                    &quot;kind&quot;: &quot;bin&quot;&#xD;&#xA;                }&#xD;&#xA;            },&#xD;&#xA;            &quot;args&quot;: [&#xD;&#xA;                &quot;--runtime&quot;,&#xD;&#xA;                &quot;/home/iceman/nodle/chain/target/release/wbuild/runtime-icecream/runtime_icecream.wasm&quot;,&#xD;&#xA;                &quot;on-runtime-upgrade&quot;,&#xD;&#xA;                &quot;snap&quot;,&#xD;&#xA;                &quot;-p&quot;,&#xD;&#xA;                &quot;/home/iceman/nodle/chain/snapshots/icecream&quot;&#xD;&#xA;                ],&#xD;&#xA;            &quot;cwd&quot;: &quot;${workspaceFolder}&quot;&#xD;&#xA;        }&#xD;&#xA;    ]&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[1]: https://github.com/paritytech/try-runtime-cli&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41050" PostHistoryTypeId="2" PostId="10368" RevisionGUID="8158b1ae-e9d1-4936-823c-a0bbdc2e0bff" CreationDate="2023-11-01T06:38:13.943" UserId="4068" Text="&quot;I'm working on developing smart contracts using OpenBrush and the Ink programming language, and I'm in need of a mechanism to detect and identify the interfaces that a particular smart contract implements. In the Ethereum ecosystem, ERC-165 provides a standard way to do this, as detailed in this [EIP section][1].&#xD;&#xA;&#xD;&#xA;However, I'm looking for a solution that is specifically tailored to OpenBrush and Ink smart contracts. Is there a library or a recommended approach for achieving interface detection in this context? I'm keen to find a solution that is compatible with these technologies and offers similar functionality to ERC-165.&#xD;&#xA;&#xD;&#xA;Any guidance, code examples, or references to relevant resources would be greatly appreciated. Thank you!&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified" ContentLicense="CC BY-SA 4.0" />
  <row Id="41052" PostHistoryTypeId="1" PostId="10368" RevisionGUID="8158b1ae-e9d1-4936-823c-a0bbdc2e0bff" CreationDate="2023-11-01T06:38:13.943" UserId="4068" Text="Is there a library similar to ERC-165, In OpenBrush or Ink smart contracts, used to identify the implemented interfaces of a smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41053" PostHistoryTypeId="3" PostId="10368" RevisionGUID="8158b1ae-e9d1-4936-823c-a0bbdc2e0bff" CreationDate="2023-11-01T06:38:13.943" UserId="4068" Text="|ink|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41054" PostHistoryTypeId="2" PostId="10369" RevisionGUID="e6719d40-f56d-4240-8aec-245017a835b9" CreationDate="2023-11-01T07:24:26.220" UserId="567" Text="It's part of OpenBrush, check this PR:&#xD;&#xA;&#xD;&#xA;https://github.com/Brushfam/openbrush-contracts/pull/112" ContentLicense="CC BY-SA 4.0" />
  <row Id="41056" PostHistoryTypeId="50" PostId="10096" RevisionGUID="b1b649a4-8362-4ee9-a5c2-bd4f0801baf8" CreationDate="2023-11-01T09:01:30.153" UserId="-1" />
  <row Id="41057" PostHistoryTypeId="50" PostId="10101" RevisionGUID="a6e736ed-c0fb-4d6f-9aa6-e7d838a4f482" CreationDate="2023-11-01T10:01:05.123" UserId="-1" />
  <row Id="41058" PostHistoryTypeId="50" PostId="10039" RevisionGUID="3841f0db-7f2f-4744-b26a-889429a8fa65" CreationDate="2023-11-01T11:06:20.700" UserId="-1" />
  <row Id="41059" PostHistoryTypeId="2" PostId="10370" RevisionGUID="be5cf725-b1ea-4e80-b2ef-bdd002b1b4f1" CreationDate="2023-11-01T11:20:53.570" UserId="4879" Text="I am learning &quot;substrate&quot; now and I set dependence according to the tutorial as below:&#xD;&#xA;&#xD;&#xA;    [dependencies]&#xD;&#xA;    pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Then I run the command &quot;cargo check -p node-template-runtime --release&quot;, and got below error:&#xD;&#xA;&#xD;&#xA;    &quot;Caused by:&#xD;&#xA;      failed to load source for dependency `pallet-node-authorization`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      Unable to update https://github.com/paritytech/polkadot-sdk.git?branch=polkadot-v1.0.0&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      failed to find branch `polkadot-v1.0.0`&#xD;&#xA;    &#xD;&#xA;    Caused by:&#xD;&#xA;      cannot locate remote-tracking branch 'origin/polkadot-v1.0.0'; class=Reference (4); code=NotFound (-3)&quot;&#xD;&#xA;&#xD;&#xA;so what is the matter?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41061" PostHistoryTypeId="1" PostId="10370" RevisionGUID="be5cf725-b1ea-4e80-b2ef-bdd002b1b4f1" CreationDate="2023-11-01T11:20:53.570" UserId="4879" Text="failed to get `pallet-node-authorization` as a dependency of package `node-template-runtime v4.0.0-dev" ContentLicense="CC BY-SA 4.0" />
  <row Id="41062" PostHistoryTypeId="3" PostId="10370" RevisionGUID="be5cf725-b1ea-4e80-b2ef-bdd002b1b4f1" CreationDate="2023-11-01T11:20:53.570" UserId="4879" Text="|substrate-node-template|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41063" PostHistoryTypeId="2" PostId="10371" RevisionGUID="4efe5d10-fe30-4fb8-9aa0-00350e307ae2" CreationDate="2023-11-01T11:45:42.273" UserId="251" Text="```&#xD;&#xA;Caused by:&#xD;&#xA;  failed to find branch `polkadot-v1.0.0`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please use `branch = &quot;release-polkadot-v1.0.0&quot;` instead. Make sure to check the new naming rules once you switch to the monorepo." ContentLicense="CC BY-SA 4.0" />
  <row Id="41065" PostHistoryTypeId="5" PostId="10365" RevisionGUID="82a4820a-97dc-4756-b4ba-2982e06fc73c" CreationDate="2023-11-01T13:00:53.370" UserId="1786" Comment="added 295 characters in body" Text="In this [comment](https://github.com/polkadot-js/api/issues/5741) of pjs github, it says that we should never do the following:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const something = api.createType('SomeType', { foo: 'bar' });&#xD;&#xA;...&#xD;&#xA;await api.tx.somewhere.something(something);&#xD;&#xA;...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and always let the API create the types as &#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;await api.tx.somewhere.something({ foo: 'bar' });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;does this apply to every single case? is it safe to assume we should not use createType at all within our development while using polkadot-js?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41066" PostHistoryTypeId="5" PostId="10366" RevisionGUID="0940c05a-b457-470b-bbc0-9ee7bd7f3085" CreationDate="2023-11-01T13:02:47.887" UserId="1786" Comment="added 25 characters in body" Text="## Summary&#xD;&#xA;&#xD;&#xA;As a fore-warning I am not the maintainer of polkadot-js but a super user instead. The below is just my opinion, and does not sit as the &quot;Be all end all&quot; solution for `createType` under the `ApiPromise` class.&#xD;&#xA;&#xD;&#xA;It is important to notice that using `createType` for creating `Codec` types that are generated from the metadata is unsafe and may cause bugs, and refactoring headaches in the future since those types may change in the metadata. It is best to let polkadot-js handle resolving those `Codec` types for when you call `api.tx.something.somewhere`. This can be done by just passing the args in as their expected structure using javascript types. That being said there might be a type you want to build that is not within the metadata provided by the chain but intrinsic to polkadot-js. That IMO is still perfectly acceptable. Below I will cover some examples of when using `createType` might be okay such as, Testing, Calls, ExtrinsicPayloads.&#xD;&#xA;&#xD;&#xA;## Testing&#xD;&#xA;&#xD;&#xA;As mentioned in my [comment](https://github.com/polkadot-js/api/issues/5741#issuecomment-1781338863) on the issue, `createType` is still very useful for mocking any call you may invoke on the `ApiPromise`. This allows for fluid mock testing, and mirrored responses. Here is the example I mention in the issue with some more explanations:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;// Create a ApiPromise that will not connect to a provider but instead will give all the mechanics&#xD;&#xA;// necessary to create the calls and types you may need.&#xD;&#xA;export function createApiWithAugmentations(metadataHex: `0x${string}`): ApiPromise {&#xD;&#xA;	const registry = new TypeRegistry();&#xD;&#xA;	const metadata = new Metadata(registry, metadataHex);&#xD;&#xA;&#xD;&#xA;	registry.setMetadata(metadata);&#xD;&#xA;&#xD;&#xA;	const api = new ApiPromise({&#xD;&#xA;		provider: new WsProvider('ws://', false),&#xD;&#xA;		registry,&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;	api.injectMetadata(metadata, true, registry);&#xD;&#xA;&#xD;&#xA;	return api;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;const mockApi = createApiWithAugmentations(&lt;some_metadata&gt;);&#xD;&#xA;&#xD;&#xA;// This is a mock call, that will return what the node would return if you were to call -&#xD;&#xA;// `api.query.polkadotXcm.safeXcmVersion`&#xD;&#xA;const getSafeXcmVersion = () =&gt;&#xD;&#xA;    Promise.resolve().then(() =&gt; {&#xD;&#xA;        return mockApi.registry.createType('Option&lt;u32&gt;', 2);&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;// This is the mock Api that create locally. This could be expanded even further with more &#xD;&#xA;// keys that exist on the ApiPromise type.&#xD;&#xA;const adjustedMockApi = {&#xD;&#xA;    registry: mockApi.registry&#xD;&#xA;    query: {&#xD;&#xA;        polkadotXcm: {&#xD;&#xA;            safeXcmVersion: getSafeXcmVersion&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Creating `Call`s&#xD;&#xA;&#xD;&#xA;Let's say for example you want to build a call. This call is going to be used to send a sudo instruction to chain. It can be done like the following:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;	const xcmMsg = api.tx.xcmPallet.send(&lt;some_multilocation&gt;, &lt;some_xcm_msg&gt;);&#xD;&#xA;	const xcmCall = api.createType('Call', {&#xD;&#xA;		callIndex: xcmMsg.callIndex,&#xD;&#xA;		args: xcmMsg.args,&#xD;&#xA;	});&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    // Sudo accepts the following arg types:&#xD;&#xA;    // (call: string | Uint8Array | IMethod&lt;AnyTuple, any&gt; | Call)&#xD;&#xA;    await api.tx.sudo.sudo(xcmCall).signAndSend(alice);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This can be useful for multiple usecases where the call needs to be constructed, and used somewhere else.&#xD;&#xA;&#xD;&#xA;Another usecase is if you wanted to decode a given call, you can create the type and key into the appropriate args you want to decode.&#xD;&#xA;&#xD;&#xA;## Creating `ExtrinsicPayload`s&#xD;&#xA;&#xD;&#xA;Similar to call above you can also decode encoded transactions with the `ExtrinsicPayload` type. &#xD;&#xA;&#xD;&#xA;For example lets assume you have an encoded transaction and you want the method to be abstracted and decoded from the following:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const encodedTx = 'some_encoded_tx';&#xD;&#xA;&#xD;&#xA;const extrinsicPayload = api.registry.createType('ExtrinsicPayload', encodedTx, {&#xD;&#xA;    version: EXTRINSIC_VERSION,&#xD;&#xA;});&#xD;&#xA;&#xD;&#xA;const call = api.registry.createType('Call', extrinsicPayload.method);&#xD;&#xA;const decodedMethodInfo = JSON.stringify(call.toHuman());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Overall&#xD;&#xA;&#xD;&#xA;All in all I think it's important to consider the use case where you are using `createType`, and whether the type you are building is directly from the metadata, or the type is a utility based reason provided from polkadot-js." ContentLicense="CC BY-SA 4.0" />
  <row Id="41067" PostHistoryTypeId="2" PostId="10372" RevisionGUID="6e591cd7-4446-4d30-8ab2-9b125d813d1b" CreationDate="2023-11-01T13:47:54.823" UserId="2348" Text="I have cloned polkadot-sdk which is of 1.1.0 version and when i try to build binary it is throwing error . can you please tell why  i am getting error as i have not changed anything in codebase yet. &#xD;&#xA;rust versions using. ==&gt; 1.72.0&#xD;&#xA;   nightly version. ==&gt;  1.75.0&#xD;&#xA;&#xD;&#xA;  [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/RDdsV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41069" PostHistoryTypeId="1" PostId="10372" RevisionGUID="6e591cd7-4446-4d30-8ab2-9b125d813d1b" CreationDate="2023-11-01T13:47:54.823" UserId="2348" Text="getting error while building substrate blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41070" PostHistoryTypeId="3" PostId="10372" RevisionGUID="6e591cd7-4446-4d30-8ab2-9b125d813d1b" CreationDate="2023-11-01T13:47:54.823" UserId="2348" Text="|error|blockchain|build|versioning|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41071" PostHistoryTypeId="2" PostId="10373" RevisionGUID="6b6ab402-9fd3-4967-83d0-072aceb550dc" CreationDate="2023-11-01T13:58:35.867" UserId="1795" Text="my problem is the following:&#xD;&#xA;&#xD;&#xA;There is a pallet which contains some storage, some extrinsics, and a type in its `Config` implementing `trait CustomPalletHooks` to which it delegates some logic.&#xD;&#xA;Assuming this trait is responsible to collect deposits for some on-chain storage and store them somewhere (i.e, the account paying for it, the currency, and the amount), is it possible for the type implementing the trait to declare a new `StorageMap` that, when included in the metadata, would look like it's part of the pallet? So that, for instance, a client could call `api.query.pallet.storage(key)`?&#xD;&#xA;&#xD;&#xA;The reason is that the logic for collecting the deposit should not be tightly coupled with the rest of the pallet logic, but some runtimes might decide to collect some deposit for some on-chain space utilized, and ideally this would live under the same namespace that the pallet lives.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="41073" PostHistoryTypeId="1" PostId="10373" RevisionGUID="6b6ab402-9fd3-4967-83d0-072aceb550dc" CreationDate="2023-11-01T13:58:35.867" UserId="1795" Text="Add a `StorageMap` to a pallet (metadata) from outside the pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="41074" PostHistoryTypeId="3" PostId="10373" RevisionGUID="6b6ab402-9fd3-4967-83d0-072aceb550dc" CreationDate="2023-11-01T13:58:35.867" UserId="1795" Text="|pallet|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41075" PostHistoryTypeId="2" PostId="10374" RevisionGUID="71100d2c-7c1c-4cdb-a281-cba358693571" CreationDate="2023-11-01T14:32:33.343" UserId="251" Text="You can also check out this https://github.com/darwinia-network/darwinia/blob/main/pallet/staking/src/lib.rs.&#xD;&#xA;&#xD;&#xA;This is our staking pallet, which is used in a parachain but does not rely on any parachain component. It can be easily transferred to a solo chain. Additionally, I have recently extracted the inflation logic, making it much simpler for you to apply your own inflation logic. Check it out here: https://github.com/darwinia-network/darwinia/pull/1310." ContentLicense="CC BY-SA 4.0" />
  <row Id="41077" PostHistoryTypeId="2" PostId="10375" RevisionGUID="ddde564b-3319-499f-9c86-4e4c713932ea" CreationDate="2023-11-01T15:05:09.163" UserId="3317" Text="I coincidentally bumped into this question. Assuming though that you meant the following: &#xD;&#xA;```&#xD;&#xA;#[pallet::weight(&lt;T as Config&gt;::WeightInfo::foo(*hint))]&#xD;&#xA;fn foo(hint: u32) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;   let real = get_real();&#xD;&#xA;&#xD;&#xA;   if real &gt; hint {&#xD;&#xA;      return &lt;Error&lt;T&gt;&gt;::HintTooLow.with_weight(T::WeightInfo::foo(real);&#xD;&#xA;   }&#xD;&#xA;&#xD;&#xA;   // do something&#xD;&#xA;   Ok(Some(T::WeightInfo::foo(real)).into())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would like to explain what will happen and what are the dangers:&#xD;&#xA;&#xD;&#xA;When a block author is building a block it goes to its tx pool and finds this tx on top (most priority) and will run its respective weight function =&gt; `foo(hint)` in your case (to be found in the pallet's `weights.rs`). If there is enough weight left in the block, meaning the resulting weight of `foo(hint)` (the [`DispatchInfo`][3]) is less than the available weight left in the block, the block author will include it in the block and validate and apply the extrinsic. &#xD;&#xA;&#xD;&#xA;Now the extrinsic's logic will be executed and because your return value is  the [`DispatchResultWithPostInfo`][2] you can give [`PostDispatchInfo`][3].&#xD;&#xA;This will be the actual weight that will be accounted for in the block and what the user will pay for in terms of fees. In the other case where an extrinsic has the return value [`DispatchResult`][1]. The user will pay for the weight determined when authoring the block =&gt; `DispatchInfo`. &#xD;&#xA;&#xD;&#xA;In your case I assume you would like to return the `real` weight in any scenario (failing or successfully executing the extrinsic) since otherwise your chain could be spammed. Why?&#xD;&#xA;&#xD;&#xA;If for example we would change `real` -&gt; `hint`: &#xD;&#xA;```&#xD;&#xA;if real &gt; hint {&#xD;&#xA;    return Error&lt;T&gt;::HintTooLow.with_weight(T::WeightInfo::foo(hint));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Someone could spam your chain with `hint == 0` and not having to pay a dime for the execution and therefore spamming your chain for free.&#xD;&#xA;&#xD;&#xA;I still do not understand what you are trying to accomplish or why, but I hope this can be useful for others in the future.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/polkadot-sdk/master/frame_support/dispatch/type.DispatchResult.html&#xD;&#xA;  [2]: https://paritytech.github.io/polkadot-sdk/master/frame_support/dispatch/type.DispatchResultWithPostInfo.html&#xD;&#xA;  [3]: https://paritytech.github.io/polkadot-sdk/master/frame_support/dispatch/struct.DispatchInfo.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="41079" PostHistoryTypeId="2" PostId="10376" RevisionGUID="6fc9c7f5-8eeb-4355-88d3-68c2fcd9a323" CreationDate="2023-11-01T21:01:49.893" UserId="251" Text="The compiler has already told you. &#xD;&#xA;&#xD;&#xA;Need a `&amp;[..]`. &#xD;&#xA;&#xD;&#xA;Try call `.as_slice()` on your `BoundedVec` type." ContentLicense="CC BY-SA 4.0" />
  <row Id="41081" PostHistoryTypeId="2" PostId="10377" RevisionGUID="e5980712-09fc-49ff-8d0b-eb8db40b7506" CreationDate="2023-11-02T05:17:53.730" UserId="2484" Text="I already read this post https://substrate.stackexchange.com/questions/2457/xcm-cross-chain-transfer-error-failedtotransactassetinsufficientbalance , but nothing helped.&#xD;&#xA;&#xD;&#xA;I get the following XCM logs (originates from Parachain 2001):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SovereignSignedViaLocation origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] RelayChainAsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SiblingParachainAsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SignedAccountId32AsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::convert_origin: [Parachain] could not convert: origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedWeightBounds message: Xcm([DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }])    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, message: Xcm([DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]), weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::barriers: [Parachain] TakeWeightCredit origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, instructions: [DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }], max_weight: &lt;wasm:stripped&gt;, properties: Properties { weight_credit: &lt;wasm:stripped&gt;, message_id: None }    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::process: [Parachain] origin: Some(MultiLocation { parents: 1, interior: X1(Parachain(2000)) }), total_surplus/refunded: &lt;wasm:stripped&gt;/&lt;wasm:stripped&gt;, error_handler_weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }))    &#xD;&#xA;2023-11-02 05:35:24.358 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }]))      &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute: [Parachain] !!! ERROR: FailedToTransactAsset(&quot;InsufficientBalance&quot;)    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 1, xcm_error: FailedToTransactAsset(&quot;InsufficientBalance&quot;), weight: &lt;wasm:stripped&gt; })    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] AssetRegistryTrader::refund_weight weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] Execution errored at 1: FailedToTransactAsset(&quot;InsufficientBalance&quot;) (original_origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }) &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My setup is the following:&#xD;&#xA;&#xD;&#xA;- local rococo relaychain&#xD;&#xA;- parachain 2000&#xD;&#xA;- parachain 2001&#xD;&#xA;&#xD;&#xA;I send the following encoded call data XCM message from parachain 2000 to parachain 2001 as the well-known Alice account as a normal signed origin:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x490003010100451f030c000400000106020001000000000000000000000000000000000000000000000000000000000000000b00a0724e18091300000106020001000000000000000000000000000000000000000000000000000000000000000b00a0724e1809002700000106020001000000000000000000000000000000000000000000000000000000000000000700e40b5402010200411f0100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0Ei5p.png&#xD;&#xA;&#xD;&#xA;I funded the sovereign account of para id 2000 and 2001 and the sibling account of parachain id 2000 and 2001 on the rococo-local relaychain.&#xD;&#xA;&#xD;&#xA;I am currently trying out the `LockAsset` functionality and what I noticed is that the well known Alice account is different on the receiving chain after sending it through XCM. It is: `[212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125]`, which translates to `0x003593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da200` (using substrate utilities https://www.shawntabrizi.com/substrate-js-utilities/ represented as account id `5C4ymnPah145YenQ6EAUCrt6ZssKz15hVuLMGNVxNKhDtrP2` on para 2001). Although the Alice account has the account id `5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY`, which should be `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d` in hex (`[0,212,53,147,199,21,253,211,28,97,20,26,189,4,169,159,214,130,44,133,88,133,76,205,227,154,86,132,231,165,109,162,125]` u8 byte array).&#xD;&#xA;&#xD;&#xA;So my inner question is: Which account has to be funded with how much to fix the `InsufficientBalance` error? &#xD;&#xA;&#xD;&#xA;I am already figuring this out for 3 days.. It does not make any sense and I would really love some help now.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="41083" PostHistoryTypeId="1" PostId="10377" RevisionGUID="e5980712-09fc-49ff-8d0b-eb8db40b7506" CreationDate="2023-11-02T05:17:53.730" UserId="2484" Text="How to fix the `FailedToTransactAsset(&quot;InsufficientBalance&quot;)` error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41084" PostHistoryTypeId="3" PostId="10377" RevisionGUID="e5980712-09fc-49ff-8d0b-eb8db40b7506" CreationDate="2023-11-02T05:17:53.730" UserId="2484" Text="|xcm|balances|xcmp|transact|insufficient|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41085" PostHistoryTypeId="5" PostId="10377" RevisionGUID="06be387a-ee06-4316-b272-5d963d12e1fc" CreationDate="2023-11-02T05:38:34.073" UserId="2484" Comment="added 5354 characters in body" Text="I already read this post https://substrate.stackexchange.com/questions/2457/xcm-cross-chain-transfer-error-failedtotransactassetinsufficientbalance , but nothing helped.&#xD;&#xA;&#xD;&#xA;I get the following XCM logs (originates from Parachain 2001):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SovereignSignedViaLocation origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] RelayChainAsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SiblingParachainAsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SignedAccountId32AsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::convert_origin: [Parachain] could not convert: origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedWeightBounds message: Xcm([DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }])    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, message: Xcm([DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]), weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::barriers: [Parachain] TakeWeightCredit origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, instructions: [DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }], max_weight: &lt;wasm:stripped&gt;, properties: Properties { weight_credit: &lt;wasm:stripped&gt;, message_id: None }    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::process: [Parachain] origin: Some(MultiLocation { parents: 1, interior: X1(Parachain(2000)) }), total_surplus/refunded: &lt;wasm:stripped&gt;/&lt;wasm:stripped&gt;, error_handler_weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }))    &#xD;&#xA;2023-11-02 05:35:24.358 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }]))      &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute: [Parachain] !!! ERROR: FailedToTransactAsset(&quot;InsufficientBalance&quot;)    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 1, xcm_error: FailedToTransactAsset(&quot;InsufficientBalance&quot;), weight: &lt;wasm:stripped&gt; })    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] AssetRegistryTrader::refund_weight weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] Execution errored at 1: FailedToTransactAsset(&quot;InsufficientBalance&quot;) (original_origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }) &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My setup is the following:&#xD;&#xA;&#xD;&#xA;- local rococo relaychain&#xD;&#xA;- parachain 2000&#xD;&#xA;- parachain 2001&#xD;&#xA;&#xD;&#xA;I send the following encoded call data XCM message from parachain 2000 to parachain 2001 as the well-known Alice account as a normal signed origin:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x490003010100451f030c000400000106020001000000000000000000000000000000000000000000000000000000000000000b00a0724e18091300000106020001000000000000000000000000000000000000000000000000000000000000000b00a0724e1809002700000106020001000000000000000000000000000000000000000000000000000000000000000700e40b5402010200411f0100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0Ei5p.png&#xD;&#xA;&#xD;&#xA;I funded the sovereign account of para id 2000 and 2001 and the sibling account of parachain id 2000 and 2001 on the rococo-local relaychain.&#xD;&#xA;&#xD;&#xA;I am currently trying out the `LockAsset` functionality and what I noticed is that the well known Alice account is different on the receiving chain after sending it through XCM. It is: `[212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125]`, which translates to `0x003593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da200` (using substrate utilities https://www.shawntabrizi.com/substrate-js-utilities/ represented as account id `5C4ymnPah145YenQ6EAUCrt6ZssKz15hVuLMGNVxNKhDtrP2` on para 2001). Although the Alice account has the account id `5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY`, which should be `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d` in hex (`[0,212,53,147,199,21,253,211,28,97,20,26,189,4,169,159,214,130,44,133,88,133,76,205,227,154,86,132,231,165,109,162,125]` u8 byte array).&#xD;&#xA;&#xD;&#xA;So my inner question is: Which account has to be funded with how much of what curreny to fix the `InsufficientBalance` error? &#xD;&#xA;&#xD;&#xA;Side fact: I am using the following XCM configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub const MY_KEY: &amp;[u8] = &amp;[0, 1];&#xD;&#xA;&#xD;&#xA;    pub const NoneNetwork: Option&lt;NetworkId&gt; = None;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;pub fn vec_to_fixed_array&lt;const S: usize&gt;(src: Vec&lt;u8&gt;) -&gt; [u8; S] {&#xD;&#xA;    let mut dest = [0; S];&#xD;&#xA;    let len = min(src.len(), S);&#xD;&#xA;    dest[..len].copy_from_slice(&amp;src.as_slice()[..len]);&#xD;&#xA;&#xD;&#xA;    dest&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn general_key(data: &amp;[u8]) -&gt; Junction {&#xD;&#xA;    GeneralKey {&#xD;&#xA;        length: data.len().min(32) as u8,&#xD;&#xA;        data: vec_to_fixed_array(data.to_vec()),&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;/// Means for transacting assets on this chain.&#xD;&#xA;pub type MultiAssetTransactor = MultiCurrencyAdapter&lt;&#xD;&#xA;    // All known Assets will be processed by the following MultiCurrency implementation.&#xD;&#xA;    Currencies,&#xD;&#xA;    // Any unknown Assets will be processed by the following UnknownAsset implementation.&#xD;&#xA;    (),&#xD;&#xA;    // This means that this adapter should handle any token that `AssetConvert` can convert&#xD;&#xA;    // using Currencies and UnknownTokens in all other cases.&#xD;&#xA;    IsNativeConcrete&lt;AssetId, AssetConvert&gt;,&#xD;&#xA;    // Our chain's account ID type (we can't get away without mentioning it explicitly).&#xD;&#xA;    AccountId,&#xD;&#xA;    // Convert an XCM `MultiLocation` into a local account id.&#xD;&#xA;    LocationToAccountId,&#xD;&#xA;    // The AssetId that corresponds to the native currency.&#xD;&#xA;    AssetId,&#xD;&#xA;    // Struct that provides functions to convert `Asset` &lt;=&gt; `MultiLocation`.&#xD;&#xA;    AssetConvert,&#xD;&#xA;    // In case of deposit failure, known assets will be placed in treasury.&#xD;&#xA;    DepositToAlternative&lt;RootAccount, Currencies, AssetId, AccountId, Balance&gt;,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used&#xD;&#xA;/// when determining ownership of accounts for asset transacting and when attempting to use XCM&#xD;&#xA;/// `Transact` in order to determine the dispatch Origin.&#xD;&#xA;pub type LocationToAccountId = (&#xD;&#xA;    // The parent (Relay-chain) origin converts to the default `AccountId`.&#xD;&#xA;    ParentIsPreset&lt;AccountId&gt;,&#xD;&#xA;    // Sibling parachain origins convert to AccountId via the `ParaId::into`.&#xD;&#xA;    SiblingParachainConvertsVia&lt;polkadot_parachain_primitives::primitives::Sibling, AccountId&gt;,&#xD;&#xA;    // If we receive a MultiLocation of type AccountKey20, just generate a native account&#xD;&#xA;    AccountId32Aliases&lt;NoneNetwork, AccountId&gt;,&#xD;&#xA;    // Generate remote accounts according to polkadot standards&#xD;&#xA;    staging_xcm_builder::HashedDescription&lt;&#xD;&#xA;        AccountId,&#xD;&#xA;        staging_xcm_builder::DescribeFamily&lt;staging_xcm_builder::DescribeAllTerminal&gt;,&#xD;&#xA;    &gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,&#xD;&#xA;/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can&#xD;&#xA;/// biases the kind of local `Origin` it will become.&#xD;&#xA;pub type XcmOriginToTransactDispatchOrigin = (&#xD;&#xA;    // Sovereign account converter; this attempts to derive an `AccountId` from the origin location&#xD;&#xA;    // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for&#xD;&#xA;    // foreign chains who want to have a local sovereign account on this chain which they control.&#xD;&#xA;    SovereignSignedViaLocation&lt;LocationToAccountId, RuntimeOrigin&gt;,&#xD;&#xA;    // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when&#xD;&#xA;    // recognised.&#xD;&#xA;    RelayChainAsNative&lt;RelayChainOrigin, RuntimeOrigin&gt;,&#xD;&#xA;    // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when&#xD;&#xA;    // recognised.&#xD;&#xA;    SiblingParachainAsNative&lt;cumulus_pallet_xcm::Origin, RuntimeOrigin&gt;,&#xD;&#xA;    // Native signed account converter; this just converts an `AccountId32` origin into a normal&#xD;&#xA;    // `RuntimeOrigin::Signed` origin of the same 32-byte value.&#xD;&#xA;    SignedAccountId32AsNative&lt;NoneNetwork, RuntimeOrigin&gt;,&#xD;&#xA;    // Xcm origins can be represented natively under the Xcm pallet's Xcm origin.&#xD;&#xA;    XcmPassthrough&lt;RuntimeOrigin&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;/// Convert an incoming `MultiLocation` into a `Asset` if possible.&#xD;&#xA;/// Here we need to know the canonical representation of all the tokens we handle in order to&#xD;&#xA;/// correctly convert their `MultiLocation` representation into our internal `Asset` type.&#xD;&#xA;impl Convert&lt;MultiLocation, Option&lt;AssetId&gt;&gt; for AssetConvert {&#xD;&#xA;    fn convert(location: MultiLocation) -&gt; Option&lt;AssetId&gt; {&#xD;&#xA;        if location == MultiLocation::parent() {&#xD;&#xA;            return Some(1u32);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        match location {&#xD;&#xA;            MultiLocation {&#xD;&#xA;                parents: 0,&#xD;&#xA;                interior: X1(GeneralKey { data, length }),&#xD;&#xA;            } =&gt; {&#xD;&#xA;                let key = &amp;data[..data.len().min(length as usize)];&#xD;&#xA;                if key == MY_KEY {&#xD;&#xA;                    return Some(0u32);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                None&#xD;&#xA;            }&#xD;&#xA;            MultiLocation {&#xD;&#xA;                parents: 1,&#xD;&#xA;                interior: X2(Parachain(para_id), GeneralKey { data, length }),&#xD;&#xA;            } =&gt; {&#xD;&#xA;                let key = &amp;data[..data.len().min(length as usize)];&#xD;&#xA;                if para_id == u32::from(ParachainInfo::parachain_id()) &amp;&amp; key == MY_KEY {&#xD;&#xA;                    return Some(0u32);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                AssetRegistry::location_to_asset_id(location)&#xD;&#xA;            }&#xD;&#xA;            _ =&gt; AssetRegistry::location_to_asset_id(location),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am already figuring this out for 3 days.. It does not make any sense and I would really love some help now.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="41086" PostHistoryTypeId="2" PostId="10378" RevisionGUID="48eec49c-dbf8-42b9-bd98-c850433b12d4" CreationDate="2023-11-02T05:41:35.623" UserId="2372" Text="In the pallet-staking, the transaction fee is distributed between the treasury and author. I want to know that how validators and nominator are getting their reward?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41088" PostHistoryTypeId="1" PostId="10378" RevisionGUID="48eec49c-dbf8-42b9-bd98-c850433b12d4" CreationDate="2023-11-02T05:41:35.623" UserId="2372" Text="How do nominators get paid in the staking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41089" PostHistoryTypeId="3" PostId="10378" RevisionGUID="48eec49c-dbf8-42b9-bd98-c850433b12d4" CreationDate="2023-11-02T05:41:35.623" UserId="2372" Text="|validator|transaction-fees|nominator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41090" PostHistoryTypeId="5" PostId="10377" RevisionGUID="6ebbbda7-55c0-4003-96e9-80ce25eaf8b5" CreationDate="2023-11-02T05:46:39.893" UserId="2484" Comment="added 161 characters in body" Text="I already read this post https://substrate.stackexchange.com/questions/2457/xcm-cross-chain-transfer-error-failedtotransactassetinsufficientbalance , but nothing helped.&#xD;&#xA;&#xD;&#xA;I get the following XCM logs (originates from Parachain 2001):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SovereignSignedViaLocation origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] RelayChainAsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SiblingParachainAsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SignedAccountId32AsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::convert_origin: [Parachain] could not convert: origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedWeightBounds message: Xcm([DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }])    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, message: Xcm([DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]), weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::barriers: [Parachain] TakeWeightCredit origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, instructions: [DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }], max_weight: &lt;wasm:stripped&gt;, properties: Properties { weight_credit: &lt;wasm:stripped&gt;, message_id: None }    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::process: [Parachain] origin: Some(MultiLocation { parents: 1, interior: X1(Parachain(2000)) }), total_surplus/refunded: &lt;wasm:stripped&gt;/&lt;wasm:stripped&gt;, error_handler_weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }))    &#xD;&#xA;2023-11-02 05:35:24.358 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }]))      &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute: [Parachain] !!! ERROR: FailedToTransactAsset(&quot;InsufficientBalance&quot;)    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 1, xcm_error: FailedToTransactAsset(&quot;InsufficientBalance&quot;), weight: &lt;wasm:stripped&gt; })    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] AssetRegistryTrader::refund_weight weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] Execution errored at 1: FailedToTransactAsset(&quot;InsufficientBalance&quot;) (original_origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }) &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My setup is the following:&#xD;&#xA;&#xD;&#xA;- local rococo relaychain&#xD;&#xA;- parachain 2000&#xD;&#xA;- parachain 2001&#xD;&#xA;&#xD;&#xA;I send the following encoded call data XCM message from parachain 2000 to parachain 2001 as the well-known Alice account as a normal signed origin:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x490003010100451f030c000400000106020001000000000000000000000000000000000000000000000000000000000000000b00a0724e18091300000106020001000000000000000000000000000000000000000000000000000000000000000b00a0724e1809002700000106020001000000000000000000000000000000000000000000000000000000000000000700e40b5402010200411f0100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I funded the sovereign account of para id 2000 and 2001 and the sibling account of parachain id 2000 and 2001 on the rococo-local relaychain.&#xD;&#xA;&#xD;&#xA;I am currently trying out the `LockAsset` functionality and what I noticed is that the well known Alice account is different on the receiving chain after sending it through XCM. It is: `[212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125]`, which translates to `0x003593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da200` (using substrate utilities https://www.shawntabrizi.com/substrate-js-utilities/ represented as account id `5C4ymnPah145YenQ6EAUCrt6ZssKz15hVuLMGNVxNKhDtrP2` on para 2001). Although the Alice account has the account id `5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY`, which should be `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d` in hex (`[0,212,53,147,199,21,253,211,28,97,20,26,189,4,169,159,214,130,44,133,88,133,76,205,227,154,86,132,231,165,109,162,125]` u8 byte array).&#xD;&#xA;&#xD;&#xA;So my inner question is: Which account has to be funded with how much of what curreny to fix the `InsufficientBalance` error? &#xD;&#xA;&#xD;&#xA;Side fact: I am using the following XCM configuration:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub const MY_KEY: &amp;[u8] = &amp;[0, 1];&#xD;&#xA;&#xD;&#xA;    pub const NoneNetwork: Option&lt;NetworkId&gt; = None;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;pub fn vec_to_fixed_array&lt;const S: usize&gt;(src: Vec&lt;u8&gt;) -&gt; [u8; S] {&#xD;&#xA;    let mut dest = [0; S];&#xD;&#xA;    let len = min(src.len(), S);&#xD;&#xA;    dest[..len].copy_from_slice(&amp;src.as_slice()[..len]);&#xD;&#xA;&#xD;&#xA;    dest&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn general_key(data: &amp;[u8]) -&gt; Junction {&#xD;&#xA;    GeneralKey {&#xD;&#xA;        length: data.len().min(32) as u8,&#xD;&#xA;        data: vec_to_fixed_array(data.to_vec()),&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;/// Means for transacting assets on this chain.&#xD;&#xA;pub type MultiAssetTransactor = MultiCurrencyAdapter&lt;&#xD;&#xA;    // All known Assets will be processed by the following MultiCurrency implementation.&#xD;&#xA;    Currencies,&#xD;&#xA;    // Any unknown Assets will be processed by the following UnknownAsset implementation.&#xD;&#xA;    (),&#xD;&#xA;    // This means that this adapter should handle any token that `AssetConvert` can convert&#xD;&#xA;    // using Currencies and UnknownTokens in all other cases.&#xD;&#xA;    IsNativeConcrete&lt;AssetId, AssetConvert&gt;,&#xD;&#xA;    // Our chain's account ID type (we can't get away without mentioning it explicitly).&#xD;&#xA;    AccountId,&#xD;&#xA;    // Convert an XCM `MultiLocation` into a local account id.&#xD;&#xA;    LocationToAccountId,&#xD;&#xA;    // The AssetId that corresponds to the native currency.&#xD;&#xA;    AssetId,&#xD;&#xA;    // Struct that provides functions to convert `Asset` &lt;=&gt; `MultiLocation`.&#xD;&#xA;    AssetConvert,&#xD;&#xA;    // In case of deposit failure, known assets will be placed in treasury.&#xD;&#xA;    DepositToAlternative&lt;RootAccount, Currencies, AssetId, AccountId, Balance&gt;,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used&#xD;&#xA;/// when determining ownership of accounts for asset transacting and when attempting to use XCM&#xD;&#xA;/// `Transact` in order to determine the dispatch Origin.&#xD;&#xA;pub type LocationToAccountId = (&#xD;&#xA;    // The parent (Relay-chain) origin converts to the default `AccountId`.&#xD;&#xA;    ParentIsPreset&lt;AccountId&gt;,&#xD;&#xA;    // Sibling parachain origins convert to AccountId via the `ParaId::into`.&#xD;&#xA;    SiblingParachainConvertsVia&lt;polkadot_parachain_primitives::primitives::Sibling, AccountId&gt;,&#xD;&#xA;    // If we receive a MultiLocation of type AccountKey20, just generate a native account&#xD;&#xA;    AccountId32Aliases&lt;NoneNetwork, AccountId&gt;,&#xD;&#xA;    // Generate remote accounts according to polkadot standards&#xD;&#xA;    staging_xcm_builder::HashedDescription&lt;&#xD;&#xA;        AccountId,&#xD;&#xA;        staging_xcm_builder::DescribeFamily&lt;staging_xcm_builder::DescribeAllTerminal&gt;,&#xD;&#xA;    &gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,&#xD;&#xA;/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can&#xD;&#xA;/// biases the kind of local `Origin` it will become.&#xD;&#xA;pub type XcmOriginToTransactDispatchOrigin = (&#xD;&#xA;    // Sovereign account converter; this attempts to derive an `AccountId` from the origin location&#xD;&#xA;    // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for&#xD;&#xA;    // foreign chains who want to have a local sovereign account on this chain which they control.&#xD;&#xA;    SovereignSignedViaLocation&lt;LocationToAccountId, RuntimeOrigin&gt;,&#xD;&#xA;    // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when&#xD;&#xA;    // recognised.&#xD;&#xA;    RelayChainAsNative&lt;RelayChainOrigin, RuntimeOrigin&gt;,&#xD;&#xA;    // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when&#xD;&#xA;    // recognised.&#xD;&#xA;    SiblingParachainAsNative&lt;cumulus_pallet_xcm::Origin, RuntimeOrigin&gt;,&#xD;&#xA;    // Native signed account converter; this just converts an `AccountId32` origin into a normal&#xD;&#xA;    // `RuntimeOrigin::Signed` origin of the same 32-byte value.&#xD;&#xA;    SignedAccountId32AsNative&lt;NoneNetwork, RuntimeOrigin&gt;,&#xD;&#xA;    // Xcm origins can be represented natively under the Xcm pallet's Xcm origin.&#xD;&#xA;    XcmPassthrough&lt;RuntimeOrigin&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;/// Convert an incoming `MultiLocation` into a `Asset` if possible.&#xD;&#xA;/// Here we need to know the canonical representation of all the tokens we handle in order to&#xD;&#xA;/// correctly convert their `MultiLocation` representation into our internal `Asset` type.&#xD;&#xA;impl Convert&lt;MultiLocation, Option&lt;AssetId&gt;&gt; for AssetConvert {&#xD;&#xA;    fn convert(location: MultiLocation) -&gt; Option&lt;AssetId&gt; {&#xD;&#xA;        if location == MultiLocation::parent() {&#xD;&#xA;            return Some(1u32);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        match location {&#xD;&#xA;            MultiLocation {&#xD;&#xA;                parents: 0,&#xD;&#xA;                interior: X1(GeneralKey { data, length }),&#xD;&#xA;            } =&gt; {&#xD;&#xA;                let key = &amp;data[..data.len().min(length as usize)];&#xD;&#xA;                if key == MY_KEY {&#xD;&#xA;                    return Some(0u32);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                None&#xD;&#xA;            }&#xD;&#xA;            MultiLocation {&#xD;&#xA;                parents: 1,&#xD;&#xA;                interior: X2(Parachain(para_id), GeneralKey { data, length }),&#xD;&#xA;            } =&gt; {&#xD;&#xA;                let key = &amp;data[..data.len().min(length as usize)];&#xD;&#xA;                if para_id == u32::from(ParachainInfo::parachain_id()) &amp;&amp; key == MY_KEY {&#xD;&#xA;                    return Some(0u32);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                AssetRegistry::location_to_asset_id(location)&#xD;&#xA;            }&#xD;&#xA;            _ =&gt; AssetRegistry::location_to_asset_id(location),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;`0x76f80ba707bc6d37e0a1403c995b3cba9d424ed6ab87262b0e9a30d5dc5822c5`&#xD;&#xA;&#xD;&#xA;I am already figuring this out for 3 days.. It does not make any sense and I would really love some help now.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0Ei5p.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/H7e57.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41091" PostHistoryTypeId="2" PostId="10379" RevisionGUID="4c8effa8-51c3-444f-a609-f7350973e1f6" CreationDate="2023-11-02T05:54:12.697" UserId="1959" Text="Try making this account `5C4ymnPah145YenQ6EAUCrt6ZssKz15hVuLMGNVxNKhDtrP2` on para2001 has enough balance &#xD;&#xA;&#xD;&#xA;Which account: `5C4ymnPah145YenQ6EAUCrt6ZssKz15hVuLMGNVxNKhDtrP2`&#xD;&#xA;&#xD;&#xA;What currency: `{ parents: 0, interior: X1(GeneralKey {0x001000...})}`&#xD;&#xA;&#xD;&#xA;How much: 10000000000000 units" ContentLicense="CC BY-SA 4.0" />
  <row Id="41093" PostHistoryTypeId="5" PostId="10377" RevisionGUID="167bd939-be90-4079-b0c2-67ca6bf3675c" CreationDate="2023-11-02T07:30:42.727" UserId="2484" Comment="added 59 characters in body" Text="I already read this post https://substrate.stackexchange.com/questions/2457/xcm-cross-chain-transfer-error-failedtotransactassetinsufficientbalance , but nothing helped.&#xD;&#xA;&#xD;&#xA;I get the following XCM logs (originates from Parachain 2001):&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SovereignSignedViaLocation origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] RelayChainAsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SiblingParachainAsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::origin_conversion: [Parachain] SignedAccountId32AsNative origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::convert_origin: [Parachain] could not convert: origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, kind: Superuser    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedWeightBounds message: Xcm([DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }])    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, message: Xcm([DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }]), weight_credit: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::barriers: [Parachain] TakeWeightCredit origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }, instructions: [DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] })), WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }])), BuyExecution { fees: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }, weight_limit: Unlimited }, LockAsset { asset: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000) }, unlocker: MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) } }], max_weight: &lt;wasm:stripped&gt;, properties: Properties { weight_credit: &lt;wasm:stripped&gt;, message_id: None }    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::process: [Parachain] origin: Some(MultiLocation { parents: 1, interior: X1(Parachain(2000)) }), total_surplus/refunded: &lt;wasm:stripped&gt;/&lt;wasm:stripped&gt;, error_handler_weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.357 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === DescendOrigin(X1(AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }))    &#xD;&#xA;2023-11-02 05:35:24.358 TRACE tokio-runtime-worker xcm::process_instruction: [Parachain] === WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(GeneralKey { length: 2, data: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }) }), fun: Fungible(10000000000000) }]))      &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute: [Parachain] !!! ERROR: FailedToTransactAsset(&quot;InsufficientBalance&quot;)    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] result: Err(ExecutorError { index: 1, xcm_error: FailedToTransactAsset(&quot;InsufficientBalance&quot;), weight: &lt;wasm:stripped&gt; })    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] FixedRateOfFungible::refund_weight weight: &lt;wasm:stripped&gt;, context: XcmContext { origin: Some(MultiLocation { parents: 1, interior: X2(Parachain(2000), AccountId32 { network: None, id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), message_id: [143, 158, 177, 103, 122, 233, 162, 35, 234, 11, 70, 43, 39, 79, 250, 6, 104, 7, 82, 112, 172, 195, 84, 137, 36, 29, 174, 18, 82, 246, 144, 80], topic: None }    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::weight: [Parachain] AssetRegistryTrader::refund_weight weight: &lt;wasm:stripped&gt;    &#xD;&#xA;2023-11-02 05:35:24.359 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] Execution errored at 1: FailedToTransactAsset(&quot;InsufficientBalance&quot;) (original_origin: MultiLocation { parents: 1, interior: X1(Parachain(2000)) }) &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My setup is the following:&#xD;&#xA;&#xD;&#xA;- local rococo relaychain&#xD;&#xA;- parachain 2000&#xD;&#xA;- parachain 2001&#xD;&#xA;&#xD;&#xA;I send the following encoded call data XCM message from parachain 2000 to parachain 2001 as the well-known Alice account as a normal signed origin:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x490003010100451f030c000400000106020001000000000000000000000000000000000000000000000000000000000000000b00a0724e18091300000106020001000000000000000000000000000000000000000000000000000000000000000b00a0724e1809002700000106020001000000000000000000000000000000000000000000000000000000000000000700e40b5402010200411f0100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I funded the sovereign account of para id 2000 and 2001 and the sibling account of parachain id 2000 and 2001 on the rococo-local relaychain.&#xD;&#xA;&#xD;&#xA;I am currently trying out the `LockAsset` functionality and what I noticed is that the well known Alice account is different on the receiving chain after sending it through XCM. It is: `[212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125]`, which translates to `0x003593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da200` (using substrate utilities https://www.shawntabrizi.com/substrate-js-utilities/ represented as account id `5C4ymnPah145YenQ6EAUCrt6ZssKz15hVuLMGNVxNKhDtrP2` on para 2001). Although the Alice account has the account id `5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY`, which should be `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d` in hex (`[0,212,53,147,199,21,253,211,28,97,20,26,189,4,169,159,214,130,44,133,88,133,76,205,227,154,86,132,231,165,109,162,125]` u8 byte array).&#xD;&#xA;&#xD;&#xA;So my inner question is: Which account has to be funded with how much of what curreny to fix the `InsufficientBalance` error? &#xD;&#xA;&#xD;&#xA;Side fact: I am using the following XCM configuration:&#xD;&#xA;&#xD;&#xA;Here is the full version: https://pastebin.com/7242tXkA&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub const MY_KEY: &amp;[u8] = &amp;[0, 1];&#xD;&#xA;&#xD;&#xA;    pub const NoneNetwork: Option&lt;NetworkId&gt; = None;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;pub fn vec_to_fixed_array&lt;const S: usize&gt;(src: Vec&lt;u8&gt;) -&gt; [u8; S] {&#xD;&#xA;    let mut dest = [0; S];&#xD;&#xA;    let len = min(src.len(), S);&#xD;&#xA;    dest[..len].copy_from_slice(&amp;src.as_slice()[..len]);&#xD;&#xA;&#xD;&#xA;    dest&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;pub fn general_key(data: &amp;[u8]) -&gt; Junction {&#xD;&#xA;    GeneralKey {&#xD;&#xA;        length: data.len().min(32) as u8,&#xD;&#xA;        data: vec_to_fixed_array(data.to_vec()),&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;/// Means for transacting assets on this chain.&#xD;&#xA;pub type MultiAssetTransactor = MultiCurrencyAdapter&lt;&#xD;&#xA;    // All known Assets will be processed by the following MultiCurrency implementation.&#xD;&#xA;    Currencies,&#xD;&#xA;    // Any unknown Assets will be processed by the following UnknownAsset implementation.&#xD;&#xA;    (),&#xD;&#xA;    // This means that this adapter should handle any token that `AssetConvert` can convert&#xD;&#xA;    // using Currencies and UnknownTokens in all other cases.&#xD;&#xA;    IsNativeConcrete&lt;AssetId, AssetConvert&gt;,&#xD;&#xA;    // Our chain's account ID type (we can't get away without mentioning it explicitly).&#xD;&#xA;    AccountId,&#xD;&#xA;    // Convert an XCM `MultiLocation` into a local account id.&#xD;&#xA;    LocationToAccountId,&#xD;&#xA;    // The AssetId that corresponds to the native currency.&#xD;&#xA;    AssetId,&#xD;&#xA;    // Struct that provides functions to convert `Asset` &lt;=&gt; `MultiLocation`.&#xD;&#xA;    AssetConvert,&#xD;&#xA;    // In case of deposit failure, known assets will be placed in treasury.&#xD;&#xA;    DepositToAlternative&lt;RootAccount, Currencies, AssetId, AccountId, Balance&gt;,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used&#xD;&#xA;/// when determining ownership of accounts for asset transacting and when attempting to use XCM&#xD;&#xA;/// `Transact` in order to determine the dispatch Origin.&#xD;&#xA;pub type LocationToAccountId = (&#xD;&#xA;    // The parent (Relay-chain) origin converts to the default `AccountId`.&#xD;&#xA;    ParentIsPreset&lt;AccountId&gt;,&#xD;&#xA;    // Sibling parachain origins convert to AccountId via the `ParaId::into`.&#xD;&#xA;    SiblingParachainConvertsVia&lt;polkadot_parachain_primitives::primitives::Sibling, AccountId&gt;,&#xD;&#xA;    // If we receive a MultiLocation of type AccountKey20, just generate a native account&#xD;&#xA;    AccountId32Aliases&lt;NoneNetwork, AccountId&gt;,&#xD;&#xA;    // Generate remote accounts according to polkadot standards&#xD;&#xA;    staging_xcm_builder::HashedDescription&lt;&#xD;&#xA;        AccountId,&#xD;&#xA;        staging_xcm_builder::DescribeFamily&lt;staging_xcm_builder::DescribeAllTerminal&gt;,&#xD;&#xA;    &gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,&#xD;&#xA;/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can&#xD;&#xA;/// biases the kind of local `Origin` it will become.&#xD;&#xA;pub type XcmOriginToTransactDispatchOrigin = (&#xD;&#xA;    // Sovereign account converter; this attempts to derive an `AccountId` from the origin location&#xD;&#xA;    // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for&#xD;&#xA;    // foreign chains who want to have a local sovereign account on this chain which they control.&#xD;&#xA;    SovereignSignedViaLocation&lt;LocationToAccountId, RuntimeOrigin&gt;,&#xD;&#xA;    // Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when&#xD;&#xA;    // recognised.&#xD;&#xA;    RelayChainAsNative&lt;RelayChainOrigin, RuntimeOrigin&gt;,&#xD;&#xA;    // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when&#xD;&#xA;    // recognised.&#xD;&#xA;    SiblingParachainAsNative&lt;cumulus_pallet_xcm::Origin, RuntimeOrigin&gt;,&#xD;&#xA;    // Native signed account converter; this just converts an `AccountId32` origin into a normal&#xD;&#xA;    // `RuntimeOrigin::Signed` origin of the same 32-byte value.&#xD;&#xA;    SignedAccountId32AsNative&lt;NoneNetwork, RuntimeOrigin&gt;,&#xD;&#xA;    // Xcm origins can be represented natively under the Xcm pallet's Xcm origin.&#xD;&#xA;    XcmPassthrough&lt;RuntimeOrigin&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;/// Convert an incoming `MultiLocation` into a `Asset` if possible.&#xD;&#xA;/// Here we need to know the canonical representation of all the tokens we handle in order to&#xD;&#xA;/// correctly convert their `MultiLocation` representation into our internal `Asset` type.&#xD;&#xA;impl Convert&lt;MultiLocation, Option&lt;AssetId&gt;&gt; for AssetConvert {&#xD;&#xA;    fn convert(location: MultiLocation) -&gt; Option&lt;AssetId&gt; {&#xD;&#xA;        if location == MultiLocation::parent() {&#xD;&#xA;            return Some(1u32);&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        match location {&#xD;&#xA;            MultiLocation {&#xD;&#xA;                parents: 0,&#xD;&#xA;                interior: X1(GeneralKey { data, length }),&#xD;&#xA;            } =&gt; {&#xD;&#xA;                let key = &amp;data[..data.len().min(length as usize)];&#xD;&#xA;                if key == MY_KEY {&#xD;&#xA;                    return Some(0u32);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                None&#xD;&#xA;            }&#xD;&#xA;            MultiLocation {&#xD;&#xA;                parents: 1,&#xD;&#xA;                interior: X2(Parachain(para_id), GeneralKey { data, length }),&#xD;&#xA;            } =&gt; {&#xD;&#xA;                let key = &amp;data[..data.len().min(length as usize)];&#xD;&#xA;                if para_id == u32::from(ParachainInfo::parachain_id()) &amp;&amp; key == MY_KEY {&#xD;&#xA;                    return Some(0u32);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                AssetRegistry::location_to_asset_id(location)&#xD;&#xA;            }&#xD;&#xA;            _ =&gt; AssetRegistry::location_to_asset_id(location),&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;`0x76f80ba707bc6d37e0a1403c995b3cba9d424ed6ab87262b0e9a30d5dc5822c5`&#xD;&#xA;&#xD;&#xA;I am already figuring this out for 3 days.. It does not make any sense and I would really love some help now.&#xD;&#xA;&#xD;&#xA;Thanks!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/0Ei5p.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/H7e57.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41094" PostHistoryTypeId="5" PostId="10379" RevisionGUID="f994338a-9299-4a36-ad2c-bf629f7c3d7d" CreationDate="2023-11-02T09:46:01.057" UserId="1959" Comment="added 898 characters in body" Text="1. Maybe you should pass `212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125` to the [substrate utils](https://www.shawntabrizi.com/substrate-js-utilities/), the result is `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d`, it's Alice&#xD;&#xA;2. This location conversion was failed. [AccountId32Aliases](https://github.com/paritytech/polkadot-sdk/blob/polkadot-v1.2.0/polkadot/xcm/xcm-builder/src/location_conversion.rs#L325) got `None` when `withdraw_asset` who is {parents: 1, ...}, so it want transfer from None address, failed.&#xD;&#xA;&#xD;&#xA;My test log&#xD;&#xA;```&#xD;&#xA;xcm::currency_adapter: [Parachain] withdraw_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(PalletInstance(5)) }), fun: Fungible(1000000000000000000) }, who: MultiLocation { parents: 1, interior: X2(Parachain(2105), AccountKey20 { network: Some(Rococo), key: [192, 240, 244, 171, 50, 76, 70, 229, 93, 2, 208, 3, 51, 67, 180, 190, 138, 85, 83, 45] }) }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm researching why parents here is 1, or why `AccountIdAliases` doesn't support parents 1, I will update when there are results&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41095" PostHistoryTypeId="5" PostId="10379" RevisionGUID="2da82bac-8802-4d59-bc2b-f29e04d0eac9" CreationDate="2023-11-02T09:54:14.313" UserId="1959" Comment="added 140 characters in body" Text="1. Maybe you should pass `212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125` to the [substrate utils](https://www.shawntabrizi.com/substrate-js-utilities/), the result is `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d`, it's Alice&#xD;&#xA;2. This location conversion was failed. [AccountId32Aliases](https://github.com/paritytech/polkadot-sdk/blob/polkadot-v1.2.0/polkadot/xcm/xcm-builder/src/location_conversion.rs#L325) got `None` when `withdraw_asset` who is {parents: 1, ...}, so it want transfer from None address, failed. Why parents:1? [WithComputedOrigin](https://github.com/paritytech/polkadot-sdk/blob/polkadot-v1.1.0/polkadot/xcm/xcm-builder/src/barriers.rs#L202) change the origin.&#xD;&#xA;&#xD;&#xA;My test log&#xD;&#xA;```&#xD;&#xA;xcm::currency_adapter: [Parachain] withdraw_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(PalletInstance(5)) }), fun: Fungible(1000000000000000000) }, who: MultiLocation { parents: 1, interior: X2(Parachain(2105), AccountKey20 { network: Some(Rococo), key: [192, 240, 244, 171, 50, 76, 70, 229, 93, 2, 208, 3, 51, 67, 180, 190, 138, 85, 83, 45] }) }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm researching why `AccountIdAliases` doesn't support parents 1, I will update when there are results&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41096" PostHistoryTypeId="50" PostId="10110" RevisionGUID="589470a9-73df-4754-ac95-63e1ed8f40f1" CreationDate="2023-11-02T10:00:30.060" UserId="-1" />
  <row Id="41097" PostHistoryTypeId="5" PostId="10379" RevisionGUID="5d6c3122-e31b-45e4-bca1-1bdf498736b6" CreationDate="2023-11-02T10:13:21.783" UserId="1959" Comment="added 67 characters in body" Text="1. Maybe you should pass `212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125` to the [substrate utils](https://www.shawntabrizi.com/substrate-js-utilities/), the result is `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d`, it's Alice&#xD;&#xA;2. This location conversion was failed. [AccountId32Aliases](https://github.com/paritytech/polkadot-sdk/blob/polkadot-v1.2.0/polkadot/xcm/xcm-builder/src/location_conversion.rs#L325) got `None` when `withdraw_asset` who is {parents: 1, ...}, so it want transfer from None address, failed. Why parents:1? [WithComputedOrigin](https://github.com/paritytech/polkadot-sdk/blob/polkadot-v1.1.0/polkadot/xcm/xcm-builder/src/barriers.rs#L202) change the origin.&#xD;&#xA;&#xD;&#xA;My test log&#xD;&#xA;```&#xD;&#xA;xcm::currency_adapter: [Parachain] withdraw_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(PalletInstance(5)) }), fun: Fungible(1000000000000000000) }, who: MultiLocation { parents: 1, interior: X2(Parachain(2105), AccountKey20 { network: Some(Rococo), key: [192, 240, 244, 171, 50, 76, 70, 229, 93, 2, 208, 3, 51, 67, 180, 190, 138, 85, 83, 45] }) }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm researching why `AccountIdAliases` doesn't support parents 1, I will update when there are results&#xD;&#xA;&#xD;&#xA;Track here https://github.com/paritytech/polkadot-sdk/issues/2130" ContentLicense="CC BY-SA 4.0" />
  <row Id="41098" PostHistoryTypeId="2" PostId="10380" RevisionGUID="c1953c18-be8f-4344-af73-36b58e6c54e4" CreationDate="2023-11-02T10:43:38.717" UserId="427" Text="Recently in [Ternoa mainnet][1] we performed a RU to upgrade our versions to polkato-v0.9.31. In system pallet substrate have introduced new extrinsic set_code in this version which consumes max_block_weight which is not allowing us to do any RU from this version. When we checked these [answers][2] there are broadly two options to resolve this issue to perform a RU using a sudo_unchecked_weight or utility -&gt; with_weight function to override the weight. but 0.9.31 version's utility pallet doesn't have with_weight function and in our chain we don't have sudo pallet. So this is becoming a serious problem for us. ANY HELP WILL BE APPRECIATED. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.ternoa.network#/explorer&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/6940/427" ContentLicense="CC BY-SA 4.0" />
  <row Id="41100" PostHistoryTypeId="1" PostId="10380" RevisionGUID="c1953c18-be8f-4344-af73-36b58e6c54e4" CreationDate="2023-11-02T10:43:38.717" UserId="427" Text="No way to do a runtime-upgrade after we upgraded our mainnet chain to version 0.9.31 version" ContentLicense="CC BY-SA 4.0" />
  <row Id="41101" PostHistoryTypeId="3" PostId="10380" RevisionGUID="c1953c18-be8f-4344-af73-36b58e6c54e4" CreationDate="2023-11-02T10:43:38.717" UserId="427" Text="|weight|runtime-upgrade|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41102" PostHistoryTypeId="5" PostId="10379" RevisionGUID="aa05d5ef-0d57-4cef-a52a-cbd1ba56327e" CreationDate="2023-11-02T11:03:08.813" UserId="1959" Comment="added 98 characters in body" Text="1. Maybe you should pass `212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125` to the [substrate utils](https://www.shawntabrizi.com/substrate-js-utilities/), the result is `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d`, it's Alice&#xD;&#xA;2. This location conversion was failed. [AccountId32Aliases](https://github.com/paritytech/polkadot-sdk/blob/polkadot-v1.2.0/polkadot/xcm/xcm-builder/src/location_conversion.rs#L325) got `None` when `withdraw_asset` who is {parents: 1, ...}, so it want transfer from None address, failed. Why parents:1? [WithComputedOrigin](https://github.com/paritytech/polkadot-sdk/blob/polkadot-v1.1.0/polkadot/xcm/xcm-builder/src/barriers.rs#L202) change the origin.&#xD;&#xA;&#xD;&#xA;My test log&#xD;&#xA;```&#xD;&#xA;xcm::currency_adapter: [Parachain] withdraw_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: X1(PalletInstance(5)) }), fun: Fungible(1000000000000000000) }, who: MultiLocation { parents: 1, interior: X2(Parachain(2105), AccountKey20 { network: Some(Rococo), key: [192, 240, 244, 171, 50, 76, 70, 229, 93, 2, 208, 3, 51, 67, 180, 190, 138, 85, 83, 45] }) }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You cannot let someone claiming to be Alice from parachain X use the Alice account in parachain Y. That would put your chain at risk, as parachain X can claim to be a descended origin of any account. &#xD;&#xA;&#xD;&#xA;Track here https://github.com/paritytech/polkadot-sdk/issues/2130" ContentLicense="CC BY-SA 4.0" />
  <row Id="41103" PostHistoryTypeId="50" PostId="6278" RevisionGUID="0351c62d-d271-4988-a158-e8b6801b1ebf" CreationDate="2023-11-02T11:04:25.523" UserId="-1" />
  <row Id="41104" PostHistoryTypeId="2" PostId="10381" RevisionGUID="1a1dd304-ab18-4439-a01f-bb2a4199dcf4" CreationDate="2023-11-02T11:19:28.493" UserId="2484" Text="&gt; You cannot let someone claiming to be Alice from parachain X use the Alice account in parachain Y. That would put your chain at risk, as parachain X can claim to be a descended origin of any account. And that is what Account32Aliases prevents by checking that parents is 0 (i.e., in order to use Alice account in parachain Y the message should have been originated in parachain Y).&#xD;&#xA;&#xD;&#xA;&gt; You can use the convertor HashedDescription, which will hash the descended multilocation and give you a fresh new account that Alice from parachain X will be able to control in parachain Y" ContentLicense="CC BY-SA 4.0" />
  <row Id="41106" PostHistoryTypeId="2" PostId="10382" RevisionGUID="b764a72e-393d-4fc2-a8bf-7c3beecaeece" CreationDate="2023-11-02T12:12:24.793" UserId="94" Text="I think there is still a way to do a runtime upgrade by using `System::SetStorage` which seems to be present in your runtime.  &#xD;&#xA;The weight of that should be rather low and you can overwrite the [`:code`](https://github.com/paritytech/substrate/blob/a93858a8d80de838e54d286a820ea29d1a353746/primitives/storage/src/lib.rs#L195) key.  &#xD;&#xA;It is very hacky since no event or log will be deposited, but besides that it should work i think. Please test it locally first with chopsticks or another way to ensure that it will not make the situation worse." ContentLicense="CC BY-SA 4.0" />
  <row Id="41108" PostHistoryTypeId="2" PostId="10383" RevisionGUID="0d90febc-7d1d-4e8f-bef8-d0ff7ba5f95b" CreationDate="2023-11-02T12:21:06.900" UserId="4862" Text="I am referring [this documentation][1] on preparing a local relay chain in which they have provided a [plain sample relay chain spec][2]. Also, i have cloned [this release][3] locally. The documentation says that&#xD;&#xA;&#xD;&#xA;&gt; For this tutorial, the local relay chain uses a sample chain specification file with two validator relay chain nodes—Alice and Bob—as authorities. Because a relay chain must have at least one more validator node running than the total number of connected parachain collators, you can only use the chain specification from this tutorial for a local relay chain network with a single parachain.If you wanted to connect two parachains with a single collator each, you would need to run three or more relay chain validator nodes. In general, you would need to modify the chain specification and hard-code additional validators to set up a local test network for two or more parachains.&#xD;&#xA;&#xD;&#xA;My question is &quot;**How do i modify the chain spec and hardcode an additional relay chain validator to setup a local test network for two or more parachains?**&quot;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/&#xD;&#xA;  [2]: https://docs.substrate.io/assets/tutorials/relay-chain-specs/plain-local-chainspec.json/&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/tree/v1.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="41110" PostHistoryTypeId="1" PostId="10383" RevisionGUID="0d90febc-7d1d-4e8f-bef8-d0ff7ba5f95b" CreationDate="2023-11-02T12:21:06.900" UserId="4862" Text="How do i modify the chain spec for a local relay chain to have an additional relay chain validator?( I already have two-alice and bob)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41111" PostHistoryTypeId="3" PostId="10383" RevisionGUID="0d90febc-7d1d-4e8f-bef8-d0ff7ba5f95b" CreationDate="2023-11-02T12:21:06.900" UserId="4862" Text="|parachain|relay-chain|validator|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41112" PostHistoryTypeId="2" PostId="10384" RevisionGUID="fd1f6974-9d39-4d16-b71a-43b18c2d7fc0" CreationDate="2023-11-02T13:44:48.753" UserId="116" Text="When producing a block the validator gets a reward.&#xD;&#xA;&#xD;&#xA; - First the validator fee is subtracted. This is the fee the owner of the validator setup when launched the validator&#xD;&#xA;-  The remaining fee is distributed proportional to the amount staked by the nominators and the validator itself" ContentLicense="CC BY-SA 4.0" />
  <row Id="41114" PostHistoryTypeId="5" PostId="10383" RevisionGUID="ef571d25-5c82-4f1f-9e37-c59a86f98c30" CreationDate="2023-11-02T14:49:13.583" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I am referring [this documentation][1] on preparing a local relay chain in which they have provided a [plain sample relay chain spec][2]. Also, I have cloned [this release][3] locally. The documentation says that&#xD;&#xA;&#xD;&#xA;&gt; For this tutorial, the local relay chain uses a sample chain specification file with two validator relay chain nodes—Alice and Bob—as authorities. Because a relay chain must have at least one more validator node running than the total number of connected parachain collators, you can only use the chain specification from this tutorial for a local relay chain network with a single parachain. If you wanted to connect two parachains with a single collator each, you would need to run three or more relay chain validator nodes. In general, you would need to modify the chain specification and hard-code additional validators to set up a local test network for two or more parachains.&#xD;&#xA;&#xD;&#xA;My question is &quot;**How do I modify the chain spec and hardcode an additional relay chain validator to setup a local test network for two or more parachains?**&quot;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/&#xD;&#xA;  [2]: https://docs.substrate.io/assets/tutorials/relay-chain-specs/plain-local-chainspec.json/&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot/tree/v1.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="41115" PostHistoryTypeId="4" PostId="10383" RevisionGUID="ef571d25-5c82-4f1f-9e37-c59a86f98c30" CreationDate="2023-11-02T14:49:13.583" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="How do I modify the chain spec for a local relay chain to have an additional relay chain validator? (I already have two: Alice and Bob)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41116" PostHistoryTypeId="24" PostId="10383" RevisionGUID="ef571d25-5c82-4f1f-9e37-c59a86f98c30" CreationDate="2023-11-02T14:49:13.583" Comment="Proposed by 116 approved by 4862 edit id of 601" ContentLicense="CC BY-SA 4.0" />
  <row Id="41117" PostHistoryTypeId="2" PostId="10385" RevisionGUID="54731928-ea3a-4de1-a12f-d91a53337cd0" CreationDate="2023-11-02T15:29:57.893" UserId="2844" Text="&#xD;&#xA;I have decoded price from acurast, now I want to store the price in chain and access it. How can this be done?&#xD;&#xA;&#xD;&#xA;    pub struct OnAcurastFulfillment;&#xD;&#xA;    impl pallet_acurast_fulfillment_receiver::traits::OnFulfillment&lt;Runtime&gt; for OnAcurastFulfillment {&#xD;&#xA;        fn on_fulfillment(&#xD;&#xA;            _from: &lt;Runtime as frame_system::Config&gt;::AccountId,&#xD;&#xA;            _fulfillment: Fulfillment,&#xD;&#xA;        ) -&gt; DispatchResultWithInfo&lt;PostDispatchInfo&gt; {&#xD;&#xA;            // fulfillment.payload contains the bytes processed by the script&#xD;&#xA;            &#xD;&#xA;            let price: u128 =&#xD;&#xA;                parity_scale_codec::decode_from_bytes(_fulfillment.payload.into()).unwrap_or_default();&#xD;&#xA;    &#xD;&#xA;            Ok(().into())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;[project github link](https://github.com/XcavateBlockchain/tanssi/blob/1356707bc3a248c00340ec552dcef4b0d1517ff4/container-chains/templates/simple/runtime/src/lib.rs#L971)&#xD;&#xA;&#xD;&#xA;[tutorial I follow](https://docs.acurast.com/integrations/substrate/#substrate-integration-1)&#xD;&#xA;&#xD;&#xA;Thanks for any advice." ContentLicense="CC BY-SA 4.0" />
  <row Id="41119" PostHistoryTypeId="1" PostId="10385" RevisionGUID="54731928-ea3a-4de1-a12f-d91a53337cd0" CreationDate="2023-11-02T15:29:57.893" UserId="2844" Text="How to store value inside runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41120" PostHistoryTypeId="3" PostId="10385" RevisionGUID="54731928-ea3a-4de1-a12f-d91a53337cd0" CreationDate="2023-11-02T15:29:57.893" UserId="2844" Text="|substrate-node|oracles|acurast|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41121" PostHistoryTypeId="2" PostId="10386" RevisionGUID="0a18abb3-5b84-4670-8d69-05eb33818524" CreationDate="2023-11-02T17:20:17.320" UserId="377" Text="Currenty my chain(solochain) is on production which is working on POA. No I have integrated the staking pallet after then when i am going to upgrade that code in the old prod chain then its not working mean the continue running in POA.&#xD;&#xA;&#xD;&#xA;If i am starting the chain then its starting as expected and block selection is happening from staking as it should be.&#xD;&#xA;&#xD;&#xA;Its happening because in chainspec we have updated the necessary changes like added the initial authorities to the staking instead of AURA and Grandpa.&#xD;&#xA;&#xD;&#xA;But to do that on running chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="41123" PostHistoryTypeId="1" PostId="10386" RevisionGUID="0a18abb3-5b84-4670-8d69-05eb33818524" CreationDate="2023-11-02T17:20:17.320" UserId="377" Text="What need to do to change the consensus from POA to POS by runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41124" PostHistoryTypeId="3" PostId="10386" RevisionGUID="0a18abb3-5b84-4670-8d69-05eb33818524" CreationDate="2023-11-02T17:20:17.320" UserId="377" Text="|runtime-upgrade|staking|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41125" PostHistoryTypeId="52" PostId="10380" RevisionGUID="80275600-4eba-40be-b0e0-dbe88aa776dd" CreationDate="2023-11-02T18:44:48.327" />
  <row Id="41126" PostHistoryTypeId="6" PostId="10385" RevisionGUID="3b9c547d-b28e-43e6-8f04-f7d136dc3b8a" CreationDate="2023-11-03T01:10:16.843" UserId="2844" Comment="edited tags" Text="|oracles|acurast|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41127" PostHistoryTypeId="2" PostId="10387" RevisionGUID="d726269f-74b7-4f23-a5da-dba7d8ab2715" CreationDate="2023-11-03T02:24:54.300" UserId="251" Text="For example, you want to put this value into `pallet_price::Price` at runtime level.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// if it is a storage value&#xD;&#xA;&lt;pallet_price::Price&lt;Runtime&gt;&gt;::put(price);&#xD;&#xA;&#xD;&#xA;// if it is a storage map&#xD;&#xA;// just an example here, so I use `(price, ())`&#xD;&#xA;&lt;pallet_price::Price&lt;Runtime&gt;&gt;::insert(price, ());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41130" PostHistoryTypeId="4" PostId="10386" RevisionGUID="ac2d770c-72be-4c54-9052-67753cd99cd0" CreationDate="2023-11-03T08:40:15.987" UserId="555" Comment="edited title" Text="What needs to be done to change the consensus from POA to POS through a runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41131" PostHistoryTypeId="5" PostId="10386" RevisionGUID="b6abfbc6-f2b2-4282-bb34-61d7d32a0155" CreationDate="2023-11-03T09:36:09.157" UserId="377" Comment="added 42 characters in body" Text="Currently my chain(solo-chain) is on production which is working on POA. Now I have integrated the staking pallet after then when i am going to upgrade that code in the old prod chain by runtime upgrade  then its not working, mean the continue running in POA.&#xD;&#xA;&#xD;&#xA;If i am starting the chain then its starting as expected and block selection is happening from staking as it should be.&#xD;&#xA;&#xD;&#xA;Its happening because in chainspec we have updated the necessary changes like added the initial authorities to the staking instead of AURA and Grandpa.&#xD;&#xA;&#xD;&#xA;But to make it work on-chain, what we need to do?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41132" PostHistoryTypeId="2" PostId="10388" RevisionGUID="a6166b31-b0cf-4fbd-94dd-7b74ce4645b8" CreationDate="2023-11-03T11:03:25.623" UserId="4744" Text="In substrate runtime, https://github.com/paritytech/polkadot-sdk/blob/f60318f68687e601c47de5ad5ca88e2c3f8139a7/substrate/bin/node/runtime/src/lib.rs#L2106C10-L2106C21&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub type SignedExtra = (&#xD;&#xA;    // all these structs implement the trait SignedExtension&#xD;&#xA;	frame_system::CheckNonZeroSender&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckSpecVersion&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckTxVersion&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckGenesis&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckEra&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckNonce&lt;Runtime&gt;,&#xD;&#xA;	frame_system::CheckWeight&lt;Runtime&gt;,&#xD;&#xA;	pallet_asset_conversion_tx_payment::ChargeAssetTxPayment&lt;Runtime&gt;,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;/// Unchecked extrinsic type as expected by this runtime.&#xD;&#xA;pub type UncheckedExtrinsic =&#xD;&#xA;	generic::UncheckedExtrinsic&lt;Address, RuntimeCall, Signature, SignedExtra&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when you check the signature of generic::UncheckedExtrinsic&#xD;&#xA;```rust&#xD;&#xA;pub struct UncheckedExtrinsic&lt;Address, Call, Signature, Extra&gt;&#xD;&#xA;where&#xD;&#xA;	Extra: SignedExtension,&#xD;&#xA;{&#xD;&#xA;	/// The signature, address, number of extrinsics have come before from&#xD;&#xA;	/// the same signer and an era describing the longevity of this transaction,&#xD;&#xA;	/// if this is a signed extrinsic.&#xD;&#xA;	pub signature: Option&lt;UncheckedSignaturePayload&lt;Address, Signature, Extra&gt;&gt;,&#xD;&#xA;	/// The function that should be called.&#xD;&#xA;	pub function: Call,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It has trait bound for `SignedExtension` for type parameter `Extra`. How come the type SignedExtra be satisfying the trait bound? Assuming this is possible, what will happen when we call `valid` method for SignedExtra (from SignedExtension trait)?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41134" PostHistoryTypeId="1" PostId="10388" RevisionGUID="a6166b31-b0cf-4fbd-94dd-7b74ce4645b8" CreationDate="2023-11-03T11:03:25.623" UserId="4744" Text="How come SignedExtra satisfies SignedExtension trait bound in substrate runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41135" PostHistoryTypeId="3" PostId="10388" RevisionGUID="a6166b31-b0cf-4fbd-94dd-7b74ce4645b8" CreationDate="2023-11-03T11:03:25.623" UserId="4744" Text="|runtime|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41136" PostHistoryTypeId="2" PostId="10389" RevisionGUID="5e98c26c-8a14-4c6d-9277-0e8fe9e90b15" CreationDate="2023-11-03T13:38:28.487" UserId="94" Text="This is a trick that we often deploy in the Polkadot SDK. It uses a crate called [`impl_trait_for_tuple`](https://crates.io/crates/impl-trait-for-tuples). This crate aids with implementing a trait on a tuple type when all the tuple elements already implement the trait.  &#xD;&#xA;&#xD;&#xA;You can see it being used [here](https://github.com/paritytech/polkadot-sdk/blob/dca142398e00786429d69eb8b9e4454499962b2a/substrate/primitives/runtime/src/traits.rs#L1591) for the `impl SignedExtension for Tuple`. This means that the tuple `(T0, T1 ..)` will implement `SignedExtension` when each `T` already implements `SignedExtension`. It is very useful, since we often need to aggregate multiple homogenous types into a tuple and not loose their trait implementations." ContentLicense="CC BY-SA 4.0" />
  <row Id="41138" PostHistoryTypeId="2" PostId="10390" RevisionGUID="3955fbc7-4dea-4e7e-ae68-0952fb8abb27" CreationDate="2023-11-03T14:23:52.940" UserId="4887" Text="I'm building an application whose architecture decouples transaction composition, signing, and publishing. These processes literally live in separate components that communicate with each other, but do not belong on the same application.&#xD;&#xA;&#xD;&#xA;This means that after composing a transaction with:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const tx = api.tx.pallet.dispatchable(...args);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don't want to use `signAndSend`, but instead sign the raw encoded call, and once I have the signature, I need to publish it to a substrate node. The info I have at this point is `encodedCall` and `signature`.&#xD;&#xA;&#xD;&#xA;How can I publish a transaction with that information alone? Is there a way to reconstruct the `SubmittableExtrinsic` object to use `.send()`? Or is there a way to make a raw RPC call that achieves the same result?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41140" PostHistoryTypeId="1" PostId="10390" RevisionGUID="3955fbc7-4dea-4e7e-ae68-0952fb8abb27" CreationDate="2023-11-03T14:23:52.940" UserId="4887" Text="Decoupled composition, signing, and publishing with @polkadot/api" ContentLicense="CC BY-SA 4.0" />
  <row Id="41141" PostHistoryTypeId="3" PostId="10390" RevisionGUID="3955fbc7-4dea-4e7e-ae68-0952fb8abb27" CreationDate="2023-11-03T14:23:52.940" UserId="4887" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41142" PostHistoryTypeId="5" PostId="10386" RevisionGUID="ab5277d2-ccc9-429c-a349-dc63ec205114" CreationDate="2023-11-03T15:32:24.897" UserId="377" Comment="added 1018 characters in body" Text="Currently my chain(solo-chain) is on production which is working on POA. Now I have integrated the staking pallet after then when i am going to upgrade that code in the old prod chain by runtime upgrade  then its not working, mean the continue running in POA.&#xD;&#xA;&#xD;&#xA;If i am starting the chain then its starting as expected and block selection is happening from staking as it should be.&#xD;&#xA;&#xD;&#xA;Its happening because in chainspec we have updated the necessary changes like added the initial authorities to the staking instead of AURA and Grandpa.&#xD;&#xA;&#xD;&#xA;Changes i did in chainspec.rs&#xD;&#xA;Previously we were giving initial authorities to Aura and grandpa. now we put aura and grandpa in default and giving authorities in staking and session.&#xD;&#xA;             &#xD;&#xA;``` rust&#xD;&#xA;            aura: Default::default(),&#xD;&#xA;    		grandpa: Default::default(),&#xD;&#xA;    		staking: node_runtime::StakingConfig {&#xD;&#xA;    			candidates: initial_authorities&#xD;&#xA;    				.iter()&#xD;&#xA;    				.cloned()&#xD;&#xA;    				.map(|(acc, _, _, _)| (acc, candidate_stake))&#xD;&#xA;    				.collect(), //todo&#xD;&#xA;    			delegations: vec![],&#xD;&#xA;    			inflation_config: inflation_config(70, 5),&#xD;&#xA;    			blocks_per_round: 5,&#xD;&#xA;    			validator_commission: Perbill::from_percent(70),&#xD;&#xA;    			chain_bond_reserve_percent: Percent::from_percent(30),&#xD;&#xA;    			num_selected_candidates: NUM_SELECTED_CANDIDATES,&#xD;&#xA;    		},&#xD;&#xA;    		session: node_runtime::SessionConfig {&#xD;&#xA;    			keys: initial_authorities&#xD;&#xA;    				.iter()&#xD;&#xA;    				.map(|x| (x.0.clone(), x.0.clone(), session_keys(x.2.clone(), x.3.clone())))&#xD;&#xA;    				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;    		},&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to upgrade chainspec changes by runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41143" PostHistoryTypeId="50" PostId="10106" RevisionGUID="8e7cbdfd-90da-4943-98f6-b1c47e6b7845" CreationDate="2023-11-03T19:00:35.070" UserId="-1" />
  <row Id="41144" PostHistoryTypeId="2" PostId="10391" RevisionGUID="2df83102-e2c5-4f59-bbdd-16c391dc6bf1" CreationDate="2023-11-03T23:19:28.047" UserId="29" Text="The long way is to modify the [chain spec.rs](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/node/service/src/chain_spec.rs) (or the plain json chain spec) of the Relay chain and regenerate the raw chain spec. You can look at this:&#xD;&#xA;- https://substrate.stackexchange.com/questions/8180/how-to-create-a-polkadot-chain-spec-for-development-purposes&#xD;&#xA;&#xD;&#xA;The quick way is to use Zombienet and spin up a Relay chain with multiple validators quickly:&#xD;&#xA;- https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="41146" PostHistoryTypeId="2" PostId="10392" RevisionGUID="9100fa0d-d789-4263-b632-d4339056a25a" CreationDate="2023-11-04T00:33:41.570" UserId="3550" Text="I am trying to compile my Rust (ink!) source code for an AMM DEX on Substrate (Aleph Zero), but this is the error I am receiving from the logs:&#xD;&#xA;&#xD;&#xA;[![Screenshot of logs][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bu4Ye.png&#xD;&#xA;&#xD;&#xA;The following are the files:&#xD;&#xA;&#xD;&#xA;[azero_trading_pair/cargo.toml]&#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;azero_trading_pair&quot;&#xD;&#xA;    version = &quot;0.9.6&quot;&#xD;&#xA;    authors = [&quot;Edinyanga Ottoho &lt;elzucky@gmail.com&gt;&quot;]&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    overflow-checks = true&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    &#xD;&#xA;    ink = { version = &quot;4.3.0&quot;, default-features = false }&#xD;&#xA;    &#xD;&#xA;    scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2.6&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    &#xD;&#xA;    openbrush = { tag = &quot;4.0.0-beta.1&quot;, git = &quot;https://github.com/Brushfam/openbrush-contracts&quot;, default-features = false, features = [&quot;psp22&quot;] }&#xD;&#xA;    &#xD;&#xA;    [lib]&#xD;&#xA;    overflow-checks = false&#xD;&#xA;    name = &quot;azero_trading_pair&quot;&#xD;&#xA;    path = &quot;lib.rs&quot;&#xD;&#xA;    crate-type = []&#xD;&#xA;    &#xD;&#xA;    [profile.release]&#xD;&#xA;    overflow-checks = false&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;        &quot;ink/std&quot;,&#xD;&#xA;        &quot;scale/std&quot;,&#xD;&#xA;        &quot;scale-info/std&quot;,&#xD;&#xA;        &quot;openbrush/std&quot;&#xD;&#xA;    ]&#xD;&#xA;    psp22 = [&quot;openbrush/psp22&quot;]&#xD;&#xA;    ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;Then the actual router file [router/cargo.toml] is:&#xD;&#xA;&#xD;&#xA;    [package]&#xD;&#xA;    name = &quot;router&quot;&#xD;&#xA;    version = &quot;0.9.6&quot;&#xD;&#xA;    authors = [&quot;Edinyanga Ottoho &lt;elzucky@gmail.com&gt;&quot;]&#xD;&#xA;    edition = &quot;2021&quot;&#xD;&#xA;    overflow-checks = false&#xD;&#xA;    &#xD;&#xA;    [dependencies]&#xD;&#xA;    &#xD;&#xA;    ink = { version = &quot;4.3.0&quot;, default-features = false }&#xD;&#xA;    &#xD;&#xA;    scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;    scale-info = { version = &quot;2.6&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;    &#xD;&#xA;    openbrush = { tag = &quot;4.0.0-beta.1&quot;, git = &quot;https://github.com/Brushfam/openbrush-contracts&quot;, default-features = false, features = [&quot;psp22&quot;] }&#xD;&#xA;    &#xD;&#xA;    azero_trading_pair = { path = &quot;../azero_trading_pair&quot;,version=&quot;0.9.6&quot;,default-features = false, features = [&quot;ink-as-dependency&quot;] }&#xD;&#xA;    psp22_trading_pair = { path = &quot;../psp22_trading_pair&quot;,version=&quot;0.9.6&quot;,default-features = false, features = [&quot;ink-as-dependency&quot;] }&#xD;&#xA;    &#xD;&#xA;    [lib]&#xD;&#xA;    overflow-checks = false&#xD;&#xA;    name = &quot;router&quot;&#xD;&#xA;    path = &quot;lib.rs&quot;&#xD;&#xA;    crate-type = []&#xD;&#xA;    &#xD;&#xA;    [profile.release]&#xD;&#xA;    overflow-checks = false&#xD;&#xA;    &#xD;&#xA;    [features]&#xD;&#xA;    default = [&quot;std&quot;]&#xD;&#xA;    std = [&#xD;&#xA;        &quot;ink/std&quot;,&#xD;&#xA;        &quot;scale/std&quot;,&#xD;&#xA;        &quot;scale-info/std&quot;,&#xD;&#xA;        &quot;openbrush/std&quot;,&#xD;&#xA;        &quot;azero_trading_pair/std&quot;,&#xD;&#xA;        &quot;psp22_trading_pair/std&quot;&#xD;&#xA;    ]&#xD;&#xA;    psp22 = [&quot;openbrush/psp22&quot;]&#xD;&#xA;    ink-as-dependency = []&#xD;&#xA;&#xD;&#xA;Please, if more information is needed to solve this, let me know, but for now, this is the only error here:&#xD;&#xA;&#xD;&#xA;&quot;Cannot compile as the target `wasm32-unknown-unknown` does not support any of the output&quot;.&#xD;&#xA;&#xD;&#xA;Help would be much appreciated, thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="41148" PostHistoryTypeId="1" PostId="10392" RevisionGUID="9100fa0d-d789-4263-b632-d4339056a25a" CreationDate="2023-11-04T00:33:41.570" UserId="3550" Text="Issues with Cross Contracts calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="41149" PostHistoryTypeId="3" PostId="10392" RevisionGUID="9100fa0d-d789-4263-b632-d4339056a25a" CreationDate="2023-11-04T00:33:41.570" UserId="3550" Text="|ink|rust|cross-contract-call|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41152" PostHistoryTypeId="2" PostId="10393" RevisionGUID="6aff2050-b6b8-468f-bfa4-97fba7052f0a" CreationDate="2023-11-04T01:33:17.717" UserId="3550" Text="I simply fixed this problem by removing the crate-type = []&#xD;&#xA;&#xD;&#xA;For some reason, new versions of ink! must not be provisioned with crate-types as &quot;cdylib&quot;, &quot;rlib&quot;, or both as the case may be.&#xD;&#xA;&#xD;&#xA;It now works like a charm!" ContentLicense="CC BY-SA 4.0" />
  <row Id="41154" PostHistoryTypeId="52" PostId="10392" RevisionGUID="aef51033-cfad-4a24-9e70-2205d3f3a445" CreationDate="2023-11-04T08:38:35.627" />
  <row Id="41155" PostHistoryTypeId="50" PostId="10118" RevisionGUID="b836e87f-e032-4c1d-bdcc-f7ea1d3316b5" CreationDate="2023-11-04T09:06:10.783" UserId="-1" />
  <row Id="41156" PostHistoryTypeId="50" PostId="10132" RevisionGUID="f3697e09-2005-4e7c-9714-3db20851695d" CreationDate="2023-11-04T12:04:45.537" UserId="-1" />
  <row Id="41157" PostHistoryTypeId="2" PostId="10394" RevisionGUID="fd640f55-98e2-4f63-a5f0-180c2ea8ccae" CreationDate="2023-11-04T12:24:46.217" UserId="94" Text="The `bounded_vec` macro is only available in `std` context - and therefore not in benchmarks.  &#xD;&#xA;You can replace it with `vec![ ... ].try_into().unwrap()`.  &#xD;&#xA;It was done this way since it hides an `unwrap`, which could cause a panic in your runtime code. So it is hidden behind the `std` feature." ContentLicense="CC BY-SA 4.0" />
  <row Id="41159" PostHistoryTypeId="50" PostId="10131" RevisionGUID="9ccbe403-b1be-4d77-a8d5-8a5e15bbf243" CreationDate="2023-11-04T13:09:31.177" UserId="-1" />
  <row Id="41160" PostHistoryTypeId="2" PostId="10395" RevisionGUID="969e6bdb-3d0e-47ca-b1fd-60f1df42bb85" CreationDate="2023-11-04T19:26:53.220" UserId="2485" Text="I have multiple keys in my node storage with offchain worker running, there are currently 2 ways to sign and send transactions, it is done either for all of the keys stored locally, or 1 unspecified key(for_any). Could you please tell me how i can choose a particular key to sign and send transaction for offchain worker. there is with_filter function, but it is unclear how to use it because  accounts_from_keys and keystore_accounts of offchain crate are private methods. Ideally, depending on conditions, i would like to choose what exactly offchain worker key to use to sign and send the transaction. Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="41162" PostHistoryTypeId="1" PostId="10395" RevisionGUID="969e6bdb-3d0e-47ca-b1fd-60f1df42bb85" CreationDate="2023-11-04T19:26:53.220" UserId="2485" Text="offchain worker choose key to sign and send" ContentLicense="CC BY-SA 4.0" />
  <row Id="41163" PostHistoryTypeId="3" PostId="10395" RevisionGUID="969e6bdb-3d0e-47ca-b1fd-60f1df42bb85" CreationDate="2023-11-04T19:26:53.220" UserId="2485" Text="|offchain-worker|offchain|offchain-storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41164" PostHistoryTypeId="5" PostId="10395" RevisionGUID="3de16f62-5a33-4dd3-b9c0-4bdfd2990d48" CreationDate="2023-11-04T21:20:52.080" UserId="2485" Comment="added 104 characters in body" Text="I have multiple keys in my node storage with offchain worker running, there are currently 2 ways to sign and send transactions, it is done either for all of the keys stored locally, or 1 unspecified key(for_any). Could you please tell me how i can choose a particular key to sign and send transaction for offchain worker. there is with_filter function, but it is unclear how to use it because  accounts_from_keys and keystore_accounts of offchain crate are private methods. Ideally, depending on conditions, i would like to choose what exactly offchain worker key to use to sign and send the transaction. Thank you!&#xD;&#xA;&#xD;&#xA;The setup: in my pallet where i use offchain worker, i insert multiple keys under the same key type." ContentLicense="CC BY-SA 4.0" />
  <row Id="41165" PostHistoryTypeId="50" PostId="8796" RevisionGUID="961be1fa-225e-4b70-aaa9-47cf825b4149" CreationDate="2023-11-05T01:01:00.213" UserId="-1" />
  <row Id="41166" PostHistoryTypeId="50" PostId="4961" RevisionGUID="3fcd1195-6845-4aff-827a-5a96b99de386" CreationDate="2023-11-05T02:09:11.127" UserId="-1" />
  <row Id="41167" PostHistoryTypeId="2" PostId="10396" RevisionGUID="091af6a8-5f48-4046-9925-89bbf98c0ae0" CreationDate="2023-11-05T02:33:41.927" UserId="4891" Text="**Metamask/ Nano Ledger: failed to execute requestDevide on HID. Must be handing a user gesture to show a permission request**&#xD;&#xA;&#xD;&#xA;Hello, 2 years without problems, until yesterday I did: Reset Chrome settings. And after that the Metamask let it interact with the Ledger. I have HID enabled in both the wallet and Chrome, I also have the latest version of Metamask and Ledger.&#xD;&#xA;The problem is with Chrome since using another PC everything works perfectly. Some help??" ContentLicense="CC BY-SA 4.0" />
  <row Id="41169" PostHistoryTypeId="1" PostId="10396" RevisionGUID="091af6a8-5f48-4046-9925-89bbf98c0ae0" CreationDate="2023-11-05T02:33:41.927" UserId="4891" Text="Metamask / Nano Ledger&gt;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41170" PostHistoryTypeId="3" PostId="10396" RevisionGUID="091af6a8-5f48-4046-9925-89bbf98c0ae0" CreationDate="2023-11-05T02:33:41.927" UserId="4891" Text="|polkadot|error|wallet|metamask|ledger|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41171" PostHistoryTypeId="50" PostId="6498" RevisionGUID="35d6ef02-1278-4602-9dba-8eba445b51ad" CreationDate="2023-11-05T05:07:55.943" UserId="-1" />
  <row Id="41172" PostHistoryTypeId="50" PostId="4990" RevisionGUID="00d33993-7b98-45ad-b99a-4d6947456844" CreationDate="2023-11-05T06:09:31.167" UserId="-1" />
  <row Id="41173" PostHistoryTypeId="50" PostId="6448" RevisionGUID="9acbe9d8-7d1e-4c76-bce6-f2836b42200d" CreationDate="2023-11-05T08:00:50.083" UserId="-1" />
  <row Id="41174" PostHistoryTypeId="50" PostId="8331" RevisionGUID="90def0c6-c71d-4cb7-8ee0-77ecc9b4ffd5" CreationDate="2023-11-05T09:02:50.323" UserId="-1" />
  <row Id="41175" PostHistoryTypeId="50" PostId="8396" RevisionGUID="312264dc-136d-44c1-a8d4-5048875e1b0d" CreationDate="2023-11-05T11:05:00.600" UserId="-1" />
  <row Id="41176" PostHistoryTypeId="50" PostId="8296" RevisionGUID="f7e905e4-e801-4b21-8d67-db4eb1228f66" CreationDate="2023-11-05T12:05:30.620" UserId="-1" />
  <row Id="41177" PostHistoryTypeId="50" PostId="6451" RevisionGUID="4ffbe4e8-0a26-45e2-bc6a-8e716203d8c1" CreationDate="2023-11-05T13:04:40.537" UserId="-1" />
  <row Id="41178" PostHistoryTypeId="50" PostId="5293" RevisionGUID="6cd7e379-c35d-453a-a7e7-f9177dc0b22a" CreationDate="2023-11-05T14:00:50.113" UserId="-1" />
  <row Id="41179" PostHistoryTypeId="50" PostId="8819" RevisionGUID="3b77a2cc-0246-4511-8531-817386131e4c" CreationDate="2023-11-05T16:06:35.770" UserId="-1" />
  <row Id="41180" PostHistoryTypeId="2" PostId="10397" RevisionGUID="b11c72b8-34a8-4dc0-8863-daf6f8baf29a" CreationDate="2023-11-05T17:36:36.947" UserId="3346" Text="We have the sudo pallet on a running live mainnet. It is almost time to remove it. What is the safest way to remove it in the code? We have made code upgrades before but removing a pallet (especially sudo) makes me nervous. What precisely is the right way to do this safely?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41182" PostHistoryTypeId="1" PostId="10397" RevisionGUID="b11c72b8-34a8-4dc0-8863-daf6f8baf29a" CreationDate="2023-11-05T17:36:36.947" UserId="3346" Text="How To Remove The Sudo Pallet Safely" ContentLicense="CC BY-SA 4.0" />
  <row Id="41183" PostHistoryTypeId="3" PostId="10397" RevisionGUID="b11c72b8-34a8-4dc0-8863-daf6f8baf29a" CreationDate="2023-11-05T17:36:36.947" UserId="3346" Text="|pallet|sudo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41184" PostHistoryTypeId="2" PostId="10398" RevisionGUID="fe6add84-cdb0-4509-8c91-38c46e67dff8" CreationDate="2023-11-05T18:19:44.177" UserId="372" Text="One very important thing to notice is that the values you specify in your chain spec are the **genesis configuration**. They are the initial conditions. They describe the world when the chain begins to run. They are never used again after that. Changing them after the chain launches not only &quot;doesn't work&quot;, it actually specifies a brand new separate blockchain with its own genesis and history.&#xD;&#xA;&#xD;&#xA;I'm not 100% clear what you are trying to migrate from and what you are trying to migrate to. But the way to do it is through a runtime migration, not by changing the genesis configuration in the chain spec.&#xD;&#xA;&#xD;&#xA;Here is a jumping off point in the docs about storage migrations https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/migration/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="41186" PostHistoryTypeId="2" PostId="10399" RevisionGUID="3be65c04-8e62-409b-a027-afd6c4509baf" CreationDate="2023-11-05T18:20:15.253" UserId="94" Text="There is currently no call in the sudo pallet to set the key to `None`. &#xD;&#xA;&#xD;&#xA;Undeploying the pallet is therefore the only non-hacky secure solution.  &#xD;&#xA;There are other ways, like setting the key to `0x000...` or deleting it by a `System::kill_storage` call, but they are all a bit hacky. Undeploying the pallet is quite easy, just deleting the code should be enough." ContentLicense="CC BY-SA 4.0" />
  <row Id="41188" PostHistoryTypeId="5" PostId="10399" RevisionGUID="1e407fe7-15b0-47b8-85f7-adb2e35e1835" CreationDate="2023-11-05T19:08:43.820" UserId="94" Comment="added 20 characters in body" Text="There is currently no call in the sudo pallet to set the key to `None`. &#xD;&#xA;&#xD;&#xA;Undeploying the pallet is therefore the only non-hacky secure solution.  &#xD;&#xA;There are other ways, like setting the key to `0x000...` or deleting it by a `System::kill_storage` call, but they are all a bit hacky. Undeploying the pallet is quite easy, just deleting the code in the runtime file should be enough." ContentLicense="CC BY-SA 4.0" />
  <row Id="41189" PostHistoryTypeId="2" PostId="10400" RevisionGUID="964ee0e3-6693-4c83-986e-aae3464fdd05" CreationDate="2023-11-05T19:18:02.650" UserId="4895" Text="How do I claim my dots back for the first Acala crowdloan? I tried crownloan refund and prachainID 2000 and 3336 but non of them worked." ContentLicense="CC BY-SA 4.0" />
  <row Id="41191" PostHistoryTypeId="5" PostId="10399" RevisionGUID="1b66a3cb-d276-45ed-9592-a8dd9d2e5fdb" CreationDate="2023-11-05T20:00:34.060" UserId="94" Comment="added 97 characters in body" Text="There is currently no call in the sudo pallet to set the key to `None`. &#xD;&#xA;&#xD;&#xA;Undeploying the pallet is therefore the only non-hacky secure solution.  &#xD;&#xA;There are other ways, like setting the key to `0x000...` or deleting it by a `System::kill_storage` call, but they are all a bit hacky. Undeploying the pallet is quite easy, just deleting the code in the runtime file should be enough.&#xD;&#xA;&#xD;&#xA;PS: Opened [#2165](https://github.com/paritytech/polkadot-sdk/pull/2165) to make this easier." ContentLicense="CC BY-SA 4.0" />
  <row Id="41192" PostHistoryTypeId="2" PostId="10401" RevisionGUID="948c8112-0bd5-4820-aa20-7e67a3a0e1de" CreationDate="2023-11-06T00:10:21.943" UserId="116" Text="*In [this question][1], and [this answer][2] the difference between `batch` and `batch_all`are discussed, but there is a third similar function in the utility pallet `force_batch`*&#xD;&#xA;&#xD;&#xA;What are the key differences between `batch` `batch-all` and `force-batch`   &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/7911/different-between-batch-and-batchall-functionality-in-pallet-utility&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/7917/116" ContentLicense="CC BY-SA 4.0" />
  <row Id="41194" PostHistoryTypeId="1" PostId="10401" RevisionGUID="948c8112-0bd5-4820-aa20-7e67a3a0e1de" CreationDate="2023-11-06T00:10:21.943" UserId="116" Text="Utility pallet what are the differences between batch batch_all and force_batch" ContentLicense="CC BY-SA 4.0" />
  <row Id="41195" PostHistoryTypeId="3" PostId="10401" RevisionGUID="948c8112-0bd5-4820-aa20-7e67a3a0e1de" CreationDate="2023-11-06T00:10:21.943" UserId="116" Text="|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41196" PostHistoryTypeId="2" PostId="10402" RevisionGUID="6e8bd576-7e85-40db-8433-a07f86eb8f21" CreationDate="2023-11-06T00:29:36.617" UserId="116" Text="From the documentation:&#xD;&#xA;&#xD;&#xA;**batch**&#xD;&#xA;*The [docs][batch] are not very helpful yet:*&#xD;&#xA;&gt; Send a batch of dispatch calls&#xD;&#xA;&#xD;&#xA;**batch_all**&#xD;&#xA;&#xD;&#xA;*Here the [doc][batchall] give us some clue*&#xD;&#xA;&#xD;&#xA;&gt; Send a batch of dispatch calls and atomically execute them. The whole transaction will rollback and fail if any of the calls failed.&#xD;&#xA;&#xD;&#xA;**force_batch**&#xD;&#xA;*The [docs][force] finally touches the key differences* &#xD;&#xA; &gt;Send a batch of dispatch calls. Unlike batch, it allows errors and won’t interrupt. &#xD;&#xA;&#xD;&#xA;**So in short the key differences are:**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; 1. `batch` will run all parts until it encounters an error then stop&#xD;&#xA; 2. `batch_all` will run all parts but roll back all if there is an error&#xD;&#xA; 3. `force_batch` will continue execute the rest of the parts even if some part failed. &#xD;&#xA;&#xD;&#xA;[force]: https://paritytech.github.io/polkadot-sdk/master/pallet_utility/pallet/dispatchables/fn.force_batch.html&#xD;&#xA;[batch]: https://paritytech.github.io/polkadot-sdk/master/pallet_utility/pallet/dispatchables/fn.batch.html&#xD;&#xA;&#xD;&#xA;[batchall]: https://paritytech.github.io/polkadot-sdk/master/pallet_utility/pallet/dispatchables/fn.batch_all.html&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41198" PostHistoryTypeId="4" PostId="10401" RevisionGUID="b05a6ccd-cdf3-4196-adb3-4c73dd2a2c94" CreationDate="2023-11-06T00:30:23.823" UserId="116" Comment="edited title" Text="Utility pallet: What are the key differences between batch batch_all and force_batch" ContentLicense="CC BY-SA 4.0" />
  <row Id="41199" PostHistoryTypeId="2" PostId="10403" RevisionGUID="6e073188-c1cd-4c91-8776-50f8f69e3b9e" CreationDate="2023-11-06T00:32:06.750" UserId="94" Text="The key differences are:  &#xD;&#xA;- `batch_all`: **Stops on error** and reverts everything (all-or-nothing).&#xD;&#xA;- `force_batch`: **Does not stop** on error and only reverts the failed calls (keep-going).&#xD;&#xA;- `batch`: **Stops on error** and only reverts the first failed call (fail-fast).&#xD;&#xA;&#xD;&#xA;PS: I see you already answered it yourself :P" ContentLicense="CC BY-SA 4.0" />
  <row Id="41201" PostHistoryTypeId="5" PostId="10403" RevisionGUID="048889ad-afd9-4c2a-b735-0012f1d443bf" CreationDate="2023-11-06T00:35:09.073" UserId="116" Comment="Remove comment" Text="The key differences are:  &#xD;&#xA;- `batch_all`: **Stops on error** and reverts everything (all-or-nothing).&#xD;&#xA;- `force_batch`: **Does not stop** on error and only reverts the failed calls (keep-going).&#xD;&#xA;- `batch`: **Stops on error** and only reverts the first failed call (fail-fast).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41202" PostHistoryTypeId="24" PostId="10403" RevisionGUID="048889ad-afd9-4c2a-b735-0012f1d443bf" CreationDate="2023-11-06T00:35:09.073" Comment="Proposed by 116 approved by 94 edit id of 603" ContentLicense="CC BY-SA 4.0" />
  <row Id="41203" PostHistoryTypeId="2" PostId="10404" RevisionGUID="62288c00-5c99-4c06-b198-160fc2cf719c" CreationDate="2023-11-06T01:23:59.297" UserId="251" Text="You can follow this PR.&#xD;&#xA;&#xD;&#xA;https://github.com/darwinia-network/darwinia/pull/1173&#xD;&#xA;&#xD;&#xA;This is how we handle it on our mainnet." ContentLicense="CC BY-SA 4.0" />
  <row Id="41205" PostHistoryTypeId="2" PostId="10405" RevisionGUID="6a591eb8-461a-43ce-bbc8-2b29417953d8" CreationDate="2023-11-06T02:42:11.147" UserId="251" Text="I believe you can quickly modify the genesis by using parachain-launch.&#xD;&#xA;&#xD;&#xA;https://github.com/open-web3-stack/parachain-launch/blob/06da5c4aa749efce78473e8c02a07cfb118d1881/src/index.ts#L179&#xD;&#xA;&#xD;&#xA;I think it can overwrite the genesis validators based on the link above.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Alternatively, you can clone the repository and modify this section: https://github.com/paritytech/polkadot-sdk/blob/f6ee4781f633f0f89598f7b230595afe401da8dc/polkadot/node/service/src/chain_spec.rs#L967.&#xD;&#xA;&#xD;&#xA;I don't know which network you are using, but here you can add more `initial_authorities` for the Rococo Development network.&#xD;&#xA;&#xD;&#xA;After modifying, compile the node and follow the tutorial to build the desired genesis file." ContentLicense="CC BY-SA 4.0" />
  <row Id="41207" PostHistoryTypeId="5" PostId="10386" RevisionGUID="7e9a57b3-58fe-4a12-97f2-2ea691440e26" CreationDate="2023-11-06T05:57:22.147" UserId="377" Comment="added 57 characters in body" Text="Currently my chain(solo-chain) is on production which is working on POA. Now I have integrated the staking pallet after then when i am going to upgrade that code in the old prod chain by runtime upgrade  then its not working, mean the continue running in POA.&#xD;&#xA;&#xD;&#xA;If i am starting the chain then its starting as expected and block selection is happening from staking as it should be.&#xD;&#xA;&#xD;&#xA;Its happening because in chainspec we have updated the necessary changes like added the initial authorities to the staking instead of AURA and Grandpa.&#xD;&#xA;&#xD;&#xA;Changes i did in chainspec.rs&#xD;&#xA;Previously we were giving initial authorities(aura and grandpa keys of validators) to Aura and grandpa. now we put aura and grandpa in default and giving authorities in staking and session.&#xD;&#xA;             &#xD;&#xA;``` rust&#xD;&#xA;            aura: Default::default(),&#xD;&#xA;    		grandpa: Default::default(),&#xD;&#xA;    		staking: node_runtime::StakingConfig {&#xD;&#xA;    			candidates: initial_authorities&#xD;&#xA;    				.iter()&#xD;&#xA;    				.cloned()&#xD;&#xA;    				.map(|(acc, _, _, _)| (acc, candidate_stake))&#xD;&#xA;    				.collect(), //todo&#xD;&#xA;    			delegations: vec![],&#xD;&#xA;    			inflation_config: inflation_config(70, 5),&#xD;&#xA;    			blocks_per_round: 5,&#xD;&#xA;    			validator_commission: Perbill::from_percent(70),&#xD;&#xA;    			chain_bond_reserve_percent: Percent::from_percent(30),&#xD;&#xA;    			num_selected_candidates: NUM_SELECTED_CANDIDATES,&#xD;&#xA;    		},&#xD;&#xA;    		session: node_runtime::SessionConfig {&#xD;&#xA;    			keys: initial_authorities&#xD;&#xA;    				.iter()&#xD;&#xA;    				.map(|x| (x.0.clone(), x.0.clone(), session_keys(x.2.clone(), x.3.clone())))&#xD;&#xA;    				.collect::&lt;Vec&lt;_&gt;&gt;(),&#xD;&#xA;    		},&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to make similar changes like we did in chainspec by runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41208" PostHistoryTypeId="52" PostId="10401" RevisionGUID="ad5cbd45-9baa-4ca3-9907-63f1c4f12a22" CreationDate="2023-11-06T08:10:52.450" />
  <row Id="41209" PostHistoryTypeId="5" PostId="10401" RevisionGUID="96c69280-c2e2-42f9-884d-c1ab1ce8b1d9" CreationDate="2023-11-06T08:58:00.113" UserId="116" Comment="Cleanup whitespace" Text="*In [this question][1], and [this answer][2] the difference between `batch` and `batch_all` are discussed, but there is a third similar function in the utility pallet `force_batch`*&#xD;&#xA;&#xD;&#xA;What are the key differences between `batch` `batch-all` and `force-batch`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/7911/different-between-batch-and-batchall-functionality-in-pallet-utility&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/7917/116&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41210" PostHistoryTypeId="6" PostId="10401" RevisionGUID="96c69280-c2e2-42f9-884d-c1ab1ce8b1d9" CreationDate="2023-11-06T08:58:00.113" UserId="116" Comment="Cleanup whitespace" Text="|pallet|pallet-utility|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41211" PostHistoryTypeId="2" PostId="10406" RevisionGUID="ecb05950-aaae-4d11-ba44-2ddab82a5104" CreationDate="2023-11-06T09:00:18.740" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="41213" PostHistoryTypeId="1" PostId="10406" RevisionGUID="ecb05950-aaae-4d11-ba44-2ddab82a5104" CreationDate="2023-11-06T09:00:18.740" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="41214" PostHistoryTypeId="2" PostId="10407" RevisionGUID="4808c98e-7601-4a22-95b5-6cb8991d9476" CreationDate="2023-11-06T09:00:18.740" UserId="-1" Text="" ContentLicense="CC BY-SA 4.0" />
  <row Id="41216" PostHistoryTypeId="1" PostId="10407" RevisionGUID="4808c98e-7601-4a22-95b5-6cb8991d9476" CreationDate="2023-11-06T09:00:18.740" UserId="-1" ContentLicense="CC BY-SA 4.0" />
  <row Id="41217" PostHistoryTypeId="5" PostId="1565" RevisionGUID="b0b811fe-2569-43ab-8433-03ec959a5856" CreationDate="2023-11-06T10:35:31.257" UserId="2" Comment="tags edited" Text="My goal is to tail the output and setup some health checks to monitor the nodes health.&#xD;&#xA;&#xD;&#xA;So I'm looking for example outputs and actions to take. Should I search SRC for log outputs? Is there a best practice article for node health checks?&#xD;&#xA;&#xD;&#xA;E.g.&#xD;&#xA;- Panics/non zero return = restart process if &#xD;&#xA;- uptime GT hrs else check hw spec&#xD;&#xA;- Target - finalised GT 10 blocks = check iops&#xD;&#xA;- Stuck at block X = bump version&#xD;&#xA;- Etc etc" ContentLicense="CC BY-SA 4.0" />
  <row Id="41218" PostHistoryTypeId="6" PostId="1565" RevisionGUID="b0b811fe-2569-43ab-8433-03ec959a5856" CreationDate="2023-11-06T10:35:31.257" UserId="2" Comment="tags edited" Text="|archive|monitoring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41219" PostHistoryTypeId="24" PostId="1565" RevisionGUID="b0b811fe-2569-43ab-8433-03ec959a5856" CreationDate="2023-11-06T10:35:31.257" Comment="Proposed by 2 approved by 85, 94 edit id of 560" ContentLicense="CC BY-SA 4.0" />
  <row Id="41220" PostHistoryTypeId="50" PostId="7142" RevisionGUID="c1e4c48e-c3b1-4c34-ad7a-62012fb57b91" CreationDate="2023-11-06T11:02:45.323" UserId="-1" />
  <row Id="41221" PostHistoryTypeId="2" PostId="10408" RevisionGUID="9548c634-26c9-4ee4-bd62-2f0e3a80bc11" CreationDate="2023-11-06T14:22:51.057" UserId="2106" Text="**Context**&#xD;&#xA;- OriginTrail Parachain Mainnet is pushing significant amount of transactions (175k/day) - with tendency of growth&#xD;&#xA;- Collators are filling blocks up at ~25% of block weight, with a large pending Tx pool&#xD;&#xA;- Initial hardware upgrades didn’t contribute to any increase.&#xD;&#xA;&#xD;&#xA;**Goal** &#xD;&#xA;- Increase throughput on OriginTrail Parachain Mainnet by using up more blockspace (target: 50%+ blockweight)&#xD;&#xA;&#xD;&#xA;**Code**&#xD;&#xA;- Here is the code: https://github.com/OriginTrail/origintrail-parachain&#xD;&#xA;- Dependencies are on polkadot-v0.9.40.&#xD;&#xA;&#xD;&#xA;**Hardware**&#xD;&#xA;&#xD;&#xA;Servers have 16vCPU, 8 cores 3.5GHz, 32GB RAM, NVMe disks, NUMA balancing and SMT are disabled. We did not observe any high usage on CPU (~8%) or RAM (~12%).&#xD;&#xA;&#xD;&#xA;Our hardware benchmark:&#xD;&#xA; - CPU score: 1.08 GiBs (Min: 1.00 GiBs)&#xD;&#xA; - Memory score: 13.74 GiBs (Min: 14.32 GiBs)&#xD;&#xA; - Disk score (seq. writes): 1.37 GiBs (Min: 450.00 MiBs)&#xD;&#xA; - Disk score (rand. writes): 663.99 MiBs (Min: 200.00 MiBs)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41223" PostHistoryTypeId="1" PostId="10408" RevisionGUID="9548c634-26c9-4ee4-bd62-2f0e3a80bc11" CreationDate="2023-11-06T14:22:51.057" UserId="2106" Text="Parachain not including all transactions from tx pool into block" ContentLicense="CC BY-SA 4.0" />
  <row Id="41224" PostHistoryTypeId="3" PostId="10408" RevisionGUID="9548c634-26c9-4ee4-bd62-2f0e3a80bc11" CreationDate="2023-11-06T14:22:51.057" UserId="2106" Text="|polkadot|parachain|substrate-node|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41225" PostHistoryTypeId="5" PostId="10408" RevisionGUID="cb0e00b2-a6bc-49e6-beb0-eba144a4b42d" CreationDate="2023-11-06T14:25:27.040" UserId="2106" Comment="added 140 characters in body" Text="**Context**&#xD;&#xA;- OriginTrail Parachain Mainnet is pushing significant amount of transactions (175k/day) - with tendency of growth&#xD;&#xA;- Collators are filling blocks up at ~25% of block weight, with a large pending Tx pool&#xD;&#xA;- Initial hardware upgrades didn’t contribute to any increase.&#xD;&#xA;&#xD;&#xA;**Goal** &#xD;&#xA;- Increase throughput on OriginTrail Parachain Mainnet by using up more blockspace (target: 50%+ blockweight)&#xD;&#xA;&#xD;&#xA;**Code**&#xD;&#xA;- Here is the code: https://github.com/OriginTrail/origintrail-parachain&#xD;&#xA;- Dependencies are on polkadot-v0.9.40.&#xD;&#xA;&#xD;&#xA;**Hardware**&#xD;&#xA;&#xD;&#xA;Servers have 16vCPU, 8 cores 3.5GHz, 32GB RAM, NVMe disks, NUMA balancing and SMT are disabled. We did not observe any high usage on CPU (~8%) or RAM (~12%).&#xD;&#xA;&#xD;&#xA;Our hardware benchmark:&#xD;&#xA; - CPU score: 1.08 GiBs (Min: 1.00 GiBs)&#xD;&#xA; - Memory score: 13.74 GiBs (Min: 14.32 GiBs)&#xD;&#xA; - Disk score (seq. writes): 1.37 GiBs (Min: 450.00 MiBs)&#xD;&#xA; - Disk score (rand. writes): 663.99 MiBs (Min: 200.00 MiBs)&#xD;&#xA;&#xD;&#xA;You can check current TX pool size here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain-rpc.origin-trail.network#/explorer/node" ContentLicense="CC BY-SA 4.0" />
  <row Id="41226" PostHistoryTypeId="5" PostId="10408" RevisionGUID="80274e30-1177-4ea0-b9d7-fa69a1a0ea34" CreationDate="2023-11-06T14:28:05.860" UserId="2106" Comment="added 194 characters in body" Text="**Context**&#xD;&#xA;- OriginTrail Parachain Mainnet is pushing significant amount of transactions (175k/day) - with tendency of growth&#xD;&#xA;- Collators are filling blocks up at ~25% of block weight, with a large pending Tx pool&#xD;&#xA;- Initial hardware upgrades didn’t contribute to any increase.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;**Goal** &#xD;&#xA;- Increase throughput on OriginTrail Parachain Mainnet by using up more blockspace (target: 50%+ blockweight)&#xD;&#xA;&#xD;&#xA;**Code**&#xD;&#xA;- Here is the code: https://github.com/OriginTrail/origintrail-parachain&#xD;&#xA;- Dependencies are on polkadot-v0.9.40.&#xD;&#xA;&#xD;&#xA;**Hardware**&#xD;&#xA;&#xD;&#xA;Servers have 16vCPU, 8 cores 3.5GHz, 32GB RAM, NVMe disks, NUMA balancing and SMT are disabled. We did not observe any high usage on CPU (~8%) or RAM (~12%).&#xD;&#xA;&#xD;&#xA;Our hardware benchmark:&#xD;&#xA; - CPU score: 1.08 GiBs (Min: 1.00 GiBs)&#xD;&#xA; - Memory score: 13.74 GiBs (Min: 14.32 GiBs)&#xD;&#xA; - Disk score (seq. writes): 1.37 GiBs (Min: 450.00 MiBs)&#xD;&#xA; - Disk score (rand. writes): 663.99 MiBs (Min: 200.00 MiBs)&#xD;&#xA;&#xD;&#xA;**Tx pool**&#xD;&#xA;&#xD;&#xA;The pool is gradually growing, and after some time most of transactions are dropped.&#xD;&#xA;&#xD;&#xA;You can check current TX pool size here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain-rpc.origin-trail.network#/explorer/node&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/T2KZO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41227" PostHistoryTypeId="5" PostId="10408" RevisionGUID="460d9102-b1ac-4a11-a0bb-990c3e8fca9f" CreationDate="2023-11-06T14:28:33.490" UserId="2106" Comment="edited body" Text="**Context**&#xD;&#xA;- OriginTrail Parachain Mainnet is pushing significant amount of transactions (175k/day) - with tendency of growth&#xD;&#xA;- Collators are filling blocks up at ~25% of block weight, with a large pending Tx pool&#xD;&#xA;- The pool is gradually growing, and after some time most of transactions are dropped.&#xD;&#xA;- Initial hardware upgrades didn’t contribute to any increase.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;**Goal** &#xD;&#xA;- Increase throughput on OriginTrail Parachain Mainnet by using up more blockspace (target: 50%+ blockweight)&#xD;&#xA;&#xD;&#xA;**Code**&#xD;&#xA;- Here is the code: https://github.com/OriginTrail/origintrail-parachain&#xD;&#xA;- Dependencies are on polkadot-v0.9.40.&#xD;&#xA;&#xD;&#xA;**Hardware**&#xD;&#xA;&#xD;&#xA;Servers have 16vCPU, 8 cores 3.5GHz, 32GB RAM, NVMe disks, NUMA balancing and SMT are disabled. We did not observe any high usage on CPU (~8%) or RAM (~12%).&#xD;&#xA;&#xD;&#xA;Our hardware benchmark:&#xD;&#xA; - CPU score: 1.08 GiBs (Min: 1.00 GiBs)&#xD;&#xA; - Memory score: 13.74 GiBs (Min: 14.32 GiBs)&#xD;&#xA; - Disk score (seq. writes): 1.37 GiBs (Min: 450.00 MiBs)&#xD;&#xA; - Disk score (rand. writes): 663.99 MiBs (Min: 200.00 MiBs)&#xD;&#xA;&#xD;&#xA;**Tx pool**&#xD;&#xA;&#xD;&#xA;You can check current TX pool size here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fparachain-rpc.origin-trail.network#/explorer/node&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/T2KZO.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41228" PostHistoryTypeId="2" PostId="10409" RevisionGUID="2a3df3aa-9331-4ad1-9871-b272d9b3ad57" CreationDate="2023-11-06T15:05:24.213" UserId="73" Text="&gt; Collators are filling blocks up at ~25% of block weight, with a large pending Tx pool&#xD;&#xA;&#xD;&#xA;The worst case of the storage proof usage outputted by the benchmarking is too high currently, probably leading to the effects you are seeing. There is an [issue][1] that describe the problem better.&#xD;&#xA;&#xD;&#xA;It also depends on how you calculated this 25% usage. I assume you looked only at polkadot-js which is currently ignoring the storage proof usage.&#xD;&#xA;&#xD;&#xA;&gt; The pool is gradually growing, and after some time most of transactions are dropped.&#xD;&#xA;&#xD;&#xA;All transactions are probably getting rejected at some point, when they are not valid anymore. Why are they pruned from the transaction pool?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/issues/209" ContentLicense="CC BY-SA 4.0" />
  <row Id="41234" PostHistoryTypeId="2" PostId="10411" RevisionGUID="0562686e-b29c-48c2-a860-2c6a3325337e" CreationDate="2023-11-06T15:35:09.550" UserId="300" Text="(This might be better as a GitHub issue, but thought I would check here for more context first)&#xD;&#xA;Version: Polkadot SDK v1.1.0&#xD;&#xA;&#xD;&#xA;What I am trying to do:&#xD;&#xA;&#xD;&#xA;I am running a bunch of e2e tests in parallel on a local only, no relay node. To make this faster, I have setup an interval that every 500 milliseconds will make a block if there are transactions in the transaction pool. (See https://github.com/LibertyDSNP/frequency/blob/main/node/service/src/block_sealing.rs#L128-L148 for an example of how that is setup using seconds instead of ms)&#xD;&#xA;&#xD;&#xA;However, this is much faster block production than is expected, and I think I have a race condition due to that speed.&#xD;&#xA;&#xD;&#xA;Sometimes (not consistently) the run will produce one or more `InvalidTransaction::AncientBirthBlock` revalidation errors.&#xD;&#xA;&#xD;&#xA;These errors can only happen in one place: the `CheckMortality` signed extension. (Specifically: https://github.com/paritytech/polkadot-sdk/blob/polkadot-v1.1.0/substrate/frame/system/src/extensions/check_mortality.rs#L83)&#xD;&#xA;&#xD;&#xA;Because I have the Hash count set to 4096 and the number of blocks produced is &lt; 200, the situation occurs because of a difference between three things:&#xD;&#xA;&#xD;&#xA; 1. The block number which says that the transaction is ready&#xD;&#xA; 2. Inserting into the storage of the block number to hash&#xD;&#xA; 3. The checking of the block number to hash storage&#xD;&#xA;&#xD;&#xA;Note I have also checked and the `period` and `phase` match the expected block number.&#xD;&#xA;&#xD;&#xA;By adding in some additional logging around the code that inserts into this storage (https://github.com/paritytech/polkadot-sdk/blob/polkadot-v1.1.0/substrate/frame/system/src/lib.rs#L1385) and the checking of the storage (check_mortality.rs), here are some perhaps helpful logs that lead to some questions.&#xD;&#xA;&#xD;&#xA; 1. Why is the block 104 being inserted into the storage several times? (Or why is `initialize` being called several times for the same block number?)&#xD;&#xA;    - My guess is that it is writing a different hash, but that shouldn't matter for `CheckMortality` which is just checking existence of the number in the storage.&#xD;&#xA; 2. What else might be happening with this storage? Is there a removal that I am missing besides the one in `finalize` (that is current - 4096 and never gets hit)?&#xD;&#xA; 3. Other ideas?&#xD;&#xA;&#xD;&#xA;Full logs around this (`ERROR` logs with `WIL:` are my added logs): https://gist.github.com/wilwade/c7245e0f50b9f4ca7d3070fee1138e60" ContentLicense="CC BY-SA 4.0" />
  <row Id="41236" PostHistoryTypeId="1" PostId="10411" RevisionGUID="0562686e-b29c-48c2-a860-2c6a3325337e" CreationDate="2023-11-06T15:35:09.550" UserId="300" Text="Fast block production causes Mortality Checking failing with AncientBirthBlock" ContentLicense="CC BY-SA 4.0" />
  <row Id="41237" PostHistoryTypeId="3" PostId="10411" RevisionGUID="0562686e-b29c-48c2-a860-2c6a3325337e" CreationDate="2023-11-06T15:35:09.550" UserId="300" Text="|transaction-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41239" PostHistoryTypeId="2" PostId="10412" RevisionGUID="b6c7bdba-20c2-4ed0-98e5-076b91254f8f" CreationDate="2023-11-06T16:02:09.170" UserId="3598" Text="On release 1.3.0 the type AssetKind and Paymaster where added to the treasury pallet which I guess provides the ability to pay treasury proposals in different kinds of assets through the assets pallet. My question is what if I also want to enable the native asset as one of the assets to be used to pay proposals, in addition to other assets? The native asset is not part of the assets pallet, so what would be the best way to go about doing this? Are there any examples I could look at?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="41241" PostHistoryTypeId="1" PostId="10412" RevisionGUID="b6c7bdba-20c2-4ed0-98e5-076b91254f8f" CreationDate="2023-11-06T16:02:09.170" UserId="3598" Text="Treasury pallet how to make payouts in native asset?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41242" PostHistoryTypeId="3" PostId="10412" RevisionGUID="b6c7bdba-20c2-4ed0-98e5-076b91254f8f" CreationDate="2023-11-06T16:02:09.170" UserId="3598" Text="|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41243" PostHistoryTypeId="50" PostId="10161" RevisionGUID="830ad027-d599-4304-8759-7d929bf03fac" CreationDate="2023-11-07T06:01:05.150" UserId="-1" />
  <row Id="41244" PostHistoryTypeId="50" PostId="8810" RevisionGUID="c4990ad7-99a0-478a-aecd-fd31a3a57678" CreationDate="2023-11-07T08:04:25.563" UserId="-1" />
  <row Id="41245" PostHistoryTypeId="2" PostId="10413" RevisionGUID="fde5dfa4-228f-454f-b950-58c5d64276bd" CreationDate="2023-11-07T09:29:45.743" UserId="4627" Text="I am getting this error after trying to create a new blockchain (named newchain) copying another one I had working for many years (named oldchain).&#xD;&#xA;I cleaned the db (with the purge-chain command), changed the chain id, chain name, and even the spec_version. But when starting a new node with the newchain I get this message:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Unable to author block in slot 283224808,. `can_author_with` returned: `spec_name` does not match `newchain-node` vs `oldchain-node` Probably a node update is required!&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can't understand where the &quot;oldchain-node&quot; comes from. Since it does not appear in any part of the code, the docker image and container where created from scratch, and the db was cleaned.&#xD;&#xA;&#xD;&#xA;The command I use to start the node is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/frontier-template-node --chain newchain.json --validator --rpc-port 8334 --port 30333 --ws-port 9944 --node-key=&quot;$nodeK&quot; --rpc-methods=Unsafe --rpc-external --rpc-cors=all --ws-external --name newchain --bootnodes /ip4/xx.xx.xx.xx/tcp/30333/p2p/$nodeId&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The IP of the bootnode matches the IP of the newchain node, and so does the nodeId" ContentLicense="CC BY-SA 4.0" />
  <row Id="41247" PostHistoryTypeId="1" PostId="10413" RevisionGUID="fde5dfa4-228f-454f-b950-58c5d64276bd" CreationDate="2023-11-07T09:29:45.743" UserId="4627" Text="Unable to author block in slot, can_author_with returned: spec_name does not match. Probably a node update is required!" ContentLicense="CC BY-SA 4.0" />
  <row Id="41248" PostHistoryTypeId="3" PostId="10413" RevisionGUID="fde5dfa4-228f-454f-b950-58c5d64276bd" CreationDate="2023-11-07T09:29:45.743" UserId="4627" Text="|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41249" PostHistoryTypeId="2" PostId="10414" RevisionGUID="28fd6b16-aa8d-440b-bb27-608c459d85ef" CreationDate="2023-11-07T09:56:45.310" UserId="4824" Text="Like cosmos (or) beacon chain can we attach a memo in polkadot which describes the transaction in better way ?&#xD;&#xA;For example while transferring dot can we attach a string like field which describes the transaction ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41251" PostHistoryTypeId="1" PostId="10414" RevisionGUID="28fd6b16-aa8d-440b-bb27-608c459d85ef" CreationDate="2023-11-07T09:56:45.310" UserId="4824" Text="Is there a memo flag for transfer transaction in polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41252" PostHistoryTypeId="3" PostId="10414" RevisionGUID="28fd6b16-aa8d-440b-bb27-608c459d85ef" CreationDate="2023-11-07T09:56:45.310" UserId="4824" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41253" PostHistoryTypeId="2" PostId="10415" RevisionGUID="a607c0c3-d2fc-4ff2-92fa-6149c7e098b9" CreationDate="2023-11-07T10:05:27.810" UserId="3317" Text="If your native currency is comming from `pallet-balances` and other assets from `pallet-assets` you could create two instances of `pallet-treasury`, where:&#xD;&#xA;&#xD;&#xA; ```&#xD;&#xA;impl pallet-treasury::Config&lt;Instance1&gt; {&#xD;&#xA;...&#xD;&#xA;AssetKind: Balances (pallet-balances),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet-treasury::Config&lt;Instance2&gt; {&#xD;&#xA;...&#xD;&#xA;AssetKind: Assets (pallet-assets),&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41255" PostHistoryTypeId="2" PostId="10416" RevisionGUID="fd97efc0-84ff-48a2-b2bf-e2891ac1cb97" CreationDate="2023-11-07T10:24:57.257" UserId="94" Text="A memo cannot be directly passed into the transfer function. Otherwise how would it look like for other transactions, such as NFT transfers, identity update ...etc? Each transaction would need to be changed to also accept a memo parameter.  &#xD;&#xA;&#xD;&#xA;Instead, multiple calls can batch; the `transfer` and a `System::remark` (the memo).  &#xD;&#xA;Though I dont know if wallets have nice UI support for sending these. It is definitely possible to do on PolkadotJS.  &#xD;&#xA;Some wallets/signers also offer to just store a local memo for the transaction that will never be published to the chain. Polkadot Vault does this.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Extrinsic in PJs][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/42Yr2.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41257" PostHistoryTypeId="5" PostId="10415" RevisionGUID="b6d9a48d-c58b-4bc9-bce5-c88b289dbdf1" CreationDate="2023-11-07T10:50:44.323" UserId="3317" Comment="added 296 characters in body" Text="If your native currency is comming from `pallet-balances` and other assets from `pallet-assets` you could create two instances of `pallet-treasury`, where:&#xD;&#xA;&#xD;&#xA; ```&#xD;&#xA;impl pallet-treasury::Config&lt;Instance1&gt; {&#xD;&#xA;...&#xD;&#xA;AssetKind: Balances (pallet-balances),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl pallet-treasury::Config&lt;Instance2&gt; {&#xD;&#xA;...&#xD;&#xA;AssetKind: Assets (pallet-assets),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;EDIT: To prevent two separate instances you could also use ([PR][1] not merged yet) [`NativeOrWithId`][2] that wraps around the two.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/pull/2033&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/a3bd5870f325e13335d7eb91d42968b5d1251903/substrate/frame/support/src/traits/tokens/fungible/union_of.rs#L41" ContentLicense="CC BY-SA 4.0" />
  <row Id="41258" PostHistoryTypeId="2" PostId="10417" RevisionGUID="b8179545-d91f-49b8-8bbe-13d9566e732f" CreationDate="2023-11-07T20:46:26.923" UserId="1986" Text="I have an ink smart contract message that takes an enum as argument. The code is shown below;&#xD;&#xA;&#xD;&#xA;     #[derive(Encode, Decode)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(Debug, PartialEq, Eq, scale_info::TypeInfo, StorageLayout,)&#xD;&#xA;    )]&#xD;&#xA;    pub enum EncodableFunctions {&#xD;&#xA;        SetAssets(Vec&lt;ContentIdentifier&gt;),&#xD;&#xA;        ActivateVoting(u128),&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;     #[ink(message)]&#xD;&#xA;        pub fn encode_function_name_and_input(&#xD;&#xA;            &amp;self,&#xD;&#xA;            args: EncodableFunctions,&#xD;&#xA;        ) -&gt; ([u8; 4], Vec&lt;u8&gt;) {&#xD;&#xA;            match args {&#xD;&#xA;                EncodableFunctions::SetAssets =&gt; {&#xD;&#xA;                    let encoded_name = ink::selector_bytes!(&quot;set_default_assets&quot;);&#xD;&#xA;                    let inputs = ArgumentList::empty().push_arg(&amp;args);&#xD;&#xA;                    let encoded_inputs = inputs.encode();&#xD;&#xA;                    (encoded_name, encoded_inputs)&#xD;&#xA;                }&#xD;&#xA;                EncodableFunctions::ActivateVoting =&gt; {&#xD;&#xA;                    let encoded_name = ink::selector_bytes!(&quot;activate_voting&quot;);&#xD;&#xA;                    let inputs = ArgumentList::empty().push_arg(&amp;args);&#xD;&#xA;                    let encoded_inputs = inputs.encode();&#xD;&#xA;                    (encoded_name, encoded_inputs)&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;The contract builds successfully and I'm able to deploy to Substrate COntracts UI but when I try to interact with the function, I get a blank screen like the image below&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HSjXZ.png&#xD;&#xA;&#xD;&#xA;There's no such error if I replace the enum with no associated values, like enum below. Any way I can make the function work?&#xD;&#xA;&#xD;&#xA;     #[derive(Encode, Decode)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(Debug, PartialEq, Eq, scale_info::TypeInfo, StorageLayout,)&#xD;&#xA;    )]&#xD;&#xA;    pub enum EncodableFunctions {&#xD;&#xA;        SetAssets,&#xD;&#xA;        ActivateVoting,&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="41260" PostHistoryTypeId="1" PostId="10417" RevisionGUID="b8179545-d91f-49b8-8bbe-13d9566e732f" CreationDate="2023-11-07T20:46:26.923" UserId="1986" Text="How to use enum with associated value(s) in ink smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="41261" PostHistoryTypeId="3" PostId="10417" RevisionGUID="b8179545-d91f-49b8-8bbe-13d9566e732f" CreationDate="2023-11-07T20:46:26.923" UserId="1986" Text="|ink|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41262" PostHistoryTypeId="2" PostId="10418" RevisionGUID="9371ba2c-bca9-440e-b596-ceac74ca7217" CreationDate="2023-11-07T22:11:05.967" UserId="3598" Text="I've noticed that some of the frame pallets have migrations and others don't, so I was just wondering if all the required migrations are implemented by the frame pallets, or if it depends on the pallet? Also, is there anything that a chain using these pallets needs to do to make sure the migrations run and storage upgrades are performed correctly?&#xD;&#xA;&#xD;&#xA;Thanks," ContentLicense="CC BY-SA 4.0" />
  <row Id="41264" PostHistoryTypeId="1" PostId="10418" RevisionGUID="9371ba2c-bca9-440e-b596-ceac74ca7217" CreationDate="2023-11-07T22:11:05.967" UserId="3598" Text="Storage migrations for frame pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="41265" PostHistoryTypeId="3" PostId="10418" RevisionGUID="9371ba2c-bca9-440e-b596-ceac74ca7217" CreationDate="2023-11-07T22:11:05.967" UserId="3598" Text="|frame|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41266" PostHistoryTypeId="2" PostId="10419" RevisionGUID="e6076e1a-b392-4c42-b367-ead43ecfc198" CreationDate="2023-11-08T02:56:10.720" UserId="251" Text="This depends on how it is used.&#xD;&#xA;&#xD;&#xA;For instance, there are situations where you may require additional data information that cannot be configured at runtime. Take Polkadot's case of appointing `Alice` as their council member. It would not be advisable to include such logic in the pallet, as it would impact all downstream projects.&#xD;&#xA;&#xD;&#xA;I don't think there is a guaranteed way to ensure the success of the migration. However, there are measures that can increase its chances. You can refer to this link (https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/scheduler/src/migration.rs) where they use `StorageVersion` to track the migration version for handling multiple migrations in this pallet. Additionally, you can check out this link (https://github.com/paritytech/try-runtime-cli). It's always recommended to try running it before actually performing the runtime upgrade on your chain as it simulates the migration and allows you to verify the results, helping you write accurate migration code." ContentLicense="CC BY-SA 4.0" />
  <row Id="41268" PostHistoryTypeId="2" PostId="10420" RevisionGUID="320271ab-6a76-47b7-8a84-1345aa2ed946" CreationDate="2023-11-08T05:01:35.163" UserId="116" Text="What return type should I use in subxt to be able to parse the result from `author_pendingExtrinsics`?&#xD;&#xA;&#xD;&#xA;I have implemented a wrapper call and returning a vector of `UncheckedExtrinsic`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    async fn author_pending_extrinsics(&amp;self) -&gt; Result&lt;Vec&lt;UncheckedExtrinsic&lt;&gt;&gt;, subxt::Error&gt; {&#xD;&#xA;       self.rpc.request(&quot;author_pendingExtrinsics&quot;, rpc_params![]).await;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is okay, but I need to get the signer and the nonce from the results. It should be possible as polkadot-js is able to do it. &#xD;&#xA;&#xD;&#xA;Running the call in the polkadot-js web ui returns:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;3: author.pendingExtrinsics: Vec&lt;Extrinsic&gt;&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    isSigned: true&#xD;&#xA;    method: {&#xD;&#xA;      args: {&#xD;&#xA;        dest: {&#xD;&#xA;          Id: 4hNgHEdC6EZYHPFJrxFt19m3zBMbTb6ZErSbo9idCpX6n2zU&#xD;&#xA;        }&#xD;&#xA;        value: 9,500,000,000,000&#xD;&#xA;      }&#xD;&#xA;      method: transfer&#xD;&#xA;      section: balances&#xD;&#xA;    }&#xD;&#xA;    era: {&#xD;&#xA;      ImmortalEra: 0x00&#xD;&#xA;    }&#xD;&#xA;    nonce: 1&#xD;&#xA;    signature: 0xbe779752c8893fc895cbca17b2b47b8fcde7627f1dd93d022354ba13d777f361befebc9f0862c5821c995ff1145d543114ea55fa89120d85b16815775f67658e&#xD;&#xA;    signer: {&#xD;&#xA;      Id: 4hNohKFDvDG8qf5SHPjhg3dhGFe4uRp136tm8eHNQ72xSYXB&#xD;&#xA;    }&#xD;&#xA;    tip: 0&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have searched in the autodocs (`cargo doc --open`) but could not find any suitable existing or auto generated type." ContentLicense="CC BY-SA 4.0" />
  <row Id="41270" PostHistoryTypeId="1" PostId="10420" RevisionGUID="320271ab-6a76-47b7-8a84-1345aa2ed946" CreationDate="2023-11-08T05:01:35.163" UserId="116" Text="Parsing the result from author_pendingExtrinsics in subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="41271" PostHistoryTypeId="3" PostId="10420" RevisionGUID="320271ab-6a76-47b7-8a84-1345aa2ed946" CreationDate="2023-11-08T05:01:35.163" UserId="116" Text="|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41272" PostHistoryTypeId="5" PostId="10420" RevisionGUID="b4b5bdcd-41af-4b2d-ba39-809a305e9ba3" CreationDate="2023-11-08T05:20:35.217" UserId="116" Comment="Should been OpaqueExtrinsic all the time" Text="What return type should I use in subxt to be able to parse the result from `author_pendingExtrinsics`?&#xD;&#xA;&#xD;&#xA;I have implemented a wrapper call and returning a vector of `OpaqueExtrinsic`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    async fn author_pending_extrinsics(&amp;self) -&gt; Result&lt;Vec&lt;OpaqueExtrinsic&gt;, subxt::Error&gt; {&#xD;&#xA;       self.rpc.request(&quot;author_pendingExtrinsics&quot;, rpc_params![]).await;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is okay, but I need to get the signer and the nonce from the results. It should be possible as polkadot-js is able to do it. &#xD;&#xA;&#xD;&#xA;Running the call in the polkadot-js web ui returns:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;3: author.pendingExtrinsics: Vec&lt;Extrinsic&gt;&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    isSigned: true&#xD;&#xA;    method: {&#xD;&#xA;      args: {&#xD;&#xA;        dest: {&#xD;&#xA;          Id: 4hNgHEdC6EZYHPFJrxFt19m3zBMbTb6ZErSbo9idCpX6n2zU&#xD;&#xA;        }&#xD;&#xA;        value: 9,500,000,000,000&#xD;&#xA;      }&#xD;&#xA;      method: transfer&#xD;&#xA;      section: balances&#xD;&#xA;    }&#xD;&#xA;    era: {&#xD;&#xA;      ImmortalEra: 0x00&#xD;&#xA;    }&#xD;&#xA;    nonce: 1&#xD;&#xA;    signature: 0xbe779752c8893fc895cbca17b2b47b8fcde7627f1dd93d022354ba13d777f361befebc9f0862c5821c995ff1145d543114ea55fa89120d85b16815775f67658e&#xD;&#xA;    signer: {&#xD;&#xA;      Id: 4hNohKFDvDG8qf5SHPjhg3dhGFe4uRp136tm8eHNQ72xSYXB&#xD;&#xA;    }&#xD;&#xA;    tip: 0&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have searched in the autodocs (`cargo doc --open`) but could not find any suitable existing or auto generated type." ContentLicense="CC BY-SA 4.0" />
  <row Id="41273" PostHistoryTypeId="5" PostId="9083" RevisionGUID="c7d08446-b7fc-4fc1-8a8f-5a0df4815336" CreationDate="2023-11-08T06:47:03.877" UserId="116" Comment="Spelling: dont -&gt; don't and i-&gt;I" Text="For running validate nodes, through set up, now i can see my node on the telemetry. but I don't know  how to connect to polkadot.js.  &#xD;&#xA;&#xD;&#xA;polka wiki says&#xD;&#xA;&gt; &quot;You can generate your Session keys in the client via the apps RPC. If you are doing this, make sure that you have the PolkadotJS-Apps explorer attached to your validator node&quot; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I don't get it. How do I generate session keys?&#xD;&#xA;I use ssh though google cloud, do I have to do something in ssh? What code is to get the session keys and how my node can attach my poladotjs-app?&#xD;&#xA;&#xD;&#xA;I think my main question is &#xD;&#xA;&quot;how can I find custom endpoint(node`s address, wss) from the google cloud (SHH, code, or etc)?&quot;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41274" PostHistoryTypeId="4" PostId="9083" RevisionGUID="c7d08446-b7fc-4fc1-8a8f-5a0df4815336" CreationDate="2023-11-08T06:47:03.877" UserId="116" Comment="Spelling: dont -&gt; don't and i-&gt;I" Text="Validating node, how connet to polkadot.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="41275" PostHistoryTypeId="6" PostId="9083" RevisionGUID="c7d08446-b7fc-4fc1-8a8f-5a0df4815336" CreationDate="2023-11-08T06:47:03.877" UserId="116" Comment="Spelling: dont -&gt; don't and i-&gt;I" Text="|polkadot-js|rpc|validator|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41276" PostHistoryTypeId="5" PostId="10420" RevisionGUID="7ca643fb-5d56-4a9a-a4ff-eaf3c901df19" CreationDate="2023-11-08T06:51:22.500" UserId="116" Comment="added 27 characters in body" Text="What return type should I use in subxt to be able to parse the result from `author_pendingExtrinsics`?&#xD;&#xA;&#xD;&#xA;I have implemented a wrapper call and returning a vector of `OpaqueExtrinsic`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    async fn author_pending_extrinsics(&amp;self) -&gt; Result&lt;Vec&lt;OpaqueExtrinsic&gt;, subxt::Error&gt; {&#xD;&#xA;       self.rpc.request(&quot;author_pendingExtrinsics&quot;, rpc_params![]).await;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is okay, but I need to get the signer and the nonce from the results. It should be possible as polkadot-js is able to do it. &#xD;&#xA;&#xD;&#xA;Running the call in the polkadot-js web ui returns:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;3: author.pendingExtrinsics: Vec&lt;Extrinsic&gt;&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    isSigned: true&#xD;&#xA;    method: {&#xD;&#xA;      args: {&#xD;&#xA;        dest: {&#xD;&#xA;          Id: 4hNgHEdC6EZYHPFJrxFt19m3zBMbTb6ZErSbo9idCpX6n2zU&#xD;&#xA;        }&#xD;&#xA;        value: 9,500,000,000,000&#xD;&#xA;      }&#xD;&#xA;      method: transfer&#xD;&#xA;      section: balances&#xD;&#xA;    }&#xD;&#xA;    era: {&#xD;&#xA;      ImmortalEra: 0x00&#xD;&#xA;    }&#xD;&#xA;    nonce: 1&#xD;&#xA;    signature: 0xbe779752c8893fc895cbca17b2b47b8fcde7627f1dd93d022354ba13d777f361befebc9f0862c5821c995ff1145d543114ea55fa89120d85b16815775f67658e&#xD;&#xA;    signer: {&#xD;&#xA;      Id: 4hNohKFDvDG8qf5SHPjhg3dhGFe4uRp136tm8eHNQ72xSYXB&#xD;&#xA;    }&#xD;&#xA;    tip: 0&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have searched in the auto generated docs for my project(`cargo doc --open`) but could not find any suitable existing or auto generated type.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41277" PostHistoryTypeId="5" PostId="9908" RevisionGUID="b4bebcfc-53e6-437c-b1d5-9e1da910937b" CreationDate="2023-11-08T07:23:39.963" UserId="3136" Comment="correct the msg format" Text="An error occurred: 'Expected 2 arguments for the contract message `'vote'`, but only 1 was provided.First argument was  `number type`, and the second one was `Enum` . This error arises when attempting to pass two values, one being a number and the other a string, which are not accepted by the `Astar chain`.&#xD;&#xA;&#xD;&#xA;&gt; I have used it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  const { gasRequired, result } = await contract?.query?.vote(&#xD;&#xA;    {&#xD;&#xA;      gasLimit: gasLimit,&#xD;&#xA;    },&#xD;&#xA;    12892,&#xD;&#xA;    &quot;noDiscrepancies&quot;&#xD;&#xA;  );&#xD;&#xA;  console.log(&quot;gasRequired&quot;, gasRequired, result);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the ABI :&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;label&quot;: &quot;vote&quot;,&#xD;&#xA;        &quot;mutates&quot;: true,&#xD;&#xA;        &quot;payable&quot;: false,&#xD;&#xA;        &quot;returnType&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&#xD;&#xA;            &quot;ink&quot;,&#xD;&#xA;            &quot;MessageResult&quot;&#xD;&#xA;          ],&#xD;&#xA;          &quot;type&quot;: 17&#xD;&#xA;        },&#xD;&#xA;        &quot;selector&quot;: &quot;0x083be260&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;args&quot;: [&#xD;&#xA;          {&#xD;&#xA;            &quot;label&quot;: &quot;_vote_id&quot;,&#xD;&#xA;            &quot;type&quot;: {&#xD;&#xA;              &quot;displayName&quot;: [&#xD;&#xA;                &quot;u32&quot;&#xD;&#xA;              ],&#xD;&#xA;              &quot;type&quot;: 0&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        &quot;default&quot;: false, &#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41278" PostHistoryTypeId="24" PostId="9908" RevisionGUID="b4bebcfc-53e6-437c-b1d5-9e1da910937b" CreationDate="2023-11-08T07:23:39.963" Comment="Proposed by 3136 approved by 85, 116 edit id of 557" ContentLicense="CC BY-SA 4.0" />
  <row Id="41279" PostHistoryTypeId="5" PostId="9797" RevisionGUID="b132f0f2-80ae-40cb-abc5-88860a7c03e3" CreationDate="2023-11-08T07:26:39.463" UserId="2281" Comment="Format was not clear structure change " Text="Hi Thanks for your response ,&#xD;&#xA;&#xD;&#xA;**The below file is my cargo.toml code inside the runtime folder please check and let me know here.I want to add this line in inside the lib.rs file ```(use sp_io::hashing::blake2_128;)```**&#xD;&#xA;&#xD;&#xA;```[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;MIT-0&quot;&#xD;&#xA;publish = false&#xD;&#xA;syn = &quot;1.0.94&quot;&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-std = { version = &quot;8.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-version = { version = &quot;22.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-io = {version = &quot;2.0.0&quot;,default-features = false }&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;&#xD;&#xA;[dependencies.chainbridge]&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/ChainSafe/chainbridge-substrate'&#xD;&#xA;package = 'chainbridge'&#xD;&#xA;tag = 'v1.3.0'&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;sp-io/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-consensus-grandpa/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;	&quot;substrate-wasm-builder&quot;,	&#xD;&#xA;	&quot;chainbridge/std&quot;,&#xD;&#xA;	&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-sudo/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-template/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;][![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/lxzwF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41280" PostHistoryTypeId="24" PostId="9797" RevisionGUID="b132f0f2-80ae-40cb-abc5-88860a7c03e3" CreationDate="2023-11-08T07:26:39.463" Comment="Proposed by 2281 approved by 85, -1 edit id of 556" ContentLicense="CC BY-SA 4.0" />
  <row Id="41281" PostHistoryTypeId="5" PostId="9797" RevisionGUID="000f7610-f4c4-4036-b316-c2052772a5df" CreationDate="2023-11-08T07:26:39.463" UserId="116" Comment="Format was not clear structure change " Text="Hi Thanks for your response ,&#xD;&#xA;&#xD;&#xA;**The below file is my cargo.toml code inside the runtime folder please check and let me know here.I want to add this line in inside the lib.rs file `(use sp_io::hashing::blake2_128;)`**&#xD;&#xA;&#xD;&#xA;```[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;MIT-0&quot;&#xD;&#xA;publish = false&#xD;&#xA;syn = &quot;1.0.94&quot;&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-std = { version = &quot;8.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-version = { version = &quot;22.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-io = {version = &quot;2.0.0&quot;,default-features = false }&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;&#xD;&#xA;[dependencies.chainbridge]&#xD;&#xA;default-features = false&#xD;&#xA;git = 'https://github.com/ChainSafe/chainbridge-substrate'&#xD;&#xA;package = 'chainbridge'&#xD;&#xA;tag = 'v1.3.0'&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;sp-io/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-consensus-grandpa/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;	&quot;substrate-wasm-builder&quot;,	&#xD;&#xA;	&quot;chainbridge/std&quot;,&#xD;&#xA;	&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-sudo/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-template/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/lxzwF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41282" PostHistoryTypeId="5" PostId="10027" RevisionGUID="ef2f5b34-9164-410c-ba3e-ae40a1f0e92c" CreationDate="2023-11-08T07:26:50.310" UserId="354" Comment="improved formatting" Text="I would like to know what are the ways and how we can retrieve the all items stored in a custom pallet&#xD;&#xA;&#xD;&#xA;I was having data structured in this way&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(&#xD;&#xA;		Clone, Encode, Decode, Eq, PartialEq, Default, RuntimeDebug, MaxEncodedLen, TypeInfo,&#xD;&#xA;	)]&#xD;&#xA;	pub struct ProvidedConsent&lt;BoundedString&gt; {&#xD;&#xA;		pub _id: BoundedString,&#xD;&#xA;		pub user_id: BoundedString,&#xD;&#xA;		pub business_id: BoundedString,&#xD;&#xA;		pub consent: BoundedVec&lt;Consent&lt;BoundedString&gt;, ConstU32&lt;50&gt;&gt;,&#xD;&#xA;		pub last_updated: u64,&#xD;&#xA;		pub is_active: bool,&#xD;&#xA;		pub is_deleted: bool,&#xD;&#xA;		pub added_on: u64,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn consents)]&#xD;&#xA;	pub(super) type UserConsent&lt;T: Config&gt; = StorageDoubleMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Twox64Concat,&#xD;&#xA;		T::AccountId,&#xD;&#xA;		Twox64Concat,&#xD;&#xA;		BoundedVec&lt;u8, T::StringLimit&gt;,&#xD;&#xA;		ProvidedConsent&lt;BoundedVec&lt;u8, T::StringLimit&gt;&gt;,&#xD;&#xA;		OptionQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;&#xD;&#xA;	#[derive(&#xD;&#xA;		Encode, Decode, Clone, PartialEq, Default, Eq, MaxEncodedLen, RuntimeDebug, TypeInfo,&#xD;&#xA;	)]&#xD;&#xA;	pub struct Consent&lt;BoundedString&gt; {&#xD;&#xA;		pub key: BoundedString,&#xD;&#xA;		pub is_accepted: bool,&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I also got to know with polkadot.js we have a way , but for custom pallet how does it work &lt;https://polkadot.js.org/docs/api/start/api.query.other/#map-keys--entries&gt;&#xD;&#xA;&#xD;&#xA;Also, we have &lt;https://substrate.stackexchange.com/questions/1736/runtime-api-to-collect-values-in-storagemap&gt;, we can use it in runtime&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But, please can anyone explain how we can implement a retrieve list feature using polkadot.js and using runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="41283" PostHistoryTypeId="4" PostId="10027" RevisionGUID="ef2f5b34-9164-410c-ba3e-ae40a1f0e92c" CreationDate="2023-11-08T07:26:50.310" UserId="354" Comment="improved formatting" Text="How many ways are there to get all items stored in custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="41284" PostHistoryTypeId="24" PostId="10027" RevisionGUID="ef2f5b34-9164-410c-ba3e-ae40a1f0e92c" CreationDate="2023-11-08T07:26:50.310" Comment="Proposed by 354 approved by 85, 116 edit id of 587" ContentLicense="CC BY-SA 4.0" />
  <row Id="41285" PostHistoryTypeId="5" PostId="9927" RevisionGUID="22573b10-cd0a-4076-abc6-a1abc7bc9cfb" CreationDate="2023-11-08T07:28:25.427" UserId="3136" Comment="correct the msg format" Text="I am trying to initiate a `balance transfer call` using a proxy with the '`Any`' type. I'm using the `Python API`, which allows me to create and submit the transaction successfully. However, it fails (https://westend.subscan.io/extrinsic/17455468-2). I am able to create the transaction using a wallet for the wallets.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    # Compose the transfer call using the balances module&#xD;&#xA;        transfer_call = substrate.compose_call(&#xD;&#xA;            call_module='Balances',&#xD;&#xA;            call_function='transfer',&#xD;&#xA;            call_params={&#xD;&#xA;                'dest': recipient_address,&#xD;&#xA;                'value': transfer_amount,&#xD;&#xA;            },&#xD;&#xA;        )&#xD;&#xA;&#xD;&#xA;        # Compose the proxy call to execute the transfer via the proxy&#xD;&#xA;        proxy_call = substrate.compose_call(&#xD;&#xA;            call_module='Proxy',&#xD;&#xA;            call_function='proxy',&#xD;&#xA;            call_params={&#xD;&#xA;                'real': proxy_account,&#xD;&#xA;                'call': transfer_call,&#xD;&#xA;            },&#xD;&#xA;        )&#xD;&#xA;&#xD;&#xA;        nonce = substrate.get_account_nonce(keypair.ss58_address)&#xD;&#xA;        signature_payload = substrate.generate_signature_payload(call=call, nonce=nonce)&#xD;&#xA;&#xD;&#xA;        signature = keypair.sign(signature_payload)&#xD;&#xA;&#xD;&#xA;        extrinsic = substrate.create_signed_extrinsic(&#xD;&#xA;            call=call, keypair=keypair, signature=signature&#xD;&#xA;        )&#xD;&#xA;&#xD;&#xA;        print(extrinsic)&#xD;&#xA;&#xD;&#xA;        result = substrate.submit_extrinsic(extrinsic=extrinsic, wait_for_finalization=False)&#xD;&#xA;&#xD;&#xA;Also, the transaction is listed under the 'Extrinsics' tab in the explorer, rather than the 'Transfers' tab. Any advice on this would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="41286" PostHistoryTypeId="24" PostId="9927" RevisionGUID="22573b10-cd0a-4076-abc6-a1abc7bc9cfb" CreationDate="2023-11-08T07:28:25.427" Comment="Proposed by 3136 approved by 85, 116 edit id of 563" ContentLicense="CC BY-SA 4.0" />
  <row Id="41287" PostHistoryTypeId="2" PostId="10421" RevisionGUID="8e383455-49f7-44e3-bc99-96f732cacfab" CreationDate="2023-11-08T07:28:26.957" UserId="251" Text="I recall there being a method to create a &quot;const&quot; storage outside of a pallet. You have the flexibility to assign any prefix. However, I can't remember where I came across this information. Could you please guide me on how to accomplish this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41289" PostHistoryTypeId="1" PostId="10421" RevisionGUID="8e383455-49f7-44e3-bc99-96f732cacfab" CreationDate="2023-11-08T07:28:26.957" UserId="251" Text="How to define a storage outside the pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41290" PostHistoryTypeId="3" PostId="10421" RevisionGUID="8e383455-49f7-44e3-bc99-96f732cacfab" CreationDate="2023-11-08T07:28:26.957" UserId="251" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41291" PostHistoryTypeId="5" PostId="9970" RevisionGUID="2b1c3ff0-5452-4ba5-a2c6-1fbe0296f483" CreationDate="2023-11-08T07:29:44.277" UserId="3136" Comment="correct the msg format" Text="Is there a way to retrieve the historical balance of a `Polkadot` account without the need to query every individual block? My current approach involves querying blocks in batches, but it's quite time-consuming (10 minutes for 1000 blocks), and querying all 17 million blocks would take an impractical 152 days.&#xD;&#xA;&#xD;&#xA;Ideally, I'm looking for a method to obtain the historical balances of multiple accounts from the genesis block (0) up to the current block (17 million) without extensive data collection. Are there reliable historical nodes or index providers available for `Polkadot` that can streamline this process?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41292" PostHistoryTypeId="24" PostId="9970" RevisionGUID="2b1c3ff0-5452-4ba5-a2c6-1fbe0296f483" CreationDate="2023-11-08T07:29:44.277" Comment="Proposed by 3136 approved by 85, 116 edit id of 573" ContentLicense="CC BY-SA 4.0" />
  <row Id="41293" PostHistoryTypeId="5" PostId="9964" RevisionGUID="b69ffb8a-a926-4b4b-9673-f0321b2159dc" CreationDate="2023-11-08T07:30:49.690" UserId="354" Comment="improved formatting" Text="I am writing a smart contract in Rust using the Openbrush library. I am using version 3.0.0.&#xD;&#xA;&lt;br&gt;&#xD;&#xA;```rust&#xD;&#xA;pub const STORAGE_KEY: u32 = openbrush::storage_unique_key!(metaData);&#xD;&#xA;#[openbrush::upgradeable_storage(STORAGE_KEY)]&#xD;&#xA;#[derive(Default, Debug)]&#xD;&#xA;pub struct metaData {&#xD;&#xA;		&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[ink(storage)]&#xD;&#xA;#[derive(Default, Storage)]&#xD;&#xA;pub struct PeerNftcontract {&#xD;&#xA;    #[storage_field]&#xD;&#xA;    data: metaData&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I am using this code for changing the storage in upgradable smart contracts.&#xD;&#xA;and whatever field I have to change I am writing in the metaData struct.&#xD;&#xA;but it was not working.&#xD;&#xA;can anyone help me out here ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41294" PostHistoryTypeId="24" PostId="9964" RevisionGUID="b69ffb8a-a926-4b4b-9673-f0321b2159dc" CreationDate="2023-11-08T07:30:49.690" Comment="Proposed by 354 approved by 85, 116 edit id of 575" ContentLicense="CC BY-SA 4.0" />
  <row Id="41295" PostHistoryTypeId="5" PostId="9936" RevisionGUID="7d281f98-8104-4e38-a1e9-a82dae931b68" CreationDate="2023-11-08T07:31:32.707" UserId="354" Comment="improved formatting" Text="I am testing transferring ROC between Rococo and a Parachain. The HRMP channels are already open but when I submit try the following XCM Message: &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;The transfer returns no errors but the funds do not appear on the account on the parachain but goes to the SovereignAccount.&#xD;&#xA;&#xD;&#xA;The current XCM configuration for the runtime is: (link to code: [here][2])&#xD;&#xA;```rust&#xD;&#xA;        // Means for transacting assets on this chain.&#xD;&#xA;    pub type LocalAssetTransactor = CurrencyAdapter&lt;&#xD;&#xA;        // Use this currency:&#xD;&#xA;        Balances,&#xD;&#xA;        // Use this currency when it is a fungible asset matching the given location or name:&#xD;&#xA;        IsConcrete&lt;SelfLocation&gt;,&#xD;&#xA;        // Do a simple punn to convert an AccountId32 MultiLocation into a native chain account ID:&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        // Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;        AccountId,&#xD;&#xA;        // We don't track any teleports.&#xD;&#xA;        (),&#xD;&#xA;    &gt;;&#xD;&#xA;    &#xD;&#xA;    pub type TrustBackedAssetsConvertedConcreteId =&#xD;&#xA;        assets_common::TrustBackedAssetsConvertedConcreteId&lt;AssetsPalletLocation, Balance&gt;;&#xD;&#xA;    &#xD;&#xA;    /// Means for transacting assets besides the native currency on this chain.&#xD;&#xA;    pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;        // Use this fungibles implementation:&#xD;&#xA;        Assets,&#xD;&#xA;        // Use the asset registry for lookups&#xD;&#xA;        TrustBackedAssetsConvertedConcreteId,&#xD;&#xA;        //ConvertedConcreteAssetId&lt;AssetIdForTrustBackedAssets, Balance, AssetRegistry, JustTry&gt;,&#xD;&#xA;        // Convert an XCM MultiLocation into a local account id:&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        // Our chain's account ID type (we can't get away without mentioning it explicitly):&#xD;&#xA;        AccountId,&#xD;&#xA;        // We only want to allow teleports of known assets. We use non-zero issuance as an indication&#xD;&#xA;        // that this asset is known.&#xD;&#xA;        LocalMint&lt;parachains_common::impls::NonZeroIssuance&lt;AccountId, Assets&gt;&gt;,&#xD;&#xA;        // The account to use for tracking teleports.&#xD;&#xA;        CheckingAccount,&#xD;&#xA;    &gt;;&#xD;&#xA;    pub type AssetTransactors = (LocalAssetTransactor, FungiblesTransactor);&#xD;&#xA;    &#xD;&#xA;    pub type Barrier = (&#xD;&#xA;       TakeWeightCredit,&#xD;&#xA;       AllowKnownQueryResponses&lt;PolkadotXcm&gt;,&#xD;&#xA;       AllowTopLevelPaidExecutionFrom&lt;Everything&gt;,&#xD;&#xA;       AllowUnpaidExecutionFrom&lt;ParentOrParentsExecutivePlurality&gt;,&#xD;&#xA;       AllowSubscriptionsFrom&lt;ParentOrSiblings&gt;,&#xD;&#xA;    );&#xD;&#xA;    &#xD;&#xA;    impl xcm_executor::Config for XcmConfig {&#xD;&#xA;        type Aliasers = Nothing;&#xD;&#xA;        type AssetClaims = PolkadotXcm;&#xD;&#xA;        type AssetExchanger = ();&#xD;&#xA;        type AssetLocker = ();&#xD;&#xA;        type AssetTransactor = AssetTransactors;&#xD;&#xA;        type AssetTrap = PolkadotXcm;&#xD;&#xA;        type Barrier = Barrier;&#xD;&#xA;        type CallDispatcher = RuntimeCall;&#xD;&#xA;        type FeeManager = ();&#xD;&#xA;        type IsReserve = NativeAsset;&#xD;&#xA;        type IsTeleporter = (&#xD;&#xA;            NativeAsset,&#xD;&#xA;            // IsForeignConcreteAsset&lt;FromSiblingParachain&lt;parachain_info::Pallet&lt;Runtime&gt;&gt;&gt;,&#xD;&#xA;        );&#xD;&#xA;        type MaxAssetsIntoHolding = MaxAssetsIntoHolding;&#xD;&#xA;        type MessageExporter = ();&#xD;&#xA;        type OriginConverter = XcmOriginToTransactDispatchOrigin;&#xD;&#xA;        type PalletInstancesInfo = AllPalletsWithSystem;&#xD;&#xA;        type ResponseHandler = PolkadotXcm;&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type SafeCallFilter = Everything;&#xD;&#xA;        type SubscriptionService = PolkadotXcm;&#xD;&#xA;        type Trader = UsingComponents&lt;WeightToFee, RelayLocation, AccountId, Balances, ()&gt;;&#xD;&#xA;        type UniversalAliases = Nothing;&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        type XcmSender = XcmRouter;&#xD;&#xA;     }&#xD;&#xA;    &#xD;&#xA;    #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        parameter_types! {&#xD;&#xA;        pub ReachableDest: Option&lt;MultiLocation&gt; = Some(Parent.into());&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_xcm::Config for Runtime {&#xD;&#xA;        type AdminOrigin = EnsureRoot&lt;crate::AccountId&gt;;&#xD;&#xA;        // type AdminOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;&#xD;&#xA;        type Currency = Balances;&#xD;&#xA;        type CurrencyMatcher = ();&#xD;&#xA;        // We support local origins dispatching XCM executions in principle...&#xD;&#xA;        type ExecuteXcmOrigin = EnsureXcmOrigin&lt;RuntimeOrigin, LocalOriginToLocation&gt;;&#xD;&#xA;        type MaxLockers = ConstU32&lt;8&gt;;&#xD;&#xA;        type MaxRemoteLockConsumers = frame_support::traits::ConstU32&lt;0&gt;;&#xD;&#xA;        // type MaxRemoteLockConsumers = ConstU32&lt;0&gt;;&#xD;&#xA;        #[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;        type ReachableDest = ReachableDest;&#xD;&#xA;        type RemoteLockConsumerIdentifier = ();&#xD;&#xA;        // type RemoteLockConsumerIdentifier = ();&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type RuntimeEvent = RuntimeEvent;&#xD;&#xA;        type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;        // We want to disallow users sending (arbitrary) XCMs from this chain.&#xD;&#xA;        type SendXcmOrigin = EnsureXcmOrigin&lt;RuntimeOrigin, ()&gt;;&#xD;&#xA;        type SovereignAccountOf = LocationToAccountId;&#xD;&#xA;        type TrustedLockers = ();&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        // FIXME: Replace with benchmarked weight info&#xD;&#xA;        type WeightInfo = pallet_xcm::TestWeightInfo;&#xD;&#xA;        // ... but disallow generic XCM execution. As a result only teleports and reserve transfers are allowed.&#xD;&#xA;        type XcmExecuteFilter = Nothing;&#xD;&#xA;        type XcmExecutor = XcmExecutor&lt;XcmConfig&gt;;&#xD;&#xA;        type XcmReserveTransferFilter = Everything;&#xD;&#xA;        type XcmRouter = XcmRouter;&#xD;&#xA;        type XcmTeleportFilter = Everything;&#xD;&#xA;    &#xD;&#xA;        const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any guidance on how to resolve that?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cqRzH.png&#xD;&#xA;  [2]: https://github.com/t3rn/t3rn/blob/development/runtime/t0rn-parachain/src/xbi_config.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="41296" PostHistoryTypeId="24" PostId="9936" RevisionGUID="7d281f98-8104-4e38-a1e9-a82dae931b68" CreationDate="2023-11-08T07:31:32.707" Comment="Proposed by 354 approved by 85, 116 edit id of 576" ContentLicense="CC BY-SA 4.0" />
  <row Id="41297" PostHistoryTypeId="5" PostId="10417" RevisionGUID="a6e19927-34d1-42d4-baeb-5ef4652a2a46" CreationDate="2023-11-08T07:35:36.397" UserId="116" Comment="deleted 19 characters in body" Text="I have an ink smart contract message that takes an enum as argument. The code is shown below;&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(Debug, PartialEq, Eq, scale_info::TypeInfo, StorageLayout,)&#xD;&#xA;    )]&#xD;&#xA;    pub enum EncodableFunctions {&#xD;&#xA;        SetAssets(Vec&lt;ContentIdentifier&gt;),&#xD;&#xA;        ActivateVoting(u128),&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;     #[ink(message)]&#xD;&#xA;        pub fn encode_function_name_and_input(&#xD;&#xA;            &amp;self,&#xD;&#xA;            args: EncodableFunctions,&#xD;&#xA;        ) -&gt; ([u8; 4], Vec&lt;u8&gt;) {&#xD;&#xA;            match args {&#xD;&#xA;                EncodableFunctions::SetAssets =&gt; {&#xD;&#xA;                    let encoded_name = ink::selector_bytes!(&quot;set_default_assets&quot;);&#xD;&#xA;                    let inputs = ArgumentList::empty().push_arg(&amp;args);&#xD;&#xA;                    let encoded_inputs = inputs.encode();&#xD;&#xA;                    (encoded_name, encoded_inputs)&#xD;&#xA;                }&#xD;&#xA;                EncodableFunctions::ActivateVoting =&gt; {&#xD;&#xA;                    let encoded_name = ink::selector_bytes!(&quot;activate_voting&quot;);&#xD;&#xA;                    let inputs = ArgumentList::empty().push_arg(&amp;args);&#xD;&#xA;                    let encoded_inputs = inputs.encode();&#xD;&#xA;                    (encoded_name, encoded_inputs)&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;The contract builds successfully and I'm able to deploy to Substrate COntracts UI but when I try to interact with the function, I get a blank screen like the image below&#xD;&#xA;&#xD;&#xA;[![screenshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/HSjXZ.png&#xD;&#xA;&#xD;&#xA;There's no such error if I replace the enum with no associated values, like enum below. Any way I can make the function work?&#xD;&#xA;&#xD;&#xA;     #[derive(Encode, Decode)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(Debug, PartialEq, Eq, scale_info::TypeInfo, StorageLayout,)&#xD;&#xA;    )]&#xD;&#xA;    pub enum EncodableFunctions {&#xD;&#xA;        SetAssets,&#xD;&#xA;        ActivateVoting,&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="41298" PostHistoryTypeId="5" PostId="10414" RevisionGUID="4571738a-2214-4f29-a7a3-b1edd5fcf482" CreationDate="2023-11-08T07:36:48.090" UserId="116" Comment="Formating" Text="Like cosmos or beacon chain, can we attach a memo in polkadot which describes the transaction in better way?&#xD;&#xA;For example while transferring dot can we attach a string like field which describes the transaction?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41299" PostHistoryTypeId="5" PostId="10393" RevisionGUID="4ae9598f-7651-4b97-97f9-22c4884a0f1c" CreationDate="2023-11-08T07:43:35.367" UserId="116" Comment="code in code blocks" Text="I simply fixed this problem by removing the `crate-type = []`&#xD;&#xA;&#xD;&#xA;For some reason, new versions of ink! must not be provisioned with crate-types as `cdylib`, `rlib`, or both as the case may be.&#xD;&#xA;&#xD;&#xA;It now works like a charm!" ContentLicense="CC BY-SA 4.0" />
  <row Id="41300" PostHistoryTypeId="5" PostId="8396" RevisionGUID="25c85f00-8f08-4fa4-8833-73682ddd71a5" CreationDate="2023-11-08T07:53:26.427" UserId="116" Comment="Clarifying question" Text="I get an error when running dev node and transfer coin to test address.&#xD;&#xA;&#xD;&#xA;I use: https://github.com/substrate-developer-hub/substrate-front-end-template&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here are the console logs:&#xD;&#xA;```&#xD;&#xA;2023-05-08 07:55:45   Starting consensus session on top of parent 0x1d62fc09c822d0857cd502b551b6552f1da4ff364e23340dc78544845ed8a70b    &#xD;&#xA;2023-05-08 07:55:45   Prepared block for proposing at 230 [hash: 0x80339fd8bbeb7bfa0aaa05ae378dc2c0a279d75b082590ef0c167f58f282033c; parent_hash: 0x1d62…a70b; extrinsics (1): [0xd9b2…9334]]    &#xD;&#xA;2023-05-08 07:55:45   Pre-sealed block for proposal at 230. Hash now 0x045ed0fb58b8bcf39f27532d75e2d9a7e403c888da811947612589686b6f1a86, previously 0x80339fd8bbeb7bfa0aaa05ae378dc2c0a279d75b082590ef0c167f58f282033c.    &#xD;&#xA;2023-05-08 07:55:45  ✨ Imported #230 (0x045e…1a86)    &#xD;&#xA;2023-05-08 07:55:46   Idle (0 peers), best: #230 (0x045e…1a86), finalized #227 (0x906b…bba2), ⬇ 0 ⬆ 0    &#xD;&#xA;2023-05-08 07:55:47  panicked at 'Bad input data provided to query_info: Codec error', /opt/spacex/runtime/src/lib.rs:902:1    &#xD;&#xA;2023-05-08 07:55:47  Unknown error: Client(Execution(Other(&quot;Wasm execution trapped: wasm trap: unreachable&#xD;&#xA;wasm backtrace:&#xD;&#xA;    0: 0x2156 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x1ea3 - &lt;unknown&gt;!core::panicking::panic_fmt::h125c8438143be5c3&#xD;&#xA;    2: 0x1319ea - &lt;unknown&gt;!TransactionPaymentApi_query_info&#xD;&#xA;note: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to display more information&#xD;&#xA;&quot;)))    &#xD;&#xA;2023-05-08 07:55:48   Starting consensus session on top of parent 0x045ed0fb58b8bcf39f27532d75e2d9a7e403c888da811947612589686b6f1a86    &#xD;&#xA;2023-05-08 07:55:48   Prepared block for proposing at 231 [hash: 0x04084edcacd1ba011cd8a6a3b52871ab8b0067eab1cf57c1712bc6c6b94d8e9a; parent_hash: 0x045e…1a86; extrinsics (1): [0x2139…b8c3]]    &#xD;&#xA;2023-05-08 07:55:48   Pre-sealed block for proposal at 231. Hash now 0x6ac10d2fcf6e2e63eb18507cb42b9eee7df73e05f1f6c6a2e429d462f0e339dc, previously 0x04084edcacd1ba011cd8a6a3b52871ab8b0067eab1cf57c1712bc6c6b94d8e9a.    &#xD;&#xA;2023-05-08 07:55:48  ✨ Imported #231 (0x6ac1…39dc)```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41301" PostHistoryTypeId="4" PostId="8396" RevisionGUID="25c85f00-8f08-4fa4-8833-73682ddd71a5" CreationDate="2023-11-08T07:53:26.427" UserId="116" Comment="Clarifying question" Text="panicked at 'Bad input data provided to query_info: Codec error' when running a dev node" ContentLicense="CC BY-SA 4.0" />
  <row Id="41302" PostHistoryTypeId="6" PostId="8396" RevisionGUID="25c85f00-8f08-4fa4-8833-73682ddd71a5" CreationDate="2023-11-08T07:53:26.427" UserId="116" Comment="Clarifying question" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41303" PostHistoryTypeId="50" PostId="4226" RevisionGUID="7f85fb8b-d76a-42ad-b6b4-a237e4896bb4" CreationDate="2023-11-08T11:07:20.983" UserId="-1" />
  <row Id="41304" PostHistoryTypeId="2" PostId="10422" RevisionGUID="abd9cb84-7f75-453f-b54e-8042a7c824f6" CreationDate="2023-11-08T11:21:58.457" UserId="94" Text="The only thing that comes to mind from your description is the `storage_alias`. It can have three different kind of prefix and can be declared outside of pallets (actually anywhere).  &#xD;&#xA;&#xD;&#xA;The standard version when a pallet storage should be addressed looks like this. It is useful for writing migrations from/to pallets:  &#xD;&#xA;```rust&#xD;&#xA;#[storage_alias]&#xD;&#xA;pub type PageIndex&lt;T: Config&gt; = StorageValue&lt;Pallet&lt;T&gt;, PageIndexData&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now it is also possible to use another prefix, eg:  &#xD;&#xA;```rust&#xD;&#xA;#[storage_alias(verbatim)]&#xD;&#xA;pub type PageIndex = StorageValue&lt;MyPrefix, PageIndexData&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or making it entirely runtime dependant such that it can change at any time. For example when `DynamicName` implements `Get&lt;&amp;'static str&gt;`:  &#xD;&#xA;```rust&#xD;&#xA;#[storage_alias(dynamic)]&#xD;&#xA;pub type PageIndex = StorageValue&lt;DynamicName, PageIndexData&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Otherwise there is `parameter_types`, but it cannot take a custom prefix." ContentLicense="CC BY-SA 4.0" />
  <row Id="41306" PostHistoryTypeId="2" PostId="10423" RevisionGUID="9c028936-4e9b-4319-ad10-75abe55d288b" CreationDate="2023-11-08T12:15:10.760" UserId="4835" Text="Many Substrate pallets extrinsics take a Balance type, for example balances-&gt;transfer or bounties-&gt;create. &#xD;&#xA;&#xD;&#xA;The Polkadot/substrate Development UI somehow detects that it is a Token related field and adjusts the UI accordingly, for example by adding the token symbol in the box, handling decimals, etc.&#xD;&#xA;&#xD;&#xA;I was wondering if the polkadot UI is using type information to infer that the Compact&lt;u128&gt; parameter is actually a Token value, or how is that happening.&#xD;&#xA;&#xD;&#xA;I am creating a extrinsinc that takes a `#[pallet::compact] value: BalanceOf&lt;T&gt;` but the UI is not treating it the same way.&#xD;&#xA;&#xD;&#xA;How is that implemented?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41308" PostHistoryTypeId="1" PostId="10423" RevisionGUID="9c028936-4e9b-4319-ad10-75abe55d288b" CreationDate="2023-11-08T12:15:10.760" UserId="4835" Text="Extrinsic with BalanceOf&lt;T&gt; and UI" ContentLicense="CC BY-SA 4.0" />
  <row Id="41309" PostHistoryTypeId="3" PostId="10423" RevisionGUID="9c028936-4e9b-4319-ad10-75abe55d288b" CreationDate="2023-11-08T12:15:10.760" UserId="4835" Text="|polkadot-js|extrinsic|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41310" PostHistoryTypeId="2" PostId="10424" RevisionGUID="b1dacbe3-938a-40eb-8d70-2bcad80b6818" CreationDate="2023-11-08T14:00:19.987" UserId="116" Text="For a running chain the interface `system.properties: ChainProperties` is provided, it is defined in the chain config and compiled into runtime. For polkadot it returns:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  ss58Format: 0&#xD;&#xA;  tokenDecimals: [&#xD;&#xA;    10&#xD;&#xA;  ]&#xD;&#xA;  tokenSymbol: [&#xD;&#xA;    DOT&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On nodle we have defined it in chain_spec.rs in genesis block as:&#xD;&#xA;```&#xD;&#xA;	let mut properties = sc_chain_spec::Properties::new();&#xD;&#xA;	properties.insert(&quot;tokenSymbol&quot;.into(), &quot;NODL&quot;.into());&#xD;&#xA;	properties.insert(&quot;tokenDecimals&quot;.into(), 11.into());&#xD;&#xA;	properties.insert(&quot;ss58Format&quot;.into(), 42.into());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For the second part of your question, when you create a pallet in runtime source you need to configure the pallet in an `impl` block. In our chain we have a constant defined:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub type Balance = u128;&#xD;&#xA;```&#xD;&#xA;and reused in all pallets related to currencies. " ContentLicense="CC BY-SA 4.0" />
  <row Id="41312" PostHistoryTypeId="5" PostId="10420" RevisionGUID="4611731b-e398-492e-b2e3-fb94a26c4527" CreationDate="2023-11-08T14:10:52.050" UserId="116" Comment="added 50 characters in body; edited title" Text="What return type should I use in subxt to be able to parse the result from `author_pendingExtrinsics`?&#xD;&#xA;&#xD;&#xA;I have implemented a wrapper call and returning a vector of `OpaqueExtrinsic`:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    async fn author_pending_extrinsics(&amp;self) -&gt; Result&lt;Vec&lt;OpaqueExtrinsic&gt;, subxt::Error&gt; {&#xD;&#xA;       self.rpc.request(&quot;author_pendingExtrinsics&quot;, rpc_params![]).await;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;This is okay, but I need to get the signer and the nonce from the results. It should be possible as polkadot-js there is a type called `Extrinsic` with all the information I need.&#xD;&#xA;&#xD;&#xA;Running the call in the polkadot-js web ui returns:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;3: author.pendingExtrinsics: Vec&lt;Extrinsic&gt;&#xD;&#xA;[&#xD;&#xA;  {&#xD;&#xA;    isSigned: true&#xD;&#xA;    method: {&#xD;&#xA;      args: {&#xD;&#xA;        dest: {&#xD;&#xA;          Id: 4hNgHEdC6EZYHPFJrxFt19m3zBMbTb6ZErSbo9idCpX6n2zU&#xD;&#xA;        }&#xD;&#xA;        value: 9,500,000,000,000&#xD;&#xA;      }&#xD;&#xA;      method: transfer&#xD;&#xA;      section: balances&#xD;&#xA;    }&#xD;&#xA;    era: {&#xD;&#xA;      ImmortalEra: 0x00&#xD;&#xA;    }&#xD;&#xA;    nonce: 1&#xD;&#xA;    signature: 0xbe779752c8893fc895cbca17b2b47b8fcde7627f1dd93d022354ba13d777f361befebc9f0862c5821c995ff1145d543114ea55fa89120d85b16815775f67658e&#xD;&#xA;    signer: {&#xD;&#xA;      Id: 4hNohKFDvDG8qf5SHPjhg3dhGFe4uRp136tm8eHNQ72xSYXB&#xD;&#xA;    }&#xD;&#xA;    tip: 0&#xD;&#xA;  }&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have searched in the auto generated docs for my project(`cargo doc --open`) but could not find any suitable existing or auto generated type.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41313" PostHistoryTypeId="4" PostId="10420" RevisionGUID="4611731b-e398-492e-b2e3-fb94a26c4527" CreationDate="2023-11-08T14:10:52.050" UserId="116" Comment="added 50 characters in body; edited title" Text="Parsing the result from author_pendingExtrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="41314" PostHistoryTypeId="52" PostId="10421" RevisionGUID="dbacc340-aa8e-4f31-9bd3-0e08a5e51f3e" CreationDate="2023-11-08T15:28:47.147" />
  <row Id="41315" PostHistoryTypeId="5" PostId="10390" RevisionGUID="8926093f-a872-4981-b760-4f39b8af1619" CreationDate="2023-11-09T00:11:16.813" UserId="116" Comment="update from comments" Text="I'm building an application whose architecture decouples transaction composition, signing, and publishing. These processes literally live in separate components that communicate with each other, but do not belong on the same application.&#xD;&#xA;&#xD;&#xA;This means that after composing a transaction with:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const tx = api.tx.pallet.dispatchable(...args);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don't want to use `signAndSend`, but instead sign the raw encoded call, and once I have the signature, I need to publish it to a substrate node. The info I have at this point is `encodedCall` and `signature`.&#xD;&#xA;&#xD;&#xA;How can I publish a transaction with that information alone? Is there a way to reconstruct the `SubmittableExtrinsic` object to use `.send()`? Or is there a way to make a raw RPC call that achieves the same result?&#xD;&#xA;&#xD;&#xA;*Update*:&#xD;&#xA;My question is: what would the third parameter of `sign()` be?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41316" PostHistoryTypeId="2" PostId="10425" RevisionGUID="75b08611-655b-416c-a451-abacc924647e" CreationDate="2023-11-09T01:14:48.900" UserId="2844" Text="I am able to add funds in treasury pallet, now I want to get the total balance of treasury pool. How can this be done? Can someone provide some suggestions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41318" PostHistoryTypeId="1" PostId="10425" RevisionGUID="75b08611-655b-416c-a451-abacc924647e" CreationDate="2023-11-09T01:14:48.900" UserId="2844" Text="How to read treasury pallet funds?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41319" PostHistoryTypeId="3" PostId="10425" RevisionGUID="75b08611-655b-416c-a451-abacc924647e" CreationDate="2023-11-09T01:14:48.900" UserId="2844" Text="|substrate-node-template|balances|pallet-treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41320" PostHistoryTypeId="2" PostId="10426" RevisionGUID="a3070cf9-8772-4ab0-9826-c58ac5cc3ccf" CreationDate="2023-11-09T07:06:53.993" UserId="251" Text="Please refer to this link for information on how to find the accounts used behind the treasury pallet: https://substrate.stackexchange.com/questions/7033/how-to-find-the-accounts-used-behind-treasury-pallet.&#xD;&#xA;&#xD;&#xA;Consider this address as a normal account, with its free balance representing the treasury funds." ContentLicense="CC BY-SA 4.0" />
  <row Id="41322" PostHistoryTypeId="50" PostId="10092" RevisionGUID="33c33962-0338-4136-80ed-49e50f5fb32a" CreationDate="2023-11-09T09:01:25.153" UserId="-1" />
  <row Id="41323" PostHistoryTypeId="2" PostId="10427" RevisionGUID="ee4addc9-7f27-4c21-a17b-bc3f3e7bce39" CreationDate="2023-11-09T09:51:31.180" UserId="380" Text="The third parameter of `sign` is the `payload`, which can be constructed by following the instructions in [this answer](https://substrate.stackexchange.com/a/7747/380)." ContentLicense="CC BY-SA 4.0" />
  <row Id="41325" PostHistoryTypeId="50" PostId="8845" RevisionGUID="dfc7f6b9-8d24-426d-82f3-9cd41f2842a5" CreationDate="2023-11-09T10:03:00.360" UserId="-1" />
  <row Id="41326" PostHistoryTypeId="50" PostId="10094" RevisionGUID="4eeb7068-5980-4f16-90df-b9e285005ecb" CreationDate="2023-11-09T11:01:50.220" UserId="-1" />
  <row Id="41327" PostHistoryTypeId="2" PostId="10428" RevisionGUID="e005835f-4e04-45b6-8a75-39019ede613d" CreationDate="2023-11-09T11:50:14.377" UserId="2473" Text="This may come out nonsensical but I'll ask it anyway.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub enum Test&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;} = 0,&#xD;&#xA;		Balances: pallet_balances::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;} = 1,&#xD;&#xA;		XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event&lt;T&gt;, Origin, Config&lt;T&gt;} = 2,&#xD;&#xA;		TestNotifier: pallet_test_notifier::{Pallet, Call, Event&lt;T&gt;} = 3,&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;This is the old code, and somehow we don't need `TestNotifier` anymore, so we removed it. After a few months we're adding a new pallet: &#xD;&#xA;```rust&#xD;&#xA;Session: pallet_session::{Pallet, Call, Storage, Event, Config&lt;T&gt;} = 3,&#xD;&#xA;```&#xD;&#xA;And to keep it clean, we're reusing the same pallet instance number: ***3***. &#xD;&#xA;&#xD;&#xA;Are there repercussions for reusing the same number? Although it's been months long?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41329" PostHistoryTypeId="1" PostId="10428" RevisionGUID="e005835f-4e04-45b6-8a75-39019ede613d" CreationDate="2023-11-09T11:50:14.377" UserId="2473" Text="Reusing old Pallet Instance Number" ContentLicense="CC BY-SA 4.0" />
  <row Id="41330" PostHistoryTypeId="3" PostId="10428" RevisionGUID="e005835f-4e04-45b6-8a75-39019ede613d" CreationDate="2023-11-09T11:50:14.377" UserId="2473" Text="|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41331" PostHistoryTypeId="2" PostId="10429" RevisionGUID="d318539d-b333-4d2f-a062-d1dce0b88a59" CreationDate="2023-11-09T12:12:50.973" UserId="251" Text="This affects the call index.&#xD;&#xA;&#xD;&#xA;Ensure that there are no scheduled calls before proceeding. And you'd better check if there are any preimage or DApp still using that index.&#xD;&#xA;&#xD;&#xA;If not, suppose you schedule a call `0x3::0x0` from democracy, and it will be dispatched after 14 days. This means that the first call of the third pallet will be executed at that time. Just make sure it does not accidentally execute your new pallet's call." ContentLicense="CC BY-SA 4.0" />
  <row Id="41333" PostHistoryTypeId="5" PostId="10429" RevisionGUID="2a94f079-bb04-454f-a72d-286804ce711d" CreationDate="2023-11-09T12:25:14.943" UserId="251" Comment="added 1 character in body" Text="This affects the call index.&#xD;&#xA;&#xD;&#xA;Ensure that there are no scheduled calls before proceeding. And you'd better check if there are any preimage or DApp still using that index.&#xD;&#xA;&#xD;&#xA;If not, suppose you schedule a call `0x3::0x0` from democracy, and it will be dispatched after 14 days. This means that the first call of the fourth pallet will be executed at that time. Just make sure it does not accidentally execute your new pallet's call." ContentLicense="CC BY-SA 4.0" />
  <row Id="41334" PostHistoryTypeId="52" PostId="10428" RevisionGUID="eee1620e-248b-4de2-ab9a-6b7ba7a73d5b" CreationDate="2023-11-09T19:50:57.063" />
  <row Id="41335" PostHistoryTypeId="2" PostId="10430" RevisionGUID="b45efbf7-aaf0-4c95-a457-e76bc7fe8e80" CreationDate="2023-11-10T07:22:27.030" UserId="3991" Text="I encountered a compile error `error: A runtime API function cannot have a default implementation!` when attempting to define a default implementation for a runtime API. &#xD;&#xA;&#xD;&#xA;Why is this not possible? " ContentLicense="CC BY-SA 4.0" />
  <row Id="41337" PostHistoryTypeId="1" PostId="10430" RevisionGUID="b45efbf7-aaf0-4c95-a457-e76bc7fe8e80" CreationDate="2023-11-10T07:22:27.030" UserId="3991" Text="Why can't runtime APIs have default implementations?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41338" PostHistoryTypeId="3" PostId="10430" RevisionGUID="b45efbf7-aaf0-4c95-a457-e76bc7fe8e80" CreationDate="2023-11-10T07:22:27.030" UserId="3991" Text="|runtime|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41339" PostHistoryTypeId="2" PostId="10431" RevisionGUID="745c3ce6-30d6-47c9-a1fa-48d66b5bb50a" CreationDate="2023-11-10T12:17:50.110" UserId="2065" Text="I am currently successfully able to transfer ROC from Rococo to a parachain using a **Reserve Asset Transfer**. However when I want to transfer some of the ROC from our parachain back to Rococo but when I use ReserveAssetTransfer the following happens&#xD;&#xA;&#xD;&#xA; - The asset balance gets reduced for the account but the total balance on the parachain stays the same (I assume it is stored on a Sovereign Account)&#xD;&#xA; - **Message seems to be processed successfully on both the parachain and Rococo but the ROC balance on Rococo has not been updated**&#xD;&#xA;&#xD;&#xA;A similar issue occurs when I am trying to **Teleport** the asset - the balance on Rococo does not update but the balance on the parachain is burned this time.&#xD;&#xA;&#xD;&#xA;Here is a copy of the parachain current **xcm_executor config**:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    pub type LocalAssetTransactor = CurrencyAdapter&lt;&#xD;&#xA;        Balances,&#xD;&#xA;        IsConcrete&lt;SelfLocation&gt;,&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        AccountId,&#xD;&#xA;        (),&#xD;&#xA;    &gt;;&#xD;&#xA;    &#xD;&#xA;    pub type TrustBackedAssetsConvertedConcreteId =&#xD;&#xA;        assets_common::TrustBackedAssetsConvertedConcreteId&lt;AssetsPalletLocation, Balance&gt;;&#xD;&#xA;    &#xD;&#xA;    pub type FungiblesTransactor = FungiblesAdapter&lt;&#xD;&#xA;        Assets,&#xD;&#xA;        ConvertedRegisteredAssetId&lt;&#xD;&#xA;            AssetIdForTrustBackedAssets,&#xD;&#xA;            Balance,&#xD;&#xA;            AsAssetMultiLocation&lt;AssetIdForTrustBackedAssets, AssetRegistry&gt;,&#xD;&#xA;            JustTry,&#xD;&#xA;        &gt;,&#xD;&#xA;        LocationToAccountId,&#xD;&#xA;        AccountId,&#xD;&#xA;        NoChecking,&#xD;&#xA;        PlaceholderAccount,&#xD;&#xA;    &gt;;&#xD;&#xA;    &#xD;&#xA;    pub type AssetTransactors = (LocalAssetTransactor, FungiblesTransactor);&#xD;&#xA;    &#xD;&#xA;    pub type Barrier = TrailingSetTopicAsId&lt;(&#xD;&#xA;        TakeWeightCredit,&#xD;&#xA;        AllowKnownQueryResponses&lt;PolkadotXcm&gt;,&#xD;&#xA;        WithComputedOrigin&lt;&#xD;&#xA;            (&#xD;&#xA;                AllowTopLevelPaidExecutionFrom&lt;Everything&gt;,&#xD;&#xA;                AllowUnpaidExecutionFrom&lt;ParentOrParentsExecutivePlurality&gt;,&#xD;&#xA;                AllowSubscriptionsFrom&lt;ParentOrSiblings&gt;,&#xD;&#xA;            ),&#xD;&#xA;            UniversalLocation,&#xD;&#xA;            ConstU32&lt;8&gt;,&#xD;&#xA;        &gt;,&#xD;&#xA;    )&gt;;    &#xD;&#xA;    &#xD;&#xA;    pub type Traders = (&#xD;&#xA;        FixedRateOfFungible&lt;RUsdtPerSecond, ()&gt;,&#xD;&#xA;        FixedRateOfFungible&lt;RUsdPerSecond, ()&gt;,&#xD;&#xA;        FixedRateOfFungible&lt;RocPerSecond, ()&gt;,&#xD;&#xA;        UsingComponents&lt;WeightToFee, SelfReserve, AccountId, Balances, ToAuthor&lt;Runtime&gt;&gt;,&#xD;&#xA;    );&#xD;&#xA;    pub type Reserves = (NativeAsset, ReserveAssetsFrom&lt;AssetHubLocation&gt;);&#xD;&#xA;    pub type TrustedTeleporters = (xcm_builder::Case&lt;AssetHubTrustedTeleporter&gt;,);&#xD;&#xA;    &#xD;&#xA;    pub struct XcmConfig;&#xD;&#xA;    impl xcm_executor::Config for XcmConfig {&#xD;&#xA;        type Aliasers = Nothing;&#xD;&#xA;        type AssetClaims = PolkadotXcm;&#xD;&#xA;        type AssetExchanger = ();&#xD;&#xA;        type AssetLocker = ();&#xD;&#xA;        type AssetTransactor = AssetTransactors;&#xD;&#xA;        type AssetTrap = PolkadotXcm;&#xD;&#xA;        type Barrier = Barrier;&#xD;&#xA;        type CallDispatcher = RuntimeCall;&#xD;&#xA;        type FeeManager = ();&#xD;&#xA;        type IsReserve = Reserves;&#xD;&#xA;        type IsTeleporter = TrustedTeleporters;&#xD;&#xA;        type MaxAssetsIntoHolding = MaxAssetsIntoHolding;&#xD;&#xA;        type MessageExporter = ();&#xD;&#xA;        type OriginConverter = XcmOriginToTransactDispatchOrigin;&#xD;&#xA;        type PalletInstancesInfo = AllPalletsWithSystem;&#xD;&#xA;        type ResponseHandler = PolkadotXcm;&#xD;&#xA;        type RuntimeCall = RuntimeCall;&#xD;&#xA;        type SafeCallFilter = Everything;&#xD;&#xA;        type SubscriptionService = PolkadotXcm;&#xD;&#xA;        type Trader = Traders;&#xD;&#xA;        type UniversalAliases = Nothing;&#xD;&#xA;        type UniversalLocation = UniversalLocation;&#xD;&#xA;        type Weigher = FixedWeightBounds&lt;UnitWeightCost, RuntimeCall, MaxInstructions&gt;;&#xD;&#xA;        type XcmSender = XcmRouter;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Any guidance on how to update the balance on the relaychain?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41341" PostHistoryTypeId="1" PostId="10431" RevisionGUID="745c3ce6-30d6-47c9-a1fa-48d66b5bb50a" CreationDate="2023-11-10T12:17:50.110" UserId="2065" Text="XCM transfer of ROC from parachain to Rococo does not update balance on Rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="41342" PostHistoryTypeId="3" PostId="10431" RevisionGUID="745c3ce6-30d6-47c9-a1fa-48d66b5bb50a" CreationDate="2023-11-10T12:17:50.110" UserId="2065" Text="|xcm|error|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41343" PostHistoryTypeId="2" PostId="10432" RevisionGUID="a99e2f94-1b9c-48cd-8347-92eb4e13ecb9" CreationDate="2023-11-10T14:53:16.987" UserId="4924" Text="I am getting the following error when I try to decode unsigned transaction&#xD;&#xA;rawTxId &#xD;&#xA;&#xD;&#xA;    &quot;message&quot;: &quot;createType(Extrinsic):: createType(ExtrinsicV4):: createType(Call):: Call: failed decoding staking.bond:: Struct: failed on args: {\&quot;value\&quot;:\&quot;Lookup54\&quot;,\&quot;payee\&quot;:\&quot;{\\\&quot;_enum\\\&quot;:{\\\&quot;Staked\\\&quot;:\\\&quot;Null\\\&quot;,\\\&quot;Stash\\\&quot;:\\\&quot;Null\\\&quot;,\\\&quot;Controller\\\&quot;:\\\&quot;Null\\\&quot;,\\\&quot;Account\\\&quot;:\\\&quot;AccountId32\\\&quot;,\\\&quot;None\\\&quot;:\\\&quot;Null\\\&quot;}}\&quot;}:: decodeU8aStruct: failed at 0x3ab6ce09551c5ee90f74d01e53ad9a6d… on payee (index 2/2): {\&quot;_enum\&quot;:{\&quot;Staked\&quot;:\&quot;Null\&quot;,\&quot;Stash\&quot;:\&quot;Null\&quot;,\&quot;Controller\&quot;:\&quot;Null\&quot;,\&quot;Account\&quot;:\&quot;AccountId32\&quot;,\&quot;None\&quot;:\&quot;Null\&quot;}}:: Unable to create Enum via index 58, in Staked, Stash, Controller, Account, None&quot;&#xD;&#xA;&#xD;&#xA;My structure on building is the following&#xD;&#xA;&#xD;&#xA;    staking.bond(&#xD;&#xA;            {&#xD;&#xA;              controller: address,&#xD;&#xA;              value: '1000000',&#xD;&#xA;              payee: {&#xD;&#xA;                Account: address,&#xD;&#xA;              },&#xD;&#xA;            },&#xD;&#xA;            txMetadata,&#xD;&#xA;            {&#xD;&#xA;              metadataRpc: metadata,&#xD;&#xA;              registry,&#xD;&#xA;            },&#xD;&#xA;          );&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="41345" PostHistoryTypeId="1" PostId="10432" RevisionGUID="a99e2f94-1b9c-48cd-8347-92eb4e13ecb9" CreationDate="2023-11-10T14:53:16.987" UserId="4924" Text="Call: failed decoding staking.bond" ContentLicense="CC BY-SA 4.0" />
  <row Id="41346" PostHistoryTypeId="3" PostId="10432" RevisionGUID="a99e2f94-1b9c-48cd-8347-92eb4e13ecb9" CreationDate="2023-11-10T14:53:16.987" UserId="4924" Text="|kusama|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41347" PostHistoryTypeId="2" PostId="10433" RevisionGUID="fd43722e-01fa-41ed-a934-0ab5360328ef" CreationDate="2023-11-10T16:09:53.833" UserId="357" Text="Right after Kusama got upgraded to 1.0, &#xD;&#xA;all the upward messages from Mangata started to fail on Kusama with the following error:  &#xD;&#xA;&#xD;&#xA;    messageQueue.ProcessingFailed&#xD;&#xA;    Message discarded due to an error in the MessageProcessor (usually a format error). &#xD;&#xA;    id: [u8;32]&#xD;&#xA;    0x90fd8ab8327d393862fd5c559193238a363746c1044712eda15334310a195e20&#xD;&#xA;    origin: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin&#xD;&#xA;    Ump&#xD;&#xA;    Ump: PolkadotRuntimeParachainsInclusionUmpQueueId&#xD;&#xA;    Para&#xD;&#xA;    Para: u32&#xD;&#xA;    2,110&#xD;&#xA;    error: FrameSupportMessagesProcessMessageError&#xD;&#xA;    Unsupported&#xD;&#xA;&#xD;&#xA;I've been investigating, and I can not find where those tokens are now. &#xD;&#xA;Ive checked the balance of the sovereign account, and the tokens did not change +-5 blocks when the tx failed.  &#xD;&#xA;&gt; Sovereign account: F7fq1irK3J8tbBHJ2aeXJMAZTEXkoyPWPNJL1TTMhsjo6GZ. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;We have a collection of failed XCMs since then, can you help us find where those KSMs are? We would like to return them to the legit users :)  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;+INFO: &#xD;&#xA;https://mangatax.subscan.io/xcm_message/kusama-9402eac38ea75f98ad112a497da35e7f86c063c9&#xD;&#xA;&#xD;&#xA;Failed Tx: 0xa10284009a89082c3ecc32a28b1ad69e8c69960b48a80fbf20ede17189995d8b4a1730770108f66dda5dc3e844c874f569632777da2fcc4f3d313ed1d230b3d5e2edcdc858a7b693366925bc322f41b039f6b86834c1195c2ced4e85ce0016527fd60ed7884401180032000400000000502c0634300000000000000000000003010101005ccce931d9f8465e3628d772f33cf4e8b4173505637fa8b96b5dccc13902c81201028c864700&#xD;&#xA;&#xD;&#xA;Failed XCMs:&#xD;&#xA;https://mangatax.subscan.io/xcm_message?address=&amp;fromChain=2110&amp;toChain=all&amp;startDate&amp;endDate&amp;startBlock=&amp;endBlock=&amp;timeType=date&amp;result=failed&amp;protocol=all&#xD;&#xA;&#xD;&#xA;Thankss! &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41349" PostHistoryTypeId="1" PostId="10433" RevisionGUID="fd43722e-01fa-41ed-a934-0ab5360328ef" CreationDate="2023-11-10T16:09:53.833" UserId="357" Text="Tokens lost when XCM MessageProcessor &quot;Processing failed&quot;?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41350" PostHistoryTypeId="3" PostId="10433" RevisionGUID="fd43722e-01fa-41ed-a934-0ab5360328ef" CreationDate="2023-11-10T16:09:53.833" UserId="357" Text="|xcm|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41351" PostHistoryTypeId="2" PostId="10434" RevisionGUID="0829e9e7-3efe-4e8d-9984-8bcc8f8fe3dc" CreationDate="2023-11-10T17:15:39.760" UserId="2540" Text="I am following guide at https://docs.substrate.io/quick-start/start-a-node/&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;cd substrate-node-template&#xD;&#xA;git switch -c my-learning-branch-2023-11-10&#xD;&#xA;cargo build --package node-template --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'&#xD;&#xA;info: latest update on 2023-11-10, rust version 1.75.0-nightly (0f44eb32f 2023-11-09)&#xD;&#xA;info: downloading component 'cargo'&#xD;&#xA;info: downloading component 'clippy'&#xD;&#xA;info: downloading component 'rust-analyzer'&#xD;&#xA;info: downloading component 'rust-src'&#xD;&#xA;info: downloading component 'rust-std' for 'wasm32-unknown-unknown'&#xD;&#xA;info: downloading component 'rust-std'&#xD;&#xA;info: downloading component 'rustc'&#xD;&#xA;info: downloading component 'rustc-dev'&#xD;&#xA;info: downloading component 'rustfmt'&#xD;&#xA;info: downloading component 'rust-docs'&#xD;&#xA;info: removing previous version of component 'rust-src'&#xD;&#xA;info: removing previous version of component 'rust-std' for 'wasm32-unknown-unknown'&#xD;&#xA;info: removing previous version of component 'cargo'&#xD;&#xA;info: removing previous version of component 'clippy'&#xD;&#xA;info: removing previous version of component 'rust-docs'&#xD;&#xA;info: removing previous version of component 'rust-std'&#xD;&#xA;info: removing previous version of component 'rustc'&#xD;&#xA;info: removing previous version of component 'rustfmt'&#xD;&#xA;info: installing component 'cargo'&#xD;&#xA;info: installing component 'clippy'&#xD;&#xA;info: installing component 'rust-analyzer'&#xD;&#xA;info: installing component 'rust-src'&#xD;&#xA;info: installing component 'rust-std' for 'wasm32-unknown-unknown'&#xD;&#xA;info: installing component 'rust-std'&#xD;&#xA;info: installing component 'rustc'&#xD;&#xA;info: installing component 'rustc-dev'&#xD;&#xA;info: installing component 'rustfmt'&#xD;&#xA;info: installing component 'rust-docs'&#xD;&#xA;warning: virtual workspace defaulting to `resolver = &quot;1&quot;` despite one or more workspace members being on edition 2021 which implies `resolver = &quot;2&quot;`&#xD;&#xA;note: to keep the current resolver, specify `workspace.resolver = &quot;1&quot;` in the workspace root's manifest&#xD;&#xA;note: to use the edition 2021 resolver, specify `workspace.resolver = &quot;2&quot;` in the workspace root's manifest&#xD;&#xA;note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate.git`&#xD;&#xA;    Updating crates.io index&#xD;&#xA;... [trim due to 30_000 chars limit]&#xD;&#xA;  Downloaded 400 crates (38.5 MB) in 2m 24s (largest was `librocksdb-sys` at 6.3 MB)&#xD;&#xA;   Compiling proc-macro2 v1.0.66&#xD;&#xA;   Compiling unicode-ident v1.0.11&#xD;&#xA;   Compiling libc v0.2.147&#xD;&#xA;   Compiling cfg-if v1.0.0&#xD;&#xA;   Compiling version_check v0.9.4&#xD;&#xA;   Compiling autocfg v1.1.0&#xD;&#xA;   Compiling serde v1.0.176&#xD;&#xA;   Compiling serde_derive v1.0.176&#xD;&#xA;   Compiling memchr v2.5.0&#xD;&#xA;   Compiling typenum v1.16.0&#xD;&#xA;   Compiling syn v1.0.109&#xD;&#xA;   Compiling thiserror v1.0.44&#xD;&#xA;   Compiling generic-array v0.14.7&#xD;&#xA;   Compiling once_cell v1.18.0&#xD;&#xA;   Compiling log v0.4.19&#xD;&#xA;   Compiling quote v1.0.32&#xD;&#xA;   Compiling syn v2.0.27&#xD;&#xA;   Compiling subtle v2.4.1&#xD;&#xA;   Compiling bytes v1.4.0&#xD;&#xA;   Compiling jobserver v0.1.26&#xD;&#xA;   Compiling cc v1.0.79&#xD;&#xA;   Compiling getrandom v0.2.10&#xD;&#xA;   Compiling smallvec v1.11.0&#xD;&#xA;   Compiling pin-project-lite v0.2.10&#xD;&#xA;   Compiling futures-core v0.3.28&#xD;&#xA;   Compiling scopeguard v1.2.0&#xD;&#xA;   Compiling futures-sink v0.3.28&#xD;&#xA;   Compiling futures-io v0.3.28&#xD;&#xA;   Compiling num_cpus v1.16.0&#xD;&#xA;   Compiling slab v0.4.8&#xD;&#xA;   Compiling futures-task v0.3.28&#xD;&#xA;   Compiling futures-channel v0.3.28&#xD;&#xA;   Compiling lock_api v0.4.10&#xD;&#xA;   Compiling futures-util v0.3.28&#xD;&#xA;   Compiling byteorder v1.4.3&#xD;&#xA;   Compiling rand_core v0.6.4&#xD;&#xA;   Compiling pin-utils v0.1.0&#xD;&#xA;   Compiling anyhow v1.0.72&#xD;&#xA;   Compiling cpufeatures v0.2.9&#xD;&#xA;   Compiling toml v0.5.11&#xD;&#xA;   Compiling ahash v0.7.6&#xD;&#xA;   Compiling parking_lot_core v0.9.8&#xD;&#xA;   Compiling arrayvec v0.7.4&#xD;&#xA;   Compiling ppv-lite86 v0.2.17&#xD;&#xA;   Compiling const-oid v0.9.4&#xD;&#xA;   Compiling indexmap v1.9.3&#xD;&#xA;   Compiling parking_lot v0.12.1&#xD;&#xA;   Compiling rand_chacha v0.3.1&#xD;&#xA;   Compiling tinyvec_macros v0.1.1&#xD;&#xA;   Compiling tinyvec v1.6.0&#xD;&#xA;   Compiling opaque-debug v0.3.0&#xD;&#xA;   Compiling pkg-config v0.3.27&#xD;&#xA;   Compiling rand v0.8.5&#xD;&#xA;   Compiling unicode-bidi v0.3.13&#xD;&#xA;   Compiling percent-encoding v2.3.0&#xD;&#xA;   Compiling unicode-normalization v0.1.22&#xD;&#xA;   Compiling form_urlencoded v1.2.0&#xD;&#xA;   Compiling getrandom v0.1.16&#xD;&#xA;   Compiling hashbrown v0.12.3&#xD;&#xA;   Compiling static_assertions v1.1.0&#xD;&#xA;   Compiling crunchy v0.2.2&#xD;&#xA;   Compiling idna v0.4.0&#xD;&#xA;   Compiling arrayref v0.3.7&#xD;&#xA;   Compiling either v1.9.0&#xD;&#xA;   Compiling rand_core v0.5.1&#xD;&#xA;   Compiling url v2.4.0&#xD;&#xA;   Compiling tracing-core v0.1.31&#xD;&#xA;   Compiling keccak v0.1.4&#xD;&#xA;   Compiling unicode-xid v0.2.4&#xD;&#xA;   Compiling constant_time_eq v0.2.6&#xD;&#xA;   Compiling rustix v0.38.4&#xD;&#xA;   Compiling itoa v1.0.9&#xD;&#xA;   Compiling aho-corasick v1.0.2&#xD;&#xA;   Compiling ahash v0.8.3&#xD;&#xA;   Compiling instant v0.1.12&#xD;&#xA;   Compiling regex-syntax v0.7.4&#xD;&#xA;   Compiling blake2b_simd v1.0.1&#xD;&#xA;   Compiling rand_chacha v0.2.2&#xD;&#xA;   Compiling zstd-sys v2.0.8+zstd.1.5.5&#xD;&#xA;   Compiling zeroize_derive v1.4.2&#xD;&#xA;   Compiling thiserror-impl v1.0.44&#xD;&#xA;   Compiling futures-macro v0.3.28&#xD;&#xA;   Compiling tracing-attributes v0.1.26&#xD;&#xA;   Compiling crc32fast v1.3.2&#xD;&#xA;   Compiling rand v0.7.3&#xD;&#xA;   Compiling zeroize v1.6.0&#xD;&#xA;   Compiling regex-automata v0.3.3&#xD;&#xA;   Compiling block-buffer v0.10.4&#xD;&#xA;   Compiling crypto-common v0.1.6&#xD;&#xA;   Compiling proc-macro-crate v1.1.3&#xD;&#xA;   Compiling digest v0.10.7&#xD;&#xA;   Compiling digest v0.9.0&#xD;&#xA;   Compiling sha2 v0.10.7&#xD;&#xA;   Compiling block-buffer v0.9.0&#xD;&#xA;   Compiling sha3 v0.10.8&#xD;&#xA;   Compiling sha2 v0.9.9&#xD;&#xA;   Compiling curve25519-dalek v3.2.0&#xD;&#xA;   Compiling tracing v0.1.37&#xD;&#xA;   Compiling num-traits v0.2.16&#xD;&#xA;   Compiling lazy_static v1.4.0&#xD;&#xA;   Compiling serde_json v1.0.104&#xD;&#xA;   Compiling hashbrown v0.13.2&#xD;&#xA;   Compiling paste v1.0.14&#xD;&#xA;   Compiling regex v1.9.1&#xD;&#xA;   Compiling futures-executor v0.3.28&#xD;&#xA;   Compiling futures v0.3.28&#xD;&#xA;   Compiling parity-scale-codec-derive v3.6.4&#xD;&#xA;   Compiling impl-trait-for-tuples v0.2.2&#xD;&#xA;   Compiling bitflags v1.3.2&#xD;&#xA;   Compiling bs58 v0.4.0&#xD;&#xA;   Compiling stable_deref_trait v1.2.0&#xD;&#xA;   Compiling fallible-iterator v0.2.0&#xD;&#xA;   Compiling byte-slice-cast v1.2.2&#xD;&#xA;   Compiling gimli v0.27.3&#xD;&#xA;   Compiling cranelift-entity v0.95.1&#xD;&#xA;   Compiling crossbeam-utils v0.8.16&#xD;&#xA;   Compiling target-lexicon v0.12.10&#xD;&#xA;   Compiling cranelift-isle v0.95.1&#xD;&#xA;   Compiling io-lifetimes v1.0.11&#xD;&#xA;   Compiling cranelift-codegen-shared v0.95.1&#xD;&#xA;   Compiling cranelift-codegen-meta v0.95.1&#xD;&#xA;   Compiling parity-scale-codec v3.6.4&#xD;&#xA;   Compiling ryu v1.0.15&#xD;&#xA;   Compiling bitflags v2.3.3&#xD;&#xA;   Compiling scale-info-derive v2.9.0&#xD;&#xA;   Compiling derive_more v0.99.17&#xD;&#xA;   Compiling wasmparser v0.102.0&#xD;&#xA;   Compiling cranelift-codegen v0.95.1&#xD;&#xA;   Compiling fxhash v0.2.1&#xD;&#xA;   Compiling slice-group-by v0.3.1&#xD;&#xA;   Compiling signature v1.6.4&#xD;&#xA;   Compiling scale-info v2.9.0&#xD;&#xA;   Compiling ed25519 v1.5.3&#xD;&#xA;   Compiling cranelift-bforest v0.95.1&#xD;&#xA;   Compiling regalloc2 v0.6.1&#xD;&#xA;   Compiling object v0.30.4&#xD;&#xA;   Compiling memoffset v0.9.0&#xD;&#xA;   Compiling linux-raw-sys v0.4.3&#xD;&#xA;   Compiling rustix v0.36.15&#xD;&#xA;   Compiling bumpalo v3.13.0&#xD;&#xA;   Compiling sp-std v8.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling base64 v0.13.1&#xD;&#xA;   Compiling ed25519-dalek v1.0.1&#xD;&#xA;   Compiling errno v0.3.1&#xD;&#xA;   Compiling crossbeam-epoch v0.9.15&#xD;&#xA;   Compiling wasmtime-types v8.0.1&#xD;&#xA;   Compiling linux-raw-sys v0.1.4&#xD;&#xA;   Compiling parking_lot_core v0.8.6&#xD;&#xA;   Compiling hex v0.4.3&#xD;&#xA;   Compiling rustix v0.37.23&#xD;&#xA;   Compiling wasmtime-environ v8.0.1&#xD;&#xA;   Compiling Inflector v0.11.4&#xD;&#xA;   Compiling itertools v0.10.5&#xD;&#xA;   Compiling memoffset v0.8.0&#xD;&#xA;   Compiling base64 v0.21.2&#xD;&#xA;   Compiling zstd-safe v5.0.2+zstd.1.5.2&#xD;&#xA;   Compiling linux-raw-sys v0.3.8&#xD;&#xA;   Compiling is-terminal v0.4.9&#xD;&#xA;   Compiling wasmtime-runtime v8.0.1&#xD;&#xA;   Compiling generic-array v0.12.4&#xD;&#xA;   Compiling humantime v2.1.0&#xD;&#xA;   Compiling cpp_demangle v0.3.5&#xD;&#xA;   Compiling rustc-demangle v0.1.23&#xD;&#xA;   Compiling termcolor v1.2.0&#xD;&#xA;   Compiling rayon-core v1.11.0&#xD;&#xA;   Compiling env_logger v0.10.0&#xD;&#xA;   Compiling memfd v0.6.3&#xD;&#xA;   Compiling libsecp256k1-core v0.3.0&#xD;&#xA;   Compiling parking_lot v0.11.2&#xD;&#xA;   Compiling crossbeam-deque v0.8.3&#xD;&#xA;   Compiling wasmtime-jit-debug v8.0.1&#xD;&#xA;   Compiling uint v0.9.5&#xD;&#xA;   Compiling crossbeam-channel v0.5.8&#xD;&#xA;   Compiling blake2 v0.10.6&#xD;&#xA;   Compiling bincode v1.3.3&#xD;&#xA;   Compiling psm v0.1.21&#xD;&#xA;   Compiling dirs-sys-next v0.1.2&#xD;&#xA;   Compiling time v0.1.45&#xD;&#xA;   Compiling wasmtime-asm-macros v8.0.1&#xD;&#xA;   Compiling byte-tools v0.3.1&#xD;&#xA;   Compiling wasmtime-cache v8.0.1&#xD;&#xA;   Compiling ref-cast v1.0.19&#xD;&#xA;   Compiling regex-syntax v0.6.29&#xD;&#xA;   Compiling iana-time-zone v0.1.57&#xD;&#xA;   Compiling rustc-hash v1.1.0&#xD;&#xA;   Compiling chrono v0.4.26&#xD;&#xA;   Compiling block-padding v0.1.5&#xD;&#xA;   Compiling cranelift-native v0.95.1&#xD;&#xA;   Compiling cranelift-frontend v0.95.1&#xD;&#xA;   Compiling wasmtime-cranelift-shared v8.0.1&#xD;&#xA;   Compiling directories-next v2.0.0&#xD;&#xA;   Compiling cranelift-wasm v0.95.1&#xD;&#xA;   Compiling regex-automata v0.1.10&#xD;&#xA;   Compiling file-per-thread-logger v0.1.6&#xD;&#xA;   Compiling digest v0.8.1&#xD;&#xA;   Compiling addr2line v0.19.0&#xD;&#xA;   Compiling hmac v0.12.1&#xD;&#xA;   Compiling ref-cast-impl v1.0.19&#xD;&#xA;   Compiling impl-serde v0.4.0&#xD;&#xA;   Compiling wasmtime-jit-icache-coherence v8.0.1&#xD;&#xA;   Compiling wasmtime v8.0.1&#xD;&#xA;   Compiling rustc-hex v2.1.0&#xD;&#xA;   Compiling wasmtime-jit v8.0.1&#xD;&#xA;   Compiling rayon v1.7.0&#xD;&#xA;   Compiling matchers v0.0.1&#xD;&#xA;   Compiling wasmtime-cranelift v8.0.1&#xD;&#xA;   Compiling block-buffer v0.7.3&#xD;&#xA;   Compiling libsecp256k1-gen-ecmult v0.3.0&#xD;&#xA;   Compiling libsecp256k1-gen-genmult v0.3.0&#xD;&#xA;   Compiling tracing-log v0.1.3&#xD;&#xA;   Compiling sharded-slab v0.1.4&#xD;&#xA;   Compiling crypto-mac v0.11.1&#xD;&#xA;   Compiling crypto-mac v0.8.0&#xD;&#xA;   Compiling sp-debug-derive v8.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling tracing-serde v0.1.3&#xD;&#xA;   Compiling secp256k1-sys v0.6.1&#xD;&#xA;   Compiling thread_local v1.1.7&#xD;&#xA;   Compiling ansi_term v0.12.1&#xD;&#xA;   Compiling fake-simd v0.1.2&#xD;&#xA;   Compiling opaque-debug v0.2.3&#xD;&#xA;   Compiling hash-db v0.16.0&#xD;&#xA;   Compiling sp-storage v13.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling sha2 v0.8.2&#xD;&#xA;   Compiling tracing-subscriber v0.2.25&#xD;&#xA;   Compiling hmac v0.8.1&#xD;&#xA;   Compiling libsecp256k1 v0.7.1&#xD;&#xA;   Compiling fixed-hash v0.8.0&#xD;&#xA;   Compiling curve25519-dalek v2.1.3&#xD;&#xA;   Compiling ss58-registry v1.41.0&#xD;&#xA;   Compiling impl-codec v0.6.0&#xD;&#xA;   Compiling merlin v2.0.1&#xD;&#xA;   Compiling rustversion v1.0.14&#xD;&#xA;   Compiling arrayvec v0.5.2&#xD;&#xA;   Compiling environmental v1.1.4&#xD;&#xA;   Compiling sp-externalities v0.19.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling schnorrkel v0.9.1&#xD;&#xA;   Compiling sp-tracing v10.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling primitive-types v0.12.1&#xD;&#xA;   Compiling hmac-drbg v0.3.0&#xD;&#xA;   Compiling hmac v0.11.0&#xD;&#xA;   Compiling pbkdf2 v0.8.0&#xD;&#xA;   Compiling sp-runtime-interface-proc-macro v11.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling pbkdf2 v0.11.0&#xD;&#xA;   Compiling twox-hash v1.6.3&#xD;&#xA;   Compiling dyn-clonable-impl v0.9.0&#xD;&#xA;   Compiling num-format v0.4.4&#xD;&#xA;   Compiling dyn-clone v1.0.12&#xD;&#xA;   Compiling dyn-clonable v0.9.0&#xD;&#xA;   Compiling sp-core-hashing v9.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling tiny-bip39 v1.0.0&#xD;&#xA;   Compiling substrate-bip39 v0.4.4&#xD;&#xA;   Compiling ed25519-zebra v3.1.0&#xD;&#xA;   Compiling bounded-collections v0.1.8&#xD;&#xA;   Compiling hash256-std-hasher v0.15.2&#xD;&#xA;   Compiling secrecy v0.8.0&#xD;&#xA;   Compiling array-bytes v6.1.0&#xD;&#xA;   Compiling nohash-hasher v0.2.0&#xD;&#xA;   Compiling backtrace v0.3.68&#xD;&#xA;   Compiling adler v1.0.2&#xD;&#xA;   Compiling miniz_oxide v0.7.1&#xD;&#xA;   Compiling addr2line v0.20.0&#xD;&#xA;   Compiling object v0.31.1&#xD;&#xA;   Compiling trie-root v0.18.0&#xD;&#xA;   Compiling memory-db v0.32.0&#xD;&#xA;   Compiling trie-db v0.27.1&#xD;&#xA;   Compiling schnellru v0.2.1&#xD;&#xA;   Compiling sp-io v23.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling integer-sqrt v0.1.5&#xD;&#xA;   Compiling sp-arithmetic v16.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling async-trait v0.1.72&#xD;&#xA;   Compiling fnv v1.0.7&#xD;&#xA;   Compiling tokio v1.29.1&#xD;&#xA;   Compiling tokio-macros v2.1.0&#xD;&#xA;   Compiling mio v0.8.8&#xD;&#xA;   Compiling signal-hook-registry v1.4.1&#xD;&#xA;   Compiling sp-panic-handler v8.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling socket2 v0.4.9&#xD;&#xA;   Compiling expander v2.0.0&#xD;&#xA;   Compiling parity-wasm v0.45.0&#xD;&#xA;   Compiling fs-err v2.9.0&#xD;&#xA;   Compiling heck v0.4.1&#xD;&#xA;   Compiling sp-core-hashing-proc-macro v9.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling frame-metadata v16.0.0&#xD;&#xA;   Compiling sp-version-proc-macro v8.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling sp-metadata-ir v0.1.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling sp-api-proc-macro v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling futures-timer v3.0.2&#xD;&#xA;   Compiling proc-macro-error-attr v1.0.4&#xD;&#xA;   Compiling asynchronous-codec v0.6.2&#xD;&#xA;   Compiling proc-macro-error v1.0.4&#xD;&#xA;   Compiling data-encoding v2.4.0&#xD;&#xA;   Compiling unsigned-varint v0.7.1&#xD;&#xA;   Compiling blake3 v1.4.1&#xD;&#xA;   Compiling http v0.2.9&#xD;&#xA;   Compiling synstructure v0.12.6&#xD;&#xA;   Compiling data-encoding-macro-internal v0.1.11&#xD;&#xA;   Compiling constant_time_eq v0.3.0&#xD;&#xA;   Compiling multihash-derive v0.8.1&#xD;&#xA;   Compiling data-encoding-macro v0.1.13&#xD;&#xA;   Compiling blake2s_simd v1.0.1&#xD;&#xA;   Compiling core2 v0.4.0&#xD;&#xA;   Compiling base-x v0.2.11&#xD;&#xA;   Compiling httparse v1.8.0&#xD;&#xA;   Compiling multibase v0.9.1&#xD;&#xA;   Compiling zstd-safe v6.0.6&#xD;&#xA;   Compiling pin-project-internal v1.1.2&#xD;&#xA;   Compiling quick-protobuf v0.8.1&#xD;&#xA;   Compiling ring v0.16.20&#xD;&#xA;   Compiling tokio-util v0.7.8&#xD;&#xA;   Compiling tower-service v0.3.2&#xD;&#xA;   Compiling http-body v0.4.5&#xD;&#xA;   Compiling void v1.0.2&#xD;&#xA;   Compiling try-lock v0.2.4&#xD;&#xA;   Compiling want v0.3.1&#xD;&#xA;   Compiling pin-project v1.1.2&#xD;&#xA;   Compiling h2 v0.3.20&#xD;&#xA;   Compiling rw-stream-sink v0.3.0&#xD;&#xA;   Compiling multistream-select v0.12.1&#xD;&#xA;   Compiling httpdate v1.0.2&#xD;&#xA;   Compiling untrusted v0.7.1&#xD;&#xA;   Compiling prometheus v0.13.3&#xD;&#xA;   Compiling spin v0.5.2&#xD;&#xA;   Compiling semver v1.0.18&#xD;&#xA;   Compiling kvdb v0.13.0&#xD;&#xA;   Compiling vcpkg v0.2.15&#xD;&#xA;   Compiling libz-sys v1.1.12&#xD;&#xA;   Compiling concurrent-queue v2.2.0&#xD;&#xA;   Compiling event-listener v2.5.3&#xD;&#xA;   Compiling wasm-bindgen-shared v0.2.87&#xD;&#xA;   Compiling async-channel v1.9.0&#xD;&#xA;   Compiling sp-database v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling libp2p-swarm-derive v0.32.0&#xD;&#xA;   Compiling wasm-instrument v0.3.0&#xD;&#xA;   Compiling sc-executor-wasmtime v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling flate2 v1.0.26&#xD;&#xA;   Compiling sc-utils v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling hyper v0.14.27&#xD;&#xA;   Compiling netlink-packet-utils v0.5.2&#xD;&#xA;   Compiling sha-1 v0.9.8&#xD;&#xA;   Compiling universal-hash v0.4.1&#xD;&#xA;   Compiling cipher v0.3.0&#xD;&#xA;   Compiling platforms v3.0.2&#xD;&#xA;   Compiling wasm-bindgen-backend v0.2.87&#xD;&#xA;   Compiling soketto v0.7.1&#xD;&#xA;   Compiling netlink-packet-core v0.4.2&#xD;&#xA;   Compiling sct v0.7.0&#xD;&#xA;   Compiling tiny-keccak v2.0.2&#xD;&#xA;   Compiling ipnet v2.8.0&#xD;&#xA;   Compiling proc-macro-hack v0.5.20+deprecated&#xD;&#xA;   Compiling linked-hash-map v0.5.6&#xD;&#xA;   Compiling wasm-bindgen-macro-support v0.2.87&#xD;&#xA;   Compiling netlink-sys v0.8.5&#xD;&#xA;   Compiling wasm-bindgen v0.2.87&#xD;&#xA;   Compiling matches v0.1.10&#xD;&#xA;   Compiling idna v0.2.3&#xD;&#xA;   Compiling substrate-prometheus-endpoint v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling netlink-proto v0.10.0&#xD;&#xA;   Compiling wasm-bindgen-macro v0.2.87&#xD;&#xA;   Compiling curve25519-dalek v4.0.0-rc.1&#xD;&#xA;   Compiling netlink-packet-route v0.12.0&#xD;&#xA;   Compiling polyval v0.5.3&#xD;&#xA;   Compiling webpki v0.22.0&#xD;&#xA;   Compiling rustc_version v0.4.0&#xD;&#xA;   Compiling enum-as-inner v0.5.1&#xD;&#xA;   Compiling nix v0.24.3&#xD;&#xA;   Compiling aead v0.4.3&#xD;&#xA;   Compiling rustls v0.20.8&#xD;&#xA;   Compiling match_cfg v0.1.0&#xD;&#xA;   Compiling hostname v0.3.1&#xD;&#xA;   Compiling trust-dns-proto v0.22.0&#xD;&#xA;   Compiling snow v0.9.2&#xD;&#xA;   Compiling const-random-macro v0.1.15&#xD;&#xA;   Compiling rtnetlink v0.10.1&#xD;&#xA;   Compiling ghash v0.4.4&#xD;&#xA;   Compiling aes v0.7.5&#xD;&#xA;   Compiling ctr v0.8.0&#xD;&#xA;   Compiling chacha20 v0.8.2&#xD;&#xA;   Compiling poly1305 v0.7.2&#xD;&#xA;   Compiling quick-error v1.2.3&#xD;&#xA;   Compiling aes-gcm v0.9.4&#xD;&#xA;   Compiling resolv-conf v0.7.0&#xD;&#xA;   Compiling js-sys v0.3.64&#xD;&#xA;   Compiling chacha20poly1305 v0.9.1&#xD;&#xA;   Compiling lru-cache v0.1.2&#xD;&#xA;   Compiling pin-project-lite v0.1.12&#xD;&#xA;   Compiling quicksink v0.1.2&#xD;&#xA;   Compiling trust-dns-resolver v0.22.0&#xD;&#xA;   Compiling futures-rustls v0.22.2&#xD;&#xA;   Compiling wasm-bindgen-futures v0.4.37&#xD;&#xA;   Compiling webpki-roots v0.22.6&#xD;&#xA;   Compiling quick-protobuf-codec v0.1.0&#xD;&#xA;   Compiling yamux v0.10.2&#xD;&#xA;   Compiling lru v0.10.1&#xD;&#xA;   Compiling x25519-dalek v1.1.1&#xD;&#xA;   Compiling derive-syn-parse v0.1.5&#xD;&#xA;   Compiling if-watch v3.0.1&#xD;&#xA;   Compiling macro_magic_core_macros v0.4.2&#xD;&#xA;   Compiling predicates-core v1.0.6&#xD;&#xA;   Compiling parity-send-wrapper v0.1.0&#xD;&#xA;   Compiling const-random v0.1.15&#xD;&#xA;   Compiling float-cmp v0.9.0&#xD;&#xA;   Compiling der v0.7.7&#xD;&#xA;   Compiling termtree v0.4.1&#xD;&#xA;   Compiling difflib v0.4.0&#xD;&#xA;   Compiling normalize-line-endings v0.3.0&#xD;&#xA;   Compiling macro_magic_core v0.4.2&#xD;&#xA;   Compiling predicates v2.1.5&#xD;&#xA;   Compiling predicates-tree v1.0.9&#xD;&#xA;   Compiling wasm-timer v0.2.5&#xD;&#xA;   Compiling mockall_derive v0.11.4&#xD;&#xA;   Compiling ff v0.13.0&#xD;&#xA;   Compiling downcast v0.11.0&#xD;&#xA;   Compiling fragile v2.0.0&#xD;&#xA;   Compiling base16ct v0.2.0&#xD;&#xA;   Compiling sec1 v0.7.3&#xD;&#xA;   Compiling group v0.13.0&#xD;&#xA;   Compiling macro_magic_macros v0.4.2&#xD;&#xA;   Compiling finality-grandpa v0.16.2&#xD;&#xA;   Compiling crypto-bigint v0.5.2&#xD;&#xA;   Compiling proc-macro-warning v0.4.1&#xD;&#xA;   Compiling spki v0.7.2&#xD;&#xA;   Compiling rfc6979 v0.4.0&#xD;&#xA;   Compiling signature v2.1.0&#xD;&#xA;   Compiling frame-support-procedural-tools-derive v3.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling elliptic-curve v0.13.5&#xD;&#xA;   Compiling ecdsa v0.16.8&#xD;&#xA;   Compiling cfg-expr v0.15.3&#xD;&#xA;   Compiling frame-support-procedural-tools v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling macro_magic v0.4.2&#xD;&#xA;   Compiling fastrand v2.0.0&#xD;&#xA;   Compiling frame-support-procedural v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling mockall v0.11.4&#xD;&#xA;   Compiling k256 v0.13.1&#xD;&#xA;   Compiling tt-call v1.0.9&#xD;&#xA;   Compiling linked_hash_set v0.1.4&#xD;&#xA;   Compiling partial_sort v0.2.0&#xD;&#xA;   Compiling ip_network v0.4.1&#xD;&#xA;   Compiling prost-derive v0.11.9&#xD;&#xA;   Compiling tempfile v3.7.0&#xD;&#xA;   Compiling prettyplease v0.1.25&#xD;&#xA;   Compiling fixedbitset v0.4.2&#xD;&#xA;   Compiling scratch v1.0.7&#xD;&#xA;   Compiling prost v0.11.9&#xD;&#xA;   Compiling glob v0.3.1&#xD;&#xA;   Compiling petgraph v0.6.3&#xD;&#xA;   Compiling prost-types v0.11.9&#xD;&#xA;   Compiling clang-sys v1.6.1&#xD;&#xA;   Compiling which v4.4.0&#xD;&#xA;   Compiling beef v0.5.2&#xD;&#xA;   Compiling link-cplusplus v1.0.9&#xD;&#xA;   Compiling bstr v1.6.0&#xD;&#xA;   Compiling multimap v0.8.3&#xD;&#xA;   Compiling unicode-width v0.1.10&#xD;&#xA;   Compiling tower-layer v0.3.2&#xD;&#xA;   Compiling prettyplease v0.2.12&#xD;&#xA;   Compiling codespan-reporting v0.11.1&#xD;&#xA;   Compiling globset v0.4.12&#xD;&#xA;   Compiling prost-build v0.11.9&#xD;&#xA;   Compiling jsonrpsee-types v0.16.2&#xD;&#xA;   Compiling memmap2 v0.5.10&#xD;&#xA;   Compiling minimal-lexical v0.2.1&#xD;&#xA;   Compiling cxxbridge-flags v1.0.102&#xD;&#xA;   Compiling cxx v1.0.102&#xD;&#xA;   Compiling nom v7.1.3&#xD;&#xA;   Compiling jsonrpsee-core v0.16.2&#xD;&#xA;   Compiling cxx-build v1.0.102&#xD;&#xA;   Compiling tower v0.4.13&#xD;&#xA;   Compiling tokio-stream v0.1.14&#xD;&#xA;   Compiling strum_macros v0.24.3&#xD;&#xA;   Compiling libloading v0.7.4&#xD;&#xA;   Compiling bindgen v0.65.1&#xD;&#xA;   Compiling cexpr v0.6.0&#xD;&#xA;   Compiling jsonrpsee-server v0.16.2&#xD;&#xA;   Compiling jsonrpsee-proc-macros v0.16.2&#xD;&#xA;   Compiling tikv-jemalloc-sys v0.5.3+5.3.0-patched&#xD;&#xA;   Compiling peeking_take_while v0.1.2&#xD;&#xA;   Compiling lazycell v1.3.0&#xD;&#xA;   Compiling shlex v1.1.0&#xD;&#xA;   Compiling jsonrpsee v0.16.2&#xD;&#xA;   Compiling wasm-opt-sys v0.112.0&#xD;&#xA;   Compiling sc-chain-spec-derive v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling lz4-sys v1.9.4&#xD;&#xA;   Compiling cfg_aliases v0.1.1&#xD;&#xA;   Compiling cxxbridge-macro v1.0.102&#xD;&#xA;   Compiling snap v1.1.0&#xD;&#xA;   Compiling wasm-opt-cxx-sys v0.112.0&#xD;&#xA;   Compiling num-integer v0.1.45&#xD;&#xA;   Compiling equivalent v1.0.1&#xD;&#xA;   Compiling bytemuck v1.13.1&#xD;&#xA;   Compiling camino v1.1.6&#xD;&#xA;   Compiling hashbrown v0.14.0&#xD;&#xA;   Compiling safe_arch v0.7.1&#xD;&#xA;   Compiling indexmap v2.0.0&#xD;&#xA;   Compiling static_init_macro v1.0.2&#xD;&#xA;   Compiling serde_spanned v0.6.3&#xD;&#xA;   Compiling toml_datetime v0.6.3&#xD;&#xA;   Compiling fs2 v0.4.3&#xD;&#xA;   Compiling matrixmultiply v0.3.7&#xD;&#xA;   Compiling num-rational v0.4.1&#xD;&#xA;   Compiling winnow v0.5.1&#xD;&#xA;   Compiling utf8parse v0.2.1&#xD;&#xA;   Compiling semver-parser v0.7.0&#xD;&#xA;   Compiling siphasher v0.3.10&#xD;&#xA;   Compiling ucd-trie v0.1.6&#xD;&#xA;   Compiling semver v0.6.0&#xD;&#xA;   Compiling pest v2.7.1&#xD;&#xA;   Compiling anstyle-parse v0.2.1&#xD;&#xA;   Compiling librocksdb-sys v0.11.0+8.1.1&#xD;&#xA;   Compiling wide v0.7.11&#xD;&#xA;   Compiling toml_edit v0.19.14&#xD;&#xA;   Compiling static_init v1.0.3&#xD;&#xA;   Compiling strum v0.24.1&#xD;&#xA;   Compiling sc-network-sync v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling sc-network-light v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling fork-tree v3.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling num-complex v0.4.3&#xD;&#xA;   Compiling approx v0.5.1&#xD;&#xA;   Compiling sc-tracing-proc-macro v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling cargo-platform v0.1.3&#xD;&#xA;   Compiling atty v0.2.14&#xD;&#xA;   Compiling rustls v0.21.5&#xD;&#xA;   Compiling colorchoice v1.0.0&#xD;&#xA;   Compiling rawpointer v0.2.1&#xD;&#xA;   Compiling sc-sysinfo v6.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;   Compiling anstyle-query v1.0.0&#xD;&#xA;   Compiling anstyle v1.0.1&#xD;&#xA;   Compiling same-file v1.0.6&#xD;&#xA;   Compiling http-range-header v0.3.1&#xD;&#xA;   Compiling walkdir v2.3.3&#xD;&#xA;   Compiling anstream v0.5.0&#xD;&#xA;   Compiling tower-http v0.4.3&#xD;&#xA;   Compiling cargo_metadata v0.15.4&#xD;&#xA;   Compiling simba v0.8.1&#xD;&#xA;error: failed to run custom build command for `sc-network-bitswap v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/jan/git/substrate-node-template/target/release/build/sc-network-bitswap-1b3aa1fed6bfabbf/build-script-build` (exit status: 101)&#xD;&#xA;  --- stderr&#xD;&#xA;  thread 'main' panicked at /home/jan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prost-build-0.11.9/src/lib.rs:1457:10:&#xD;&#xA;  Could not find `protoc` installation and this build crate cannot proceed without&#xD;&#xA;      this knowledge. If `protoc` is installed and this crate had trouble finding&#xD;&#xA;      it, you can set the `PROTOC` environment variable with the specific path to your&#xD;&#xA;      installed `protoc` binary.If you're on debian, try `apt-get install protobuf-compiler` or download it from https://github.com/protocolbuffers/protobuf/releases&#xD;&#xA;&#xD;&#xA;  For more information: https://docs.rs/prost-build/#sourcing-protoc&#xD;&#xA;&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to proceed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41353" PostHistoryTypeId="1" PostId="10434" RevisionGUID="0829e9e7-3efe-4e8d-9984-8bcc8f8fe3dc" CreationDate="2023-11-10T17:15:39.760" UserId="2540" Text="node-template compilation failed on: sc-network-bitswap v0.10.0-dev" ContentLicense="CC BY-SA 4.0" />
  <row Id="41354" PostHistoryTypeId="3" PostId="10434" RevisionGUID="0829e9e7-3efe-4e8d-9984-8bcc8f8fe3dc" CreationDate="2023-11-10T17:15:39.760" UserId="2540" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41355" PostHistoryTypeId="2" PostId="10435" RevisionGUID="0a2ee489-2f65-4f63-b731-1aaaf9819624" CreationDate="2023-11-10T18:49:54.957" UserId="372" Text="Substrate's Aura implementation has [an InherentDataProvider](https://paritytech.github.io/polkadot-sdk/master/sc_consensus_aura/struct.InherentDataProvider.html) that includes the Aura slot number into the runtime. However, it seems that this code is not consistently used throughout the ecosystem.&#xD;&#xA;&#xD;&#xA;For example, In the Substrate Node Template, it is [included](https://github.com/paritytech/polkadot-sdk/blob/6b7be115fd523057d01cea46e9680a62a0b08d97/substrate/bin/node-template/node/src/service.rs#L120). But in the Parachain Template, it is [Not included](https://github.com/paritytech/polkadot-sdk/blob/6b7be115fd523057d01cea46e9680a62a0b08d97/cumulus/parachain-template/node/src/service.rs#L349-L352).&#xD;&#xA;&#xD;&#xA;I _think_ I once read Andre Silva writing deep in a PR discussion that this inherent was no longer necessary or would become unnecessary at some point. But I can't seem to find that now.&#xD;&#xA;&#xD;&#xA;So my question is, **When is it necessary or advisable in include the aura slot inherent**?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41357" PostHistoryTypeId="1" PostId="10435" RevisionGUID="0a2ee489-2f65-4f63-b731-1aaaf9819624" CreationDate="2023-11-10T18:49:54.957" UserId="372" Text="Is the Aura Slot Inherent Necessary?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41358" PostHistoryTypeId="3" PostId="10435" RevisionGUID="0a2ee489-2f65-4f63-b731-1aaaf9819624" CreationDate="2023-11-10T18:49:54.957" UserId="372" Text="|consensus|aura|slot|inherent|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41359" PostHistoryTypeId="2" PostId="10436" RevisionGUID="e45aff08-17ac-4afd-91d7-51e25a84c6dd" CreationDate="2023-11-10T18:55:54.877" UserId="372" Text="In a standalone blockchain, nodes will not only check the execution of extrinsics, they will also check the inherent data for consistency with the real world.&#xD;&#xA;&#xD;&#xA;In the case of a parachain, the parachain nodes do these checks as well. **Do the relay chain validators who execute the parachain block, also check the parachain's timestamp inherent?**. I could imagine them checking it either for consistency with the real world, like the parachain nodes themselves do) or for consistency with the relay parent block.&#xD;&#xA;&#xD;&#xA;I know this used to happen in the `CheckInherents` section of the [register_validate_block! macro](https://paritytech.github.io/polkadot-sdk/master/cumulus_pallet_parachain_system/macro.register_validate_block.html). But it seems that was removed in https://github.com/paritytech/cumulus/pull/2658&#xD;&#xA;&#xD;&#xA;I understand that the consensus related checks now have a new dedicated hook, but what about timestamp? Is it still checked?&#xD;&#xA;&#xD;&#xA;(And a secondary question, why do the [docs I linked](https://paritytech.github.io/polkadot-sdk/master/cumulus_pallet_parachain_system/macro.register_validate_block.html) still show the `CheckInherents`? even though it was removed?)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41361" PostHistoryTypeId="1" PostId="10436" RevisionGUID="e45aff08-17ac-4afd-91d7-51e25a84c6dd" CreationDate="2023-11-10T18:55:54.877" UserId="372" Text="Does the Relay Chain check the Parachain's timestamp inherent?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41362" PostHistoryTypeId="3" PostId="10436" RevisionGUID="e45aff08-17ac-4afd-91d7-51e25a84c6dd" CreationDate="2023-11-10T18:55:54.877" UserId="372" Text="|inherent|validate-block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41363" PostHistoryTypeId="50" PostId="6958" RevisionGUID="dbf2acda-dee5-4206-82f7-35f8e9bfe84f" CreationDate="2023-11-11T00:11:11.403" UserId="-1" />
  <row Id="41367" PostHistoryTypeId="2" PostId="10437" RevisionGUID="52a64287-b1c3-4210-9150-848e5fc7c819" CreationDate="2023-11-11T03:06:20.893" UserId="1959" Text="I think the real relaychain KSM has not been lost. As you can see, &quot;the tokens of sovereign account did not change +-5 blocks when the tx failed&quot;. It was still in the sovereign account of parachain(2110), under the control of the parachain((2110). **What lost is only the mapped assets within the parachain. You can use governance (Or other accounts with sufficient permissions) to mint the lost mapped KSM on your parachain and allocate it to the users who lost their assets.**&#xD;&#xA;&#xD;&#xA;*What happened* when you reserve transfer the mapped KSM from parachain to Kusama(relaychain) ?&#xD;&#xA;&#xD;&#xA;Steps:&#xD;&#xA;&#xD;&#xA;On your parachain (Mangata)&#xD;&#xA;1. XCM(Withdraw&amp;InitiateReserveWithdraw instructions) destroy the mapped KSM, [TokenId=4 on Mangata](https://github.com/mangata-finance/mangata-node/blob/v0.31.0/runtime/common/src/lib.rs#L88)&#xD;&#xA;2. Send to relaychain&#xD;&#xA;&#xD;&#xA;On Relaychain (Failed)&#xD;&#xA;&#xD;&#xA;1. Withdraw KSM from parachain(Mangata) sovereign account&#xD;&#xA;2. BuyExecution and then deposit the assets to the receiver.&#xD;&#xA;&#xD;&#xA;So the current situation is the mapped KSM on parachain is destroyed, but the xcm was not executed on Kusama, the real KSM is still in the parachain sovereign account.&#xD;&#xA;&#xD;&#xA;You could mint the mapped KSM on your parachain for the users. Or you can transfer the real KSM from the parachain sovereign account to users on Kusama (Sending XCM from parachain through governance/ROOT to Kusama to control sovereign account)." ContentLicense="CC BY-SA 4.0" />
  <row Id="41369" PostHistoryTypeId="50" PostId="8882" RevisionGUID="7d453060-8c3c-4dac-ab46-54ae5fc47159" CreationDate="2023-11-11T16:02:40.387" UserId="-1" />
  <row Id="41370" PostHistoryTypeId="50" PostId="7202" RevisionGUID="52027886-2537-4317-b39b-06056f4a9f8c" CreationDate="2023-11-11T17:08:15.980" UserId="-1" />
  <row Id="41371" PostHistoryTypeId="2" PostId="10438" RevisionGUID="82b9d6a2-7fb1-4d1c-9295-6b90060ed808" CreationDate="2023-11-11T23:34:55.897" UserId="3598" Text="Can the spec_name of the RuntimeVersion be changed on a runtime upgrade? And if so, can the check performed by the try-runtime cli that the spec_names have to match be disabled?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41373" PostHistoryTypeId="1" PostId="10438" RevisionGUID="82b9d6a2-7fb1-4d1c-9295-6b90060ed808" CreationDate="2023-11-11T23:34:55.897" UserId="3598" Text="Can the spec_name of the RuntimeVersion be changed on a runtime upgrade?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41374" PostHistoryTypeId="3" PostId="10438" RevisionGUID="82b9d6a2-7fb1-4d1c-9295-6b90060ed808" CreationDate="2023-11-11T23:34:55.897" UserId="3598" Text="|runtime-upgrade|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41375" PostHistoryTypeId="2" PostId="10439" RevisionGUID="b4623ba8-e036-4809-b5f8-68418d6d07fb" CreationDate="2023-11-12T06:11:15.113" UserId="251" Text="You can not change that field.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/0c5dcca9e3cef6b2f456fccefd9f6c5e43444053/substrate/frame/system/src/lib.rs#L1724-L1726" ContentLicense="CC BY-SA 4.0" />
  <row Id="41377" PostHistoryTypeId="50" PostId="7204" RevisionGUID="e1c03594-07ed-4332-a2e0-1b043b403cc1" CreationDate="2023-11-12T12:01:40.197" UserId="-1" />
  <row Id="41378" PostHistoryTypeId="50" PostId="7220" RevisionGUID="b5b82861-4d51-4211-8d73-7d618b056701" CreationDate="2023-11-12T17:03:25.403" UserId="-1" />
  <row Id="41379" PostHistoryTypeId="2" PostId="10440" RevisionGUID="57790ce3-5ccb-4c77-9977-731a04edc98f" CreationDate="2023-11-12T17:50:45.743" UserId="2540" Text="Following&#xD;&#xA;&#xD;&#xA;https://use.ink/getting-started/setup#2-build-it-yourself&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked&#xD;&#xA;```&#xD;&#xA;gives following errors&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;warning: Could not find `Cargo.lock` for `/home/jan/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/tmp/cargo-install7jKdKe/release/build/contracts-node-runtime-143506e184989dd7/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;warning: Could not find `Cargo.lock` for `/home/jan/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/tmp/cargo-install7jKdKe/release/build/contracts-node-runtime-143506e184989dd7/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;&#xD;&#xA;error: failed to run custom build command for `contracts-node-runtime v0.23.0 (/home/jan/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime)`&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/tmp/cargo-install7jKdKe/release/build/contracts-node-runtime-9fdb9c9faf907e21/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  cargo:warning=Could not find `Cargo.lock` for `/home/jan/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/tmp/cargo-install7jKdKe/release/build/contracts-node-runtime-143506e184989dd7/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;  cargo:warning=Could not find `Cargo.lock` for `/home/jan/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/tmp/cargo-install7jKdKe/release/build/contracts-node-runtime-143506e184989dd7/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: RUSTFLAGS=&quot;-C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;rustup&quot; &quot;run&quot; &quot;nightly&quot; &quot;cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/tmp/cargo-install7jKdKe/release/wbuild/contracts-node-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.73.0 (cc66ad468 2023-10-03)&#xD;&#xA;  --- stderr&#xD;&#xA;...&#xD;&#xA;     Compiling wasmi_core v0.5.0&#xD;&#xA;  error[E0554]: `#![feature]` may not be used on the stable release channel&#xD;&#xA;    --&gt; /home/jan/.cargo/git/checkouts/substrate-7e08433d4c370a21/1cc97dd/primitives/io/src/lib.rs:22:35&#xD;&#xA;     |&#xD;&#xA;  22 | #![cfg_attr(not(feature = &quot;std&quot;), feature(alloc_error_handler))]&#xD;&#xA;     |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;     Compiling tempfile v3.8.1&#xD;&#xA;  For more information about this error, try `rustc --explain E0554`.&#xD;&#xA;  error: could not compile `sp-io` (lib) due to previous error&#xD;&#xA;  warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: failed to compile `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)`, intermediate artifacts can be found at `/tmp/cargo-install7jKdKe`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;how to fix?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41381" PostHistoryTypeId="1" PostId="10440" RevisionGUID="57790ce3-5ccb-4c77-9977-731a04edc98f" CreationDate="2023-11-12T17:50:45.743" UserId="2540" Text="substrate contracts node compilation failed" ContentLicense="CC BY-SA 4.0" />
  <row Id="41382" PostHistoryTypeId="3" PostId="10440" RevisionGUID="57790ce3-5ccb-4c77-9977-731a04edc98f" CreationDate="2023-11-12T17:50:45.743" UserId="2540" Text="|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41383" PostHistoryTypeId="5" PostId="10169" RevisionGUID="d5d13a57-488f-40c4-84d1-b80e5a533e63" CreationDate="2023-11-13T02:56:11.647" UserId="3136" Comment="correct the msg format" Text="I'm having difficulty altering the gas cost in Ink's end-to-end (`e2e`) tests. I require the ability to adjust the gas cost for specific tests within my `Ink contract`, but my attempts to do so have consistently resulted in a return value of zero when using the weight_to_fee function." ContentLicense="CC BY-SA 4.0" />
  <row Id="41384" PostHistoryTypeId="24" PostId="10169" RevisionGUID="d5d13a57-488f-40c4-84d1-b80e5a533e63" CreationDate="2023-11-13T02:56:11.647" Comment="Proposed by 3136 approved by 116, -1 edit id of 592" ContentLicense="CC BY-SA 4.0" />
  <row Id="41385" PostHistoryTypeId="5" PostId="10169" RevisionGUID="33bad1e6-f90f-4038-b978-8aa4cf3ffb07" CreationDate="2023-11-13T02:56:11.647" UserId="83" Comment="spell ink! correctly and remove unnecessary sentence" Text="I want to be able to adjust the gas cost used in specific ink! end-to-end (e2e) tests, but my attempts to do so have consistently resulted in a return value of zero when using the `weight_to_fee` function." ContentLicense="CC BY-SA 4.0" />
  <row Id="41386" PostHistoryTypeId="4" PostId="10169" RevisionGUID="33bad1e6-f90f-4038-b978-8aa4cf3ffb07" CreationDate="2023-11-13T02:56:11.647" UserId="83" Comment="spell ink! correctly and remove unnecessary sentence" Text="How to change the gas cost in ink! e2e tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="41387" PostHistoryTypeId="2" PostId="10441" RevisionGUID="93a49116-782b-4e73-8569-4a05e8019397" CreationDate="2023-11-13T06:51:43.210" UserId="4627" Text="The solution seems to be to regenerate the chain spec with this command:&#xD;&#xA;&#xD;&#xA;    ./target/release/frontier-template-node build-spec --disable-default-bootnode &gt; new-chainspec.json" ContentLicense="CC BY-SA 4.0" />
  <row Id="41389" PostHistoryTypeId="2" PostId="10442" RevisionGUID="c72155a3-7bc1-40b0-9e55-c37a8b8dab11" CreationDate="2023-11-13T08:15:11.100" UserId="2762" Text="The version used in the documentation is a bit old, you can try with the latest following the steps in the [README of the project][1]:&#xD;&#xA;&#xD;&#xA;    git clone https://github.com/paritytech/substrate-contracts-node.git&#xD;&#xA;&#xD;&#xA;Install contracts node:&#xD;&#xA;&#xD;&#xA;    cargo install contracts-node&#xD;&#xA;And run it:&#xD;&#xA;&#xD;&#xA;    substrate-contracts-node&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-contracts-node/blob/main/README.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="41391" PostHistoryTypeId="2" PostId="10443" RevisionGUID="f5581fc3-12f8-435b-b152-57f2a73949d2" CreationDate="2023-11-13T08:55:27.980" UserId="2540" Text="When following ink getting started tutorial at https://use.ink/getting-started/running-substrate I am stuck at one of the steps.&#xD;&#xA;&#xD;&#xA;After starting contracts node in dev mode with the following command:&#xD;&#xA;```sh&#xD;&#xA;substrate-contracts-node --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am trying to connect to UI via https://contracts-ui.substrate.io/ choosing local node. Getting &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Could not connect to ws://127.0.0.1:9944&#xD;&#xA;Make sure you are running a local substrate-contracts-node.&#xD;&#xA;substrate-contracts-node --dev&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried switching off `ufw` but it didn't help.&#xD;&#xA;&#xD;&#xA;I found similar question here but there problem was missing `--dev` switch, which is not the case here, I pass `--dev` explicitly.&#xD;&#xA;&#xD;&#xA;This is the output of my node console&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-11-13 09:46:10.415  INFO main sc_cli::runner: Substrate Contracts Node    &#xD;&#xA;2023-11-13 09:46:10.416  INFO main sc_cli::runner: ✌️  version 0.33.0-unknown    &#xD;&#xA;2023-11-13 09:46:10.416  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2021-2023    &#xD;&#xA;2023-11-13 09:46:10.416  INFO main sc_cli::runner:  Chain specification: Development    &#xD;&#xA;2023-11-13 09:46:10.416  INFO main sc_cli::runner:   Node name: cool-jellyfish-4492    &#xD;&#xA;2023-11-13 09:46:10.416  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2023-11-13 09:46:10.416  INFO main sc_cli::runner:  Database: ParityDb at /tmp/substrateeTNwIZ/chains/dev/paritydb/full    &#xD;&#xA;2023-11-13 09:46:11.566  WARN main sub-libp2p: Can't listen on /ip6/::/tcp/30333 because: Other(Custom { kind: Other, error: Custom { kind: Other, error: Other(Left(Left(Left(Left(Right(Transport(Os { code: 97, kind: Uncategorized, message: &quot;Address family not supported by protocol&quot; }))))))) } })    &#xD;&#xA;2023-11-13 09:46:12.660  INFO main sc_rpc_server: Running JSON-RPC server: addr=127.0.0.1:9944, allowed origins=[&quot;*&quot;]    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How the debug why it is not running as it should?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41393" PostHistoryTypeId="1" PostId="10443" RevisionGUID="f5581fc3-12f8-435b-b152-57f2a73949d2" CreationDate="2023-11-13T08:55:27.980" UserId="2540" Text="contracts-ui cannot connect to local node" ContentLicense="CC BY-SA 4.0" />
  <row Id="41394" PostHistoryTypeId="3" PostId="10443" RevisionGUID="f5581fc3-12f8-435b-b152-57f2a73949d2" CreationDate="2023-11-13T08:55:27.980" UserId="2540" Text="|substrate-contracts-node|contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41395" PostHistoryTypeId="2" PostId="10444" RevisionGUID="00e39a8b-6521-437d-bf99-83d121ef047a" CreationDate="2023-11-13T08:57:38.460" UserId="2540" Text="Regarding&#xD;&#xA;&#xD;&#xA;&gt; then installed the substrate contract node from ink docs&#xD;&#xA;&gt; `cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked`&#xD;&#xA;&#xD;&#xA;this ink doc is outdated, as per https://substrate.stackexchange.com/a/10442/2540&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;you will find solution there which worked for me&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41401" PostHistoryTypeId="2" PostId="10446" RevisionGUID="05783ea3-982a-41fd-b781-ea8d4d9a43c3" CreationDate="2023-11-13T14:27:01.613" UserId="4934" Text="I'm working on developing a blockchain using Substrate, and I intend to customize the consensus mechanism. Specifically, I'm interested in enabling a node or a group of nodes to create a new block from specific records sent through HTTP requests. Could anyone in the community provide me with a practical example of how to implement this customization of the consensus mechanism in Substrate?&#xD;&#xA;&#xD;&#xA;I would like to understand how to integrate the reception of records through HTTP requests and use this information for block creation. Is there any specific module I should modify or create to achieve this? Are there any special considerations I should be aware of when working on this customization?&#xD;&#xA;&#xD;&#xA;I appreciate any guidance, code examples, or resources that can help me move forward with this project. Thank you in advance for your valuable contribution!&#xD;&#xA;&#xD;&#xA;Best regards," ContentLicense="CC BY-SA 4.0" />
  <row Id="41403" PostHistoryTypeId="1" PostId="10446" RevisionGUID="05783ea3-982a-41fd-b781-ea8d4d9a43c3" CreationDate="2023-11-13T14:27:01.613" UserId="4934" Text="&quot;Customizing Consensus Mechanism in Substrate: Creating a New Block from Records via HTTP Request&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41404" PostHistoryTypeId="3" PostId="10446" RevisionGUID="05783ea3-982a-41fd-b781-ea8d4d9a43c3" CreationDate="2023-11-13T14:27:01.613" UserId="4934" Text="|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41405" PostHistoryTypeId="2" PostId="10447" RevisionGUID="5f5c200f-c01b-4443-a955-2415d8223289" CreationDate="2023-11-13T15:38:27.293" UserId="445" Text="I guess you are using the newer polkadot version (v1.0.0 or newer)&#xD;&#xA;&#xD;&#xA;`bond` method is now having 2 parameters ( value , payee)&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/polkadot-v1.0.0/frame/staking/src/pallet/mod.rs#L834&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/8u6mD.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41407" PostHistoryTypeId="50" PostId="8881" RevisionGUID="b9941e43-4742-4426-942e-5fb86f54a690" CreationDate="2023-11-13T18:06:15.777" UserId="-1" />
  <row Id="41408" PostHistoryTypeId="2" PostId="10448" RevisionGUID="4a8e82c7-d380-4c0a-80de-0b3c275c2b28" CreationDate="2023-11-13T20:34:03.033" UserId="3598" Text="Recently the pallet_identity added the InformationProvider type which defines the structure  to be used to store identity information. Am I right to think that no migration is required  for the pallet if pallet_identity::simple::IdentityInfo is used as the InformationProvider type, as it is the same structure as it was hardcoded before?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41410" PostHistoryTypeId="1" PostId="10448" RevisionGUID="4a8e82c7-d380-4c0a-80de-0b3c275c2b28" CreationDate="2023-11-13T20:34:03.033" UserId="3598" Text="Does pallet_identity require a migration if pallet_identity::simple::IdentityInfo is used as the InformationProvider type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41411" PostHistoryTypeId="3" PostId="10448" RevisionGUID="4a8e82c7-d380-4c0a-80de-0b3c275c2b28" CreationDate="2023-11-13T20:34:03.033" UserId="3598" Text="|storage-migration|pallet-identity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41412" PostHistoryTypeId="2" PostId="10449" RevisionGUID="7525f1aa-1b9d-4710-abec-8435fabe93b3" CreationDate="2023-11-13T20:42:47.707" UserId="4391" Text="```cargo contract build``` works just fine and produces the correct outputs in the /target folder. &#xD;&#xA;&#xD;&#xA;Running ```cargo test``` however throws the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `wasm-opt-sys v0.113.0`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/test_user/Dev/INK/flipper/target/debug/build/wasm-opt-sys-3a19b50779e5ebb2/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  TARGET = Some(&quot;x86_64-apple-darwin&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-apple-darwin&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64-apple-darwin&#xD;&#xA;  CXX_x86_64-apple-darwin = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64_apple_darwin&#xD;&#xA;  CXX_x86_64_apple_darwin = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXX&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX&#xD;&#xA;  CXX = None&#xD;&#xA;  running: &quot;c++&quot; &quot;--version&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  RUSTC = Some(&quot;/Users/test_user/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rustc&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-apple-darwin&#xD;&#xA;  CXXFLAGS_x86_64-apple-darwin = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_apple_darwin&#xD;&#xA;  CXXFLAGS_x86_64_apple_darwin = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXXFLAGS&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  cargo:CXXBRIDGE_PREFIX=wasm-opt-sys&#xD;&#xA;  cargo:CXXBRIDGE_LINKS=binaryen&#xD;&#xA;  cargo:CXXBRIDGE_DIR0=/Users/test_user/Dev/INK/flipper/target/debug/build/wasm-opt-sys-029508906017695d/out/cxxbridge/include&#xD;&#xA;  cargo:CXXBRIDGE_DIR1=/Users/test_user/Dev/INK/flipper/target/debug/build/wasm-opt-sys-029508906017695d/out/cxxbridge/crate&#xD;&#xA;  cargo:CXXBRIDGE_DIR2=/Users/test_user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.113.0/binaryen/src&#xD;&#xA;  cargo:CXXBRIDGE_DIR3=/Users/test_user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.113.0/binaryen/src/tools&#xD;&#xA;  cargo:CXXBRIDGE_DIR4=/Users/test_user/Dev/INK/flipper/target/debug/build/wasm-opt-sys-029508906017695d/out&#xD;&#xA;  TARGET = Some(&quot;x86_64-apple-darwin&quot;)&#xD;&#xA;  OPT_LEVEL = Some(&quot;0&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-apple-darwin&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64-apple-darwin&#xD;&#xA;  CXX_x86_64-apple-darwin = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX_x86_64_apple_darwin&#xD;&#xA;  CXX_x86_64_apple_darwin = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXX&#xD;&#xA;  HOST_CXX = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXX&#xD;&#xA;  CXX = None&#xD;&#xA;  running: &quot;c++&quot; &quot;--version&quot;&#xD;&#xA;  exit status: 0&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  RUSTC = Some(&quot;/Users/test_user/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rustc&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-apple-darwin&#xD;&#xA;  CXXFLAGS_x86_64-apple-darwin = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_apple_darwin&#xD;&#xA;  CXXFLAGS_x86_64_apple_darwin = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CXXFLAGS&#xD;&#xA;  HOST_CXXFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CXXFLAGS&#xD;&#xA;  CXXFLAGS = None&#xD;&#xA;  running: &quot;c++&quot; &quot;-O0&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;--target=x86_64-apple-darwin&quot; &quot;-mmacosx-version-min=10.7&quot; &quot;-I&quot; &quot;/Users/test_user/Dev/INK/flipper/target/debug/build/wasm-opt-sys-029508906017695d/out/cxxbridge/include&quot; &quot;-I&quot; &quot;/Users/test_user/Dev/INK/flipper/target/debug/build/wasm-opt-sys-029508906017695d/out/cxxbridge/crate&quot; &quot;-I&quot; &quot;/Users/test_user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.113.0/binaryen/src&quot; &quot;-I&quot; &quot;/Users/test_user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-opt-sys-0.113.0/binaryen/src/tools&quot; &quot;-I&quot; &quot;/Users/test_user/Dev/INK/flipper/target/debug/build/wasm-opt-sys-029508906017695d/out&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-std=c++17&quot; &quot;-Wno-unused-parameter&quot; &quot;-DTHROW_ON_FATAL&quot; &quot;-o&quot; &quot;/Users/test_user/Dev/INK/flipper/target/debug/build/wasm-opt-sys-029508906017695d/out/fc3ac4579f2123d0-lib.rs.o&quot; &quot;-c&quot; &quot;/Users/test_user/Dev/INK/flipper/target/debug/build/wasm-opt-sys-029508906017695d/out/cxxbridge/sources/wasm-opt-sys/src/lib.rs.cc&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error looks like above looks like it's related to the C++ compiler but I've got another older ink! flipper contract on my machine where ```cargo test``` works just fine. &#xD;&#xA;&#xD;&#xA;Has anyone got any ideas what could be the issue?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo contract --version&#xD;&#xA;cargo-contract-contract 3.2.0-unknown-x86_64-apple-darwin&#xD;&#xA;&#xD;&#xA;rustc --version&#xD;&#xA;rustc 1.73.0 (cc66ad468 2023-10-03)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41414" PostHistoryTypeId="1" PostId="10449" RevisionGUID="7525f1aa-1b9d-4710-abec-8435fabe93b3" CreationDate="2023-11-13T20:42:47.707" UserId="4391" Text="Issue with cargo test and ink! Flipper contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="41415" PostHistoryTypeId="3" PostId="10449" RevisionGUID="7525f1aa-1b9d-4710-abec-8435fabe93b3" CreationDate="2023-11-13T20:42:47.707" UserId="4391" Text="|ink|cargo|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41416" PostHistoryTypeId="2" PostId="10450" RevisionGUID="d6ba5502-977f-4f1b-ba4f-87d9d8b2c247" CreationDate="2023-11-13T21:25:42.667" UserId="3070" Text="Hi we are following along with the typegen docs on polkadotjs documentation.&#xD;&#xA;&#xD;&#xA;and the generated code cannot find most the types. &#xD;&#xA;an example line:&#xD;&#xA;```&#xD;&#xA;Called: AugmentedEvent&lt;ApiType, [caller: PalletContractsOrigin, contract: AccountId32]...&#xD;&#xA;```   &#xD;&#xA;The PalletContractsOrigin is not found&#xD;&#xA;the types did get generated are in types/lookup&#xD;&#xA;if i manually add an import&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;import {PalletContractsOrigin} from &quot;@polkadot/types/lookup&quot;;&#xD;&#xA;``` &#xD;&#xA;then that one is found. But there are many type errors.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Found 78 errors in 5 files.&#xD;&#xA;&#xD;&#xA;Errors  Files&#xD;&#xA;     6  src/interfaces/augment-api-consts.ts:119&#xD;&#xA;    18  src/interfaces/augment-api-events.ts:166&#xD;&#xA;    33  src/interfaces/augment-api-query.ts:23&#xD;&#xA;    20  src/interfaces/augment-api-tx.ts:191&#xD;&#xA;     1  src/interfaces/index.ts:4&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;here is my tsconfig section:&#xD;&#xA;```&#xD;&#xA;    &quot;paths&quot;: {&#xD;&#xA;      &quot;my-lib-name/*&quot;: [&quot;src/*&quot;],&#xD;&#xA;      &quot;@polkadot/api/augment&quot;: [&quot;src/interfaces/augment-api.ts&quot;],&#xD;&#xA;      &quot;@polkadot/types/augment&quot;: [&quot;src/interfaces/augment-types.ts&quot;]&#xD;&#xA;    },&#xD;&#xA;```&#xD;&#xA;i also get this error when running the generate&#xD;&#xA;```&#xD;&#xA;ERROR: No lookup definitions found: Unknown file extension &quot;.ts&quot; for src/interfaces/lookup.ts&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41418" PostHistoryTypeId="1" PostId="10450" RevisionGUID="d6ba5502-977f-4f1b-ba4f-87d9d8b2c247" CreationDate="2023-11-13T21:25:42.667" UserId="3070" Text="Generated Types Not Found" ContentLicense="CC BY-SA 4.0" />
  <row Id="41419" PostHistoryTypeId="3" PostId="10450" RevisionGUID="d6ba5502-977f-4f1b-ba4f-87d9d8b2c247" CreationDate="2023-11-13T21:25:42.667" UserId="3070" Text="|polkadot-js|types|typegen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41420" PostHistoryTypeId="2" PostId="10451" RevisionGUID="44ba2eb9-fa29-470b-9e4f-8edf8dabf59f" CreationDate="2023-11-14T00:57:21.930" UserId="344" Text="I want to write a script to rotate a validator's session key on a Ledger without using the browser.&#xD;&#xA;&#xD;&#xA;I have been using polkadot.js UI for this purpose, but is it possible to write a typescript program to do it? This would need to access the USB bus in order to communicate with the Ledger. It would then send the transaction out using polkadot.js API." ContentLicense="CC BY-SA 4.0" />
  <row Id="41422" PostHistoryTypeId="1" PostId="10451" RevisionGUID="44ba2eb9-fa29-470b-9e4f-8edf8dabf59f" CreationDate="2023-11-14T00:57:21.930" UserId="344" Text="Signing with Ledger outside of the browser" ContentLicense="CC BY-SA 4.0" />
  <row Id="41423" PostHistoryTypeId="3" PostId="10451" RevisionGUID="44ba2eb9-fa29-470b-9e4f-8edf8dabf59f" CreationDate="2023-11-14T00:57:21.930" UserId="344" Text="|ledger|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41424" PostHistoryTypeId="50" PostId="5453" RevisionGUID="065d10f4-187c-462b-9246-b49336a1444a" CreationDate="2023-11-14T04:11:06.407" UserId="-1" />
  <row Id="41425" PostHistoryTypeId="2" PostId="10452" RevisionGUID="4960f730-0c66-47df-9984-b7de7e2c52ca" CreationDate="2023-11-14T04:45:37.503" UserId="19" Text="**A brief context:** I want to deliver [the test.](https://github.com/paritytech/polkadot-sdk/issues/354)&#xD;&#xA;&#xD;&#xA;**The exact context:** Creation of `account_id`'s (first point in an outline).&#xD;&#xA;&#xD;&#xA;**Question:** Do I correctly create `account_id` in the context of my task. Should I firstly create signatories?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    let account_id = Self::multi_account_id(&amp;signatories, 2);&#xD;&#xA;&#xD;&#xA;In the documentation of `multi_account_id` is written:&#xD;&#xA;&#xD;&#xA;&gt; NOTE: who must be sorted. If it is not, then you'll get the wrong&#xD;&#xA;&gt; answer.&#xD;&#xA;&#xD;&#xA;Can anybody explain why `who` must be sorted?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41427" PostHistoryTypeId="1" PostId="10452" RevisionGUID="4960f730-0c66-47df-9984-b7de7e2c52ca" CreationDate="2023-11-14T04:45:37.503" UserId="19" Text="Creation of account ids" ContentLicense="CC BY-SA 4.0" />
  <row Id="41428" PostHistoryTypeId="3" PostId="10452" RevisionGUID="4960f730-0c66-47df-9984-b7de7e2c52ca" CreationDate="2023-11-14T04:45:37.503" UserId="19" Text="|testing|unit-tests|multisig|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41429" PostHistoryTypeId="2" PostId="10453" RevisionGUID="4506343c-3032-433c-932c-a206adf97b36" CreationDate="2023-11-14T06:00:09.733" UserId="4744" Text="I have generated the session keys using the `author.rotateKeys()` RPC call. The keys are of type `Vec&lt;u8&gt;` and the length is 128 bytes.&#xD;&#xA;&#xD;&#xA;[![Generate session keys][1]][1]&#xD;&#xA;&#xD;&#xA;I am trying to call the `set_keys()` method from `pallet_session` to a substrate node. I am using `subxt` for submitting extrinsics and I have generated a `.scale` file for interfacing. Now I am not sure how to create `SessionKeys` struct using the 128 bytes. When I hover over the SessionKeys struct I can see the following&#xD;&#xA;&#xD;&#xA;https://docs.subsocial.network/rust-docs/latest/pallet_session/enum.Call.html#variant.set_keys&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub struct SessionKeys {&#xD;&#xA;    pub grandpa: Public,&#xD;&#xA;    pub babe: Public,&#xD;&#xA;    pub im_online: Public,&#xD;&#xA;    pub authority_discovery: Public,&#xD;&#xA;} // size = 128 (0x80), align = 0x1&#xD;&#xA;```&#xD;&#xA;I can't see `Public` struct. How to instantiate it?&#xD;&#xA;&#xD;&#xA;Also in runtime, i can see the following&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl_opaque_keys! {&#xD;&#xA;pub struct SessionKeys {&#xD;&#xA;    pub grandpa: Grandpa,&#xD;&#xA;    pub babe: Babe,&#xD;&#xA;    pub im_online: ImOnline,&#xD;&#xA;    pub authority_discovery: AuthorityDiscovery,&#xD;&#xA;}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to convert a 128 bytes string into a SessionKeys struct?&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let grandpa: substrate::runtime_types::sp_consensus_grandpa::app::Public =&#xD;&#xA;    substrate::runtime_types::sp_consensus_grandpa::app::Public::from(keys[0..32].to_vec());&#xD;&#xA;let babe: substrate::runtime_types::sp_consensus_babe::app::Public =&#xD;&#xA;    substrate::runtime_types::sp_consensus_babe::app::Public::from(keys[32..64].to_vec());&#xD;&#xA;let im_online: substrate::runtime_types::sp_im_online::app::Public =&#xD;&#xA;    substrate::runtime_types::sp_im_online::app::Public::from(keys[64..96].to_vec());&#xD;&#xA;let authority_discovery: substrate::runtime_types::sp_authority_discovery::app::Public =&#xD;&#xA;    substrate::runtime_types::sp_authority_discovery::app::Public::from(keys[96..128].to_vec());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; main/src/substrate.rs:98:75&#xD;&#xA;    |&#xD;&#xA;98  |         substrate::runtime_types::sp_consensus_grandpa::app::Public::from(keys[0..32].to_vec());&#xD;&#xA;    |         ----------------------------------------------------------------- ^^^^^^^^^^^^^^^^^^^^ expected `Public`, found `Vec&lt;u8&gt;`&#xD;&#xA;    |         |&#xD;&#xA;    |         arguments to this function are incorrect&#xD;&#xA;    |&#xD;&#xA;    = note: expected struct `sp_consensus_grandpa::app::Public`&#xD;&#xA;               found struct `Vec&lt;u8&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It is expecting a `Public` struct but I am passing a `Vec&lt;u8&gt;`. But how can I create a `Public` struct from a `Vec&lt;u8&gt;`?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/LVz2b.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41431" PostHistoryTypeId="1" PostId="10453" RevisionGUID="4506343c-3032-433c-932c-a206adf97b36" CreationDate="2023-11-14T06:00:09.733" UserId="4744" Text="subxt: How to submit pallet_session::set_keys() extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41432" PostHistoryTypeId="3" PostId="10453" RevisionGUID="4506343c-3032-433c-932c-a206adf97b36" CreationDate="2023-11-14T06:00:09.733" UserId="4744" Text="|extrinsic|subxt|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41433" PostHistoryTypeId="2" PostId="10454" RevisionGUID="11c875a8-423e-45f2-9ec9-26d9c10f1719" CreationDate="2023-11-14T08:01:39.957" UserId="2010" Text="Hello can someone please help me understand all steps and all functions needed to be implemented for replacing finality gadget in experimental substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41435" PostHistoryTypeId="1" PostId="10454" RevisionGUID="11c875a8-423e-45f2-9ec9-26d9c10f1719" CreationDate="2023-11-14T08:01:39.957" UserId="2010" Text="Replace GRANDPA finanlity" ContentLicense="CC BY-SA 4.0" />
  <row Id="41436" PostHistoryTypeId="3" PostId="10454" RevisionGUID="11c875a8-423e-45f2-9ec9-26d9c10f1719" CreationDate="2023-11-14T08:01:39.957" UserId="2010" Text="|consensus|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41437" PostHistoryTypeId="10" PostId="10434" RevisionGUID="fa9f1c95-6ae7-4cee-a9bc-1c62ac062f2b" CreationDate="2023-11-14T09:25:45.513" UserId="-1" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[4891],&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:-1,&quot;DisplayName&quot;:&quot;Community&quot;,&quot;BindingReason&quot;:{&quot;DuplicateApprovedByAsker&quot;:&quot;&quot;}}]}" />
  <row Id="41438" PostHistoryTypeId="2" PostId="10455" RevisionGUID="5cbc4263-62cf-4055-a1a0-1391aa3ebf79" CreationDate="2023-11-14T09:41:25.580" UserId="2844" Text="I want to generate keys for my parachain-template-node but using this command gives me error. &#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % ./target/release/parachain-template-node key generate --scheme Sr25519 --password-interactive&#xD;&#xA;    error: unexpected argument 'key' found&#xD;&#xA;    &#xD;&#xA;    Usage: parachain-template-node [OPTIONS] [-- &lt;RELAY_CHAIN_ARGS&gt;...]&#xD;&#xA;           parachain-template-node &lt;COMMAND&gt;&#xD;&#xA;    &#xD;&#xA;    For more information, try '--help'.&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % &#xD;&#xA;&#xD;&#xA;I use this command from [here](https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/#generate-your-account-and-keys)&#xD;&#xA;&#xD;&#xA;Is the command changed? Someone please help me." ContentLicense="CC BY-SA 4.0" />
  <row Id="41440" PostHistoryTypeId="1" PostId="10455" RevisionGUID="5cbc4263-62cf-4055-a1a0-1391aa3ebf79" CreationDate="2023-11-14T09:41:25.580" UserId="2844" Text="unexpected argument 'key' found while generating keys" ContentLicense="CC BY-SA 4.0" />
  <row Id="41441" PostHistoryTypeId="3" PostId="10455" RevisionGUID="5cbc4263-62cf-4055-a1a0-1391aa3ebf79" CreationDate="2023-11-14T09:41:25.580" UserId="2844" Text="|substrate-node|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41442" PostHistoryTypeId="6" PostId="10455" RevisionGUID="ed8c4bf8-9fb9-42f5-aee1-4bfad790d410" CreationDate="2023-11-14T09:54:53.303" UserId="2844" Comment="edited tags" Text="|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41443" PostHistoryTypeId="2" PostId="10456" RevisionGUID="c271ade8-60e5-4cb6-a720-6fc839447e53" CreationDate="2023-11-14T10:23:46.957" UserId="1837" Text="In our case, validators are providing multiple different services and I want to restrict them from un-staking or making unbound calls until they have completed the job.&#xD;&#xA;&#xD;&#xA;I can set a BaseCall filter to restrict extrinsic calls but Is there a way to conditionally filter accounts that can make extrinsic calls?&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;```rust&#xD;&#xA;let is_stake_unbound_call = matches!(call, RuntimeCall::Staking(pallet_staking::Call::unbond { value }));&#xD;&#xA;		&#xD;&#xA;if is_stake_unbound_call {&#xD;&#xA;    let has_job = pallet_job::PendingJob::contains_key(account_id)?;&#xD;&#xA;    // return true if all jobs are completed else false&#xD;&#xA;	&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Other possible Approach: &#xD;&#xA; - Block un-bound call and let job-pallet make unbound (internally calling pallet-staking::unbound).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is there a better way to handle such cases? Any help or advice is much appreciated&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="41445" PostHistoryTypeId="1" PostId="10456" RevisionGUID="c271ade8-60e5-4cb6-a720-6fc839447e53" CreationDate="2023-11-14T10:23:46.957" UserId="1837" Text="Allow specific accounts to make extrinsic calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="41446" PostHistoryTypeId="3" PostId="10456" RevisionGUID="c271ade8-60e5-4cb6-a720-6fc839447e53" CreationDate="2023-11-14T10:23:46.957" UserId="1837" Text="|extrinsic|pallet-staking|filter|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41447" PostHistoryTypeId="50" PostId="10190" RevisionGUID="4dfe0922-fa6a-477d-b615-e01e5332dcc2" CreationDate="2023-11-14T11:07:05.863" UserId="-1" />
  <row Id="41448" PostHistoryTypeId="2" PostId="10457" RevisionGUID="e2a5e22f-bd8e-434f-b228-ee03b44f2891" CreationDate="2023-11-14T12:02:51.497" UserId="1793" Text="I am no longer using tsc for generation of types .. I am using **esno** or **tsx** because of ESM.&#xD;&#xA;&#xD;&#xA;    npx esno node_modules/.bin/polkadot-types-from-defs --package @mangata-finance/types/interfaces --input ./src/interfaces --endpoint ./metadata.json&#xD;&#xA;&#xD;&#xA;    npx esno node_modules/.bin/polkadot-types-from-chain --package @mangata-finance/types/interfaces --endpoint ./metadata.json --output ./src/interfaces&#xD;&#xA;&#xD;&#xA;If you can show the repo I can look." ContentLicense="CC BY-SA 4.0" />
  <row Id="41450" PostHistoryTypeId="50" PostId="10171" RevisionGUID="2a9475b3-ca65-495d-8ec8-5677ba1b441e" CreationDate="2023-11-14T12:06:20.830" UserId="-1" />
  <row Id="41451" PostHistoryTypeId="50" PostId="5986" RevisionGUID="2a91e1ea-5719-48fa-ac49-f78a9b9e347a" CreationDate="2023-11-14T13:07:50.923" UserId="-1" />
  <row Id="41452" PostHistoryTypeId="2" PostId="10458" RevisionGUID="13027bfb-1131-4e63-8456-1fac958e72af" CreationDate="2023-11-14T14:20:47.113" UserId="2862" Text="Is the separation of the Runtime business logic from the host intended solely for enabling forkless upgrades, or does it also aim to facilitate compatibility with different hosts?&#xD;&#xA;&#xD;&#xA;Is the development of hosts in other languages (other than Rust) a desired effect?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41454" PostHistoryTypeId="1" PostId="10458" RevisionGUID="13027bfb-1131-4e63-8456-1fac958e72af" CreationDate="2023-11-14T14:20:47.113" UserId="2862" Text="Node architecture (Runtime + Host)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41455" PostHistoryTypeId="3" PostId="10458" RevisionGUID="13027bfb-1131-4e63-8456-1fac958e72af" CreationDate="2023-11-14T14:20:47.113" UserId="2862" Text="|polkadot|runtime|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41456" PostHistoryTypeId="2" PostId="10459" RevisionGUID="cceb04e7-cf3f-4af1-9532-884cbcc141e5" CreationDate="2023-11-14T15:42:05.123" UserId="251" Text="Here are two pieces of code:&#xD;&#xA;```rs&#xD;&#xA;fn f() {&#xD;&#xA;    (0..1000).for_each(|_| {&#xD;&#xA;        let x = &lt;X&lt;T&gt;&gt;::get();&#xD;&#xA;&#xD;&#xA;        g(x);&#xD;&#xA;    });&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;fn f() {&#xD;&#xA;    let x = &lt;X&lt;T&gt;&gt;::get();&#xD;&#xA;&#xD;&#xA;    (0..1000).for_each(|_| { g(x); });&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Once data is read from storage, it will exist in the cache. But how does its performance compare?&#xD;&#xA;&#xD;&#xA;Is it necessary to optimize the first case everywhere?&#xD;&#xA;&#xD;&#xA;For instance, the block number is frequently used in various functions. Should I pass it along the function chain or retrieve it from the storage cache in each function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41458" PostHistoryTypeId="1" PostId="10459" RevisionGUID="cceb04e7-cf3f-4af1-9532-884cbcc141e5" CreationDate="2023-11-14T15:42:05.123" UserId="251" Text="How is the performance of the storage layer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41459" PostHistoryTypeId="3" PostId="10459" RevisionGUID="cceb04e7-cf3f-4af1-9532-884cbcc141e5" CreationDate="2023-11-14T15:42:05.123" UserId="251" Text="|storage|performance|cache|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41460" PostHistoryTypeId="2" PostId="10460" RevisionGUID="8a446d85-a6b1-4d58-a667-1f786eea9f41" CreationDate="2023-11-14T15:53:36.247" UserId="251" Text="Here are a few examples.&#xD;&#xA;&#xD;&#xA;You can find the examples here: https://github.com/darwinia-network/darwinia/blob/b2e1c5bb89a6ab9486fc3c42b0da4f7f064ec1e5/pallet/account-migration/src/tests.rs#L94&#xD;&#xA;&#xD;&#xA;Regarding your second question, please refer to this link: https://substrate.stackexchange.com/questions/9895/what-does-it-mean-in-pallet-multisig-for-accounts-to-be-sorted." ContentLicense="CC BY-SA 4.0" />
  <row Id="41462" PostHistoryTypeId="2" PostId="10461" RevisionGUID="aee46f15-d771-46cf-a52a-3ea3aeb225cf" CreationDate="2023-11-14T22:03:49.103" UserId="3598" Text="I noticed that the pallet bounties has a migration that updates the storage to version 4, but it seems only to migrate the storage to a new prefix based on a pallet name change. Is it only required if the pallet name changed? If the old and new pallet names are the same it does nothing, not even update the storage version, so if the pallet name didn't change should I create a dummy migration just to set the storage version to 4?&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="41464" PostHistoryTypeId="1" PostId="10461" RevisionGUID="aee46f15-d771-46cf-a52a-3ea3aeb225cf" CreationDate="2023-11-14T22:03:49.103" UserId="3598" Text="is the pallet bounties migration only required if the pallet name has changed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41465" PostHistoryTypeId="3" PostId="10461" RevisionGUID="aee46f15-d771-46cf-a52a-3ea3aeb225cf" CreationDate="2023-11-14T22:03:49.103" UserId="3598" Text="|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41466" PostHistoryTypeId="5" PostId="8139" RevisionGUID="aa4b7272-f83b-4e8f-b0b7-735132b8fa7e" CreationDate="2023-11-14T22:50:27.800" UserId="354" Comment="improved formatting" Text="I want to automate sending astar(NOT EVM) with Python(SubstrateInterface). I received an error when executing the following code.&#xD;&#xA;```python&#xD;&#xA;    # Imports&#xD;&#xA;    from substrateinterface import SubstrateInterface, Keypair, KeypairType&#xD;&#xA;    from substrateinterface.exceptions import SubstrateRequestException&#xD;&#xA;    &#xD;&#xA;    # Construct the API provider&#xD;&#xA;    substrate = SubstrateInterface(&#xD;&#xA;        url=&quot;wss://rpc.astar.network&quot;,&#xD;&#xA;        ss58_format=42,&#xD;&#xA;        type_registry_preset='substrate-node-template',&#xD;&#xA;    )&#xD;&#xA;    &#xD;&#xA;    keypair = Keypair.create_from_mnemonic(&#xD;&#xA;        &quot;***&quot;,&#xD;&#xA;        ss58_format = 42,&#xD;&#xA;    )&#xD;&#xA;    print(keypair.ss58_address)&#xD;&#xA;    &#xD;&#xA;    # Form a transaction call&#xD;&#xA;    call = substrate.compose_call(&#xD;&#xA;        call_module='Balances',&#xD;&#xA;        call_function=&quot;transfer&quot;,&#xD;&#xA;        call_params={&#xD;&#xA;            &quot;dest&quot;: &quot;***&quot;,&#xD;&#xA;            'value': 1 * 10**16,&#xD;&#xA;            &quot;gas_limit&quot;: 21000,&#xD;&#xA;         }&#xD;&#xA;    )&#xD;&#xA;    &#xD;&#xA;    # Form a signed extrinsic&#xD;&#xA;    extrinsic = substrate.create_signed_extrinsic(&#xD;&#xA;        call = call,&#xD;&#xA;        keypair = keypair,&#xD;&#xA;        nonce = substrate.get_account_nonce(keypair.ss58_address),&#xD;&#xA;    )&#xD;&#xA;    print(extrinsic)&#xD;&#xA;    &#xD;&#xA;    # Submit the extrinsic&#xD;&#xA;    try:&#xD;&#xA;        receipt = substrate.submit_extrinsic(&#xD;&#xA;            extrinsic,&#xD;&#xA;            wait_for_inclusion = True,&#xD;&#xA;        )&#xD;&#xA;        print(&quot;Extrinsic '{}' sent and included in block '{}'&quot;.format(receipt.extrinsic_hash, receipt.block_hash))&#xD;&#xA;    except SubstrateRequestException as e:&#xD;&#xA;        print(&quot;Failed to send: {}&quot;.format(e))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&gt; Failed to send: { 'code': 1002, 'message': 'Verification Error:&#xD;&#xA;&gt; Runtime error: Execution failed: Execution aborted due to trap: wasm&#xD;&#xA;&gt; trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n   &#xD;&#xA;&gt; 0: 0x44fa8a - &lt;unknown&gt;!rust_begin_unwind\n    1: 0x3922e4 -&#xD;&#xA;&gt; &lt;unknown&gt;!core::panicking::panic_fmt::h32de9c76c9d5eb0c\n    2:&#xD;&#xA;&gt; 0x1e31a5 - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\n',&#xD;&#xA;&gt; 'data': 'RuntimeApi(&quot;Execution failed: Execution aborted due to trap:&#xD;&#xA;&gt; wasm trap: wasm `unreachable` instruction executed\\nWASM&#xD;&#xA;&gt; backtrace:\\n\\n    0: 0x44fa8a - &lt;unknown&gt;!rust_begin_unwind\\n    1:&#xD;&#xA;&gt; 0x3922e4 - &lt;unknown&gt;!core::panicking::panic_fmt::h32de9c76c9d5eb0c\\n &#xD;&#xA;&gt; 2: 0x1e31a5 -&#xD;&#xA;&gt; &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction\\n&quot;)' }&#xD;&#xA;&#xD;&#xA;What could be the issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41467" PostHistoryTypeId="24" PostId="8139" RevisionGUID="aa4b7272-f83b-4e8f-b0b7-735132b8fa7e" CreationDate="2023-11-14T22:50:27.800" Comment="Proposed by 354 approved by 85, 34 edit id of 574" ContentLicense="CC BY-SA 4.0" />
  <row Id="41468" PostHistoryTypeId="5" PostId="10380" RevisionGUID="d45c455f-e0dc-4197-879a-a8cc3ed1ea80" CreationDate="2023-11-14T22:50:42.043" UserId="354" Comment="improved formatting" Text="Recently in [Ternoa mainnet][1] we performed a RU(runtime upgrade) to upgrade our versions to `polkato-v0.9.31`. In system pallet substrate have introduced new extrinsic `set_code` in this version which consumes `max_block_weight` which is not allowing us to do any RU from this version. &#xD;&#xA;&#xD;&#xA;When we checked these [answers][2] there are broadly two options to resolve this issue to perform a RU using a `sudo_unchecked_weight` or `utility -&gt; with_weight` function to override the weight. but `0.9.31` version's utility pallet doesn't have `with_weight` function and in our chain we don't have sudo pallet. So this is becoming a serious problem for us. ANY HELP WILL BE APPRECIATED. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.ternoa.network#/explorer&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/6940/427" ContentLicense="CC BY-SA 4.0" />
  <row Id="41469" PostHistoryTypeId="24" PostId="10380" RevisionGUID="d45c455f-e0dc-4197-879a-a8cc3ed1ea80" CreationDate="2023-11-14T22:50:42.043" Comment="Proposed by 354 approved by 116, 34 edit id of 600" ContentLicense="CC BY-SA 4.0" />
  <row Id="41470" PostHistoryTypeId="5" PostId="9926" RevisionGUID="ea997079-bdc0-4f7b-becd-2bc45cd47ee0" CreationDate="2023-11-14T22:50:46.230" UserId="354" Comment="improved formatting" Text="I am trying to build a parachain using `polkadot-v0.9.28` with the `sc-cli` lib in my project. I am trying this to hardcode a CORS origin in the `run_cmd` module. &#xD;&#xA;&#xD;&#xA;I am doing all this because defining origins using the CORS flag simply doesn't work for any origin besides all or default.&#xD;&#xA;&#xD;&#xA;But I am getting build errors and can't see how to try fixing it.&#xD;&#xA;[![enter image description here][1]][1] [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Can I try hardcoding the CORS origin another way? Any help is appreciated :)&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/CcIau.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/MYmeA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41471" PostHistoryTypeId="24" PostId="9926" RevisionGUID="ea997079-bdc0-4f7b-becd-2bc45cd47ee0" CreationDate="2023-11-14T22:50:46.230" Comment="Proposed by 354 approved by 85, 34 edit id of 567" ContentLicense="CC BY-SA 4.0" />
  <row Id="41472" PostHistoryTypeId="5" PostId="9804" RevisionGUID="112e7c9a-be9b-4a77-afe6-a221d42e6943" CreationDate="2023-11-14T22:51:00.717" UserId="3136" Comment="code modified in body" Text="I successfully confirmed the transfer of `DOTs` to `Acala` using Ledger. However, I'm encountering an issue when attempting to validate withdrawals or staking. Both Polkadot and Ledger have been updated to their latest versions, and `Acala` is properly installed on the Ledger device. Here's the error message I'm receiving:&#xD;&#xA;[https://apps.acala.network/ldot]&#xD;&#xA;chain	Acala&#xD;&#xA;version	2180&#xD;&#xA;nonce	0&#xD;&#xA;method	&#xD;&#xA;xTokens.transfer(currencyId, amount, dest, destWeightLimit)&#xD;&#xA;info	&#xD;&#xA;lifetime	mortal, valid from 4,353,611 to 4,353,643&#xD;&#xA;Txn version not supported" ContentLicense="CC BY-SA 4.0" />
  <row Id="41473" PostHistoryTypeId="24" PostId="9804" RevisionGUID="112e7c9a-be9b-4a77-afe6-a221d42e6943" CreationDate="2023-11-14T22:51:00.717" Comment="Proposed by 3136 approved by 85, 34 edit id of 572" ContentLicense="CC BY-SA 4.0" />
  <row Id="41474" PostHistoryTypeId="5" PostId="10161" RevisionGUID="2db34c8a-1650-46bc-a893-d45f3d35b9a9" CreationDate="2023-11-14T22:51:07.590" UserId="3136" Comment="correct the msg format" Text="I've made an attempt to incorporate the &quot;pallet-democracy&quot; into my Substrate runtime. In the runtime/Cargo.toml file of my Substrate node template, I've added the following configuration:&#xD;&#xA;&#xD;&#xA;&gt; pallet-democracy = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;I also included &quot;pallet-democracy/std&quot; in the list of features. However, I'm struggling to determine the next steps or how to configure the runtime effectively.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;I've followed the official substrate documentation, &quot;Add a pallet to the runtime,&quot; to follow the process. &#xD;&#xA;&#xD;&#xA;Has anyone done this before and can help with the correct procedure?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41475" PostHistoryTypeId="24" PostId="10161" RevisionGUID="2db34c8a-1650-46bc-a893-d45f3d35b9a9" CreationDate="2023-11-14T22:51:07.590" Comment="Proposed by 3136 approved by 116, 34 edit id of 593" ContentLicense="CC BY-SA 4.0" />
  <row Id="41476" PostHistoryTypeId="5" PostId="10118" RevisionGUID="eb0341b5-a3f4-4fa2-831f-0e661d21f4a2" CreationDate="2023-11-14T22:51:12.630" UserId="116" Comment="Spellcheck and language" Text="I was using substrate-node-template, and created some benchmarking functions.&#xD;&#xA;&#xD;&#xA;I was able to use bounded_vec macro in tests.rs but, can't able to use it in the benchmarking.rs file&#xD;&#xA;&#xD;&#xA;my code&#xD;&#xA;```&#xD;&#xA;#![cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;use super::*;&#xD;&#xA;&#xD;&#xA;#[allow(unused)]&#xD;&#xA;use crate::Pallet as Template;&#xD;&#xA;use frame_benchmarking::v2::*;&#xD;&#xA;use frame_support::bounded_vec;&#xD;&#xA;use frame_system::RawOrigin;&#xD;&#xA;&#xD;&#xA;#[benchmarks]&#xD;&#xA;mod benchmarks {&#xD;&#xA;	use super::*;&#xD;&#xA;&#xD;&#xA;	#[benchmark]&#xD;&#xA;	fn store() {&#xD;&#xA;		let caller: T::AccountId = whitelisted_caller();&#xD;&#xA;		#[extrinsic_call]&#xD;&#xA;		store(&#xD;&#xA;			RawOrigin::Signed(caller),&#xD;&#xA;			b&quot;1&quot;.to_vec().try_into().unwrap(),&#xD;&#xA;			b&quot;1&quot;.to_vec().try_into().unwrap(),&#xD;&#xA;			b&quot;1&quot;.to_vec().try_into().unwrap(),&#xD;&#xA;			bounded_vec![Types{ key: b&quot;1&quot;.to_vec().try_into().unwrap(), is_accepted: false }],&#xD;&#xA;		);&#xD;&#xA;	}&#xD;&#xA;    impl_benchmark_test_suite!(Template, crate::mock::new_test_ext(), crate::mock::Test);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;it was working fine when trying to compile ```cargo t -p pallet-template -F runtime-benchmarks```&#xD;&#xA;&#xD;&#xA;but, it was throwing errors while trying to compile with &#xD;&#xA;```cargo t -p node-template-runtime -F runtime-benchmarks```&#xD;&#xA;&#xD;&#xA;error&#xD;&#xA; ```&#xD;&#xA; error: cannot determine resolution for the macro `bounded_vec`&#xD;&#xA;    --&gt; /mnt/c/Users/pavan/PROJECTS/substrate-node-template/pallets/template/src/benchmarking.rs:24:4&#xD;&#xA;     |&#xD;&#xA;  24 |             bounded_vec![Types{ key: b&quot;1&quot;.to_vec().try_into().unwrap(), is_accepted: false }],&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41477" PostHistoryTypeId="4" PostId="10118" RevisionGUID="eb0341b5-a3f4-4fa2-831f-0e661d21f4a2" CreationDate="2023-11-14T22:51:12.630" UserId="116" Comment="Spellcheck and language" Text="How to use bounded_vec macro in benchmarking.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="41478" PostHistoryTypeId="24" PostId="10118" RevisionGUID="eb0341b5-a3f4-4fa2-831f-0e661d21f4a2" CreationDate="2023-11-14T22:51:12.630" Comment="Proposed by 116 approved by 34 edit id of 602" ContentLicense="CC BY-SA 4.0" />
  <row Id="41479" PostHistoryTypeId="5" PostId="10407" RevisionGUID="1ac66152-3d48-4a70-807a-55ef2ca4944c" CreationDate="2023-11-14T22:51:21.770" UserId="116" Comment="added 80 characters in body" Text="Questions about utility-pallet, and its members batch, batch-all and force-batch" ContentLicense="CC BY-SA 4.0" />
  <row Id="41480" PostHistoryTypeId="24" PostId="10407" RevisionGUID="1ac66152-3d48-4a70-807a-55ef2ca4944c" CreationDate="2023-11-14T22:51:21.770" Comment="Proposed by 116 approved by 34 edit id of 606" ContentLicense="CC BY-SA 4.0" />
  <row Id="41481" PostHistoryTypeId="5" PostId="10372" RevisionGUID="ffdfe418-65c2-4cc2-a38e-f709f7ed17bd" CreationDate="2023-11-14T22:51:26.330" UserId="116" Comment="Spellcheck and language and relevant flags" Text="I have cloned polkadot-sdk version 1.1.0. When I try to build binary it is throwing error. Can you please tell why  I am getting error as I have not changed anything in codebase yet. &#xD;&#xA;rust versions using. ==&gt; 1.72.0&#xD;&#xA;   nightly version. ==&gt;  1.75.0&#xD;&#xA;&#xD;&#xA;  [![Screenshot of error][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/RDdsV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41482" PostHistoryTypeId="6" PostId="10372" RevisionGUID="ffdfe418-65c2-4cc2-a38e-f709f7ed17bd" CreationDate="2023-11-14T22:51:26.330" UserId="116" Comment="Spellcheck and language and relevant flags" Text="|error|build|compile|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41483" PostHistoryTypeId="24" PostId="10372" RevisionGUID="ffdfe418-65c2-4cc2-a38e-f709f7ed17bd" CreationDate="2023-11-14T22:51:26.330" Comment="Proposed by 116 approved by 34 edit id of 599" ContentLicense="CC BY-SA 4.0" />
  <row Id="41484" PostHistoryTypeId="5" PostId="10406" RevisionGUID="385d3d85-b980-4e8f-8787-a4dad42b1b3a" CreationDate="2023-11-14T22:51:30.373" UserId="116" Comment="added 90 characters in body" Text="Utility pallet: https://paritytech.github.io/polkadot-sdk/master/pallet_utility/index.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="41485" PostHistoryTypeId="24" PostId="10406" RevisionGUID="385d3d85-b980-4e8f-8787-a4dad42b1b3a" CreationDate="2023-11-14T22:51:30.373" Comment="Proposed by 116 approved by 34 edit id of 605" ContentLicense="CC BY-SA 4.0" />
  <row Id="41486" PostHistoryTypeId="5" PostId="2216" RevisionGUID="4e3a0964-11e7-4be9-8d36-970a8e4d00e9" CreationDate="2023-11-14T22:51:34.017" UserId="372" Comment="Remove introductory sentence not relevant to the question." Text="We are wondering if there is a way to put text/data into the genesis block. We would like to save some information about what blockchain stands for in that.&#xD;&#xA;&#xD;&#xA;We just want to know whether its possible or not. If yes, how to do it?&#xD;&#xA;&#xD;&#xA;Thanks in advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="41487" PostHistoryTypeId="24" PostId="2216" RevisionGUID="4e3a0964-11e7-4be9-8d36-970a8e4d00e9" CreationDate="2023-11-14T22:51:34.017" Comment="Proposed by 372 approved by 85, 34 edit id of 589" ContentLicense="CC BY-SA 4.0" />
  <row Id="41488" PostHistoryTypeId="5" PostId="10241" RevisionGUID="59afe8cc-bc85-4abb-8dd8-9dc650e53ead" CreationDate="2023-11-14T22:51:40.723" UserId="354" Comment="improved formatting" Text="Can we call one of the pallet functions somehow, from [Ink smart contract][1]?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/" ContentLicense="CC BY-SA 4.0" />
  <row Id="41489" PostHistoryTypeId="24" PostId="10241" RevisionGUID="59afe8cc-bc85-4abb-8dd8-9dc650e53ead" CreationDate="2023-11-14T22:51:40.723" Comment="Proposed by 354 approved by 116, 34 edit id of 594" ContentLicense="CC BY-SA 4.0" />
  <row Id="41490" PostHistoryTypeId="5" PostId="6820" RevisionGUID="53aa0687-b671-4ac3-9c2a-3ada45b2f7c0" CreationDate="2023-11-14T22:51:44.417" UserId="4913" Comment="Fixed grammar." Text="How many collators should a new parachain have if it doesn't have much load on it?&#xD;&#xA;What should be the analysis criteria to decide how many collators we need for our product.&#xD;&#xA;Can you share some thoughts on it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41491" PostHistoryTypeId="4" PostId="6820" RevisionGUID="53aa0687-b671-4ac3-9c2a-3ada45b2f7c0" CreationDate="2023-11-14T22:51:44.417" UserId="4913" Comment="Fixed grammar." Text="How many collators should a new parachain have if it doesn't have much load on it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41492" PostHistoryTypeId="24" PostId="6820" RevisionGUID="53aa0687-b671-4ac3-9c2a-3ada45b2f7c0" CreationDate="2023-11-14T22:51:44.417" Comment="Proposed by 4913 approved by 116, 34 edit id of 607" ContentLicense="CC BY-SA 4.0" />
  <row Id="41493" PostHistoryTypeId="5" PostId="10254" RevisionGUID="b7e69d22-13a1-497d-9b6c-16753ca33631" CreationDate="2023-11-14T22:51:48.153" UserId="354" Comment="improved formatting" Text="I run `cargo install  contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked`  and then got an error, version of the `proc-macro2` library is incompatible with the `proc_macro` module I see that it is or does not meet a specific configuration or version requirement regarding `proc_macro2`. &#xD;&#xA;&#xD;&#xA;What would be the reason? " ContentLicense="CC BY-SA 4.0" />
  <row Id="41494" PostHistoryTypeId="24" PostId="10254" RevisionGUID="b7e69d22-13a1-497d-9b6c-16753ca33631" CreationDate="2023-11-14T22:51:48.153" Comment="Proposed by 354 approved by 116, 34 edit id of 596" ContentLicense="CC BY-SA 4.0" />
  <row Id="41495" PostHistoryTypeId="5" PostId="10235" RevisionGUID="469b8c9e-d1d7-4ea4-92c0-9287d1e13151" CreationDate="2023-11-14T22:51:52.493" UserId="1918" Comment="Copy edited. Fixed the question formation - missing auxiliary (or helping) verb - see e.g. &lt;https://www.youtube.com/watch?v=t4yWEt0OSpg&amp;t=1m49s&gt; (see also &lt;https://www.youtube.com/watch?v=kS5NfSzXfrI&gt; (QUASM)) - alternatively, drop the question mark." Text="How can I send native tokens from a contract address to a user/externally owned account using an [Ink][1] smart contract?&#xD;&#xA;&#xD;&#xA;  [1]: https://use.ink/&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41496" PostHistoryTypeId="4" PostId="10235" RevisionGUID="469b8c9e-d1d7-4ea4-92c0-9287d1e13151" CreationDate="2023-11-14T22:51:52.493" UserId="1918" Comment="Copy edited. Fixed the question formation - missing auxiliary (or helping) verb - see e.g. &lt;https://www.youtube.com/watch?v=t4yWEt0OSpg&amp;t=1m49s&gt; (see also &lt;https://www.youtube.com/watch?v=kS5NfSzXfrI&gt; (QUASM)) - alternatively, drop the question mark." Text="How can I send a native token from a contract to an externally owned account in an ink smart contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41497" PostHistoryTypeId="24" PostId="10235" RevisionGUID="469b8c9e-d1d7-4ea4-92c0-9287d1e13151" CreationDate="2023-11-14T22:51:52.493" Comment="Proposed by 1918 approved by 116, 34 edit id of 595" ContentLicense="CC BY-SA 4.0" />
  <row Id="41498" PostHistoryTypeId="5" PostId="7728" RevisionGUID="2c050a70-77a5-42c8-9f25-27c7bc0c7284" CreationDate="2023-11-14T22:51:56.727" UserId="-1" Comment="correct minor issues" Text="Solution: The payload needs to be populated and formatted manually. Here is a complete example:&#xD;&#xA;&#xD;&#xA;Notes:&#xD;&#xA;- `era` is immortal, meaning the tx will always be valid.&#xD;&#xA;- `method` just requires a `Call` type of your api.query...&#xD;&#xA;- `from` is the signer / sender address.&#xD;&#xA;- Haven't tested this with batching.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;const lastHeader = await api.rpc.chain.getHeader();&#xD;&#xA;&#xD;&#xA;const nonce = (await api.query.system.account(from)).nonce.toNumber()&#xD;&#xA;&#xD;&#xA;const payload = {&#xD;&#xA;  specVersion: api.runtimeVersion.specVersion.toHex(),&#xD;&#xA;  transactionVersion: api.runtimeVersion.transactionVersion.toHex(),&#xD;&#xA;  address: from,&#xD;&#xA;  blockHash: lastHeader.hash.toHex(),&#xD;&#xA;  blockNumber: lastHeader.number.toHex(),&#xD;&#xA;  era: tx.era,&#xD;&#xA;  genesisHash: api.genesisHash.toHex(),&#xD;&#xA;  method: api.createType('Call', tx).toHex(),&#xD;&#xA;  nonce,&#xD;&#xA;  signedExtensions: Object.values(&#xD;&#xA;    api.registry.metadata.extrinsic.signedExtensions.toHuman() || {}&#xD;&#xA;  )?.map((e: any) =&gt; e.identifier),&#xD;&#xA;  tip: tx.tip.toHex(),&#xD;&#xA;  version: tx.version,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const raw = api.registry.createType('ExtrinsicPayload', payload);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41499" PostHistoryTypeId="24" PostId="7728" RevisionGUID="2c050a70-77a5-42c8-9f25-27c7bc0c7284" CreationDate="2023-11-14T22:51:56.727" Comment="Proposed by anonymous approved by 85, 34 edit id of 584" ContentLicense="CC BY-SA 4.0" />
  <row Id="41501" PostHistoryTypeId="10" PostId="10201" RevisionGUID="4497b9ca-532e-49f8-8d88-f50306c1300e" CreationDate="2023-11-14T22:52:48.253" UserId="34" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:165,&quot;DisplayName&quot;:&quot;Alejandro Martínez&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Nuke&quot;}]}" />
  <row Id="41502" PostHistoryTypeId="10" PostId="10390" RevisionGUID="132c22c1-5388-408d-b1d2-d938f6e6da36" CreationDate="2023-11-14T22:53:01.280" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[7732],&quot;Voters&quot;:[{&quot;Id&quot;:380,&quot;DisplayName&quot;:&quot;forgetso&quot;},{&quot;Id&quot;:116,&quot;DisplayName&quot;:&quot;Simson&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Nuke&quot;}]}" />
  <row Id="41503" PostHistoryTypeId="10" PostId="8396" RevisionGUID="be4bbec6-8d05-4623-9af6-eb9f62d964ad" CreationDate="2023-11-14T22:53:18.270" UserId="34" Comment="104" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:251,&quot;DisplayName&quot;:&quot;AurevoirXavier&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Nuke&quot;}]}" />
  <row Id="41505" PostHistoryTypeId="2" PostId="10462" RevisionGUID="b1504ab6-8e31-47a2-9830-c6cee070d1a6" CreationDate="2023-11-14T22:55:03.757" UserId="4391" Text="It turns out the issue was that the build scripts that were running during compilation were by default targeting ```-mmacosx-version-min=10.7``` which meant that some features were not available.&#xD;&#xA;&#xD;&#xA;The fix was to add the following environment variable:&#xD;&#xA;&#xD;&#xA;```export MACOSX_DEPLOYMENT_TARGET=10.13```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41507" PostHistoryTypeId="2" PostId="10463" RevisionGUID="5eacca20-a7ff-44aa-8c5a-f5fc5c1cb208" CreationDate="2023-11-14T23:00:49.137" UserId="3598" Text="Do I need to run a pallet storage migrations even when I'm just adding the pallet to the runtime for the first time?&#xD;&#xA;&#xD;&#xA;This question came up because while testing the upgrade using the try-runtime cli, for pallets that where recently added but the storage version is greater than zero I get an error indicating that &quot;the on chain storage version and the current storage versions are different.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="41509" PostHistoryTypeId="1" PostId="10463" RevisionGUID="5eacca20-a7ff-44aa-8c5a-f5fc5c1cb208" CreationDate="2023-11-14T23:00:49.137" UserId="3598" Text="Do I need to run a pallet storage migrations even when I'm just adding the pallet to the runtime for the first time?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41510" PostHistoryTypeId="3" PostId="10463" RevisionGUID="5eacca20-a7ff-44aa-8c5a-f5fc5c1cb208" CreationDate="2023-11-14T23:00:49.137" UserId="3598" Text="|try-runtime|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41511" PostHistoryTypeId="5" PostId="10455" RevisionGUID="243c4e3c-d60b-462c-9f15-bcf786264440" CreationDate="2023-11-15T01:15:45.847" UserId="2844" Comment="deleted 5 characters in body" Text="I want to generate keys for my parachain-template-node but using this command gives me error. &#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % ./target/release/parachain-template-node key generate --scheme Sr25519 --password-interactive&#xD;&#xA;    error: unexpected argument 'key' found&#xD;&#xA;    &#xD;&#xA;    Usage: parachain-template-node [OPTIONS] [-- &lt;RELAY_CHAIN_ARGS&gt;...]&#xD;&#xA;           parachain-template-node &lt;COMMAND&gt;&#xD;&#xA;    &#xD;&#xA;    For more information, try '--help'.&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % &#xD;&#xA;&#xD;&#xA;I use command from [here](https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/#generate-your-account-and-keys)&#xD;&#xA;&#xD;&#xA;Is the command changed? Someone please help me." ContentLicense="CC BY-SA 4.0" />
  <row Id="41512" PostHistoryTypeId="2" PostId="10464" RevisionGUID="0c56e4b6-0d57-47d7-8a03-744a3d5c59ff" CreationDate="2023-11-15T02:20:11.977" UserId="116" Text="When integrating pallet-contracts v10 storage migration in `pub type Migrations`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use pallet_contracts::migration::{v10, v11, v12};&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	v10::Migration&lt;Runtime&gt;,&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get an error about trait bounds not satisfied&#xD;&#xA;&#xD;&#xA;&gt;= note: the following trait bounds were not satisfied:&#xD;&#xA;&gt;        `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;First I thought this was a [duplicate][1] but my Cargo.toml `[try-runtime]` section already included the  `&quot;pallet-contracts/try-runtime&quot; `clause.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first in a series of similar errors is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error[E0599]: the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, ...&gt;, ..., ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /home/simson/nodle/chain/runtimes/eden/src/lib.rs:237:15&#xD;&#xA;      |&#xD;&#xA;  237 |             Executive::execute_block(block)&#xD;&#xA;      |                        ^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/home/simson/nodle/chain/target/release/wbuild/runtime-eden/target/wasm32-unknown-unknown/release/deps/runtime_eden-709135493b42bf5f.long-type-12564475873963747691.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The long type from the file above:&#xD;&#xA;```&#xD;&#xA;frame_executive::Executive&lt;Runtime, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, polkadot_primitives::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;, ChargeSponsor&lt;Runtime&gt;)&gt;&gt;, ChainContext&lt;Runtime&gt;, Runtime, (frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_insecure_randomness_collective_flip::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_reserve::Pallet&lt;Runtime, Instance1&gt;, pallet_reserve::Pallet&lt;Runtime, Instance2&gt;, pallet_reserve::Pallet&lt;Runtime, Instance3&gt;, pallet_grants::Pallet&lt;Runtime&gt;, pallet_mandate::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance3&gt;, pallet_collator_selection::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_uniques::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, pallet_nodle_uniques::Pallet&lt;Runtime&gt;, pallet_sponsorship::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, pallet_allocations::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_reserve::Pallet&lt;Runtime, Instance4&gt;, pallet_contracts::Pallet&lt;Runtime&gt;), (pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,)&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the compiler trying to tell me here? What flag could be missing?&#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/questions/8219/trait-bounds-not-satisfied-with-executivetry-runtime-upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="41514" PostHistoryTypeId="1" PostId="10464" RevisionGUID="0c56e4b6-0d57-47d7-8a03-744a3d5c59ff" CreationDate="2023-11-15T02:20:11.977" UserId="116" Text="Integrating storage migration for pallet-contracts" ContentLicense="CC BY-SA 4.0" />
  <row Id="41515" PostHistoryTypeId="3" PostId="10464" RevisionGUID="0c56e4b6-0d57-47d7-8a03-744a3d5c59ff" CreationDate="2023-11-15T02:20:11.977" UserId="116" Text="|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41516" PostHistoryTypeId="2" PostId="10465" RevisionGUID="5d964372-da88-4380-bd59-173b1a40854b" CreationDate="2023-11-15T02:50:35.113" UserId="251" Text="It varies depending on the pallet. For certain pallets, you must configure the genesis data.&#xD;&#xA;&#xD;&#xA;If there is no genesis data that needs to be set, you can disregard the migration and manually set the storage version.&#xD;&#xA;&#xD;&#xA;Refer to https://github.com/darwinia-network/darwinia/blame/96d48b943b903e941132b7fbb69a7c40cfd4573a/runtime/crab/src/migration.rs#L47-L51 for more information." ContentLicense="CC BY-SA 4.0" />
  <row Id="41518" PostHistoryTypeId="5" PostId="10463" RevisionGUID="f53fbc63-5810-48e1-a467-1a77495671f4" CreationDate="2023-11-15T03:03:32.577" UserId="3598" Comment="added 19 characters in body" Text="Do I need to run a pallet storage migrations even when I'm just adding the pallet to the runtime for the first time?&#xD;&#xA;&#xD;&#xA;This question came up because while testing the upgrade using the try-runtime cli, for pallets that where recently added but the storage version is greater than zero I get the following error ```On chain storage version StorageVersion(0) doesn't match current storage version StorageVersion(4).```&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="41520" PostHistoryTypeId="6" PostId="10464" RevisionGUID="97b58e82-e2d8-4923-b646-0580f643c576" CreationDate="2023-11-15T06:39:58.150" UserId="116" Comment="edited tags" Text="|try-runtime|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41521" PostHistoryTypeId="52" PostId="10463" RevisionGUID="00c4ca5b-1b10-461d-b290-caad01f960ad" CreationDate="2023-11-15T07:06:05.297" />
  <row Id="41522" PostHistoryTypeId="2" PostId="10466" RevisionGUID="005e6457-1313-4bb8-b5e3-810a176bdf76" CreationDate="2023-11-15T07:23:47.853" UserId="2762" Text="In the tutorial is not using the `parachain-node-template`, is using the `node-template`, in the node-template we have the `key` subcommand that is a CLI for key management but in parachain-node-template we don't have this feature.&#xD;&#xA;&#xD;&#xA;See the code for the `node-template` [here][1]:&#xD;&#xA;```rs&#xD;&#xA;pub enum Subcommand {&#xD;&#xA;    /// Key management cli utilities&#xD;&#xA;	#[command(subcommand)]&#xD;&#xA;	Key(sc_cli::KeySubcommand),&#xD;&#xA;```&#xD;&#xA;And notice is different for the `parachain-node-template` [here][2].&#xD;&#xA;&#xD;&#xA;But there are several ways you can generate keys, you can use the standalone `subkey` command-line program. See here how to use it from the `polkadot-sdk` repository: [Subkey tutorial][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/cli.rs#L17&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/node/src/cli.rs#L5&#xD;&#xA;  [3]: https://docs.substrate.io/reference/command-line-tools/subkey/" ContentLicense="CC BY-SA 4.0" />
  <row Id="41530" PostHistoryTypeId="2" PostId="10469" RevisionGUID="9d96951b-74e1-41b4-8983-79b3fb055afe" CreationDate="2023-11-15T14:42:14.190" UserId="4939" Text="In substrate all the existing frames assume a &quot;static&quot; set of Collectives, defined at runtime and with direct management of members using membership frame.  &#xD;&#xA;&#xD;&#xA;Does anyone have or know of a good example of dynamic collective creation.  Similar to CosmosSDKs group module?  &#xD;&#xA;&#xD;&#xA;Other than implementing everything from the ground up, any way to use collective and membership frame that exist but in a &quot;create collective&quot; kind of way." ContentLicense="CC BY-SA 4.0" />
  <row Id="41532" PostHistoryTypeId="1" PostId="10469" RevisionGUID="9d96951b-74e1-41b4-8983-79b3fb055afe" CreationDate="2023-11-15T14:42:14.190" UserId="4939" Text="Dynamic Collectives" ContentLicense="CC BY-SA 4.0" />
  <row Id="41533" PostHistoryTypeId="3" PostId="10469" RevisionGUID="9d96951b-74e1-41b4-8983-79b3fb055afe" CreationDate="2023-11-15T14:42:14.190" UserId="4939" Text="|frame|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41534" PostHistoryTypeId="2" PostId="10470" RevisionGUID="134be0f8-3aaf-4f8f-a695-9687adbe789e" CreationDate="2023-11-15T15:35:15.577" UserId="251" Text="https://github.com/paritytech/polkadot-sdk/blob/0226b55f9ffff28821458a71c84eb5d3e75f1794/substrate/frame/collective/src/lib.rs#L1059&#xD;&#xA;&#xD;&#xA;`ChangeMembers` trait is implemented for collective pallet. So you can write anything to interacte with this trait(interface).&#xD;&#xA;&#xD;&#xA;For example, you can write something like this in a pallet:&#xD;&#xA;```rs&#xD;&#xA;// pallet-example/lib.rs&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;    type ChangeMembers: ChangeMembers;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::hooks]&#xD;&#xA;impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;    fn on_initialize(_: BlockNumberFor&lt;T&gt;) -&gt; Weight {&#xD;&#xA;        T::ChangeMembers::change_members_sorted(..);&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// runtime/lib.rs&#xD;&#xA;impl pallet_example::Config for Runtime {&#xD;&#xA;    type ChangeMembers = Council;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;frame_support::construct_runtime! {&#xD;&#xA;    Council,&#xD;&#xA;    PalletExample,&#xD;&#xA;    ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then you have a pallet that it can change the council members in every block." ContentLicense="CC BY-SA 4.0" />
  <row Id="41536" PostHistoryTypeId="2" PostId="10471" RevisionGUID="a17b6a22-1b5f-4e47-ae40-167d258ad8cf" CreationDate="2023-11-15T18:53:41.127" UserId="4426" Text="I'm trying to figure out how to accurately determine the total amount of token rewards received by a nominator in the network. Specifically, I'm interested in the following:&#xD;&#xA;&#xD;&#xA; 1. **The Total Rewards in Tokens**: I am seeking a method to calculate the total tokens (not reward points) that a nominator has accrued to date for their role in nominating validators. This figure represents the nominator's total payouts from staking activity.&#xD;&#xA; 2. **Address-Specific Query**: The solution should allow for querying this information based on a specific nominator's address.&#xD;&#xA;&#xD;&#xA;Steps I followed to get this data:&#xD;&#xA;&#xD;&#xA; 1. Retrieve the eras in which the address has claimed rewards. Below is the code snippet:&#xD;&#xA;    ```typescript&#xD;&#xA;    const data = await api.query.staking.ledger(address);&#xD;&#xA;    const ledger = data.unwrap();&#xD;&#xA;    const claimedRewards = ledger.claimedRewards;&#xD;&#xA;    ```&#xD;&#xA;    &#xD;&#xA;    [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;    [1]: https://i.stack.imgur.com/sRuMO.png&#xD;&#xA;&#xD;&#xA; 2. Loop through each era to obtain the `totalRewardPoints` received by the address in that &#xD;&#xA;    era, as well as the `totalRewardPoints` for all addresses combined.&#xD;&#xA;&#xD;&#xA; 3. Fetch the `totalRewardedAmount` in tokens for an era:&#xD;&#xA;    ```typescript&#xD;&#xA;     const totalRewardedAmount = await api.query.staking.erasValidatorReward(&#xD;&#xA;        rewardedEra&#xD;&#xA;      );&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA; 4. I couldn’t find official documentation for the formula to calculate the total rewarded &#xD;&#xA;    amount for a nominator in a specific era, but I obtained this formula from ChatGPT:&#xD;&#xA;    &#xD;&#xA;    `totalRewardedTokensOfNominatorInAnEra = (nominatorRewardPointsOfTheEra / &#xD;&#xA;     totalRewardedPointsOfTheEra) * totalRewardedTokensOfTheEra`&#xD;&#xA;&#xD;&#xA;Below is the full code snippet of the `getTotalRewardedAmount` function:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const getTotalRewardedAmount = async (address: string) =&gt; {&#xD;&#xA;  const api = await getPolkadotApiPromise();&#xD;&#xA;&#xD;&#xA;  if (!api) return '';&#xD;&#xA;&#xD;&#xA;  try {&#xD;&#xA;    const data = await api.query.staking.ledger(address);&#xD;&#xA;    const ledger = data.unwrapOrDefault();&#xD;&#xA;    const claimedRewards = ledger.claimedRewards;&#xD;&#xA;&#xD;&#xA;    const rewardedEras = new Set(&#xD;&#xA;      claimedRewards.map((claimedReward) =&gt; claimedReward.toNumber())&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    for (const rewardedEra of rewardedEras) {&#xD;&#xA;      const eraReward = await api.query.staking.erasRewardPoints(rewardedEra);&#xD;&#xA;      const individuals = JSON.parse(JSON.stringify(eraReward.individual));&#xD;&#xA;      let individualRewardPoints = individuals[address] || 0;&#xD;&#xA;&#xD;&#xA;      individualRewardPoints = Number(individualRewardPoints);&#xD;&#xA;      const totalRewardedPoints = eraReward.total.toNumber();&#xD;&#xA;&#xD;&#xA;      const totalRewardedAmount = await api.query.staking.erasValidatorReward(&#xD;&#xA;        rewardedEra&#xD;&#xA;      );&#xD;&#xA;      &#xD;&#xA;      const totalRewardedTokens = Number(totalRewardedAmount.toString());&#xD;&#xA;&#xD;&#xA;      const individualRewardTokens =&#xD;&#xA;        (individualRewardPoints / totalRewardedPoints) * totalRewardedTokens;&#xD;&#xA;&#xD;&#xA;      console.log(&#xD;&#xA;        `Total Rewarded Tokens for Nominator: ${individualRewardTokens} for Era: ${rewardedEra}`&#xD;&#xA;      );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    return '';&#xD;&#xA;  } catch (e) {&#xD;&#xA;    console.error(e);&#xD;&#xA;    return '';&#xD;&#xA;  }&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When using this function, I'm not obtaining the correct values. Also, it appears there’s no straightforward solution to calculate the total rewards (in tokens, not points) earned by a nominator. The calculation involves considering factors like validator commission, total rewards given in an era, etc.&#xD;&#xA;&#xD;&#xA;I am seeking guidance on the appropriate API queries to perform for this task. Is there a specific module or function that facilitates this kind of query? Thank you in advance for your assistance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="41538" PostHistoryTypeId="1" PostId="10471" RevisionGUID="a17b6a22-1b5f-4e47-ae40-167d258ad8cf" CreationDate="2023-11-15T18:53:41.127" UserId="4426" Text="How to Calculate the Total Tokens Rewarded to a Nominator?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41539" PostHistoryTypeId="3" PostId="10471" RevisionGUID="a17b6a22-1b5f-4e47-ae40-167d258ad8cf" CreationDate="2023-11-15T18:53:41.127" UserId="4426" Text="|polkadot-js|rewards|nominator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41540" PostHistoryTypeId="5" PostId="10471" RevisionGUID="46f14436-1fa6-4167-ba6b-6d00d96d8aa9" CreationDate="2023-11-15T18:58:18.587" UserId="4426" Comment="deleted 10 characters in body" Text="I'm trying to figure out how to accurately determine the total amount of token rewards received by a nominator in the network. Specifically, I'm interested in the following:&#xD;&#xA;&#xD;&#xA; 1. **The Total Rewards in Tokens**: I am seeking a method to calculate the total tokens (not reward points) that a nominator has accrued to date for their role in nominating validators. This figure represents the nominator's total payouts from staking activity.&#xD;&#xA; 2. **Address-Specific Query**: The solution should allow for querying this information based on a specific nominator's address.&#xD;&#xA;&#xD;&#xA;Steps I followed to get this data:&#xD;&#xA;&#xD;&#xA; 1. Retrieve the eras in which the address has claimed rewards. Below is the code snippet:&#xD;&#xA;    ```typescript&#xD;&#xA;    const data = await api.query.staking.ledger(address);&#xD;&#xA;    const ledger = data.unwrap();&#xD;&#xA;    const claimedRewards = ledger.claimedRewards;&#xD;&#xA;    ```&#xD;&#xA;    &#xD;&#xA;    [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;    [1]: https://i.stack.imgur.com/sRuMO.png&#xD;&#xA;&#xD;&#xA; 2. Loop through each era to obtain the `totalRewardPoints` received by the address in that &#xD;&#xA;    era, as well as the `totalRewardPoints` for all addresses combined.&#xD;&#xA;&#xD;&#xA; 3. Fetch the `totalRewardedAmount` in tokens for an era:&#xD;&#xA;    ```typescript&#xD;&#xA;     const totalRewardedAmount = await api.query.staking.erasValidatorReward(&#xD;&#xA;        rewardedEra&#xD;&#xA;      );&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA; 4. I couldn’t find official documentation for the formula to calculate the total rewarded &#xD;&#xA;    amount for a nominator in a specific era, but I obtained this formula from ChatGPT:&#xD;&#xA;    &#xD;&#xA;    `totalRewardedTokensOfNominatorInAnEra = (nominatorRewardPointsOfTheEra / &#xD;&#xA;     totalRewardedPointsOfTheEra) * totalRewardedTokensOfTheEra`&#xD;&#xA;&#xD;&#xA;Below is the full code snippet of the `getTotalRewardedAmount` function:&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;const getTotalRewardedAmount = async (address: string) =&gt; {&#xD;&#xA;  const api = await getPolkadotApiPromise();&#xD;&#xA;&#xD;&#xA;  if (!api) return '';&#xD;&#xA;&#xD;&#xA;  try {&#xD;&#xA;    const data = await api.query.staking.ledger(address);&#xD;&#xA;    const ledger = data.unwrapOrDefault();&#xD;&#xA;    const claimedRewards = ledger.claimedRewards;&#xD;&#xA;&#xD;&#xA;    const rewardedEras = claimedRewards.map((claimedReward) =&gt;&#xD;&#xA;      claimedReward.toNumber()&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    for (const rewardedEra of rewardedEras) {&#xD;&#xA;      const eraReward = await api.query.staking.erasRewardPoints(rewardedEra);&#xD;&#xA;      const individuals = JSON.parse(JSON.stringify(eraReward.individual));&#xD;&#xA;      let individualRewardPoints = individuals[address] || 0;&#xD;&#xA;&#xD;&#xA;      individualRewardPoints = Number(individualRewardPoints);&#xD;&#xA;      const totalRewardedPoints = eraReward.total.toNumber();&#xD;&#xA;&#xD;&#xA;      const totalRewardedAmount = await api.query.staking.erasValidatorReward(&#xD;&#xA;        rewardedEra&#xD;&#xA;      );&#xD;&#xA;      &#xD;&#xA;      const totalRewardedTokens = Number(totalRewardedAmount.toString());&#xD;&#xA;&#xD;&#xA;      const individualRewardTokens =&#xD;&#xA;        (individualRewardPoints / totalRewardedPoints) * totalRewardedTokens;&#xD;&#xA;&#xD;&#xA;      console.log(&#xD;&#xA;        `Total Rewarded Tokens for Nominator: ${individualRewardTokens} for Era: ${rewardedEra}`&#xD;&#xA;      );&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    return '';&#xD;&#xA;  } catch (e) {&#xD;&#xA;    console.error(e);&#xD;&#xA;    return '';&#xD;&#xA;  }&#xD;&#xA;};&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When using this function, I'm not obtaining the correct values. Also, it appears there’s no straightforward solution to calculate the total rewards (in tokens, not points) earned by a nominator. The calculation involves considering factors like validator commission, total rewards given in an era, etc.&#xD;&#xA;&#xD;&#xA;I am seeking guidance on the appropriate API queries to perform for this task. Is there a specific module or function that facilitates this kind of query? Thank you in advance for your assistance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="41541" PostHistoryTypeId="50" PostId="10209" RevisionGUID="4820b3a5-1351-42ea-a192-6ab285d288e6" CreationDate="2023-11-15T19:06:05.820" UserId="-1" />
  <row Id="41542" PostHistoryTypeId="5" PostId="10466" RevisionGUID="501d5e1e-cac8-41c1-a667-a1f34b89729a" CreationDate="2023-11-15T23:37:57.907" UserId="116" Comment="Language style" Text="The tutorial is not using `parachain-node-template`,it uses the `node-template`. In the node-template we have the `key` subcommand that is a CLI for key management but in parachain-node-template this feature is not available.&#xD;&#xA;&#xD;&#xA;See the code for the [`node-template`][1]:&#xD;&#xA;```rs&#xD;&#xA;pub enum Subcommand {&#xD;&#xA;    /// Key management cli utilities&#xD;&#xA;	#[command(subcommand)]&#xD;&#xA;	Key(sc_cli::KeySubcommand),&#xD;&#xA;```&#xD;&#xA;And notice is different for the [`parachain-node-template`][2].&#xD;&#xA;&#xD;&#xA;But there are several ways you can generate keys, you can use the standalone `subkey` command-line program. See here how to use it from the `polkadot-sdk` repository: [Subkey tutorial][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/cli.rs#L17&#xD;&#xA;  [2]: https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/node/src/cli.rs#L5&#xD;&#xA;  [3]: https://docs.substrate.io/reference/command-line-tools/subkey/" ContentLicense="CC BY-SA 4.0" />
  <row Id="41543" PostHistoryTypeId="2" PostId="10472" RevisionGUID="29ef7928-aab3-4875-9190-a670d7c1a4e9" CreationDate="2023-11-16T00:25:19.650" UserId="3598" Text="Some of the pallets storage migrations fail the idempotent test because in the pre_upgrade method there is an ensure! check to make sure that the current storage version is the one that applies for the migration, even if the actual on_runtime_upgrade does not fail if the storage has already been upgraded. So is it bad practice to perform this kind of ensure! checks in the pre_upgrade method? Ex. [The assets pallet migration performs this type of check.][1]&#xD;&#xA;&#xD;&#xA;Thanks,&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.3.0/substrate/frame/assets/src/migration.rs#L100" ContentLicense="CC BY-SA 4.0" />
  <row Id="41545" PostHistoryTypeId="1" PostId="10472" RevisionGUID="29ef7928-aab3-4875-9190-a670d7c1a4e9" CreationDate="2023-11-16T00:25:19.650" UserId="3598" Text="pallet storage migration fails try-runtime idempotent test" ContentLicense="CC BY-SA 4.0" />
  <row Id="41546" PostHistoryTypeId="3" PostId="10472" RevisionGUID="29ef7928-aab3-4875-9190-a670d7c1a4e9" CreationDate="2023-11-16T00:25:19.650" UserId="3598" Text="|try-runtime|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41547" PostHistoryTypeId="5" PostId="10464" RevisionGUID="1d55fc53-d5e9-400f-b28f-3752ee8751e8" CreationDate="2023-11-16T03:08:57.463" UserId="116" Comment="added 174 characters in body" Text="When integrating pallet-contracts v10 storage migration in `pub type Migrations`&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use pallet_contracts::migration::{v10, v11, v12};&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	v10::Migration&lt;Runtime&gt;,&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get an error about trait bounds not satisfied&#xD;&#xA;&#xD;&#xA;&gt;= note: the following trait bounds were not satisfied:&#xD;&#xA;&gt;        `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;First I thought this was a [duplicate][1] but my Cargo.toml `[try-runtime]` section already included the  `&quot;pallet-contracts/try-runtime&quot; `clause.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first in a series of similar errors is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error[E0599]: the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, ...&gt;, ..., ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /home/simson/nodle/chain/runtimes/eden/src/lib.rs:237:15&#xD;&#xA;      |&#xD;&#xA;  237 |             Executive::execute_block(block)&#xD;&#xA;      |                        ^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/home/simson/nodle/chain/target/release/wbuild/runtime-eden/target/wasm32-unknown-unknown/release/deps/runtime_eden-709135493b42bf5f.long-type-12564475873963747691.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The long type from the file above:&#xD;&#xA;```&#xD;&#xA;frame_executive::Executive&lt;Runtime, sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, polkadot_primitives::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;, ChargeSponsor&lt;Runtime&gt;)&gt;&gt;, ChainContext&lt;Runtime&gt;, Runtime, (frame_system::Pallet&lt;Runtime&gt;, pallet_timestamp::Pallet&lt;Runtime&gt;, pallet_balances::Pallet&lt;Runtime&gt;, pallet_transaction_payment::Pallet&lt;Runtime&gt;, pallet_insecure_randomness_collective_flip::Pallet&lt;Runtime&gt;, pallet_scheduler::Pallet&lt;Runtime&gt;, pallet_reserve::Pallet&lt;Runtime, Instance1&gt;, pallet_reserve::Pallet&lt;Runtime, Instance2&gt;, pallet_reserve::Pallet&lt;Runtime, Instance3&gt;, pallet_grants::Pallet&lt;Runtime&gt;, pallet_mandate::Pallet&lt;Runtime&gt;, pallet_collective::Pallet&lt;Runtime, Instance1&gt;, pallet_membership::Pallet&lt;Runtime, Instance3&gt;, pallet_collator_selection::Pallet&lt;Runtime&gt;, pallet_authorship::Pallet&lt;Runtime&gt;, pallet_session::Pallet&lt;Runtime&gt;, pallet_aura::Pallet&lt;Runtime&gt;, cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, parachain_info::Pallet&lt;Runtime&gt;, cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, pallet_xcm::Pallet&lt;Runtime&gt;, orml_xtokens::Pallet&lt;Runtime&gt;, pallet_utility::Pallet&lt;Runtime&gt;, pallet_multisig::Pallet&lt;Runtime&gt;, pallet_uniques::Pallet&lt;Runtime&gt;, pallet_preimage::Pallet&lt;Runtime&gt;, pallet_nodle_uniques::Pallet&lt;Runtime&gt;, pallet_sponsorship::Pallet&lt;Runtime&gt;, pallet_identity::Pallet&lt;Runtime&gt;, pallet_allocations::Pallet&lt;Runtime&gt;, pallet_membership::Pallet&lt;Runtime, Instance2&gt;, pallet_reserve::Pallet&lt;Runtime, Instance4&gt;, pallet_contracts::Pallet&lt;Runtime&gt;), (pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,)&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What is the compiler trying to tell me here? What flag could be missing?**&#xD;&#xA;&#xD;&#xA;*update*:&#xD;&#xA;```&#xD;&#xA;const TEST_ALL_STEPS: bool = cfg!(feature = &quot;try-runtime&quot;);&#xD;&#xA;&#xD;&#xA;pub type Migrations = (pallet_contracts::Migration&lt;Runtime,TEST_ALL_STEPS&gt;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;will not work as my migration is from 9 to 12&#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/questions/8219/trait-bounds-not-satisfied-with-executivetry-runtime-upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="41552" PostHistoryTypeId="2" PostId="10473" RevisionGUID="96a128fc-6c2f-42d8-9e07-85be52becbed" CreationDate="2023-11-16T04:04:10.567" UserId="251" Text="&gt; even if the actual on_runtime_upgrade does not fail if the storage has already been upgraded&#xD;&#xA;&#xD;&#xA;But I want to ask.&#xD;&#xA;&#xD;&#xA;Why do you need this migration if you have already upgraded the storage?&#xD;&#xA;&#xD;&#xA;Simply remove this migration from your runtime `Executive` and the try runtime will ignore it." ContentLicense="CC BY-SA 4.0" />
  <row Id="41555" PostHistoryTypeId="2" PostId="10474" RevisionGUID="b9ad334a-dcb7-4942-924b-388282a9c738" CreationDate="2023-11-16T04:24:22.970" UserId="4744" Text="Answered here https://github.com/paritytech/subxt/issues/1261#issuecomment-1809790645. &#xD;&#xA;We can see all the types here https://paritytech.github.io/subxt-explorer/" ContentLicense="CC BY-SA 4.0" />
  <row Id="41558" PostHistoryTypeId="5" PostId="10464" RevisionGUID="4501a369-3751-4e92-829a-d3a657b7098a" CreationDate="2023-11-16T05:47:21.707" UserId="354" Comment="improved formatting" Text="When integrating pallet-contracts v10 storage migration in `pub type Migrations`&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;use pallet_contracts::migration::{v10, v11, v12};&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	v10::Migration&lt;Runtime&gt;,&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get an error about trait bounds not satisfied&#xD;&#xA;&#xD;&#xA;&gt;= note: the following trait bounds were not satisfied:&#xD;&#xA;&gt;        `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;First I thought this was a [duplicate][1] but my Cargo.toml `[try-runtime]` section already included the  `pallet-contracts/try-runtime` clause.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first in a series of similar errors is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  error[E0599]: the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, ...&gt;, ..., ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /home/simson/nodle/chain/runtimes/eden/src/lib.rs:237:15&#xD;&#xA;      |&#xD;&#xA;  237 |             Executive::execute_block(block)&#xD;&#xA;      |                        ^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/home/simson/nodle/chain/target/release/wbuild/runtime-eden/target/wasm32-unknown-unknown/release/deps/runtime_eden-709135493b42bf5f.long-type-12564475873963747691.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The long type from the file above:&#xD;&#xA;```rust&#xD;&#xA;frame_executive::Executive&lt;Runtime,&#xD;&#xA;&#xD;&#xA;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, &#xD;&#xA;&#xD;&#xA;polkadot_primitives::BlakeTwo256&gt;, &#xD;&#xA;&#xD;&#xA;sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, &#xD;&#xA;&#xD;&#xA;RuntimeCall, &#xD;&#xA;&#xD;&#xA;MultiSignature, &#xD;&#xA;&#xD;&#xA;(CheckSpecVersion&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;CheckTxVersion&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;CheckGenesis&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;CheckEra&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;CheckNonce&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;CheckWeight&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;ChargeTransactionPayment&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;ChargeSponsor&lt;Runtime&gt;)&gt;&gt;, &#xD;&#xA;&#xD;&#xA;ChainContext&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;Runtime, &#xD;&#xA;&#xD;&#xA;(frame_system::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_timestamp::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_balances::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_transaction_payment::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_insecure_randomness_collective_flip::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_scheduler::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance1&gt;, &#xD;&#xA;&#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance2&gt;, &#xD;&#xA;&#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance3&gt;, &#xD;&#xA;&#xD;&#xA;pallet_grants::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_mandate::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_collective::Pallet&lt;Runtime, Instance1&gt;, &#xD;&#xA;&#xD;&#xA;pallet_membership::Pallet&lt;Runtime, Instance3&gt;, &#xD;&#xA;&#xD;&#xA;pallet_collator_selection::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_authorship::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_session::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_aura::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;parachain_info::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_xcm::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;orml_xtokens::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_utility::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_multisig::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_uniques::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_preimage::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_nodle_uniques::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_sponsorship::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_identity::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_allocations::Pallet&lt;Runtime&gt;, &#xD;&#xA;&#xD;&#xA;pallet_membership::Pallet&lt;Runtime, Instance2&gt;, &#xD;&#xA;&#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance4&gt;, &#xD;&#xA;&#xD;&#xA;pallet_contracts::Pallet&lt;Runtime&gt;), &#xD;&#xA;&#xD;&#xA;(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,)&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What is the compiler trying to tell me here? What flag could be missing?**&#xD;&#xA;&#xD;&#xA;*update*:&#xD;&#xA;```rust&#xD;&#xA;const TEST_ALL_STEPS: bool = cfg!(feature = &quot;try-runtime&quot;);&#xD;&#xA;&#xD;&#xA;pub type Migrations = (pallet_contracts::Migration&lt;Runtime,TEST_ALL_STEPS&gt;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;will not work as my migration is from 9 to 12&#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/questions/8219/trait-bounds-not-satisfied-with-executivetry-runtime-upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="41559" PostHistoryTypeId="24" PostId="10464" RevisionGUID="4501a369-3751-4e92-829a-d3a657b7098a" CreationDate="2023-11-16T05:47:21.707" Comment="Proposed by 354 approved by 116 edit id of 608" ContentLicense="CC BY-SA 4.0" />
  <row Id="41560" PostHistoryTypeId="5" PostId="10464" RevisionGUID="e0f9e6d3-fc67-4ea6-bd6e-1b9edbb3f70c" CreationDate="2023-11-16T05:51:12.590" UserId="116" Comment="deleted 101 characters in body" Text="When integrating pallet-contracts v10 storage migration in `pub type Migrations`&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;use pallet_contracts::migration::{v10, v11, v12};&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	v10::Migration&lt;Runtime&gt;,&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get an error about trait bounds not satisfied&#xD;&#xA;&#xD;&#xA;&gt;= note: the following trait bounds were not satisfied:&#xD;&#xA;&gt;        `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;First I thought this was a [duplicate][1] but my Cargo.toml `[try-runtime]` section already included the  `pallet-contracts/try-runtime` clause.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first in a series of similar errors is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  error[E0599]: the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, ...&gt;, ..., ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /home/simson/nodle/chain/runtimes/eden/src/lib.rs:237:15&#xD;&#xA;      |&#xD;&#xA;  237 |             Executive::execute_block(block)&#xD;&#xA;      |                        ^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/home/simson/nodle/chain/target/release/wbuild/runtime-eden/target/wasm32-unknown-unknown/release/deps/runtime_eden-709135493b42bf5f.long-type-12564475873963747691.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The long type from the file above:&#xD;&#xA;```rust&#xD;&#xA;frame_executive::Executive&lt;Runtime,&#xD;&#xA;&#xD;&#xA;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, &#xD;&#xA;&#xD;&#xA;polkadot_primitives::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, &#xD;&#xA;&#xD;&#xA;RuntimeCall, &#xD;&#xA;MultiSignature, &#xD;&#xA;(CheckSpecVersion&lt;Runtime&gt;, &#xD;&#xA;CheckTxVersion&lt;Runtime&gt;, &#xD;&#xA;CheckGenesis&lt;Runtime&gt;, &#xD;&#xA;CheckEra&lt;Runtime&gt;, &#xD;&#xA;CheckNonce&lt;Runtime&gt;, &#xD;&#xA;CheckWeight&lt;Runtime&gt;, &#xD;&#xA;ChargeTransactionPayment&lt;Runtime&gt;, &#xD;&#xA;ChargeSponsor&lt;Runtime&gt;)&gt;&gt;, &#xD;&#xA;ChainContext&lt;Runtime&gt;, &#xD;&#xA;Runtime,&#xD;&#xA;(frame_system::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_timestamp::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_balances::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_transaction_payment::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_insecure_randomness_collective_flip::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_scheduler::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance1&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance2&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance3&gt;, &#xD;&#xA;pallet_grants::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_mandate::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_collective::Pallet&lt;Runtime, Instance1&gt;, &#xD;&#xA;pallet_membership::Pallet&lt;Runtime, Instance3&gt;, &#xD;&#xA;pallet_collator_selection::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_authorship::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_session::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_aura::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, &#xD;&#xA;parachain_info::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_xcm::Pallet&lt;Runtime&gt;, &#xD;&#xA;orml_xtokens::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_utility::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_multisig::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_uniques::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_preimage::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_nodle_uniques::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_sponsorship::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_identity::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_allocations::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_membership::Pallet&lt;Runtime, Instance2&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance4&gt;, &#xD;&#xA;pallet_contracts::Pallet&lt;Runtime&gt;), &#xD;&#xA;(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,)&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What is the compiler trying to tell me here? What flag could be missing?**&#xD;&#xA;&#xD;&#xA;*update*:&#xD;&#xA;```rust&#xD;&#xA;const TEST_ALL_STEPS: bool = cfg!(feature = &quot;try-runtime&quot;);&#xD;&#xA;&#xD;&#xA;pub type Migrations = (pallet_contracts::Migration&lt;Runtime,TEST_ALL_STEPS&gt;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;will not work as my migration is from 9 to 12&#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/questions/8219/trait-bounds-not-satisfied-with-executivetry-runtime-upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="41561" PostHistoryTypeId="5" PostId="10432" RevisionGUID="cad51444-a338-41d1-a106-0eee9d59e26e" CreationDate="2023-11-16T05:57:28.863" UserId="116" Comment="added 29 characters in body" Text="I am getting the following error when I try to decode unsigned transaction&#xD;&#xA;`rawTxId`&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;    &quot;message&quot;: &quot;createType(Extrinsic):: createType(ExtrinsicV4):: createType(Call):: Call: failed decoding staking.bond:: Struct: failed on args: {\&quot;value\&quot;:\&quot;Lookup54\&quot;,\&quot;payee\&quot;:\&quot;{\\\&quot;_enum\\\&quot;:{\\\&quot;Staked\\\&quot;:\\\&quot;Null\\\&quot;,\\\&quot;Stash\\\&quot;:\\\&quot;Null\\\&quot;,\\\&quot;Controller\\\&quot;:\\\&quot;Null\\\&quot;,\\\&quot;Account\\\&quot;:\\\&quot;AccountId32\\\&quot;,\\\&quot;None\\\&quot;:\\\&quot;Null\\\&quot;}}\&quot;}:: decodeU8aStruct: failed at 0x3ab6ce09551c5ee90f74d01e53ad9a6d… on payee (index 2/2): {\&quot;_enum\&quot;:{\&quot;Staked\&quot;:\&quot;Null\&quot;,\&quot;Stash\&quot;:\&quot;Null\&quot;,\&quot;Controller\&quot;:\&quot;Null\&quot;,\&quot;Account\&quot;:\&quot;AccountId32\&quot;,\&quot;None\&quot;:\&quot;Null\&quot;}}:: Unable to create Enum via index 58, in Staked, Stash, Controller, Account, None&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;My structure on building is the following&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;    staking.bond(&#xD;&#xA;            {&#xD;&#xA;              controller: address,&#xD;&#xA;              value: '1000000',&#xD;&#xA;              payee: {&#xD;&#xA;                Account: address,&#xD;&#xA;              },&#xD;&#xA;            },&#xD;&#xA;            txMetadata,&#xD;&#xA;            {&#xD;&#xA;              metadataRpc: metadata,&#xD;&#xA;              registry,&#xD;&#xA;            },&#xD;&#xA;          );&#xD;&#xA;        }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41564" PostHistoryTypeId="50" PostId="10222" RevisionGUID="0c7dbb45-a190-4366-9be9-9d86170aaaed" CreationDate="2023-11-16T07:01:30.263" UserId="-1" />
  <row Id="41565" PostHistoryTypeId="2" PostId="10476" RevisionGUID="a48fb30e-c0f0-4806-88d4-0d1593febade" CreationDate="2023-11-16T07:56:23.643" UserId="480" Text="If defining migrations in structs that impl `OnRuntimeUpgrade`. And these structs are then put into a Tuple migration, pre and post-upgrade hooks are noops on the tuple.&#xD;&#xA;See [this issue](https://github.com/paritytech/substrate/issues/13681).&#xD;&#xA;&#xD;&#xA;The idea being that we should use `try_on_runtime_upgrade` instead. &#xD;&#xA; 1. This is poorly documented.&#xD;&#xA; 2. If we want to call `try_on_runtime_upgrade` from the pallet, it's not exposed in the `Hooks`, only the `pre_upgrade` and `post_upgrade` hooks are exposed. See [here](https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/trait.Hooks.html).&#xD;&#xA;&#xD;&#xA;Is there something I'm missing here? How should they be called?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41567" PostHistoryTypeId="1" PostId="10476" RevisionGUID="a48fb30e-c0f0-4806-88d4-0d1593febade" CreationDate="2023-11-16T07:56:23.643" UserId="480" Text="Hooks doesn't expose `try_on_runtime_upgrade`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41568" PostHistoryTypeId="3" PostId="10476" RevisionGUID="a48fb30e-c0f0-4806-88d4-0d1593febade" CreationDate="2023-11-16T07:56:23.643" UserId="480" Text="|runtime-upgrade|storage-migration|on-runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41569" PostHistoryTypeId="2" PostId="10477" RevisionGUID="93c917b3-c7b6-4153-861e-82fbdd258944" CreationDate="2023-11-16T08:27:44.530" UserId="3991" Text="`try_on_runtime_upgrade` is used only internally by the Executive pallet: (https://github.com/paritytech/polkadot-sdk/blob/ea4085ab7448bb557a1558a25af164cf364e88d6/substrate/frame/executive/src/lib.rs#L372).&#xD;&#xA;&#xD;&#xA;You should not try to override this method. You only need to implement `pre_upgrade` `post_upgrade` and `on_runtime_upgrade`. Executive handles the rest." ContentLicense="CC BY-SA 4.0" />
  <row Id="41571" PostHistoryTypeId="50" PostId="10224" RevisionGUID="05e667b3-1ae1-4649-b844-2d297e2d5e76" CreationDate="2023-11-16T09:06:50.853" UserId="-1" />
  <row Id="41572" PostHistoryTypeId="5" PostId="10476" RevisionGUID="10b10a97-4385-4f73-bec2-7d189ae5c7db" CreationDate="2023-11-16T09:26:07.587" UserId="480" Comment="added 1176 characters in body" Text="If defining migrations in structs that impl `OnRuntimeUpgrade`. And these structs are then put into a Tuple migration, pre and post-upgrade hooks are noops on the tuple.&#xD;&#xA;See [this issue](https://github.com/paritytech/substrate/issues/13681).&#xD;&#xA;&#xD;&#xA;The idea being that we should use `try_on_runtime_upgrade` instead. &#xD;&#xA; 1. This is poorly documented.&#xD;&#xA; 2. If we want to call `try_on_runtime_upgrade` from the pallet, it's not exposed in the `Hooks`, only the `pre_upgrade` and `post_upgrade` hooks are exposed. See [here](https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/trait.Hooks.html).&#xD;&#xA;&#xD;&#xA;Is there something I'm missing here? How should they be called?&#xD;&#xA;&#xD;&#xA;Edit for some more info:&#xD;&#xA;&#xD;&#xA;In our pallets we have (just using pre_upgrade for simplicity, but post is the same):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;fn pre_upgrade() -&gt; Result&lt;sp_std::vec::Vec&lt;u8&gt;, DispatchError&gt; {&#xD;&#xA;	migrations::PalletMigration::&lt;T&gt;::pre_upgrade()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// in migrations .rs&#xD;&#xA;&#xD;&#xA;pub type PalletMigration&lt;T&gt; = (&#xD;&#xA;	VersionedMigration&lt;crate::Pallet&lt;T&gt;, v4::Migration&lt;T&gt;, 3, 4&gt;,&#xD;&#xA;	VersionedMigration&lt;crate::Pallet&lt;T&gt;, v5::Migration&lt;T&gt;, 4, 5&gt;,&#xD;&#xA;	VersionedMigration&lt;crate::Pallet&lt;T&gt;, v6::Migration&lt;T&gt;, 5, 6&gt;,&#xD;&#xA;	VersionedMigration&lt;crate::Pallet&lt;T&gt;, v7::Migration&lt;T&gt;, 6, 7&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`VersionedMigration` impls `OnRuntimeUpgrade`, with `on_runtime_upgrade`, `pre_upgrade` and `post_upgrade` definitions.&#xD;&#xA;&#xD;&#xA;Which then calls the inner migration e.g. `v5::Migration`. So it's just a wrapper which does a couple of things like version checking.&#xD;&#xA;&#xD;&#xA;`v5::Migration` impls `OnRuntimeUpgrade`, and contains the storage migration logic.&#xD;&#xA;&#xD;&#xA;So, in the pallet, if we just call `pre_upgrade` on the tuple migration, (aliased to `PalletMigration` it doesn't work. It's a noop. &#xD;&#xA;&#xD;&#xA;So we're only implementing the pre and post upgrade hooks, but they don't trigger." ContentLicense="CC BY-SA 4.0" />
  <row Id="41573" PostHistoryTypeId="5" PostId="10476" RevisionGUID="6c472552-acc8-4d2a-9b79-e6724914d5b0" CreationDate="2023-11-16T09:49:05.713" UserId="480" Comment="added 204 characters in body" Text="If defining migrations in structs that impl `OnRuntimeUpgrade`. And these structs are then put into a Tuple migration, pre and post-upgrade hooks are noops on the tuple.&#xD;&#xA;See [this issue](https://github.com/paritytech/substrate/issues/13681).&#xD;&#xA;&#xD;&#xA;The idea being that we should use `try_on_runtime_upgrade` instead. &#xD;&#xA; 1. This is poorly documented.&#xD;&#xA; 2. If we want to call `try_on_runtime_upgrade` from the pallet, it's not exposed in the `Hooks`, only the `pre_upgrade` and `post_upgrade` hooks are exposed. See [here](https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/trait.Hooks.html).&#xD;&#xA;&#xD;&#xA;Is there something I'm missing here? How should they be called?&#xD;&#xA;&#xD;&#xA;Edit for some more info:&#xD;&#xA;&#xD;&#xA;In our pallets we have (just using pre_upgrade for simplicity, but post is the same):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;try-runtime&quot;)]&#xD;&#xA;fn pre_upgrade() -&gt; Result&lt;sp_std::vec::Vec&lt;u8&gt;, DispatchError&gt; {&#xD;&#xA;	migrations::PalletMigration::&lt;T&gt;::pre_upgrade()&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// in migrations .rs&#xD;&#xA;&#xD;&#xA;pub type PalletMigration&lt;T&gt; = (&#xD;&#xA;	VersionedMigration&lt;crate::Pallet&lt;T&gt;, v4::Migration&lt;T&gt;, 3, 4&gt;,&#xD;&#xA;	VersionedMigration&lt;crate::Pallet&lt;T&gt;, v5::Migration&lt;T&gt;, 4, 5&gt;,&#xD;&#xA;	VersionedMigration&lt;crate::Pallet&lt;T&gt;, v6::Migration&lt;T&gt;, 5, 6&gt;,&#xD;&#xA;	VersionedMigration&lt;crate::Pallet&lt;T&gt;, v7::Migration&lt;T&gt;, 6, 7&gt;,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`VersionedMigration` impls `OnRuntimeUpgrade`, with `on_runtime_upgrade`, `pre_upgrade` and `post_upgrade` definitions.&#xD;&#xA;&#xD;&#xA;Which then calls the inner migration e.g. `v5::Migration`. So it's just a wrapper which does a couple of things like version checking.&#xD;&#xA;&#xD;&#xA;`v5::Migration` impls `OnRuntimeUpgrade`, and contains the storage migration logic.&#xD;&#xA;&#xD;&#xA;So, in the pallet, if we just call `pre_upgrade` on the tuple migration, (aliased to `PalletMigration` it doesn't work. It's a noop. &#xD;&#xA;&#xD;&#xA;So we're only implementing the pre and post upgrade hooks, but they don't trigger.&#xD;&#xA;&#xD;&#xA;Our Executive definition looks like:&#xD;&#xA;```&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;	(),&#xD;&#xA;&gt;;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41574" PostHistoryTypeId="5" PostId="10477" RevisionGUID="1dcac20d-2958-414e-a44f-3fe86c457300" CreationDate="2023-11-16T09:56:34.697" UserId="3991" Comment="added 307 characters in body" Text="`try_on_runtime_upgrade` is used only internally by the Executive pallet: (https://github.com/paritytech/polkadot-sdk/blob/ea4085ab7448bb557a1558a25af164cf364e88d6/substrate/frame/executive/src/lib.rs#L372).&#xD;&#xA;&#xD;&#xA;You should not try to override this method. You only need to implement `pre_upgrade` `post_upgrade` and `on_runtime_upgrade`. Executive handles the rest.&#xD;&#xA;&#xD;&#xA;Edit based on your edited question:&#xD;&#xA;&#xD;&#xA;You need to pass `PalletMigration` as the last parameter to `Executive` &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;    Runtime,&#xD;&#xA;    Block,&#xD;&#xA;    frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;    Runtime,&#xD;&#xA;    AllPalletsWithSystem,&#xD;&#xA;    PalletMigration,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;// can nest them if you like&#xD;&#xA;&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;    Runtime,&#xD;&#xA;    Block,&#xD;&#xA;    frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;    Runtime,&#xD;&#xA;    AllPalletsWithSystem,&#xD;&#xA;    Migrations,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;pub type Migrations = (&#xD;&#xA;    PalletMigration,&#xD;&#xA;    OtherMigrations,&#xD;&#xA;    SomeMoreMigrations&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41575" PostHistoryTypeId="5" PostId="10477" RevisionGUID="84edcbad-417c-49ab-8c3f-5e64fa3341dd" CreationDate="2023-11-16T10:03:21.607" UserId="3991" Comment="added 22 characters in body" Text="`try_on_runtime_upgrade` is used only internally by the Executive pallet: (https://github.com/paritytech/polkadot-sdk/blob/ea4085ab7448bb557a1558a25af164cf364e88d6/substrate/frame/executive/src/lib.rs#L372).&#xD;&#xA;&#xD;&#xA;You should not try to override this method. You only need to implement `pre_upgrade` `post_upgrade` and `on_runtime_upgrade`. Executive handles the rest.&#xD;&#xA;&#xD;&#xA;**Edit based on extra info you provided**&#xD;&#xA;&#xD;&#xA;You need to pass `PalletMigration` as the last parameter to `Executive` &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;    Runtime,&#xD;&#xA;    Block,&#xD;&#xA;    frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;    Runtime,&#xD;&#xA;    AllPalletsWithSystem,&#xD;&#xA;    PalletMigration, // &lt;-- here&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;// can nest them if you like&#xD;&#xA;&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;    Runtime,&#xD;&#xA;    Block,&#xD;&#xA;    frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;    Runtime,&#xD;&#xA;    AllPalletsWithSystem,&#xD;&#xA;    Migrations,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;pub type Migrations = (&#xD;&#xA;    PalletMigration,&#xD;&#xA;    OtherMigrations,&#xD;&#xA;    SomeMoreMigrations&#xD;&#xA;)&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41576" PostHistoryTypeId="2" PostId="10478" RevisionGUID="4eca77bd-06cb-46b1-badf-0f552d22c673" CreationDate="2023-11-16T10:51:01.230" UserId="85" Text="Zepter has been great for pointing out runtime benchmark features that need propagating. I use it like so:&#xD;&#xA;&#xD;&#xA;`zepter lint propagate-feature --feature runtime-benchmarks --left-side-feature-missing=ignore --workspace --feature-enables-dep=&quot;runtime-benchmarks:frame-benchmarking&quot;`&#xD;&#xA;&#xD;&#xA;Have people used it for checking that the `std` feature mappings are all done correctly too?&#xD;&#xA;&#xD;&#xA;(Also asking the question to raise awareness that the cool tool exists)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41578" PostHistoryTypeId="1" PostId="10478" RevisionGUID="4eca77bd-06cb-46b1-badf-0f552d22c673" CreationDate="2023-11-16T10:51:01.230" UserId="85" Text="Can zepter help with std feature propagation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41579" PostHistoryTypeId="3" PostId="10478" RevisionGUID="4eca77bd-06cb-46b1-badf-0f552d22c673" CreationDate="2023-11-16T10:51:01.230" UserId="85" Text="|features|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41580" PostHistoryTypeId="50" PostId="8736" RevisionGUID="3e06117e-ea61-4d84-a2ec-7a0694b229a9" CreationDate="2023-11-16T11:03:40.457" UserId="-1" />
  <row Id="41581" PostHistoryTypeId="2" PostId="10479" RevisionGUID="f0fb828b-ac5f-4d86-893b-841690b33102" CreationDate="2023-11-16T11:25:15.250" UserId="94" Text="Good question!&#xD;&#xA;&#xD;&#xA;Yes it can check arbitrary feature propagation. In the Polkadot-SDK we configure it for three features: `std`, `runtime-benchmarks` and `try-runtime`.  &#xD;&#xA;You can see the full config file that contains the exact commands [here](https://github.com/paritytech/polkadot-sdk/blob/ea4085ab7448bb557a1558a25af164cf364e88d6/.config/zepter.yaml).  ORML is using a very similar config file [here](https://github.com/open-web3-stack/open-runtime-module-library/blob/b45942ea1973288c448ee58b07e1d33b28bb0343/.config/zepter.yaml).  &#xD;&#xA;&#xD;&#xA;One gotcha to look out for, is in the release process. `cargo release` strips dev-dependencies, and therefore all feature propagations to dev-dependencies need to be remove before releasing. This was just recently discovered. `zepter transpose features strip-dev-only` should do the trick, but please [open an issue](https://github.com/ggwpez/zepter/issues) if it does not." ContentLicense="CC BY-SA 4.0" />
  <row Id="41583" PostHistoryTypeId="33" PostId="10443" RevisionGUID="fc285011-4e0d-4547-a8c8-5ab7d22bfd19" CreationDate="2023-11-16T14:12:36.340" UserId="2540" Comment="35" />
  <row Id="41584" PostHistoryTypeId="2" PostId="10480" RevisionGUID="8bb48f9c-8dcc-40e1-92f1-6d7573aa220f" CreationDate="2023-11-16T14:34:24.563" UserId="3112" Text="I have two smart contracts, one for off-chain computations (Phat Contracts) and the other from Ink which will be deployed on the Astar network. I want to access data from the phat contracts, how do i do this? Is this even possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41586" PostHistoryTypeId="1" PostId="10480" RevisionGUID="8bb48f9c-8dcc-40e1-92f1-6d7573aa220f" CreationDate="2023-11-16T14:34:24.563" UserId="3112" Text="can cross contract calls be done across different polkadot chains?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41587" PostHistoryTypeId="3" PostId="10480" RevisionGUID="8bb48f9c-8dcc-40e1-92f1-6d7573aa220f" CreationDate="2023-11-16T14:34:24.563" UserId="3112" Text="|polkadot|ink|phala|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41588" PostHistoryTypeId="2" PostId="10481" RevisionGUID="9bcaac55-77f2-47b9-a426-de3333bd1629" CreationDate="2023-11-16T15:31:46.727" UserId="85" Text="It looks like all the recent PRs around removing native execution are for removing native execution from polkadot and parachains. I wanted to confirm that the plan is to keep native execution available for substrate users? I'm conscious that various chains out there  building on substrate depend on using native execution for one reason or another." ContentLicense="CC BY-SA 4.0" />
  <row Id="41590" PostHistoryTypeId="1" PostId="10481" RevisionGUID="9bcaac55-77f2-47b9-a426-de3333bd1629" CreationDate="2023-11-16T15:31:46.727" UserId="85" Text="Will substrate chains continue to support native execution?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41591" PostHistoryTypeId="3" PostId="10481" RevisionGUID="9bcaac55-77f2-47b9-a426-de3333bd1629" CreationDate="2023-11-16T15:31:46.727" UserId="85" Text="|executor|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41592" PostHistoryTypeId="2" PostId="10482" RevisionGUID="857c9f81-ffa3-4a8f-9aba-38421853765e" CreationDate="2023-11-16T15:36:15.350" UserId="251" Text="These are multi-blocks migrations. You don't need to add all of them to the `Executive`.&#xD;&#xA;&#xD;&#xA;You should add `pallet_contracts::Migration` to the `Executive` and configure:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl pallet_contracts::Config {&#xD;&#xA;    type Migrations = (&#xD;&#xA;        pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,&#xD;&#xA;        pallet_contracts::migration::v11::Migration&lt;Runtime&gt;,&#xD;&#xA;        pallet_contracts::migration::v12::Migration&lt;Runtime&gt;&#xD;&#xA;    );&#xD;&#xA;    ..&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41594" PostHistoryTypeId="2" PostId="10483" RevisionGUID="4be93b9c-2d87-455f-b359-720e1cfaadc3" CreationDate="2023-11-16T15:42:36.763" UserId="14" Text="Some browsers do not allow access/connection to not secure websocket (`ws://`) so you need to allow that by changing your browser's configs.&#xD;&#xA;&#xD;&#xA;(OP and I use firefox and it works without changes)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41596" PostHistoryTypeId="6" PostId="10464" RevisionGUID="725ce4e9-5f62-465c-ac44-fb6ca8eac0f6" CreationDate="2023-11-16T15:43:00.237" UserId="251" Comment="edited tags" Text="|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41597" PostHistoryTypeId="52" PostId="10476" RevisionGUID="3cab8ebb-6b74-41ff-9a5e-859bec3383c0" CreationDate="2023-11-16T15:59:57.950" />
  <row Id="41598" PostHistoryTypeId="2" PostId="10484" RevisionGUID="8f284f33-d3c9-4ac0-b40f-621cd79da06f" CreationDate="2023-11-16T16:41:45.223" UserId="4121" Text="[The documentation of the `on_idle` hook][1] states that &quot;Any implementation should always respect `_remaining_weight` and never consume (and therefore return) more than this amount.&quot;&#xD;&#xA;&#xD;&#xA;In the contracts pallet, the implementation is as follows:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {&#xD;&#xA;    fn on_idle(_block: BlockNumberFor&lt;T&gt;, mut remaining_weight: Weight) -&gt; Weight {&#xD;&#xA;        use migration::MigrateResult::*;&#xD;&#xA;        // ...&#xD;&#xA;&#xD;&#xA;        ContractInfo::&lt;T&gt;::process_deletion_queue_batch(remaining_weight)&#xD;&#xA;            .saturating_add(T::WeightInfo::on_process_deletion_queue_batch())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Let's consider a scenario where `process_deletion_queue_batch` entirely consumes the `remaining_weight`. In this case, the return value of `on_idle` will exceed the authorized limit when adding the overhead weight `T::WeightInfo::on_process_deletion_queue_batch()`. &#xD;&#xA;&#xD;&#xA;Intuitively, I would rather have done:&#xD;&#xA;```rust&#xD;&#xA;ContractInfo::&lt;T&gt;::process_deletion_queue_batch(remaining_weight.saturating_sub(T::WeightInfo::on_process_deletion_queue_batch()))&#xD;&#xA;```&#xD;&#xA;To ensure that the return value of `on_idle` never exceeds the `remaining_weight`.&#xD;&#xA;&#xD;&#xA;Is there something I'm missing?&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/polkadot-sdk/master/frame_support/traits/trait.Hooks.html#method.on_idle" ContentLicense="CC BY-SA 4.0" />
  <row Id="41600" PostHistoryTypeId="1" PostId="10484" RevisionGUID="8f284f33-d3c9-4ac0-b40f-621cd79da06f" CreationDate="2023-11-16T16:41:45.223" UserId="4121" Text="Weight consumed inside the on_idle hook?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41601" PostHistoryTypeId="3" PostId="10484" RevisionGUID="8f284f33-d3c9-4ac0-b40f-621cd79da06f" CreationDate="2023-11-16T16:41:45.223" UserId="4121" Text="|pallet|weight|benchmarking|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41602" PostHistoryTypeId="2" PostId="10485" RevisionGUID="27b71789-a8cf-4203-aead-477fae74958f" CreationDate="2023-11-16T16:53:15.970" UserId="3538" Text="This is a standard implementation of `FullDeps` in the `rpc.rs`:&#xD;&#xA;```&#xD;&#xA;// Full client dependencies.&#xD;&#xA;pub struct FullDeps&lt;C, P, SC, B&gt; {&#xD;&#xA;    /// The client instance to use.&#xD;&#xA;    pub client: Arc&lt;C&gt;,&#xD;&#xA;    /// Transaction pool instance.&#xD;&#xA;    pub pool: Arc&lt;P&gt;,&#xD;&#xA;    /// The SelectChain Strategy&#xD;&#xA;    pub select_chain: SC,&#xD;&#xA;    /// Whether to deny unsafe calls&#xD;&#xA;    pub deny_unsafe: DenyUnsafe,&#xD;&#xA;    /// BABE specific dependencies.&#xD;&#xA;    pub babe: BabeDeps,&#xD;&#xA;    /// GRANDPA specific dependencies.&#xD;&#xA;    pub grandpa: GrandpaDeps&lt;B&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I'm working on implementing `FullDeps` in the `rpc.rs` file for a Substrate-based project. The standard implementation uses `Arc` for various dependencies like `client`, `pool`, etc. However, I'm interested in using channels instead of `Arcs` to manage these dependencies in `create_full` and `service.rs`.&#xD;&#xA;&#xD;&#xA;I've noticed other projects like `moonbeam` and `AlephZero` employing channels for their custom objects, but these objects differ from the standard dependencies like `client` and `pool`. The challenge I'm facing is that when using channels, the value is consumed upon calling `recv`, subsequently blocking the thread until a new value is received.&#xD;&#xA;&#xD;&#xA;Could anyone provide suggestions or insights on how to implement `FullDeps` using channels while ensuring the ownership of these objects for Substrate methods?&#xD;&#xA;&#xD;&#xA;Thank you for your help!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41604" PostHistoryTypeId="1" PostId="10485" RevisionGUID="27b71789-a8cf-4203-aead-477fae74958f" CreationDate="2023-11-16T16:53:15.970" UserId="3538" Text="Implementing FullDeps in Substrate rpc.rs using channels instead of Arcs" ContentLicense="CC BY-SA 4.0" />
  <row Id="41605" PostHistoryTypeId="3" PostId="10485" RevisionGUID="27b71789-a8cf-4203-aead-477fae74958f" CreationDate="2023-11-16T16:53:15.970" UserId="3538" Text="|rpc|substrate-node|moonbeam|custom-rpc|service|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41607" PostHistoryTypeId="2" PostId="10486" RevisionGUID="833b3165-3195-4e42-b5d0-d1ae3d950e03" CreationDate="2023-11-16T17:34:45.027" UserId="85" Text="No, nay: https://github.com/paritytech/substrate/pull/14387&#xD;&#xA;&#xD;&#xA;(or at least not unless risc-v comes on the scene...)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41612" PostHistoryTypeId="2" PostId="10487" RevisionGUID="02427a7d-776a-4d3a-811c-91ea3cbefb73" CreationDate="2023-11-16T20:33:46.340" UserId="2060" Text="In short, use a SignedExtension if there is no configurable origin for a pallet.  See https://substrate.stackexchange.com/questions/4575/how-does-one-block-specific-accounts-from-calling-extrinsics-for-a-substrate-pal&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41614" PostHistoryTypeId="2" PostId="10488" RevisionGUID="ab596939-2b59-423e-ac7b-b4836787b940" CreationDate="2023-11-16T20:43:05.390" UserId="372" Text="I'm trying to update my node from SDK version 1.2.0 to 1.3.0. Here is my attempt PR https://github.com/Off-Narrative-Labs/Tuxedo/pull/141&#xD;&#xA;&#xD;&#xA;For some reason a crate somewhere in the dependency graph called `vandersnatch_vrfs` is not compiling. Any idea what I might need to do?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0616]: field `keyset_part_size` of struct `ring::PiopParams` is private&#xD;&#xA;  --&gt; /home/joshy/.cargo/git/checkouts/ring-vrf-fa8519651343a7ee/4b09416/bandersnatch_vrfs/src/ring.rs:70:26&#xD;&#xA;   |&#xD;&#xA;70 |         self.piop_params.keyset_part_size&#xD;&#xA;   |                          ^^^^^^^^^^^^^^^^ private field&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0616`.&#xD;&#xA;error: could not compile `bandersnatch_vrfs` (lib) due to previous error&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41616" PostHistoryTypeId="1" PostId="10488" RevisionGUID="ab596939-2b59-423e-ac7b-b4836787b940" CreationDate="2023-11-16T20:43:05.390" UserId="372" Text="Compile Error in vandersnatch_vrfs crate in SDK version 1.3.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="41617" PostHistoryTypeId="3" PostId="10488" RevisionGUID="ab596939-2b59-423e-ac7b-b4836787b940" CreationDate="2023-11-16T20:43:05.390" UserId="372" Text="|compile|vandersnatch-vrfs|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41618" PostHistoryTypeId="5" PostId="10464" RevisionGUID="a63e23ad-c812-4e88-ac21-c6c1acb34c94" CreationDate="2023-11-16T22:39:05.027" UserId="116" Comment="added 894 characters in body" Text="When integrating pallet-contracts v10 storage migration in `pub type Migrations`&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;use pallet_contracts::migration::{v10, v11, v12};&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	v10::Migration&lt;Runtime&gt;,&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get an error about trait bounds not satisfied&#xD;&#xA;&#xD;&#xA;&gt;= note: the following trait bounds were not satisfied:&#xD;&#xA;&gt;        `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;First I thought this was a [duplicate][1] but my Cargo.toml `[try-runtime]` section already included the  `pallet-contracts/try-runtime` clause.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first in a series of similar errors is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  error[E0599]: the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, ...&gt;, ..., ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /home/simson/nodle/chain/runtimes/eden/src/lib.rs:237:15&#xD;&#xA;      |&#xD;&#xA;  237 |             Executive::execute_block(block)&#xD;&#xA;      |                        ^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/home/simson/nodle/chain/target/release/wbuild/runtime-eden/target/wasm32-unknown-unknown/release/deps/runtime_eden-709135493b42bf5f.long-type-12564475873963747691.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The long type from the file above:&#xD;&#xA;```rust&#xD;&#xA;frame_executive::Executive&lt;Runtime,&#xD;&#xA;&#xD;&#xA;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, &#xD;&#xA;&#xD;&#xA;polkadot_primitives::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, &#xD;&#xA;&#xD;&#xA;RuntimeCall, &#xD;&#xA;MultiSignature, &#xD;&#xA;(CheckSpecVersion&lt;Runtime&gt;, &#xD;&#xA;CheckTxVersion&lt;Runtime&gt;, &#xD;&#xA;CheckGenesis&lt;Runtime&gt;, &#xD;&#xA;CheckEra&lt;Runtime&gt;, &#xD;&#xA;CheckNonce&lt;Runtime&gt;, &#xD;&#xA;CheckWeight&lt;Runtime&gt;, &#xD;&#xA;ChargeTransactionPayment&lt;Runtime&gt;, &#xD;&#xA;ChargeSponsor&lt;Runtime&gt;)&gt;&gt;, &#xD;&#xA;ChainContext&lt;Runtime&gt;, &#xD;&#xA;Runtime,&#xD;&#xA;(frame_system::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_timestamp::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_balances::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_transaction_payment::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_insecure_randomness_collective_flip::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_scheduler::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance1&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance2&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance3&gt;, &#xD;&#xA;pallet_grants::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_mandate::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_collective::Pallet&lt;Runtime, Instance1&gt;, &#xD;&#xA;pallet_membership::Pallet&lt;Runtime, Instance3&gt;, &#xD;&#xA;pallet_collator_selection::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_authorship::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_session::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_aura::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, &#xD;&#xA;parachain_info::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_xcm::Pallet&lt;Runtime&gt;, &#xD;&#xA;orml_xtokens::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_utility::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_multisig::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_uniques::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_preimage::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_nodle_uniques::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_sponsorship::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_identity::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_allocations::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_membership::Pallet&lt;Runtime, Instance2&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance4&gt;, &#xD;&#xA;pallet_contracts::Pallet&lt;Runtime&gt;), &#xD;&#xA;(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,)&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What is the compiler trying to tell me here? What flag could be missing?**&#xD;&#xA;&#xD;&#xA;*update*:&#xD;&#xA;```rust&#xD;&#xA;const TEST_ALL_STEPS: bool = cfg!(feature = &quot;try-runtime&quot;);&#xD;&#xA;&#xD;&#xA;pub type Migrations = (pallet_contracts::Migration&lt;Runtime,TEST_ALL_STEPS&gt;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;will not work as my migration is from 9 to 12&#xD;&#xA;&#xD;&#xA;*Update 2*:&#xD;&#xA;&#xD;&#xA;Integrating the suggestions from https://substrate.stackexchange.com/a/10482/116&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[2023-11-16T22:35:01Z INFO  runtime::frame-support] ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(1)` vs current storage version `StorageVersion(1)`&#xD;&#xA;[2023-11-16T22:35:01Z ERROR runtime::frame-support] Contracts: On chain storage version StorageVersion(9) doesn't match current storage version StorageVersion(12).&#xD;&#xA;[2023-11-16T22:35:01Z INFO  runtime_eden] Hello: Err(Other(&quot;On chain and current storage version do not match. Missing runtime upgrade?&quot;))&#xD;&#xA;[2023-11-16T22:35:01Z ERROR runtime] panicked at /home/simson/nodle/chain/runtimes/eden/src/lib.rs:481:21:&#xD;&#xA;    called `Result::unwrap()` on an `Err` value: Other(&quot;On chain and current storage version do not match. Missing runtime upgrade?&quot;)&#xD;&#xA;```&#xD;&#xA;still gives an error on try-runtime&#xD;&#xA;&#xD;&#xA;[1]: https://substrate.stackexchange.com/questions/8219/trait-bounds-not-satisfied-with-executivetry-runtime-upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="41619" PostHistoryTypeId="6" PostId="10464" RevisionGUID="eb9b4bba-8510-40d8-bfb3-be4acad00ce7" CreationDate="2023-11-16T23:06:53.730" UserId="116" Comment="edited tags" Text="|try-runtime|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41620" PostHistoryTypeId="2" PostId="10489" RevisionGUID="8bd497e0-5ca5-4f7e-a354-c677233a17e0" CreationDate="2023-11-17T01:08:26.410" UserId="116" Text="*With some inspiration from [this answer][1]*&#xD;&#xA;&#xD;&#xA;Integration of pallet_contracts [multi-step mitigation][2] is slightly different from integration of migrations intended to be executed in one block. Two steps are needed.&#xD;&#xA;&#xD;&#xA;First in the block implementing `impl pallet_contracts::Config` for `Runtime` the step migrations should be added.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Migrations = (&#xD;&#xA;		pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,&#xD;&#xA;		pallet_contracts::migration::v11::Migration&lt;Runtime&gt;,&#xD;&#xA;		pallet_contracts::migration::v12::Migration&lt;Runtime&gt;,&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Second in the `pallet_contracts::Migration&lt;Runtime, TEST_ALL_STEPS&gt;` must be integrated in `pub type Executive`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;const TEST_ALL_STEPS: bool = cfg!(feature = &quot;try-runtime&quot;);&#xD;&#xA;&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;    (  	pallet_contracts::Migration&lt;Runtime, TEST_ALL_STEPS&gt;,)&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[1]:https://substrate.stackexchange.com/a/10482/116&#xD;&#xA;[2]:https://docs.rs/pallet-contracts/latest/pallet_contracts/migration/struct.Migration.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="41622" PostHistoryTypeId="5" PostId="10464" RevisionGUID="edf45d0d-97b4-4056-9939-48f8e521310d" CreationDate="2023-11-17T01:10:07.907" UserId="116" Comment="deleted 1012 characters in body" Text="When integrating pallet-contracts v10 storage migration in `pub type Migrations`&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;use pallet_contracts::migration::{v10, v11, v12};&#xD;&#xA;pub type Migrations = (&#xD;&#xA;	v10::Migration&lt;Runtime&gt;,&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get an error about trait bounds not satisfied&#xD;&#xA;&#xD;&#xA;&gt;= note: the following trait bounds were not satisfied:&#xD;&#xA;&gt;        `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;First I thought this was a [duplicate][1] but my Cargo.toml `[try-runtime]` section already included the  `pallet-contracts/try-runtime` clause.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The first in a series of similar errors is:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;  error[E0599]: the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, ...&gt;, ..., ..., ..., ...&gt;`, but its trait bounds were not satisfied&#xD;&#xA;     --&gt; /home/simson/nodle/chain/runtimes/eden/src/lib.rs:237:15&#xD;&#xA;      |&#xD;&#xA;  237 |             Executive::execute_block(block)&#xD;&#xA;      |                        ^^^^^^^^^^^^^ function or associated item cannot be called due to unsatisfied trait bounds&#xD;&#xA;      |&#xD;&#xA;      = note: the full type name has been written to '/home/simson/nodle/chain/target/release/wbuild/runtime-eden/target/wasm32-unknown-unknown/release/deps/runtime_eden-709135493b42bf5f.long-type-12564475873963747691.txt'&#xD;&#xA;      = note: the following trait bounds were not satisfied:&#xD;&#xA;              `(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,): OnRuntimeUpgrade`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The long type from the file above:&#xD;&#xA;```rust&#xD;&#xA;frame_executive::Executive&lt;Runtime,&#xD;&#xA;&#xD;&#xA;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, &#xD;&#xA;&#xD;&#xA;polkadot_primitives::BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, &#xD;&#xA;&#xD;&#xA;RuntimeCall, &#xD;&#xA;MultiSignature, &#xD;&#xA;(CheckSpecVersion&lt;Runtime&gt;, &#xD;&#xA;CheckTxVersion&lt;Runtime&gt;, &#xD;&#xA;CheckGenesis&lt;Runtime&gt;, &#xD;&#xA;CheckEra&lt;Runtime&gt;, &#xD;&#xA;CheckNonce&lt;Runtime&gt;, &#xD;&#xA;CheckWeight&lt;Runtime&gt;, &#xD;&#xA;ChargeTransactionPayment&lt;Runtime&gt;, &#xD;&#xA;ChargeSponsor&lt;Runtime&gt;)&gt;&gt;, &#xD;&#xA;ChainContext&lt;Runtime&gt;, &#xD;&#xA;Runtime,&#xD;&#xA;(frame_system::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_timestamp::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_balances::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_transaction_payment::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_insecure_randomness_collective_flip::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_scheduler::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance1&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance2&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance3&gt;, &#xD;&#xA;pallet_grants::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_mandate::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_collective::Pallet&lt;Runtime, Instance1&gt;, &#xD;&#xA;pallet_membership::Pallet&lt;Runtime, Instance3&gt;, &#xD;&#xA;pallet_collator_selection::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_authorship::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_session::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_aura::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_aura_ext::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_parachain_system::Pallet&lt;Runtime&gt;, &#xD;&#xA;parachain_info::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_xcm::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_dmp_queue::Pallet&lt;Runtime&gt;, &#xD;&#xA;cumulus_pallet_xcmp_queue::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_xcm::Pallet&lt;Runtime&gt;, &#xD;&#xA;orml_xtokens::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_utility::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_multisig::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_uniques::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_preimage::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_nodle_uniques::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_sponsorship::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_identity::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_allocations::Pallet&lt;Runtime&gt;, &#xD;&#xA;pallet_membership::Pallet&lt;Runtime, Instance2&gt;, &#xD;&#xA;pallet_reserve::Pallet&lt;Runtime, Instance4&gt;, &#xD;&#xA;pallet_contracts::Pallet&lt;Runtime&gt;), &#xD;&#xA;(pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,)&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**What is the compiler trying to tell me here? What flag could be missing?**&#xD;&#xA;&#xD;&#xA;*update*:&#xD;&#xA;```rust&#xD;&#xA;const TEST_ALL_STEPS: bool = cfg!(feature = &quot;try-runtime&quot;);&#xD;&#xA;&#xD;&#xA;pub type Migrations = (pallet_contracts::Migration&lt;Runtime,TEST_ALL_STEPS&gt;);&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;will not work as my migration is from 9 to 12&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41623" PostHistoryTypeId="5" PostId="10482" RevisionGUID="17ab5e9a-8107-4219-aecc-ded264a43514" CreationDate="2023-11-17T02:01:21.313" UserId="251" Comment="added 178 characters in body" Text="These are multi-blocks migrations. You don't need to add all of them to the `Executive`.&#xD;&#xA;&#xD;&#xA;You should add `pallet_contracts::Migration` to the `Executive` and configure:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl pallet_contracts::Config {&#xD;&#xA;    type Migrations = (&#xD;&#xA;        pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,&#xD;&#xA;        pallet_contracts::migration::v11::Migration&lt;Runtime&gt;,&#xD;&#xA;        pallet_contracts::migration::v12::Migration&lt;Runtime&gt;&#xD;&#xA;    );&#xD;&#xA;    ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please check the documentation at https://github.com/paritytech/polkadot-sdk/blob/4ac2db8095e55a68f9b3d843d4e4689759fcc9d5/substrate/frame/contracts/src/migration.rs#L18-L58." ContentLicense="CC BY-SA 4.0" />
  <row Id="41624" PostHistoryTypeId="2" PostId="10490" RevisionGUID="eef3d913-94b4-40f1-b68c-6369b5b9e30f" CreationDate="2023-11-17T03:18:06.477" UserId="2844" Text="I found [similar](https://substrate.stackexchange.com/questions/10147/rococo-testnet-parachain-is-not-producing-blocks) questions but it doesn't help me. I am struggling to peers two node and produce block. Everything works fine in rococo-local, Below is the process that I followed,&#xD;&#xA;&#xD;&#xA;**collator-node01**&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node --collator \&#xD;&#xA;      --force-authoring \&#xD;&#xA;      --chain raw-parachain-chainspec.json \&#xD;&#xA;      --base-path /tmp/node01 \             &#xD;&#xA;      --port 50333 \&#xD;&#xA;      --rpc-port 8855 \&#xD;&#xA;      -- \&#xD;&#xA;      --execution wasm \&#xD;&#xA;      --chain rococo \&#xD;&#xA;      --port 50343 \&#xD;&#xA;      --rpc-port 9988&#xD;&#xA;&#xD;&#xA;**collator-node01-keys**&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % ls /tmp/node01/chains/dev_rococo_testnet/keystore&#xD;&#xA;    61757261f6b199de5d8a16b958cb619723106f9ffc26c0c24d8e12e5689676d3b8cf3345 &#xD;&#xA;    6772616ef72f5e6c3bdc8735f7ff92855ed6d316d7beea938ddee81fc070a55ac075db9a&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % &#xD;&#xA;&#xD;&#xA;[node01_logs](https://drive.google.com/file/d/1SUBlq_2XKQa6GGycLz6pIR3G6_DrCFfT/view?usp=drive_link)&#xD;&#xA;&#xD;&#xA;**collator-node02**&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node --collator \&#xD;&#xA;      --force-authoring \&#xD;&#xA;      --chain raw-parachain-chainspec.json \&#xD;&#xA;      --base-path /tmp/node02 \             &#xD;&#xA;      --port 50334 \&#xD;&#xA;      --rpc-port 8856 \&#xD;&#xA;      -- \&#xD;&#xA;      --execution wasm \&#xD;&#xA;      --chain rococo \&#xD;&#xA;      --port 50344 \&#xD;&#xA;      --rpc-port 9989&#xD;&#xA;&#xD;&#xA;**collator-node02-keys**&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % ls /tmp/node02/chains/dev_rococo_testnet/keystore&#xD;&#xA;    6175726192a8bc80c2d3a1dad385c5e9dee9e38ee72b9576296a2815c131c166b2cc381a&#xD;&#xA;    6772616ed0e5832d9fddfdc16491ec11a13047cc4c00f48802c0fe32eec0ffe85b5ca3af&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % &#xD;&#xA;&#xD;&#xA;[node02_logs](https://drive.google.com/file/d/1yiCWY8pDRqHOSN3FLFr1lUNFHmb0L5hy/view?usp=drive_link)&#xD;&#xA;&#xD;&#xA;[raw-chainspec_file](https://drive.google.com/file/d/18tNsV-g_487xqT7P2uremDyyL_9ww4ae/view?usp=drive_link)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41626" PostHistoryTypeId="1" PostId="10490" RevisionGUID="eef3d913-94b4-40f1-b68c-6369b5b9e30f" CreationDate="2023-11-17T03:18:06.477" UserId="2844" Text="Rococo testnet Parachain is not peering and Producing Blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="41627" PostHistoryTypeId="3" PostId="10490" RevisionGUID="eef3d913-94b4-40f1-b68c-6369b5b9e30f" CreationDate="2023-11-17T03:18:06.477" UserId="2844" Text="|substrate-parachain-template|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41628" PostHistoryTypeId="5" PostId="10485" RevisionGUID="fbd9c3da-cad0-4d1e-828b-d2bfc05c87d1" CreationDate="2023-11-17T04:14:06.780" UserId="3538" Comment="added 181 characters in body" Text="This is a standard implementation of `FullDeps` in the `rpc.rs`:&#xD;&#xA;```&#xD;&#xA;// Full client dependencies.&#xD;&#xA;pub struct FullDeps&lt;C, P, SC, B&gt; {&#xD;&#xA;    /// The client instance to use.&#xD;&#xA;    pub client: Arc&lt;C&gt;,&#xD;&#xA;    /// Transaction pool instance.&#xD;&#xA;    pub pool: Arc&lt;P&gt;,&#xD;&#xA;    /// The SelectChain Strategy&#xD;&#xA;    pub select_chain: SC,&#xD;&#xA;    /// Whether to deny unsafe calls&#xD;&#xA;    pub deny_unsafe: DenyUnsafe,&#xD;&#xA;    /// BABE specific dependencies.&#xD;&#xA;    pub babe: BabeDeps,&#xD;&#xA;    /// GRANDPA specific dependencies.&#xD;&#xA;    pub grandpa: GrandpaDeps&lt;B&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I'm working on implementing `FullDeps` in the `rpc.rs` file for a Substrate-based project. The standard implementation uses `Arc` for various dependencies like `client`, `pool`, etc. However, I'm interested in using channels instead of `Arcs` to manage these dependencies in `create_full` and `service.rs`.&#xD;&#xA;&#xD;&#xA;I've noticed other projects like [`moonbeam`](https://github.com/moonbeam-foundation/moonbeam/blob/master/node/service/src/rpc.rs#L122) and [`AlephZero`](https://github.com/aleph-zero-foundation/aleph-node/blob/main/bin/node/src/rpc.rs#L30) employing channels for their custom objects, but these objects differ from the standard dependencies like `client` and `pool`. The challenge I'm facing is that when using channels, the value is consumed upon calling `recv`, subsequently blocking the thread until a new value is received.&#xD;&#xA;&#xD;&#xA;Could anyone provide suggestions or insights on how to implement `FullDeps` using channels while ensuring the ownership of these objects for Substrate methods?&#xD;&#xA;&#xD;&#xA;Thank you for your help!&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41629" PostHistoryTypeId="5" PostId="10490" RevisionGUID="fd08298e-40fb-4b6e-aa98-e1938b6b310f" CreationDate="2023-11-17T04:34:13.803" UserId="2844" Comment="added 48 characters in body" Text="I found [similar](https://substrate.stackexchange.com/questions/10147/rococo-testnet-parachain-is-not-producing-blocks) questions but it doesn't help me. I am struggling to peers two node and produce block. Everything works fine in rococo-local, Below is the process that I followed,&#xD;&#xA;&#xD;&#xA;**collator-node01**&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node --collator \&#xD;&#xA;      --force-authoring \&#xD;&#xA;      --chain raw-parachain-chainspec.json \&#xD;&#xA;      --base-path /tmp/node01 \             &#xD;&#xA;      --port 50333 \&#xD;&#xA;      --rpc-port 8855 \&#xD;&#xA;      -- \&#xD;&#xA;      --execution wasm \&#xD;&#xA;      --chain rococo \&#xD;&#xA;      --port 50343 \&#xD;&#xA;      --rpc-port 9988&#xD;&#xA;&#xD;&#xA;**collator-node01-keys**&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % ls /tmp/node01/chains/dev_rococo_testnet/keystore&#xD;&#xA;    61757261f6b199de5d8a16b958cb619723106f9ffc26c0c24d8e12e5689676d3b8cf3345 &#xD;&#xA;    6772616ef72f5e6c3bdc8735f7ff92855ed6d316d7beea938ddee81fc070a55ac075db9a&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % &#xD;&#xA;&#xD;&#xA;[node01_logs](https://drive.google.com/file/d/1SUBlq_2XKQa6GGycLz6pIR3G6_DrCFfT/view?usp=drive_link)&#xD;&#xA;&#xD;&#xA;**collator-node02**&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node --collator \&#xD;&#xA;      --force-authoring \&#xD;&#xA;      --chain raw-parachain-chainspec.json \&#xD;&#xA;      --base-path /tmp/node02 \             &#xD;&#xA;      --port 50334 \&#xD;&#xA;      --rpc-port 8856 \&#xD;&#xA;      -- \&#xD;&#xA;      --execution wasm \&#xD;&#xA;      --chain rococo \&#xD;&#xA;      --port 50344 \&#xD;&#xA;      --rpc-port 9989&#xD;&#xA;&#xD;&#xA;**collator-node02-keys**&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % ls /tmp/node02/chains/dev_rococo_testnet/keystore&#xD;&#xA;    6175726192a8bc80c2d3a1dad385c5e9dee9e38ee72b9576296a2815c131c166b2cc381a&#xD;&#xA;    6772616ed0e5832d9fddfdc16491ec11a13047cc4c00f48802c0fe32eec0ffe85b5ca3af&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % &#xD;&#xA;&#xD;&#xA;[node02_logs](https://drive.google.com/file/d/1yiCWY8pDRqHOSN3FLFr1lUNFHmb0L5hy/view?usp=drive_link)&#xD;&#xA;&#xD;&#xA;[raw-chainspec_file](https://drive.google.com/file/d/18tNsV-g_487xqT7P2uremDyyL_9ww4ae/view?usp=drive_link)&#xD;&#xA;&#xD;&#xA;I am using *Macbook AirM1 and brave browser*&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41630" PostHistoryTypeId="5" PostId="10489" RevisionGUID="3b6734c5-56e1-4a24-b896-04c0794aeec6" CreationDate="2023-11-17T07:03:37.577" UserId="116" Comment="added 49 characters in body" Text="*With some inspiration from [this answer][1] but added the parts missing to solve the problem*&#xD;&#xA;&#xD;&#xA;Integration of pallet_contracts [multi-step mitigation][2] is slightly different from integration of migrations intended to be executed in one block. Two steps are needed.&#xD;&#xA;&#xD;&#xA;First in the block implementing `impl pallet_contracts::Config` for `Runtime` the step migrations should be added.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Migrations = (&#xD;&#xA;		pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,&#xD;&#xA;		pallet_contracts::migration::v11::Migration&lt;Runtime&gt;,&#xD;&#xA;		pallet_contracts::migration::v12::Migration&lt;Runtime&gt;,&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Second in the `pallet_contracts::Migration&lt;Runtime, TEST_ALL_STEPS&gt;` must be integrated in `pub type Executive`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;const TEST_ALL_STEPS: bool = cfg!(feature = &quot;try-runtime&quot;);&#xD;&#xA;&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;    (  	pallet_contracts::Migration&lt;Runtime, TEST_ALL_STEPS&gt;,)&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[1]:https://substrate.stackexchange.com/a/10482/116&#xD;&#xA;[2]:https://docs.rs/pallet-contracts/latest/pallet_contracts/migration/struct.Migration.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="41631" PostHistoryTypeId="6" PostId="10458" RevisionGUID="e021be81-d981-4294-9524-d9d97d9db83d" CreationDate="2023-11-17T07:17:32.923" UserId="2862" Comment="edited tags" Text="|polkadot|runtime|nodes|architecture|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41632" PostHistoryTypeId="5" PostId="5941" RevisionGUID="ca42d187-4129-48f8-9f7c-b6b4e1bf8048" CreationDate="2023-11-17T07:24:34.503" UserId="234" Comment="Replaced all links that pointed to the old archived polkadot repo to the new polkadot-sdk repo APART the first link." Text="Parachain Validation Function (PVF)&#xD;&#xA;```rust&#xD;&#xA;/// A struct that carries code of a parachain validation function and its hash.&#xD;&#xA;///&#xD;&#xA;/// Should be cheap to clone.&#xD;&#xA;#[derive(Clone)]&#xD;&#xA;pub struct Pvf {&#xD;&#xA;	pub(crate) code: Arc&lt;Vec&lt;u8&gt;&gt;,&#xD;&#xA;	pub(crate) code_hash: ValidationCodeHash,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot/blob/c289aced8c7f124acd60d0764de35cec1047549f/node/core/pvf/src/pvf.rs#L22-L29&#xD;&#xA;&#xD;&#xA;Remember that a parachain runtime is essentially a state-transition function. &#xD;&#xA;&#xD;&#xA;The parachain validation function or PVF for short, is the current runtime Wasm for a parachain that is stored on the Relay chain.&#xD;&#xA;&#xD;&#xA;One example of where the parachain validation function (PVF) is used is in the Relay chain module: [`paras`](https://github.com/paritytech/polkadot-sdk/blob/596088a273eff13fbefe6fa20a5fef6507b329cb/polkadot/runtime/parachains/src/paras/mod.rs#L21-L23). This module tracks the state of parachains as mentioned at the top of its file:&#xD;&#xA;```&#xD;&#xA;//! The most important responsibility of this module is to track which parachains&#xD;&#xA;//! are active and what their current state is. The current state of a para consists of the current&#xD;&#xA;//! head data and the current validation code (AKA Parachain Validation Function (PVF)).&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The parachain validation function (PVF) code is hashed and stored in the [`paras`](https://github.com/paritytech/polkadot-sdk/blob/596088a273eff13fbefe6fa20a5fef6507b329cb/polkadot/runtime/parachains/src/paras/mod.rs#L708) module:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// The validation code hash of every live para.&#xD;&#xA;///&#xD;&#xA;/// Corresponding code can be retrieved with [`CodeByHash`].&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn current_code_hash)]&#xD;&#xA;pub(super) type CurrentCodeHash&lt;T: Config&gt; =&#xD;&#xA;	StorageMap&lt;_, Twox64Concat, ParaId, ValidationCodeHash&gt;;&#xD;&#xA;```&#xD;&#xA;- https://github.com/paritytech/polkadot-sdk/blob/596088a273eff13fbefe6fa20a5fef6507b329cb/polkadot/runtime/parachains/src/paras/mod.rs#L703-L709&#xD;&#xA;&#xD;&#xA;When successfully upgrading a parachain, the parachain's validation code (or parachain validation function) would change and therefore the `CurrentCodeHash` storage would reflect that by having a different `ValidationCodeHash`.&#xD;&#xA;&#xD;&#xA;Another example of where the parachain validation function (PVF) is used is in [candidate validation](https://paritytech.github.io/polkadot/book/node/utility/candidate-validation.html).&#xD;&#xA;&#xD;&#xA;When the parachain produces a new block, it sends a &quot;Proof of Validity&quot; (PoV) block to the Relay chain. This PoV-block or PoV is a parachain block with witness data. You can read more on this [here](https://github.com/paritytech/polkadot-sdk/blob/596088a273eff13fbefe6fa20a5fef6507b329cb/cumulus/docs/overview.md#block-building). The Relay chain uses this PoV block along with the parachain validation function (PVF) and does a series of checks ([one example](https://github.com/paritytech/polkadot-sdk/blob/596088a273eff13fbefe6fa20a5fef6507b329cb/polkadot/node/core/candidate-validation/src/lib.rs#L840-L868)) including [executing the PVF (Wasm) against the PoV](https://github.com/paritytech/polkadot-sdk/blob/596088a273eff13fbefe6fa20a5fef6507b329cb/polkadot/node/core/pvf/src/host.rs#L94-L119). This is what is considered as [candidate validation](https://paritytech.github.io/polkadot/book/node/utility/candidate-validation.html) - we are checking to see if this parachain block is a successful candidate to be a block for that parachain. Much of this logic can be found in the [Candidate Validation subsystem](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/node/core/candidate-validation/src/lib.rs) as noted in the top of its file:&#xD;&#xA;```rust&#xD;&#xA;//! This handles incoming requests from other subsystems to validate candidates&#xD;&#xA;//! according to a validation function. This delegates validation to an underlying&#xD;&#xA;//! pool of processes used for execution of the Wasm.&#xD;&#xA;```&#xD;&#xA;If these checks come out successful then this PoV block is deemed a worthy candidate and is ready for [candidate backing](https://paritytech.github.io/polkadot/book/types/backing.html).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41633" PostHistoryTypeId="5" PostId="10480" RevisionGUID="52a3621c-86b4-4f4b-b45e-20adc3a1b7b7" CreationDate="2023-11-17T07:30:30.057" UserId="354" Comment="improved formatting" Text="I have two smart contracts, one for `off-chain` computations (Phat Contracts) and the other from Ink which will be deployed on the `Astar network`. I want to access data from the phat contracts, how do I do this? Is this even possible?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41634" PostHistoryTypeId="24" PostId="10480" RevisionGUID="52a3621c-86b4-4f4b-b45e-20adc3a1b7b7" CreationDate="2023-11-17T07:30:30.057" Comment="Proposed by 354 approved by 3112 edit id of 609" ContentLicense="CC BY-SA 4.0" />
  <row Id="41635" PostHistoryTypeId="5" PostId="10490" RevisionGUID="e4fef982-a602-4678-b322-9bee7f2bd96f" CreationDate="2023-11-17T08:36:22.337" UserId="2844" Comment="added 227 characters in body" Text="I found [similar](https://substrate.stackexchange.com/questions/10147/rococo-testnet-parachain-is-not-producing-blocks) questions but it doesn't help me. I am struggling to peers two node and produce block. Everything works fine in rococo-local, Below is the process that I followed,&#xD;&#xA;&#xD;&#xA;**collator-node01**&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node --collator \&#xD;&#xA;      --force-authoring \&#xD;&#xA;      --chain raw-parachain-chainspec.json \&#xD;&#xA;      --base-path /tmp/node01 \             &#xD;&#xA;      --port 50333 \&#xD;&#xA;      --rpc-port 8855 \&#xD;&#xA;      -- \&#xD;&#xA;      --execution wasm \&#xD;&#xA;      --chain rococo \&#xD;&#xA;      --port 50343 \&#xD;&#xA;      --rpc-port 9988&#xD;&#xA;&#xD;&#xA;**collator-node01-keys**&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % ls /tmp/node01/chains/dev_rococo_testnet/keystore&#xD;&#xA;    61757261f6b199de5d8a16b958cb619723106f9ffc26c0c24d8e12e5689676d3b8cf3345 &#xD;&#xA;    6772616ef72f5e6c3bdc8735f7ff92855ed6d316d7beea938ddee81fc070a55ac075db9a&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % &#xD;&#xA;&#xD;&#xA;[node01_logs](https://drive.google.com/file/d/1SUBlq_2XKQa6GGycLz6pIR3G6_DrCFfT/view?usp=drive_link)&#xD;&#xA;&#xD;&#xA;**collator-node02**&#xD;&#xA;&#xD;&#xA;    ./target/release/parachain-template-node --collator \&#xD;&#xA;      --force-authoring \&#xD;&#xA;      --chain raw-parachain-chainspec.json \&#xD;&#xA;      --base-path /tmp/node02 \             &#xD;&#xA;      --port 50334 \&#xD;&#xA;      --rpc-port 8856 \&#xD;&#xA;      -- \&#xD;&#xA;      --execution wasm \&#xD;&#xA;      --chain rococo \&#xD;&#xA;      --port 50344 \&#xD;&#xA;      --rpc-port 9989&#xD;&#xA;&#xD;&#xA;**collator-node02-keys**&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % ls /tmp/node02/chains/dev_rococo_testnet/keystore&#xD;&#xA;    6175726192a8bc80c2d3a1dad385c5e9dee9e38ee72b9576296a2815c131c166b2cc381a&#xD;&#xA;    6772616ed0e5832d9fddfdc16491ec11a13047cc4c00f48802c0fe32eec0ffe85b5ca3af&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air xcav-parachain % &#xD;&#xA;&#xD;&#xA;[node02_logs](https://drive.google.com/file/d/1yiCWY8pDRqHOSN3FLFr1lUNFHmb0L5hy/view?usp=drive_link)&#xD;&#xA;&#xD;&#xA;[raw-chainspec_file](https://drive.google.com/file/d/18tNsV-g_487xqT7P2uremDyyL_9ww4ae/view?usp=drive_link)&#xD;&#xA;&#xD;&#xA;I am using *Macbook AirM1 and brave browser*&#xD;&#xA;&#xD;&#xA;**While running collator node I get this issue in logs terminal. Could that be the cause of this issue?**&#xD;&#xA;&#xD;&#xA;    2023-11-17 08:53:01 [Parachain] ⚠️ The hardware does not meet the minimal requirements for role 'Authority'.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41636" PostHistoryTypeId="5" PostId="10473" RevisionGUID="4b4104a0-2c29-4f01-a9ee-f3412c0fe5f9" CreationDate="2023-11-17T08:58:27.927" UserId="251" Comment="added 258 characters in body" Text="&gt; even if the actual on_runtime_upgrade does not fail if the storage has already been upgraded&#xD;&#xA;&#xD;&#xA;*But I want to ask.&#xD;&#xA;Why do you need this migration if you have already upgraded the storage?&#xD;&#xA;Simply remove this migration from your runtime `Executive` and the try runtime will ignore it.*&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I came across this issue this morning.&#xD;&#xA;&#xD;&#xA;I believe Substrate does not currently have any adaptations for the new feature of idempotency testing.&#xD;&#xA;&#xD;&#xA;Here's what I did: https://github.com/darwinia-network/darwinia/pull/1321/commits/c15b4a3c0878c8930f097b7214b6e3af2e88ea83." ContentLicense="CC BY-SA 4.0" />
  <row Id="41637" PostHistoryTypeId="50" PostId="10238" RevisionGUID="6ac8fcc5-3ca5-4d37-8589-8e61785eea34" CreationDate="2023-11-17T09:05:40.667" UserId="-1" />
  <row Id="41638" PostHistoryTypeId="5" PostId="10473" RevisionGUID="6d5b5c85-ac12-42ee-93ae-d5d0829676d0" CreationDate="2023-11-17T09:06:05.120" UserId="251" Comment="added 48 characters in body" Text="&gt; even if the actual on_runtime_upgrade does not fail if the storage has already been upgraded&#xD;&#xA;&#xD;&#xA;*But I want to ask.&#xD;&#xA;Why do you need this migration if you have already upgraded the storage?&#xD;&#xA;Simply remove this migration from your runtime `Executive` and the try runtime will ignore it.*&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I came across this issue this morning.&#xD;&#xA;&#xD;&#xA;I think Substrate does not currently have any adaptations for the new feature of idempotency testing. (please correct me if I'm mistaken)&#xD;&#xA;&#xD;&#xA;Here's what I did: https://github.com/darwinia-network/darwinia/pull/1321/commits/c15b4a3c0878c8930f097b7214b6e3af2e88ea83.&#xD;&#xA;&#xD;&#xA;Simply change the `ensure!` to `log::warn!`." ContentLicense="CC BY-SA 4.0" />
  <row Id="41639" PostHistoryTypeId="2" PostId="10491" RevisionGUID="b1ff39c9-57e2-47f6-b2f5-a7065b50ca00" CreationDate="2023-11-17T10:49:45.877" UserId="4121" Text="It appears that I was missing the `let base_weight = T::WeightInfo::on_process_deletion_queue_batch();` statement in the `deletion_budget(weight_limit: Weight)` function, which is called within the `process_deletion_queue_batch(weight_limit: Weight)` function. As a result, the returned weight will never exceed the `remaining_weight`." ContentLicense="CC BY-SA 4.0" />
  <row Id="41641" PostHistoryTypeId="50" PostId="3359" RevisionGUID="a3a6370b-2600-45c7-928a-9f1efa47d0ae" CreationDate="2023-11-17T12:01:15.247" UserId="-1" />
  <row Id="41642" PostHistoryTypeId="2" PostId="10492" RevisionGUID="a50461b4-ada0-4812-9460-c56852743fa4" CreationDate="2023-11-17T13:40:22.963" UserId="4314" Text="You can totally do that, you could check out [the asset-cli-tool](https://github.com/paritytech/asset_cli_tool), especially the [ledger signer](https://github.com/paritytech/asset_cli_tool/blob/303fd4b58448d49a60197c93ab14dbf83eb87823/blockchainServices/setup.ts#L64) for some guidance and an example on how to use the Ledger to sign some tx and PJS to submit it, but it's not something too complicated." ContentLicense="CC BY-SA 4.0" />
  <row Id="41645" PostHistoryTypeId="2" PostId="10493" RevisionGUID="e044c6de-0afe-496b-8275-b5d92ab5a895" CreationDate="2023-11-17T16:42:39.327" UserId="2477" Text="how can I test block_timestamp-dependent smart contract behavior?&#xD;&#xA;The substrate contact node doesn't allow block_timestamp manipulations.&#xD;&#xA;&#xD;&#xA;For context, in the EVM ecosystem, one can use hardhat helpers to setNextBlockTimestamp(timestamp).&#xD;&#xA;https://hardhat.org/hardhat-network-helpers/docs/reference&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41647" PostHistoryTypeId="1" PostId="10493" RevisionGUID="e044c6de-0afe-496b-8275-b5d92ab5a895" CreationDate="2023-11-17T16:42:39.327" UserId="2477" Text="How to test smart contract timestamp dependent behavior?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41648" PostHistoryTypeId="3" PostId="10493" RevisionGUID="e044c6de-0afe-496b-8275-b5d92ab5a895" CreationDate="2023-11-17T16:42:39.327" UserId="2477" Text="|smart-contract|substrate-contracts-node|testing|timestamp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41649" PostHistoryTypeId="34" PostId="10443" RevisionGUID="40228de3-d171-42c3-8f1f-4cb4db9ac005" CreationDate="2023-11-17T16:51:56.947" UserId="2540" Comment="35" />
  <row Id="41650" PostHistoryTypeId="50" PostId="8947" RevisionGUID="ad685e56-9e54-4f38-8c7c-22f280bb8fae" CreationDate="2023-11-17T18:09:56.197" UserId="-1" />
  <row Id="41651" PostHistoryTypeId="5" PostId="10488" RevisionGUID="0ccb959e-bbe0-4e90-baf7-18d4c866845b" CreationDate="2023-11-17T21:40:34.807" UserId="372" Comment="Summarize exactly what I tried, and provide better permalink to commit in question." Text="I'm trying to update my node from SDK version 1.2.0 to 1.3.0. To do so I make this change to each package in my `Cargo.toml`:&#xD;&#xA;&#xD;&#xA;```diff&#xD;&#xA;- sp-core = { tag = &quot;polkadot-v1.2.0&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk&quot; }&#xD;&#xA;+ sp-core = { tag = &quot;polkadot-v1.3.0&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the [full commit](https://github.com/Off-Narrative-Labs/Tuxedo/commit/715adccffa29d04146f70e8c62e79da723e6a5fd)&#xD;&#xA;&#xD;&#xA;For some reason a crate somewhere in the dependency graph called `vandersnatch_vrfs` is not compiling. Any idea what I might need to do?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0616]: field `keyset_part_size` of struct `ring::PiopParams` is private&#xD;&#xA;  --&gt; /home/joshy/.cargo/git/checkouts/ring-vrf-fa8519651343a7ee/4b09416/bandersnatch_vrfs/src/ring.rs:70:26&#xD;&#xA;   |&#xD;&#xA;70 |         self.piop_params.keyset_part_size&#xD;&#xA;   |                          ^^^^^^^^^^^^^^^^ private field&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0616`.&#xD;&#xA;error: could not compile `bandersnatch_vrfs` (lib) due to previous error&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41652" PostHistoryTypeId="6" PostId="10488" RevisionGUID="0ccb959e-bbe0-4e90-baf7-18d4c866845b" CreationDate="2023-11-17T21:40:34.807" UserId="372" Comment="Summarize exactly what I tried, and provide better permalink to commit in question." Text="|versioning|compile|releases|vandersnatch-vrfs|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41654" PostHistoryTypeId="50" PostId="8945" RevisionGUID="13281769-20c5-4b82-8008-196affd48b06" CreationDate="2023-11-18T08:08:36.067" UserId="-1" />
  <row Id="41655" PostHistoryTypeId="2" PostId="10494" RevisionGUID="62557676-63d9-450c-a057-4be7acb07440" CreationDate="2023-11-18T10:45:47.340" UserId="4813" Text="So I want my instance of the pallet membership to be managed only by a specific pallet, and not even the Root origin.&#xD;&#xA;&#xD;&#xA;Is there anyway to create an EnsureOrigin object that can verify that a specific pallet dispatched the call ?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41657" PostHistoryTypeId="1" PostId="10494" RevisionGUID="62557676-63d9-450c-a057-4be7acb07440" CreationDate="2023-11-18T10:45:47.340" UserId="4813" Text="Ensure that a call is dispatched from a specific pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="41658" PostHistoryTypeId="3" PostId="10494" RevisionGUID="62557676-63d9-450c-a057-4be7acb07440" CreationDate="2023-11-18T10:45:47.340" UserId="4813" Text="|pallet|frame|origin|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41659" PostHistoryTypeId="2" PostId="10495" RevisionGUID="5c5d2e00-967c-42c2-8856-0622e7a0ee31" CreationDate="2023-11-18T12:40:02.257" UserId="14" Text="Have you tried to set it to `branch = &quot;release-polkadot-v1.3.0&quot;`?&#xD;&#xA;&#xD;&#xA;I can see that the `tag = &quot;polkadot-v1.3.0&quot;` is not pointing to the same commit as that branch is, so maybe we need to update that tag. Not sure who would be able to do that but I'll communicate that in the Element's channel.&#xD;&#xA;&#xD;&#xA;(I recommended that branch as I'm using it on some projects and it is working fine)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41661" PostHistoryTypeId="2" PostId="10496" RevisionGUID="6d48e0de-6350-4358-8dad-a092e029a6e5" CreationDate="2023-11-18T15:01:59.973" UserId="707" Text="## Introduction&#xD;&#xA;&#xD;&#xA;In the Substrate ecosystem, a bricked parachain – one that has halted block production – presents a unique set of challenges. This situation can occur in various environments, notably on Rococo, our test environment, and of course on Kusama and Polkadot, which are our production environments. Recovery actions on production parachains having Kusama and Polkadot as relay chains often require governance approval, unlike those on rococo where this can be done with sudo.&#xD;&#xA;&#xD;&#xA;This post aims to compile and share knowledge on recovering bricked parachains across these different environments, drawing from past incidents and community experiences to offer a comprehensive recovery guide.&#xD;&#xA;&#xD;&#xA;### General Recovery Resources:&#xD;&#xA;- [How to Recover a Parachain](https://forum.polkadot.network/t/how-to-recover-a-parachain) - A general guide on parachain recovery.&#xD;&#xA;&#xD;&#xA;### Recovery in Rococo:&#xD;&#xA;- [Testnet Halt: Lessons Learned](https://www.t3rn.io/blog/testnet-halt-lessons-learned) - Insights from a specific incident on the Rococo testnet.&#xD;&#xA;&#xD;&#xA;### Recovery in Kusama and Polkadot:&#xD;&#xA;- [Kintsugi Slot Duration Bug: Post Mortem](https://medium.com/interlay/kintsugi-slot-duration-bug-2022-12-01-post-mortem-3e3444aff2e8) - Analysis of a slot duration bug in Kintsugi.&#xD;&#xA;- [Snek Stall Post Mortem](https://jakpan.hashnode.dev/snek-stall-post-mortem) - A detailed post-mortem of the Snek stall incident.&#xD;&#xA;- [Referendum 162 on Kusama](https://kusama.polkassembly.io/referendum/162) - Details of a governance action on Kusama.&#xD;&#xA;- [Ajuna Network Issue #342](https://github.com/ajuna-network/Ajuna/issues/342) - A discussion on a specific issue in the Ajuna network.&#xD;&#xA;&#xD;&#xA;### Additional Info:&#xD;&#xA; - [Code Substitutes in Chain Spec](https://substrate.stackexchange.com/questions/5828/what-is-codesubstitutes-in-the-chain-spec) - StackExchange discussion on code substitutes in chain specification.&#xD;&#xA; - [How to Recover a Parachain - StackExchange](https://substrate.stackexchange.com/questions/9181/how-to-recover-a-parachain) - Another useful thread on parachain recovery.&#xD;&#xA;&#xD;&#xA;## Request for Input&#xD;&#xA;I welcome additional insights, experiences, or resources from the community to further enrich this guide.&#xD;&#xA;&#xD;&#xA;## Conclusion&#xD;&#xA;Navigating the complexities of recovering a bricked parachain is challenging, yet with the appropriate resources and the collective wisdom of the community, it is a manageable endeavor.&#xD;&#xA;This guide represents an initial roadmap, designed to guide teams through the process of recovery. &#xD;&#xA;&#xD;&#xA;Our ultimate goal is to evolve this into a comprehensive, step-by-step manual, empowering project teams not only to allocate resources effectively for issue resolution but also to have a well-documented, reliable procedure to follow. This collaborative effort can significantly enhance the resilience and robustness of the Substrate ecosystem.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41663" PostHistoryTypeId="1" PostId="10496" RevisionGUID="6d48e0de-6350-4358-8dad-a092e029a6e5" CreationDate="2023-11-18T15:01:59.973" UserId="707" Text="Recovering a Bricked (no block production) Parachain on Rococo, Kusama, &amp; Polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="41664" PostHistoryTypeId="3" PostId="10496" RevisionGUID="6d48e0de-6350-4358-8dad-a092e029a6e5" CreationDate="2023-11-18T15:01:59.973" UserId="707" Text="|parachain|runtime-upgrade|block-production|recovery|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41665" PostHistoryTypeId="2" PostId="10497" RevisionGUID="170cb90b-b45b-4695-8e5b-14f1bab42296" CreationDate="2023-11-18T18:38:56.473" UserId="1805" Text="My understanding is that transaction priority and therefore the ordering in the block is determined be the fee and tip paid. &#xD;&#xA;&#xD;&#xA;I've noticed a number of times that transactions with the highest total fee are not always at the top of the block. Some examples:&#xD;&#xA;&#xD;&#xA;https://karura.subscan.io/block/1946916&#xD;&#xA;&#xD;&#xA;https://hydradx.subscan.io/block/3857602&#xD;&#xA;&#xD;&#xA;What could the reason for this be? The only thing I can think of is perhaps the highest tip transaction is arriving late and for some reason the priority doesn't have time to be recalculated.&#xD;&#xA;&#xD;&#xA;I am aware that some chains have priority rules based on the extrinsic type, but examples like this make me think this isn't the case for Hydra at least:&#xD;&#xA;https://hydradx.subscan.io/block/3850710" ContentLicense="CC BY-SA 4.0" />
  <row Id="41667" PostHistoryTypeId="1" PostId="10497" RevisionGUID="170cb90b-b45b-4695-8e5b-14f1bab42296" CreationDate="2023-11-18T18:38:56.473" UserId="1805" Text="What is the reason for this unexpected transaction ordering" ContentLicense="CC BY-SA 4.0" />
  <row Id="41668" PostHistoryTypeId="3" PostId="10497" RevisionGUID="170cb90b-b45b-4695-8e5b-14f1bab42296" CreationDate="2023-11-18T18:38:56.473" UserId="1805" Text="|extrinsic|transactions|transaction-fees|acala|karura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41669" PostHistoryTypeId="5" PostId="3487" RevisionGUID="9f583328-a39d-4909-beda-c90d8162523f" CreationDate="2023-11-18T22:12:06.707" UserId="2384" Comment="add numbering" Text="While I also was doing something that requires fee-less transaction, it might be worthwhile for future reader,&#xD;&#xA;&#xD;&#xA;## 1. Do not charge fee in specific extrinsic call&#xD;&#xA;While defining extrinsic call in pallet, we usually do:&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(10_000 + Weight::db_write())]&#xD;&#xA;fn some_call(origin: _) -&gt; DispatchResult&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;this can be changed to:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(Pays::No)]&#xD;&#xA;fn some_call(origin: _) -&gt; DispatchResult&#xD;&#xA;```&#xD;&#xA;so the call to `some_call` will not deduce any fee from caller&#xD;&#xA;&#xD;&#xA;## 2. Do not charge fee for selective accounts only&#xD;&#xA;It might also be case that one have list of accounts that it should not charge fee for everyone else, it should&#xD;&#xA;```rust&#xD;&#xA;#[pallet::weight(10_000 + Weight::db_read(2))]&#xD;&#xA;fn some_extrinsic(origin: OriginFro&lt;T&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;    let caller = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;    let special_accounts = &lt;SepecialList&lt;T&gt;&gt;::get();&#xD;&#xA;    /*&#xD;&#xA;    Other operation&#xD;&#xA;    */&#xD;&#xA;&#xD;&#xA;    if special_accounts.contains(caller) {&#xD;&#xA;        Ok(Pays::No.into())&#xD;&#xA;    } else {&#xD;&#xA;        Ok(Pays::Yes.into())&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## 3. Do not charge fee where caller doesn't matter at all&#xD;&#xA;We can simply make unsigned extrinsic at all&#xD;&#xA;&#xD;&#xA;## 4. The whole flow don't charge any fee&#xD;&#xA;As [already answered](https://substrate.stackexchange.com/a/1800/2384), you can remove `pallet_transaction-payment`entirely" ContentLicense="CC BY-SA 4.0" />
  <row Id="41670" PostHistoryTypeId="50" PostId="8448" RevisionGUID="46feac70-89b8-41db-8d1e-7717a98584d4" CreationDate="2023-11-19T11:01:20.197" UserId="-1" />
  <row Id="41671" PostHistoryTypeId="50" PostId="5044" RevisionGUID="985f22fd-a546-436d-bea6-6091dea66f2f" CreationDate="2023-11-19T12:01:40.220" UserId="-1" />
  <row Id="41672" PostHistoryTypeId="50" PostId="3187" RevisionGUID="0d6d8cf7-e1ad-4145-b7e3-06d0588a38e3" CreationDate="2023-11-19T15:07:40.947" UserId="-1" />
  <row Id="41673" PostHistoryTypeId="50" PostId="10274" RevisionGUID="66ed9369-451f-4272-8928-18060aeaaaab" CreationDate="2023-11-19T20:03:55.493" UserId="-1" />
  <row Id="41674" PostHistoryTypeId="50" PostId="10278" RevisionGUID="5268897b-17e9-4e86-a383-dd8912fe96e5" CreationDate="2023-11-20T11:07:45.977" UserId="-1" />
  <row Id="41675" PostHistoryTypeId="2" PostId="10498" RevisionGUID="67fc0f8c-2901-40ae-9344-2d03e179eaa7" CreationDate="2023-11-20T11:39:28.183" UserId="4158" Text="I have the following code.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;use sp_externalities::ExternalitiesExt;&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;sp_externalities::decl_extension! {&#xD;&#xA;	pub struct CustomExt(u32);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;pub type HostFunctions = (custom::HostFunctions,);&#xD;&#xA;&#xD;&#xA;#[runtime_interface]&#xD;&#xA;pub trait Custom {&#xD;&#xA;	fn get_val(&amp;mut self) -&gt; Option&lt;u32&gt; {&#xD;&#xA;		self.extension::&lt;CustomExt&gt;().map(|ext| ext.0)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've also passed the extension to `custom_extension` in `service.rs` as below&#xD;&#xA;```rust&#xD;&#xA;if enable_offchain_worker {&#xD;&#xA;	task_manager.spawn_handle().spawn(&#xD;&#xA;		&quot;offchain-workers-runner&quot;,&#xD;&#xA;		&quot;offchain-work&quot;,&#xD;&#xA;		sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions {&#xD;&#xA;			...&#xD;&#xA;			custom_extensions: move |_| {&#xD;&#xA;				vec![&#xD;&#xA;					Box::new(statement_store.clone().as_statement_store_ext()) as Box&lt;_&gt;,&#xD;&#xA;                    // This should register my extension.&#xD;&#xA;					Box::new(CustomExt(10)) as Box&lt;_&gt;,&#xD;&#xA;				]&#xD;&#xA;			},&#xD;&#xA;		})&#xD;&#xA;		.run(client.clone(), task_manager.spawn_handle())&#xD;&#xA;		.boxed(),&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I've added the host functions in `executor.rs`&#xD;&#xA;```rust&#xD;&#xA;impl sc_executor::NativeExecutionDispatch for ExecutorDispatch {&#xD;&#xA;	type ExtendHostFunctions = (&#xD;&#xA;		frame_benchmarking::benchmarking::HostFunctions,&#xD;&#xA;		sp_statement_store::runtime_api::HostFunctions,&#xD;&#xA;		my_custom_ext::HostFunctions,&#xD;&#xA;	);&#xD;&#xA;&#xD;&#xA;	fn dispatch(method: &amp;str, data: &amp;[u8]) -&gt; Option&lt;Vec&lt;u8&gt;&gt; {&#xD;&#xA;		// Omitted&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn native_version() -&gt; sc_executor::NativeVersion {&#xD;&#xA;		// Omitted&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But when I try to access the value, I always get `None`&#xD;&#xA;```rust&#xD;&#xA;if let Some(key) = my_custom_ext::get_val() {&#xD;&#xA;	log::info!(&quot;Got value {key}&quot;);&#xD;&#xA;} else {&#xD;&#xA;	log::warn!(&quot;Got None&quot;);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can't seem to figure out why the extension is not working, is there anything else that I am missing?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="41677" PostHistoryTypeId="1" PostId="10498" RevisionGUID="67fc0f8c-2901-40ae-9344-2d03e179eaa7" CreationDate="2023-11-20T11:39:28.183" UserId="4158" Text="How to register a custom extension for offchain workers?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41678" PostHistoryTypeId="3" PostId="10498" RevisionGUID="67fc0f8c-2901-40ae-9344-2d03e179eaa7" CreationDate="2023-11-20T11:39:28.183" UserId="4158" Text="|offchain-worker|host-functions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41679" PostHistoryTypeId="2" PostId="10499" RevisionGUID="096962b8-8b24-41f7-8fa8-1617e3ae64c9" CreationDate="2023-11-20T11:48:29.317" UserId="4753" Text="We need to monitor the spec version of the block, that is, the runtime upgrade.&#xD;&#xA;&#xD;&#xA;Of course, we know that openGov's suggestions will determine the upgrade.&#xD;&#xA;&#xD;&#xA;So we're going to run this [guide][1] to monitor this.&#xD;&#xA;&#xD;&#xA;But there's a problem. For the life of me, I can't figure out which key to put as a query param here.&#xD;&#xA;&#xD;&#xA;    {sidecar host}/pallets/democracy/storage/ReferendumInfoOf?at=17506425&amp;keys[]=1&#xD;&#xA;&#xD;&#xA;   &#xD;&#xA;For example, if you make a request like the one above get a response like the one below. I can't find anything about democracy.&#xD;&#xA;&#xD;&#xA;     {&#xD;&#xA;            &quot;at&quot;: {&#xD;&#xA;                &quot;hash&quot;: &quot;0x6509ec5addbe481a8f66aac9dac7c22342039c9521225b8e455c156871304653&quot;,&#xD;&#xA;                &quot;height&quot;: &quot;17506425&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;pallet&quot;: &quot;democracy&quot;,&#xD;&#xA;            &quot;palletIndex&quot;: &quot;14&quot;,&#xD;&#xA;            &quot;storageItem&quot;: &quot;referendumInfoOf&quot;,&#xD;&#xA;            &quot;keys&quot;: [&#xD;&#xA;                &quot;1&quot;&#xD;&#xA;            ],&#xD;&#xA;            &quot;value&quot;: {&#xD;&#xA;                &quot;finished&quot;: {&#xD;&#xA;                    &quot;approved&quot;: true,&#xD;&#xA;                    &quot;end&quot;: &quot;1003528&quot;&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;I'd rather crawl the openGov site, but that's not easy either, because there's no single section where suggestions for runtime upgrades are posted.&#xD;&#xA;&#xD;&#xA;So my question is this.&#xD;&#xA; 1. I want to use sidecar to view proposals in democracy, what is the 'key for storage' and where can I find it? What should I query?&#xD;&#xA; 2. Aren't proposal for runtime upgrades submitted to a set section of openGov site?&#xD;&#xA; I ask this question because recent updates have been suggested in other sections.&#xD;&#xA; - v9431 upgrade : submit to [referenda section][2] &#xD;&#xA; - v9370 upgrade : submit to [motion section][3] &#xD;&#xA;&#xD;&#xA;Thank you in advance. Also, if there are any runtime upgrade monitoring methods you know of, recommendations would be appreciated.&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-runtime-upgrades#monitoring-runtime-changes&#xD;&#xA;  [2]: https://polkadot.polkassembly.io/referenda/166&#xD;&#xA;  [3]: https://polkadot.polkassembly.io/motion/354" ContentLicense="CC BY-SA 4.0" />
  <row Id="41681" PostHistoryTypeId="1" PostId="10499" RevisionGUID="096962b8-8b24-41f7-8fa8-1617e3ae64c9" CreationDate="2023-11-20T11:48:29.317" UserId="4753" Text="How do I monitor runtime upgrades with sidecar?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41682" PostHistoryTypeId="3" PostId="10499" RevisionGUID="096962b8-8b24-41f7-8fa8-1617e3ae64c9" CreationDate="2023-11-20T11:48:29.317" UserId="4753" Text="|runtime|upgrade|opengov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41683" PostHistoryTypeId="2" PostId="10500" RevisionGUID="a1080568-b493-49ac-a81c-448b7d0ba5f3" CreationDate="2023-11-20T12:16:24.343" UserId="3625" Text="I have the following error in the logs:&#xD;&#xA;```&#xD;&#xA;2023-11-20 11:47:02 Corrupted state at `[206, 197, 7, 13, 96, 157, 211, 73, 127, 114, 189, 224, 127, 201, 107, 160, 224, 205, 208, 98, 230, 234, 242, 66, 149, 173, 76, 207, 196, 29, 70, 9]: Error`&#xD;&#xA;2023-11-20 11:47:02 Ignoring empty authority change.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have looked at storage mapping, and it's related to Session.queuedKeys. There seems to be no migration at that point, and the key is identical. The blockchain ran smoothly for about 4000 blocks, and then this error stopped block-producing. I couldn't reproduce it locally.&#xD;&#xA;&#xD;&#xA;I think I should revert blocks before the runtime upgrade, but how can the problem be identified and prevented? The storage query returns `&lt;unknown&gt;` for that key.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41685" PostHistoryTypeId="1" PostId="10500" RevisionGUID="a1080568-b493-49ac-a81c-448b7d0ba5f3" CreationDate="2023-11-20T12:16:24.343" UserId="3625" Text="`Corrupted state at` after upgrade from 0.9.39 to 0.9.43" ContentLicense="CC BY-SA 4.0" />
  <row Id="41686" PostHistoryTypeId="3" PostId="10500" RevisionGUID="a1080568-b493-49ac-a81c-448b7d0ba5f3" CreationDate="2023-11-20T12:16:24.343" UserId="3625" Text="|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41687" PostHistoryTypeId="2" PostId="10501" RevisionGUID="d4d8d2ee-0edb-4451-bab7-d550cdd1c1c0" CreationDate="2023-11-20T14:52:20.403" UserId="4666" Text="You can compile the `rococo-runtime` package and its dependencies with `cargo build --release -p rococo-runtime`. On master this compiles 638 packages instead of the full 1819, and is a flag that you can use for any individual package in the workspace to save time in the future.&#xD;&#xA;&#xD;&#xA;From `cargo build --help`:&#xD;&#xA;&#xD;&#xA;    -p, --package [&lt;SPEC&gt;]  Package to build (see `cargo help pkgid`)&#xD;&#xA;&#xD;&#xA;You can find the full list of the workspace members in `Cargo.toml` in the root of the repo, and their respective package names in the corresponding `Cargo.toml` in the directory of the package." ContentLicense="CC BY-SA 4.0" />
  <row Id="41693" PostHistoryTypeId="2" PostId="10503" RevisionGUID="98543eb1-18ae-4484-b553-aa85165db6c9" CreationDate="2023-11-20T16:12:11.097" UserId="398" Text="I have set up a private network and it has node_authorization pallet included. I have added several validator nodes by using the node_authorization pallet as well_known nodes. &#xD;&#xA;&#xD;&#xA;Now I want to allow some users to set up an RPC node(Readable nodes to hold all blockchain data) for their dApps and it does not require any sort of authorization (sudo access). " ContentLicense="CC BY-SA 4.0" />
  <row Id="41695" PostHistoryTypeId="1" PostId="10503" RevisionGUID="98543eb1-18ae-4484-b553-aa85165db6c9" CreationDate="2023-11-20T16:12:11.097" UserId="398" Text="Adding RPC node in private network without node authorization" ContentLicense="CC BY-SA 4.0" />
  <row Id="41696" PostHistoryTypeId="3" PostId="10503" RevisionGUID="98543eb1-18ae-4484-b553-aa85165db6c9" CreationDate="2023-11-20T16:12:11.097" UserId="398" Text="|rpc|network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41697" PostHistoryTypeId="2" PostId="10504" RevisionGUID="a5371bcf-b3f4-4117-9127-dd46177ff063" CreationDate="2023-11-20T16:47:29.027" UserId="474" Text="Currently, Subxt doesn't expose the things you'd need to be able to decode these in a sensible way. &#xD;&#xA;&#xD;&#xA;If you wanted to try it anyway, you could take the following steps:&#xD;&#xA;&#xD;&#xA;1. Add the RPC method a definition like this to LegacyRpcMethods (or otherwise call it:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;async fn author_pending_extrinsics(&amp;self) -&gt; Result&lt;Vec&lt;Bytes&gt;, subxt::Error&gt; {&#xD;&#xA;   self.rpc.request(&quot;author_pendingExtrinsics&quot;, rpc_params![]).await;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(I'm sortof guessing but I think that's what you need)&#xD;&#xA;&#xD;&#xA;2. Run something like this (not really tested):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use subxt::{OnlineClient, PolkadotConfig};&#xD;&#xA;use subxt::{&#xD;&#xA;    backend::rpc::RpcClient,&#xD;&#xA;    backend::legacy::LegacyRpcMethods,&#xD;&#xA;    blocks::Extrinsics,&#xD;&#xA;    config::Config,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;#[tokio::main]&#xD;&#xA;async fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {&#xD;&#xA;    let rpc_client = RpcClient::from_url(&quot;ws://localhost:9944&quot;).await?;&#xD;&#xA;    let rpc_methods = LegacyRpcMethods::&lt;PolkadotConfig&gt;::new(rpc_client.clone());&#xD;&#xA;    let api = OnlineClient::&lt;PolkadotConfig&gt;::from_rpc_client(rpc_client).await?;&#xD;&#xA;&#xD;&#xA;    // Get pending exts:&#xD;&#xA;    let pending_exts = rpc_methods.author_pending_extrinsics().await?;&#xD;&#xA;&#xD;&#xA;    // Make them the right shape:&#xD;&#xA;    let pending_exts = pending_exts.into_iter().map(|e| e.0).collect();&#xD;&#xA;&#xD;&#xA;    // Feed them into our Extrinsics struct (this new fn would need to be made pub)&#xD;&#xA;    let exts = Extrinsics::new(&#xD;&#xA;        api.clone(),&#xD;&#xA;        pending_exts,&#xD;&#xA;        // Some internal cache object:&#xD;&#xA;        std::sync::Arc::new(futures::lock::Mutex::new(None)),&#xD;&#xA;        // ExtrinsicPartTypeIds::new would need to be made pub too:&#xD;&#xA;        ExtrinsicPartTypeIds::new(api.metadata().clone()),&#xD;&#xA;        &lt;PolkadotConfig as Config&gt;::Hash::random(),&#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    // from here you can do all of the usual stuff that Subxt can &#xD;&#xA;    // with extrinsics (iterate, decode them etc).&#xD;&#xA;&#xD;&#xA;    Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see that a couple of things need making public and it's hideous (because this isn't a public API).&#xD;&#xA;&#xD;&#xA;Please open an issue in the Subxt repo if you'd like this to be a public interface and we can discuss the use case and talk there :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41699" PostHistoryTypeId="2" PostId="10505" RevisionGUID="3d19c16d-5305-44ed-8745-127ae7e10c62" CreationDate="2023-11-20T19:54:04.687" UserId="4947" Text="I have a pallet that should have access to a `secp256k1::Keypair` for signing messages. And I want to be able to start the node with either the secret_key string or a path to a key-file. Then have the pallet in question have access to the secret key to construct signing contexts&#xD;&#xA;&#xD;&#xA;The limitation of the `keystore` as I understand it is that you can't access the secret key at all. Is there someway of achieving this? Or is using `localstorageSet` the only method of passing node-specific custom/arbitrary information to the runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="41701" PostHistoryTypeId="1" PostId="10505" RevisionGUID="3d19c16d-5305-44ed-8745-127ae7e10c62" CreationDate="2023-11-20T19:54:04.687" UserId="4947" Text="Does Substrate support custom node specific environment vars or flags" ContentLicense="CC BY-SA 4.0" />
  <row Id="41702" PostHistoryTypeId="3" PostId="10505" RevisionGUID="3d19c16d-5305-44ed-8745-127ae7e10c62" CreationDate="2023-11-20T19:54:04.687" UserId="4947" Text="|rpc|substrate-node|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41703" PostHistoryTypeId="50" PostId="5479" RevisionGUID="0ed0d6f7-d27a-41f3-980e-8d805a01be71" CreationDate="2023-11-20T20:00:20.043" UserId="-1" />
  <row Id="41704" PostHistoryTypeId="2" PostId="10506" RevisionGUID="0b0a224b-71dd-4e51-b530-ae09caccd3b6" CreationDate="2023-11-20T20:30:29.193" UserId="3244" Text="AFAIR, validators don't care about parachain timestamps anymore. They just convert the relay parent block number into an approximate timestamp and use that when validating parachain blocks.&#xD;&#xA;&#xD;&#xA;The decision was made to add CheckInherents logic back after removing it. This was done for backwards compatibility, though parachain teams are encouraged to avoid using it." ContentLicense="CC BY-SA 4.0" />
  <row Id="41706" PostHistoryTypeId="2" PostId="10507" RevisionGUID="b8875db2-05a0-469f-952d-fd1023016ff5" CreationDate="2023-11-20T21:30:03.807" UserId="3331" Text="I'm getting an **'Unroutable'** error when setting an `Error Handler` using `ReportTransactStatus` in my XCM Message.&#xD;&#xA;&#xD;&#xA;I'm using the polkadot v1.0.0, at V3 of XCM.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;match send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;	(Parent, Junction::Parachain(mult_para_id.into())).into(),&#xD;&#xA;	Xcm(vec![&#xD;&#xA;		SetErrorHandler(Xcm(vec![ReportTransactStatus(QueryResponseInfo {&#xD;&#xA;			destination: Parachain(2000).into(),&#xD;&#xA;			query_id,&#xD;&#xA;			max_weight: Weight::from_all(0),&#xD;&#xA;		})])),&#xD;&#xA;		Transact {&#xD;&#xA;			origin_kind: OriginKind::Native,&#xD;&#xA;			require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;			call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::xcm_clone_file {&#xD;&#xA;				signer,&#xD;&#xA;				energy_bank_file: new_file&#xD;&#xA;			})&#xD;&#xA;			.encode()&#xD;&#xA;			.into(),&#xD;&#xA;		},&#xD;&#xA;		ExpectTransactStatus(MaybeErrorCode::Success),&#xD;&#xA;	]),&#xD;&#xA;) {&#xD;&#xA;	Ok((hash, cost)) =&gt; Self::deposit_event(Event::Success(mult_para_id)),&#xD;&#xA;	Err(e) =&gt; Self::deposit_event(Event::Error(e, mult_para_id)),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When no error occurs in the destiny, everything executes without problems. However, when an error happens the destiny parachain outputs the `unroutable` error.&#xD;&#xA;&#xD;&#xA;That is confusing me because the channel is open in both ways, 2000 &gt; 2001 and 2001 &gt; 2000.&#xD;&#xA;&#xD;&#xA;Is that the correct way of checking if the XCM call was executed without errors in the destiny?&#xD;&#xA;What I'm doing wrong here and how could I fix it?&#xD;&#xA;&#xD;&#xA;I would really appreciate any kind of help or directions in how to properly do this.&#xD;&#xA;Thank you :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41708" PostHistoryTypeId="1" PostId="10507" RevisionGUID="b8875db2-05a0-469f-952d-fd1023016ff5" CreationDate="2023-11-20T21:30:03.807" UserId="3331" Text="Using ReportTransactStatus in XCM give me a unroutable error" ContentLicense="CC BY-SA 4.0" />
  <row Id="41709" PostHistoryTypeId="3" PostId="10507" RevisionGUID="b8875db2-05a0-469f-952d-fd1023016ff5" CreationDate="2023-11-20T21:30:03.807" UserId="3331" Text="|xcm|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41710" PostHistoryTypeId="5" PostId="6554" RevisionGUID="a5e5ce51-6aa2-4ef5-9a73-4ece832252b8" CreationDate="2023-11-20T23:03:37.087" UserId="165" Comment="updating answer after RFC implementation" Text="**UPDATE**: The information in this answer regarding locks being set at crowdloan creation is no longer correct.&#xD;&#xA;After the implementation of [RFC#14](https://github.com/polkadot-fellows/RFCs/pull/14) no manager lock is set for a parachain at the creation of the crowdloan any longer, but a parachain rather gets manager locked after producing its first block (after onboarding), or after producing a block and not having a manager lock.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You will be able to deregister a parathread **as long as there is not a crowdloan open for this paraId.**&#xD;&#xA;When a crowdloan is created a lock is applied to this para. Please check: https://github.com/paritytech/polkadot/blob/6a5d31fcbdd3ac5dd880e0bf3616e303b5bb480f/runtime/common/src/crowdloan/mod.rs#L377&#xD;&#xA;```rust&#xD;&#xA;// Add a lock to the para so that the configuration cannot be changed.&#xD;&#xA;T::Registrar::apply_lock(index);&#xD;&#xA;```&#xD;&#xA;You can think of this lock as some sort of &quot;contract&quot; with your backers so a para team won't modify the code and state submitted and therefore being supported by the community.&#xD;&#xA;&#xD;&#xA;In case **no crowdloan is open**, then you shouldn't find any blocker to deregister your parathread. Notice that if your idea is deregistering your parathread and then registering again for bidding in the same auction, take into account deregistering and registering times to make your calculations and assess if you are still in the time window of the auction you want to participate in." ContentLicense="CC BY-SA 4.0" />
  <row Id="41715" PostHistoryTypeId="2" PostId="10509" RevisionGUID="223f78ea-9831-4bef-ab88-1049daf4da0a" CreationDate="2023-11-21T11:10:18.777" UserId="452" Text="When using Aura as a standalone chain the slot worker is used to drive block production. The slot worker requires that the `InherentDataProvider` includes the slot number (https://github.com/paritytech/polkadot-sdk/tree/8297d08cca75eab01356af8142672e608cc52e1e/substrate/client/consensus/slots/src/lib.rs https://github.com/paritytech/polkadot-sdk/blob/8297d08cca75eab01356af8142672e608cc52e1e/substrate/client/consensus/slots/src/lib.rs#L470-L474). When using Aura as a parachain the block production is driven by the relay chain, and hence the slot worker is not used, and by extension the `InherentDataProvider` doesn't need to include the block number. This is validated by the compiler, i.e. if you try to use Aura in a standalone chain without providing a slot in the `InherentDataProvider` you'll get a compile error.&#xD;&#xA;&#xD;&#xA;The runtime doesn't need this inherent at all, the slot number is extracted from the predigest instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="41717" PostHistoryTypeId="2" PostId="10510" RevisionGUID="6f671714-2de1-460f-94ad-719c55baf61c" CreationDate="2023-11-21T12:03:22.120" UserId="4532" Text="I'm trying to test transfer of fungible assets from Statemine to Trappist with Rococo relay chain to integrate assets to my custom parachain. First of all, I tried to repeat the steps shown in the video (https://www.youtube.com/watch?v=UfxU3hUprKo&amp;t=1182s) with standard configs:&#xD;&#xA;&#xD;&#xA;Steps:&#xD;&#xA;&#xD;&#xA; 1. Clone `polkadot` repo &amp; swith to branch `release-v0.9.42`. Build with `cargo build --release` and copy `target/release/polkadot` to use it with zombienet. &#xD;&#xA; 2. Clone `cumulus` repo &amp; switch to branch `polkadot-v0.9.42`. Change `Barrier` config to allow messages from `rococo` to make fungible asset sufficient from this: &#xD;&#xA;&#xD;&#xA;`pub type Barrier = DenyThenTry&lt;DenyReserveTransferToRelayChain, (TakeWeightCredit, AllowKnownQueryResponses&lt;PolkadotXcm&gt;, WithComputedOrigin&lt;(AllowTopLevelPaidExecutionFrom&lt;Everything&gt;, AllowExplicitUnpaidExecutionFrom&lt;Everything&gt;, AllowSubscriptionsFrom&lt;Everything&gt;,),&#xD;&#xA;UniversalLocation, ConstU32&lt;8&gt;,&gt;,),&gt;;`&#xD;&#xA;&#xD;&#xA;to this:&#xD;&#xA;&#xD;&#xA;`&#xD;&#xA;pub type Barrier = DenyThenTry&lt;DenyReserveTransferToRelayChain, (TakeWeightCredit, AllowTopLevelPaidExecutionFrom&lt;Everything&gt;, AllowUnpaidExecutionFrom&lt;Everything&gt;, AllowKnownQueryResponses&lt;PolkadotXcm&gt;, AllowSubscriptionsFrom&lt;Everything&gt;,),&gt;;&#xD;&#xA;`.&#xD;&#xA;&#xD;&#xA;Build with cargo build --release and copy target/release/polkadot to use it with zombienet.&#xD;&#xA;&#xD;&#xA;3. Clone `trappist` repo &amp; switch to branch `polkadot-v0.9.42`. Build with cargo build --release and copy target/release/polkadot to use it with zombienet.&#xD;&#xA;&#xD;&#xA;4. Start all nodes (rococo with 4 validators, statemine &amp; trappist with 1 collator both).&#xD;&#xA;&#xD;&#xA;5. On trappist parachain call `lockdownMode.deactivateLockdownMode` to allow interactions.&#xD;&#xA;&#xD;&#xA;6. Create a fungible asset on statemine &amp; trappist.&#xD;&#xA;&#xD;&#xA;7. Make fungible asset from statemine sufficient using this `encoded call data` instruction&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;by calling it on relay chain with `sudo`.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Got event `assets.AssetStatusChanged` on statemine.&#xD;&#xA;&#xD;&#xA;8. Mint `10_000_000` fungible tokens on statemine and transfer to `BOB` account `10_000`.&#xD;&#xA;&#xD;&#xA;9. After that create extrinsic call `polkadotXcm.limitedReserveTransferAssets` as below:&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;10. Received event on statemine LGTM: &#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;11. But I have problem with event on trappist. Got error: &#xD;&#xA;&#xD;&#xA;[![enter image description here][6]][6]&#xD;&#xA;&#xD;&#xA;So, my question is what I should do to get rid of this error and succesfully transfer fungible assets between parachains?&#xD;&#xA;&#xD;&#xA;I can add more information about configs or something else.&#xD;&#xA;&#xD;&#xA;Thanks in advance to everyone who will take part.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/y1uIv.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/jcxzC.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/WhPKY.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/r7izU.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/CRbfY.png&#xD;&#xA;  [6]: https://i.stack.imgur.com/jf0hC.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41719" PostHistoryTypeId="1" PostId="10510" RevisionGUID="6f671714-2de1-460f-94ad-719c55baf61c" CreationDate="2023-11-21T12:03:22.120" UserId="4532" Text="XcmError::TooExpensive When trasfering fungible assets between statemine &amp; trappist parachains with rococo relay chain (limitedReservedTransferAssets)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41720" PostHistoryTypeId="3" PostId="10510" RevisionGUID="6f671714-2de1-460f-94ad-719c55baf61c" CreationDate="2023-11-21T12:03:22.120" UserId="4532" Text="|parachain|xcm|xcmp|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41721" PostHistoryTypeId="2" PostId="10511" RevisionGUID="7730c26c-5183-4b22-abe1-09315a082f0a" CreationDate="2023-11-21T13:53:13.090" UserId="1837" Text="`pallet-staking` does not store payout information since this will just inflate the storage.&#xD;&#xA;Possible option&#xD;&#xA; - You can also query `Rewarded` events which can give you account and reward details (Given you have an archival node to store previous events)&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/staking/src/pallet/impls.rs#L283" ContentLicense="CC BY-SA 4.0" />
  <row Id="41724" PostHistoryTypeId="5" PostId="10507" RevisionGUID="02b50faf-0839-4194-a73c-c8c1ad00e60a" CreationDate="2023-11-21T15:46:14.810" UserId="354" Comment="improved formatting" Text="I am getting an **'Unroutable'** error when setting an `Error Handler` using `ReportTransactStatus` in my XCM Message.&#xD;&#xA;&#xD;&#xA;I  am using the `polkadot-v1.0.0`, at V3 of XCM.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;match send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;	(Parent, Junction::Parachain(mult_para_id.into())).into(),&#xD;&#xA;	Xcm(vec![&#xD;&#xA;		SetErrorHandler(Xcm(vec![ReportTransactStatus(QueryResponseInfo {&#xD;&#xA;			destination: Parachain(2000).into(),&#xD;&#xA;			query_id,&#xD;&#xA;			max_weight: Weight::from_all(0),&#xD;&#xA;		})])),&#xD;&#xA;		Transact {&#xD;&#xA;			origin_kind: OriginKind::Native,&#xD;&#xA;			require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;			call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::xcm_clone_file {&#xD;&#xA;				signer,&#xD;&#xA;				energy_bank_file: new_file&#xD;&#xA;			})&#xD;&#xA;			.encode()&#xD;&#xA;			.into(),&#xD;&#xA;		},&#xD;&#xA;		ExpectTransactStatus(MaybeErrorCode::Success),&#xD;&#xA;	]),&#xD;&#xA;) {&#xD;&#xA;	Ok((hash, cost)) =&gt; Self::deposit_event(Event::Success(mult_para_id)),&#xD;&#xA;	Err(e) =&gt; Self::deposit_event(Event::Error(e, mult_para_id)),&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When no error occurs in the destiny, everything executes without problems. However, when an error happens the destiny parachain outputs the `unroutable` error.&#xD;&#xA;&#xD;&#xA;That is confusing me because the channel is open in both ways, `2000 &gt; 2001` and `2001 &gt; 2000`.&#xD;&#xA;&#xD;&#xA;Is that the correct way of checking if the XCM call was executed without errors in the destiny?&#xD;&#xA;What I am doing wrong here and how could I fix it?&#xD;&#xA;&#xD;&#xA;I would really appreciate any kind of help or directions in how to properly do this.&#xD;&#xA;&#xD;&#xA;Thank you :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41725" PostHistoryTypeId="24" PostId="10507" RevisionGUID="02b50faf-0839-4194-a73c-c8c1ad00e60a" CreationDate="2023-11-21T15:46:14.810" Comment="Proposed by 354 approved by 3331 edit id of 611" ContentLicense="CC BY-SA 4.0" />
  <row Id="41726" PostHistoryTypeId="5" PostId="10497" RevisionGUID="98ed3e1e-9af4-4e80-b25d-86bc763eb413" CreationDate="2023-11-21T16:09:25.747" UserId="354" Comment="improved formatting" Text="My understanding is that transaction priority and therefore the ordering in the block is determined by the fee and tip paid. &#xD;&#xA;&#xD;&#xA;I have noticed a number of times that transactions with the highest total fee are not always at the top of the block. Some examples:&#xD;&#xA;&#xD;&#xA;https://karura.subscan.io/block/1946916&#xD;&#xA;&#xD;&#xA;https://hydradx.subscan.io/block/3857602&#xD;&#xA;&#xD;&#xA;What could the reason for this be? &#xD;&#xA;&#xD;&#xA;The only thing I can think of is perhaps the highest tip transaction is arriving late and for some reason the priority doesn't have time to be recalculated.&#xD;&#xA;&#xD;&#xA;I am aware that some chains have priority rules based on the extrinsic type, but examples like this make me think this isn't the case for Hydra at least:&#xD;&#xA;https://hydradx.subscan.io/block/3850710" ContentLicense="CC BY-SA 4.0" />
  <row Id="41727" PostHistoryTypeId="24" PostId="10497" RevisionGUID="98ed3e1e-9af4-4e80-b25d-86bc763eb413" CreationDate="2023-11-21T16:09:25.747" Comment="Proposed by 354 approved by 1805 edit id of 610" ContentLicense="CC BY-SA 4.0" />
  <row Id="41728" PostHistoryTypeId="2" PostId="10512" RevisionGUID="d9189bba-864f-4201-b7bd-b1c06a32252f" CreationDate="2023-11-22T02:25:55.113" UserId="1959" Text="Have you made Trappist support your asset? If not, Trappist doesn't support using your asset to pay for execution fees. You can change the [Trader](https://github.com/paritytech/trappist/blob/v0.9.42/runtime/trappist/src/xcm_config.rs#L258) in Trappist to support it. Check this answer: https://substrate.stackexchange.com/a/9603/1959" ContentLicense="CC BY-SA 4.0" />
  <row Id="41730" PostHistoryTypeId="2" PostId="10513" RevisionGUID="927d4beb-81e9-4ab5-90b2-076b8b675a21" CreationDate="2023-11-22T02:40:29.623" UserId="1959" Text="Try changing the destination in `SetErrorHandler` to `{parents:1, Parachain(2000)}`, It would be executed on Parachain(2001) when error occurs, and the location of Parachain(2000) **relative to** Parachain(2001) is `parents: 1, Parachain(2000)`" ContentLicense="CC BY-SA 4.0" />
  <row Id="41732" PostHistoryTypeId="50" PostId="10277" RevisionGUID="c65b116b-f505-424e-99bf-6f68ec4c97db" CreationDate="2023-11-22T03:10:26.347" UserId="-1" />
  <row Id="41737" PostHistoryTypeId="2" PostId="10515" RevisionGUID="ebc441ee-0a89-480b-a32f-73560941e0e7" CreationDate="2023-11-22T07:20:13.933" UserId="4835" Text="I have added a Scheduler into my pallet, I am following referenda pallet as model.&#xD;&#xA;&#xD;&#xA;I have written some tests, and the scheduler functionality is working.&#xD;&#xA;&#xD;&#xA;However, I have noticed that in my unit tests the compiler is asking for a v2 interface while in the pallet is asking for a v3 interface.&#xD;&#xA;&#xD;&#xA;I can't see why is this happening, In my Pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;	use frame_support::{&#xD;&#xA;		traits::{&#xD;&#xA;			schedule::{&#xD;&#xA;				v3::{Anon as ScheduleAnon, Named as ScheduleNamed},&#xD;&#xA;			},&#xD;&#xA;...&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;...&#xD;&#xA;		type Scheduler: ScheduleAnon&lt;BlockNumberFor&lt;Self&gt;, CallOf&lt;Self&gt;, PalletsOriginOf&lt;Self&gt;&gt;&#xD;&#xA;		+ ScheduleNamed&lt;BlockNumberFor&lt;Self&gt;, CallOf&lt;Self&gt;, PalletsOriginOf&lt;Self&gt;&gt;;&#xD;&#xA;...&#xD;&#xA;}   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any idea what could be triggering this ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41739" PostHistoryTypeId="1" PostId="10515" RevisionGUID="ebc441ee-0a89-480b-a32f-73560941e0e7" CreationDate="2023-11-22T07:20:13.933" UserId="4835" Text="Scheduler version" ContentLicense="CC BY-SA 4.0" />
  <row Id="41740" PostHistoryTypeId="3" PostId="10515" RevisionGUID="ebc441ee-0a89-480b-a32f-73560941e0e7" CreationDate="2023-11-22T07:20:13.933" UserId="4835" Text="|pallet-scheduler|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41741" PostHistoryTypeId="50" PostId="9024" RevisionGUID="e3e17bc3-e9f0-43d8-89ed-2c1dc6139c6a" CreationDate="2023-11-22T08:04:15.453" UserId="-1" />
  <row Id="41742" PostHistoryTypeId="5" PostId="10458" RevisionGUID="5520fea4-28ee-42f1-a875-cd4fff9b22ad" CreationDate="2023-11-22T08:21:10.640" UserId="2862" Comment="deleted 86 characters in body; edited title" Text="Is the separation of the Runtime business logic from the host intended solely for enabling forkless upgrades, or does it also aim to facilitate compatibility with different hosts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41743" PostHistoryTypeId="4" PostId="10458" RevisionGUID="5520fea4-28ee-42f1-a875-cd4fff9b22ad" CreationDate="2023-11-22T08:21:10.640" UserId="2862" Comment="deleted 86 characters in body; edited title" Text="What is the rationale behind the node architecture (Runtime + Host)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41744" PostHistoryTypeId="2" PostId="10516" RevisionGUID="f7076c01-4c72-4676-82dc-e16c6ccce1fc" CreationDate="2023-11-22T09:12:00.457" UserId="386" Text="I'm currently working with Substrate parachains and have a couple of questions that I'm hoping to get clarity on:&#xD;&#xA;&#xD;&#xA;1. **Genesis Runtime Upload Costs**: Is the cost associated with uploading the genesis runtime a fixed value, or does it fluctuate depending on the size of the wasm (WebAssembly) file?&#xD;&#xA;&#xD;&#xA;2. **Payment for Runtime Upgrade Execution**: In a parachain context, when a runtime upgrade (an extrinsic) is executed, who is responsible for covering the costs on the relay chain? Is this cost borne by the parachain that's executing the upgrade, or is there a different mechanism in place?&#xD;&#xA;&#xD;&#xA;Thank you in advance for your time and assistance!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41746" PostHistoryTypeId="1" PostId="10516" RevisionGUID="f7076c01-4c72-4676-82dc-e16c6ccce1fc" CreationDate="2023-11-22T09:12:00.457" UserId="386" Text="Costs and Payment for Runtime Upgrades in Parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="41747" PostHistoryTypeId="3" PostId="10516" RevisionGUID="f7076c01-4c72-4676-82dc-e16c6ccce1fc" CreationDate="2023-11-22T09:12:00.457" UserId="386" Text="|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41748" PostHistoryTypeId="5" PostId="10516" RevisionGUID="52fff7da-24bd-4380-8709-44bdca37805e" CreationDate="2023-11-22T10:43:24.643" UserId="386" Comment="deleted 204 characters in body" Text="I'm currently working with Substrate parachains and have question that I'm hoping to get clarity on:&#xD;&#xA;&#xD;&#xA;**Payment for Runtime Upgrade Execution**: In a parachain context, when a runtime upgrade (an extrinsic) is executed, who is responsible for covering the costs on the relay chain? Is this cost borne by the parachain that's executing the upgrade, or is there a different mechanism in place?&#xD;&#xA;&#xD;&#xA;Thank you in advance for your time and assistance!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41749" PostHistoryTypeId="2" PostId="10517" RevisionGUID="56391a02-76ce-4821-ac17-2bf01aad3b48" CreationDate="2023-11-22T10:54:02.630" UserId="2340" Text="When we run a node, we start a bunch of tasks using `task_manager.spawn_handle()` or `task_manager.spawn_essential_handle()`.&#xD;&#xA;&#xD;&#xA;From my understanding, those spawn new Tokio tasks.&#xD;&#xA;If my computer has multiple cores I expect that those tasks run on as many threads as my computer can provide to the Tokio runtime.&#xD;&#xA;&#xD;&#xA;I observed that if I spam the node with a lot of RPC calls or a lot of transactions, block production will stop. My understanding is that the node picks its tasks among all available, RPC calls and essential tasks, without prioritizing the essential one.&#xD;&#xA;&#xD;&#xA;Another point is that the more concurrent RPC calls I do, the fewer RPCs it handles per second. I would expect different RPC calls to be run in parallel on multiple threads, so the number to go up until we run out of available system threads and then stay stable. It looks like instead they are blocking each other.&#xD;&#xA;&#xD;&#xA;Is my understanding of the overall design correct?&#xD;&#xA;How can I make sure that block production is not halted when RPC is under heavy use?&#xD;&#xA;Is there some lock in the RPC execution that makes them so counterproductive to run concurrently ? I'm calling a lot of runtime-api in those RPCs. Those spawn instances of the runtime execution engine. Are those running concurrently or blocking each other?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41751" PostHistoryTypeId="1" PostId="10517" RevisionGUID="56391a02-76ce-4821-ac17-2bf01aad3b48" CreationDate="2023-11-22T10:54:02.630" UserId="2340" Text="How are the node threads and tasks managed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41752" PostHistoryTypeId="3" PostId="10517" RevisionGUID="56391a02-76ce-4821-ac17-2bf01aad3b48" CreationDate="2023-11-22T10:54:02.630" UserId="2340" Text="|rpc|substrate-node|runtime-api|tokio|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41753" PostHistoryTypeId="2" PostId="10518" RevisionGUID="1527d97c-3b56-4352-ae51-8775e17aaddb" CreationDate="2023-11-22T12:40:12.000" UserId="3538" Text="I have a solo-chain with PoA consensus, `MILLISECS_PER_BLOCK` of `1000`, 5MB of `MAX_BLOCK_SIZE`, and 400ms of `MAXIMUM_BLOCK_WEIGHT`. The chain produces and finalizes blocks when there's a single authoring node, but as soon as, I attempt to run multiple nodes after adding them in the `chain_spec.rs`, the blocks are produced but not finalized, and I get this error: `Failed to handle sync state from PeerId(&quot;12D3KooWE6AEVHZVzr9KvkaAQftnu9wwU6QLgdrF5XVs4Tx9vydX&quot;)`, and if I would try to add validators through the Polkadot UI, there's no such error neither there's any block production from the second node. I've tried changing the block production times, but it didn't solve the issue. &#xD;&#xA;&#xD;&#xA;Note: The consensus is using `Aura` for block production, and `DAGs` for block finalization, inspired from [AlephZero](https://docs.alephzero.org/aleph-zero/explore/alephbft-consensus#:~:text=using%20DAGs%20allows%20for%20faster%20transaction%20speeds%20and%20higher%20throughput%20and%20hence%20significantly%20lower%20transaction%20fees.) with some modifications of Account types. " ContentLicense="CC BY-SA 4.0" />
  <row Id="41755" PostHistoryTypeId="1" PostId="10518" RevisionGUID="1527d97c-3b56-4352-ae51-8775e17aaddb" CreationDate="2023-11-22T12:40:12.000" UserId="3538" Text="No Block production with multiple nodes / AURA" ContentLicense="CC BY-SA 4.0" />
  <row Id="41756" PostHistoryTypeId="3" PostId="10518" RevisionGUID="1527d97c-3b56-4352-ae51-8775e17aaddb" CreationDate="2023-11-22T12:40:12.000" UserId="3538" Text="|block-production|aura|finalization|block-size|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41757" PostHistoryTypeId="2" PostId="10519" RevisionGUID="e2a15328-ee59-4cab-9fde-92a167d3b2ee" CreationDate="2023-11-22T12:44:25.207" UserId="2762" Text="One of the comments in the similar question you pointed is that you always have to waiting until your collator finish the syncing.&#xD;&#xA;If you want a faster sync you can use the flag `--sync fast` (See more here [What's the fastest way to sync a node only keeping full state for the last N blocks?][1] ).&#xD;&#xA;&#xD;&#xA;If the parachain is still not producing blocks but not showing any error messages, you need to try to figure out why, usually is due to small issue with the onboarding as a parachain. &#xD;&#xA;&#xD;&#xA;The following checklist should help avoiding the most common reasons why a parachain won't produce blocks:&#xD;&#xA;[Our parachain doesn't produce blocks \[checklist\]][2] and for more check this guide I am creating: [Troubleshooting: Common Collator Issues][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/8864/whats-the-fastest-way-to-sync-a-node-only-keeping-full-state-for-the-last-n-blo&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/1394/our-parachain-doesnt-produce-blocks-checklist/1395#1395&#xD;&#xA;  [3]: https://hackmd.io/zqbmc38LQnyfBmLWtkXrrg" ContentLicense="CC BY-SA 4.0" />
  <row Id="41759" PostHistoryTypeId="5" PostId="10518" RevisionGUID="06cf1d09-4b49-476c-a15f-ea4a20ad67ba" CreationDate="2023-11-22T12:58:20.757" UserId="3538" Comment="deleted 4 characters in body" Text="I have a solo-chain with PoA consensus, `MILLISECS_PER_BLOCK` of `1000`, 5MB of `MAX_BLOCK_SIZE`, and 400ms of `MAXIMUM_BLOCK_WEIGHT`. The chain produces and finalizes blocks when there's a single authoring node, but as soon as, I attempt to run multiple nodes after adding them in the `chain_spec.rs`, the blocks are produced but not finalized, and I get this error: `Failed to handle sync state from PeerId(&quot;12D3KooWE6AEVHZVzr9KvkaAQftnu9wwU6QLgdrF5XVs4Tx9vydX&quot;)`, and if I would try to add validators through the Polkadot UI, there's no such error neither there's any block production from the second node. I've tried changing the block production times, but it didn't solve the issue. &#xD;&#xA;&#xD;&#xA;Note: The consensus is using `Aura` for block production, and `DAGs` for rapid finality, inspired from [AlephZero](https://docs.alephzero.org/aleph-zero/explore/alephbft-consensus#:~:text=using%20DAGs%20allows%20for%20faster%20transaction%20speeds%20and%20higher%20throughput%20and%20hence%20significantly%20lower%20transaction%20fees.) with some modifications of Account types. " ContentLicense="CC BY-SA 4.0" />
  <row Id="41760" PostHistoryTypeId="2" PostId="10520" RevisionGUID="7d53e17a-d82d-4151-8036-efb82fbf5ee8" CreationDate="2023-11-22T13:30:23.403" UserId="4951" Text="I have python code that does deploy a few ink! contracts that depend on each other. In order to do this in a batch call, I want to predict the contract address given the salt.&#xD;&#xA;&#xD;&#xA;How would I do this, assuming I have the DefaultAddressGenerator: &#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/substrate/blob/master/frame/contracts/src/address.rs#L55C41-L55C64&#xD;&#xA;&#xD;&#xA;Question is basically to port this to python." ContentLicense="CC BY-SA 4.0" />
  <row Id="41762" PostHistoryTypeId="1" PostId="10520" RevisionGUID="7d53e17a-d82d-4151-8036-efb82fbf5ee8" CreationDate="2023-11-22T13:30:23.403" UserId="4951" Text="How do I predict an address given a salt in python?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41763" PostHistoryTypeId="3" PostId="10520" RevisionGUID="7d53e17a-d82d-4151-8036-efb82fbf5ee8" CreationDate="2023-11-22T13:30:23.403" UserId="4951" Text="|pallet-contracts|py-substrate-interface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41766" PostHistoryTypeId="2" PostId="10522" RevisionGUID="c6ce52ff-e19b-4aa5-a339-77c38c19d695" CreationDate="2023-11-22T15:27:30.180" UserId="372" Text="This question is about cumulus PR https://github.com/paritytech/cumulus/pull/825. What is an example of when I would want to use custom head data.&#xD;&#xA;&#xD;&#xA;The PR description itself says:&#xD;&#xA;&gt; This can be for example when a chain wants to fork.&#xD;&#xA;&#xD;&#xA;But I still don't really understand that. We already know that parachains don't need to fork regularly because of the dynamic runtime upgrades. So I'm trying to think of an example of when they would want to.&#xD;&#xA;&#xD;&#xA;One idea I have is that the community decides the consensus authorities are corrupt and wants to change them. So two questions:&#xD;&#xA;&#xD;&#xA;1. Is this the kind of situation the feature is designed for (and if not, please provide a more typical example).&#xD;&#xA;2. How would I use this custom head data feature to achieve such a fork." ContentLicense="CC BY-SA 4.0" />
  <row Id="41768" PostHistoryTypeId="1" PostId="10522" RevisionGUID="c6ce52ff-e19b-4aa5-a339-77c38c19d695" CreationDate="2023-11-22T15:27:30.180" UserId="372" Text="What is a concrete use case for cumulus's ability to return custom head data" ContentLicense="CC BY-SA 4.0" />
  <row Id="41769" PostHistoryTypeId="3" PostId="10522" RevisionGUID="c6ce52ff-e19b-4aa5-a339-77c38c19d695" CreationDate="2023-11-22T15:27:30.180" UserId="372" Text="|parachain|cumulus|fork|head-data|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41770" PostHistoryTypeId="2" PostId="10523" RevisionGUID="79808026-3367-44be-82f2-c9dddb15e533" CreationDate="2023-11-22T15:47:37.917" UserId="73" Text="The feature was mainly added for chains that want to migrate from a solo chain to running as a parachain. It would work the following way:&#xD;&#xA;&#xD;&#xA;1. They get a slot on the relay chain and have some kind of shell runtime running.&#xD;&#xA;&#xD;&#xA;2. The solo chain is doing a runtime update that will include all the necessary changes for being a parachain, e.g. `parachain-system` pallet etc. This update should in the best case also make the solo chain stop (which would be the case if it switches from BABE to AURA for example). Stopping the chain is not really required, but works as a better kind of signal that the parachain now is taking over control.&#xD;&#xA;&#xD;&#xA;3. On the parachain you issue a transaction that will return the header of the block of the solo chain, that enacted the new update, as the custom head data.&#xD;&#xA;&#xD;&#xA;4. The shell parachain will then stop working as it doesn't find this head in its local database, but collators that have the old solo chain state will be able to produce new blocks.&#xD;&#xA;&#xD;&#xA;Doing it this way we achieved to migrate the state to the Parachain without doing any kind of copying or whatever. From the runtime POV this looks like a normal runtime update.&#xD;&#xA;&#xD;&#xA;Another use case of this feature was for example the [switch by Kilt from Kusama to Polkadot][1]. &#xD;&#xA;&#xD;&#xA;When we have Coretime this feature will not be that important anymore for these kind of use cases as you can register a parachain much faster and get access to Coretime on demand.&#xD;&#xA;&#xD;&#xA;You can use this for a fork by just setting the header of some other chain that will then take over the slot. However, with Coretime this isn't that important anymore as well.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.network/blog/first-parachain-successfully-migrates-from-kusama-to-polkadot" ContentLicense="CC BY-SA 4.0" />
  <row Id="41772" PostHistoryTypeId="50" PostId="4419" RevisionGUID="15e30a35-de9e-4e63-9f34-b880a9f017cf" CreationDate="2023-11-22T16:06:20.910" UserId="-1" />
  <row Id="41773" PostHistoryTypeId="2" PostId="10524" RevisionGUID="1a67dfa6-d3ca-46da-981c-8f42a4ad33d8" CreationDate="2023-11-22T16:14:13.930" UserId="2762" Text="You can calculate the address of your pallet, and then easily compare with the origin address.&#xD;&#xA;&#xD;&#xA;Check how to obtain the pallet address here [Query AccountID of a pallet][1], here [How can we get a Pallet's Sub-Account Address using PolkadotJS API][2] and here [How do i find the address of the treasury?][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/6510/query-accountid-of-a-pallet&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/477/how-can-we-get-a-pallets-sub-account-address-using-polkadotjs-api&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/4307/how-do-i-find-the-address-of-the-treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="41775" PostHistoryTypeId="50" PostId="10258" RevisionGUID="18ca6f28-3407-437d-9cbc-723f57d850aa" CreationDate="2023-11-22T17:02:30.277" UserId="-1" />
  <row Id="41779" PostHistoryTypeId="2" PostId="10525" RevisionGUID="5d35d821-6273-414c-9c78-150407a8ce96" CreationDate="2023-11-22T18:30:58.260" UserId="4952" Text="I am facing too much errors when I clone this project, I want to create a stable coin in substrate I found this repository https://github.com/1010adigupta/ink-Stable-Coin&#xD;&#xA;&#xD;&#xA;But after installing rust when follow all the steps to run it as mentioned in repository. I got errors in compiling . After clone the project we need to go to stable coin folder and run the command like  **cargo contract build** &#xD;&#xA;&#xD;&#xA;Got these types of errors &#xD;&#xA;&#xD;&#xA;ERROR: Error invoking `cargo metadata` for Cargo.toml&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    `cargo metadata` exited with an error:     Updating crates.io index&#xD;&#xA;        Updating git repository `https://github.com/Brushfam/openbrush-contracts`&#xD;&#xA;    warning: spurious network error (3 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)&#xD;&#xA;    warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)&#xD;&#xA;    warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)&#xD;&#xA;    error: failed to get `openbrush` as a dependency of package `stable_coin_contract v4.0.0-beta.1 (/home/blockchain/myproject/ink-Stable-Coin/contracts/stable-coin)`&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;      failed to load source for dependency `openbrush`&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;      Unable to update https://github.com/Brushfam/openbrush-contracts?branch=main&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;      failed to fetch into: /home/blockchain/.cargo/git/db/openbrush-contracts-27b3a02a91f8eba3&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;      network failure seems to have happened&#xD;&#xA;      if a proxy or similar is necessary `net.git-fetch-with-cli` may help here&#xD;&#xA;      https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli&#xD;&#xA;&#xD;&#xA;    Caused by:&#xD;&#xA;      failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)" ContentLicense="CC BY-SA 4.0" />
  <row Id="41781" PostHistoryTypeId="1" PostId="10525" RevisionGUID="5d35d821-6273-414c-9c78-150407a8ce96" CreationDate="2023-11-22T18:30:58.260" UserId="4952" Text="I want to clone a stable coin project in Rust but having a lot of errors" ContentLicense="CC BY-SA 4.0" />
  <row Id="41782" PostHistoryTypeId="3" PostId="10525" RevisionGUID="5d35d821-6273-414c-9c78-150407a8ce96" CreationDate="2023-11-22T18:30:58.260" UserId="4952" Text="|ink|parachain|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41783" PostHistoryTypeId="50" PostId="4119" RevisionGUID="34fac106-8291-4be6-afd2-13239ea7a686" CreationDate="2023-11-22T21:04:25.547" UserId="-1" />
  <row Id="41785" PostHistoryTypeId="50" PostId="4617" RevisionGUID="ad642636-08cb-4b24-af7a-9faebc71aee7" CreationDate="2023-11-23T04:03:40.393" UserId="-1" />
  <row Id="41786" PostHistoryTypeId="50" PostId="5113" RevisionGUID="b2d9a9c1-3b05-464b-9431-d413bf9e19ad" CreationDate="2023-11-23T05:01:55.243" UserId="-1" />
  <row Id="41787" PostHistoryTypeId="50" PostId="3931" RevisionGUID="521f0629-0396-457a-9656-df7addbcb2b1" CreationDate="2023-11-23T06:05:45.767" UserId="-1" />
  <row Id="41789" PostHistoryTypeId="50" PostId="4816" RevisionGUID="93692037-bc5e-470f-a84d-ffbfb1f9446b" CreationDate="2023-11-23T07:04:15.470" UserId="-1" />
  <row Id="41793" PostHistoryTypeId="2" PostId="10527" RevisionGUID="6b41e1a0-af70-4198-af7f-8316c0e15a6a" CreationDate="2023-11-23T08:34:15.577" UserId="4835" Text="After creating utility functions in the pallet for handling scheduling the issue went away.&#xD;&#xA;&#xD;&#xA;I was trying to use Scheduler without preimages pallet because I only plan to schedule inline calls, but I had to add it anyway. I think this could be the root of the problem." ContentLicense="CC BY-SA 4.0" />
  <row Id="41795" PostHistoryTypeId="2" PostId="10528" RevisionGUID="78bd9f81-7011-4ac7-a30c-f3fd3800d460" CreationDate="2023-11-23T09:45:29.397" UserId="4957" Text="I'm interested in learning about account abstraction in Substrate using Ink!. As far as I understand, smart contracts in Substrate cannot store keys or sign transactions.&#xD;&#xA;&#xD;&#xA;However, I came across this documentation on the Polkadot Wiki: https://wiki.polkadot.network/docs/learn-account-abstraction, which states: &quot;Account abstraction can be implemented in parachains also with traditional smart-contracts for example using the ink! smart contract language.&quot;&#xD;&#xA;&#xD;&#xA;Despite this, I haven't found any examples of such an implementation in Ink!. Does anyone have a solution or a conceptual architecture that would allow achieving similar functionality, or perhaps can point me towards resources where I could learn how to implement this myself?&#xD;&#xA;&#xD;&#xA;Thank you!" ContentLicense="CC BY-SA 4.0" />
  <row Id="41797" PostHistoryTypeId="1" PostId="10528" RevisionGUID="78bd9f81-7011-4ac7-a30c-f3fd3800d460" CreationDate="2023-11-23T09:45:29.397" UserId="4957" Text="Substrate account abstraction" ContentLicense="CC BY-SA 4.0" />
  <row Id="41798" PostHistoryTypeId="3" PostId="10528" RevisionGUID="78bd9f81-7011-4ac7-a30c-f3fd3800d460" CreationDate="2023-11-23T09:45:29.397" UserId="4957" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41799" PostHistoryTypeId="2" PostId="10529" RevisionGUID="163126f6-e862-4be5-a7d5-6cd9cc7f849e" CreationDate="2023-11-23T18:05:05.927" UserId="3247" Text="Im wondering if there is any way to extract information about method and parameter of Extrinsic(Unchecked/CheckedExtrinsic) using  TypeInfo and Scale codec. &#xD;&#xA;&#xD;&#xA;In `polkadotJs` there is `toString` method on tx that can be used to represent extrinsic as a JSON and fetch info about method/params. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&quot;signature&quot;:{&quot;signer&quot;:&quot;0x0000000000000000000000000000000000000000&quot;,&quot;signature&quot;:&quot;0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&quot;,&quot;era&quot;:{&quot;immortalEra&quot;:&quot;0x00&quot;},&quot;nonce&quot;:0,&quot;tip&quot;:0},&quot;method&quot;:{&quot;callIndex&quot;:&quot;0x0307&quot;,&quot;args&quot;:{&quot;dest&quot;:&quot;0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac&quot;,&quot;value&quot;:100000}}}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Essentially i would like to fetch same info at the rust side (in runtime).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;One way to do it is would be to implement new trait for `RuntimeCall` that would return&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub trait GetMethodName{&#xD;&#xA;fn (&amp;self) -&gt; String;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And implementing it in Runtime, so something like &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;impl MethodName for RuntimeCall {&#xD;&#xA;	fn into(self) -&gt; CallType {&#xD;&#xA;		match self {&#xD;&#xA;			RuntimeCall::FooPallet(pallet_foo::Call::foo {}) =&gt; &quot;foo&quot;.to_string(),&#xD;&#xA;            ...&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But im pretty sure there should be a way to utilize Scale codec and TypeInfo :thinking:" ContentLicense="CC BY-SA 4.0" />
  <row Id="41801" PostHistoryTypeId="1" PostId="10529" RevisionGUID="163126f6-e862-4be5-a7d5-6cd9cc7f849e" CreationDate="2023-11-23T18:05:05.927" UserId="3247" Text="Is there any way to extract &quot;method&quot; and &quot;params&quot; of unchecked extrinsic using ScaleCode/TypeInfo traits?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41802" PostHistoryTypeId="3" PostId="10529" RevisionGUID="163126f6-e862-4be5-a7d5-6cd9cc7f849e" CreationDate="2023-11-23T18:05:05.927" UserId="3247" Text="|extrinsic|wasm|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41803" PostHistoryTypeId="2" PostId="10530" RevisionGUID="d6b9fe06-ecd1-46bf-8ecc-14cbbafb150d" CreationDate="2023-11-23T18:44:04.117" UserId="3331" Text="I'm having issues when using the `ReportTransactStatus` in my XCM message as it gives me a `UnexpectedResponse` in my origin Parachain.&#xD;&#xA;&#xD;&#xA;How can I register the matching query in the origin, so when the destiny responds I get a more descriptive message?&#xD;&#xA;&#xD;&#xA;This is my XCM message code:&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;			match send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;				(Parent, Junction::Parachain(mult_para_id.into())).into(),&#xD;&#xA;				Xcm(vec![&#xD;&#xA;					&#xD;&#xA;					Transact {&#xD;&#xA;						origin_kind: OriginKind::Native,&#xD;&#xA;						require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;						call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::xcm_clone_file {&#xD;&#xA;							signer,&#xD;&#xA;							energy_bank_file: new_file&#xD;&#xA;						})&#xD;&#xA;						.encode()&#xD;&#xA;						.into(),&#xD;&#xA;					},&#xD;&#xA;					ReportTransactStatus(QueryResponseInfo {&#xD;&#xA;						destination: MultiLocation {parents: 1, interior: Parachain(2000).into()},&#xD;&#xA;						query_id,&#xD;&#xA;						max_weight: Weight::from_all(0),&#xD;&#xA;					}),&#xD;&#xA;				]),&#xD;&#xA;			) {&#xD;&#xA;				Ok((hash, cost)) =&gt; Self::deposit_event(Event::Success(mult_para_id)),&#xD;&#xA;				Err(e) =&gt; Self::deposit_event(Event::Error(e, mult_para_id)),&#xD;&#xA;			}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `UnexpectedResponse` error:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/egVBT.png&#xD;&#xA;&#xD;&#xA;Deeply appreciate any help or documentation/examples to look further. Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="41805" PostHistoryTypeId="1" PostId="10530" RevisionGUID="d6b9fe06-ecd1-46bf-8ecc-14cbbafb150d" CreationDate="2023-11-23T18:44:04.117" UserId="3331" Text="UnexpectedReponse in XCM when using ReportTransactStatus" ContentLicense="CC BY-SA 4.0" />
  <row Id="41806" PostHistoryTypeId="3" PostId="10530" RevisionGUID="d6b9fe06-ecd1-46bf-8ecc-14cbbafb150d" CreationDate="2023-11-23T18:44:04.117" UserId="3331" Text="|xcm|xcmp|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41807" PostHistoryTypeId="5" PostId="10530" RevisionGUID="dac37a9c-7dd4-46e0-b92b-b533c40eca36" CreationDate="2023-11-23T19:16:21.103" UserId="3331" Comment="added 400 characters in body" Text="I'm having issues when using the `ReportTransactStatus` in my XCM message as it gives me a `UnexpectedResponse` in my origin Parachain.&#xD;&#xA;&#xD;&#xA;How can I register the matching query in the origin, so when the destiny responds I get a more descriptive message?&#xD;&#xA;&#xD;&#xA;This is my XCM message code:&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;			match send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;				(Parent, Junction::Parachain(mult_para_id.into())).into(),&#xD;&#xA;				Xcm(vec![&#xD;&#xA;					&#xD;&#xA;					Transact {&#xD;&#xA;						origin_kind: OriginKind::Native,&#xD;&#xA;						require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;						call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::xcm_clone_file {&#xD;&#xA;							signer,&#xD;&#xA;							energy_bank_file: new_file&#xD;&#xA;						})&#xD;&#xA;						.encode()&#xD;&#xA;						.into(),&#xD;&#xA;					},&#xD;&#xA;					ReportTransactStatus(QueryResponseInfo {&#xD;&#xA;						destination: MultiLocation {parents: 1, interior: Parachain(2000).into()},&#xD;&#xA;						query_id,&#xD;&#xA;						max_weight: Weight::from_all(0),&#xD;&#xA;					}),&#xD;&#xA;				]),&#xD;&#xA;			) {&#xD;&#xA;				Ok((hash, cost)) =&gt; Self::deposit_event(Event::Success(mult_para_id)),&#xD;&#xA;				Err(e) =&gt; Self::deposit_event(Event::Error(e, mult_para_id)),&#xD;&#xA;			}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've also tried using `SetErrorHandler` w/ `ExpectTransactStatus` as well, but I got the same results.&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;...&#xD;&#xA;SetErrorHandler(Xcm(vec![ReportTransactStatus(QueryResponseInfo {&#xD;&#xA;			destination: MultiLocation {parents: 1, interior: Parachain(2000).into()},&#xD;&#xA;			query_id,&#xD;&#xA;			max_weight: Weight::from_all(0),&#xD;&#xA;})])),&#xD;&#xA;// Transact here,&#xD;&#xA;ExpectTransactStatus(MaybeErrorCode::Success),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `UnexpectedResponse` error:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/egVBT.png&#xD;&#xA;&#xD;&#xA;Deeply appreciate any help or documentation/examples to look further. Thank you" ContentLicense="CC BY-SA 4.0" />
  <row Id="41808" PostHistoryTypeId="2" PostId="10531" RevisionGUID="7a1875ac-27df-40fd-80ec-a21b9e23a119" CreationDate="2023-11-23T23:41:00.403" UserId="474" Text="I'm not sure of the context in which you want this information, but if you're just keen to connect to a node/chain, download blocks and decode extrinsics, then have a look at [Subxt](https://github.com/paritytech/subxt), which is a Rust library for interacting with nodes/chains.&#xD;&#xA;&#xD;&#xA;This example inparticular downloads blocks and prints a bunch of information about them:&#xD;&#xA;&#xD;&#xA;https://docs.rs/subxt/latest/subxt/book/usage/blocks/index.html#example&#xD;&#xA;&#xD;&#xA;If you just want to understand which calls (and more) are available on a node, then the Subxt CLI tool has a nice `explore` command which can be pointed at a node and give information about it (`cargo install subxt-cli`). We have also been working on a UI to explore this information here: https://paritytech.github.io/subxt-explorer/&#xD;&#xA;&#xD;&#xA;Internally, this all relies on obtaining the metadata from a node (the Subxt CLI command has a `metadata` option to download this for you), and then decoding it (the SCALE encoded metadata can be decoded via `parity-scale-codec` to [this](https://github.com/paritytech/frame-metadata/blob/a07b2451b82809501fd797691046c1164f7e8840/frame-metadata/src/lib.rs#L85)). &#xD;&#xA;&#xD;&#xA;The metadata contains `TypeInfo` for all relevant types, as well as information on things like which calls are available in each pallet. Calls are basically represented as a `Variant` type, where the variant names are the call names and the variant fields are the arguments to the call (see [the scale-info docs](https://docs.rs/scale-info/latest/scale_info/enum.TypeDef.html) for more on what the type info contains)." ContentLicense="CC BY-SA 4.0" />
  <row Id="41810" PostHistoryTypeId="2" PostId="10532" RevisionGUID="639d01d2-717d-491d-8f1a-27be6bfc8642" CreationDate="2023-11-24T01:44:46.693" UserId="1959" Text="Do you have your own response handler? Check this: https://github.com/paritytech/polkadot-sdk/blob/v1.4.0/polkadot/xcm/pallet-xcm/src/lib.rs#L2459, it was the default implementation.&#xD;&#xA;&#xD;&#xA;So first, you should insert query_id into polkadot-xcm::Queries storage.&#xD;&#xA;&#xD;&#xA;Then, implement your response handler and config it &#xD;&#xA;&#xD;&#xA;in `xcm_executor::Config` =&gt; `type ResponseHandler = &lt;Yours&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="41812" PostHistoryTypeId="50" PostId="10313" RevisionGUID="47f87ab0-bc90-43c1-b45f-d4bf5ca684f6" CreationDate="2023-11-24T04:09:01.127" UserId="-1" />
  <row Id="41813" PostHistoryTypeId="50" PostId="7354" RevisionGUID="e15d5d25-3bad-4d4c-878e-f54ce023a350" CreationDate="2023-11-24T05:03:55.553" UserId="-1" />
  <row Id="41814" PostHistoryTypeId="2" PostId="10533" RevisionGUID="4c1e37cb-1979-4708-9cbe-0b47a4d2256c" CreationDate="2023-11-24T06:01:50.553" UserId="3247" Text="i got an answer on github so copying it here for others:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Types annotated with #[derive(TypeInfo)] end up with a MyType::type_info() method (see https://docs.rs/scale-info/latest/scale_info/trait.TypeInfo.html). Look through the docs there (specifically at https://docs.rs/scale-info/latest/scale_info/enum.TypeDef.html) and you'll see how to obtain various information about the type.&#xD;&#xA;&#xD;&#xA;You can't get any information about values though; the macro doesn't know anything about the values of a particular instance. All you get is the type information which is tied to how some instance of that type would be SCALE encoded via parity-scale-codec.&#xD;&#xA;&#xD;&#xA;If you have some SCALE encoded bytes already, and you have a scale_info::PortableRegistry describing the shape of those bytes (this can be constructed from some TypeInfos), then libraries like https://github.com/paritytech/scale-decode can be used to decode those bytes into some type (anything implementing DecodeAsType which has a compatible shape), and building on that, https://github.com/paritytech/scale-value offers a Value type which is one such target that any SCALE encoded bytes can decode into, and can then be iterated over or whatever to explore the value.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41816" PostHistoryTypeId="50" PostId="10268" RevisionGUID="3f042d5a-571e-4935-b26e-1c7cd6cb8989" CreationDate="2023-11-24T07:01:20.133" UserId="-1" />
  <row Id="41817" PostHistoryTypeId="50" PostId="9039" RevisionGUID="0290915d-9106-4845-800c-7f1f9e10462e" CreationDate="2023-11-24T10:05:50.853" UserId="-1" />
  <row Id="41818" PostHistoryTypeId="50" PostId="7352" RevisionGUID="bd2b83a1-edf1-4641-902c-1b180123da14" CreationDate="2023-11-24T11:05:30.657" UserId="-1" />
  <row Id="41819" PostHistoryTypeId="2" PostId="10534" RevisionGUID="aae96a0c-388b-4000-978d-54fe75829762" CreationDate="2023-11-24T12:24:10.247" UserId="3395" Text="I'm currently running load tests on my local parachain which includes Frontier integration for EVM compatibility. During these tests, I'm sending thousands of transactions via the RPC endpoint. Observations show that these transactions remain in the pending state in the txpool. However, as they begin to get processed, only about hundreds transactions are included in each block.&#xD;&#xA;&#xD;&#xA;Upon inspecting the blocks, I notice that only 50% of the block weight is being utilized.&#xD;&#xA;&#xD;&#xA;It's worth noting that I haven't done any benchmarking yet, which I thought might increase the likelihood of fully utilizing the block capacity. Actually I want to check that correct benchmarking would avoid the hypothetical bad situation caused because of load testing.&#xD;&#xA;&#xD;&#xA;Could I be missing something in my approach?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41821" PostHistoryTypeId="1" PostId="10534" RevisionGUID="aae96a0c-388b-4000-978d-54fe75829762" CreationDate="2023-11-24T12:24:10.247" UserId="3395" Text="Unable to fully utilize block capacity when performing load testing" ContentLicense="CC BY-SA 4.0" />
  <row Id="41822" PostHistoryTypeId="3" PostId="10534" RevisionGUID="aae96a0c-388b-4000-978d-54fe75829762" CreationDate="2023-11-24T12:24:10.247" UserId="3395" Text="|weight|block|gas|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41823" PostHistoryTypeId="2" PostId="10535" RevisionGUID="41a8f2b0-4daa-48a5-9000-1cde4a53240a" CreationDate="2023-11-24T14:06:33.870" UserId="3711" Text="I've seen breaking changes mentioned in [this issue](https://github.com/paritytech/ink/issues/1701) for upgrading `set_code_hash`.&#xD;&#xA;&#xD;&#xA;This got me thinking, what happens to existing contracts when a breaking change to ink is introduced?&#xD;&#xA;&#xD;&#xA;For example, we're currently on ink v4.3.0. Let's say a breaking change is introduced in ink v5. How would my live contract fair when RPC nodes upgrade their `pallet_contracts` pallet to ink v5? Surely this would be a breaking change for my live contract on ink v4? How is this handled?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41825" PostHistoryTypeId="1" PostId="10535" RevisionGUID="41a8f2b0-4daa-48a5-9000-1cde4a53240a" CreationDate="2023-11-24T14:06:33.870" UserId="3711" Text="What happens to smart contracts when breaking changes are introduced to ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41826" PostHistoryTypeId="3" PostId="10535" RevisionGUID="41a8f2b0-4daa-48a5-9000-1cde4a53240a" CreationDate="2023-11-24T14:06:33.870" UserId="3711" Text="|ink|smart-contract|substrate-node|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41827" PostHistoryTypeId="50" PostId="10261" RevisionGUID="3b93fc35-8ffd-4087-a0e5-29c3a12f5728" CreationDate="2023-11-24T14:07:56.023" UserId="-1" />
  <row Id="41828" PostHistoryTypeId="2" PostId="10536" RevisionGUID="b084a31a-3195-4538-9b5b-fc081b404564" CreationDate="2023-11-24T19:14:14.200" UserId="4806" Text="Would you please help me to understand why failed my bond tX&#xD;&#xA;https://westend.subscan.io/extrinsic/0x70e6193b601e5e0f96cb201f5d0ead98ee752fa1a024b6b2462d7f80a8415032&#xD;&#xA;&#xD;&#xA;My extrinsic:&#xD;&#xA;&#xD;&#xA;    signedExtrinsic {&#xD;&#xA;      isSigned: true,&#xD;&#xA;      method: {&#xD;&#xA;        args: { value: '2,900,000,000,000', payee: [Object] },&#xD;&#xA;        method: 'bond',&#xD;&#xA;        section: 'staking'&#xD;&#xA;      },&#xD;&#xA;      era: { MortalEra: { period: '64', phase: '36' } },&#xD;&#xA;      nonce: '83',&#xD;&#xA;      signature: '0x0e9e9b35e7f12f6b0bfdc8f8ff72929fbf1ae141e1f03c2d5c84f85c1883b743747ecb793a143587ab7f585fc958d8cd9aa4b1ce0c315714a8ffce565bd5bf86',&#xD;&#xA;      signer: { Id: '5D4xskDvK3nCnkGthhuaizkTWVPx3kG7q6nea5XPNMhf2Jhf' },&#xD;&#xA;      tip: '0'&#xD;&#xA;    }&#xD;&#xA;    signedExtrinsic toHex 0x490284002c6eca5cdaa3e87d7f8e06d10015bf0508b52d301c8991af113d5cf49a53553f010e9e9b35e7f12f6b0bfdc8f8ff72929fbf1ae141e1f03c2d5c84f85c1883b743747ecb793a143587ab7f585fc958d8cd9aa4b1ce0c315714a8ffce565bd5bf8645024d010006000b00487835a302034e8ee510bba056e20a4ab84439694ad6ad4f38d4485de8faf62f2e465b49df06" ContentLicense="CC BY-SA 4.0" />
  <row Id="41830" PostHistoryTypeId="1" PostId="10536" RevisionGUID="b084a31a-3195-4538-9b5b-fc081b404564" CreationDate="2023-11-24T19:14:14.200" UserId="4806" Text="Westend Bond TX failed with unclear reason" ContentLicense="CC BY-SA 4.0" />
  <row Id="41831" PostHistoryTypeId="3" PostId="10536" RevisionGUID="b084a31a-3195-4538-9b5b-fc081b404564" CreationDate="2023-11-24T19:14:14.200" UserId="4806" Text="|polkadot|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41832" PostHistoryTypeId="50" PostId="7383" RevisionGUID="37cf0280-fa54-4eb1-b288-fc6f285a879a" CreationDate="2023-11-24T20:03:45.567" UserId="-1" />
  <row Id="41833" PostHistoryTypeId="50" PostId="5572" RevisionGUID="ab02420c-ad7e-41d7-8bb5-2b81b055477d" CreationDate="2023-11-24T21:08:36.120" UserId="-1" />
  <row Id="41837" PostHistoryTypeId="2" PostId="10537" RevisionGUID="6c6f823f-a458-4ebb-821f-d3cf08b04692" CreationDate="2023-11-25T10:24:31.667" UserId="29" Text="When I run this code the `println`'s do not output in the terminal. &#xD;&#xA;```rust&#xD;&#xA;#[tokio::test]&#xD;&#xA;async fn can_fetch_child_keys() {&#xD;&#xA;	if std::option_env!(&quot;TEST_WS&quot;).is_none() {&#xD;&#xA;		return&#xD;&#xA;	}&#xD;&#xA;	init_logger();&#xD;&#xA;	let child_keys = Builder::&lt;Block&gt;::new()&#xD;&#xA;		.mode(Mode::Online(OnlineConfig {&#xD;&#xA;			transport: std::option_env!(&quot;TEST_WS&quot;).unwrap().to_owned().into(),&#xD;&#xA;			pallets: vec![&quot;Contracts&quot;.to_owned()],&#xD;&#xA;			child_trie: true,&#xD;&#xA;			..Default::default()&#xD;&#xA;		}))&#xD;&#xA;		.build()&#xD;&#xA;		.await&#xD;&#xA;		.unwrap()&#xD;&#xA;		.execute_with(|| {&#xD;&#xA;			let child_keys = sp_io::storage::next_key(&amp;[]).expect(&quot;some key must exist in the snapshot&quot;);&#xD;&#xA;			assert!(sp_io::storage::get(&amp;child_keys).is_some());&#xD;&#xA;			child_keys&#xD;&#xA;		});&#xD;&#xA;	assert!(child_keys.len() &gt; 0);&#xD;&#xA;	&#xD;&#xA;	println!(&quot;child_keys: {:?}&quot;, child_keys);&#xD;&#xA;	println!(&quot;‍ child_keys.len(): {:?}&quot;, child_keys.len());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I have tried using ` -- --nocapture`. &#xD;&#xA;&#xD;&#xA;Any suggestions on how to output in the terminal for debugging purposes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41839" PostHistoryTypeId="1" PostId="10537" RevisionGUID="6c6f823f-a458-4ebb-821f-d3cf08b04692" CreationDate="2023-11-25T10:24:31.667" UserId="29" Text="How to print / output from within async tokio test" ContentLicense="CC BY-SA 4.0" />
  <row Id="41840" PostHistoryTypeId="3" PostId="10537" RevisionGUID="6c6f823f-a458-4ebb-821f-d3cf08b04692" CreationDate="2023-11-25T10:24:31.667" UserId="29" Text="|rust|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41841" PostHistoryTypeId="5" PostId="10537" RevisionGUID="5ff265fa-c883-4a2e-a7fa-4667ba0b62f0" CreationDate="2023-11-25T10:41:27.747" UserId="29" Comment="added 25 characters in body" Text="I am writing a new test and when I run this code, the `println`'s do not output in the terminal. &#xD;&#xA;```rust&#xD;&#xA;#[tokio::test]&#xD;&#xA;async fn can_fetch_child_keys() {&#xD;&#xA;	if std::option_env!(&quot;TEST_WS&quot;).is_none() {&#xD;&#xA;		return&#xD;&#xA;	}&#xD;&#xA;	init_logger();&#xD;&#xA;	let child_keys = Builder::&lt;Block&gt;::new()&#xD;&#xA;		.mode(Mode::Online(OnlineConfig {&#xD;&#xA;			transport: std::option_env!(&quot;TEST_WS&quot;).unwrap().to_owned().into(),&#xD;&#xA;			pallets: vec![&quot;Contracts&quot;.to_owned()],&#xD;&#xA;			child_trie: true,&#xD;&#xA;			..Default::default()&#xD;&#xA;		}))&#xD;&#xA;		.build()&#xD;&#xA;		.await&#xD;&#xA;		.unwrap()&#xD;&#xA;		.execute_with(|| {&#xD;&#xA;			let child_keys = sp_io::storage::next_key(&amp;[]).expect(&quot;some key must exist in the snapshot&quot;);&#xD;&#xA;			assert!(sp_io::storage::get(&amp;child_keys).is_some());&#xD;&#xA;			child_keys&#xD;&#xA;		});&#xD;&#xA;	assert!(child_keys.len() &gt; 0);&#xD;&#xA;	&#xD;&#xA;	println!(&quot;child_keys: {:?}&quot;, child_keys);&#xD;&#xA;	println!(&quot;‍ child_keys.len(): {:?}&quot;, child_keys.len());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I have tried using `RUST_LOG=debug cargo test -- --nocapture`. &#xD;&#xA;&#xD;&#xA;Any suggestions on how to output in the terminal for debugging purposes?&#xD;&#xA;&#xD;&#xA;This is in specific to the tests found here:&#xD;&#xA;- https://github.com/paritytech/polkadot-sdk/blob/73ff1c3647024d3a5e94727e7fb74714c3a98b47/substrate/utils/frame/remote-externalities/src/lib.rs#L1165" ContentLicense="CC BY-SA 4.0" />
  <row Id="41842" PostHistoryTypeId="2" PostId="10538" RevisionGUID="3e2b6ee7-d762-4922-935a-8f9ef8471263" CreationDate="2023-11-25T11:37:11.080" UserId="251" Text="That test requires `#[cfg(all(test, feature = &quot;remote-test&quot;))]`.&#xD;&#xA;&#xD;&#xA;Try: `cargo test --features remtoe-test -- --nocapture`" ContentLicense="CC BY-SA 4.0" />
  <row Id="41844" PostHistoryTypeId="50" PostId="6623" RevisionGUID="483a4500-556a-4f33-adb6-96ef905f4013" CreationDate="2023-11-25T13:00:55.113" UserId="-1" />
  <row Id="41845" PostHistoryTypeId="5" PostId="10537" RevisionGUID="f5372e1b-c834-4184-b3c9-18d065878246" CreationDate="2023-11-25T13:21:56.357" UserId="29" Comment="added 83 characters in body" Text="I am writing a new test and when I run this code, the `println`'s do not output in the terminal. &#xD;&#xA;```rust&#xD;&#xA;#[tokio::test]&#xD;&#xA;async fn can_fetch_child_keys() {&#xD;&#xA;	if std::option_env!(&quot;TEST_WS&quot;).is_none() {&#xD;&#xA;		return&#xD;&#xA;	}&#xD;&#xA;	init_logger();&#xD;&#xA;	let child_keys = Builder::&lt;Block&gt;::new()&#xD;&#xA;		.mode(Mode::Online(OnlineConfig {&#xD;&#xA;			transport: std::option_env!(&quot;TEST_WS&quot;).unwrap().to_owned().into(),&#xD;&#xA;			pallets: vec![&quot;Contracts&quot;.to_owned()],&#xD;&#xA;			child_trie: true,&#xD;&#xA;			..Default::default()&#xD;&#xA;		}))&#xD;&#xA;		.build()&#xD;&#xA;		.await&#xD;&#xA;		.unwrap()&#xD;&#xA;		.execute_with(|| {&#xD;&#xA;			let child_keys = sp_io::storage::next_key(&amp;[]).expect(&quot;some key must exist in the snapshot&quot;);&#xD;&#xA;			assert!(sp_io::storage::get(&amp;child_keys).is_some());&#xD;&#xA;			child_keys&#xD;&#xA;		});&#xD;&#xA;	assert!(child_keys.len() &gt; 0);&#xD;&#xA;	&#xD;&#xA;	println!(&quot;child_keys: {:?}&quot;, child_keys);&#xD;&#xA;	println!(&quot;‍ child_keys.len(): {:?}&quot;, child_keys.len());&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I have tried using: &#xD;&#xA;```&#xD;&#xA;RUST_LOG=debug cargo test --features=remote-test -p frame-remote-externalities can_fetch_child_keys -- --nocapture&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any suggestions on how to output in the terminal for debugging purposes?&#xD;&#xA;&#xD;&#xA;This is in specific to the tests found here:&#xD;&#xA;- https://github.com/paritytech/polkadot-sdk/blob/73ff1c3647024d3a5e94727e7fb74714c3a98b47/substrate/utils/frame/remote-externalities/src/lib.rs#L1165" ContentLicense="CC BY-SA 4.0" />
  <row Id="41846" PostHistoryTypeId="5" PostId="10538" RevisionGUID="fd0b1caf-2f79-4abe-84f3-c39d83e15f01" CreationDate="2023-11-25T13:25:00.417" UserId="29" Comment="edited body" Text="That test requires `#[cfg(all(test, feature = &quot;remote-test&quot;))]`.&#xD;&#xA;&#xD;&#xA;Try: `cargo test --features remote-test -- --nocapture`" ContentLicense="CC BY-SA 4.0" />
  <row Id="41847" PostHistoryTypeId="50" PostId="8984" RevisionGUID="50163942-4953-45af-be35-f10bd1dc7ace" CreationDate="2023-11-25T14:06:30.753" UserId="-1" />
  <row Id="41848" PostHistoryTypeId="50" PostId="8523" RevisionGUID="9223d4c9-e48d-48f5-93dc-55b291e0d2e6" CreationDate="2023-11-25T16:07:30.837" UserId="-1" />
  <row Id="41849" PostHistoryTypeId="50" PostId="8843" RevisionGUID="de4e8e81-5170-4724-a79b-395481b86360" CreationDate="2023-11-25T17:05:45.690" UserId="-1" />
  <row Id="41850" PostHistoryTypeId="50" PostId="8487" RevisionGUID="1df85761-58eb-4a8a-8d10-2c2f4c85c5df" CreationDate="2023-11-25T18:02:00.263" UserId="-1" />
  <row Id="41851" PostHistoryTypeId="50" PostId="8669" RevisionGUID="0a94a06e-6147-440f-b4cb-5df46c687796" CreationDate="2023-11-25T19:02:35.313" UserId="-1" />
  <row Id="41852" PostHistoryTypeId="50" PostId="8175" RevisionGUID="4234851a-bdac-4bc1-9534-83f704a08e30" CreationDate="2023-11-25T20:00:25.107" UserId="-1" />
  <row Id="41853" PostHistoryTypeId="50" PostId="8616" RevisionGUID="fc6939f6-4012-4342-8a9e-ef0298755c32" CreationDate="2023-11-25T21:07:40.950" UserId="-1" />
  <row Id="41854" PostHistoryTypeId="50" PostId="8735" RevisionGUID="f1344830-443d-4606-a67a-50a711a600b9" CreationDate="2023-11-25T22:03:05.353" UserId="-1" />
  <row Id="41855" PostHistoryTypeId="50" PostId="9054" RevisionGUID="bf934075-1ad0-4c31-9812-6ed4c0ca7211" CreationDate="2023-11-25T23:04:20.637" UserId="-1" />
  <row Id="41856" PostHistoryTypeId="50" PostId="7408" RevisionGUID="08ef528e-12f8-4dc4-ad50-8a058bc01684" CreationDate="2023-11-26T06:03:50.400" UserId="-1" />
  <row Id="41857" PostHistoryTypeId="50" PostId="9035" RevisionGUID="0bb5e948-e83e-4fe3-8ec6-0bb8cdcf0a60" CreationDate="2023-11-26T07:01:15.150" UserId="-1" />
  <row Id="41858" PostHistoryTypeId="50" PostId="8868" RevisionGUID="eeed5f55-1c68-45ff-9b7e-b7089916c9ac" CreationDate="2023-11-26T08:01:40.147" UserId="-1" />
  <row Id="41859" PostHistoryTypeId="50" PostId="5951" RevisionGUID="d66fd7d0-2695-47b1-bf0f-2eded0235021" CreationDate="2023-11-26T11:06:55.850" UserId="-1" />
  <row Id="41860" PostHistoryTypeId="50" PostId="7020" RevisionGUID="f08b5079-e2d9-4280-a184-06f9e266b155" CreationDate="2023-11-26T12:03:45.410" UserId="-1" />
  <row Id="41861" PostHistoryTypeId="2" PostId="10539" RevisionGUID="94e450e1-686d-46a0-933d-294f88016a16" CreationDate="2023-11-26T13:33:24.800" UserId="4158" Text="It turned out to be a bug in substrate. It is already fixed in [this][1] PR.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/pull/1719" ContentLicense="CC BY-SA 4.0" />
  <row Id="41863" PostHistoryTypeId="6" PostId="10534" RevisionGUID="4d506981-8fa0-4776-b603-787444df46e2" CreationDate="2023-11-26T14:30:53.543" UserId="3395" Comment="edited tags" Text="|weight|block|gas|tx-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41864" PostHistoryTypeId="2" PostId="10540" RevisionGUID="55cd2fd3-19ee-4dc5-b031-d1a29b48057f" CreationDate="2023-11-27T02:44:06.893" UserId="251" Text="The node always uses on-chain wasm for execution. How can I add new logs to debug the production chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41866" PostHistoryTypeId="1" PostId="10540" RevisionGUID="55cd2fd3-19ee-4dc5-b031-d1a29b48057f" CreationDate="2023-11-27T02:44:06.893" UserId="251" Text="How can I add logging to the runtime for debugging since `--execution native` has been removed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41867" PostHistoryTypeId="3" PostId="10540" RevisionGUID="55cd2fd3-19ee-4dc5-b031-d1a29b48057f" CreationDate="2023-11-27T02:44:06.893" UserId="251" Text="|log|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41868" PostHistoryTypeId="33" PostId="10534" RevisionGUID="35ef7854-0039-4ef2-8799-ad03012e570e" CreationDate="2023-11-27T08:21:32.157" UserId="3395" Comment="36" />
  <row Id="41869" PostHistoryTypeId="6" PostId="10540" RevisionGUID="9344269e-db67-4342-a5cf-17427056da4c" CreationDate="2023-11-27T08:35:43.903" UserId="251" Comment="edited tags" Text="|log|debug|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41870" PostHistoryTypeId="4" PostId="10540" RevisionGUID="15a8660a-02e3-4d9b-bed9-68ae5c23c3da" CreationDate="2023-11-27T09:59:44.203" UserId="251" Comment="edited title" Text="How can I add logs to the runtime for debugging since `--execution native` has been removed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41871" PostHistoryTypeId="50" PostId="5652" RevisionGUID="2b36f093-c142-4585-b841-852e97b074e4" CreationDate="2023-11-27T11:02:30.250" UserId="-1" />
  <row Id="41872" PostHistoryTypeId="50" PostId="5657" RevisionGUID="be7be7ac-8717-45dc-bbbd-33109e945497" CreationDate="2023-11-27T12:08:00.953" UserId="-1" />
  <row Id="41873" PostHistoryTypeId="6" PostId="10534" RevisionGUID="32ecbff9-3706-4913-ac56-b0d4023bafa9" CreationDate="2023-11-27T12:18:24.333" UserId="3395" Comment="edited tags" Text="|weight|frontier|block|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41874" PostHistoryTypeId="2" PostId="10541" RevisionGUID="bda01a6e-fc25-49c7-bf46-bad72e8755e3" CreationDate="2023-11-27T15:36:09.597" UserId="555" Text="Just for curiosity!&#xD;&#xA;&#xD;&#xA;In what conditions we can use Inherent transactions?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="41876" PostHistoryTypeId="1" PostId="10541" RevisionGUID="bda01a6e-fc25-49c7-bf46-bad72e8755e3" CreationDate="2023-11-27T15:36:09.597" UserId="555" Text="UseCase of Inherent transactions" ContentLicense="CC BY-SA 4.0" />
  <row Id="41877" PostHistoryTypeId="3" PostId="10541" RevisionGUID="bda01a6e-fc25-49c7-bf46-bad72e8755e3" CreationDate="2023-11-27T15:36:09.597" UserId="555" Text="|substrate-node-template|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41878" PostHistoryTypeId="2" PostId="10542" RevisionGUID="dae9522c-fe52-494d-a816-5d58fe52540d" CreationDate="2023-11-27T16:05:33.673" UserId="29" Text="&gt; With this type of transaction, block authoring nodes can add&#xD;&#xA;&gt; information directly to a block. Inherent transactions can only be&#xD;&#xA;&gt; inserted into a block by the block authoring node that calls them.&#xD;&#xA;&gt; Typically, this type of transaction is not gossiped to other nodes or&#xD;&#xA;&gt; stored in the transaction queue. The data inserted using an inherent&#xD;&#xA;&gt; transaction is assumed to be valid without requiring specific&#xD;&#xA;&gt; validation.&#xD;&#xA;&gt; &#xD;&#xA;&gt; As an example, the pallet_timestamp::Call::now function enables a&#xD;&#xA;&gt; block authoring node to insert a current timestamp in each block the&#xD;&#xA;&gt; node produces.&#xD;&#xA;&#xD;&#xA;- https://docs.substrate.io/learn/transaction-types/#inherent-transactions&#xD;&#xA;&#xD;&#xA;Typically when you want to insert external information (transaction) relevant to your runtime (e.g. a timestamp) and the source of the transaction is the block authoring node itself.&#xD;&#xA;&#xD;&#xA;I like to think of them as system-level transactions that keep the chain running smoothly.&#xD;&#xA;&#xD;&#xA;If you see a purpose for such a transaction in your runtime then there is the use case.&#xD;&#xA;&#xD;&#xA;Related&#xD;&#xA;- https://substrate.stackexchange.com/a/5816/29" ContentLicense="CC BY-SA 4.0" />
  <row Id="41880" PostHistoryTypeId="4" PostId="10541" RevisionGUID="425e3bd6-899a-4415-8d20-4a0fd228084b" CreationDate="2023-11-27T16:06:15.397" UserId="29" Comment="edited title" Text="What is the use case for inherent transactions?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41881" PostHistoryTypeId="2" PostId="10543" RevisionGUID="b9602680-b301-4eb3-bf3a-5d077433a378" CreationDate="2023-11-27T17:06:52.443" UserId="555" Text="I want to fetch the data through an api in our chain. can we have any doc or resources which helps in doing this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41883" PostHistoryTypeId="1" PostId="10543" RevisionGUID="b9602680-b301-4eb3-bf3a-5d077433a378" CreationDate="2023-11-27T17:06:52.443" UserId="555" Text="How to fetch data through api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41884" PostHistoryTypeId="3" PostId="10543" RevisionGUID="b9602680-b301-4eb3-bf3a-5d077433a378" CreationDate="2023-11-27T17:06:52.443" UserId="555" Text="|offchain-worker|substrate-recipes|oracles|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41885" PostHistoryTypeId="5" PostId="10533" RevisionGUID="cb707154-1200-445e-a034-2aba00afdafc" CreationDate="2023-11-28T00:44:31.327" UserId="116" Comment="markup syntax" Text="*I got an answer on github so copying it here for the record*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Types annotated with `#[derive(TypeInfo)]` end up with a `MyType::type_info()` [method][1]. Look through the [docs][2] there and you'll see how to obtain various information about the type.&#xD;&#xA;&#xD;&#xA;You can't get any information about values though; the macro doesn't know anything about the values of a particular instance. All you get is the type information which is tied to how some instance of that type would be SCALE encoded via parity-scale-codec.&#xD;&#xA;&#xD;&#xA;If you have some SCALE encoded bytes already, and you have a `scale_info::PortableRegistry` describing the shape of those bytes (this can be constructed from some TypeInfos), then libraries like [scale-decode][scale-decode] can be used to decode those bytes into some type (anything implementing `DecodeAsType` which has a compatible shape), and building on that, [scale-value][scale-value] offers a Value type which is one such target that any SCALE encoded bytes can decode into, and can then be iterated over or whatever to explore the value.&#xD;&#xA;&#xD;&#xA;[1]: https://docs.rs/scale-info/latest/scale_info/trait.TypeInfo.html&#xD;&#xA;[2]: https://docs.rs/scale-info/latest/scale_info/enum.TypeDef.html&#xD;&#xA;[scale-decode]:https://github.com/paritytech/scale-decode&#xD;&#xA;[scale-value]: https://github.com/paritytech/scale-value" ContentLicense="CC BY-SA 4.0" />
  <row Id="41886" PostHistoryTypeId="5" PostId="10529" RevisionGUID="57406c6c-d32e-4584-ae3f-af678ca08546" CreationDate="2023-11-28T00:47:36.760" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I'm wondering if there is any way to extract information about method and parameter of Extrinsic(Unchecked/CheckedExtrinsic) using  TypeInfo and Scale codec. &#xD;&#xA;&#xD;&#xA;In `polkadotJs` there is `toString` method on tx that can be used to represent extrinsic as a JSON and fetch info about method/params. &#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&quot;signature&quot;:{&quot;signer&quot;:&quot;0x0000000000000000000000000000000000000000&quot;,&quot;signature&quot;:&quot;0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&quot;,&quot;era&quot;:{&quot;immortalEra&quot;:&quot;0x00&quot;},&quot;nonce&quot;:0,&quot;tip&quot;:0},&quot;method&quot;:{&quot;callIndex&quot;:&quot;0x0307&quot;,&quot;args&quot;:{&quot;dest&quot;:&quot;0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac&quot;,&quot;value&quot;:100000}}}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Essentially I would like to fetch same info at the rust side (in runtime).&#xD;&#xA;&#xD;&#xA;One way to do it is would be to implement new trait for `RuntimeCall` that would return&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub trait GetMethodName{&#xD;&#xA;fn (&amp;self) -&gt; String;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And implementing it in `Runtime`, so something like &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl MethodName for RuntimeCall {&#xD;&#xA;	fn into(self) -&gt; CallType {&#xD;&#xA;		match self {&#xD;&#xA;			RuntimeCall::FooPallet(pallet_foo::Call::foo {}) =&gt; &quot;foo&quot;.to_string(),&#xD;&#xA;            ...&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I'm pretty sure there should be a way to utilize Scale codec and `TypeInfo`" ContentLicense="CC BY-SA 4.0" />
  <row Id="41887" PostHistoryTypeId="5" PostId="10515" RevisionGUID="61c1a76b-d40d-44c9-a964-5f672ffa53ae" CreationDate="2023-11-28T00:52:25.803" UserId="116" Comment="code format in code blocks" Text="I have added a Scheduler into my pallet, I'm following referenda pallet as model.&#xD;&#xA;&#xD;&#xA;I have written some tests, and the scheduler functionality is working.&#xD;&#xA;&#xD;&#xA;However, I have noticed that in my unit tests the compiler is asking for a `v2` interface while in the pallet is asking for a `v3` interface.&#xD;&#xA;&#xD;&#xA;I can't see why is this happening, In my Pallet:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;use frame_support::{&#xD;&#xA;	traits::{&#xD;&#xA;		schedule::{&#xD;&#xA;			v3::{Anon as ScheduleAnon, Named as ScheduleNamed},&#xD;&#xA;		},&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;#[pallet::config]&#xD;&#xA;pub trait Config: frame_system::Config {&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;		type Scheduler: ScheduleAnon&lt;BlockNumberFor&lt;Self&gt;, CallOf&lt;Self&gt;, PalletsOriginOf&lt;Self&gt;&gt;&#xD;&#xA;		+ ScheduleNamed&lt;BlockNumberFor&lt;Self&gt;, CallOf&lt;Self&gt;, PalletsOriginOf&lt;Self&gt;&gt;;&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;}   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any idea what could be triggering this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41888" PostHistoryTypeId="5" PostId="1869" RevisionGUID="58aabefa-5422-432b-8a9a-5f098fdf2d0e" CreationDate="2023-11-28T00:53:57.573" UserId="116" Comment="code in code blocks" Text="In short, the `touch` method creates a new &quot;Asset Account&quot; for the &quot;User Account&quot;.&#xD;&#xA;&#xD;&#xA;I suspect that the `touch` name comes from the unix command called 'touch' which creates a new file if it does not exist already. (sort of, don't worry about it).&#xD;&#xA;&#xD;&#xA;In the v4.0.0-dev source for the asset pallet, you can see in the lib.rs that `Touch` calls `do_touch`, which we can find in functions.rs.&#xD;&#xA;&#xD;&#xA;If we look at that `do_touch` function, we can see that it checks if the &quot;User Account&quot; already has an entry for the &quot;Asset Account&quot;, and if it does not it inserts a new &quot;Asset Account&quot; for the &quot;User Account&quot;." ContentLicense="CC BY-SA 4.0" />
  <row Id="41889" PostHistoryTypeId="5" PostId="2274" RevisionGUID="f27f127c-acd4-4e48-a16e-52ca3f6cc0d0" CreationDate="2023-11-28T00:56:32.567" UserId="116" Comment="Fix auto numbering" Text="*Answering question 1,2,4,5,6.*&#xD;&#xA;1. Concerning barriers in substrate , one must know Rust (pretty advanced Rust) for easier start. But you can work with substrate using any other wasm compiled lang but that's bringing another layer of complexity because you need to implement the runtime logic and other low level types on your own language.&#xD;&#xA;&#xD;&#xA;2. Yes you can launch an independent project (completely independent as you start with your own validators)&#xD;&#xA;&#xD;&#xA;3. *no answer*&#xD;&#xA;&#xD;&#xA;4. Why do most people go to cosmos sdk well there are over 200 projects building in substrate, and other pre deployed projects. And I don't know the number on Cosmos side.&#xD;&#xA;&#xD;&#xA;5. Degree of flexibility, First you need to know substrate offers highest degree of flexibility. Every part is customizable (Consensus, runtime, transaction pool, networking) It just depends on your level of skills. But parts such as runtime and consensus are mostly customized. (Even the database layer and blocksize).&#xD;&#xA;&#xD;&#xA;6. Yes&#xD;&#xA;&#xD;&#xA;7. Did not understand the question, (which larger ecosystem?) If you mean bridges yes and with the help of XCMP and XCM you can tap in any other ecosystem." ContentLicense="CC BY-SA 4.0" />
  <row Id="41890" PostHistoryTypeId="5" PostId="2591" RevisionGUID="928896bf-0668-4010-acbc-eec701c202ee" CreationDate="2023-11-28T01:02:17.643" UserId="116" Comment="Code block" Text="```&#xD;&#xA;decl_storage! {&#xD;&#xA;    trait Store for Module&lt;T: Trait&gt; as KittyStorage {&#xD;&#xA;        Kitties get(kitty): map T::Hash =&gt; Kitty&lt;T::Hash, T::Balance&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;1. What is this `for` use?&#xD;&#xA;&#xD;&#xA;2. What is `Store` ? is this a trait?&#xD;&#xA;3. then `Module` is what?&#xD;&#xA;&#xD;&#xA;4. `decl_storage!` macro is for what purpose? create multiple storage object suites?&#xD;&#xA;&#xD;&#xA;5. what is `&lt;T: Trait&gt; as KittyStorage` ?&#xD;&#xA;you give name Module as `KittyStorage`?&#xD;&#xA;&#xD;&#xA;6. &#xD;&#xA;```&#xD;&#xA;Kitties get(kitty): map T::Hash =&gt; Kitty&lt;T::Hash, T::Balance&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`Kitties` object has `get` method, attribute is `kitty`, then map `iterate T::Hash` ,&#xD;&#xA;return `Kitty` object which has `T::Hash` and `T::Balance` trait.&#xD;&#xA;&#xD;&#xA;is it right? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41891" PostHistoryTypeId="5" PostId="2595" RevisionGUID="847e30c0-e1b1-4fbf-92ec-5bafb64bc010" CreationDate="2023-11-28T01:12:40.947" UserId="116" Comment="Spelling dont -&gt; don't" Text="Well , I really don't think there is a need for you to keep hustling FRAME V1 syntax. Because The declarative macros used there don't follow rust syntax. &#xD;&#xA;So I think you should focus on V2. And It will be hard for you to get further help in your journey if you keep using V1 as now V2 is used officially and it is easy to debug" ContentLicense="CC BY-SA 4.0" />
  <row Id="41892" PostHistoryTypeId="5" PostId="10532" RevisionGUID="d0542f5a-14ae-44f7-b273-13e20565dd07" CreationDate="2023-11-28T01:50:18.790" UserId="1959" Comment="added 218 characters in body" Text="Do you have your own response handler? Check this: https://github.com/paritytech/polkadot-sdk/blob/v1.4.0/polkadot/xcm/pallet-xcm/src/lib.rs#L2459, it was the default implementation.&#xD;&#xA;&#xD;&#xA;So first, you should insert query_id into polkadot-xcm::Queries storage. Maybe using [`pallet-xcm::new_notify_query`](https://github.com/paritytech/polkadot-sdk/blob/v1.4.0/polkadot/xcm/pallet-xcm/src/lib.rs#L2094) which calls `do_new_query` and insert the queryId into the Queries storage.&#xD;&#xA;&#xD;&#xA;Then, implement your response handler and config it &#xD;&#xA;&#xD;&#xA;in `xcm_executor::Config` =&gt; `type ResponseHandler = &lt;Yours&gt;`" ContentLicense="CC BY-SA 4.0" />
  <row Id="41893" PostHistoryTypeId="5" PostId="2671" RevisionGUID="07457124-05e1-41e5-96c6-a2f8ca0e424a" CreationDate="2023-11-28T01:53:04.720" UserId="116" Comment="Spelling dont -&gt; don't" Text="Well, I don't quite get you, But in substrate the framework is very flexible and Substrate enables you to build your own blockchain system. But it removes the bottleneck of writing your own consensus algo , networking, ddatabase, txn pool and it gives you FRAME runtime framework to write custom logic for your chain.&#xD;&#xA;&#xD;&#xA;So if you want deeper flexibility, you can change the underlying consensus and other low level architecture.  Just clone the parity/substrate repo and change whatever you want and even if you don't want to use the existing Frame framework you can change that too ( just depends on your skills level ). &#xD;&#xA;&#xD;&#xA;So the tutorials present right now shows you how you can create your own real blockchain with custom runtime on it. You want to work on critical infrastructure no worries just read the docs carefully. And also you can check discussion on substrate repo. " ContentLicense="CC BY-SA 4.0" />
  <row Id="41894" PostHistoryTypeId="5" PostId="2668" RevisionGUID="3f744d21-4aea-43e4-88e8-0e0c3d757d82" CreationDate="2023-11-28T01:54:53.557" UserId="116" Comment="Spellcheck and language" Text="I want to build a nearly real blockchain system based on Substrate framework for an academic study.&#xD;&#xA;&#xD;&#xA;I have scanned the tutorials and guides, but those materials are all application level content.&#xD;&#xA;Where can I find the materials for custom architecture? &#xD;&#xA;&#xD;&#xA;For example, I want runtime and consensus work parallell, do we have methods to adjust interaction of these modules? Besides, how to learn the critical interface/trait of module, such as storage, consensus and execution?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41895" PostHistoryTypeId="5" PostId="6771" RevisionGUID="4e4a9084-4705-46c6-a655-b23448fb4b58" CreationDate="2023-11-28T01:57:04.040" UserId="116" Comment="Spelling dont -&gt; don't" Text="Then length of an encoded `AccountId` seems to be shorter than a `Hash`.  &#xD;&#xA;The decoding therefore fails, since `&quot;Not enough data to fill buffer&quot;` for that hash.&#xD;&#xA;&#xD;&#xA;&gt;What is the reason I get this error and how do I solve it?&#xD;&#xA;&#xD;&#xA;I don't know what you are trying to do. Maybe use a builtin hash function like [`sp_core::keccak_256`](https://docs.rs/sp-core/latest/sp_core/fn.keccak_256.html)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41896" PostHistoryTypeId="5" PostId="8034" RevisionGUID="8a54a634-6c11-4a6c-9c7b-af20c923f253" CreationDate="2023-11-28T05:17:13.600" UserId="116" Comment="Spelling dont -&gt; don't" Text="If you want to iterate over something then it cannot change in the meantime.  &#xD;&#xA;This applies to storage maps as well. Iterating over large StorageMaps in calls is not a good idea in general since it uses up a lot of weight and proof size.  &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I don't know what you do but there is a chance that you can use witnesses, or look into alternative data structures. Otherwise secondary indices which provide you the information without iteration (but need to be maintained on every modification) are possible as well.&#xD;&#xA;&#xD;&#xA;If you still really want to iterate then you somehow have to &quot;lock&quot; that map from modifications while the iteration happens. Like a `Locked` storage item or so, that would reject any modifications to the map." ContentLicense="CC BY-SA 4.0" />
  <row Id="41897" PostHistoryTypeId="5" PostId="7930" RevisionGUID="d0ec0671-bbf8-476a-b544-743c810048bf" CreationDate="2023-11-28T05:18:04.667" UserId="116" Comment="Spelling dont -&gt; don't" Text="Great questions!&#xD;&#xA;&#xD;&#xA;&gt;Where can I find documentation on what exactly has to be done in terms of bounded types?&#xD;&#xA;&#xD;&#xA;The docs are quite sparse. Ideally the compiler should be able to lead the path. You &quot;only&quot; have to remove the `pallet::without_storage_info` from your pallet and resolve all compile errors.  &#xD;&#xA;&#xD;&#xA;&gt;What is the unit of proof_size in Weight v2?&#xD;&#xA;&#xD;&#xA;The unit is `Byte`. There are constants for them [here](https://github.com/paritytech/substrate/blob/8b5306e1a607a14e08e13fd521f747319ecb6846/primitives/weights/src/lib.rs#L49) but the conversion is 1:1 as you can see.  &#xD;&#xA;&#xD;&#xA;&gt;From what I understand all storage needs to be of bounded types in order to make sure that the proof_size is bounded as well. Is this correct?&#xD;&#xA;&#xD;&#xA;Yes. Otherwise when your pallet has unbounded storage types, then the proof size will have to be approximated through measuring. This is not as secure as having it computed, but can help as a make-shift solution to ease the transition.  &#xD;&#xA;This is mostly important for para-chains, as relay chains don't have a proof size limit.&#xD;&#xA;&#xD;&#xA;&gt;Is it sufficient to only have bounded types as keys/values in storage or do we also need to limit the size of Storage(Double)Maps?&#xD;&#xA;&#xD;&#xA;This is a bit tricky. The FRAME benchmarking assumes StorageMaps to have a maximum of 1M entries at most. This can be changed either through the [MaxValues](https://github.com/paritytech/substrate/blob/ea182669e111d819b2f4539749b86edee4944168/frame/glutton/src/lib.rs#L101) generic, or for all maps via `--worst-case-map-values` on the CLI. This is an *assumption* that holds in most cases, but it is admittedly not a great solution since the pallet developers have to enforce that limit on their own without help from the `StorageMap` API.&#xD;&#xA;&#xD;&#xA;&gt;If yes, how to determine those limits?&#xD;&#xA;&#xD;&#xA;The same way that you would determine bounds on `BoundedVec`s. Not much advice I can give there. Just pick a reasonable upper bound and keep in mind that the proof size grows by the `log16` of that plus a constant factor.&#xD;&#xA;&#xD;&#xA;&gt;Is there a maximum proof_size that we can use as a benchmark?&#xD;&#xA;&#xD;&#xA;Polkadot/Kusama/Westend/Rococo parachains have (and always had AFAIK) a 5MiB proof limit.  &#xD;&#xA;This is the limit on the compacted, encoded and compressed Proof whereas the benchmarking only calculates the encoded and compacted proof size without extrinsic length. There is an issue [here](https://github.com/paritytech/substrate/issues/13501) to tackle this. Otherwise a too high PoV estimate could hurt block utilization.&#xD;&#xA;&#xD;&#xA;&gt;Can you provide pointers to the Substrate repo of such an implementation?&#xD;&#xA;&#xD;&#xA;I think the difficult part is to bound all storage items and migrate them. Substrate did this [here](https://github.com/paritytech/substrate/issues/8629) for its parachain pallets. For the most part you really just have to remove the `without_storage_info` and fix the fallout." ContentLicense="CC BY-SA 4.0" />
  <row Id="41898" PostHistoryTypeId="5" PostId="6360" RevisionGUID="c463d04a-8415-4477-ba9c-874056665ba1" CreationDate="2023-11-28T05:18:52.353" UserId="116" Comment="Spelling dont -&gt; don't" Text="I don't think there are Rococo snapshots available. Snapshots are often used by validators to recover from a fault. This does not apply to Rococo so no one wants to provide them.  &#xD;&#xA;Your fastest option is probably to use `--sync fast-unsafe` to create your own snapshot." ContentLicense="CC BY-SA 4.0" />
  <row Id="41899" PostHistoryTypeId="5" PostId="9856" RevisionGUID="0ebad1b0-860b-4269-899b-79cca1ad6ab5" CreationDate="2023-11-28T05:19:28.487" UserId="116" Comment="Spelling dont -&gt; don't" Text="`on_initialize` must be infallible by definition.  &#xD;&#xA;Yes you can use Events to emit progress of failure from inside there. I don't think its hacky; the Scheduler does this when its unable to find a preimage. The MessageQueue pallet also does this while processing messages.  &#xD;&#xA;There is no other way to emit information here though." ContentLicense="CC BY-SA 4.0" />
  <row Id="41900" PostHistoryTypeId="5" PostId="10543" RevisionGUID="ddf42acf-b0fa-4e0d-80a5-709a6097644b" CreationDate="2023-11-28T07:48:48.923" UserId="555" Comment="added 115 characters in body" Text="I want to fetch the data through an api in our chain. More specifically, I have an api which gives me the latest news. How can i implement this in our substrate chain?&#xD;&#xA;can we have any doc or resources which helps in doing this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41901" PostHistoryTypeId="2" PostId="10544" RevisionGUID="53c84f53-e66e-4f10-bb23-d7438aa0cb87" CreationDate="2023-11-28T08:38:21.543" UserId="2762" Text="In the Substrate docs you have this example [Make offchain HTTP requests][1] that shows you an example on how to retrieve the price of Bitcoin from the cryptocompare API and how to submit data using an offchain worker API.&#xD;&#xA;With the [code example][2] in the polkadot-sdk repo.&#xD;&#xA;&#xD;&#xA;Before use offchain workers I strongly recommend to read this forum post: [Offchain Workers: Design Assumptions &amp; Vulnerabilities][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-http-requests/&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/examples/offchain-worker/src/lib.rs&#xD;&#xA;  [3]: https://forum.polkadot.network/t/offchain-workers-design-assumptions-vulnerabilities/2548" ContentLicense="CC BY-SA 4.0" />
  <row Id="41903" PostHistoryTypeId="2" PostId="10545" RevisionGUID="92de0d67-6552-46a6-ac04-43f263258c84" CreationDate="2023-11-28T08:46:59.280" UserId="29" Text="Make sure you have `TEST_WS` environment variable defined:&#xD;&#xA;```&#xD;&#xA;RUST_LOG=debug TEST_WS=ws://127.0.0.1:9944 cargo test --features=remote-test -p frame-remote-externalities -- --nocapture&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41905" PostHistoryTypeId="2" PostId="10546" RevisionGUID="813668ad-2256-40ce-81d3-43c169c93302" CreationDate="2023-11-28T09:11:04.663" UserId="2762" Text="Let's check the Subscan link, here you can confirm that the ExtrinsicFailed and display more information about it: &#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;We can see the dispatch_error that has a index 6 and an error 0x02000000.&#xD;&#xA;To understand this we have to take a look into the code of Substrate.&#xD;&#xA;&#xD;&#xA;The `index` number is the index of the pallet in the runtime from which the error originated. The `error` is  the index of that pallet's errors (Both of these indices start counting from 0).&#xD;&#xA;&#xD;&#xA;So let's check first which is the pallet with index 6 in the Westend runtime code([see link here][2]).&#xD;&#xA;```rs&#xD;&#xA;construct_runtime! {&#xD;&#xA;	pub enum Runtime&#xD;&#xA;	{&#xD;&#xA;      ...&#xD;&#xA;      Staking: pallet_staking::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;} = 6,&#xD;&#xA;      ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We see the error originated in the pallet staking, we go into `pallet_staking` code to find out what is the error. `0x02000000` is 2 in hex: ([See the link to the code here][3])&#xD;&#xA;```rs&#xD;&#xA;#[pallet::error]&#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;    ...&#xD;&#xA;     /// Stash is already bonded.&#xD;&#xA;     AlreadyBonded,&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/BMYax.png&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/runtime/westend/src/lib.rs#L1380C12-L1380C26&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/staking/src/pallet/mod.rs#L794C3-L795C1" ContentLicense="CC BY-SA 4.0" />
  <row Id="41907" PostHistoryTypeId="2" PostId="10547" RevisionGUID="5b77cdf9-6939-4818-85db-76f32bd8a81d" CreationDate="2023-11-28T10:00:59.633" UserId="4967" Text="In this link [`Balances::transfer` will be removed][1] it say 'transfer' is deprecated.&#xD;&#xA;I have experienced this change on test-net and fixed my Dapp after got failure report.&#xD;&#xA;&#xD;&#xA;But when does it take into effect on main-net? &#xD;&#xA;&#xD;&#xA;Because some reason I can not perform this upgrade on my own and need to notify others to do it in advance. Where I can get this kind of information or know the current stage that API changes are at? &#xD;&#xA;&#xD;&#xA;The polkadot API specs is less stable than ETH's, I have run into this kinds of things many times, very annoying and it would make life easier if I can take action before changes happen on chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/issues/9854" ContentLicense="CC BY-SA 4.0" />
  <row Id="41909" PostHistoryTypeId="1" PostId="10547" RevisionGUID="5b77cdf9-6939-4818-85db-76f32bd8a81d" CreationDate="2023-11-28T10:00:59.633" UserId="4967" Text="when will `‘Balances::transfer' will be removed` take into effect on main-net?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41910" PostHistoryTypeId="3" PostId="10547" RevisionGUID="5b77cdf9-6939-4818-85db-76f32bd8a81d" CreationDate="2023-11-28T10:00:59.633" UserId="4967" Text="|polkadot-js|runtime|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41911" PostHistoryTypeId="50" PostId="5680" RevisionGUID="7a0d200c-6f38-443f-b6ee-7e9eaa1b58e3" CreationDate="2023-11-28T13:05:40.767" UserId="-1" />
  <row Id="41912" PostHistoryTypeId="50" PostId="5673" RevisionGUID="3ef584d7-e8ea-466d-b66f-139349ed5950" CreationDate="2023-11-28T15:06:05.887" UserId="-1" />
  <row Id="41913" PostHistoryTypeId="2" PostId="10548" RevisionGUID="6eb9d7e8-75fe-4624-926e-8645fd3d987b" CreationDate="2023-11-28T15:40:44.410" UserId="4835" Text="I am implementing subscriptions, paid for with balance, rated per block, and the duration measured in block numbers.&#xD;&#xA;&#xD;&#xA;I am finding it very difficult, in general, to perform arithmetic that take  both balances and block numbers and deliver either of them.&#xD;&#xA;&#xD;&#xA;here is a sample implementation attempt:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct SubscriptionFunding&lt;BlockNumber, Balance&gt; {&#xD;&#xA;	/// the block number at which the subscription started, if it has been deployed&#xD;&#xA;	pub deployed_at: Option&lt;BlockNumber&gt;,&#xD;&#xA;	/// until when was this paid, it is never less than deployed_at if set. if there is a&#xD;&#xA;	/// settlement at mid-life of the subscription this is updated to track how long the&#xD;&#xA;	/// remaining funds will last. Also, rate changes require a settlement to date.&#xD;&#xA;	pub paid_until: Option&lt;BlockNumber&gt;,&#xD;&#xA;	/// Remaining locked funds available for the subscription&#xD;&#xA;	pub remaining_funds: Balance,&#xD;&#xA;	/// The rate used&#xD;&#xA;	pub rate: Rate&lt;Balance&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;BlockNumber, Balance&gt; SubscriptionFunding&lt;BlockNumber, Balance&gt;&#xD;&#xA;where&#xD;&#xA;	BlockNumber: Saturating + Copy,&#xD;&#xA;	Balance: Saturating + Copy + Zero,&#xD;&#xA;{&#xD;&#xA;	pub fn expected_termination(&amp;self) -&gt; Option&lt;BlockNumber&gt; {&#xD;&#xA;		// If the subscription has not started&#xD;&#xA;		self.deployed_at?;&#xD;&#xA;&#xD;&#xA;		// Subscription has started&#xD;&#xA;&#xD;&#xA;		match &amp;self.rate {&#xD;&#xA;			Rate { rate_type: RateType::None, .. } =&gt; None,&#xD;&#xA;			Rate { rate: r, .. } if r.is_zero() =&gt; None,&#xD;&#xA;			Rate { rate: r, .. } =&gt; Some(self.paid_until.unwrap() + self.remaining_funds.saturating_div( *r)),&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;although this basic implementation works for in unit testing for u64 types for example, I find it impossible to make it work inside my pallet with my BalanceOf&lt;T&gt; and BlockNumberOf&lt;T&gt; which are both pretty standard. &#xD;&#xA;&#xD;&#xA;I can add, blocknum + blocknum, I can check if balance is zero, but I have trouble:&#xD;&#xA;- dividing balance by balance, and adding the result to blockNumber. &#xD;&#xA;&#xD;&#xA;Missing traits in my pallet types, and difficulty to convert between the underlying types are the main sources of problems. &#xD;&#xA;&#xD;&#xA;Any tips that could help forward?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41915" PostHistoryTypeId="1" PostId="10548" RevisionGUID="6eb9d7e8-75fe-4624-926e-8645fd3d987b" CreationDate="2023-11-28T15:40:44.410" UserId="4835" Text="BlockNumber and Balance Arithmetic" ContentLicense="CC BY-SA 4.0" />
  <row Id="41916" PostHistoryTypeId="3" PostId="10548" RevisionGUID="6eb9d7e8-75fe-4624-926e-8645fd3d987b" CreationDate="2023-11-28T15:40:44.410" UserId="4835" Text="|pallet|coreprimitives|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41917" PostHistoryTypeId="5" PostId="10530" RevisionGUID="4c6c3c12-61e2-4f53-89c7-d3e106689ff6" CreationDate="2023-11-28T19:03:02.227" UserId="3331" Comment="Update the issue status" Text="I'm having issues when using the `ReportTransactStatus` in my XCM message as it gives me a `UnexpectedResponse` in my origin Parachain.&#xD;&#xA;&#xD;&#xA;How can I register the matching query in the origin, so when the destiny responds I get a more descriptive message?&#xD;&#xA;&#xD;&#xA;This is my XCM message code:&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;			match send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;				(Parent, Junction::Parachain(mult_para_id.into())).into(),&#xD;&#xA;				Xcm(vec![&#xD;&#xA;					&#xD;&#xA;					Transact {&#xD;&#xA;						origin_kind: OriginKind::Native,&#xD;&#xA;						require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;						call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::xcm_clone_file {&#xD;&#xA;							signer,&#xD;&#xA;							energy_bank_file: new_file&#xD;&#xA;						})&#xD;&#xA;						.encode()&#xD;&#xA;						.into(),&#xD;&#xA;					},&#xD;&#xA;					ReportTransactStatus(QueryResponseInfo {&#xD;&#xA;						destination: MultiLocation {parents: 1, interior: Parachain(2000).into()},&#xD;&#xA;						query_id,&#xD;&#xA;						max_weight: Weight::from_all(0),&#xD;&#xA;					}),&#xD;&#xA;				]),&#xD;&#xA;			) {&#xD;&#xA;				Ok((hash, cost)) =&gt; Self::deposit_event(Event::Success(mult_para_id)),&#xD;&#xA;				Err(e) =&gt; Self::deposit_event(Event::Error(e, mult_para_id)),&#xD;&#xA;			}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've also tried using `SetErrorHandler` w/ `ExpectTransactStatus` as well, but I got the same results.&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;...&#xD;&#xA;SetErrorHandler(Xcm(vec![ReportTransactStatus(QueryResponseInfo {&#xD;&#xA;			destination: MultiLocation {parents: 1, interior: Parachain(2000).into()},&#xD;&#xA;			query_id,&#xD;&#xA;			max_weight: Weight::from_all(0),&#xD;&#xA;})])),&#xD;&#xA;// Transact here,&#xD;&#xA;ExpectTransactStatus(MaybeErrorCode::Success),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `UnexpectedResponse` error:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/egVBT.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Deeply appreciate any help or documentation/examples to look further. Thank you&#xD;&#xA;&#xD;&#xA;**Update:**   &#xD;&#xA;I've setup the `ResponseHandler` for the pallet and tight coupled with the `pallet_xcm` so I can create new queries.&#xD;&#xA;&#xD;&#xA;But I'm now having problems when trying to call the `new_notify_query` function, because the `RuntimeCall` I'm passing as parameter is the wrong type.&#xD;&#xA;&#xD;&#xA;Here is how I'm creating the `RuntimeCall` and how I'm calling the `new_notify_query` function.&#xD;&#xA;```rust&#xD;&#xA;...&#xD;&#xA;let call = Call::&lt;T&gt;::report { query_id: 0, outcome: Default::default() };&#xD;&#xA;&#xD;&#xA;let query_id = pallet_xcm::Pallet::&lt;T&gt;::new_notify_query(&#xD;&#xA;	MultiLocation {parents: 1, interior: Parachain(2000).into()},&#xD;&#xA;	&lt;T as pallet::Config&gt;::RuntimeCall::from(call),&#xD;&#xA;	10u32.into(),&#xD;&#xA;	Here&#xD;&#xA;);&#xD;&#xA;...&#xD;&#xA;// The report dispatchable&#xD;&#xA;#[pallet::weight((0, Pays::No))]&#xD;&#xA;pub fn report(origin: OriginFor&lt;T&gt;, query_id: QueryId, outcome: Response) -&gt; DispatchResult { &#xD;&#xA;	// let responder = ensure_response(&lt;T as Config&gt;::RuntimeOrigin::from(origin))?;&#xD;&#xA;	Self::deposit_event(Event::Report(query_id, outcome));&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And the pallet `Config`&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_xcm::Config {&#xD;&#xA;		/// The overarching event type.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		type RuntimeOrigin: From&lt;&lt;Self as SystemConfig&gt;::RuntimeOrigin&gt;&#xD;&#xA;		+ Into&lt;Result&lt;CumulusOrigin, &lt;Self as Config&gt;::RuntimeOrigin&gt;&gt;;&#xD;&#xA;&#xD;&#xA;		/// The overarching call type; we assume sibling chains use the same type.&#xD;&#xA;		type RuntimeCall: IsType&lt;&lt;Self as Config&gt;::RuntimeCall&gt; + From&lt;Call&lt;Self&gt;&gt; + Encode;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		type XcmSender: SendXcm;&#xD;&#xA;		type ResponseHandler: OnResponse;&#xD;&#xA;		// type PolkadotXcm: PolkadotXcm;&#xD;&#xA;		type EnergyBank: EnergyBank&lt;Self::AccountId&gt;;&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41919" PostHistoryTypeId="2" PostId="10549" RevisionGUID="247139ff-41ee-4f72-b7b0-221e1e1277e9" CreationDate="2023-11-28T20:57:28.740" UserId="2149" Text="I need to build and run a substrate node in a such way that polkadot.js.org/apps will not display Alice, Bob etc at accounts page. I tried to remove all mentioning of Alice, Bob etc. from the rust code, but it didn't help: these accounts are still displayed, however have 0 balance.&#xD;&#xA;I run my node with a command:&#xD;&#xA;```&#xD;&#xA;    command: [&#xD;&#xA;      &quot;/usr/bin/node-template&quot;,&#xD;&#xA;      &quot;--dev&quot;,&#xD;&#xA;      &quot;--base-path&quot;, &quot;/data&quot;,&#xD;&#xA;      &quot;--name&quot;, &quot;ws-parachain-1&quot;,&#xD;&#xA;      &quot;--rpc-external&quot;,&#xD;&#xA;      &quot;--rpc-cors&quot;, &quot;all&quot;&#xD;&#xA;    ]&#xD;&#xA;```&#xD;&#xA;Removing &quot;--dev&quot; from the command doesn't help also." ContentLicense="CC BY-SA 4.0" />
  <row Id="41921" PostHistoryTypeId="1" PostId="10549" RevisionGUID="247139ff-41ee-4f72-b7b0-221e1e1277e9" CreationDate="2023-11-28T20:57:28.740" UserId="2149" Text="Build a test node without exposing Alice account" ContentLicense="CC BY-SA 4.0" />
  <row Id="41922" PostHistoryTypeId="3" PostId="10549" RevisionGUID="247139ff-41ee-4f72-b7b0-221e1e1277e9" CreationDate="2023-11-28T20:57:28.740" UserId="2149" Text="|substrate-node-template|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41923" PostHistoryTypeId="50" PostId="10316" RevisionGUID="33f549f3-c740-4e90-8d50-0f5bb56005da" CreationDate="2023-11-28T21:03:40.930" UserId="-1" />
  <row Id="41924" PostHistoryTypeId="2" PostId="10550" RevisionGUID="c9431862-7e62-4c24-9dea-dd40639bb86f" CreationDate="2023-11-28T22:51:08.570" UserId="3550" Text="Below is my lib.rs file for the token contract and it uses the Cardinal Cryptography PSP22 sample at https://github.com/Cardinal-Cryptography/PSP22&#xD;&#xA;&#xD;&#xA;I am trying to implement swap for the transfer taxes to native tokens, to no avail!&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std, no_main)]&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;contract&quot;)]&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod token {&#xD;&#xA;    use psp22::{PSP22Data, PSP22Error, PSP22Event, PSP22Metadata, PSP22};&#xD;&#xA;    use psp22::PSP22Error::Custom;&#xD;&#xA;    use ink::prelude::{string::String, vec::Vec};&#xD;&#xA;&#xD;&#xA;    use ink::{&#xD;&#xA;        env::{&#xD;&#xA;            call::{build_call, ExecutionInput, Selector},&#xD;&#xA;            DefaultEnvironment&#xD;&#xA;        }&#xD;&#xA;    };&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Token {&#xD;&#xA;        data: PSP22Data,&#xD;&#xA;        name: Option&lt;String&gt;,&#xD;&#xA;        symbol: Option&lt;String&gt;,&#xD;&#xA;        decimals: u8,&#xD;&#xA;        owner: Option&lt;AccountId&gt;,&#xD;&#xA;        reentrancy_lock: bool,&#xD;&#xA;        trading: bool,&#xD;&#xA;        pool_address: Option&lt;AccountId&gt;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Token {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(&#xD;&#xA;            name: Option&lt;String&gt;,&#xD;&#xA;            symbol: Option&lt;String&gt;,&#xD;&#xA;            decimals: u8,&#xD;&#xA;            total_supply: Balance&#xD;&#xA;        ) -&gt; Self {&#xD;&#xA;            let owner = Self::env().caller();&#xD;&#xA;            Self {&#xD;&#xA;                data: PSP22Data::new(total_supply, owner),&#xD;&#xA;                name,&#xD;&#xA;                symbol,&#xD;&#xA;                decimals,&#xD;&#xA;                owner: Some(owner),&#xD;&#xA;                reentrancy_lock: false,&#xD;&#xA;                trading: false,&#xD;&#xA;                pool_address: None&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn emit_events(&amp;self, events: Vec&lt;PSP22Event&gt;) {&#xD;&#xA;            for event in events {&#xD;&#xA;                match event {&#xD;&#xA;                    PSP22Event::Transfer { from, to, value } =&gt; {&#xD;&#xA;                        self.env().emit_event(Transfer { from, to, value })&#xD;&#xA;                    }&#xD;&#xA;                    PSP22Event::Approval {&#xD;&#xA;                        owner,&#xD;&#xA;                        spender,&#xD;&#xA;                        amount,&#xD;&#xA;                    } =&gt; self.env().emit_event(Approval {&#xD;&#xA;                        owner,&#xD;&#xA;                        spender,&#xD;&#xA;                        amount,&#xD;&#xA;                    }),&#xD;&#xA;                }&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn enable_trading(&amp;mut self, pool_address: AccountId) -&gt; Result&lt;(), PSP22Error&gt; {&#xD;&#xA;            if self.env().caller() != self.owner.unwrap() {&#xD;&#xA;                return Err(Custom(String::from(&quot;OnlyOwnerAllowed&quot;)));&#xD;&#xA;            }&#xD;&#xA;            self.pool_address = Some(pool_address);&#xD;&#xA;            self.trading = true;&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[inline]&#xD;&#xA;        pub fn distribute_fees(&amp;mut self) -&gt; Result&lt;(), PSP22Error&gt; {&#xD;&#xA;&#xD;&#xA;            let _ = ink::env::CallFlags::default().set_allow_reentry(true);&#xD;&#xA;&#xD;&#xA;            if self.reentrancy_lock == true {&#xD;&#xA;                return Ok(()); // Do not act if there is a reentry&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            self.reentrancy_lock = true;&#xD;&#xA;&#xD;&#xA;            let amount = self.data.balance_of(self.env().account_id());&#xD;&#xA;            &#xD;&#xA;            if amount &gt; 0 {&#xD;&#xA;                self.swap_for_azero(amount)?;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            self.reentrancy_lock = false;&#xD;&#xA;&#xD;&#xA;            Ok(())&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[inline]&#xD;&#xA;        pub fn swap_for_azero(&amp;mut self, amount: Balance) -&gt; Result&lt;(), PSP22Error&gt; {&#xD;&#xA;&#xD;&#xA;            let pool_address = self.pool_address.unwrap();&#xD;&#xA;&#xD;&#xA;            let azero_out = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;            .call(pool_address)&#xD;&#xA;            .exec_input(ExecutionInput::new(Selector::new(ink::selector_bytes!(&#xD;&#xA;                &quot;get_a0_amount_out_without_deduction&quot;&#xD;&#xA;            ))).push_arg(amount))&#xD;&#xA;            .returns::&lt;Balance&gt;()&#xD;&#xA;            .try_invoke().unwrap().unwrap();&#xD;&#xA;&#xD;&#xA;            self.data.approve(self.env().account_id(), pool_address, amount)?;&#xD;&#xA;&#xD;&#xA;            if build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;            .call(pool_address)&#xD;&#xA;            .exec_input(ExecutionInput::new(Selector::new(ink::selector_bytes!(&#xD;&#xA;                &quot;swap_psp22&quot;&#xD;&#xA;            )))&#xD;&#xA;            &#xD;&#xA;            .push_arg(amount)&#xD;&#xA;            .push_arg(azero_out)&#xD;&#xA;            .push_arg(100 * 10u128.pow(12)))&#xD;&#xA;&#xD;&#xA;            .returns::&lt;()&gt;()&#xD;&#xA;            .try_invoke().is_err() {&#xD;&#xA;                return Err(Custom(String::from(&quot;PSP22 Swap Failed&quot;)));&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            Ok(())&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct Approval {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        owner: AccountId,&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        spender: AccountId,&#xD;&#xA;        amount: u128,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct Transfer {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        from: Option&lt;AccountId&gt;,&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        to: Option&lt;AccountId&gt;,&#xD;&#xA;        value: u128,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl PSP22 for Token {&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn total_supply(&amp;self) -&gt; u128 {&#xD;&#xA;            self.data.total_supply()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn balance_of(&amp;self, owner: AccountId) -&gt; u128 {&#xD;&#xA;            self.data.balance_of(owner)&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn allowance(&amp;self, owner: AccountId, spender: AccountId) -&gt; u128 {&#xD;&#xA;            self.data.allowance(owner, spender)&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn transfer(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            to: AccountId,&#xD;&#xA;            value: u128,&#xD;&#xA;            _data: Vec&lt;u8&gt;,&#xD;&#xA;        ) -&gt; Result&lt;(), PSP22Error&gt; {&#xD;&#xA;            if self.env().caller() == self.env().account_id() || self.trading == false {&#xD;&#xA;                let events = self.data.transfer(self.env().caller(), to, value)?;&#xD;&#xA;                self.emit_events(events);&#xD;&#xA;            }&#xD;&#xA;            else {&#xD;&#xA;                let fee = (value * 3) / 100;&#xD;&#xA;                let amt = value - fee;&#xD;&#xA;&#xD;&#xA;                let _ = self.data.transfer(self.env().caller(), self.env().account_id(), fee)?;&#xD;&#xA;&#xD;&#xA;                if self.env().caller() != self.pool_address.unwrap() {&#xD;&#xA;                    self.distribute_fees()?;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                let events = self.data.transfer(self.env().caller(), to, amt)?;&#xD;&#xA;                self.emit_events(events);&#xD;&#xA;            }&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn transfer_from(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            from: AccountId,&#xD;&#xA;            to: AccountId,&#xD;&#xA;            value: u128,&#xD;&#xA;            _data: Vec&lt;u8&gt;,&#xD;&#xA;        ) -&gt; Result&lt;(), PSP22Error&gt; {&#xD;&#xA;&#xD;&#xA;            if from == self.env().account_id() || self.trading == false {&#xD;&#xA;                let events = self&#xD;&#xA;                .data&#xD;&#xA;                .transfer_from(self.env().caller(), from, to, value)?;&#xD;&#xA;                self.emit_events(events);&#xD;&#xA;            }&#xD;&#xA;            else {&#xD;&#xA;                let fee = (value * 3) / 100;&#xD;&#xA;                let amt = value - fee;&#xD;&#xA;&#xD;&#xA;                let _ = self&#xD;&#xA;                .data&#xD;&#xA;                .transfer_from(self.env().caller(), from, self.env().account_id(), fee)?;&#xD;&#xA;&#xD;&#xA;                if from != self.pool_address.unwrap() {&#xD;&#xA;                    self.distribute_fees()?;&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                let events = self&#xD;&#xA;                .data&#xD;&#xA;                .transfer_from(self.env().caller(), from, to, amt)?;&#xD;&#xA;                self.emit_events(events);&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            let events = self&#xD;&#xA;                .data&#xD;&#xA;                .transfer_from(self.env().caller(), from, to, value)?;&#xD;&#xA;            self.emit_events(events);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn approve(&amp;mut self, spender: AccountId, value: u128) -&gt; Result&lt;(), PSP22Error&gt; {&#xD;&#xA;            let events = self.data.approve(self.env().caller(), spender, value)?;&#xD;&#xA;            self.emit_events(events);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn increase_allowance(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            spender: AccountId,&#xD;&#xA;            delta_value: u128,&#xD;&#xA;        ) -&gt; Result&lt;(), PSP22Error&gt; {&#xD;&#xA;            let events = self&#xD;&#xA;                .data&#xD;&#xA;                .increase_allowance(self.env().caller(), spender, delta_value)?;&#xD;&#xA;            self.emit_events(events);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn decrease_allowance(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            spender: AccountId,&#xD;&#xA;            delta_value: u128,&#xD;&#xA;        ) -&gt; Result&lt;(), PSP22Error&gt; {&#xD;&#xA;            let events = self&#xD;&#xA;                .data&#xD;&#xA;                .decrease_allowance(self.env().caller(), spender, delta_value)?;&#xD;&#xA;            self.emit_events(events);&#xD;&#xA;            Ok(())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl PSP22Metadata for Token {&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn token_name(&amp;self) -&gt; Option&lt;String&gt; {&#xD;&#xA;            self.name.clone()&#xD;&#xA;        }&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn token_symbol(&amp;self) -&gt; Option&lt;String&gt; {&#xD;&#xA;            self.symbol.clone()&#xD;&#xA;        }&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        fn token_decimals(&amp;self) -&gt; u8 {&#xD;&#xA;            self.decimals&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;When I enable trading, the contract gets trapped in the transfer_from and transfer methods respectively.&#xD;&#xA;&#xD;&#xA;How do I fix the problem? Can anyone spot out the issue? Is there something wrong somewhere?&#xD;&#xA;&#xD;&#xA;You can use `cargo +nightly contract build --release --features &quot;contract&quot; to build (compile) the code.&#xD;&#xA;&#xD;&#xA;Also, below is the Cargo.toml file content:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;psp22&quot;&#xD;&#xA;version = &quot;0.2.1&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;authors = [&quot;Edinyanga Ottoho&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.3&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.9&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;psp22 = { git = &quot;https://github.com/Cardinal-Cryptography/PSP22.git&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;contract = []&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;    &quot;psp22/std&quot;&#xD;&#xA;]&#xD;&#xA;&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="41926" PostHistoryTypeId="1" PostId="10550" RevisionGUID="c9431862-7e62-4c24-9dea-dd40639bb86f" CreationDate="2023-11-28T22:51:08.570" UserId="3550" Text="I am having issues with implementing swap fees on transfer for DEX" ContentLicense="CC BY-SA 4.0" />
  <row Id="41927" PostHistoryTypeId="3" PostId="10550" RevisionGUID="c9431862-7e62-4c24-9dea-dd40639bb86f" CreationDate="2023-11-28T22:51:08.570" UserId="3550" Text="|ink|rust|decentralised|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41928" PostHistoryTypeId="2" PostId="10551" RevisionGUID="402805e5-a1e0-4cd1-85dc-0a8d3f58de9b" CreationDate="2023-11-29T01:59:15.487" UserId="251" Text="You can utilize [`SaturatedConversion`](https://paritytech.github.io/polkadot-sdk/master/sp_runtime/traits/trait.SaturatedConversion.html) to convert them to the same type and perform arithmetic. Then, convert the result into the desired final type.&#xD;&#xA;&#xD;&#xA;For example:&#xD;&#xA;```rs&#xD;&#xA;let block_number = block_number.saturated_into::&lt;u64&gt;();&#xD;&#xA;let balance = balance.saturated_into::&lt;u64&gt;();&#xD;&#xA;let final_result = (block_number + balance).saturated_into::&lt;u128&gt;();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Take care when performing type conversions and choose the appropriate type. If the `Balance` type is `u128`, using `saturated_into::&lt;u64&gt;()` may result in loss of some details." ContentLicense="CC BY-SA 4.0" />
  <row Id="41930" PostHistoryTypeId="50" PostId="7391" RevisionGUID="1cf9982f-f02a-4af9-b2fd-d408d82c6e75" CreationDate="2023-11-29T02:00:35.113" UserId="-1" />
  <row Id="41931" PostHistoryTypeId="2" PostId="10552" RevisionGUID="d83bee03-e597-4de6-8381-94b48bf52cc1" CreationDate="2023-11-29T04:31:43.893" UserId="2372" Text="I am currently working on incorporating a transaction fee logic where the block reward for a validator is intended to be shared between the validator and its nominator. However, I am encountering an issue where the fees for the nominator are being deducted from the total issuance." ContentLicense="CC BY-SA 4.0" />
  <row Id="41933" PostHistoryTypeId="1" PostId="10552" RevisionGUID="d83bee03-e597-4de6-8381-94b48bf52cc1" CreationDate="2023-11-29T04:31:43.893" UserId="2372" Text="When doing transaction my total issuance got deducted" ContentLicense="CC BY-SA 4.0" />
  <row Id="41934" PostHistoryTypeId="3" PostId="10552" RevisionGUID="d83bee03-e597-4de6-8381-94b48bf52cc1" CreationDate="2023-11-29T04:31:43.893" UserId="2372" Text="|balances|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41935" PostHistoryTypeId="2" PostId="10553" RevisionGUID="5c3a0cd3-6657-44aa-95bd-29ace47860a8" CreationDate="2023-11-29T08:23:33.133" UserId="386" Text="I've encountered a series of log entries in my Substrate parachain that I'm struggling to understand and need some assistance with. The logs are as follows:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;2023-11-29 09:13:37 [Parachain] Report 12D3KooWCEZ635J1LtCSX95vSjk6WzAm6oHdzKdEhiKzLNtiUvpT: -536870912 to -2147483648. Reason: Not requested block data. Banned, disconnecting.&#xD;&#xA;2023-11-29 09:13:37 [Parachain] Report 12D3KooWAkbe8ecKSGUyRjgZwh8DifGiu5oe6s1VbVdBcVmc7mkS: -536870912 to -2147483648. Reason: Not requested block data. Banned, disconnecting.&#xD;&#xA;2023-11-29 09:13:38 [Parachain] Report 12D3KooWQjuPJkXHj25W4QMuemGtcLFHBAiFMMd9snbhqSTB2vn5: -536870912 to -2147483648. Reason: Not requested block data. Banned, disconnecting.&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;These logs indicate a ban on certain nodes due to &quot;Not requested block data&quot;. These nodes were synced using sync warp or fast for the Kusama relay chain. Moreover, as these nodes are the bootnodes of the network, this issue is causing a significant problem: **no new node is able to connect and start syncing the parachain**. My questions are:&#xD;&#xA;&#xD;&#xA;1. What does the &quot;Not requested block data&quot; reason imply in the context of a Substrate parachain, especially for nodes synced with warp or fast sync on Kusama?&#xD;&#xA;2. The reported numeric values (-536870912 to -2147483648) seem peculiar. What do they represent, and why might they be appearing in this context?&#xD;&#xA;3. Given that these nodes are the bootnodes of our network, what can be done to resolve this issue to allow new nodes to connect and start syncing?&#xD;&#xA;&#xD;&#xA;Any insights or guidance would be greatly appreciated as I navigate this issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41937" PostHistoryTypeId="1" PostId="10553" RevisionGUID="5c3a0cd3-6657-44aa-95bd-29ace47860a8" CreationDate="2023-11-29T08:23:33.133" UserId="386" Text="&quot;Not Requested Block Data&quot; Log Entries in Substrate Parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="41938" PostHistoryTypeId="3" PostId="10553" RevisionGUID="5c3a0cd3-6657-44aa-95bd-29ace47860a8" CreationDate="2023-11-29T08:23:33.133" UserId="386" Text="|parachain|sync|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41939" PostHistoryTypeId="5" PostId="10553" RevisionGUID="a60c22dd-cab7-43b2-9e1b-ef9b815d6093" CreationDate="2023-11-29T08:30:54.467" UserId="386" Comment="added 4 characters in body" Text="I've encountered a series of log entries in my Substrate parachain that I'm struggling to understand and need some assistance with. The logs are as follows:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;2023-11-29 09:13:37 [Parachain] Report 12D3KooWCEZ635J1LtCSX95vSjk6WzAm6oHdzKdEhiKzLNtiUvpT: -536870912 to -2147483648. Reason: Not requested block data. Banned, disconnecting.&#xD;&#xA;2023-11-29 09:13:37 [Parachain] Report 12D3KooWAkbe8ecKSGUyRjgZwh8DifGiu5oe6s1VbVdBcVmc7mkS: -536870912 to -2147483648. Reason: Not requested block data. Banned, disconnecting.&#xD;&#xA;2023-11-29 09:13:38 [Parachain] Report 12D3KooWQjuPJkXHj25W4QMuemGtcLFHBAiFMMd9snbhqSTB2vn5: -536870912 to -2147483648. Reason: Not requested block data. Banned, disconnecting.&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;These logs indicate a ban on certain nodes due to &quot;Not requested block data&quot;. These nodes were synced using sync `warp` or `fast` for the Kusama relay chain. Moreover, as these nodes are the bootnodes of the network, this issue is causing a significant problem: **no new node is able to connect and start syncing the parachain**. My questions are:&#xD;&#xA;&#xD;&#xA;1. What does the &quot;Not requested block data&quot; reason imply in the context of a Substrate parachain, especially for nodes synced with warp or fast sync on Kusama?&#xD;&#xA;2. The reported numeric values (-536870912 to -2147483648) seem peculiar. What do they represent, and why might they be appearing in this context?&#xD;&#xA;3. Given that these nodes are the bootnodes of our network, what can be done to resolve this issue to allow new nodes to connect and start syncing?&#xD;&#xA;&#xD;&#xA;Any insights or guidance would be greatly appreciated as I navigate this issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41940" PostHistoryTypeId="5" PostId="10553" RevisionGUID="68136b9f-bfa1-4078-83f0-3bc7c97c18a2" CreationDate="2023-11-29T09:01:44.780" UserId="386" Comment="added 434 characters in body" Text="&#xD;&#xA;I am facing an issue with syncing new nodes to the bootnodes of my parachain on Kusama. The bootnodes were synced using the following commands:&#xD;&#xA;&#xD;&#xA;- For fast sync: `binary --chain &lt;parachainchain&gt; -- --sync=fast`&#xD;&#xA;- For warp sync: `binary --chain &lt;parachainchain&gt; -- --sync=warp`&#xD;&#xA;&#xD;&#xA;However, when I try to sync a new node with these bootnodes, I encounter the following log entries:&#xD;&#xA;```&#xD;&#xA;2023-11-29 09:13:37 [Parachain] Report 12D3KooWCEZ635J1LtCSX95vSjk6WzAm6oHdzKdEhiKzLNtiUvpT: -536870912 to -2147483648. Reason: Not requested block data. Banned, disconnecting.&#xD;&#xA;2023-11-29 09:13:37 [Parachain] Report 12D3KooWAkbe8ecKSGUyRjgZwh8DifGiu5oe6s1VbVdBcVmc7mkS: -536870912 to -2147483648. Reason: Not requested block data. Banned, disconnecting.&#xD;&#xA;2023-11-29 09:13:38 [Parachain] Report 12D3KooWQjuPJkXHj25W4QMuemGtcLFHBAiFMMd9snbhqSTB2vn5: -536870912 to -2147483648. Reason: Not requested block data. Banned, disconnecting.&#xD;&#xA;``` &#xD;&#xA;As a result, no new node is able to sync with the parachain. I'm seeking advice or insights on the following:&#xD;&#xA;&#xD;&#xA;1. What could be causing the &quot;Not requested block data&quot; issue in the context of syncing new nodes with the bootnodes?&#xD;&#xA;2. The numeric values reported in the logs (-536870912 to -2147483648) are confusing. Can someone explain their significance?&#xD;&#xA;3. Are there any known solutions or workarounds to resolve this syncing issue?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41941" PostHistoryTypeId="4" PostId="10553" RevisionGUID="68136b9f-bfa1-4078-83f0-3bc7c97c18a2" CreationDate="2023-11-29T09:01:44.780" UserId="386" Comment="added 434 characters in body" Text="&quot;Not Requested Block Data&quot; synching a parachain node" ContentLicense="CC BY-SA 4.0" />
  <row Id="41942" PostHistoryTypeId="2" PostId="10554" RevisionGUID="722f529c-b788-4942-9a66-7077a40818a2" CreationDate="2023-11-29T10:37:30.853" UserId="386" Text="I'm using Polkadot version `1.3.0-7c9fd83805c`. When syncing a node with the command:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;➜ ~ polkadot --tmp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've encountered an error preventing me from retrieving the genesis block:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;-32000: Client error: Api called for an unknown Block: State already discarded for 0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;This raises a question about the nature of node data retention in Polkadot's network. &#xD;&#xA;&#xD;&#xA;* Are standard nodes not designed to maintain the complete chain history? &#xD;&#xA;* Is this capability exclusive to archive nodes? &#xD;&#xA;&#xD;&#xA;My understanding was that **while all nodes maintain the chain, archive nodes store the state at each block additionally**.&#xD;&#xA;&#xD;&#xA;Any insights or explanations on how chain data is maintained across different types of nodes in Polkadot would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JMxi8.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41944" PostHistoryTypeId="1" PostId="10554" RevisionGUID="722f529c-b788-4942-9a66-7077a40818a2" CreationDate="2023-11-29T10:37:30.853" UserId="386" Text="Do Polkadot Nodes Not Maintain the Complete Chain History?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41945" PostHistoryTypeId="3" PostId="10554" RevisionGUID="722f529c-b788-4942-9a66-7077a40818a2" CreationDate="2023-11-29T10:37:30.853" UserId="386" Text="|nodes|archive|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41946" PostHistoryTypeId="5" PostId="10554" RevisionGUID="79fa462c-eddd-43e9-9fe7-f9fff4cba3a5" CreationDate="2023-11-29T10:50:30.177" UserId="386" Comment="added 173 characters in body" Text="I'm using Polkadot version `1.3.0-7c9fd83805c`. When syncing a node with the command:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;➜ ~ polkadot --tmp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've encountered an error preventing me from retrieving the genesis block:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;-32000: Client error: Api called for an unknown Block: State already discarded for 0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3&#xD;&#xA;``` &#xD;&#xA;---&#xD;&#xA;Running an archive node:&#xD;&#xA;```&#xD;&#xA;➜ ~ polkadot --tmp --pruning=archive&#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This raises a question about the nature of node data retention in Polkadot's network. &#xD;&#xA;&#xD;&#xA;* Are standard nodes not designed to maintain the complete chain history? &#xD;&#xA;* Is this capability exclusive to archive nodes? &#xD;&#xA;&#xD;&#xA;My understanding was that **while all nodes maintain the chain, archive nodes store the state at each block additionally**.&#xD;&#xA;&#xD;&#xA;Any insights or explanations on how chain data is maintained across different types of nodes in Polkadot would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JMxi8.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ItT44.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41947" PostHistoryTypeId="5" PostId="10554" RevisionGUID="7705b2e2-d6ca-4464-aa20-3b59b6c7d274" CreationDate="2023-11-29T10:59:00.770" UserId="386" Comment="edited body" Text="I'm using Polkadot version `1.3.0-7c9fd83805c`. When syncing a node with the command:&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;➜ ~ polkadot --tmp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've encountered an error preventing me from retrieving the genesis block:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;-32000: Client error: Api called for an unknown Block: State already discarded for 0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3&#xD;&#xA;``` &#xD;&#xA;---&#xD;&#xA;Running an archive node:&#xD;&#xA;```&#xD;&#xA;➜ ~ polkadot --tmp --pruning=archive&#xD;&#xA;```&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;This raises a question about the nature of node data retention in Polkadot's network. &#xD;&#xA;&#xD;&#xA;* Are standard nodes not designed to maintain the complete chain history? &#xD;&#xA;* Is this capability exclusive to archive nodes? &#xD;&#xA;&#xD;&#xA;My understanding was that while **all nodes maintain the chain**, archive nodes store the state at each block additionally.&#xD;&#xA;&#xD;&#xA;Any insights or explanations on how chain data is maintained across different types of nodes in Polkadot would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/JMxi8.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ItT44.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41948" PostHistoryTypeId="2" PostId="10555" RevisionGUID="df7f567e-e2b4-488a-a11f-13f9d904b659" CreationDate="2023-11-29T11:17:36.037" UserId="554" Text="Is it feasible for validators to retrieve information from external APIs, particularly news data, and seamlessly incorporate it into the blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41950" PostHistoryTypeId="1" PostId="10555" RevisionGUID="df7f567e-e2b4-488a-a11f-13f9d904b659" CreationDate="2023-11-29T11:17:36.037" UserId="554" Text="Integrating External Data into Blockchain: Can Validators Fetch and Incorporate API-sourced Data?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41951" PostHistoryTypeId="3" PostId="10555" RevisionGUID="df7f567e-e2b4-488a-a11f-13f9d904b659" CreationDate="2023-11-29T11:17:36.037" UserId="554" Text="|polkadot|api|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41957" PostHistoryTypeId="2" PostId="10557" RevisionGUID="b828ae03-d3f7-49be-b196-df78510ca1e8" CreationDate="2023-11-29T13:17:18.033" UserId="251" Text="Yes, the default behavior is pruning.&#xD;&#xA;&#xD;&#xA;From my understanding, in most cases, you won't need the complete data. Pruning can significantly reduce the size of the database, making it a good choice for most node operators.&#xD;&#xA;&#xD;&#xA;Some data suppliers, such as Subscan, use archive mode for indexing.&#xD;&#xA;&#xD;&#xA;Check these resources to learn about the node types.&#xD;&#xA;&#xD;&#xA;- https://wiki.polkadot.network/docs/maintain-sync&#xD;&#xA;- https://substrate.stackexchange.com/questions/334/what-kinds-of-sync-mechanisms-does-substrate-implement" ContentLicense="CC BY-SA 4.0" />
  <row Id="41959" PostHistoryTypeId="2" PostId="10558" RevisionGUID="1ab943aa-f081-4c1a-9ebb-ae4c36466fcb" CreationDate="2023-11-29T13:24:29.660" UserId="19" Text="I work on a pallet with interior dispatch mutability where I need to make calls `cancel_as_multi` and `as_multi` and after importing `contracts` pallet, compiler forces me to change `contracts` pallet. But I do not want to change `contracts` pallet, and I completely do not understand **why** compiler forces me to implement those changes. Here is what I got from a compiler:&#xD;&#xA;&#xD;&#xA;       Compiling pallet-contracts v4.0.0-dev (/home/tomek/workspaces/polkadot-sdk/substrate/frame/contracts) error: cannot find macro `vec` in this scope    --&gt; substrate/frame/contracts/src/wasm/mod.rs:272:7&#xD;&#xA;        | 272 |                         vec![code_hash],&#xD;&#xA;        |                         ^^^&#xD;&#xA;        | help: consider importing one of these items&#xD;&#xA;        | 30  + use codec::alloc::vec;&#xD;&#xA;        | 30  + use crate::vec;&#xD;&#xA;        | 30  + use scale_info::prelude::vec;&#xD;&#xA;        | 30  + use sp_api::vec;&#xD;&#xA;        |&#xD;&#xA;          and 1 other candidate&#xD;&#xA;&#xD;&#xA;This kind of errors I got many, many more but all connected to `use codec::alloc::vec;`. I have no idea why, can anyone explain **the way**? I do not understand the mechanism that works behind. I ask the question because I was assuming, that just the fact of importing a pallet should not induce any changes in the imported pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="41961" PostHistoryTypeId="1" PostId="10558" RevisionGUID="1ab943aa-f081-4c1a-9ebb-ae4c36466fcb" CreationDate="2023-11-29T13:24:29.660" UserId="19" Text="Imported pallet and got &quot;use codec::alloc::vec;&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41962" PostHistoryTypeId="3" PostId="10558" RevisionGUID="1ab943aa-f081-4c1a-9ebb-ae4c36466fcb" CreationDate="2023-11-29T13:24:29.660" UserId="19" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41963" PostHistoryTypeId="2" PostId="10559" RevisionGUID="77e34ba3-1a6d-4e24-b1ca-2d1b74a07c72" CreationDate="2023-11-29T14:05:11.583" UserId="3070" Text="Following the docs for [polkadot js storage][1] we are getting entries and keys from the chain. Is there a way to use limit and offset to implement paging. Any ideas?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/start/api.query.other/" ContentLicense="CC BY-SA 4.0" />
  <row Id="41965" PostHistoryTypeId="1" PostId="10559" RevisionGUID="77e34ba3-1a6d-4e24-b1ca-2d1b74a07c72" CreationDate="2023-11-29T14:05:11.583" UserId="3070" Text="Limit and Offset for for storage entries and keys" ContentLicense="CC BY-SA 4.0" />
  <row Id="41966" PostHistoryTypeId="3" PostId="10559" RevisionGUID="77e34ba3-1a6d-4e24-b1ca-2d1b74a07c72" CreationDate="2023-11-29T14:05:11.583" UserId="3070" Text="|polkadot-js|storage|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41967" PostHistoryTypeId="2" PostId="10560" RevisionGUID="85a9e9d3-bb4c-46cb-8803-b5c44fb756af" CreationDate="2023-11-29T14:42:19.910" UserId="251" Text="Sometimes, if you forget to include `xxx/std` in the features, you will encounter this error." ContentLicense="CC BY-SA 4.0" />
  <row Id="41969" PostHistoryTypeId="5" PostId="10530" RevisionGUID="f9e22123-395b-4cd1-b187-c1ace20de4ae" CreationDate="2023-11-29T15:08:33.377" UserId="3331" Comment="Added error image" Text="I'm having issues when using the `ReportTransactStatus` in my XCM message as it gives me a `UnexpectedResponse` in my origin Parachain.&#xD;&#xA;&#xD;&#xA;How can I register the matching query in the origin, so when the destiny responds I get a more descriptive message?&#xD;&#xA;&#xD;&#xA;This is my XCM message code:&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;			match send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;				(Parent, Junction::Parachain(mult_para_id.into())).into(),&#xD;&#xA;				Xcm(vec![&#xD;&#xA;					&#xD;&#xA;					Transact {&#xD;&#xA;						origin_kind: OriginKind::Native,&#xD;&#xA;						require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;						call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::xcm_clone_file {&#xD;&#xA;							signer,&#xD;&#xA;							energy_bank_file: new_file&#xD;&#xA;						})&#xD;&#xA;						.encode()&#xD;&#xA;						.into(),&#xD;&#xA;					},&#xD;&#xA;					ReportTransactStatus(QueryResponseInfo {&#xD;&#xA;						destination: MultiLocation {parents: 1, interior: Parachain(2000).into()},&#xD;&#xA;						query_id,&#xD;&#xA;						max_weight: Weight::from_all(0),&#xD;&#xA;					}),&#xD;&#xA;				]),&#xD;&#xA;			) {&#xD;&#xA;				Ok((hash, cost)) =&gt; Self::deposit_event(Event::Success(mult_para_id)),&#xD;&#xA;				Err(e) =&gt; Self::deposit_event(Event::Error(e, mult_para_id)),&#xD;&#xA;			}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've also tried using `SetErrorHandler` w/ `ExpectTransactStatus` as well, but I got the same results.&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;...&#xD;&#xA;SetErrorHandler(Xcm(vec![ReportTransactStatus(QueryResponseInfo {&#xD;&#xA;			destination: MultiLocation {parents: 1, interior: Parachain(2000).into()},&#xD;&#xA;			query_id,&#xD;&#xA;			max_weight: Weight::from_all(0),&#xD;&#xA;})])),&#xD;&#xA;// Transact here,&#xD;&#xA;ExpectTransactStatus(MaybeErrorCode::Success),&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The `UnexpectedResponse` error:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Deeply appreciate any help or documentation/examples to look further. Thank you&#xD;&#xA;&#xD;&#xA;**Update:**   &#xD;&#xA;I've setup the `ResponseHandler` for the pallet and tight coupled with the `pallet_xcm` so I can create new queries.&#xD;&#xA;&#xD;&#xA;But I'm now having problems when trying to call the `new_notify_query` function, because the `RuntimeCall` I'm passing as parameter is the wrong type.&#xD;&#xA;&#xD;&#xA;Here is how I'm creating the `RuntimeCall` and how I'm calling the `new_notify_query` function.&#xD;&#xA;```rust&#xD;&#xA;...&#xD;&#xA;let call = Call::&lt;T&gt;::report { query_id: 0, outcome: Default::default() };&#xD;&#xA;&#xD;&#xA;let query_id = pallet_xcm::Pallet::&lt;T&gt;::new_notify_query(&#xD;&#xA;	MultiLocation {parents: 1, interior: Parachain(2000).into()},&#xD;&#xA;	&lt;T as pallet::Config&gt;::RuntimeCall::from(call),&#xD;&#xA;	10u32.into(),&#xD;&#xA;	Here&#xD;&#xA;);&#xD;&#xA;...&#xD;&#xA;// The report dispatchable&#xD;&#xA;#[pallet::weight((0, Pays::No))]&#xD;&#xA;pub fn report(origin: OriginFor&lt;T&gt;, query_id: QueryId, outcome: Response) -&gt; DispatchResult { &#xD;&#xA;	// let responder = ensure_response(&lt;T as Config&gt;::RuntimeOrigin::from(origin))?;&#xD;&#xA;	Self::deposit_event(Event::Report(query_id, outcome));&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And the pallet `Config`&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_xcm::Config {&#xD;&#xA;		/// The overarching event type.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		type RuntimeOrigin: From&lt;&lt;Self as SystemConfig&gt;::RuntimeOrigin&gt;&#xD;&#xA;		+ Into&lt;Result&lt;CumulusOrigin, &lt;Self as Config&gt;::RuntimeOrigin&gt;&gt;;&#xD;&#xA;&#xD;&#xA;		/// The overarching call type; we assume sibling chains use the same type.&#xD;&#xA;		type RuntimeCall: IsType&lt;&lt;Self as Config&gt;::RuntimeCall&gt; + From&lt;Call&lt;Self&gt;&gt; + Encode;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		type XcmSender: SendXcm;&#xD;&#xA;		type ResponseHandler: OnResponse;&#xD;&#xA;		// type PolkadotXcm: PolkadotXcm;&#xD;&#xA;		type EnergyBank: EnergyBank&lt;Self::AccountId&gt;;&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error: &#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/egVBT.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/lY5jT.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="41970" PostHistoryTypeId="2" PostId="10561" RevisionGUID="7ef9db17-2252-4896-bda3-6e5565d7f654" CreationDate="2023-11-29T15:19:15.020" UserId="386" Text="I've been exploring the intricacies of node types in Polkadot and other Substrate-based networks and came across a scenario that has left me curious. I understand that **full nodes** and **archive nodes** serve different purposes, with full nodes focusing on the current state and a more recent part of the chain, and archive nodes maintaining the complete chain.&#xD;&#xA;&#xD;&#xA;My question revolves around the scenario where a network has numerous full nodes but lacks an archive node, either temporarily or permanently. Specifically, I am interested in understanding:&#xD;&#xA;&#xD;&#xA;1. **Syncing from Genesis:** In the absence of any archive nodes, is it possible for the network to sync from the genesis block? Or does the network rely solely on more recent **`--sync warp`** for synchronization?&#xD;&#xA;&#xD;&#xA;2. **Historical Data Retrieval:** How does the absence of archive nodes impact the ability to access historical data? Can full nodes compensate in any way, or is historical data effectively lost?&#xD;&#xA;&#xD;&#xA;3. **Network Resilience:** Considering a hypothetical network with a million full nodes and a single archive node, if the archive node disappears, what are the implications for the network's ability to reconstruct its past states from the genesis?&#xD;&#xA;&#xD;&#xA;4. **Operational Impact:** How does this setup affect the day-to-day operation of the network? Can the network continue producing new blocks without any archive node, albeit with a loss of historical data?&#xD;&#xA;&#xD;&#xA;5. **Incentives for Archive Nodes:** Finally, what incentives exist for operating an archive node, given their importance in maintaining the full history of the network?&#xD;&#xA;&#xD;&#xA;I am keen to understand both the technical and practical aspects of this scenario. Any insights, references, or experiences would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you for your time and expertise!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41972" PostHistoryTypeId="1" PostId="10561" RevisionGUID="7ef9db17-2252-4896-bda3-6e5565d7f654" CreationDate="2023-11-29T15:19:15.020" UserId="386" Text="Genesis Sync and History: Are Archive Nodes Indispensable?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41973" PostHistoryTypeId="3" PostId="10561" RevisionGUID="7ef9db17-2252-4896-bda3-6e5565d7f654" CreationDate="2023-11-29T15:19:15.020" UserId="386" Text="|substrate-node|blockchain|genesis|architecture|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41974" PostHistoryTypeId="5" PostId="10561" RevisionGUID="f5eabf26-56a0-407a-81fb-e1f537ceb219" CreationDate="2023-11-29T15:26:00.423" UserId="386" Comment="deleted 40 characters in body" Text="I've been exploring the intricacies of node types in Polkadot and other Substrate-based networks and came across a scenario that has left me curious. I understand that **full nodes** and **archive nodes** serve different purposes, with full nodes focusing on the current state and a more recent part of the chain, and archive nodes maintaining the complete chain.&#xD;&#xA;&#xD;&#xA;My question revolves around the scenario where a network has numerous full nodes but lacks an archive node, either temporarily or permanently. Specifically, I am interested in understanding:&#xD;&#xA;&#xD;&#xA;1. **Syncing from Genesis:** In the absence of any archive nodes, is it possible for the network to sync from the genesis block? Or does the network rely solely on more recent **`--sync warp`** for synchronization?&#xD;&#xA;&#xD;&#xA;2. **Historical Data Retrieval:** How does the absence of archive nodes impact the ability to access historical data? Can full nodes compensate in any way, or is historical data effectively lost?&#xD;&#xA;&#xD;&#xA;3. **Network Resilience:** Considering a hypothetical network with a million full nodes and a single archive node, if the archive node disappears, what are the implications for the network's ability to reconstruct its past states from the genesis?&#xD;&#xA;&#xD;&#xA;4. **Operational Impact:** How does this setup affect the day-to-day operation of the network? Can the network continue producing new blocks without any archive node, albeit with a loss of historical data?&#xD;&#xA;&#xD;&#xA;5. **Incentives for Archive Nodes:** Finally, what incentives exist for operating an archive node, given their importance in maintaining the full history of the network?&#xD;&#xA;&#xD;&#xA;I am keen to understand both the technical and practical aspects of this scenario. Any insights, references, or experiences would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41975" PostHistoryTypeId="2" PostId="10562" RevisionGUID="775e8b6e-7936-4e65-939c-27786fdf6d63" CreationDate="2023-11-29T16:06:26.783" UserId="2005" Text="looking at the [source code][1] and this [issue][2], it seems explorer checks whether chain is:&#xD;&#xA;1. local, if `ChainType::Local` or name contains `local` &#xD;&#xA;2. dev, if `ChainType::Development` or name contains `dev`&#xD;&#xA;3. test, if name contains `test`&#xD;&#xA;&#xD;&#xA;before it populates the keyring with dev accounts.&#xD;&#xA;&#xD;&#xA;Maybe changing `ChainType` to `Live` in chain spec could solve your issue.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/blob/master/packages/react-api/src/Api.tsx#L146&#xD;&#xA;  [2]: https://github.com/polkadot-js/apps/issues/6752#issuecomment-1002637922" ContentLicense="CC BY-SA 4.0" />
  <row Id="41977" PostHistoryTypeId="5" PostId="10562" RevisionGUID="28e62154-a6b0-4579-816d-54749b65b9c0" CreationDate="2023-11-29T16:07:31.517" UserId="2005" Comment="added 56 characters in body" Text="looking at the [source code][1] and this [issue][2], it seems explorer checks whether chain is:&#xD;&#xA;1. local, if `ChainType::Local` or name contains `local` &#xD;&#xA;2. dev, if `ChainType::Development` or name contains `dev`&#xD;&#xA;3. test, if name contains `test`&#xD;&#xA;&#xD;&#xA;before it populates the keyring with dev accounts.&#xD;&#xA;&#xD;&#xA;If you really don't want to see dev accounts in the dev node, changing `ChainType` to `Live` in chain spec could solve your issue.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/apps/blob/master/packages/react-api/src/Api.tsx#L146&#xD;&#xA;  [2]: https://github.com/polkadot-js/apps/issues/6752#issuecomment-1002637922" ContentLicense="CC BY-SA 4.0" />
  <row Id="41978" PostHistoryTypeId="2" PostId="10563" RevisionGUID="58c36dc6-6a66-4756-b511-a1d2f0a101f0" CreationDate="2023-11-29T18:58:25.140" UserId="2060" Text="As I understand [transactional storage][1], an error result from an extrinsic reverts any state changes by default (assuming no `without_transactional` macros or suchlike).&#xD;&#xA;&#xD;&#xA;Some feel that because of this, use of `Storage*` functions like `try_mutate` for storage operations is no longer needed.  They prefer an easier to read style of fetching a record into a mut variable from storage, perform checks &amp; updates, and then call `set` (with `Some(foo)` or `None`) when done.&#xD;&#xA;&#xD;&#xA;When I look at the code (e.g. in [frame/support/src/storage/generator/map][2]) I'm not seeing an obvious reason to prefer functions like `try_mutate` and friends (assuming of course all proper error conditions are still checked). Is there a technical reason to stick with these?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/runtime-storage/#transactional-storage&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/820179348c1c56bbe00236be6115a7bab451d1fd/substrate/frame/support/src/storage/generator/map.rs#L286" ContentLicense="CC BY-SA 4.0" />
  <row Id="41980" PostHistoryTypeId="1" PostId="10563" RevisionGUID="58c36dc6-6a66-4756-b511-a1d2f0a101f0" CreationDate="2023-11-29T18:58:25.140" UserId="2060" Text="try_mutate compared to getting &amp; setting" ContentLicense="CC BY-SA 4.0" />
  <row Id="41981" PostHistoryTypeId="3" PostId="10563" RevisionGUID="58c36dc6-6a66-4756-b511-a1d2f0a101f0" CreationDate="2023-11-29T18:58:25.140" UserId="2060" Text="|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41982" PostHistoryTypeId="2" PostId="10564" RevisionGUID="dedd7c64-23ca-472f-b235-9c2925907c2b" CreationDate="2023-11-29T21:47:05.440" UserId="4972" Text="if you have found an answer to your question, I would be glad to hear it :)&#xD;&#xA;&#xD;&#xA;Otherwise, I have the same issue and my research led me to believe it is because of a circular dependency import. Which I haven't found yet. Moreover I believe this caused the issue because a friend of mine got rid of it by defining his functions in different modules...&#xD;&#xA;&#xD;&#xA;This post helped me a bit, and I think it is about the same problem&#xD;&#xA;https://stackoverflow.com/questions/47418124/enum-type-not-defined-at-runtime&#xD;&#xA;&#xD;&#xA;Thank you, and again if you have found the answer I would really like to have it" ContentLicense="CC BY-SA 4.0" />
  <row Id="41984" PostHistoryTypeId="5" PostId="10564" RevisionGUID="319e32d9-327b-467f-b45d-595f9d609aa6" CreationDate="2023-11-29T21:50:17.963" UserId="4972" Comment="added details" Text="if you have found an answer to your question, I would be glad to hear it :)&#xD;&#xA;&#xD;&#xA;Otherwise, I have the same issue and my research led me to believe it is because of a circular dependency import. Which I haven't found yet. Moreover I believe this caused the issue because a friend of mine got rid of it by defining his functions in different modules...&#xD;&#xA;&#xD;&#xA;This post helped me a bit, and I think it is about the same problem&#xD;&#xA;https://stackoverflow.com/questions/47418124/enum-type-not-defined-at-runtime&#xD;&#xA;&#xD;&#xA;Thank you, and again if you have found the answer I would really like to have it&#xD;&#xA;&#xD;&#xA;Edit : my error is  only :&#xD;&#xA;&gt; log : [Error: createType(ExtrinsicSignature):: Unable to create Enum via index 182, in Ed25519, Sr25519, Ecdsa]&#xD;&#xA;&#xD;&#xA;and according to my successive prints the error comes from here :&#xD;&#xA;const hash = await transfer.signAndSend(sender);&#xD;&#xA;&#xD;&#xA;where sender is a KeyringPair defined with a Mnemonic Seed&#xD;&#xA;The function signAndSend is causing the issue&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41985" PostHistoryTypeId="2" PostId="10565" RevisionGUID="f4cb2985-79f9-4e2f-9750-3b4e688438de" CreationDate="2023-11-29T23:19:04.330" UserId="3598" Text="Does adding a property to the end of a struct used in a storagemap require a storage migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41987" PostHistoryTypeId="1" PostId="10565" RevisionGUID="f4cb2985-79f9-4e2f-9750-3b4e688438de" CreationDate="2023-11-29T23:19:04.330" UserId="3598" Text="Does adding a property to the end of a struct require a storage migration?" ContentLicense="CC BY-SA 4.0" />
  <row Id="41988" PostHistoryTypeId="3" PostId="10565" RevisionGUID="f4cb2985-79f9-4e2f-9750-3b4e688438de" CreationDate="2023-11-29T23:19:04.330" UserId="3598" Text="|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="41989" PostHistoryTypeId="5" PostId="10564" RevisionGUID="b02a843e-8f06-4540-8865-109610a4e1c4" CreationDate="2023-11-29T23:51:50.257" UserId="4972" Comment="added 91 characters in body" Text="Edit : I changed @polkadot/api to version 10.10.1 in package.json and it is now working&#xD;&#xA;&#xD;&#xA;if you have found an answer to your question, I would be glad to hear it :)&#xD;&#xA;&#xD;&#xA;Otherwise, I have the same issue and my research led me to believe it is because of a circular dependency import. Which I haven't found yet. Moreover I believe this caused the issue because a friend of mine got rid of it by defining his functions in different modules...&#xD;&#xA;&#xD;&#xA;This post helped me a bit, and I think it is about the same problem&#xD;&#xA;https://stackoverflow.com/questions/47418124/enum-type-not-defined-at-runtime&#xD;&#xA;&#xD;&#xA;Thank you, and again if you have found the answer I would really like to have it&#xD;&#xA;&#xD;&#xA;Edit : my error is  only :&#xD;&#xA;&gt; log : [Error: createType(ExtrinsicSignature):: Unable to create Enum via index 182, in Ed25519, Sr25519, Ecdsa]&#xD;&#xA;&#xD;&#xA;and according to my successive prints the error comes from here :&#xD;&#xA;const hash = await transfer.signAndSend(sender);&#xD;&#xA;&#xD;&#xA;where sender is a KeyringPair defined with a Mnemonic Seed&#xD;&#xA;The function signAndSend is causing the issue&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="41990" PostHistoryTypeId="52" PostId="10558" RevisionGUID="5e1243f2-6d0f-46e9-97b8-e627fde85ae7" CreationDate="2023-11-30T02:05:20.447" />
  <row Id="41991" PostHistoryTypeId="2" PostId="10566" RevisionGUID="7817d102-6bbc-40f1-bd82-ebcd7e1f56b2" CreationDate="2023-11-30T02:06:38.320" UserId="251" Text="Of course. It changes the length.&#xD;&#xA;&#xD;&#xA;E.G. It can not decode a 6 bytes item from 4 bytes." ContentLicense="CC BY-SA 4.0" />
  <row Id="41993" PostHistoryTypeId="2" PostId="10567" RevisionGUID="f69adcb2-34f1-43b6-86a7-4dad84daf1be" CreationDate="2023-11-30T05:57:50.003" UserId="251" Text="This question feels like:&#xD;&#xA;- `3 * 3` vs `3^2`&#xD;&#xA;- `use sp_std::vec::Vec` vs `use alloc::vec::Vec`&#xD;&#xA;&#xD;&#xA;There's no particular reason.&#xD;&#xA;&#xD;&#xA;I prefer using `try_mutate` when I'm trying to enhance an existing code for `mutate`, in order to avoid an additional writing operation.&#xD;&#xA;&#xD;&#xA;`get`, `set` and `if-else` can also handle this.&#xD;&#xA;&#xD;&#xA;Both ways are fine; it simply depends on people's habits." ContentLicense="CC BY-SA 4.0" />
  <row Id="41995" PostHistoryTypeId="5" PostId="10567" RevisionGUID="662d13ec-df12-41a1-b1b2-b77f2fc846e7" CreationDate="2023-11-30T06:25:10.513" UserId="251" Comment="deleted 4 characters in body" Text="This question feels like:&#xD;&#xA;- `3 * 3` vs `3^2`&#xD;&#xA;- `use sp_std::vec::Vec` vs `use alloc::vec::Vec`&#xD;&#xA;&#xD;&#xA;There's no particular reason.&#xD;&#xA;&#xD;&#xA;I prefer using `try_mutate` when I'm trying to enhance an existing `mutate` code, in order to avoid an additional writing operation.&#xD;&#xA;&#xD;&#xA;`get`, `set` and `if-else` can also handle this.&#xD;&#xA;&#xD;&#xA;Both ways are fine; it simply depends on people's habits." ContentLicense="CC BY-SA 4.0" />
  <row Id="41996" PostHistoryTypeId="5" PostId="10567" RevisionGUID="8131a126-04c3-4ea2-a79a-df0def0ee963" CreationDate="2023-11-30T08:52:00.040" UserId="251" Comment="deleted 21 characters in body" Text="This question feels like:&#xD;&#xA;- `3 * 3` vs `3^2`&#xD;&#xA;- `use sp_std::vec::Vec` vs `use alloc::vec::Vec`&#xD;&#xA;&#xD;&#xA;There's no particular reason.&#xD;&#xA;&#xD;&#xA;I prefer using `try_mutate` when I'm trying to enhance an existing `mutate` code. That makes code more concise.&#xD;&#xA;&#xD;&#xA;`get`, `set` and `if-else` can also handle this.&#xD;&#xA;&#xD;&#xA;Both ways are fine; it simply depends on people's habits." ContentLicense="CC BY-SA 4.0" />
  <row Id="41997" PostHistoryTypeId="2" PostId="10568" RevisionGUID="f3fed2cd-022d-4f1c-8c91-7b004bee5c8a" CreationDate="2023-11-30T14:36:03.273" UserId="2005" Text="you can use [`getKeysPaged`][1] to get keys with pagination support&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/docs/blob/b1ec075f7d781ac9c5619e9c5ca7b4b4c845b3f8/docs/substrate/rpc.md?plain=1#L643" ContentLicense="CC BY-SA 4.0" />
  <row Id="41999" PostHistoryTypeId="50" PostId="7419" RevisionGUID="9cfa4c8c-1b8b-4cb1-928a-428151ad2a3f" CreationDate="2023-11-30T19:02:20.290" UserId="-1" />
  <row Id="42000" PostHistoryTypeId="2" PostId="10569" RevisionGUID="1d12ce9c-a699-4630-ad6b-9bf3baff6495" CreationDate="2023-11-30T19:09:33.377" UserId="74" Text="The Polkadot claims pallet verifies and extracts an ethereum address from an `EcdsaSignature`. Is there a similar implementation for doing this with an `Sr25519Signature` signed by a wallet using PolkadotJS?&#xD;&#xA;&#xD;&#xA;The API for PolkadotJS is below&#xD;&#xA;- https://polkadot.js.org/docs/keyring/start/sign-verify/&#xD;&#xA;&#xD;&#xA;I'm curious if there are examples for implementing this directly inside of a Substrate runtime. I would like to take a raw signature and extract the public key account for verification." ContentLicense="CC BY-SA 4.0" />
  <row Id="42002" PostHistoryTypeId="1" PostId="10569" RevisionGUID="1d12ce9c-a699-4630-ad6b-9bf3baff6495" CreationDate="2023-11-30T19:09:33.377" UserId="74" Text="How to parse a raw signature from PolkadotJS in Substrate runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="42003" PostHistoryTypeId="3" PostId="10569" RevisionGUID="1d12ce9c-a699-4630-ad6b-9bf3baff6495" CreationDate="2023-11-30T19:09:33.377" UserId="74" Text="|polkadot-js|runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42004" PostHistoryTypeId="50" PostId="9088" RevisionGUID="866edb90-2cd3-4da6-849f-b4d8f427353c" CreationDate="2023-11-30T20:07:10.840" UserId="-1" />
  <row Id="42005" PostHistoryTypeId="2" PostId="10570" RevisionGUID="abe35f18-ed17-475d-baef-79c30cb2b2c9" CreationDate="2023-12-01T03:02:38.843" UserId="4961" Text="[Backgrounds]&#xD;&#xA;&#xD;&#xA;I am working on &quot;ASTAR&quot; parachain scene(TestNet: Shibuya).&#xD;&#xA;&#xD;&#xA;I can sign message(unsigned-transaction) on offline environment and then broadcast signed-messaged(signed-transaction).&#xD;&#xA;When signing message, I used [&quot;signWith&quot; method][1] with keypair(keyring.addFromUri(mnemonic)).&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;[Issue]&#xD;&#xA;&#xD;&#xA;I need to sign message(unsigned-transaction) with private-key created by below [attached logic][2] on offline environment.&#xD;&#xA;&#xD;&#xA;But, I couldn't find out how to sign with that key.&#xD;&#xA;&#xD;&#xA;    import { mnemonicGenerate, cryptoWaitReady, mnemonicToMiniSecret, ed25519PairFromSeed } from '@polkadot/util-crypto';&#xD;&#xA;    import { hexToU8a, u8aToHex } from '@polkadot/util';&#xD;&#xA;    import * as ed from '@noble/ed25519';  // npm install @noble/ed25519@1.7 (2.0 doesn't support import via 'require')&#xD;&#xA;    &#xD;&#xA;    const generatePrivateKeys = async () =&gt; {&#xD;&#xA;    &#xD;&#xA;        const mnemonic = mnemonicGenerate(); // Creates a valid mnemonic string using using [BIP39]&#xD;&#xA;        console.log(`mnemonic : ${mnemonic}`);&#xD;&#xA;    &#xD;&#xA;        await cryptoWaitReady();&#xD;&#xA;    &#xD;&#xA;        const seed = mnemonicToMiniSecret(mnemonic);&#xD;&#xA;        console.log(`seed : ${seed}`);&#xD;&#xA;    &#xD;&#xA;        const { publicKey, secretKey } = ed25519PairFromSeed(seed);&#xD;&#xA;    &#xD;&#xA;        const seedToImport = hexToU8a(u8aToHex(secretKey).slice(2,66));&#xD;&#xA;        // console.log(&quot;initial seed :&quot;, u8aToHex(seedToImport));&#xD;&#xA;    &#xD;&#xA;        // Derive the Ed25519 key pair from the seed according to RFC-8032 (Section 5.1.5)&#xD;&#xA;        const hash = await ed.utils.sha512(seedToImport)	&#xD;&#xA;        let left = hash.slice(0,32)&#xD;&#xA;        left[0] &amp;= 248;&#xD;&#xA;        left[31] &amp;= 127;&#xD;&#xA;        left[31] |= 64;&#xD;&#xA;        const privateKeyToImport = modlLE(left);&#xD;&#xA;        const publicKeyToImport = ed.Point.BASE.multiply(privateKeyToImport);&#xD;&#xA;        console.log(&quot;private key :&quot;, privateKeyToImport.toString(16).padStart(64, '0'))&#xD;&#xA;        console.log(&quot;public key  :&quot;, Buffer.from(publicKeyToImport.toRawBytes()).toString(&quot;hex&quot;))&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function mod(a, b) {&#xD;&#xA;        const res = a % b;&#xD;&#xA;        return res &gt;= BigInt(0) ? res : b + res;&#xD;&#xA;    }&#xD;&#xA;    function bytesToNumberLE(uint8a) {&#xD;&#xA;        if (!(uint8a instanceof Uint8Array))&#xD;&#xA;            throw new Error('Expected Uint8Array');&#xD;&#xA;        return BigInt('0x' + bytesToHex(Uint8Array.from(uint8a).reverse()));&#xD;&#xA;    }&#xD;&#xA;    function modlLE(hash) {&#xD;&#xA;        return mod(bytesToNumberLE(hash), ed.CURVE.l);&#xD;&#xA;    }&#xD;&#xA;    const hexes = Array.from({ length: 256 }, (v, i) =&gt; i.toString(16).padStart(2, '0'));&#xD;&#xA;    function bytesToHex(uint8a) {&#xD;&#xA;        if (!(uint8a instanceof Uint8Array))&#xD;&#xA;            throw new Error('Uint8Array expected');&#xD;&#xA;        let hex = '';&#xD;&#xA;        for (let i = 0; i &lt; uint8a.length; i++) {&#xD;&#xA;            hex += hexes[uint8a[i]];&#xD;&#xA;        }&#xD;&#xA;        return hex;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    generatePrivateKeys().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;[Questions]&#xD;&#xA;&#xD;&#xA;Q1) Is it possible to sign a message with private key?&#xD;&#xA;&#xD;&#xA;Q1-1) If so, can I get some reference contents or sample code?&#xD;&#xA;&#xD;&#xA;Q1-2) If not, is it need to convert private key or another methods? &#xD;&#xA;&#xD;&#xA;Q2) Where can I get some technical-information about cryptography on polkadot? Substate? or Parity?&#xD;&#xA;&#xD;&#xA;Thanks~&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/txwrapper-core/blob/1bd1b383802dd98f10c8e299e97b1c1b97c809ac/packages/txwrapper-examples/common/util.ts#L49&#xD;&#xA;  [2]: https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.5" ContentLicense="CC BY-SA 4.0" />
  <row Id="42007" PostHistoryTypeId="1" PostId="10570" RevisionGUID="abe35f18-ed17-475d-baef-79c30cb2b2c9" CreationDate="2023-12-01T03:02:38.843" UserId="4961" Text="How to sign with private key(Not secret key) that was created by &quot;RFC-8032&quot;(described below contents) on online?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42008" PostHistoryTypeId="3" PostId="10570" RevisionGUID="abe35f18-ed17-475d-baef-79c30cb2b2c9" CreationDate="2023-12-01T03:02:38.843" UserId="4961" Text="|astar|key|signing|cryptography|keyring|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42009" PostHistoryTypeId="2" PostId="10571" RevisionGUID="bd515c6d-d10f-4593-af33-35d562250d9e" CreationDate="2023-12-01T03:51:31.803" UserId="3598" Text="I'm trying to migrate the events storage value of the frame_system pallet, this is required  because the EventRecord is now generic over RuntimeEvent instead of Event, but I'm not sure of how to go about it as I don't now where the RuntimeEvent and Event types are defined. Has anyone performed this migration?&#xD;&#xA;&#xD;&#xA;Thanks," ContentLicense="CC BY-SA 4.0" />
  <row Id="42011" PostHistoryTypeId="1" PostId="10571" RevisionGUID="bd515c6d-d10f-4593-af33-35d562250d9e" CreationDate="2023-12-01T03:51:31.803" UserId="3598" Text="how to migrate events from the frame_system pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42012" PostHistoryTypeId="3" PostId="10571" RevisionGUID="bd515c6d-d10f-4593-af33-35d562250d9e" CreationDate="2023-12-01T03:51:31.803" UserId="3598" Text="|storage-migration|frame-system|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42013" PostHistoryTypeId="2" PostId="10572" RevisionGUID="918cd4e0-1534-4948-855b-267d5261ac04" CreationDate="2023-12-01T05:45:52.110" UserId="354" Text="&gt; Where can I get some technical-information about cryptography on&#xD;&#xA;&gt; polkadot? Substate? or Parity?&#xD;&#xA;&#xD;&#xA;You can read the following resources to understand polkadot cryptography:&#xD;&#xA;[https://wiki.polkadot.network/docs/learn-cryptography][1]&#xD;&#xA;&#xD;&#xA;[https://research.web3.foundation/crypto][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-cryptography&#xD;&#xA;  [2]: https://research.web3.foundation/crypto" ContentLicense="CC BY-SA 4.0" />
  <row Id="42015" PostHistoryTypeId="5" PostId="6850" RevisionGUID="493e5c98-66ad-47d7-acd4-85a534171baa" CreationDate="2023-12-01T07:04:43.027" UserId="116" Comment="Spelling dont -&gt; don't" Text="You can use criterion to benchmark your pallets code. So far we only did this outside of WASM, but now it could be interesting to do inside WASM.  &#xD;&#xA;&#xD;&#xA;Fundamentally there are two ways to benchmark:&#xD;&#xA;- Using the FRAME macros to benchmark your no-std runtime code which results in a `weights.rs`&#xD;&#xA;- Using something else, like `criterion` to optimize your code. It is currently not possible to use `criterion` to generate weights.&#xD;&#xA;&#xD;&#xA;So far we never mixed the two. I'm not sure what your goal is here, but if you just want to optimize your code, you could factor it out into `do_` functions like `do_mul_affine_g2_bls12_377_optimized` and then benchmark that instead. Then you wont need the `new_test_ext` and the storage caching that happens in there. Could be that this messes with your results.    &#xD;&#xA;In most cases you don't want them to be calls anyway; for example `mul_projective_ed_on_bls12_381` is an arithmetic function and not a call.&#xD;&#xA;&#xD;&#xA;Removing the externalities and directly calling an internal function results in this:  &#xD;&#xA;```pre&#xD;&#xA;mul_affine_g2_bls12_377/mul_affine_g2_bls12_377&#xD;&#xA;                        time:   [1.3610 µs 1.3616 µs 1.3621 µs]&#xD;&#xA;                        change: [-98.790% -98.775% -98.761%] (p = 0.00 &lt; 0.05)&#xD;&#xA;                        Performance has improved.&#xD;&#xA;Found 1 outliers among 100 measurements (1.00%)&#xD;&#xA;  1 (1.00%) high severe&#xD;&#xA;```&#xD;&#xA;The optimized version still seems a lot slower " ContentLicense="CC BY-SA 4.0" />
  <row Id="42016" PostHistoryTypeId="5" PostId="5863" RevisionGUID="e89ece8b-2d64-4fd7-b158-ab5553edb886" CreationDate="2023-12-01T07:06:24.647" UserId="116" Comment="Spelling dont -&gt; don't" Text="I don't think the hosted Polkadot JS UI supports Custom RPCs.&#xD;&#xA;&#xD;&#xA;You need to follow the instructions for defining custom RPCs when initializing your own Polkadot JS instance as documented [here](https://polkadot.js.org/docs/api/start/rpc.custom)&#xD;&#xA;&#xD;&#xA;&gt; ## Custom definitions&#xD;&#xA;&gt; &#xD;&#xA;&gt; RPCs are exposed as a method on a specific module. This means that&#xD;&#xA;&gt; once available: you can call any rpc via&#xD;&#xA;&gt; `api.rpc.&lt;module&gt;.&lt;method&gt;(...params[])`. For example, you can define&#xD;&#xA;&gt; a `firstModule_testMethod` on the Rust node and if correctly defined&#xD;&#xA;&gt; it will be callable via `api.rpc.firstModule.testMethod(...`). To&#xD;&#xA;&gt; supply custom RPC methods, you provide an `rpc` object on the options&#xD;&#xA;&gt; to the API.&#xD;&#xA;&gt; &#xD;&#xA;&gt; ```js&#xD;&#xA;&gt; ...&#xD;&#xA;&gt; const api = await ApiPromise.create({&#xD;&#xA;&gt;    rpc: {&#xD;&#xA;&gt;     firstModule: {&#xD;&#xA;&gt;       testMethod: {&#xD;&#xA;&gt;         description: 'Just a test method',&#xD;&#xA;&gt;         params: [&#xD;&#xA;&gt;           {&#xD;&#xA;&gt;             name: 'index',&#xD;&#xA;&gt;             type: 'u64'&#xD;&#xA;&gt;           },&#xD;&#xA;&gt;           {&#xD;&#xA;&gt;             name: 'at',&#xD;&#xA;&gt;             type: 'Hash',&#xD;&#xA;&gt;             isOptional: true&#xD;&#xA;&gt;           }&#xD;&#xA;&gt;         ],&#xD;&#xA;&gt;         type: 'Balance'&#xD;&#xA;&gt;       },&#xD;&#xA;&gt;       anotherMethod: { ... },&#xD;&#xA;&gt;       ...&#xD;&#xA;&gt;     },&#xD;&#xA;&gt;     anotherModule: { ... },&#xD;&#xA;&gt;     ...   },&#xD;&#xA;&gt;   ... });&#xD;&#xA;&gt; ```&#xD;&#xA;&gt;&#xD;&#xA;&gt; In the above example we have defined a new method, which is now&#xD;&#xA;&gt; available on the API as `api.rpc.firstModule.testMethod(index: u64,&#xD;&#xA;&gt; at?: Hash) =&gt; Promise&lt;Balance&gt;`. For the optional parameters, we added&#xD;&#xA;&gt; `isOptional: true` alongside the `name` &amp; `type` in the parameter&#xD;&#xA;&gt; definition.&#xD;&#xA;&gt; &#xD;&#xA;&gt; Even if you define the method it will only appear on the API if it&#xD;&#xA;&gt; appears in the list returned by `api.rpc.rpc.methods()`, which is the&#xD;&#xA;&gt; list of known RPCs the node exposes. So when making changes to the&#xD;&#xA;&gt; node you should double-check that it does announce the RPC method and&#xD;&#xA;&gt; that it conforms to the format `&lt;module&gt;_&lt;method&gt;`.  For example&#xD;&#xA;&gt; `foo_bar` is a valid name whereas `bar` is not. I.E. Methods which do&#xD;&#xA;&gt; not contain both a `module` and `method` component won't be detected&#xD;&#xA;&gt; and cannot be decorated. If in doubt, follow the conventions in&#xD;&#xA;&gt; Substrate master." ContentLicense="CC BY-SA 4.0" />
  <row Id="42017" PostHistoryTypeId="5" PostId="10570" RevisionGUID="8574a7d0-6436-4f4c-a653-c6f51c0968e6" CreationDate="2023-12-01T07:42:04.197" UserId="354" Comment="improved formatting" Text="**Backgrounds**&#xD;&#xA;&#xD;&#xA;I am working on &quot;ASTAR&quot; parachain scene(TestNet: Shibuya).&#xD;&#xA;&#xD;&#xA;I can sign message(unsigned-transaction) on offline environment and then broadcast signed-messaged(signed-transaction).&#xD;&#xA;When signing message, I used [&quot;signWith&quot; method][1] with keypair(keyring.addFromUri(mnemonic)).&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;**Issue**&#xD;&#xA;&#xD;&#xA;I need to sign message(unsigned-transaction) with private-key created by below [attached logic][2] on offline environment.&#xD;&#xA;&#xD;&#xA;But, I couldn't find out how to sign with that key.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;    import { mnemonicGenerate, cryptoWaitReady, mnemonicToMiniSecret, ed25519PairFromSeed } from '@polkadot/util-crypto';&#xD;&#xA;    import { hexToU8a, u8aToHex } from '@polkadot/util';&#xD;&#xA;    import * as ed from '@noble/ed25519';  // npm install @noble/ed25519@1.7 (2.0 doesn't support import via 'require')&#xD;&#xA;    &#xD;&#xA;    const generatePrivateKeys = async () =&gt; {&#xD;&#xA;    &#xD;&#xA;        const mnemonic = mnemonicGenerate(); // Creates a valid mnemonic string using using [BIP39]&#xD;&#xA;        console.log(`mnemonic : ${mnemonic}`);&#xD;&#xA;    &#xD;&#xA;        await cryptoWaitReady();&#xD;&#xA;    &#xD;&#xA;        const seed = mnemonicToMiniSecret(mnemonic);&#xD;&#xA;        console.log(`seed : ${seed}`);&#xD;&#xA;    &#xD;&#xA;        const { publicKey, secretKey } = ed25519PairFromSeed(seed);&#xD;&#xA;    &#xD;&#xA;        const seedToImport = hexToU8a(u8aToHex(secretKey).slice(2,66));&#xD;&#xA;        // console.log(&quot;initial seed :&quot;, u8aToHex(seedToImport));&#xD;&#xA;    &#xD;&#xA;        // Derive the Ed25519 key pair from the seed according to RFC-8032 (Section 5.1.5)&#xD;&#xA;        const hash = await ed.utils.sha512(seedToImport)	&#xD;&#xA;        let left = hash.slice(0,32)&#xD;&#xA;        left[0] &amp;= 248;&#xD;&#xA;        left[31] &amp;= 127;&#xD;&#xA;        left[31] |= 64;&#xD;&#xA;        const privateKeyToImport = modlLE(left);&#xD;&#xA;        const publicKeyToImport = ed.Point.BASE.multiply(privateKeyToImport);&#xD;&#xA;        console.log(&quot;private key :&quot;, privateKeyToImport.toString(16).padStart(64, '0'))&#xD;&#xA;        console.log(&quot;public key  :&quot;, Buffer.from(publicKeyToImport.toRawBytes()).toString(&quot;hex&quot;))&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    function mod(a, b) {&#xD;&#xA;        const res = a % b;&#xD;&#xA;        return res &gt;= BigInt(0) ? res : b + res;&#xD;&#xA;    }&#xD;&#xA;    function bytesToNumberLE(uint8a) {&#xD;&#xA;        if (!(uint8a instanceof Uint8Array))&#xD;&#xA;            throw new Error('Expected Uint8Array');&#xD;&#xA;        return BigInt('0x' + bytesToHex(Uint8Array.from(uint8a).reverse()));&#xD;&#xA;    }&#xD;&#xA;    function modlLE(hash) {&#xD;&#xA;        return mod(bytesToNumberLE(hash), ed.CURVE.l);&#xD;&#xA;    }&#xD;&#xA;    const hexes = Array.from({ length: 256 }, (v, i) =&gt; i.toString(16).padStart(2, '0'));&#xD;&#xA;    function bytesToHex(uint8a) {&#xD;&#xA;        if (!(uint8a instanceof Uint8Array))&#xD;&#xA;            throw new Error('Uint8Array expected');&#xD;&#xA;        let hex = '';&#xD;&#xA;        for (let i = 0; i &lt; uint8a.length; i++) {&#xD;&#xA;            hex += hexes[uint8a[i]];&#xD;&#xA;        }&#xD;&#xA;        return hex;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    generatePrivateKeys().catch(console.error).finally(() =&gt; process.exit());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;**Questions**&#xD;&#xA;&#xD;&#xA;Q1) Is it possible to sign a message with private key?&#xD;&#xA;&#xD;&#xA;Q1-1) If so, can I get some reference contents or sample code?&#xD;&#xA;&#xD;&#xA;Q1-2) If not, is it need to convert private key or another methods? &#xD;&#xA;&#xD;&#xA;Q2) Where can I get some technical-information about cryptography on polkadot? Substate? or Parity?&#xD;&#xA;&#xD;&#xA;Thanks~&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/txwrapper-core/blob/1bd1b383802dd98f10c8e299e97b1c1b97c809ac/packages/txwrapper-examples/common/util.ts#L49&#xD;&#xA;  [2]: https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.5" ContentLicense="CC BY-SA 4.0" />
  <row Id="42018" PostHistoryTypeId="24" PostId="10570" RevisionGUID="8574a7d0-6436-4f4c-a653-c6f51c0968e6" CreationDate="2023-12-01T07:42:04.197" Comment="Proposed by 354 approved by 4961 edit id of 614" ContentLicense="CC BY-SA 4.0" />
  <row Id="42019" PostHistoryTypeId="2" PostId="10573" RevisionGUID="ad9f44d2-0022-4417-b975-c807720ab8e1" CreationDate="2023-12-01T12:08:04.783" UserId="1757" Text="this key previously worked with Kusama until the recent metadata update (with beefy key)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const keys = await api.query.session.nextKeys(address.address);&#xD;&#xA;const keysHex = keys.toHex();&#xD;&#xA;const result = await api.rpc.author.hasSessionKeys(keysHex);&#xD;&#xA;const normalizedResult = result.toPrimitive();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But now this always returns false for Kusama (still works for chain Polkadot). If I check specific subkeys with hasKeys (like the new beefy), it returns true. Would you know what I would need to change for this to work with the new version of Kusama/Polkadot-SDK?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42021" PostHistoryTypeId="1" PostId="10573" RevisionGUID="ad9f44d2-0022-4417-b975-c807720ab8e1" CreationDate="2023-12-01T12:08:04.783" UserId="1757" Text="Kusama 1.2 - How to associate stash accounts with host via RPC/JS/shell" ContentLicense="CC BY-SA 4.0" />
  <row Id="42022" PostHistoryTypeId="3" PostId="10573" RevisionGUID="ad9f44d2-0022-4417-b975-c807720ab8e1" CreationDate="2023-12-01T12:08:04.783" UserId="1757" Text="|polkadot-js|kusama|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42023" PostHistoryTypeId="5" PostId="6760" RevisionGUID="f9b32a4f-e700-4c89-be32-5e0c9472a235" CreationDate="2023-12-01T14:58:09.577" UserId="116" Comment="Spelling dont -&gt; don't" Text="Good question!&#xD;&#xA;&#xD;&#xA;Just reducing the bound will indeed result in a decoding error. It will behave like any other decode error; not panic but either return `None` or `Default` depending on whether you are using `OptionQuery` or `ValueQuery`.  &#xD;&#xA;If you want to properly reduce the bound, you have to truncate the vector in a migration to ensure that it will fit into the new bound. `BoundedBtreeMap` and `BoundedBtreeSet` behave likewise.  &#xD;&#xA;There also is `WeakBoundedVec`, but that is of limited usefulness for cases where you are unsure about the bound, since it will decode anyway.&#xD;&#xA;&#xD;&#xA;The reason to have `BoundedVec` in the first place is to know how much data we have to read from storage in the worst case.  &#xD;&#xA;The worst-case of `BoundedVec&lt;T, L&gt;` would be about `T::max_encoded_len() * L::get()` (excluding its prefixed length).  This is important to calculate pre-dispatch PoV weights (chromatic weights, aka Weights V2).&#xD;&#xA;Now currently the logic for reading a `BoundedVec` does actually not enforce it, since it first decodes and then throws the vector away if it is too long. It would be better to only read the length first and check.  &#xD;&#xA;Anyway, in short; It can be used to restrict some theoretical worst cases since `Vec` *could* have up to `usize::MAX` elements.  &#xD;&#xA;So for now it probably does not make much difference if you use `Weak` or not, since `Weak` and `Bounded` both don't *really* enforce the worst case, but in the future `Bounded` hopefully will.  &#xD;&#xA;IMHO it is just better practice to use `Bounded`, but I see that it very dangerous in some cases and requires much attention not to brick a chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="42024" PostHistoryTypeId="5" PostId="6135" RevisionGUID="cb85c6b4-5617-4bd5-b262-94b54136d49a" CreationDate="2023-12-01T14:58:30.463" UserId="116" Comment="Spelling dont -&gt; don't" Text="Yes. You need to include the migrations into the `Executive` type of your runtime.  &#xD;&#xA;The pallet itself can also have a `on_runtime_upgrade` hook, but normally we don't use that anymore.  &#xD;&#xA;&#xD;&#xA;Migrations now use the [OnRuntimeUpgrade](https://github.com/paritytech/substrate/blob/8161ee1aa1ccd122150e40a8aef23df3d0a16d02/frame/support/src/traits/hooks.rs#L125) trait which allows for better testing. For a relay chain it could be fine to run all migrations automatically, but for a para-chain you need to consider the block weight limit.  &#xD;&#xA;If you just run all migrations in the same block per default without means of preventing it; it could result in an over-weight block.&#xD;&#xA;&#xD;&#xA;But it is probably a good idea to add some automatic testing that checks that all migrations are included -  or at least going to be included soon." ContentLicense="CC BY-SA 4.0" />
  <row Id="42025" PostHistoryTypeId="5" PostId="6102" RevisionGUID="891d70a1-6e81-468f-8d45-39d79c26250e" CreationDate="2023-12-01T14:59:09.460" UserId="116" Comment="Spelling dont -&gt; don't" Text="You can use the [`StorageNoopGuard`](https://paritytech.github.io/substrate/master/frame_support/storage/storage_noop_guard/struct.StorageNoopGuard.html) to assert that your storage changes sum up to a No-OP.  &#xD;&#xA;This does the same as [`assert_storage_noop!`](https://paritytech.github.io/substrate/master/frame_support/macro.assert_storage_noop.html) but for a code block. It is not measuring the state size, but comparing the root hash of the Trie. This exactly tells us whether something changed.  &#xD;&#xA;As example:  &#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn cleanup_works() {&#xD;&#xA;	use frame_support::{StorageNoopGuard, storage::unhashed::*};&#xD;&#xA;&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		let _guard = StorageNoopGuard::default();&#xD;&#xA;		&#xD;&#xA;		// Here you are modifying the storage.&#xD;&#xA;		put(b&quot;key&quot;, b&quot;value&quot;);&#xD;&#xA;		// And here is the cleanup - which you did not forget ;)&#xD;&#xA;		kill(b&quot;key&quot;);&#xD;&#xA;		// The guard will not panic because the state did not change since its construction.&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;It works by calculating the storage root has in the beginning with `storage_root(StateVersion::V1)` and then again in the end. The state did not change iff they are equal.  &#xD;&#xA;You can change the key in `kill` to `b&quot;key1&quot;` to simulate an error and see it fail with:  &#xD;&#xA;```pre&#xD;&#xA;thread 'tests::cleanup_works' panicked at 'assertion failed: `(left == right)`&#xD;&#xA;  left: `[124, 55, 174, 141, 90, 56, 20, 107, 57, 116, 85, 28, 128, 109, 139, 53, 156, 61, 56, 117, 109, 227, 115, 247, 235, 180, 147, 215, 81, 174, 223, 144]`,&#xD;&#xA; right: `[235, 68, 37, 78, 47, 204, 154, 99, 92, 28, 105, 55, 55, 229, 121, 115, 249, 23, 80, 192, 245, 244, 195, 146, 103, 68, 36, 175, 217, 246, 86, 194]`:&#xD;&#xA;StorageNoopGuard detected wrongful storage changes.'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I don't think there is a nice state-differ available in FRAME. But it could be done, by storing all keys and traversing the tree and following the differing keys.&#xD;&#xA;&#xD;&#xA;PS: I think these stale-state errors happen the easiest when the pallet is refactored, not when it is originally created. Anyway, probably better than not doing it." ContentLicense="CC BY-SA 4.0" />
  <row Id="42026" PostHistoryTypeId="5" PostId="6040" RevisionGUID="46890ff7-7dd9-43ec-ade5-a91f72925a66" CreationDate="2023-12-01T14:59:26.303" UserId="116" Comment="Spelling dont -&gt; don't" Text="You can get the on-chain time from the timestamp pallet with `Timestamp::now()`.  &#xD;&#xA;But this does not make sense for benchmarking. Benchmarks and their code run in WASM no-std. There are two ways this goes:  &#xD;&#xA;&#xD;&#xA;- Your code is `std`:&#xD;&#xA;The code will therefore never be part of the runtime. Use criterion or any other benchmarking library you like and optimize it.&#xD;&#xA;- Your code is `no-std`:&#xD;&#xA;This part is covered by `FRAME` benchmarking. It records timestamps before and after executing the WASM code and calculates the weight of it.&#xD;&#xA;&#xD;&#xA;So I don't see why you want mix `std` timestamps + `FRAME` benchmarking.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42027" PostHistoryTypeId="5" PostId="5562" RevisionGUID="ac1ed726-157e-4ca1-a978-5f91ab4bdcc9" CreationDate="2023-12-01T14:59:44.283" UserId="116" Comment="Spelling dont -&gt; don't" Text="It is perfectly fine to emit events from `on_initialize`/`on_finalize`. These events get tagged with a different phase. Normally events have phase `ApplyExtrinsic(ext_id)` but here they get `Initialization` and `Finalization` respectively. Just something to look out for in the frontend.&#xD;&#xA;&#xD;&#xA;&gt; Also what is more efficient a) emit burst of 1000 events or b) combine events information in a large Vec&lt;&gt; and then send it wrapping in an event?&#xD;&#xA;&#xD;&#xA;Efficient in what way? Events are a vector in storage to which each new one is appended.  &#xD;&#xA;I would probably just go with the standard approach of *one event per event* to keep the code simple, but I don't think there is a general downside of large events." ContentLicense="CC BY-SA 4.0" />
  <row Id="42028" PostHistoryTypeId="5" PostId="5561" RevisionGUID="eaf59e10-336b-4510-be74-04c298aaf67e" CreationDate="2023-12-01T15:00:10.820" UserId="116" Comment="Spelling dont -&gt; don't" Text="&gt; We faced a situation the other day where we needed some result of std operations inside of our benchmarks.&#xD;&#xA;&#xD;&#xA;There is two ways this goes:  &#xD;&#xA;- It runs in the runtime and is therefore no-std: Use the pallet benchmarking.&#xD;&#xA;- It is std and does not run in the runtime: Use some other benchmarking tools like criterion. However I don't see where this could be needed, since pallet benchmarks cover everything that is normally needed.&#xD;&#xA;&#xD;&#xA;&gt; I imagine there are plenty of other use cases for performing operations depending on std though.&#xD;&#xA;&#xD;&#xA;No. Since the runtime is entirely no-std and the benchmarks only cover on-chain code.  &#xD;&#xA;The only exception is the setup phase, where it would be reasonable to have no-std access for convenience. Otherwise all setup code needs to be no-std as well which is annoying.&#xD;&#xA;&#xD;&#xA;&gt; Specifically, we were looking to generate key pairs and signatures from types given by app_crypto!(Pair and Signature).&#xD;&#xA;&#xD;&#xA;I don't understand why you generate key-pairs on-chain. These are public for everyone to see." ContentLicense="CC BY-SA 4.0" />
  <row Id="42029" PostHistoryTypeId="5" PostId="4387" RevisionGUID="7d55ff98-5b41-4a93-92f4-6a6b098308cf" CreationDate="2023-12-01T15:01:58.823" UserId="116" Comment="Spelling dont -&gt; don't" Text="Offchain workers modify storage by submitting a txn. And the order of execution is Offchain worker does  not interfere with other txn and they are run on block importation. &#xD;&#xA;&#xD;&#xA;The other hooks run on block formation, So on_initialize is when a block is prepared and initialized and then transactions ( so if offchain worker submitted a txn to the pool the txn will be executed). &#xD;&#xA;&#xD;&#xA;But offchain workers don't follow that order, because it is made to not interfere with the normal txn execution flow. " ContentLicense="CC BY-SA 4.0" />
  <row Id="42030" PostHistoryTypeId="5" PostId="4381" RevisionGUID="c36631e3-8f86-455c-9d99-6ab594c162a9" CreationDate="2023-12-01T15:03:11.840" UserId="116" Comment="Formating" Text="I want to use hooks for some  business  logic, but I'm not very familiar with the usage of `on_initialize`, `on_finialize` and `offchain_worker`. Can all of them modify the on chain storage? If yes, what is the order?&#xD;&#xA;&#xD;&#xA;I guess so&#xD;&#xA;&#xD;&#xA; 1. a node import a block&#xD;&#xA; 2. execute `offchain_worker`&#xD;&#xA; 3. execute `on_initialize`&#xD;&#xA; 4. execute all the extrinsics in the block&#xD;&#xA; 5. execute `on_finalize`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Am I right?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42031" PostHistoryTypeId="5" PostId="4386" RevisionGUID="43f1f5d5-cd9a-4591-ace6-9c7d12695f37" CreationDate="2023-12-01T15:05:42.607" UserId="116" Comment="Spelling can not -&gt; cannot" Text="The order is the following:&#xD;&#xA;&#xD;&#xA;1. A node imports/start building a block:&#xD;&#xA; - `on_initialize` is called for all Pallets in the runtime.&#xD;&#xA; - All extrinsics are executed/applied.&#xD;&#xA; - `on_finalize` is called for all Pallets in the runtime.&#xD;&#xA;&#xD;&#xA;2. Import/Block building is finished:&#xD;&#xA; - `offchain_worker` is called.&#xD;&#xA;&#xD;&#xA;Any changes the offchain worker is doing, cannot be seen by the on chain logic. Any change to the on chain state must happen inside a block. The offchain worker has its own offchain storage for read + write and can also read the on chain storage. The onchain logic can use the offchain indexing functionality to store special data that is only readable by offchain workers and is not part of the on chain state. " ContentLicense="CC BY-SA 4.0" />
  <row Id="42032" PostHistoryTypeId="5" PostId="6424" RevisionGUID="febd15be-eb83-4bc6-b524-f93721411abd" CreationDate="2023-12-01T15:08:27.077" UserId="116" Comment="Spellcheck and language" Text="I'm trying to deploy INK 4.0 smart contract with cargo-contract 2.0 beta to a network but I'm getting the following error ```contracts.CodeRejected```.&#xD;&#xA;&#xD;&#xA;Whenever i try to upload the contract to my local substrate node I'm getting the following error:&#xD;&#xA;```StorageDepositLimitExhausted, More storage was created than allowed by the storage deposit limit.```&#xD;&#xA;&#xD;&#xA;As mentioned, I'm using INK 4.0 beta and cargo-contracts 2.0 beta.&#xD;&#xA;I've tried compiling the following ways:&#xD;&#xA;&#xD;&#xA; * `cargo contract build --optimization-passes=0`&#xD;&#xA;&#xD;&#xA; * `cargo contract build`&#xD;&#xA;&#xD;&#xA;I'm using MacBook pro M1 pro chip using MacOs Ventura (13.0.1 (22A400)) &#xD;&#xA;&#xD;&#xA;Thank you very much :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42033" PostHistoryTypeId="5" PostId="6440" RevisionGUID="aa873a6b-8482-4289-98e3-f5049eced044" CreationDate="2023-12-01T15:08:55.880" UserId="116" Comment="Spellcheck and language" Text="The network I'm trying to deploy the contract to is not supporting `INK! 4.0 beta` yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="42034" PostHistoryTypeId="5" PostId="6100" RevisionGUID="e03511c3-9bf7-4de9-b69b-590dd5747e3d" CreationDate="2023-12-01T15:11:59.833" UserId="116" Comment="Code blocks and i-&gt;I" Text="I'm writing a custom `BlockImport` and I need to decode the transactions within the block,as we know a transaction is simply a pallet method call for example `store_value(value)`, but at the point where I'm verifying a block all I got is `OpaqueExtrinsic` which is the transaction encoded.&#xD;&#xA;&#xD;&#xA;How can I take that extrinsic and retrieve the parameter `value` that was passed when the user called my pallet extrinsic `store_value(value)`?&#xD;&#xA;&#xD;&#xA;Extra:&#xD;&#xA;in the following code I'm just iterating over all the block extrinsics:&#xD;&#xA;&#xD;&#xA;    if let Some(block_extrinsics) = &amp;block.body {&#xD;&#xA;        let mut block_extrinsics = block_extrinsics.iter();&#xD;&#xA;    	block_extrinsics.next();&#xD;&#xA;    	for extrinsic in block_extrinsics {&#xD;&#xA;    		     // what to do next ¯\_(ツ)_/¯&#xD;&#xA;        }&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="42035" PostHistoryTypeId="5" PostId="7013" RevisionGUID="4826726a-0a0d-4622-b397-5fb16069a215" CreationDate="2023-12-01T15:14:25.407" UserId="116" Comment="Spellcheck and language Im -&gt; I'm" Text="I'm thinking which events/calls (or whatever) should I take into account to get a number of staked in the protocol? I did this exercise for Reef protocol (but this should be similar for all Substrate protocols) based on 'Staking.Bonded' and 'Staking.Withdrawn' events, but my number does not match with a presented on [the reef protocol subscan - 6.2B ](https://reef.subscan.io/validator). I would like to be able to calculate this metric on a wallet level in the future incl. historical values that's why I'm trying to do it based on events. &#xD;&#xA;&#xD;&#xA;In other words, which events are responsible for increasing a number of staked tokens and which ones decrease this value? " ContentLicense="CC BY-SA 4.0" />
  <row Id="42036" PostHistoryTypeId="5" PostId="5968" RevisionGUID="5d4fe95e-10b5-40ec-9483-c69529cf9ae1" CreationDate="2023-12-01T15:16:38.853" UserId="116" Comment="Spellcheck and language" Text="I'm met with an error when running this command `cargo build --release` on [substrate-note-template](https://github.com/substrate-developer-hub/substrate-node-template). &#xD;&#xA;&#xD;&#xA;I haven't really done anything other than `git clone` to my directory and executed the cargo build mentioned above.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `tikv-jemalloc-sys v0.5.2+5.3.0-patched`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-166d53d735a1d9b3/build-script-build` (exit status: 101)&#xD;&#xA;  --- stdout&#xD;&#xA;  TARGET=x86_64-unknown-linux-gnu&#xD;&#xA;  HOST=x86_64-unknown-linux-gnu&#xD;&#xA;  NUM_JOBS=8&#xD;&#xA;  OUT_DIR=&quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out&quot;&#xD;&#xA;  BUILD_DIR=&quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build&quot;&#xD;&#xA;  SRC_DIR=&quot;/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.5.2+5.3.0-patched&quot;&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_OVERRIDE&#xD;&#xA;  OPT_LEVEL = Some(&quot;3&quot;)&#xD;&#xA;  TARGET = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  HOST = Some(&quot;x86_64-unknown-linux-gnu&quot;)&#xD;&#xA;  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu&#xD;&#xA;  CC_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu&#xD;&#xA;  CC_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CC&#xD;&#xA;  HOST_CC = None&#xD;&#xA;  cargo:rerun-if-env-changed=CC&#xD;&#xA;  CC = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu&#xD;&#xA;  CFLAGS_x86_64-unknown-linux-gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu&#xD;&#xA;  CFLAGS_x86_64_unknown_linux_gnu = None&#xD;&#xA;  cargo:rerun-if-env-changed=HOST_CFLAGS&#xD;&#xA;  HOST_CFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CFLAGS&#xD;&#xA;  CFLAGS = None&#xD;&#xA;  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS&#xD;&#xA;  CRATE_CC_NO_DEFAULTS = None&#xD;&#xA;  DEBUG = Some(&quot;false&quot;)&#xD;&#xA;  CARGO_CFG_TARGET_FEATURE = Some(&quot;fxsr,sse,sse2&quot;)&#xD;&#xA;  CC=&quot;cc&quot;&#xD;&#xA;  CFLAGS=&quot;-O3 -ffunction-sections -fdata-sections -fPIC -m64 -Wall&quot;&#xD;&#xA;  JEMALLOC_REPO_DIR=&quot;jemalloc&quot;&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_MALLOC_CONF&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_PAGE&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_HUGEPAGE&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_QUANTUM&#xD;&#xA;  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_VADDR&#xD;&#xA;  running: &quot;sh&quot; &quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/configure&quot; &quot;--disable-cxx&quot; &quot;--enable-doc=no&quot; &quot;--enable-shared=no&quot; &quot;--with-private-namespace=_rjem_&quot; &quot;--host=x86_64-unknown-linux-gnu&quot; &quot;--build=x86_64-unknown-linux-gnu&quot; &quot;--prefix=/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out&quot;&#xD;&#xA;  running: &quot;tail&quot; &quot;-n&quot; &quot;100&quot; &quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/config.log&quot;&#xD;&#xA;  XSLROOT=''&#xD;&#xA;  XSLTPROC=''&#xD;&#xA;  a=''&#xD;&#xA;  abi=''&#xD;&#xA;  abs_objroot='/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/'&#xD;&#xA;  abs_srcroot='/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/'&#xD;&#xA;  ac_ct_CC=''&#xD;&#xA;  ac_ct_CXX=''&#xD;&#xA;  bindir='${exec_prefix}/bin'&#xD;&#xA;  build='x86_64-unknown-linux-gnu'&#xD;&#xA;  build_alias='x86_64-unknown-linux-gnu'&#xD;&#xA;  build_cpu=''&#xD;&#xA;  build_os=''&#xD;&#xA;  build_vendor=''&#xD;&#xA;  cfghdrs_in=''&#xD;&#xA;  cfghdrs_out=''&#xD;&#xA;  cfgoutputs_in=''&#xD;&#xA;  cfgoutputs_out=''&#xD;&#xA;  datadir='${datarootdir}'&#xD;&#xA;  datarootdir='${prefix}/share'&#xD;&#xA;  docdir='${datarootdir}/doc/${PACKAGE}'&#xD;&#xA;  dvidir='${docdir}'&#xD;&#xA;  enable_autogen=''&#xD;&#xA;  enable_cache_oblivious=''&#xD;&#xA;  enable_cxx='no'&#xD;&#xA;  enable_debug=''&#xD;&#xA;  enable_doc='no'&#xD;&#xA;  enable_experimental_smallocx=''&#xD;&#xA;  enable_fill=''&#xD;&#xA;  enable_initial_exec_tls=''&#xD;&#xA;  enable_lazy_lock=''&#xD;&#xA;  enable_log=''&#xD;&#xA;  enable_opt_safety_checks=''&#xD;&#xA;  enable_opt_size_checks=''&#xD;&#xA;  enable_prof=''&#xD;&#xA;  enable_readlinkat=''&#xD;&#xA;  enable_shared='no'&#xD;&#xA;  enable_static=''&#xD;&#xA;  enable_stats=''&#xD;&#xA;  enable_tls=''&#xD;&#xA;  enable_uaf_detection=''&#xD;&#xA;  enable_utrace=''&#xD;&#xA;  enable_xmalloc=''&#xD;&#xA;  enable_zone_allocator=''&#xD;&#xA;  exe=''&#xD;&#xA;  exec_prefix='NONE'&#xD;&#xA;  host='x86_64-unknown-linux-gnu'&#xD;&#xA;  host_alias='x86_64-unknown-linux-gnu'&#xD;&#xA;  host_cpu=''&#xD;&#xA;  host_os=''&#xD;&#xA;  host_vendor=''&#xD;&#xA;  htmldir='${docdir}'&#xD;&#xA;  importlib=''&#xD;&#xA;  includedir='${prefix}/include'&#xD;&#xA;  infodir='${datarootdir}/info'&#xD;&#xA;  install_suffix=''&#xD;&#xA;  je_=''&#xD;&#xA;  jemalloc_version=''&#xD;&#xA;  jemalloc_version_bugfix=''&#xD;&#xA;  jemalloc_version_gid=''&#xD;&#xA;  jemalloc_version_major=''&#xD;&#xA;  jemalloc_version_minor=''&#xD;&#xA;  jemalloc_version_nrev=''&#xD;&#xA;  libdir='${exec_prefix}/lib'&#xD;&#xA;  libdl=''&#xD;&#xA;  libexecdir='${exec_prefix}/libexec'&#xD;&#xA;  libprefix=''&#xD;&#xA;  link_whole_archive=''&#xD;&#xA;  localedir='${datarootdir}/locale'&#xD;&#xA;  localstatedir='${prefix}/var'&#xD;&#xA;  mandir='${datarootdir}/man'&#xD;&#xA;  o=''&#xD;&#xA;  objroot=''&#xD;&#xA;  oldincludedir='/usr/include'&#xD;&#xA;  pdfdir='${docdir}'&#xD;&#xA;  prefix='/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out'&#xD;&#xA;  private_namespace=''&#xD;&#xA;  program_transform_name='s,x,x,'&#xD;&#xA;  psdir='${docdir}'&#xD;&#xA;  rev='2'&#xD;&#xA;  sbindir='${exec_prefix}/sbin'&#xD;&#xA;  sharedstatedir='${prefix}/com'&#xD;&#xA;  so=''&#xD;&#xA;  srcroot=''&#xD;&#xA;  sysconfdir='${prefix}/etc'&#xD;&#xA;  target_alias=''&#xD;&#xA;  /* confdefs.h */&#xD;&#xA;  #define PACKAGE_NAME &quot;&quot;&#xD;&#xA;  #define PACKAGE_TARNAME &quot;&quot;&#xD;&#xA;  #define PACKAGE_VERSION &quot;&quot;&#xD;&#xA;  #define PACKAGE_STRING &quot;&quot;&#xD;&#xA;  #define PACKAGE_BUGREPORT &quot;&quot;&#xD;&#xA;  #define PACKAGE_URL &quot;&quot;&#xD;&#xA;&#xD;&#xA;  configure: exit 1&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  configure: error: Prefix should not contain spaces&#xD;&#xA;  thread 'main' panicked at 'command did not execute successfully: &quot;sh&quot; &quot;/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out/build/configure&quot; &quot;--disable-cxx&quot; &quot;--enable-doc=no&quot; &quot;--enable-shared=no&quot; &quot;--with-private-namespace=_rjem_&quot; &quot;--host=x86_64-unknown-linux-gnu&quot; &quot;--build=x86_64-unknown-linux-gnu&quot; &quot;--prefix=/mnt/c/Users/name/Desktop/Github/metaschool/substrate-node-template/target/release/build/tikv-jemalloc-sys-10b36ab64da2ffdc/out&quot;&#xD;&#xA;  expected success, got: exit status: 1', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-jemalloc-sys-0.5.2+5.3.0-patched/build.rs:330:9&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have no idea what to provide to help giving this issue a context so I'll just list down what I'm using&#xD;&#xA;&#xD;&#xA;Editor: VS Code&#xD;&#xA;&#xD;&#xA;OS: Windows 10&#xD;&#xA;&#xD;&#xA;rust config: &#xD;&#xA;&#xD;&#xA;[![toolchains][1]][1]&#xD;&#xA;&#xD;&#xA;[1]: https://i.stack.imgur.com/vXuEb.png&#xD;&#xA;&#xD;&#xA;wsl: wsl version 2" ContentLicense="CC BY-SA 4.0" />
  <row Id="42037" PostHistoryTypeId="5" PostId="7299" RevisionGUID="79be2a9d-5a65-43fd-832f-48b42f1cfa2b" CreationDate="2023-12-01T15:19:12.307" UserId="116" Comment="Spellcheck and language Im -&gt; I'm" Text="I need to get the owner of an asset to filter extrinsic calls.&#xD;&#xA;I tight couple the assets pallet to my pallet and I'm trying to access the Asset storage but getting the following error:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UBFei.png&#xD;&#xA;&#xD;&#xA;How can I solve this error or otherwise how can I get the owner of an specific asset." ContentLicense="CC BY-SA 4.0" />
  <row Id="42038" PostHistoryTypeId="5" PostId="7213" RevisionGUID="c2190542-fbde-41d4-8e1e-74d40200e52a" CreationDate="2023-12-01T15:21:09.830" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I'm trying to use a custom struct inside a Mapping, but I get many errors when trying to compile my code.&#xD;&#xA;&#xD;&#xA;Here is the custom struct I want to use inside a Mapping:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink::storage_item]&#xD;&#xA;pub struct Transaction {&#xD;&#xA;&#xD;&#xA;        creator:AccountId,&#xD;&#xA;        approvers: Mapping&lt;AccountId, Balance&gt;,&#xD;&#xA;        number_of_approvals:Balance,&#xD;&#xA;        psp22_token_to_transfer:AccountId,&#xD;&#xA;        recipient:AccountId,&#xD;&#xA;        transaction_number:Balance&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And this is how I try to use the Mapping inside the contract struct:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink(storage)]&#xD;&#xA;pub struct MultiSig {&#xD;&#xA;        &#xD;&#xA;        deployer: AccountId,&#xD;&#xA;        wallet_participants: Vec&lt;AccountId&gt;,&#xD;&#xA;        number_of_participants: Balance,&#xD;&#xA;        number_of_transactions: Balance,&#xD;&#xA;        wallet_tokens: Mapping&lt;AccountId,Balance&gt;,&#xD;&#xA;        wallet_transactions: Mapping&lt;Balance,(Transaction,Balance)&gt;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The errors that I get are related to `decode` and `encode` and &quot;StorableHint&quot;, here are some of the errors that I'm getting:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;the trait `parity_scale_codec::Decode` is not implemented for `(multi_sig::Transaction, u128)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;the trait `Encode` is not implemented for `(multi_sig::Transaction, u128)`&#xD;&#xA;&#xD;&#xA;the trait `StorableHint&lt;()&gt;` is not implemented for `ink::storage::Mapping&lt;u128, (multi_sig::Transaction, u128)&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm using the following [documentation][1] in order to implement a custom struct:&#xD;&#xA;&#xD;&#xA;[1]: https://use.ink/datastructures/custom-datastructure&#xD;&#xA;&#xD;&#xA;Thank you in advance :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42039" PostHistoryTypeId="4" PostId="4576" RevisionGUID="4b995dd3-6d04-477a-8c50-a7a840e6cdf2" CreationDate="2023-12-01T15:24:58.260" UserId="116" Comment="Spelling cant -&gt; can't" Text="Can't transfer balance in polkadot.js.org?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42040" PostHistoryTypeId="5" PostId="5560" RevisionGUID="3b1164e8-4e27-4f16-b326-b405c91dcc0c" CreationDate="2023-12-01T15:27:43.030" UserId="116" Comment="Spelling dont -&gt; don't" Text="&gt;What is the recommended approach for code coverage in Substrate?&#xD;&#xA;&#xD;&#xA;TBH I don't think there is any. This topic is under-valued IMO.    &#xD;&#xA;&#xD;&#xA;I have used `kcov` with `Tarpaulin` for a Pallet project in the past and it works reasonably well.  &#xD;&#xA;You can see the GH actions file [here](https://github.com/perun-network/perun-polkadot-pallet/blob/9ef1476028ae53011f51ed7f55bdbfb8f4fc82a7/.github/workflows/rust.yml#L125).  &#xD;&#xA;It needs some manual tweaking for Rust integration tests, since `kvoc` only assumes unit tests and some other annoyances but in general it provides usable coverage info. Especially missing error paths. It also works together with [`Codecov`](https://app.codecov.io/gh/perun-network/perun-polkadot-pallet/).&#xD;&#xA;&#xD;&#xA;There is one [shortcoming](https://github.com/paritytech/substrate/issues/10479) in Substrate of which the TLDR is to not use thread locals in tests *ever*.  &#xD;&#xA;Just use `parameter_types` or storage instead." ContentLicense="CC BY-SA 4.0" />
  <row Id="42041" PostHistoryTypeId="5" PostId="5075" RevisionGUID="ab7be74e-11e9-41be-8bef-9ae75957dc97" CreationDate="2023-12-01T15:28:04.530" UserId="116" Comment="Spelling dont -&gt; don't" Text="Three things:  &#xD;&#xA;1. Could be that you are not initializing the block number, it is therefore 0. This can lead to various errors when subtracting from it. You can easily fix this by modifying your `new_test_ext` function to do so. `1` may not be enough in your case. &#xD;&#xA;```rust&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;    let mut ext: sp_io::TestExternalities = system::GenesisConfig::default().build_storage::&lt;Test&gt;().unwrap().into();&#xD;&#xA;    ext.execute_with(|| System::set_block_number(1));&#xD;&#xA;    ext&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Ensure that the `TimeProvider` is initialized before your pallet. A good example is in [pallet-gilt](https://github.com/paritytech/substrate/blob/1b1a5e12c0e391c7ed4e3ffa332eb2fe928d257f/frame/gilt/src/mock.rs#L128). I don't know what your time provider does, but it seems to return something less than 180 secs, hence the error. &#xD;&#xA;3. Always use `saturating` or `checked` arithmetic operations in the runtime.  &#xD;&#xA;You can change the code to `let time: u64 = T::TimeProvider::now().as_secs().saturating_sub(180);`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="42042" PostHistoryTypeId="5" PostId="4714" RevisionGUID="1345cf53-733c-4073-80dc-c054437f1cca" CreationDate="2023-12-01T15:28:23.443" UserId="116" Comment="Spelling dont -&gt; don't" Text="There is [sTPS repo](https://github.com/paritytech/polkadot-stps/) contains some functions to spin up a multi-node network and stress-test it.  &#xD;&#xA;Unfortunately there are some non-deterministic bugs with how we are using Zombienet which does not allow for reliable output.  &#xD;&#xA;&#xD;&#xA;You could still re-use some of the code in that repo, especially the Rust code regarding the transaction signing and sending.  &#xD;&#xA;&#xD;&#xA;I don't know what kind of benchmark you want to do. The sTPS aims at a multi-node global spanning benchmark, not just local testing.  &#xD;&#xA;Also, what are you expecting as output? Just transactions per second or other metrics like memory usage or response time?  &#xD;&#xA;Anyway, next time please include as *much* info as possible into your question." ContentLicense="CC BY-SA 4.0" />
  <row Id="42043" PostHistoryTypeId="5" PostId="4707" RevisionGUID="f2e22504-5598-49ec-a734-702ddbce7217" CreationDate="2023-12-01T15:29:23.400" UserId="116" Comment="Spellcheck and language" Text="Are there any tools/script to stress a substrate bases blockchain? Generating transfers between accounts should be Ok.&#xD;&#xA;I think I saw one a few months ago but I can't find it :-(&#xD;&#xA;&#xD;&#xA;Thanks very much.&#xD;&#xA;Regards;&#xD;&#xA;fernando " ContentLicense="CC BY-SA 4.0" />
  <row Id="42044" PostHistoryTypeId="5" PostId="2858" RevisionGUID="e9226cb2-3121-48cf-a8b0-b6e067ee3eea" CreationDate="2023-12-01T15:36:15.227" UserId="116" Comment="Spelling dont -&gt; don't" Text="Because AssetId's are mostly a fancy way of saying u32, It's as simple as:&#xD;&#xA;&#xD;&#xA;    let first_asset_id: T::AssetId = 1u32.into();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Don't forget to Add `From&lt;u32&gt;` in :&#xD;&#xA;```rust&#xD;&#xA;type AssetId: IsType&lt;&lt;Self as pallet_assets::Config&gt;::AssetId&gt;&#xD;&#xA;			+ Parameter&#xD;&#xA;			+ From&lt;u32&gt;&#xD;&#xA;			+ Ord&#xD;&#xA;			+ Copy;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The implementation can be found here:&#xD;&#xA;https://github.com/liberland/liberland_substrate/blob/65edb6bab3/frame/llm/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="42045" PostHistoryTypeId="50" PostId="6410" RevisionGUID="3b8ca554-9819-461f-8255-96a0907cdd73" CreationDate="2023-12-01T16:03:20.393" UserId="-1" />
  <row Id="42046" PostHistoryTypeId="50" PostId="7458" RevisionGUID="3081a1fe-0677-4108-9301-aa3b8c12a7a9" CreationDate="2023-12-01T21:05:55.703" UserId="-1" />
  <row Id="42047" PostHistoryTypeId="50" PostId="8757" RevisionGUID="98d9b991-3b40-4981-8844-11e52423dbcb" CreationDate="2023-12-01T23:01:10.150" UserId="-1" />
  <row Id="42051" PostHistoryTypeId="2" PostId="10574" RevisionGUID="29f4daff-272b-4911-b0ea-b9935d307133" CreationDate="2023-12-02T02:58:54.817" UserId="2844" Text="Can it be possible to interact solidity smart contract from substrate pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42053" PostHistoryTypeId="1" PostId="10574" RevisionGUID="29f4daff-272b-4911-b0ea-b9935d307133" CreationDate="2023-12-02T02:58:54.817" UserId="2844" Text="How to interact between a smart contract written in Solidity from substrate pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42054" PostHistoryTypeId="3" PostId="10574" RevisionGUID="29f4daff-272b-4911-b0ea-b9935d307133" CreationDate="2023-12-02T02:58:54.817" UserId="2844" Text="|pallet|solidity|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42055" PostHistoryTypeId="50" PostId="6738" RevisionGUID="5a8c9180-305e-40f7-baed-bbd0430813db" CreationDate="2023-12-02T08:09:46.240" UserId="-1" />
  <row Id="42056" PostHistoryTypeId="50" PostId="7485" RevisionGUID="ed08fca4-7556-40e0-b257-9d49b9e37ffc" CreationDate="2023-12-02T11:05:00.603" UserId="-1" />
  <row Id="42057" PostHistoryTypeId="5" PostId="10571" RevisionGUID="21cbac0d-8400-47d2-b097-e20c471a43d6" CreationDate="2023-12-02T14:21:01.250" UserId="354" Comment="improved formatting" Text="I am trying to migrate the events storage value of the `frame_system pallet`, this is required  because the `EventRecord` is now a generic over `RuntimeEvent` instead of `Event`, but I am not sure of how to go about it as I don't know where the `RuntimeEvent` and `Event` types are defined. Has anyone performed this migration?&#xD;&#xA;&#xD;&#xA;Thanks," ContentLicense="CC BY-SA 4.0" />
  <row Id="42058" PostHistoryTypeId="4" PostId="10571" RevisionGUID="21cbac0d-8400-47d2-b097-e20c471a43d6" CreationDate="2023-12-02T14:21:01.250" UserId="354" Comment="improved formatting" Text="How to migrate events from the frame_system pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42059" PostHistoryTypeId="24" PostId="10571" RevisionGUID="21cbac0d-8400-47d2-b097-e20c471a43d6" CreationDate="2023-12-02T14:21:01.250" Comment="Proposed by 354 approved by 251, 3598 edit id of 613" ContentLicense="CC BY-SA 4.0" />
  <row Id="42060" PostHistoryTypeId="2" PostId="10575" RevisionGUID="25e7e4f5-8b7d-480b-99ea-f75ae66c6723" CreationDate="2023-12-02T15:59:48.473" UserId="94" Text="The events storage never needs to be migrated since it is cleared every block.&#xD;&#xA;&#xD;&#xA;Further, the change from `Event` to `RuntimeEvent` was just a rename ([#11981](https://github.com/paritytech/substrate/pull/11981)) of the type. " ContentLicense="CC BY-SA 4.0" />
  <row Id="42062" PostHistoryTypeId="50" PostId="7513" RevisionGUID="51ff1d2e-0405-4381-a772-eb83b6938d22" CreationDate="2023-12-02T22:04:20.503" UserId="-1" />
  <row Id="42063" PostHistoryTypeId="50" PostId="7730" RevisionGUID="f62efe21-a3ee-4128-805c-a32527f4e974" CreationDate="2023-12-03T14:04:55.773" UserId="-1" />
  <row Id="42064" PostHistoryTypeId="2" PostId="10576" RevisionGUID="ca26fdb1-3d43-4769-9cdc-de97d4e3662d" CreationDate="2023-12-03T15:21:47.633" UserId="3346" Text="My question is: **When there is a deferred slash waiting to be applied, how do you find the INDEX for that slash?** The council can propose a motion to cancel the deferred slash. That form requires the era when the slash happened (easy to find) and the INDEX of the particular slash you want to cancel. I am not able to find the index of the slash in question." ContentLicense="CC BY-SA 4.0" />
  <row Id="42066" PostHistoryTypeId="1" PostId="10576" RevisionGUID="ca26fdb1-3d43-4769-9cdc-de97d4e3662d" CreationDate="2023-12-03T15:21:47.633" UserId="3346" Text="How To Find The Slash Index?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42067" PostHistoryTypeId="3" PostId="10576" RevisionGUID="ca26fdb1-3d43-4769-9cdc-de97d4e3662d" CreationDate="2023-12-03T15:21:47.633" UserId="3346" Text="|polkadot-js|slashing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42068" PostHistoryTypeId="2" PostId="10577" RevisionGUID="b484099c-c325-4fc4-a1f0-89d08e9a686e" CreationDate="2023-12-03T23:47:21.973" UserId="351" Text="// ...but they must match our filter, which rejects all.&#xD;&#xA;	type XcmExecuteFilter = Nothing; // == Deny All" ContentLicense="CC BY-SA 4.0" />
  <row Id="42070" PostHistoryTypeId="1" PostId="10577" RevisionGUID="b484099c-c325-4fc4-a1f0-89d08e9a686e" CreationDate="2023-12-03T23:47:21.973" UserId="351" Text="Why does in polkadot and most other chain xcm pallet the XcmExecution filter is set deny all instructions" ContentLicense="CC BY-SA 4.0" />
  <row Id="42071" PostHistoryTypeId="3" PostId="10577" RevisionGUID="b484099c-c325-4fc4-a1f0-89d08e9a686e" CreationDate="2023-12-03T23:47:21.973" UserId="351" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42072" PostHistoryTypeId="2" PostId="10578" RevisionGUID="8bfa6f5d-fbc6-400b-b49e-104ecc20f44c" CreationDate="2023-12-04T07:26:04.357" UserId="2844" Text="I saw token decimal has different value like 12, 10, 6 in different substrate chain, What exactly it means and what is the use of it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42074" PostHistoryTypeId="1" PostId="10578" RevisionGUID="8bfa6f5d-fbc6-400b-b49e-104ecc20f44c" CreationDate="2023-12-04T07:26:04.357" UserId="2844" Text="What is chain decimal?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42075" PostHistoryTypeId="3" PostId="10578" RevisionGUID="8bfa6f5d-fbc6-400b-b49e-104ecc20f44c" CreationDate="2023-12-04T07:26:04.357" UserId="2844" Text="|polkadot|parachain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42076" PostHistoryTypeId="2" PostId="10579" RevisionGUID="a14732e8-c393-45bb-85c0-44a1735dd9c8" CreationDate="2023-12-04T07:52:00.523" UserId="116" Text="This is the number of decimals on your main token. Compare with fiat currencies a euro has a decimal value of `2` while a Japanese yen (for all practical use) has a decimal value of `0`&#xD;&#xA;&#xD;&#xA;On a chain all currencies are a huge integer number, but since that is confusing for humans, these integers are treated as a fix point decimal number system. &#xD;&#xA;&#xD;&#xA;Calling the RPC `system.properties` will reveal this information for any chain. For instance polkadot as 10&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;system.properties: ChainProperties&#xD;&#xA;{&#xD;&#xA;  isEthereum: false&#xD;&#xA;  ss58Format: 0&#xD;&#xA;  tokenDecimals: [&#xD;&#xA;    10&#xD;&#xA;  ]&#xD;&#xA;  tokenSymbol: [&#xD;&#xA;    DOT&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So `1 DOT` is represented internally by `1^10`&#xD;&#xA;&#xD;&#xA;When encoding operations on the chain values are given in the internal u128 integer format, any tool communication with the chain should do this conversion for the user." ContentLicense="CC BY-SA 4.0" />
  <row Id="42078" PostHistoryTypeId="5" PostId="10579" RevisionGUID="00c73da2-94f6-4ee7-a8c4-229f27b58bba" CreationDate="2023-12-04T08:36:10.697" UserId="116" Comment="added 82 characters in body" Text="This is the number of decimals on your main token. Compare with fiat currencies a euro has a decimal value of `2` and a cup of coffee is 0.99 Euro, while in Japan a Japanese yen (for all practical use) has a decimal value of `0` and a cup of coffee is 120 yen.&#xD;&#xA;&#xD;&#xA;On a chain all currencies are a huge integer number, but since that is confusing for humans, these integers are treated as a fix point decimal number system instead.&#xD;&#xA;&#xD;&#xA;Calling the RPC `system.properties` will reveal this information for any chain. For instance polkadot as 10&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;system.properties: ChainProperties&#xD;&#xA;{&#xD;&#xA;  isEthereum: false&#xD;&#xA;  ss58Format: 0&#xD;&#xA;  tokenDecimals: [&#xD;&#xA;    10&#xD;&#xA;  ]&#xD;&#xA;  tokenSymbol: [&#xD;&#xA;    DOT&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So `1 DOT` is represented internally by `1^10`&#xD;&#xA;&#xD;&#xA;When encoding operations on the chain values are given in the internal u128 integer format, any tool communication with the chain should do this conversion for the user." ContentLicense="CC BY-SA 4.0" />
  <row Id="42079" PostHistoryTypeId="50" PostId="8610" RevisionGUID="7d33a8e8-836a-4576-8e7d-2c3386574dd6" CreationDate="2023-12-04T09:06:05.740" UserId="-1" />
  <row Id="42080" PostHistoryTypeId="2" PostId="10580" RevisionGUID="4d06cc9e-b528-4cbf-b1d8-057d25a8bc66" CreationDate="2023-12-04T09:17:35.120" UserId="3977" Text="Let's imagine the following extrinsic. &#xD;&#xA;&#xD;&#xA;	#[pallet::call_index(1)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::might_panic_extrinsic())]&#xD;&#xA;		pub fn might_panic_extrinsic(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let member = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let might_panic = custom_func().unwrap();&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;What are the risks and consequences, security-wise and considering we are using the latest Substrate version, if my extrinsic panics due to the `unwrap` call ?&#xD;&#xA;&#xD;&#xA;Will my node crash ? Will my runtime restart ? Will the extrinsic just be reverted, just like it would be for a custom `Error` ? Is there any security risk that the collator misses his slot ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42082" PostHistoryTypeId="1" PostId="10580" RevisionGUID="4d06cc9e-b528-4cbf-b1d8-057d25a8bc66" CreationDate="2023-12-04T09:17:35.120" UserId="3977" Text="What are the risks of panicking inside an extrinsic call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42083" PostHistoryTypeId="3" PostId="10580" RevisionGUID="4d06cc9e-b528-4cbf-b1d8-057d25a8bc66" CreationDate="2023-12-04T09:17:35.120" UserId="3977" Text="|runtime|extrinsic|validator|collator|panic|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42084" PostHistoryTypeId="5" PostId="10580" RevisionGUID="1de10ba0-50e1-44c8-97cd-78ffc4f74d5c" CreationDate="2023-12-04T09:19:59.033" UserId="3977" Comment="deleted 1 character in body" Text="Let's imagine the following extrinsic. &#xD;&#xA;&#xD;&#xA;	#[pallet::call_index(1)]&#xD;&#xA;	#[pallet::weight(T::WeightInfo::might_panic_extrinsic())]&#xD;&#xA;		pub fn might_panic_extrinsic(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;			let member = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			let might_panic = custom_func().unwrap();&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;What are the risks and consequences, security-wise and considering we are using the latest Substrate version, if my extrinsic panics due to the `unwrap` call ?&#xD;&#xA;&#xD;&#xA;Will my node crash ? Will my runtime restart ? Will the extrinsic just be reverted, just like it would be for a custom `Error` ? Is there any security risk that the collator misses his slot ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42085" PostHistoryTypeId="5" PostId="10580" RevisionGUID="608ecf2b-1656-448b-9f8d-faaf00dd813b" CreationDate="2023-12-04T09:21:02.027" UserId="3977" Comment="indent fix" Text="Let's imagine the following extrinsic. &#xD;&#xA;&#xD;&#xA;	#[pallet::call_index(1)]&#xD;&#xA;	#[pallet::weight(T::WeightInfo::might_panic_extrinsic())]&#xD;&#xA;	pub fn might_panic_extrinsic(origin: OriginFor&lt;T&gt;) -&gt; DispatchResult {&#xD;&#xA;		let member = ensure_signed(origin)?;&#xD;&#xA;		let might_panic = custom_func().unwrap();&#xD;&#xA;		Ok(())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;What are the risks and consequences, security-wise and considering we are using the latest Substrate version, if my extrinsic panics due to the `unwrap` call ?&#xD;&#xA;&#xD;&#xA;Will my node crash ? Will my runtime restart ? Will the extrinsic just be reverted, just like it would be for a custom `Error` ? Is there any security risk that the collator misses his slot ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42086" PostHistoryTypeId="2" PostId="10581" RevisionGUID="5cb527b4-7174-43a9-ab9f-1198b169e1be" CreationDate="2023-12-04T09:58:45.370" UserId="2025" Text="Polkadot.js allows to encrypt and decrypt messages using the NaCl library. More info in [this doc page][1].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/util-crypto/examples/encrypt-decrypt" ContentLicense="CC BY-SA 4.0" />
  <row Id="42088" PostHistoryTypeId="50" PostId="9148" RevisionGUID="57b48a9a-102a-494a-b017-da68c9fad54b" CreationDate="2023-12-04T10:02:00.193" UserId="-1" />
  <row Id="42089" PostHistoryTypeId="50" PostId="9166" RevisionGUID="ec1380e8-e906-46ce-9175-cc32ecbcef35" CreationDate="2023-12-04T11:06:40.843" UserId="-1" />
  <row Id="42090" PostHistoryTypeId="5" PostId="10579" RevisionGUID="068fdb4e-29ed-4609-b8a2-2bda380de0ea" CreationDate="2023-12-04T11:33:56.180" UserId="116" Comment="added 1 character in body" Text="This is the number of decimals on your main token. Compare with fiat currencies a euro has a decimal value of `2` and a cup of coffee is 0.99 Euro, while in Japan a Japanese yen (for all practical use) has a decimal value of `0` and a cup of coffee is 120 yen.&#xD;&#xA;&#xD;&#xA;On a chain all currencies are a huge integer number, but since that is confusing for humans, these integers are treated as a fix point decimal number system instead.&#xD;&#xA;&#xD;&#xA;Calling the RPC `system.properties` will reveal this information for any chain. For instance polkadot as 10&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;system.properties: ChainProperties&#xD;&#xA;{&#xD;&#xA;  isEthereum: false&#xD;&#xA;  ss58Format: 0&#xD;&#xA;  tokenDecimals: [&#xD;&#xA;    10&#xD;&#xA;  ]&#xD;&#xA;  tokenSymbol: [&#xD;&#xA;    DOT&#xD;&#xA;  ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So `1 DOT` is represented internally by `10^10`&#xD;&#xA;&#xD;&#xA;When encoding operations on the chain values are given in the internal u128 integer format, any tool communication with the chain should do this conversion for the user." ContentLicense="CC BY-SA 4.0" />
  <row Id="42091" PostHistoryTypeId="2" PostId="10582" RevisionGUID="4ddb33fd-3846-4a45-978d-2b8986b88951" CreationDate="2023-12-04T11:59:34.667" UserId="4985" Text="I saw this polkadot API document: https://polkadot.js.org/docs/substrate/rpc/#payment&#xD;&#xA;and it mentioned that the `payment_queryInfo` is deprecated and should use `api.call.transactionPaymentApi.queryInfo` instead.&#xD;&#xA;&#xD;&#xA;Does this mean I can only use `queryInfo` by using JS SDK directly? or is there any RPC method that can replace this method?&#xD;&#xA;&#xD;&#xA;Because when I search for supported rpc methods by invoking `rpc_methods`, it still returns `payment_queryInfo` as one of the supported methods, and I don't see other alternative RPC methods.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="42093" PostHistoryTypeId="1" PostId="10582" RevisionGUID="4ddb33fd-3846-4a45-978d-2b8986b88951" CreationDate="2023-12-04T11:59:34.667" UserId="4985" Text="jsonrpc method `payment_queryInfo` is being deprecated" ContentLicense="CC BY-SA 4.0" />
  <row Id="42094" PostHistoryTypeId="3" PostId="10582" RevisionGUID="4ddb33fd-3846-4a45-978d-2b8986b88951" CreationDate="2023-12-04T11:59:34.667" UserId="4985" Text="|polkadot-js|runtime-api|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42095" PostHistoryTypeId="50" PostId="9099" RevisionGUID="4dbeb08c-2e32-475f-ba29-68600807f5ac" CreationDate="2023-12-04T12:02:50.637" UserId="-1" />
  <row Id="42096" PostHistoryTypeId="2" PostId="10583" RevisionGUID="ede5c752-d14c-494d-812c-6169ed43fd42" CreationDate="2023-12-04T12:13:30.160" UserId="4314" Text="for the time being the RPC is still available, but will soon be faded out, that's why it's marked as `deprecated`. You could use the `api.call.transactionPaymentApi.queryInfo` as you mentioned or, if you prefer using RPC, you could also use the RPC [`state_call`](https://polkadot.js.org/docs/substrate/rpc/#callmethod-text-data-bytes-at-blockhash-bytes) with `TransactionPaymentApi_query_info` and the encoded extrinsic you'd like to know the fees of. Both alternatives are equivalent and will return the same result." ContentLicense="CC BY-SA 4.0" />
  <row Id="42098" PostHistoryTypeId="50" PostId="8761" RevisionGUID="7fffc80b-a8e7-46eb-bf94-90815a63bf52" CreationDate="2023-12-04T13:01:50.177" UserId="-1" />
  <row Id="42099" PostHistoryTypeId="52" PostId="10578" RevisionGUID="6a2f9c83-59b2-4b97-be8e-5ded9ffce5a1" CreationDate="2023-12-04T15:27:27.727" />
  <row Id="42100" PostHistoryTypeId="2" PostId="10584" RevisionGUID="6735dad9-d57c-4412-a58d-cfa1debd6116" CreationDate="2023-12-04T16:11:15.063" UserId="4835" Text="I dont think typegen is working as expected per documentation, by following the provided example and adapting it to my parachain.&#xD;&#xA;&#xD;&#xA;`&#xD;&#xA;Found 244 errors in 5 files.&#xD;&#xA;&#xD;&#xA;Errors  Files&#xD;&#xA;     5  src/interfaces/augment-api-consts.ts:61&#xD;&#xA;   111  src/interfaces/augment-api-events.ts:67&#xD;&#xA;    59  src/interfaces/augment-api-query.ts:23&#xD;&#xA;    68  src/interfaces/augment-api-tx.ts:97&#xD;&#xA;     1  src/interfaces/index.ts:4&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;I see the following problems:&#xD;&#xA;&#xD;&#xA;- types.js is empty&#xD;&#xA;- definitions is empty&#xD;&#xA;- the generated code is not finding generated types (there is no import statement) which seems like something is broken.&#xD;&#xA;- no interfaces/module folders have been generated for my para-chain pallets, which I would expect&#xD;&#xA;&#xD;&#xA;I think there is a gap between what we developers expect and what TypeGen does, but the documentation isn't clear about it.&#xD;&#xA;&#xD;&#xA;I expect typegen to read my parachain metadata and fully gererate an interfaces folder so that all my custom types are defined just as they are when using the relay chain (Polkadot/Kusama). I expect activating this interfaces via a typescript mapping. I don't expect having to make choices about what gets or does not get generated.&#xD;&#xA;&#xD;&#xA;I don't expect having to patch auto-generated code or touch the intefaces folders in general. &#xD;&#xA;&#xD;&#xA;I think my expectations are wrong, but the documentation is not clear about what do you have to provide to generate all the types used by your parachain. &#xD;&#xA;&#xD;&#xA;How does Typegen works?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42102" PostHistoryTypeId="1" PostId="10584" RevisionGUID="6735dad9-d57c-4412-a58d-cfa1debd6116" CreationDate="2023-12-04T16:11:15.063" UserId="4835" Text="generate types from chain does not work. Documentation is not clear" ContentLicense="CC BY-SA 4.0" />
  <row Id="42103" PostHistoryTypeId="3" PostId="10584" RevisionGUID="6735dad9-d57c-4412-a58d-cfa1debd6116" CreationDate="2023-12-04T16:11:15.063" UserId="4835" Text="|parachain|typescript|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42104" PostHistoryTypeId="6" PostId="10584" RevisionGUID="27c5b4b7-e1d5-43a1-b3a0-c600d49d752d" CreationDate="2023-12-04T16:32:51.407" UserId="4835" Comment="edited tags" Text="|parachain|javascript|typescript|custom-types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42105" PostHistoryTypeId="2" PostId="10585" RevisionGUID="bf2f29a9-52a3-4325-8a75-45c67e2d5c2e" CreationDate="2023-12-04T16:34:05.640" UserId="2005" Text="As far as I know, in Schnorrkel/Ristretto x25519 or `sr25519` it's not possible to recover public key from the signature. You need to know both public key and message to verify it.&#xD;&#xA;&#xD;&#xA;[This][1] from `schnorrkel` repo:&#xD;&#xA;&#xD;&#xA;&gt; In ECDSA, there are no known problems with using ecrecover and HDKD together, but using HDKD actually breaks both BLS signatures and the malleable Schnorr signatures that [support ecrecover.](https://www.deadalnix.me/2017/02/17/schnorr-signatures-for-not-so-dummies/).  We therefore use  non-malleable signatures that forbid ecrecover.  &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/w3f/schnorrkel/blob/master/annoucement.md?plain=1#L59" ContentLicense="CC BY-SA 4.0" />
  <row Id="42111" PostHistoryTypeId="2" PostId="10587" RevisionGUID="793d1de8-2c47-48c9-9447-fa26206be50c" CreationDate="2023-12-04T19:41:54.910" UserId="74" Text="In the verification of a `schnorrkel` `sr25519` signature, there is a signing context which takes an arbitrary string/bytes.&#xD;&#xA;&#xD;&#xA;1. What is the signing context used in the PolkadotJS Extension?&#xD;&#xA;2. Is it something we customize through our own usage of the API? " ContentLicense="CC BY-SA 4.0" />
  <row Id="42113" PostHistoryTypeId="1" PostId="10587" RevisionGUID="793d1de8-2c47-48c9-9447-fa26206be50c" CreationDate="2023-12-04T19:41:54.910" UserId="74" Text="What is the signing context chosen by PolkadotJS API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42114" PostHistoryTypeId="3" PostId="10587" RevisionGUID="793d1de8-2c47-48c9-9447-fa26206be50c" CreationDate="2023-12-04T19:41:54.910" UserId="74" Text="|polkadot-js|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42116" PostHistoryTypeId="52" PostId="10582" RevisionGUID="1c741ef5-7da3-4bab-a9c2-61c0f4090e1b" CreationDate="2023-12-04T19:59:59.053" />
  <row Id="42117" PostHistoryTypeId="2" PostId="10588" RevisionGUID="887345db-b996-44c6-86ca-f1d6540b65fa" CreationDate="2023-12-04T23:12:00.843" UserId="3053" Text="&#xD;&#xA;I have a StorageMap named **PublicKeyToMsaId** which has around 300K inserted items and I want to iterate on all of those keys-values in offchain-worker to create a reverse map in offchain storage. &lt;br/&gt;&lt;br/&gt;&#xD;&#xA;To iterate I'm going to use **PublicKeyToMsaId::iter()** but by looking into the docs for iterator I can see the following&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Enumerate all elements in the map in no particular order.&#xD;&#xA;&#xD;&#xA;if you alter the map while doing this, you'll get undefined results.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Since I know that offchain-worker is running in a different thread, is it possible that when I'm iterating the map, an imported extrinsic might change some value on the map and the iterator on offchain-worker might end up in an undefined state?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42119" PostHistoryTypeId="1" PostId="10588" RevisionGUID="887345db-b996-44c6-86ca-f1d6540b65fa" CreationDate="2023-12-04T23:12:00.843" UserId="3053" Text="Iterating on a storage from Offchain Worker Concerns" ContentLicense="CC BY-SA 4.0" />
  <row Id="42120" PostHistoryTypeId="3" PostId="10588" RevisionGUID="887345db-b996-44c6-86ca-f1d6540b65fa" CreationDate="2023-12-04T23:12:00.843" UserId="3053" Text="|offchain-worker|offchain-storage|iteration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42121" PostHistoryTypeId="50" PostId="6058" RevisionGUID="96d3b191-7be0-4bda-b438-abca30070be6" CreationDate="2023-12-05T01:03:20.433" UserId="-1" />
  <row Id="42122" PostHistoryTypeId="2" PostId="10589" RevisionGUID="faf558c0-39ff-426f-8fcc-c42ea99a4e69" CreationDate="2023-12-05T01:49:57.823" UserId="251" Text="Your node's runtime thread will crash, and that extrinsic won't be included in the block.&#xD;&#xA;&#xD;&#xA;I recall that Frontier used this to prevent certain invalid extrinsics from being included in the block. (But I'm not sure about this now)&#xD;&#xA;&#xD;&#xA;However, it is not recommended to write such code. You must ensure that this is not called in `pallet::hooks`. Panicking in hooks is not allowed, as it will result in your chain becoming brick.&#xD;&#xA;&#xD;&#xA;There isn't a significant security risk for an offline collator. However, if all collators go offline, your chain will become unusable. Panic occurring on hooks could lead to this situation." ContentLicense="CC BY-SA 4.0" />
  <row Id="42124" PostHistoryTypeId="4" PostId="10570" RevisionGUID="dfbab388-1985-4c46-b697-63e3517fa448" CreationDate="2023-12-05T01:56:24.883" UserId="4961" Comment="edited title" Text="How to sign with private key(Not secret key) that was created by &quot;RFC-8032&quot;(described below contents) on offline?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42127" PostHistoryTypeId="5" PostId="3747" RevisionGUID="f0bfb3a8-1e21-445d-84f6-efd53d06d1a8" CreationDate="2023-12-05T06:16:52.567" UserId="116" Comment="Spelling dont -&gt; don't" Text="This is a bit confusing indeed, since extrinsics in Substrate don't &quot;fail&quot; in the error case.  &#xD;&#xA;Extrinsics will emit an `ExtrinsicFailed` event when returning an error, but still execute fine.  &#xD;&#xA;This stands in contrast to Ethereum, where a transaction reverts and does not execute in the error case.  &#xD;&#xA;&#xD;&#xA;In general you have to wait for the extrinsic to be included in a block.  &#xD;&#xA;Then read the events of your extrinsic from that block. There should either be a `ExtrinsicSuccess` or `ExtrinsicFailed` event.  &#xD;&#xA;GSRPC has some rough edges, I don't think it exposes everything that is necessary for this approach.  &#xD;&#xA;&#xD;&#xA;Another &quot;hacky&quot; way of doing it; Wait for the event that would be emitted in the success case with a timeout.  &#xD;&#xA;If it times out, you know that it did not work. In the other case it could also be that someone else send a successful extrinsic, whos event you now see.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="42128" PostHistoryTypeId="5" PostId="10549" RevisionGUID="17e0a1c3-72c3-4fb2-8159-d631c2a4af09" CreationDate="2023-12-05T06:19:50.520" UserId="354" Comment="improved formatting" Text="I need to build and run a substrate node in a such way that `polkadot.js.org/apps` will not display Alice, Bob etc at accounts page. I tried to remove all mentioning of Alice, Bob etc. from the rust code, but it didn't help: these accounts are still displayed, however have 0 balance.&#xD;&#xA;I run my node with a command:&#xD;&#xA;```&#xD;&#xA;    command: [&#xD;&#xA;      &quot;/usr/bin/node-template&quot;,&#xD;&#xA;      &quot;--dev&quot;,&#xD;&#xA;      &quot;--base-path&quot;, &quot;/data&quot;,&#xD;&#xA;      &quot;--name&quot;, &quot;ws-parachain-1&quot;,&#xD;&#xA;      &quot;--rpc-external&quot;,&#xD;&#xA;      &quot;--rpc-cors&quot;, &quot;all&quot;&#xD;&#xA;    ]&#xD;&#xA;```&#xD;&#xA;Removing `--dev` from the command does not help also." ContentLicense="CC BY-SA 4.0" />
  <row Id="42129" PostHistoryTypeId="24" PostId="10549" RevisionGUID="17e0a1c3-72c3-4fb2-8159-d631c2a4af09" CreationDate="2023-12-05T06:19:50.520" Comment="Proposed by 354 approved by -1 edit id of 612" ContentLicense="CC BY-SA 4.0" />
  <row Id="42130" PostHistoryTypeId="5" PostId="10549" RevisionGUID="e65128fd-26a9-4194-9f98-3cf5b7116a8a" CreationDate="2023-12-05T06:19:50.520" UserId="116" Comment="improved formatting" Text="I need to build and run a substrate node in a such way that `polkadot.js.org/apps` will not display Alice, Bob etc at accounts page. I tried to remove all mentioning of Alice, Bob etc. from the rust code, but it didn't help: these accounts are still displayed, however have 0 balance.&#xD;&#xA;I run my node with a command:&#xD;&#xA;&#xD;&#xA;    command: [&#xD;&#xA;      &quot;/usr/bin/node-template&quot;,&#xD;&#xA;      &quot;--dev&quot;,&#xD;&#xA;      &quot;--base-path&quot;, &quot;/data&quot;,&#xD;&#xA;      &quot;--name&quot;, &quot;ws-parachain-1&quot;,&#xD;&#xA;      &quot;--rpc-external&quot;,&#xD;&#xA;      &quot;--rpc-cors&quot;, &quot;all&quot;&#xD;&#xA;    ]&#xD;&#xA;&#xD;&#xA;Removing `--dev` from the command doesn't help." ContentLicense="CC BY-SA 4.0" />
  <row Id="42131" PostHistoryTypeId="5" PostId="5946" RevisionGUID="b053dd27-2265-4270-96a8-7a342a13f875" CreationDate="2023-12-05T06:21:50.067" UserId="116" Comment="Spelling dont -&gt; don't" Text="Currently, I am trying to test how frame-executive is working in this [repo](https://github.com/paritytech/substrate)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I add some logs in executive interface `impl_runtime_apis!` : https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs#L1811&#xD;&#xA;&#xD;&#xA;**Code:**&#xD;&#xA;&#xD;&#xA;	impl sp_api::Core&lt;Block&gt; for Runtime {&#xD;&#xA;        ...&#xD;&#xA;&#xD;&#xA;		fn execute_block(block: Block) {&#xD;&#xA;			log::info!(&quot;RUNTIME : GO IN EXECUTE BLOCK&quot;);&#xD;&#xA;			Executive::execute_block(block);&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn initialize_block(header: &amp;&lt;Block as BlockT&gt;::Header) {&#xD;&#xA;			log::info!(&quot;RUNTIME : GO IN INITIALIZE BLOCK&quot;);&#xD;&#xA;			Executive::initialize_block(header)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;      ...&#xD;&#xA;&#xD;&#xA;	impl sp_block_builder::BlockBuilder&lt;Block&gt; for Runtime {&#xD;&#xA;		fn apply_extrinsic(extrinsic: &lt;Block as BlockT&gt;::Extrinsic) -&gt; ApplyExtrinsicResult {&#xD;&#xA;			log::info!(&quot;RUNTIME : GO IN APPLY EXTRINSIC&quot;);&#xD;&#xA;			Executive::apply_extrinsic(extrinsic)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn finalize_block() -&gt; &lt;Block as BlockT&gt;::Header {&#xD;&#xA;			log::info!(&quot;RUNTIME : GO IN FINALIZE BLOCK&quot;);&#xD;&#xA;			Executive::finalize_block()&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Result:**&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/bkmno.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Problem:**&#xD;&#xA;&#xD;&#xA;`Executive::execute_block(block);` API doesn't trigger and display in the terminal (although I executed a simple `transfer` extrinsic)&#xD;&#xA;&#xD;&#xA;How should I understand? How do I trigger this `execute_block()` API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42132" PostHistoryTypeId="4" PostId="5946" RevisionGUID="b053dd27-2265-4270-96a8-7a342a13f875" CreationDate="2023-12-05T06:21:50.067" UserId="116" Comment="Spelling dont -&gt; don't" Text="Runtime api execute_block doesn't trigger" ContentLicense="CC BY-SA 4.0" />
  <row Id="42133" PostHistoryTypeId="5" PostId="240" RevisionGUID="7a34c3d2-a57d-4ad3-983f-198a7385b75a" CreationDate="2023-12-05T06:23:11.343" UserId="116" Comment="Spelling dont -&gt; don't" Text="With a fresh [substrate-parachain-template][1]&#xD;&#xA;&#xD;&#xA;I ran `cargo build --features runtime-benchmarks`&#xD;&#xA;&#xD;&#xA;I got errors from a deep dependency in `pallet_society`, which doesn't seem relevant to the parachain-template's pallets:&#xD;&#xA;&#xD;&#xA;```cli&#xD;&#xA;error[E0046]: not all trait items implemented, missing: `successful_origin`&#xD;&#xA;    --&gt; /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/4aeb95f/frame/society/src/lib.rs:1268:1&#xD;&#xA;     |&#xD;&#xA;1268 | impl&lt;T: Config&gt; EnsureOrigin&lt;T::Origin&gt; for EnsureFounder&lt;T&gt; {&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `successful_origin` in implementation&#xD;&#xA;     |&#xD;&#xA;     = help: implement the missing item: `fn successful_origin() -&gt; OuterOrigin { todo!() }`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it looks like `fn successful_origin()...` is already [there][2]:&#xD;&#xA;&#xD;&#xA;```Rust&#xD;&#xA;/// Simple ensure origin struct to filter for the founder account.&#xD;&#xA;pub struct EnsureFounder&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;impl&lt;T: Config&gt; EnsureOrigin&lt;T::Origin&gt; for EnsureFounder&lt;T&gt; {&#xD;&#xA;	type Success = T::AccountId;&#xD;&#xA;	fn try_origin(o: T::Origin) -&gt; Result&lt;Self::Success, T::Origin&gt; {&#xD;&#xA;		o.into().and_then(|o| match (o, Founder::&lt;T&gt;::get()) {&#xD;&#xA;			(frame_system::RawOrigin::Signed(ref who), Some(ref f)) if who == f =&gt; Ok(who.clone()),&#xD;&#xA;			(r, _) =&gt; Err(T::Origin::from(r)),&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	fn successful_origin() -&gt; T::Origin {&#xD;&#xA;		let founder = Founder::&lt;T&gt;::get().expect(&quot;society founder should exist&quot;);&#xD;&#xA;		T::Origin::from(frame_system::RawOrigin::Signed(founder))&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I resolve this?&#xD;&#xA;&#xD;&#xA;Origin issue [here][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-parachain-template&#xD;&#xA;  [2]: https://github.com/paritytech/substrate/blob/4aeb95f7f38fcd519e2628f32f79044a8fef99d5/frame/society/src/lib.rs#L1278&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-parachain-template/issues/98" ContentLicense="CC BY-SA 4.0" />
  <row Id="42134" PostHistoryTypeId="5" PostId="3430" RevisionGUID="c1ce8906-c74d-43c5-8f14-5e96185eac35" CreationDate="2023-12-05T06:24:41.963" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I`m looking for an efficient way to purge StorageDoubleMap.&#xD;&#xA;&#xD;&#xA;so lets assume I have some collection:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn provisions)]&#xD;&#xA;pub type Provisions&lt;T: Config&gt; =&#xD;&#xA;	StorageDoubleMap&lt;_, Twox64Concat, T::AccountId, Twox64Concat, TokenId, Balance, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;That is filled with some data and now I want to remove all the entries effectively.&#xD;&#xA;&#xD;&#xA;What I tried so far is:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(T::WeightInfo::claim_rewards())]&#xD;&#xA;		#[transactional]&#xD;&#xA;		pub fn finalize(origin: OriginFor&lt;T&gt;, limit: Option&lt;u32&gt;) -&gt; DispatchResult {&#xD;&#xA;			ensure_root(origin)?;&#xD;&#xA;&#xD;&#xA;			let mut remove_counter = 0;&#xD;&#xA;&#xD;&#xA;			for prefix in [&#xD;&#xA;				Provisions::&lt;T&gt;::prefix_hash(),&#xD;&#xA;			] {&#xD;&#xA;				match child::kill_storage(&amp;ChildInfo::new_default_from_vec(prefix), limit) {&#xD;&#xA;					KillStorageResult::AllRemoved(num_removed) | &#xD;&#xA;					KillStorageResult::SomeRemaining(num_removed) =&gt; {&#xD;&#xA;						if let Some(l) = limit {&#xD;&#xA;							remove_counter+=num_removed;&#xD;&#xA;							if  remove_counter &gt;= l {&#xD;&#xA;								Self::deposit_event(Event::PartiallyCleaned);&#xD;&#xA;								return Ok(().into())&#xD;&#xA;							}&#xD;&#xA;						}&#xD;&#xA;					}&#xD;&#xA;				};&#xD;&#xA;			}&#xD;&#xA;            Self::deposit_event(Event::Cleaned);&#xD;&#xA;			 Ok(().into())&#xD;&#xA;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but it doesn't seem to work." ContentLicense="CC BY-SA 4.0" />
  <row Id="42135" PostHistoryTypeId="5" PostId="8724" RevisionGUID="a7c339db-503c-4330-8cf2-938051665e3f" CreationDate="2023-12-05T06:27:02.573" UserId="116" Comment="Code block and spellcheck" Text="After doing a simple calculation in rust ink! 4.0 smart contract, the result is incorrect and doesn't match the expected result.&#xD;&#xA;&#xD;&#xA;Here is the simple formula:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let a0_balance_mul:U256 = U256::from(amount_in_with_lp_fees * self.get_a0_balance());&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The variables for the above formula are:&#xD;&#xA;&#xD;&#xA; 1. `amount_in_with_lp_fees = 100,000,000,000,000,000,000`&#xD;&#xA; 2. `self.get_a0_balance() = 10,000,000,000,000,000,000`&#xD;&#xA;&#xD;&#xA;The result that Im getting is : `319,435,266,158,123,073,073,250,785,136,463,577,088`&#xD;&#xA;Which should be : `1000000000000000000000000000000000000000`&#xD;&#xA;&#xD;&#xA;I've checked both numbers and they are both represented correctly using `U256` int.&#xD;&#xA;&#xD;&#xA;Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="42136" PostHistoryTypeId="5" PostId="8727" RevisionGUID="1ca7c01e-857f-4916-9cbe-be3d3a4c4d65" CreationDate="2023-12-05T06:27:48.033" UserId="116" Comment="Code block" Text="I should've converted both `amount_in_with_lp_fees` and `self.get_a0_balance()` into `U256` int, they were `u128`." ContentLicense="CC BY-SA 4.0" />
  <row Id="42137" PostHistoryTypeId="5" PostId="4455" RevisionGUID="b730ccad-c694-48f4-b9f8-ee256ef68e4b" CreationDate="2023-12-05T07:19:59.587" UserId="116" Comment="Spelling dont -&gt; don't" Text="&gt; If an extrinsic emits an event with has some payload with some size, say like a user provided `Vec&lt;u8&gt;`, then an attacker can submit a series of such extrinsics, radically increasing the size of this vector  &#xD;&#xA;&gt;...  &#xD;&#xA;&gt; How was it determined that this is already not a problem in Polkadot or Kusama?&#xD;&#xA;&#xD;&#xA;Developers pay attention to never put user-provided unbound data directly into events.  &#xD;&#xA;&#xD;&#xA;It is smarter, as noted above, to only use hashes. This holds generally for all on-chain data; don't use the data itself but rather hashes wherever possible.  &#xD;&#xA;This keeps on-chain data small and cheap to scale.  &#xD;&#xA;If you still need to store blobs of data, you can use the `preimage` pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="42138" PostHistoryTypeId="5" PostId="4175" RevisionGUID="a640ea00-e72e-4461-ab9f-43c99eb77fb2" CreationDate="2023-12-05T07:20:51.863" UserId="116" Comment="Spelling dont -&gt; don't" Text="Pallets compile to WASM which means that all dependencies need to work in a *no-std* environment.  &#xD;&#xA;In your case it looks like one of your dependencies tries to generate random numbers.  &#xD;&#xA;This does not work in WASM and the dependency therefore prints that it cannot build.  &#xD;&#xA;There are a few cases where this can easily be fixed:  &#xD;&#xA;- Add the dependency as *dev* dependency if you only need it in tests.&#xD;&#xA;- Use the [proper way](https://substrate.stackexchange.com/questions/121/secure-random-number-generation) to generate randomness on-chain.&#xD;&#xA;- Use `cargo tree` to find out how the randomness dependency ends up in your pallet if you don't intend to use it.&#xD;&#xA;- Analyze the offending dependency and see if it even supports *no-std*.&#xD;&#xA;&#xD;&#xA;In any way; it always helps if you share the code. But hopefully this gives you a hint!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42139" PostHistoryTypeId="5" PostId="4174" RevisionGUID="8fe75a4f-80ac-469d-9503-a07a5a0e544c" CreationDate="2023-12-05T07:22:04.340" UserId="116" Comment="Spellcheck and language" Text="I'm attempting to implement a custom pallet, but I keep running into this compile error:&#xD;&#xA;```rs&#xD;&#xA;error: the wasm32-unknown-unknown target is not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /Users/jackson/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:235:9&#xD;&#xA;      |&#xD;&#xA;  235 | /         compile_error!(&quot;the wasm32-unknown-unknown target is not supported by \&#xD;&#xA;  236 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  237 | |                         For more information see: \&#xD;&#xA;  238 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /Users/jackson/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.2.7/src/lib.rs:262:5&#xD;&#xA;      |&#xD;&#xA;  262 |     imp::getrandom_inner(dest)&#xD;&#xA;      |     ^^^ use of undeclared crate or module `imp`&#xD;&#xA;```&#xD;&#xA;I have found a few other posts related to this but I haven't found an answer with a connection to the pallets. If I omit the custom pallet, then everything builds fine. Has anyone seen this issue before?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42140" PostHistoryTypeId="4" PostId="4174" RevisionGUID="8fe75a4f-80ac-469d-9503-a07a5a0e544c" CreationDate="2023-12-05T07:22:04.340" UserId="116" Comment="Spellcheck and language" Text="The wasm32-unknown-unknown target is not supported by default" ContentLicense="CC BY-SA 4.0" />
  <row Id="42141" PostHistoryTypeId="2" PostId="10591" RevisionGUID="e7d89a76-6f30-47a1-9238-6f892307f1d3" CreationDate="2023-12-05T09:09:46.000" UserId="2005" Text="it seems it's hard-coded to &quot;substrate&quot; in both [`sp-core`][1] and [here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/core/src/sr25519.rs#L60&#xD;&#xA;  [2]: https://github.com/polkadot-js/wasm/blob/61624a627b5e8c3359ccb2824346d6e1d6510392/packages/wasm-crypto/src/rs/sr25519.rs#L18" ContentLicense="CC BY-SA 4.0" />
  <row Id="42143" PostHistoryTypeId="12" PostId="10591" RevisionGUID="3f836d9c-90d6-4cbd-86b6-f3cd135fc3a3" CreationDate="2023-12-05T09:10:20.953" UserId="2005" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:4971,&quot;DisplayName&quot;:&quot;Dsa&quot;}],&quot;DeleteType&quot;:1}" />
  <row Id="42144" PostHistoryTypeId="13" PostId="10591" RevisionGUID="913b5c15-f45f-465f-b0db-3329a311227f" CreationDate="2023-12-05T09:12:44.403" UserId="2005" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:4971,&quot;DisplayName&quot;:&quot;Dsa&quot;}]}" />
  <row Id="42145" PostHistoryTypeId="2" PostId="10592" RevisionGUID="e2ccfaa7-cfd9-4a22-bb47-e8761276cedc" CreationDate="2023-12-05T09:59:46.183" UserId="4016" Text="I have a password-protected digital backup of an account using the JSON file from the Polkadot.JS extension. &#xD;&#xA;&#xD;&#xA;How do I get the mnemonic/seed phrase from this file so that I can back it up on paper? This account is staking and I do not want to move the funds." ContentLicense="CC BY-SA 4.0" />
  <row Id="42147" PostHistoryTypeId="1" PostId="10592" RevisionGUID="e2ccfaa7-cfd9-4a22-bb47-e8761276cedc" CreationDate="2023-12-05T09:59:46.183" UserId="4016" Text="Getting Mnemonic/Seed Phrase from JSON backups" ContentLicense="CC BY-SA 4.0" />
  <row Id="42148" PostHistoryTypeId="3" PostId="10592" RevisionGUID="e2ccfaa7-cfd9-4a22-bb47-e8761276cedc" CreationDate="2023-12-05T09:59:46.183" UserId="4016" Text="|polkadot-js|polkadot-js-extension|subkey|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42149" PostHistoryTypeId="34" PostId="10534" RevisionGUID="80d2f4a6-d319-4dbf-83c6-842881ea13e2" CreationDate="2023-12-05T10:04:05.513" UserId="-1" Comment="36" />
  <row Id="42150" PostHistoryTypeId="5" PostId="10592" RevisionGUID="88e82600-6339-4d50-b065-f0bfc48091a9" CreationDate="2023-12-05T10:06:16.750" UserId="4016" Comment="added 5 characters in body" Text="I have a password-protected digital backup of an account using the JSON file from the Polkadot.JS extension. &#xD;&#xA;&#xD;&#xA;How do I get the mnemonic/seed phrase from this file so that I can back it up on paper? This account is staking and I would prefer NOT to move the funds." ContentLicense="CC BY-SA 4.0" />
  <row Id="42151" PostHistoryTypeId="2" PostId="10593" RevisionGUID="b9c75c6b-b4cd-4e79-bf9c-196bce529cac" CreationDate="2023-12-05T12:24:34.653" UserId="555" Text="I'm using **pow substrate chain**. But After adding offchain worker in the pallet, chain doesn't produce block. But the same code is working on the freshly node template, after running this command:&#xD;&#xA;```&#xD;&#xA;$ curl --location --request POST 'http://localhost:9944' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;    &quot;params&quot;: [&quot;btc!&quot;,&quot;bread tongue spell stadium clean grief coin rent spend total practice document&quot;,&quot;0xb6a8b4b6bf796991065035093d3265e314c3fe89e75ccb623985e57b0c2e0c30&quot;],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But if I run the same command in our pow chain, then I'm facing this issue:&#xD;&#xA;```&#xD;&#xA;curl: (7) Failed to connect to localhost port 9944 after 3 ms: Couldn't connect to server&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here are some pow chain logs:&#xD;&#xA;```&#xD;&#xA;2023-12-05 13:06:07.268  WARN ThreadId(39) pow: Unable to import mined block: Import failed: Checking inherents failed: The timestamp of the block is too far in the future.    &#xD;&#xA;2023-12-05 13:06:07.386  INFO tokio-runtime-worker substrate:  Idle (2 peers), best: #470 (0x0876…ec5b), finalized #468 (0x89b4…f8d7), ⬇ 2.2kiB/s ⬆ 2.2kiB/s    &#xD;&#xA;2023-12-05 13:06:09.813 DEBUG tokio-runtime-worker runtime::system: [471] 0 extrinsics, length: 11 (normal 0%, op: 0%, mandatory 0%) / normal weight:Weight(ref_time: 0, proof_size: 0) (0%) op weight Weight(ref_time: 0, proof_size: 0) (0%) / mandatory weight Weight(ref_time: 679824000, proof_size: 1493) (0%)    &#xD;&#xA;2023-12-05 13:06:09.814  INFO tokio-runtime-worker substrate: ✨ Imported #471 (0x5226…f00f)    &#xD;&#xA;2023-12-05 13:06:09.814  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x5226eb612d622aabeed1a48a3fd4fcb7f9d24daf59d30c5f963e1cd7f427f00f    &#xD;&#xA;2023-12-05 13:06:09.814  INFO      offchain-worker pallet_template::pallet: Hello World from offchain workers!    &#xD;&#xA;2023-12-05 13:06:09.814 ERROR      offchain-worker pallet_template::pallet: Error: No local accounts available. Consider adding one via `author_insertKey` RPC.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think the error which shown in the log is because our inject command failed. So how can i inject keys in pow chain?&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm referring this pallet for integration: https://github.com/paritytech/substrate/blob/4abbf7f64222f0a47331624c0d0042d888cf6b10/frame/examples/offchain-worker-price-oracle/README.md&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42153" PostHistoryTypeId="1" PostId="10593" RevisionGUID="b9c75c6b-b4cd-4e79-bf9c-196bce529cac" CreationDate="2023-12-05T12:24:34.653" UserId="555" Text="Facing issue in adding offchain worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="42154" PostHistoryTypeId="3" PostId="10593" RevisionGUID="b9c75c6b-b4cd-4e79-bf9c-196bce529cac" CreationDate="2023-12-05T12:24:34.653" UserId="555" Text="|substrate-node-template|offchain-worker|subkey|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42155" PostHistoryTypeId="6" PostId="10593" RevisionGUID="18440f6f-bcc3-4677-901c-1b56a043d408" CreationDate="2023-12-05T13:14:16.630" UserId="555" Comment="edited tags" Text="|substrate-node-template|offchain|subkey|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42156" PostHistoryTypeId="5" PostId="10593" RevisionGUID="d43fd84b-dc88-47c3-882b-eef9cf0f371f" CreationDate="2023-12-05T13:25:15.810" UserId="555" Comment="deleted 90 characters in body" Text="I'm using **pow substrate chain**. But After adding offchain worker in the pallet and runtime, chain doesn't produce block. But the same code is working on the freshly node template, after running this command:&#xD;&#xA;```&#xD;&#xA;$ curl --location --request POST 'http://localhost:9944' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;    &quot;params&quot;: [&quot;btc!&quot;,&quot;bread tongue spell stadium clean grief coin rent spend total practice document&quot;,&quot;0xb6a8b4b6bf796991065035093d3265e314c3fe89e75ccb623985e57b0c2e0c30&quot;],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But if I run this same curl command in our pow chain, then I'm facing this issue:&#xD;&#xA;```&#xD;&#xA;curl: (7) Failed to connect to localhost port 9944 after 3 ms: Couldn't connect to server&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here are some pow chain logs:&#xD;&#xA;```&#xD;&#xA;2023-12-05 13:06:07.268  WARN ThreadId(39) pow: Unable to import mined block: Import failed: Checking inherents failed: The timestamp of the block is too far in the future.    &#xD;&#xA;2023-12-05 13:06:07.386  INFO tokio-runtime-worker substrate:  Idle (2 peers), best: #470 (0x0876…ec5b), finalized #468 (0x89b4…f8d7), ⬇ 2.2kiB/s ⬆ 2.2kiB/s    &#xD;&#xA;2023-12-05 13:06:09.813 DEBUG tokio-runtime-worker runtime::system: [471] 0 extrinsics, length: 11 (normal 0%, op: 0%, mandatory 0%) / normal weight:Weight(ref_time: 0, proof_size: 0) (0%) op weight Weight(ref_time: 0, proof_size: 0) (0%) / mandatory weight Weight(ref_time: 679824000, proof_size: 1493) (0%)    &#xD;&#xA;2023-12-05 13:06:09.814  INFO tokio-runtime-worker substrate: ✨ Imported #471 (0x5226…f00f)    &#xD;&#xA;2023-12-05 13:06:09.814  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship:  Starting consensus session on top of parent 0x5226eb612d622aabeed1a48a3fd4fcb7f9d24daf59d30c5f963e1cd7f427f00f    &#xD;&#xA;2023-12-05 13:06:09.814  INFO      offchain-worker pallet_template::pallet: Hello World from offchain workers!    &#xD;&#xA;2023-12-05 13:06:09.814 ERROR      offchain-worker pallet_template::pallet: Error: No local accounts available. Consider adding one via `author_insertKey` RPC.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can i solve this issue?&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm referring this pallet for integration: https://github.com/paritytech/substrate/blob/4abbf7f64222f0a47331624c0d0042d888cf6b10/frame/examples/offchain-worker-price-oracle/README.md&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42157" PostHistoryTypeId="2" PostId="10594" RevisionGUID="e40d989e-b846-460c-88e7-21ed09390a71" CreationDate="2023-12-05T15:36:04.130" UserId="372" Text="Offchain workers must also be enabled on the client side. Make sure you have configured the cli parameters to run the offchain workers. You must also spawn an offchain worker task in your client side code [like this](https://github.com/substrate-developer-hub/substrate-node-template/blob/41ad4a6c9d712ac4b6e16e79a8b3837af8234f46/node/src/service.rs#L183-L202).&#xD;&#xA;&#xD;&#xA;You mentioned you are using PoW. I've maintained a lot of the PoW based nodes that are out there, and I usually remove the offchain worker code from the client side.&#xD;&#xA;&#xD;&#xA;Please add a link to your exact code repo and include you cli parameters for a  more detailed answer." ContentLicense="CC BY-SA 4.0" />
  <row Id="42159" PostHistoryTypeId="5" PostId="10593" RevisionGUID="2a658471-cae1-41b3-a8f2-d6e63d6fcc00" CreationDate="2023-12-05T16:40:16.273" UserId="555" Comment="deleted 290 characters in body" Text="I'm using **pow substrate chain**.&#xD;&#xA;I'm running 3 validators by using these commands:&#xD;&#xA;&#xD;&#xA;For bob&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/bob \&#xD;&#xA;--chain local \&#xD;&#xA;--bob \&#xD;&#xA;--port 30335 \&#xD;&#xA;--rpc-port 9944 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;-lruntime=debug&#xD;&#xA;```&#xD;&#xA;For alice&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--rpc-port 9944 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator -lruntime=debug&#xD;&#xA;```&#xD;&#xA;For charlie&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/charlie \&#xD;&#xA;--chain local \&#xD;&#xA;--charlie \&#xD;&#xA;--port 30334 \&#xD;&#xA;--rpc-port 9944 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;-lruntime=debug&#xD;&#xA;```&#xD;&#xA;Then run this command to inject the keys:&#xD;&#xA;```&#xD;&#xA;$ curl --location --request POST 'http://localhost:9944' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;    &quot;params&quot;: [&quot;btc!&quot;,&quot;bread tongue spell stadium clean grief coin rent spend total practice document&quot;,&quot;0xb6a8b4b6bf796991065035093d3265e314c3fe89e75ccb623985e57b0c2e0c30&quot;],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;```&#xD;&#xA;But after running all of the above I didn't see the updated storage on polkadot UI. However I can see the fetched data in logs.&#xD;&#xA;I'm attaching all the logs for 3 validators:&#xD;&#xA;&#xD;&#xA;Alice logs:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Bob logs:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Charlie logs:&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;What can be the issue here?&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm referring this pallet for integration: https://github.com/paritytech/substrate/blob/4abbf7f64222f0a47331624c0d0042d888cf6b10/frame/examples/offchain-worker-price-oracle/README.md&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UEh5E.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/OfDoA.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/DJYtm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42160" PostHistoryTypeId="5" PostId="10593" RevisionGUID="2a9ad2b2-ae82-40bc-8f61-f78f56d528df" CreationDate="2023-12-05T18:05:52.030" UserId="555" Comment="deleted 112 characters in body" Text="I'm using **pow substrate chain**.&#xD;&#xA;I'm running 3 validators by using these commands:&#xD;&#xA;&#xD;&#xA;For bob&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/bob \&#xD;&#xA;--chain local \&#xD;&#xA;--bob \&#xD;&#xA;--port 30335 \&#xD;&#xA;--rpc-port 9944 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;-lruntime=debug&#xD;&#xA;```&#xD;&#xA;For alice&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/alice \&#xD;&#xA;--chain local \&#xD;&#xA;--alice \&#xD;&#xA;--port 30333 \&#xD;&#xA;--rpc-port 9944 \&#xD;&#xA;--node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator -lruntime=debug&#xD;&#xA;```&#xD;&#xA;For charlie&#xD;&#xA;```&#xD;&#xA;./target/release/node-template \&#xD;&#xA;--base-path /tmp/charlie \&#xD;&#xA;--chain local \&#xD;&#xA;--charlie \&#xD;&#xA;--port 30334 \&#xD;&#xA;--rpc-port 9944 \&#xD;&#xA;--telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;--validator \&#xD;&#xA;-lruntime=debug&#xD;&#xA;```&#xD;&#xA;Then run this command to inject the keys:&#xD;&#xA;```&#xD;&#xA;$ curl --location --request POST 'http://localhost:9944' \&#xD;&#xA;--header 'Content-Type: application/json' \&#xD;&#xA;--data-raw '{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;author_insertKey&quot;,&#xD;&#xA;    &quot;params&quot;: [&quot;btc!&quot;,&quot;bread tongue spell stadium clean grief coin rent spend total practice document&quot;,&quot;0xb6a8b4b6bf796991065035093d3265e314c3fe89e75ccb623985e57b0c2e0c30&quot;],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}'&#xD;&#xA;```&#xD;&#xA;I'm getting this type of logs:&#xD;&#xA;&#xD;&#xA;Alice logs:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Bob logs:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Charlie logs:&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Can anyone please help. why I'm getting error in the logs?&#xD;&#xA;&#xD;&#xA;Thanks in advance!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I'm referring this pallet for integration: https://github.com/paritytech/substrate/blob/4abbf7f64222f0a47331624c0d0042d888cf6b10/frame/examples/offchain-worker-price-oracle/README.md&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/UEh5E.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/OfDoA.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/DJYtm.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42161" PostHistoryTypeId="5" PostId="10588" RevisionGUID="9a4abd61-cdd9-4123-b025-db0440863ac0" CreationDate="2023-12-05T18:38:39.803" UserId="3053" Comment="added 6 characters in body" Text="&#xD;&#xA;I have a StorageMap named **PublicKeyToMsaId** which has around 300K inserted items and I want to iterate on all of those keys-values in ***offchain-worker*** to create a reverse map in offchain storage. &lt;br/&gt;&lt;br/&gt;&#xD;&#xA;To iterate I'm going to use **PublicKeyToMsaId::iter()** but by looking into the docs for iterator I can see the following&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;if you alter the map while doing this, you'll get undefined results.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Since I know that offchain-worker is running in a different thread, is it possible that when I'm iterating the map, an imported extrinsic might change some value on the map and the iterator on offchain-worker might end up in an undefined state?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42162" PostHistoryTypeId="52" PostId="10593" RevisionGUID="38ea74ca-7d95-4516-bb35-b83462a4f8fb" CreationDate="2023-12-05T20:25:43.080" />
  <row Id="42164" PostHistoryTypeId="2" PostId="10595" RevisionGUID="4763628d-5f1d-450f-8a8d-92a534569fd0" CreationDate="2023-12-06T08:55:07.197" UserId="4985" Text="I was trying to query `payment_queryInfo` on current Westend testnet, and the following payload used to works at spec 9430.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;payment_queryInfo&quot;,&#xD;&#xA;    &quot;params&quot;: [&#xD;&#xA;        &quot;0x41028400088ec8045cd8e9fbdd7080021030c5bf7240c9ea36a0648ea3bbe07d54de5d4d0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a50348000402002c50932cfc2b166f444027517b3421ddb59c64162f090197e4ccac19c30c237b0700e40b5402&quot;,&#xD;&#xA;        &quot;0x9ee56bc6165d9935abdbc2732cad4f44db4a8b08765c2e7a195c832946e64628&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But right now it will returns &#xD;&#xA;```&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x68d15 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0xd10b - &lt;unknown&gt;!core::panicking::panic_fmt::h3e1dd3d08288569e&#xD;&#xA;    2: 0x38dda9 - &lt;unknown&gt;!TransactionPaymentApi_query_info&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Anyone has any clue on why this error is popping up?&#xD;&#xA;&#xD;&#xA;Do I need to update my metadata or encoding method?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="42166" PostHistoryTypeId="1" PostId="10595" RevisionGUID="4763628d-5f1d-450f-8a8d-92a534569fd0" CreationDate="2023-12-06T08:55:07.197" UserId="4985" Text="payment_queryInfo returning Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed" ContentLicense="CC BY-SA 4.0" />
  <row Id="42167" PostHistoryTypeId="3" PostId="10595" RevisionGUID="4763628d-5f1d-450f-8a8d-92a534569fd0" CreationDate="2023-12-06T08:55:07.197" UserId="4985" Text="|substrate-node|json-rpc|runtime-api|substrate-api-client|go-substrate-rpc-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42168" PostHistoryTypeId="5" PostId="6301" RevisionGUID="149ef5b3-af6c-4bfd-94b5-71180700813f" CreationDate="2023-12-06T10:17:37.523" UserId="251" Comment="added 745 characters in body" Text="You can recover the private key but not the mnemonic seed because it uses a one-way algorithm.&#xD;&#xA;&#xD;&#xA;I don't feel familiar with the keystone to private key.&#xD;&#xA;&#xD;&#xA;But I got an idea. Maybe you could use this method https://paritytech.github.io/substrate/master/sp_application_crypto/sr25519/struct.Pair.html#method.from_entropy to get the private key.&#xD;&#xA;&#xD;&#xA;But I don't know how to deal with the keystone file.&#xD;&#xA;&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;	&quot;encoded&quot;: &quot;...&quot;,&#xD;&#xA;	&quot;encoding&quot;: {&#xD;&#xA;		&quot;content&quot;: [&#xD;&#xA;			&quot;pkcs8&quot;,&#xD;&#xA;			&quot;sr25519&quot;&#xD;&#xA;		],&#xD;&#xA;		&quot;type&quot;: [&#xD;&#xA;			&quot;scrypt&quot;,&#xD;&#xA;			&quot;xsalsa20-poly1305&quot;&#xD;&#xA;		],&#xD;&#xA;		&quot;version&quot;: &quot;3&quot;&#xD;&#xA;	},&#xD;&#xA;	&quot;address&quot;: &quot;...&quot;,&#xD;&#xA;	&quot;meta&quot;: {&#xD;&#xA;		&quot;genesisHash&quot;: &quot;...&quot;,&#xD;&#xA;		&quot;isHardware&quot;: false,&#xD;&#xA;		&quot;name&quot;: &quot;1&quot;,&#xD;&#xA;		&quot;tags&quot;: [],&#xD;&#xA;		&quot;whenCreated&quot;: 1670590064209&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It looks like that we need to decode the `encoded` field to get the raw `entropy` first.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I finally figured out how this works.&#xD;&#xA;&#xD;&#xA;The private key is called `MiniSecretkey` in the `schnorrkel` library. The `Secretkey` is an extension of `MiniSecretkey` with some hash functions. The encrypted version of the `Secretkey` is stored in the JSON file's `encoding` section, making it impossible to recover the private key from the JSON file.&#xD;&#xA;&#xD;&#xA;I have added a decrypt feature to Subalfred. You can use it to recover the `Secretkey`. However, please note that there is no wallet support for importing a 64-byte `Secretkey`. You may need to write your own program using these types of keys (which can be easily done with the `schnorrkel` library).&#xD;&#xA;&#xD;&#xA;Check latest Subalfred at https://github.com/hack-ink/subalfred/releases/latest." ContentLicense="CC BY-SA 4.0" />
  <row Id="42169" PostHistoryTypeId="2" PostId="10596" RevisionGUID="73fe7c69-3822-4e9c-bcf7-61f701712431" CreationDate="2023-12-06T11:01:37.533" UserId="4993" Text="I am looking for a way to validate a signature with a Polkadot wallet in Node.js. I am looking for some lightweight library which supports this since @polkadot-util/crypto is a bit too heavy based on my requirements. Are there any alternative libraries or some other methods I can use to validate signatures using javascript/typescript?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="42171" PostHistoryTypeId="1" PostId="10596" RevisionGUID="73fe7c69-3822-4e9c-bcf7-61f701712431" CreationDate="2023-12-06T11:01:37.533" UserId="4993" Text="Polkadot wallet signature verification" ContentLicense="CC BY-SA 4.0" />
  <row Id="42172" PostHistoryTypeId="3" PostId="10596" RevisionGUID="73fe7c69-3822-4e9c-bcf7-61f701712431" CreationDate="2023-12-06T11:01:37.533" UserId="4993" Text="|polkadot|signatures|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42173" PostHistoryTypeId="2" PostId="10597" RevisionGUID="84fafd27-22c6-41d1-9911-8f8ab3118664" CreationDate="2023-12-06T11:21:42.697" UserId="4314" Text="`payment_queryInfo` is deprecated, it's been replaced by `api.call.transactionPaymentApi.queryInfo`, or if you prefer using RPC, you could use `state_call` with `TransactionPaymentApi_query_info` and the encoded extrinsic as the arguments." ContentLicense="CC BY-SA 4.0" />
  <row Id="42175" PostHistoryTypeId="5" PostId="10596" RevisionGUID="37682da0-be17-48b3-8554-3edbab844a2a" CreationDate="2023-12-06T11:43:38.310" UserId="4993" Comment="added 50 characters in body" Text="I am looking for a way to validate a signature from any Polkadot wallet in Node.js. Preferably it would be some lightweight library which supports this since @polkadot-util/crypto is a bit too heavy based on my requirements. &#xD;&#xA;&#xD;&#xA;Are there any alternative libraries or some other methods I can use to validate polkadot wallet signatures for a given message using Typescript or Javascript? &#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="42176" PostHistoryTypeId="5" PostId="10595" RevisionGUID="952570d1-0902-4f90-8d41-5ff90b31029f" CreationDate="2023-12-06T12:15:13.087" UserId="4985" Comment="added 928 characters in body" Text="I was trying to query `payment_queryInfo` on current Westend testnet, and the following payload used to works at spec 9430.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;payment_queryInfo&quot;,&#xD;&#xA;    &quot;params&quot;: [&#xD;&#xA;        &quot;0x41028400088ec8045cd8e9fbdd7080021030c5bf7240c9ea36a0648ea3bbe07d54de5d4d0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a50348000402002c50932cfc2b166f444027517b3421ddb59c64162f090197e4ccac19c30c237b0700e40b5402&quot;,&#xD;&#xA;        &quot;0x9ee56bc6165d9935abdbc2732cad4f44db4a8b08765c2e7a195c832946e64628&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But right now it will returns &#xD;&#xA;```&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x68d15 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0xd10b - &lt;unknown&gt;!core::panicking::panic_fmt::h3e1dd3d08288569e&#xD;&#xA;    2: 0x38dda9 - &lt;unknown&gt;!TransactionPaymentApi_query_info&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I know this RPC method id deprecated so I tried to switch to `state_call` with the following request:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;state_call&quot;,&#xD;&#xA;    &quot;params&quot;: [&#xD;&#xA;        &quot;TransactionPaymentApi_query_info&quot;,&#xD;&#xA;        &quot;0x41028400088ec8045cd8e9fbdd7080021030c5bf7240c9ea36a0648ea3bbe07d54de5d4d0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a50348000402002c50932cfc2b166f444027517b3421ddb59c64162f090197e4ccac19c30c237b0700e40b5402&quot;,&#xD;&#xA;        &quot;0x9ee56bc6165d9935abdbc2732cad4f44db4a8b08765c2e7a195c832946e64628&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but still it is returning:&#xD;&#xA;```&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x68d15 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 1: 0xd10b - &lt;unknown&gt;!core::panicking::panic_fmt::h3e1dd3d08288569e&#xD;&#xA;    2: 0x38dda9 - &lt;unknown&gt;!TransactionPaymentApi_query_info&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyone has any clue on why this error is popping up?&#xD;&#xA;&#xD;&#xA;Do I need to update my metadata or encoding method?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="42177" PostHistoryTypeId="2" PostId="10598" RevisionGUID="d2c49288-271e-4967-a716-bd049ff9a915" CreationDate="2023-12-06T13:49:21.103" UserId="3625" Text="It was a weird situation. It seems like during deployment, we had some runtime precached in volume, so it deployed with an older version of runtime that was missing beefy. Meanwhile, when we looked into the runtime code, it was populated, so we missed the session key storage migration that corrupted the runtime. &#xD;&#xA;&#xD;&#xA;Luckily, it was our private chain that we easily reverted." ContentLicense="CC BY-SA 4.0" />
  <row Id="42180" PostHistoryTypeId="2" PostId="10599" RevisionGUID="f238b1a6-386a-4f1d-bde9-da84a7ca0a9e" CreationDate="2023-12-06T15:58:24.163" UserId="2454" Text="When specifying `sc-network` as a dependency:&#xD;&#xA;&#xD;&#xA;`sc-network = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v1.0.0&quot;  }`&#xD;&#xA;&#xD;&#xA;I get a compile error:&#xD;&#xA;```rust&#xD;&#xA;error[E0433]: failed to resolve: could not find `Config` in `noise`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/substrate-v1.0.0-f46efbfc9f6c7936/948fbd2/client/network/src/transport.rs:83:37&#xD;&#xA;   |&#xD;&#xA;83 |     let authentication_config = noise::Config::new(&amp;keypair).expect(&quot;Can create noise config. qed&quot;);&#xD;&#xA;   |                                        ^^^^^^ could not find `Config` in `noise`&#xD;&#xA;   |&#xD;&#xA;help: consider importing one of these items&#xD;&#xA;   |&#xD;&#xA;21 + use crate::Config;&#xD;&#xA;   |&#xD;&#xA;21 + use crate::transport::tcp::Config;&#xD;&#xA;   |&#xD;&#xA;21 + use crate::transport::websocket::tls::Config;&#xD;&#xA;   |&#xD;&#xA;help: if you import `Config`, refer to it directly&#xD;&#xA;   |&#xD;&#xA;83 -     let authentication_config = noise::Config::new(&amp;keypair).expect(&quot;Can create noise config. qed&quot;);&#xD;&#xA;83 +     let authentication_config = Config::new(&amp;keypair).expect(&quot;Can create noise config. qed&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Upon further inspection, the `sc-network` crate specifies using libp2p version 0.51.3, yet, attempts to call this function: https://github.com/paritytech/substrate/blob/948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d/client/network/src/transport.rs#L83&#xD;&#xA;&#xD;&#xA;The function `noise::Config::new` does not exist for libp2p version 0.51.3. It doesn’t exist until the next version (0.52.0). Working in Polkadot has historically given me lots of unorthodox dependency issues, which leads me to believe there might be something I’m overlooking here." ContentLicense="CC BY-SA 4.0" />
  <row Id="42182" PostHistoryTypeId="1" PostId="10599" RevisionGUID="f238b1a6-386a-4f1d-bde9-da84a7ca0a9e" CreationDate="2023-12-06T15:58:24.163" UserId="2454" Text="Polkadot-v1.0.0: sc-network is failing to compile" ContentLicense="CC BY-SA 4.0" />
  <row Id="42183" PostHistoryTypeId="3" PostId="10599" RevisionGUID="f238b1a6-386a-4f1d-bde9-da84a7ca0a9e" CreationDate="2023-12-06T15:58:24.163" UserId="2454" Text="|polkadot|rust|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42184" PostHistoryTypeId="50" PostId="7548" RevisionGUID="e7b2052e-1484-41ad-9ee3-ad86fccfe02c" CreationDate="2023-12-06T16:02:45.330" UserId="-1" />
  <row Id="42185" PostHistoryTypeId="5" PostId="10599" RevisionGUID="cb96e2ae-635f-45ac-ae62-0531fa3fe12b" CreationDate="2023-12-06T16:12:20.867" UserId="2454" Comment="deleted 7 characters in body" Text="When specifying `sc-network` as a dependency:&#xD;&#xA;&#xD;&#xA;`sc-network = { git = &quot;https://github.com/paritytech/substrate&quot;, branch = &quot;polkadot-v1.0.0&quot;  }`&#xD;&#xA;&#xD;&#xA;I get a compile error:&#xD;&#xA;```rust&#xD;&#xA;error[E0433]: failed to resolve: could not find `Config` in `noise`&#xD;&#xA;  --&gt; /Users/nologik/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/client/network/src/transport.rs:83:37&#xD;&#xA;   |&#xD;&#xA;83 |     let authentication_config = noise::Config::new(&amp;keypair).expect(&quot;Can create noise config. qed&quot;);&#xD;&#xA;   |                                        ^^^^^^ could not find `Config` in `noise`&#xD;&#xA;   |&#xD;&#xA;help: consider importing one of these items&#xD;&#xA;   |&#xD;&#xA;21 + use crate::Config;&#xD;&#xA;   |&#xD;&#xA;21 + use crate::transport::tcp::Config;&#xD;&#xA;   |&#xD;&#xA;21 + use crate::transport::websocket::tls::Config;&#xD;&#xA;   |&#xD;&#xA;help: if you import `Config`, refer to it directly&#xD;&#xA;   |&#xD;&#xA;83 -     let authentication_config = noise::Config::new(&amp;keypair).expect(&quot;Can create noise config. qed&quot;);&#xD;&#xA;83 +     let authentication_config = Config::new(&amp;keypair).expect(&quot;Can create noise config. qed&quot;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Upon further inspection, the `sc-network` crate specifies using libp2p version 0.51.3, yet, attempts to call this function: https://github.com/paritytech/substrate/blob/948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d/client/network/src/transport.rs#L83&#xD;&#xA;&#xD;&#xA;The function `noise::Config::new` does not exist for libp2p version 0.51.3. It doesn’t exist until the next version (0.52.0). Working in Polkadot has historically given me lots of unorthodox dependency issues, which leads me to believe there might be something I’m overlooking here." ContentLicense="CC BY-SA 4.0" />
  <row Id="42186" PostHistoryTypeId="50" PostId="10408" RevisionGUID="0eca9453-701f-471e-9af6-745ec7738e68" CreationDate="2023-12-06T17:04:10.480" UserId="-1" />
  <row Id="42187" PostHistoryTypeId="50" PostId="9210" RevisionGUID="2953f25a-c0f3-47b6-a051-e5b6f9abafe2" CreationDate="2023-12-06T18:05:25.660" UserId="-1" />
  <row Id="42188" PostHistoryTypeId="6" PostId="10593" RevisionGUID="ea2ad7c4-848e-4d15-bfe2-d66793676b98" CreationDate="2023-12-06T20:57:09.300" UserId="372" Comment="Update tags" Text="|substrate-node-template|offchain-worker|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42189" PostHistoryTypeId="5" PostId="10596" RevisionGUID="6225b422-2924-4224-a47e-38d8b54e9c6b" CreationDate="2023-12-06T21:40:14.597" UserId="354" Comment="improved formatting" Text="I am looking for a way to validate a signature from any Polkadot wallet in `Node.js`. Preferably it would be some lightweight library which supports this since `@polkadot-util/crypto` is a bit too heavy based on my requirements. &#xD;&#xA;&#xD;&#xA;Are there any alternative libraries or some other methods that I can use to validate polkadot wallet signatures for a given message using Typescript or Javascript? &#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="42190" PostHistoryTypeId="24" PostId="10596" RevisionGUID="6225b422-2924-4224-a47e-38d8b54e9c6b" CreationDate="2023-12-06T21:40:14.597" Comment="Proposed by 354 approved by 4993 edit id of 616" ContentLicense="CC BY-SA 4.0" />
  <row Id="42191" PostHistoryTypeId="2" PostId="10600" RevisionGUID="8dd58705-0768-402b-94b5-a30961eac3c6" CreationDate="2023-12-06T23:18:21.067" UserId="4813" Text="Is there a way to get some informations for an already benchmarked pallet on the weights like the minimum and maximum weights that can be used for a function (worst case/best case) ? " ContentLicense="CC BY-SA 4.0" />
  <row Id="42193" PostHistoryTypeId="1" PostId="10600" RevisionGUID="8dd58705-0768-402b-94b5-a30961eac3c6" CreationDate="2023-12-06T23:18:21.067" UserId="4813" Text="Get weights data from a benchmarked pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="42194" PostHistoryTypeId="3" PostId="10600" RevisionGUID="8dd58705-0768-402b-94b5-a30961eac3c6" CreationDate="2023-12-06T23:18:21.067" UserId="4813" Text="|pallet|benchmarking|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42195" PostHistoryTypeId="2" PostId="10601" RevisionGUID="60546cc4-69cc-4369-a7ec-813270fc63cf" CreationDate="2023-12-07T07:27:08.573" UserId="4123" Text="I have made a contract in ink! that build fine, and I am trying to make e2e tests. I don't manage to do this even by using the exemples in ink! repertory.&#xD;&#xA;&#xD;&#xA;My contract is a swap contract : it takes the two contracts address, and allow two users to exchange their tokens. &#xD;&#xA;&#xD;&#xA;Below is the beginning of my contract : &#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_main)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod token_swap {&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use ink::LangError;&#xD;&#xA;    use ink_env::call::{build_call, ExecutionInput, Selector};&#xD;&#xA;    use ink_env::DefaultEnvironment;&#xD;&#xA;&#xD;&#xA;    pub type Swap = (&#xD;&#xA;        AccountId,         // creator&#xD;&#xA;        AccountId,         // token_a&#xD;&#xA;        AccountId,         // token_b&#xD;&#xA;        Balance,           // amount_a&#xD;&#xA;        Balance,           // amount_b&#xD;&#xA;       &#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        SwapNotFound,&#xD;&#xA;        InsufficientBalance,&#xD;&#xA;        Unauthorized,&#xD;&#xA;        SwapExpired,&#xD;&#xA;        TransferFailed,&#xD;&#xA;        CallFailed,&#xD;&#xA; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct TokenSwap {&#xD;&#xA;        pub swaps: Mapping&lt;u64, Swap&gt;,&#xD;&#xA;        pub swap_count: u64,&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct SwapCreated {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        id: u64,&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        creator: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct SwapAccepted {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        id: u64,&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        acceptor: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct SwapDeleted {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        id: u64,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl TokenSwap {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                swaps: Default::default(),&#xD;&#xA;                swap_count: 0,&#xD;&#xA;  &#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        fn get_balance(&amp;self, token_contract: AccountId, account: AccountId) -&gt; Result&lt;Balance&gt; {&#xD;&#xA;            let result: core::result::Result&lt;&#xD;&#xA;                core::result::Result&lt;Balance, LangError&gt;,&#xD;&#xA;                ink_env::Error,&#xD;&#xA;            &gt; = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                .call(token_contract)&#xD;&#xA;                .gas_limit(5000)&#xD;&#xA;                .transferred_value(0)&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;balance_of&quot;)))&#xD;&#xA;                        .push_arg(account),&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;Balance&gt;()&#xD;&#xA;                .try_invoke();&#xD;&#xA;&#xD;&#xA;            match result {&#xD;&#xA;                Ok(Ok(balance)) =&gt; Ok(balance),&#xD;&#xA;                Ok(Err(_)) =&gt; Err(Error::InsufficientBalance),&#xD;&#xA;                Err(_) =&gt; Err(Error::CallFailed),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        pub fn create_swap(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            token_a: AccountId,&#xD;&#xA;            token_b: AccountId,&#xD;&#xA;            amount_a: Balance,&#xD;&#xA;            amount_b: Balance,&#xD;&#xA;&#xD;&#xA;        ) -&gt; Result&lt;u64&gt; {&#xD;&#xA;&#xD;&#xA;                let caller = self.env().caller();&#xD;&#xA;                let balance_a: Balance = self.get_balance(token_a, caller)?;&#xD;&#xA;&#xD;&#xA;                if balance_a &lt; amount_a {&#xD;&#xA;                    return Err(Error::InsufficientBalance);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                let balance_b: Balance = self.get_balance(token_b, caller)?;&#xD;&#xA;                if balance_b &lt; amount_b {&#xD;&#xA;                    return Err(Error::InsufficientBalance);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                self.transfer_token(token_a, caller, self.env().account_id(), amount_a)?;&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;                let new_swap = (&#xD;&#xA;                    caller,&#xD;&#xA;                    token_a,&#xD;&#xA;                    token_b,&#xD;&#xA;                    amount_a,&#xD;&#xA;                    amount_b,&#xD;&#xA;     &#xD;&#xA;                );&#xD;&#xA;&#xD;&#xA;                self.swaps.insert(self.swap_count, &amp;new_swap);&#xD;&#xA;                let id = self.swap_count;&#xD;&#xA;                self.swap_count = self.swap_count.checked_add(1).ok_or(Error::CallFailed)?;&#xD;&#xA;&#xD;&#xA;                self.env().emit_event(SwapCreated {&#xD;&#xA;                    id,&#xD;&#xA;                    creator: caller,&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;                Ok(id)&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to make e2e tests, so to do that, I wanted to add erc20 contract (from parity) and add it to my cargo toml.&#xD;&#xA;I did that, but it does not work, and I don't understand how to do it ...&#xD;&#xA;&#xD;&#xA;Here is the Cargo toml of my contract : &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.2.0&quot;, default-features = false }&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.6&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;ink_env = { version = &quot;4.2.1&quot;, default-features = false }&#xD;&#xA;ink_lang = { version = &quot;3.4.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.2.1&quot;&#xD;&#xA;erc20 = { path = &quot;../erc20&quot;, default-features = false, features = [&quot;ink-as-dependency&quot;] }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;ink_env/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;    &quot;ink_lang/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And here is the test : &#xD;&#xA;```&#xD;&#xA;mod e2e_tests {&#xD;&#xA;    use super::*;&#xD;&#xA;    use erc20::erc20::Erc20;&#xD;&#xA;    use ink_e2e::build_message;&#xD;&#xA;&#xD;&#xA;    type E2EResult&lt;T&gt; = std::result::Result&lt;T, Box&lt;dyn std::error::Error&gt;&gt;;&#xD;&#xA;&#xD;&#xA;    #[ink_e2e::test(additional_contracts = &quot;erc20/Cargo.toml &quot;)]&#xD;&#xA;    async fn create_swap_works(mut client: ink_e2e::Client&lt;C, E&gt;) -&gt; E2EResult&lt;()&gt; {&#xD;&#xA;        // Instantiate erc20 contract&#xD;&#xA;        let token_a = Erc20::new(100);&#xD;&#xA;        let token_b = Erc20::new(100);&#xD;&#xA;&#xD;&#xA;        let accounts = ink::env::test::default_accounts::&lt;ink::env::DefaultEnvironment&gt;();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            let amount_a = 100u128;&#xD;&#xA;            let amount_b = 100u32;&#xD;&#xA;  &#xD;&#xA;         let constructor = TokenSwapRef::new_default();&#xD;&#xA;            let contract_acc_id = client&#xD;&#xA;                .instantiate(&quot;token_swap&quot;, &amp;ink_e2e::bob(), constructor, 0, None)&#xD;&#xA;                .await&#xD;&#xA;                .expect(&quot;instantiate failed&quot;)&#xD;&#xA;                .account_id;&#xD;&#xA;&#xD;&#xA;            let create_swap = build_message::&lt;TokenSwapRef&gt;(contract_acc_id.clone())&#xD;&#xA;                .call(|token_swap| token_swap.create_swap(token_a, token_b, amount_a, amount_b));&#xD;&#xA;            let create_swap_res = client&#xD;&#xA;                .call(&amp;ink_e2e::bob(), create_swap, 0, None)&#xD;&#xA;                await&#xD;&#xA;                .expect(&quot;create_swap failed&quot;);&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If someone could explain step by step how to achieve it, I would be so grateful, all I tried did not work ...&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42197" PostHistoryTypeId="1" PostId="10601" RevisionGUID="60546cc4-69cc-4369-a7ec-813270fc63cf" CreationDate="2023-12-07T07:27:08.573" UserId="4123" Text="How to do cross contract e2e tests on ink!?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42198" PostHistoryTypeId="3" PostId="10601" RevisionGUID="60546cc4-69cc-4369-a7ec-813270fc63cf" CreationDate="2023-12-07T07:27:08.573" UserId="4123" Text="|ink|smart-contract|e2e|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42199" PostHistoryTypeId="33" PostId="10561" RevisionGUID="bbf92f5e-3fd3-44d7-80e9-087a506c5f0e" CreationDate="2023-12-07T10:22:29.173" UserId="386" Comment="37" />
  <row Id="42200" PostHistoryTypeId="2" PostId="10602" RevisionGUID="4e57e1dd-e67d-4b93-af51-a985a071ad3a" CreationDate="2023-12-07T11:10:00.097" UserId="4805" Text="I wanted to confirm a scenario as it was brought up by a community member and my Rust reading skills are not great haha.&#xD;&#xA;&#xD;&#xA;So let's say there is a Vote in which the tally is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Aye: 10&#xD;&#xA;Nay: 5&#xD;&#xA;Support: 10&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Voter A has 5 tokens delegated to his name, and he decides to Abstain with his own 2 tokens, meaning his &quot;voten power&quot; (let's not account delegation conviction) is 7. It seems that delegation is not considered when voting Abstain tho, so the new tally is now:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Aye: 10&#xD;&#xA;Nay: 5&#xD;&#xA;Support: 12&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is this on purpose?&#xD;&#xA;&#xD;&#xA;The relevant code is seen [here](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/lib.rs#L391-L433) - Where you can see that delegations are only considered inside of a `vote.as_standard` conditional. [Standard votes](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/vote.rs#L71-L114) are only `aye` or `nay`, as `abstain` is only an option for `SplitAbstain`. The `as_standard` function returns `true` only if the vote is `Standard`.&#xD;&#xA;&#xD;&#xA;Anyways, wdyt?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42202" PostHistoryTypeId="1" PostId="10602" RevisionGUID="4e57e1dd-e67d-4b93-af51-a985a071ad3a" CreationDate="2023-12-07T11:10:00.097" UserId="4805" Text="Delegations are not Accounted for Abstains" ContentLicense="CC BY-SA 4.0" />
  <row Id="42203" PostHistoryTypeId="3" PostId="10602" RevisionGUID="4e57e1dd-e67d-4b93-af51-a985a071ad3a" CreationDate="2023-12-07T11:10:00.097" UserId="4805" Text="|democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42204" PostHistoryTypeId="5" PostId="10601" RevisionGUID="046a4ab2-89cb-4e20-a30a-22a8cdacddd4" CreationDate="2023-12-07T12:54:12.903" UserId="354" Comment="improved formatting" Text="I have made a contract in ink! that build fine, and I am trying to make e2e tests. I don't manage to do this even by using the exemples in ink! repertory.&#xD;&#xA;&#xD;&#xA;My contract is a swap contract : it takes the two contracts address, and allow two users to exchange their tokens. &#xD;&#xA;&#xD;&#xA;Below is the beginning of my contract : &#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_main)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod token_swap {&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use ink::LangError;&#xD;&#xA;    use ink_env::call::{build_call, ExecutionInput, Selector};&#xD;&#xA;    use ink_env::DefaultEnvironment;&#xD;&#xA;&#xD;&#xA;    pub type Swap = (&#xD;&#xA;        AccountId,         // creator&#xD;&#xA;        AccountId,         // token_a&#xD;&#xA;        AccountId,         // token_b&#xD;&#xA;        Balance,           // amount_a&#xD;&#xA;        Balance,           // amount_b&#xD;&#xA;       &#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        SwapNotFound,&#xD;&#xA;        InsufficientBalance,&#xD;&#xA;        Unauthorized,&#xD;&#xA;        SwapExpired,&#xD;&#xA;        TransferFailed,&#xD;&#xA;        CallFailed,&#xD;&#xA; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct TokenSwap {&#xD;&#xA;        pub swaps: Mapping&lt;u64, Swap&gt;,&#xD;&#xA;        pub swap_count: u64,&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct SwapCreated {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        id: u64,&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        creator: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct SwapAccepted {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        id: u64,&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        acceptor: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct SwapDeleted {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        id: u64,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl TokenSwap {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                swaps: Default::default(),&#xD;&#xA;                swap_count: 0,&#xD;&#xA;  &#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        fn get_balance(&amp;self, token_contract: AccountId, account: AccountId) -&gt; Result&lt;Balance&gt; {&#xD;&#xA;            let result: core::result::Result&lt;&#xD;&#xA;                core::result::Result&lt;Balance, LangError&gt;,&#xD;&#xA;                ink_env::Error,&#xD;&#xA;            &gt; = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                .call(token_contract)&#xD;&#xA;                .gas_limit(5000)&#xD;&#xA;                .transferred_value(0)&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;balance_of&quot;)))&#xD;&#xA;                        .push_arg(account),&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;Balance&gt;()&#xD;&#xA;                .try_invoke();&#xD;&#xA;&#xD;&#xA;            match result {&#xD;&#xA;                Ok(Ok(balance)) =&gt; Ok(balance),&#xD;&#xA;                Ok(Err(_)) =&gt; Err(Error::InsufficientBalance),&#xD;&#xA;                Err(_) =&gt; Err(Error::CallFailed),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        pub fn create_swap(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            token_a: AccountId,&#xD;&#xA;            token_b: AccountId,&#xD;&#xA;            amount_a: Balance,&#xD;&#xA;            amount_b: Balance,&#xD;&#xA;&#xD;&#xA;        ) -&gt; Result&lt;u64&gt; {&#xD;&#xA;&#xD;&#xA;                let caller = self.env().caller();&#xD;&#xA;                let balance_a: Balance = self.get_balance(token_a, caller)?;&#xD;&#xA;&#xD;&#xA;                if balance_a &lt; amount_a {&#xD;&#xA;                    return Err(Error::InsufficientBalance);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                let balance_b: Balance = self.get_balance(token_b, caller)?;&#xD;&#xA;                if balance_b &lt; amount_b {&#xD;&#xA;                    return Err(Error::InsufficientBalance);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                self.transfer_token(token_a, caller, self.env().account_id(), amount_a)?;&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;                let new_swap = (&#xD;&#xA;                    caller,&#xD;&#xA;                    token_a,&#xD;&#xA;                    token_b,&#xD;&#xA;                    amount_a,&#xD;&#xA;                    amount_b,&#xD;&#xA;     &#xD;&#xA;                );&#xD;&#xA;&#xD;&#xA;                self.swaps.insert(self.swap_count, &amp;new_swap);&#xD;&#xA;                let id = self.swap_count;&#xD;&#xA;                self.swap_count = self.swap_count.checked_add(1).ok_or(Error::CallFailed)?;&#xD;&#xA;&#xD;&#xA;                self.env().emit_event(SwapCreated {&#xD;&#xA;                    id,&#xD;&#xA;                    creator: caller,&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;                Ok(id)&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to make e2e tests, so to do that, I wanted to add erc20 contract (from parity) and add it to my cargo toml.&#xD;&#xA;I did that, but it does not work, and I don't understand how to do it ...&#xD;&#xA;&#xD;&#xA;Here is the Cargo toml of my contract : &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.2.0&quot;, default-features = false }&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.6&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;ink_env = { version = &quot;4.2.1&quot;, default-features = false }&#xD;&#xA;ink_lang = { version = &quot;3.4.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.2.1&quot;&#xD;&#xA;erc20 = { path = &quot;../erc20&quot;, default-features = false, features = [&quot;ink-as-dependency&quot;] }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;ink_env/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;    &quot;ink_lang/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And here is the test : &#xD;&#xA;```rust&#xD;&#xA;mod e2e_tests {&#xD;&#xA;    use super::*;&#xD;&#xA;    use erc20::erc20::Erc20;&#xD;&#xA;    use ink_e2e::build_message;&#xD;&#xA;&#xD;&#xA;    type E2EResult&lt;T&gt; = std::result::Result&lt;T, Box&lt;dyn std::error::Error&gt;&gt;;&#xD;&#xA;&#xD;&#xA;    #[ink_e2e::test(additional_contracts = &quot;erc20/Cargo.toml &quot;)]&#xD;&#xA;    async fn create_swap_works(mut client: ink_e2e::Client&lt;C, E&gt;) -&gt; E2EResult&lt;()&gt; {&#xD;&#xA;        // Instantiate erc20 contract&#xD;&#xA;        let token_a = Erc20::new(100);&#xD;&#xA;        let token_b = Erc20::new(100);&#xD;&#xA;&#xD;&#xA;        let accounts = ink::env::test::default_accounts::&lt;ink::env::DefaultEnvironment&gt;();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            let amount_a = 100u128;&#xD;&#xA;            let amount_b = 100u32;&#xD;&#xA;  &#xD;&#xA;         let constructor = TokenSwapRef::new_default();&#xD;&#xA;            let contract_acc_id = client&#xD;&#xA;                .instantiate(&quot;token_swap&quot;, &amp;ink_e2e::bob(), constructor, 0, None)&#xD;&#xA;                .await&#xD;&#xA;                .expect(&quot;instantiate failed&quot;)&#xD;&#xA;                .account_id;&#xD;&#xA;&#xD;&#xA;            let create_swap = build_message::&lt;TokenSwapRef&gt;(contract_acc_id.clone())&#xD;&#xA;                .call(|token_swap| token_swap.create_swap(token_a, token_b, amount_a, amount_b));&#xD;&#xA;            let create_swap_res = client&#xD;&#xA;                .call(&amp;ink_e2e::bob(), create_swap, 0, None)&#xD;&#xA;                await&#xD;&#xA;                .expect(&quot;create_swap failed&quot;);&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If someone could explain step by step how to achieve it, I would be so grateful, all I tried did not work ...&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42205" PostHistoryTypeId="4" PostId="10601" RevisionGUID="046a4ab2-89cb-4e20-a30a-22a8cdacddd4" CreationDate="2023-12-07T12:54:12.903" UserId="354" Comment="improved formatting" Text="How to do cross contract e2e tests on ink?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42206" PostHistoryTypeId="24" PostId="10601" RevisionGUID="046a4ab2-89cb-4e20-a30a-22a8cdacddd4" CreationDate="2023-12-07T12:54:12.903" Comment="Proposed by 354 approved by -1 edit id of 617" ContentLicense="CC BY-SA 4.0" />
  <row Id="42207" PostHistoryTypeId="5" PostId="10601" RevisionGUID="3b51607c-09bd-4348-9b20-cd0863b05dd2" CreationDate="2023-12-07T12:54:12.903" UserId="116" Comment="improved formatting" Text="I have made a contract in ink! that build fine, and I am trying to make e2e tests. I don't manage to do this even by using the examples in ink! repertory.&#xD;&#xA;&#xD;&#xA;My contract is a swap contract: it takes the two contracts address, and allow two users to exchange their tokens. &#xD;&#xA;&#xD;&#xA;Below is the beginning of my contract: &#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_main)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod token_swap {&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use ink::LangError;&#xD;&#xA;    use ink_env::call::{build_call, ExecutionInput, Selector};&#xD;&#xA;    use ink_env::DefaultEnvironment;&#xD;&#xA;&#xD;&#xA;    pub type Swap = (&#xD;&#xA;        AccountId,         // creator&#xD;&#xA;        AccountId,         // token_a&#xD;&#xA;        AccountId,         // token_b&#xD;&#xA;        Balance,           // amount_a&#xD;&#xA;        Balance,           // amount_b&#xD;&#xA;       &#xD;&#xA;    );&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        SwapNotFound,&#xD;&#xA;        InsufficientBalance,&#xD;&#xA;        Unauthorized,&#xD;&#xA;        SwapExpired,&#xD;&#xA;        TransferFailed,&#xD;&#xA;        CallFailed,&#xD;&#xA; &#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct TokenSwap {&#xD;&#xA;        pub swaps: Mapping&lt;u64, Swap&gt;,&#xD;&#xA;        pub swap_count: u64,&#xD;&#xA;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct SwapCreated {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        id: u64,&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        creator: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct SwapAccepted {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        id: u64,&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        acceptor: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[ink(event)]&#xD;&#xA;    pub struct SwapDeleted {&#xD;&#xA;        #[ink(topic)]&#xD;&#xA;        id: u64,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl TokenSwap {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                swaps: Default::default(),&#xD;&#xA;                swap_count: 0,&#xD;&#xA;  &#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;        fn get_balance(&amp;self, token_contract: AccountId, account: AccountId) -&gt; Result&lt;Balance&gt; {&#xD;&#xA;            let result: core::result::Result&lt;&#xD;&#xA;                core::result::Result&lt;Balance, LangError&gt;,&#xD;&#xA;                ink_env::Error,&#xD;&#xA;            &gt; = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;                .call(token_contract)&#xD;&#xA;                .gas_limit(5000)&#xD;&#xA;                .transferred_value(0)&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;balance_of&quot;)))&#xD;&#xA;                        .push_arg(account),&#xD;&#xA;                )&#xD;&#xA;                .returns::&lt;Balance&gt;()&#xD;&#xA;                .try_invoke();&#xD;&#xA;&#xD;&#xA;            match result {&#xD;&#xA;                Ok(Ok(balance)) =&gt; Ok(balance),&#xD;&#xA;                Ok(Err(_)) =&gt; Err(Error::InsufficientBalance),&#xD;&#xA;                Err(_) =&gt; Err(Error::CallFailed),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        pub fn create_swap(&#xD;&#xA;            &amp;mut self,&#xD;&#xA;            token_a: AccountId,&#xD;&#xA;            token_b: AccountId,&#xD;&#xA;            amount_a: Balance,&#xD;&#xA;            amount_b: Balance,&#xD;&#xA;&#xD;&#xA;        ) -&gt; Result&lt;u64&gt; {&#xD;&#xA;&#xD;&#xA;                let caller = self.env().caller();&#xD;&#xA;                let balance_a: Balance = self.get_balance(token_a, caller)?;&#xD;&#xA;&#xD;&#xA;                if balance_a &lt; amount_a {&#xD;&#xA;                    return Err(Error::InsufficientBalance);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                let balance_b: Balance = self.get_balance(token_b, caller)?;&#xD;&#xA;                if balance_b &lt; amount_b {&#xD;&#xA;                    return Err(Error::InsufficientBalance);&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                self.transfer_token(token_a, caller, self.env().account_id(), amount_a)?;&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;&#xD;&#xA;                let new_swap = (&#xD;&#xA;                    caller,&#xD;&#xA;                    token_a,&#xD;&#xA;                    token_b,&#xD;&#xA;                    amount_a,&#xD;&#xA;                    amount_b,&#xD;&#xA;     &#xD;&#xA;                );&#xD;&#xA;&#xD;&#xA;                self.swaps.insert(self.swap_count, &amp;new_swap);&#xD;&#xA;                let id = self.swap_count;&#xD;&#xA;                self.swap_count = self.swap_count.checked_add(1).ok_or(Error::CallFailed)?;&#xD;&#xA;&#xD;&#xA;                self.env().emit_event(SwapCreated {&#xD;&#xA;                    id,&#xD;&#xA;                    creator: caller,&#xD;&#xA;                });&#xD;&#xA;&#xD;&#xA;                Ok(id)&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to make e2e tests, so to do that, I wanted to add erc20 contract (from parity) and add it to my cargo toml.&#xD;&#xA;I did that, but it does not work, and I don't understand how to do it ...&#xD;&#xA;&#xD;&#xA;Here is the Cargo toml of my contract : &#xD;&#xA;&#xD;&#xA;```ini&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.2.0&quot;, default-features = false }&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.6&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;ink_env = { version = &quot;4.2.1&quot;, default-features = false }&#xD;&#xA;ink_lang = { version = &quot;3.4.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.2.1&quot;&#xD;&#xA;erc20 = { path = &quot;../erc20&quot;, default-features = false, features = [&quot;ink-as-dependency&quot;] }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;ink_env/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;    &quot;ink_lang/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And here is the test : &#xD;&#xA;```rust&#xD;&#xA;mod e2e_tests {&#xD;&#xA;    use super::*;&#xD;&#xA;    use erc20::erc20::Erc20;&#xD;&#xA;    use ink_e2e::build_message;&#xD;&#xA;&#xD;&#xA;    type E2EResult&lt;T&gt; = std::result::Result&lt;T, Box&lt;dyn std::error::Error&gt;&gt;;&#xD;&#xA;&#xD;&#xA;    #[ink_e2e::test(additional_contracts = &quot;erc20/Cargo.toml &quot;)]&#xD;&#xA;    async fn create_swap_works(mut client: ink_e2e::Client&lt;C, E&gt;) -&gt; E2EResult&lt;()&gt; {&#xD;&#xA;        // Instantiate erc20 contract&#xD;&#xA;        let token_a = Erc20::new(100);&#xD;&#xA;        let token_b = Erc20::new(100);&#xD;&#xA;&#xD;&#xA;        let accounts = ink::env::test::default_accounts::&lt;ink::env::DefaultEnvironment&gt;();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;            let amount_a = 100u128;&#xD;&#xA;            let amount_b = 100u32;&#xD;&#xA;  &#xD;&#xA;         let constructor = TokenSwapRef::new_default();&#xD;&#xA;            let contract_acc_id = client&#xD;&#xA;                .instantiate(&quot;token_swap&quot;, &amp;ink_e2e::bob(), constructor, 0, None)&#xD;&#xA;                .await&#xD;&#xA;                .expect(&quot;instantiate failed&quot;)&#xD;&#xA;                .account_id;&#xD;&#xA;&#xD;&#xA;            let create_swap = build_message::&lt;TokenSwapRef&gt;(contract_acc_id.clone())&#xD;&#xA;                .call(|token_swap| token_swap.create_swap(token_a, token_b, amount_a, amount_b));&#xD;&#xA;            let create_swap_res = client&#xD;&#xA;                .call(&amp;ink_e2e::bob(), create_swap, 0, None)&#xD;&#xA;                await&#xD;&#xA;                .expect(&quot;create_swap failed&quot;);&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If someone could explain step by step how to achieve it, I would be so grateful, all I tried did not work ...&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42208" PostHistoryTypeId="2" PostId="10603" RevisionGUID="a8afa53e-df4d-459c-a379-87d9743729d1" CreationDate="2023-12-07T17:13:30.237" UserId="4998" Text="Steps to reproduce&#xD;&#xA; 1. Start a node with Polkadot version 1.4.0 and no specific arguments.&#xD;&#xA; 2. Stop the node&#xD;&#xA; 3. Replace the binary with version 1.3.0&#xD;&#xA; 4. Start the node again&#xD;&#xA; 5. The node don't start and prints the error Parachains DB has a future version (expected 3, found 4)&#xD;&#xA;&#xD;&#xA;Should it be possible to downgrade versions like this?&#xD;&#xA;I have never encountered this problem before on Polkadot and not on any parachains either." ContentLicense="CC BY-SA 4.0" />
  <row Id="42210" PostHistoryTypeId="1" PostId="10603" RevisionGUID="a8afa53e-df4d-459c-a379-87d9743729d1" CreationDate="2023-12-07T17:13:30.237" UserId="4998" Text="Downgrading from polkadot-v1.4.0 to polkadot-v1.3.0 gives Parachains DB has a future version (expected 3, found 4)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42211" PostHistoryTypeId="3" PostId="10603" RevisionGUID="a8afa53e-df4d-459c-a379-87d9743729d1" CreationDate="2023-12-07T17:13:30.237" UserId="4998" Text="|polkadot|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42212" PostHistoryTypeId="2" PostId="10604" RevisionGUID="40e5f270-2d53-4924-aabf-ceae11f3b91b" CreationDate="2023-12-07T22:06:57.113" UserId="3088" Text="In official guides they use wasm built with `export-genesis-wasm` command to register a parathread/parachain:&#xD;&#xA; - https://youtu.be/BaWcQxKRFmM?t=134&#xD;&#xA; - https://docs.substrate.io/tutorials/build-a-parachain/connect-a-local-parachain/&#xD;&#xA;&#xD;&#xA;But, as I know, we can use compact.compressed wasm for runtime upgrades.&#xD;&#xA;&#xD;&#xA;So I have two questions:&#xD;&#xA;1. Can we upload compact.compressed wasm when registering a parathread to descrease reserved fee?&#xD;&#xA;2. What is the difference between this genesis-wasm and wasm artifacts that we get after runtime compilation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42214" PostHistoryTypeId="1" PostId="10604" RevisionGUID="40e5f270-2d53-4924-aabf-ceae11f3b91b" CreationDate="2023-12-07T22:06:57.113" UserId="3088" Text="Is it possible to register parathread with compact.compressed wasm file" ContentLicense="CC BY-SA 4.0" />
  <row Id="42215" PostHistoryTypeId="3" PostId="10604" RevisionGUID="40e5f270-2d53-4924-aabf-ceae11f3b91b" CreationDate="2023-12-07T22:06:57.113" UserId="3088" Text="|parachain|runtime|wasm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42216" PostHistoryTypeId="2" PostId="10605" RevisionGUID="f2543d07-b311-49cf-9fc1-fea8d13a0fc9" CreationDate="2023-12-08T02:42:35.463" UserId="4999" Text="I am new to Substrate development, and I have installed locally the substrate node template. It works well, but for my little project the native token is linked to physical assets and by default in the node template project, it seem that the transactions fees are actually burning tokens from the total supply? I am looking for a way (easy if possible!)  to not burn the transaction fees tokens, but instead send it to treasury or perhaps one of the admin wallet? I tried to modify the lib.rs file in the runtime folder this way, it compiled, but it did not worked and tokens are still burned when transactions occurs. Thanks in advance for your advices! &#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;pub struct CustomFeeHandler;&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_payment::OnChargeTransaction for CustomFeeHandler {&#xD;&#xA;    fn withdraw_fee(&#xD;&#xA;        who: &amp;AccountId, &#xD;&#xA;        call: &amp;Call, &#xD;&#xA;        info: &amp;DispatchInfo, &#xD;&#xA;        fee: Balance, &#xD;&#xA;        tip: Balance&#xD;&#xA;    ) -&gt; Result&lt;(), TransactionValidityError&gt; {&#xD;&#xA;        // Verify that the account has enough balance to pay the fee&#xD;&#xA;        if pallet_balances::Pallet::&lt;Runtime&gt;::free_balance(who) &lt; fee {&#xD;&#xA;            return Err(TransactionValidityError::from(InvalidTransaction::Payment));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // Withdraw the fee from the account&#xD;&#xA;        let imbalance = pallet_balances::Pallet::&lt;Runtime&gt;::withdraw(&#xD;&#xA;            who, &#xD;&#xA;            fee, &#xD;&#xA;            WithdrawReasons::TRANSACTION_PAYMENT, &#xD;&#xA;            ExistenceRequirement::KeepAlive&#xD;&#xA;        )?;&#xD;&#xA;&#xD;&#xA;        // Deposit the fee into the treasury&#xD;&#xA;        Treasury::&lt;Runtime&gt;::on_unbalanced(imbalance);&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type OnChargeTransaction = CustomFeeHandler;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;5&gt;;&#xD;&#xA;	type WeightToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ConstFeeMultiplier&lt;FeeMultiplier&gt;;&#xD;&#xA;}``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="42218" PostHistoryTypeId="1" PostId="10605" RevisionGUID="f2543d07-b311-49cf-9fc1-fea8d13a0fc9" CreationDate="2023-12-08T02:42:35.463" UserId="4999" Text="How To Send Transactions Fees to Treasury Instead of Burning Tokens?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42219" PostHistoryTypeId="3" PostId="10605" RevisionGUID="f2543d07-b311-49cf-9fc1-fea8d13a0fc9" CreationDate="2023-12-08T02:42:35.463" UserId="4999" Text="|transaction-fees|gas|treasury|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42220" PostHistoryTypeId="50" PostId="10418" RevisionGUID="7b816fd1-cc3f-409f-9edc-43f23b84492e" CreationDate="2023-12-08T03:05:50.673" UserId="-1" />
  <row Id="42221" PostHistoryTypeId="2" PostId="10606" RevisionGUID="ec1081df-2c47-49d6-9429-6f8d371a671a" CreationDate="2023-12-08T06:38:54.967" UserId="3437" Text="Is there any way/example to establish web socket connection through off chain worker? There are many Rust examples but I can't use standard library.&#xD;&#xA;&#xD;&#xA;Can someone please help me?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42223" PostHistoryTypeId="1" PostId="10606" RevisionGUID="ec1081df-2c47-49d6-9429-6f8d371a671a" CreationDate="2023-12-08T06:38:54.967" UserId="3437" Text="How to establish web socket connection in offchain_worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="42224" PostHistoryTypeId="3" PostId="10606" RevisionGUID="ec1081df-2c47-49d6-9429-6f8d371a671a" CreationDate="2023-12-08T06:38:54.967" UserId="3437" Text="|substrate-node-template|offchain-worker|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42225" PostHistoryTypeId="2" PostId="10607" RevisionGUID="e16bb527-3d6d-445f-8f1b-d006ed4dbe60" CreationDate="2023-12-08T07:18:43.753" UserId="555" Text="I want to fetch the floating value in offchain worker. I'm using `lite_json` for http request.&#xD;&#xA;&#xD;&#xA;``` json&#xD;&#xA;Api data: {&#xD;&#xA;&quot;price&quot;: 0.5&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To fetch and store this price from api. I'm defining a struct:&#xD;&#xA;``` rust&#xD;&#xA;pub struct data {&#xD;&#xA;   price: ?&#xD;&#xA;}&#xD;&#xA;``` &#xD;&#xA;Ques 1: here what would be the type of price?&#xD;&#xA;&#xD;&#xA;Here is the code for fetching data:&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;let obj_price = match obj.clone() {&#xD;&#xA;				JsonValue::Object(obj_data) =&gt; {&#xD;&#xA;					let (_, v) = obj_data.into_iter().find(|(k, _)| k.iter().copied().eq(&quot;price&quot;.chars()))?;&#xD;&#xA;					match v {&#xD;&#xA;						JsonValue::Number(val) =&gt; val,&#xD;&#xA;						_ =&gt; return None,&#xD;&#xA;					}&#xD;&#xA;				},&#xD;&#xA;				_ =&gt; return None,&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			let Price = obj_price; // ??&#xD;&#xA;```&#xD;&#xA;Ques2: How to convert obj_price to the type that we defined in the struct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42227" PostHistoryTypeId="1" PostId="10607" RevisionGUID="e16bb527-3d6d-445f-8f1b-d006ed4dbe60" CreationDate="2023-12-08T07:18:43.753" UserId="555" Text="How to fetch floating no in offchain worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42228" PostHistoryTypeId="3" PostId="10607" RevisionGUID="e16bb527-3d6d-445f-8f1b-d006ed4dbe60" CreationDate="2023-12-08T07:18:43.753" UserId="555" Text="|storage|api|offchain-storage|floating-point-math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42229" PostHistoryTypeId="2" PostId="10608" RevisionGUID="74d927b3-df6a-4f56-a281-a863001203e4" CreationDate="2023-12-08T07:45:12.477" UserId="3414" Text="I've transitioned the signature scheme to ECDSA on a Substrate-based chain, following Moonbeam's approach. However, it's worth noting that Moonbeam utilizes Aura for block production, whereas Substrate typically relies on BABE for this purpose. Despite successful compilation, I'm encountering an issue where the blockchain fails to produce any blocks upon startup. I'm seeking guidance to identify and resolve the underlying cause of this problem. Can anyone provide assistance?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42231" PostHistoryTypeId="1" PostId="10608" RevisionGUID="74d927b3-df6a-4f56-a281-a863001203e4" CreationDate="2023-12-08T07:45:12.477" UserId="3414" Text="&quot;Troubleshooting Block Production Issue After Switching to ECDSA Signature Scheme in Substrate-based Blockchain&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42232" PostHistoryTypeId="3" PostId="10608" RevisionGUID="74d927b3-df6a-4f56-a281-a863001203e4" CreationDate="2023-12-08T07:45:12.477" UserId="3414" Text="|polkadot|substrate-node|consensus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42233" PostHistoryTypeId="2" PostId="10609" RevisionGUID="6936f4b1-cd31-472b-a67e-23d814c5316c" CreationDate="2023-12-08T08:10:48.673" UserId="251" Text="Configure the `DealWithFees` as shown here: https://github.com/darwinia-network/darwinia/blob/e0d20124b071d907cd7ccc163cc1a412caf95626/runtime/common/src/lib.rs#L226-L237.&#xD;&#xA;&#xD;&#xA;And include the `DealWithFees` in the configuration of `TransactionPayment`, like this: https://github.com/darwinia-network/darwinia/blob/e0d20124b071d907cd7ccc163cc1a412caf95626/runtime/darwinia/src/pallets/transaction_payment.rs#L27-L28&#xD;&#xA;&#xD;&#xA;Why does `pallet_treasury`'s`on_unbalanced` function operate in this manner?&#xD;&#xA;Because it is set up to behave like this: https://github.com/paritytech/polkadot-sdk/blob/ac3f14d23ba0f4d7e92d70c2fe6b202ccdcb3a62/substrate/frame/treasury/src/lib.rs#L1113-L1122." ContentLicense="CC BY-SA 4.0" />
  <row Id="42235" PostHistoryTypeId="2" PostId="10610" RevisionGUID="f1216fce-177c-4461-997c-fea52db238bb" CreationDate="2023-12-08T08:46:43.310" UserId="4057" Text="With the introduction of version 0.9.42, the logic of how [balances work][1] in Substrate changed. This version upgrade introduced a new extrinsic called `upgrade_account`. The `fee_frozen` attribute of the `AccountData` is then used as an `ExtraFlag`, indicating whether the account is upgraded or not. I do not see why this extra flag is important, as it is not used anywhere in the pallet.&#xD;&#xA;&#xD;&#xA;I couldn't find any resources related to the question of why upgrading an account is critical. It is only mentioned that this upgrade should be done.&#xD;&#xA;&#xD;&#xA;If it is obvious, then I am sorry for this question.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[1]: https://github.com/paritytech/substrate/pull/12951" ContentLicense="CC BY-SA 4.0" />
  <row Id="42237" PostHistoryTypeId="1" PostId="10610" RevisionGUID="f1216fce-177c-4461-997c-fea52db238bb" CreationDate="2023-12-08T08:46:43.310" UserId="4057" Text="Why do I need to call the upgrade_account in the balance pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42238" PostHistoryTypeId="3" PostId="10610" RevisionGUID="f1216fce-177c-4461-997c-fea52db238bb" CreationDate="2023-12-08T08:46:43.310" UserId="4057" Text="|balances|upgrade|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42239" PostHistoryTypeId="2" PostId="10611" RevisionGUID="a7c83667-5512-4274-861d-592bf15a8f70" CreationDate="2023-12-08T13:13:29.610" UserId="2135" Text="I was wondering what would be the best way to achieve multi-currency staking given:&#xD;&#xA;- It's on a solo chain&#xD;&#xA;- Foreign assets are bridged (like Eth or BTC, pallet-asset can be used)&#xD;&#xA;- No conversion from foreign currency to native currency should happen&#xD;&#xA;&#xD;&#xA;Apart from this, anything can be done.&#xD;&#xA;&#xD;&#xA;I guess the most hardcore answer would be to fork and change the staking pallet but wanted some opinions." ContentLicense="CC BY-SA 4.0" />
  <row Id="42241" PostHistoryTypeId="1" PostId="10611" RevisionGUID="a7c83667-5512-4274-861d-592bf15a8f70" CreationDate="2023-12-08T13:13:29.610" UserId="2135" Text="How to implement multi-currency staking?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42242" PostHistoryTypeId="3" PostId="10611" RevisionGUID="a7c83667-5512-4274-861d-592bf15a8f70" CreationDate="2023-12-08T13:13:29.610" UserId="2135" Text="|staking|balances|assets|pallet-staking|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42243" PostHistoryTypeId="2" PostId="10612" RevisionGUID="46c3cb6c-9796-4e5e-8f10-920f102d73fd" CreationDate="2023-12-08T13:52:07.723" UserId="4744" Text="I am submitting an unsigned extrinsic using `subxt` crate in rust. &#xD;&#xA;&#xD;&#xA;I have a simple u64 number inside `StorageValue` called `Nonce` which keeps track of number of transactions submitted (needed for generating the transaction tag in `validate_unsigned` method). And I implemented `ValidateUnsigned` trait inside the pallet as shown below. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// Inherent call is not validated as unsigned&#xD;&#xA;        fn validate_unsigned(_source: TransactionSource, call: &amp;Self::Call) -&gt; TransactionValidity {&#xD;&#xA;            match call {&#xD;&#xA;                Call::allowed_unsigned { .. } =&gt; Ok(Default::default()),&#xD;&#xA;                Call::transfer { .. } =&gt; {&#xD;&#xA;                    log::info!(&quot;***************** validate_unsigned for transfer is called and nonce: {} **************&quot;, Nonce::&lt;T&gt;::get());&#xD;&#xA;                    let nonce = Nonce::&lt;T&gt;::get();&#xD;&#xA;                    let priority = u64::max_value() - nonce;&#xD;&#xA;                    let mut valid_transaction_builder =&#xD;&#xA;                        ValidTransaction::with_tag_prefix(&quot;example&quot;)&#xD;&#xA;                            .priority(priority)&#xD;&#xA;                            // .and_provides((nonce,))&#xD;&#xA;                            // .and_requires((nonce - 1,))&#xD;&#xA;                            .propagate(true);&#xD;&#xA;                    valid_transaction_builder = valid_transaction_builder.and_provides((nonce,));&#xD;&#xA;                    if nonce &gt; 0 {&#xD;&#xA;                        valid_transaction_builder =&#xD;&#xA;                            valid_transaction_builder.and_requires((nonce - 1,));&#xD;&#xA;                    }&#xD;&#xA;                    let validity = valid_transaction_builder.build();&#xD;&#xA;                    log::info!(&quot;***************** validate_unsigned for transfer exited successfully **************&quot;);&#xD;&#xA;                    // Nonce::&lt;T&gt;::mutate(|n| *n += 1);&#xD;&#xA;                    validity&#xD;&#xA;                }&#xD;&#xA;                _ =&gt; UnknownTransaction::NoUnsignedValidator.into(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;2023-12-08 15:45:45.150  INFO tokio-runtime-worker ar_pallet_transactions::pallet: ***************** validate_unsigned for transfer is called and nonce: 0 **************    &#xD;&#xA;2023-12-08 15:45:45.150  INFO tokio-runtime-worker ar_pallet_transactions::pallet: ***************** validate_unsigned for transfer exited successfully **************    &#xD;&#xA;2023-12-08 15:45:45.151 TRACE tokio-runtime-worker jsonrpsee_core::tracing: send=&quot;{\&quot;jsonrpc\&quot;:\&quot;2.0\&quot;,\&quot;result\&quot;:\&quot;muUjDyalEplJwoJV\&quot;,\&quot;id\&quot;:4}&quot;&#xD;&#xA;2023-12-08 15:45:45.151 TRACE tokio-runtime-worker jsonrpsee_core::tracing: send=&quot;{\&quot;jsonrpc\&quot;:\&quot;2.0\&quot;,\&quot;method\&quot;:\&quot;author_extrinsicUpdate\&quot;,\&quot;params\&quot;:{\&quot;subscription\&quot;:\&quot;muUjDyalEplJwoJV\&quot;,\&quot;result\&quot;:\&quot;ready\&quot;}}&quot;&#xD;&#xA;2023-12-08 15:45:45.151 TRACE tokio-runtime-worker jsonrpsee_core::tracing: send=&quot;{\&quot;jsonrpc\&quot;:\&quot;2.0\&quot;,\&quot;result\&quot;:\&quot;muUjDyalEplJwoJV\&quot;,\&quot;id\&quot;:4}&quot;&#xD;&#xA;2023-12-08 15:45:45.151 TRACE tokio-runtime-worker jsonrpsee_core::tracing: send=&quot;{\&quot;jsonrpc\&quot;:\&quot;2.0\&quot;,\&quot;method\&quot;:\&quot;author_extrinsicUpdate\&quot;,\&quot;params\&quot;:{\&quot;subscription\&quot;:\&quot;muUjDyalEplJwoJV\&quot;,\&quot;result\&quot;:{\&quot;broadcast\&quot;:[\&quot;12D3KooWRVfrZqHwC3CV6VAgDDLWx6oZDbkRqUfJKrVQ4BJdPWzf\&quot;]}}}&quot;&#xD;&#xA;2023-12-08 15:45:45.154 TRACE tokio-runtime-worker jsonrpsee_core::tracing: recv=&quot;{\&quot;jsonrpc\&quot;:\&quot;2.0\&quot;,\&quot;id\&quot;:5,\&quot;method\&quot;:\&quot;author_unwatchExtrinsic\&quot;,\&quot;params\&quot;:[\&quot;muUjDyalEplJwoJV\&quot;]}&quot;&#xD;&#xA;2023-12-08 15:45:45.154 TRACE tokio-runtime-worker jsonrpsee_core::tracing: send=&quot;{\&quot;jsonrpc\&quot;:\&quot;2.0\&quot;,\&quot;result\&quot;:true,\&quot;id\&quot;:5}&quot;&#xD;&#xA;2023-12-08 15:45:45.154 TRACE tokio-runtime-worker jsonrpsee_core::tracing: send=&quot;{\&quot;jsonrpc\&quot;:\&quot;2.0\&quot;,\&quot;result\&quot;:true,\&quot;id\&quot;:5}&quot;&#xD;&#xA;2023-12-08 15:45:45.154 ERROR tokio-runtime-worker jsonrpsee_server::transport::ws: WS transport error: i/o error: Broken pipe (os error 32); terminate connection: 2&#xD;&#xA;2023-12-08 15:45:45.154 ERROR tokio-runtime-worker jsonrpsee_server::transport::ws: WS transport error: send failed: Networking or low-level protocol error: connection closed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can see from the logs that `validate_unsigned` is being called and exiting successfully. But after that I see `WS transport error: i/o error: Broken pipe (os error 32); terminate connection:` and then the subsequent calls to submit extrinsic from subxt are timing out. I assumed that it has to do with the websocket error we are seeing before. &#xD;&#xA;&#xD;&#xA;And more over I can see the extrinsic (the first) inside the pallet being executed successfully. &#xD;&#xA;&#xD;&#xA;When I try to submit the second extrinsic I can see that `validate_unsigned` is once again successful, &#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;2023-12-08 15:45:55.524  INFO tokio-runtime-worker ar_pallet_transactions::pallet: ***************** validate_unsigned for transfer is called and nonce: 1 **************    &#xD;&#xA;2023-12-08 15:45:55.524  INFO tokio-runtime-worker ar_pallet_transactions::pallet: ***************** validate_unsigned for transfer exited successfully **************    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but I don't see the extrinsic inside the pallet being called. And the caller (subxt) of this extrinsic is timing out. &#xD;&#xA;&#xD;&#xA;Please feel free to ask any questions or clarifications" ContentLicense="CC BY-SA 4.0" />
  <row Id="42245" PostHistoryTypeId="1" PostId="10612" RevisionGUID="46c3cb6c-9796-4e5e-8f10-920f102d73fd" CreationDate="2023-12-08T13:52:07.723" UserId="4744" Text="WS transport error: i/o error: Broken pipe (os error 32); terminate connection" ContentLicense="CC BY-SA 4.0" />
  <row Id="42246" PostHistoryTypeId="3" PostId="10612" RevisionGUID="46c3cb6c-9796-4e5e-8f10-920f102d73fd" CreationDate="2023-12-08T13:52:07.723" UserId="4744" Text="|extrinsic|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42247" PostHistoryTypeId="2" PostId="10613" RevisionGUID="acfb2273-238b-4a06-be0a-de2cfdbb1b06" CreationDate="2023-12-08T14:41:35.490" UserId="3598" Text="Recently I started getting the following error thrown in the ```on_initialize``` hook of the aura pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-12-08 14:24:54 [Parachain] panicked at 'Slot must increase', /.cargo/git/checkouts/substrate-7e08433d4c370a21/5bfdbab/frame/aura/src/lib.rs:93:17    &#xD;&#xA;2023-12-08 14:24:54 [Parachain] err=Error { inner: Proposing&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;       WASM backtrace:&#xD;&#xA;       error while executing at wasm backtrace:&#xD;&#xA;           0: 0x396e55 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;           1: 0x3ce0 - &lt;unknown&gt;!core::panicking::panic_fmt::hc28e19cd76cf33c1&#xD;&#xA;           2: 0x149ebb - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hdf027e453fe3dfa0&#xD;&#xA;           3: 0x2275e1 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::h97a3ad9ef00b8c44&#xD;&#xA;           4: 0x14a5f9 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hfe37df7f2e5b478f&#xD;&#xA;           5: 0x1f6ac3 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hb2d583d1bf08c166&#xD;&#xA;           6: 0x1dbc7e - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;    1: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;       WASM backtrace:&#xD;&#xA;       error while executing at wasm backtrace:&#xD;&#xA;           0: 0x396e55 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;           1: 0x3ce0 - &lt;unknown&gt;!core::panicking::panic_fmt::hc28e19cd76cf33c1&#xD;&#xA;           2: 0x149ebb - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hdf027e453fe3dfa0&#xD;&#xA;           3: 0x2275e1 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::h97a3ad9ef00b8c44&#xD;&#xA;           4: 0x14a5f9 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hfe37df7f2e5b478f&#xD;&#xA;           5: 0x1f6ac3 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hb2d583d1bf08c166&#xD;&#xA;```&#xD;&#xA;The collator is still producing blocks.&#xD;&#xA;Recently I upgraded the node version to `polkadot 1.3.0`, but the runtime has not changed.&#xD;&#xA;Does anyone know what might be causing it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42249" PostHistoryTypeId="1" PostId="10613" RevisionGUID="acfb2273-238b-4a06-be0a-de2cfdbb1b06" CreationDate="2023-12-08T14:41:35.490" UserId="3598" Text="Started getting: Aura pallet &quot;Slot must increase&quot; Error on running collator" ContentLicense="CC BY-SA 4.0" />
  <row Id="42250" PostHistoryTypeId="3" PostId="10613" RevisionGUID="acfb2273-238b-4a06-be0a-de2cfdbb1b06" CreationDate="2023-12-08T14:41:35.490" UserId="3598" Text="|parachain-collator|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42251" PostHistoryTypeId="2" PostId="10614" RevisionGUID="893f7f18-35e4-4f2e-9364-a67ce3432b1b" CreationDate="2023-12-08T14:42:14.403" UserId="3088" Text="Let we have a running parachain on kusama and want to do a runtime upgrade. New runtime is bigger then the old one by 100 kb. New runtime will be stored on the relay chain after runtime upgrade therefore someone have to deposit fee for additional storage usage. Is it right? Who have to pay and how to calculate fee?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42253" PostHistoryTypeId="1" PostId="10614" RevisionGUID="893f7f18-35e4-4f2e-9364-a67ce3432b1b" CreationDate="2023-12-08T14:42:14.403" UserId="3088" Text="How does parachain upgrade works?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42254" PostHistoryTypeId="3" PostId="10614" RevisionGUID="893f7f18-35e4-4f2e-9364-a67ce3432b1b" CreationDate="2023-12-08T14:42:14.403" UserId="3088" Text="|parachain|runtime|storage|runtime-upgrade|fee|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42255" PostHistoryTypeId="5" PostId="10613" RevisionGUID="395ba1bd-7811-444f-97d1-6567cd1be3c4" CreationDate="2023-12-08T14:55:41.947" UserId="3598" Comment="added 110 characters in body" Text="Recently I started getting the following error thrown in the ```on_initialize``` hook of the aura pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-12-08 14:24:54 [Parachain] panicked at 'Slot must increase', /.cargo/git/checkouts/substrate-7e08433d4c370a21/5bfdbab/frame/aura/src/lib.rs:93:17    &#xD;&#xA;2023-12-08 14:24:54 [Parachain] err=Error { inner: Proposing&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;       WASM backtrace:&#xD;&#xA;       error while executing at wasm backtrace:&#xD;&#xA;           0: 0x396e55 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;           1: 0x3ce0 - &lt;unknown&gt;!core::panicking::panic_fmt::hc28e19cd76cf33c1&#xD;&#xA;           2: 0x149ebb - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hdf027e453fe3dfa0&#xD;&#xA;           3: 0x2275e1 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::h97a3ad9ef00b8c44&#xD;&#xA;           4: 0x14a5f9 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hfe37df7f2e5b478f&#xD;&#xA;           5: 0x1f6ac3 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hb2d583d1bf08c166&#xD;&#xA;           6: 0x1dbc7e - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;    1: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;       WASM backtrace:&#xD;&#xA;       error while executing at wasm backtrace:&#xD;&#xA;           0: 0x396e55 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;           1: 0x3ce0 - &lt;unknown&gt;!core::panicking::panic_fmt::hc28e19cd76cf33c1&#xD;&#xA;           2: 0x149ebb - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hdf027e453fe3dfa0&#xD;&#xA;           3: 0x2275e1 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::h97a3ad9ef00b8c44&#xD;&#xA;           4: 0x14a5f9 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hfe37df7f2e5b478f&#xD;&#xA;           5: 0x1f6ac3 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hb2d583d1bf08c166&#xD;&#xA;```&#xD;&#xA;This is the only collator running and it is still producing blocks, the error happens frequently, but not always, so block production hasn't stopped.&#xD;&#xA;Recently I upgraded the node version to `polkadot 1.3.0`, but the runtime has not changed.&#xD;&#xA;Does anyone know what might be causing it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42256" PostHistoryTypeId="2" PostId="10615" RevisionGUID="68ddfa28-de32-447c-9168-da394db4ae56" CreationDate="2023-12-08T15:34:33.977" UserId="251" Text="As this is a &quot;system&quot; call, the fee is a constant small value. And it's free on relaychain side.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/f6ae145813b2e213b39f09f713d3ccbdd9376f6b/cumulus/pallets/parachain-system/src/lib.rs#L703&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42258" PostHistoryTypeId="5" PostId="10607" RevisionGUID="c99d3404-079e-42ad-8a0a-673822b57b57" CreationDate="2023-12-08T17:35:59.987" UserId="555" Comment="added 60 characters in body" Text="I want to fetch the floating value in offchain worker. I'm using `lite_json` for http request.&#xD;&#xA;&#xD;&#xA;``` json&#xD;&#xA;Api data: {&#xD;&#xA;&quot;price&quot;: 0.5&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To fetch and store this price from api. I'm defining a struct:&#xD;&#xA;``` rust&#xD;&#xA;pub struct data {&#xD;&#xA;   price: ?&#xD;&#xA;}&#xD;&#xA;``` &#xD;&#xA;Ques 1: here what would be the type of price?&#xD;&#xA;&#xD;&#xA;Here is the code for fetching data:&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;let obj_price = match obj.clone() {&#xD;&#xA;				JsonValue::Object(obj_data) =&gt; {&#xD;&#xA;					let (_, v) = obj_data.into_iter().find(|(k, _)| k.iter().copied().eq(&quot;price&quot;.chars()))?;&#xD;&#xA;					match v {&#xD;&#xA;						JsonValue::Number(val) =&gt; val,&#xD;&#xA;						_ =&gt; return None,&#xD;&#xA;					}&#xD;&#xA;				},&#xD;&#xA;				_ =&gt; return None,&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			let Price = obj_price; // ??&#xD;&#xA;```&#xD;&#xA;Ques2: How to convert obj_price to the type that we defined in the struct?&#xD;&#xA;&#xD;&#xA;Or we can't fetch floating no. at all using `lite_json`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42259" PostHistoryTypeId="50" PostId="9227" RevisionGUID="efa133ac-f27e-49cb-8ff1-b7d799992e68" CreationDate="2023-12-08T18:00:35.083" UserId="-1" />
  <row Id="42260" PostHistoryTypeId="50" PostId="9234" RevisionGUID="63aec9bc-f811-40ea-8914-87d4ccfe9cdd" CreationDate="2023-12-08T22:03:35.393" UserId="-1" />
  <row Id="42261" PostHistoryTypeId="2" PostId="10616" RevisionGUID="d3f98626-3bbc-4751-adc5-d46bcce6dde4" CreationDate="2023-12-08T22:35:58.500" UserId="94" Text="Good question.&#xD;&#xA;&#xD;&#xA;The upgrade of an account happens automatically when it is accessed. So in theory - nothing is needed to be done on your sode.  &#xD;&#xA;But to aid the process and have an eager migration, it is possible to call `upgrade_account` for all accounts with the provided [script](https://github.com/ggwpez/substrate-scripts/blob/master/upgrade-accounts.py). Then all accounts will be upgraded had have the `ExtraFlag` set.   &#xD;&#xA;The `ExtraFlag` prevents an account from being upgraded twice. When we add more features in the future, we can also use that flag to indicate whether an account already supports that feature or not." ContentLicense="CC BY-SA 4.0" />
  <row Id="42263" PostHistoryTypeId="52" PostId="10614" RevisionGUID="00c3c552-17cc-45cd-8258-6b2128ac0455" CreationDate="2023-12-08T22:49:09.703" />
  <row Id="42268" PostHistoryTypeId="50" PostId="9238" RevisionGUID="8eba7185-51f6-4d3e-aa07-fe16884b4c71" CreationDate="2023-12-09T07:08:56.153" UserId="-1" />
  <row Id="42269" PostHistoryTypeId="5" PostId="8706" RevisionGUID="c9ce6d49-d37d-4923-bf79-5fe2cbf62538" CreationDate="2023-12-09T07:35:44.100" UserId="116" Comment="spelling i-&gt;I and code blocks" Text="I have one storagemap which stores `u32` values, now I need to migrate this to `Vec&lt;T::AccountId&gt;` How to do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42270" PostHistoryTypeId="5" PostId="8711" RevisionGUID="52ed7e78-0ea5-4fb6-9f74-03ae6dc62754" CreationDate="2023-12-09T07:37:01.490" UserId="116" Comment="added 3 characters in body" Text="You can check [Substrate tutorial on storage migrations]( https://docs.substrate.io/reference/how-to-guides/storage-migrations/basic-storage-migration/)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42271" PostHistoryTypeId="50" PostId="3480" RevisionGUID="f776e754-ed79-4094-92b0-dc75386b4662" CreationDate="2023-12-09T09:05:30.653" UserId="-1" />
  <row Id="42272" PostHistoryTypeId="2" PostId="10617" RevisionGUID="b1cd1221-fb1f-4fea-a4b5-718879807389" CreationDate="2023-12-09T10:21:39.470" UserId="4985" Text="I was trying to query `payment_queryInfo` on current Westend testnet, and the following payload used to works at spec 9430.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;payment_queryInfo&quot;,&#xD;&#xA;    &quot;params&quot;: [&#xD;&#xA;        &quot;0x41028400088ec8045cd8e9fbdd7080021030c5bf7240c9ea36a0648ea3bbe07d54de5d4d0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a50348000402002c50932cfc2b166f444027517b3421ddb59c64162f090197e4ccac19c30c237b0700e40b5402&quot;,&#xD;&#xA;        &quot;0x9ee56bc6165d9935abdbc2732cad4f44db4a8b08765c2e7a195c832946e64628&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But right now it will returns &#xD;&#xA;```&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x68d15 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0xd10b - &lt;unknown&gt;!core::panicking::panic_fmt::h3e1dd3d08288569e&#xD;&#xA;    2: 0x38dda9 - &lt;unknown&gt;!TransactionPaymentApi_query_info&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I know this RPC method id deprecated so I tried to switch to `state_call` with the following request:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;jsonrpc&quot;: &quot;2.0&quot;,&#xD;&#xA;    &quot;method&quot;: &quot;state_call&quot;,&#xD;&#xA;    &quot;params&quot;: [&#xD;&#xA;        &quot;TransactionPaymentApi_query_info&quot;,&#xD;&#xA;        &quot;0x41028400088ec8045cd8e9fbdd7080021030c5bf7240c9ea36a0648ea3bbe07d54de5d4d0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a50348000402002c50932cfc2b166f444027517b3421ddb59c64162f090197e4ccac19c30c237b0700e40b5402&quot;,&#xD;&#xA;        &quot;0x9ee56bc6165d9935abdbc2732cad4f44db4a8b08765c2e7a195c832946e64628&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;id&quot;: 1&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but still it is returning:&#xD;&#xA;```&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x68d15 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 1: 0xd10b - &lt;unknown&gt;!core::panicking::panic_fmt::h3e1dd3d08288569e&#xD;&#xA;    2: 0x38dda9 - &lt;unknown&gt;!TransactionPaymentApi_query_info&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Anyone has any clue on why this error is popping up?&#xD;&#xA;&#xD;&#xA;I've tried to update my full node to latest version &amp; my runtime spec to 104000, but still with no luck&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="42274" PostHistoryTypeId="1" PostId="10617" RevisionGUID="b1cd1221-fb1f-4fea-a4b5-718879807389" CreationDate="2023-12-09T10:21:39.470" UserId="4985" Text="is the endpoint TransactionPaymentApi_query_info usable on current Westend testnet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42275" PostHistoryTypeId="3" PostId="10617" RevisionGUID="b1cd1221-fb1f-4fea-a4b5-718879807389" CreationDate="2023-12-09T10:21:39.470" UserId="4985" Text="|rpc|substrate-node|wasm|json-rpc|westend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42276" PostHistoryTypeId="2" PostId="10618" RevisionGUID="68d5be95-b7a4-438b-8dec-4dbc3278f745" CreationDate="2023-12-09T17:08:22.667" UserId="555" Text="I'm fetching floating value in offchain worker though `lite-json`. &#xD;&#xA;&#xD;&#xA;Json data:&#xD;&#xA;``` json&#xD;&#xA;{&#xD;&#xA;&quot;price&quot;: 0.5&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is the implementation to fetch the price:&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;let price_str = match obj.clone() {&#xD;&#xA;				JsonValue::Object(obj_data) =&gt; {&#xD;&#xA;					let (_, v) = obj_data.into_iter().find(|(k, _)| k.iter().copied().eq(&quot;price&quot;.chars()))?;&#xD;&#xA;					match v {&#xD;&#xA;						JsonValue::Number(val) =&gt; val,&#xD;&#xA;						_ =&gt; return None,&#xD;&#xA;					}&#xD;&#xA;				},&#xD;&#xA;				_ =&gt; return None,&#xD;&#xA;			};&#xD;&#xA;let bits = price_str.integer as u128 * 10u128.pow(price_str.exponent as u32) + u128::from(price_str.fraction);&#xD;&#xA;log::info!(&quot;bits: {}&quot;, bits);&#xD;&#xA;// Adjust the denominator based on the desired scale&#xD;&#xA;let fixed_value = FixedU128::saturating_from_rational(bits, 10u128.pow(price_str.fraction_length as u32));&#xD;&#xA;&#xD;&#xA;			log::info!(&quot;value of integer is {}&quot;, fixed_value);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm getting these logs:&#xD;&#xA;```&#xD;&#xA;2023-12-09 22:25:03.084  INFO      offchain-worker pallet_template: bits: 5    &#xD;&#xA;2023-12-09 22:25:03.084  INFO      offchain-worker pallet_template: value of integer is 500000000000000000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I should get fixed_value to be `0.5` but getting `500000000000000000`. &#xD;&#xA;&#xD;&#xA;I have tried almost all the methods to convert this but either i get `0` or `500000000000000000`.&#xD;&#xA;&#xD;&#xA;How to fetch this price effectively?&#xD;&#xA;&#xD;&#xA;Thanks in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42278" PostHistoryTypeId="1" PostId="10618" RevisionGUID="68d5be95-b7a4-438b-8dec-4dbc3278f745" CreationDate="2023-12-09T17:08:22.667" UserId="555" Text="How to use FixedU128?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42279" PostHistoryTypeId="3" PostId="10618" RevisionGUID="68d5be95-b7a4-438b-8dec-4dbc3278f745" CreationDate="2023-12-09T17:08:22.667" UserId="555" Text="|substrate-node-template|offchain|floating-point-math|convert|math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42280" PostHistoryTypeId="2" PostId="10619" RevisionGUID="d03c60ea-aeaf-4709-964c-6d13f482d66a" CreationDate="2023-12-10T03:57:19.050" UserId="3598" Text="I'm testing a parachain runtime upgrade locally, and after calling the enactAuthorizeUpgrade, the parachain stops producing blocks, and in the logs I start seeing the following error: `Collation wasn't advertised to any validator.` I can see the parachain producing the same block over and over, but it seems like its never imported by the relay chain. Any ideas on what the issue could be? " ContentLicense="CC BY-SA 4.0" />
  <row Id="42282" PostHistoryTypeId="1" PostId="10619" RevisionGUID="d03c60ea-aeaf-4709-964c-6d13f482d66a" CreationDate="2023-12-10T03:57:19.050" UserId="3598" Text="Parachain stops producing blocks after runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="42283" PostHistoryTypeId="3" PostId="10619" RevisionGUID="d03c60ea-aeaf-4709-964c-6d13f482d66a" CreationDate="2023-12-10T03:57:19.050" UserId="3598" Text="|parachain|runtime-upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42284" PostHistoryTypeId="50" PostId="9243" RevisionGUID="f5ee7a85-9f13-48df-8080-40371951ee75" CreationDate="2023-12-10T05:00:25.087" UserId="-1" />
  <row Id="42285" PostHistoryTypeId="50" PostId="5725" RevisionGUID="bc43f45b-6d88-438f-9fc2-b3cf3e45d4bc" CreationDate="2023-12-10T08:01:40.367" UserId="-1" />
  <row Id="42286" PostHistoryTypeId="50" PostId="9252" RevisionGUID="9a5cc469-abdd-4d92-9180-297f37e240e4" CreationDate="2023-12-10T09:01:45.183" UserId="-1" />
  <row Id="42287" PostHistoryTypeId="2" PostId="10620" RevisionGUID="cfd97c9b-4f1c-4c87-a7cb-b346fdae7d05" CreationDate="2023-12-10T13:49:37.087" UserId="4158" Text="my node builds perfectly fine on ubuntu, arch, and debian. On my nixos machine, I can build the node-template without any errors. I can also build the kitchensink node in polkadot-sdk. Buy for some reason my own node does not build with the same [flake.nix][1] file.&#xD;&#xA;&#xD;&#xA;I get this error&#xD;&#xA;```&#xD;&#xA;   Compiling vtb-node-runtime v3.0.0-dev (/run/media/scj/Storage/Development/rust/vtb_substrate/vtb-node/runtime)&#xD;&#xA;error: failed to run custom build command for `vtb-node-runtime v3.0.0-dev (/run/media/scj/Storage/Development/rust/vtb_substrate/vtb-node/runtime)`&#xD;&#xA;note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/run/media/scj/Storage/Development/rust/vtb_substrate/vtb-node/target/release/build/vtb-node-runtime-654e57f79924c810/build-script-build` (exit status: 101)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: CARGO_TARGET_DIR=&quot;/run/media/scj/Storage/Development/rust/vtb_substrate/vtb-node/target/release/wbuild/vtb-node-runtime/target&quot; RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/home/scj/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/run/media/scj/Storage/Development/rust/vtb_substrate/vtb-node/target/release/wbuild/vtb-node-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.74.0-nightly (2f5df8a94 2023-08-31)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;  warning: unused import: `sp_externalities::ExternalitiesExt`&#xD;&#xA;   --&gt; /run/media/scj/Storage/Development/rust/vtb_substrate/vtb-node/vtb-utils/src/offchain_extensions.rs:2:5&#xD;&#xA;    |&#xD;&#xA;  2 | use sp_externalities::ExternalitiesExt;&#xD;&#xA;    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = note: `#[warn(unused_imports)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: unused import: `string::String`&#xD;&#xA;    --&gt; /run/media/scj/Storage/Development/rust/vtb_substrate/vtb-node/vtb-primitives/src/lib.rs:12:36&#xD;&#xA;     |&#xD;&#xA;  12 |     use scale_info::prelude::{format, string::String};&#xD;&#xA;     |                                       ^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `#[warn(unused_imports)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: unused import: `string::String`&#xD;&#xA;     --&gt; /run/media/scj/Storage/Development/rust/vtb_substrate/vtb-node/vtb-primitives/src/lib.rs:105:36&#xD;&#xA;      |&#xD;&#xA;  105 |     use scale_info::prelude::{format, string::String};&#xD;&#xA;      |                                       ^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: `vtb-utils` (lib) generated 1 warning (run `cargo fix --lib -p vtb-utils` to apply 1 suggestion)&#xD;&#xA;  warning: `ocw-primitives` (lib) generated 2 warnings (run `cargo fix --lib -p ocw-primitives` to apply 2 suggestions)&#xD;&#xA;     Compiling vtb-node-runtime-wasm v1.0.0 (/run/media/scj/Storage/Development/rust/vtb_substrate/vtb-node/target/release/wbuild/vtb-node-runtime)&#xD;&#xA;  error: linking with `rust-lld` failed: exit status: 1&#xD;&#xA;    |&#xD;&#xA;    = note: LC_ALL=&quot;C&quot; PATH=&quot;redacted&quot;&#xD;&#xA;    = note: rust-lld: error: unknown file type: /tmp/nix-shell.R2uej4/rustcuRtRpc/libsecp256k1_sys-a9a733d2c78cc86e.rlib(secp256k1.o)&#xD;&#xA;            &#xD;&#xA;&#xD;&#xA;  error: could not compile `vtb-node-runtime-wasm` (lib) due to previous error&#xD;&#xA;  thread 'main' panicked at /home/scj/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/fcfdb98/substrate/utils/wasm-builder/src/wasm_project.rs:803:37:&#xD;&#xA;  Copying the bloaty file to the project dir.: Os { code: 2, kind: NotFound, message: &quot;No such file or directory&quot; }&#xD;&#xA;  stack backtrace:&#xD;&#xA;     0:     0x55555660e61c - std::backtrace_rs::backtrace::libunwind::trace::h3c2e976dbdc1b990&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5&#xD;&#xA;     1:     0x55555660e61c - std::backtrace_rs::backtrace::trace_unsynchronized::h0110c0bfffda25e6&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5&#xD;&#xA;     2:     0x55555660e61c - std::sys_common::backtrace::_print_fmt::hcec321608a98a576&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/sys_common/backtrace.rs:67:5&#xD;&#xA;     3:     0x55555660e61c - &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt::h5c588f6466e4fb19&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/sys_common/backtrace.rs:44:22&#xD;&#xA;     4:     0x55555663a43c - core::fmt::rt::Argument::fmt::h6d08a5f4099d34a4&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/core/src/fmt/rt.rs:138:9&#xD;&#xA;     5:     0x55555663a43c - core::fmt::write::h45c64b8d2a9a9a2a&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/core/src/fmt/mod.rs:1094:21&#xD;&#xA;     6:     0x55555660afbe - std::io::Write::write_fmt::h06dc0395a93647bc&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/io/mod.rs:1714:15&#xD;&#xA;     7:     0x55555660e404 - std::sys_common::backtrace::_print::h70f23affa76188de&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/sys_common/backtrace.rs:47:5&#xD;&#xA;     8:     0x55555660e404 - std::sys_common::backtrace::print::h636df8b2fa897446&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/sys_common/backtrace.rs:34:9&#xD;&#xA;     9:     0x55555661042a - std::panicking::panic_hook_with_disk_dump::{{closure}}::h53d60c44900d65a9&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/panicking.rs:280:22&#xD;&#xA;    10:     0x555556610125 - std::panicking::panic_hook_with_disk_dump::h168e84c6915dbc70&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/panicking.rs:314:9&#xD;&#xA;    11:     0x555556610a47 - std::panicking::default_hook::ha1bea350d7781176&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/panicking.rs:239:5&#xD;&#xA;    12:     0x555556610a47 - std::panicking::rust_panic_with_hook::h8bd3ac8993dc1838&#xD;&#xA;                                 at /rustc/2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19/library/std/src/panicking.rs:753:13&#xD;&#xA;    13:     0x555556610931 - std::panicking::begin_panic_handler::{{closure}}::h5324e8e54853ae0e&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I managed to build the node by adding `jemalloc` to packages in flake.nix. But now I get this when running the node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;Other error happened while constructing the runtime: runtime requires function imports which are not present on the host: 'env:__stack_chk_fail'&quot;)))&#xD;&#xA;2023-12-10 19:11:02 Cannot create a runtime error=Other(&quot;runtime requires function imports which are not present on the host: 'env:__stack_chk_fail'&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would appriciate any help/suggestion.&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/flake.nix" ContentLicense="CC BY-SA 4.0" />
  <row Id="42289" PostHistoryTypeId="1" PostId="10620" RevisionGUID="cfd97c9b-4f1c-4c87-a7cb-b346fdae7d05" CreationDate="2023-12-10T13:49:37.087" UserId="4158" Text="Cannot build my substrate node on nixos" ContentLicense="CC BY-SA 4.0" />
  <row Id="42290" PostHistoryTypeId="3" PostId="10620" RevisionGUID="cfd97c9b-4f1c-4c87-a7cb-b346fdae7d05" CreationDate="2023-12-10T13:49:37.087" UserId="4158" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42291" PostHistoryTypeId="2" PostId="10621" RevisionGUID="63134dbc-2cfd-49ff-8d8b-fcc899e5c459" CreationDate="2023-12-10T14:28:50.283" UserId="4158" Text="Please note that `FixedU128` is not a floating point type. It represents floating point numbers using `u128` type with 18 digits of precision. This means that the last 18 digits of any number are taken to be the fractional part and the rest are taken to be the integer part.&#xD;&#xA;&#xD;&#xA;This way, we can represent `1.23` as `1_230_000_000_000_000_000`. Where `230_000_000_000_000_000` is the fractional part and `1` is the integer part.&#xD;&#xA;&#xD;&#xA;So `500000000000000000` is the correct value. You can see that by printing it using the debug format&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;log::info!(&quot;value of integer is {:?}&quot;, fixed_value);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42293" PostHistoryTypeId="5" PostId="10621" RevisionGUID="806fd94d-eb70-4e7d-8d09-cd60aa7dceb5" CreationDate="2023-12-10T14:49:06.943" UserId="4158" Comment="deleted 7 characters in body" Text="Note that `FixedU128` is not a floating point type. It represents floating point numbers using `u128` type with 18 digits of precision. This means that the last 18 digits of any number are taken to be the fractional part and the rest are taken to be the integer part.&#xD;&#xA;&#xD;&#xA;This way, we can represent `1.23` as `1_230_000_000_000_000_000`. Where `230_000_000_000_000_000` is the fractional part and `1` is the integer part.&#xD;&#xA;&#xD;&#xA;So `500000000000000000` is the correct value. You can see that by printing it using the debug format&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;log::info!(&quot;value of integer is {:?}&quot;, fixed_value);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42294" PostHistoryTypeId="2" PostId="10622" RevisionGUID="c0d8e3e0-07ed-44f6-9b60-3dc3eb853705" CreationDate="2023-12-10T14:59:56.900" UserId="4405" Text="I'm exploring a nuanced aspect of blockchain functionality and seeking community insights. In blockchain systems, events are typically public, accessible to any address. However, I'm interested in developing a mechanism where certain events are only readable by a specific address or a set of addresses. &#xD;&#xA;&#xD;&#xA;One approach I've considered is encrypting the event content, but I'm curious if there are more efficient or standardised practices in the blockchain community for this purpose.&#xD;&#xA;&#xD;&#xA;To illustrate, consider a scenario where you add a friend and emit a 'friend request' event. Ideally, only the parties involved in this event - the sender and the recipient - should have the ability to read its contents. &#xD;&#xA;&#xD;&#xA;Does anyone have experience or suggestions on how to effectively implement this kind of privacy within a blockchain environment, ensuring that specific events remain private and are only accessible to authorised addresses?&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42296" PostHistoryTypeId="1" PostId="10622" RevisionGUID="c0d8e3e0-07ed-44f6-9b60-3dc3eb853705" CreationDate="2023-12-10T14:59:56.900" UserId="4405" Text="Best Practices for Implementing Private Events in Blockchain: Restricting Event Visibility to Specific Addresses" ContentLicense="CC BY-SA 4.0" />
  <row Id="42297" PostHistoryTypeId="3" PostId="10622" RevisionGUID="c0d8e3e0-07ed-44f6-9b60-3dc3eb853705" CreationDate="2023-12-10T14:59:56.900" UserId="4405" Text="|events|blockchain-events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42298" PostHistoryTypeId="2" PostId="10623" RevisionGUID="aee95cc3-160c-40a0-9604-0c127d1d0082" CreationDate="2023-12-10T18:13:58.693" UserId="19" Text="In the [Polkadot Blockchain Academy book](https://polkadot-blockchain-academy.github.io/pba-book/frame/intro/page.html) it is mentioned that FRAME facilitates and accelerates the development of pallets:&#xD;&#xA;&#xD;&#xA;&gt; Without FRAME: 2210 lines of code. With FRAME: 310 lines of code.&#xD;&#xA;&#xD;&#xA;Undoubtedly, for those who have already developed with FRAME, the process is easier due to their experience in overcoming difficulties and addressing various issues over the past five years. However, for those aiming to deliver pallets today without an understanding of FRAME's complete history, comprehending FRAME itself might be more challenging. My question is, do you happen to know any up-to-date examples of pallets written without FRAME? In real life, I don't believe in shortcuts, and I think it could be helpful to examine a basic pallet developed without FRAME.&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42300" PostHistoryTypeId="1" PostId="10623" RevisionGUID="aee95cc3-160c-40a0-9604-0c127d1d0082" CreationDate="2023-12-10T18:13:58.693" UserId="19" Text="Pallet without FRAME" ContentLicense="CC BY-SA 4.0" />
  <row Id="42301" PostHistoryTypeId="3" PostId="10623" RevisionGUID="aee95cc3-160c-40a0-9604-0c127d1d0082" CreationDate="2023-12-10T18:13:58.693" UserId="19" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42302" PostHistoryTypeId="5" PostId="10623" RevisionGUID="d957e6bd-5cd1-4b07-9eaf-8b49c46ac79f" CreationDate="2023-12-10T19:57:25.967" UserId="19" Comment="deleted 1 character in body" Text="In the [Polkadot Blockchain Academy book](https://polkadot-blockchain-academy.github.io/pba-book/frame/intro/page.html) it is mentioned that FRAME facilitates and accelerates the development of pallets:&#xD;&#xA;&#xD;&#xA;&gt; Without FRAME: 2210 lines of code. With FRAME: 310 lines of code.&#xD;&#xA;&#xD;&#xA;Undoubtedly, for those who have already developed with FRAME, the process is easier due to their experience in overcoming difficulties and addressing various issues over the past five years. However, for those aiming to deliver pallets today without an understanding of FRAME's complete history, comprehending FRAME itself might be more challenging. My question is, do you happen to know any up-to-date examples of pallets written without FRAME? In real life, I don't believe in shortcuts, and I think it could be helpful to examine a basic pallet developed without FRAME." ContentLicense="CC BY-SA 4.0" />
  <row Id="42303" PostHistoryTypeId="2" PostId="10624" RevisionGUID="0c9d189c-9617-47e2-9234-532eacbeaef9" CreationDate="2023-12-10T22:48:09.123" UserId="4813" Text="I'm working on a project using Substrate and have encountered a technical question regarding data storage. I would like to understand the fundamental difference between using the `Preimage` pallet and storing a data hash using `T::Hashing`.&#xD;&#xA;&#xD;&#xA;1. What are the specific use cases where it is more advantageous to use the `Preimage` pallet over simply creating a data hash with `T::Hashing`?&#xD;&#xA;2. Are there any differences in terms of performance or security between these two methods?&#xD;&#xA;3. How does memory management differ between these two approaches?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42305" PostHistoryTypeId="1" PostId="10624" RevisionGUID="0c9d189c-9617-47e2-9234-532eacbeaef9" CreationDate="2023-12-10T22:48:09.123" UserId="4813" Text="Difference Between Using Preimage Pallet and Hash Storage with T::Hashing in Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="42306" PostHistoryTypeId="3" PostId="10624" RevisionGUID="0c9d189c-9617-47e2-9234-532eacbeaef9" CreationDate="2023-12-10T22:48:09.123" UserId="4813" Text="|pallet|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42307" PostHistoryTypeId="2" PostId="10625" RevisionGUID="7de46952-4d55-4dca-b473-2f63bcbb9e76" CreationDate="2023-12-11T02:14:34.853" UserId="251" Text="There isn't much difference between them.&#xD;&#xA;&#xD;&#xA;`Preimage` is more of a general version. It offers a place for those who don't want to store this themselves, and it provides a calculation for the general storage cost fee. And it also has a nice UI on Polkadot Apps for people to review the existing items.&#xD;&#xA;&#xD;&#xA;If you have a lot of specific logic, it's best to write it yourself.&#xD;&#xA;&#xD;&#xA;In terms of memory management, you can't keep a long-lifetime variable in the runtime. There are many tasks that need to be completed within a block." ContentLicense="CC BY-SA 4.0" />
  <row Id="42309" PostHistoryTypeId="2" PostId="10626" RevisionGUID="01b2b362-145f-46de-b066-c83b9be09c23" CreationDate="2023-12-11T02:26:21.547" UserId="251" Text="This is a philosophical question, I believe.&#xD;&#xA;&#xD;&#xA;For instance, in Rust, the `for` loop is frequently used. But do you truly understand what occurs behind the scenes of the `for`? It's essentially a type of shortcut.&#xD;&#xA;&#xD;&#xA;Regarding Substrate, it aids in rapid blockchain development without requiring extensive knowledge of consensus and P2P protocols.&#xD;&#xA;&#xD;&#xA;Through this shortcut, individuals can quickly engage in this field. If they encounter issues within a specific area, they will begin to delve deeper into it. Requiring people to learn every detail from the start isn't an effective approach.&#xD;&#xA;&#xD;&#xA;If you want to understand what happens behind the scenes of a macro, you can use [`cargo-expand`](https://github.com/dtolnay/cargo-expand) to expand the macro and examine the actual code." ContentLicense="CC BY-SA 4.0" />
  <row Id="42311" PostHistoryTypeId="2" PostId="10627" RevisionGUID="17e6b085-13f8-4ff2-9770-1f3b66430692" CreationDate="2023-12-11T02:39:37.297" UserId="251" Text="No, they didn't offer a way to downgrade the database. What I usually do is simply copy the data from the old node when this happens." ContentLicense="CC BY-SA 4.0" />
  <row Id="42317" PostHistoryTypeId="50" PostId="9261" RevisionGUID="a3eaf42c-4931-4530-8dd6-5987451a23a6" CreationDate="2023-12-11T06:04:35.567" UserId="-1" />
  <row Id="42318" PostHistoryTypeId="50" PostId="9258" RevisionGUID="f6ab0a5f-a5c1-49cc-a172-caa95e4ed892" CreationDate="2023-12-11T07:08:36.027" UserId="-1" />
  <row Id="42319" PostHistoryTypeId="5" PostId="8481" RevisionGUID="9a63ae15-1027-4612-b106-a742e12e23a4" CreationDate="2023-12-11T08:26:50.620" UserId="116" Comment="Spelling dont -&gt; don't" Text="Recently, I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:&#xD;&#xA;&#xD;&#xA;1- In the `new_partial()` method when initializing Aura [import queue][1], why is Aura using grandpa_block_import, isn't Aura supposed to just create blocks and should not care about justifications or finality because that's what [import_block][2] method does of `GrandpaBlockImport`? In the `new_full()` method, when starting Aura, the same thing happens, we are again using grandpa_block_import passed via [block_import][3] &#xD;&#xA;&#xD;&#xA;2- Why would Grandpa execute blocks again or check them if we are using the same block import, shouldn't Grandpa just vote on chains using block hashes and not care what's inside the block because that's the job of Aura? because this way it should instantly finalize all aura blocks since its the same block import but is not, so what is import_block() actually doing?&#xD;&#xA;&#xD;&#xA;having one block import is a bit annoying because imagine if you want to write your custom block import logic that does some custom verification before passing it to Aura only and not grandpa, if a majority of validators accept the block in aura, grandpa would simply finalize it by importing it directly with no verification, this would be impossible currently as they are executing the same logic.&#xD;&#xA;&#xD;&#xA;3- I'm tempted to import the block directly via the [client][4] in the Aura import queue in `new_partial()`, then let grandpa do the finalization with grandpa_block_import in `new_full()`  Meaning even if aura rejects a block it should be imported if grandpa finalized it, would that be wrong? if so, how to achieve that? because there is a note to use it carefully which I don't fully understand&#xD;&#xA;&#xD;&#xA;&gt; NOTE: only use this implementation when there are NO consensus-level&#xD;&#xA;&gt; `BlockImport` objects. Otherwise, importing blocks directly into the&#xD;&#xA;&gt; client would be bypassing important verification work.&#xD;&#xA;&#xD;&#xA;4- what does no consensus-level BlockImport objects mean?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L105&#xD;&#xA;  [2]: https://paritytech.github.io/substrate/master/sc_consensus/block_import/trait.BlockImport.html#tymethod.import_block&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template/blob/e0c480c0f322d0b0d1b310c93fa646fc0cfdd2df/node/src/service.rs#L237&#xD;&#xA;  [4]: https://paritytech.github.io/substrate/master/sc_service/client/struct.Client.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="42320" PostHistoryTypeId="5" PostId="8542" RevisionGUID="b45b78b1-4d59-48d1-8998-d056f5e834f0" CreationDate="2023-12-11T08:28:03.440" UserId="116" Comment="Spelling dont -&gt; don't" Text="If you want a hard limit, then you have to create a wrapper.  &#xD;&#xA;The `MaxValues` on `StorageMap` and `CountedStorageMap` are only a soft limit for PoV estimations.&#xD;&#xA;&#xD;&#xA;I don't know of any implementations of this. Not sure what you are trying to do either." ContentLicense="CC BY-SA 4.0" />
  <row Id="42321" PostHistoryTypeId="2" PostId="10629" RevisionGUID="361f3c46-2c1b-4fc5-aa34-853056a9ed59" CreationDate="2023-12-11T08:38:41.177" UserId="85" Text="I note that Grandpa uses ed25519 keys rather than the substrate standard of sr25519.&#xD;&#xA;&#xD;&#xA;Is it because sr25519 signatures are non-deterministic? ( https://substrate.stackexchange.com/questions/4857/why-are-sr25519-signatures-non-deterministic ) or is there some other reason why ed was chosen over sr? Is there some inherrent reason why Grandpa can't work (or would be insecure) using sr25519 keys?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42323" PostHistoryTypeId="1" PostId="10629" RevisionGUID="361f3c46-2c1b-4fc5-aa34-853056a9ed59" CreationDate="2023-12-11T08:38:41.177" UserId="85" Text="Why does Grandpa not use sr25519?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42324" PostHistoryTypeId="3" PostId="10629" RevisionGUID="361f3c46-2c1b-4fc5-aa34-853056a9ed59" CreationDate="2023-12-11T08:38:41.177" UserId="85" Text="|consensus|grandpa|sr25519|ed25519|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42325" PostHistoryTypeId="5" PostId="8538" RevisionGUID="710d87f3-83a6-4a95-a584-e3df44e695d4" CreationDate="2023-12-11T08:38:58.200" UserId="116" Comment="Pased link to answer" Text="There is a counted storage map: [doc][doc] [implementation][src]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct CountedStorageMap&lt;&#xD;&#xA; Prefix,&#xD;&#xA; Hasher,&#xD;&#xA; Key, &#xD;&#xA; Value, &#xD;&#xA; QueryKind = OptionQuery,&#xD;&#xA; OnEmpty = GetDefault,&#xD;&#xA; MaxValues = GetDefault&#xD;&#xA;&gt;(/* private fields */);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[doc]: https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/types/struct.CountedStorageMap.html&#xD;&#xA;&#xD;&#xA;[src]: https://github.com/paritytech/substrate/blob/6507a79b2baf7e4cc6f5868aa490dfe275144f9a/frame/support/src/storage/types/counted_map.rs#L38-L50" ContentLicense="CC BY-SA 4.0" />
  <row Id="42326" PostHistoryTypeId="5" PostId="8318" RevisionGUID="66c9f6d4-4774-4b04-81c7-1a692cd2d44d" CreationDate="2023-12-11T08:41:57.417" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="Why would blockchains interoperate, what are some real world problems with real scenarios blockchain interoperability solve? &#xD;&#xA;&#xD;&#xA;I keep hearing easier transfer of value from one blockchain to another but that's so vague and I don't know any specific examples on this, when would you need to transfer value from one blockchain to the another and why is it impossible currently, can't i simply create a bot and take the data and create a transaction and send it to another chain by respecting their rules(correct transaction format)?&#xD;&#xA;&#xD;&#xA;polkadot answer's to interoperability is the relay chain as far as I understand, a blockchain that connects blockchains, but why? why not create a common standard protocol and have every blockchain implement it however they want; like usual internet standards, what is the role of the relay chain in this and how does it make interoperability easier?&#xD;&#xA;&#xD;&#xA;I also keep hearing that blockchains(parachains) connected to the relay chain will benefit from the security of the relay chain, what does that mean? If each parachain has its own consensus model and security what can you add more to that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42327" PostHistoryTypeId="4" PostId="8318" RevisionGUID="66c9f6d4-4774-4b04-81c7-1a692cd2d44d" CreationDate="2023-12-11T08:41:57.417" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="What problems does the relay chain solve? General questions about blockchain interoperability" ContentLicense="CC BY-SA 4.0" />
  <row Id="42328" PostHistoryTypeId="5" PostId="8475" RevisionGUID="1b4694ad-ccb0-42b1-a3ad-2acc5ea0c22f" CreationDate="2023-12-11T08:43:39.440" UserId="116" Comment="Spelling dont -&gt; don't" Text="I don't know of any existing mechanisms that easily allows for this. You would have to write an indexer yourself. It could sync a parachain from scratch and store the PoV size of each block. " ContentLicense="CC BY-SA 4.0" />
  <row Id="42329" PostHistoryTypeId="5" PostId="3893" RevisionGUID="02a1a44d-fac1-4a1c-a0c3-413c13114eb8" CreationDate="2023-12-11T08:44:39.897" UserId="116" Comment="Spelling dont -&gt; don't" Text="The benchbot can now also be used to run on *companion* merge requests, even in Cumulus.  &#xD;&#xA;An example command looks like this:  &#xD;&#xA;```pre&#xD;&#xA;/cmd queue -v PATCH_substrate=11796 -c bench-bot $ pallet statemint assets pallet_uniques&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This would benchmark the `uniques` pallet for the `statemint` runtime after patching the local Substrate installation to MR `11796`.&#xD;&#xA;The `-v PATCH_substrate` is important to tell the to consider this as a companion to a different MR.  &#xD;&#xA;You can add Polkadot here as well. The output will be pushed directly to the branch, as can be see [here](https://github.com/paritytech/cumulus/pull/1460#issuecomment-1193097900).  &#xD;&#xA;&#xD;&#xA;Currently it looks like its modifying the `Cargo.lock` file, I don't think that is intentional. Will be fixed shortly." ContentLicense="CC BY-SA 4.0" />
  <row Id="42330" PostHistoryTypeId="5" PostId="8094" RevisionGUID="751b9bfb-f1a1-412c-8074-3dd18c113d73" CreationDate="2023-12-11T08:46:34.787" UserId="116" Comment="Spelling dont -&gt; don't" Text="In general it should not be necessary to implement custom benchmarks for external pallets.  &#xD;&#xA;&#xD;&#xA;You just have to configure the concrete callbacks in your runtime and re-run the benchmark. The weight of the callbacks will then be included in the output.  &#xD;&#xA;&#xD;&#xA;This is easier that to annotate weights in interface. Otherwise all interfaces that can be used as callback would need to expose their weight info as well.&#xD;&#xA;&#xD;&#xA;In your example I don't see a difference. Since every runtime config needs to re-run benches, the effort for the `CurrencyHooks` will be included." ContentLicense="CC BY-SA 4.0" />
  <row Id="42331" PostHistoryTypeId="5" PostId="8242" RevisionGUID="32f5d18e-bc35-4231-a8c2-1421e08d77c4" CreationDate="2023-12-11T08:47:26.627" UserId="116" Comment="Spellcheck remove duplicated full stop" Text="For anyone finding this post in the future. We got a working solution based on the frame_system benchmarks. See our custom benchmark [here](https://github.com/interlay/interbtc/pull/1023/files#diff-f66f26253b8fa098df5cb1609c3c380ab2fcd2f11ff1343f36e8851ddefb6955R12-R13). The idea is to define a new dummy `Pallet` and `Config` item, write benchmarks for them, and apply the generated weights to the original pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="42332" PostHistoryTypeId="2" PostId="10630" RevisionGUID="f5da4ce0-fa19-40f9-a0f5-a944ac085703" CreationDate="2023-12-11T10:23:10.447" UserId="4859" Text="What config is needed in order to see the fee for each extrinsic?&#xD;&#xA;\&#xD;&#xA;While following the Transfers example, I try to see the extrinsic.fee&#xD;&#xA;&#xD;&#xA;**in processor.ts**&#xD;&#xA;```ts&#xD;&#xA;export const processor = new SubstrateBatchProcessor()&#xD;&#xA;  .setDataSource({&#xD;&#xA;    archive: lookupArchive(CHAIN_ID, { release: 'ArrowSquid' }),&#xD;&#xA;    chain: {&#xD;&#xA;      url: RPC_ENDPOINT,&#xD;&#xA;      rateLimit: 10&#xD;&#xA;    }&#xD;&#xA;  })&#xD;&#xA;  .includeAllBlocks()&#xD;&#xA;  // .addCall({&#xD;&#xA;  //   name: undefined, // All calls&#xD;&#xA;  // })&#xD;&#xA;  .addEvent({&#xD;&#xA;    name: undefined, // All events&#xD;&#xA;    call: true,&#xD;&#xA;    // stack: true, // causes http 500...?&#xD;&#xA;    extrinsic: true&#xD;&#xA;  })&#xD;&#xA;  .setFields({&#xD;&#xA;    event: {&#xD;&#xA;      phase: true, // Initilization, ApplyExtrinsic, Finalization&#xD;&#xA;      args: true,&#xD;&#xA;    },&#xD;&#xA;    extrinsic: {&#xD;&#xA;      hash: true,&#xD;&#xA;      fee: true,&#xD;&#xA;      success: true,&#xD;&#xA;      error: true,&#xD;&#xA;    },&#xD;&#xA;    call: {&#xD;&#xA;      name: true,&#xD;&#xA;      args: true,&#xD;&#xA;      origin: true, // origin.value.value is the account id of the sender&#xD;&#xA;    },&#xD;&#xA;    block: {&#xD;&#xA;      timestamp: true,&#xD;&#xA;      specVersion: true,&#xD;&#xA;    }&#xD;&#xA;  })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**in main.ts**&#xD;&#xA;```js&#xD;&#xA;function getTransferEvents(ctx: ProcessorContext&lt;Store&gt;): TransferEvent[] {&#xD;&#xA;  // Filters and decodes the arriving events&#xD;&#xA;  let blocks: Block[] = []&#xD;&#xA;  let extrinsics: Extrinsic[] = []&#xD;&#xA;  let transfers: TransferEvent[] = []&#xD;&#xA;  for (let block of ctx.blocks) {&#xD;&#xA;    for (let extrinsic of block.extrinsics) {&#xD;&#xA;      if (!extrinsic.call?.origin) continue // no origin, not signed...?&#xD;&#xA;      console.debug(extrinsic)&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The result never has any fee populated:&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  id: '0000772882-3760a-000003',&#xD;&#xA;  index: 3,&#xD;&#xA;  version: 4,&#xD;&#xA;  signature: {&#xD;&#xA;    address: {&#xD;&#xA;      __kind: 'AccountId',&#xD;&#xA;      value: '0x4ae9eeacbc9d25e40b892b824dd9bb352841374d6f022479a5b507e79eae9e1f'&#xD;&#xA;    },&#xD;&#xA;    signature: {&#xD;&#xA;      __kind: 'Sr25519',&#xD;&#xA;      value: '0x5...'&#xD;&#xA;    },&#xD;&#xA;    signedExtensions: {&#xD;&#xA;      checkEra: [Object],&#xD;&#xA;      checkNonce: 43,&#xD;&#xA;      chargeTransactionPayment: '0'&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  tip: 0n,&#xD;&#xA;  success: true,&#xD;&#xA;  hash: '0x629732cd46b7098f18ab3ad9e603a0a6ec6377cf49695feff0b77985c5f23dff'&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42334" PostHistoryTypeId="1" PostId="10630" RevisionGUID="f5da4ce0-fa19-40f9-a0f5-a944ac085703" CreationDate="2023-12-11T10:23:10.447" UserId="4859" Text="subsquid: extrinsic fee not populated in block.extrinsics" ContentLicense="CC BY-SA 4.0" />
  <row Id="42335" PostHistoryTypeId="3" PostId="10630" RevisionGUID="f5da4ce0-fa19-40f9-a0f5-a944ac085703" CreationDate="2023-12-11T10:23:10.447" UserId="4859" Text="|polkadot|kusama|typescript|subsquid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42336" PostHistoryTypeId="2" PostId="10631" RevisionGUID="6e9d6ce7-02a7-4d1d-a36f-93e9b76701c8" CreationDate="2023-12-11T10:31:34.970" UserId="2163" Text="The zombienenet `config.toml` file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[settings]&#xD;&#xA;timeout = 1000&#xD;&#xA;&#xD;&#xA;[relaychain]&#xD;&#xA;chain = &quot;westend-local&quot;&#xD;&#xA;default_command = &quot;./polkadot&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  ws_port = 9900&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;chain = &quot;asset-hub-westend-local&quot;&#xD;&#xA;&#xD;&#xA;  [[parachains.collators]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  command = &quot;./bin/polkadot-parachain&quot;&#xD;&#xA;  ws_port = 9910&#xD;&#xA;  args = [&quot;--force-authoring&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;A local network containing only the relay chain is working however when I try to add a parachain to the network I get the following error: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Fail to add para: 2000 to genesis&#xD;&#xA;Error:  	 TypeError: Cannot read properties of undefined (reading 'paras')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Running the same zombienet network works fine with older releases." ContentLicense="CC BY-SA 4.0" />
  <row Id="42338" PostHistoryTypeId="1" PostId="10631" RevisionGUID="6e9d6ce7-02a7-4d1d-a36f-93e9b76701c8" CreationDate="2023-12-11T10:31:34.970" UserId="2163" Text="Running zombienet with polkadot release-v1.4.0 failing to add parachains" ContentLicense="CC BY-SA 4.0" />
  <row Id="42339" PostHistoryTypeId="3" PostId="10631" RevisionGUID="6e9d6ce7-02a7-4d1d-a36f-93e9b76701c8" CreationDate="2023-12-11T10:31:34.970" UserId="2163" Text="|polkadot|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42340" PostHistoryTypeId="5" PostId="10605" RevisionGUID="e632c53c-0d5d-4675-8caa-250d2389f0f7" CreationDate="2023-12-11T10:31:43.320" UserId="354" Comment="improved formatting" Text="I am new to `Substrate` development, and I have installed locally the substrate node template. It works well, but for my little project the native token is linked to physical assets and by default in the node template project, it seem that the transactions fees are actually burning tokens from the total supply? &#xD;&#xA;&#xD;&#xA;I am looking for a way (easy if possible!)  to not burn the transaction fees tokens, but instead send it to treasury or perhaps one of the admin wallet? I tried to modify the lib.rs file in the runtime folder this way, it compiled, but it did not worked and tokens are still burned when transactions occurs. Thanks in advance for your advices! &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct CustomFeeHandler;&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_payment::OnChargeTransaction for CustomFeeHandler {&#xD;&#xA;    fn withdraw_fee(&#xD;&#xA;        who: &amp;AccountId, &#xD;&#xA;        call: &amp;Call, &#xD;&#xA;        info: &amp;DispatchInfo, &#xD;&#xA;        fee: Balance, &#xD;&#xA;        tip: Balance&#xD;&#xA;    ) -&gt; Result&lt;(), TransactionValidityError&gt; {&#xD;&#xA;        // Verify that the account has enough balance to pay the fee&#xD;&#xA;        if pallet_balances::Pallet::&lt;Runtime&gt;::free_balance(who) &lt; fee {&#xD;&#xA;            return Err(TransactionValidityError::from(InvalidTransaction::Payment));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // Withdraw the fee from the account&#xD;&#xA;        let imbalance = pallet_balances::Pallet::&lt;Runtime&gt;::withdraw(&#xD;&#xA;            who, &#xD;&#xA;            fee, &#xD;&#xA;            WithdrawReasons::TRANSACTION_PAYMENT, &#xD;&#xA;            ExistenceRequirement::KeepAlive&#xD;&#xA;        )?;&#xD;&#xA;&#xD;&#xA;        // Deposit the fee into the treasury&#xD;&#xA;        Treasury::&lt;Runtime&gt;::on_unbalanced(imbalance);&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type OnChargeTransaction = CustomFeeHandler;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;5&gt;;&#xD;&#xA;	type WeightToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ConstFeeMultiplier&lt;FeeMultiplier&gt;;&#xD;&#xA;}``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="42341" PostHistoryTypeId="24" PostId="10605" RevisionGUID="e632c53c-0d5d-4675-8caa-250d2389f0f7" CreationDate="2023-12-11T10:31:43.320" Comment="Proposed by 354 approved by 251, 116 edit id of 618" ContentLicense="CC BY-SA 4.0" />
  <row Id="42342" PostHistoryTypeId="5" PostId="8614" RevisionGUID="8085bb1e-dd68-4b50-80cc-5824dcdcbdad" CreationDate="2023-12-11T10:35:54.890" UserId="116" Comment="deleted 35 characters in body" Text="I am attempting to build a smart contract for an imaginary burger shop. But I keep getting this error when I run the build command. &#xD;&#xA;&#xD;&#xA;[![the wasm*-unknown-unknown targets are not supported by default][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The test compiles, and `cargo check` compiles successfully too. &#xD;&#xA;&#xD;&#xA;Here is the source code.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod burger_shop {&#xD;&#xA;&#xD;&#xA;    use ink::prelude::*;&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use scale::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct BurgerShop {&#xD;&#xA;        orders: Vec&lt;(u32, Order)&gt;,&#xD;&#xA;        orders_mapping: Mapping&lt;u32, Order&gt;,&#xD;&#xA;        shop_owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // TODO: add logic to calculate gas fees for user&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Order {&#xD;&#xA;        burger_menu: String,&#xD;&#xA;        customer: AccountId,&#xD;&#xA;        price: u32,&#xD;&#xA;        amount: u32,&#xD;&#xA;        paid: bool,&#xD;&#xA;        delivered: bool,&#xD;&#xA;        status: Status,&#xD;&#xA;        completed: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Provide a detailed comment on the error&#xD;&#xA;        PaymentError,&#xD;&#xA;        OrderNotCompleted,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // result type&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    pub enum Status {&#xD;&#xA;        GettingIngredients,&#xD;&#xA;        Preparing,&#xD;&#xA;        SentForDelivery,&#xD;&#xA;        Delivered,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for Status {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Status::GettingIngredients&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl BurgerShop {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let list_of_orders = Mapping::new();&#xD;&#xA;            Self {&#xD;&#xA;                orders: vec![],&#xD;&#xA;                orders_mapping: list_of_orders,&#xD;&#xA;                shop_owner: Self::env().caller(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_orders(&amp;self) -&gt; Vec&lt;(u32, Order)&gt; {&#xD;&#xA;            // ensure the call is from the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;            self.orders.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn new_order(&amp;mut self, order: Order) {&#xD;&#xA;            let count = self.orders.len() as u32;&#xD;&#xA;            // ensure order is from the customer&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(&#xD;&#xA;                order.completed == false,&#xD;&#xA;                &quot;Cant add an already completed order!&quot;&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            self.orders_mapping.insert(count, &amp;order);&#xD;&#xA;&#xD;&#xA;            self.orders.push((count, order));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_single_order(&amp;self, id: u32) -&gt; (u32, Order) {&#xD;&#xA;            let tuple_order = (id, self.orders_mapping.get(id).expect(&quot;Order not found!&quot;));&#xD;&#xA;            tuple_order&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mark_completed(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;            assert!(order.paid == true, &quot;Order not paid!&quot;);&#xD;&#xA;            assert!(order.delivered == true, &quot;Order not delivered!&quot;);&#xD;&#xA;            assert!(order.status == Status::Delivered, &quot;Order not delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            if order.paid &amp;&amp; order.delivered &amp;&amp; order.status == Status::Delivered {&#xD;&#xA;                order.completed = true;&#xD;&#xA;                Ok(())&#xD;&#xA;            } else {&#xD;&#xA;                Err(Error::OrderNotCompleted)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn make_payment(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;            assert!(order.paid == false, &quot;Order already paid!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that sender is the caller&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not delivered&#xD;&#xA;            assert!(order.delivered == false, &quot;Order already delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            // make payment&#xD;&#xA;            match self.env().transfer(self.shop_owner, order.price.into()) {&#xD;&#xA;                Ok(_) =&gt; {&#xD;&#xA;                    order.paid = true;&#xD;&#xA;                    order.status = Status::Preparing;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                Err(_) =&gt; Err(Error::PaymentError),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn change_status(&amp;mut self, id: u32, status: Status) {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure caller is the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            order.status = status;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn it_works() {&#xD;&#xA;            let mut burger_shop = BurgerShop::new();&#xD;&#xA;            let order = Order {&#xD;&#xA;                burger_menu: &quot;Cheese Burger&quot;.to_string(),&#xD;&#xA;                customer: AccountId::from([0x01; 32]),&#xD;&#xA;                price: 100,&#xD;&#xA;                amount: 1,&#xD;&#xA;                paid: false,&#xD;&#xA;                delivered: false,&#xD;&#xA;                status: Status::GettingIngredients,&#xD;&#xA;                completed: false,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            burger_shop.new_order(order.clone());&#xD;&#xA;&#xD;&#xA;            let orders = burger_shop.get_orders();&#xD;&#xA;            assert_eq!(orders.len(), 1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What could I be doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the Cargo.toml file &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```ini&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;name = &quot;burger_shop&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Ayomide Bajo &lt;...&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.1&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;sp-io = &quot;22.0.0&quot;&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.0.1&quot;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The `rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release` run successfully but `cargo contract build` still results in the same error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is weird.  `cargo build` compiles but `cargo contract build` doesn't. [![rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If `cargo contract build` command doesn't work for my smart contract I can't deploy it.&#xD;&#xA;&#xD;&#xA;After removing sp-io from the .toml file. &#xD;&#xA;&#xD;&#xA;I get a new error: [![new error from wasm][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ctCCT.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/xv3eb.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/NTe6P.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42343" PostHistoryTypeId="2" PostId="10632" RevisionGUID="6e4c27c2-b1d6-433f-9595-751fb38d8696" CreationDate="2023-12-11T11:01:42.403" UserId="4556" Text="I'm trying to upgrade a repo based on the [Node template at Developer Hub][1]. This template hasn't been updated and dependencies refer to the archived SDKs instead of polkadot-sdk. &#xD;&#xA;&#xD;&#xA;I tried to change that in my repo, but it results in the following error: &#xD;&#xA;```&#xD;&#xA;error: failed to get `frame-benchmarking` as a dependency of package `node-incentiverse v0.1.0 (/Users/arjanvaneersel/Development/rust/node/node)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load source for dependency `frame-benchmarking`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech/polkadot-sdk.git?branch=polkadot-v1.0.0&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to find branch `polkadot-v1.0.0`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  cannot locate remote-tracking branch 'origin/polkadot-v1.0.0'; class=Reference (4); code=NotFound (-3)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Additionally I ran `cargo clean`, removed cargo's registry, as well as Cargo.lock before running `cargo check --release` again.&#xD;&#xA;&#xD;&#xA;All Cargo.toml files, respectively in `node`, `pallets` and `runtime` declare the dependency as follows:&#xD;&#xA;```&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I doing wrong?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="42345" PostHistoryTypeId="1" PostId="10632" RevisionGUID="6e4c27c2-b1d6-433f-9595-751fb38d8696" CreationDate="2023-12-11T11:01:42.403" UserId="4556" Text="Failed to load source for dependency `frame-benchmarking`" ContentLicense="CC BY-SA 4.0" />
  <row Id="42346" PostHistoryTypeId="3" PostId="10632" RevisionGUID="6e4c27c2-b1d6-433f-9595-751fb38d8696" CreationDate="2023-12-11T11:01:42.403" UserId="4556" Text="|substrate-node-template|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42347" PostHistoryTypeId="2" PostId="10633" RevisionGUID="79ec4156-5415-4af5-8303-d32699d2c450" CreationDate="2023-12-11T11:26:28.937" UserId="398" Text="If you are using the pallet_node_authorization then the default limit is 8 which is set in the runtime config. You can increase/update this number accordingly. I have set this to 512 in the below example.&#xD;&#xA;&#xD;&#xA;    parameter_types! {&#xD;&#xA;        pub const MaxWellKnownNodes: u32 = 512;&#xD;&#xA;        pub const MaxPeerIdLength: u32 = 128;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;        type Event = Event;&#xD;&#xA;        type MaxWellKnownNodes = MaxWellKnownNodes;&#xD;&#xA;        type MaxPeerIdLength = MaxPeerIdLength;&#xD;&#xA;        type AddOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type RemoveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type SwapOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type ResetOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type WeightInfo = ();&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="42349" PostHistoryTypeId="8" PostId="8630" RevisionGUID="6e48cbdb-9d86-4b5e-a1ed-7fc812c580b9" CreationDate="2023-12-11T12:14:14.137" UserId="116" Comment="Rollback to [e8d3cf03-4307-47f6-a83c-5a02c6e4b354]" Text="I checked my Rustc compiler version, turns out I was using the nightly+ version which contains some unstable updates for compiling to WASM(I guess). &#xD;&#xA;&#xD;&#xA;After switching to the stable version. This fixed the last weird error and it worked. Thanks, guys!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42350" PostHistoryTypeId="5" PostId="8015" RevisionGUID="bf274413-3717-47bb-a52d-017f2b9f3975" CreationDate="2023-12-11T12:20:17.097" UserId="116" Comment="Spellcheck and language i-&gt;I and code block" Text="I have substrate pallet structure as follows&#xD;&#xA;```rust&#xD;&#xA;#[derive(&#xD;&#xA;    Encode, Decode, CloneNoBound, PartialEqNoBound, Eq, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen,&#xD;&#xA;)]&#xD;&#xA;#[scale_info(skip_type_params(MetadataSize))]&#xD;&#xA;#[codec(mel_bound(AccountId: MaxEncodedLen, BlockNumber: MaxEncodedLen))]&#xD;&#xA;pub struct DataLog&lt;AccountId, BlockNumber, MetadataSize&gt;&#xD;&#xA;where&#xD;&#xA;    AccountId: Clone + PartialEq + Debug,&#xD;&#xA;    BlockNumber: Clone + PartialEq + Debug + PartialOrd,&#xD;&#xA;    MetadataSize: Get&lt;u32&gt;,&#xD;&#xA;{&#xD;&#xA;    pub account_id: Option&lt;AccountId&gt;,&#xD;&#xA;&#xD;&#xA;    pub status: u32,&#xD;&#xA;&#xD;&#xA;    pub block_number: Option&lt;BlockNumber&gt;,&#xD;&#xA;&#xD;&#xA;    pub remarks: Option&lt;BoundedVec&lt;u8, MetadataSize&gt;&gt;,&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn get_tracer)]&#xD;&#xA;pub(super) type Tracer&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;    _,&#xD;&#xA;    Blake2_128Concat,&#xD;&#xA;    BoundedVec&lt;u8, T::MAX_T_SIZE&gt;,&#xD;&#xA;    BoundedVec&lt;&#xD;&#xA;        DataLog&lt;T::AccountId, T::BlockNumber, T::MetadataSize&gt;,&#xD;&#xA;        T::MetadataSize,&#xD;&#xA;    &gt;,&#xD;&#xA;&gt;;&#xD;&#xA;&#xD;&#xA;Im trying to push a value for a  vec if exists&#xD;&#xA;&#xD;&#xA;let block_number = &lt;frame_system::Module&lt;T&gt;&gt;::block_number();&#xD;&#xA;let mut dd_log = DataLog {&#xD;&#xA;    account_id,&#xD;&#xA;    block_number: Some(block_number),&#xD;&#xA;    status,&#xD;&#xA;    remarks,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;if Tracer::&lt;T&gt;::contains_key(&amp;key) {&#xD;&#xA;    Tracer::&lt;T&gt;::mutate(key.clone(), |vc| match vc {&#xD;&#xA;        | None =&gt; return Err(Error::&lt;T&gt;::DIDDoesNotExist),&#xD;&#xA;        | Some(vc) =&gt; {&#xD;&#xA;            vc.push(dd_log.clone());&#xD;&#xA;            Ok(())&#xD;&#xA;        },&#xD;&#xA;    })?;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm getting the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;466 |                     vc.push(dd_log);&#xD;&#xA;    |                     ^^^^^^^^^^^^^^^ cannot borrow as mutable&#xD;&#xA;    |&#xD;&#xA;    = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `frame_support::BoundedVec&lt;types::DataLog&lt;&lt;T as frame_system::Config&gt;::AccountId, &lt;T as frame_system::Config&gt;::BlockNumber, &lt;T as pallet::Config&gt;::MetadataSize&gt;, &lt;T as pallet::Config&gt;::MetadataSize&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42355" PostHistoryTypeId="5" PostId="2356" RevisionGUID="7da145d4-3ce3-4a0e-a5b5-ba913a8b087f" CreationDate="2023-12-11T12:23:23.640" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="As the title suggest, I'm trying to call PSP22 token contract and read `balanceOf()` function, but I get error that I'm passing a too big of a input (27 instead of 8)&#xD;&#xA;&#xD;&#xA;When I initializing the token it works correctly and I can see the abi:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;alanceOf: function createQuery(origin, options)&#xD;&#xA;​​​​​&#xD;&#xA;length: 2&#xD;&#xA;​​​​​&#xD;&#xA;meta: Object { isMutating: false, isPayable: false, identifier: &quot;balance_of&quot;, … }&#xD;&#xA;​​​​​​&#xD;&#xA;args: Array [ {…} ]&#xD;&#xA;​​​​​​​&#xD;&#xA;0: Object { name: &quot;owner&quot;, type: {…} }&#xD;&#xA;​​​​​​​​&#xD;&#xA;name: &quot;owner&quot;&#xD;&#xA;​​​​​​​​&#xD;&#xA;type: Object { info: 10, type: &quot;AccountId&quot; }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    const tokenContract = new ContractPromise(api, abiToken, &quot;5FmJDyLBoYKfiaoPUcfR3WKh13HkwvXr2CYTNg5RLykNXY3A&quot;);&#xD;&#xA;    dispatch(set_token_contract(tokenContract));&#xD;&#xA;    const value = 0; // only useful on isPayable messages&#xD;&#xA;    // NOTE the apps UI specified these in mega units&#xD;&#xA;    const gasLimit = 3000n * 1000000n;&#xD;&#xA;&#xD;&#xA;    // (We perform the send from an account, here using Alice's address)&#xD;&#xA;    let alice = &quot;5DaYseV9GSrGKrJYmKU5yymF9izPM2ZzG8f93xQK6hectHuo&quot;&#xD;&#xA;    const { gasConsumed, result, output } = await tokenContract.query.balanceOf(alice, { gasLimit }alice); &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;here is the error: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  RPC-CORE: call(callRequest: ContractCallRequest, at?: BlockHash): ContractExecResult:: createType(ContractExecResult):: Struct: failed on result: {&quot;_enum&quot;:{&quot;Ok&quot;:&quot;ContractExecResultOk&quot;,&quot;Err&quot;:&quot;ContractExecResultErr&quot;}}:: Enum(Err):: Enum(Module):: Struct: failed on error: u8:: u8: Input too large. Found input with 28 bits, expected 8&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42356" PostHistoryTypeId="5" PostId="3141" RevisionGUID="f516b039-58e3-430c-830e-8f5a47aee039" CreationDate="2023-12-11T12:24:35.660" UserId="116" Comment="Spellcheck" Text="There seems to be a mismatch with the [adjusted DispatchError enum](https://github.com/paritytech/substrate/pull/10242) resulting in a non-decodable result when errors are emitted on calls.&#xD;&#xA;&#xD;&#xA;I believe the API only catered for it on the contracts side [this week](https://github.com/polkadot-js/api/pull/4894), so the fix should already be available in the the apps UI (the team generally seems to follow the latest API betas there). Judging by normal release cadence (which is generally [weekly](https://github.com/polkadot-js/api/releases)), the next API version should have the adjustments in." ContentLicense="CC BY-SA 4.0" />
  <row Id="42357" PostHistoryTypeId="5" PostId="6046" RevisionGUID="453046d8-f75d-45b7-8bd3-83632f979faa" CreationDate="2023-12-11T12:27:50.537" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I'm unable to build substrate-node-template using my Macbook pro M1 Pro laptop.&#xD;&#xA;&#xD;&#xA;I updated cmake and followed the [official guide](https://docs.substrate.io/quick-start/)&#xD;&#xA;&#xD;&#xA;I also tried with the flag `--locked`&#xD;&#xA;&#xD;&#xA;Here is the error log: &#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;error: failed to run custom build command for `libp2p-kad v0.41.0&#xD;&#xA;error: failed to run custom build command for `libp2p-identify v0.40.0`&#xD;&#xA;error: failed to run custom build command for `sc-network-light v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.32#5ea6d953)`&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;**Update:** &#xD;&#xA;&#xD;&#xA;After following the the [MacOs installation steps](https://docs.substrate.io/install/macos)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1. Updated BREW&#xD;&#xA;2. Installed CMAKE&#xD;&#xA;3. Installed openSSL&#xD;&#xA;4. `rustup default stable` and `rustup update`&#xD;&#xA;5. `rustup update nightly` and `rustup target add wasm32-unknown-unknown --toolchain nightly`&#xD;&#xA;6. `git clone https://github.com/substrate-developer-hub/substrate-node-template`&#xD;&#xA;7. `cd substrate-node-template`&#xD;&#xA;8. `cargo build --release` and tried `cargo build --locked`&#xD;&#xA;&#xD;&#xA;And now I'm getting the following error: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `libp2p-core v0.37.0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42358" PostHistoryTypeId="5" PostId="6130" RevisionGUID="bad15c7c-5d7c-4cda-95bb-249afb14ab8f" CreationDate="2023-12-11T12:28:44.550" UserId="116" Comment="added 34 characters in body" Text="I was able to solve it:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;brew install protobuf&#xD;&#xA;```&#xD;&#xA;fixed the issue." ContentLicense="CC BY-SA 4.0" />
  <row Id="42360" PostHistoryTypeId="2" PostId="10635" RevisionGUID="3ec82af9-4c6c-412e-8667-aa63e493f43b" CreationDate="2023-12-11T12:35:14.407" UserId="4794" Text="Here is my scenarios: One account will maintain 3 balances of TokenA, TokenB, TokenC.&#xD;&#xA;When Alice sends x TokenA to Bob, it should deposit to Bob's balance for the same kind of token, means tokenA. Similarly for TokenC, but TokenB is not transferable.&#xD;&#xA;&#xD;&#xA;Inside the same about, It is possible to convert TokenA into TokenC with a conversion rate.&#xD;&#xA;So, how should I implement them?&#xD;&#xA;and What I did so far is?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use frame_support::traits::Currency;&#xD;&#xA;	use frame_support::serde::{Deserialize, Serialize};&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	//#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	type TokenABalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Token as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;	type TokenBBalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::TokenB as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;	type TokenCBalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::TokenC as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	pub trait TokenAManagement&lt;T:Config&gt; {&#xD;&#xA;		// fn convert_to_TokenC(from: T::&amp;AccountId, amount: TokenBalanceOf&lt;T&gt;) -&gt; DispatchResult;&#xD;&#xA;		fn withdraw(owner: T::AccountId, amount: TokenBalanceOf&lt;T&gt;) -&gt; DispatchResult;&#xD;&#xA;		// fn transfer(from: &amp;T::AccountId, to: &amp;AccountId, value: TokenBalanceOf&lt;T&gt;) -&gt; DispatchResult;&#xD;&#xA;		fn deposit(owner: T::AccountId, amount: u32) -&gt; DispatchResult;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	pub trait TokenBManagement&lt;T:Config&gt; {&#xD;&#xA;		fn deposit(owner: T::AccountId, amount: u32) -&gt; DispatchResult;&#xD;&#xA;		// fn lock(owner: T::AccountId, amount: TokenCBalanceOf&lt;T&gt;) -&gt; DispatchResult;&#xD;&#xA;		// fn burn(owner: T::AccountId, amount: TokenCBalanceOf&lt;T&gt;) -&gt; DispatchResult;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	pub trait TokenBManagement&lt;T:Config&gt; {&#xD;&#xA;		fn withdraw(owner: T::AccountId, amount: u32) -&gt; DispatchResult;&#xD;&#xA;		fn deposit(owner: T::AccountId, amount: u32) -&gt; DispatchResult;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_transaction_payment::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		type TokenA : Currency&lt;Self::AccountId&gt;;&#xD;&#xA;		type TokenB : Currency&lt;Self::AccountId&gt;;&#xD;&#xA;	    type TokenC : Currency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		type TokenAManagement: TokenAManagement&lt;Self&gt;;&#xD;&#xA;		type TokenBManagement: TokenBManagement&lt;Self&gt;;&#xD;&#xA;		type TokenCManagement: TokenCManagement&lt;Self&gt;;&#xD;&#xA;	&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;	&#xD;&#xA;```&#xD;&#xA;My code is a mess. Could you please give me some idea to implement them more efficiently?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42362" PostHistoryTypeId="1" PostId="10635" RevisionGUID="3ec82af9-4c6c-412e-8667-aa63e493f43b" CreationDate="2023-12-11T12:35:14.407" UserId="4794" Text="How to manage multiple balances for one account?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42363" PostHistoryTypeId="3" PostId="10635" RevisionGUID="3ec82af9-4c6c-412e-8667-aa63e493f43b" CreationDate="2023-12-11T12:35:14.407" UserId="4794" Text="|pallet|balances|transfer|lockable-currency|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42364" PostHistoryTypeId="2" PostId="10636" RevisionGUID="8be68d17-e65d-40ad-b34f-ff4e27b5f8a1" CreationDate="2023-12-11T13:27:54.390" UserId="4794" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/KaaaT.png&#xD;&#xA;&#xD;&#xA;I added this in the beginning of lib.rs&#xD;&#xA;&#xD;&#xA;&gt; #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;Here is dependency&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.1&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-staking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;rstd = { git = &quot;https://github.com/paritytech/substrate&quot;, package = &quot;sp-std&quot;, default-features = false, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;log = { default-features = false, version = '0.4.14' }&#xD;&#xA;serde = {version=&quot;1.0.136&quot;, feature= [&quot;derive&quot;]}&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-io = { version = &quot;23.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;,  default-features = false,  branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;    &quot;rstd/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;    &quot;pallet-session/std&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Also I tried with default-features = false for serde, but It caused more problems" ContentLicense="CC BY-SA 4.0" />
  <row Id="42366" PostHistoryTypeId="1" PostId="10636" RevisionGUID="8be68d17-e65d-40ad-b34f-ff4e27b5f8a1" CreationDate="2023-12-11T13:27:54.390" UserId="4794" Text="build error because found duplicate lang item `panic_impl`" ContentLicense="CC BY-SA 4.0" />
  <row Id="42367" PostHistoryTypeId="3" PostId="10636" RevisionGUID="8be68d17-e65d-40ad-b34f-ff4e27b5f8a1" CreationDate="2023-12-11T13:27:54.390" UserId="4794" Text="|crates|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42368" PostHistoryTypeId="5" PostId="10632" RevisionGUID="be52ad3f-28da-4680-b7f1-2c79e7d5644c" CreationDate="2023-12-11T13:35:30.893" UserId="4556" Comment="added 100 characters in body" Text="I'm trying to upgrade a repo based on the [Node template at Developer Hub][1]. This template hasn't been updated and dependencies refer to the archived SDKs instead of polkadot-sdk. &#xD;&#xA;&#xD;&#xA;I tried to change that in my repo, but it results in the following error: &#xD;&#xA;```&#xD;&#xA;error: failed to get `frame-benchmarking` as a dependency of package `node-incentiverse v0.1.0 (/Users/arjanvaneersel/Development/rust/node/node)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load source for dependency `frame-benchmarking`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech/polkadot-sdk.git?branch=polkadot-v1.0.0&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to find branch `polkadot-v1.0.0`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  cannot locate remote-tracking branch 'origin/polkadot-v1.0.0'; class=Reference (4); code=NotFound (-3)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Additionally I ran `cargo clean`, removed cargo's registry, as well as Cargo.lock before running `cargo check --release` again.&#xD;&#xA;&#xD;&#xA;All Cargo.toml files, respectively in `node`, `pallets` and `runtime` declare the dependency as follows:&#xD;&#xA;```&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;```&#xD;&#xA;with the exception that only the pallets version uses `default-features = false, optional = true`.&#xD;&#xA;&#xD;&#xA;What am I doing wrong?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/substrate-developer-hub/substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="42369" PostHistoryTypeId="2" PostId="10637" RevisionGUID="58619e58-5f8d-4fb2-b681-c7ee3ac15328" CreationDate="2023-12-11T15:39:25.207" UserId="3395" Text="I need help understanding XC-20 implementation and how its components interact. Suppose I run a parachain (`ParaA`) that aims to supports XC-20. I need to include Frontier so `ParaA` is fully EVM compatible. As far as I understood, I can transfer tokens from another parachain (`ParaB`) to `ParaA` by creating a foreign asset in `ParaA` and using [`limited_reserve_transfer_assets`](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/lib.rs#L1172) from `pallet-xcm` in `ParaB` side. Therefore, could we state that **the key components to implement XC-20 standard** in `ParaA` are:&#xD;&#xA;- XCM configuration for executing XCM operations&#xD;&#xA;- [`pallet-assets`](https://github.com/paritytech/polkadot-sdk/blob/1e878780a54791c627bf6eae210b77e1bd5f098f/substrate/frame/assets/README.md#L1) that allows create foreign assets&#xD;&#xA;- Frontier for EVM compatibility&#xD;&#xA;&#xD;&#xA;Also, what is the role of the [`x-tokens`](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens) pallet in XC-20? Does it offer any benefits over using `pallet-xcm` alone?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42371" PostHistoryTypeId="1" PostId="10637" RevisionGUID="58619e58-5f8d-4fb2-b681-c7ee3ac15328" CreationDate="2023-12-11T15:39:25.207" UserId="3395" Text="How to implement XC-20 standard" ContentLicense="CC BY-SA 4.0" />
  <row Id="42372" PostHistoryTypeId="3" PostId="10637" RevisionGUID="58619e58-5f8d-4fb2-b681-c7ee3ac15328" CreationDate="2023-12-11T15:39:25.207" UserId="3395" Text="|xcm|astar|moonbeam|erc20|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42373" PostHistoryTypeId="5" PostId="10636" RevisionGUID="7c16db3f-5847-43f7-b0b3-3284609316f1" CreationDate="2023-12-11T17:04:44.233" UserId="4794" Comment="edited body" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I added this in the beginning of lib.rs&#xD;&#xA;&#xD;&#xA;&gt; #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;Here is dependency&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.1&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-staking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;rstd = { git = &quot;https://github.com/paritytech/substrate&quot;, package = &quot;sp-std&quot;, default-features = false, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;log = { default-features = false, version = '0.4.14' }&#xD;&#xA;serde = {version=&quot;1.0.136&quot;, feature= [&quot;derive&quot;]}&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-io = { version = &quot;23.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;,  default-features = false,  branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;    &quot;rstd/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;    &quot;pallet-session/std&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Also I tried with default-features = false for serde, but It caused more problems&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cDQ8U.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42374" PostHistoryTypeId="2" PostId="10638" RevisionGUID="fcbee7fe-186c-4b39-a721-d0cd6d13e93a" CreationDate="2023-12-11T17:20:59.773" UserId="2005" Text="`polkadot-v1.0.0` branch is in old, archived [repo][1], this is why it can't find it in `polkadot-sdk`. Try higher versions, i.e [`release-polkadot-v1.1.0`][2] if you want to use `polkadot-sdk`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/tree/polkadot-v1.0.0&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.1.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="42376" PostHistoryTypeId="50" PostId="3807" RevisionGUID="407858ae-e129-4884-98ff-0ca6c6915141" CreationDate="2023-12-11T23:06:20.770" UserId="-1" />
  <row Id="42377" PostHistoryTypeId="2" PostId="10639" RevisionGUID="65975616-a148-4c4e-ab34-772facd633f0" CreationDate="2023-12-11T23:39:53.180" UserId="5005" Text="1. What is the best solution for implementing a chain without a native token, but perhaps multiple assets, some of which can be used for transaction fees ? &#xD;&#xA;Is it practical to replace the pallet Balances and provide a multi-token based pallet (e.g. pallet assets) ? &#xD;&#xA;&#xD;&#xA;2. What is the best way to allow the execution of some transactions without taking additional fees for one specific pallet ? Is it a good solution to implement a custom fee system for that pallet that basically takes a fee only if the transaction fails, and returns it if succeeds. This is to avoid network spamming based on invalid extrinsics. Based on this design, is there any security implication I am missing ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42379" PostHistoryTypeId="1" PostId="10639" RevisionGUID="65975616-a148-4c4e-ab34-772facd633f0" CreationDate="2023-12-11T23:39:53.180" UserId="5005" Text="Best solution for a multi-token chain and a custom transaction payment pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="42380" PostHistoryTypeId="3" PostId="10639" RevisionGUID="65975616-a148-4c4e-ab34-772facd633f0" CreationDate="2023-12-11T23:39:53.180" UserId="5005" Text="|transaction-fees|pallet-asset|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42381" PostHistoryTypeId="2" PostId="10640" RevisionGUID="dc391813-717b-45ba-b431-863059189e21" CreationDate="2023-12-11T23:46:17.870" UserId="3598" Text="I was performing the test using zombinet and a raw chain spec and the issue was due to the fact that the registered parachainId didn't match the parachainId specified in the raw chain spec. So the solution was to set the parachainId in the zombinet config to match the parachainId in the raw chain spec." ContentLicense="CC BY-SA 4.0" />
  <row Id="42383" PostHistoryTypeId="5" PostId="10613" RevisionGUID="a50f27cc-ab4f-48f4-83aa-4092e7270ac7" CreationDate="2023-12-11T23:49:50.320" UserId="3598" Comment="added 291 characters in body" Text="Recently I started getting the following error thrown in the ```on_initialize``` hook of the aura pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-12-08 14:24:54 [Parachain] panicked at 'Slot must increase', /.cargo/git/checkouts/substrate-7e08433d4c370a21/5bfdbab/frame/aura/src/lib.rs:93:17    &#xD;&#xA;2023-12-08 14:24:54 [Parachain] err=Error { inner: Proposing&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;       WASM backtrace:&#xD;&#xA;       error while executing at wasm backtrace:&#xD;&#xA;           0: 0x396e55 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;           1: 0x3ce0 - &lt;unknown&gt;!core::panicking::panic_fmt::hc28e19cd76cf33c1&#xD;&#xA;           2: 0x149ebb - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hdf027e453fe3dfa0&#xD;&#xA;           3: 0x2275e1 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::h97a3ad9ef00b8c44&#xD;&#xA;           4: 0x14a5f9 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hfe37df7f2e5b478f&#xD;&#xA;           5: 0x1f6ac3 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hb2d583d1bf08c166&#xD;&#xA;           6: 0x1dbc7e - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;    1: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;       WASM backtrace:&#xD;&#xA;       error while executing at wasm backtrace:&#xD;&#xA;           0: 0x396e55 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;           1: 0x3ce0 - &lt;unknown&gt;!core::panicking::panic_fmt::hc28e19cd76cf33c1&#xD;&#xA;           2: 0x149ebb - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hdf027e453fe3dfa0&#xD;&#xA;           3: 0x2275e1 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::h97a3ad9ef00b8c44&#xD;&#xA;           4: 0x14a5f9 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hfe37df7f2e5b478f&#xD;&#xA;           5: 0x1f6ac3 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hb2d583d1bf08c166&#xD;&#xA;```&#xD;&#xA;This is the only collator running and it is still producing blocks, the error happens frequently, but not always, so block production hasn't stopped.&#xD;&#xA;Recently I upgraded the node version to `polkadot 1.3.0`, but the runtime has not changed.&#xD;&#xA;Does anyone know what might be causing it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;It was suggested that the issue might be due to the fact that only one collator was running, so I started another collator, I now have 2 collators producing blocks, but both are presenting the same issue.&#xD;&#xA;&#xD;&#xA;I've simulated the network using zombinet on my local computer and the collator does not have this issue.&#xD;&#xA;&#xD;&#xA;Also, I forgot to mention that the parachain is running in rococo." ContentLicense="CC BY-SA 4.0" />
  <row Id="42384" PostHistoryTypeId="6" PostId="10613" RevisionGUID="a50f27cc-ab4f-48f4-83aa-4092e7270ac7" CreationDate="2023-12-11T23:49:50.320" UserId="3598" Comment="added 291 characters in body" Text="|rococo|parachain-collator|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42386" PostHistoryTypeId="2" PostId="10641" RevisionGUID="ba231cbd-db0d-475f-a2a7-d9e2aa993721" CreationDate="2023-12-12T03:16:44.160" UserId="2844" Text="I am using `Acurast` to bring off-chain data into on-chain. I have created job and decode data inside `fn on_fulfillment` like [this](https://github.com/XcavateBlockchain/tanssi/blob/1326ba225e248544ed654bfb9bd242c999b3f787/container-chains/templates/simple/runtime/src/lib.rs#L1018),&#xD;&#xA;&#xD;&#xA;    pub struct OnAcurastFulfillment;&#xD;&#xA;    impl pallet_acurast_fulfillment_receiver::traits::OnFulfillment&lt;Runtime&gt; for OnAcurastFulfillment {&#xD;&#xA;        fn on_fulfillment(&#xD;&#xA;            _from: &lt;Runtime as frame_system::Config&gt;::AccountId,&#xD;&#xA;            _fulfillment: Fulfillment,&#xD;&#xA;        ) -&gt; DispatchResultWithInfo&lt;PostDispatchInfo&gt; {&#xD;&#xA;            // fulfillment.payload contains the bytes processed by the script&#xD;&#xA;            &#xD;&#xA;            let company_response: u128 =&#xD;&#xA;                parity_scale_codec::decode_from_bytes(_fulfillment.payload.into()).unwrap_or_default();&#xD;&#xA;    &#xD;&#xA;            Ok(().into())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If it is just single value, then I can store like this.&#xD;&#xA;&#xD;&#xA;    // if it is a storage value&#xD;&#xA;    &lt;pallet_price::Price&lt;Runtime&gt;&gt;::put(price); // u32&#xD;&#xA;&#xD;&#xA;But in my case return value is like this,&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        &quot;company_number&quot;: &quot;SC122423&quot;,&#xD;&#xA;        &quot;auth_code&quot;: &quot;901594&quot;,&#xD;&#xA;        &quot;company_uri&quot;: &quot;https://api-sandbox.company-information.service.gov.uk/company/SC122423&quot;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;How can I store this json response?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42388" PostHistoryTypeId="1" PostId="10641" RevisionGUID="ba231cbd-db0d-475f-a2a7-d9e2aa993721" CreationDate="2023-12-12T03:16:44.160" UserId="2844" Text="How to store json_data inside pallet runtime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42389" PostHistoryTypeId="3" PostId="10641" RevisionGUID="ba231cbd-db0d-475f-a2a7-d9e2aa993721" CreationDate="2023-12-12T03:16:44.160" UserId="2844" Text="|oracles|acurast|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42390" PostHistoryTypeId="2" PostId="10642" RevisionGUID="58397966-0187-4953-901b-9d16de25ec07" CreationDate="2023-12-12T06:06:18.240" UserId="251" Text="1. Use a struct to represent this JSON.&#xD;&#xA;```rs&#xD;&#xA;#[derive(Encode, Decode)]&#xD;&#xA;struct S {&#xD;&#xA;  company_number: Vec&lt;u8&gt;,&#xD;&#xA;  autho_code: Vec&lt;u8&gt;,&#xD;&#xA;  company_uri: Vec&lt;u8&gt;,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;2. Store it as a `Vec&lt;u8&gt;`. Convert it to bytes first using `base64()`, `as_bytes()`, or any other method you prefer." ContentLicense="CC BY-SA 4.0" />
  <row Id="42392" PostHistoryTypeId="2" PostId="10643" RevisionGUID="18a0fadd-885b-4da9-8580-67b9ee971206" CreationDate="2023-12-12T07:27:09.730" UserId="4462" Text="I'm trying to build raw from a plain chainspec. But all the time there is a complaint about line 186, where the quotes are located.&#xD;&#xA;&#xD;&#xA;Docker Image version: v1.4.0'&#xD;&#xA;Maybe it depends on the version of bash?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42394" PostHistoryTypeId="1" PostId="10643" RevisionGUID="18a0fadd-885b-4da9-8580-67b9ee971206" CreationDate="2023-12-12T07:27:09.730" UserId="4462" Text="Error parsing spec file: expected value at line 186 column 5 (rococo-local)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42395" PostHistoryTypeId="3" PostId="10643" RevisionGUID="18a0fadd-885b-4da9-8580-67b9ee971206" CreationDate="2023-12-12T07:27:09.730" UserId="4462" Text="|error|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42396" PostHistoryTypeId="5" PostId="10636" RevisionGUID="419dcd63-b15d-4285-98ee-40dafa1d8bae" CreationDate="2023-12-12T09:46:56.597" UserId="354" Comment="improved formatting" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I added following in the beginning of lib.rs&#xD;&#xA;&#xD;&#xA;&gt; #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;Here is dependency&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.1&quot;, default-features = false, features = [&#xD;&#xA;	&quot;derive&quot;,&#xD;&#xA;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, optional = true, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-staking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;rstd = { git = &quot;https://github.com/paritytech/substrate&quot;, package = &quot;sp-std&quot;, default-features = false, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;log = { default-features = false, version = '0.4.14' }&#xD;&#xA;serde = {version=&quot;1.0.136&quot;, feature= [&quot;derive&quot;]}&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-io = { version = &quot;23.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;,  default-features = false,  branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;std = [&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;    &quot;rstd/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;    &quot;pallet-session/std&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Also I tried with `default-features = false` for serde, but It caused more problems&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/cDQ8U.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42397" PostHistoryTypeId="24" PostId="10636" RevisionGUID="419dcd63-b15d-4285-98ee-40dafa1d8bae" CreationDate="2023-12-12T09:46:56.597" Comment="Proposed by 354 approved by 251, 4794 edit id of 620" ContentLicense="CC BY-SA 4.0" />
  <row Id="42398" PostHistoryTypeId="2" PostId="10644" RevisionGUID="fd264e24-771a-4218-9832-db969aed4082" CreationDate="2023-12-12T13:14:23.987" UserId="3317" Text="Based on the [following issue][1] it seems that this is still under investigation&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/issues/1730" ContentLicense="CC BY-SA 4.0" />
  <row Id="42400" PostHistoryTypeId="5" PostId="10641" RevisionGUID="f1ce9368-35d9-42ac-8580-e393fb693822" CreationDate="2023-12-12T13:44:56.253" UserId="2844" Comment="added 1874 characters in body" Text="I am using `Acurast` to bring off-chain data into on-chain. I have created job and decode data inside `fn on_fulfillment` like [this](https://github.com/XcavateBlockchain/tanssi/blob/1326ba225e248544ed654bfb9bd242c999b3f787/container-chains/templates/simple/runtime/src/lib.rs#L1018),&#xD;&#xA;&#xD;&#xA;    pub struct OnAcurastFulfillment;&#xD;&#xA;    impl pallet_acurast_fulfillment_receiver::traits::OnFulfillment&lt;Runtime&gt; for OnAcurastFulfillment {&#xD;&#xA;        fn on_fulfillment(&#xD;&#xA;            _from: &lt;Runtime as frame_system::Config&gt;::AccountId,&#xD;&#xA;            _fulfillment: Fulfillment,&#xD;&#xA;        ) -&gt; DispatchResultWithInfo&lt;PostDispatchInfo&gt; {&#xD;&#xA;            // fulfillment.payload contains the bytes processed by the script&#xD;&#xA;            &#xD;&#xA;            let company_response: u128 =&#xD;&#xA;                parity_scale_codec::decode_from_bytes(_fulfillment.payload.into()).unwrap_or_default();&#xD;&#xA;    &#xD;&#xA;            Ok(().into())&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;If it is just single value, then I can store like this.&#xD;&#xA;&#xD;&#xA;    // if it is a storage value&#xD;&#xA;    &lt;pallet_price::Price&lt;Runtime&gt;&gt;::put(price); // u32&#xD;&#xA;&#xD;&#xA;But in my case return value is like this,&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        &quot;company_number&quot;: &quot;SC122423&quot;,&#xD;&#xA;        &quot;auth_code&quot;: &quot;901594&quot;,&#xD;&#xA;        &quot;company_uri&quot;: &quot;https://api-sandbox.company-information.service.gov.uk/company/SC122423&quot;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;How can I store this json response?&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;    {&#xD;&#xA;        &quot;links&quot;: {&#xD;&#xA;            &quot;filing_history&quot;: &quot;/company/SC908250/filing-history&quot;,&#xD;&#xA;            &quot;officers&quot;: &quot;/company/SC908250/officers&quot;,&#xD;&#xA;            &quot;persons_with_significant_control_statement&quot;: &quot;/company/SC908250/persons-with-significant-control-statement&quot;,&#xD;&#xA;            &quot;self&quot;: &quot;/company/SC908250&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;accounts&quot;: {&#xD;&#xA;            &quot;next_due&quot;: &quot;2025-09-12&quot;,&#xD;&#xA;            &quot;next_accounts&quot;: {&#xD;&#xA;                &quot;period_start_on&quot;: &quot;2023-12-12&quot;,&#xD;&#xA;                &quot;period_end_on&quot;: &quot;2024-12-12&quot;,&#xD;&#xA;                &quot;due_on&quot;: &quot;2025-09-12&quot;,&#xD;&#xA;                &quot;overdue&quot;: false&#xD;&#xA;            },&#xD;&#xA;            &quot;next_made_up_to&quot;: &quot;2024-12-12&quot;,&#xD;&#xA;            &quot;accounting_reference_date&quot;: {&#xD;&#xA;                &quot;day&quot;: &quot;12&quot;,&#xD;&#xA;                &quot;month&quot;: &quot;12&quot;&#xD;&#xA;            },&#xD;&#xA;            &quot;overdue&quot;: false&#xD;&#xA;        },&#xD;&#xA;        &quot;company_number&quot;: &quot;SC908250&quot;,&#xD;&#xA;        &quot;date_of_creation&quot;: &quot;2022-12-12&quot;,&#xD;&#xA;        &quot;type&quot;: &quot;ltd&quot;,&#xD;&#xA;        &quot;undeliverable_registered_office_address&quot;: false,&#xD;&#xA;        &quot;company_name&quot;: &quot;COMPANY SC908250 LIMITED&quot;,&#xD;&#xA;        &quot;sic_codes&quot;: [&#xD;&#xA;            &quot;71200&quot;&#xD;&#xA;        ],&#xD;&#xA;        &quot;confirmation_statement&quot;: {&#xD;&#xA;            &quot;next_made_up_to&quot;: &quot;2024-12-12&quot;,&#xD;&#xA;            &quot;overdue&quot;: false,&#xD;&#xA;            &quot;next_due&quot;: &quot;2024-12-26&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;registered_office_is_in_dispute&quot;: false,&#xD;&#xA;        &quot;company_status&quot;: &quot;active&quot;,&#xD;&#xA;        &quot;etag&quot;: &quot;43eeb07eb23fbcb8a0701db7a7e694f83877f55d&quot;,&#xD;&#xA;        &quot;has_insolvency_history&quot;: false,&#xD;&#xA;        &quot;registered_office_address&quot;: {&#xD;&#xA;            &quot;premise&quot;: &quot;1&quot;,&#xD;&#xA;            &quot;address_line_1&quot;: &quot;4th Floor Edinburgh Quay 2&quot;,&#xD;&#xA;            &quot;address_line_2&quot;: &quot;139 Fountain Bridge&quot;,&#xD;&#xA;            &quot;country&quot;: &quot;United Kingdom&quot;,&#xD;&#xA;            &quot;locality&quot;: &quot;Edinburgh&quot;,&#xD;&#xA;            &quot;postal_code&quot;: &quot;EH3 9FF&quot;&#xD;&#xA;        },&#xD;&#xA;        &quot;jurisdiction&quot;: &quot;scotland&quot;,&#xD;&#xA;        &quot;has_charges&quot;: false,&#xD;&#xA;        &quot;can_file&quot;: true&#xD;&#xA;    }" ContentLicense="CC BY-SA 4.0" />
  <row Id="42401" PostHistoryTypeId="2" PostId="10645" RevisionGUID="7f64a755-5e37-4d3a-b694-6449adb0c9c0" CreationDate="2023-12-12T14:39:45.690" UserId="309" Text="I have a pallet that is using the pallet_collective to trigger votes for roles affectations requests. everything works fine in the polkadot.js interface, but testing is not going as expected.&#xD;&#xA;&#xD;&#xA;in the mock file, I have the following for `construct_runtime!`:&#xD;&#xA;&#xD;&#xA;    frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test &#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config&lt;T&gt;, Storage, Event&lt;T&gt;},&#xD;&#xA;		RolesModule: pallet_roles::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		Balances: pallet_balances::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},&#xD;&#xA;		Sudo:pallet_sudo::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},&#xD;&#xA;		Collective: pallet_collective::&lt;Instance2&gt;::{Pallet, Call, Event&lt;T&gt;, Origin&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The function that is supposed to start the referendum is the following:&#xD;&#xA;&#xD;&#xA;    pub fn start_council_session(account: T::AccountId,account_type: Accounts) -&gt; DispatchResultWithPostInfo{&#xD;&#xA;		//Create proposal&#xD;&#xA;		let proposal0 = &#xD;&#xA;			Call::&lt;T&gt;::account_approval{&#xD;&#xA;				account: account.clone()&#xD;&#xA;			};&#xD;&#xA;		let proposal = Self::get_formatted_call(proposal0.into()).unwrap();&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;						&#xD;&#xA;		let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;		&#xD;&#xA;		let council_member = Coll::Pallet::&lt;T,Instance2&gt;::members()[0].clone();&#xD;&#xA;		let council_origin= Self::get_origin(council_member);&#xD;&#xA;&#xD;&#xA;		//Start Collective refererendum&#xD;&#xA;		Coll::Pallet::&lt;T,Instance2&gt;::propose(&#xD;&#xA;			council_origin,&#xD;&#xA;			2,&#xD;&#xA;			Box::new(proposal.clone()),&#xD;&#xA;			proposal_len,&#xD;&#xA;		).ok();&#xD;&#xA;		let mut index:u32 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_count();&#xD;&#xA;		index = index.saturating_sub(1);&#xD;&#xA;&#xD;&#xA;		//Update proposal index and hash&#xD;&#xA;		let proposal_hashes =  Coll::Pallet::&lt;T,Instance2&gt;::proposals().into_iter();&#xD;&#xA;		for proposal_hash in proposal_hashes{&#xD;&#xA;			let prop0 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_of(proposal_hash.clone()).unwrap();&#xD;&#xA;			if proposal == prop0{&#xD;&#xA;				let mut proposal_all = Proposal::&lt;T&gt;::new(account.clone(), Some(account_type),proposal_hash.clone());&#xD;&#xA;				proposal_all.proposal_index = index;&#xD;&#xA;				proposal_all.proposal_hash = proposal_hash;&#xD;&#xA;				RequestedRoles::&lt;T&gt;::insert(&amp;account, proposal_all);&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		Ok(().into())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;Calling the extrinsic that is using this function does not generate any error, but If I try the following `assert_eq!(Collective::proposal_count(),1);` or the following: `assert_eq!(Collective::proposals().len(),1);` both tests fail saying that I still have 0 proposal. why would an extrinsic would work &quot;manually&quot; but not in the tests? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42403" PostHistoryTypeId="1" PostId="10645" RevisionGUID="7f64a755-5e37-4d3a-b694-6449adb0c9c0" CreationDate="2023-12-12T14:39:45.690" UserId="309" Text="Testing &amp; pallet_collective" ContentLicense="CC BY-SA 4.0" />
  <row Id="42404" PostHistoryTypeId="3" PostId="10645" RevisionGUID="7f64a755-5e37-4d3a-b694-6449adb0c9c0" CreationDate="2023-12-12T14:39:45.690" UserId="309" Text="|testing|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42405" PostHistoryTypeId="2" PostId="10646" RevisionGUID="d5d5a967-3704-485c-ae98-d88695ae92cd" CreationDate="2023-12-12T15:53:42.630" UserId="3395" Text="I'm trying to have a deep understanding of the differences between [xcm-simulator](https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-simulator) and [xcm-emulator](https://github.com/paritytech/cumulus/tree/master/xcm/xcm-emulator).&#xD;&#xA;&#xD;&#xA;I understand that xcm-emulator is &quot;less mocked&quot; than xcm-simulator. But because when using xcm-simulator we also configure chains runtimes is a bit unclear for me. Some project that I have checked it out only use xcm-simulator to test their xcm capabilities, I wonder why is that?&#xD;&#xA;&#xD;&#xA;Initially, I assumed the XCM-emulator was better for using a &quot;less mocked&quot; tool, thus allowing for more reliable tests to be built." ContentLicense="CC BY-SA 4.0" />
  <row Id="42407" PostHistoryTypeId="1" PostId="10646" RevisionGUID="d5d5a967-3704-485c-ae98-d88695ae92cd" CreationDate="2023-12-12T15:53:42.630" UserId="3395" Text="Differences between xcm-simulator and xcm-emulator" ContentLicense="CC BY-SA 4.0" />
  <row Id="42408" PostHistoryTypeId="3" PostId="10646" RevisionGUID="d5d5a967-3704-485c-ae98-d88695ae92cd" CreationDate="2023-12-12T15:53:42.630" UserId="3395" Text="|xcm|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42409" PostHistoryTypeId="5" PostId="10646" RevisionGUID="39f4fd0f-80f2-4d0e-8094-6a8d89c4a783" CreationDate="2023-12-12T16:01:19.797" UserId="3395" Comment="added 196 characters in body" Text="I'm trying to have a deep understanding of the differences between [xcm-simulator](https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-simulator) and [xcm-emulator](https://github.com/paritytech/cumulus/tree/master/xcm/xcm-emulator).&#xD;&#xA;&#xD;&#xA;I understand that xcm-emulator is &quot;less mocked&quot; than xcm-simulator. But because when using xcm-simulator we also configure chains runtimes is a bit unclear for me. Some project that I have checked it out only use xcm-simulator to test their xcm capabilities, I wonder why is that?&#xD;&#xA;&#xD;&#xA;Initially, I assumed the XCM-emulator was better for using a &quot;less mocked&quot; tool, thus allowing for more reliable tests to be built.&#xD;&#xA;&#xD;&#xA;I would like to include a test case in my parachain project that checks whether I can transfer a token to another parachain and then return it to my parachain. Which of the two tools is best for this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42410" PostHistoryTypeId="5" PostId="10645" RevisionGUID="b8125ae9-dd25-4990-8bb4-44000d40080b" CreationDate="2023-12-12T16:29:06.693" UserId="251" Comment="deleted 19 characters in body" Text="I have a pallet that is using the pallet_collective to trigger votes for roles affectations requests. everything works fine in the polkadot.js interface, but testing is not going as expected.&#xD;&#xA;&#xD;&#xA;in the mock file, I have the following for `construct_runtime!`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test &#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config&lt;T&gt;, Storage, Event&lt;T&gt;},&#xD;&#xA;		RolesModule: pallet_roles::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		Balances: pallet_balances::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},&#xD;&#xA;		Sudo:pallet_sudo::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},&#xD;&#xA;		Collective: pallet_collective::&lt;Instance2&gt;::{Pallet, Call, Event&lt;T&gt;, Origin&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The function that is supposed to start the referendum is the following:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub fn start_council_session(account: T::AccountId,account_type: Accounts) -&gt; DispatchResultWithPostInfo{&#xD;&#xA;	//Create proposal&#xD;&#xA;	let proposal0 = &#xD;&#xA;		Call::&lt;T&gt;::account_approval{&#xD;&#xA;			account: account.clone()&#xD;&#xA;		};&#xD;&#xA;	let proposal = Self::get_formatted_call(proposal0.into()).unwrap();&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;					&#xD;&#xA;	let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;	&#xD;&#xA;	let council_member = Coll::Pallet::&lt;T,Instance2&gt;::members()[0].clone();&#xD;&#xA;	let council_origin= Self::get_origin(council_member);&#xD;&#xA;&#xD;&#xA;	//Start Collective refererendum&#xD;&#xA;	Coll::Pallet::&lt;T,Instance2&gt;::propose(&#xD;&#xA;		council_origin,&#xD;&#xA;		2,&#xD;&#xA;		Box::new(proposal.clone()),&#xD;&#xA;		proposal_len,&#xD;&#xA;	).ok();&#xD;&#xA;	let mut index:u32 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_count();&#xD;&#xA;	index = index.saturating_sub(1);&#xD;&#xA;&#xD;&#xA;	//Update proposal index and hash&#xD;&#xA;	let proposal_hashes =  Coll::Pallet::&lt;T,Instance2&gt;::proposals().into_iter();&#xD;&#xA;	for proposal_hash in proposal_hashes{&#xD;&#xA;		let prop0 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_of(proposal_hash.clone()).unwrap();&#xD;&#xA;		if proposal == prop0{&#xD;&#xA;			let mut proposal_all = Proposal::&lt;T&gt;::new(account.clone(), Some(account_type),proposal_hash.clone());&#xD;&#xA;			proposal_all.proposal_index = index;&#xD;&#xA;			proposal_all.proposal_hash = proposal_hash;&#xD;&#xA;			RequestedRoles::&lt;T&gt;::insert(&amp;account, proposal_all);&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;	Ok(().into())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Calling the extrinsic that is using this function does not generate any error, but If I try the following `assert_eq!(Collective::proposal_count(),1);` or the following: `assert_eq!(Collective::proposals().len(),1);` both tests fail saying that I still have 0 proposal. why would an extrinsic would work &quot;manually&quot; but not in the tests? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42411" PostHistoryTypeId="2" PostId="10647" RevisionGUID="713b88cf-cf3d-4d63-9351-302a41f3c968" CreationDate="2023-12-12T19:08:27.830" UserId="73" Text="You can run your node with `--wasm-runtime-overrides PATH_TO_FOLDER`. Where `PATH_TO_FOLDER` contains one or more wasm files that will be used to override the on chain wasm. Overriding is done based on the `spec_version`. You also want to ensure that the override is producing the same state changes as the on chain wasm to continue syncing." ContentLicense="CC BY-SA 4.0" />
  <row Id="42417" PostHistoryTypeId="5" PostId="10605" RevisionGUID="63707310-7ac5-4a75-a704-f071c398a34d" CreationDate="2023-12-12T19:35:24.233" UserId="4999" Comment="added 3726 characters in body" Text="UPDATE:&#xD;&#xA;&#xD;&#xA;After several hours on this, I think it boils down to my pallet_treasury implementation. I keep getting errors especially regarding the SpendOrigin line of code? Here are the errors I get when compiling, my uses settings and my config for the treasury in the lib file (and my name is Alice which can be confusing at times :) ):&#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA; error[E0603]: trait `EnsureOrigin` is private&#xD;&#xA;     --&gt; /home/alice/substrate-node-template/runtime/src/lib.rs:294:35&#xD;&#xA;      |&#xD;&#xA;  294 |     type SpendOrigin = frame_system::EnsureOrigin&lt;AccountId&gt;;&#xD;&#xA;      |                                      ^^^^^^^^^^^^ private trait&#xD;&#xA;      |&#xD;&#xA;  note: the trait `EnsureOrigin` is defined here&#xD;&#xA;     --&gt; /home/alice/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/frame/system/src/lib.rs:98:23&#xD;&#xA;      |&#xD;&#xA;  98  |         ConstU32, Contains, EnsureOrigin, EnsureOriginWithArg, Get, HandleLifetime,&#xD;&#xA;      |                             ^^^^^^^^^^^^&#xD;&#xA;  help: consider importing this trait instead&#xD;&#xA;      |&#xD;&#xA;  294 |     type SpendOrigin = frame_support::pallet_prelude::EnsureOrigin&lt;AccountId&gt;;&#xD;&#xA;      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&#xD;&#xA;&#xD;&#xA;  error[E0191]: the value of the associated type `Success` (from trait `hidden_include::traits::EnsureOrigin`) must be specified&#xD;&#xA;     --&gt; /home/alice/substrate-node-template/runtime/src/lib.rs:294:21&#xD;&#xA;      |&#xD;&#xA;  294 |     type SpendOrigin = frame_system::EnsureOrigin&lt;AccountId&gt;;&#xD;&#xA;      |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: specify the associated type: `frame_system::EnsureOrigin&lt;AccountId, Success = Type&gt;`&#xD;&#xA;&#xD;&#xA;  error[E0782]: trait objects must include the `dyn` keyword&#xD;&#xA;     --&gt; /home/alice/substrate-node-template/runtime/src/lib.rs:294:21&#xD;&#xA;      |&#xD;&#xA;  294 |     type SpendOrigin = frame_system::EnsureOrigin&lt;AccountId&gt;;&#xD;&#xA;      |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;      |&#xD;&#xA;  help: add `dyn` keyword before this trait&#xD;&#xA;      |&#xD;&#xA;  294 |     type SpendOrigin = dyn frame_system::EnsureOrigin&lt;AccountId&gt;;&#xD;&#xA;      |                        +++&#xD;&#xA;&#xD;&#xA;  Some errors have detailed explanations: E0191, E0603, E0782.&#xD;&#xA;  For more information about an error, try `rustc --explain E0191`.&#xD;&#xA;  error: could not compile `node-template-runtime` (lib) due to 3 previous errors``` &#xD;&#xA;&#xD;&#xA;``` use frame_system::EnsureRoot;&#xD;&#xA;use pallet_treasury;&#xD;&#xA;use frame_support::{PalletId, pallet_prelude::EnsureOrigin};&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;``` &#xD;&#xA;parameter_types! {&#xD;&#xA;    pub const TreasuryPalletId: PalletId = PalletId(*b&quot;py/trsry&quot;);&#xD;&#xA;    pub const ProposalBond: Permill = Permill::from_percent(0);&#xD;&#xA;    pub const ProposalBondMinimum: Balance = 0; // Set minimum value for proposal bond&#xD;&#xA;	pub const ProposalBondMaximum: Balance = 0; // Set minimum value for proposal bond&#xD;&#xA;    pub const SpendPeriod: BlockNumber = 7 * DAYS; // 7 days in blocks&#xD;&#xA;    pub const Burn: Permill = Permill::from_percent(0); // Set burn percentage&#xD;&#xA;    pub const MaxApprovals: u32 = 100; // Set max approvals&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_treasury::Config for Runtime {&#xD;&#xA;    type PalletId = TreasuryPalletId;&#xD;&#xA;    type Currency = Balances;&#xD;&#xA;    type ApproveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;    type RejectOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;    type RuntimeEvent = RuntimeEvent;&#xD;&#xA;    type OnSlash = ();&#xD;&#xA;    type ProposalBond = ProposalBond;&#xD;&#xA;    type ProposalBondMinimum = ProposalBondMinimum;&#xD;&#xA;	type ProposalBondMaximum = ProposalBondMaximum;&#xD;&#xA;    type SpendPeriod = SpendPeriod;&#xD;&#xA;    type Burn = Burn;&#xD;&#xA;    type BurnDestination = (); // Set as empty if no specific destination&#xD;&#xA;    type WeightInfo = pallet_treasury::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    type SpendFunds = ();&#xD;&#xA;    type MaxApprovals = MaxApprovals;&#xD;&#xA;	type SpendOrigin = frame_system::EnsureOrigin&lt;AccountId&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;I am new to `Substrate` development, and I have installed locally the substrate node template. It works well, but for my little project the native token is linked to physical assets and by default in the node template project, it seem that the transactions fees are actually burning tokens from the total supply? &#xD;&#xA;&#xD;&#xA;I am looking for a way (easy if possible!)  to not burn the transaction fees tokens, but instead send it to treasury or perhaps one of the admin wallet? I tried to modify the lib.rs file in the runtime folder this way, it compiled, but it did not worked and tokens are still burned when transactions occurs. Thanks in advance for your advices! &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct CustomFeeHandler;&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_payment::OnChargeTransaction for CustomFeeHandler {&#xD;&#xA;    fn withdraw_fee(&#xD;&#xA;        who: &amp;AccountId, &#xD;&#xA;        call: &amp;Call, &#xD;&#xA;        info: &amp;DispatchInfo, &#xD;&#xA;        fee: Balance, &#xD;&#xA;        tip: Balance&#xD;&#xA;    ) -&gt; Result&lt;(), TransactionValidityError&gt; {&#xD;&#xA;        // Verify that the account has enough balance to pay the fee&#xD;&#xA;        if pallet_balances::Pallet::&lt;Runtime&gt;::free_balance(who) &lt; fee {&#xD;&#xA;            return Err(TransactionValidityError::from(InvalidTransaction::Payment));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // Withdraw the fee from the account&#xD;&#xA;        let imbalance = pallet_balances::Pallet::&lt;Runtime&gt;::withdraw(&#xD;&#xA;            who, &#xD;&#xA;            fee, &#xD;&#xA;            WithdrawReasons::TRANSACTION_PAYMENT, &#xD;&#xA;            ExistenceRequirement::KeepAlive&#xD;&#xA;        )?;&#xD;&#xA;&#xD;&#xA;        // Deposit the fee into the treasury&#xD;&#xA;        Treasury::&lt;Runtime&gt;::on_unbalanced(imbalance);&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type OnChargeTransaction = CustomFeeHandler;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;5&gt;;&#xD;&#xA;	type WeightToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ConstFeeMultiplier&lt;FeeMultiplier&gt;;&#xD;&#xA;}``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="42418" PostHistoryTypeId="2" PostId="10649" RevisionGUID="0e9a30a1-3ce4-4ff7-ad70-31d5b5571d92" CreationDate="2023-12-12T20:40:55.347" UserId="359" Text="You can also use [Chopsticks][1] to replay blocks and see the logs. Again, you need to have `--wasm-override` to use a wasm with logging enabled and `--runtime-log-level=5` to enable verbose logs.&#xD;&#xA;&#xD;&#xA;Depends on what you want to do, you may set the block number to the one before the block you want to replay, and send the tx and see the output, or use the `run-block` subcommand / `dev_runBlock` RPC to run the block.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AcalaNetwork/chopsticks/tree/master" ContentLicense="CC BY-SA 4.0" />
  <row Id="42421" PostHistoryTypeId="5" PostId="6131" RevisionGUID="e13ccc20-b6e0-4b35-b6b6-82d1279923bd" CreationDate="2023-12-13T00:03:29.367" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I'm trying to deploy INK! 3.3.0 smart contract to my local substrate node and Im getting &#xD;&#xA;&gt;CodeRejected; Can't decode wasm code.&#xD;&#xA;&#xD;&#xA;When I compile my code i get no errors and using the following command to compile and build the smart contract:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo +nightly-2022-08-15 contract build&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Note**: &#xD;&#xA;&#xD;&#xA; * I was able to deploy the contract not long ago, i think its stopped work after I updated rustup nightly.&#xD;&#xA; &#xD;&#xA; * I get no error from the substrate console &#xD;&#xA;```&#xD;&#xA;./target/release/node-template --dev -l error,debug&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Rustc nightly version: rustc 1.67.0-nightly (b3bc6bf31 2022-11-24)&#xD;&#xA;&#xD;&#xA;I'm using MacBook Pro M1 Pro chip (13.0.1 (22A400) version)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42422" PostHistoryTypeId="5" PostId="6132" RevisionGUID="3468a1e9-dd1c-4750-8985-e575d5868c5a" CreationDate="2023-12-13T00:04:04.260" UserId="116" Comment="Code block" Text="Adding `--optimization-passes=0` to the contract build command will fix the issue (only a work-a-round until official fix)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42423" PostHistoryTypeId="5" PostId="3109" RevisionGUID="faa99290-28ac-4a12-88af-36420b2360cd" CreationDate="2023-12-13T00:05:41.403" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="When I tried to get a logarithm of a number I'm getting following errors in Substrate, how to fix this?&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  437 |         let cc = f32::log10(4 as f32);&#xD;&#xA;      |                       ^^^^^ function or associated item not found in `f32`&#xD;&#xA;&#xD;&#xA;  error[E0599]: no method named `log10` found for type `f32` in the current scope&#xD;&#xA;     --&gt; /home/dev/Desktop/projects/GIANT/pallets/provider/src/lib.rs:439:20&#xD;&#xA;      |&#xD;&#xA;  439 |         let x =  1.0_f32.log10() -  2.0_f32.log10();&#xD;&#xA;      |                          ^^^^^ method not found in `f32`&#xD;&#xA;&#xD;&#xA;  error[E0599]: no method named `log10` found for type `f32` in the current scope&#xD;&#xA;     --&gt; /home/dev/Desktop/projects/GIANT/pallets/provider/src/lib.rs:439:39&#xD;&#xA;      |&#xD;&#xA;  439 |         let x =  1.0_f32.log10() -  2.0_f32.log10();&#xD;&#xA;      |                                             ^^^^^ method not found in `f32`&#xD;&#xA;&#xD;&#xA;|         let e = ln(1.0 / 2.0);&#xD;&#xA;      |                 ^^ not found in this scope&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42424" PostHistoryTypeId="5" PostId="3110" RevisionGUID="f7eb1e44-8670-4dd8-82b0-9effadf0f37d" CreationDate="2023-12-13T00:06:45.400" UserId="116" Comment="link as link" Text="You really cannot use floating point numbers in the runtime since floating point numbers are not deterministic. You can learn a lot more why with other online resources like [this](https://www.youtube.com/watch?v=PZRI1IfStY0).&#xD;&#xA;&#xD;&#xA;Instead you should be looking to use the primitives provided by [`sp_arithmetic`](https://crates.parity.io/sp_arithmetic/index.html), which uses fixed point numbers to ensure determinism and safety in the runtime.&#xD;&#xA;&#xD;&#xA;It does not seem there is a log10 currently implemented, but you can implement it yourself and make a PR to Substrate using a taylor series like [noted here](https://ethereum.stackexchange.com/questions/8086/logarithm-math-operation-in-solidity)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42425" PostHistoryTypeId="5" PostId="10605" RevisionGUID="a36739c3-df7d-4559-b96d-0e30c5b65177" CreationDate="2023-12-13T00:30:17.307" UserId="4999" Comment="deleted 3730 characters in body" Text="I am new to `Substrate` development, and I have installed locally the substrate node template. It works well, but for my little project the native token is linked to physical assets and by default in the node template project, it seem that the transactions fees are actually burning tokens from the total supply? &#xD;&#xA;&#xD;&#xA;I am looking for a way (easy if possible!)  to not burn the transaction fees tokens, but instead send it to treasury or perhaps one of the admin wallet? I tried to modify the lib.rs file in the runtime folder this way, it compiled, but it did not worked and tokens are still burned when transactions occurs. Thanks in advance for your advices! &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct CustomFeeHandler;&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_payment::OnChargeTransaction for CustomFeeHandler {&#xD;&#xA;    fn withdraw_fee(&#xD;&#xA;        who: &amp;AccountId, &#xD;&#xA;        call: &amp;Call, &#xD;&#xA;        info: &amp;DispatchInfo, &#xD;&#xA;        fee: Balance, &#xD;&#xA;        tip: Balance&#xD;&#xA;    ) -&gt; Result&lt;(), TransactionValidityError&gt; {&#xD;&#xA;        // Verify that the account has enough balance to pay the fee&#xD;&#xA;        if pallet_balances::Pallet::&lt;Runtime&gt;::free_balance(who) &lt; fee {&#xD;&#xA;            return Err(TransactionValidityError::from(InvalidTransaction::Payment));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        // Withdraw the fee from the account&#xD;&#xA;        let imbalance = pallet_balances::Pallet::&lt;Runtime&gt;::withdraw(&#xD;&#xA;            who, &#xD;&#xA;            fee, &#xD;&#xA;            WithdrawReasons::TRANSACTION_PAYMENT, &#xD;&#xA;            ExistenceRequirement::KeepAlive&#xD;&#xA;        )?;&#xD;&#xA;&#xD;&#xA;        // Deposit the fee into the treasury&#xD;&#xA;        Treasury::&lt;Runtime&gt;::on_unbalanced(imbalance);&#xD;&#xA;&#xD;&#xA;        Ok(())&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type OnChargeTransaction = CustomFeeHandler;&#xD;&#xA;	type OperationalFeeMultiplier = ConstU8&lt;5&gt;;&#xD;&#xA;	type WeightToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type LengthToFee = IdentityFee&lt;Balance&gt;;&#xD;&#xA;	type FeeMultiplierUpdate = ConstFeeMultiplier&lt;FeeMultiplier&gt;;&#xD;&#xA;}``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="42426" PostHistoryTypeId="5" PostId="6005" RevisionGUID="e2f79ef2-4ef0-4200-8b15-c41a6ef3b758" CreationDate="2023-12-13T00:50:55.370" UserId="116" Comment="Spellcheck and language im-&gt;I'm" Text="I'm in the process of configuring weights for a pallet &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct GymWeight&lt;T&gt;(PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;T: frame_system::Config&gt; WeightInfo for GymWeight&lt;T&gt; {&#xD;&#xA;&#xD;&#xA;	fn register_members() -&gt; Weight {&#xD;&#xA;		(51_977_000 as Weight)&#xD;&#xA;			.saturating_add(T::DbWeight::get().reads(2 as Weight))&#xD;&#xA;			.saturating_add(T::DbWeight::get().writes(2 as Weight))&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I'm ended up in the following error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0605]: non-primitive cast: `{integer}` as `Weight`&#xD;&#xA;   --&gt; gym/src/weights.rs:105:3&#xD;&#xA;    |&#xD;&#xA;105 |         (51_977_000 as Weight)&#xD;&#xA;    |         ^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object&#xD;&#xA;&#xD;&#xA;error[E0605]: non-primitive cast: `{integer}` as `Weight`&#xD;&#xA;   --&gt; gym/src/weights.rs:106:45&#xD;&#xA;    |&#xD;&#xA;106 |             .saturating_add(T::DbWeight::get().reads(2 as Weight))&#xD;&#xA;    |                                                      ^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Imports as follows&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(rustfmt, rustfmt_skip)]&#xD;&#xA;#![allow(unused_parens)]&#xD;&#xA;#![allow(unused_imports)]&#xD;&#xA;&#xD;&#xA;use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};&#xD;&#xA;use sp_std::marker::PhantomData;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42427" PostHistoryTypeId="5" PostId="6009" RevisionGUID="3cef9515-0ca8-4d39-9aee-a08fa2c0746d" CreationDate="2023-12-13T00:51:46.247" UserId="116" Comment="link as link" Text="What version of the Substrate you are using? If it is `polkadot-v0.9.30`+, it may be caused by weight v1.5. The type of `Weight` has been changed. Please refer to [this PR](https://github.com/paritytech/substrate/pull/12138)&#xD;&#xA;&#xD;&#xA;You should use the weight in this way:&#xD;&#xA;```rust&#xD;&#xA;Weight::from_ref_time(52_281_000 as u64)&#xD;&#xA;	.saturating_add(T::DbWeight::get().reads(4 as u64))&#xD;&#xA;	.saturating_add(T::DbWeight::get().writes(4 as u64))&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42428" PostHistoryTypeId="50" PostId="10413" RevisionGUID="56b55a90-98fa-45d9-97aa-8ab389b64e5f" CreationDate="2023-12-13T07:03:05.393" UserId="-1" />
  <row Id="42429" PostHistoryTypeId="5" PostId="10635" RevisionGUID="9be5afc5-2068-4960-a393-2a850468c880" CreationDate="2023-12-13T10:16:11.813" UserId="354" Comment="improved formatting" Text="Here is my scenario: One account will maintain 3 balances of Token A, Token B, Token C.&#xD;&#xA;When Alice sends x Token A to Bob, it should deposit to Bob's balance for the same kind of token, means Token A. Similarly for Token C, but Token B is not transferable.&#xD;&#xA;&#xD;&#xA;Inside the same about, It is possible to convert Token A into Token C with a conversion rate.&#xD;&#xA;So, how should I implement them?&#xD;&#xA;and What I did so far is?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use frame_support::traits::Currency;&#xD;&#xA;	use frame_support::serde::{Deserialize, Serialize};&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	//#[cfg(feature = &quot;std&quot;)]&#xD;&#xA;	type TokenABalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::Token as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;	type TokenBBalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::TokenB as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;	type TokenCBalanceOf&lt;T&gt; = &lt;&lt;T as Config&gt;::TokenC as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	pub trait TokenAManagement&lt;T:Config&gt; {&#xD;&#xA;		// fn convert_to_TokenC(from: T::&amp;AccountId, amount: TokenBalanceOf&lt;T&gt;) -&gt; DispatchResult;&#xD;&#xA;		fn withdraw(owner: T::AccountId, amount: TokenBalanceOf&lt;T&gt;) -&gt; DispatchResult;&#xD;&#xA;		// fn transfer(from: &amp;T::AccountId, to: &amp;AccountId, value: TokenBalanceOf&lt;T&gt;) -&gt; DispatchResult;&#xD;&#xA;		fn deposit(owner: T::AccountId, amount: u32) -&gt; DispatchResult;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	pub trait TokenBManagement&lt;T:Config&gt; {&#xD;&#xA;		fn deposit(owner: T::AccountId, amount: u32) -&gt; DispatchResult;&#xD;&#xA;		// fn lock(owner: T::AccountId, amount: TokenCBalanceOf&lt;T&gt;) -&gt; DispatchResult;&#xD;&#xA;		// fn burn(owner: T::AccountId, amount: TokenCBalanceOf&lt;T&gt;) -&gt; DispatchResult;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	pub trait TokenBManagement&lt;T:Config&gt; {&#xD;&#xA;		fn withdraw(owner: T::AccountId, amount: u32) -&gt; DispatchResult;&#xD;&#xA;		fn deposit(owner: T::AccountId, amount: u32) -&gt; DispatchResult;&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config + pallet_transaction_payment::Config {&#xD;&#xA;		/// Because this pallet emits events, it depends on the runtime's definition of an event.&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;&#xD;&#xA;		type TokenA : Currency&lt;Self::AccountId&gt;;&#xD;&#xA;		type TokenB : Currency&lt;Self::AccountId&gt;;&#xD;&#xA;	    type TokenC : Currency&lt;Self::AccountId&gt;;&#xD;&#xA;&#xD;&#xA;		type TokenAManagement: TokenAManagement&lt;Self&gt;;&#xD;&#xA;		type TokenBManagement: TokenBManagement&lt;Self&gt;;&#xD;&#xA;		type TokenCManagement: TokenCManagement&lt;Self&gt;;&#xD;&#xA;	&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;	&#xD;&#xA;```&#xD;&#xA;My code is a mess. Could you please give me some idea to implement them more efficiently?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42430" PostHistoryTypeId="24" PostId="10635" RevisionGUID="9be5afc5-2068-4960-a393-2a850468c880" CreationDate="2023-12-13T10:16:11.813" Comment="Proposed by 354 approved by 4794 edit id of 622" ContentLicense="CC BY-SA 4.0" />
  <row Id="42431" PostHistoryTypeId="2" PostId="10650" RevisionGUID="c6919556-1372-4035-8846-6f933836bb4a" CreationDate="2023-12-13T10:42:30.597" UserId="3437" Text="I need to establish a web socket connection through off chain worker. I asked here https://substrate.stackexchange.com/questions/10606/how-to-establish-web-socket-connection-in-offchain-worker but didn't get any response. &#xD;&#xA;&#xD;&#xA;Is there any way/example to establish web socket connection through off chain worker? There are many Rust examples but I can't use standard library.&#xD;&#xA;&#xD;&#xA;Can someone please help me?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42433" PostHistoryTypeId="1" PostId="10650" RevisionGUID="c6919556-1372-4035-8846-6f933836bb4a" CreationDate="2023-12-13T10:42:30.597" UserId="3437" Text="How to create web socket server through off chain worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42434" PostHistoryTypeId="3" PostId="10650" RevisionGUID="c6919556-1372-4035-8846-6f933836bb4a" CreationDate="2023-12-13T10:42:30.597" UserId="3437" Text="|substrate-node-template|offchain-worker|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42435" PostHistoryTypeId="33" PostId="10606" RevisionGUID="259fc194-1646-44e8-9e82-f0dddbae9cb9" CreationDate="2023-12-13T14:18:51.510" UserId="3437" Comment="38" />
  <row Id="42436" PostHistoryTypeId="2" PostId="10651" RevisionGUID="76eef23b-101b-4cc8-93c5-d644495811b0" CreationDate="2023-12-13T14:49:03.033" UserId="234" Text="You can check this [answer][1] to know the general steps/process of the deprecation of the `transfer` method. &#xD;&#xA;&#xD;&#xA;Since August (when the above answer was posted), the following updates have occured :&#xD;&#xA;- The mentioned [issue][2] was closed&#xD;&#xA;- The mentioned [PR][3] was merged&#xD;&#xA;- The above PR was included in the Polkadot release [v1.2.0][4]&#xD;&#xA;&#xD;&#xA;So the last step for you is to check when the proposals will be submitted (one proposal for Kusama and the corresponding proposal for Polkadot) to upgrade the runtimes to v1.2.0. As soon as the proposals are passed and enacted then you will see the changes in main net or as we call it the corresponding Relay chain (Kusama and Polkadot) also. &#xD;&#xA;&#xD;&#xA;Having said that and as mentioned in the answer from August, instead of trying to calculate and estimate the exact date of the&#xD;&#xA;`transfer` method deprecation, I would recommend to just replace already all the instances of `transfer` method in your code/product with the new `transfer_allow_death`. The same is recommended [here][5] :&#xD;&#xA;&#xD;&#xA;&gt; *The recommendation is to migrate to the new `force_set_balance` and&#xD;&#xA;&gt; `transfer_allow_death` ASAP*&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/9778/234&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/issues/148&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/pull/1226&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.2.0&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot-sdk/pull/1226#issuecomment-1709609875" ContentLicense="CC BY-SA 4.0" />
  <row Id="42438" PostHistoryTypeId="5" PostId="10645" RevisionGUID="4319bafc-49e6-4bb5-84f4-338db4166bca" CreationDate="2023-12-13T15:11:30.643" UserId="309" Comment="added 1575 characters in body" Text="I have a pallet that is using the pallet_collective to trigger votes for roles affectations requests. everything works fine in the polkadot.js interface, but testing is not going as expected.&#xD;&#xA;&#xD;&#xA;in the mock file, I have the following for `construct_runtime!`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test &#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Config&lt;T&gt;, Storage, Event&lt;T&gt;},&#xD;&#xA;		RolesModule: pallet_roles::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		Balances: pallet_balances::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},&#xD;&#xA;		Sudo:pallet_sudo::{Pallet, Call, Storage, Config&lt;T&gt;, Event&lt;T&gt;},&#xD;&#xA;		Collective: pallet_collective::&lt;Instance2&gt;::{Pallet, Call, Event&lt;T&gt;, Origin&lt;T&gt;, Config&lt;T&gt;},&#xD;&#xA;	}&#xD;&#xA;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The function that is supposed to start the referendum is the following:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub fn start_council_session(account: T::AccountId,account_type: Accounts) -&gt; DispatchResultWithPostInfo{&#xD;&#xA;	//Create proposal&#xD;&#xA;	let proposal0 = &#xD;&#xA;		Call::&lt;T&gt;::account_approval{&#xD;&#xA;			account: account.clone()&#xD;&#xA;		};&#xD;&#xA;	let proposal = Self::get_formatted_call(proposal0.into()).unwrap();&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;					&#xD;&#xA;	let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;	&#xD;&#xA;	let council_member = Coll::Pallet::&lt;T,Instance2&gt;::members()[0].clone();&#xD;&#xA;	let council_origin= Self::get_origin(council_member);&#xD;&#xA;&#xD;&#xA;	//Start Collective refererendum&#xD;&#xA;	Coll::Pallet::&lt;T,Instance2&gt;::propose(&#xD;&#xA;		council_origin,&#xD;&#xA;		2,&#xD;&#xA;		Box::new(proposal.clone()),&#xD;&#xA;		proposal_len,&#xD;&#xA;	).ok();&#xD;&#xA;	let mut index:u32 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_count();&#xD;&#xA;	index = index.saturating_sub(1);&#xD;&#xA;&#xD;&#xA;	//Update proposal index and hash&#xD;&#xA;	let proposal_hashes =  Coll::Pallet::&lt;T,Instance2&gt;::proposals().into_iter();&#xD;&#xA;	for proposal_hash in proposal_hashes{&#xD;&#xA;		let prop0 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_of(proposal_hash.clone()).unwrap();&#xD;&#xA;		if proposal == prop0{&#xD;&#xA;			let mut proposal_all = Proposal::&lt;T&gt;::new(account.clone(), Some(account_type),proposal_hash.clone());&#xD;&#xA;			proposal_all.proposal_index = index;&#xD;&#xA;			proposal_all.proposal_hash = proposal_hash;&#xD;&#xA;			RequestedRoles::&lt;T&gt;::insert(&amp;account, proposal_all);&#xD;&#xA;		}&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;	Ok(().into())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Calling the extrinsic that is using this function does not generate any error, but If I try the following `assert_eq!(Collective::proposal_count(),1);` or the following: `assert_eq!(Collective::proposals().len(),1);` both tests fail saying that I still have 0 proposal. why would an extrinsic would work &quot;manually&quot; but not in the tests? &#xD;&#xA;&#xD;&#xA;**Edit 1**&#xD;&#xA;&#xD;&#xA;Adding the rest of the test to show where it's failing=&gt; the exact same workflow executed in Polkadot.js works perfectly. the `start_council_session` function  mentionned above is within the `set_roles` extrinsic, and should be triggered for the `SELLER` role. unfortunately things don't go as expected...:&#xD;&#xA;&#xD;&#xA;    #[test]&#xD;&#xA;    fn setting_roles(){&#xD;&#xA;	new_test_ext().execute_with(||{&#xD;&#xA;		assert_eq!(RolesModule::get_pending_servicers().len(), 0);&#xD;&#xA;		assert_eq!(RolesModule::get_pending_house_sellers().len(), 0);&#xD;&#xA;		assert_eq!(RolesModule::get_pending_notaries().len(), 0);&#xD;&#xA;		let council = Collective::members();&#xD;&#xA;		assert_eq!(council.len(),3);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		//Investor &amp; Tenant roles&#xD;&#xA;		assert_ok!(RolesModule::set_role(RuntimeOrigin::signed(DAVE), DAVE, Acc::INVESTOR));&#xD;&#xA;		assert_ok!(RolesModule::set_role(RuntimeOrigin::signed(EVE), EVE, Acc::TENANT));&#xD;&#xA;		assert!(InvestorLog::&lt;Test&gt;::contains_key(DAVE));&#xD;&#xA;		assert!(TenantLog::&lt;Test&gt;::contains_key(EVE));&#xD;&#xA;&#xD;&#xA;		//Seller,Servicer, and Notary roles&#xD;&#xA;		assert_ok!(RolesModule::set_role(RuntimeOrigin::signed(BOB),BOB,Acc::SELLER));&#xD;&#xA;		assert_eq!(RolesModule::get_pending_house_sellers().len(),1);&#xD;&#xA;		let account =RolesModule::get_pending_house_sellers()[0].account_id.clone();&#xD;&#xA;		assert_eq!(account,BOB);&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		//Check that collective referendum started --&gt; test failing at the first assertion below&#xD;&#xA;		assert_eq!(Collective::proposal_count(),1); &#xD;&#xA;		assert_eq!(Collective::proposals().len(),1);&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;		assert_ok!(RolesModule::council_vote(RuntimeOrigin::signed(council[0].clone()),BOB,true));				&#xD;&#xA;	})&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42439" PostHistoryTypeId="2" PostId="10652" RevisionGUID="4f5c754c-1199-4c8e-a584-e4ba20216747" CreationDate="2023-12-13T15:59:02.673" UserId="5009" Text="I am trying to call the set_base_uri function and the mint_next function of the ink nft smart contract. When calling from polkadot ui it is working correctly but when I call it in nextjs it gives a dispatch error&#xD;&#xA;&#xD;&#xA;Here is how I am calling it:&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;```&#xD;&#xA;      const handleMint = async () =&gt; {&#xD;&#xA;            setIsLoading(true);&#xD;&#xA;    &#xD;&#xA;            const getGasMaxLimit = () =&gt; {&#xD;&#xA;                return api.registry.createType(&#xD;&#xA;                    &quot;WeightV2&quot;,&#xD;&#xA;                    api.consts.system.blockWeights[&quot;maxBlock&quot;]&#xD;&#xA;                );&#xD;&#xA;            };&#xD;&#xA;    &#xD;&#xA;            console.log(&quot;gas limit max&quot;, getGasMaxLimit().toHuman());&#xD;&#xA;    &#xD;&#xA;            try {&#xD;&#xA;                const res = await contract.query[&quot;payableMint::mintNext&quot;](&#xD;&#xA;                    state.data.defaultAccount.address,&#xD;&#xA;                    {&#xD;&#xA;                        storageDepositLimit: null,&#xD;&#xA;                        gasLimit: getGasMaxLimit(),&#xD;&#xA;                    }&#xD;&#xA;                );&#xD;&#xA;    &#xD;&#xA;                const { output, result, gasRequired, storageDeposit } = res;&#xD;&#xA;                console.log(&quot;mintNext query result&quot;, result.toString());&#xD;&#xA;                console.log(&quot;mint gasRequired&quot;, gasRequired.toString());&#xD;&#xA;                console.log(&quot;storageDeposit&quot;, storageDeposit.toString());&#xD;&#xA;    &#xD;&#xA;        &#xD;&#xA;                const mintResult = await contract.tx[&quot;payableMint::mintNext&quot;]({&#xD;&#xA;                    storageDepositLimit: null,&#xD;&#xA;                    gasLimit: api.registry.createType(&quot;WeightV2&quot;, gasRequired),&#xD;&#xA;                }).signAndSend(&#xD;&#xA;                    state.data.defaultAccount.address,&#xD;&#xA;                    { signer: injector.signer },&#xD;&#xA;                    (result) =&gt; {&#xD;&#xA;                        if (result.dispatchError) {&#xD;&#xA;                            let dispatchError = result.dispatchError;&#xD;&#xA;                            if (dispatchError.isModule) {&#xD;&#xA;                                // for module errors, we have the section indexed, lookup&#xD;&#xA;                                const decoded = api.registry.findMetaError(&#xD;&#xA;                                    dispatchError.asModule&#xD;&#xA;                                );&#xD;&#xA;                                const { docs, name, section } = decoded;&#xD;&#xA;                                console.log(&#xD;&#xA;                                    `Transaction Failed\n  ${section}.${name}: ${docs.join(&#xD;&#xA;                                        &quot; &quot;&#xD;&#xA;                                    )}`&#xD;&#xA;                                );&#xD;&#xA;                            } else {&#xD;&#xA;                                console&#xD;&#xA;                                    .log(&#xD;&#xA;                                        `Transaction Failed\n  ${dispatchError.toString()}`&#xD;&#xA;                                    )&#xD;&#xA;                                    .then(() =&gt; {&#xD;&#xA;                                        window.location.reload();&#xD;&#xA;                                    });&#xD;&#xA;                            }&#xD;&#xA;                        } else if (result.isInBlock) {&#xD;&#xA;                            console.log(&quot;Transaction successful&quot;);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                );&#xD;&#xA;    &#xD;&#xA;                setIsMinted(true);&#xD;&#xA;                dispatch(setMinted(true));&#xD;&#xA;            } catch (error) {&#xD;&#xA;                console.log(JSON.stringify(error));&#xD;&#xA;            }&#xD;&#xA;        };```&#xD;&#xA;    &#xD;&#xA;Here Is the error&#xD;&#xA;&#xD;&#xA;Transaction Failed&#xD;&#xA;  contracts.ContractReverted: The contract ran to completion but decided to revert its storage changes. Please note that this error is only returned from extrinsics. When called directly or via RPC an `Ok` will be returned. In this case the caller needs to inspect the flags to determine whether a reversion has taken place." ContentLicense="CC BY-SA 4.0" />
  <row Id="42441" PostHistoryTypeId="1" PostId="10652" RevisionGUID="4f5c754c-1199-4c8e-a584-e4ba20216747" CreationDate="2023-12-13T15:59:02.673" UserId="5009" Text="contracts.ContractReverted: The contract ran to completion but decided to revert its storage changes. Ink nft smart contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="42442" PostHistoryTypeId="3" PostId="10652" RevisionGUID="4f5c754c-1199-4c8e-a584-e4ba20216747" CreationDate="2023-12-13T15:59:02.673" UserId="5009" Text="|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42443" PostHistoryTypeId="6" PostId="10652" RevisionGUID="89d0f040-7e00-446f-9f82-b98d317dc06e" CreationDate="2023-12-13T16:00:19.500" UserId="5009" Comment="edt tags" Text="|polkadot|ink|smart-contract|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42444" PostHistoryTypeId="2" PostId="10653" RevisionGUID="42382231-4b87-4db5-92d1-d06edaf7ddb1" CreationDate="2023-12-13T18:38:42.517" UserId="3598" Text="I've just performed a runtime upgrade for a parachain running on rococo, and although the runtime upgrade succeeded in the end, the log seems to show that it the upgrade was run 3 times, and the first 2 failed with the following errors: &#xD;&#xA;```&#xD;&#xA;023-12-13 17:36:59 [Parachain] panicked at 'No new validation function found in storage, GoAhead signal is not expected', /home/sebastian/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/7c9fd83/cumulus/pallets/parachain-system/src/lib.rs:595:21&#xD;&#xA;2023-12-13 17:36:59 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;2023-12-13 17:36:59 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;2023-12-13 17:36:59 [Parachain] ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x4f3bd7 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0xc0d5 - &lt;unknown&gt;!core::panicking::panic_fmt::ha38e6eecb0b0460a&#xD;&#xA;    2: 0x31417f - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::hc0ffff6346f7201f&#xD;&#xA;    3: 0x41f4cd - &lt;unknown&gt;!&lt;cumulus_pallet_parachain_system::pallet::Call&lt;T&gt; as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::{{closure}}::ha89f2c29bdc1e730&#xD;&#xA;    4: 0x429ffd - &lt;unknown&gt;!environmental::local_key::LocalKey&lt;T&gt;::with::hc67cc26f8df15aab&#xD;&#xA;    5: 0x432ee - &lt;unknown&gt;!&lt;hashed_parachain_runtime::RuntimeCall as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::h7e7255660c638f09&#xD;&#xA;    6: 0x4156b - &lt;unknown&gt;!&lt;hashed_parachain_runtime::RuntimeCall as sp_runtime::traits::Dispatchable&gt;::dispatch::hd4c057d0e587ce77&#xD;&#xA;    7: 0x38ff71 - &lt;unknown&gt;!&lt;sp_runtime::generic::checked_extrinsic::CheckedExtrinsic&lt;AccountId,Call,Extra&gt; as sp_runtime::traits::Applyable&gt;::apply::hf257bbc56e628d94&#xD;&#xA;    8: 0x350a04 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::apply_extrinsic::he7d68a5fbe0504a2&#xD;&#xA;    9: 0x3f2c7f - &lt;unknown&gt;!BlockBuilder_apply_extrinsic. Dropping.&#xD;&#xA;2023-12-13 17:36:59 [Parachain] panicked at 'set_validation_data inherent needs to be present in every block!', /home/sebastian/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/7c9fd83/cumulus/pallets/parachain-system/src/lib.rs:268:18&#xD;&#xA;2023-12-13 17:36:59 [Parachain] ✨ Imported #171167 (0x7577…b8ae)&#xD;&#xA;```&#xD;&#xA;Does anyone know what could be the cause? Is this normal?&#xD;&#xA;&#xD;&#xA;When running the upgrade locally, I never saw these errors.&#xD;&#xA;&#xD;&#xA;Also, I'm not sure if it is related, but the parachain was showing (and is still showing after the upgrade) the following issue before performing the upgrade: &#xD;&#xA;https://substrate.stackexchange.com/questions/10613/started-getting-aura-pallet-slot-must-increase-error-on-running-collator&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42446" PostHistoryTypeId="1" PostId="10653" RevisionGUID="42382231-4b87-4db5-92d1-d06edaf7ddb1" CreationDate="2023-12-13T18:38:42.517" UserId="3598" Text="Errors shown during runtime time uprgrade, are they normal?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42447" PostHistoryTypeId="3" PostId="10653" RevisionGUID="42382231-4b87-4db5-92d1-d06edaf7ddb1" CreationDate="2023-12-13T18:38:42.517" UserId="3598" Text="|runtime-upgrade|rococo|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42448" PostHistoryTypeId="5" PostId="10653" RevisionGUID="fbb0e99f-4823-4fae-806c-0a063dcd4736" CreationDate="2023-12-13T18:45:48.053" UserId="3598" Comment="added 148 characters in body" Text="I've just performed a runtime upgrade for a parachain running on rococo, and although the runtime upgrade succeeded in the end, the log seems to show that it the upgrade was run 3 times, and the first 2 failed with the following errors: &#xD;&#xA;```&#xD;&#xA;023-12-13 17:36:59 [Parachain] panicked at 'No new validation function found in storage, GoAhead signal is not expected', /home/sebastian/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/7c9fd83/cumulus/pallets/parachain-system/src/lib.rs:595:21&#xD;&#xA;2023-12-13 17:36:59 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;2023-12-13 17:36:59 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;2023-12-13 17:36:59 [Parachain] ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x4f3bd7 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0xc0d5 - &lt;unknown&gt;!core::panicking::panic_fmt::ha38e6eecb0b0460a&#xD;&#xA;    2: 0x31417f - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::hc0ffff6346f7201f&#xD;&#xA;    3: 0x41f4cd - &lt;unknown&gt;!&lt;cumulus_pallet_parachain_system::pallet::Call&lt;T&gt; as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::{{closure}}::ha89f2c29bdc1e730&#xD;&#xA;    4: 0x429ffd - &lt;unknown&gt;!environmental::local_key::LocalKey&lt;T&gt;::with::hc67cc26f8df15aab&#xD;&#xA;    5: 0x432ee - &lt;unknown&gt;!&lt;hashed_parachain_runtime::RuntimeCall as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::h7e7255660c638f09&#xD;&#xA;    6: 0x4156b - &lt;unknown&gt;!&lt;hashed_parachain_runtime::RuntimeCall as sp_runtime::traits::Dispatchable&gt;::dispatch::hd4c057d0e587ce77&#xD;&#xA;    7: 0x38ff71 - &lt;unknown&gt;!&lt;sp_runtime::generic::checked_extrinsic::CheckedExtrinsic&lt;AccountId,Call,Extra&gt; as sp_runtime::traits::Applyable&gt;::apply::hf257bbc56e628d94&#xD;&#xA;    8: 0x350a04 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::apply_extrinsic::he7d68a5fbe0504a2&#xD;&#xA;    9: 0x3f2c7f - &lt;unknown&gt;!BlockBuilder_apply_extrinsic. Dropping.&#xD;&#xA;2023-12-13 17:36:59 [Parachain] panicked at 'set_validation_data inherent needs to be present in every block!', /home/sebastian/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/7c9fd83/cumulus/pallets/parachain-system/src/lib.rs:268:18&#xD;&#xA;2023-12-13 17:36:59 [Parachain] ✨ Imported #171167 (0x7577…b8ae)&#xD;&#xA;```&#xD;&#xA;Does anyone know what could be the cause? Is this normal? The upgraded parachain is producing blocks.&#xD;&#xA;&#xD;&#xA;When running the upgrade locally, I never saw these errors.&#xD;&#xA;&#xD;&#xA;Also, I'm not sure if it is related, but the parachain was showing (and is still showing after the upgrade) the following issue before performing the upgrade: &#xD;&#xA;https://substrate.stackexchange.com/questions/10613/started-getting-aura-pallet-slot-must-increase-error-on-running-collator&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Finally, after the runtime upgrade, every so often the collator is showing the following error:&#xD;&#xA;```&#xD;&#xA;2023-12-13 18:41:12 [Parachain]  Starting consensus session on top of parent 0x745f7b952b07895fc5cab314eadebe0f6d468853a0d3c725bfe4e204be7db3e3    &#xD;&#xA;2023-12-13 18:41:12 [Parachain] panicked at 'no space left for the block in the unincluded segment', /home/sebastian/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/7c9fd83/cumulus/pallets/parachain-system/src/lib.rs:1350:9    &#xD;&#xA;2023-12-13 18:41:12 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-12-13 18:41:12 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2023-12-13 18:41:12 [Parachain] ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x4f3bd7 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0xc0d5 - &lt;unknown&gt;!core::panicking::panic_fmt::ha38e6eecb0b0460a&#xD;&#xA;    2: 0x143df9 - &lt;unknown&gt;!cumulus_pallet_parachain_system::&lt;impl cumulus_pallet_parachain_system::pallet::Pallet&lt;T&gt;&gt;::maybe_drop_included_ancestors::h2286e2e150ceb572&#xD;&#xA;    3: 0x31395b - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::hc0ffff6346f7201f&#xD;&#xA;    4: 0x41f4cd - &lt;unknown&gt;!&lt;cumulus_pallet_parachain_system::pallet::Call&lt;T&gt; as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::{{closure}}::ha89f2c29bdc1e730&#xD;&#xA;    5: 0x429ffd - &lt;unknown&gt;!environmental::local_key::LocalKey&lt;T&gt;::with::hc67cc26f8df15aab&#xD;&#xA;    6: 0x432ee - &lt;unknown&gt;!&lt;hashed_parachain_runtime::RuntimeCall as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::h7e7255660c638f09&#xD;&#xA;    7: 0x4156b - &lt;unknown&gt;!&lt;hashed_parachain_runtime::RuntimeCall as sp_runtime::traits::Dispatchable&gt;::dispatch::hd4c057d0e587ce77&#xD;&#xA;    8: 0x38ff71 - &lt;unknown&gt;!&lt;sp_runtime::generic::checked_extrinsic::CheckedExtrinsic&lt;AccountId,Call,Extra&gt; as sp_runtime::traits::Applyable&gt;::apply::hf257bbc56e628d94&#xD;&#xA;    9: 0x350a04 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::apply_extrinsic::he7d68a5fbe0504a2&#xD;&#xA;   10: 0x3f2c7f - &lt;unknown&gt;!BlockBuilder_apply_extrinsic. Dropping.    &#xD;&#xA;2023-12-13 18:41:12 [Parachain] panicked at 'set_validation_data inherent needs to be present in every block!', /home/sebastian/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/7c9fd83/cumulus/pallets/parachain-system/src/lib.rs:268:18    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does anyone know what could be causing it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42449" PostHistoryTypeId="2" PostId="10654" RevisionGUID="674c1708-e9f0-43ef-9264-df110926dae5" CreationDate="2023-12-14T07:22:08.820" UserId="2844" Text="I want to locked token, how can we do this?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/N2WCv.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42451" PostHistoryTypeId="1" PostId="10654" RevisionGUID="674c1708-e9f0-43ef-9264-df110926dae5" CreationDate="2023-12-14T07:22:08.820" UserId="2844" Text="How to locked token in chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42452" PostHistoryTypeId="3" PostId="10654" RevisionGUID="674c1708-e9f0-43ef-9264-df110926dae5" CreationDate="2023-12-14T07:22:08.820" UserId="2844" Text="|parachain|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42453" PostHistoryTypeId="2" PostId="10655" RevisionGUID="565ade95-37fd-41c1-8fed-37d3d7b4055d" CreationDate="2023-12-14T08:44:24.540" UserId="357" Text="Im quite a newbie in the new polkadot-sdk, can sm1 guide me how can I build a fast-runtime kusama polkadot image?&#xD;&#xA;When I try to run a polkadot build with fast-runtime with kusama-local spec it tells:&#xD;&#xA;```&#xD;&#xA;1'   0: \x1B[91mInvalid input: `kusama-local` is not supported anymore as the kusama native runtime no longer part of the node.\x1B[0m\n' +&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to reproduce: &#xD;&#xA;&#xD;&#xA; 1. Checkout latest&amp;greatest polkadot-sdk repo&#xD;&#xA; 2. Create a dockerfile in :polkadot-sdk/docker/dockerfiles/polkadot/polkadot_builder.Dockerfile&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;# This is the build stage for Polkadot. Here we create the binary in a temporary image.&#xD;&#xA;FROM docker.io/paritytech/ci-linux:production as builder&#xD;&#xA;&#xD;&#xA;WORKDIR /polkadot&#xD;&#xA;COPY . /polkadot&#xD;&#xA;&#xD;&#xA;RUN cargo build --locked --release --features=fast-runtime&#xD;&#xA;&#xD;&#xA;# This is the 2nd stage: a very small image where we copy the Polkadot binary.&quot;&#xD;&#xA;FROM docker.io/parity/base-bin:latest&#xD;&#xA;&#xD;&#xA;LABEL description=&quot;Multistage Docker image for Polkadot: a platform for web3&quot; \&#xD;&#xA;	io.parity.image.type=&quot;builder&quot; \&#xD;&#xA;	io.parity.image.authors=&quot;chevdor@gmail.com, devops-team@parity.io&quot; \&#xD;&#xA;	io.parity.image.vendor=&quot;Parity Technologies&quot; \&#xD;&#xA;	io.parity.image.description=&quot;Polkadot: a platform for web3&quot; \&#xD;&#xA;	io.parity.image.source=&quot;https://github.com/paritytech/polkadot-sdk/blob/${VCS_REF}/docker/dockerfiles/polkadot/polkadot_builder.Dockerfile&quot; \&#xD;&#xA;	io.parity.image.documentation=&quot;https://github.com/paritytech/polkadot-sdk/&quot;&#xD;&#xA;&#xD;&#xA;COPY --from=builder /polkadot/target/release/polkadot /usr/local/bin&#xD;&#xA;&#xD;&#xA;RUN /usr/local/bin/polkadot --version&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;EXPOSE 30333 9933 9944 9615&#xD;&#xA;VOLUME [&quot;/data&quot;]&#xD;&#xA;&#xD;&#xA;ENTRYPOINT [&quot;/usr/local/bin/polkadot&quot;]&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; 1. Build it, &#xD;&#xA;```&#xD;&#xA;docker build . -f=./docker/dockerfiles/polkadot/polkadot_builder.Dockerfile&#xD;&#xA;```&#xD;&#xA; 3. Reference such image in a parachain-launch config file:&#xD;&#xA;```&#xD;&#xA;relaychain:&#xD;&#xA;  image: &lt;newDockerImage&gt;&#xD;&#xA;  chain: kusama-local&#xD;&#xA;  runtimeGenesisConfig:&#xD;&#xA;    configuration:&#xD;&#xA;      config:&#xD;&#xA;        validation_upgrade_cooldown: 10&#xD;&#xA;        validation_upgrade_delay: 10&#xD;&#xA;  env:&#xD;&#xA;    RUST_LOG: parachain::candidate-backing=trace,parachain::candidate-selection=trace,parachain::pvf=trace,parachain::collator-protocol=trace,parachain::provisioner=trace&#xD;&#xA;  flags:&#xD;&#xA;    - --rpc-methods=unsafe&#xD;&#xA;    - --wasm-execution=compiled&#xD;&#xA;    - --execution=wasm&#xD;&#xA;  nodes:&#xD;&#xA;    - name: alice&#xD;&#xA;    - name: bob&#xD;&#xA;&#xD;&#xA;parachains:&#xD;&#xA;- image: mangatasolutions/mangata-node:develop-fast&#xD;&#xA;  chain:&#xD;&#xA;    base: mangata-kusama-local&#xD;&#xA;    collators:&#xD;&#xA;      - alice&#xD;&#xA;      - bob&#xD;&#xA;    sudo: alice&#xD;&#xA;    skipCollatorSelection: true&#xD;&#xA;    skipBalances: true&#xD;&#xA;  id: 2110&#xD;&#xA;  parachain: true&#xD;&#xA;  flags:&#xD;&#xA;    - --rpc-methods=unsafe&#xD;&#xA;    - --force-authoring&#xD;&#xA;    - --wasm-execution=compiled&#xD;&#xA;    - --execution=wasm&#xD;&#xA;  relaychainFlags:&#xD;&#xA;    - --wasm-execution=compiled&#xD;&#xA;    - --execution=wasm&#xD;&#xA;  env:&#xD;&#xA;    # RUST_LOG: info,block_builder=trace,block_shuffler=trace,runtime::ver=trace,txpool=trace,rpc::nonce=trace&#xD;&#xA;    RUST_LOG: info,block_builder=trace&#xD;&#xA;  volumePath: /mangata/data&#xD;&#xA;  nodes:&#xD;&#xA;  - flags:&#xD;&#xA;    - --alice&#xD;&#xA;  - flags:&#xD;&#xA;    - --bob&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42455" PostHistoryTypeId="1" PostId="10655" RevisionGUID="565ade95-37fd-41c1-8fed-37d3d7b4055d" CreationDate="2023-12-14T08:44:24.540" UserId="357" Text="Build fast-runtime for kusama on PolkadotSDK" ContentLicense="CC BY-SA 4.0" />
  <row Id="42456" PostHistoryTypeId="3" PostId="10655" RevisionGUID="565ade95-37fd-41c1-8fed-37d3d7b4055d" CreationDate="2023-12-14T08:44:24.540" UserId="357" Text="|kusama|testing|build|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42457" PostHistoryTypeId="2" PostId="10656" RevisionGUID="5adc380f-5af7-4508-bb80-03260a270a91" CreationDate="2023-12-14T09:01:28.320" UserId="4431" Text="This is Polkadot Punks #2 : https://kodadot.xyz/ahp/gallery/7-2&#xD;&#xA;&#xD;&#xA;Accidentally i set Nft config of this nft to 6&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  settings: 6&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;which in result dosen't allow me to setMetdata on it&#xD;&#xA;how can i change nft config of this nft&#xD;&#xA;&#xD;&#xA;[![Screenshot of item setting derived from chainState][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/T106k.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42459" PostHistoryTypeId="1" PostId="10656" RevisionGUID="5adc380f-5af7-4508-bb80-03260a270a91" CreationDate="2023-12-14T09:01:28.320" UserId="4431" Text="Couldn't setMetdata on nft using Asset Hub" ContentLicense="CC BY-SA 4.0" />
  <row Id="42460" PostHistoryTypeId="3" PostId="10656" RevisionGUID="5adc380f-5af7-4508-bb80-03260a270a91" CreationDate="2023-12-14T09:01:28.320" UserId="4431" Text="|polkadot|nft|statemint|debug|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42461" PostHistoryTypeId="50" PostId="7708" RevisionGUID="161bf5c1-c018-467c-a6ee-9c4dfdc4ffce" CreationDate="2023-12-14T10:03:00.393" UserId="-1" />
  <row Id="42462" PostHistoryTypeId="2" PostId="10657" RevisionGUID="4811fb78-6e9f-44f1-a698-e35dc326715a" CreationDate="2023-12-14T16:58:47.240" UserId="251" Text="The most common way:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;// pallet_x/src/lib.rs&#xD;&#xA;pub trait Config {&#xD;&#xA;  Currency: frame_support::traits::LockableCurrency;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;fn lock&lt;T: Config&gt;() {&#xD;&#xA;  T::Currency::set_lock(..);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And if you make the `lock` as an extrinsic. Then user could call this call to lock their token. (Just an example, you can make more complex logic base on this)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42464" PostHistoryTypeId="2" PostId="10658" RevisionGUID="4e8c35d9-216e-4afe-a91c-ce85fb70bb24" CreationDate="2023-12-14T18:19:03.603" UserId="372" Text="The compile time problems with Substrate are well known. But recently I hit a new issue: Building a simple parachain node and its test harness takes more than 14GB.&#xD;&#xA;&#xD;&#xA;While 14GB may seem like an arbitrary bar to set, this is a real practical threshold, because it is the space available to github action free runners. These runners are the defacto standard for almost every exploration project when a new dev explores the ecosystem.&#xD;&#xA;&#xD;&#xA;This needs a serious fix. I try to make improvements to Substrate's dependency graph ((example)[https://github.com/paritytech/polkadot-sdk/pull/1897]), and also provided workarounds when necessary ((example)[https://github.com/paritytech/polkadot-sdk/pull/2553]). And I hope that the community will all do their part as well.&#xD;&#xA;&#xD;&#xA;But in the meantime, **what practical workarounds are there?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="42466" PostHistoryTypeId="1" PostId="10658" RevisionGUID="4e8c35d9-216e-4afe-a91c-ce85fb70bb24" CreationDate="2023-12-14T18:19:03.603" UserId="372" Text="Building a parachain node exceeds the 14GB disk limit on github actions free tier" ContentLicense="CC BY-SA 4.0" />
  <row Id="42467" PostHistoryTypeId="3" PostId="10658" RevisionGUID="4e8c35d9-216e-4afe-a91c-ce85fb70bb24" CreationDate="2023-12-14T18:19:03.603" UserId="372" Text="|build|cicd|slow|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42471" PostHistoryTypeId="2" PostId="10660" RevisionGUID="62e4f3a3-051f-40ee-91ff-ae10b71a0c3c" CreationDate="2023-12-14T18:25:33.343" UserId="4733" Text="Building with the `--release` flag is enough to make it work. It takes more time, and more carbon footprint though." ContentLicense="CC BY-SA 4.0" />
  <row Id="42473" PostHistoryTypeId="50" PostId="9274" RevisionGUID="b18e6ac9-bbf5-43de-98ec-5132bf543970" CreationDate="2023-12-14T21:05:45.660" UserId="-1" />
  <row Id="42474" PostHistoryTypeId="2" PostId="10661" RevisionGUID="b73921ef-1fa0-45c3-8b01-fe7612bdbfa2" CreationDate="2023-12-14T21:32:49.310" UserId="372" Text="I have a Substrate node that I build locally and also into a docker container in CI.&#xD;&#xA;&#xD;&#xA;When I use my local build or when I use `docker run --network host`, I can connect to the websocket endpoint on port 9944 just fine.&#xD;&#xA;&#xD;&#xA;However, when I use `docker run -p 9944:9944`, I am not able to connect to the websocket endpoint.&#xD;&#xA;&#xD;&#xA;This sounds very similar to what is described in https://stackoverflow.com/questions/54101508/how-do-you-dockerize-a-websocket-server&#xD;&#xA;&#xD;&#xA;So my question is whether the node's websocket address is listening on 0.0.0.0 or something else, and how can I tell?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42476" PostHistoryTypeId="1" PostId="10661" RevisionGUID="b73921ef-1fa0-45c3-8b01-fe7612bdbfa2" CreationDate="2023-12-14T21:32:49.310" UserId="372" Text="How to connect to a ws port whe nthe node is in a docker container" ContentLicense="CC BY-SA 4.0" />
  <row Id="42477" PostHistoryTypeId="3" PostId="10661" RevisionGUID="b73921ef-1fa0-45c3-8b01-fe7612bdbfa2" CreationDate="2023-12-14T21:32:49.310" UserId="372" Text="|rpc|docker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42478" PostHistoryTypeId="2" PostId="10662" RevisionGUID="c3bb3e56-725c-4bfa-9e2d-040f66564456" CreationDate="2023-12-14T22:50:16.050" UserId="14" Text="You can try adding `--rpc-external` to be able to use `0.0.0.0`." ContentLicense="CC BY-SA 4.0" />
  <row Id="42480" PostHistoryTypeId="50" PostId="9219" RevisionGUID="a9fff113-da04-4014-93e9-f72e2b0d60c3" CreationDate="2023-12-14T23:00:40.060" UserId="-1" />
  <row Id="42481" PostHistoryTypeId="50" PostId="10161" RevisionGUID="040cc0eb-36de-4998-b37b-db08a7e88f68" CreationDate="2023-12-15T00:07:01.040" UserId="-1" />
  <row Id="42482" PostHistoryTypeId="50" PostId="5410" RevisionGUID="c7042019-80d0-4938-81c0-2844e9b58269" CreationDate="2023-12-15T01:03:35.370" UserId="-1" />
  <row Id="42483" PostHistoryTypeId="50" PostId="7074" RevisionGUID="69710f64-f0dc-4740-998e-13477fd2c66a" CreationDate="2023-12-15T02:04:35.563" UserId="-1" />
  <row Id="42484" PostHistoryTypeId="5" PostId="3923" RevisionGUID="64374ae6-205e-4d00-a93a-3664d071779d" CreationDate="2023-12-15T03:03:51.787" UserId="116" Comment="Spelling dont -&gt; don't" Text="The problem is that a pallet does not import the surrounding imports.  &#xD;&#xA;The fix is to add a `use super::*;` to your pallet like this:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use super::*;  // Here&#xD;&#xA;	#[allow(unused_imports)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also I don't see the maintain template in [your executed command](https://github.com/lucgerrits/pallet-error-for-stackexchange/blob/d7bc0a0080a926364880630ce26d2235b96893a6/pallets/sim_renault/src/weights.rs#L20). Therefore the next error is about the `()` type not implementing your `WeightInfo` trait. The maintainer template does that [here](https://github.com/paritytech/substrate/blob/618f26bc9fe1a5ae8ee0a485e4e24da3e5979af6/.maintain/frame-weight-template.hbs#L89) for you.  &#xD;&#xA;Or you use `pallet_sim_renault::weights::SubstrateWeight&lt;Test&gt;` instead of `()`." ContentLicense="CC BY-SA 4.0" />
  <row Id="42485" PostHistoryTypeId="5" PostId="3922" RevisionGUID="dafbcc58-7ec0-43f0-8ed0-3b5065d5f225" CreationDate="2023-12-15T03:04:55.747" UserId="116" Comment="code in code blocks" Text="I've got the error: &#xD;&#xA;&gt; cannot find trait `WeightInfo` in this scope&#xD;&#xA;&#xD;&#xA;I've added this in runtime:&#xD;&#xA;&#xD;&#xA;    impl my_pallet::Config for Runtime {&#xD;&#xA;    	type Event = Event;&#xD;&#xA;    	type WeightInfo = my_pallet::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;And this in my lib.rs pallet:&#xD;&#xA;&#xD;&#xA;    pub mod weights;&#xD;&#xA;    pub use weights::WeightInfo;&#xD;&#xA;&#xD;&#xA;with this also in config:&#xD;&#xA;    &#xD;&#xA;    type WeightInfo: WeightInfo;&#xD;&#xA;&#xD;&#xA;And of course I've generated a weights.rs file using the benchmark tool which looks correct comparing to the examples and other pallets.&#xD;&#xA;&#xD;&#xA;Why can't the compiler find the trait for `WeightInfo`?&#xD;&#xA;&#xD;&#xA;*Edit: I forgot to paste the exact output:*&#xD;&#xA;&#xD;&#xA;    error[E0405]: cannot find trait `WeightInfo` in this scope&#xD;&#xA;      --&gt; pallets/my_pallet/src/lib.rs:33:20&#xD;&#xA;       |&#xD;&#xA;    33 |         type WeightInfo: WeightInfo;&#xD;&#xA;       |                          ^^^^^^^^^^&#xD;&#xA;       |&#xD;&#xA;    help: you might have meant to use the associated type&#xD;&#xA;       |&#xD;&#xA;    33 |         type WeightInfo: Self::WeightInfo;&#xD;&#xA;       |                          ~~~~~~~~~~~~~~~~&#xD;&#xA;    help: consider importing one of these items&#xD;&#xA;       |&#xD;&#xA;    23 |     use crate::WeightInfo;&#xD;&#xA;       |&#xD;&#xA;    23 |     use frame_system::WeightInfo;&#xD;&#xA;       |&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42486" PostHistoryTypeId="4" PostId="3922" RevisionGUID="dafbcc58-7ec0-43f0-8ed0-3b5065d5f225" CreationDate="2023-12-15T03:04:55.747" UserId="116" Comment="code in code blocks" Text="Can't find trait WeightInfo in this scope" ContentLicense="CC BY-SA 4.0" />
  <row Id="42487" PostHistoryTypeId="5" PostId="10631" RevisionGUID="e285aa5d-9a17-4c93-a4a7-4293d88542ff" CreationDate="2023-12-15T05:58:21.597" UserId="2163" Comment="The original issue was a simple mistake of using the old version of zombienet." Text="I am running a local zombienent network with zombienet version `1.3.86` &#xD;&#xA;&#xD;&#xA;The `config.toml` file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[settings]&#xD;&#xA;timeout = 1000&#xD;&#xA;&#xD;&#xA;[relaychain]&#xD;&#xA;chain = &quot;westend-local&quot;&#xD;&#xA;default_command = &quot;./polkadot&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  ws_port = 9900&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 2000&#xD;&#xA;cumulus_based = true&#xD;&#xA;chain = &quot;asset-hub-westend-local&quot;&#xD;&#xA;&#xD;&#xA;  [[parachains.collators]]&#xD;&#xA;  name = &quot;charlie&quot;&#xD;&#xA;  validator = true&#xD;&#xA;  command = &quot;./bin/polkadot-parachain&quot;&#xD;&#xA;  ws_port = 9910&#xD;&#xA;  args = [&quot;--force-authoring&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The relay chain is producing blocks, however, the parachain doesn't.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1oTCB.png&#xD;&#xA;&#xD;&#xA;There seem to be no errors by looking at the zombienet log files." ContentLicense="CC BY-SA 4.0" />
  <row Id="42488" PostHistoryTypeId="4" PostId="10631" RevisionGUID="e285aa5d-9a17-4c93-a4a7-4293d88542ff" CreationDate="2023-12-15T05:58:21.597" UserId="2163" Comment="The original issue was a simple mistake of using the old version of zombienet." Text="Parachains not producing blocks with polkadot release-v1.4.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="42489" PostHistoryTypeId="2" PostId="10663" RevisionGUID="e27a4073-3b38-402d-9353-9aa731404a7c" CreationDate="2023-12-15T07:33:55.217" UserId="2005" Text="Find a relevant package that works in `no-std` context, for example, [`embedded-websocket`][1].&#xD;&#xA;&#xD;&#xA;I managed to establish `ws` connection to a Substrate chain with the following code:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;fn offchain_worker(_now: BlockNumberFor&lt;T&gt;) {&#xD;&#xA;	let ws_port = &quot;ws://127.0.0.1:9999&quot;;&#xD;&#xA;	log::info!(&quot;Connecting to: {}&quot;, ws_port);&#xD;&#xA;&#xD;&#xA;	let websocket_options = embedded_websocket::WebSocketOptions {&#xD;&#xA;    	path: &quot;&quot;,&#xD;&#xA;		host: &quot;localhost&quot;,&#xD;&#xA;		origin: &quot;http://localhost:9999&quot;,&#xD;&#xA;		sub_protocols: None,&#xD;&#xA;		additional_headers: None,&#xD;&#xA;	};&#xD;&#xA;&#xD;&#xA;	let mut read_buf = [0u8; 4000];&#xD;&#xA;	let mut handshake_buf = [0u8; 4000];&#xD;&#xA;&#xD;&#xA;	let mut websocket = WebSocketClient::new_client(embedded_websocket::random::EmptyRng::new());&#xD;&#xA;&#xD;&#xA;	let result = websocket.client_connect(&amp;websocket_options, &amp;mut handshake_buf);&#xD;&#xA;&#xD;&#xA;	log::info!(&quot;Connected. {:?}&quot;, result);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This logs the following:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;2023-12-14 23:22:48 Connecting to: ws://127.0.0.1:9999    &#xD;&#xA;2023-12-14 23:22:48 Connected. Ok((204, &quot;AAAAAAAAAAAAAAAAAAAAAA==&quot;))   &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And afaiu, you can then pass whatever request you want via `websocket.write()`. For example (not tested code): &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let json_string = r#&quot;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;chain_getBlockHash&quot;,&quot;params&quot;:[1],&quot;id&quot;:1}&quot;#;&#xD;&#xA;&#xD;&#xA;let num_bytes = websocket.write(&#xD;&#xA;	WebSocketSendMessageType::Text,&#xD;&#xA;	true,&#xD;&#xA;	json_string.as_bytes(),&#xD;&#xA;	&amp;mut read_buf,&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Use the package at your own risk, bit it seems it does the job.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ninjasource/embedded-websocket" ContentLicense="CC BY-SA 4.0" />
  <row Id="42491" PostHistoryTypeId="2" PostId="10664" RevisionGUID="30c2f519-a536-4963-bf25-aca6f034fb05" CreationDate="2023-12-15T08:30:20.453" UserId="251" Text="Kusama and Polkadot are not available if you're using versions later than v1.3.0.&#xD;&#xA;&#xD;&#xA;For testing with the polkadot-sdk, consider using Rococo or Westend instead.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/pull/1731" ContentLicense="CC BY-SA 4.0" />
  <row Id="42494" PostHistoryTypeId="33" PostId="10631" RevisionGUID="948c7409-1452-4b1a-a763-5d559bbb9bd9" CreationDate="2023-12-15T11:51:36.797" UserId="2163" Comment="39" />
  <row Id="42495" PostHistoryTypeId="34" PostId="10561" RevisionGUID="691684f5-8b88-40c7-bc30-2d5a3f5b1d80" CreationDate="2023-12-15T12:03:25.440" UserId="-1" Comment="37" />
  <row Id="42496" PostHistoryTypeId="2" PostId="10665" RevisionGUID="1ed617f0-6057-42eb-a2de-5f56a51d6516" CreationDate="2023-12-15T13:50:01.943" UserId="279" Text="as I mention in my [comment](https://substrate.stackexchange.com/questions/10631/parachains-not-producing-blocks-with-polkadot-release-v1-4-0#comment10525_10631) using the latest version of [zombienet](https://github.com/paritytech/zombienet/releases/tag/v1.3.86) will work with that config *but* you need to compile `polkadot` with `fast-runtime` to reduce the epoch time (`parachains` start to producing blocks after 2 epochs).&#xD;&#xA;&#xD;&#xA;You can compile `polkadot` with `fast-runtime` with this command&#xD;&#xA;```sh&#xD;&#xA;cargo build --locked --profile testnet --features fast-runtime --bin polkadot --bin polkadot-prepare-worker --bin polkadot-execute-worker&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42498" PostHistoryTypeId="2" PostId="10666" RevisionGUID="da0fdde4-89bd-4dab-be43-f6c412f19d84" CreationDate="2023-12-15T14:52:17.840" UserId="3098" Text="If you using `Erc20` contract from the ink! repo, you first need to declare contract module as `pub` [here](https://github.com/paritytech/ink/blob/b4bc91730f5009b19a5b7436c591e3753b4328eb/integration-tests/erc20/lib.rs#L4).&#xD;&#xA;&#xD;&#xA;Secondly, you need to use `Erc20Ref` in order to gain an instance of a constructor like so `let mut constructor = Erc20Ref::new(total_supply);`&#xD;&#xA;&#xD;&#xA;So you import should be `use erc20::erc20::{Erc20, Erc20Ref};`&#xD;&#xA;&#xD;&#xA;Finally, since you message accepts `AccountId` you need to instantiate your two `Erc20` contracts.&#xD;&#xA;```rust&#xD;&#xA;let erc20 = client&#xD;&#xA;    .instantiate(&quot;erc20&quot;, &amp;ink_e2e::alice(), &amp;mut constructor)&#xD;&#xA;    .submit()&#xD;&#xA;    .await&#xD;&#xA;    .expect(&quot;instantiate failed&quot;);&#xD;&#xA;```&#xD;&#xA;And you can access the address of the instantiated contract with `erc20.account_id`" ContentLicense="CC BY-SA 4.0" />
  <row Id="42500" PostHistoryTypeId="2" PostId="10667" RevisionGUID="3082f548-094a-4b5b-85ca-c6e51b2af4b7" CreationDate="2023-12-15T16:30:11.877" UserId="213" Text="I have a home internet connection of 80-95% uptime with 7-10 Mbps speed. Is it possible to run a parachain or parathread node without taking any cloud services?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42502" PostHistoryTypeId="1" PostId="10667" RevisionGUID="3082f548-094a-4b5b-85ca-c6e51b2af4b7" CreationDate="2023-12-15T16:30:11.877" UserId="213" Text="How much internet uptime is required for running parachain or parathread?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42503" PostHistoryTypeId="3" PostId="10667" RevisionGUID="3082f548-094a-4b5b-85ca-c6e51b2af4b7" CreationDate="2023-12-15T16:30:11.877" UserId="213" Text="|parachain|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42504" PostHistoryTypeId="2" PostId="10668" RevisionGUID="18783b0c-d174-4eb6-8b7f-8e804d8c1df8" CreationDate="2023-12-15T17:17:52.143" UserId="251" Text="Disable its default features:&#xD;&#xA;```&#xD;&#xA;serde = { version = &quot;1.0.119&quot;, default-features = false }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And add it to the std part:&#xD;&#xA;```&#xD;&#xA;std = [&#xD;&#xA;	&quot;serde/std&quot;,&#xD;&#xA;    ..&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then everything works well in my local.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    Finished dev [unoptimized + debuginfo] target(s) in 0.51s&#xD;&#xA;&#xD;&#xA;xavier in debugging at  main &lt;!&gt; via  v1.76.0-nightly takes 700ms&#xD;&#xA;Sat Dec 16 01:17:30 2023 - 54%&#xD;&#xA;λ " ContentLicense="CC BY-SA 4.0" />
  <row Id="42506" PostHistoryTypeId="50" PostId="10453" RevisionGUID="77b4ce74-b731-433c-9b6d-b9b87290afc5" CreationDate="2023-12-16T05:05:15.550" UserId="-1" />
  <row Id="42507" PostHistoryTypeId="50" PostId="10432" RevisionGUID="191f5c57-2583-484d-826e-15598d9a7c13" CreationDate="2023-12-16T06:05:45.650" UserId="-1" />
  <row Id="42509" PostHistoryTypeId="50" PostId="6000" RevisionGUID="0f5439bc-f353-48c8-9c83-7a2fdf5fae4b" CreationDate="2023-12-16T12:03:20.390" UserId="-1" />
  <row Id="42510" PostHistoryTypeId="2" PostId="10669" RevisionGUID="e491d786-f80b-4b1d-82b1-79d7de3bd3ab" CreationDate="2023-12-16T13:28:29.560" UserId="2960" Text="I am trying to understand lib2p2 Rust by looking at the [rust libp2p examples][1] in the rust libp2p github repo and [substrate network module][2] as well.&#xD;&#xA;My question is, If I am building a peer to peer network such as a blockchain using libp2p.&#xD;&#xA;&#xD;&#xA;1. If I am correct , do I use both kadamlia and mdns for peer discovery ? or I can use only mdns or only kadamlia since both can be used for peer discovery according to the libp2p documentation&#xD;&#xA;&#xD;&#xA;2. If I used kademlia for discovery and routing, does this mean my network will also connect with the ipfs network? I came across information mentioning that ipfs is coupled with the kademlia protocol. how do I use rust libp2p such that the peers in my protocol network (e.g blockhain) only connect with other peers running my own protocol such as a blockchain network? is there a code sample for this ?&#xD;&#xA;&#xD;&#xA;3. What libp2p behavior or module to I use for broadcasting information to other peers in the network ? such as broadcasting blocks as in a blockchain network ? is it gossipsub? I looked into the substrate network crate Cargo.toml but i saw that the gossipsub feature is not enabled&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github1s.com/libp2p/rust-libp2p/blob/master/examples/chat/Cargo.toml#L15&#xD;&#xA;  [2]: https://github1s.com/paritytech/polkadot-sdk/blob/HEAD/substrate/client/network/src/transport.rs#L35-L36" ContentLicense="CC BY-SA 4.0" />
  <row Id="42512" PostHistoryTypeId="1" PostId="10669" RevisionGUID="e491d786-f80b-4b1d-82b1-79d7de3bd3ab" CreationDate="2023-12-16T13:28:29.560" UserId="2960" Text="which libp2p module do I use to broadcast data to peers in the network e.g blockchain? do I use mdns or kademlia for blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42513" PostHistoryTypeId="3" PostId="10669" RevisionGUID="e491d786-f80b-4b1d-82b1-79d7de3bd3ab" CreationDate="2023-12-16T13:28:29.560" UserId="2960" Text="|polkadot|substrate-node|ethereum|libp2p|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42514" PostHistoryTypeId="2" PostId="10670" RevisionGUID="830a58d2-6b88-4e32-bb36-fd6c7c8744f4" CreationDate="2023-12-16T16:35:08.487" UserId="3546" Text="Kademlia and mDNS are different kinds of peer discovery mechanisms. For Kademlia you need at least one bootnode that you already know and from whom you can learn about other nodes of the network. mDNS doesn't require a bootnode but peer discovery is limited to local network.&#xD;&#xA;&#xD;&#xA;Your blockchain won't connect to IPFS unless you use the same protocol name for you DHT. For Polkadot, we use `&lt;genesis hash&gt;/kad` as the protocol name which forces Kademlia to only connect to other Polkadot nodes. Example [here](https://github.com/paritytech/polkadot-sdk/blob/e5b2adac7ad5c44f0231af808e18258f4599c882/substrate/client/network/src/discovery.rs#L179-L181)&#xD;&#xA;&#xD;&#xA;We don't use Gossipsub in Polkadot but a custom protocol which allows sending notifications to other peers. This protocol is used to implement block, transaction and other gossip protocols in Polkadot. [Here](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/client/network/transactions/src/lib.rs#L452-L487) is an example of how it's used in the transaction protocol" ContentLicense="CC BY-SA 4.0" />
  <row Id="42516" PostHistoryTypeId="50" PostId="10472" RevisionGUID="8f80059b-6a80-4277-ad7c-554adc037872" CreationDate="2023-12-17T10:07:20.977" UserId="-1" />
  <row Id="42517" PostHistoryTypeId="50" PostId="10484" RevisionGUID="f9407217-2e25-4f36-9b45-3a8fcbe22af7" CreationDate="2023-12-17T11:08:36.040" UserId="-1" />
  <row Id="42518" PostHistoryTypeId="5" PostId="10633" RevisionGUID="a237f800-7c20-40d6-8d36-c566c0d4f103" CreationDate="2023-12-17T13:43:24.713" UserId="354" Comment="improved formatting" Text="If you are using the `pallet_node_authorization` then the default limit is 8 which is set in the runtime config. You can increase/update this number accordingly. I have set this to 512 in the below example.&#xD;&#xA;```rust&#xD;&#xA;    parameter_types! {&#xD;&#xA;        pub const MaxWellKnownNodes: u32 = 512;&#xD;&#xA;        pub const MaxPeerIdLength: u32 = 128;&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    impl pallet_node_authorization::Config for Runtime {&#xD;&#xA;        type Event = Event;&#xD;&#xA;        type MaxWellKnownNodes = MaxWellKnownNodes;&#xD;&#xA;        type MaxPeerIdLength = MaxPeerIdLength;&#xD;&#xA;        type AddOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type RemoveOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type SwapOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type ResetOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;        type WeightInfo = ();&#xD;&#xA;    }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42519" PostHistoryTypeId="24" PostId="10633" RevisionGUID="a237f800-7c20-40d6-8d36-c566c0d4f103" CreationDate="2023-12-17T13:43:24.713" Comment="Proposed by 354 approved by 116, 83 edit id of 621" ContentLicense="CC BY-SA 4.0" />
  <row Id="42520" PostHistoryTypeId="5" PostId="10619" RevisionGUID="30d68faa-2268-44a6-9b71-43be49779806" CreationDate="2023-12-17T13:48:08.993" UserId="354" Comment="improved formatting" Text="I am testing a parachain runtime upgrade locally, and after calling the `enactAuthorizeUpgrade`, parachain stops producing blocks, and the logs start giving the following error: `Collation wasn't advertised to any validator.` &#xD;&#xA;&#xD;&#xA;I can see the parachain producing the same block over and over, but it seems like its never imported by the relay chain. Any ideas on what the issue could be? " ContentLicense="CC BY-SA 4.0" />
  <row Id="42521" PostHistoryTypeId="24" PostId="10619" RevisionGUID="30d68faa-2268-44a6-9b71-43be49779806" CreationDate="2023-12-17T13:48:08.993" Comment="Proposed by 354 approved by 116, -1 edit id of 619" ContentLicense="CC BY-SA 4.0" />
  <row Id="42522" PostHistoryTypeId="5" PostId="10619" RevisionGUID="ee76c20d-661f-4548-a145-9a8b269fb79c" CreationDate="2023-12-17T13:48:08.993" UserId="83" Comment="improved formatting" Text="I am testing a parachain runtime upgrade locally. After calling the `enactAuthorizeUpgrade`, the parachain stops producing blocks, and the logs show error: `Collation wasn't advertised to any validator`. &#xD;&#xA;&#xD;&#xA;I can see the parachain producing the same block repeatedly, but it seems like its never imported by the relay chain. Any ideas on what the issue could be? " ContentLicense="CC BY-SA 4.0" />
  <row Id="42523" PostHistoryTypeId="5" PostId="10573" RevisionGUID="34120b7d-4bb9-448d-bea5-452f6dd504ba" CreationDate="2023-12-17T13:54:50.183" UserId="354" Comment="improved formatting" Text="This key previously worked with Kusama until the recent metadata update (with beefy key)&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const keys = await api.query.session.nextKeys(address.address);&#xD;&#xA;const keysHex = keys.toHex();&#xD;&#xA;const result = await api.rpc.author.hasSessionKeys(keysHex);&#xD;&#xA;const normalizedResult = result.toPrimitive();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But now this always returns false for Kusama (still works for chain Polkadot). If I check specific subkeys with hasKeys (like the new beefy), it returns true. Would you know what I would need to change for this to work with the new version of `Kusama/Polkadot-SDK`?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42524" PostHistoryTypeId="24" PostId="10573" RevisionGUID="34120b7d-4bb9-448d-bea5-452f6dd504ba" CreationDate="2023-12-17T13:54:50.183" Comment="Proposed by 354 approved by 116, -1 edit id of 615" ContentLicense="CC BY-SA 4.0" />
  <row Id="42525" PostHistoryTypeId="5" PostId="10573" RevisionGUID="958edd02-7a80-41a2-b7e0-0feaa87e46d3" CreationDate="2023-12-17T13:54:50.183" UserId="83" Comment="improved formatting" Text="This key previously worked with Kusama until the recent metadata update (with BEEFY key)&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const keys = await api.query.session.nextKeys(address.address);&#xD;&#xA;const keysHex = keys.toHex();&#xD;&#xA;const result = await api.rpc.author.hasSessionKeys(keysHex);&#xD;&#xA;const normalizedResult = result.toPrimitive();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But now this always returns `false` for Kusama (still works for chain Polkadot). If I check specific subkeys with `hasKeys` (like the new BEEFY), it returns `true`. What do I need to change for this to work with the new version of Polkadot SDK?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42526" PostHistoryTypeId="5" PostId="10652" RevisionGUID="1a601d34-84ea-41ee-9905-e8944d6ddc24" CreationDate="2023-12-17T14:05:29.797" UserId="354" Comment="improved formatting" Text="I am trying to call the `set_base_uri` function and the `mint_next` function of the Ink NFT smart contract. When calling from `polkadot-ui` it is working correctly but when I call it in `nextjs` it gives a dispatch error&#xD;&#xA;&#xD;&#xA;Here is how I am calling it:&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;```rust&#xD;&#xA;      const handleMint = async () =&gt; {&#xD;&#xA;            setIsLoading(true);&#xD;&#xA;    &#xD;&#xA;            const getGasMaxLimit = () =&gt; {&#xD;&#xA;                return api.registry.createType(&#xD;&#xA;                    &quot;WeightV2&quot;,&#xD;&#xA;                    api.consts.system.blockWeights[&quot;maxBlock&quot;]&#xD;&#xA;                );&#xD;&#xA;            };&#xD;&#xA;    &#xD;&#xA;            console.log(&quot;gas limit max&quot;, getGasMaxLimit().toHuman());&#xD;&#xA;    &#xD;&#xA;            try {&#xD;&#xA;                const res = await contract.query[&quot;payableMint::mintNext&quot;](&#xD;&#xA;                    state.data.defaultAccount.address,&#xD;&#xA;                    {&#xD;&#xA;                        storageDepositLimit: null,&#xD;&#xA;                        gasLimit: getGasMaxLimit(),&#xD;&#xA;                    }&#xD;&#xA;                );&#xD;&#xA;    &#xD;&#xA;                const { output, result, gasRequired, storageDeposit } = res;&#xD;&#xA;                console.log(&quot;mintNext query result&quot;, result.toString());&#xD;&#xA;                console.log(&quot;mint gasRequired&quot;, gasRequired.toString());&#xD;&#xA;                console.log(&quot;storageDeposit&quot;, storageDeposit.toString());&#xD;&#xA;    &#xD;&#xA;        &#xD;&#xA;                const mintResult = await contract.tx[&quot;payableMint::mintNext&quot;]({&#xD;&#xA;                    storageDepositLimit: null,&#xD;&#xA;                    gasLimit: api.registry.createType(&quot;WeightV2&quot;, gasRequired),&#xD;&#xA;                }).signAndSend(&#xD;&#xA;                    state.data.defaultAccount.address,&#xD;&#xA;                    { signer: injector.signer },&#xD;&#xA;                    (result) =&gt; {&#xD;&#xA;                        if (result.dispatchError) {&#xD;&#xA;                            let dispatchError = result.dispatchError;&#xD;&#xA;                            if (dispatchError.isModule) {&#xD;&#xA;                                // for module errors, we have the section indexed, lookup&#xD;&#xA;                                const decoded = api.registry.findMetaError(&#xD;&#xA;                                    dispatchError.asModule&#xD;&#xA;                                );&#xD;&#xA;                                const { docs, name, section } = decoded;&#xD;&#xA;                                console.log(&#xD;&#xA;                                    `Transaction Failed\n  ${section}.${name}: ${docs.join(&#xD;&#xA;                                        &quot; &quot;&#xD;&#xA;                                    )}`&#xD;&#xA;                                );&#xD;&#xA;                            } else {&#xD;&#xA;                                console&#xD;&#xA;                                    .log(&#xD;&#xA;                                        `Transaction Failed\n  ${dispatchError.toString()}`&#xD;&#xA;                                    )&#xD;&#xA;                                    .then(() =&gt; {&#xD;&#xA;                                        window.location.reload();&#xD;&#xA;                                    });&#xD;&#xA;                            }&#xD;&#xA;                        } else if (result.isInBlock) {&#xD;&#xA;                            console.log(&quot;Transaction successful&quot;);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                );&#xD;&#xA;    &#xD;&#xA;                setIsMinted(true);&#xD;&#xA;                dispatch(setMinted(true));&#xD;&#xA;            } catch (error) {&#xD;&#xA;                console.log(JSON.stringify(error));&#xD;&#xA;            }&#xD;&#xA;        };&#xD;&#xA;```&#xD;&#xA;    &#xD;&#xA;Here Is the error:&#xD;&#xA;&#xD;&#xA;&gt; Transaction Failed   contracts.ContractReverted: The contract ran to&#xD;&#xA;&gt; completion but decided to revert its storage changes. Please note that&#xD;&#xA;&gt; this error is only returned from extrinsics. When called directly or&#xD;&#xA;&gt; via RPC an `Ok` will be returned. In this case the caller needs to&#xD;&#xA;&gt; inspect the flags to determine whether a reversion has taken place." ContentLicense="CC BY-SA 4.0" />
  <row Id="42527" PostHistoryTypeId="24" PostId="10652" RevisionGUID="1a601d34-84ea-41ee-9905-e8944d6ddc24" CreationDate="2023-12-17T14:05:29.797" Comment="Proposed by 354 approved by 116, -1 edit id of 623" ContentLicense="CC BY-SA 4.0" />
  <row Id="42528" PostHistoryTypeId="5" PostId="10652" RevisionGUID="a5a55bdd-5d9c-44f7-80da-040c144417a5" CreationDate="2023-12-17T14:05:29.797" UserId="83" Comment="improved formatting, needs unindentation of JS but can't do with edit on mobile " Text="I am trying to call the `set_base_uri` function and the `mint_next` function of the ink! NFT smart contract. When calling from `polkadot-ui` it is working correctly but when I call it using `nextjs` it gives a dispatch error&#xD;&#xA;&#xD;&#xA;I am calling it with:&#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;```js&#xD;&#xA;      const handleMint = async () =&gt; {&#xD;&#xA;            setIsLoading(true);&#xD;&#xA;    &#xD;&#xA;            const getGasMaxLimit = () =&gt; {&#xD;&#xA;                return api.registry.createType(&#xD;&#xA;                    &quot;WeightV2&quot;,&#xD;&#xA;                    api.consts.system.blockWeights[&quot;maxBlock&quot;]&#xD;&#xA;                );&#xD;&#xA;            };&#xD;&#xA;    &#xD;&#xA;            console.log(&quot;gas limit max&quot;, getGasMaxLimit().toHuman());&#xD;&#xA;    &#xD;&#xA;            try {&#xD;&#xA;                const res = await contract.query[&quot;payableMint::mintNext&quot;](&#xD;&#xA;                    state.data.defaultAccount.address,&#xD;&#xA;                    {&#xD;&#xA;                        storageDepositLimit: null,&#xD;&#xA;                        gasLimit: getGasMaxLimit(),&#xD;&#xA;                    }&#xD;&#xA;                );&#xD;&#xA;    &#xD;&#xA;                const { output, result, gasRequired, storageDeposit } = res;&#xD;&#xA;                console.log(&quot;mintNext query result&quot;, result.toString());&#xD;&#xA;                console.log(&quot;mint gasRequired&quot;, gasRequired.toString());&#xD;&#xA;                console.log(&quot;storageDeposit&quot;, storageDeposit.toString());&#xD;&#xA;    &#xD;&#xA;        &#xD;&#xA;                const mintResult = await contract.tx[&quot;payableMint::mintNext&quot;]({&#xD;&#xA;                    storageDepositLimit: null,&#xD;&#xA;                    gasLimit: api.registry.createType(&quot;WeightV2&quot;, gasRequired),&#xD;&#xA;                }).signAndSend(&#xD;&#xA;                    state.data.defaultAccount.address,&#xD;&#xA;                    { signer: injector.signer },&#xD;&#xA;                    (result) =&gt; {&#xD;&#xA;                        if (result.dispatchError) {&#xD;&#xA;                            let dispatchError = result.dispatchError;&#xD;&#xA;                            if (dispatchError.isModule) {&#xD;&#xA;                                // for module errors, we have the section indexed, lookup&#xD;&#xA;                                const decoded = api.registry.findMetaError(&#xD;&#xA;                                    dispatchError.asModule&#xD;&#xA;                                );&#xD;&#xA;                                const { docs, name, section } = decoded;&#xD;&#xA;                                console.log(&#xD;&#xA;                                    `Transaction Failed\n  ${section}.${name}: ${docs.join(&#xD;&#xA;                                        &quot; &quot;&#xD;&#xA;                                    )}`&#xD;&#xA;                                );&#xD;&#xA;                            } else {&#xD;&#xA;                                console&#xD;&#xA;                                    .log(&#xD;&#xA;                                        `Transaction Failed\n  ${dispatchError.toString()}`&#xD;&#xA;                                    )&#xD;&#xA;                                    .then(() =&gt; {&#xD;&#xA;                                        window.location.reload();&#xD;&#xA;                                    });&#xD;&#xA;                            }&#xD;&#xA;                        } else if (result.isInBlock) {&#xD;&#xA;                            console.log(&quot;Transaction successful&quot;);&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;                );&#xD;&#xA;    &#xD;&#xA;                setIsMinted(true);&#xD;&#xA;                dispatch(setMinted(true));&#xD;&#xA;            } catch (error) {&#xD;&#xA;                console.log(JSON.stringify(error));&#xD;&#xA;            }&#xD;&#xA;        };&#xD;&#xA;```&#xD;&#xA;    &#xD;&#xA;The error is:&#xD;&#xA;```&#xD;&#xA;&gt; Transaction Failed   contracts.ContractReverted: The contract ran to&#xD;&#xA;&gt; completion but decided to revert its storage changes. Please note that&#xD;&#xA;&gt; this error is only returned from extrinsics. When called directly or&#xD;&#xA;&gt; via RPC an `Ok` will be returned. In this case the caller needs to&#xD;&#xA;&gt; inspect the flags to determine whether a reversion has taken place.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42529" PostHistoryTypeId="2" PostId="10671" RevisionGUID="3a249398-3e4b-415a-ac77-559fc45b5e87" CreationDate="2023-12-17T17:26:05.697" UserId="94" Text="There is a new pattern where migrations do not need to check the pre- and post-version anymore. Doing this manually is error-prone, hence there is now a [`VersionedMigration`](https://docs.rs/frame-support/latest/frame_support/migrations/struct.VersionedMigration.html) wrapper that can be used lik:  &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub type MigrationV1ToV2&lt;T&gt; = frame_support::migrations::VersionedMigration&lt;&#xD;&#xA;	1,&#xD;&#xA;	2,&#xD;&#xA;	UncheckedMigrationV1ToV2&lt;T&gt;,&#xD;&#xA;	Pallet&lt;T&gt;,&#xD;&#xA;	&lt;T as frame_system::Config&gt;::DbWeight,&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The actual migration is in the `UncheckedMigrationToV2`, which now does not need to do any version checks since the versions are passed as const generics to the wrapper. This simplifies the code and removes copy&amp;paste overhead." ContentLicense="CC BY-SA 4.0" />
  <row Id="42531" PostHistoryTypeId="2" PostId="10672" RevisionGUID="24fa4f6d-890e-42d3-8319-9b8a29f01325" CreationDate="2023-12-18T04:43:49.370" UserId="354" Text="Yes you can run it on your local machine if it is for testing purposes. To run a production environment node on local system is not advisable but you can runt it without taking any cloud services." ContentLicense="CC BY-SA 4.0" />
  <row Id="42535" PostHistoryTypeId="2" PostId="10674" RevisionGUID="f9245a22-99f8-4c61-b404-9f167d08946f" CreationDate="2023-12-18T09:34:03.360" UserId="5016" Text="I used typegen to generate types for Substrate, Kusama and Polkadot networks. And I got the exact same types for the rpc endpoints. Is this normal? Should not be there some unique endpoints to the relay chain vs the execution node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42537" PostHistoryTypeId="1" PostId="10674" RevisionGUID="f9245a22-99f8-4c61-b404-9f167d08946f" CreationDate="2023-12-18T09:34:03.360" UserId="5016" Text="What are the RPC endpoints that is usually unique to Substrate vs the unique to Polkadot nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42538" PostHistoryTypeId="3" PostId="10674" RevisionGUID="f9245a22-99f8-4c61-b404-9f167d08946f" CreationDate="2023-12-18T09:34:03.360" UserId="5016" Text="|polkadot|rpc|substrate-node|typegen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42539" PostHistoryTypeId="2" PostId="10675" RevisionGUID="c76b3c7b-7941-47a0-b025-6a59c8342f51" CreationDate="2023-12-18T12:33:36.943" UserId="2163" Text="I have an ink! contract that uses a custom environment that contains custom chain extensions.&#xD;&#xA;&#xD;&#xA;I am trying to write e2e tests for this contract however there is a problem.&#xD;&#xA;&#xD;&#xA;Instantiate the contract how I would normally do won't work:&#xD;&#xA;```rust&#xD;&#xA;let constructor = ContractRef::new();&#xD;&#xA;let address = client&#xD;&#xA;                .instantiate(&quot;foo&quot;, &amp;ink_e2e::alice(), constructor, 0, None)&#xD;&#xA;                .await&#xD;&#xA;                .expect(&quot;instantiate failed&quot;)&#xD;&#xA;                .account_id;&#xD;&#xA;```&#xD;&#xA;since the `ContractRef` is created with the default environment:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; contracts/xc-regions/src/lib.rs:231:51&#xD;&#xA;    |&#xD;&#xA;231 |                 .instantiate(&quot;foo&quot;, &amp;ink_e2e::alice(), constructor, 0, None)&#xD;&#xA;    |                  -----------                                  ^^^^^^^^^^^ expected `CreateBuilder&lt;DefaultEnvironment, ..., ..., ..., ..., ..., ..., ...&gt;`, found `CreateBuilder&lt;ExtendedEnvironment, ..., ..., ..., ..., ..., ..., ...&gt;`&#xD;&#xA;    |                  |&#xD;&#xA;    |                  arguments to this method are incorrect&#xD;&#xA;    |&#xD;&#xA;    = note: expected struct `CreateBuilder&lt;DefaultEnvironment, _, _, _, _, Set&lt;ExecutionInput&lt;_&gt;&gt;, _, Set&lt;ReturnType&lt;_&gt;&gt;&gt;`&#xD;&#xA;               found struct `CreateBuilder&lt;ExtendedEnvironment, XcRegionsRef, _, _, _, Set&lt;ExecutionInput&lt;ArgumentList&lt;ArgumentListEnd, ArgumentListEnd&gt;&gt;&gt;, _, Set&lt;ReturnType&lt;XcRegionsRef&gt;&gt;&gt;`&#xD;&#xA;note: method defined here&#xD;&#xA;   --&gt; /Users/sergejsakac/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ink_e2e-4.3.0/src/client.rs:467:18&#xD;&#xA;    |&#xD;&#xA;467 |     pub async fn instantiate&lt;ContractRef, Args, R&gt;(&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What would be the optimal way to instantiate a contract that uses a custom environment in an e2e test? " ContentLicense="CC BY-SA 4.0" />
  <row Id="42541" PostHistoryTypeId="1" PostId="10675" RevisionGUID="c76b3c7b-7941-47a0-b025-6a59c8342f51" CreationDate="2023-12-18T12:33:36.943" UserId="2163" Text="Ink e2e tests with custom environment" ContentLicense="CC BY-SA 4.0" />
  <row Id="42542" PostHistoryTypeId="3" PostId="10675" RevisionGUID="c76b3c7b-7941-47a0-b025-6a59c8342f51" CreationDate="2023-12-18T12:33:36.943" UserId="2163" Text="|ink|testing|chain-extension|e2e|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42543" PostHistoryTypeId="2" PostId="10676" RevisionGUID="359a46cd-b023-41d9-b41a-7f8b1cfedb22" CreationDate="2023-12-18T13:14:42.053" UserId="4556" Text="I'm writing a custom pallet that interacts with the NFTs pallet. In particular my custom pallet mints an NFT with metadata.&#xD;&#xA;&#xD;&#xA;Here is how the token is minted and metadata is set in the custom pallet:&#xD;&#xA;```&#xD;&#xA;T::Nfts::mint_into(&amp;T::ExperienceNFTCollectionId::get(), &amp;token_id, &amp;to, &amp;item_config, true)?;&#xD;&#xA;T::Nfts::set_item_metadata(None, &amp;T::ExperienceNFTCollectionId::get(), &amp;token_id, &amp;credential.encode())?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my test case I want to test the metadata. This isn't possible, because the data field of ItemMetaData is private.&#xD;&#xA;&#xD;&#xA;Here is how I try to get the metadata for testing in my custom pallet:&#xD;&#xA;```&#xD;&#xA;let metadata = ItemMetadataOf::&lt;Test&gt;::get(0, 0).unwrap();&#xD;&#xA;assert_eq!(metadata.data, bounded_vec![]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error I'm getting on the assert_eq line is: &#xD;&#xA;```&#xD;&#xA;field `data` of struct `ItemMetadata` is private&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I'm not supposed to directly read the data field, then how am I supposed to test or work with the metadata I set?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42545" PostHistoryTypeId="1" PostId="10676" RevisionGUID="359a46cd-b023-41d9-b41a-7f8b1cfedb22" CreationDate="2023-12-18T13:14:42.053" UserId="4556" Text="Testing NFT metadata" ContentLicense="CC BY-SA 4.0" />
  <row Id="42546" PostHistoryTypeId="3" PostId="10676" RevisionGUID="359a46cd-b023-41d9-b41a-7f8b1cfedb22" CreationDate="2023-12-18T13:14:42.053" UserId="4556" Text="|substrate-node-template|nft|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42547" PostHistoryTypeId="2" PostId="10677" RevisionGUID="01fe60d3-2b10-406f-8f85-0c2e36a011bd" CreationDate="2023-12-18T13:21:18.920" UserId="2163" Text="You can access a specific it through the `Inspect` trait:&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/d941784b397517a9e03e0e260450bfb9f7724fbf/substrate/frame/uniques/src/impl_nonfungibles.rs#L49&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// E.g. accessing a specific attribute:&#xD;&#xA;let attribute = pallet_uniques::Pallet::&lt;T&gt;::attribute(&amp;collection_id, &amp;item, &amp;key);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42549" PostHistoryTypeId="2" PostId="10678" RevisionGUID="6cbc2a91-0821-4db4-a50d-3e3412b8935b" CreationDate="2023-12-18T13:21:35.823" UserId="2005" Text="what if you compose an `ItemMetadata` struct and compare that instead? &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;let actual_metadata = ItemMetadataOf::&lt;Test&gt;::get(0, 0).unwrap();&#xD;&#xA;&#xD;&#xA;let expected_metadata = ItemMetadataOf::&lt;Test&gt; {&#xD;&#xA;  deposit: Zero::zero(),&#xD;&#xA;  data: [1, 2, 3].try_into().unwrap()&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;assert_eq!(expected_metadata, actual_metadata);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42551" PostHistoryTypeId="2" PostId="10679" RevisionGUID="a7149dfc-5628-4d1f-9b3b-aba7126b878f" CreationDate="2023-12-18T13:41:42.847" UserId="354" Text="By default the ports are same, as Substrate, Kusama and Polkadot networks are not meant to be run on the same system, so there is nothing wrong to have the same endpoints." ContentLicense="CC BY-SA 4.0" />
  <row Id="42553" PostHistoryTypeId="5" PostId="10677" RevisionGUID="41f2857a-c99f-444a-9aff-cb538708ad2a" CreationDate="2023-12-18T14:41:29.413" UserId="2163" Comment="nfts pallet instead of uniques" Text="You can access a specific it through the `Inspect` trait:&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/ebe2aad6f0ae576a0e176f38a084fe7579f936dd/substrate/frame/nfts/src/impl_nonfungibles.rs#L30&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// E.g. accessing a specific attribute:&#xD;&#xA;let attribute = pallet_nfts::Pallet::&lt;T&gt;::attribute(&amp;collection_id, &amp;item, &amp;key);&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42554" PostHistoryTypeId="34" PostId="10631" RevisionGUID="475103f7-604c-4cfc-95e1-c1aa436cf81a" CreationDate="2023-12-18T15:12:24.937" UserId="2163" Comment="39" />
  <row Id="42555" PostHistoryTypeId="5" PostId="10675" RevisionGUID="4b3ddab2-8b42-4461-a44a-7eeddcbf5de5" CreationDate="2023-12-18T16:22:13.707" UserId="2163" Comment="added 287 characters in body" Text="I have an ink! contract that uses a custom environment that contains custom chain extensions.&#xD;&#xA;&#xD;&#xA;I am trying to write e2e tests for this contract however there is a problem.&#xD;&#xA;&#xD;&#xA;Instantiate the contract how I would normally do won't work:&#xD;&#xA;```rust&#xD;&#xA;let constructor = ContractRef::new();&#xD;&#xA;let address = client&#xD;&#xA;                .instantiate(&quot;foo&quot;, &amp;ink_e2e::alice(), constructor, 0, None)&#xD;&#xA;                .await&#xD;&#xA;                .expect(&quot;instantiate failed&quot;)&#xD;&#xA;                .account_id;&#xD;&#xA;```&#xD;&#xA;since the `ContractRef` is created with the default environment:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0308]: mismatched types&#xD;&#xA;   --&gt; contracts/xc-regions/src/lib.rs:231:51&#xD;&#xA;    |&#xD;&#xA;231 |                 .instantiate(&quot;foo&quot;, &amp;ink_e2e::alice(), constructor, 0, None)&#xD;&#xA;    |                  -----------                                  ^^^^^^^^^^^ expected `CreateBuilder&lt;DefaultEnvironment, ..., ..., ..., ..., ..., ..., ...&gt;`, found `CreateBuilder&lt;ExtendedEnvironment, ..., ..., ..., ..., ..., ..., ...&gt;`&#xD;&#xA;    |                  |&#xD;&#xA;    |                  arguments to this method are incorrect&#xD;&#xA;    |&#xD;&#xA;    = note: expected struct `CreateBuilder&lt;DefaultEnvironment, _, _, _, _, Set&lt;ExecutionInput&lt;_&gt;&gt;, _, Set&lt;ReturnType&lt;_&gt;&gt;&gt;`&#xD;&#xA;               found struct `CreateBuilder&lt;ExtendedEnvironment, XcRegionsRef, _, _, _, Set&lt;ExecutionInput&lt;ArgumentList&lt;ArgumentListEnd, ArgumentListEnd&gt;&gt;&gt;, _, Set&lt;ReturnType&lt;XcRegionsRef&gt;&gt;&gt;`&#xD;&#xA;note: method defined here&#xD;&#xA;   --&gt; /Users/sergejsakac/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ink_e2e-4.3.0/src/client.rs:467:18&#xD;&#xA;    |&#xD;&#xA;467 |     pub async fn instantiate&lt;ContractRef, Args, R&gt;(&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What would be the optimal way to instantiate a contract that uses a custom environment in an e2e test? &#xD;&#xA;&#xD;&#xA;I tried to make this work by setting the proper environment to for the client that is passed as an argument to the e2e test, however that does not resolve the issue:&#xD;&#xA;```rust&#xD;&#xA;async fn test_1(mut client: ink_e2e::Client&lt;C, environment::ExtendedEnvironment&gt;) -&gt; E2EResult&lt;()&gt; { }&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42556" PostHistoryTypeId="2" PostId="10680" RevisionGUID="e76dbe11-564a-4691-a453-44ac67ee8d3f" CreationDate="2023-12-18T19:26:47.583" UserId="5017" Text="I am trying to send an XCM message encoding my own pallet call to another chain.&#xD;&#xA;I am struggling to write it in a universal way into lib.rs and I am receiving ton of errors.&#xD;&#xA;&#xD;&#xA;These are the packages I import: &#xD;&#xA;&#xD;&#xA;    use xcm::latest::prelude::*;&#xD;&#xA;    use xcm_executor::*;&#xD;&#xA;    &#xD;&#xA;   This is the code I am trying to use&#xD;&#xA;    		&#xD;&#xA;    &#xD;&#xA;     let create_collection = Self::MintCollectionReceived(origin_clone,&#xD;&#xA;     collection_name, collection_description, T::ParaId::get());&#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;     			let create_collection_weight_estimation =&#xD;&#xA;     Weight::from_parts(1_000_000_000, 10_000);&#xD;&#xA;     &#xD;&#xA;     			let message = Xcm(vec![&#xD;&#xA;     				WithdrawAsset((Here, 0).into()),&#xD;&#xA;     				BuyExecution { fees: (Here, 0).into(), weight_limit: WeightLimit::Unlimited },&#xD;&#xA;     				Transact {&#xD;&#xA;     					origin_kind: OriginKind::SovereignAccount,&#xD;&#xA;     					require_weight_at_most: create_collection_weight_estimation, //This gives error&#xD;&#xA;     					call: create_collection.encode().into(), //Here I use my call&#xD;&#xA;     			}, 			]);&#xD;&#xA;&#xD;&#xA;The error I receive is on weight -  **expected `xcm::v3::Weight`, found `frame_support::weights::Weight**&#xD;&#xA;&#xD;&#xA;I do not care about fees for now. I just want to have function, that transfers my own pallet call instruction to another node with given ID.&#xD;&#xA;&#xD;&#xA;I've explored xTokens code and also many guides by Parity.&#xD;&#xA;&#xD;&#xA;Many thanks for any guidance!&#xD;&#xA;&#xD;&#xA;Another question: &#xD;&#xA;If the message is fixed, how do I execute it with executor? Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42558" PostHistoryTypeId="1" PostId="10680" RevisionGUID="e76dbe11-564a-4691-a453-44ac67ee8d3f" CreationDate="2023-12-18T19:26:47.583" UserId="5017" Text="Writing XCM in lib.rs results in many errors" ContentLicense="CC BY-SA 4.0" />
  <row Id="42559" PostHistoryTypeId="3" PostId="10680" RevisionGUID="e76dbe11-564a-4691-a453-44ac67ee8d3f" CreationDate="2023-12-18T19:26:47.583" UserId="5017" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42560" PostHistoryTypeId="5" PostId="10680" RevisionGUID="4fc550a7-453c-469b-a0a3-c58d99f3f1dd" CreationDate="2023-12-18T19:52:41.870" UserId="5017" Comment="added 2 characters in body" Text="I am trying to send an XCM message encoding my own pallet call to another chain.&#xD;&#xA;I am struggling to write it in a universal way into lib.rs and I am receiving ton of errors.&#xD;&#xA;&#xD;&#xA;These are the packages I import: &#xD;&#xA;&#xD;&#xA;    use xcm::latest::prelude::*;&#xD;&#xA;    use xcm_executor::*;&#xD;&#xA;    &#xD;&#xA;   This is the code I am trying to use&#xD;&#xA;    		&#xD;&#xA;    &#xD;&#xA;     let create_collection = Self::MintCollectionReceived(origin_clone,&#xD;&#xA;     collection_name, collection_description, T::ParaId::get());&#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;     			let create_collection_weight_estimation =&#xD;&#xA;     Weight::from_parts(1_000_000_000, 10_000);&#xD;&#xA;     &#xD;&#xA;			let message = Xcm(vec![&#xD;&#xA;				WithdrawAsset((Parachain(destination), 0).into()),&#xD;&#xA;				BuyExecution { fees: (Parachain(destination), 0).into(), weight_limit: WeightLimit::Unlimited },&#xD;&#xA;				Transact {&#xD;&#xA;					origin_kind: OriginKind::SovereignAccount,&#xD;&#xA;					require_weight_at_most: create_collection_weight_estimation, //Here program fails&#xD;&#xA;					call: create_collection.encode().into(), //Here I use my cal&#xD;&#xA;				},&#xD;&#xA;			]);&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;The error I receive is on weight -  **expected `xcm::v3::Weight`, found `frame_support::weights::Weight**&#xD;&#xA;&#xD;&#xA;I do not care about fees for now. I just want to have function, that transfers my own pallet call instruction to another node with given ID.&#xD;&#xA;&#xD;&#xA;I've explored xTokens code and also many guides by Parity.&#xD;&#xA;&#xD;&#xA;Many thanks for any guidance!&#xD;&#xA;&#xD;&#xA;Another question: &#xD;&#xA;If the message is fixed, how do I execute it with executor? Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42561" PostHistoryTypeId="5" PostId="10674" RevisionGUID="f1e86578-c4fb-4354-8010-301ee4b87bdc" CreationDate="2023-12-18T20:49:35.583" UserId="5016" Comment="added 22 characters in body" Text="I used typegen to generate types for Substrate, Kusama and Polkadot networks. And I got the exact same types for the **rpc** endpoints (rpc methods). Is this normal? Should not be there some unique endpoints to the relay chain vs the execution node?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42562" PostHistoryTypeId="2" PostId="10681" RevisionGUID="f723a3a8-7edd-45ba-8446-a75f0585e106" CreationDate="2023-12-18T21:54:23.963" UserId="5016" Text="Unfortunately, The edgeware.json file does not contain the list of RPC methods for the node. And the typegen does not depend on it to generate the `augment-api-rpc.ts` file which contains the list of rpc methods organized inside namespaces.&#xD;&#xA;&#xD;&#xA;However, someone can query the connected node to check for the supported methods by calling the `rpc_methods` endpoint on the node.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42564" PostHistoryTypeId="5" PostId="10482" RevisionGUID="8f095ba9-8fa1-4f27-a212-499fa15f173a" CreationDate="2023-12-19T03:34:47.913" UserId="116" Comment="link" Text="These are multi-blocks migrations. You don't need to add all of them to the `Executive`.&#xD;&#xA;&#xD;&#xA;You should add `pallet_contracts::Migration` to the `Executive` and configure:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl pallet_contracts::Config {&#xD;&#xA;    type Migrations = (&#xD;&#xA;        pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,&#xD;&#xA;        pallet_contracts::migration::v11::Migration&lt;Runtime&gt;,&#xD;&#xA;        pallet_contracts::migration::v12::Migration&lt;Runtime&gt;&#xD;&#xA;    );&#xD;&#xA;    ..&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please check the [documentation here.](https://github.com/paritytech/polkadot-sdk/blob/4ac2db8095e55a68f9b3d843d4e4689759fcc9d5/substrate/frame/contracts/src/migration.rs#L18-L58)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42565" PostHistoryTypeId="5" PostId="10489" RevisionGUID="d663763f-a992-4d92-84ac-b74b79affe51" CreationDate="2023-12-19T03:35:46.673" UserId="116" Comment="added 13 characters in body" Text="*[This answer][1] is good, but some key parts to solve the problem is missing, they are added in this post*&#xD;&#xA;&#xD;&#xA;Integration of pallet_contracts [multi-step mitigation][2] is slightly different from integration of migrations intended to be executed in one block. Two steps are needed.&#xD;&#xA;&#xD;&#xA;First in the block implementing `impl pallet_contracts::Config` for `Runtime` the step migrations should be added.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Migrations = (&#xD;&#xA;		pallet_contracts::migration::v10::Migration&lt;Runtime&gt;,&#xD;&#xA;		pallet_contracts::migration::v11::Migration&lt;Runtime&gt;,&#xD;&#xA;		pallet_contracts::migration::v12::Migration&lt;Runtime&gt;,&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Second in the `pallet_contracts::Migration&lt;Runtime, TEST_ALL_STEPS&gt;` must be integrated in `pub type Executive`&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;const TEST_ALL_STEPS: bool = cfg!(feature = &quot;try-runtime&quot;);&#xD;&#xA;&#xD;&#xA;pub type Executive = frame_executive::Executive&lt;&#xD;&#xA;	Runtime,&#xD;&#xA;	Block,&#xD;&#xA;	frame_system::ChainContext&lt;Runtime&gt;,&#xD;&#xA;	Runtime,&#xD;&#xA;	AllPalletsWithSystem,&#xD;&#xA;    (  	pallet_contracts::Migration&lt;Runtime, TEST_ALL_STEPS&gt;,)&#xD;&#xA;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[1]:https://substrate.stackexchange.com/a/10482/116&#xD;&#xA;[2]:https://docs.rs/pallet-contracts/latest/pallet_contracts/migration/struct.Migration.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="42566" PostHistoryTypeId="5" PostId="10667" RevisionGUID="509d34d9-7437-4524-9289-2015ec9b0201" CreationDate="2023-12-19T05:28:52.400" UserId="213" Comment="added 623 characters in body" Text="I have a home internet connection of 80-95% uptime with 7-10 Mbps speed. Is it possible to run a parachain or parathread node without taking any cloud services?&#xD;&#xA;&#xD;&#xA;Here, is some docs: The good news is that 100% uptime of your validator is not really needed, as it has some buffer within eras in order to go offline for a little while and upgrade. Remember, even if your validator goes offline for some time, the offline slash is much more forgiving than the equivocation or parachain validity slashing.&#xD;&#xA;&#xD;&#xA;https://wiki.polkadot.network/docs/maintain-guides-secure-validator&#xD;&#xA;&#xD;&#xA;But I couldn't find documentation for running a parachain or parathread. To complicate matters, each parachain and parathread would have its own incentive system and different criteria for running the node.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42567" PostHistoryTypeId="2" PostId="10682" RevisionGUID="0edd424b-0a10-404c-8ab4-3239e0cf304b" CreationDate="2023-12-19T06:23:34.180" UserId="5018" Text="I'm not sure if this is the issue you're facing, but when I got this error it was because I didn't have enough free DOT to place the necessary reserve for the multisig call.&#xD;&#xA;&#xD;&#xA;Make sure that you have enough liquid DOT to cover the depositBase PLUS the factor dependent deposit (i.e. a threshold of 5 requires 5x the depositFactor).&#xD;&#xA;&#xD;&#xA;These deposits are subject to change, but right now the depositBase for a multisig is 20.088 DOT and the depositFactor is 0.32 DOT. So to approve a multisig call with a threshold of 5 would require a total of 20.088 + 5 x 0.32 = 21.688 DOT. You can always determine the current deposit requirements with a chain state query of the constants under the multisig pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="42569" PostHistoryTypeId="5" PostId="10682" RevisionGUID="49350280-1e2b-40c5-87eb-4daa930adef8" CreationDate="2023-12-19T06:27:33.137" UserId="5018" Comment="added 87 characters in body" Text="I'm not sure if this is the issue you're facing, but when I got this error it was because I didn't have enough free DOT to place the necessary reserve for the multisig call.&#xD;&#xA;&#xD;&#xA;Make sure that you have enough liquid DOT to cover the depositBase PLUS the factor dependent deposit (i.e. a threshold of 5 requires 5x the depositFactor).&#xD;&#xA;&#xD;&#xA;These deposits are subject to change, but right now the depositBase for a multisig is 20.088 DOT and the depositFactor is 0.32 DOT. So to approve a multisig call with a threshold of 5 would require a total of 20.088 + 5 x 0.32 = 21.688 DOT. You can always determine the current deposit requirements with a chain state query of the constants under the multisig pallet.&#xD;&#xA;&#xD;&#xA;edit: don't forget, you always need the existential deposit in your account as free" ContentLicense="CC BY-SA 4.0" />
  <row Id="42570" PostHistoryTypeId="2" PostId="10683" RevisionGUID="172214e1-786f-421c-9ef9-70c8d09390a8" CreationDate="2023-12-19T06:37:08.973" UserId="554" Text="Api data&#xD;&#xA;``` json&#xD;&#xA;{&#xD;&#xA;  &quot;student&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;listing&quot;: {&#xD;&#xA;        &quot;price&quot;: 54,&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA; ]&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I’m using below code for fetching data till `listing`: &#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;let student = match val.ok()? {&#xD;&#xA;  JsonValue::Object(obj) =&gt; {&#xD;&#xA;     let (_, v) = obj.into_iter().find(|(k, _)| k.iter().copied().eq(&quot;student&quot;.chars()))?;&#xD;&#xA;     match v {&#xD;&#xA;        JsonValue::Array(vec) =&gt; vec,&#xD;&#xA;        _ =&gt; return None,&#xD;&#xA;     }&#xD;&#xA;  },&#xD;&#xA;  _ =&gt; return None,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;for (i, obj) in instances.clone().into_iter().enumerate() {&#xD;&#xA;  let list = match obj.clone() {&#xD;&#xA;     JsonValue::Object(obj_data) =&gt; {&#xD;&#xA;        let (_, v) = obj_data.into_iter().find(|(k, _)| k.iter().copied().eq(&quot;listings&quot;.chars()))?;&#xD;&#xA;        match v {&#xD;&#xA;           JsonValue::Object(list) =&gt; list,&#xD;&#xA;           _ =&gt; return None,&#xD;&#xA;        }&#xD;&#xA;     },&#xD;&#xA;     _ =&gt; return None,&#xD;&#xA;  };&#xD;&#xA;&#xD;&#xA; // ?? price&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Ques: How to fetch price from `list`?**&lt;br/&gt;&#xD;&#xA;**Ques: I'm returning `object` from listing, Is that correct?** " ContentLicense="CC BY-SA 4.0" />
  <row Id="42572" PostHistoryTypeId="1" PostId="10683" RevisionGUID="172214e1-786f-421c-9ef9-70c8d09390a8" CreationDate="2023-12-19T06:37:08.973" UserId="554" Text="Facing difficulty in fetching data through lite_json" ContentLicense="CC BY-SA 4.0" />
  <row Id="42573" PostHistoryTypeId="3" PostId="10683" RevisionGUID="172214e1-786f-421c-9ef9-70c8d09390a8" CreationDate="2023-12-19T06:37:08.973" UserId="554" Text="|substrate-node|api|json|math|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42574" PostHistoryTypeId="2" PostId="10684" RevisionGUID="a4159848-a300-441b-b706-7b620becb46d" CreationDate="2023-12-19T09:28:03.930" UserId="4556" Text="The trick was to use `Nfts::attribute(0, 0, [])`, thus with an empty key argument to receive the data I needed.&#xD;&#xA;&#xD;&#xA;Big thanks to @dastansam and @Szegoo for helping me to get on the right track." ContentLicense="CC BY-SA 4.0" />
  <row Id="42576" PostHistoryTypeId="2" PostId="10685" RevisionGUID="0fe794e6-2fd3-4027-b927-5d11493ecfdb" CreationDate="2023-12-19T11:02:41.053" UserId="3389" Text="I'm trying to use Ink as a programmable hook for my pallet.&#xD;&#xA;&#xD;&#xA;TD;LR;&#xD;&#xA;&#xD;&#xA;My pallet will store `Agreement`.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;struct Agreement&lt;T&gt; {&#xD;&#xA;  // ...&#xD;&#xA;  pub on_approve: T::AccountId // this point to an Ink contract&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and there is a call&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(1)]&#xD;&#xA;#[pallet::weight(0{})]&#xD;&#xA;pub fn approve(origin: OriginFor&lt;T&gt;, aggrement_id: u32) {&#xD;&#xA;  let origin = ensure_signed(origin)?;&#xD;&#xA;  let mut agreement = Agreement::&lt;T&gt;::get(aggrement_id)?;&#xD;&#xA;&#xD;&#xA;  agreement.approve();&#xD;&#xA;  // TODO: call agreement.on_success&#xD;&#xA;&#xD;&#xA;  OK(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I can call an Ink contract via `pallet_contracts::Pallet::&lt;T&gt;::bare_call()`.&#xD;&#xA;However, I want to ensure the contract must conform to a specific interface.&#xD;&#xA;&#xD;&#xA;for example&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[ink::trait_definition]&#xD;&#xA;pub trait MyPalletHook {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    fn on_success(&amp;mut self, agreement: Agreement);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is my idea reasonable?&#xD;&#xA;Can pre-check a smart contract code or deployed instance implement a specific trait? How to call the contract via function definition in the trait?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42578" PostHistoryTypeId="1" PostId="10685" RevisionGUID="0fe794e6-2fd3-4027-b927-5d11493ecfdb" CreationDate="2023-12-19T11:02:41.053" UserId="3389" Text="How to call a contract from pallet with specific interface" ContentLicense="CC BY-SA 4.0" />
  <row Id="42579" PostHistoryTypeId="3" PostId="10685" RevisionGUID="0fe794e6-2fd3-4027-b927-5d11493ecfdb" CreationDate="2023-12-19T11:02:41.053" UserId="3389" Text="|ink|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42580" PostHistoryTypeId="5" PostId="10680" RevisionGUID="6328a6b8-2cb6-4d1b-81ee-66deb2c5156e" CreationDate="2023-12-19T11:23:41.887" UserId="354" Comment="improved formatting" Text="I am trying to send an XCM message encoding my own pallet call to another chain.&#xD;&#xA;I am struggling to write it in a universal way into lib.rs and I am receiving ton of errors.&#xD;&#xA;&#xD;&#xA;These are the packages I import: &#xD;&#xA;```rust&#xD;&#xA;    use xcm::latest::prelude::*;&#xD;&#xA;    use xcm_executor::*;&#xD;&#xA;```&#xD;&#xA;   This is the code I am trying to use&#xD;&#xA;    		&#xD;&#xA;```rust &#xD;&#xA;     let create_collection = Self::MintCollectionReceived(origin_clone,&#xD;&#xA;     collection_name, collection_description, T::ParaId::get());&#xD;&#xA;     &#xD;&#xA;     &#xD;&#xA;     			let create_collection_weight_estimation =&#xD;&#xA;     Weight::from_parts(1_000_000_000, 10_000);&#xD;&#xA;     &#xD;&#xA;			let message = Xcm(vec![&#xD;&#xA;				WithdrawAsset((Parachain(destination), 0).into()),&#xD;&#xA;				BuyExecution { fees: (Parachain(destination), 0).into(), weight_limit: WeightLimit::Unlimited },&#xD;&#xA;				Transact {&#xD;&#xA;					origin_kind: OriginKind::SovereignAccount,&#xD;&#xA;					require_weight_at_most: create_collection_weight_estimation, //Here program fails&#xD;&#xA;					call: create_collection.encode().into(), //Here I use my cal&#xD;&#xA;				},&#xD;&#xA;			]);&#xD;&#xA;	&#xD;&#xA;```&#xD;&#xA;The error I receive is on weight -  **expected `xcm::v3::Weight`, found `frame_support::weights::Weight**&#xD;&#xA;&#xD;&#xA;I do not care about fees for now. I just want to have function, that transfers my own pallet call instruction to another node with given ID.&#xD;&#xA;&#xD;&#xA;I've explored xTokens code and also many guides by Parity.&#xD;&#xA;&#xD;&#xA;Many thanks for any guidance!&#xD;&#xA;&#xD;&#xA;Another question: &#xD;&#xA;If the message is fixed, how do I execute it with executor? Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42581" PostHistoryTypeId="24" PostId="10680" RevisionGUID="6328a6b8-2cb6-4d1b-81ee-66deb2c5156e" CreationDate="2023-12-19T11:23:41.887" Comment="Proposed by 354 approved by 5017 edit id of 624" ContentLicense="CC BY-SA 4.0" />
  <row Id="42582" PostHistoryTypeId="2" PostId="10686" RevisionGUID="1ff265d4-04ac-443c-9428-039becab19a8" CreationDate="2023-12-19T12:04:10.937" UserId="555" Text="You can do this:&#xD;&#xA;&#xD;&#xA;``` rust&#xD;&#xA;let (_, price_no) = list.into_iter().find(|(k, _)| k.iter().copied().eq(&quot;price&quot;.chars()))?;&#xD;&#xA;			let p = match price_no {&#xD;&#xA;				JsonValue::Number(list) =&gt; list,&#xD;&#xA;				_ =&gt; return None,&#xD;&#xA;			};&#xD;&#xA;			let price = p.integer as u32;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42584" PostHistoryTypeId="2" PostId="10687" RevisionGUID="e70092e6-98d2-4c4b-ad43-9b58634c7389" CreationDate="2023-12-19T13:20:39.777" UserId="3395" Text="I defined a storage item as `StorageDoubleMap`, and I need to provide a method that returns the **list of elements with the first key (k1)**. This getter method has to be provided by the pallet. I found a [method][1] in frame that provides what I need. &#xD;&#xA;&#xD;&#xA;However, I'm aware that iterating over an unbounded storage item might lead to undesired behavior. Is there any recommendation or best practice to accomplish this?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/types/struct.StorageDoubleMap.html#method.iter_prefix" ContentLicense="CC BY-SA 4.0" />
  <row Id="42586" PostHistoryTypeId="1" PostId="10687" RevisionGUID="e70092e6-98d2-4c4b-ad43-9b58634c7389" CreationDate="2023-12-19T13:20:39.777" UserId="3395" Text="Concerns about returning all elements from a `StorageDoubleMap`" ContentLicense="CC BY-SA 4.0" />
  <row Id="42587" PostHistoryTypeId="3" PostId="10687" RevisionGUID="e70092e6-98d2-4c4b-ad43-9b58634c7389" CreationDate="2023-12-19T13:20:39.777" UserId="3395" Text="|storage|iteration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42588" PostHistoryTypeId="2" PostId="10688" RevisionGUID="d9858188-62a3-4da9-89eb-cf54e0998381" CreationDate="2023-12-19T14:32:00.617" UserId="377" Text="We are live as solochain with POA. Now we need to add new validator to the network for that we need to add the keys to the chain also. How we can do that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42590" PostHistoryTypeId="1" PostId="10688" RevisionGUID="d9858188-62a3-4da9-89eb-cf54e0998381" CreationDate="2023-12-19T14:32:00.617" UserId="377" Text="How we can add the new validator keys in Live POA solochain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42591" PostHistoryTypeId="3" PostId="10688" RevisionGUID="d9858188-62a3-4da9-89eb-cf54e0998381" CreationDate="2023-12-19T14:32:00.617" UserId="377" Text="|validator|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42592" PostHistoryTypeId="5" PostId="10688" RevisionGUID="d90cef03-0cce-4721-b364-30f0cec78e7a" CreationDate="2023-12-19T14:44:06.887" UserId="377" Comment="added 61 characters in body" Text="We are live as solochain with POA. Now we need to add new validator to the network for that we need to add the keys to the chain also. How we can do that?&#xD;&#xA;&#xD;&#xA;NOTE: Sessions pallet is not integrated yet on the chain." ContentLicense="CC BY-SA 4.0" />
  <row Id="42593" PostHistoryTypeId="52" PostId="10683" RevisionGUID="bd06d010-e183-4a49-9c8c-70fd128f2975" CreationDate="2023-12-19T16:35:39.797" />
  <row Id="42594" PostHistoryTypeId="2" PostId="10689" RevisionGUID="608d9b7e-0c62-4fcf-8728-06f8e7d8b0c7" CreationDate="2023-12-19T17:47:54.583" UserId="372" Text="You mean you have a live chain already running and you need to add authorities to the set? You need a specific pallet to manage that. Sessions could be _part_ of the solution. But even if you add sessions, you would still need a pallet that allows adding and removing authorities.&#xD;&#xA;&#xD;&#xA;You could write your own simple pallet to do this. Or you could use a complex pre-built thing like pallet staking." ContentLicense="CC BY-SA 4.0" />
  <row Id="42596" PostHistoryTypeId="5" PostId="10689" RevisionGUID="a6165284-e128-4818-84e7-53bc5d8b3c84" CreationDate="2023-12-19T18:31:07.797" UserId="372" Comment="added 166 characters in body" Text="You mean you have a live chain already running and you need to add authorities to the set? You need a specific pallet to manage that. Sessions could be _part_ of the solution. But even if you add sessions, you would still need a pallet that allows adding and removing authorities.&#xD;&#xA;&#xD;&#xA;You could write your own simple pallet to do this. Or you could use a complex pre-built thing like pallet staking.&#xD;&#xA;&#xD;&#xA;You may find this blog post interesting to cover the important aspects of what you are trying to do https://www.gautamdhameja.com/resilient-poa-network-substrate/" ContentLicense="CC BY-SA 4.0" />
  <row Id="42597" PostHistoryTypeId="2" PostId="10690" RevisionGUID="3e92cb52-0554-4dcc-abf1-572f50ea851b" CreationDate="2023-12-19T19:08:16.917" UserId="3331" Text="I upgraded my parachain runtime version from 1.0.0 to 1.5.0, but when trying to build a chain spec with the `--raw` flag, it gives me the following error: &#xD;&#xA;`Error: Service(Other(&quot;wasm call error Other: Exported method GenesisBuilder_create_default_config is not found&quot;))`&#xD;&#xA;&#xD;&#xA;Any ideas what might be causing it?   &#xD;&#xA;I'm using the version 1.73 of rustc and 1.71 (2023-05-22) of nightly.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;1.73.0-x86_64-unknown-linux-gnu (default)&#xD;&#xA;rustc 1.73.0 (cc66ad468 2023-10-03)&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42599" PostHistoryTypeId="1" PostId="10690" RevisionGUID="3e92cb52-0554-4dcc-abf1-572f50ea851b" CreationDate="2023-12-19T19:08:16.917" UserId="3331" Text="Building a chain specification with --raw, gives me &quot;wasm call error Other: Exported method GenesisBuilder_create_default_config is not found&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42600" PostHistoryTypeId="3" PostId="10690" RevisionGUID="3e92cb52-0554-4dcc-abf1-572f50ea851b" CreationDate="2023-12-19T19:08:16.917" UserId="3331" Text="|chainspec|build|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42601" PostHistoryTypeId="2" PostId="10691" RevisionGUID="8d52d025-9d12-4181-b543-f2e8ed1ff142" CreationDate="2023-12-19T19:36:23.320" UserId="3331" Text="I've found a fix, just reverted the changes in the `chain_spec.rs` file. I think the reason was in the changes of the testnet_genesis function.&#xD;&#xA;&#xD;&#xA;I'm using the cumulus parachain template as reference, https://github.com/paritytech/polkadot-sdk/tree/polkadot-v1.5.0/cumulus/parachain-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="42603" PostHistoryTypeId="5" PostId="10691" RevisionGUID="1ee04bab-dcb3-4054-a09a-65f9cb1d32b3" CreationDate="2023-12-19T19:44:18.523" UserId="3331" Comment="deleted 9 characters in body" Text="I've found a fix, just reverted the changes in the `chain_spec.rs` file. I think the reason was in the new `testnet_genesis` function.&#xD;&#xA;&#xD;&#xA;I'm using the cumulus parachain template as reference, https://github.com/paritytech/polkadot-sdk/tree/polkadot-v1.5.0/cumulus/parachain-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="42604" PostHistoryTypeId="52" PostId="10688" RevisionGUID="8672c9dc-9dee-48bb-947d-b1a3e9e8e926" CreationDate="2023-12-19T22:33:47.950" />
  <row Id="42605" PostHistoryTypeId="2" PostId="10692" RevisionGUID="86113c61-7775-4cc8-8b60-d02049f92931" CreationDate="2023-12-20T09:21:15.000" UserId="5021" Text="I am curious, does the current python library support Async operations ? For some reason, I am getting an __Aenter__ error when calling the substrate in python library.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="42607" PostHistoryTypeId="1" PostId="10692" RevisionGUID="86113c61-7775-4cc8-8b60-d02049f92931" CreationDate="2023-12-20T09:21:15.000" UserId="5021" Text="Async operations with substrate library in python" ContentLicense="CC BY-SA 4.0" />
  <row Id="42608" PostHistoryTypeId="3" PostId="10692" RevisionGUID="86113c61-7775-4cc8-8b60-d02049f92931" CreationDate="2023-12-20T09:21:15.000" UserId="5021" Text="|substrateinterface|python|async-backing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42609" PostHistoryTypeId="5" PostId="10676" RevisionGUID="5f144bf6-2377-4be3-9fa4-bfac4b1626a7" CreationDate="2023-12-20T10:22:11.943" UserId="354" Comment="improved formatting" Text="I'm writing a custom pallet that interacts with the NFTs pallet. In particular my custom pallet mints an NFT with metadata.&#xD;&#xA;&#xD;&#xA;Here is how the token is minted and metadata is set in the custom pallet:&#xD;&#xA;```rust&#xD;&#xA;T::Nfts::mint_into(&amp;T::ExperienceNFTCollectionId::get(), &amp;token_id, &amp;to, &amp;item_config, true)?;&#xD;&#xA;T::Nfts::set_item_metadata(None, &amp;T::ExperienceNFTCollectionId::get(), &amp;token_id, &amp;credential.encode())?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;In my test case I want to test the metadata. This isn't possible, because the data field of ItemMetaData is private.&#xD;&#xA;&#xD;&#xA;Here is how I try to get the metadata for testing in my custom pallet:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let metadata = ItemMetadataOf::&lt;Test&gt;::get(0, 0).unwrap();&#xD;&#xA;assert_eq!(metadata.data, bounded_vec![]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error I'm getting on the `assert_eq` line is: &#xD;&#xA;&#xD;&#xA;    field `data` of struct `ItemMetadata` is private&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If I'm not supposed to directly read the data field, then how am I supposed to test or work with the metadata I set?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42610" PostHistoryTypeId="24" PostId="10676" RevisionGUID="5f144bf6-2377-4be3-9fa4-bfac4b1626a7" CreationDate="2023-12-20T10:22:11.943" Comment="Proposed by 354 approved by 4556 edit id of 625" ContentLicense="CC BY-SA 4.0" />
  <row Id="42611" PostHistoryTypeId="2" PostId="10693" RevisionGUID="f56708ef-6d5d-4df3-8f90-4e8b9c39f282" CreationDate="2023-12-20T12:44:23.920" UserId="4556" Text="In a custom pallet I wrote an entry point that's supposed to be called by root. The purpose of the function is to create a collection with specific metadata at the NFTs pallet. I'm using dummy data in this post, in reality the metadata is much more than this. &#xD;&#xA;&#xD;&#xA;The idea is that no gas fee will be charged, however I'm not accomplishing that with this code. Tests fail, because the pallet's account (which is used as the owner of the collection) has no funds.&#xD;&#xA;&#xD;&#xA;Is there a way to ensure this function can be called without gas fees? If there is a better way to reach my goal then I'm also open to that. What matters is that the collections used by this pallet get created with specific metadata. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;		#[pallet::call_index(0)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::do_something())]&#xD;&#xA;		pub fn create_collections(origin: OriginFor&lt;T&gt;, admin: Option&lt;T::AccountId&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			// Check that the extrinsic was signed by root.&#xD;&#xA;			ensure_root(origin)?;			&#xD;&#xA;&#xD;&#xA;			let account_id = Self::account_id();&#xD;&#xA;			let admin = admin.unwrap_or(account_id.clone());&#xD;&#xA;&#xD;&#xA;			//== Experience credentials ==//&#xD;&#xA;			// Create collection&#xD;&#xA;			T::Nfts::create_collection_with_id(&#xD;&#xA;				T::ExperienceNFTCollectionId::get(), &#xD;&#xA;				&amp;account_id, &#xD;&#xA;				&amp;admin,&#xD;&#xA;				&amp;CollectionConfig {&#xD;&#xA;					settings: CollectionSettings::from_disabled(&#xD;&#xA;						CollectionSetting::TransferableItems | CollectionSetting::UnlockedMetadata&#xD;&#xA;					),&#xD;&#xA;					max_supply: None,&#xD;&#xA;					mint_settings: MintSettings::default(),&#xD;&#xA;				})?;&#xD;&#xA;&#xD;&#xA;			// Set collection metadata.&#xD;&#xA;			T::Nfts::set_collection_metadata(None, &amp;T::ExperienceNFTCollectionId::get(), &amp;[0,1])?;&#xD;&#xA;			&#xD;&#xA;			Ok(Pays::No.into())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42613" PostHistoryTypeId="1" PostId="10693" RevisionGUID="f56708ef-6d5d-4df3-8f90-4e8b9c39f282" CreationDate="2023-12-20T12:44:23.920" UserId="4556" Text="Call without gas fees" ContentLicense="CC BY-SA 4.0" />
  <row Id="42614" PostHistoryTypeId="3" PostId="10693" RevisionGUID="f56708ef-6d5d-4df3-8f90-4e8b9c39f282" CreationDate="2023-12-20T12:44:23.920" UserId="4556" Text="|substrate-node-template|nft|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42615" PostHistoryTypeId="2" PostId="10694" RevisionGUID="2d08f6c3-0419-4ea0-aca0-bfbb8a596e3a" CreationDate="2023-12-20T12:47:59.263" UserId="5022" Text="[![enter image description here][1]][1]&#xD;&#xA;While im running the parachain , its not not producing any blocks, but its showing the stat collation in logs&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3WGHR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42617" PostHistoryTypeId="1" PostId="10694" RevisionGUID="2d08f6c3-0419-4ea0-aca0-bfbb8a596e3a" CreationDate="2023-12-20T12:47:59.263" UserId="5022" Text="Parachain didn't produce blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="42618" PostHistoryTypeId="3" PostId="10694" RevisionGUID="2d08f6c3-0419-4ea0-aca0-bfbb8a596e3a" CreationDate="2023-12-20T12:47:59.263" UserId="5022" Text="|parachain|learning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42619" PostHistoryTypeId="5" PostId="10694" RevisionGUID="d53893c6-3a0e-4440-8e29-5d393617b304" CreationDate="2023-12-20T12:48:38.980" UserId="5022" Comment="added 61 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;While im running the parachain , its not not producing any blocks, but its showing the stat collation in logs. im using docker containers for running relay and parachains&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3WGHR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42620" PostHistoryTypeId="5" PostId="10694" RevisionGUID="60599f9a-ee38-4886-a17d-85d537d514dd" CreationDate="2023-12-20T12:49:22.820" UserId="5022" Comment="added 52 characters in body" Text="[![enter image description here][1]][1]&#xD;&#xA;While im running the parachain , its not not producing any blocks, but its showing the stat collation in logs. im using docker containers for running relay and parachains. polkadot v1.0.0 and pokadot-parachain:1.0.0  image&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/3WGHR.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42621" PostHistoryTypeId="5" PostId="10691" RevisionGUID="7af28e4d-0950-4c9e-ac00-62a63afaf1be" CreationDate="2023-12-20T15:16:49.337" UserId="3331" Comment="Found the real cause of the issue" Text="[edit]&#xD;&#xA;I found the real reason, the `impl_runtime_apis!` macro in the runtime `lib.rs` file, have a new trait implementation exposing the missing method.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl sp_genesis_builder::GenesisBuilder&lt;Block&gt; for Runtime {&#xD;&#xA;		fn create_default_config() -&gt; Vec&lt;u8&gt; {&#xD;&#xA;			create_default_config::&lt;RuntimeGenesisConfig&gt;()&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn build_config(config: Vec&lt;u8&gt;) -&gt; sp_genesis_builder::Result {&#xD;&#xA;			build_config::&lt;RuntimeGenesisConfig&gt;(config)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm using the cumulus parachain template as reference, https://github.com/paritytech/polkadot-sdk/tree/polkadot-v1.5.0/cumulus/parachain-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="42622" PostHistoryTypeId="2" PostId="10695" RevisionGUID="1a1c62d7-6b7a-49e0-bfcf-e73f8cc2c7aa" CreationDate="2023-12-20T15:39:13.817" UserId="4794" Text="In the susbtrate, How to use a component of a pallet in other pallets, how to refer them?&#xD;&#xA;For example,&#xD;&#xA;- How is the Balance in pallet balance used in pallet staking? or in a custom pallet template?&#xD;&#xA;And What is the function to change criteria of next authorities selection?&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42624" PostHistoryTypeId="1" PostId="10695" RevisionGUID="1a1c62d7-6b7a-49e0-bfcf-e73f8cc2c7aa" CreationDate="2023-12-20T15:39:13.817" UserId="4794" Text="How to define the connection between pallets?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42625" PostHistoryTypeId="3" PostId="10695" RevisionGUID="1a1c62d7-6b7a-49e0-bfcf-e73f8cc2c7aa" CreationDate="2023-12-20T15:39:13.817" UserId="4794" Text="|staking|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42626" PostHistoryTypeId="50" PostId="10436" RevisionGUID="8d8956cc-b620-4560-bb42-65a74d7827a5" CreationDate="2023-12-20T21:00:55.130" UserId="-1" />
  <row Id="42630" PostHistoryTypeId="2" PostId="10696" RevisionGUID="61656752-f1a4-4593-bb92-5bbc035ff170" CreationDate="2023-12-21T04:54:35.137" UserId="354" Text=" &#xD;&#xA;&#xD;&#xA;&gt; how to use a component of a pallet in other pallets, how to refer&#xD;&#xA;&gt; them?&#xD;&#xA;&#xD;&#xA;To call functionalities or use storages or types of one to another, you need to do coupling of pallets, either loose coupling of tight coupling. For coupling of pallets you can refer to [https://docs.substrate.io/build/pallet-coupling/][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/pallet-coupling/" ContentLicense="CC BY-SA 4.0" />
  <row Id="42632" PostHistoryTypeId="2" PostId="10697" RevisionGUID="0cf9ea76-6788-4d72-bb59-a64ff4ae1d3e" CreationDate="2023-12-21T05:03:19.133" UserId="354" Text="You can refer to this post https://substrate.stackexchange.com/questions/1713/how-we-can-implement-gasless-feeless-transaction/1715#1715 and you can also try the following code it might help you.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;        #[pallet::call_index(0)]&#xD;&#xA;        #[pallet::weight(Pays::No)]&#xD;&#xA;        pub fn create_collections(origin: OriginFor&lt;T&gt;, admin: Option&lt;T::AccountId&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;            // Check that the extrinsic was signed by root.&#xD;&#xA;            ensure_root(origin)?;           &#xD;&#xA;&#xD;&#xA;            let account_id = Self::account_id();&#xD;&#xA;            let admin = admin.unwrap_or(account_id.clone());&#xD;&#xA;&#xD;&#xA;            //== Experience credentials ==//&#xD;&#xA;            // Create collection&#xD;&#xA;            T::Nfts::create_collection_with_id(&#xD;&#xA;                T::ExperienceNFTCollectionId::get(), &#xD;&#xA;                &amp;account_id, &#xD;&#xA;                &amp;admin,&#xD;&#xA;                &amp;CollectionConfig {&#xD;&#xA;                    settings: CollectionSettings::from_disabled(&#xD;&#xA;                        CollectionSetting::TransferableItems | CollectionSetting::UnlockedMetadata&#xD;&#xA;                    ),&#xD;&#xA;                    max_supply: None,&#xD;&#xA;                    mint_settings: MintSettings::default(),&#xD;&#xA;                })?;&#xD;&#xA;&#xD;&#xA;            // Set collection metadata.&#xD;&#xA;            T::Nfts::set_collection_metadata(None, &amp;T::ExperienceNFTCollectionId::get(), &amp;[0,1])?;&#xD;&#xA;            &#xD;&#xA;            Ok(())&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="42634" PostHistoryTypeId="50" PostId="6312" RevisionGUID="6e6a7a58-3ea0-403a-a8f7-8d2c3efb6c33" CreationDate="2023-12-21T07:03:00.380" UserId="-1" />
  <row Id="42635" PostHistoryTypeId="50" PostId="9358" RevisionGUID="29867c37-9f0d-4b67-9552-f21d08c76a56" CreationDate="2023-12-21T08:02:40.310" UserId="-1" />
  <row Id="42636" PostHistoryTypeId="5" PostId="10693" RevisionGUID="87d5f018-91be-4eae-84be-d440375fd256" CreationDate="2023-12-21T08:37:08.360" UserId="354" Comment="improved formatting" Text="In a custom pallet I wrote an entry point that's supposed to be called by root. The purpose of the function is to create a collection with specific metadata at the NFTs pallet. I am using dummy data in this post, in reality the metadata is much more than this. &#xD;&#xA;&#xD;&#xA;The idea is that no gas fee will be charged, however I am not accomplishing that with this code. Tests fail, because the pallet's account (which is used as the owner of the collection) has no funds.&#xD;&#xA;&#xD;&#xA;Is there a way to ensure this function can be called without gas fees? If there is a better way to reach my goal then I'm also open to that. What matters is that the collections used by this pallet get created with specific metadata. &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;		#[pallet::call_index(0)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::do_something())]&#xD;&#xA;		pub fn create_collections(origin: OriginFor&lt;T&gt;, admin: Option&lt;T::AccountId&gt;) -&gt; DispatchResultWithPostInfo {&#xD;&#xA;			// Check that the extrinsic was signed by root.&#xD;&#xA;			ensure_root(origin)?;			&#xD;&#xA;&#xD;&#xA;			let account_id = Self::account_id();&#xD;&#xA;			let admin = admin.unwrap_or(account_id.clone());&#xD;&#xA;&#xD;&#xA;			//== Experience credentials ==//&#xD;&#xA;			// Create collection&#xD;&#xA;			T::Nfts::create_collection_with_id(&#xD;&#xA;				T::ExperienceNFTCollectionId::get(), &#xD;&#xA;				&amp;account_id, &#xD;&#xA;				&amp;admin,&#xD;&#xA;				&amp;CollectionConfig {&#xD;&#xA;					settings: CollectionSettings::from_disabled(&#xD;&#xA;						CollectionSetting::TransferableItems | CollectionSetting::UnlockedMetadata&#xD;&#xA;					),&#xD;&#xA;					max_supply: None,&#xD;&#xA;					mint_settings: MintSettings::default(),&#xD;&#xA;				})?;&#xD;&#xA;&#xD;&#xA;			// Set collection metadata.&#xD;&#xA;			T::Nfts::set_collection_metadata(None, &amp;T::ExperienceNFTCollectionId::get(), &amp;[0,1])?;&#xD;&#xA;			&#xD;&#xA;			Ok(Pays::No.into())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42637" PostHistoryTypeId="24" PostId="10693" RevisionGUID="87d5f018-91be-4eae-84be-d440375fd256" CreationDate="2023-12-21T08:37:08.360" Comment="Proposed by 354 approved by 4556 edit id of 628" ContentLicense="CC BY-SA 4.0" />
  <row Id="42638" PostHistoryTypeId="2" PostId="10698" RevisionGUID="76187de7-eafa-4a3c-b7c9-534c62bcd833" CreationDate="2023-12-21T10:39:22.340" UserId="213" Text="Is it okay to share the secret access key for ipfs upload (e.g. crust network or 4everland) with the client frontend? It's also possible to delete the key from the ipfs service provider. To hide the secret access key one needs a centralized server which is undesirable. " ContentLicense="CC BY-SA 4.0" />
  <row Id="42640" PostHistoryTypeId="1" PostId="10698" RevisionGUID="76187de7-eafa-4a3c-b7c9-534c62bcd833" CreationDate="2023-12-21T10:39:22.340" UserId="213" Text="How to handle ipfs credentials?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42641" PostHistoryTypeId="3" PostId="10698" RevisionGUID="76187de7-eafa-4a3c-b7c9-534c62bcd833" CreationDate="2023-12-21T10:39:22.340" UserId="213" Text="|ipfs|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42647" PostHistoryTypeId="5" PostId="10695" RevisionGUID="ebef127d-648a-4f4e-99e4-34d49ed70bac" CreationDate="2023-12-21T11:52:35.997" UserId="354" Comment="corrected spelling, fixed grammar and improved formatting" Text="In susbtrate, how to use a component of a pallet in other pallets, how to refer them?&#xD;&#xA;For example,&#xD;&#xA;- How is the Balance in `pallet-balances` used in `pallet-staking`? Or in a custom pallet template?&#xD;&#xA;&#xD;&#xA;- And What is the function to change criteria of next authorities selection?&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42648" PostHistoryTypeId="24" PostId="10695" RevisionGUID="ebef127d-648a-4f4e-99e4-34d49ed70bac" CreationDate="2023-12-21T11:52:35.997" Comment="Proposed by 354 approved by 4794 edit id of 627" ContentLicense="CC BY-SA 4.0" />
  <row Id="42649" PostHistoryTypeId="5" PostId="10695" RevisionGUID="e2d818cb-04b6-450f-9c75-d66675957591" CreationDate="2023-12-21T11:53:41.210" UserId="4794" Comment="deleted 9 characters in body" Text="In susbtrate, how to use a component of a pallet in other pallets, how to refer them?&#xD;&#xA;For example,&#xD;&#xA;- How is the Balance in `pallet-balances` used in `pallet-staking`? Or in a custom pallet template?&#xD;&#xA;&#xD;&#xA;- And What is the function of selecting next authorities selection?&#xD;&#xA;&#xD;&#xA;Thanks.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42650" PostHistoryTypeId="50" PostId="9040" RevisionGUID="cc5cae4d-888b-496d-af47-1700def09e4e" CreationDate="2023-12-21T13:04:45.527" UserId="-1" />
  <row Id="42651" PostHistoryTypeId="2" PostId="10700" RevisionGUID="cde5c50a-8f62-4922-b32e-04b08ce7ad2c" CreationDate="2023-12-21T13:30:22.030" UserId="2348" Text="i am using polkadot(1.1.0) version . i am trying to use referendum in it  when i submit proposal it is showing  time(voting period) . how to changes that voting period value  in it." ContentLicense="CC BY-SA 4.0" />
  <row Id="42653" PostHistoryTypeId="1" PostId="10700" RevisionGUID="cde5c50a-8f62-4922-b32e-04b08ce7ad2c" CreationDate="2023-12-21T13:30:22.030" UserId="2348" Text="How to change referenda voting period in openGov?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42654" PostHistoryTypeId="3" PostId="10700" RevisionGUID="cde5c50a-8f62-4922-b32e-04b08ce7ad2c" CreationDate="2023-12-21T13:30:22.030" UserId="2348" Text="|opengov|referendum|pokadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42655" PostHistoryTypeId="50" PostId="10471" RevisionGUID="490db3a3-ace3-489e-88fa-a98e6b08b205" CreationDate="2023-12-21T14:02:40.300" UserId="-1" />
  <row Id="42656" PostHistoryTypeId="50" PostId="8353" RevisionGUID="ce548be0-ee85-4a14-a9a3-a575c8039435" CreationDate="2023-12-21T15:07:50.913" UserId="-1" />
  <row Id="42657" PostHistoryTypeId="34" PostId="10606" RevisionGUID="c56163c7-233b-4af2-9015-5087698a5974" CreationDate="2023-12-21T16:04:15.520" UserId="-1" Comment="38" />
  <row Id="42658" PostHistoryTypeId="2" PostId="10701" RevisionGUID="a18e2b58-3d1c-46af-bf04-bd4a5600944b" CreationDate="2023-12-21T16:54:48.223" UserId="213" Text="With 4EVER Security Token Service API one can pass in custom policy for better access control, which are fully compatible with AWS S3 STS!&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;https://docs.4everland.org/storage/bucket/4ever-security-token-service-api" ContentLicense="CC BY-SA 4.0" />
  <row Id="42660" PostHistoryTypeId="2" PostId="10702" RevisionGUID="f67674ad-64ac-4f09-97c9-120b97cbe166" CreationDate="2023-12-21T17:51:19.753" UserId="251" Text="Simply adjust this value.&#xD;&#xA;&#xD;&#xA;The time for making a decision is referred to as the voting period.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/18d53dbf91e90c48d535c3e1f59a3383b569bdb3/substrate/bin/node/runtime/src/lib.rs#L939C5-L939C5" ContentLicense="CC BY-SA 4.0" />
  <row Id="42662" PostHistoryTypeId="2" PostId="10703" RevisionGUID="de5dc0ad-3ae4-41b8-bbf2-adc2f91241c1" CreationDate="2023-12-22T01:12:21.577" UserId="5028" Text="I am developing a wallet using Rust and I want to be compatible with Polkadot JS's import/export functionality. I know that Polkadot JS uses the ed25519 extended mode for sr25519 private keys. So, I use SecretKey::from_ed25519_bytes to obtain the private key. However, when I export it again, it returns a different value. The example value is as follows:&#xD;&#xA;```&#xD;&#xA;value imported: &quot;0x476c696365202020202020202020202020202020202020202020202020202020d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f&quot;;&#xD;&#xA;value exported: &quot;0x406c696365202020202020202020202020202020202020202020202020202020d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;I understand that this change occurs because when converting from ed25519 to sr25519 form, it divides by a cofactor, and when converting back, it multiplies by a cofactor and applies masking.  &#xD;&#xA;I would like to know if this usage method is secure enough and if it could potentially result in collisions between some users' private keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="42664" PostHistoryTypeId="1" PostId="10703" RevisionGUID="de5dc0ad-3ae4-41b8-bbf2-adc2f91241c1" CreationDate="2023-12-22T01:12:21.577" UserId="5028" Text="Is it secure enough use an Ed25519 expanded secret key which converted from a sr25519 key" ContentLicense="CC BY-SA 4.0" />
  <row Id="42665" PostHistoryTypeId="3" PostId="10703" RevisionGUID="de5dc0ad-3ae4-41b8-bbf2-adc2f91241c1" CreationDate="2023-12-22T01:12:21.577" UserId="5028" Text="|polkadot-js|wallet|security|sr25519|ed25519|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42666" PostHistoryTypeId="5" PostId="10696" RevisionGUID="3d54fc8a-5eec-4434-9cf3-fa199ddf20a0" CreationDate="2023-12-22T05:11:25.323" UserId="354" Comment="added 796 characters in body" Text=" &#xD;&#xA;&#xD;&#xA;&gt; how to use a component of a pallet in other pallets, how to refer&#xD;&#xA;&gt; them?&#xD;&#xA;&#xD;&#xA;To call functionalities or use storages or types of one to another, you need to do coupling of pallets, either loose coupling of tight coupling. For coupling of pallets you can refer to [https://docs.substrate.io/build/pallet-coupling/][1]&#xD;&#xA;&#xD;&#xA;&gt; And What is the function of selecting next authorities selection?&#xD;&#xA;&#xD;&#xA;The election of authorities is defined in [election-porvider-support][2], in that you can check [onchain.rs][3] file that contains the logic for how onchain election occurs here [https://github.com/paritytech/polkadot-sdk/blob/32c047af388984f8cae432359d398ed895c758e1/substrate/frame/election-provider-support/src/onchain.rs#L99-L146][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/pallet-coupling/&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/election-provider-support&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/election-provider-support/src/onchain.rs&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/blob/32c047af388984f8cae432359d398ed895c758e1/substrate/frame/election-provider-support/src/onchain.rs#L99-L146" ContentLicense="CC BY-SA 4.0" />
  <row Id="42667" PostHistoryTypeId="5" PostId="10703" RevisionGUID="846dc6c1-747e-4306-9177-433d70100740" CreationDate="2023-12-22T05:25:13.710" UserId="354" Comment="fixed grammar and improved formatting" Text="I am developing a wallet using Rust and I want it to be compatible with `polkadot-js` import/export functionality. I know that `polkadot-js` uses the `ed25519` extended mode for `sr25519` private keys. So, I use `SecretKey::from_ed25519_bytes` to obtain the private key. However, when I export it again, it returns a different value. The example value is as follows:&#xD;&#xA;```&#xD;&#xA;value imported: &quot;0x476c696365202020202020202020202020202020202020202020202020202020d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f&quot;;&#xD;&#xA;value exported: &quot;0x406c696365202020202020202020202020202020202020202020202020202020d172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;I understand that this change occurs because when converting from `ed25519` to `sr25519` form, it divides by a cofactor, and when converting back, it multiplies by a cofactor and applies masking.  &#xD;&#xA;I would like to know if this usage method is secure enough and if it could potentially result in collisions between some users' private keys." ContentLicense="CC BY-SA 4.0" />
  <row Id="42668" PostHistoryTypeId="2" PostId="10704" RevisionGUID="03b1481f-67ad-45a1-bceb-e0b9e23ec353" CreationDate="2023-12-22T12:23:52.913" UserId="2762" Text="Quick answer, for your use case is better to use XCM Emulator with the relay chain and parachains runtimes.&#xD;&#xA;&#xD;&#xA;From the [XCM Docs][1]&#xD;&#xA;The `xcm-emulator` is a tool to emulate XCM program execution using pre-configured runtimes, including those used to run on live networks, such as Kusama, Polkadot, Statemine, etc. This allows for testing cross-chain message passing and verifying outcomes, weights, and side-effects.&#xD;&#xA;&#xD;&#xA;While the the `xcm-simulator` is a tool to quickly test the execution of various XCM instructions against the xcm-executor.&#xD;&#xA;&#xD;&#xA;If can want to go more in deep with both, I recommend check this video: [XCM Simulator &amp; xcm-emulator for parachain integration testing][2] tak&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/xcm-docs/testing/index.html&#xD;&#xA;  [2]: https://www.youtube.com/watch?v=HJo9SO1CAEQ" ContentLicense="CC BY-SA 4.0" />
  <row Id="42670" PostHistoryTypeId="50" PostId="10490" RevisionGUID="99826285-4d31-409b-a1a2-30fc6be38f87" CreationDate="2023-12-22T13:07:10.840" UserId="-1" />
  <row Id="42671" PostHistoryTypeId="50" PostId="10494" RevisionGUID="5e84d973-68cc-4c3b-abbe-5a70e78ca429" CreationDate="2023-12-22T17:03:35.420" UserId="-1" />
  <row Id="42672" PostHistoryTypeId="5" PostId="10687" RevisionGUID="bda220fb-a1ee-40a7-99f6-93e78c13ab92" CreationDate="2023-12-22T21:39:56.663" UserId="3395" Comment="added 162 characters in body" Text="I defined a storage item as `StorageDoubleMap`, and I need to provide a method that returns the **list of elements with the first key (k1)**. This getter method has to be provided by the pallet. I found a [method][1] in frame that provides what I need. &#xD;&#xA;&#xD;&#xA;However, I'm aware that iterating over an unbounded storage item might lead to undesired behavior. Is there any recommendation or best practice to accomplish this?&#xD;&#xA;&#xD;&#xA;EDIT: The use case is to provide a way to iterate over the collection in a safe manner. Let's imagine this collection of items is consulted by another pallet.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/types/struct.StorageDoubleMap.html#method.iter_prefix" ContentLicense="CC BY-SA 4.0" />
  <row Id="42677" PostHistoryTypeId="2" PostId="10705" RevisionGUID="8a6ade21-d6b0-4b79-8f3e-ae8d3f649633" CreationDate="2023-12-23T02:18:47.177" UserId="28" Text="I am trying to create a reserve transfer assets call from a relay chain like Kusama to a Parachain.&#xD;&#xA;&#xD;&#xA;To do this, I need to:&#xD;&#xA;&#xD;&#xA;- connect to the relay chain with Polkadot JS API&#xD;&#xA;- construct the XCM types required by the reserve asset transfer function&#xD;&#xA;- submit an extrinsic to trigger that xcm, preferably using an account from the Polkadot JS Extension&#xD;&#xA;&#xD;&#xA;What is a minimal working example of this process using XCM V2 syntax?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42679" PostHistoryTypeId="1" PostId="10705" RevisionGUID="8a6ade21-d6b0-4b79-8f3e-ae8d3f649633" CreationDate="2023-12-23T02:18:47.177" UserId="28" Text="How can you use Polkadot JS API to Create an XCM Reserve Transfer Assets? (XCM V2)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42680" PostHistoryTypeId="3" PostId="10705" RevisionGUID="8a6ade21-d6b0-4b79-8f3e-ae8d3f649633" CreationDate="2023-12-23T02:18:47.177" UserId="28" Text="|polkadot-js|xcm|types|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42681" PostHistoryTypeId="2" PostId="10706" RevisionGUID="b8f74dde-08e1-444c-b305-6961b8b8f94c" CreationDate="2023-12-23T02:18:47.177" UserId="28" Text="This can all be done in a simple, pure JavaScript example.&#xD;&#xA;&#xD;&#xA;Start with a minimal HTML page with the necessary Polkadot JS imports:&#xD;&#xA;&#xD;&#xA;**index.html**&#xD;&#xA;&#xD;&#xA;```html&#xD;&#xA;&lt;!doctype html&gt;&#xD;&#xA;&lt;html lang=&quot;en&quot;&gt;&#xD;&#xA;&#xD;&#xA;&lt;body&gt;&#xD;&#xA;	&lt;h1&gt;Simple XCM Example&lt;/h1&gt;&#xD;&#xA;	&lt;button onclick=&quot;submitXcm()&quot;&gt;Submit an XCM Transaction&lt;/button&gt;&#xD;&#xA;&#xD;&#xA;	&lt;script src=&quot;//unpkg.com/@polkadot/util/bundle-polkadot-util.js&quot;&gt;&lt;/script&gt;&#xD;&#xA;	&lt;script src=&quot;//unpkg.com/@polkadot/util-crypto/bundle-polkadot-util-crypto.js&quot;&gt;&lt;/script&gt;&#xD;&#xA;	&lt;script src=&quot;//unpkg.com/@polkadot/types/bundle-polkadot-types.js&quot;&gt;&lt;/script&gt;&#xD;&#xA;	&lt;script src=&quot;//unpkg.com/@polkadot/api/bundle-polkadot-api.js&quot;&gt;&lt;/script&gt;&#xD;&#xA;	&lt;script src=&quot;//unpkg.com/@polkadot/extension-dapp/bundle-polkadot-extension-dapp.js&quot;&gt;&lt;/script&gt;&#xD;&#xA;	&lt;!-- Our Custom JavaScript --&gt;&#xD;&#xA;	&lt;script src=&quot;./index.js&quot;&gt;&lt;/script&gt;&#xD;&#xA;&lt;/body&gt;&#xD;&#xA;&#xD;&#xA;&lt;/html&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then create an `index.js` file where we will do most of our work.&#xD;&#xA;&#xD;&#xA;## Connect to Polkadot JS API&#xD;&#xA;&#xD;&#xA;To establish a basic connection to Polkadot JS, we can follow the templates found in the docs: https://polkadot.js.org/docs/&#xD;&#xA;&#xD;&#xA;**index.js**&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const { WsProvider, ApiPromise } = polkadotApi;&#xD;&#xA;// We will use these later to access the Polkadot JS Extension&#xD;&#xA;const { web3FromAddress, web3Enable } = polkadotExtensionDapp;&#xD;&#xA;&#xD;&#xA;async function submitXcm() {&#xD;&#xA;  const provider = new WsProvider('wss://kusama-rpc.polkadot.io');&#xD;&#xA;  const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;  console.log('connected:', api.genesisHash.toHex());&#xD;&#xA;&#xD;&#xA;  // We will add the code described below here...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Create MultiLocation for Parachain Destination&#xD;&#xA;The first trick to make this work is using `api.createType` to allow Polkadot JS API to create all the concrete types you need.&#xD;&#xA;&#xD;&#xA;Another trick is to make this all work is to use the `XcmVersioned...` types, not the direct `MultiLocation` type. In this case, you have to control which version of `MultiLocation` you want to use, but this is better.&#xD;&#xA;&#xD;&#xA;Make sure that all of your constructed types use the same XCM version.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  const parachainId = 3338;&#xD;&#xA;  const destination = api.createType('XcmVersionedMultiLocation', {&#xD;&#xA;    V2: {&#xD;&#xA;      parents: '0',&#xD;&#xA;      interior: {&#xD;&#xA;        X1: { Parachain: parachainId },&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;From the perspective of the relay chain, you locate a parachain with `parent: 0` and a single junction (`X1`) directly to the `Parachain` with `parachainId`.&#xD;&#xA;&#xD;&#xA;## Create a Beneficiary Location (Receiving Address)&#xD;&#xA;&#xD;&#xA;In this scenario, we are reserve transferring KSM from the Kusama relay chain to a Parachain. We want to receive the credit for the reserve backed KSM on the parachain, so we need to figure out OUR MultiLocation.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  let address = 'EGVQCe73TpFyAZx5uKfE1222XfkT3BSKozjgcqzLBnc5eYo';&#xD;&#xA;  let accountId = api.createType('AccountId', address);&#xD;&#xA;&#xD;&#xA;  const beneficiary = api.createType('XcmVersionedMultiLocation', {&#xD;&#xA;    V2: {&#xD;&#xA;      parents: '0',&#xD;&#xA;      interior: {&#xD;&#xA;        X1: {&#xD;&#xA;          AccountId32: {&#xD;&#xA;            network: 'Any',&#xD;&#xA;            id: accountId.toHex(),&#xD;&#xA;          },&#xD;&#xA;        },&#xD;&#xA;      },&#xD;&#xA;    },&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Some tricks here are:&#xD;&#xA;&#xD;&#xA;- Again, using `createType` and `XcmVersioned...` with a specific version number for constructing the types.&#xD;&#xA;- Passing in the `address` as a bytes represented by Hex. This is easy to do by creating an `AccountId` type, and calling `toHex()`.&#xD;&#xA;&#xD;&#xA;I believe this object is from the perspective of the parachain, thus the benificiary has 0 parents (since we are already in the perspective of the parachain) and directly references the `AccountId32` from a single junction (`X1`).&#xD;&#xA;&#xD;&#xA;## Create the KSM MultiAsset&#xD;&#xA;&#xD;&#xA;We need to also specify which asset we are transferring, and for this we need to create a `MultiAssets` type. Note that this is **plural**, so it expects a vector of `MultiAsset`, but we are only doing one here anyway.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  // 1 KSM = 10^12, this is .1 KSM&#xD;&#xA;  const amount = 100000000000;&#xD;&#xA;  const assets = api.createType('XcmVersionedMultiAssets', {&#xD;&#xA;    V2: [&#xD;&#xA;      {&#xD;&#xA;        id: {&#xD;&#xA;          Concrete: {&#xD;&#xA;            parents: 0,&#xD;&#xA;            interior: {&#xD;&#xA;              Here: '',&#xD;&#xA;            },&#xD;&#xA;          },&#xD;&#xA;        },&#xD;&#xA;        fun: {&#xD;&#xA;          Fungible: amount,&#xD;&#xA;        },&#xD;&#xA;      },&#xD;&#xA;    ],&#xD;&#xA;  });&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;We are again in the context of the relay chain, so the KSM asset is the `Concrete` asset with `parents: 0` and `Here`. KSM is a fungible token, so we can specify how much of it we want to reserve transfer using `Fungible` and a number. In this case, we are doing 10^11 which is 0.1 KSM due to the fixed point math.&#xD;&#xA;&#xD;&#xA;## Selecting the Fee Asset Item&#xD;&#xA;&#xD;&#xA;We need to pay fees for our XCM and we can choose which asset we want to pay with. Since we only have one asset in this example, the `fee_asset_item` is indexed to `0`. You can imagine if you were transferring multiple assets at a time, you could select a different asset index based on the `MultiAssets` you constructed.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  const fee_asset_item = '0';&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Constructing a Weight Limit&#xD;&#xA;&#xD;&#xA;While this is not best practice, the easiest thing to do when making a reserve transfer is to set the `weight_limit` to `Unlimited`. You do risk burning a lot of assets to weight fees in the case that the calculated weight is very high, but generally speaking this shouldn't be the case, and really is up to the parachain to ensure that things are correct.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  const weight_limit = 'Unlimited';&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Constructing our XCM Pallet Call&#xD;&#xA;&#xD;&#xA;These different variables were exactly what we needed to create our `limitedReserveTransferAssets` call. We just plug it all in:&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  const call = api.tx.xcmPallet.limitedReserveTransferAssets(&#xD;&#xA;    destination,&#xD;&#xA;    beneficiary,&#xD;&#xA;    assets,&#xD;&#xA;    fee_asset_item,&#xD;&#xA;    weight_limit&#xD;&#xA;  );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;## Signing and Submitting our Call with Polkadot JS Extension&#xD;&#xA;&#xD;&#xA;Earlier, we selected an address to be the beneficiary of this XCM Reserve Transfer. We are assuming that this same address will also be the person initiating the transfer on Kusama itself.&#xD;&#xA;&#xD;&#xA;We also assume that whoever is running this JS has already imported this account into their extension. Of course you can add fancy UI to query the available accounts in the extension and let the user select from them, but for this minimal example, we will just keep things hardcoded.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;  await web3Enable('xcm js example');&#xD;&#xA;  const injector = await web3FromAddress(address);&#xD;&#xA;&#xD;&#xA;  const unsubscribe = await call.signAndSend(&#xD;&#xA;    address,&#xD;&#xA;    { signer: injector.signer },&#xD;&#xA;    ({ status }) =&gt; {&#xD;&#xA;      console.log(`Current status is ${status}`);&#xD;&#xA;&#xD;&#xA;      if (status.isInBlock) {&#xD;&#xA;        console.log(`Transaction included at blockHash ${status.asInBlock}`);&#xD;&#xA;      } else if (status.isFinalized) {&#xD;&#xA;        console.log(`Transaction finalized at blockHash ${status.asFinalized}`);&#xD;&#xA;        unsubscribe();&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  );&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Tricks here:&#xD;&#xA;&#xD;&#xA;- Before we can access the `injector` for our address, we must first call `web3Enable` which prompts the user to allow the website to access your Polkadot Extension. The name you choose there will be what the user sees when they are deciding to accept access.&#xD;&#xA;- Then we obtain an `injector` for the `address` we want to sign with. Of course this will only work if the account is imported into the extension.&#xD;&#xA;- Then we sign and submit our call, using our injector, and keeping track of the status until it is finalized, at which point you should see your reserved back asset on the parachain.&#xD;&#xA;&#xD;&#xA;For more documentation about interacting with the extension check out: https://polkadot.js.org/docs/extension/cookbook#get-all-extensions-accounts&#xD;&#xA;&#xD;&#xA;## Final View&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/dOcko.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42683" PostHistoryTypeId="2" PostId="10707" RevisionGUID="047b3ff9-061c-45b3-97a1-973169a6dba5" CreationDate="2023-12-23T11:53:49.283" UserId="94" Text="There are two functions called `iter_prefix` and `iter_prefix_from` in the `StorageDoubleMap` that can be used for this.  &#xD;&#xA;The `iter_prefix_from` takes a previous key and resume iteration at that spot. So each time after iterating x keys, the last key is stored and in the next block the iteration can be resumed. &#xD;&#xA;&#xD;&#xA;The tricky part it that iterating through a map should only be done while the map is not being modified. So possibly you need to add some locking mechanism or somehow differently ensure that the map will not have insert/deletes while it is being iterated.  &#xD;&#xA;AFAIK it still &quot;works&quot;, but i think its not tested for and generally bad practice." ContentLicense="CC BY-SA 4.0" />
  <row Id="42685" PostHistoryTypeId="2" PostId="10708" RevisionGUID="6437848e-a31b-492e-8199-0fa1153763e4" CreationDate="2023-12-23T19:59:28.247" UserId="5017" Text="Suppose we have a message that transfers encoded call that looks as follows:&#xD;&#xA;&#xD;&#xA;`call = Self::MintNickname.encode().into()`&#xD;&#xA;&#xD;&#xA;How do we transfer it to another parachain via XCM in Rust snippet?&#xD;&#xA;Another chain has the same pallet so it knows which call to perform." ContentLicense="CC BY-SA 4.0" />
  <row Id="42687" PostHistoryTypeId="1" PostId="10708" RevisionGUID="6437848e-a31b-492e-8199-0fa1153763e4" CreationDate="2023-12-23T19:59:28.247" UserId="5017" Text="How to construct XCM message that transfers custom encoded call" ContentLicense="CC BY-SA 4.0" />
  <row Id="42688" PostHistoryTypeId="3" PostId="10708" RevisionGUID="6437848e-a31b-492e-8199-0fa1153763e4" CreationDate="2023-12-23T19:59:28.247" UserId="5017" Text="|xcm|xcmp|cross-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42689" PostHistoryTypeId="2" PostId="10709" RevisionGUID="bbb2b581-8caf-4323-8ec0-fa91957363a7" CreationDate="2023-12-24T12:04:56.170" UserId="2455" Text="I am running relay chain based on polkadot-v0.9.40 and I have a connected parachain. I am getting the following error for a couple of days now on the Validator nodes.&#xD;&#xA;&#xD;&#xA;    2023-12-24 11:51:12 New dispute initiated for candidate. candidate_hash=0x81ba3f030282452844806ce5e7c7890d15b8a53131837aa3bc741640e66a182e session=13462 traceID=172437456702207600103813242361215420685&#xD;&#xA;    2023-12-24 11:51:12 Dispute on candidate concluded with 'valid' result candidate_hash=0x81ba3f030282452844806ce5e7c7890d15b8a53131837aa3bc741640e66a182e session=13462 traceID=172437456702207600103813242361215420685&#xD;&#xA;    2023-12-24 11:51:12 error=Sender(MissingVotesFromCoordinator) ctx=&quot;on FromOrchestra&quot;&#xD;&#xA;    2023-12-24 11:51:12 � Imported #5357788 (0x2e99�16ca)&#xD;&#xA;    2023-12-24 11:51:12 error=Sender(MissingVotesFromCoordinator) ctx=&quot;on FromOrchestra&quot;&#xD;&#xA;    2023-12-24 11:51:12 � Idle (10 peers), best: #5357788 (0x1ae1�3371), finalized #5357785 (0xfd9e�d5de), � 7.3kiB/s � 8.1kiB/s&#xD;&#xA;    2023-12-24 11:51:17 � Idle (10 peers), best: #5357788 (0x1ae1�3371), finalized #5357786 (0x1331�9845), � 8.0kiB/s � 6.8kiB/s&#xD;&#xA;    2023-12-24 11:51:18 Recent disputes are excessive (1308 &gt; 1000), reduce to active ones, and selected&#xD;&#xA;&#xD;&#xA;The relay chain and parachain seems to run normal (transactions, production of blocks, finality, etc), but it seems that it rejects new connections&#xD;&#xA;&#xD;&#xA;    2023-12-24 12:02:16 Accepting new connection 7/1000&#xD;&#xA;    2023-12-24 12:02:16 Rejected connection: Transport(header Upgrade not found)&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42691" PostHistoryTypeId="1" PostId="10709" RevisionGUID="bbb2b581-8caf-4323-8ec0-fa91957363a7" CreationDate="2023-12-24T12:04:56.170" UserId="2455" Text="Getting MissingVotesFromCoordinator and disputes every block" ContentLicense="CC BY-SA 4.0" />
  <row Id="42692" PostHistoryTypeId="3" PostId="10709" RevisionGUID="bbb2b581-8caf-4323-8ec0-fa91957363a7" CreationDate="2023-12-24T12:04:56.170" UserId="2455" Text="|networking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42693" PostHistoryTypeId="2" PostId="10710" RevisionGUID="71a225f1-aa47-46e4-beae-3e4ef7ed9d7b" CreationDate="2023-12-24T17:55:59.960" UserId="3387" Text="I have created a simple [Cumulus Parachain][1] based in the new Polkadot SDK [monorepo][2].&#xD;&#xA;&#xD;&#xA;Which I am testing using a zombienet [network specification][3]. &#xD;&#xA;&#xD;&#xA;The zombienet is created with no problem.&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am able to do transfer tokens between accounts.&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I am not able to upload a smart contract (I am using the [fillper][6] example)&#xD;&#xA;&#xD;&#xA;From the Substrate Contracts UI&#xD;&#xA;[![enter image description here][7]][7]&#xD;&#xA;&#xD;&#xA;From the Polkadot JS with the sudo command&#xD;&#xA;&#xD;&#xA;[![enter image description here][8]][8]&#xD;&#xA;&#xD;&#xA;[![enter image description here][9]][9]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Probably I am missing something silly.&#xD;&#xA;&#xD;&#xA;Nevertheless, would be nice to know why this code have this behaviour.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/blue-freedom-technologies/cumulus-parachain&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.5.0/cumulus/parachain-template&#xD;&#xA;  [3]: https://github.com/blue-freedom-technologies/cumulus-parachain/blob/main/network-specification.toml&#xD;&#xA;  [4]: https://i.stack.imgur.com/svq27.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/NT6F8.png&#xD;&#xA;  [6]: https://github.com/paritytech/ink-examples/tree/main/flipper&#xD;&#xA;  [7]: https://i.stack.imgur.com/n3q5M.png&#xD;&#xA;  [8]: https://i.stack.imgur.com/LNxwq.png&#xD;&#xA;  [9]: https://i.stack.imgur.com/CBrAV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42695" PostHistoryTypeId="1" PostId="10710" RevisionGUID="71a225f1-aa47-46e4-beae-3e4ef7ed9d7b" CreationDate="2023-12-24T17:55:59.960" UserId="3387" Text="Cumulus parachain (branch=release-polkadot-v1.5.0) with the pallet-contracts given this error:&quot;StorageDepositNotEnoughFunds/BadOrigin&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42696" PostHistoryTypeId="3" PostId="10710" RevisionGUID="71a225f1-aa47-46e4-beae-3e4ef7ed9d7b" CreationDate="2023-12-24T17:55:59.960" UserId="3387" Text="|pallet-contracts|cumulus|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42697" PostHistoryTypeId="5" PostId="10710" RevisionGUID="2c9ab1d4-e534-4fb0-be8f-d5a95b93dce5" CreationDate="2023-12-24T19:28:01.480" UserId="3387" Comment="edited body" Text="I have created a simple [Cumulus Parachain][1] based in the new Polkadot SDK [monorepo][2].&#xD;&#xA;&#xD;&#xA;Which I am testing using a zombienet [network specification][3]. &#xD;&#xA;&#xD;&#xA;The zombienet is created with no problem.&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am able to do transfer tokens between accounts.&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I am not able to upload a smart contract (I am using the [flipper][6] example)&#xD;&#xA;&#xD;&#xA;From the Substrate Contracts UI&#xD;&#xA;[![enter image description here][7]][7]&#xD;&#xA;&#xD;&#xA;From the Polkadot JS with the sudo command&#xD;&#xA;&#xD;&#xA;[![enter image description here][8]][8]&#xD;&#xA;&#xD;&#xA;[![enter image description here][9]][9]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Probably I am missing something silly.&#xD;&#xA;&#xD;&#xA;Nevertheless, would be nice to know why this code have this behaviour.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/blue-freedom-technologies/cumulus-parachain&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.5.0/cumulus/parachain-template&#xD;&#xA;  [3]: https://github.com/blue-freedom-technologies/cumulus-parachain/blob/main/network-specification.toml&#xD;&#xA;  [4]: https://i.stack.imgur.com/svq27.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/NT6F8.png&#xD;&#xA;  [6]: https://github.com/paritytech/ink-examples/tree/main/flipper&#xD;&#xA;  [7]: https://i.stack.imgur.com/n3q5M.png&#xD;&#xA;  [8]: https://i.stack.imgur.com/LNxwq.png&#xD;&#xA;  [9]: https://i.stack.imgur.com/CBrAV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42698" PostHistoryTypeId="50" PostId="3290" RevisionGUID="8550a960-2f94-4ac5-998e-2e1a7626d2b3" CreationDate="2023-12-25T10:08:05.983" UserId="-1" />
  <row Id="42699" PostHistoryTypeId="5" PostId="10710" RevisionGUID="84efce3f-5fc0-4011-ac4b-9f3381ab0f40" CreationDate="2023-12-25T11:09:18.380" UserId="3387" Comment="added 722 characters in body" Text="I have created a simple [Cumulus Parachain][1] based in the new Polkadot SDK [monorepo][2].&#xD;&#xA;&#xD;&#xA;Which I am testing using a zombienet [network specification][3]. &#xD;&#xA;&#xD;&#xA;The zombienet is created with no problem.&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am able to do transfer tokens between accounts.&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I am not able to upload a smart contract (I am using the [flipper][6] example)&#xD;&#xA;&#xD;&#xA;From the Substrate Contracts UI&#xD;&#xA;&#xD;&#xA;Callers account&#xD;&#xA;[![enter image description here][7]][7]&#xD;&#xA;&#xD;&#xA;[![enter image description here][8]][8]&#xD;&#xA;&#xD;&#xA;[![enter image description here][9]][9]&#xD;&#xA;&#xD;&#xA;From the Polkadot JS with the sudo command&#xD;&#xA;&#xD;&#xA;[Alice Sudo key -local_testnet_config][10]&#xD;&#xA;&#xD;&#xA;[Alice Sudo key -development_config][11]&#xD;&#xA;&#xD;&#xA;Alice tokens&#xD;&#xA;&#xD;&#xA;[![enter image description here][12]][12]&#xD;&#xA;&#xD;&#xA;Alice transaction&#xD;&#xA;&#xD;&#xA;[![enter image description here][13]][13]&#xD;&#xA;&#xD;&#xA;[![enter image description here][14]][14]&#xD;&#xA;&#xD;&#xA;[![enter image description here][15]][15]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Probably I am missing something silly.&#xD;&#xA;&#xD;&#xA;Nevertheless, would be nice to know why this code have this behaviour.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/blue-freedom-technologies/cumulus-parachain&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.5.0/cumulus/parachain-template&#xD;&#xA;  [3]: https://github.com/blue-freedom-technologies/cumulus-parachain/blob/main/network-specification.toml&#xD;&#xA;  [4]: https://i.stack.imgur.com/svq27.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/NT6F8.png&#xD;&#xA;  [6]: https://github.com/paritytech/ink-examples/tree/main/flipper&#xD;&#xA;  [7]: https://i.stack.imgur.com/r8NUl.png&#xD;&#xA;  [8]: https://i.stack.imgur.com/lA3bh.png&#xD;&#xA;  [9]: https://i.stack.imgur.com/n3q5M.png&#xD;&#xA;  [10]: https://github.com/blue-freedom-technologies/cumulus-parachain/blob/main/node/src/chain_spec.rs#L163&#xD;&#xA;  [11]: https://github.com/blue-freedom-technologies/cumulus-parachain/blob/main/node/src/chain_spec.rs#L111&#xD;&#xA;  [12]: https://i.stack.imgur.com/5skDv.png&#xD;&#xA;  [13]: https://i.stack.imgur.com/9bJOV.png&#xD;&#xA;  [14]: https://i.stack.imgur.com/LNxwq.png&#xD;&#xA;  [15]: https://i.stack.imgur.com/CBrAV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42700" PostHistoryTypeId="2" PostId="10711" RevisionGUID="f0677f96-64f0-4cac-bc44-965d6e2d1af3" CreationDate="2023-12-25T20:14:10.350" UserId="4591" Text="I have set up a trusted node using substrate node template with 2 nodes on GCP. (a permissionless/public network A) &#xD;&#xA;&#xD;&#xA;I would like simulate the process to add a 3rd node as a validator on a different network to connect to the network A, meaning to be able to connect using a bootnode.&#xD;&#xA;&#xD;&#xA;I am having difficulty understanding how to setup the chainspec for the 3rd node, configure the bootnode and can't find any documentation on this.&#xD;&#xA;&#xD;&#xA;Is there a tutorial somewhere that is available for this? &#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42702" PostHistoryTypeId="1" PostId="10711" RevisionGUID="f0677f96-64f0-4cac-bc44-965d6e2d1af3" CreationDate="2023-12-25T20:14:10.350" UserId="4591" Text="how to connect a 3rd node on a different network using bootnode to an existing permissionless/public node on GCP" ContentLicense="CC BY-SA 4.0" />
  <row Id="42703" PostHistoryTypeId="3" PostId="10711" RevisionGUID="f0677f96-64f0-4cac-bc44-965d6e2d1af3" CreationDate="2023-12-25T20:14:10.350" UserId="4591" Text="|validator|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42704" PostHistoryTypeId="50" PostId="7426" RevisionGUID="ce198947-53b8-42ec-96ac-e041f808ab05" CreationDate="2023-12-26T02:07:40.877" UserId="-1" />
  <row Id="42707" PostHistoryTypeId="2" PostId="10713" RevisionGUID="b10ac7c6-68d1-4a34-98b0-e242518d232e" CreationDate="2023-12-26T14:59:40.663" UserId="555" Text="I'm working on a Proof-of-Work (POW) substrate chain. Assuming we have four validators, all of which have enabled on-chain workers (OCW), is it accurate to state that each validator's OCW fetches data from an external source? &#xD;&#xA;&#xD;&#xA;If so, how is the data fetched by OCWs from different validators prioritized or transacted to the chain?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42709" PostHistoryTypeId="1" PostId="10713" RevisionGUID="b10ac7c6-68d1-4a34-98b0-e242518d232e" CreationDate="2023-12-26T14:59:40.663" UserId="555" Text="Understanding External Data Fetching Dynamics: On-Chain Workers (OCW) in a Proof-of-Work Substrate Chain with Multiple Validators" ContentLicense="CC BY-SA 4.0" />
  <row Id="42710" PostHistoryTypeId="3" PostId="10713" RevisionGUID="b10ac7c6-68d1-4a34-98b0-e242518d232e" CreationDate="2023-12-26T14:59:40.663" UserId="555" Text="|transactions|consensus|offchain|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42711" PostHistoryTypeId="5" PostId="10710" RevisionGUID="c71caff3-a674-45e6-b896-1cd2e6ce200a" CreationDate="2023-12-26T18:27:48.447" UserId="3387" Comment="added 218 characters in body" Text="**Rust version**:rustc 1.77.0-nightly (3d0e6bed6 2023-12-21)&#xD;&#xA;&#xD;&#xA;**Zombienet-linux-x64 version**:1.3.87&#xD;&#xA;&#xD;&#xA;**Polkadot SDK version**:polkadot 1.5.0-a3dc2f15f23&#xD;&#xA;&#xD;&#xA;-----------------------------------------------------------&#xD;&#xA;I have created a simple [Cumulus Parachain][1] based in the new Polkadot SDK [monorepo][2].&#xD;&#xA;&#xD;&#xA;Which I am testing using a zombienet [network specification][3]. &#xD;&#xA;&#xD;&#xA;The zombienet is created with no problem.&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I am able to do transfer tokens between accounts.&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But I am not able to upload a smart contract (I am using the [flipper][6] example)&#xD;&#xA;&#xD;&#xA;From the Substrate Contracts UI&#xD;&#xA;&#xD;&#xA;Callers account&#xD;&#xA;[![enter image description here][7]][7]&#xD;&#xA;&#xD;&#xA;[![enter image description here][8]][8]&#xD;&#xA;&#xD;&#xA;[![enter image description here][9]][9]&#xD;&#xA;&#xD;&#xA;From the Polkadot JS with the sudo command&#xD;&#xA;&#xD;&#xA;[Alice Sudo key -local_testnet_config][10]&#xD;&#xA;&#xD;&#xA;[Alice Sudo key -development_config][11]&#xD;&#xA;&#xD;&#xA;Alice tokens&#xD;&#xA;&#xD;&#xA;[![enter image description here][12]][12]&#xD;&#xA;&#xD;&#xA;Alice transaction&#xD;&#xA;&#xD;&#xA;[![enter image description here][13]][13]&#xD;&#xA;&#xD;&#xA;[![enter image description here][14]][14]&#xD;&#xA;&#xD;&#xA;[![enter image description here][15]][15]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Probably I am missing something silly.&#xD;&#xA;&#xD;&#xA;Nevertheless, would be nice to know why this code have this behaviour.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/blue-freedom-technologies/cumulus-parachain&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.5.0/cumulus/parachain-template&#xD;&#xA;  [3]: https://github.com/blue-freedom-technologies/cumulus-parachain/blob/main/network-specification.toml&#xD;&#xA;  [4]: https://i.stack.imgur.com/svq27.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/NT6F8.png&#xD;&#xA;  [6]: https://github.com/paritytech/ink-examples/tree/main/flipper&#xD;&#xA;  [7]: https://i.stack.imgur.com/r8NUl.png&#xD;&#xA;  [8]: https://i.stack.imgur.com/lA3bh.png&#xD;&#xA;  [9]: https://i.stack.imgur.com/n3q5M.png&#xD;&#xA;  [10]: https://github.com/blue-freedom-technologies/cumulus-parachain/blob/main/node/src/chain_spec.rs#L163&#xD;&#xA;  [11]: https://github.com/blue-freedom-technologies/cumulus-parachain/blob/main/node/src/chain_spec.rs#L111&#xD;&#xA;  [12]: https://i.stack.imgur.com/5skDv.png&#xD;&#xA;  [13]: https://i.stack.imgur.com/9bJOV.png&#xD;&#xA;  [14]: https://i.stack.imgur.com/LNxwq.png&#xD;&#xA;  [15]: https://i.stack.imgur.com/CBrAV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="42712" PostHistoryTypeId="2" PostId="10714" RevisionGUID="d5b2a447-2a91-421a-9e5f-acd473c7c980" CreationDate="2023-12-26T18:48:05.480" UserId="74" Text="```&#xD;&#xA;2023-12-26 11:46:18.019  WARN tokio-runtime-worker babe: Error with block built on 0x54a0fbd3703e9d3311c3f51913714b84fc7b09b143251fcaf826dcdc6cf1e388: Import failed: Expected epoch change to happen at 0x1b4ff7fe1d7a8dc529e1e023670002f4c5cff9df8bcfd1d7e78eb045e37031ff, s283936063&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to resolve this? Haven't found much insights on google yet.&#xD;&#xA;&#xD;&#xA;- Our node: https://github.com/webb-tools/tangle" ContentLicense="CC BY-SA 4.0" />
  <row Id="42714" PostHistoryTypeId="1" PostId="10714" RevisionGUID="d5b2a447-2a91-421a-9e5f-acd473c7c980" CreationDate="2023-12-26T18:48:05.480" UserId="74" Text="BABE halts at block 100" ContentLicense="CC BY-SA 4.0" />
  <row Id="42715" PostHistoryTypeId="3" PostId="10714" RevisionGUID="d5b2a447-2a91-421a-9e5f-acd473c7c980" CreationDate="2023-12-26T18:48:05.480" UserId="74" Text="|consensus|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42716" PostHistoryTypeId="2" PostId="10715" RevisionGUID="ef1852d3-3871-4b60-94b8-f40e9cc1baf1" CreationDate="2023-12-26T22:19:46.983" UserId="3598" Text="I'm running a few collators for a parachain connected to polkadot, but after they've been running for sometime we stop being able to connect using rpc, we are using `polkadot v1.3.0`, does anyone know what could be the issue?&#xD;&#xA;I thought it could be related to the hardware specs of the nodes they are running on, but I've upgraded the instances they are running on to `c6id.2xlarge` and the issue persists. The collators keep producing blocks without any issues.&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="42718" PostHistoryTypeId="1" PostId="10715" RevisionGUID="ef1852d3-3871-4b60-94b8-f40e9cc1baf1" CreationDate="2023-12-26T22:19:46.983" UserId="3598" Text="Unable to connect to collator using rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="42719" PostHistoryTypeId="3" PostId="10715" RevisionGUID="ef1852d3-3871-4b60-94b8-f40e9cc1baf1" CreationDate="2023-12-26T22:19:46.983" UserId="3598" Text="|polkadot|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42720" PostHistoryTypeId="2" PostId="10716" RevisionGUID="6f3c19f4-a70a-45a3-95b1-919b775b5e90" CreationDate="2023-12-26T22:34:07.437" UserId="3966" Text="When I tried to apply BABE in solo chain, I got this error&#xD;&#xA;&#xD;&#xA;    2023-12-27 07:30:39  Operating system: macos    &#xD;&#xA;    2023-12-27 07:30:39  CPU architecture: aarch64    &#xD;&#xA;    2023-12-27 07:30:39  Highest known block at #0    &#xD;&#xA;    2023-12-27 07:30:39 〽️ Prometheus exporter started at 127.0.0.1:9615    &#xD;&#xA;    Error: Service(Application(LightSyncStateExtensionNotFound))&#xD;&#xA;&#xD;&#xA;How can I solve this error?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42722" PostHistoryTypeId="1" PostId="10716" RevisionGUID="6f3c19f4-a70a-45a3-95b1-919b775b5e90" CreationDate="2023-12-26T22:34:07.437" UserId="3966" Text="When I tried to apply BABE in solo chain, I got LightSyncStateExtensionNotFound error" ContentLicense="CC BY-SA 4.0" />
  <row Id="42723" PostHistoryTypeId="3" PostId="10716" RevisionGUID="6f3c19f4-a70a-45a3-95b1-919b775b5e90" CreationDate="2023-12-26T22:34:07.437" UserId="3966" Text="|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42724" PostHistoryTypeId="2" PostId="10717" RevisionGUID="00f2a664-c429-465a-99a4-91c7c9e100d3" CreationDate="2023-12-27T08:35:07.967" UserId="377" Text="I have a solochain running on prod now i need to add the Open Gov to the chain to make the chain decentralize.&#xD;&#xA;&#xD;&#xA;Can you please share some reference/resources to help me in that process.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42726" PostHistoryTypeId="1" PostId="10717" RevisionGUID="00f2a664-c429-465a-99a4-91c7c9e100d3" CreationDate="2023-12-27T08:35:07.967" UserId="377" Text="How can we add the Open Gov to the solochain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42727" PostHistoryTypeId="3" PostId="10717" RevisionGUID="00f2a664-c429-465a-99a4-91c7c9e100d3" CreationDate="2023-12-27T08:35:07.967" UserId="377" Text="|solo-chain|opengov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42728" PostHistoryTypeId="2" PostId="10718" RevisionGUID="4655ae1d-b735-416b-9d9f-4c38f7f4e16f" CreationDate="2023-12-27T11:13:43.443" UserId="3237" Text="I have a custom pallet and i need to caputre and store all the transfer performed by root origin account. How can i implement it? An idea  i thought was capture the transfer event on oninitalize hook and add it to the storage of my custom pallet. Help will be appreciated!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42730" PostHistoryTypeId="1" PostId="10718" RevisionGUID="4655ae1d-b735-416b-9d9f-4c38f7f4e16f" CreationDate="2023-12-27T11:13:43.443" UserId="3237" Text="How to capture a tranfer event in oninitialize hook?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42731" PostHistoryTypeId="3" PostId="10718" RevisionGUID="4655ae1d-b735-416b-9d9f-4c38f7f4e16f" CreationDate="2023-12-27T11:13:43.443" UserId="3237" Text="|substrate-node-template|pallet|transfer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42732" PostHistoryTypeId="50" PostId="10541" RevisionGUID="9ea16ea2-a34a-4d8f-993d-28551606ae35" CreationDate="2023-12-27T17:08:51.077" UserId="-1" />
  <row Id="42734" PostHistoryTypeId="5" PostId="10715" RevisionGUID="75136057-374d-4e6b-878e-7ce509ae694d" CreationDate="2023-12-27T22:27:03.757" UserId="3598" Comment="added 130 characters in body" Text="I'm running a few collators for a parachain connected to polkadot, but after they've been running for sometime we stop being able to connect using rpc, we are using `polkadot v1.3.0`, does anyone know what could be the issue?&#xD;&#xA;I thought it could be related to the hardware specs of the nodes they are running on, but I've upgraded the instances they are running on to `c6id.2xlarge` and the issue persists. The collators keep producing blocks without any issues.&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;&#xD;&#xA;I can not see any errors in the collator logs, the error I get from the polkadotjs app is `1006:: Abnormal Closure`&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="42735" PostHistoryTypeId="2" PostId="10719" RevisionGUID="47d6baec-203b-46af-b7cf-93f66c353e8c" CreationDate="2023-12-28T02:31:07.430" UserId="445" Text="I have 1 live chain&#xD;&#xA;&#xD;&#xA;Context: &#xD;&#xA; + Archive node serves as the bootnode &#xD;&#xA; + Having some pre-defined validators connected to the bootnode (`--bootnodes /ip4/13.215.176.156/tcp/30333/p2p/12D3KooWSCPiw5WquLQ1rZCbVUU8U95tgGU55EEuRZryxVJZyB7a --validator`&#xD;&#xA; + The bootnode has 26 connected peers&#xD;&#xA; + Network is still up &#xD;&#xA;&#xD;&#xA;&#xD;&#xA; I have my instance, I join my live chain as an additional validator (using the same command as the pre-defined validators)&#xD;&#xA;&#xD;&#xA;Issue: &#xD;&#xA; + Peer count is `0`&#xD;&#xA; + My node didn't sync the ledger &#xD;&#xA;&#xD;&#xA;Questions:&#xD;&#xA; 1. Why am I unable to connect to the current bootnode, even though other pre-defined validators can establish a connection?&#xD;&#xA; 2. May I run another archive node without bootnode flag command?&#xD;&#xA;&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="42737" PostHistoryTypeId="1" PostId="10719" RevisionGUID="47d6baec-203b-46af-b7cf-93f66c353e8c" CreationDate="2023-12-28T02:31:07.430" UserId="445" Text="Unable to connect to bootnode" ContentLicense="CC BY-SA 4.0" />
  <row Id="42738" PostHistoryTypeId="3" PostId="10719" RevisionGUID="47d6baec-203b-46af-b7cf-93f66c353e8c" CreationDate="2023-12-28T02:31:07.430" UserId="445" Text="|substrate-node|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42739" PostHistoryTypeId="2" PostId="10720" RevisionGUID="20a6970b-829d-4bfe-8a28-99ce9ccdb1ef" CreationDate="2023-12-28T05:11:53.270" UserId="74" Text="Don't forget to:&#xD;&#xA;- Check that you've configured your session pallet to use Babe and not periodic sessions (this was the issue).&#xD;&#xA;- Not update the EPOCH length mid runtime (another issue common from the past)." ContentLicense="CC BY-SA 4.0" />
  <row Id="42741" PostHistoryTypeId="2" PostId="10721" RevisionGUID="5fa7ab69-7d73-45f1-9ee7-dcdc9f6eaafd" CreationDate="2023-12-28T08:05:06.810" UserId="1811" Text="I am following the tutorial https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/&#xD;&#xA;&#xD;&#xA;Once I reach the point &#xD;&#xA;&#xD;&#xA;*5. Check that the new dependencies resolve correctly by running the following command:*&#xD;&#xA;``` &#xD;&#xA;cargo check -p node-template-runtime --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the following error:&#xD;&#xA;```&#xD;&#xA;username-MacBook-Pro runtime % cargo check -p node-template-runtime --release&#xD;&#xA;warning: virtual workspace defaulting to `resolver = &quot;1&quot;` despite one or more workspace members being on edition 2021 which implies `resolver = &quot;2&quot;`&#xD;&#xA;note: to keep the current resolver, specify `workspace.resolver = &quot;1&quot;` in the workspace root's manifest&#xD;&#xA;note: to use the edition 2021 resolver, specify `workspace.resolver = &quot;2&quot;` in the workspace root's manifest&#xD;&#xA;note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions&#xD;&#xA;    Blocking waiting for file lock on package cache&#xD;&#xA;    Updating git repository `https://github.com/paritytech/polkadot-sdk.git`&#xD;&#xA;error: failed to get `pallet-node-authorization` as a dependency of package `node-template-runtime v4.0.0-dev (/Users/username/Desktop/Dev/substrate_tutorials/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load source for dependency `pallet-node-authorization`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech/polkadot-sdk.git?branch=polkadot-v1.0.0&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to find branch `polkadot-v1.0.0`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  cannot locate remote-tracking branch 'origin/polkadot-v1.0.0'; class=Reference (4); code=NotFound (-3)&#xD;&#xA;```&#xD;&#xA;Please have a look at the Cargo.toml below&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;MIT-0&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-std = { version = &quot;8.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-version = { version = &quot;22.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-consensus-grandpa/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;	&quot;substrate-wasm-builder&quot;,&#xD;&#xA;	&quot;pallet-node-authorization/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-sudo/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-template/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As per the tutorial my only additions are&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;```&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;pallet-node-authorization/std&quot;,&#xD;&#xA;``` &#xD;&#xA;in features&#xD;&#xA;&#xD;&#xA;Note: If I replace this with &#xD;&#xA;```&#xD;&#xA;pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot; } &#xD;&#xA;```&#xD;&#xA;errors are not showing up any more but in the next step of the tutorial where lib.rs is amended the same cargo check commands returns dozens of errors.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42743" PostHistoryTypeId="1" PostId="10721" RevisionGUID="5fa7ab69-7d73-45f1-9ee7-dcdc9f6eaafd" CreationDate="2023-12-28T08:05:06.810" UserId="1811" Text="Errors on tutorial Authorize specific nodes" ContentLicense="CC BY-SA 4.0" />
  <row Id="42744" PostHistoryTypeId="3" PostId="10721" RevisionGUID="5fa7ab69-7d73-45f1-9ee7-dcdc9f6eaafd" CreationDate="2023-12-28T08:05:06.810" UserId="1811" Text="|substrate-tutorial|pallet-node-authorization|cargo-check|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42745" PostHistoryTypeId="5" PostId="10721" RevisionGUID="f663669d-dd4b-4b67-a2b4-e2b52d8a0e83" CreationDate="2023-12-28T08:10:11.943" UserId="1811" Comment="added 28 characters in body" Text="I am following the tutorial https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/&#xD;&#xA;&#xD;&#xA;Once I reach the point &#xD;&#xA;&#xD;&#xA;*5. Check that the new dependencies resolve correctly by running the following command:*&#xD;&#xA;``` &#xD;&#xA;cargo check -p node-template-runtime --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the following error:&#xD;&#xA;```&#xD;&#xA;username-MacBook-Pro runtime % cargo check -p node-template-runtime --release&#xD;&#xA;warning: virtual workspace defaulting to `resolver = &quot;1&quot;` despite one or more workspace members being on edition 2021 which implies `resolver = &quot;2&quot;`&#xD;&#xA;note: to keep the current resolver, specify `workspace.resolver = &quot;1&quot;` in the workspace root's manifest&#xD;&#xA;note: to use the edition 2021 resolver, specify `workspace.resolver = &quot;2&quot;` in the workspace root's manifest&#xD;&#xA;note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions&#xD;&#xA;    Blocking waiting for file lock on package cache&#xD;&#xA;    Updating git repository `https://github.com/paritytech/polkadot-sdk.git`&#xD;&#xA;error: failed to get `pallet-node-authorization` as a dependency of package `node-template-runtime v4.0.0-dev (/Users/username/Desktop/Dev/substrate_tutorials/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load source for dependency `pallet-node-authorization`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech/polkadot-sdk.git?branch=polkadot-v1.0.0&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to find branch `polkadot-v1.0.0`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  cannot locate remote-tracking branch 'origin/polkadot-v1.0.0'; class=Reference (4); code=NotFound (-3)&#xD;&#xA;```&#xD;&#xA;Please have a look at the Cargo.toml below&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;MIT-0&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-std = { version = &quot;8.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-version = { version = &quot;22.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-consensus-grandpa/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;	&quot;substrate-wasm-builder&quot;,&#xD;&#xA;	&quot;pallet-node-authorization/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-sudo/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-template/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As per the tutorial my only additions are&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;```&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;pallet-node-authorization/std&quot;,&#xD;&#xA;``` &#xD;&#xA;in features&#xD;&#xA;&#xD;&#xA;Note: If I replace this with &#xD;&#xA;```&#xD;&#xA;pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot; } &#xD;&#xA;```&#xD;&#xA;errors are not showing up any more but in the next step of the tutorial where lib.rs is amended the same cargo check command returns dozens of errors.&#xD;&#xA;&#xD;&#xA;Any suggestions please?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42746" PostHistoryTypeId="5" PostId="10721" RevisionGUID="49ee7854-b9b8-4c47-a8f2-1bb707c259f3" CreationDate="2023-12-28T08:16:18.233" UserId="1811" Comment="added 28 characters in body" Text="I am following the tutorial https://docs.substrate.io/tutorials/build-a-blockchain/authorize-specific-nodes/&#xD;&#xA;&#xD;&#xA;Once I reach the point &#xD;&#xA;&#xD;&#xA;*5. Check that the new dependencies resolve correctly by running the following command:*&#xD;&#xA;``` &#xD;&#xA;cargo check -p node-template-runtime --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I get the following error:&#xD;&#xA;```&#xD;&#xA;username-MacBook-Pro runtime % cargo check -p node-template-runtime --release&#xD;&#xA;warning: virtual workspace defaulting to `resolver = &quot;1&quot;` despite one or more workspace members being on edition 2021 which implies `resolver = &quot;2&quot;`&#xD;&#xA;note: to keep the current resolver, specify `workspace.resolver = &quot;1&quot;` in the workspace root's manifest&#xD;&#xA;note: to use the edition 2021 resolver, specify `workspace.resolver = &quot;2&quot;` in the workspace root's manifest&#xD;&#xA;note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions&#xD;&#xA;    Blocking waiting for file lock on package cache&#xD;&#xA;    Updating git repository `https://github.com/paritytech/polkadot-sdk.git`&#xD;&#xA;error: failed to get `pallet-node-authorization` as a dependency of package `node-template-runtime v4.0.0-dev (/Users/username/Desktop/Dev/substrate_tutorials/substrate-node-template/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to load source for dependency `pallet-node-authorization`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  Unable to update https://github.com/paritytech/polkadot-sdk.git?branch=polkadot-v1.0.0&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  failed to find branch `polkadot-v1.0.0`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  cannot locate remote-tracking branch 'origin/polkadot-v1.0.0'; class=Reference (4); code=NotFound (-3)&#xD;&#xA;```&#xD;&#xA;Please have a look at the Cargo.toml below&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[package]&#xD;&#xA;name = &quot;node-template-runtime&quot;&#xD;&#xA;version = &quot;4.0.0-dev&quot;&#xD;&#xA;description = &quot;A fresh FRAME-based Substrate node, ready for hacking.&quot;&#xD;&#xA;authors = [&quot;Substrate DevHub &lt;https://github.com/substrate-developer-hub&gt;&quot;]&#xD;&#xA;homepage = &quot;https://substrate.io/&quot;&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;license = &quot;MIT-0&quot;&#xD;&#xA;publish = false&#xD;&#xA;repository = &quot;https://github.com/substrate-developer-hub/substrate-node-template/&quot;&#xD;&#xA;&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;codec = { package = &quot;parity-scale-codec&quot;, version = &quot;3.6.1&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.5.0&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;&#xD;&#xA;pallet-aura = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-balances = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-sudo = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-try-runtime = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-timestamp = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-executive = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-block-builder = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-aura = { version = &quot;0.10.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-consensus-grandpa = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-inherents = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-offchain = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-runtime = { version = &quot;24.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-session = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-std = { version = &quot;8.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-transaction-pool = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;sp-version = { version = &quot;22.0.0&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# Used for the node template's RPCs&#xD;&#xA;frame-system-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Used for runtime benchmarking&#xD;&#xA;frame-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;frame-system-benchmarking = { version = &quot;4.0.0-dev&quot;, default-features = false, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../pallets/template&quot; }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;	&quot;frame-try-runtime?/std&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking?/std&quot;,&#xD;&#xA;	&quot;frame-benchmarking?/std&quot;,&#xD;&#xA;	&quot;codec/std&quot;,&#xD;&#xA;	&quot;scale-info/std&quot;,&#xD;&#xA;	&quot;frame-executive/std&quot;,&#xD;&#xA;	&quot;frame-support/std&quot;,&#xD;&#xA;	&quot;frame-system-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;frame-system/std&quot;,&#xD;&#xA;	&quot;frame-try-runtime/std&quot;,&#xD;&#xA;	&quot;pallet-aura/std&quot;,&#xD;&#xA;	&quot;pallet-balances/std&quot;,&#xD;&#xA;	&quot;pallet-grandpa/std&quot;,&#xD;&#xA;	&quot;pallet-sudo/std&quot;,&#xD;&#xA;	&quot;pallet-template/std&quot;,&#xD;&#xA;	&quot;pallet-timestamp/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment-rpc-runtime-api/std&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/std&quot;,&#xD;&#xA;	&quot;sp-api/std&quot;,&#xD;&#xA;	&quot;sp-block-builder/std&quot;,&#xD;&#xA;	&quot;sp-consensus-aura/std&quot;,&#xD;&#xA;	&quot;sp-consensus-grandpa/std&quot;,&#xD;&#xA;	&quot;sp-core/std&quot;,&#xD;&#xA;	&quot;sp-inherents/std&quot;,&#xD;&#xA;	&quot;sp-offchain/std&quot;,&#xD;&#xA;	&quot;sp-runtime/std&quot;,&#xD;&#xA;	&quot;sp-session/std&quot;,&#xD;&#xA;	&quot;sp-std/std&quot;,&#xD;&#xA;	&quot;sp-transaction-pool/std&quot;,&#xD;&#xA;	&quot;sp-version/std&quot;,&#xD;&#xA;	&quot;substrate-wasm-builder&quot;,&#xD;&#xA;	&quot;pallet-node-authorization/std&quot;,&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	&quot;frame-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-support/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system-benchmarking/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;frame-system/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-balances/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-grandpa/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-sudo/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-template/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;pallet-timestamp/runtime-benchmarks&quot;,&#xD;&#xA;	&quot;sp-runtime/runtime-benchmarks&quot;,&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	&quot;frame-try-runtime/try-runtime&quot;,&#xD;&#xA;	&quot;frame-executive/try-runtime&quot;,&#xD;&#xA;	&quot;frame-system/try-runtime&quot;,&#xD;&#xA;	&quot;frame-support/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-aura/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-balances/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-grandpa/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-sudo/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-template/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-timestamp/try-runtime&quot;,&#xD;&#xA;	&quot;pallet-transaction-payment/try-runtime&quot;,&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;As per the tutorial my only additions are&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;```&#xD;&#xA;and&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&quot;pallet-node-authorization/std&quot;,&#xD;&#xA;``` &#xD;&#xA;in features&#xD;&#xA;&#xD;&#xA;Note: If I replace this with &#xD;&#xA;```&#xD;&#xA;pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot; } &#xD;&#xA;```&#xD;&#xA;errors are not showing up any more but in the next step of the tutorial where lib.rs is amended the same cargo check command returns dozens of errors.&#xD;&#xA;&#xD;&#xA;Q1: Any suggestions please?&#xD;&#xA;&#xD;&#xA;Q2: Are there any polkadot repos that host the solved tutorials so I can always double check my progress (e.g. Cargo.toml, lib.rs) versus a working repo?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42747" PostHistoryTypeId="50" PostId="10537" RevisionGUID="939cae1a-19a9-46f3-bc1e-ee178e1fe6b1" CreationDate="2023-12-28T09:01:40.173" UserId="-1" />
  <row Id="42748" PostHistoryTypeId="2" PostId="10722" RevisionGUID="e8047a4b-7935-492e-8f10-f78f3bb8cc11" CreationDate="2023-12-28T09:46:59.343" UserId="2372" Text="I have changed my default multisignature to EthereumSignature. But whenever i'm doing any transaction on metamask then it is working fine and whenever i'm manually signing the transaction with a keyring of ethereum then also the transaction is working fine.  when i am using explorer of polkadot js apps it is showing the error of invalid transaction. " ContentLicense="CC BY-SA 4.0" />
  <row Id="42750" PostHistoryTypeId="1" PostId="10722" RevisionGUID="e8047a4b-7935-492e-8f10-f78f3bb8cc11" CreationDate="2023-12-28T09:46:59.343" UserId="2372" Text="Invalid transaction:1010 Invalid: Transaction has a bad signature" ContentLicense="CC BY-SA 4.0" />
  <row Id="42751" PostHistoryTypeId="3" PostId="10722" RevisionGUID="e8047a4b-7935-492e-8f10-f78f3bb8cc11" CreationDate="2023-12-28T09:46:59.343" UserId="2372" Text="|transactions|ethereum|ecdsa|signatures|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42752" PostHistoryTypeId="2" PostId="10723" RevisionGUID="701ccc91-ead1-4da6-a6fd-91dff0979d7c" CreationDate="2023-12-28T14:32:56.013" UserId="445" Text="My suggestion:&#xD;&#xA;&#xD;&#xA;`pallet-node-authorization = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }`&#xD;&#xA;&#xD;&#xA;Because your project imported version `polkadot-v1.0.0` from `substrate` repository, not from `polkadot-sdk`&#xD;&#xA;https://github.com/paritytech/substrate/tree/polkadot-v1.0.0&#xD;&#xA;&#xD;&#xA;**Ensure that your dependencies project are in the same branch and repository**&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42754" PostHistoryTypeId="2" PostId="10724" RevisionGUID="46128524-e128-4d0d-ace5-b3786cb6acd4" CreationDate="2023-12-28T14:37:58.987" UserId="94" Text="Events are meant as one-way communication with the external world. The runtime itself should never rely on them nor try to access them.  &#xD;&#xA;&#xD;&#xA;An alternative approach is to create a new root-only extrinsic that does the transfer and stores the fact that it happend. Otherwise it would be possible to modify the `Balances` pallet and add a hook for this case, but it is quite the niche thing." ContentLicense="CC BY-SA 4.0" />
  <row Id="42756" PostHistoryTypeId="6" PostId="10713" RevisionGUID="c80e0b89-7789-4b3c-8631-e2f86e63a70d" CreationDate="2023-12-28T15:18:38.467" UserId="555" Comment="edited tags" Text="|transactions|consensus|offchain|https|proof-of-work|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42757" PostHistoryTypeId="2" PostId="10725" RevisionGUID="9d2925b9-3ba8-4b62-b38f-94fce071f2ff" CreationDate="2023-12-28T20:23:40.787" UserId="3387" Text="In order to fix this error the MaxHolds(The maximum number of holds that can exist on an account at any time) in the &quot;impl pallet_balances::Config for Runtime&quot; needs to be bigger then 1.&#xD;&#xA;&#xD;&#xA;    impl pallet_balances::Config for Runtime {&#xD;&#xA;        (...)&#xD;&#xA;    	type MaxHolds = ConstU32&lt;1&gt;;&#xD;&#xA;        (...)&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;Cheers," ContentLicense="CC BY-SA 4.0" />
  <row Id="42759" PostHistoryTypeId="5" PostId="10715" RevisionGUID="fcdde4c5-d374-4e33-9c51-e12ba595febb" CreationDate="2023-12-28T21:42:08.970" UserId="3598" Comment="added 427 characters in body" Text="I'm running a few collators for a parachain connected to polkadot, but after they've been running for sometime we stop being able to connect using rpc, we are using `polkadot v1.3.0`, does anyone know what could be the issue?&#xD;&#xA;I thought it could be related to the hardware specs of the nodes they are running on, but I've upgraded the instances they are running on to `c6id.2xlarge` and the issue persists. The collators keep producing blocks without any issues.&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;&#xD;&#xA;I can not see any errors in the collator logs, the error I get from the polkadotjs app is `1006:: Abnormal Closure`&#xD;&#xA;&#xD;&#xA;The command used to start the collator is: &#xD;&#xA;`./target/release/parachain --collator --base-path /tmp/chain-170223/collator-data/ --port 40333 --rpc-port 9946 --rpc-external --rpc-cors all --chain ./chain-spec-raw-170223.json --  --execution wasm  --base-path /tmp/chain-170223/relay-data/ --chain ./resources/polkadot.json --port 30333 --rpc-port 9944 --rpc-external --rpc-cors all --wasm-execution Compiled --pruning 1000`&#xD;&#xA;&#xD;&#xA;Thanks." ContentLicense="CC BY-SA 4.0" />
  <row Id="42760" PostHistoryTypeId="2" PostId="10726" RevisionGUID="f6b12879-d3a3-415b-8d3d-9967b4471826" CreationDate="2023-12-29T07:21:31.733" UserId="2372" Text="You can check the ping pallet in the cumulus [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/cumulus/tree/master/parachains/pallets/ping" ContentLicense="CC BY-SA 4.0" />
  <row Id="42762" PostHistoryTypeId="2" PostId="10727" RevisionGUID="bf0bf3a8-c02b-4239-8c64-3a28c0e15325" CreationDate="2023-12-29T11:39:28.603" UserId="2762" Text="If you see this error using PolkadotJS UI in the browser can be because something is blocking the connection for example uBlock. See this issue: [FATAL: Unable to initialize the API: disconnected from wss://pub.elara.patract.io/kusama: 1006:: Abnormal Closure #3960][1]&#xD;&#xA;&#xD;&#xA;You can try the curl command in your terminal to see if you have the same error:&#xD;&#xA; ```sh&#xD;&#xA;curl -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;rpc_methods&quot;}' your-rpc-endpoint&#xD;&#xA; ```&#xD;&#xA;&#xD;&#xA;Other checks you can do in the browser are the follow [Polkadot-JS UI: How to Troubleshoot Connection Issues][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/issues/3960&#xD;&#xA;  [2]: https://support.polkadot.network/support/solutions/articles/65000176918-polkadot-js-ui-how-to-troubleshoot-connection-issues" ContentLicense="CC BY-SA 4.0" />
  <row Id="42764" PostHistoryTypeId="2" PostId="10728" RevisionGUID="8f2cc33e-33f1-4552-8454-e9882e541bdc" CreationDate="2023-12-29T11:43:49.853" UserId="2762" Text="Follow the steps on this tutorial [Access EVM Accounts][1], you have to Setting -&gt; Developer in PolkadotJS UI and define the account information to create an EVM Account as the tutorial explain.&#xD;&#xA;&#xD;&#xA;Check this previous Stackexchange question too: 1010: [Invalid Transaction: Transaction has a bad signature][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts/#connect-to-the-node&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/8127/1010-invalid-transaction-transaction-has-a-bad-signature" ContentLicense="CC BY-SA 4.0" />
  <row Id="42766" PostHistoryTypeId="2" PostId="10729" RevisionGUID="d890baf7-4396-4c32-9850-9add46064534" CreationDate="2023-12-29T11:47:59.327" UserId="2762" Text="The best resource is to take a look into this PR by Gavin: [Introduce OpenGov into Polkadot][1]. You can ignore the code to remove Gov1 and just focus on the one adding Open Gov to Polkadot.&#xD;&#xA;&#xD;&#xA;If you have Gov1 and want the migration too OpenGov read this forum post: [Gov V1 to OpenGov: A Technical Migration Guide][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/pull/6701&#xD;&#xA;  [2]: https://forum.polkadot.network/t/gov-v1-to-opengov-a-technical-migration-guide/4116" ContentLicense="CC BY-SA 4.0" />
  <row Id="42768" PostHistoryTypeId="50" PostId="9272" RevisionGUID="b028e6a7-2ba6-4630-8640-62ef00ec2f02" CreationDate="2023-12-29T12:06:30.793" UserId="-1" />
  <row Id="42769" PostHistoryTypeId="50" PostId="10554" RevisionGUID="86874906-5ab3-4ba8-aec3-c29bf7a11543" CreationDate="2023-12-29T14:03:45.503" UserId="-1" />
  <row Id="42770" PostHistoryTypeId="50" PostId="9540" RevisionGUID="793e3a4e-971c-4ade-a4b0-f81de1f8f205" CreationDate="2023-12-30T00:08:00.970" UserId="-1" />
  <row Id="42773" PostHistoryTypeId="50" PostId="6196" RevisionGUID="7153ef55-ef1a-48b2-a4f0-67701368bad1" CreationDate="2023-12-30T02:06:45.907" UserId="-1" />
  <row Id="42774" PostHistoryTypeId="50" PostId="9291" RevisionGUID="93e9bddc-e24d-4b9c-be08-a252a4a61825" CreationDate="2023-12-30T11:01:45.207" UserId="-1" />
  <row Id="42775" PostHistoryTypeId="4" PostId="10713" RevisionGUID="6f08f02d-fbf2-4a3b-96b0-00b310cc2c92" CreationDate="2023-12-30T16:27:29.897" UserId="555" Comment="edited title" Text="Proof-of-Work Substrate Chain with Multiple Validators" ContentLicense="CC BY-SA 4.0" />
  <row Id="42776" PostHistoryTypeId="2" PostId="10730" RevisionGUID="538a2bda-8df4-4e21-b3ee-a1c9c065d610" CreationDate="2023-12-31T07:16:04.340" UserId="372" Text="Polkadot JS Api is aware of a lot of common runtime apis in the Substrate ecosystem. The docs contain a [complete list of supported runtime apis](https://polkadot.js.org/docs/substrate/runtime). One that is missing is the PoW [Difficulty API](https://paritytech.github.io/polkadot-sdk/master/sp_consensus_pow/trait.DifficultyApi.html).&#xD;&#xA;&#xD;&#xA;Because the Polkadot JS Api is not aware of this runtime api, it logs the warning `Not decorating unknown runtime apis: 0xfbc577b9d747efd6/1`. Now, I know I can silence this warning using the [`noInitWarn` flag](https://github.com/polkadot-js/api/pull/5125).&#xD;&#xA;&#xD;&#xA;But my question is **can I tell Polkadot JS Api the signature of my runtime api so it can use the api**? I'm looking for something analogous to how you can tell it about [custom rpc endpoints](https://polkadot.js.org/docs/api/start/rpc.custom)" ContentLicense="CC BY-SA 4.0" />
  <row Id="42778" PostHistoryTypeId="1" PostId="10730" RevisionGUID="538a2bda-8df4-4e21-b3ee-a1c9c065d610" CreationDate="2023-12-31T07:16:04.340" UserId="372" Text="Polkadot JS API: Is is possible to define a custom runtime API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42779" PostHistoryTypeId="3" PostId="10730" RevisionGUID="538a2bda-8df4-4e21-b3ee-a1c9c065d610" CreationDate="2023-12-31T07:16:04.340" UserId="372" Text="|polkadot-js|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42780" PostHistoryTypeId="50" PostId="7937" RevisionGUID="468d6961-53fb-46d8-916b-456220e8f41c" CreationDate="2023-12-31T09:05:50.597" UserId="-1" />
  <row Id="42781" PostHistoryTypeId="2" PostId="10731" RevisionGUID="cb3e84d7-9a8a-437b-9350-e3cf11320981" CreationDate="2024-01-01T21:41:12.083" UserId="5017" Text="How to implement XCM into Morck.rs for tests in Pallet?&#xD;&#xA;&#xD;&#xA;I use XCM in my Lib.rs calls.&#xD;&#xA;&#xD;&#xA;I have to implement the following:&#xD;&#xA;&#xD;&#xA;    type XcmSender = XcmRouter;&#xD;&#xA;    type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;    type RuntimeCall = RuntimeCall;&#xD;&#xA;&#xD;&#xA;However I get an error, that XcmRouter and RuntimeOrigin do not exist. How to import them? Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42783" PostHistoryTypeId="1" PostId="10731" RevisionGUID="cb3e84d7-9a8a-437b-9350-e3cf11320981" CreationDate="2024-01-01T21:41:12.083" UserId="5017" Text="How to implement XCM into Mock.rs for tests in Pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42784" PostHistoryTypeId="3" PostId="10731" RevisionGUID="cb3e84d7-9a8a-437b-9350-e3cf11320981" CreationDate="2024-01-01T21:41:12.083" UserId="5017" Text="|rust|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42785" PostHistoryTypeId="2" PostId="10732" RevisionGUID="c7a7313a-f62d-4d13-8e9d-297df6b3c04c" CreationDate="2024-01-02T00:43:07.323" UserId="5043" Text="instead of git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;&#xD;&#xA;use git = &quot;https://github.com/paritytech/substrate.git&quot;&#xD;&#xA;&#xD;&#xA;They put the wrong url in the tutorial" ContentLicense="CC BY-SA 4.0" />
  <row Id="42787" PostHistoryTypeId="2" PostId="10733" RevisionGUID="118610e5-bdde-4490-90c2-8a3b3af64044" CreationDate="2024-01-02T12:53:27.367" UserId="3414" Text="&quot;I'm developing a pallet called xnft for cross-chain NFT transfers. To achieve this, I have to utilize functions from the Frame NFT pallet and incorporate RuntimeCall in its configuration. However, I'm facing a challenge as I'm unable to modify the FRAME NFT pallet to include RuntimeCall in it.I am providing code snippet for this.&#xD;&#xA;&#xD;&#xA;    call: &lt;T as pallet_nfts::Config&gt;::RuntimeCall::from(pallet_nfts::Call::&lt;&#xD;&#xA;    						T,&#xD;&#xA;    						I,&#xD;&#xA;    					&gt;::set_metadata {&#xD;&#xA;    						collection: dest_collection_id,&#xD;&#xA;    						item: dest_item_id,&#xD;&#xA;    					})&#xD;&#xA;&#xD;&#xA;Any suggestions on how to resolve it would be appreciated.&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42789" PostHistoryTypeId="1" PostId="10733" RevisionGUID="118610e5-bdde-4490-90c2-8a3b3af64044" CreationDate="2024-01-02T12:53:27.367" UserId="3414" Text="error[E0576]: cannot find associated type `RuntimeCall` in trait `pallet_nfts::Config`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42790" PostHistoryTypeId="3" PostId="10733" RevisionGUID="118610e5-bdde-4490-90c2-8a3b3af64044" CreationDate="2024-01-02T12:53:27.367" UserId="3414" Text="|polkadot|parachain|rust|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42791" PostHistoryTypeId="2" PostId="10734" RevisionGUID="3de979da-9a4b-4acf-b07a-183d29547734" CreationDate="2024-01-02T16:44:33.730" UserId="555" Text="I'm working on POW substrate chain, I need to calculate the workdone by each node.&#xD;&#xA;Is there any way to calculate this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42793" PostHistoryTypeId="1" PostId="10734" RevisionGUID="3de979da-9a4b-4acf-b07a-183d29547734" CreationDate="2024-01-02T16:44:33.730" UserId="555" Text="How to calculate the node work?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42794" PostHistoryTypeId="3" PostId="10734" RevisionGUID="3de979da-9a4b-4acf-b07a-183d29547734" CreationDate="2024-01-02T16:44:33.730" UserId="555" Text="|substrate-node-template|nodes|proof-of-work|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42795" PostHistoryTypeId="5" PostId="10734" RevisionGUID="e9698467-9b13-4936-877e-fbb60965ae89" CreationDate="2024-01-02T17:25:19.313" UserId="555" Comment="added 41 characters in body" Text="I'm working on POW substrate chain, I need to calculate the workdone by each node[how much a node contribute to the chain].&#xD;&#xA;Is there any way to calculate this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42796" PostHistoryTypeId="50" PostId="7495" RevisionGUID="95862f65-2ac2-48bf-9598-daafebb574a0" CreationDate="2024-01-02T21:04:55.513" UserId="-1" />
  <row Id="42802" PostHistoryTypeId="50" PostId="4706" RevisionGUID="aca93c34-2e5a-4b1e-bf0b-6485d692ca9f" CreationDate="2024-01-02T23:04:50.670" UserId="-1" />
  <row Id="42803" PostHistoryTypeId="50" PostId="10143" RevisionGUID="f3219bfc-4ab1-41dd-be29-cadb2396b9a4" CreationDate="2024-01-03T10:00:55.080" UserId="-1" />
  <row Id="42809" PostHistoryTypeId="2" PostId="10736" RevisionGUID="e7b7c570-f0a7-455e-bd38-4183676c4b45" CreationDate="2024-01-03T12:10:02.403" UserId="5046" Text="I want to create a nomination pool on a substrate based chain, I am using polkadot api, this is what I have managed to write till now&#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const { ApiPromise, WsProvider, Keyring } = require('@polkadot/api');&#xD;&#xA;&#xD;&#xA;async function createNominationPool() {&#xD;&#xA;  // Define the WebSocket provider (use a Polkadot node endpoint)&#xD;&#xA;  const wsProvider = new WsProvider('wss://goldberg.avail.tools/ws');&#xD;&#xA;&#xD;&#xA;  // Create the API instance&#xD;&#xA;  const api = await ApiPromise.create({ provider: wsProvider });&#xD;&#xA;&#xD;&#xA;  // Create a keyring instance&#xD;&#xA;  const keyring = new Keyring({ type: 'sr25519' });&#xD;&#xA;&#xD;&#xA;  // Add your account to the keyring (replace 'YOUR_SEED_PHRASE' with your seed phrase)&#xD;&#xA;  const account = keyring.addFromUri('I cannot tell you this I said NO why you still reading');&#xD;&#xA;&#xD;&#xA;  // Define the parameters for the nomination pool (adjust as needed)&#xD;&#xA;  const initialBalance = 100000000000; // Set the initial balance (in smallest unit, e.g., Plancks for Polkadot)&#xD;&#xA;  const rootAccount = account.address;  // Set the root account of the pool&#xD;&#xA;  const nominatorAccount = account.address; // Set the nominator account of the pool&#xD;&#xA;&#xD;&#xA;  // Create the nomination pool&#xD;&#xA;  const tx = api.tx.nominationPools.create(initialBalance, rootAccount, nominatorAccount, account.address);&#xD;&#xA;&#xD;&#xA;  // Sign and send the transaction&#xD;&#xA;  const hash = await tx.signAndSend(account);&#xD;&#xA;&#xD;&#xA;  // Log the transaction hash&#xD;&#xA;  console.log(`Created nomination pool with transaction hash: ${hash.toString()}`);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;createNominationPool().catch(console.error);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried running it, it gives a runtime WASM error, but doesnt tell me what is really wrong&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x2c59af - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x7775 - &lt;unknown&gt;!core::panicking::panic_fmt::h7a368385936888dc&#xD;&#xA;    2: 0x2812fd - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction: RuntimeApi, Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x2c59af - &lt;unknown&gt;!rust_begin_unwind\n    1: 0x7775 - &lt;unknown&gt;!core::pa…&#xD;&#xA;RpcError: 1002: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x2c59af - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0x7775 - &lt;unknown&gt;!core::panicking::panic_fmt::h7a368385936888dc&#xD;&#xA;    2: 0x2812fd - &lt;unknown&gt;!TaggedTransactionQueue_validate_transaction: RuntimeApi, Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x2c59af - &lt;unknown&gt;!rust_begin_unwind\n    1: 0x7775 - &lt;unknown&gt;!core::pa…&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any help to resolve this error or suggesting a new method to do this would be appreciated, thanks !&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42811" PostHistoryTypeId="1" PostId="10736" RevisionGUID="e7b7c570-f0a7-455e-bd38-4183676c4b45" CreationDate="2024-01-03T12:10:02.403" UserId="5046" Text="How to create a nomination pool using CLI or API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42812" PostHistoryTypeId="3" PostId="10736" RevisionGUID="e7b7c570-f0a7-455e-bd38-4183676c4b45" CreationDate="2024-01-03T12:10:02.403" UserId="5046" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42813" PostHistoryTypeId="50" PostId="10569" RevisionGUID="3dfe4b1d-071d-4de6-9908-22e68781238a" CreationDate="2024-01-03T17:01:40.207" UserId="-1" />
  <row Id="42814" PostHistoryTypeId="2" PostId="10737" RevisionGUID="a89b51bb-140f-45c5-9023-d2658940e56e" CreationDate="2024-01-03T19:44:46.517" UserId="555" Text="I'm working with POW substrate chain and I want to assign some number to the miners. Is it possible? If yes can we fetch those numbers during the block production(consensus time).&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42816" PostHistoryTypeId="1" PostId="10737" RevisionGUID="a89b51bb-140f-45c5-9023-d2658940e56e" CreationDate="2024-01-03T19:44:46.517" UserId="555" Text="How to assign some number to the miners in POW substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42817" PostHistoryTypeId="3" PostId="10737" RevisionGUID="a89b51bb-140f-45c5-9023-d2658940e56e" CreationDate="2024-01-03T19:44:46.517" UserId="555" Text="|substrate-node-template|validator|consensus|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42818" PostHistoryTypeId="50" PostId="10570" RevisionGUID="f30be392-a4dc-4ed5-8f84-76f36e231808" CreationDate="2024-01-04T02:08:16.033" UserId="-1" />
  <row Id="42819" PostHistoryTypeId="5" PostId="10737" RevisionGUID="291e15a0-eaff-4d21-af12-ada8e3a5bf75" CreationDate="2024-01-04T06:49:44.857" UserId="555" Comment="edited body" Text="I'm working with POW substrate chain and I want to assign some number to the miners. Is it possible? If yes can we fetch those numbers during the block production(consensus time)?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42820" PostHistoryTypeId="50" PostId="10549" RevisionGUID="4d7f68dc-c96d-4109-b55e-951cc4afda0f" CreationDate="2024-01-04T07:01:35.183" UserId="-1" />
  <row Id="42821" PostHistoryTypeId="2" PostId="10738" RevisionGUID="b365fd42-5450-4c26-8c62-9d939ef3ba18" CreationDate="2024-01-04T10:21:20.907" UserId="276" Text="Unfortunately, no real async support yet. We are currently working though on a version 2 of the libraries, which will have asyncio support.&#xD;&#xA;&#xD;&#xA;Until then you could use threads, but there are some limitations, as discussed here:&#xD;&#xA;&#xD;&#xA;https://github.com/polkascan/py-substrate-interface/issues/367#issuecomment-1865991334" ContentLicense="CC BY-SA 4.0" />
  <row Id="42823" PostHistoryTypeId="2" PostId="10739" RevisionGUID="ea976483-4ed0-4d6c-8e85-26ba80050ccf" CreationDate="2024-01-04T10:45:03.033" UserId="4794" Text="I want to query the task from storage. Here is the Task struct and StorageMap&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen, Default)]&#xD;&#xA;	#[scale_info(skip_type_params(T))]&#xD;&#xA;	pub struct Task&lt;T:Config&gt;{&#xD;&#xA;		pub id: [u8; 16],&#xD;&#xA;		pub state: u8,&#xD;&#xA;		pub owner: T::AccountId,&#xD;&#xA;		pub description: BoundedVec&lt;u8, ConstU32&lt;100&gt;&gt;,&#xD;&#xA;		// pub deadline&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn gettasks)]&#xD;&#xA;	pub(super) type Tasks&lt;T: Config&gt; = StorageMap&lt;_, Twox64Concat, [u8; 16], Task&lt;T&gt;&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when creating task, I enter &quot;Hi&quot; for the field description. But when query by taskId, It shows&#xD;&#xA;```&#xD;&#xA;{&quot;id&quot;:&quot;0x....&quot;,&quot;state&quot;:1,&quot;owner&quot;:&quot;5Grw...&quot;,&quot;description&quot;:&quot;0x6869&quot;}&#xD;&#xA;```&#xD;&#xA;How to make the description showing in raw text?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42825" PostHistoryTypeId="1" PostId="10739" RevisionGUID="ea976483-4ed0-4d6c-8e85-26ba80050ccf" CreationDate="2024-01-04T10:45:03.033" UserId="4794" Text="How to store and query the raw text?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42826" PostHistoryTypeId="3" PostId="10739" RevisionGUID="ea976483-4ed0-4d6c-8e85-26ba80050ccf" CreationDate="2024-01-04T10:45:03.033" UserId="4794" Text="|pallet|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42827" PostHistoryTypeId="2" PostId="10740" RevisionGUID="76704aaf-3729-4de6-b39c-632b18bec1b7" CreationDate="2024-01-04T11:20:29.750" UserId="2372" Text="    type RuntimeCall: From&lt;pallet_nfts::Call&lt;Self,I&gt;&gt; + Encode;&#xD;&#xA;&#xD;&#xA;Structure your pallet's runtime call in the following manner." ContentLicense="CC BY-SA 4.0" />
  <row Id="42829" PostHistoryTypeId="2" PostId="10741" RevisionGUID="65452e97-d7c6-4e31-8cb8-b06a77c360d8" CreationDate="2024-01-04T11:36:40.343" UserId="4794" Text="How to access value X in pallet A from another pallet?&#xD;&#xA;For example, I saw a few pallets define ``` type Currency = Balance```, is it truly the value Balance in ```pallet_balances?```&#xD;&#xA;&#xD;&#xA;If not, how to define a variable ```X``` that is belong to 2 pallets? and when you query from any pallet, it always returns the same value at time t.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42831" PostHistoryTypeId="1" PostId="10741" RevisionGUID="65452e97-d7c6-4e31-8cb8-b06a77c360d8" CreationDate="2024-01-04T11:36:40.343" UserId="4794" Text="Mutual value among pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="42832" PostHistoryTypeId="3" PostId="10741" RevisionGUID="65452e97-d7c6-4e31-8cb8-b06a77c360d8" CreationDate="2024-01-04T11:36:40.343" UserId="4794" Text="|pallet|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42833" PostHistoryTypeId="5" PostId="10741" RevisionGUID="93c8dc88-bd4e-432e-8f7b-feec727d3fd7" CreationDate="2024-01-04T11:42:24.000" UserId="4794" Comment="added 543 characters in body" Text="How to access value X in pallet A from another pallet?&#xD;&#xA;For example, I saw a few pallets define ``` type Currency = Balance```, is it truly the value Balance in ```pallet_balances?```&#xD;&#xA;&#xD;&#xA;If not, how to define a variable ```X``` that is belong to 2 pallets? and when you query from any pallet, it always returns the same value at time t.&#xD;&#xA;&#xD;&#xA;In this document, pallet coupling&#xD;&#xA;https://docs.substrate.io/build/pallet-coupling/&#xD;&#xA;I think my pallet just uses the type defined in pallet_balances but not actually refer to the same value.&#xD;&#xA;&#xD;&#xA;It said &quot;Now, you can use the runtime configuration—runtime/src/lib.rs—to implement the pallet and specify the type to be Balances.&#xD;&#xA;```&#xD;&#xA;impl my_pallet::Config for Runtime {&#xD;&#xA;    type MyCurrency = Balances;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The Balances type is specified in construct_runtime! macro as part of the pallet_balances that implements the Currency trait.&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42834" PostHistoryTypeId="2" PostId="10742" RevisionGUID="3442c8d7-c0ca-4d3e-9bdd-39438a91fa46" CreationDate="2024-01-04T13:37:23.003" UserId="3538" Text="I'd like to connect my frontend application (built on Rust) to be able to connect to my network without using any hardcoded endpoints to create a bottleneck for DDoS attacks. One possibility for this could be to implement [this](https://github.com/paritytech/substrate/blob/master/client/network/src/service.rs#L601-L706) `sc-network` method for a library and use that library in my frontend app. But I'm still exploring any possibilities of this function to be constructed in a library. And I would also like to know whether it would be possible to implement [`NetworkBehaviour`](https://docs.rs/libp2p/latest/libp2p/swarm/index.html#network-behaviour) trait for my frontend so that it could be able to communicate with the rest of the [`Swarm`](https://docs.rs/libp2p/latest/libp2p/swarm/index.html#initializing-a-swarm), i.e my Substrate nodes without requiring any reference to an endpoint?&#xD;&#xA;&#xD;&#xA;Any help in this regard will be highly appreciated.&#xD;&#xA;Thanks. " ContentLicense="CC BY-SA 4.0" />
  <row Id="42836" PostHistoryTypeId="1" PostId="10742" RevisionGUID="3442c8d7-c0ca-4d3e-9bdd-39438a91fa46" CreationDate="2024-01-04T13:37:23.003" UserId="3538" Text="Connect a frontend application with a Substrate blockchain as a backend without using an RPC endpoint" ContentLicense="CC BY-SA 4.0" />
  <row Id="42837" PostHistoryTypeId="3" PostId="10742" RevisionGUID="3442c8d7-c0ca-4d3e-9bdd-39438a91fa46" CreationDate="2024-01-04T13:37:23.003" UserId="3538" Text="|substrate-node|rpc|networking|libp2p|frontend|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42838" PostHistoryTypeId="2" PostId="10743" RevisionGUID="28f49732-f75d-4ab0-a961-486399e733af" CreationDate="2024-01-04T13:42:55.947" UserId="94" Text="&gt;How to access value X in pallet A from another pallet?&#xD;&#xA;&#xD;&#xA;Pallets should not rely on each other directly - but only on a behaviour that *could* be implemented by another pallet. &#xD;&#xA;This makes it possible to have different implementations which allows extensibility and customization.&#xD;&#xA;&#xD;&#xA;&gt; For example, I saw a few pallets define  type Currency = Balance, is it truly the value Balance in pallet_balances?&#xD;&#xA;&#xD;&#xA;Not necessarily, as this is decided upon by the runtime config. For example: there can be multiple `pallet_balances` instances. Or the `Currency` trait could be implemented by a 3rd party logic module (pallet or something entirely different).  &#xD;&#xA;Substrate pallets try to make as *few* assumptions as possible about *how* they are going to be used in order to not exclude unforseen use-cases.&#xD;&#xA;&#xD;&#xA;&gt;If not, how to define a variable X that is belong to 2 pallets?&#xD;&#xA;&#xD;&#xA;I dont know what you are trying to achieve and without that its not possible to suggest something specific. Please *always* include source code and the goal in your question.  &#xD;&#xA;Its possible to use `type MyValue: Get&lt;u32&gt;;` in both pallet configs and make the assumption that they both point to the same value. However, the pallets cannot enforce this - the runtime config can still configure different things for both pallets.&#xD;&#xA;&#xD;&#xA;If its absolutely necessary, then you can proceed with the &quot;Tight Coupling&quot; where the config of Pallet A depends on the config of Pallet B (or vice versa). Then Pallet A can do `&lt;T as pallet_b::Config&gt;::MyValue::get()` and it is ensured that they use the same.&#xD;&#xA;&#xD;&#xA;From a design perspective it may be desirable to split the data storage into its own pallet, to not have business logic pallets tightly couple each other, but only to the data storage pallet." ContentLicense="CC BY-SA 4.0" />
  <row Id="42840" PostHistoryTypeId="2" PostId="10744" RevisionGUID="c5d3e656-3c08-4cd7-a027-0cf9bfce8d8c" CreationDate="2024-01-04T13:54:14.293" UserId="94" Text="Substrate runtimes use `u8` data for strings, whereas Rust normally uses `String`.  &#xD;&#xA;&#xD;&#xA;You can convert it back from raw like this:  &#xD;&#xA;```rust&#xD;&#xA;// Some description queried from storage.&#xD;&#xA;let description: [u8; 16] = [0x68, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,&#xD;&#xA;                             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00];&#xD;&#xA;&#xD;&#xA;match String::from_utf8(description.to_vec()) {&#xD;&#xA;    Ok(s) =&gt; println!(&quot;{}&quot;, s),&#xD;&#xA;    Err(e) =&gt; println!(&quot;Error: {}&quot;, e),&#xD;&#xA;}&#xD;&#xA;// prints 'hi'&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Note that this will not work *within* the runtime code, since it cannot use strings." ContentLicense="CC BY-SA 4.0" />
  <row Id="42842" PostHistoryTypeId="2" PostId="10745" RevisionGUID="334ce9a3-54c7-43ce-a1cf-0e2ce57fd474" CreationDate="2024-01-04T13:58:58.267" UserId="94" Text="There exists `pallet-assets` to manage an arbitrary number of different distinct assets.&#xD;&#xA;Alternatively there also is `pallet-nfts` for non-fungible assets.&#xD;&#xA;&#xD;&#xA;Assets are addressed via an `ID` which makes it possible to easily write generic functions that operate on any asset. Additionally to this there is `pallet-asset-conversion` which is a Uniswap-like pallet for converting assets." ContentLicense="CC BY-SA 4.0" />
  <row Id="42844" PostHistoryTypeId="2" PostId="10746" RevisionGUID="862b230b-6448-472d-85a7-9005cde41d91" CreationDate="2024-01-04T14:04:44.897" UserId="94" Text="&gt;it's benchmark won't be found or run when trying to run using benchmark subcommand right?&#xD;&#xA;&#xD;&#xA;Yes, but that modification should not be needed. Adding you pallet here to the [`define_benchmarks`](https://github.com/paritytech/polkadot-sdk/blob/e1c033ebe15e6de5ee6a5a81eab2dd213f09d574/cumulus/parachain-template/runtime/src/lib.rs#L555) should automatically include it in `list_benchmarks` and `add_benchmarks`.&#xD;&#xA;&#xD;&#xA;There can be some edge-cases where a custom config impl is needed, but it also does not need to modify either of the two macros ([example](https://github.com/paritytech/polkadot-sdk/blob/e1c033ebe15e6de5ee6a5a81eab2dd213f09d574/cumulus/parachain-template/runtime/src/lib.rs#L763))." ContentLicense="CC BY-SA 4.0" />
  <row Id="42846" PostHistoryTypeId="5" PostId="10737" RevisionGUID="3eea61b9-fb29-4c32-bb4a-4c4c73e100b6" CreationDate="2024-01-04T17:57:03.140" UserId="555" Comment="added 45 characters in body" Text="I'm working with POW substrate chain and I want to assign some number to the miners according to the work they have done earlier. Is it possible? If yes can we fetch those numbers during the block production(consensus time)?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42847" PostHistoryTypeId="5" PostId="10741" RevisionGUID="3822041f-cab1-44b7-9bc0-e6e79142932a" CreationDate="2024-01-04T22:10:10.753" UserId="4794" Comment="added 224 characters in body" Text="How to access value X in pallet A from another pallet?&#xD;&#xA;For example, I saw a few pallets define ``` type Currency = Balance```, is it truly the value Balance in ```pallet_balances?```&#xD;&#xA;&#xD;&#xA;If not, how to define a variable ```X``` that is belong to 2 pallets? and when you query from any pallet, it always returns the same value at time t.&#xD;&#xA;&#xD;&#xA;In this document, pallet coupling&#xD;&#xA;https://docs.substrate.io/build/pallet-coupling/&#xD;&#xA;I think my pallet just uses the type defined in pallet_balances but not actually refer to the same value.&#xD;&#xA;&#xD;&#xA;It said &quot;Now, you can use the runtime configuration—runtime/src/lib.rs—to implement the pallet and specify the type to be Balances.&#xD;&#xA;```&#xD;&#xA;impl my_pallet::Config for Runtime {&#xD;&#xA;    type MyCurrency = Balances;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;The Balances type is specified in construct_runtime! macro as part of the pallet_balances that implements the Currency trait.&quot;&#xD;&#xA;&#xD;&#xA;What I am trying to do is create a new pallet (called pallet_X). and this pallet is required to calculate a value X based on the user's balance (so it should be coupling pallet_balance), then staking X in pallet_staking.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42848" PostHistoryTypeId="50" PostId="7319" RevisionGUID="a87ecf96-e329-4d4d-8d97-796f378a7d7c" CreationDate="2024-01-05T02:02:45.283" UserId="-1" />
  <row Id="42849" PostHistoryTypeId="2" PostId="10747" RevisionGUID="5c0ad178-b1bd-4bb2-92a1-6c67ac26391a" CreationDate="2024-01-05T05:11:13.420" UserId="3437" Text="Would it be possible to execute smart contract from offchain to onchain either using `ink!` or `pallet-contracts`?&#xD;&#xA;&#xD;&#xA;Can someone please help me to provide the solution? is there any example?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42851" PostHistoryTypeId="1" PostId="10747" RevisionGUID="5c0ad178-b1bd-4bb2-92a1-6c67ac26391a" CreationDate="2024-01-05T05:11:13.420" UserId="3437" Text="How to execute smart contract from offchain to onchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42852" PostHistoryTypeId="3" PostId="10747" RevisionGUID="5c0ad178-b1bd-4bb2-92a1-6c67ac26391a" CreationDate="2024-01-05T05:11:13.420" UserId="3437" Text="|ink|smart-contract|pallet-contracts|offchain-worker|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42853" PostHistoryTypeId="2" PostId="10748" RevisionGUID="1771b167-2d7b-4f2d-938e-40b63e203dff" CreationDate="2024-01-05T05:41:29.647" UserId="3437" Text="I am trying to test [Parity Bridge Common][1] by spinning up local networks. I am following this document https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/bridge-hubs/README.md. &#xD;&#xA;&#xD;&#xA;I am using Mac and  trying to [Run Rococo/Westend chains with zombienet][2] but it's not working. &#xD;&#xA;&#xD;&#xA;I am using below command:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;POLKADOT_BINARY_PATH=~/local_bridge_testing/bin/polkadot \&#xD;&#xA;POLKADOT_PARACHAIN_BINARY_PATH=~/local_bridge_testing/bin/polkadot-parachain \&#xD;&#xA;POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_ROCOCO=~/local_bridge_testing/bin/polkadot-parachain-asset-hub \&#xD;&#xA;	~/local_bridge_testing/bin/zombienet-macos --provider native spawn ./cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and getting&#xD;&#xA;&#xD;&#xA;```zsh: permission denied: /Users/ayushkumarmishra/local_bridge_testing/bin/zombienet-macos```&#xD;&#xA;&#xD;&#xA;I have replaced `zombienet-linux` with `zombienet-macos`. Please let me know if I am missing any step.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/parity-bridges-common&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/bridge-hubs/README.md#run-rococowestend-chains-with-zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="42855" PostHistoryTypeId="1" PostId="10748" RevisionGUID="1771b167-2d7b-4f2d-938e-40b63e203dff" CreationDate="2024-01-05T05:41:29.647" UserId="3437" Text="Not able to run Rococo/Westend chains with zombienet Mac binary" ContentLicense="CC BY-SA 4.0" />
  <row Id="42856" PostHistoryTypeId="3" PostId="10748" RevisionGUID="1771b167-2d7b-4f2d-938e-40b63e203dff" CreationDate="2024-01-05T05:41:29.647" UserId="3437" Text="|zombienet|parity-bridges-common|bridge|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42857" PostHistoryTypeId="2" PostId="10749" RevisionGUID="53d3f4bc-8bf2-48bf-9434-89c648782dc8" CreationDate="2024-01-05T06:29:57.260" UserId="125" Text="Before the Coretime, the only choice for the on-demand parachain is parathread (please correct me if I am wrong), there is a discussion https://forum.polkadot.network/t/on-demand-parachains/2208 and the related code has been merged.  Then, comes the Coretime, the parachain has more options to buy a bulk coretime or just some regions. It seems that for the parachain that wants to be on-demand, it doesn't need to be a parathread anymore, just buy some coretime when when there are transactions.&#xD;&#xA;&#xD;&#xA;So, my question is:&#xD;&#xA;1. What's the best practice of the on-demand for parachains in the Coretime era?&#xD;&#xA;2. What's going on the already merged parathread, does it have other use cases?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42859" PostHistoryTypeId="1" PostId="10749" RevisionGUID="53d3f4bc-8bf2-48bf-9434-89c648782dc8" CreationDate="2024-01-05T06:29:57.260" UserId="125" Text="What's the best practice of the On-demand parachains in 2024?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42860" PostHistoryTypeId="3" PostId="10749" RevisionGUID="53d3f4bc-8bf2-48bf-9434-89c648782dc8" CreationDate="2024-01-05T06:29:57.260" UserId="125" Text="|parachain|parathread|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42861" PostHistoryTypeId="5" PostId="10749" RevisionGUID="8ef10796-fdfe-47d1-9f3e-37afb8b0ab8d" CreationDate="2024-01-05T06:38:39.030" UserId="125" Comment="added 235 characters in body" Text="Before the Coretime, the only choice for the on-demand parachain is parathread (please correct me if I am wrong), there is a discussion https://forum.polkadot.network/t/on-demand-parachains/2208 and the related code has been merged.  Then, comes the Coretime, the parachain has more options to buy a bulk coretime or just some regions. It seems that for the parachain that wants to be on-demand, it doesn't need to be a parathread anymore, just buy some coretime when when there are transactions.&#xD;&#xA;&#xD;&#xA;So, my question is:&#xD;&#xA;1. What's the best practice of the on-demand for parachains in the Coretime era?&#xD;&#xA;2. What's going on the already merged parathread, does it have other use cases?&#xD;&#xA;3. From the Bastian's tweet https://twitter.com/bkchr/status/1738306372708544662, it seems the Coretime has been running on the Rococo, but I haven't found the corresponding pallet, such as `pallet_broker`, anything that I'm missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42862" PostHistoryTypeId="6" PostId="10749" RevisionGUID="8ef10796-fdfe-47d1-9f3e-37afb8b0ab8d" CreationDate="2024-01-05T06:38:39.030" UserId="125" Comment="added 235 characters in body" Text="|parachain|parathread|coretime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42863" PostHistoryTypeId="50" PostId="7990" RevisionGUID="25f83e51-aa75-4351-8ac0-ca9019c45674" CreationDate="2024-01-05T10:03:25.477" UserId="-1" />
  <row Id="42864" PostHistoryTypeId="2" PostId="10750" RevisionGUID="e4d66311-922b-4bc3-ad1a-491a5acdf199" CreationDate="2024-01-05T10:25:18.120" UserId="4794" Text="In the pallet-template, I have this storage:&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn getscoreboard)]&#xD;&#xA;	pub(super) type ScoreBoard&lt;T: Config&gt; = StorageMap&#xD;&#xA;		&lt;_, Twox64Concat, T::AccountId, BoardInfo&lt;T&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And in frontend file:&#xD;&#xA;```&#xD;&#xA; api.query.pallet_template.scoreBoard.map((entry) =&gt; { console.log(&quot;Handle UPDATE2:&quot;, entry) })&#xD;&#xA;```&#xD;&#xA;(Note that in the Balances.js ```api.query.system.account.multi(addresses, balances``` still works)&#xD;&#xA;&#xD;&#xA;The error is &quot;... map is not a function&quot;. I also tried with Object.key but it even doesn't log.&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="42866" PostHistoryTypeId="1" PostId="10750" RevisionGUID="e4d66311-922b-4bc3-ad1a-491a5acdf199" CreationDate="2024-01-05T10:25:18.120" UserId="4794" Text="query storage to front-end" ContentLicense="CC BY-SA 4.0" />
  <row Id="42867" PostHistoryTypeId="3" PostId="10750" RevisionGUID="e4d66311-922b-4bc3-ad1a-491a5acdf199" CreationDate="2024-01-05T10:25:18.120" UserId="4794" Text="|pallet|storage|substrate-front-end|map|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42868" PostHistoryTypeId="2" PostId="10751" RevisionGUID="2802db61-3958-45aa-9f8e-b175f6e0c1d1" CreationDate="2024-01-05T11:11:47.497" UserId="5054" Text="You may check your implementation of WeightInfo in runtime/src.&#xD;&#xA;&#xD;&#xA;In my case, I had a runtime/src/weight.rs file with some functions left without weight benchmarking, I just had a bunch of todo!() macros. The problem was resolved when I replaced them with actual weights." ContentLicense="CC BY-SA 4.0" />
  <row Id="42870" PostHistoryTypeId="2" PostId="10752" RevisionGUID="e0f6c5f6-234a-4479-9a18-7911da1e976a" CreationDate="2024-01-05T11:42:02.497" UserId="94" Text="Two things:&#xD;&#xA;&#xD;&#xA;- it needs an `.entries()` first&#xD;&#xA;- the `await` is missing&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;let scores = await api.query.pallet_template.scoreBoard.entries();&#xD;&#xA;scores.map(console.log);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="42872" PostHistoryTypeId="5" PostId="10750" RevisionGUID="8baad1ae-e77f-461d-8ad8-7a7d9c92f82c" CreationDate="2024-01-05T11:54:14.713" UserId="4794" Comment="added 302 characters in body" Text="In the pallet-template, I have this storage:&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn getscoreboard)]&#xD;&#xA;	pub(super) type ScoreBoard&lt;T: Config&gt; = StorageMap&#xD;&#xA;		&lt;_, Twox64Concat, T::AccountId, BoardInfo&lt;T&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And in frontend file:&#xD;&#xA;I tried 3 ways, but all didn't work&#xD;&#xA;```&#xD;&#xA; api.query.pallet_template.scoreBoard.map((entry) =&gt; { console.log(&quot;Handle UPDATE2:&quot;, entry) })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; api.query.pallet_template.scoreBoard.entries().map((entry) =&gt; { console.log(&quot;Handle UPDATE2:&quot;, entry) })&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const result = api.query.pallet_template.scoreBoard.entries()&#xD;&#xA;result.map((entry) =&gt; { console.log(&quot;Handle UPDATE2:&quot;, entry) })&#xD;&#xA;```&#xD;&#xA;(Note that in the Balances.js ```api.query.system.account.multi(addresses, balances``` still works)&#xD;&#xA;&#xD;&#xA;The error is &quot;... map is not a function&quot;. I also tried with Object.key but it even doesn't log.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thank you." ContentLicense="CC BY-SA 4.0" />
  <row Id="42873" PostHistoryTypeId="5" PostId="10747" RevisionGUID="6731774a-1a22-4167-b936-d6ff904dd542" CreationDate="2024-01-05T12:36:09.420" UserId="2005" Comment="improved explanation" Text="Would it be possible to execute smart contract call from an offchain-worker, either using `ink!` or `pallet-contracts`?&#xD;&#xA;&#xD;&#xA;Can someone please help me to provide the solution? is there any example?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42874" PostHistoryTypeId="24" PostId="10747" RevisionGUID="6731774a-1a22-4167-b936-d6ff904dd542" CreationDate="2024-01-05T12:36:09.420" Comment="Proposed by 4971 approved by 3437 edit id of 629" ContentLicense="CC BY-SA 4.0" />
  <row Id="42875" PostHistoryTypeId="50" PostId="10595" RevisionGUID="ffd8d1ee-ab7f-4a23-8542-bd50fc8fd052" CreationDate="2024-01-05T13:07:55.910" UserId="-1" />
  <row Id="42876" PostHistoryTypeId="2" PostId="10753" RevisionGUID="c6b230a3-b95c-4016-ad44-8cdaf61a33a8" CreationDate="2024-01-05T13:15:26.803" UserId="3437" Text="I tried `chmod +x ./zombienet-macos` and it worked" ContentLicense="CC BY-SA 4.0" />
  <row Id="42878" PostHistoryTypeId="4" PostId="10747" RevisionGUID="14f6caf8-d2ea-4338-b088-87bd1355b332" CreationDate="2024-01-05T13:36:34.563" UserId="3437" Comment="edited title" Text="How to execute smart contract from offchain-worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42879" PostHistoryTypeId="5" PostId="8956" RevisionGUID="401082bd-e1b5-452d-aa72-58152bf54989" CreationDate="2024-01-05T15:19:16.743" UserId="116" Comment="Spelling dont -&gt; don't" Text="Bruno gave a good overview of the practical part; I will focus a bit on the theoretical part of your questions.&#xD;&#xA;&#xD;&#xA;&gt;So now we have a try-runtime step in CI, but what output from try-runtime requires actions from the engineer preparing the upgrade?&#xD;&#xA;&#xD;&#xA;The try-runtime CLI is designed to error out when there is a problem. Errors like &quot;Undecodable storage&quot; can come from migrations themselves, but are fine, as long as it does not abort.&#xD;&#xA;&#xD;&#xA;&gt;Is the only potential outcome that one of the upstream dependencies is about to run a costly migration on chain upgrade?&#xD;&#xA;&#xD;&#xA;The outcome of running try-runtime can be: There is a migration missing, wrong or in the wrong order. Additionally with the try-state checks it also runs some consistency checks in all pallets that support it. Ideally when all pallets would expose this, then it should be possible to really ensure that nothing is missing.&#xD;&#xA;&#xD;&#xA;&gt;Are there other problems which this could reveal?&#xD;&#xA;&#xD;&#xA;There are some additional commands being worked on like `follow-chain` or `fast-forward`, that will be able to ensure that not only the migrations worked, but the chain is also in a usable state afterwards. Some problems don't manifest immediately but take some blocks, which is currently not detected by the CLI." ContentLicense="CC BY-SA 4.0" />
  <row Id="42880" PostHistoryTypeId="2" PostId="10754" RevisionGUID="833d47fd-5716-457b-a353-d70426f84736" CreationDate="2024-01-05T16:52:33.763" UserId="4794" Text="The error is shown in substrate-frontend&#xD;&#xA;```&#xD;&#xA;Transaction Failed! system.ExtrinsicFailed::{&quot;token&quot;:&quot;UnknownAsset&quot;}&#xD;&#xA;```&#xD;&#xA;```Score``` is an asset in pallet_template,&#xD;&#xA;in ```build``` function of ```BuildGenesisConfig```, I initialize the asset with id 1 for all acccounts.&#xD;&#xA;```&#xD;&#xA;&lt;T as pallet::Config&gt;::Score::create(1u32.into(), account.clone(), true, min_balance);&#xD;&#xA;```&#xD;&#xA;The line causes that error as bellow&#xD;&#xA;```&#xD;&#xA;pub fn deposit_score(origin: OriginFor&lt;T&gt;, amt: BalanceOf&lt;T&gt;)-&gt; DispatchResult {&#xD;&#xA;   let score = T::do_convert_tokens_to_credits(&amp;sender, amt);&#xD;&#xA;   T::Score::mint_into(1u32.into(), &amp;sender, score.clone())?;&#xD;&#xA;...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I want to increase by an amount ```score``` for the balance of asset ```Score``` with id ```1```&#xD;&#xA;So, How to fix that error? and manage to increase?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42882" PostHistoryTypeId="1" PostId="10754" RevisionGUID="833d47fd-5716-457b-a353-d70426f84736" CreationDate="2024-01-05T16:52:33.763" UserId="4794" Text="Error UnknownAsset when trying to increase AssetBalance" ContentLicense="CC BY-SA 4.0" />
  <row Id="42883" PostHistoryTypeId="3" PostId="10754" RevisionGUID="833d47fd-5716-457b-a353-d70426f84736" CreationDate="2024-01-05T16:52:33.763" UserId="4794" Text="|balances|assets|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42884" PostHistoryTypeId="2" PostId="10755" RevisionGUID="42fa640e-2976-40a9-bb38-e7f239beaf19" CreationDate="2024-01-05T19:12:40.980" UserId="5017" Text="Using the following line results in the error 'Bad Origin' in Runtime call.&#xD;&#xA;&#xD;&#xA;    let para = ensure_sibling_para(&lt;T as Config&gt;::RuntimeOrigin::from(origin.clone()))?;&#xD;&#xA;&#xD;&#xA;I am building a pallet that sends XCM-encoded calls (Like a ping pallet) to another chain. However, the mentioned line always gives me the error Bad origin. What am I doing wrong? I am using sudo accounts as the origin (Alice/Bob). I even tried to use sudo with a sudo account." ContentLicense="CC BY-SA 4.0" />
  <row Id="42886" PostHistoryTypeId="1" PostId="10755" RevisionGUID="42fa640e-2976-40a9-bb38-e7f239beaf19" CreationDate="2024-01-05T19:12:40.980" UserId="5017" Text="Using ensure_sibling_para results in Origin error" ContentLicense="CC BY-SA 4.0" />
  <row Id="42887" PostHistoryTypeId="3" PostId="10755" RevisionGUID="42fa640e-2976-40a9-bb38-e7f239beaf19" CreationDate="2024-01-05T19:12:40.980" UserId="5017" Text="|xcm|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42888" PostHistoryTypeId="2" PostId="10756" RevisionGUID="e9e1e9e7-4808-4aa2-af31-f4ce22e5a3cd" CreationDate="2024-01-05T22:53:39.727" UserId="2005" Text="both `ping` and `pong` extrinsics of `cumulus-ping` pallet expect to be called by a sibling chain. In other words, it needs to be triggered by an XCM transact instruction that comes from any sibling parachain. So if you are calling it as an extrinsic with normal account, it won't work.&#xD;&#xA;&#xD;&#xA;To start sending ping messages to other parachain, use `start` or `start_many` calls. Note that it won't immediately send it, but when the block is finalized (`on_finalize` hook call).&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42890" PostHistoryTypeId="5" PostId="10756" RevisionGUID="f26cac26-61a7-49cc-8b29-096c2948d473" CreationDate="2024-01-05T22:58:47.737" UserId="2005" Comment="added 144 characters in body" Text="Both `ping` and `pong` extrinsics of `cumulus-ping` pallet expect to be called by a sibling chain. In other words, it needs to be triggered by an XCM transact instruction that comes from any sibling parachain (see [here][1]). So if you are calling `ping` or `pong` as an extrinsic with normal (that is not a sovereign account of sibling para) account, it won't work.&#xD;&#xA;&#xD;&#xA;To start sending ping messages to other parachain, use `start` or `start_many` calls. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/pallets/ping/src/lib.rs#L105" ContentLicense="CC BY-SA 4.0" />
  <row Id="42891" PostHistoryTypeId="2" PostId="10757" RevisionGUID="840adcfd-2f69-44fb-9fb2-623f45848dfe" CreationDate="2024-01-06T00:14:34.033" UserId="3053" Text="We are using **offchain indexing** to store some value that will be read in **offchain worker** . &#xD;&#xA;&#xD;&#xA;The keys that we are using to store data via **offchain indexing** is as following:&#xD;&#xA;&#xD;&#xA;&gt; key = some_prefix + current_block_number + unique_index_for_current_block&#xD;&#xA;&#xD;&#xA;One of the problems with the mentioned key naming is that in case of forks for the same block number there is a possibility that some keys might get overwitten.&#xD;&#xA;&#xD;&#xA;My question is as following:&#xD;&#xA;&#xD;&#xA;**Is it a safe to assume that in case of forks for offchain indexing writes, a storage will always get overwritten by the canonical block eventually?**&#xD;&#xA;&#xD;&#xA;in other words:&#xD;&#xA;&#xD;&#xA;**Is it safe to assume that the canonical block would be the last block (with the same block_number) that gets imported in case of a fork?**&#xD;&#xA;&#xD;&#xA;If the answer to those questions is **yes** then we should be fine since the data stored in offchain storage will eventually be correct for any block number (we will access them after the block got finalized) but if the answer is **no** then &#xD;&#xA;&#xD;&#xA;***Is there a unique value per fork that we can use for our offchain keys to make them fork-aware?***&#xD;&#xA;&#xD;&#xA;It looks like we don't have access to current block hash in extrinsics so we might need some other value.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42893" PostHistoryTypeId="1" PostId="10757" RevisionGUID="840adcfd-2f69-44fb-9fb2-623f45848dfe" CreationDate="2024-01-06T00:14:34.033" UserId="3053" Text="Offchain indexing storage overwrites during forks" ContentLicense="CC BY-SA 4.0" />
  <row Id="42894" PostHistoryTypeId="3" PostId="10757" RevisionGUID="840adcfd-2f69-44fb-9fb2-623f45848dfe" CreationDate="2024-01-06T00:14:34.033" UserId="3053" Text="|offchain-worker|offchain|offchain-storage|fork|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42896" PostHistoryTypeId="2" PostId="10758" RevisionGUID="f6404a80-e65f-4bff-b559-913d357ae58b" CreationDate="2024-01-06T08:59:30.997" UserId="445" Text="I knew the reason:&#xD;&#xA;&#xD;&#xA;The version of my runtime is not compatible with the latest Polkadot JS Explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="42898" PostHistoryTypeId="2" PostId="10759" RevisionGUID="f3e7966b-8451-40f6-86f4-b99d5b78222a" CreationDate="2024-01-06T11:16:04.807" UserId="2372" Text="I've ensured EVM compatibility in my substrate-chain. The default contracts from Remix, such as storage, ballot, and owner are working correctly. However, when I deploy alternative contracts like ERC-721, they deploy successfully. Yet, when I attempt to call any function of these contracts, an Out-of-Gas error is displayed in the blockchain events." ContentLicense="CC BY-SA 4.0" />
  <row Id="42900" PostHistoryTypeId="1" PostId="10759" RevisionGUID="f3e7966b-8451-40f6-86f4-b99d5b78222a" CreationDate="2024-01-06T11:16:04.807" UserId="2372" Text="Getting the error of OutofGas evm" ContentLicense="CC BY-SA 4.0" />
  <row Id="42901" PostHistoryTypeId="3" PostId="10759" RevisionGUID="f3e7966b-8451-40f6-86f4-b99d5b78222a" CreationDate="2024-01-06T11:16:04.807" UserId="2372" Text="|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42902" PostHistoryTypeId="2" PostId="10760" RevisionGUID="c0654f2d-c888-480f-be3c-bb29166b49ca" CreationDate="2024-01-07T10:03:34.057" UserId="309" Text="I cloned the substrate-node-template and upgraded the dependencies to:&#xD;&#xA;&#xD;&#xA;    git = &quot;https://github.com/paritytech/polkadot-sdk&quot;, branch = &quot;master&quot;&#xD;&#xA;&#xD;&#xA;for reference, the original branch was `&quot;polkadot-v1.0.0&quot;`.&#xD;&#xA;I have another node which was also referencing  `&quot;polkadot-v1.0.0&quot;`, and updated it the same way to the `master` branch of polkadot-sdk.&#xD;&#xA;my problem happens in `service.rs`:&#xD;&#xA;in substrate-node-template/service.rs, the type returned by &#xD;&#xA;&#xD;&#xA;`sc_consensus_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())` &#xD;&#xA;&#xD;&#xA;is as expected &#xD;&#xA;&#xD;&#xA;`(NonDefaultSetConfig, Box&lt;dyn NotificationService&gt;)`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But, in my other node, the same functions only returns the type:&#xD;&#xA;&#xD;&#xA; `NonDefaultSetConfig`&#xD;&#xA;&#xD;&#xA; and this creates a bunch of errors in `service.rs`.&#xD;&#xA;Both cargo.toml in the Node folder are identical, how is this possible? how can this be fixed?&#xD;&#xA;Let me know if  additionnal information are needed.&#xD;&#xA;Thanks in advance,&#xD;&#xA;Kazu " ContentLicense="CC BY-SA 4.0" />
  <row Id="42904" PostHistoryTypeId="1" PostId="10760" RevisionGUID="c0654f2d-c888-480f-be3c-bb29166b49ca" CreationDate="2024-01-07T10:03:34.057" UserId="309" Text="Problem with `sc_consensus_grandpa::grandpa_peers_set_config' in service.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="42905" PostHistoryTypeId="3" PostId="10760" RevisionGUID="c0654f2d-c888-480f-be3c-bb29166b49ca" CreationDate="2024-01-07T10:03:34.057" UserId="309" Text="|substrate-node|service|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42906" PostHistoryTypeId="2" PostId="10761" RevisionGUID="9d8d9348-bbc2-4ba5-ab93-a64f0a8df4fc" CreationDate="2024-01-07T10:26:16.787" UserId="2005" Text="It seems that this function was modified with this [PR][1] and it indeed has a new return type now. You might have switched to `master` branch in your other node before this PR was merged, so dependencies are locked with the commit that is earlier than this [one][2]. If you do `cargo update` in the other node, it will sync with the latest commit and it also shouldn't compile.&#xD;&#xA;&#xD;&#xA;To fix this, you can point your dependencies to a release branch (e.g `polkadot-v1.5.0`), instead of `master` and avoid this kind of situations in the future. Or update the dependencies of `substrate-node-template` to specific commit that is older than this PR or the one your other node is pointing at (check in `Cargo.lock` for `sc-network` after `master#`):&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;# this will update all `polkadot-sdk` dependencies&#xD;&#xA;cargo update -p sc-network --precise &lt;commit hash&gt;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/pull/1370&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/commit/e71c484d5bd12330e16f568ad582e1fc1c878669" ContentLicense="CC BY-SA 4.0" />
  <row Id="42912" PostHistoryTypeId="50" PostId="6320" RevisionGUID="f7930e20-ddf4-4a04-9f35-8b98b56ceb65" CreationDate="2024-01-07T21:07:20.893" UserId="-1" />
  <row Id="42913" PostHistoryTypeId="2" PostId="10763" RevisionGUID="5005b701-683a-4af9-b271-ca25ddaa42cc" CreationDate="2024-01-07T22:24:20.023" UserId="2477" Text="Let's say I have the following impl of my Contract:&#xD;&#xA;```&#xD;&#xA;impl Contract{&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn my_fun(&amp;self);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl MyTrait1 for Contract {&#xD;&#xA;    #[ink(message)]&#xD;&#xA;    pub fn my_fun(&amp;self);&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;how can I call my_fun::&lt;MyTrait&gt;() inside ink-e2e test?&#xD;&#xA;&#xD;&#xA;I'd like to use ink 5.0.0-rc and ink-e2e 5.0.0-rc." ContentLicense="CC BY-SA 4.0" />
  <row Id="42915" PostHistoryTypeId="1" PostId="10763" RevisionGUID="5005b701-683a-4af9-b271-ca25ddaa42cc" CreationDate="2024-01-07T22:24:20.023" UserId="2477" Text="How to call function with the same name but from different trait inside ink-e2e-test" ContentLicense="CC BY-SA 4.0" />
  <row Id="42916" PostHistoryTypeId="3" PostId="10763" RevisionGUID="5005b701-683a-4af9-b271-ca25ddaa42cc" CreationDate="2024-01-07T22:24:20.023" UserId="2477" Text="|ink|smart-contract|testing|e2e|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42917" PostHistoryTypeId="6" PostId="10763" RevisionGUID="e6dd5cd2-5907-4cbf-802f-741f4ac2cc40" CreationDate="2024-01-07T22:30:14.877" UserId="2477" Comment="edited tags" Text="|ink|smart-contract|testing|contracts|e2e|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42918" PostHistoryTypeId="2" PostId="10764" RevisionGUID="bbeca06a-f02c-4a35-acc6-afcf69d7629b" CreationDate="2024-01-07T22:37:48.603" UserId="2477" Text="```&#xD;&#xA;#[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;mod e2e_tests {}&#xD;&#xA;&#xD;&#xA;#[openbrush::contract]&#xD;&#xA;pub mod controller {&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;This should work.&#xD;&#xA;&#xD;&#xA;The tests should run with usual `cargo test --features e2e-tests`&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="42920" PostHistoryTypeId="2" PostId="10765" RevisionGUID="959bdb3b-92ec-408d-ace6-73861f372765" CreationDate="2024-01-07T23:09:46.443" UserId="2477" Text="I would like to manually build a message and send it in my ink-e2e test.&#xD;&#xA;I'd like to construct and pass a selector and call data by myself.&#xD;&#xA;How can I do it using ink 5.0.0-rc and ink-e2e 5.0.0-rc? " ContentLicense="CC BY-SA 4.0" />
  <row Id="42922" PostHistoryTypeId="1" PostId="10765" RevisionGUID="959bdb3b-92ec-408d-ace6-73861f372765" CreationDate="2024-01-07T23:09:46.443" UserId="2477" Text="How can I manually build message in ink-e2e test?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42923" PostHistoryTypeId="3" PostId="10765" RevisionGUID="959bdb3b-92ec-408d-ace6-73861f372765" CreationDate="2024-01-07T23:09:46.443" UserId="2477" Text="|ink|testing|call|e2e|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42924" PostHistoryTypeId="2" PostId="10766" RevisionGUID="ecf692a3-592c-4096-a869-73edbeea8495" CreationDate="2024-01-08T06:07:48.730" UserId="5058" Text="I'm using this library to interact substrate blockchain https://github.com/sublabdev/substrate-client-swift&#xD;&#xA;&#xD;&#xA;Can anyone explored before tell me how to create and use signed and unsigned payload?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42926" PostHistoryTypeId="1" PostId="10766" RevisionGUID="ecf692a3-592c-4096-a869-73edbeea8495" CreationDate="2024-01-08T06:07:48.730" UserId="5058" Text="iOS Swift Create Signed and Unsigned Payload in Susbtrate Blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="42927" PostHistoryTypeId="3" PostId="10766" RevisionGUID="ecf692a3-592c-4096-a869-73edbeea8495" CreationDate="2024-01-08T06:07:48.730" UserId="5058" Text="|substrate-front-end|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42928" PostHistoryTypeId="2" PostId="10767" RevisionGUID="9cf26372-d352-4c5d-9380-ed506a699277" CreationDate="2024-01-08T07:37:06.413" UserId="3538" Text="I want to fetch a couple of node metrics, like `startup_time`, `bandwidth_upload`, `bandwidth_download`, etc for all of the nodes in my network. I've managed to get them from [here](https://github.com/paritytech/substrate-telemetry/blob/master/backend/telemetry_shard/src/main.rs#L343) and save them into a JSON file, but I can't fetch the respective `validator` for those metrics. Is there any other location where I can get all these details for each validator? I've tried looking into the `telemetry_backend` too, but didn't have any luck yet.&#xD;&#xA;Any suggestions in regard will be highly appreciated.&#xD;&#xA;Thank you!  &#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="42930" PostHistoryTypeId="1" PostId="10767" RevisionGUID="9cf26372-d352-4c5d-9380-ed506a699277" CreationDate="2024-01-08T07:37:06.413" UserId="3538" Text="Fetch NodeMetrics from Telemetry shard" ContentLicense="CC BY-SA 4.0" />
  <row Id="42931" PostHistoryTypeId="3" PostId="10767" RevisionGUID="9cf26372-d352-4c5d-9380-ed506a699277" CreationDate="2024-01-08T07:37:06.413" UserId="3538" Text="|substrate-node|validator|metrics|telemetry|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42932" PostHistoryTypeId="5" PostId="10767" RevisionGUID="5bf15249-4ffe-494c-93dd-3d0eda652495" CreationDate="2024-01-08T07:45:02.850" UserId="3538" Comment="added 151 characters in body" Text="I want to fetch a couple of node metrics, like `startup_time`, `bandwidth_upload`, `bandwidth_download`, etc for all of the nodes in my network, for the purpose of sending them to another application though a RPC/WS API, as these details are quite hard to read from the `&lt;node-ip&gt;:9615/metrics`. I've managed to get them from [here](https://github.com/paritytech/substrate-telemetry/blob/master/backend/telemetry_shard/src/main.rs#L343) and save them into a JSON file, but I can't fetch the respective `validator` for those metrics. Is there any other location where I can get all these details for each validator? I've tried looking into the `telemetry_backend` too, but didn't have any luck yet.&#xD;&#xA;Any suggestions in regard will be highly appreciated.&#xD;&#xA;Thank you!  &#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="42933" PostHistoryTypeId="50" PostId="9578" RevisionGUID="07096e25-679e-450a-90ef-8984eb288890" CreationDate="2024-01-08T11:08:51.087" UserId="-1" />
  <row Id="42938" PostHistoryTypeId="2" PostId="10769" RevisionGUID="5da1382f-e0f1-49f0-9517-f9205aa0456a" CreationDate="2024-01-08T12:39:24.010" UserId="4556" Text="I'm trying to set metadata for a collection of the NFTS pallet. I'm doing this from a custom pallet.&#xD;&#xA;&#xD;&#xA;To structure the metadata I'm using this guide: [https://wiki.polkadot.network/docs/learn-nft-pallets][1]&#xD;&#xA;&#xD;&#xA;The guide stipulates that I should construct metadata as json with the following structure: &#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;    &quot;name&quot;:&quot;Your Collection Name&quot;,&#xD;&#xA;    &quot;description&quot;:&quot;Collection's Description&quot;,&#xD;&#xA;    &quot;image&quot;:&quot;Your Collection CID&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can I do this when using `T::Nfts::set_collection_metadata(None, &amp;T::ExperienceNFTCollectionId::get(), &amp;metadata)?;`?&#xD;&#xA;&#xD;&#xA;I have tried many ways, but they all result in an `IncorrectMetadata` error. To be specific I tried:&#xD;&#xA;&#xD;&#xA; - Creating a struct which I then SCALE encode. My believe is that this should be the right way, since it would be inefficient to store json bytes.&#xD;&#xA; - Use a raw byte array of the json string (very inefficient)&#xD;&#xA; - Use a SCALE encoded json string&#xD;&#xA;&#xD;&#xA;Finally, I also replaced `set_collection_metadata` with setting each field individually with `set_collection_attribute`, but even that results in the aforementioned error for the image attribute.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;T::Nfts::set_collection_attribute(&amp;T::ExperienceNFTCollectionId::get(), b&quot;name&quot;, b&quot;Experience credentials&quot;)?;&#xD;&#xA;T::Nfts::set_collection_attribute(&amp;T::ExperienceNFTCollectionId::get(), b&quot;description&quot;, b&quot;Experience credentials&quot;)?;&#xD;&#xA;T::Nfts::set_collection_attribute(&amp;T::ExperienceNFTCollectionId::get(), b&quot;image&quot;, b&quot;https://cdn.pixabay.com/photo/2017/11/10/01/38/sand-2935107_960_720.jpg&quot;)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The guide uses IPFS, but I can hardly imagine that I'm obliged to use IPFS URLs for the image and that the problem if caused by using a random image URL for now. What am I doing wrong? What is the right way to set and encode collection metadata, as well as token metadata? I would prefer to use `set_collection_metadata`/`set_item_metadata` over setting each attribute individually unless there's no other choice.&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/learn-nft-pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="42940" PostHistoryTypeId="1" PostId="10769" RevisionGUID="5da1382f-e0f1-49f0-9517-f9205aa0456a" CreationDate="2024-01-08T12:39:24.010" UserId="4556" Text="Setting collection metadata" ContentLicense="CC BY-SA 4.0" />
  <row Id="42941" PostHistoryTypeId="3" PostId="10769" RevisionGUID="5da1382f-e0f1-49f0-9517-f9205aa0456a" CreationDate="2024-01-08T12:39:24.010" UserId="4556" Text="|substrate-node-template|nft|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42947" PostHistoryTypeId="2" PostId="10771" RevisionGUID="702a43c1-6faa-42b0-bd2c-b4ff288e61e4" CreationDate="2024-01-08T14:44:40.103" UserId="4129" Text="I'm reading the code of Substrate Node Template, trying to get a deeper understanding of the implementation of it. However, I stuck when I tried to find out how the node deals with command line arguments, such as `--dev`. &#xD;&#xA;&#xD;&#xA;From what I have learned from the codes, I believe that the `SubstrateCli::from_iter` function is responsible for parsing command line arguments, and the program crashes at the `let matches = app.try_get_matches_from(iter).unwrap_or_else(|e| e.exit());` statement if I enter a incorrect cli argument(`--devx`, for instance). But how does the program know that `--devx` is incorrect while `--dev` is the correct one?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42949" PostHistoryTypeId="1" PostId="10771" RevisionGUID="702a43c1-6faa-42b0-bd2c-b4ff288e61e4" CreationDate="2024-01-08T14:44:40.103" UserId="4129" Text="How does the Substrate Node Template deal with command line arguments?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42950" PostHistoryTypeId="3" PostId="10771" RevisionGUID="702a43c1-6faa-42b0-bd2c-b4ff288e61e4" CreationDate="2024-01-08T14:44:40.103" UserId="4129" Text="|cli|dev|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42953" PostHistoryTypeId="2" PostId="10772" RevisionGUID="520954c8-87bd-4e79-ad20-4f7e5df4e801" CreationDate="2024-01-08T15:42:06.967" UserId="3437" Text="I have a Substrate chain and web socket client, build in Rust. I am trying to figure out a way to enable communication between both of them.&#xD;&#xA;&#xD;&#xA;I couldn't find way to create web socket server in Substrate chain. &#xD;&#xA;&#xD;&#xA;Is there any way through which I can establish communication between chain and web socket client?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42955" PostHistoryTypeId="1" PostId="10772" RevisionGUID="520954c8-87bd-4e79-ad20-4f7e5df4e801" CreationDate="2024-01-08T15:42:06.967" UserId="3437" Text="How to enable communication between Substrate chain and web socket client" ContentLicense="CC BY-SA 4.0" />
  <row Id="42956" PostHistoryTypeId="3" PostId="10772" RevisionGUID="520954c8-87bd-4e79-ad20-4f7e5df4e801" CreationDate="2024-01-08T15:42:06.967" UserId="3437" Text="|parity-bridges-common|websocket|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42957" PostHistoryTypeId="50" PostId="8068" RevisionGUID="da57a146-d5b8-405d-8c36-9b164b372110" CreationDate="2024-01-08T17:06:30.937" UserId="-1" />
  <row Id="42958" PostHistoryTypeId="2" PostId="10773" RevisionGUID="c3173686-a88d-42ce-bdbc-63ac1342faa7" CreationDate="2024-01-08T18:24:14.330" UserId="3598" Text="The issue seems to be solved now, the fix was to increase the amount of rpc connections allowed by the node, using the `--rpc-max-connections` flag." ContentLicense="CC BY-SA 4.0" />
  <row Id="42961" PostHistoryTypeId="5" PostId="3764" RevisionGUID="661533e5-595f-478e-b193-1e08e622bcb5" CreationDate="2024-01-08T21:15:05.703" UserId="25" Comment="Update blog post link" Text="Great question!&#xD;&#xA;&#xD;&#xA;If you have a prefix of a storage key that you are looking for, you can specify in the first argument like so:&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/FBrZN.png)&#xD;&#xA;&#xD;&#xA;&gt; Note that if you specify `0x` you will get all the keys!&#xD;&#xA;&#xD;&#xA;If you want to know how the storage keys are created I recommend reading:&#xD;&#xA;- https://www.shawntabrizi.com/blog/substrate/querying-substrate-storage-via-rpc/" ContentLicense="CC BY-SA 4.0" />
  <row Id="42962" PostHistoryTypeId="24" PostId="3764" RevisionGUID="661533e5-595f-478e-b193-1e08e622bcb5" CreationDate="2024-01-08T21:15:05.703" Comment="Proposed by 25 approved by 354, 34 edit id of 626" ContentLicense="CC BY-SA 4.0" />
  <row Id="42963" PostHistoryTypeId="10" PostId="10636" RevisionGUID="cfabb5af-8f38-44fc-97be-ddb38b36bbd0" CreationDate="2024-01-08T21:17:04.473" UserId="34" Comment="101" Text="{&quot;OriginalQuestionIds&quot;:[3432],&quot;Voters&quot;:[{&quot;Id&quot;:94,&quot;DisplayName&quot;:&quot;Oliver Tale-Yazdi&quot;},{&quot;Id&quot;:34,&quot;DisplayName&quot;:&quot;Nuke&quot;}]}" />
  <row Id="42964" PostHistoryTypeId="2" PostId="10774" RevisionGUID="eba0d042-4bc8-4461-987e-22a852bbd882" CreationDate="2024-01-08T23:12:28.507" UserId="2005" Text="It is [failing][1] with `IncorrectMetadata` because your provided metadata is too long, i.e longer than the `StringLimit` constant of `pallet_nfts::Config`. Metadata is stored as `BoundedVec`, which is bounded by `StringLimit` length. As far as I understood, you have the `pallet_nfts` configured in your runtime, so you can increase the `StringLimit` to some value that is enough for your needs.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;impl pallet_nfts::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;	type StringLimit = ConstU32&lt;512&gt;;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/nfts/src/features/metadata.rs#L277" ContentLicense="CC BY-SA 4.0" />
  <row Id="42966" PostHistoryTypeId="2" PostId="10775" RevisionGUID="7fee1e6e-d8c5-4a97-b26e-93a5bd30c459" CreationDate="2024-01-09T04:02:07.767" UserId="251" Text="I think this is a built-in feature of clap instead of Substrate.&#xD;&#xA;&#xD;&#xA;https://github.com/clap-rs/clap" ContentLicense="CC BY-SA 4.0" />
  <row Id="42968" PostHistoryTypeId="2" PostId="10776" RevisionGUID="ed00bc21-ead3-4d5f-8174-a7eb8e5c7e4e" CreationDate="2024-01-09T07:31:24.763" UserId="139" Text="I am using zombienet @ v1.89 and I found that if I had a whitespace on a parachain collator name : &#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;Cook Network&quot;&#xD;&#xA;```&#xD;&#xA;Instead of passing `--name 'Cook Network'`, `--name Cook Network` is passed, causing a failure for the CLI. This led me to the question if this is a zombienet specific bug because I am not aware that whitespaces should be discouraged in collator names. " ContentLicense="CC BY-SA 4.0" />
  <row Id="42970" PostHistoryTypeId="1" PostId="10776" RevisionGUID="ed00bc21-ead3-4d5f-8174-a7eb8e5c7e4e" CreationDate="2024-01-09T07:31:24.763" UserId="139" Text="Zombienet won't allow whitespaces in collator names" ContentLicense="CC BY-SA 4.0" />
  <row Id="42971" PostHistoryTypeId="3" PostId="10776" RevisionGUID="ed00bc21-ead3-4d5f-8174-a7eb8e5c7e4e" CreationDate="2024-01-09T07:31:24.763" UserId="139" Text="|parachain-collator|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42972" PostHistoryTypeId="2" PostId="10777" RevisionGUID="980882f2-8859-4cf7-be11-fa1fce0c0906" CreationDate="2024-01-09T08:16:59.073" UserId="2762" Text="I didn't know there is a swift library thanks for sharing. I haven't use it yet but in their documentation: [Extrinsics Service][1] there are examples about it. &#xD;&#xA;&#xD;&#xA;If it can help to understand the construction, here you can see the equivalent of your question using `subxt`: [Create a signed transaction using a signature and unsigned_transaction][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.sublab.dev/swift-libraries/substrate-client-library/usage-example/extrinsics-service&#xD;&#xA;  [2]: https://substrate.stackexchange.com/questions/5691/create-a-signed-transaction-using-a-signature-and-unsigned-transaction" ContentLicense="CC BY-SA 4.0" />
  <row Id="42974" PostHistoryTypeId="2" PostId="10778" RevisionGUID="46a47757-3735-4a28-9329-fdd2400ee354" CreationDate="2024-01-09T08:23:39.147" UserId="251" Text="Our team recently submitted two fixes about the `OutofGas`:&#xD;&#xA;&#xD;&#xA;- https://github.com/polkadot-evm/frontier/pull/1239&#xD;&#xA;- https://github.com/polkadot-evm/frontier/pull/1257&#xD;&#xA;&#xD;&#xA;Check out the latest version of Frontier." ContentLicense="CC BY-SA 4.0" />
  <row Id="42976" PostHistoryTypeId="2" PostId="10779" RevisionGUID="6169bdfa-e87e-4a7a-85f3-a991e6ace35c" CreationDate="2024-01-09T08:35:40.163" UserId="264" Text="I would like to modify the substrate transaction-payment pallet's CurrencyAdapter without cloning the entire crate into the local pallets.&#xD;&#xA;What's the best practice to provide another implementation while keep all other functionality as is. Tried tight coupling but this only inherits the features that we want to use within new pallet.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="42978" PostHistoryTypeId="1" PostId="10779" RevisionGUID="6169bdfa-e87e-4a7a-85f3-a991e6ace35c" CreationDate="2024-01-09T08:35:40.163" UserId="264" Text="Modifying / extending existing substrate pallet without cloning full source" ContentLicense="CC BY-SA 4.0" />
  <row Id="42979" PostHistoryTypeId="3" PostId="10779" RevisionGUID="6169bdfa-e87e-4a7a-85f3-a991e6ace35c" CreationDate="2024-01-09T08:35:40.163" UserId="264" Text="|substrate-node-template|pallet|runtime|tight-coupling|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42980" PostHistoryTypeId="2" PostId="10780" RevisionGUID="971106f7-3139-47d5-b10c-adcc1f0745ff" CreationDate="2024-01-09T08:59:48.867" UserId="2005" Text="`CurrencyAdapter` is passed as a value for `OnChargeTransaction` in `pallet_transaction_payment::Config`. And `OnChargeTransaction` has a trait bound `OnChargeTransaction`, i.e a type has to implement `OnChargeTransaction` [trait][1].&#xD;&#xA;&#xD;&#xA;To have a different implementation of `OnChargeTransaction`, create a new struct and manually implement the `OnChargeTransaction` trait. You can closely follow the [implementation][2] of the `CurrencyAdapter`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;/// Your implementation of `CurrencyAdapter`&#xD;&#xA;pub struct CustomCurrencyAdapter&lt;C, OU&gt;(PhantomData&lt;(C, OU)&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;T, C, OU&gt; OnChargeTransaction&lt;T&gt; for CustomCurrencyAdapter&lt;C, OU&gt;&#xD;&#xA;where&#xD;&#xA;...&#xD;&#xA;{&#xD;&#xA;	type LiquidityInfo = Option&lt;NegativeImbalanceOf&lt;C, T&gt;&gt;;&#xD;&#xA;	type Balance = &lt;C as Currency&lt;&lt;T as frame_system::Config&gt;::AccountId&gt;&gt;::Balance;&#xD;&#xA;&#xD;&#xA;	fn withdraw_fee(&#xD;&#xA;		who: &amp;T::AccountId,&#xD;&#xA;		call: &amp;T::RuntimeCall,&#xD;&#xA;		dispatch_info: &amp;DispatchInfoOf&lt;T::RuntimeCall&gt;,&#xD;&#xA;		fee: Self::Balance,&#xD;&#xA;		tip: Self::Balance,&#xD;&#xA;	) -&gt; Result&lt;Self::LiquidityInfo, TransactionValidityError&gt; {...}&#xD;&#xA;&#xD;&#xA;	fn correct_and_deposit_fee(&#xD;&#xA;		who: &amp;T::AccountId,&#xD;&#xA;		dispatch_info: &amp;DispatchInfoOf&lt;T::RuntimeCall&gt;,&#xD;&#xA;		post_info: &amp;PostDispatchInfoOf&lt;T::RuntimeCall&gt;,&#xD;&#xA;		corrected_fee: Self::Balance,&#xD;&#xA;		tip: Self::Balance,&#xD;&#xA;		already_withdrawn: Self::LiquidityInfo,&#xD;&#xA;	) -&gt; Result&lt;(), TransactionValidityError&gt; {...}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;/// runtime.rs&#xD;&#xA;impl pallet_transaction_payment::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;	type OnChargeTransaction = CustomCurrencyAdapter&lt;Balances, DealWithFees&gt;;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/transaction-payment/src/lib.rs#L354&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/transaction-payment/src/payment.rs#L81" ContentLicense="CC BY-SA 4.0" />
  <row Id="42982" PostHistoryTypeId="2" PostId="10781" RevisionGUID="69bf4aea-6a5c-49d0-90ef-d718c4890b54" CreationDate="2024-01-09T09:23:21.633" UserId="2762" Text="You need to retrieve and capture the error the extrinsic is getting. Check this example in the PolkadotJS documentation: [How do I get the decoded enum for an ExtrinsicFailed event?][1]&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;const hash = await tx.signAndSend(account, ({dispatchError }) =&gt; {&#xD;&#xA; if (dispatchError) {&#xD;&#xA;      if (dispatchError.isModule) {&#xD;&#xA;        // for module errors, we have the section indexed, lookup&#xD;&#xA;        const decoded = api.registry.findMetaError(dispatchError.asModule);&#xD;&#xA;        const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;        console.log(`${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;      } else {&#xD;&#xA;        // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;        console.log(dispatchError.toString());&#xD;&#xA;      }&#xD;&#xA;});&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/cookbook/tx/#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event" ContentLicense="CC BY-SA 4.0" />
  <row Id="42984" PostHistoryTypeId="2" PostId="10782" RevisionGUID="e1efc751-dc4e-4ac1-9068-e96d8a0f1f78" CreationDate="2024-01-09T10:41:53.827" UserId="94" Text="I opened a bug report in the repo directly - asking here in SE is more for questions: https://github.com/paritytech/zombienet/issues/1659" ContentLicense="CC BY-SA 4.0" />
  <row Id="42986" PostHistoryTypeId="2" PostId="10783" RevisionGUID="72ea023b-1e16-4d77-a933-2e78983cc554" CreationDate="2024-01-09T11:20:10.267" UserId="629" Text="I replied to the Github issue and will figure out what the best approach is. Lets close this here and keep [tracking this in github as Oliver suggested](https://github.com/paritytech/zombienet/issues/1659)." ContentLicense="CC BY-SA 4.0" />
  <row Id="42994" PostHistoryTypeId="2" PostId="10785" RevisionGUID="4c7d27ca-3ffa-4993-b433-d362180abb77" CreationDate="2024-01-09T16:29:50.463" UserId="555" Text="I want to add a vector fields in the block header of substrate chain. Is this possible? &#xD;&#xA;If yes, How can i do that? Do we have any reference code for it?&#xD;&#xA;&#xD;&#xA;Thanks in advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="42996" PostHistoryTypeId="1" PostId="10785" RevisionGUID="4c7d27ca-3ffa-4993-b433-d362180abb77" CreationDate="2024-01-09T16:29:50.463" UserId="555" Text="How to add vector fields in the block header?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42997" PostHistoryTypeId="3" PostId="10785" RevisionGUID="4c7d27ca-3ffa-4993-b433-d362180abb77" CreationDate="2024-01-09T16:29:50.463" UserId="555" Text="|substrate-node-template|substrate-node|block-production|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="42998" PostHistoryTypeId="5" PostId="4460" RevisionGUID="49f60d9b-c1f5-451e-a443-a104bc447ab1" CreationDate="2024-01-10T01:08:02.397" UserId="116" Comment="Code block only for code" Text="I want to modify some on-chain storage from offchain worker by sending a signed transaction, so I write a dispatch function which handles the transaction. But the dispatch function also can be accessed from other way as normal（such as a user sign an extrinsic out of blockchain）. I want to block the other ways so the on-chain storage only can be modified by offchain worker. How to do this, or is there any method that can distinguish different access path？&#xD;&#xA;&#xD;&#xA;Or how can I extract the `KeyTypeId` from `AccountId`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="42999" PostHistoryTypeId="5" PostId="4470" RevisionGUID="d9e374bf-33d8-4990-b153-d68f46fa9894" CreationDate="2024-01-10T01:10:46.287" UserId="116" Comment="deleted 10 characters in body" Text="The `pallet::call` macro requires the function to be public. So it's either in the frontend you just don't expose the function but anyhow a user can access the function (using polkadot js to interact with your chain). &#xD;&#xA;&#xD;&#xA;Because even the ofchain worker requires the Call to be public." ContentLicense="CC BY-SA 4.0" />
  <row Id="43000" PostHistoryTypeId="2" PostId="10786" RevisionGUID="42653a22-3f83-442b-a19f-a168b18b80af" CreationDate="2024-01-10T01:11:35.837" UserId="251" Text="I think you can push something to the header's digest field.&#xD;&#xA;&#xD;&#xA;Utilize `DigestItem::Other` that takes a `Vec&lt;u8&gt;` as input.&#xD;&#xA;&#xD;&#xA;But I don't recommend puting a very large `Vec&lt;u8&gt;` into the header.&#xD;&#xA;&#xD;&#xA;https://paritytech.github.io/polkadot-sdk/master/sp_runtime/generic/enum.DigestItem.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="43002" PostHistoryTypeId="5" PostId="120" RevisionGUID="97477636-ff75-4eff-9339-75ec11c2fc48" CreationDate="2024-01-10T01:14:06.243" UserId="116" Comment="its -&gt; it is -&gt; it's" Text="I'm trying to deploy basic erc20 example contract on rococo canvas but &quot;contracts.ContractTrapped&quot; error popped on deployment? most probably it's a problem in INK release version. I'm using rs7. &#xD;&#xA;Any hint will be much appreciated, Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="43003" PostHistoryTypeId="5" PostId="157" RevisionGUID="0e200561-eae4-4165-97df-60e8e847a760" CreationDate="2024-01-10T01:15:28.947" UserId="116" Comment="link as link" Text="There is a fix for the `ContractTrapped` error [which just got merged.](https://github.com/polkadot-js/apps/pull/6973)&#xD;&#xA;&#xD;&#xA;Deployment will work on Rococo Canvas soon, after an update which is in progress.&#xD;&#xA;&#xD;&#xA;Until then, you can test your contracts on a local node https://github.com/paritytech/substrate-contracts-node&#xD;&#xA;Make sure you have the latest versions, which at this time are:&#xD;&#xA;- ink 3.0.0 RC8&#xD;&#xA;- substrate-contracts-node v0.6.0&#xD;&#xA;- cargo-contract v0.17.0&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43004" PostHistoryTypeId="2" PostId="10787" RevisionGUID="9728afbd-3012-49d6-8577-cc55ad8cab06" CreationDate="2024-01-10T06:42:05.117" UserId="2372" Text="I have configured the transaction fees to be approximately 40. However, when deploying a smart contract on an EVM-compatible chain, the fees amount to be 2300, and when calling this function, the charge is 150. How can I adjust the fees for both scenarios?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43006" PostHistoryTypeId="1" PostId="10787" RevisionGUID="9728afbd-3012-49d6-8577-cc55ad8cab06" CreationDate="2024-01-10T06:42:05.117" UserId="2372" Text="Deployment of contract and calling its function is taking too much fees" ContentLicense="CC BY-SA 4.0" />
  <row Id="43007" PostHistoryTypeId="3" PostId="10787" RevisionGUID="9728afbd-3012-49d6-8577-cc55ad8cab06" CreationDate="2024-01-10T06:42:05.117" UserId="2372" Text="|smart-contract|evm|transaction-fees|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43012" PostHistoryTypeId="2" PostId="10789" RevisionGUID="87f5a895-ae06-494a-b5a5-97bc91e98f1d" CreationDate="2024-01-10T14:00:40.513" UserId="555" Text="Can I implement a pallet which holds the node information and at the block production time we can use this node information?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43014" PostHistoryTypeId="1" PostId="10789" RevisionGUID="87f5a895-ae06-494a-b5a5-97bc91e98f1d" CreationDate="2024-01-10T14:00:40.513" UserId="555" Text="How to Fetch data at the time of block production?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43015" PostHistoryTypeId="3" PostId="10789" RevisionGUID="87f5a895-ae06-494a-b5a5-97bc91e98f1d" CreationDate="2024-01-10T14:00:40.513" UserId="555" Text="|substrate-node-template|substrate-node|consensus|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43016" PostHistoryTypeId="2" PostId="10790" RevisionGUID="1fc90dfd-0008-4920-87c3-d5d0da9319d8" CreationDate="2024-01-10T14:19:32.720" UserId="4443" Text="[![this i my code when i compile this code im getting the error as shown in the image can anyone help me fix this im new to substrate and rust][1]][1]#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;// Re-export pallet items so that they can be accessed from the crate namespace.&#xD;&#xA; pub use pallet::*;&#xD;&#xA;&#xD;&#xA; #[frame_support::pallet]&#xD;&#xA; pub mod pallet {&#xD;&#xA;  use frame_support::pallet_prelude::*;&#xD;&#xA;  use frame_system::pallet_prelude::*;&#xD;&#xA;  use codec::alloc::string::String;&#xD;&#xA;  use frame_system::pallet;&#xD;&#xA;  use crate::Config as OtherConfig;&#xD;&#xA;&#xD;&#xA; #[pallet::pallet]&#xD;&#xA; #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA; pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;  #[pallet::config]&#xD;&#xA;     pub trait Config: frame_system::Config {&#xD;&#xA;                 type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;                 type AccountId: Parameter + Member + Default + MaybeSerializeDeserialize + frame_system::Config;&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     pub type OfferId = u64;&#xD;&#xA;&#xD;&#xA; #[pallet::event]&#xD;&#xA;         #[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;         pub enum Event&lt;T: Config&gt; {&#xD;&#xA;                                     OfferCreated(&lt;T as Config&gt;::AccountId, OfferId),&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA; #[pallet::error]&#xD;&#xA;             pub enum Error&lt;T&gt; {&#xD;&#xA;                         InvalidAgeRange,&#xD;&#xA;                                 InvalidCountryCodeLength,&#xD;&#xA;                                         InvalidGender,&#xD;&#xA;                                                 InvalidDiabetesCondition,&#xD;&#xA;             }&#xD;&#xA;&#xD;&#xA; // Define the Offer struct representing an offer&#xD;&#xA;   pub struct Offer&lt;T: frame_system::Config + pallet::Config&gt;&#xD;&#xA;       where&#xD;&#xA;       &lt;T as frame_system::Config&gt;::AccountId: frame_system::Config,&#xD;&#xA;       {&#xD;&#xA;     id: OfferId,&#xD;&#xA;         country_code: String,&#xD;&#xA;             min_age: u8,&#xD;&#xA;                 max_age: u8,&#xD;&#xA;                    gender: Gender,&#xD;&#xA;                         has_diabetes: Option&lt;DiabetesCondition&gt;,&#xD;&#xA;                         creator: &lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;   }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; #[pallet::storage]&#xD;&#xA;                 #[pallet::getter(fn offers)]&#xD;&#xA;&#xD;&#xA; pub type Offers&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat,OfferId,Offer&lt;T::AccountId&gt;,ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;   #[pallet::getter(fn offer_count)]&#xD;&#xA;    pub type OfferCount&lt;T: Config&gt; = StorageValue&lt;_, OfferId&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   pub enum Gender{&#xD;&#xA;                     Male,&#xD;&#xA;                     Female,&#xD;&#xA;                   }&#xD;&#xA;&#xD;&#xA;   pub struct DiabetesCondition {&#xD;&#xA;                             min_value: u32,&#xD;&#xA;                             max_value: u32,&#xD;&#xA;                             }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; #[pallet::call]&#xD;&#xA; impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;     #[pallet::weight(0)]&#xD;&#xA;      pub fn create_offer( origin: OriginFor&lt;T&gt;,country_code: String,min_age: u8,max_age: u8,gender: Gender,has_diabetes: Option&lt;DiabetesCondition&gt;,) -&gt; DispatchResult{&#xD;&#xA;          let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;                                                  // Check age range validity&#xD;&#xA;                                                 ensure!( min_age &lt;= max_age &amp;&amp; max_age &lt;= 100,Error::&lt;T&gt;::InvalidAgeRange,);&#xD;&#xA;&#xD;&#xA;                                                 // Check if the country code is valid&#xD;&#xA;                                                  ensure!(country_code.len() == 2, Error::&lt;T&gt;::InvalidCountryCodeLength,);&#xD;&#xA;&#xD;&#xA;                                                   // Check gender validity&#xD;&#xA;                                                    match gender {&#xD;&#xA;                                                                 Gender::Male | Gender::Female =&gt; (), _ =&gt; return Err(Error::&lt;T&gt;::InvalidGender.into()),&#xD;&#xA;                                                    }&#xD;&#xA;&#xD;&#xA;                                                    // Check for diabetes condition&#xD;&#xA;                                                       if let Some(diabetes_condition) = has_diabetes {&#xD;&#xA;                                                             ensure!(diabetes_condition.min_value &gt;= 100 &amp;&amp; diabetes_condition.max_value &lt;= 200,Error::&lt;T&gt;::InvalidDiabetesCondition,);&#xD;&#xA;                                                               }&#xD;&#xA;  // Create a new offer&#xD;&#xA;                                                    let offer_id = Self::offer_count()?;&#xD;&#xA;                                                    let new_offer = Offer {&#xD;&#xA;                                                                          id: offer_id,&#xD;&#xA;                                                                          country_code,&#xD;&#xA;                                                                          min_age,&#xD;&#xA;                                                                          max_age,&#xD;&#xA;                                                                          gender,&#xD;&#xA;                                                                          has_diabetes,&#xD;&#xA;                                                                          creator: sender.clone(),&#xD;&#xA;                                                                           };&#xD;&#xA;&#xD;&#xA;                         Offers::&lt;T&gt;::insert(offer_id, new_offer);&#xD;&#xA;                         OfferCount::&lt;T&gt;::put(offer_id + 1);&#xD;&#xA;&#xD;&#xA;                         Self::deposit_event(Event::OfferCreated(sender, offer_id));&#xD;&#xA;                         Ok(())&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xoEfJ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43018" PostHistoryTypeId="1" PostId="10790" RevisionGUID="1fc90dfd-0008-4920-87c3-d5d0da9319d8" CreationDate="2024-01-10T14:19:32.720" UserId="4443" Text="When i built my custom pallet i got this error" ContentLicense="CC BY-SA 4.0" />
  <row Id="43019" PostHistoryTypeId="3" PostId="10790" RevisionGUID="1fc90dfd-0008-4920-87c3-d5d0da9319d8" CreationDate="2024-01-10T14:19:32.720" UserId="4443" Text="|substrate-node-template|pallet|rust|substrate-front-end|cargo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43020" PostHistoryTypeId="5" PostId="10790" RevisionGUID="75776c2c-a04a-4309-b7c9-99ecad98df0a" CreationDate="2024-01-10T14:27:12.863" UserId="4443" Comment="added 1008 characters in body" Text="[![this i my code when i compile this code im getting the error as shown in the image can anyone help me fix this im new to substrate and rust][1]][1]#!&#xD;&#xA;&#xD;&#xA;[cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;// Re-export pallet items so that they can be accessed from the crate namespace.&#xD;&#xA; pub use pallet::*;&#xD;&#xA;&#xD;&#xA; #[frame_support::pallet]&#xD;&#xA; pub mod pallet {&#xD;&#xA;  use frame_support::pallet_prelude::*;&#xD;&#xA;  use frame_system::pallet_prelude::*;&#xD;&#xA;  use codec::alloc::string::String;&#xD;&#xA;  use frame_system::pallet;&#xD;&#xA;  use crate::Config as OtherConfig;&#xD;&#xA;&#xD;&#xA; #[pallet::pallet]&#xD;&#xA; #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA; pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;  #[pallet::config]&#xD;&#xA;     pub trait Config: frame_system::Config {&#xD;&#xA;                 type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;                 type AccountId: Parameter + Member + Default + MaybeSerializeDeserialize + frame_system::Config;&#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     pub type OfferId = u64;&#xD;&#xA;&#xD;&#xA; #[pallet::event]&#xD;&#xA;         #[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;         pub enum Event&lt;T: Config&gt; {&#xD;&#xA;                                     OfferCreated(&lt;T as Config&gt;::AccountId, OfferId),&#xD;&#xA;         }&#xD;&#xA;&#xD;&#xA; #[pallet::error]&#xD;&#xA;             pub enum Error&lt;T&gt; {&#xD;&#xA;                         InvalidAgeRange,&#xD;&#xA;                                 InvalidCountryCodeLength,&#xD;&#xA;                                         InvalidGender,&#xD;&#xA;                                                 InvalidDiabetesCondition,&#xD;&#xA;             }&#xD;&#xA;&#xD;&#xA; // Define the Offer struct representing an offer&#xD;&#xA;   pub struct Offer&lt;T: frame_system::Config + pallet::Config&gt;&#xD;&#xA;       where&#xD;&#xA;       &lt;T as frame_system::Config&gt;::AccountId: frame_system::Config,&#xD;&#xA;       {&#xD;&#xA;     id: OfferId,&#xD;&#xA;         country_code: String,&#xD;&#xA;             min_age: u8,&#xD;&#xA;                 max_age: u8,&#xD;&#xA;                    gender: Gender,&#xD;&#xA;                         has_diabetes: Option&lt;DiabetesCondition&gt;,&#xD;&#xA;                         creator: &lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;   }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; #[pallet::storage]&#xD;&#xA;                 #[pallet::getter(fn offers)]&#xD;&#xA;&#xD;&#xA; pub type Offers&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat,OfferId,Offer&lt;T::AccountId&gt;,ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#[pallet::storage]&#xD;&#xA;   #[pallet::getter(fn offer_count)]&#xD;&#xA;    pub type OfferCount&lt;T: Config&gt; = StorageValue&lt;_, OfferId&gt;;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   pub enum Gender{&#xD;&#xA;                     Male,&#xD;&#xA;                     Female,&#xD;&#xA;                   }&#xD;&#xA;&#xD;&#xA;   pub struct DiabetesCondition {&#xD;&#xA;                             min_value: u32,&#xD;&#xA;                             max_value: u32,&#xD;&#xA;                             }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; #[pallet::call]&#xD;&#xA; impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;     #[pallet::weight(0)]&#xD;&#xA;      pub fn create_offer( origin: OriginFor&lt;T&gt;,country_code: String,min_age: u8,max_age: u8,gender: Gender,has_diabetes: Option&lt;DiabetesCondition&gt;,) -&gt; DispatchResult{&#xD;&#xA;          let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;                                                  // Check age range validity&#xD;&#xA;                                                 ensure!( min_age &lt;= max_age &amp;&amp; max_age &lt;= 100,Error::&lt;T&gt;::InvalidAgeRange,);&#xD;&#xA;&#xD;&#xA;                                                 // Check if the country code is valid&#xD;&#xA;                                                  ensure!(country_code.len() == 2, Error::&lt;T&gt;::InvalidCountryCodeLength,);&#xD;&#xA;&#xD;&#xA;                                                   // Check gender validity&#xD;&#xA;                                                    match gender {&#xD;&#xA;                                                                 Gender::Male | Gender::Female =&gt; (), _ =&gt; return Err(Error::&lt;T&gt;::InvalidGender.into()),&#xD;&#xA;                                                    }&#xD;&#xA;&#xD;&#xA;                                                    // Check for diabetes condition&#xD;&#xA;                                                       if let Some(diabetes_condition) = has_diabetes {&#xD;&#xA;                                                             ensure!(diabetes_condition.min_value &gt;= 100 &amp;&amp; diabetes_condition.max_value &lt;= 200,Error::&lt;T&gt;::InvalidDiabetesCondition,);&#xD;&#xA;                                                               }&#xD;&#xA;  // Create a new offer&#xD;&#xA;                                                    let offer_id = Self::offer_count()?;&#xD;&#xA;                                                    let new_offer = Offer {&#xD;&#xA;                                                                          id: offer_id,&#xD;&#xA;                                                                          country_code,&#xD;&#xA;                                                                          min_age,&#xD;&#xA;                                                                          max_age,&#xD;&#xA;                                                                          gender,&#xD;&#xA;                                                                          has_diabetes,&#xD;&#xA;                                                                          creator: sender.clone(),&#xD;&#xA;                                                                           };&#xD;&#xA;&#xD;&#xA;                         Offers::&lt;T&gt;::insert(offer_id, new_offer);&#xD;&#xA;                         OfferCount::&lt;T&gt;::put(offer_id + 1);&#xD;&#xA;&#xD;&#xA;                         Self::deposit_event(Event::OfferCreated(sender, offer_id));&#xD;&#xA;                         Ok(())&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA; }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [![im getting this error   error[E0221]: ambiguous associated type `AccountId` in bounds of `T`&#xD;&#xA;    --&gt; /home/ubuntu/substrate-pallets/pallets/template/src/lib.rs:59:76&#xD;&#xA;     |&#xD;&#xA;  21 |                  type AccountId: Parameter + Member + Default + MaybeSerializeDeserialize + frame_system::Config;&#xD;&#xA;     |                  ----------------------------------------------------------------------------------------------- ambiguous `AccountId` from `pallet::Config`&#xD;&#xA;  ...&#xD;&#xA;  59 |  pub type Offers&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat,OfferId,Offer&lt;T::AccountId&gt;,ValueQuery&gt;;&#xD;&#xA;     |                                                                            ^^^^^^^^^^^^ ambiguous associated type `AccountId`&#xD;&#xA;     |&#xD;&#xA;     = note: associated type `T` could derive from `frame_system::Config`&#xD;&#xA;  help: use fully qualified syntax to disambiguate&#xD;&#xA;     |&#xD;&#xA;  59 |  pub type Offers&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat,OfferId,Offer&lt;&lt;T as pallet::Config&gt;::AccountId&gt;,ValueQuery&gt;;][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/QbjAX.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43021" PostHistoryTypeId="50" PostId="9123" RevisionGUID="1c18a245-4609-43c3-b4f8-30e255564064" CreationDate="2024-01-10T16:08:46.110" UserId="-1" />
  <row Id="43022" PostHistoryTypeId="2" PostId="10791" RevisionGUID="4b09484b-568f-4632-9c44-9221ebdeb4a4" CreationDate="2024-01-10T17:12:34.050" UserId="3317" Text="&gt; Is it a safe to assume that in case of forks for offchain indexing writes, a storage will always get overwritten by the canonical block eventually?&#xD;&#xA;&#xD;&#xA;Correct, *off-chain indexing is called from on-chain extrinsics which implies that the data written locally is expected to be consistent across all nodes in the network.* ([ref][1])&#xD;&#xA;&#xD;&#xA;I'm not sure (and am interested to) how you ensure the block is finalized of which the key is built to read local storage, but that is would be a good safeguard.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-indexing/" ContentLicense="CC BY-SA 4.0" />
  <row Id="43024" PostHistoryTypeId="2" PostId="10792" RevisionGUID="50441401-45ba-43b1-ba4f-3977f483f1d1" CreationDate="2024-01-10T21:52:51.683" UserId="3053" Text="So based on a number of experiments I was not able to reproduce any undefined behavior.&#xD;&#xA;&#xD;&#xA;When iterating a storage map from offchain worker with a lot of items, any change to the StorageMap from extrinsics does not seems to have any effect on the iteration. Meaning that if any new item gets added or removed while iterating on the items in the map it would not show up in the iteration.&#xD;&#xA;&#xD;&#xA;This is totally based on a number of experiments and it might not be 100% correct. " ContentLicense="CC BY-SA 4.0" />
  <row Id="43027" PostHistoryTypeId="2" PostId="10793" RevisionGUID="aca3c156-b5fd-42b4-978d-439e372b9b7a" CreationDate="2024-01-11T08:12:39.347" UserId="3002" Text="Recently, I did a reset to a local relay-chain and re-added the parachains with their old context.&#xD;&#xA;&#xD;&#xA;One of those parachains has inbound downward messages which produces an invalid `dmq_head` and leads to the following error:&#xD;&#xA;&#xD;&#xA;&gt; ERROR tokio-runtime-worker runtime: panicked at 'assertion failed: `(left == right)`&#xD;&#xA;  left: `0xedf555dab20b5cb29a124c0f95b053efbb0f7ac8081f2a83196166cd7858f195`,&#xD;&#xA; right: `0x0000000000000000000000000000000000000000000000000000000000000000`'&#xD;&#xA;&#xD;&#xA;Which happens here:&#xD;&#xA;&#xD;&#xA;    	// After hashing each message in the message queue chain submitted by the collator, we&#xD;&#xA;		// should arrive to the MQC head provided by the relay chain.&#xD;&#xA;		//&#xD;&#xA;		// A mismatch means that at least some of the submitted messages were altered, omitted or&#xD;&#xA;		// added improperly.&#xD;&#xA;		assert_eq!(dmq_head.head(), expected_dmq_mqc_head);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;How can I change the `dmq_mqc_head` of a given parachain in the relaychain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43029" PostHistoryTypeId="1" PostId="10793" RevisionGUID="aca3c156-b5fd-42b4-978d-439e372b9b7a" CreationDate="2024-01-11T08:12:39.347" UserId="3002" Text="Change &quot;dmq_mqc_head&quot; for a given parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="43030" PostHistoryTypeId="3" PostId="10793" RevisionGUID="aca3c156-b5fd-42b4-978d-439e372b9b7a" CreationDate="2024-01-11T08:12:39.347" UserId="3002" Text="|migration|recover|dmq|relay|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43031" PostHistoryTypeId="2" PostId="10794" RevisionGUID="0340af05-b1c6-4647-ab53-d90ab8de201a" CreationDate="2024-01-11T08:12:39.347" UserId="3002" Text="After digging into the code, I figured that the `expected_dmq_mqc_head` value comes from a state proof of the relay-chain. All I had to do was computing the storage key and storing the expected `dmq_mqc_head` on that key.&#xD;&#xA;&#xD;&#xA;Steps:&#xD;&#xA;&#xD;&#xA;&gt; Compute storage key (for a parachain with id 2000, it will give `63f78c98723ddc9073523ef3beefda0c4d7fefc408aac59dbfe80a72ac8e3ce563f5a4efb16ffa83d007000`)&#xD;&#xA;&#xD;&#xA;    /// The MQC head for the downward message queue of the given para. See more in the `Dmp` module.&#xD;&#xA;	///&#xD;&#xA;	/// The storage entry stores a `Hash`. This is polkadot hash which is at the moment&#xD;&#xA;	/// `blake2b-256`.&#xD;&#xA;	pub fn dmq_mqc_head(para_id: Id) -&gt; Vec&lt;u8&gt; {&#xD;&#xA;		let prefix = hex![&quot;63f78c98723ddc9073523ef3beefda0c4d7fefc408aac59dbfe80a72ac8e3ce5&quot;];&#xD;&#xA;&#xD;&#xA;		para_id.using_encoded(|para_id: &amp;[u8]| {&#xD;&#xA;			prefix&#xD;&#xA;				.as_ref()&#xD;&#xA;				.iter()&#xD;&#xA;				.chain(twox_64(para_id).iter())&#xD;&#xA;				.chain(para_id.iter())&#xD;&#xA;				.cloned()&#xD;&#xA;				.collect()&#xD;&#xA;		})&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;&gt; Call `system &gt; setStorage`, where the key is the value computed above and the value is the expected `dmq_head`)&#xD;&#xA;&#xD;&#xA;I am just providing this answer as a way of recovering a old parachain context on a new relay-chain, you will need `ROOT` access and this should always be avoided on production environments.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43033" PostHistoryTypeId="5" PostId="10791" RevisionGUID="1f38d092-cd75-4341-abf9-7cb808c3e52f" CreationDate="2024-01-11T09:21:44.623" UserId="3317" Comment="deleted 3 characters in body" Text="&gt; Is it a safe to assume that in case of forks for offchain indexing writes, a storage will always get overwritten by the canonical block eventually?&#xD;&#xA;&#xD;&#xA;Correct, *off-chain indexing is called from on-chain extrinsics which implies that the data written locally is expected to be consistent across all nodes in the network.* ([ref][1])&#xD;&#xA;&#xD;&#xA;I'm not sure (and am interested to) how you ensure the block is finalized of which the key is built to read local storage, but that would be a nice safeguard.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-indexing/" ContentLicense="CC BY-SA 4.0" />
  <row Id="43034" PostHistoryTypeId="2" PostId="10795" RevisionGUID="d50acb59-2181-4997-bc54-bbd2b8af08bc" CreationDate="2024-01-11T10:01:08.100" UserId="2372" Text="I'm encountering an issue with staking. When I bond an amount of 100, the explorer displays 92 in the targets, but the account section shows the entire amount.&#xD;&#xA;&#xD;&#xA;For the example the validator present in the storage has bonded 100 &#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But in the target section, the validator displays the own stake is 92&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6NgR2.jpg&#xD;&#xA;  [2]: https://i.stack.imgur.com/f2Gp5.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="43036" PostHistoryTypeId="1" PostId="10795" RevisionGUID="d50acb59-2181-4997-bc54-bbd2b8af08bc" CreationDate="2024-01-11T10:01:08.100" UserId="2372" Text="The displayed bonded amount is lower than the bonded amount itself in the targets" ContentLicense="CC BY-SA 4.0" />
  <row Id="43037" PostHistoryTypeId="3" PostId="10795" RevisionGUID="d50acb59-2181-4997-bc54-bbd2b8af08bc" CreationDate="2024-01-11T10:01:08.100" UserId="2372" Text="|staking|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43039" PostHistoryTypeId="2" PostId="10796" RevisionGUID="f0d41d8e-8692-42d3-ae7c-f8a729a647b6" CreationDate="2024-01-11T12:00:42.120" UserId="3690" Text="I am deploying the default smart contract in remix ide to local substrate chain using Metamask to connect with the chain. &#xD;&#xA;The local chain uses frontier for EVM.&#xD;&#xA;&#xD;&#xA;But fees comes quite high. &#xD;&#xA;I want to set the fees to lower value. How do I do it?&#xD;&#xA;How is the gas fees calculated by frontier.&#xD;&#xA;&#xD;&#xA;Also, it would be great if someone could explain how data flows from remix ide to metamask to node running on computer and hits which function on the node.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43041" PostHistoryTypeId="1" PostId="10796" RevisionGUID="f0d41d8e-8692-42d3-ae7c-f8a729a647b6" CreationDate="2024-01-11T12:00:42.120" UserId="3690" Text="Setting Gas fees for substrate chain which has frontier integrated in it" ContentLicense="CC BY-SA 4.0" />
  <row Id="43042" PostHistoryTypeId="3" PostId="10796" RevisionGUID="f0d41d8e-8692-42d3-ae7c-f8a729a647b6" CreationDate="2024-01-11T12:00:42.120" UserId="3690" Text="|evm|frontier|gas|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43044" PostHistoryTypeId="2" PostId="10797" RevisionGUID="d84a524c-c0eb-4732-aded-7c009260eeef" CreationDate="2024-01-11T12:14:58.080" UserId="4794" Text="I created a value ```id``` by this:&#xD;&#xA;```&#xD;&#xA;let encoded_payload = (owner.clone(), task_description.clone()).encode();&#xD;&#xA;let id = frame_support::Hashable::blake2_128(&amp;encoded_payload);// hashvalue of combined information&#xD;&#xA;```&#xD;&#xA;And then the problem is with the same value (type [u8;16]) I can make a query, but cannot pass it into extrinsic function.&#xD;&#xA;Successful query with a hash value.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;Call the extrinsic function and get an error&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Here is my code of this function&#xD;&#xA;```&#xD;&#xA;#[pallet::weight(&lt;T as pallet::Config&gt;::WeightInfo::cause_error())]&#xD;&#xA;pub fn taskTest(origin: OriginFor&lt;T&gt;, task_id: [u8; 16])-&gt; DispatchResult {&#xD;&#xA;		let sender = ensure_signed(origin)?;&#xD;&#xA;		Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;I tried to put the log in the extrinsic function but It did not even call into that.&#xD;&#xA;I guess with the frontend, the size of hash value from input is not stable, and unable to call the function. &#xD;&#xA;How to deal with this situation?&#xD;&#xA;&#xD;&#xA;Thank you.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/1rSrs.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/YEKGm.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/xSXcZ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43046" PostHistoryTypeId="1" PostId="10797" RevisionGUID="d84a524c-c0eb-4732-aded-7c009260eeef" CreationDate="2024-01-11T12:14:58.080" UserId="4794" Text="Uncaught runtime errors: [u8;16]:: Expected input with 16 bytes (128 bits), found 21 bytes" ContentLicense="CC BY-SA 4.0" />
  <row Id="43047" PostHistoryTypeId="3" PostId="10797" RevisionGUID="d84a524c-c0eb-4732-aded-7c009260eeef" CreationDate="2024-01-11T12:14:58.080" UserId="4794" Text="|storage|extrinsic|hash|query|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43053" PostHistoryTypeId="2" PostId="10799" RevisionGUID="ef49f143-a3a5-497a-9f02-ca4f18c662fa" CreationDate="2024-01-11T13:11:51.553" UserId="4794" Text="I would like to customize POS by staking the asset balance instead of currency balance.&#xD;&#xA;After switching the consensus from PoA to PoS by changing AURA to BABE, I need to change the configuration of pallet_staking.&#xD;&#xA;there are 2 fields in ```pallet_staking::Config``` need to be defined&#xD;&#xA;```&#xD;&#xA;impl pallet_staking::Config for Runtime {&#xD;&#xA;	type Currency = Balances;// -&gt; pallet_pts::Config::Kitty;&#xD;&#xA;	type CurrencyBalance = (); -&gt; pallet_potw::Kitty::Balance;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;```Kitty``` is defined in runtime : ```type Kitty = Assets;``` and ```type KittyBalance = AssetBalance;```&#xD;&#xA;However the trait of ```Currency``` and ```Asset``` is different, what should I do to able use this asset for staking?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43055" PostHistoryTypeId="1" PostId="10799" RevisionGUID="ef49f143-a3a5-497a-9f02-ca4f18c662fa" CreationDate="2024-01-11T13:11:51.553" UserId="4794" Text="How to stake asset instead of currency?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43056" PostHistoryTypeId="3" PostId="10799" RevisionGUID="ef49f143-a3a5-497a-9f02-ca4f18c662fa" CreationDate="2024-01-11T13:11:51.553" UserId="4794" Text="|staking|assets|pallet-staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43058" PostHistoryTypeId="2" PostId="10800" RevisionGUID="70d9c23b-dac7-4848-a3af-977929cde1d8" CreationDate="2024-01-11T13:41:24.803" UserId="264" Text="Is there a way to do batch inset operation into a StorageMap without iteration or using a Vec[] type or best workarounds. and if its not whats the reason for not supporting this?&#xD;&#xA;&#xD;&#xA;For example there's a method available remove_all()&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="43060" PostHistoryTypeId="1" PostId="10800" RevisionGUID="70d9c23b-dac7-4848-a3af-977929cde1d8" CreationDate="2024-01-11T13:41:24.803" UserId="264" Text="Batch insert into StorageMap without iterations" ContentLicense="CC BY-SA 4.0" />
  <row Id="43061" PostHistoryTypeId="3" PostId="10800" RevisionGUID="70d9c23b-dac7-4848-a3af-977929cde1d8" CreationDate="2024-01-11T13:41:24.803" UserId="264" Text="|substrate-node-template|storagemap|batch|iteration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43062" PostHistoryTypeId="2" PostId="10801" RevisionGUID="d9e1fdbb-17fb-4a29-bb63-cd47199dd59a" CreationDate="2024-01-11T14:01:57.897" UserId="94" Text="There is currently no such method. I think it could exist, but it would need some refactor to directly pass a database transaction to the backend. Normally we dont have many batch insertions in a runtime, so it has been not that big of a problem.&#xD;&#xA;&#xD;&#xA;Batch operations are a foot-gun for parachains, since they need to pay close attention to their weight consumption. This also applies to `remove_all` and should always be used with a upper limit to its iteration size." ContentLicense="CC BY-SA 4.0" />
  <row Id="43064" PostHistoryTypeId="50" PostId="10198" RevisionGUID="ce60c4b3-51ce-4cc6-88c6-9ee5af035de7" CreationDate="2024-01-11T14:02:30.360" UserId="-1" />
  <row Id="43065" PostHistoryTypeId="2" PostId="10802" RevisionGUID="0d450ae2-2640-4ac3-a84c-9f2f3c688711" CreationDate="2024-01-11T14:03:11.907" UserId="3243" Text="I'm currently working on a substrate standalone chain and have implemented a pallet where off-chain workers submit price data of others chains (using CoinGecko).&#xD;&#xA;&#xD;&#xA;My requirement is for these prices to be updated by the workers every 20 seconds. However, I'm concerned about potential network congestion, for instance, if someone floods the system with an enormous volume of transactions.&#xD;&#xA;&#xD;&#xA;Could anyone advise on how to prevent such issues? Is there a mechanism to prioritize transactions in the queue, ensuring that specific extrinsics are always processed as a priority by validators ? &#xD;&#xA;I don't want to priorize specific account, but priorize extrinsics ! &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43067" PostHistoryTypeId="1" PostId="10802" RevisionGUID="0d450ae2-2640-4ac3-a84c-9f2f3c688711" CreationDate="2024-01-11T14:03:11.907" UserId="3243" Text="Ensuring Priority for Key Transactions in a Substrate Chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="43068" PostHistoryTypeId="3" PostId="10802" RevisionGUID="0d450ae2-2640-4ac3-a84c-9f2f3c688711" CreationDate="2024-01-11T14:03:11.907" UserId="3243" Text="|substrate-node-template|transactions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43069" PostHistoryTypeId="2" PostId="10803" RevisionGUID="980716e8-5569-441c-ac3c-71ce2669d795" CreationDate="2024-01-11T16:19:42.620" UserId="2762" Text="I had this issue in the past. As you mentioned you have to modify the value of the dmq_head. In this case set it to 0.&#xD;&#xA;&#xD;&#xA;The easiest way to do it is with PolkadotJS UI,&#xD;&#xA;First as you show get the storage key we need to change, going to query -&gt; dmp -&gt; downwardMessageQueueHeads -&gt; your-parachain-id:&#xD;&#xA;&#xD;&#xA; [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;Copy the `encoded storage key`.&#xD;&#xA;&#xD;&#xA;Now with Sudo -&gt; System -&gt; KillStorage (or SetStorage if you want to manually set one) -&gt; Paste the `encoded storage key`:&#xD;&#xA; [![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Is important to highlight that manually changing the storage is extremely dangerous, be sure you are using the right key.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/y4acK.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/KOZ9A.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43071" PostHistoryTypeId="52" PostId="10793" RevisionGUID="9690c0f4-36ba-4494-9c55-8607d1d7f142" CreationDate="2024-01-11T16:21:02.323" />
  <row Id="43072" PostHistoryTypeId="5" PostId="10802" RevisionGUID="8552264f-b8ff-4f8e-96cc-47da49e0f03e" CreationDate="2024-01-11T17:15:57.487" UserId="3243" Comment="deleted 38 characters in body" Text="I'm currently working on a substrate chain and have implemented a pallet where off-chain workers submit price data of other chains.&#xD;&#xA;&#xD;&#xA;My requirement is for these prices to be updated by the workers every 20 seconds. However, I'm concerned about potential network congestion, for instance, if someone floods the system with an enormous volume of transactions.&#xD;&#xA;&#xD;&#xA;Could anyone advise on how to prevent such issues? Is there a mechanism to prioritize transactions in the queue, ensuring that specific extrinsics are always processed as a priority by validators ? &#xD;&#xA;&#xD;&#xA;I don't want to prioritize by specific account, but by extrinsics !" ContentLicense="CC BY-SA 4.0" />
  <row Id="43074" PostHistoryTypeId="2" PostId="10804" RevisionGUID="dd6a80b0-70b6-4727-8314-85a26b99d803" CreationDate="2024-01-12T08:38:09.150" UserId="3977" Text="Is there any rate-limiting defense system in Substrate, that would prevent an attacker with sufficient funds to spam extrinsics on a given parachain ?&#xD;&#xA;&#xD;&#xA;Is there any maximum amount of extrinsics per block that an account can invoke ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43076" PostHistoryTypeId="1" PostId="10804" RevisionGUID="dd6a80b0-70b6-4727-8314-85a26b99d803" CreationDate="2024-01-12T08:38:09.150" UserId="3977" Text="Rate-limiting to prevent extrinsic spamming" ContentLicense="CC BY-SA 4.0" />
  <row Id="43077" PostHistoryTypeId="3" PostId="10804" RevisionGUID="dd6a80b0-70b6-4727-8314-85a26b99d803" CreationDate="2024-01-12T08:38:09.150" UserId="3977" Text="|extrinsic|security|spam|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43078" PostHistoryTypeId="2" PostId="10805" RevisionGUID="d5fbfaca-de53-41b5-8856-fabe3efe9167" CreationDate="2024-01-12T09:14:51.397" UserId="4794" Text="When I run ```cargo test```, it shows in console that: &#xD;&#xA;```&#xD;&#xA;running 0 tests&#xD;&#xA;&#xD;&#xA;test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s&#xD;&#xA;```&#xD;&#xA;for ```node-template```, ```pallet-template``` and ```node-template``` runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the code in file ```pallets/template/mock.rs```&#xD;&#xA;```&#xD;&#xA;use crate as pallet_template;&#xD;&#xA;use frame_support::traits::{ConstU16, ConstU64};&#xD;&#xA;use sp_core::H256;&#xD;&#xA;use sp_runtime::{&#xD;&#xA;	traits::{BlakeTwo256, IdentityLookup},&#xD;&#xA;	BuildStorage,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;type Block = frame_system::mocking::MockBlock&lt;Test&gt;;&#xD;&#xA;type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic&lt;Test&gt;;&#xD;&#xA;pub(crate) const ACCOUNT_A:u64 = 0;&#xD;&#xA;pub(crate) const ACCOUNT_B:u64 = 1;&#xD;&#xA;&#xD;&#xA;// Configure a mock runtime to test the pallet.&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		TemplateModule: pallet_template::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		ElectionProviderMultiPhase: pallet_election_provider_multi_phase,&#xD;&#xA;		Staking: pallet_staking,&#xD;&#xA;		Session: pallet_session,&#xD;&#xA;		Assets: pallet_assets,&#xD;&#xA;		VoterList: pallet_bags_list::&lt;Instance1&gt;,&#xD;&#xA;		Historical: pallet_session::historical::{Pallet},&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl frame_system::Config for Test {&#xD;&#xA;	type BaseCallFilter = frame_support::traits::Everything;&#xD;&#xA;	type BlockWeights = ();&#xD;&#xA;	type BlockLength = ();&#xD;&#xA;	type DbWeight = ();&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	type Nonce = u64;&#xD;&#xA;	type Hash = H256;&#xD;&#xA;	type Hashing = BlakeTwo256;&#xD;&#xA;	type AccountId = u64;&#xD;&#xA;	type Lookup = IdentityLookup&lt;Self::AccountId&gt;;&#xD;&#xA;	type Block = Block;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type BlockHashCount = ConstU64&lt;250&gt;;&#xD;&#xA;	type Version = ();&#xD;&#xA;	type PalletInfo = PalletInfo;&#xD;&#xA;	type AccountData = ();&#xD;&#xA;	type OnNewAccount = ();&#xD;&#xA;	type OnKilledAccount = ();&#xD;&#xA;	type SystemWeightInfo = ();&#xD;&#xA;	type SS58Prefix = ConstU16&lt;42&gt;;&#xD;&#xA;	type OnSetCode = ();&#xD;&#xA;	type MaxConsumers = frame_support::traits::ConstU32&lt;16&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_template::Config for Test {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type Token = Balances; // &lt;Self as pallet_balances::Config&gt;::Currency;&#xD;&#xA;	type Score = Assets;&#xD;&#xA;	type TaskCredit = Assets;&#xD;&#xA;	// type ScoreNow = ScoreType;&#xD;&#xA;	type ScoreBalance = AssetBalance;&#xD;&#xA;	type TaskCreditBalance = AssetBalance;&#xD;&#xA;	// type TaskCredit = Balances;&#xD;&#xA;	type TokenToTaskCredit = Identity;&#xD;&#xA;	type MaxTasksOwned = ConstU32&lt;100&gt;;&#xD;&#xA;	type AssetToCurrencyBalance = Identity;&#xD;&#xA;	type CurrencyToAssetBalance = Identity;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Build genesis storage according to the mock runtime.&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;	frame_system::GenesisConfig::&lt;Test&gt;::default().build_storage().unwrap().into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And in ```pallets/template/tests.rs```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use super::*;&#xD;&#xA;use crate::{mock::*, Error, Event};&#xD;&#xA;use frame_support::{assert_noop, assert_ok};&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn it_works_for_default_value() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Go past genesis block so events get deposited&#xD;&#xA;		System::set_block_number(1);&#xD;&#xA;		// Dispatch a signed extrinsic.&#xD;&#xA;		assert_ok!(TemplateModule::do_something(RuntimeOrigin::signed(1), 42));&#xD;&#xA;		// Read pallet storage and assert an expected result.&#xD;&#xA;		assert_eq!(TemplateModule::something(), Some(42));&#xD;&#xA;		// Assert that the correct event was deposited&#xD;&#xA;		System::assert_last_event(Event::SomethingStored { something: 42, who: 1 }.into());&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn correct_error_for_none_value() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Ensure the expected error is thrown when no value is present.&#xD;&#xA;		assert_noop!(&#xD;&#xA;			TemplateModule::cause_error(RuntimeOrigin::signed(1)),&#xD;&#xA;			Error::&lt;Test&gt;::NoneValue&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn the_task_is_stored_correctly() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Ensure the expected error is thrown when no value is present.&#xD;&#xA;		assert_ok!(TemplateModule::deposit_token_to_taskcredit(RuntimeOrigin::signed(ACCOUNT_A), 1234));&#xD;&#xA;		assert_ok!(TemplateModule::create_task(RuntimeOrigin::signed(ACCOUNT_A), &quot;hello&quot;, 12));&#xD;&#xA;		&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it still runs the tests written in ```runtime/src.rs```.&#xD;&#xA;How to solve this problem? Thank you&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43080" PostHistoryTypeId="1" PostId="10805" RevisionGUID="d5fbfaca-de53-41b5-8856-fabe3efe9167" CreationDate="2024-01-12T09:14:51.397" UserId="4794" Text="the tests of pallet-template is not running" ContentLicense="CC BY-SA 4.0" />
  <row Id="43081" PostHistoryTypeId="3" PostId="10805" RevisionGUID="d5fbfaca-de53-41b5-8856-fabe3efe9167" CreationDate="2024-01-12T09:14:51.397" UserId="4794" Text="|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43082" PostHistoryTypeId="2" PostId="10806" RevisionGUID="e6c834b2-8d87-4125-a389-e8a6c5c510ca" CreationDate="2024-01-12T11:20:58.893" UserId="251" Text="Testing the runtime crate won't cover the pallet crates.&#xD;&#xA;&#xD;&#xA;To test a single pallet&#xD;&#xA;```&#xD;&#xA;cargo test -p pallet-template&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;To test the whole workspace&#xD;&#xA;```&#xD;&#xA;# run this under the project root&#xD;&#xA;cargo test&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43084" PostHistoryTypeId="2" PostId="10807" RevisionGUID="c069181d-51f7-49cb-ba97-2529d0c4cd2c" CreationDate="2024-01-12T13:37:28.423" UserId="3317" Text="In [pallet-staking][1] you can see that `type Currency` has to implement the `LockableCurrency` trait which is implemented for [pallet-balances][2].&#xD;&#xA;&#xD;&#xA;Unfortunately this isn't implemented for `pallet-assets`. You could make your own `pallet-lockable-assets` by implementing the trait (if that is possible, didn't check) and use that for your Kitty pallet. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/f7306d327e0eee0a641ac43628ab525b0096ba7c/substrate/frame/staking/src/pallet/mod.rs#L90&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/6579d6cce6dea8f2d9c5b39110fc393334363957/substrate/frame/balances/src/impl_currency.rs#L852" ContentLicense="CC BY-SA 4.0" />
  <row Id="43086" PostHistoryTypeId="5" PostId="10805" RevisionGUID="5367f30a-d95b-499e-acfb-5ea5d6d14d9a" CreationDate="2024-01-12T15:47:35.037" UserId="4794" Comment="added 140 characters in body; edited title" Text="When I run ```cargo test```, it shows in console that: &#xD;&#xA;```&#xD;&#xA;running 0 tests&#xD;&#xA;&#xD;&#xA;test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s&#xD;&#xA;```&#xD;&#xA;for ```node-template```, ```pallet-template``` and ```node-template``` runtime.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the code in file ```pallets/template/mock.rs```&#xD;&#xA;```&#xD;&#xA;use crate as pallet_template;&#xD;&#xA;use frame_support::traits::{ConstU16, ConstU64};&#xD;&#xA;use sp_core::H256;&#xD;&#xA;use sp_runtime::{&#xD;&#xA;	traits::{BlakeTwo256, IdentityLookup},&#xD;&#xA;	BuildStorage,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;type Block = frame_system::mocking::MockBlock&lt;Test&gt;;&#xD;&#xA;type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic&lt;Test&gt;;&#xD;&#xA;pub(crate) const ACCOUNT_A:u64 = 0;&#xD;&#xA;pub(crate) const ACCOUNT_B:u64 = 1;&#xD;&#xA;&#xD;&#xA;// Configure a mock runtime to test the pallet.&#xD;&#xA;frame_support::construct_runtime!(&#xD;&#xA;	pub enum Test where&#xD;&#xA;		Block = Block,&#xD;&#xA;		NodeBlock = Block,&#xD;&#xA;		UncheckedExtrinsic = UncheckedExtrinsic&#xD;&#xA;	{&#xD;&#xA;		System: frame_system::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		TemplateModule: pallet_template::{Pallet, Call, Storage, Event&lt;T&gt;},&#xD;&#xA;		ElectionProviderMultiPhase: pallet_election_provider_multi_phase,&#xD;&#xA;		Staking: pallet_staking,&#xD;&#xA;		Session: pallet_session,&#xD;&#xA;		Assets: pallet_assets,&#xD;&#xA;		VoterList: pallet_bags_list::&lt;Instance1&gt;,&#xD;&#xA;		Historical: pallet_session::historical::{Pallet},&#xD;&#xA;		&#xD;&#xA;		&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;impl frame_system::Config for Test {&#xD;&#xA;	type BaseCallFilter = frame_support::traits::Everything;&#xD;&#xA;	type BlockWeights = ();&#xD;&#xA;	type BlockLength = ();&#xD;&#xA;	type DbWeight = ();&#xD;&#xA;	type RuntimeOrigin = RuntimeOrigin;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	type Nonce = u64;&#xD;&#xA;	type Hash = H256;&#xD;&#xA;	type Hashing = BlakeTwo256;&#xD;&#xA;	type AccountId = u64;&#xD;&#xA;	type Lookup = IdentityLookup&lt;Self::AccountId&gt;;&#xD;&#xA;	type Block = Block;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type BlockHashCount = ConstU64&lt;250&gt;;&#xD;&#xA;	type Version = ();&#xD;&#xA;	type PalletInfo = PalletInfo;&#xD;&#xA;	type AccountData = ();&#xD;&#xA;	type OnNewAccount = ();&#xD;&#xA;	type OnKilledAccount = ();&#xD;&#xA;	type SystemWeightInfo = ();&#xD;&#xA;	type SS58Prefix = ConstU16&lt;42&gt;;&#xD;&#xA;	type OnSetCode = ();&#xD;&#xA;	type MaxConsumers = frame_support::traits::ConstU32&lt;16&gt;;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_template::Config for Test {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;	type Token = Balances; // &lt;Self as pallet_balances::Config&gt;::Currency;&#xD;&#xA;	type Score = Assets;&#xD;&#xA;	type TaskCredit = Assets;&#xD;&#xA;	// type ScoreNow = ScoreType;&#xD;&#xA;	type ScoreBalance = AssetBalance;&#xD;&#xA;	type TaskCreditBalance = AssetBalance;&#xD;&#xA;	// type TaskCredit = Balances;&#xD;&#xA;	type TokenToTaskCredit = Identity;&#xD;&#xA;	type MaxTasksOwned = ConstU32&lt;100&gt;;&#xD;&#xA;	type AssetToCurrencyBalance = Identity;&#xD;&#xA;	type CurrencyToAssetBalance = Identity;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// Build genesis storage according to the mock runtime.&#xD;&#xA;pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;	frame_system::GenesisConfig::&lt;Test&gt;::default().build_storage().unwrap().into()&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And in ```pallets/template/tests.rs```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use super::*;&#xD;&#xA;use crate::{mock::*, Error, Event};&#xD;&#xA;use frame_support::{assert_noop, assert_ok};&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn it_works_for_default_value() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Go past genesis block so events get deposited&#xD;&#xA;		System::set_block_number(1);&#xD;&#xA;		// Dispatch a signed extrinsic.&#xD;&#xA;		assert_ok!(TemplateModule::do_something(RuntimeOrigin::signed(1), 42));&#xD;&#xA;		// Read pallet storage and assert an expected result.&#xD;&#xA;		assert_eq!(TemplateModule::something(), Some(42));&#xD;&#xA;		// Assert that the correct event was deposited&#xD;&#xA;		System::assert_last_event(Event::SomethingStored { something: 42, who: 1 }.into());&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn correct_error_for_none_value() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Ensure the expected error is thrown when no value is present.&#xD;&#xA;		assert_noop!(&#xD;&#xA;			TemplateModule::cause_error(RuntimeOrigin::signed(1)),&#xD;&#xA;			Error::&lt;Test&gt;::NoneValue&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn the_task_is_stored_correctly() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		// Ensure the expected error is thrown when no value is present.&#xD;&#xA;		assert_ok!(TemplateModule::deposit_token_to_taskcredit(RuntimeOrigin::signed(ACCOUNT_A), 1234));&#xD;&#xA;		assert_ok!(TemplateModule::create_task(RuntimeOrigin::signed(ACCOUNT_A), &quot;hello&quot;, 12));&#xD;&#xA;		&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But it still runs the tests written in ```runtime/src.rs```.&#xD;&#xA;I also tried:&#xD;&#xA;```cargo test -p pallet-template```&#xD;&#xA;or cd to folder ```pallets/template``` then run ```cargo test```, but nothing works.&#xD;&#xA;&#xD;&#xA;How to solve this problem? Thank you&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43087" PostHistoryTypeId="4" PostId="10805" RevisionGUID="5367f30a-d95b-499e-acfb-5ea5d6d14d9a" CreationDate="2024-01-12T15:47:35.037" UserId="4794" Comment="added 140 characters in body; edited title" Text="None of the tests of pallet-template is running" ContentLicense="CC BY-SA 4.0" />
  <row Id="43088" PostHistoryTypeId="2" PostId="10808" RevisionGUID="0d01906c-9f8b-4183-8ed4-06eb31aa8261" CreationDate="2024-01-12T20:31:33.047" UserId="5070" Text="I'm running a `polkadot-js/apps` instance here with the following command:&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;docker run -it --name polkadot-ui -e WS_URL=&lt;NODE_URL&gt; -p 80:80 jacogr/polkadot-js-apps:latest&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The web UI is being served and the browser can load it. But the app tries to connect to `ws://127.0.0.1:9944` instead of the provided `&lt;NODE_URL&gt;`.&#xD;&#xA;&#xD;&#xA;[This](https://github.com/polkadot-js/apps/blob/faa6b3a205ad5030d9d7b67e806426996e4b1580/packages/apps/src/initSettings.ts#L54) seems to be the place where the URL is resolved.&#xD;&#xA;&#xD;&#xA;There are some interaction with the packages `@polkadot/apps-config` and `@polkadot/ui-settings` (which is in another repo).&#xD;&#xA;&#xD;&#xA;How can I set the default endpoint for the websocket/RPC url on the frontend? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43090" PostHistoryTypeId="1" PostId="10808" RevisionGUID="0d01906c-9f8b-4183-8ed4-06eb31aa8261" CreationDate="2024-01-12T20:31:33.047" UserId="5070" Text="setting default endpoint for `polkadot-js/apps` explorer" ContentLicense="CC BY-SA 4.0" />
  <row Id="43091" PostHistoryTypeId="3" PostId="10808" RevisionGUID="0d01906c-9f8b-4183-8ed4-06eb31aa8261" CreationDate="2024-01-12T20:31:33.047" UserId="5070" Text="|polkadot-js|apps|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43092" PostHistoryTypeId="2" PostId="10809" RevisionGUID="ada40918-dfb1-4483-aff8-5a32cdd8cfac" CreationDate="2024-01-12T20:59:39.617" UserId="2099" Text="The trait `RuntimeApiSubsystemClient` and its implementation `DefaultSubsystemClient` &#xD;&#xA;&#xD;&#xA;(https://github.com/paritytech/polkadot-sdk/blob/c421b87978404954dec4555895d50ef028b73cf0/polkadot/node/subsystem-types/src/runtime_client.rs#L351)&#xD;&#xA;&#xD;&#xA;has all methods marked as `async`, even though none of the code requires it.&#xD;&#xA;The implementation invokes the `runtime_api()` from the trait bound `ProvideRuntimeApi` which does not have any `async` methods. Neither do any of the other trait bounds.&#xD;&#xA;&#xD;&#xA;The `.await` keyword is never used which makes me wonder why the `async` keyword has not been remove from the trait `RuntimeApiSubsystemClient`. &#xD;&#xA;&#xD;&#xA;Is this a historic leftover?&#xD;&#xA;I imagine the runtime-api once provided `async` interfaces, which does not seem to be the case any more. The spawned wasm instance works provides synchronous interfaces for the runtime-api, correct?&#xD;&#xA;&#xD;&#xA;In our codebase I was able to easily remove the `async` from the trait and implemention without any problems. All tests run fine and there seems to be literally no reason the methods should be `async`.&#xD;&#xA;&#xD;&#xA;Any input on this or background on this historic development would be appreciated.&#xD;&#xA;&#xD;&#xA;Kind regards,&#xD;&#xA;&#xD;&#xA;Mathis Wellmann, gensyn.ai&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43094" PostHistoryTypeId="1" PostId="10809" RevisionGUID="ada40918-dfb1-4483-aff8-5a32cdd8cfac" CreationDate="2024-01-12T20:59:39.617" UserId="2099" Text="Why are any of the `RuntimeApiSubsystemClient` trait methods marked `async` when its not needed?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43095" PostHistoryTypeId="3" PostId="10809" RevisionGUID="ada40918-dfb1-4483-aff8-5a32cdd8cfac" CreationDate="2024-01-12T20:59:39.617" UserId="2099" Text="|wasm|runtime-api|subsystems|runtime-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43096" PostHistoryTypeId="50" PostId="8130" RevisionGUID="870ab757-bae6-4eaf-8bbc-d38087781666" CreationDate="2024-01-12T23:00:30.103" UserId="-1" />
  <row Id="43098" PostHistoryTypeId="2" PostId="10810" RevisionGUID="fcee85c9-6fce-404d-b13e-22d2317ff840" CreationDate="2024-01-13T03:54:05.070" UserId="5023" Text="I'm trying to figure out the best route to take to accomplish calling specific functions that are not publically available for accounts to freely call&#xD;&#xA;&#xD;&#xA;I have a few functions i want only to be called by users voting and/or delegating voting.&#xD;&#xA;&#xD;&#xA;Which pallet or pallets should be implemented to accomplish this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43100" PostHistoryTypeId="1" PostId="10810" RevisionGUID="fcee85c9-6fce-404d-b13e-22d2317ff840" CreationDate="2024-01-13T03:54:05.070" UserId="5023" Text="Democracy pallet vs referenda pallet for calling a &quot;private&quot; function" ContentLicense="CC BY-SA 4.0" />
  <row Id="43101" PostHistoryTypeId="3" PostId="10810" RevisionGUID="fcee85c9-6fce-404d-b13e-22d2317ff840" CreationDate="2024-01-13T03:54:05.070" UserId="5023" Text="|democracy|pallet-democracy|referenda|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43102" PostHistoryTypeId="2" PostId="10811" RevisionGUID="12d8c3ad-5d67-40df-9edb-a254f717441b" CreationDate="2024-01-13T09:09:22.513" UserId="5065" Text="You may use:&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' ie era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;or for the paticular era:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const paticularEra=1319;&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries(api.createType('EraIndex', paticularEra));&#xD;&#xA;```&#xD;&#xA;or for the paticular era and validator:&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers(currentEra, VALIDATOR);&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    Note: This is deprecated, should be used as read-only and will be removed in the future.&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43104" PostHistoryTypeId="5" PostId="10811" RevisionGUID="1254a3d5-b7ab-4cce-89a3-3c868bf8ed58" CreationDate="2024-01-13T09:26:02.717" UserId="5065" Comment="added 284 characters in body" Text="You may use for the particular era:&#xD;&#xA;``` lang-js&#xD;&#xA;    const paticularEra=1319;&#xD;&#xA;    const stakers = await api.query.staking.erasStakers(api.createType('EraIndex', paticularEra), VALIDATOR);&#xD;&#xA;&#xD;&#xA;    console.log('validators and nominators inside (other):',&#xD;&#xA;        JSON.parse(JSON.stringify(stakers)));&#xD;&#xA;```&#xD;&#xA;Output will be like (where `others` is validators):&#xD;&#xA;```&#xD;&#xA;  total: '0x0000000000000000005b9ef09bfade21',&#xD;&#xA;  own: 100000000000000,&#xD;&#xA;  others: [&#xD;&#xA;    {&#xD;&#xA;      who: '13yrrdCBQQ9RTy2dVFJ8yC6jQdJs5HqHrZZcVCYxsbJtCc82',&#xD;&#xA;      value: 70458858722673&#xD;&#xA;&#xD;&#xA;    },&#xD;&#xA;   ]&#xD;&#xA;```&#xD;&#xA;or for the all eras and validators:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' ie era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    Note: This is deprecated, should be used as read-only and will be removed in the future.&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43105" PostHistoryTypeId="5" PostId="10811" RevisionGUID="82ec0097-d6c0-4747-b06e-988f1f1dbd29" CreationDate="2024-01-13T09:26:25.543" UserId="5065" Comment="added 1 character in body" Text="You may use for the particular era:&#xD;&#xA;``` lang-js&#xD;&#xA;    const particularEra=1319;&#xD;&#xA;    const stakers = await api.query.staking.erasStakers(api.createType('EraIndex', paticularEra), VALIDATOR);&#xD;&#xA;&#xD;&#xA;    console.log('validators and nominators inside (other):',&#xD;&#xA;        JSON.parse(JSON.stringify(stakers)));&#xD;&#xA;```&#xD;&#xA;Output will be like (where `others` is validators):&#xD;&#xA;```&#xD;&#xA;  total: '0x0000000000000000005b9ef09bfade21',&#xD;&#xA;  own: 100000000000000,&#xD;&#xA;  others: [&#xD;&#xA;    {&#xD;&#xA;      who: '13yrrdCBQQ9RTy2dVFJ8yC6jQdJs5HqHrZZcVCYxsbJtCc82',&#xD;&#xA;      value: 70458858722673&#xD;&#xA;&#xD;&#xA;    },&#xD;&#xA;   ]&#xD;&#xA;```&#xD;&#xA;or for the all eras and validators:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' ie era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    Note: This is deprecated, should be used as read-only and will be removed in the future.&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43106" PostHistoryTypeId="5" PostId="10811" RevisionGUID="6d765513-5b3d-4b5b-bcdc-8c653d8defeb" CreationDate="2024-01-13T09:27:46.097" UserId="5065" Comment="added 1 character in body" Text="You may use for the particular era:&#xD;&#xA;``` lang-js&#xD;&#xA;    const particularEra=1319;&#xD;&#xA;    const stakers = await api.query.staking.erasStakers(api.createType('EraIndex', paticularEra), VALIDATOR);&#xD;&#xA;&#xD;&#xA;    console.log('validators and nominators inside (other):',&#xD;&#xA;        JSON.parse(JSON.stringify(stakers)));&#xD;&#xA;```&#xD;&#xA;Output will be like (where `others` are validators):&#xD;&#xA;```&#xD;&#xA;  total: '0x0000000000000000005b9ef09bfade21',&#xD;&#xA;  own: 100000000000000,&#xD;&#xA;  others: [&#xD;&#xA;    {&#xD;&#xA;      who: '13yrrdCBQQ9RTy2dVFJ8yC6jQdJs5HqHrZZcVCYxsbJtCc82',&#xD;&#xA;      value: 70458858722673&#xD;&#xA;&#xD;&#xA;    },&#xD;&#xA;   ]&#xD;&#xA;```&#xD;&#xA;or for the all eras and validators:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' ie era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    Note: This is deprecated, should be used as read-only and will be removed in the future.&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43107" PostHistoryTypeId="5" PostId="10811" RevisionGUID="b3ce4e93-c2b4-445f-9ee0-09a9bb9d52e3" CreationDate="2024-01-13T09:30:16.757" UserId="5065" Comment="edited body" Text="You may use for the particular era:&#xD;&#xA;``` lang-js&#xD;&#xA;    const particularEra=1319;&#xD;&#xA;    const stakers = await api.query.staking.erasStakers(api.createType('EraIndex', paticularEra), VALIDATOR);&#xD;&#xA;&#xD;&#xA;    console.log('validators and nominators inside (other):',&#xD;&#xA;        JSON.parse(JSON.stringify(stakers)));&#xD;&#xA;```&#xD;&#xA;Output will be like (where `others` are validators):&#xD;&#xA;```&#xD;&#xA;  total: '0x0000000000000000005b9ef09bfade21',&#xD;&#xA;  own: 100000000000000,&#xD;&#xA;  others: [&#xD;&#xA;    {&#xD;&#xA;      who: '13yrrdCBQQ9RTy2dVFJ8yC6jQdJs5HqHrZZcVCYxsbJtCc82',&#xD;&#xA;      value: 70458858722673&#xD;&#xA;&#xD;&#xA;    },&#xD;&#xA;   ]&#xD;&#xA;```&#xD;&#xA;or for the all eras and validators:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' is era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    Note: This is deprecated, should be used as read-only and will be removed in the future.&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43108" PostHistoryTypeId="5" PostId="10811" RevisionGUID="d8bad7ec-31b9-4947-b9c9-e656d5e5c695" CreationDate="2024-01-13T09:30:58.083" UserId="5065" Comment="deleted 85 characters in body" Text="You may use for the particular era:&#xD;&#xA;``` lang-js&#xD;&#xA;    const particularEra=1319;&#xD;&#xA;    const stakers = await api.query.staking.erasStakers(api.createType('EraIndex', paticularEra), VALIDATOR);&#xD;&#xA;&#xD;&#xA;    console.log('validators and nominators inside (other):',&#xD;&#xA;        JSON.parse(JSON.stringify(stakers)));&#xD;&#xA;```&#xD;&#xA;Output will be like (where `others` are validators):&#xD;&#xA;```&#xD;&#xA;  total: '0x0000000000000000005b9ef09bfade21',&#xD;&#xA;  own: 100000000000000,&#xD;&#xA;  others: [&#xD;&#xA;    {&#xD;&#xA;      who: '13yrrdCBQQ9RTy2dVFJ8yC6jQdJs5HqHrZZcVCYxsbJtCc82',&#xD;&#xA;      value: 70458858722673&#xD;&#xA;&#xD;&#xA;    },&#xD;&#xA;   ]&#xD;&#xA;```&#xD;&#xA;or for the all eras and validators:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' is era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    ...&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43109" PostHistoryTypeId="5" PostId="10811" RevisionGUID="a4d1ee4d-c1ae-41fa-90b9-fef9fcbc4431" CreationDate="2024-01-13T09:32:20.580" UserId="5065" Comment="deleted 1 character in body" Text="You may use for the particular era:&#xD;&#xA;``` lang-js&#xD;&#xA;    const particularEra=1319;&#xD;&#xA;    const stakers = await api.query.staking.erasStakers(api.createType('EraIndex', paticularEra), VALIDATOR);&#xD;&#xA;&#xD;&#xA;    console.log('validator and nominators inside (other):',&#xD;&#xA;        JSON.parse(JSON.stringify(stakers)));&#xD;&#xA;```&#xD;&#xA;Output will be like (where `others` are validators):&#xD;&#xA;```&#xD;&#xA;  total: '0x0000000000000000005b9ef09bfade21',&#xD;&#xA;  own: 100000000000000,&#xD;&#xA;  others: [&#xD;&#xA;    {&#xD;&#xA;      who: '13yrrdCBQQ9RTy2dVFJ8yC6jQdJs5HqHrZZcVCYxsbJtCc82',&#xD;&#xA;      value: 70458858722673&#xD;&#xA;&#xD;&#xA;    },&#xD;&#xA;   ]&#xD;&#xA;```&#xD;&#xA;or for the all eras and validators:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' is era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    ...&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43110" PostHistoryTypeId="5" PostId="10811" RevisionGUID="c69623bb-45f4-4d75-aba6-c5df89455623" CreationDate="2024-01-13T09:32:50.643" UserId="5065" Comment="added 5 characters in body" Text="You may use for the particular era:&#xD;&#xA;``` lang-js&#xD;&#xA;    const particularEra=1319;&#xD;&#xA;    const stakers = await api.query.staking.erasStakers(api.createType('EraIndex', paticularEra), VALIDATOR);&#xD;&#xA;&#xD;&#xA;    console.log('validator and nominators inside (other):',&#xD;&#xA;        JSON.parse(JSON.stringify(stakers)));&#xD;&#xA;```&#xD;&#xA;Output will be like (where `others` are validators):&#xD;&#xA;```&#xD;&#xA;  total: '0x0000000000000000005b9ef09bfade21',&#xD;&#xA;  own: 100000000000000,&#xD;&#xA;  others: [&#xD;&#xA;    {&#xD;&#xA;      who: '13yrrdCBQQ9RTy2dVFJ8yC6jQdJs5HqHrZZcVCYxsbJtCc82',&#xD;&#xA;      value: 70458858722673&#xD;&#xA;&#xD;&#xA;    },&#xD;&#xA;...&#xD;&#xA;   ]&#xD;&#xA;```&#xD;&#xA;or for the all eras and validators:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' is era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    ...&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43111" PostHistoryTypeId="5" PostId="10811" RevisionGUID="79caf6af-3110-4ef4-86f6-c0cf5a602a2f" CreationDate="2024-01-13T09:37:02.363" UserId="5065" Comment="deleted 4 characters in body" Text="You may use for the particular era:&#xD;&#xA;``` lang-js&#xD;&#xA;    const particularEra=1319;&#xD;&#xA;    const stakers = await api.query.staking.erasStakers(api.createType('EraIndex', paticularEra), VALIDATOR);&#xD;&#xA;&#xD;&#xA;    console.log('validator and nominators inside (other):',&#xD;&#xA;        JSON.parse(JSON.stringify(stakers)));&#xD;&#xA;```&#xD;&#xA;Output will be like (where `others` are validators):&#xD;&#xA;```&#xD;&#xA;  total: '0x0000000000000000005b9ef09bfade21',&#xD;&#xA;  own: 100000000000000,&#xD;&#xA;  others: [&#xD;&#xA;    {&#xD;&#xA;      who: '13yrrdCBQQ9RTy2dVFJ8yC6jQdJs5HqHrZZcVCYxsbJtCc82',&#xD;&#xA;      value: 70458858722673&#xD;&#xA;&#xD;&#xA;    },&#xD;&#xA;...&#xD;&#xA;   ]&#xD;&#xA;```&#xD;&#xA;or for all eras and validators:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' is era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    ...&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43112" PostHistoryTypeId="5" PostId="10811" RevisionGUID="5c8163fd-04d0-44f6-a277-457be0c1868e" CreationDate="2024-01-13T09:37:28.100" UserId="5065" Comment="edited body" Text="You may use for the particular era:&#xD;&#xA;``` lang-js&#xD;&#xA;    const particularEra=1319;&#xD;&#xA;    const stakers = await api.query.staking.erasStakers(api.createType('EraIndex', paticularEra), VALIDATOR);&#xD;&#xA;&#xD;&#xA;    console.log('validator and nominators inside (other):',&#xD;&#xA;        JSON.parse(JSON.stringify(stakers)));&#xD;&#xA;```&#xD;&#xA;Output will be like (where `others` are validators):&#xD;&#xA;```&#xD;&#xA;  total: '0x0000000000000000005b9ef09bfade21',&#xD;&#xA;  own: 100000000000000,&#xD;&#xA;  others: [&#xD;&#xA;    {&#xD;&#xA;      who: '13yrrdCBQQ9RTy2dVFJ8yC6jQdJs5HqHrZZcVCYxsbJtCc82',&#xD;&#xA;      value: 70458858722673&#xD;&#xA;&#xD;&#xA;    },&#xD;&#xA;...&#xD;&#xA;   ]&#xD;&#xA;```&#xD;&#xA;Or for all eras and validators:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' is era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    ...&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43113" PostHistoryTypeId="5" PostId="10811" RevisionGUID="e6859c43-97d0-4a0f-be9e-15e72beb29f1" CreationDate="2024-01-13T09:40:40.767" UserId="5065" Comment="added 14 characters in body" Text="You may use for the particular era:&#xD;&#xA;``` lang-js&#xD;&#xA;    const particularEra=1319;&#xD;&#xA;    const stakers = await api.query.staking.erasStakers(api.createType('EraIndex', paticularEra), VALIDATOR);&#xD;&#xA;&#xD;&#xA;    console.log('validator and nominators inside (other):',&#xD;&#xA;        JSON.parse(JSON.stringify(stakers)));&#xD;&#xA;```&#xD;&#xA;Output will be like (where `others` are validators):&#xD;&#xA;```&#xD;&#xA;  total: '0x0000000000000000005b9ef09bfade21',&#xD;&#xA;  own: 100000000000000,&#xD;&#xA;  others: [&#xD;&#xA;    {&#xD;&#xA;      who: '13yrrdCBQQ9RTy2dVFJ8yC6jQdJs5HqHrZZcVCYxsbJtCc82',&#xD;&#xA;      value: 70458858722673&#xD;&#xA;&#xD;&#xA;    },&#xD;&#xA;...&#xD;&#xA;   ]&#xD;&#xA;```&#xD;&#xA;Or for all eras and validators:&#xD;&#xA;&#xD;&#xA;``` lang-js&#xD;&#xA;const stakers = await api.query.staking.erasStakers.entries();&#xD;&#xA;&#xD;&#xA;stakers&#xD;&#xA;    .forEach((x) =&gt; {&#xD;&#xA;        console.log(`Validator: ======================\n\n`,&#xD;&#xA;            x[0].toHuman());&#xD;&#xA;        console.log(`Nominators:\n\n`,&#xD;&#xA;            x[1].others.toJSON());&#xD;&#xA;    });&#xD;&#xA;```&#xD;&#xA;Output will be like ('1,320' is era):&#xD;&#xA;```&#xD;&#xA;Validator: ======================&#xD;&#xA;&#xD;&#xA; [ '1,320', '138X7AdRKX7myWMwoFgWfHj1WUZKKZrKTr2CZ8pGUUXTrkDu' ]&#xD;&#xA;Nominators:&#xD;&#xA;&#xD;&#xA; [&#xD;&#xA;  {&#xD;&#xA;    who: '15qunVeyLEybbNzwhG9Zo4Xz8dtbzc2r58eydd31M3wiz2y3',&#xD;&#xA;    value: 1135000000000000&#xD;&#xA;  },&#xD;&#xA;...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;Minor comments:&#xD;&#xA;&#xD;&#xA;[Spec saids][1] about `erasStakers`:&#xD;&#xA;&#xD;&#xA;    Note: Deprecated since v14. Use `EraInfo` instead to work with exposures.&#xD;&#xA;    ...&#xD;&#xA;    New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead.&#xD;&#xA;&#xD;&#xA;But `EraInfo` and `erasStakersPaged` still not exists.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/blob/747855b161fd6fad58c58cdaafbca407f903823d/packages/api-augment/src/substrate/query.ts#L1757C10-L1757C83" ContentLicense="CC BY-SA 4.0" />
  <row Id="43114" PostHistoryTypeId="2" PostId="10812" RevisionGUID="13896a34-8ad0-4543-9a9b-dea7cb2d1e95" CreationDate="2024-01-13T23:57:35.763" UserId="298" Text="Im trying to replicate the addresses for a nomination pool so that i can remove it from a snapshot. &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const { u8aConcat, bnToU8a, stringToU8a } = require('@polkadot/util');&#xD;&#xA;const { blake2AsU8a } = require( '@polkadot/util-crypto');&#xD;&#xA;const { encodeAddress } = require('@polkadot/keyring');&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;const palletId = new Uint8Array([...Buffer.from('py/nom')]); // guessing py/nom or something like this?&#xD;&#xA;// pool id&#xD;&#xA;const poolId = 19; // example poolid&#xD;&#xA;// prefix, 0 for Polkadot&#xD;&#xA;const prefix = 0;&#xD;&#xA;&#xD;&#xA;// create a sub account for the pool&#xD;&#xA;function createSubAccount(palletId, poolId) {&#xD;&#xA;  // AccountType::Bonded is assumed to be 0&#xD;&#xA;  const accountType = new Uint8Array([0x00]);&#xD;&#xA;&#xD;&#xA;  // concat palletId, accountType and poolId&#xD;&#xA;  const combined = u8aConcat(palletId, accountType, bnToU8a(poolId, { bitLength: 64, isLe: true }));&#xD;&#xA;&#xD;&#xA;  // hash combined data&#xD;&#xA;  const hashed = blake2AsU8a(combined);&#xD;&#xA;&#xD;&#xA;  return hashed;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// generate the sub-account ID&#xD;&#xA;const subAccountId = createSubAccount(palletId, poolId);&#xD;&#xA;&#xD;&#xA;// ss58 format&#xD;&#xA;const ss58Address = encodeAddress(subAccountId, prefix);&#xD;&#xA;&#xD;&#xA;console.log(ss58Address);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;pool 19 is an example:&#xD;&#xA;`13UVJyLnbVp8c4FQeiGDv7fdkw25yW9K6LhfsajWcUPcqPa2`&#xD;&#xA;&#xD;&#xA;the above code is of course producing an incorrect id. &#xD;&#xA;&#xD;&#xA;i am trying to replicate it and every pool. &#xD;&#xA;&#xD;&#xA;Can you show me what i am missing?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43116" PostHistoryTypeId="1" PostId="10812" RevisionGUID="13896a34-8ad0-4543-9a9b-dea7cb2d1e95" CreationDate="2024-01-13T23:57:35.763" UserId="298" Text="how do i calculate the nomination pool address?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43117" PostHistoryTypeId="3" PostId="10812" RevisionGUID="13896a34-8ad0-4543-9a9b-dea7cb2d1e95" CreationDate="2024-01-13T23:57:35.763" UserId="298" Text="|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43118" PostHistoryTypeId="2" PostId="10813" RevisionGUID="91e3ddd6-ac59-4df6-b20c-4e0b3d237885" CreationDate="2024-01-14T01:02:32.477" UserId="5072" Text="The PalletId you are looking for is `modlpy/nopls`. pool stash publkey will look something like hex(`modlpy/nopls`) + 2bytes poolID padded into 64 bytes.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const { u8aConcat, bnToU8a, stringToU8a, stringToHex, u8aToHex} = require('@polkadot/util');&#xD;&#xA;const { encodeAddress } = require('@polkadot/keyring');&#xD;&#xA;const palletId = 'modlpy/nopls'&#xD;&#xA;// pool id&#xD;&#xA;const poolId = 19; // example poolid&#xD;&#xA;// prefix, 0 for Polkadot&#xD;&#xA;const prefix = 0;&#xD;&#xA;&#xD;&#xA;//create a sub account for the pool&#xD;&#xA;//Public key:&#xD;&#xA;//0x6d6f646c70792f6e6f706c730013000000000000000000000000000000000000 (pool 19)&#xD;&#xA;function createSubAccount(palletId = 'modlpy/nopls', poolId = 19) {&#xD;&#xA;  // AccountType::Bonded is assumed to be 0&#xD;&#xA;  const accountType = new Uint8Array([0x00]);&#xD;&#xA;&#xD;&#xA;  var prefix = stringToHex(palletId) // modlpy/nopls -&gt; 0x6d6f646c70792f6e6f706c73&#xD;&#xA;  var poolIdEncoded = u8aToHex(bnToU8a(poolId, { bitLength: 16, isLe: false })).substr(2) // 2byte. 19 -&gt;0013&#xD;&#xA;  var poolStashPubkey = (prefix + poolIdEncoded).padEnd(66,'0') &#xD;&#xA;  return poolStashPubkey&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;// generate the sub-account ID&#xD;&#xA;const subAccountId = createSubAccount(palletId, poolId);&#xD;&#xA;//0x6d6f646c70792f6e6f706c7313000000000000000000000000000000000000&#xD;&#xA;&#xD;&#xA;// ss58 format&#xD;&#xA;const ss58Address = encodeAddress(subAccountId, prefix);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;console.log(ss58Address);&#xD;&#xA;//13UVJyLnbVp8c4FQeiGDv7fdkw25yW9K6LhfsajWcUPcqPa2&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;See [here](https://gist.github.com/mkchungs/010c3bbafdf48e3be0436f1c826e408f) for pool#1 - pool#511's stash address" ContentLicense="CC BY-SA 4.0" />
  <row Id="43120" PostHistoryTypeId="12" PostId="10813" RevisionGUID="2a0becb3-5b2c-4f5d-a493-758ffb921f07" CreationDate="2024-01-14T01:15:31.410" UserId="5072" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:5072,&quot;DisplayName&quot;:&quot;user5072&quot;}],&quot;DeleteType&quot;:1}" />
  <row Id="43121" PostHistoryTypeId="5" PostId="10813" RevisionGUID="9d493647-2e32-4c95-a561-452aef0c78bb" CreationDate="2024-01-14T01:32:34.337" UserId="5072" Comment="deleted 1346 characters in body" Text="The PalletId you are looking for is `modlpy/nopls`. Replacing your current `py/nom` with `modlpy/nopls` gives the correct answer" ContentLicense="CC BY-SA 4.0" />
  <row Id="43122" PostHistoryTypeId="13" PostId="10813" RevisionGUID="004e4fbf-2a9e-40f2-9a1f-2cb922723276" CreationDate="2024-01-14T01:32:47.313" UserId="5072" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:5072,&quot;DisplayName&quot;:&quot;user5072&quot;}]}" />
  <row Id="43123" PostHistoryTypeId="2" PostId="10814" RevisionGUID="b889c0b7-47d0-416f-920a-f79a95b8a714" CreationDate="2024-01-14T02:24:58.940" UserId="5073" Text="Please, I need help on the Stakes topic in v2 to v3. There's a thread on the forum, but I realized I can't participate in the questions there.&#xD;&#xA;&#xD;&#xA;Sorry, I'm new to these processes and would like to know about this topic:&#xD;&#xA;&quot;dApp Staking - Migration from v2 to v3&quot; I have a stake in &quot;Astar Core Contributors&quot;, I invest in the Talisman wallet. I didn't understand very well regarding the unlinking of dapp v2 to v3. What do I need to do besides claiming the reward tokens? I wanted to know, for example, if I need to unlink from the dapp or is it not necessary?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43125" PostHistoryTypeId="1" PostId="10814" RevisionGUID="b889c0b7-47d0-416f-920a-f79a95b8a714" CreationDate="2024-01-14T02:24:58.940" UserId="5073" Text="dApp Staking - Migration from v2 to v3" ContentLicense="CC BY-SA 4.0" />
  <row Id="43126" PostHistoryTypeId="3" PostId="10814" RevisionGUID="b889c0b7-47d0-416f-920a-f79a95b8a714" CreationDate="2024-01-14T02:24:58.940" UserId="5073" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43127" PostHistoryTypeId="50" PostId="10655" RevisionGUID="e9c43d78-dc2d-4e3c-9239-70d521d73a61" CreationDate="2024-01-14T09:01:45.197" UserId="-1" />
  <row Id="43130" PostHistoryTypeId="2" PostId="10816" RevisionGUID="275baee7-0c0d-465d-9022-5d7bce904f15" CreationDate="2024-01-14T14:30:16.927" UserId="4105" Text="Since code was migrated to polkadot-sdk monorepo, what is the recommended way to obtain up-to-date parachain or standalone substrate template? I am interested in something that is migrated to v1.5.0&#xD;&#xA;&#xD;&#xA;Thank you in advance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="43132" PostHistoryTypeId="1" PostId="10816" RevisionGUID="275baee7-0c0d-465d-9022-5d7bce904f15" CreationDate="2024-01-14T14:30:16.927" UserId="4105" Text="Up-to-date substrate template" ContentLicense="CC BY-SA 4.0" />
  <row Id="43133" PostHistoryTypeId="3" PostId="10816" RevisionGUID="275baee7-0c0d-465d-9022-5d7bce904f15" CreationDate="2024-01-14T14:30:16.927" UserId="4105" Text="|substrate-node-template|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43136" PostHistoryTypeId="2" PostId="10818" RevisionGUID="f10d4624-eb77-43db-aa0c-891ac3da6de8" CreationDate="2024-01-14T17:41:18.503" UserId="5074" Text="I'm developing a project based on the `substrate-node-template` and encountered an issue when adding a `subxt` dependency. When I add `subxt = { version = &quot;0.29&quot;, default-features = false }` to the Cargo.toml of the `node-template` module, everything works fine. Here is a part of the Cargo.toml from the `node-template` module:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[[bin]]&#xD;&#xA;name = &quot;node-template&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;subxt = { version = &quot;0.29&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-build-script-utils.workspace = true&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, adding the same dependency to the `node-template-runtime` module's Cargo.toml leads to an error. Here is a part of the Cargo.toml from the `node-template-runtime` module:&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[package.metadata.docs.rs]&#xD;&#xA;targets = [&quot;x86_64-unknown-linux-gnu&quot;]&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;subxt = { version = &quot;0.29&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[build-dependencies]&#xD;&#xA;substrate-wasm-builder = { version = &quot;5.0.0-dev&quot;, git = &quot;https://github.com/paritytech/substrate.git&quot;, optional = true , branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The error message I receive is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0152]: found duplicate lang item `panic_impl`&#xD;&#xA;note: the lang item is first defined in crate `std` (which `tracing` depends on)&#xD;&#xA;note: second definition in the local crate (`sp_io`)&#xD;&#xA;error: could not compile `sp-io` (lib) due to 1 previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have two questions:&#xD;&#xA;1. Why does adding this dependency to the `node-template-runtime` module cause an error?&#xD;&#xA;2. I've heard that all dependencies in `node-template-runtime` must be `no_std`, but why then does the Cargo.toml of the `node-template-runtime` module have `default = [&quot;std&quot;]` in its features?&#xD;&#xA;&#xD;&#xA;Any insights or suggestions would be greatly appreciated.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43138" PostHistoryTypeId="1" PostId="10818" RevisionGUID="f10d4624-eb77-43db-aa0c-891ac3da6de8" CreationDate="2024-01-14T17:41:18.503" UserId="5074" Text="Issues with Adding `subxt` Dependency to `node-template-runtime` in Substrate Project" ContentLicense="CC BY-SA 4.0" />
  <row Id="43139" PostHistoryTypeId="3" PostId="10818" RevisionGUID="f10d4624-eb77-43db-aa0c-891ac3da6de8" CreationDate="2024-01-14T17:41:18.503" UserId="5074" Text="|substrate-node-template|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43140" PostHistoryTypeId="2" PostId="10819" RevisionGUID="7aef6292-7ef8-4899-9a29-5e26fe99bbc7" CreationDate="2024-01-14T18:00:05.240" UserId="398" Text="i am running a solo chain with genesis authorities setup for AURA and GRANPA. Now i have to add new validators and for that i am planning to add substrate_validator_set and pallet_session. As per my understanding i have to write some runtime migration strategy to add authorities but i am unable to get any example how can i do that in pallet_session case. Please need proper guidance or code snippet. Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="43142" PostHistoryTypeId="1" PostId="10819" RevisionGUID="7aef6292-7ef8-4899-9a29-5e26fe99bbc7" CreationDate="2024-01-14T18:00:05.240" UserId="398" Text="Need to add pallet_session in running solo POA chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="43143" PostHistoryTypeId="3" PostId="10819" RevisionGUID="7aef6292-7ef8-4899-9a29-5e26fe99bbc7" CreationDate="2024-01-14T18:00:05.240" UserId="398" Text="|genesis|session|on-runtime-upgrade|validator-set|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43144" PostHistoryTypeId="5" PostId="9776" RevisionGUID="641fc6bd-b272-4416-bb15-1d524e1c485c" CreationDate="2024-01-14T18:14:56.080" UserId="85" Comment="fix broken link" Text="You can use [subalfred's cl state fork-off][1] command - it is more easy to use than `fork-off-substrate`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://hack-ink.github.io/subalfred/user/cli/state.html#command-state" ContentLicense="CC BY-SA 4.0" />
  <row Id="43145" PostHistoryTypeId="2" PostId="10820" RevisionGUID="67606b4d-80c9-44fb-a056-6f7852e609b2" CreationDate="2024-01-14T21:28:42.963" UserId="2005" Text="you can find them in [`polkadot-sdk/substrate/bin/node-template`][1] and [`polkadot-sdk/cumulus/parachain-template`][2], respectively. They are part of the `sdk`, so dependencies are in sync with it. The only problem you could face is dependencies pointing to local paths, instead of remote `polkadot-sdk` git repo. But I think you can use some script to auto-replace them or use a tool like [`diener`][3].&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.5.0/substrate/bin/node-template&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.5.0/cumulus/parachain-template&#xD;&#xA;  [3]: https://github.com/paritytech/diener" ContentLicense="CC BY-SA 4.0" />
  <row Id="43147" PostHistoryTypeId="5" PostId="10810" RevisionGUID="1056ccab-9de7-46c5-8537-369a3d8cf06d" CreationDate="2024-01-15T00:13:42.620" UserId="116" Comment="deleted 2 characters in body" Text="I'm trying to figure out the best route to take to accomplish calling specific functions that are not publicly available for accounts to freely call&#xD;&#xA;&#xD;&#xA;I have a few functions I want only to be called by users voting and/or delegating voting.&#xD;&#xA;&#xD;&#xA;Which pallet or pallets should be implemented to accomplish this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43148" PostHistoryTypeId="2" PostId="10821" RevisionGUID="774fac62-f2db-4f14-8035-030396eff563" CreationDate="2024-01-15T05:17:18.150" UserId="3077" Text="you may need to consider this prior answer: https://substrate.stackexchange.com/questions/2848/transaction-pool-extrinsic-prioritization?rq=1&#xD;&#xA;&#xD;&#xA;If the runtime determines that the transaction is valid it returns a [ValidTransaction][1] struct which contains a priority.&#xD;&#xA;&#xD;&#xA;Runtime engineers can implement the priority any way they see fit, and a few standards have emerged.&#xD;&#xA;&#xD;&#xA;You can find the [TransactionPriority here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/sp_runtime/transaction_validity/struct.ValidTransaction.html&#xD;&#xA;  [2]: https://docs.rs/sp-runtime/latest/sp_runtime/transaction_validity/type.TransactionPriority.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="43156" PostHistoryTypeId="2" PostId="10823" RevisionGUID="60f0fdc2-2ea1-4379-a007-286135fe2de9" CreationDate="2024-01-15T11:40:43.383" UserId="377" Text="I am adding the OpenGov to the POA solochain. In which we integrated preimage pallet with following configuration:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const PreimageBaseDeposit: Balance = 1 * DOLLARS;&#xD;&#xA;	pub const PreimageByteDeposit: Balance = 1 * CENTS;&#xD;&#xA;	pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_preimage::Config for Runtime {&#xD;&#xA;	type WeightInfo = pallet_preimage::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type ManagerOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;&#xD;&#xA;	type Consideration = HoldConsideration&lt;&#xD;&#xA;		AccountId,&#xD;&#xA;		Balances,&#xD;&#xA;		(),&#xD;&#xA;		LinearStoragePrice&lt;PreimageBaseDeposit, PreimageByteDeposit, Balance&gt;,&#xD;&#xA;	&gt;;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;After that When i am using the preimage pallet to create preimage then it is giving me CannotCreateHold error.&#xD;&#xA;&#xD;&#xA;Any suggestion what should i update in config to make it work?&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zHBlI.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43158" PostHistoryTypeId="1" PostId="10823" RevisionGUID="60f0fdc2-2ea1-4379-a007-286135fe2de9" CreationDate="2024-01-15T11:40:43.383" UserId="377" Text="How to solve CannotCreateHold issue in preimage pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43159" PostHistoryTypeId="3" PostId="10823" RevisionGUID="60f0fdc2-2ea1-4379-a007-286135fe2de9" CreationDate="2024-01-15T11:40:43.383" UserId="377" Text="|solo-chain|opengov|preimage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43160" PostHistoryTypeId="2" PostId="10824" RevisionGUID="d3615b6c-88f1-482c-a7c7-4646586387ce" CreationDate="2024-01-15T13:04:49.277" UserId="298" Text="I need to take a snapshot of polkadot distribution, and make sure i handle all the inaccessible accounts. A subset of inaccessible accounts are **pure proxies**. &#xD;&#xA;&#xD;&#xA;How can i create a list of pureProxies?&#xD;&#xA;&#xD;&#xA;The only way i can see is to iterate through every single block of polkadot and query for `proxy.pureCreated`, but this will take far too long!&#xD;&#xA;&#xD;&#xA;is there a solution i am missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43162" PostHistoryTypeId="1" PostId="10824" RevisionGUID="d3615b6c-88f1-482c-a7c7-4646586387ce" CreationDate="2024-01-15T13:04:49.277" UserId="298" Text="how can i extract every pureProxy address from polkadot chain state?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43163" PostHistoryTypeId="3" PostId="10824" RevisionGUID="d3615b6c-88f1-482c-a7c7-4646586387ce" CreationDate="2024-01-15T13:04:49.277" UserId="298" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43164" PostHistoryTypeId="2" PostId="10825" RevisionGUID="7070b215-97dd-4867-9cb4-a5491adb2009" CreationDate="2024-01-15T13:19:05.243" UserId="2135" Text="We load tested our chain by calling the remark with events extrinsics. We used batch to have more than 33K transactions in multiple batches in one block.&#xD;&#xA;&#xD;&#xA;The block was processed correctly even if it took a little bit more time. But the number of event was greater than `u16` (`65_535`). This means that the block events could not be decoded by any other part of the infrastructure (indexers, explorer, polka-js, ...).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error: Unable to decode storage system.events:: createType(Vec&lt;FrameSystemEventRecord&gt;):: Vec length 72264 exceeds 65536&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I know there are safeguard around this: &#xD;&#xA;- Transaction pool transaction limit (can be bypassed using batches).&#xD;&#xA;- Transaction pool size limit (not reached by those extrinsics).&#xD;&#xA;- The price of those transactions without any economic incentives.&#xD;&#xA;- We could manually increase the weight (which is a bad practice in my sense)&#xD;&#xA;- We could decrease the compute time in the block (the compute time was ok, 800B/2000B, only event count was off)&#xD;&#xA;&#xD;&#xA;After that, I wondered how other chains were doing it, and I managed to reproduce the same issue on Polkadot for an amount between 100 and 200 dot (this was done on v1.0.0 because our chain used the same, I don't know if something was done in the meantime).&#xD;&#xA;&#xD;&#xA;My question is:&#xD;&#xA;&#xD;&#xA;**What would be a good way to handle this issue ?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="43166" PostHistoryTypeId="1" PostId="10825" RevisionGUID="7070b215-97dd-4867-9cb4-a5491adb2009" CreationDate="2024-01-15T13:19:05.243" UserId="2135" Text="How to handle blocks with more than u16 events?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43167" PostHistoryTypeId="3" PostId="10825" RevisionGUID="7070b215-97dd-4867-9cb4-a5491adb2009" CreationDate="2024-01-15T13:19:05.243" UserId="2135" Text="|weight|events|transaction-pool|weighttofee|block-size|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43168" PostHistoryTypeId="2" PostId="10826" RevisionGUID="5786d5f5-9da0-4130-b18b-9081dbfbe08c" CreationDate="2024-01-15T13:43:29.463" UserId="4081" Text="I understand that there is a PoV size limitation for blocks produced by the chain, since they need to be imported, and validated by validator nodes. However, I'm curious about whether this limitation extends to the genesis block and the `chain_spec` file. Is there a specific constraint on the size of the `chain_spec` file?&#xD;&#xA;&#xD;&#xA;Our intention is to include a substantial amount of data for balances and other pallets, and to minimize interference with the live chain, we're exploring the feasibility of incorporating part or all of this data within the chain spec file. Can you provide insights into any potential limitations or considerations for embedding such data in the chain spec file?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43170" PostHistoryTypeId="1" PostId="10826" RevisionGUID="5786d5f5-9da0-4130-b18b-9081dbfbe08c" CreationDate="2024-01-15T13:43:29.463" UserId="4081" Text="Genesis chainspec size limit" ContentLicense="CC BY-SA 4.0" />
  <row Id="43171" PostHistoryTypeId="3" PostId="10826" RevisionGUID="5786d5f5-9da0-4130-b18b-9081dbfbe08c" CreationDate="2024-01-15T13:43:29.463" UserId="4081" Text="|chainspec|genesis|pov|block-size|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43172" PostHistoryTypeId="2" PostId="10827" RevisionGUID="aaadd198-cc6e-4e7e-a849-ed8803ac2fa4" CreationDate="2024-01-15T13:50:49.813" UserId="225" Text="I don't know of limitation on the chain_spec except technical one.&#xD;&#xA;The thing is the full genesis state is loaded in memory, so this can be an issue with very big genesis.&#xD;&#xA;I think a streaming json reader with progressive state import would lift this limitation, yet I think it is a niche case.&#xD;&#xA;(a streaming json writer would also be necessary for state export, it can be directly feed by the triedbraw iterator over nodes which is not exposed directly and need custom code)." ContentLicense="CC BY-SA 4.0" />
  <row Id="43174" PostHistoryTypeId="2" PostId="10828" RevisionGUID="1f71d2f7-60c9-4938-b82a-413527141925" CreationDate="2024-01-15T13:51:45.293" UserId="73" Text="There is no real limitation on the amount of data in the chaispec. Nothing prevents you from putting there gigabytes of data. You will only get some sort of &quot;usability&quot; issue by requiring to send around these big chainspecs." ContentLicense="CC BY-SA 4.0" />
  <row Id="43177" PostHistoryTypeId="5" PostId="10819" RevisionGUID="c6ac2f13-608a-4dd0-a138-5d19807c80f4" CreationDate="2024-01-15T15:41:27.777" UserId="398" Comment="deleted 78 characters in body" Text="I am running a solo chain with Genesis authorities set up for AURA and GRANPA. Now I have to add new validators and for that, I am planning to add substrate_validator_set and pallet_session. &#xD;&#xA;As per my understanding, I have to write some runtime migration strategy to add authorities but I am unable to get any example of how can i do that. " ContentLicense="CC BY-SA 4.0" />
  <row Id="43178" PostHistoryTypeId="5" PostId="10819" RevisionGUID="d501c21c-d22f-4688-93f3-5cf8a42db484" CreationDate="2024-01-15T16:21:49.130" UserId="398" Comment="clarify my question" Text="I am running a solo chain with Genesis authorities set up for AURA and GRANPA. Now I have to add new validators and for that, I am planning to add substrate_validator_set and pallet_session. &#xD;&#xA;As per my understanding, I have to write some runtime migration strategy to add authorities. my question is that how can i get the initial authorities during OnRuntimeUpgrade event and set them as session keys ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43184" PostHistoryTypeId="2" PostId="10830" RevisionGUID="a7e6dfb8-79f6-4cf1-bb6c-7e301446641a" CreationDate="2024-01-15T16:52:46.987" UserId="94" Text="&gt;What would be a good way to handle this issue ?&#xD;&#xA;&#xD;&#xA;Opening an issue in PolkadotJs/App. Otherwise you can use the Python bindings:  &#xD;&#xA;&#xD;&#xA;```python&#xD;&#xA;from substrateinterface import SubstrateInterface&#xD;&#xA;chain = SubstrateInterface(url=&quot;ws://127.0.0.1:9944&quot;)&#xD;&#xA;&#xD;&#xA;events = chain.query(&quot;System&quot;, &quot;Events&quot;, block_hash=&quot;0x...&quot;)&#xD;&#xA;for event in events:&#xD;&#xA;    ...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Could also be that PJS can circumvent this bug by using the storage iteration API to iterate on the keys directly. Then it could load the events in chunks instead of all at once and dying.  &#xD;&#xA;The Rust bindings could also work, but did not try: https://github.com/paritytech/subxt" ContentLicense="CC BY-SA 4.0" />
  <row Id="43186" PostHistoryTypeId="2" PostId="10831" RevisionGUID="8edadc79-a06b-459a-b4ca-d8dba0ff3425" CreationDate="2024-01-15T18:00:43.357" UserId="4114" Text="There are a few storage keys that are always whitelisted before each benchmarking pallet extrinsic call (`:transaction_level`, `:extrinsic_index`, and `:intrablock_entropy`), apart from the whitelisted keys that can be added.&#xD;&#xA;&#xD;&#xA; 1. Is `#[extrinsic_call]` isolated when the benchmarking test is executed or is it plugged in `with_transaction`? This might be related to the `:transaction_level` whitelisting.&#xD;&#xA;&#xD;&#xA; 2. How do `:extrinsic_index`, and `:intrablock_entropy` affect the extrinsic call weight? Are they used whenever you benchmark hooks such as `on_finalize`?&#xD;&#xA;&#xD;&#xA; 3. When you benchmark a signed extrinsic call, why is the caller always whitelisted? Is the read/write weight of the caller included whenever you benchmark the base block weight?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43188" PostHistoryTypeId="1" PostId="10831" RevisionGUID="8edadc79-a06b-459a-b4ca-d8dba0ff3425" CreationDate="2024-01-15T18:00:43.357" UserId="4114" Text="Whitelisted keys when benchmarking extrinsic calls" ContentLicense="CC BY-SA 4.0" />
  <row Id="43189" PostHistoryTypeId="3" PostId="10831" RevisionGUID="8edadc79-a06b-459a-b4ca-d8dba0ff3425" CreationDate="2024-01-15T18:00:43.357" UserId="4114" Text="|pallet|weight|benchmarking|frame|benchmark|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43190" PostHistoryTypeId="52" PostId="10825" RevisionGUID="ab93f726-1bc5-499c-919b-d42bbf42b1e0" CreationDate="2024-01-15T21:19:19.060" />
  <row Id="43192" PostHistoryTypeId="52" PostId="10826" RevisionGUID="16f328d3-4f8d-49e8-9a8d-14a39f69ee93" CreationDate="2024-01-15T21:44:21.633" />
  <row Id="43194" PostHistoryTypeId="2" PostId="10832" RevisionGUID="f9f5d393-579c-4202-9da0-fca95b52d34f" CreationDate="2024-01-16T00:15:36.203" UserId="5023" Text="I want to pass a proposal then have it called once passed after x blocks&#xD;&#xA;&#xD;&#xA;I set it up like this:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub struct TracksInfo;&#xD;&#xA;impl pallet_referenda::TracksInfo&lt;Balance, BlockNumber&gt; for TracksInfo {&#xD;&#xA;	type Id = u16;&#xD;&#xA;	type RuntimeOrigin = &lt;RuntimeOrigin as frame_support::traits::OriginTrait&gt;::PalletsOrigin;&#xD;&#xA;	fn tracks() -&gt; &amp;'static [(Self::Id, pallet_referenda::TrackInfo&lt;Balance, BlockNumber&gt;)] {&#xD;&#xA;		static DATA: [(u16, pallet_referenda::TrackInfo&lt;Balance, BlockNumber&gt;); 1] = [(&#xD;&#xA;			0u16,&#xD;&#xA;			pallet_referenda::TrackInfo {&#xD;&#xA;				name: &quot;root&quot;,&#xD;&#xA;				max_deciding: 1,&#xD;&#xA;				decision_deposit: 10,&#xD;&#xA;				prepare_period: 4,&#xD;&#xA;				decision_period: 4,&#xD;&#xA;				confirm_period: 2,&#xD;&#xA;				min_enactment_period: 4,&#xD;&#xA;				min_approval: pallet_referenda::Curve::LinearDecreasing {&#xD;&#xA;					length: Perbill::from_percent(100),&#xD;&#xA;					floor: Perbill::from_percent(50),&#xD;&#xA;					ceil: Perbill::from_percent(100),&#xD;&#xA;				},&#xD;&#xA;				min_support: pallet_referenda::Curve::LinearDecreasing {&#xD;&#xA;					length: Perbill::from_percent(100),&#xD;&#xA;					floor: Perbill::from_percent(0),&#xD;&#xA;					ceil: Perbill::from_percent(100),&#xD;&#xA;				},&#xD;&#xA;			},&#xD;&#xA;		)];&#xD;&#xA;		&amp;DATA[..]&#xD;&#xA;	}&#xD;&#xA;	fn track_for(id: &amp;Self::RuntimeOrigin) -&gt; Result&lt;Self::Id, ()&gt; {&#xD;&#xA;		if let Ok(system_origin) = frame_system::RawOrigin::try_from(id.clone()) {&#xD;&#xA;			match system_origin {&#xD;&#xA;				frame_system::RawOrigin::Root =&gt; Ok(0),&#xD;&#xA;				_ =&gt; Err(()),&#xD;&#xA;			}&#xD;&#xA;		} else {&#xD;&#xA;			Err(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber);&#xD;&#xA;&#xD;&#xA;impl pallet_referenda::Config for Runtime {&#xD;&#xA;	type WeightInfo = pallet_referenda::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type Scheduler = Scheduler;&#xD;&#xA;	type Currency = pallet_balances::Pallet&lt;Self&gt;;&#xD;&#xA;	type SubmitOrigin = EnsureSigned&lt;AccountId&gt;;&#xD;&#xA;	type CancelOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type KillOrigin = EnsureRoot&lt;AccountId&gt;;&#xD;&#xA;	type Slash = ();&#xD;&#xA;	type Votes = pallet_conviction_voting::VotesOf&lt;Runtime&gt;;&#xD;&#xA;	type Tally = pallet_conviction_voting::TallyOf&lt;Runtime&gt;;&#xD;&#xA;	type SubmissionDeposit = SubmissionDeposit;&#xD;&#xA;	type MaxQueued = ConstU32&lt;100&gt;;&#xD;&#xA;	type UndecidingTimeout = UndecidingTimeout;&#xD;&#xA;	type AlarmInterval = AlarmInterval;&#xD;&#xA;	type Tracks = TracksInfo;&#xD;&#xA;	type Preimages = Preimage;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;After passing, nothing seems to happen.  I tried using the UI and setting it to 100 after delay and at block.  Neither seem to call the function I'm passing as a preimage.&#xD;&#xA;&#xD;&#xA;How do we do this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43196" PostHistoryTypeId="1" PostId="10832" RevisionGUID="f9f5d393-579c-4202-9da0-fca95b52d34f" CreationDate="2024-01-16T00:15:36.203" UserId="5023" Text="Referenda function call after passsing" ContentLicense="CC BY-SA 4.0" />
  <row Id="43197" PostHistoryTypeId="3" PostId="10832" RevisionGUID="f9f5d393-579c-4202-9da0-fca95b52d34f" CreationDate="2024-01-16T00:15:36.203" UserId="5023" Text="|democracy|origin|preimage|pallet-scheduler|referenda|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43198" PostHistoryTypeId="2" PostId="10833" RevisionGUID="2fc2202f-e871-4213-b0ea-240da6074ddc" CreationDate="2024-01-16T09:12:16.217" UserId="4794" Text="Here is ```sp_consensus_babe```  https://releases.parity.io/substrate-rustdoc/src/sp_consensus_babe/lib.rs.html#86&#xD;&#xA;and ```pallet_babe``` :https://crates.parity.io/src/pallet_babe/lib.rs.html#18-975&#xD;&#xA;&#xD;&#xA;What is difference between them and when to use each of them?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43200" PostHistoryTypeId="1" PostId="10833" RevisionGUID="2fc2202f-e871-4213-b0ea-240da6074ddc" CreationDate="2024-01-16T09:12:16.217" UserId="4794" Text="What is difference between pallet-babe and sp-consensus-babe?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43201" PostHistoryTypeId="3" PostId="10833" RevisionGUID="2fc2202f-e871-4213-b0ea-240da6074ddc" CreationDate="2024-01-16T09:12:16.217" UserId="4794" Text="|consensus|babe|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43209" PostHistoryTypeId="2" PostId="10835" RevisionGUID="ee77afdd-23ea-43b6-9fdf-92fa0664c414" CreationDate="2024-01-16T11:34:32.917" UserId="162" Text="On my local rococo local relay chain, I found the unexpected epoch change when the finalized block stuck but the best block continue to generate. And when the issue happened, only one node show me this issue. Is that possible I can fix the finalized issue?&#xD;&#xA;&#xD;&#xA;My env is only two polkadot valdiators on 0.9.39 version." ContentLicense="CC BY-SA 4.0" />
  <row Id="43211" PostHistoryTypeId="1" PostId="10835" RevisionGUID="ee77afdd-23ea-43b6-9fdf-92fa0664c414" CreationDate="2024-01-16T11:34:32.917" UserId="162" Text="Finalization issue based on unexpected epoch change" ContentLicense="CC BY-SA 4.0" />
  <row Id="43212" PostHistoryTypeId="3" PostId="10835" RevisionGUID="ee77afdd-23ea-43b6-9fdf-92fa0664c414" CreationDate="2024-01-16T11:34:32.917" UserId="162" Text="|finality|rococo-local|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43214" PostHistoryTypeId="5" PostId="10835" RevisionGUID="a5adf257-47df-4d1d-9cde-2cff743e68cd" CreationDate="2024-01-16T13:04:09.123" UserId="162" Comment="added 628 characters in body" Text="On my rococo local relay chain, I found the unexpected epoch change when the finalized block stuck but the best block continue to generate. And when the issue happened, only one node show me this issue. Is that possible I can fix the finalized issue?&#xD;&#xA;&#xD;&#xA;My env is only two polkadot valdiators on 0.9.39 version.&#xD;&#xA;&#xD;&#xA;Updated: There are more error message&#xD;&#xA;```&#xD;&#xA;2024-01-16 08:59:11 Chain between (0x1fef…7459, 3182191) and 3180950 not fully known. Forcing vote on 3180950 unknown_number=3182191 unknown_hash=0x1fef1299626dc072943ed903233383e275abb1f09a5fac44c490931470ee7459&#xD;&#xA;2024-01-16 08:59:11 Call to `DetermineUndisputedChain` failed error=DetermineUndisputedChainCanceled(Canceled)&#xD;&#xA;2024-01-16 08:59:11 error=RollingSessionWindow(SessionsUnavailable { kind: Missing(318098), info: Some(SessionsUnavailableInfo { window_start: 318096, window_end: 319290, block_hash: 0x1fef1299626dc072943ed903233383e275abb1f09a5fac44c490931470ee7459 }) })&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43217" PostHistoryTypeId="2" PostId="10836" RevisionGUID="9c2404bd-2533-4145-bb5c-96ff5bf6e2ff" CreationDate="2024-01-16T13:55:32.247" UserId="4081" Text="Say I want to send and receive tokens from AssetHub in my chain that is using AccountId20 format to interact with internal pallets. I understand that Rococo uses AccountId32 so how would I go about configuring that mapping between accounts to allow an EVM format account to interact with AssetHub and a compatible substrate account there? &#xD;&#xA;&#xD;&#xA;Should I have a pallet that handles that mapping or an XCM configuration that solves it, what would be the best approach here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43219" PostHistoryTypeId="1" PostId="10836" RevisionGUID="9c2404bd-2533-4145-bb5c-96ff5bf6e2ff" CreationDate="2024-01-16T13:55:32.247" UserId="4081" Text="AssetHub interaction with AccountId20" ContentLicense="CC BY-SA 4.0" />
  <row Id="43220" PostHistoryTypeId="3" PostId="10836" RevisionGUID="9c2404bd-2533-4145-bb5c-96ff5bf6e2ff" CreationDate="2024-01-16T13:55:32.247" UserId="4081" Text="|xcm|evm|assets|accountid|mapping|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43221" PostHistoryTypeId="50" PostId="10619" RevisionGUID="d32a6b2f-6940-4c6a-94e1-31d4bac58147" CreationDate="2024-01-16T14:02:50.347" UserId="-1" />
  <row Id="43225" PostHistoryTypeId="5" PostId="10819" RevisionGUID="4f80fdcb-4bf7-4c1c-b17e-a46322df65d7" CreationDate="2024-01-16T15:11:28.033" UserId="398" Comment="deleted 116 characters in body; edited title" Text="I am running a solo chain with Genesis authorities set up for AURA and GRANPA. Now I have to add new validators and for that, I am planning to add substrate_validator_set and pallet_session. &#xD;&#xA;During OnRuntimeUpgrade what is the correct way to set `Keys` storage item in `pallet_session`?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43226" PostHistoryTypeId="4" PostId="10819" RevisionGUID="4f80fdcb-4bf7-4c1c-b17e-a46322df65d7" CreationDate="2024-01-16T15:11:28.033" UserId="398" Comment="deleted 116 characters in body; edited title" Text="setting up pallet_session genesis keys in running chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="43228" PostHistoryTypeId="2" PostId="10838" RevisionGUID="d1ee76ea-a459-43c9-8d01-6c0f52020d7a" CreationDate="2024-01-17T03:21:52.277" UserId="251" Text="You can follow this code to set up the session keys during a runtime upgrade.&#xD;&#xA;&#xD;&#xA;- https://github.com/polkadot-fellows/runtimes/blob/6334588c9db0115f6b3445ce11d02a457275b34b/relay/polkadot/src/lib.rs#L1697&#xD;&#xA;- https://github.com/polkadot-fellows/runtimes/blob/6334588c9db0115f6b3445ce11d02a457275b34b/relay/polkadot/src/lib.rs#L455-L479&#xD;&#xA;&#xD;&#xA;However, there is a distinction.&#xD;&#xA;&#xD;&#xA;BEEFY is an optional feature that allows the use of a placeholder key for genesis. &#xD;&#xA;&#xD;&#xA;In contrast, AURA is mandatory. You must pre-generate the keys, put them into code and the validator nodes. Otherwise, your chain will probably be bricked after the runtime upgrade." ContentLicense="CC BY-SA 4.0" />
  <row Id="43230" PostHistoryTypeId="2" PostId="10839" RevisionGUID="ea297d69-3e7e-44dc-ae21-a6b51150881b" CreationDate="2024-01-17T06:38:00.923" UserId="555" Text="I'm using fresh node template and trying to implement below code:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::storage]&#xD;&#xA;	pub type Author&lt;T: Config&gt; = StorageValue&lt;_, sr25519::Public, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;pub struct DataProvider;&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; DataProvider {&#xD;&#xA;	fn details() -&gt; T::AccountId {&#xD;&#xA;		Author::&lt;T&gt;::get().map(|a| a.into())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But getting this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl&lt;T: Config&gt; DataProvider {&#xD;&#xA;     ^ unconstrained type parameter&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to solve this issue?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43232" PostHistoryTypeId="1" PostId="10839" RevisionGUID="ea297d69-3e7e-44dc-ae21-a6b51150881b" CreationDate="2024-01-17T06:38:00.923" UserId="555" Text="facing unconstrained type parameter issue" ContentLicense="CC BY-SA 4.0" />
  <row Id="43233" PostHistoryTypeId="3" PostId="10839" RevisionGUID="ea297d69-3e7e-44dc-ae21-a6b51150881b" CreationDate="2024-01-17T06:38:00.923" UserId="555" Text="|rust|types|traits|generics|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43238" PostHistoryTypeId="2" PostId="10841" RevisionGUID="4613bb92-1d7c-4a34-86f9-09aafcc3fae6" CreationDate="2024-01-17T06:48:00.387" UserId="1959" Text="You could check [moonbeam xcm_config](https://github.com/moonbeam-foundation/moonbeam/blob/master/runtime/moonbeam/src/xcm_config.rs#L109-L112) or [darwinia xcm_config](https://github.com/darwinia-network/darwinia/blob/v6.5.1/runtime/darwinia/src/pallets/polkadot_xcm.rs#L86-L89). Both of them using AccountId20 format. And the type `LocationToAccountId` specifying how a `MultiLocation` can be converted into an `AccountId`, it's used in many places in xcm. In general, `LocationToAccountId` is enough, I don't think a pallet is needed to handle it. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43241" PostHistoryTypeId="5" PostId="10841" RevisionGUID="609a35d7-b2a7-4b29-88d9-970e35e20f47" CreationDate="2024-01-17T06:58:54.847" UserId="1959" Comment="added 304 characters in body" Text="You could check [moonbeam xcm_config](https://github.com/moonbeam-foundation/moonbeam/blob/master/runtime/moonbeam/src/xcm_config.rs#L109-L112) or [darwinia xcm_config](https://github.com/darwinia-network/darwinia/blob/v6.5.1/runtime/darwinia/src/pallets/polkadot_xcm.rs#L86-L89). Both of them using AccountId20 format. &#xD;&#xA;&#xD;&#xA;The type [`LocationToAccountId`](https://github.com/moonbeam-foundation/moonbeam/blob/v0.35.0/runtime/moonbeam/src/xcm_config.rs#L104) specifying how a `MultiLocation` can be converted into an `AccountId`.&#xD;&#xA;&#xD;&#xA;The type [`LocalOriginToLocation`](https://github.com/moonbeam-foundation/moonbeam/blob/v0.35.0/runtime/moonbeam/src/xcm_config.rs#L345) specifying how a signed local origin into a MultiLocation.&#xD;&#xA;&#xD;&#xA;In general, `LocationToAccountId` and `LocalOriginToLocation` is enough, I don't think a pallet is needed to handle it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43242" PostHistoryTypeId="2" PostId="10842" RevisionGUID="7bebdeca-11b9-4f4c-aa88-183c3cffe9f1" CreationDate="2024-01-17T08:41:11.877" UserId="298" Text="when i take a snapshot of DOT accounts and add the total balances i get slightly less than the totalIssuance(), approx 21,499 DOT under. &#xD;&#xA;&#xD;&#xA;Is this expected or should they be exactly the same?&#xD;&#xA;&#xD;&#xA;here is the script and repo to [add totals][1], which also contains the snapshot file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const fs = require('fs');&#xD;&#xA;const readline = require('readline');&#xD;&#xA;const path = require('path');&#xD;&#xA;&#xD;&#xA;const snapshotFilePath = path.join(__dirname, '../dot-balances-new-dwellir5.json'); &#xD;&#xA;&#xD;&#xA;async function sumTotalsInSnapshot() {&#xD;&#xA;    const fileStream = fs.createReadStream(snapshotFilePath);&#xD;&#xA;    const rl = readline.createInterface({&#xD;&#xA;        input: fileStream,&#xD;&#xA;        crlfDelay: Infinity&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;    let totalSum = BigInt(0);&#xD;&#xA;    let accountCount = 0; // counter for the number of accounts processed&#xD;&#xA;&#xD;&#xA;    for await (const line of rl) {&#xD;&#xA;        if (line.trim()) { // Skip empty lines&#xD;&#xA;            try {&#xD;&#xA;                const accountData = JSON.parse(line);&#xD;&#xA;                const total = BigInt(accountData.Total || &quot;0&quot;);&#xD;&#xA;                totalSum += total;&#xD;&#xA;                accountCount++; &#xD;&#xA;            } catch (err) {&#xD;&#xA;                console.error(`Error parsing line: ${err}`);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    console.log(`sum total of 'Total' values: ${totalSum.toString()}`);&#xD;&#xA;    console.log(`number of accounts processed: ${accountCount}`);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;sumTotalsInSnapshot().catch(console.error);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;producing: `13,956,878,645,064,514,097`&#xD;&#xA;&#xD;&#xA;the snapshot block is:&#xD;&#xA;&#xD;&#xA;blockNumer: 18871235&#xD;&#xA;blockHash: 0x51d501fb2aab8e611c183d14e05cd5e263729a44f89edbe6232ef5bf710910ab&#xD;&#xA;&#xD;&#xA;the totalIssuance() is `13,957,093,143,985,979,503`&#xD;&#xA;&#xD;&#xA;there is a difference of 21,499 DOT. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DOTisDED/snapshot/blob/master/utils/addTotals.cjs" ContentLicense="CC BY-SA 4.0" />
  <row Id="43244" PostHistoryTypeId="1" PostId="10842" RevisionGUID="7bebdeca-11b9-4f4c-aa88-183c3cffe9f1" CreationDate="2024-01-17T08:41:11.877" UserId="298" Text="Polkadot totalIssuance vs adding up all total account balance is not the same" ContentLicense="CC BY-SA 4.0" />
  <row Id="43245" PostHistoryTypeId="3" PostId="10842" RevisionGUID="7bebdeca-11b9-4f4c-aa88-183c3cffe9f1" CreationDate="2024-01-17T08:41:11.877" UserId="298" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43246" PostHistoryTypeId="2" PostId="10843" RevisionGUID="bc22d45c-f97d-459b-b396-9baed698416b" CreationDate="2024-01-17T08:46:02.963" UserId="2005" Text="You have to constrain the struct with generic phantom type.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub struct DataProvider&lt;T&gt;(sp_std::marker::PhantomData&lt;T&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; DataProvider&lt;T&gt; {&#xD;&#xA;    fn details() -&gt; T::AccountId {&#xD;&#xA;        Author::&lt;T&gt;::get().map(|a| a.into())&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43248" PostHistoryTypeId="50" PostId="10601" RevisionGUID="89b82973-bafa-40ea-bcd2-a2d783c930c9" CreationDate="2024-01-17T09:03:25.390" UserId="-1" />
  <row Id="43249" PostHistoryTypeId="2" PostId="10844" RevisionGUID="6699acb0-7d31-4b01-9055-9e1b55fbb6ed" CreationDate="2024-01-17T10:11:24.537" UserId="2089" Text=" fetch list of all nomination pools using polkadot js API. details like poolID, address etc" ContentLicense="CC BY-SA 4.0" />
  <row Id="43251" PostHistoryTypeId="1" PostId="10844" RevisionGUID="6699acb0-7d31-4b01-9055-9e1b55fbb6ed" CreationDate="2024-01-17T10:11:24.537" UserId="2089" Text="how to fetch list of all nomination pools using polkadot js API" ContentLicense="CC BY-SA 4.0" />
  <row Id="43252" PostHistoryTypeId="3" PostId="10844" RevisionGUID="6699acb0-7d31-4b01-9055-9e1b55fbb6ed" CreationDate="2024-01-17T10:11:24.537" UserId="2089" Text="|polkadot-js|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43253" PostHistoryTypeId="2" PostId="10845" RevisionGUID="a6850e76-563d-4c3c-bd85-656b9d9e5924" CreationDate="2024-01-17T10:20:30.867" UserId="2089" Text="using `api.query.nominationPools.poolMembers` [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[polkadot js doc][2] &#xD;&#xA;&#xD;&#xA;However, we don't need to pass `AccountId32` as it asking to specify parameters. Instead we can retrieve a list of all the keys and entries for the map, refer [docs][3].&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;    const pools = await api.query.nominationPools.poolMembers.entries()&#xD;&#xA;    &#xD;&#xA;    pools.forEach(([k, v]) =&gt; {&#xD;&#xA;       &#xD;&#xA;        if(v.isSome){&#xD;&#xA;            const values = v.unwrap().toHuman();&#xD;&#xA;            console.log('pool ID', values.poolId)&#xD;&#xA;            console.log(&#xD;&#xA;                    /* AccountId */&#xD;&#xA;                    k.args[0].toString(),&#xD;&#xA;                    /* Pool info */&#xD;&#xA;                    JSON.stringify(v.toHuman())&#xD;&#xA;                    )&#xD;&#xA;            }&#xD;&#xA;            &#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;Also refer this [answer][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6fuFc.png&#xD;&#xA;  [2]: https://polkadot.js.org/docs/polkadot/storage#poolmembersaccountid32-optionpalletnominationpoolspoolmember&#xD;&#xA;  [3]: https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/4256/using-polkadot-js-api-how-can-we-list-the-members-of-a-kusama-nomination-pool/4257#4257" ContentLicense="CC BY-SA 4.0" />
  <row Id="43255" PostHistoryTypeId="2" PostId="10846" RevisionGUID="6b8f87fc-8cb7-4bb2-99e9-891f9c01322b" CreationDate="2024-01-17T10:53:58.957" UserId="5080" Text="Thank you for your question!&#xD;&#xA;&#xD;&#xA;There is nothing special that you need to do before the upgrade to v3. What you should do is, once dApp Staking is upgraded to v3 is to go back to Astar Portal and choose the same or new dApps that you want to support in the voting period.&#xD;&#xA;&#xD;&#xA;For more details please check this FAQ on the official Astar Docs https://docs.astar.network/docs/learn/dapp-staking-v3/dapp-staking-faq#general-info-about-migration-from-v2-to-v3&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43257" PostHistoryTypeId="2" PostId="10847" RevisionGUID="f5e27194-5453-486e-a0a2-48cbad091cd6" CreationDate="2024-01-17T11:03:54.153" UserId="4862" Text="I tried using zombienet which helped me set up a test network. I do not want to use zombienet now. What I did was go [here][1] and add an extra key Charlie something like below&#xD;&#xA;```&#xD;&#xA;#[cfg(feature = &quot;rococo-native&quot;)]&#xD;&#xA;fn rococo_local_testnet_genesis(wasm_binary: &amp;[u8]) -&gt; rococo_runtime::RuntimeGenesisConfig {&#xD;&#xA;	rococo_testnet_genesis(&#xD;&#xA;		wasm_binary,&#xD;&#xA;		vec![get_authority_keys_from_seed(&quot;Alice&quot;), get_authority_keys_from_seed(&quot;Bob&quot;), get_authority_keys_from_seed(&quot;Charlie&quot;),],&#xD;&#xA;		get_account_id_from_seed::&lt;sr25519::Public&gt;(&quot;Alice&quot;),&#xD;&#xA;		None,&#xD;&#xA;	)&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Used the following command to generate a raw chain spec&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/polkadot build-spec --chain rococo-local --disable-default-bootnode --raw &gt; rococo-local.json&#xD;&#xA; ```&#xD;&#xA;and got something like below&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2024-01-17 16:25:40 Took active validators from set with wrong size&#xD;&#xA;2024-01-17 16:25:40 Took active validators from set with wrong size&#xD;&#xA;2024-01-17 16:25:40 Took active validators from set with wrong size.&#xD;&#xA;2024-01-17 16:25:40 Took active validators from set with wrong size&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is the issue here? It's like zombienet did the job for me but when I am trying to do it I do not understand what is happening.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot/blob/master/node/service/src/chain_spec.rs#L1873" ContentLicense="CC BY-SA 4.0" />
  <row Id="43259" PostHistoryTypeId="5" PostId="10842" RevisionGUID="9e361c94-736a-4ee0-81d3-a3322c800175" CreationDate="2024-01-17T11:05:12.283" UserId="298" Comment="added 8 characters in body" Text="when i take a snapshot of DOT accounts and add the total balances i get slightly less than the totalIssuance(), approx 21,499 DOT under. &#xD;&#xA;&#xD;&#xA;Is this expected or should they be exactly the same?&#xD;&#xA;&#xD;&#xA;here is the script and repo to [add totals][1], which also contains the snapshot file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const fs = require('fs');&#xD;&#xA;const readline = require('readline');&#xD;&#xA;const path = require('path');&#xD;&#xA;&#xD;&#xA;const snapshotFilePath = path.join(__dirname, '../dot-balances-new-dwellir5.json'); &#xD;&#xA;&#xD;&#xA;async function sumTotalsInSnapshot() {&#xD;&#xA;    const fileStream = fs.createReadStream(snapshotFilePath);&#xD;&#xA;    const rl = readline.createInterface({&#xD;&#xA;        input: fileStream,&#xD;&#xA;        crlfDelay: Infinity&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;    let totalSum = BigInt(0);&#xD;&#xA;    let accountCount = 0; // counter for the number of accounts processed&#xD;&#xA;&#xD;&#xA;    for await (const line of rl) {&#xD;&#xA;        if (line.trim()) { // Skip empty lines&#xD;&#xA;            try {&#xD;&#xA;                const accountData = JSON.parse(line);&#xD;&#xA;                const total = BigInt(accountData.Total || &quot;0&quot;);&#xD;&#xA;                totalSum += total;&#xD;&#xA;                accountCount++; &#xD;&#xA;            } catch (err) {&#xD;&#xA;                console.error(`Error parsing line: ${err}`);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    console.log(`sum total of 'Total' values: ${totalSum.toString()}`);&#xD;&#xA;    console.log(`number of accounts processed: ${accountCount}`);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;sumTotalsInSnapshot().catch(console.error);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;producing: `13,956,878,645,064,514,097`&#xD;&#xA;&#xD;&#xA;the snapshot block is:&#xD;&#xA;&#xD;&#xA;blockNumer: `18871235`&#xD;&#xA;&#xD;&#xA;blockHash: `0x51d501fb2aab8e611c183d14e05cd5e263729a44f89edbe6232ef5bf710910ab`&#xD;&#xA;&#xD;&#xA;the totalIssuance() is `13,957,093,143,985,979,503`&#xD;&#xA;&#xD;&#xA;there is a difference of `21,499 DOT`. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DOTisDED/snapshot/blob/master/utils/addTotals.cjs" ContentLicense="CC BY-SA 4.0" />
  <row Id="43260" PostHistoryTypeId="5" PostId="10845" RevisionGUID="4397c351-278e-429b-befe-a44e65a8b5ec" CreationDate="2024-01-17T11:42:56.677" UserId="2089" Comment="deleted 15 characters in body" Text="using `api.query.nominationPools.poolMembers` [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;[polkadot js doc][2] &#xD;&#xA;&#xD;&#xA;However, we don't need to pass `AccountId32` as it asking to specify parameters. Instead we can retrieve a list of all the keys and entries for the map, refer [docs][3].&#xD;&#xA;&#xD;&#xA;        &#xD;&#xA;    const pools = await api.query.nominationPools.poolMembers.entries()&#xD;&#xA;    pools.forEach(([key, value]) =&gt; {&#xD;&#xA;        if (value.isSome) {&#xD;&#xA;            const poolMemberData = value.unwrap().toHuman();&#xD;&#xA;            console.log('Pool ID:', poolMemberData.poolId);&#xD;&#xA;            console.log(&#xD;&#xA;                'Account ID:', key.args[0].toString(),&#xD;&#xA;                'Pool Member Info:', JSON.stringify(poolMemberData)&#xD;&#xA;                );&#xD;&#xA;            }&#xD;&#xA;        })&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Also refer this [answer][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6fuFc.png&#xD;&#xA;  [2]: https://polkadot.js.org/docs/polkadot/storage#poolmembersaccountid32-optionpalletnominationpoolspoolmember&#xD;&#xA;  [3]: https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/4256/using-polkadot-js-api-how-can-we-list-the-members-of-a-kusama-nomination-pool/4257#4257" ContentLicense="CC BY-SA 4.0" />
  <row Id="43261" PostHistoryTypeId="2" PostId="10848" RevisionGUID="2bb534a6-1415-4af4-8fb6-d62df0a4c20b" CreationDate="2024-01-17T11:52:37.803" UserId="380" Text="There is a flag that you can add when running polkadot-parachain&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;      --no-grandpa&#xD;&#xA;          Disable GRANDPA.&#xD;&#xA;          &#xD;&#xA;          Disables voter when running in validator mode, otherwise disable the GRANDPA observer.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;However, adding this still results in an error when running my node.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;polkadot-parachain --name contracts --no-grandpa --collator --force-authoring --chain ./e2e/contracts-rococo-1002-rococo-local.json --base-path /tmp/rococo/contracts/data --listen-addr /ip4/0.0.0.0/tcp/37913/ws --prometheus-external --rpc-cors all --unsafe-rpc-external --rpc-methods unsafe --prometheus-port 40391 --rpc-port 9919 -lparachain=debug --discover-local -- --execution wasm --chain ./e2e/contracts-rococo-1002-rococo-local.json --port 33571 --rpc-port 43921 --no-grandpa&#xD;&#xA;2024-01-17 11:49:51.167  INFO main sc_cli::runner: Polkadot parachain    &#xD;&#xA;2024-01-17 11:49:51.167  INFO main sc_cli::runner: ✌️  version 1.5.0-a3dc2f15f23    &#xD;&#xA;2024-01-17 11:49:51.167  INFO main sc_cli::runner: ❤️  by Parity Technologies &lt;admin@parity.io&gt;, 2017-2024    &#xD;&#xA;2024-01-17 11:49:51.167  INFO main sc_cli::runner:  Chain specification: Contracts on Rococo    &#xD;&#xA;2024-01-17 11:49:51.167  INFO main sc_cli::runner:   Node name: contracts    &#xD;&#xA;2024-01-17 11:49:51.167  INFO main sc_cli::runner:  Role: AUTHORITY    &#xD;&#xA;2024-01-17 11:49:51.167  INFO main sc_cli::runner:  Database: RocksDb at /tmp/rococo/contracts/data/chains/contracts-rococo/db/full    &#xD;&#xA;CLI parameter `--execution` has no effect anymore and will be removed in the future!&#xD;&#xA;2024-01-17 11:49:53.324  INFO main polkadot_parachain::command: Parachain id: Id(1002)    &#xD;&#xA;2024-01-17 11:49:53.324  INFO main polkadot_parachain::command: Parachain Account: 5Ec4AhPa9NYpwtokA8fbrJW2VgHA8iFYccikJGTf5Cw6NqFT    &#xD;&#xA;2024-01-17 11:49:53.324  INFO main polkadot_parachain::command: Is collating: yes    &#xD;&#xA;2024-01-17 11:49:54.322 DEBUG main parachain::chain-selection: [Relaychain] Using dispute aware relay-chain selection algorithm&#xD;&#xA;2024-01-17 11:49:54.322  INFO main grandpa: [Relaychain]  Loading GRANDPA authority set from genesis on what appears to be first startup.    &#xD;&#xA;Error: Service(Application(Application(Blockchain(Execution(Other(&quot;Exported method GrandpaApi_grandpa_authorities is not found&quot;))))))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;[This comment](https://github.com/paritytech/substrate/issues/4224#issuecomment-559154834) suggests that I'll need to remove stuff from node/service.&#xD;&#xA;&#xD;&#xA;Can I do this without building polkadot-parachain myself? I'm using a released binary at the moment (`polkadot-parachain 1.5.0-a3dc2f15f23`)." ContentLicense="CC BY-SA 4.0" />
  <row Id="43263" PostHistoryTypeId="1" PostId="10848" RevisionGUID="2bb534a6-1415-4af4-8fb6-d62df0a4c20b" CreationDate="2024-01-17T11:52:37.803" UserId="380" Text="How do I disable grandpa in polkadot-parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43264" PostHistoryTypeId="3" PostId="10848" RevisionGUID="2bb534a6-1415-4af4-8fb6-d62df0a4c20b" CreationDate="2024-01-17T11:52:37.803" UserId="380" Text="|parachain|rococo|grandpa|rococo-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43265" PostHistoryTypeId="5" PostId="10842" RevisionGUID="3e2cecf8-aa5f-4f27-b1a4-956e540f6d2b" CreationDate="2024-01-17T13:17:42.303" UserId="298" Comment="added 174 characters in body" Text="when i take a snapshot of DOT accounts and add the total balances i get slightly less than the totalIssuance(), approx 21,499 DOT under. &#xD;&#xA;&#xD;&#xA;Is this expected or should they be exactly the same?&#xD;&#xA;&#xD;&#xA;here is the script and repo to [add totals][1], which also contains the snapshot file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const fs = require('fs');&#xD;&#xA;const readline = require('readline');&#xD;&#xA;const path = require('path');&#xD;&#xA;&#xD;&#xA;const snapshotFilePath = path.join(__dirname, '../dot-balances-new-dwellir5.json'); &#xD;&#xA;&#xD;&#xA;async function sumTotalsInSnapshot() {&#xD;&#xA;    const fileStream = fs.createReadStream(snapshotFilePath);&#xD;&#xA;    const rl = readline.createInterface({&#xD;&#xA;        input: fileStream,&#xD;&#xA;        crlfDelay: Infinity&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;    let totalSum = BigInt(0);&#xD;&#xA;    let accountCount = 0; // counter for the number of accounts processed&#xD;&#xA;&#xD;&#xA;    for await (const line of rl) {&#xD;&#xA;        if (line.trim()) { // Skip empty lines&#xD;&#xA;            try {&#xD;&#xA;                const accountData = JSON.parse(line);&#xD;&#xA;                const total = BigInt(accountData.Total || &quot;0&quot;);&#xD;&#xA;                totalSum += total;&#xD;&#xA;                accountCount++; &#xD;&#xA;            } catch (err) {&#xD;&#xA;                console.error(`Error parsing line: ${err}`);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    console.log(`sum total of 'Total' values: ${totalSum.toString()}`);&#xD;&#xA;    console.log(`number of accounts processed: ${accountCount}`);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;sumTotalsInSnapshot().catch(console.error);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;producing: `13,956,878,645,064,514,097`&#xD;&#xA;&#xD;&#xA;the snapshot block is:&#xD;&#xA;&#xD;&#xA;blockNumer: `18871235`&#xD;&#xA;&#xD;&#xA;blockHash: `0x51d501fb2aab8e611c183d14e05cd5e263729a44f89edbe6232ef5bf710910ab`&#xD;&#xA;&#xD;&#xA;the totalIssuance() is `13,957,093,143,985,979,503`&#xD;&#xA;&#xD;&#xA;there is a difference of `21,499 DOT`. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - When trying 300 blocks ahead of the snapshot the discrepancy is still 21,499.xxx DOT. &#xD;&#xA;&#xD;&#xA;- When trying 4m blocks behind of the snapshot number the discrepancy is 16,991&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DOTisDED/snapshot/blob/master/utils/addTotals.cjs" ContentLicense="CC BY-SA 4.0" />
  <row Id="43266" PostHistoryTypeId="5" PostId="10842" RevisionGUID="a6430a8f-125f-4798-b799-43290b93fab1" CreationDate="2024-01-17T13:18:09.800" UserId="298" Comment="added 174 characters in body" Text="when i take a snapshot of DOT accounts and add the total balances i get slightly less than the totalIssuance(), approx 21,499 DOT under. &#xD;&#xA;&#xD;&#xA;Is this expected or should they be exactly the same?&#xD;&#xA;&#xD;&#xA;how is totalIssuance calculated?&#xD;&#xA;&#xD;&#xA;here is the script and repo to [add totals][1], which also contains the snapshot file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const fs = require('fs');&#xD;&#xA;const readline = require('readline');&#xD;&#xA;const path = require('path');&#xD;&#xA;&#xD;&#xA;const snapshotFilePath = path.join(__dirname, '../dot-balances-new-dwellir5.json'); &#xD;&#xA;&#xD;&#xA;async function sumTotalsInSnapshot() {&#xD;&#xA;    const fileStream = fs.createReadStream(snapshotFilePath);&#xD;&#xA;    const rl = readline.createInterface({&#xD;&#xA;        input: fileStream,&#xD;&#xA;        crlfDelay: Infinity&#xD;&#xA;    });&#xD;&#xA;&#xD;&#xA;    let totalSum = BigInt(0);&#xD;&#xA;    let accountCount = 0; // counter for the number of accounts processed&#xD;&#xA;&#xD;&#xA;    for await (const line of rl) {&#xD;&#xA;        if (line.trim()) { // Skip empty lines&#xD;&#xA;            try {&#xD;&#xA;                const accountData = JSON.parse(line);&#xD;&#xA;                const total = BigInt(accountData.Total || &quot;0&quot;);&#xD;&#xA;                totalSum += total;&#xD;&#xA;                accountCount++; &#xD;&#xA;            } catch (err) {&#xD;&#xA;                console.error(`Error parsing line: ${err}`);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    console.log(`sum total of 'Total' values: ${totalSum.toString()}`);&#xD;&#xA;    console.log(`number of accounts processed: ${accountCount}`);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;sumTotalsInSnapshot().catch(console.error);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;producing: `13,956,878,645,064,514,097`&#xD;&#xA;&#xD;&#xA;the snapshot block is:&#xD;&#xA;&#xD;&#xA;blockNumer: `18871235`&#xD;&#xA;&#xD;&#xA;blockHash: `0x51d501fb2aab8e611c183d14e05cd5e263729a44f89edbe6232ef5bf710910ab`&#xD;&#xA;&#xD;&#xA;the totalIssuance() is `13,957,093,143,985,979,503`&#xD;&#xA;&#xD;&#xA;there is a difference of `21,499 DOT`. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA; - When trying 300 blocks ahead of the snapshot the discrepancy is still 21,499.xxx DOT. &#xD;&#xA;&#xD;&#xA;- When trying 4m blocks behind of the snapshot number the discrepancy is 16,991&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/DOTisDED/snapshot/blob/master/utils/addTotals.cjs" ContentLicense="CC BY-SA 4.0" />
  <row Id="43267" PostHistoryTypeId="2" PostId="10849" RevisionGUID="5d8d854d-e4d4-440b-86c8-a879d6945f63" CreationDate="2024-01-17T13:30:17.487" UserId="2089" Text="How to retrieve stash account of a nomination pool? for e.g. below&#xD;&#xA;&#xD;&#xA;https://polkadot.subscan.io/nomination_pool/1?tab=member&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wmyym.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43269" PostHistoryTypeId="1" PostId="10849" RevisionGUID="5d8d854d-e4d4-440b-86c8-a879d6945f63" CreationDate="2024-01-17T13:30:17.487" UserId="2089" Text="How to retrieve stash account of a nomination pool creator?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43270" PostHistoryTypeId="3" PostId="10849" RevisionGUID="5d8d854d-e4d4-440b-86c8-a879d6945f63" CreationDate="2024-01-17T13:30:17.487" UserId="2089" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43271" PostHistoryTypeId="2" PostId="10850" RevisionGUID="e9a78503-de23-4d1b-8d39-b8a48db70d0e" CreationDate="2024-01-17T13:42:53.953" UserId="2089" Text="One possible solution, is to fetch all entries using `api.query.staking.bonded`&#xD;&#xA;using `api.query.staking.ledger.entries()`. Refer the [api doc][1] and usage of [entries()][2] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/polkadot/storage#staking&#xD;&#xA;  [2]: https://polkadot.js.org/docs/api/start/api.query.other#map-keys--entries&#xD;&#xA;  [3]: https://i.stack.imgur.com/Bl0Rx.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43273" PostHistoryTypeId="2" PostId="10851" RevisionGUID="4761510e-2fbf-4da7-9049-4c31fbef7689" CreationDate="2024-01-17T13:45:10.450" UserId="4440" Text="I try to make a stake with polkadot js api. Here is my commands:&#xD;&#xA;`const info = await api.tx.staking&#xD;&#xA;                    .bond(amount, {Controller: receiver})&#xD;&#xA;                    .paymentInfo(sender); &#xD;&#xA;const bondTx = api.tx.staking.bond(stenToUnits(amount), {Controller: receiver});&#xD;&#xA;const unsub = await bondTx.signAndSend(senderPair);&#xD;&#xA;await waitUntilFinalized(unsub);&#xD;&#xA;const nominationTx = api.tx.staking.nominate([nominatingValidators[0]]);&#xD;&#xA;await nominationTx.signAndSend(senderPair);`&#xD;&#xA;&#xD;&#xA;But I get an error:&#xD;&#xA; `RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1014: Priority is too low: (3446 vs 2005): The transaction has too low priority to replace another transaction already in the pool.....&#xD;&#xA;index.js:19 Uncaught (in promise) k: 1014: Priority is too low: (3446 vs 2005): The transaction has too low priority to replace another transaction already in the pool.`&#xD;&#xA;&#xD;&#xA;What am I doing wrong? How to fix this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43275" PostHistoryTypeId="1" PostId="10851" RevisionGUID="4761510e-2fbf-4da7-9049-4c31fbef7689" CreationDate="2024-01-17T13:45:10.450" UserId="4440" Text="Staking with polkadot js api" ContentLicense="CC BY-SA 4.0" />
  <row Id="43276" PostHistoryTypeId="3" PostId="10851" RevisionGUID="4761510e-2fbf-4da7-9049-4c31fbef7689" CreationDate="2024-01-17T13:45:10.450" UserId="4440" Text="|polkadot-js|staking|api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43277" PostHistoryTypeId="12" PostId="10850" RevisionGUID="2f92137f-7a73-498f-9dfe-5f2b0b95cd3d" CreationDate="2024-01-17T13:56:47.183" UserId="2089" Comment="via Vote" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2089,&quot;DisplayName&quot;:&quot;muddlebee&quot;}],&quot;DeleteType&quot;:1}" />
  <row Id="43278" PostHistoryTypeId="5" PostId="10849" RevisionGUID="c7d00441-b767-4d82-b4b4-b2c3da645682" CreationDate="2024-01-17T14:37:23.077" UserId="2089" Comment="added 8 characters in body" Text="How to retrieve stash account of a nomination pool creator? for e.g. below&#xD;&#xA;&#xD;&#xA;https://polkadot.subscan.io/nomination_pool/1?tab=member&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wmyym.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43279" PostHistoryTypeId="2" PostId="10852" RevisionGUID="70005242-a9e4-49d8-a317-f8a12c5a34ee" CreationDate="2024-01-17T16:40:29.880" UserId="555" Text="Actually I want to define a storage without config trait but if I'm doing this then I'm getting lot of error. Is it possible?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;/// Author of current block.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Author&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, u64, T::AccountId, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Need to define like this: &#xD;&#xA;```rust&#xD;&#xA;/// Author of current block.&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	pub type Author = StorageMap&lt;_, Blake2_128Concat, u64, AccountId, OptionQuery&gt;;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43281" PostHistoryTypeId="1" PostId="10852" RevisionGUID="70005242-a9e4-49d8-a317-f8a12c5a34ee" CreationDate="2024-01-17T16:40:29.880" UserId="555" Text="Is it possible to define a storage inside the pallet without config trait?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43282" PostHistoryTypeId="3" PostId="10852" RevisionGUID="70005242-a9e4-49d8-a317-f8a12c5a34ee" CreationDate="2024-01-17T16:40:29.880" UserId="555" Text="|substrate-node-template|pallet|storage|traits|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43283" PostHistoryTypeId="5" PostId="10851" RevisionGUID="3217b1a1-bc29-4063-9e2a-9c07e9bec65d" CreationDate="2024-01-17T16:51:28.260" UserId="2762" Comment="improved formatting" Text="I try to make a stake with polkadot js api. Here is my commands:&#xD;&#xA;```js&#xD;&#xA;const info = await api.tx.staking&#xD;&#xA;                    .bond(amount, {Controller: receiver})&#xD;&#xA;                    .paymentInfo(sender); &#xD;&#xA;const bondTx = api.tx.staking.bond(stenToUnits(amount), {Controller: receiver});&#xD;&#xA;const unsub = await bondTx.signAndSend(senderPair);&#xD;&#xA;await waitUntilFinalized(unsub);&#xD;&#xA;const nominationTx = api.tx.staking.nominate([nominatingValidators[0]]);&#xD;&#xA;await nominationTx.signAndSend(senderPair);`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I get an error:&#xD;&#xA;```&#xD;&#xA;RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1014: Priority is too low: (3446 vs 2005): The transaction has too low priority to replace another transaction already in the pool.....&#xD;&#xA;index.js:19 Uncaught (in promise) k: 1014: Priority is too low: (3446 vs 2005): The transaction has too low priority to replace another transaction already in the pool.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I doing wrong? How to fix this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43284" PostHistoryTypeId="2" PostId="10853" RevisionGUID="9521b63c-288a-4729-9800-afbb8ec16366" CreationDate="2024-01-17T16:53:07.830" UserId="2762" Text="The error `Priority is too low: (3446 vs 2005): The transaction has too low priority to replace another transaction already in the pool.` means that there is already a transaction in the queue with that nonce.&#xD;&#xA;&#xD;&#xA;You can manually set the nonce in the `signAndSend` method like in this example: [How to use `polkadot-api` to send multiple transactions simultaneously?][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/1776/how-to-use-polkadot-api-to-send-multiple-transactions-simultaneously" ContentLicense="CC BY-SA 4.0" />
  <row Id="43286" PostHistoryTypeId="2" PostId="10854" RevisionGUID="850fcad5-368c-4f4d-9774-49c720e91507" CreationDate="2024-01-17T17:06:15.913" UserId="298" Text="After doing a binary search, the discrepancy between summing accounts and the totalIssuance() began at block `313222` on polkadot. This was almost exactly 20,000 DOT. &#xD;&#xA;&#xD;&#xA;After this block the number does differ. For example, block `18871235` is 24,999 DOT discrepancy. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43288" PostHistoryTypeId="2" PostId="10855" RevisionGUID="5656753c-1265-4a7c-a514-498f2655ab01" CreationDate="2024-01-17T17:32:02.253" UserId="2762" Text="I hope there is a more efficient/better method. &#xD;&#xA;The workaround I found is to first query  `bondedPools`: &#xD;&#xA;```js&#xD;&#xA;const bondedPool = await api.query.nominationPools.bondedPools(1);&#xD;&#xA;```&#xD;&#xA;Here you can get the points (bondedPool.points), e.g: 3,168,542,829,169,032&#xD;&#xA;&#xD;&#xA;Now similar as you suggested, fetch all entries of `api.query.staking.ledger.entries()` which is the map from all &quot;controller&quot; accounts to the info regarding the staking.&#xD;&#xA;And use the number of points to compare with the `active` field from the ledgers entries and if matches you have the stash account there.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/qLXXV.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43290" PostHistoryTypeId="2" PostId="10856" RevisionGUID="374d1005-44d1-4e26-9ef3-3ffdfe3139d9" CreationDate="2024-01-17T17:38:21.960" UserId="94" Text="Good find!  &#xD;&#xA;&#xD;&#xA;I opened an issue in the runtimes repo https://github.com/polkadot-fellows/runtimes/issues/147 to correct it.  &#xD;&#xA;Could be that there are more reasons and that the 20K are just one part of it. Many thanks for reporting it here." ContentLicense="CC BY-SA 4.0" />
  <row Id="43292" PostHistoryTypeId="52" PostId="10842" RevisionGUID="fe0c12c8-14ad-45ce-a871-c0c73ecbbd12" CreationDate="2024-01-17T17:42:35.343" />
  <row Id="43294" PostHistoryTypeId="2" PostId="10857" RevisionGUID="3d9dc8ae-c245-4d95-90d0-14d9e43f5d69" CreationDate="2024-01-17T20:19:54.303" UserId="251" Text="- What is coretime?&#xD;&#xA;- I do know this will affect the current parachain aution/slot model. But does this conflict with the on-demand parathread, or will it replace the existing on-demand parathread model?&#xD;&#xA;- When will this be implemented in Kusama and Polkadot? (An exact timeline isn't necessary.)&#xD;&#xA;- How can we transition smoothly to core time from the current auction model?&#xD;&#xA;&#xD;&#xA;I'm sure many parachain teams are wondering about these questions. However, I've found limited resources for learning about it beyond examining the code.&#xD;&#xA;&#xD;&#xA;And if you can provide some links to the resources while answering the questions that would be better.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="43296" PostHistoryTypeId="1" PostId="10857" RevisionGUID="3d9dc8ae-c245-4d95-90d0-14d9e43f5d69" CreationDate="2024-01-17T20:19:54.303" UserId="251" Text="What's coretime?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43297" PostHistoryTypeId="3" PostId="10857" RevisionGUID="3d9dc8ae-c245-4d95-90d0-14d9e43f5d69" CreationDate="2024-01-17T20:19:54.303" UserId="251" Text="|parachain|coretime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43298" PostHistoryTypeId="2" PostId="10858" RevisionGUID="97018a43-8818-4738-afde-726645cf2d55" CreationDate="2024-01-17T20:44:30.557" UserId="5081" Text="Is there an easy way to query how many EVM smart contracts has been deployed in a Substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43300" PostHistoryTypeId="1" PostId="10858" RevisionGUID="97018a43-8818-4738-afde-726645cf2d55" CreationDate="2024-01-17T20:44:30.557" UserId="5081" Text="How to query the number of EVM contracts in a chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="43301" PostHistoryTypeId="3" PostId="10858" RevisionGUID="97018a43-8818-4738-afde-726645cf2d55" CreationDate="2024-01-17T20:44:30.557" UserId="5081" Text="|evm|frontier|ethereum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43302" PostHistoryTypeId="2" PostId="10859" RevisionGUID="7142855e-5e44-41ad-a628-d8227c41a99c" CreationDate="2024-01-17T20:50:46.917" UserId="2762" Text="Once you get the poolID, you can also query the metadata:&#xD;&#xA;```js&#xD;&#xA;await api.query.nominationPools.metadata(pool_id);&#xD;&#xA;```&#xD;&#xA;You can look more information about this here: [Get pool name and stash account from nomination pool creator][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/6954/get-pool-name-and-stash-account-from-nomination-pool-creator" ContentLicense="CC BY-SA 4.0" />
  <row Id="43304" PostHistoryTypeId="2" PostId="10860" RevisionGUID="32f59800-8f14-41f3-8085-4f468efbe1a4" CreationDate="2024-01-17T21:10:22.847" UserId="2005" Text="One way is by querying chain state for all entries of `EVM::AccountCodes` or `EVM::AccountCodesMetadata` storages and counting them. For each deployed contract, its code is [stored][1] in `AccountCodes`. &#xD;&#xA;&#xD;&#xA;Keep in mind that depending on the chain this storage might be big and could be really slow to query all entries. If this is the case, use `paged` storage [query][2]. &#xD;&#xA;&#xD;&#xA;P.S This doesn't take into account precompiles (but they can be manually injected with a dummy code).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-evm/frontier/blob/master/frame/evm/src/lib.rs#L838&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/10568/2005" ContentLicense="CC BY-SA 4.0" />
  <row Id="43306" PostHistoryTypeId="50" PostId="10674" RevisionGUID="ecd09c6e-4546-4e20-869c-2cf684046ee1" CreationDate="2024-01-17T22:03:35.557" UserId="-1" />
  <row Id="43307" PostHistoryTypeId="2" PostId="10861" RevisionGUID="0c7be095-b250-4680-b86e-4ce3a1dcbad7" CreationDate="2024-01-18T01:40:39.673" UserId="2844" Text="I am running two jobs which return different value. how to decode those value? for one job I am doing [like this](https://github.com/XcavateBlockchain/tanssi/blob/942de087f4a1f5d84a3dd23d87a5ecbd660962ce/container-chains/templates/simple/runtime/src/lib.rs#L1023). Someone please suggest me how to decode two jobs value?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43309" PostHistoryTypeId="1" PostId="10861" RevisionGUID="0c7be095-b250-4680-b86e-4ce3a1dcbad7" CreationDate="2024-01-18T01:40:39.673" UserId="2844" Text="How to decode two different values?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43310" PostHistoryTypeId="3" PostId="10861" RevisionGUID="0c7be095-b250-4680-b86e-4ce3a1dcbad7" CreationDate="2024-01-18T01:40:39.673" UserId="2844" Text="|oracles|acurast|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43311" PostHistoryTypeId="5" PostId="8687" RevisionGUID="00095b25-6ef4-4916-bf23-1f5e9720594e" CreationDate="2024-01-18T01:53:21.260" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I am trying to send `polkadot transaction` with python script, using this rust code as a [reference][1]&#xD;&#xA;but I'm having trouble to convert  `call.encode_to(&amp;mut tmp)` with &#xD;&#xA;`py-scale-codec`.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-interaction-examples-rs/blob/main/src/bin/05_transfer_balance.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="43312" PostHistoryTypeId="4" PostId="8687" RevisionGUID="00095b25-6ef4-4916-bf23-1f5e9720594e" CreationDate="2024-01-18T01:53:21.260" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="Sending polkadot transaction with python script" ContentLicense="CC BY-SA 4.0" />
  <row Id="43313" PostHistoryTypeId="50" PostId="10667" RevisionGUID="d93c5daa-0bf2-432a-894a-d29bdf1fca6f" CreationDate="2024-01-18T06:02:00.333" UserId="-1" />
  <row Id="43314" PostHistoryTypeId="2" PostId="10862" RevisionGUID="12ce3aeb-0d59-4ab1-b8c7-548d245e1b9c" CreationDate="2024-01-18T06:56:38.280" UserId="2372" Text="&#xD;&#xA;When I link a relay chain to the parachain using the Local chain type, it successfully generates blocks. However, upon changing the chain type to live in chain_spec.rs, block production fails, and an error is reported stating that `collation wasn't advertised to any validator`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43316" PostHistoryTypeId="1" PostId="10862" RevisionGUID="12ce3aeb-0d59-4ab1-b8c7-548d245e1b9c" CreationDate="2024-01-18T06:56:38.280" UserId="2372" Text="Parachain does not producing blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="43317" PostHistoryTypeId="3" PostId="10862" RevisionGUID="12ce3aeb-0d59-4ab1-b8c7-548d245e1b9c" CreationDate="2024-01-18T06:56:38.280" UserId="2372" Text="|parachain|substrate-parachain-template|relay-chain|parachain-collator|parachain-launch|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43318" PostHistoryTypeId="50" PostId="8898" RevisionGUID="2c21be81-5572-4110-806d-2784b2afe7f0" CreationDate="2024-01-18T07:02:10.213" UserId="-1" />
  <row Id="43319" PostHistoryTypeId="5" PostId="10857" RevisionGUID="ef3b5cbf-6e11-4bee-9237-15a3a95ae2e4" CreationDate="2024-01-18T09:01:14.977" UserId="251" Comment="added 179 characters in body" Text="1. What is coretime?&#xD;&#xA;2. I do know this will affect the current parachain aution/slot model. But does this conflict with the on-demand parathread, or will it replace the existing on-demand parathread model?&#xD;&#xA;3. When will this be implemented in Kusama and Polkadot? (An exact timeline isn't necessary.)&#xD;&#xA;4. How can we transition smoothly to coretime model from the current auction model?&#xD;&#xA;5. Upon further investigation, does a parachain slot correspond to 'bulk coretime' and an on-demand parathread to 'instantaneous coretime'? If so, please disregard question 2.&#xD;&#xA;&#xD;&#xA;I'm sure many parachain teams are wondering about these questions. However, I've found limited resources for learning about it beyond examining the code.&#xD;&#xA;&#xD;&#xA;And if you can provide some links to the resources while answering the questions that would be better.&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="43320" PostHistoryTypeId="5" PostId="7804" RevisionGUID="c9f242ed-0853-4f7f-8f4c-5d1738312e69" CreationDate="2024-01-18T09:31:19.200" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I'm trying to have my pallet compile a pallet call based on the feature that is set, for example if I have two function calls `feature_one()` and `feature_two()`, it works fine with `feature_one` but when I add the second method with the `#[cfg(feature= &quot;feature2&quot;)]` macro it gives me the following error:&#xD;&#xA;```rs&#xD;&#xA;      error[E0599]: no function or associated item named `feature_two` found for struct `pallet::Pallet` in the current scope&#xD;&#xA;&#xD;&#xA;    function or associated item not found in `pallet::Pallet&lt;T&gt;`&#xD;&#xA;    help: there is an associated function with a similar name: `feature_one`&#xD;&#xA;```&#xD;&#xA;this is the pallet code:&#xD;&#xA;```rs&#xD;&#xA;        #![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;        #[cfg(test)]&#xD;&#xA;        mod tests;&#xD;&#xA;        pub use pallet::*;&#xD;&#xA;        #[frame_support::pallet]&#xD;&#xA;        pub mod pallet {&#xD;&#xA;        	use frame_system::pallet_prelude::*;&#xD;&#xA;        	pub use sp_runtime::traits::Extrinsic;&#xD;&#xA;        	#[pallet::pallet]&#xD;&#xA;        	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;        	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;        &#xD;&#xA;        	#[pallet::config]&#xD;&#xA;        	pub trait Config: frame_system::Config {&#xD;&#xA;        		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;        	}&#xD;&#xA;        	#[pallet::event]&#xD;&#xA;        	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;        	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;        		/// An Event has been validated&#xD;&#xA;        		CustomEvent { event_id: T::Hash },&#xD;&#xA;        	}&#xD;&#xA;        	#[pallet::error]&#xD;&#xA;        	pub enum Error&lt;T&gt; {&#xD;&#xA;        		AlreadySymbitted,&#xD;&#xA;        	}&#xD;&#xA;       #[pallet::storage]&#xD;&#xA;    	pub(super) type MyStorage&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::Hash, T::BlockNumber&gt;;&#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        	#[pallet::call]&#xD;&#xA;        	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;        	    #[cfg(feature= &quot;feature1&quot;)]&#xD;&#xA;                #[pallet::weight(0)]&#xD;&#xA;        		pub fn feature_one(_origin: OriginFor&lt;T&gt;, event_id: T::Hash) -&gt; DispatchResult {&#xD;&#xA;        		} &#xD;&#xA;    &#xD;&#xA;               #[cfg(feature= &quot;feature2&quot;)]&#xD;&#xA;               #[pallet::weight(0)]&#xD;&#xA;                pub fn feature_two(_origin: OriginFor&lt;T&gt;, event_id: T::Hash) -&gt; DispatchResult {&#xD;&#xA;            &#xD;&#xA;            }&#xD;&#xA;    &#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43321" PostHistoryTypeId="4" PostId="7804" RevisionGUID="c9f242ed-0853-4f7f-8f4c-5d1738312e69" CreationDate="2024-01-18T09:31:19.200" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="How to conditionally compile functions in pallet::call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43322" PostHistoryTypeId="5" PostId="7806" RevisionGUID="e685b3d4-bd62-40e3-b8b0-f33878826f25" CreationDate="2024-01-18T09:40:27.697" UserId="116" Comment="explained the code" Text="There are a few ways to solve this.&#xD;&#xA;&#xD;&#xA;You can do like this, with one feature flag for both alternatives.&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn f() {&#xD;&#xA;    Self::ff();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[cfg(not(feature = &quot;g&quot;))]&#xD;&#xA;  fn ff() {}&#xD;&#xA;&#xD;&#xA;  #[cfg(feature = &quot;g&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or use two independent flags to include a stub when unused: &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call]&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[pallet::call_index(0)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn f() {&#xD;&#xA;     Self::ff();&#xD;&#xA;  }&#xD;&#xA;&#xD;&#xA;  #[pallet::call_index(1)]&#xD;&#xA;  #[pallet::weight(0)]&#xD;&#xA;  fn g() {&#xD;&#xA;     Self::gg();&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;  #[cfg(feature = &quot;f&quot;)]&#xD;&#xA;  fn ff() {}&#xD;&#xA;  #[cfg(not(feature = &quot;f&quot;))]&#xD;&#xA;  fn ff() { return not enable }&#xD;&#xA;&#xD;&#xA;  #[cfg(feature = &quot;g&quot;)]&#xD;&#xA;  fn gg() {}&#xD;&#xA;  #[cfg(not(feature = &quot;g&quot;))]&#xD;&#xA;  fn gg() { return not enable }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;or simply hide the struct behind a feature flag:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[pallet::call_index(0)]&#xD;&#xA;#[pallet::weight(0)]&#xD;&#xA;fn f(.., params: Params) {&#xD;&#xA;   Self::ff(params);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;f&quot;)]&#xD;&#xA;struct Params {&#xD;&#xA;  f: u8&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;g&quot;)]&#xD;&#xA;struct Params {&#xD;&#xA;  g: u16&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43323" PostHistoryTypeId="2" PostId="10863" RevisionGUID="f466fd65-0281-414a-8c51-7ba3ec16f98d" CreationDate="2024-01-18T10:47:47.703" UserId="4794" Text="The ```NextAuthorities``` is only updated in function `enact_epoch_change()` in ``pallet_babe``&#xD;&#xA;and this function is called in Trait ``EpochChangeTrigger``  (pallet_babe) and `OnSessionHandler`&#xD;&#xA;&#xD;&#xA;so, in the `pallet_session` how is these traits used?&#xD;&#xA;and from the custom pallet, how to trigger this function/ trait to update the ``NextAuthorities`` set.&#xD;&#xA;&#xD;&#xA;https://github.com/Aideepakchaudhary/proof-of-stake-node-template/blob/main/runtime/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="43325" PostHistoryTypeId="1" PostId="10863" RevisionGUID="f466fd65-0281-414a-8c51-7ba3ec16f98d" CreationDate="2024-01-18T10:47:47.703" UserId="4794" Text="How to change the NextAuthorities set from custom pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43326" PostHistoryTypeId="3" PostId="10863" RevisionGUID="f466fd65-0281-414a-8c51-7ba3ec16f98d" CreationDate="2024-01-18T10:47:47.703" UserId="4794" Text="|storage|babe|pos|trait|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43327" PostHistoryTypeId="2" PostId="10864" RevisionGUID="c180d892-b869-4b2b-8d0a-6e4a745541ae" CreationDate="2024-01-18T11:11:12.117" UserId="1842" Text="1: https://polkadot-fellows.github.io/RFCs/approved/0001-agile-coretime.html&#xD;&#xA;&#xD;&#xA;2: on-demand is going to be extended in functionality by agile coretime: If you bought a core you can make it available for on-demand (in part or full) and get a share of the generated revenue. Note: on-demand is still called instantaneous in the RFC.&#xD;&#xA;&#xD;&#xA;3: Already rolled out on Rococo (testnet), plan to go live on Kusama in Q1.&#xD;&#xA;&#xD;&#xA;4: Specified in the RFC: If you own a lease, you will be eligible for &quot;renewal&quot; on coretime.&#xD;&#xA;&#xD;&#xA;5: yes." ContentLicense="CC BY-SA 4.0" />
  <row Id="43329" PostHistoryTypeId="6" PostId="10863" RevisionGUID="43a1b34f-7fdf-47b5-a6ef-1bd8d5b02cbb" CreationDate="2024-01-18T11:53:48.050" UserId="4794" Comment="edited tags" Text="|storage|validator|babe|pos|trait|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43330" PostHistoryTypeId="2" PostId="10865" RevisionGUID="d44db646-8869-44a4-8369-da3dfbfed094" CreationDate="2024-01-18T13:24:58.387" UserId="251" Text="Create a struct and implement the [`new_session`](https://github.com/paritytech/polkadot-sdk/blob/9a8ef495bef273d23df6ca6c825e8ef145c1489f/substrate/frame/session/src/lib.rs#L242) for it within your custom pallet.&#xD;&#xA;&#xD;&#xA;Then, assign this struct to the [pallet_session::Config::SessionManager](https://github.com/paritytech/polkadot-sdk/blob/9a8ef495bef273d23df6ca6c825e8ef145c1489f/substrate/frame/session/src/lib.rs#L405) in your runtime configuration.&#xD;&#xA;&#xD;&#xA;As you can see, `new_session` returns an `Option&lt;Vec&lt;AccountId&gt;&gt;`. And session pallet will use this account list to update the authorities internally." ContentLicense="CC BY-SA 4.0" />
  <row Id="43336" PostHistoryTypeId="6" PostId="9354" RevisionGUID="1d034055-5f42-4348-8638-fcaaa2e22685" CreationDate="2024-01-18T16:21:08.263" UserId="2025" Comment="edited tags" Text="|xcm|substrate-parachain-template|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43337" PostHistoryTypeId="2" PostId="10867" RevisionGUID="bfcccadd-e3b0-477b-8142-dcb3bdf4ddf7" CreationDate="2024-01-18T16:23:16.767" UserId="5081" Text="Is there a tutorial explaining how to interact with EVM smart contracts using PolkadotJS?." ContentLicense="CC BY-SA 4.0" />
  <row Id="43339" PostHistoryTypeId="1" PostId="10867" RevisionGUID="bfcccadd-e3b0-477b-8142-dcb3bdf4ddf7" CreationDate="2024-01-18T16:23:16.767" UserId="5081" Text="How to interact with EVM contracts using polkadotJS" ContentLicense="CC BY-SA 4.0" />
  <row Id="43340" PostHistoryTypeId="3" PostId="10867" RevisionGUID="bfcccadd-e3b0-477b-8142-dcb3bdf4ddf7" CreationDate="2024-01-18T16:23:16.767" UserId="5081" Text="|polkadot-js|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43345" PostHistoryTypeId="2" PostId="10869" RevisionGUID="5b4d118a-8d21-4a6b-99d7-d1f875c551db" CreationDate="2024-01-19T05:48:00.780" UserId="3538" Text="I want to write the [`multi-addresses`](https://paritytech.github.io/polkadot-sdk/master/sc_rpc/system/trait.SystemApiServer.html#tymethod.system_local_listen_addresses) of all nodes in my network to a file on the IPFS. I see that there's [this](https://github.com/TDSoftware/substrate-ipfs/tree/master/frame/tds-ipfs) module that can be used to write data to IPFS, I was just wondering whether it would be possible for a node that as soon as it becomes part of the network, its multiaddress is written to IPFS? Are there any possible issues that I can face in the process?  " ContentLicense="CC BY-SA 4.0" />
  <row Id="43347" PostHistoryTypeId="1" PostId="10869" RevisionGUID="5b4d118a-8d21-4a6b-99d7-d1f875c551db" CreationDate="2024-01-19T05:48:00.780" UserId="3538" Text="Write node details to IPFS" ContentLicense="CC BY-SA 4.0" />
  <row Id="43348" PostHistoryTypeId="3" PostId="10869" RevisionGUID="5b4d118a-8d21-4a6b-99d7-d1f875c551db" CreationDate="2024-01-19T05:48:00.780" UserId="3538" Text="|networking|bootnode|multiaddress|rust-ipfs|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43349" PostHistoryTypeId="5" PostId="10850" RevisionGUID="9d7b0a82-ab4c-438d-bcd4-147947d13925" CreationDate="2024-01-19T08:05:44.627" UserId="2089" Comment="deleted 95 characters in body" Text="Alternative way is to use subscan API, which runs its own custom indexer to get the data.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;POST: https://polkadot.webapi.subscan.io/api/scan/nomination_pool/pool&#xD;&#xA;&#xD;&#xA;{&quot;pool_id&quot;:1}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The API calls made on the [subscan nom pools UI][1]&#xD;&#xA;&#xD;&#xA;Other subscan APIs can be accessed [here][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/nomination_pool/1?tab=member&#xD;&#xA;  [2]: https://support.subscan.io/" ContentLicense="CC BY-SA 4.0" />
  <row Id="43350" PostHistoryTypeId="13" PostId="10850" RevisionGUID="5bb41c99-c432-4c96-9c42-c89a94f48b98" CreationDate="2024-01-19T08:05:48.663" UserId="2089" Text="{&quot;Voters&quot;:[{&quot;Id&quot;:2089,&quot;DisplayName&quot;:&quot;muddlebee&quot;}]}" />
  <row Id="43352" PostHistoryTypeId="2" PostId="10870" RevisionGUID="291efd1d-8e9d-4bc4-8b16-c02d5d2c7785" CreationDate="2024-01-19T14:12:40.453" UserId="2762" Text="Check this Substrate tutorial: [Access EVM accounts][1] &#xD;&#xA;&#xD;&#xA;You can go to the point where it [checks the account storage][2], to see how is doing it using polkadotJS UI: query the state `accountStorages` from evm pallet, specifying the smart contract address and the storage slot for the address (How to calculate the storage slot here: [Substrate EVM Utilities)][3].&#xD;&#xA;&#xD;&#xA;An JS example of that:&#xD;&#xA;```js&#xD;&#xA;const balance = api.query.evm.accountStorages(smartContractAddress, storageSlot);&#xD;&#xA;```&#xD;&#xA;If you have a doubt about how to manage the keys, I opened a StackExchange question a while ago: [Private key for EVM Frontier][4] that has amazing explanation about it.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts/#view-account-storage&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/frontier-node-template/blob/main/utils/README.md#--erc20-slot-slot-address&#xD;&#xA;  [4]: https://substrate.stackexchange.com/questions/6674/private-key-for-evm-frontier?noredirect=1&amp;lq=1" ContentLicense="CC BY-SA 4.0" />
  <row Id="43354" PostHistoryTypeId="50" PostId="7585" RevisionGUID="16b96206-8482-4ddf-8cc9-de365bacd8dc" CreationDate="2024-01-19T19:10:16.333" UserId="-1" />
  <row Id="43355" PostHistoryTypeId="2" PostId="10871" RevisionGUID="7cfc0cb8-ce0d-485f-9aa6-32fa068f7ded" CreationDate="2024-01-19T22:45:25.543" UserId="4794" Text="I have this error. Please check out the code at https://github.com/nhathuyenqt/pos-node&#xD;&#xA;```&#xD;&#xA; error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /Users/h/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.12/src/lib.rs:291:9&#xD;&#xA;      |&#xD;&#xA;  291 | /         compile_error!(&quot;the wasm*-unknown-unknown targets are not supported by \&#xD;&#xA;  292 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  293 | |                         For more information see: \&#xD;&#xA;  294 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /Users/h/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.12/src/lib.rs:347:9&#xD;&#xA;      |&#xD;&#xA;  347 |         imp::getrandom_inner(dest)?;&#xD;&#xA;      |         ^^^ use of undeclared crate or module `imp`&#xD;&#xA;&#xD;&#xA;     Compiling paste v1.0.14&#xD;&#xA;```&#xD;&#xA;I even tried the solution from here: https://substrate.stackexchange.com/questions/529/failed-to-resolve-use-of-undeclared-crate-or-module-imp&#xD;&#xA;but it does not really help.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43357" PostHistoryTypeId="1" PostId="10871" RevisionGUID="7cfc0cb8-ce0d-485f-9aa6-32fa068f7ded" CreationDate="2024-01-19T22:45:25.543" UserId="4794" Text="cannot find module 'sys' and ^^^ use of undeclared crate or module `imp`" ContentLicense="CC BY-SA 4.0" />
  <row Id="43358" PostHistoryTypeId="3" PostId="10871" RevisionGUID="7cfc0cb8-ce0d-485f-9aa6-32fa068f7ded" CreationDate="2024-01-19T22:45:25.543" UserId="4794" Text="|pallet|crates|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43359" PostHistoryTypeId="5" PostId="10871" RevisionGUID="c6202fe8-f9ae-4266-b355-225ba9fdb812" CreationDate="2024-01-19T23:07:04.970" UserId="4794" Comment="added 1113 characters in body" Text="I have this error. Please check out the code at https://github.com/nhathuyenqt/pos-node&#xD;&#xA;```&#xD;&#xA;error: failed to run custom build command for `node-template-runtime v4.0.0-dev (/Users/h/Desktop/pokadot/pos-node/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/h/Desktop/pokadot/pos-node/target/release/build/node-template-runtime-cd1339cedb99f0d8/build-script-build` (exit status: 1)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: env -u CARGO_ENCODED_RUSTFLAGS -u CARGO_TARGET_DIR RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/h/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/h/Desktop/pokadot/pos-node/target/release/wbuild/node-template-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot;&#xD;&#xA;  Using rustc version: rustc 1.76.0-nightly (ba7c7a301 2023-11-13)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling getrandom v0.2.12&#xD;&#xA;  error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the &quot;js&quot; feature. For more information see: https://docs.rs/getrandom/#webassembly-support&#xD;&#xA;     --&gt; /Users/h/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.12/src/lib.rs:291:9&#xD;&#xA;      |&#xD;&#xA;  291 | /         compile_error!(&quot;the wasm*-unknown-unknown targets are not supported by \&#xD;&#xA;  292 | |                         default, you may need to enable the \&quot;js\&quot; feature. \&#xD;&#xA;  293 | |                         For more information see: \&#xD;&#xA;  294 | |                         https://docs.rs/getrandom/#webassembly-support&quot;);&#xD;&#xA;      | |________________________________________________________________________^&#xD;&#xA;&#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `imp`&#xD;&#xA;     --&gt; /Users/h/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.12/src/lib.rs:347:9&#xD;&#xA;      |&#xD;&#xA;  347 |         imp::getrandom_inner(dest)?;&#xD;&#xA;      |         ^^^ use of undeclared crate or module `imp`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0433`.&#xD;&#xA;  error: could not compile `getrandom` (lib) due to 2 previous errors&#xD;&#xA;```&#xD;&#xA;I even tried the solution from here: https://substrate.stackexchange.com/questions/529/failed-to-resolve-use-of-undeclared-crate-or-module-imp&#xD;&#xA;but it does not really help.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43360" PostHistoryTypeId="2" PostId="10872" RevisionGUID="df994835-7ed0-4d21-85c6-7630e0bcfb1c" CreationDate="2024-01-19T23:43:49.750" UserId="2005" Text="this is almost always about missing `default-features = false` or not enabling `std` feature for the dependency.&#xD;&#xA;&#xD;&#xA;in your case, in `pallet-template` `sp-core`, `sp-io`, `log` are missing `default-features = false` and `std` is not enabled for several others. Carefully look at the dependencies and make sure they are properly included." ContentLicense="CC BY-SA 4.0" />
  <row Id="43366" PostHistoryTypeId="50" PostId="10693" RevisionGUID="ae26ec37-656a-4b7f-b632-9396f63f3d83" CreationDate="2024-01-20T09:05:45.863" UserId="-1" />
  <row Id="43367" PostHistoryTypeId="2" PostId="10873" RevisionGUID="2a9a432f-cf74-4cb5-9f74-e67fba2acea4" CreationDate="2024-01-20T13:35:52.630" UserId="5089" Text="I am new to Substrate and currently reading through all the great documentation that is available.&#xD;&#xA;I understand the concept of block authoring and finalization, but the following is a bit unclear&#xD;&#xA;to me:&#xD;&#xA;&#xD;&#xA;Each node of my network can have their own RPC endpoint that can be used to send transactions &#xD;&#xA;to that node, which then will be validated and placed into the transaction pool of that node until&#xD;&#xA;it is put into a block.&#xD;&#xA;&#xD;&#xA;Now, when my network uses a round robin authoring algorithm like AURA, I wonder how the node that&#xD;&#xA;is currently selected to auther the next block is aware of transactions withing transaction pools &#xD;&#xA;of other nodes? Is every node gossiping their enitre transaction pool to any other node, so every node&#xD;&#xA;of the network is aware of each valid transaction that was send to any RPC endpoint? Or does a valid &#xD;&#xA;transaction stay in the transaction pool of a node until it is that node's turn to auther a new block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43369" PostHistoryTypeId="1" PostId="10873" RevisionGUID="2a9a432f-cf74-4cb5-9f74-e67fba2acea4" CreationDate="2024-01-20T13:35:52.630" UserId="5089" Text="How are valid transactions distributed to block authoring nodes?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43370" PostHistoryTypeId="3" PostId="10873" RevisionGUID="2a9a432f-cf74-4cb5-9f74-e67fba2acea4" CreationDate="2024-01-20T13:35:52.630" UserId="5089" Text="|substrate-node-template|consensus|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43371" PostHistoryTypeId="50" PostId="10698" RevisionGUID="64f731b0-f99a-4991-9ed6-a1ce0d9d9e18" CreationDate="2024-01-20T17:02:20.257" UserId="-1" />
  <row Id="43372" PostHistoryTypeId="50" PostId="10700" RevisionGUID="81a19259-f596-4905-a26d-446aa017e32f" CreationDate="2024-01-20T18:03:30.383" UserId="-1" />
  <row Id="43373" PostHistoryTypeId="50" PostId="10695" RevisionGUID="64a22cad-6bc3-4cf6-bf7a-7e6364c0a580" CreationDate="2024-01-21T06:09:41.167" UserId="-1" />
  <row Id="43374" PostHistoryTypeId="50" PostId="9670" RevisionGUID="9c0b9795-3311-4a39-af05-5f2a522e7ac8" CreationDate="2024-01-21T09:04:20.543" UserId="-1" />
  <row Id="43375" PostHistoryTypeId="50" PostId="6441" RevisionGUID="c3844f86-8f3b-415b-b6d1-bb8c90f43013" CreationDate="2024-01-21T11:09:16.133" UserId="-1" />
  <row Id="43376" PostHistoryTypeId="50" PostId="6105" RevisionGUID="7c95abc5-e2e3-4283-981d-ca5a35919fd0" CreationDate="2024-01-21T13:09:31.157" UserId="-1" />
  <row Id="43377" PostHistoryTypeId="2" PostId="10874" RevisionGUID="0bfee579-f665-4451-ade2-05d41f459044" CreationDate="2024-01-21T13:27:12.603" UserId="2005" Text="By [default][1], every valid transaction is [propagated][2] across the network of peers. There are some cases it is not.&#xD;&#xA;&#xD;&#xA;&gt; This parameter instructs the pool propagate/gossip a transaction to node peers. By default this should be true, however in some cases it might be undesirable to propagate transactions further. Examples might include heavy transactions produced by block authors in offchain workers (DoS) or risking being front runned by someone else after finding some non trivial solution or equivocation, etc.&#xD;&#xA;&#xD;&#xA;And if you search for `propagate: false` in the repo, you will find couple of cases, namely for [`grandpa`][3], `babe` and `beefy` for cases when an equivocation is submitted.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/runtime/src/transaction_validity.rs#L293&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/transaction-pool#propagate&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/grandpa/src/equivocation.rs#L274" ContentLicense="CC BY-SA 4.0" />
  <row Id="43379" PostHistoryTypeId="50" PostId="9340" RevisionGUID="d08d7b08-aa95-4a5d-95c1-4299d7b0881f" CreationDate="2024-01-21T15:00:00.023" UserId="-1" />
  <row Id="43380" PostHistoryTypeId="2" PostId="10875" RevisionGUID="5366c849-b4c1-4291-9e3d-5aea146d7a58" CreationDate="2024-01-21T18:32:43.660" UserId="4121" Text="I am in the process of upgrading a project from version 0.9.42 to 1.6.0, where the `BuildGenesisConfig` was added and `BuildGenesis` was deprecated, and I encounter an error with this pattern that is present in several pallets.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(serde::Serialize, serde::Deserialize))]&#xD;&#xA;	pub struct Test {&#xD;&#xA;		test: // A type implementing MaybeSerializeDeserialize,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    #[pallet::genesis_config]&#xD;&#xA;    pub struct GenesisConfig {&#xD;&#xA;        pub test: Test,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for GenesisConfig {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                test: Test { test: Default::default() },&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[pallet::genesis_build]&#xD;&#xA;    impl BuildGenesisConfig for GenesisConfig {&#xD;&#xA;        fn build(&amp;self) {&#xD;&#xA;			//DO SOMETHING&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;I found and tested [this][1], browsed [this][2] to try to reproduce the macro as mentioned in the answer, but no luck – the error is still present. Furthermore, I also checked that there were no serde version conflicts in the project.&#xD;&#xA;&#xD;&#xA;The pallet compiles without errors by itself, but the error is triggered when it is inserted into a runtime compiled into WebAssembly (using SKIP_WASM_BUILD does not trigger the error).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4743/the-trait-deserialize-is-not-implemented-for-a-getu32-constant&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/d37a45650e112d3ddcc705ef5f642ba075b14e61/substrate/frame/support/procedural/src/pallet/expand/genesis_config.rs#L85-L109" ContentLicense="CC BY-SA 4.0" />
  <row Id="43382" PostHistoryTypeId="1" PostId="10875" RevisionGUID="5366c849-b4c1-4291-9e3d-5aea146d7a58" CreationDate="2024-01-21T18:32:43.660" UserId="4121" Text="`The trait Deserialize is not implemented for a` GenesisConfig" ContentLicense="CC BY-SA 4.0" />
  <row Id="43383" PostHistoryTypeId="3" PostId="10875" RevisionGUID="5366c849-b4c1-4291-9e3d-5aea146d7a58" CreationDate="2024-01-21T18:32:43.660" UserId="4121" Text="|wasm|genesis|macro|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43384" PostHistoryTypeId="5" PostId="10875" RevisionGUID="3d6f97c6-6b4a-4ff8-bf3a-c9220659e6f6" CreationDate="2024-01-21T19:09:47.200" UserId="4121" Comment="added 112 characters in body" Text="I am in the process of upgrading a project from version 0.9.42 to 1.6.0, where the `BuildGenesisConfig` was added and `BuildGenesis` was deprecated, and I encounter an error (`the trait Serialize is not implemented for Test` and `the trait Deserialize&lt;'_&gt; is not implemented for Test`) with this pattern that is present in several pallets.&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(serde::Serialize, serde::Deserialize))]&#xD;&#xA;	pub struct Test {&#xD;&#xA;		test: // A type implementing MaybeSerializeDeserialize,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;    #[pallet::genesis_config]&#xD;&#xA;    pub struct GenesisConfig {&#xD;&#xA;        pub test: Test,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for GenesisConfig {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Self {&#xD;&#xA;                test: Test { test: Default::default() },&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[pallet::genesis_build]&#xD;&#xA;    impl BuildGenesisConfig for GenesisConfig {&#xD;&#xA;        fn build(&amp;self) {&#xD;&#xA;			//DO SOMETHING&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;I found and tested [this][1], browsed [this][2] to try to reproduce the macro as mentioned in the answer, but no luck – the error is still present. Furthermore, I also checked that there were no serde version conflicts in the project.&#xD;&#xA;&#xD;&#xA;The pallet compiles without errors by itself, but the error is triggered when it is inserted into a runtime compiled into WebAssembly (using SKIP_WASM_BUILD does not trigger the error).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/4743/the-trait-deserialize-is-not-implemented-for-a-getu32-constant&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/d37a45650e112d3ddcc705ef5f642ba075b14e61/substrate/frame/support/procedural/src/pallet/expand/genesis_config.rs#L85-L109" ContentLicense="CC BY-SA 4.0" />
  <row Id="43385" PostHistoryTypeId="2" PostId="10876" RevisionGUID="7641392d-a81c-4ad9-955a-490ce9c59c6d" CreationDate="2024-01-22T02:29:04.467" UserId="251" Text="Change&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[cfg_attr(feature = &quot;std&quot;, derive(serde::Serialize, serde::Deserialize))]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;to &#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[derive(serde::Serialize, serde::Deserialize)]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;It requires to be always `Serialize` now." ContentLicense="CC BY-SA 4.0" />
  <row Id="43387" PostHistoryTypeId="2" PostId="10877" RevisionGUID="189a428b-f964-4cc3-8608-54102273485b" CreationDate="2024-01-22T02:34:22.713" UserId="5090" Text="How to get bond balance or unbond balance of specific account when stake in nominator pool? I use staking.Nominators, I can not get the right info " ContentLicense="CC BY-SA 4.0" />
  <row Id="43389" PostHistoryTypeId="1" PostId="10877" RevisionGUID="189a428b-f964-4cc3-8608-54102273485b" CreationDate="2024-01-22T02:34:22.713" UserId="5090" Text="How to get bond balance or unbond balance when stake in nominator pool" ContentLicense="CC BY-SA 4.0" />
  <row Id="43390" PostHistoryTypeId="3" PostId="10877" RevisionGUID="189a428b-f964-4cc3-8608-54102273485b" CreationDate="2024-01-22T02:34:22.713" UserId="5090" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43391" PostHistoryTypeId="2" PostId="10878" RevisionGUID="d19988c1-90ae-4a70-9493-aaa78167804f" CreationDate="2024-01-22T03:51:50.207" UserId="5091" Text="    export default {&#xD;&#xA;        types: {&#xD;&#xA;            VCRequested: {&#xD;&#xA;                xxx: &quot;xxx&quot;,&#xD;&#xA;                assertion: &quot;Assertion&quot;,&#xD;&#xA;            },&#xD;&#xA;            Assertion: {&#xD;&#xA;                xxxx: &quot;xxx&quot;&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;As shown in the above code, Assertion is my custom type, but there is a CorePrimitiveAssertion type within metadata that is identical to Assertion. I want to directly replace it with CorePrimitiveAssertion, but when generating types, I get an error:&#xD;&#xA;&#xD;&#xA;    build/interfaces/vc/types.ts:266:25 - error TS2304: Cannot find name 'CorePrimitiveAssertion'.&#xD;&#xA;    &#xD;&#xA;    266     readonly assertion: CorePrimitiveAssertion;&#xD;&#xA;                                ~~~~~~~~~~~~~~~~~~~~~~&#xD;&#xA;&#xD;&#xA;It seems that CorePrimitiveAssertion is not automatically imported into the generated types.If I manually import the following code in this file, it all works:&#xD;&#xA;&#xD;&#xA;    import type { CorePrimitivesAssertion } from '@polkadot/types/lookup';&#xD;&#xA;&#xD;&#xA;All other types work fine. I just want to replace an existing type in metadata within a custom type. Is this achievable?&#xD;&#xA;&#xD;&#xA;Version:&#xD;&#xA; &quot;@polkadot/api&quot;: &quot;^10.9.1&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43393" PostHistoryTypeId="1" PostId="10878" RevisionGUID="d19988c1-90ae-4a70-9493-aaa78167804f" CreationDate="2024-01-22T03:51:50.207" UserId="5091" Text="How to use the metadata type in a custom type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43394" PostHistoryTypeId="3" PostId="10878" RevisionGUID="d19988c1-90ae-4a70-9493-aaa78167804f" CreationDate="2024-01-22T03:51:50.207" UserId="5091" Text="|typegen|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43395" PostHistoryTypeId="50" PostId="9619" RevisionGUID="71766f9a-1a09-4cbb-80c6-360764669a07" CreationDate="2024-01-22T10:04:20.447" UserId="-1" />
  <row Id="43397" PostHistoryTypeId="2" PostId="10879" RevisionGUID="408cff43-e1d5-4f04-82c0-a36e93c2e601" CreationDate="2024-01-22T11:10:43.053" UserId="4794" Text="I would like to customize the POS. I did read some article about how to implement that, and used `pallet_babe`, my custom pallet and also `pallet_staking`.&#xD;&#xA;&#xD;&#xA;I found that in order to update the authorities for the next block, it is configured in `enact_epoch_change()` with `AuthoritiesId` and `BabeAuthorityWeight` in babe.&#xD;&#xA;&#xD;&#xA;However, the target is updating the `nextAuthorites`, and `BabeAuthorityWeight`, I&#xD;&#xA;I tried with `SessionManager` to update the `validator set` for my custom pallet, then assigned the custom pallet `SessionManager` in `pallet_session`. But I am not sure how this set would become the `nextauthorites` in `pallet-babe`?&#xD;&#xA;&#xD;&#xA;Please give me a lead." ContentLicense="CC BY-SA 4.0" />
  <row Id="43399" PostHistoryTypeId="1" PostId="10879" RevisionGUID="408cff43-e1d5-4f04-82c0-a36e93c2e601" CreationDate="2024-01-22T11:10:43.053" UserId="4794" Text="How to update BabeAuthorityWeight and NextAuthorities from custom pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43400" PostHistoryTypeId="3" PostId="10879" RevisionGUID="408cff43-e1d5-4f04-82c0-a36e93c2e601" CreationDate="2024-01-22T11:10:43.053" UserId="4794" Text="|babe|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43402" PostHistoryTypeId="2" PostId="10880" RevisionGUID="d441ef6b-d962-4045-bdfb-f1c40bd36dad" CreationDate="2024-01-22T12:05:29.227" UserId="3437" Text="As we know previously, securing a parachain slot was a competitive process through an auction mechanism. With coretime rental, there is no need for slot auctions anymore. Teams can purchase instantaneous coretime or reserve bulk coretime as required. This greatly decreases the barrier-to-entry for software tinkerers and parachain teams.&#xD;&#xA;&#xD;&#xA;I want to list my parachain on Rococo. The [official document][1] still shows old way of registering parathread.&#xD;&#xA;&#xD;&#xA;Is there any tutorial/example which shows how to use CoreTime?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/#register-as-a-parathread" ContentLicense="CC BY-SA 4.0" />
  <row Id="43404" PostHistoryTypeId="1" PostId="10880" RevisionGUID="d441ef6b-d962-4045-bdfb-f1c40bd36dad" CreationDate="2024-01-22T12:05:29.227" UserId="3437" Text="How to list a Parachain on Rococo using CoreTime" ContentLicense="CC BY-SA 4.0" />
  <row Id="43405" PostHistoryTypeId="3" PostId="10880" RevisionGUID="d441ef6b-d962-4045-bdfb-f1c40bd36dad" CreationDate="2024-01-22T12:05:29.227" UserId="3437" Text="|parachain|rococo|coretime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43406" PostHistoryTypeId="2" PostId="10881" RevisionGUID="ca62c262-8281-421a-be33-456d8d15f764" CreationDate="2024-01-22T12:20:48.887" UserId="4794" Text="in this [document][1] it mentioned `ExternalTrigger`. So which pallet could be `ExternalTrigger` for BABE. and How to implement `EpochChangeTrigger`?&#xD;&#xA;&#xD;&#xA;It also said that `pallet-session` could be used, but `pallet-session` doesn't have `EpochChangeTrigger`. so How `pallet-session` and `pallet-babe` work with each other when there is new session/epoch?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://crates.parity.io/src/pallet_babe/lib.rs.html#18-975" ContentLicense="CC BY-SA 4.0" />
  <row Id="43408" PostHistoryTypeId="1" PostId="10881" RevisionGUID="ca62c262-8281-421a-be33-456d8d15f764" CreationDate="2024-01-22T12:20:48.887" UserId="4794" Text="Which one is ExternalTrigger in BABE?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43409" PostHistoryTypeId="3" PostId="10881" RevisionGUID="ca62c262-8281-421a-be33-456d8d15f764" CreationDate="2024-01-22T12:20:48.887" UserId="4794" Text="|babe|session|timestamp|pos|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43410" PostHistoryTypeId="50" PostId="10687" RevisionGUID="6053b8f5-1743-44e9-b725-089bfcf8f0a2" CreationDate="2024-01-22T13:01:55.203" UserId="-1" />
  <row Id="43411" PostHistoryTypeId="2" PostId="10882" RevisionGUID="f55d32a6-4b5d-4891-9ab0-2fb5d66766d2" CreationDate="2024-01-22T13:21:39.173" UserId="234" Text="[Sidecar][1] REST API has a set of endpoints related to `Staking` that might be helpful for you. Does `/accounts/{accountId}/staking-info` endpoint give you the expected result? It makes use of [api.query.staking.ledger][2]. An example output can be shown in one of the available public instances of Sidecar, [here][3] the link for Kusama and for a random account. &#xD;&#xA;&#xD;&#xA;You can also check the Sidecar [docs][4] for all available endpoints.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate-api-sidecar&#xD;&#xA;  [2]: https://polkadot.js.org/docs/kusama/storage#ledgeraccountid32-optionpalletstakingstakingledger&#xD;&#xA;  [3]: https://kusama-public-sidecar.parity-chains.parity.io/accounts/F3opxRbN5ZavB4LTn2LYcE98Dh1SgGjhSZhz5pAdRdLRhid/staking-info&#xD;&#xA;  [4]: https://paritytech.github.io/substrate-api-sidecar/dist/" ContentLicense="CC BY-SA 4.0" />
  <row Id="43413" PostHistoryTypeId="2" PostId="10883" RevisionGUID="4d384ba4-2589-4f3a-8f16-8c54c2bafbfe" CreationDate="2024-01-22T14:43:14.383" UserId="5095" Text="Whole error:&#xD;&#xA;error: cannot find macro `thread_local` in this scope&#xD;&#xA;    --&gt; /home/hardeep/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/externalities/src/scope_limited.rs:22:1&#xD;&#xA;     |&#xD;&#xA;  22 | environmental::environmental!(ext: trait Externalities);&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`&#xD;&#xA;     = note: this error originates in the macro `$crate::thread_local_impl` which comes from the expansion of the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0425]: cannot find value `GLOBAL` in this scope&#xD;&#xA;    --&gt; /home/hardeep/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/externalities/src/scope_limited.rs:22:1&#xD;&#xA;     |&#xD;&#xA;  22 | environmental::environmental!(ext: trait Externalities);&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `$crate::environmental` which comes from the expansion of the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;     Compiling hash-db v0.16.0&#xD;&#xA;     Compiling hashbrown v0.12.3&#xD;&#xA;  For more information about this error, try `rustc --explain E0425`.&#xD;&#xA;  error: could not compile `sp-externalities` (lib) due to 4 previous errors&#xD;&#xA;  warning: build failed, waiting for other jobs to finish...&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;rustups show:&#xD;&#xA;hardeep@LAPTOP-M6QACF70:~/substrate/substrate-node-template$ rustup show&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /home/hardeep/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (directory override for '/home/hardeep/substrate/substrate-node-template')&#xD;&#xA;rustc 1.75.0 (82e1608df 2023-12-21)&#xD;&#xA;&#xD;&#xA;I tried all the things like installing wasm32-unknown-unknown.I also tried updating cargo with cargo update, before used cargo clean and used cargo build --release. also tried to pull if there were problem with my subsrate current node. Can anyone please help me with this." ContentLicense="CC BY-SA 4.0" />
  <row Id="43415" PostHistoryTypeId="1" PostId="10883" RevisionGUID="4d384ba4-2589-4f3a-8f16-8c54c2bafbfe" CreationDate="2024-01-22T14:43:14.383" UserId="5095" Text="Subsrate Node Build error: cannot find macro `thread_local` in this scope" ContentLicense="CC BY-SA 4.0" />
  <row Id="43416" PostHistoryTypeId="3" PostId="10883" RevisionGUID="4d384ba4-2589-4f3a-8f16-8c54c2bafbfe" CreationDate="2024-01-22T14:43:14.383" UserId="5095" Text="|polkadot-js|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43417" PostHistoryTypeId="2" PostId="10884" RevisionGUID="9057dafe-aa55-4e85-aaef-23e68364e0ad" CreationDate="2024-01-22T15:17:50.430" UserId="4556" Text="I'm trying to call `api.query.nfts.itemMetaDataOf&lt;type&gt;(collection_id, token_id);` via typescript and polkadotjs. &#xD;&#xA;&#xD;&#xA;It's not clear which type I'm supposed to use for the response. At least I can't find any suitable type in @polkadot/types-codec." ContentLicense="CC BY-SA 4.0" />
  <row Id="43419" PostHistoryTypeId="1" PostId="10884" RevisionGUID="9057dafe-aa55-4e85-aaef-23e68364e0ad" CreationDate="2024-01-22T15:17:50.430" UserId="4556" Text="Getting NFT metadata in polkadotjs with typescript" ContentLicense="CC BY-SA 4.0" />
  <row Id="43420" PostHistoryTypeId="3" PostId="10884" RevisionGUID="9057dafe-aa55-4e85-aaef-23e68364e0ad" CreationDate="2024-01-22T15:17:50.430" UserId="4556" Text="|polkadot-js|typescript|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43421" PostHistoryTypeId="2" PostId="10885" RevisionGUID="0ac2989b-4f3f-408a-a33f-04226158e3d3" CreationDate="2024-01-22T17:21:38.530" UserId="2005" Text="You can manually [generate][1] the types of your chain using `typegen`. You have to point to the WS address of your chain to download the metadata, and derive custom types from it. Here is the example [project][2].&#xD;&#xA;&#xD;&#xA;In your case, it would probably look like this (after you have generated custom types):&#xD;&#xA;&#xD;&#xA;```ts&#xD;&#xA;import { PalletNftsItemMetadata } from &quot;./lookup&quot;;&#xD;&#xA;&#xD;&#xA;let itemMetadata = await api.query.nfts.itemMetadataOf&lt;PalletNftsItemMetadata&gt;(&#xD;&#xA;  collection_id,&#xD;&#xA;  token_id&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.js.org/docs/api/examples/promise/typegen#generating&#xD;&#xA;  [2]: https://github.com/polkadot-js/docs/tree/master/docs/api/examples/promise/typegen" ContentLicense="CC BY-SA 4.0" />
  <row Id="43425" PostHistoryTypeId="2" PostId="10886" RevisionGUID="d723362f-56e2-4833-8c78-7025adb43827" CreationDate="2024-01-23T08:55:31.237" UserId="3395" Text="I'm trying to run a local node using Chopsticks and connect to it using Metamask, but when I make the request to the [eth-rpc-adapter][1], it fails. Here are the steps I followed with the corresponding output:&#xD;&#xA;&#xD;&#xA;1. Run Moonbeam node using Chopsticks (it works): `npx @acala-network/chopsticks@latest -c moonbeam`&#xD;&#xA;```sh&#xD;&#xA;[09:42:53.276] INFO (82734): Loading config file https://raw.githubusercontent.com/AcalaNetwork/chopsticks/master/configs/moonbeam.yml&#xD;&#xA;    app: &quot;chopsticks&quot;&#xD;&#xA;[09:42:55.369] INFO (82734): Moonbeam RPC listening on port 8000&#xD;&#xA;    app: &quot;chopsticks&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Run the eth-rpc-adapter (it works): `docker run -it --rm -p 8545:8545 acala/eth-rpc-adapter:latest --endpoint ws://172.17.0.1:8000`&#xD;&#xA;```sh&#xD;&#xA;  ------------------------------------------&#xD;&#xA;  ⚡️ running in production (standard) mode ⚡️&#xD;&#xA;  ------------------------------------------&#xD;&#xA;&#xD;&#xA;2024-01-23 08:43:24        API/INIT: RPC methods not decorated: dev_dryRun, dev_newBlock, dev_runBlock, dev_setBlockBuildMode, dev_setHead, dev_setRuntimeLogLevel, dev_setStorage, dev_timeTravel&#xD;&#xA;2024-01-23 08:43:24        API/INIT: moonbeam/2602: Not decorating runtime apis without matching versions: EthereumRuntimeRPCApi/5 (4 known)&#xD;&#xA;2024-01-23 08:43:24        API/INIT: moonbeam/2602: Not decorating unknown runtime apis: 0xa33d43f58731ad84/2, 0xba8173bf23b2e6f8/1&#xD;&#xA;runtime version: 2602&#xD;&#xA;&#xD;&#xA;  --------------------------------------------&#xD;&#xA;                SERVER STARTED &#xD;&#xA;  --------------------------------------------&#xD;&#xA;  version         : bodhi.js/eth-rpc-adapter/2.7.19&#xD;&#xA;  endpoint url    : ws://172.17.0.1:8000&#xD;&#xA;  subquery url    : undefined&#xD;&#xA;  listening to    : 8545&#xD;&#xA;  max blockCache  : 200&#xD;&#xA;  max batchSize   : 50  &#xD;&#xA;  max storageSize : 5000&#xD;&#xA;  safe mode       : false&#xD;&#xA;  local mode      : false&#xD;&#xA;  http only       : false&#xD;&#xA;  verbose         : true&#xD;&#xA;  --------------------------------------------&#xD;&#xA;  &#xD;&#xA;_onNewFinalizedHead task failed, give up 0xb5e9ca22c7a3b49a4249d612684f3841727c64776c149ff9cb78ec952b3236fc TypeError: Cannot read properties of undefined (reading 'evmAddresses')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Make the request to the node (it fails): `curl -X POST -H &quot;Content-Type: application/json&quot; --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;eth_chainId&quot;, &quot;params&quot;:[], &quot;id&quot;:2}' http://localhost:8545&#xD;&#xA;`&#xD;&#xA;```sh&#xD;&#xA;{&quot;id&quot;:2,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:6969,&quot;message&quot;:&quot;Error: Cannot read properties of undefined (reading 'chainId')&quot;}}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AcalaNetwork/bodhi.js/tree/master/packages/eth-rpc-adapter" ContentLicense="CC BY-SA 4.0" />
  <row Id="43427" PostHistoryTypeId="1" PostId="10886" RevisionGUID="d723362f-56e2-4833-8c78-7025adb43827" CreationDate="2024-01-23T08:55:31.237" UserId="3395" Text="Error querying evm rpc endpoint on a node run by Chopsticks" ContentLicense="CC BY-SA 4.0" />
  <row Id="43428" PostHistoryTypeId="3" PostId="10886" RevisionGUID="d723362f-56e2-4833-8c78-7025adb43827" CreationDate="2024-01-23T08:55:31.237" UserId="3395" Text="|evm|moonbeam|acala|chopsticks|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43429" PostHistoryTypeId="5" PostId="10886" RevisionGUID="59909046-5bac-4298-878e-2a81c103869d" CreationDate="2024-01-23T09:20:56.180" UserId="3395" Comment="added 498 characters in body" Text="I'm trying to run a local node using Chopsticks and connect to it using Metamask, but when I make the request to the [eth-rpc-adapter][1], it fails. Here are the steps I followed with the corresponding output:&#xD;&#xA;&#xD;&#xA;1. Run Moonbeam node using Chopsticks (it works): `npx @acala-network/chopsticks@latest -c moonbeam`&#xD;&#xA;```sh&#xD;&#xA;[09:42:53.276] INFO (82734): Loading config file https://raw.githubusercontent.com/AcalaNetwork/chopsticks/master/configs/moonbeam.yml&#xD;&#xA;    app: &quot;chopsticks&quot;&#xD;&#xA;[09:42:55.369] INFO (82734): Moonbeam RPC listening on port 8000&#xD;&#xA;    app: &quot;chopsticks&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Run the eth-rpc-adapter (it works): `docker run -it --rm -p 8545:8545 acala/eth-rpc-adapter:latest --endpoint ws://172.17.0.1:8000`&#xD;&#xA;```sh&#xD;&#xA;  ------------------------------------------&#xD;&#xA;  ⚡️ running in production (standard) mode ⚡️&#xD;&#xA;  ------------------------------------------&#xD;&#xA;&#xD;&#xA;2024-01-23 08:43:24        API/INIT: RPC methods not decorated: dev_dryRun, dev_newBlock, dev_runBlock, dev_setBlockBuildMode, dev_setHead, dev_setRuntimeLogLevel, dev_setStorage, dev_timeTravel&#xD;&#xA;2024-01-23 08:43:24        API/INIT: moonbeam/2602: Not decorating runtime apis without matching versions: EthereumRuntimeRPCApi/5 (4 known)&#xD;&#xA;2024-01-23 08:43:24        API/INIT: moonbeam/2602: Not decorating unknown runtime apis: 0xa33d43f58731ad84/2, 0xba8173bf23b2e6f8/1&#xD;&#xA;runtime version: 2602&#xD;&#xA;&#xD;&#xA;  --------------------------------------------&#xD;&#xA;                SERVER STARTED &#xD;&#xA;  --------------------------------------------&#xD;&#xA;  version         : bodhi.js/eth-rpc-adapter/2.7.19&#xD;&#xA;  endpoint url    : ws://172.17.0.1:8000&#xD;&#xA;  subquery url    : undefined&#xD;&#xA;  listening to    : 8545&#xD;&#xA;  max blockCache  : 200&#xD;&#xA;  max batchSize   : 50  &#xD;&#xA;  max storageSize : 5000&#xD;&#xA;  safe mode       : false&#xD;&#xA;  local mode      : false&#xD;&#xA;  http only       : false&#xD;&#xA;  verbose         : true&#xD;&#xA;  --------------------------------------------&#xD;&#xA;  &#xD;&#xA;_onNewFinalizedHead task failed, give up 0xb5e9ca22c7a3b49a4249d612684f3841727c64776c149ff9cb78ec952b3236fc TypeError: Cannot read properties of undefined (reading 'evmAddresses')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Make the request to the node (it fails): `curl -X POST -H &quot;Content-Type: application/json&quot; --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;eth_chainId&quot;, &quot;params&quot;:[], &quot;id&quot;:2}' http://localhost:8545&#xD;&#xA;`&#xD;&#xA;```sh&#xD;&#xA;{&quot;id&quot;:2,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:6969,&quot;message&quot;:&quot;Error: Cannot read properties of undefined (reading 'chainId')&quot;}}&#xD;&#xA;```&#xD;&#xA;## UPDATE:&#xD;&#xA;&#xD;&#xA;When running eth-rpc-adapter pointing to public Acala node endpoint (not Chopsticks) it works. Whereas pointing to Moonbeam public node it returns same error as before:&#xD;&#xA;`docker run -it --rm -p 8545:8545 acala/eth-rpc-adapter:latest --endpoint wss://acala-rpc.aca-api.network`&#xD;&#xA;```sh&#xD;&#xA;curl -X POST -H &quot;Content-Type: application/json&quot; --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;eth_chainId&quot;, &quot;params&quot;:[], &quot;id&quot;:2}' http://localhost:8545         &#xD;&#xA;{&quot;id&quot;:2,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:&quot;0x313&quot;}&#xD;&#xA;```&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AcalaNetwork/bodhi.js/tree/master/packages/eth-rpc-adapter" ContentLicense="CC BY-SA 4.0" />
  <row Id="43430" PostHistoryTypeId="2" PostId="10887" RevisionGUID="b41dffa2-da05-49e9-9dc7-44e9c0771ab9" CreationDate="2024-01-23T09:37:48.467" UserId="2372" Text="I'm currently engaged with the Polkadot relay chain version 1.1.0, and I've encountered an issue in the parachain where block production is not occurring. My configuration involves two validators in the relay chain and one collator in the parachain in the staging environment. Interestingly, when I switch the environment to local or change the chain type to local, the parachain begins producing blocks.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43432" PostHistoryTypeId="1" PostId="10887" RevisionGUID="b41dffa2-da05-49e9-9dc7-44e9c0771ab9" CreationDate="2024-01-23T09:37:48.467" UserId="2372" Text="Parachain doesn't produce blocks(collation wasn't advertised to any validator)" ContentLicense="CC BY-SA 4.0" />
  <row Id="43433" PostHistoryTypeId="3" PostId="10887" RevisionGUID="b41dffa2-da05-49e9-9dc7-44e9c0771ab9" CreationDate="2024-01-23T09:37:48.467" UserId="2372" Text="|parachain|substrate-parachain-template|relay-chain|validator|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43434" PostHistoryTypeId="50" PostId="6087" RevisionGUID="01594a03-57c5-4bba-a9ea-be914c59ee96" CreationDate="2024-01-23T11:03:55.443" UserId="-1" />
  <row Id="43435" PostHistoryTypeId="5" PostId="10886" RevisionGUID="a06b3bd7-a7e0-4ccb-9453-442d81dd2de3" CreationDate="2024-01-23T12:48:19.300" UserId="3395" Comment="added 627 characters in body; edited tags" Text="I'm trying to run a local node using Chopsticks and connect to it using Metamask, but when I make the request to the [eth-rpc-adapter][1], it fails. Here are the steps I followed with the corresponding output:&#xD;&#xA;&#xD;&#xA;1. Run Moonbeam node using Chopsticks (it works): `npx @acala-network/chopsticks@latest -c moonbeam`&#xD;&#xA;```sh&#xD;&#xA;[09:42:53.276] INFO (82734): Loading config file https://raw.githubusercontent.com/AcalaNetwork/chopsticks/master/configs/moonbeam.yml&#xD;&#xA;    app: &quot;chopsticks&quot;&#xD;&#xA;[09:42:55.369] INFO (82734): Moonbeam RPC listening on port 8000&#xD;&#xA;    app: &quot;chopsticks&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;2. Run the eth-rpc-adapter (it works): `docker run -it --rm -p 8545:8545 acala/eth-rpc-adapter:latest --endpoint ws://172.17.0.1:8000`&#xD;&#xA;```sh&#xD;&#xA;  ------------------------------------------&#xD;&#xA;  ⚡️ running in production (standard) mode ⚡️&#xD;&#xA;  ------------------------------------------&#xD;&#xA;&#xD;&#xA;2024-01-23 08:43:24        API/INIT: RPC methods not decorated: dev_dryRun, dev_newBlock, dev_runBlock, dev_setBlockBuildMode, dev_setHead, dev_setRuntimeLogLevel, dev_setStorage, dev_timeTravel&#xD;&#xA;2024-01-23 08:43:24        API/INIT: moonbeam/2602: Not decorating runtime apis without matching versions: EthereumRuntimeRPCApi/5 (4 known)&#xD;&#xA;2024-01-23 08:43:24        API/INIT: moonbeam/2602: Not decorating unknown runtime apis: 0xa33d43f58731ad84/2, 0xba8173bf23b2e6f8/1&#xD;&#xA;runtime version: 2602&#xD;&#xA;&#xD;&#xA;  --------------------------------------------&#xD;&#xA;                SERVER STARTED &#xD;&#xA;  --------------------------------------------&#xD;&#xA;  version         : bodhi.js/eth-rpc-adapter/2.7.19&#xD;&#xA;  endpoint url    : ws://172.17.0.1:8000&#xD;&#xA;  subquery url    : undefined&#xD;&#xA;  listening to    : 8545&#xD;&#xA;  max blockCache  : 200&#xD;&#xA;  max batchSize   : 50  &#xD;&#xA;  max storageSize : 5000&#xD;&#xA;  safe mode       : false&#xD;&#xA;  local mode      : false&#xD;&#xA;  http only       : false&#xD;&#xA;  verbose         : true&#xD;&#xA;  --------------------------------------------&#xD;&#xA;  &#xD;&#xA;_onNewFinalizedHead task failed, give up 0xb5e9ca22c7a3b49a4249d612684f3841727c64776c149ff9cb78ec952b3236fc TypeError: Cannot read properties of undefined (reading 'evmAddresses')&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;3. Make the request to the node (it fails): `curl -X POST -H &quot;Content-Type: application/json&quot; --data '{&quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;:&quot;eth_chainId&quot;, &quot;params&quot;:[], &quot;id&quot;:2}' http://localhost:8545&#xD;&#xA;`&#xD;&#xA;```sh&#xD;&#xA;{&quot;id&quot;:2,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;error&quot;:{&quot;code&quot;:6969,&quot;message&quot;:&quot;Error: Cannot read properties of undefined (reading 'chainId')&quot;}}&#xD;&#xA;```&#xD;&#xA;### UPDATE:&#xD;&#xA;I made some discoveries by opening an [issue][2] on GitHub:&#xD;&#xA; - running Chopsticks with version **0.9.7** fixes the scenario where a forked Acala network is accessed via eth-rpc-adapter&#xD;&#xA; - eth-rpc-adapter is meant to be used only with Acala node&#xD;&#xA; - it is supposed Moonbeam provides EVM RPC methods, but when I fork a Moobeam node using Chopsticks and try to directly query `eth_chainId` (not through eth-rpc-adapter) I get a different error: `Upgrade Required`. It seems [Moonbeam is not supported][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/AcalaNetwork/bodhi.js/tree/master/packages/eth-rpc-adapter&#xD;&#xA;  [2]: https://github.com/AcalaNetwork/bodhi.js/issues/932&#xD;&#xA;  [3]: https://github.com/AcalaNetwork/bodhi.js/issues/932#issuecomment-1905928975" ContentLicense="CC BY-SA 4.0" />
  <row Id="43436" PostHistoryTypeId="6" PostId="10886" RevisionGUID="a06b3bd7-a7e0-4ccb-9453-442d81dd2de3" CreationDate="2024-01-23T12:48:19.300" UserId="3395" Comment="added 627 characters in body; edited tags" Text="|rpc|evm|moonbeam|acala|chopsticks|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43437" PostHistoryTypeId="2" PostId="10888" RevisionGUID="87ad5395-f6a7-49e6-8e15-680e89d1d354" CreationDate="2024-01-23T14:49:42.927" UserId="2005" Text="There is an answer in Polkadot forum [here][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://forum.polkadot.network/t/parachain-consensus-updates-coretime-asynchronous-backing-scalability/4396/8" ContentLicense="CC BY-SA 4.0" />
  <row Id="43439" PostHistoryTypeId="2" PostId="10889" RevisionGUID="fee8d144-9699-4511-937d-24207710b931" CreationDate="2024-01-23T16:17:27.673" UserId="3395" Text="The first part of `sp-consensus-babe` **sp** stands for _substrate primitives_, meaning packages that usually includes elements providing the foundational structures and functionalities.&#xD;&#xA;&#xD;&#xA;In this case, `sp-consensus-babe` is a crate that is used by the [BABE pallet][1].&#xD;&#xA;&#xD;&#xA;You might use BABE pallet when you want to include such a pallet in your runtime (blockchain) because you want your blockchain to produce blocks following the [BABE][2] block production mechanism.&#xD;&#xA;&#xD;&#xA;You might use primitives from `sp-consensus-babe` in a context where you are building a crate or some code, and you might need the primitives existing there. Just including it in the `Cargo.toml` file, as [others][3] do, should be enough.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/401f8a3e9448db854f5605b679fa085b8f445039/substrate/frame/babe/Cargo.toml#L26-L27&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/learn-consensus#block-production-babe&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/401f8a3e9448db854f5605b679fa085b8f445039/cumulus/client/relay-chain-minimal-node/Cargo.toml#L30-L31" ContentLicense="CC BY-SA 4.0" />
  <row Id="43441" PostHistoryTypeId="5" PostId="4226" RevisionGUID="82ecbea5-0ccd-42e1-b070-68340ad1bbf8" CreationDate="2024-01-24T07:48:16.393" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="As a `sudo` of a `parachain` on Kusama, I am making the first runtime upgrade. &#xD;&#xA;&#xD;&#xA;Initially, I made the upgrade as a sudo unchecked weight and `setCode` without checks. The transaction looked successful it went &quot;in block&quot;. But the the runtime didn't upgrade, and the spec version stayed the same. &#xD;&#xA;&#xD;&#xA;Then I went the correct route creating an hash and going to `parachainSystem -&gt; AuthorizeUpgrade` and then `enactAuthorizeUpgrade`, but I got this error:&#xD;&#xA; `parachainSystem.ProhibitedByPolkadot`...&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;sudo.Sudid&#xD;&#xA;A sudo just took place. [result] &#xD;&#xA;sudoResult: Result&lt;Null, SpRuntimeDispatchError&gt;&#xD;&#xA;Err&#xD;&#xA;DispatchError&#xD;&#xA;{&#xD;&#xA;  Module: {&#xD;&#xA;    index: 1&#xD;&#xA;    error: 1&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;type&#xD;&#xA;parachainSystem.ProhibitedByPolkadot&#xD;&#xA;details&#xD;&#xA;Polkadot currently prohibits this parachain from upgrading its validation function&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**Are we blocked out for a period of time? How can we successfully make an upgrade?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="43442" PostHistoryTypeId="5" PostId="6682" RevisionGUID="9a0bb11a-6e15-4a54-94e7-ecb5778ac0a6" CreationDate="2024-01-24T07:49:47.383" UserId="116" Comment="deleted 1 character in body" Text="The answer to this question is about how the relaychain and the parachain reach consensus as to the correct validation code that should be used.&#xD;&#xA;&#xD;&#xA;The process is that when you first authorize the upgrade, what actually happens is that the collators include the hash in a block, and then pass the block to the relaychain validators to validate. Once they have validated it, the hash will be stored in the relaychain blockchain.&#xD;&#xA;&#xD;&#xA;The impact of this is that you must wait to enact the upgrade on the parachain side. If you don't wait, then it is possible that the relaychain has not yet stored the new hash (i.e. it has not yet been stored in a block), and is therefore rejecting an attempt to replace the existing validation code, with a new one.&#xD;&#xA;&#xD;&#xA;But that's not the end of the story. &#xD;&#xA;&#xD;&#xA;Firstly anyone can enact the upgrade - you do not need the Sudo user to do that, so it can be done as soon as the relaychain is aware that a new validation code is coming, and as long as the sender sends the correct validation code, with the enactment transaction.&#xD;&#xA;&#xD;&#xA;Secondly, you will have to wait one hour for the code to be enacted even after you send a successful transaction - this delay is set by the relaychain, so that the collators and relaychain are prepared to start using the new validation code at the same block/time.&#xD;&#xA;&#xD;&#xA;One last point to make is that - at least on Polkadot - your parachain cannot be upgraded for a further 13800 blocks, approximately 23 hours. This is what is known as the upgrade cooldown period. Once that cooldown period is over, you can upgrade again, but you must follow this process again with all the same delays.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43443" PostHistoryTypeId="5" PostId="6762" RevisionGUID="9f9f9a74-6140-4758-8639-04c4c25d6c9f" CreationDate="2024-01-24T07:52:18.997" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="In this [doc][1] it says the following:&#xD;&#xA;&#xD;&#xA;&gt; By default, the node will refuse to start if you try to expose an RPC&#xD;&#xA;&gt; interface and run a validator node at the same time. The --unsafe-*&#xD;&#xA;&gt; flags allow you to suppress this security measure. Exposing RPC&#xD;&#xA;&gt; interfaces can open up a huge surface of attacks and has to be&#xD;&#xA;&gt; carefully reviewed.&#xD;&#xA;&#xD;&#xA;however when I start a local chain using the following command:&#xD;&#xA;&#xD;&#xA;    ./target/release/node-template \&#xD;&#xA;    --base-path /tmp/alice \&#xD;&#xA;    --chain local \&#xD;&#xA;    --alice \&#xD;&#xA;    --port 30333 \&#xD;&#xA;    --ws-port 9945 \&#xD;&#xA;    --rpc-port 9933 \&#xD;&#xA;    --node-key 0000000000000000000000000000000000000000000000000000000000000001 \&#xD;&#xA;    --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; \&#xD;&#xA;    --validator&#xD;&#xA;&#xD;&#xA;1. it started with no problems, its supposed to refuse to start since its both a validator and is exposing an RPC port but it didn't, why?&#xD;&#xA;&#xD;&#xA;2. how to modify the allowed origins?&#xD;&#xA;&#xD;&#xA;3. the [doc][1] also said the following:&#xD;&#xA;&#xD;&#xA;&gt; There are quite a few RPC methods that you can use to control the&#xD;&#xA;&gt; node's behavior, but you should avoid exposing. For example, you&#xD;&#xA;&gt; should not expose the following RPC methods:&#xD;&#xA;&gt; &#xD;&#xA;&gt; submit_extrinsic - allows submitting transactions to local pool.&#xD;&#xA;&#xD;&#xA;however I'm able to submit extrinsics, the extrinsic gets passed to the node and it gets added to the pool.&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/build/remote-procedure-calls/" ContentLicense="CC BY-SA 4.0" />
  <row Id="43444" PostHistoryTypeId="2" PostId="10890" RevisionGUID="a9621bee-3997-4830-ac53-e425a9bfd772" CreationDate="2024-01-24T09:41:07.307" UserId="4794" Text="```    |&#xD;&#xA;  699 |                 acc_vec.push((account_id, userInfo.weight.saturated_into::&lt;u64&gt;()));&#xD;&#xA;      |                               ^^^^^^^^^^ expected `Public`, found associated type&#xD;&#xA;      |&#xD;&#xA;      = note:       expected struct `sp_consensus_babe::app::Public`&#xD;&#xA;              found associated type `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;      = help: consider constraining the associated type `&lt;T as frame_system::Config&gt;::AccountId` to `sp_consensus_babe::app::Public`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am trying to customize BABE, and converting an selected ``AccountId`` into ``AuthorityId`` for the next epoch. How to solve this error? Thank you.&#xD;&#xA;&#xD;&#xA;My code&#xD;&#xA;```&#xD;&#xA;let mut acc_vec: Vec&lt;(AuthorityId, u64)&gt; = vec![];&#xD;&#xA;for (account_id, userInfo) in UserBoard::&lt;T&gt;::iter(){&#xD;&#xA;	acc_vec.push((account_id, userInfo.weight.clone().saturated_into::&lt;u64&gt;()));&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43446" PostHistoryTypeId="1" PostId="10890" RevisionGUID="a9621bee-3997-4830-ac53-e425a9bfd772" CreationDate="2024-01-24T09:41:07.307" UserId="4794" Text="How to convert `AccountId` to `AuthorityId`" ContentLicense="CC BY-SA 4.0" />
  <row Id="43447" PostHistoryTypeId="3" PostId="10890" RevisionGUID="a9621bee-3997-4830-ac53-e425a9bfd772" CreationDate="2024-01-24T09:41:07.307" UserId="4794" Text="|consensus|babe|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43448" PostHistoryTypeId="2" PostId="10891" RevisionGUID="1515945a-e5c7-42a5-af55-f040972761e1" CreationDate="2024-01-24T11:32:45.063" UserId="5099" Text="I am trying to access my polkadot.js wallet, but keep recieving this messagge:FATAL: &#xD;&#xA;&#xD;&#xA;Unable to initialize the API: disconnected from wss://1rpc.io/dot: 1006:: Abnormal Closure&#xD;&#xA;&#xD;&#xA;I cannot connect wallet extension with any of the pages I have DOT delegated.&#xD;&#xA;&#xD;&#xA;Could give any advise on how to solve this problem?? Thank you&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43450" PostHistoryTypeId="1" PostId="10891" RevisionGUID="1515945a-e5c7-42a5-af55-f040972761e1" CreationDate="2024-01-24T11:32:45.063" UserId="5099" Text="FATAL: Unable to initialize the API: disconnected from wss://1rpc.io/dot: 1006:: Abnormal Closure" ContentLicense="CC BY-SA 4.0" />
  <row Id="43451" PostHistoryTypeId="3" PostId="10891" RevisionGUID="1515945a-e5c7-42a5-af55-f040972761e1" CreationDate="2024-01-24T11:32:45.063" UserId="5099" Text="|polkadot-js|wallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43458" PostHistoryTypeId="5" PostId="10890" RevisionGUID="8bf561a0-5276-4254-a312-2243b720236d" CreationDate="2024-01-24T16:21:42.913" UserId="4794" Comment="added 118 characters in body" Text="```    |&#xD;&#xA;  699 |                 acc_vec.push((account_id, userInfo.weight.saturated_into::&lt;u64&gt;()));&#xD;&#xA;      |                               ^^^^^^^^^^ expected `Public`, found associated type&#xD;&#xA;      |&#xD;&#xA;      = note:       expected struct `sp_consensus_babe::app::Public`&#xD;&#xA;              found associated type `&lt;T as frame_system::Config&gt;::AccountId`&#xD;&#xA;      = help: consider constraining the associated type `&lt;T as frame_system::Config&gt;::AccountId` to `sp_consensus_babe::app::Public`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am trying to customize BABE, and converting an selected ``AccountId`` into ``AuthorityId`` for the next epoch. How to solve this error? Thank you.&#xD;&#xA;&#xD;&#xA;My code&#xD;&#xA;```&#xD;&#xA;let mut acc_vec: Vec&lt;(AuthorityId, u64)&gt; = vec![];&#xD;&#xA;for (account_id, userInfo) in UserBoard::&lt;T&gt;::iter(){&#xD;&#xA;	acc_vec.push((account_id, userInfo.weight.clone().saturated_into::&lt;u64&gt;()));&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Please checkout branch `dev`: [https://github.com/kajqt/pos-node][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/kajqt/pos-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="43459" PostHistoryTypeId="2" PostId="10893" RevisionGUID="9da4d3e9-0b42-48c0-83ca-f402dee2ef75" CreationDate="2024-01-24T19:12:07.983" UserId="555" Text="I have two 2 storage in the pallet :&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn subscriber)]&#xD;&#xA;	pub type Subscriber&lt;T:Config&gt; = StorageValue&lt;_, BoundedVec&lt;T::AccountId, T::MaxSubscriber&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn store)]&#xD;&#xA;	pub type Store&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, u32, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here first I need to fetch the account id from the `subscriber` and then put it into `Store` storage. &#xD;&#xA;&#xD;&#xA;But when I'm fetching the vec from the `subscriber` and log it into the console then I can see the combination of Hexadecimal and SS58Check. something like this: ```be5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f (5GNJqTPy...) ``` &#xD;&#xA;&#xD;&#xA;**How to fetch the AccountId from this combination so that i can insert it into the `Store` storage?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="43461" PostHistoryTypeId="1" PostId="10893" RevisionGUID="9da4d3e9-0b42-48c0-83ca-f402dee2ef75" CreationDate="2024-01-24T19:12:07.983" UserId="555" Text="How to convert AccountId from [hexadecimal, SS58Check]?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43462" PostHistoryTypeId="3" PostId="10893" RevisionGUID="9da4d3e9-0b42-48c0-83ca-f402dee2ef75" CreationDate="2024-01-24T19:12:07.983" UserId="555" Text="|pallet|account|genesis|storagemap|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43467" PostHistoryTypeId="5" PostId="10893" RevisionGUID="a21bf502-2a04-4a43-99df-e0b784939c57" CreationDate="2024-01-25T08:55:56.947" UserId="555" Comment="added 43 characters in body; edited title" Text="I have two 2 storage in the pallet :&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn subscriber)]&#xD;&#xA;	pub type Subscriber&lt;T:Config&gt; = StorageValue&lt;_, BoundedVec&lt;T::AccountId, T::MaxSubscriber&gt;, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn store)]&#xD;&#xA;	pub type Store&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, T::AccountId, u32, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here first I need to fetch the account id from the `subscriber` in 'sc-consensus' file and then I need to call a function which that require AccountId to put a value it into `Store` storage. &#xD;&#xA;&#xD;&#xA;And when I'm fetching the vec from the `subscriber` and log it into the console then I can see something like this: ```be5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f (5GNJqTPy...) ``` &#xD;&#xA;&#xD;&#xA;**How to fetch the AccountId from this combination so that i can insert it into the `Store` storage?**" ContentLicense="CC BY-SA 4.0" />
  <row Id="43468" PostHistoryTypeId="4" PostId="10893" RevisionGUID="a21bf502-2a04-4a43-99df-e0b784939c57" CreationDate="2024-01-25T08:55:56.947" UserId="555" Comment="added 43 characters in body; edited title" Text="How to convert AccountId from [hexadecimal, SS58Check]?[Updated]" ContentLicense="CC BY-SA 4.0" />
  <row Id="43469" PostHistoryTypeId="2" PostId="10895" RevisionGUID="85014e43-4a7a-463c-a2ce-4ecce9cc6a0d" CreationDate="2024-01-25T09:29:46.043" UserId="4794" Text="I want to debug and check if the variable has my expected type or not.&#xD;&#xA;So how do I debug and print out the type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43471" PostHistoryTypeId="1" PostId="10895" RevisionGUID="85014e43-4a7a-463c-a2ce-4ecce9cc6a0d" CreationDate="2024-01-25T09:29:46.043" UserId="4794" Text="How to check type info in substrate?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43472" PostHistoryTypeId="3" PostId="10895" RevisionGUID="85014e43-4a7a-463c-a2ce-4ecce9cc6a0d" CreationDate="2024-01-25T09:29:46.043" UserId="4794" Text="|types|data-type|debug|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43474" PostHistoryTypeId="2" PostId="10896" RevisionGUID="8b6e1e04-0a84-41c3-b6b5-32457c8c95ba" CreationDate="2024-01-25T13:09:27.300" UserId="4794" Text="I am trying to customize the POS. But I don't know how to evaluate my algorithm. I want to print out the authority ID (BABE) and block producer ID.&#xD;&#xA;How do I do that? Please give me some leads.&#xD;&#xA;&#xD;&#xA;Thank you so much" ContentLicense="CC BY-SA 4.0" />
  <row Id="43476" PostHistoryTypeId="1" PostId="10896" RevisionGUID="8b6e1e04-0a84-41c3-b6b5-32457c8c95ba" CreationDate="2024-01-25T13:09:27.300" UserId="4794" Text="How to debug/test POS, log out the authorityId?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43477" PostHistoryTypeId="3" PostId="10896" RevisionGUID="8b6e1e04-0a84-41c3-b6b5-32457c8c95ba" CreationDate="2024-01-25T13:09:27.300" UserId="4794" Text="|babe|pos|debug|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43483" PostHistoryTypeId="2" PostId="10898" RevisionGUID="c41f568d-ebdf-4eb6-8313-313d6a370731" CreationDate="2024-01-26T04:00:41.437" UserId="251" Text="This could be a problem with your network or the service provider(1RPC).&#xD;&#xA;&#xD;&#xA;Feel free to test other endpoints and see if they work.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/25EZq.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43485" PostHistoryTypeId="2" PostId="10899" RevisionGUID="6b03d1a3-7b64-4d5f-90cd-9b175b96f963" CreationDate="2024-01-26T11:03:46.600" UserId="2762" Text="Check that you don't have anything in your browser blocking the conexion, for example uBlock. See this issue FATAL: [Unable to initialize the API: disconnected from wss://pub.elara.patract.io/kusama: 1006:: Abnormal Closure #3960][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Another good resource you can take a look is this guide [Polkadot-JS UI: How to Troubleshoot Connection Issues][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-js/api/issues/3960&#xD;&#xA;  [2]: https://support.polkadot.network/support/solutions/articles/65000176918-polkadot-js-ui-how-to-troubleshoot-connection-issues" ContentLicense="CC BY-SA 4.0" />
  <row Id="43487" PostHistoryTypeId="2" PostId="10900" RevisionGUID="8ba0fee8-ac0d-43aa-a356-4d7afe8b5c15" CreationDate="2024-01-26T11:30:07.400" UserId="2089" Text="[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;how to find bonded and free funds in a nomination pool account using Polkadot JS API? from https://staking.polkadot.network/#/pools&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/O21m7.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43489" PostHistoryTypeId="1" PostId="10900" RevisionGUID="8ba0fee8-ac0d-43aa-a356-4d7afe8b5c15" CreationDate="2024-01-26T11:30:07.400" UserId="2089" Text="how to find bonded and free funds in a nomination pool account using Polkadot JS API?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43490" PostHistoryTypeId="3" PostId="10900" RevisionGUID="8ba0fee8-ac0d-43aa-a356-4d7afe8b5c15" CreationDate="2024-01-26T11:30:07.400" UserId="2089" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43491" PostHistoryTypeId="2" PostId="10901" RevisionGUID="aafd7557-1527-4373-97c9-805b76a571a4" CreationDate="2024-01-26T11:35:37.727" UserId="2089" Text="**Free Funds**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.query.system.account(accountAddress);&#xD;&#xA;```&#xD;&#xA;`free` depcits the free funds.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Bonded Funds**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.query.nominationPools.poolMembers&#xD;&#xA;```&#xD;&#xA;`points` deicts the bonded funds. &#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Can test it out at the [polkadot js developer dashboard][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YDUOh.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZYt4H.png&#xD;&#xA;  [3]: https://polkadot.js.org/apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="43493" PostHistoryTypeId="2" PostId="10902" RevisionGUID="5b5988a2-3583-46a4-9d41-6447cf35fa00" CreationDate="2024-01-26T15:30:01.387" UserId="3598" Text="I'm getting a SendFailure error(on asset hub) when performing a reserve asset transfer of ROC from rococo asset hub to a parachain, does anyone know what might be the cause? Or how can I further debug the issue?&#xD;&#xA;&#xD;&#xA;This is the call I'm doing: `0x1f0203010100b5200300010100e266243731bf69fff27133f3cbb8def28c6fd26d688d14fee34ab6950351aa0f030400010000070010a5d4e800000000`" ContentLicense="CC BY-SA 4.0" />
  <row Id="43495" PostHistoryTypeId="1" PostId="10902" RevisionGUID="5b5988a2-3583-46a4-9d41-6447cf35fa00" CreationDate="2024-01-26T15:30:01.387" UserId="3598" Text="SendFailure error when performing reserve asset transfer from rococo asset hub to parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="43496" PostHistoryTypeId="3" PostId="10902" RevisionGUID="5b5988a2-3583-46a4-9d41-6447cf35fa00" CreationDate="2024-01-26T15:30:01.387" UserId="3598" Text="|parachain|xcm|rococo|assethub|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43497" PostHistoryTypeId="2" PostId="10903" RevisionGUID="47f76b0d-c28a-4ed1-80c7-0c333bac7818" CreationDate="2024-01-26T16:04:37.027" UserId="3598" Text="I'm running 2 collators for a rococo parachain, and every so often they throw the following error:&#xD;&#xA;```&#xD;&#xA;2024-01-26 15:37:24 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.    &#xD;&#xA;2024-01-26 15:37:24 [Parachain] ❗️ Inherent extrinsic returned unexpected error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;WASM backtrace:&#xD;&#xA;error while executing at wasm backtrace:&#xD;&#xA;    0: 0x4f0c7e - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;    1: 0xc0d5 - &lt;unknown&gt;!core::panicking::panic_fmt::ha38e6eecb0b0460a&#xD;&#xA;    2: 0x138930 - &lt;unknown&gt;!cumulus_pallet_parachain_system::&lt;impl cumulus_pallet_parachain_system::pallet::Pallet&lt;T&gt;&gt;::maybe_drop_included_ancestors::haffe4e2473a55f94&#xD;&#xA;    3: 0x2ff8ab - &lt;unknown&gt;!frame_support::storage::transactional::with_transaction::h96eabf484a536fae&#xD;&#xA;    4: 0x38c027 - &lt;unknown&gt;!&lt;cumulus_pallet_parachain_system::pallet::Call&lt;T&gt; as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::{{closure}}::h072e3d5063d8ecd6&#xD;&#xA;    5: 0x39c4ab - &lt;unknown&gt;!environmental::local_key::LocalKey&lt;T&gt;::with::hdfe7ff7a67cc35fb&#xD;&#xA;    6: 0x433bd - &lt;unknown&gt;!&lt;hashed_parachain_runtime::RuntimeCall as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::h50ba6ab435d9ce83&#xD;&#xA;    7: 0x41555 - &lt;unknown&gt;!&lt;hashed_parachain_runtime::RuntimeCall as sp_runtime::traits::Dispatchable&gt;::dispatch::h0d7888a94bcec6cb&#xD;&#xA;    8: 0x38cd52 - &lt;unknown&gt;!&lt;sp_runtime::generic::checked_extrinsic::CheckedExtrinsic&lt;AccountId,Call,Extra&gt; as sp_runtime::traits::Applyable&gt;::apply::h7ff1a26f626b4efc&#xD;&#xA;    9: 0x34bc4f - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::apply_extrinsic::h1fa340d793d8060b&#xD;&#xA;   10: 0x3c8864 - &lt;unknown&gt;!BlockBuilder_apply_extrinsic. Dropping.    &#xD;&#xA;2024-01-26 15:37:24 [Parachain] panicked at 'set_validation_data inherent needs to be present in every block!', /home/sebastian/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/7c9fd83/cumulus/pallets/parachain-system/src/lib.rs:268:18    &#xD;&#xA;2024-01-26 15:37:24 [Parachain] err=Error { inner: Proposing&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;       WASM backtrace:&#xD;&#xA;       error while executing at wasm backtrace:&#xD;&#xA;           0: 0x4f0c7e - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;           1: 0xc0d5 - &lt;unknown&gt;!core::panicking::panic_fmt::ha38e6eecb0b0460a&#xD;&#xA;           2: 0xc083 - &lt;unknown&gt;!core::option::expect_failed::hea4dd73f37ab58ac&#xD;&#xA;           3: 0x133269 - &lt;unknown&gt;!&lt;cumulus_pallet_parachain_system::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnFinalize&lt;&lt;&lt;&lt;T as frame_system::pallet::Config&gt;::Block as sp_runtime::traits::HeaderProvider&gt;::HeaderT as sp_runtime::traits::Header&gt;::Number&gt;&gt;::on_finalize::hb7107cdcee56d33b&#xD;&#xA;           4: 0x34c120 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::idle_and_finalize_hook::hc83c4073d3f381c9&#xD;&#xA;           5: 0x34c23e - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::finalize_block::ha23dd198865f8803&#xD;&#xA;           6: 0x3c891b - &lt;unknown&gt;!BlockBuilder_finalize_block&#xD;&#xA;    1: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;       WASM backtrace:&#xD;&#xA;       error while executing at wasm backtrace:&#xD;&#xA;           0: 0x4f0c7e - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;           1: 0xc0d5 - &lt;unknown&gt;!core::panicking::panic_fmt::ha38e6eecb0b0460a&#xD;&#xA;           2: 0xc083 - &lt;unknown&gt;!core::option::expect_failed::hea4dd73f37ab58ac&#xD;&#xA;           3: 0x133269 - &lt;unknown&gt;!&lt;cumulus_pallet_parachain_system::pallet::Pallet&lt;T&gt; as frame_support::traits::hooks::OnFinalize&lt;&lt;&lt;&lt;T as frame_system::pallet::Config&gt;::Block as sp_runtime::traits::HeaderProvider&gt;::HeaderT as sp_runtime::traits::Header&gt;::Number&gt;&gt;::on_finalize::hb7107cdcee56d33b&#xD;&#xA;           4: 0x34c120 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::idle_and_finalize_hook::hc83c4073d3f381c9&#xD;&#xA;           5: 0x34c23e - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::finalize_block::ha23dd198865f8803&#xD;&#xA;           6: 0x3c891b - &lt;unknown&gt;!BlockBuilder_finalize_block }&#xD;&#xA;```&#xD;&#xA;The collators still produce blocks, but because of this issue, every so often they skip producing blocks.&#xD;&#xA;&#xD;&#xA;Does anyone know what might be the cause?&#xD;&#xA;&#xD;&#xA;I've seen this post: [https://substrate.stackexchange.com/questions/5400/failure-on-hrmp-channel-creation][1], but the cause mentioned on the issue does not apply on my case as the parachain ids do match.&#xD;&#xA;&#xD;&#xA;The collators are running `polkadot 1.3.0`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/questions/5400/failure-on-hrmp-channel-creation" ContentLicense="CC BY-SA 4.0" />
  <row Id="43499" PostHistoryTypeId="1" PostId="10903" RevisionGUID="47f76b0d-c28a-4ed1-80c7-0c333bac7818" CreationDate="2024-01-26T16:04:37.027" UserId="3598" Text="Collator throwing &quot;set_validation_data inherent needs to be present in every block!&quot; error every so often" ContentLicense="CC BY-SA 4.0" />
  <row Id="43500" PostHistoryTypeId="3" PostId="10903" RevisionGUID="47f76b0d-c28a-4ed1-80c7-0c333bac7818" CreationDate="2024-01-26T16:04:37.027" UserId="3598" Text="|rococo|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43501" PostHistoryTypeId="2" PostId="10904" RevisionGUID="357c49e9-a15d-42e2-859b-c43adadcb259" CreationDate="2024-01-26T17:25:07.710" UserId="4081" Text="## Problem&#xD;&#xA;I stumbled upon the same issue yesterday and it turns out it has to do with a missing configuration for async backing on the parachain side.&#xD;&#xA;&#xD;&#xA;Rococo has async backing enabled and it needs some things to be implemented on the parachain that if they are not present, this error occurs. The reason why you are not seeing the error on zombienet is because by default Rococo has this features disabled. If you want to enable them you need to add this to your zombienet configuration file.&#xD;&#xA;&#xD;&#xA;```toml&#xD;&#xA;[relaychain]&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;default_command = &quot;./bin-v1.3.0/polkadot&quot;&#xD;&#xA;&#xD;&#xA;[relaychain.genesis.runtime.configuration.config]&#xD;&#xA;scheduling_lookahead = 2&#xD;&#xA;&#xD;&#xA;[relaychain.genesis.runtime.configuration.config.async_backing_params]&#xD;&#xA;max_candidate_depth = 3&#xD;&#xA;allowed_ancestry_len = 2&#xD;&#xA;&#xD;&#xA;	[[relaychain.nodes]]&#xD;&#xA;	name = &quot;alice&quot;&#xD;&#xA;	validator = true&#xD;&#xA;&#xD;&#xA;	[[relaychain.nodes]]&#xD;&#xA;	name = &quot;bob&quot;&#xD;&#xA;	validator = true&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;....&#xD;&#xA;```&#xD;&#xA;Now you should also see the error present in the logs of the parachain collator on zombienet after the block production starts.&#xD;&#xA;&#xD;&#xA;### How to solve&#xD;&#xA;The solution is relatively simple, you just need to implement the missing configuration for async backing on your parachain node (no need to enable async backing just have the configuration ready). For this just follow steps 1 and 2 of the [Upgrade Parachain for Asynchronous Backing Compatibility][1] Guide&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-async-backing#phase-1---update-parachain-runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="43504" PostHistoryTypeId="2" PostId="10905" RevisionGUID="6b502726-4484-4266-9a69-af357675932f" CreationDate="2024-01-26T20:03:30.517" UserId="5079" Text="In order to add an offchain worker with using `AccountId20` as the runtime account type I did following things.&#xD;&#xA;&#xD;&#xA; 1. add associated type `type AuthorityId: AppCrypto&lt;Self::Public, Self::Signature&gt;;` in the config traitof an OCW pallet, and add traitbond `CreateSignedTransaction&lt;Call&lt;Self&gt;&gt;` to the config.&#xD;&#xA; 2. Implement `CreateSignedTransaction&lt;LocalCall&gt;` for Runtime like [the substrate offchain worker tutorial][1] says.&#xD;&#xA; 3. create a `crypto` module, and rewrite the sign and verify method (wher I used `sp_io::crypto::ecdsa_sign`):&#xD;&#xA;&#xD;&#xA;        pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;demo&quot;);&#xD;&#xA;	    pub mod crypto {&#xD;&#xA;		    use super::KEY_TYPE;&#xD;&#xA;		    use sp_runtime::traits::Verify;&#xD;&#xA;		    use sp_runtime::{&#xD;&#xA;			    app_crypto::{app_crypto, ecdsa},&#xD;&#xA;		    };&#xD;&#xA;		    use fp_account::{&#xD;&#xA;			    EthereumSignature, EthereumSigner&#xD;&#xA;		    };&#xD;&#xA;		    use sp_io::crypto::ecdsa_sign;&#xD;&#xA;		    use sp_io::hashing::keccak_256;&#xD;&#xA;		    use fp_account::AccountId20;&#xD;&#xA;		    app_crypto!(ecdsa, KEY_TYPE);&#xD;&#xA;&#xD;&#xA;		    impl frame_system::offchain::AppCrypto&lt;EthereumSigner, EthereumSignature&gt; for TestAuthId {&#xD;&#xA;			    type RuntimeAppPublic = Public; &#xD;&#xA;			    type GenericSignature = ecdsa::Signature; //struct Signature(pub [u8; 65]);&#xD;&#xA;			    type GenericPublic = ecdsa::Public;       //struct Public(pub [u8; 32]) &#xD;&#xA;&#xD;&#xA;			    fn sign(payload: &amp;[u8], public: EthereumSigner) -&gt; Option&lt;EthereumSignature&gt; { &#xD;&#xA;				    let m = keccak_256(payload);&#xD;&#xA;				    let ECDSAPublic: ecdsa::Public = public.into(); // compressed one&#xD;&#xA;				    match ecdsa_sign(KEY_TYPE, &amp;ECDSAPublic, &amp;m) {&#xD;&#xA;					    None =&gt; return None,&#xD;&#xA;					    Some(e) =&gt; {&#xD;&#xA;						    log::info!(&quot;[{:?}]: singature.&quot;, &amp;e);&#xD;&#xA;						    return Some(e.into())&#xD;&#xA;					    }&#xD;&#xA;				    }&#xD;&#xA;			    }&#xD;&#xA;			&#xD;&#xA;			    fn verify(payload: &amp;[u8], public: EthereumSigner, signature: EthereumSignature) -&gt; bool { &#xD;&#xA;				    let accountId: &amp;AccountId20 = &amp;public.into();&#xD;&#xA;				    let result = signature.verify(payload, accountId);&#xD;&#xA;				    log::info!(&quot;[{:?}]: verify result.&quot;, &amp;result);&#xD;&#xA;				    result&#xD;&#xA;			    }&#xD;&#xA;		    }&#xD;&#xA;&#xD;&#xA;	    }&#xD;&#xA;&#xD;&#xA;Turns out I've got Badproof error: `(offchain call) Error submitting a transaction to the pool: Transaction pool error: Invalid transaction validity: InvalidTransaction::BadProof` from checking the transaction. The error is caused by that the `verify` method of `EthereumSignature` from trait `sp_runtime::traits::Verify` returns false:&#xD;&#xA;&#xD;&#xA;    	fn verify&lt;L: sp_runtime::traits::Lazy&lt;[u8]&gt;&gt;(&amp;self, mut msg: L, signer: &amp;AccountId20) -&gt; bool {&#xD;&#xA;		&#xD;&#xA;		    let m = keccak_256(msg.get());&#xD;&#xA;		    log::info!(&quot;[{:?}]: failed to verify0, signature&quot;, self.0);&#xD;&#xA;		&#xD;&#xA;		    match sp_io::crypto::secp256k1_ecdsa_recover(self.0.as_ref(), &amp;m) {&#xD;&#xA;			    Ok(pubkey) =&gt; { &#xD;&#xA;                    // return false&#xD;&#xA;				    AccountId20(H160::from(H256::from(keccak_256(&amp;pubkey))).0)==*signer&#xD;&#xA;			    },&#xD;&#xA;			    ...&#xD;&#xA;		    }&#xD;&#xA;	    }&#xD;&#xA;I guess my assumption that `sp_io::crypto::secp256k1_ecdsa_recover` is the revert of `sp_io::crypto::ecdsa_sign` was wrong, or did I do something else wrong?&#xD;&#xA;AND WHAT IS THE RIGHT WAY TO ADD AN OFFCHAIN WORKER IN FRONTIER with ACCOUNTID20?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-application-logic/add-offchain-workers/" ContentLicense="CC BY-SA 4.0" />
  <row Id="43506" PostHistoryTypeId="1" PostId="10905" RevisionGUID="6b502726-4484-4266-9a69-af357675932f" CreationDate="2024-01-26T20:03:30.517" UserId="5079" Text="How should I add offchain workder(OCW) in frontier when using accountid20?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43507" PostHistoryTypeId="3" PostId="10905" RevisionGUID="6b502726-4484-4266-9a69-af357675932f" CreationDate="2024-01-26T20:03:30.517" UserId="5079" Text="|substrate-node-template|polkadot|frontier|offchain-worker|frontier-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43508" PostHistoryTypeId="5" PostId="10905" RevisionGUID="9a17af2e-11b5-4dd0-b8f2-3b5ef42e70bf" CreationDate="2024-01-26T20:06:14.893" UserId="5079" Comment="added 1 character in body" Text="In order to add an offchain worker with using `AccountId20` as the runtime account type I did following things.&#xD;&#xA;&#xD;&#xA; 1. add associated type `type AuthorityId: AppCrypto&lt;Self::Public, Self::Signature&gt;;` in the config traitof an OCW pallet, and add traitbond `CreateSignedTransaction&lt;Call&lt;Self&gt;&gt;` to the config.&#xD;&#xA; 2. Implement `CreateSignedTransaction&lt;LocalCall&gt;` for Runtime like [the substrate offchain worker tutorial][1] says.&#xD;&#xA; 3. create a `crypto` module, and rewrite the sign and verify method (wher I used `sp_io::crypto::ecdsa_sign`):&#xD;&#xA;&#xD;&#xA;        pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;demo&quot;);&#xD;&#xA;	    pub mod crypto {&#xD;&#xA;		    use super::KEY_TYPE;&#xD;&#xA;		    use sp_runtime::traits::Verify;&#xD;&#xA;		    use sp_runtime::{&#xD;&#xA;			    app_crypto::{app_crypto, ecdsa},&#xD;&#xA;		    };&#xD;&#xA;		    use fp_account::{&#xD;&#xA;			    EthereumSignature, EthereumSigner&#xD;&#xA;		    };&#xD;&#xA;		    use sp_io::crypto::ecdsa_sign;&#xD;&#xA;		    use sp_io::hashing::keccak_256;&#xD;&#xA;		    use fp_account::AccountId20;&#xD;&#xA;		    app_crypto!(ecdsa, KEY_TYPE);&#xD;&#xA;&#xD;&#xA;		    impl frame_system::offchain::AppCrypto&lt;EthereumSigner, EthereumSignature&gt; for TestAuthId {&#xD;&#xA;			    type RuntimeAppPublic = Public; &#xD;&#xA;			    type GenericSignature = ecdsa::Signature; //struct Signature(pub [u8; 65]);&#xD;&#xA;			    type GenericPublic = ecdsa::Public;       //struct Public(pub [u8; 32]) &#xD;&#xA;&#xD;&#xA;			    fn sign(payload: &amp;[u8], public: EthereumSigner) -&gt; Option&lt;EthereumSignature&gt; { &#xD;&#xA;				    let m = keccak_256(payload);&#xD;&#xA;				    let ECDSAPublic: ecdsa::Public = public.into(); // compressed one&#xD;&#xA;				    match ecdsa_sign(KEY_TYPE, &amp;ECDSAPublic, &amp;m) {&#xD;&#xA;					    None =&gt; return None,&#xD;&#xA;					    Some(e) =&gt; {&#xD;&#xA;						    log::info!(&quot;[{:?}]: singature.&quot;, &amp;e);&#xD;&#xA;						    return Some(e.into())&#xD;&#xA;					    }&#xD;&#xA;				    }&#xD;&#xA;			    }&#xD;&#xA;			&#xD;&#xA;			    fn verify(payload: &amp;[u8], public: EthereumSigner, signature: EthereumSignature) -&gt; bool { &#xD;&#xA;				    let accountId: &amp;AccountId20 = &amp;public.into();&#xD;&#xA;				    let result = signature.verify(payload, accountId);&#xD;&#xA;				    log::info!(&quot;[{:?}]: verify result.&quot;, &amp;result);&#xD;&#xA;				    result&#xD;&#xA;			    }&#xD;&#xA;		    }&#xD;&#xA;&#xD;&#xA;	    }&#xD;&#xA;&#xD;&#xA;Turns out I've got Badproof error: `(offchain call) Error submitting a transaction to the pool: Transaction pool error: Invalid transaction validity: InvalidTransaction::BadProof` from checking the transaction. The error is caused by that the `verify` method of `EthereumSignature` from trait `sp_runtime::traits::Verify` returns false:&#xD;&#xA;&#xD;&#xA;    	fn verify&lt;L: sp_runtime::traits::Lazy&lt;[u8]&gt;&gt;(&amp;self, mut msg: L, signer: &amp;AccountId20) -&gt; bool {&#xD;&#xA;		&#xD;&#xA;		    let m = keccak_256(msg.get());&#xD;&#xA;		    log::info!(&quot;[{:?}]: failed to verify0, signature&quot;, self.0);&#xD;&#xA;		&#xD;&#xA;		    match sp_io::crypto::secp256k1_ecdsa_recover(self.0.as_ref(), &amp;m) {&#xD;&#xA;			    Ok(pubkey) =&gt; { &#xD;&#xA;                    // return false&#xD;&#xA;				    AccountId20(H160::from(H256::from(keccak_256(&amp;pubkey))).0)==*signer&#xD;&#xA;			    },&#xD;&#xA;			    ...&#xD;&#xA;		    }&#xD;&#xA;	    }&#xD;&#xA;I guess my assumption that `sp_io::crypto::secp256k1_ecdsa_recover` is the reverse of `sp_io::crypto::ecdsa_sign` was wrong, or did I do something else wrong?&#xD;&#xA;AND WHAT IS THE RIGHT WAY TO ADD AN OFFCHAIN WORKER IN FRONTIER with ACCOUNTID20?&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-application-logic/add-offchain-workers/" ContentLicense="CC BY-SA 4.0" />
  <row Id="43510" PostHistoryTypeId="50" PostId="10714" RevisionGUID="f1cbde7a-472e-41ac-8ef6-ec550cf9c9b1" CreationDate="2024-01-27T06:06:55.900" UserId="-1" />
  <row Id="43511" PostHistoryTypeId="2" PostId="10906" RevisionGUID="19b47812-436f-41d8-aabd-0769ff053192" CreationDate="2024-01-27T10:17:25.130" UserId="555" Text="I'm trying to store a value obtained from the consensus, specifically `sc_consensus_babe::fn import_block`. While I can observe the value in the pallet through the log, it doesn't seem to be stored in the storage. &#xD;&#xA;&#xD;&#xA;What could be the issue, or is it not possible to store this value?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Related code:&#xD;&#xA;```rust&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn tmp)]&#xD;&#xA;	pub type Temp&lt;T: Config&gt; = StorageValue&lt;_, u32, ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA; pub fn store_value(new_value: u32) -&gt; () {&#xD;&#xA;			Temp::&lt;T&gt;::put(10);&#xD;&#xA;&#xD;&#xA;			// log::info!(&quot;new value in the pallet is {:?}!!!!!!&quot;, new_value);&#xD;&#xA;		}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43513" PostHistoryTypeId="1" PostId="10906" RevisionGUID="19b47812-436f-41d8-aabd-0769ff053192" CreationDate="2024-01-27T10:17:25.130" UserId="555" Text="Difficulty Storing Consensus-Derived Value in Storage: Observing Value in Pallet Log but Not in Storage" ContentLicense="CC BY-SA 4.0" />
  <row Id="43514" PostHistoryTypeId="3" PostId="10906" RevisionGUID="19b47812-436f-41d8-aabd-0769ff053192" CreationDate="2024-01-27T10:17:25.130" UserId="555" Text="|pallet|storage|consensus|babe|aura|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43515" PostHistoryTypeId="50" PostId="10718" RevisionGUID="03186812-0dd0-4367-8c53-59a088bee7be" CreationDate="2024-01-27T15:02:50.340" UserId="-1" />
  <row Id="43528" PostHistoryTypeId="50" PostId="9738" RevisionGUID="56b66d02-9a1e-4458-87b0-9983e1d7f5cb" CreationDate="2024-01-28T12:07:50.920" UserId="-1" />
  <row Id="43529" PostHistoryTypeId="50" PostId="9768" RevisionGUID="efee8baf-7ff4-4614-b776-53545121bd36" CreationDate="2024-01-28T14:02:55.333" UserId="-1" />
  <row Id="43531" PostHistoryTypeId="2" PostId="10909" RevisionGUID="b7964ce8-b89f-4052-b6b3-9f74b75efb4e" CreationDate="2024-01-28T15:14:24.340" UserId="377" Text="I need to customise the tracks for my OpenGov implementation. How should I do that? &#xD;&#xA;I mean what are the things I would need to consider and how to make a decision on that?&#xD;&#xA;&#xD;&#xA;Curve default code:&#xD;&#xA;```&#xD;&#xA;const APP_ROOT: Curve = Curve::make_reciprocal(4, 14, percent(80), percent(50), percent(100));&#xD;&#xA;const SUP_ROOT: Curve = Curve::make_linear(14, 14, permill(5), percent(25));&#xD;&#xA;&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43533" PostHistoryTypeId="1" PostId="10909" RevisionGUID="b7964ce8-b89f-4052-b6b3-9f74b75efb4e" CreationDate="2024-01-28T15:14:24.340" UserId="377" Text="How to set CURVES for OpenGov Tracks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43534" PostHistoryTypeId="3" PostId="10909" RevisionGUID="b7964ce8-b89f-4052-b6b3-9f74b75efb4e" CreationDate="2024-01-28T15:14:24.340" UserId="377" Text="|opengov|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43535" PostHistoryTypeId="2" PostId="10910" RevisionGUID="9653ddc2-575f-459c-bd15-64d377784dce" CreationDate="2024-01-28T19:01:54.123" UserId="554" Text="I'm new to substrate, I want to explore where we are selecting the validators for current block authorisation[pos]. &#xD;&#xA;&#xD;&#xA;Can anyone help me to find out in the code for that particular functionality?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43537" PostHistoryTypeId="1" PostId="10910" RevisionGUID="9653ddc2-575f-459c-bd15-64d377784dce" CreationDate="2024-01-28T19:01:54.123" UserId="554" Text="Where we are doing the selection of validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43538" PostHistoryTypeId="3" PostId="10910" RevisionGUID="9653ddc2-575f-459c-bd15-64d377784dce" CreationDate="2024-01-28T19:01:54.123" UserId="554" Text="|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43539" PostHistoryTypeId="2" PostId="10911" RevisionGUID="422b8a2e-9057-4fa2-8d00-75db9327613a" CreationDate="2024-01-29T01:37:12.243" UserId="5103" Text="I'm trying to read about XCMP but documentation is a bit confusing as, 1. It doesn't exist yet, 2. development is hard to follow.  &#xD;&#xA;&#xD;&#xA;I was mainly curious as to how it compares to AWM, as both seem to (in a very basic explanation) use p2p communication between blockchains/parachains/subnets. I'm trying to better understand the differences between them, as well as when XCMP will be available. " ContentLicense="CC BY-SA 4.0" />
  <row Id="43541" PostHistoryTypeId="1" PostId="10911" RevisionGUID="422b8a2e-9057-4fa2-8d00-75db9327613a" CreationDate="2024-01-29T01:37:12.243" UserId="5103" Text="What's the state of XCMP, and how does it compare to AWM" ContentLicense="CC BY-SA 4.0" />
  <row Id="43542" PostHistoryTypeId="3" PostId="10911" RevisionGUID="422b8a2e-9057-4fa2-8d00-75db9327613a" CreationDate="2024-01-29T01:37:12.243" UserId="5103" Text="|xcmp|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43545" PostHistoryTypeId="5" PostId="5957" RevisionGUID="26ea36f3-7184-439c-a361-6e21693fb317" CreationDate="2024-01-29T12:32:33.537" UserId="234" Comment="update broken link" Text="First setup your Relay chain:&#xD;&#xA;- https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/&#xD;&#xA;&#xD;&#xA;In the above guide it states:&#xD;&#xA;&#xD;&#xA;&gt; If you wanted to connect two parachains with a single collator each,&#xD;&#xA;&gt; you would need to run three or more relay chain validator nodes. In&#xD;&#xA;&gt; general, you would need to modify the chain specification and&#xD;&#xA;&gt; hard-code additional validators to set up a local test network for two&#xD;&#xA;&gt; or more parachains.&#xD;&#xA;&#xD;&#xA;So in your case you will need a custom Relay chain chain spec with three validators minimum. More info on creating custom chain specs can be found here:&#xD;&#xA;- https://docs.substrate.io/reference/how-to-guides/basics/customize-a-chain-specification&#xD;&#xA;&#xD;&#xA;Once you have a your Relay chain running with three validators minimum and its own custom chain spec you can then proceed to setting up your parachains.&#xD;&#xA;&#xD;&#xA;Each parachain will have its own custom chain spec. One parachain can have one or more collators that can share the same parachain chain spec. Information on setting up a parachain, creating its chain spec, and connecting to the Relay chain can be found here:&#xD;&#xA;- https://docs.substrate.io/tutorials/connect-relay-and-parachains/connect-a-local-parachain&#xD;&#xA;&#xD;&#xA;And of course if you would like to bypass this manual process and spin up a Relay chain with two parachains quickly you can use Zombienet!&#xD;&#xA;- https://substrate.stackexchange.com/questions/4692/how-do-i-spin-up-a-testnet-with-zombienet" ContentLicense="CC BY-SA 4.0" />
  <row Id="43546" PostHistoryTypeId="2" PostId="10913" RevisionGUID="cde18987-5173-475e-9ca9-6e9b57fcccf4" CreationDate="2024-01-29T12:45:55.123" UserId="298" Text="When adding many batchAll TXs containing mint() and freeze() assets to AssetHub Rococo chain, there are times when TXs in `rpc -&gt; author -&gt; pendingExtrinsics()` just sit there and don't get collected to be put in the block.&#xD;&#xA;&#xD;&#xA;This stops my script because it is synchronously adding transactions after the previous one is Finalized. &#xD;&#xA;&#xD;&#xA;- It is not a nonce issue, because nonce issues provide an error when it happens. . &#xD;&#xA;- It is not a block limit issue, because that also provides an error when it happens. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Could it be to do with how many TXs the RPCs allowed from one connection? &#xD;&#xA;&#xD;&#xA;Could the RPC perhaps have a tag that only allows a certain amount per period of time?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The pending extrinsic eventually disappears, which is probably because the lifetime has expired. &#xD;&#xA;&#xD;&#xA;Then i have to manualy resubmit it for it to be included. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;What is the likely problem in this situation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43548" PostHistoryTypeId="1" PostId="10913" RevisionGUID="cde18987-5173-475e-9ca9-6e9b57fcccf4" CreationDate="2024-01-29T12:45:55.123" UserId="298" Text="TXs in pendingExtrinsics() not always being picked up and then added in the block" ContentLicense="CC BY-SA 4.0" />
  <row Id="43549" PostHistoryTypeId="3" PostId="10913" RevisionGUID="cde18987-5173-475e-9ca9-6e9b57fcccf4" CreationDate="2024-01-29T12:45:55.123" UserId="298" Text="|polkadot|extrinsic|rococo|assets|assethub|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43550" PostHistoryTypeId="2" PostId="10914" RevisionGUID="1e5b201f-3b81-4251-94e1-48748d7a0724" CreationDate="2024-01-29T13:31:20.480" UserId="555" Text="Is it possible to update the storage of pallets through runtime api?&#xD;&#xA;Is yes. Do we have any resources for this same?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43552" PostHistoryTypeId="1" PostId="10914" RevisionGUID="1e5b201f-3b81-4251-94e1-48748d7a0724" CreationDate="2024-01-29T13:31:20.480" UserId="555" Text="How to update the pallet's storage from the runtime api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43553" PostHistoryTypeId="3" PostId="10914" RevisionGUID="1e5b201f-3b81-4251-94e1-48748d7a0724" CreationDate="2024-01-29T13:31:20.480" UserId="555" Text="|pallet|storage|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43555" PostHistoryTypeId="2" PostId="10915" RevisionGUID="47e068d6-dd5a-4d14-b445-3dcc0a35b03f" CreationDate="2024-01-29T15:04:14.950" UserId="94" Text="No it is not possible. Conceptually a Runtime API runs outside of consensus. They can be called by anyone on a RPC node and are permissionless.  &#xD;&#xA;It would therefore not make any sense to change the on-chain state since that is guarded by the consensus. If someone still wants to do that, then the node would just not be able to import blocks anymore since the state root hash differs.  &#xD;&#xA;&#xD;&#xA;Imagine I just change the balance of an account through a Runtime API on my node, why would anyone trust that change?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43557" PostHistoryTypeId="52" PostId="10914" RevisionGUID="1bd77415-f79a-4d83-9c92-e6f6e73591c8" CreationDate="2024-01-29T21:33:47.193" />
  <row Id="43558" PostHistoryTypeId="2" PostId="10916" RevisionGUID="8a30469c-5855-4e03-826a-95e4e1aecc1c" CreationDate="2024-01-30T02:19:06.810" UserId="5108" Text="Code:&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use sp_std::vec::Vec;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	#[pallet::event]   &#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		ClaimCreated(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;		ClaimRevoked(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::error]   &#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		ProofAlreadyClaimed,&#xD;&#xA;		NoSuchProof,&#xD;&#xA;		NotProofOwner,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage] // &lt;-- Step 5. code block will replace this.&#xD;&#xA;	pub(super) type Proofs&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, Vec&lt;u8&gt;, (T::AccountId, T::BlockNumber), ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {}&#xD;&#xA;&#xD;&#xA;	#[pallet::call]   // &lt;-- Step 6. code block will replace this.&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1_000)]&#xD;&#xA;		pub fn create_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;			// https://docs.substrate.io/v3/runtime/origins&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// Verify that the specified proof has not already been claimed.&#xD;&#xA;			ensure!(!Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::ProofAlreadyClaimed);&#xD;&#xA;&#xD;&#xA;			// Get the block number from the FRAME System module.&#xD;&#xA;			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;&#xD;&#xA;			// Store the proof with the sender and block number.&#xD;&#xA;			Proofs::&lt;T&gt;::insert(&amp;proof, (&amp;sender, current_block));&#xD;&#xA;&#xD;&#xA;			// Emit an event that the claim was created.&#xD;&#xA;			Self::deposit_event(Event::ClaimCreated(sender, proof));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(10_000)]&#xD;&#xA;		pub fn revoke_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			ensure!(Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::NoSuchProof);&#xD;&#xA;&#xD;&#xA;			let (owner, _) = Proofs::&lt;T&gt;::get(&amp;proof);&#xD;&#xA;&#xD;&#xA;			ensure!(sender == owner, Error::&lt;T&gt;::NotProofOwner);&#xD;&#xA;&#xD;&#xA;			Proofs::&lt;T&gt;::remove(&amp;proof);&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ClaimRevoked(sender, proof));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;error: Invalid usage of RuntimeEvent, Config contains no associated type RuntimeEvent, but enum Event is declared (in use of #[pallet::event]). An RuntimeEvent associated type must be declare on trait Config.&#xD;&#xA;&#xD;&#xA;    |&#xD;&#xA;  4 | #[frame_support::pallet]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = note: this error originates in the attribute macro frame_support::pallet (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error: could not compile pallet-template (lib) due to previous error&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43560" PostHistoryTypeId="1" PostId="10916" RevisionGUID="8a30469c-5855-4e03-826a-95e4e1aecc1c" CreationDate="2024-01-30T02:19:06.810" UserId="5108" Text="Keep on getting same error after cargo checking the code" ContentLicense="CC BY-SA 4.0" />
  <row Id="43561" PostHistoryTypeId="3" PostId="10916" RevisionGUID="8a30469c-5855-4e03-826a-95e4e1aecc1c" CreationDate="2024-01-30T02:19:06.810" UserId="5108" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43562" PostHistoryTypeId="5" PostId="10916" RevisionGUID="6139a8f9-c9e8-44d0-ad8e-1d7dfaa961fb" CreationDate="2024-01-30T02:45:00.517" UserId="251" Comment="added 12 characters in body" Text="Code:&#xD;&#xA;```rs&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use sp_std::vec::Vec;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type Event: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::Event&gt;;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	#[pallet::event]   &#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		ClaimCreated(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;		ClaimRevoked(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::error]   &#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		ProofAlreadyClaimed,&#xD;&#xA;		NoSuchProof,&#xD;&#xA;		NotProofOwner,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage] // &lt;-- Step 5. code block will replace this.&#xD;&#xA;	pub(super) type Proofs&lt;T: Config&gt; = StorageMap&lt;_, Blake2_128Concat, Vec&lt;u8&gt;, (T::AccountId, T::BlockNumber), ValueQuery&gt;;&#xD;&#xA;&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {}&#xD;&#xA;&#xD;&#xA;	#[pallet::call]   // &lt;-- Step 6. code block will replace this.&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1_000)]&#xD;&#xA;		pub fn create_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;			// https://docs.substrate.io/v3/runtime/origins&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// Verify that the specified proof has not already been claimed.&#xD;&#xA;			ensure!(!Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::ProofAlreadyClaimed);&#xD;&#xA;&#xD;&#xA;			// Get the block number from the FRAME System module.&#xD;&#xA;			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;&#xD;&#xA;			// Store the proof with the sender and block number.&#xD;&#xA;			Proofs::&lt;T&gt;::insert(&amp;proof, (&amp;sender, current_block));&#xD;&#xA;&#xD;&#xA;			// Emit an event that the claim was created.&#xD;&#xA;			Self::deposit_event(Event::ClaimCreated(sender, proof));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(10_000)]&#xD;&#xA;		pub fn revoke_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			ensure!(Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::NoSuchProof);&#xD;&#xA;&#xD;&#xA;			let (owner, _) = Proofs::&lt;T&gt;::get(&amp;proof);&#xD;&#xA;&#xD;&#xA;			ensure!(sender == owner, Error::&lt;T&gt;::NotProofOwner);&#xD;&#xA;&#xD;&#xA;			Proofs::&lt;T&gt;::remove(&amp;proof);&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ClaimRevoked(sender, proof));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;Error:&#xD;&#xA;error: Invalid usage of RuntimeEvent, Config contains no associated type RuntimeEvent, but enum Event is declared (in use of #[pallet::event]). An RuntimeEvent associated type must be declare on trait Config.&#xD;&#xA;&#xD;&#xA;    |&#xD;&#xA;  4 | #[frame_support::pallet]&#xD;&#xA;    | ^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;    |&#xD;&#xA;    = note: this error originates in the attribute macro frame_support::pallet (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error: could not compile pallet-template (lib) due to previous error&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43563" PostHistoryTypeId="2" PostId="10917" RevisionGUID="286ebd9a-0690-4519-86db-9ac05eba9b31" CreationDate="2024-01-30T02:47:33.220" UserId="251" Text="The name is hardcoded.&#xD;&#xA;&#xD;&#xA;Refer to https://github.com/substrate-developer-hub/substrate-node-template/blob/41ad4a6c9d712ac4b6e16e79a8b3837af8234f46/pallets/template/src/lib.rs#L32.&#xD;&#xA;&#xD;&#xA;Replace `Event` with `RuntimeEvent`." ContentLicense="CC BY-SA 4.0" />
  <row Id="43565" PostHistoryTypeId="5" PostId="10883" RevisionGUID="6dfd6522-dab9-43ee-86b9-6fdee1a7e3b2" CreationDate="2024-01-30T02:49:31.193" UserId="251" Comment="added 18 characters in body" Text="Whole error:&#xD;&#xA;```rs&#xD;&#xA;error: cannot find macro `thread_local` in this scope&#xD;&#xA;    --&gt; /home/hardeep/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/externalities/src/scope_limited.rs:22:1&#xD;&#xA;     |&#xD;&#xA;  22 | environmental::environmental!(ext: trait Externalities);&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`&#xD;&#xA;     = note: this error originates in the macro `$crate::thread_local_impl` which comes from the expansion of the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  error[E0425]: cannot find value `GLOBAL` in this scope&#xD;&#xA;    --&gt; /home/hardeep/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/externalities/src/scope_limited.rs:22:1&#xD;&#xA;     |&#xD;&#xA;  22 | environmental::environmental!(ext: trait Externalities);&#xD;&#xA;     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope&#xD;&#xA;     |&#xD;&#xA;     = note: this error originates in the macro `$crate::environmental` which comes from the expansion of the macro `environmental::environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;     Compiling hash-db v0.16.0&#xD;&#xA;     Compiling hashbrown v0.12.3&#xD;&#xA;  For more information about this error, try `rustc --explain E0425`.&#xD;&#xA;  error: could not compile `sp-externalities` (lib) due to 4 previous errors&#xD;&#xA;  warning: build failed, waiting for other jobs to finish...&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;rustups show:&#xD;&#xA;```&#xD;&#xA;hardeep@LAPTOP-M6QACF70:~/substrate/substrate-node-template$ rustup show&#xD;&#xA;Default host: x86_64-unknown-linux-gnu&#xD;&#xA;rustup home:  /home/hardeep/.rustup&#xD;&#xA;&#xD;&#xA;installed toolchains&#xD;&#xA;--------------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (default)&#xD;&#xA;nightly-x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;installed targets for active toolchain&#xD;&#xA;--------------------------------------&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;x86_64-unknown-linux-gnu&#xD;&#xA;&#xD;&#xA;active toolchain&#xD;&#xA;----------------&#xD;&#xA;&#xD;&#xA;stable-x86_64-unknown-linux-gnu (directory override for '/home/hardeep/substrate/substrate-node-template')&#xD;&#xA;rustc 1.75.0 (82e1608df 2023-12-21)&#xD;&#xA;```&#xD;&#xA;I tried all the things like installing wasm32-unknown-unknown.I also tried updating cargo with cargo update, before used cargo clean and used cargo build --release. also tried to pull if there were problem with my subsrate current node. Can anyone please help me with this." ContentLicense="CC BY-SA 4.0" />
  <row Id="43566" PostHistoryTypeId="2" PostId="10918" RevisionGUID="b679ff0c-6ccf-45d2-8971-8421787ad4f0" CreationDate="2024-01-30T03:24:30.990" UserId="5108" Text="Code:&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use sp_std::vec::Vec;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	#[pallet::event]   &#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		ClaimCreated(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;		ClaimRevoked(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::error]   &#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		ProofAlreadyClaimed,&#xD;&#xA;		NoSuchProof,&#xD;&#xA;		NotProofOwner,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn proofs)]&#xD;&#xA;	pub type Proofs&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		Vec&lt;u8&gt;,&#xD;&#xA;		(T::AccountId, T::BlockNumber),&#xD;&#xA;		ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {}&#xD;&#xA;&#xD;&#xA;	#[pallet::call]   // &lt;-- Step 6. code block will replace this.&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1_000)] &#xD;&#xA;		pub fn create_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;			// https://docs.substrate.io/v3/runtime/origins&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// Verify that the specified proof has not already been claimed.&#xD;&#xA;			ensure!(!Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::ProofAlreadyClaimed);&#xD;&#xA;&#xD;&#xA;			// Get the block number from the FRAME System module.&#xD;&#xA;			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;&#xD;&#xA;			// Store the proof with the sender and block number.&#xD;&#xA;			Proofs::&lt;T&gt;::insert(&amp;proof, (&amp;sender, current_block));&#xD;&#xA;&#xD;&#xA;			// Emit an event that the claim was created.&#xD;&#xA;			Self::deposit_event(Event::ClaimCreated(sender, proof));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(10_000)]&#xD;&#xA;		pub fn revoke_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			ensure!(Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::NoSuchProof);&#xD;&#xA;&#xD;&#xA;			let (owner, _) = Proofs::&lt;T&gt;::get(&amp;proof);&#xD;&#xA;&#xD;&#xA;			ensure!(sender == owner, Error::&lt;T&gt;::NotProofOwner);&#xD;&#xA;&#xD;&#xA;			Proofs::&lt;T&gt;::remove(&amp;proof);&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ClaimRevoked(sender, proof));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling pallet-template v4.0.0-dev &#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA;    |&#xD;&#xA;  7 |     use sp_std::vec::Vec;&#xD;&#xA;    |         ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated struct `pallet::_::Store`: &#xD;&#xA;                   Use of `#[pallet::generate_store(pub(super) trait Store)]` will be removed after July 2023.&#xD;&#xA;                   Check https://github.com/paritytech/substrate/pull/13535 for more details.&#xD;&#xA;     |&#xD;&#xA;  32 |     #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;     |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `#[warn(deprecated)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ImplicitCallIndex_0::_w`: &#xD;&#xA;                   It is deprecated to use implicit call indices.&#xD;&#xA;                   Please instead ensure that all calls have a `pallet::call_index` attribute or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/12891&gt;&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/11381&gt;&#xD;&#xA;     |&#xD;&#xA;  53 |         pub fn create_claim(&#xD;&#xA;     |                ^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ImplicitCallIndex_1::_w`: &#xD;&#xA;                   It is deprecated to use implicit call indices.&#xD;&#xA;                   Please instead ensure that all calls have a `pallet::call_index` attribute or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/12891&gt;&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/11381&gt;&#xD;&#xA;     |&#xD;&#xA;  78 |         pub fn revoke_claim(&#xD;&#xA;     |                ^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`: &#xD;&#xA;                   It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                   Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;     |&#xD;&#xA;  52 |         #[pallet::weight(1_000)] &#xD;&#xA;     |                          ^^^^^&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ConstantWeight_1::_w`: &#xD;&#xA;                   It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                   Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;     |&#xD;&#xA;  77 |         #[pallet::weight(10_000)]&#xD;&#xA;     |                          ^^^^^^&#xD;&#xA;&#xD;&#xA;  error[E0220]: associated type `BlockNumber` not found for `T`&#xD;&#xA;     |&#xD;&#xA;  41 |         (T::AccountId, T::BlockNumber),&#xD;&#xA;     |                           ^^^^^^^^^^^ there is an associated type `BlockNumber` in the trait `BlockNumberProvider`&#xD;&#xA;     |&#xD;&#xA;  help: consider further restricting this bound&#xD;&#xA;     |&#xD;&#xA;  37 |     pub type Proofs&lt;T: Config + BlockNumberProvider&gt; = StorageMap&lt;&#xD;&#xA;     |                               +++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0220]: associated type `BlockNumber` not found for `T`&#xD;&#xA;     |&#xD;&#xA;  41 |         (T::AccountId, T::BlockNumber),&#xD;&#xA;     |                           ^^^^^^^^^^^ there is an associated type `BlockNumber` in the trait `BlockNumberProvider`&#xD;&#xA;     |&#xD;&#xA;  help: consider further restricting this bound&#xD;&#xA;     |&#xD;&#xA;  35 |     #[pallet::storage + BlockNumberProvider]" ContentLicense="CC BY-SA 4.0" />
  <row Id="43568" PostHistoryTypeId="1" PostId="10918" RevisionGUID="b679ff0c-6ccf-45d2-8971-8421787ad4f0" CreationDate="2024-01-30T03:24:30.990" UserId="5108" Text="storage function still erroring" ContentLicense="CC BY-SA 4.0" />
  <row Id="43569" PostHistoryTypeId="3" PostId="10918" RevisionGUID="b679ff0c-6ccf-45d2-8971-8421787ad4f0" CreationDate="2024-01-30T03:24:30.990" UserId="5108" Text="|substrate-node-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43570" PostHistoryTypeId="5" PostId="10918" RevisionGUID="cd155c0e-395e-42c9-8623-555a8bd9d174" CreationDate="2024-01-30T10:54:46.880" UserId="251" Comment="added 12 characters in body" Text="Code:&#xD;&#xA;```rs&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[frame_support::pallet]&#xD;&#xA;pub mod pallet {&#xD;&#xA;	use frame_support::pallet_prelude::*;&#xD;&#xA;	use frame_system::pallet_prelude::*;&#xD;&#xA;	use sp_std::vec::Vec;&#xD;&#xA;&#xD;&#xA;	#[pallet::config]&#xD;&#xA;	pub trait Config: frame_system::Config {&#xD;&#xA;		type RuntimeEvent: From&lt;Event&lt;Self&gt;&gt; + IsType&lt;&lt;Self as frame_system::Config&gt;::RuntimeEvent&gt;;&#xD;&#xA;	}&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	#[pallet::event]   &#xD;&#xA;	#[pallet::generate_deposit(pub(super) fn deposit_event)]&#xD;&#xA;	pub enum Event&lt;T: Config&gt; {&#xD;&#xA;		ClaimCreated(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;		ClaimRevoked(T::AccountId, Vec&lt;u8&gt;),&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::error]   &#xD;&#xA;	pub enum Error&lt;T&gt; {&#xD;&#xA;		ProofAlreadyClaimed,&#xD;&#xA;		NoSuchProof,&#xD;&#xA;		NotProofOwner,&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	#[pallet::pallet]&#xD;&#xA;	#[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;	pub struct Pallet&lt;T&gt;(_);&#xD;&#xA;&#xD;&#xA;	#[pallet::storage]&#xD;&#xA;	#[pallet::getter(fn proofs)]&#xD;&#xA;	pub type Proofs&lt;T: Config&gt; = StorageMap&lt;&#xD;&#xA;		_,&#xD;&#xA;		Blake2_128Concat,&#xD;&#xA;		Vec&lt;u8&gt;,&#xD;&#xA;		(T::AccountId, T::BlockNumber),&#xD;&#xA;		ValueQuery,&#xD;&#xA;	&gt;;&#xD;&#xA;	&#xD;&#xA;&#xD;&#xA;	&#xD;&#xA;	#[pallet::hooks]&#xD;&#xA;	impl&lt;T: Config&gt; Hooks&lt;BlockNumberFor&lt;T&gt;&gt; for Pallet&lt;T&gt; {}&#xD;&#xA;&#xD;&#xA;	#[pallet::call]   // &lt;-- Step 6. code block will replace this.&#xD;&#xA;	impl&lt;T: Config&gt; Pallet&lt;T&gt; {&#xD;&#xA;		#[pallet::weight(1_000)] &#xD;&#xA;		pub fn create_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			// Check that the extrinsic was signed and get the signer.&#xD;&#xA;			// This function will return an error if the extrinsic is not signed.&#xD;&#xA;			// https://docs.substrate.io/v3/runtime/origins&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			// Verify that the specified proof has not already been claimed.&#xD;&#xA;			ensure!(!Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::ProofAlreadyClaimed);&#xD;&#xA;&#xD;&#xA;			// Get the block number from the FRAME System module.&#xD;&#xA;			let current_block = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;&#xD;&#xA;			// Store the proof with the sender and block number.&#xD;&#xA;			Proofs::&lt;T&gt;::insert(&amp;proof, (&amp;sender, current_block));&#xD;&#xA;&#xD;&#xA;			// Emit an event that the claim was created.&#xD;&#xA;			Self::deposit_event(Event::ClaimCreated(sender, proof));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		#[pallet::weight(10_000)]&#xD;&#xA;		pub fn revoke_claim(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			proof: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;			let sender = ensure_signed(origin)?;&#xD;&#xA;&#xD;&#xA;			ensure!(Proofs::&lt;T&gt;::contains_key(&amp;proof), Error::&lt;T&gt;::NoSuchProof);&#xD;&#xA;&#xD;&#xA;			let (owner, _) = Proofs::&lt;T&gt;::get(&amp;proof);&#xD;&#xA;&#xD;&#xA;			ensure!(sender == owner, Error::&lt;T&gt;::NotProofOwner);&#xD;&#xA;&#xD;&#xA;			Proofs::&lt;T&gt;::remove(&amp;proof);&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ClaimRevoked(sender, proof));&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Error:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling pallet-template v4.0.0-dev &#xD;&#xA;  error[E0433]: failed to resolve: use of undeclared crate or module `sp_std`&#xD;&#xA;    |&#xD;&#xA;  7 |     use sp_std::vec::Vec;&#xD;&#xA;    |         ^^^^^^ use of undeclared crate or module `sp_std`&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated struct `pallet::_::Store`: &#xD;&#xA;                   Use of `#[pallet::generate_store(pub(super) trait Store)]` will be removed after July 2023.&#xD;&#xA;                   Check https://github.com/paritytech/substrate/pull/13535 for more details.&#xD;&#xA;     |&#xD;&#xA;  32 |     #[pallet::generate_store(pub(super) trait Store)]&#xD;&#xA;     |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: `#[warn(deprecated)]` on by default&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ImplicitCallIndex_0::_w`: &#xD;&#xA;                   It is deprecated to use implicit call indices.&#xD;&#xA;                   Please instead ensure that all calls have a `pallet::call_index` attribute or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/12891&gt;&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/11381&gt;&#xD;&#xA;     |&#xD;&#xA;  53 |         pub fn create_claim(&#xD;&#xA;     |                ^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ImplicitCallIndex_1::_w`: &#xD;&#xA;                   It is deprecated to use implicit call indices.&#xD;&#xA;                   Please instead ensure that all calls have a `pallet::call_index` attribute or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/12891&gt;&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/11381&gt;&#xD;&#xA;     |&#xD;&#xA;  78 |         pub fn revoke_claim(&#xD;&#xA;     |                ^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`: &#xD;&#xA;                   It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                   Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;     |&#xD;&#xA;  52 |         #[pallet::weight(1_000)] &#xD;&#xA;     |                          ^^^^^&#xD;&#xA;&#xD;&#xA;  warning: use of deprecated constant `pallet::warnings::ConstantWeight_1::_w`: &#xD;&#xA;                   It is deprecated to use hard-coded constant as call weight.&#xD;&#xA;                   Please instead benchmark all calls or put the pallet into `dev` mode.&#xD;&#xA;           &#xD;&#xA;                   For more info see:&#xD;&#xA;                       &lt;https://github.com/paritytech/substrate/pull/13798&gt;&#xD;&#xA;     |&#xD;&#xA;  77 |         #[pallet::weight(10_000)]&#xD;&#xA;     |                          ^^^^^^&#xD;&#xA;&#xD;&#xA;  error[E0220]: associated type `BlockNumber` not found for `T`&#xD;&#xA;     |&#xD;&#xA;  41 |         (T::AccountId, T::BlockNumber),&#xD;&#xA;     |                           ^^^^^^^^^^^ there is an associated type `BlockNumber` in the trait `BlockNumberProvider`&#xD;&#xA;     |&#xD;&#xA;  help: consider further restricting this bound&#xD;&#xA;     |&#xD;&#xA;  37 |     pub type Proofs&lt;T: Config + BlockNumberProvider&gt; = StorageMap&lt;&#xD;&#xA;     |                               +++++++++++++++++++++&#xD;&#xA;&#xD;&#xA;  error[E0220]: associated type `BlockNumber` not found for `T`&#xD;&#xA;     |&#xD;&#xA;  41 |         (T::AccountId, T::BlockNumber),&#xD;&#xA;     |                           ^^^^^^^^^^^ there is an associated type `BlockNumber` in the trait `BlockNumberProvider`&#xD;&#xA;     |&#xD;&#xA;  help: consider further restricting this bound&#xD;&#xA;     |&#xD;&#xA;  35 |     #[pallet::storage + BlockNumberProvider]&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43571" PostHistoryTypeId="2" PostId="10919" RevisionGUID="f307b377-5afc-44fd-aa01-b88d1c292d54" CreationDate="2024-01-30T10:56:28.453" UserId="251" Text="Follow the https://github.com/substrate-developer-hub/substrate-node-template/blob/41ad4a6c9d712ac4b6e16e79a8b3837af8234f46/pallets/template/src/lib.rs to update your code.&#xD;&#xA;&#xD;&#xA;It seems you're updating Substrate from a pretty old version. There have been numerous syntax changes." ContentLicense="CC BY-SA 4.0" />
  <row Id="43573" PostHistoryTypeId="5" PostId="10901" RevisionGUID="01a73290-7938-4a02-8c8a-8a86f394d23e" CreationDate="2024-01-30T12:45:57.803" UserId="2089" Comment="added 1 character in body" Text="**Free Funds**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.query.system.account(accountAddress);&#xD;&#xA;```&#xD;&#xA;`free` depicts the free funds.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**Bonded Funds**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;api.query.nominationPools.poolMembers&#xD;&#xA;```&#xD;&#xA;`points` depicts the bonded funds. &#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Can test it out at the [polkadot js developer dashboard][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/YDUOh.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/ZYt4H.png&#xD;&#xA;  [3]: https://polkadot.js.org/apps" ContentLicense="CC BY-SA 4.0" />
  <row Id="43579" PostHistoryTypeId="2" PostId="10921" RevisionGUID="c3eaa930-1f3b-4803-9f21-4956e56635b2" CreationDate="2024-01-30T15:35:31.150" UserId="1870" Text="Is it possible to access a protected API from an off-chain worker, e.g. using an API Key? Hard coding the API Key would be possible, but that's obviously a security risk. Is there a safe mechanism to share this kind of sensitive information with the off-chain worker? The only related information I've found is [this][1] but it looks like no solution was found.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/issues/6512" ContentLicense="CC BY-SA 4.0" />
  <row Id="43581" PostHistoryTypeId="1" PostId="10921" RevisionGUID="c3eaa930-1f3b-4803-9f21-4956e56635b2" CreationDate="2024-01-30T15:35:31.150" UserId="1870" Text="Access protected API from off-chain worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="43582" PostHistoryTypeId="3" PostId="10921" RevisionGUID="c3eaa930-1f3b-4803-9f21-4956e56635b2" CreationDate="2024-01-30T15:35:31.150" UserId="1870" Text="|offchain-worker|security|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43583" PostHistoryTypeId="2" PostId="10922" RevisionGUID="628942fa-a13e-40af-8ab1-44d4feca1778" CreationDate="2024-01-30T19:48:08.727" UserId="3538" Text="The [examples](https://github.com/paritytech/substrate/blob/master/frame/examples/offchain-worker/src/lib.rs#L99) in substrate use the `sr25519` AccountId and `Multisignature` for creating offchain workers with signed transactions. Is there a way to use `AccountId20` and `EthereumSignature` for a node using unified accounts? &#xD;&#xA;&#xD;&#xA;I've tried this: &#xD;&#xA;```&#xD;&#xA;use fp_account::{EthereumSigner, EthereumSignature};&#xD;&#xA;impl frame_system::offchain::AppCrypto&lt;EthereumSigner, EthereumSignature&gt; for TestAuthId {&#xD;&#xA;        type RuntimeAppPublic = Public;&#xD;&#xA;        type GenericPublic = sp_core::ecdsa::Public;&#xD;&#xA;        type GenericSignature = sp_core::ecdsa::Signature;&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;// Implemented for mock runtime in tests&#xD;&#xA;impl frame_system::offchain::AppCrypto&lt;&lt;EcdsaSignature as Verify&gt;::Signer, EcdsaSignature&gt;&#xD;&#xA;    for TestAuthId&#xD;&#xA;    {&#xD;&#xA;        type RuntimeAppPublic = Public;&#xD;&#xA;        type GenericPublic = ecdsa::Public;&#xD;&#xA;        type GenericSignature = ecdsa::Signature;&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I'm getting these errors:&#xD;&#xA;```&#xD;&#xA; error[E0277]: the trait bound `sp_core::ecdsa::Public: From&lt;EthereumSigner&gt;` is not satisfied&#xD;&#xA;     --&gt; &lt;pallet&gt;/src/lib.rs:29:30&#xD;&#xA;      |&#xD;&#xA;  29  |         type GenericPublic = sp_core::ecdsa::Public;&#xD;&#xA;      |                              ^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;EthereumSigner&gt;` is not implemented for `sp_core::ecdsa::Public`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `From&lt;T&gt;`:&#xD;&#xA;                &lt;sp_core::ecdsa::Public as From&lt;crypto::Public&gt;&gt;&#xD;&#xA;                &lt;sp_core::ecdsa::Public as From&lt;sp_runtime::sp_application_crypto::ecdsa::AppPublic&gt;&gt;&#xD;&#xA;      = note: required for `EthereumSigner` to implement `Into&lt;sp_core::ecdsa::Public&gt;`&#xD;&#xA;      = note: required for `sp_core::ecdsa::Public` to implement `TryFrom&lt;EthereumSigner&gt;`&#xD;&#xA;  note: required by a bound in `frame_system::offchain::AppCrypto::GenericPublic`&#xD;&#xA;     --&gt; &lt;user&gt;/.cargo/git/checkouts/substrate-485ba5260f31c511/c0155a6/frame/system/src/offchain.rs:397:5&#xD;&#xA;      |&#xD;&#xA;  395 |     type GenericPublic: From&lt;Self::RuntimeAppPublic&gt;&#xD;&#xA;      |          ------------- required by a bound in this associated type&#xD;&#xA;  396 |         + Into&lt;Self::RuntimeAppPublic&gt;&#xD;&#xA;  397 |         + TryFrom&lt;Public&gt;&#xD;&#xA;      |           ^^^^^^^^^^^^^^^ required by this bound in `AppCrypto::GenericPublic`&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `EthereumSignature: From&lt;sp_core::ecdsa::Signature&gt;` is not satisfied&#xD;&#xA;     --&gt; &lt;pallet&gt;/src/lib.rs:30:33&#xD;&#xA;      |&#xD;&#xA;  30  |         type GenericSignature = sp_core::ecdsa::Signature;&#xD;&#xA;      |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;sp_core::ecdsa::Signature&gt;` is not implemented for `EthereumSignature`&#xD;&#xA;      |&#xD;&#xA;      = note: required for `sp_core::ecdsa::Signature` to implement `Into&lt;EthereumSignature&gt;`&#xD;&#xA;  note: required by a bound in `frame_system::offchain::AppCrypto::GenericSignature`&#xD;&#xA;     --&gt; &lt;user&gt;/.cargo/git/checkouts/substrate-485ba5260f31c511/c0155a6/frame/system/src/offchain.rs:404:5&#xD;&#xA;      |&#xD;&#xA;  401 |     type GenericSignature: From&lt;&lt;Self::RuntimeAppPublic as RuntimeAppPublic&gt;::Signature&gt;&#xD;&#xA;      |          ---------------- required by a bound in this associated type&#xD;&#xA;  ...&#xD;&#xA;  404 |         + Into&lt;Signature&gt;;&#xD;&#xA;      |           ^^^^^^^^^^^^^^^ required by this bound in `AppCrypto::GenericSignature`&#xD;&#xA;&#xD;&#xA;  error[E0277]: the trait bound `sp_core::ecdsa::Signature: From&lt;EthereumSignature&gt;` is not satisfied&#xD;&#xA;     --&gt; &lt;pallet&gt;/src/lib.rs:30:33&#xD;&#xA;      |&#xD;&#xA;  30  |         type GenericSignature = sp_core::ecdsa::Signature;&#xD;&#xA;      |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From&lt;EthereumSignature&gt;` is not implemented for `sp_core::ecdsa::Signature`&#xD;&#xA;      |&#xD;&#xA;      = help: the following other types implement trait `From&lt;T&gt;`:&#xD;&#xA;                &lt;sp_core::ecdsa::Signature as From&lt;crypto::Signature&gt;&gt;&#xD;&#xA;                &lt;sp_core::ecdsa::Signature as From&lt;sp_runtime::sp_application_crypto::ecdsa::AppSignature&gt;&gt;&#xD;&#xA;      = note: required for `EthereumSignature` to implement `Into&lt;sp_core::ecdsa::Signature&gt;`&#xD;&#xA;      = note: required for `sp_core::ecdsa::Signature` to implement `TryFrom&lt;EthereumSignature&gt;`&#xD;&#xA;  note: required by a bound in `frame_system::offchain::AppCrypto::GenericSignature`&#xD;&#xA;     --&gt; &lt;user&gt;/.cargo/git/checkouts/substrate-485ba5260f31c511/c0155a6/frame/system/src/offchain.rs:403:5&#xD;&#xA;      |&#xD;&#xA;  401 |     type GenericSignature: From&lt;&lt;Self::RuntimeAppPublic as RuntimeAppPublic&gt;::Signature&gt;&#xD;&#xA;      |          ---------------- required by a bound in this associated type&#xD;&#xA;  402 |         + Into&lt;&lt;Self::RuntimeAppPublic as RuntimeAppPublic&gt;::Signature&gt;&#xD;&#xA;  403 |         + TryFrom&lt;Signature&gt;&#xD;&#xA;      |           ^^^^^^^^^^^^^^^^^^ required by this bound in `AppCrypto::GenericSignature`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43585" PostHistoryTypeId="1" PostId="10922" RevisionGUID="628942fa-a13e-40af-8ab1-44d4feca1778" CreationDate="2024-01-30T19:48:08.727" UserId="3538" Text="Set Off-chain worker with AccountId20" ContentLicense="CC BY-SA 4.0" />
  <row Id="43586" PostHistoryTypeId="3" PostId="10922" RevisionGUID="628942fa-a13e-40af-8ab1-44d4feca1778" CreationDate="2024-01-30T19:48:08.727" UserId="3538" Text="|substrate-node|account|offchain-worker|ethereum|accountid|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43587" PostHistoryTypeId="2" PostId="10923" RevisionGUID="7a39adfc-8679-473e-b4ed-d7bb9875c1e2" CreationDate="2024-01-31T06:18:17.617" UserId="5110" Text="I have created a custom chain using Substrate version `0.9.36`, and I've been using the governance module. When adding a proposal, there's a default column for external links set to &quot;none.&quot; I would like to know how I can add my own external links. It would be very helpful if you could provide an example of how to include an external link.&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ca7Sd.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43589" PostHistoryTypeId="1" PostId="10923" RevisionGUID="7a39adfc-8679-473e-b4ed-d7bb9875c1e2" CreationDate="2024-01-31T06:18:17.617" UserId="5110" Text="how can we add external links on the proposal?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43590" PostHistoryTypeId="3" PostId="10923" RevisionGUID="7a39adfc-8679-473e-b4ed-d7bb9875c1e2" CreationDate="2024-01-31T06:18:17.617" UserId="5110" Text="|polkadot-js|polkadot|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43592" PostHistoryTypeId="2" PostId="10924" RevisionGUID="ab5494ef-592f-4597-82d0-74c55c33ace0" CreationDate="2024-01-31T11:34:06.247" UserId="555" Text="Will transactions executed within the on_finalised function inside the hook undergo validation by the validators?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43594" PostHistoryTypeId="1" PostId="10924" RevisionGUID="ab5494ef-592f-4597-82d0-74c55c33ace0" CreationDate="2024-01-31T11:34:06.247" UserId="555" Text="Validation of Transactions Executed in on_finalised Function within the Hook" ContentLicense="CC BY-SA 4.0" />
  <row Id="43595" PostHistoryTypeId="3" PostId="10924" RevisionGUID="ab5494ef-592f-4597-82d0-74c55c33ace0" CreationDate="2024-01-31T11:34:06.247" UserId="555" Text="|transactions|validator|finality|hook|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43596" PostHistoryTypeId="2" PostId="10925" RevisionGUID="9b708477-4cf3-485e-8f54-905c90a42abb" CreationDate="2024-01-31T13:09:09.343" UserId="94" Text="You mean `on_finalize`? There are no transactions executed in that.  &#xD;&#xA;It is called by the block author to finalize the built block.&#xD;&#xA;&#xD;&#xA;But all state changes that happen in there are guarded by consensus and are thereby validated. Hope that answers your question." ContentLicense="CC BY-SA 4.0" />
  <row Id="43598" PostHistoryTypeId="2" PostId="10926" RevisionGUID="5b7d4d2f-61e9-4372-9ad6-39252da33a64" CreationDate="2024-01-31T14:37:02.470" UserId="2163" Text="I am interested in developing a pallet into which data from another parachain can be fed. For instance, consider two parachains: Para A and Para B. Para B implements the collectives pallet, and for the purpose of this example, let's assume that the members of this collective are fixed and do not change.&#xD;&#xA;&#xD;&#xA;Let's say I want to add a pallet on Para A that would need to know the members of the collective from Para A. Would it be a feasible solution to create an extrinsic that would allow anyone to 'feed' this data into the pallet by providing a merkle proof such that Para A is able to verify the validity of the information by comparing it against Para B's state root which is read from the relay chain(via [RelayChainInterface](https://github.com/paritytech/cumulus/blob/d4bb2215bb28ee05159c4c7df1b3435177b5bf4e/client/relay-chain-interface/src/lib.rs#L100))?&#xD;&#xA;&#xD;&#xA;Does this approach make sense, and has anyone already implemented something similar?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43600" PostHistoryTypeId="1" PostId="10926" RevisionGUID="5b7d4d2f-61e9-4372-9ad6-39252da33a64" CreationDate="2024-01-31T14:37:02.470" UserId="2163" Text="Feeding state from one parachain to another" ContentLicense="CC BY-SA 4.0" />
  <row Id="43601" PostHistoryTypeId="3" PostId="10926" RevisionGUID="5b7d4d2f-61e9-4372-9ad6-39252da33a64" CreationDate="2024-01-31T14:37:02.470" UserId="2163" Text="|storage|cumulus|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43602" PostHistoryTypeId="2" PostId="10927" RevisionGUID="6cbbfc39-4c40-4cae-8264-7b63c0c1bc3a" CreationDate="2024-01-31T17:22:35.270" UserId="5089" Text="I am pretty new to Substrate and wonder if we can communicate with ink! smart contracts via established libraries such as *web3.js* or *ethers.js*? Is the underlying RPC-based communication the same? " ContentLicense="CC BY-SA 4.0" />
  <row Id="43604" PostHistoryTypeId="1" PostId="10927" RevisionGUID="6cbbfc39-4c40-4cae-8264-7b63c0c1bc3a" CreationDate="2024-01-31T17:22:35.270" UserId="5089" Text="Are web3.js &amp; ethers.js compatible with ink! smart contracts?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43605" PostHistoryTypeId="3" PostId="10927" RevisionGUID="6cbbfc39-4c40-4cae-8264-7b63c0c1bc3a" CreationDate="2024-01-31T17:22:35.270" UserId="5089" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43606" PostHistoryTypeId="2" PostId="10928" RevisionGUID="6a752472-515e-4621-9dce-b248c238cade" CreationDate="2024-01-31T19:26:39.677" UserId="162" Text="I've checked this document, and the commands work. However, is it possible to do the xcm_send but not from the sudo users? &#xD;&#xA;&#xD;&#xA;https://docs.substrate.io/tutorials/build-a-parachain/transfer-assets-with-xcm/" ContentLicense="CC BY-SA 4.0" />
  <row Id="43608" PostHistoryTypeId="1" PostId="10928" RevisionGUID="6a752472-515e-4621-9dce-b248c238cade" CreationDate="2024-01-31T19:26:39.677" UserId="162" Text="XCM send Example Without Sudo Call" ContentLicense="CC BY-SA 4.0" />
  <row Id="43609" PostHistoryTypeId="3" PostId="10928" RevisionGUID="6a752472-515e-4621-9dce-b248c238cade" CreationDate="2024-01-31T19:26:39.677" UserId="162" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43610" PostHistoryTypeId="52" PostId="10924" RevisionGUID="3efdc9e1-da81-4871-b650-df0041516cf0" CreationDate="2024-01-31T19:35:00.497" />
  <row Id="43611" PostHistoryTypeId="4" PostId="10905" RevisionGUID="05da496c-5e60-4404-80e6-e76f21288dc0" CreationDate="2024-02-01T04:36:20.917" UserId="3538" Comment="Corrected Spelling" Text="How should I add offchain worker(OCW) in frontier when using AccountId20?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43612" PostHistoryTypeId="24" PostId="10905" RevisionGUID="05da496c-5e60-4404-80e6-e76f21288dc0" CreationDate="2024-02-01T04:36:20.917" Comment="Proposed by 3538 approved by -1 edit id of 631" ContentLicense="CC BY-SA 4.0" />
  <row Id="43613" PostHistoryTypeId="5" PostId="10905" RevisionGUID="6ae8ecc4-8fa1-4b12-880b-b4634c2a1ecf" CreationDate="2024-02-01T04:36:20.917" UserId="116" Comment="Corrected Spelling and removed shouting" Text="In order to add an offchain worker with using `AccountId20` as the runtime account type I did following things.&#xD;&#xA;&#xD;&#xA; 1. add associated type `type AuthorityId: AppCrypto&lt;Self::Public, Self::Signature&gt;;` in the config traitof an OCW pallet, and add traitbond `CreateSignedTransaction&lt;Call&lt;Self&gt;&gt;` to the config.&#xD;&#xA; 2. Implement `CreateSignedTransaction&lt;LocalCall&gt;` for Runtime like [the substrate offchain worker tutorial][1] says.&#xD;&#xA; 3. create a `crypto` module, and rewrite the sign and verify method (where I used `sp_io::crypto::ecdsa_sign`):&#xD;&#xA;&#xD;&#xA;        pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b&quot;demo&quot;);&#xD;&#xA;	    pub mod crypto {&#xD;&#xA;		    use super::KEY_TYPE;&#xD;&#xA;		    use sp_runtime::traits::Verify;&#xD;&#xA;		    use sp_runtime::{&#xD;&#xA;			    app_crypto::{app_crypto, ecdsa},&#xD;&#xA;		    };&#xD;&#xA;		    use fp_account::{&#xD;&#xA;			    EthereumSignature, EthereumSigner&#xD;&#xA;		    };&#xD;&#xA;		    use sp_io::crypto::ecdsa_sign;&#xD;&#xA;		    use sp_io::hashing::keccak_256;&#xD;&#xA;		    use fp_account::AccountId20;&#xD;&#xA;		    app_crypto!(ecdsa, KEY_TYPE);&#xD;&#xA;&#xD;&#xA;		    impl frame_system::offchain::AppCrypto&lt;EthereumSigner, EthereumSignature&gt; for TestAuthId {&#xD;&#xA;			    type RuntimeAppPublic = Public; &#xD;&#xA;			    type GenericSignature = ecdsa::Signature; //struct Signature(pub [u8; 65]);&#xD;&#xA;			    type GenericPublic = ecdsa::Public;       //struct Public(pub [u8; 32]) &#xD;&#xA;&#xD;&#xA;			    fn sign(payload: &amp;[u8], public: EthereumSigner) -&gt; Option&lt;EthereumSignature&gt; { &#xD;&#xA;				    let m = keccak_256(payload);&#xD;&#xA;				    let ECDSAPublic: ecdsa::Public = public.into(); // compressed one&#xD;&#xA;				    match ecdsa_sign(KEY_TYPE, &amp;ECDSAPublic, &amp;m) {&#xD;&#xA;					    None =&gt; return None,&#xD;&#xA;					    Some(e) =&gt; {&#xD;&#xA;						    log::info!(&quot;[{:?}]: singature.&quot;, &amp;e);&#xD;&#xA;						    return Some(e.into())&#xD;&#xA;					    }&#xD;&#xA;				    }&#xD;&#xA;			    }&#xD;&#xA;			&#xD;&#xA;			    fn verify(payload: &amp;[u8], public: EthereumSigner, signature: EthereumSignature) -&gt; bool { &#xD;&#xA;				    let accountId: &amp;AccountId20 = &amp;public.into();&#xD;&#xA;				    let result = signature.verify(payload, accountId);&#xD;&#xA;				    log::info!(&quot;[{:?}]: verify result.&quot;, &amp;result);&#xD;&#xA;				    result&#xD;&#xA;			    }&#xD;&#xA;		    }&#xD;&#xA;&#xD;&#xA;	    }&#xD;&#xA;&#xD;&#xA;Turns out I've got Badproof error: `(offchain call) Error submitting a transaction to the pool: Transaction pool error: Invalid transaction validity: InvalidTransaction::BadProof` from checking the transaction. The error is caused by that the `verify` method of `EthereumSignature` from trait `sp_runtime::traits::Verify` returns false:&#xD;&#xA;&#xD;&#xA;    	fn verify&lt;L: sp_runtime::traits::Lazy&lt;[u8]&gt;&gt;(&amp;self, mut msg: L, signer: &amp;AccountId20) -&gt; bool {&#xD;&#xA;		&#xD;&#xA;		    let m = keccak_256(msg.get());&#xD;&#xA;		    log::info!(&quot;[{:?}]: failed to verify0, signature&quot;, self.0);&#xD;&#xA;		&#xD;&#xA;		    match sp_io::crypto::secp256k1_ecdsa_recover(self.0.as_ref(), &amp;m) {&#xD;&#xA;			    Ok(pubkey) =&gt; { &#xD;&#xA;                    // return false&#xD;&#xA;				    AccountId20(H160::from(H256::from(keccak_256(&amp;pubkey))).0)==*signer&#xD;&#xA;			    },&#xD;&#xA;			    ...&#xD;&#xA;		    }&#xD;&#xA;	    }&#xD;&#xA;I guess my assumption that `sp_io::crypto::secp256k1_ecdsa_recover` is the reverse of `sp_io::crypto::ecdsa_sign` was wrong, or did I do something else wrong?&#xD;&#xA;&#xD;&#xA;**And what is the correct way to add an offchain worker in Frontier with `AccountId20`?**&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/tutorials/build-application-logic/add-offchain-workers/" ContentLicense="CC BY-SA 4.0" />
  <row Id="43614" PostHistoryTypeId="5" PostId="8096" RevisionGUID="ebeff898-de48-455b-b361-b0b509e750a7" CreationDate="2024-02-01T04:41:37.583" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="I want to use orml-traits in substrate project. I'm using this [substrate repository][1]&#xD;&#xA;&#xD;&#xA;and also I cloned this repo for using `orml` project in local:[orml Repository][2]&#xD;&#xA;&#xD;&#xA;I changed some crates in `orml-traits` `Cargo.toml` : &#xD;&#xA;&#xD;&#xA;I added these files into the `orml-traits Cargo.toml` instead of previous: &#xD;&#xA;&#xD;&#xA;        frame-support = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../frame/support&quot; }&#xD;&#xA;    frame-system = { version = &quot;4.0.0-dev&quot;, default-features = false, path = &quot;../frame/system&quot; }&#xD;&#xA;    sp-io = { version = &quot;7.0.0&quot;, default-features = false, path = &quot;../../primitives/io&quot; }&#xD;&#xA;    sp-runtime = { version = &quot;7.0.0&quot;, default-features = false, path = &quot;../primitives//runtime&quot; }&#xD;&#xA;    sp-std = { version = &quot;5.0.0&quot;, default-features = false, path = &quot;../primitives/std&quot; }&#xD;&#xA;&#xD;&#xA;and use the `orml-traits` in pallet:&#xD;&#xA;&#xD;&#xA;    orml-traits = { path=&quot;../../../orlem/traits&quot;, default-features = false, version = &quot;0.4.1-dev&quot; }&#xD;&#xA;&#xD;&#xA;When I run `cargo check` everything is ok and it doesn't show me any errors, but when I run `cargo build --release` it show me this error: &#xD;&#xA;&#xD;&#xA;     = note: /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.15.rcgu.o): in function `wasm_to_host_trampoline':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.15:(.text+0x0): multiple definition of `wasm_to_host_trampoline'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.4.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.4:(.text+0x0): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.15.rcgu.o): in function `host_to_wasm_trampoline':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.15:(.text+0x20): multiple definition of `host_to_wasm_trampoline'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.4.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.4:(.text+0x20): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.2.rcgu.o): in function `resolve_vmctx_memory':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.2:(.text.resolve_vmctx_memory+0x0): multiple definition of `resolve_vmctx_memory'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.12.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.12:(.text.resolve_vmctx_memory+0x0): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.2.rcgu.o): in function `resolve_vmctx_memory_ptr':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.2:(.text.resolve_vmctx_memory_ptr+0x0): multiple definition of `resolve_vmctx_memory_ptr'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.12.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.12:(.text.resolve_vmctx_memory_ptr+0x0): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.2.rcgu.o): in function `set_vmctx_memory':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.2:(.text.set_vmctx_memory+0x0): multiple definition of `set_vmctx_memory'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.12.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.12:(.text.set_vmctx_memory+0x0): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.4.rcgu.o): in function `memory32_grow':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.4:(.text+0x0): multiple definition of `memory32_grow'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.11.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.11:(.text+0x0): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.4.rcgu.o): in function `table_copy':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.4:(.text+0x20): multiple definition of `table_copy'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.11.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.11:(.text+0x20): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.4.rcgu.o): in function `table_init':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.4:(.text+0x40): multiple definition of `table_init'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.11.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.11:(.text+0x40): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.4.rcgu.o): in function `elem_drop':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.4:(.text+0x60): multiple definition of `elem_drop'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eba4c0e3-cgu.11.rcgu.o):wasmtime_runtime.eba4c0e3-cgu.11:(.text+0x60): first defined here&#xD;&#xA;          /usr/bin/ld: /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-78ebbc493a85468a.rlib(wasmtime_runtime-78ebbc493a85468a.wasmtime_runtime.e9463095-cgu.4.rcgu.o): in function `memory_copy':&#xD;&#xA;          wasmtime_runtime.e9463095-cgu.4:(.text+0x80): multiple definition of `memory_copy'; /home/kianoush/projects/music-chain/target/release/deps/libwasmtime_runtime-869794614aaf5f6d.rlib(wasmtime_runtime-869794614aaf5f6d.wasmtime_runtime.eb&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    error: could not compile `node-cli` due to previous error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate&#xD;&#xA;  [2]: https://github.com/open-web3-stack/open-runtime-module-library&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43615" PostHistoryTypeId="4" PostId="8096" RevisionGUID="ebeff898-de48-455b-b361-b0b509e750a7" CreationDate="2024-02-01T04:41:37.583" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="Linking with `cc` failed: exit status: 1" ContentLicense="CC BY-SA 4.0" />
  <row Id="43616" PostHistoryTypeId="5" PostId="8798" RevisionGUID="11e39104-6ce4-429e-b374-ec9a2eea5626" CreationDate="2024-02-01T05:38:36.200" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="Thank you to the community who initially answered my question [here](https://substrate.stackexchange.com/questions/8789/westend-westmint-difficulty-in-minting-a-fungible-asset-in-westmint)&#xD;&#xA;&#xD;&#xA;So this is where I'm at, I have 52 $WND tokens in Westend:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But the minting center for NFTs is at Westmint, which is sitting on Westend relay chain.&#xD;&#xA;So ofc, I go to Westmint. But I go there and I see I have no $WND tokens, which is what's needed to pay my custom NFT Fungible asset.&#xD;&#xA;&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/E6jiO.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/7cPWK.png&#xD;&#xA;&#xD;&#xA;So, again, I'm stuck and faced with impediment. &#xD;&#xA;&#xD;&#xA;Can you please help me how to resolve this? What step am I missing?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43617" PostHistoryTypeId="5" PostId="8802" RevisionGUID="8cdf50fa-0410-4030-aa97-9c603b396ac9" CreationDate="2024-02-01T05:39:59.233" UserId="116" Comment="url link" Text="There **used to** be a **teleport** item in the menu under `Accounts` or `Network` if I recall but I see this is no longer there. But worry not, there is a way :)&#xD;&#xA;&#xD;&#xA;You will need to craft an extrinsic from the `Developer`/`Extrinsics` Menu.&#xD;&#xA;&#xD;&#xA;To get start started, I created a [template transaction for you](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwestend-rpc.polkadot.io#/extrinsics/decode/0x630103000100a10f030001010096d522d22a25ff4b30146d13e274a6c940be96f191e3e13b524d9040c6bdd4190304000000000b00a0724e180900000000)&#xD;&#xA;&#xD;&#xA;Clicking on that link will open PolkadotJS and show you a transaction you can edit as shown below:&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;First click the `Submission` button/tab so you can edit the tx:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;&#xD;&#xA;Make sure to send the tx from an account of yours that has enough funds.&#xD;&#xA;Here is a screenshot of the XCM call, it shows the relevant information:&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA;&#xD;&#xA;Here are a few caveats:&#xD;&#xA;- select an account of yours&#xD;&#xA;- your account should have enough funds&#xD;&#xA;- provide the right parachain ID, westmint is `1000`&#xD;&#xA;- the fungible amount is in units, so 10 WND = 10_000_000_000_000 (+ 12 zeroes)&#xD;&#xA;- make sure the `feeAssetItem` is `0`&#xD;&#xA;&#xD;&#xA;Note that upon transaction success, you will need to wait a few more seconds (usually less than 12s) on the parachain for your WND to show up on Westmint.&#xD;&#xA;&#xD;&#xA;See you on the other side :) and have fun.&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/vKuv6.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/El2rs.png&#xD;&#xA;  [3]: https://i.stack.imgur.com/1TwCN.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43618" PostHistoryTypeId="2" PostId="10929" RevisionGUID="c57444bd-3405-405b-ac8e-747bf827780b" CreationDate="2024-02-01T05:48:27.973" UserId="116" Text="You should not add subxt to your chain build, subxt is designed to connect to your chain using rpc. Create a tool to submit extrinsics and read state from the chain like polkadot-js does but from rust code." ContentLicense="CC BY-SA 4.0" />
  <row Id="43620" PostHistoryTypeId="2" PostId="10930" RevisionGUID="4b94495f-bbcc-44f3-96f5-6b57bc7da973" CreationDate="2024-02-01T06:55:15.243" UserId="3437" Text="I have a Rust application, which is using Subxt library to connect with a running node and submitting the transaction. This application is running on 3 different instances.&#xD;&#xA;&#xD;&#xA;I need to perform a runtime upgrade on my chain. &#xD;&#xA;&#xD;&#xA;Do I need to regenerate the metadata of the target Substrate node after upgrade? If yes, should I replace metadata file with newly generated metadata on every instances?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Or&#xD;&#xA;&#xD;&#xA;Its not needed?&#xD;&#xA;&#xD;&#xA;Can someone please help me to provide the answer?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43622" PostHistoryTypeId="1" PostId="10930" RevisionGUID="4b94495f-bbcc-44f3-96f5-6b57bc7da973" CreationDate="2024-02-01T06:55:15.243" UserId="3437" Text="Do we need to regenerate subxt metadata after upgrading substrate node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43623" PostHistoryTypeId="3" PostId="10930" RevisionGUID="4b94495f-bbcc-44f3-96f5-6b57bc7da973" CreationDate="2024-02-01T06:55:15.243" UserId="3437" Text="|substrate-node-template|subxt|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43624" PostHistoryTypeId="2" PostId="10931" RevisionGUID="62ab0885-5f32-40fe-8b22-fdf6a13aa3cb" CreationDate="2024-02-01T10:14:33.280" UserId="309" Text="I have a pallet using the `propose` extrinsic of the collective pallet. one of the parameter of this extrinsic is `length_bound` which I define as follows:&#xD;&#xA;&#xD;&#xA;    let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;&#xD;&#xA;This works implementation works fine when testing the pallet in polkadot.js, but when writing tests for my pallet, I get a `WrongProposalWeight` error for the `length_bound` parameter.&#xD;&#xA;I tried to increase the size of the parameterlike this:&#xD;&#xA;&#xD;&#xA;    let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32).saturating_mul(2);&#xD;&#xA;&#xD;&#xA;but the error persist. Any idea on how to solve this issue?&#xD;&#xA;&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="43626" PostHistoryTypeId="1" PostId="10931" RevisionGUID="62ab0885-5f32-40fe-8b22-fdf6a13aa3cb" CreationDate="2024-02-01T10:14:33.280" UserId="309" Text="Wrong Proposal Weight in collective pallet tests" ContentLicense="CC BY-SA 4.0" />
  <row Id="43627" PostHistoryTypeId="3" PostId="10931" RevisionGUID="62ab0885-5f32-40fe-8b22-fdf6a13aa3cb" CreationDate="2024-02-01T10:14:33.280" UserId="309" Text="|substrate-node|weight|testing|pallet-collective|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43628" PostHistoryTypeId="2" PostId="10932" RevisionGUID="2925682b-3add-4294-98d7-c68462d88a52" CreationDate="2024-02-01T10:23:19.093" UserId="251" Text="Certainly, you should if you're using static mode.&#xD;&#xA;&#xD;&#xA;Alternatively, utilize subxt's dynamic module; however, a reconnection is still required if your subxt application detects any runtime upgrades.&#xD;&#xA;&#xD;&#xA;For instance, failing to do so could result in an outdated pallet list after a runtime upgrade. Consequently, your call index might become invalid." ContentLicense="CC BY-SA 4.0" />
  <row Id="43630" PostHistoryTypeId="5" PostId="10931" RevisionGUID="42e42044-8279-409e-9f35-05fb0cf714af" CreationDate="2024-02-01T10:30:52.617" UserId="309" Comment="deleted 6 characters in body" Text="I have a pallet using the `propose` extrinsic of the collective pallet. one of the parameter of this extrinsic is `length_bound` which I define as follows:&#xD;&#xA;&#xD;&#xA;    let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;&#xD;&#xA;This implementation works fine when testing the pallet in polkadot.js, but when writing tests for my pallet, I get a `WrongProposalWeight` error for the `length_bound` parameter.&#xD;&#xA;I tried to increase the size of the parameter like this:&#xD;&#xA;&#xD;&#xA;    let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32).saturating_mul(2);&#xD;&#xA;&#xD;&#xA;but the error persist. Any idea on how to solve this issue?&#xD;&#xA;&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="43631" PostHistoryTypeId="5" PostId="10931" RevisionGUID="59c8b4e8-3b67-4060-a2ee-5628d5d0076a" CreationDate="2024-02-01T11:36:14.833" UserId="309" Comment="added 1647 characters in body" Text="I have a pallet using the `propose` extrinsic of the collective pallet. one of the parameter of this extrinsic is `length_bound` which I define as follows:&#xD;&#xA;&#xD;&#xA;    let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;&#xD;&#xA;This implementation works fine when testing the pallet in polkadot.js, but when writing tests for my pallet, I get a `WrongProposalWeight` error for the `length_bound` parameter.&#xD;&#xA;I tried to increase the size of the parameter like this:&#xD;&#xA;&#xD;&#xA;    let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32).saturating_mul(2);&#xD;&#xA;&#xD;&#xA;but the error persist. Any idea on how to solve this issue?&#xD;&#xA;&#xD;&#xA;**Edit**&#xD;&#xA;&#xD;&#xA;Below is the full code for the function using the collective_pallet `propose` extrinsic:&#xD;&#xA;&#xD;&#xA;    pub fn start_council_session(account: T::AccountId,account_type: Accounts) -&gt; DispatchResultWithPostInfo{&#xD;&#xA;		//Create proposal&#xD;&#xA;		let proposal0 = &#xD;&#xA;			Call::&lt;T&gt;::account_approval{&#xD;&#xA;				account: account.clone()&#xD;&#xA;			};&#xD;&#xA;		let proposal = Self::get_formatted_call(proposal0.into()).unwrap();&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		let _hash = T::Hashing::hash_of(&amp;proposal);&#xD;&#xA;&#xD;&#xA;		let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;		&#xD;&#xA;		let council_member = Coll::Pallet::&lt;T,Instance2&gt;::members()[0].clone();&#xD;&#xA;		let council_origin= Self::get_origin(council_member);&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;		//Start Collective refererendum&#xD;&#xA;		Coll::Pallet::&lt;T,Instance2&gt;::propose(&#xD;&#xA;			council_origin,&#xD;&#xA;			2,&#xD;&#xA;			Box::new(proposal.clone()),&#xD;&#xA;			proposal_len,&#xD;&#xA;		).ok();&#xD;&#xA;		let mut index:u32 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_count();&#xD;&#xA;		index = index.saturating_sub(1);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		//debug_assert!(Some(proposal.clone())==Coll::Pallet::&lt;T,Instance2&gt;::proposal_of(&amp;hash));&#xD;&#xA;&#xD;&#xA;		//Update proposal index and hash&#xD;&#xA;		let proposal_hashes =  Coll::Pallet::&lt;T,Instance2&gt;::proposals().into_iter();&#xD;&#xA;		for proposal_hash in proposal_hashes{&#xD;&#xA;			let prop0 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_of(proposal_hash.clone()).unwrap();&#xD;&#xA;			if proposal == prop0{&#xD;&#xA;				let mut proposal_all = Proposal::&lt;T&gt;::new(account.clone(), Some(account_type),proposal_hash.clone());&#xD;&#xA;				proposal_all.proposal_index = index;&#xD;&#xA;				proposal_all.proposal_hash = proposal_hash;&#xD;&#xA;				RequestedRoles::&lt;T&gt;::insert(&amp;account, proposal_all);&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		Ok(().into())&#xD;&#xA;	}&#xD;&#xA;***Error occurs only during testing***&#xD;&#xA;&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="43632" PostHistoryTypeId="2" PostId="10933" RevisionGUID="d6afe8b7-1ad2-4f82-84e2-dc1304eb1ab9" CreationDate="2024-02-01T13:09:02.697" UserId="458" Text="we're attempting to send unsigned transactions from an offchain worker using the validation code snippet provided:&#xD;&#xA;&#xD;&#xA;    ValidTransaction::with_tag_prefix(&quot;thea&quot;)&#xD;&#xA;    			.and_provides(signatures)&#xD;&#xA;    			.longevity(1)&#xD;&#xA;    			.propagate(true)&#xD;&#xA;    			.build()&#xD;&#xA;&#xD;&#xA;The goal is to have all 200 validators send one transaction each per block, resulting in 200 transactions per block. However, we're encountering a situation where transactions are being executed sequentially, with only 1-3 transactions processed per block.&#xD;&#xA;&#xD;&#xA;We're seeking assistance to identify if there's anything in the provided code or configuration that might be causing this sequential execution, and if any adjustments are needed to achieve the intended concurrent execution of all 200 transactions per block." ContentLicense="CC BY-SA 4.0" />
  <row Id="43634" PostHistoryTypeId="1" PostId="10933" RevisionGUID="d6afe8b7-1ad2-4f82-84e2-dc1304eb1ab9" CreationDate="2024-02-01T13:09:02.697" UserId="458" Text="Troubleshooting Sequential Unsigned Transaction Processing with 200 Validators" ContentLicense="CC BY-SA 4.0" />
  <row Id="43635" PostHistoryTypeId="3" PostId="10933" RevisionGUID="d6afe8b7-1ad2-4f82-84e2-dc1304eb1ab9" CreationDate="2024-02-01T13:09:02.697" UserId="458" Text="|substrate-node|offchain-worker|unsigned|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43636" PostHistoryTypeId="2" PostId="10934" RevisionGUID="ce2edd3d-2c4a-4525-b0b3-60e8fcbb7885" CreationDate="2024-02-01T13:12:18.893" UserId="555" Text="Is it possible to get the list of validators which validate a particular block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43638" PostHistoryTypeId="1" PostId="10934" RevisionGUID="ce2edd3d-2c4a-4525-b0b3-60e8fcbb7885" CreationDate="2024-02-01T13:12:18.893" UserId="555" Text="How to get the validators list?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43639" PostHistoryTypeId="3" PostId="10934" RevisionGUID="ce2edd3d-2c4a-4525-b0b3-60e8fcbb7885" CreationDate="2024-02-01T13:12:18.893" UserId="555" Text="|storage|validator|block|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43640" PostHistoryTypeId="2" PostId="10935" RevisionGUID="d5465043-a76a-4274-849a-d9d4f0ab3cf7" CreationDate="2024-02-01T13:55:17.130" UserId="5115" Text="Try:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;wsl --set-version Ubuntu 2&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43642" PostHistoryTypeId="5" PostId="10935" RevisionGUID="bc1d51e3-9467-41e9-b8b9-c211392ecaec" CreationDate="2024-02-01T13:55:58.300" UserId="5115" Comment="added 74 characters in body" Text="Try:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;wsl --set-version Ubuntu 2&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If you doubt you are on the right version, use:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;wsl -l -v&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43643" PostHistoryTypeId="2" PostId="10936" RevisionGUID="980874f2-b8f2-473c-aae6-da4680fcb256" CreationDate="2024-02-01T15:35:00.947" UserId="5023" Text="I don't think this is possible but is it?&#xD;&#xA;&#xD;&#xA;I have data that comes from an API that ultimately needs to be stored onchain which I don't want to risk having done through a `Pays::No` fn in case the call takes longer than the block. &#xD;&#xA;&#xD;&#xA;This seems like one of the only solutions I can find to do this; by creating logic that only specified stored accounts through a `Pays::No` fn can call on a per interim basis.&#xD;&#xA;&#xD;&#xA;But this solution can possibly take longer than the block time since it uses an API call.&#xD;&#xA;&#xD;&#xA;There a basically two ways I think I want to do this, either have a user who the blockchain knows who it is to make the http call (possible using Pays:No), or through finalize (same issue in case http takes too long), or have the offchain worker call it but this requires public functions.&#xD;&#xA;&#xD;&#xA;Is there any way to have a offchain worker store data without exposing the `Call` to the public?&#xD;&#xA;&#xD;&#xA;Or...Such as, storing the offchain API call in local storage, then allowing anyone to submit that data using an unsigned tx after a certain amount of time? But how safe is storing the data to local storage?&#xD;&#xA;&#xD;&#xA;How would you solve this" ContentLicense="CC BY-SA 4.0" />
  <row Id="43645" PostHistoryTypeId="1" PostId="10936" RevisionGUID="980874f2-b8f2-473c-aae6-da4680fcb256" CreationDate="2024-02-01T15:35:00.947" UserId="5023" Text="How to make a fn only callable by an offchain worker?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43646" PostHistoryTypeId="3" PostId="10936" RevisionGUID="980874f2-b8f2-473c-aae6-da4680fcb256" CreationDate="2024-02-01T15:35:00.947" UserId="5023" Text="|substrate-node-template|pallet|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43647" PostHistoryTypeId="5" PostId="10936" RevisionGUID="2dbb1d87-c113-4883-b140-8405f51dce89" CreationDate="2024-02-01T15:35:53.520" UserId="5023" Comment="added 2 characters in body" Text="I don't think this is possible but is it?&#xD;&#xA;&#xD;&#xA;I have data that comes from an API that ultimately needs to be stored onchain which I don't want to risk having done through a `Pays::No` fn in case the call takes longer than the block. &#xD;&#xA;&#xD;&#xA;This seems like one of the only solutions I can find to do this; by creating logic that only specified stored accounts through a `Pays::No` fn can call on a per interim basis.&#xD;&#xA;&#xD;&#xA;But this solution can possibly take longer than the block time since it uses an API call.&#xD;&#xA;&#xD;&#xA;There are basically two ways I think I want to do this, either have a user who the blockchain knows who it is to make the http call (possible using Pays:No), or through finalize (same issue in case http takes too long), or have the offchain worker call it but this requires public functions.&#xD;&#xA;&#xD;&#xA;Is there any way to have a offchain worker store data without exposing the `Call` to the public?&#xD;&#xA;&#xD;&#xA;Or...Such as, storing the offchain API call in local storage, then allowing anyone to submit that data using an unsigned tx after a certain amount of time? But how safe is storing the data to local storage?&#xD;&#xA;&#xD;&#xA;How would you solve this" ContentLicense="CC BY-SA 4.0" />
  <row Id="43648" PostHistoryTypeId="5" PostId="10936" RevisionGUID="deb63a5a-0e93-4f52-bc4a-ff85ad547a78" CreationDate="2024-02-01T15:36:25.903" UserId="5023" Comment="added 2 characters in body" Text="I don't think this is possible but is it?&#xD;&#xA;&#xD;&#xA;I have data that comes from an API that ultimately needs to be stored onchain which I don't want to risk having done through a `Pays::No` fn in case the call takes longer than the block. &#xD;&#xA;&#xD;&#xA;This seems like one of the only solutions I can find to do this; by creating logic that only specified stored accounts through a `Pays::No` fn can call on a per interim basis.&#xD;&#xA;&#xD;&#xA;But this solution can possibly take longer than the block time since it uses an API call.&#xD;&#xA;&#xD;&#xA;There are basically two ways I think I want to do this, either have a user who the blockchain knows who it is to make the http call (possible using Pays:No), or through initialize (same issue in case http takes too long), or have the offchain worker call it but this requires public functions.&#xD;&#xA;&#xD;&#xA;Is there any way to have a offchain worker store data without exposing the `Call` to the public?&#xD;&#xA;&#xD;&#xA;Or...Such as, storing the offchain API call in local storage, then allowing anyone to submit that data using an unsigned tx after a certain amount of time? But how safe is storing the data to local storage?&#xD;&#xA;&#xD;&#xA;How would you solve this" ContentLicense="CC BY-SA 4.0" />
  <row Id="43649" PostHistoryTypeId="2" PostId="10937" RevisionGUID="ac26423a-8f6d-49f7-aeb3-b97f9b87c470" CreationDate="2024-02-01T16:26:07.347" UserId="3991" Text="Transactions from offchain workers are treated no differently from transactions originating elsewhere.&#xD;&#xA;&#xD;&#xA;I suggest adjusting the assumptions you're making about your runtime architecture, so it's completely independent from offchain workers.&#xD;&#xA;&#xD;&#xA;If you want to get data fetched by an offchain worker onto your chain, a couple solutions could be&#xD;&#xA;- a permissioned system where some offchain worker origin/s are trusted and the only ones allowed to set that storage or&#xD;&#xA;&#xD;&#xA;- allow anyone to 'stake' value when propose new data, and a mechanism to slash dishonest actors" ContentLicense="CC BY-SA 4.0" />
  <row Id="43651" PostHistoryTypeId="2" PostId="10938" RevisionGUID="472ec931-fedc-4192-95a3-93113447bd5b" CreationDate="2024-02-01T17:07:46.497" UserId="5116" Text="I got this error after trying to install the substrate-contract-node :&#xD;&#xA;### 1) I download  rustc&#xD;&#xA;```shell&#xD;&#xA;rustc --version&#xD;&#xA;rustc 1.75.0 (82e1608df 2023-12-21)&#xD;&#xA;```&#xD;&#xA; ### 2) I cloned the repo &#xD;&#xA;I followed the instruction to install substrate-contract-node [here](https://docs.substrate.io/install/linux/)&#xD;&#xA;```shell&#xD;&#xA;git clone https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;```&#xD;&#xA;### 3) then I tried to compile the repo by this commands  &#xD;&#xA;```shell&#xD;&#xA;git switch -c my-wip-branch&#xD;&#xA;cargo build --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;and then I got this long error &#xD;&#xA;```&#xD;&#xA;failed to run custom build command for `sc-network-light v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v1.0.0#948fbd2f)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/home/mohamed/substrate-node-template/target/release/build/sc-network-light-0fea2d72bbd5faeb/build-script-build` (exit status: 101)&#xD;&#xA;  --- stderr&#xD;&#xA;  thread 'main' panicked at /home/mohamed/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prost-build-0.11.9/src/lib.rs:1457:10:&#xD;&#xA;  Could not find `protoc` installation and this build crate cannot proceed without&#xD;&#xA;      this knowledge. If `protoc` is installed and this crate had trouble finding&#xD;&#xA;      it, you can set the `PROTOC` environment variable with the specific path to your&#xD;&#xA;      installed `protoc` binary.If you're on debian, try `apt-get install protobuf-compiler` or download it from https://github.com/protocolbuffers/protobuf/releases&#xD;&#xA;&#xD;&#xA;  For more information: https://docs.rs/prost-build/#sourcing-protoc&#xD;&#xA;&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;so how can I fix this issue ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43653" PostHistoryTypeId="1" PostId="10938" RevisionGUID="472ec931-fedc-4192-95a3-93113447bd5b" CreationDate="2024-02-01T17:07:46.497" UserId="5116" Text="I have an error while compiling the substrate node" ContentLicense="CC BY-SA 4.0" />
  <row Id="43654" PostHistoryTypeId="3" PostId="10938" RevisionGUID="472ec931-fedc-4192-95a3-93113447bd5b" CreationDate="2024-02-01T17:07:46.497" UserId="5116" Text="|substrate-node-template|polkadot|ink|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43655" PostHistoryTypeId="2" PostId="10939" RevisionGUID="d5ea1c40-6d94-4cc1-916a-29a109d59a0b" CreationDate="2024-02-01T19:27:11.797" UserId="139" Text="As mentioned in the comment, it seems your system is missing the protobuf compiler. You need to get it for your OS. You can look at the setup here for the necessary packages before compiling : https://github.com/paritytech/extended-parachain-template/blob/main/docs/rust-setup.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="43657" PostHistoryTypeId="2" PostId="10940" RevisionGUID="c14bff54-5395-412f-b996-471b10d64838" CreationDate="2024-02-01T22:01:40.360" UserId="2005" Text="Take a closer look at the values you have set for `MaxProposalWeight` and `WeightInfo` types in the `pallet_collectives::Config`. It's highly likely that you have different values set for production and test runtimes, and this might be why the error occurs only in tests. The only case this error [happens][1] is when the weight of the proposal is greater than `MaxProposalWeight` constant. So, maybe you are passing a really low value for that constant in the mock runtime?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/collective/src/lib.rs#L854" ContentLicense="CC BY-SA 4.0" />
  <row Id="43659" PostHistoryTypeId="5" PostId="9449" RevisionGUID="d5f04012-6755-4f49-a63a-39bf7c975d0f" CreationDate="2024-02-02T00:15:13.363" UserId="116" Comment="Spellcheck and language i-&gt;I" Text="Based on [this example](https://docs.rs/ink/latest/ink/struct.EnvAccess.html#method.instantiate_contract)&#xD;&#xA;&#xD;&#xA;I'm doing something similar:&#xD;&#xA;```&#xD;&#xA;#[ink(message)]&#xD;&#xA;        pub fn new_multisig(&amp;mut self, threshold: u8, owners_list: Vec&lt;AccountId&gt;, salt: Vec&lt;u8&gt;) {&#xD;&#xA;            let multisig = build_create::&lt;MultiSigRef&gt;()&#xD;&#xA;                .code_hash(self.multisig_codehash)&#xD;&#xA;                .gas_limit(0)&#xD;&#xA;                .endowment(0)&#xD;&#xA;                .exec_input(&#xD;&#xA;                    ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;new&quot;)))&#xD;&#xA;                        .push_arg(threshold)&#xD;&#xA;                        .push_arg(owners_list),&#xD;&#xA;                )&#xD;&#xA;                .salt_bytes(salt)&#xD;&#xA;                .returns::&lt;MultiSigRef&gt;()&#xD;&#xA;                .instantiate();&#xD;&#xA;&#xD;&#xA;            self.env().emit_event(NewMultisig {&#xD;&#xA;                multisig_address: multisig, //Here i need to get the address of the new contract&#xD;&#xA;                threshold: threshold,&#xD;&#xA;                owners_list: owners_list,&#xD;&#xA;            });&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I need to obtain the address of the instantiated contract. How can I do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43660" PostHistoryTypeId="5" PostId="8886" RevisionGUID="d162e854-90a3-41a2-8c7b-4e9e7f8e8510" CreationDate="2024-02-02T00:18:36.810" UserId="116" Comment="code in code blocks; Spelling i -&gt; I" Text="I'm getting the following error while trying to run `e2e` rust ink! smart contracts tests:&#xD;&#xA;`#![feature(min_specialization)]` using the following command: &#xD;&#xA;```&#xD;&#xA;cargo test --features e2e-tests&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I'm using [this example to run the e2e tests](https://github.com/swanky-dapps/manic-minter)&#xD;&#xA;&#xD;&#xA;The smart contract itself compiles successfully with the following command: &#xD;&#xA;`cargo contract build`&#xD;&#xA;&#xD;&#xA;Here is how the e2e test looks like:&#xD;&#xA;```&#xD;&#xA;    #[cfg(all(test, feature = &quot;e2e-tests&quot;))]&#xD;&#xA;    mod e2e_tests {&#xD;&#xA;        use super::*;&#xD;&#xA;        use crate::manicminter::ManicMinterRef;&#xD;&#xA;        use ink::primitives::AccountId;&#xD;&#xA;        use ink_e2e::build_message;&#xD;&#xA;        use openbrush::contracts::ownable::ownable_external::Ownable;&#xD;&#xA;        use openbrush::contracts::psp22::psp22_external::PSP22;&#xD;&#xA;        use oxygen::oxygen::OxygenRef;&#xD;&#xA;&#xD;&#xA;        type E2EResult&lt;T&gt; = std::result::Result&lt;T, Box&lt;dyn std::error::Error&gt;&gt;;&#xD;&#xA;&#xD;&#xA;        const AMOUNT: Balance = 100;&#xD;&#xA;        const PRICE: Balance = 10;&#xD;&#xA;&#xD;&#xA;        /// Helper to get Bob's account_id from `ink_e2e::bob()` PairSigner&#xD;&#xA;        fn get_bob_account_id() -&gt; AccountId {&#xD;&#xA;            let bob = ink_e2e::bob::&lt;ink_e2e::PolkadotConfig&gt;();&#xD;&#xA;            let bob_account_id_32 = bob.account_id();&#xD;&#xA;            let bob_account_id = AccountId::try_from(bob_account_id_32.as_ref()).unwrap();&#xD;&#xA;&#xD;&#xA;            bob_account_id&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here is my Cargo.toml file:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.0&quot;, default-features = false }&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;openbrush = { git = &quot;https://github.com/727-Ventures/openbrush-contracts&quot;, tag=&quot;3.0.0&quot;, default-features= false, features = [&quot;psp22&quot;] }&#xD;&#xA;my_psp22 = { path = &quot;../my_psp22&quot;,version=&quot;1.0.0&quot;,default-features = false, features = [&quot;ink-as-dependency&quot;] }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.0.1&quot; &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thanks in advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="43661" PostHistoryTypeId="5" PostId="8893" RevisionGUID="6b5f8e8a-879b-432a-bb22-808995da6d33" CreationDate="2024-02-02T00:19:27.053" UserId="116" Comment="Code block" Text="Whenever you see this macro `#![feature(min_specialization)]` in the error message it is most likely that you are not using rust nightly.&#xD;&#xA;This macro is not supported by the stable rust version and you need to add `+nightly`to build it:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo +nightly contract build --release&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You might be using [manic-minter][1] as example but you are using different ink versions than manic-minter which uses ink v4.1. If you use manic-minter example you do not need to worry about this `+nightly`because you will have [rust-toolchain.toml][2].&#xD;&#xA;&#xD;&#xA;Also in your cargo.toml the version of ink and ink_e2e better be the same.&#xD;&#xA;&#xD;&#xA;Please upgrade all of your contracts to ink v4.2.1 due to known security issue.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/swanky-dapps/manic-minter&#xD;&#xA;  [2]: https://github.com/swanky-dapps/manic-minter/blob/main/rust-toolchain.toml" ContentLicense="CC BY-SA 4.0" />
  <row Id="43662" PostHistoryTypeId="5" PostId="9456" RevisionGUID="3a2e7a00-e014-4f32-9cda-6b10227d747d" CreationDate="2024-02-02T00:21:29.807" UserId="116" Comment="Keeping only the updated version of the answer." Text="You can use `to_account_id` method to obtain address of instantiated smart contract.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;use ink::ToAccountId;&#xD;&#xA;&#xD;&#xA;let contract_address = multisig.to_account_id();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43663" PostHistoryTypeId="2" PostId="10941" RevisionGUID="3e3e2a74-ce33-42c8-b548-cbfe4aeb4aa4" CreationDate="2024-02-02T00:56:34.247" UserId="270" Text="In polkadot the author index should be found in the digest like you can see this code in BABE:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config&gt; FindAuthor&lt;u32&gt; for Pallet&lt;T&gt; {&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;u32&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		for (id, mut data) in digests.into_iter() {&#xD;&#xA;			if id == BABE_ENGINE_ID {&#xD;&#xA;				let pre_digest: PreDigest = PreDigest::decode(&amp;mut data).ok()?;&#xD;&#xA;				return Some(pre_digest.authority_index())&#xD;&#xA;			}&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		None&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Then authority index is the index of the author in the validator set. The validator set can be found in the storage of the session pallet. The storage is `Validators` in the pallet `session`.&#xD;&#xA;&#xD;&#xA;For inspiration you can this code in session:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;impl&lt;T: Config, Inner: FindAuthor&lt;u32&gt;&gt; FindAuthor&lt;T::ValidatorId&gt;&#xD;&#xA;	for FindAccountFromAuthorIndex&lt;T, Inner&gt;&#xD;&#xA;{&#xD;&#xA;	fn find_author&lt;'a, I&gt;(digests: I) -&gt; Option&lt;T::ValidatorId&gt;&#xD;&#xA;	where&#xD;&#xA;		I: 'a + IntoIterator&lt;Item = (ConsensusEngineId, &amp;'a [u8])&gt;,&#xD;&#xA;	{&#xD;&#xA;		let i = Inner::find_author(digests)?;&#xD;&#xA;&#xD;&#xA;		let validators = &lt;Pallet&lt;T&gt;&gt;::validators();&#xD;&#xA;		validators.get(i as usize).cloned()&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;That said maybe tools have function implemented already to get it more easily." ContentLicense="CC BY-SA 4.0" />
  <row Id="43668" PostHistoryTypeId="2" PostId="10943" RevisionGUID="716e0850-0726-4e14-bdae-589ba3a3779e" CreationDate="2024-02-02T04:27:07.987" UserId="2748" Text="How to find the block author in pow substrate chain ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43670" PostHistoryTypeId="1" PostId="10943" RevisionGUID="716e0850-0726-4e14-bdae-589ba3a3779e" CreationDate="2024-02-02T04:27:07.987" UserId="2748" Text="How to find the block author in pow substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43671" PostHistoryTypeId="3" PostId="10943" RevisionGUID="716e0850-0726-4e14-bdae-589ba3a3779e" CreationDate="2024-02-02T04:27:07.987" UserId="2748" Text="|substrate-node-template|validator|proof-of-work|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43677" PostHistoryTypeId="6" PostId="10943" RevisionGUID="652d130d-a292-40d5-8b49-7a0e0d1f5386" CreationDate="2024-02-02T07:38:24.450" UserId="555" Comment="edited tags" Text="|substrate-node-template|block|proof-of-work|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43678" PostHistoryTypeId="2" PostId="10945" RevisionGUID="f53fa4f9-22de-465e-a6b7-4ae2731e1a1c" CreationDate="2024-02-02T08:49:27.533" UserId="2762" Text="No, the underlying RPC-based communication is not the same. There is an interesting discussion in the Polkadot Forum you might want to follow: [WrappedEVM Eth RPC compatibility layer][1].&#xD;&#xA;&#xD;&#xA;The alternative in substrate is `polkadotjs`, and more specifically for ink! smart contracts the library **useink**. Check the documentation of useink here: https://use.ink/frontend/overview&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://forum.polkadot.network/t/wrappedevm-eth-rpc-compatibility-layer/2775" ContentLicense="CC BY-SA 4.0" />
  <row Id="43680" PostHistoryTypeId="5" PostId="10926" RevisionGUID="37a054ea-476e-4bf1-92da-f8e344c7ea3a" CreationDate="2024-02-02T12:24:20.660" UserId="2163" Comment="added 648 characters in body" Text="I am interested in developing a pallet into which data from another parachain can be fed. For instance, consider two parachains: Para A and Para B. Para B implements the collectives pallet, and for the purpose of this example, let's assume that the members of this collective are fixed and do not change.&#xD;&#xA;&#xD;&#xA;Let's say I want to add a pallet on Para A that would need to know the members of the collective from Para A. Would it be a feasible solution to create an extrinsic that would allow anyone to 'feed' this data into the pallet by providing a merkle proof such that Para A is able to verify the validity of the information by comparing it against Para B's state root which is read from the relay chain(via [RelayChainInterface](https://github.com/paritytech/cumulus/blob/d4bb2215bb28ee05159c4c7df1b3435177b5bf4e/client/relay-chain-interface/src/lib.rs#L100))?&#xD;&#xA;&#xD;&#xA;Does this approach make sense, and has anyone already implemented something similar?&#xD;&#xA;&#xD;&#xA;Edit: From my understanding parts of the relay chain state are inserted into the para via an inherent: [link](https://github.com/paritytech/cumulus/blob/d4bb2215bb28ee05159c4c7df1b3435177b5bf4e/primitives/parachain-inherent/src/lib.rs#L64). However this doesn't contain the head data from parachains. Would this need to be modified such that it includes the head data for other specific parachain(in the above example Para B) from where I want to feed the state? &#xD;&#xA;&#xD;&#xA;Is it possible to conveniently specify which keys from the relay chain state should be included through the parachain inherent without modifying the `parachain-inherent` module?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43681" PostHistoryTypeId="50" PostId="9751" RevisionGUID="9b3b70b3-4db6-423c-95fa-9bdae93e5738" CreationDate="2024-02-02T14:04:00.473" UserId="-1" />
  <row Id="43682" PostHistoryTypeId="2" PostId="10946" RevisionGUID="1087c100-8d7b-4c61-b8fa-f69cac2f02bb" CreationDate="2024-02-02T15:23:58.827" UserId="73" Text="[ISMP](https://github.com/polytope-labs/ismp-substrate) is doing basically what you are asking for. Internally they collect the recent `relay_chain_storage_root`s. Based on these `storage_root`s you can write your custom logic that sends a relay chain proof over the `ParaHead` and then a proof from the parachain itself.&#xD;&#xA;&#xD;&#xA;&gt; Is it possible to conveniently specify which keys from the relay chain state should be included through the parachain inherent without modifying the parachain-inherent module?&#xD;&#xA;&#xD;&#xA;Currently not, but feel free to open a pull request for this. It is also somewhere on my TODO list ;) " ContentLicense="CC BY-SA 4.0" />
  <row Id="43684" PostHistoryTypeId="5" PostId="10613" RevisionGUID="d46fbc49-f0e3-4df7-8e12-8f2927e38b7c" CreationDate="2024-02-02T15:47:00.960" UserId="3598" Comment="added 390 characters in body" Text="Recently I started getting the following error thrown in the ```on_initialize``` hook of the aura pallet:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2023-12-08 14:24:54 [Parachain] panicked at 'Slot must increase', /.cargo/git/checkouts/substrate-7e08433d4c370a21/5bfdbab/frame/aura/src/lib.rs:93:17    &#xD;&#xA;2023-12-08 14:24:54 [Parachain] err=Error { inner: Proposing&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;    0: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;       WASM backtrace:&#xD;&#xA;       error while executing at wasm backtrace:&#xD;&#xA;           0: 0x396e55 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;           1: 0x3ce0 - &lt;unknown&gt;!core::panicking::panic_fmt::hc28e19cd76cf33c1&#xD;&#xA;           2: 0x149ebb - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hdf027e453fe3dfa0&#xD;&#xA;           3: 0x2275e1 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::h97a3ad9ef00b8c44&#xD;&#xA;           4: 0x14a5f9 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hfe37df7f2e5b478f&#xD;&#xA;           5: 0x1f6ac3 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hb2d583d1bf08c166&#xD;&#xA;           6: 0x1dbc7e - &lt;unknown&gt;!Core_initialize_block&#xD;&#xA;    1: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed&#xD;&#xA;       WASM backtrace:&#xD;&#xA;       error while executing at wasm backtrace:&#xD;&#xA;           0: 0x396e55 - &lt;unknown&gt;!rust_begin_unwind&#xD;&#xA;           1: 0x3ce0 - &lt;unknown&gt;!core::panicking::panic_fmt::hc28e19cd76cf33c1&#xD;&#xA;           2: 0x149ebb - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hdf027e453fe3dfa0&#xD;&#xA;           3: 0x2275e1 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::h97a3ad9ef00b8c44&#xD;&#xA;           4: 0x14a5f9 - &lt;unknown&gt;!&lt;(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize&lt;BlockNumber&gt;&gt;::on_initialize::hfe37df7f2e5b478f&#xD;&#xA;           5: 0x1f6ac3 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::initialize_block::hb2d583d1bf08c166&#xD;&#xA;```&#xD;&#xA;This is the only collator running and it is still producing blocks, the error happens frequently, but not always, so block production hasn't stopped.&#xD;&#xA;Recently I upgraded the node version to `polkadot 1.3.0`, but the runtime has not changed.&#xD;&#xA;Does anyone know what might be causing it?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;UPDATE:&#xD;&#xA;&#xD;&#xA;It was suggested that the issue might be due to the fact that only one collator was running, so I started another collator, I now have 2 collators producing blocks, but both are presenting the same issue.&#xD;&#xA;&#xD;&#xA;I've simulated the network using zombinet on my local computer and the collator does not have this issue.&#xD;&#xA;&#xD;&#xA;Also, I forgot to mention that the parachain is running in rococo.&#xD;&#xA;&#xD;&#xA;The solution mentioned by Valentin worked.&#xD;&#xA;&#xD;&#xA;To be able to test it on zombinet using the polkadot v1.6.0 the following configuration is required:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[relaychain.genesis.runtimeGenesis.patch.configuration.config]&#xD;&#xA;scheduling_lookahead = 2&#xD;&#xA;&#xD;&#xA;[relaychain.genesis.runtimeGenesis.patch.configuration.config.async_backing_params]&#xD;&#xA;max_candidate_depth = 3&#xD;&#xA;allowed_ancestry_len = 2&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43685" PostHistoryTypeId="2" PostId="10947" RevisionGUID="757e46a5-abf1-4493-8414-e41695f9b182" CreationDate="2024-02-02T16:07:38.147" UserId="5116" Text="due to I have limited internet in my country , I can not download the full building files after I wrote the contract and need to only see if there are any errors and need to run the tests .&#xD;&#xA;so if I tried to build the contract by this command , it downloads the target directory as shown :   &#xD;&#xA;```rust &#xD;&#xA;cargo contract build &#xD;&#xA;```&#xD;&#xA;because the downloaded files have a size of 3 gigabytes as shown [![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;## so I need a way to compile my contract and see all the errors and the messages for learning purposes without me having to download all of this files online &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/MZJCY.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43687" PostHistoryTypeId="1" PostId="10947" RevisionGUID="757e46a5-abf1-4493-8414-e41695f9b182" CreationDate="2024-02-02T16:07:38.147" UserId="5116" Text="is that necessary to download all the dependances and the full target file to compile and build any contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43688" PostHistoryTypeId="3" PostId="10947" RevisionGUID="757e46a5-abf1-4493-8414-e41695f9b182" CreationDate="2024-02-02T16:07:38.147" UserId="5116" Text="|substrate-node-template|ink|rust|pallet-contracts|cargo-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43689" PostHistoryTypeId="50" PostId="9821" RevisionGUID="9c144276-4d44-4ebe-a0de-d1ffe4a5f4e7" CreationDate="2024-02-02T19:01:05.170" UserId="-1" />
  <row Id="43692" PostHistoryTypeId="5" PostId="10931" RevisionGUID="e66d363b-1d37-4416-ab43-c2e7bd5f52ce" CreationDate="2024-02-03T03:41:51.347" UserId="309" Comment="added 1674 characters in body" Text="I have a pallet using the `propose` extrinsic of the collective pallet. one of the parameter of this extrinsic is `length_bound` which I define as follows:&#xD;&#xA;&#xD;&#xA;    let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;&#xD;&#xA;This implementation works fine when testing the pallet in polkadot.js, but when writing tests for my pallet, I get a `WrongProposalWeight` error for the `length_bound` parameter.&#xD;&#xA;I tried to increase the size of the parameter like this:&#xD;&#xA;&#xD;&#xA;    let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32).saturating_mul(2);&#xD;&#xA;&#xD;&#xA;but the error persist. Any idea on how to solve this issue?&#xD;&#xA;&#xD;&#xA;**Edit1**&#xD;&#xA;&#xD;&#xA;Below is the full code for the function using the collective_pallet `propose` extrinsic:&#xD;&#xA;&#xD;&#xA;    pub fn start_council_session(account: T::AccountId,account_type: Accounts) -&gt; DispatchResultWithPostInfo{&#xD;&#xA;		//Create proposal&#xD;&#xA;		let proposal0 = &#xD;&#xA;			Call::&lt;T&gt;::account_approval{&#xD;&#xA;				account: account.clone()&#xD;&#xA;			};&#xD;&#xA;		let proposal = Self::get_formatted_call(proposal0.into()).unwrap();&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		let _hash = T::Hashing::hash_of(&amp;proposal);&#xD;&#xA;&#xD;&#xA;		let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;		&#xD;&#xA;		let council_member = Coll::Pallet::&lt;T,Instance2&gt;::members()[0].clone();&#xD;&#xA;		let council_origin= Self::get_origin(council_member);&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;		//Start Collective refererendum&#xD;&#xA;		Coll::Pallet::&lt;T,Instance2&gt;::propose(&#xD;&#xA;			council_origin,&#xD;&#xA;			2,&#xD;&#xA;			Box::new(proposal.clone()),&#xD;&#xA;			proposal_len,&#xD;&#xA;		).ok();&#xD;&#xA;		let mut index:u32 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_count();&#xD;&#xA;		index = index.saturating_sub(1);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		//debug_assert!(Some(proposal.clone())==Coll::Pallet::&lt;T,Instance2&gt;::proposal_of(&amp;hash));&#xD;&#xA;&#xD;&#xA;		//Update proposal index and hash&#xD;&#xA;		let proposal_hashes =  Coll::Pallet::&lt;T,Instance2&gt;::proposals().into_iter();&#xD;&#xA;		for proposal_hash in proposal_hashes{&#xD;&#xA;			let prop0 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_of(proposal_hash.clone()).unwrap();&#xD;&#xA;			if proposal == prop0{&#xD;&#xA;				let mut proposal_all = Proposal::&lt;T&gt;::new(account.clone(), Some(account_type),proposal_hash.clone());&#xD;&#xA;				proposal_all.proposal_index = index;&#xD;&#xA;				proposal_all.proposal_hash = proposal_hash;&#xD;&#xA;				RequestedRoles::&lt;T&gt;::insert(&amp;account, proposal_all);&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		Ok(().into())&#xD;&#xA;	}&#xD;&#xA;***Error occurs only during testing***&#xD;&#xA;&#xD;&#xA;**Edit2**&#xD;&#xA;&#xD;&#xA;I Modified the `MaxProposalWeight` in the mock runtime to be as follows:&#xD;&#xA;&#xD;&#xA;    fn default_max_proposal_weight() -&gt; Weight {&#xD;&#xA;	sp_runtime::Perbill::from_percent(50) * BlockWeights::get().max_block&#xD;&#xA;    }&#xD;&#xA;    pub static MaxProposalWeight: Weight = default_max_proposal_weight();&#xD;&#xA;&#xD;&#xA;But, I am now getting a different error:&#xD;&#xA;&#xD;&#xA;    thread 'tests::setting_roles' panicked at &#xD;&#xA;    /home/kazu/.cargo/git/checkouts/polkadot-sdk- &#xD;&#xA;    cff69157b985ed76/789ffb6/substrate/frame/system/src/limits.rs:314:14:&#xD;&#xA;    We only specify max_total and leave base values as defaults; &#xD;&#xA;    qed: ValidationErrors {has_errors: true, errors: [&quot; &#xD;&#xA;    [DispatchClass::Normal] Weight &#xD;&#xA;						{ref_time: 1024, proof_size: 0 } (total) has to be greater than Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base block) &amp; Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base extrinsic)&quot;, &quot; &#xD;&#xA;    [DispatchClass::Normal] Weight &#xD;&#xA;						{ ref_time: 1024, proof_size: 0 } (max block) must &#xD;&#xA;    fit at least one extrinsic Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base weight)&quot;, &quot;[DispatchClass::Operational] Weight &#xD;&#xA;						{ ref_time: 1024, proof_size: 0 } (total) has to be greater than Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base block) &amp; Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base extrinsic)&quot;, &quot;[DispatchClass::Operational] Weight&#xD;&#xA;						{ ref_time: 1024, proof_size: 0 } (max block) must fit at least one extrinsic Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base weight)&quot;, &quot;[DispatchClass::Mandatory] Weight &#xD;&#xA;						{ ref_time: 1024, proof_size: 0 } (max block) must fit at least one extrinsic Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base weight)&quot;] }&#xD;&#xA;&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="43693" PostHistoryTypeId="8" PostId="8614" RevisionGUID="7c44d7f6-060d-4020-8ac2-17604cddf200" CreationDate="2024-02-03T07:12:53.083" UserId="3112" Comment="Rollback to [7e7d101d-82ba-4131-8f70-85af35c15849]" Text="I am attempting to build a smart contract for an imaginary burger shop. But I keep getting this error when I run the build command. &#xD;&#xA;&#xD;&#xA;[![the wasm*-unknown-unknown targets are not supported by default][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The test compiles, and `cargo check` compiles successfully too. &#xD;&#xA;&#xD;&#xA;Here is the source code.&#xD;&#xA;&#xD;&#xA;```lang-rust&#xD;&#xA;&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod burger_shop {&#xD;&#xA;&#xD;&#xA;    use ink::prelude::*;&#xD;&#xA;    use ink::storage::Mapping;&#xD;&#xA;    use scale::{Decode, Encode};&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct BurgerShop {&#xD;&#xA;        orders: Vec&lt;(u32, Order)&gt;,&#xD;&#xA;        orders_mapping: Mapping&lt;u32, Order&gt;,&#xD;&#xA;        shop_owner: AccountId,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // TODO: add logic to calculate gas fees for user&#xD;&#xA;&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone)]&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    pub struct Order {&#xD;&#xA;        burger_menu: String,&#xD;&#xA;        customer: AccountId,&#xD;&#xA;        price: u32,&#xD;&#xA;        amount: u32,&#xD;&#xA;        paid: bool,&#xD;&#xA;        delivered: bool,&#xD;&#xA;        status: Status,&#xD;&#xA;        completed: bool,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, scale::Encode, scale::Decode)]&#xD;&#xA;    #[cfg_attr(feature = &quot;std&quot;, derive(scale_info::TypeInfo))]&#xD;&#xA;    pub enum Error {&#xD;&#xA;        /// Provide a detailed comment on the error&#xD;&#xA;        PaymentError,&#xD;&#xA;        OrderNotCompleted,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    // result type&#xD;&#xA;    pub type Result&lt;T&gt; = core::result::Result&lt;T, Error&gt;;&#xD;&#xA;&#xD;&#xA;    #[cfg_attr(&#xD;&#xA;        feature = &quot;std&quot;,&#xD;&#xA;        derive(scale_info::TypeInfo, ink::storage::traits::StorageLayout)&#xD;&#xA;    )]&#xD;&#xA;    #[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)]&#xD;&#xA;    pub enum Status {&#xD;&#xA;        GettingIngredients,&#xD;&#xA;        Preparing,&#xD;&#xA;        SentForDelivery,&#xD;&#xA;        Delivered,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl Default for Status {&#xD;&#xA;        fn default() -&gt; Self {&#xD;&#xA;            Status::GettingIngredients&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl BurgerShop {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            let list_of_orders = Mapping::new();&#xD;&#xA;            Self {&#xD;&#xA;                orders: vec![],&#xD;&#xA;                orders_mapping: list_of_orders,&#xD;&#xA;                shop_owner: Self::env().caller(),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_orders(&amp;self) -&gt; Vec&lt;(u32, Order)&gt; {&#xD;&#xA;            // ensure the call is from the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;            self.orders.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn new_order(&amp;mut self, order: Order) {&#xD;&#xA;            let count = self.orders.len() as u32;&#xD;&#xA;            // ensure order is from the customer&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(&#xD;&#xA;                order.completed == false,&#xD;&#xA;                &quot;Cant add an already completed order!&quot;&#xD;&#xA;            );&#xD;&#xA;&#xD;&#xA;            self.orders_mapping.insert(count, &amp;order);&#xD;&#xA;&#xD;&#xA;            self.orders.push((count, order));&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_single_order(&amp;self, id: u32) -&gt; (u32, Order) {&#xD;&#xA;            let tuple_order = (id, self.orders_mapping.get(id).expect(&quot;Order not found!&quot;));&#xD;&#xA;            tuple_order&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn mark_completed(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;            assert!(order.paid == true, &quot;Order not paid!&quot;);&#xD;&#xA;            assert!(order.delivered == true, &quot;Order not delivered!&quot;);&#xD;&#xA;            assert!(order.status == Status::Delivered, &quot;Order not delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            if order.paid &amp;&amp; order.delivered &amp;&amp; order.status == Status::Delivered {&#xD;&#xA;                order.completed = true;&#xD;&#xA;                Ok(())&#xD;&#xA;            } else {&#xD;&#xA;                Err(Error::OrderNotCompleted)&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn make_payment(&amp;mut self, id: u32) -&gt; Result&lt;()&gt; {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;            assert!(order.paid == false, &quot;Order already paid!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that sender is the caller&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == order.customer, &quot;You are not the customer!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not delivered&#xD;&#xA;            assert!(order.delivered == false, &quot;Order already delivered!&quot;);&#xD;&#xA;&#xD;&#xA;            // make payment&#xD;&#xA;            match self.env().transfer(self.shop_owner, order.price.into()) {&#xD;&#xA;                Ok(_) =&gt; {&#xD;&#xA;                    order.paid = true;&#xD;&#xA;                    order.status = Status::Preparing;&#xD;&#xA;                    Ok(())&#xD;&#xA;                }&#xD;&#xA;                Err(_) =&gt; Err(Error::PaymentError),&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn change_status(&amp;mut self, id: u32, status: Status) {&#xD;&#xA;            let mut order = self.orders_mapping.get(id).expect(&quot;order not found!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure caller is the shop owner&#xD;&#xA;            let caller = self.env().caller();&#xD;&#xA;            assert!(caller == self.shop_owner, &quot;You are not the shop owner!&quot;);&#xD;&#xA;&#xD;&#xA;            // ensure that the order is not completed&#xD;&#xA;            assert!(order.completed == false, &quot;Order already completed!&quot;);&#xD;&#xA;&#xD;&#xA;            order.status = status;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;    #[cfg(test)]&#xD;&#xA;    mod tests {&#xD;&#xA;        use super::*;&#xD;&#xA;&#xD;&#xA;        #[ink::test]&#xD;&#xA;        fn it_works() {&#xD;&#xA;            let mut burger_shop = BurgerShop::new();&#xD;&#xA;            let order = Order {&#xD;&#xA;                burger_menu: &quot;Cheese Burger&quot;.to_string(),&#xD;&#xA;                customer: AccountId::from([0x01; 32]),&#xD;&#xA;                price: 100,&#xD;&#xA;                amount: 1,&#xD;&#xA;                paid: false,&#xD;&#xA;                delivered: false,&#xD;&#xA;                status: Status::GettingIngredients,&#xD;&#xA;                completed: false,&#xD;&#xA;            };&#xD;&#xA;&#xD;&#xA;            burger_shop.new_order(order.clone());&#xD;&#xA;&#xD;&#xA;            let orders = burger_shop.get_orders();&#xD;&#xA;            assert_eq!(orders.len(), 1);&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What could I be doing wrong?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Here is the Cargo.toml file &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```lang-toml&#xD;&#xA;&#xD;&#xA;[package]&#xD;&#xA;name = &quot;burger_shop&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;Ayomide Bajo &lt;oluwashinabajo@gmail.com&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;4.0.1&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.3&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;sp-io = &quot;22.0.0&quot;&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.0.1&quot;&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The `rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release` run successfully but `cargo contract build` still results in the same error&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is weird.  `cargo build` compiles but `cargo contract build` doesn't. [![rustup update &amp;&amp; rustup default nightly &amp;&amp; cargo build --release][2]][2]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/ctCCT.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/xv3eb.png&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If `cargo contract build` command doesn't work for my smart contract I can't deploy it." ContentLicense="CC BY-SA 4.0" />
  <row Id="43694" PostHistoryTypeId="50" PostId="9847" RevisionGUID="f3441ed2-b72a-4fbe-adcc-7e88242355c5" CreationDate="2024-02-03T09:03:05.340" UserId="-1" />
  <row Id="43695" PostHistoryTypeId="50" PostId="10692" RevisionGUID="c862d406-6e36-4645-830e-8069618e8644" CreationDate="2024-02-03T11:00:30.070" UserId="-1" />
  <row Id="43696" PostHistoryTypeId="2" PostId="10948" RevisionGUID="058ac7db-67d2-4252-9d4b-edf2d16cb0ae" CreationDate="2024-02-03T11:02:21.303" UserId="5089" Text="My big question is how all of the authors above initially understood what to do in order to enable PoS or make any more complex  adjustment for that matter? In my opinion, the official documentation and tutorials provided by Substrate do not bring you near the capability to make complex adjustments of the node template. Did all of the above authors attend Polkadot Academy, or are there any advanced tutorials/trainings that I missed? " ContentLicense="CC BY-SA 4.0" />
  <row Id="43698" PostHistoryTypeId="5" PostId="10931" RevisionGUID="64af84cf-db8c-414f-b8bd-b9b105784a99" CreationDate="2024-02-03T11:19:57.097" UserId="309" Comment="deleted 12 characters in body" Text="I have a pallet using the `propose` extrinsic of the collective pallet. one of the parameter of this extrinsic is `length_bound` which I define as follows:&#xD;&#xA;&#xD;&#xA;    let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;&#xD;&#xA;This implementation works fine when testing the pallet in polkadot.js, but when writing tests for my pallet, I get a `WrongProposalWeight` error for the `length_bound` parameter.&#xD;&#xA;I tried to increase the size of the parameter like this:&#xD;&#xA;&#xD;&#xA;    let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32).saturating_mul(2);&#xD;&#xA;&#xD;&#xA;but the error persist. Any idea on how to solve this issue?&#xD;&#xA;&#xD;&#xA;**Edit1**&#xD;&#xA;&#xD;&#xA;Below is the full code for the function using the collective_pallet `propose` extrinsic:&#xD;&#xA;&#xD;&#xA;    pub fn start_council_session(account: T::AccountId,account_type: Accounts) -&gt; DispatchResultWithPostInfo{&#xD;&#xA;		//Create proposal&#xD;&#xA;		let proposal0 = &#xD;&#xA;			Call::&lt;T&gt;::account_approval{&#xD;&#xA;				account: account.clone()&#xD;&#xA;			};&#xD;&#xA;		let proposal = Self::get_formatted_call(proposal0.into()).unwrap();&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		let _hash = T::Hashing::hash_of(&amp;proposal);&#xD;&#xA;&#xD;&#xA;		let proposal_len:u32 = proposal.using_encoded(|p| p.len() as u32);&#xD;&#xA;		&#xD;&#xA;		let council_member = Coll::Pallet::&lt;T,Instance2&gt;::members()[0].clone();&#xD;&#xA;		let council_origin= Self::get_origin(council_member);&#xD;&#xA;		&#xD;&#xA;&#xD;&#xA;		//Start Collective refererendum&#xD;&#xA;		Coll::Pallet::&lt;T,Instance2&gt;::propose(&#xD;&#xA;			council_origin,&#xD;&#xA;			2,&#xD;&#xA;			Box::new(proposal.clone()),&#xD;&#xA;			proposal_len,&#xD;&#xA;		).ok();&#xD;&#xA;		let mut index:u32 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_count();&#xD;&#xA;		index = index.saturating_sub(1);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		//debug_assert!(Some(proposal.clone())==Coll::Pallet::&lt;T,Instance2&gt;::proposal_of(&amp;hash));&#xD;&#xA;&#xD;&#xA;		//Update proposal index and hash&#xD;&#xA;		let proposal_hashes =  Coll::Pallet::&lt;T,Instance2&gt;::proposals().into_iter();&#xD;&#xA;		for proposal_hash in proposal_hashes{&#xD;&#xA;			let prop0 = Coll::Pallet::&lt;T,Instance2&gt;::proposal_of(proposal_hash.clone()).unwrap();&#xD;&#xA;			if proposal == prop0{&#xD;&#xA;				let mut proposal_all = Proposal::&lt;T&gt;::new(account.clone(), Some(account_type),proposal_hash.clone());&#xD;&#xA;				proposal_all.proposal_index = index;&#xD;&#xA;				proposal_all.proposal_hash = proposal_hash;&#xD;&#xA;				RequestedRoles::&lt;T&gt;::insert(&amp;account, proposal_all);&#xD;&#xA;			}&#xD;&#xA;			&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		Ok(().into())&#xD;&#xA;	}&#xD;&#xA;***Error occurs only during testing***&#xD;&#xA;&#xD;&#xA;**Edit2**&#xD;&#xA;&#xD;&#xA;I Modified the `MaxProposalWeight` in the mock runtime to be as follows:&#xD;&#xA;&#xD;&#xA;    fn default_max_proposal_weight() -&gt; Weight {&#xD;&#xA;	sp_runtime::Perbill::from_percent(50) * BlockWeights::get().max_block&#xD;&#xA;    }&#xD;&#xA;    pub static MaxProposalWeight: Weight = default_max_proposal_weight();&#xD;&#xA;&#xD;&#xA;But, I am now getting a different error:&#xD;&#xA;&#xD;&#xA;    thread 'tests::setting_roles' panicked at &#xD;&#xA;    /home/kazu/.cargo/git/checkouts/polkadot-sdk- &#xD;&#xA;    cff69157b985ed76/789ffb6/substrate/frame/system/src/limits.rs:314:14:&#xD;&#xA;    We only specify max_total and leave base values as defaults; &#xD;&#xA;    qed: ValidationErrors {has_errors: true, errors: [&quot; &#xD;&#xA;    [DispatchClass::Normal] Weight &#xD;&#xA;						{ref_time: 1024, proof_size: 0 } (total) has to be greater than Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base block) &amp; Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base extrinsic)&quot;, &quot; [DispatchClass::Normal] Weight &#xD;&#xA;						{ ref_time: 1024, proof_size: 0 } (max block) must fit at least one extrinsic Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base weight)&quot;, &quot;[DispatchClass::Operational] Weight &#xD;&#xA;						{ ref_time: 1024, proof_size: 0 } (total) has to be greater than Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base block) &amp; Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base extrinsic)&quot;, &quot;[DispatchClass::Operational] Weight&#xD;&#xA;						{ ref_time: 1024, proof_size: 0 } (max block) must fit at least one extrinsic Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base weight)&quot;, &quot;[DispatchClass::Mandatory] Weight &#xD;&#xA;						{ ref_time: 1024, proof_size: 0 } (max block) must fit at least one extrinsic Weight &#xD;&#xA;						{ ref_time: 0, proof_size: 0 } (base weight)&quot;] }&#xD;&#xA;&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="43699" PostHistoryTypeId="2" PostId="10949" RevisionGUID="33400a91-7166-44b2-b463-8ba2e861e603" CreationDate="2024-02-03T11:46:03.883" UserId="5118" Text="We have a Substrate based relay chain where we need to fetch external data like important documents and specific data using off-chain workers right now. But these OCW doesn't work for reaching consensus on data being fetched and put on chain. is there any substrate based oracle available for relay-chain and not solo-chain or parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43701" PostHistoryTypeId="1" PostId="10949" RevisionGUID="33400a91-7166-44b2-b463-8ba2e861e603" CreationDate="2024-02-03T11:46:03.883" UserId="5118" Text="Is there any oracle solutions available for substrate based relah chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43702" PostHistoryTypeId="3" PostId="10949" RevisionGUID="33400a91-7166-44b2-b463-8ba2e861e603" CreationDate="2024-02-03T11:46:03.883" UserId="5118" Text="|substrate-node|relay-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43703" PostHistoryTypeId="50" PostId="10739" RevisionGUID="b887eea0-6e89-416a-900c-2e9dcae4f229" CreationDate="2024-02-03T14:03:10.360" UserId="-1" />
  <row Id="43704" PostHistoryTypeId="2" PostId="10950" RevisionGUID="84f62f83-1ac2-414d-888c-0023a2b14932" CreationDate="2024-02-03T15:27:09.860" UserId="5119" Text="I am building custom XCM pallet.&#xD;&#xA;&#xD;&#xA;While executing specific call:&#xD;&#xA;&#xD;&#xA;The destination is of ParaId type.&#xD;&#xA;&#xD;&#xA;&gt; 			match send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;&gt; 				(Parent, Junction::Parachain(destination.into())).into(),&#xD;&#xA;&gt; 				Xcm(vec![Transact {&#xD;&#xA;&gt; 					origin_kind: OriginKind::Native,&#xD;&#xA;&gt; 					require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;&gt; 					call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::mint_collection_received {&#xD;&#xA;&gt; 						collection_name,&#xD;&#xA;&gt; 						collection_description,&#xD;&#xA;&gt; 						origin_parachain_id: 2000.into(),&#xD;&#xA;&gt; 						owner: recipient.clone(),&#xD;&#xA;&gt; 					})&#xD;&#xA;&gt; 					.encode()&#xD;&#xA;&gt; 					.into(),&#xD;&#xA;&gt; 				}]), 			) {&#xD;&#xA;&gt; 				Ok((hash, cost)) =&gt; Self::deposit_event(Event::CollectionCreatedAndTransferedXCM {&#xD;&#xA;&gt; 					collection_hash,&#xD;&#xA;&gt; 					owner: recipient.clone(),&#xD;&#xA;&gt; 					destination,&#xD;&#xA;&gt; 				}),&#xD;&#xA;&gt; 				Err(e) =&gt; Self::deposit_event(Event::CollectionFailedToXCM {&#xD;&#xA;&gt; 					e,&#xD;&#xA;&gt; 					collection_hash,&#xD;&#xA;&gt; 					owner: recipient.clone(),&#xD;&#xA;&gt; 					destination,&#xD;&#xA;&gt; 				}), 			}&#xD;&#xA;&#xD;&#xA;I receive error Bad Origin.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;I execute it with sudo.&#xD;&#xA;&#xD;&#xA;Any answer as to why?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6YeX6.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43706" PostHistoryTypeId="1" PostId="10950" RevisionGUID="84f62f83-1ac2-414d-888c-0023a2b14932" CreationDate="2024-02-03T15:27:09.860" UserId="5119" Text="Error Bad origin on custom XCM integration" ContentLicense="CC BY-SA 4.0" />
  <row Id="43707" PostHistoryTypeId="3" PostId="10950" RevisionGUID="84f62f83-1ac2-414d-888c-0023a2b14932" CreationDate="2024-02-03T15:27:09.860" UserId="5119" Text="|substrate-node-template|pallet|parachain|rust|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43708" PostHistoryTypeId="5" PostId="10950" RevisionGUID="643af0c7-4467-4c35-96ee-8aa1f512d3de" CreationDate="2024-02-03T15:31:35.623" UserId="5119" Comment="added 196 characters in body" Text="I am building custom XCM pallet.&#xD;&#xA;&#xD;&#xA;While executing specific call:&#xD;&#xA;&#xD;&#xA;The destination is of ParaId type.&#xD;&#xA;&#xD;&#xA;&gt; 			match send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;&gt; 				(Parent, Junction::Parachain(destination.into())).into(),&#xD;&#xA;&gt; 				Xcm(vec![Transact {&#xD;&#xA;&gt; 					origin_kind: OriginKind::Native,&#xD;&#xA;&gt; 					require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;&gt; 					call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::mint_collection_received {&#xD;&#xA;&gt; 						collection_name,&#xD;&#xA;&gt; 						collection_description,&#xD;&#xA;&gt; 						origin_parachain_id: 2000.into(),&#xD;&#xA;&gt; 						owner: recipient.clone(),&#xD;&#xA;&gt; 					})&#xD;&#xA;&gt; 					.encode()&#xD;&#xA;&gt; 					.into(),&#xD;&#xA;&gt; 				}]), 			) {&#xD;&#xA;&gt; 				Ok((hash, cost)) =&gt; Self::deposit_event(Event::CollectionCreatedAndTransferedXCM {&#xD;&#xA;&gt; 					collection_hash,&#xD;&#xA;&gt; 					owner: recipient.clone(),&#xD;&#xA;&gt; 					destination,&#xD;&#xA;&gt; 				}),&#xD;&#xA;&gt; 				Err(e) =&gt; Self::deposit_event(Event::CollectionFailedToXCM {&#xD;&#xA;&gt; 					e,&#xD;&#xA;&gt; 					collection_hash,&#xD;&#xA;&gt; 					owner: recipient.clone(),&#xD;&#xA;&gt; 					destination,&#xD;&#xA;&gt; 				}), 			}&#xD;&#xA;&#xD;&#xA;I receive error Bad Origin.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;I execute it with sudo.&#xD;&#xA;&#xD;&#xA;Any answer as to why?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Once executed with normal test account I receive following output:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;Any idea what &quot;Transport&quot; error mean?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6YeX6.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/fNs0R.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43709" PostHistoryTypeId="5" PostId="10950" RevisionGUID="3a899f88-41cd-4422-8860-2db183ff4873" CreationDate="2024-02-03T16:13:08.930" UserId="5119" Comment="edited body" Text="I am building custom XCM pallet.&#xD;&#xA;&#xD;&#xA;While executing specific call:&#xD;&#xA;&#xD;&#xA;The destination is of ParaId type.&#xD;&#xA;&#xD;&#xA;&gt; 			match send_xcm::&lt;T::XcmSender&gt;(&#xD;&#xA;&gt; 				(Parent, Junction::Parachain(destination.into())).into(),&#xD;&#xA;&gt; 				Xcm(vec![Transact {&#xD;&#xA;&gt; 					origin_kind: OriginKind::Native,&#xD;&#xA;&gt; 					require_weight_at_most: Weight::from_parts(1_000, 1_000),&#xD;&#xA;&gt; 					call: &lt;T as Config&gt;::RuntimeCall::from(Call::&lt;T&gt;::mint_collection_received {&#xD;&#xA;&gt; 						collection_name,&#xD;&#xA;&gt; 						collection_description,&#xD;&#xA;&gt; 						origin_parachain_id: 2000.into(),&#xD;&#xA;&gt; 						owner: recipient.clone(),&#xD;&#xA;&gt; 					})&#xD;&#xA;&gt; 					.encode()&#xD;&#xA;&gt; 					.into(),&#xD;&#xA;&gt; 				}]), 			) {&#xD;&#xA;&gt; 				Ok((hash, cost)) =&gt; Self::deposit_event(Event::CollectionCreatedAndTransferedXCM {&#xD;&#xA;&gt; 					collection_hash,&#xD;&#xA;&gt; 					owner: recipient.clone(),&#xD;&#xA;&gt; 					destination,&#xD;&#xA;&gt; 				}),&#xD;&#xA;&gt; 				Err(e) =&gt; Self::deposit_event(Event::CollectionFailedToXCM {&#xD;&#xA;&gt; 					e,&#xD;&#xA;&gt; 					collection_hash,&#xD;&#xA;&gt; 					owner: recipient.clone(),&#xD;&#xA;&gt; 					destination,&#xD;&#xA;&gt; 				}), 			}&#xD;&#xA;&#xD;&#xA;I receive error Bad Origin.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;I execute it with sudo.&#xD;&#xA;&#xD;&#xA;Any answer as to why?&#xD;&#xA;&#xD;&#xA;Thanks&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Once executed with normal test account I receive following output:&#xD;&#xA;[![enter image description here][2]][2]&#xD;&#xA;Any idea what &quot;Transport&quot; error mean?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/6YeX6.png&#xD;&#xA;  [2]: https://i.stack.imgur.com/tCAmj.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43710" PostHistoryTypeId="2" PostId="10951" RevisionGUID="306315ff-08a7-4a68-8644-824e429e0d92" CreationDate="2024-02-03T18:00:52.810" UserId="398" Text="I am running substrate based solo chain using AURA and GRANDPA. I have upgraded the runtime to use polkadot v0.9.27 branch and it was working fine for some days. now suddenly my nodes are getting this error message:&#xD;&#xA;```&#xD;&#xA;   0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;             at rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:702:17&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;             at rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:586:13&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;             at rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:138:18&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;             at rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;             at rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14&#xD;&#xA;   6: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;   7: &lt;futures_util::future::future::map::Map&lt;Fut,F&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;   8: &lt;sc_service::task_manager::prometheus_future::PrometheusFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;   9: &lt;futures_util::future::select::Select&lt;A,B&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  10: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  11: tokio::loom::std::unsafe_cell::UnsafeCell&lt;T&gt;::with_mut&#xD;&#xA;  12: tokio::runtime::task::core::CoreStage&lt;T&gt;::poll&#xD;&#xA;  13: tokio::runtime::task::harness::poll_future&#xD;&#xA;  14: tokio::runtime::task::harness::Harness&lt;T,S&gt;::poll&#xD;&#xA;  15: std::thread::local::LocalKey&lt;T&gt;::with&#xD;&#xA;  16: tokio::runtime::thread_pool::worker::Context::run_task&#xD;&#xA;  17: tokio::runtime::thread_pool::worker::Context::run&#xD;&#xA;  18: tokio::macros::scoped_tls::ScopedKey&lt;T&gt;::set&#xD;&#xA;  19: tokio::runtime::thread_pool::worker::run&#xD;&#xA;  20: &lt;tokio::runtime::blocking::task::BlockingTask&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  21: tokio::runtime::task::harness::Harness&lt;T,S&gt;::poll&#xD;&#xA;  22: tokio::runtime::blocking::pool::Inner::run&#xD;&#xA;  23: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  24: core::ops::function::FnOnce::call_once{{vtable.shim}}&#xD;&#xA;  25: &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/alloc/src/boxed.rs:1861:9&#xD;&#xA;      &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once&#xD;&#xA;             at rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/alloc/src/boxed.rs:1861:9&#xD;&#xA;      std::sys::unix::thread::Thread::new::thread_start&#xD;&#xA;             at rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys/unix/thread.rs:108:17&#xD;&#xA;  26: &lt;unknown&gt;&#xD;&#xA;  27: __clone&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'Integer overflow when casting to u64', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/primitive-types-0.10.1/src/lib.rs:38&#xD;&#xA;```&#xD;&#xA;How can I fix this bug?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43712" PostHistoryTypeId="1" PostId="10951" RevisionGUID="306315ff-08a7-4a68-8644-824e429e0d92" CreationDate="2024-02-03T18:00:52.810" UserId="398" Text="Thread 'tokio-runtime-worker' panicked at 'Integer overflow when casting to u64'" ContentLicense="CC BY-SA 4.0" />
  <row Id="43713" PostHistoryTypeId="3" PostId="10951" RevisionGUID="306315ff-08a7-4a68-8644-824e429e0d92" CreationDate="2024-02-03T18:00:52.810" UserId="398" Text="|substrate-node-template|bug|tokio|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43714" PostHistoryTypeId="5" PostId="10943" RevisionGUID="1f9cc135-9068-400a-bd7a-765dcfb0df16" CreationDate="2024-02-03T18:06:29.967" UserId="555" Comment="deleted 1 character in body" Text="How to find the block author in pow substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43715" PostHistoryTypeId="2" PostId="10952" RevisionGUID="fd55b867-c7bb-4b2c-b471-87b4ffeaf4d7" CreationDate="2024-02-04T07:41:37.250" UserId="251" Text="Integrate this pallet into your runtime.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/authorship/src/lib.rs&#xD;&#xA;&#xD;&#xA;Then you can use `T::FindAuthor::find_author()` to get the block author in code level." ContentLicense="CC BY-SA 4.0" />
  <row Id="43717" PostHistoryTypeId="50" PostId="8859" RevisionGUID="6b4a9140-09c2-4abc-b3ad-bb2b1da80c20" CreationDate="2024-02-04T12:01:20.170" UserId="-1" />
  <row Id="43718" PostHistoryTypeId="50" PostId="10748" RevisionGUID="1283905b-b265-45c5-9b18-3992d19de982" CreationDate="2024-02-04T14:05:00.703" UserId="-1" />
  <row Id="43719" PostHistoryTypeId="50" PostId="10755" RevisionGUID="0f6b863b-f37e-4f7c-9755-856e853b82bc" CreationDate="2024-02-04T23:01:25.173" UserId="-1" />
  <row Id="43721" PostHistoryTypeId="5" PostId="10949" RevisionGUID="a8dfb729-730e-46c8-9276-c906b4c051e8" CreationDate="2024-02-05T00:45:45.160" UserId="116" Comment="edited body; edited title" Text="We have a Substrate based relay chain where we need to fetch external data like important documents and specific data using off-chain workers right now. But these OCW doesn't work for reaching consensus on data being fetched and put on chain. Is there any substrate based oracle available for relay-chain and not solo-chain or parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43722" PostHistoryTypeId="4" PostId="10949" RevisionGUID="a8dfb729-730e-46c8-9276-c906b4c051e8" CreationDate="2024-02-05T00:45:45.160" UserId="116" Comment="edited body; edited title" Text="Is there any oracle solutions available for substrate based relay chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43723" PostHistoryTypeId="2" PostId="10953" RevisionGUID="087934af-13ad-45ae-98a7-b1fe0c0076e0" CreationDate="2024-02-05T03:34:08.433" UserId="270" Text="This link can help you: https://wiki.polkadot.network/docs/build-oracle&#xD;&#xA;&#xD;&#xA;Here is a copy of the content linked:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In the blockchain context, an _oracle_ is a way to bring real-world data onto the blockchain so that&#xD;&#xA;it can be used by a decentralized application.&#xD;&#xA;&#xD;&#xA;Oracles serve many purposes for application builders. For example:&#xD;&#xA;&#xD;&#xA;- Most stablecoin designs use an oracle to bring in data of the exchange rate of assets, in order to&#xD;&#xA;  peg their value to a real world currency.&#xD;&#xA;- Synthetic assets use oracles as price feeds in order to determine if the underlying cryptocurrency&#xD;&#xA;  can sufficiently collateralize the debt position.&#xD;&#xA;- Prediction markets use oracles to decide the outcome of real world events and determine the payout&#xD;&#xA;  of the prediction shares.&#xD;&#xA;- Decentralized insurance markets use oracles to bring in information about whether a claim is valid&#xD;&#xA;  or not.&#xD;&#xA;&#xD;&#xA;Oracle solutions range from centralized and trusted to decentralized and game-theory based. On the&#xD;&#xA;centralized end of the spectrum, an oracle could be a single account that has the authority to&#xD;&#xA;dictate the real-world data on-chain. On the decentralized end, a&#xD;&#xA;[complex game of &quot;chicken&quot;](https://blog.ethereum.org/2014/03/28/schellingcoin-a-minimal-trust-universal-data-feed/)&#xD;&#xA;can be played among various staked actors who risk getting slashed if they don't submit the same&#xD;&#xA;data as everyone else. Solutions such as&#xD;&#xA;[Chainlink](https://polkadot.network/chainlink-reaches-milestone-with-polkadot/) fit somewhere in&#xD;&#xA;the middle, where the amount of trust you put into the reporting oracles can be adjusted based on&#xD;&#xA;your preferences. A Chainlink&#xD;&#xA;[Feed Pallet](https://github.com/smartcontractkit/chainlink-polkadot/blob/master/pallet-chainlink-feed/README.md)&#xD;&#xA;was recently released to allow smart contract applications across&#xD;&#xA;Polkadot to access price reference data, made&#xD;&#xA;available as a Substrate oracle pallet. [Acurast](https://acurast.com/) is another solution that&#xD;&#xA;enables developers to define their off-chain data and computation requirements and receive the&#xD;&#xA;outputs to the [Acurast Pallet](https://docs.acurast.com/integrations/substrate) and EVM or WASM&#xD;&#xA;environments.&#xD;&#xA;&#xD;&#xA;When using an oracle in your application you should be aware of the benefits and risks that are&#xD;&#xA;baked into its specific model. As the Polkadot ecosystem develops and oracle parachains begin to appear, this article&#xD;&#xA;will be updated with a comparison of the different solutions and the benefits and drawbacks that&#xD;&#xA;each provide.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43725" PostHistoryTypeId="2" PostId="10954" RevisionGUID="6b72280c-79b4-4f19-b7b1-9e086396ecbb" CreationDate="2024-02-05T03:46:22.800" UserId="270" Text="The path `github.com-1ecc6299db9ec823/primitive-types-0.10.1/src/lib.rs:38` seems to link to U256 type.&#xD;&#xA;&#xD;&#xA;You probably triggered this error: https://github.com/paritytech/parity-common/blob/1d3a3d5138403bbf07d42978b29d8ac7d3fff53b/uint/src/uint.rs#L655&#xD;&#xA;&#xD;&#xA;So I guess some code is using a U256 and is calling `as_u64` on a value which overflows u64 type.&#xD;&#xA;&#xD;&#xA;Try using `TryFrom` trait instead of `as_u64` in your code maybe or look where this could triggered I guess." ContentLicense="CC BY-SA 4.0" />
  <row Id="43727" PostHistoryTypeId="2" PostId="10955" RevisionGUID="8c51878e-0450-46c3-830c-6d924e5ac2b3" CreationDate="2024-02-05T06:39:16.267" UserId="264" Text="trying to figure out a way to have a constant inflation rate for every era e.g to a 5% of total supply so any hint or clue how it goes with this configuration without setting min/max inflation into the curve:&#xD;&#xA;&#xD;&#xA;    const REWARD_CURVE: PiecewiseLinear&lt;'static&gt; = curve!(&#xD;&#xA;    		min_inflation: 0_025_000,&#xD;&#xA;    		max_inflation: 0_100_000,&#xD;&#xA;    		ideal_stake: 0_500_000,&#xD;&#xA;    		falloff: 0_050_000,&#xD;&#xA;    		max_piece_count: 40,&#xD;&#xA;    		test_precision: 0_005_000,&#xD;&#xA;    	);" ContentLicense="CC BY-SA 4.0" />
  <row Id="43729" PostHistoryTypeId="1" PostId="10955" RevisionGUID="8c51878e-0450-46c3-830c-6d924e5ac2b3" CreationDate="2024-02-05T06:39:16.267" UserId="264" Text="setup a constant inflation rate every era" ContentLicense="CC BY-SA 4.0" />
  <row Id="43730" PostHistoryTypeId="3" PostId="10955" RevisionGUID="8c51878e-0450-46c3-830c-6d924e5ac2b3" CreationDate="2024-02-05T06:39:16.267" UserId="264" Text="|substrate-node-template|pallet-staking|rewards|validator-set|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43734" PostHistoryTypeId="5" PostId="10902" RevisionGUID="ca8680f7-74c8-4701-a334-582a0efb8642" CreationDate="2024-02-05T15:03:21.413" UserId="3598" Comment="added 8480 characters in body" Text="I'm getting a SendFailure error(on asset hub) when performing a reserve asset transfer of ROC from rococo asset hub to a parachain, does anyone know what might be the cause? Or how can I further debug the issue?&#xD;&#xA;&#xD;&#xA;This is the call I'm doing: `0x1f0203010100b5200300010100e266243731bf69fff27133f3cbb8def28c6fd26d688d14fee34ab6950351aa0f030400010000070010a5d4e800000000`&#xD;&#xA;&#xD;&#xA;Update:&#xD;&#xA;&#xD;&#xA;I've replicated the issue using chopsticks, here are the logs:&#xD;&#xA;```&#xD;&#xA;xcm::weight                  TRACE: WeightInfoBounds message: Xcm([SetFeesMode { jit_withdraw: true }, TransferReserveAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }]), dest: MultiLocation { parents: 1, interior: X1(Parachain(2093)) }, xcm: Xcm([]) }])&#xD;&#xA;xcm::pallet_xcm::do_reserve_transfer_assets DEBUG: origin MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Rococo), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, dest MultiLocation { parents: 1, interior: X1(Parachain(2093)) }, beneficiary MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [226, 102, 36, 55, 49, 191, 105, 255, 242, 113, 51, 243, 203, 184, 222, 242, 140, 111, 210, 109, 104, 141, 20, 254, 227, 74, 182, 149, 3, 81, 170, 15] }) }, assets MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }]), fee-idx 0&#xD;&#xA;xcm::contains                TRACE: ConcreteAssetFromSystem asset: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, origin: MultiLocation { parents: 1, interior: X1(Parachain(2093)) }&#xD;&#xA;xcm::contains                TRACE: IsForeignConcreteAsset asset: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, origin: MultiLocation { parents: 1, interior: X1(Parachain(2093)) }&#xD;&#xA;xcm::contains                TRACE: IsTrustedBridgedReserveLocationForConcreteAsset asset: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, origin: MultiLocation { parents: 1, interior: X1(Parachain(2093)) }, universal_source: X2(GlobalConsensus(Rococo), Parachain(1000))&#xD;&#xA;xcm::contains                TRACE: IsTrustedBridgedReserveLocationForConcreteAsset origin: MultiLocation { parents: 1, interior: X1(Parachain(2093)) } is not remote to the universal_source: X2(GlobalConsensus(Rococo), Parachain(1000))&#xD;&#xA;xcm::contains                TRACE: IsForeignConcreteAsset asset: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, origin: MultiLocation { parents: 1, interior: X1(Parachain(2093)) }&#xD;&#xA;xcm::contains                TRACE: ConcreteAssetFromSystem asset: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, origin: MultiLocation { parents: 1, interior: Here }&#xD;&#xA;xcm::pallet_xcm::build_and_execute_xcm_transfer_type DEBUG: origin MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Rococo), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, dest MultiLocation { parents: 1, interior: X1(Parachain(2093)) }, beneficiary MultiLocation { parents: 0, interior: X1(AccountId32 { network: None, id: [226, 102, 36, 55, 49, 191, 105, 255, 242, 113, 51, 243, 203, 184, 222, 242, 140, 111, 210, 109, 104, 141, 20, 254, 227, 74, 182, 149, 3, 81, 170, 15] }) }, assets [MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }], transfer_type LocalReserve, fees_handling FeesHandling::Batched(MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }), weight_limit: Unlimited&#xD;&#xA;xcm::weight                  TRACE: WeightInfoBounds message: Xcm([TransferAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }]), beneficiary: MultiLocation { parents: 1, interior: X1(Parachain(2093)) } }])&#xD;&#xA;xcm::weight                  TRACE: WeightInfoBounds message: Xcm([TransferAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }]), beneficiary: MultiLocation { parents: 1, interior: X1(Parachain(2093)) } }])&#xD;&#xA;xcm::execute_xcm_in_credit   TRACE: origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Rococo), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, message: Xcm([TransferAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }]), beneficiary: MultiLocation { parents: 1, interior: X1(Parachain(2093)) } }]), weight_credit: Weight { ref_time: 294654000, proof_size: 6196 }&#xD;&#xA;xcm::barriers                TRACE: TrailingSetTopicAsId origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Rococo), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, instructions: [TransferAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }]), beneficiary: MultiLocation { parents: 1, interior: X1(Parachain(2093)) } }], max_weight: Weight { ref_time: 294654000, proof_size: 6196 }, properties: Properties { weight_credit: Weight { ref_time: 294654000, proof_size: 6196 }, message_id: None }&#xD;&#xA;xcm::barriers                TRACE: TakeWeightCredit origin: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Rococo), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, instructions: [TransferAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }]), beneficiary: MultiLocation { parents: 1, interior: X1(Parachain(2093)) } }], max_weight: Weight { ref_time: 294654000, proof_size: 6196 }, properties: Properties { weight_credit: Weight { ref_time: 294654000, proof_size: 6196 }, message_id: None }&#xD;&#xA;xcm::process                 TRACE: origin: Some(MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Rococo), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }), total_surplus/refunded: Weight { ref_time: 0, proof_size: 0 }/Weight { ref_time: 0, proof_size: 0 }, error_handler_weight: Weight { ref_time: 0, proof_size: 0 }&#xD;&#xA;xcm::process_instruction     TRACE: === TransferAsset { assets: MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }]), beneficiary: MultiLocation { parents: 1, interior: X1(Parachain(2093)) } }&#xD;&#xA;xcm::currency_adapter        TRACE: internal_transfer_asset asset: MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(1000000000000) }, from: MultiLocation { parents: 0, interior: X1(AccountId32 { network: Some(Rococo), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }, to: MultiLocation { parents: 1, interior: X1(Parachain(2093)) }&#xD;&#xA;xcm::execute_xcm_in_credit   TRACE: result: Ok(())&#xD;&#xA;xcm::pallet_xcm::note_unknown_version TRACE: XCM version is unknown for destination: MultiLocation { parents: 1, interior: X1(Parachain(2093)) }&#xD;&#xA;runtime::system              TRACE: Used block weight: PerDispatchClass { normal: Weight { ref_time: 1833216000, proof_size: 14995 }, operational: Weight { ref_time: 0, proof_size: 0 }, mandatory: Weight { ref_time: 10123204000, proof_size: 14325 } }&#xD;&#xA;runtime::system              TRACE: Used block length: 5669&#xD;&#xA;runtime::system              TRACE: Extrinsic failed at block(3699897): &lt;wasm:stripped&gt;&#xD;&#xA;runtime::xcmp-queue-migration DEBUG: Lazy migration finished: item gone&#xD;&#xA;runtime::system              DEBUG: [3699897] 0 extrinsics, length: 5669 (normal 0%, op: 0%, mandatory 0%) / normal weight:Weight(ref_time: 1833216000, proof_size: 14995) (0%) op weight Weight(ref_time: 0, proof_size: 0) (0%) / mandatory weight Weight(ref_time: 10846204000, proof_size: 83501) (0%)&#xD;&#xA;```&#xD;&#xA;But they don't provide much insight into the issue, the only error I can see is `Extrinsic failed at block(3699897): &lt;wasm:stripped&gt;`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43737" PostHistoryTypeId="2" PostId="10958" RevisionGUID="62574f54-1d70-4009-8a38-566bde76fde5" CreationDate="2024-02-05T18:13:52.507" UserId="4121" Text="I'm attempting to debug a release error on our chain (for reference, our chain uses a gitlab-ci and not any provided GitHub Actions) that surfaced after upgrading to the latest Polkadot release. This issue can be reproduced locally using the polkadot-sdk:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;cd polkadot-sdk&#xD;&#xA;git checkout polkadot-v1.6.0&#xD;&#xA;srtool build --app --root --package=rococo-runtime -r polkadot/runtime/rococo/&#xD;&#xA;```&#xD;&#xA;This will result in a failure:&#xD;&#xA;```&#xD;&#xA;--- stderr&#xD;&#xA;  Cannot compile the WASM runtime: no standard library sources found!&#xD;&#xA;  You can install them with `rustup component add rust-src` if you're using `rustup`.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Performing the exact same build process using `polkadot-v1.4.0` or prior is successful.&#xD;&#xA;&#xD;&#xA;What am I doing wrong here?&#xD;&#xA;&#xD;&#xA;Tried with:&#xD;&#xA;```bash&#xD;&#xA;{&#xD;&#xA;  &quot;name&quot;: &quot;srtool&quot;,&#xD;&#xA;  &quot;version&quot;: &quot;0.13.0&quot;,&#xD;&#xA;  &quot;rustc&quot;: &quot;1.74.0&quot;,&#xD;&#xA;  &quot;subwasm&quot;: &quot;v0.20.0&quot;,&#xD;&#xA;  &quot;tera&quot;: &quot;0.2.4&quot;,&#xD;&#xA;  &quot;toml&quot;: &quot;0.2.4&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;And &#xD;&#xA;```bash&#xD;&#xA;srtool-cli 0.12.0&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have only found one workaround for this issue, which is to copy a `rust-toolchain.toml` file directly into `polkadot/runtime/rococo/`, which will force the toolchain update and install the `rust-src` component." ContentLicense="CC BY-SA 4.0" />
  <row Id="43739" PostHistoryTypeId="1" PostId="10958" RevisionGUID="62574f54-1d70-4009-8a38-566bde76fde5" CreationDate="2024-02-05T18:13:52.507" UserId="4121" Text="srtool-cli no rust-src error" ContentLicense="CC BY-SA 4.0" />
  <row Id="43740" PostHistoryTypeId="3" PostId="10958" RevisionGUID="62574f54-1d70-4009-8a38-566bde76fde5" CreationDate="2024-02-05T18:13:52.507" UserId="4121" Text="|releases|srtool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43741" PostHistoryTypeId="2" PostId="10959" RevisionGUID="905d37ba-70c2-43f2-a886-bcd09848100f" CreationDate="2024-02-06T03:33:24.693" UserId="270" Text="You can implement the piecewise linear curve yourself. Something like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	const CURVE: PiecewiseLinear = PiecewiseLinear {&#xD;&#xA;		points: &amp;[&#xD;&#xA;			(sp_arithmetic::Perbill::from_parts(0_000_000_000), sp_arithmetic::Perbill::from_parts(0_050_000_000)),&#xD;&#xA;			(sp_arithmetic::Perbill::from_parts(1_000_000_000), sp_arithmetic::Perbill::from_parts(0_050_000_000)),&#xD;&#xA;		],&#xD;&#xA;		maximum: sp_arithmetic::Perbill::from_parts(0_050_000_000),&#xD;&#xA;	};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43743" PostHistoryTypeId="50" PostId="4677" RevisionGUID="0bf1f0df-1c3c-4314-90fa-0f9e963e05d5" CreationDate="2024-02-06T04:05:45.710" UserId="-1" />
  <row Id="43745" PostHistoryTypeId="2" PostId="10960" RevisionGUID="a294abe4-1ef5-4aab-a702-3bea2f33c94a" CreationDate="2024-02-06T05:23:53.433" UserId="270" Text="It looks like dead code to me, and confusing API.&#xD;&#xA;&#xD;&#xA;I opened an issue here https://github.com/paritytech/polkadot-sdk/issues/3218" ContentLicense="CC BY-SA 4.0" />
  <row Id="43747" PostHistoryTypeId="2" PostId="10961" RevisionGUID="f0c389fb-5e14-4fda-922c-65d491a92a1d" CreationDate="2024-02-06T05:24:25.300" UserId="309" Text="The answer from @dastansam was only half of my problem.&#xD;&#xA;the second error (see *Edit2*) was caused by the `BlockWeights` parameter in mock.rs, defined as shown below:&#xD;&#xA;&#xD;&#xA;    pub BlockWeights: frame_system::limits::BlockWeights =&#xD;&#xA;		frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024_u64, 0));&#xD;&#xA;&#xD;&#xA;THE BLOCK WEIGHT WAS TOO SMALL!!!&#xD;&#xA;I replaced `Weight::from_parts(1024_u64, 0)` by `Weight::MAX` and the tests are now running fine.&#xD;&#xA;Thanks again to @dastansam as his answer showed me the way!!&#xD;&#xA;&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="43749" PostHistoryTypeId="2" PostId="10962" RevisionGUID="219dd28f-d670-4bbc-af45-145d5e4d9954" CreationDate="2024-02-06T09:15:11.920" UserId="2106" Text="Previously, if a parachain wants to continue running and extend lease on Polkadot/Kusama, after winning first slot with crowdloan, it would need to perform direct bid or to get slot with different ParaId and perform swap of leases.&#xD;&#xA;&#xD;&#xA;I am aware that there were some changes in locking mechanism implemented according to [RFC-0014: Improve locking mechanism for parachains](https://github.com/polkadot-fellows/RFCs/blob/main/text/0014-improve-locking-mechanism-for-parachains.md),&#xD;&#xA;&#xD;&#xA;I want to check if I can open a crowdloan with ParaId of already running parachain, and get lease extension for a second time with a new crowdloan, if I also won initial slot with crowdloan and that this slot is not expired.&#xD;&#xA;&#xD;&#xA;Target is to have no downtime and also no overlapping leases.&#xD;&#xA;&#xD;&#xA;Additionally, what is best way to test this in local environment, is it running a zombienet? How to quickly simulate this situation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43751" PostHistoryTypeId="1" PostId="10962" RevisionGUID="219dd28f-d670-4bbc-af45-145d5e4d9954" CreationDate="2024-02-06T09:15:11.920" UserId="2106" Text="Opening crowdloan for already running parachain with same ParaId" ContentLicense="CC BY-SA 4.0" />
  <row Id="43752" PostHistoryTypeId="3" PostId="10962" RevisionGUID="219dd28f-d670-4bbc-af45-145d5e4d9954" CreationDate="2024-02-06T09:15:11.920" UserId="2106" Text="|polkadot|parachain|zombienet|crowdloan|auctions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43753" PostHistoryTypeId="2" PostId="10963" RevisionGUID="20c3da19-8130-4d7d-b77b-fe074b6d2559" CreationDate="2024-02-06T09:53:12.027" UserId="2748" Text="I'm working on pow consensus chain and want to fetch block author in a pallet. I'm following Academy-PoW repo for adding block author through InherentDataProvider. But here default is passed in-place of actual author: &#xD;&#xA;&#xD;&#xA;https://github.com/Polkadot-Blockchain-Academy/Academy-PoW/blob/b522da48f928101c1b05060af7efbbe0c71ccc76/node/src/service.rs#L105C1-L107C1&#xD;&#xA;&#xD;&#xA;How to add actual author instead of default?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have tried this process also: &#xD;&#xA;rust&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;let author = frame_system::Pallet::&lt;T&gt;::digest()&#xD;&#xA;				.logs&#xD;&#xA;				.iter()&#xD;&#xA;				.filter_map(|s| s.as_pre_runtime())&#xD;&#xA;				.filter_map(|(id, mut data)|&#xD;&#xA;					// if id == POW_ENGINE_ID {&#xD;&#xA;					T::AccountId::decode(&amp;mut data).ok()&#xD;&#xA;				// } else {&#xD;&#xA;				// 	None&#xD;&#xA;				// }&#xD;&#xA;				)&#xD;&#xA;				.next();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I get author as None.&#xD;&#xA;&#xD;&#xA;Can anyone please help to fetch the block author in a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43755" PostHistoryTypeId="1" PostId="10963" RevisionGUID="20c3da19-8130-4d7d-b77b-fe074b6d2559" CreationDate="2024-02-06T09:53:12.027" UserId="2748" Text="How to add block author through InherentDataProvider in pow consensus?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43756" PostHistoryTypeId="3" PostId="10963" RevisionGUID="20c3da19-8130-4d7d-b77b-fe074b6d2559" CreationDate="2024-02-06T09:53:12.027" UserId="2748" Text="|substrate-node-template|pallet|consensus|block-production|proof-of-work|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43757" PostHistoryTypeId="5" PostId="10963" RevisionGUID="c7a2ac49-b0d9-404e-a1ad-c9104cfcd7c8" CreationDate="2024-02-06T09:59:20.610" UserId="2748" Comment="deleted 1 character in body" Text="I'm working on pow consensus chain and want to fetch block author in a pallet. I'm following Academy-PoW repo for adding block author through InherentDataProvider. But here default is passed in-place of actual author: &#xD;&#xA;&#xD;&#xA;https://github.com/Polkadot-Blockchain-Academy/Academy-PoW/blob/b522da48f928101c1b05060af7efbbe0c71ccc76/node/src/service.rs#L105C1-L107C1&#xD;&#xA;&#xD;&#xA;How to add actual author instead of default?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;I have tried this process also: &#xD;&#xA;```rust&#xD;&#xA;let author = frame_system::Pallet::&lt;T&gt;::digest()&#xD;&#xA;				.logs&#xD;&#xA;				.iter()&#xD;&#xA;				.filter_map(|s| s.as_pre_runtime())&#xD;&#xA;				.filter_map(|(id, mut data)|&#xD;&#xA;					// if id == POW_ENGINE_ID {&#xD;&#xA;					T::AccountId::decode(&amp;mut data).ok()&#xD;&#xA;				// } else {&#xD;&#xA;				// 	None&#xD;&#xA;				// }&#xD;&#xA;				)&#xD;&#xA;				.next();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But I get author as None.&#xD;&#xA;&#xD;&#xA;Can anyone please help to fetch the block author in a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43758" PostHistoryTypeId="2" PostId="10964" RevisionGUID="1722e436-8f79-4295-8870-2a92d4a7d783" CreationDate="2024-02-06T10:25:05.010" UserId="270" Text="Personally I don't understand why they used inherents here instead of using digest.&#xD;&#xA;&#xD;&#xA;That said, the code you are pointing to is for generating the inherents for the block to import. Those inherents are usually used for checking the inherents that are inside the block to import, in the implementations of `check_inherent`.&#xD;&#xA;&#xD;&#xA;But the author doesn't have any `check_inherent` implementation so what the node pass there is not significant as it won't be used to check anything.&#xD;&#xA;&#xD;&#xA;In the runtime if you want to get the block author you can use the storage `Author` in the `block_author` pallet, it contains the author once the inherent is processed.&#xD;&#xA;&#xD;&#xA;Outside the runtime, when generating inherents for a block to import, you can find the block author by inspecting the block and get the first inherent with the call `set_author`, but the API doesn't let you do this easily.&#xD;&#xA;&#xD;&#xA;I might miss something but personally I wouldn't worry to give a default inherent data for the author as it is not used to check anything. And if this looks not good I would try to refactor the code without the use inherents and instead only use digest to pass the block author." ContentLicense="CC BY-SA 4.0" />
  <row Id="43760" PostHistoryTypeId="2" PostId="10965" RevisionGUID="dc085972-ddea-4216-9f7e-1aa264551385" CreationDate="2024-02-06T12:52:47.507" UserId="360" Text="Upon upgrading dependencies from polkadot-v1.0.0 to polkadot-v1.3.0, we encounnter this error when we try to run benchmarks:&#xD;&#xA;&#xD;&#xA;    cargo build --release --features runtime-benchmarks&#xD;&#xA;    ./target/release/integritee-collator benchmark pallet --list --chain integritee-rococo-local-dev&#xD;&#xA;    Error: Input(&quot;Did not find the benchmarking metadata. This could mean that you either did not build the node correctly with the `--features runtime-benchmarks` flag, or the chain spec that you are using was not created by a node that was compiled with the flag: Other: Exported method Benchmark_benchmark_metadata is not found&quot;)&#xD;&#xA;&#xD;&#xA;the error is new and only appears in this PR:&#xD;&#xA;https://github.com/integritee-network/parachain/pull/259&#xD;&#xA;&#xD;&#xA;which depends on this branch for our custom pallets:&#xD;&#xA;https://github.com/integritee-network/pallets/pull/249&#xD;&#xA;&#xD;&#xA;we basically compared everything to the parachain-template at release-crates-io-v1.3.0&#xD;&#xA;&#xD;&#xA;we found other answers here on SE but didn't find the solution yet&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43762" PostHistoryTypeId="1" PostId="10965" RevisionGUID="dc085972-ddea-4216-9f7e-1aa264551385" CreationDate="2024-02-06T12:52:47.507" UserId="360" Text="Exported method Benchmark_benchmark_metadata is not found" ContentLicense="CC BY-SA 4.0" />
  <row Id="43763" PostHistoryTypeId="3" PostId="10965" RevisionGUID="dc085972-ddea-4216-9f7e-1aa264551385" CreationDate="2024-02-06T12:52:47.507" UserId="360" Text="|benchmarking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43764" PostHistoryTypeId="2" PostId="10966" RevisionGUID="ff6a7eec-f0de-414d-b218-cf50748df3e5" CreationDate="2024-02-06T15:02:04.760" UserId="3933" Text="It's a known issue with XCM that has a fix but still has to get to the rococo runtime, only reserve asset transfers are affected.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43772" PostHistoryTypeId="52" PostId="10963" RevisionGUID="ef6f2ff7-014a-42de-b24f-cf0e73d83c31" CreationDate="2024-02-06T17:53:28.763" />
  <row Id="43773" PostHistoryTypeId="2" PostId="10968" RevisionGUID="baebf7d2-a0df-41b3-916b-24ad1032e478" CreationDate="2024-02-06T18:00:27.413" UserId="5127" Text="I am trying to find all the blocks at which an era payout has occurred on Kusama.&#xD;&#xA;&#xD;&#xA;For that I have queried both these events, `staking.erapaid` and its predecessor `staking.erapayout`, which contain the payout and the corresponding era.&#xD;&#xA;&#xD;&#xA;However, `staking.erapayout` only goes back to era 760, so the question is, how can we find the blocks where era payouts occurred before this point?&#xD;&#xA;&#xD;&#xA;Any help would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43775" PostHistoryTypeId="1" PostId="10968" RevisionGUID="baebf7d2-a0df-41b3-916b-24ad1032e478" CreationDate="2024-02-06T18:00:27.413" UserId="5127" Text="Identifying all Kusama blocks with era payouts" ContentLicense="CC BY-SA 4.0" />
  <row Id="43776" PostHistoryTypeId="3" PostId="10968" RevisionGUID="baebf7d2-a0df-41b3-916b-24ad1032e478" CreationDate="2024-02-06T18:00:27.413" UserId="5127" Text="|kusama|staking|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43777" PostHistoryTypeId="2" PostId="10969" RevisionGUID="8939fc4e-e1c2-46ed-a570-f21b73463824" CreationDate="2024-02-06T18:10:18.493" UserId="167" Text="The best way to inspect historical events is to use tools that expose historical metadata. For example, based on Kusama Subscan: &#xD;&#xA;&#xD;&#xA;- In runtime spec [1058](https://kusama.subscan.io/runtime/Staking?version=1058) neither of the events mentioned above existed. &#xD;&#xA;- In runtime spec [1062](https://kusama.subscan.io/runtime/Staking?version=1062), `EraPayout` was added.&#xD;&#xA;- Later, in runtime spec [9090](https://kusama.subscan.io/runtime/Staking?version=9090), `EraPaid` appears, which seems to be a mere rename of the former. &#xD;&#xA;&#xD;&#xA;Please note that as per the documentation of this event, it is indicating the amount of rewards that was minted for the entire staking system. &#xD;&#xA;&#xD;&#xA;&gt; In general, renaming events is not a good practice, as it leads to such complications, and can easily break frontend libraries. " ContentLicense="CC BY-SA 4.0" />
  <row Id="43780" PostHistoryTypeId="50" PostId="9070" RevisionGUID="bc16cd97-1ec8-4d4e-9ea4-b9e9d0916aac" CreationDate="2024-02-06T23:07:10.910" UserId="-1" />
  <row Id="43781" PostHistoryTypeId="50" PostId="6706" RevisionGUID="4c5560c9-7b83-4ebb-855b-27a71d4f8e96" CreationDate="2024-02-07T08:05:45.730" UserId="-1" />
  <row Id="43782" PostHistoryTypeId="2" PostId="10970" RevisionGUID="0b41d02d-0fcf-4dc7-a91e-0fb862fb68e0" CreationDate="2024-02-07T08:09:01.720" UserId="5130" Text="Is there a similar feature to etherscan where codes are human readable? Or solcscan where contracts are in bytecodes? I can't seem to find any explorer." ContentLicense="CC BY-SA 4.0" />
  <row Id="43784" PostHistoryTypeId="1" PostId="10970" RevisionGUID="0b41d02d-0fcf-4dc7-a91e-0fb862fb68e0" CreationDate="2024-02-07T08:09:01.720" UserId="5130" Text="How can we read the smart contracts deployed on the relay chain parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="43785" PostHistoryTypeId="3" PostId="10970" RevisionGUID="0b41d02d-0fcf-4dc7-a91e-0fb862fb68e0" CreationDate="2024-02-07T08:09:01.720" UserId="5130" Text="|parachain|explorer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43786" PostHistoryTypeId="2" PostId="10971" RevisionGUID="949b4009-1325-467e-8654-9d94d65d75c9" CreationDate="2024-02-07T08:45:15.703" UserId="5131" Text="I'm trying to run the substrate tests with `cargo test --workspace` but seeing the following errors on linux (it works on a mac):&#xD;&#xA;```&#xD;&#xA;error: proc macro panicked&#xD;&#xA;    --&gt; substrate/frame/support/src/lib.rs:2623:10&#xD;&#xA;     |&#xD;&#xA;2623 |     #[doc = docify::embed!(&quot;src/lib.rs&quot;, example_storage_value_append)]&#xD;&#xA;     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = help: message: internal error: entered unreachable code&#xD;&#xA;&#xD;&#xA;error: proc macro panicked&#xD;&#xA;    --&gt; substrate/frame/support/src/lib.rs:2629:10&#xD;&#xA;     |&#xD;&#xA;2629 |     #[doc = docify::embed!(&quot;src/lib.rs&quot;, example_storage_value_try_append)]&#xD;&#xA;     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = help: message: internal error: entered unreachable code&#xD;&#xA;&#xD;&#xA;   Compiling sc-basic-authorship v0.34.0 (/home/../polkadot-sdk/substrate/client/basic-authorship)&#xD;&#xA;error: proc macro panicked&#xD;&#xA;    --&gt; substrate/frame/support/src/lib.rs:2638:10&#xD;&#xA;     |&#xD;&#xA;2638 |     #[doc = docify::embed!(&quot;src/lib.rs&quot;, example_storage_value_decode_len)]&#xD;&#xA;     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = help: message: internal error: entered unreachable code&#xD;&#xA;&#xD;&#xA;   Compiling mmr-rpc v28.0.0 (/home/../polkadot-sdk/substrate/client/merkle-mountain-range/rpc)&#xD;&#xA;error: proc macro panicked&#xD;&#xA;    --&gt; substrate/frame/support/src/lib.rs:2686:10&#xD;&#xA;     |&#xD;&#xA;2686 |     #[doc = docify::embed!(&quot;src/lib.rs&quot;, example_storage_value_map_prefixes)]&#xD;&#xA;     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = help: message: internal error: entered unreachable code&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've tried cloning [docify repo](https://github.com/sam0x17/docify) and running `cargo test`:&#xD;&#xA;```&#xD;&#xA;&gt; cargo test&#xD;&#xA;   Compiling docify v0.2.7 (/home/../docify)&#xD;&#xA;error: proc macro panicked&#xD;&#xA;  --&gt; examples/integration.rs:92:9&#xD;&#xA;   |&#xD;&#xA;92 | #[doc = docify::embed!(&quot;examples/samples.rs&quot;, inner_mod2)]&#xD;&#xA;   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;   |&#xD;&#xA;   = help: message: internal error: entered unreachable code&#xD;&#xA;error: could not compile `docify` (example &quot;integration&quot;) due to previous error&#xD;&#xA;&gt; rustc --version&#xD;&#xA;rustc 1.75.0 (82e1608df 2023-12-21)&#xD;&#xA;```&#xD;&#xA;Any tips on how to resolve it would be appreciated " ContentLicense="CC BY-SA 4.0" />
  <row Id="43788" PostHistoryTypeId="1" PostId="10971" RevisionGUID="949b4009-1325-467e-8654-9d94d65d75c9" CreationDate="2024-02-07T08:45:15.703" UserId="5131" Text="Issue building substrate on linux" ContentLicense="CC BY-SA 4.0" />
  <row Id="43789" PostHistoryTypeId="3" PostId="10971" RevisionGUID="949b4009-1325-467e-8654-9d94d65d75c9" CreationDate="2024-02-07T08:45:15.703" UserId="5131" Text="|testing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43790" PostHistoryTypeId="2" PostId="10972" RevisionGUID="5e093404-4926-443e-a109-bb787381b0e0" CreationDate="2024-02-07T12:10:56.370" UserId="360" Text="the problem was a combination of multiple issues:&#xD;&#xA; 1. cargo didn't realize changes in toml files and didn't rebuild the wasm when it should have&#xD;&#xA; 2. we introduced a `std` leak in our own pallets when `runtime-benchmarks` was enabled&#xD;&#xA; 3. zepter didn't find the std leak" ContentLicense="CC BY-SA 4.0" />
  <row Id="43792" PostHistoryTypeId="2" PostId="10973" RevisionGUID="1513ba12-b914-43f8-8cae-26ec8f23bbe4" CreationDate="2024-02-07T12:35:49.790" UserId="3445" Text="Maybe if you could share your Zombienet, I could help better.&#xD;&#xA;&#xD;&#xA;You can open HRMP channel but you need also sudo account on your local relay chain (I guess you have rococo-local?).&#xD;&#xA;&#xD;&#xA;We have also some scripts for opening HRMP channel for our local testing with zombienet:&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/scripts/bridges_rococo_westend.sh#L211-L214&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/scripts/bridges_common.sh#L165-L190&#xD;&#xA;&#xD;&#xA;or with PJS:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/NbVmF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="43794" PostHistoryTypeId="2" PostId="10974" RevisionGUID="41c131f7-08d7-48b5-b27a-fe210bb8caef" CreationDate="2024-02-07T12:46:54.693" UserId="5131" Text="Looks like there was an issue with my local setup. Everything working as it should on WSL Ubuntu 22.04 and rustc 1.75" ContentLicense="CC BY-SA 4.0" />
  <row Id="43796" PostHistoryTypeId="2" PostId="10975" RevisionGUID="d5ecb907-7909-4f68-9cc8-e2eb1af132ed" CreationDate="2024-02-07T13:36:49.383" UserId="2005" Text="you can read the bytecode/wasm of the contracts from chain state. For the wasm contracts, it is at `contracts.codeStorage()` and for EVM contracts `evm.accountCodes()`&#xD;&#xA;&#xD;&#xA;As for contract verification, I think only Polkaholic currently supports that for wasm contracts. Here is one [example][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://polkaholic.io/wasmcode/0xee0911882a19ef3eab3d9501f22a70fb3c768e67aba1f6b1b36eee51d51a5956#overview" ContentLicense="CC BY-SA 4.0" />
  <row Id="43798" PostHistoryTypeId="5" PostId="10975" RevisionGUID="352370c8-f782-4a25-9e70-1c27383e14e3" CreationDate="2024-02-07T13:46:37.213" UserId="2005" Comment="added 24 characters in body" Text="you can read the bytecode/wasm of the contracts in Polkadot.js explorer from chain state. For the wasm contracts, it is at `contracts.codeStorage()` and for EVM contracts `evm.accountCodes()`&#xD;&#xA;&#xD;&#xA;As for contract verification, I think only Polkaholic currently supports that for wasm contracts. Here is one [example][1]&#xD;&#xA;&#xD;&#xA;  [1]: https://polkaholic.io/wasmcode/0xee0911882a19ef3eab3d9501f22a70fb3c768e67aba1f6b1b36eee51d51a5956#overview" ContentLicense="CC BY-SA 4.0" />
  <row Id="43799" PostHistoryTypeId="5" PostId="10966" RevisionGUID="9af6c50b-2616-4437-af4d-502bc592313e" CreationDate="2024-02-07T14:10:59.427" UserId="3933" Comment="Added links to the issue" Text="It's a known issue with XCM that has a fix but still has to get to the rococo runtime, only reserve asset transfers are affected.&#xD;&#xA;&#xD;&#xA;The issue in GitHub is https://github.com/paritytech/polkadot-sdk/issues/3070 and a patch will be [released to Kusama](https://kusama.subsquare.io/referenda/339)" ContentLicense="CC BY-SA 4.0" />
  <row Id="43800" PostHistoryTypeId="50" PostId="10715" RevisionGUID="f0b1c866-195a-41e8-bac5-54a1f1cf1ce7" CreationDate="2024-02-07T20:01:15.177" UserId="-1" />
  <row Id="43801" PostHistoryTypeId="50" PostId="10771" RevisionGUID="665bad99-27f2-445d-8353-42d48c1a5690" CreationDate="2024-02-08T05:04:10.483" UserId="-1" />
  <row Id="43802" PostHistoryTypeId="50" PostId="4853" RevisionGUID="cc305336-c501-4d2c-8af8-ecc940f95b85" CreationDate="2024-02-08T06:01:45.187" UserId="-1" />
  <row Id="43803" PostHistoryTypeId="50" PostId="10766" RevisionGUID="1b4615f5-2ac1-4a52-b429-1d1f376820bd" CreationDate="2024-02-08T09:02:20.237" UserId="-1" />
  <row Id="43804" PostHistoryTypeId="50" PostId="10736" RevisionGUID="62370e7e-0fd7-4c27-ac68-7b2e6c1b1785" CreationDate="2024-02-08T10:01:50.180" UserId="-1" />
  <row Id="43805" PostHistoryTypeId="2" PostId="10976" RevisionGUID="5f5c2710-0b91-4d65-899e-c4d383a167d5" CreationDate="2024-02-08T11:45:54.270" UserId="4577" Text="i need to check in my dapp when the metadata of my wallet is expired and show a popup telling the user that he needs to update his metadata by clicking an update button on that popup.&#xD;&#xA;&#xD;&#xA;i need to do this so that the user can always see all the transaction data when making a transaction, if the metadata is not updated he will see some hex code.&#xD;&#xA;&#xD;&#xA;How can i update the metadata from inside my app using polkadot.js library ?&#xD;&#xA;Can i do this using some other library ?&#xD;&#xA;Is there any other library that is better than polkadot.js ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43807" PostHistoryTypeId="1" PostId="10976" RevisionGUID="5f5c2710-0b91-4d65-899e-c4d383a167d5" CreationDate="2024-02-08T11:45:54.270" UserId="4577" Text="How can i update polkadot js metadata from inside my app?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43808" PostHistoryTypeId="3" PostId="10976" RevisionGUID="5f5c2710-0b91-4d65-899e-c4d383a167d5" CreationDate="2024-02-08T11:45:54.270" UserId="4577" Text="|polkadot-js|polkadot|metadata|polkadot-js-extension|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43809" PostHistoryTypeId="5" PostId="2887" RevisionGUID="ee9e624d-a75d-4804-8b50-4cfdb366896e" CreationDate="2024-02-08T12:11:12.943" UserId="179" Comment="Update information after RFC 14." Text="# How to extend a slot on the relay chain&#xD;&#xA;&#xD;&#xA;To extend a slot on the relay chain the parachain team needs to secure a new slot via an auction. There are several approaches to doing so. Therefore your team needs to see what is the best fit for your case.&#xD;&#xA;&#xD;&#xA;Each slot can be a most 8 lease periods (LP). That means your team will need to acquire a new slot of 8 LPs via auction.&#xD;&#xA;&#xD;&#xA;To avoid downtime, your team will either need the new LP to start immediately after your existing one or you can have the slots &quot;overlap&quot; each other.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;### Option 1: Overlapping Slots&#xD;&#xA;&#xD;&#xA;Aquire a slot where the first LP is before the last LP of the current slot.&#xD;&#xA;&#xD;&#xA;1. Register a new `paraId`&#xD;&#xA;2. Win a slot auction with the new `paraId`&#xD;&#xA;    - Your team will now have two slots: one that will end soon, and one that just started.&#xD;&#xA;    - Both slots will have at least one LP in common&#xD;&#xA;3. When the old slot transitions to their last LP, your team can do a [swap](https://github.com/paritytech/polkadot/pull/4772) to swap to the new slot.&#xD;&#xA;&#xD;&#xA;&gt; By calling swap, your original paraId will be kept.&#xD;&#xA;&#xD;&#xA;![](https://i.stack.imgur.com/29cNW.png)&#xD;&#xA;&#xD;&#xA;- Currently this has to be done via on-chain governance [example](https://kusama.polkassembly.io/post/1491) but their are [discussions](https://github.com/paritytech/polkadot/pull/5451) to improve the process.&#xD;&#xA;&#xD;&#xA;&gt; Note: This method has the benefit of giving flexibility to the team on when to bid for a slot, however it has the disadvantage of having more than one slot being active during the same LPs.&#xD;&#xA;&#xD;&#xA;### Option 2: Non-overlapping Slots&#xD;&#xA;&#xD;&#xA;Aquire a slot where the first LP starts right after the end of the last LP of the current slot.&#xD;&#xA;&#xD;&#xA;In this case, the team can bid directly with their current paraID, and it will be automatically extended without the need of swapping.&#xD;&#xA;&#xD;&#xA;This method has the advantage of not having superposing LP's on different slots owned by the same team, however it has the disadvantage of losing flexibility on when to win a new slot: if the team does not win the exact slot, then it will suffer some downtime until it wins a new slot.&#xD;&#xA;&#xD;&#xA;----------&#xD;&#xA;&#xD;&#xA;**UPDATE - Feb2024**&#xD;&#xA;&#xD;&#xA;After [RFC14][1] was added on to Polkadot, teams need to know that when using a new paraID (overlapping slots), there's no need for the new paraID to actually run in order to call the swap function. The reason being is that the paraID will not be locked anymore until the parachain produces the first valid block, and therefore the account on the Relay Chain that owns the paraID can call the swap function directly.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/polkadot-fellows/RFCs/blob/main/text/0014-improve-locking-mechanism-for-parachains.md" ContentLicense="CC BY-SA 4.0" />
  <row Id="43810" PostHistoryTypeId="2" PostId="10977" RevisionGUID="959fa4f0-f5ac-496d-9b3a-5c13a9cd4426" CreationDate="2024-02-08T12:39:16.477" UserId="179" Text="There are two things to consider here, non of which are changed with RFC-14:&#xD;&#xA;1. A paraID can't have a Crowdloan Fund if there is already an existing fund mapped to that paraID ([source][1]).&#xD;&#xA;2. A Crowdloan Fund campaign for a specific paraID will last from the moment it's open until it's dissolved. &#xD;&#xA;&#xD;&#xA;When a team wins an auction utilizing a Crowdloan, then the funds locked in the Crowdloan Fund are released when the lease of the paraID finishes. This means that until the paraID is out of leases, then a new Crowdloan Fund Campaign can't be open for that paraID.&#xD;&#xA;&#xD;&#xA;The reason for this is that the system was design with the idea that projects would use the Crowdloan mechanism for their first onboarding on to Polkadot, but would then renew the leases by direct-bidding.&#xD;&#xA;&#xD;&#xA;As for how to test this, the best way that comes to mind is running zombienet locally, but compiling with the `fast-runtime` flag for building Polkadot. Otherwise times will be very long.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;**Extending a lease with a Crowdloan and no Overlapping slots**&#xD;&#xA;&#xD;&#xA;*This methodology of extending a Parachain's lease on Polkadot will result in some downtime.*&#xD;&#xA;&#xD;&#xA;If a team wants to extend their lease using a Crowdloan and with no Overlapping slots, then the steps to execute this are:&#xD;&#xA; 1. Reserve a new paraID (`new_para_id`) and register a parachain. The registration doesn't need to be a valid parachain, as the objective is not for this parachain to ever work.&#xD;&#xA; 2. Open a Crowdloan with for `new_para_id`.&#xD;&#xA; 3. Win an Auction.&#xD;&#xA; 4. Call the swap function on the registrar pallet of the parachain from the existing parachain (`current_para_id`). `Swap(current_para_id, new_para_id)`. If the parachain is unlocked, then the account that owns the paraID on the relay chain can call this, otherwise this needs to be an UMP from the parachain to the relay chain. &#xD;&#xA; 5. Call the swap function from the `new_para_id`. `Swap(new_para_id, current_para_id)`. With [RFC14][2] parachain will be unlocked unlocked, so the account that owns the paraID on the relay chain can call this function.&#xD;&#xA;&#xD;&#xA;Important considerations:&#xD;&#xA;- Step (4) needs to happen before the current parachain is offboarded. Otherwise this will not work.&#xD;&#xA;- Step (5) needs to be done as close as possible to the boundary of the change in the Lease Period to minimize downtime. As these are non-overalapping Lease Periods, the moment the swap function is called the leases will be switched. Therefore the closes the swap is executed to the boundary of the change in Lease Period, the smaller the downtime will be.&#xD;&#xA;- Steps (3) and (4) are not strictly necessary concurrent. The swap from the existing parachain can be called at anytime.&#xD;&#xA;&#xD;&#xA;*Other references*&#xD;&#xA;- [How can a project prolong a parachain slot lease in Kusama?][3]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/2556e33fb4c52ea8192de68df33c151768edc2a9/polkadot/runtime/common/src/crowdloan/mod.rs#L413&#xD;&#xA;  [2]: https://github.com/polkadot-fellows/RFCs/blob/main/text/0014-improve-locking-mechanism-for-parachains.md&#xD;&#xA;  [3]: https://substrate.stackexchange.com/questions/2874/how-can-a-project-prolong-a-parachain-slot-lease-in-kusama/2887#2887" ContentLicense="CC BY-SA 4.0" />
  <row Id="43812" PostHistoryTypeId="2" PostId="10978" RevisionGUID="6166bddb-aad3-4113-9891-5917b0aff693" CreationDate="2024-02-08T15:37:09.957" UserId="555" Text="Please take a look of this implementation: https://github.com/kulupu/kulupu/blob/d9428305d1155514574df79a4692a48711c2bcb2/src/service.rs#L323C1-L324C1&#xD;&#xA;&#xD;&#xA;Here in the service.rs we have passed the author by generating miner id in decode_author function: https://github.com/kulupu/kulupu/blob/d9428305d1155514574df79a4692a48711c2bcb2/src/service.rs#L61C1-L107C1" ContentLicense="CC BY-SA 4.0" />
  <row Id="43814" PostHistoryTypeId="2" PostId="10979" RevisionGUID="da866d89-f150-4fd5-94d6-efc6a0af24c2" CreationDate="2024-02-08T15:38:16.380" UserId="555" Text="Please take a look of this implementation: https://github.com/kulupu/kulupu/blob/d9428305d1155514574df79a4692a48711c2bcb2/src/service.rs#L323C1-L324C1&#xD;&#xA;&#xD;&#xA;Here in the service.rs we have passed the author by generating miner id in decode_author function: https://github.com/kulupu/kulupu/blob/d9428305d1155514574df79a4692a48711c2bcb2/src/service.rs#L61C1-L107C1" ContentLicense="CC BY-SA 4.0" />
  <row Id="43816" PostHistoryTypeId="2" PostId="10980" RevisionGUID="5b4ac85f-7406-46f8-a7f9-c02cbadcc992" CreationDate="2024-02-08T16:21:29.883" UserId="298" Text="I am attempting to curate a call that executes a call from the relay chain to AssetHub, from one normal account (on Rococo) to the same normal account (on AH). &#xD;&#xA;&#xD;&#xA;Once it has reached that account it will use Transact to execute an encoded call, which is to mint some asset for: asset_id 57, amount: 999,999,999,999, dest: Alice. &#xD;&#xA;&#xD;&#xA;The normal account is the owner of the asset and has the authority to mint this asset. &#xD;&#xA;&#xD;&#xA;The Transact part i think is pretty simple, its just an encoded call. &#xD;&#xA;However how do you curate the rest?&#xD;&#xA;&#xD;&#xA;For MultiLocation: I imagine it is `X1` and `AccountId32` to `0x10b44f78c2668684521fda94a1cd6b9d4035156e8c073018d0d59e4aa8cca01b`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;DescendOrigin, BuyExecution and WithdrawAsset, i am not sure of..." ContentLicense="CC BY-SA 4.0" />
  <row Id="43818" PostHistoryTypeId="1" PostId="10980" RevisionGUID="5b4ac85f-7406-46f8-a7f9-c02cbadcc992" CreationDate="2024-02-08T16:21:29.883" UserId="298" Text="How to compose XCM call, which execute from normal account on relay to normal account on parachain(1000), and executes encoded call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43819" PostHistoryTypeId="3" PostId="10980" RevisionGUID="5b4ac85f-7406-46f8-a7f9-c02cbadcc992" CreationDate="2024-02-08T16:21:29.883" UserId="298" Text="|polkadot|xcm|xcmp|xcmv3|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43820" PostHistoryTypeId="4" PostId="10980" RevisionGUID="49117e41-a2c7-4050-a865-b74e306b077e" CreationDate="2024-02-08T16:34:49.160" UserId="298" Comment="edited title" Text="How to compose XCM call, which sends xcm message from a normal account on relay to a normal account on parachain(1000), and executes encoded call?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43821" PostHistoryTypeId="5" PostId="10980" RevisionGUID="49117e41-a2c7-4050-a865-b74e306b077e" CreationDate="2024-02-08T16:34:49.160" UserId="298" Comment="edited title" Text="I am attempting to compose an XCM call that sends a message  from the relay chain to AssetHub, from one normal account (on Rococo) to the same normal account (on AH), and then executes a call. &#xD;&#xA;&#xD;&#xA;Once it has reached that account it will use Transact to execute an encoded call, which is to mint some asset for: asset_id 57, amount: 999,999,999,999, dest: Alice. &#xD;&#xA;&#xD;&#xA;The normal account is the owner of the asset and has the authority to mint this asset. &#xD;&#xA;&#xD;&#xA;The Transact part i think is pretty simple, its just an encoded call. &#xD;&#xA;However how do you curate the rest?&#xD;&#xA;&#xD;&#xA;For MultiLocation: I imagine it is `X1` and `AccountId32` to `0x10b44f78c2668684521fda94a1cd6b9d4035156e8c073018d0d59e4aa8cca01b`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;DescendOrigin, BuyExecution and WithdrawAsset, i am not sure of..." ContentLicense="CC BY-SA 4.0" />
  <row Id="43822" PostHistoryTypeId="2" PostId="10981" RevisionGUID="56ca3c23-6275-492c-a139-9a42866bad54" CreationDate="2024-02-08T20:01:17.373" UserId="2168" Text="I try to implement [How do I get the Result of a Sudo event?](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-result-of-a-sudo-event) in a function shown below. It's mostly an exact copy from the cookbook with some boilerplate.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;export const sudo = async (&#xD;&#xA;    api: ApiPromise,&#xD;&#xA;    signer: KeyringPair,&#xD;&#xA;    call: any,&#xD;&#xA;): Promise&lt;SubmittableResult&gt; =&gt; {&#xD;&#xA;    return new Promise(async (resolve, reject) =&gt; {&#xD;&#xA;        const result = await api.tx.sudo.sudo(call).signAndSend(signer,&#xD;&#xA;                                                           (result) =&gt;&#xD;&#xA;            {&#xD;&#xA;                if (result.status.isInBlock || result.status.isFinalized) {&#xD;&#xA;                    var haveError = false;&#xD;&#xA;                    //explain the error from the function executed by sudo&#xD;&#xA;                    result.events&#xD;&#xA;                    // We know this tx should result in `Sudid` event.&#xD;&#xA;                        .filter(({ event }) =&gt;&#xD;&#xA;                            api.events.sudo.Sudid.is(event)&#xD;&#xA;                               )&#xD;&#xA;                    // We know that `Sudid` returns just a `Result`&#xD;&#xA;                        .forEach(({ event : { data: [result] } }) =&gt; {&#xD;&#xA;                            // Now we look to see if the extrinsic was actually successful or not...&#xD;&#xA;                            if (result.isError) {&#xD;&#xA;                                let error = result.asError;&#xD;&#xA;                                if (error.isModule) {&#xD;&#xA;                                    // for module errors, we have the section indexed, lookup&#xD;&#xA;                                    const decoded = api.registry.findMetaError(error.asModule);&#xD;&#xA;                                    const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;                                    console.log(`${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;                                } else {&#xD;&#xA;                                    // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;                                    console.log(error.toString());&#xD;&#xA;                                }&#xD;&#xA;                            }&#xD;&#xA;                        });&#xD;&#xA;&#xD;&#xA;                    resolve(result);&#xD;&#xA;                } else if (result.status.isInvalid) {&#xD;&#xA;                    reject(new Error(`Extrinsic isInvalid`));&#xD;&#xA;                } else if (result.dispatchError) {&#xD;&#xA;                    reject(new Error(`Dispatch error: ${result.dispatchError}`));&#xD;&#xA;                } else if (result.internalError) {&#xD;&#xA;                    reject(new Error(`Internal error: ${result.internalError}`));&#xD;&#xA;                }&#xD;&#xA;            });&#xD;&#xA;    });&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but get the following compilation error &#xD;&#xA;&#xD;&#xA;     error TS2339: Property 'isError' does not exist on type 'Codec'.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I use a similar construct for regular transactions, it works as expected.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43824" PostHistoryTypeId="1" PostId="10981" RevisionGUID="56ca3c23-6275-492c-a139-9a42866bad54" CreationDate="2024-02-08T20:01:17.373" UserId="2168" Text="Property 'isError' does not exist on type 'Codec', when showing sudo events" ContentLicense="CC BY-SA 4.0" />
  <row Id="43825" PostHistoryTypeId="3" PostId="10981" RevisionGUID="56ca3c23-6275-492c-a139-9a42866bad54" CreationDate="2024-02-08T20:01:17.373" UserId="2168" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43826" PostHistoryTypeId="5" PostId="10981" RevisionGUID="59640e4e-e8eb-45a3-b8ff-84684c2a1945" CreationDate="2024-02-08T21:04:54.317" UserId="2168" Comment="added 29 characters in body" Text="I try to implement [How do I get the Result of a Sudo event?](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-result-of-a-sudo-event) in a function shown below. It's mostly an exact copy from the cookbook with some boilerplate.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;export const sudo = async (&#xD;&#xA;    api: ApiPromise,&#xD;&#xA;    signer: KeyringPair,&#xD;&#xA;    call: any,&#xD;&#xA;): Promise&lt;SubmittableResult&gt; =&gt; {&#xD;&#xA;    return new Promise(async (resolve, reject) =&gt; {&#xD;&#xA;        const result = await api.tx.sudo.sudo(call).signAndSend(signer,&#xD;&#xA;                                                           (result) =&gt;&#xD;&#xA;            {&#xD;&#xA;                if (result.status.isInBlock || result.status.isFinalized) {&#xD;&#xA;                  &#xD;&#xA;                    //explain the error from the function executed by sudo&#xD;&#xA;                    result.events&#xD;&#xA;                        // We know this tx should result in `Sudid` event.&#xD;&#xA;                        .filter(({ event }) =&gt; api.events.sudo.Sudid.is(event))&#xD;&#xA;                        // We know that `Sudid` returns just a `Result`&#xD;&#xA;                        .forEach(({ event : { data: [result] } }) =&gt; {&#xD;&#xA;                            // Now we look to see if the extrinsic was actually successful or not...&#xD;&#xA;                            if (result.isError) {&#xD;&#xA;                                let error = result.asError;&#xD;&#xA;                                if (error.isModule) {&#xD;&#xA;                                    // for module errors, we have the section indexed, lookup&#xD;&#xA;                                    const decoded = api.registry.findMetaError(error.asModule);&#xD;&#xA;                                    const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;                                    console.log(`${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;                                } else {&#xD;&#xA;                                    // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;                                    console.log(error.toString());&#xD;&#xA;                                }&#xD;&#xA;                            }&#xD;&#xA;                        });&#xD;&#xA;&#xD;&#xA;                    resolve(result);&#xD;&#xA;                } else if (result.status.isInvalid) {&#xD;&#xA;                    reject(new Error(`Extrinsic isInvalid`));&#xD;&#xA;                } else if (result.dispatchError) {&#xD;&#xA;                    reject(new Error(`Dispatch error: ${result.dispatchError}`));&#xD;&#xA;                } else if (result.internalError) {&#xD;&#xA;                    reject(new Error(`Internal error: ${result.internalError}`));&#xD;&#xA;                }&#xD;&#xA;            });&#xD;&#xA;    });&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but get the following compilation error &#xD;&#xA;&#xD;&#xA;     error TS2339: Property 'isError' does not exist on type 'Codec'.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I use a [similar construct](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event) for regular transactions, it works as expected.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43827" PostHistoryTypeId="50" PostId="9894" RevisionGUID="ab3af827-6af9-468a-965e-f5511de8b2c2" CreationDate="2024-02-08T21:07:20.907" UserId="-1" />
  <row Id="43828" PostHistoryTypeId="5" PostId="10981" RevisionGUID="bb3984e4-8b5c-4f5a-be11-c89f1e61909b" CreationDate="2024-02-08T22:17:39.580" UserId="2168" Comment="added 32 characters in body" Text="I try to implement [How do I get the Result of a Sudo event?](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-result-of-a-sudo-event) in a function shown below. It's mostly an exact copy from the cookbook with some boilerplate.&#xD;&#xA;&#xD;&#xA;```js&#xD;&#xA;export const sudo = async (&#xD;&#xA;    api: ApiPromise,&#xD;&#xA;    signer: KeyringPair,&#xD;&#xA;    call: any,&#xD;&#xA;): Promise&lt;SubmittableResult&gt; =&gt; {&#xD;&#xA;    return new Promise(async (resolve, reject) =&gt; {&#xD;&#xA;        const result = await api.tx.sudo.sudo(call).signAndSend(signer,&#xD;&#xA;                                                           (result) =&gt;&#xD;&#xA;            {&#xD;&#xA;                if (result.status.isInBlock || result.status.isFinalized) {&#xD;&#xA;                  &#xD;&#xA;                    //explain the error from the function executed by sudo&#xD;&#xA;                    result.events&#xD;&#xA;                        // We know this tx should result in `Sudid` event.&#xD;&#xA;                        .filter(({ event }) =&gt; api.events.sudo.Sudid.is(event))&#xD;&#xA;                        // We know that `Sudid` returns just a `Result`&#xD;&#xA;                        .forEach(({ event : { data: [result] } }) =&gt; {&#xD;&#xA;                            // Now we look to see if the extrinsic was actually successful or not...&#xD;&#xA;                            if (result.isError) {&#xD;&#xA;                                let error = result.asError;&#xD;&#xA;                                if (error.isModule) {&#xD;&#xA;                                    // for module errors, we have the section indexed, lookup&#xD;&#xA;                                    const decoded = api.registry.findMetaError(error.asModule);&#xD;&#xA;                                    const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;                                    console.log(`${section}.${name}: ${docs.join(' ')}`);&#xD;&#xA;                                } else {&#xD;&#xA;                                    // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;                                    console.log(error.toString());&#xD;&#xA;                                }&#xD;&#xA;                            }&#xD;&#xA;                        });&#xD;&#xA;&#xD;&#xA;                    resolve(result);&#xD;&#xA;                } else if (result.status.isInvalid) {&#xD;&#xA;                    reject(new Error(`Extrinsic isInvalid`));&#xD;&#xA;                } else if (result.dispatchError) {&#xD;&#xA;                    reject(new Error(`Dispatch error: ${result.dispatchError}`));&#xD;&#xA;                } else if (result.internalError) {&#xD;&#xA;                    reject(new Error(`Internal error: ${result.internalError}`));&#xD;&#xA;                }&#xD;&#xA;            });&#xD;&#xA;    });&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but get the following compilation error &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;     if (result.isError) {&#xD;&#xA;&#xD;&#xA;     error TS2339: Property 'isError' does not exist on type 'Codec'.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;When I use a [similar construct](https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event) for regular transactions, it works as expected.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43829" PostHistoryTypeId="50" PostId="4460" RevisionGUID="fcc734b1-3acb-4e1c-96e2-55967633459e" CreationDate="2024-02-09T02:03:45.487" UserId="-1" />
  <row Id="43830" PostHistoryTypeId="50" PostId="10785" RevisionGUID="109ad5c6-3efb-4041-b8c3-2227a26e2317" CreationDate="2024-02-09T03:12:06.570" UserId="-1" />
  <row Id="43833" PostHistoryTypeId="2" PostId="10983" RevisionGUID="18619873-6406-4264-bee9-5e2b30068be5" CreationDate="2024-02-09T09:12:03.197" UserId="3983" Text="Looking into it a bit, it seems that the `Sudid` event is not plainly a `RuntimeError`, maybe it was in the past but not anymore. It's an event with payload. You need to extract the actual `RuntimeError` from a payload called `sudoResult` from the `Sudid` events payload. &#xD;&#xA;&#xD;&#xA;Sudid Event of the Events Enum of the `pallet_sudo`:&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/e2caa813bfd2973e7a7a74aa5292433397dbc787/substrate/frame/sudo/src/lib.rs#L302-L306&#xD;&#xA;&#xD;&#xA;Here is an adapted piece of code how to do it.&#xD;&#xA;&#xD;&#xA;```lang-ts&#xD;&#xA;const unsubscribe = await api.tx.sudo&#xD;&#xA;  .sudo(api.tx.balances.forceTransfer(user1, user2, amount))&#xD;&#xA;  .signAndSend(keyring.createFromUri(&quot;//Alice&quot;), ({ status, events }) =&gt; {&#xD;&#xA;    switch (status.type) {&#xD;&#xA;      case &quot;Finalized&quot;:&#xD;&#xA;      case &quot;InBlock&quot;:&#xD;&#xA;        {&#xD;&#xA;          if (status.isInBlock) {&#xD;&#xA;            console.log(&quot;Transaction included at blockHash&quot;, status.asInBlock);&#xD;&#xA;          }&#xD;&#xA;&#xD;&#xA;          events.forEach((record) =&gt; {&#xD;&#xA;            if (api.events.sudo.Sudid.is(record.event)) {&#xD;&#xA;&#xD;&#xA;              // NEW PART:&#xD;&#xA;              if (record.event.data.sudoResult.isErr) {&#xD;&#xA;&#xD;&#xA;                // SAME PART AS IN DOCS:&#xD;&#xA;                let error = record.event.data.sudoResult.asErr;&#xD;&#xA;                if (error.isModule) {&#xD;&#xA;                  // for module errors, we have the section indexed, lookup&#xD;&#xA;                  const decoded = api.registry.findMetaError(error.asModule);&#xD;&#xA;                  const { docs, name, section } = decoded;&#xD;&#xA;&#xD;&#xA;                  console.log(`${section}.${name}: ${docs.join(&quot; &quot;)}`);&#xD;&#xA;                } else {&#xD;&#xA;                  // Other, CannotLookup, BadOrigin, no extra info&#xD;&#xA;                  console.log(error.toString());&#xD;&#xA;                }&#xD;&#xA;              }&#xD;&#xA;              return record.event;&#xD;&#xA;            }&#xD;&#xA;          });&#xD;&#xA;        }&#xD;&#xA;        break;&#xD;&#xA;      default:&#xD;&#xA;        break;&#xD;&#xA;    }&#xD;&#xA;  });&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;The docs are surely outdated here, I will create a PR to make it work again.&#xD;&#xA;Hope this helps." ContentLicense="CC BY-SA 4.0" />
  <row Id="43835" PostHistoryTypeId="2" PostId="10984" RevisionGUID="e069fa0f-046f-4944-9849-2337d1ee9648" CreationDate="2024-02-09T09:23:28.950" UserId="555" Text="Is it possible to fetch the validator's public address who approve(2/3) the current block in a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43837" PostHistoryTypeId="1" PostId="10984" RevisionGUID="e069fa0f-046f-4944-9849-2337d1ee9648" CreationDate="2024-02-09T09:23:28.950" UserId="555" Text="Is it possible to fetch the validator's public address who approve the current block?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43838" PostHistoryTypeId="3" PostId="10984" RevisionGUID="e069fa0f-046f-4944-9849-2337d1ee9648" CreationDate="2024-02-09T09:23:28.950" UserId="555" Text="|pallet|validator|block|address|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43839" PostHistoryTypeId="2" PostId="10985" RevisionGUID="54191144-52b0-4ec1-b8bf-d940e7a64476" CreationDate="2024-02-09T10:29:53.470" UserId="5141" Text="I have Astar(Astr) on as an EVM on Metamask and want to eventually take profit on some of it and move that portion to USDT.  My plan is to swap it for DOT first on Polkadt.js wallet.  The problem is that the the Pollkadot wallet does not start with 0x, Therefore Metamask can only send to 0x...   I've does a all of research on  Astar.doc.network plus U tube videos, could not find a solution. " ContentLicense="CC BY-SA 4.0" />
  <row Id="43841" PostHistoryTypeId="1" PostId="10985" RevisionGUID="54191144-52b0-4ec1-b8bf-d940e7a64476" CreationDate="2024-02-09T10:29:53.470" UserId="5141" Text="move Astr EVM from Metamask to Polkadt.js" ContentLicense="CC BY-SA 4.0" />
  <row Id="43842" PostHistoryTypeId="3" PostId="10985" RevisionGUID="54191144-52b0-4ec1-b8bf-d940e7a64476" CreationDate="2024-02-09T10:29:53.470" UserId="5141" Text="|polkadot-js|evm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43843" PostHistoryTypeId="5" PostId="10980" RevisionGUID="8cfed107-d144-491f-9ef0-651880fe29e7" CreationDate="2024-02-09T10:45:49.927" UserId="298" Comment="added 66 characters in body" Text="I am attempting to compose an XCM call that sends a message  from the relay chain to AssetHub, from one normal account (on Rococo) to the same normal account (on AH), and then executes a call. &#xD;&#xA;&#xD;&#xA;Once it has reached that account it will use Transact to execute an encoded call, which is to mint some asset for: asset_id 57, amount: 999,999,999,999, dest: Alice. &#xD;&#xA;&#xD;&#xA;The normal account is the owner of the asset and has the authority to mint this asset. &#xD;&#xA;&#xD;&#xA;The Transact part i think is pretty simple, its just an encoded call. &#xD;&#xA;However how do you curate the rest?&#xD;&#xA;&#xD;&#xA;For MultiLocation: I imagine it is `X1` and `AccountId32` to `0x10b44f78c2668684521fda94a1cd6b9d4035156e8c073018d0d59e4aa8cca01b`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;DescendOrigin, BuyExecution and WithdrawAsset, i am not sure of...&#xD;&#xA;&#xD;&#xA;where's the best place to learn about composing XCM calls?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43844" PostHistoryTypeId="2" PostId="10986" RevisionGUID="284afb6f-184a-4c5b-a134-46d72f26d12f" CreationDate="2024-02-09T13:20:59.407" UserId="116" Text="When testing my runtime upgrade from polkadot_v1.0.0 to 1.5.0 with try-runtime I get this error from `try-runtime` &#xD;&#xA;&#xD;&#xA;&gt;    [2024-02-06T14:50:51Z ERROR runtime::executive] - 0. error: Failed to decode storage item \`ParachainSystem::HostConfiguration\`&#xD;&#xA;&#xD;&#xA;Enabling debug info reveals the offending key `0x45323df7cc47150b3930e2666b0aa313c522231880238a0c56021b8744a00743` also known as `parachainSystem.hostConfiguration()`&#xD;&#xA;&#xD;&#xA;Why does try-runtime think this type is `ParachainSystem::HostConfiguration`, this type is not even included in my build? In polkadot js the type is `PolkadotPrimitivesV5AbridgedHostConfiguration` before the upgrade and `v6` after. &#xD;&#xA;&#xD;&#xA;When I delete the storage key in the migration the error disappears but will this have any negative side effects?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43846" PostHistoryTypeId="1" PostId="10986" RevisionGUID="284afb6f-184a-4c5b-a134-46d72f26d12f" CreationDate="2024-02-09T13:20:59.407" UserId="116" Text="Runtime upgrade for `ParachainSystem::HostConfiguration`" ContentLicense="CC BY-SA 4.0" />
  <row Id="43847" PostHistoryTypeId="3" PostId="10986" RevisionGUID="284afb6f-184a-4c5b-a134-46d72f26d12f" CreationDate="2024-02-09T13:20:59.407" UserId="116" Text="|runtime-upgrade|try-runtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43848" PostHistoryTypeId="5" PostId="10934" RevisionGUID="7da3e182-da15-499a-947f-6299bbd313ce" CreationDate="2024-02-09T13:24:40.477" UserId="116" Comment="Elaborating in question with info from comments" Text="Is it possible to get the list of validators which validate a particular block?&#xD;&#xA;&#xD;&#xA;For instance, let's say we have at block 10 and if this block is finalised then I need to find the list of validators who approved this 10th block." ContentLicense="CC BY-SA 4.0" />
  <row Id="43849" PostHistoryTypeId="2" PostId="10987" RevisionGUID="4bf5d0c9-c0a2-4abf-a8c1-5d88875ce00c" CreationDate="2024-02-09T13:45:02.420" UserId="3991" Text="You can find examples of using `Transact` and other XCM primitives at the docs https://paritytech.github.io/xcm-docs/journey/transact.html&#xD;&#xA;&#xD;&#xA;Usually if using `Transact`, you want to also use it with `BuyExecution` and `WithdrawAsset`. Here's an example from the docs:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;let call = parachain::RuntimeCall::Balances(&#xD;&#xA;    pallet_balances::Call::&lt;parachain::Runtime&gt;::set_balance {&#xD;&#xA;        who: ALICE,&#xD;&#xA;        new_free: 5 * AMOUNT,&#xD;&#xA;        new_reserved: 0,&#xD;&#xA;    },&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;let message = Xcm(vec![&#xD;&#xA;    WithdrawAsset((Here, AMOUNT).into()),&#xD;&#xA;    BuyExecution { fees: (Here, AMOUNT).into(), weight_limit: WeightLimit::Unlimited },&#xD;&#xA;    Transact {&#xD;&#xA;        origin_kind: OriginKind::Superuser,&#xD;&#xA;        require_weight_at_most: Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024),&#xD;&#xA;        call: call.encode().into(),&#xD;&#xA;    },&#xD;&#xA;]);&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="43851" PostHistoryTypeId="5" PostId="10984" RevisionGUID="34704f25-65c7-47e5-814c-75d46ec6690f" CreationDate="2024-02-09T16:00:00.533" UserId="555" Comment="added 1 character in body; edited title" Text="Is it possible to fetch the validator's public address who validates the current block in a pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43852" PostHistoryTypeId="4" PostId="10984" RevisionGUID="34704f25-65c7-47e5-814c-75d46ec6690f" CreationDate="2024-02-09T16:00:00.533" UserId="555" Comment="added 1 character in body; edited title" Text="Is it possible to fetch the validator's public address who validates the current block?[updated]" ContentLicense="CC BY-SA 4.0" />
  <row Id="43853" PostHistoryTypeId="2" PostId="10988" RevisionGUID="3f17739a-d63c-4890-955f-2f5ee638a77a" CreationDate="2024-02-09T18:02:59.050" UserId="298" Text="The goal is to give polkadot governance the authority to mint an Asset on asset hub. &#xD;&#xA;&#xD;&#xA;We want to avoid Root referendum because that requires `100,000 DOT` decision deposit. &#xD;&#xA;&#xD;&#xA;We would like to through one of the other referendum tracks. &#xD;&#xA;&#xD;&#xA;The hypothesis is:&#xD;&#xA;&#xD;&#xA;- The referendum track (like Medium Spender) can act as an Origin. &#xD;&#xA;&#xD;&#xA;- We can assign Medium Spender to be the `Issuer` of an asset on AssetHub. &#xD;&#xA;&#xD;&#xA;- A referendum can be passed which contains an xcm instruction to mint tokens on asset hub. &#xD;&#xA;&#xD;&#xA;I will try and test this and share an answer as well, but any support would be appreciated. Perhaps i am missing a step, or perhaps there is a better way to achieve the stated goal. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43855" PostHistoryTypeId="1" PostId="10988" RevisionGUID="3f17739a-d63c-4890-955f-2f5ee638a77a" CreationDate="2024-02-09T18:02:59.050" UserId="298" Text="How to give polkadot governance the authority to mint an Asset on asset hub?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43856" PostHistoryTypeId="3" PostId="10988" RevisionGUID="3f17739a-d63c-4890-955f-2f5ee638a77a" CreationDate="2024-02-09T18:02:59.050" UserId="298" Text="|polkadot|assets|pallet-asset|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43857" PostHistoryTypeId="5" PostId="7802" RevisionGUID="46ae575f-3285-457f-ab7d-6091581d5e63" CreationDate="2024-02-09T18:44:16.443" UserId="3983" Comment="edited body" Text="I'm not an expert on the polkadotjs ui codebase but as you discovered, the app uses `react-dropzone`([docs](https://react-dropzone.js.org/)) library for the `&lt;Dropzone /&gt;`. &#xD;&#xA;&#xD;&#xA;I think you could just potentially call the passed `_onDrop` function yourself with your `metadata.json` from code in a `useEffect()` hook. And potentially the `accept` method passed to the `InputFile` component.&#xD;&#xA;&#xD;&#xA;But maybe that is even to much if you don't need the user to have the ability to choose a file manually. Without the possibility to upload a file you could just craft a user flow without the `react-dropzone` part and just use polkadotjs with the metadata you've bundled in your js app or fetched from a server in your code.&#xD;&#xA;&#xD;&#xA;Hope this helps.&#xD;&#xA;&#xD;&#xA;GitHub Issue: `react-dropzone`: [initialize react dropzone with file #917](https://github.com/react-dropzone/react-dropzone/issues/917)" ContentLicense="CC BY-SA 4.0" />
  <row Id="43858" PostHistoryTypeId="2" PostId="10989" RevisionGUID="9122cfec-d069-4071-8e50-6eee133edba8" CreationDate="2024-02-09T18:53:13.110" UserId="3983" Text="Afaik it should still fire for both `InBlock` and `Finalized`, as the extrinsic can and should be again included into another block, which than gets finalized.&#xD;&#xA;&#xD;&#xA;The extrinsic is still valid, but was part of a block which not get finalized, therefore got into the `Retracted` state.&#xD;&#xA;&#xD;&#xA;This accepted answer also states this behavior:&#xD;&#xA;https://substrate.stackexchange.com/a/8873/3983&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43860" PostHistoryTypeId="50" PostId="10588" RevisionGUID="bfabd01f-d785-4846-a6a5-31a257cddc73" CreationDate="2024-02-09T22:06:00.740" UserId="-1" />
  <row Id="43865" PostHistoryTypeId="2" PostId="10990" RevisionGUID="f2bbe2db-a200-48bc-8e4b-b3320e314272" CreationDate="2024-02-10T02:56:03.477" UserId="5143" Text="If you want to know the list of active validators, I can see this on Polkadot.js under developer -&gt; chain state -&gt; storage -&gt; session -&gt; validators(). It also looks like you can provide a block hash to query the chain as of a specific block." ContentLicense="CC BY-SA 4.0" />
  <row Id="43867" PostHistoryTypeId="5" PostId="10988" RevisionGUID="2cf8590d-4e2b-4e9f-98bd-2947b7d9db9f" CreationDate="2024-02-10T11:29:57.287" UserId="298" Comment="added 8 characters in body; edited title" Text="The goal is to give a polkadot referendum Track the authority to mint an Asset on asset hub. &#xD;&#xA;&#xD;&#xA;We want to avoid Root referendum because that requires `100,000 DOT` decision deposit. &#xD;&#xA;&#xD;&#xA;We would like to through one of the other referendum tracks. &#xD;&#xA;&#xD;&#xA;The hypothesis is:&#xD;&#xA;&#xD;&#xA;- The referendum track (like Medium Spender) can act as an Origin. &#xD;&#xA;&#xD;&#xA;- We can assign Medium Spender to be the `Issuer` of an asset on AssetHub. &#xD;&#xA;&#xD;&#xA;- A referendum can be passed which contains an xcm instruction to mint tokens on asset hub. &#xD;&#xA;&#xD;&#xA;I will try and test this and share an answer as well, but any support would be appreciated. Perhaps i am missing a step, or perhaps there is a better way to achieve the stated goal. &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43868" PostHistoryTypeId="4" PostId="10988" RevisionGUID="2cf8590d-4e2b-4e9f-98bd-2947b7d9db9f" CreationDate="2024-02-10T11:29:57.287" UserId="298" Comment="added 8 characters in body; edited title" Text="How to give a polkadot referednum Track the authority to mint an Asset on asset hub?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43869" PostHistoryTypeId="2" PostId="10991" RevisionGUID="fa08404f-1d34-4930-8446-781ac24b5750" CreationDate="2024-02-10T11:46:00.510" UserId="309" Text="I am testing a pallet using the democracy pallet, and I am struggling with the enactment step. First of all, the proposal is correctly enacted when using the pallet in polkadot.js: the problem occurs during testing. &#xD;&#xA;The referendum infos are easily extracted through `info = Democracy::referendum_info(0);` and are :&#xD;&#xA;&#xD;&#xA;    Some(ReferendumInfo::Ongoing(ReferendumStatus { end: 4, proposal: Bounded::Inline(BoundedVec([11, 1, 0, 0, 0, 0, 0, 3], 128)), threshold: VoteThreshold::SimpleMajority, delay: 2, tally: Tally { ayes: 6, nays: 0, turnout: 6 } }))&#xD;&#xA;&#xD;&#xA;So it ends at `block 4`, and is enacted with a delay of 2 blocks (`block 6` for enactment).&#xD;&#xA;Fast forwarding to `block 4` correctly ends the referendum:&#xD;&#xA;&#xD;&#xA;    Some(ReferendumInfo::Finished { approved: true, end: 4 })&#xD;&#xA;&#xD;&#xA;but going to `block 6` and beyond does not enact the proposal as it should.&#xD;&#xA;Any suggestion please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43871" PostHistoryTypeId="1" PostId="10991" RevisionGUID="fa08404f-1d34-4930-8446-781ac24b5750" CreationDate="2024-02-10T11:46:00.510" UserId="309" Text="Testing pallet_democracy proposal enactment" ContentLicense="CC BY-SA 4.0" />
  <row Id="43872" PostHistoryTypeId="3" PostId="10991" RevisionGUID="fa08404f-1d34-4930-8446-781ac24b5750" CreationDate="2024-02-10T11:46:00.510" UserId="309" Text="|substrate-node|testing|pallet-democracy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43873" PostHistoryTypeId="5" PostId="10991" RevisionGUID="ac4bb3cc-89ab-4f91-b8ff-c3167ea9ca46" CreationDate="2024-02-10T11:51:35.510" UserId="309" Comment="added 4 characters in body" Text="I am testing a pallet using the democracy pallet, and I am struggling with the enactment step. First of all, **the proposal is correctly enacted when using the pallet in polkadot.js**: the problem occurs during testing. &#xD;&#xA;The referendum infos are easily extracted through `info = Democracy::referendum_info(0);` and are :&#xD;&#xA;&#xD;&#xA;    Some(ReferendumInfo::Ongoing(ReferendumStatus { end: 4, proposal: Bounded::Inline(BoundedVec([11, 1, 0, 0, 0, 0, 0, 3], 128)), threshold: VoteThreshold::SimpleMajority, delay: 2, tally: Tally { ayes: 6, nays: 0, turnout: 6 } }))&#xD;&#xA;&#xD;&#xA;So it ends at `block 4`, and is enacted with a delay of 2 blocks (`block 6` for enactment).&#xD;&#xA;Fast forwarding to `block 4` correctly ends the referendum:&#xD;&#xA;&#xD;&#xA;    Some(ReferendumInfo::Finished { approved: true, end: 4 })&#xD;&#xA;&#xD;&#xA;but going to `block 6` and beyond does not enact the proposal as it should.&#xD;&#xA;Any suggestion please?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43874" PostHistoryTypeId="4" PostId="10988" RevisionGUID="6bf5a1e2-e4a1-4a23-8427-ab032f9c67b9" CreationDate="2024-02-10T12:30:15.487" UserId="298" Comment="edited title" Text="How to give a polkadot referendum Track the authority to mint an Asset on asset hub?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43875" PostHistoryTypeId="2" PostId="10992" RevisionGUID="f7f73da6-66f2-43fb-8ef7-fb6b5e6b80b1" CreationDate="2024-02-10T12:38:29.410" UserId="298" Text="I am looking to leverage the referendum track in a creative way by assigning the Medium Spender track ownership of an asset on AH. &#xD;&#xA;&#xD;&#xA;In order to do this we need to find an address for the track. I know that [DescribeFamily][1] might be relevant. &#xD;&#xA;&#xD;&#xA;The goal is to find a public key for the MediumSpender Origin to test this approach. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/a86dee6da4de13a51e91f7582209bd8569cdab7f/polkadot/runtime/rococo/src/xcm_config.rs#L69" ContentLicense="CC BY-SA 4.0" />
  <row Id="43877" PostHistoryTypeId="1" PostId="10992" RevisionGUID="f7f73da6-66f2-43fb-8ef7-fb6b5e6b80b1" CreationDate="2024-02-10T12:38:29.410" UserId="298" Text="How do you find the public key for the Medium Spender track Origin?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43878" PostHistoryTypeId="3" PostId="10992" RevisionGUID="f7f73da6-66f2-43fb-8ef7-fb6b5e6b80b1" CreationDate="2024-02-10T12:38:29.410" UserId="298" Text="|xcm|opengov|referendum|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43880" PostHistoryTypeId="5" PostId="10984" RevisionGUID="a0b880bd-2d52-4f96-9121-27cb74a322f3" CreationDate="2024-02-10T14:37:09.257" UserId="555" Comment="added 123 characters in body" Text="I'm working on a chain where I need to gather the validator's public address who validate the current block.&#xD;&#xA;So is it possible to fetch the validator's public address who validates the current block in a pallet?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="43881" PostHistoryTypeId="2" PostId="10993" RevisionGUID="2616ac0b-e1ad-49f4-bed0-e3551f01b0ce" CreationDate="2024-02-10T15:09:45.373" UserId="167" Text="There is no correct answer to this question, but it is a very good one, because it highlights the nice account abstractions that FRAME, Substrate and Polkadot give you out of the box. &#xD;&#xA;&#xD;&#xA;An _Origin_ in a FRAME-based runtime is by no means a 1-1 mapping to an account-id, and therefore, it need not necessarily have a public key associated with it. This applies to `MediumSpender` as well. &#xD;&#xA;&#xD;&#xA;An origin is an abstract representation of the *caller of a particular extrinsic*. In *most* cases and in *most* blockchains, that origin is a signed statement from a user, in which case we also call the extrinsic a _transaction_, but this is not necessarily the case in FRAME. FRAME instead allows you to describe extrinsic that require origins that do not map to any particular account, but instead have abstract meanings. &#xD;&#xA;&#xD;&#xA;The best example of this system's usage is onchain governance. A particular extrinsic in the system could be described as follows: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn enact_upgrade(o: RuntimeOrigin) {&#xD;&#xA;    // Ensure `o` is representing 2/3 of the token holders in the system&#xD;&#xA;} &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can there be one account-id that is the public key of 2/3 of the token holders?&#xD;&#xA;&#xD;&#xA;Then you might ask how the above extrinsic is ever called? The answer is that the runtime itself is in charge of constructing these abstract origins. In this case, an entire pallet could be dedicated to performing token-based voting, and when this pallet realizes that 2/3 of the token holders have approved an operation, it executes the above extrinsic, with the right origin type. &#xD;&#xA;&#xD;&#xA;If you look at the (old) `pallet-democracy` code, it has a very clear example of [this](https://github.com/paritytech/polkadot-sdk/blob/edd95b3749754d2ed0c5738588e872c87be91624/substrate/frame/democracy/src/lib.rs#L1603-L1633). Once this pallet is happy with a referendu, it will schedule it to execute using the `frame_system::RawOrigin::Root`. Again, `frame_system::RawOrigin::Root` is one origin option, but it is not callable by any signature, and the Runtime itself is deciding when to use it. &#xD;&#xA;&#xD;&#xA;--- &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you look at the expanded `RuntimeOrigin` of any runtime, it looks like this: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum RuntimeOrigin {&#xD;&#xA;  System(frame_system::Origin),&#xD;&#xA;  OtherPallet(other_pallet::Origin),&#xD;&#xA;  // more &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Where in `frame_system::Origin`, one of the variants is [`Signed`](https://paritytech.github.io/polkadot-sdk/master/frame/prelude/frame_system/type.Origin.html). &#xD;&#xA;&#xD;&#xA;To take a step back, any extrinsic in FRAME takes a `origin: RuntimeOrigin` as the first argument, which is more or less the above type. And it can do any check it wishes based on the above `RuntimeOrigin`, and being `Signed(_)` is merely one of the many options. &#xD;&#xA;&#xD;&#xA;&gt; This example is slightly over-simpliefied, as the pallet will not have access to the `RuntimeOrigin` as a concrete type. This is sensible, as a pallet does not know in which runtime it lives, and which other pallets are surrounding it. In practive, the first argument is an associated type that it uses as `&lt;T as frame_system::Config&gt;::RuntimeOrigin`, which is only known at the runtime level. &#xD;&#xA;&#xD;&#xA;This [recent talk from Gavin Wood](https://youtu.be/j7b8Upipmeg?si=83_XUgYuJxMwWX4g&amp;t=195) at ProtocolBerg describes this concept." ContentLicense="CC BY-SA 4.0" />
  <row Id="43883" PostHistoryTypeId="5" PostId="10993" RevisionGUID="799738ca-52af-499c-8bd4-203660dbcbe4" CreationDate="2024-02-10T15:16:54.620" UserId="167" Comment="added 654 characters in body" Text="There is no correct answer to this question, but it is a very good one, because it highlights the (powerful) **account abstraction**s that FRAME, Substrate and Polkadot give you out of the box. &#xD;&#xA;&#xD;&#xA;An _Origin_ in a FRAME-based runtime is by no means a 1-1 mapping to an account-id, and therefore, it need not necessarily have a public key associated with it. This applies to `MediumSpender` as well. &#xD;&#xA;&#xD;&#xA;An origin is an abstract representation of the *caller of a particular extrinsic*, primarily meant to convey **privilege**. A normal transfer which starts with [`ensure_signed()`](https://paritytech.github.io/polkadot-sdk/master/frame_system/fn.ensure_signed.html) is saying &quot;*anyone can access this, as long as they had signed a statement saying so*&quot;. &#xD;&#xA;&#xD;&#xA;In *most* cases and in *most* blockchains, that origin is a signed statement from a user, in which case we also call the extrinsic a _transaction_, but this is not necessarily the case in FRAME. FRAME  allows you to describe an extrinsic that require abstract privilege levels, and are not directly link-able to an account-id. &#xD;&#xA;&#xD;&#xA;The best example of this system's usage is onchain governance to upgrade the chain. We can imagine an extrinsic like such:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn enact_upgrade(o: RuntimeOrigin, ...) {&#xD;&#xA;    // Ensure `o` is representing 2/3 of the token holders in the system&#xD;&#xA;} &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can there be one account-id that is the public key of 2/3 of the token holders? This is very similar to the case for `MediumSpender`. &#xD;&#xA;&#xD;&#xA;Then you might ask how the above extrinsic is ever called? The answer is that the runtime itself is in charge of constructing these abstract origins. In this case, an entire pallet could be dedicated to performing token-based voting, and when this pallet realizes that 2/3 of the token holders have approved an operation, it executes the above extrinsic, with the right origin type. &#xD;&#xA;&#xD;&#xA;If you look at the (old) `pallet-democracy` code, it has a very clear example of [this](https://github.com/paritytech/polkadot-sdk/blob/edd95b3749754d2ed0c5738588e872c87be91624/substrate/frame/democracy/src/lib.rs#L1603-L1633). Once this pallet is happy with a referendu, it will schedule it to execute using the `frame_system::RawOrigin::Root`. Again, `frame_system::RawOrigin::Root` is one origin option, but it is not callable by any signature, and the Runtime itself is deciding when to use it. &#xD;&#xA;&#xD;&#xA;It is also worth looking at the code for [`pallet-sudo`](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/sudo/src/lib.rs), which actually maps the `Root` origin to an account-id. This is useful for testing and permissioned blockchains. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This [recent talk from Gavin Wood](https://youtu.be/j7b8Upipmeg?si=83_XUgYuJxMwWX4g&amp;t=195) at ProtocolBerg describes this concept.&#xD;&#xA;&#xD;&#xA;--- &#xD;&#xA;&#xD;&#xA;The `RuntimeOrigin` is the top level origin representation in a runtime. If you look at the expanded `RuntimeOrigin` of a runtime, it looks like this: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum RuntimeOrigin {&#xD;&#xA;  System(frame_system::Origin),&#xD;&#xA;  OtherPallet(other_pallet::Origin),&#xD;&#xA;  // more &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And in `frame_system::Origin`, one of the variants is [`Signed`](https://paritytech.github.io/polkadot-sdk/master/frame/prelude/frame_system/type.Origin.html). &#xD;&#xA;&#xD;&#xA;To take a step back, any extrinsic in FRAME takes a `origin: RuntimeOrigin` as the first argument, which is more or less the above type. And it can do any check it wishes based on the above `RuntimeOrigin`, and being `Signed(_)` is merely one of the many options. &#xD;&#xA;&#xD;&#xA;&gt; This example is slightly over-simpliefied, as the pallet will not have access to the `RuntimeOrigin` as a concrete type. This is sensible, as a pallet does not know in which runtime it lives, and which other pallets are surrounding it. In practive, the first argument is an associated type that it uses as `&lt;T as frame_system::Config&gt;::RuntimeOrigin`, which is only known at the runtime level. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43884" PostHistoryTypeId="5" PostId="10992" RevisionGUID="eeb9e6de-5a61-43f3-8426-de6bf1405338" CreationDate="2024-02-10T16:24:57.987" UserId="298" Comment="added 7 characters in body" Text="I am looking to leverage the referendum track in a creative way by assigning the Medium Spender track ownership of an asset on Asset Hub. &#xD;&#xA;&#xD;&#xA;In order to do this we need to find an address for the track. I know that [DescribeFamily][1] might be relevant. &#xD;&#xA;&#xD;&#xA;The goal is to find a public key for the MediumSpender Origin to test this approach. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/a86dee6da4de13a51e91f7582209bd8569cdab7f/polkadot/runtime/rococo/src/xcm_config.rs#L69" ContentLicense="CC BY-SA 4.0" />
  <row Id="43885" PostHistoryTypeId="5" PostId="10984" RevisionGUID="d9c60cf1-7073-48c7-aba9-18605d8ffe87" CreationDate="2024-02-10T16:43:51.573" UserId="555" Comment="added 49 characters in body" Text="I'm working on a chain where I need to gather the validator's public address who participates in the grandpa finality process and validate the current block.&#xD;&#xA;So is it possible to fetch the validator's public address who validates the current block in a pallet?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="43886" PostHistoryTypeId="5" PostId="10984" RevisionGUID="06c2b7b0-413a-4cad-b5b0-4ec5ad5cebf1" CreationDate="2024-02-10T16:50:33.433" UserId="555" Comment="added 49 characters in body" Text="I'm working on a chain where I need to gather the validator's public address who participates in the grandpa finality process and validate the current block.&#xD;&#xA;&#xD;&#xA;So is it possible to fetch the validator's public address who validates the current block in a pallet?&#xD;&#xA;&#xD;&#xA;For ex:&#xD;&#xA;let's say we have 10 validators which is going to validate the current block and out of 10 validators, 6 validators validate and approve the current block in grandpa finality process. So I need the public address of these 6 validators.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="43887" PostHistoryTypeId="5" PostId="10984" RevisionGUID="bb1107e4-0108-4cec-9587-ffc55d160311" CreationDate="2024-02-10T17:04:25.500" UserId="555" Comment="added 30 characters in body" Text="I'm working on a chain where I need to gather the validator's public address who participates in the grandpa finality process and validate the current block.&#xD;&#xA;&#xD;&#xA;So is it possible to fetch the validator's public address who validates the current block in a pallet?&#xD;&#xA;&#xD;&#xA;For ex:&#xD;&#xA;let's say we have 10 validators which is going to participate in grandpa finality of the current block and out of 10 validators, 6 validators validate and approve the current block during grandpa finality process. So I need the public address of these 6 validators.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="43888" PostHistoryTypeId="5" PostId="10984" RevisionGUID="fba1685d-17a0-425f-9887-6392e06b4d68" CreationDate="2024-02-10T17:10:27.997" UserId="555" Comment="added 30 characters in body" Text="I'm working on a chain where I need to gather the validator's public address who participates in the grandpa finality process and validate the current block.&#xD;&#xA;&#xD;&#xA;For ex:&#xD;&#xA;let's say we have 10 validators which is going to participate in grandpa finality of the current block and out of 10 validators, 6 validators validate and approve the current block during grandpa finality process. So I need the public address of these 6 validators.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="43889" PostHistoryTypeId="4" PostId="10984" RevisionGUID="fba1685d-17a0-425f-9887-6392e06b4d68" CreationDate="2024-02-10T17:10:27.997" UserId="555" Comment="added 30 characters in body" Text="Is it possible to fetch the validator's public address who participate during the grandpa finality of the current block?[updated]" ContentLicense="CC BY-SA 4.0" />
  <row Id="43890" PostHistoryTypeId="52" PostId="10992" RevisionGUID="3639b448-a616-4010-8e36-0e874cf8b346" CreationDate="2024-02-10T20:39:56.913" />
  <row Id="43891" PostHistoryTypeId="5" PostId="10993" RevisionGUID="5c22fa62-8ffb-441a-98b8-70d5f389f679" CreationDate="2024-02-11T10:53:49.033" UserId="167" Comment="added 1 character in body" Text="There is no correct answer to this question, but it is a very good one, because it highlights the (powerful) **account abstraction**s that FRAME, Substrate and Polkadot give you out of the box. &#xD;&#xA;&#xD;&#xA;An _Origin_ in a FRAME-based runtime is by no means a 1-1 mapping to an account-id, and therefore, it need not necessarily have a public key associated with it. This applies to `MediumSpender` as well. &#xD;&#xA;&#xD;&#xA;An origin is an abstract representation of the *caller of a particular extrinsic*, primarily meant to convey **privilege**. A normal transfer which starts with [`ensure_signed()`](https://paritytech.github.io/polkadot-sdk/master/frame_system/fn.ensure_signed.html) is saying &quot;*anyone can access this, as long as they had signed a statement saying so*&quot;. &#xD;&#xA;&#xD;&#xA;In *most* cases and in *most* blockchains, that origin is a signed statement from a user, in which case we also call the extrinsic a _transaction_, but this is not necessarily the case in FRAME. FRAME  allows you to describe an extrinsic that require abstract privilege levels, and are not directly link-able to an account-id. &#xD;&#xA;&#xD;&#xA;The best example of this system's usage is onchain governance to upgrade the chain. We can imagine an extrinsic like such:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;fn enact_upgrade(o: RuntimeOrigin, ...) {&#xD;&#xA;    // Ensure `o` is representing 2/3 of the token holders in the system&#xD;&#xA;} &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can there be one account-id that is the public key of 2/3 of the token holders? This is very similar to the case for `MediumSpender`. &#xD;&#xA;&#xD;&#xA;Then you might ask how the above extrinsic is ever called? The answer is that the runtime itself is in charge of constructing these abstract origins. In this case, an entire pallet could be dedicated to performing token-based voting, and when this pallet realizes that 2/3 of the token holders have approved an operation, it executes the above extrinsic, with the right origin type. &#xD;&#xA;&#xD;&#xA;If you look at the (old) `pallet-democracy` code, it has a very clear example of [this](https://github.com/paritytech/polkadot-sdk/blob/edd95b3749754d2ed0c5738588e872c87be91624/substrate/frame/democracy/src/lib.rs#L1603-L1633). Once this pallet is happy with a referendum, it will schedule it to execute using the `frame_system::RawOrigin::Root`. Again, `frame_system::RawOrigin::Root` is one origin option, but it is not callable by any signature, and the Runtime itself is deciding when to use it. &#xD;&#xA;&#xD;&#xA;It is also worth looking at the code for [`pallet-sudo`](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/sudo/src/lib.rs), which actually maps the `Root` origin to an account-id. This is useful for testing and permissioned blockchains. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This [recent talk from Gavin Wood](https://youtu.be/j7b8Upipmeg?si=83_XUgYuJxMwWX4g&amp;t=195) at ProtocolBerg describes this concept.&#xD;&#xA;&#xD;&#xA;--- &#xD;&#xA;&#xD;&#xA;The `RuntimeOrigin` is the top level origin representation in a runtime. If you look at the expanded `RuntimeOrigin` of a runtime, it looks like this: &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;enum RuntimeOrigin {&#xD;&#xA;  System(frame_system::Origin),&#xD;&#xA;  OtherPallet(other_pallet::Origin),&#xD;&#xA;  // more &#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And in `frame_system::Origin`, one of the variants is [`Signed`](https://paritytech.github.io/polkadot-sdk/master/frame/prelude/frame_system/type.Origin.html). &#xD;&#xA;&#xD;&#xA;To take a step back, any extrinsic in FRAME takes a `origin: RuntimeOrigin` as the first argument, which is more or less the above type. And it can do any check it wishes based on the above `RuntimeOrigin`, and being `Signed(_)` is merely one of the many options. &#xD;&#xA;&#xD;&#xA;&gt; This example is slightly over-simpliefied, as the pallet will not have access to the `RuntimeOrigin` as a concrete type. This is sensible, as a pallet does not know in which runtime it lives, and which other pallets are surrounding it. In practive, the first argument is an associated type that it uses as `&lt;T as frame_system::Config&gt;::RuntimeOrigin`, which is only known at the runtime level. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43892" PostHistoryTypeId="50" PostId="9876" RevisionGUID="486d5b0d-858f-437b-abe7-77d4eabc9209" CreationDate="2024-02-11T17:00:50.143" UserId="-1" />
  <row Id="43893" PostHistoryTypeId="2" PostId="10994" RevisionGUID="e8965d33-8fce-482b-af86-9b39c3218a32" CreationDate="2024-02-11T17:01:28.037" UserId="1786" Text="So generally speaking Polkadot-js exposes two important Classes here that can be expanded upon for metadata: `TypeRegistry`, and `Metadata`. So the simple answer is yes: If you are using the `ApiPromise` (or even just the registry) you can update the metadata within the registry.&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import { TypeRegistry, Metadata } from '@polkadot/types';&#xD;&#xA;&#xD;&#xA;const registry = new TypeRegistry();&#xD;&#xA;const metadata = new Metadata(registry, metaHex);&#xD;&#xA;api.registry.setMetadata(metadata);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The following source code for v10.11.2 on `setMetadata` can be found [here](https://github.com/polkadot-js/api/blob/0c7fed309059e7e31409b575650e03389ca5d3a2/packages/types/src/create/registry.ts#L575);&#xD;&#xA;&#xD;&#xA;You can also use `setMetadata` to set your `signedExtensions`, and `userExtensions`. The `noInitWarn` param will suppress any warning the api might throw when setting the extrinsics and types within the registry." ContentLicense="CC BY-SA 4.0" />
  <row Id="43895" PostHistoryTypeId="5" PostId="10994" RevisionGUID="af6ebd4f-dc6d-4963-8877-829dd4104a10" CreationDate="2024-02-11T18:52:01.767" UserId="1786" Comment="added 119 characters in body" Text="So generally speaking Polkadot-js exposes two important Classes here that can be expanded upon for metadata: `TypeRegistry`, and `Metadata`. So the simple answer is yes: If you are using the `ApiPromise` (or even just the registry) you can update the metadata within the registry.&#xD;&#xA;&#xD;&#xA;```typescript&#xD;&#xA;import { TypeRegistry, Metadata } from '@polkadot/types';&#xD;&#xA;&#xD;&#xA;const registry = new TypeRegistry();&#xD;&#xA;const metadata = new Metadata(registry, metaHex);&#xD;&#xA;api.registry.setMetadata(metadata);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The following source code for v10.11.2 on `setMetadata` can be found [here](https://github.com/polkadot-js/api/blob/0c7fed309059e7e31409b575650e03389ca5d3a2/packages/types/src/create/registry.ts#L575);&#xD;&#xA;&#xD;&#xA;You can also use `setMetadata` to set your `signedExtensions`, and `userExtensions`. The `noInitWarn` param will suppress any warning the api might throw when setting the extrinsics and types within the registry.&#xD;&#xA;&#xD;&#xA;Edit:&#xD;&#xA;&#xD;&#xA;The above answer is useful if you are already utilizing Polkadot-js as the tooling library for your dapp. " ContentLicense="CC BY-SA 4.0" />
  <row Id="43896" PostHistoryTypeId="50" PostId="9719" RevisionGUID="795a0448-29d7-4a03-a8b8-fdf39aa4c1b1" CreationDate="2024-02-11T21:08:41.110" UserId="-1" />
  <row Id="43897" PostHistoryTypeId="2" PostId="10995" RevisionGUID="ccf6596c-0dc9-4802-9397-3e406718f5a6" CreationDate="2024-02-12T02:41:25.243" UserId="270" Text="To swap ASTR for DOT, I think you can use hydradx or stellaswap:&#xD;&#xA;&#xD;&#xA;https://app.hydradx.io/trade/swap&#xD;&#xA;&#xD;&#xA;https://app.stellaswap.com/exchange/swap" ContentLicense="CC BY-SA 4.0" />
  <row Id="43899" PostHistoryTypeId="2" PostId="10996" RevisionGUID="17b167a4-a9ee-40f3-a67c-abff96aa4932" CreationDate="2024-02-12T02:50:46.830" UserId="5145" Text="&#xD;&#xA;&#xD;&#xA;Can anyone help me please regarding the custom address scheme,&#xD;&#xA;&#xD;&#xA;if i was to use a Custom address pallet, will this cause any complication with the existing EVM frontier pallet?&#xD;&#xA;&#xD;&#xA;also are we able to have a custom address (which doesn’t start with 0x) and still have full functionality of EVM.?&#xD;&#xA;&#xD;&#xA;If so, what is the best solution for doing this?&#xD;&#xA;&#xD;&#xA;Any help would be greatly appreciated.&#xD;&#xA;&#xD;&#xA;Thank you in advance&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43901" PostHistoryTypeId="1" PostId="10996" RevisionGUID="17b167a4-a9ee-40f3-a67c-abff96aa4932" CreationDate="2024-02-12T02:50:46.830" UserId="5145" Text="custom address scheme" ContentLicense="CC BY-SA 4.0" />
  <row Id="43902" PostHistoryTypeId="3" PostId="10996" RevisionGUID="17b167a4-a9ee-40f3-a67c-abff96aa4932" CreationDate="2024-02-12T02:50:46.830" UserId="5145" Text="|pokadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43903" PostHistoryTypeId="2" PostId="10997" RevisionGUID="127948db-6620-46a2-aacb-cba4a141d7e2" CreationDate="2024-02-12T04:15:29.673" UserId="5140" Text="The config trait is used for the implementation of multiple traits during the macro expansion. Hence, this is not possible. &#xD;&#xA;&#xD;&#xA;Why do you want to omit it anyways?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43905" PostHistoryTypeId="2" PostId="10998" RevisionGUID="983ed360-b1a0-4d49-9dc2-158fdd7edfb9" CreationDate="2024-02-12T05:29:50.087" UserId="2348" Text="i have been going through documentation of substrate . i came through the  point of select chain method for forking concept and find out that their are two methods for chain selection Ghost and longest chain selection. i have found that ghost protocol is more secure than longest chain protocol. when going through code base of substrate i have found that it uses longest chain selection method . can some please provide me brief about it why substrate use longest chain method instead of ghost protocol ." ContentLicense="CC BY-SA 4.0" />
  <row Id="43907" PostHistoryTypeId="1" PostId="10998" RevisionGUID="983ed360-b1a0-4d49-9dc2-158fdd7edfb9" CreationDate="2024-02-12T05:29:50.087" UserId="2348" Text="does substrate chain use longest chain or ghost protocol for fork chioce rule?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43908" PostHistoryTypeId="3" PostId="10998" RevisionGUID="983ed360-b1a0-4d49-9dc2-158fdd7edfb9" CreationDate="2024-02-12T05:29:50.087" UserId="2348" Text="|substrate-node|blockchain|chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43909" PostHistoryTypeId="2" PostId="10999" RevisionGUID="aa43f0c9-332b-4730-8bae-6ce048cfa650" CreationDate="2024-02-12T05:45:00.997" UserId="5146" Text="i am getting block time of parachain 12 to 30 sec even after implementing  asynchronous backing in it.what can be the issue??" ContentLicense="CC BY-SA 4.0" />
  <row Id="43911" PostHistoryTypeId="1" PostId="10999" RevisionGUID="aa43f0c9-332b-4730-8bae-6ce048cfa650" CreationDate="2024-02-12T05:45:00.997" UserId="5146" Text="Getting inconsistent block time even after implementing asynchronous backing in parachain" ContentLicense="CC BY-SA 4.0" />
  <row Id="43912" PostHistoryTypeId="3" PostId="10999" RevisionGUID="aa43f0c9-332b-4730-8bae-6ce048cfa650" CreationDate="2024-02-12T05:45:00.997" UserId="5146" Text="|polkadot|parachain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43913" PostHistoryTypeId="2" PostId="11000" RevisionGUID="b0c2774f-00d5-426c-9261-3598f035f824" CreationDate="2024-02-12T06:27:38.537" UserId="3437" Text="I want to implement Token economics in my Substrate based chain. Can someone please guide what is the best way to implement it? Which pallets should I use?&#xD;&#xA;&#xD;&#xA;Is there any example? " ContentLicense="CC BY-SA 4.0" />
  <row Id="43915" PostHistoryTypeId="1" PostId="11000" RevisionGUID="b0c2774f-00d5-426c-9261-3598f035f824" CreationDate="2024-02-12T06:27:38.537" UserId="3437" Text="What is the best way to implement Token economics in Substrate based blockchain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43916" PostHistoryTypeId="3" PostId="11000" RevisionGUID="b0c2774f-00d5-426c-9261-3598f035f824" CreationDate="2024-02-12T06:27:38.537" UserId="3437" Text="|substrate-node-template|token|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43917" PostHistoryTypeId="2" PostId="11001" RevisionGUID="7f48a745-864b-4690-9b48-474f6cae4935" CreationDate="2024-02-12T10:28:59.313" UserId="3445" Text="thanks for the links,&#xD;&#xA;the problem with sudo is now clear, you need to change `ensure_signed` -&gt; `ensure_signed_or_root` here: https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/cumulus/parachain-template/pallets/xnft/src/lib.rs#L260C14-L260C27" ContentLicense="CC BY-SA 4.0" />
  <row Id="43919" PostHistoryTypeId="2" PostId="11002" RevisionGUID="83f7932f-1af3-4e80-ae45-6360218824a0" CreationDate="2024-02-12T10:35:20.943" UserId="3445" Text="@dudo, can you please point me to the valid/compilable code, because I don't see setting [XcmSender here](https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/cumulus/parachain-template/pallets/xnft/src/mock.rs#L94-L104), but [here](https://github.com/ParaSpell-Research-Foundation/polkadot-sdk-nft-pallet/blob/master/cumulus/parachain-template/pallets/xnft/src/lib.rs#L76) it is expected.&#xD;&#xA;&#xD;&#xA;Without valid XcmConfig I cannot check that second isssue with `Transact`. I need to see XcmSender code :)" ContentLicense="CC BY-SA 4.0" />
  <row Id="43921" PostHistoryTypeId="2" PostId="11003" RevisionGUID="8561971f-23cf-47b8-b0a0-deb8a8b9310d" CreationDate="2024-02-12T11:36:24.820" UserId="73" Text="The error is &quot;expected&quot;. When async backing was merged, the `HostConfiguration` type changed. The `AbridgedHostConfiguration` is, as the name suggests, an abridged version of the `HostConfiguration`. Basically it only includes the elements that are relevant for the parachain side. There was no migration added for this storage entry, because this storage entry is overridden by the `set_validation_data` inherent in each block. So, you can ignore this error. " ContentLicense="CC BY-SA 4.0" />
  <row Id="43923" PostHistoryTypeId="2" PostId="11004" RevisionGUID="d0a78b2d-78dc-4fca-8406-62d1d97e3ef9" CreationDate="2024-02-12T12:31:44.177" UserId="3123" Text="I want to define a struct serializeable to json&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Serialize)]&#xD;&#xA;struct Struct {&#xD;&#xA;	item: SomeRuntimeType,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;but I get this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `pallet_pallet::types::SomeRuntimeType: conf::_::_serde::Serialize` is not satisfied&#xD;&#xA;    --&gt; src/main.rs:150:10&#xD;&#xA;     |&#xD;&#xA;150  | #[derive(Serialize)]&#xD;&#xA;     |          ^^^^^^^^^ the trait `conf::_::_serde::Serialize` is not implemented for `pallet_pallet::types::SomeRuntimeType`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Is there a way to derive some kind of serialization in subxt?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(&#xD;&#xA;	runtime_metadata_path = &quot;res/metadata.scale&quot;,&#xD;&#xA;	derive_for_all_types = &quot;Debug&quot; // &lt;--- like adding Serialize here&#xD;&#xA;)]&#xD;&#xA;pub mod runtime {}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Or do I have to manually implement serialization?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43925" PostHistoryTypeId="1" PostId="11004" RevisionGUID="d0a78b2d-78dc-4fca-8406-62d1d97e3ef9" CreationDate="2024-02-12T12:31:44.177" UserId="3123" Text="subxt: How to derive serialize trait for runtime type?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43926" PostHistoryTypeId="3" PostId="11004" RevisionGUID="d0a78b2d-78dc-4fca-8406-62d1d97e3ef9" CreationDate="2024-02-12T12:31:44.177" UserId="3123" Text="|subxt|serialization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43927" PostHistoryTypeId="5" PostId="10985" RevisionGUID="533de21e-71b3-4be0-b553-1bddb777385f" CreationDate="2024-02-12T14:10:08.017" UserId="1786" Comment="added 5 characters in body" Text="I have Astar(Astr) on as an EVM on Metamask and want to eventually take profit on some of it and move that portion to USDT.  My plan is to swap it for DOT first on Polkadot.js wallet.  The problem is that the the Polkadot wallet does not start with 0x, therefore Metamask can only send to 0x...   I've done all of the research on  Astar.doc.network plus youtube videos, I could not find a solution. " ContentLicense="CC BY-SA 4.0" />
  <row Id="43928" PostHistoryTypeId="2" PostId="11005" RevisionGUID="9e4af337-8734-42a0-992a-0f914a43f4a9" CreationDate="2024-02-12T15:47:27.433" UserId="2135" Text="I am currently trying to understand how we could improve our block production performance at Avail.&#xD;&#xA;&#xD;&#xA;By looking at [this answer](https://substrate.stackexchange.com/a/3030/2135) on a previous question, I get that for a 6 second block time, we allocate 2sec for block production, 2sec for syncing and 2sec for block propagation.&#xD;&#xA;&#xD;&#xA;From what I can witness by adding some metrics to a node is that block propagation and import happen no matter what after the on_finalize hook is called, which is logic, but it's always called at the end of a block.&#xD;&#xA;&#xD;&#xA;Also by checking [this answer](https://substrate.stackexchange.com/a/1841/2135), and more especially this bit : &#xD;&#xA;&#xD;&#xA;&gt; Let's assume we give the block production 500 ms. Of this 500ms 67% are allocated for the actual block initialization plus transaction execution. If we are now above these 67% of execution time we will stop the block production and finalize the block. Then you send out the block to the network.&#xD;&#xA;&#xD;&#xA;I wanted to know how can this be actually triggered or if this even mean that block production can be stopped mid blocktime and start the on_finalize processes. For example, I filled a block with the maximum normal ratio (85%) but it still waited to call the on_finalize.&#xD;&#xA;&#xD;&#xA;To give some context, in our chain, after all the transaction in a block, we want to do some additional process which is done right now in the on_finalize hook, the goal would be to do it just before or ideally trigger the on_finalize sooner.&#xD;&#xA;&#xD;&#xA;Don't hesitate in case more details are needed !" ContentLicense="CC BY-SA 4.0" />
  <row Id="43930" PostHistoryTypeId="1" PostId="11005" RevisionGUID="9e4af337-8734-42a0-992a-0f914a43f4a9" CreationDate="2024-02-12T15:47:27.433" UserId="2135" Text="How to start block on_finalize before we reach block time?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43931" PostHistoryTypeId="3" PostId="11005" RevisionGUID="9e4af337-8734-42a0-992a-0f914a43f4a9" CreationDate="2024-02-12T15:47:27.433" UserId="2135" Text="|weight|block-production|block-import|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43932" PostHistoryTypeId="5" PostId="11005" RevisionGUID="bfd4be1c-db07-4809-828a-dcb9e4d6e180" CreationDate="2024-02-12T21:04:18.697" UserId="2135" Comment="added 190 characters in body" Text="I am currently trying to understand how we could improve our block production performance at Avail.&#xD;&#xA;&#xD;&#xA;By looking at [this answer](https://substrate.stackexchange.com/a/3030/2135) on a previous question, I get that for a 6 second block time, we allocate 2sec for block production, 2sec for syncing and 2sec for block propagation.&#xD;&#xA;&#xD;&#xA;From what I can witness by adding some metrics to a node is that block propagation and import happen no matter what after the on_finalize hook is called, which is logic, but it's always called at the end of a block.&#xD;&#xA;&#xD;&#xA;Also by checking [this answer](https://substrate.stackexchange.com/a/1841/2135), and more especially this bit : &#xD;&#xA;&#xD;&#xA;&gt; Let's assume we give the block production 500 ms. Of this 500ms 67% are allocated for the actual block initialization plus transaction execution. If we are now above these 67% of execution time we will stop the block production and finalize the block. Then you send out the block to the network.&#xD;&#xA;&#xD;&#xA;I wanted to know how can this be actually triggered or if this even mean that block production can be stopped mid blocktime and start the on_finalize processes. For example, I filled a block with the maximum normal ratio (85%) but it still waited to call the on_finalize.&#xD;&#xA;&#xD;&#xA;To give some context, in our chain, after all the transaction in a block, we want to do some additional process which is done right now in the on_finalize hook, the goal would be to do it just before or ideally trigger the on_finalize sooner.&#xD;&#xA;&#xD;&#xA;My question being : &#xD;&#xA;**Is there a way to adjust the timing of on_finalize to start it before reaching the end of the block time, particularly after reaching a certain block fill ratio ?**&#xD;&#xA;&#xD;&#xA;Don't hesitate in case more details are needed !" ContentLicense="CC BY-SA 4.0" />
  <row Id="43936" PostHistoryTypeId="2" PostId="11006" RevisionGUID="78e291d2-f624-4f4e-8d9d-9ac085b3403f" CreationDate="2024-02-12T21:11:53.777" UserId="167" Text="I can add a new perspective to this by illuminating how block production works in Substrate. Hopefully it would also answer your question: &#xD;&#xA;&#xD;&#xA;First, make sure to read up on the division of Runtime and node [here](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/wasm_meta_protocol/index.html), and how they communicate together. &#xD;&#xA;&#xD;&#xA;The block authoring is done in a client component called `sc_basic_authorship` and `sc_block_builder`. It follows the following broad rules: &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ruintime_apis::initialize_block()&#xD;&#xA;for tx in txs: &#xD;&#xA;   runtime_apis::apply_extrinsic(tx)&#xD;&#xA;end for&#xD;&#xA;runtime_apis::finalize_block()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;([ref](https://github.com/paritytech/polkadot-sdk/blob/9a650c46fdf52809bd9b5d687a4e1f77748521d4/substrate/client/block-builder/src/lib.rs#L266))&#xD;&#xA;&#xD;&#xA;The inner loop of this pseudocode can either because of two reasons: &#xD;&#xA;&#xD;&#xA;1. This component is configured to only run up until a fixed `slot_duration` of time for applying transactions. If this deadline is reached, the block production stops. The 2/3 ratio is applied [here](https://github.com/paritytech/polkadot-sdk/blob/ca5f10567a4647e53ba5a2f900c60994f6e855b8/substrate/client/basic-authorship/src/basic_authorship.rs#L274). This is the number that you typically see set to 6000ms and is returned [here](https://github.com/paritytech/polkadot-sdk/blob/bb8ddc46c1e3dcc6f30340b39c1fdb2d07472041/substrate/bin/node-template/runtime/src/lib.rs#L392).&#xD;&#xA;2.  More commonly, at any given time, the runtime might signal to the block proposer that it is full. This error is returned when the weight limti is reached in the runtime, aka. the 2s block weight limit. See [here](https://github.com/paritytech/polkadot-sdk/blob/a5a2432d22d199e595a776d39233663dce858125/substrate/frame/system/src/extensions/check_weight.rs#L61). This translates to [`ExhaustResources` errors](https://github.com/paritytech/polkadot-sdk/blob/0e49ed72aa365475e30069a5c30e251a009fdacf/substrate/primitives/runtime/src/transaction_validity.rs#L73), which is intercepted by the block building process and will also cause the block production to stop. This means the inner loop of the above code stops. Afterwards, the block finalization will runn as planned. Note that block finalization (FRAME's `Hooks::on_finalize`) is a mandatory operation and must happen. &#xD;&#xA;&#xD;&#xA;&gt; **This is crucially why the weight of `on_finalize` [must already be accounted for as a part of `on_initialize`](https://paritytech.github.io/polkadot-sdk/master/frame/traits/trait.Hooks.html#method.on_finalize)**. Because it is executed after the runtime has already decided that it is out of weight. " ContentLicense="CC BY-SA 4.0" />
  <row Id="43938" PostHistoryTypeId="2" PostId="11007" RevisionGUID="3a2d7f03-4357-4c42-b77f-ca58ab33de63" CreationDate="2024-02-12T23:12:51.560" UserId="4243" Text="We are operating a custom Solochain NPOS blockchain with Substrate. After running a stable testnet for months, we promoted to mainnet version 1.&#xD;&#xA;&#xD;&#xA;Initially the mainnet was operating normally, with blocks being finalized regularly. However, after around 4 months of operation, validators started having problems finalizing new blocks, with the process becoming very slow.&#xD;&#xA;&#xD;&#xA;All validators ended up being slashed due to their inability to close blocks. We have already tried updating the nodes to the latest version of Solochain, but the problem persists.&#xD;&#xA;&#xD;&#xA;The validators appear to be synchronized on the same valid chain, so we rule out the possibility of forking. P2P connectivity was also verified and the nodes are able to communicate.&#xD;&#xA;&#xD;&#xA;We have already reviewed logs and metrics but were unable to isolate the root cause of the problem. Has anyone experienced a similar situation or can suggest other areas for us to investigate in order to restore normal block completion? We appreciate any guidance!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43940" PostHistoryTypeId="1" PostId="11007" RevisionGUID="3a2d7f03-4357-4c42-b77f-ca58ab33de63" CreationDate="2024-02-12T23:12:51.560" UserId="4243" Text="Solochain mainnet experiencing problems finalizing blocks after a few months" ContentLicense="CC BY-SA 4.0" />
  <row Id="43941" PostHistoryTypeId="3" PostId="11007" RevisionGUID="3a2d7f03-4357-4c42-b77f-ca58ab33de63" CreationDate="2024-02-12T23:12:51.560" UserId="4243" Text="|validator|nodes|grandpa|blockchain|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43942" PostHistoryTypeId="50" PostId="10812" RevisionGUID="81ec4b45-36d0-467e-bb26-ed579cb5e00c" CreationDate="2024-02-13T02:01:50.207" UserId="-1" />
  <row Id="43943" PostHistoryTypeId="2" PostId="11008" RevisionGUID="ae1c987a-3803-4d8c-86e7-fe30ae77af41" CreationDate="2024-02-13T04:11:36.797" UserId="5145" Text="Anyone using the latest EVM front Tier Pallet their - seems to be a possibility for a remote attacker to exploit your nodes remotely and control the nodes and every other nodes within your system, that's a &quot;remote code execution vulnerability&quot; in the latest EVM front Tier pallet - if anyone else has similar issues. feel free to write your responds below on the solution to resolve this as this is the latest version of the EVM front tier pallet from substrate.... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&quot;The attacker can call any RPC or functionality that relates to that EVM pallet&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43945" PostHistoryTypeId="1" PostId="11008" RevisionGUID="ae1c987a-3803-4d8c-86e7-fe30ae77af41" CreationDate="2024-02-13T04:11:36.797" UserId="5145" Text="&quot;EVM front tier remote code execution vulnerability&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43946" PostHistoryTypeId="3" PostId="11008" RevisionGUID="ae1c987a-3803-4d8c-86e7-fe30ae77af41" CreationDate="2024-02-13T04:11:36.797" UserId="5145" Text="|substrate-node-template|substrate-node|substrate-contracts-node|substrateinterface|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43947" PostHistoryTypeId="5" PostId="11008" RevisionGUID="e5e811cb-82de-48f4-904a-706f958fd0a4" CreationDate="2024-02-13T04:13:03.873" UserId="5145" Comment="deleted 2 characters in body" Text="Anyone using the latest EVM frontTier Pallet their - seems to be a possibility for a remote attacker to exploit your nodes remotely and control the nodes and every other nodes within your system, that's a &quot;remote code execution vulnerability&quot; in the latest EVM frontTier pallet - if anyone else has similar issues. feel free to write your responds below on the solution to resolve this as this is the latest version of the EVM front tier pallet from substrate.... &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&quot;The attacker can call any RPC or functionality that relates to that EVM pallet&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="43948" PostHistoryTypeId="2" PostId="11009" RevisionGUID="cb3131cc-f336-4f66-8d22-048640787371" CreationDate="2024-02-13T07:26:31.800" UserId="85" Text="`rustflags = [ &quot;-Zthreads=8&quot; ]` will help if you're on nightly. As far as I know this is not on by default so stick it in your `~/.cargo/config` - Had it in there for months and not seen a down side." ContentLicense="CC BY-SA 4.0" />
  <row Id="43950" PostHistoryTypeId="50" PostId="8558" RevisionGUID="9897f2dc-5148-4d24-b530-4b64ce759abd" CreationDate="2024-02-13T08:06:10.727" UserId="-1" />
  <row Id="43951" PostHistoryTypeId="2" PostId="11010" RevisionGUID="f67cc096-7f33-4cc7-8535-897eff9c4202" CreationDate="2024-02-13T09:57:14.313" UserId="3881" Text="I have been unnable to finalize blocks including the node authorization pallet to the runtime and with accounts different to the alice and bob one.&#xD;&#xA;&#xD;&#xA;When following the tutorial for trusted nodes without alice and bob, I generate the keys and replace it in place of bob and alice in the customized specs.&#xD;&#xA;&#xD;&#xA;I have been guessing that in order to use different accounts than alice and bob and also use the node authorization pallet I should just kind of follow both tutorials at the same time. Adding the keys for the accounts to the storage using key insert command from the chain.&#xD;&#xA;&#xD;&#xA;is this correct?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43953" PostHistoryTypeId="1" PostId="11010" RevisionGUID="f67cc096-7f33-4cc7-8535-897eff9c4202" CreationDate="2024-02-13T09:57:14.313" UserId="3881" Text="Node Authorization pallet using different accounts than alice and bob not working" ContentLicense="CC BY-SA 4.0" />
  <row Id="43954" PostHistoryTypeId="3" PostId="11010" RevisionGUID="f67cc096-7f33-4cc7-8535-897eff9c4202" CreationDate="2024-02-13T09:57:14.313" UserId="3881" Text="|pallet-node-authorization|trusted-nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43955" PostHistoryTypeId="2" PostId="11011" RevisionGUID="abcbb251-fe7e-4dc4-bab1-832dbfcc9ce3" CreationDate="2024-02-13T12:11:50.410" UserId="4532" Text="I have already running substrate-based node and I started to get error: ```429 Too many requests: Too many connections```. This happens due to HTTP requests that my FE produces. After research I understand that I should configure ```--rpc-max-connections``` parameter, but I didn't find any info about how can I update this parameter on the already running network?&#xD;&#xA;Maybe I missed something? If yes, please let me know how can I do it)&#xD;&#xA;&#xD;&#xA;Thanks a lot!" ContentLicense="CC BY-SA 4.0" />
  <row Id="43957" PostHistoryTypeId="1" PostId="11011" RevisionGUID="abcbb251-fe7e-4dc4-bab1-832dbfcc9ce3" CreationDate="2024-02-13T12:11:50.410" UserId="4532" Text="How can I change ```--rpc-max-connections``` on already running substrate-based node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43958" PostHistoryTypeId="3" PostId="11011" RevisionGUID="abcbb251-fe7e-4dc4-bab1-832dbfcc9ce3" CreationDate="2024-02-13T12:11:50.410" UserId="4532" Text="|substrate-node-template|substrate-node|rpc|custom-rpc|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43959" PostHistoryTypeId="2" PostId="11012" RevisionGUID="a9052d2f-64d1-4a83-a437-9d8022aa22b8" CreationDate="2024-02-13T12:17:46.797" UserId="5148" Text="My question is related to the usage of bitfields in data availability system, described in https://spec.polkadot.network/chapter-anv. Polkadot uses bitfields to know if a relay-chain block is stored by an adequate number of validators. I was wondering why they do not use threshold signatures? That would be one signature per block, and it is enough to show that 2/3 of the validators are storing the data. Is there any advantage of bitfields (other than knowing who is storing the data)? Also, is the information on who is storing the data used somewhere?&#xD;&#xA;&#xD;&#xA;I am aware that bitfields provide accountability, i.e., it is possible to know which validators claim to have the data. However, considering the vast majority of validators (&gt;2/3) has the data, a data requester can easily find a validator having the data (since the probability of a random validator having the data is already &gt;1/2). &#xD;&#xA;&#xD;&#xA;I am not aware of any other use of accountability in the current system. If accountability is ignored, wouldn't it be cheaper to store a threshold signature, rather than the bitfields?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43961" PostHistoryTypeId="1" PostId="11012" RevisionGUID="a9052d2f-64d1-4a83-a437-9d8022aa22b8" CreationDate="2024-02-13T12:17:46.797" UserId="5148" Text="The necessity of bitfields in Polkadot, and potential replacement with threshold signatures" ContentLicense="CC BY-SA 4.0" />
  <row Id="43962" PostHistoryTypeId="3" PostId="11012" RevisionGUID="a9052d2f-64d1-4a83-a437-9d8022aa22b8" CreationDate="2024-02-13T12:17:46.797" UserId="5148" Text="|polkadot|storage|validator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43963" PostHistoryTypeId="2" PostId="11013" RevisionGUID="e964bb4a-f1a4-44ac-b06f-770394ff0024" CreationDate="2024-02-13T12:28:41.127" UserId="251" Text="To the best of my knowledge, this can only be modified during startup.&#xD;&#xA;&#xD;&#xA;At present, this flag does not support dynamic updates." ContentLicense="CC BY-SA 4.0" />
  <row Id="43965" PostHistoryTypeId="2" PostId="11014" RevisionGUID="e6e7cab1-5aa2-468d-a178-a0ff56661885" CreationDate="2024-02-13T12:32:33.067" UserId="251" Text="I'm not certain which two tutorials you're using.&#xD;&#xA;&#xD;&#xA;However, to ensure functionality, you need to:&#xD;&#xA;&#xD;&#xA;1. Clear the old database.&#xD;&#xA;2. Update the specifications and regenerate the spec file.&#xD;&#xA;3. Launch the node with the updated spec file.&#xD;&#xA;4. Add the keys.&#xD;&#xA;5. Reboot the node (updating GRANDPA keys necessitates a restart)." ContentLicense="CC BY-SA 4.0" />
  <row Id="43967" PostHistoryTypeId="2" PostId="11015" RevisionGUID="5afb8a8b-b4f9-4520-b131-b316a936294a" CreationDate="2024-02-13T14:58:24.630" UserId="5131" Text="Substrate can be used to implement any custom fork rule. The repo mainly provides an implementation for LongestChain and GRANDPA (Ghost-based). I believe `LongestChain` is mainly used to provide a simple, easy to follow basis for further development. In serious production environments for Substrate-based blockchains, you'd usually see GRANDPA being used rather than the simple longest chain rule." ContentLicense="CC BY-SA 4.0" />
  <row Id="43969" PostHistoryTypeId="2" PostId="11016" RevisionGUID="76d0b058-80c8-4187-ae0b-60497d86e346" CreationDate="2024-02-13T20:03:26.850" UserId="3346" Text="Have you ever seen a **ContractTrapped error that does not initially exist on a deployed contract, but starts later** after some use of the contract, and gets worse over time, affecting one contract message at first, then a second contract message, etc as the complexity of what is on the contract increases? Each affected message is a read-only message. Any idea what might cause this kind of pattern?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43971" PostHistoryTypeId="1" PostId="11016" RevisionGUID="76d0b058-80c8-4187-ae0b-60497d86e346" CreationDate="2024-02-13T20:03:26.850" UserId="3346" Text="ContractTrapped Error That Affects Additional Messages Over Time" ContentLicense="CC BY-SA 4.0" />
  <row Id="43972" PostHistoryTypeId="3" PostId="11016" RevisionGUID="76d0b058-80c8-4187-ae0b-60497d86e346" CreationDate="2024-02-13T20:03:26.850" UserId="3346" Text="|ink|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43973" PostHistoryTypeId="5" PostId="11011" RevisionGUID="9ec9f94d-1f2f-4607-a736-050960f37a23" CreationDate="2024-02-14T00:26:09.323" UserId="116" Comment="code in code blocks" Text="I have already running substrate-based node and I started to get error: &#xD;&#xA;&gt;429 Too many requests: Too many connections.&#xD;&#xA;&#xD;&#xA;This happens due to HTTP requests that my FE produces. After research I understand that I should configure ```--rpc-max-connections``` parameter, but I didn't find any info about how can I update this parameter on the already running network?&#xD;&#xA;Maybe I missed something? If yes, please let me know how can I do it)&#xD;&#xA;&#xD;&#xA;Thanks a lot!" ContentLicense="CC BY-SA 4.0" />
  <row Id="43974" PostHistoryTypeId="4" PostId="11011" RevisionGUID="9ec9f94d-1f2f-4607-a736-050960f37a23" CreationDate="2024-02-14T00:26:09.323" UserId="116" Comment="code in code blocks" Text="How can I change --rpc-max-connections on already running substrate-based node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43975" PostHistoryTypeId="50" PostId="4939" RevisionGUID="fc74c87e-598e-4fab-8ded-02af5e9f42fa" CreationDate="2024-02-14T02:00:30.050" UserId="-1" />
  <row Id="43976" PostHistoryTypeId="2" PostId="11017" RevisionGUID="58cc8f3f-fef5-464c-8b2e-4fb16b920470" CreationDate="2024-02-14T07:24:35.550" UserId="4556" Text="I'm trying to implement pallet_contracts into my node, but that results in an error. I don't get why I'm getting this error and what I'm supposed to do with it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    Checking pallet-contracts v4.0.0-dev (https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.6.0#481165d9)&#xD;&#xA;   Compiling node-icv-runtime v1.1.0-dev (/Users/arjanvaneersel/Development/polkadot-hackathon-24q1/node/runtime)&#xD;&#xA;error[E0449]: visibility qualifiers are not permitted here&#xD;&#xA;    --&gt; /Users/arjanvaneersel/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/481165d/substrate/frame/contracts/src/lib.rs:1247:3&#xD;&#xA;     |&#xD;&#xA;1247 |         environmental!(executing_contract: bool);&#xD;&#xA;     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: trait items always share the visibility of their trait&#xD;&#xA;     = note: this error originates in the macro `environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0449`.&#xD;&#xA;error: could not compile `pallet-contracts` (lib) due to 3 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: failed to run custom build command for `node-icv-runtime v1.1.0-dev (/Users/arjanvaneersel/Development/polkadot-hackathon-24q1/node/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/arjanvaneersel/Development/polkadot-hackathon-24q1/node/target/release/build/node-icv-runtime-3e923a035f42d14e/build-script-build` (exit status: 101)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: env -u CARGO_ENCODED_RUSTFLAGS CARGO_TARGET_DIR=&quot;/Users/arjanvaneersel/Development/polkadot-hackathon-24q1/node/target/release/wbuild/node-icv-runtime/target&quot; RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/arjanvaneersel/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/arjanvaneersel/Development/polkadot-hackathon-24q1/node/target/release/wbuild/node-icv-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot; &quot;-Z&quot; &quot;build-std&quot;&#xD;&#xA;  Using rustc version: rustc 1.77.0-nightly (25f8d01fd 2024-01-18)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling pallet-contracts v4.0.0-dev (https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.6.0#481165d9)&#xD;&#xA;  warning: unstable feature specified for `-Ctarget-feature`: `sign-ext`&#xD;&#xA;    |&#xD;&#xA;    = note: this feature is not stably supported; its behavior can change in the future&#xD;&#xA;&#xD;&#xA;  warning: `pallet-template` (lib) generated 1 warning&#xD;&#xA;  error[E0449]: visibility qualifiers are not permitted here&#xD;&#xA;      --&gt; /Users/arjanvaneersel/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/481165d/substrate/frame/contracts/src/lib.rs:1247:3&#xD;&#xA;       |&#xD;&#xA;  1247 |         environmental!(executing_contract: bool);&#xD;&#xA;       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;       |&#xD;&#xA;       = note: trait items always share the visibility of their trait&#xD;&#xA;       = note: this error originates in the macro `environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0449`.&#xD;&#xA;  error: could not compile `pallet-contracts` (lib) due to 3 previous errors&#xD;&#xA;  thread 'main' panicked at /Users/arjanvaneersel/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/481165d/substrate/utils/wasm-builder/src/wasm_project.rs:822:37:&#xD;&#xA;  Copying the bloaty file to the project dir.: Os { code: 2, kind: NotFound, message: &quot;No such file or directory&quot; }&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here relevant snippets of my runtime's Cargo.toml:&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;# Additional Dependencies&#xD;&#xA;pallet-nfts = { git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, tag = &quot;polkadot-v1.6.0&quot;, default-features = false }&#xD;&#xA;pallet-identity = { git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, tag = &quot;polkadot-v1.6.0&quot;, default-features = false }&#xD;&#xA;pallet-contracts = { git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, tag = &quot;polkadot-v1.6.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { path = &quot;../pallets/template&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    ...&#xD;&#xA;	&quot;pallet-contracts/std&quot;,&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	...&#xD;&#xA;	&quot;pallet-contracts/runtime-benchmarks&quot;,&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	...&#xD;&#xA;	&quot;pallet-contracts/try-runtime&quot;,&#xD;&#xA;	...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here from lib.rs:&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.&#xD;&#xA;#![recursion_limit = &quot;256&quot;]&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;	pub CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(30);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Configure pallet_contracts.&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	/// The safest default is to allow no calls at all.&#xD;&#xA;	///&#xD;&#xA;	/// Runtimes should whitelist dispatchables that are allowed to be called from contracts&#xD;&#xA;	/// and make sure they are stable. Dispatchables exposed to contracts are not allowed to&#xD;&#xA;	/// change because that would break already deployed contracts. The `Call` structure itself&#xD;&#xA;	/// is not allowed to change the indices of existing pallets, too.&#xD;&#xA;	type CallFilter = Nothing;&#xD;&#xA;	type DepositPerItem = dynamic_params::contracts::DepositPerItem;&#xD;&#xA;	type DepositPerByte = dynamic_params::contracts::DepositPerByte;&#xD;&#xA;	type DefaultDepositLimit = dynamic_params::contracts::DefaultDepositLimit;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 5];&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 123 * 1024 }&gt;;&#xD;&#xA;	type MaxStorageKeyLen = ConstU32&lt;128&gt;;&#xD;&#xA;	type UnsafeUnstableInterface = ConstBool&lt;false&gt;;&#xD;&#xA;	type MaxDebugBufferLen = ConstU32&lt;{ 2 * 1024 * 1024 }&gt;;&#xD;&#xA;	type RuntimeHoldReason = RuntimeHoldReason;&#xD;&#xA;	#[cfg(not(feature = &quot;runtime-benchmarks&quot;))]&#xD;&#xA;	type Migrations = ();&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	type Migrations = pallet_contracts::migration::codegen::BenchMigrations;&#xD;&#xA;	type MaxDelegateDependencies = ConstU32&lt;32&gt;;&#xD;&#xA;	type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent;&#xD;&#xA;	type Debug = ();&#xD;&#xA;	type Environment = ();&#xD;&#xA;	type Xcm = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;// Create the runtime by composing the FRAME pallets that were previously configured.&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub struct Runtime {&#xD;&#xA;		System: frame_system,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		Nfts: pallet_nfts,&#xD;&#xA;		Identity: pallet_identity,&#xD;&#xA;		Contracts: pallet_contracts,&#xD;&#xA;		// Include the custom logic from the pallet-template in the runtime.&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;#[allow(unused_parens)]&#xD;&#xA;type Migrations = (pallet_contracts::Migration&lt;Runtime&gt;);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benches {&#xD;&#xA;	define_benchmarks!(&#xD;&#xA;		[frame_benchmarking, BaselineBench::&lt;Runtime&gt;]&#xD;&#xA;		[frame_system, SystemBench::&lt;Runtime&gt;]&#xD;&#xA;		[pallet_balances, Balances]&#xD;&#xA;		[pallet_contracts, Contracts]&#xD;&#xA;		(pallet_identity, Identity)&#xD;&#xA;		(pallet_nfts, Nfts)&#xD;&#xA;		[pallet_timestamp, Timestamp]&#xD;&#xA;		[pallet_sudo, Sudo]&#xD;&#xA;		[pallet_template, TemplateModule]&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;impl pallet_contracts::ContractsApi&lt;Block, AccountId, Balance, BlockNumber, Hash, EventRecord&gt; for Runtime&#xD;&#xA;	{&#xD;&#xA;		fn call(&#xD;&#xA;			origin: AccountId,&#xD;&#xA;			dest: AccountId,&#xD;&#xA;			value: Balance,&#xD;&#xA;			gas_limit: Option&lt;Weight&gt;,&#xD;&#xA;			storage_deposit_limit: Option&lt;Balance&gt;,&#xD;&#xA;			input_data: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; pallet_contracts::ContractExecResult&lt;Balance, EventRecord&gt; {&#xD;&#xA;			let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block);&#xD;&#xA;			Contracts::bare_call(&#xD;&#xA;				origin,&#xD;&#xA;				dest,&#xD;&#xA;				value,&#xD;&#xA;				gas_limit,&#xD;&#xA;				storage_deposit_limit,&#xD;&#xA;				input_data,&#xD;&#xA;				pallet_contracts::DebugInfo::UnsafeDebug,&#xD;&#xA;				pallet_contracts::CollectEvents::UnsafeCollect,&#xD;&#xA;				pallet_contracts::Determinism::Enforced,&#xD;&#xA;			)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn instantiate(&#xD;&#xA;			origin: AccountId,&#xD;&#xA;			value: Balance,&#xD;&#xA;			gas_limit: Option&lt;Weight&gt;,&#xD;&#xA;			storage_deposit_limit: Option&lt;Balance&gt;,&#xD;&#xA;			code: pallet_contracts::Code&lt;Hash&gt;,&#xD;&#xA;			data: Vec&lt;u8&gt;,&#xD;&#xA;			salt: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; pallet_contracts::ContractInstantiateResult&lt;AccountId, Balance, EventRecord&gt;&#xD;&#xA;		{&#xD;&#xA;			let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block);&#xD;&#xA;			Contracts::bare_instantiate(&#xD;&#xA;				origin,&#xD;&#xA;				value,&#xD;&#xA;				gas_limit,&#xD;&#xA;				storage_deposit_limit,&#xD;&#xA;				code,&#xD;&#xA;				data,&#xD;&#xA;				salt,&#xD;&#xA;				pallet_contracts::DebugInfo::UnsafeDebug,&#xD;&#xA;				pallet_contracts::CollectEvents::UnsafeCollect,&#xD;&#xA;			)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn upload_code(&#xD;&#xA;			origin: AccountId,&#xD;&#xA;			code: Vec&lt;u8&gt;,&#xD;&#xA;			storage_deposit_limit: Option&lt;Balance&gt;,&#xD;&#xA;			determinism: pallet_contracts::Determinism,&#xD;&#xA;		) -&gt; pallet_contracts::CodeUploadResult&lt;Hash, Balance&gt;&#xD;&#xA;		{&#xD;&#xA;			Contracts::bare_upload_code(&#xD;&#xA;				origin,&#xD;&#xA;				code,&#xD;&#xA;				storage_deposit_limit,&#xD;&#xA;				determinism,&#xD;&#xA;			)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn get_storage(&#xD;&#xA;			address: AccountId,&#xD;&#xA;			key: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; pallet_contracts::GetStorageResult {&#xD;&#xA;			Contracts::get_storage(&#xD;&#xA;				address,&#xD;&#xA;				key&#xD;&#xA;			)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does anyone have an idea how I can solve this error? Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="43978" PostHistoryTypeId="1" PostId="11017" RevisionGUID="58cc8f3f-fef5-464c-8b2e-4fb16b920470" CreationDate="2024-02-14T07:24:35.550" UserId="4556" Text="Implementing pallet_contracts into node" ContentLicense="CC BY-SA 4.0" />
  <row Id="43979" PostHistoryTypeId="3" PostId="11017" RevisionGUID="58cc8f3f-fef5-464c-8b2e-4fb16b920470" CreationDate="2024-02-14T07:24:35.550" UserId="4556" Text="|substrate-node-template|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43982" PostHistoryTypeId="2" PostId="11019" RevisionGUID="09d08642-2a0b-4879-8660-259608a49d93" CreationDate="2024-02-14T10:58:54.990" UserId="5153" Text="I see this answer and recognize that `partialFee + tip = Used Fee`.&#xD;&#xA;But actually it is not.&#xD;&#xA;&#xD;&#xA;When I get the Extrinsic partialFee below, I get the Estimated Fee, not the Used Fee. Therefore, my wallet balance was misaligned with the one on the blockchain.&#xD;&#xA;&#xD;&#xA;https://polkadot.subscan.io/extrinsic/19474756-4?tab=event&#xD;&#xA;&#xD;&#xA;Here is how to get a partialFee.&#xD;&#xA;```&#xD;&#xA;const blockNumber = 19474756&#xD;&#xA;const blockHash = await api.rpc.chain.getBlockHash(blockNumber)&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(blockHash)&#xD;&#xA;const extrinsic = signedBlock.block.extrinsics[4]&#xD;&#xA;const at = await api.at(blockHash)&#xD;&#xA;const info = await at.call.transactionPaymentApi.queryInfo(extrinsic.toU8a(), extrinsic.toU8a().length)&#xD;&#xA;console.log(info.partialFee)&#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5ZN48.png&#xD;&#xA;&#xD;&#xA;How do I get a UsedFee?&#xD;&#xA;Or is this a bug?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43984" PostHistoryTypeId="1" PostId="11019" RevisionGUID="09d08642-2a0b-4879-8660-259608a49d93" CreationDate="2024-02-14T10:58:54.990" UserId="5153" Text="How do I get a Used Fee?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43985" PostHistoryTypeId="3" PostId="11019" RevisionGUID="09d08642-2a0b-4879-8660-259608a49d93" CreationDate="2024-02-14T10:58:54.990" UserId="5153" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="43986" PostHistoryTypeId="5" PostId="11019" RevisionGUID="cca79bb2-7df1-470a-878b-cbf8f6c8092f" CreationDate="2024-02-14T11:00:22.080" UserId="5153" Comment="added 81 characters in body" Text="I see this answer and recognize that `partialFee + tip = Used Fee`.&#xD;&#xA;https://substrate.stackexchange.com/questions/6361/estimated-fee-and-used-fee&#xD;&#xA;&#xD;&#xA;But actually it is not.&#xD;&#xA;&#xD;&#xA;When I get the Extrinsic partialFee below, I get the Estimated Fee, not the Used Fee. Therefore, my wallet balance was misaligned with the one on the blockchain.&#xD;&#xA;&#xD;&#xA;https://polkadot.subscan.io/extrinsic/19474756-4?tab=event&#xD;&#xA;&#xD;&#xA;Here is how to get a partialFee.&#xD;&#xA;```&#xD;&#xA;const blockNumber = 19474756&#xD;&#xA;const blockHash = await api.rpc.chain.getBlockHash(blockNumber)&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(blockHash)&#xD;&#xA;const extrinsic = signedBlock.block.extrinsics[4]&#xD;&#xA;const at = await api.at(blockHash)&#xD;&#xA;const info = await at.call.transactionPaymentApi.queryInfo(extrinsic.toU8a(), extrinsic.toU8a().length)&#xD;&#xA;console.log(info.partialFee)&#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5ZN48.png&#xD;&#xA;&#xD;&#xA;How do I get a UsedFee?&#xD;&#xA;Or is this a bug?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43987" PostHistoryTypeId="5" PostId="11019" RevisionGUID="8297412e-be67-4abf-a88d-59cc5ded8e95" CreationDate="2024-02-14T11:00:44.643" UserId="5153" Comment="added 2 characters in body" Text="I see this answer and recognize that `partialFee + tip = Used Fee`.&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/6361/estimated-fee-and-used-fee&#xD;&#xA;&#xD;&#xA;But actually it is not.&#xD;&#xA;&#xD;&#xA;When I get the Extrinsic partialFee below, I get the Estimated Fee, not the Used Fee. Therefore, my wallet balance was misaligned with the one on the blockchain.&#xD;&#xA;&#xD;&#xA;https://polkadot.subscan.io/extrinsic/19474756-4?tab=event&#xD;&#xA;&#xD;&#xA;Here is how to get a partialFee.&#xD;&#xA;```&#xD;&#xA;const blockNumber = 19474756&#xD;&#xA;const blockHash = await api.rpc.chain.getBlockHash(blockNumber)&#xD;&#xA;const signedBlock = await api.rpc.chain.getBlock(blockHash)&#xD;&#xA;const extrinsic = signedBlock.block.extrinsics[4]&#xD;&#xA;const at = await api.at(blockHash)&#xD;&#xA;const info = await at.call.transactionPaymentApi.queryInfo(extrinsic.toU8a(), extrinsic.toU8a().length)&#xD;&#xA;console.log(info.partialFee)&#xD;&#xA;```&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/5ZN48.png&#xD;&#xA;&#xD;&#xA;How do I get a UsedFee?&#xD;&#xA;Or is this a bug?" ContentLicense="CC BY-SA 4.0" />
  <row Id="43988" PostHistoryTypeId="5" PostId="11017" RevisionGUID="875aed90-d990-42f1-802b-2d76d24369b5" CreationDate="2024-02-14T14:52:09.057" UserId="4556" Comment="edited body" Text="I'm trying to implement pallet_contracts into my node, but that results in an error. I don't get why I'm getting this error and what I'm supposed to do with it.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;    Checking pallet-contracts v4.0.0-dev (https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.6.0#481165d9)&#xD;&#xA;   Compiling node-icv-runtime v1.1.0-dev (/Users/arjanvaneersel/Development/polkadot-hackathon-24q1/node/runtime)&#xD;&#xA;error[E0449]: visibility qualifiers are not permitted here&#xD;&#xA;    --&gt; /Users/arjanvaneersel/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/481165d/substrate/frame/contracts/src/lib.rs:1247:3&#xD;&#xA;     |&#xD;&#xA;1247 |         environmental!(executing_contract: bool);&#xD;&#xA;     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;     = note: trait items always share the visibility of their trait&#xD;&#xA;     = note: this error originates in the macro `environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;For more information about this error, try `rustc --explain E0449`.&#xD;&#xA;error: could not compile `pallet-contracts` (lib) due to 3 previous errors&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;error: failed to run custom build command for `node-icv-runtime v1.1.0-dev (/Users/arjanvaneersel/Development/polkadot-hackathon-24q1/node/runtime)`&#xD;&#xA;&#xD;&#xA;Caused by:&#xD;&#xA;  process didn't exit successfully: `/Users/arjanvaneersel/Development/polkadot-hackathon-24q1/node/target/release/build/node-icv-runtime-3e923a035f42d14e/build-script-build` (exit status: 101)&#xD;&#xA;  --- stdout&#xD;&#xA;  Information that should be included in a bug report.&#xD;&#xA;  Executing build command: env -u CARGO_ENCODED_RUSTFLAGS CARGO_TARGET_DIR=&quot;/Users/arjanvaneersel/Development/polkadot-hackathon-24q1/node/target/release/wbuild/node-icv-runtime/target&quot; RUSTFLAGS=&quot;-C target-cpu=mvp -C target-feature=-sign-ext -C link-arg=--export-table -Clink-arg=--export=__heap_base -C link-arg=--import-memory  &quot; SKIP_WASM_BUILD=&quot;&quot; &quot;/Users/arjanvaneersel/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo&quot; &quot;rustc&quot; &quot;--target=wasm32-unknown-unknown&quot; &quot;--manifest-path=/Users/arjanvaneersel/Development/polkadot-hackathon-24q1/node/target/release/wbuild/node-icv-runtime/Cargo.toml&quot; &quot;--color=always&quot; &quot;--profile&quot; &quot;release&quot; &quot;-Z&quot; &quot;build-std&quot;&#xD;&#xA;  Using rustc version: rustc 1.77.0-nightly (25f8d01fd 2024-01-18)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  --- stderr&#xD;&#xA;     Compiling pallet-contracts v4.0.0-dev (https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.6.0#481165d9)&#xD;&#xA;  warning: unstable feature specified for `-Ctarget-feature`: `sign-ext`&#xD;&#xA;    |&#xD;&#xA;    = note: this feature is not stably supported; its behavior can change in the future&#xD;&#xA;&#xD;&#xA;  warning: `pallet-template` (lib) generated 1 warning&#xD;&#xA;  error[E0449]: visibility qualifiers are not permitted here&#xD;&#xA;      --&gt; /Users/arjanvaneersel/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/481165d/substrate/frame/contracts/src/lib.rs:1247:3&#xD;&#xA;       |&#xD;&#xA;  1247 |         environmental!(executing_contract: bool);&#xD;&#xA;       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;       |&#xD;&#xA;       = note: trait items always share the visibility of their trait&#xD;&#xA;       = note: this error originates in the macro `environmental` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0449`.&#xD;&#xA;  error: could not compile `pallet-contracts` (lib) due to 3 previous errors&#xD;&#xA;  thread 'main' panicked at /Users/arjanvaneersel/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/481165d/substrate/utils/wasm-builder/src/wasm_project.rs:822:37:&#xD;&#xA;  Copying the bloaty file to the project dir.: Os { code: 2, kind: NotFound, message: &quot;No such file or directory&quot; }&#xD;&#xA;  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here relevant snippets of my runtime's Cargo.toml:&#xD;&#xA;```&#xD;&#xA;...&#xD;&#xA;# Additional Dependencies&#xD;&#xA;pallet-nfts = { git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, tag = &quot;polkadot-v1.6.0&quot;, default-features = false }&#xD;&#xA;pallet-identity = { git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, tag = &quot;polkadot-v1.6.0&quot;, default-features = false }&#xD;&#xA;pallet-contracts = { git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, tag = &quot;polkadot-v1.6.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;# Local Dependencies&#xD;&#xA;pallet-template = { path = &quot;../pallets/template&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    ...&#xD;&#xA;	&quot;pallet-contracts/std&quot;,&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;]&#xD;&#xA;runtime-benchmarks = [&#xD;&#xA;	...&#xD;&#xA;	&quot;pallet-contracts/runtime-benchmarks&quot;,&#xD;&#xA;    ...&#xD;&#xA;&#xD;&#xA;]&#xD;&#xA;try-runtime = [&#xD;&#xA;	...&#xD;&#xA;	&quot;pallet-contracts/try-runtime&quot;,&#xD;&#xA;	...&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here from lib.rs:&#xD;&#xA;```&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std)]&#xD;&#xA;// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.&#xD;&#xA;#![recursion_limit = &quot;256&quot;]&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub Schedule: pallet_contracts::Schedule&lt;Runtime&gt; = Default::default();&#xD;&#xA;	pub CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(30);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/// Configure pallet_contracts.&#xD;&#xA;impl pallet_contracts::Config for Runtime {&#xD;&#xA;	type Time = Timestamp;&#xD;&#xA;	type Randomness = RandomnessCollectiveFlip;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type RuntimeCall = RuntimeCall;&#xD;&#xA;	/// The safest default is to allow no calls at all.&#xD;&#xA;	///&#xD;&#xA;	/// Runtimes should whitelist dispatchables that are allowed to be called from contracts&#xD;&#xA;	/// and make sure they are stable. Dispatchables exposed to contracts are not allowed to&#xD;&#xA;	/// change because that would break already deployed contracts. The `Call` structure itself&#xD;&#xA;	/// is not allowed to change the indices of existing pallets, too.&#xD;&#xA;	type CallFilter = Nothing;&#xD;&#xA;	type DepositPerItem = dynamic_params::contracts::DepositPerItem;&#xD;&#xA;	type DepositPerByte = dynamic_params::contracts::DepositPerByte;&#xD;&#xA;	type DefaultDepositLimit = dynamic_params::contracts::DefaultDepositLimit;&#xD;&#xA;	type CallStack = [pallet_contracts::Frame&lt;Self&gt;; 5];&#xD;&#xA;	type WeightPrice = pallet_transaction_payment::Pallet&lt;Self&gt;;&#xD;&#xA;	type WeightInfo = pallet_contracts::weights::SubstrateWeight&lt;Self&gt;;&#xD;&#xA;	type ChainExtension = ();&#xD;&#xA;	type Schedule = Schedule;&#xD;&#xA;	type AddressGenerator = pallet_contracts::DefaultAddressGenerator;&#xD;&#xA;	type MaxCodeLen = ConstU32&lt;{ 123 * 1024 }&gt;;&#xD;&#xA;	type MaxStorageKeyLen = ConstU32&lt;128&gt;;&#xD;&#xA;	type UnsafeUnstableInterface = ConstBool&lt;false&gt;;&#xD;&#xA;	type MaxDebugBufferLen = ConstU32&lt;{ 2 * 1024 * 1024 }&gt;;&#xD;&#xA;	type RuntimeHoldReason = RuntimeHoldReason;&#xD;&#xA;	#[cfg(not(feature = &quot;runtime-benchmarks&quot;))]&#xD;&#xA;	type Migrations = ();&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	type Migrations = pallet_contracts::migration::codegen::BenchMigrations;&#xD;&#xA;	type MaxDelegateDependencies = ConstU32&lt;32&gt;;&#xD;&#xA;	type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent;&#xD;&#xA;	type Debug = ();&#xD;&#xA;	type Environment = ();&#xD;&#xA;	type Xcm = ();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;// Create the runtime by composing the FRAME pallets that were previously configured.&#xD;&#xA;construct_runtime!(&#xD;&#xA;	pub struct Runtime {&#xD;&#xA;		System: frame_system,&#xD;&#xA;		Timestamp: pallet_timestamp,&#xD;&#xA;		Aura: pallet_aura,&#xD;&#xA;		Grandpa: pallet_grandpa,&#xD;&#xA;		Balances: pallet_balances,&#xD;&#xA;		TransactionPayment: pallet_transaction_payment,&#xD;&#xA;		Sudo: pallet_sudo,&#xD;&#xA;		Nfts: pallet_nfts,&#xD;&#xA;		Identity: pallet_identity,&#xD;&#xA;		Contracts: pallet_contracts,&#xD;&#xA;		// Include the custom logic from the pallet-template in the runtime.&#xD;&#xA;		TemplateModule: pallet_template,&#xD;&#xA;	}&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;#[allow(unused_parens)]&#xD;&#xA;type Migrations = (pallet_contracts::Migration&lt;Runtime&gt;);&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;mod benches {&#xD;&#xA;	define_benchmarks!(&#xD;&#xA;		[frame_benchmarking, BaselineBench::&lt;Runtime&gt;]&#xD;&#xA;		[frame_system, SystemBench::&lt;Runtime&gt;]&#xD;&#xA;		[pallet_balances, Balances]&#xD;&#xA;		[pallet_contracts, Contracts]&#xD;&#xA;		[pallet_identity, Identity]&#xD;&#xA;		[pallet_nfts, Nfts]&#xD;&#xA;		[pallet_timestamp, Timestamp]&#xD;&#xA;		[pallet_sudo, Sudo]&#xD;&#xA;		[pallet_template, TemplateModule]&#xD;&#xA;	);&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;impl pallet_contracts::ContractsApi&lt;Block, AccountId, Balance, BlockNumber, Hash, EventRecord&gt; for Runtime&#xD;&#xA;	{&#xD;&#xA;		fn call(&#xD;&#xA;			origin: AccountId,&#xD;&#xA;			dest: AccountId,&#xD;&#xA;			value: Balance,&#xD;&#xA;			gas_limit: Option&lt;Weight&gt;,&#xD;&#xA;			storage_deposit_limit: Option&lt;Balance&gt;,&#xD;&#xA;			input_data: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; pallet_contracts::ContractExecResult&lt;Balance, EventRecord&gt; {&#xD;&#xA;			let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block);&#xD;&#xA;			Contracts::bare_call(&#xD;&#xA;				origin,&#xD;&#xA;				dest,&#xD;&#xA;				value,&#xD;&#xA;				gas_limit,&#xD;&#xA;				storage_deposit_limit,&#xD;&#xA;				input_data,&#xD;&#xA;				pallet_contracts::DebugInfo::UnsafeDebug,&#xD;&#xA;				pallet_contracts::CollectEvents::UnsafeCollect,&#xD;&#xA;				pallet_contracts::Determinism::Enforced,&#xD;&#xA;			)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn instantiate(&#xD;&#xA;			origin: AccountId,&#xD;&#xA;			value: Balance,&#xD;&#xA;			gas_limit: Option&lt;Weight&gt;,&#xD;&#xA;			storage_deposit_limit: Option&lt;Balance&gt;,&#xD;&#xA;			code: pallet_contracts::Code&lt;Hash&gt;,&#xD;&#xA;			data: Vec&lt;u8&gt;,&#xD;&#xA;			salt: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; pallet_contracts::ContractInstantiateResult&lt;AccountId, Balance, EventRecord&gt;&#xD;&#xA;		{&#xD;&#xA;			let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block);&#xD;&#xA;			Contracts::bare_instantiate(&#xD;&#xA;				origin,&#xD;&#xA;				value,&#xD;&#xA;				gas_limit,&#xD;&#xA;				storage_deposit_limit,&#xD;&#xA;				code,&#xD;&#xA;				data,&#xD;&#xA;				salt,&#xD;&#xA;				pallet_contracts::DebugInfo::UnsafeDebug,&#xD;&#xA;				pallet_contracts::CollectEvents::UnsafeCollect,&#xD;&#xA;			)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn upload_code(&#xD;&#xA;			origin: AccountId,&#xD;&#xA;			code: Vec&lt;u8&gt;,&#xD;&#xA;			storage_deposit_limit: Option&lt;Balance&gt;,&#xD;&#xA;			determinism: pallet_contracts::Determinism,&#xD;&#xA;		) -&gt; pallet_contracts::CodeUploadResult&lt;Hash, Balance&gt;&#xD;&#xA;		{&#xD;&#xA;			Contracts::bare_upload_code(&#xD;&#xA;				origin,&#xD;&#xA;				code,&#xD;&#xA;				storage_deposit_limit,&#xD;&#xA;				determinism,&#xD;&#xA;			)&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;		fn get_storage(&#xD;&#xA;			address: AccountId,&#xD;&#xA;			key: Vec&lt;u8&gt;,&#xD;&#xA;		) -&gt; pallet_contracts::GetStorageResult {&#xD;&#xA;			Contracts::get_storage(&#xD;&#xA;				address,&#xD;&#xA;				key&#xD;&#xA;			)&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Does anyone have an idea how I can solve this error? Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="43989" PostHistoryTypeId="2" PostId="11020" RevisionGUID="95c24442-f2e2-41cd-b0f2-872f7788ae3b" CreationDate="2024-02-14T15:32:44.527" UserId="2005" Text="I looked at your code and you have a 1s slot duration [time][1] and max 2 seconds of [weight][2] allocated for block production. 2 seconds for block production is default for solochains with 6s slot duration. Thus, if you have faster slot duration you should reduce weight allocated for block production accordingly. And I don't really know if you can have 1s slot duration in a production chain, implications of it is well described [here][3] and [here][4].&#xD;&#xA;&#xD;&#xA;In particular, this line seems to describe situation very similar to yours:&#xD;&#xA;&#xD;&#xA;&gt; How exactly it behaves depends on the consensus engine that's being used, but when blocks are consistently overfull it causes a slowdown of the chain. In certain consensus engines, it might lead to a stall.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/lunes-platform/lunes-nightly/blob/master/runtime/src/constants.rs#L47&#xD;&#xA;  [2]: https://github.com/lunes-platform/lunes-nightly/blob/master/runtime/src/lib.rs#L156&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/1841/2005&#xD;&#xA;  [4]: https://substrate.stackexchange.com/a/1836/2005" ContentLicense="CC BY-SA 4.0" />
  <row Id="43991" PostHistoryTypeId="2" PostId="11021" RevisionGUID="018e73ad-5499-471d-9822-1cd9295ba750" CreationDate="2024-02-14T15:49:39.393" UserId="170" Text="Just from a quick look at the code of the contract, I have a candidate for what can be wrong. One problem might be `message_vec` inside the `ContractStorage.` This field is of type `Vec`, which is so called packed struct (more on this [in the ink! docs](https://use.ink/datastructures/storage-layout#packed-vs-non-packed-layout)).&#xD;&#xA;&#xD;&#xA;TLDR;&#xD;&#xA;&#xD;&#xA;the maximum size of one memory cell (your `Vec` is in one memory cell) is 16384 bytes. Since your `message_vec` holds items of type `Hash` (which I assume is 32 bytes), you can only fit in 511 items (32 bytes is reserved to hold the size of the `Vec` when SCALE encoding). Therefore, after sending 511 messages, the write to this field (to the storage) will panic as the size of the `Vec` would be greater than the maximum size allowed for one memory cell.&#xD;&#xA;&#xD;&#xA;This goes for every `Vec` in the contract storage. You must be sure that in such a situation, the storage cell of `Vec` might overflow to not cause panic.&#xD;&#xA;&#xD;&#xA;Again, this is just my suspicion and suggestion from a quick look at the code:) LMK if this helped:)&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;Since you mentioned the message getting contract trapped is `get_messages_by_keyword`, the case might also be that the extrinsic simply 'run out of gas' since you are looping through an unbound vec." ContentLicense="CC BY-SA 4.0" />
  <row Id="43993" PostHistoryTypeId="5" PostId="11021" RevisionGUID="55a50be4-68b6-41b8-bd17-674d8f96f9a7" CreationDate="2024-02-14T15:55:04.193" UserId="170" Comment="expand the answer" Text="Just from a quick look at the code of the contract, I have a candidate for what can be wrong. One problem might be `message_vec` inside the `ContractStorage.` This field is of type `Vec`, which is so called packed struct (more on this [in the ink! docs](https://use.ink/datastructures/storage-layout#packed-vs-non-packed-layout)).&#xD;&#xA;&#xD;&#xA;TLDR;&#xD;&#xA;&#xD;&#xA;the maximum size of one memory cell (your `Vec` is in one memory cell) is 16384 bytes. Since your `message_vec` holds items of type `Hash` (which I assume is 32 bytes), you can only fit in 511 items (32 bytes is reserved to hold the size of the `Vec` when SCALE encoding). Therefore, after sending 511 messages, the write to this field (to the storage) will panic as the size of the `Vec` would be greater than the maximum size allowed for one memory cell.&#xD;&#xA;&#xD;&#xA;This goes for every `Vec` in the contract storage. You must be sure that in such a situation, the storage cell of `Vec` might overflow to not cause panic.&#xD;&#xA;&#xD;&#xA;Again, this is just my suspicion and suggestion from a quick look at the code:) LMK if this helped:)&#xD;&#xA;&#xD;&#xA;EDIT:&#xD;&#xA;&#xD;&#xA;Since you mentioned the message getting contract trapped is `get_messages_by_keyword`, the case might also be that the extrinsic simply 'run out of gas' since you are looping through an unbound vec.&#xD;&#xA;&#xD;&#xA;EDIT2:&#xD;&#xA;&#xD;&#xA;since you are using A LOT of (potentially) unbound vectors in the storage, I would suspect THIS the most:)" ContentLicense="CC BY-SA 4.0" />
  <row Id="43994" PostHistoryTypeId="5" PostId="11020" RevisionGUID="a3cca3ab-3207-4e2c-b418-d69980a32ce4" CreationDate="2024-02-14T16:23:21.910" UserId="2005" Comment="added 173 characters in body" Text="I looked at your code and you have a 1s slot duration [time][1] and max 2 seconds of [weight][2] allocated for block production. 2 seconds for block production is default for solochains with 6s slot duration. Thus, if you have faster slot duration you should reduce weight allocated for block production accordingly. And I don't really know if you can have 1s slot duration in a production chain, implications of it is well described [here][3] and [here][4].&#xD;&#xA;&#xD;&#xA;In particular, this line seems to describe situation very similar to yours:&#xD;&#xA;&#xD;&#xA;&gt; How exactly it behaves depends on the consensus engine that's being used, but when blocks are consistently overfull it causes a slowdown of the chain. In certain consensus engines, it might lead to a stall.&#xD;&#xA;&#xD;&#xA;To fix it, try reducing the max available block weight to a lower value than 2 seconds, f.e, take the same ratio as with 6s slot duration, i.e third of 1s slot duration is ~0.3s (should probably be even less than this)&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/lunes-platform/lunes-nightly/blob/master/runtime/src/constants.rs#L47&#xD;&#xA;  [2]: https://github.com/lunes-platform/lunes-nightly/blob/master/runtime/src/lib.rs#L156&#xD;&#xA;  [3]: https://substrate.stackexchange.com/a/1841/2005&#xD;&#xA;  [4]: https://substrate.stackexchange.com/a/1836/2005" ContentLicense="CC BY-SA 4.0" />
  <row Id="43996" PostHistoryTypeId="50" PostId="6819" RevisionGUID="dbc00a0f-d205-44c8-be97-b1a19cf6d900" CreationDate="2024-02-14T22:08:11.000" UserId="-1" />
  <row Id="43997" PostHistoryTypeId="50" PostId="4376" RevisionGUID="b5deb9e6-9b5a-4fb9-ac14-502921eadb07" CreationDate="2024-02-15T04:05:30.673" UserId="-1" />
  <row Id="43998" PostHistoryTypeId="2" PostId="11022" RevisionGUID="19c59986-a0f3-41bd-b35c-d531a8fb4124" CreationDate="2024-02-15T12:19:20.970" UserId="4243" Text="We are facing a challenge regarding our mainnet and we need the guidance and expertise of the community. Currently, we are looking to update the SLOT_DURATION to optimize the performance of our network.&#xD;&#xA;&#xD;&#xA;We would appreciate guidance, insights, or links to resources that can assist us in this process without compromising existing data. We want to ensure a smooth transition and minimize any risk of data loss.&#xD;&#xA;&#xD;&#xA;We thank you in advance for your help!&#xD;&#xA;&#xD;&#xA;The best approach to update without losing data. The network is still relatively new with few users.&#xD;&#xA;&#xD;&#xA;We hope this helps!" ContentLicense="CC BY-SA 4.0" />
  <row Id="44000" PostHistoryTypeId="1" PostId="11022" RevisionGUID="19c59986-a0f3-41bd-b35c-d531a8fb4124" CreationDate="2024-02-15T12:19:20.970" UserId="4243" Text="Updating SLOT_DURATION on Mainnet - Seeking Assistance!" ContentLicense="CC BY-SA 4.0" />
  <row Id="44001" PostHistoryTypeId="3" PostId="11022" RevisionGUID="19c59986-a0f3-41bd-b35c-d531a8fb4124" CreationDate="2024-02-15T12:19:20.970" UserId="4243" Text="|runtime|storage|validator|blockchain|solo-chain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44002" PostHistoryTypeId="2" PostId="11023" RevisionGUID="c2641dba-865c-4627-ba0f-7f04a2f01451" CreationDate="2024-02-15T12:23:22.560" UserId="2005" Text="`Used fee` or aka `actual fee` is the actual transaction fee that was charged from your account for that extrinsic. This amount is emitted in an event of `transaction_payment` pallet `TransactionFeePaid`. You can see that it matches the used fee [here][1]. Also [here][2] is a very detailed answer how `used fee` is calculated:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://polkadot.subscan.io/extrinsic/19474756-4?event=19474756-70&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/4224/2005" ContentLicense="CC BY-SA 4.0" />
  <row Id="44004" PostHistoryTypeId="2" PostId="11024" RevisionGUID="e4888f50-ec2e-4158-81d9-31d6e606ecad" CreationDate="2024-02-15T12:53:08.307" UserId="2168" Text="we ran into an issue when trying to create a pool on the relay-chain from a contract on the parachain.&#xD;&#xA;&#xD;&#xA;The issue is that when an interior location of a parachain (a contract account on Shibuya) sends an XCM transaction to the relay chain (Westend in this case), the origin is a descended origin MultiLocation { parents: 0, interior: X2(Parachain(2000), AccountId32 { ... }}. There is no location converter in Westend that supports this type of conversion.&#xD;&#xA;&#xD;&#xA;This basically means a smart contract account would never be able to do a transaction on relay chain. Is that assumption true? Are there plans to allow a parachain interior account to send XCM transact instructions to relay chain?&#xD;&#xA;&#xD;&#xA;If I add this line to Westend XCM config, it works:&#xD;&#xA;&#xD;&#xA;https://gitlab.com/okalice/polkadot-sdk/-/blob/7d3040952117bb471a9a6d40744088c111e670d4/polkadot/xcm/xcm-builder/src/location_conversion.rs#L311&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  - xcm::process_instruction: === WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(10000000000000) }]))&#xD;&#xA;  - xcm::currency_adapter: withdraw_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(10000000000000) }, who: MultiLocation { parents: 0, interior: X2(Parachain(2000), AccountId32 { network: Some(Westend), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }&#xD;&#xA;  - xcm::execute: !!! ERROR: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;)&#xD;&#xA;  - xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 1, xcm_error: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;), weight: Weight { ref_time: 100015189000, proof_size: 100000000000 } })&#xD;&#xA;  - xcm::execute_xcm_in_credit: Execution errored at 1: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;) (original_origin: MultiLocation { parents: 0, interior: X1(Parachain(2000)) })&#xD;&#xA;  - xcm::process-message: XCM message execution incomplete, used weight: Weight(ref_time: 153499000, proof_size: 3593), error: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;)&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44006" PostHistoryTypeId="1" PostId="11024" RevisionGUID="e4888f50-ec2e-4158-81d9-31d6e606ecad" CreationDate="2024-02-15T12:53:08.307" UserId="2168" Text="X2(para_id, account_id) conversion on relay chain resulting in `AccountIdConversionFailed`" ContentLicense="CC BY-SA 4.0" />
  <row Id="44007" PostHistoryTypeId="3" PostId="11024" RevisionGUID="e4888f50-ec2e-4158-81d9-31d6e606ecad" CreationDate="2024-02-15T12:53:08.307" UserId="2168" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44008" PostHistoryTypeId="2" PostId="11025" RevisionGUID="62c5a386-e535-4d43-97d6-af4a19f23c04" CreationDate="2024-02-15T16:27:08.537" UserId="5023" Text="How do I mutate a DoubleStorageMap with a Vec&lt;T::AccountId&gt; as a value using a struct?&#xD;&#xA;```&#xD;&#xA;Data::&lt;T&gt;::mutate(&#xD;&#xA;  id.clone(),&#xD;&#xA;  user_id.clone(),&#xD;&#xA;  |params: &amp;mut DataParams&lt;T::AccountId&gt;| {&#xD;&#xA;    params.users.push(new_user);&#xD;&#xA;    params.total_users += 1;&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;`total_users` increases but `users` only ever has one user.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;What's the best way to accomplish this? The `mutate` is within a for loop and needs to append multiple users." ContentLicense="CC BY-SA 4.0" />
  <row Id="44010" PostHistoryTypeId="1" PostId="11025" RevisionGUID="62c5a386-e535-4d43-97d6-af4a19f23c04" CreationDate="2024-02-15T16:27:08.537" UserId="5023" Text="How to mutate a Vec&lt;u16&gt; in a struct in a DoubleStorageMap?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44011" PostHistoryTypeId="3" PostId="11025" RevisionGUID="62c5a386-e535-4d43-97d6-af4a19f23c04" CreationDate="2024-02-15T16:27:08.537" UserId="5023" Text="|pallet|storage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44012" PostHistoryTypeId="5" PostId="11025" RevisionGUID="d62882c1-6b17-4ece-91d9-a0f0c810a2da" CreationDate="2024-02-15T16:41:40.967" UserId="5023" Comment="added 7 characters in body" Text="How do I mutate a DoubleStorageMap with a Vec&lt;T::AccountId&gt; as a value using a struct?&#xD;&#xA;```&#xD;&#xA;Data::&lt;T&gt;::mutate(&#xD;&#xA;  id.clone(),&#xD;&#xA;  user_id.clone(),&#xD;&#xA;  |params: &amp;mut DataParams&lt;T::AccountId&gt;| {&#xD;&#xA;    params.users.push(new_user);&#xD;&#xA;    params.total_users += 1;&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;`total_users` doesn't increase but `users` only ever has one user.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;What's the best way to accomplish this? The `mutate` is within a for loop and needs to append multiple users." ContentLicense="CC BY-SA 4.0" />
  <row Id="44013" PostHistoryTypeId="5" PostId="11025" RevisionGUID="2fc4e0d9-66db-47ab-b723-11d7aa6856bb" CreationDate="2024-02-15T19:51:57.867" UserId="167" Comment="added 14 characters in body" Text="How do I mutate a `DoubleStorageMap` with a `Vec&lt;T::AccountId&gt;` as a value using a struct?&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;Data::&lt;T&gt;::mutate(&#xD;&#xA;  id.clone(),&#xD;&#xA;  user_id.clone(),&#xD;&#xA;  |params: &amp;mut DataParams&lt;T::AccountId&gt;| {&#xD;&#xA;    params.users.push(new_user);&#xD;&#xA;    params.total_users += 1;&#xD;&#xA;  }&#xD;&#xA;);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;`total_users` doesn't increase but `users` only ever has one user.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;What's the best way to accomplish this? The `mutate` is within a for loop and needs to append multiple users." ContentLicense="CC BY-SA 4.0" />
  <row Id="44014" PostHistoryTypeId="50" PostId="6245" RevisionGUID="12d6a495-1506-40fd-a395-e331c43a9386" CreationDate="2024-02-16T06:01:25.110" UserId="-1" />
  <row Id="44015" PostHistoryTypeId="2" PostId="11026" RevisionGUID="ab8cba9f-8aeb-4fd1-9eb0-2d87037bcc53" CreationDate="2024-02-16T06:40:00.963" UserId="426" Text="Shibuya isn't connected to Westend but to a custom fork of Rococo relay chain. What setup are you using?&#xD;&#xA;&#xD;&#xA;The line you modified breaks the purpose of that type. Instead, `HashedDescription` should be modified to use `DescribeAllTerminal`.&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44017" PostHistoryTypeId="50" PostId="10836" RevisionGUID="c756b24d-fb3e-4de2-ac2c-c63e732e2c3b" CreationDate="2024-02-16T07:01:35.183" UserId="-1" />
  <row Id="44018" PostHistoryTypeId="5" PostId="11024" RevisionGUID="f532a63a-5d3b-4391-9c1c-6844c8a339bf" CreationDate="2024-02-16T07:58:21.170" UserId="2168" Comment="Clarification after first answer" Text="We ran into an issue when trying to create a pool on the relay-chain from a contract on the parachain.&#xD;&#xA;&#xD;&#xA;The issue is that when an interior location of a parachain (a contract account on Shibuya) sends an XCM transaction to the relay chain (Westend in this case), the origin is a descended origin MultiLocation { parents: 0, interior: X2(Parachain(2000), AccountId32 { ... }}. There is no location converter in Westend that supports this type of conversion. (**EDIT**: tested in a Zombienet setup)&#xD;&#xA;&#xD;&#xA;This basically means a smart contract account would never be able to do a transaction on relay chain. Is that assumption true? Are there plans to allow a parachain interior account to send XCM transact instructions to relay chain?&#xD;&#xA;&#xD;&#xA;If I add this line to Westend XCM config, it works:&#xD;&#xA;&#xD;&#xA;https://gitlab.com/okalice/polkadot-sdk/-/blob/7d3040952117bb471a9a6d40744088c111e670d4/polkadot/xcm/xcm-builder/src/location_conversion.rs#L311&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  - xcm::process_instruction: === WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(10000000000000) }]))&#xD;&#xA;  - xcm::currency_adapter: withdraw_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(10000000000000) }, who: MultiLocation { parents: 0, interior: X2(Parachain(2000), AccountId32 { network: Some(Westend), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }&#xD;&#xA;  - xcm::execute: !!! ERROR: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;)&#xD;&#xA;  - xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 1, xcm_error: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;), weight: Weight { ref_time: 100015189000, proof_size: 100000000000 } })&#xD;&#xA;  - xcm::execute_xcm_in_credit: Execution errored at 1: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;) (original_origin: MultiLocation { parents: 0, interior: X1(Parachain(2000)) })&#xD;&#xA;  - xcm::process-message: XCM message execution incomplete, used weight: Weight(ref_time: 153499000, proof_size: 3593), error: FailedToTransactAsset(&quot;AccountIdConversionFailed&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44019" PostHistoryTypeId="50" PostId="8114" RevisionGUID="41c0f0bd-4b07-4d97-9e2c-1194cbe4786c" CreationDate="2024-02-16T10:04:40.547" UserId="-1" />
  <row Id="44020" PostHistoryTypeId="50" PostId="8568" RevisionGUID="a53496bb-6e97-49c4-98f0-39dfb03c905f" CreationDate="2024-02-16T11:02:35.313" UserId="-1" />
  <row Id="44021" PostHistoryTypeId="50" PostId="8569" RevisionGUID="0c826aeb-ba31-4820-bdff-a00fb42f25cd" CreationDate="2024-02-16T12:00:25.087" UserId="-1" />
  <row Id="44022" PostHistoryTypeId="2" PostId="11027" RevisionGUID="a7fcb800-9c62-4940-b6e7-815c359f65f8" CreationDate="2024-02-16T12:55:00.657" UserId="2348" Text="I have my blockchain deployed on production . i  want some addition in my chain. i want my chain to have 10000 tps .How can i achieve that in my current layer0 chain without using multiple parachains ." ContentLicense="CC BY-SA 4.0" />
  <row Id="44024" PostHistoryTypeId="1" PostId="11027" RevisionGUID="a7fcb800-9c62-4940-b6e7-815c359f65f8" CreationDate="2024-02-16T12:55:00.657" UserId="2348" Text="how can i achieve 10000 tps in layer zero polkadot based chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="44025" PostHistoryTypeId="3" PostId="11027" RevisionGUID="a7fcb800-9c62-4940-b6e7-815c359f65f8" CreationDate="2024-02-16T12:55:00.657" UserId="2348" Text="|polkadot|transactions|blockchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44026" PostHistoryTypeId="2" PostId="11028" RevisionGUID="564fb89a-fb4c-456b-bed6-ab806b1a1544" CreationDate="2024-02-16T17:03:15.007" UserId="4953" Text="I made a stupid mistake: I wanted to move some ASTR from EVM address managed by Metamask, to native address managed by polkadot.js. But I initiated transaction in Metamask while being on Mantle blockchain. I pasted my native polkadot.js-format Astar address into Astar portal, but transaction was sent on Mantle blockchain. Some amount of Mantle coin went to ECDSA 0x... address, for which I think I have private key, but how do I get it? Is it the same private key as in my Polkadot.JS account? I'm software engineer working with crypto, so I will be able to write some code to get what I need, please just point me in right direction." ContentLicense="CC BY-SA 4.0" />
  <row Id="44028" PostHistoryTypeId="1" PostId="11028" RevisionGUID="564fb89a-fb4c-456b-bed6-ab806b1a1544" CreationDate="2024-02-16T17:03:15.007" UserId="4953" Text="Sent MNT in Mantle blockchain using ASTR destination, how to recover?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44029" PostHistoryTypeId="3" PostId="11028" RevisionGUID="564fb89a-fb4c-456b-bed6-ab806b1a1544" CreationDate="2024-02-16T17:03:15.007" UserId="4953" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44030" PostHistoryTypeId="4" PostId="10947" RevisionGUID="de5e9012-19c3-43f0-8137-bfae28a0939d" CreationDate="2024-02-17T00:30:20.690" UserId="2005" Comment="correct typos" Text="is it necessary to download all the dependencies and the full target file to compile and build any contract?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44031" PostHistoryTypeId="24" PostId="10947" RevisionGUID="de5e9012-19c3-43f0-8137-bfae28a0939d" CreationDate="2024-02-17T00:30:20.690" Comment="Proposed by 2005 approved by 116, 5116 edit id of 632" ContentLicense="CC BY-SA 4.0" />
  <row Id="44032" PostHistoryTypeId="2" PostId="11029" RevisionGUID="507ae7f3-057d-4810-9137-145354a8251d" CreationDate="2024-02-17T00:32:29.347" UserId="5116" Text=" I have a questions about Tokens in polkadot ecosystem , If I am on parachain and this parachain A uses a token from another parachain B , if this token implements on_transfer hook does this hook will operate on the parachain A or it will be deactivated ?&#xD;&#xA;and I want to ask if the on_transfer hook can be implemented by tokens  in polkadot by any substrate pallet ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44034" PostHistoryTypeId="1" PostId="11029" RevisionGUID="507ae7f3-057d-4810-9137-145354a8251d" CreationDate="2024-02-17T00:32:29.347" UserId="5116" Text="how to know about token implementation?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44035" PostHistoryTypeId="3" PostId="11029" RevisionGUID="507ae7f3-057d-4810-9137-145354a8251d" CreationDate="2024-02-17T00:32:29.347" UserId="5116" Text="|polkadot|parachain|rust|substrate-node|pallet-contracts|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44039" PostHistoryTypeId="50" PostId="9979" RevisionGUID="fa5ecad6-847f-45ab-a710-714b0bc473e9" CreationDate="2024-02-17T05:04:00.440" UserId="-1" />
  <row Id="44040" PostHistoryTypeId="50" PostId="10863" RevisionGUID="f8ced6af-d996-4efd-b599-2008930c3a2c" CreationDate="2024-02-17T14:00:00.760" UserId="-1" />
  <row Id="44041" PostHistoryTypeId="2" PostId="11030" RevisionGUID="3c2bf185-1663-42a9-bb70-15ef8d803e60" CreationDate="2024-02-17T20:52:32.070" UserId="2446" Text="How do i decode this Hex string to String. Please help me. Thank you&#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  Ok: {&#xD;&#xA;    flags: [],&#xD;&#xA;    data: '0x000901ac6ed6fbae6c444e5d2aac0720ddf3436728c8579cc78235e93f348805d590ac23ed7dd9728d610abf0a5e55fd661eaa783234ee554d8964c2d912968b107df28523'&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="44043" PostHistoryTypeId="1" PostId="11030" RevisionGUID="3c2bf185-1663-42a9-bb70-15ef8d803e60" CreationDate="2024-02-17T20:52:32.070" UserId="2446" Text="How to decode contract storage returned data" ContentLicense="CC BY-SA 4.0" />
  <row Id="44044" PostHistoryTypeId="3" PostId="11030" RevisionGUID="3c2bf185-1663-42a9-bb70-15ef8d803e60" CreationDate="2024-02-17T20:52:32.070" UserId="2446" Text="|polkadot-js|ink|scale-codec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44045" PostHistoryTypeId="5" PostId="11030" RevisionGUID="a608162d-443b-4838-9e03-2fc47ad9f335" CreationDate="2024-02-17T21:10:26.407" UserId="2446" Comment="added 44 characters in body" Text="How do i decode this Hex string to String. It is storage data returned from a contract, using Polkadot-JS. &#xD;&#xA;```&#xD;&#xA;{&#xD;&#xA;  Ok: {&#xD;&#xA;    flags: [],&#xD;&#xA;    data: '0x000901ac6ed6fbae6c444e5d2aac0720ddf3436728c8579cc78235e93f348805d590ac23ed7dd9728d610abf0a5e55fd661eaa783234ee554d8964c2d912968b107df28523'&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="44046" PostHistoryTypeId="50" PostId="4970" RevisionGUID="5fa93376-2a40-4b62-a680-4cad7142cbc5" CreationDate="2024-02-18T11:01:45.187" UserId="-1" />
  <row Id="44047" PostHistoryTypeId="2" PostId="11031" RevisionGUID="1c13fac8-0c76-4109-bc9b-dc95b7bc43d2" CreationDate="2024-02-19T04:03:08.320" UserId="3437" Text="I am trying to list a parathread on Rococo using core time. I have followed all instructions mentioned [here][1]. I followed below steps:&#xD;&#xA;&#xD;&#xA; 1. I registered a ParaId and onboarded Parathread as [usual][2] but didn't request parachain slot because I wanted to try agile core time. &#xD;&#xA; 2. After onboarding, started a collator to sync with rococo.&#xD;&#xA; 3. Once synced, I executed below extrinsic successfully:&#xD;&#xA;[![enter image description here][3]][3]&#xD;&#xA; 4. I also received successful event message:&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA; But on Rococo parathread page, it is still displaying as :&#xD;&#xA;&#xD;&#xA;[![enter image description here][5]][5]&#xD;&#xA;&#xD;&#xA;And not producing blocks. &#xD;&#xA;&#xD;&#xA;Can somebody please help me to understand if I have missed any step?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://forum.polkadot.network/t/parachain-consensus-updates-coretime-asynchronous-backing-scalability/4396/8&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/#register-as-a-parathread&#xD;&#xA;  [3]: https://i.stack.imgur.com/397ZI.png&#xD;&#xA;  [4]: https://i.stack.imgur.com/V9ivY.png&#xD;&#xA;  [5]: https://i.stack.imgur.com/u985y.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="44049" PostHistoryTypeId="1" PostId="11031" RevisionGUID="1c13fac8-0c76-4109-bc9b-dc95b7bc43d2" CreationDate="2024-02-19T04:03:08.320" UserId="3437" Text="Parathread not producing block on Rococo registered using CoreTime" ContentLicense="CC BY-SA 4.0" />
  <row Id="44050" PostHistoryTypeId="3" PostId="11031" RevisionGUID="1c13fac8-0c76-4109-bc9b-dc95b7bc43d2" CreationDate="2024-02-19T04:03:08.320" UserId="3437" Text="|substrate-parachain-template|rococo|parachain-collator|parathread|coretime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44051" PostHistoryTypeId="50" PostId="9915" RevisionGUID="64eaaaec-9ca7-4981-b409-1f80b41c831f" CreationDate="2024-02-19T09:09:31.147" UserId="-1" />
  <row Id="44052" PostHistoryTypeId="2" PostId="11032" RevisionGUID="6077c528-4c84-4c8c-be93-e11b5f376515" CreationDate="2024-02-19T15:43:19.943" UserId="445" Text="Unable to build ink! smart contract&#xD;&#xA;&#xD;&#xA;**My command:**&#xD;&#xA;&#xD;&#xA;`cargo contract build --release`&#xD;&#xA;&#xD;&#xA;**Issue**: &#xD;&#xA;&#xD;&#xA;duplicate lang item in crate `core`&#xD;&#xA;&#xD;&#xA;**My Rust version:**&#xD;&#xA;&#xD;&#xA;`installed targets for active toolchain`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;`active toolchain`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;&#xD;&#xA;rustc 1.75.0 (82e1608df 2023-12-21)&#xD;&#xA;&#xD;&#xA;**`cargo-contract` version:**&#xD;&#xA;&#xD;&#xA;cargo-contract-contract 3.2.0-unknown-aarch64-apple-darwin" ContentLicense="CC BY-SA 4.0" />
  <row Id="44054" PostHistoryTypeId="1" PostId="11032" RevisionGUID="6077c528-4c84-4c8c-be93-e11b5f376515" CreationDate="2024-02-19T15:43:19.943" UserId="445" Text="duplicate lang item in crate `core`" ContentLicense="CC BY-SA 4.0" />
  <row Id="44055" PostHistoryTypeId="3" PostId="11032" RevisionGUID="6077c528-4c84-4c8c-be93-e11b5f376515" CreationDate="2024-02-19T15:43:19.943" UserId="445" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44056" PostHistoryTypeId="2" PostId="11033" RevisionGUID="3f35aae5-dac7-4fc4-90d6-0b50c265b251" CreationDate="2024-02-19T15:53:12.210" UserId="4081" Text="I'm exploring the deployment of a parachain with an HRMP channel from AssetHub on day 1 to facilitate the migration of preexisting assets. Due to governance processes, this can take up to 28 days for the proposal to pass and the channel to open. As the parachain's runtime is still under development, I seek methods to initiate this process in parallel.&#xD;&#xA;&#xD;&#xA;AFAIK deploying a seedling/shell parachain with the correct paraId allows for the opening of the channel before the actual runtime deployment. However, I'm curious if it's feasible to open the HRMP channel solely with the paraId, omitting the need for a seedling/shell runtime. This approach would streamline the process by eliminating the necessity of replacing the seedling with the final parachain runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="44058" PostHistoryTypeId="1" PostId="11033" RevisionGUID="3f35aae5-dac7-4fc4-90d6-0b50c265b251" CreationDate="2024-02-19T15:53:12.210" UserId="4081" Text="Opening HRMP Channel from AssetHub to Parachain using only paraId" ContentLicense="CC BY-SA 4.0" />
  <row Id="44059" PostHistoryTypeId="3" PostId="11033" RevisionGUID="3f35aae5-dac7-4fc4-90d6-0b50c265b251" CreationDate="2024-02-19T15:53:12.210" UserId="4081" Text="|governance|hrmp|parachain-launch|assethub|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44060" PostHistoryTypeId="2" PostId="11034" RevisionGUID="bf180a53-7226-4141-82e7-4f2da45cf268" CreationDate="2024-02-19T15:59:14.390" UserId="2747" Text="The issue I ran in is finding an explorer version, which is compatible with substrate version v1.0.0. &#xD;&#xA;&#xD;&#xA;I found that version of explorer below v0.133.1 (https://github.com/polkadot-js/apps/releases/tag/v0.133.1) are not compatible with the contracts pallet in v1.0.0, however when testing v0.133.1 or above, I encountered the following errors:&#xD;&#xA;&#xD;&#xA;In accounts page: &#xD;&#xA; - ``` RPC-CORE: subscribeStorage(keys?: Vec&lt;StorageKey&gt;): StorageChangeSet:: createType(Vec&lt;StorageKey&gt;):: Expected an array of 1 values as params to a Map query``` &#xD;&#xA; - ``` Error: useCall(...):: createType(Vec&lt;StorageKey&gt;):: Expected an array of 1 values as params to a Map query:: Error: createType(Vec&lt;StorageKey&gt;):: Expected an array of 1 values as params to a Map query``` &#xD;&#xA;&#xD;&#xA;When deploying a contract: &#xD;&#xA; - ``` TypeError: Converting circular structure to JSON&#xD;&#xA;    --&gt; starting at object with constructor 'EventEmitter'&#xD;&#xA;    |     property '_events' -&gt; object with constructor 'Events'&#xD;&#xA;    |     property 'ready' -&gt; object with constructor 'EE'&#xD;&#xA;    --- property 'context' closes the circle ```&#xD;&#xA; - And the tx status bar keeps spinning&#xD;&#xA; - Address counter is not incremented though contract is deployed and I managed to interact with it just fine&#xD;&#xA; - Though, sometimes the I can't interact with contract, as address does seem to be recognised as one belonging to a contract&#xD;&#xA;&#xD;&#xA;General warning: ```Unable to map [u8; 32] to a lookup index``` &#xD;&#xA;&#xD;&#xA;Question:&#xD;&#xA;What would be the solution to issues described above? are there bugs within v1.0.0 node version, which were fixed later?&#xD;&#xA;If there is an explorer version I should target, it's also an option, however I tried many commits and couldn't find the right one.&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="44062" PostHistoryTypeId="1" PostId="11034" RevisionGUID="bf180a53-7226-4141-82e7-4f2da45cf268" CreationDate="2024-02-19T15:59:14.390" UserId="2747" Text="Explorer compatibility with blockchain node version v1.0.0" ContentLicense="CC BY-SA 4.0" />
  <row Id="44063" PostHistoryTypeId="3" PostId="11034" RevisionGUID="bf180a53-7226-4141-82e7-4f2da45cf268" CreationDate="2024-02-19T15:59:14.390" UserId="2747" Text="|substrate-node-template|substrate-node|pallet-contracts|substrate-contracts-node|explorer|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44064" PostHistoryTypeId="2" PostId="11035" RevisionGUID="077ae044-07ce-4488-b78a-84a0de7cf8de" CreationDate="2024-02-19T16:27:29.723" UserId="4341" Text="Just like cancelling and speed up transactions on Ethereum context, is there a mechanism to replace or manipulate extrinsics from the mempool? &#xD;&#xA;&#xD;&#xA;thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="44066" PostHistoryTypeId="1" PostId="11035" RevisionGUID="077ae044-07ce-4488-b78a-84a0de7cf8de" CreationDate="2024-02-19T16:27:29.723" UserId="4341" Text="Is there a way to replace or cancel an extrinsic from the mempool?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44067" PostHistoryTypeId="3" PostId="11035" RevisionGUID="077ae044-07ce-4488-b78a-84a0de7cf8de" CreationDate="2024-02-19T16:27:29.723" UserId="4341" Text="|extrinsic|mempool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44068" PostHistoryTypeId="2" PostId="11036" RevisionGUID="91ada03f-dbdb-4052-b4e1-3323f1a49fa6" CreationDate="2024-02-19T18:42:26.403" UserId="4341" Text="Can we predict an average time derived from consensus, async backing and what other factors can impact this time?&#xD;&#xA;&#xD;&#xA;Thanks" ContentLicense="CC BY-SA 4.0" />
  <row Id="44070" PostHistoryTypeId="1" PostId="11036" RevisionGUID="91ada03f-dbdb-4052-b4e1-3323f1a49fa6" CreationDate="2024-02-19T18:42:26.403" UserId="4341" Text="What is the expected time from sending a extrinsic to a block it's in being finalised?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44071" PostHistoryTypeId="3" PostId="11036" RevisionGUID="91ada03f-dbdb-4052-b4e1-3323f1a49fa6" CreationDate="2024-02-19T18:42:26.403" UserId="4341" Text="|consensus|block-production|async-backing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44072" PostHistoryTypeId="2" PostId="11037" RevisionGUID="05bfc849-7c55-4651-b751-2c82652cfcba" CreationDate="2024-02-19T19:07:40.597" UserId="2005" Text="this [depends][1] on the chain's ordering of extrinsics by their priority. But for default chain with `pallet_transaction_payment`, you can create new extrinsic with the same nonce as the extrinsic you want to cancel and include some `tip`. Since block authors are programmed to maximize their profits, they will [include][2] the transaction with a higher value (fee per unit of weight).&#xD;&#xA;&#xD;&#xA;&gt; In the case of FRAME the first property is simply making sure that the fee per weight unit is the highest (high tip values), the second is about avoiding feeding transactions that cannot be part of the next block (they are invalid, obsolete, etc).&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/3388/2005&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/transaction-pool#problem-statement" ContentLicense="CC BY-SA 4.0" />
  <row Id="44074" PostHistoryTypeId="50" PostId="10009" RevisionGUID="a364f31e-76df-4b2c-ac0b-e6028f1d932f" CreationDate="2024-02-19T20:06:25.747" UserId="-1" />
  <row Id="44075" PostHistoryTypeId="2" PostId="11038" RevisionGUID="30902d15-9e64-4a5d-baac-01f4eeb7584a" CreationDate="2024-02-20T02:43:55.910" UserId="116" Text="*[Previous answer](https://substrate.stackexchange.com/a/2817/116) which was true at time of writing 2022 but is obsolete now.*&#xD;&#xA;&#xD;&#xA;Yes, since the release of [polkadot-sdk](https://github.com/paritytech/polkadot-sdk/) releases have been pushed to crates.io from a branch named `release-crates-io-v1.x.0`. It is branched from the release tag `polkadot-v1.x.0`.&#xD;&#xA;&#xD;&#xA;There is no correlation between the version numbers on crates.io and the github tag, so some manual investigation of the versions are required." ContentLicense="CC BY-SA 4.0" />
  <row Id="44077" PostHistoryTypeId="5" PostId="11032" RevisionGUID="a2bb7234-b04e-466a-b437-81b778663834" CreationDate="2024-02-20T03:26:57.910" UserId="445" Comment="added 60 characters in body" Text="Unable to build ink! smart contract&#xD;&#xA;&#xD;&#xA;**My command:**&#xD;&#xA;&#xD;&#xA;`cargo contract build --release`&#xD;&#xA;&#xD;&#xA;**Issue**: &#xD;&#xA;&#xD;&#xA;attempted to define built-in macro more than once&#xD;&#xA;&#xD;&#xA;/Users/xxx/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/macros/mod.rs:1423:5&#xD;&#xA;     |&#xD;&#xA;1423 |     macro_rules! cfg {&#xD;&#xA;     |     ^^^^^^^^^^^^^^^^&#xD;&#xA;     |&#xD;&#xA;&#xD;&#xA;note: previously defined here&#xD;&#xA;    --&gt; /Users/xxx/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/macros/mod.rs:1423:5&#xD;&#xA;     |&#xD;&#xA;1423 |     macro_rules! cfg {&#xD;&#xA;     |     ^^^^^^^^^^^^^^^^&#xD;&#xA;&#xD;&#xA;...&#xD;&#xA;&#xD;&#xA;duplicate lang item in crate `core`&#xD;&#xA;&#xD;&#xA;**My Rust version:**&#xD;&#xA;&#xD;&#xA;`installed targets for active toolchain`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;aarch64-apple-darwin&#xD;&#xA;&#xD;&#xA;wasm32-unknown-unknown&#xD;&#xA;&#xD;&#xA;`active toolchain`&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;stable-aarch64-apple-darwin (default)&#xD;&#xA;&#xD;&#xA;rustc 1.75.0 (82e1608df 2023-12-21)&#xD;&#xA;&#xD;&#xA;**`cargo-contract` version:**&#xD;&#xA;&#xD;&#xA;cargo-contract-contract 3.2.0-unknown-aarch64-apple-darwin" ContentLicense="CC BY-SA 4.0" />
  <row Id="44078" PostHistoryTypeId="2" PostId="11039" RevisionGUID="f56910a0-d9d4-4569-9616-f5dc41347512" CreationDate="2024-02-20T04:56:04.023" UserId="3437" Text="Is there any Oracle solution available to feed private data to Substrate chain?&#xD;&#xA;&#xD;&#xA;Feeding data to chain has already been answered here https://substrate.stackexchange.com/questions/965/how-can-i-build-a-price-feed-oracle-for-my-substrate-chain. And OCW provides the best solution.&#xD;&#xA;&#xD;&#xA;But in my case, I want to feed private data, which is a confidential information. I can't use OCW. &#xD;&#xA;&#xD;&#xA;Please help me to provide the solution.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44080" PostHistoryTypeId="1" PostId="11039" RevisionGUID="f56910a0-d9d4-4569-9616-f5dc41347512" CreationDate="2024-02-20T04:56:04.023" UserId="3437" Text="How to feed private data(confidential information) in Substrate chain through oracle?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44081" PostHistoryTypeId="3" PostId="11039" RevisionGUID="f56910a0-d9d4-4569-9616-f5dc41347512" CreationDate="2024-02-20T04:56:04.023" UserId="3437" Text="|substrate-node-template|offchain-worker|oracles|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44082" PostHistoryTypeId="2" PostId="11040" RevisionGUID="47a06778-1d2f-4437-9175-aee08064fdb7" CreationDate="2024-02-20T05:37:56.473" UserId="445" Text="The issue was resolved &#xD;&#xA;&#xD;&#xA;Because Rust version is incompatible with `ink!` version and `open-brush` version&#xD;&#xA;&#xD;&#xA;It should be:&#xD;&#xA;&#xD;&#xA; + rustc - 1.72&#xD;&#xA; + ink! - 4.2.0&#xD;&#xA; + open-brush - 4.0.0-beta" ContentLicense="CC BY-SA 4.0" />
  <row Id="44084" PostHistoryTypeId="2" PostId="11041" RevisionGUID="0946c2c2-287b-4495-beb5-881f69c0d0ac" CreationDate="2024-02-20T07:41:41.913" UserId="5161" Text="If you want to use the command line...&#xD;&#xA;```&#xD;&#xA;curl -sS -H &quot;Content-Type: application/json&quot; -d '{&quot;id&quot;:1, &quot;jsonrpc&quot;:&quot;2.0&quot;, &quot;method&quot;: &quot;system_localPeerId&quot;}' http://localhost:${port}/&#xD;&#xA;```&#xD;&#xA;Replace `${port}` with your `--ws-port` value." ContentLicense="CC BY-SA 4.0" />
  <row Id="44087" PostHistoryTypeId="5" PostId="2987" RevisionGUID="8c679543-621d-4dbe-ae20-4842af8511ff" CreationDate="2024-02-20T09:43:50.797" UserId="116" Comment="deleted 11 characters in body" Text="you can query the local peerId through an rpc call. For example using polkadotjs&#xD;&#xA;&#xD;&#xA;[![Example screenshot][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/iONsH.png&#xD;&#xA;&#xD;&#xA;Thanks!" ContentLicense="CC BY-SA 4.0" />
  <row Id="44088" PostHistoryTypeId="2" PostId="11042" RevisionGUID="04d29496-0e53-4a66-a39e-ae5c2d649302" CreationDate="2024-02-20T10:56:39.843" UserId="94" Text="Substrate chains are public. If you want to do confidential computing then you could consider the Phala parachain. They have confidential off-chain computation extensions.&#xD;&#xA;&#xD;&#xA;&gt;I can't use OCW.&#xD;&#xA;&#xD;&#xA;Without elaboration on *why*, its difficult to give advice.&#xD;&#xA;&#xD;&#xA;Another way would be to implement Zero-Knowledge computation to do the computations on-chain. AFAIK its quite computational expensive and normally on-chain code should only verify - not compute. This is a standard principle to make the system more efficient.  &#xD;&#xA;You could therefore try to do the computation off-chain and then only have the verification in a on-chain ZK logic, but i dont think its easy...&#xD;&#xA;&#xD;&#xA;Next time please include concrete information on what you are trying to achieve." ContentLicense="CC BY-SA 4.0" />
  <row Id="44090" PostHistoryTypeId="5" PostId="316" RevisionGUID="d83330f3-9376-4bf3-b186-516558e265c6" CreationDate="2024-02-20T11:16:18.647" UserId="94" Comment="maintenance" Text="Substrate provides a [Verify](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.Verify.html) and an [IdentifyAccount](https://docs.rs/sp-runtime/latest/sp_runtime/traits/trait.IdentifyAccount.html) trait.  &#xD;&#xA;They work with any signature scheme since they are just traits and can be implemented for different crypto schemata.  &#xD;&#xA;This is very helpful when implementing off-chain protocols like Channels, Plasmas, Rollups etc.&#xD;&#xA;&#xD;&#xA;The `Config` trait of your pallet needs to be extended to support it:  &#xD;&#xA;```rust&#xD;&#xA;/// A Signature can be verified with a specific `PublicKey`.&#xD;&#xA;type Signature: Verify&lt;Signer = Self::PublicKey&gt; + Encode + Decode + Parameter;&#xD;&#xA;&#xD;&#xA;/// A PublicKey can be converted into an `AccountId`. This is required by the&#xD;&#xA;/// `Signature` type.&#xD;&#xA;type PublicKey: IdentifyAccount&lt;AccountId = Self::PublicKey&gt; + Encode + Decode + Parameter;&#xD;&#xA;```&#xD;&#xA;This makes it possible to verify signatures within the pallet.  &#xD;&#xA;Using it in an Extrinsic looks like this:  &#xD;&#xA;```rust&#xD;&#xA;fn my_verify(_: OriginFor&lt;T&gt;, data: Vec&lt;u8&gt;, sig: T::Signature, from: T::PublicKey)&#xD;&#xA;{&#xD;&#xA;    let ok = sig.verify(&amp;data, &amp;from);&#xD;&#xA;    // `ok` is a bool. Use in an `if` or `ensure!`.&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On the runtime side you can then inject the *concrete* crypto implementation that you want:  &#xD;&#xA;```rust&#xD;&#xA;type Signature = sp_core::ecdsa::Signature;&#xD;&#xA;type PublicKey = sp_core::ecdsa::Public;&#xD;&#xA;```&#xD;&#xA;Available are `ecdsa`, `sr25519` and `ed25519` all from [sp_core](https://docs.rs/sp-core/latest/sp_core/).  &#xD;&#xA;The Merline signing context for `sr25519` is `b&quot;substrate&quot;` as defined [here](https://github.com/paritytech/substrate/blob/bfc6fb4a95adccf96dadbe5e5e6bb8605d5a2c01/primitives/core/src/sr25519.rs#L61).&#xD;&#xA;&#xD;&#xA;Here are three examples in pallets that make use of this:  &#xD;&#xA; - [pallet-nfts](https://github.com/paritytech/polkadot-sdk/blob/166ae5ae1295c2431c83421439c3869d4f40de7e/substrate/frame/nfts/src/lib.rs#L197-L205): to verify pre-mined signatures.&#xD;&#xA; - [pallet-identity](https://github.com/paritytech/polkadot-sdk/blob/f574868822d5976219d391de5acd66bb773e4964/substrate/frame/identity/src/lib.rs#L178-L184): to verify pre-authorized usernames.&#xD;&#xA;- [perun-polkadot-pallet](https://github.com/perun-network/perun-polkadot-pallet/blob/9ef1476028ae53011f51ed7f55bdbfb8f4fc82a7/src/lib.rs#L103-L108): to verify signatures from an off-chain state channel." ContentLicense="CC BY-SA 4.0" />
  <row Id="44091" PostHistoryTypeId="5" PostId="11039" RevisionGUID="44825159-d81c-40ff-9765-0438eb44d43d" CreationDate="2024-02-20T11:47:21.477" UserId="3437" Comment="added 392 characters in body" Text="Is there any Oracle solution available to feed private data to Substrate chain?&#xD;&#xA;&#xD;&#xA;Feeding data to chain has already been answered here https://substrate.stackexchange.com/questions/965/how-can-i-build-a-price-feed-oracle-for-my-substrate-chain. And OCW provides the best solution.&#xD;&#xA;&#xD;&#xA;But in my case, I want to feed private data, which is a confidential information. I have checked off chain worker example. We can hit http end point to fetch information https://github.com/paritytech/polkadot-sdk/blob/ca382f32033d8350d49934b30680d8c30dd9bdfc/substrate/frame/examples/offchain-worker/src/lib.rs#L585 and feed on chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In my case, I would need confidential information from other application so I can not use http end. I would need any oracle to feed such data on chain.&#xD;&#xA;&#xD;&#xA;Please help me to provide the solution.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44092" PostHistoryTypeId="2" PostId="11043" RevisionGUID="2487898d-3e4f-45a8-ba8a-ac6e3692a558" CreationDate="2024-02-20T13:08:29.000" UserId="555" Text="I want to run our substrate chain with 3 validators, and these validators will run in 3 different network.&#xD;&#xA;&#xD;&#xA;I'm following this documentation: https://docs.substrate.io/tutorials/build-a-blockchain/add-trusted-nodes/#start-the-first-node&#xD;&#xA;&#xD;&#xA;I'm able to run successfully every commands that needs to be executed[present in the above document].&#xD;&#xA;&#xD;&#xA;But in the log, I'm not able to see `2024-02-20 13:00:31  Idle (0 peers),`&#xD;&#xA;&#xD;&#xA;What can be the issue here?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44094" PostHistoryTypeId="1" PostId="11043" RevisionGUID="2487898d-3e4f-45a8-ba8a-ac6e3692a558" CreationDate="2024-02-20T13:08:29.000" UserId="555" Text="How to add 3 validators node from different networks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44095" PostHistoryTypeId="3" PostId="11043" RevisionGUID="2487898d-3e4f-45a8-ba8a-ac6e3692a558" CreationDate="2024-02-20T13:08:29.000" UserId="555" Text="|substrate-node-template|validator|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44096" PostHistoryTypeId="2" PostId="11044" RevisionGUID="299da703-f375-4997-822a-bc3401a17d6d" CreationDate="2024-02-20T13:17:23.760" UserId="167" Text="There's also an [RPC call](https://polkadot.js.org/docs/substrate/rpc#removeextrinsicbytesorhash-vecextrinsicorhash-vechash) to remove an extrinsic from the pool." ContentLicense="CC BY-SA 4.0" />
  <row Id="44098" PostHistoryTypeId="52" PostId="11039" RevisionGUID="a682377c-ab5e-4e20-bc34-b88fb0c53f1d" CreationDate="2024-02-20T13:21:45.253" />
  <row Id="44099" PostHistoryTypeId="2" PostId="11045" RevisionGUID="96bc904e-755b-4697-9974-4ed53c84d197" CreationDate="2024-02-20T14:22:11.133" UserId="5163" Text="Does anyone know how to solve this error?&#xD;&#xA;&#xD;&#xA;I am trying to pay transaction fees with sufficient tokens on Westend Asset Hub by passing an asset Multilocation to the options in the signAndSend function. &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const asset = {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: {&#xD;&#xA;    X2: [{ palletInstance: 50 }, { generalIndex: 8 }],&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const injector = await web3FromSource(account.meta.source);&#xD;&#xA;&#xD;&#xA;    transferExtrinsic&#xD;&#xA;      .signAndSend(&#xD;&#xA;        account.address,&#xD;&#xA;        {&#xD;&#xA;          signer: injector.signer,&#xD;&#xA;          assetId: asset,&#xD;&#xA;        },&#xD;&#xA;        ({ status }) =&gt; {&#xD;&#xA;          if (status.isInBlock) {&#xD;&#xA;            console.log(&#xD;&#xA;              `Completed at block hash #${status.asInBlock.toString()}`&#xD;&#xA;            );&#xD;&#xA;          } else {&#xD;&#xA;            console.log(`Current status: ${status.type}`);&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      )&#xD;&#xA;      .catch((error) =&gt; {&#xD;&#xA;        console.log(&quot;:( transaction failed&quot;, error);&#xD;&#xA;      });&#xD;&#xA;  };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I keep getting this error regarding the asset multilocation format is incorrect&#xD;&#xA;&#xD;&#xA;```transaction failed Error: createType(SignerPayload):: Struct: failed on assetId: Option&lt;AssetId&gt;:: Unable to construct number from multi-key object```&#xD;&#xA;&#xD;&#xA;I am getting the same error when capitalizing PalletInstance and GeneralIndex like this &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const asset = {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: {&#xD;&#xA;    X2: [{ PalletInstance: 50 }, { GeneralIndex: 8 }],&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="44101" PostHistoryTypeId="1" PostId="11045" RevisionGUID="96bc904e-755b-4697-9974-4ed53c84d197" CreationDate="2024-02-20T14:22:11.133" UserId="5163" Text="transaction failed Error: createType(SignerPayload):: Struct: failed on assetId: Option&lt;AssetId&gt;:: Unable to construct number from multi-key object" ContentLicense="CC BY-SA 4.0" />
  <row Id="44102" PostHistoryTypeId="3" PostId="11045" RevisionGUID="96bc904e-755b-4697-9974-4ed53c84d197" CreationDate="2024-02-20T14:22:11.133" UserId="5163" Text="|polkadot-js|assethub|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44103" PostHistoryTypeId="5" PostId="11045" RevisionGUID="ba85e238-1caa-4795-9cfa-801f7cf5760f" CreationDate="2024-02-20T14:22:59.373" UserId="5163" Comment="edited body" Text="Does anyone know how to solve this error?&#xD;&#xA;&#xD;&#xA;I am trying to pay transaction fees with sufficient tokens on Westend Asset Hub by passing an asset MultiLocation to the options in the signAndSend function. &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const asset = {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: {&#xD;&#xA;    X2: [{ palletInstance: 50 }, { generalIndex: 8 }],&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const injector = await web3FromSource(account.meta.source);&#xD;&#xA;&#xD;&#xA;    transferExtrinsic&#xD;&#xA;      .signAndSend(&#xD;&#xA;        account.address,&#xD;&#xA;        {&#xD;&#xA;          signer: injector.signer,&#xD;&#xA;          assetId: asset,&#xD;&#xA;        },&#xD;&#xA;        ({ status }) =&gt; {&#xD;&#xA;          if (status.isInBlock) {&#xD;&#xA;            console.log(&#xD;&#xA;              `Completed at block hash #${status.asInBlock.toString()}`&#xD;&#xA;            );&#xD;&#xA;          } else {&#xD;&#xA;            console.log(`Current status: ${status.type}`);&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      )&#xD;&#xA;      .catch((error) =&gt; {&#xD;&#xA;        console.log(&quot;:( transaction failed&quot;, error);&#xD;&#xA;      });&#xD;&#xA;  };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I keep getting this error regarding the asset MultiLocation format is incorrect&#xD;&#xA;&#xD;&#xA;```transaction failed Error: createType(SignerPayload):: Struct: failed on assetId: Option&lt;AssetId&gt;:: Unable to construct number from multi-key object```&#xD;&#xA;&#xD;&#xA;I am getting the same error when capitalizing PalletInstance and GeneralIndex like this &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const asset = {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: {&#xD;&#xA;    X2: [{ PalletInstance: 50 }, { GeneralIndex: 8 }],&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="44104" PostHistoryTypeId="5" PostId="11045" RevisionGUID="a800eb47-5a54-4957-9376-c811912bad06" CreationDate="2024-02-20T14:24:59.803" UserId="5163" Comment="added 310 characters in body" Text="Does anyone know how to solve this error?&#xD;&#xA;&#xD;&#xA;I am trying to pay transaction fees with sufficient tokens on Westend Asset Hub by passing an asset MultiLocation to the options in the signAndSend function. &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const asset = {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: {&#xD;&#xA;    X2: [{ palletInstance: 50 }, { generalIndex: 8 }],&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const injector = await web3FromSource(account.meta.source);&#xD;&#xA;&#xD;&#xA;    transferExtrinsic&#xD;&#xA;      .signAndSend(&#xD;&#xA;        account.address,&#xD;&#xA;        {&#xD;&#xA;          signer: injector.signer,&#xD;&#xA;          assetId: asset,&#xD;&#xA;        },&#xD;&#xA;        ({ status }) =&gt; {&#xD;&#xA;          if (status.isInBlock) {&#xD;&#xA;            console.log(&#xD;&#xA;              `Completed at block hash #${status.asInBlock.toString()}`&#xD;&#xA;            );&#xD;&#xA;          } else {&#xD;&#xA;            console.log(`Current status: ${status.type}`);&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      )&#xD;&#xA;      .catch((error) =&gt; {&#xD;&#xA;        console.log(&quot;:( transaction failed&quot;, error);&#xD;&#xA;      });&#xD;&#xA;  };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I keep getting this console error regarding the asset MultiLocation format is incorrect when using Talisman Wallet&#xD;&#xA;&#xD;&#xA;```transaction failed Error: createType(SignerPayload):: Struct: failed on assetId: Option&lt;AssetId&gt;:: Unable to construct number from multi-key object```&#xD;&#xA;&#xD;&#xA;And here is the error message when using Polkadot.js extension &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Something went wrong with the query and rendering of this component. createType(ExtrinsicPayload):: createType(ExtrinsicPayloadV4):: Struct: failed on assetId: Option&lt;AssetId&gt;:: Assertion failed&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am getting the same error when capitalizing PalletInstance and GeneralIndex like this &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const asset = {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: {&#xD;&#xA;    X2: [{ PalletInstance: 50 }, { GeneralIndex: 8 }],&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="44105" PostHistoryTypeId="5" PostId="11045" RevisionGUID="826a136b-422e-4d32-bed1-51ba23594df7" CreationDate="2024-02-20T14:25:30.500" UserId="5163" Comment="deleted 4 characters in body" Text="Does anyone know how to solve this error?&#xD;&#xA;&#xD;&#xA;I am trying to pay transaction fees with sufficient tokens on Westend Asset Hub by passing an asset MultiLocation to the options in the signAndSend function. &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const asset = {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: {&#xD;&#xA;    X2: [{ palletInstance: 50 }, { generalIndex: 8 }],&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const injector = await web3FromSource(account.meta.source);&#xD;&#xA;&#xD;&#xA;    transferExtrinsic&#xD;&#xA;      .signAndSend(&#xD;&#xA;        account.address,&#xD;&#xA;        {&#xD;&#xA;          signer: injector.signer,&#xD;&#xA;          assetId: asset,&#xD;&#xA;        },&#xD;&#xA;        ({ status }) =&gt; {&#xD;&#xA;          if (status.isInBlock) {&#xD;&#xA;            console.log(&#xD;&#xA;              `Completed at block hash #${status.asInBlock.toString()}`&#xD;&#xA;            );&#xD;&#xA;          } else {&#xD;&#xA;            console.log(`Current status: ${status.type}`);&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      )&#xD;&#xA;      .catch((error) =&gt; {&#xD;&#xA;        console.log(&quot;:( transaction failed&quot;, error);&#xD;&#xA;      });&#xD;&#xA;  };&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And I keep getting this console error regarding the asset MultiLocation format is incorrect when using Talisman Wallet&#xD;&#xA;&#xD;&#xA;```transaction failed Error: createType(SignerPayload):: Struct: failed on assetId: Option&lt;AssetId&gt;:: Unable to construct number from multi-key object```&#xD;&#xA;&#xD;&#xA;And here is the error message when using Polkadot.js extension &#xD;&#xA;&#xD;&#xA;```Something went wrong with the query and rendering of this component. createType(ExtrinsicPayload):: createType(ExtrinsicPayloadV4):: Struct: failed on assetId: Option&lt;AssetId&gt;:: Assertion failed```&#xD;&#xA;&#xD;&#xA;I am getting the same error when capitalizing PalletInstance and GeneralIndex like this &#xD;&#xA;&#xD;&#xA;```javascript&#xD;&#xA;const asset = {&#xD;&#xA;  parents: 0,&#xD;&#xA;  interior: {&#xD;&#xA;    X2: [{ PalletInstance: 50 }, { GeneralIndex: 8 }],&#xD;&#xA;  },&#xD;&#xA;};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="44106" PostHistoryTypeId="2" PostId="11046" RevisionGUID="dc6b1d70-ebd4-4ac4-9fae-a1cafe4804ae" CreationDate="2024-02-20T15:27:25.167" UserId="555" Text="If you running node in different machines then you need to update this `127.0.0.1` to the IP where your node is running &#xD;&#xA;&#xD;&#xA;```--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWLmrYDLoNTyTYtRdDyZLWDe1paxzxTw5RgjmHLfzW96SX \```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44108" PostHistoryTypeId="2" PostId="11047" RevisionGUID="42533eaf-da79-488c-a9f1-fd8cafd4da98" CreationDate="2024-02-20T20:09:52.673" UserId="3171" Text="How to run polakdot/kusama runtime + node with a full functionality locally? what chain spec can I use? where the plan chain spec are located for just a ready to start for local env with 2 nodes? &#xD;&#xA;&#xD;&#xA;Where i can find kusama/polakdot production plain chain spec to use with a real polkadot/runtime to test functionality locally?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44110" PostHistoryTypeId="1" PostId="11047" RevisionGUID="42533eaf-da79-488c-a9f1-fd8cafd4da98" CreationDate="2024-02-20T20:09:52.673" UserId="3171" Text="Where is the plain chain spec for kusama that i can use with a kusama runtime locally?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44111" PostHistoryTypeId="3" PostId="11047" RevisionGUID="42533eaf-da79-488c-a9f1-fd8cafd4da98" CreationDate="2024-02-20T20:09:52.673" UserId="3171" Text="|polkadot|runtime|kusama|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44112" PostHistoryTypeId="2" PostId="11048" RevisionGUID="26a1fcef-62ee-43a0-b245-240d6063153c" CreationDate="2024-02-21T08:36:04.830" UserId="3752" Text="i'm trying to listen events against a solidity smart contract deployed on EVM compatible Substrate chain and getting following error&#xD;&#xA;&#xD;&#xA;&gt;     Error listening event ChangeOwner :  Error: Returned error: Method not found&#xD;&#xA;&#xD;&#xA;Here's code script i'm using&#xD;&#xA;&#xD;&#xA;&gt; const RPC_URLS_WSS = {   storagechain:&#xD;&#xA;&gt; process.env.STORAGECHAIN_WSS_RPC_URL,   polygon:&#xD;&#xA;&gt; process.env.POLYGON_WSS_RPC_URL,   ethereum:&#xD;&#xA;&gt; process.env.ETH_WSS_RPC_URL,   temp: process.env.TEMP_CHAIN, };&#xD;&#xA;&gt; &#xD;&#xA;&gt; const getWSSWeb3Instance = (networkName) =&gt; {   try {&#xD;&#xA;&gt;     const web3 = new Web3(RPC_URLS_WSS[networkName]);&#xD;&#xA;&gt;     return web3;   } catch (err) {&#xD;&#xA;&gt;     console.error('getWSSWeb3Instance ~ err:', err);   } };&#xD;&#xA;&gt; &#xD;&#xA;&gt; const chainEventListener = async (chainName) =&gt; {   try {&#xD;&#xA;&gt;     const web3 = getWSSWeb3Instance(chainName);&#xD;&#xA;&gt;     web3.eth&#xD;&#xA;&gt;       .subscribe(&#xD;&#xA;&gt;         'logs',&#xD;&#xA;&gt;         // {&#xD;&#xA;&gt;         //   address: '0x3932970D99D3D4DD38C06986F0B09250B7588ED4',&#xD;&#xA;&gt;         // },&#xD;&#xA;&gt;         (err, event) =&gt; {&#xD;&#xA;&gt;           if (err) {&#xD;&#xA;&gt;             console.error('web3.eth.subscribe ~ err:', err);&#xD;&#xA;&gt;             return err;&#xD;&#xA;&gt;           }&#xD;&#xA;&gt; &#xD;&#xA;&gt;           console.log('Event', event);&#xD;&#xA;&gt;         }&#xD;&#xA;&gt;       )&#xD;&#xA;&gt;       .on('connected', () =&gt; {&#xD;&#xA;&gt;         console.log(`${chainName} is Connected.`);&#xD;&#xA;&gt;       });   } catch (err) {&#xD;&#xA;&gt;     console.error('chainEventListener ~ err:', err);   } };&#xD;&#xA;&#xD;&#xA;i wanted my chain to behave same as moonbeam is providing events subscription. &#xD;&#xA;Here's [link][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.moonbeam.network/builders/build/eth-api/pubsub/#:~:text=used%20was%204.3.0.-,Subscribe%20to%20Event%20Logs,-Any%20contract%20that" ContentLicense="CC BY-SA 4.0" />
  <row Id="44114" PostHistoryTypeId="1" PostId="11048" RevisionGUID="26a1fcef-62ee-43a0-b245-240d6063153c" CreationDate="2024-02-21T08:36:04.830" UserId="3752" Text="Event subscription error from EVM compatible Substrate chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="44115" PostHistoryTypeId="3" PostId="11048" RevisionGUID="26a1fcef-62ee-43a0-b245-240d6063153c" CreationDate="2024-02-21T08:36:04.830" UserId="3752" Text="|evm|events|moonbeam|solidity|blockchain-events|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44116" PostHistoryTypeId="2" PostId="11049" RevisionGUID="3459b9af-abf8-4797-a15f-56d9b00ddbc8" CreationDate="2024-02-21T08:39:33.937" UserId="3752" Text="I purged the chain and restarted, it worked fine" ContentLicense="CC BY-SA 4.0" />
  <row Id="44118" PostHistoryTypeId="2" PostId="11050" RevisionGUID="54caa57b-4fb4-49e0-9efb-b13b9b96c8cd" CreationDate="2024-02-21T09:18:31.070" UserId="4114" Text="Which are the absolute must-have pallets that need to be added to a runtime to make it parachain-compatible?&#xD;&#xA;&#xD;&#xA;I am looking at the [parachain template](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachain-template/runtime/src/lib.rs).&#xD;&#xA;&#xD;&#xA;Are the [XCM helpers](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachain-template/runtime/src/lib.rs#L516) necessary?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44120" PostHistoryTypeId="1" PostId="11050" RevisionGUID="54caa57b-4fb4-49e0-9efb-b13b9b96c8cd" CreationDate="2024-02-21T09:18:31.070" UserId="4114" Text="Must-have Parachain pallets" ContentLicense="CC BY-SA 4.0" />
  <row Id="44121" PostHistoryTypeId="3" PostId="11050" RevisionGUID="54caa57b-4fb4-49e0-9efb-b13b9b96c8cd" CreationDate="2024-02-21T09:18:31.070" UserId="4114" Text="|parachain|substrate-parachain-template|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44122" PostHistoryTypeId="2" PostId="11051" RevisionGUID="2d6e3667-5310-4e09-9d95-2f99dcb9411a" CreationDate="2024-02-21T09:52:10.750" UserId="2736" Text="this is some 'regression' introduced by recent nightly toolchains; fix is there: https://github.com/paritytech/polkadot-sdk/pull/2986" ContentLicense="CC BY-SA 4.0" />
  <row Id="44124" PostHistoryTypeId="2" PostId="11052" RevisionGUID="28169fdd-8ea7-4676-8f50-32757192e7a1" CreationDate="2024-02-21T10:03:38.513" UserId="5166" Text="I would like to be a developer on Astar network.&#xD;&#xA;How to crate example daap on Astar network" ContentLicense="CC BY-SA 4.0" />
  <row Id="44126" PostHistoryTypeId="1" PostId="11052" RevisionGUID="28169fdd-8ea7-4676-8f50-32757192e7a1" CreationDate="2024-02-21T10:03:38.513" UserId="5166" Text="How to crate example daap on Astar network" ContentLicense="CC BY-SA 4.0" />
  <row Id="44127" PostHistoryTypeId="3" PostId="11052" RevisionGUID="28169fdd-8ea7-4676-8f50-32757192e7a1" CreationDate="2024-02-21T10:03:38.513" UserId="5166" Text="|astar|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44128" PostHistoryTypeId="2" PostId="11053" RevisionGUID="e54ca3fd-50d3-447f-95ba-b0933ba82756" CreationDate="2024-02-21T10:05:09.577" UserId="527" Text="You have to choose the XCM version for your asset `MultiLocation`&#xD;&#xA;&#xD;&#xA;Try with:&#xD;&#xA;```javascript&#xD;&#xA;const asset = { &#xD;&#xA;  v4: { &#xD;&#xA;    parents: 0,&#xD;&#xA;    interior: { &#xD;&#xA;       x2: [{ PalletInstance: 50 }, { GeneralIndex: 8 }]&#xD;&#xA;     }&#xD;&#xA;  }&#xD;&#xA;};&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="44130" PostHistoryTypeId="2" PostId="11054" RevisionGUID="4f79454d-c750-4336-b4da-2bcd80569c18" CreationDate="2024-02-21T12:12:02.117" UserId="2713" Text="I want to execute `Transact` on AssetHub from another parachain and therefore need to `WithdrawAsset` and `BuyExecution` beforehand. &#xD;&#xA;&#xD;&#xA;Unfortunately, I keep running into `FailedToTransactAsset` on AH. I am unsure whether I am referring correctly to the DOT Asset as `Concrete { parents: 1, interior: here }`. I have funded the origin sovereign parachain account with enough DOT.&#xD;&#xA;&#xD;&#xA;The pseudo code of the XCM is&#xD;&#xA;```rust&#xD;&#xA;let dot = MultiAsset {&#xD;&#xA;    id: AssetId::Concrete(MultiLocation::parent()),&#xD;&#xA;    fun: Fungibility::Fungible(10_000_000_000), // 1 DOT&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;let xcm_to_send = Xcm(vec![&#xD;&#xA;    WithdrawAsset(dot.clone().into()),&#xD;&#xA;    BuyExecution { fees: dot.into(), weight_limit: WeightLimit::Unlimited },&#xD;&#xA;    Transact {&#xD;&#xA;        origin_kind: OriginKind::Native,&#xD;&#xA;        require_weight_at_most: Weight::from_parts(REF_TIME, PROOF_SIZE),&#xD;&#xA;        call: call.encode().into(),&#xD;&#xA;    },&#xD;&#xA;]);&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Here's the encoded call data:&#xD;&#xA;```&#xD;&#xA;0x790003010100a10f031400040001000002093d0013000002043205e5140002093d000006010300286bee823801001c000710deadbeef140d0100010100411f&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I am testing this with Chopsticks. Unfortunately, I haven't found a way how to inspect the nested error of `FailedToTransactAsset` yet." ContentLicense="CC BY-SA 4.0" />
  <row Id="44132" PostHistoryTypeId="1" PostId="11054" RevisionGUID="4f79454d-c750-4336-b4da-2bcd80569c18" CreationDate="2024-02-21T12:12:02.117" UserId="2713" Text="Buy execution time in DOT on AssetHub" ContentLicense="CC BY-SA 4.0" />
  <row Id="44133" PostHistoryTypeId="3" PostId="11054" RevisionGUID="4f79454d-c750-4336-b4da-2bcd80569c18" CreationDate="2024-02-21T12:12:02.117" UserId="2713" Text="|xcm|assethub|transact|chopsticks|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44134" PostHistoryTypeId="2" PostId="11055" RevisionGUID="6025e67f-d505-4ccc-b023-f6db0479c501" CreationDate="2024-02-21T12:15:26.043" UserId="3437" Text="Recently I tested agile core time feature on Rococo. The idea was to test Parathread producing block.&#xD;&#xA;&#xD;&#xA;We have to submit either `placeOrderAllowDeath` or `placeOrderKeepAlive` extrinsic from `onDemandAssignmentProvider`. Once we submit this extrinsic and the collator is working, a new parachain block should be included within a few relay chain blocks depending on congestion.&#xD;&#xA;&#xD;&#xA;I tested it and it's working. I was just wondering if there is any way to automate this process so that I don't need to submit same extrinsic multiple times in order to produce block. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Please help me to provide the solution.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44136" PostHistoryTypeId="1" PostId="11055" RevisionGUID="6025e67f-d505-4ccc-b023-f6db0479c501" CreationDate="2024-02-21T12:15:26.043" UserId="3437" Text="Can we automate extrinsic calls in Substrate chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44137" PostHistoryTypeId="3" PostId="11055" RevisionGUID="6025e67f-d505-4ccc-b023-f6db0479c501" CreationDate="2024-02-21T12:15:26.043" UserId="3437" Text="|substrate-node|parathread|coretime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44138" PostHistoryTypeId="2" PostId="11056" RevisionGUID="735b6d95-5021-4027-b7fe-c92a0d216b91" CreationDate="2024-02-21T12:43:05.263" UserId="527" Text="You can go to: https://github.com/polkadot-fellows/runtimes and build the repo.&#xD;&#xA;&#xD;&#xA;And then:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/chain-spec-generator kusama-local&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="44140" PostHistoryTypeId="2" PostId="11057" RevisionGUID="89502693-9ed9-4c27-89d9-63ad7aff9110" CreationDate="2024-02-21T12:47:05.487" UserId="3445" Text="I don't exactly know, how the chopsticks runs AssetHub and `polkadot-parachain`, but is it possible to add there `RUST_LOG=xcm=trace` somehow?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44142" PostHistoryTypeId="2" PostId="11058" RevisionGUID="43257a87-c37c-4f41-be47-8cd69b997514" CreationDate="2024-02-21T14:43:46.243" UserId="4532" Text="I wanna create OCW that will send a http request to the API and get the response and use this response in runtime code to call extrinsic with this data. This OCW should triggers only when I want to call it, not every block. &#xD;&#xA;So, my question is What is the best way to create it? And what is the best architecture decision for this task, should I create another pallet for OCW or I can just write some functionality in already existing pallet and mark this code as `#offchain_worker` (pseudo) for example for future use? &#xD;&#xA;Thanks! " ContentLicense="CC BY-SA 4.0" />
  <row Id="44144" PostHistoryTypeId="1" PostId="11058" RevisionGUID="43257a87-c37c-4f41-be47-8cd69b997514" CreationDate="2024-02-21T14:43:46.243" UserId="4532" Text="How can I create OCW that won't activates every block, but will activates only when I call function that it represents?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44145" PostHistoryTypeId="3" PostId="11058" RevisionGUID="43257a87-c37c-4f41-be47-8cd69b997514" CreationDate="2024-02-21T14:43:46.243" UserId="4532" Text="|substrate-node|offchain-worker|offchain|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44146" PostHistoryTypeId="5" PostId="11048" RevisionGUID="7cf585bd-997c-4e1d-83e1-9dc962a9175c" CreationDate="2024-02-21T16:06:52.100" UserId="2005" Comment="fix code formatting" Text="i'm trying to listen events against a solidity smart contract deployed on EVM compatible Substrate chain and getting following error&#xD;&#xA;&#xD;&#xA;&gt;     Error listening event ChangeOwner :  Error: Returned error: Method not found&#xD;&#xA;&#xD;&#xA;Here's code script i'm using&#xD;&#xA;```js&#xD;&#xA;const RPC_URLS_WSS = {&#xD;&#xA;    storagechain: process.env.STORAGECHAIN_WSS_RPC_URL,&#xD;&#xA;    polygon: process.env.POLYGON_WSS_RPC_URL,&#xD;&#xA;    ethereum: process.env.ETH_WSS_RPC_URL,&#xD;&#xA;    temp: process.env.TEMP_CHAIN,&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const getWSSWeb3Instance = (networkName) =&gt; {&#xD;&#xA;    try {&#xD;&#xA;        const web3 = new Web3(RPC_URLS_WSS[networkName]);&#xD;&#xA;        return web3;&#xD;&#xA;    } catch (err) {&#xD;&#xA;        console.error('getWSSWeb3Instance ~ err:', err);&#xD;&#xA;    }&#xD;&#xA;};&#xD;&#xA;&#xD;&#xA;const chainEventListener = async (chainName) =&gt; {&#xD;&#xA;    try {&#xD;&#xA;        const web3 = getWSSWeb3Instance(chainName);&#xD;&#xA;        web3.eth&#xD;&#xA;            .subscribe(&#xD;&#xA;                'logs',&#xD;&#xA;                // {&#xD;&#xA;                //   address: '0x3932970D99D3D4DD38C06986F0B09250B7588ED4',&#xD;&#xA;                // },&#xD;&#xA;                (err, event) = {&#xD;&#xA;                    if(err) {&#xD;&#xA;                        console.error('web3.eth.subscribe ~ err:', err);&#xD;&#xA;                        return err;&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;                     console.log('Event', event);&#xD;&#xA;                }&#xD;&#xA;            )&#xD;&#xA;            .on('connected', () =&gt; {&#xD;&#xA;                console.log(`${chainName} is Connected.`);&#xD;&#xA;            });&#xD;&#xA;    } catch (err) {&#xD;&#xA;        console.error('chainEventListener ~ err:', err);&#xD;&#xA;    }&#xD;&#xA;}; &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;i wanted my chain to behave same as moonbeam is providing events subscription. &#xD;&#xA;Here's [link][1] &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.moonbeam.network/builders/build/eth-api/pubsub/#:~:text=used%20was%204.3.0.-,Subscribe%20to%20Event%20Logs,-Any%20contract%20that" ContentLicense="CC BY-SA 4.0" />
  <row Id="44147" PostHistoryTypeId="24" PostId="11048" RevisionGUID="7cf585bd-997c-4e1d-83e1-9dc962a9175c" CreationDate="2024-02-21T16:06:52.100" Comment="Proposed by 2005 approved by 3752 edit id of 633" ContentLicense="CC BY-SA 4.0" />
  <row Id="44148" PostHistoryTypeId="2" PostId="11059" RevisionGUID="a7707460-cd53-46d5-8735-98d9c1309a41" CreationDate="2024-02-21T16:37:11.577" UserId="555" Text="I'm running 3 validator nodes on different vm instances on gcp but I'm not able to connect these node with the polkadot UI.&#xD;&#xA;&#xD;&#xA;Here are the commands which I'm using to run the nodes:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/bob --chain local --bob --port 30335 --rpc-port 9944 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug --rpc-methods Unsafe   --name bob   --bootnodes /ip4/external-ip/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/alice --chain local --alice --port 30333 --rpc-port 9945 --node-key 0000000000000000000000000000000000000000000000000000000000000001 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/charlie --chain local --charlie --port 30334 --rpc-port 9945 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug --bootnodes /ip4/external-ip/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried to run this command to get port info:&#xD;&#xA;```&#xD;&#xA;deepak$ netstat -tuln | grep 9944&#xD;&#xA;tcp        0      0 127.0.0.1:9944          0.0.0.0:*               LISTEN&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On polkadot UI, I'm putting this as a endpoint: `wss://external-ip:9945`&#xD;&#xA;&#xD;&#xA;How can i solve this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44150" PostHistoryTypeId="1" PostId="11059" RevisionGUID="a7707460-cd53-46d5-8735-98d9c1309a41" CreationDate="2024-02-21T16:37:11.577" UserId="555" Text="Facing issue in connecting polkadot UI with nodes running on gcp" ContentLicense="CC BY-SA 4.0" />
  <row Id="44151" PostHistoryTypeId="3" PostId="11059" RevisionGUID="a7707460-cd53-46d5-8735-98d9c1309a41" CreationDate="2024-02-21T16:37:11.577" UserId="555" Text="|polkadot-js|polkadot|validator|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44152" PostHistoryTypeId="2" PostId="11060" RevisionGUID="b0d3da56-6951-47a0-bc4a-b82bcd20c5ad" CreationDate="2024-02-21T18:06:46.220" UserId="167" Text="There are 3 levels of answer to this question. As OCW being a commonly misunderstood topic, it is a very good question. &#xD;&#xA;&#xD;&#xA;### Simple Answer&#xD;&#xA;&#xD;&#xA;First, a crude and objectively **inefficient** answer. You can use the onchain storage that the pallet already gives to you, to trigger the offchain worker. So, an extrinsic would set a storage value, and only when this storage is set the offchain worker would run. &#xD;&#xA;&#xD;&#xA;(the following is a pseudo-code, mostly compatibel with FRAME)&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;// provide ways to set this via extrinsics, as you prefer&#xD;&#xA;#[pallet::storage]&#xD;&#xA;pub type RunWorker = StorageValue&lt;()&gt;;&#xD;&#xA;&#xD;&#xA;#[pallet::hooks]&#xD;&#xA;impl Hooks for Pallet {&#xD;&#xA;  fn offchain_worker() -&gt; {&#xD;&#xA;    if !RunWorker::get() { return }&#xD;&#xA;    // rest&#xD;&#xA;  }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This method is only reasonable when you want to have some kind of onchain proof (eg. the existence of `RunWorker`) that offchain workers should have been run. You can then use this to build some kind of an accountability around some nodes (eg. validators) to actually run the offchain workers. &#xD;&#xA;&#xD;&#xA;If this is not required, this is mostly a _misuse_ of onchain storage and I won't advice it. &#xD;&#xA;&#xD;&#xA;### Offchain Workers are _off chain_..&#xD;&#xA;&#xD;&#xA;Which means, in principle, nodes are free to run it whenever they want. The [substrate-cli already allows you to configure](https://paritytech.github.io/polkadot-sdk/master/sc_cli/commands/struct.RunCmd.html#structfield.offchain_worker_params) this to some extent. But it is worth emphasizing that this is an OFF CHAIN operation. It has no impact on the main execution of the chain. It CANNOT alter the state. A block author can decide to not run the offchain worker and it is totally acceptable. &#xD;&#xA;&#xD;&#xA;The question would then be, are the execution of these offchain workers important? do all nodes have to run them? How are you going to impose this on thousands of permissionless sovereign node operators? This is where my previous answer might be helpful.&#xD;&#xA;&#xD;&#xA;But, if not, the `offchain_worker` is merely a [runtime api](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/wasm_meta_protocol/index.html) that is executed by the node software. You can build further offchain machinery that, for example, allow a node to listen for normal HTTP requests, and upon receiving them, they execute the offchain workers on the next block. &#xD;&#xA;&#xD;&#xA;This has not been done to the best of my knowledge, but if it is really want you want, we can discuss an implementation for it.&#xD;&#xA;&#xD;&#xA;### Does It Have to be a WASM OCW?  &#xD;&#xA;&#xD;&#xA;Given the above complexities, it is worth asking yourself, does this operation have to be done as a part of a WASM OCW blob that is part of the runtime? can it not just be a [PJS-API](https://polkadot.js.org/docs/api/) (combined with any other web/http framework that you wish) script that lives elsewhere, and is executed whenever you want? &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44154" PostHistoryTypeId="5" PostId="11059" RevisionGUID="0768fcfd-f49e-4224-9770-a38c07c1ed1a" CreationDate="2024-02-21T18:34:21.347" UserId="555" Comment="added 13 characters in body" Text="I'm running 3 validator nodes on different vm instances on gcp but I'm not able to connect these node with the polkadot UI.&#xD;&#xA;&#xD;&#xA;Here are the commands which I'm using to run the nodes:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/bob --chain local --bob --port 30335 --rpc-port 9944 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug --rpc-methods Unsafe   --name bob   --bootnodes /ip4/external-ip/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/alice --chain local --alice --port 30333 --rpc-port 9945 --node-key 0000000000000000000000000000000000000000000000000000000000000001 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/charlie --chain local --charlie --port 30334 --rpc-port 9945 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug --bootnodes /ip4/external-ip/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried to run this command on instances to get port info:&#xD;&#xA;```&#xD;&#xA;deepak$ netstat -tuln | grep 9944&#xD;&#xA;tcp        0      0 127.0.0.1:9944          0.0.0.0:*               LISTEN&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On polkadot UI, I'm putting this as a endpoint: `wss://external-ip:9945`&#xD;&#xA;&#xD;&#xA;How can i solve this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44155" PostHistoryTypeId="2" PostId="11061" RevisionGUID="ff22695d-296f-4c0c-b7c9-d2b239d11cf4" CreationDate="2024-02-21T20:20:28.197" UserId="279" Text="you need to pass the flag `--unsafe-rpc-external` to listen in all interfaces, since currently the rpc is only _listening_ on `localhost` so can't be connected from outside (or you need a proxy in front to listen connections and route to the node/s).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;      --unsafe-rpc-external&#xD;&#xA;          Listen to all RPC interfaces.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Thx!" ContentLicense="CC BY-SA 4.0" />
  <row Id="44157" PostHistoryTypeId="52" PostId="11058" RevisionGUID="f4dea12c-bfc8-4f14-96b2-c0eea3be7412" CreationDate="2024-02-21T22:45:22.040" />
  <row Id="44158" PostHistoryTypeId="2" PostId="11062" RevisionGUID="06f66d22-cd1a-4a9e-b1c6-7f239abb3729" CreationDate="2024-02-21T23:47:06.197" UserId="5131" Text="The essential ones are:&#xD;&#xA; - frame_system &#xD;&#xA; - cumulus_pallet_parachain_system &#xD;&#xA; - pallet_timestamp &#xD;&#xA; - pallet_authorship &#xD;&#xA; - pallet_collator_selection &#xD;&#xA; - pallet_session &#xD;&#xA; - pallet_aura &#xD;&#xA; - cumulus_pallet_xcm: This pallet enables communication between your parachain and the Relay Chain using XCM. It is essential for parachain interoperability and cannot be removed.&#xD;&#xA;&#xD;&#xA;You can make do with the other ones depending on your specific use-case by implementing custom pallets. " ContentLicense="CC BY-SA 4.0" />
  <row Id="44160" PostHistoryTypeId="2" PostId="11063" RevisionGUID="b5c63a3a-e313-4989-8799-d0037cc49bdb" CreationDate="2024-02-21T23:51:42.250" UserId="5131" Text="You can get started with this [front-end template](https://github.com/substrate-developer-hub/substrate-front-end-template). You can set the RPC endpoint to `wss://1rpc.io/astr` in order to interact with Astar network. " ContentLicense="CC BY-SA 4.0" />
  <row Id="44162" PostHistoryTypeId="2" PostId="11064" RevisionGUID="feb2ed0e-4b76-465c-9d16-6141445acb6f" CreationDate="2024-02-22T08:48:34.577" UserId="527" Text="I would need to see de decoded call to give an accurate answer, but I can tell that the `origin_kind` in the `Transact` is wrong, try with `OriginKind::SovereignAccount`." ContentLicense="CC BY-SA 4.0" />
  <row Id="44164" PostHistoryTypeId="5" PostId="11064" RevisionGUID="57b41259-52d0-4e8b-acb8-64d4f31c67e5" CreationDate="2024-02-22T08:57:10.117" UserId="527" Comment="added 82 characters in body" Text="I would need to see de decoded call to give an accurate answer, but I can tell that the `origin_kind` in the `Transact` is wrong, try with `OriginKind::SovereignAccount`.&#xD;&#xA;&#xD;&#xA;By the way, `remarkWithEvent` will not pass the `AssetHub`'s `SafeCallFilter`." ContentLicense="CC BY-SA 4.0" />
  <row Id="44165" PostHistoryTypeId="2" PostId="11065" RevisionGUID="dea50129-1faf-4820-9e5c-ec33cdfea8a9" CreationDate="2024-02-22T14:01:02.743" UserId="73" Text="From my understanding they will need to use `force_open_hrmp_channel` any way, because they want to open a channel to a system chain. Looking over the code, I don't see any requirement for the parachain to already be onboarded or similar." ContentLicense="CC BY-SA 4.0" />
  <row Id="44167" PostHistoryTypeId="50" PostId="6939" RevisionGUID="cfa3163a-55f4-47ce-bdd6-b915f0197e6d" CreationDate="2024-02-22T23:06:25.707" UserId="-1" />
  <row Id="44168" PostHistoryTypeId="2" PostId="11066" RevisionGUID="a81898c1-e1ae-4072-9513-30559c8cc90f" CreationDate="2024-02-22T23:06:59.987" UserId="183" Text="I've read Shawn's [substrate storage deep dive][1] recently. It is very informative and I *roughly* understand different key systems exist and how the keys are caclulated.&#xD;&#xA;&#xD;&#xA;However, one thing that puzzles me is what exactly is stored in the trie. It's mentioned in the presentation that the key of KVDB is actually the hash of &quot;trie node&quot;, which is a serialized struct object including header, partial key, &quot;value&quot; and so on. But what is the value here? It can't be the SCALE-encoded storage value, can it? (for example, the value in `StorageValue`) Otherwise how can I query the database if the key calculation includes the value which I don't even know yet? And I assume updating the value isn't supposed to change the key.&#xD;&#xA;&#xD;&#xA;But on the other hand, if the trie node doesn't have the real value information, where is it stored? It must exist somewhere such that the merkle state root involves it. Eventually it's probably stored as the value in KVDB, but where is it located in the trie?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://www.shawntabrizi.com/substrate/substrate-storage-deep-dive/" ContentLicense="CC BY-SA 4.0" />
  <row Id="44170" PostHistoryTypeId="1" PostId="11066" RevisionGUID="a81898c1-e1ae-4072-9513-30559c8cc90f" CreationDate="2024-02-22T23:06:59.987" UserId="183" Text="What are the &quot;values&quot; in the substrate Merkle Patricia tree?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44171" PostHistoryTypeId="3" PostId="11066" RevisionGUID="a81898c1-e1ae-4072-9513-30559c8cc90f" CreationDate="2024-02-22T23:06:59.987" UserId="183" Text="|storage|trie|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44172" PostHistoryTypeId="5" PostId="11059" RevisionGUID="f24bc6cc-2a9b-44ce-99a5-3f3f7ed19233" CreationDate="2024-02-23T07:10:05.653" UserId="555" Comment="added 810 characters in body" Text="I'm running 3 validator nodes on different vm instances on gcp but I'm not able to connect these node with the polkadot UI.&#xD;&#xA;&#xD;&#xA;Here are the commands which I'm using to run the nodes:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/bob --chain local --bob --port 30335 --rpc-port 9944 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug --rpc-methods Unsafe   --name bob   --bootnodes /ip4/external-ip/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/alice --chain local --alice --port 30333 --rpc-port 9945 --node-key 0000000000000000000000000000000000000000000000000000000000000001 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/charlie --chain local --charlie --port 30334 --rpc-port 9945 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug --bootnodes /ip4/external-ip/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried to run this command on instances to get port info:&#xD;&#xA;```&#xD;&#xA;deepak$ netstat -tuln | grep 9944&#xD;&#xA;tcp        0      0 127.0.0.1:9944          0.0.0.0:*               LISTEN&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On polkadot UI, I'm putting this as a endpoint: `wss://external-ip:9945`&#xD;&#xA;&#xD;&#xA;After adding `--unsafe-rpc-external`&#xD;&#xA;&#xD;&#xA;I'm not still facing the same issue on polkadot UI. Here are logs which happens when UI tries to connect: &#xD;&#xA;```&#xD;&#xA;2024-02-23 07:07:46.958  INFO tokio-runtime-worker jsonrpsee_server::server: Accepting new connection 1/100&#xD;&#xA;2024-02-23 07:07:46.958  WARN tokio-runtime-worker jsonrpsee_server::server: HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2024-02-23 07:07:47.514  INFO tokio-runtime-worker jsonrpsee_server::server: Accepting new connection 1/100&#xD;&#xA;2024-02-23 07:07:47.514  WARN tokio-runtime-worker jsonrpsee_server::server: HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2024-02-23 07:07:48.538  INFO tokio-runtime-worker substrate:  Idle (2 peers), best: #675 (0x2144…a767), finalized #673 (0x6018…0a29), ⬇ 2.1kiB/s ⬆ 1.8kiB/s  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can i solve this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="44174" PostHistoryTypeId="4" PostId="11059" RevisionGUID="a83048f3-ef56-4519-8e2a-876a80d15cbb" CreationDate="2024-02-23T07:46:50.410" UserId="555" Comment="edited title" Text="Facing issue in connecting polkadot UI with nodes running on gcp [updated]" ContentLicense="CC BY-SA 4.0" />
  <row Id="44175" PostHistoryTypeId="50" PostId="9874" RevisionGUID="eaf593ee-3c88-41c6-a954-f9cee3dc73e9" CreationDate="2024-02-23T08:05:50.660" UserId="-1" />
  <row Id="44176" PostHistoryTypeId="2" PostId="11067" RevisionGUID="71ee0dbb-0450-4218-a950-3d31c580d076" CreationDate="2024-02-23T08:57:15.003" UserId="357" Text="Mangata stopped producing blocks in Rococo. We have not done anything in this environment for a while. &#xD;&#xA;&#xD;&#xA;Every time the collator starts producing blocks, It prints the following entry log,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2024-02-20 08:31:06 [Relaychain] Collation wasn't advertised to any validator. candidate_hash=0x77b0ef2711e62e9030aaeba5ada90c315c84052e287a5ecd12591eae27004460 pov_hash=0x44fdf1ed92f999cf5e3867dba51f275133dbbacc66aa6f8013c835594c0f6eb3 traceID=159096826336840247337885360921611144241&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Raw logs can be found here: &#xD;&#xA;https://pastebin.com/Fk7EYHna&#xD;&#xA;&#xD;&#xA;Mangata-version: 3,200&#xD;&#xA;&#xD;&#xA;Polkadot-SDK version: 1.0.1&#xD;&#xA;&#xD;&#xA;Last block: 142 hr &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44178" PostHistoryTypeId="1" PostId="11067" RevisionGUID="71ee0dbb-0450-4218-a950-3d31c580d076" CreationDate="2024-02-23T08:57:15.003" UserId="357" Text="Mangata parachain can not produce blocks on rococo" ContentLicense="CC BY-SA 4.0" />
  <row Id="44179" PostHistoryTypeId="3" PostId="11067" RevisionGUID="71ee0dbb-0450-4218-a950-3d31c580d076" CreationDate="2024-02-23T08:57:15.003" UserId="357" Text="|relay-chain|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44180" PostHistoryTypeId="5" PostId="11067" RevisionGUID="92f211d4-fecf-4c32-bb8d-f448d5030713" CreationDate="2024-02-23T09:16:14.117" UserId="357" Comment="added 37 characters in body" Text="Mangata stopped producing blocks in Rococo. We have not done anything in this environment for a while. &#xD;&#xA;&#xD;&#xA;Every time the collator starts producing blocks, It prints the following entry log,&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2024-02-20 08:31:06 [Relaychain] Collation wasn't advertised to any validator. candidate_hash=0x77b0ef2711e62e9030aaeba5ada90c315c84052e287a5ecd12591eae27004460 pov_hash=0x44fdf1ed92f999cf5e3867dba51f275133dbbacc66aa6f8013c835594c0f6eb3 traceID=159096826336840247337885360921611144241&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Raw logs can be found here: &#xD;&#xA;https://pastebin.com/Fk7EYHna&#xD;&#xA;&#xD;&#xA;Mangata-version: 3,200&#xD;&#xA;&#xD;&#xA;MangataRelease version: v0.33.0&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Polkadot-SDK version: 1.0.1&#xD;&#xA;&#xD;&#xA;Last block: 142 hr &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44181" PostHistoryTypeId="5" PostId="11059" RevisionGUID="18f45fcd-3648-4fd2-9cf9-496646218ce8" CreationDate="2024-02-23T09:32:04.693" UserId="555" Comment="added 38 characters in body" Text="I'm running 3 validator nodes on different vm instances on gcp but I'm not able to connect these node with the polkadot UI.&#xD;&#xA;&#xD;&#xA;Here are the commands which I'm using to run the nodes:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/bob --chain local --bob --port 30335 --rpc-port 9944 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug --rpc-methods Unsafe   --name bob   --bootnodes /ip4/external-ip/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/alice --chain local --alice --port 30333 --rpc-port 9945 --node-key 0000000000000000000000000000000000000000000000000000000000000001 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./target/release/node-template --base-path /tmp/charlie --chain local --charlie --port 30334 --rpc-port 9945 --telemetry-url &quot;wss://telemetry.polkadot.io/submit/ 0&quot; --validator -lruntime=debug --bootnodes /ip4/external-ip/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I tried to run this command on instances to get port info:&#xD;&#xA;```&#xD;&#xA;deepak$ netstat -tuln | grep 9944&#xD;&#xA;tcp        0      0 127.0.0.1:9944          0.0.0.0:*               LISTEN&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;On polkadot UI, I'm putting this as a endpoint: `wss://external-ip:9945`&#xD;&#xA;&#xD;&#xA;After adding `--unsafe-rpc-external`&#xD;&#xA;&#xD;&#xA;I'm not still facing the same issue on polkadot UI. Here are logs which happens when UI tries to connect: &#xD;&#xA;```&#xD;&#xA;2024-02-23 07:07:46.958  INFO tokio-runtime-worker jsonrpsee_server::server: Accepting new connection 1/100&#xD;&#xA;2024-02-23 07:07:46.958  WARN tokio-runtime-worker jsonrpsee_server::server: HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2024-02-23 07:07:47.514  INFO tokio-runtime-worker jsonrpsee_server::server: Accepting new connection 1/100&#xD;&#xA;2024-02-23 07:07:47.514  WARN tokio-runtime-worker jsonrpsee_server::server: HTTP serve connection failed hyper::Error(Parse(Method))&#xD;&#xA;2024-02-23 07:07:48.538  INFO tokio-runtime-worker substrate:  Idle (2 peers), best: #675 (0x2144…a767), finalized #673 (0x6018…0a29), ⬇ 2.1kiB/s ⬆ 1.8kiB/s  &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can i solve this issue?&#xD;&#xA;&#xD;&#xA;Just FYI: websocket is not secured" ContentLicense="CC BY-SA 4.0" />
  <row Id="44182" PostHistoryTypeId="50" PostId="8852" RevisionGUID="66100632-579d-418a-b61c-d2b34c66c1f1" CreationDate="2024-02-23T10:04:35.600" UserId="-1" />
  <row Id="44183" PostHistoryTypeId="2" PostId="11068" RevisionGUID="9975b150-101c-4312-8483-86d93bfd1502" CreationDate="2024-02-23T12:54:40.157" UserId="73" Text="For whatever reason you had multiple cores assigned to your Parachain. Did you maybe buyed a core for your chain on the broker chain?&#xD;&#xA;&#xD;&#xA;It is fixed now, I have removed the extra core. We are working on fixing this on the relay chain side, to support multiple cores per parachain." ContentLicense="CC BY-SA 4.0" />
  <row Id="44185" PostHistoryTypeId="2" PostId="11069" RevisionGUID="d3bd0051-0273-4ecb-9677-3f5870099f3f" CreationDate="2024-02-23T13:55:06.117" UserId="527" Text="Since the need of going through Governance is unavoidable (because you want to open the channel with a System Para), I would just prepare the `force_open_hrmp_channel` proposal scheduled to be executed at block X.&#xD;&#xA;&#xD;&#xA;By block X, your Parachain should be already onboarded with the final runtime. This simplifies the process - no Seedling runtime, no migration... nothing.&#xD;&#xA;&#xD;&#xA;The obvious downside is that you’ll have to commit to having the runtime ready by then, which I'm not sure is possible for you." ContentLicense="CC BY-SA 4.0" />
  <row Id="44187" PostHistoryTypeId="2" PostId="11070" RevisionGUID="c3670000-2815-4bbb-8ca9-864a765aa8ce" CreationDate="2024-02-23T15:58:23.193" UserId="4341" Text="I have built a basic setup of a local Rococo-relay chain and 2 collators to run the Seedling runtime:&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/parachains/runtimes/starters/seedling&#xD;&#xA;&#xD;&#xA;Both collators panic with &quot;Timestamp inherent data must be provided &quot; when the seedling is onboarded. Tried both with zombienet and by running the nodes myself.&#xD;&#xA;&#xD;&#xA;Only change I made to default Seedling chain-spec was to change from `westend` to `rococo-local` on `relay_chain`. &#xD;&#xA;&#xD;&#xA;Any fix you can think about? Thanks&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44189" PostHistoryTypeId="1" PostId="11070" RevisionGUID="c3670000-2815-4bbb-8ca9-864a765aa8ce" CreationDate="2024-02-23T15:58:23.193" UserId="4341" Text="Timestamp inherent data must be provided panics on Seedling runtime" ContentLicense="CC BY-SA 4.0" />
  <row Id="44190" PostHistoryTypeId="3" PostId="11070" RevisionGUID="c3670000-2815-4bbb-8ca9-864a765aa8ce" CreationDate="2024-02-23T15:58:23.193" UserId="4341" Text="|parachain|runtime|parachain-collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44191" PostHistoryTypeId="2" PostId="11071" RevisionGUID="59c8fd3d-9045-4990-8d18-ab1199efc180" CreationDate="2024-02-23T16:01:41.570" UserId="5175" Text="This failure occurs during the linting process, which in the case of cargo-contract 1.5.1 uses a hardcoded toolchain nightly-2022-06-30:&#xD;&#xA;https://github.com/paritytech/cargo-contract/blob/v1.x.x/ink_linting/rust-toolchain.toml&#xD;&#xA;&#xD;&#xA;The workaround is to avoid using linting by running: `cargo contract build --skip-linting`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44193" PostHistoryTypeId="50" PostId="9871" RevisionGUID="78d7082f-98f9-4e94-876e-e9011793db12" CreationDate="2024-02-23T16:03:00.323" UserId="-1" />
  <row Id="44194" PostHistoryTypeId="2" PostId="11072" RevisionGUID="fbb384dc-2ce0-4abd-8e3f-0359839fbc33" CreationDate="2024-02-23T17:54:47.700" UserId="1810" Text="We lack concensus on availability bitfields in the sense that validator could report different bitfields, maybe because one validator sends different bitfields to every other validator.  We therefore have no shared message which validators could threshold sign.&#xD;&#xA;&#xD;&#xA;We do collect sets of bitfields on the relay chain, but block production has forks.  We therefore do not have concensus upon bitfields even after they appear on-chain.  We do implicitly sign all the bitfields in grandpa, and could do threshold signing in beefy, but this comes quite late.&#xD;&#xA;&#xD;&#xA;In other words, we'd need a blockchain plus three-round finality gadget merely for concensus upon the bitfields, so that's effectively like 4 n signatures per block.  Why bother?&#xD;&#xA;&#xD;&#xA;Instead we mitigate relay chain forks using softer methods, and operate upon each fork when necessary, so then we liberate the (availability) cores faster.  If we waited then any stall would freeze parachains too, which maybe limits our migration of relay chain functionality to parachains.&#xD;&#xA;&#xD;&#xA;&gt; Also, is the information on who is storing the data used somewhere?&#xD;&#xA;&#xD;&#xA;Yes, we already have pairwise connections between all validators of course, but afaik we still only attempt downloads from nodes who say they have their chunk.  We've nobody coordinating the transfers like trackers do in bittorrent, so the transpose of all the bitfields acts like tracker data for us.&#xD;&#xA;&#xD;&#xA;Ideally we should've pushed this bittorrent analogy deeper into the code, but everyone loves their not-invented-here.&#xD;&#xA;&#xD;&#xA;&gt;  I am not aware of any other use of accountability in the current system. &#xD;&#xA;&#xD;&#xA;We want BEEFY signatures to be accountable because bridges use them.  And regular threshold signatures cannot really be accountable. &#xD;&#xA;&#xD;&#xA;&gt;  wouldn't it be cheaper to store a threshold signature, rather than the bitfields?&#xD;&#xA;&#xD;&#xA;Afaik storage costs are irrelevant, but..&#xD;&#xA;&#xD;&#xA;Afaik there is no reason anybody but polkadot validators cares about availability in polkadot.  In principle, one could archive some &quot;stripped&quot; version of polkadot blocks which only contained candidate recipets and their inclusion/enaction.  A BEEFY proof would remain an accountable statement of validity for these, not just availability. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44196" PostHistoryTypeId="50" PostId="10041" RevisionGUID="798b3df4-8e1a-47c4-98a6-ce3a3e409f4d" CreationDate="2024-02-23T18:03:20.370" UserId="-1" />
  <row Id="44197" PostHistoryTypeId="5" PostId="11072" RevisionGUID="4438812c-4641-44a1-b123-cdb848b3e04c" CreationDate="2024-02-23T18:06:02.727" UserId="1810" Comment="deleted 3 characters in body" Text="We lack concensus on availability bitfields in the sense that validator could report different bitfields, maybe because one validator sends different bitfields to every other validator.  We therefore have no shared message which validators could threshold sign.&#xD;&#xA;&#xD;&#xA;We do collect sets of bitfields on the relay chain, but block production has forks.  We therefore do not have concensus upon bitfields even after they appear on-chain.  We do implicitly sign all the bitfields in grandpa, and could do threshold signing in beefy, but this comes quite late.&#xD;&#xA;&#xD;&#xA;In other words, we'd need a blockchain plus three-round finality gadget merely for concensus upon the bitfields, so that's effectively like 4 n signatures per block.  Why bother?&#xD;&#xA;&#xD;&#xA;Instead we mitigate relay chain forks using softer methods, and operate upon each fork when necessary, so then we liberate the (availability) cores faster.  If we waited then any stall would freeze parachains too, which maybe limits our migration of relay chain functionality to parachains.&#xD;&#xA;&#xD;&#xA;&gt; Also, is the information on who is storing the data used somewhere?&#xD;&#xA;&#xD;&#xA;Yes, we already have pairwise connections between all validators of course, but afaik we still only attempt downloads from nodes who say they have their chunk.  We've nobody coordinating the transfers like trackers do in bittorrent, so the transpose of all the bitfields acts like tracker data for us.&#xD;&#xA;&#xD;&#xA;Ideally we should've pushed this bittorrent analogy deeper into the code, but everyone loves their not-invented-here.&#xD;&#xA;&#xD;&#xA;&gt;  I am not aware of any other use of accountability in the current system. &#xD;&#xA;&#xD;&#xA;We want BEEFY signatures to be accountable because bridges use them.  And regular threshold signatures cannot really be accountable. &#xD;&#xA;&#xD;&#xA;&gt;  wouldn't it be cheaper to store a threshold signature, rather than the bitfields?&#xD;&#xA;&#xD;&#xA;Afaik storage costs are irrelevant, but..&#xD;&#xA;&#xD;&#xA;Afaik there is no reason anybody but polkadot validators cares about availability in polkadot.  In principle, one could archive some &quot;stripped&quot; version of polkadot blocks which only contained candidate recipets and their inclusion/enaction remarks, but no bitfields.  A BEEFY proof would represent validity for these, so availability could be forgotten entirely. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44198" PostHistoryTypeId="50" PostId="5103" RevisionGUID="73dfe733-e642-4eeb-83d8-48beb5946fd4" CreationDate="2024-02-24T00:08:46.103" UserId="-1" />
  <row Id="44200" PostHistoryTypeId="50" PostId="8690" RevisionGUID="adff69b9-cea3-4cdf-9f46-5cd2f921eba7" CreationDate="2024-02-24T07:07:15.897" UserId="-1" />
  <row Id="44201" PostHistoryTypeId="2" PostId="11073" RevisionGUID="28c382e0-776a-450d-a733-3e0ae4196d52" CreationDate="2024-02-24T09:11:35.853" UserId="183" Text="We have been using polkadot/substrate `v0.9.42` version and want to catch up with the latest release (v1.6.0+). I'll make sure to check each version's [release analysis][1] on the polkadot.forum, but still I've got two general questions:&#xD;&#xA;1. Is it possible/recommended to do discrete version upgrade, like `v0.9.42` =&gt; `v1.0.0` =&gt; `v1.5.0` =&gt; `v1.7.0` (just as an example), or is there any version that can't be skipped?&#xD;&#xA;2. I notice that crates.io crates are now being used, given that each of them seems to follow its own semVer (e.g. `sp-io` and `sp-std` have different versioning), how can I easily find out the versions of each related crate for a specific polkadot release?&#xD;&#xA;&#xD;&#xA;I'd appreciate for any help!&#xD;&#xA;&#xD;&#xA;  [1]: https://forum.polkadot.network/tag/release-analysis" ContentLicense="CC BY-SA 4.0" />
  <row Id="44203" PostHistoryTypeId="1" PostId="11073" RevisionGUID="28c382e0-776a-450d-a733-3e0ae4196d52" CreationDate="2024-02-24T09:11:35.853" UserId="183" Text="Denpendencies update from an old polkadot version" ContentLicense="CC BY-SA 4.0" />
  <row Id="44204" PostHistoryTypeId="3" PostId="11073" RevisionGUID="28c382e0-776a-450d-a733-3e0ae4196d52" CreationDate="2024-02-24T09:11:35.853" UserId="183" Text="|upgrade|crates-io|" ContentLicense="CC BY-SA 4.0" />
  <row Id="44205" PostHistoryTypeId="5" PostId="11061" RevisionGUID="c42bc69d-5041-43bd-9691-7a712e6a1ecb" CreationDate="2024-02-24T11:19:25.570" UserId="279" Comment="added 494 characters in body" Text="you need to pass the flag `--unsafe-rpc-external` to listen in all interfaces, since currently the rpc is only _listening_ on `localhost` so can't be connected from outside (or you need a proxy in front to listen connections and route to the node/s).&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;      --unsafe-rpc-external&#xD;&#xA;          Listen to all RPC interfaces.&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;_Update_: With this the instance is ready to accepting connection over the `extenal-ip` __but__ using polkadotjs apps will not works since the browser restrictions of open a `ws` connection from a secure sire (https). To workaround this you can create a reverse tunnel with `ssh` and use localhost to connect to your instance. The tunnel can be created with this command&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;ssh -g -L 9945:localhost: 9945 -f -N user@gcp-intance&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And then you can use `ws://localhost:9945`&#xD;&#xA;&#xD;&#xA;Thx!&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="44206" PostHistoryTypeId="50" PostId="9885" RevisionGUID="5a610431-f512-430a-a908-19534deb1424" CreationDate="2024-02-24T12:02:55.360" UserId="-1" />
  <row Id="44207" PostHistoryTypeId="50" PostId="10018" RevisionGUID="2e43d263-407c-46d4-b59f-e71323921bfa" CreationDate="2024-02-24T13:02:50.337" UserId="-1" />
  <row Id="45207" PostHistoryTypeId="50" PostId="9752" RevisionGUID="aa3c5825-049c-471c-8f57-0c7563e6da1c" CreationDate="2024-02-25T08:02:50.353" UserId="-1" />
  <row Id="45208" PostHistoryTypeId="2" PostId="11074" RevisionGUID="4479c90b-db1b-4fd1-9062-8f0ae2e8b606" CreationDate="2024-02-25T08:56:11.570" UserId="4862" Text="I am trying to add a precompile to my runtime(I hope this is what it is called).&#xD;&#xA;What I did was import the precompile first in my runtimes's cargo.toml file. All my dependencies are fetched from polkadot-v0.9.19.&#xD;&#xA;&#xD;&#xA;    pallet-democracy-precompiles = { path = &quot;../../precompiles/pallet-democracy&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;In the precompile.rs file, I declared a struct and implemented some methods.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Debug, Clone, Copy)]&#xD;&#xA;pub struct MyChainPrecompiles&lt;R&gt;(PhantomData&lt;R&gt;);&#xD;&#xA;&#xD;&#xA;impl&lt;R&gt; MyChainPrecompiles&lt;R&gt;&#xD;&#xA;where&#xD;&#xA;	R: pallet_evm::Config,&#xD;&#xA;{&#xD;&#xA;	pub fn new() -&gt; Self {&#xD;&#xA;		Self(Default::default())&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	pub fn used_addresses() -&gt; sp_std::vec::Vec&lt;H160&gt; {&#xD;&#xA;      //fn implementation&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;Then I implemented the PreCompileSet from pallet_evm as follows&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;impl&lt;R&gt; PrecompileSet for MyChainPrecompiles&lt;R&gt;&#xD;&#xA;where&#xD;&#xA;    DemocracyWrapper&lt;R&gt;: Precompile,&#xD;&#xA;	R: pallet_evm::Config,&#xD;&#xA;{&#xD;&#xA;	fn execute(&#xD;&#xA;		&amp;self,&#xD;&#xA;		address: H160,&#xD;&#xA;		input: &amp;[u8],&#xD;&#xA;		target_gas: Option&lt;u64&gt;,&#xD;&#xA;		context: &amp;Context,&#xD;&#xA;		is_static: bool,&#xD;&#xA;	) -&gt; Option&lt;PrecompileResult&gt; {&#xD;&#xA;		match address {&#xD;&#xA;			// Ethereum precompiles&#xD;&#xA;			// Some Non-Frontier specific nor Ethereum precompiles&#xD;&#xA;			a if a == hash(2051) =&gt; Some(DemocracyWrapper::&lt;R&gt;::execute(&#xD;&#xA;				input, target_gas, context, is_static,&#xD;&#xA;			)),&#xD;&#xA;			_ =&gt; None,&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;&#xD;&#xA;	fn is_precompile(&amp;self, address: H160) -&gt; bool {&#xD;&#xA;		Self::used_addresses().contains(&amp;address)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;In the lib.rs file did the following changes&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub mod precompiles;&#xD;&#xA;pub use precompiles::MyChainPrecompiles;&#xD;&#xA;pub type Precompiles = MyChainPrecompiles&lt;Runtime&gt;;&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub PrecompilesValue: MyChainPrecompiles&lt;Runtime&gt; = MyChainPrecompiles::&lt;_&gt;::new();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_evm::Config for Runtime {&#xD;&#xA;    //Some types&#xD;&#xA;	type PrecompilesType = MyChainPrecompiles&lt;Self&gt;;&#xD;&#xA;	type PrecompilesValue = PrecompilesValue;&#xD;&#xA;    //Some more types&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;When building in release mode i  am getting error as follows&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  warning: `mychain-rpc-primitives-debug` (lib) generated 1 warning&#xD;&#xA;     Compiling mychain-runtime v4.0.0 (/home/RRR/mychain-node-rr/node/runtime)&#xD;&#xA;  error[E0277]: the trait bound `DemocracyWrapper&lt;Runtime&gt;: LinearCostPrecompile` is not satisfied&#xD;&#xA;      --&gt; /home/RRR/mychain-node-rr/node/runtime/src/lib.rs:1407:25&#xD;&#xA;       |&#xD;&#xA;  1407 |     type PrecompilesType = MyChainPrecompiles&lt;Self&gt;;&#xD;&#xA;       |                            ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `LinearCostPrecompile` is not implemented for `DemocracyWrapper&lt;Runtime&gt;`&#xD;&#xA;       |&#xD;&#xA;       = help: the following other types implement trait `LinearCostPrecompile`:&#xD;&#xA;                 Curve25519Add&#xD;&#xA;                 Curve25519ScalarMul&#xD;&#xA;                 ECRecover&#xD;&#xA;                 ECRecoverPublicKey&#xD;&#xA;                 Ed25519Verify&#xD;&#xA;                 Ripemd160&#xD;&#xA;                 Sha3FIPS256&#xD;&#xA;                 Sha3FIPS512&#xD;&#xA;               and 2 others&#xD;&#xA;       = note: required because of the requirements on the impl of `Precompile` for `DemocracyWrapper&lt;Runtime&gt;`&#xD;&#xA;  note: required because of the requirements on the impl of `PrecompileSet` for `MyChainPrecompiles&lt;Runtime&gt;`&#xD;&#xA;      --&gt; /home/RRR/mychain-node-rr/node/runtime/src/precompiles.rs:32:9&#xD;&#xA;       |&#xD;&#xA;  32   | impl&lt;R&gt; PrecompileSet for MyChainPrecompiles&lt;R&gt;&#xD;&#xA;       |         ^^^^^^^^^^^^^     ^^^^^^^^^^^^^^^^^^^^^^&#xD;&#xA;  note: required by a bound in `pallet_evm::Config::PrecompilesType`&#xD;&#xA;      --&gt; /home/RRR/.cargo/git/checkouts/frontier-b4643f17507d3282/7c32b14/frame/evm/src/lib.rs:127:25&#xD;&#xA;       |&#xD;&#xA;  127  |         type PrecompilesType: PrecompileSet;&#xD;&#xA;       |                               ^^^^^^^^^^^^^ required by this bound in `pallet_evm::Config::PrecompilesType`&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0277`.&#xD;&#xA;  error: could not compile `mychain-runtime` due to previous error&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45210" PostHistoryTypeId="1" PostId="11074" RevisionGUID="4479c90b-db1b-4fd1-9062-8f0ae2e8b606" CreationDate="2024-02-25T08:56:11.570" UserId="4862" Text="Trying to add democracy precompile and getting an error that says the trait `LinearCostPrecompile` is not implemented for `DemocracyWrapper&lt;Runtime&gt;'" ContentLicense="CC BY-SA 4.0" />
  <row Id="45211" PostHistoryTypeId="3" PostId="11074" RevisionGUID="4479c90b-db1b-4fd1-9062-8f0ae2e8b606" CreationDate="2024-02-25T08:56:11.570" UserId="4862" Text="|runtime|precompile|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45212" PostHistoryTypeId="50" PostId="10891" RevisionGUID="174ec4d5-2272-4c87-9b0c-716ea95143f2" CreationDate="2024-02-25T12:02:40.293" UserId="-1" />
  <row Id="45213" PostHistoryTypeId="2" PostId="11075" RevisionGUID="a3a0e0dc-788c-4e87-811a-11c9acb406b9" CreationDate="2024-02-25T23:44:35.223" UserId="3598" Text="After reviewing this [guide][1] on upgrading the runtime of a parachain for async backing, I have a few questions regarding the &quot;Timing by Block Number&quot; section of phase 3, it mentions that modifying the block duration for parachains that measure time in terms of its own block number could produce issues, how can I check if our parachain is affected by this?&#xD;&#xA;&#xD;&#xA;It also mentions that for parachains affected by this it might be preferable to increase velocity, instead of modifying block duration, does this mean increasing the BLOCK_PROCESSING_VELOCITY value to 2?&#xD;&#xA;&#xD;&#xA;Finally it mentions that another strategy to deal with this issue is to rely on relay chain block numbers for timing, how would this be done? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-async-backing#phase-3---activate-async-backing" ContentLicense="CC BY-SA 4.0" />
  <row Id="45215" PostHistoryTypeId="1" PostId="11075" RevisionGUID="a3a0e0dc-788c-4e87-811a-11c9acb406b9" CreationDate="2024-02-25T23:44:35.223" UserId="3598" Text="Upgrading parachain runtime for async backing &quot;Timing by Block Number&quot; question?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45216" PostHistoryTypeId="3" PostId="11075" RevisionGUID="a3a0e0dc-788c-4e87-811a-11c9acb406b9" CreationDate="2024-02-25T23:44:35.223" UserId="3598" Text="|parachain|async-backing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45217" PostHistoryTypeId="50" PostId="10067" RevisionGUID="a1236a14-58bc-4a58-ae68-898e03a09272" CreationDate="2024-02-26T06:05:30.723" UserId="-1" />
  <row Id="45218" PostHistoryTypeId="2" PostId="11076" RevisionGUID="2cf83efc-2974-49c5-b3b0-c4e09973903e" CreationDate="2024-02-26T10:15:47.900" UserId="445" Text="Solution: Adding `ws` in `--bootnode` flag&#xD;&#xA;&#xD;&#xA;`--bootnodes /ip4/13.215.176.156/tcp/30333/ws/p2p/12D3KooWSCPiw5WquLQ1rZCbVUU8U95tgGU55EEuRZryxVJZyB7a`&#xD;&#xA;&#xD;&#xA;I don't know why it works. My initial validators are running properly when I execute the same command without adding `ws`&#xD;&#xA;&#xD;&#xA;My `polkadot-sdk` version is `0.9.36`&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45220" PostHistoryTypeId="2" PostId="11077" RevisionGUID="6b6121f9-1079-4204-ab1a-a33c72d5c18d" CreationDate="2024-02-26T10:47:12.733" UserId="445" Text="By referring to this solution, it works properly unless there are modifications in the chain spec.&#xD;&#xA;&#xD;&#xA;https://substrate.stackexchange.com/questions/6127/how-to-upgrade-the-client&#xD;&#xA;&#xD;&#xA;In my case, the chain spec file has been modified as I removed some pallets and also deleted related information about the removed pallets in the `chain_spec.rs` file and updated the new client code (`service.rs`). &#xD;&#xA;&#xD;&#xA;I ran the upgrade with the new runtime, and it was successful. However, when updating the client for the RPC node, it fails due to a genesis mismatch between the old and new client&#xD;&#xA;&#xD;&#xA;Do we have any ideas to address it without interrupting the chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45222" PostHistoryTypeId="1" PostId="11077" RevisionGUID="6b6121f9-1079-4204-ab1a-a33c72d5c18d" CreationDate="2024-02-26T10:47:12.733" UserId="445" Text="How to update the client with new chain spec?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45223" PostHistoryTypeId="3" PostId="11077" RevisionGUID="6b6121f9-1079-4204-ab1a-a33c72d5c18d" CreationDate="2024-02-26T10:47:12.733" UserId="445" Text="|upgrade|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45224" PostHistoryTypeId="2" PostId="11078" RevisionGUID="904a4dc4-921c-4a52-8edf-c17bcba7d9d8" CreationDate="2024-02-26T12:07:31.220" UserId="2005" Text="encountered the same issue while upgrading dependencies to `polkadot-v1.6.0`. Fix was very simple and as suggested by the error log:&#xD;&#xA;&#xD;&#xA;```bash&#xD;&#xA;rustup component add rust-src&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="45226" PostHistoryTypeId="2" PostId="11079" RevisionGUID="0754a2c0-b564-4480-83e0-5a4fcb980043" CreationDate="2024-02-26T15:57:08.457" UserId="2748" Text="I want to add keys from a pallet in the keystore so that these keys can participate in the consensus[validation/block authorisation]. &#xD;&#xA;&#xD;&#xA; Is it possible to perform? If yes how?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45228" PostHistoryTypeId="1" PostId="11079" RevisionGUID="0754a2c0-b564-4480-83e0-5a4fcb980043" CreationDate="2024-02-26T15:57:08.457" UserId="2748" Text="How to access keystore from pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45229" PostHistoryTypeId="3" PostId="11079" RevisionGUID="0754a2c0-b564-4480-83e0-5a4fcb980043" CreationDate="2024-02-26T15:57:08.457" UserId="2748" Text="|pallet|validator|key|authorship|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45230" PostHistoryTypeId="2" PostId="11080" RevisionGUID="cf172bb3-874b-48f9-84fd-a9877a4c1a52" CreationDate="2024-02-26T16:34:29.290" UserId="555" Text="If i have build file(i.e target file) and boot node of the substrate chain. &#xD;&#xA;&#xD;&#xA;Can I run the join the network by running my validator node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45232" PostHistoryTypeId="1" PostId="11080" RevisionGUID="cf172bb3-874b-48f9-84fd-a9877a4c1a52" CreationDate="2024-02-26T16:34:29.290" UserId="555" Text="Is it possible to run a node with only build file and boot node of the chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45233" PostHistoryTypeId="3" PostId="11080" RevisionGUID="cf172bb3-874b-48f9-84fd-a9877a4c1a52" CreationDate="2024-02-26T16:34:29.290" UserId="555" Text="|substrate-node-template|validator|nodes|bootnode|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45234" PostHistoryTypeId="5" PostId="11080" RevisionGUID="70205ba2-485c-4856-80a6-feecf6e78de1" CreationDate="2024-02-26T16:42:32.937" UserId="555" Comment="deleted 4 characters in body" Text="If i have build file(i.e target file) and boot node of the substrate chain. &#xD;&#xA;&#xD;&#xA;Can I join the network by running my validator node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45235" PostHistoryTypeId="5" PostId="11080" RevisionGUID="ebd7e29c-2caa-471a-9965-b789734e4230" CreationDate="2024-02-26T16:59:22.873" UserId="555" Comment="added 149 characters in body" Text="If i have build file(i.e target file) and boot node of the substrate chain. &#xD;&#xA;&#xD;&#xA;Can I join the network by running my validator node?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note: Our goal is to minimise the effort required for users who wish to operate a validator. or we have any other options to reduce the effort?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45236" PostHistoryTypeId="50" PostId="10075" RevisionGUID="8577f577-e032-4385-ae42-13c2989e6d06" CreationDate="2024-02-26T17:02:25.377" UserId="-1" />
  <row Id="45237" PostHistoryTypeId="2" PostId="11081" RevisionGUID="99b2b364-2933-44b0-8d79-d95312c61713" CreationDate="2024-02-26T18:56:57.997" UserId="2099" Text="We are looking to enable reproducible floating point operations on chain by implementing the IEEE 754 standard as an on-chain wasm function.&#xD;&#xA;&#xD;&#xA;As discussed in this [stackoverflow post](https://substrate.stackexchange.com/questions/146/can-you-use-floating-point-numbers-or-math-in-the-runtime),&#xD;&#xA;substrate does not support naive floating point operations due to nondeterminism.&#xD;&#xA;Most use cases therefore go with fixed point arithmetics, which would be sub-optimal for us.&#xD;&#xA;&#xD;&#xA;The following link gives additional insights into non-determinism in wasm: https://github.com/WebAssembly/design/blob/main/Nondeterminism.md&#xD;&#xA;&#xD;&#xA;Given this information it still seems possible to come up with an IEEE 754 implementation that behaves deterministically in the context of substrate pallets, or am I missing something?&#xD;&#xA;&#xD;&#xA;My questions are the following:&#xD;&#xA;1. Is there a wasm implementation of the IEEE 754 standard out there that can be used in substrate pallets? (I have not come across it in the substrate ecosystem and I wonder why that is the case).&#xD;&#xA;2. Are there any hidden pitfalls that I'm unaware of? E.g certain operations not being supported by the wasm executor used in substrate?&#xD;&#xA;&#xD;&#xA;Any feedback would be appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="45239" PostHistoryTypeId="1" PostId="11081" RevisionGUID="99b2b364-2933-44b0-8d79-d95312c61713" CreationDate="2024-02-26T18:56:57.997" UserId="2099" Text="IEEE 754 Floating Point Numbers wasm impelementation" ContentLicense="CC BY-SA 4.0" />
  <row Id="45240" PostHistoryTypeId="3" PostId="11081" RevisionGUID="99b2b364-2933-44b0-8d79-d95312c61713" CreationDate="2024-02-26T18:56:57.997" UserId="2099" Text="|pallet|runtime|wasm|floating-point-math|float|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45241" PostHistoryTypeId="2" PostId="11082" RevisionGUID="aa73d4af-3ad4-45b8-9d88-ce5600bf3230" CreationDate="2024-02-26T23:29:02.813" UserId="4485" Text="I am currently exploring ways to streamline the process of interacting with contracts on the Pallet Contracts. One challenge I've encountered is the need to manually write wrapper code for contracts based on their metadata if the source code is not available.&#xD;&#xA;&#xD;&#xA;I'm curious if there are any existing tools or libraries available that can automate this task. Specifically, I'm looking for a tool that can take the contract metadata file as input and generate the corresponding wrapper ink source code.&#xD;&#xA;&#xD;&#xA;To illustrate, here's an example of what I envision for a Flipper Contract:&#xD;&#xA;&#xD;&#xA;Based on this metadata:&#xD;&#xA;```json&#xD;&#xA;{&#xD;&#xA;  &quot;source&quot;: {&#xD;&#xA;    &quot;hash&quot;: &quot;0xc60ae144a3574f51326d9613fd41aeeee3b903c0f76490a8cfb172026f15ec2a&quot;,&#xD;&#xA;    &quot;language&quot;: &quot;ink! 5.0.0-rc.1&quot;,&#xD;&#xA;    &quot;compiler&quot;: &quot;rustc 1.76.0&quot;,&#xD;&#xA;    &quot;build_info&quot;: {&#xD;&#xA;      &quot;build_mode&quot;: &quot;Debug&quot;,&#xD;&#xA;      &quot;cargo_contract_version&quot;: &quot;3.2.0&quot;,&#xD;&#xA;      &quot;rust_toolchain&quot;: &quot;stable-aarch64-apple-darwin&quot;,&#xD;&#xA;      &quot;wasm_opt_settings&quot;: {&#xD;&#xA;        &quot;keep_debug_symbols&quot;: false,&#xD;&#xA;        &quot;optimization_passes&quot;: &quot;Z&quot;&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;contract&quot;: {&#xD;&#xA;    &quot;name&quot;: &quot;flipper&quot;,&#xD;&#xA;    &quot;version&quot;: &quot;0.1.0&quot;,&#xD;&#xA;    &quot;authors&quot;: [&quot;[your_name] &lt;[your_email]&gt;&quot;]&#xD;&#xA;  },&#xD;&#xA;  &quot;spec&quot;: {&#xD;&#xA;    &quot;constructors&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;args&quot;: [&#xD;&#xA;          {&#xD;&#xA;            &quot;label&quot;: &quot;init_value&quot;,&#xD;&#xA;            &quot;type&quot;: {&#xD;&#xA;              &quot;displayName&quot;: [&quot;bool&quot;],&#xD;&#xA;              &quot;type&quot;: 0&#xD;&#xA;            }&#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        &quot;default&quot;: false,&#xD;&#xA;        &quot;docs&quot;: [&#xD;&#xA;          &quot;Constructor that initializes the `bool` value to the given `init_value`.&quot;&#xD;&#xA;        ],&#xD;&#xA;        &quot;label&quot;: &quot;new&quot;,&#xD;&#xA;        &quot;payable&quot;: false,&#xD;&#xA;        &quot;returnType&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&quot;ink_primitives&quot;, &quot;ConstructorResult&quot;],&#xD;&#xA;          &quot;type&quot;: 2&#xD;&#xA;        },&#xD;&#xA;        &quot;selector&quot;: &quot;0x9bae9d5e&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;args&quot;: [],&#xD;&#xA;        &quot;default&quot;: false,&#xD;&#xA;        &quot;docs&quot;: [&#xD;&#xA;          &quot;Constructor that initializes the `bool` value to `false`.&quot;,&#xD;&#xA;          &quot;&quot;,&#xD;&#xA;          &quot;Constructors can delegate to other constructors.&quot;&#xD;&#xA;        ],&#xD;&#xA;        &quot;label&quot;: &quot;default&quot;,&#xD;&#xA;        &quot;payable&quot;: false,&#xD;&#xA;        &quot;returnType&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&quot;ink_primitives&quot;, &quot;ConstructorResult&quot;],&#xD;&#xA;          &quot;type&quot;: 2&#xD;&#xA;        },&#xD;&#xA;        &quot;selector&quot;: &quot;0xed4b9d1b&quot;&#xD;&#xA;      }&#xD;&#xA;    ],&#xD;&#xA;    &quot;docs&quot;: [],&#xD;&#xA;    &quot;environment&quot;: {&#xD;&#xA;      &quot;accountId&quot;: {&#xD;&#xA;        &quot;displayName&quot;: [&quot;AccountId&quot;],&#xD;&#xA;        &quot;type&quot;: 6&#xD;&#xA;      },&#xD;&#xA;      &quot;balance&quot;: {&#xD;&#xA;        &quot;displayName&quot;: [&quot;Balance&quot;],&#xD;&#xA;        &quot;type&quot;: 9&#xD;&#xA;      },&#xD;&#xA;      &quot;blockNumber&quot;: {&#xD;&#xA;        &quot;displayName&quot;: [&quot;BlockNumber&quot;],&#xD;&#xA;        &quot;type&quot;: 12&#xD;&#xA;      },&#xD;&#xA;      &quot;chainExtension&quot;: {&#xD;&#xA;        &quot;displayName&quot;: [&quot;ChainExtension&quot;],&#xD;&#xA;        &quot;type&quot;: 13&#xD;&#xA;      },&#xD;&#xA;      &quot;hash&quot;: {&#xD;&#xA;        &quot;displayName&quot;: [&quot;Hash&quot;],&#xD;&#xA;        &quot;type&quot;: 10&#xD;&#xA;      },&#xD;&#xA;      &quot;maxEventTopics&quot;: 4,&#xD;&#xA;      &quot;staticBufferSize&quot;: 16384,&#xD;&#xA;      &quot;timestamp&quot;: {&#xD;&#xA;        &quot;displayName&quot;: [&quot;Timestamp&quot;],&#xD;&#xA;        &quot;type&quot;: 11&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    &quot;events&quot;: [],&#xD;&#xA;    &quot;lang_error&quot;: {&#xD;&#xA;      &quot;displayName&quot;: [&quot;ink&quot;, &quot;LangError&quot;],&#xD;&#xA;      &quot;type&quot;: 4&#xD;&#xA;    },&#xD;&#xA;    &quot;messages&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;args&quot;: [],&#xD;&#xA;        &quot;default&quot;: false,&#xD;&#xA;        &quot;docs&quot;: [&#xD;&#xA;          &quot; A message that can be called on instantiated contracts.&quot;,&#xD;&#xA;          &quot; This one flips the value of the stored `bool` from `true`&quot;,&#xD;&#xA;          &quot; to `false` and vice versa.&quot;&#xD;&#xA;        ],&#xD;&#xA;        &quot;label&quot;: &quot;flip&quot;,&#xD;&#xA;        &quot;mutates&quot;: true,&#xD;&#xA;        &quot;payable&quot;: false,&#xD;&#xA;        &quot;returnType&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&quot;ink&quot;, &quot;MessageResult&quot;],&#xD;&#xA;          &quot;type&quot;: 2&#xD;&#xA;        },&#xD;&#xA;        &quot;selector&quot;: &quot;0x633aa551&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;args&quot;: [],&#xD;&#xA;        &quot;default&quot;: false,&#xD;&#xA;        &quot;docs&quot;: [&quot; Simply returns the current value of our `bool`.&quot;],&#xD;&#xA;        &quot;label&quot;: &quot;get&quot;,&#xD;&#xA;        &quot;mutates&quot;: false,&#xD;&#xA;        &quot;payable&quot;: false,&#xD;&#xA;        &quot;returnType&quot;: {&#xD;&#xA;          &quot;displayName&quot;: [&quot;ink&quot;, &quot;MessageResult&quot;],&#xD;&#xA;          &quot;type&quot;: 5&#xD;&#xA;        },&#xD;&#xA;        &quot;selector&quot;: &quot;0x2f865bd9&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  &quot;storage&quot;: {&#xD;&#xA;    &quot;root&quot;: {&#xD;&#xA;      &quot;layout&quot;: {&#xD;&#xA;        &quot;struct&quot;: {&#xD;&#xA;          &quot;fields&quot;: [&#xD;&#xA;            {&#xD;&#xA;              &quot;layout&quot;: {&#xD;&#xA;                &quot;leaf&quot;: {&#xD;&#xA;                  &quot;key&quot;: &quot;0x00000000&quot;,&#xD;&#xA;                  &quot;ty&quot;: 0&#xD;&#xA;                }&#xD;&#xA;              },&#xD;&#xA;              &quot;name&quot;: &quot;value&quot;&#xD;&#xA;            }&#xD;&#xA;          ],&#xD;&#xA;          &quot;name&quot;: &quot;Flipper&quot;&#xD;&#xA;        }&#xD;&#xA;      },&#xD;&#xA;      &quot;root_key&quot;: &quot;0x00000000&quot;,&#xD;&#xA;      &quot;ty&quot;: 1&#xD;&#xA;    }&#xD;&#xA;  },&#xD;&#xA;  &quot;types&quot;: [&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 0,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;primitive&quot;: &quot;bool&quot;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 1,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;composite&quot;: {&#xD;&#xA;            &quot;fields&quot;: [&#xD;&#xA;              {&#xD;&#xA;                &quot;name&quot;: &quot;value&quot;,&#xD;&#xA;                &quot;type&quot;: 0,&#xD;&#xA;                &quot;typeName&quot;: &quot;&lt;bool as::ink::storage::traits::AutoStorableHint&lt;::ink::storage\n::traits::ManualKey&lt;2054318728u32, ()&gt;,&gt;&gt;::Type&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;path&quot;: [&quot;flipper&quot;, &quot;flipper&quot;, &quot;Flipper&quot;]&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 2,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;variant&quot;: {&#xD;&#xA;            &quot;variants&quot;: [&#xD;&#xA;              {&#xD;&#xA;                &quot;fields&quot;: [&#xD;&#xA;                  {&#xD;&#xA;                    &quot;type&quot;: 3&#xD;&#xA;                  }&#xD;&#xA;                ],&#xD;&#xA;                &quot;index&quot;: 0,&#xD;&#xA;                &quot;name&quot;: &quot;Ok&quot;&#xD;&#xA;              },&#xD;&#xA;              {&#xD;&#xA;                &quot;fields&quot;: [&#xD;&#xA;                  {&#xD;&#xA;                    &quot;type&quot;: 4&#xD;&#xA;                  }&#xD;&#xA;                ],&#xD;&#xA;                &quot;index&quot;: 1,&#xD;&#xA;                &quot;name&quot;: &quot;Err&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;params&quot;: [&#xD;&#xA;          {&#xD;&#xA;            &quot;name&quot;: &quot;T&quot;,&#xD;&#xA;            &quot;type&quot;: 3&#xD;&#xA;          },&#xD;&#xA;          {&#xD;&#xA;            &quot;name&quot;: &quot;E&quot;,&#xD;&#xA;            &quot;type&quot;: 4&#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        &quot;path&quot;: [&quot;Result&quot;]&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 3,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;tuple&quot;: []&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 4,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;variant&quot;: {&#xD;&#xA;            &quot;variants&quot;: [&#xD;&#xA;              {&#xD;&#xA;                &quot;index&quot;: 1,&#xD;&#xA;                &quot;name&quot;: &quot;CouldNotReadInput&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;path&quot;: [&quot;ink_primitives&quot;, &quot;LangError&quot;]&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 5,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;variant&quot;: {&#xD;&#xA;            &quot;variants&quot;: [&#xD;&#xA;              {&#xD;&#xA;                &quot;fields&quot;: [&#xD;&#xA;                  {&#xD;&#xA;                    &quot;type&quot;: 0&#xD;&#xA;                  }&#xD;&#xA;                ],&#xD;&#xA;                &quot;index&quot;: 0,&#xD;&#xA;                &quot;name&quot;: &quot;Ok&quot;&#xD;&#xA;              },&#xD;&#xA;              {&#xD;&#xA;                &quot;fields&quot;: [&#xD;&#xA;                  {&#xD;&#xA;                    &quot;type&quot;: 4&#xD;&#xA;                  }&#xD;&#xA;                ],&#xD;&#xA;                &quot;index&quot;: 1,&#xD;&#xA;                &quot;name&quot;: &quot;Err&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;params&quot;: [&#xD;&#xA;          {&#xD;&#xA;            &quot;name&quot;: &quot;T&quot;,&#xD;&#xA;            &quot;type&quot;: 0&#xD;&#xA;          },&#xD;&#xA;          {&#xD;&#xA;            &quot;name&quot;: &quot;E&quot;,&#xD;&#xA;            &quot;type&quot;: 4&#xD;&#xA;          }&#xD;&#xA;        ],&#xD;&#xA;        &quot;path&quot;: [&quot;Result&quot;]&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 6,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;composite&quot;: {&#xD;&#xA;            &quot;fields&quot;: [&#xD;&#xA;              {&#xD;&#xA;                &quot;type&quot;: 7,&#xD;&#xA;                &quot;typeName&quot;: &quot;[u8; 32]&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;path&quot;: [&quot;ink_primitives&quot;, &quot;types&quot;, &quot;AccountId&quot;]&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 7,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;array&quot;: {&#xD;&#xA;            &quot;len&quot;: 32,&#xD;&#xA;            &quot;type&quot;: 8&#xD;&#xA;          }&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 8,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;primitive&quot;: &quot;u8&quot;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 9,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;primitive&quot;: &quot;u128&quot;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 10,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;composite&quot;: {&#xD;&#xA;            &quot;fields&quot;: [&#xD;&#xA;              {&#xD;&#xA;                &quot;type&quot;: 7,&#xD;&#xA;                &quot;typeName&quot;: &quot;[u8; 32]&quot;&#xD;&#xA;              }&#xD;&#xA;            ]&#xD;&#xA;          }&#xD;&#xA;        },&#xD;&#xA;        &quot;path&quot;: [&quot;ink_primitives&quot;, &quot;types&quot;, &quot;Hash&quot;]&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 11,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;primitive&quot;: &quot;u64&quot;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 12,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;primitive&quot;: &quot;u32&quot;&#xD;&#xA;        }&#xD;&#xA;      }&#xD;&#xA;    },&#xD;&#xA;    {&#xD;&#xA;      &quot;id&quot;: 13,&#xD;&#xA;      &quot;type&quot;: {&#xD;&#xA;        &quot;def&quot;: {&#xD;&#xA;          &quot;variant&quot;: {}&#xD;&#xA;        },&#xD;&#xA;        &quot;path&quot;: [&quot;ink_env&quot;, &quot;types&quot;, &quot;NoChainExtension&quot;]&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  ],&#xD;&#xA;  &quot;version&quot;: &quot;4&quot;&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The tool should generate the following ink contract in order to be used by another contract:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std, no_main)]&#xD;&#xA;&#xD;&#xA;pub use self::wrapper::WrapperRef;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod wrapper {&#xD;&#xA;&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct Wrapper {}&#xD;&#xA;&#xD;&#xA;    impl Flipper {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new(init_value: Transaction) -&gt; Self {&#xD;&#xA;           panic!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn default() -&gt; Self {&#xD;&#xA;            panic!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn flip(&amp;mut self) {&#xD;&#xA;            panic!()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get(&amp;self) -&gt; bool {&#xD;&#xA;            panic!()&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The message implementations within the generated wrapper contract can be placeholder code, simply ensuring compilation. This wrapper serves as an interface for other contracts to interact with the on-chain contract, abstracting its logic. &#xD;&#xA;&#xD;&#xA;If anyone knows of such a tool or has developed something similar, I'd greatly appreciate any insights or recommendations you can provide.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45243" PostHistoryTypeId="1" PostId="11082" RevisionGUID="aa73d4af-3ad4-45b8-9d88-ce5600bf3230" CreationDate="2024-02-26T23:29:02.813" UserId="4485" Text="Tool for Automatic Generation of Contract Wrapper Code from Ink Metadata" ContentLicense="CC BY-SA 4.0" />
  <row Id="45244" PostHistoryTypeId="3" PostId="11082" RevisionGUID="aa73d4af-3ad4-45b8-9d88-ce5600bf3230" CreationDate="2024-02-26T23:29:02.813" UserId="4485" Text="|ink|smart-contract|pallet-contracts|metadata|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45245" PostHistoryTypeId="2" PostId="11083" RevisionGUID="1aa4420f-9223-41d2-982a-87ce1ed1d6eb" CreationDate="2024-02-26T23:58:16.950" UserId="3991" Text="&gt; But what is the value here? It can't be the SCALE-encoded storage value, can it? (for example, the value in StorageValue)&#xD;&#xA;&#xD;&#xA;The value in the KVDB is indeed the SCALE-encoded value. &#xD;&#xA;&#xD;&#xA;&gt; Otherwise how can I query the database if the key calculation includes the value which I don't even know yet? And I assume updating the value isn't supposed to change the key.&#xD;&#xA;&#xD;&#xA;When you walk the trie you're right that you don't know the value yet, or it's hash. Instead, you query by its 'storage key', which is either hardcoded e.g. for the runtime code, or the path to the information you want, e.g. &quot;PalletBalances -&gt; Balances -&gt; Address123&quot;.&#xD;&#xA;&#xD;&#xA;&gt; But on the other hand, if the trie node doesn't have the real value information, where is it stored?&#xD;&#xA;&#xD;&#xA;It's stored in the KVDB, which the trie node points to.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;You might find this lesson from PBA enlightening https://polkadot-blockchain-academy.github.io/pba-book/substrate/storage/page.html" ContentLicense="CC BY-SA 4.0" />
  <row Id="45247" PostHistoryTypeId="2" PostId="11084" RevisionGUID="c5b4ca04-712a-424b-9184-9d79b91a56d7" CreationDate="2024-02-27T00:08:14.047" UserId="3991" Text="I'm not an expert on this topic, but I expect the primary reasons there has been no effort to adopt this is &#xD;&#xA;&#xD;&#xA;1. Performance would be bad&#xD;&#xA;2. Substrate already has FixedPoint libraries which support fraction and decimal arithmetic " ContentLicense="CC BY-SA 4.0" />
  <row Id="45249" PostHistoryTypeId="2" PostId="11085" RevisionGUID="1d6fcd25-31b6-4046-b717-9b876de34866" CreationDate="2024-02-27T08:20:54.603" UserId="4556" Text="I have a custom pallet that uses the NFTs pallet for the creation of NFTs. This pallet should have its own designated collection. It will only mint there.&#xD;&#xA;&#xD;&#xA;Ideally I would like this collection to be created at initialisation of the system. How can I do this? I thought about using the on_initialize hook, but that's block and not system related, thus it doesn't feel right to me to use this hook for that purpose." ContentLicense="CC BY-SA 4.0" />
  <row Id="45251" PostHistoryTypeId="1" PostId="11085" RevisionGUID="1d6fcd25-31b6-4046-b717-9b876de34866" CreationDate="2024-02-27T08:20:54.603" UserId="4556" Text="Automatic creation of a collection in the NFTs pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="45252" PostHistoryTypeId="3" PostId="11085" RevisionGUID="1d6fcd25-31b6-4046-b717-9b876de34866" CreationDate="2024-02-27T08:20:54.603" UserId="4556" Text="|substrate-node-template|nft|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45253" PostHistoryTypeId="2" PostId="11086" RevisionGUID="505b2bd8-677c-47fb-bd11-de0f4d41434c" CreationDate="2024-02-27T08:44:07.430" UserId="4577" Text="I use Polakdot.js library to show all of my assets on the Westend testnet in my dapp.&#xD;&#xA;&#xD;&#xA;It takes around 5 seconds to load/show all my assets.&#xD;&#xA;&#xD;&#xA;For now it seems to me that this library doesn't have the function to show all assets on wallet address immediately.&#xD;&#xA;&#xD;&#xA;How i fetch all my assets from Westend:&#xD;&#xA; - fetch all assets on Westend&#xD;&#xA; - check for each asset if my balance is bigger than 0&#xD;&#xA; - show list of all assets where i have balance more than 0&#xD;&#xA;&#xD;&#xA;The problem here is that i loop every time over all the assets on the chain and check for each of them if i have any balance and that is slow.&#xD;&#xA;&#xD;&#xA;is there a way to check all the assets i have in my wallet without having to loop over all the assets on the chain ?&#xD;&#xA;&#xD;&#xA;app -&gt; https://app.dotacp.mvpworkshop.co/swap?network=westend" ContentLicense="CC BY-SA 4.0" />
  <row Id="45255" PostHistoryTypeId="1" PostId="11086" RevisionGUID="505b2bd8-677c-47fb-bd11-de0f4d41434c" CreationDate="2024-02-27T08:44:07.430" UserId="4577" Text="i need to find a faster way to load/show all my assets on Polakdot testnet Westend" ContentLicense="CC BY-SA 4.0" />
  <row Id="45256" PostHistoryTypeId="3" PostId="11086" RevisionGUID="505b2bd8-677c-47fb-bd11-de0f4d41434c" CreationDate="2024-02-27T08:44:07.430" UserId="4577" Text="|polkadot-js|polkadot|kusama|westend|test-network|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45257" PostHistoryTypeId="50" PostId="8660" RevisionGUID="2f81a45d-2983-4cbe-a99c-71812be33e0a" CreationDate="2024-02-27T10:09:26.387" UserId="-1" />
  <row Id="45258" PostHistoryTypeId="2" PostId="11087" RevisionGUID="c9da6d9d-39db-447d-aafa-cca55bd512d4" CreationDate="2024-02-27T10:21:40.910" UserId="527" Text="Not sure if I understand what you are trying to do, but if you are trying to update the chain_spec file in your client, that is wrong.&#xD;&#xA;&#xD;&#xA;The chain_spec defines your genesis block, and therefore it should never be updated. After the runtime upgrade, there is not action needed for the client (unless the new runtime enforces it, in which case you should have updated the client first).&#xD;&#xA;&#xD;&#xA;You will only have to use the new chain_spec in case you want to run a fresh chain, for example a testnet with zombienet." ContentLicense="CC BY-SA 4.0" />
  <row Id="45260" PostHistoryTypeId="5" PostId="11084" RevisionGUID="93783622-f69d-4bad-a7b4-4b04151aacde" CreationDate="2024-02-27T11:23:36.680" UserId="167" Comment="added links." Text="I'm not an expert on this topic, but I expect the primary reasons there has been no effort to adopt this is &#xD;&#xA;&#xD;&#xA;1. Performance would be bad&#xD;&#xA;2. Substrate already has FixedPoint libraries which support fraction and decimal arithmetic, such as [`sp-arithmetic`](https://paritytech.github.io/polkadot-sdk/master/sp_arithmetic/index.html). There is a [more advanced version maintained Encointer](https://github.com/encointer/substrate-fixed) as well." ContentLicense="CC BY-SA 4.0" />
  <row Id="45266" PostHistoryTypeId="2" PostId="11089" RevisionGUID="4f0331d7-cea0-4db8-af4e-2852eb53c2fa" CreationDate="2024-02-27T21:03:25.073" UserId="1966" Text="Polkadot is moving away from native execution mode and in the first step they [removed the native execution mode][1]. This means that the `--execution Native` does not work anymore which is the solution in similar questions.&#xD;&#xA;&#xD;&#xA;With the wasm-only runtime in action, how may I debug an extrinsic in a debugger **without using logs** . I tried setting a breakpoint on the corresponding line of code and also function name in both rust-lldb and rust-gdb but the breakpoints are not hit.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/pull/14387" ContentLicense="CC BY-SA 4.0" />
  <row Id="45268" PostHistoryTypeId="1" PostId="11089" RevisionGUID="4f0331d7-cea0-4db8-af4e-2852eb53c2fa" CreationDate="2024-02-27T21:03:25.073" UserId="1966" Text="How to debug an extrinsic (the runtime code) after migration to wasm-only execution in Polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45269" PostHistoryTypeId="3" PostId="11089" RevisionGUID="4f0331d7-cea0-4db8-af4e-2852eb53c2fa" CreationDate="2024-02-27T21:03:25.073" UserId="1966" Text="|runtime|wasm|debugging|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45270" PostHistoryTypeId="2" PostId="11090" RevisionGUID="f1c2bf8f-e157-4ade-ae97-fa77ccc7b4ad" CreationDate="2024-02-27T22:56:50.730" UserId="5131" Text="This is a common bottleneck when interacting with wallets in general, most wallets don't have a built-in index of all assets you hold. You can see if [Subscan API](https://support.subscan.io/) meets your needs or you'll just need to cache it locally and have a background worker to periodically refresh the data. " ContentLicense="CC BY-SA 4.0" />
  <row Id="45272" PostHistoryTypeId="50" PostId="5108" RevisionGUID="1e671343-b2bd-44e9-ac03-c50f48639d26" CreationDate="2024-02-28T00:05:05.633" UserId="-1" />
  <row Id="45283" PostHistoryTypeId="2" PostId="11093" RevisionGUID="522a0219-9234-4a4f-8fe9-4e6e6cdee3b6" CreationDate="2024-02-29T05:56:55.513" UserId="4556" Text="I managed to find a working solution of which the skeleton looks like the code below. This code is to be placed into the custom pallet.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[pallet::genesis_config]&#xD;&#xA;#[derive(frame_support::DefaultNoBound)]&#xD;&#xA;pub struct GenesisConfig&lt;T: Config&gt; {&#xD;&#xA;    // TODO: Required configuration fields here.&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;#[pallet::genesis_build]&#xD;&#xA;impl&lt;T: Config&gt; BuildGenesisConfig for GenesisConfig&lt;T&gt; {&#xD;&#xA;	fn build(&amp;self) {&#xD;&#xA;		// TODO: Initialisation code here.	&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="45285" PostHistoryTypeId="2" PostId="11094" RevisionGUID="826c775d-8160-4b7f-a036-a44fe55e4f11" CreationDate="2024-02-29T07:28:26.953" UserId="2834" Text="The way I resolved this problem is by switching away from ts-node and using tsx instead. Add tsx to your project with: `yarn add --dev tsx`&#xD;&#xA;&#xD;&#xA;Then change your script in package.json where you are using:&#xD;&#xA;&#xD;&#xA;`ts-node --skip-project node_modules/.bin/polkadot-types-from-defs ...`&#xD;&#xA;&#xD;&#xA;replace with:&#xD;&#xA;&#xD;&#xA;`tsx node_modules/.bin/polkadot-types-from-defs ...`" ContentLicense="CC BY-SA 4.0" />
  <row Id="45287" PostHistoryTypeId="50" PostId="10096" RevisionGUID="a7374ba6-94ab-4c49-b3da-06bc655dcff9" CreationDate="2024-02-29T09:07:40.910" UserId="-1" />
  <row Id="45288" PostHistoryTypeId="50" PostId="10101" RevisionGUID="110dbf29-7a33-4da5-bc43-24d10e791814" CreationDate="2024-02-29T10:03:10.357" UserId="-1" />
  <row Id="45289" PostHistoryTypeId="2" PostId="11095" RevisionGUID="a11341df-c4f1-42a7-84a3-f503cab46ccc" CreationDate="2024-02-29T13:05:27.523" UserId="2348" Text="I am using relay chain of polkadot with branch 1.1.0 of polkadot sdk.&#xD;&#xA;i have my relay chain running with era and epoch time of 2 minutes each . while changing lease period to 10 minutes and keeping lease offset 64 * DAYS i.e default lease period is showing value in minus like -7000.And when i try to add parachain with this values through parasudowraper pallet  parachain is successfully connecting and producing and finalising blocks .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;And when i change lease offset period to 2 minutes . the lease period becomes positive according to the state of blockchain . And in this case when i try to connect parachain through parasudo wrapper it is getting connected but not producing and finalising blocks.&#xD;&#xA;Can you please tell why it is behaving like that and how can i successfully connect parachain with block production and finalising &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45291" PostHistoryTypeId="1" PostId="11095" RevisionGUID="a11341df-c4f1-42a7-84a3-f503cab46ccc" CreationDate="2024-02-29T13:05:27.523" UserId="2348" Text="parachain not producing blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45292" PostHistoryTypeId="3" PostId="11095" RevisionGUID="a11341df-c4f1-42a7-84a3-f503cab46ccc" CreationDate="2024-02-29T13:05:27.523" UserId="2348" Text="|polkadot|parachain|blockchain|block-production|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45294" PostHistoryTypeId="2" PostId="11096" RevisionGUID="464289f3-967f-46d8-b3a0-46043975aae2" CreationDate="2024-02-29T17:42:29.790" UserId="555" Text="I'm working on pow substrate chain with grandpa. How can i add the grandpa validators in the running chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45296" PostHistoryTypeId="1" PostId="11096" RevisionGUID="464289f3-967f-46d8-b3a0-46043975aae2" CreationDate="2024-02-29T17:42:29.790" UserId="555" Text="How to add validators node on running chain in pow substrate chain with grandpa?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45297" PostHistoryTypeId="3" PostId="11096" RevisionGUID="464289f3-967f-46d8-b3a0-46043975aae2" CreationDate="2024-02-29T17:42:29.790" UserId="555" Text="|validator|grandpa|proof-of-work|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45298" PostHistoryTypeId="2" PostId="11097" RevisionGUID="53779798-ef83-49ed-b086-24ceb2bdb5ac" CreationDate="2024-03-01T00:33:49.393" UserId="2485" Text="In Grandpa finality protocol, blocks are finalized in chunks. Is there a limit of how many blocks can be in 1 array of blocks. Is there a way to estimate this amount?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45300" PostHistoryTypeId="1" PostId="11097" RevisionGUID="53779798-ef83-49ed-b086-24ceb2bdb5ac" CreationDate="2024-03-01T00:33:49.393" UserId="2485" Text="grandpa: maximum length of finalized blocks" ContentLicense="CC BY-SA 4.0" />
  <row Id="45301" PostHistoryTypeId="3" PostId="11097" RevisionGUID="53779798-ef83-49ed-b086-24ceb2bdb5ac" CreationDate="2024-03-01T00:33:49.393" UserId="2485" Text="|grandpa|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45302" PostHistoryTypeId="2" PostId="11098" RevisionGUID="0b2590eb-f686-4882-a6d5-47d56ea86a02" CreationDate="2024-03-01T08:05:30.480" UserId="699" Text="Following a relay runtime upgrade for westend 103000 (which contained a broken migration of the beefy keys), our chain stopped finalizing blocks (all validators, except 1, had the wrong keys on-chain).&#xD;&#xA;&#xD;&#xA;While preparing the solution, we left the relay **pass 500+ blocks of finality lag**, which &quot;forces&quot; the validator to finalize the blocks that are 500+ behind. This helped to recover the network.&#xD;&#xA;&#xD;&#xA;However, the other nodes (RPC nodes) are now refusing the finality:&#xD;&#xA;```&#xD;&#xA;2024-03-01 07:51:21.022 DEBUG tokio-runtime-worker sync::import-queue: Justification import failed for hash = 0xf27b397021806e4bccfe6e0ab3f19e768f3f0495b71187ba8aab3d63bd7dcf28 with number = 12977265 coming from node = PeerId(&quot;12D3KooWQRVQqakRuPxwLoaRHTpEaTDQSX9MqAatJ2Jgqd5aucvf&quot;) with error: Import failed: bad justification for header: invalid signature for precommit in grandpa justification&#xD;&#xA;2024-03-01 07:51:21.022  INFO tokio-runtime-worker sync:  Invalid justification provided by 12D3KooWQRVQqakRuPxwLoaRHTpEaTDQSX9MqAatJ2Jgqd5aucvf for #0xf27b…cf28&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can we **force nodes** to accept the justification or to simply consider those blocks as final ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45304" PostHistoryTypeId="1" PostId="11098" RevisionGUID="0b2590eb-f686-4882-a6d5-47d56ea86a02" CreationDate="2024-03-01T08:05:30.480" UserId="699" Text="How to recover finality after validator &quot;forced&quot; it due to high finality lag (500+ blocks)" ContentLicense="CC BY-SA 4.0" />
  <row Id="45305" PostHistoryTypeId="3" PostId="11098" RevisionGUID="0b2590eb-f686-4882-a6d5-47d56ea86a02" CreationDate="2024-03-01T08:05:30.480" UserId="699" Text="|grandpa|finality|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45306" PostHistoryTypeId="2" PostId="11099" RevisionGUID="0d47a734-f79b-4b66-8536-9ce8363734e7" CreationDate="2024-03-01T09:51:08.790" UserId="3122" Text="Prerequisites:&#xD;&#xA; 1. A small subset of validators controlled by my company and a much larger set of external validators.&#xD;&#xA; 2. A backup of the `db` folder was created 4 hours (1 epoch) before an incident.&#xD;&#xA; &#xD;&#xA;Incident:&#xD;&#xA; 1. After a runtime upgrade with missed migration, a chain has stopped producing blocks. &#xD;&#xA;&#xD;&#xA;Our plan&#xD;&#xA; 1. Set up a firewall to prevent internal validators from syncing with a corrupted state.&#xD;&#xA; 2. Restore internal validators from the backup.&#xD;&#xA; 3. Coordinate external validators to clean their state and join the internal network.&#xD;&#xA;&#xD;&#xA;Problem:&#xD;&#xA; 1. After restoring the internal validator from the backup they can produce the blocks but not finalize due to this error:&#xD;&#xA;```&#xD;&#xA;2024-02-28 14:49:04 a defensive failure has been triggered; please report the block number at https://github.com/paritytech/substrate/issues: NodeNotFound&#xD;&#xA;2024-02-28 14:49:04 [#14456580]   Failed to finalize election round. reason ElectionError::Fallback(&quot;`NoElection` cannot do anything.&quot;)&#xD;&#xA;```&#xD;&#xA; 2. We have reset `type Fallback` to on-chain execution and performed a runtime upgrade. Right after that, we called `election_multi_provider::governance_fallback` but block production stopped because of `Unexpected epoch change`.&#xD;&#xA;&#xD;&#xA;Question:&#xD;&#xA;1. Do you have any ideas on making the internal validators produce and finalize the blocks?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45308" PostHistoryTypeId="1" PostId="11099" RevisionGUID="0d47a734-f79b-4b66-8536-9ce8363734e7" CreationDate="2024-03-01T09:51:08.790" UserId="3122" Text="Recovering chain from a backup" ContentLicense="CC BY-SA 4.0" />
  <row Id="45309" PostHistoryTypeId="3" PostId="11099" RevisionGUID="0d47a734-f79b-4b66-8536-9ce8363734e7" CreationDate="2024-03-01T09:51:08.790" UserId="3122" Text="|grandpa|block-production|finality|finalization|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45310" PostHistoryTypeId="50" PostId="10110" RevisionGUID="e4f67b3b-c0f7-46c7-b83e-c48be16c806f" CreationDate="2024-03-01T10:02:50.313" UserId="-1" />
  <row Id="45311" PostHistoryTypeId="5" PostId="11098" RevisionGUID="d3c6657b-3500-46ea-b09a-00f9afef4953" CreationDate="2024-03-01T10:19:27.050" UserId="699" Comment="added 558 characters in body" Text="Following a relay runtime upgrade for westend 103000 (which contained a broken migration of the beefy keys), our chain stopped finalizing blocks (all validators, except 1, had the wrong keys on-chain).&#xD;&#xA;&#xD;&#xA;While preparing the solution, we left the relay **pass 500+ blocks of finality lag**, which &quot;forces&quot; the validator to finalize the blocks that are 500+ behind. This helped to recover the network.&#xD;&#xA;&#xD;&#xA;However, the other nodes (RPC nodes) are now refusing the finality:&#xD;&#xA;```&#xD;&#xA;2024-03-01 09:32:25.357 ERROR tokio-runtime-worker grandpa: GRANDPA voter error: safety invariant has been violated: Invalid operation in the pending changes tree: Finalized descendent of Tree node without finalizing its ancestor(s) first    &#xD;&#xA;2024-03-01 09:26:29.306 ERROR tokio-runtime-worker sc_service::task_manager: Essential task `grandpa-voter` failed. Shutting down service.    &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;(Also) On another network, with same conditions, we fixed it by using the only valid validator and note_stalled. The RPC nodes are also refusing finality:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2024-03-01 07:51:21.022 DEBUG tokio-runtime-worker sync::import-queue: Justification import failed for hash = 0xf27b397021806e4bccfe6e0ab3f19e768f3f0495b71187ba8aab3d63bd7dcf28 with number = 12977265 coming from node = PeerId(&quot;12D3KooWQRVQqakRuPxwLoaRHTpEaTDQSX9MqAatJ2Jgqd5aucvf&quot;) with error: Import failed: bad justification for header: invalid signature for precommit in grandpa justification&#xD;&#xA;2024-03-01 07:51:21.022  INFO tokio-runtime-worker sync:  Invalid justification provided by 12D3KooWQRVQqakRuPxwLoaRHTpEaTDQSX9MqAatJ2Jgqd5aucvf for #0xf27b…cf28&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How can we **force nodes** to accept the justification or to simply consider those blocks as final ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45312" PostHistoryTypeId="50" PostId="6278" RevisionGUID="c8aebb44-508b-4783-9f0b-5c5e1c37edd1" CreationDate="2024-03-01T12:03:20.350" UserId="-1" />
  <row Id="45313" PostHistoryTypeId="2" PostId="11100" RevisionGUID="052bac4b-d36e-4bc1-b8d2-27739bd983d2" CreationDate="2024-03-01T16:00:17.427" UserId="2844" Text="I would like to replace the `1u64 &lt;&lt; 60` with `x.1` since endowed_accounts is a tuple with the AccountId and the Balance so x1 in the balance for the account ids but after building when i start the node it gives me an error. Do you know why?&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air Xcavate_Node % ./target/release/node-template --dev&#xD;&#xA;    thread 'main' panicked at node/src/chain_spec.rs:110:5:&#xD;&#xA;    called `Result::unwrap()` on an `Err` value: Error(&quot;number out of range&quot;, line: 0, column: 0)&#xD;&#xA;    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air Xcavate_Node % &#xD;&#xA;&#xD;&#xA;[github_code](https://github.com/XcavateBlockchain/Xcavate_Node/blob/2868ef7a53bd6640d32e7030f047fa58bef7d924/node/src/chain_spec.rs#L113)" ContentLicense="CC BY-SA 4.0" />
  <row Id="45315" PostHistoryTypeId="1" PostId="11100" RevisionGUID="052bac4b-d36e-4bc1-b8d2-27739bd983d2" CreationDate="2024-03-01T16:00:17.427" UserId="2844" Text="number out of range on configuring balances" ContentLicense="CC BY-SA 4.0" />
  <row Id="45316" PostHistoryTypeId="3" PostId="11100" RevisionGUID="052bac4b-d36e-4bc1-b8d2-27739bd983d2" CreationDate="2024-03-01T16:00:17.427" UserId="2844" Text="|substrate-node|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45317" PostHistoryTypeId="2" PostId="11101" RevisionGUID="033a60e0-756c-4d22-95a8-b25c3d94480b" CreationDate="2024-03-01T21:53:24.227" UserId="3598" Text="After enabling async backing for our parachain, it started throwing an &quot;Invalid&quot; error every time an extrinsic is called, for example, performing a transfer or creating an asset,the strange thing is that the extrinsic succeeds, the balance is actually transferred and the asset is created.  Does anyone know why this might be?&#xD;&#xA;&#xD;&#xA;I'm testing with rococo-local.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="45319" PostHistoryTypeId="1" PostId="11101" RevisionGUID="033a60e0-756c-4d22-95a8-b25c3d94480b" CreationDate="2024-03-01T21:53:24.227" UserId="3598" Text="&quot;Invalid&quot; error thrown after enabling async backing" ContentLicense="CC BY-SA 4.0" />
  <row Id="45320" PostHistoryTypeId="3" PostId="11101" RevisionGUID="033a60e0-756c-4d22-95a8-b25c3d94480b" CreationDate="2024-03-01T21:53:24.227" UserId="3598" Text="|parachain|async-backing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45322" PostHistoryTypeId="50" PostId="10818" RevisionGUID="00aebf77-e413-45e8-8a31-84f193133df6" CreationDate="2024-03-02T06:02:51.033" UserId="-1" />
  <row Id="45323" PostHistoryTypeId="2" PostId="11102" RevisionGUID="f8f07896-c4ee-4a60-81ae-399d59509ed5" CreationDate="2024-03-02T07:48:46.093" UserId="2795" Text="I am getting this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Rust WASM toolchain not installed, please install it!&#xD;&#xA;&#xD;&#xA;  Further error information:&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;     Compiling wasm-test v1.0.0 (/var/folders/cw/dc7mkcsd6yx76lscv6w1hpcw0000gn/T/.tmp3NWr2N)&#xD;&#xA;  error[E0463]: can't find crate for `std`&#xD;&#xA;    |&#xD;&#xA;    = note: the `wasm32-unknown-unknown` target may not be installed&#xD;&#xA;    = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`&#xD;&#xA;&#xD;&#xA;  error: requires `sized` lang_item&#xD;&#xA;&#xD;&#xA;  libunwind: malformed __unwind_info at 0x18AC83CA8 bad second level page&#xD;&#xA;  error: cannot find macro `println` in this scope&#xD;&#xA;   --&gt; src/main.rs:3:5&#xD;&#xA;    |&#xD;&#xA;  3 |                 println!(&quot;{}&quot;, env!(&quot;RUSTC_VERSION&quot;));&#xD;&#xA;    |                 ^^^^^^^&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0463`.&#xD;&#xA;  libunwind: malformed __unwind_info at 0x18AC83CA8 bad second level page&#xD;&#xA;  error: could not compile `wasm-test` (lib) due to 2 previous errors&#xD;&#xA;  warning: build failed, waiting for other jobs to finish...&#xD;&#xA;  error: could not compile `wasm-test` (bin &quot;wasm-test&quot;) due to 3 previous errors&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Any suggestion for fix?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45325" PostHistoryTypeId="1" PostId="11102" RevisionGUID="f8f07896-c4ee-4a60-81ae-399d59509ed5" CreationDate="2024-03-02T07:48:46.093" UserId="2795" Text="Build error on substrate-node-template with missing target" ContentLicense="CC BY-SA 4.0" />
  <row Id="45326" PostHistoryTypeId="3" PostId="11102" RevisionGUID="f8f07896-c4ee-4a60-81ae-399d59509ed5" CreationDate="2024-03-02T07:48:46.093" UserId="2795" Text="|substrate-node-template|rust|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45327" PostHistoryTypeId="5" PostId="11102" RevisionGUID="8bdc123f-7d96-427f-882b-4688c22cfe9b" CreationDate="2024-03-02T08:05:40.420" UserId="2795" Comment="Added the target installation step" Text="I am getting this error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Rust WASM toolchain not installed, please install it!&#xD;&#xA;&#xD;&#xA;  Further error information:&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;     Compiling wasm-test v1.0.0 (/var/folders/cw/dc7mkcsd6yx76lscv6w1hpcw0000gn/T/.tmp3NWr2N)&#xD;&#xA;  error[E0463]: can't find crate for `std`&#xD;&#xA;    |&#xD;&#xA;    = note: the `wasm32-unknown-unknown` target may not be installed&#xD;&#xA;    = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`&#xD;&#xA;&#xD;&#xA;  error: requires `sized` lang_item&#xD;&#xA;&#xD;&#xA;  libunwind: malformed __unwind_info at 0x18AC83CA8 bad second level page&#xD;&#xA;  error: cannot find macro `println` in this scope&#xD;&#xA;   --&gt; src/main.rs:3:5&#xD;&#xA;    |&#xD;&#xA;  3 |                 println!(&quot;{}&quot;, env!(&quot;RUSTC_VERSION&quot;));&#xD;&#xA;    |                 ^^^^^^^&#xD;&#xA;&#xD;&#xA;  For more information about this error, try `rustc --explain E0463`.&#xD;&#xA;  libunwind: malformed __unwind_info at 0x18AC83CA8 bad second level page&#xD;&#xA;  error: could not compile `wasm-test` (lib) due to 2 previous errors&#xD;&#xA;  warning: build failed, waiting for other jobs to finish...&#xD;&#xA;  error: could not compile `wasm-test` (bin &quot;wasm-test&quot;) due to 3 previous errors&#xD;&#xA;  ------------------------------------------------------------&#xD;&#xA;&#xD;&#xA;warning: build failed, waiting for other jobs to finish...&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have already installed the target. But still getting the same error.&#xD;&#xA;&#xD;&#xA;Any suggestion for fix?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45328" PostHistoryTypeId="50" PostId="8948" RevisionGUID="c17af299-4a83-48ce-8f17-4bcbd227dcb4" CreationDate="2024-03-02T10:03:25.367" UserId="-1" />
  <row Id="45329" PostHistoryTypeId="6" PostId="11100" RevisionGUID="0434e08a-456f-4192-99c5-ab9612864672" CreationDate="2024-03-02T12:01:11.110" UserId="2844" Comment="edited tags" Text="|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45330" PostHistoryTypeId="2" PostId="11103" RevisionGUID="3e42d21d-c488-448f-becb-4ac18e0063f8" CreationDate="2024-03-02T12:45:29.470" UserId="270" Text="Some related doc: https://paritytech.github.io/polkadot-sdk/master/substrate_wasm_builder/index.html#prerequisites&#xD;&#xA;&#xD;&#xA;Copy pasted for history:&#xD;&#xA;&#xD;&#xA;Wasm builder requires the following prerequisites for building the Wasm binary:&#xD;&#xA;&#xD;&#xA;- rust nightly + wasm32-unknown-unknown toolchain&#xD;&#xA;&#xD;&#xA;or&#xD;&#xA;&#xD;&#xA;- rust stable and version at least 1.68.0 + wasm32-unknown-unknown toolchain&#xD;&#xA;&#xD;&#xA;If a specific rust is installed with rustup, it is important that the wasm target is installed as well. For example if installing the rust from 20.02.2020 using rustup install nightly-2020-02-20, the wasm target needs to be installed as well rustup target add wasm32-unknown-unknown --toolchain nightly-2020-02-20" ContentLicense="CC BY-SA 4.0" />
  <row Id="45332" PostHistoryTypeId="50" PostId="10936" RevisionGUID="6f029a56-cfe0-4acc-aafb-98f5d564c733" CreationDate="2024-03-02T17:04:30.483" UserId="-1" />
  <row Id="45333" PostHistoryTypeId="2" PostId="11104" RevisionGUID="04509b03-6ca4-4451-9373-912205e4649d" CreationDate="2024-03-02T18:16:27.493" UserId="2795" Text="I ensured `wasm32-unknown-unknown` target is installed in my system. But, still it had issues. Then, I just reinstalled `rustup`. I think something might have messed-up due to switching channels." ContentLicense="CC BY-SA 4.0" />
  <row Id="45335" PostHistoryTypeId="2" PostId="11105" RevisionGUID="81154a39-781b-4757-9496-b248c34f3b0e" CreationDate="2024-03-03T07:46:48.250" UserId="555" Text="I'm working on the pow substrate chain with grandpa. For that I integrate the pallet-session and substrate-validator-set[https://github.com/gautamdhameja/substrate-validator-set/tree/master] to join the grandpa validators on running chain. But after adding these, If I run my chain locally it get stop after 19 blocks. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Possible cause:&#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;	pub const Period: u32 = 2 * MINUTES;&#xD;&#xA;	pub const Offset: u32 = 0;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_session::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type ValidatorId = &lt;Self as frame_system::Config&gt;::AccountId;&#xD;&#xA;	type ValidatorIdOf = validator_set::ValidatorOf&lt;Self&gt;;&#xD;&#xA;	type ShouldEndSession = pallet_session::PeriodicSessions&lt;Period, Offset&gt;;&#xD;&#xA;	type NextSessionRotation = pallet_session::PeriodicSessions&lt;Period, Offset&gt;;&#xD;&#xA;	type SessionManager = ValidatorSet;&#xD;&#xA;	type SessionHandler = &lt;opaque::SessionKeys as OpaqueKeys&gt;::KeyTypeIdProviders;&#xD;&#xA;	type Keys = opaque::SessionKeys;&#xD;&#xA;	type WeightInfo = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;If i increase the timing of `Period ` variable then it effect the timing of running chain and then stop.&#xD;&#xA;&#xD;&#xA;How to solve this?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45337" PostHistoryTypeId="1" PostId="11105" RevisionGUID="81154a39-781b-4757-9496-b248c34f3b0e" CreationDate="2024-03-03T07:46:48.250" UserId="555" Text="chain stop producing block after adding pallet-session" ContentLicense="CC BY-SA 4.0" />
  <row Id="45338" PostHistoryTypeId="3" PostId="11105" RevisionGUID="81154a39-781b-4757-9496-b248c34f3b0e" CreationDate="2024-03-03T07:46:48.250" UserId="555" Text="|pallet|parachain|validator|session|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45339" PostHistoryTypeId="5" PostId="11100" RevisionGUID="8bff6f2d-f81e-44c3-83eb-c5fbacc43b57" CreationDate="2024-03-03T08:46:32.370" UserId="2844" Comment="added 7 characters in body" Text="I would like to replace the `1u64 &lt;&lt; 60` with `x.1` since endowed_accounts is a tuple with the AccountId and the Balance so x1 in the balance for the account ids but after building when i start the node it gives me an error. Someone please help us.&#xD;&#xA;&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air Xcavate_Node % ./target/release/node-template --dev&#xD;&#xA;    thread 'main' panicked at node/src/chain_spec.rs:110:5:&#xD;&#xA;    called `Result::unwrap()` on an `Err` value: Error(&quot;number out of range&quot;, line: 0, column: 0)&#xD;&#xA;    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace&#xD;&#xA;    ganesholi@Ganeshs-MacBook-Air Xcavate_Node % &#xD;&#xA;&#xD;&#xA;[github_code](https://github.com/XcavateBlockchain/Xcavate_Node/blob/2868ef7a53bd6640d32e7030f047fa58bef7d924/node/src/chain_spec.rs#L113)" ContentLicense="CC BY-SA 4.0" />
  <row Id="45340" PostHistoryTypeId="2" PostId="11106" RevisionGUID="bc740cdd-2995-40f4-b8cd-607532782021" CreationDate="2024-03-03T17:30:40.077" UserId="5196" Text="On the first step after the prerequesites we are supposed to create a test pallet (https://docs.substrate.io/tutorials/collectibles-workshop/03-create-pallet/) ... for that we need to update the dependencies like so &#xD;&#xA;[dependencies]&#xD;&#xA;frame-support = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot;}&#xD;&#xA;frame-system = { default-features = false, version = &quot;4.0.0-dev&quot;, git = &quot;https://github.com/paritytech/polkadot-sdk.git&quot;, branch = &quot;polkadot-v1.0.0&quot; }&#xD;&#xA;&#xD;&#xA;but the thing is that there is no such branch polkadot-v1.0.0 . The only thing close to it that i found was a tag for the release polkadot-v1.1.0. But when i build the pallet I'm getting tons of compiler errors. e.g. error[E0658]: use of unstable library feature 'stdsimd'. Any ideas anyone how to build the test pallet. How did you do it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45342" PostHistoryTypeId="1" PostId="11106" RevisionGUID="bc740cdd-2995-40f4-b8cd-607532782021" CreationDate="2024-03-03T17:30:40.077" UserId="5196" Text="Pallet compilations of collectibles workshop fails due to non-existing branch" ContentLicense="CC BY-SA 4.0" />
  <row Id="45343" PostHistoryTypeId="3" PostId="11106" RevisionGUID="bc740cdd-2995-40f4-b8cd-607532782021" CreationDate="2024-03-03T17:30:40.077" UserId="5196" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45344" PostHistoryTypeId="2" PostId="11107" RevisionGUID="9476979c-20ac-4712-9f63-950b28462084" CreationDate="2024-03-03T18:53:06.263" UserId="372" Text="The relevant part of the error message for you is `supplied author is not eligible`. This means that the nimbus key your node is using is not eligible to author in this slot according to the runtime.&#xD;&#xA;&#xD;&#xA;Are you using alicce or some custom keys? Have you inserted them into the node's keystore when starting it? What pallets are you using to select authors and what are their genesis configs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45346" PostHistoryTypeId="2" PostId="11108" RevisionGUID="a5bf95b7-9b66-49f3-be64-44ca1026e635" CreationDate="2024-03-03T20:03:41.743" UserId="4420" Text="My goal is to be able to see the discover, incoming connection, and accepting connection in the parachain network, which I'm guessing should update the Idle 0 Peers to 1 Peer.&#xD;&#xA;I'm still currently trying to fix this issue. If theres anything else that you need from me, please let me know!&#xD;&#xA;&#xD;&#xA;This is my parachain terminal command. './target/release/polkadot-parachain --chain customSpecRaw.json --tmp --rpc-cors all --port 4003 --unsafe-rpc-external --rpc-methods=unsafe --collator --detailed-log-output --reserved-only --sync=fast-unsafe -l peerset=trace' &#xD;&#xA;&#xD;&#xA;This is my express block of codes that I'm creating the node through js-libp2p. &#xD;&#xA;   &#xD;&#xA;const options = {&#xD;&#xA;&#xD;&#xA;       peerId: peerId,&#xD;&#xA;       addresses: {&#xD;&#xA;           listen: ['/ip4/192.168.1.203/tcp/9944/ws']&#xD;&#xA;       },&#xD;&#xA;       transports: [&#xD;&#xA;         tcp(),&#xD;&#xA;         webSockets(),&#xD;&#xA;         circuitRelayTransport({&#xD;&#xA;           discoverRelays: 2,&#xD;&#xA;         })&#xD;&#xA;       ],&#xD;&#xA;       connectionEncryption: [noise()],&#xD;&#xA;       streamMuxers: [yamux(), mplex()],&#xD;&#xA;       dht: kadDHT(),&#xD;&#xA;       peerDiscovery: [&#xD;&#xA;           mdns(),&#xD;&#xA;           pubsubPeerDiscovery(),&#xD;&#xA;           bootstrap({&#xD;&#xA;               list: bootstrapNodes&#xD;&#xA;           }),&#xD;&#xA;       ],&#xD;&#xA;       services: {&#xD;&#xA;           identify: identify(),&#xD;&#xA;           ping: ping({&#xD;&#xA;               protocolPrefix: 'ipfs',&#xD;&#xA;           }),&#xD;&#xA;           dht: kadDHT({&#xD;&#xA;               kBucketSize: 20,&#xD;&#xA;               clientMode: false,&#xD;&#xA;               broadcast: true,&#xD;&#xA;           }),&#xD;&#xA;           relay: circuitRelayServer(),&#xD;&#xA;           pubsub: gossipsub({&#xD;&#xA;               allowPublishToZeroPeers: true,&#xD;&#xA;               emitSelf: true,&#xD;&#xA;               floodPublish: false,&#xD;&#xA;               gossipIncoming: true,&#xD;&#xA;               doPX: false,&#xD;&#xA;               directPeers: gossipPeers,&#xD;&#xA;               allowedTopics: 'Login'&#xD;&#xA;           })&#xD;&#xA;       },&#xD;&#xA;       config: {&#xD;&#xA;           dht: {&#xD;&#xA;               kBucketSize: 20,&#xD;&#xA;               enabled: true,&#xD;&#xA;               randomWalk: {&#xD;&#xA;                 enabled: true,&#xD;&#xA;                 interval: 300e3,&#xD;&#xA;                 timeout: 10e3&#xD;&#xA;               }&#xD;&#xA;           },&#xD;&#xA;           pubsub: {&#xD;&#xA;               enabled: true,&#xD;&#xA;               emitSelf: false,&#xD;&#xA;           },&#xD;&#xA;           relay: {&#xD;&#xA;               enabled: true,      &#xD;&#xA;               hop: {&#xD;&#xA;               enabled: true,    &#xD;&#xA;               active: true      &#xD;&#xA;               }&#xD;&#xA;           },&#xD;&#xA;           autoNAT: {&#xD;&#xA;               enabled: true,&#xD;&#xA;           },&#xD;&#xA;       },&#xD;&#xA;       connectionManager: {&#xD;&#xA;           autoDial: true,&#xD;&#xA;           maxConnections: 50,&#xD;&#xA;           minConnections: 10,&#xD;&#xA;       },&#xD;&#xA;   }&#xD;&#xA;   &#xD;&#xA;   const node = await createLibp2p(options);&#xD;&#xA;&#xD;&#xA;   node.addEventListener('peer:discovery', async (event) =&gt; {     &#xD;&#xA;     const peerInfo = event.detail;&#xD;&#xA;     console.log(&quot;New peer discovered&quot;, peerInfo.id.toString());&#xD;&#xA;&#xD;&#xA;    const rpcUrl = 'http://127.0.0.1:9944';&#xD;&#xA;      &#xD;&#xA;      const body = JSON.stringify({&#xD;&#xA;        jsonrpc: '2.0',&#xD;&#xA;        method: 'system_addReservedPeer',&#xD;&#xA;        params: [&#xD;&#xA;          `/ip4/192.168.1.203/tcp/4003/ws/p2p/${peerId}`&#xD;&#xA;        ],&#xD;&#xA;        id: 2&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;      const response = await fetch(rpcUrl, {&#xD;&#xA;        method: 'POST',&#xD;&#xA;        headers: {&#xD;&#xA;          'Content-Type': 'application/json'&#xD;&#xA;        },&#xD;&#xA;        body&#xD;&#xA;      });&#xD;&#xA;   })&#xD;&#xA;&#xD;&#xA;   node.addEventListener('peer:connect', async (event) =&gt; {&#xD;&#xA;     console.log('peer connect', event.detail)&#xD;&#xA;   })&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   await node.start();&#xD;&#xA; }&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45348" PostHistoryTypeId="1" PostId="11108" RevisionGUID="a5bf95b7-9b66-49f3-be64-44ca1026e635" CreationDate="2024-03-03T20:03:41.743" UserId="4420" Text="I'm trying to connect my node to the parachain that im logging in with on my express backend" ContentLicense="CC BY-SA 4.0" />
  <row Id="45349" PostHistoryTypeId="3" PostId="11108" RevisionGUID="a5bf95b7-9b66-49f3-be64-44ca1026e635" CreationDate="2024-03-03T20:03:41.743" UserId="4420" Text="|rococo|nodes|json-rpc|libp2p|peers|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45350" PostHistoryTypeId="5" PostId="11108" RevisionGUID="251ddc77-e656-44ea-bec3-268c4b6a2838" CreationDate="2024-03-03T20:06:25.240" UserId="4420" Comment="added 2409 characters in body" Text="My goal is to be able to see the discover, incoming connection, and accepting connection in the parachain network, which I'm guessing should update the Idle 0 Peers to 1 Peer.&#xD;&#xA;I'm still currently trying to fix this issue. If theres anything else that you need from me, please let me know!&#xD;&#xA;&#xD;&#xA;This is my parachain terminal command. './target/release/polkadot-parachain --chain customSpecRaw.json --tmp --rpc-cors all --port 4003 --unsafe-rpc-external --rpc-methods=unsafe --collator --detailed-log-output --reserved-only --sync=fast-unsafe -l peerset=trace' &#xD;&#xA;&#xD;&#xA;This is the result of me trying to connect the node to the polkadot-parachain: &#xD;&#xA;&#xD;&#xA;2024-03-02 19:17:21.748 TRACE tokio-runtime-worker peerset: [Parachain] Adding reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0).&#xD;&#xA;2024-03-02 19:17:21.749 TRACE tokio-runtime-worker peerset: [Parachain] Connecting to 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0) (0/8 num_out/max_out).&#xD;&#xA;2024-03-02 19:17:21.750 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:21.750 TRACE tokio-runtime-worker peerset: [Parachain] Adding a new known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6.&#xD;&#xA;2024-03-02 19:17:21.750 TRACE tokio-runtime-worker peerset: [Parachain] Trying to add an already known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6, bumping last_updated.&#xD;&#xA;2024-03-02 19:17:21.759 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:21.769 TRACE tokio-runtime-worker peerset: [Parachain] Reserved peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 (Outbound) dropped from SetId(0).&#xD;&#xA;2024-03-02 19:17:21.769 TRACE tokio-runtime-worker peerset: [Parachain] Peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 disconnected, reputation: -256 to -256&#xD;&#xA;2024-03-02 19:17:21.899 TRACE tokio-runtime-worker peerset: [Parachain] Connecting to 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0) (0/8 num_out/max_out).&#xD;&#xA;2024-03-02 19:17:22.067 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:22.077 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:22.105 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:22.193 TRACE tokio-runtime-worker peerset: [Parachain] Trying to add an already known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6, bumping last_updated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is my express block of codes that I'm creating the node through js-libp2p. &#xD;&#xA;   &#xD;&#xA;const options = {&#xD;&#xA;&#xD;&#xA;       peerId: peerId,&#xD;&#xA;       addresses: {&#xD;&#xA;           listen: ['/ip4/192.168.1.203/tcp/9944/ws']&#xD;&#xA;       },&#xD;&#xA;       transports: [&#xD;&#xA;         tcp(),&#xD;&#xA;         webSockets(),&#xD;&#xA;         circuitRelayTransport({&#xD;&#xA;           discoverRelays: 2,&#xD;&#xA;         })&#xD;&#xA;       ],&#xD;&#xA;       connectionEncryption: [noise()],&#xD;&#xA;       streamMuxers: [yamux(), mplex()],&#xD;&#xA;       dht: kadDHT(),&#xD;&#xA;       peerDiscovery: [&#xD;&#xA;           mdns(),&#xD;&#xA;           pubsubPeerDiscovery(),&#xD;&#xA;           bootstrap({&#xD;&#xA;               list: bootstrapNodes&#xD;&#xA;           }),&#xD;&#xA;       ],&#xD;&#xA;       services: {&#xD;&#xA;           identify: identify(),&#xD;&#xA;           ping: ping({&#xD;&#xA;               protocolPrefix: 'ipfs',&#xD;&#xA;           }),&#xD;&#xA;           dht: kadDHT({&#xD;&#xA;               kBucketSize: 20,&#xD;&#xA;               clientMode: false,&#xD;&#xA;               broadcast: true,&#xD;&#xA;           }),&#xD;&#xA;           relay: circuitRelayServer(),&#xD;&#xA;           pubsub: gossipsub({&#xD;&#xA;               allowPublishToZeroPeers: true,&#xD;&#xA;               emitSelf: true,&#xD;&#xA;               floodPublish: false,&#xD;&#xA;               gossipIncoming: true,&#xD;&#xA;               doPX: false,&#xD;&#xA;               directPeers: gossipPeers,&#xD;&#xA;               allowedTopics: 'Login'&#xD;&#xA;           })&#xD;&#xA;       },&#xD;&#xA;       config: {&#xD;&#xA;           dht: {&#xD;&#xA;               kBucketSize: 20,&#xD;&#xA;               enabled: true,&#xD;&#xA;               randomWalk: {&#xD;&#xA;                 enabled: true,&#xD;&#xA;                 interval: 300e3,&#xD;&#xA;                 timeout: 10e3&#xD;&#xA;               }&#xD;&#xA;           },&#xD;&#xA;           pubsub: {&#xD;&#xA;               enabled: true,&#xD;&#xA;               emitSelf: false,&#xD;&#xA;           },&#xD;&#xA;           relay: {&#xD;&#xA;               enabled: true,      &#xD;&#xA;               hop: {&#xD;&#xA;               enabled: true,    &#xD;&#xA;               active: true      &#xD;&#xA;               }&#xD;&#xA;           },&#xD;&#xA;           autoNAT: {&#xD;&#xA;               enabled: true,&#xD;&#xA;           },&#xD;&#xA;       },&#xD;&#xA;       connectionManager: {&#xD;&#xA;           autoDial: true,&#xD;&#xA;           maxConnections: 50,&#xD;&#xA;           minConnections: 10,&#xD;&#xA;       },&#xD;&#xA;   }&#xD;&#xA;   &#xD;&#xA;   const node = await createLibp2p(options);&#xD;&#xA;&#xD;&#xA;   node.addEventListener('peer:discovery', async (event) =&gt; {     &#xD;&#xA;     const peerInfo = event.detail;&#xD;&#xA;     console.log(&quot;New peer discovered&quot;, peerInfo.id.toString());&#xD;&#xA;&#xD;&#xA;    const rpcUrl = 'http://127.0.0.1:9944';&#xD;&#xA;      &#xD;&#xA;      const body = JSON.stringify({&#xD;&#xA;        jsonrpc: '2.0',&#xD;&#xA;        method: 'system_addReservedPeer',&#xD;&#xA;        params: [&#xD;&#xA;          `/ip4/192.168.1.203/tcp/4003/ws/p2p/${peerId}`&#xD;&#xA;        ],&#xD;&#xA;        id: 2&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;      const response = await fetch(rpcUrl, {&#xD;&#xA;        method: 'POST',&#xD;&#xA;        headers: {&#xD;&#xA;          'Content-Type': 'application/json'&#xD;&#xA;        },&#xD;&#xA;        body&#xD;&#xA;      });&#xD;&#xA;   })&#xD;&#xA;&#xD;&#xA;   node.addEventListener('peer:connect', async (event) =&gt; {&#xD;&#xA;     console.log('peer connect', event.detail)&#xD;&#xA;   })&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   await node.start();&#xD;&#xA; }&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45351" PostHistoryTypeId="5" PostId="11108" RevisionGUID="4961624a-265c-42d2-9aac-bd1ecd51c209" CreationDate="2024-03-03T20:08:30.253" UserId="4420" Comment="added 4 characters in body" Text="My goal is to be able to see the discover, incoming connection, and accepting connection in the parachain network, which I'm guessing should update the Idle 0 Peers to 1 Peer.&#xD;&#xA;I'm still currently trying to fix this issue. If theres anything else that you need from me, please let me know!&#xD;&#xA;&#xD;&#xA;This is my parachain terminal command. './target/release/polkadot-parachain --chain customSpecRaw.json --tmp --rpc-cors all --port 4003 --unsafe-rpc-external --rpc-methods=unsafe --collator --detailed-log-output --reserved-only --sync=fast-unsafe -l peerset=trace' &#xD;&#xA;&#xD;&#xA;This is the result of me trying to connect the node to the polkadot-parachain: &#xD;&#xA;&#xD;&#xA;2024-03-02 19:17:21.748 TRACE tokio-runtime-worker peerset: [Parachain] Adding reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0).&#xD;&#xA;2024-03-02 19:17:21.749 TRACE tokio-runtime-worker peerset: [Parachain] Connecting to 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0) (0/8 num_out/max_out).&#xD;&#xA;2024-03-02 19:17:21.750 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:21.750 TRACE tokio-runtime-worker peerset: [Parachain] Adding a new known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6.&#xD;&#xA;2024-03-02 19:17:21.750 TRACE tokio-runtime-worker peerset: [Parachain] Trying to add an already known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6, bumping last_updated.&#xD;&#xA;2024-03-02 19:17:21.759 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:21.769 TRACE tokio-runtime-worker peerset: [Parachain] Reserved peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 (Outbound) dropped from SetId(0).&#xD;&#xA;2024-03-02 19:17:21.769 TRACE tokio-runtime-worker peerset: [Parachain] Peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 disconnected, reputation: -256 to -256&#xD;&#xA;2024-03-02 19:17:21.899 TRACE tokio-runtime-worker peerset: [Parachain] Connecting to 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0) (0/8 num_out/max_out).&#xD;&#xA;2024-03-02 19:17:22.067 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:22.077 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:22.105 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:22.193 TRACE tokio-runtime-worker peerset: [Parachain] Trying to add an already known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6, bumping last_updated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is my express block of codes that I'm creating the node through js-libp2p. &#xD;&#xA;   &#xD;&#xA;const options = {&#xD;&#xA;&#xD;&#xA;       peerId: peerId,&#xD;&#xA;       addresses: {&#xD;&#xA;           listen: ['/ip4/192.168.1.203/tcp/9944/ws']&#xD;&#xA;       },&#xD;&#xA;       transports: [&#xD;&#xA;         tcp(),&#xD;&#xA;         webSockets(),&#xD;&#xA;         circuitRelayTransport({&#xD;&#xA;           discoverRelays: 2,&#xD;&#xA;         })&#xD;&#xA;       ],&#xD;&#xA;       connectionEncryption: [noise()],&#xD;&#xA;       streamMuxers: [yamux(), mplex()],&#xD;&#xA;       dht: kadDHT(),&#xD;&#xA;       peerDiscovery: [&#xD;&#xA;           mdns(),&#xD;&#xA;           pubsubPeerDiscovery(),&#xD;&#xA;           bootstrap({&#xD;&#xA;               list: bootstrapNodes&#xD;&#xA;           }),&#xD;&#xA;       ],&#xD;&#xA;       services: {&#xD;&#xA;           identify: identify(),&#xD;&#xA;           ping: ping({&#xD;&#xA;               protocolPrefix: 'ipfs',&#xD;&#xA;           }),&#xD;&#xA;           dht: kadDHT({&#xD;&#xA;               kBucketSize: 20,&#xD;&#xA;               clientMode: false,&#xD;&#xA;               broadcast: true,&#xD;&#xA;           }),&#xD;&#xA;           relay: circuitRelayServer(),&#xD;&#xA;           pubsub: gossipsub({&#xD;&#xA;               allowPublishToZeroPeers: true,&#xD;&#xA;               emitSelf: true,&#xD;&#xA;               floodPublish: false,&#xD;&#xA;               gossipIncoming: true,&#xD;&#xA;               doPX: false,&#xD;&#xA;               directPeers: gossipPeers,&#xD;&#xA;               allowedTopics: 'Login'&#xD;&#xA;           })&#xD;&#xA;       },&#xD;&#xA;       config: {&#xD;&#xA;           dht: {&#xD;&#xA;               kBucketSize: 20,&#xD;&#xA;               enabled: true,&#xD;&#xA;               randomWalk: {&#xD;&#xA;                 enabled: true,&#xD;&#xA;                 interval: 300e3,&#xD;&#xA;                 timeout: 10e3&#xD;&#xA;               }&#xD;&#xA;           },&#xD;&#xA;           pubsub: {&#xD;&#xA;               enabled: true,&#xD;&#xA;               emitSelf: false,&#xD;&#xA;           },&#xD;&#xA;           relay: {&#xD;&#xA;               enabled: true,      &#xD;&#xA;               hop: {&#xD;&#xA;               enabled: true,    &#xD;&#xA;               active: true      &#xD;&#xA;               }&#xD;&#xA;           },&#xD;&#xA;           autoNAT: {&#xD;&#xA;               enabled: true,&#xD;&#xA;           },&#xD;&#xA;       },&#xD;&#xA;       connectionManager: {&#xD;&#xA;           autoDial: true,&#xD;&#xA;           maxConnections: 50,&#xD;&#xA;           minConnections: 10,&#xD;&#xA;       },&#xD;&#xA;   }&#xD;&#xA;   &#xD;&#xA;   const node = await createLibp2p(options);&#xD;&#xA;&#xD;&#xA;   node.addEventListener('peer:discovery', async (event) =&gt; {  &#xD;&#xA;   &#xD;&#xA;     const peerInfo = event.detail;&#xD;&#xA;     console.log(&quot;New peer discovered&quot;, peerInfo.id.toString());&#xD;&#xA;&#xD;&#xA;    const rpcUrl = 'http://127.0.0.1:9944';&#xD;&#xA;      &#xD;&#xA;      const body = JSON.stringify({&#xD;&#xA;        jsonrpc: '2.0',&#xD;&#xA;        method: 'system_addReservedPeer',&#xD;&#xA;        params: [&#xD;&#xA;          `/ip4/192.168.1.203/tcp/4003/ws/p2p/${peerId}`&#xD;&#xA;        ],&#xD;&#xA;        id: 2&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;      const response = await fetch(rpcUrl, {&#xD;&#xA;        method: 'POST',&#xD;&#xA;        headers: {&#xD;&#xA;          'Content-Type': 'application/json'&#xD;&#xA;        },&#xD;&#xA;        body&#xD;&#xA;      });&#xD;&#xA;   })&#xD;&#xA;&#xD;&#xA;   node.addEventListener('peer:connect', async (event) =&gt; {&#xD;&#xA;&#xD;&#xA;     console.log('peer connect', event.detail)&#xD;&#xA;   })&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   await node.start();&#xD;&#xA; }&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45352" PostHistoryTypeId="5" PostId="11108" RevisionGUID="d44a8c4b-b056-4756-ba1e-f22c126fda48" CreationDate="2024-03-03T20:15:55.250" UserId="4420" Comment="deleted 35 characters in body" Text="My goal is to be able to see the discover, incoming connection, and accepting connection in the parachain network, which I'm guessing should update the Idle 0 Peers to 1 Peer.&#xD;&#xA;I'm still currently trying to fix this issue. If theres anything else that you need from me, please let me know!&#xD;&#xA;&#xD;&#xA;This is my parachain terminal command. './target/release/polkadot-parachain --chain customSpecRaw.json --tmp --rpc-cors all --port 4003 --unsafe-rpc-external --rpc-methods=unsafe --collator --detailed-log-output -l peerset=trace' &#xD;&#xA;&#xD;&#xA;This is the result of me trying to connect the node to the polkadot-parachain: &#xD;&#xA;&#xD;&#xA;2024-03-02 19:17:21.748 TRACE tokio-runtime-worker peerset: [Parachain] Adding reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0).&#xD;&#xA;2024-03-02 19:17:21.749 TRACE tokio-runtime-worker peerset: [Parachain] Connecting to 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0) (0/8 num_out/max_out).&#xD;&#xA;2024-03-02 19:17:21.750 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:21.750 TRACE tokio-runtime-worker peerset: [Parachain] Adding a new known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6.&#xD;&#xA;2024-03-02 19:17:21.750 TRACE tokio-runtime-worker peerset: [Parachain] Trying to add an already known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6, bumping last_updated.&#xD;&#xA;2024-03-02 19:17:21.759 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:21.769 TRACE tokio-runtime-worker peerset: [Parachain] Reserved peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 (Outbound) dropped from SetId(0).&#xD;&#xA;2024-03-02 19:17:21.769 TRACE tokio-runtime-worker peerset: [Parachain] Peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 disconnected, reputation: -256 to -256&#xD;&#xA;2024-03-02 19:17:21.899 TRACE tokio-runtime-worker peerset: [Parachain] Connecting to 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 on SetId(0) (0/8 num_out/max_out).&#xD;&#xA;2024-03-02 19:17:22.067 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:22.077 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:22.105 WARN tokio-runtime-worker peerset: [Parachain] Trying to add an already reserved node 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6 as reserved on SetId(0).&#xD;&#xA;2024-03-02 19:17:22.193 TRACE tokio-runtime-worker peerset: [Parachain] Trying to add an already known peer 12D3KooWMi8BPM372mzMjtsiKjgHMDiSYFFgmJ58U8AeVsQNXAP6, bumping last_updated.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This is my express block of codes that I'm creating the node through js-libp2p. &#xD;&#xA;   &#xD;&#xA;const options = {&#xD;&#xA;&#xD;&#xA;       peerId: peerId,&#xD;&#xA;       addresses: {&#xD;&#xA;           listen: ['/ip4/192.168.1.203/tcp/9944/ws']&#xD;&#xA;       },&#xD;&#xA;       transports: [&#xD;&#xA;         tcp(),&#xD;&#xA;         webSockets(),&#xD;&#xA;         circuitRelayTransport({&#xD;&#xA;           discoverRelays: 2,&#xD;&#xA;         })&#xD;&#xA;       ],&#xD;&#xA;       connectionEncryption: [noise()],&#xD;&#xA;       streamMuxers: [yamux(), mplex()],&#xD;&#xA;       dht: kadDHT(),&#xD;&#xA;       peerDiscovery: [&#xD;&#xA;           mdns(),&#xD;&#xA;           pubsubPeerDiscovery(),&#xD;&#xA;           bootstrap({&#xD;&#xA;               list: bootstrapNodes&#xD;&#xA;           }),&#xD;&#xA;       ],&#xD;&#xA;       services: {&#xD;&#xA;           identify: identify(),&#xD;&#xA;           ping: ping({&#xD;&#xA;               protocolPrefix: 'ipfs',&#xD;&#xA;           }),&#xD;&#xA;           dht: kadDHT({&#xD;&#xA;               kBucketSize: 20,&#xD;&#xA;               clientMode: false,&#xD;&#xA;               broadcast: true,&#xD;&#xA;           }),&#xD;&#xA;           relay: circuitRelayServer(),&#xD;&#xA;           pubsub: gossipsub({&#xD;&#xA;               allowPublishToZeroPeers: true,&#xD;&#xA;               emitSelf: true,&#xD;&#xA;               floodPublish: false,&#xD;&#xA;               gossipIncoming: true,&#xD;&#xA;               doPX: false,&#xD;&#xA;               directPeers: gossipPeers,&#xD;&#xA;               allowedTopics: 'Login'&#xD;&#xA;           })&#xD;&#xA;       },&#xD;&#xA;       config: {&#xD;&#xA;           dht: {&#xD;&#xA;               kBucketSize: 20,&#xD;&#xA;               enabled: true,&#xD;&#xA;               randomWalk: {&#xD;&#xA;                 enabled: true,&#xD;&#xA;                 interval: 300e3,&#xD;&#xA;                 timeout: 10e3&#xD;&#xA;               }&#xD;&#xA;           },&#xD;&#xA;           pubsub: {&#xD;&#xA;               enabled: true,&#xD;&#xA;               emitSelf: false,&#xD;&#xA;           },&#xD;&#xA;           relay: {&#xD;&#xA;               enabled: true,      &#xD;&#xA;               hop: {&#xD;&#xA;               enabled: true,    &#xD;&#xA;               active: true      &#xD;&#xA;               }&#xD;&#xA;           },&#xD;&#xA;           autoNAT: {&#xD;&#xA;               enabled: true,&#xD;&#xA;           },&#xD;&#xA;       },&#xD;&#xA;       connectionManager: {&#xD;&#xA;           autoDial: true,&#xD;&#xA;           maxConnections: 50,&#xD;&#xA;           minConnections: 10,&#xD;&#xA;       },&#xD;&#xA;   }&#xD;&#xA;   &#xD;&#xA;   const node = await createLibp2p(options);&#xD;&#xA;&#xD;&#xA;   node.addEventListener('peer:discovery', async (event) =&gt; {  &#xD;&#xA;   &#xD;&#xA;     const peerInfo = event.detail;&#xD;&#xA;     console.log(&quot;New peer discovered&quot;, peerInfo.id.toString());&#xD;&#xA;&#xD;&#xA;    const rpcUrl = 'http://127.0.0.1:9944';&#xD;&#xA;      &#xD;&#xA;      const body = JSON.stringify({&#xD;&#xA;        jsonrpc: '2.0',&#xD;&#xA;        method: 'system_addReservedPeer',&#xD;&#xA;        params: [&#xD;&#xA;          `/ip4/192.168.1.203/tcp/4003/ws/p2p/${peerId}`&#xD;&#xA;        ],&#xD;&#xA;        id: 2&#xD;&#xA;      });&#xD;&#xA;&#xD;&#xA;      const response = await fetch(rpcUrl, {&#xD;&#xA;        method: 'POST',&#xD;&#xA;        headers: {&#xD;&#xA;          'Content-Type': 'application/json'&#xD;&#xA;        },&#xD;&#xA;        body&#xD;&#xA;      });&#xD;&#xA;   })&#xD;&#xA;&#xD;&#xA;   node.addEventListener('peer:connect', async (event) =&gt; {&#xD;&#xA;&#xD;&#xA;     console.log('peer connect', event.detail)&#xD;&#xA;   })&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;   await node.start();&#xD;&#xA; }&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45353" PostHistoryTypeId="2" PostId="11109" RevisionGUID="87e7dc9d-779b-43a0-9655-f062f5497d48" CreationDate="2024-03-03T20:42:09.713" UserId="3991" Text="I've not tried either, but looks like there're at least two options&#xD;&#xA;&#xD;&#xA;- [LLDB with Wasmtime][1] or&#xD;&#xA;- a WASM specific debugger like [wasminspect][2]&#xD;&#xA;&#xD;&#xA;Source: https://shopify.engineering/debugging-server-side-webassembly&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.wasmtime.dev/examples-debugging.html&#xD;&#xA;  [2]: https://github.com/kateinoigakukun/wasminspect" ContentLicense="CC BY-SA 4.0" />
  <row Id="45355" PostHistoryTypeId="2" PostId="11110" RevisionGUID="c7f2e0c3-b746-4566-93db-cadae7076e2c" CreationDate="2024-03-03T20:50:00.700" UserId="5193" Text="The [substrate docs][1] are supposed to guide users through the substrate SDK via tutorials. [These tutorials][2] use exclusively (to my knowledge) the [substrate node template][3] repository. However, all the packages and libraries inside of that repo (at least all the branches i have checked including *main*) point to this outdated substrate repository (https://github.com/paritytech/substrate). For instance the [runtime library][4] or the [pallets][5]. I do not know which repo replaces the substrate repo, but i suspect [this one][6]? How do people learn Substrate if the entire docs are outdated to the extend that all the tutorials wont even compile or am I missing something here?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://docs.substrate.io/&#xD;&#xA;  [2]: https://docs.substrate.io/tutorials/&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-node-template&#xD;&#xA;  [4]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/runtime/Cargo.toml&#xD;&#xA;  [5]: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/pallets/template/Cargo.toml&#xD;&#xA;  [6]: https://github.com/paritytech/polkadot-sdk" ContentLicense="CC BY-SA 4.0" />
  <row Id="45357" PostHistoryTypeId="1" PostId="11110" RevisionGUID="c7f2e0c3-b746-4566-93db-cadae7076e2c" CreationDate="2024-03-03T20:50:00.700" UserId="5193" Text="Is it true that the entire substrate docs are based on an archived repo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45358" PostHistoryTypeId="3" PostId="11110" RevisionGUID="c7f2e0c3-b746-4566-93db-cadae7076e2c" CreationDate="2024-03-03T20:50:00.700" UserId="5193" Text="|pallet|error|documentation|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45359" PostHistoryTypeId="4" PostId="11110" RevisionGUID="86d97914-d6f6-4673-93d8-c820df8c22cd" CreationDate="2024-03-03T21:08:22.900" UserId="5193" Comment="edited title" Text="Is it true that the entire substrate docs points to an archived repo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45360" PostHistoryTypeId="2" PostId="11111" RevisionGUID="18526a87-3d59-455b-8ba8-6000f1eee329" CreationDate="2024-03-03T22:17:21.623" UserId="309" Text="hello I am trying to add the bounties pallet to the substrate node-template. the version I am using is &quot;release-polkadot-v1.7.0&quot;. I keep getting&#xD;&#xA;the following error:&#xD;&#xA;&#xD;&#xA;    the traitframe\_support::traits::fungibles::Mutate\&lt;AccountId32&gt; is not implemented for pallet\_balances::Pallet\&lt;Runtime&gt; , which is required by sp\_runtime::generic::Block\&lt;sp\_runtime::generic::Header\&lt;u32, sp\_runtime::traits::BlakeTwo256&gt;, sp\_runtime::generic::UncheckedExtrinsic\&lt;MultiAddress\&lt;AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender\&lt;Runtime&gt;, CheckSpecVersion\&lt;Runtime&gt;, CheckTxVersion\&lt;Runtime&gt;, CheckGenesis\&lt;Runtime&gt;, CheckEra\&lt;Runtime&gt;, CheckNonce\&lt;Runtime&gt;, CheckWeight\&lt;Runtime&gt;, ChargeTransactionPayment\&lt;Runtime&gt;)&gt;&gt;: sp\_runtime::traits::Block\&#xD;&#xA;&#xD;&#xA;I really don't understand, as I don't change the implementation of frame_system and pallet-balances, I only add pallet-treasury and pallet-bounties in the runtime. &#xD;&#xA;&#xD;&#xA; I also started from a clean updated substrate node-template, and the error clearly appears after adding pallet-treasury &amp; pallet-bounties. I first added pallet-collective, and this one works fine. the following line seems to be responsible:&#xD;&#xA;&#xD;&#xA;     #[derive_impl(frame_system::config_preludes::SolochainDefaultConfig as frame_system::DefaultConfig)]&#xD;&#xA;&#xD;&#xA;Also,  in pallet-treasury implementation, the following line gives me a type mismatch error. However, I see it used in several other runtimes:&#xD;&#xA;&#xD;&#xA;    type Paymaster = PayFromAccount&lt;Balances, TreasuryAccount&gt;;&#xD;&#xA;&#xD;&#xA;Thanks in advance for your help,&#xD;&#xA;Kazu" ContentLicense="CC BY-SA 4.0" />
  <row Id="45362" PostHistoryTypeId="1" PostId="11111" RevisionGUID="18526a87-3d59-455b-8ba8-6000f1eee329" CreationDate="2024-03-03T22:17:21.623" UserId="309" Text="problem with pallets bounties &amp; treasury" ContentLicense="CC BY-SA 4.0" />
  <row Id="45363" PostHistoryTypeId="3" PostId="11111" RevisionGUID="18526a87-3d59-455b-8ba8-6000f1eee329" CreationDate="2024-03-03T22:17:21.623" UserId="309" Text="|substrate-node-template|runtime|pallet-treasury|pallet-bounties|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45364" PostHistoryTypeId="50" PostId="8796" RevisionGUID="56f23c5c-aaaa-4ec0-98d1-5961487f37b4" CreationDate="2024-03-04T01:06:55.857" UserId="-1" />
  <row Id="45365" PostHistoryTypeId="50" PostId="6498" RevisionGUID="d2e52ca5-bd87-4bc1-9148-8b956767e4c4" CreationDate="2024-03-04T06:02:05.280" UserId="-1" />
  <row Id="45366" PostHistoryTypeId="50" PostId="4990" RevisionGUID="7b5606c8-2555-40f5-a26a-6d096f63dc60" CreationDate="2024-03-04T07:06:50.873" UserId="-1" />
  <row Id="45367" PostHistoryTypeId="2" PostId="11112" RevisionGUID="8d62786e-2e86-4c02-a756-d49668157e50" CreationDate="2024-03-04T07:27:54.810" UserId="522" Text="You can query the AccountId's of the validators from the session pallet, and the AuthorityId's from their respective pallet's `fn authorities()` (eg: `Aura::authorities()`).&#xD;&#xA;Then you can zip them up if you like.&#xD;&#xA;The AccountIds and the keys are communicated to the pallets and stored in the pallets in order. " ContentLicense="CC BY-SA 4.0" />
  <row Id="45369" PostHistoryTypeId="50" PostId="6448" RevisionGUID="99556c0a-be63-42b2-a96e-3137223c1309" CreationDate="2024-03-04T08:02:35.350" UserId="-1" />
  <row Id="45370" PostHistoryTypeId="50" PostId="8331" RevisionGUID="8fc8be0d-c48b-47a8-ad76-1bdac3d5ec6f" CreationDate="2024-03-04T09:05:20.627" UserId="-1" />
  <row Id="45371" PostHistoryTypeId="2" PostId="11113" RevisionGUID="9d2ad920-c4be-40c0-8111-a8654783144e" CreationDate="2024-03-04T09:17:09.137" UserId="555" Text="Solved this issue by removing the author inherent functionality." ContentLicense="CC BY-SA 4.0" />
  <row Id="45373" PostHistoryTypeId="2" PostId="11114" RevisionGUID="cef0ffac-0c6e-450f-93c1-4f5c31b94816" CreationDate="2024-03-04T09:44:40.797" UserId="5197" Text="miss the extension &#xD;&#xA;&#xD;&#xA;    #[derive(Default, Clone, Serialize, Deserialize, ChainSpecExtension)]&#xD;&#xA;    #[serde(rename_all = &quot;camelCase&quot;)]&#xD;&#xA;    pub struct Extensions {&#xD;&#xA;    	/// Block numbers with known hashes.&#xD;&#xA;    	pub fork_blocks: sc_client_api::ForkBlocks&lt;Block&gt;,&#xD;&#xA;    	/// Known bad block hashes.&#xD;&#xA;    	pub bad_blocks: sc_client_api::BadBlocks&lt;Block&gt;,&#xD;&#xA;    	/// The light sync state extension used by the sync-state rpc.&#xD;&#xA;    	pub light_sync_state: sc_sync_state_rpc::LightSyncStateExtension,&#xD;&#xA;    }&#xD;&#xA;    &#xD;&#xA;    pub type ChainSpec = sc_service::GenericChainSpec&lt;RuntimeGenesisConfig, Extensions&gt;;&#xD;&#xA;&#xD;&#xA;in chain_spec.rs &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45375" PostHistoryTypeId="50" PostId="8296" RevisionGUID="3cdab039-6eca-4da7-982a-b1356c0da75b" CreationDate="2024-03-04T13:03:40.453" UserId="-1" />
  <row Id="45376" PostHistoryTypeId="50" PostId="5293" RevisionGUID="0d0db7de-5a1f-4d33-9053-370fcd9938d0" CreationDate="2024-03-04T14:08:05.997" UserId="-1" />
  <row Id="45377" PostHistoryTypeId="50" PostId="6451" RevisionGUID="ad241bda-01bd-4522-a0ea-a2c212433928" CreationDate="2024-03-04T15:02:10.240" UserId="-1" />
  <row Id="45378" PostHistoryTypeId="2" PostId="11115" RevisionGUID="33f5593d-cee9-4b0d-b78a-fbd7444bdb45" CreationDate="2024-03-04T15:05:48.667" UserId="5199" Text="At certain time, it shows this error.&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/16sEA.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="45380" PostHistoryTypeId="1" PostId="11115" RevisionGUID="33f5593d-cee9-4b0d-b78a-fbd7444bdb45" CreationDate="2024-03-04T15:05:48.667" UserId="5199" Text="Facing problem in fetching all Preimages using rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="45381" PostHistoryTypeId="3" PostId="11115" RevisionGUID="33f5593d-cee9-4b0d-b78a-fbd7444bdb45" CreationDate="2024-03-04T15:05:48.667" UserId="5199" Text="|polkadot-js|polkadot|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45382" PostHistoryTypeId="2" PostId="11116" RevisionGUID="f013b07a-9c28-4c94-9fc2-2c676bda0c33" CreationDate="2024-03-04T15:39:45.817" UserId="2645" Text="I'm interacting with a smart contract on Astar via XCM message from another chain and through a proxy account with proxy type = &quot;Any&quot;. &#xD;&#xA;&#xD;&#xA;The XCM message arrives at the smart contract chain but fails: &#xD;&#xA;&#xD;&#xA;    xcmpQueue.Fail&#xD;&#xA;    error: XcmV3TraitsError -&gt; NoPermission&#xD;&#xA;&#xD;&#xA;The extrinsic points to an own smart contract, and I wrapped it with `tx.proxy.proxy`.&#xD;&#xA;I don't understand why the proxy account doesn't have permission to execute it.  &#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45384" PostHistoryTypeId="1" PostId="11116" RevisionGUID="f013b07a-9c28-4c94-9fc2-2c676bda0c33" CreationDate="2024-03-04T15:39:45.817" UserId="2645" Text="xcmpQueue.Fail - NoPermission when I try to execute an XCM extrinsic via proxy" ContentLicense="CC BY-SA 4.0" />
  <row Id="45385" PostHistoryTypeId="3" PostId="11116" RevisionGUID="f013b07a-9c28-4c94-9fc2-2c676bda0c33" CreationDate="2024-03-04T15:39:45.817" UserId="2645" Text="|xcm|xcmp|proxy|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45386" PostHistoryTypeId="50" PostId="8819" RevisionGUID="7b9668f9-9193-4386-a1e9-5faa46be446e" CreationDate="2024-03-04T17:05:15.647" UserId="-1" />
  <row Id="45387" PostHistoryTypeId="2" PostId="11117" RevisionGUID="43f6a1bb-2830-49ea-9b4a-33275ad37330" CreationDate="2024-03-05T00:15:26.010" UserId="3346" Text="In Ink 5.0, the Static Buffer size can be increased. Does anyone know HOW to do that? This PR mentions several methods they were considering: https://github.com/paritytech/ink/pull/1869&#xD;&#xA;&#xD;&#xA;I tried the option `cargo contract build --static-buffer-size 32768 --release` but cargo-contract did not recognize `--static-buffer-size`&#xD;&#xA;&#xD;&#xA;There is mention in the above PR that it might be implemented in the cargo.toml instead, but no discussion of HOW. Does anyone know the magic to make this great new feature work in ink 5.0?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45389" PostHistoryTypeId="1" PostId="11117" RevisionGUID="43f6a1bb-2830-49ea-9b4a-33275ad37330" CreationDate="2024-03-05T00:15:26.010" UserId="3346" Text="How To Increase Static Buffer Size in Ink 5.0 Contract" ContentLicense="CC BY-SA 4.0" />
  <row Id="45390" PostHistoryTypeId="3" PostId="11117" RevisionGUID="43f6a1bb-2830-49ea-9b4a-33275ad37330" CreationDate="2024-03-05T00:15:26.010" UserId="3346" Text="|ink|smart-contract|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45391" PostHistoryTypeId="2" PostId="11118" RevisionGUID="7978cd30-9cae-4865-9b1f-45027aad6336" CreationDate="2024-03-05T03:21:00.147" UserId="3871" Text="Staking is an essential component when designing an Oracle for a Substrate chain.  There are two competing staking designs:&#xD;&#xA;&#xD;&#xA;1. Create new staking/sessions modules for the Oracle. Those who wish to become a data provider must bond stake here.&#xD;&#xA;2. Share the NPOS stakes and validators. Any node that qualifies as a validator is also qualified to provide data. Rewards/slashes go here too.&#xD;&#xA;&#xD;&#xA;The primary motivation for going with option (2) is to increase the cost of a 51% attack. Let's say 60% of funds are staked. If two separate pools are required (one for each of NPOS and the Oracle), then each side only has 30%. A 51% attack requires on either module would require only just over 15%. But if the same pool is used for both staking and providing data, then 30%+ is required.&#xD;&#xA;&#xD;&#xA;Questions:&#xD;&#xA;&#xD;&#xA;1. Are there strong counter-arguments to why this route is not advisable? If so, why,  and what's a better alternative?&#xD;&#xA;&#xD;&#xA;2. What are the issues to be mindful of if going this route? One is managing sharing of rewards to incentivize activity on both fronts. Any others?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45393" PostHistoryTypeId="1" PostId="11118" RevisionGUID="7978cd30-9cae-4865-9b1f-45027aad6336" CreationDate="2024-03-05T03:21:00.147" UserId="3871" Text="Oracle pallet - what stake?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45394" PostHistoryTypeId="3" PostId="11118" RevisionGUID="7978cd30-9cae-4865-9b1f-45027aad6336" CreationDate="2024-03-05T03:21:00.147" UserId="3871" Text="|staking|oracles|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45395" PostHistoryTypeId="5" PostId="11118" RevisionGUID="2f2b6d12-f8b3-4af7-a057-0fda203bb70b" CreationDate="2024-03-05T03:26:17.033" UserId="3871" Comment="added 38 characters in body" Text="Staking is an essential component when designing an Oracle for a Substrate chain.  There are two competing staking designs:&#xD;&#xA;&#xD;&#xA;1. Create new staking/sessions modules for the Oracle. Those who wish to become a data provider must bond stake here.&#xD;&#xA;2. Share the NPOS stakes and validators. Any node that qualifies as a validator is also qualified to provide data. Rewards/slashes go here too.&#xD;&#xA;&#xD;&#xA;The primary motivation for going with option (2) is to increase the cost of a 51% attack. Let's say 60% of funds are staked. If two separate pools are required (one for each of NPOS and the Oracle), then each side only has 30%. A 51% attack requires on either module would require only just over 15%. But if the same pool is used for both staking and providing data, then 30%+ is required.&#xD;&#xA;&#xD;&#xA;Questions:&#xD;&#xA;&#xD;&#xA;1. Are there counter-arguments to why this route is not advisable? If so, why, and what's better? Note that use of an on-chain oracle solution is a priority.&#xD;&#xA;&#xD;&#xA;2. What are the issues to be mindful of if going this route? One is managing sharing of rewards to incentivize activity on both fronts. Any others?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45396" PostHistoryTypeId="5" PostId="11118" RevisionGUID="fc77434a-97d9-4c64-9811-832dd7f67d2a" CreationDate="2024-03-05T03:33:09.870" UserId="3871" Comment="added 4 characters in body" Text="Staking is an essential component when designing an Oracle for a Substrate POS chain.  There are two competing staking designs:&#xD;&#xA;&#xD;&#xA;1. Create new staking/sessions modules for the Oracle. Those who wish to become a data provider must bond stake here.&#xD;&#xA;2. Share the NPOS stakes and validators. Any node that qualifies as a validator is also qualified to provide data. Rewards/slashes go here too.&#xD;&#xA;&#xD;&#xA;The primary motivation for going with option (2) is to increase the cost of a 51% attack. If separate pools are required for each of NPOS and the Oracle, then the 51% threshold for either pool will be much easier to reach than a single large pool.&#xD;&#xA;&#xD;&#xA;Questions:&#xD;&#xA;&#xD;&#xA;1. Are there counter-arguments to why this route is not advisable? If so, why, and what's better? Note that use of an on-chain oracle solution is a priority.&#xD;&#xA;&#xD;&#xA;2. What are the issues to be mindful of if going this route? One is managing sharing of rewards to incentivize activity on both fronts. Any others?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45397" PostHistoryTypeId="2" PostId="11119" RevisionGUID="5e730790-a4be-43fa-ab8d-581f88941cb0" CreationDate="2024-03-05T03:40:42.593" UserId="5197" Text=" implement as follow&#xD;&#xA;&#xD;&#xA;       impl TryFrom&lt;EthereumSignature&gt; for ecdsa::Signature {&#xD;&#xA;        	type Error = ();&#xD;&#xA;        	fn try_from(s: EthereumSignature) -&gt; Result&lt;Self, Self::Error&gt; {&#xD;&#xA;        		Ok(s.0)&#xD;&#xA;        	}&#xD;&#xA;        }&#xD;&#xA;        impl From&lt;ecdsa::Signature&gt; for EthereumSignature {&#xD;&#xA;        	fn from(s: ecdsa::Signature)-&gt;Self{&#xD;&#xA;        		EthereumSignature::new(s)&#xD;&#xA;        	}&#xD;&#xA;        }&#xD;&#xA;        impl TryFrom&lt;EthereumSigner&gt; for ecdsa::Public {&#xD;&#xA;        	type Error = ();&#xD;&#xA;        	fn try_from(_s: EthereumSigner) -&gt; Result&lt;Self, Self::Error&gt; {&#xD;&#xA;        		Err(())//TODO  [u8; 20] can not be [u8;33] &#xD;&#xA;        &#xD;&#xA;        	}&#xD;&#xA;        }" ContentLicense="CC BY-SA 4.0" />
  <row Id="45399" PostHistoryTypeId="4" PostId="11118" RevisionGUID="35fa682f-da55-4dd9-b649-3a76e4a77fba" CreationDate="2024-03-05T03:43:01.003" UserId="3871" Comment="edited title" Text="Oracle pallet - Choosing Source of Stake" ContentLicense="CC BY-SA 4.0" />
  <row Id="45400" PostHistoryTypeId="5" PostId="11118" RevisionGUID="35fa682f-da55-4dd9-b649-3a76e4a77fba" CreationDate="2024-03-05T03:43:01.003" UserId="3871" Comment="edited title" Text="Staking is an essential component when designing an Oracle for a Substrate NPOS chain.  There are two competing staking designs:&#xD;&#xA;&#xD;&#xA;1. Create new staking/sessions modules for the Oracle. Those who wish to become a data provider must bond stake here.&#xD;&#xA;2. Share the NPOS stakes and validators. Any node that qualifies as a validator is also qualified to provide data. Rewards/slashes go here too.&#xD;&#xA;&#xD;&#xA;The primary motivation for going with option (2) is to increase the cost of a 51% attack. If separate pools are required for each of NPOS and the Oracle, then the 51% threshold for either pool will be much easier to reach than a single large pool.&#xD;&#xA;&#xD;&#xA;Questions:&#xD;&#xA;&#xD;&#xA;1. Are there counter-arguments to why this route is not advisable? If so, why, and what's better? Note that use of an off-chain oracle solution is not preferred.&#xD;&#xA;&#xD;&#xA;2. What are the issues to be mindful of if going this route? One is managing sharing of rewards to incentivize activity on both fronts. Any others?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45401" PostHistoryTypeId="5" PostId="11118" RevisionGUID="f874bea9-0910-45e9-a091-696517d46f18" CreationDate="2024-03-05T03:48:17.730" UserId="3871" Comment="edited title" Text="Staking is an essential component when designing an Oracle for a layer 1 Substrate NPOS chain.  There are two competing staking designs:&#xD;&#xA;&#xD;&#xA;1. Create new staking/sessions modules for the Oracle. Those who wish to become a data provider must bond stake here.&#xD;&#xA;2. Share the NPOS stakes and validators. Any node that qualifies as a validator is also qualified to provide data. Rewards/slashes go here too.&#xD;&#xA;&#xD;&#xA;The primary motivation for going with option (2) is to increase the cost of a 51% attack. If separate pools are required for each of NPOS and the Oracle, then the 51% threshold for either pool will be much easier to reach than a single large pool.&#xD;&#xA;&#xD;&#xA;Questions:&#xD;&#xA;&#xD;&#xA;1. Are there counter-arguments to why this route is not advisable? If so, why, and what's better? Note that use of an off-chain oracle solution is not preferred.&#xD;&#xA;&#xD;&#xA;2. What are the issues to be mindful of if going this route? One is managing sharing of rewards to incentivize activity on both fronts. Any others, such as security concerns or interfering with the original functionality of NPOS aspect?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45402" PostHistoryTypeId="50" PostId="7142" RevisionGUID="863685f1-a9be-4c7a-95cf-1f874d1dee89" CreationDate="2024-03-05T11:07:00.787" UserId="-1" />
  <row Id="45404" PostHistoryTypeId="5" PostId="11118" RevisionGUID="358ff3e0-eec6-4306-b63f-f05dcb23bde1" CreationDate="2024-03-05T15:03:43.943" UserId="3871" Comment="added 9 characters in body" Text="Staking is an essential component when designing an on-chain Oracle for a layer 1 Substrate NPOS chain.  There are two competing staking designs:&#xD;&#xA;&#xD;&#xA;1. Create new staking/sessions modules for the Oracle. Those who wish to become a data provider must bond stake here.&#xD;&#xA;2. Share the NPOS stakes and validators. Any node that qualifies as a validator is also qualified to provide data. Rewards/slashes go here too.&#xD;&#xA;&#xD;&#xA;The primary motivation for going with option (2) is to increase the cost of a 51% attack. If separate pools are required for each of NPOS and the Oracle, then the 51% threshold for either pool will be much easier to reach than a single large pool.&#xD;&#xA;&#xD;&#xA;Questions:&#xD;&#xA;&#xD;&#xA;1. Are there counter-arguments to why this route is not advisable? If so, why, and what's better? Note that use of an off-chain oracle solution is not preferred.&#xD;&#xA;&#xD;&#xA;2. What are the issues to be mindful of if going this route? One is managing sharing of rewards to incentivize activity on both fronts. Any others, such as security concerns or interfering with the original functionality of NPOS aspect?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45405" PostHistoryTypeId="2" PostId="11120" RevisionGUID="0337fccb-b5ef-496c-b4ea-d788af234280" CreationDate="2024-03-05T16:22:21.240" UserId="1810" Text="In principle, one might explore zk oracle flavors too.  If for example, you could get price quotes by email or better binding trade offers, then these libraries might be useful:&#xD;&#xA;&#xD;&#xA;https://github.com/zkemail/zk-email-verify&#xD;&#xA;&#xD;&#xA;https://github.com/arkworks-rs/circom-compat&#xD;&#xA;&#xD;&#xA;In principle, we could verify email DKIM signatures directly on polkadot much cheaper, but maybet he privacy winds up important somehow.&#xD;&#xA;&#xD;&#xA;An example project that uses zk verification of DKIM signatures and email contents.&#xD;&#xA;&#xD;&#xA;https://github.com/anon-aadhaar/anon-aadhaar&#xD;&#xA;&#xD;&#xA;As for validators being oracle nodes..&#xD;&#xA;&#xD;&#xA;We've some W3F grant recipient doing TCP packet verification too, so zk proofs into packets routed via their own attestor nodes.  You'd need stake for the attestor nodes, who attest to the packets' origin.  A priori, attestors would be their own parachain nodes though, which creates oracle staking concerns.&#xD;&#xA;&#xD;&#xA;In theory, approval checkers (validators) could provide this service with much greater security, or some more specilized oracle service, except.. &#xD;&#xA;&#xD;&#xA;We depend upon reaching concensus in the approval checker system, so they cannot each vote differently because some external party acted differently.  Indeed, we'd slash backing validators 100% if the vote went badly for them.&#xD;&#xA;&#xD;&#xA;We'd need para blocks to only &quot;request&quot; that an oracle script run, and then approval checkers results all become mere gossip messages, not block contents.   Any individual approval checker's results could then be posted somewhere, but..&#xD;&#xA;&#xD;&#xA;We never actually have concensus upon who approval checked some particular parachain block, so how would you know you've sampled all the approval checkers?  In theory, we might block finality upon requested messages from all approval checkers being attached.  It's kinda doable, but really nasty in practice:  These interaction scripts could easily require more than 1s, which causes us problems. &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45407" PostHistoryTypeId="2" PostId="11121" RevisionGUID="aea2935e-476d-42eb-a04c-01923d8a5d4c" CreationDate="2024-03-05T21:56:10.660" UserId="5204" Text="This is how i am trying to invoke call..  where Bytes is Vec&lt;u8&gt;&#xD;&#xA;```&#xD;&#xA;let res = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;          .call(handler_acc_id)&#xD;&#xA;          .exec_input(&#xD;&#xA;           ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;i_receive&quot;)))&#xD;&#xA;                  .push_arg::&lt;Bytes&gt;(request_payload.request_sender.clone())&#xD;&#xA;                  .push_arg::&lt;Bytes&gt;(request_payload.packet.clone())&#xD;&#xA;                  .push_arg::&lt;Bytes&gt;(request_payload.src_chain_id.clone()),&#xD;&#xA;           )&#xD;&#xA;           .returns::&lt;Bytes&gt;()&#xD;&#xA;           .try_invoke();&#xD;&#xA;```&#xD;&#xA;Thanks In Advance!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="45409" PostHistoryTypeId="1" PostId="11121" RevisionGUID="aea2935e-476d-42eb-a04c-01923d8a5d4c" CreationDate="2024-03-05T21:56:10.660" UserId="5204" Text="getting CouldNotReadInput while creating cross invocation call when passing Vec&lt;u8&gt; as argument" ContentLicense="CC BY-SA 4.0" />
  <row Id="45410" PostHistoryTypeId="3" PostId="11121" RevisionGUID="aea2935e-476d-42eb-a04c-01923d8a5d4c" CreationDate="2024-03-05T21:56:10.660" UserId="5204" Text="|ink|smart-contract|openbrush|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45411" PostHistoryTypeId="5" PostId="11121" RevisionGUID="309723ac-02de-4688-9944-2d9bf005b0f7" CreationDate="2024-03-05T21:57:01.390" UserId="5204" Comment="added 2 characters in body" Text="This is how i am trying to invoke call..  where Bytes is `Vec&lt;u8&gt;`&#xD;&#xA;```&#xD;&#xA;let res = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;          .call(handler_acc_id)&#xD;&#xA;          .exec_input(&#xD;&#xA;           ExecutionInput::new(Selector::new(ink::selector_bytes!(&quot;i_receive&quot;)))&#xD;&#xA;                  .push_arg::&lt;Bytes&gt;(request_payload.request_sender.clone())&#xD;&#xA;                  .push_arg::&lt;Bytes&gt;(request_payload.packet.clone())&#xD;&#xA;                  .push_arg::&lt;Bytes&gt;(request_payload.src_chain_id.clone()),&#xD;&#xA;           )&#xD;&#xA;           .returns::&lt;Bytes&gt;()&#xD;&#xA;           .try_invoke();&#xD;&#xA;```&#xD;&#xA;Thanks In Advance!!" ContentLicense="CC BY-SA 4.0" />
  <row Id="45412" PostHistoryTypeId="2" PostId="11122" RevisionGUID="281f098f-4943-4c74-b42f-cb473a07b931" CreationDate="2024-03-05T22:11:03.127" UserId="5205" Text="Is there any wallet that is able to display assets minted on the Polkadot AssetHub (other than polkadot.js/apps)? The only wallet I've found that displays some AssetHub assets is NovaWallet, but the support seems to be limited to significant assets (namely USDC, USDT)." ContentLicense="CC BY-SA 4.0" />
  <row Id="45414" PostHistoryTypeId="1" PostId="11122" RevisionGUID="281f098f-4943-4c74-b42f-cb473a07b931" CreationDate="2024-03-05T22:11:03.127" UserId="5205" Text="Wallet support for assets minted on AssetHub" ContentLicense="CC BY-SA 4.0" />
  <row Id="45415" PostHistoryTypeId="3" PostId="11122" RevisionGUID="281f098f-4943-4c74-b42f-cb473a07b931" CreationDate="2024-03-05T22:11:03.127" UserId="5205" Text="|wallet|assethub|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45416" PostHistoryTypeId="2" PostId="11123" RevisionGUID="36db0300-6f27-46e7-9d76-b2d8a1d8b17b" CreationDate="2024-03-06T02:58:45.950" UserId="131" Text="For this block: https://kusama.subscan.io/block/22144324, two XCM's are processed. The response is:&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;        &quot;onInitialize&quot;: {&#xD;&#xA;        &quot;events&quot;: [&#xD;&#xA;            {&#xD;&#xA;                &quot;method&quot;: {&#xD;&#xA;                    &quot;pallet&quot;: &quot;balances&quot;,&#xD;&#xA;                    &quot;method&quot;: &quot;Deposit&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;data&quot;: [&#xD;&#xA;                    &quot;FyE2tgkaAhARtpTJSy8TtJum1PwNHP1nCy3SuFjEGSvNfMv&quot;,&#xD;&#xA;                    &quot;150028590711&quot;&#xD;&#xA;                ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;                &quot;method&quot;: {&#xD;&#xA;                    &quot;pallet&quot;: &quot;balances&quot;,&#xD;&#xA;                    &quot;method&quot;: &quot;Deposit&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;data&quot;: [&#xD;&#xA;                    &quot;GCNeCFUCEjcJ8XQxJe1QuExpS61MavucrnEAVpcngWBYsP2&quot;,&#xD;&#xA;                    &quot;78327426&quot;&#xD;&#xA;                ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;                &quot;method&quot;: {&#xD;&#xA;                    &quot;pallet&quot;: &quot;messageQueue&quot;,&#xD;&#xA;                    &quot;method&quot;: &quot;Processed&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;data&quot;: [&#xD;&#xA;                    &quot;0x2e36da6586a9374d34d51c9753af445ea63d6672731ee7d25ac63738022978e9&quot;,&#xD;&#xA;                    {&#xD;&#xA;                        &quot;ump&quot;: {&#xD;&#xA;                            &quot;para&quot;: &quot;2001&quot;&#xD;&#xA;                        }&#xD;&#xA;                    },&#xD;&#xA;                    {&#xD;&#xA;                        &quot;refTime&quot;: &quot;293037000&quot;,&#xD;&#xA;                        &quot;proofSize&quot;: &quot;7186&quot;&#xD;&#xA;                    },&#xD;&#xA;                    true&#xD;&#xA;                ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;                &quot;method&quot;: {&#xD;&#xA;                    &quot;pallet&quot;: &quot;balances&quot;,&#xD;&#xA;                    &quot;method&quot;: &quot;Withdraw&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;data&quot;: [&#xD;&#xA;                    &quot;F7fq1inJcCWWCd8sT26fdZkcozCsbJwYAwshtADXqCMGcjd&quot;,&#xD;&#xA;                    &quot;3230000000000&quot;&#xD;&#xA;                ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;                &quot;method&quot;: {&#xD;&#xA;                    &quot;pallet&quot;: &quot;balances&quot;,&#xD;&#xA;                    &quot;method&quot;: &quot;Deposit&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;data&quot;: [&#xD;&#xA;                    &quot;Ecwo5t2LukeQjGjzVPK7khdjbnpFSxP2iTpjJBsezY8Exzy&quot;,&#xD;&#xA;                    &quot;3229921672574&quot;&#xD;&#xA;                ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;                &quot;method&quot;: {&#xD;&#xA;                    &quot;pallet&quot;: &quot;balances&quot;,&#xD;&#xA;                    &quot;method&quot;: &quot;Deposit&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;data&quot;: [&#xD;&#xA;                    &quot;GCNeCFUCEjcJ8XQxJe1QuExpS61MavucrnEAVpcngWBYsP2&quot;,&#xD;&#xA;                    &quot;78327426&quot;&#xD;&#xA;                ]&#xD;&#xA;            },&#xD;&#xA;            {&#xD;&#xA;                &quot;method&quot;: {&#xD;&#xA;                    &quot;pallet&quot;: &quot;messageQueue&quot;,&#xD;&#xA;                    &quot;method&quot;: &quot;Processed&quot;&#xD;&#xA;                },&#xD;&#xA;                &quot;data&quot;: [&#xD;&#xA;                    &quot;0xe2d1652ebad3249e2559d96c7320f2bc6eac9bb1601e4c64b629bce0311b97a5&quot;,&#xD;&#xA;                    {&#xD;&#xA;                        &quot;ump&quot;: {&#xD;&#xA;                            &quot;para&quot;: &quot;2090&quot;&#xD;&#xA;                        }&#xD;&#xA;                    },&#xD;&#xA;                    {&#xD;&#xA;                        &quot;refTime&quot;: &quot;293037000&quot;,&#xD;&#xA;                        &quot;proofSize&quot;: &quot;7186&quot;&#xD;&#xA;                    },&#xD;&#xA;                    true&#xD;&#xA;                ]&#xD;&#xA;            }&#xD;&#xA;        ]&#xD;&#xA;    },&#xD;&#xA;```&#xD;&#xA;In this array, it seems every XCM ends with a `messageQueue.processed` event. But is this always true? How do I strongly correlates one `balances.Deposit` event with one `messageQueue.Processed` event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45418" PostHistoryTypeId="1" PostId="11123" RevisionGUID="36db0300-6f27-46e7-9d76-b2d8a1d8b17b" CreationDate="2024-03-06T02:58:45.950" UserId="131" Text="When two XCM's are processed in a block, how to strongly correlate balances.Deposit event with messageQueue.Processed event?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45419" PostHistoryTypeId="3" PostId="11123" RevisionGUID="36db0300-6f27-46e7-9d76-b2d8a1d8b17b" CreationDate="2024-03-06T02:58:45.950" UserId="131" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45420" PostHistoryTypeId="2" PostId="11124" RevisionGUID="64100bd3-c931-4217-8419-10e8e67968c6" CreationDate="2024-03-06T02:59:49.313" UserId="5204" Text="I was doing mistake while calling, here is corrected way &#xD;&#xA;```&#xD;&#xA; let res = build_call::&lt;DefaultEnvironment&gt;()&#xD;&#xA;           .call(handler_acc_id)&#xD;&#xA;           .exec_input(&#xD;&#xA;                      ExecutionInput::new(Selector::new(ink::selector_bytes!(&#xD;&#xA;                            &quot;IDapp::i_receive&quot;&#xD;&#xA;                        )))&#xD;&#xA;                        .push_arg::&lt;&amp;Bytes&gt;(&amp;request_payload.request_sender.clone())&#xD;&#xA;                        .push_arg::&lt;&amp;Bytes&gt;(&amp;request_payload.packet.clone())&#xD;&#xA;                        .push_arg::&lt;&amp;Bytes&gt;(&amp;request_payload.src_chain_id.clone()),&#xD;&#xA;           )&#xD;&#xA;           .returns::&lt;Bytes&gt;()&#xD;&#xA;           .try_invoke();&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="45422" PostHistoryTypeId="50" PostId="8810" RevisionGUID="75f0e3be-6c32-49b8-ae7d-f179cf632912" CreationDate="2024-03-06T09:03:05.420" UserId="-1" />
  <row Id="45427" PostHistoryTypeId="2" PostId="11126" RevisionGUID="beedb52c-5988-49f5-a6c8-95241338f39f" CreationDate="2024-03-06T23:42:53.460" UserId="3346" Text="Found it! Static Buffer is set at compile time. Do a cargo clean first and then compile like this (example is for 2MB):&#xD;&#xA;&#xD;&#xA;    INK_STATIC_BUFFER_SIZE=20000000 cargo contract build --release&#xD;&#xA;&#xD;&#xA;See more here: https://github.com/paritytech/ink-examples/blob/main/static-buffer/README.md&#xD;&#xA;&#xD;&#xA;Also see this discussion when considering reasonable limits on your static buffer for off-chain contracts: https://github.com/paritytech/ink/issues/1471#issuecomment-1674781007 " ContentLicense="CC BY-SA 4.0" />
  <row Id="45429" PostHistoryTypeId="5" PostId="11126" RevisionGUID="4254524d-02b6-4188-b1f6-af2e1fb2f5ce" CreationDate="2024-03-07T00:46:06.463" UserId="3346" Comment="deleted 1 character in body" Text="Found it! Static Buffer is set at compile time. Do a cargo clean first and then compile like this (example is for 2MB):&#xD;&#xA;&#xD;&#xA;    INK_STATIC_BUFFER_SIZE=2000000 cargo contract build --release&#xD;&#xA;&#xD;&#xA;See more here: https://github.com/paritytech/ink-examples/blob/main/static-buffer/README.md&#xD;&#xA;&#xD;&#xA;Also see this discussion when considering reasonable limits on your static buffer for off-chain contracts: https://github.com/paritytech/ink/issues/1471#issuecomment-1674781007 " ContentLicense="CC BY-SA 4.0" />
  <row Id="45430" PostHistoryTypeId="50" PostId="10955" RevisionGUID="d964479c-5325-4722-9259-02987849e185" CreationDate="2024-03-07T04:06:25.780" UserId="-1" />
  <row Id="45431" PostHistoryTypeId="50" PostId="9006" RevisionGUID="3415c165-8559-4b18-b312-27dc64baf524" CreationDate="2024-03-07T06:05:25.677" UserId="-1" />
  <row Id="45433" PostHistoryTypeId="2" PostId="11127" RevisionGUID="3251323f-c303-4db5-b415-02a138677a1e" CreationDate="2024-03-07T08:32:35.543" UserId="4556" Text="I'm trying to build a ChainExtension, so that my pallet can deal with invocations from Ink! smart contracts. The problem is that I can't get the address right.&#xD;&#xA;&#xD;&#xA;Here is that part of the chain extension code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Get the caller's address.&#xD;&#xA;let who = env.ext().caller().account_id()?;&#xD;&#xA;&#xD;&#xA;// Execute pallet logic.&#xD;&#xA;&lt;pallet_hackathon::Pallet&lt;Runtime&gt; as pallet_hackathon::traits::courses::Create&lt;&#xD;&#xA;  &lt;Runtime as SysConfig&gt;::AccountId,&#xD;&#xA;  &lt;Runtime as pallet_hackathon::Config&gt;::CourseId,&#xD;&#xA;  &lt;Runtime as pallet_hackathon::Config&gt;::NestedSkillsLimit,&#xD;&#xA;  &lt;Runtime as pallet_hackathon::Config&gt;::StringLimit,&#xD;&#xA;&gt;&gt;::create_course(&#xD;&#xA;  who,&#xD;&#xA;  course_id,&#xD;&#xA;  open,&#xD;&#xA;  required_skills,&#xD;&#xA;  gained_skills,&#xD;&#xA;  credential_description,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;It results on the following error:&#xD;&#xA;```&#xD;&#xA;expected reference `&amp;AccountId32`   found reference `&amp;&lt;&lt;E as Ext&gt;::T as SysConfig&gt;::AccountId`consider constraining the associated type `&lt;&lt;E as Ext&gt;::T as SysConfig&gt;::AccountId` to `AccountId32`for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The trait I'm using is defined like this:&#xD;&#xA;```&#xD;&#xA;use crate::skill::{RequiredSkill, Skill};&#xD;&#xA;use frame_support::sp_runtime::{BoundedVec, DispatchResult, TokenError};&#xD;&#xA;&#xD;&#xA;// Trait for creating courses.&#xD;&#xA;pub trait Create&lt;AccountId: Eq, CourseId, NestedSkillsLimit, StringLimit&gt; {&#xD;&#xA;	fn create_course(&#xD;&#xA;		_who: &amp;AccountId,&#xD;&#xA;		_course_id: CourseId,&#xD;&#xA;		_open: bool,&#xD;&#xA;		_required_skills: BoundedVec&lt;RequiredSkill, NestedSkillsLimit&gt;,&#xD;&#xA;		_gained_skills: BoundedVec&lt;Skill, NestedSkillsLimit&gt;,&#xD;&#xA;		_credential_description: BoundedVec&lt;u8, StringLimit&gt;,&#xD;&#xA;	) -&gt; DispatchResult {&#xD;&#xA;		Err(TokenError::Unsupported.into())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The implementation is defined like this:&#xD;&#xA;```&#xD;&#xA;use crate::{&#xD;&#xA;	skill::{RequiredSkill, Skill},&#xD;&#xA;	traits::courses::Create,&#xD;&#xA;	Config, Pallet,&#xD;&#xA;};&#xD;&#xA;use frame_support::sp_runtime::{BoundedVec, DispatchResult};&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&lt;I&gt;, I: 'static&gt;&#xD;&#xA;	Create&lt;&#xD;&#xA;		&lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;		T::CourseId,&#xD;&#xA;		T::NestedSkillsLimit,&#xD;&#xA;		T::StringLimit,&#xD;&#xA;	&gt; for Pallet&lt;T, I&gt;&#xD;&#xA;{&#xD;&#xA;	fn create_course(&#xD;&#xA;		who: &amp;T::AccountId,&#xD;&#xA;		course_id: T::CourseId,&#xD;&#xA;		open: bool,&#xD;&#xA;		required_skills: BoundedVec&lt;RequiredSkill, T::NestedSkillsLimit&gt;,&#xD;&#xA;		gained_skills: BoundedVec&lt;Skill, T::NestedSkillsLimit&gt;,&#xD;&#xA;		credential_description: BoundedVec&lt;u8, T::StringLimit&gt;,&#xD;&#xA;	) -&gt; DispatchResult {&#xD;&#xA;		Self::do_create_course(&#xD;&#xA;			who,&#xD;&#xA;			course_id,&#xD;&#xA;			open,&#xD;&#xA;			required_skills,&#xD;&#xA;			gained_skills,&#xD;&#xA;			credential_description,&#xD;&#xA;		)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I doing wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45435" PostHistoryTypeId="1" PostId="11127" RevisionGUID="3251323f-c303-4db5-b415-02a138677a1e" CreationDate="2024-03-07T08:32:35.543" UserId="4556" Text="Can't get ChainExtension address right" ContentLicense="CC BY-SA 4.0" />
  <row Id="45436" PostHistoryTypeId="3" PostId="11127" RevisionGUID="3251323f-c303-4db5-b415-02a138677a1e" CreationDate="2024-03-07T08:32:35.543" UserId="4556" Text="|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45437" PostHistoryTypeId="4" PostId="11127" RevisionGUID="a38a03df-8c42-49d6-972d-454095935351" CreationDate="2024-03-07T09:07:17.220" UserId="4556" Comment="edited title" Text="Can't get ChainExtension's caller address right" ContentLicense="CC BY-SA 4.0" />
  <row Id="45438" PostHistoryTypeId="5" PostId="11127" RevisionGUID="77bc05ee-3c59-4ba0-8ce7-b6a281bf55eb" CreationDate="2024-03-07T10:19:57.777" UserId="4556" Comment="added 743 characters in body" Text="I'm trying to build a ChainExtension, so that my pallet can deal with invocations from Ink! smart contracts. The problem is that I can't get the address right.&#xD;&#xA;&#xD;&#xA;Here is that part of the chain extension code:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Get the caller's address.&#xD;&#xA;let who = env.ext().caller().account_id()?;&#xD;&#xA;&#xD;&#xA;// Execute pallet logic.&#xD;&#xA;&lt;pallet_hackathon::Pallet&lt;Runtime&gt; as pallet_hackathon::traits::courses::Create&lt;&#xD;&#xA;  &lt;Runtime as SysConfig&gt;::AccountId,&#xD;&#xA;  &lt;Runtime as pallet_hackathon::Config&gt;::CourseId,&#xD;&#xA;  &lt;Runtime as pallet_hackathon::Config&gt;::NestedSkillsLimit,&#xD;&#xA;  &lt;Runtime as pallet_hackathon::Config&gt;::StringLimit,&#xD;&#xA;&gt;&gt;::create_course(&#xD;&#xA;  who,&#xD;&#xA;  course_id,&#xD;&#xA;  open,&#xD;&#xA;  required_skills,&#xD;&#xA;  gained_skills,&#xD;&#xA;  credential_description,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;It results on the following error:&#xD;&#xA;```&#xD;&#xA;expected reference `&amp;AccountId32`   found reference `&amp;&lt;&lt;E as Ext&gt;::T as SysConfig&gt;::AccountId`consider constraining the associated type `&lt;&lt;E as Ext&gt;::T as SysConfig&gt;::AccountId` to `AccountId32`for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The trait I'm using is defined like this:&#xD;&#xA;```&#xD;&#xA;use crate::skill::{RequiredSkill, Skill};&#xD;&#xA;use frame_support::sp_runtime::{BoundedVec, DispatchResult, TokenError};&#xD;&#xA;&#xD;&#xA;// Trait for creating courses.&#xD;&#xA;pub trait Create&lt;AccountId: Eq, CourseId, NestedSkillsLimit, StringLimit&gt; {&#xD;&#xA;	fn create_course(&#xD;&#xA;		_who: &amp;AccountId,&#xD;&#xA;		_course_id: CourseId,&#xD;&#xA;		_open: bool,&#xD;&#xA;		_required_skills: BoundedVec&lt;RequiredSkill, NestedSkillsLimit&gt;,&#xD;&#xA;		_gained_skills: BoundedVec&lt;Skill, NestedSkillsLimit&gt;,&#xD;&#xA;		_credential_description: BoundedVec&lt;u8, StringLimit&gt;,&#xD;&#xA;	) -&gt; DispatchResult {&#xD;&#xA;		Err(TokenError::Unsupported.into())&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The implementation is defined like this:&#xD;&#xA;```&#xD;&#xA;use crate::{&#xD;&#xA;	skill::{RequiredSkill, Skill},&#xD;&#xA;	traits::courses::Create,&#xD;&#xA;	Config, Pallet,&#xD;&#xA;};&#xD;&#xA;use frame_support::sp_runtime::{BoundedVec, DispatchResult};&#xD;&#xA;&#xD;&#xA;impl&lt;T: Config&lt;I&gt;, I: 'static&gt;&#xD;&#xA;	Create&lt;&#xD;&#xA;		&lt;T as frame_system::Config&gt;::AccountId,&#xD;&#xA;		T::CourseId,&#xD;&#xA;		T::NestedSkillsLimit,&#xD;&#xA;		T::StringLimit,&#xD;&#xA;	&gt; for Pallet&lt;T, I&gt;&#xD;&#xA;{&#xD;&#xA;	fn create_course(&#xD;&#xA;		who: &amp;T::AccountId,&#xD;&#xA;		course_id: T::CourseId,&#xD;&#xA;		open: bool,&#xD;&#xA;		required_skills: BoundedVec&lt;RequiredSkill, T::NestedSkillsLimit&gt;,&#xD;&#xA;		gained_skills: BoundedVec&lt;Skill, T::NestedSkillsLimit&gt;,&#xD;&#xA;		credential_description: BoundedVec&lt;u8, T::StringLimit&gt;,&#xD;&#xA;	) -&gt; DispatchResult {&#xD;&#xA;		Self::do_create_course(&#xD;&#xA;			who,&#xD;&#xA;			course_id,&#xD;&#xA;			open,&#xD;&#xA;			required_skills,&#xD;&#xA;			gained_skills,&#xD;&#xA;			credential_description,&#xD;&#xA;		)&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Perhaps it's good to mention that I also tried to invoke pallet functionality this way, since I found an example that does this:&#xD;&#xA;```&#xD;&#xA;let caller = env.ext().caller().clone();&#xD;&#xA;pallet_hackathon::Pallet::&lt;Runtime, ()&gt;::create_course(&#xD;&#xA;  RawOrigin::Signed(caller).into(),&#xD;&#xA;  course_id,&#xD;&#xA;  open,&#xD;&#xA;  required_skills,&#xD;&#xA;  gained_skills,&#xD;&#xA;  credential_description,&#xD;&#xA;)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;But that results in this error:&#xD;&#xA;```&#xD;&#xA;the following other types implement trait `From&lt;T&gt;`:  &lt;RuntimeOrigin as From&lt;OriginCaller&gt;&gt;  &lt;RuntimeOrigin as From&lt;RawOrigin&lt;&lt;Runtime as SysConfig&gt;::AccountId&gt;&gt;&gt;  &lt;RuntimeOrigin as From&lt;std::option::Option&lt;&lt;Runtime as SysConfig&gt;::AccountId&gt;&gt;&gt;required for `RawOrigin&lt;Origin&lt;&lt;E as Ext&gt;::T&gt;&gt;` to implement `Into&lt;RuntimeOrigin&gt;`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What am I doing wrong?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45439" PostHistoryTypeId="2" PostId="11128" RevisionGUID="1795eec1-c4ca-42d7-8267-c45228d096cf" CreationDate="2024-03-07T11:49:21.087" UserId="452" Text="The first error on the RPC nodes is really weird, because it means that some later validator set change was finalized without finalizing a previous one. Is this only happening on the RPC nodes, i.e. the validators are working fine? Also what happens if you try to sync from scratch, does it lead to the same error?&#xD;&#xA;&#xD;&#xA;What happened to the session keys in the migration (if you can dump the value of `session.queuedKeys` from pjs-ui)? I think that from GRANDPA POV probably all the keys (except one) ended up resolving to the same value, which leads to all kinds of invariants being violated." ContentLicense="CC BY-SA 4.0" />
  <row Id="45441" PostHistoryTypeId="2" PostId="11129" RevisionGUID="f51280e1-514d-4edb-95f7-7173f723b72d" CreationDate="2024-03-07T14:28:07.260" UserId="4314" Text="Since the removal of the `polkadot` and `kusama` runtimes from the `polkadot-sdk`, running one of those chains with `-dev` or `-local` runs a `rococo` node.&#xD;&#xA;How can I get a `polkdadot-dev\-local` or `kusama-dev\local` if I need to, e.g. to retrieve the metadata?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45443" PostHistoryTypeId="1" PostId="11129" RevisionGUID="f51280e1-514d-4edb-95f7-7173f723b72d" CreationDate="2024-03-07T14:28:07.260" UserId="4314" Text="How to run a `polkadot-dev` or `kusama-dev` node?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45444" PostHistoryTypeId="3" PostId="11129" RevisionGUID="f51280e1-514d-4edb-95f7-7173f723b72d" CreationDate="2024-03-07T14:28:07.260" UserId="4314" Text="|polkadot|kusama|chainspec|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45445" PostHistoryTypeId="2" PostId="11130" RevisionGUID="4c047e74-8cbf-4020-944c-90326e50bfff" CreationDate="2024-03-07T14:28:07.260" UserId="4314" Text="The `-dev` and `-local` chains are not available in the `polkadot-sdk` nodes since their corresponding `chain-spec` has been removed and is now present in the `fellowship` repo along with the other runtimes. So the question is, how to generate the missing `chain-specs`?&#xD;&#xA;&#xD;&#xA;Well, the `fellowship` repo has a tool called `chain-spec-generator`, to which you have to pass the name of the `chain-spec` you need and you can retrieve it as a raw `chain-spec` or as a regular `.json` `chain-spec`. Once you have the `chain-spec` you need, you just need to specify it with the `--chain` flag when running the node.&#xD;&#xA;&#xD;&#xA;E.g:&#xD;&#xA;&#xD;&#xA;Clone the [polkadot-fellows/runtimes](https://github.com/polkadot-fellows/runtimes/tree/main) repository and from the ROOT run:&#xD;&#xA;&#xD;&#xA;```bash &#xD;&#xA;$ unset SKIP_WASM_BUILD&#xD;&#xA;$ cargo build --release -p chain-spec-generator --features fast-runtime&#xD;&#xA;$ ./target/release/chain-spec-generator polkadot-dev &gt; polkadotDevChainSpec.json&#xD;&#xA;```&#xD;&#xA;Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository, checkout the most recent releases tag and from the ROOT run:&#xD;&#xA;```bash&#xD;&#xA;$ cargo build --release --bin polkadot-prepare-worker --features fast-runtime&#xD;&#xA;$ cargo build --release --bin polkadot-execute-worker --features fast-runtime&#xD;&#xA;$ cargo build --release --bin polkadot --features fast-runtime&#xD;&#xA;$ cp ../runtimes/polkadotDevChainSpec.json .&#xD;&#xA;$ ./target/release/polkadot --chain polkadotDevChainSpec.json&#xD;&#xA;```&#xD;&#xA;For this example we want a plain `chain-spec` for a `polkadot-dev` node with a reduced epoch duration (therefore the `--features fast-runtime`). If we wanted the `raw` `chain-spec`, let's say to run with a `zombienet`, we would need to pass the `--raw` flag to the `chain-spec-generator`.&#xD;&#xA;&#xD;&#xA;*NOTE: The `chain-spec-builder` is only present in the `main` branch of the `runtimes` repo.*" ContentLicense="CC BY-SA 4.0" />
  <row Id="45447" PostHistoryTypeId="2" PostId="11131" RevisionGUID="76047d29-a1ed-4c5a-b1b9-c452e69b11d8" CreationDate="2024-03-07T15:03:19.333" UserId="5131" Text="Yep, the [repo](https://github.com/paritytech/polkadot-sdk) you've pointed is the correct currently active monorepo. The [node-template](https://github.com/substrate-developer-hub/substrate-node-template) that you've pointed to as an example is also actively maintained and functional. All of the tutorials seem to be pointing to `polkadot-sdk` repo like in [this one](https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/). Would be great if you could share a specific outdated reference if you find one." ContentLicense="CC BY-SA 4.0" />
  <row Id="45449" PostHistoryTypeId="50" PostId="10968" RevisionGUID="2d6cb5cb-170e-4426-a1bb-c10054f9e8f8" CreationDate="2024-03-07T19:03:10.403" UserId="-1" />
  <row Id="45450" PostHistoryTypeId="52" PostId="11129" RevisionGUID="7f8f87fd-e45e-4eee-8da7-73191e194bea" CreationDate="2024-03-07T22:29:03.417" />
  <row Id="45451" PostHistoryTypeId="50" PostId="10092" RevisionGUID="7334b07b-9d76-40ce-9fd6-231662012a1a" CreationDate="2024-03-08T09:03:20.250" UserId="-1" />
  <row Id="45452" PostHistoryTypeId="50" PostId="8845" RevisionGUID="1855fcb2-9cb5-4dd2-be56-7477bbb29eff" CreationDate="2024-03-08T10:03:40.327" UserId="-1" />
  <row Id="45453" PostHistoryTypeId="50" PostId="10094" RevisionGUID="9c310e32-9a60-437d-b206-d35171e80b52" CreationDate="2024-03-08T12:06:45.820" UserId="-1" />
  <row Id="45454" PostHistoryTypeId="50" PostId="10970" RevisionGUID="a4d2b2be-d8ae-46fc-b842-f8e924f6c473" CreationDate="2024-03-08T14:06:15.767" UserId="-1" />
  <row Id="45464" PostHistoryTypeId="50" PostId="6958" RevisionGUID="b445a28e-ef4f-4fde-a687-158d88fb0c85" CreationDate="2024-03-10T01:05:45.730" UserId="-1" />
  <row Id="45465" PostHistoryTypeId="2" PostId="11133" RevisionGUID="0d4f2b1a-5aa0-4756-a4b3-09ab18d76810" CreationDate="2024-03-10T04:11:10.063" UserId="5108" Text="I keep on getting the error when I run my substrate node:&#xD;&#xA;'failed to run custom build command for `librocksdb-sys v6.20.3`&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45467" PostHistoryTypeId="1" PostId="11133" RevisionGUID="0d4f2b1a-5aa0-4756-a4b3-09ab18d76810" CreationDate="2024-03-10T04:11:10.063" UserId="5108" Text="Kitties Practice Application" ContentLicense="CC BY-SA 4.0" />
  <row Id="45468" PostHistoryTypeId="3" PostId="11133" RevisionGUID="0d4f2b1a-5aa0-4756-a4b3-09ab18d76810" CreationDate="2024-03-10T04:11:10.063" UserId="5108" Text="|substrate-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45469" PostHistoryTypeId="2" PostId="11134" RevisionGUID="deb8c2df-3f6e-46d8-8f80-bd891e51f812" CreationDate="2024-03-10T09:17:12.950" UserId="5209" Text="So a Quick Question ? &#xD;&#xA;I am having trouble customizing the existing `pallet_balance` to create a new `crypto coin` in my own image .I am using `Substrate-Node-Template`. " ContentLicense="CC BY-SA 4.0" />
  <row Id="45471" PostHistoryTypeId="1" PostId="11134" RevisionGUID="deb8c2df-3f6e-46d8-8f80-bd891e51f812" CreationDate="2024-03-10T09:17:12.950" UserId="5209" Text="Create Custom coin using pallet_balance of Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="45472" PostHistoryTypeId="3" PostId="11134" RevisionGUID="deb8c2df-3f6e-46d8-8f80-bd891e51f812" CreationDate="2024-03-10T09:17:12.950" UserId="5209" Text="|substrate-node-template|pallet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45473" PostHistoryTypeId="50" PostId="8882" RevisionGUID="9e6cf8f5-d56a-4a25-8e1e-7cf86843ced7" CreationDate="2024-03-10T16:08:05.920" UserId="-1" />
  <row Id="45474" PostHistoryTypeId="2" PostId="11135" RevisionGUID="4eb59e68-e85b-4399-b087-f280f4fdcf83" CreationDate="2024-03-10T17:10:49.903" UserId="5193" Text="Are there are node templates that one can use readily without tinkering with the versions and tags? Something that works out of the box? &#xD;&#xA;&#xD;&#xA;And it should point to the [polkadot-sdk repo][1] and not the deprecated [substrate repo][2]. So [this one here][3] for instance points to the deprecated repo on all branches and tags that I have checked out. And this one here on the new [polkadot-sdk repo][4] points obviously to itself consistently. But it doesnt seem to have a Cargo.toml at the root of https://github.com/paritytech/polkadot-sdk/tree/polkadot-v1.8.0/substrate/bin/node-template, so for me as a novice it is not clear what gets compiles when executing&#xD;&#xA;```&#xD;&#xA;cargo build --release&#xD;&#xA;```&#xD;&#xA;at the level of the node-template directory. But it goes on for 16 minutes and does something, and it does it successfully &#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Compiling polkadot-node-core-provisioner v7.0.0 (/home/myname/path/to/repo/polkadot-sdk/polkadot/node/core/provisioner)&#xD;&#xA;   Compiling polkadot-node-core-dispute-coordinator v7.0.0 (/home/myname/path/to/repo/polkadot-sdk/polkadot/node/core/dispute-coordinator)&#xD;&#xA;   Compiling polkadot-approval-distribution v7.0.0 (/home/myname/path/to/repo/polkadot-sdk/polkadot/node/network/approval-distribution)&#xD;&#xA;   Compiling polkadot-availability-distribution v7.0.0 (/home/myname/path/to/repo/polkadot-sdk/polkadot/node/network/availability-distribution)&#xD;&#xA;   Compiling polkadot-service v7.0.0 (/home/myname/path/to/repo/polkadot-sdk/polkadot/node/service)&#xD;&#xA;   Compiling polkadot-cli v7.0.0 (/home/myname/path/to/repo/polkadot-sdk/polkadot/cli)&#xD;&#xA;   Compiling polkadot v6.0.0 (/home/myname/path/to/repo/polkadot-sdk/polkadot)&#xD;&#xA;    Finished release [optimized] target(s) in 16m 28s&#xD;&#xA;```&#xD;&#xA;and there is no `./target` branch appearing anywhere in the directory structure, not even at the root of the entire mono-repo.&#xD;&#xA;&#xD;&#xA;What other options are there to start building? I looked at the https://github.com/substrate-developer-hub/substrate-parachain-template but it, too, points to the deprecated repository (all the crates inside the Cargo.toml do). &#xD;&#xA;&#xD;&#xA;then there is this one https://github.com/paritytech/substrate-contracts-node which is a specialized node template as far as i can see. I cant quite understand the Cargo.tomls because they just reference the crates without specifying the repo. But at least in the README.md just the first link is to the deprecated substrate repo. &#xD;&#xA;&#xD;&#xA;So I am wondering how a new developer should start hacking? Is there anywhere a node template out there that is not deprecated? Or if not, is there maybe a clear instruction of how to create one? Replacing the git link and tag is not straight forward. one would have to then replace all the versions to the correct versions and in the end one has created a node template by oneself and by then probably understands the ins and outs of substrate so much that one doesn't even need the template anymore. But as a novice it is quite hard to get started to be honest.&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk&#xD;&#xA;  [2]: https://github.com/paritytech/substrate.git&#xD;&#xA;  [3]: https://github.com/substrate-developer-hub/substrate-parachain-template/&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/tree/polkadot-v1.8.0/substrate/bin/node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="45476" PostHistoryTypeId="1" PostId="11135" RevisionGUID="4eb59e68-e85b-4399-b087-f280f4fdcf83" CreationDate="2024-03-10T17:10:49.903" UserId="5193" Text="Is there a standalone node-template that points to the polkadot-sdk repo?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45477" PostHistoryTypeId="3" PostId="11135" RevisionGUID="4eb59e68-e85b-4399-b087-f280f4fdcf83" CreationDate="2024-03-10T17:10:49.903" UserId="5193" Text="|substrate-node-template|substrate-node|versioning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45478" PostHistoryTypeId="50" PostId="7202" RevisionGUID="6275a704-46e3-441a-bd22-d531cadaedbf" CreationDate="2024-03-10T18:02:50.370" UserId="-1" />
  <row Id="45479" PostHistoryTypeId="50" PostId="5961" RevisionGUID="9dd5dc56-6189-4fee-adba-6d56f1804724" CreationDate="2024-03-10T19:02:30.293" UserId="-1" />
  <row Id="45480" PostHistoryTypeId="2" PostId="11136" RevisionGUID="51120413-2d0e-4b57-9a34-cb15c6b57980" CreationDate="2024-03-10T20:33:54.220" UserId="253" Text="If you want to change the name, decimals, or other properties of the chain (Polkadot SDK codebase refers to them as &quot;[Additional loosely-typed properties of the chain][1]&quot;) you can do so in the chain_spec file of your node, which is generally located at ```./node/src/chain_spec.rs```. &#xD;&#xA;&#xD;&#xA;You can define the properties like this:&#xD;&#xA;```rust&#xD;&#xA;let mut properties = sc_chain_spec::Properties::new();&#xD;&#xA;properties.insert(&quot;tokenSymbol&quot;.into(), &quot;YOUR_TOKEN_SYMBOL&quot;.into()); &#xD;&#xA;properties.insert(&quot;tokenDecimals&quot;.into(), &lt;YOUR TOKEN DECIMALS&gt;.into());&#xD;&#xA;properties.insert(&quot;ss58Format&quot;.into(), 42.into());&#xD;&#xA;```&#xD;&#xA;and then call the ```.with_properties(properties)``` function on the ```ChainSpec::Builder``` to set your token properties. &#xD;&#xA;&#xD;&#xA;Reference implementation can be seen [here][2] in the Polkadot repo.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/polkadot-sdk/blob/1c435e91c117b877c803427a91c0ccd18c527382/substrate/client/chain-spec/src/chain_spec.rs#L404C1-L408C3&#xD;&#xA;  [2]: https://github.com/paritytech/polkadot-sdk/blob/1c435e91c117b877c803427a91c0ccd18c527382/templates/parachain/node/src/chain_spec.rs#L114C1-L119C52" ContentLicense="CC BY-SA 4.0" />
  <row Id="45482" PostHistoryTypeId="2" PostId="11137" RevisionGUID="bd7c8150-6a8f-4109-abfb-2114cab5b0ba" CreationDate="2024-03-10T21:38:38.097" UserId="4093" Text="```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std, no_main)]&#xD;&#xA;&#xD;&#xA;// use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod memory_game {&#xD;&#xA;    use ink::{&#xD;&#xA;        prelude::vec::Vec&#xD;&#xA;    };&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct MemoryGame {&#xD;&#xA;        tiles: Vec&lt;(TileContent, TileState)&gt;,&#xD;&#xA;        try_count: u32,&#xD;&#xA;        best_count: u32,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, Clone, Copy)]&#xD;&#xA;     #[ink::scale_derive(Encode, Decode, TypeInfo)]&#xD;&#xA;    pub enum TileContent {&#xD;&#xA;        Hearts,&#xD;&#xA;        WaterDrop,&#xD;&#xA;        DiceSixFacesFive,&#xD;&#xA;        Umbrella,&#xD;&#xA;        Cube,&#xD;&#xA;        BeachBall,&#xD;&#xA;        Dragonfly,&#xD;&#xA;        Hummingbird,&#xD;&#xA;        FlowerEmblem,&#xD;&#xA;        OpenBook,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, Clone, Copy)]&#xD;&#xA;    pub enum TileState {&#xD;&#xA;        Start,&#xD;&#xA;        Flipped,&#xD;&#xA;        Matched,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl MemoryGame {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            MemoryGame {&#xD;&#xA;                tiles: Vec::new(),&#xD;&#xA;                try_count: 0,&#xD;&#xA;                best_count: 0,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_tiles(&amp;self, tile_count: u32) -&gt; Vec&lt;(TileContent, TileState)&gt; {&#xD;&#xA;            // Throw error if count is not even.&#xD;&#xA;            assert!(tile_count % 2 == 0, &quot;The number of tiles must be even.&quot;);&#xD;&#xA;&#xD;&#xA;            // Use the existing list if it exists.&#xD;&#xA;            if !self.tiles.is_empty() {&#xD;&#xA;                return self.tiles.clone();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            let pair_count = tile_count / 2;&#xD;&#xA;&#xD;&#xA;            // Take only the items we need from the list of possibilities.&#xD;&#xA;            let used_tile_contents = [&#xD;&#xA;                TileContent::Hearts,&#xD;&#xA;                TileContent::WaterDrop,&#xD;&#xA;                TileContent::DiceSixFacesFive,&#xD;&#xA;                TileContent::Umbrella,&#xD;&#xA;                TileContent::Cube,&#xD;&#xA;                TileContent::BeachBall,&#xD;&#xA;                TileContent::Dragonfly,&#xD;&#xA;                TileContent::Hummingbird,&#xD;&#xA;                TileContent::FlowerEmblem,&#xD;&#xA;                TileContent::OpenBook,&#xD;&#xA;            ];&#xD;&#xA;&#xD;&#xA;            // Double the array and shuffle it.&#xD;&#xA;            // let mut rng = ink_env::hash::Sha2_256::default();&#xD;&#xA;            let mut shuffled_contents = used_tile_contents&#xD;&#xA;                .iter()&#xD;&#xA;                .cycle()&#xD;&#xA;                .take(pair_count as usize * 2)&#xD;&#xA;                .copied()&#xD;&#xA;                .collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;            // shuffled_contents.shuffle(&amp;mut rng);&#xD;&#xA;&#xD;&#xA;            self.tiles = shuffled_contents&#xD;&#xA;                .into_iter()&#xD;&#xA;                .map(|content| (content, TileState::Start))&#xD;&#xA;                .collect();&#xD;&#xA;&#xD;&#xA;            self.tiles.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn flip(&amp;mut self, index: u32) {&#xD;&#xA;            // Is the tile already flipped? We don’t allow flipping it back.&#xD;&#xA;            if self.tiles[index as usize].1 == TileState::Flipped {&#xD;&#xA;                return;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // How many tiles are currently flipped?&#xD;&#xA;            let flipped_tiles = self&#xD;&#xA;                .tiles&#xD;&#xA;                .iter()&#xD;&#xA;                .filter(|(_, state)| *state == TileState::Flipped)&#xD;&#xA;                .count();&#xD;&#xA;&#xD;&#xA;            // Don't allow more than 2 tiles to be flipped at once.&#xD;&#xA;            if flipped_tiles == 2 {&#xD;&#xA;                return;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // On the second flip, check if the tiles match.&#xD;&#xA;            if flipped_tiles == 1 {&#xD;&#xA;                self.try_count += 1;&#xD;&#xA;&#xD;&#xA;                let already_flipped_tile = self&#xD;&#xA;                    .tiles&#xD;&#xA;                    .iter()&#xD;&#xA;                    .find(|(_, state)| *state == TileState::Flipped)&#xD;&#xA;                    .unwrap()&#xD;&#xA;                    .0;&#xD;&#xA;                let just_flipped_tile = self.tiles[index as usize].0;&#xD;&#xA;&#xD;&#xA;                let new_state = if already_flipped_tile == just_flipped_tile {&#xD;&#xA;                    TileState::Matched&#xD;&#xA;                } else {&#xD;&#xA;                    TileState::Start&#xD;&#xA;                };&#xD;&#xA;&#xD;&#xA;                // If all tiles are matched, the game is over.&#xD;&#xA;                if self&#xD;&#xA;                    .tiles&#xD;&#xA;                    .iter()&#xD;&#xA;                    .all(|(_, state)| *state == TileState::Matched)&#xD;&#xA;                {&#xD;&#xA;                    self.end();&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                self.tiles.iter_mut().for_each(|(_, state)| {&#xD;&#xA;                    if *state == TileState::Flipped {&#xD;&#xA;                        *state = new_state;&#xD;&#xA;                    }&#xD;&#xA;                });&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            self.tiles[index as usize].1 = TileState::Flipped;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn end(&amp;mut self) {&#xD;&#xA;            // Your end logic goes here&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;while trying to deploy the ink smart contract i get this error,I don't have an idea how to fix it&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;12 |         tiles: Vec&lt;(TileContent, TileState)&gt;,&#xD;&#xA;   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ink::parity_scale_codec::Decode` is not implemented for `Vec&lt;(TileContent, TileState)&gt;`&#xD;&#xA;   |&#xD;&#xA;   = help: the trait `ink::parity_scale_codec::Decode` is implemented for `Vec&lt;T&gt;`&#xD;&#xA;   = note: required for `Vec&lt;(TileContent, TileState)&gt;` to implement `Packed`&#xD;&#xA;   = note: required for `Vec&lt;(TileContent, TileState)&gt;` to implement `StorableHint&lt;()&gt;`&#xD;&#xA;   = note: required for `Vec&lt;(TileContent, TileState)&gt;` to implement `AutoStorableHint&lt;ManualKey&lt;760146325&gt;&gt;`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `[(TileContent, TileState)]: Encode` is not satisfied&#xD;&#xA;  --&gt; \\?\C:\Users\Admin\Documents\mightymeld-memory\contracts\tastymatch\lib.rs:12:16&#xD;&#xA;   |&#xD;&#xA;12 |         tiles: Vec&lt;(TileContent, TileState)&gt;,&#xD;&#xA;   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `[(TileContent, TileState)]`&#xD;&#xA;   |&#xD;&#xA;   = help: the following other types implement trait `Encode`:&#xD;&#xA;             [T; N]&#xD;&#xA;             [T]&#xD;&#xA;   = note: required for `Vec&lt;(TileContent, TileState)&gt;` to implement `Encode`&#xD;&#xA;   = note: required for `Vec&lt;(TileContent, TileState)&gt;` to implement `Packed`&#xD;&#xA;   = note: required for `Vec&lt;(TileContent, TileState)&gt;` to implement `StorableHint&lt;()&gt;`&#xD;&#xA;   = note: required for `Vec&lt;(TileContent, TileState)&gt;` to implement `AutoStorableHint&lt;ManualKey&lt;760146325&gt;&gt;`&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `[(TileContent, TileState)]: Encode` is not satisfied&#xD;&#xA;  --&gt; \\?\C:\Users\Admin\Documents\mightymeld-memory\contracts\tastymatch\lib.rs:50:53&#xD;&#xA;   |&#xD;&#xA;50 |         pub fn get_tiles(&amp;self, tile_count: u32) -&gt; Vec&lt;(TileContent, TileState)&gt; {&#xD;&#xA;   |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `[(TileContent, TileState)]`&#xD;&#xA;   |&#xD;&#xA;   = help: the following other types implement trait `Encode`:&#xD;&#xA;             [T; N]&#xD;&#xA;             [T]&#xD;&#xA;   = note: required for `Vec&lt;(TileContent, TileState)&gt;` to implement `Encode`&#xD;&#xA;note: required by a bound in `DispatchOutput`&#xD;&#xA;  --&gt; C:\Users\Admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ink-5.0.0-rc.3\src\codegen\dispatch\type_check.rs:69:8&#xD;&#xA;   |&#xD;&#xA;67 | pub struct DispatchOutput&lt;T&gt;(T)&#xD;&#xA;   |            -------------- required by a bound in this struct&#xD;&#xA;68 | where&#xD;&#xA;69 |     T: scale::Encode + 'static;&#xD;&#xA;   |        ^^^^^^^^^^^^^ required by this bound in `DispatchOutput`&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="45484" PostHistoryTypeId="1" PostId="11137" RevisionGUID="bd7c8150-6a8f-4109-abfb-2114cab5b0ba" CreationDate="2024-03-10T21:38:38.097" UserId="4093" Text="Error while creating Vector" ContentLicense="CC BY-SA 4.0" />
  <row Id="45485" PostHistoryTypeId="3" PostId="11137" RevisionGUID="bd7c8150-6a8f-4109-abfb-2114cab5b0ba" CreationDate="2024-03-10T21:38:38.097" UserId="4093" Text="|polkadot|ink|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45486" PostHistoryTypeId="2" PostId="11138" RevisionGUID="54c632c3-c222-4743-8f35-c924adbf6928" CreationDate="2024-03-11T06:29:55.680" UserId="5154" Text="I am working on substrate.where I want to use some of create like pinata_sdk,Openssl etc but I am not able to import or add in cargo.tmol file where I add I get this error: `&#xD;&#xA;&#xD;&#xA;&gt; --- stderr&#xD;&#xA;     Compiling sp-io v23.0.0 (https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2f)&#xD;&#xA;  error[E0152]: found duplicate lang item `panic_impl`&#xD;&#xA;      --&gt; /home/ubuntu/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/io/src/lib.rs:1664:1&#xD;&#xA;       |&#xD;&#xA;  1664 | / pub fn panic(info: &amp;core::panic::PanicInfo) -&gt; ! {&#xD;&#xA;  1665 | |     let message = sp_std::alloc::format!(&quot;{}&quot;, info);&#xD;&#xA;  1666 | |     #[cfg(feature = &quot;improved_panic_error_reporting&quot;)]&#xD;&#xA;  1667 | |     {&#xD;&#xA;  ...    |&#xD;&#xA;  1674 | |     }&#xD;&#xA;  1675 | | }&#xD;&#xA;       | |_^&#xD;&#xA;       |&#xD;&#xA;       = note: the lang item is first defined in crate `std` (which `bytes` depends on)&#xD;&#xA;       = note: first definition in `std` loaded from /home/ubuntu/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-2bf3225a2841264f.rlib&#xD;&#xA;       = note: second definition in the local crate (`sp_io`)&#xD;&#xA;&#xD;&#xA;`.  I stuck in this from last 3 day I try all solution out there.  " ContentLicense="CC BY-SA 4.0" />
  <row Id="45488" PostHistoryTypeId="1" PostId="11138" RevisionGUID="54c632c3-c222-4743-8f35-c924adbf6928" CreationDate="2024-03-11T06:29:55.680" UserId="5154" Text="Not able to add any crates in substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="45489" PostHistoryTypeId="3" PostId="11138" RevisionGUID="54c632c3-c222-4743-8f35-c924adbf6928" CreationDate="2024-03-11T06:29:55.680" UserId="5154" Text="|substrate-node-template|substrate-node|substrate-parachain-template|pallet-contracts|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45490" PostHistoryTypeId="2" PostId="11139" RevisionGUID="708c63fe-035e-45f0-9302-f6ae66883d72" CreationDate="2024-03-11T10:15:08.013" UserId="251" Text="After 2 years. We have a built-in multi-block migration method now!&#xD;&#xA;&#xD;&#xA;Check https://github.com/paritytech/polkadot-sdk/pull/1781 for more detail." ContentLicense="CC BY-SA 4.0" />
  <row Id="45492" PostHistoryTypeId="2" PostId="11140" RevisionGUID="015b30e9-29ec-439e-bc65-50127133d793" CreationDate="2024-03-11T10:19:17.683" UserId="2005" Text="you didn't derive `Encode, Decode` for `TileState`&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;#[derive(Debug, PartialEq, Eq, Clone, Copy)]&#xD;&#xA;#[ink::scale_derive(Encode, Decode, TypeInfo)]&#xD;&#xA;pub enum TileState {&#xD;&#xA;    Start,&#xD;&#xA;    Flipped,&#xD;&#xA;    Matched,&#xD;&#xA;}&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="45494" PostHistoryTypeId="50" PostId="7204" RevisionGUID="b2eccf13-06ae-4584-bac7-b6b1639a4e99" CreationDate="2024-03-11T12:02:05.287" UserId="-1" />
  <row Id="45507" PostHistoryTypeId="2" PostId="11147" RevisionGUID="cb97a43b-a547-4733-b9ce-3b89fcc62d98" CreationDate="2024-03-11T14:57:56.493" UserId="3750" Text="As far as I know, one of the possibilities to generate random numbers within a substrate chain is by using the [pallet_insecure_randomness_collective_flip][1]. However, the documentation explicitly states that is not recommended for use in production: &#xD;&#xA;&#xD;&#xA;*&quot;The produced values do not fulfill the cryptographic requirements for random numbers. Should not be used for high-stake production use-cases.&quot;*&#xD;&#xA;&#xD;&#xA;I'm wondering what those cryptographic requirements are and if there are any other alternatives to produce random (or pseudo-random) numbers on a substrate chain.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://paritytech.github.io/polkadot-sdk/master/pallet_insecure_randomness_collective_flip/index.html " ContentLicense="CC BY-SA 4.0" />
  <row Id="45509" PostHistoryTypeId="1" PostId="11147" RevisionGUID="cb97a43b-a547-4733-b9ce-3b89fcc62d98" CreationDate="2024-03-11T14:57:56.493" UserId="3750" Text="Cryptographic requirements for random numbers on substrate chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="45510" PostHistoryTypeId="3" PostId="11147" RevisionGUID="cb97a43b-a547-4733-b9ce-3b89fcc62d98" CreationDate="2024-03-11T14:57:56.493" UserId="3750" Text="|substrate-node|cryptography|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45511" PostHistoryTypeId="50" PostId="7220" RevisionGUID="e640f595-c91f-469b-955b-963af5cc4d77" CreationDate="2024-03-11T17:05:50.680" UserId="-1" />
  <row Id="45512" PostHistoryTypeId="2" PostId="11148" RevisionGUID="b0039b1c-ddb0-411e-a1e0-be0802e0c865" CreationDate="2024-03-11T17:06:28.137" UserId="5213" Text="So, I am working with substrate-node-template . I already changed `tokenSymbol` and `tokenDecimals`,i want to `mint specific amount to native coin`(initially) , but confused where to start . Any insight would be useful .  " ContentLicense="CC BY-SA 4.0" />
  <row Id="45514" PostHistoryTypeId="1" PostId="11148" RevisionGUID="b0039b1c-ddb0-411e-a1e0-be0802e0c865" CreationDate="2024-03-11T17:06:28.137" UserId="5213" Text="Change chain_specs to mint custom total supply of custom coin" ContentLicense="CC BY-SA 4.0" />
  <row Id="45515" PostHistoryTypeId="3" PostId="11148" RevisionGUID="b0039b1c-ddb0-411e-a1e0-be0802e0c865" CreationDate="2024-03-11T17:06:28.137" UserId="5213" Text="|substrate-node-template|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45516" PostHistoryTypeId="2" PostId="11149" RevisionGUID="f85a371f-8053-48cd-ba86-4f1a7c18cd9a" CreationDate="2024-03-12T00:53:39.987" UserId="4093" Text="I wrote a smart contract ,it compliled but when deploying to https://contracts-ui.substrate.io/instantiate it doesn't deploy[![Error Image][1]][1]&#xD;&#xA;&#xD;&#xA;I get this error &#xD;&#xA;&lt;br&gt;&#xD;&#xA;**Invalid contract file format. Please upload the generated .contract bundle for your smart contract**.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#![cfg_attr(not(feature = &quot;std&quot;), no_std, no_main)]&#xD;&#xA;&#xD;&#xA;// use ink_lang as ink;&#xD;&#xA;&#xD;&#xA;#[ink::contract]&#xD;&#xA;mod tastymatch {&#xD;&#xA;    use ink::{&#xD;&#xA;        prelude::vec::Vec&#xD;&#xA;    };&#xD;&#xA;    #[ink(storage)]&#xD;&#xA;    pub struct MemoryGame {&#xD;&#xA;        tiles: Vec&lt;(TileContent, TileState)&gt;,&#xD;&#xA;        try_count: u32,&#xD;&#xA;        best_count: u32,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, Clone, Copy)]&#xD;&#xA;    #[ink::scale_derive(Encode, Decode, TypeInfo)]&#xD;&#xA;    pub enum TileContent {&#xD;&#xA;        Hearts,&#xD;&#xA;        WaterDrop,&#xD;&#xA;        DiceSixFacesFive,&#xD;&#xA;        Umbrella,&#xD;&#xA;        Cube,&#xD;&#xA;        BeachBall,&#xD;&#xA;        Dragonfly,&#xD;&#xA;        Hummingbird,&#xD;&#xA;        FlowerEmblem,&#xD;&#xA;        OpenBook,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[derive(Debug, PartialEq, Eq, Clone, Copy)]&#xD;&#xA;    #[ink::scale_derive(Encode, Decode, TypeInfo)]&#xD;&#xA;    pub enum TileState {&#xD;&#xA;        Start,&#xD;&#xA;        Flipped,&#xD;&#xA;        Matched,&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    impl MemoryGame {&#xD;&#xA;        #[ink(constructor)]&#xD;&#xA;        pub fn new() -&gt; Self {&#xD;&#xA;            MemoryGame {&#xD;&#xA;                tiles: Vec::new(),&#xD;&#xA;                try_count: 0,&#xD;&#xA;                best_count: 0,&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn get_tiles(&amp;mut self, tile_count: u32) -&gt; Vec&lt;(TileContent, TileState)&gt; {&#xD;&#xA;            // Throw error if count is not even.&#xD;&#xA;            assert!(tile_count % 2 == 0, &quot;The number of tiles must be even.&quot;);&#xD;&#xA;&#xD;&#xA;            // Use the existing list if it exists.&#xD;&#xA;            if !self.tiles.is_empty() {&#xD;&#xA;                return self.tiles.clone();&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            let pair_count = tile_count / 2;&#xD;&#xA;&#xD;&#xA;            // Take only the items we need from the list of possibilities.&#xD;&#xA;            let used_tile_contents = [&#xD;&#xA;                TileContent::Hearts,&#xD;&#xA;                TileContent::WaterDrop,&#xD;&#xA;                TileContent::DiceSixFacesFive,&#xD;&#xA;                TileContent::Umbrella,&#xD;&#xA;                TileContent::Cube,&#xD;&#xA;                TileContent::BeachBall,&#xD;&#xA;                TileContent::Dragonfly,&#xD;&#xA;                TileContent::Hummingbird,&#xD;&#xA;                TileContent::FlowerEmblem,&#xD;&#xA;                TileContent::OpenBook,&#xD;&#xA;            ];&#xD;&#xA;&#xD;&#xA;            // Double the array and shuffle it.&#xD;&#xA;            // let mut rng = ink::env::hash::Sha2x256::default();&#xD;&#xA;            let shuffled_contents = used_tile_contents&#xD;&#xA;                .iter()&#xD;&#xA;                .cycle()&#xD;&#xA;                .take(pair_count as usize * 2)&#xD;&#xA;                .copied()&#xD;&#xA;                .collect::&lt;Vec&lt;_&gt;&gt;();&#xD;&#xA;            // shuffled_contents.shuffle(&amp;mut rng);&#xD;&#xA;&#xD;&#xA;            self.tiles = shuffled_contents&#xD;&#xA;                .into_iter()&#xD;&#xA;                .map(|content| (content, TileState::Start))&#xD;&#xA;                .collect();&#xD;&#xA;&#xD;&#xA;            self.tiles.clone()&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        #[ink(message)]&#xD;&#xA;        pub fn flip(&amp;mut self, index: u32) {&#xD;&#xA;            // Is the tile already flipped? We don’t allow flipping it back.&#xD;&#xA;            if self.tiles[index as usize].1 == TileState::Flipped {&#xD;&#xA;                return;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // How many tiles are currently flipped?&#xD;&#xA;            let flipped_tiles = self&#xD;&#xA;                .tiles&#xD;&#xA;                .iter()&#xD;&#xA;                .filter(|(_, state)| *state == TileState::Flipped)&#xD;&#xA;                .count();&#xD;&#xA;&#xD;&#xA;            // Don't allow more than 2 tiles to be flipped at once.&#xD;&#xA;            if flipped_tiles == 2 {&#xD;&#xA;                return;&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            // On the second flip, check if the tiles match.&#xD;&#xA;            if flipped_tiles == 1 {&#xD;&#xA;                self.try_count += 1;&#xD;&#xA;&#xD;&#xA;                let already_flipped_tile = self&#xD;&#xA;                    .tiles&#xD;&#xA;                    .iter()&#xD;&#xA;                    .find(|(_, state)| *state == TileState::Flipped)&#xD;&#xA;                    .unwrap()&#xD;&#xA;                    .0;&#xD;&#xA;                let just_flipped_tile = self.tiles[index as usize].0;&#xD;&#xA;&#xD;&#xA;                let new_state = if already_flipped_tile == just_flipped_tile {&#xD;&#xA;                    TileState::Matched&#xD;&#xA;                } else {&#xD;&#xA;                    TileState::Start&#xD;&#xA;                };&#xD;&#xA;&#xD;&#xA;                // If all tiles are matched, the game is over.&#xD;&#xA;                if self&#xD;&#xA;                    .tiles&#xD;&#xA;                    .iter()&#xD;&#xA;                    .all(|(_, state)| *state == TileState::Matched)&#xD;&#xA;                {&#xD;&#xA;                    self.end();&#xD;&#xA;                }&#xD;&#xA;&#xD;&#xA;                self.tiles.iter_mut().for_each(|(_, state)| {&#xD;&#xA;                    if *state == TileState::Flipped {&#xD;&#xA;                        *state = new_state;&#xD;&#xA;                    }&#xD;&#xA;                });&#xD;&#xA;            }&#xD;&#xA;&#xD;&#xA;            self.tiles[index as usize].1 = TileState::Flipped;&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;        fn end(&amp;mut self) {&#xD;&#xA;            // Your end logic goes here&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;cargo.toml&#xD;&#xA;```toml&#xD;&#xA;[package]&#xD;&#xA;name = &quot;tastymatch&quot;&#xD;&#xA;version = &quot;0.1.0&quot;&#xD;&#xA;authors = [&quot;[your_name] &lt;[your_email]&gt;&quot;]&#xD;&#xA;edition = &quot;2021&quot;&#xD;&#xA;&#xD;&#xA;[dependencies]&#xD;&#xA;ink = { version = &quot;5.0.0-rc.2&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;scale = { package = &quot;parity-scale-codec&quot;, version = &quot;3&quot;, default-features = false, features = [&quot;derive&quot;] }&#xD;&#xA;scale-info = { version = &quot;2.6&quot;, default-features = false, features = [&quot;derive&quot;], optional = true }&#xD;&#xA;&#xD;&#xA;[dev-dependencies]&#xD;&#xA;ink_e2e = &quot;4.2.0&quot;&#xD;&#xA;hex-literal = { version = &quot;0.4.1&quot; }&#xD;&#xA;sp-core = { version = &quot;21.0.0&quot;, default-features = false }&#xD;&#xA;&#xD;&#xA;[lib]&#xD;&#xA;path = &quot;lib.rs&quot;&#xD;&#xA;&#xD;&#xA;[features]&#xD;&#xA;default = [&quot;std&quot;]&#xD;&#xA;std = [&#xD;&#xA;    &quot;ink/std&quot;,&#xD;&#xA;    &quot;scale/std&quot;,&#xD;&#xA;    &quot;scale-info/std&quot;,&#xD;&#xA;]&#xD;&#xA;ink-as-dependency = []&#xD;&#xA;e2e-tests = []&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/xW0gk.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="45518" PostHistoryTypeId="1" PostId="11149" RevisionGUID="f85a371f-8053-48cd-ba86-4f1a7c18cd9a" CreationDate="2024-03-12T00:53:39.987" UserId="4093" Text="Error deploying to https://contracts-ui.substrate.io/instantiate" ContentLicense="CC BY-SA 4.0" />
  <row Id="45519" PostHistoryTypeId="3" PostId="11149" RevisionGUID="f85a371f-8053-48cd-ba86-4f1a7c18cd9a" CreationDate="2024-03-12T00:53:39.987" UserId="4093" Text="|polkadot|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45520" PostHistoryTypeId="2" PostId="11150" RevisionGUID="7832b66b-d6b7-40df-98ae-1fde80b331db" CreationDate="2024-03-12T05:43:45.507" UserId="5209" Text="So i was working with substrate-node-template . I can see how total issuance is getting calculated from substrate node template but confused of how would i set up inactive issuance . What are the significance behind inactive issuance . How it get's increased after specific time . How it's related to total issuance ?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45522" PostHistoryTypeId="1" PostId="11150" RevisionGUID="7832b66b-d6b7-40df-98ae-1fde80b331db" CreationDate="2024-03-12T05:43:45.507" UserId="5209" Text="How inactive issuance get's calculated or how do we customize it in substrate-node-template" ContentLicense="CC BY-SA 4.0" />
  <row Id="45523" PostHistoryTypeId="3" PostId="11150" RevisionGUID="7832b66b-d6b7-40df-98ae-1fde80b331db" CreationDate="2024-03-12T05:43:45.507" UserId="5209" Text="|substrate-node-template|chainspec|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45524" PostHistoryTypeId="2" PostId="11151" RevisionGUID="3e6bec84-02c1-452c-8a5b-3e56f1625abf" CreationDate="2024-03-12T08:38:34.420" UserId="4862" Text="My node is on the substrate branch polkadot-v0.9.19. I have bumped it to polkadot-v0.9.22. After bumping the version I am trying to build the node in release mode using the following command.&#xD;&#xA;&#xD;&#xA;    cargo build --release&#xD;&#xA;&#xD;&#xA;Doing so gave me the following error.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;error: failed to select a version for `signature`.&#xD;&#xA;    ... required by package `ecdsa v0.13.3`&#xD;&#xA;    ... which satisfies dependency `ecdsa-core = &quot;^0.13&quot;` of package `k256 v0.10.4`&#xD;&#xA;    ... which satisfies dependency `k256 = &quot;^0.10.4&quot;` of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.22#616d33ea)`&#xD;&#xA;    (/mnt/d/rrr/my-node-rrr/node/runtime)`&#xD;&#xA;    ... which satisfies path dependency `mychain-runtime` (locked to 4.0.0) of package `mychain-cli v4.0.0 (/mnt/d/rrr/my-node-rrr/node/cli)`&#xD;&#xA;versions that meet the requirements `&gt;=1.3.1, &lt;1.5` are: 1.4.0, 1.3.2, 1.3.1&#xD;&#xA;&#xD;&#xA;all possible versions conflict with previously selected packages.&#xD;&#xA;&#xD;&#xA;  previously selected package `signature v1.5.0`&#xD;&#xA;    ... which satisfies dependency `signature = &quot;&gt;=1.3.1&quot;` (locked to 1.5.0) of package `ed25519 v1.5.2`&#xD;&#xA;    ... which satisfies dependency `ed25519 = &quot;^1&quot;` (locked to 1.5.2) of package `ed25519-dalek v1.0.1`&#xD;&#xA;    ... which satisfies dependency `ed25519-dalek = &quot;^1.0.1&quot;` (locked to 1.0.1) of package `libp2p-core v0.32.1`&#xD;&#xA;    ... which satisfies dependency `libp2p-core = &quot;^0.32.1&quot;` of package `libp2p v0.44.0`&#xD;&#xA;    ... which satisfies dependency `libp2p = &quot;^0.44.0&quot;` of package `sc-authority-discovery v0.10.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.22#616d33ea)`&#xD;&#xA;    ... which satisfies git dependency `sc-authority-discovery` of package `mychain-cli v4.0.0 (/mnt/d/rrr/my-node-rrr/node/cli)`&#xD;&#xA;&#xD;&#xA;failed to select a version for `signature` which could resolve this conflict&#xD;&#xA;```&#xD;&#xA;At this point, i decided to update the dependencies using&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;cargo update&#xD;&#xA;```&#xD;&#xA;and got the following error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; Updating crates.io index&#xD;&#xA;    Updating git repository `https://github.com/paritytech/substrate`&#xD;&#xA;    Updating git repository `https://github.com/rust-blockchain/evm`&#xD;&#xA;    Updating git repository `https://github.com/paritytech/frontier`&#xD;&#xA;error: no matching package named `evm-gasometer` found&#xD;&#xA;location searched: https://github.com/rust-blockchain/evm?branch=master&#xD;&#xA;required by package `evm-tracing-events v0.1.0 (/mnt/d/rrr/my-node-rrr/primitives/rpc/evm-tracing-events)`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How do I resolve this issue? There is no package named 'evm-gasometer' in the master branch of evm repo. What is the branch I should be using? How do i fix this so that the node builds successfully.&#xD;&#xA;&#xD;&#xA;I have a rust toolchain file with the following contents.&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[toolchain]&#xD;&#xA;channel = &quot;nightly-2023-11-01-x86_64-unknown-linux-gnu&quot;&#xD;&#xA;components = [ &quot;rustfmt&quot;, &quot;clippy&quot; ]&#xD;&#xA;targets = [ &quot;wasm32-unknown-unknown&quot; ]&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45526" PostHistoryTypeId="1" PostId="11151" RevisionGUID="3e6bec84-02c1-452c-8a5b-3e56f1625abf" CreationDate="2024-03-12T08:38:34.420" UserId="4862" Text="No matching package named 'evm-gasometer found'" ContentLicense="CC BY-SA 4.0" />
  <row Id="45527" PostHistoryTypeId="3" PostId="11151" RevisionGUID="3e6bec84-02c1-452c-8a5b-3e56f1625abf" CreationDate="2024-03-12T08:38:34.420" UserId="4862" Text="|runtime-upgrade|evm|upgrade|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45528" PostHistoryTypeId="2" PostId="11152" RevisionGUID="69cb8922-092d-4c08-b8a3-398eca84ac1e" CreationDate="2024-03-12T12:02:39.210" UserId="251" Text="Modify this part https://github.com/substrate-developer-hub/substrate-parachain-template/blob/4f8ddf87776bcb2c5df1babc2725a397afa145ea/node/src/chain_spec.rs#L195-L197.&#xD;&#xA;&#xD;&#xA;Add more genesis accounts with balance in that `Vec`. It's a tuple `(who, amount)`." ContentLicense="CC BY-SA 4.0" />
  <row Id="45530" PostHistoryTypeId="2" PostId="11153" RevisionGUID="b3f35a49-3be9-411d-bede-711e4e975792" CreationDate="2024-03-12T15:28:54.213" UserId="85" Text="Also run the tests with `--release` mode on. That will run the tests more efficiently." ContentLicense="CC BY-SA 4.0" />
  <row Id="45532" PostHistoryTypeId="50" PostId="8881" RevisionGUID="b8031dad-11d8-403c-be73-1f75a01c599d" CreationDate="2024-03-12T18:06:15.887" UserId="-1" />
  <row Id="45533" PostHistoryTypeId="2" PostId="11154" RevisionGUID="f753ef3a-84bf-42dc-bca9-a837c7665ef2" CreationDate="2024-03-13T00:12:32.657" UserId="3750" Text="I would like to know how I can set a threshold of 10 entries so that it's the maximum number of values that can be stored in a StorageMap structure.&#xD;&#xA;&#xD;&#xA;My struct is the following:&#xD;&#xA;&#xD;&#xA;    #[pallet::storage]&#xD;&#xA;    pub type CoinStorage&lt;T&gt; = StorageMap&lt;_, Blake2_128Concat, AccountIdOf&lt;T&gt;, Coin, OptionQuery&gt;;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45535" PostHistoryTypeId="1" PostId="11154" RevisionGUID="f753ef3a-84bf-42dc-bca9-a837c7665ef2" CreationDate="2024-03-13T00:12:32.657" UserId="3750" Text="Set max amount of entries that can be stored in StorageMap" ContentLicense="CC BY-SA 4.0" />
  <row Id="45536" PostHistoryTypeId="3" PostId="11154" RevisionGUID="f753ef3a-84bf-42dc-bca9-a837c7665ef2" CreationDate="2024-03-13T00:12:32.657" UserId="3750" Text="|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45537" PostHistoryTypeId="2" PostId="11155" RevisionGUID="38c4f20b-5945-4734-ae8b-a97cfe42c515" CreationDate="2024-03-13T01:23:51.553" UserId="5218" Text="Issue: &#xD;&#xA;Currently, I have a parachain and a relay chain running on Rococo testnet locally. I'm having trouble connecting my node to the parachain network (0 peers to 1 peer). &#xD;&#xA;&#xD;&#xA;Goal:&#xD;&#xA;I'm trying to connect my libp2p node to the parachain network, with the indication of +1 peer in the parachain network. I'm at a crossroads with how to implement my node as &quot;Alive&quot; or &quot;IsOnline&quot; in the parachain Rococo network. &#xD;&#xA;&#xD;&#xA;Method:&#xD;&#xA;I'm trying to use local mechanisms to discover peers and connect to the parachain network, using mdns and dht. However, I can't tell if I'm implementing the methods properly. &#xD;&#xA;&#xD;&#xA;Confusion:&#xD;&#xA;Peer Routing isn't able to locate closestPeers using the 'key'. I'm having trouble with discovering myself on the parachain network.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My libp2p configuration: &#xD;&#xA;const options = {&#xD;&#xA;            peerId: peerId,&#xD;&#xA;            addresses: {&#xD;&#xA;                listen: ['/ip4/192.168.1.212/tcp/0/ws']&#xD;&#xA;            },&#xD;&#xA;            transports: [&#xD;&#xA;              tcp(),&#xD;&#xA;              webSockets(),&#xD;&#xA;            ],&#xD;&#xA;            connectionEncryption: [noise()],&#xD;&#xA;            streamMuxers: [yamux(), mplex()],&#xD;&#xA;            peerDiscovery: [&#xD;&#xA;                mdns(),&#xD;&#xA;                new kadDHT({&#xD;&#xA;                    kBucketSize: 20&#xD;&#xA;                })&#xD;&#xA;            ],&#xD;&#xA;            services: {&#xD;&#xA;                identify: identify(),&#xD;&#xA;                ping: ping({&#xD;&#xA;                    protocolPrefix: 'ipfs',&#xD;&#xA;                    interval: 10000,&#xD;&#xA;                    timeout: 10000,&#xD;&#xA;                }),&#xD;&#xA;                kadDHT: kadDHT({&#xD;&#xA;                    clientMode: false,&#xD;&#xA;                    kBucketSize: 20&#xD;&#xA;                })&#xD;&#xA;            },&#xD;&#xA;            config: {&#xD;&#xA;                peerDiscovery: {&#xD;&#xA;                    autoDial: true,&#xD;&#xA;                    mdns: {&#xD;&#xA;                      interval: 10000,&#xD;&#xA;                      enabled: true&#xD;&#xA;                    },&#xD;&#xA;                    kadDHT: {&#xD;&#xA;                        kBucketSize: 20,&#xD;&#xA;                        enabled: true,&#xD;&#xA;                        randomWalk: {&#xD;&#xA;                          enabled: true,&#xD;&#xA;                          interval: 300e3,&#xD;&#xA;                          timeout: 10e3&#xD;&#xA;                        }&#xD;&#xA;                      }&#xD;&#xA;                },&#xD;&#xA;            },&#xD;&#xA;            connectionManager: {&#xD;&#xA;                autoDial: true,&#xD;&#xA;                maxConnections: 1000,&#xD;&#xA;                minConnections: 10,&#xD;&#xA;                dialTimeout: 10000,&#xD;&#xA;            },&#xD;&#xA;        }&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45539" PostHistoryTypeId="1" PostId="11155" RevisionGUID="38c4f20b-5945-4734-ae8b-a97cfe42c515" CreationDate="2024-03-13T01:23:51.553" UserId="5218" Text="Connect a local node to the Rococo Parachain Network" ContentLicense="CC BY-SA 4.0" />
  <row Id="45540" PostHistoryTypeId="3" PostId="11155" RevisionGUID="38c4f20b-5945-4734-ae8b-a97cfe42c515" CreationDate="2024-03-13T01:23:51.553" UserId="5218" Text="|parachain|substrate-node|rococo|libp2p|peers|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45541" PostHistoryTypeId="5" PostId="11155" RevisionGUID="387cedff-12ba-4690-9c72-f39b492cc314" CreationDate="2024-03-13T01:29:15.567" UserId="5218" Comment="added 393 characters in body" Text="Issue: &lt;br/&gt;&#xD;&#xA;Currently, I have a parachain and a relay chain running on Rococo testnet locally. I'm having trouble connecting my node to the parachain network (0 peers to 1 peer). &#xD;&#xA;&#xD;&#xA;Goal: &lt;br/&gt;&#xD;&#xA;I'm trying to connect my libp2p node to the parachain network, with the indication of +1 peer in the parachain network. I'm at a crossroads with how to implement my node as &quot;Alive&quot; or &quot;IsOnline&quot; in the parachain Rococo network. &#xD;&#xA;&#xD;&#xA;Method: &lt;br/&gt;&#xD;&#xA;I'm trying to use local mechanisms to discover peers and connect to the parachain network, using mdns and dht. However, I can't tell if I'm implementing the methods properly. &#xD;&#xA;&#xD;&#xA;Confusion: &lt;br/&gt;&#xD;&#xA;Peer Routing isn't able to locate closestPeers using the 'key'. I'm having trouble with discovering myself on the parachain network.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My libp2p configuration: &lt;br/&gt;&#xD;&#xA;const options = { &lt;br/&gt;&#xD;&#xA;            peerId: peerId, &lt;br/&gt;&#xD;&#xA;            addresses: { &lt;br/&gt;&#xD;&#xA;                listen: ['/ip4/192.168.1.212/tcp/0/ws'] &lt;br/&gt;&#xD;&#xA;            }, &lt;br/&gt;&#xD;&#xA;            transports: [ &lt;br/&gt;&#xD;&#xA;              tcp(), &lt;br/&gt;&#xD;&#xA;              webSockets(), &lt;br/&gt;&#xD;&#xA;            ], &lt;br/&gt;&#xD;&#xA;            connectionEncryption: [noise()], &lt;br/&gt;&#xD;&#xA;            streamMuxers: [yamux(), mplex()], &lt;br/&gt;&#xD;&#xA;            peerDiscovery: [ &lt;br/&gt;&#xD;&#xA;                mdns(), &lt;br/&gt;&#xD;&#xA;                new kadDHT({ &lt;br/&gt;&#xD;&#xA;                    kBucketSize: 20 &lt;br/&gt;&#xD;&#xA;                }) &lt;br/&gt;&#xD;&#xA;            ], &lt;br/&gt;&#xD;&#xA;            services: { &lt;br/&gt;&#xD;&#xA;                identify: identify(), &lt;br/&gt;&#xD;&#xA;                ping: ping({ &lt;br/&gt;&#xD;&#xA;                    protocolPrefix: 'ipfs', &lt;br/&gt;&#xD;&#xA;                    interval: 10000, &lt;br/&gt;&#xD;&#xA;                    timeout: 10000, &lt;br/&gt;&#xD;&#xA;                }), &lt;br/&gt;&#xD;&#xA;                kadDHT: kadDHT({ &lt;br/&gt;&#xD;&#xA;                    clientMode: false, &lt;br/&gt;&#xD;&#xA;                    kBucketSize: 20 &lt;br/&gt;&#xD;&#xA;                }) &lt;br/&gt;&#xD;&#xA;            }, &lt;br/&gt;&#xD;&#xA;            config: { &lt;br/&gt;&#xD;&#xA;                peerDiscovery: { &lt;br/&gt;&#xD;&#xA;                    autoDial: true, &lt;br/&gt;&#xD;&#xA;                    mdns: { &lt;br/&gt;&#xD;&#xA;                      interval: 10000, &lt;br/&gt;&#xD;&#xA;                      enabled: true &lt;br/&gt;&#xD;&#xA;                    }, &lt;br/&gt;&#xD;&#xA;                    kadDHT: { &lt;br/&gt;&#xD;&#xA;                        kBucketSize: 20, &lt;br/&gt;&#xD;&#xA;                        enabled: true, &lt;br/&gt;&#xD;&#xA;                        randomWalk: { &lt;br/&gt;&#xD;&#xA;                          enabled: true, &lt;br/&gt;&#xD;&#xA;                          interval: 300e3, &lt;br/&gt;&#xD;&#xA;                          timeout: 10e3 &lt;br/&gt;&#xD;&#xA;                        } &#xD;&#xA;                      } &#xD;&#xA;                }, &#xD;&#xA;            }, &lt;br/&gt;&#xD;&#xA;            connectionManager: { &lt;br/&gt;&#xD;&#xA;                autoDial: true, &lt;br/&gt;&#xD;&#xA;                maxConnections: 1000, &lt;br/&gt;&#xD;&#xA;                minConnections: 10, &lt;br/&gt;&#xD;&#xA;                dialTimeout: 10000, &lt;br/&gt;&#xD;&#xA;            }, &lt;br/&gt;&#xD;&#xA;        } &lt;br/&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**I apologize in advance for the terrible formatting**" ContentLicense="CC BY-SA 4.0" />
  <row Id="45542" PostHistoryTypeId="5" PostId="11155" RevisionGUID="67066947-96d1-4ec8-8dc9-1b1ec123e2ac" CreationDate="2024-03-13T01:33:52.303" UserId="5218" Comment="added 312 characters in body" Text="Issue: &lt;br/&gt;&#xD;&#xA;Currently, I have a parachain and a relay chain running on Rococo testnet locally. I'm having trouble connecting my node to the parachain network (0 peers to 1 peer). &#xD;&#xA;&#xD;&#xA;Goal: &lt;br/&gt;&#xD;&#xA;I'm trying to connect my libp2p node to the parachain network, with the indication of +1 peer in the parachain network. I'm at a crossroads with how to implement my node as &quot;Alive&quot; or &quot;IsOnline&quot; in the parachain Rococo network. &#xD;&#xA;&#xD;&#xA;Method: &lt;br/&gt;&#xD;&#xA;I'm trying to use local mechanisms to discover peers and connect to the parachain network, using mdns and dht. However, I can't tell if I'm implementing the methods properly. &#xD;&#xA;&#xD;&#xA;Confusion: &lt;br/&gt;&#xD;&#xA;Peer Routing isn't able to locate closestPeers using the 'key'. I'm having trouble with discovering myself on the parachain network.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;My libp2p configuration: &lt;br/&gt;&#xD;&#xA;const options = { &lt;br/&gt;&#xD;&#xA;            peerId: peerId, &lt;br/&gt;&#xD;&#xA;            addresses: { &lt;br/&gt;&#xD;&#xA;                listen: ['/ip4/192.168.1.212/tcp/0/ws'] &lt;br/&gt;&#xD;&#xA;            }, &lt;br/&gt;&#xD;&#xA;            transports: [ &lt;br/&gt;&#xD;&#xA;              tcp(), &lt;br/&gt;&#xD;&#xA;              webSockets(), &lt;br/&gt;&#xD;&#xA;            ], &lt;br/&gt;&#xD;&#xA;            connectionEncryption: [noise()], &lt;br/&gt;&#xD;&#xA;            streamMuxers: [yamux(), mplex()], &lt;br/&gt;&#xD;&#xA;            peerDiscovery: [ &lt;br/&gt;&#xD;&#xA;                mdns(), &lt;br/&gt;&#xD;&#xA;                new kadDHT({ &lt;br/&gt;&#xD;&#xA;                    kBucketSize: 20 &lt;br/&gt;&#xD;&#xA;                }) &lt;br/&gt;&#xD;&#xA;            ], &lt;br/&gt;&#xD;&#xA;            services: { &lt;br/&gt;&#xD;&#xA;                identify: identify(), &lt;br/&gt;&#xD;&#xA;                ping: ping({ &lt;br/&gt;&#xD;&#xA;                    protocolPrefix: 'ipfs', &lt;br/&gt;&#xD;&#xA;                    interval: 10000, &lt;br/&gt;&#xD;&#xA;                    timeout: 10000, &lt;br/&gt;&#xD;&#xA;                }), &lt;br/&gt;&#xD;&#xA;                kadDHT: kadDHT({ &lt;br/&gt;&#xD;&#xA;                    clientMode: false, &lt;br/&gt;&#xD;&#xA;                    kBucketSize: 20 &lt;br/&gt;&#xD;&#xA;                }) &lt;br/&gt;&#xD;&#xA;            }, &lt;br/&gt;&#xD;&#xA;            config: { &lt;br/&gt;&#xD;&#xA;                peerDiscovery: { &lt;br/&gt;&#xD;&#xA;                    autoDial: true, &lt;br/&gt;&#xD;&#xA;                    mdns: { &lt;br/&gt;&#xD;&#xA;                      interval: 10000, &lt;br/&gt;&#xD;&#xA;                      enabled: true &lt;br/&gt;&#xD;&#xA;                    }, &lt;br/&gt;&#xD;&#xA;                    kadDHT: { &lt;br/&gt;&#xD;&#xA;                        kBucketSize: 20, &lt;br/&gt;&#xD;&#xA;                        enabled: true, &lt;br/&gt;&#xD;&#xA;                        randomWalk: { &lt;br/&gt;&#xD;&#xA;                          enabled: true, &lt;br/&gt;&#xD;&#xA;                          interval: 300e3, &lt;br/&gt;&#xD;&#xA;                          timeout: 10e3 &lt;br/&gt;&#xD;&#xA;                        } &#xD;&#xA;                      } &#xD;&#xA;                }, &#xD;&#xA;            }, &lt;br/&gt;&#xD;&#xA;            connectionManager: { &lt;br/&gt;&#xD;&#xA;                autoDial: true, &lt;br/&gt;&#xD;&#xA;                maxConnections: 1000, &lt;br/&gt;&#xD;&#xA;                minConnections: 10, &lt;br/&gt;&#xD;&#xA;                dialTimeout: 10000, &lt;br/&gt;&#xD;&#xA;            }, &lt;br/&gt;&#xD;&#xA;        } &lt;br/&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Lastly, these are the trace logs from the parachain network. &lt;br/&gt;&#xD;&#xA;[Parachain] Adding a new known peer &lt;br/&gt;&#xD;&#xA;[Parachain] Known peer (Outbound) dropped from SetId(0) &lt;br/&gt;&#xD;&#xA;[Parachain] Peer disconnected, reputation: -256 to -256 &lt;br/&gt;&#xD;&#xA;**Immediate drop in connection after trying to add a new known peer**&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;**I apologize in advance for the terrible formatting**" ContentLicense="CC BY-SA 4.0" />
  <row Id="45543" PostHistoryTypeId="50" PostId="5453" RevisionGUID="0dbfd63e-9d52-4caf-a8c8-01337b6cb038" CreationDate="2024-03-13T05:06:15.760" UserId="-1" />
  <row Id="45546" PostHistoryTypeId="2" PostId="11157" RevisionGUID="41667807-fe02-42bc-8006-d0a980137d1e" CreationDate="2024-03-13T06:40:15.610" UserId="3752" Text="I'm utilizing the Polkadot branch v0.9.37 within a Substrate-based standalone chain. Presently, when deploying smart contracts using the latest version of Solidity, I encounter the following error:&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&gt; Gas estimation errored with the following message (see below). The&#xD;&#xA;&gt; transaction execution will likely fail. Do you want to force sending?&#xD;&#xA;&gt; Returned error: evm error: InvalidCode(Opcode(95))&#xD;&#xA;&#xD;&#xA;This error is because of new version of Solidity with PUSH0(0x5f) opcode &#xD;&#xA;&#xD;&#xA;Following are Questions &#xD;&#xA;&#xD;&#xA; - Should I update all pallets to the latest version, or would updating&#xD;&#xA;   just the Frontier pallet suffice?&#xD;&#xA; - If updating only the Frontier pallet is adequate, which version of&#xD;&#xA;   Frontier is compatible with `v0.9.37`?&#xD;&#xA;&#xD;&#xA;Please Answer" ContentLicense="CC BY-SA 4.0" />
  <row Id="45548" PostHistoryTypeId="1" PostId="11157" RevisionGUID="41667807-fe02-42bc-8006-d0a980137d1e" CreationDate="2024-03-13T06:40:15.610" UserId="3752" Text="Updating Frontier because of InvalidCode(Opcode(95))" ContentLicense="CC BY-SA 4.0" />
  <row Id="45549" PostHistoryTypeId="3" PostId="11157" RevisionGUID="41667807-fe02-42bc-8006-d0a980137d1e" CreationDate="2024-03-13T06:40:15.610" UserId="3752" Text="|smart-contract|evm|frontier|gas|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45550" PostHistoryTypeId="2" PostId="11158" RevisionGUID="0c63b962-0d56-47d2-b788-35d84c80b3f5" CreationDate="2024-03-13T09:18:02.180" UserId="2005" Text="you could store `BoundedBTreeMap` in `StorageValue`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub type CoinStorage &lt;T&gt; = StorageValue&lt;_, BoundedBTreeMap&lt;AccountIdOf&lt;T&gt;, Coin, ConstU32&lt;32&gt;&gt;, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think it would have the same complexity for insertion/deletion as `StorageMap` - O(logn)" ContentLicense="CC BY-SA 4.0" />
  <row Id="45552" PostHistoryTypeId="5" PostId="11158" RevisionGUID="d31f24a2-b61e-44df-9d89-7f7722b958ed" CreationDate="2024-03-13T10:59:16.343" UserId="2005" Comment="deleted 1 character in body" Text="you could store `BoundedBTreeMap` in `StorageValue`:&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;pub type CoinStorage&lt;T&gt; = StorageValue&lt;_, BoundedBTreeMap&lt;AccountIdOf&lt;T&gt;, Coin, ConstU32&lt;32&gt;&gt;, OptionQuery&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I think it would have the same complexity for insertion/deletion as `StorageMap` - O(logn)" ContentLicense="CC BY-SA 4.0" />
  <row Id="45553" PostHistoryTypeId="50" PostId="10950" RevisionGUID="fb960a7c-d95d-449c-bfdd-6f8a8f61a7c1" CreationDate="2024-03-13T11:01:00.113" UserId="-1" />
  <row Id="45554" PostHistoryTypeId="50" PostId="5986" RevisionGUID="c29ca1a7-58c4-483b-9e59-7275f6e17630" CreationDate="2024-03-13T14:08:51.137" UserId="-1" />
  <row Id="45555" PostHistoryTypeId="50" PostId="10985" RevisionGUID="254fe73f-c31d-483e-8569-0a4ae820ede6" CreationDate="2024-03-13T15:04:00.487" UserId="-1" />
  <row Id="45556" PostHistoryTypeId="2" PostId="11159" RevisionGUID="c1469f04-2bb9-4b31-8351-b0a966180e57" CreationDate="2024-03-13T19:19:47.330" UserId="5220" Text="I ran into this error on M1 and was able to solve it by downgrading to clang 14 as suggested by @kevindong on GitHub&#xD;&#xA;&#xD;&#xA;```sh&#xD;&#xA;brew install llvm@14&#xD;&#xA;export PATH=&quot;/opt/homebrew/opt/llvm@14/bin:$PATH&quot; &#xD;&#xA;clang --version # Should return 14&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;See: https://github.com/rust-rocksdb/rust-rocksdb/issues/768#issuecomment-1767143727" ContentLicense="CC BY-SA 4.0" />
  <row Id="45559" PostHistoryTypeId="2" PostId="11160" RevisionGUID="73c2d577-edc2-4f2c-96e9-8bddbe95f765" CreationDate="2024-03-14T11:47:54.343" UserId="4862" Text="I use wsl to build the node in release mode and get this error. I got over this issue by creating a file that is configured to act as a swap space for my system.&#xD;&#xA;Normally I do something like.&#xD;&#xA;```&#xD;&#xA;sudo allocate -l 4G /swapfile&#xD;&#xA;```&#xD;&#xA;Adjust the size according to your needs(not necessarily 4GB). File name need not be swapfile&#xD;&#xA;```&#xD;&#xA;sudo mkswap /swapfile&#xD;&#xA;```&#xD;&#xA;```&#xD;&#xA;sudo swapon /swapfile&#xD;&#xA;````&#xD;&#xA;Now you can check the configured swapfile using&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;sudo swapon --show&#xD;&#xA;```&#xD;&#xA;Try building the node again." ContentLicense="CC BY-SA 4.0" />
  <row Id="45561" PostHistoryTypeId="2" PostId="11161" RevisionGUID="4c4728b9-6a6e-4322-aece-cda6c6335095" CreationDate="2024-03-14T13:10:50.410" UserId="94" Text="In general it is the easiest to use a `CountedStorageMap` and check the number of entries before insertion, as the type itself does not enforce the limit.&#xD;&#xA;&#xD;&#xA;Using a `StorageValue&lt;_, BoundedBTreeMap` can be not ideal for parachains, since it will always load the whole value into the Proof, even when only a single element is accessed.  &#xD;&#xA;This implies that the number of elements must be configured to be conservatively low." ContentLicense="CC BY-SA 4.0" />
  <row Id="45563" PostHistoryTypeId="50" PostId="11010" RevisionGUID="92e5e717-ac91-46c2-a8a7-d26d0728504b" CreationDate="2024-03-14T14:04:45.580" UserId="-1" />
  <row Id="45564" PostHistoryTypeId="50" PostId="10998" RevisionGUID="1427ed5f-dc22-436d-a34c-06bb7f8f73b9" CreationDate="2024-03-14T15:07:05.940" UserId="-1" />
  <row Id="45565" PostHistoryTypeId="2" PostId="11162" RevisionGUID="dc076afe-5850-493e-9417-8c752d158ce3" CreationDate="2024-03-14T18:11:33.490" UserId="74" Text="Is there any prior work on allowing vesting accounts to participate in staking/democracy pallets?&#xD;&#xA;&#xD;&#xA;To be clear, I would like to use a locked balance from the vesting pallet to vote/stake." ContentLicense="CC BY-SA 4.0" />
  <row Id="45567" PostHistoryTypeId="1" PostId="11162" RevisionGUID="dc076afe-5850-493e-9417-8c752d158ce3" CreationDate="2024-03-14T18:11:33.490" UserId="74" Text="Is it possible to allow vesting balances to participant in staking and/or democracy" ContentLicense="CC BY-SA 4.0" />
  <row Id="45568" PostHistoryTypeId="3" PostId="11162" RevisionGUID="dc076afe-5850-493e-9417-8c752d158ce3" CreationDate="2024-03-14T18:11:33.490" UserId="74" Text="|staking|democracy|vesting|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45569" PostHistoryTypeId="50" PostId="10209" RevisionGUID="6de9e081-13e5-42c8-a531-ca2d2f18505c" CreationDate="2024-03-14T20:01:00.190" UserId="-1" />
  <row Id="45570" PostHistoryTypeId="2" PostId="11163" RevisionGUID="e900bdb1-3eb2-41b7-b9af-1c598f5dc87a" CreationDate="2024-03-14T20:51:31.257" UserId="2795" Text="I have a runtime constant declared in a pallet like this:&#xD;&#xA;```rust&#xD;&#xA;        /// How much space there is on the network.&#xD;&#xA;        #[pallet::constant]&#xD;&#xA;        type TotalSpacePledged: Get&lt;u128&gt;;&#xD;&#xA;```&#xD;&#xA;[Source code][1] &#xD;&#xA;&#xD;&#xA;And it is defined like in the runtime like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;    pub CreditSupply: Balance = Balances::total_issuance();&#xD;&#xA;    pub TotalSpacePledged: u128 = {&#xD;&#xA;        let sectors = solution_range_to_sectors(Subspace::solution_ranges().current);&#xD;&#xA;        sectors as u128 * MAX_PIECES_IN_SECTOR as u128 * Piece::SIZE as u128&#xD;&#xA;    };&#xD;&#xA;    pub BlockchainHistorySize: u128 = u128::from(Subspace::archived_history_size());&#xD;&#xA;    pub DynamicCostOfStorage: bool = RuntimeConfigs::enable_dynamic_cost_of_storage();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_fees::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;    type TotalSpacePledged = TotalSpacePledged;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, if I want to access the value using runtime_api as I have a full node running, I wrote the code like this:&#xD;&#xA;```rust&#xD;&#xA;sp_api::decl_runtime_apis! {&#xD;&#xA;    pub trait TotalSpacePledgedApi {&#xD;&#xA;        fn get_total_space_pledged() -&gt; u128;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl TotalSpacePledgedApi&lt;Block&gt; for Runtime {&#xD;&#xA;    fn get_total_space_pledged(&amp;self) -&gt; u128 {&#xD;&#xA;        self::TotalSpacePledged::get()&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[doc = r&quot; !!INTERNAL USE ONLY!!&quot;]&#xD;&#xA;    #[doc(hidden)]&#xD;&#xA;    fn __runtime_api_internal_call_api_at(&#xD;&#xA;        &amp;self,&#xD;&#xA;        at: &lt;Block as sp_api::__private::BlockT&gt;::Hash,&#xD;&#xA;        params: std::vec::Vec&lt;u8&gt;,&#xD;&#xA;        fn_name: &amp;dyn Fn(sp_api::__private::RuntimeVersion) -&gt; &amp;'static str,&#xD;&#xA;    ) -&gt; std::result::Result&lt;std::vec::Vec&lt;u8&gt;, sp_api::__private::ApiError&gt; {&#xD;&#xA;        todo!()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;[Source code][2] &#xD;&#xA;&#xD;&#xA;This throws error:&#xD;&#xA;```sh&#xD;&#xA;error[E0277]: the trait bound `Runtime: sp_api::Core&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;, CheckStorageAccess, DisablePallets)&gt;&gt;&gt;` is not satisfied&#xD;&#xA;   --&gt; crates/subspace-runtime/src/lib.rs:440:38&#xD;&#xA;    |&#xD;&#xA;440 | impl TotalSpacePledgedApi&lt;Block&gt; for Runtime {&#xD;&#xA;    |                                      ^^^^^^^ the trait `sp_api::Core&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;, CheckStorageAccess, DisablePallets)&gt;&gt;&gt;` is not implemented for `Runtime`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `sp_api::Core&lt;Block&gt;`:&#xD;&#xA;              &lt;domain_block_preprocessor::stateless_runtime::StatelessRuntime&lt;Block, Executor&gt; as sp_api::Core&lt;Block&gt;&gt;&#xD;&#xA;              &lt;RuntimeApiImpl&lt;__SrApiBlock__, RuntimeApiImplCall&gt; as sp_api::Core&lt;__SrApiBlock__&gt;&gt;&#xD;&#xA;note: required by a bound in `TotalSpacePledgedApi`&#xD;&#xA;   --&gt; crates/subspace-runtime/src/lib.rs:434:1&#xD;&#xA;    |&#xD;&#xA;434 | / sp_api::decl_runtime_apis! {&#xD;&#xA;435 | |     pub trait TotalSpacePledgedApi {&#xD;&#xA;436 | |         fn get_total_space_pledged() -&gt; u128;&#xD;&#xA;437 | |     }&#xD;&#xA;438 | | }&#xD;&#xA;    | |_^ required by this bound in `TotalSpacePledgedApi`&#xD;&#xA;    = note: this error originates in the macro `sp_api::decl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0050]: method `get_total_space_pledged` has 1 parameter but the declaration in trait `TotalSpacePledgedApi::get_total_space_pledged` has 2&#xD;&#xA;   --&gt; crates/subspace-runtime/src/lib.rs:441:32&#xD;&#xA;    |&#xD;&#xA;434 | / sp_api::decl_runtime_apis! {&#xD;&#xA;435 | |     pub trait TotalSpacePledgedApi {&#xD;&#xA;436 | |         fn get_total_space_pledged() -&gt; u128;&#xD;&#xA;437 | |     }&#xD;&#xA;438 | | }&#xD;&#xA;    | |_- trait requires 2 parameters&#xD;&#xA;...&#xD;&#xA;441 |       fn get_total_space_pledged(&amp;self) -&gt; u128 {&#xD;&#xA;    |                                  ^^^^^ expected 2 parameters, found 1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would appreciate if someone could help me here .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/subspace/subspace/blob/5d8b65740ff054b01ebcbaf5a905e74274c1a5d0/crates/pallet-transaction-fees/src/lib.rs#L87-L90&#xD;&#xA;  [2]: https://github.com/subspace/subspace/blob/5d8b65740ff054b01ebcbaf5a905e74274c1a5d0/crates/subspace-runtime/src/lib.rs#L434-L456" ContentLicense="CC BY-SA 4.0" />
  <row Id="45572" PostHistoryTypeId="1" PostId="11163" RevisionGUID="e900bdb1-3eb2-41b7-b9af-1c598f5dc87a" CreationDate="2024-03-14T20:51:31.257" UserId="2795" Text="How to declare runtime api?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45573" PostHistoryTypeId="3" PostId="11163" RevisionGUID="e900bdb1-3eb2-41b7-b9af-1c598f5dc87a" CreationDate="2024-03-14T20:51:31.257" UserId="2795" Text="|rust|substrate-node|runtime-api|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45574" PostHistoryTypeId="5" PostId="11163" RevisionGUID="be01fba0-a624-4a46-bef0-082f3a1cd9cf" CreationDate="2024-03-14T21:05:37.023" UserId="2795" Comment="edited the hyperlink" Text="I have a runtime constant declared in a pallet like this:&#xD;&#xA;```rust&#xD;&#xA;        /// How much space there is on the network.&#xD;&#xA;        #[pallet::constant]&#xD;&#xA;        type TotalSpacePledged: Get&lt;u128&gt;;&#xD;&#xA;```&#xD;&#xA;[Source code][1] &#xD;&#xA;&#xD;&#xA;And it is defined like in the runtime like this:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;parameter_types! {&#xD;&#xA;    pub CreditSupply: Balance = Balances::total_issuance();&#xD;&#xA;    pub TotalSpacePledged: u128 = {&#xD;&#xA;        let sectors = solution_range_to_sectors(Subspace::solution_ranges().current);&#xD;&#xA;        sectors as u128 * MAX_PIECES_IN_SECTOR as u128 * Piece::SIZE as u128&#xD;&#xA;    };&#xD;&#xA;    pub BlockchainHistorySize: u128 = u128::from(Subspace::archived_history_size());&#xD;&#xA;    pub DynamicCostOfStorage: bool = RuntimeConfigs::enable_dynamic_cost_of_storage();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl pallet_transaction_fees::Config for Runtime {&#xD;&#xA;    ...&#xD;&#xA;    type TotalSpacePledged = TotalSpacePledged;&#xD;&#xA;    ...&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Now, if I want to access the value using runtime_api as I have a full node running, I wrote the code like this:&#xD;&#xA;```rust&#xD;&#xA;sp_api::decl_runtime_apis! {&#xD;&#xA;    pub trait TotalSpacePledgedApi {&#xD;&#xA;        fn get_total_space_pledged() -&gt; u128;&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;impl TotalSpacePledgedApi&lt;Block&gt; for Runtime {&#xD;&#xA;    fn get_total_space_pledged(&amp;self) -&gt; u128 {&#xD;&#xA;        self::TotalSpacePledged::get()&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    #[doc = r&quot; !!INTERNAL USE ONLY!!&quot;]&#xD;&#xA;    #[doc(hidden)]&#xD;&#xA;    fn __runtime_api_internal_call_api_at(&#xD;&#xA;        &amp;self,&#xD;&#xA;        at: &lt;Block as sp_api::__private::BlockT&gt;::Hash,&#xD;&#xA;        params: std::vec::Vec&lt;u8&gt;,&#xD;&#xA;        fn_name: &amp;dyn Fn(sp_api::__private::RuntimeVersion) -&gt; &amp;'static str,&#xD;&#xA;    ) -&gt; std::result::Result&lt;std::vec::Vec&lt;u8&gt;, sp_api::__private::ApiError&gt; {&#xD;&#xA;        todo!()&#xD;&#xA;    }&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;[Source code][2] &#xD;&#xA;&#xD;&#xA;This throws error:&#xD;&#xA;```sh&#xD;&#xA;error[E0277]: the trait bound `Runtime: sp_api::Core&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;, CheckStorageAccess, DisablePallets)&gt;&gt;&gt;` is not satisfied&#xD;&#xA;   --&gt; crates/subspace-runtime/src/lib.rs:440:38&#xD;&#xA;    |&#xD;&#xA;440 | impl TotalSpacePledgedApi&lt;Block&gt; for Runtime {&#xD;&#xA;    |                                      ^^^^^^^ the trait `sp_api::Core&lt;sp_runtime::generic::Block&lt;sp_runtime::generic::Header&lt;u32, BlakeTwo256&gt;, sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, ()&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;, CheckStorageAccess, DisablePallets)&gt;&gt;&gt;` is not implemented for `Runtime`&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `sp_api::Core&lt;Block&gt;`:&#xD;&#xA;              &lt;domain_block_preprocessor::stateless_runtime::StatelessRuntime&lt;Block, Executor&gt; as sp_api::Core&lt;Block&gt;&gt;&#xD;&#xA;              &lt;RuntimeApiImpl&lt;__SrApiBlock__, RuntimeApiImplCall&gt; as sp_api::Core&lt;__SrApiBlock__&gt;&gt;&#xD;&#xA;note: required by a bound in `TotalSpacePledgedApi`&#xD;&#xA;   --&gt; crates/subspace-runtime/src/lib.rs:434:1&#xD;&#xA;    |&#xD;&#xA;434 | / sp_api::decl_runtime_apis! {&#xD;&#xA;435 | |     pub trait TotalSpacePledgedApi {&#xD;&#xA;436 | |         fn get_total_space_pledged() -&gt; u128;&#xD;&#xA;437 | |     }&#xD;&#xA;438 | | }&#xD;&#xA;    | |_^ required by this bound in `TotalSpacePledgedApi`&#xD;&#xA;    = note: this error originates in the macro `sp_api::decl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;&#xD;&#xA;error[E0050]: method `get_total_space_pledged` has 1 parameter but the declaration in trait `TotalSpacePledgedApi::get_total_space_pledged` has 2&#xD;&#xA;   --&gt; crates/subspace-runtime/src/lib.rs:441:32&#xD;&#xA;    |&#xD;&#xA;434 | / sp_api::decl_runtime_apis! {&#xD;&#xA;435 | |     pub trait TotalSpacePledgedApi {&#xD;&#xA;436 | |         fn get_total_space_pledged() -&gt; u128;&#xD;&#xA;437 | |     }&#xD;&#xA;438 | | }&#xD;&#xA;    | |_- trait requires 2 parameters&#xD;&#xA;...&#xD;&#xA;441 |       fn get_total_space_pledged(&amp;self) -&gt; u128 {&#xD;&#xA;    |                                  ^^^^^ expected 2 parameters, found 1&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I would appreciate if someone could help me here .&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/subspace/subspace/blob/5d8b65740ff054b01ebcbaf5a905e74274c1a5d0/crates/pallet-transaction-fees/src/lib.rs#L87-L90&#xD;&#xA;  [2]: https://github.com/subspace/subspace/blob/f79f225b799f16c2a9efe41123a8c75307e50456/crates/subspace-runtime/src/lib.rs#L434-L456" ContentLicense="CC BY-SA 4.0" />
  <row Id="45575" PostHistoryTypeId="2" PostId="11164" RevisionGUID="0d115780-d0c7-4956-9b08-2bc32937344a" CreationDate="2024-03-14T23:28:45.657" UserId="2795" Text="I incorrectly implemented.&#xD;&#xA;&#xD;&#xA;The correct implementation [commit][1].&#xD;&#xA;&#xD;&#xA;Basically, inside the pallet, the declaration has to be happen. And in the runtime, implementation has to be done.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/subspace/subspace/commit/df8d33b65fff6a88d77fa8090533879199bcb422" ContentLicense="CC BY-SA 4.0" />
  <row Id="45577" PostHistoryTypeId="2" PostId="11165" RevisionGUID="a89312c7-d5c9-44d8-81dd-4a1d362bca72" CreationDate="2024-03-15T02:18:42.280" UserId="5218" Text="Goal&#xD;&#xA;====&#xD;&#xA;Add a libp2p node to the Substrate parachain network to have Idle 0 peers to 1 peer. &#xD;&#xA;&#xD;&#xA;Method&#xD;&#xA;------&#xD;&#xA;I'm using mdns as the discovery mechanism. &#xD;&#xA;&#xD;&#xA;Libp2p Config:  &#xD;&#xA;&gt;const options = {  &#xD;&#xA;&gt;&gt;peerId: peerId,  &#xD;&#xA;  &gt;&gt;addresses: {  &#xD;&#xA;                listen: ['/ip4/0.0.0.0/tcp/0/ws'],  &#xD;&#xA;            },  &#xD;&#xA;            transports: [  &#xD;&#xA;              tcp(),&#xD;&#xA;              webSockets(),  &#xD;&#xA;            ],  &#xD;&#xA;            streamMuxers: [yamux(), mplex()],  &#xD;&#xA;            connectionEncryption: [noise()],  &#xD;&#xA;            peerDiscovery: [  &#xD;&#xA;                mdns(),  &#xD;&#xA;            ],  &#xD;&#xA;            services: {  &#xD;&#xA;                identify: identify({  &#xD;&#xA;                    agentVersion: 'Polkadot parachain/v1.6.0-unknown',  &#xD;&#xA;                }),  &#xD;&#xA;                ping: ping({  &#xD;&#xA;                    protocolPrefix: 'ipfs',&#xD;&#xA;                    interval: 10000,&#xD;&#xA;                    timeout: 10000,&#xD;&#xA;                }),  &#xD;&#xA;            },  &#xD;&#xA;            config: {  &#xD;&#xA;                peerDiscovery: {  &#xD;&#xA;                    autoDial: true,  &#xD;&#xA;                    mdns: {  &#xD;&#xA;                      interval: 5000,&#xD;&#xA;                      enabled: true,&#xD;&#xA;                      ip: '127.0.0.1',&#xD;&#xA;                      broadcast: true,  &#xD;&#xA;                    },&#xD;&#xA;                },&#xD;&#xA;            },&#xD;&#xA;        }  &#xD;&#xA;&#xD;&#xA;My libp2p node is started, but it doesn't seem to discover on the Substrate parachain. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Question&#xD;&#xA;--------&#xD;&#xA;I've configured the libp2p node to be discoverable on the parachain network, but I can't seem to connect for some reason. Is there a step that I'm missing? &#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45579" PostHistoryTypeId="1" PostId="11165" RevisionGUID="a89312c7-d5c9-44d8-81dd-4a1d362bca72" CreationDate="2024-03-15T02:18:42.280" UserId="5218" Text="Connecting a libp2p node to the Substrate Parachain Network" ContentLicense="CC BY-SA 4.0" />
  <row Id="45580" PostHistoryTypeId="3" PostId="11165" RevisionGUID="a89312c7-d5c9-44d8-81dd-4a1d362bca72" CreationDate="2024-03-15T02:18:42.280" UserId="5218" Text="|substrate-node-template|parachain|substrate-node|rococo|nodes|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45581" PostHistoryTypeId="2" PostId="11166" RevisionGUID="f61e6dc5-c3cc-4a98-bfe0-b82a984524f2" CreationDate="2024-03-15T06:58:00.543" UserId="2738" Text="I recently had to transfer all the funds of an account `A` to an account `B`. To do so, I used extrinsic `balances.transferAll(B, false)` where the second argument is the `keepAlive` flag (see [documentation](https://github.com/paritytech/polkadot-sdk/blob/polkadot-v1.8.0/substrate/frame/balances/src/lib.rs#L620-L634)) and signed with the key of `A`.&#xD;&#xA;&#xD;&#xA;After a successful extrinsic submission, the account `A` still exists with an existential deposit (see screenshot below).&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;I was expecting that with no keep alive, the account's balances would just reach 0.&#xD;&#xA;&#xD;&#xA;Am I missing something?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/zZtcF.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="45583" PostHistoryTypeId="1" PostId="11166" RevisionGUID="f61e6dc5-c3cc-4a98-bfe0-b82a984524f2" CreationDate="2024-03-15T06:58:00.543" UserId="2738" Text="Why does `transferAll` leave an existential deposit despite keep alive flag set to false?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45584" PostHistoryTypeId="3" PostId="11166" RevisionGUID="f61e6dc5-c3cc-4a98-bfe0-b82a984524f2" CreationDate="2024-03-15T06:58:00.543" UserId="2738" Text="|frame|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45585" PostHistoryTypeId="50" PostId="10222" RevisionGUID="4fa78436-6cf3-4d9d-b31a-84568d9d3d58" CreationDate="2024-03-15T07:02:45.300" UserId="-1" />
  <row Id="45586" PostHistoryTypeId="50" PostId="10224" RevisionGUID="b366a3f4-67a1-4d07-b757-f06434d131d8" CreationDate="2024-03-15T10:05:25.607" UserId="-1" />
  <row Id="45587" PostHistoryTypeId="50" PostId="8736" RevisionGUID="b5a658e7-8978-47e9-9729-09eeb8264392" CreationDate="2024-03-15T12:00:20.037" UserId="-1" />
  <row Id="45588" PostHistoryTypeId="2" PostId="11167" RevisionGUID="ed35e93a-b37b-419f-a2ac-5d9b23cf8627" CreationDate="2024-03-15T14:21:11.230" UserId="4024" Text="I'm working on upgrading a Substrate-based standalone chain that was launched several years ago.&#xD;&#xA;&#xD;&#xA;Recently, we made a transition from [polkadot-v0.9.34](https://github.com/paritytech/substrate/tree/polkadot-v0.9.34) to [polkadot-v0.9.35](https://github.com/paritytech/substrate/tree/polkadot-v0.9.35). After we did that, we are no longer able to run the synchronization process for new nodes with the existing chain in `full` mode. The node client fails with an error related to missing host function imports: &#xD;&#xA;&#xD;&#xA;    Error: Service(Client(VersionInvalid(&quot;Other error happened while constructing the runtime: runtime requires function imports which are not present on the host:&#xD;&#xA;    'env:ext_sandbox_memory_set_version_1', &#xD;&#xA;    'env:ext_sandbox_invoke_version_1', &#xD;&#xA;    'env:ext_sandbox_instantiate_version_1',&#xD;&#xA;    'env:ext_sandbox_memory_teardown_version_1',&#xD;&#xA;    'env:ext_sandbox_memory_new_version_1',&#xD;&#xA;    'env:ext_sandbox_memory_get_version_1',&#xD;&#xA;    'env:ext_sandbox_instance_teardown_version_1'&quot;)))&#xD;&#xA;&#xD;&#xA;I did some research, and I found that the above functions **were completely removed** from the Substrate in [PR #12852](https://github.com/paritytech/substrate/pull/12852) and the sandboxing host function interface was deprecated.&#xD;&#xA;&#xD;&#xA;I noticed, there is `allow_missing_host_functions` configuration variable in the Executor. If I set it to `false`, the error above disappears and node starts synchronization successfully. However, when it reaches some block in the history (where I guess the missing functions were applied), the synchronization fails with error:&#xD;&#xA;&#xD;&#xA;    2024-03-15 08:43:18  Error importing block 0x2ed7e6f52f7b61f2ff80f1a75346632d19f9b8e74058416c74cf23a4d53100e1: consensus error: Import failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: call to a missing function env:ext_sandbox_memory_new_version_1&#xD;&#xA;    WASM backtrace:&#xD;&#xA;    error while executing at wasm backtrace:&#xD;&#xA;        0: 0x1c7476 - &lt;unknown&gt;!sp_io::sandbox::extern_host_function_impls::memory_new::hf909f2487304ad97&#xD;&#xA;        1: 0x1bb241 - &lt;unknown&gt;!&lt;pallet_contracts::wasm::WasmVm as pallet_contracts::exec::Vm&lt;T&gt;&gt;::execute::hc83d43044fd5df3c&#xD;&#xA;        2: 0xedbed - &lt;unknown&gt;!pallet_contracts::exec::ExecutionContext&lt;T,V,L&gt;::instantiate::h83b4ab02e4b21482&#xD;&#xA;        3: 0xc8b37 - &lt;unknown&gt;!&lt;node_runtime::Call as frame_support::traits::UnfilteredDispatchable&gt;::dispatch_bypass_filter::h7a1f50faa398ce9b&#xD;&#xA;        4: 0xd4100 - &lt;unknown&gt;!&lt;node_runtime::Call as frame_support::traits::UnfilteredDispatchable&gt;::dispatch_bypass_filter::h7a1f50faa398ce9b&#xD;&#xA;        5: 0x141899 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllModules,COnRuntimeUpgrade&gt;::apply_extrinsic_with_len::h33fc117f4f45f904&#xD;&#xA;        6: 0x13c363 - &lt;unknown&gt;!Core_execute_block  &#xD;&#xA;&#xD;&#xA;So, **the question is**, what is the proper way to fix the synchronization in `full` mode with the old chain using the node-client that is upgraded to `polkadot-v0.9.35`? As the mentioned sandboxing functions were removed from the substrate, how we should process old blocks now? It seems like the only way to fix that, is to add the [mentioned functions](https://github.com/paritytech/substrate/pull/12852/files#diff-78962fc7064261b39f078c892129d67563f4623af5578a18d7b5cd8f266d1d2dL156) back to our node by some sort of extension. But I'm not sure how doable it is without forking the whole Substrate repo. Our node is based on the [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template). How should we fix that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45590" PostHistoryTypeId="1" PostId="11167" RevisionGUID="ed35e93a-b37b-419f-a2ac-5d9b23cf8627" CreationDate="2024-03-15T14:21:11.230" UserId="4024" Text="Syncing with a chain that requires host functions deprecated by the Substrate" ContentLicense="CC BY-SA 4.0" />
  <row Id="45591" PostHistoryTypeId="3" PostId="11167" RevisionGUID="ed35e93a-b37b-419f-a2ac-5d9b23cf8627" CreationDate="2024-03-15T14:21:11.230" UserId="4024" Text="|substrate-node-template|substrate-node|pallet-contracts|host-functions|wasmtime|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45592" PostHistoryTypeId="5" PostId="11167" RevisionGUID="d736be08-fcb8-4373-a71c-b6cb87a2cc7e" CreationDate="2024-03-15T14:28:11.770" UserId="4024" Comment="deleted 1 character in body" Text="I'm working on upgrading a Substrate-based standalone chain that was launched several years ago.&#xD;&#xA;&#xD;&#xA;Recently, we made a transition from [polkadot-v0.9.34](https://github.com/paritytech/substrate/tree/polkadot-v0.9.34) to [polkadot-v0.9.35](https://github.com/paritytech/substrate/tree/polkadot-v0.9.35). After we did that, we are no longer able to run the synchronization process for new nodes with the existing chain in `full` mode. The node client fails with an error related to missing host function imports: &#xD;&#xA;&#xD;&#xA;    Error: Service(Client(VersionInvalid(&quot;Other error happened while constructing the runtime: runtime requires function imports which are not present on the host:&#xD;&#xA;    'env:ext_sandbox_memory_set_version_1', &#xD;&#xA;    'env:ext_sandbox_invoke_version_1', &#xD;&#xA;    'env:ext_sandbox_instantiate_version_1',&#xD;&#xA;    'env:ext_sandbox_memory_teardown_version_1',&#xD;&#xA;    'env:ext_sandbox_memory_new_version_1',&#xD;&#xA;    'env:ext_sandbox_memory_get_version_1',&#xD;&#xA;    'env:ext_sandbox_instance_teardown_version_1'&quot;)))&#xD;&#xA;&#xD;&#xA;I did some research, and I found that the above functions **were completely removed** from the Substrate in [PR #12852](https://github.com/paritytech/substrate/pull/12852) and the sandboxing host function interface was deprecated.&#xD;&#xA;&#xD;&#xA;I noticed, there is `allow_missing_host_functions` configuration variable in the Executor. If I set it to `true`, the error above disappears and node starts synchronization successfully. However, when it reaches some block in the history (where I guess the missing functions were applied), the synchronization fails with error:&#xD;&#xA;&#xD;&#xA;    2024-03-15 08:43:18  Error importing block 0x2ed7e6f52f7b61f2ff80f1a75346632d19f9b8e74058416c74cf23a4d53100e1: consensus error: Import failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: call to a missing function env:ext_sandbox_memory_new_version_1&#xD;&#xA;    WASM backtrace:&#xD;&#xA;    error while executing at wasm backtrace:&#xD;&#xA;        0: 0x1c7476 - &lt;unknown&gt;!sp_io::sandbox::extern_host_function_impls::memory_new::hf909f2487304ad97&#xD;&#xA;        1: 0x1bb241 - &lt;unknown&gt;!&lt;pallet_contracts::wasm::WasmVm as pallet_contracts::exec::Vm&lt;T&gt;&gt;::execute::hc83d43044fd5df3c&#xD;&#xA;        2: 0xedbed - &lt;unknown&gt;!pallet_contracts::exec::ExecutionContext&lt;T,V,L&gt;::instantiate::h83b4ab02e4b21482&#xD;&#xA;        3: 0xc8b37 - &lt;unknown&gt;!&lt;node_runtime::Call as frame_support::traits::UnfilteredDispatchable&gt;::dispatch_bypass_filter::h7a1f50faa398ce9b&#xD;&#xA;        4: 0xd4100 - &lt;unknown&gt;!&lt;node_runtime::Call as frame_support::traits::UnfilteredDispatchable&gt;::dispatch_bypass_filter::h7a1f50faa398ce9b&#xD;&#xA;        5: 0x141899 - &lt;unknown&gt;!frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllModules,COnRuntimeUpgrade&gt;::apply_extrinsic_with_len::h33fc117f4f45f904&#xD;&#xA;        6: 0x13c363 - &lt;unknown&gt;!Core_execute_block  &#xD;&#xA;&#xD;&#xA;So, **the question is**, what is the proper way to fix the synchronization in `full` mode with the old chain using the node-client that is upgraded to `polkadot-v0.9.35`? As the mentioned sandboxing functions were removed from the substrate, how we should process old blocks now? It seems like the only way to fix that, is to add the [mentioned functions](https://github.com/paritytech/substrate/pull/12852/files#diff-78962fc7064261b39f078c892129d67563f4623af5578a18d7b5cd8f266d1d2dL156) back to our node by some sort of extension. But I'm not sure how doable it is without forking the whole Substrate repo. Our node is based on the [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template). How should we fix that?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45593" PostHistoryTypeId="2" PostId="11168" RevisionGUID="bb93a129-35dc-4b4c-ae91-fd224b010bd4" CreationDate="2024-03-15T15:23:27.013" UserId="2005" Text="Locks can [overlap][1], so you [can][2] definitely use locked funds from `vesting` to  `stake` or `vote`.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://substrate.stackexchange.com/a/2382/2005&#xD;&#xA;  [2]: https://substrate.stackexchange.com/a/3682/2005" ContentLicense="CC BY-SA 4.0" />
  <row Id="45595" PostHistoryTypeId="2" PostId="11169" RevisionGUID="6983c774-67d9-4ce0-86e2-7bbc660013b1" CreationDate="2024-03-15T16:34:12.907" UserId="5213" Text="I was running substrate node template with non secure ws connection . After integrating with pallet-evm,pallet-ethereum and other precompiles , I wanted to connect to metamask with `secure rpc connection (https)` but all i get was `http rpc connection` and `ws connection` for interacting with polkadot explorer . So is there a way to connect to polkadot explorer with `wss connection` and metamask with `https rpc` connection" ContentLicense="CC BY-SA 4.0" />
  <row Id="45597" PostHistoryTypeId="1" PostId="11169" RevisionGUID="6983c774-67d9-4ce0-86e2-7bbc660013b1" CreationDate="2024-03-15T16:34:12.907" UserId="5213" Text="Run Substrate-node-template with wss and secure rpc" ContentLicense="CC BY-SA 4.0" />
  <row Id="45598" PostHistoryTypeId="3" PostId="11169" RevisionGUID="6983c774-67d9-4ce0-86e2-7bbc660013b1" CreationDate="2024-03-15T16:34:12.907" UserId="5213" Text="|substrate-node-template|rpc|wss|https|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45599" PostHistoryTypeId="2" PostId="11170" RevisionGUID="cd39a338-67ef-4b8b-a7fd-7e2e27a333e7" CreationDate="2024-03-15T19:47:59.697" UserId="3750" Text="I'm building a pallet that requires some randomness to simulate the act of tossing a coin. That's why I'm following the same implementation as provided on the *[Lottery pallet][1]*. Particularly, the following method:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;	pub fn generate_insecure_random_boolean(seed: u32) -&gt; bool {&#xD;&#xA;		let pallet_id = T::PalletId::get();&#xD;&#xA;		let (random_seed, _) = T::Randomness::random(&amp;(pallet_id, seed).encode());&#xD;&#xA;		let random_number = &lt;u32&gt;::decode(&amp;mut random_seed.as_ref())&#xD;&#xA;			.expect(&quot;secure hashes should always be bigger than u32; qed&quot;);&#xD;&#xA;		random_number % 2 == 0&#xD;&#xA;	}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA; That generates a random number based on the `PalletId` and the value of a particular seed, which in my case, is given by the `current block number`:&#xD;&#xA;```rust&#xD;&#xA;	pub fn random_coin_side() -&gt; CoinSide {&#xD;&#xA;		let block_number = &lt;frame_system::Pallet&lt;T&gt;&gt;::block_number();&#xD;&#xA;		let seed = block_number.try_into().unwrap_or_else(|_| 0u32);&#xD;&#xA;&#xD;&#xA;		if Self::generate_insecure_random_boolean(seed) {&#xD;&#xA;			// println!(&quot;Coin side: Head&quot;);&#xD;&#xA;			CoinSide::Head&#xD;&#xA;		} else {&#xD;&#xA;			// println!(&quot;Coin side: Tail&quot;);&#xD;&#xA;			CoinSide::Tail&#xD;&#xA;		}&#xD;&#xA;	}&#xD;&#xA;``` &#xD;&#xA;&#xD;&#xA;This works perfectly when testing the node running through PolkadotJS, I do see the randomness and how the coin is flipped randomly.&#xD;&#xA;&#xD;&#xA;However, my problem is when I test this function on my unit test suite. ***I'm always getting the same random number, even if I'm setting current block number explicitly to update the seed used***. Here is my unit test:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;    #[test]&#xD;&#xA;    fn toss_coin_works() {&#xD;&#xA;    	new_test_ext().execute_with(|| {&#xD;&#xA;    		assert_ok!(CoinGame::create_coin(RuntimeOrigin::signed(ALICE)));&#xD;&#xA;    &#xD;&#xA;    		let coin = CoinGame::get_coin(&amp;ALICE).unwrap();&#xD;&#xA;    &#xD;&#xA;    		let toss_result = CoinGame::random_coin_side();&#xD;&#xA;    &#xD;&#xA;    		// advance 10 blocks&#xD;&#xA;    		System::set_block_number(24);&#xD;&#xA;    &#xD;&#xA;    		let toss_result2 = CoinGame::random_coin_side();&#xD;&#xA;    &#xD;&#xA;    		assert_ok!(CoinGame::toss_coin(RuntimeOrigin::signed(ALICE), toss_result.clone()));&#xD;&#xA;    &#xD;&#xA;    		let expected_event = RuntimeEvent::CoinGame(Event::CoinGuessed(ALICE, toss_result));&#xD;&#xA;    		assert_eq!(last_event(), expected_event);&#xD;&#xA;    		assert!(false);&#xD;&#xA;    	});&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;Taking into consideration that my mock environment is set by the following function:&#xD;&#xA;```rust&#xD;&#xA;    pub fn new_test_ext() -&gt; sp_io::TestExternalities {&#xD;&#xA;    	let t = frame_system::GenesisConfig::&lt;Test&gt;::default().build_storage().unwrap().into();&#xD;&#xA;        let mut ext = sp_io::TestExternalities::new(t);&#xD;&#xA;        ext.execute_with(|| System::set_block_number(14));&#xD;&#xA;        ext&#xD;&#xA;    }&#xD;&#xA;```&#xD;&#xA;Why I'm not getting the same randomness on my unit test and on the substrate node running?&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/paritytech/substrate/blob/master/frame/lottery/src/lib.rs" ContentLicense="CC BY-SA 4.0" />
  <row Id="45601" PostHistoryTypeId="1" PostId="11170" RevisionGUID="cd39a338-67ef-4b8b-a7fd-7e2e27a333e7" CreationDate="2024-03-15T19:47:59.697" UserId="3750" Text="Not able to get randomness on unit test" ContentLicense="CC BY-SA 4.0" />
  <row Id="45602" PostHistoryTypeId="3" PostId="11170" RevisionGUID="cd39a338-67ef-4b8b-a7fd-7e2e27a333e7" CreationDate="2024-03-15T19:47:59.697" UserId="3750" Text="|substrate-node|unit-tests|randomness|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45603" PostHistoryTypeId="2" PostId="11171" RevisionGUID="c9c03923-4ae0-4971-b1b3-526e6041d55d" CreationDate="2024-03-15T19:52:04.797" UserId="74" Text="You will have to manually add stubs to these host functions to your node iirc. We had to do this years ago on Edgeware in order to get things working after similar issues occurred.&#xD;&#xA;&#xD;&#xA;Once you implement the missing host functions just add that to your executor setup. Likely these APIs have changed (this project is many years out of date/old) but the general approach likely remains the same.&#xD;&#xA;&#xD;&#xA;To recap.&#xD;&#xA;1. Implement stubs for missing host functions.&#xD;&#xA;2. Add them to your node's executor.&#xD;&#xA;3. Run the node!&#xD;&#xA;&#xD;&#xA;### Resource links&#xD;&#xA;- https://github.com/hicommonwealth/edgeware-node/blob/master/node/runtime-interface/src/lib.rs&#xD;&#xA;- https://github.com/hicommonwealth/edgeware-node/blob/master/node/executor/src/lib.rs#L29" ContentLicense="CC BY-SA 4.0" />
  <row Id="45605" PostHistoryTypeId="2" PostId="11172" RevisionGUID="ffcd8f1f-c165-4994-85e9-98eed29f1f5c" CreationDate="2024-03-15T23:17:08.157" UserId="4420" Text="I'm trying to have my node discover and connect to the blockchain terminal so that the peer count will update from 0 peers to 1 peers. However, I keep getting this message: &#xD;&#xA;&#xD;&#xA;2024-03-15 18:38:36.394  WARN tokio-runtime-worker libp2p_identify::handler: [Relaychain] New inbound identify push stream from 12D3KooWRq75YzXpcop26cBjKFDwVAGfpZ3WtT6qKW5Bfir7NfvY while still upgrading previous one. Replacing previous with new.&#xD;&#xA;&#xD;&#xA;This is my libp2p configuration: &#xD;&#xA;&#xD;&#xA;const options = {&#xD;&#xA;&#xD;&#xA;      peerId: peerId,&#xD;&#xA;      addresses: {&#xD;&#xA;          listen: ['/ip4/0.0.0.0/tcp/0/ws']&#xD;&#xA;      },&#xD;&#xA;      transports: [&#xD;&#xA;        tcp(),&#xD;&#xA;        webSockets(),&#xD;&#xA;      ],&#xD;&#xA;      connectionEncryption: [noise()],&#xD;&#xA;      streamMuxers: [yamux(), mplex()],&#xD;&#xA;      peerDiscovery: [&#xD;&#xA;        mdns(),&#xD;&#xA;        bootstrap({&#xD;&#xA;          list: bootstrapNodes&#xD;&#xA;        })&#xD;&#xA;      ],&#xD;&#xA;      services: {&#xD;&#xA;        identify: identify(),&#xD;&#xA;      },&#xD;&#xA;      config: {&#xD;&#xA;        peerDiscovery: {&#xD;&#xA;          autoDial: true,&#xD;&#xA;          mdns: {&#xD;&#xA;            interval: 5000,&#xD;&#xA;            enabled: true,&#xD;&#xA;            broadcast: false,&#xD;&#xA;          },&#xD;&#xA;        },&#xD;&#xA;      },&#xD;&#xA;      connectionManager: {&#xD;&#xA;        autoDial: true,&#xD;&#xA;        maxConnections: 50,&#xD;&#xA;        minConnections: 10,&#xD;&#xA;      },&#xD;&#xA;    }&#xD;&#xA;&#xD;&#xA;    const node = await createLibp2p(options);&#xD;&#xA;    await node.start();&#xD;&#xA;&#xD;&#xA;I've been stuck on this issue for a while, but I can't seem to figure out why its replacing the previous with the new. If anyone can help me with this issue, it'll be greatly appreciated. " ContentLicense="CC BY-SA 4.0" />
  <row Id="45607" PostHistoryTypeId="1" PostId="11172" RevisionGUID="ffcd8f1f-c165-4994-85e9-98eed29f1f5c" CreationDate="2024-03-15T23:17:08.157" UserId="4420" Text="unable to discover and connect the peer to the --chain contracts-rococo-local" ContentLicense="CC BY-SA 4.0" />
  <row Id="45608" PostHistoryTypeId="3" PostId="11172" RevisionGUID="ffcd8f1f-c165-4994-85e9-98eed29f1f5c" CreationDate="2024-03-15T23:17:08.157" UserId="4420" Text="|substrate-node|nodes|libp2p|peers|substrate-connect|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45609" PostHistoryTypeId="2" PostId="11173" RevisionGUID="e7bf846d-c480-4a6e-a07a-a457b21cad39" CreationDate="2024-03-16T08:26:59.563" UserId="4296" Text="You have to proxy it behind a proxy-ing webserver (for example nginx) since the node itself cannot provide a valid certificate. More info can be found on the [polkadot wiki][1]. For nginx you can add the following (in an ssl enabled  virtal host), assuming the node rpc port is 9944:&#xD;&#xA;&#xD;&#xA;    server {   &#xD;&#xA;        (...)   &#xD;&#xA;        location / {&#xD;&#xA;        proxy_buffers 16 4k;&#xD;&#xA;        proxy_buffer_size 2k;&#xD;&#xA;        proxy_pass http://localhost:9944;&#xD;&#xA;        proxy_http_version 1.1;&#xD;&#xA;        proxy_set_header Upgrade $http_upgrade;&#xD;&#xA;        proxy_set_header Connection &quot;Upgrade&quot;;&#xD;&#xA;        proxy_set_header Host $host;    &#xD;&#xA;        } &#xD;&#xA;     }&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-wss" ContentLicense="CC BY-SA 4.0" />
  <row Id="45611" PostHistoryTypeId="50" PostId="10238" RevisionGUID="54837846-c3a1-4686-9972-50c2ff356480" CreationDate="2024-03-16T10:04:55.580" UserId="-1" />
  <row Id="45612" PostHistoryTypeId="50" PostId="3359" RevisionGUID="0bbad886-741d-4e56-ad14-64537842c69c" CreationDate="2024-03-16T13:02:40.433" UserId="-1" />
  <row Id="45619" PostHistoryTypeId="50" PostId="8947" RevisionGUID="08744d58-686b-46f2-8854-5b0d659e7197" CreationDate="2024-03-16T19:05:10.733" UserId="-1" />
  <row Id="45620" PostHistoryTypeId="50" PostId="8945" RevisionGUID="1eeab6cb-d648-440c-af54-9bfd833f9b60" CreationDate="2024-03-17T09:08:01.090" UserId="-1" />
  <row Id="45621" PostHistoryTypeId="2" PostId="11174" RevisionGUID="436990ef-da97-4d63-8d3c-5a78ad15421a" CreationDate="2024-03-17T12:48:31.230" UserId="3437" Text="I am trying to use Substrate Offchain Worker. I implemented as mentioned here https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/examples/offchain-worker.&#xD;&#xA;&#xD;&#xA;I am using same sample&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA; let deadline = sp_io::offchain::timestamp().add(Duration::from_millis(2_000));&#xD;&#xA;        let request =&#xD;&#xA;            http::Request::get(&quot;https://min-api.cryptocompare.com/data/price?fsym=BTC&amp;tsyms=USD&quot;);&#xD;&#xA;        let pending = request.deadline(deadline).send().map_err(|_| http::Error::IoError)?;&#xD;&#xA;        let response = pending.try_wait(deadline).map_err(|_| http::Error::DeadlineReached)??;&#xD;&#xA;        if response.code != 200 {&#xD;&#xA;            log::warn!(&quot;Unexpected status code: {}&quot;, response.code);&#xD;&#xA;            return Err(http::Error::Unknown)&#xD;&#xA;        }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;When I start my local parachain node with `--offchain-worker always`, I get below error after each block production:&#xD;&#xA;&#xD;&#xA;`Evicting failed runtime instance error=Runtime panicked: Accessing a forbidden API: http_request_start. No: HTTP capability.&#xD;&#xA;`&#xD;&#xA;&#xD;&#xA;This URL `https://min-api.cryptocompare.com/data/price?fsym=BTC&amp;tsyms=USD` is working fine in my browser.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Can somebody please guide me what I am missing here?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45623" PostHistoryTypeId="1" PostId="11174" RevisionGUID="436990ef-da97-4d63-8d3c-5a78ad15421a" CreationDate="2024-03-17T12:48:31.230" UserId="3437" Text="Substrate Offchain Worker - failed to fetch sample price" ContentLicense="CC BY-SA 4.0" />
  <row Id="45624" PostHistoryTypeId="3" PostId="11174" RevisionGUID="436990ef-da97-4d63-8d3c-5a78ad15421a" CreationDate="2024-03-17T12:48:31.230" UserId="3437" Text="|substrate-node-template|substrate-node|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45625" PostHistoryTypeId="2" PostId="11175" RevisionGUID="6e0046ff-dad2-4a80-9741-7e7d1cbab0c9" CreationDate="2024-03-18T01:34:13.403" UserId="5226" Text="I have PARA tokens on Parallel network. How and where can I sell them?[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/7j2lu.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="45627" PostHistoryTypeId="1" PostId="11175" RevisionGUID="6e0046ff-dad2-4a80-9741-7e7d1cbab0c9" CreationDate="2024-03-18T01:34:13.403" UserId="5226" Text="How and where do I sell PARA my tokens" ContentLicense="CC BY-SA 4.0" />
  <row Id="45628" PostHistoryTypeId="3" PostId="11175" RevisionGUID="6e0046ff-dad2-4a80-9741-7e7d1cbab0c9" CreationDate="2024-03-18T01:34:13.403" UserId="5226" Text="|balances|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45629" PostHistoryTypeId="2" PostId="11176" RevisionGUID="f7734f0c-4ed5-4c5c-bee4-ae1f65578557" CreationDate="2024-03-18T02:06:33.317" UserId="2909" Text="Is there some documentation explaining how to craft the xcm call from a parachain to the relay chain's registrar.swap extrinsic (in the context of extending the parachain lease period)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45631" PostHistoryTypeId="1" PostId="11176" RevisionGUID="f7734f0c-4ed5-4c5c-bee4-ae1f65578557" CreationDate="2024-03-18T02:06:33.317" UserId="2909" Text="How to craft the xcm call from a parachain to the relay chain's registrar.swap extrinsic (for extending the parachain lease period)?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45632" PostHistoryTypeId="3" PostId="11176" RevisionGUID="f7734f0c-4ed5-4c5c-bee4-ae1f65578557" CreationDate="2024-03-18T02:06:33.317" UserId="2909" Text="|parachain|auctions|lease|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45633" PostHistoryTypeId="2" PostId="11177" RevisionGUID="e034244d-2862-4a52-ad0e-d4ac938375f8" CreationDate="2024-03-18T02:06:33.317" UserId="2909" Text="Hey you can find the answers in the Polkadot wiki and reference another parachain's team's governance proposal and XCM call parameters for guidance:&#xD;&#xA;&#xD;&#xA; - **Polkadot wiki:** https://wiki.polkadot.network/docs/learn-auction#lease-extension-with-overlapping-slots&#xD;&#xA; - **Moonbeam's example:** https://polkadot.polkassembly.io/referenda/139&#xD;&#xA; - **The equivalent call on SubScan:** https://polkadot.subscan.io/referenda_v2/139" ContentLicense="CC BY-SA 4.0" />
  <row Id="45635" PostHistoryTypeId="2" PostId="11178" RevisionGUID="e8f42424-0cd8-40fc-b1ab-74b324079b54" CreationDate="2024-03-18T07:44:11.627" UserId="5228" Text="Need a little more information…&#xD;&#xA;&#xD;&#xA;Are you using the cumulus pallet? &#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/docs/overview.md&#xD;&#xA;&#xD;&#xA;As far as I understand, a special transaction is required to update a runtime to a parachain, via Cumulus. &#xD;&#xA;&#xD;&#xA;Here’s an excellent guide for deploying a functional Parachain. &#xD;&#xA;https://wiki.polkadot.network/docs/build-pdk" ContentLicense="CC BY-SA 4.0" />
  <row Id="45637" PostHistoryTypeId="5" PostId="11178" RevisionGUID="03e7e03f-6150-4650-9e3e-0528e1355bc3" CreationDate="2024-03-18T07:45:43.023" UserId="5228" Comment="deleted 6 characters in body" Text="Need a little more information…&#xD;&#xA;&#xD;&#xA;Are you using the cumulus pallet? &#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/docs/overview.md&#xD;&#xA;&#xD;&#xA;As far as I know, a special transaction is required to update a runtime to a parachain, via Cumulus. &#xD;&#xA;&#xD;&#xA;Here’s an excellent guide for deploying a functional Parachain. &#xD;&#xA;https://wiki.polkadot.network/docs/build-pdk" ContentLicense="CC BY-SA 4.0" />
  <row Id="45638" PostHistoryTypeId="2" PostId="11179" RevisionGUID="310c0000-3c32-4767-9bae-f419783376be" CreationDate="2024-03-18T07:48:57.780" UserId="3437" Text="I am using Substrate official example to send HTTP POST request, which is mentioned here https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-http-requests/#read-and-submit-the-response&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;// Send a POST request&#xD;&#xA;  let deadline = sp_io::offchain::timestamp().add(Duration::from_millis(3_000));&#xD;&#xA;let request_body = Vec::new();&#xD;&#xA;let request = http::Request::post(&quot;https://reqres.in/api/users&quot;, vec![request_body.clone()])&#xD;&#xA; .add_header(&quot;x-api-key&quot;, &quot;test_api_key&quot;)&#xD;&#xA; .add_header(&quot;content-type&quot;, &quot;application/json&quot;);&#xD;&#xA;&#xD;&#xA;let pending = request&#xD;&#xA; .deadline(deadline)&#xD;&#xA; .body(vec![request_body.clone()])&#xD;&#xA; .send()&#xD;&#xA; .map_err(|_| http::Error::IoError)?;&#xD;&#xA;&#xD;&#xA;// Wait for response&#xD;&#xA;let response = pending&#xD;&#xA; .try_wait(deadline)&#xD;&#xA; .map_err(|_| http::Error::DeadlineReached)??;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;But Its not working. I am getting `fetch_response error: Error::IoError `&#xD;&#xA;&#xD;&#xA;I am able to execute sample HTTP Get request but not able to execute above POST request. &#xD;&#xA;&#xD;&#xA;Can somebody please help me to fix this?&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45640" PostHistoryTypeId="1" PostId="11179" RevisionGUID="310c0000-3c32-4767-9bae-f419783376be" CreationDate="2024-03-18T07:48:57.780" UserId="3437" Text="How to send HTTP POST request using Substrate Offchain worker" ContentLicense="CC BY-SA 4.0" />
  <row Id="45641" PostHistoryTypeId="3" PostId="11179" RevisionGUID="310c0000-3c32-4767-9bae-f419783376be" CreationDate="2024-03-18T07:48:57.780" UserId="3437" Text="|substrate-node-template|offchain-worker|offchain|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45642" PostHistoryTypeId="2" PostId="11180" RevisionGUID="71188202-7cc0-4d84-8522-d17267affc84" CreationDate="2024-03-18T08:13:09.253" UserId="5228" Text="Data ***Availability*** ≠ Data ***Sampling*** &#xD;&#xA;&#xD;&#xA;The ***Merkel Trie*** you’re referring to is simply the proof it’s a ***real*** (canonical) block. ***Blockchains use traditional storage*** (albeit optimised for compression, as many big blocks gets… big?) “under the hood”. &#xD;&#xA; - Each new block provides a reference of the previous, and will itself be referenced by the following block. This ensures a ***forkless*** series of ***“official”*** ***“next”*** ***“states”*** (blocks).  &#xD;&#xA; - Why?! In a ***decentralised block production*** environment where anyone (with the necessary capital PoS, PoW) can produce blocks, ***consensus*** on the network of a singular, ***traceable lineage*** is therefore fundamental. If not; ***two or more blocks*** may be produced by ***two or more nodes*** simultaneously, causing the chain to ***fork***, with ***X nodes*** following ***Block A*** and ***Y nodes*** following ***Block B***. &#xD;&#xA;&#xD;&#xA;Here’s a ***great explanation that’s less technical*** and more relatable in ***under a minute***!;&#xD;&#xA;https://youtu.be/4DWsTh5HOWk?si=iQKw7S7kRYQ8OmMy&#xD;&#xA;&#xD;&#xA;Recommended further reading;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-consensus&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45644" PostHistoryTypeId="2" PostId="11181" RevisionGUID="1d337a27-2230-478e-b7da-e6a7f51a6058" CreationDate="2024-03-18T09:52:56.110" UserId="2940" Text="I'm running the substrate frontier having NPOS consensus, facing an issue that stops producing the new blocks and stops at a specific block height. &#xD;&#xA;&#xD;&#xA;Blockchain Explorer recent events:&#xD;&#xA;&#xD;&#xA;    imOnline.SomeOffline &#xD;&#xA;    At the end of the session, at least one validator was found to be offline. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;[![Blockchain Explorer Recent Events Image][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/9Marb.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="45646" PostHistoryTypeId="1" PostId="11181" RevisionGUID="1d337a27-2230-478e-b7da-e6a7f51a6058" CreationDate="2024-03-18T09:52:56.110" UserId="2940" Text="imOnline.SomeOffline At the end of the session, at least one validator was found to be offline on Substrate Frontier NPOS blockchain" ContentLicense="CC BY-SA 4.0" />
  <row Id="45647" PostHistoryTypeId="3" PostId="11181" RevisionGUID="1d337a27-2230-478e-b7da-e6a7f51a6058" CreationDate="2024-03-18T09:52:56.110" UserId="2940" Text="|frontier-node-template|npos|pallet-imonline|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45648" PostHistoryTypeId="2" PostId="11182" RevisionGUID="8e04339f-1244-4ca3-8373-8cac40380d0c" CreationDate="2024-03-18T10:40:44.677" UserId="2844" Text="We are updating parachain template in `v1.6.0`,when building by using `cargo build --release`, we're getting weird error.&#xD;&#xA;Can someone suggest what we are doing mistake?&#xD;&#xA;&#xD;&#xA;[Github repo](https://github.com/XcavateBlockchain/Xcavate_chain)&#xD;&#xA;&#xD;&#xA;[ErrorFile Link](https://drive.google.com/file/d/1-Z6MFNBhY-fBxf1sjML2KjcC8ssFjOmI/view?usp=drive_link)&#xD;&#xA;   &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    match_types! {&#xD;&#xA;             | ^^^^^^^^^^^&#xD;&#xA;             |&#xD;&#xA;             = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `smallvec`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:143:9&#xD;&#xA;              |&#xD;&#xA;          143 |         smallvec![WeightToFeeCoefficient {&#xD;&#xA;              |         ^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `impl_opaque_keys`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:174:1&#xD;&#xA;              |&#xD;&#xA;          174 | impl_opaque_keys! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `create_runtime_str`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:182:16&#xD;&#xA;              |&#xD;&#xA;          182 |     spec_name: create_runtime_str!(&quot;template-parachain&quot;),&#xD;&#xA;              |                ^^^^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `create_runtime_str`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:183:16&#xD;&#xA;              |&#xD;&#xA;          183 |     impl_name: create_runtime_str!(&quot;template-parachain&quot;),&#xD;&#xA;              |                ^^^^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:249:1&#xD;&#xA;              |&#xD;&#xA;          249 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the attribute macro `derive_impl`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:282:3&#xD;&#xA;              |&#xD;&#xA;          282 | #[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)]&#xD;&#xA;              |   ^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:324:1&#xD;&#xA;              |&#xD;&#xA;          324 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:347:1&#xD;&#xA;              |&#xD;&#xA;          347 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:367:1&#xD;&#xA;              |&#xD;&#xA;          367 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:394:1&#xD;&#xA;              |&#xD;&#xA;          394 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:435:1&#xD;&#xA;              |&#xD;&#xA;          435 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:463:1&#xD;&#xA;              |&#xD;&#xA;          463 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `construct_runtime`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:498:1&#xD;&#xA;              |&#xD;&#xA;          498 | construct_runtime!(&#xD;&#xA;              | ^^^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `impl_runtime_apis`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:546:1&#xD;&#xA;              |&#xD;&#xA;          546 | impl_runtime_apis! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error[E0412]: cannot find type `RelayNetwork` in this scope&#xD;&#xA;            --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/xcm_config.rs:43:21&#xD;&#xA;             |&#xD;&#xA;          &#xD;&#xA;              |&#xD;&#xA;                    &#xD;&#xA;        ganesholi@Ganeshs-MacBook-Air parachain-template % " ContentLicense="CC BY-SA 4.0" />
  <row Id="45650" PostHistoryTypeId="1" PostId="11182" RevisionGUID="8e04339f-1244-4ca3-8373-8cac40380d0c" CreationDate="2024-03-18T10:40:44.677" UserId="2844" Text="Parachain Not Compiling" ContentLicense="CC BY-SA 4.0" />
  <row Id="45651" PostHistoryTypeId="3" PostId="11182" RevisionGUID="8e04339f-1244-4ca3-8373-8cac40380d0c" CreationDate="2024-03-18T10:40:44.677" UserId="2844" Text="|substrate-parachain-template|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45652" PostHistoryTypeId="50" PostId="8448" RevisionGUID="a9681b3f-79e0-4c6d-bb02-07f3421b1e84" CreationDate="2024-03-18T11:03:40.387" UserId="-1" />
  <row Id="45653" PostHistoryTypeId="50" PostId="5044" RevisionGUID="13615935-a0bc-4a95-b582-db4a8a3866bc" CreationDate="2024-03-18T12:07:00.860" UserId="-1" />
  <row Id="45654" PostHistoryTypeId="2" PostId="11183" RevisionGUID="97e80dd7-8e5c-45d9-84d8-dbd99bf0120b" CreationDate="2024-03-18T13:04:32.787" UserId="94" Text="There was a bug in the currency module on how it handled consumer references.   &#xD;&#xA;These references can keep an account alive to ensure that other pallets that depend on it dont suddenly break since the account disappeared.  &#xD;&#xA;&#xD;&#xA;In your case the issue came the vested transfer. The `vestedTransfer` created two consumer references for the account instead of one. Then the `forceRemoveVestingSchedule` only removed one of those references instead of both. Now the account cannot be reaped anymore.  &#xD;&#xA;&#xD;&#xA;It was fixed in [#1976](https://github.com/paritytech/polkadot-sdk/pull/1976), but all chains who ran into the issue prior to this will have a messed up storage. We are working on fixing this, but currently the scope of the issue is still unclear." ContentLicense="CC BY-SA 4.0" />
  <row Id="45656" PostHistoryTypeId="50" PostId="3187" RevisionGUID="fc1f7438-1ee1-436c-83ff-4ed4ab5ac941" CreationDate="2024-03-18T16:01:25.203" UserId="-1" />
  <row Id="45657" PostHistoryTypeId="2" PostId="11184" RevisionGUID="28c0a6e0-5f73-4968-b5eb-80b1f1c83160" CreationDate="2024-03-18T22:46:10.323" UserId="3991" Text="Try `cargo build --release --locked`" ContentLicense="CC BY-SA 4.0" />
  <row Id="45659" PostHistoryTypeId="5" PostId="11182" RevisionGUID="97f8f9a6-6dc6-4d74-884c-b6d174249419" CreationDate="2024-03-19T02:36:29.407" UserId="2844" Comment="deleted 2 characters in body" Text="We are updating parachain template in `v1.6.0`,when building by using `cargo build --release`, we're getting weird error.&#xD;&#xA;Can someone suggest what we are doing wrong?&#xD;&#xA;&#xD;&#xA;[Github repo](https://github.com/XcavateBlockchain/Xcavate_chain)&#xD;&#xA;&#xD;&#xA;[ErrorFile Link](https://drive.google.com/file/d/1-Z6MFNBhY-fBxf1sjML2KjcC8ssFjOmI/view?usp=drive_link)&#xD;&#xA;   &#xD;&#xA; &#xD;&#xA;&#xD;&#xA;    match_types! {&#xD;&#xA;             | ^^^^^^^^^^^&#xD;&#xA;             |&#xD;&#xA;             = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `smallvec`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:143:9&#xD;&#xA;              |&#xD;&#xA;          143 |         smallvec![WeightToFeeCoefficient {&#xD;&#xA;              |         ^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `impl_opaque_keys`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:174:1&#xD;&#xA;              |&#xD;&#xA;          174 | impl_opaque_keys! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `create_runtime_str`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:182:16&#xD;&#xA;              |&#xD;&#xA;          182 |     spec_name: create_runtime_str!(&quot;template-parachain&quot;),&#xD;&#xA;              |                ^^^^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `create_runtime_str`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:183:16&#xD;&#xA;              |&#xD;&#xA;          183 |     impl_name: create_runtime_str!(&quot;template-parachain&quot;),&#xD;&#xA;              |                ^^^^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:249:1&#xD;&#xA;              |&#xD;&#xA;          249 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the attribute macro `derive_impl`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:282:3&#xD;&#xA;              |&#xD;&#xA;          282 | #[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)]&#xD;&#xA;              |   ^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:324:1&#xD;&#xA;              |&#xD;&#xA;          324 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:347:1&#xD;&#xA;              |&#xD;&#xA;          347 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:367:1&#xD;&#xA;              |&#xD;&#xA;          367 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:394:1&#xD;&#xA;              |&#xD;&#xA;          394 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:435:1&#xD;&#xA;              |&#xD;&#xA;          435 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `parameter_types`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:463:1&#xD;&#xA;              |&#xD;&#xA;          463 | parameter_types! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `construct_runtime`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:498:1&#xD;&#xA;              |&#xD;&#xA;          498 | construct_runtime!(&#xD;&#xA;              | ^^^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error: cannot determine resolution for the macro `impl_runtime_apis`&#xD;&#xA;             --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/lib.rs:546:1&#xD;&#xA;              |&#xD;&#xA;          546 | impl_runtime_apis! {&#xD;&#xA;              | ^^^^^^^^^^^^^^^^^&#xD;&#xA;              |&#xD;&#xA;              = note: import resolution is stuck, try simplifying macro imports&#xD;&#xA;        &#xD;&#xA;          error[E0412]: cannot find type `RelayNetwork` in this scope&#xD;&#xA;            --&gt; /Users/ganesholi/xcav/parachain-template/runtime/src/xcm_config.rs:43:21&#xD;&#xA;             |&#xD;&#xA;          &#xD;&#xA;              |&#xD;&#xA;                    &#xD;&#xA;        ganesholi@Ganeshs-MacBook-Air parachain-template % " ContentLicense="CC BY-SA 4.0" />
  <row Id="45660" PostHistoryTypeId="2" PostId="11185" RevisionGUID="449261cb-caa0-4d09-a500-4e4560875411" CreationDate="2024-03-19T07:07:14.753" UserId="5231" Text="I'm upgrading a Parachain from Polkadot v1.6 to v1.8 (in one go). I followed all the instructions provided on the [Polkadot wiki][1] and I'm now applying the changes in [step 3][2]. I start a local network (with the async backing configurations for Rococo):&#xD;&#xA; 1. start network with latest binary Parachain node and runtime (v1.8).&#xD;&#xA; 2. do runtime upgrade to runtime wasm blob of live running chain (v1.6).&#xD;&#xA; 3. do runtime upgrade to latest version of runtime wasm blob (v1.8).&#xD;&#xA;&#xD;&#xA;After step 3 I get the error: [slot number mismatch][2]:&#xD;&#xA;```&#xD;&#xA;assertion `left == right` failed: slot number mismatch&#xD;&#xA;  left: Slot(142568897)&#xD;&#xA;  right: Slot(285137795)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see the `para_slot_from_relay` is twice as big than the slot obtained from [here][3]. The slot duration of both relay and para is set to 6000. I don't understand why it is failing.&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-async-backing&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/maintain-guides-async-backing#phase-3---activate-async-backing&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/e2ead8887681d2236cae4a0f05b05e4cb5bf63a7/cumulus/pallets/aura-ext/src/consensus_hook.rs#L57" ContentLicense="CC BY-SA 4.0" />
  <row Id="45662" PostHistoryTypeId="1" PostId="11185" RevisionGUID="449261cb-caa0-4d09-a500-4e4560875411" CreationDate="2024-03-19T07:07:14.753" UserId="5231" Text="&quot;Slot number mismatch&quot; after runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="45663" PostHistoryTypeId="3" PostId="11185" RevisionGUID="449261cb-caa0-4d09-a500-4e4560875411" CreationDate="2024-03-19T07:07:14.753" UserId="5231" Text="|runtime-upgrade|cumulus|async-backing|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45664" PostHistoryTypeId="2" PostId="11186" RevisionGUID="13c67057-abc1-4d45-a2f0-3f6e8108c0c4" CreationDate="2024-03-19T08:47:46.150" UserId="5232" Text="How to check if a stash account set the claim permissions to PermissionlessAll?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45666" PostHistoryTypeId="1" PostId="11186" RevisionGUID="13c67057-abc1-4d45-a2f0-3f6e8108c0c4" CreationDate="2024-03-19T08:47:46.150" UserId="5232" Text="Checking 'PermissionlessAll' Settings" ContentLicense="CC BY-SA 4.0" />
  <row Id="45667" PostHistoryTypeId="3" PostId="11186" RevisionGUID="13c67057-abc1-4d45-a2f0-3f6e8108c0c4" CreationDate="2024-03-19T08:47:46.150" UserId="5232" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45668" PostHistoryTypeId="2" PostId="11187" RevisionGUID="3d3edefe-0fab-42b2-98fc-957d769387fe" CreationDate="2024-03-19T09:28:10.343" UserId="5233" Text="I am looking to completely remove a `StorageMap` from the inclusion runtime module of the polkadot relay chain.&#xD;&#xA;I am writing a migration for it and I'm wondering whether it's enough to call `clear` on the map: https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/types/struct.StorageMap.html#method.clear&#xD;&#xA;&#xD;&#xA;Will `clear` delete all the stored data (including any metadata related to the map), or just the elements?&#xD;&#xA;&#xD;&#xA;Looking at the implementation, it ends up calling `clear_prefix`, which should delete all info from the storage trie with the prefix, so I'm assuming this is the way to go." ContentLicense="CC BY-SA 4.0" />
  <row Id="45670" PostHistoryTypeId="1" PostId="11187" RevisionGUID="3d3edefe-0fab-42b2-98fc-957d769387fe" CreationDate="2024-03-19T09:28:10.343" UserId="5233" Text="removing a StorageMap from a pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="45671" PostHistoryTypeId="3" PostId="11187" RevisionGUID="3d3edefe-0fab-42b2-98fc-957d769387fe" CreationDate="2024-03-19T09:28:10.343" UserId="5233" Text="|frame|storagemap|storage-migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45672" PostHistoryTypeId="50" PostId="10278" RevisionGUID="77229724-dca4-4534-a00f-7a2ea4cf2b8a" CreationDate="2024-03-19T12:03:15.440" UserId="-1" />
  <row Id="45673" PostHistoryTypeId="5" PostId="11185" RevisionGUID="0524d54a-30a7-4e92-bcef-f4281865e2e0" CreationDate="2024-03-19T12:24:38.867" UserId="5231" Comment="edited body" Text="I'm upgrading a Parachain from Polkadot v1.6 to v1.8 (in one go). I followed all the instructions provided on the [Polkadot wiki][1] and I'm now applying the changes in [step 3][2]. I start a local network (with the async backing configurations for Rococo):&#xD;&#xA; 1. start network with latest binary Parachain node and runtime (v1.8).&#xD;&#xA; 2. do runtime upgrade to runtime wasm blob of live running chain (v1.6).&#xD;&#xA; 3. do runtime upgrade to latest version of runtime wasm blob (v1.8).&#xD;&#xA;&#xD;&#xA;After step 3 I get the error: [slot number mismatch][3]:&#xD;&#xA;```&#xD;&#xA;assertion `left == right` failed: slot number mismatch&#xD;&#xA;  left: Slot(142568897)&#xD;&#xA;  right: Slot(285137795)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see the `para_slot_from_relay` is twice as big than the slot obtained from [here][3]. The slot duration of both relay and para is set to 6000. I don't understand why it is failing.&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-async-backing&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/maintain-guides-async-backing#phase-3---activate-async-backing&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/e2ead8887681d2236cae4a0f05b05e4cb5bf63a7/cumulus/pallets/aura-ext/src/consensus_hook.rs#L69" ContentLicense="CC BY-SA 4.0" />
  <row Id="45674" PostHistoryTypeId="2" PostId="11188" RevisionGUID="3c29fb8b-b6aa-4c22-8170-f25bd2b38f69" CreationDate="2024-03-19T12:31:13.013" UserId="73" Text="Yes, this will remove all the entries. The `StorageMap` itself doesn't has any metadata that is stored in the state. Before deleting the map, you should check the number of elements in it. Deleting millions of key/value pairs would take some time ;) In this case a multi-block migration would probably be better." ContentLicense="CC BY-SA 4.0" />
  <row Id="45676" PostHistoryTypeId="5" PostId="11185" RevisionGUID="b83dae59-7e20-4880-9144-c7679c42a097" CreationDate="2024-03-19T13:53:02.507" UserId="5231" Comment="added 89 characters in body" Text="I'm upgrading a Parachain from Polkadot v1.6 to v1.8 (in one go). I followed all the instructions provided on the [Polkadot wiki][1] and I'm now applying the changes in [step 3][2]. I start a local network (with the async backing configurations for Rococo):&#xD;&#xA; 1. start network with latest binary Parachain node and runtime (v1.8).&#xD;&#xA; 2. do runtime upgrade to runtime wasm blob of live running chain (v1.6).&#xD;&#xA; 3. do runtime upgrade to latest version of runtime wasm blob (v1.8).&#xD;&#xA;&#xD;&#xA;After step 3 I get the error: [slot number mismatch][3]:&#xD;&#xA;```&#xD;&#xA;assertion `left == right` failed: slot number mismatch&#xD;&#xA;  left: Slot(142568897)&#xD;&#xA;  right: Slot(285137795)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As you can see the `para_slot_from_relay` is twice as big than the slot obtained from [here][3]. The slot duration of both relay and para is set to 6000. I don't understand why it is failing.&#xD;&#xA;&#xD;&#xA;[![enter image description here][4]][4]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://wiki.polkadot.network/docs/maintain-guides-async-backing&#xD;&#xA;  [2]: https://wiki.polkadot.network/docs/maintain-guides-async-backing#phase-3---activate-async-backing&#xD;&#xA;  [3]: https://github.com/paritytech/polkadot-sdk/blob/e2ead8887681d2236cae4a0f05b05e4cb5bf63a7/cumulus/pallets/aura-ext/src/consensus_hook.rs#L69&#xD;&#xA;  [4]: https://i.stack.imgur.com/TqY2p.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="45677" PostHistoryTypeId="2" PostId="11189" RevisionGUID="46f26db7-6b19-45a4-9faa-67a8b4e43cba" CreationDate="2024-03-19T14:36:32.860" UserId="85" Text="In a substrate chain (not a parachain) it has been suggested to store chain data not on-chain in the paritydb, but manually saving to disk via an append only structure (presumably using some host function calls).&#xD;&#xA;&#xD;&#xA;What kind of substrate assumptions would this invalidate?&#xD;&#xA;&#xD;&#xA;(To be clear I'm not advocating this, but would like some specific talking points around why this may be a sub-optimal decision)" ContentLicense="CC BY-SA 4.0" />
  <row Id="45679" PostHistoryTypeId="1" PostId="11189" RevisionGUID="46f26db7-6b19-45a4-9faa-67a8b4e43cba" CreationDate="2024-03-19T14:36:32.860" UserId="85" Text="What are the downsides to storing state in an append only structure on the node's disk drive somewhere?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45680" PostHistoryTypeId="3" PostId="11189" RevisionGUID="46f26db7-6b19-45a4-9faa-67a8b4e43cba" CreationDate="2024-03-19T14:36:32.860" UserId="85" Text="|state|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45681" PostHistoryTypeId="5" PostId="11189" RevisionGUID="ce1b2df7-671e-4f9a-8188-d6d6ee3a5e47" CreationDate="2024-03-19T15:18:03.157" UserId="85" Comment="added 5 characters in body" Text="In a substrate chain (not a parachain) it has been suggested to store chain data not on-chain in the paritydb, but manually saving to disk via an append only file structure (presumably using some host function calls).&#xD;&#xA;&#xD;&#xA;What kind of substrate assumptions would this invalidate?&#xD;&#xA;&#xD;&#xA;(To be clear I'm not advocating this, but would like some specific talking points around why this may be a sub-optimal decision)" ContentLicense="CC BY-SA 4.0" />
  <row Id="45682" PostHistoryTypeId="52" PostId="11187" RevisionGUID="c1b3274f-4474-4cc6-9cbc-8243087f0a0a" CreationDate="2024-03-19T17:36:43.517" />
  <row Id="45683" PostHistoryTypeId="2" PostId="11190" RevisionGUID="6b0a62d3-875d-4083-8026-0d1a2f90ee93" CreationDate="2024-03-19T22:49:39.270" UserId="4859" Text="How can we see the lock duration for Referenda (convictionVoting) if the votes are deleted?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;On Polkadot and Kusama, if you delete your Referenda Votes it's not possible to see the details of the conviction.&#xD;&#xA;&#xD;&#xA;The classLocks are not deleted:&#xD;&#xA;```js&#xD;&#xA;  const classLocks = await apiAt.query.convictionVoting.classLocksFor(account)&#xD;&#xA;  console.debug('classLocks', classLocks.toJSON().sort((a, b) =&gt; a[0] - b[0]))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;produces:&#xD;&#xA;```bash&#xD;&#xA;classLocks [&#xD;&#xA;  [ 0, 100000000000000 ],&#xD;&#xA;  [ 1, 100000000000000 ],&#xD;&#xA;  [ 10, 20000000000000 ],&#xD;&#xA;  [ 11, 100000000000000 ],&#xD;&#xA;  [ 12, 20000000000000 ],&#xD;&#xA;  [ 13, 20000000000000 ],&#xD;&#xA;  [ 14, 20000000000000 ],&#xD;&#xA;  [ 15, 20000000000000 ],&#xD;&#xA;  [ 20, 20000000000000 ],&#xD;&#xA;  [ 21, 20000000000000 ],&#xD;&#xA;  [ 30, 20000000000000 ],&#xD;&#xA;  [ 31, 20000000000000 ],&#xD;&#xA;  [ 32, 100000000000000 ],&#xD;&#xA;  [ 33, 100000000000000 ],&#xD;&#xA;  [ 34, 100000000000000 ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;...but I can't see when these locks will release?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If the votes exist on-chain, we can calculate the estimated time remaining:&#xD;&#xA;```js&#xD;&#xA;   const trackIds = [&#xD;&#xA;     0, // Root&#xD;&#xA;     1, // Whitelisted Caller&#xD;&#xA;    //  2, 3, 4, 5, 6, 7, 8, 9, &#xD;&#xA;     10, // Staking Admin&#xD;&#xA;     11, // Treasurer&#xD;&#xA;     12, // Lease Admin&#xD;&#xA;     13, // Fellowship Admin&#xD;&#xA;     14, // General Admin&#xD;&#xA;     15, // AuctionAdmin&#xD;&#xA;    //  16, 17, 18, 19, &#xD;&#xA;     20, // Referendum Canceller&#xD;&#xA;     21, // Referendum Killer&#xD;&#xA;     22, &#xD;&#xA;    //  21, 23, 24, 25, 26, 27, 28, 29, &#xD;&#xA;     30, // Small Tipper&#xD;&#xA;     31, // Big Tipper&#xD;&#xA;     32, // Small Spender&#xD;&#xA;     33, // Medium Spender&#xD;&#xA;     34, // Big Spender&#xD;&#xA;     35,&#xD;&#xA;     // 36&#xD;&#xA;   ]&#xD;&#xA;   const txs = []&#xD;&#xA;&#xD;&#xA;  // for each trackId&#xD;&#xA;  for (let i = 0; i &lt; trackIds.length; i++) {&#xD;&#xA;    const trackId = trackIds[i]&#xD;&#xA;    if (trackId === undefined) continue&#xD;&#xA;    const result = await apiAt.query.convictionVoting.votingFor(account, trackId) //, async (result) =&gt; {&#xD;&#xA;    const trackVote = result.toJSON()&#xD;&#xA;    // console.debug('votingFor', trackId, trackVote)&#xD;&#xA;    console.debug('votingFor', trackId)&#xD;&#xA;    // votingFor 0 {&#xD;&#xA;    //   delegating: {&#xD;&#xA;    //     balance: 20000000000000,&#xD;&#xA;    //     target: 'F5212cNTxkoLQV9k3v74hLvdu76GebcxXDEhUR7gR9xMaDn',&#xD;&#xA;    //     conviction: 'Locked6x',&#xD;&#xA;    //     delegations: { votes: 0, capital: 0 },&#xD;&#xA;    //     prior: [ 19889885, 20000000000000 ]&#xD;&#xA;    //   }&#xD;&#xA;    // }&#xD;&#xA;    // votingFor 1 {&#xD;&#xA;    //   casting: {&#xD;&#xA;    //     votes: [],&#xD;&#xA;    //     delegations: { votes: 240000000000000, capital: 40000000000000 },&#xD;&#xA;    //     prior: [ 0, 0 ]&#xD;&#xA;    //   }&#xD;&#xA;    // }&#xD;&#xA;    // 'prior' seems to hold the block number and the amount locked&#xD;&#xA;    if(trackVote.delegating?.prior || trackVote.casting?.prior) {&#xD;&#xA;      try {&#xD;&#xA;        const [blockNumber, amount] = trackVote.delegating?.prior || trackVote.casting.prior&#xD;&#xA;        if (blockNumber === 0) {&#xD;&#xA;          console.debug('no prior block', trackVote.delegating?.prior, trackVote.casting?.prior)&#xD;&#xA;          continue&#xD;&#xA;        }&#xD;&#xA;        const conviction = trackVote.delegating?.conviction || trackVote.casting?.conviction&#xD;&#xA;        console.debug('blockNumber', blockNumber, 'amount', amount/denom, 'conviction', conviction)&#xD;&#xA;        // get the block hash&#xD;&#xA;        const blockHash = await api.rpc.chain.getBlockHash(blockNumber)&#xD;&#xA;        const block = await api.rpc.chain.getBlock(blockHash)&#xD;&#xA;        // console.debug('block', block.block.extrinsics.toJSON())&#xD;&#xA;        // console.debug(block.block.extrinsics.length, 'extrinsics')&#xD;&#xA;        const blockTime = block.block.extrinsics[0].method.args[0].toNumber()&#xD;&#xA;        const lockTime = moment(blockTime)&#xD;&#xA;        const unlockTime = lockTime.add(convictions[CHAIN_ID][conviction], 'days')&#xD;&#xA;        console.debug('lockTime', lockTime.format('YYYY-MM-DD HH:mm:ss'), 'unlockTime', unlockTime.format('YYYY-MM-DD HH:mm:ss'))&#xD;&#xA;      } catch (e) {&#xD;&#xA;        console.error('error', e)&#xD;&#xA;        process.exit()&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;    if (trackVote.casting || trackVote.delegating) {&#xD;&#xA;      // unlock requires signature from controller&#xD;&#xA;      if (allowUnlock) {&#xD;&#xA;        txs.push(api.tx.convictionVoting.unlock(trackId, account))&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;produces: &#xD;&#xA;```bash&#xD;&#xA;votingFor 0&#xD;&#xA;blockNumber 19889885 amount 20 conviction Locked6x&#xD;&#xA;lockTime 2024-05-10 09:37:30 unlockTime 2024-05-10 09:37:30&#xD;&#xA;votingFor 1&#xD;&#xA;blockNumber 20939516 amount 100 conviction Locked6x&#xD;&#xA;lockTime 2024-07-22 10:19:36 unlockTime 2024-07-22 10:19:36&#xD;&#xA;votingFor 10&#xD;&#xA;blockNumber 20786242 amount 20 conviction Locked6x&#xD;&#xA;lockTime 2024-07-11 18:17:36 unlockTime 2024-07-11 18:17:36&#xD;&#xA;votingFor 11&#xD;&#xA;blockNumber 21062934 amount 20 conviction Locked6x&#xD;&#xA;lockTime 2024-07-31 00:28:12 unlockTime 2024-07-31 00:28:12&#xD;&#xA;votingFor 12&#xD;&#xA;no prior block [ 0, 0 ] undefined&#xD;&#xA;```" ContentLicense="CC BY-SA 4.0" />
  <row Id="45685" PostHistoryTypeId="1" PostId="11190" RevisionGUID="6b0a62d3-875d-4083-8026-0d1a2f90ee93" CreationDate="2024-03-19T22:49:39.270" UserId="4859" Text="Get lock details from convictionVoting (even after deleting votes)" ContentLicense="CC BY-SA 4.0" />
  <row Id="45686" PostHistoryTypeId="3" PostId="11190" RevisionGUID="6b0a62d3-875d-4083-8026-0d1a2f90ee93" CreationDate="2024-03-19T22:49:39.270" UserId="4859" Text="|polkadot-js|polkadot|kusama|governance|referenda|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45687" PostHistoryTypeId="5" PostId="11190" RevisionGUID="cf48fca9-e6c5-4a0c-8390-8fb7d6abb60f" CreationDate="2024-03-19T23:03:45.283" UserId="4859" Comment="deleted 421 characters in body" Text="How can we see the lock duration for Referenda (convictionVoting) if the votes are deleted?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;On Polkadot and Kusama, if you delete your Referenda Votes it's not possible to see the details of the conviction.&#xD;&#xA;&#xD;&#xA;The classLocks are not deleted:&#xD;&#xA;```js&#xD;&#xA;  const classLocks = await apiAt.query.convictionVoting.classLocksFor(account)&#xD;&#xA;  console.debug('classLocks', classLocks.toJSON().sort((a, b) =&gt; a[0] - b[0]))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;produces:&#xD;&#xA;```bash&#xD;&#xA;classLocks [&#xD;&#xA;  [ 0, 100000000000000 ],&#xD;&#xA;  [ 1, 100000000000000 ],&#xD;&#xA;  [ 10, 20000000000000 ],&#xD;&#xA;  [ 11, 100000000000000 ],&#xD;&#xA;  [ 12, 20000000000000 ],&#xD;&#xA;  [ 13, 20000000000000 ],&#xD;&#xA;  [ 14, 20000000000000 ],&#xD;&#xA;  [ 15, 20000000000000 ],&#xD;&#xA;  [ 20, 20000000000000 ],&#xD;&#xA;  [ 21, 20000000000000 ],&#xD;&#xA;  [ 30, 20000000000000 ],&#xD;&#xA;  [ 31, 20000000000000 ],&#xD;&#xA;  [ 32, 100000000000000 ],&#xD;&#xA;  [ 33, 100000000000000 ],&#xD;&#xA;  [ 34, 100000000000000 ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;...but I can't see when these locks will release?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If the votes exist on-chain, we can calculate the estimated time remaining:&#xD;&#xA;```js&#xD;&#xA;   const trackIds = [&#xD;&#xA;     0, // Root&#xD;&#xA;     1, // Whitelisted Caller&#xD;&#xA;    //  2, 3, 4, 5, 6, 7, 8, 9, &#xD;&#xA;     10, // Staking Admin&#xD;&#xA;     11, // Treasurer&#xD;&#xA;     12, // Lease Admin&#xD;&#xA;     13, // Fellowship Admin&#xD;&#xA;     14, // General Admin&#xD;&#xA;     15, // AuctionAdmin&#xD;&#xA;    //  16, 17, 18, 19, &#xD;&#xA;     20, // Referendum Canceller&#xD;&#xA;     21, // Referendum Killer&#xD;&#xA;     22, &#xD;&#xA;    //  21, 23, 24, 25, 26, 27, 28, 29, &#xD;&#xA;     30, // Small Tipper&#xD;&#xA;     31, // Big Tipper&#xD;&#xA;     32, // Small Spender&#xD;&#xA;     33, // Medium Spender&#xD;&#xA;     34, // Big Spender&#xD;&#xA;     35,&#xD;&#xA;     // 36&#xD;&#xA;   ]&#xD;&#xA;   const txs = []&#xD;&#xA;&#xD;&#xA;  // for each trackId&#xD;&#xA;  for (let i = 0; i &lt; trackIds.length; i++) {&#xD;&#xA;    const trackId = trackIds[i]&#xD;&#xA;    if (trackId === undefined) continue&#xD;&#xA;    const result = await apiAt.query.convictionVoting.votingFor(account, trackId) //, async (result) =&gt; {&#xD;&#xA;    const trackVote = result.toJSON()&#xD;&#xA;    // console.debug('votingFor', trackId, trackVote)&#xD;&#xA;    console.debug('votingFor', trackId)&#xD;&#xA;    // votingFor 0 {&#xD;&#xA;    //   delegating: {&#xD;&#xA;    //     balance: 20000000000000,&#xD;&#xA;    //     target: 'F5212cNTxkoLQV9k3v74hLvdu76GebcxXDEhUR7gR9xMaDn',&#xD;&#xA;    //     conviction: 'Locked6x',&#xD;&#xA;    //     delegations: { votes: 0, capital: 0 },&#xD;&#xA;    //     prior: [ 19889885, 20000000000000 ]&#xD;&#xA;    //   }&#xD;&#xA;    // }&#xD;&#xA;    // votingFor 1 {&#xD;&#xA;    //   casting: {&#xD;&#xA;    //     votes: [],&#xD;&#xA;    //     delegations: { votes: 240000000000000, capital: 40000000000000 },&#xD;&#xA;    //     prior: [ 0, 0 ]&#xD;&#xA;    //   }&#xD;&#xA;    // }&#xD;&#xA;    // 'prior' seems to hold the block number and the amount locked&#xD;&#xA;    if(trackVote.delegating?.prior || trackVote.casting?.prior) {&#xD;&#xA;      try {&#xD;&#xA;        const [blockNumber, amount] = trackVote.delegating?.prior || trackVote.casting.prior&#xD;&#xA;        if (blockNumber === 0) {&#xD;&#xA;          console.debug('no prior block', trackVote.delegating?.prior, trackVote.casting?.prior)&#xD;&#xA;          continue&#xD;&#xA;        }&#xD;&#xA;        const conviction = trackVote.delegating?.conviction || trackVote.casting?.conviction&#xD;&#xA;        console.debug('blockNumber', blockNumber, 'amount', amount/denom, 'conviction', conviction)&#xD;&#xA;        // get the block hash&#xD;&#xA;        const blockHash = await api.rpc.chain.getBlockHash(blockNumber)&#xD;&#xA;        const block = await api.rpc.chain.getBlock(blockHash)&#xD;&#xA;        // console.debug('block', block.block.extrinsics.toJSON())&#xD;&#xA;        // console.debug(block.block.extrinsics.length, 'extrinsics')&#xD;&#xA;        const blockTime = block.block.extrinsics[0].method.args[0].toNumber()&#xD;&#xA;        const lockTime = moment(blockTime)&#xD;&#xA;        console.debug('lockTime', lockTime.format('YYYY-MM-DD HH:mm:ss'))&#xD;&#xA;      } catch (e) {&#xD;&#xA;        console.error('error', e)&#xD;&#xA;        process.exit()&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;produces: &#xD;&#xA;```bash&#xD;&#xA;votingFor 0&#xD;&#xA;blockNumber 19889885 amount 20 conviction Locked6x&#xD;&#xA;lockTime 2024-05-10 09:37:30&#xD;&#xA;votingFor 1&#xD;&#xA;blockNumber 20939516 amount 100 conviction Locked6x&#xD;&#xA;lockTime 2024-07-22 10:19:36&#xD;&#xA;votingFor 10&#xD;&#xA;blockNumber 20786242 amount 20 conviction Locked6x&#xD;&#xA;lockTime 2024-07-11 18:17:36&#xD;&#xA;votingFor 11&#xD;&#xA;blockNumber 21062934 amount 20 conviction Locked6x&#xD;&#xA;lockTime 2024-07-31 00:28:12&#xD;&#xA;votingFor 12&#xD;&#xA;no prior block [ 0, 0 ] undefined&#xD;&#xA;```&#xD;&#xA;... however, these 'blockTimes' seem to be in the future?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45688" PostHistoryTypeId="5" PostId="11190" RevisionGUID="f621a2a2-5b17-4d93-8b42-af1e31c861c2" CreationDate="2024-03-19T23:12:19.857" UserId="4859" Comment="added 209 characters in body" Text="How can we see the lock duration for Referenda (convictionVoting) if the votes are deleted?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;On Polkadot and Kusama, if you delete your Referenda Votes it's not possible to see the details of the conviction.&#xD;&#xA;&#xD;&#xA;The classLocks are not deleted:&#xD;&#xA;```js&#xD;&#xA;  const classLocks = await apiAt.query.convictionVoting.classLocksFor(account)&#xD;&#xA;  console.debug('classLocks', classLocks.toJSON().sort((a, b) =&gt; a[0] - b[0]))&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;produces:&#xD;&#xA;```bash&#xD;&#xA;classLocks [&#xD;&#xA;  [ 0, 100000000000000 ],&#xD;&#xA;  [ 1, 100000000000000 ],&#xD;&#xA;  [ 10, 20000000000000 ],&#xD;&#xA;  [ 11, 100000000000000 ],&#xD;&#xA;  [ 12, 20000000000000 ],&#xD;&#xA;  [ 13, 20000000000000 ],&#xD;&#xA;  [ 14, 20000000000000 ],&#xD;&#xA;  [ 15, 20000000000000 ],&#xD;&#xA;  [ 20, 20000000000000 ],&#xD;&#xA;  [ 21, 20000000000000 ],&#xD;&#xA;  [ 30, 20000000000000 ],&#xD;&#xA;  [ 31, 20000000000000 ],&#xD;&#xA;  [ 32, 100000000000000 ],&#xD;&#xA;  [ 33, 100000000000000 ],&#xD;&#xA;  [ 34, 100000000000000 ]&#xD;&#xA;]&#xD;&#xA;```&#xD;&#xA;...but I can't see when these locks will release?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If the votes exist on-chain, we can calculate the estimated time remaining:&#xD;&#xA;```js&#xD;&#xA;   const trackIds = [&#xD;&#xA;     0, // Root&#xD;&#xA;     1, // Whitelisted Caller&#xD;&#xA;    //  2, 3, 4, 5, 6, 7, 8, 9, &#xD;&#xA;     10, // Staking Admin&#xD;&#xA;     11, // Treasurer&#xD;&#xA;     12, // Lease Admin&#xD;&#xA;     13, // Fellowship Admin&#xD;&#xA;     14, // General Admin&#xD;&#xA;     15, // AuctionAdmin&#xD;&#xA;    //  16, 17, 18, 19, &#xD;&#xA;     20, // Referendum Canceller&#xD;&#xA;     21, // Referendum Killer&#xD;&#xA;     22, &#xD;&#xA;    //  21, 23, 24, 25, 26, 27, 28, 29, &#xD;&#xA;     30, // Small Tipper&#xD;&#xA;     31, // Big Tipper&#xD;&#xA;     32, // Small Spender&#xD;&#xA;     33, // Medium Spender&#xD;&#xA;     34, // Big Spender&#xD;&#xA;     35,&#xD;&#xA;     // 36&#xD;&#xA;   ]&#xD;&#xA;   const txs = []&#xD;&#xA;&#xD;&#xA;  // for each trackId&#xD;&#xA;  for (let i = 0; i &lt; trackIds.length; i++) {&#xD;&#xA;    const trackId = trackIds[i]&#xD;&#xA;    if (trackId === undefined) continue&#xD;&#xA;    const result = await apiAt.query.convictionVoting.votingFor(account, trackId) //, async (result) =&gt; {&#xD;&#xA;    const trackVote = result.toJSON()&#xD;&#xA;    // console.debug('votingFor', trackId, trackVote)&#xD;&#xA;    console.debug('votingFor', trackId)&#xD;&#xA;    // votingFor 0 {&#xD;&#xA;    //   delegating: {&#xD;&#xA;    //     balance: 20000000000000,&#xD;&#xA;    //     target: 'F5212cNTxkoLQV9k3v74hLvdu76GebcxXDEhUR7gR9xMaDn',&#xD;&#xA;    //     conviction: 'Locked6x',&#xD;&#xA;    //     delegations: { votes: 0, capital: 0 },&#xD;&#xA;    //     prior: [ 19889885, 20000000000000 ]&#xD;&#xA;    //   }&#xD;&#xA;    // }&#xD;&#xA;    // votingFor 1 {&#xD;&#xA;    //   casting: {&#xD;&#xA;    //     votes: [],&#xD;&#xA;    //     delegations: { votes: 240000000000000, capital: 40000000000000 },&#xD;&#xA;    //     prior: [ 0, 0 ]&#xD;&#xA;    //   }&#xD;&#xA;    // }&#xD;&#xA;    // 'prior' seems to hold the block number and the amount locked&#xD;&#xA;    if(trackVote.delegating?.prior || trackVote.casting?.prior) {&#xD;&#xA;      try {&#xD;&#xA;        const [blockNumber, amount] = trackVote.delegating?.prior || trackVote.casting.prior&#xD;&#xA;        if (blockNumber === 0) {&#xD;&#xA;          console.debug('no prior block', trackVote.delegating?.prior, trackVote.casting?.prior)&#xD;&#xA;          continue&#xD;&#xA;        }&#xD;&#xA;        const conviction = trackVote.delegating?.conviction || trackVote.casting?.conviction&#xD;&#xA;        console.debug('blockNumber', blockNumber, 'amount', amount/denom, 'conviction', conviction)&#xD;&#xA;        // get the block hash&#xD;&#xA;        const blockHash = await api.rpc.chain.getBlockHash(blockNumber)&#xD;&#xA;        const block = await api.rpc.chain.getBlock(blockHash)&#xD;&#xA;        // console.debug('block', block.block.extrinsics.toJSON())&#xD;&#xA;        // console.debug(block.block.extrinsics.length, 'extrinsics')&#xD;&#xA;        const blockTime = block.block.extrinsics[0].method.args[0].toNumber()&#xD;&#xA;        // console.debug('blockTime', blockTime, moment(blockTime).format('YYYY-MM-DD HH:mm:ss'))&#xD;&#xA;        const lockTime = moment(blockTime)&#xD;&#xA;        const days = convictions[CHAIN_ID][conviction]&#xD;&#xA;        // console.debug('lockTime', lockTime.format('YYYY-MM-DD HH:mm:ss'), 'days', days)&#xD;&#xA;        var unlockTime = moment(blockTime); unlockTime.add(days, 'days')&#xD;&#xA;        console.debug('lockTime', lockTime.format('YYYY-MM-DD HH:mm:ss'), 'days', days, 'unlockTime', unlockTime.format('YYYY-MM-DD HH:mm:ss'))&#xD;&#xA;      } catch (e) {&#xD;&#xA;        console.error('error', e)&#xD;&#xA;        process.exit()&#xD;&#xA;      }&#xD;&#xA;    }&#xD;&#xA;  }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;produces: &#xD;&#xA;```bash&#xD;&#xA;blockNumber 19895325 amount 20 conviction Locked6x&#xD;&#xA;lockTime 2023-09-29 18:42:36 days 224 unlockTime 2024-05-10 18:42:36&#xD;&#xA;votingFor 20&#xD;&#xA;blockNumber 20079887 amount 20 conviction Locked6x&#xD;&#xA;lockTime 2023-10-12 14:55:24 days 224 unlockTime 2024-05-23 14:55:24&#xD;&#xA;votingFor 21&#xD;&#xA;no prior block [ 0, 0 ] undefined&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45689" PostHistoryTypeId="2" PostId="11191" RevisionGUID="eaa2c2df-3739-41c3-8a5b-b6af513df7f7" CreationDate="2024-03-19T23:15:23.377" UserId="5236" Text="I am using chrome browser (ver. 122.0.6261.129) with polkadot.js extension.  Been able to access my account without issues for over 2.5 years to view my daily increases from staking polkadot.  For about last 2 weeks, I have been unable to view my account.  Maybe once a week, it will successfully complete the display of my account and then would not do so on the next attempt. I would get the no account has been injected message.&#xD;&#xA;&#xD;&#xA;I am able to keep track of my daily staking rewards from the polkadot.subscan.io site.  How would I go about recovering my injected account on the js site?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45691" PostHistoryTypeId="1" PostId="11191" RevisionGUID="eaa2c2df-3739-41c3-8a5b-b6af513df7f7" CreationDate="2024-03-19T23:15:23.377" UserId="5236" Text="Polkadot.js extension detected but &quot;no accounts has been injected&quot; message" ContentLicense="CC BY-SA 4.0" />
  <row Id="45692" PostHistoryTypeId="3" PostId="11191" RevisionGUID="eaa2c2df-3739-41c3-8a5b-b6af513df7f7" CreationDate="2024-03-19T23:15:23.377" UserId="5236" Text="|polkadot-js|staking|account|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45693" PostHistoryTypeId="2" PostId="11192" RevisionGUID="7d36c89c-0f3d-4a42-a8f9-3e745100892b" CreationDate="2024-03-20T12:31:50.283" UserId="2451" Text="I am building a substrate based chain (not a parachain) and I require 100% EVM compatibility.  As such, I would like to leverage [erigon][1] as an EVM execution client and use substrate as the consensus engine and for execution of native runtime based extrinsics.  All EVM transactions and any historical data required from the EVM chain would be provided via the erigon RPC - the substrate chains single responsibility would be for consensus. This would follow a similar pattern of how Ethereum is structured with the beacon chain providing consensus and the execution layer providing block production and validation. I was wondering if anyone would be able to provide some insights on how best to implement this structure. I have heard of the wrapped block model which I believe could be of relevance but would also appreciate insights in regards to block production and block import and any changes required to the client and runtime to support such a pattern.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/ledgerwatch/erigon" ContentLicense="CC BY-SA 4.0" />
  <row Id="45695" PostHistoryTypeId="1" PostId="11192" RevisionGUID="7d36c89c-0f3d-4a42-a8f9-3e745100892b" CreationDate="2024-03-20T12:31:50.283" UserId="2451" Text="How to integrate Eirgon EVM execution client into substrate chain" ContentLicense="CC BY-SA 4.0" />
  <row Id="45696" PostHistoryTypeId="3" PostId="11192" RevisionGUID="7d36c89c-0f3d-4a42-a8f9-3e745100892b" CreationDate="2024-03-20T12:31:50.283" UserId="2451" Text="|runtime|evm|client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45697" PostHistoryTypeId="2" PostId="11193" RevisionGUID="e12e7d49-3d4a-4cae-a41e-ac799b36f640" CreationDate="2024-03-20T13:57:08.887" UserId="4556" Text="I'm using the substrate-contracts-node as the base of my node. And I'm now trying to integrate the NFTs pallet into runtime and parachain-runtime.&#xD;&#xA;&#xD;&#xA;I have managed to do this successfully with earlier version. It seems that the current version has changed the way that pallets are imported by migrating to crate version imports instead of git imports. &#xD;&#xA;&#xD;&#xA;In the root Cargo.toml all pallets are imported like this:&#xD;&#xA;```&#xD;&#xA;pallet-aura = { version = &quot;29.0.0&quot;, default-features = false }&#xD;&#xA;pallet-authorship = { version = &quot;30.0.0&quot;, default-features = false }&#xD;&#xA;pallet-balances = { version = &quot;30.0.0&quot;, default-features = false }&#xD;&#xA;pallet-nfts = { version = &quot;25.0.0&quot;, default-features = false }&#xD;&#xA;pallet-message-queue = { version = &quot;33.0.0&quot;, default-features = false }&#xD;&#xA;pallet-session = { version = &quot;30.0.0&quot;, default-features = false }&#xD;&#xA;pallet-sudo = { version = &quot;30.0.0&quot;, default-features = false }&#xD;&#xA;pallet-timestamp = { version = &quot;29.0.0&quot;, default-features = false }&#xD;&#xA;pallet-transaction-payment = { version = &quot;30.0.0&quot;, default-features = false }&#xD;&#xA;pallet-transaction-payment-rpc = { version = &quot;32.0.0&quot; }&#xD;&#xA;pallet-transaction-payment-rpc-runtime-api = { version = &quot;30.0.0&quot;, default-features = false }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I only added pallet-nfts. I used the highest version I could find on crates.io. Then I added pallet-nfts to the dependencies like this: `pallet-nfts = { workspace = true }` and I added the entries for pallet-nfts to `std`, `runtime-benchmarks` and `try-runtime`.&#xD;&#xA;&#xD;&#xA;Then I added the Config implementation:&#xD;&#xA;```&#xD;&#xA;/// Configure pallet-nfts.&#xD;&#xA;impl pallet_nfts::Config for Runtime {&#xD;&#xA;	type RuntimeEvent = RuntimeEvent;&#xD;&#xA;	type CollectionId = u32;&#xD;&#xA;	type ItemId = u32;&#xD;&#xA;	type Currency = Balances;&#xD;&#xA;	type CreateOrigin = AsEnsureOriginWithArg&lt;EnsureSigned&lt;AccountId&gt;&gt;;&#xD;&#xA;	type ForceOrigin = RootOrigin;&#xD;&#xA;	type Locker = ();&#xD;&#xA;	type CollectionDeposit = NftsCollectionDeposit;&#xD;&#xA;	type ItemDeposit = NftsItemDeposit;&#xD;&#xA;	type MetadataDepositBase = NftsMetadataDepositBase;&#xD;&#xA;	type AttributeDepositBase = NftsAttributeDepositBase;&#xD;&#xA;	type DepositPerByte = NftsDepositPerByte;&#xD;&#xA;	type StringLimit = ConstU32&lt;4096&gt;;&#xD;&#xA;	type KeyLimit = ConstU32&lt;64&gt;;&#xD;&#xA;	type ValueLimit = ConstU32&lt;256&gt;;&#xD;&#xA;	type ApprovalsLimit = ConstU32&lt;20&gt;;&#xD;&#xA;	type ItemAttributesApprovalsLimit = ConstU32&lt;30&gt;;&#xD;&#xA;	type MaxTips = ConstU32&lt;10&gt;;&#xD;&#xA;	type MaxDeadlineDuration = NftsMaxDeadlineDuration;&#xD;&#xA;	type MaxAttributesPerCall = ConstU32&lt;10&gt;;&#xD;&#xA;	type Features = NftsPalletFeatures;&#xD;&#xA;	type OffchainSignature = Signature;&#xD;&#xA;	type OffchainPublic = &lt;Signature as Verify&gt;::Signer;&#xD;&#xA;	// TODO: type WeightInfo = weights::pallet_nfts::WeightInfo&lt;Runtime&gt;;&#xD;&#xA;	type WeightInfo = pallet_nfts::weights::SubstrateWeight&lt;Runtime&gt;;&#xD;&#xA;	#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;	type Helper = ();&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;which results in the following error: &#xD;&#xA;```&#xD;&#xA;    Checking trc-node-runtime v0.1.1 (/Users/arjanvaneersel/Development/rust/trc-node/runtime)&#xD;&#xA;error[E0277]: the trait bound `Runtime: frame_system::pallet::Config` is not satisfied in `pallet_nfts::Event&lt;Runtime&gt;`&#xD;&#xA;   --&gt; runtime/src/lib.rs:271:1&#xD;&#xA;    |&#xD;&#xA;271 | // construct_runtime!(&#xD;&#xA;272 | ||     pub struct Runtime {&#xD;&#xA;273 | ||         System: frame_system,&#xD;&#xA;274 | ||         RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip,&#xD;&#xA;...   ||&#xD;&#xA;284 | ||     }&#xD;&#xA;285 | || );&#xD;&#xA;    | ||_- in this macro invocation&#xD;&#xA;...   |&#xD;&#xA;    |&#xD;&#xA;note: required because it appears within the type `pallet_nfts::Event&lt;Runtime&gt;`&#xD;&#xA;   --&gt; /Users/arjanvaneersel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pallet-nfts-25.0.0/src/lib.rs:383:11&#xD;&#xA;    |&#xD;&#xA;383 |     pub enum Event&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;    |              ^^^^^&#xD;&#xA;    = note: no field of an enum variant may have a dynamically sized type&#xD;&#xA;    = help: change the field's type to have a statically known size&#xD;&#xA;    = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: borrowed types always have a statically known size&#xD;&#xA;    |&#xD;&#xA;271 | &amp;construct_runtime!(&#xD;&#xA;    | +&#xD;&#xA;&#xD;&#xA;error[E0277]: the trait bound `pallet_balances::Pallet&lt;Runtime&gt;: frame_support::traits::tokens::currency::Currency&lt;_&gt;` is not satisfied in `pallet_nfts::Event&lt;Runtime&gt;`&#xD;&#xA;   --&gt; runtime/src/lib.rs:271:1&#xD;&#xA;    |&#xD;&#xA;271 | // construct_runtime!(&#xD;&#xA;272 | ||     pub struct Runtime {&#xD;&#xA;273 | ||         System: frame_system,&#xD;&#xA;274 | ||         RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip,&#xD;&#xA;...   ||&#xD;&#xA;284 | ||     }&#xD;&#xA;285 | || );&#xD;&#xA;    | ||_- in this macro invocation&#xD;&#xA;...   |&#xD;&#xA;    |&#xD;&#xA;    = help: the following other types implement trait `frame_support::traits::tokens::currency::Currency&lt;AccountId&gt;`:&#xD;&#xA;              frame_support::traits::tokens::currency::reservable::WithName&lt;NamedReservable, Id, AccountId&gt;&#xD;&#xA;              ()&#xD;&#xA;note: required because it appears within the type `pallet_nfts::Event&lt;Runtime&gt;`&#xD;&#xA;   --&gt; /Users/arjanvaneersel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pallet-nfts-25.0.0/src/lib.rs:383:11&#xD;&#xA;    |&#xD;&#xA;383 |     pub enum Event&lt;T: Config&lt;I&gt;, I: 'static = ()&gt; {&#xD;&#xA;    |              ^^^^^&#xD;&#xA;    = note: no field of an enum variant may have a dynamically sized type&#xD;&#xA;    = help: change the field's type to have a statically known size&#xD;&#xA;    = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)&#xD;&#xA;help: borrowed types always have a statically known size&#xD;&#xA;    |&#xD;&#xA;271 | &amp;construct_runtime!(&#xD;&#xA;    | +&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;What is causing this and how can I solve it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45699" PostHistoryTypeId="1" PostId="11193" RevisionGUID="e12e7d49-3d4a-4cae-a41e-ac799b36f640" CreationDate="2024-03-20T13:57:08.887" UserId="4556" Text="Can't integrate NFTs pallet into latest version of substrate-contracts-node" ContentLicense="CC BY-SA 4.0" />
  <row Id="45700" PostHistoryTypeId="3" PostId="11193" RevisionGUID="e12e7d49-3d4a-4cae-a41e-ac799b36f640" CreationDate="2024-03-20T13:57:08.887" UserId="4556" Text="|substrate-contracts-node|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45701" PostHistoryTypeId="2" PostId="11194" RevisionGUID="ff1e26ac-1dd9-471d-8a36-93930a11c923" CreationDate="2024-03-20T21:40:03.317" UserId="5218" Text="**Goal**  &#xD;&#xA;I'm trying to decorate the rpc methods to be able to interact with api.tx. If anyone has faced this issue, what has helped you out? &#xD;&#xA;&#xD;&#xA;**Issue**  &#xD;&#xA;I'm not able to access tx method inside of api, which I believe is caused by the error message.&#xD;&#xA;&#xD;&#xA;*Error*  &#xD;&#xA;API/INIT: RPC methods not decorated: chainSpec_v1_chainName, chainSpec_v1_genesisHash, chainSpec_v1_properties  &#xD;&#xA; WARN  2024-03-20 16:57:24        API/INIT: rococo/1006002: Not decorating runtime apis without matching versions: ParachainHost/10 (1/2/3/4/5 known)  &#xD;&#xA; WARN  2024-03-20 16:57:24        API/INIT: rococo/1006002: Not decorating unknown runtime apis: 0xfbc577b9d747efd6/1  &#xD;&#xA;&#xD;&#xA;  &#xD;&#xA;  &#xD;&#xA;Current Code Environment:  &#xD;&#xA;const provider = new WsProvider('ws://192.168.1.212:9944');  &#xD;&#xA;  const api = await ApiPromise.create({ provider });&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45703" PostHistoryTypeId="1" PostId="11194" RevisionGUID="ff1e26ac-1dd9-471d-8a36-93930a11c923" CreationDate="2024-03-20T21:40:03.317" UserId="5218" Text="Rpc methods not decorated" ContentLicense="CC BY-SA 4.0" />
  <row Id="45704" PostHistoryTypeId="3" PostId="11194" RevisionGUID="ff1e26ac-1dd9-471d-8a36-93930a11c923" CreationDate="2024-03-20T21:40:03.317" UserId="5218" Text="|polkadot-js|polkadot|parachain|rpc|rococo|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45705" PostHistoryTypeId="2" PostId="11195" RevisionGUID="53f341eb-7c8d-4d0a-9a20-67ba5ac68422" CreationDate="2024-03-21T00:19:24.423" UserId="5239" Text="I'm trying to call the do_something function in template_pallet runtime.&#xD;&#xA;I'm running locally the node substrate version : `4.0.0-dev-2ad9b78c7b5` &#xD;&#xA;&#xD;&#xA;When I do try with the UI: I have a blue ballon at the top right:&#xD;&#xA;&#xD;&#xA;    templateModule.doSomething&#xD;&#xA;    ready&#xD;&#xA;&#xD;&#xA;But it get stuck at this and I see nothing in the log of my node.&#xD;&#xA;&#xD;&#xA;And from code&#xD;&#xA;&#xD;&#xA;    let client = WsRpcClient::with_default_url();&#xD;&#xA;                    let mut api = Api::&lt;AssetRuntimeConfig, _&gt;::new(client).unwrap();&#xD;&#xA;    &#xD;&#xA;                    let signer = AccountKeyring::Alice.pair();&#xD;&#xA;                    api.set_signer(signer.into());&#xD;&#xA;    &#xD;&#xA;                    let version = api.get_system_version().unwrap();&#xD;&#xA;                    println!(&quot;Runtime version {} running...&quot;, version);&#xD;&#xA;    &#xD;&#xA;                    // Obtenez les métadonnées du runtime&#xD;&#xA;                    let metadata = api.metadata();&#xD;&#xA;                    for pallet in metadata.pallets() {&#xD;&#xA;                        println!(&quot;{}&quot;, pallet.name());&#xD;&#xA;                        println!(&quot;     {:?}&quot;, pallet.print_calls())&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    let function_name = &quot;do_something&quot;;&#xD;&#xA;                    let pallet = &quot;TemplateModule&quot;;&#xD;&#xA;                    let something: u32 = 42;&#xD;&#xA;    &#xD;&#xA;                    let xt = compose_extrinsic!(&amp;api, pallet, function_name, something);&#xD;&#xA;                    match xt {&#xD;&#xA;                        Some(extrinsic) =&gt; {&#xD;&#xA;                            match api.submit_and_watch_extrinsic_until(extrinsic, XtStatus::InBlock) {&#xD;&#xA;                                Ok(result) =&gt; {&#xD;&#xA;                                    if let Some(block_hash) = result.block_hash {&#xD;&#xA;                                        println!(&quot;[+] Bloc Hash is: {:?}&quot;, block_hash);&#xD;&#xA;                                    } else {&#xD;&#xA;                                        eprintln!(&quot;No Hash returned&quot;);&#xD;&#xA;                                    }&#xD;&#xA;                                }&#xD;&#xA;                                Err(e) =&gt; eprintln!(&quot;Err: {:?}&quot;, e),&#xD;&#xA;                            };&#xD;&#xA;                        }&#xD;&#xA;                        None =&gt; {&#xD;&#xA;                            eprintln!(&quot;Impossible to load the extrinsinc&quot;);&#xD;&#xA;                            return;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;I got a panic&#xD;&#xA;&#xD;&#xA;    Err: RpcClient(ExtrinsicFailed(&quot;Unexpected Response: {\&quot;jsonrpc\&quot;:\&quot;2.0\&quot;,\&quot;error\&quot;:{\&quot;code\&quot;:1002,\&quot;message\&quot;:\&quot;Verification Error: Runtime error: Execution fai&#xD;&#xA;    led: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\\nWASM backtrace:\\nerror while executing at wasm backtrace:\\n    0: 0x7d&#xD;&#xA;    84b - node_template_runtime.wasm!rust_begin_unwind\\n    1: 0x2422 - node_template_runtime.wasm!core::panicking::panic_fmt::h6cdc99c0b517ca33\\n    2: 0x23f16 - &#xD;&#xA;    node_template_runtime.wasm!TaggedTransactionQueue_validate_transaction\&quot;,\&quot;data\&quot;:\&quot;RuntimeApi(\\\&quot;Execution failed: Execution aborted due to trap: wasm trap: wa&#xD;&#xA;    sm `unreachable` instruction executed\\\\nWASM backtrace:\\\\nerror while executing at wasm backtrace:\\\\n    0: 0x7d84b - node_template_runtime.wasm!rust_begin&#xD;&#xA;    _unwind\\\\n    1: 0x2422 - node_template_runtime.wasm!core::panicking::panic_fmt::h6cdc99c0b517ca33\\\\n    2: 0x23f16 - node_template_runtime.wasm!TaggedTransactionQueue_validate_transaction\\\&quot;)\&quot;},\&quot;id\&quot;:\&quot;1\&quot;}&quot;))&#xD;&#xA;&#xD;&#xA;Need some help.&#xD;&#xA;Thanks a lot." ContentLicense="CC BY-SA 4.0" />
  <row Id="45707" PostHistoryTypeId="1" PostId="11195" RevisionGUID="53f341eb-7c8d-4d0a-9a20-67ba5ac68422" CreationDate="2024-03-21T00:19:24.423" UserId="5239" Text="Template Module Pallet call" ContentLicense="CC BY-SA 4.0" />
  <row Id="45708" PostHistoryTypeId="3" PostId="11195" RevisionGUID="53f341eb-7c8d-4d0a-9a20-67ba5ac68422" CreationDate="2024-03-21T00:19:24.423" UserId="5239" Text="|substrate-node-template|extrinsic|substrate-api-client|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45709" PostHistoryTypeId="50" PostId="10277" RevisionGUID="0436a71f-e50c-4ae1-8515-61fff1cb0a6c" CreationDate="2024-03-21T04:08:46.007" UserId="-1" />
  <row Id="45710" PostHistoryTypeId="2" PostId="11196" RevisionGUID="33e244fa-9f68-4dd2-825c-8d3943bb6fac" CreationDate="2024-03-21T04:24:30.330" UserId="2372" Text="I've been delving into the era points system on Polkadot, but I'm encountering confusion regarding how the total points for validators are calculated. There are currently 297 active validators, and in one era, a total of 14,400 blocks are produced. If each block contributes 20 era points, then the total era points for the era would be 288,000. Then how in the storage of the erasRewardpoints in pallet staking is showing i28,206,520 of one era ?.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45712" PostHistoryTypeId="1" PostId="11196" RevisionGUID="33e244fa-9f68-4dd2-825c-8d3943bb6fac" CreationDate="2024-03-21T04:24:30.330" UserId="2372" Text="What is the formula of calculating the era points in polkadot?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45713" PostHistoryTypeId="3" PostId="11196" RevisionGUID="33e244fa-9f68-4dd2-825c-8d3943bb6fac" CreationDate="2024-03-21T04:24:30.330" UserId="2372" Text="|polkadot|staking|rewards|era|eraindex|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45714" PostHistoryTypeId="5" PostId="11196" RevisionGUID="b3629fa7-9cae-4722-9618-d7f7fb1e3298" CreationDate="2024-03-21T04:37:09.923" UserId="2372" Comment="deleted 1 character in body" Text="I've been delving into the era points system on Polkadot, but I'm encountering confusion regarding how the total points for validators are calculated. There are currently 297 active validators, and in one era, a total of 14,400 blocks are produced. If each block contributes 20 era points, then the total era points for the era would be 288,000. Then how in the storage of the erasRewardpoints in pallet staking is showing 28,206,520 of one era ?.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45715" PostHistoryTypeId="50" PostId="11032" RevisionGUID="a42e0582-8b54-4599-8fa0-9b3f95b06d10" CreationDate="2024-03-21T06:04:05.533" UserId="-1" />
  <row Id="45716" PostHistoryTypeId="2" PostId="11197" RevisionGUID="17cdb8bb-b3ad-4d2a-88e0-5aa874f407af" CreationDate="2024-03-21T08:35:49.933" UserId="3722" Text="We're in the process of updating the [Polimec runtime][1] and node from the [Polkadot SDK 1.0 to 1.6][2]. We're doing the final tests before the merge and we are encountering an issue while syncing the currently live on-chain runtime with the new version of the node. We're starting the new node with the following parameters:&#xD;&#xA;```&#xD;&#xA;./target/release/polimec-parachain-node --name=&quot;NODE_NAME&quot; \&#xD;&#xA;        --chain=polimec-polkadot \&#xD;&#xA;        --tmp \&#xD;&#xA;        --pruning=archive \&#xD;&#xA;        --database=paritydb \&#xD;&#xA;        --rpc-port=9944 \&#xD;&#xA;        --rpc-methods=safe \&#xD;&#xA;        --rpc-cors=all \&#xD;&#xA;        --rpc-max-connections=10000 \&#xD;&#xA;        -- \&#xD;&#xA;        --database=paritydb \&#xD;&#xA;        --sync=warp&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Everything works correctly until it gets to synchronizing Polimec block number #788846. At that specific block, the latest runtime came into effect [after an upgrade][3]. When the node reaches this block, it performs migrations that did not occur yesterday.&#xD;&#xA;![Pasted image 20240320151218 1](https://hackmd.io/_uploads/r1o7QO_AT.png)&#xD;&#xA;&#xD;&#xA;(Textual version of the error message)&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;2024-03-20 15:13:08 [Parachain]  New pallet &quot;Utility&quot; detected in the runtime. The pallet has no defined storage version, so the on-chain version is being initialized to StorageVersion(0).&#xD;&#xA;2024-03-20 15:13:08 [Parachain]  New pallet &quot;Proxy&quot; detected in the runtime. The pallet has no defined storage version, so the on-chain version is being initialized to StorageVersion(0).&#xD;&#xA;2024-03-20 15:13:08 [Parachain]  New pallet &quot;MessageQueue&quot; detected in the runtime. The pallet has no defined storage version, so the on-chain version is being initialized to StorageVersion(0).&#xD;&#xA;2024-03-20 15:13:08 [Parachain]  New pallet &quot;Oracle&quot; detected in the runtime. The pallet has no defined storage version, so the on-chain version is being initialized to StorageVersion(0).&#xD;&#xA;2024-03-20 15:13:08 [Parachain]  New pallet &quot;OracleOffchainWorker&quot; detected in the runtime. The pallet has no defined storage version, so the on-chain version is being initialized to StorageVersion(0).&#xD;&#xA;2024-03-20 15:13:08 [Parachain]  Pallet &quot;XcmpQueue&quot; VersionedMigration migrating storage version from 3 to 4.&#xD;&#xA;2024-03-20 15:13:08 [Parachain]  Pallet &quot;Identity&quot; VersionedMigration migrating storage version from 0 to 1.&#xD;&#xA;2024-03-20 15:13:08 [Parachain] running storage migration from version 0 to version 1.&#xD;&#xA;2024-03-20 15:13:08 [Parachain] all 8 identities migrated&#xD;&#xA;2024-03-20 15:13:08 [Parachain] Corrupted state at `0x45323df7cc47150b3930e2666b0aa313c522231880238a0c56021b8744a00743`: Error { cause: Some(Error { cause: Some(Error { cause: None, desc: &quot;Not enough data to fill buffer&quot; }), desc: &quot;Could not decode `AsyncBackingParams::max_candidate_depth`&quot; }), desc: &quot;Could not decode `AbridgedHostConfiguration::async_backing_params`&quot; }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;And It arrives at a state that the collators have never sent to the relay, panicing with the following error:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;====================&#xD;&#xA;&#xD;&#xA;Version: 0.5.1-67b1de47b69&#xD;&#xA;&#xD;&#xA;   0: sp_panic_handler::set::{{closure}}&#xD;&#xA;   1: std::panicking::rust_panic_with_hook&#xD;&#xA;   2: std::panicking::begin_panic_handler::{{closure}}&#xD;&#xA;   3: std::sys_common::backtrace::__rust_end_short_backtrace&#xD;&#xA;   4: rust_begin_unwind&#xD;&#xA;   5: core::panicking::panic_fmt&#xD;&#xA;   6: cumulus_pallet_parachain_system::&lt;impl cumulus_pallet_parachain_system::pallet::Pallet&lt;T&gt;&gt;::maybe_drop_included_ancestors&#xD;&#xA;   7: frame_support::storage::transactional::with_transaction&#xD;&#xA;   8: &lt;cumulus_pallet_parachain_system::pallet::Call&lt;T&gt; as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter::{{closure}}&#xD;&#xA;   9: environmental::using_once&#xD;&#xA;  10: &lt;polimec_base_runtime::RuntimeCall as frame_support::traits::dispatch::UnfilteredDispatchable&gt;::dispatch_bypass_filter&#xD;&#xA;  11: &lt;polimec_base_runtime::RuntimeCall as sp_runtime::traits::Dispatchable&gt;::dispatch&#xD;&#xA;  12: &lt;sp_runtime::generic::checked_extrinsic::CheckedExtrinsic&lt;AccountId,Call,Extra&gt; as sp_runtime::traits::Applyable&gt;::apply&#xD;&#xA;  13: frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::apply_extrinsic&#xD;&#xA;  14: frame_executive::Executive&lt;System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade&gt;::execute_block&#xD;&#xA;  15: polimec_base_runtime::api::dispatch&#xD;&#xA;  16: environmental::using&#xD;&#xA;  17: sc_executor::executor::WasmExecutor&lt;H&gt;::with_instance::{{closure}}&#xD;&#xA;  18: &lt;sc_executor::executor::NativeElseWasmExecutor&lt;D&gt; as sp_core::traits::CodeExecutor&gt;::call&#xD;&#xA;  19: sp_state_machine::execution::StateMachine&lt;B,H,Exec&gt;::execute&#xD;&#xA;  20: &lt;sc_service::client::call_executor::LocalCallExecutor&lt;Block,B,E&gt; as sc_client_api::call_executor::CallExecutor&lt;Block&gt;&gt;::contextual_call&#xD;&#xA;  21: &lt;sc_service::client::client::Client&lt;B,E,Block,RA&gt; as sp_api::CallApiAt&lt;Block&gt;&gt;::call_api_at&#xD;&#xA;  22: &lt;polimec_base_runtime::RuntimeApiImpl&lt;__SrApiBlock__,RuntimeApiImplCall&gt; as sp_consensus_aura::AuraApi&lt;__SrApiBlock__,sp_consensus_aura::sr25519::app_sr25519::Public&gt;&gt;::__runtime_api_internal_call_api_at&#xD;&#xA;  23: sp_api::Core::execute_block&#xD;&#xA;  24: &lt;&amp;sc_service::client::client::Client&lt;B,E,Block,RA&gt; as sc_consensus::block_import::BlockImport&lt;Block&gt;&gt;::import_block::{{closure}}&#xD;&#xA;  25: &lt;alloc::sync::Arc&lt;T&gt; as sc_consensus::block_import::BlockImport&lt;B&gt;&gt;::import_block::{{closure}}&#xD;&#xA;  26: &lt;cumulus_client_consensus_common::ParachainBlockImport&lt;Block,BI,BE&gt; as sc_consensus::block_import::BlockImport&lt;Block&gt;&gt;::import_block::{{closure}}&#xD;&#xA;  27: &lt;alloc::boxed::Box&lt;dyn sc_consensus::block_import::BlockImport&lt;B&gt;+Error = sp_consensus::error::Error+core::marker::Send+core::marker::Sync&gt; as sc_consensus::block_import::BlockImport&lt;B&gt;&gt;::import_block::{{closure}}&#xD;&#xA;  28: &lt;core::pin::Pin&lt;P&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  29: sc_consensus::import_queue::basic_queue::BlockImportWorker&lt;B&gt;::new::{{closure}}&#xD;&#xA;  30: &lt;futures_util::future::future::map::Map&lt;Fut,F&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  31: &lt;sc_service::task_manager::prometheus_future::PrometheusFuture&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  32: &lt;futures_util::future::select::Select&lt;A,B&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  33: &lt;tracing_futures::Instrumented&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  34: tokio::runtime::context::blocking::BlockingRegionGuard::block_on&#xD;&#xA;  35: &lt;tokio::runtime::blocking::task::BlockingTask&lt;T&gt; as core::future::future::Future&gt;::poll&#xD;&#xA;  36: tokio::runtime::task::core::Core&lt;T,S&gt;::poll&#xD;&#xA;  37: tokio::runtime::task::harness::Harness&lt;T,S&gt;::poll&#xD;&#xA;  38: tokio::runtime::blocking::pool::Inner::run&#xD;&#xA;  39: std::sys_common::backtrace::__rust_begin_short_backtrace&#xD;&#xA;  40: core::ops::function::FnOnce::call_once{{vtable.shim}}&#xD;&#xA;  41: std::sys::unix::thread::Thread::new::thread_start&#xD;&#xA;  42: &lt;unknown&gt;&#xD;&#xA;  43: &lt;unknown&gt;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Thread 'tokio-runtime-worker' panicked at 'included head not present in relay storage proof', /home/lrazovic/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cumulus-pallet-parachain-system-0.7.0/src/lib.rs:1297&#xD;&#xA;&#xD;&#xA;This is a bug. Please report it at:&#xD;&#xA;&#xD;&#xA;	https://github.com/Polimec/polimec-node/issues/new&#xD;&#xA;&#xD;&#xA;2024-03-20 15:13:08 [Parachain] Evicting failed runtime instance error=Runtime panicked: included head not present in relay storage proof&#xD;&#xA;2024-03-20 15:13:08 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;2024-03-20 15:13:08 [Parachain] 1 storage transactions are left open by the runtime. Those will be rolled back.&#xD;&#xA;2024-03-20 15:13:08 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Runtime panicked: included head not present in relay storage proof&#xD;&#xA;2024-03-20 15:13:08 [Parachain]  Error importing block 0x50c819439db83195bbdf4df1f20ace0aa9b96f04fa1c0b86cf1a7b627ab302e2: consensus error: Import failed: Error at calling runtime api: Execution failed: Runtime panicked: included head not present in relay storage proof&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The pallets in the list of `&quot; New pallet '&lt;PALLET_NAME&gt;' detected in the runtime.&quot;` currently have a `STORAGE_VERSION` set to 0 (which should be the default if not specified in the pallet, correct me if I'm wrong), in the SDK 1.0 they don't have any `STORAGE_VERSION` (Example provided for the [Identity Pallet 1.1][4] and [1.6][5]). Furthermore, the node tries to migrate the `MessageQueue` pallet, but this is currently not present in the live runtime, but it is present in the new [runtime][6].&#xD;&#xA;&#xD;&#xA;1. Why does this problem only occur when trying to synchronise the block where the last upgrade took place and not during all previous upgrades?&#xD;&#xA;2. Why does the node perform these [migrations/initialisations][7]? &#xD;&#xA;3. How can this be solved?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/Polimec/polimec-node/blob/main/runtimes/base/src/lib.rs&#xD;&#xA;  [2]: https://github.com/Polimec/polimec-node/pull/181&#xD;&#xA;  [3]: https://explorer.polimec.org/polimec/runtime&#xD;&#xA;  [4]: https://github.com/paritytech/polkadot-sdk/blob/c8d2251cafadc108ba2f1f8a3208dc547ff38901/substrate/frame/identity/src/lib.rs#L154-L155&#xD;&#xA;  [5]: https://github.com/paritytech/polkadot-sdk/blob/61801ce324f18eacb9c29e2f674f0d262a00bd4d/substrate/frame/identity/src/lib.rs#L205-L209&#xD;&#xA;  [6]: https://github.com/Polimec/polimec-node/blob/3cd66810cbecdcd689a27f79f6d99364e03a70ec/runtimes/base/src/lib.rs#L949&#xD;&#xA;  [7]: https://github.com/paritytech/polkadot-sdk/blob/93b1abb280cf9d6c64f00b66c3593c2b04d50a9e/substrate/frame/support/procedural/src/pallet/expand/hooks.rs#L51" ContentLicense="CC BY-SA 4.0" />
  <row Id="45718" PostHistoryTypeId="1" PostId="11197" RevisionGUID="17cdb8bb-b3ad-4d2a-88e0-5aa874f407af" CreationDate="2024-03-21T08:35:49.933" UserId="3722" Text="Sync error while upgrading Polkadot SDK from 1.0 to 1.6" ContentLicense="CC BY-SA 4.0" />
  <row Id="45719" PostHistoryTypeId="3" PostId="11197" RevisionGUID="17cdb8bb-b3ad-4d2a-88e0-5aa874f407af" CreationDate="2024-03-21T08:35:49.933" UserId="3722" Text="|runtime|runtime-upgrade|nodes|migration|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45720" PostHistoryTypeId="50" PostId="9024" RevisionGUID="2e2f3649-1b59-4cef-91bc-47c86860be6f" CreationDate="2024-03-21T09:02:30.263" UserId="-1" />
  <row Id="45721" PostHistoryTypeId="2" PostId="11198" RevisionGUID="f71f731a-ce06-4235-bacd-6ff1101c7a24" CreationDate="2024-03-21T11:17:11.810" UserId="73" Text="Your problem is that you did not bump the `spec_version`. So, when the node reaches this block it assumes that the native runtime is compatible and tries to use it. However, it isn't compatible and it executes different code leading to the issues you are seeing.&#xD;&#xA;&#xD;&#xA;Bump the `spec_version` and it will be solved. &#xD;&#xA;&#xD;&#xA;[Here](https://github.com/Polimec/polimec-node/blob/112bfb8f8d737b62d19a8fe87c4012abe05f42e5/nodes/parachain/src/service.rs#L68) you could also change `NativeElseWasmExecutor` to `WasmExecutor`. Then it will not try anymore to call into the native runtime and will always use the wasm runtime." ContentLicense="CC BY-SA 4.0" />
  <row Id="45723" PostHistoryTypeId="52" PostId="11197" RevisionGUID="f3fceca6-63f9-42a5-9152-6d8491924b15" CreationDate="2024-03-21T16:44:20.903" />
  <row Id="45724" PostHistoryTypeId="50" PostId="10258" RevisionGUID="8b01d438-6dcf-4fee-a010-480be4d07703" CreationDate="2024-03-21T17:06:40.830" UserId="-1" />
  <row Id="45725" PostHistoryTypeId="50" PostId="4419" RevisionGUID="a1385e67-2c83-4859-9d80-2a0372ef0cba" CreationDate="2024-03-21T18:02:55.333" UserId="-1" />
  <row Id="45726" PostHistoryTypeId="2" PostId="11199" RevisionGUID="49848d55-0309-4a98-9cbf-c1ae76a56eec" CreationDate="2024-03-22T01:32:56.870" UserId="251" Text="In the past, it is 20 only.&#xD;&#xA;&#xD;&#xA;---&#xD;&#xA;&#xD;&#xA;Now, validators will also be rewarded for participating in parachains with era points in pallet-staking.&#xD;&#xA;&#xD;&#xA;Check &#xD;&#xA;- https://github.com/polkadot-fellows/runtimes/blob/8b7b1cb5822c76dec7dd75e07bfdee36bab41a15/relay/polkadot/src/lib.rs#L1297&#xD;&#xA;- https://github.com/paritytech/polkadot-sdk/blob/ea5f4e9a4d78234eb68bbb9130a24b0598c7893a/polkadot/runtime/parachains/src/reward_points.rs#L35." ContentLicense="CC BY-SA 4.0" />
  <row Id="45728" PostHistoryTypeId="50" PostId="4617" RevisionGUID="1cd72f2c-95e4-4efd-86f9-c33c10019290" CreationDate="2024-03-22T04:08:41.230" UserId="-1" />
  <row Id="45730" PostHistoryTypeId="50" PostId="5113" RevisionGUID="d8477ed6-8181-4217-81bc-0baebbd1cf66" CreationDate="2024-03-22T05:03:20.533" UserId="-1" />
  <row Id="45731" PostHistoryTypeId="2" PostId="11200" RevisionGUID="3d086e86-0da6-4e08-a495-2d613db19c1f" CreationDate="2024-03-22T06:30:00.170" UserId="4328" Text="It looks like there is a mismatch between node and runtime, node produces slots at 12s clip and runtime expects them at 6s rate.&#xD;&#xA;&#xD;&#xA;Are you getting this just once on upgrade or continuously, if it is just once it can be safely ignored.&#xD;&#xA;&#xD;&#xA;If you can point us to your parachain codebase after the migration we can have a look to try to ping point the mismatch." ContentLicense="CC BY-SA 4.0" />
  <row Id="45733" PostHistoryTypeId="50" PostId="3931" RevisionGUID="974a8702-e04e-4358-9f1e-0d5f85034dcd" CreationDate="2024-03-22T07:04:05.503" UserId="-1" />
  <row Id="45734" PostHistoryTypeId="2" PostId="11201" RevisionGUID="a32ccd5b-677e-4407-9fe1-25aa2db9ad58" CreationDate="2024-03-22T08:03:41.327" UserId="5231" Text="So I haven't been able to unravel the error but I have been able to upgrade the Parachain. I needed the collator to run on the new node binary (Polkadot 1.8 in stead of v1.6) with the older runtime. I did this with the following steps:&#xD;&#xA;&#xD;&#xA; 1. Start a local network with the latest release of Parachain and rococo-local on v1.8:&#xD;&#xA;&#xD;&#xA;`pop up parachain --f ./rococo-local-config.toml -r v1.8.0 -v` (using [pop cli)][1]&#xD;&#xA;&#xD;&#xA; 1. Build new release of Parachain&#xD;&#xA; 2. Stop collator `killall &lt;parachain binary&gt;` (local network will keep running)&#xD;&#xA; 3. Copy command with which the Parachain collator was launched by Zombienet and use it to launch the new collator on new release. In this case it will launch the newly built node with async backing activated (Polkadot v1.8) and have it use previously generated chainspecs, effectively allowing it to take over running the network with the older runtime version.&#xD;&#xA; 4. Do the runtime upgrade.&#xD;&#xA;&#xD;&#xA;If there are better ways to do this, I'm very interested!&#xD;&#xA;&#xD;&#xA;  [1]: https://github.com/r0gue-io/pop-cli" ContentLicense="CC BY-SA 4.0" />
  <row Id="45736" PostHistoryTypeId="50" PostId="4816" RevisionGUID="ad349ec0-c714-4dad-a41f-ab67b3a482e2" CreationDate="2024-03-22T08:04:30.483" UserId="-1" />
  <row Id="45737" PostHistoryTypeId="2" PostId="11202" RevisionGUID="33cdbfdd-1526-4e5c-9177-19947f6dbe08" CreationDate="2024-03-22T08:38:57.020" UserId="73" Text="The problem is the following change in the guide:&#xD;&#xA;```&#xD;&#xA;pub const MILLISECS_PER_BLOCK: u64 = 6000;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Before your parachain was running with 12s per block and after the runtime upgrade with 6s per block. However, the node side needs to know this time to calculate the correct slot to find out the correct slot author. &#xD;&#xA;&#xD;&#xA;&gt; As you can see the para_slot_from_relay is twice as big than the slot obtained from&#xD;&#xA;&#xD;&#xA;Given what I said above this also makes sense. The node divides the time by 12s to get the slot and the runtime by 6s to get the slot. So, the node will give you a 2 times smaller slot as what the runtime calculates.&#xD;&#xA;&#xD;&#xA;Now, to the solution. I assume you are running your own node software? Otherwise the fixes should be in the `polkadot-parachains` binary from 1.8/1.9. You need [these fixes](https://github.com/paritytech/polkadot-sdk/commit/ec6bf5d0a52161bda0eccd2d797dffab4213900a). So, switch to the lookahead collator and ensure that the `slot_duration` is fetched inside of the closure to always fetch the correct value from on chain. Another solution is also to just restart the collator after the runtime has upgraded." ContentLicense="CC BY-SA 4.0" />
  <row Id="45739" PostHistoryTypeId="50" PostId="10236" RevisionGUID="8505bf57-8504-49e2-a184-f12bf3c0ca6e" CreationDate="2024-03-22T09:01:50.180" UserId="-1" />
  <row Id="45740" PostHistoryTypeId="50" PostId="11045" RevisionGUID="f8ec1998-8901-409e-bc4b-5a488034412c" CreationDate="2024-03-22T11:04:20.510" UserId="-1" />
  <row Id="45741" PostHistoryTypeId="2" PostId="11203" RevisionGUID="a9fc90e2-df15-4bcb-8b48-77e5cf212708" CreationDate="2024-03-22T14:08:13.507" UserId="3035" Text="You need to allow http requests.&#xD;&#xA;&#xD;&#xA;https://github.com/paritytech/polkadot-sdk/blob/283d3cc5676417a29783786a41a01680d123f7bb/substrate/client/offchain/src/lib.rs#L112" ContentLicense="CC BY-SA 4.0" />
  <row Id="45743" PostHistoryTypeId="2" PostId="11204" RevisionGUID="5156c5c4-a89d-405b-83ba-bf124b243aff" CreationDate="2024-03-22T14:44:17.707" UserId="4532" Text="I developed substrate parachain with custom pallets. Actually I wanna add OCW functionality to one of my pallets. After I updated runtime code and added ```CreateSignedTransaction``` implementation I tried to build my code, but got this errors:&#xD;&#xA;&#xD;&#xA;```the function or associated item `execute_block` exists for struct `Executive&lt;Runtime, Block&lt;Header&lt;u32, BlakeTwo256&gt;, UncheckedExtrinsic&lt;..., ..., ..., ...&gt;&gt;, ..., ..., ...&gt;`, but its trait bounds were not satisfied```&#xD;&#xA;&#xD;&#xA;And same errors for `initialize_block`, `apply_extrinsic`... Also got this: &#xD;&#xA;&#xD;&#xA;```the trait bound `sp_runtime::generic::UncheckedExtrinsic&lt;MultiAddress&lt;sp_runtime::AccountId32, u32&gt;, RuntimeCall, MultiSignature, (CheckNonZeroSender&lt;Runtime&gt;, CheckSpecVersion&lt;Runtime&gt;, CheckTxVersion&lt;Runtime&gt;, CheckGenesis&lt;Runtime&gt;, CheckEra&lt;Runtime&gt;, CheckNonce&lt;Runtime&gt;, CheckWeight&lt;Runtime&gt;, ChargeTransactionPayment&lt;Runtime&gt;)&gt;: Checkable&lt;ChainContext&lt;Runtime&gt;&gt;` is not satisfied```&#xD;&#xA;&#xD;&#xA;I used default implementation of `UncheckedExtrinsic` like this: &#xD;&#xA;&#xD;&#xA;`pub type UncheckedExtrinsic =&#xD;&#xA;generic::UncheckedExtrinsic&lt;Address, RuntimeCall, Signature, SignedExtra&gt;;` &#xD;&#xA;&#xD;&#xA;What could be a problem? &#xD;&#xA;&#xD;&#xA;Thanks in advance." ContentLicense="CC BY-SA 4.0" />
  <row Id="45745" PostHistoryTypeId="1" PostId="11204" RevisionGUID="5156c5c4-a89d-405b-83ba-bf124b243aff" CreationDate="2024-03-22T14:44:17.707" UserId="4532" Text="execute_block, initialize_block, apply_extrinsic, finalize_block, offchain_worker exists for struct `Executive` but its trait bound were not satisfied" ContentLicense="CC BY-SA 4.0" />
  <row Id="45746" PostHistoryTypeId="3" PostId="11204" RevisionGUID="5156c5c4-a89d-405b-83ba-bf124b243aff" CreationDate="2024-03-22T14:44:17.707" UserId="4532" Text="|parachain|extrinsic|transactions|substrate-parachain-template|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45747" PostHistoryTypeId="2" PostId="11205" RevisionGUID="a35cd974-f3a7-41b1-90e2-9eeb52db4cd3" CreationDate="2024-03-22T16:01:26.333" UserId="167" Text="If you look at the [`impl Checkable for UncheckedExtrinsic`](https://paritytech.github.io/polkadot-sdk/master/frame/traits/trait.Checkable.html#impl-Checkable%3CLookup%3E-for-UncheckedExtrinsic%3CLookupSource,+Call,+Signature,+Extra%3E), you can see that this `impl` block is only present if a specific list of `where` clauses are met. The error you are getting is telling you that one of these `where` clauses are not met. &#xD;&#xA;&#xD;&#xA;An anecdotal way that I found useful in debugging such issues is this: &#xD;&#xA;&#xD;&#xA;* replace the entire implementation block of `fn check(_)` with `todo!()` or similar. &#xD;&#xA;* Now start removing the individual `where` clauses one by one and try re-compiling the code&#xD;&#xA;* The first time when removing a where clause makes your code compile, it means that one was the unmet one. &#xD;&#xA;&#xD;&#xA;This should give you a good starting point to then debug further why this clause is not met. " ContentLicense="CC BY-SA 4.0" />
  <row Id="45751" PostHistoryTypeId="50" PostId="10313" RevisionGUID="d44ee0c8-933d-4808-941e-ebc158a5076a" CreationDate="2024-03-23T05:00:19.120" UserId="-1" />
  <row Id="45752" PostHistoryTypeId="50" PostId="7354" RevisionGUID="d016296c-8730-4361-8025-1bb28435b865" CreationDate="2024-03-23T06:01:55.247" UserId="-1" />
  <row Id="45757" PostHistoryTypeId="50" PostId="10268" RevisionGUID="853c9ff4-da3e-4ac0-a98d-21076fff1c85" CreationDate="2024-03-23T07:05:15.600" UserId="-1" />
  <row Id="45758" PostHistoryTypeId="50" PostId="9039" RevisionGUID="9ea7f72f-1a49-4d75-a3b1-877c0a658d26" CreationDate="2024-03-23T11:01:30.207" UserId="-1" />
  <row Id="45759" PostHistoryTypeId="50" PostId="7352" RevisionGUID="6b1a6b74-4ed1-4fff-a416-9e13eef31ab7" CreationDate="2024-03-23T12:00:35.087" UserId="-1" />
  <row Id="45760" PostHistoryTypeId="50" PostId="10261" RevisionGUID="67babbe1-8eff-47a4-9383-773d81b415ed" CreationDate="2024-03-23T14:08:10.873" UserId="-1" />
  <row Id="45762" PostHistoryTypeId="50" PostId="7383" RevisionGUID="ae6a61f0-ca2f-4895-b139-24aa5ebf10df" CreationDate="2024-03-23T21:04:30.573" UserId="-1" />
  <row Id="45763" PostHistoryTypeId="50" PostId="5572" RevisionGUID="e7cd6ccd-5560-40a0-96a9-b24f4883b58e" CreationDate="2024-03-23T22:02:15.297" UserId="-1" />
  <row Id="45764" PostHistoryTypeId="50" PostId="6623" RevisionGUID="386de33d-3dcd-4b1c-951f-140d2f8e33fc" CreationDate="2024-03-24T13:06:50.893" UserId="-1" />
  <row Id="45765" PostHistoryTypeId="50" PostId="8984" RevisionGUID="d96bd829-2f1b-4f01-b86f-61172a9e6832" CreationDate="2024-03-24T14:07:40.890" UserId="-1" />
  <row Id="45766" PostHistoryTypeId="50" PostId="8484" RevisionGUID="4c4e6de7-d484-42d5-869d-bab0adcf1015" CreationDate="2024-03-24T16:04:05.513" UserId="-1" />
  <row Id="45767" PostHistoryTypeId="50" PostId="8523" RevisionGUID="125106c9-0d15-4127-ab28-5e33a212cf6d" CreationDate="2024-03-24T17:01:45.183" UserId="-1" />
  <row Id="45768" PostHistoryTypeId="50" PostId="8843" RevisionGUID="894b8743-4bf9-4040-97d1-acaf455fc6a5" CreationDate="2024-03-24T18:01:35.270" UserId="-1" />
  <row Id="45769" PostHistoryTypeId="50" PostId="11012" RevisionGUID="f2374c89-5999-4c7d-9d1d-abf203f049e3" CreationDate="2024-03-24T19:06:10.840" UserId="-1" />
  <row Id="45770" PostHistoryTypeId="50" PostId="8487" RevisionGUID="91c6e20d-b257-42d5-9ef3-6cb9c570485b" CreationDate="2024-03-24T20:01:20.167" UserId="-1" />
  <row Id="45771" PostHistoryTypeId="2" PostId="11207" RevisionGUID="39a28d84-f427-41ed-bad7-d900ceb89d16" CreationDate="2024-03-24T20:24:10.813" UserId="5246" Text="What is the best and quickest way, for a layman, who has very little, &#xD;&#xA;to no experience, at all, in coding and/or developing, to play catch-up, so that he/she might be brought-up-to-speed, enough to allow them a level of comfort while using a site, such as this one. –Books, websites, articles, program's, etc. Any, and all, input will be much appreciated." ContentLicense="CC BY-SA 4.0" />
  <row Id="45773" PostHistoryTypeId="1" PostId="11207" RevisionGUID="39a28d84-f427-41ed-bad7-d900ceb89d16" CreationDate="2024-03-24T20:24:10.813" UserId="5246" Text="What can Substrate and Polkadot do for me?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45774" PostHistoryTypeId="3" PostId="11207" RevisionGUID="39a28d84-f427-41ed-bad7-d900ceb89d16" CreationDate="2024-03-24T20:24:10.813" UserId="5246" Text="|substrate-node-template|consensus|learning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45775" PostHistoryTypeId="50" PostId="8616" RevisionGUID="f81ae62d-7c33-475d-a564-4c2c51dd1dc1" CreationDate="2024-03-24T22:05:55.653" UserId="-1" />
  <row Id="45776" PostHistoryTypeId="50" PostId="8735" RevisionGUID="487a4e8e-de85-4f34-ae50-9f49be2681c3" CreationDate="2024-03-24T23:01:10.137" UserId="-1" />
  <row Id="45777" PostHistoryTypeId="50" PostId="9054" RevisionGUID="ddf350e7-f765-4293-a8f2-5f8c083c1985" CreationDate="2024-03-25T00:07:55.953" UserId="-1" />
  <row Id="45778" PostHistoryTypeId="2" PostId="11208" RevisionGUID="28281b65-507b-4ffb-8aea-7b60948ace26" CreationDate="2024-03-25T02:09:53.677" UserId="3538" Text="I'm working on a custom pallet related to the zero-knowledge proof system and I've run into an issue regarding the trait implementations. I have defined a fixed-size hash type H256 using a custom macro `construct_fixed_hash!` provided by the `fixed_hash` crate:&#xD;&#xA;```&#xD;&#xA;construct_fixed_hash!{ pub struct H256(32); }&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This type is used extensively across my module for cryptographic purposes. For a specific feature, I need to treat this type differently; hence, I introduced a new type alias `GEpoch` for `H256` to represent a distinct conceptual entity:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub type GEpoch = H256;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I've implemented the `Encode` and `Decode` traits for the `GEpoch` type, however, on defining it as a storage item inside a pallet like this:&#xD;&#xA;```&#xD;&#xA;#[pallet::storage]&#xD;&#xA;#[pallet::getter(fn g_epoch)]&#xD;&#xA;pub(crate) type LastGEpoch&lt;T: Config&gt; = StorageValue&lt;_, GEpoch&gt;;&#xD;&#xA;```&#xD;&#xA;I'm getting this error:&#xD;&#xA;```&#xD;&#xA;error[E0277]: the trait bound `g_epoch::H256: EncodeLike` is not satisfied&#xD;&#xA;  --&gt; pallets/zk-system/src/lib.rs:50:15&#xD;&#xA;   |&#xD;&#xA;50 |       #[pallet::pallet]&#xD;&#xA;   |  _______________^&#xD;&#xA;51 | |     pub struct Pallet&lt;T&gt;(core::marker::PhantomData&lt;T&gt;);&#xD;&#xA;52 | |&#xD;&#xA;53 | |     #[pallet::event]&#xD;&#xA;...  |&#xD;&#xA;70 | |     #[pallet::getter(fn g_epoch)]&#xD;&#xA;71 | |     pub(crate) type LastGEpoch&lt;T: Config&gt; = StorageValue&lt;_, GEpoch&gt;;&#xD;&#xA;   | |______________________________^ the trait `EncodeLike` is not implemented for `g_epoch::H256`&#xD;&#xA;   |&#xD;&#xA;   = help: the following other types implement trait `EncodeLike&lt;T&gt;`:&#xD;&#xA;             &lt;bool as EncodeLike&gt;&#xD;&#xA;             &lt;i8 as EncodeLike&gt;&#xD;&#xA;             &lt;i16 as EncodeLike&gt;&#xD;&#xA;             &lt;i32 as EncodeLike&gt;&#xD;&#xA;             &lt;i64 as EncodeLike&gt;&#xD;&#xA;             &lt;i128 as EncodeLike&gt;&#xD;&#xA;             &lt;u8 as EncodeLike&gt;&#xD;&#xA;             &lt;u16 as EncodeLike&gt;&#xD;&#xA;           and 333 others&#xD;&#xA;   = note: required for `g_epoch::H256` to implement `FullEncode`&#xD;&#xA;   = note: required for `g_epoch::H256` to implement `FullCodec`&#xD;&#xA;   = note: required for `frame_support::pallet_prelude::StorageValue&lt;_GeneratedPrefixForStorageLastGEpoch&lt;T&gt;, g_epoch::H256&gt;` to implement `StorageInfoTrait`&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;As I understand it, the implementation of `Encode/Decode` traits automatically implements the `EncodeLike` trait, but I'm still getting this issue. " ContentLicense="CC BY-SA 4.0" />
  <row Id="45780" PostHistoryTypeId="1" PostId="11208" RevisionGUID="28281b65-507b-4ffb-8aea-7b60948ace26" CreationDate="2024-03-25T02:09:53.677" UserId="3538" Text="Conflicting `Encode` and `Decode` Trait Implementations for Type Aliases in a custom pallet" ContentLicense="CC BY-SA 4.0" />
  <row Id="45781" PostHistoryTypeId="3" PostId="11208" RevisionGUID="28281b65-507b-4ffb-8aea-7b60948ace26" CreationDate="2024-03-25T02:09:53.677" UserId="3538" Text="|pallet|substrate-node|traits|zero-knowlage|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45782" PostHistoryTypeId="50" PostId="9035" RevisionGUID="9585a6c4-f040-4a70-9d1e-fa7dbb1d778f" CreationDate="2024-03-25T07:03:05.347" UserId="-1" />
  <row Id="45783" PostHistoryTypeId="50" PostId="8868" RevisionGUID="d3a45941-8afb-46de-81b2-6fa315a6eec8" CreationDate="2024-03-25T09:02:10.243" UserId="-1" />
  <row Id="45784" PostHistoryTypeId="2" PostId="11209" RevisionGUID="d70ade1f-aa92-4856-bf7c-6a8934b9a31f" CreationDate="2024-03-25T10:55:44.967" UserId="1780" Text="It probably won't work to derive `serde::Serialize` for all types in the subxt codegen because there are some types that doesn't implement `Serialize`.&#xD;&#xA;&#xD;&#xA;For individual types you can try:&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[subxt::subxt(&#xD;&#xA;	runtime_metadata_path = &quot;artifacts/metadata.scale&quot;,&#xD;&#xA;	derive_for_all_types = &quot;Clone, Debug, Eq, PartialEq&quot;,&#xD;&#xA;	derive_for_type(&#xD;&#xA;		path = &quot;pallet_election_provider_multi_phase::RoundSnapshot&quot;,&#xD;&#xA;		derive = &quot;Default, serde::Serialize&quot;&#xD;&#xA;	)&#xD;&#xA;)]&#xD;&#xA;pub mod runtime {}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If that won't work you need to provide your own Serialize impl/add wrapper struct, replace the type with your own or something similar. &#xD;&#xA;&#xD;&#xA;I hope it helps&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45786" PostHistoryTypeId="2" PostId="11210" RevisionGUID="80af1e3b-327d-4693-bfe0-5cc6378a499d" CreationDate="2024-03-25T11:19:50.517" UserId="1780" Text="&gt; Why does adding this dependency to the node-template-runtime module cause an error?&#xD;&#xA;&#xD;&#xA;The runtime must support compiling the code to no-std and subxt doesn't support that yet. There are ongoing work to make parts of subxt to be no-std though. That's why you get the error `found duplicate lang item `panic_impl`&#xD;&#xA;&#xD;&#xA;&gt; I've heard that all dependencies in node-template-runtime must be no_std, but why then does the Cargo.toml of the node-template-runtime module have default = [&quot;std&quot;] in its features?&#xD;&#xA;&#xD;&#xA;The std feature is only enabled when the runtime is compiled to native and that's those std features exist." ContentLicense="CC BY-SA 4.0" />
  <row Id="45788" PostHistoryTypeId="50" PostId="7020" RevisionGUID="a32ce0a0-02b6-479e-b496-bc33f455b801" CreationDate="2024-03-25T12:07:50.917" UserId="-1" />
  <row Id="45789" PostHistoryTypeId="50" PostId="5951" RevisionGUID="251974ec-8f01-481c-b86c-f8f0e2d83ec4" CreationDate="2024-03-25T13:06:40.827" UserId="-1" />
  <row Id="45790" PostHistoryTypeId="2" PostId="11211" RevisionGUID="bd19068f-429d-4a34-ab38-d4cea2529621" CreationDate="2024-03-25T13:42:08.900" UserId="1780" Text="Would be good in the future if you could explain how you are performing runtime upgrades in subxt because there is at least two ways to do that.&#xD;&#xA;&#xD;&#xA;However, I think you are running into https://github.com/paritytech/subxt/issues/1319 and it was a bug subxt where the metadata was updated on a &quot;too early block&quot;. That is fixed now.&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45792" PostHistoryTypeId="2" PostId="11212" RevisionGUID="f069f908-28dd-4a80-b7f7-3ad0331b5c4e" CreationDate="2024-03-25T14:39:01.223" UserId="1780" Text="you need to pass message as an `array[u8; 32]` not as a `hex string`." ContentLicense="CC BY-SA 4.0" />
  <row Id="45794" PostHistoryTypeId="2" PostId="11213" RevisionGUID="fdc8395f-ee8d-4e45-bc3d-fb2756278c8f" CreationDate="2024-03-25T14:45:21.320" UserId="1780" Text="The trait bounds are most likely not satisfied for the `into_rpc` impl, that's why your code won't compile.&#xD;&#xA;&#xD;&#xA;You probably need additional trait bounds in your function for the params/return types satisfy `Send + Sync + serde::de::DeserializeOwned`.&#xD;&#xA;&#xD;&#xA;Depending on context you may need `serde::se::Serialize` as well..." ContentLicense="CC BY-SA 4.0" />
  <row Id="45796" PostHistoryTypeId="2" PostId="11214" RevisionGUID="35c9b5dc-af1a-4454-bc02-a10a87662a7a" CreationDate="2024-03-25T14:56:51.283" UserId="94" Text="`sp_core::hash` already provides a `H256` type that we normally use for storage. You can still wrap it, but would be better to wrap it in a Rust *newtype*. Implementing traits on type aliases is normally going to produce conflicting implementations, since it is just a rename - not a new type.&#xD;&#xA;&#xD;&#xA;You can probably debug it by putting first the `H256` into storage and ensuring that it works and then a wrapped `GEpoch` type." ContentLicense="CC BY-SA 4.0" />
  <row Id="45798" PostHistoryTypeId="2" PostId="11215" RevisionGUID="e748f5d2-c6b4-47be-aca6-b66ede1e3aaa" CreationDate="2024-03-26T01:21:38.830" UserId="1950" Text="I have following substrate pallet implementation to split an Item and create new Items &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[pallet::call_index(26)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::split())]&#xD;&#xA;		pub fn split(&#xD;&#xA;			sender_origin: OriginFor&lt;T&gt;,&#xD;&#xA;			collection_id: T::CollectionId,&#xD;&#xA;			item_id: T::ItemId,&#xD;&#xA;			owner: AccountIdLookupOf&lt;T&gt;,&#xD;&#xA;			key: BoundedVec&lt;u8, T::KeyLimit&gt;,&#xD;&#xA;			num_of_nfts: u32,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;&#xD;&#xA;			let origin = ensure_signed(sender_origin.clone())?;&#xD;&#xA;			let owner = T::Lookup::lookup(owner)?;&#xD;&#xA;&#xD;&#xA;			let collection =&#xD;&#xA;				Collection::&lt;T, I&gt;::get(&amp;collection_id).ok_or(Error::&lt;T, I&gt;::UnknownCollection)?;&#xD;&#xA;&#xD;&#xA;			// Current number of items in a collection&#xD;&#xA;			let current_number_of_items = collection.items;&#xD;&#xA;&#xD;&#xA;			let item_details =   Item::&lt;T, I&gt;::get(collection_id, item_id).ok_or(Error::&lt;T, I&gt;::UnknownItem)?;&#xD;&#xA;			let mut current_item_id =  CurrentItemItByCollection::&lt;T, I&gt;::get(collection_id).ok_or(Error::&lt;T, I&gt;::UnknownItem)?;&#xD;&#xA;&#xD;&#xA;			let item_metadata = ItemMetadataOf::&lt;T, I&gt;::get(collection_id, item_id).unwrap();&#xD;&#xA;			let item_attribute = Attribute::&lt;T, I&gt;::get((collection_id, Some(item_id), &amp;key)).unwrap();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			for num_nft in 0..num_of_nfts {&#xD;&#xA;				let next_nft_id:   T::ItemId  = (current_number_of_items + num_nft) + 1 ;&#xD;&#xA;&#xD;&#xA;				// Mint new items&#xD;&#xA;				Self::do_mint(collection_id, next_nft_id, owner.clone(), |collection_details| {&#xD;&#xA;					if collection_details.issuer != origin {&#xD;&#xA;						return Err(Error::&lt;T, I&gt;::NoPermission.into());&#xD;&#xA;					}&#xD;&#xA;					Ok(())&#xD;&#xA;				})?;&#xD;&#xA;			}&#xD;&#xA;&#xD;&#xA;			// Burn parent NFT on success&#xD;&#xA;&#xD;&#xA;			Self::do_burn(collection_id, item_id, |collection_details, details| {&#xD;&#xA;				let is_permitted = collection_details.admin == origin || details.owner == origin;&#xD;&#xA;				ensure!(is_permitted, Error::&lt;T, I&gt;::NoPermission);&#xD;&#xA;				Ok(())&#xD;&#xA;			})?;&#xD;&#xA;&#xD;&#xA;			/*&#xD;&#xA;			pub fn set_metadata(&#xD;&#xA;				origin: OriginFor&lt;T&gt;,&#xD;&#xA;				collection: T::CollectionId,&#xD;&#xA;				item: T::ItemId,&#xD;&#xA;				data: BoundedVec&lt;u8, T::StringLimit&gt;,&#xD;&#xA;				is_frozen: bool,&#xD;&#xA;			)&#xD;&#xA;			*/&#xD;&#xA;&#xD;&#xA;			// Self::set_metadata(&#xD;&#xA;			// 	sender_origin.clone(),&#xD;&#xA;			// 	collection_id,&#xD;&#xA;			// 	item_id.into(),&#xD;&#xA;			// 	item_metadata,&#xD;&#xA;			// 	false&#xD;&#xA;			// );&#xD;&#xA;&#xD;&#xA;			 // Self::set_attribute(&#xD;&#xA;				//  origin,&#xD;&#xA;				//  collection_id,&#xD;&#xA;				//  Some(item_id),&#xD;&#xA;				//  key,&#xD;&#xA;				//  item_attribute,&#xD;&#xA;			 // )?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I want to increment the current ItemId by 1 inside a loop and mint new NFTs&#xD;&#xA;Unfortunately Im getting an error here.&#xD;&#xA;&#xD;&#xA;Error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;  1573 |                 let next_nft_id:   T::ItemId  = (current_number_of_items + num_nft + 1u32) ;&#xD;&#xA;       |                                    ---------    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found `u32`&#xD;&#xA;       |                                    |&#xD;&#xA;       |                                    expected due to this&#xD;&#xA;       |&#xD;&#xA;       = note: expected associated type `&lt;T as pallet::Config&lt;I&gt;&gt;::ItemId`&#xD;&#xA;                             found type `u32`&#xD;&#xA;       = help: consider constraining the associated type `&lt;T as pallet::Config&lt;I&gt;&gt;::ItemId` to `u32`&#xD;&#xA;       = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How to fix this error?&#xD;&#xA;Thank you in advance" ContentLicense="CC BY-SA 4.0" />
  <row Id="45800" PostHistoryTypeId="1" PostId="11215" RevisionGUID="e748f5d2-c6b4-47be-aca6-b66ede1e3aaa" CreationDate="2024-03-26T01:21:38.830" UserId="1950" Text="How to increment Uniques Pallet T::ItemId" ContentLicense="CC BY-SA 4.0" />
  <row Id="45801" PostHistoryTypeId="3" PostId="11215" RevisionGUID="e748f5d2-c6b4-47be-aca6-b66ede1e3aaa" CreationDate="2024-03-26T01:21:38.830" UserId="1950" Text="|rust|substrate-node|uniques|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45802" PostHistoryTypeId="2" PostId="11216" RevisionGUID="9f0f2417-6597-4c85-acde-4b5787916cc2" CreationDate="2024-03-26T03:19:25.540" UserId="251" Text="### Solution 1&#xD;&#xA;Change all `u32` to `T::ItemId`. &#xD;&#xA;&#xD;&#xA;E.G. &#xD;&#xA;```rs&#xD;&#xA;num_of_nfts: T::ItemId&#xD;&#xA;num_nft: T::ItemId&#xD;&#xA;&#xD;&#xA;(current_number_of_items + num_nft) + sp_runtime::traits::One::one()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Solution 2&#xD;&#xA;Use `saturated_into()`. However, be mindful of the actual runtime type of `T::Item`. Always cast a smaller type to an equal or larger one to avoid losing precision.&#xD;&#xA;&#xD;&#xA;E.G `u32 -&gt; u32/u64/u128...`&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use sp_runtime::traits::SaturatedCoversion;&#xD;&#xA;&#xD;&#xA;((current_number_of_items + num_nft) + 1).saturated_into()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45804" PostHistoryTypeId="5" PostId="11216" RevisionGUID="5dc436d2-f174-449b-bfbc-d125bb89dd97" CreationDate="2024-03-26T08:49:31.207" UserId="251" Comment="added 1 character in body" Text="### Solution 1&#xD;&#xA;Change all `u32` to `T::ItemId`. &#xD;&#xA;&#xD;&#xA;E.G. &#xD;&#xA;```rs&#xD;&#xA;num_of_nfts: T::ItemId&#xD;&#xA;num_nft: T::ItemId&#xD;&#xA;&#xD;&#xA;(current_number_of_items + num_nft) + sp_runtime::traits::One::one()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;### Solution 2&#xD;&#xA;Use `saturated_into()`. However, be mindful of the actual runtime type of `T::Item`. Always cast a smaller type to an equal or larger one to avoid losing precision.&#xD;&#xA;&#xD;&#xA;E.G `u32 -&gt; u32/u64/u128...`&#xD;&#xA;&#xD;&#xA;```rs&#xD;&#xA;use sp_runtime::traits::SaturatedConversion;&#xD;&#xA;&#xD;&#xA;((current_number_of_items + num_nft) + 1).saturated_into()&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45805" PostHistoryTypeId="50" PostId="5652" RevisionGUID="499f1c5a-8534-400f-b4da-64a64ad91ebf" CreationDate="2024-03-26T11:04:25.503" UserId="-1" />
  <row Id="45806" PostHistoryTypeId="2" PostId="11217" RevisionGUID="2225dbc7-e8f8-4492-a178-082a407437c1" CreationDate="2024-03-26T19:35:25.407" UserId="3437" Text="We can make HTTP Get and Post request through Offchain worker. Can we also do the same on chain through pallet extrinsic?&#xD;&#xA;&#xD;&#xA;Is there any restriction?&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45808" PostHistoryTypeId="1" PostId="11217" RevisionGUID="2225dbc7-e8f8-4492-a178-082a407437c1" CreationDate="2024-03-26T19:35:25.407" UserId="3437" Text="Would it be possible to make HTTP request on chain through pallet extrinsic?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45809" PostHistoryTypeId="3" PostId="11217" RevisionGUID="2225dbc7-e8f8-4492-a178-082a407437c1" CreationDate="2024-03-26T19:35:25.407" UserId="3437" Text="|substrate-node-template|offchain-worker|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45810" PostHistoryTypeId="2" PostId="11218" RevisionGUID="08d41016-dc17-45dc-b7e9-2d3e3690301d" CreationDate="2024-03-26T21:57:54.087" UserId="28" Text="When trying to run a zombienet test locally, I get the error:&#xD;&#xA;&#xD;&#xA;&gt; Error: Invalid credential file path: config&#xD;&#xA;&#xD;&#xA;The test is copied from the Polkadot-SDK Repo:&#xD;&#xA;&#xD;&#xA;**0001-parachains-smoke-test.toml**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;[settings]&#xD;&#xA;timeout = 1000&#xD;&#xA;&#xD;&#xA;[relaychain]&#xD;&#xA;default_image = &quot;{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}&quot;&#xD;&#xA;chain = &quot;rococo-local&quot;&#xD;&#xA;command = &quot;polkadot&quot;&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;alice&quot;&#xD;&#xA;  args = [ &quot;--alice&quot;, &quot;-lruntime=debug,parachain=trace&quot; ]&#xD;&#xA;&#xD;&#xA;  [[relaychain.nodes]]&#xD;&#xA;  name = &quot;bob&quot;&#xD;&#xA;  args = [ &quot;--bob&quot;, &quot;-lruntime=debug,parachain=trace&quot; ]&#xD;&#xA;&#xD;&#xA;[[parachains]]&#xD;&#xA;id = 100&#xD;&#xA;addToGenesis = false&#xD;&#xA;&#xD;&#xA;  [parachains.collator]&#xD;&#xA;  name = &quot;collator01&quot;&#xD;&#xA;  image = &quot;{{COL_IMAGE}}&quot;&#xD;&#xA;  command = &quot;adder-collator&quot;&#xD;&#xA;  args = [ &quot;-lruntime=debug,parachain=trace&quot; ]&#xD;&#xA;&#xD;&#xA;[types.Header]&#xD;&#xA;number = &quot;u64&quot;&#xD;&#xA;parent_hash = &quot;Hash&quot;&#xD;&#xA;post_state = &quot;Hash&quot;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;**0001-parachains-smoke-test.zndsl**&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Description: Smoke Test&#xD;&#xA;Network: ./0001-parachains-smoke-test.toml&#xD;&#xA;Creds: config&#xD;&#xA;&#xD;&#xA;alice: parachain 100 is registered within 225 seconds&#xD;&#xA;alice: parachain 100 block height is at least 10 within 400 seconds&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;The command I am running is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos test zombienet-config/tests/0001-parachains-smoke-test.zndsl&#xD;&#xA;```&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45812" PostHistoryTypeId="1" PostId="11218" RevisionGUID="08d41016-dc17-45dc-b7e9-2d3e3690301d" CreationDate="2024-03-26T21:57:54.087" UserId="28" Text="Zombinet: &quot;Error: Invalid credential file path: config&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45813" PostHistoryTypeId="3" PostId="11218" RevisionGUID="08d41016-dc17-45dc-b7e9-2d3e3690301d" CreationDate="2024-03-26T21:57:54.087" UserId="28" Text="|zombienet|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45814" PostHistoryTypeId="2" PostId="11219" RevisionGUID="5fb07ea4-d9fd-4d70-8269-334787dfcd95" CreationDate="2024-03-26T21:57:54.087" UserId="28" Text="From the Zombienet documentation:&#xD;&#xA;&#xD;&#xA;&gt; Creds: ............ Credentials file name or path to use (Only with kubernetes provider), we look in the current directory or in $HOME/.kube/ if a filename is passed.&#xD;&#xA;&#xD;&#xA;Based on your command, it seems you are trying to run the tests locally, and thus you should use the native provider, by passing the `--provider native` flag to zombienet.&#xD;&#xA;&#xD;&#xA;So the final command you should run is:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;./zombienet-macos test --provider=native zombienet-config/tests/0001-parachains-smoke-test.zndsl&#xD;&#xA;``` " ContentLicense="CC BY-SA 4.0" />
  <row Id="45816" PostHistoryTypeId="2" PostId="11220" RevisionGUID="efeddcf4-3a24-4483-9d1e-c35ad17b6788" CreationDate="2024-03-26T22:04:24.883" UserId="28" Text="When upgrading my node to the latest version of the Polkadot-SDK, I get the following error when trying to run the node:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;Error:           Error: Command failed with exit code 1: bash -c ./target/release/parachain-template-node export-genesis-head -d /var/folders/_1/q03733qd0pv42n1dvkcvyx0c0000gn/T/zombie-a62cc984247da3304e3610859e23df97_-39473-pjQiul72IZpH/export-genesis-state/2000 --chain /var/folders/_1/q03733qd0pv42n1dvkcvyx0c0000gn/T/zombie-a62cc984247da3304e3610859e23df97_-39473-pjQiul72IZpH/2000-rococo-local.json /var/folders/_1/q03733qd0pv42n1dvkcvyx0c0000gn/T/zombie-a62cc984247da3304e3610859e23df97_-39473-pjQiul72IZpH/cfg/genesis-state-2000 &amp;&amp; ./target/release/parachain-template-node export-genesis-wasm --chain /var/folders/_1/q03733qd0pv42n1dvkcvyx0c0000gn/T/zombie-a62cc984247da3304e3610859e23df97_-39473-pjQiul72IZpH/2000-rococo-local.json /var/folders/_1/q03733qd0pv42n1dvkcvyx0c0000gn/T/zombie-a62cc984247da3304e3610859e23df97_-39473-pjQiul72IZpH/cfg/genesis-wasm-2000&#xD;&#xA;Error: Service(Client(VersionInvalid(&quot;Other error happened while constructing the runtime: runtime requires function imports which are not present on the host: 'env:ext_storage_proof_size_storage_proof_size_version_1'&quot;)))&#xD;&#xA;2024-03-26 13:31:38 Cannot create a runtime error=Other(&quot;runtime requires function imports which are not present on the host: 'env:ext_storage_proof_size_storage_proof_size_version_1'&quot;)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;How do I register / add the `storage_proof_size` host function?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45818" PostHistoryTypeId="1" PostId="11220" RevisionGUID="efeddcf4-3a24-4483-9d1e-c35ad17b6788" CreationDate="2024-03-26T22:04:24.883" UserId="28" Text="Register Host Function: &quot;runtime requires function imports which are not present on the host: env:ext_storage_proof_size_storage_proof_size_version_1&quot;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45819" PostHistoryTypeId="3" PostId="11220" RevisionGUID="efeddcf4-3a24-4483-9d1e-c35ad17b6788" CreationDate="2024-03-26T22:04:24.883" UserId="28" Text="|host-functions|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45820" PostHistoryTypeId="2" PostId="11221" RevisionGUID="6aa55c88-0a25-4f73-a857-7bc10498a43e" CreationDate="2024-03-26T22:04:24.883" UserId="28" Text="Your host functions are registered in the `service.rs` file of your node.&#xD;&#xA;&#xD;&#xA;Here is the relevant code in the latest version of the Polkadot SDK (as of writing this post):&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[cfg(not(feature = &quot;runtime-benchmarks&quot;))]&#xD;&#xA;type HostFunctions =&#xD;&#xA;	(sp_io::SubstrateHostFunctions, cumulus_client_service::storage_proof_size::HostFunctions);&#xD;&#xA;&#xD;&#xA;#[cfg(feature = &quot;runtime-benchmarks&quot;)]&#xD;&#xA;type HostFunctions = (&#xD;&#xA;	sp_io::SubstrateHostFunctions,&#xD;&#xA;	cumulus_client_service::storage_proof_size::HostFunctions,&#xD;&#xA;	frame_benchmarking::benchmarking::HostFunctions,&#xD;&#xA;);&#xD;&#xA;&#xD;&#xA;type ParachainClient&lt;RuntimeApi&gt; = TFullClient&lt;Block, RuntimeApi, WasmExecutor&lt;HostFunctions&gt;&gt;;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;You can see the `HostFunctions` type includes the `cumulus_client_service::storage_proof_size::HostFunctions` which is what you need to fix that error.&#xD;&#xA;&#xD;&#xA;Once your `ParachainClient` is configured with the right `HostFunctions`, the error should go away." ContentLicense="CC BY-SA 4.0" />
  <row Id="45822" PostHistoryTypeId="52" PostId="11220" RevisionGUID="cff8b7a2-b6b7-434f-8cdf-fe10fd358041" CreationDate="2024-03-27T06:07:41.557" />
  <row Id="45823" PostHistoryTypeId="2" PostId="11222" RevisionGUID="c601bdc0-8ab7-4054-b68c-8b9eae166583" CreationDate="2024-03-27T07:57:07.260" UserId="2348" Text="i have been working on polkadot layer 0 chain. i have integrated evm frontier on layer 0 chain and everything is working fine .when i try to call rpc (eth.getcode) it is showing empty . can some please tell what is issue in this case .   i have tried evm integration on release 0.9.36 to release. 1.1.0 versions  and on every version i am facing this issue .[![error][1]][1]&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/wKDfp.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="45825" PostHistoryTypeId="1" PostId="11222" RevisionGUID="c601bdc0-8ab7-4054-b68c-8b9eae166583" CreationDate="2024-03-27T07:57:07.260" UserId="2348" Text="Rpc call showing empty in evm integrated chain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45826" PostHistoryTypeId="3" PostId="11222" RevisionGUID="c601bdc0-8ab7-4054-b68c-8b9eae166583" CreationDate="2024-03-27T07:57:07.260" UserId="2348" Text="|polkadot|rpc|evm|blockchain|layer0|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45827" PostHistoryTypeId="50" PostId="10719" RevisionGUID="68e0053e-a134-44c4-b0b6-d5b10c2b6c92" CreationDate="2024-03-27T11:04:30.477" UserId="-1" />
  <row Id="45828" PostHistoryTypeId="50" PostId="10958" RevisionGUID="87be7b3a-a75b-4c0a-8a3c-8ab338aac779" CreationDate="2024-03-27T13:04:55.653" UserId="-1" />
  <row Id="45829" PostHistoryTypeId="50" PostId="5680" RevisionGUID="e85a8315-43e2-4c39-9afb-542cbfc2bb90" CreationDate="2024-03-27T14:03:45.433" UserId="-1" />
  <row Id="45830" PostHistoryTypeId="50" PostId="11066" RevisionGUID="66d63ba6-b762-474d-a170-b02723b13631" CreationDate="2024-03-28T00:07:05.880" UserId="-1" />
  <row Id="45831" PostHistoryTypeId="50" PostId="7391" RevisionGUID="753d19ca-7889-456b-8897-823ebd13ace0" CreationDate="2024-03-28T02:02:50.313" UserId="-1" />
  <row Id="45832" PostHistoryTypeId="5" PostId="11180" RevisionGUID="e8dc4a67-49e0-4b5a-8691-3accdc7b5652" CreationDate="2024-03-28T08:33:36.790" UserId="5228" Comment="read this back and realised I typed sampling instead of querying" Text="Data ***Availability*** vs Data ***Querying*** &#xD;&#xA;&#xD;&#xA;The ***Merkel Trie*** you’re referring to is simply the proof it’s a ***real*** (canonical) block. ***Blockchains use traditional storage*** (albeit optimised for compression, as many big blocks gets… big?) “under the hood”. &#xD;&#xA; - Each new block provides a reference of the previous, and will itself be referenced by the following block. This ensures a ***forkless*** series of ***“official”*** ***“next”*** ***“states”*** (blocks).  &#xD;&#xA; - Why?! In a ***decentralised block production*** environment where anyone (with the necessary capital PoS, PoW) can produce blocks, ***consensus*** on the network of a singular, ***traceable lineage*** is therefore fundamental. If not; ***two or more blocks*** may be produced by ***two or more nodes*** simultaneously, causing the chain to ***fork***, with ***X nodes*** following ***Block A*** and ***Y nodes*** following ***Block B***. &#xD;&#xA;&#xD;&#xA;Here’s a ***great explanation that’s less technical*** and more relatable in ***under a minute***!;&#xD;&#xA;https://youtu.be/4DWsTh5HOWk?si=iQKw7S7kRYQ8OmMy&#xD;&#xA;&#xD;&#xA;Recommended further reading;&#xD;&#xA;https://wiki.polkadot.network/docs/learn-consensus&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45833" PostHistoryTypeId="50" PostId="11077" RevisionGUID="26605535-bed1-489e-a5d1-dba108f1ca54" CreationDate="2024-03-28T11:06:25.777" UserId="-1" />
  <row Id="45834" PostHistoryTypeId="2" PostId="11223" RevisionGUID="510bfb6a-9759-427d-87a7-4161b159967a" CreationDate="2024-03-28T12:26:43.023" UserId="167" Text="The main main main reason why the storage is not flat (i.e. `key -&gt; value`) is that a Merkle tree allows us to maintain a state root, and update it without needing to re-iterate all the other items in the database. Then, the same state root can also be used to generate state roots that are relatively compact. &#xD;&#xA;&#xD;&#xA;Imagine a flat key value database. A light client only has the state root (i.e. Hash of all keys and values). How can we prove a small subset of the database to the light client? There is no way. But with a merkleized storage, if you send all the nodes from the value you want to prove, all the way to the root, the light can then verify it. &#xD;&#xA;&#xD;&#xA;This is a good tradeoff example. Insertion and read is more inefficient in a &quot;merkleized&quot; storage, but maintaining a root is significantly easier. &#xD;&#xA;&#xD;&#xA;[This section](https://polkadot-blockchain-academy.github.io/pba-book/substrate/storage/slides.html#/2) of the corresponding Polkadot Blockchain Academy explains this concept." ContentLicense="CC BY-SA 4.0" />
  <row Id="45836" PostHistoryTypeId="2" PostId="11224" RevisionGUID="dc381d10-d1ba-4fd4-b1a7-cc2d215dbb50" CreationDate="2024-03-28T12:52:50.707" UserId="94" Text="Should be fixed by this. Otherwise it should be possible https://github.com/paritytech/srtool/pull/81.  &#xD;&#xA;&#xD;&#xA;As workaround you can try the command here for building the runtimes, we use it in Polkadot: https://github.com/polkadot-fellows/runtimes/releases/tag/v1.1.3" ContentLicense="CC BY-SA 4.0" />
  <row Id="45838" PostHistoryTypeId="2" PostId="11225" RevisionGUID="d3e77171-8f35-4ce2-bb96-eb0663bfe194" CreationDate="2024-03-28T14:20:50.240" UserId="360" Text="We observe a strange phenomenon: &#xD;&#xA;We send many lightweight extrinsics (~2 per block) signed by the same account to one full node (node1) which is peered up with two authority collators (auth1 and auth2) producing blocks regularly. &#xD;&#xA;&#xD;&#xA;At some point, the extrinsics stop being included.&#xD;&#xA;&#xD;&#xA;The last extrinsic nonce included is 3836&#xD;&#xA;&#xD;&#xA;then I ask all nodes what the next nonce should be.&#xD;&#xA;&#xD;&#xA;    curl http://localhost:9933 -X POST -H &quot;Content-Type: application/json&quot; --data '{&quot;method&quot;:&quot;system_accountNextIndex&quot;,&quot;params&quot;:[&quot;5Gtt7oCnD3aZPUMx5B2QrXAt5nfoi4LfBSG8xeTMLmDq9qJN&quot;],&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;}'&#xD;&#xA;&#xD;&#xA;auth1 and node1 both return 3837&#xD;&#xA;&#xD;&#xA;but when I query **node1** for pending extrinsics using `author_pendingExtrinsics`&#xD;&#xA;&#xD;&#xA;I get a list of 8044 extrinsics and the first one in the list indeed has nonce 3837&#xD;&#xA;&#xD;&#xA;querying auth1 and auth2 for pending xt returns none. Verifying again: they are peered up mutually querying `system_peers`&#xD;&#xA;&#xD;&#xA;I can now pick the first pending extrinsic from node1's list and manually send it to auth1 using `author_submitExtrinsic`, it gets included. This tells me there is no issue with that extrinsic. But this doesn't lead to an avalanche of the remaining extrinsics, I can only pick one by one manually and they will be included.&#xD;&#xA;&#xD;&#xA;environment: Paseo relay chain (polkadot-sdk-1.9.0), integritee parachain (polkadot-sdk-1.6.0)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45840" PostHistoryTypeId="1" PostId="11225" RevisionGUID="d3e77171-8f35-4ce2-bb96-eb0663bfe194" CreationDate="2024-03-28T14:20:50.240" UserId="360" Text="pending extrinsics jammed" ContentLicense="CC BY-SA 4.0" />
  <row Id="45841" PostHistoryTypeId="3" PostId="11225" RevisionGUID="d3e77171-8f35-4ce2-bb96-eb0663bfe194" CreationDate="2024-03-28T14:20:50.240" UserId="360" Text="|extrinsic|transaction-pool|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45842" PostHistoryTypeId="5" PostId="11225" RevisionGUID="5d670a98-e8f3-4c03-8ddd-77c1bd929d93" CreationDate="2024-03-28T14:28:10.903" UserId="360" Comment="added 85 characters in body; edited title" Text="We observe a strange phenomenon: &#xD;&#xA;We send many lightweight extrinsics (~2 per block) signed by the same account to one full node (node1) which is peered up with two authority collators (auth1 and auth2) producing blocks regularly. &#xD;&#xA;&#xD;&#xA;At some point, the extrinsics stop being included.&#xD;&#xA;&#xD;&#xA;The last extrinsic nonce included is 3836&#xD;&#xA;&#xD;&#xA;then I ask all nodes what the next nonce should be.&#xD;&#xA;&#xD;&#xA;    curl http://localhost:9933 -X POST -H &quot;Content-Type: application/json&quot; --data '{&quot;method&quot;:&quot;system_accountNextIndex&quot;,&quot;params&quot;:[&quot;5Gtt7oCnD3aZPUMx5B2QrXAt5nfoi4LfBSG8xeTMLmDq9qJN&quot;],&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;}'&#xD;&#xA;&#xD;&#xA;auth1 and node1 both return 3837&#xD;&#xA;&#xD;&#xA;but when I query **node1** for pending extrinsics using `author_pendingExtrinsics`&#xD;&#xA;&#xD;&#xA;I get a list of 8044 extrinsics and the first one in the list indeed has nonce 3837&#xD;&#xA;&#xD;&#xA;querying auth1 and auth2 for pending xt returns none. Verifying again: they are peered up mutually querying `system_peers`&#xD;&#xA;&#xD;&#xA;I can now pick the first pending extrinsic from node1's list and manually send it to auth1 using `author_submitExtrinsic`, it gets included. This tells me there is no issue with that extrinsic. But this doesn't lead to an avalanche of the remaining extrinsics, I can only pick one by one manually and they will be included (so they are not banned).&#xD;&#xA;&#xD;&#xA;environment: Paseo relay chain (polkadot-sdk-1.9.0), integritee parachain (polkadot-sdk-1.6.0)&#xD;&#xA;&#xD;&#xA;Is there a way to force a node to re-broadcast their pending extrinsics?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45843" PostHistoryTypeId="4" PostId="11225" RevisionGUID="5d670a98-e8f3-4c03-8ddd-77c1bd929d93" CreationDate="2024-03-28T14:28:10.903" UserId="360" Comment="added 85 characters in body; edited title" Text="pending extrinsics jammed. How to ensure re-broadcast?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45844" PostHistoryTypeId="5" PostId="11225" RevisionGUID="1d8b760f-19d0-45be-ae13-9d23943427f0" CreationDate="2024-03-28T15:10:53.990" UserId="360" Comment="added 156 characters in body" Text="We observe a strange phenomenon: &#xD;&#xA;We send many lightweight extrinsics (~2 per block) signed by the same account to one full node (node1) which is peered up with two authority collators (auth1 and auth2) producing blocks regularly. &#xD;&#xA;&#xD;&#xA;At some point, the extrinsics stop being included.&#xD;&#xA;&#xD;&#xA;The last extrinsic nonce included is 3836&#xD;&#xA;&#xD;&#xA;then I ask all nodes what the next nonce should be.&#xD;&#xA;&#xD;&#xA;    curl http://localhost:9933 -X POST -H &quot;Content-Type: application/json&quot; --data '{&quot;method&quot;:&quot;system_accountNextIndex&quot;,&quot;params&quot;:[&quot;5Gtt7oCnD3aZPUMx5B2QrXAt5nfoi4LfBSG8xeTMLmDq9qJN&quot;],&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;2.0&quot;}'&#xD;&#xA;&#xD;&#xA;auth1 and node1 both return 3837&#xD;&#xA;&#xD;&#xA;but when I query **node1** for pending extrinsics using `author_pendingExtrinsics`&#xD;&#xA;&#xD;&#xA;I get a list of 8044 extrinsics and the first one in the list indeed has nonce 3837&#xD;&#xA;&#xD;&#xA;querying auth1 and auth2 for pending xt returns none. Verifying again: they are peered up mutually querying `system_peers`&#xD;&#xA;&#xD;&#xA;I can now pick the first pending extrinsic from node1's list and manually send it to auth1 using `author_submitExtrinsic`, it gets included. This tells me there is no issue with that extrinsic. But this doesn't lead to an avalanche of the remaining extrinsics, I can only pick one by one manually and they will be included (so they are not banned).&#xD;&#xA;&#xD;&#xA;another strange behavior: If we send a different extrinsic with the expected next nonce, we see the avalanche of pending extrinsics included immediately (except that one extrinsic with the same nocne, obviously)&#xD;&#xA;&#xD;&#xA;environment: Paseo relay chain (polkadot-sdk-1.9.0), integritee parachain (polkadot-sdk-1.6.0)&#xD;&#xA;&#xD;&#xA;Is there a way to force a node to re-broadcast their pending extrinsics?&#xD;&#xA;&#xD;&#xA;" ContentLicense="CC BY-SA 4.0" />
  <row Id="45845" PostHistoryTypeId="2" PostId="11226" RevisionGUID="8b8ef2e8-5e29-43ac-beed-fd4ed30ef860" CreationDate="2024-03-28T15:54:16.207" UserId="4982" Text="I have seen this answer: https://substrate.stackexchange.com/questions/4396/what-is-the-time-complexity-of-storagemapclear&#xD;&#xA;&#xD;&#xA;But how possible is it that clear() or clear_prefix() doesn't actually clear all of the storage elements when using u32::MAX when attempting to clear everything?&#xD;&#xA;&#xD;&#xA;In the society pallet https://github.com/paritytech/substrate/blob/033d4e86cc7eff0066cd376b9375f815761d653c/frame/society/src/migrations.rs#L343&#xD;&#xA;&#xD;&#xA;They use clear with no backups.&#xD;&#xA;&#xD;&#xA;Am I unclear on how this works? because in the documentation everything says:&#xD;&#xA;&#xD;&#xA;&gt; If the resultant maybe_cursor is Some, then another call is required&#xD;&#xA;&gt; to complete the removal operation&#xD;&#xA;&#xD;&#xA;- Uses the term &quot;Attempts&quot;: https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/types/struct.StorageMap.html#method.clear&#xD;&#xA;&#xD;&#xA;- https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/trait.StorageDoubleMap.html#tymethod.clear_prefix&#xD;&#xA;&#xD;&#xA;Is there a way to check before hand, is there a max amount of elements to remove? Or do we simply just use `res.maybe_cursor.is_some()` and if true, attempt to remove again until its false?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45847" PostHistoryTypeId="1" PostId="11226" RevisionGUID="8b8ef2e8-5e29-43ac-beed-fd4ed30ef860" CreationDate="2024-03-28T15:54:16.207" UserId="4982" Text="Best way to clear() StorageMap, DoubleStorageMap, and StorageValue" ContentLicense="CC BY-SA 4.0" />
  <row Id="45848" PostHistoryTypeId="3" PostId="11226" RevisionGUID="8b8ef2e8-5e29-43ac-beed-fd4ed30ef860" CreationDate="2024-03-28T15:54:16.207" UserId="4982" Text="|storagemap|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45849" PostHistoryTypeId="2" PostId="11227" RevisionGUID="61d302d9-5726-454d-88f6-687e55e18e7f" CreationDate="2024-03-28T16:07:37.243" UserId="3331" Text="I'm trying to execute a recovery from a manually stalled parachain.&#xD;&#xA;&#xD;&#xA;I'm doing the following,&#xD;&#xA; &#xD;&#xA; 1. Backup the base-path folder for the block #30&#xD;&#xA; 2. Let the parachain produce more blocks, until #40&#xD;&#xA; 3. Brick the parachain so it stops producing blocks&#xD;&#xA; 4. From the backup, generate a chain spec using `export-state` &#xD;&#xA; 5. With the new chain spec, generate a genesis-head using `export-genesis-state`&#xD;&#xA; 6. Delete the bricked base-path folder, and replace with the backup&#xD;&#xA; 7. Restart the node with the generated chain spec and the backup base-path&#xD;&#xA; 8. Using the new exported genesis state, execute a `force_set_current_head` from the Relay Chain.&#xD;&#xA;&#xD;&#xA;I'm assuming there's something not correct in my procedure, as the parachain logs the following error&#xD;&#xA;```&#xD;&#xA;2024-03-28 13:04:00 [Parachain] Could not find the header of the genesis block in the database! block_hash=0x6d202ad77996c9ef49b6074f0d130cd6cdbc0547a69f66b0243b069471eaa79c&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So there is any other method or procedure to properly set a previous state to a parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45851" PostHistoryTypeId="1" PostId="11227" RevisionGUID="61d302d9-5726-454d-88f6-687e55e18e7f" CreationDate="2024-03-28T16:07:37.243" UserId="3331" Text="How to properly execute a parachain backup and recover the chain state" ContentLicense="CC BY-SA 4.0" />
  <row Id="45852" PostHistoryTypeId="3" PostId="11227" RevisionGUID="61d302d9-5726-454d-88f6-687e55e18e7f" CreationDate="2024-03-28T16:07:37.243" UserId="3331" Text="|parachain|recovery|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45853" PostHistoryTypeId="2" PostId="11228" RevisionGUID="2db56822-ea3f-4967-8aab-319dadd1f741" CreationDate="2024-03-28T16:34:15.450" UserId="298" Text="https://polkadot.subscan.io/extrinsic/20098119-2&#xD;&#xA;&#xD;&#xA;&quot;AssetsTrapped&quot;&#xD;&#xA;&#xD;&#xA;So trying to claim an asset:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;here is the encoded call&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x1f03030c1804000000000b000ca021a20d000013000000000700e40b5402000d010000010100d05b3519d4062c0f60d2e4e900755c30e9fa6df0782642be2e1482939a1b423b0000&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but i get an error:&#xD;&#xA;&#xD;&#xA;1001 would exhaust the block limits...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/fURcX.jpg" ContentLicense="CC BY-SA 4.0" />
  <row Id="45855" PostHistoryTypeId="1" PostId="11228" RevisionGUID="2db56822-ea3f-4967-8aab-319dadd1f741" CreationDate="2024-03-28T16:34:15.450" UserId="298" Text="AssetTrapped: I teleported 1499 DOT from Polkadot to AssetHub but it has not arrived" ContentLicense="CC BY-SA 4.0" />
  <row Id="45856" PostHistoryTypeId="3" PostId="11228" RevisionGUID="2db56822-ea3f-4967-8aab-319dadd1f741" CreationDate="2024-03-28T16:34:15.450" UserId="298" Text="|xcm|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45857" PostHistoryTypeId="5" PostId="11228" RevisionGUID="d613285c-03bb-492f-b682-882f7a5b0748" CreationDate="2024-03-28T16:42:54.317" UserId="298" Comment="added 14 characters in body" Text="https://polkadot.subscan.io/extrinsic/20098119-2&#xD;&#xA;&#xD;&#xA;&quot;AssetsTrapped&quot; (1,499 DOT!!)&#xD;&#xA;&#xD;&#xA;So trying to claim an asset:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;here is the encoded call&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x6303030c1804000000000700e40b5402000013000000000700e40b54020100000d010000010100d05b3519d4062c0f60d2e4e900755c30e9fa6df0782642be2e1482939a1b423b91019101&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but i get an error:&#xD;&#xA;&#xD;&#xA;1001 would exhaust the block limits...&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aO4kJ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="45858" PostHistoryTypeId="5" PostId="11228" RevisionGUID="57609dd8-7128-4fa7-aac9-9102a6234794" CreationDate="2024-03-28T16:59:09.433" UserId="298" Comment="added 68 characters in body" Text="https://polkadot.subscan.io/extrinsic/20098119-2&#xD;&#xA;&#xD;&#xA;&quot;AssetsTrapped&quot; (1,499 DOT!!)&#xD;&#xA;&#xD;&#xA;So trying to claim an asset:&#xD;&#xA;&#xD;&#xA;[![enter image description here][1]][1]&#xD;&#xA;&#xD;&#xA;here is the encoded call&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;0x6303030c1804000000000700e40b5402000013000000000700e40b54020100000d010000010100d05b3519d4062c0f60d2e4e900755c30e9fa6df0782642be2e1482939a1b423b91019101&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;but i get an error:&#xD;&#xA;&#xD;&#xA;1001 would exhaust the block limits...&#xD;&#xA;&#xD;&#xA;It seems that the required call is too large to fit in a block? &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;  [1]: https://i.stack.imgur.com/aO4kJ.png" ContentLicense="CC BY-SA 4.0" />
  <row Id="45859" PostHistoryTypeId="2" PostId="11229" RevisionGUID="46c5a77c-89cd-4c32-a9bd-876bc1212f7f" CreationDate="2024-03-28T17:04:46.470" UserId="382" Text="I believe this fails because `pallet_xcm::execute()` [is configured with Weight::MAX](https://github.com/polkadot-fellows/runtimes/blob/2e269677dda059ac1085b4168a15d58912960a6e/relay/polkadot/src/weights/pallet_xcm.rs#L134) for Polkadot.&#xD;&#xA;&#xD;&#xA;This happens because Polkadot runtime is [configured to disallow executing](https://github.com/polkadot-fellows/runtimes/blob/2e269677dda059ac1085b4168a15d58912960a6e/relay/polkadot/src/xcm_config.rs#L298) arbitrary XCM messages.&#xD;&#xA;&#xD;&#xA;There is a [dedicated extrinsic for claiming assets](https://github.com/paritytech/polkadot-sdk/pull/3403) being rolled out with upcoming runtimes v1.2.0 release &amp; upgrade.&#xD;&#xA;&#xD;&#xA;Unfortunately, you will have to wait for the upgrade before being able to claim your trapped assets :(&#xD;&#xA;&#xD;&#xA;Either that, or go through governance, but I think that'll be even slower." ContentLicense="CC BY-SA 4.0" />
  <row Id="45861" PostHistoryTypeId="50" PostId="11086" RevisionGUID="fc3c5480-91b8-4a88-bf37-2e7a4bcfe21b" CreationDate="2024-03-28T23:01:10.160" UserId="-1" />
  <row Id="45862" PostHistoryTypeId="2" PostId="11230" RevisionGUID="dc94c237-38da-41f1-9029-d6024d100df4" CreationDate="2024-03-29T07:29:34.913" UserId="480" Text="Seems to rise from `substrate/client/transaction-pool/src/graph/base_pool.rs` but there's a lot going on there. &#xD;&#xA;&#xD;&#xA;Why might this warning be hit? How can it be resolved?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45864" PostHistoryTypeId="1" PostId="11230" RevisionGUID="dc94c237-38da-41f1-9029-d6024d100df4" CreationDate="2024-03-29T07:29:34.913" UserId="480" Text="What does `Failed to promote during pruning` mean exactly? Why might one be seeing that in their node logs?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45865" PostHistoryTypeId="3" PostId="11230" RevisionGUID="dc94c237-38da-41f1-9029-d6024d100df4" CreationDate="2024-03-29T07:29:34.913" UserId="480" Text="|log|pruning|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45866" PostHistoryTypeId="2" PostId="11231" RevisionGUID="81b41fe7-fe2a-45ce-bc66-de0e7fb5a0cf" CreationDate="2024-03-29T10:03:40.553" UserId="5261" Text="I am facing with the following issue:&#xD;&#xA;There might be a future need of changing the configuration for the reward curve for validator. I believe this is possible only be changing the linear piece wise construct in the runtime via the appropriate macro. This implies that a runtime upgrade is necessary for having the configuration active on the network.&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Question: Is there a way to achieve a similar end result without the need of a runtime upgrade?&#xD;&#xA; " ContentLicense="CC BY-SA 4.0" />
  <row Id="45868" PostHistoryTypeId="1" PostId="11231" RevisionGUID="81b41fe7-fe2a-45ce-bc66-de0e7fb5a0cf" CreationDate="2024-03-29T10:03:40.553" UserId="5261" Text="Validator Reward curve tweaking without runtime upgrade" ContentLicense="CC BY-SA 4.0" />
  <row Id="45869" PostHistoryTypeId="3" PostId="11231" RevisionGUID="81b41fe7-fe2a-45ce-bc66-de0e7fb5a0cf" CreationDate="2024-03-29T10:03:40.553" UserId="5261" Text="|runtime|rewards|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45870" PostHistoryTypeId="2" PostId="11232" RevisionGUID="4eb0e594-272d-4340-9169-751f0211f709" CreationDate="2024-03-29T13:01:13.340" UserId="5154" Text="I want to send JSON or normal String Message from Parachain to relay chain but i new in the substrate and I am finding it difficult.&#xD;&#xA;I am using the Polkadot-sdk template for relaychain and substrate-parachain-template for parachain. Both are connected but I don't how to transfer data using XCM." ContentLicense="CC BY-SA 4.0" />
  <row Id="45872" PostHistoryTypeId="1" PostId="11232" RevisionGUID="4eb0e594-272d-4340-9169-751f0211f709" CreationDate="2024-03-29T13:01:13.340" UserId="5154" Text="I want to Send Json to relaychain from parachain?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45873" PostHistoryTypeId="3" PostId="11232" RevisionGUID="4eb0e594-272d-4340-9169-751f0211f709" CreationDate="2024-03-29T13:01:13.340" UserId="5154" Text="|substrate-node-template|polkadot-js|polkadot|xcm|polkadot-sdk|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45874" PostHistoryTypeId="2" PostId="11233" RevisionGUID="43c53ec9-f647-499a-b3b0-20edcc47ec95" CreationDate="2024-03-29T13:44:07.250" UserId="4805" Text="I'm using Polkadot.js API and I have some bytes that represent a call (similar to what you get from `tx.method.toHex()`, that don't have the encoding details embedded into it: `0x00071054657374`&#xD;&#xA;&#xD;&#xA;I found a really rough way to get the SCALE encoded version of this call (what I would get if I do `tx.toHex()` for example) with the following approach:&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;const scaleEncodedTx = 0x + BytesLengthInHex + 04 + OriginalBytes&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;According to this, the result is `0x200400071054657374` which is correct. `BytesLengthInHex` is `20` (32 in decimal) as `0x00071054657374` has a hex-length of 16. I force the version to `04`, and then the original bytes without the `0x`.&#xD;&#xA;&#xD;&#xA;Is there a more straightforward way using the API? &#xD;&#xA;&#xD;&#xA;I spent some time trying to do this by creating types but could not find the proper one." ContentLicense="CC BY-SA 4.0" />
  <row Id="45876" PostHistoryTypeId="1" PostId="11233" RevisionGUID="43c53ec9-f647-499a-b3b0-20edcc47ec95" CreationDate="2024-03-29T13:44:07.250" UserId="4805" Text="SCALE Encode Tx Bytes using Polkadt.js SDK" ContentLicense="CC BY-SA 4.0" />
  <row Id="45877" PostHistoryTypeId="3" PostId="11233" RevisionGUID="43c53ec9-f647-499a-b3b0-20edcc47ec95" CreationDate="2024-03-29T13:44:07.250" UserId="4805" Text="|polkadot-js|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45878" PostHistoryTypeId="2" PostId="11234" RevisionGUID="a1b8d5b2-c665-4f01-babc-9503b3d3a579" CreationDate="2024-03-29T14:20:25.787" UserId="2844" Text="I am trying to running collator node by using [this tutorial](https://docs.substrate.io/tutorials/build-a-parachain/acquire-a-testnet-slot/), I have secured testnet and everything is configured by my side but the issue is just `#1` block produce but it is not finalizing. Can someone please point out what I am doing wrong?&#xD;&#xA;&#xD;&#xA;[log file](https://drive.google.com/file/d/1NDIgBkrjaBMdMnyI6wplY9-zIJm8IGxC/view?usp=drive_link)&#xD;&#xA;&#xD;&#xA;    aca707cb07750275f47ff8e939ba pov_hash=0xb442d6f6682fead92dc844caa0b9ac74ecf7a39c5fe61c55eb51b59a3e192967 traceID=171825202696515333740378575547046500615&#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWCQnDeELzhGBrc6zmsuTT6wkaquqCKyVc62GLCQptDph4 from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWQ5vi4RDbNk7yomsmbK7T29qCHn5odVgSsqXBEVoxKjgc from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWCH6iag326rbQoudrz7uu3XrZPZZo2caiQA732i12JnRa from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWA8Axi4Kpco6C23oi5UmaNXNf8xWefhRCe3dUxLLB7yGq from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWDNh3a8CkZbtNonPiEpjjnrew9jASbMWq5EJ3LUqkF1DQ from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWKAaBLGjMbG5WmndYHMTYB2aeuYcGVvQnpHqCZeDGVuY8 from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWDHNutH9RQNC945HHjokYK3cbHzjQBJTzi7fYQUbkS9uN from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWFLjtSmQBj6XtqPGMtKyNRAoZ1HK6iaVwhUTAncee8DZE from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWBhsJ9jn7ydL6uc91BRFYCqZp1cxfcs3H5VjhvVnUdm5i from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWQjdm56qV6NmgFm9Ao2tQPhc8sNJe9LSSoBVNc8eNKF3E from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:16.659  WARN tokio-runtime-worker peerset: [Relaychain] Trying to remove unknown reserved node 12D3KooWPc7TGVfwXfw8Sh9opDwQZNXcTiWL4FCuFFZccZfEcQ1a from SetId(3).    &#xD;&#xA;    2024-03-29 18:38:17.415  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (9 peers), best: #552257 (0x59db…74be), finalized #552255 (0xff89…2819), ⬇ 21.0kiB/s ⬆ 28.8kiB/s    &#xD;&#xA;    2024-03-29 18:38:17.589  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #1 (0x17e1…956f), finalized #0 (0xf953…4cee), ⬇ 0 ⬆ 0    &#xD;&#xA;    2024-03-29 18:38:18.465  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #552258 (0xf0bd…9854)    &#xD;&#xA;    2024-03-29 18:38:22.420  INFO tokio-runtime-worker substrate: [Relaychain]  Idle (9 peers), best: #552258 (0xf0bd…9854), finalized #552256 (0xdb0c…d2f4), ⬇ 23.7kiB/s ⬆ 24.8kiB/s    &#xD;&#xA;    2024-03-29 18:38:22.595  INFO tokio-runtime-worker substrate: [Parachain]  Idle (0 peers), best: #1 (0x17e1…956f), finalized #0 (0xf953…4cee), ⬇ 0 ⬆ 0    &#xD;&#xA;    2024-03-29 18:38:24.399  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #552259 (0x89c5…8219)    &#xD;&#xA;    2024-03-29 18:38:24.401  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Starting consensus session on top of parent 0xf953cea773de03ece1590192daad3cb02a0fdb2cf140d4482a4b69cfdf424cee    &#xD;&#xA;    2024-03-29 18:38:24.402 DEBUG tokio-runtime-worker basic-authorship: [Parachain] Attempting to push transactions from the pool.    &#xD;&#xA;    2024-03-29 18:38:24.402 DEBUG tokio-runtime-worker basic-authorship: [Parachain] Pool status: PoolStatus { ready: 0, ready_bytes: 0, future: 0, future_bytes: 0 }    &#xD;&#xA;    2024-03-29 18:38:24.402 DEBUG tokio-runtime-worker basic-authorship: [Parachain] No more transactions, proceeding with proposing.    &#xD;&#xA;    2024-03-29 18:38:24.403  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain]  Prepared block for proposing at 1 (2 ms) [hash: 0x88261469bd89fbf8d45538e2dbb5cacc80e3a1c8c34a7e759eb76b82934773b6; parent_hash: 0xf953…4cee; extrinsics (2): [0x785e…5feb, 0xd184…ea39]    &#xD;&#xA;    2024-03-29 18:38:24.406  INFO tokio-runtime-worker aura::cumulus: [Parachain]  Pre-sealed block for proposal at 1. Hash now 0xf1aa3799046d5986179e0546da4db783ac5faf4b19660f26c3167771be298bcc, previously 0x88261469bd89fbf8d45538e2dbb5cacc80e3a1c8c34a7e759eb76b82934773b6.&#xD;&#xA;    2024-03-29 18:38:24.408  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0xf1aa…8bcc)    &#xD;&#xA;    2024-03-29 18:38:24.408  INFO tokio-runtime-worker aura::cumulus: [Parachain] PoV size { header: 0.2197265625kb, extrinsics: 3.5029296875kb, storage_proof: 2.6513671875kb }&#xD;&#xA;    2024-03-29 18:38:24.408  INFO tokio-runtime-worker aura::cumulus: [Parachain] Compressed PoV size: 5.490234375kb" ContentLicense="CC BY-SA 4.0" />
  <row Id="45880" PostHistoryTypeId="1" PostId="11234" RevisionGUID="a1b8d5b2-c665-4f01-babc-9503b3d3a579" CreationDate="2024-03-29T14:20:25.787" UserId="2844" Text="Why my collator node produce only #1 block and not finalize it?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45881" PostHistoryTypeId="3" PostId="11234" RevisionGUID="a1b8d5b2-c665-4f01-babc-9503b3d3a579" CreationDate="2024-03-29T14:20:25.787" UserId="2844" Text="|substrate-parachain-template|collator|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45882" PostHistoryTypeId="50" PostId="7419" RevisionGUID="50808a87-e124-4a57-b400-e4077da4d888" CreationDate="2024-03-29T19:09:16.093" UserId="-1" />
  <row Id="45883" PostHistoryTypeId="50" PostId="9088" RevisionGUID="b989c876-9b47-4fa8-98d5-5044bcb9efb4" CreationDate="2024-03-29T21:02:15.187" UserId="-1" />
  <row Id="45884" PostHistoryTypeId="50" PostId="10115" RevisionGUID="b3c4ed6c-b59f-4323-b7cd-416c9239818d" CreationDate="2024-03-30T08:01:35.333" UserId="-1" />
  <row Id="45885" PostHistoryTypeId="2" PostId="11235" RevisionGUID="4f1149e4-8a14-4fc5-9c9e-4645272b718b" CreationDate="2024-03-30T11:25:51.457" UserId="1950" Text="I have a struct declaration in Substrate Pallet as follows&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct RealEstateValues {&#xD;&#xA;	pub current_fraction: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have a function to split an Asset written in the same substrate pallet as follows&#xD;&#xA;```&#xD;&#xA;#[pallet::call_index(26)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::split())]&#xD;&#xA;		pub fn split(&#xD;&#xA;			sender_origin: OriginFor&lt;T&gt;,&#xD;&#xA;			collection_id: T::CollectionId,&#xD;&#xA;			item_id: T::ItemId,&#xD;&#xA;			key: BoundedVec&lt;u8, T::KeyLimit&gt;,&#xD;&#xA;			num_of_splits: u32,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;&#xD;&#xA;			// TODO: Move this to config or storage&#xD;&#xA;			let property_key = &quot;realEstateData&quot;;&#xD;&#xA;			let maximum_splits: u32 = 52u32;&#xD;&#xA;&#xD;&#xA;			// ensure!(num_of_splits.le(&amp;maximum_splits), Error::&lt;T, I&gt;::ExceedsMaxSplits);&#xD;&#xA;&#xD;&#xA;			let property_key: BoundedVec&lt;u8, ConstU32&lt;32&gt;&gt;  =&#xD;&#xA;				BoundedVec::try_from(property_key.as_bytes().to_vec()).map_err(|_| Error::&lt;T, I&gt;::ErrorConvertingKey)?;&#xD;&#xA;&#xD;&#xA;			ensure!(key == property_key, Error::&lt;T, I&gt;::InvalidKey);&#xD;&#xA;&#xD;&#xA;			let origin = ensure_signed(sender_origin.clone())?;&#xD;&#xA;&#xD;&#xA;			let item_metadata = ItemMetadataOf::&lt;T, I&gt;::get(collection_id, item_id).ok_or(Error::&lt;T, I&gt;::MetadataMissingForItem)?;&#xD;&#xA;			let item_attribute = Attribute::&lt;T, I&gt;::get((collection_id, Some(item_id), &amp;key)).ok_or(Error::&lt;T, I&gt;::AttributesMissingForItem)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			let real_estate_value = item_attribute.0.clone();&#xD;&#xA;&#xD;&#xA;			let item_attribute_vec = real_estate_value.to_vec();&#xD;&#xA;			let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;item_attribute_vec[..]).map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;&#xD;&#xA;			//  ***********************************************************************************&#xD;&#xA;&#xD;&#xA;			// ***********************************************************************************&#xD;&#xA;&#xD;&#xA;			ensure!(num_of_splits.saturating_mul(real_estate_value_json.current_fraction).le(&amp;maximum_splits), Error::&lt;T, I&gt;::ExceedsMaxSplits);&#xD;&#xA;&#xD;&#xA;			let new_real_estate_values = RealEstateValues {&#xD;&#xA;				current_fraction: num_of_splits,&#xD;&#xA;&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			let new_real_estate_values_bounded_vec: BoundedVec&lt;u8, T::ValueLimit&gt; =  Encode::encode(&amp;new_real_estate_values).try_into().unwrap();//new_real_estate_values.encode().try_into().unwrap();&#xD;&#xA;			//   let p = serde_json::to_string(&amp;new_real_estate_values).unwrap();&#xD;&#xA;			// // let new_real_estate_values_bounded_vec: BoundedVec&lt;u8, T::ValueLimit&gt; = p.as_bytes();&#xD;&#xA;			let  mut current_item_id = CurrentItemItByCollection::&lt;T, I&gt;::get(collection_id).ok_or(Error::&lt;T, I&gt;::UnknownItem)?;&#xD;&#xA;&#xD;&#xA;			let parent_item_id = current_item_id;&#xD;&#xA;&#xD;&#xA;			let mut new_item_ids = Vec::with_capacity(num_of_splits as usize);&#xD;&#xA;&#xD;&#xA;			for _ in 0..num_of_splits  {&#xD;&#xA;&#xD;&#xA;				let  next_nft_id = &lt;T as Config&lt;I&gt;&gt;::ItemId::from(current_item_id.into() + 1);&#xD;&#xA;&#xD;&#xA;				new_item_ids.push(next_nft_id);&#xD;&#xA;&#xD;&#xA;				Self::do_mint(collection_id, next_nft_id, origin.clone(), |collection_details| {&#xD;&#xA;					if collection_details.issuer != origin {&#xD;&#xA;						return Err(Error::&lt;T, I&gt;::NoPermission.into());&#xD;&#xA;					}&#xD;&#xA;					Ok(())&#xD;&#xA;				})?;&#xD;&#xA;&#xD;&#xA;				Self::deposit_event(Event::NewItemMinted { collection_id, item_id: next_nft_id, owner:origin.clone() });&#xD;&#xA;&#xD;&#xA;				Self::set_metadata(&#xD;&#xA;					sender_origin.clone(),&#xD;&#xA;					collection_id,&#xD;&#xA;					next_nft_id,&#xD;&#xA;					item_metadata.data.clone(),&#xD;&#xA;					false,&#xD;&#xA;				)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				Self::set_attribute(&#xD;&#xA;					sender_origin.clone(),&#xD;&#xA;					collection_id,&#xD;&#xA;					Some(next_nft_id),&#xD;&#xA;					key.clone(),&#xD;&#xA;					new_real_estate_values_bounded_vec.clone(),&#xD;&#xA;				)?;&#xD;&#xA;&#xD;&#xA;				current_item_id = next_nft_id;&#xD;&#xA;			}&#xD;&#xA;			CurrentItemItByCollection::&lt;T, I&gt;::set(collection_id, Some(current_item_id));&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ItemSplit {&#xD;&#xA;				parent_collection_id: collection_id,&#xD;&#xA;				parent_item_id: item_id,&#xD;&#xA;				num_of_splits,&#xD;&#xA;				new_item_ids,&#xD;&#xA;				owner: origin.clone(),&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			// Burn parent NFT on success&#xD;&#xA;&#xD;&#xA;			Self::do_burn(collection_id, parent_item_id, |collection_details, details| {&#xD;&#xA;				let is_permitted = collection_details.admin == origin || details.owner == origin;&#xD;&#xA;				ensure!(is_permitted, Error::&lt;T, I&gt;::NoPermission);&#xD;&#xA;				Ok(())&#xD;&#xA;			})?;&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::Burned { collection: collection_id, item: parent_item_id, owner: origin });&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the corresponding test&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn split_should_work() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		Balances::make_free_balance_be(&amp;1, 100_000);&#xD;&#xA;		let key_str = &quot;realEstateData&quot;;&#xD;&#xA;		let key_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; =key_str.as_bytes().to_vec().try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		let mut item_id = 1u32;&#xD;&#xA;		let collection_id = 1u32;&#xD;&#xA;&#xD;&#xA;		println!(&quot;real_estate_values: {:?}&quot;, real_estate_values);&#xD;&#xA;&#xD;&#xA;		let json_data = serde_json::json!({&#xD;&#xA;			&quot;current_fraction&quot;: 1,&#xD;&#xA;		});&#xD;&#xA;&#xD;&#xA;		// Serialize the JSON data to bytes&#xD;&#xA;		let serialized_json = serde_json::to_vec(&amp;json_data).unwrap();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = serialized_json.try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		// let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = serde_json::to_string(&amp;real_estate_values).unwrap().as_bytes().to_vec().try_into().unwrap();&#xD;&#xA;		// let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = Encode::encode(&amp;real_estate_values).try_into().unwrap();&#xD;&#xA;		println!(&quot;real_estate_values_bounded_vec: {:?}&quot;, real_estate_values_bounded_vec);&#xD;&#xA;		let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;real_estate_values_bounded_vec[..]).unwrap();&#xD;&#xA;		println!(&quot;real_estate_value_json: {:?}&quot;, real_estate_value_json);&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::create(RuntimeOrigin::signed(1), collection_id, 1));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::mint(RuntimeOrigin::signed(1), collection_id, item_id, 1));&#xD;&#xA;&#xD;&#xA;		// Sets Metadata&#xD;&#xA;		assert_ok!(Uniques::set_metadata(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			item_id,&#xD;&#xA;			bvec![0, 0],&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		// Sets Attributes&#xD;&#xA;		assert_ok!(Uniques::set_attribute(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			Some(item_id),&#xD;&#xA;			key_bounded_vec.clone(),&#xD;&#xA;			real_estate_values_bounded_vec&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::set_price(RuntimeOrigin::signed(1), collection_id, item_id, Some(400), None));&#xD;&#xA;		assert_ok!(Uniques::set_metadata(RuntimeOrigin::signed(1), collection_id, item_id, bvec![42, 42], false));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::split(RuntimeOrigin::signed(1), collection_id, item_id, key_bounded_vec.clone(), 4));&#xD;&#xA;&#xD;&#xA;		item_id += 1;&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::set_metadata(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			item_id,&#xD;&#xA;			bvec![0, 0],&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_noop!(&#xD;&#xA;			Uniques::split(RuntimeOrigin::signed(1), collection_id, item_id, key_bounded_vec, 14),&#xD;&#xA;			Error::&lt;Test&gt;::ExceedsMaxSplits&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So when I do&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;item_attribute_vec[..]).map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when I try to use serde or serde_json dependency it throws an error when Im compiling substrate &#xD;&#xA;&#xD;&#xA;It correctly sets current_fraction value &#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45887" PostHistoryTypeId="1" PostId="11235" RevisionGUID="4f1149e4-8a14-4fc5-9c9e-4645272b718b" CreationDate="2024-03-30T11:25:51.457" UserId="1950" Text="How to construct a data structure using a bytearray inside a Substrate Pallet?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45888" PostHistoryTypeId="3" PostId="11235" RevisionGUID="4f1149e4-8a14-4fc5-9c9e-4645272b718b" CreationDate="2024-03-30T11:25:51.457" UserId="1950" Text="|serde|serde-json|" ContentLicense="CC BY-SA 4.0" />
  <row Id="45889" PostHistoryTypeId="5" PostId="11235" RevisionGUID="656682d3-d722-448b-8475-08bf8d215623" CreationDate="2024-03-30T11:38:47.420" UserId="1950" Comment="added 476 characters in body" Text="I have a struct declaration in Substrate Pallet as follows&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct RealEstateValues {&#xD;&#xA;	pub current_fraction: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have a function to split an Asset written in the same substrate pallet as follows&#xD;&#xA;```&#xD;&#xA;#[pallet::call_index(26)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::split())]&#xD;&#xA;		pub fn split(&#xD;&#xA;			sender_origin: OriginFor&lt;T&gt;,&#xD;&#xA;			collection_id: T::CollectionId,&#xD;&#xA;			item_id: T::ItemId,&#xD;&#xA;			key: BoundedVec&lt;u8, T::KeyLimit&gt;,&#xD;&#xA;			num_of_splits: u32,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;&#xD;&#xA;			// TODO: Move this to config or storage&#xD;&#xA;			let property_key = &quot;realEstateData&quot;;&#xD;&#xA;			let maximum_splits: u32 = 52u32;&#xD;&#xA;&#xD;&#xA;			// ensure!(num_of_splits.le(&amp;maximum_splits), Error::&lt;T, I&gt;::ExceedsMaxSplits);&#xD;&#xA;&#xD;&#xA;			let property_key: BoundedVec&lt;u8, ConstU32&lt;32&gt;&gt;  =&#xD;&#xA;				BoundedVec::try_from(property_key.as_bytes().to_vec()).map_err(|_| Error::&lt;T, I&gt;::ErrorConvertingKey)?;&#xD;&#xA;&#xD;&#xA;			ensure!(key == property_key, Error::&lt;T, I&gt;::InvalidKey);&#xD;&#xA;&#xD;&#xA;			let origin = ensure_signed(sender_origin.clone())?;&#xD;&#xA;&#xD;&#xA;			let item_metadata = ItemMetadataOf::&lt;T, I&gt;::get(collection_id, item_id).ok_or(Error::&lt;T, I&gt;::MetadataMissingForItem)?;&#xD;&#xA;			let item_attribute = Attribute::&lt;T, I&gt;::get((collection_id, Some(item_id), &amp;key)).ok_or(Error::&lt;T, I&gt;::AttributesMissingForItem)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			let real_estate_value = item_attribute.0.clone();&#xD;&#xA;&#xD;&#xA;			let item_attribute_vec = real_estate_value.to_vec();&#xD;&#xA;			let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;item_attribute_vec[..]).map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;&#xD;&#xA;			//  ***********************************************************************************&#xD;&#xA;&#xD;&#xA;			// ***********************************************************************************&#xD;&#xA;&#xD;&#xA;			ensure!(num_of_splits.saturating_mul(real_estate_value_json.current_fraction).le(&amp;maximum_splits), Error::&lt;T, I&gt;::ExceedsMaxSplits);&#xD;&#xA;&#xD;&#xA;			let new_real_estate_values = RealEstateValues {&#xD;&#xA;				current_fraction: num_of_splits,&#xD;&#xA;&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			let new_real_estate_values_bounded_vec: BoundedVec&lt;u8, T::ValueLimit&gt; =  Encode::encode(&amp;new_real_estate_values).try_into().unwrap();//new_real_estate_values.encode().try_into().unwrap();&#xD;&#xA;			//   let p = serde_json::to_string(&amp;new_real_estate_values).unwrap();&#xD;&#xA;			// // let new_real_estate_values_bounded_vec: BoundedVec&lt;u8, T::ValueLimit&gt; = p.as_bytes();&#xD;&#xA;			let  mut current_item_id = CurrentItemItByCollection::&lt;T, I&gt;::get(collection_id).ok_or(Error::&lt;T, I&gt;::UnknownItem)?;&#xD;&#xA;&#xD;&#xA;			let parent_item_id = current_item_id;&#xD;&#xA;&#xD;&#xA;			let mut new_item_ids = Vec::with_capacity(num_of_splits as usize);&#xD;&#xA;&#xD;&#xA;			for _ in 0..num_of_splits  {&#xD;&#xA;&#xD;&#xA;				let  next_nft_id = &lt;T as Config&lt;I&gt;&gt;::ItemId::from(current_item_id.into() + 1);&#xD;&#xA;&#xD;&#xA;				new_item_ids.push(next_nft_id);&#xD;&#xA;&#xD;&#xA;				Self::do_mint(collection_id, next_nft_id, origin.clone(), |collection_details| {&#xD;&#xA;					if collection_details.issuer != origin {&#xD;&#xA;						return Err(Error::&lt;T, I&gt;::NoPermission.into());&#xD;&#xA;					}&#xD;&#xA;					Ok(())&#xD;&#xA;				})?;&#xD;&#xA;&#xD;&#xA;				Self::deposit_event(Event::NewItemMinted { collection_id, item_id: next_nft_id, owner:origin.clone() });&#xD;&#xA;&#xD;&#xA;				Self::set_metadata(&#xD;&#xA;					sender_origin.clone(),&#xD;&#xA;					collection_id,&#xD;&#xA;					next_nft_id,&#xD;&#xA;					item_metadata.data.clone(),&#xD;&#xA;					false,&#xD;&#xA;				)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				Self::set_attribute(&#xD;&#xA;					sender_origin.clone(),&#xD;&#xA;					collection_id,&#xD;&#xA;					Some(next_nft_id),&#xD;&#xA;					key.clone(),&#xD;&#xA;					new_real_estate_values_bounded_vec.clone(),&#xD;&#xA;				)?;&#xD;&#xA;&#xD;&#xA;				current_item_id = next_nft_id;&#xD;&#xA;			}&#xD;&#xA;			CurrentItemItByCollection::&lt;T, I&gt;::set(collection_id, Some(current_item_id));&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ItemSplit {&#xD;&#xA;				parent_collection_id: collection_id,&#xD;&#xA;				parent_item_id: item_id,&#xD;&#xA;				num_of_splits,&#xD;&#xA;				new_item_ids,&#xD;&#xA;				owner: origin.clone(),&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			// Burn parent NFT on success&#xD;&#xA;&#xD;&#xA;			Self::do_burn(collection_id, parent_item_id, |collection_details, details| {&#xD;&#xA;				let is_permitted = collection_details.admin == origin || details.owner == origin;&#xD;&#xA;				ensure!(is_permitted, Error::&lt;T, I&gt;::NoPermission);&#xD;&#xA;				Ok(())&#xD;&#xA;			})?;&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::Burned { collection: collection_id, item: parent_item_id, owner: origin });&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the corresponding test&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn split_should_work() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		Balances::make_free_balance_be(&amp;1, 100_000);&#xD;&#xA;		let key_str = &quot;realEstateData&quot;;&#xD;&#xA;		let key_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; =key_str.as_bytes().to_vec().try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		let mut item_id = 1u32;&#xD;&#xA;		let collection_id = 1u32;&#xD;&#xA;&#xD;&#xA;		println!(&quot;real_estate_values: {:?}&quot;, real_estate_values);&#xD;&#xA;&#xD;&#xA;		let json_data = serde_json::json!({&#xD;&#xA;			&quot;current_fraction&quot;: 1,&#xD;&#xA;		});&#xD;&#xA;&#xD;&#xA;		// Serialize the JSON data to bytes&#xD;&#xA;		let serialized_json = serde_json::to_vec(&amp;json_data).unwrap();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = serialized_json.try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		// let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = serde_json::to_string(&amp;real_estate_values).unwrap().as_bytes().to_vec().try_into().unwrap();&#xD;&#xA;		// let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = Encode::encode(&amp;real_estate_values).try_into().unwrap();&#xD;&#xA;		println!(&quot;real_estate_values_bounded_vec: {:?}&quot;, real_estate_values_bounded_vec);&#xD;&#xA;		let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;real_estate_values_bounded_vec[..]).unwrap();&#xD;&#xA;		println!(&quot;real_estate_value_json: {:?}&quot;, real_estate_value_json);&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::create(RuntimeOrigin::signed(1), collection_id, 1));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::mint(RuntimeOrigin::signed(1), collection_id, item_id, 1));&#xD;&#xA;&#xD;&#xA;		// Sets Metadata&#xD;&#xA;		assert_ok!(Uniques::set_metadata(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			item_id,&#xD;&#xA;			bvec![0, 0],&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		// Sets Attributes&#xD;&#xA;		assert_ok!(Uniques::set_attribute(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			Some(item_id),&#xD;&#xA;			key_bounded_vec.clone(),&#xD;&#xA;			real_estate_values_bounded_vec&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::set_price(RuntimeOrigin::signed(1), collection_id, item_id, Some(400), None));&#xD;&#xA;		assert_ok!(Uniques::set_metadata(RuntimeOrigin::signed(1), collection_id, item_id, bvec![42, 42], false));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::split(RuntimeOrigin::signed(1), collection_id, item_id, key_bounded_vec.clone(), 4));&#xD;&#xA;&#xD;&#xA;		item_id += 1;&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::set_metadata(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			item_id,&#xD;&#xA;			bvec![0, 0],&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_noop!(&#xD;&#xA;			Uniques::split(RuntimeOrigin::signed(1), collection_id, item_id, key_bounded_vec, 14),&#xD;&#xA;			Error::&lt;Test&gt;::ExceedsMaxSplits&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So when I do&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;item_attribute_vec[..]).map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when I try to use serde or serde_json dependency it throws an error when Im compiling substrate &#xD;&#xA;&#xD;&#xA;it gives this error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error[E0152]: duplicate lang item in crate `std` (which `serde_json` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)&#xD;&#xA;    = note: first definition in `sp_io` &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I use this method in serde&#xD;&#xA;```&#xD;&#xA;let real_estate_value_json: RealEstateValues = from_slice(&amp;item_attribute_vec)&#xD;&#xA;				.map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;It correctly sets current_fraction value &#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45890" PostHistoryTypeId="5" PostId="11235" RevisionGUID="0cfdf6d3-bee3-4c33-8fb2-73c3c8f526c5" CreationDate="2024-03-30T12:00:50.510" UserId="1950" Comment="added 2 characters in body" Text="I have a struct declaration in Substrate Pallet as follows&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct RealEstateValues {&#xD;&#xA;	pub current_fraction: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have a function to split an Asset written in the same substrate pallet as follows&#xD;&#xA;```&#xD;&#xA;#[pallet::call_index(26)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::split())]&#xD;&#xA;		pub fn split(&#xD;&#xA;			sender_origin: OriginFor&lt;T&gt;,&#xD;&#xA;			collection_id: T::CollectionId,&#xD;&#xA;			item_id: T::ItemId,&#xD;&#xA;			key: BoundedVec&lt;u8, T::KeyLimit&gt;,&#xD;&#xA;			num_of_splits: u32,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;&#xD;&#xA;			// TODO: Move this to config or storage&#xD;&#xA;			let property_key = &quot;realEstateData&quot;;&#xD;&#xA;			let maximum_splits: u32 = 52u32;&#xD;&#xA;&#xD;&#xA;			// ensure!(num_of_splits.le(&amp;maximum_splits), Error::&lt;T, I&gt;::ExceedsMaxSplits);&#xD;&#xA;&#xD;&#xA;			let property_key: BoundedVec&lt;u8, ConstU32&lt;32&gt;&gt;  =&#xD;&#xA;				BoundedVec::try_from(property_key.as_bytes().to_vec()).map_err(|_| Error::&lt;T, I&gt;::ErrorConvertingKey)?;&#xD;&#xA;&#xD;&#xA;			ensure!(key == property_key, Error::&lt;T, I&gt;::InvalidKey);&#xD;&#xA;&#xD;&#xA;			let origin = ensure_signed(sender_origin.clone())?;&#xD;&#xA;&#xD;&#xA;			let item_metadata = ItemMetadataOf::&lt;T, I&gt;::get(collection_id, item_id).ok_or(Error::&lt;T, I&gt;::MetadataMissingForItem)?;&#xD;&#xA;			let item_attribute = Attribute::&lt;T, I&gt;::get((collection_id, Some(item_id), &amp;key)).ok_or(Error::&lt;T, I&gt;::AttributesMissingForItem)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			let real_estate_value = item_attribute.0.clone();&#xD;&#xA;&#xD;&#xA;			let item_attribute_vec = real_estate_value.to_vec();&#xD;&#xA;			let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;item_attribute_vec[..]).map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;&#xD;&#xA;			//  ***********************************************************************************&#xD;&#xA;&#xD;&#xA;			// ***********************************************************************************&#xD;&#xA;&#xD;&#xA;			ensure!(num_of_splits.saturating_mul(real_estate_value_json.current_fraction).le(&amp;maximum_splits), Error::&lt;T, I&gt;::ExceedsMaxSplits);&#xD;&#xA;&#xD;&#xA;			let new_real_estate_values = RealEstateValues {&#xD;&#xA;				current_fraction: num_of_splits,&#xD;&#xA;&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			let new_real_estate_values_bounded_vec: BoundedVec&lt;u8, T::ValueLimit&gt; =  Encode::encode(&amp;new_real_estate_values).try_into().unwrap();//new_real_estate_values.encode().try_into().unwrap();&#xD;&#xA;			//   let p = serde_json::to_string(&amp;new_real_estate_values).unwrap();&#xD;&#xA;			// // let new_real_estate_values_bounded_vec: BoundedVec&lt;u8, T::ValueLimit&gt; = p.as_bytes();&#xD;&#xA;			let  mut current_item_id = CurrentItemItByCollection::&lt;T, I&gt;::get(collection_id).ok_or(Error::&lt;T, I&gt;::UnknownItem)?;&#xD;&#xA;&#xD;&#xA;			let parent_item_id = current_item_id;&#xD;&#xA;&#xD;&#xA;			let mut new_item_ids = Vec::with_capacity(num_of_splits as usize);&#xD;&#xA;&#xD;&#xA;			for _ in 0..num_of_splits  {&#xD;&#xA;&#xD;&#xA;				let  next_nft_id = &lt;T as Config&lt;I&gt;&gt;::ItemId::from(current_item_id.into() + 1);&#xD;&#xA;&#xD;&#xA;				new_item_ids.push(next_nft_id);&#xD;&#xA;&#xD;&#xA;				Self::do_mint(collection_id, next_nft_id, origin.clone(), |collection_details| {&#xD;&#xA;					if collection_details.issuer != origin {&#xD;&#xA;						return Err(Error::&lt;T, I&gt;::NoPermission.into());&#xD;&#xA;					}&#xD;&#xA;					Ok(())&#xD;&#xA;				})?;&#xD;&#xA;&#xD;&#xA;				Self::deposit_event(Event::NewItemMinted { collection_id, item_id: next_nft_id, owner:origin.clone() });&#xD;&#xA;&#xD;&#xA;				Self::set_metadata(&#xD;&#xA;					sender_origin.clone(),&#xD;&#xA;					collection_id,&#xD;&#xA;					next_nft_id,&#xD;&#xA;					item_metadata.data.clone(),&#xD;&#xA;					false,&#xD;&#xA;				)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				Self::set_attribute(&#xD;&#xA;					sender_origin.clone(),&#xD;&#xA;					collection_id,&#xD;&#xA;					Some(next_nft_id),&#xD;&#xA;					key.clone(),&#xD;&#xA;					new_real_estate_values_bounded_vec.clone(),&#xD;&#xA;				)?;&#xD;&#xA;&#xD;&#xA;				current_item_id = next_nft_id;&#xD;&#xA;			}&#xD;&#xA;			CurrentItemItByCollection::&lt;T, I&gt;::set(collection_id, Some(current_item_id));&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ItemSplit {&#xD;&#xA;				parent_collection_id: collection_id,&#xD;&#xA;				parent_item_id: item_id,&#xD;&#xA;				num_of_splits,&#xD;&#xA;				new_item_ids,&#xD;&#xA;				owner: origin.clone(),&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			// Burn parent NFT on success&#xD;&#xA;&#xD;&#xA;			Self::do_burn(collection_id, parent_item_id, |collection_details, details| {&#xD;&#xA;				let is_permitted = collection_details.admin == origin || details.owner == origin;&#xD;&#xA;				ensure!(is_permitted, Error::&lt;T, I&gt;::NoPermission);&#xD;&#xA;				Ok(())&#xD;&#xA;			})?;&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::Burned { collection: collection_id, item: parent_item_id, owner: origin });&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the corresponding test&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn split_should_work() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		Balances::make_free_balance_be(&amp;1, 100_000);&#xD;&#xA;		let key_str = &quot;realEstateData&quot;;&#xD;&#xA;		let key_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; =key_str.as_bytes().to_vec().try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		let mut item_id = 1u32;&#xD;&#xA;		let collection_id = 1u32;&#xD;&#xA;&#xD;&#xA;		println!(&quot;real_estate_values: {:?}&quot;, real_estate_values);&#xD;&#xA;&#xD;&#xA;		let json_data = serde_json::json!({&#xD;&#xA;			&quot;current_fraction&quot;: 1,&#xD;&#xA;		});&#xD;&#xA;&#xD;&#xA;		// Serialize the JSON data to bytes&#xD;&#xA;		let serialized_json = serde_json::to_vec(&amp;json_data).unwrap();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = serialized_json.try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		// let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = serde_json::to_string(&amp;real_estate_values).unwrap().as_bytes().to_vec().try_into().unwrap();&#xD;&#xA;		// let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = Encode::encode(&amp;real_estate_values).try_into().unwrap();&#xD;&#xA;		println!(&quot;real_estate_values_bounded_vec: {:?}&quot;, real_estate_values_bounded_vec);&#xD;&#xA;		let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;real_estate_values_bounded_vec[..]).unwrap();&#xD;&#xA;		println!(&quot;real_estate_value_json: {:?}&quot;, real_estate_value_json);&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::create(RuntimeOrigin::signed(1), collection_id, 1));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::mint(RuntimeOrigin::signed(1), collection_id, item_id, 1));&#xD;&#xA;&#xD;&#xA;		// Sets Metadata&#xD;&#xA;		assert_ok!(Uniques::set_metadata(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			item_id,&#xD;&#xA;			bvec![0, 0],&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		// Sets Attributes&#xD;&#xA;		assert_ok!(Uniques::set_attribute(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			Some(item_id),&#xD;&#xA;			key_bounded_vec.clone(),&#xD;&#xA;			real_estate_values_bounded_vec&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::set_price(RuntimeOrigin::signed(1), collection_id, item_id, Some(400), None));&#xD;&#xA;		assert_ok!(Uniques::set_metadata(RuntimeOrigin::signed(1), collection_id, item_id, bvec![42, 42], false));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::split(RuntimeOrigin::signed(1), collection_id, item_id, key_bounded_vec.clone(), 4));&#xD;&#xA;&#xD;&#xA;		item_id += 1;&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::set_metadata(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			item_id,&#xD;&#xA;			bvec![0, 0],&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_noop!(&#xD;&#xA;			Uniques::split(RuntimeOrigin::signed(1), collection_id, item_id, key_bounded_vec, 14),&#xD;&#xA;			Error::&lt;Test&gt;::ExceedsMaxSplits&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So when I do&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;item_attribute_vec[..]).map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when I try to use serde or serde_json dependency it throws an error when Im compiling substrate &#xD;&#xA;&#xD;&#xA;it gives this error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error[E0152]: duplicate lang item in crate `std` (which `serde_json` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)&#xD;&#xA;    = note: first definition in `sp_io` &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I use this method in serde&#xD;&#xA;```&#xD;&#xA;let real_estate_value_json: RealEstateValues = from_slice(&amp;item_attribute_vec)&#xD;&#xA;				.map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;It incorrectly sets current_fraction value &#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45891" PostHistoryTypeId="5" PostId="11235" RevisionGUID="fb61fc4b-d3f1-4d06-b90b-8dd3a0ecfde4" CreationDate="2024-03-30T12:17:35.617" UserId="1950" Comment="added 58 characters in body" Text="I have a struct declaration in Substrate Pallet as follows&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Method implementations are inside Uniques pallet&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct RealEstateValues {&#xD;&#xA;	pub current_fraction: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have a function to split an Asset written in the same substrate pallet as follows&#xD;&#xA;```&#xD;&#xA;#[pallet::call_index(26)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::split())]&#xD;&#xA;		pub fn split(&#xD;&#xA;			sender_origin: OriginFor&lt;T&gt;,&#xD;&#xA;			collection_id: T::CollectionId,&#xD;&#xA;			item_id: T::ItemId,&#xD;&#xA;			key: BoundedVec&lt;u8, T::KeyLimit&gt;,&#xD;&#xA;			num_of_splits: u32,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;&#xD;&#xA;			// TODO: Move this to config or storage&#xD;&#xA;			let property_key = &quot;realEstateData&quot;;&#xD;&#xA;			let maximum_splits: u32 = 52u32;&#xD;&#xA;&#xD;&#xA;			// ensure!(num_of_splits.le(&amp;maximum_splits), Error::&lt;T, I&gt;::ExceedsMaxSplits);&#xD;&#xA;&#xD;&#xA;			let property_key: BoundedVec&lt;u8, ConstU32&lt;32&gt;&gt;  =&#xD;&#xA;				BoundedVec::try_from(property_key.as_bytes().to_vec()).map_err(|_| Error::&lt;T, I&gt;::ErrorConvertingKey)?;&#xD;&#xA;&#xD;&#xA;			ensure!(key == property_key, Error::&lt;T, I&gt;::InvalidKey);&#xD;&#xA;&#xD;&#xA;			let origin = ensure_signed(sender_origin.clone())?;&#xD;&#xA;&#xD;&#xA;			let item_metadata = ItemMetadataOf::&lt;T, I&gt;::get(collection_id, item_id).ok_or(Error::&lt;T, I&gt;::MetadataMissingForItem)?;&#xD;&#xA;			let item_attribute = Attribute::&lt;T, I&gt;::get((collection_id, Some(item_id), &amp;key)).ok_or(Error::&lt;T, I&gt;::AttributesMissingForItem)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			let real_estate_value = item_attribute.0.clone();&#xD;&#xA;&#xD;&#xA;			let item_attribute_vec = real_estate_value.to_vec();&#xD;&#xA;			let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;item_attribute_vec[..]).map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;&#xD;&#xA;			//  ***********************************************************************************&#xD;&#xA;&#xD;&#xA;			// ***********************************************************************************&#xD;&#xA;&#xD;&#xA;			ensure!(num_of_splits.saturating_mul(real_estate_value_json.current_fraction).le(&amp;maximum_splits), Error::&lt;T, I&gt;::ExceedsMaxSplits);&#xD;&#xA;&#xD;&#xA;			let new_real_estate_values = RealEstateValues {&#xD;&#xA;				current_fraction: num_of_splits,&#xD;&#xA;&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			let new_real_estate_values_bounded_vec: BoundedVec&lt;u8, T::ValueLimit&gt; =  Encode::encode(&amp;new_real_estate_values).try_into().unwrap();//new_real_estate_values.encode().try_into().unwrap();&#xD;&#xA;			//   let p = serde_json::to_string(&amp;new_real_estate_values).unwrap();&#xD;&#xA;			// // let new_real_estate_values_bounded_vec: BoundedVec&lt;u8, T::ValueLimit&gt; = p.as_bytes();&#xD;&#xA;			let  mut current_item_id = CurrentItemItByCollection::&lt;T, I&gt;::get(collection_id).ok_or(Error::&lt;T, I&gt;::UnknownItem)?;&#xD;&#xA;&#xD;&#xA;			let parent_item_id = current_item_id;&#xD;&#xA;&#xD;&#xA;			let mut new_item_ids = Vec::with_capacity(num_of_splits as usize);&#xD;&#xA;&#xD;&#xA;			for _ in 0..num_of_splits  {&#xD;&#xA;&#xD;&#xA;				let  next_nft_id = &lt;T as Config&lt;I&gt;&gt;::ItemId::from(current_item_id.into() + 1);&#xD;&#xA;&#xD;&#xA;				new_item_ids.push(next_nft_id);&#xD;&#xA;&#xD;&#xA;				Self::do_mint(collection_id, next_nft_id, origin.clone(), |collection_details| {&#xD;&#xA;					if collection_details.issuer != origin {&#xD;&#xA;						return Err(Error::&lt;T, I&gt;::NoPermission.into());&#xD;&#xA;					}&#xD;&#xA;					Ok(())&#xD;&#xA;				})?;&#xD;&#xA;&#xD;&#xA;				Self::deposit_event(Event::NewItemMinted { collection_id, item_id: next_nft_id, owner:origin.clone() });&#xD;&#xA;&#xD;&#xA;				Self::set_metadata(&#xD;&#xA;					sender_origin.clone(),&#xD;&#xA;					collection_id,&#xD;&#xA;					next_nft_id,&#xD;&#xA;					item_metadata.data.clone(),&#xD;&#xA;					false,&#xD;&#xA;				)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				Self::set_attribute(&#xD;&#xA;					sender_origin.clone(),&#xD;&#xA;					collection_id,&#xD;&#xA;					Some(next_nft_id),&#xD;&#xA;					key.clone(),&#xD;&#xA;					new_real_estate_values_bounded_vec.clone(),&#xD;&#xA;				)?;&#xD;&#xA;&#xD;&#xA;				current_item_id = next_nft_id;&#xD;&#xA;			}&#xD;&#xA;			CurrentItemItByCollection::&lt;T, I&gt;::set(collection_id, Some(current_item_id));&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ItemSplit {&#xD;&#xA;				parent_collection_id: collection_id,&#xD;&#xA;				parent_item_id: item_id,&#xD;&#xA;				num_of_splits,&#xD;&#xA;				new_item_ids,&#xD;&#xA;				owner: origin.clone(),&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			// Burn parent NFT on success&#xD;&#xA;&#xD;&#xA;			Self::do_burn(collection_id, parent_item_id, |collection_details, details| {&#xD;&#xA;				let is_permitted = collection_details.admin == origin || details.owner == origin;&#xD;&#xA;				ensure!(is_permitted, Error::&lt;T, I&gt;::NoPermission);&#xD;&#xA;				Ok(())&#xD;&#xA;			})?;&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::Burned { collection: collection_id, item: parent_item_id, owner: origin });&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the corresponding test&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn split_should_work() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		Balances::make_free_balance_be(&amp;1, 100_000);&#xD;&#xA;		let key_str = &quot;realEstateData&quot;;&#xD;&#xA;		let key_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; =key_str.as_bytes().to_vec().try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		let mut item_id = 1u32;&#xD;&#xA;		let collection_id = 1u32;&#xD;&#xA;&#xD;&#xA;		println!(&quot;real_estate_values: {:?}&quot;, real_estate_values);&#xD;&#xA;&#xD;&#xA;		let json_data = serde_json::json!({&#xD;&#xA;			&quot;current_fraction&quot;: 1,&#xD;&#xA;		});&#xD;&#xA;&#xD;&#xA;		// Serialize the JSON data to bytes&#xD;&#xA;		let serialized_json = serde_json::to_vec(&amp;json_data).unwrap();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = serialized_json.try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		// let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = serde_json::to_string(&amp;real_estate_values).unwrap().as_bytes().to_vec().try_into().unwrap();&#xD;&#xA;		// let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = Encode::encode(&amp;real_estate_values).try_into().unwrap();&#xD;&#xA;		println!(&quot;real_estate_values_bounded_vec: {:?}&quot;, real_estate_values_bounded_vec);&#xD;&#xA;		let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;real_estate_values_bounded_vec[..]).unwrap();&#xD;&#xA;		println!(&quot;real_estate_value_json: {:?}&quot;, real_estate_value_json);&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::create(RuntimeOrigin::signed(1), collection_id, 1));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::mint(RuntimeOrigin::signed(1), collection_id, item_id, 1));&#xD;&#xA;&#xD;&#xA;		// Sets Metadata&#xD;&#xA;		assert_ok!(Uniques::set_metadata(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			item_id,&#xD;&#xA;			bvec![0, 0],&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		// Sets Attributes&#xD;&#xA;		assert_ok!(Uniques::set_attribute(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			Some(item_id),&#xD;&#xA;			key_bounded_vec.clone(),&#xD;&#xA;			real_estate_values_bounded_vec&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::set_price(RuntimeOrigin::signed(1), collection_id, item_id, Some(400), None));&#xD;&#xA;		assert_ok!(Uniques::set_metadata(RuntimeOrigin::signed(1), collection_id, item_id, bvec![42, 42], false));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::split(RuntimeOrigin::signed(1), collection_id, item_id, key_bounded_vec.clone(), 4));&#xD;&#xA;&#xD;&#xA;		item_id += 1;&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::set_metadata(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			item_id,&#xD;&#xA;			bvec![0, 0],&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_noop!(&#xD;&#xA;			Uniques::split(RuntimeOrigin::signed(1), collection_id, item_id, key_bounded_vec, 14),&#xD;&#xA;			Error::&lt;Test&gt;::ExceedsMaxSplits&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So when I do&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;item_attribute_vec[..]).map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when I try to use serde or serde_json dependency it throws an error when Im compiling substrate &#xD;&#xA;&#xD;&#xA;it gives this error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error[E0152]: duplicate lang item in crate `std` (which `serde_json` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)&#xD;&#xA;    = note: first definition in `sp_io` &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I use this method in serde&#xD;&#xA;```&#xD;&#xA;let real_estate_value_json: RealEstateValues = from_slice(&amp;item_attribute_vec)&#xD;&#xA;				.map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;It incorrectly sets current_fraction value &#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45892" PostHistoryTypeId="2" PostId="11236" RevisionGUID="37149799-0ea5-4bf0-974f-deb97f6855dd" CreationDate="2024-03-30T15:28:40.677" UserId="94" Text="I dont quite understand what you are doing, but it looks like a mixing of the `Serialize` and `Deserialize` traits from `serde` with the `Encode` and `Decode` traits from `SCALE`.  &#xD;&#xA;There should be no JSON or `serde` needed in your runtime, just SCALE decode. It is simpler and has deterministic encoding for values.&#xD;&#xA;&#xD;&#xA;Some example:&#xD;&#xA;```rust&#xD;&#xA;#[test]&#xD;&#xA;fn encode_decode() {&#xD;&#xA;	use codec::{Encode, Decode};&#xD;&#xA;	use sp_runtime::Perbill;&#xD;&#xA;&#xD;&#xA;	#[derive(Encode, Decode)]&#xD;&#xA;	struct Value {&#xD;&#xA;		current_fraction: Perbill,&#xD;&#xA;	}&#xD;&#xA;	let value = Value { current_fraction: Perbill::from_percent(10) };&#xD;&#xA;&#xD;&#xA;	// encoding is infallible&#xD;&#xA;	let encoded_value = Value::encode(&amp;value);&#xD;&#xA;&#xD;&#xA;	// Decode the value again:&#xD;&#xA;	match Value::decode(&amp;mut &amp;encoded_value[..]) {&#xD;&#xA;		Ok(decoded_value) =&gt; {&#xD;&#xA;			assert_eq!(decoded_value.current_fraction, Perbill::from_percent(10))&#xD;&#xA;		},&#xD;&#xA;		Err(e) =&gt; /* handle error ... */,&#xD;&#xA;	}&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Also note that there exist types like `Perbill` or `FixedU64` to represent fractions for your convenience." ContentLicense="CC BY-SA 4.0" />
  <row Id="45894" PostHistoryTypeId="50" PostId="6410" RevisionGUID="938e157c-2d33-4353-a627-d73b01e1c2e4" CreationDate="2024-03-30T17:06:20.743" UserId="-1" />
  <row Id="45895" PostHistoryTypeId="5" PostId="11235" RevisionGUID="ad7aa5a7-3f37-48fe-9752-34c75546007f" CreationDate="2024-03-30T20:33:25.630" UserId="1950" Comment="added 846 characters in body" Text="I have a struct declaration in Substrate Pallet as follows&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Method implementations are inside Uniques pallet&#xD;&#xA;&#xD;&#xA;The flow&#xD;&#xA;&#xD;&#xA; * an NFT gets minted&#xD;&#xA; * Sets Attributes for the minted NFT&#xD;&#xA; * attribute value passed as a JSON &#xD;&#xA; * Inside the split method, requires to get the attribute for the NFT&#xD;&#xA; * modify current_fraction to another value &#xD;&#xA; * Save the attribute&#xD;&#xA;&#xD;&#xA;Uniques pallet's set_attribute function&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;pub fn set_attribute(&#xD;&#xA;			origin: OriginFor&lt;T&gt;,&#xD;&#xA;			collection: T::CollectionId,&#xD;&#xA;			maybe_item: Option&lt;T::ItemId&gt;,&#xD;&#xA;			key: BoundedVec&lt;u8, T::KeyLimit&gt;,&#xD;&#xA;			value: BoundedVec&lt;u8, T::ValueLimit&gt;,&#xD;&#xA;		)&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So if I pass a JSON like `{ current_fraction: 1 }` from polkadot App, the value of  `value: BoundedVec&lt;u8, T::ValueLimit&gt;,` is `[123, 34, 99, 117, 114, 114, 101, 110, 116, 95, 102, 114, 97, 99, 116, 105, 111, 110, 34, 58, 49, 125]` , &#xD;&#xA;&#xD;&#xA;So this is the value I need to retrieve , reconstruct the object, modify its value and saves it&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct RealEstateValues {&#xD;&#xA;	pub current_fraction: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I have a function to split an Asset written in the same substrate pallet as follows&#xD;&#xA;```&#xD;&#xA;#[pallet::call_index(26)]&#xD;&#xA;		#[pallet::weight(T::WeightInfo::split())]&#xD;&#xA;		pub fn split(&#xD;&#xA;			sender_origin: OriginFor&lt;T&gt;,&#xD;&#xA;			collection_id: T::CollectionId,&#xD;&#xA;			item_id: T::ItemId,&#xD;&#xA;			key: BoundedVec&lt;u8, T::KeyLimit&gt;,&#xD;&#xA;			num_of_splits: u32,&#xD;&#xA;		) -&gt; DispatchResult {&#xD;&#xA;&#xD;&#xA;			// TODO: Move this to config or storage&#xD;&#xA;			let property_key = &quot;realEstateData&quot;;&#xD;&#xA;			let maximum_splits: u32 = 52u32;&#xD;&#xA;&#xD;&#xA;			// ensure!(num_of_splits.le(&amp;maximum_splits), Error::&lt;T, I&gt;::ExceedsMaxSplits);&#xD;&#xA;&#xD;&#xA;			let property_key: BoundedVec&lt;u8, ConstU32&lt;32&gt;&gt;  =&#xD;&#xA;				BoundedVec::try_from(property_key.as_bytes().to_vec()).map_err(|_| Error::&lt;T, I&gt;::ErrorConvertingKey)?;&#xD;&#xA;&#xD;&#xA;			ensure!(key == property_key, Error::&lt;T, I&gt;::InvalidKey);&#xD;&#xA;&#xD;&#xA;			let origin = ensure_signed(sender_origin.clone())?;&#xD;&#xA;&#xD;&#xA;			let item_metadata = ItemMetadataOf::&lt;T, I&gt;::get(collection_id, item_id).ok_or(Error::&lt;T, I&gt;::MetadataMissingForItem)?;&#xD;&#xA;			let item_attribute = Attribute::&lt;T, I&gt;::get((collection_id, Some(item_id), &amp;key)).ok_or(Error::&lt;T, I&gt;::AttributesMissingForItem)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;			let real_estate_value = item_attribute.0.clone();&#xD;&#xA;&#xD;&#xA;			let item_attribute_vec = real_estate_value.to_vec();&#xD;&#xA;			let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;item_attribute_vec[..]).map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;&#xD;&#xA;			//  ***********************************************************************************&#xD;&#xA;&#xD;&#xA;			// ***********************************************************************************&#xD;&#xA;&#xD;&#xA;			ensure!(num_of_splits.saturating_mul(real_estate_value_json.current_fraction).le(&amp;maximum_splits), Error::&lt;T, I&gt;::ExceedsMaxSplits);&#xD;&#xA;&#xD;&#xA;			let new_real_estate_values = RealEstateValues {&#xD;&#xA;				current_fraction: num_of_splits,&#xD;&#xA;&#xD;&#xA;			};&#xD;&#xA;&#xD;&#xA;			let new_real_estate_values_bounded_vec: BoundedVec&lt;u8, T::ValueLimit&gt; =  Encode::encode(&amp;new_real_estate_values).try_into().unwrap();//new_real_estate_values.encode().try_into().unwrap();&#xD;&#xA;			//   let p = serde_json::to_string(&amp;new_real_estate_values).unwrap();&#xD;&#xA;			// // let new_real_estate_values_bounded_vec: BoundedVec&lt;u8, T::ValueLimit&gt; = p.as_bytes();&#xD;&#xA;			let  mut current_item_id = CurrentItemItByCollection::&lt;T, I&gt;::get(collection_id).ok_or(Error::&lt;T, I&gt;::UnknownItem)?;&#xD;&#xA;&#xD;&#xA;			let parent_item_id = current_item_id;&#xD;&#xA;&#xD;&#xA;			let mut new_item_ids = Vec::with_capacity(num_of_splits as usize);&#xD;&#xA;&#xD;&#xA;			for _ in 0..num_of_splits  {&#xD;&#xA;&#xD;&#xA;				let  next_nft_id = &lt;T as Config&lt;I&gt;&gt;::ItemId::from(current_item_id.into() + 1);&#xD;&#xA;&#xD;&#xA;				new_item_ids.push(next_nft_id);&#xD;&#xA;&#xD;&#xA;				Self::do_mint(collection_id, next_nft_id, origin.clone(), |collection_details| {&#xD;&#xA;					if collection_details.issuer != origin {&#xD;&#xA;						return Err(Error::&lt;T, I&gt;::NoPermission.into());&#xD;&#xA;					}&#xD;&#xA;					Ok(())&#xD;&#xA;				})?;&#xD;&#xA;&#xD;&#xA;				Self::deposit_event(Event::NewItemMinted { collection_id, item_id: next_nft_id, owner:origin.clone() });&#xD;&#xA;&#xD;&#xA;				Self::set_metadata(&#xD;&#xA;					sender_origin.clone(),&#xD;&#xA;					collection_id,&#xD;&#xA;					next_nft_id,&#xD;&#xA;					item_metadata.data.clone(),&#xD;&#xA;					false,&#xD;&#xA;				)?;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;				Self::set_attribute(&#xD;&#xA;					sender_origin.clone(),&#xD;&#xA;					collection_id,&#xD;&#xA;					Some(next_nft_id),&#xD;&#xA;					key.clone(),&#xD;&#xA;					new_real_estate_values_bounded_vec.clone(),&#xD;&#xA;				)?;&#xD;&#xA;&#xD;&#xA;				current_item_id = next_nft_id;&#xD;&#xA;			}&#xD;&#xA;			CurrentItemItByCollection::&lt;T, I&gt;::set(collection_id, Some(current_item_id));&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::ItemSplit {&#xD;&#xA;				parent_collection_id: collection_id,&#xD;&#xA;				parent_item_id: item_id,&#xD;&#xA;				num_of_splits,&#xD;&#xA;				new_item_ids,&#xD;&#xA;				owner: origin.clone(),&#xD;&#xA;			});&#xD;&#xA;&#xD;&#xA;			// Burn parent NFT on success&#xD;&#xA;&#xD;&#xA;			Self::do_burn(collection_id, parent_item_id, |collection_details, details| {&#xD;&#xA;				let is_permitted = collection_details.admin == origin || details.owner == origin;&#xD;&#xA;				ensure!(is_permitted, Error::&lt;T, I&gt;::NoPermission);&#xD;&#xA;				Ok(())&#xD;&#xA;			})?;&#xD;&#xA;&#xD;&#xA;			Self::deposit_event(Event::Burned { collection: collection_id, item: parent_item_id, owner: origin });&#xD;&#xA;&#xD;&#xA;			Ok(())&#xD;&#xA;&#xD;&#xA;		}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;This is the corresponding test&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;#[test]&#xD;&#xA;fn split_should_work() {&#xD;&#xA;	new_test_ext().execute_with(|| {&#xD;&#xA;		Balances::make_free_balance_be(&amp;1, 100_000);&#xD;&#xA;		let key_str = &quot;realEstateData&quot;;&#xD;&#xA;		let key_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; =key_str.as_bytes().to_vec().try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		let mut item_id = 1u32;&#xD;&#xA;		let collection_id = 1u32;&#xD;&#xA;&#xD;&#xA;		println!(&quot;real_estate_values: {:?}&quot;, real_estate_values);&#xD;&#xA;&#xD;&#xA;		let json_data = serde_json::json!({&#xD;&#xA;			&quot;current_fraction&quot;: 1,&#xD;&#xA;		});&#xD;&#xA;&#xD;&#xA;		// Serialize the JSON data to bytes&#xD;&#xA;		let serialized_json = serde_json::to_vec(&amp;json_data).unwrap();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		&#xD;&#xA;		let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = serialized_json.try_into().unwrap();&#xD;&#xA;&#xD;&#xA;		// let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = serde_json::to_string(&amp;real_estate_values).unwrap().as_bytes().to_vec().try_into().unwrap();&#xD;&#xA;		// let real_estate_values_bounded_vec: BoundedVec&lt;u8, ConstU32&lt;50&gt;&gt; = Encode::encode(&amp;real_estate_values).try_into().unwrap();&#xD;&#xA;		println!(&quot;real_estate_values_bounded_vec: {:?}&quot;, real_estate_values_bounded_vec);&#xD;&#xA;		let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;real_estate_values_bounded_vec[..]).unwrap();&#xD;&#xA;		println!(&quot;real_estate_value_json: {:?}&quot;, real_estate_value_json);&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::create(RuntimeOrigin::signed(1), collection_id, 1));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::mint(RuntimeOrigin::signed(1), collection_id, item_id, 1));&#xD;&#xA;&#xD;&#xA;		// Sets Metadata&#xD;&#xA;		assert_ok!(Uniques::set_metadata(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			item_id,&#xD;&#xA;			bvec![0, 0],&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		// Sets Attributes&#xD;&#xA;		assert_ok!(Uniques::set_attribute(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			Some(item_id),&#xD;&#xA;			key_bounded_vec.clone(),&#xD;&#xA;			real_estate_values_bounded_vec&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::set_price(RuntimeOrigin::signed(1), collection_id, item_id, Some(400), None));&#xD;&#xA;		assert_ok!(Uniques::set_metadata(RuntimeOrigin::signed(1), collection_id, item_id, bvec![42, 42], false));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::split(RuntimeOrigin::signed(1), collection_id, item_id, key_bounded_vec.clone(), 4));&#xD;&#xA;&#xD;&#xA;		item_id += 1;&#xD;&#xA;&#xD;&#xA;		assert_ok!(Uniques::set_metadata(&#xD;&#xA;			RuntimeOrigin::signed(1),&#xD;&#xA;			collection_id,&#xD;&#xA;			item_id,&#xD;&#xA;			bvec![0, 0],&#xD;&#xA;			false&#xD;&#xA;		));&#xD;&#xA;&#xD;&#xA;		assert_noop!(&#xD;&#xA;			Uniques::split(RuntimeOrigin::signed(1), collection_id, item_id, key_bounded_vec, 14),&#xD;&#xA;			Error::&lt;Test&gt;::ExceedsMaxSplits&#xD;&#xA;		);&#xD;&#xA;	});&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;So when I do&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let real_estate_value_json: RealEstateValues = Decode::decode(&amp;mut &amp;item_attribute_vec[..]).map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;when I try to use serde or serde_json dependency it throws an error when Im compiling substrate &#xD;&#xA;&#xD;&#xA;it gives this error&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;  error[E0152]: duplicate lang item in crate `std` (which `serde_json` depends on): `panic_impl`.&#xD;&#xA;    |&#xD;&#xA;    = note: the lang item is first defined in crate `sp_io` (which `sp_application_crypto` depends on)&#xD;&#xA;    = note: first definition in `sp_io` &#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;If I use this method in serde&#xD;&#xA;```&#xD;&#xA;let real_estate_value_json: RealEstateValues = from_slice(&amp;item_attribute_vec)&#xD;&#xA;				.map_err(|_| Error::&lt;T, I&gt;::InvalidPropertyAttributes)?;&#xD;&#xA;    ```&#xD;&#xA;&#xD;&#xA;It incorrectly sets current_fraction value &#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45896" PostHistoryTypeId="50" PostId="7458" RevisionGUID="b19aecc5-ca9c-4a61-b940-76cb8f4b853f" CreationDate="2024-03-30T21:06:20.783" UserId="-1" />
  <row Id="45897" PostHistoryTypeId="50" PostId="6738" RevisionGUID="a76acc19-4231-4e0b-9f07-6c0776824d27" CreationDate="2024-03-31T09:09:11.133" UserId="-1" />
  <row Id="45898" PostHistoryTypeId="50" PostId="7485" RevisionGUID="edf0ae0d-fcb4-4d7c-a3fd-53580c7db10a" CreationDate="2024-03-31T11:07:05.860" UserId="-1" />
  <row Id="45899" PostHistoryTypeId="5" PostId="11195" RevisionGUID="3d1a950e-56a0-4714-93ad-59ce112ef459" CreationDate="2024-03-31T18:39:39.273" UserId="5239" Comment="added 143 characters in body" Text="I'm trying to call the do_something function in template_pallet runtime.&#xD;&#xA;I'm running locally the node substrate version : `4.0.0-dev-2ad9b78c7b5` &#xD;&#xA;&#xD;&#xA;When I do try with the UI: I have a blue ballon at the top right:&#xD;&#xA;&#xD;&#xA;    templateModule.doSomething&#xD;&#xA;    ready&#xD;&#xA;&#xD;&#xA;But it get stuck at this and I see nothing in the log of my node.&#xD;&#xA;&#xD;&#xA;And from code&#xD;&#xA;&#xD;&#xA;    let client = WsRpcClient::with_default_url();&#xD;&#xA;                    let mut api = Api::&lt;AssetRuntimeConfig, _&gt;::new(client).unwrap();&#xD;&#xA;    &#xD;&#xA;                    let signer = AccountKeyring::Alice.pair();&#xD;&#xA;                    api.set_signer(signer.into());&#xD;&#xA;    &#xD;&#xA;                    let version = api.get_system_version().unwrap();&#xD;&#xA;                    println!(&quot;Runtime version {} running...&quot;, version);&#xD;&#xA;    &#xD;&#xA;                    // Obtenez les métadonnées du runtime&#xD;&#xA;                    let metadata = api.metadata();&#xD;&#xA;                    for pallet in metadata.pallets() {&#xD;&#xA;                        println!(&quot;{}&quot;, pallet.name());&#xD;&#xA;                        println!(&quot;     {:?}&quot;, pallet.print_calls())&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    let function_name = &quot;do_something&quot;;&#xD;&#xA;                    let pallet = &quot;TemplateModule&quot;;&#xD;&#xA;                    let something: u32 = 42;&#xD;&#xA;    &#xD;&#xA;                    let xt = compose_extrinsic!(&amp;api, pallet, function_name, something);&#xD;&#xA;                    match xt {&#xD;&#xA;                        Some(extrinsic) =&gt; {&#xD;&#xA;                            match api.submit_and_watch_extrinsic_until(extrinsic, XtStatus::InBlock) {&#xD;&#xA;                                Ok(result) =&gt; {&#xD;&#xA;                                    if let Some(block_hash) = result.block_hash {&#xD;&#xA;                                        println!(&quot;[+] Bloc Hash is: {:?}&quot;, block_hash);&#xD;&#xA;                                    } else {&#xD;&#xA;                                        eprintln!(&quot;No Hash returned&quot;);&#xD;&#xA;                                    }&#xD;&#xA;                                }&#xD;&#xA;                                Err(e) =&gt; eprintln!(&quot;Err: {:?}&quot;, e),&#xD;&#xA;                            };&#xD;&#xA;                        }&#xD;&#xA;                        None =&gt; {&#xD;&#xA;                            eprintln!(&quot;Impossible to load the extrinsinc&quot;);&#xD;&#xA;                            return;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;I got a panic&#xD;&#xA;&#xD;&#xA;    Err: RpcClient(ExtrinsicFailed(&quot;Unexpected Response: {\&quot;jsonrpc\&quot;:\&quot;2.0\&quot;,\&quot;error\&quot;:{\&quot;code\&quot;:1002,\&quot;message\&quot;:\&quot;Verification Error: Runtime error: Execution fai&#xD;&#xA;    led: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\\nWASM backtrace:\\nerror while executing at wasm backtrace:\\n    0: 0x7d&#xD;&#xA;    84b - node_template_runtime.wasm!rust_begin_unwind\\n    1: 0x2422 - node_template_runtime.wasm!core::panicking::panic_fmt::h6cdc99c0b517ca33\\n    2: 0x23f16 - &#xD;&#xA;    node_template_runtime.wasm!TaggedTransactionQueue_validate_transaction\&quot;,\&quot;data\&quot;:\&quot;RuntimeApi(\\\&quot;Execution failed: Execution aborted due to trap: wasm trap: wa&#xD;&#xA;    sm `unreachable` instruction executed\\\\nWASM backtrace:\\\\nerror while executing at wasm backtrace:\\\\n    0: 0x7d84b - node_template_runtime.wasm!rust_begin&#xD;&#xA;    _unwind\\\\n    1: 0x2422 - node_template_runtime.wasm!core::panicking::panic_fmt::h6cdc99c0b517ca33\\\\n    2: 0x23f16 - node_template_runtime.wasm!TaggedTransactionQueue_validate_transaction\\\&quot;)\&quot;},\&quot;id\&quot;:\&quot;1\&quot;}&quot;))&#xD;&#xA;&#xD;&#xA;in BC node side&#xD;&#xA;    panicked at substrate_node/runtime/src/lib.rs:340:1:&#xD;&#xA;    Bad input data provided to validate_transaction: Codec error&#xD;&#xA;&#xD;&#xA;Need some help.&#xD;&#xA;Thanks a lot." ContentLicense="CC BY-SA 4.0" />
  <row Id="45900" PostHistoryTypeId="5" PostId="11195" RevisionGUID="acd1cff4-135c-4259-9208-242c54b6d8dc" CreationDate="2024-03-31T21:02:46.900" UserId="5239" Comment="deleted 104 characters in body" Text="I'm trying to call the do_something function in template_pallet runtime.&#xD;&#xA;I'm running locally the node substrate version : `4.0.0-dev-2ad9b78c7b5` &#xD;&#xA;&#xD;&#xA;I'm trying to send an extrinsics from Rust code using substrate-api-client, here is my code:&#xD;&#xA;&#xD;&#xA;    let client = WsRpcClient::with_default_url();&#xD;&#xA;                    let mut api = Api::&lt;AssetRuntimeConfig, _&gt;::new(client).unwrap();&#xD;&#xA;    &#xD;&#xA;                    let signer = AccountKeyring::Alice.pair();&#xD;&#xA;                    api.set_signer(signer.into());&#xD;&#xA;    &#xD;&#xA;                    let version = api.get_system_version().unwrap();&#xD;&#xA;                    println!(&quot;Runtime version {} running...&quot;, version);&#xD;&#xA;    &#xD;&#xA;                    // Obtenez les métadonnées du runtime&#xD;&#xA;                    let metadata = api.metadata();&#xD;&#xA;                    for pallet in metadata.pallets() {&#xD;&#xA;                        println!(&quot;{}&quot;, pallet.name());&#xD;&#xA;                        println!(&quot;     {:?}&quot;, pallet.print_calls())&#xD;&#xA;                    }&#xD;&#xA;    &#xD;&#xA;                    let function_name = &quot;do_something&quot;;&#xD;&#xA;                    let pallet = &quot;TemplateModule&quot;;&#xD;&#xA;                    let something: u32 = 42;&#xD;&#xA;    &#xD;&#xA;                    let xt = compose_extrinsic!(&amp;api, pallet, function_name, something);&#xD;&#xA;                    match xt {&#xD;&#xA;                        Some(extrinsic) =&gt; {&#xD;&#xA;                            match api.submit_and_watch_extrinsic_until(extrinsic, XtStatus::InBlock) {&#xD;&#xA;                                Ok(result) =&gt; {&#xD;&#xA;                                    if let Some(block_hash) = result.block_hash {&#xD;&#xA;                                        println!(&quot;[+] Bloc Hash is: {:?}&quot;, block_hash);&#xD;&#xA;                                    } else {&#xD;&#xA;                                        eprintln!(&quot;No Hash returned&quot;);&#xD;&#xA;                                    }&#xD;&#xA;                                }&#xD;&#xA;                                Err(e) =&gt; eprintln!(&quot;Err: {:?}&quot;, e),&#xD;&#xA;                            };&#xD;&#xA;                        }&#xD;&#xA;                        None =&gt; {&#xD;&#xA;                            eprintln!(&quot;Impossible to load the extrinsinc&quot;);&#xD;&#xA;                            return;&#xD;&#xA;                        }&#xD;&#xA;                    }&#xD;&#xA;&#xD;&#xA;I got a panic&#xD;&#xA;&#xD;&#xA;    Err: RpcClient(ExtrinsicFailed(&quot;Unexpected Response: {\&quot;jsonrpc\&quot;:\&quot;2.0\&quot;,\&quot;error\&quot;:{\&quot;code\&quot;:1002,\&quot;message\&quot;:\&quot;Verification Error: Runtime error: Execution fai&#xD;&#xA;    led: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\\nWASM backtrace:\\nerror while executing at wasm backtrace:\\n    0: 0x7d&#xD;&#xA;    84b - node_template_runtime.wasm!rust_begin_unwind\\n    1: 0x2422 - node_template_runtime.wasm!core::panicking::panic_fmt::h6cdc99c0b517ca33\\n    2: 0x23f16 - &#xD;&#xA;    node_template_runtime.wasm!TaggedTransactionQueue_validate_transaction\&quot;,\&quot;data\&quot;:\&quot;RuntimeApi(\\\&quot;Execution failed: Execution aborted due to trap: wasm trap: wa&#xD;&#xA;    sm `unreachable` instruction executed\\\\nWASM backtrace:\\\\nerror while executing at wasm backtrace:\\\\n    0: 0x7d84b - node_template_runtime.wasm!rust_begin&#xD;&#xA;    _unwind\\\\n    1: 0x2422 - node_template_runtime.wasm!core::panicking::panic_fmt::h6cdc99c0b517ca33\\\\n    2: 0x23f16 - node_template_runtime.wasm!TaggedTransactionQueue_validate_transaction\\\&quot;)\&quot;},\&quot;id\&quot;:\&quot;1\&quot;}&quot;))&#xD;&#xA;&#xD;&#xA;in BC node side&#xD;&#xA;    panicked at substrate_node/runtime/src/lib.rs:340:1:&#xD;&#xA;    Bad input data provided to validate_transaction: Codec error&#xD;&#xA;&#xD;&#xA;Need some help.&#xD;&#xA;Thanks a lot." ContentLicense="CC BY-SA 4.0" />
  <row Id="45901" PostHistoryTypeId="50" PostId="7513" RevisionGUID="33af6982-61a3-42dd-894f-8c0082315bf4" CreationDate="2024-03-31T23:01:25.147" UserId="-1" />
  <row Id="45902" PostHistoryTypeId="2" PostId="11237" RevisionGUID="4557d6e5-f6e2-48fa-9dd9-4a2596bbba56" CreationDate="2024-03-31T23:29:07.250" UserId="1950" Text="Client App creates an Input as follows using polkadotJS to submit to Substrate Module as follows&#xD;&#xA;&#xD;&#xA;```JavaScript&#xD;&#xA;import { ApiPromise, WsProvider } from '@polkadot/api';&#xD;&#xA;const { Keyring } = require('@polkadot/keyring');&#xD;&#xA;import { u8aToHex } from '@polkadot/util';&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;async function objectToByteArray() {&#xD;&#xA;    let attributes = {&#xD;&#xA;        &quot;current_fraction&quot;: 1,&#xD;&#xA;    };&#xD;&#xA;    const jsonString = JSON.stringify(attributes);&#xD;&#xA;    const uint8Array = Uint8Array.from(Buffer.from(jsonString));&#xD;&#xA;    console.log('Uint8Array', uint8Array);&#xD;&#xA;    /*&#xD;&#xA;      [&#xD;&#xA;        123,  34,  99, 117, 114, 114,&#xD;&#xA;        101, 110, 116,  95, 102, 114,&#xD;&#xA;        97,  99, 116, 105, 111, 110,&#xD;&#xA;        34,  58,  49, 125&#xD;&#xA;        ]&#xD;&#xA;    */&#xD;&#xA;    const byteArray = u8aToHex(uint8Array);&#xD;&#xA;    console.log('Byte array', byteArray);&#xD;&#xA;    /*&#xD;&#xA;    Byte array 0x7b2263757272656e745f6672616374696f6e223a317d&#xD;&#xA;    */&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;objectToByteArray();&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;In Substrate Module Inside a function  it greeted by the following function &#xD;&#xA;the bytearray will accepts by the value parameter in following function &#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;&#xD;&#xA;#[pallet::weight(T::WeightInfo::set_attribute())]&#xD;&#xA;pub fn set_attribute(&#xD;&#xA;	origin: OriginFor&lt;T&gt;,&#xD;&#xA;	collection: T::CollectionId,&#xD;&#xA;	maybe_item: Option&lt;T::ItemId&gt;,&#xD;&#xA;	key: BoundedVec&lt;u8, T::KeyLimit&gt;,&#xD;&#xA;	value: BoundedVec&lt;u8, T::ValueLimit&gt;,&#xD;&#xA;) -&gt; DispatchResult {&#xD;&#xA;	let maybe_check_owner = T::ForceOrigin::try_origin(origin)&#xD;&#xA;	// Code here&#xD;&#xA;	Ok(())&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;I need to reconstruct the original object within pallet &#xD;&#xA;and I tried the following Approach &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;// Mapping Object  declared on Substrate side&#xD;&#xA;&#xD;&#xA;```rust&#xD;&#xA;#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)]&#xD;&#xA;pub struct SomeName {&#xD;&#xA;	pub current_fraction: u32,&#xD;&#xA;}&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;let val = SomeName::decode(&amp;mut &amp;value[..]).map_err(|_| Error::&lt;T, I&gt;::Error)?;&#xD;&#xA;&#xD;&#xA;```&#xD;&#xA;&#xD;&#xA;Unfortunately the reconstructioned objects value for `curent_fraction` shows as `1969431163` instead of `1`&#xD;&#xA;&#xD;&#xA;How to fix this issue?" ContentLicense="CC BY-SA 4.0" />
  <row Id="45904" PostHistoryTypeId="1" PostId="11237" RevisionGUID="4557d6e5-f6e2-48fa-9dd9-4a2596bbba56" CreationDate="2024-03-31T23:29:07.250" UserId="1950" Text="How to construct the data structure with correct values for their attributes within a Pallet for data submitted by a polkadotJS app" ContentLicense="CC BY-SA 4.0" />
  <row Id="45905" PostHistoryTypeId="3" PostId="11237" RevisionGUID="4557d6e5-f6e2-48fa-9dd9-4a2596bbba56" CreationDate="2024-03-31T23:29:07.250" UserId="1950" Text="|scale-codec|boundedvec|decode|encode|" ContentLicense="CC BY-SA 4.0" />
</posthistory>